{"text": "[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Preorder α\ninst✝ : Preorder β\nsrc✝¹ : LE (Lex (α × β)) := instLE α β\nsrc✝ : LT (Lex (α × β)) := instLT α β\nx₁ x₂ : Lex (α × β)\na₁ : α\nb₁ : β\na₂ : α\nb₂ : β\n⊢ (a₁, b₁) < (a₂, b₂) ↔ (a₁, b₁) ≤ (a₂, b₂) ∧ ¬(a₂, b₂) ≤ (a₁, b₁)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Preorder α\ninst✝ : Preorder β\nsrc✝¹ : LE (Lex (α × β)) := instLE α β\nsrc✝ : LT (Lex (α × β)) := instLT α β\nx₁ x₂ : Lex (α × β)\na₁ : α\nb₁ : β\na₂ : α\nb₂ : β\n⊢ (a₁, b₁) < (a₂, b₂) → (a₁, b₁) ≤ (a₂, b₂) ∧ ¬(a₂, b₂) ≤ (a₁, b₁)\n[PROOFSTEP]\nrintro (⟨_, _, hlt⟩ | ⟨_, hlt⟩)\n[GOAL]\ncase mp.left\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Preorder α\ninst✝ : Preorder β\nsrc✝¹ : LE (Lex (α × β)) := instLE α β\nsrc✝ : LT (Lex (α × β)) := instLT α β\nx₁ x₂ : Lex (α × β)\na₁ : α\nb₁ : β\na₂ : α\nb₂ : β\nhlt : a₁ < a₂\n⊢ (a₁, b₁) ≤ (a₂, b₂) ∧ ¬(a₂, b₂) ≤ (a₁, b₁)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp.left.left\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Preorder α\ninst✝ : Preorder β\nsrc✝¹ : LE (Lex (α × β)) := instLE α β\nsrc✝ : LT (Lex (α × β)) := instLT α β\nx₁ x₂ : Lex (α × β)\na₁ : α\nb₁ : β\na₂ : α\nb₂ : β\nhlt : a₁ < a₂\n⊢ (a₁, b₁) ≤ (a₂, b₂)\n[PROOFSTEP]\nexact left _ _ hlt\n[GOAL]\ncase mp.left.right\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Preorder α\ninst✝ : Preorder β\nsrc✝¹ : LE (Lex (α × β)) := instLE α β\nsrc✝ : LT (Lex (α × β)) := instLT α β\nx₁ x₂ : Lex (α × β)\na₁ : α\nb₁ : β\na₂ : α\nb₂ : β\nhlt : a₁ < a₂\n⊢ ¬(a₂, b₂) ≤ (a₁, b₁)\n[PROOFSTEP]\nrintro ⟨⟩\n[GOAL]\ncase mp.left.right.left\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Preorder α\ninst✝ : Preorder β\nsrc✝¹ : LE (Lex (α × β)) := instLE α β\nsrc✝ : LT (Lex (α × β)) := instLT α β\nx₁ x₂ : Lex (α × β)\na₁ : α\nb₁ : β\na₂ : α\nb₂ : β\nhlt : a₁ < a₂\nh✝ : a₂ < a₁\n⊢ False\n[PROOFSTEP]\napply lt_asymm hlt\n[GOAL]\ncase mp.left.right.left\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Preorder α\ninst✝ : Preorder β\nsrc✝¹ : LE (Lex (α × β)) := instLE α β\nsrc✝ : LT (Lex (α × β)) := instLT α β\nx₁ x₂ : Lex (α × β)\na₁ : α\nb₁ : β\na₂ : α\nb₂ : β\nhlt : a₁ < a₂\nh✝ : a₂ < a₁\n⊢ a₂ < a₁\n[PROOFSTEP]\nassumption\n[GOAL]\ncase mp.left.right.right\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Preorder α\ninst✝ : Preorder β\nsrc✝¹ : LE (Lex (α × β)) := instLE α β\nsrc✝ : LT (Lex (α × β)) := instLT α β\nx₁ x₂ : Lex (α × β)\na₁ : α\nb₁ b₂ : β\nhlt : a₁ < a₁\nh✝ : b₂ ≤ b₁\n⊢ False\n[PROOFSTEP]\nexact lt_irrefl _ hlt\n[GOAL]\ncase mp.right\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Preorder α\ninst✝ : Preorder β\nsrc✝¹ : LE (Lex (α × β)) := instLE α β\nsrc✝ : LT (Lex (α × β)) := instLT α β\nx₁ x₂ : Lex (α × β)\na₁ : α\nb₁ b₂ : β\nhlt : b₁ < b₂\n⊢ (a₁, b₁) ≤ (a₁, b₂) ∧ ¬(a₁, b₂) ≤ (a₁, b₁)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp.right.left\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Preorder α\ninst✝ : Preorder β\nsrc✝¹ : LE (Lex (α × β)) := instLE α β\nsrc✝ : LT (Lex (α × β)) := instLT α β\nx₁ x₂ : Lex (α × β)\na₁ : α\nb₁ b₂ : β\nhlt : b₁ < b₂\n⊢ (a₁, b₁) ≤ (a₁, b₂)\n[PROOFSTEP]\nright\n[GOAL]\ncase mp.right.left.h\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Preorder α\ninst✝ : Preorder β\nsrc✝¹ : LE (Lex (α × β)) := instLE α β\nsrc✝ : LT (Lex (α × β)) := instLT α β\nx₁ x₂ : Lex (α × β)\na₁ : α\nb₁ b₂ : β\nhlt : b₁ < b₂\n⊢ b₁ ≤ b₂\n[PROOFSTEP]\nrw [lt_iff_le_not_le] at hlt \n[GOAL]\ncase mp.right.left.h\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Preorder α\ninst✝ : Preorder β\nsrc✝¹ : LE (Lex (α × β)) := instLE α β\nsrc✝ : LT (Lex (α × β)) := instLT α β\nx₁ x₂ : Lex (α × β)\na₁ : α\nb₁ b₂ : β\nhlt : b₁ ≤ b₂ ∧ ¬b₂ ≤ b₁\n⊢ b₁ ≤ b₂\n[PROOFSTEP]\nexact hlt.1\n[GOAL]\ncase mp.right.right\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Preorder α\ninst✝ : Preorder β\nsrc✝¹ : LE (Lex (α × β)) := instLE α β\nsrc✝ : LT (Lex (α × β)) := instLT α β\nx₁ x₂ : Lex (α × β)\na₁ : α\nb₁ b₂ : β\nhlt : b₁ < b₂\n⊢ ¬(a₁, b₂) ≤ (a₁, b₁)\n[PROOFSTEP]\nrintro ⟨⟩\n[GOAL]\ncase mp.right.right.left\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Preorder α\ninst✝ : Preorder β\nsrc✝¹ : LE (Lex (α × β)) := instLE α β\nsrc✝ : LT (Lex (α × β)) := instLT α β\nx₁ x₂ : Lex (α × β)\na₁ : α\nb₁ b₂ : β\nhlt : b₁ < b₂\nh✝ : a₁ < a₁\n⊢ False\n[PROOFSTEP]\napply lt_irrefl a₁\n[GOAL]\ncase mp.right.right.left\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Preorder α\ninst✝ : Preorder β\nsrc✝¹ : LE (Lex (α × β)) := instLE α β\nsrc✝ : LT (Lex (α × β)) := instLT α β\nx₁ x₂ : Lex (α × β)\na₁ : α\nb₁ b₂ : β\nhlt : b₁ < b₂\nh✝ : a₁ < a₁\n⊢ a₁ < a₁\n[PROOFSTEP]\nassumption\n[GOAL]\ncase mp.right.right.right\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Preorder α\ninst✝ : Preorder β\nsrc✝¹ : LE (Lex (α × β)) := instLE α β\nsrc✝ : LT (Lex (α × β)) := instLT α β\nx₁ x₂ : Lex (α × β)\na₁ : α\nb₁ b₂ : β\nhlt : b₁ < b₂\nh✝ : b₂ ≤ b₁\n⊢ False\n[PROOFSTEP]\nrw [lt_iff_le_not_le] at hlt \n[GOAL]\ncase mp.right.right.right\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Preorder α\ninst✝ : Preorder β\nsrc✝¹ : LE (Lex (α × β)) := instLE α β\nsrc✝ : LT (Lex (α × β)) := instLT α β\nx₁ x₂ : Lex (α × β)\na₁ : α\nb₁ b₂ : β\nhlt : b₁ ≤ b₂ ∧ ¬b₂ ≤ b₁\nh✝ : b₂ ≤ b₁\n⊢ False\n[PROOFSTEP]\napply hlt.2\n[GOAL]\ncase mp.right.right.right\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Preorder α\ninst✝ : Preorder β\nsrc✝¹ : LE (Lex (α × β)) := instLE α β\nsrc✝ : LT (Lex (α × β)) := instLT α β\nx₁ x₂ : Lex (α × β)\na₁ : α\nb₁ b₂ : β\nhlt : b₁ ≤ b₂ ∧ ¬b₂ ≤ b₁\nh✝ : b₂ ≤ b₁\n⊢ b₂ ≤ b₁\n[PROOFSTEP]\nassumption\n[GOAL]\ncase mpr\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Preorder α\ninst✝ : Preorder β\nsrc✝¹ : LE (Lex (α × β)) := instLE α β\nsrc✝ : LT (Lex (α × β)) := instLT α β\nx₁ x₂ : Lex (α × β)\na₁ : α\nb₁ : β\na₂ : α\nb₂ : β\n⊢ (a₁, b₁) ≤ (a₂, b₂) ∧ ¬(a₂, b₂) ≤ (a₁, b₁) → (a₁, b₁) < (a₂, b₂)\n[PROOFSTEP]\nrintro ⟨⟨⟩, h₂r⟩\n[GOAL]\ncase mpr.intro.left\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Preorder α\ninst✝ : Preorder β\nsrc✝¹ : LE (Lex (α × β)) := instLE α β\nsrc✝ : LT (Lex (α × β)) := instLT α β\nx₁ x₂ : Lex (α × β)\na₁ : α\nb₁ : β\na₂ : α\nb₂ : β\nh₂r : ¬(a₂, b₂) ≤ (a₁, b₁)\nh✝ : a₁ < a₂\n⊢ (a₁, b₁) < (a₂, b₂)\n[PROOFSTEP]\nleft\n[GOAL]\ncase mpr.intro.left.h\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Preorder α\ninst✝ : Preorder β\nsrc✝¹ : LE (Lex (α × β)) := instLE α β\nsrc✝ : LT (Lex (α × β)) := instLT α β\nx₁ x₂ : Lex (α × β)\na₁ : α\nb₁ : β\na₂ : α\nb₂ : β\nh₂r : ¬(a₂, b₂) ≤ (a₁, b₁)\nh✝ : a₁ < a₂\n⊢ a₁ < a₂\n[PROOFSTEP]\nassumption\n[GOAL]\ncase mpr.intro.right\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Preorder α\ninst✝ : Preorder β\nsrc✝¹ : LE (Lex (α × β)) := instLE α β\nsrc✝ : LT (Lex (α × β)) := instLT α β\nx₁ x₂ : Lex (α × β)\na₁ : α\nb₁ b₂ : β\nh₂r : ¬(a₁, b₂) ≤ (a₁, b₁)\nh✝ : b₁ ≤ b₂\n⊢ (a₁, b₁) < (a₁, b₂)\n[PROOFSTEP]\nright\n[GOAL]\ncase mpr.intro.right.h\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Preorder α\ninst✝ : Preorder β\nsrc✝¹ : LE (Lex (α × β)) := instLE α β\nsrc✝ : LT (Lex (α × β)) := instLT α β\nx₁ x₂ : Lex (α × β)\na₁ : α\nb₁ b₂ : β\nh₂r : ¬(a₁, b₂) ≤ (a₁, b₁)\nh✝ : b₁ ≤ b₂\n⊢ b₁ < b₂\n[PROOFSTEP]\nrw [lt_iff_le_not_le]\n[GOAL]\ncase mpr.intro.right.h\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Preorder α\ninst✝ : Preorder β\nsrc✝¹ : LE (Lex (α × β)) := instLE α β\nsrc✝ : LT (Lex (α × β)) := instLT α β\nx₁ x₂ : Lex (α × β)\na₁ : α\nb₁ b₂ : β\nh₂r : ¬(a₁, b₂) ≤ (a₁, b₁)\nh✝ : b₁ ≤ b₂\n⊢ b₁ ≤ b₂ ∧ ¬b₂ ≤ b₁\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mpr.intro.right.h.left\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Preorder α\ninst✝ : Preorder β\nsrc✝¹ : LE (Lex (α × β)) := instLE α β\nsrc✝ : LT (Lex (α × β)) := instLT α β\nx₁ x₂ : Lex (α × β)\na₁ : α\nb₁ b₂ : β\nh₂r : ¬(a₁, b₂) ≤ (a₁, b₁)\nh✝ : b₁ ≤ b₂\n⊢ b₁ ≤ b₂\n[PROOFSTEP]\nassumption\n[GOAL]\ncase mpr.intro.right.h.right\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Preorder α\ninst✝ : Preorder β\nsrc✝¹ : LE (Lex (α × β)) := instLE α β\nsrc✝ : LT (Lex (α × β)) := instLT α β\nx₁ x₂ : Lex (α × β)\na₁ : α\nb₁ b₂ : β\nh₂r : ¬(a₁, b₂) ≤ (a₁, b₁)\nh✝ : b₁ ≤ b₂\n⊢ ¬b₂ ≤ b₁\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr.intro.right.h.right\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Preorder α\ninst✝ : Preorder β\nsrc✝¹ : LE (Lex (α × β)) := instLE α β\nsrc✝ : LT (Lex (α × β)) := instLT α β\nx₁ x₂ : Lex (α × β)\na₁ : α\nb₁ b₂ : β\nh₂r : ¬(a₁, b₂) ≤ (a₁, b₁)\nh✝ : b₁ ≤ b₂\nh : b₂ ≤ b₁\n⊢ False\n[PROOFSTEP]\napply h₂r\n[GOAL]\ncase mpr.intro.right.h.right\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Preorder α\ninst✝ : Preorder β\nsrc✝¹ : LE (Lex (α × β)) := instLE α β\nsrc✝ : LT (Lex (α × β)) := instLT α β\nx₁ x₂ : Lex (α × β)\na₁ : α\nb₁ b₂ : β\nh₂r : ¬(a₁, b₂) ≤ (a₁, b₁)\nh✝ : b₁ ≤ b₂\nh : b₂ ≤ b₁\n⊢ (a₁, b₂) ≤ (a₁, b₁)\n[PROOFSTEP]\nright\n[GOAL]\ncase mpr.intro.right.h.right.h\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Preorder α\ninst✝ : Preorder β\nsrc✝¹ : LE (Lex (α × β)) := instLE α β\nsrc✝ : LT (Lex (α × β)) := instLT α β\nx₁ x₂ : Lex (α × β)\na₁ : α\nb₁ b₂ : β\nh₂r : ¬(a₁, b₂) ≤ (a₁, b₁)\nh✝ : b₁ ≤ b₂\nh : b₂ ≤ b₁\n⊢ b₂ ≤ b₁\n[PROOFSTEP]\nexact h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : PartialOrder α\ninst✝ : Preorder β\n⊢ Monotone ↑toLex\n[PROOFSTEP]\nrintro ⟨a₁, b₁⟩ ⟨a₂, b₂⟩ ⟨ha, hb⟩\n[GOAL]\ncase mk.mk.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : PartialOrder α\ninst✝ : Preorder β\na₁ : α\nb₁ : β\na₂ : α\nb₂ : β\nha : (a₁, b₁).fst ≤ (a₂, b₂).fst\nhb : (a₁, b₁).snd ≤ (a₂, b₂).snd\n⊢ ↑toLex (a₁, b₁) ≤ ↑toLex (a₂, b₂)\n[PROOFSTEP]\nobtain rfl | ha : a₁ = a₂ ∨ _ := ha.eq_or_lt\n[GOAL]\ncase mk.mk.intro.inl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : PartialOrder α\ninst✝ : Preorder β\na₁ : α\nb₁ b₂ : β\nha : (a₁, b₁).fst ≤ (a₁, b₂).fst\nhb : (a₁, b₁).snd ≤ (a₁, b₂).snd\n⊢ ↑toLex (a₁, b₁) ≤ ↑toLex (a₁, b₂)\n[PROOFSTEP]\nexact right _ hb\n[GOAL]\ncase mk.mk.intro.inr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : PartialOrder α\ninst✝ : Preorder β\na₁ : α\nb₁ : β\na₂ : α\nb₂ : β\nha✝ : (a₁, b₁).fst ≤ (a₂, b₂).fst\nhb : (a₁, b₁).snd ≤ (a₂, b₂).snd\nha : (a₁, b₁).fst < (a₂, b₂).fst\n⊢ ↑toLex (a₁, b₁) ≤ ↑toLex (a₂, b₂)\n[PROOFSTEP]\nexact left _ _ ha\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : PartialOrder α\ninst✝ : Preorder β\n⊢ StrictMono ↑toLex\n[PROOFSTEP]\nrintro ⟨a₁, b₁⟩ ⟨a₂, b₂⟩ h\n[GOAL]\ncase mk.mk\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : PartialOrder α\ninst✝ : Preorder β\na₁ : α\nb₁ : β\na₂ : α\nb₂ : β\nh : (a₁, b₁) < (a₂, b₂)\n⊢ ↑toLex (a₁, b₁) < ↑toLex (a₂, b₂)\n[PROOFSTEP]\nobtain rfl | ha : a₁ = a₂ ∨ _ := h.le.1.eq_or_lt\n[GOAL]\ncase mk.mk.inl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : PartialOrder α\ninst✝ : Preorder β\na₁ : α\nb₁ b₂ : β\nh : (a₁, b₁) < (a₁, b₂)\n⊢ ↑toLex (a₁, b₁) < ↑toLex (a₁, b₂)\n[PROOFSTEP]\nexact right _ (Prod.mk_lt_mk_iff_right.1 h)\n[GOAL]\ncase mk.mk.inr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : PartialOrder α\ninst✝ : Preorder β\na₁ : α\nb₁ : β\na₂ : α\nb₂ : β\nh : (a₁, b₁) < (a₂, b₂)\nha : (a₁, b₁).fst < (a₂, b₂).fst\n⊢ ↑toLex (a₁, b₁) < ↑toLex (a₂, b₂)\n[PROOFSTEP]\nexact left _ _ ha\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : PartialOrder α\ninst✝ : PartialOrder β\nsrc✝ : Preorder (Lex (α × β)) := preorder α β\n⊢ ∀ (a b : Lex (α × β)), a ≤ b → b ≤ a → a = b\n[PROOFSTEP]\nhaveI : IsStrictOrder α (· < ·) := { irrefl := lt_irrefl, trans := fun _ _ _ => lt_trans }\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : PartialOrder α\ninst✝ : PartialOrder β\nsrc✝ : Preorder (Lex (α × β)) := preorder α β\nthis : IsStrictOrder α fun x x_1 => x < x_1\n⊢ ∀ (a b : Lex (α × β)), a ≤ b → b ≤ a → a = b\n[PROOFSTEP]\nhaveI : IsAntisymm β (· ≤ ·) := ⟨fun _ _ => le_antisymm⟩\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : PartialOrder α\ninst✝ : PartialOrder β\nsrc✝ : Preorder (Lex (α × β)) := preorder α β\nthis✝ : IsStrictOrder α fun x x_1 => x < x_1\nthis : IsAntisymm β fun x x_1 => x ≤ x_1\n⊢ ∀ (a b : Lex (α × β)), a ≤ b → b ≤ a → a = b\n[PROOFSTEP]\nexact @antisymm _ (Prod.Lex _ _) _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝³ : Preorder α\ninst✝² : Preorder β\ninst✝¹ : DenselyOrdered α\ninst✝ : DenselyOrdered β\n⊢ ∀ (a₁ a₂ : Lex (α × β)), a₁ < a₂ → ∃ a, a₁ < a ∧ a < a₂\n[PROOFSTEP]\nrintro _ _ (@⟨a₁, b₁, a₂, b₂, h⟩ | @⟨a, b₁, b₂, h⟩)\n[GOAL]\ncase left\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝³ : Preorder α\ninst✝² : Preorder β\ninst✝¹ : DenselyOrdered α\ninst✝ : DenselyOrdered β\na₁ : α\nb₁ : β\na₂ : α\nb₂ : β\nh : a₁ < a₂\n⊢ ∃ a, (a₁, b₁) < a ∧ a < (a₂, b₂)\n[PROOFSTEP]\nobtain ⟨c, h₁, h₂⟩ := exists_between h\n[GOAL]\ncase left.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝³ : Preorder α\ninst✝² : Preorder β\ninst✝¹ : DenselyOrdered α\ninst✝ : DenselyOrdered β\na₁ : α\nb₁ : β\na₂ : α\nb₂ : β\nh : a₁ < a₂\nc : α\nh₁ : a₁ < c\nh₂ : c < a₂\n⊢ ∃ a, (a₁, b₁) < a ∧ a < (a₂, b₂)\n[PROOFSTEP]\nexact ⟨(c, b₁), left _ _ h₁, left _ _ h₂⟩\n[GOAL]\ncase right\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝³ : Preorder α\ninst✝² : Preorder β\ninst✝¹ : DenselyOrdered α\ninst✝ : DenselyOrdered β\na : α\nb₁ b₂ : β\nh : b₁ < b₂\n⊢ ∃ a_1, (a, b₁) < a_1 ∧ a_1 < (a, b₂)\n[PROOFSTEP]\nobtain ⟨c, h₁, h₂⟩ := exists_between h\n[GOAL]\ncase right.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝³ : Preorder α\ninst✝² : Preorder β\ninst✝¹ : DenselyOrdered α\ninst✝ : DenselyOrdered β\na : α\nb₁ b₂ : β\nh : b₁ < b₂\nc : β\nh₁ : b₁ < c\nh₂ : c < b₂\n⊢ ∃ a_1, (a, b₁) < a_1 ∧ a_1 < (a, b₂)\n[PROOFSTEP]\nexact ⟨(a, c), right _ h₁, right _ h₂⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : Preorder α\ninst✝¹ : Preorder β\ninst✝ : NoMaxOrder α\n⊢ ∀ (a : Lex (α × β)), ∃ b, a < b\n[PROOFSTEP]\nrintro ⟨a, b⟩\n[GOAL]\ncase mk\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : Preorder α\ninst✝¹ : Preorder β\ninst✝ : NoMaxOrder α\na : α\nb : β\n⊢ ∃ b_1, (a, b) < b_1\n[PROOFSTEP]\nobtain ⟨c, h⟩ := exists_gt a\n[GOAL]\ncase mk.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : Preorder α\ninst✝¹ : Preorder β\ninst✝ : NoMaxOrder α\na : α\nb : β\nc : α\nh : a < c\n⊢ ∃ b_1, (a, b) < b_1\n[PROOFSTEP]\nexact ⟨⟨c, b⟩, left _ _ h⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : Preorder α\ninst✝¹ : Preorder β\ninst✝ : NoMinOrder α\n⊢ ∀ (a : Lex (α × β)), ∃ b, b < a\n[PROOFSTEP]\nrintro ⟨a, b⟩\n[GOAL]\ncase mk\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : Preorder α\ninst✝¹ : Preorder β\ninst✝ : NoMinOrder α\na : α\nb : β\n⊢ ∃ b_1, b_1 < (a, b)\n[PROOFSTEP]\nobtain ⟨c, h⟩ := exists_lt a\n[GOAL]\ncase mk.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : Preorder α\ninst✝¹ : Preorder β\ninst✝ : NoMinOrder α\na : α\nb : β\nc : α\nh : c < a\n⊢ ∃ b_1, b_1 < (a, b)\n[PROOFSTEP]\nexact ⟨⟨c, b⟩, left _ _ h⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : Preorder α\ninst✝¹ : Preorder β\ninst✝ : NoMaxOrder β\n⊢ ∀ (a : Lex (α × β)), ∃ b, a < b\n[PROOFSTEP]\nrintro ⟨a, b⟩\n[GOAL]\ncase mk\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : Preorder α\ninst✝¹ : Preorder β\ninst✝ : NoMaxOrder β\na : α\nb : β\n⊢ ∃ b_1, (a, b) < b_1\n[PROOFSTEP]\nobtain ⟨c, h⟩ := exists_gt b\n[GOAL]\ncase mk.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : Preorder α\ninst✝¹ : Preorder β\ninst✝ : NoMaxOrder β\na : α\nb c : β\nh : b < c\n⊢ ∃ b_1, (a, b) < b_1\n[PROOFSTEP]\nexact ⟨⟨a, c⟩, right _ h⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : Preorder α\ninst✝¹ : Preorder β\ninst✝ : NoMinOrder β\n⊢ ∀ (a : Lex (α × β)), ∃ b, b < a\n[PROOFSTEP]\nrintro ⟨a, b⟩\n[GOAL]\ncase mk\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : Preorder α\ninst✝¹ : Preorder β\ninst✝ : NoMinOrder β\na : α\nb : β\n⊢ ∃ b_1, b_1 < (a, b)\n[PROOFSTEP]\nobtain ⟨c, h⟩ := exists_lt b\n[GOAL]\ncase mk.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : Preorder α\ninst✝¹ : Preorder β\ninst✝ : NoMinOrder β\na : α\nb c : β\nh : c < b\n⊢ ∃ b_1, b_1 < (a, b)\n[PROOFSTEP]\nexact ⟨⟨a, c⟩, right _ h⟩\n", "meta": {"mathlib_filename": "Mathlib.Data.Prod.Lex", "llama_tokens": 9650, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8397339676722394, "lm_q2_score": 0.6548947223065755, "lm_q1q2_score": 0.5499373435701101}}
{"text": "[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns₂ s₁ s : Finset α\na✝ : α\ng f✝ : α → β\ninst✝³ : CommMonoid β\ninst✝² : OrderedCancelAddCommMonoid α\ninst✝¹ : ExistsAddOfLE α\ninst✝ : LocallyFiniteOrder α\nf : α → β\na b c : α\n⊢ ∏ x in Ico a b, f (x + c) = ∏ x in Ico (a + c) (b + c), f x\n[PROOFSTEP]\nrw [← map_add_right_Ico, prod_map]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns₂ s₁ s : Finset α\na✝ : α\ng f✝ : α → β\ninst✝³ : CommMonoid β\ninst✝² : OrderedCancelAddCommMonoid α\ninst✝¹ : ExistsAddOfLE α\ninst✝ : LocallyFiniteOrder α\nf : α → β\na b c : α\n⊢ ∏ x in Ico a b, f (x + c) = ∏ x in Ico a b, f (↑(addRightEmbedding c) x)\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns₂ s₁ s : Finset α\na✝ : α\ng f✝ : α → β\ninst✝³ : CommMonoid β\ninst✝² : OrderedCancelAddCommMonoid α\ninst✝¹ : ExistsAddOfLE α\ninst✝ : LocallyFiniteOrder α\nf : α → β\na b c : α\n⊢ ∏ x in Ico a b, f (c + x) = ∏ x in Ico (a + c) (b + c), f x\n[PROOFSTEP]\nconvert prod_Ico_add' f a b c using 2\n[GOAL]\ncase h.e'_2.a\nα : Type u\nβ : Type v\nγ : Type w\ns₂ s₁ s : Finset α\na✝¹ : α\ng f✝ : α → β\ninst✝³ : CommMonoid β\ninst✝² : OrderedCancelAddCommMonoid α\ninst✝¹ : ExistsAddOfLE α\ninst✝ : LocallyFiniteOrder α\nf : α → β\na b c x✝ : α\na✝ : x✝ ∈ Ico a b\n⊢ f (c + x✝) = f (x✝ + c)\n[PROOFSTEP]\nrw [add_comm]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns₂ s₁ s : Finset α\na✝ : α\ng f✝ : α → β\ninst✝ : CommMonoid β\na b : ℕ\nhab : a ≤ b\nf : ℕ → β\n⊢ ∏ k in Ico a (b + 1), f k = (∏ k in Ico a b, f k) * f b\n[PROOFSTEP]\nrw [Nat.Ico_succ_right_eq_insert_Ico hab, prod_insert right_not_mem_Ico, mul_comm]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns₂ s₁ s : Finset α\na✝ : α\ng f✝ : α → β\ninst✝ : CommMonoid β\na b : ℕ\nhab : a < b\nf : ℕ → β\n⊢ ∏ k in Ico a b, f k = f a * ∏ k in Ico (a + 1) b, f k\n[PROOFSTEP]\nhave ha : a ∉ Ico (a + 1) b := by simp\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns₂ s₁ s : Finset α\na✝ : α\ng f✝ : α → β\ninst✝ : CommMonoid β\na b : ℕ\nhab : a < b\nf : ℕ → β\n⊢ ¬a ∈ Ico (a + 1) b\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns₂ s₁ s : Finset α\na✝ : α\ng f✝ : α → β\ninst✝ : CommMonoid β\na b : ℕ\nhab : a < b\nf : ℕ → β\nha : ¬a ∈ Ico (a + 1) b\n⊢ ∏ k in Ico a b, f k = f a * ∏ k in Ico (a + 1) b, f k\n[PROOFSTEP]\nrw [← prod_insert ha, Nat.Ico_insert_succ_left hab]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns₂ s₁ s : Finset α\na : α\ng f✝ : α → β\ninst✝ : CommMonoid β\nf : ℕ → β\nm n k : ℕ\nhmn : m ≤ n\nhnk : n ≤ k\n⊢ (∏ i in Ioc m n, f i) * ∏ i in Ioc n k, f i = ∏ i in Ioc m k, f i\n[PROOFSTEP]\nrw [← Ioc_union_Ioc_eq_Ioc hmn hnk, prod_union]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns₂ s₁ s : Finset α\na : α\ng f✝ : α → β\ninst✝ : CommMonoid β\nf : ℕ → β\nm n k : ℕ\nhmn : m ≤ n\nhnk : n ≤ k\n⊢ Disjoint (Ioc m n) (Ioc n k)\n[PROOFSTEP]\napply disjoint_left.2 fun x hx h'x => _\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns₂ s₁ s : Finset α\na : α\ng f✝ : α → β\ninst✝ : CommMonoid β\nf : ℕ → β\nm n k : ℕ\nhmn : m ≤ n\nhnk : n ≤ k\n⊢ ∀ (x : ℕ), x ∈ Ioc m n → x ∈ Ioc n k → False\n[PROOFSTEP]\nintros x hx h'x\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns₂ s₁ s : Finset α\na : α\ng f✝ : α → β\ninst✝ : CommMonoid β\nf : ℕ → β\nm n k : ℕ\nhmn : m ≤ n\nhnk : n ≤ k\nx : ℕ\nhx : x ∈ Ioc m n\nh'x : x ∈ Ioc n k\n⊢ False\n[PROOFSTEP]\nexact lt_irrefl _ ((mem_Ioc.1 h'x).1.trans_le (mem_Ioc.1 hx).2)\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns₂ s₁ s : Finset α\na✝ : α\ng f✝ : α → β\ninst✝ : CommMonoid β\na b : ℕ\nhab : a ≤ b\nf : ℕ → β\n⊢ ∏ k in Ioc a (b + 1), f k = (∏ k in Ioc a b, f k) * f (b + 1)\n[PROOFSTEP]\nrw [← prod_Ioc_consecutive _ hab (Nat.le_succ b), Nat.Ioc_succ_singleton, prod_singleton]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns₂ s₁ s : Finset α\na : α\ng f✝ : α → β\ninst✝¹ : CommMonoid β\nδ : Type u_1\ninst✝ : CommGroup δ\nf : ℕ → δ\nm n : ℕ\nh : m ≤ n\n⊢ (∏ k in Ico m n, f k) * ∏ k in range m, f k = ∏ k in range n, f k\n[PROOFSTEP]\nrw [mul_comm]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns₂ s₁ s : Finset α\na : α\ng f✝ : α → β\ninst✝¹ : CommMonoid β\nδ : Type u_1\ninst✝ : CommGroup δ\nf : ℕ → δ\nm n : ℕ\nh : m ≤ n\n⊢ (∏ k in range m, f k) * ∏ k in Ico m n, f k = ∏ k in range n, f k\n[PROOFSTEP]\nexact prod_range_mul_prod_Ico f h\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns₂ s₁ s : Finset α\na : α\ng f✝ : α → β\ninst✝¹ : CommMonoid β\nδ : Type u_1\ninst✝ : CommGroup δ\nf : ℕ → δ\nm n : ℕ\nh : m ≤ n\n⊢ ∏ k in Ico m n, f k = (∏ k in range n, f k) / ∏ k in range m, f k\n[PROOFSTEP]\nsimpa only [div_eq_mul_inv] using prod_Ico_eq_mul_inv f h\n[GOAL]\nα✝ : Type u\nβ : Type v\nγ : Type w\ns₂ s₁ s : Finset α✝\na : α✝\ng f✝ : α✝ → β\ninst✝¹ : CommMonoid β\nα : Type u_1\ninst✝ : CommGroup α\nf : ℕ → α\nn m : ℕ\nhnm : n ≤ m\n⊢ (∏ k in range m, f k) / ∏ k in range n, f k = ∏ k in filter (fun k => n ≤ k) (range m), f k\n[PROOFSTEP]\nrw [← prod_Ico_eq_div f hnm]\n[GOAL]\nα✝ : Type u\nβ : Type v\nγ : Type w\ns₂ s₁ s : Finset α✝\na : α✝\ng f✝ : α✝ → β\ninst✝¹ : CommMonoid β\nα : Type u_1\ninst✝ : CommGroup α\nf : ℕ → α\nn m : ℕ\nhnm : n ≤ m\n⊢ ∏ k in Ico n m, f k = ∏ k in filter (fun k => n ≤ k) (range m), f k\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_s\nα✝ : Type u\nβ : Type v\nγ : Type w\ns₂ s₁ s : Finset α✝\na : α✝\ng f✝ : α✝ → β\ninst✝¹ : CommMonoid β\nα : Type u_1\ninst✝ : CommGroup α\nf : ℕ → α\nn m : ℕ\nhnm : n ≤ m\n⊢ Ico n m = filter (fun k => n ≤ k) (range m)\n[PROOFSTEP]\napply Finset.ext\n[GOAL]\ncase e_s.a\nα✝ : Type u\nβ : Type v\nγ : Type w\ns₂ s₁ s : Finset α✝\na : α✝\ng f✝ : α✝ → β\ninst✝¹ : CommMonoid β\nα : Type u_1\ninst✝ : CommGroup α\nf : ℕ → α\nn m : ℕ\nhnm : n ≤ m\n⊢ ∀ (a : ℕ), a ∈ Ico n m ↔ a ∈ filter (fun k => n ≤ k) (range m)\n[PROOFSTEP]\nsimp only [mem_Ico, mem_filter, mem_range, *]\n[GOAL]\ncase e_s.a\nα✝ : Type u\nβ : Type v\nγ : Type w\ns₂ s₁ s : Finset α✝\na : α✝\ng f✝ : α✝ → β\ninst✝¹ : CommMonoid β\nα : Type u_1\ninst✝ : CommGroup α\nf : ℕ → α\nn m : ℕ\nhnm : n ≤ m\n⊢ ∀ (a : ℕ), n ≤ a ∧ a < m ↔ a < m ∧ n ≤ a\n[PROOFSTEP]\ntauto\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns₂ s₁ s : Finset α\na✝ : α\ng f✝ : α → β\ninst✝¹ : CommMonoid β\nM : Type u_1\ninst✝ : AddCommMonoid M\na b : ℕ\nf : ℕ → ℕ → M\n⊢ ∑ i in Ico a b, ∑ j in Ico i b, f i j = ∑ j in Ico a b, ∑ i in Ico a (j + 1), f i j\n[PROOFSTEP]\nrw [Finset.sum_sigma', Finset.sum_sigma']\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns₂ s₁ s : Finset α\na✝ : α\ng f✝ : α → β\ninst✝¹ : CommMonoid β\nM : Type u_1\ninst✝ : AddCommMonoid M\na b : ℕ\nf : ℕ → ℕ → M\n⊢ ∑ x in Finset.sigma (Ico a b) fun i => Ico i b, f x.fst x.snd =\n    ∑ x in Finset.sigma (Ico a b) fun j => Ico a (j + 1), f x.snd x.fst\n[PROOFSTEP]\nrefine'\n  Finset.sum_bij' (fun (x : Σ _ : ℕ, ℕ) _ => (⟨x.2, x.1⟩ : Σ _ : ℕ, ℕ)) _ (fun _ _ => rfl)\n    (fun (x : Σ _ : ℕ, ℕ) _ => (⟨x.2, x.1⟩ : Σ _ : ℕ, ℕ)) _ (by (rintro ⟨⟩ _; rfl)) (by (rintro ⟨⟩ _; rfl))\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns₂ s₁ s : Finset α\na✝ : α\ng f✝ : α → β\ninst✝¹ : CommMonoid β\nM : Type u_1\ninst✝ : AddCommMonoid M\na b : ℕ\nf : ℕ → ℕ → M\n⊢ ∀ (a_1 : (_ : ℕ) × ℕ) (ha : a_1 ∈ Finset.sigma (Ico a b) fun i => Ico i b),\n    (fun x x_1 => { fst := x.snd, snd := x.fst }) ((fun x x_1 => { fst := x.snd, snd := x.fst }) a_1 ha)\n        (_ : (fun x x_1 => { fst := x.snd, snd := x.fst }) a_1 ha ∈ ?m.28850) =\n      a_1\n[PROOFSTEP]\nrintro ⟨⟩ _\n[GOAL]\ncase mk\nα : Type u\nβ : Type v\nγ : Type w\ns₂ s₁ s : Finset α\na✝ : α\ng f✝ : α → β\ninst✝¹ : CommMonoid β\nM : Type u_1\ninst✝ : AddCommMonoid M\na b : ℕ\nf : ℕ → ℕ → M\nfst✝ snd✝ : ℕ\nha✝ : { fst := fst✝, snd := snd✝ } ∈ Finset.sigma (Ico a b) fun i => Ico i b\n⊢ (fun x x_1 => { fst := x.snd, snd := x.fst })\n      ((fun x x_1 => { fst := x.snd, snd := x.fst }) { fst := fst✝, snd := snd✝ } ha✝)\n      (_ : (fun x x_1 => { fst := x.snd, snd := x.fst }) { fst := fst✝, snd := snd✝ } ha✝ ∈ ?m.28850) =\n    { fst := fst✝, snd := snd✝ }\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns₂ s₁ s : Finset α\na✝ : α\ng f✝ : α → β\ninst✝¹ : CommMonoid β\nM : Type u_1\ninst✝ : AddCommMonoid M\na b : ℕ\nf : ℕ → ℕ → M\n⊢ ∀ (a_1 : (_ : ℕ) × ℕ) (ha : a_1 ∈ Finset.sigma (Ico a b) fun j => Ico a (j + 1)),\n    (fun x x_1 => { fst := x.snd, snd := x.fst }) ((fun x x_1 => { fst := x.snd, snd := x.fst }) a_1 ha)\n        (_ : (fun x x_1 => { fst := x.snd, snd := x.fst }) a_1 ha ∈ ?m.28849) =\n      a_1\n[PROOFSTEP]\nrintro ⟨⟩ _\n[GOAL]\ncase mk\nα : Type u\nβ : Type v\nγ : Type w\ns₂ s₁ s : Finset α\na✝ : α\ng f✝ : α → β\ninst✝¹ : CommMonoid β\nM : Type u_1\ninst✝ : AddCommMonoid M\na b : ℕ\nf : ℕ → ℕ → M\nfst✝ snd✝ : ℕ\nha✝ : { fst := fst✝, snd := snd✝ } ∈ Finset.sigma (Ico a b) fun j => Ico a (j + 1)\n⊢ (fun x x_1 => { fst := x.snd, snd := x.fst })\n      ((fun x x_1 => { fst := x.snd, snd := x.fst }) { fst := fst✝, snd := snd✝ } ha✝)\n      (_ : (fun x x_1 => { fst := x.snd, snd := x.fst }) { fst := fst✝, snd := snd✝ } ha✝ ∈ ?m.28849) =\n    { fst := fst✝, snd := snd✝ }\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_1\nα : Type u\nβ : Type v\nγ : Type w\ns₂ s₁ s : Finset α\na✝ : α\ng f✝ : α → β\ninst✝¹ : CommMonoid β\nM : Type u_1\ninst✝ : AddCommMonoid M\na b : ℕ\nf : ℕ → ℕ → M\n⊢ ∀ (a_1 : (_ : ℕ) × ℕ) (ha : a_1 ∈ Finset.sigma (Ico a b) fun i => Ico i b),\n    (fun x x_1 => { fst := x.snd, snd := x.fst }) a_1 ha ∈ Finset.sigma (Ico a b) fun j => Ico a (j + 1)\n[PROOFSTEP]\nsimp only [Finset.mem_Ico, Sigma.forall, Finset.mem_sigma]\n[GOAL]\ncase refine'_2\nα : Type u\nβ : Type v\nγ : Type w\ns₂ s₁ s : Finset α\na✝ : α\ng f✝ : α → β\ninst✝¹ : CommMonoid β\nM : Type u_1\ninst✝ : AddCommMonoid M\na b : ℕ\nf : ℕ → ℕ → M\n⊢ ∀ (a_1 : (_ : ℕ) × ℕ) (ha : a_1 ∈ Finset.sigma (Ico a b) fun j => Ico a (j + 1)),\n    (fun x x_1 => { fst := x.snd, snd := x.fst }) a_1 ha ∈ Finset.sigma (Ico a b) fun i => Ico i b\n[PROOFSTEP]\nsimp only [Finset.mem_Ico, Sigma.forall, Finset.mem_sigma]\n[GOAL]\ncase refine'_1\nα : Type u\nβ : Type v\nγ : Type w\ns₂ s₁ s : Finset α\na✝ : α\ng f✝ : α → β\ninst✝¹ : CommMonoid β\nM : Type u_1\ninst✝ : AddCommMonoid M\na b : ℕ\nf : ℕ → ℕ → M\n⊢ ∀ (a_1 b_1 : ℕ), (a ≤ a_1 ∧ a_1 < b) ∧ a_1 ≤ b_1 ∧ b_1 < b → (a ≤ b_1 ∧ b_1 < b) ∧ a ≤ a_1 ∧ a_1 < b_1 + 1\n[PROOFSTEP]\nrintro a b ⟨⟨h₁, h₂⟩, ⟨h₃, h₄⟩⟩\n[GOAL]\ncase refine'_2\nα : Type u\nβ : Type v\nγ : Type w\ns₂ s₁ s : Finset α\na✝ : α\ng f✝ : α → β\ninst✝¹ : CommMonoid β\nM : Type u_1\ninst✝ : AddCommMonoid M\na b : ℕ\nf : ℕ → ℕ → M\n⊢ ∀ (a_1 b_1 : ℕ), (a ≤ a_1 ∧ a_1 < b) ∧ a ≤ b_1 ∧ b_1 < a_1 + 1 → (a ≤ b_1 ∧ b_1 < b) ∧ b_1 ≤ a_1 ∧ a_1 < b\n[PROOFSTEP]\nrintro a b ⟨⟨h₁, h₂⟩, ⟨h₃, h₄⟩⟩\n[GOAL]\ncase refine'_1.intro.intro.intro\nα : Type u\nβ : Type v\nγ : Type w\ns₂ s₁ s : Finset α\na✝¹ : α\ng f✝ : α → β\ninst✝¹ : CommMonoid β\nM : Type u_1\ninst✝ : AddCommMonoid M\na✝ b✝ : ℕ\nf : ℕ → ℕ → M\na b : ℕ\nh₁ : a✝ ≤ a\nh₂ : a < b✝\nh₃ : a ≤ b\nh₄ : b < b✝\n⊢ (a✝ ≤ b ∧ b < b✝) ∧ a✝ ≤ a ∧ a < b + 1\n[PROOFSTEP]\nrefine' ⟨⟨_, _⟩, ⟨_, _⟩⟩\n[GOAL]\ncase refine'_2.intro.intro.intro\nα : Type u\nβ : Type v\nγ : Type w\ns₂ s₁ s : Finset α\na✝¹ : α\ng f✝ : α → β\ninst✝¹ : CommMonoid β\nM : Type u_1\ninst✝ : AddCommMonoid M\na✝ b✝ : ℕ\nf : ℕ → ℕ → M\na b : ℕ\nh₁ : a✝ ≤ a\nh₂ : a < b✝\nh₃ : a✝ ≤ b\nh₄ : b < a + 1\n⊢ (a✝ ≤ b ∧ b < b✝) ∧ b ≤ a ∧ a < b✝\n[PROOFSTEP]\nrefine' ⟨⟨_, _⟩, ⟨_, _⟩⟩\n[GOAL]\ncase refine'_1.intro.intro.intro.refine'_1\nα : Type u\nβ : Type v\nγ : Type w\ns₂ s₁ s : Finset α\na✝¹ : α\ng f✝ : α → β\ninst✝¹ : CommMonoid β\nM : Type u_1\ninst✝ : AddCommMonoid M\na✝ b✝ : ℕ\nf : ℕ → ℕ → M\na b : ℕ\nh₁ : a✝ ≤ a\nh₂ : a < b✝\nh₃ : a ≤ b\nh₄ : b < b✝\n⊢ a✝ ≤ b\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase refine'_1.intro.intro.intro.refine'_2\nα : Type u\nβ : Type v\nγ : Type w\ns₂ s₁ s : Finset α\na✝¹ : α\ng f✝ : α → β\ninst✝¹ : CommMonoid β\nM : Type u_1\ninst✝ : AddCommMonoid M\na✝ b✝ : ℕ\nf : ℕ → ℕ → M\na b : ℕ\nh₁ : a✝ ≤ a\nh₂ : a < b✝\nh₃ : a ≤ b\nh₄ : b < b✝\n⊢ b < b✝\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase refine'_1.intro.intro.intro.refine'_3\nα : Type u\nβ : Type v\nγ : Type w\ns₂ s₁ s : Finset α\na✝¹ : α\ng f✝ : α → β\ninst✝¹ : CommMonoid β\nM : Type u_1\ninst✝ : AddCommMonoid M\na✝ b✝ : ℕ\nf : ℕ → ℕ → M\na b : ℕ\nh₁ : a✝ ≤ a\nh₂ : a < b✝\nh₃ : a ≤ b\nh₄ : b < b✝\n⊢ a✝ ≤ a\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase refine'_1.intro.intro.intro.refine'_4\nα : Type u\nβ : Type v\nγ : Type w\ns₂ s₁ s : Finset α\na✝¹ : α\ng f✝ : α → β\ninst✝¹ : CommMonoid β\nM : Type u_1\ninst✝ : AddCommMonoid M\na✝ b✝ : ℕ\nf : ℕ → ℕ → M\na b : ℕ\nh₁ : a✝ ≤ a\nh₂ : a < b✝\nh₃ : a ≤ b\nh₄ : b < b✝\n⊢ a < b + 1\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase refine'_2.intro.intro.intro.refine'_1\nα : Type u\nβ : Type v\nγ : Type w\ns₂ s₁ s : Finset α\na✝¹ : α\ng f✝ : α → β\ninst✝¹ : CommMonoid β\nM : Type u_1\ninst✝ : AddCommMonoid M\na✝ b✝ : ℕ\nf : ℕ → ℕ → M\na b : ℕ\nh₁ : a✝ ≤ a\nh₂ : a < b✝\nh₃ : a✝ ≤ b\nh₄ : b < a + 1\n⊢ a✝ ≤ b\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase refine'_2.intro.intro.intro.refine'_2\nα : Type u\nβ : Type v\nγ : Type w\ns₂ s₁ s : Finset α\na✝¹ : α\ng f✝ : α → β\ninst✝¹ : CommMonoid β\nM : Type u_1\ninst✝ : AddCommMonoid M\na✝ b✝ : ℕ\nf : ℕ → ℕ → M\na b : ℕ\nh₁ : a✝ ≤ a\nh₂ : a < b✝\nh₃ : a✝ ≤ b\nh₄ : b < a + 1\n⊢ b < b✝\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase refine'_2.intro.intro.intro.refine'_3\nα : Type u\nβ : Type v\nγ : Type w\ns₂ s₁ s : Finset α\na✝¹ : α\ng f✝ : α → β\ninst✝¹ : CommMonoid β\nM : Type u_1\ninst✝ : AddCommMonoid M\na✝ b✝ : ℕ\nf : ℕ → ℕ → M\na b : ℕ\nh₁ : a✝ ≤ a\nh₂ : a < b✝\nh₃ : a✝ ≤ b\nh₄ : b < a + 1\n⊢ b ≤ a\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase refine'_2.intro.intro.intro.refine'_4\nα : Type u\nβ : Type v\nγ : Type w\ns₂ s₁ s : Finset α\na✝¹ : α\ng f✝ : α → β\ninst✝¹ : CommMonoid β\nM : Type u_1\ninst✝ : AddCommMonoid M\na✝ b✝ : ℕ\nf : ℕ → ℕ → M\na b : ℕ\nh₁ : a✝ ≤ a\nh₂ : a < b✝\nh₃ : a✝ ≤ b\nh₄ : b < a + 1\n⊢ a < b✝\n[PROOFSTEP]\nlinarith\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns₂ s₁ s : Finset α\na : α\ng f✝ : α → β\ninst✝ : CommMonoid β\nf : ℕ → β\nm n : ℕ\n⊢ ∏ k in Ico m n, f k = ∏ k in range (n - m), f (m + k)\n[PROOFSTEP]\nby_cases h : m ≤ n\n[GOAL]\ncase pos\nα : Type u\nβ : Type v\nγ : Type w\ns₂ s₁ s : Finset α\na : α\ng f✝ : α → β\ninst✝ : CommMonoid β\nf : ℕ → β\nm n : ℕ\nh : m ≤ n\n⊢ ∏ k in Ico m n, f k = ∏ k in range (n - m), f (m + k)\n[PROOFSTEP]\nrw [← Nat.Ico_zero_eq_range, prod_Ico_add, zero_add, tsub_add_cancel_of_le h]\n[GOAL]\ncase neg\nα : Type u\nβ : Type v\nγ : Type w\ns₂ s₁ s : Finset α\na : α\ng f✝ : α → β\ninst✝ : CommMonoid β\nf : ℕ → β\nm n : ℕ\nh : ¬m ≤ n\n⊢ ∏ k in Ico m n, f k = ∏ k in range (n - m), f (m + k)\n[PROOFSTEP]\nreplace h : n ≤ m := le_of_not_ge h\n[GOAL]\ncase neg\nα : Type u\nβ : Type v\nγ : Type w\ns₂ s₁ s : Finset α\na : α\ng f✝ : α → β\ninst✝ : CommMonoid β\nf : ℕ → β\nm n : ℕ\nh : n ≤ m\n⊢ ∏ k in Ico m n, f k = ∏ k in range (n - m), f (m + k)\n[PROOFSTEP]\nrw [Ico_eq_empty_of_le h, tsub_eq_zero_iff_le.mpr h, range_zero, prod_empty, prod_empty]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns₂ s₁ s : Finset α\na : α\ng f✝ : α → β\ninst✝ : CommMonoid β\nf : ℕ → β\nk m n : ℕ\nh : m ≤ n + 1\n⊢ ∏ j in Ico k m, f (n - j) = ∏ j in Ico (n + 1 - m) (n + 1 - k), f j\n[PROOFSTEP]\nhave : ∀ i < m, i ≤ n := by\n  intro i hi\n  exact (add_le_add_iff_right 1).1 (le_trans (Nat.lt_iff_add_one_le.1 hi) h)\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns₂ s₁ s : Finset α\na : α\ng f✝ : α → β\ninst✝ : CommMonoid β\nf : ℕ → β\nk m n : ℕ\nh : m ≤ n + 1\n⊢ ∀ (i : ℕ), i < m → i ≤ n\n[PROOFSTEP]\nintro i hi\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns₂ s₁ s : Finset α\na : α\ng f✝ : α → β\ninst✝ : CommMonoid β\nf : ℕ → β\nk m n : ℕ\nh : m ≤ n + 1\ni : ℕ\nhi : i < m\n⊢ i ≤ n\n[PROOFSTEP]\nexact (add_le_add_iff_right 1).1 (le_trans (Nat.lt_iff_add_one_le.1 hi) h)\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns₂ s₁ s : Finset α\na : α\ng f✝ : α → β\ninst✝ : CommMonoid β\nf : ℕ → β\nk m n : ℕ\nh : m ≤ n + 1\nthis : ∀ (i : ℕ), i < m → i ≤ n\n⊢ ∏ j in Ico k m, f (n - j) = ∏ j in Ico (n + 1 - m) (n + 1 - k), f j\n[PROOFSTEP]\ncases' lt_or_le k m with hkm hkm\n[GOAL]\ncase inl\nα : Type u\nβ : Type v\nγ : Type w\ns₂ s₁ s : Finset α\na : α\ng f✝ : α → β\ninst✝ : CommMonoid β\nf : ℕ → β\nk m n : ℕ\nh : m ≤ n + 1\nthis : ∀ (i : ℕ), i < m → i ≤ n\nhkm : k < m\n⊢ ∏ j in Ico k m, f (n - j) = ∏ j in Ico (n + 1 - m) (n + 1 - k), f j\n[PROOFSTEP]\nrw [← Nat.Ico_image_const_sub_eq_Ico (this _ hkm)]\n[GOAL]\ncase inl\nα : Type u\nβ : Type v\nγ : Type w\ns₂ s₁ s : Finset α\na : α\ng f✝ : α → β\ninst✝ : CommMonoid β\nf : ℕ → β\nk m n : ℕ\nh : m ≤ n + 1\nthis : ∀ (i : ℕ), i < m → i ≤ n\nhkm : k < m\n⊢ ∏ j in Ico k m, f (n - j) = ∏ j in image (fun x => n - x) (Ico k m), f j\n[PROOFSTEP]\nrefine' (prod_image _).symm\n[GOAL]\ncase inl\nα : Type u\nβ : Type v\nγ : Type w\ns₂ s₁ s : Finset α\na : α\ng f✝ : α → β\ninst✝ : CommMonoid β\nf : ℕ → β\nk m n : ℕ\nh : m ≤ n + 1\nthis : ∀ (i : ℕ), i < m → i ≤ n\nhkm : k < m\n⊢ ∀ (x : ℕ), x ∈ Ico k m → ∀ (y : ℕ), y ∈ Ico k m → n - x = n - y → x = y\n[PROOFSTEP]\nsimp only [mem_Ico]\n[GOAL]\ncase inl\nα : Type u\nβ : Type v\nγ : Type w\ns₂ s₁ s : Finset α\na : α\ng f✝ : α → β\ninst✝ : CommMonoid β\nf : ℕ → β\nk m n : ℕ\nh : m ≤ n + 1\nthis : ∀ (i : ℕ), i < m → i ≤ n\nhkm : k < m\n⊢ ∀ (x : ℕ), k ≤ x ∧ x < m → ∀ (y : ℕ), k ≤ y ∧ y < m → n - x = n - y → x = y\n[PROOFSTEP]\nrintro i ⟨_, im⟩ j ⟨_, jm⟩ Hij\n[GOAL]\ncase inl.intro.intro\nα : Type u\nβ : Type v\nγ : Type w\ns₂ s₁ s : Finset α\na : α\ng f✝ : α → β\ninst✝ : CommMonoid β\nf : ℕ → β\nk m n : ℕ\nh : m ≤ n + 1\nthis : ∀ (i : ℕ), i < m → i ≤ n\nhkm : k < m\ni : ℕ\nleft✝¹ : k ≤ i\nim : i < m\nj : ℕ\nleft✝ : k ≤ j\njm : j < m\nHij : n - i = n - j\n⊢ i = j\n[PROOFSTEP]\nrw [← tsub_tsub_cancel_of_le (this _ im), Hij, tsub_tsub_cancel_of_le (this _ jm)]\n[GOAL]\ncase inr\nα : Type u\nβ : Type v\nγ : Type w\ns₂ s₁ s : Finset α\na : α\ng f✝ : α → β\ninst✝ : CommMonoid β\nf : ℕ → β\nk m n : ℕ\nh : m ≤ n + 1\nthis : ∀ (i : ℕ), i < m → i ≤ n\nhkm : m ≤ k\n⊢ ∏ j in Ico k m, f (n - j) = ∏ j in Ico (n + 1 - m) (n + 1 - k), f j\n[PROOFSTEP]\nhave : n + 1 - k ≤ n + 1 - m := by\n  rw [tsub_le_tsub_iff_left h]\n  exact hkm\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns₂ s₁ s : Finset α\na : α\ng f✝ : α → β\ninst✝ : CommMonoid β\nf : ℕ → β\nk m n : ℕ\nh : m ≤ n + 1\nthis : ∀ (i : ℕ), i < m → i ≤ n\nhkm : m ≤ k\n⊢ n + 1 - k ≤ n + 1 - m\n[PROOFSTEP]\nrw [tsub_le_tsub_iff_left h]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns₂ s₁ s : Finset α\na : α\ng f✝ : α → β\ninst✝ : CommMonoid β\nf : ℕ → β\nk m n : ℕ\nh : m ≤ n + 1\nthis : ∀ (i : ℕ), i < m → i ≤ n\nhkm : m ≤ k\n⊢ m ≤ k\n[PROOFSTEP]\nexact hkm\n[GOAL]\ncase inr\nα : Type u\nβ : Type v\nγ : Type w\ns₂ s₁ s : Finset α\na : α\ng f✝ : α → β\ninst✝ : CommMonoid β\nf : ℕ → β\nk m n : ℕ\nh : m ≤ n + 1\nthis✝ : ∀ (i : ℕ), i < m → i ≤ n\nhkm : m ≤ k\nthis : n + 1 - k ≤ n + 1 - m\n⊢ ∏ j in Ico k m, f (n - j) = ∏ j in Ico (n + 1 - m) (n + 1 - k), f j\n[PROOFSTEP]\nsimp only [ge_iff_le, hkm, Ico_eq_empty_of_le, prod_empty, tsub_le_iff_right, Ico_eq_empty_of_le this]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns₂ s₁ s : Finset α\na : α\ng f✝ : α → β\ninst✝ : CommMonoid β\nf : ℕ → β\nn : ℕ\n⊢ ∏ j in range n, f (n - 1 - j) = ∏ j in range n, f j\n[PROOFSTEP]\ncases n\n[GOAL]\ncase zero\nα : Type u\nβ : Type v\nγ : Type w\ns₂ s₁ s : Finset α\na : α\ng f✝ : α → β\ninst✝ : CommMonoid β\nf : ℕ → β\n⊢ ∏ j in range zero, f (zero - 1 - j) = ∏ j in range zero, f j\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\nα : Type u\nβ : Type v\nγ : Type w\ns₂ s₁ s : Finset α\na : α\ng f✝ : α → β\ninst✝ : CommMonoid β\nf : ℕ → β\nn✝ : ℕ\n⊢ ∏ j in range (succ n✝), f (succ n✝ - 1 - j) = ∏ j in range (succ n✝), f j\n[PROOFSTEP]\nsimp only [← Nat.Ico_zero_eq_range, Nat.succ_sub_succ_eq_sub, tsub_zero]\n[GOAL]\ncase succ\nα : Type u\nβ : Type v\nγ : Type w\ns₂ s₁ s : Finset α\na : α\ng f✝ : α → β\ninst✝ : CommMonoid β\nf : ℕ → β\nn✝ : ℕ\n⊢ ∏ x in Ico 0 (succ n✝), f (n✝ - x) = ∏ x in Ico 0 (succ n✝), f x\n[PROOFSTEP]\nrw [prod_Ico_reflect _ _ le_rfl]\n[GOAL]\ncase succ\nα : Type u\nβ : Type v\nγ : Type w\ns₂ s₁ s : Finset α\na : α\ng f✝ : α → β\ninst✝ : CommMonoid β\nf : ℕ → β\nn✝ : ℕ\n⊢ ∏ j in Ico (n✝ + 1 - (n✝ + 1)) (n✝ + 1 - 0), f j = ∏ x in Ico 0 (succ n✝), f x\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns₂ s₁ s : Finset α\na : α\ng f : α → β\ninst✝ : CommMonoid β\nn : ℕ\n⊢ ∏ x in Ico 1 (n + 1 + 1), x = (n + 1)!\n[PROOFSTEP]\nrw [prod_Ico_succ_top <| Nat.succ_le_succ <| Nat.zero_le n, Nat.factorial_succ, prod_Ico_id_eq_factorial n,\n  Nat.succ_eq_add_one, mul_comm]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns₂ s₁ s : Finset α\na : α\ng f : α → β\ninst✝ : CommMonoid β\nn : ℕ\n⊢ ∏ x in range (n + 1), (x + 1) = (n + 1)!\n[PROOFSTEP]\nsimp [Finset.range_succ, prod_range_add_one_eq_factorial n]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns₂ s₁ s : Finset α\na : α\ng f : α → β\ninst✝ : CommMonoid β\nn : ℕ\n⊢ (∑ i in range n, i) * 2 = ∑ i in range n, i + ∑ i in range n, (n - 1 - i)\n[PROOFSTEP]\nrw [sum_range_reflect (fun i => i) n, mul_two]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns₂ s₁ s : Finset α\na : α\ng f : α → β\ninst✝ : CommMonoid β\nn : ℕ\n⊢ ∑ i in range n, (n - 1) = n * (n - 1)\n[PROOFSTEP]\nrw [sum_const, card_range, Nat.nsmul_eq_mul]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns₂ s₁ s : Finset α\na : α\ng f : α → β\ninst✝ : CommMonoid β\nn : ℕ\n⊢ ∑ i in range n, i = n * (n - 1) / 2\n[PROOFSTEP]\nrw [← sum_range_id_mul_two n, Nat.mul_div_cancel _ zero_lt_two]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : Ring R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nf : ℕ → R\ng : ℕ → M\nm n : ℕ\nhmn : m < n\n⊢ ∑ i in Ico m n, f i • g i =\n    f (n - 1) • ∑ i in range n, g i - f m • ∑ i in range m, g i -\n      ∑ i in Ico m (n - 1), (f (i + 1) - f i) • ∑ i in range (i + 1), g i\n[PROOFSTEP]\nhave h₁ : (∑ i in Ico (m + 1) n, f i • G i) = ∑ i in Ico m (n - 1), f (i + 1) • G (i + 1) :=\n  by\n  rw [← Nat.sub_add_cancel (Nat.one_le_of_lt hmn), ← sum_Ico_add']\n  simp only [ge_iff_le, tsub_le_iff_right, add_le_iff_nonpos_left, nonpos_iff_eq_zero, tsub_eq_zero_iff_le,\n    add_tsub_cancel_right]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : Ring R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nf : ℕ → R\ng : ℕ → M\nm n : ℕ\nhmn : m < n\n⊢ ∑ i in Ico (m + 1) n, f i • ∑ i in range i, g i = ∑ i in Ico m (n - 1), f (i + 1) • ∑ i in range (i + 1), g i\n[PROOFSTEP]\nrw [← Nat.sub_add_cancel (Nat.one_le_of_lt hmn), ← sum_Ico_add']\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : Ring R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nf : ℕ → R\ng : ℕ → M\nm n : ℕ\nhmn : m < n\n⊢ ∑ x in Ico m (n - 1), f (x + 1) • ∑ i in range (x + 1), g i =\n    ∑ i in Ico m (n - 1 + 1 - 1), f (i + 1) • ∑ i in range (i + 1), g i\n[PROOFSTEP]\nsimp only [ge_iff_le, tsub_le_iff_right, add_le_iff_nonpos_left, nonpos_iff_eq_zero, tsub_eq_zero_iff_le,\n  add_tsub_cancel_right]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : Ring R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nf : ℕ → R\ng : ℕ → M\nm n : ℕ\nhmn : m < n\nh₁ : ∑ i in Ico (m + 1) n, f i • ∑ i in range i, g i = ∑ i in Ico m (n - 1), f (i + 1) • ∑ i in range (i + 1), g i\n⊢ ∑ i in Ico m n, f i • g i =\n    f (n - 1) • ∑ i in range n, g i - f m • ∑ i in range m, g i -\n      ∑ i in Ico m (n - 1), (f (i + 1) - f i) • ∑ i in range (i + 1), g i\n[PROOFSTEP]\nhave h₂ :\n  (∑ i in Ico (m + 1) n, f i • G (i + 1)) =\n    (∑ i in Ico m (n - 1), f i • G (i + 1)) + f (n - 1) • G n - f m • G (m + 1) :=\n  by\n  rw [← sum_Ico_sub_bot _ hmn, ← sum_Ico_succ_sub_top _ (Nat.le_pred_of_lt hmn), Nat.sub_add_cancel (pos_of_gt hmn),\n    sub_add_cancel]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : Ring R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nf : ℕ → R\ng : ℕ → M\nm n : ℕ\nhmn : m < n\nh₁ : ∑ i in Ico (m + 1) n, f i • ∑ i in range i, g i = ∑ i in Ico m (n - 1), f (i + 1) • ∑ i in range (i + 1), g i\n⊢ ∑ i in Ico (m + 1) n, f i • ∑ i in range (i + 1), g i =\n    ∑ i in Ico m (n - 1), f i • ∑ i in range (i + 1), g i + f (n - 1) • ∑ i in range n, g i -\n      f m • ∑ i in range (m + 1), g i\n[PROOFSTEP]\nrw [← sum_Ico_sub_bot _ hmn, ← sum_Ico_succ_sub_top _ (Nat.le_pred_of_lt hmn), Nat.sub_add_cancel (pos_of_gt hmn),\n  sub_add_cancel]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : Ring R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nf : ℕ → R\ng : ℕ → M\nm n : ℕ\nhmn : m < n\nh₁ : ∑ i in Ico (m + 1) n, f i • ∑ i in range i, g i = ∑ i in Ico m (n - 1), f (i + 1) • ∑ i in range (i + 1), g i\nh₂ :\n  ∑ i in Ico (m + 1) n, f i • ∑ i in range (i + 1), g i =\n    ∑ i in Ico m (n - 1), f i • ∑ i in range (i + 1), g i + f (n - 1) • ∑ i in range n, g i -\n      f m • ∑ i in range (m + 1), g i\n⊢ ∑ i in Ico m n, f i • g i =\n    f (n - 1) • ∑ i in range n, g i - f m • ∑ i in range m, g i -\n      ∑ i in Ico m (n - 1), (f (i + 1) - f i) • ∑ i in range (i + 1), g i\n[PROOFSTEP]\nrw [sum_eq_sum_Ico_succ_bot hmn]\n  -- porting note: the following used to be done with `conv`\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : Ring R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nf : ℕ → R\ng : ℕ → M\nm n : ℕ\nhmn : m < n\nh₁ : ∑ i in Ico (m + 1) n, f i • ∑ i in range i, g i = ∑ i in Ico m (n - 1), f (i + 1) • ∑ i in range (i + 1), g i\nh₂ :\n  ∑ i in Ico (m + 1) n, f i • ∑ i in range (i + 1), g i =\n    ∑ i in Ico m (n - 1), f i • ∑ i in range (i + 1), g i + f (n - 1) • ∑ i in range n, g i -\n      f m • ∑ i in range (m + 1), g i\n⊢ f m • g m + ∑ k in Ico (m + 1) n, f k • g k =\n    f (n - 1) • ∑ i in range n, g i - f m • ∑ i in range m, g i -\n      ∑ i in Ico m (n - 1), (f (i + 1) - f i) • ∑ i in range (i + 1), g i\n[PROOFSTEP]\nhave h₃ :\n  (Finset.sum (Ico (m + 1) n) fun i => f i • g i) =\n    (Finset.sum (Ico (m + 1) n) fun i =>\n      f i • ((Finset.sum (Finset.range (i + 1)) g) - (Finset.sum (Finset.range i) g))) :=\n  by congr; funext; rw [← sum_range_succ_sub_sum g]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : Ring R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nf : ℕ → R\ng : ℕ → M\nm n : ℕ\nhmn : m < n\nh₁ : ∑ i in Ico (m + 1) n, f i • ∑ i in range i, g i = ∑ i in Ico m (n - 1), f (i + 1) • ∑ i in range (i + 1), g i\nh₂ :\n  ∑ i in Ico (m + 1) n, f i • ∑ i in range (i + 1), g i =\n    ∑ i in Ico m (n - 1), f i • ∑ i in range (i + 1), g i + f (n - 1) • ∑ i in range n, g i -\n      f m • ∑ i in range (m + 1), g i\n⊢ ∑ i in Ico (m + 1) n, f i • g i = ∑ i in Ico (m + 1) n, f i • (Finset.sum (range (i + 1)) g - Finset.sum (range i) g)\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_f\nR : Type u_1\nM : Type u_2\ninst✝² : Ring R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nf : ℕ → R\ng : ℕ → M\nm n : ℕ\nhmn : m < n\nh₁ : ∑ i in Ico (m + 1) n, f i • ∑ i in range i, g i = ∑ i in Ico m (n - 1), f (i + 1) • ∑ i in range (i + 1), g i\nh₂ :\n  ∑ i in Ico (m + 1) n, f i • ∑ i in range (i + 1), g i =\n    ∑ i in Ico m (n - 1), f i • ∑ i in range (i + 1), g i + f (n - 1) • ∑ i in range n, g i -\n      f m • ∑ i in range (m + 1), g i\n⊢ (fun i => f i • g i) = fun i => f i • (Finset.sum (range (i + 1)) g - Finset.sum (range i) g)\n[PROOFSTEP]\nfunext\n[GOAL]\ncase e_f.h\nR : Type u_1\nM : Type u_2\ninst✝² : Ring R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nf : ℕ → R\ng : ℕ → M\nm n : ℕ\nhmn : m < n\nh₁ : ∑ i in Ico (m + 1) n, f i • ∑ i in range i, g i = ∑ i in Ico m (n - 1), f (i + 1) • ∑ i in range (i + 1), g i\nh₂ :\n  ∑ i in Ico (m + 1) n, f i • ∑ i in range (i + 1), g i =\n    ∑ i in Ico m (n - 1), f i • ∑ i in range (i + 1), g i + f (n - 1) • ∑ i in range n, g i -\n      f m • ∑ i in range (m + 1), g i\nx✝ : ℕ\n⊢ f x✝ • g x✝ = f x✝ • (Finset.sum (range (x✝ + 1)) g - Finset.sum (range x✝) g)\n[PROOFSTEP]\nrw [← sum_range_succ_sub_sum g]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : Ring R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nf : ℕ → R\ng : ℕ → M\nm n : ℕ\nhmn : m < n\nh₁ : ∑ i in Ico (m + 1) n, f i • ∑ i in range i, g i = ∑ i in Ico m (n - 1), f (i + 1) • ∑ i in range (i + 1), g i\nh₂ :\n  ∑ i in Ico (m + 1) n, f i • ∑ i in range (i + 1), g i =\n    ∑ i in Ico m (n - 1), f i • ∑ i in range (i + 1), g i + f (n - 1) • ∑ i in range n, g i -\n      f m • ∑ i in range (m + 1), g i\nh₃ :\n  ∑ i in Ico (m + 1) n, f i • g i = ∑ i in Ico (m + 1) n, f i • (Finset.sum (range (i + 1)) g - Finset.sum (range i) g)\n⊢ f m • g m + ∑ k in Ico (m + 1) n, f k • g k =\n    f (n - 1) • ∑ i in range n, g i - f m • ∑ i in range m, g i -\n      ∑ i in Ico m (n - 1), (f (i + 1) - f i) • ∑ i in range (i + 1), g i\n[PROOFSTEP]\nrw [h₃]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : Ring R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nf : ℕ → R\ng : ℕ → M\nm n : ℕ\nhmn : m < n\nh₁ : ∑ i in Ico (m + 1) n, f i • ∑ i in range i, g i = ∑ i in Ico m (n - 1), f (i + 1) • ∑ i in range (i + 1), g i\nh₂ :\n  ∑ i in Ico (m + 1) n, f i • ∑ i in range (i + 1), g i =\n    ∑ i in Ico m (n - 1), f i • ∑ i in range (i + 1), g i + f (n - 1) • ∑ i in range n, g i -\n      f m • ∑ i in range (m + 1), g i\nh₃ :\n  ∑ i in Ico (m + 1) n, f i • g i = ∑ i in Ico (m + 1) n, f i • (Finset.sum (range (i + 1)) g - Finset.sum (range i) g)\n⊢ f m • g m + ∑ i in Ico (m + 1) n, f i • (Finset.sum (range (i + 1)) g - Finset.sum (range i) g) =\n    f (n - 1) • ∑ i in range n, g i - f m • ∑ i in range m, g i -\n      ∑ i in Ico m (n - 1), (f (i + 1) - f i) • ∑ i in range (i + 1), g i\n[PROOFSTEP]\nsimp_rw [smul_sub, sum_sub_distrib, h₂, h₁]\n  -- porting note: the following used to be done with `conv`\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : Ring R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nf : ℕ → R\ng : ℕ → M\nm n : ℕ\nhmn : m < n\nh₁ : ∑ i in Ico (m + 1) n, f i • ∑ i in range i, g i = ∑ i in Ico m (n - 1), f (i + 1) • ∑ i in range (i + 1), g i\nh₂ :\n  ∑ i in Ico (m + 1) n, f i • ∑ i in range (i + 1), g i =\n    ∑ i in Ico m (n - 1), f i • ∑ i in range (i + 1), g i + f (n - 1) • ∑ i in range n, g i -\n      f m • ∑ i in range (m + 1), g i\nh₃ :\n  ∑ i in Ico (m + 1) n, f i • g i = ∑ i in Ico (m + 1) n, f i • (Finset.sum (range (i + 1)) g - Finset.sum (range i) g)\n⊢ f m • g m +\n      (∑ i in Ico m (n - 1), f i • ∑ i in range (i + 1), g i + f (n - 1) • ∑ i in range n, g i -\n          f m • ∑ i in range (m + 1), g i -\n        ∑ i in Ico m (n - 1), f (i + 1) • ∑ i in range (i + 1), g i) =\n    f (n - 1) • ∑ i in range n, g i - f m • ∑ i in range m, g i -\n      ∑ i in Ico m (n - 1), (f (i + 1) - f i) • ∑ i in range (i + 1), g i\n[PROOFSTEP]\nhave h₄ :\n  ((((Finset.sum (Ico m (n - 1)) fun i => f i • Finset.sum (range (i + 1)) fun i => g i) +\n          f (n - 1) • Finset.sum (range n) fun i => g i) -\n        f m • Finset.sum (range (m + 1)) fun i => g i) -\n      Finset.sum (Ico m (n - 1)) fun i => f (i + 1) • Finset.sum (range (i + 1)) fun i => g i) =\n    f (n - 1) • (range n).sum g - f m • (range (m + 1)).sum g +\n      Finset.sum (Ico m (n - 1)) (fun i => f i • (range (i + 1)).sum g - f (i + 1) • (range (i + 1)).sum g) :=\n  by rw [← add_sub, add_comm, ← add_sub, ← sum_sub_distrib]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : Ring R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nf : ℕ → R\ng : ℕ → M\nm n : ℕ\nhmn : m < n\nh₁ : ∑ i in Ico (m + 1) n, f i • ∑ i in range i, g i = ∑ i in Ico m (n - 1), f (i + 1) • ∑ i in range (i + 1), g i\nh₂ :\n  ∑ i in Ico (m + 1) n, f i • ∑ i in range (i + 1), g i =\n    ∑ i in Ico m (n - 1), f i • ∑ i in range (i + 1), g i + f (n - 1) • ∑ i in range n, g i -\n      f m • ∑ i in range (m + 1), g i\nh₃ :\n  ∑ i in Ico (m + 1) n, f i • g i = ∑ i in Ico (m + 1) n, f i • (Finset.sum (range (i + 1)) g - Finset.sum (range i) g)\n⊢ ∑ i in Ico m (n - 1), f i • ∑ i in range (i + 1), g i + f (n - 1) • ∑ i in range n, g i -\n        f m • ∑ i in range (m + 1), g i -\n      ∑ i in Ico m (n - 1), f (i + 1) • ∑ i in range (i + 1), g i =\n    f (n - 1) • Finset.sum (range n) g - f m • Finset.sum (range (m + 1)) g +\n      ∑ i in Ico m (n - 1), (f i • Finset.sum (range (i + 1)) g - f (i + 1) • Finset.sum (range (i + 1)) g)\n[PROOFSTEP]\nrw [← add_sub, add_comm, ← add_sub, ← sum_sub_distrib]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : Ring R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nf : ℕ → R\ng : ℕ → M\nm n : ℕ\nhmn : m < n\nh₁ : ∑ i in Ico (m + 1) n, f i • ∑ i in range i, g i = ∑ i in Ico m (n - 1), f (i + 1) • ∑ i in range (i + 1), g i\nh₂ :\n  ∑ i in Ico (m + 1) n, f i • ∑ i in range (i + 1), g i =\n    ∑ i in Ico m (n - 1), f i • ∑ i in range (i + 1), g i + f (n - 1) • ∑ i in range n, g i -\n      f m • ∑ i in range (m + 1), g i\nh₃ :\n  ∑ i in Ico (m + 1) n, f i • g i = ∑ i in Ico (m + 1) n, f i • (Finset.sum (range (i + 1)) g - Finset.sum (range i) g)\nh₄ :\n  ∑ i in Ico m (n - 1), f i • ∑ i in range (i + 1), g i + f (n - 1) • ∑ i in range n, g i -\n        f m • ∑ i in range (m + 1), g i -\n      ∑ i in Ico m (n - 1), f (i + 1) • ∑ i in range (i + 1), g i =\n    f (n - 1) • Finset.sum (range n) g - f m • Finset.sum (range (m + 1)) g +\n      ∑ i in Ico m (n - 1), (f i • Finset.sum (range (i + 1)) g - f (i + 1) • Finset.sum (range (i + 1)) g)\n⊢ f m • g m +\n      (∑ i in Ico m (n - 1), f i • ∑ i in range (i + 1), g i + f (n - 1) • ∑ i in range n, g i -\n          f m • ∑ i in range (m + 1), g i -\n        ∑ i in Ico m (n - 1), f (i + 1) • ∑ i in range (i + 1), g i) =\n    f (n - 1) • ∑ i in range n, g i - f m • ∑ i in range m, g i -\n      ∑ i in Ico m (n - 1), (f (i + 1) - f i) • ∑ i in range (i + 1), g i\n[PROOFSTEP]\nrw [h₄]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : Ring R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nf : ℕ → R\ng : ℕ → M\nm n : ℕ\nhmn : m < n\nh₁ : ∑ i in Ico (m + 1) n, f i • ∑ i in range i, g i = ∑ i in Ico m (n - 1), f (i + 1) • ∑ i in range (i + 1), g i\nh₂ :\n  ∑ i in Ico (m + 1) n, f i • ∑ i in range (i + 1), g i =\n    ∑ i in Ico m (n - 1), f i • ∑ i in range (i + 1), g i + f (n - 1) • ∑ i in range n, g i -\n      f m • ∑ i in range (m + 1), g i\nh₃ :\n  ∑ i in Ico (m + 1) n, f i • g i = ∑ i in Ico (m + 1) n, f i • (Finset.sum (range (i + 1)) g - Finset.sum (range i) g)\nh₄ :\n  ∑ i in Ico m (n - 1), f i • ∑ i in range (i + 1), g i + f (n - 1) • ∑ i in range n, g i -\n        f m • ∑ i in range (m + 1), g i -\n      ∑ i in Ico m (n - 1), f (i + 1) • ∑ i in range (i + 1), g i =\n    f (n - 1) • Finset.sum (range n) g - f m • Finset.sum (range (m + 1)) g +\n      ∑ i in Ico m (n - 1), (f i • Finset.sum (range (i + 1)) g - f (i + 1) • Finset.sum (range (i + 1)) g)\n⊢ f m • g m +\n      (f (n - 1) • Finset.sum (range n) g - f m • Finset.sum (range (m + 1)) g +\n        ∑ i in Ico m (n - 1), (f i • Finset.sum (range (i + 1)) g - f (i + 1) • Finset.sum (range (i + 1)) g)) =\n    f (n - 1) • ∑ i in range n, g i - f m • ∑ i in range m, g i -\n      ∑ i in Ico m (n - 1), (f (i + 1) - f i) • ∑ i in range (i + 1), g i\n[PROOFSTEP]\nhave : ∀ i, f i • G (i + 1) - f (i + 1) • G (i + 1) = -((f (i + 1) - f i) • G (i + 1)) :=\n  by\n  intro i\n  rw [sub_smul]\n  abel\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : Ring R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nf : ℕ → R\ng : ℕ → M\nm n : ℕ\nhmn : m < n\nh₁ : ∑ i in Ico (m + 1) n, f i • ∑ i in range i, g i = ∑ i in Ico m (n - 1), f (i + 1) • ∑ i in range (i + 1), g i\nh₂ :\n  ∑ i in Ico (m + 1) n, f i • ∑ i in range (i + 1), g i =\n    ∑ i in Ico m (n - 1), f i • ∑ i in range (i + 1), g i + f (n - 1) • ∑ i in range n, g i -\n      f m • ∑ i in range (m + 1), g i\nh₃ :\n  ∑ i in Ico (m + 1) n, f i • g i = ∑ i in Ico (m + 1) n, f i • (Finset.sum (range (i + 1)) g - Finset.sum (range i) g)\nh₄ :\n  ∑ i in Ico m (n - 1), f i • ∑ i in range (i + 1), g i + f (n - 1) • ∑ i in range n, g i -\n        f m • ∑ i in range (m + 1), g i -\n      ∑ i in Ico m (n - 1), f (i + 1) • ∑ i in range (i + 1), g i =\n    f (n - 1) • Finset.sum (range n) g - f m • Finset.sum (range (m + 1)) g +\n      ∑ i in Ico m (n - 1), (f i • Finset.sum (range (i + 1)) g - f (i + 1) • Finset.sum (range (i + 1)) g)\n⊢ ∀ (i : ℕ),\n    f i • ∑ i in range (i + 1), g i - f (i + 1) • ∑ i in range (i + 1), g i =\n      -((f (i + 1) - f i) • ∑ i in range (i + 1), g i)\n[PROOFSTEP]\nintro i\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : Ring R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nf : ℕ → R\ng : ℕ → M\nm n : ℕ\nhmn : m < n\nh₁ : ∑ i in Ico (m + 1) n, f i • ∑ i in range i, g i = ∑ i in Ico m (n - 1), f (i + 1) • ∑ i in range (i + 1), g i\nh₂ :\n  ∑ i in Ico (m + 1) n, f i • ∑ i in range (i + 1), g i =\n    ∑ i in Ico m (n - 1), f i • ∑ i in range (i + 1), g i + f (n - 1) • ∑ i in range n, g i -\n      f m • ∑ i in range (m + 1), g i\nh₃ :\n  ∑ i in Ico (m + 1) n, f i • g i = ∑ i in Ico (m + 1) n, f i • (Finset.sum (range (i + 1)) g - Finset.sum (range i) g)\nh₄ :\n  ∑ i in Ico m (n - 1), f i • ∑ i in range (i + 1), g i + f (n - 1) • ∑ i in range n, g i -\n        f m • ∑ i in range (m + 1), g i -\n      ∑ i in Ico m (n - 1), f (i + 1) • ∑ i in range (i + 1), g i =\n    f (n - 1) • Finset.sum (range n) g - f m • Finset.sum (range (m + 1)) g +\n      ∑ i in Ico m (n - 1), (f i • Finset.sum (range (i + 1)) g - f (i + 1) • Finset.sum (range (i + 1)) g)\ni : ℕ\n⊢ f i • ∑ i in range (i + 1), g i - f (i + 1) • ∑ i in range (i + 1), g i =\n    -((f (i + 1) - f i) • ∑ i in range (i + 1), g i)\n[PROOFSTEP]\nrw [sub_smul]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : Ring R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nf : ℕ → R\ng : ℕ → M\nm n : ℕ\nhmn : m < n\nh₁ : ∑ i in Ico (m + 1) n, f i • ∑ i in range i, g i = ∑ i in Ico m (n - 1), f (i + 1) • ∑ i in range (i + 1), g i\nh₂ :\n  ∑ i in Ico (m + 1) n, f i • ∑ i in range (i + 1), g i =\n    ∑ i in Ico m (n - 1), f i • ∑ i in range (i + 1), g i + f (n - 1) • ∑ i in range n, g i -\n      f m • ∑ i in range (m + 1), g i\nh₃ :\n  ∑ i in Ico (m + 1) n, f i • g i = ∑ i in Ico (m + 1) n, f i • (Finset.sum (range (i + 1)) g - Finset.sum (range i) g)\nh₄ :\n  ∑ i in Ico m (n - 1), f i • ∑ i in range (i + 1), g i + f (n - 1) • ∑ i in range n, g i -\n        f m • ∑ i in range (m + 1), g i -\n      ∑ i in Ico m (n - 1), f (i + 1) • ∑ i in range (i + 1), g i =\n    f (n - 1) • Finset.sum (range n) g - f m • Finset.sum (range (m + 1)) g +\n      ∑ i in Ico m (n - 1), (f i • Finset.sum (range (i + 1)) g - f (i + 1) • Finset.sum (range (i + 1)) g)\ni : ℕ\n⊢ f i • ∑ i in range (i + 1), g i - f (i + 1) • ∑ i in range (i + 1), g i =\n    -(f (i + 1) • ∑ i in range (i + 1), g i - f i • ∑ i in range (i + 1), g i)\n[PROOFSTEP]\nabel\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : Ring R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nf : ℕ → R\ng : ℕ → M\nm n : ℕ\nhmn : m < n\nh₁ : ∑ i in Ico (m + 1) n, f i • ∑ i in range i, g i = ∑ i in Ico m (n - 1), f (i + 1) • ∑ i in range (i + 1), g i\nh₂ :\n  ∑ i in Ico (m + 1) n, f i • ∑ i in range (i + 1), g i =\n    ∑ i in Ico m (n - 1), f i • ∑ i in range (i + 1), g i + f (n - 1) • ∑ i in range n, g i -\n      f m • ∑ i in range (m + 1), g i\nh₃ :\n  ∑ i in Ico (m + 1) n, f i • g i = ∑ i in Ico (m + 1) n, f i • (Finset.sum (range (i + 1)) g - Finset.sum (range i) g)\nh₄ :\n  ∑ i in Ico m (n - 1), f i • ∑ i in range (i + 1), g i + f (n - 1) • ∑ i in range n, g i -\n        f m • ∑ i in range (m + 1), g i -\n      ∑ i in Ico m (n - 1), f (i + 1) • ∑ i in range (i + 1), g i =\n    f (n - 1) • Finset.sum (range n) g - f m • Finset.sum (range (m + 1)) g +\n      ∑ i in Ico m (n - 1), (f i • Finset.sum (range (i + 1)) g - f (i + 1) • Finset.sum (range (i + 1)) g)\ni : ℕ\n⊢ f i • ∑ i in range (i + 1), g i - f (i + 1) • ∑ i in range (i + 1), g i =\n    -(f (i + 1) • ∑ i in range (i + 1), g i - f i • ∑ i in range (i + 1), g i)\n[PROOFSTEP]\nabel\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : Ring R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nf : ℕ → R\ng : ℕ → M\nm n : ℕ\nhmn : m < n\nh₁ : ∑ i in Ico (m + 1) n, f i • ∑ i in range i, g i = ∑ i in Ico m (n - 1), f (i + 1) • ∑ i in range (i + 1), g i\nh₂ :\n  ∑ i in Ico (m + 1) n, f i • ∑ i in range (i + 1), g i =\n    ∑ i in Ico m (n - 1), f i • ∑ i in range (i + 1), g i + f (n - 1) • ∑ i in range n, g i -\n      f m • ∑ i in range (m + 1), g i\nh₃ :\n  ∑ i in Ico (m + 1) n, f i • g i = ∑ i in Ico (m + 1) n, f i • (Finset.sum (range (i + 1)) g - Finset.sum (range i) g)\nh₄ :\n  ∑ i in Ico m (n - 1), f i • ∑ i in range (i + 1), g i + f (n - 1) • ∑ i in range n, g i -\n        f m • ∑ i in range (m + 1), g i -\n      ∑ i in Ico m (n - 1), f (i + 1) • ∑ i in range (i + 1), g i =\n    f (n - 1) • Finset.sum (range n) g - f m • Finset.sum (range (m + 1)) g +\n      ∑ i in Ico m (n - 1), (f i • Finset.sum (range (i + 1)) g - f (i + 1) • Finset.sum (range (i + 1)) g)\nthis :\n  ∀ (i : ℕ),\n    f i • ∑ i in range (i + 1), g i - f (i + 1) • ∑ i in range (i + 1), g i =\n      -((f (i + 1) - f i) • ∑ i in range (i + 1), g i)\n⊢ f m • g m +\n      (f (n - 1) • Finset.sum (range n) g - f m • Finset.sum (range (m + 1)) g +\n        ∑ i in Ico m (n - 1), (f i • Finset.sum (range (i + 1)) g - f (i + 1) • Finset.sum (range (i + 1)) g)) =\n    f (n - 1) • ∑ i in range n, g i - f m • ∑ i in range m, g i -\n      ∑ i in Ico m (n - 1), (f (i + 1) - f i) • ∑ i in range (i + 1), g i\n[PROOFSTEP]\nsimp_rw [this, sum_neg_distrib, sum_range_succ, smul_add]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : Ring R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nf : ℕ → R\ng : ℕ → M\nm n : ℕ\nhmn : m < n\nh₁ : ∑ i in Ico (m + 1) n, f i • ∑ i in range i, g i = ∑ i in Ico m (n - 1), f (i + 1) • ∑ i in range (i + 1), g i\nh₂ :\n  ∑ i in Ico (m + 1) n, f i • ∑ i in range (i + 1), g i =\n    ∑ i in Ico m (n - 1), f i • ∑ i in range (i + 1), g i + f (n - 1) • ∑ i in range n, g i -\n      f m • ∑ i in range (m + 1), g i\nh₃ :\n  ∑ i in Ico (m + 1) n, f i • g i = ∑ i in Ico (m + 1) n, f i • (Finset.sum (range (i + 1)) g - Finset.sum (range i) g)\nh₄ :\n  ∑ i in Ico m (n - 1), f i • ∑ i in range (i + 1), g i + f (n - 1) • ∑ i in range n, g i -\n        f m • ∑ i in range (m + 1), g i -\n      ∑ i in Ico m (n - 1), f (i + 1) • ∑ i in range (i + 1), g i =\n    f (n - 1) • Finset.sum (range n) g - f m • Finset.sum (range (m + 1)) g +\n      ∑ i in Ico m (n - 1), (f i • Finset.sum (range (i + 1)) g - f (i + 1) • Finset.sum (range (i + 1)) g)\nthis :\n  ∀ (i : ℕ),\n    f i • ∑ i in range (i + 1), g i - f (i + 1) • ∑ i in range (i + 1), g i =\n      -((f (i + 1) - f i) • ∑ i in range (i + 1), g i)\n⊢ f m • g m +\n      (f (n - 1) • Finset.sum (range n) g - (f m • ∑ x in range m, g x + f m • g m) +\n        -∑ x in Ico m (n - 1), ((f (x + 1) - f x) • ∑ x in range x, g x + (f (x + 1) - f x) • g x)) =\n    f (n - 1) • ∑ x in range n, g x - f m • ∑ x in range m, g x -\n      ∑ x in Ico m (n - 1), ((f (x + 1) - f x) • ∑ x in range x, g x + (f (x + 1) - f x) • g x)\n[PROOFSTEP]\nabel\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : Ring R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nf : ℕ → R\ng : ℕ → M\nm n : ℕ\nhmn : m < n\nh₁ : ∑ i in Ico (m + 1) n, f i • ∑ i in range i, g i = ∑ i in Ico m (n - 1), f (i + 1) • ∑ i in range (i + 1), g i\nh₂ :\n  ∑ i in Ico (m + 1) n, f i • ∑ i in range (i + 1), g i =\n    ∑ i in Ico m (n - 1), f i • ∑ i in range (i + 1), g i + f (n - 1) • ∑ i in range n, g i -\n      f m • ∑ i in range (m + 1), g i\nh₃ :\n  ∑ i in Ico (m + 1) n, f i • g i = ∑ i in Ico (m + 1) n, f i • (Finset.sum (range (i + 1)) g - Finset.sum (range i) g)\nh₄ :\n  ∑ i in Ico m (n - 1), f i • ∑ i in range (i + 1), g i + f (n - 1) • ∑ i in range n, g i -\n        f m • ∑ i in range (m + 1), g i -\n      ∑ i in Ico m (n - 1), f (i + 1) • ∑ i in range (i + 1), g i =\n    f (n - 1) • Finset.sum (range n) g - f m • Finset.sum (range (m + 1)) g +\n      ∑ i in Ico m (n - 1), (f i • Finset.sum (range (i + 1)) g - f (i + 1) • Finset.sum (range (i + 1)) g)\nthis :\n  ∀ (i : ℕ),\n    f i • ∑ i in range (i + 1), g i - f (i + 1) • ∑ i in range (i + 1), g i =\n      -((f (i + 1) - f i) • ∑ i in range (i + 1), g i)\n⊢ f m • g m +\n      (f (n - 1) • Finset.sum (range n) g - (f m • ∑ x in range m, g x + f m • g m) +\n        -∑ x in Ico m (n - 1), ((f (x + 1) - f x) • ∑ x in range x, g x + (f (x + 1) - f x) • g x)) =\n    f (n - 1) • ∑ x in range n, g x - f m • ∑ x in range m, g x -\n      ∑ x in Ico m (n - 1), ((f (x + 1) - f x) • ∑ x in range x, g x + (f (x + 1) - f x) • g x)\n[PROOFSTEP]\nabel\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : Ring R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nf : ℕ → R\ng : ℕ → M\nm n : ℕ\n⊢ ∑ i in range n, f i • g i =\n    f (n - 1) • ∑ i in range n, g i - ∑ i in range (n - 1), (f (i + 1) - f i) • ∑ i in range (i + 1), g i\n[PROOFSTEP]\nby_cases hn : n = 0\n[GOAL]\ncase pos\nR : Type u_1\nM : Type u_2\ninst✝² : Ring R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nf : ℕ → R\ng : ℕ → M\nm n : ℕ\nhn : n = 0\n⊢ ∑ i in range n, f i • g i =\n    f (n - 1) • ∑ i in range n, g i - ∑ i in range (n - 1), (f (i + 1) - f i) • ∑ i in range (i + 1), g i\n[PROOFSTEP]\nsimp [hn]\n[GOAL]\ncase neg\nR : Type u_1\nM : Type u_2\ninst✝² : Ring R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nf : ℕ → R\ng : ℕ → M\nm n : ℕ\nhn : ¬n = 0\n⊢ ∑ i in range n, f i • g i =\n    f (n - 1) • ∑ i in range n, g i - ∑ i in range (n - 1), (f (i + 1) - f i) • ∑ i in range (i + 1), g i\n[PROOFSTEP]\nrw [range_eq_Ico, sum_Ico_by_parts f g (Nat.pos_of_ne_zero hn), sum_range_zero, smul_zero, sub_zero, range_eq_Ico]\n", "meta": {"mathlib_filename": "Mathlib.Algebra.BigOperators.Intervals", "llama_tokens": 24217, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8056321936479701, "lm_q2_score": 0.682573740869499, "lm_q1q2_score": 0.5499033801831955}}
{"text": "[GOAL]\nV : SemiNormedGroupCat\nv : ↑V\n⊢ ‖(fun v => ↑↑V v) v‖ ≤ 1 * ‖v‖\n[PROOFSTEP]\nsimp\n[GOAL]\nV : SemiNormedGroupCat\nW : SemiNormedGroupCat\n⊢ ∀ (P Q R : SemiNormedGroupCat) (f f' : P ⟶ Q) (g : Q ⟶ R), (f + f') ≫ g = f ≫ g + f' ≫ g\n[PROOFSTEP]\nintros _ Q _ f f' g\n[GOAL]\nV : SemiNormedGroupCat\nW : SemiNormedGroupCat\nP✝ Q R✝ : SemiNormedGroupCat\nf f' : P✝ ⟶ Q\ng : Q ⟶ R✝\n⊢ (f + f') ≫ g = f ≫ g + f' ≫ g\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nV : SemiNormedGroupCat\nW : SemiNormedGroupCat\nP✝ Q R✝ : SemiNormedGroupCat\nf f' : P✝ ⟶ Q\ng : Q ⟶ R✝\nx : ↑P✝\n⊢ ↑((f + f') ≫ g) x = ↑(f ≫ g + f' ≫ g) x\n[PROOFSTEP]\nrw [NormedAddGroupHom.add_apply, CategoryTheory.comp_apply, CategoryTheory.comp_apply, CategoryTheory.comp_apply,\n  @NormedAddGroupHom.add_apply _ _ (_) (_)]\n[GOAL]\ncase h\nV : SemiNormedGroupCat\nW : SemiNormedGroupCat\nP✝ Q R✝ : SemiNormedGroupCat\nf f' : P✝ ⟶ Q\ng : Q ⟶ R✝\nx : ↑P✝\n⊢ ↑g (↑f x + ↑f' x) = ↑g (↑f x) + ↑g (↑f' x)\n[PROOFSTEP]\nconvert map_add g (f x) (f' x)\n[GOAL]\nV : SemiNormedGroupCat\nW : SemiNormedGroupCat\n⊢ ∀ (P Q R : SemiNormedGroupCat) (f : P ⟶ Q) (g g' : Q ⟶ R), f ≫ (g + g') = f ≫ g + f ≫ g'\n[PROOFSTEP]\nintros\n[GOAL]\nV : SemiNormedGroupCat\nW : SemiNormedGroupCat\nP✝ Q✝ R✝ : SemiNormedGroupCat\nf✝ : P✝ ⟶ Q✝\ng✝ g'✝ : Q✝ ⟶ R✝\n⊢ f✝ ≫ (g✝ + g'✝) = f✝ ≫ g✝ + f✝ ≫ g'✝\n[PROOFSTEP]\next\n  -- Porting note: failing simps probably due to instance synthesis issues with concrete\n      -- cats; see the gymnastics below for what used to be\n      -- simp only [add_apply, comp_apply. map_add]\n[GOAL]\ncase h\nV : SemiNormedGroupCat\nW : SemiNormedGroupCat\nP✝ Q✝ R✝ : SemiNormedGroupCat\nf✝ : P✝ ⟶ Q✝\ng✝ g'✝ : Q✝ ⟶ R✝\nx✝ : ↑P✝\n⊢ ↑(f✝ ≫ (g✝ + g'✝)) x✝ = ↑(f✝ ≫ g✝ + f✝ ≫ g'✝) x✝\n[PROOFSTEP]\nrw [NormedAddGroupHom.add_apply, CategoryTheory.comp_apply, CategoryTheory.comp_apply, CategoryTheory.comp_apply,\n  @NormedAddGroupHom.add_apply _ _ (_) (_)]\n", "meta": {"mathlib_filename": "Mathlib.Analysis.Normed.Group.SemiNormedGroupCat.Completion", "llama_tokens": 1051, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7520125848754471, "lm_q2_score": 0.7310585786300049, "lm_q1q2_score": 0.5497652514109203}}
{"text": "[GOAL]\nV : Type u_1\ninst✝² : TopologicalSpace V\ninst✝¹ : AddCommGroup V\ninst✝ : Module ℝ V\nK L : ConvexBody V\nh : K.carrier = L.carrier\n⊢ K = L\n[PROOFSTEP]\ncases K\n[GOAL]\ncase mk\nV : Type u_1\ninst✝² : TopologicalSpace V\ninst✝¹ : AddCommGroup V\ninst✝ : Module ℝ V\nL : ConvexBody V\ncarrier✝ : Set V\nconvex'✝ : Convex ℝ carrier✝\nisCompact'✝ : IsCompact carrier✝\nnonempty'✝ : Set.Nonempty carrier✝\nh : { carrier := carrier✝, convex' := convex'✝, isCompact' := isCompact'✝, nonempty' := nonempty'✝ }.carrier = L.carrier\n⊢ { carrier := carrier✝, convex' := convex'✝, isCompact' := isCompact'✝, nonempty' := nonempty'✝ } = L\n[PROOFSTEP]\ncases L\n[GOAL]\ncase mk.mk\nV : Type u_1\ninst✝² : TopologicalSpace V\ninst✝¹ : AddCommGroup V\ninst✝ : Module ℝ V\ncarrier✝¹ : Set V\nconvex'✝¹ : Convex ℝ carrier✝¹\nisCompact'✝¹ : IsCompact carrier✝¹\nnonempty'✝¹ : Set.Nonempty carrier✝¹\ncarrier✝ : Set V\nconvex'✝ : Convex ℝ carrier✝\nisCompact'✝ : IsCompact carrier✝\nnonempty'✝ : Set.Nonempty carrier✝\nh :\n  { carrier := carrier✝¹, convex' := convex'✝¹, isCompact' := isCompact'✝¹, nonempty' := nonempty'✝¹ }.carrier =\n    { carrier := carrier✝, convex' := convex'✝, isCompact' := isCompact'✝, nonempty' := nonempty'✝ }.carrier\n⊢ { carrier := carrier✝¹, convex' := convex'✝¹, isCompact' := isCompact'✝¹, nonempty' := nonempty'✝¹ } =\n    { carrier := carrier✝, convex' := convex'✝, isCompact' := isCompact'✝, nonempty' := nonempty'✝ }\n[PROOFSTEP]\ncongr\n[GOAL]\nV : Type u_1\ninst✝¹ : SeminormedAddCommGroup V\ninst✝ : NormedSpace ℝ V\nK✝ L✝ K L : ConvexBody V\n⊢ EMetric.hausdorffEdist ↑K ↑L ≠ ⊤\n[PROOFSTEP]\napply_rules [Metric.hausdorffEdist_ne_top_of_nonempty_of_bounded, ConvexBody.nonempty, ConvexBody.bounded]\n[GOAL]\nV : Type u_1\ninst✝¹ : SeminormedAddCommGroup V\ninst✝ : NormedSpace ℝ V\nK L x✝¹ x✝ : ConvexBody V\n⊢ (fun x y => ↑{ val := Metric.hausdorffDist ↑x ↑y, property := (_ : 0 ≤ Metric.hausdorffDist ↑x ↑y) }) x✝¹ x✝ =\n    ENNReal.ofReal (dist x✝¹ x✝)\n[PROOFSTEP]\nexact ENNReal.coe_nnreal_eq _\n[GOAL]\nV : Type u_1\ninst✝¹ : SeminormedAddCommGroup V\ninst✝ : NormedSpace ℝ V\nK L : ConvexBody V\n⊢ EMetric.hausdorffEdist ↑K ↑L = edist K L\n[PROOFSTEP]\nrw [edist_dist]\n[GOAL]\nV : Type u_1\ninst✝¹ : SeminormedAddCommGroup V\ninst✝ : NormedSpace ℝ V\nK L : ConvexBody V\n⊢ EMetric.hausdorffEdist ↑K ↑L = ENNReal.ofReal (dist K L)\n[PROOFSTEP]\nexact (ENNReal.ofReal_toReal hausdorffEdist_ne_top).symm\n", "meta": {"mathlib_filename": "Mathlib.Analysis.Convex.Body", "llama_tokens": 1162, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.785308580887758, "lm_q2_score": 0.6992544085240401, "lm_q1q2_score": 0.5491304872375226}}
{"text": "[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf f' : ℝ → ℝ\na b : ℝ\nhf : ContinuousOn f (Icc a b)\nhf' : ∀ (x : ℝ), x ∈ Ico a b → ∀ (r : ℝ), f' x < r → ∃ᶠ (z : ℝ) in 𝓝[Ioi x] x, slope f x z < r\nB B' : ℝ → ℝ\nha : f a ≤ B a\nhB : ContinuousOn B (Icc a b)\nhB' : ∀ (x : ℝ), x ∈ Ico a b → HasDerivWithinAt B (B' x) (Ici x) x\nbound : ∀ (x : ℝ), x ∈ Ico a b → f x = B x → f' x < B' x\n⊢ ∀ ⦃x : ℝ⦄, x ∈ Icc a b → f x ≤ B x\n[PROOFSTEP]\nchange Icc a b ⊆ {x | f x ≤ B x}\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf f' : ℝ → ℝ\na b : ℝ\nhf : ContinuousOn f (Icc a b)\nhf' : ∀ (x : ℝ), x ∈ Ico a b → ∀ (r : ℝ), f' x < r → ∃ᶠ (z : ℝ) in 𝓝[Ioi x] x, slope f x z < r\nB B' : ℝ → ℝ\nha : f a ≤ B a\nhB : ContinuousOn B (Icc a b)\nhB' : ∀ (x : ℝ), x ∈ Ico a b → HasDerivWithinAt B (B' x) (Ici x) x\nbound : ∀ (x : ℝ), x ∈ Ico a b → f x = B x → f' x < B' x\n⊢ Icc a b ⊆ {x | f x ≤ B x}\n[PROOFSTEP]\nset s := {x | f x ≤ B x} ∩ Icc a b\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf f' : ℝ → ℝ\na b : ℝ\nhf : ContinuousOn f (Icc a b)\nhf' : ∀ (x : ℝ), x ∈ Ico a b → ∀ (r : ℝ), f' x < r → ∃ᶠ (z : ℝ) in 𝓝[Ioi x] x, slope f x z < r\nB B' : ℝ → ℝ\nha : f a ≤ B a\nhB : ContinuousOn B (Icc a b)\nhB' : ∀ (x : ℝ), x ∈ Ico a b → HasDerivWithinAt B (B' x) (Ici x) x\nbound : ∀ (x : ℝ), x ∈ Ico a b → f x = B x → f' x < B' x\ns : Set ℝ := {x | f x ≤ B x} ∩ Icc a b\n⊢ Icc a b ⊆ {x | f x ≤ B x}\n[PROOFSTEP]\nhave A : ContinuousOn (fun x => (f x, B x)) (Icc a b) := hf.prod hB\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf f' : ℝ → ℝ\na b : ℝ\nhf : ContinuousOn f (Icc a b)\nhf' : ∀ (x : ℝ), x ∈ Ico a b → ∀ (r : ℝ), f' x < r → ∃ᶠ (z : ℝ) in 𝓝[Ioi x] x, slope f x z < r\nB B' : ℝ → ℝ\nha : f a ≤ B a\nhB : ContinuousOn B (Icc a b)\nhB' : ∀ (x : ℝ), x ∈ Ico a b → HasDerivWithinAt B (B' x) (Ici x) x\nbound : ∀ (x : ℝ), x ∈ Ico a b → f x = B x → f' x < B' x\ns : Set ℝ := {x | f x ≤ B x} ∩ Icc a b\nA : ContinuousOn (fun x => (f x, B x)) (Icc a b)\n⊢ Icc a b ⊆ {x | f x ≤ B x}\n[PROOFSTEP]\nhave : IsClosed s := by\n  simp only [inter_comm]\n  exact A.preimage_closed_of_closed isClosed_Icc OrderClosedTopology.isClosed_le'\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf f' : ℝ → ℝ\na b : ℝ\nhf : ContinuousOn f (Icc a b)\nhf' : ∀ (x : ℝ), x ∈ Ico a b → ∀ (r : ℝ), f' x < r → ∃ᶠ (z : ℝ) in 𝓝[Ioi x] x, slope f x z < r\nB B' : ℝ → ℝ\nha : f a ≤ B a\nhB : ContinuousOn B (Icc a b)\nhB' : ∀ (x : ℝ), x ∈ Ico a b → HasDerivWithinAt B (B' x) (Ici x) x\nbound : ∀ (x : ℝ), x ∈ Ico a b → f x = B x → f' x < B' x\ns : Set ℝ := {x | f x ≤ B x} ∩ Icc a b\nA : ContinuousOn (fun x => (f x, B x)) (Icc a b)\n⊢ IsClosed s\n[PROOFSTEP]\nsimp only [inter_comm]\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf f' : ℝ → ℝ\na b : ℝ\nhf : ContinuousOn f (Icc a b)\nhf' : ∀ (x : ℝ), x ∈ Ico a b → ∀ (r : ℝ), f' x < r → ∃ᶠ (z : ℝ) in 𝓝[Ioi x] x, slope f x z < r\nB B' : ℝ → ℝ\nha : f a ≤ B a\nhB : ContinuousOn B (Icc a b)\nhB' : ∀ (x : ℝ), x ∈ Ico a b → HasDerivWithinAt B (B' x) (Ici x) x\nbound : ∀ (x : ℝ), x ∈ Ico a b → f x = B x → f' x < B' x\ns : Set ℝ := {x | f x ≤ B x} ∩ Icc a b\nA : ContinuousOn (fun x => (f x, B x)) (Icc a b)\n⊢ IsClosed (Icc a b ∩ {x | f x ≤ B x})\n[PROOFSTEP]\nexact A.preimage_closed_of_closed isClosed_Icc OrderClosedTopology.isClosed_le'\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf f' : ℝ → ℝ\na b : ℝ\nhf : ContinuousOn f (Icc a b)\nhf' : ∀ (x : ℝ), x ∈ Ico a b → ∀ (r : ℝ), f' x < r → ∃ᶠ (z : ℝ) in 𝓝[Ioi x] x, slope f x z < r\nB B' : ℝ → ℝ\nha : f a ≤ B a\nhB : ContinuousOn B (Icc a b)\nhB' : ∀ (x : ℝ), x ∈ Ico a b → HasDerivWithinAt B (B' x) (Ici x) x\nbound : ∀ (x : ℝ), x ∈ Ico a b → f x = B x → f' x < B' x\ns : Set ℝ := {x | f x ≤ B x} ∩ Icc a b\nA : ContinuousOn (fun x => (f x, B x)) (Icc a b)\nthis : IsClosed s\n⊢ Icc a b ⊆ {x | f x ≤ B x}\n[PROOFSTEP]\napply this.Icc_subset_of_forall_exists_gt ha\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf f' : ℝ → ℝ\na b : ℝ\nhf : ContinuousOn f (Icc a b)\nhf' : ∀ (x : ℝ), x ∈ Ico a b → ∀ (r : ℝ), f' x < r → ∃ᶠ (z : ℝ) in 𝓝[Ioi x] x, slope f x z < r\nB B' : ℝ → ℝ\nha : f a ≤ B a\nhB : ContinuousOn B (Icc a b)\nhB' : ∀ (x : ℝ), x ∈ Ico a b → HasDerivWithinAt B (B' x) (Ici x) x\nbound : ∀ (x : ℝ), x ∈ Ico a b → f x = B x → f' x < B' x\ns : Set ℝ := {x | f x ≤ B x} ∩ Icc a b\nA : ContinuousOn (fun x => (f x, B x)) (Icc a b)\nthis : IsClosed s\n⊢ ∀ (x : ℝ), x ∈ {x | f x ≤ B x} ∩ Ico a b → ∀ (y : ℝ), y ∈ Ioi x → Set.Nonempty ({x | f x ≤ B x} ∩ Ioc x y)\n[PROOFSTEP]\nrintro x ⟨hxB : f x ≤ B x, xab⟩ y hy\n[GOAL]\ncase intro\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf f' : ℝ → ℝ\na b : ℝ\nhf : ContinuousOn f (Icc a b)\nhf' : ∀ (x : ℝ), x ∈ Ico a b → ∀ (r : ℝ), f' x < r → ∃ᶠ (z : ℝ) in 𝓝[Ioi x] x, slope f x z < r\nB B' : ℝ → ℝ\nha : f a ≤ B a\nhB : ContinuousOn B (Icc a b)\nhB' : ∀ (x : ℝ), x ∈ Ico a b → HasDerivWithinAt B (B' x) (Ici x) x\nbound : ∀ (x : ℝ), x ∈ Ico a b → f x = B x → f' x < B' x\ns : Set ℝ := {x | f x ≤ B x} ∩ Icc a b\nA : ContinuousOn (fun x => (f x, B x)) (Icc a b)\nthis : IsClosed s\nx : ℝ\nhxB : f x ≤ B x\nxab : x ∈ Ico a b\ny : ℝ\nhy : y ∈ Ioi x\n⊢ Set.Nonempty ({x | f x ≤ B x} ∩ Ioc x y)\n[PROOFSTEP]\ncases' hxB.lt_or_eq with hxB hxB\n[GOAL]\ncase intro.inl\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf f' : ℝ → ℝ\na b : ℝ\nhf : ContinuousOn f (Icc a b)\nhf' : ∀ (x : ℝ), x ∈ Ico a b → ∀ (r : ℝ), f' x < r → ∃ᶠ (z : ℝ) in 𝓝[Ioi x] x, slope f x z < r\nB B' : ℝ → ℝ\nha : f a ≤ B a\nhB : ContinuousOn B (Icc a b)\nhB' : ∀ (x : ℝ), x ∈ Ico a b → HasDerivWithinAt B (B' x) (Ici x) x\nbound : ∀ (x : ℝ), x ∈ Ico a b → f x = B x → f' x < B' x\ns : Set ℝ := {x | f x ≤ B x} ∩ Icc a b\nA : ContinuousOn (fun x => (f x, B x)) (Icc a b)\nthis : IsClosed s\nx : ℝ\nhxB✝ : f x ≤ B x\nxab : x ∈ Ico a b\ny : ℝ\nhy : y ∈ Ioi x\nhxB : f x < B x\n⊢ Set.Nonempty ({x | f x ≤ B x} ∩ Ioc x y)\n[PROOFSTEP]\nrefine' nonempty_of_mem (inter_mem _ (Ioc_mem_nhdsWithin_Ioi ⟨le_rfl, hy⟩))\n[GOAL]\ncase intro.inl\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf f' : ℝ → ℝ\na b : ℝ\nhf : ContinuousOn f (Icc a b)\nhf' : ∀ (x : ℝ), x ∈ Ico a b → ∀ (r : ℝ), f' x < r → ∃ᶠ (z : ℝ) in 𝓝[Ioi x] x, slope f x z < r\nB B' : ℝ → ℝ\nha : f a ≤ B a\nhB : ContinuousOn B (Icc a b)\nhB' : ∀ (x : ℝ), x ∈ Ico a b → HasDerivWithinAt B (B' x) (Ici x) x\nbound : ∀ (x : ℝ), x ∈ Ico a b → f x = B x → f' x < B' x\ns : Set ℝ := {x | f x ≤ B x} ∩ Icc a b\nA : ContinuousOn (fun x => (f x, B x)) (Icc a b)\nthis : IsClosed s\nx : ℝ\nhxB✝ : f x ≤ B x\nxab : x ∈ Ico a b\ny : ℝ\nhy : y ∈ Ioi x\nhxB : f x < B x\n⊢ {x | f x ≤ B x} ∈ 𝓝[Ioi x] x\n[PROOFSTEP]\nhave : ∀ᶠ x in 𝓝[Icc a b] x, f x < B x :=\n  A x (Ico_subset_Icc_self xab) (IsOpen.mem_nhds (isOpen_lt continuous_fst continuous_snd) hxB)\n[GOAL]\ncase intro.inl\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf f' : ℝ → ℝ\na b : ℝ\nhf : ContinuousOn f (Icc a b)\nhf' : ∀ (x : ℝ), x ∈ Ico a b → ∀ (r : ℝ), f' x < r → ∃ᶠ (z : ℝ) in 𝓝[Ioi x] x, slope f x z < r\nB B' : ℝ → ℝ\nha : f a ≤ B a\nhB : ContinuousOn B (Icc a b)\nhB' : ∀ (x : ℝ), x ∈ Ico a b → HasDerivWithinAt B (B' x) (Ici x) x\nbound : ∀ (x : ℝ), x ∈ Ico a b → f x = B x → f' x < B' x\ns : Set ℝ := {x | f x ≤ B x} ∩ Icc a b\nA : ContinuousOn (fun x => (f x, B x)) (Icc a b)\nthis✝ : IsClosed s\nx : ℝ\nhxB✝ : f x ≤ B x\nxab : x ∈ Ico a b\ny : ℝ\nhy : y ∈ Ioi x\nhxB : f x < B x\nthis : ∀ᶠ (x : ℝ) in 𝓝[Icc a b] x, f x < B x\n⊢ {x | f x ≤ B x} ∈ 𝓝[Ioi x] x\n[PROOFSTEP]\nhave : ∀ᶠ x in 𝓝[>] x, f x < B x := nhdsWithin_le_of_mem (Icc_mem_nhdsWithin_Ioi xab) this\n[GOAL]\ncase intro.inl\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf f' : ℝ → ℝ\na b : ℝ\nhf : ContinuousOn f (Icc a b)\nhf' : ∀ (x : ℝ), x ∈ Ico a b → ∀ (r : ℝ), f' x < r → ∃ᶠ (z : ℝ) in 𝓝[Ioi x] x, slope f x z < r\nB B' : ℝ → ℝ\nha : f a ≤ B a\nhB : ContinuousOn B (Icc a b)\nhB' : ∀ (x : ℝ), x ∈ Ico a b → HasDerivWithinAt B (B' x) (Ici x) x\nbound : ∀ (x : ℝ), x ∈ Ico a b → f x = B x → f' x < B' x\ns : Set ℝ := {x | f x ≤ B x} ∩ Icc a b\nA : ContinuousOn (fun x => (f x, B x)) (Icc a b)\nthis✝¹ : IsClosed s\nx : ℝ\nhxB✝ : f x ≤ B x\nxab : x ∈ Ico a b\ny : ℝ\nhy : y ∈ Ioi x\nhxB : f x < B x\nthis✝ : ∀ᶠ (x : ℝ) in 𝓝[Icc a b] x, f x < B x\nthis : ∀ᶠ (x : ℝ) in 𝓝[Ioi x] x, f x < B x\n⊢ {x | f x ≤ B x} ∈ 𝓝[Ioi x] x\n[PROOFSTEP]\nexact this.mono fun y => le_of_lt\n[GOAL]\ncase intro.inr\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf f' : ℝ → ℝ\na b : ℝ\nhf : ContinuousOn f (Icc a b)\nhf' : ∀ (x : ℝ), x ∈ Ico a b → ∀ (r : ℝ), f' x < r → ∃ᶠ (z : ℝ) in 𝓝[Ioi x] x, slope f x z < r\nB B' : ℝ → ℝ\nha : f a ≤ B a\nhB : ContinuousOn B (Icc a b)\nhB' : ∀ (x : ℝ), x ∈ Ico a b → HasDerivWithinAt B (B' x) (Ici x) x\nbound : ∀ (x : ℝ), x ∈ Ico a b → f x = B x → f' x < B' x\ns : Set ℝ := {x | f x ≤ B x} ∩ Icc a b\nA : ContinuousOn (fun x => (f x, B x)) (Icc a b)\nthis : IsClosed s\nx : ℝ\nhxB✝ : f x ≤ B x\nxab : x ∈ Ico a b\ny : ℝ\nhy : y ∈ Ioi x\nhxB : f x = B x\n⊢ Set.Nonempty ({x | f x ≤ B x} ∩ Ioc x y)\n[PROOFSTEP]\nrcases exists_between (bound x xab hxB) with ⟨r, hfr, hrB⟩\n[GOAL]\ncase intro.inr.intro.intro\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf f' : ℝ → ℝ\na b : ℝ\nhf : ContinuousOn f (Icc a b)\nhf' : ∀ (x : ℝ), x ∈ Ico a b → ∀ (r : ℝ), f' x < r → ∃ᶠ (z : ℝ) in 𝓝[Ioi x] x, slope f x z < r\nB B' : ℝ → ℝ\nha : f a ≤ B a\nhB : ContinuousOn B (Icc a b)\nhB' : ∀ (x : ℝ), x ∈ Ico a b → HasDerivWithinAt B (B' x) (Ici x) x\nbound : ∀ (x : ℝ), x ∈ Ico a b → f x = B x → f' x < B' x\ns : Set ℝ := {x | f x ≤ B x} ∩ Icc a b\nA : ContinuousOn (fun x => (f x, B x)) (Icc a b)\nthis : IsClosed s\nx : ℝ\nhxB✝ : f x ≤ B x\nxab : x ∈ Ico a b\ny : ℝ\nhy : y ∈ Ioi x\nhxB : f x = B x\nr : ℝ\nhfr : f' x < r\nhrB : r < B' x\n⊢ Set.Nonempty ({x | f x ≤ B x} ∩ Ioc x y)\n[PROOFSTEP]\nspecialize hf' x xab r hfr\n[GOAL]\ncase intro.inr.intro.intro\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf f' : ℝ → ℝ\na b : ℝ\nhf : ContinuousOn f (Icc a b)\nB B' : ℝ → ℝ\nha : f a ≤ B a\nhB : ContinuousOn B (Icc a b)\nhB' : ∀ (x : ℝ), x ∈ Ico a b → HasDerivWithinAt B (B' x) (Ici x) x\nbound : ∀ (x : ℝ), x ∈ Ico a b → f x = B x → f' x < B' x\ns : Set ℝ := {x | f x ≤ B x} ∩ Icc a b\nA : ContinuousOn (fun x => (f x, B x)) (Icc a b)\nthis : IsClosed s\nx : ℝ\nhxB✝ : f x ≤ B x\nxab : x ∈ Ico a b\ny : ℝ\nhy : y ∈ Ioi x\nhxB : f x = B x\nr : ℝ\nhfr : f' x < r\nhrB : r < B' x\nhf' : ∃ᶠ (z : ℝ) in 𝓝[Ioi x] x, slope f x z < r\n⊢ Set.Nonempty ({x | f x ≤ B x} ∩ Ioc x y)\n[PROOFSTEP]\nhave HB : ∀ᶠ z in 𝓝[>] x, r < slope B x z :=\n  (hasDerivWithinAt_iff_tendsto_slope' <| lt_irrefl x).1 (hB' x xab).Ioi_of_Ici (Ioi_mem_nhds hrB)\n[GOAL]\ncase intro.inr.intro.intro\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf f' : ℝ → ℝ\na b : ℝ\nhf : ContinuousOn f (Icc a b)\nB B' : ℝ → ℝ\nha : f a ≤ B a\nhB : ContinuousOn B (Icc a b)\nhB' : ∀ (x : ℝ), x ∈ Ico a b → HasDerivWithinAt B (B' x) (Ici x) x\nbound : ∀ (x : ℝ), x ∈ Ico a b → f x = B x → f' x < B' x\ns : Set ℝ := {x | f x ≤ B x} ∩ Icc a b\nA : ContinuousOn (fun x => (f x, B x)) (Icc a b)\nthis : IsClosed s\nx : ℝ\nhxB✝ : f x ≤ B x\nxab : x ∈ Ico a b\ny : ℝ\nhy : y ∈ Ioi x\nhxB : f x = B x\nr : ℝ\nhfr : f' x < r\nhrB : r < B' x\nhf' : ∃ᶠ (z : ℝ) in 𝓝[Ioi x] x, slope f x z < r\nHB : ∀ᶠ (z : ℝ) in 𝓝[Ioi x] x, r < slope B x z\n⊢ Set.Nonempty ({x | f x ≤ B x} ∩ Ioc x y)\n[PROOFSTEP]\nobtain ⟨z, hfz, hzB, hz⟩ : ∃ z, slope f x z < r ∧ r < slope B x z ∧ z ∈ Ioc x y\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf f' : ℝ → ℝ\na b : ℝ\nhf : ContinuousOn f (Icc a b)\nB B' : ℝ → ℝ\nha : f a ≤ B a\nhB : ContinuousOn B (Icc a b)\nhB' : ∀ (x : ℝ), x ∈ Ico a b → HasDerivWithinAt B (B' x) (Ici x) x\nbound : ∀ (x : ℝ), x ∈ Ico a b → f x = B x → f' x < B' x\ns : Set ℝ := {x | f x ≤ B x} ∩ Icc a b\nA : ContinuousOn (fun x => (f x, B x)) (Icc a b)\nthis : IsClosed s\nx : ℝ\nhxB✝ : f x ≤ B x\nxab : x ∈ Ico a b\ny : ℝ\nhy : y ∈ Ioi x\nhxB : f x = B x\nr : ℝ\nhfr : f' x < r\nhrB : r < B' x\nhf' : ∃ᶠ (z : ℝ) in 𝓝[Ioi x] x, slope f x z < r\nHB : ∀ᶠ (z : ℝ) in 𝓝[Ioi x] x, r < slope B x z\n⊢ ∃ z, slope f x z < r ∧ r < slope B x z ∧ z ∈ Ioc x y\ncase intro.inr.intro.intro.intro.intro.intro\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf f' : ℝ → ℝ\na b : ℝ\nhf : ContinuousOn f (Icc a b)\nB B' : ℝ → ℝ\nha : f a ≤ B a\nhB : ContinuousOn B (Icc a b)\nhB' : ∀ (x : ℝ), x ∈ Ico a b → HasDerivWithinAt B (B' x) (Ici x) x\nbound : ∀ (x : ℝ), x ∈ Ico a b → f x = B x → f' x < B' x\ns : Set ℝ := {x | f x ≤ B x} ∩ Icc a b\nA : ContinuousOn (fun x => (f x, B x)) (Icc a b)\nthis : IsClosed s\nx : ℝ\nhxB✝ : f x ≤ B x\nxab : x ∈ Ico a b\ny : ℝ\nhy : y ∈ Ioi x\nhxB : f x = B x\nr : ℝ\nhfr : f' x < r\nhrB : r < B' x\nhf' : ∃ᶠ (z : ℝ) in 𝓝[Ioi x] x, slope f x z < r\nHB : ∀ᶠ (z : ℝ) in 𝓝[Ioi x] x, r < slope B x z\nz : ℝ\nhfz : slope f x z < r\nhzB : r < slope B x z\nhz : z ∈ Ioc x y\n⊢ Set.Nonempty ({x | f x ≤ B x} ∩ Ioc x y)\n[PROOFSTEP]\nexact (hf'.and_eventually (HB.and (Ioc_mem_nhdsWithin_Ioi ⟨le_rfl, hy⟩))).exists\n[GOAL]\ncase intro.inr.intro.intro.intro.intro.intro\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf f' : ℝ → ℝ\na b : ℝ\nhf : ContinuousOn f (Icc a b)\nB B' : ℝ → ℝ\nha : f a ≤ B a\nhB : ContinuousOn B (Icc a b)\nhB' : ∀ (x : ℝ), x ∈ Ico a b → HasDerivWithinAt B (B' x) (Ici x) x\nbound : ∀ (x : ℝ), x ∈ Ico a b → f x = B x → f' x < B' x\ns : Set ℝ := {x | f x ≤ B x} ∩ Icc a b\nA : ContinuousOn (fun x => (f x, B x)) (Icc a b)\nthis : IsClosed s\nx : ℝ\nhxB✝ : f x ≤ B x\nxab : x ∈ Ico a b\ny : ℝ\nhy : y ∈ Ioi x\nhxB : f x = B x\nr : ℝ\nhfr : f' x < r\nhrB : r < B' x\nhf' : ∃ᶠ (z : ℝ) in 𝓝[Ioi x] x, slope f x z < r\nHB : ∀ᶠ (z : ℝ) in 𝓝[Ioi x] x, r < slope B x z\nz : ℝ\nhfz : slope f x z < r\nhzB : r < slope B x z\nhz : z ∈ Ioc x y\n⊢ Set.Nonempty ({x | f x ≤ B x} ∩ Ioc x y)\n[PROOFSTEP]\nrefine' ⟨z, _, hz⟩\n[GOAL]\ncase intro.inr.intro.intro.intro.intro.intro\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf f' : ℝ → ℝ\na b : ℝ\nhf : ContinuousOn f (Icc a b)\nB B' : ℝ → ℝ\nha : f a ≤ B a\nhB : ContinuousOn B (Icc a b)\nhB' : ∀ (x : ℝ), x ∈ Ico a b → HasDerivWithinAt B (B' x) (Ici x) x\nbound : ∀ (x : ℝ), x ∈ Ico a b → f x = B x → f' x < B' x\ns : Set ℝ := {x | f x ≤ B x} ∩ Icc a b\nA : ContinuousOn (fun x => (f x, B x)) (Icc a b)\nthis : IsClosed s\nx : ℝ\nhxB✝ : f x ≤ B x\nxab : x ∈ Ico a b\ny : ℝ\nhy : y ∈ Ioi x\nhxB : f x = B x\nr : ℝ\nhfr : f' x < r\nhrB : r < B' x\nhf' : ∃ᶠ (z : ℝ) in 𝓝[Ioi x] x, slope f x z < r\nHB : ∀ᶠ (z : ℝ) in 𝓝[Ioi x] x, r < slope B x z\nz : ℝ\nhfz : slope f x z < r\nhzB : r < slope B x z\nhz : z ∈ Ioc x y\n⊢ z ∈ {x | f x ≤ B x}\n[PROOFSTEP]\nhave := (hfz.trans hzB).le\n[GOAL]\ncase intro.inr.intro.intro.intro.intro.intro\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf f' : ℝ → ℝ\na b : ℝ\nhf : ContinuousOn f (Icc a b)\nB B' : ℝ → ℝ\nha : f a ≤ B a\nhB : ContinuousOn B (Icc a b)\nhB' : ∀ (x : ℝ), x ∈ Ico a b → HasDerivWithinAt B (B' x) (Ici x) x\nbound : ∀ (x : ℝ), x ∈ Ico a b → f x = B x → f' x < B' x\ns : Set ℝ := {x | f x ≤ B x} ∩ Icc a b\nA : ContinuousOn (fun x => (f x, B x)) (Icc a b)\nthis✝ : IsClosed s\nx : ℝ\nhxB✝ : f x ≤ B x\nxab : x ∈ Ico a b\ny : ℝ\nhy : y ∈ Ioi x\nhxB : f x = B x\nr : ℝ\nhfr : f' x < r\nhrB : r < B' x\nhf' : ∃ᶠ (z : ℝ) in 𝓝[Ioi x] x, slope f x z < r\nHB : ∀ᶠ (z : ℝ) in 𝓝[Ioi x] x, r < slope B x z\nz : ℝ\nhfz : slope f x z < r\nhzB : r < slope B x z\nhz : z ∈ Ioc x y\nthis : slope f x z ≤ slope B x z\n⊢ z ∈ {x | f x ≤ B x}\n[PROOFSTEP]\nrwa [slope_def_field, slope_def_field, div_le_div_right (sub_pos.2 hz.1), hxB, sub_le_sub_iff_right] at this \n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : ℝ → ℝ\na b : ℝ\nhf : ContinuousOn f (Icc a b)\nB B' : ℝ → ℝ\nha : f a ≤ B a\nhB : ContinuousOn B (Icc a b)\nhB' : ∀ (x : ℝ), x ∈ Ico a b → HasDerivWithinAt B (B' x) (Ici x) x\nbound : ∀ (x : ℝ), x ∈ Ico a b → ∀ (r : ℝ), B' x < r → ∃ᶠ (z : ℝ) in 𝓝[Ioi x] x, slope f x z < r\n⊢ ∀ ⦃x : ℝ⦄, x ∈ Icc a b → f x ≤ B x\n[PROOFSTEP]\nhave Hr : ∀ x ∈ Icc a b, ∀ r > 0, f x ≤ B x + r * (x - a) := fun x hx r hr =>\n  by\n  apply image_le_of_liminf_slope_right_lt_deriv_boundary' hf bound\n  · rwa [sub_self, mul_zero, add_zero]\n  · exact hB.add (continuousOn_const.mul (continuousOn_id.sub continuousOn_const))\n  · intro x hx\n    exact (hB' x hx).add (((hasDerivWithinAt_id x (Ici x)).sub_const a).const_mul r)\n  · intro x _ _\n    rw [mul_one]\n    exact (lt_add_iff_pos_right _).2 hr\n  exact hx\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : ℝ → ℝ\na b : ℝ\nhf : ContinuousOn f (Icc a b)\nB B' : ℝ → ℝ\nha : f a ≤ B a\nhB : ContinuousOn B (Icc a b)\nhB' : ∀ (x : ℝ), x ∈ Ico a b → HasDerivWithinAt B (B' x) (Ici x) x\nbound : ∀ (x : ℝ), x ∈ Ico a b → ∀ (r : ℝ), B' x < r → ∃ᶠ (z : ℝ) in 𝓝[Ioi x] x, slope f x z < r\nx : ℝ\nhx : x ∈ Icc a b\nr : ℝ\nhr : r > 0\n⊢ f x ≤ B x + r * (x - a)\n[PROOFSTEP]\napply image_le_of_liminf_slope_right_lt_deriv_boundary' hf bound\n[GOAL]\ncase ha\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : ℝ → ℝ\na b : ℝ\nhf : ContinuousOn f (Icc a b)\nB B' : ℝ → ℝ\nha : f a ≤ B a\nhB : ContinuousOn B (Icc a b)\nhB' : ∀ (x : ℝ), x ∈ Ico a b → HasDerivWithinAt B (B' x) (Ici x) x\nbound : ∀ (x : ℝ), x ∈ Ico a b → ∀ (r : ℝ), B' x < r → ∃ᶠ (z : ℝ) in 𝓝[Ioi x] x, slope f x z < r\nx : ℝ\nhx : x ∈ Icc a b\nr : ℝ\nhr : r > 0\n⊢ f a ≤ B a + r * (a - a)\n[PROOFSTEP]\nrwa [sub_self, mul_zero, add_zero]\n[GOAL]\ncase hB\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : ℝ → ℝ\na b : ℝ\nhf : ContinuousOn f (Icc a b)\nB B' : ℝ → ℝ\nha : f a ≤ B a\nhB : ContinuousOn B (Icc a b)\nhB' : ∀ (x : ℝ), x ∈ Ico a b → HasDerivWithinAt B (B' x) (Ici x) x\nbound : ∀ (x : ℝ), x ∈ Ico a b → ∀ (r : ℝ), B' x < r → ∃ᶠ (z : ℝ) in 𝓝[Ioi x] x, slope f x z < r\nx : ℝ\nhx : x ∈ Icc a b\nr : ℝ\nhr : r > 0\n⊢ ContinuousOn (fun x => B x + r * (x - a)) (Icc a b)\n[PROOFSTEP]\nexact hB.add (continuousOn_const.mul (continuousOn_id.sub continuousOn_const))\n[GOAL]\ncase hB'\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : ℝ → ℝ\na b : ℝ\nhf : ContinuousOn f (Icc a b)\nB B' : ℝ → ℝ\nha : f a ≤ B a\nhB : ContinuousOn B (Icc a b)\nhB' : ∀ (x : ℝ), x ∈ Ico a b → HasDerivWithinAt B (B' x) (Ici x) x\nbound : ∀ (x : ℝ), x ∈ Ico a b → ∀ (r : ℝ), B' x < r → ∃ᶠ (z : ℝ) in 𝓝[Ioi x] x, slope f x z < r\nx : ℝ\nhx : x ∈ Icc a b\nr : ℝ\nhr : r > 0\n⊢ ∀ (x : ℝ), x ∈ Ico a b → HasDerivWithinAt (fun x => B x + r * (x - a)) (?m.12328 x) (Ici x) x\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase hB'\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : ℝ → ℝ\na b : ℝ\nhf : ContinuousOn f (Icc a b)\nB B' : ℝ → ℝ\nha : f a ≤ B a\nhB : ContinuousOn B (Icc a b)\nhB' : ∀ (x : ℝ), x ∈ Ico a b → HasDerivWithinAt B (B' x) (Ici x) x\nbound : ∀ (x : ℝ), x ∈ Ico a b → ∀ (r : ℝ), B' x < r → ∃ᶠ (z : ℝ) in 𝓝[Ioi x] x, slope f x z < r\nx✝ : ℝ\nhx✝ : x✝ ∈ Icc a b\nr : ℝ\nhr : r > 0\nx : ℝ\nhx : x ∈ Ico a b\n⊢ HasDerivWithinAt (fun x => B x + r * (x - a)) (?m.12328 x) (Ici x) x\n[PROOFSTEP]\nexact (hB' x hx).add (((hasDerivWithinAt_id x (Ici x)).sub_const a).const_mul r)\n[GOAL]\ncase bound\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : ℝ → ℝ\na b : ℝ\nhf : ContinuousOn f (Icc a b)\nB B' : ℝ → ℝ\nha : f a ≤ B a\nhB : ContinuousOn B (Icc a b)\nhB' : ∀ (x : ℝ), x ∈ Ico a b → HasDerivWithinAt B (B' x) (Ici x) x\nbound : ∀ (x : ℝ), x ∈ Ico a b → ∀ (r : ℝ), B' x < r → ∃ᶠ (z : ℝ) in 𝓝[Ioi x] x, slope f x z < r\nx : ℝ\nhx : x ∈ Icc a b\nr : ℝ\nhr : r > 0\n⊢ ∀ (x : ℝ), x ∈ Ico a b → f x = B x + r * (x - a) → B' x < B' x + r * 1\n[PROOFSTEP]\nintro x _ _\n[GOAL]\ncase bound\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : ℝ → ℝ\na b : ℝ\nhf : ContinuousOn f (Icc a b)\nB B' : ℝ → ℝ\nha : f a ≤ B a\nhB : ContinuousOn B (Icc a b)\nhB' : ∀ (x : ℝ), x ∈ Ico a b → HasDerivWithinAt B (B' x) (Ici x) x\nbound : ∀ (x : ℝ), x ∈ Ico a b → ∀ (r : ℝ), B' x < r → ∃ᶠ (z : ℝ) in 𝓝[Ioi x] x, slope f x z < r\nx✝ : ℝ\nhx : x✝ ∈ Icc a b\nr : ℝ\nhr : r > 0\nx : ℝ\na✝¹ : x ∈ Ico a b\na✝ : f x = B x + r * (x - a)\n⊢ B' x < B' x + r * 1\n[PROOFSTEP]\nrw [mul_one]\n[GOAL]\ncase bound\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : ℝ → ℝ\na b : ℝ\nhf : ContinuousOn f (Icc a b)\nB B' : ℝ → ℝ\nha : f a ≤ B a\nhB : ContinuousOn B (Icc a b)\nhB' : ∀ (x : ℝ), x ∈ Ico a b → HasDerivWithinAt B (B' x) (Ici x) x\nbound : ∀ (x : ℝ), x ∈ Ico a b → ∀ (r : ℝ), B' x < r → ∃ᶠ (z : ℝ) in 𝓝[Ioi x] x, slope f x z < r\nx✝ : ℝ\nhx : x✝ ∈ Icc a b\nr : ℝ\nhr : r > 0\nx : ℝ\na✝¹ : x ∈ Ico a b\na✝ : f x = B x + r * (x - a)\n⊢ B' x < B' x + r\n[PROOFSTEP]\nexact (lt_add_iff_pos_right _).2 hr\n[GOAL]\ncase a\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : ℝ → ℝ\na b : ℝ\nhf : ContinuousOn f (Icc a b)\nB B' : ℝ → ℝ\nha : f a ≤ B a\nhB : ContinuousOn B (Icc a b)\nhB' : ∀ (x : ℝ), x ∈ Ico a b → HasDerivWithinAt B (B' x) (Ici x) x\nbound : ∀ (x : ℝ), x ∈ Ico a b → ∀ (r : ℝ), B' x < r → ∃ᶠ (z : ℝ) in 𝓝[Ioi x] x, slope f x z < r\nx : ℝ\nhx : x ∈ Icc a b\nr : ℝ\nhr : r > 0\n⊢ x ∈ Icc a b\n[PROOFSTEP]\nexact hx\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : ℝ → ℝ\na b : ℝ\nhf : ContinuousOn f (Icc a b)\nB B' : ℝ → ℝ\nha : f a ≤ B a\nhB : ContinuousOn B (Icc a b)\nhB' : ∀ (x : ℝ), x ∈ Ico a b → HasDerivWithinAt B (B' x) (Ici x) x\nbound : ∀ (x : ℝ), x ∈ Ico a b → ∀ (r : ℝ), B' x < r → ∃ᶠ (z : ℝ) in 𝓝[Ioi x] x, slope f x z < r\nHr : ∀ (x : ℝ), x ∈ Icc a b → ∀ (r : ℝ), r > 0 → f x ≤ B x + r * (x - a)\n⊢ ∀ ⦃x : ℝ⦄, x ∈ Icc a b → f x ≤ B x\n[PROOFSTEP]\nintro x hx\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : ℝ → ℝ\na b : ℝ\nhf : ContinuousOn f (Icc a b)\nB B' : ℝ → ℝ\nha : f a ≤ B a\nhB : ContinuousOn B (Icc a b)\nhB' : ∀ (x : ℝ), x ∈ Ico a b → HasDerivWithinAt B (B' x) (Ici x) x\nbound : ∀ (x : ℝ), x ∈ Ico a b → ∀ (r : ℝ), B' x < r → ∃ᶠ (z : ℝ) in 𝓝[Ioi x] x, slope f x z < r\nHr : ∀ (x : ℝ), x ∈ Icc a b → ∀ (r : ℝ), r > 0 → f x ≤ B x + r * (x - a)\nx : ℝ\nhx : x ∈ Icc a b\n⊢ f x ≤ B x\n[PROOFSTEP]\nhave : ContinuousWithinAt (fun r => B x + r * (x - a)) (Ioi 0) 0 :=\n  continuousWithinAt_const.add (continuousWithinAt_id.mul continuousWithinAt_const)\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : ℝ → ℝ\na b : ℝ\nhf : ContinuousOn f (Icc a b)\nB B' : ℝ → ℝ\nha : f a ≤ B a\nhB : ContinuousOn B (Icc a b)\nhB' : ∀ (x : ℝ), x ∈ Ico a b → HasDerivWithinAt B (B' x) (Ici x) x\nbound : ∀ (x : ℝ), x ∈ Ico a b → ∀ (r : ℝ), B' x < r → ∃ᶠ (z : ℝ) in 𝓝[Ioi x] x, slope f x z < r\nHr : ∀ (x : ℝ), x ∈ Icc a b → ∀ (r : ℝ), r > 0 → f x ≤ B x + r * (x - a)\nx : ℝ\nhx : x ∈ Icc a b\nthis : ContinuousWithinAt (fun r => B x + r * (x - a)) (Ioi 0) 0\n⊢ f x ≤ B x\n[PROOFSTEP]\nconvert continuousWithinAt_const.closure_le _ this (Hr x hx) using 1\n[GOAL]\ncase h.e'_4\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : ℝ → ℝ\na b : ℝ\nhf : ContinuousOn f (Icc a b)\nB B' : ℝ → ℝ\nha : f a ≤ B a\nhB : ContinuousOn B (Icc a b)\nhB' : ∀ (x : ℝ), x ∈ Ico a b → HasDerivWithinAt B (B' x) (Ici x) x\nbound : ∀ (x : ℝ), x ∈ Ico a b → ∀ (r : ℝ), B' x < r → ∃ᶠ (z : ℝ) in 𝓝[Ioi x] x, slope f x z < r\nHr : ∀ (x : ℝ), x ∈ Icc a b → ∀ (r : ℝ), r > 0 → f x ≤ B x + r * (x - a)\nx : ℝ\nhx : x ∈ Icc a b\nthis : ContinuousWithinAt (fun r => B x + r * (x - a)) (Ioi 0) 0\n⊢ B x = B x + 0 * (x - a)\n[PROOFSTEP]\nsimp\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : ℝ → ℝ\na b : ℝ\nhf : ContinuousOn f (Icc a b)\nB B' : ℝ → ℝ\nha : f a ≤ B a\nhB : ContinuousOn B (Icc a b)\nhB' : ∀ (x : ℝ), x ∈ Ico a b → HasDerivWithinAt B (B' x) (Ici x) x\nbound : ∀ (x : ℝ), x ∈ Ico a b → ∀ (r : ℝ), B' x < r → ∃ᶠ (z : ℝ) in 𝓝[Ioi x] x, slope f x z < r\nHr : ∀ (x : ℝ), x ∈ Icc a b → ∀ (r : ℝ), r > 0 → f x ≤ B x + r * (x - a)\nx : ℝ\nhx : x ∈ Icc a b\nthis : ContinuousWithinAt (fun r => B x + r * (x - a)) (Ioi 0) 0\n⊢ 0 ∈ closure (Ioi 0)\n[PROOFSTEP]\nsimp\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : ℝ → E\na b : ℝ\nf' : ℝ → E\nC : ℝ\nhf : ContinuousOn f (Icc a b)\nhf' : ∀ (x : ℝ), x ∈ Ico a b → HasDerivWithinAt f (f' x) (Ici x) x\nbound : ∀ (x : ℝ), x ∈ Ico a b → ‖f' x‖ ≤ C\n⊢ ∀ (x : ℝ), x ∈ Icc a b → ‖f x - f a‖ ≤ C * (x - a)\n[PROOFSTEP]\nlet g x := f x - f a\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : ℝ → E\na b : ℝ\nf' : ℝ → E\nC : ℝ\nhf : ContinuousOn f (Icc a b)\nhf' : ∀ (x : ℝ), x ∈ Ico a b → HasDerivWithinAt f (f' x) (Ici x) x\nbound : ∀ (x : ℝ), x ∈ Ico a b → ‖f' x‖ ≤ C\ng : ℝ → E := fun x => f x - f a\n⊢ ∀ (x : ℝ), x ∈ Icc a b → ‖f x - f a‖ ≤ C * (x - a)\n[PROOFSTEP]\nhave hg : ContinuousOn g (Icc a b) := hf.sub continuousOn_const\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : ℝ → E\na b : ℝ\nf' : ℝ → E\nC : ℝ\nhf : ContinuousOn f (Icc a b)\nhf' : ∀ (x : ℝ), x ∈ Ico a b → HasDerivWithinAt f (f' x) (Ici x) x\nbound : ∀ (x : ℝ), x ∈ Ico a b → ‖f' x‖ ≤ C\ng : ℝ → E := fun x => f x - f a\nhg : ContinuousOn g (Icc a b)\n⊢ ∀ (x : ℝ), x ∈ Icc a b → ‖f x - f a‖ ≤ C * (x - a)\n[PROOFSTEP]\nhave hg' : ∀ x ∈ Ico a b, HasDerivWithinAt g (f' x) (Ici x) x :=\n  by\n  intro x hx\n  simpa using (hf' x hx).sub (hasDerivWithinAt_const _ _ _)\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : ℝ → E\na b : ℝ\nf' : ℝ → E\nC : ℝ\nhf : ContinuousOn f (Icc a b)\nhf' : ∀ (x : ℝ), x ∈ Ico a b → HasDerivWithinAt f (f' x) (Ici x) x\nbound : ∀ (x : ℝ), x ∈ Ico a b → ‖f' x‖ ≤ C\ng : ℝ → E := fun x => f x - f a\nhg : ContinuousOn g (Icc a b)\n⊢ ∀ (x : ℝ), x ∈ Ico a b → HasDerivWithinAt g (f' x) (Ici x) x\n[PROOFSTEP]\nintro x hx\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : ℝ → E\na b : ℝ\nf' : ℝ → E\nC : ℝ\nhf : ContinuousOn f (Icc a b)\nhf' : ∀ (x : ℝ), x ∈ Ico a b → HasDerivWithinAt f (f' x) (Ici x) x\nbound : ∀ (x : ℝ), x ∈ Ico a b → ‖f' x‖ ≤ C\ng : ℝ → E := fun x => f x - f a\nhg : ContinuousOn g (Icc a b)\nx : ℝ\nhx : x ∈ Ico a b\n⊢ HasDerivWithinAt g (f' x) (Ici x) x\n[PROOFSTEP]\nsimpa using (hf' x hx).sub (hasDerivWithinAt_const _ _ _)\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : ℝ → E\na b : ℝ\nf' : ℝ → E\nC : ℝ\nhf : ContinuousOn f (Icc a b)\nhf' : ∀ (x : ℝ), x ∈ Ico a b → HasDerivWithinAt f (f' x) (Ici x) x\nbound : ∀ (x : ℝ), x ∈ Ico a b → ‖f' x‖ ≤ C\ng : ℝ → E := fun x => f x - f a\nhg : ContinuousOn g (Icc a b)\nhg' : ∀ (x : ℝ), x ∈ Ico a b → HasDerivWithinAt g (f' x) (Ici x) x\n⊢ ∀ (x : ℝ), x ∈ Icc a b → ‖f x - f a‖ ≤ C * (x - a)\n[PROOFSTEP]\nlet B x := C * (x - a)\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : ℝ → E\na b : ℝ\nf' : ℝ → E\nC : ℝ\nhf : ContinuousOn f (Icc a b)\nhf' : ∀ (x : ℝ), x ∈ Ico a b → HasDerivWithinAt f (f' x) (Ici x) x\nbound : ∀ (x : ℝ), x ∈ Ico a b → ‖f' x‖ ≤ C\ng : ℝ → E := fun x => f x - f a\nhg : ContinuousOn g (Icc a b)\nhg' : ∀ (x : ℝ), x ∈ Ico a b → HasDerivWithinAt g (f' x) (Ici x) x\nB : ℝ → ℝ := fun x => C * (x - a)\n⊢ ∀ (x : ℝ), x ∈ Icc a b → ‖f x - f a‖ ≤ C * (x - a)\n[PROOFSTEP]\nhave hB : ∀ x, HasDerivAt B C x := by\n  intro x\n  simpa using (hasDerivAt_const x C).mul ((hasDerivAt_id x).sub (hasDerivAt_const x a))\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : ℝ → E\na b : ℝ\nf' : ℝ → E\nC : ℝ\nhf : ContinuousOn f (Icc a b)\nhf' : ∀ (x : ℝ), x ∈ Ico a b → HasDerivWithinAt f (f' x) (Ici x) x\nbound : ∀ (x : ℝ), x ∈ Ico a b → ‖f' x‖ ≤ C\ng : ℝ → E := fun x => f x - f a\nhg : ContinuousOn g (Icc a b)\nhg' : ∀ (x : ℝ), x ∈ Ico a b → HasDerivWithinAt g (f' x) (Ici x) x\nB : ℝ → ℝ := fun x => C * (x - a)\n⊢ ∀ (x : ℝ), HasDerivAt B C x\n[PROOFSTEP]\nintro x\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : ℝ → E\na b : ℝ\nf' : ℝ → E\nC : ℝ\nhf : ContinuousOn f (Icc a b)\nhf' : ∀ (x : ℝ), x ∈ Ico a b → HasDerivWithinAt f (f' x) (Ici x) x\nbound : ∀ (x : ℝ), x ∈ Ico a b → ‖f' x‖ ≤ C\ng : ℝ → E := fun x => f x - f a\nhg : ContinuousOn g (Icc a b)\nhg' : ∀ (x : ℝ), x ∈ Ico a b → HasDerivWithinAt g (f' x) (Ici x) x\nB : ℝ → ℝ := fun x => C * (x - a)\nx : ℝ\n⊢ HasDerivAt B C x\n[PROOFSTEP]\nsimpa using (hasDerivAt_const x C).mul ((hasDerivAt_id x).sub (hasDerivAt_const x a))\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : ℝ → E\na b : ℝ\nf' : ℝ → E\nC : ℝ\nhf : ContinuousOn f (Icc a b)\nhf' : ∀ (x : ℝ), x ∈ Ico a b → HasDerivWithinAt f (f' x) (Ici x) x\nbound : ∀ (x : ℝ), x ∈ Ico a b → ‖f' x‖ ≤ C\ng : ℝ → E := fun x => f x - f a\nhg : ContinuousOn g (Icc a b)\nhg' : ∀ (x : ℝ), x ∈ Ico a b → HasDerivWithinAt g (f' x) (Ici x) x\nB : ℝ → ℝ := fun x => C * (x - a)\nhB : ∀ (x : ℝ), HasDerivAt B C x\n⊢ ∀ (x : ℝ), x ∈ Icc a b → ‖f x - f a‖ ≤ C * (x - a)\n[PROOFSTEP]\nconvert image_norm_le_of_norm_deriv_right_le_deriv_boundary hg hg' _ hB bound\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : ℝ → E\na b : ℝ\nf' : ℝ → E\nC : ℝ\nhf : ContinuousOn f (Icc a b)\nhf' : ∀ (x : ℝ), x ∈ Ico a b → HasDerivWithinAt f (f' x) (Ici x) x\nbound : ∀ (x : ℝ), x ∈ Ico a b → ‖f' x‖ ≤ C\ng : ℝ → E := fun x => f x - f a\nhg : ContinuousOn g (Icc a b)\nhg' : ∀ (x : ℝ), x ∈ Ico a b → HasDerivWithinAt g (f' x) (Ici x) x\nB : ℝ → ℝ := fun x => C * (x - a)\nhB : ∀ (x : ℝ), HasDerivAt B C x\n⊢ ‖g a‖ ≤ B a\n[PROOFSTEP]\nsimp only\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : ℝ → E\na b : ℝ\nf' : ℝ → E\nC : ℝ\nhf : ContinuousOn f (Icc a b)\nhf' : ∀ (x : ℝ), x ∈ Ico a b → HasDerivWithinAt f (f' x) (Ici x) x\nbound : ∀ (x : ℝ), x ∈ Ico a b → ‖f' x‖ ≤ C\ng : ℝ → E := fun x => f x - f a\nhg : ContinuousOn g (Icc a b)\nhg' : ∀ (x : ℝ), x ∈ Ico a b → HasDerivWithinAt g (f' x) (Ici x) x\nB : ℝ → ℝ := fun x => C * (x - a)\nhB : ∀ (x : ℝ), HasDerivAt B C x\n⊢ ‖f a - f a‖ ≤ C * (a - a)\n[PROOFSTEP]\nrw [sub_self, norm_zero, sub_self, mul_zero]\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : ℝ → E\na b : ℝ\nf' : ℝ → E\nC : ℝ\nhf : ∀ (x : ℝ), x ∈ Icc a b → HasDerivWithinAt f (f' x) (Icc a b) x\nbound : ∀ (x : ℝ), x ∈ Ico a b → ‖f' x‖ ≤ C\n⊢ ∀ (x : ℝ), x ∈ Icc a b → ‖f x - f a‖ ≤ C * (x - a)\n[PROOFSTEP]\nrefine'\n  norm_image_sub_le_of_norm_deriv_right_le_segment (fun x hx => (hf x hx).continuousWithinAt) (fun x hx => _) bound\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : ℝ → E\na b : ℝ\nf' : ℝ → E\nC : ℝ\nhf : ∀ (x : ℝ), x ∈ Icc a b → HasDerivWithinAt f (f' x) (Icc a b) x\nbound : ∀ (x : ℝ), x ∈ Ico a b → ‖f' x‖ ≤ C\nx : ℝ\nhx : x ∈ Ico a b\n⊢ HasDerivWithinAt (fun x => f x) (f' x) (Ici x) x\n[PROOFSTEP]\nexact (hf x <| Ico_subset_Icc_self hx).nhdsWithin (Icc_mem_nhdsWithin_Ici hx)\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : ℝ → E\na b C : ℝ\nhf : DifferentiableOn ℝ f (Icc a b)\nbound : ∀ (x : ℝ), x ∈ Ico a b → ‖derivWithin f (Icc a b) x‖ ≤ C\n⊢ ∀ (x : ℝ), x ∈ Icc a b → ‖f x - f a‖ ≤ C * (x - a)\n[PROOFSTEP]\nrefine' norm_image_sub_le_of_norm_deriv_le_segment' _ bound\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : ℝ → E\na b C : ℝ\nhf : DifferentiableOn ℝ f (Icc a b)\nbound : ∀ (x : ℝ), x ∈ Ico a b → ‖derivWithin f (Icc a b) x‖ ≤ C\n⊢ ∀ (x : ℝ), x ∈ Icc a b → HasDerivWithinAt (fun x => f x) (derivWithin f (Icc a b) x) (Icc a b) x\n[PROOFSTEP]\nexact fun x hx => (hf x hx).hasDerivWithinAt\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : ℝ → E\na b : ℝ\nf' : ℝ → E\nC : ℝ\nhf : ∀ (x : ℝ), x ∈ Icc 0 1 → HasDerivWithinAt f (f' x) (Icc 0 1) x\nbound : ∀ (x : ℝ), x ∈ Ico 0 1 → ‖f' x‖ ≤ C\n⊢ ‖f 1 - f 0‖ ≤ C\n[PROOFSTEP]\nsimpa only [sub_zero, mul_one] using\n  norm_image_sub_le_of_norm_deriv_le_segment' hf bound 1 (right_mem_Icc.2 zero_le_one)\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : ℝ → E\na b C : ℝ\nhf : DifferentiableOn ℝ f (Icc 0 1)\nbound : ∀ (x : ℝ), x ∈ Ico 0 1 → ‖derivWithin f (Icc 0 1) x‖ ≤ C\n⊢ ‖f 1 - f 0‖ ≤ C\n[PROOFSTEP]\nsimpa only [sub_zero, mul_one] using norm_image_sub_le_of_norm_deriv_le_segment hf bound 1 (right_mem_Icc.2 zero_le_one)\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : ℝ → E\na b : ℝ\nhcont : ContinuousOn f (Icc a b)\nhderiv : ∀ (x : ℝ), x ∈ Ico a b → HasDerivWithinAt f 0 (Ici x) x\n⊢ ∀ (x : ℝ), x ∈ Icc a b → f x = f a\n[PROOFSTEP]\nhave : ∀ x ∈ Icc a b, ‖f x - f a‖ ≤ 0 * (x - a) := fun x hx =>\n  norm_image_sub_le_of_norm_deriv_right_le_segment hcont hderiv (fun _ _ => norm_zero.le) x hx\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : ℝ → E\na b : ℝ\nhcont : ContinuousOn f (Icc a b)\nhderiv : ∀ (x : ℝ), x ∈ Ico a b → HasDerivWithinAt f 0 (Ici x) x\nthis : ∀ (x : ℝ), x ∈ Icc a b → ‖f x - f a‖ ≤ 0 * (x - a)\n⊢ ∀ (x : ℝ), x ∈ Icc a b → f x = f a\n[PROOFSTEP]\nsimpa only [zero_mul, norm_le_zero_iff, sub_eq_zero] using this\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : ℝ → E\na b : ℝ\nhdiff : DifferentiableOn ℝ f (Icc a b)\nhderiv : ∀ (x : ℝ), x ∈ Ico a b → derivWithin f (Icc a b) x = 0\n⊢ ∀ (x : ℝ), x ∈ Icc a b → f x = f a\n[PROOFSTEP]\nhave H : ∀ x ∈ Ico a b, ‖derivWithin f (Icc a b) x‖ ≤ 0 := by\n  simpa only [norm_le_zero_iff] using fun x hx => hderiv x hx\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : ℝ → E\na b : ℝ\nhdiff : DifferentiableOn ℝ f (Icc a b)\nhderiv : ∀ (x : ℝ), x ∈ Ico a b → derivWithin f (Icc a b) x = 0\n⊢ ∀ (x : ℝ), x ∈ Ico a b → ‖derivWithin f (Icc a b) x‖ ≤ 0\n[PROOFSTEP]\nsimpa only [norm_le_zero_iff] using fun x hx => hderiv x hx\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : ℝ → E\na b : ℝ\nhdiff : DifferentiableOn ℝ f (Icc a b)\nhderiv : ∀ (x : ℝ), x ∈ Ico a b → derivWithin f (Icc a b) x = 0\nH : ∀ (x : ℝ), x ∈ Ico a b → ‖derivWithin f (Icc a b) x‖ ≤ 0\n⊢ ∀ (x : ℝ), x ∈ Icc a b → f x = f a\n[PROOFSTEP]\nsimpa only [zero_mul, norm_le_zero_iff, sub_eq_zero] using fun x hx =>\n  norm_image_sub_le_of_norm_deriv_le_segment hdiff H x hx\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : ℝ → E\na b : ℝ\nf' g : ℝ → E\nderivf : ∀ (x : ℝ), x ∈ Ico a b → HasDerivWithinAt f (f' x) (Ici x) x\nderivg : ∀ (x : ℝ), x ∈ Ico a b → HasDerivWithinAt g (f' x) (Ici x) x\nfcont : ContinuousOn f (Icc a b)\ngcont : ContinuousOn g (Icc a b)\nhi : f a = g a\n⊢ ∀ (y : ℝ), y ∈ Icc a b → f y = g y\n[PROOFSTEP]\nsimp only [← @sub_eq_zero _ _ (f _)] at hi ⊢\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : ℝ → E\na b : ℝ\nf' g : ℝ → E\nderivf : ∀ (x : ℝ), x ∈ Ico a b → HasDerivWithinAt f (f' x) (Ici x) x\nderivg : ∀ (x : ℝ), x ∈ Ico a b → HasDerivWithinAt g (f' x) (Ici x) x\nfcont : ContinuousOn f (Icc a b)\ngcont : ContinuousOn g (Icc a b)\nhi : f a - g a = 0\n⊢ ∀ (y : ℝ), y ∈ Icc a b → f y - g y = 0\n[PROOFSTEP]\nexact\n  hi ▸\n    constant_of_has_deriv_right_zero (fcont.sub gcont) fun y hy => by\n      simpa only [sub_self] using (derivf y hy).sub (derivg y hy)\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : ℝ → E\na b : ℝ\nf' g : ℝ → E\nderivf : ∀ (x : ℝ), x ∈ Ico a b → HasDerivWithinAt f (f' x) (Ici x) x\nderivg : ∀ (x : ℝ), x ∈ Ico a b → HasDerivWithinAt g (f' x) (Ici x) x\nfcont : ContinuousOn f (Icc a b)\ngcont : ContinuousOn g (Icc a b)\nhi : f a - g a = 0\ny : ℝ\nhy : y ∈ Ico a b\n⊢ HasDerivWithinAt (fun y => f y - g y) 0 (Ici y) y\n[PROOFSTEP]\nsimpa only [sub_self] using (derivf y hy).sub (derivg y hy)\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : ℝ → E\na b : ℝ\nf' g : ℝ → E\nfdiff : DifferentiableOn ℝ f (Icc a b)\ngdiff : DifferentiableOn ℝ g (Icc a b)\nhderiv : EqOn (derivWithin f (Icc a b)) (derivWithin g (Icc a b)) (Ico a b)\nhi : f a = g a\n⊢ ∀ (y : ℝ), y ∈ Icc a b → f y = g y\n[PROOFSTEP]\nhave A : ∀ y ∈ Ico a b, HasDerivWithinAt f (derivWithin f (Icc a b) y) (Ici y) y := fun y hy =>\n  (fdiff y (mem_Icc_of_Ico hy)).hasDerivWithinAt.nhdsWithin (Icc_mem_nhdsWithin_Ici hy)\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : ℝ → E\na b : ℝ\nf' g : ℝ → E\nfdiff : DifferentiableOn ℝ f (Icc a b)\ngdiff : DifferentiableOn ℝ g (Icc a b)\nhderiv : EqOn (derivWithin f (Icc a b)) (derivWithin g (Icc a b)) (Ico a b)\nhi : f a = g a\nA : ∀ (y : ℝ), y ∈ Ico a b → HasDerivWithinAt f (derivWithin f (Icc a b) y) (Ici y) y\n⊢ ∀ (y : ℝ), y ∈ Icc a b → f y = g y\n[PROOFSTEP]\nhave B : ∀ y ∈ Ico a b, HasDerivWithinAt g (derivWithin g (Icc a b) y) (Ici y) y := fun y hy =>\n  (gdiff y (mem_Icc_of_Ico hy)).hasDerivWithinAt.nhdsWithin (Icc_mem_nhdsWithin_Ici hy)\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : ℝ → E\na b : ℝ\nf' g : ℝ → E\nfdiff : DifferentiableOn ℝ f (Icc a b)\ngdiff : DifferentiableOn ℝ g (Icc a b)\nhderiv : EqOn (derivWithin f (Icc a b)) (derivWithin g (Icc a b)) (Ico a b)\nhi : f a = g a\nA : ∀ (y : ℝ), y ∈ Ico a b → HasDerivWithinAt f (derivWithin f (Icc a b) y) (Ici y) y\nB : ∀ (y : ℝ), y ∈ Ico a b → HasDerivWithinAt g (derivWithin g (Icc a b) y) (Ici y) y\n⊢ ∀ (y : ℝ), y ∈ Icc a b → f y = g y\n[PROOFSTEP]\nexact eq_of_has_deriv_right_eq A (fun y hy => (hderiv hy).symm ▸ B y hy) fdiff.continuousOn gdiff.continuousOn hi\n[GOAL]\nE : Type u_1\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\n𝕜 : Type u_3\nG : Type u_4\ninst✝³ : IsROrC 𝕜\ninst✝² : NormedSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → G\nC : ℝ\ns : Set E\nx y : E\nf' g' : E → E →L[𝕜] G\nφ : E →L[𝕜] G\nhf : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nbound : ∀ (x : E), x ∈ s → ‖f' x‖ ≤ C\nhs : Convex ℝ s\nxs : x ∈ s\nys : y ∈ s\n⊢ ‖f y - f x‖ ≤ C * ‖y - x‖\n[PROOFSTEP]\nletI : NormedSpace ℝ G := RestrictScalars.normedSpace ℝ 𝕜 G\n[GOAL]\nE : Type u_1\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\n𝕜 : Type u_3\nG : Type u_4\ninst✝³ : IsROrC 𝕜\ninst✝² : NormedSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → G\nC : ℝ\ns : Set E\nx y : E\nf' g' : E → E →L[𝕜] G\nφ : E →L[𝕜] G\nhf : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nbound : ∀ (x : E), x ∈ s → ‖f' x‖ ≤ C\nhs : Convex ℝ s\nxs : x ∈ s\nys : y ∈ s\nthis : NormedSpace ℝ G := RestrictScalars.normedSpace ℝ 𝕜 G\n⊢ ‖f y - f x‖ ≤ C * ‖y - x‖\n[PROOFSTEP]\nset g := (AffineMap.lineMap x y : ℝ → E)\n[GOAL]\nE : Type u_1\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\n𝕜 : Type u_3\nG : Type u_4\ninst✝³ : IsROrC 𝕜\ninst✝² : NormedSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g✝ : E → G\nC : ℝ\ns : Set E\nx y : E\nf' g' : E → E →L[𝕜] G\nφ : E →L[𝕜] G\nhf : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nbound : ∀ (x : E), x ∈ s → ‖f' x‖ ≤ C\nhs : Convex ℝ s\nxs : x ∈ s\nys : y ∈ s\nthis : NormedSpace ℝ G := RestrictScalars.normedSpace ℝ 𝕜 G\ng : (a : ℝ) → (fun a => E) a := ↑(AffineMap.lineMap x y)\n⊢ ‖f y - f x‖ ≤ C * ‖y - x‖\n[PROOFSTEP]\nhave segm : MapsTo g (Icc 0 1 : Set ℝ) s := hs.mapsTo_lineMap xs ys\n[GOAL]\nE : Type u_1\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\n𝕜 : Type u_3\nG : Type u_4\ninst✝³ : IsROrC 𝕜\ninst✝² : NormedSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g✝ : E → G\nC : ℝ\ns : Set E\nx y : E\nf' g' : E → E →L[𝕜] G\nφ : E →L[𝕜] G\nhf : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nbound : ∀ (x : E), x ∈ s → ‖f' x‖ ≤ C\nhs : Convex ℝ s\nxs : x ∈ s\nys : y ∈ s\nthis : NormedSpace ℝ G := RestrictScalars.normedSpace ℝ 𝕜 G\ng : (a : ℝ) → (fun a => E) a := ↑(AffineMap.lineMap x y)\nsegm : MapsTo g (Icc 0 1) s\n⊢ ‖f y - f x‖ ≤ C * ‖y - x‖\n[PROOFSTEP]\nhave hD : ∀ t ∈ Icc (0 : ℝ) 1, HasDerivWithinAt (f ∘ g) (f' (g t) (y - x)) (Icc 0 1) t := fun t ht => by\n  simpa using ((hf (g t) (segm ht)).restrictScalars ℝ).comp_hasDerivWithinAt _ AffineMap.hasDerivWithinAt_lineMap segm\n[GOAL]\nE : Type u_1\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\n𝕜 : Type u_3\nG : Type u_4\ninst✝³ : IsROrC 𝕜\ninst✝² : NormedSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g✝ : E → G\nC : ℝ\ns : Set E\nx y : E\nf' g' : E → E →L[𝕜] G\nφ : E →L[𝕜] G\nhf : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nbound : ∀ (x : E), x ∈ s → ‖f' x‖ ≤ C\nhs : Convex ℝ s\nxs : x ∈ s\nys : y ∈ s\nthis : NormedSpace ℝ G := RestrictScalars.normedSpace ℝ 𝕜 G\ng : (a : ℝ) → (fun a => E) a := ↑(AffineMap.lineMap x y)\nsegm : MapsTo g (Icc 0 1) s\nt : ℝ\nht : t ∈ Icc 0 1\n⊢ HasDerivWithinAt (f ∘ g) (↑(f' (g t)) (y - x)) (Icc 0 1) t\n[PROOFSTEP]\nsimpa using ((hf (g t) (segm ht)).restrictScalars ℝ).comp_hasDerivWithinAt _ AffineMap.hasDerivWithinAt_lineMap segm\n[GOAL]\nE : Type u_1\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\n𝕜 : Type u_3\nG : Type u_4\ninst✝³ : IsROrC 𝕜\ninst✝² : NormedSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g✝ : E → G\nC : ℝ\ns : Set E\nx y : E\nf' g' : E → E →L[𝕜] G\nφ : E →L[𝕜] G\nhf : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nbound : ∀ (x : E), x ∈ s → ‖f' x‖ ≤ C\nhs : Convex ℝ s\nxs : x ∈ s\nys : y ∈ s\nthis : NormedSpace ℝ G := RestrictScalars.normedSpace ℝ 𝕜 G\ng : (a : ℝ) → (fun a => E) a := ↑(AffineMap.lineMap x y)\nsegm : MapsTo g (Icc 0 1) s\nhD : ∀ (t : ℝ), t ∈ Icc 0 1 → HasDerivWithinAt (f ∘ g) (↑(f' (g t)) (y - x)) (Icc 0 1) t\n⊢ ‖f y - f x‖ ≤ C * ‖y - x‖\n[PROOFSTEP]\nhave bound : ∀ t ∈ Ico (0 : ℝ) 1, ‖f' (g t) (y - x)‖ ≤ C * ‖y - x‖ := fun t ht =>\n  le_of_op_norm_le _ (bound _ <| segm <| Ico_subset_Icc_self ht) _\n[GOAL]\nE : Type u_1\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\n𝕜 : Type u_3\nG : Type u_4\ninst✝³ : IsROrC 𝕜\ninst✝² : NormedSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g✝ : E → G\nC : ℝ\ns : Set E\nx y : E\nf' g' : E → E →L[𝕜] G\nφ : E →L[𝕜] G\nhf : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nbound✝ : ∀ (x : E), x ∈ s → ‖f' x‖ ≤ C\nhs : Convex ℝ s\nxs : x ∈ s\nys : y ∈ s\nthis : NormedSpace ℝ G := RestrictScalars.normedSpace ℝ 𝕜 G\ng : (a : ℝ) → (fun a => E) a := ↑(AffineMap.lineMap x y)\nsegm : MapsTo g (Icc 0 1) s\nhD : ∀ (t : ℝ), t ∈ Icc 0 1 → HasDerivWithinAt (f ∘ g) (↑(f' (g t)) (y - x)) (Icc 0 1) t\nbound : ∀ (t : ℝ), t ∈ Ico 0 1 → ‖↑(f' (g t)) (y - x)‖ ≤ C * ‖y - x‖\n⊢ ‖f y - f x‖ ≤ C * ‖y - x‖\n[PROOFSTEP]\nsimpa using norm_image_sub_le_of_norm_deriv_le_segment_01' hD bound\n[GOAL]\nE : Type u_1\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\n𝕜 : Type u_3\nG : Type u_4\ninst✝³ : IsROrC 𝕜\ninst✝² : NormedSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → G\nC✝ : ℝ\ns : Set E\nx y : E\nf' g' : E → E →L[𝕜] G\nφ : E →L[𝕜] G\nC : ℝ≥0\nhf : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nbound : ∀ (x : E), x ∈ s → ‖f' x‖₊ ≤ C\nhs : Convex ℝ s\n⊢ LipschitzOnWith C f s\n[PROOFSTEP]\nrw [lipschitzOnWith_iff_norm_sub_le]\n[GOAL]\nE : Type u_1\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\n𝕜 : Type u_3\nG : Type u_4\ninst✝³ : IsROrC 𝕜\ninst✝² : NormedSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → G\nC✝ : ℝ\ns : Set E\nx y : E\nf' g' : E → E →L[𝕜] G\nφ : E →L[𝕜] G\nC : ℝ≥0\nhf : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nbound : ∀ (x : E), x ∈ s → ‖f' x‖₊ ≤ C\nhs : Convex ℝ s\n⊢ ∀ ⦃x : E⦄, x ∈ s → ∀ ⦃y : E⦄, y ∈ s → ‖f x - f y‖ ≤ ↑C * ‖x - y‖\n[PROOFSTEP]\nintro x x_in y y_in\n[GOAL]\nE : Type u_1\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\n𝕜 : Type u_3\nG : Type u_4\ninst✝³ : IsROrC 𝕜\ninst✝² : NormedSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → G\nC✝ : ℝ\ns : Set E\nx✝ y✝ : E\nf' g' : E → E →L[𝕜] G\nφ : E →L[𝕜] G\nC : ℝ≥0\nhf : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nbound : ∀ (x : E), x ∈ s → ‖f' x‖₊ ≤ C\nhs : Convex ℝ s\nx : E\nx_in : x ∈ s\ny : E\ny_in : y ∈ s\n⊢ ‖f x - f y‖ ≤ ↑C * ‖x - y‖\n[PROOFSTEP]\nexact hs.norm_image_sub_le_of_norm_hasFDerivWithin_le hf bound y_in x_in\n[GOAL]\nE : Type u_1\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\n𝕜 : Type u_3\nG : Type u_4\ninst✝³ : IsROrC 𝕜\ninst✝² : NormedSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf✝ g : E → G\nC : ℝ\ns : Set E\nx y : E\nf' g' : E → E →L[𝕜] G\nφ : E →L[𝕜] G\nhs : Convex ℝ s\nf : E → G\nhder : ∀ᶠ (y : E) in 𝓝[s] x, HasFDerivWithinAt f (f' y) s y\nhcont : ContinuousWithinAt f' s x\nK : ℝ≥0\nhK : ‖f' x‖₊ < K\n⊢ ∃ t, t ∈ 𝓝[s] x ∧ LipschitzOnWith K f t\n[PROOFSTEP]\nobtain ⟨ε, ε0, hε⟩ : ∃ ε > 0, ball x ε ∩ s ⊆ {y | HasFDerivWithinAt f (f' y) s y ∧ ‖f' y‖₊ < K}\n[GOAL]\nE : Type u_1\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\n𝕜 : Type u_3\nG : Type u_4\ninst✝³ : IsROrC 𝕜\ninst✝² : NormedSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf✝ g : E → G\nC : ℝ\ns : Set E\nx y : E\nf' g' : E → E →L[𝕜] G\nφ : E →L[𝕜] G\nhs : Convex ℝ s\nf : E → G\nhder : ∀ᶠ (y : E) in 𝓝[s] x, HasFDerivWithinAt f (f' y) s y\nhcont : ContinuousWithinAt f' s x\nK : ℝ≥0\nhK : ‖f' x‖₊ < K\n⊢ ∃ ε, ε > 0 ∧ ball x ε ∩ s ⊆ {y | HasFDerivWithinAt f (f' y) s y ∧ ‖f' y‖₊ < K}\ncase intro.intro\nE : Type u_1\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\n𝕜 : Type u_3\nG : Type u_4\ninst✝³ : IsROrC 𝕜\ninst✝² : NormedSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf✝ g : E → G\nC : ℝ\ns : Set E\nx y : E\nf' g' : E → E →L[𝕜] G\nφ : E →L[𝕜] G\nhs : Convex ℝ s\nf : E → G\nhder : ∀ᶠ (y : E) in 𝓝[s] x, HasFDerivWithinAt f (f' y) s y\nhcont : ContinuousWithinAt f' s x\nK : ℝ≥0\nhK : ‖f' x‖₊ < K\nε : ℝ\nε0 : ε > 0\nhε : ball x ε ∩ s ⊆ {y | HasFDerivWithinAt f (f' y) s y ∧ ‖f' y‖₊ < K}\n⊢ ∃ t, t ∈ 𝓝[s] x ∧ LipschitzOnWith K f t\n[PROOFSTEP]\nexact mem_nhdsWithin_iff.1 (hder.and <| hcont.nnnorm.eventually (gt_mem_nhds hK))\n[GOAL]\ncase intro.intro\nE : Type u_1\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\n𝕜 : Type u_3\nG : Type u_4\ninst✝³ : IsROrC 𝕜\ninst✝² : NormedSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf✝ g : E → G\nC : ℝ\ns : Set E\nx y : E\nf' g' : E → E →L[𝕜] G\nφ : E →L[𝕜] G\nhs : Convex ℝ s\nf : E → G\nhder : ∀ᶠ (y : E) in 𝓝[s] x, HasFDerivWithinAt f (f' y) s y\nhcont : ContinuousWithinAt f' s x\nK : ℝ≥0\nhK : ‖f' x‖₊ < K\nε : ℝ\nε0 : ε > 0\nhε : ball x ε ∩ s ⊆ {y | HasFDerivWithinAt f (f' y) s y ∧ ‖f' y‖₊ < K}\n⊢ ∃ t, t ∈ 𝓝[s] x ∧ LipschitzOnWith K f t\n[PROOFSTEP]\nrw [inter_comm] at hε \n[GOAL]\ncase intro.intro\nE : Type u_1\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\n𝕜 : Type u_3\nG : Type u_4\ninst✝³ : IsROrC 𝕜\ninst✝² : NormedSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf✝ g : E → G\nC : ℝ\ns : Set E\nx y : E\nf' g' : E → E →L[𝕜] G\nφ : E →L[𝕜] G\nhs : Convex ℝ s\nf : E → G\nhder : ∀ᶠ (y : E) in 𝓝[s] x, HasFDerivWithinAt f (f' y) s y\nhcont : ContinuousWithinAt f' s x\nK : ℝ≥0\nhK : ‖f' x‖₊ < K\nε : ℝ\nε0 : ε > 0\nhε : s ∩ ball x ε ⊆ {y | HasFDerivWithinAt f (f' y) s y ∧ ‖f' y‖₊ < K}\n⊢ ∃ t, t ∈ 𝓝[s] x ∧ LipschitzOnWith K f t\n[PROOFSTEP]\nrefine' ⟨s ∩ ball x ε, inter_mem_nhdsWithin _ (ball_mem_nhds _ ε0), _⟩\n[GOAL]\ncase intro.intro\nE : Type u_1\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\n𝕜 : Type u_3\nG : Type u_4\ninst✝³ : IsROrC 𝕜\ninst✝² : NormedSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf✝ g : E → G\nC : ℝ\ns : Set E\nx y : E\nf' g' : E → E →L[𝕜] G\nφ : E →L[𝕜] G\nhs : Convex ℝ s\nf : E → G\nhder : ∀ᶠ (y : E) in 𝓝[s] x, HasFDerivWithinAt f (f' y) s y\nhcont : ContinuousWithinAt f' s x\nK : ℝ≥0\nhK : ‖f' x‖₊ < K\nε : ℝ\nε0 : ε > 0\nhε : s ∩ ball x ε ⊆ {y | HasFDerivWithinAt f (f' y) s y ∧ ‖f' y‖₊ < K}\n⊢ LipschitzOnWith K f (s ∩ ball x ε)\n[PROOFSTEP]\nexact\n  (hs.inter (convex_ball _ _)).lipschitzOnWith_of_nnnorm_hasFDerivWithin_le\n    (fun y hy => (hε hy).1.mono (inter_subset_left _ _)) fun y hy => (hε hy).2.le\n[GOAL]\nE : Type u_1\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\n𝕜 : Type u_3\nG : Type u_4\ninst✝³ : IsROrC 𝕜\ninst✝² : NormedSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → G\nC : ℝ\ns : Set E\nx y : E\nf' g' : E → E →L[𝕜] G\nφ : E →L[𝕜] G\nhf : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nbound : ∀ (x : E), x ∈ s → ‖f' x - φ‖ ≤ C\nhs : Convex ℝ s\nxs : x ∈ s\nys : y ∈ s\n⊢ ‖f y - f x - ↑φ (y - x)‖ ≤ C * ‖y - x‖\n[PROOFSTEP]\nlet g y := f y - φ y\n[GOAL]\nE : Type u_1\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\n𝕜 : Type u_3\nG : Type u_4\ninst✝³ : IsROrC 𝕜\ninst✝² : NormedSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g✝ : E → G\nC : ℝ\ns : Set E\nx y : E\nf' g' : E → E →L[𝕜] G\nφ : E →L[𝕜] G\nhf : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nbound : ∀ (x : E), x ∈ s → ‖f' x - φ‖ ≤ C\nhs : Convex ℝ s\nxs : x ∈ s\nys : y ∈ s\ng : E → G := fun y => f y - ↑φ y\n⊢ ‖f y - f x - ↑φ (y - x)‖ ≤ C * ‖y - x‖\n[PROOFSTEP]\nhave hg : ∀ x ∈ s, HasFDerivWithinAt g (f' x - φ) s x := fun x xs => (hf x xs).sub φ.hasFDerivWithinAt\n[GOAL]\nE : Type u_1\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\n𝕜 : Type u_3\nG : Type u_4\ninst✝³ : IsROrC 𝕜\ninst✝² : NormedSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g✝ : E → G\nC : ℝ\ns : Set E\nx y : E\nf' g' : E → E →L[𝕜] G\nφ : E →L[𝕜] G\nhf : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nbound : ∀ (x : E), x ∈ s → ‖f' x - φ‖ ≤ C\nhs : Convex ℝ s\nxs : x ∈ s\nys : y ∈ s\ng : E → G := fun y => f y - ↑φ y\nhg : ∀ (x : E), x ∈ s → HasFDerivWithinAt g (f' x - φ) s x\n⊢ ‖f y - f x - ↑φ (y - x)‖ ≤ C * ‖y - x‖\n[PROOFSTEP]\ncalc\n  ‖f y - f x - φ (y - x)‖ = ‖f y - f x - (φ y - φ x)‖ := by simp\n  _ = ‖f y - φ y - (f x - φ x)‖ := by congr 1; abel\n  _ = ‖g y - g x‖ := by simp\n  _ ≤ C * ‖y - x‖ := Convex.norm_image_sub_le_of_norm_hasFDerivWithin_le hg bound hs xs ys\n[GOAL]\nE : Type u_1\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\n𝕜 : Type u_3\nG : Type u_4\ninst✝³ : IsROrC 𝕜\ninst✝² : NormedSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g✝ : E → G\nC : ℝ\ns : Set E\nx y : E\nf' g' : E → E →L[𝕜] G\nφ : E →L[𝕜] G\nhf : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nbound : ∀ (x : E), x ∈ s → ‖f' x - φ‖ ≤ C\nhs : Convex ℝ s\nxs : x ∈ s\nys : y ∈ s\ng : E → G := fun y => f y - ↑φ y\nhg : ∀ (x : E), x ∈ s → HasFDerivWithinAt g (f' x - φ) s x\n⊢ ‖f y - f x - ↑φ (y - x)‖ = ‖f y - f x - (↑φ y - ↑φ x)‖\n[PROOFSTEP]\nsimp\n[GOAL]\nE : Type u_1\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\n𝕜 : Type u_3\nG : Type u_4\ninst✝³ : IsROrC 𝕜\ninst✝² : NormedSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g✝ : E → G\nC : ℝ\ns : Set E\nx y : E\nf' g' : E → E →L[𝕜] G\nφ : E →L[𝕜] G\nhf : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nbound : ∀ (x : E), x ∈ s → ‖f' x - φ‖ ≤ C\nhs : Convex ℝ s\nxs : x ∈ s\nys : y ∈ s\ng : E → G := fun y => f y - ↑φ y\nhg : ∀ (x : E), x ∈ s → HasFDerivWithinAt g (f' x - φ) s x\n⊢ ‖f y - f x - (↑φ y - ↑φ x)‖ = ‖f y - ↑φ y - (f x - ↑φ x)‖\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_a\nE : Type u_1\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\n𝕜 : Type u_3\nG : Type u_4\ninst✝³ : IsROrC 𝕜\ninst✝² : NormedSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g✝ : E → G\nC : ℝ\ns : Set E\nx y : E\nf' g' : E → E →L[𝕜] G\nφ : E →L[𝕜] G\nhf : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nbound : ∀ (x : E), x ∈ s → ‖f' x - φ‖ ≤ C\nhs : Convex ℝ s\nxs : x ∈ s\nys : y ∈ s\ng : E → G := fun y => f y - ↑φ y\nhg : ∀ (x : E), x ∈ s → HasFDerivWithinAt g (f' x - φ) s x\n⊢ f y - f x - (↑φ y - ↑φ x) = f y - ↑φ y - (f x - ↑φ x)\n[PROOFSTEP]\nabel\n[GOAL]\ncase e_a\nE : Type u_1\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\n𝕜 : Type u_3\nG : Type u_4\ninst✝³ : IsROrC 𝕜\ninst✝² : NormedSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g✝ : E → G\nC : ℝ\ns : Set E\nx y : E\nf' g' : E → E →L[𝕜] G\nφ : E →L[𝕜] G\nhf : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nbound : ∀ (x : E), x ∈ s → ‖f' x - φ‖ ≤ C\nhs : Convex ℝ s\nxs : x ∈ s\nys : y ∈ s\ng : E → G := fun y => f y - ↑φ y\nhg : ∀ (x : E), x ∈ s → HasFDerivWithinAt g (f' x - φ) s x\n⊢ f y - f x - (↑φ y - ↑φ x) = f y - ↑φ y - (f x - ↑φ x)\n[PROOFSTEP]\nabel\n[GOAL]\nE : Type u_1\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\n𝕜 : Type u_3\nG : Type u_4\ninst✝³ : IsROrC 𝕜\ninst✝² : NormedSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g✝ : E → G\nC : ℝ\ns : Set E\nx y : E\nf' g' : E → E →L[𝕜] G\nφ : E →L[𝕜] G\nhf : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nbound : ∀ (x : E), x ∈ s → ‖f' x - φ‖ ≤ C\nhs : Convex ℝ s\nxs : x ∈ s\nys : y ∈ s\ng : E → G := fun y => f y - ↑φ y\nhg : ∀ (x : E), x ∈ s → HasFDerivWithinAt g (f' x - φ) s x\n⊢ ‖f y - ↑φ y - (f x - ↑φ x)‖ = ‖g y - g x‖\n[PROOFSTEP]\nsimp\n[GOAL]\nE : Type u_1\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\n𝕜 : Type u_3\nG : Type u_4\ninst✝³ : IsROrC 𝕜\ninst✝² : NormedSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → G\nC : ℝ\ns : Set E\nx y : E\nf' g' : E → E →L[𝕜] G\nφ : E →L[𝕜] G\nhs : Convex ℝ s\nhf : DifferentiableOn 𝕜 f s\nhf' : ∀ (x : E), x ∈ s → fderivWithin 𝕜 f s x = 0\nhx : x ∈ s\nhy : y ∈ s\n⊢ f x = f y\n[PROOFSTEP]\nhave bound : ∀ x ∈ s, ‖fderivWithin 𝕜 f s x‖ ≤ 0 := fun x hx => by simp only [hf' x hx, norm_zero, le_rfl]\n[GOAL]\nE : Type u_1\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\n𝕜 : Type u_3\nG : Type u_4\ninst✝³ : IsROrC 𝕜\ninst✝² : NormedSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → G\nC : ℝ\ns : Set E\nx✝ y : E\nf' g' : E → E →L[𝕜] G\nφ : E →L[𝕜] G\nhs : Convex ℝ s\nhf : DifferentiableOn 𝕜 f s\nhf' : ∀ (x : E), x ∈ s → fderivWithin 𝕜 f s x = 0\nhx✝ : x✝ ∈ s\nhy : y ∈ s\nx : E\nhx : x ∈ s\n⊢ ‖fderivWithin 𝕜 f s x‖ ≤ 0\n[PROOFSTEP]\nsimp only [hf' x hx, norm_zero, le_rfl]\n[GOAL]\nE : Type u_1\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\n𝕜 : Type u_3\nG : Type u_4\ninst✝³ : IsROrC 𝕜\ninst✝² : NormedSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → G\nC : ℝ\ns : Set E\nx y : E\nf' g' : E → E →L[𝕜] G\nφ : E →L[𝕜] G\nhs : Convex ℝ s\nhf : DifferentiableOn 𝕜 f s\nhf' : ∀ (x : E), x ∈ s → fderivWithin 𝕜 f s x = 0\nhx : x ∈ s\nhy : y ∈ s\nbound : ∀ (x : E), x ∈ s → ‖fderivWithin 𝕜 f s x‖ ≤ 0\n⊢ f x = f y\n[PROOFSTEP]\nsimpa only [(dist_eq_norm _ _).symm, zero_mul, dist_le_zero, eq_comm] using\n  hs.norm_image_sub_le_of_norm_fderivWithin_le hf bound hx hy\n[GOAL]\nE : Type u_1\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\n𝕜 : Type u_3\nG : Type u_4\ninst✝³ : IsROrC 𝕜\ninst✝² : NormedSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → G\nC : ℝ\ns : Set E\nx✝² y✝ : E\nf' g' : E → E →L[𝕜] G\nφ : E →L[𝕜] G\nhf : Differentiable 𝕜 f\nhf' : ∀ (x : E), fderiv 𝕜 f x = 0\nx✝¹ y x : E\nx✝ : x ∈ univ\n⊢ fderivWithin 𝕜 f univ x = 0\n[PROOFSTEP]\nrw [fderivWithin_univ]\n[GOAL]\nE : Type u_1\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\n𝕜 : Type u_3\nG : Type u_4\ninst✝³ : IsROrC 𝕜\ninst✝² : NormedSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → G\nC : ℝ\ns : Set E\nx✝² y✝ : E\nf' g' : E → E →L[𝕜] G\nφ : E →L[𝕜] G\nhf : Differentiable 𝕜 f\nhf' : ∀ (x : E), fderiv 𝕜 f x = 0\nx✝¹ y x : E\nx✝ : x ∈ univ\n⊢ fderiv 𝕜 f x = 0\n[PROOFSTEP]\nexact hf' x\n[GOAL]\nE : Type u_1\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\n𝕜 : Type u_3\nG : Type u_4\ninst✝³ : IsROrC 𝕜\ninst✝² : NormedSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → G\nC : ℝ\ns : Set E\nx y✝ : E\nf' g' : E → E →L[𝕜] G\nφ : E →L[𝕜] G\nhs : Convex ℝ s\nhf : DifferentiableOn 𝕜 f s\nhg : DifferentiableOn 𝕜 g s\nhs' : UniqueDiffOn 𝕜 s\nhf' : ∀ (x : E), x ∈ s → fderivWithin 𝕜 f s x = fderivWithin 𝕜 g s x\nhx : x ∈ s\nhfgx : f x = g x\ny : E\nhy : y ∈ s\n⊢ f y = g y\n[PROOFSTEP]\nsuffices f x - g x = f y - g y by rwa [hfgx, sub_self, eq_comm, sub_eq_zero] at this \n[GOAL]\nE : Type u_1\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\n𝕜 : Type u_3\nG : Type u_4\ninst✝³ : IsROrC 𝕜\ninst✝² : NormedSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → G\nC : ℝ\ns : Set E\nx y✝ : E\nf' g' : E → E →L[𝕜] G\nφ : E →L[𝕜] G\nhs : Convex ℝ s\nhf : DifferentiableOn 𝕜 f s\nhg : DifferentiableOn 𝕜 g s\nhs' : UniqueDiffOn 𝕜 s\nhf' : ∀ (x : E), x ∈ s → fderivWithin 𝕜 f s x = fderivWithin 𝕜 g s x\nhx : x ∈ s\nhfgx : f x = g x\ny : E\nhy : y ∈ s\nthis : f x - g x = f y - g y\n⊢ f y = g y\n[PROOFSTEP]\nrwa [hfgx, sub_self, eq_comm, sub_eq_zero] at this \n[GOAL]\nE : Type u_1\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\n𝕜 : Type u_3\nG : Type u_4\ninst✝³ : IsROrC 𝕜\ninst✝² : NormedSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → G\nC : ℝ\ns : Set E\nx y✝ : E\nf' g' : E → E →L[𝕜] G\nφ : E →L[𝕜] G\nhs : Convex ℝ s\nhf : DifferentiableOn 𝕜 f s\nhg : DifferentiableOn 𝕜 g s\nhs' : UniqueDiffOn 𝕜 s\nhf' : ∀ (x : E), x ∈ s → fderivWithin 𝕜 f s x = fderivWithin 𝕜 g s x\nhx : x ∈ s\nhfgx : f x = g x\ny : E\nhy : y ∈ s\n⊢ f x - g x = f y - g y\n[PROOFSTEP]\nrefine' hs.is_const_of_fderivWithin_eq_zero (hf.sub hg) (fun z hz => _) hx hy\n[GOAL]\nE : Type u_1\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\n𝕜 : Type u_3\nG : Type u_4\ninst✝³ : IsROrC 𝕜\ninst✝² : NormedSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → G\nC : ℝ\ns : Set E\nx y✝ : E\nf' g' : E → E →L[𝕜] G\nφ : E →L[𝕜] G\nhs : Convex ℝ s\nhf : DifferentiableOn 𝕜 f s\nhg : DifferentiableOn 𝕜 g s\nhs' : UniqueDiffOn 𝕜 s\nhf' : ∀ (x : E), x ∈ s → fderivWithin 𝕜 f s x = fderivWithin 𝕜 g s x\nhx : x ∈ s\nhfgx : f x = g x\ny : E\nhy : y ∈ s\nz : E\nhz : z ∈ s\n⊢ fderivWithin 𝕜 (fun y => f y - g y) s z = 0\n[PROOFSTEP]\nrw [fderivWithin_sub (hs' _ hz) (hf _ hz) (hg _ hz), sub_eq_zero, hf' _ hz]\n[GOAL]\nE : Type u_1\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\n𝕜 : Type u_3\nG : Type u_4\ninst✝³ : IsROrC 𝕜\ninst✝² : NormedSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf g : E → G\nC : ℝ\ns : Set E\nx✝² y : E\nf' g' : E → E →L[𝕜] G\nφ : E →L[𝕜] G\nhf : Differentiable 𝕜 f\nhg : Differentiable 𝕜 g\nhf' : ∀ (x : E), fderiv 𝕜 f x = fderiv 𝕜 g x\nx✝¹ : E\nhfgx : f x✝¹ = g x✝¹\nx : E\nx✝ : x ∈ univ\n⊢ fderivWithin 𝕜 f univ x = fderivWithin 𝕜 g univ x\n[PROOFSTEP]\nsimpa using hf' _\n[GOAL]\nE : Type u_1\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\n𝕜 : Type u_3\nG : Type u_4\ninst✝³ : IsROrC 𝕜\ninst✝² : NormedSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf f' : 𝕜 → G\ns : Set 𝕜\nx✝ y : 𝕜\nC : ℝ\nhf : ∀ (x : 𝕜), x ∈ s → HasDerivWithinAt f (f' x) s x\nbound : ∀ (x : 𝕜), x ∈ s → ‖f' x‖ ≤ C\nhs : Convex ℝ s\nxs : x✝ ∈ s\nys : y ∈ s\nx : 𝕜\nhx : x ∈ s\n⊢ ‖smulRight 1 (f' x)‖ ≤ ‖f' x‖\n[PROOFSTEP]\nsimp\n[GOAL]\nE : Type u_1\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\n𝕜 : Type u_3\nG : Type u_4\ninst✝³ : IsROrC 𝕜\ninst✝² : NormedSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf f' : 𝕜 → G\ns : Set 𝕜\nx✝ y : 𝕜\nC : ℝ≥0\nhs : Convex ℝ s\nhf : ∀ (x : 𝕜), x ∈ s → HasDerivWithinAt f (f' x) s x\nbound : ∀ (x : 𝕜), x ∈ s → ‖f' x‖₊ ≤ C\nx : 𝕜\nhx : x ∈ s\n⊢ ‖smulRight 1 (f' x)‖₊ ≤ ‖f' x‖₊\n[PROOFSTEP]\nsimp\n[GOAL]\nE : Type u_1\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\n𝕜 : Type u_3\nG : Type u_4\ninst✝³ : IsROrC 𝕜\ninst✝² : NormedSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf f' : 𝕜 → G\ns : Set 𝕜\nx✝ y✝ : 𝕜\nhf : Differentiable 𝕜 f\nhf' : ∀ (x : 𝕜), deriv f x = 0\nx y z : 𝕜\n⊢ fderiv 𝕜 f z = 0\n[PROOFSTEP]\next\n[GOAL]\ncase h\nE : Type u_1\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\n𝕜 : Type u_3\nG : Type u_4\ninst✝³ : IsROrC 𝕜\ninst✝² : NormedSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace 𝕜 G\nf f' : 𝕜 → G\ns : Set 𝕜\nx✝ y✝ : 𝕜\nhf : Differentiable 𝕜 f\nhf' : ∀ (x : 𝕜), deriv f x = 0\nx y z : 𝕜\n⊢ ↑(fderiv 𝕜 f z) 1 = ↑0 1\n[PROOFSTEP]\nsimp [← deriv_fderiv, hf']\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf f' : ℝ → ℝ\na b : ℝ\nhab : a < b\nhfc : ContinuousOn f (Icc a b)\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhfd : DifferentiableOn ℝ f (Ioo a b)\ng g' : ℝ → ℝ\nhgc : ContinuousOn g (Icc a b)\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhgd : DifferentiableOn ℝ g (Ioo a b)\n⊢ ∃ c, c ∈ Ioo a b ∧ (g b - g a) * f' c = (f b - f a) * g' c\n[PROOFSTEP]\nlet h x := (g b - g a) * f x - (f b - f a) * g x\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf f' : ℝ → ℝ\na b : ℝ\nhab : a < b\nhfc : ContinuousOn f (Icc a b)\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhfd : DifferentiableOn ℝ f (Ioo a b)\ng g' : ℝ → ℝ\nhgc : ContinuousOn g (Icc a b)\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhgd : DifferentiableOn ℝ g (Ioo a b)\nh : ℝ → ℝ := fun x => (g b - g a) * f x - (f b - f a) * g x\n⊢ ∃ c, c ∈ Ioo a b ∧ (g b - g a) * f' c = (f b - f a) * g' c\n[PROOFSTEP]\nhave hI : h a = h b := by simp only; ring\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf f' : ℝ → ℝ\na b : ℝ\nhab : a < b\nhfc : ContinuousOn f (Icc a b)\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhfd : DifferentiableOn ℝ f (Ioo a b)\ng g' : ℝ → ℝ\nhgc : ContinuousOn g (Icc a b)\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhgd : DifferentiableOn ℝ g (Ioo a b)\nh : ℝ → ℝ := fun x => (g b - g a) * f x - (f b - f a) * g x\n⊢ h a = h b\n[PROOFSTEP]\nsimp only\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf f' : ℝ → ℝ\na b : ℝ\nhab : a < b\nhfc : ContinuousOn f (Icc a b)\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhfd : DifferentiableOn ℝ f (Ioo a b)\ng g' : ℝ → ℝ\nhgc : ContinuousOn g (Icc a b)\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhgd : DifferentiableOn ℝ g (Ioo a b)\nh : ℝ → ℝ := fun x => (g b - g a) * f x - (f b - f a) * g x\n⊢ (g b - g a) * f a - (f b - f a) * g a = (g b - g a) * f b - (f b - f a) * g b\n[PROOFSTEP]\nring\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf f' : ℝ → ℝ\na b : ℝ\nhab : a < b\nhfc : ContinuousOn f (Icc a b)\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhfd : DifferentiableOn ℝ f (Ioo a b)\ng g' : ℝ → ℝ\nhgc : ContinuousOn g (Icc a b)\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhgd : DifferentiableOn ℝ g (Ioo a b)\nh : ℝ → ℝ := fun x => (g b - g a) * f x - (f b - f a) * g x\nhI : h a = h b\n⊢ ∃ c, c ∈ Ioo a b ∧ (g b - g a) * f' c = (f b - f a) * g' c\n[PROOFSTEP]\nlet h' x := (g b - g a) * f' x - (f b - f a) * g' x\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf f' : ℝ → ℝ\na b : ℝ\nhab : a < b\nhfc : ContinuousOn f (Icc a b)\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhfd : DifferentiableOn ℝ f (Ioo a b)\ng g' : ℝ → ℝ\nhgc : ContinuousOn g (Icc a b)\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhgd : DifferentiableOn ℝ g (Ioo a b)\nh : ℝ → ℝ := fun x => (g b - g a) * f x - (f b - f a) * g x\nhI : h a = h b\nh' : ℝ → ℝ := fun x => (g b - g a) * f' x - (f b - f a) * g' x\n⊢ ∃ c, c ∈ Ioo a b ∧ (g b - g a) * f' c = (f b - f a) * g' c\n[PROOFSTEP]\nhave hhh' : ∀ x ∈ Ioo a b, HasDerivAt h (h' x) x := fun x hx =>\n  ((hff' x hx).const_mul (g b - g a)).sub ((hgg' x hx).const_mul (f b - f a))\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf f' : ℝ → ℝ\na b : ℝ\nhab : a < b\nhfc : ContinuousOn f (Icc a b)\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhfd : DifferentiableOn ℝ f (Ioo a b)\ng g' : ℝ → ℝ\nhgc : ContinuousOn g (Icc a b)\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhgd : DifferentiableOn ℝ g (Ioo a b)\nh : ℝ → ℝ := fun x => (g b - g a) * f x - (f b - f a) * g x\nhI : h a = h b\nh' : ℝ → ℝ := fun x => (g b - g a) * f' x - (f b - f a) * g' x\nhhh' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt h (h' x) x\n⊢ ∃ c, c ∈ Ioo a b ∧ (g b - g a) * f' c = (f b - f a) * g' c\n[PROOFSTEP]\nhave hhc : ContinuousOn h (Icc a b) := (continuousOn_const.mul hfc).sub (continuousOn_const.mul hgc)\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf f' : ℝ → ℝ\na b : ℝ\nhab : a < b\nhfc : ContinuousOn f (Icc a b)\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhfd : DifferentiableOn ℝ f (Ioo a b)\ng g' : ℝ → ℝ\nhgc : ContinuousOn g (Icc a b)\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhgd : DifferentiableOn ℝ g (Ioo a b)\nh : ℝ → ℝ := fun x => (g b - g a) * f x - (f b - f a) * g x\nhI : h a = h b\nh' : ℝ → ℝ := fun x => (g b - g a) * f' x - (f b - f a) * g' x\nhhh' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt h (h' x) x\nhhc : ContinuousOn h (Icc a b)\n⊢ ∃ c, c ∈ Ioo a b ∧ (g b - g a) * f' c = (f b - f a) * g' c\n[PROOFSTEP]\nrcases exists_hasDerivAt_eq_zero hab hhc hI hhh' with ⟨c, cmem, hc⟩\n[GOAL]\ncase intro.intro\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf f' : ℝ → ℝ\na b : ℝ\nhab : a < b\nhfc : ContinuousOn f (Icc a b)\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhfd : DifferentiableOn ℝ f (Ioo a b)\ng g' : ℝ → ℝ\nhgc : ContinuousOn g (Icc a b)\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhgd : DifferentiableOn ℝ g (Ioo a b)\nh : ℝ → ℝ := fun x => (g b - g a) * f x - (f b - f a) * g x\nhI : h a = h b\nh' : ℝ → ℝ := fun x => (g b - g a) * f' x - (f b - f a) * g' x\nhhh' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt h (h' x) x\nhhc : ContinuousOn h (Icc a b)\nc : ℝ\ncmem : c ∈ Ioo a b\nhc : h' c = 0\n⊢ ∃ c, c ∈ Ioo a b ∧ (g b - g a) * f' c = (f b - f a) * g' c\n[PROOFSTEP]\nexact ⟨c, cmem, sub_eq_zero.1 hc⟩\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf f' : ℝ → ℝ\na b : ℝ\nhab : a < b\nhfc : ContinuousOn f (Icc a b)\nhff'✝ : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhfd : DifferentiableOn ℝ f (Ioo a b)\ng g' : ℝ → ℝ\nhgc : ContinuousOn g (Icc a b)\nhgg'✝ : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhgd : DifferentiableOn ℝ g (Ioo a b)\nlfa lga lfb lgb : ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhfa : Tendsto f (𝓝[Ioi a] a) (𝓝 lfa)\nhga : Tendsto g (𝓝[Ioi a] a) (𝓝 lga)\nhfb : Tendsto f (𝓝[Iio b] b) (𝓝 lfb)\nhgb : Tendsto g (𝓝[Iio b] b) (𝓝 lgb)\n⊢ ∃ c, c ∈ Ioo a b ∧ (lgb - lga) * f' c = (lfb - lfa) * g' c\n[PROOFSTEP]\nlet h x := (lgb - lga) * f x - (lfb - lfa) * g x\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf f' : ℝ → ℝ\na b : ℝ\nhab : a < b\nhfc : ContinuousOn f (Icc a b)\nhff'✝ : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhfd : DifferentiableOn ℝ f (Ioo a b)\ng g' : ℝ → ℝ\nhgc : ContinuousOn g (Icc a b)\nhgg'✝ : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhgd : DifferentiableOn ℝ g (Ioo a b)\nlfa lga lfb lgb : ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhfa : Tendsto f (𝓝[Ioi a] a) (𝓝 lfa)\nhga : Tendsto g (𝓝[Ioi a] a) (𝓝 lga)\nhfb : Tendsto f (𝓝[Iio b] b) (𝓝 lfb)\nhgb : Tendsto g (𝓝[Iio b] b) (𝓝 lgb)\nh : ℝ → ℝ := fun x => (lgb - lga) * f x - (lfb - lfa) * g x\n⊢ ∃ c, c ∈ Ioo a b ∧ (lgb - lga) * f' c = (lfb - lfa) * g' c\n[PROOFSTEP]\nhave hha : Tendsto h (𝓝[>] a) (𝓝 <| lgb * lfa - lfb * lga) :=\n  by\n  have : Tendsto h (𝓝[>] a) (𝓝 <| (lgb - lga) * lfa - (lfb - lfa) * lga) :=\n    (tendsto_const_nhds.mul hfa).sub (tendsto_const_nhds.mul hga)\n  convert this using 2\n  ring\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf f' : ℝ → ℝ\na b : ℝ\nhab : a < b\nhfc : ContinuousOn f (Icc a b)\nhff'✝ : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhfd : DifferentiableOn ℝ f (Ioo a b)\ng g' : ℝ → ℝ\nhgc : ContinuousOn g (Icc a b)\nhgg'✝ : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhgd : DifferentiableOn ℝ g (Ioo a b)\nlfa lga lfb lgb : ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhfa : Tendsto f (𝓝[Ioi a] a) (𝓝 lfa)\nhga : Tendsto g (𝓝[Ioi a] a) (𝓝 lga)\nhfb : Tendsto f (𝓝[Iio b] b) (𝓝 lfb)\nhgb : Tendsto g (𝓝[Iio b] b) (𝓝 lgb)\nh : ℝ → ℝ := fun x => (lgb - lga) * f x - (lfb - lfa) * g x\n⊢ Tendsto h (𝓝[Ioi a] a) (𝓝 (lgb * lfa - lfb * lga))\n[PROOFSTEP]\nhave : Tendsto h (𝓝[>] a) (𝓝 <| (lgb - lga) * lfa - (lfb - lfa) * lga) :=\n  (tendsto_const_nhds.mul hfa).sub (tendsto_const_nhds.mul hga)\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf f' : ℝ → ℝ\na b : ℝ\nhab : a < b\nhfc : ContinuousOn f (Icc a b)\nhff'✝ : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhfd : DifferentiableOn ℝ f (Ioo a b)\ng g' : ℝ → ℝ\nhgc : ContinuousOn g (Icc a b)\nhgg'✝ : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhgd : DifferentiableOn ℝ g (Ioo a b)\nlfa lga lfb lgb : ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhfa : Tendsto f (𝓝[Ioi a] a) (𝓝 lfa)\nhga : Tendsto g (𝓝[Ioi a] a) (𝓝 lga)\nhfb : Tendsto f (𝓝[Iio b] b) (𝓝 lfb)\nhgb : Tendsto g (𝓝[Iio b] b) (𝓝 lgb)\nh : ℝ → ℝ := fun x => (lgb - lga) * f x - (lfb - lfa) * g x\nthis : Tendsto h (𝓝[Ioi a] a) (𝓝 ((lgb - lga) * lfa - (lfb - lfa) * lga))\n⊢ Tendsto h (𝓝[Ioi a] a) (𝓝 (lgb * lfa - lfb * lga))\n[PROOFSTEP]\nconvert this using 2\n[GOAL]\ncase h.e'_5.h.e'_3\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf f' : ℝ → ℝ\na b : ℝ\nhab : a < b\nhfc : ContinuousOn f (Icc a b)\nhff'✝ : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhfd : DifferentiableOn ℝ f (Ioo a b)\ng g' : ℝ → ℝ\nhgc : ContinuousOn g (Icc a b)\nhgg'✝ : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhgd : DifferentiableOn ℝ g (Ioo a b)\nlfa lga lfb lgb : ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhfa : Tendsto f (𝓝[Ioi a] a) (𝓝 lfa)\nhga : Tendsto g (𝓝[Ioi a] a) (𝓝 lga)\nhfb : Tendsto f (𝓝[Iio b] b) (𝓝 lfb)\nhgb : Tendsto g (𝓝[Iio b] b) (𝓝 lgb)\nh : ℝ → ℝ := fun x => (lgb - lga) * f x - (lfb - lfa) * g x\nthis : Tendsto h (𝓝[Ioi a] a) (𝓝 ((lgb - lga) * lfa - (lfb - lfa) * lga))\n⊢ lgb * lfa - lfb * lga = (lgb - lga) * lfa - (lfb - lfa) * lga\n[PROOFSTEP]\nring\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf f' : ℝ → ℝ\na b : ℝ\nhab : a < b\nhfc : ContinuousOn f (Icc a b)\nhff'✝ : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhfd : DifferentiableOn ℝ f (Ioo a b)\ng g' : ℝ → ℝ\nhgc : ContinuousOn g (Icc a b)\nhgg'✝ : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhgd : DifferentiableOn ℝ g (Ioo a b)\nlfa lga lfb lgb : ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhfa : Tendsto f (𝓝[Ioi a] a) (𝓝 lfa)\nhga : Tendsto g (𝓝[Ioi a] a) (𝓝 lga)\nhfb : Tendsto f (𝓝[Iio b] b) (𝓝 lfb)\nhgb : Tendsto g (𝓝[Iio b] b) (𝓝 lgb)\nh : ℝ → ℝ := fun x => (lgb - lga) * f x - (lfb - lfa) * g x\nhha : Tendsto h (𝓝[Ioi a] a) (𝓝 (lgb * lfa - lfb * lga))\n⊢ ∃ c, c ∈ Ioo a b ∧ (lgb - lga) * f' c = (lfb - lfa) * g' c\n[PROOFSTEP]\nhave hhb : Tendsto h (𝓝[<] b) (𝓝 <| lgb * lfa - lfb * lga) :=\n  by\n  have : Tendsto h (𝓝[<] b) (𝓝 <| (lgb - lga) * lfb - (lfb - lfa) * lgb) :=\n    (tendsto_const_nhds.mul hfb).sub (tendsto_const_nhds.mul hgb)\n  convert this using 2\n  ring\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf f' : ℝ → ℝ\na b : ℝ\nhab : a < b\nhfc : ContinuousOn f (Icc a b)\nhff'✝ : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhfd : DifferentiableOn ℝ f (Ioo a b)\ng g' : ℝ → ℝ\nhgc : ContinuousOn g (Icc a b)\nhgg'✝ : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhgd : DifferentiableOn ℝ g (Ioo a b)\nlfa lga lfb lgb : ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhfa : Tendsto f (𝓝[Ioi a] a) (𝓝 lfa)\nhga : Tendsto g (𝓝[Ioi a] a) (𝓝 lga)\nhfb : Tendsto f (𝓝[Iio b] b) (𝓝 lfb)\nhgb : Tendsto g (𝓝[Iio b] b) (𝓝 lgb)\nh : ℝ → ℝ := fun x => (lgb - lga) * f x - (lfb - lfa) * g x\nhha : Tendsto h (𝓝[Ioi a] a) (𝓝 (lgb * lfa - lfb * lga))\n⊢ Tendsto h (𝓝[Iio b] b) (𝓝 (lgb * lfa - lfb * lga))\n[PROOFSTEP]\nhave : Tendsto h (𝓝[<] b) (𝓝 <| (lgb - lga) * lfb - (lfb - lfa) * lgb) :=\n  (tendsto_const_nhds.mul hfb).sub (tendsto_const_nhds.mul hgb)\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf f' : ℝ → ℝ\na b : ℝ\nhab : a < b\nhfc : ContinuousOn f (Icc a b)\nhff'✝ : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhfd : DifferentiableOn ℝ f (Ioo a b)\ng g' : ℝ → ℝ\nhgc : ContinuousOn g (Icc a b)\nhgg'✝ : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhgd : DifferentiableOn ℝ g (Ioo a b)\nlfa lga lfb lgb : ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhfa : Tendsto f (𝓝[Ioi a] a) (𝓝 lfa)\nhga : Tendsto g (𝓝[Ioi a] a) (𝓝 lga)\nhfb : Tendsto f (𝓝[Iio b] b) (𝓝 lfb)\nhgb : Tendsto g (𝓝[Iio b] b) (𝓝 lgb)\nh : ℝ → ℝ := fun x => (lgb - lga) * f x - (lfb - lfa) * g x\nhha : Tendsto h (𝓝[Ioi a] a) (𝓝 (lgb * lfa - lfb * lga))\nthis : Tendsto h (𝓝[Iio b] b) (𝓝 ((lgb - lga) * lfb - (lfb - lfa) * lgb))\n⊢ Tendsto h (𝓝[Iio b] b) (𝓝 (lgb * lfa - lfb * lga))\n[PROOFSTEP]\nconvert this using 2\n[GOAL]\ncase h.e'_5.h.e'_3\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf f' : ℝ → ℝ\na b : ℝ\nhab : a < b\nhfc : ContinuousOn f (Icc a b)\nhff'✝ : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhfd : DifferentiableOn ℝ f (Ioo a b)\ng g' : ℝ → ℝ\nhgc : ContinuousOn g (Icc a b)\nhgg'✝ : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhgd : DifferentiableOn ℝ g (Ioo a b)\nlfa lga lfb lgb : ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhfa : Tendsto f (𝓝[Ioi a] a) (𝓝 lfa)\nhga : Tendsto g (𝓝[Ioi a] a) (𝓝 lga)\nhfb : Tendsto f (𝓝[Iio b] b) (𝓝 lfb)\nhgb : Tendsto g (𝓝[Iio b] b) (𝓝 lgb)\nh : ℝ → ℝ := fun x => (lgb - lga) * f x - (lfb - lfa) * g x\nhha : Tendsto h (𝓝[Ioi a] a) (𝓝 (lgb * lfa - lfb * lga))\nthis : Tendsto h (𝓝[Iio b] b) (𝓝 ((lgb - lga) * lfb - (lfb - lfa) * lgb))\n⊢ lgb * lfa - lfb * lga = (lgb - lga) * lfb - (lfb - lfa) * lgb\n[PROOFSTEP]\nring\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf f' : ℝ → ℝ\na b : ℝ\nhab : a < b\nhfc : ContinuousOn f (Icc a b)\nhff'✝ : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhfd : DifferentiableOn ℝ f (Ioo a b)\ng g' : ℝ → ℝ\nhgc : ContinuousOn g (Icc a b)\nhgg'✝ : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhgd : DifferentiableOn ℝ g (Ioo a b)\nlfa lga lfb lgb : ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhfa : Tendsto f (𝓝[Ioi a] a) (𝓝 lfa)\nhga : Tendsto g (𝓝[Ioi a] a) (𝓝 lga)\nhfb : Tendsto f (𝓝[Iio b] b) (𝓝 lfb)\nhgb : Tendsto g (𝓝[Iio b] b) (𝓝 lgb)\nh : ℝ → ℝ := fun x => (lgb - lga) * f x - (lfb - lfa) * g x\nhha : Tendsto h (𝓝[Ioi a] a) (𝓝 (lgb * lfa - lfb * lga))\nhhb : Tendsto h (𝓝[Iio b] b) (𝓝 (lgb * lfa - lfb * lga))\n⊢ ∃ c, c ∈ Ioo a b ∧ (lgb - lga) * f' c = (lfb - lfa) * g' c\n[PROOFSTEP]\nlet h' x := (lgb - lga) * f' x - (lfb - lfa) * g' x\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf f' : ℝ → ℝ\na b : ℝ\nhab : a < b\nhfc : ContinuousOn f (Icc a b)\nhff'✝ : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhfd : DifferentiableOn ℝ f (Ioo a b)\ng g' : ℝ → ℝ\nhgc : ContinuousOn g (Icc a b)\nhgg'✝ : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhgd : DifferentiableOn ℝ g (Ioo a b)\nlfa lga lfb lgb : ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhfa : Tendsto f (𝓝[Ioi a] a) (𝓝 lfa)\nhga : Tendsto g (𝓝[Ioi a] a) (𝓝 lga)\nhfb : Tendsto f (𝓝[Iio b] b) (𝓝 lfb)\nhgb : Tendsto g (𝓝[Iio b] b) (𝓝 lgb)\nh : ℝ → ℝ := fun x => (lgb - lga) * f x - (lfb - lfa) * g x\nhha : Tendsto h (𝓝[Ioi a] a) (𝓝 (lgb * lfa - lfb * lga))\nhhb : Tendsto h (𝓝[Iio b] b) (𝓝 (lgb * lfa - lfb * lga))\nh' : ℝ → ℝ := fun x => (lgb - lga) * f' x - (lfb - lfa) * g' x\n⊢ ∃ c, c ∈ Ioo a b ∧ (lgb - lga) * f' c = (lfb - lfa) * g' c\n[PROOFSTEP]\nhave hhh' : ∀ x ∈ Ioo a b, HasDerivAt h (h' x) x := by\n  intro x hx\n  exact ((hff' x hx).const_mul _).sub ((hgg' x hx).const_mul _)\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf f' : ℝ → ℝ\na b : ℝ\nhab : a < b\nhfc : ContinuousOn f (Icc a b)\nhff'✝ : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhfd : DifferentiableOn ℝ f (Ioo a b)\ng g' : ℝ → ℝ\nhgc : ContinuousOn g (Icc a b)\nhgg'✝ : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhgd : DifferentiableOn ℝ g (Ioo a b)\nlfa lga lfb lgb : ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhfa : Tendsto f (𝓝[Ioi a] a) (𝓝 lfa)\nhga : Tendsto g (𝓝[Ioi a] a) (𝓝 lga)\nhfb : Tendsto f (𝓝[Iio b] b) (𝓝 lfb)\nhgb : Tendsto g (𝓝[Iio b] b) (𝓝 lgb)\nh : ℝ → ℝ := fun x => (lgb - lga) * f x - (lfb - lfa) * g x\nhha : Tendsto h (𝓝[Ioi a] a) (𝓝 (lgb * lfa - lfb * lga))\nhhb : Tendsto h (𝓝[Iio b] b) (𝓝 (lgb * lfa - lfb * lga))\nh' : ℝ → ℝ := fun x => (lgb - lga) * f' x - (lfb - lfa) * g' x\n⊢ ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt h (h' x) x\n[PROOFSTEP]\nintro x hx\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf f' : ℝ → ℝ\na b : ℝ\nhab : a < b\nhfc : ContinuousOn f (Icc a b)\nhff'✝ : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhfd : DifferentiableOn ℝ f (Ioo a b)\ng g' : ℝ → ℝ\nhgc : ContinuousOn g (Icc a b)\nhgg'✝ : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhgd : DifferentiableOn ℝ g (Ioo a b)\nlfa lga lfb lgb : ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhfa : Tendsto f (𝓝[Ioi a] a) (𝓝 lfa)\nhga : Tendsto g (𝓝[Ioi a] a) (𝓝 lga)\nhfb : Tendsto f (𝓝[Iio b] b) (𝓝 lfb)\nhgb : Tendsto g (𝓝[Iio b] b) (𝓝 lgb)\nh : ℝ → ℝ := fun x => (lgb - lga) * f x - (lfb - lfa) * g x\nhha : Tendsto h (𝓝[Ioi a] a) (𝓝 (lgb * lfa - lfb * lga))\nhhb : Tendsto h (𝓝[Iio b] b) (𝓝 (lgb * lfa - lfb * lga))\nh' : ℝ → ℝ := fun x => (lgb - lga) * f' x - (lfb - lfa) * g' x\nx : ℝ\nhx : x ∈ Ioo a b\n⊢ HasDerivAt h (h' x) x\n[PROOFSTEP]\nexact ((hff' x hx).const_mul _).sub ((hgg' x hx).const_mul _)\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf f' : ℝ → ℝ\na b : ℝ\nhab : a < b\nhfc : ContinuousOn f (Icc a b)\nhff'✝ : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhfd : DifferentiableOn ℝ f (Ioo a b)\ng g' : ℝ → ℝ\nhgc : ContinuousOn g (Icc a b)\nhgg'✝ : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhgd : DifferentiableOn ℝ g (Ioo a b)\nlfa lga lfb lgb : ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhfa : Tendsto f (𝓝[Ioi a] a) (𝓝 lfa)\nhga : Tendsto g (𝓝[Ioi a] a) (𝓝 lga)\nhfb : Tendsto f (𝓝[Iio b] b) (𝓝 lfb)\nhgb : Tendsto g (𝓝[Iio b] b) (𝓝 lgb)\nh : ℝ → ℝ := fun x => (lgb - lga) * f x - (lfb - lfa) * g x\nhha : Tendsto h (𝓝[Ioi a] a) (𝓝 (lgb * lfa - lfb * lga))\nhhb : Tendsto h (𝓝[Iio b] b) (𝓝 (lgb * lfa - lfb * lga))\nh' : ℝ → ℝ := fun x => (lgb - lga) * f' x - (lfb - lfa) * g' x\nhhh' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt h (h' x) x\n⊢ ∃ c, c ∈ Ioo a b ∧ (lgb - lga) * f' c = (lfb - lfa) * g' c\n[PROOFSTEP]\nrcases exists_hasDerivAt_eq_zero' hab hha hhb hhh' with ⟨c, cmem, hc⟩\n[GOAL]\ncase intro.intro\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf f' : ℝ → ℝ\na b : ℝ\nhab : a < b\nhfc : ContinuousOn f (Icc a b)\nhff'✝ : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhfd : DifferentiableOn ℝ f (Ioo a b)\ng g' : ℝ → ℝ\nhgc : ContinuousOn g (Icc a b)\nhgg'✝ : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhgd : DifferentiableOn ℝ g (Ioo a b)\nlfa lga lfb lgb : ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhfa : Tendsto f (𝓝[Ioi a] a) (𝓝 lfa)\nhga : Tendsto g (𝓝[Ioi a] a) (𝓝 lga)\nhfb : Tendsto f (𝓝[Iio b] b) (𝓝 lfb)\nhgb : Tendsto g (𝓝[Iio b] b) (𝓝 lgb)\nh : ℝ → ℝ := fun x => (lgb - lga) * f x - (lfb - lfa) * g x\nhha : Tendsto h (𝓝[Ioi a] a) (𝓝 (lgb * lfa - lfb * lga))\nhhb : Tendsto h (𝓝[Iio b] b) (𝓝 (lgb * lfa - lfb * lga))\nh' : ℝ → ℝ := fun x => (lgb - lga) * f' x - (lfb - lfa) * g' x\nhhh' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt h (h' x) x\nc : ℝ\ncmem : c ∈ Ioo a b\nhc : h' c = 0\n⊢ ∃ c, c ∈ Ioo a b ∧ (lgb - lga) * f' c = (lfb - lfa) * g' c\n[PROOFSTEP]\nexact ⟨c, cmem, sub_eq_zero.1 hc⟩\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf f' : ℝ → ℝ\na b : ℝ\nhab : a < b\nhfc : ContinuousOn f (Icc a b)\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhfd : DifferentiableOn ℝ f (Ioo a b)\ng g' : ℝ → ℝ\nhgc : ContinuousOn g (Icc a b)\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhgd : DifferentiableOn ℝ g (Ioo a b)\n⊢ ∃ c, c ∈ Ioo a b ∧ f' c = (f b - f a) / (b - a)\n[PROOFSTEP]\nobtain ⟨c, cmem, hc⟩ : ∃ c ∈ Ioo a b, (b - a) * f' c = (f b - f a) * 1 :=\n  exists_ratio_hasDerivAt_eq_ratio_slope f f' hab hfc hff' id 1 continuousOn_id fun x _ => hasDerivAt_id x\n[GOAL]\ncase intro.intro\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf f' : ℝ → ℝ\na b : ℝ\nhab : a < b\nhfc : ContinuousOn f (Icc a b)\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhfd : DifferentiableOn ℝ f (Ioo a b)\ng g' : ℝ → ℝ\nhgc : ContinuousOn g (Icc a b)\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhgd : DifferentiableOn ℝ g (Ioo a b)\nc : ℝ\ncmem : c ∈ Ioo a b\nhc : (b - a) * f' c = (f b - f a) * 1\n⊢ ∃ c, c ∈ Ioo a b ∧ f' c = (f b - f a) / (b - a)\n[PROOFSTEP]\nuse c, cmem\n[GOAL]\ncase right\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf f' : ℝ → ℝ\na b : ℝ\nhab : a < b\nhfc : ContinuousOn f (Icc a b)\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhfd : DifferentiableOn ℝ f (Ioo a b)\ng g' : ℝ → ℝ\nhgc : ContinuousOn g (Icc a b)\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhgd : DifferentiableOn ℝ g (Ioo a b)\nc : ℝ\ncmem : c ∈ Ioo a b\nhc : (b - a) * f' c = (f b - f a) * 1\n⊢ f' c = (f b - f a) / (b - a)\n[PROOFSTEP]\nrwa [mul_one, mul_comm, ← eq_div_iff (sub_ne_zero.2 hab.ne')] at hc \n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nD : Set ℝ\nhD : Convex ℝ D\nf : ℝ → ℝ\nhf : ContinuousOn f D\nhf' : DifferentiableOn ℝ f (interior D)\nC : (fun x => ℝ) 1\nhf'_gt : ∀ (x : ℝ), x ∈ interior D → C < deriv f x\n⊢ ∀ (x : ℝ), x ∈ D → ∀ (y : ℝ), y ∈ D → x < y → C * (y - x) < f y - f x\n[PROOFSTEP]\nintro x hx y hy hxy\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nD : Set ℝ\nhD : Convex ℝ D\nf : ℝ → ℝ\nhf : ContinuousOn f D\nhf' : DifferentiableOn ℝ f (interior D)\nC : (fun x => ℝ) 1\nhf'_gt : ∀ (x : ℝ), x ∈ interior D → C < deriv f x\nx : ℝ\nhx : x ∈ D\ny : ℝ\nhy : y ∈ D\nhxy : x < y\n⊢ C * (y - x) < f y - f x\n[PROOFSTEP]\nhave hxyD : Icc x y ⊆ D := hD.ordConnected.out hx hy\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nD : Set ℝ\nhD : Convex ℝ D\nf : ℝ → ℝ\nhf : ContinuousOn f D\nhf' : DifferentiableOn ℝ f (interior D)\nC : (fun x => ℝ) 1\nhf'_gt : ∀ (x : ℝ), x ∈ interior D → C < deriv f x\nx : ℝ\nhx : x ∈ D\ny : ℝ\nhy : y ∈ D\nhxy : x < y\nhxyD : Icc x y ⊆ D\n⊢ C * (y - x) < f y - f x\n[PROOFSTEP]\nhave hxyD' : Ioo x y ⊆ interior D := subset_sUnion_of_mem ⟨isOpen_Ioo, Ioo_subset_Icc_self.trans hxyD⟩\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nD : Set ℝ\nhD : Convex ℝ D\nf : ℝ → ℝ\nhf : ContinuousOn f D\nhf' : DifferentiableOn ℝ f (interior D)\nC : (fun x => ℝ) 1\nhf'_gt : ∀ (x : ℝ), x ∈ interior D → C < deriv f x\nx : ℝ\nhx : x ∈ D\ny : ℝ\nhy : y ∈ D\nhxy : x < y\nhxyD : Icc x y ⊆ D\nhxyD' : Ioo x y ⊆ interior D\n⊢ C * (y - x) < f y - f x\n[PROOFSTEP]\nobtain ⟨a, a_mem, ha⟩ : ∃ a ∈ Ioo x y, deriv f a = (f y - f x) / (y - x) :=\n  exists_deriv_eq_slope f hxy (hf.mono hxyD) (hf'.mono hxyD')\n[GOAL]\ncase intro.intro\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nD : Set ℝ\nhD : Convex ℝ D\nf : ℝ → ℝ\nhf : ContinuousOn f D\nhf' : DifferentiableOn ℝ f (interior D)\nC : (fun x => ℝ) 1\nhf'_gt : ∀ (x : ℝ), x ∈ interior D → C < deriv f x\nx : ℝ\nhx : x ∈ D\ny : ℝ\nhy : y ∈ D\nhxy : x < y\nhxyD : Icc x y ⊆ D\nhxyD' : Ioo x y ⊆ interior D\na : ℝ\na_mem : a ∈ Ioo x y\nha : deriv f a = (f y - f x) / (y - x)\n⊢ C * (y - x) < f y - f x\n[PROOFSTEP]\nhave : C < (f y - f x) / (y - x) := ha ▸ hf'_gt _ (hxyD' a_mem)\n[GOAL]\ncase intro.intro\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nD : Set ℝ\nhD : Convex ℝ D\nf : ℝ → ℝ\nhf : ContinuousOn f D\nhf' : DifferentiableOn ℝ f (interior D)\nC : (fun x => ℝ) 1\nhf'_gt : ∀ (x : ℝ), x ∈ interior D → C < deriv f x\nx : ℝ\nhx : x ∈ D\ny : ℝ\nhy : y ∈ D\nhxy : x < y\nhxyD : Icc x y ⊆ D\nhxyD' : Ioo x y ⊆ interior D\na : ℝ\na_mem : a ∈ Ioo x y\nha : deriv f a = (f y - f x) / (y - x)\nthis : C < (f y - f x) / (y - x)\n⊢ C * (y - x) < f y - f x\n[PROOFSTEP]\nexact (lt_div_iff (sub_pos.2 hxy)).1 this\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nD : Set ℝ\nhD : Convex ℝ D\nf : ℝ → ℝ\nhf : ContinuousOn f D\nhf' : DifferentiableOn ℝ f (interior D)\nC : (fun x => ℝ) 1\nhf'_ge : ∀ (x : ℝ), x ∈ interior D → C ≤ deriv f x\n⊢ ∀ (x : ℝ), x ∈ D → ∀ (y : ℝ), y ∈ D → x ≤ y → C * (y - x) ≤ f y - f x\n[PROOFSTEP]\nintro x hx y hy hxy\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nD : Set ℝ\nhD : Convex ℝ D\nf : ℝ → ℝ\nhf : ContinuousOn f D\nhf' : DifferentiableOn ℝ f (interior D)\nC : (fun x => ℝ) 1\nhf'_ge : ∀ (x : ℝ), x ∈ interior D → C ≤ deriv f x\nx : ℝ\nhx : x ∈ D\ny : ℝ\nhy : y ∈ D\nhxy : x ≤ y\n⊢ C * (y - x) ≤ f y - f x\n[PROOFSTEP]\ncases' eq_or_lt_of_le hxy with hxy' hxy'\n[GOAL]\ncase inl\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nD : Set ℝ\nhD : Convex ℝ D\nf : ℝ → ℝ\nhf : ContinuousOn f D\nhf' : DifferentiableOn ℝ f (interior D)\nC : (fun x => ℝ) 1\nhf'_ge : ∀ (x : ℝ), x ∈ interior D → C ≤ deriv f x\nx : ℝ\nhx : x ∈ D\ny : ℝ\nhy : y ∈ D\nhxy : x ≤ y\nhxy' : x = y\n⊢ C * (y - x) ≤ f y - f x\n[PROOFSTEP]\nrw [hxy', sub_self, sub_self, mul_zero]\n[GOAL]\ncase inr\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nD : Set ℝ\nhD : Convex ℝ D\nf : ℝ → ℝ\nhf : ContinuousOn f D\nhf' : DifferentiableOn ℝ f (interior D)\nC : (fun x => ℝ) 1\nhf'_ge : ∀ (x : ℝ), x ∈ interior D → C ≤ deriv f x\nx : ℝ\nhx : x ∈ D\ny : ℝ\nhy : y ∈ D\nhxy : x ≤ y\nhxy' : x < y\n⊢ C * (y - x) ≤ f y - f x\n[PROOFSTEP]\nhave hxyD : Icc x y ⊆ D := hD.ordConnected.out hx hy\n[GOAL]\ncase inr\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nD : Set ℝ\nhD : Convex ℝ D\nf : ℝ → ℝ\nhf : ContinuousOn f D\nhf' : DifferentiableOn ℝ f (interior D)\nC : (fun x => ℝ) 1\nhf'_ge : ∀ (x : ℝ), x ∈ interior D → C ≤ deriv f x\nx : ℝ\nhx : x ∈ D\ny : ℝ\nhy : y ∈ D\nhxy : x ≤ y\nhxy' : x < y\nhxyD : Icc x y ⊆ D\n⊢ C * (y - x) ≤ f y - f x\n[PROOFSTEP]\nhave hxyD' : Ioo x y ⊆ interior D := subset_sUnion_of_mem ⟨isOpen_Ioo, Ioo_subset_Icc_self.trans hxyD⟩\n[GOAL]\ncase inr\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nD : Set ℝ\nhD : Convex ℝ D\nf : ℝ → ℝ\nhf : ContinuousOn f D\nhf' : DifferentiableOn ℝ f (interior D)\nC : (fun x => ℝ) 1\nhf'_ge : ∀ (x : ℝ), x ∈ interior D → C ≤ deriv f x\nx : ℝ\nhx : x ∈ D\ny : ℝ\nhy : y ∈ D\nhxy : x ≤ y\nhxy' : x < y\nhxyD : Icc x y ⊆ D\nhxyD' : Ioo x y ⊆ interior D\n⊢ C * (y - x) ≤ f y - f x\n[PROOFSTEP]\nobtain ⟨a, a_mem, ha⟩ : ∃ a ∈ Ioo x y, deriv f a = (f y - f x) / (y - x)\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nD : Set ℝ\nhD : Convex ℝ D\nf : ℝ → ℝ\nhf : ContinuousOn f D\nhf' : DifferentiableOn ℝ f (interior D)\nC : (fun x => ℝ) 1\nhf'_ge : ∀ (x : ℝ), x ∈ interior D → C ≤ deriv f x\nx : ℝ\nhx : x ∈ D\ny : ℝ\nhy : y ∈ D\nhxy : x ≤ y\nhxy' : x < y\nhxyD : Icc x y ⊆ D\nhxyD' : Ioo x y ⊆ interior D\n⊢ ∃ a, a ∈ Ioo x y ∧ deriv f a = (f y - f x) / (y - x)\ncase inr.intro.intro\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nD : Set ℝ\nhD : Convex ℝ D\nf : ℝ → ℝ\nhf : ContinuousOn f D\nhf' : DifferentiableOn ℝ f (interior D)\nC : (fun x => ℝ) 1\nhf'_ge : ∀ (x : ℝ), x ∈ interior D → C ≤ deriv f x\nx : ℝ\nhx : x ∈ D\ny : ℝ\nhy : y ∈ D\nhxy : x ≤ y\nhxy' : x < y\nhxyD : Icc x y ⊆ D\nhxyD' : Ioo x y ⊆ interior D\na : ℝ\na_mem : a ∈ Ioo x y\nha : deriv f a = (f y - f x) / (y - x)\n⊢ C * (y - x) ≤ f y - f x\n[PROOFSTEP]\nexact exists_deriv_eq_slope f hxy' (hf.mono hxyD) (hf'.mono hxyD')\n[GOAL]\ncase inr.intro.intro\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nD : Set ℝ\nhD : Convex ℝ D\nf : ℝ → ℝ\nhf : ContinuousOn f D\nhf' : DifferentiableOn ℝ f (interior D)\nC : (fun x => ℝ) 1\nhf'_ge : ∀ (x : ℝ), x ∈ interior D → C ≤ deriv f x\nx : ℝ\nhx : x ∈ D\ny : ℝ\nhy : y ∈ D\nhxy : x ≤ y\nhxy' : x < y\nhxyD : Icc x y ⊆ D\nhxyD' : Ioo x y ⊆ interior D\na : ℝ\na_mem : a ∈ Ioo x y\nha : deriv f a = (f y - f x) / (y - x)\n⊢ C * (y - x) ≤ f y - f x\n[PROOFSTEP]\nhave : C ≤ (f y - f x) / (y - x) := ha ▸ hf'_ge _ (hxyD' a_mem)\n[GOAL]\ncase inr.intro.intro\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nD : Set ℝ\nhD : Convex ℝ D\nf : ℝ → ℝ\nhf : ContinuousOn f D\nhf' : DifferentiableOn ℝ f (interior D)\nC : (fun x => ℝ) 1\nhf'_ge : ∀ (x : ℝ), x ∈ interior D → C ≤ deriv f x\nx : ℝ\nhx : x ∈ D\ny : ℝ\nhy : y ∈ D\nhxy : x ≤ y\nhxy' : x < y\nhxyD : Icc x y ⊆ D\nhxyD' : Ioo x y ⊆ interior D\na : ℝ\na_mem : a ∈ Ioo x y\nha : deriv f a = (f y - f x) / (y - x)\nthis : C ≤ (f y - f x) / (y - x)\n⊢ C * (y - x) ≤ f y - f x\n[PROOFSTEP]\nexact (le_div_iff (sub_pos.2 hxy')).1 this\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nD : Set ℝ\nhD : Convex ℝ D\nf : ℝ → ℝ\nhf : ContinuousOn f D\nhf' : DifferentiableOn ℝ f (interior D)\nC : (fun x => ℝ) 1\nlt_hf' : ∀ (x : ℝ), x ∈ interior D → deriv f x < C\nx✝ : ℝ\nhx✝ : x✝ ∈ D\ny : ℝ\nhy : y ∈ D\nhxy : x✝ < y\nx : ℝ\nhx : x ∈ interior D\n⊢ -C < deriv (fun y => -f y) x\n[PROOFSTEP]\nrw [deriv.neg, neg_lt_neg_iff]\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nD : Set ℝ\nhD : Convex ℝ D\nf : ℝ → ℝ\nhf : ContinuousOn f D\nhf' : DifferentiableOn ℝ f (interior D)\nC : (fun x => ℝ) 1\nlt_hf' : ∀ (x : ℝ), x ∈ interior D → deriv f x < C\nx✝ : ℝ\nhx✝ : x✝ ∈ D\ny : ℝ\nhy : y ∈ D\nhxy : x✝ < y\nx : ℝ\nhx : x ∈ interior D\n⊢ deriv (fun y => f y) x < C\n[PROOFSTEP]\nexact lt_hf' x hx\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nD : Set ℝ\nhD : Convex ℝ D\nf : ℝ → ℝ\nhf : ContinuousOn f D\nhf' : DifferentiableOn ℝ f (interior D)\nC : (fun x => ℝ) 1\nlt_hf' : ∀ (x : ℝ), x ∈ interior D → deriv f x < C\nx : ℝ\nhx : x ∈ D\ny : ℝ\nhy : y ∈ D\nhxy : x < y\nhf'_gt : ∀ (x : ℝ), x ∈ interior D → -C < deriv (fun y => -f y) x\n⊢ f y - f x < C * (y - x)\n[PROOFSTEP]\nlinarith [hD.mul_sub_lt_image_sub_of_lt_deriv hf.neg hf'.neg hf'_gt x hx y hy hxy]\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nD : Set ℝ\nhD : Convex ℝ D\nf : ℝ → ℝ\nhf : ContinuousOn f D\nhf' : DifferentiableOn ℝ f (interior D)\nC : (fun x => ℝ) 1\nle_hf' : ∀ (x : ℝ), x ∈ interior D → deriv f x ≤ C\nx✝ : ℝ\nhx✝ : x✝ ∈ D\ny : ℝ\nhy : y ∈ D\nhxy : x✝ ≤ y\nx : ℝ\nhx : x ∈ interior D\n⊢ -C ≤ deriv (fun y => -f y) x\n[PROOFSTEP]\nrw [deriv.neg, neg_le_neg_iff]\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nD : Set ℝ\nhD : Convex ℝ D\nf : ℝ → ℝ\nhf : ContinuousOn f D\nhf' : DifferentiableOn ℝ f (interior D)\nC : (fun x => ℝ) 1\nle_hf' : ∀ (x : ℝ), x ∈ interior D → deriv f x ≤ C\nx✝ : ℝ\nhx✝ : x✝ ∈ D\ny : ℝ\nhy : y ∈ D\nhxy : x✝ ≤ y\nx : ℝ\nhx : x ∈ interior D\n⊢ deriv (fun y => f y) x ≤ C\n[PROOFSTEP]\nexact le_hf' x hx\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nD : Set ℝ\nhD : Convex ℝ D\nf : ℝ → ℝ\nhf : ContinuousOn f D\nhf' : DifferentiableOn ℝ f (interior D)\nC : (fun x => ℝ) 1\nle_hf' : ∀ (x : ℝ), x ∈ interior D → deriv f x ≤ C\nx : ℝ\nhx : x ∈ D\ny : ℝ\nhy : y ∈ D\nhxy : x ≤ y\nhf'_ge : ∀ (x : ℝ), x ∈ interior D → -C ≤ deriv (fun y => -f y) x\n⊢ f y - f x ≤ C * (y - x)\n[PROOFSTEP]\nlinarith [hD.mul_sub_le_image_sub_of_le_deriv hf.neg hf'.neg hf'_ge x hx y hy hxy]\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nD : Set ℝ\nhD : Convex ℝ D\nf : ℝ → ℝ\nhf : ContinuousOn f D\nhf' : ∀ (x : ℝ), x ∈ interior D → 0 < deriv f x\n⊢ StrictMonoOn f D\n[PROOFSTEP]\nintro x hx y hy\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nD : Set ℝ\nhD : Convex ℝ D\nf : ℝ → ℝ\nhf : ContinuousOn f D\nhf' : ∀ (x : ℝ), x ∈ interior D → 0 < deriv f x\nx : ℝ\nhx : x ∈ D\ny : ℝ\nhy : y ∈ D\n⊢ x < y → f x < f y\n[PROOFSTEP]\nhave : DifferentiableOn ℝ f (interior D) := fun z hz =>\n  (differentiableAt_of_deriv_ne_zero (hf' z hz).ne').differentiableWithinAt\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nD : Set ℝ\nhD : Convex ℝ D\nf : ℝ → ℝ\nhf : ContinuousOn f D\nhf' : ∀ (x : ℝ), x ∈ interior D → 0 < deriv f x\nx : ℝ\nhx : x ∈ D\ny : ℝ\nhy : y ∈ D\nthis : DifferentiableOn ℝ f (interior D)\n⊢ x < y → f x < f y\n[PROOFSTEP]\nsimpa only [zero_mul, sub_pos] using hD.mul_sub_lt_image_sub_of_lt_deriv hf this hf' x hx y hy\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nD : Set ℝ\nhD : Convex ℝ D\nf : ℝ → ℝ\nhf : ContinuousOn f D\nhf' : DifferentiableOn ℝ f (interior D)\nhf'_nonneg : ∀ (x : ℝ), x ∈ interior D → 0 ≤ deriv f x\nx : ℝ\nhx : x ∈ D\ny : ℝ\nhy : y ∈ D\nhxy : x ≤ y\n⊢ f x ≤ f y\n[PROOFSTEP]\nsimpa only [zero_mul, sub_nonneg] using hD.mul_sub_le_image_sub_of_le_deriv hf hf' hf'_nonneg x hx y hy hxy\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nD : Set ℝ\nhD : Convex ℝ D\nf : ℝ → ℝ\nhf : ContinuousOn f D\nhf' : ∀ (x : ℝ), x ∈ interior D → deriv f x < 0\nx : ℝ\nhx : x ∈ D\ny : ℝ\n⊢ y ∈ D → x < y → f y < f x\n[PROOFSTEP]\nsimpa only [zero_mul, sub_lt_zero] using\n  hD.image_sub_lt_mul_sub_of_deriv_lt hf\n    (fun z hz => (differentiableAt_of_deriv_ne_zero (hf' z hz).ne).differentiableWithinAt) hf' x hx y\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nD : Set ℝ\nhD : Convex ℝ D\nf : ℝ → ℝ\nhf : ContinuousOn f D\nhf' : DifferentiableOn ℝ f (interior D)\nhf'_nonpos : ∀ (x : ℝ), x ∈ interior D → deriv f x ≤ 0\nx : ℝ\nhx : x ∈ D\ny : ℝ\nhy : y ∈ D\nhxy : x ≤ y\n⊢ f y ≤ f x\n[PROOFSTEP]\nsimpa only [zero_mul, sub_nonpos] using hD.image_sub_le_mul_sub_of_deriv_le hf hf' hf'_nonpos x hx y hy hxy\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nD : Set ℝ\nhD : Convex ℝ D\nf : ℝ → ℝ\nhf : ContinuousOn f D\nhf' : DifferentiableOn ℝ f (interior D)\nhf'_mono : MonotoneOn (deriv f) (interior D)\n⊢ ∀ {x y z : ℝ}, x ∈ D → z ∈ D → x < y → y < z → (f y - f x) / (y - x) ≤ (f z - f y) / (z - y)\n[PROOFSTEP]\nintro x y z hx hz hxy hyz\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nD : Set ℝ\nhD : Convex ℝ D\nf : ℝ → ℝ\nhf : ContinuousOn f D\nhf' : DifferentiableOn ℝ f (interior D)\nhf'_mono : MonotoneOn (deriv f) (interior D)\nx y z : ℝ\nhx : x ∈ D\nhz : z ∈ D\nhxy : x < y\nhyz : y < z\n⊢ (f y - f x) / (y - x) ≤ (f z - f y) / (z - y)\n[PROOFSTEP]\nhave hxzD : Icc x z ⊆ D := hD.ordConnected.out hx hz\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nD : Set ℝ\nhD : Convex ℝ D\nf : ℝ → ℝ\nhf : ContinuousOn f D\nhf' : DifferentiableOn ℝ f (interior D)\nhf'_mono : MonotoneOn (deriv f) (interior D)\nx y z : ℝ\nhx : x ∈ D\nhz : z ∈ D\nhxy : x < y\nhyz : y < z\nhxzD : Icc x z ⊆ D\n⊢ (f y - f x) / (y - x) ≤ (f z - f y) / (z - y)\n[PROOFSTEP]\nhave hxyD : Icc x y ⊆ D := (Icc_subset_Icc_right hyz.le).trans hxzD\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nD : Set ℝ\nhD : Convex ℝ D\nf : ℝ → ℝ\nhf : ContinuousOn f D\nhf' : DifferentiableOn ℝ f (interior D)\nhf'_mono : MonotoneOn (deriv f) (interior D)\nx y z : ℝ\nhx : x ∈ D\nhz : z ∈ D\nhxy : x < y\nhyz : y < z\nhxzD : Icc x z ⊆ D\nhxyD : Icc x y ⊆ D\n⊢ (f y - f x) / (y - x) ≤ (f z - f y) / (z - y)\n[PROOFSTEP]\nhave hxyD' : Ioo x y ⊆ interior D := subset_sUnion_of_mem ⟨isOpen_Ioo, Ioo_subset_Icc_self.trans hxyD⟩\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nD : Set ℝ\nhD : Convex ℝ D\nf : ℝ → ℝ\nhf : ContinuousOn f D\nhf' : DifferentiableOn ℝ f (interior D)\nhf'_mono : MonotoneOn (deriv f) (interior D)\nx y z : ℝ\nhx : x ∈ D\nhz : z ∈ D\nhxy : x < y\nhyz : y < z\nhxzD : Icc x z ⊆ D\nhxyD : Icc x y ⊆ D\nhxyD' : Ioo x y ⊆ interior D\n⊢ (f y - f x) / (y - x) ≤ (f z - f y) / (z - y)\n[PROOFSTEP]\nhave hyzD : Icc y z ⊆ D := (Icc_subset_Icc_left hxy.le).trans hxzD\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nD : Set ℝ\nhD : Convex ℝ D\nf : ℝ → ℝ\nhf : ContinuousOn f D\nhf' : DifferentiableOn ℝ f (interior D)\nhf'_mono : MonotoneOn (deriv f) (interior D)\nx y z : ℝ\nhx : x ∈ D\nhz : z ∈ D\nhxy : x < y\nhyz : y < z\nhxzD : Icc x z ⊆ D\nhxyD : Icc x y ⊆ D\nhxyD' : Ioo x y ⊆ interior D\nhyzD : Icc y z ⊆ D\n⊢ (f y - f x) / (y - x) ≤ (f z - f y) / (z - y)\n[PROOFSTEP]\nhave hyzD' : Ioo y z ⊆ interior D :=\n  subset_sUnion_of_mem\n    ⟨isOpen_Ioo, Ioo_subset_Icc_self.trans hyzD⟩\n      -- Then we apply MVT to both `[x, y]` and `[y, z]`\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nD : Set ℝ\nhD : Convex ℝ D\nf : ℝ → ℝ\nhf : ContinuousOn f D\nhf' : DifferentiableOn ℝ f (interior D)\nhf'_mono : MonotoneOn (deriv f) (interior D)\nx y z : ℝ\nhx : x ∈ D\nhz : z ∈ D\nhxy : x < y\nhyz : y < z\nhxzD : Icc x z ⊆ D\nhxyD : Icc x y ⊆ D\nhxyD' : Ioo x y ⊆ interior D\nhyzD : Icc y z ⊆ D\nhyzD' : Ioo y z ⊆ interior D\n⊢ (f y - f x) / (y - x) ≤ (f z - f y) / (z - y)\n[PROOFSTEP]\nobtain ⟨a, ⟨hxa, hay⟩, ha⟩ : ∃ a ∈ Ioo x y, deriv f a = (f y - f x) / (y - x)\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nD : Set ℝ\nhD : Convex ℝ D\nf : ℝ → ℝ\nhf : ContinuousOn f D\nhf' : DifferentiableOn ℝ f (interior D)\nhf'_mono : MonotoneOn (deriv f) (interior D)\nx y z : ℝ\nhx : x ∈ D\nhz : z ∈ D\nhxy : x < y\nhyz : y < z\nhxzD : Icc x z ⊆ D\nhxyD : Icc x y ⊆ D\nhxyD' : Ioo x y ⊆ interior D\nhyzD : Icc y z ⊆ D\nhyzD' : Ioo y z ⊆ interior D\n⊢ ∃ a, a ∈ Ioo x y ∧ deriv f a = (f y - f x) / (y - x)\ncase intro.intro.intro\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nD : Set ℝ\nhD : Convex ℝ D\nf : ℝ → ℝ\nhf : ContinuousOn f D\nhf' : DifferentiableOn ℝ f (interior D)\nhf'_mono : MonotoneOn (deriv f) (interior D)\nx y z : ℝ\nhx : x ∈ D\nhz : z ∈ D\nhxy : x < y\nhyz : y < z\nhxzD : Icc x z ⊆ D\nhxyD : Icc x y ⊆ D\nhxyD' : Ioo x y ⊆ interior D\nhyzD : Icc y z ⊆ D\nhyzD' : Ioo y z ⊆ interior D\na : ℝ\nha : deriv f a = (f y - f x) / (y - x)\nhxa : x < a\nhay : a < y\n⊢ (f y - f x) / (y - x) ≤ (f z - f y) / (z - y)\n[PROOFSTEP]\nexact exists_deriv_eq_slope f hxy (hf.mono hxyD) (hf'.mono hxyD')\n[GOAL]\ncase intro.intro.intro\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nD : Set ℝ\nhD : Convex ℝ D\nf : ℝ → ℝ\nhf : ContinuousOn f D\nhf' : DifferentiableOn ℝ f (interior D)\nhf'_mono : MonotoneOn (deriv f) (interior D)\nx y z : ℝ\nhx : x ∈ D\nhz : z ∈ D\nhxy : x < y\nhyz : y < z\nhxzD : Icc x z ⊆ D\nhxyD : Icc x y ⊆ D\nhxyD' : Ioo x y ⊆ interior D\nhyzD : Icc y z ⊆ D\nhyzD' : Ioo y z ⊆ interior D\na : ℝ\nha : deriv f a = (f y - f x) / (y - x)\nhxa : x < a\nhay : a < y\n⊢ (f y - f x) / (y - x) ≤ (f z - f y) / (z - y)\n[PROOFSTEP]\nobtain ⟨b, ⟨hyb, hbz⟩, hb⟩ : ∃ b ∈ Ioo y z, deriv f b = (f z - f y) / (z - y)\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nD : Set ℝ\nhD : Convex ℝ D\nf : ℝ → ℝ\nhf : ContinuousOn f D\nhf' : DifferentiableOn ℝ f (interior D)\nhf'_mono : MonotoneOn (deriv f) (interior D)\nx y z : ℝ\nhx : x ∈ D\nhz : z ∈ D\nhxy : x < y\nhyz : y < z\nhxzD : Icc x z ⊆ D\nhxyD : Icc x y ⊆ D\nhxyD' : Ioo x y ⊆ interior D\nhyzD : Icc y z ⊆ D\nhyzD' : Ioo y z ⊆ interior D\na : ℝ\nha : deriv f a = (f y - f x) / (y - x)\nhxa : x < a\nhay : a < y\n⊢ ∃ b, b ∈ Ioo y z ∧ deriv f b = (f z - f y) / (z - y)\ncase intro.intro.intro.intro.intro.intro\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nD : Set ℝ\nhD : Convex ℝ D\nf : ℝ → ℝ\nhf : ContinuousOn f D\nhf' : DifferentiableOn ℝ f (interior D)\nhf'_mono : MonotoneOn (deriv f) (interior D)\nx y z : ℝ\nhx : x ∈ D\nhz : z ∈ D\nhxy : x < y\nhyz : y < z\nhxzD : Icc x z ⊆ D\nhxyD : Icc x y ⊆ D\nhxyD' : Ioo x y ⊆ interior D\nhyzD : Icc y z ⊆ D\nhyzD' : Ioo y z ⊆ interior D\na : ℝ\nha : deriv f a = (f y - f x) / (y - x)\nhxa : x < a\nhay : a < y\nb : ℝ\nhb : deriv f b = (f z - f y) / (z - y)\nhyb : y < b\nhbz : b < z\n⊢ (f y - f x) / (y - x) ≤ (f z - f y) / (z - y)\n[PROOFSTEP]\nexact exists_deriv_eq_slope f hyz (hf.mono hyzD) (hf'.mono hyzD')\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nD : Set ℝ\nhD : Convex ℝ D\nf : ℝ → ℝ\nhf : ContinuousOn f D\nhf' : DifferentiableOn ℝ f (interior D)\nhf'_mono : MonotoneOn (deriv f) (interior D)\nx y z : ℝ\nhx : x ∈ D\nhz : z ∈ D\nhxy : x < y\nhyz : y < z\nhxzD : Icc x z ⊆ D\nhxyD : Icc x y ⊆ D\nhxyD' : Ioo x y ⊆ interior D\nhyzD : Icc y z ⊆ D\nhyzD' : Ioo y z ⊆ interior D\na : ℝ\nha : deriv f a = (f y - f x) / (y - x)\nhxa : x < a\nhay : a < y\nb : ℝ\nhb : deriv f b = (f z - f y) / (z - y)\nhyb : y < b\nhbz : b < z\n⊢ (f y - f x) / (y - x) ≤ (f z - f y) / (z - y)\n[PROOFSTEP]\nrw [← ha, ← hb]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nD : Set ℝ\nhD : Convex ℝ D\nf : ℝ → ℝ\nhf : ContinuousOn f D\nhf' : DifferentiableOn ℝ f (interior D)\nhf'_mono : MonotoneOn (deriv f) (interior D)\nx y z : ℝ\nhx : x ∈ D\nhz : z ∈ D\nhxy : x < y\nhyz : y < z\nhxzD : Icc x z ⊆ D\nhxyD : Icc x y ⊆ D\nhxyD' : Ioo x y ⊆ interior D\nhyzD : Icc y z ⊆ D\nhyzD' : Ioo y z ⊆ interior D\na : ℝ\nha : deriv f a = (f y - f x) / (y - x)\nhxa : x < a\nhay : a < y\nb : ℝ\nhb : deriv f b = (f z - f y) / (z - y)\nhyb : y < b\nhbz : b < z\n⊢ deriv f a ≤ deriv f b\n[PROOFSTEP]\nexact hf'_mono (hxyD' ⟨hxa, hay⟩) (hyzD' ⟨hyb, hbz⟩) (hay.trans hyb).le\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nD : Set ℝ\nhD : Convex ℝ D\nf : ℝ → ℝ\nhf : ContinuousOn f D\nhf' : DifferentiableOn ℝ f (interior D)\nh_anti : AntitoneOn (deriv f) (interior D)\n⊢ MonotoneOn (deriv (-f)) (interior D)\n[PROOFSTEP]\nsimpa only [← deriv.neg] using h_anti.neg\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nx y : ℝ\nf : ℝ → ℝ\nhf : ContinuousOn f (Icc x y)\nhxy : x < y\nhf'_mono : StrictMonoOn (deriv f) (Ioo x y)\nh : ∀ (w : ℝ), w ∈ Ioo x y → deriv f w ≠ 0\n⊢ ∃ a, a ∈ Ioo x y ∧ (f y - f x) / (y - x) < deriv f a\n[PROOFSTEP]\nhave A : DifferentiableOn ℝ f (Ioo x y) := fun w wmem =>\n  (differentiableAt_of_deriv_ne_zero (h w wmem)).differentiableWithinAt\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nx y : ℝ\nf : ℝ → ℝ\nhf : ContinuousOn f (Icc x y)\nhxy : x < y\nhf'_mono : StrictMonoOn (deriv f) (Ioo x y)\nh : ∀ (w : ℝ), w ∈ Ioo x y → deriv f w ≠ 0\nA : DifferentiableOn ℝ f (Ioo x y)\n⊢ ∃ a, a ∈ Ioo x y ∧ (f y - f x) / (y - x) < deriv f a\n[PROOFSTEP]\nobtain ⟨a, ⟨hxa, hay⟩, ha⟩ : ∃ a ∈ Ioo x y, deriv f a = (f y - f x) / (y - x)\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nx y : ℝ\nf : ℝ → ℝ\nhf : ContinuousOn f (Icc x y)\nhxy : x < y\nhf'_mono : StrictMonoOn (deriv f) (Ioo x y)\nh : ∀ (w : ℝ), w ∈ Ioo x y → deriv f w ≠ 0\nA : DifferentiableOn ℝ f (Ioo x y)\n⊢ ∃ a, a ∈ Ioo x y ∧ deriv f a = (f y - f x) / (y - x)\ncase intro.intro.intro\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nx y : ℝ\nf : ℝ → ℝ\nhf : ContinuousOn f (Icc x y)\nhxy : x < y\nhf'_mono : StrictMonoOn (deriv f) (Ioo x y)\nh : ∀ (w : ℝ), w ∈ Ioo x y → deriv f w ≠ 0\nA : DifferentiableOn ℝ f (Ioo x y)\na : ℝ\nha : deriv f a = (f y - f x) / (y - x)\nhxa : x < a\nhay : a < y\n⊢ ∃ a, a ∈ Ioo x y ∧ (f y - f x) / (y - x) < deriv f a\n[PROOFSTEP]\nexact exists_deriv_eq_slope f hxy hf A\n[GOAL]\ncase intro.intro.intro\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nx y : ℝ\nf : ℝ → ℝ\nhf : ContinuousOn f (Icc x y)\nhxy : x < y\nhf'_mono : StrictMonoOn (deriv f) (Ioo x y)\nh : ∀ (w : ℝ), w ∈ Ioo x y → deriv f w ≠ 0\nA : DifferentiableOn ℝ f (Ioo x y)\na : ℝ\nha : deriv f a = (f y - f x) / (y - x)\nhxa : x < a\nhay : a < y\n⊢ ∃ a, a ∈ Ioo x y ∧ (f y - f x) / (y - x) < deriv f a\n[PROOFSTEP]\nrcases nonempty_Ioo.2 hay with ⟨b, ⟨hab, hby⟩⟩\n[GOAL]\ncase intro.intro.intro.intro.intro\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nx y : ℝ\nf : ℝ → ℝ\nhf : ContinuousOn f (Icc x y)\nhxy : x < y\nhf'_mono : StrictMonoOn (deriv f) (Ioo x y)\nh : ∀ (w : ℝ), w ∈ Ioo x y → deriv f w ≠ 0\nA : DifferentiableOn ℝ f (Ioo x y)\na : ℝ\nha : deriv f a = (f y - f x) / (y - x)\nhxa : x < a\nhay : a < y\nb : ℝ\nhab : a < b\nhby : b < y\n⊢ ∃ a, a ∈ Ioo x y ∧ (f y - f x) / (y - x) < deriv f a\n[PROOFSTEP]\nrefine' ⟨b, ⟨hxa.trans hab, hby⟩, _⟩\n[GOAL]\ncase intro.intro.intro.intro.intro\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nx y : ℝ\nf : ℝ → ℝ\nhf : ContinuousOn f (Icc x y)\nhxy : x < y\nhf'_mono : StrictMonoOn (deriv f) (Ioo x y)\nh : ∀ (w : ℝ), w ∈ Ioo x y → deriv f w ≠ 0\nA : DifferentiableOn ℝ f (Ioo x y)\na : ℝ\nha : deriv f a = (f y - f x) / (y - x)\nhxa : x < a\nhay : a < y\nb : ℝ\nhab : a < b\nhby : b < y\n⊢ (f y - f x) / (y - x) < deriv f b\n[PROOFSTEP]\nrw [← ha]\n[GOAL]\ncase intro.intro.intro.intro.intro\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nx y : ℝ\nf : ℝ → ℝ\nhf : ContinuousOn f (Icc x y)\nhxy : x < y\nhf'_mono : StrictMonoOn (deriv f) (Ioo x y)\nh : ∀ (w : ℝ), w ∈ Ioo x y → deriv f w ≠ 0\nA : DifferentiableOn ℝ f (Ioo x y)\na : ℝ\nha : deriv f a = (f y - f x) / (y - x)\nhxa : x < a\nhay : a < y\nb : ℝ\nhab : a < b\nhby : b < y\n⊢ deriv f a < deriv f b\n[PROOFSTEP]\nexact hf'_mono ⟨hxa, hay⟩ ⟨hxa.trans hab, hby⟩ hab\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nx y : ℝ\nf : ℝ → ℝ\nhf : ContinuousOn f (Icc x y)\nhxy : x < y\nhf'_mono : StrictMonoOn (deriv f) (Ioo x y)\n⊢ ∃ a, a ∈ Ioo x y ∧ (f y - f x) / (y - x) < deriv f a\n[PROOFSTEP]\nby_cases h : ∀ w ∈ Ioo x y, deriv f w ≠ 0\n[GOAL]\ncase pos\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nx y : ℝ\nf : ℝ → ℝ\nhf : ContinuousOn f (Icc x y)\nhxy : x < y\nhf'_mono : StrictMonoOn (deriv f) (Ioo x y)\nh : ∀ (w : ℝ), w ∈ Ioo x y → deriv f w ≠ 0\n⊢ ∃ a, a ∈ Ioo x y ∧ (f y - f x) / (y - x) < deriv f a\n[PROOFSTEP]\napply StrictMonoOn.exists_slope_lt_deriv_aux hf hxy hf'_mono h\n[GOAL]\ncase neg\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nx y : ℝ\nf : ℝ → ℝ\nhf : ContinuousOn f (Icc x y)\nhxy : x < y\nhf'_mono : StrictMonoOn (deriv f) (Ioo x y)\nh : ¬∀ (w : ℝ), w ∈ Ioo x y → deriv f w ≠ 0\n⊢ ∃ a, a ∈ Ioo x y ∧ (f y - f x) / (y - x) < deriv f a\n[PROOFSTEP]\npush_neg at h \n[GOAL]\ncase neg\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nx y : ℝ\nf : ℝ → ℝ\nhf : ContinuousOn f (Icc x y)\nhxy : x < y\nhf'_mono : StrictMonoOn (deriv f) (Ioo x y)\nh : ∃ w, w ∈ Ioo x y ∧ deriv f w = 0\n⊢ ∃ a, a ∈ Ioo x y ∧ (f y - f x) / (y - x) < deriv f a\n[PROOFSTEP]\nrcases h with ⟨w, ⟨hxw, hwy⟩, hw⟩\n[GOAL]\ncase neg.intro.intro.intro\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nx y : ℝ\nf : ℝ → ℝ\nhf : ContinuousOn f (Icc x y)\nhxy : x < y\nhf'_mono : StrictMonoOn (deriv f) (Ioo x y)\nw : ℝ\nhw : deriv f w = 0\nhxw : x < w\nhwy : w < y\n⊢ ∃ a, a ∈ Ioo x y ∧ (f y - f x) / (y - x) < deriv f a\n[PROOFSTEP]\nobtain ⟨a, ⟨hxa, haw⟩, ha⟩ : ∃ a ∈ Ioo x w, (f w - f x) / (w - x) < deriv f a :=\n  by\n  apply StrictMonoOn.exists_slope_lt_deriv_aux _ hxw _ _\n  · exact hf.mono (Icc_subset_Icc le_rfl hwy.le)\n  · exact hf'_mono.mono (Ioo_subset_Ioo le_rfl hwy.le)\n  · intro z hz\n    rw [← hw]\n    apply ne_of_lt\n    exact hf'_mono ⟨hz.1, hz.2.trans hwy⟩ ⟨hxw, hwy⟩ hz.2\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nx y : ℝ\nf : ℝ → ℝ\nhf : ContinuousOn f (Icc x y)\nhxy : x < y\nhf'_mono : StrictMonoOn (deriv f) (Ioo x y)\nw : ℝ\nhw : deriv f w = 0\nhxw : x < w\nhwy : w < y\n⊢ ∃ a, a ∈ Ioo x w ∧ (f w - f x) / (w - x) < deriv f a\n[PROOFSTEP]\napply StrictMonoOn.exists_slope_lt_deriv_aux _ hxw _ _\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nx y : ℝ\nf : ℝ → ℝ\nhf : ContinuousOn f (Icc x y)\nhxy : x < y\nhf'_mono : StrictMonoOn (deriv f) (Ioo x y)\nw : ℝ\nhw : deriv f w = 0\nhxw : x < w\nhwy : w < y\n⊢ ContinuousOn (fun w => f w) (Icc x w)\n[PROOFSTEP]\nexact hf.mono (Icc_subset_Icc le_rfl hwy.le)\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nx y : ℝ\nf : ℝ → ℝ\nhf : ContinuousOn f (Icc x y)\nhxy : x < y\nhf'_mono : StrictMonoOn (deriv f) (Ioo x y)\nw : ℝ\nhw : deriv f w = 0\nhxw : x < w\nhwy : w < y\n⊢ StrictMonoOn (deriv fun w => f w) (Ioo x w)\n[PROOFSTEP]\nexact hf'_mono.mono (Ioo_subset_Ioo le_rfl hwy.le)\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nx y : ℝ\nf : ℝ → ℝ\nhf : ContinuousOn f (Icc x y)\nhxy : x < y\nhf'_mono : StrictMonoOn (deriv f) (Ioo x y)\nw : ℝ\nhw : deriv f w = 0\nhxw : x < w\nhwy : w < y\n⊢ ∀ (w_1 : ℝ), w_1 ∈ Ioo x w → deriv (fun w => f w) w_1 ≠ 0\n[PROOFSTEP]\nintro z hz\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nx y : ℝ\nf : ℝ → ℝ\nhf : ContinuousOn f (Icc x y)\nhxy : x < y\nhf'_mono : StrictMonoOn (deriv f) (Ioo x y)\nw : ℝ\nhw : deriv f w = 0\nhxw : x < w\nhwy : w < y\nz : ℝ\nhz : z ∈ Ioo x w\n⊢ deriv (fun w => f w) z ≠ 0\n[PROOFSTEP]\nrw [← hw]\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nx y : ℝ\nf : ℝ → ℝ\nhf : ContinuousOn f (Icc x y)\nhxy : x < y\nhf'_mono : StrictMonoOn (deriv f) (Ioo x y)\nw : ℝ\nhw : deriv f w = 0\nhxw : x < w\nhwy : w < y\nz : ℝ\nhz : z ∈ Ioo x w\n⊢ deriv (fun w => f w) z ≠ deriv f w\n[PROOFSTEP]\napply ne_of_lt\n[GOAL]\ncase h\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nx y : ℝ\nf : ℝ → ℝ\nhf : ContinuousOn f (Icc x y)\nhxy : x < y\nhf'_mono : StrictMonoOn (deriv f) (Ioo x y)\nw : ℝ\nhw : deriv f w = 0\nhxw : x < w\nhwy : w < y\nz : ℝ\nhz : z ∈ Ioo x w\n⊢ deriv (fun w => f w) z < deriv f w\n[PROOFSTEP]\nexact hf'_mono ⟨hz.1, hz.2.trans hwy⟩ ⟨hxw, hwy⟩ hz.2\n[GOAL]\ncase neg.intro.intro.intro.intro.intro.intro\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nx y : ℝ\nf : ℝ → ℝ\nhf : ContinuousOn f (Icc x y)\nhxy : x < y\nhf'_mono : StrictMonoOn (deriv f) (Ioo x y)\nw : ℝ\nhw : deriv f w = 0\nhxw : x < w\nhwy : w < y\na : ℝ\nha : (f w - f x) / (w - x) < deriv f a\nhxa : x < a\nhaw : a < w\n⊢ ∃ a, a ∈ Ioo x y ∧ (f y - f x) / (y - x) < deriv f a\n[PROOFSTEP]\nobtain ⟨b, ⟨hwb, hby⟩, hb⟩ : ∃ b ∈ Ioo w y, (f y - f w) / (y - w) < deriv f b :=\n  by\n  apply StrictMonoOn.exists_slope_lt_deriv_aux _ hwy _ _\n  · refine' hf.mono (Icc_subset_Icc hxw.le le_rfl)\n  · exact hf'_mono.mono (Ioo_subset_Ioo hxw.le le_rfl)\n  · intro z hz\n    rw [← hw]\n    apply ne_of_gt\n    exact hf'_mono ⟨hxw, hwy⟩ ⟨hxw.trans hz.1, hz.2⟩ hz.1\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nx y : ℝ\nf : ℝ → ℝ\nhf : ContinuousOn f (Icc x y)\nhxy : x < y\nhf'_mono : StrictMonoOn (deriv f) (Ioo x y)\nw : ℝ\nhw : deriv f w = 0\nhxw : x < w\nhwy : w < y\na : ℝ\nha : (f w - f x) / (w - x) < deriv f a\nhxa : x < a\nhaw : a < w\n⊢ ∃ b, b ∈ Ioo w y ∧ (f y - f w) / (y - w) < deriv f b\n[PROOFSTEP]\napply StrictMonoOn.exists_slope_lt_deriv_aux _ hwy _ _\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nx y : ℝ\nf : ℝ → ℝ\nhf : ContinuousOn f (Icc x y)\nhxy : x < y\nhf'_mono : StrictMonoOn (deriv f) (Ioo x y)\nw : ℝ\nhw : deriv f w = 0\nhxw : x < w\nhwy : w < y\na : ℝ\nha : (f w - f x) / (w - x) < deriv f a\nhxa : x < a\nhaw : a < w\n⊢ ContinuousOn (fun {y} => f y) (Icc w y)\n[PROOFSTEP]\nrefine' hf.mono (Icc_subset_Icc hxw.le le_rfl)\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nx y : ℝ\nf : ℝ → ℝ\nhf : ContinuousOn f (Icc x y)\nhxy : x < y\nhf'_mono : StrictMonoOn (deriv f) (Ioo x y)\nw : ℝ\nhw : deriv f w = 0\nhxw : x < w\nhwy : w < y\na : ℝ\nha : (f w - f x) / (w - x) < deriv f a\nhxa : x < a\nhaw : a < w\n⊢ StrictMonoOn (deriv fun {y} => f y) (Ioo w y)\n[PROOFSTEP]\nexact hf'_mono.mono (Ioo_subset_Ioo hxw.le le_rfl)\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nx y : ℝ\nf : ℝ → ℝ\nhf : ContinuousOn f (Icc x y)\nhxy : x < y\nhf'_mono : StrictMonoOn (deriv f) (Ioo x y)\nw : ℝ\nhw : deriv f w = 0\nhxw : x < w\nhwy : w < y\na : ℝ\nha : (f w - f x) / (w - x) < deriv f a\nhxa : x < a\nhaw : a < w\n⊢ ∀ (w_1 : ℝ), w_1 ∈ Ioo w y → deriv (fun {y} => f y) w_1 ≠ 0\n[PROOFSTEP]\nintro z hz\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nx y : ℝ\nf : ℝ → ℝ\nhf : ContinuousOn f (Icc x y)\nhxy : x < y\nhf'_mono : StrictMonoOn (deriv f) (Ioo x y)\nw : ℝ\nhw : deriv f w = 0\nhxw : x < w\nhwy : w < y\na : ℝ\nha : (f w - f x) / (w - x) < deriv f a\nhxa : x < a\nhaw : a < w\nz : ℝ\nhz : z ∈ Ioo w y\n⊢ deriv (fun {y} => f y) z ≠ 0\n[PROOFSTEP]\nrw [← hw]\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nx y : ℝ\nf : ℝ → ℝ\nhf : ContinuousOn f (Icc x y)\nhxy : x < y\nhf'_mono : StrictMonoOn (deriv f) (Ioo x y)\nw : ℝ\nhw : deriv f w = 0\nhxw : x < w\nhwy : w < y\na : ℝ\nha : (f w - f x) / (w - x) < deriv f a\nhxa : x < a\nhaw : a < w\nz : ℝ\nhz : z ∈ Ioo w y\n⊢ deriv (fun {y} => f y) z ≠ deriv f w\n[PROOFSTEP]\napply ne_of_gt\n[GOAL]\ncase h\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nx y : ℝ\nf : ℝ → ℝ\nhf : ContinuousOn f (Icc x y)\nhxy : x < y\nhf'_mono : StrictMonoOn (deriv f) (Ioo x y)\nw : ℝ\nhw : deriv f w = 0\nhxw : x < w\nhwy : w < y\na : ℝ\nha : (f w - f x) / (w - x) < deriv f a\nhxa : x < a\nhaw : a < w\nz : ℝ\nhz : z ∈ Ioo w y\n⊢ deriv f w < deriv (fun {y} => f y) z\n[PROOFSTEP]\nexact hf'_mono ⟨hxw, hwy⟩ ⟨hxw.trans hz.1, hz.2⟩ hz.1\n[GOAL]\ncase neg.intro.intro.intro.intro.intro.intro.intro.intro.intro\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nx y : ℝ\nf : ℝ → ℝ\nhf : ContinuousOn f (Icc x y)\nhxy : x < y\nhf'_mono : StrictMonoOn (deriv f) (Ioo x y)\nw : ℝ\nhw : deriv f w = 0\nhxw : x < w\nhwy : w < y\na : ℝ\nha : (f w - f x) / (w - x) < deriv f a\nhxa : x < a\nhaw : a < w\nb : ℝ\nhb : (f y - f w) / (y - w) < deriv f b\nhwb : w < b\nhby : b < y\n⊢ ∃ a, a ∈ Ioo x y ∧ (f y - f x) / (y - x) < deriv f a\n[PROOFSTEP]\nrefine' ⟨b, ⟨hxw.trans hwb, hby⟩, _⟩\n[GOAL]\ncase neg.intro.intro.intro.intro.intro.intro.intro.intro.intro\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nx y : ℝ\nf : ℝ → ℝ\nhf : ContinuousOn f (Icc x y)\nhxy : x < y\nhf'_mono : StrictMonoOn (deriv f) (Ioo x y)\nw : ℝ\nhw : deriv f w = 0\nhxw : x < w\nhwy : w < y\na : ℝ\nha : (f w - f x) / (w - x) < deriv f a\nhxa : x < a\nhaw : a < w\nb : ℝ\nhb : (f y - f w) / (y - w) < deriv f b\nhwb : w < b\nhby : b < y\n⊢ (f y - f x) / (y - x) < deriv f b\n[PROOFSTEP]\nsimp only [div_lt_iff, hxy, hxw, hwy, sub_pos] at ha hb ⊢\n[GOAL]\ncase neg.intro.intro.intro.intro.intro.intro.intro.intro.intro\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nx y : ℝ\nf : ℝ → ℝ\nhf : ContinuousOn f (Icc x y)\nhxy : x < y\nhf'_mono : StrictMonoOn (deriv f) (Ioo x y)\nw : ℝ\nhw : deriv f w = 0\nhxw : x < w\nhwy : w < y\na : ℝ\nhxa : x < a\nhaw : a < w\nb : ℝ\nhwb : w < b\nhby : b < y\nha : f w - f x < deriv f a * (w - x)\nhb : f y - f w < deriv f b * (y - w)\n⊢ f y - f x < deriv f b * (y - x)\n[PROOFSTEP]\nhave : deriv f a * (w - x) < deriv f b * (w - x) :=\n  by\n  apply mul_lt_mul _ le_rfl (sub_pos.2 hxw) _\n  · exact hf'_mono ⟨hxa, haw.trans hwy⟩ ⟨hxw.trans hwb, hby⟩ (haw.trans hwb)\n  · rw [← hw]\n    exact (hf'_mono ⟨hxw, hwy⟩ ⟨hxw.trans hwb, hby⟩ hwb).le\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nx y : ℝ\nf : ℝ → ℝ\nhf : ContinuousOn f (Icc x y)\nhxy : x < y\nhf'_mono : StrictMonoOn (deriv f) (Ioo x y)\nw : ℝ\nhw : deriv f w = 0\nhxw : x < w\nhwy : w < y\na : ℝ\nhxa : x < a\nhaw : a < w\nb : ℝ\nhwb : w < b\nhby : b < y\nha : f w - f x < deriv f a * (w - x)\nhb : f y - f w < deriv f b * (y - w)\n⊢ deriv f a * (w - x) < deriv f b * (w - x)\n[PROOFSTEP]\napply mul_lt_mul _ le_rfl (sub_pos.2 hxw) _\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nx y : ℝ\nf : ℝ → ℝ\nhf : ContinuousOn f (Icc x y)\nhxy : x < y\nhf'_mono : StrictMonoOn (deriv f) (Ioo x y)\nw : ℝ\nhw : deriv f w = 0\nhxw : x < w\nhwy : w < y\na : ℝ\nhxa : x < a\nhaw : a < w\nb : ℝ\nhwb : w < b\nhby : b < y\nha : f w - f x < deriv f a * (w - x)\nhb : f y - f w < deriv f b * (y - w)\n⊢ deriv f a < deriv f b\n[PROOFSTEP]\nexact hf'_mono ⟨hxa, haw.trans hwy⟩ ⟨hxw.trans hwb, hby⟩ (haw.trans hwb)\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nx y : ℝ\nf : ℝ → ℝ\nhf : ContinuousOn f (Icc x y)\nhxy : x < y\nhf'_mono : StrictMonoOn (deriv f) (Ioo x y)\nw : ℝ\nhw : deriv f w = 0\nhxw : x < w\nhwy : w < y\na : ℝ\nhxa : x < a\nhaw : a < w\nb : ℝ\nhwb : w < b\nhby : b < y\nha : f w - f x < deriv f a * (w - x)\nhb : f y - f w < deriv f b * (y - w)\n⊢ 0 ≤ deriv f b\n[PROOFSTEP]\nrw [← hw]\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nx y : ℝ\nf : ℝ → ℝ\nhf : ContinuousOn f (Icc x y)\nhxy : x < y\nhf'_mono : StrictMonoOn (deriv f) (Ioo x y)\nw : ℝ\nhw : deriv f w = 0\nhxw : x < w\nhwy : w < y\na : ℝ\nhxa : x < a\nhaw : a < w\nb : ℝ\nhwb : w < b\nhby : b < y\nha : f w - f x < deriv f a * (w - x)\nhb : f y - f w < deriv f b * (y - w)\n⊢ deriv f w ≤ deriv f b\n[PROOFSTEP]\nexact (hf'_mono ⟨hxw, hwy⟩ ⟨hxw.trans hwb, hby⟩ hwb).le\n[GOAL]\ncase neg.intro.intro.intro.intro.intro.intro.intro.intro.intro\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nx y : ℝ\nf : ℝ → ℝ\nhf : ContinuousOn f (Icc x y)\nhxy : x < y\nhf'_mono : StrictMonoOn (deriv f) (Ioo x y)\nw : ℝ\nhw : deriv f w = 0\nhxw : x < w\nhwy : w < y\na : ℝ\nhxa : x < a\nhaw : a < w\nb : ℝ\nhwb : w < b\nhby : b < y\nha : f w - f x < deriv f a * (w - x)\nhb : f y - f w < deriv f b * (y - w)\nthis : deriv f a * (w - x) < deriv f b * (w - x)\n⊢ f y - f x < deriv f b * (y - x)\n[PROOFSTEP]\nlinarith\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nx y : ℝ\nf : ℝ → ℝ\nhf : ContinuousOn f (Icc x y)\nhxy : x < y\nhf'_mono : StrictMonoOn (deriv f) (Ioo x y)\nh : ∀ (w : ℝ), w ∈ Ioo x y → deriv f w ≠ 0\n⊢ ∃ a, a ∈ Ioo x y ∧ deriv f a < (f y - f x) / (y - x)\n[PROOFSTEP]\nhave A : DifferentiableOn ℝ f (Ioo x y) := fun w wmem =>\n  (differentiableAt_of_deriv_ne_zero (h w wmem)).differentiableWithinAt\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nx y : ℝ\nf : ℝ → ℝ\nhf : ContinuousOn f (Icc x y)\nhxy : x < y\nhf'_mono : StrictMonoOn (deriv f) (Ioo x y)\nh : ∀ (w : ℝ), w ∈ Ioo x y → deriv f w ≠ 0\nA : DifferentiableOn ℝ f (Ioo x y)\n⊢ ∃ a, a ∈ Ioo x y ∧ deriv f a < (f y - f x) / (y - x)\n[PROOFSTEP]\nobtain ⟨a, ⟨hxa, hay⟩, ha⟩ : ∃ a ∈ Ioo x y, deriv f a = (f y - f x) / (y - x)\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nx y : ℝ\nf : ℝ → ℝ\nhf : ContinuousOn f (Icc x y)\nhxy : x < y\nhf'_mono : StrictMonoOn (deriv f) (Ioo x y)\nh : ∀ (w : ℝ), w ∈ Ioo x y → deriv f w ≠ 0\nA : DifferentiableOn ℝ f (Ioo x y)\n⊢ ∃ a, a ∈ Ioo x y ∧ deriv f a = (f y - f x) / (y - x)\ncase intro.intro.intro\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nx y : ℝ\nf : ℝ → ℝ\nhf : ContinuousOn f (Icc x y)\nhxy : x < y\nhf'_mono : StrictMonoOn (deriv f) (Ioo x y)\nh : ∀ (w : ℝ), w ∈ Ioo x y → deriv f w ≠ 0\nA : DifferentiableOn ℝ f (Ioo x y)\na : ℝ\nha : deriv f a = (f y - f x) / (y - x)\nhxa : x < a\nhay : a < y\n⊢ ∃ a, a ∈ Ioo x y ∧ deriv f a < (f y - f x) / (y - x)\n[PROOFSTEP]\nexact exists_deriv_eq_slope f hxy hf A\n[GOAL]\ncase intro.intro.intro\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nx y : ℝ\nf : ℝ → ℝ\nhf : ContinuousOn f (Icc x y)\nhxy : x < y\nhf'_mono : StrictMonoOn (deriv f) (Ioo x y)\nh : ∀ (w : ℝ), w ∈ Ioo x y → deriv f w ≠ 0\nA : DifferentiableOn ℝ f (Ioo x y)\na : ℝ\nha : deriv f a = (f y - f x) / (y - x)\nhxa : x < a\nhay : a < y\n⊢ ∃ a, a ∈ Ioo x y ∧ deriv f a < (f y - f x) / (y - x)\n[PROOFSTEP]\nrcases nonempty_Ioo.2 hxa with ⟨b, ⟨hxb, hba⟩⟩\n[GOAL]\ncase intro.intro.intro.intro.intro\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nx y : ℝ\nf : ℝ → ℝ\nhf : ContinuousOn f (Icc x y)\nhxy : x < y\nhf'_mono : StrictMonoOn (deriv f) (Ioo x y)\nh : ∀ (w : ℝ), w ∈ Ioo x y → deriv f w ≠ 0\nA : DifferentiableOn ℝ f (Ioo x y)\na : ℝ\nha : deriv f a = (f y - f x) / (y - x)\nhxa : x < a\nhay : a < y\nb : ℝ\nhxb : x < b\nhba : b < a\n⊢ ∃ a, a ∈ Ioo x y ∧ deriv f a < (f y - f x) / (y - x)\n[PROOFSTEP]\nrefine' ⟨b, ⟨hxb, hba.trans hay⟩, _⟩\n[GOAL]\ncase intro.intro.intro.intro.intro\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nx y : ℝ\nf : ℝ → ℝ\nhf : ContinuousOn f (Icc x y)\nhxy : x < y\nhf'_mono : StrictMonoOn (deriv f) (Ioo x y)\nh : ∀ (w : ℝ), w ∈ Ioo x y → deriv f w ≠ 0\nA : DifferentiableOn ℝ f (Ioo x y)\na : ℝ\nha : deriv f a = (f y - f x) / (y - x)\nhxa : x < a\nhay : a < y\nb : ℝ\nhxb : x < b\nhba : b < a\n⊢ deriv f b < (f y - f x) / (y - x)\n[PROOFSTEP]\nrw [← ha]\n[GOAL]\ncase intro.intro.intro.intro.intro\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nx y : ℝ\nf : ℝ → ℝ\nhf : ContinuousOn f (Icc x y)\nhxy : x < y\nhf'_mono : StrictMonoOn (deriv f) (Ioo x y)\nh : ∀ (w : ℝ), w ∈ Ioo x y → deriv f w ≠ 0\nA : DifferentiableOn ℝ f (Ioo x y)\na : ℝ\nha : deriv f a = (f y - f x) / (y - x)\nhxa : x < a\nhay : a < y\nb : ℝ\nhxb : x < b\nhba : b < a\n⊢ deriv f b < deriv f a\n[PROOFSTEP]\nexact hf'_mono ⟨hxb, hba.trans hay⟩ ⟨hxa, hay⟩ hba\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nx y : ℝ\nf : ℝ → ℝ\nhf : ContinuousOn f (Icc x y)\nhxy : x < y\nhf'_mono : StrictMonoOn (deriv f) (Ioo x y)\n⊢ ∃ a, a ∈ Ioo x y ∧ deriv f a < (f y - f x) / (y - x)\n[PROOFSTEP]\nby_cases h : ∀ w ∈ Ioo x y, deriv f w ≠ 0\n[GOAL]\ncase pos\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nx y : ℝ\nf : ℝ → ℝ\nhf : ContinuousOn f (Icc x y)\nhxy : x < y\nhf'_mono : StrictMonoOn (deriv f) (Ioo x y)\nh : ∀ (w : ℝ), w ∈ Ioo x y → deriv f w ≠ 0\n⊢ ∃ a, a ∈ Ioo x y ∧ deriv f a < (f y - f x) / (y - x)\n[PROOFSTEP]\napply StrictMonoOn.exists_deriv_lt_slope_aux hf hxy hf'_mono h\n[GOAL]\ncase neg\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nx y : ℝ\nf : ℝ → ℝ\nhf : ContinuousOn f (Icc x y)\nhxy : x < y\nhf'_mono : StrictMonoOn (deriv f) (Ioo x y)\nh : ¬∀ (w : ℝ), w ∈ Ioo x y → deriv f w ≠ 0\n⊢ ∃ a, a ∈ Ioo x y ∧ deriv f a < (f y - f x) / (y - x)\n[PROOFSTEP]\npush_neg at h \n[GOAL]\ncase neg\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nx y : ℝ\nf : ℝ → ℝ\nhf : ContinuousOn f (Icc x y)\nhxy : x < y\nhf'_mono : StrictMonoOn (deriv f) (Ioo x y)\nh : ∃ w, w ∈ Ioo x y ∧ deriv f w = 0\n⊢ ∃ a, a ∈ Ioo x y ∧ deriv f a < (f y - f x) / (y - x)\n[PROOFSTEP]\nrcases h with ⟨w, ⟨hxw, hwy⟩, hw⟩\n[GOAL]\ncase neg.intro.intro.intro\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nx y : ℝ\nf : ℝ → ℝ\nhf : ContinuousOn f (Icc x y)\nhxy : x < y\nhf'_mono : StrictMonoOn (deriv f) (Ioo x y)\nw : ℝ\nhw : deriv f w = 0\nhxw : x < w\nhwy : w < y\n⊢ ∃ a, a ∈ Ioo x y ∧ deriv f a < (f y - f x) / (y - x)\n[PROOFSTEP]\nobtain ⟨a, ⟨hxa, haw⟩, ha⟩ : ∃ a ∈ Ioo x w, deriv f a < (f w - f x) / (w - x) :=\n  by\n  apply StrictMonoOn.exists_deriv_lt_slope_aux _ hxw _ _\n  · exact hf.mono (Icc_subset_Icc le_rfl hwy.le)\n  · exact hf'_mono.mono (Ioo_subset_Ioo le_rfl hwy.le)\n  · intro z hz\n    rw [← hw]\n    apply ne_of_lt\n    exact hf'_mono ⟨hz.1, hz.2.trans hwy⟩ ⟨hxw, hwy⟩ hz.2\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nx y : ℝ\nf : ℝ → ℝ\nhf : ContinuousOn f (Icc x y)\nhxy : x < y\nhf'_mono : StrictMonoOn (deriv f) (Ioo x y)\nw : ℝ\nhw : deriv f w = 0\nhxw : x < w\nhwy : w < y\n⊢ ∃ a, a ∈ Ioo x w ∧ deriv f a < (f w - f x) / (w - x)\n[PROOFSTEP]\napply StrictMonoOn.exists_deriv_lt_slope_aux _ hxw _ _\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nx y : ℝ\nf : ℝ → ℝ\nhf : ContinuousOn f (Icc x y)\nhxy : x < y\nhf'_mono : StrictMonoOn (deriv f) (Ioo x y)\nw : ℝ\nhw : deriv f w = 0\nhxw : x < w\nhwy : w < y\n⊢ ContinuousOn f (Icc x w)\n[PROOFSTEP]\nexact hf.mono (Icc_subset_Icc le_rfl hwy.le)\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nx y : ℝ\nf : ℝ → ℝ\nhf : ContinuousOn f (Icc x y)\nhxy : x < y\nhf'_mono : StrictMonoOn (deriv f) (Ioo x y)\nw : ℝ\nhw : deriv f w = 0\nhxw : x < w\nhwy : w < y\n⊢ StrictMonoOn (deriv f) (Ioo x w)\n[PROOFSTEP]\nexact hf'_mono.mono (Ioo_subset_Ioo le_rfl hwy.le)\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nx y : ℝ\nf : ℝ → ℝ\nhf : ContinuousOn f (Icc x y)\nhxy : x < y\nhf'_mono : StrictMonoOn (deriv f) (Ioo x y)\nw : ℝ\nhw : deriv f w = 0\nhxw : x < w\nhwy : w < y\n⊢ ∀ (w_1 : ℝ), w_1 ∈ Ioo x w → deriv f w_1 ≠ 0\n[PROOFSTEP]\nintro z hz\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nx y : ℝ\nf : ℝ → ℝ\nhf : ContinuousOn f (Icc x y)\nhxy : x < y\nhf'_mono : StrictMonoOn (deriv f) (Ioo x y)\nw : ℝ\nhw : deriv f w = 0\nhxw : x < w\nhwy : w < y\nz : ℝ\nhz : z ∈ Ioo x w\n⊢ deriv f z ≠ 0\n[PROOFSTEP]\nrw [← hw]\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nx y : ℝ\nf : ℝ → ℝ\nhf : ContinuousOn f (Icc x y)\nhxy : x < y\nhf'_mono : StrictMonoOn (deriv f) (Ioo x y)\nw : ℝ\nhw : deriv f w = 0\nhxw : x < w\nhwy : w < y\nz : ℝ\nhz : z ∈ Ioo x w\n⊢ deriv f z ≠ deriv f w\n[PROOFSTEP]\napply ne_of_lt\n[GOAL]\ncase h\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nx y : ℝ\nf : ℝ → ℝ\nhf : ContinuousOn f (Icc x y)\nhxy : x < y\nhf'_mono : StrictMonoOn (deriv f) (Ioo x y)\nw : ℝ\nhw : deriv f w = 0\nhxw : x < w\nhwy : w < y\nz : ℝ\nhz : z ∈ Ioo x w\n⊢ deriv f z < deriv f w\n[PROOFSTEP]\nexact hf'_mono ⟨hz.1, hz.2.trans hwy⟩ ⟨hxw, hwy⟩ hz.2\n[GOAL]\ncase neg.intro.intro.intro.intro.intro.intro\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nx y : ℝ\nf : ℝ → ℝ\nhf : ContinuousOn f (Icc x y)\nhxy : x < y\nhf'_mono : StrictMonoOn (deriv f) (Ioo x y)\nw : ℝ\nhw : deriv f w = 0\nhxw : x < w\nhwy : w < y\na : ℝ\nha : deriv f a < (f w - f x) / (w - x)\nhxa : x < a\nhaw : a < w\n⊢ ∃ a, a ∈ Ioo x y ∧ deriv f a < (f y - f x) / (y - x)\n[PROOFSTEP]\nobtain ⟨b, ⟨hwb, hby⟩, hb⟩ : ∃ b ∈ Ioo w y, deriv f b < (f y - f w) / (y - w) :=\n  by\n  apply StrictMonoOn.exists_deriv_lt_slope_aux _ hwy _ _\n  · refine' hf.mono (Icc_subset_Icc hxw.le le_rfl)\n  · exact hf'_mono.mono (Ioo_subset_Ioo hxw.le le_rfl)\n  · intro z hz\n    rw [← hw]\n    apply ne_of_gt\n    exact hf'_mono ⟨hxw, hwy⟩ ⟨hxw.trans hz.1, hz.2⟩ hz.1\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nx y : ℝ\nf : ℝ → ℝ\nhf : ContinuousOn f (Icc x y)\nhxy : x < y\nhf'_mono : StrictMonoOn (deriv f) (Ioo x y)\nw : ℝ\nhw : deriv f w = 0\nhxw : x < w\nhwy : w < y\na : ℝ\nha : deriv f a < (f w - f x) / (w - x)\nhxa : x < a\nhaw : a < w\n⊢ ∃ b, b ∈ Ioo w y ∧ deriv f b < (f y - f w) / (y - w)\n[PROOFSTEP]\napply StrictMonoOn.exists_deriv_lt_slope_aux _ hwy _ _\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nx y : ℝ\nf : ℝ → ℝ\nhf : ContinuousOn f (Icc x y)\nhxy : x < y\nhf'_mono : StrictMonoOn (deriv f) (Ioo x y)\nw : ℝ\nhw : deriv f w = 0\nhxw : x < w\nhwy : w < y\na : ℝ\nha : deriv f a < (f w - f x) / (w - x)\nhxa : x < a\nhaw : a < w\n⊢ ContinuousOn f (Icc w y)\n[PROOFSTEP]\nrefine' hf.mono (Icc_subset_Icc hxw.le le_rfl)\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nx y : ℝ\nf : ℝ → ℝ\nhf : ContinuousOn f (Icc x y)\nhxy : x < y\nhf'_mono : StrictMonoOn (deriv f) (Ioo x y)\nw : ℝ\nhw : deriv f w = 0\nhxw : x < w\nhwy : w < y\na : ℝ\nha : deriv f a < (f w - f x) / (w - x)\nhxa : x < a\nhaw : a < w\n⊢ StrictMonoOn (deriv f) (Ioo w y)\n[PROOFSTEP]\nexact hf'_mono.mono (Ioo_subset_Ioo hxw.le le_rfl)\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nx y : ℝ\nf : ℝ → ℝ\nhf : ContinuousOn f (Icc x y)\nhxy : x < y\nhf'_mono : StrictMonoOn (deriv f) (Ioo x y)\nw : ℝ\nhw : deriv f w = 0\nhxw : x < w\nhwy : w < y\na : ℝ\nha : deriv f a < (f w - f x) / (w - x)\nhxa : x < a\nhaw : a < w\n⊢ ∀ (w_1 : ℝ), w_1 ∈ Ioo w y → deriv f w_1 ≠ 0\n[PROOFSTEP]\nintro z hz\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nx y : ℝ\nf : ℝ → ℝ\nhf : ContinuousOn f (Icc x y)\nhxy : x < y\nhf'_mono : StrictMonoOn (deriv f) (Ioo x y)\nw : ℝ\nhw : deriv f w = 0\nhxw : x < w\nhwy : w < y\na : ℝ\nha : deriv f a < (f w - f x) / (w - x)\nhxa : x < a\nhaw : a < w\nz : ℝ\nhz : z ∈ Ioo w y\n⊢ deriv f z ≠ 0\n[PROOFSTEP]\nrw [← hw]\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nx y : ℝ\nf : ℝ → ℝ\nhf : ContinuousOn f (Icc x y)\nhxy : x < y\nhf'_mono : StrictMonoOn (deriv f) (Ioo x y)\nw : ℝ\nhw : deriv f w = 0\nhxw : x < w\nhwy : w < y\na : ℝ\nha : deriv f a < (f w - f x) / (w - x)\nhxa : x < a\nhaw : a < w\nz : ℝ\nhz : z ∈ Ioo w y\n⊢ deriv f z ≠ deriv f w\n[PROOFSTEP]\napply ne_of_gt\n[GOAL]\ncase h\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nx y : ℝ\nf : ℝ → ℝ\nhf : ContinuousOn f (Icc x y)\nhxy : x < y\nhf'_mono : StrictMonoOn (deriv f) (Ioo x y)\nw : ℝ\nhw : deriv f w = 0\nhxw : x < w\nhwy : w < y\na : ℝ\nha : deriv f a < (f w - f x) / (w - x)\nhxa : x < a\nhaw : a < w\nz : ℝ\nhz : z ∈ Ioo w y\n⊢ deriv f w < deriv f z\n[PROOFSTEP]\nexact hf'_mono ⟨hxw, hwy⟩ ⟨hxw.trans hz.1, hz.2⟩ hz.1\n[GOAL]\ncase neg.intro.intro.intro.intro.intro.intro.intro.intro.intro\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nx y : ℝ\nf : ℝ → ℝ\nhf : ContinuousOn f (Icc x y)\nhxy : x < y\nhf'_mono : StrictMonoOn (deriv f) (Ioo x y)\nw : ℝ\nhw : deriv f w = 0\nhxw : x < w\nhwy : w < y\na : ℝ\nha : deriv f a < (f w - f x) / (w - x)\nhxa : x < a\nhaw : a < w\nb : ℝ\nhb : deriv f b < (f y - f w) / (y - w)\nhwb : w < b\nhby : b < y\n⊢ ∃ a, a ∈ Ioo x y ∧ deriv f a < (f y - f x) / (y - x)\n[PROOFSTEP]\nrefine' ⟨a, ⟨hxa, haw.trans hwy⟩, _⟩\n[GOAL]\ncase neg.intro.intro.intro.intro.intro.intro.intro.intro.intro\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nx y : ℝ\nf : ℝ → ℝ\nhf : ContinuousOn f (Icc x y)\nhxy : x < y\nhf'_mono : StrictMonoOn (deriv f) (Ioo x y)\nw : ℝ\nhw : deriv f w = 0\nhxw : x < w\nhwy : w < y\na : ℝ\nha : deriv f a < (f w - f x) / (w - x)\nhxa : x < a\nhaw : a < w\nb : ℝ\nhb : deriv f b < (f y - f w) / (y - w)\nhwb : w < b\nhby : b < y\n⊢ deriv f a < (f y - f x) / (y - x)\n[PROOFSTEP]\nsimp only [lt_div_iff, hxy, hxw, hwy, sub_pos] at ha hb ⊢\n[GOAL]\ncase neg.intro.intro.intro.intro.intro.intro.intro.intro.intro\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nx y : ℝ\nf : ℝ → ℝ\nhf : ContinuousOn f (Icc x y)\nhxy : x < y\nhf'_mono : StrictMonoOn (deriv f) (Ioo x y)\nw : ℝ\nhw : deriv f w = 0\nhxw : x < w\nhwy : w < y\na : ℝ\nhxa : x < a\nhaw : a < w\nb : ℝ\nhwb : w < b\nhby : b < y\nha : deriv f a * (w - x) < f w - f x\nhb : deriv f b * (y - w) < f y - f w\n⊢ deriv f a * (y - x) < f y - f x\n[PROOFSTEP]\nhave : deriv f a * (y - w) < deriv f b * (y - w) :=\n  by\n  apply mul_lt_mul _ le_rfl (sub_pos.2 hwy) _\n  · exact hf'_mono ⟨hxa, haw.trans hwy⟩ ⟨hxw.trans hwb, hby⟩ (haw.trans hwb)\n  · rw [← hw]\n    exact (hf'_mono ⟨hxw, hwy⟩ ⟨hxw.trans hwb, hby⟩ hwb).le\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nx y : ℝ\nf : ℝ → ℝ\nhf : ContinuousOn f (Icc x y)\nhxy : x < y\nhf'_mono : StrictMonoOn (deriv f) (Ioo x y)\nw : ℝ\nhw : deriv f w = 0\nhxw : x < w\nhwy : w < y\na : ℝ\nhxa : x < a\nhaw : a < w\nb : ℝ\nhwb : w < b\nhby : b < y\nha : deriv f a * (w - x) < f w - f x\nhb : deriv f b * (y - w) < f y - f w\n⊢ deriv f a * (y - w) < deriv f b * (y - w)\n[PROOFSTEP]\napply mul_lt_mul _ le_rfl (sub_pos.2 hwy) _\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nx y : ℝ\nf : ℝ → ℝ\nhf : ContinuousOn f (Icc x y)\nhxy : x < y\nhf'_mono : StrictMonoOn (deriv f) (Ioo x y)\nw : ℝ\nhw : deriv f w = 0\nhxw : x < w\nhwy : w < y\na : ℝ\nhxa : x < a\nhaw : a < w\nb : ℝ\nhwb : w < b\nhby : b < y\nha : deriv f a * (w - x) < f w - f x\nhb : deriv f b * (y - w) < f y - f w\n⊢ deriv f a < deriv f b\n[PROOFSTEP]\nexact hf'_mono ⟨hxa, haw.trans hwy⟩ ⟨hxw.trans hwb, hby⟩ (haw.trans hwb)\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nx y : ℝ\nf : ℝ → ℝ\nhf : ContinuousOn f (Icc x y)\nhxy : x < y\nhf'_mono : StrictMonoOn (deriv f) (Ioo x y)\nw : ℝ\nhw : deriv f w = 0\nhxw : x < w\nhwy : w < y\na : ℝ\nhxa : x < a\nhaw : a < w\nb : ℝ\nhwb : w < b\nhby : b < y\nha : deriv f a * (w - x) < f w - f x\nhb : deriv f b * (y - w) < f y - f w\n⊢ 0 ≤ deriv f b\n[PROOFSTEP]\nrw [← hw]\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nx y : ℝ\nf : ℝ → ℝ\nhf : ContinuousOn f (Icc x y)\nhxy : x < y\nhf'_mono : StrictMonoOn (deriv f) (Ioo x y)\nw : ℝ\nhw : deriv f w = 0\nhxw : x < w\nhwy : w < y\na : ℝ\nhxa : x < a\nhaw : a < w\nb : ℝ\nhwb : w < b\nhby : b < y\nha : deriv f a * (w - x) < f w - f x\nhb : deriv f b * (y - w) < f y - f w\n⊢ deriv f w ≤ deriv f b\n[PROOFSTEP]\nexact (hf'_mono ⟨hxw, hwy⟩ ⟨hxw.trans hwb, hby⟩ hwb).le\n[GOAL]\ncase neg.intro.intro.intro.intro.intro.intro.intro.intro.intro\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nx y : ℝ\nf : ℝ → ℝ\nhf : ContinuousOn f (Icc x y)\nhxy : x < y\nhf'_mono : StrictMonoOn (deriv f) (Ioo x y)\nw : ℝ\nhw : deriv f w = 0\nhxw : x < w\nhwy : w < y\na : ℝ\nhxa : x < a\nhaw : a < w\nb : ℝ\nhwb : w < b\nhby : b < y\nha : deriv f a * (w - x) < f w - f x\nhb : deriv f b * (y - w) < f y - f w\nthis : deriv f a * (y - w) < deriv f b * (y - w)\n⊢ deriv f a * (y - x) < f y - f x\n[PROOFSTEP]\nlinarith\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nD : Set ℝ\nhD : Convex ℝ D\nf : ℝ → ℝ\nhf : ContinuousOn f D\nhf' : StrictMonoOn (deriv f) (interior D)\nx y z : ℝ\nhx : x ∈ D\nhz : z ∈ D\nhxy : x < y\nhyz : y < z\n⊢ (f y - f x) / (y - x) < (f z - f y) / (z - y)\n[PROOFSTEP]\nhave hxzD : Icc x z ⊆ D := hD.ordConnected.out hx hz\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nD : Set ℝ\nhD : Convex ℝ D\nf : ℝ → ℝ\nhf : ContinuousOn f D\nhf' : StrictMonoOn (deriv f) (interior D)\nx y z : ℝ\nhx : x ∈ D\nhz : z ∈ D\nhxy : x < y\nhyz : y < z\nhxzD : Icc x z ⊆ D\n⊢ (f y - f x) / (y - x) < (f z - f y) / (z - y)\n[PROOFSTEP]\nhave hxyD : Icc x y ⊆ D := (Icc_subset_Icc_right hyz.le).trans hxzD\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nD : Set ℝ\nhD : Convex ℝ D\nf : ℝ → ℝ\nhf : ContinuousOn f D\nhf' : StrictMonoOn (deriv f) (interior D)\nx y z : ℝ\nhx : x ∈ D\nhz : z ∈ D\nhxy : x < y\nhyz : y < z\nhxzD : Icc x z ⊆ D\nhxyD : Icc x y ⊆ D\n⊢ (f y - f x) / (y - x) < (f z - f y) / (z - y)\n[PROOFSTEP]\nhave hxyD' : Ioo x y ⊆ interior D := subset_sUnion_of_mem ⟨isOpen_Ioo, Ioo_subset_Icc_self.trans hxyD⟩\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nD : Set ℝ\nhD : Convex ℝ D\nf : ℝ → ℝ\nhf : ContinuousOn f D\nhf' : StrictMonoOn (deriv f) (interior D)\nx y z : ℝ\nhx : x ∈ D\nhz : z ∈ D\nhxy : x < y\nhyz : y < z\nhxzD : Icc x z ⊆ D\nhxyD : Icc x y ⊆ D\nhxyD' : Ioo x y ⊆ interior D\n⊢ (f y - f x) / (y - x) < (f z - f y) / (z - y)\n[PROOFSTEP]\nhave hyzD : Icc y z ⊆ D := (Icc_subset_Icc_left hxy.le).trans hxzD\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nD : Set ℝ\nhD : Convex ℝ D\nf : ℝ → ℝ\nhf : ContinuousOn f D\nhf' : StrictMonoOn (deriv f) (interior D)\nx y z : ℝ\nhx : x ∈ D\nhz : z ∈ D\nhxy : x < y\nhyz : y < z\nhxzD : Icc x z ⊆ D\nhxyD : Icc x y ⊆ D\nhxyD' : Ioo x y ⊆ interior D\nhyzD : Icc y z ⊆ D\n⊢ (f y - f x) / (y - x) < (f z - f y) / (z - y)\n[PROOFSTEP]\nhave hyzD' : Ioo y z ⊆ interior D :=\n  subset_sUnion_of_mem\n    ⟨isOpen_Ioo, Ioo_subset_Icc_self.trans hyzD⟩\n      -- Then we get points `a` and `b` in each interval `[x, y]` and `[y, z]` where the derivatives\n          -- can be compared to the slopes between `x, y` and `y, z` respectively.\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nD : Set ℝ\nhD : Convex ℝ D\nf : ℝ → ℝ\nhf : ContinuousOn f D\nhf' : StrictMonoOn (deriv f) (interior D)\nx y z : ℝ\nhx : x ∈ D\nhz : z ∈ D\nhxy : x < y\nhyz : y < z\nhxzD : Icc x z ⊆ D\nhxyD : Icc x y ⊆ D\nhxyD' : Ioo x y ⊆ interior D\nhyzD : Icc y z ⊆ D\nhyzD' : Ioo y z ⊆ interior D\n⊢ (f y - f x) / (y - x) < (f z - f y) / (z - y)\n[PROOFSTEP]\nobtain ⟨a, ⟨hxa, hay⟩, ha⟩ : ∃ a ∈ Ioo x y, (f y - f x) / (y - x) < deriv f a\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nD : Set ℝ\nhD : Convex ℝ D\nf : ℝ → ℝ\nhf : ContinuousOn f D\nhf' : StrictMonoOn (deriv f) (interior D)\nx y z : ℝ\nhx : x ∈ D\nhz : z ∈ D\nhxy : x < y\nhyz : y < z\nhxzD : Icc x z ⊆ D\nhxyD : Icc x y ⊆ D\nhxyD' : Ioo x y ⊆ interior D\nhyzD : Icc y z ⊆ D\nhyzD' : Ioo y z ⊆ interior D\n⊢ ∃ a, a ∈ Ioo x y ∧ (f y - f x) / (y - x) < deriv f a\n[PROOFSTEP]\nexact StrictMonoOn.exists_slope_lt_deriv (hf.mono hxyD) hxy (hf'.mono hxyD')\n[GOAL]\ncase intro.intro.intro\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nD : Set ℝ\nhD : Convex ℝ D\nf : ℝ → ℝ\nhf : ContinuousOn f D\nhf' : StrictMonoOn (deriv f) (interior D)\nx y z : ℝ\nhx : x ∈ D\nhz : z ∈ D\nhxy : x < y\nhyz : y < z\nhxzD : Icc x z ⊆ D\nhxyD : Icc x y ⊆ D\nhxyD' : Ioo x y ⊆ interior D\nhyzD : Icc y z ⊆ D\nhyzD' : Ioo y z ⊆ interior D\na : ℝ\nha : (f y - f x) / (y - x) < deriv f a\nhxa : x < a\nhay : a < y\n⊢ (f y - f x) / (y - x) < (f z - f y) / (z - y)\n[PROOFSTEP]\nobtain ⟨b, ⟨hyb, hbz⟩, hb⟩ : ∃ b ∈ Ioo y z, deriv f b < (f z - f y) / (z - y)\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nD : Set ℝ\nhD : Convex ℝ D\nf : ℝ → ℝ\nhf : ContinuousOn f D\nhf' : StrictMonoOn (deriv f) (interior D)\nx y z : ℝ\nhx : x ∈ D\nhz : z ∈ D\nhxy : x < y\nhyz : y < z\nhxzD : Icc x z ⊆ D\nhxyD : Icc x y ⊆ D\nhxyD' : Ioo x y ⊆ interior D\nhyzD : Icc y z ⊆ D\nhyzD' : Ioo y z ⊆ interior D\na : ℝ\nha : (f y - f x) / (y - x) < deriv f a\nhxa : x < a\nhay : a < y\n⊢ ∃ b, b ∈ Ioo y z ∧ deriv f b < (f z - f y) / (z - y)\n[PROOFSTEP]\nexact StrictMonoOn.exists_deriv_lt_slope (hf.mono hyzD) hyz (hf'.mono hyzD')\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nD : Set ℝ\nhD : Convex ℝ D\nf : ℝ → ℝ\nhf : ContinuousOn f D\nhf' : StrictMonoOn (deriv f) (interior D)\nx y z : ℝ\nhx : x ∈ D\nhz : z ∈ D\nhxy : x < y\nhyz : y < z\nhxzD : Icc x z ⊆ D\nhxyD : Icc x y ⊆ D\nhxyD' : Ioo x y ⊆ interior D\nhyzD : Icc y z ⊆ D\nhyzD' : Ioo y z ⊆ interior D\na : ℝ\nha : (f y - f x) / (y - x) < deriv f a\nhxa : x < a\nhay : a < y\nb : ℝ\nhb : deriv f b < (f z - f y) / (z - y)\nhyb : y < b\nhbz : b < z\n⊢ (f y - f x) / (y - x) < (f z - f y) / (z - y)\n[PROOFSTEP]\napply ha.trans (lt_trans _ hb)\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nD : Set ℝ\nhD : Convex ℝ D\nf : ℝ → ℝ\nhf : ContinuousOn f D\nhf' : StrictMonoOn (deriv f) (interior D)\nx y z : ℝ\nhx : x ∈ D\nhz : z ∈ D\nhxy : x < y\nhyz : y < z\nhxzD : Icc x z ⊆ D\nhxyD : Icc x y ⊆ D\nhxyD' : Ioo x y ⊆ interior D\nhyzD : Icc y z ⊆ D\nhyzD' : Ioo y z ⊆ interior D\na : ℝ\nha : (f y - f x) / (y - x) < deriv f a\nhxa : x < a\nhay : a < y\nb : ℝ\nhb : deriv f b < (f z - f y) / (z - y)\nhyb : y < b\nhbz : b < z\n⊢ deriv f a < deriv f b\n[PROOFSTEP]\nexact hf' (hxyD' ⟨hxa, hay⟩) (hyzD' ⟨hyb, hbz⟩) (hay.trans hyb)\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nD : Set ℝ\nhD : Convex ℝ D\nf : ℝ → ℝ\nhf : ContinuousOn f D\nh_anti : StrictAntiOn (deriv f) (interior D)\n⊢ StrictMonoOn (deriv (-f)) (interior D)\n[PROOFSTEP]\nsimpa only [← deriv.neg] using h_anti.neg\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nD : Set ℝ\nhD : Convex ℝ D\nf : ℝ → ℝ\nhf : ContinuousOn f D\nhf' : DifferentiableOn ℝ f (interior D)\nhf'' : DifferentiableOn ℝ (deriv f) (interior D)\nhf''_nonneg : ∀ (x : ℝ), x ∈ interior D → 0 ≤ deriv^[2] f x\n⊢ DifferentiableOn ℝ (deriv f) (interior (interior D))\n[PROOFSTEP]\nrwa [interior_interior]\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nD : Set ℝ\nhD : Convex ℝ D\nf : ℝ → ℝ\nhf : ContinuousOn f D\nhf' : DifferentiableOn ℝ f (interior D)\nhf'' : DifferentiableOn ℝ (deriv f) (interior D)\nhf''_nonneg : ∀ (x : ℝ), x ∈ interior D → 0 ≤ deriv^[2] f x\n⊢ ∀ (x : ℝ), x ∈ interior (interior D) → 0 ≤ deriv (deriv f) x\n[PROOFSTEP]\nrwa [interior_interior]\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nD : Set ℝ\nhD : Convex ℝ D\nf : ℝ → ℝ\nhf : ContinuousOn f D\nhf' : DifferentiableOn ℝ f (interior D)\nhf'' : DifferentiableOn ℝ (deriv f) (interior D)\nhf''_nonpos : ∀ (x : ℝ), x ∈ interior D → deriv^[2] f x ≤ 0\n⊢ DifferentiableOn ℝ (deriv f) (interior (interior D))\n[PROOFSTEP]\nrwa [interior_interior]\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nD : Set ℝ\nhD : Convex ℝ D\nf : ℝ → ℝ\nhf : ContinuousOn f D\nhf' : DifferentiableOn ℝ f (interior D)\nhf'' : DifferentiableOn ℝ (deriv f) (interior D)\nhf''_nonpos : ∀ (x : ℝ), x ∈ interior D → deriv^[2] f x ≤ 0\n⊢ ∀ (x : ℝ), x ∈ interior (interior D) → deriv (deriv f) x ≤ 0\n[PROOFSTEP]\nrwa [interior_interior]\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nD : Set ℝ\nhD : Convex ℝ D\nf : ℝ → ℝ\nhf : ContinuousOn f D\nhf'' : ∀ (x : ℝ), x ∈ interior D → 0 < deriv^[2] f x\n⊢ ∀ (x : ℝ), x ∈ interior (interior D) → 0 < deriv (deriv f) x\n[PROOFSTEP]\nrwa [interior_interior]\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nD : Set ℝ\nhD : Convex ℝ D\nf : ℝ → ℝ\nhf : ContinuousOn f D\nhf'' : ∀ (x : ℝ), x ∈ interior D → deriv^[2] f x < 0\n⊢ ∀ (x : ℝ), x ∈ interior (interior D) → deriv (deriv f) x < 0\n[PROOFSTEP]\nrwa [interior_interior]\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → ℝ\ns : Set E\nx y : E\nf' : E → E →L[ℝ] ℝ\nhf : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhs : Convex ℝ s\nxs : x ∈ s\nys : y ∈ s\n⊢ ∃ z, z ∈ segment ℝ x y ∧ f y - f x = ↑(f' z) (y - x)\n[PROOFSTEP]\nset g : ℝ → E := fun t => AffineMap.lineMap x y t\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → ℝ\ns : Set E\nx y : E\nf' : E → E →L[ℝ] ℝ\nhf : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhs : Convex ℝ s\nxs : x ∈ s\nys : y ∈ s\ng : ℝ → E := fun t => ↑(AffineMap.lineMap x y) t\n⊢ ∃ z, z ∈ segment ℝ x y ∧ f y - f x = ↑(f' z) (y - x)\n[PROOFSTEP]\nset I := Icc (0 : ℝ) 1\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → ℝ\ns : Set E\nx y : E\nf' : E → E →L[ℝ] ℝ\nhf : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhs : Convex ℝ s\nxs : x ∈ s\nys : y ∈ s\ng : ℝ → E := fun t => ↑(AffineMap.lineMap x y) t\nI : Set ℝ := Icc 0 1\n⊢ ∃ z, z ∈ segment ℝ x y ∧ f y - f x = ↑(f' z) (y - x)\n[PROOFSTEP]\nhave hsub : Ioo (0 : ℝ) 1 ⊆ I := Ioo_subset_Icc_self\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → ℝ\ns : Set E\nx y : E\nf' : E → E →L[ℝ] ℝ\nhf : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhs : Convex ℝ s\nxs : x ∈ s\nys : y ∈ s\ng : ℝ → E := fun t => ↑(AffineMap.lineMap x y) t\nI : Set ℝ := Icc 0 1\nhsub : Ioo 0 1 ⊆ I\n⊢ ∃ z, z ∈ segment ℝ x y ∧ f y - f x = ↑(f' z) (y - x)\n[PROOFSTEP]\nhave hmaps : MapsTo g I s := hs.mapsTo_lineMap xs ys\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → ℝ\ns : Set E\nx y : E\nf' : E → E →L[ℝ] ℝ\nhf : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhs : Convex ℝ s\nxs : x ∈ s\nys : y ∈ s\ng : ℝ → E := fun t => ↑(AffineMap.lineMap x y) t\nI : Set ℝ := Icc 0 1\nhsub : Ioo 0 1 ⊆ I\nhmaps : MapsTo g I s\n⊢ ∃ z, z ∈ segment ℝ x y ∧ f y - f x = ↑(f' z) (y - x)\n[PROOFSTEP]\nhave hfg : ∀ t ∈ I, HasDerivWithinAt (f ∘ g) (f' (g t) (y - x)) I t := fun t ht =>\n  (hf _ (hmaps ht)).comp_hasDerivWithinAt t AffineMap.hasDerivWithinAt_lineMap hmaps\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → ℝ\ns : Set E\nx y : E\nf' : E → E →L[ℝ] ℝ\nhf : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhs : Convex ℝ s\nxs : x ∈ s\nys : y ∈ s\ng : ℝ → E := fun t => ↑(AffineMap.lineMap x y) t\nI : Set ℝ := Icc 0 1\nhsub : Ioo 0 1 ⊆ I\nhmaps : MapsTo g I s\nhfg : ∀ (t : ℝ), t ∈ I → HasDerivWithinAt (f ∘ g) (↑(f' (g t)) (y - x)) I t\n⊢ ∃ z, z ∈ segment ℝ x y ∧ f y - f x = ↑(f' z) (y - x)\n[PROOFSTEP]\nhave hMVT : ∃ t ∈ Ioo (0 : ℝ) 1, f' (g t) (y - x) = (f (g 1) - f (g 0)) / (1 - 0) :=\n  by\n  refine' exists_hasDerivAt_eq_slope (f ∘ g) _ (by norm_num) _ _\n  · exact fun t Ht => (hfg t Ht).continuousWithinAt\n  ·\n    exact fun t Ht =>\n      (hfg t <| hsub Ht).hasDerivAt\n        (Icc_mem_nhds Ht.1 Ht.2)\n          -- reinterpret on domain\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → ℝ\ns : Set E\nx y : E\nf' : E → E →L[ℝ] ℝ\nhf : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhs : Convex ℝ s\nxs : x ∈ s\nys : y ∈ s\ng : ℝ → E := fun t => ↑(AffineMap.lineMap x y) t\nI : Set ℝ := Icc 0 1\nhsub : Ioo 0 1 ⊆ I\nhmaps : MapsTo g I s\nhfg : ∀ (t : ℝ), t ∈ I → HasDerivWithinAt (f ∘ g) (↑(f' (g t)) (y - x)) I t\n⊢ ∃ t, t ∈ Ioo 0 1 ∧ ↑(f' (g t)) (y - x) = (f (g 1) - f (g 0)) / (1 - 0)\n[PROOFSTEP]\nrefine' exists_hasDerivAt_eq_slope (f ∘ g) _ (by norm_num) _ _\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → ℝ\ns : Set E\nx y : E\nf' : E → E →L[ℝ] ℝ\nhf : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhs : Convex ℝ s\nxs : x ∈ s\nys : y ∈ s\ng : ℝ → E := fun t => ↑(AffineMap.lineMap x y) t\nI : Set ℝ := Icc 0 1\nhsub : Ioo 0 1 ⊆ I\nhmaps : MapsTo g I s\nhfg : ∀ (t : ℝ), t ∈ I → HasDerivWithinAt (f ∘ g) (↑(f' (g t)) (y - x)) I t\n⊢ 0 < 1\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase refine'_1\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → ℝ\ns : Set E\nx y : E\nf' : E → E →L[ℝ] ℝ\nhf : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhs : Convex ℝ s\nxs : x ∈ s\nys : y ∈ s\ng : ℝ → E := fun t => ↑(AffineMap.lineMap x y) t\nI : Set ℝ := Icc 0 1\nhsub : Ioo 0 1 ⊆ I\nhmaps : MapsTo g I s\nhfg : ∀ (t : ℝ), t ∈ I → HasDerivWithinAt (f ∘ g) (↑(f' (g t)) (y - x)) I t\n⊢ ContinuousOn (f ∘ g) (Icc 0 1)\n[PROOFSTEP]\nexact fun t Ht => (hfg t Ht).continuousWithinAt\n[GOAL]\ncase refine'_2\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → ℝ\ns : Set E\nx y : E\nf' : E → E →L[ℝ] ℝ\nhf : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhs : Convex ℝ s\nxs : x ∈ s\nys : y ∈ s\ng : ℝ → E := fun t => ↑(AffineMap.lineMap x y) t\nI : Set ℝ := Icc 0 1\nhsub : Ioo 0 1 ⊆ I\nhmaps : MapsTo g I s\nhfg : ∀ (t : ℝ), t ∈ I → HasDerivWithinAt (f ∘ g) (↑(f' (g t)) (y - x)) I t\n⊢ ∀ (x_1 : ℝ), x_1 ∈ Ioo 0 1 → HasDerivAt (f ∘ g) (↑(f' (g x_1)) (y - x)) x_1\n[PROOFSTEP]\nexact fun t Ht =>\n  (hfg t <| hsub Ht).hasDerivAt\n    (Icc_mem_nhds Ht.1 Ht.2)\n      -- reinterpret on domain\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → ℝ\ns : Set E\nx y : E\nf' : E → E →L[ℝ] ℝ\nhf : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhs : Convex ℝ s\nxs : x ∈ s\nys : y ∈ s\ng : ℝ → E := fun t => ↑(AffineMap.lineMap x y) t\nI : Set ℝ := Icc 0 1\nhsub : Ioo 0 1 ⊆ I\nhmaps : MapsTo g I s\nhfg : ∀ (t : ℝ), t ∈ I → HasDerivWithinAt (f ∘ g) (↑(f' (g t)) (y - x)) I t\nhMVT : ∃ t, t ∈ Ioo 0 1 ∧ ↑(f' (g t)) (y - x) = (f (g 1) - f (g 0)) / (1 - 0)\n⊢ ∃ z, z ∈ segment ℝ x y ∧ f y - f x = ↑(f' z) (y - x)\n[PROOFSTEP]\nrcases hMVT with ⟨t, Ht, hMVT'⟩\n[GOAL]\ncase intro.intro\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → ℝ\ns : Set E\nx y : E\nf' : E → E →L[ℝ] ℝ\nhf : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhs : Convex ℝ s\nxs : x ∈ s\nys : y ∈ s\ng : ℝ → E := fun t => ↑(AffineMap.lineMap x y) t\nI : Set ℝ := Icc 0 1\nhsub : Ioo 0 1 ⊆ I\nhmaps : MapsTo g I s\nhfg : ∀ (t : ℝ), t ∈ I → HasDerivWithinAt (f ∘ g) (↑(f' (g t)) (y - x)) I t\nt : ℝ\nHt : t ∈ Ioo 0 1\nhMVT' : ↑(f' (g t)) (y - x) = (f (g 1) - f (g 0)) / (1 - 0)\n⊢ ∃ z, z ∈ segment ℝ x y ∧ f y - f x = ↑(f' z) (y - x)\n[PROOFSTEP]\nrw [segment_eq_image_lineMap, bex_image_iff]\n[GOAL]\ncase intro.intro\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → ℝ\ns : Set E\nx y : E\nf' : E → E →L[ℝ] ℝ\nhf : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhs : Convex ℝ s\nxs : x ∈ s\nys : y ∈ s\ng : ℝ → E := fun t => ↑(AffineMap.lineMap x y) t\nI : Set ℝ := Icc 0 1\nhsub : Ioo 0 1 ⊆ I\nhmaps : MapsTo g I s\nhfg : ∀ (t : ℝ), t ∈ I → HasDerivWithinAt (f ∘ g) (↑(f' (g t)) (y - x)) I t\nt : ℝ\nHt : t ∈ Ioo 0 1\nhMVT' : ↑(f' (g t)) (y - x) = (f (g 1) - f (g 0)) / (1 - 0)\n⊢ ∃ x_1, x_1 ∈ Icc 0 1 ∧ f y - f x = ↑(f' (↑(AffineMap.lineMap x y) x_1)) (y - x)\n[PROOFSTEP]\nrefine ⟨t, hsub Ht, ?_⟩\n[GOAL]\ncase intro.intro\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → ℝ\ns : Set E\nx y : E\nf' : E → E →L[ℝ] ℝ\nhf : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhs : Convex ℝ s\nxs : x ∈ s\nys : y ∈ s\ng : ℝ → E := fun t => ↑(AffineMap.lineMap x y) t\nI : Set ℝ := Icc 0 1\nhsub : Ioo 0 1 ⊆ I\nhmaps : MapsTo g I s\nhfg : ∀ (t : ℝ), t ∈ I → HasDerivWithinAt (f ∘ g) (↑(f' (g t)) (y - x)) I t\nt : ℝ\nHt : t ∈ Ioo 0 1\nhMVT' : ↑(f' (g t)) (y - x) = (f (g 1) - f (g 0)) / (1 - 0)\n⊢ f y - f x = ↑(f' (↑(AffineMap.lineMap x y) t)) (y - x)\n[PROOFSTEP]\nsimpa using hMVT'.symm\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace ℝ F\n𝕜 : Type u_3\ninst✝⁴ : IsROrC 𝕜\nG : Type u_4\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nH : Type u_5\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nf : G → H\nf' : G → G →L[𝕜] H\nx : G\nhder : ∀ᶠ (y : G) in 𝓝 x, HasFDerivAt f (f' y) y\nhcont : ContinuousAt f' x\n⊢ HasStrictFDerivAt f (f' x) x\n[PROOFSTEP]\nrefine'\n  isLittleO_iff.mpr fun c hc =>\n    Metric.eventually_nhds_iff_ball.mpr\n      _\n        -- the correct ε is the modulus of continuity of f'\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace ℝ F\n𝕜 : Type u_3\ninst✝⁴ : IsROrC 𝕜\nG : Type u_4\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nH : Type u_5\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nf : G → H\nf' : G → G →L[𝕜] H\nx : G\nhder : ∀ᶠ (y : G) in 𝓝 x, HasFDerivAt f (f' y) y\nhcont : ContinuousAt f' x\nc : ℝ\nhc : 0 < c\n⊢ ∃ ε, ε > 0 ∧ ∀ (y : G × G), y ∈ ball (x, x) ε → ‖f y.fst - f y.snd - ↑(f' x) (y.fst - y.snd)‖ ≤ c * ‖y.fst - y.snd‖\n[PROOFSTEP]\nrcases Metric.mem_nhds_iff.mp (inter_mem hder (hcont <| ball_mem_nhds _ hc)) with ⟨ε, ε0, hε⟩\n[GOAL]\ncase intro.intro\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace ℝ F\n𝕜 : Type u_3\ninst✝⁴ : IsROrC 𝕜\nG : Type u_4\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nH : Type u_5\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nf : G → H\nf' : G → G →L[𝕜] H\nx : G\nhder : ∀ᶠ (y : G) in 𝓝 x, HasFDerivAt f (f' y) y\nhcont : ContinuousAt f' x\nc : ℝ\nhc : 0 < c\nε : ℝ\nε0 : ε > 0\nhε : ball x ε ⊆ {x | (fun y => HasFDerivAt f (f' y) y) x} ∩ f' ⁻¹' ball (f' x) c\n⊢ ∃ ε, ε > 0 ∧ ∀ (y : G × G), y ∈ ball (x, x) ε → ‖f y.fst - f y.snd - ↑(f' x) (y.fst - y.snd)‖ ≤ c * ‖y.fst - y.snd‖\n[PROOFSTEP]\nrefine'\n  ⟨ε, ε0, _⟩\n    -- simplify formulas involving the product E × E\n[GOAL]\ncase intro.intro\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace ℝ F\n𝕜 : Type u_3\ninst✝⁴ : IsROrC 𝕜\nG : Type u_4\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nH : Type u_5\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nf : G → H\nf' : G → G →L[𝕜] H\nx : G\nhder : ∀ᶠ (y : G) in 𝓝 x, HasFDerivAt f (f' y) y\nhcont : ContinuousAt f' x\nc : ℝ\nhc : 0 < c\nε : ℝ\nε0 : ε > 0\nhε : ball x ε ⊆ {x | (fun y => HasFDerivAt f (f' y) y) x} ∩ f' ⁻¹' ball (f' x) c\n⊢ ∀ (y : G × G), y ∈ ball (x, x) ε → ‖f y.fst - f y.snd - ↑(f' x) (y.fst - y.snd)‖ ≤ c * ‖y.fst - y.snd‖\n[PROOFSTEP]\nrintro ⟨a, b⟩ h\n[GOAL]\ncase intro.intro.mk\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace ℝ F\n𝕜 : Type u_3\ninst✝⁴ : IsROrC 𝕜\nG : Type u_4\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nH : Type u_5\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nf : G → H\nf' : G → G →L[𝕜] H\nx : G\nhder : ∀ᶠ (y : G) in 𝓝 x, HasFDerivAt f (f' y) y\nhcont : ContinuousAt f' x\nc : ℝ\nhc : 0 < c\nε : ℝ\nε0 : ε > 0\nhε : ball x ε ⊆ {x | (fun y => HasFDerivAt f (f' y) y) x} ∩ f' ⁻¹' ball (f' x) c\na b : G\nh : (a, b) ∈ ball (x, x) ε\n⊢ ‖f (a, b).fst - f (a, b).snd - ↑(f' x) ((a, b).fst - (a, b).snd)‖ ≤ c * ‖(a, b).fst - (a, b).snd‖\n[PROOFSTEP]\nrw [← ball_prod_same, prod_mk_mem_set_prod_eq] at h \n[GOAL]\ncase intro.intro.mk\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace ℝ F\n𝕜 : Type u_3\ninst✝⁴ : IsROrC 𝕜\nG : Type u_4\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nH : Type u_5\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nf : G → H\nf' : G → G →L[𝕜] H\nx : G\nhder : ∀ᶠ (y : G) in 𝓝 x, HasFDerivAt f (f' y) y\nhcont : ContinuousAt f' x\nc : ℝ\nhc : 0 < c\nε : ℝ\nε0 : ε > 0\nhε : ball x ε ⊆ {x | (fun y => HasFDerivAt f (f' y) y) x} ∩ f' ⁻¹' ball (f' x) c\na b : G\nh : a ∈ ball x ε ∧ b ∈ ball x ε\n⊢ ‖f (a, b).fst - f (a, b).snd - ↑(f' x) ((a, b).fst - (a, b).snd)‖ ≤ c * ‖(a, b).fst - (a, b).snd‖\n[PROOFSTEP]\nhave hf' : ∀ x' ∈ ball x ε, ‖f' x' - f' x‖ ≤ c := fun x' H' =>\n  by\n  rw [← dist_eq_norm]\n  exact\n    le_of_lt\n      (hε H').2\n        -- apply mean value theorem\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace ℝ F\n𝕜 : Type u_3\ninst✝⁴ : IsROrC 𝕜\nG : Type u_4\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nH : Type u_5\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nf : G → H\nf' : G → G →L[𝕜] H\nx : G\nhder : ∀ᶠ (y : G) in 𝓝 x, HasFDerivAt f (f' y) y\nhcont : ContinuousAt f' x\nc : ℝ\nhc : 0 < c\nε : ℝ\nε0 : ε > 0\nhε : ball x ε ⊆ {x | (fun y => HasFDerivAt f (f' y) y) x} ∩ f' ⁻¹' ball (f' x) c\na b : G\nh : a ∈ ball x ε ∧ b ∈ ball x ε\nx' : G\nH' : x' ∈ ball x ε\n⊢ ‖f' x' - f' x‖ ≤ c\n[PROOFSTEP]\nrw [← dist_eq_norm]\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace ℝ F\n𝕜 : Type u_3\ninst✝⁴ : IsROrC 𝕜\nG : Type u_4\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nH : Type u_5\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nf : G → H\nf' : G → G →L[𝕜] H\nx : G\nhder : ∀ᶠ (y : G) in 𝓝 x, HasFDerivAt f (f' y) y\nhcont : ContinuousAt f' x\nc : ℝ\nhc : 0 < c\nε : ℝ\nε0 : ε > 0\nhε : ball x ε ⊆ {x | (fun y => HasFDerivAt f (f' y) y) x} ∩ f' ⁻¹' ball (f' x) c\na b : G\nh : a ∈ ball x ε ∧ b ∈ ball x ε\nx' : G\nH' : x' ∈ ball x ε\n⊢ dist (f' x') (f' x) ≤ c\n[PROOFSTEP]\nexact\n  le_of_lt\n    (hε H').2\n      -- apply mean value theorem\n[GOAL]\ncase intro.intro.mk\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace ℝ F\n𝕜 : Type u_3\ninst✝⁴ : IsROrC 𝕜\nG : Type u_4\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nH : Type u_5\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nf : G → H\nf' : G → G →L[𝕜] H\nx : G\nhder : ∀ᶠ (y : G) in 𝓝 x, HasFDerivAt f (f' y) y\nhcont : ContinuousAt f' x\nc : ℝ\nhc : 0 < c\nε : ℝ\nε0 : ε > 0\nhε : ball x ε ⊆ {x | (fun y => HasFDerivAt f (f' y) y) x} ∩ f' ⁻¹' ball (f' x) c\na b : G\nh : a ∈ ball x ε ∧ b ∈ ball x ε\nhf' : ∀ (x' : G), x' ∈ ball x ε → ‖f' x' - f' x‖ ≤ c\n⊢ ‖f (a, b).fst - f (a, b).snd - ↑(f' x) ((a, b).fst - (a, b).snd)‖ ≤ c * ‖(a, b).fst - (a, b).snd‖\n[PROOFSTEP]\nletI : NormedSpace ℝ G := RestrictScalars.normedSpace ℝ 𝕜 G\n[GOAL]\ncase intro.intro.mk\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace ℝ F\n𝕜 : Type u_3\ninst✝⁴ : IsROrC 𝕜\nG : Type u_4\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nH : Type u_5\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nf : G → H\nf' : G → G →L[𝕜] H\nx : G\nhder : ∀ᶠ (y : G) in 𝓝 x, HasFDerivAt f (f' y) y\nhcont : ContinuousAt f' x\nc : ℝ\nhc : 0 < c\nε : ℝ\nε0 : ε > 0\nhε : ball x ε ⊆ {x | (fun y => HasFDerivAt f (f' y) y) x} ∩ f' ⁻¹' ball (f' x) c\na b : G\nh : a ∈ ball x ε ∧ b ∈ ball x ε\nhf' : ∀ (x' : G), x' ∈ ball x ε → ‖f' x' - f' x‖ ≤ c\nthis : NormedSpace ℝ G := RestrictScalars.normedSpace ℝ 𝕜 G\n⊢ ‖f (a, b).fst - f (a, b).snd - ↑(f' x) ((a, b).fst - (a, b).snd)‖ ≤ c * ‖(a, b).fst - (a, b).snd‖\n[PROOFSTEP]\nrefine' (convex_ball _ _).norm_image_sub_le_of_norm_hasFDerivWithin_le' _ hf' h.2 h.1\n[GOAL]\ncase intro.intro.mk\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace ℝ F\n𝕜 : Type u_3\ninst✝⁴ : IsROrC 𝕜\nG : Type u_4\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace 𝕜 G\nH : Type u_5\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nf : G → H\nf' : G → G →L[𝕜] H\nx : G\nhder : ∀ᶠ (y : G) in 𝓝 x, HasFDerivAt f (f' y) y\nhcont : ContinuousAt f' x\nc : ℝ\nhc : 0 < c\nε : ℝ\nε0 : ε > 0\nhε : ball x ε ⊆ {x | (fun y => HasFDerivAt f (f' y) y) x} ∩ f' ⁻¹' ball (f' x) c\na b : G\nh : a ∈ ball x ε ∧ b ∈ ball x ε\nhf' : ∀ (x' : G), x' ∈ ball x ε → ‖f' x' - f' x‖ ≤ c\nthis : NormedSpace ℝ G := RestrictScalars.normedSpace ℝ 𝕜 G\n⊢ ∀ (x_1 : G), x_1 ∈ ball x ε → HasFDerivWithinAt f (f' x_1) (ball x ε) x_1\n[PROOFSTEP]\nexact fun y hy => (hε hy).1.hasFDerivWithinAt\n", "meta": {"mathlib_filename": "Mathlib.Analysis.Calculus.MeanValue", "llama_tokens": 94477, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8244619393159451, "lm_q2_score": 0.665410558746814, "lm_q1q2_score": 0.548605679705705}}
{"text": "[GOAL]\nb x y : ℝ\n⊢ logb b 0 = 0\n[PROOFSTEP]\nsimp [logb]\n[GOAL]\nb x y : ℝ\n⊢ logb b 1 = 0\n[PROOFSTEP]\nsimp [logb]\n[GOAL]\nb x✝ y x : ℝ\n⊢ logb b |x| = logb b x\n[PROOFSTEP]\nrw [logb, logb, log_abs]\n[GOAL]\nb x✝ y x : ℝ\n⊢ logb b (-x) = logb b x\n[PROOFSTEP]\nrw [← logb_abs x, ← logb_abs (-x), abs_neg]\n[GOAL]\nb x y : ℝ\nhx : x ≠ 0\nhy : y ≠ 0\n⊢ logb b (x * y) = logb b x + logb b y\n[PROOFSTEP]\nsimp_rw [logb, log_mul hx hy, add_div]\n[GOAL]\nb x y : ℝ\nhx : x ≠ 0\nhy : y ≠ 0\n⊢ logb b (x / y) = logb b x - logb b y\n[PROOFSTEP]\nsimp_rw [logb, log_div hx hy, sub_div]\n[GOAL]\nb x✝ y x : ℝ\n⊢ logb b x⁻¹ = -logb b x\n[PROOFSTEP]\nsimp [logb, neg_div]\n[GOAL]\nb✝ x y a b : ℝ\n⊢ (logb a b)⁻¹ = logb b a\n[PROOFSTEP]\nsimp_rw [logb, inv_div]\n[GOAL]\nb✝ x y a b : ℝ\nh₁ : a ≠ 0\nh₂ : b ≠ 0\nc : ℝ\n⊢ (logb (a * b) c)⁻¹ = (logb a c)⁻¹ + (logb b c)⁻¹\n[PROOFSTEP]\nsimp_rw [inv_logb]\n[GOAL]\nb✝ x y a b : ℝ\nh₁ : a ≠ 0\nh₂ : b ≠ 0\nc : ℝ\n⊢ logb c (a * b) = logb c a + logb c b\n[PROOFSTEP]\nexact logb_mul h₁ h₂\n[GOAL]\nb✝ x y a b : ℝ\nh₁ : a ≠ 0\nh₂ : b ≠ 0\nc : ℝ\n⊢ (logb (a / b) c)⁻¹ = (logb a c)⁻¹ - (logb b c)⁻¹\n[PROOFSTEP]\nsimp_rw [inv_logb]\n[GOAL]\nb✝ x y a b : ℝ\nh₁ : a ≠ 0\nh₂ : b ≠ 0\nc : ℝ\n⊢ logb c (a / b) = logb c a - logb c b\n[PROOFSTEP]\nexact logb_div h₁ h₂\n[GOAL]\nb✝ x y a b : ℝ\nh₁ : a ≠ 0\nh₂ : b ≠ 0\nc : ℝ\n⊢ logb (a * b) c = ((logb a c)⁻¹ + (logb b c)⁻¹)⁻¹\n[PROOFSTEP]\nrw [← inv_logb_mul_base h₁ h₂ c, inv_inv]\n[GOAL]\nb✝ x y a b : ℝ\nh₁ : a ≠ 0\nh₂ : b ≠ 0\nc : ℝ\n⊢ logb (a / b) c = ((logb a c)⁻¹ - (logb b c)⁻¹)⁻¹\n[PROOFSTEP]\nrw [← inv_logb_div_base h₁ h₂ c, inv_inv]\n[GOAL]\nb✝ x y a b c : ℝ\nh₁ : b ≠ 0\nh₂ : b ≠ 1\nh₃ : b ≠ -1\n⊢ logb a b * logb b c = logb a c\n[PROOFSTEP]\nunfold logb\n[GOAL]\nb✝ x y a b c : ℝ\nh₁ : b ≠ 0\nh₂ : b ≠ 1\nh₃ : b ≠ -1\n⊢ log b / log a * (log c / log b) = log c / log a\n[PROOFSTEP]\nrw [mul_comm, div_mul_div_cancel _ (log_ne_zero.mpr ⟨h₁, h₂, h₃⟩)]\n[GOAL]\nb x y : ℝ\nb_pos : 0 < b\nb_ne_one : b ≠ 1\n⊢ log b ≠ 0\n[PROOFSTEP]\nhave b_ne_zero : b ≠ 0\n[GOAL]\ncase b_ne_zero\nb x y : ℝ\nb_pos : 0 < b\nb_ne_one : b ≠ 1\n⊢ b ≠ 0\nb x y : ℝ b_pos : 0 < b b_ne_one : b ≠ 1 b_ne_zero : b ≠ 0 ⊢ log b ≠ 0\n[PROOFSTEP]\nlinarith\n[GOAL]\nb x y : ℝ\nb_pos : 0 < b\nb_ne_one : b ≠ 1\nb_ne_zero : b ≠ 0\n⊢ log b ≠ 0\n[PROOFSTEP]\nhave b_ne_minus_one : b ≠ -1\n[GOAL]\ncase b_ne_minus_one\nb x y : ℝ\nb_pos : 0 < b\nb_ne_one : b ≠ 1\nb_ne_zero : b ≠ 0\n⊢ b ≠ -1\nb x y : ℝ b_pos : 0 < b b_ne_one : b ≠ 1 b_ne_zero : b ≠ 0 b_ne_minus_one : b ≠ -1 ⊢ log b ≠ 0\n[PROOFSTEP]\nlinarith\n[GOAL]\nb x y : ℝ\nb_pos : 0 < b\nb_ne_one : b ≠ 1\nb_ne_zero : b ≠ 0\nb_ne_minus_one : b ≠ -1\n⊢ log b ≠ 0\n[PROOFSTEP]\nsimp [b_ne_one, b_ne_zero, b_ne_minus_one]\n[GOAL]\nb x y : ℝ\nb_pos : 0 < b\nb_ne_one : b ≠ 1\n⊢ logb b (b ^ x) = x\n[PROOFSTEP]\nrw [logb, div_eq_iff, log_rpow b_pos]\n[GOAL]\nb x y : ℝ\nb_pos : 0 < b\nb_ne_one : b ≠ 1\n⊢ log b ≠ 0\n[PROOFSTEP]\nexact log_b_ne_zero b_pos b_ne_one\n[GOAL]\nb x y : ℝ\nb_pos : 0 < b\nb_ne_one : b ≠ 1\nhx : x ≠ 0\n⊢ b ^ logb b x = |x|\n[PROOFSTEP]\napply log_injOn_pos\n[GOAL]\ncase a\nb x y : ℝ\nb_pos : 0 < b\nb_ne_one : b ≠ 1\nhx : x ≠ 0\n⊢ b ^ logb b x ∈ Ioi 0\ncase a\nb x y : ℝ\nb_pos : 0 < b\nb_ne_one : b ≠ 1\nhx : x ≠ 0\n⊢ |x| ∈ Ioi 0\ncase a b x y : ℝ b_pos : 0 < b b_ne_one : b ≠ 1 hx : x ≠ 0 ⊢ log (b ^ logb b x) = log |x|\n[PROOFSTEP]\nsimp only [Set.mem_Ioi]\n[GOAL]\ncase a\nb x y : ℝ\nb_pos : 0 < b\nb_ne_one : b ≠ 1\nhx : x ≠ 0\n⊢ 0 < b ^ logb b x\ncase a\nb x y : ℝ\nb_pos : 0 < b\nb_ne_one : b ≠ 1\nhx : x ≠ 0\n⊢ |x| ∈ Ioi 0\ncase a b x y : ℝ b_pos : 0 < b b_ne_one : b ≠ 1 hx : x ≠ 0 ⊢ log (b ^ logb b x) = log |x|\n[PROOFSTEP]\napply rpow_pos_of_pos b_pos\n[GOAL]\ncase a\nb x y : ℝ\nb_pos : 0 < b\nb_ne_one : b ≠ 1\nhx : x ≠ 0\n⊢ |x| ∈ Ioi 0\ncase a b x y : ℝ b_pos : 0 < b b_ne_one : b ≠ 1 hx : x ≠ 0 ⊢ log (b ^ logb b x) = log |x|\n[PROOFSTEP]\nsimp only [abs_pos, mem_Ioi, Ne.def, hx, not_false_iff]\n[GOAL]\ncase a\nb x y : ℝ\nb_pos : 0 < b\nb_ne_one : b ≠ 1\nhx : x ≠ 0\n⊢ log (b ^ logb b x) = log |x|\n[PROOFSTEP]\nrw [log_rpow b_pos, logb, log_abs]\n[GOAL]\ncase a\nb x y : ℝ\nb_pos : 0 < b\nb_ne_one : b ≠ 1\nhx : x ≠ 0\n⊢ log x / log b * log b = log x\n[PROOFSTEP]\nfield_simp [log_b_ne_zero b_pos b_ne_one]\n[GOAL]\nb x y : ℝ\nb_pos : 0 < b\nb_ne_one : b ≠ 1\nhx : 0 < x\n⊢ b ^ logb b x = x\n[PROOFSTEP]\nrw [rpow_logb_eq_abs b_pos b_ne_one hx.ne']\n[GOAL]\nb x y : ℝ\nb_pos : 0 < b\nb_ne_one : b ≠ 1\nhx : 0 < x\n⊢ |x| = x\n[PROOFSTEP]\nexact abs_of_pos hx\n[GOAL]\nb x y : ℝ\nb_pos : 0 < b\nb_ne_one : b ≠ 1\nhx : x < 0\n⊢ b ^ logb b x = -x\n[PROOFSTEP]\nrw [rpow_logb_eq_abs b_pos b_ne_one (ne_of_lt hx)]\n[GOAL]\nb x y : ℝ\nb_pos : 0 < b\nb_ne_one : b ≠ 1\nhx : x < 0\n⊢ |x| = -x\n[PROOFSTEP]\nexact abs_of_neg hx\n[GOAL]\nb x y : ℝ\nb_pos : 0 < b\nb_ne_one : b ≠ 1\n⊢ SurjOn (logb b) (Iio 0) univ\n[PROOFSTEP]\nintro x _\n[GOAL]\nb x✝ y : ℝ\nb_pos : 0 < b\nb_ne_one : b ≠ 1\nx : ℝ\na✝ : x ∈ univ\n⊢ x ∈ logb b '' Iio 0\n[PROOFSTEP]\nuse-b ^ x\n[GOAL]\ncase h\nb x✝ y : ℝ\nb_pos : 0 < b\nb_ne_one : b ≠ 1\nx : ℝ\na✝ : x ∈ univ\n⊢ -b ^ x ∈ Iio 0 ∧ logb b (-b ^ x) = x\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.left\nb x✝ y : ℝ\nb_pos : 0 < b\nb_ne_one : b ≠ 1\nx : ℝ\na✝ : x ∈ univ\n⊢ -b ^ x ∈ Iio 0\n[PROOFSTEP]\nsimp only [Right.neg_neg_iff, Set.mem_Iio]\n[GOAL]\ncase h.left\nb x✝ y : ℝ\nb_pos : 0 < b\nb_ne_one : b ≠ 1\nx : ℝ\na✝ : x ∈ univ\n⊢ 0 < b ^ x\n[PROOFSTEP]\napply rpow_pos_of_pos b_pos\n[GOAL]\ncase h.right\nb x✝ y : ℝ\nb_pos : 0 < b\nb_ne_one : b ≠ 1\nx : ℝ\na✝ : x ∈ univ\n⊢ logb b (-b ^ x) = x\n[PROOFSTEP]\nrw [logb_neg_eq_logb, logb_rpow b_pos b_ne_one]\n[GOAL]\nb x y : ℝ\nhb : 1 < b\n⊢ 0 < b\n[PROOFSTEP]\nlinarith\n  -- Porting note: prime added to avoid clashing with `b_ne_one` further down the file\n[GOAL]\nb x y : ℝ\nhb : 1 < b\n⊢ b ≠ 1\n[PROOFSTEP]\nlinarith\n[GOAL]\nb x y : ℝ\nhb : 1 < b\nh : 0 < x\nh₁ : 0 < y\n⊢ logb b x ≤ logb b y ↔ x ≤ y\n[PROOFSTEP]\nrw [logb, logb, div_le_div_right (log_pos hb), log_le_log h h₁]\n[GOAL]\nb x y : ℝ\nhb : 1 < b\nhx : 0 < x\nhxy : x < y\n⊢ logb b x < logb b y\n[PROOFSTEP]\nrw [logb, logb, div_lt_div_right (log_pos hb)]\n[GOAL]\nb x y : ℝ\nhb : 1 < b\nhx : 0 < x\nhxy : x < y\n⊢ log x < log y\n[PROOFSTEP]\nexact log_lt_log hx hxy\n[GOAL]\nb x y : ℝ\nhb : 1 < b\nhx : 0 < x\nhy : 0 < y\n⊢ logb b x < logb b y ↔ x < y\n[PROOFSTEP]\nrw [logb, logb, div_lt_div_right (log_pos hb)]\n[GOAL]\nb x y : ℝ\nhb : 1 < b\nhx : 0 < x\nhy : 0 < y\n⊢ log x < log y ↔ x < y\n[PROOFSTEP]\nexact log_lt_log_iff hx hy\n[GOAL]\nb x y : ℝ\nhb : 1 < b\nhx : 0 < x\n⊢ logb b x ≤ y ↔ x ≤ b ^ y\n[PROOFSTEP]\nrw [← rpow_le_rpow_left_iff hb, rpow_logb (b_pos hb) (b_ne_one' hb) hx]\n[GOAL]\nb x y : ℝ\nhb : 1 < b\nhx : 0 < x\n⊢ logb b x < y ↔ x < b ^ y\n[PROOFSTEP]\nrw [← rpow_lt_rpow_left_iff hb, rpow_logb (b_pos hb) (b_ne_one' hb) hx]\n[GOAL]\nb x y : ℝ\nhb : 1 < b\nhy : 0 < y\n⊢ x ≤ logb b y ↔ b ^ x ≤ y\n[PROOFSTEP]\nrw [← rpow_le_rpow_left_iff hb, rpow_logb (b_pos hb) (b_ne_one' hb) hy]\n[GOAL]\nb x y : ℝ\nhb : 1 < b\nhy : 0 < y\n⊢ x < logb b y ↔ b ^ x < y\n[PROOFSTEP]\nrw [← rpow_lt_rpow_left_iff hb, rpow_logb (b_pos hb) (b_ne_one' hb) hy]\n[GOAL]\nb x y : ℝ\nhb : 1 < b\nhx : 0 < x\n⊢ 0 < logb b x ↔ 1 < x\n[PROOFSTEP]\nrw [← @logb_one b]\n[GOAL]\nb x y : ℝ\nhb : 1 < b\nhx : 0 < x\n⊢ logb b 1 < logb b x ↔ 1 < x\n[PROOFSTEP]\nrw [logb_lt_logb_iff hb zero_lt_one hx]\n[GOAL]\nb x y : ℝ\nhb : 1 < b\nhx : 1 < x\n⊢ 0 < logb b x\n[PROOFSTEP]\nrw [logb_pos_iff hb (lt_trans zero_lt_one hx)]\n[GOAL]\nb x y : ℝ\nhb : 1 < b\nhx : 1 < x\n⊢ 1 < x\n[PROOFSTEP]\nexact hx\n[GOAL]\nb x y : ℝ\nhb : 1 < b\nh : 0 < x\n⊢ logb b x < 0 ↔ x < 1\n[PROOFSTEP]\nrw [← logb_one]\n[GOAL]\nb x y : ℝ\nhb : 1 < b\nh : 0 < x\n⊢ logb b x < logb ?m.14910 1 ↔ x < 1\nb x y : ℝ hb : 1 < b h : 0 < x ⊢ ℝ\n[PROOFSTEP]\nexact logb_lt_logb_iff hb h zero_lt_one\n[GOAL]\nb x y : ℝ\nhb : 1 < b\nhx : 0 < x\n⊢ 0 ≤ logb b x ↔ 1 ≤ x\n[PROOFSTEP]\nrw [← not_lt, logb_neg_iff hb hx, not_lt]\n[GOAL]\nb x y : ℝ\nhb : 1 < b\nhx : 0 < x\n⊢ logb b x ≤ 0 ↔ x ≤ 1\n[PROOFSTEP]\nrw [← not_lt, logb_pos_iff hb hx, not_lt]\n[GOAL]\nb x y : ℝ\nhb : 1 < b\nhx : 0 ≤ x\n⊢ logb b x ≤ 0 ↔ x ≤ 1\n[PROOFSTEP]\nrcases hx.eq_or_lt with (rfl | hx)\n[GOAL]\ncase inl\nb y : ℝ\nhb : 1 < b\nhx : 0 ≤ 0\n⊢ logb b 0 ≤ 0 ↔ 0 ≤ 1\n[PROOFSTEP]\nsimp [le_refl, zero_le_one]\n[GOAL]\ncase inr\nb x y : ℝ\nhb : 1 < b\nhx✝ : 0 ≤ x\nhx : 0 < x\n⊢ logb b x ≤ 0 ↔ x ≤ 1\n[PROOFSTEP]\nexact logb_nonpos_iff hb hx\n[GOAL]\nb x y : ℝ\nhb : 1 < b\n⊢ StrictAntiOn (logb b) (Iio 0)\n[PROOFSTEP]\nrintro x (hx : x < 0) y (hy : y < 0) hxy\n[GOAL]\nb x✝ y✝ : ℝ\nhb : 1 < b\nx : ℝ\nhx : x < 0\ny : ℝ\nhy : y < 0\nhxy : x < y\n⊢ logb b y < logb b x\n[PROOFSTEP]\nrw [← logb_abs y, ← logb_abs x]\n[GOAL]\nb x✝ y✝ : ℝ\nhb : 1 < b\nx : ℝ\nhx : x < 0\ny : ℝ\nhy : y < 0\nhxy : x < y\n⊢ logb b |y| < logb b |x|\n[PROOFSTEP]\nrefine' logb_lt_logb hb (abs_pos.2 hy.ne) _\n[GOAL]\nb x✝ y✝ : ℝ\nhb : 1 < b\nx : ℝ\nhx : x < 0\ny : ℝ\nhy : y < 0\nhxy : x < y\n⊢ |y| < |x|\n[PROOFSTEP]\nrwa [abs_of_neg hy, abs_of_neg hx, neg_lt_neg_iff]\n[GOAL]\nb x y : ℝ\nb_pos : 0 < b\nb_lt_one : b < 1\n⊢ b ≠ 1\n[PROOFSTEP]\nlinarith\n[GOAL]\nb x y : ℝ\nb_pos : 0 < b\nb_lt_one : b < 1\nh : 0 < x\nh₁ : 0 < y\n⊢ logb b x ≤ logb b y ↔ y ≤ x\n[PROOFSTEP]\nrw [logb, logb, div_le_div_right_of_neg (log_neg b_pos b_lt_one), log_le_log h₁ h]\n[GOAL]\nb x y : ℝ\nb_pos : 0 < b\nb_lt_one : b < 1\nhx : 0 < x\nhxy : x < y\n⊢ logb b y < logb b x\n[PROOFSTEP]\nrw [logb, logb, div_lt_div_right_of_neg (log_neg b_pos b_lt_one)]\n[GOAL]\nb x y : ℝ\nb_pos : 0 < b\nb_lt_one : b < 1\nhx : 0 < x\nhxy : x < y\n⊢ log x < log y\n[PROOFSTEP]\nexact log_lt_log hx hxy\n[GOAL]\nb x y : ℝ\nb_pos : 0 < b\nb_lt_one : b < 1\nhx : 0 < x\nhy : 0 < y\n⊢ logb b x < logb b y ↔ y < x\n[PROOFSTEP]\nrw [logb, logb, div_lt_div_right_of_neg (log_neg b_pos b_lt_one)]\n[GOAL]\nb x y : ℝ\nb_pos : 0 < b\nb_lt_one : b < 1\nhx : 0 < x\nhy : 0 < y\n⊢ log y < log x ↔ y < x\n[PROOFSTEP]\nexact log_lt_log_iff hy hx\n[GOAL]\nb x y : ℝ\nb_pos : 0 < b\nb_lt_one : b < 1\nhx : 0 < x\n⊢ logb b x ≤ y ↔ b ^ y ≤ x\n[PROOFSTEP]\nrw [← rpow_le_rpow_left_iff_of_base_lt_one b_pos b_lt_one, rpow_logb b_pos (b_ne_one b_lt_one) hx]\n[GOAL]\nb x y : ℝ\nb_pos : 0 < b\nb_lt_one : b < 1\nhx : 0 < x\n⊢ logb b x < y ↔ b ^ y < x\n[PROOFSTEP]\nrw [← rpow_lt_rpow_left_iff_of_base_lt_one b_pos b_lt_one, rpow_logb b_pos (b_ne_one b_lt_one) hx]\n[GOAL]\nb x y : ℝ\nb_pos : 0 < b\nb_lt_one : b < 1\nhy : 0 < y\n⊢ x ≤ logb b y ↔ y ≤ b ^ x\n[PROOFSTEP]\nrw [← rpow_le_rpow_left_iff_of_base_lt_one b_pos b_lt_one, rpow_logb b_pos (b_ne_one b_lt_one) hy]\n[GOAL]\nb x y : ℝ\nb_pos : 0 < b\nb_lt_one : b < 1\nhy : 0 < y\n⊢ x < logb b y ↔ y < b ^ x\n[PROOFSTEP]\nrw [← rpow_lt_rpow_left_iff_of_base_lt_one b_pos b_lt_one, rpow_logb b_pos (b_ne_one b_lt_one) hy]\n[GOAL]\nb x y : ℝ\nb_pos : 0 < b\nb_lt_one : b < 1\nhx : 0 < x\n⊢ 0 < logb b x ↔ x < 1\n[PROOFSTEP]\nrw [← @logb_one b, logb_lt_logb_iff_of_base_lt_one b_pos b_lt_one zero_lt_one hx]\n[GOAL]\nb x y : ℝ\nb_pos : 0 < b\nb_lt_one : b < 1\nhx : 0 < x\nhx' : x < 1\n⊢ 0 < logb b x\n[PROOFSTEP]\nrw [logb_pos_iff_of_base_lt_one b_pos b_lt_one hx]\n[GOAL]\nb x y : ℝ\nb_pos : 0 < b\nb_lt_one : b < 1\nhx : 0 < x\nhx' : x < 1\n⊢ x < 1\n[PROOFSTEP]\nexact hx'\n[GOAL]\nb x y : ℝ\nb_pos : 0 < b\nb_lt_one : b < 1\nh : 0 < x\n⊢ logb b x < 0 ↔ 1 < x\n[PROOFSTEP]\nrw [← @logb_one b, logb_lt_logb_iff_of_base_lt_one b_pos b_lt_one h zero_lt_one]\n[GOAL]\nb x y : ℝ\nb_pos : 0 < b\nb_lt_one : b < 1\nhx : 0 < x\n⊢ 0 ≤ logb b x ↔ x ≤ 1\n[PROOFSTEP]\nrw [← not_lt, logb_neg_iff_of_base_lt_one b_pos b_lt_one hx, not_lt]\n[GOAL]\nb x y : ℝ\nb_pos : 0 < b\nb_lt_one : b < 1\nhx : 0 < x\nhx' : x ≤ 1\n⊢ 0 ≤ logb b x\n[PROOFSTEP]\nrw [logb_nonneg_iff_of_base_lt_one b_pos b_lt_one hx]\n[GOAL]\nb x y : ℝ\nb_pos : 0 < b\nb_lt_one : b < 1\nhx : 0 < x\nhx' : x ≤ 1\n⊢ x ≤ 1\n[PROOFSTEP]\nexact hx'\n[GOAL]\nb x y : ℝ\nb_pos : 0 < b\nb_lt_one : b < 1\nhx : 0 < x\n⊢ logb b x ≤ 0 ↔ 1 ≤ x\n[PROOFSTEP]\nrw [← not_lt, logb_pos_iff_of_base_lt_one b_pos b_lt_one hx, not_lt]\n[GOAL]\nb x y : ℝ\nb_pos : 0 < b\nb_lt_one : b < 1\n⊢ StrictMonoOn (logb b) (Iio 0)\n[PROOFSTEP]\nrintro x (hx : x < 0) y (hy : y < 0) hxy\n[GOAL]\nb x✝ y✝ : ℝ\nb_pos : 0 < b\nb_lt_one : b < 1\nx : ℝ\nhx : x < 0\ny : ℝ\nhy : y < 0\nhxy : x < y\n⊢ logb b x < logb b y\n[PROOFSTEP]\nrw [← logb_abs y, ← logb_abs x]\n[GOAL]\nb x✝ y✝ : ℝ\nb_pos : 0 < b\nb_lt_one : b < 1\nx : ℝ\nhx : x < 0\ny : ℝ\nhy : y < 0\nhxy : x < y\n⊢ logb b |x| < logb b |y|\n[PROOFSTEP]\nrefine' logb_lt_logb_of_base_lt_one b_pos b_lt_one (abs_pos.2 hy.ne) _\n[GOAL]\nb x✝ y✝ : ℝ\nb_pos : 0 < b\nb_lt_one : b < 1\nx : ℝ\nhx : x < 0\ny : ℝ\nhy : y < 0\nhxy : x < y\n⊢ |y| < |x|\n[PROOFSTEP]\nrwa [abs_of_neg hy, abs_of_neg hx, neg_lt_neg_iff]\n[GOAL]\nb x y : ℝ\nb_pos : 0 < b\nb_lt_one : b < 1\n⊢ Tendsto (logb b) atTop atBot\n[PROOFSTEP]\nrw [tendsto_atTop_atBot]\n[GOAL]\nb x y : ℝ\nb_pos : 0 < b\nb_lt_one : b < 1\n⊢ ∀ (b_1 : ℝ), ∃ i, ∀ (a : ℝ), i ≤ a → logb b a ≤ b_1\n[PROOFSTEP]\nintro e\n[GOAL]\nb x y : ℝ\nb_pos : 0 < b\nb_lt_one : b < 1\ne : ℝ\n⊢ ∃ i, ∀ (a : ℝ), i ≤ a → logb b a ≤ e\n[PROOFSTEP]\nuse 1 ⊔ b ^ e\n[GOAL]\ncase h\nb x y : ℝ\nb_pos : 0 < b\nb_lt_one : b < 1\ne : ℝ\n⊢ ∀ (a : ℝ), 1 ⊔ b ^ e ≤ a → logb b a ≤ e\n[PROOFSTEP]\nintro a\n[GOAL]\ncase h\nb x y : ℝ\nb_pos : 0 < b\nb_lt_one : b < 1\ne a : ℝ\n⊢ 1 ⊔ b ^ e ≤ a → logb b a ≤ e\n[PROOFSTEP]\nsimp only [and_imp, sup_le_iff]\n[GOAL]\ncase h\nb x y : ℝ\nb_pos : 0 < b\nb_lt_one : b < 1\ne a : ℝ\n⊢ 1 ≤ a → b ^ e ≤ a → logb b a ≤ e\n[PROOFSTEP]\nintro ha\n[GOAL]\ncase h\nb x y : ℝ\nb_pos : 0 < b\nb_lt_one : b < 1\ne a : ℝ\nha : 1 ≤ a\n⊢ b ^ e ≤ a → logb b a ≤ e\n[PROOFSTEP]\nrw [logb_le_iff_le_rpow_of_base_lt_one b_pos b_lt_one]\n[GOAL]\ncase h\nb x y : ℝ\nb_pos : 0 < b\nb_lt_one : b < 1\ne a : ℝ\nha : 1 ≤ a\n⊢ b ^ e ≤ a → b ^ e ≤ a\ncase h b x y : ℝ b_pos : 0 < b b_lt_one : b < 1 e a : ℝ ha : 1 ≤ a ⊢ 0 < a\n[PROOFSTEP]\ntauto\n[GOAL]\ncase h\nb x y : ℝ\nb_pos : 0 < b\nb_lt_one : b < 1\ne a : ℝ\nha : 1 ≤ a\n⊢ 0 < a\n[PROOFSTEP]\nexact lt_of_lt_of_le zero_lt_one ha\n[GOAL]\nb✝ x y : ℝ\nb : ℕ\nr : ℝ\nhb : 1 < b\nhr : 0 ≤ r\n⊢ ⌊logb (↑b) r⌋ = Int.log b r\n[PROOFSTEP]\nobtain rfl | hr := hr.eq_or_lt\n[GOAL]\ncase inl\nb✝ x y : ℝ\nb : ℕ\nhb : 1 < b\nhr : 0 ≤ 0\n⊢ ⌊logb (↑b) 0⌋ = Int.log b 0\n[PROOFSTEP]\nrw [logb_zero, Int.log_zero_right, Int.floor_zero]\n[GOAL]\ncase inr\nb✝ x y : ℝ\nb : ℕ\nr : ℝ\nhb : 1 < b\nhr✝ : 0 ≤ r\nhr : 0 < r\n⊢ ⌊logb (↑b) r⌋ = Int.log b r\n[PROOFSTEP]\nhave hb1' : 1 < (b : ℝ) := Nat.one_lt_cast.mpr hb\n[GOAL]\ncase inr\nb✝ x y : ℝ\nb : ℕ\nr : ℝ\nhb : 1 < b\nhr✝ : 0 ≤ r\nhr : 0 < r\nhb1' : 1 < ↑b\n⊢ ⌊logb (↑b) r⌋ = Int.log b r\n[PROOFSTEP]\napply le_antisymm\n[GOAL]\ncase inr.a\nb✝ x y : ℝ\nb : ℕ\nr : ℝ\nhb : 1 < b\nhr✝ : 0 ≤ r\nhr : 0 < r\nhb1' : 1 < ↑b\n⊢ ⌊logb (↑b) r⌋ ≤ Int.log b r\n[PROOFSTEP]\nrw [← Int.zpow_le_iff_le_log hb hr, ← rpow_int_cast b]\n[GOAL]\ncase inr.a\nb✝ x y : ℝ\nb : ℕ\nr : ℝ\nhb : 1 < b\nhr✝ : 0 ≤ r\nhr : 0 < r\nhb1' : 1 < ↑b\n⊢ ↑b ^ ↑⌊logb (↑b) r⌋ ≤ r\n[PROOFSTEP]\nrefine' le_of_le_of_eq _ (rpow_logb (zero_lt_one.trans hb1') hb1'.ne' hr)\n[GOAL]\ncase inr.a\nb✝ x y : ℝ\nb : ℕ\nr : ℝ\nhb : 1 < b\nhr✝ : 0 ≤ r\nhr : 0 < r\nhb1' : 1 < ↑b\n⊢ ↑b ^ ↑⌊logb (↑b) r⌋ ≤ ↑b ^ logb (↑b) r\n[PROOFSTEP]\nexact rpow_le_rpow_of_exponent_le hb1'.le (Int.floor_le _)\n[GOAL]\ncase inr.a\nb✝ x y : ℝ\nb : ℕ\nr : ℝ\nhb : 1 < b\nhr✝ : 0 ≤ r\nhr : 0 < r\nhb1' : 1 < ↑b\n⊢ Int.log b r ≤ ⌊logb (↑b) r⌋\n[PROOFSTEP]\nrw [Int.le_floor, le_logb_iff_rpow_le hb1' hr, rpow_int_cast]\n[GOAL]\ncase inr.a\nb✝ x y : ℝ\nb : ℕ\nr : ℝ\nhb : 1 < b\nhr✝ : 0 ≤ r\nhr : 0 < r\nhb1' : 1 < ↑b\n⊢ ↑b ^ Int.log b r ≤ r\n[PROOFSTEP]\nexact Int.zpow_log_le_self hb hr\n[GOAL]\nb✝ x y : ℝ\nb : ℕ\nr : ℝ\nhb : 1 < b\nhr : 0 ≤ r\n⊢ ⌈logb (↑b) r⌉ = Int.clog b r\n[PROOFSTEP]\nobtain rfl | hr := hr.eq_or_lt\n[GOAL]\ncase inl\nb✝ x y : ℝ\nb : ℕ\nhb : 1 < b\nhr : 0 ≤ 0\n⊢ ⌈logb (↑b) 0⌉ = Int.clog b 0\n[PROOFSTEP]\nrw [logb_zero, Int.clog_zero_right, Int.ceil_zero]\n[GOAL]\ncase inr\nb✝ x y : ℝ\nb : ℕ\nr : ℝ\nhb : 1 < b\nhr✝ : 0 ≤ r\nhr : 0 < r\n⊢ ⌈logb (↑b) r⌉ = Int.clog b r\n[PROOFSTEP]\nhave hb1' : 1 < (b : ℝ) := Nat.one_lt_cast.mpr hb\n[GOAL]\ncase inr\nb✝ x y : ℝ\nb : ℕ\nr : ℝ\nhb : 1 < b\nhr✝ : 0 ≤ r\nhr : 0 < r\nhb1' : 1 < ↑b\n⊢ ⌈logb (↑b) r⌉ = Int.clog b r\n[PROOFSTEP]\napply le_antisymm\n[GOAL]\ncase inr.a\nb✝ x y : ℝ\nb : ℕ\nr : ℝ\nhb : 1 < b\nhr✝ : 0 ≤ r\nhr : 0 < r\nhb1' : 1 < ↑b\n⊢ ⌈logb (↑b) r⌉ ≤ Int.clog b r\n[PROOFSTEP]\nrw [Int.ceil_le, logb_le_iff_le_rpow hb1' hr, rpow_int_cast]\n[GOAL]\ncase inr.a\nb✝ x y : ℝ\nb : ℕ\nr : ℝ\nhb : 1 < b\nhr✝ : 0 ≤ r\nhr : 0 < r\nhb1' : 1 < ↑b\n⊢ r ≤ ↑b ^ Int.clog b r\n[PROOFSTEP]\nrefine' Int.self_le_zpow_clog hb r\n[GOAL]\ncase inr.a\nb✝ x y : ℝ\nb : ℕ\nr : ℝ\nhb : 1 < b\nhr✝ : 0 ≤ r\nhr : 0 < r\nhb1' : 1 < ↑b\n⊢ Int.clog b r ≤ ⌈logb (↑b) r⌉\n[PROOFSTEP]\nrw [← Int.le_zpow_iff_clog_le hb hr, ← rpow_int_cast b]\n[GOAL]\ncase inr.a\nb✝ x y : ℝ\nb : ℕ\nr : ℝ\nhb : 1 < b\nhr✝ : 0 ≤ r\nhr : 0 < r\nhb1' : 1 < ↑b\n⊢ r ≤ ↑b ^ ↑⌈logb (↑b) r⌉\n[PROOFSTEP]\nrefine' (rpow_logb (zero_lt_one.trans hb1') hb1'.ne' hr).symm.trans_le _\n[GOAL]\ncase inr.a\nb✝ x y : ℝ\nb : ℕ\nr : ℝ\nhb : 1 < b\nhr✝ : 0 ≤ r\nhr : 0 < r\nhb1' : 1 < ↑b\n⊢ ↑b ^ logb (↑b) r ≤ ↑b ^ ↑⌈logb (↑b) r⌉\n[PROOFSTEP]\nexact rpow_le_rpow_of_exponent_le hb1'.le (Int.le_ceil _)\n[GOAL]\nb x y : ℝ\n⊢ logb b x = 0 ↔ b = 0 ∨ b = 1 ∨ b = -1 ∨ x = 0 ∨ x = 1 ∨ x = -1\n[PROOFSTEP]\nsimp_rw [logb, div_eq_zero_iff, log_eq_zero]\n[GOAL]\nb x y : ℝ\n⊢ (x = 0 ∨ x = 1 ∨ x = -1) ∨ b = 0 ∨ b = 1 ∨ b = -1 ↔ b = 0 ∨ b = 1 ∨ b = -1 ∨ x = 0 ∨ x = 1 ∨ x = -1\n[PROOFSTEP]\ntauto\n[GOAL]\nb x y : ℝ\nα : Type u_1\ns : Finset α\nf : α → ℝ\nhf : ∀ (x : α), x ∈ s → f x ≠ 0\n⊢ logb b (∏ i in s, f i) = ∑ i in s, logb b (f i)\n[PROOFSTEP]\nclassical\ninduction' s using Finset.induction_on with a s ha ih\n· simp\nsimp only [Finset.mem_insert, forall_eq_or_imp] at hf \nsimp [ha, ih hf.2, logb_mul hf.1 (Finset.prod_ne_zero_iff.2 hf.2)]\n[GOAL]\nb x y : ℝ\nα : Type u_1\ns : Finset α\nf : α → ℝ\nhf : ∀ (x : α), x ∈ s → f x ≠ 0\n⊢ logb b (∏ i in s, f i) = ∑ i in s, logb b (f i)\n[PROOFSTEP]\ninduction' s using Finset.induction_on with a s ha ih\n[GOAL]\ncase empty\nb x y : ℝ\nα : Type u_1\ns : Finset α\nf : α → ℝ\nhf✝ : ∀ (x : α), x ∈ s → f x ≠ 0\nhf : ∀ (x : α), x ∈ ∅ → f x ≠ 0\n⊢ logb b (∏ i in ∅, f i) = ∑ i in ∅, logb b (f i)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase insert\nb x y : ℝ\nα : Type u_1\ns✝ : Finset α\nf : α → ℝ\nhf✝ : ∀ (x : α), x ∈ s✝ → f x ≠ 0\na : α\ns : Finset α\nha : ¬a ∈ s\nih : (∀ (x : α), x ∈ s → f x ≠ 0) → logb b (∏ i in s, f i) = ∑ i in s, logb b (f i)\nhf : ∀ (x : α), x ∈ insert a s → f x ≠ 0\n⊢ logb b (∏ i in insert a s, f i) = ∑ i in insert a s, logb b (f i)\n[PROOFSTEP]\nsimp only [Finset.mem_insert, forall_eq_or_imp] at hf \n[GOAL]\ncase insert\nb x y : ℝ\nα : Type u_1\ns✝ : Finset α\nf : α → ℝ\nhf✝ : ∀ (x : α), x ∈ s✝ → f x ≠ 0\na : α\ns : Finset α\nha : ¬a ∈ s\nih : (∀ (x : α), x ∈ s → f x ≠ 0) → logb b (∏ i in s, f i) = ∑ i in s, logb b (f i)\nhf : f a ≠ 0 ∧ ∀ (a : α), a ∈ s → f a ≠ 0\n⊢ logb b (∏ i in insert a s, f i) = ∑ i in insert a s, logb b (f i)\n[PROOFSTEP]\nsimp [ha, ih hf.2, logb_mul hf.1 (Finset.prod_ne_zero_iff.2 hf.2)]\n", "meta": {"mathlib_filename": "Mathlib.Analysis.SpecialFunctions.Log.Base", "llama_tokens": 11375, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.841825635346563, "lm_q2_score": 0.6513548714339145, "lm_q1q2_score": 0.5483272284809338}}
{"text": "[GOAL]\na b : PosNum\n⊢ Decidable ((fun x x_1 => x < x_1) a b)\n[PROOFSTEP]\ndsimp [LT.lt]\n[GOAL]\na b : PosNum\n⊢ Decidable (cmp a b = lt)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\na b : PosNum\n⊢ Decidable ((fun x x_1 => x ≤ x_1) a b)\n[PROOFSTEP]\ndsimp [LE.le]\n[GOAL]\na b : PosNum\n⊢ Decidable ¬b < a\n[PROOFSTEP]\ninfer_instance\n[GOAL]\na b : Num\n⊢ Decidable ((fun x x_1 => x < x_1) a b)\n[PROOFSTEP]\ndsimp [LT.lt]\n[GOAL]\na b : Num\n⊢ Decidable (cmp a b = lt)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\na b : Num\n⊢ Decidable ((fun x x_1 => x ≤ x_1) a b)\n[PROOFSTEP]\ndsimp [LE.le]\n[GOAL]\na b : Num\n⊢ Decidable ¬b < a\n[PROOFSTEP]\ninfer_instance\n[GOAL]\na b : ZNum\n⊢ Decidable ((fun x x_1 => x < x_1) a b)\n[PROOFSTEP]\ndsimp [LT.lt]\n[GOAL]\na b : ZNum\n⊢ Decidable (cmp a b = lt)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\na b : ZNum\n⊢ Decidable ((fun x x_1 => x ≤ x_1) a b)\n[PROOFSTEP]\ndsimp [LE.le]\n[GOAL]\na b : ZNum\n⊢ Decidable ¬b < a\n[PROOFSTEP]\ninfer_instance\n", "meta": {"mathlib_filename": "Mathlib.Data.Num.Basic", "llama_tokens": 488, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8418256393148981, "lm_q2_score": 0.651354857898194, "lm_q1q2_score": 0.5483272196710117}}
{"text": "[GOAL]\nx y : ℤ\nd : ℕ\nhd : Int.gcd x y = d\nh : Nat.beq d 1 = false\n⊢ ¬IsCoprime x y\n[PROOFSTEP]\nrw [Int.isCoprime_iff_gcd_eq_one, hd]\n[GOAL]\nx y : ℤ\nd : ℕ\nhd : Int.gcd x y = d\nh : Nat.beq d 1 = false\n⊢ ¬d = 1\n[PROOFSTEP]\nexact Nat.ne_of_beq_eq_false h\n", "meta": {"mathlib_filename": "Mathlib.Tactic.NormNum.IsCoprime", "llama_tokens": 150, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES\n\n", "lm_q1_score": 0.8705972549785201, "lm_q2_score": 0.6297746004557471, "lm_q1q2_score": 0.5482800384119677}}
{"text": "[GOAL]\nI✝ : Type u\nf : I✝ → Type v\nI : Type u_1\nJ : Type u_2\nα : Type u_3\nx : I → α\ny : J → α\ninst✝ : Star α\n⊢ star (Sum.elim x y) = Sum.elim (star x) (star y)\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nI✝ : Type u\nf : I✝ → Type v\nI : Type u_1\nJ : Type u_2\nα : Type u_3\nx✝ : I → α\ny : J → α\ninst✝ : Star α\nx : I ⊕ J\n⊢ star (Sum.elim x✝ y) x = Sum.elim (star x✝) (star y) x\n[PROOFSTEP]\ncases x\n[GOAL]\ncase h.inl\nI✝ : Type u\nf : I✝ → Type v\nI : Type u_1\nJ : Type u_2\nα : Type u_3\nx : I → α\ny : J → α\ninst✝ : Star α\nval✝ : I\n⊢ star (Sum.elim x y) (Sum.inl val✝) = Sum.elim (star x) (star y) (Sum.inl val✝)\n[PROOFSTEP]\nsimp only [Pi.star_apply, Sum.elim_inl, Sum.elim_inr]\n[GOAL]\ncase h.inr\nI✝ : Type u\nf : I✝ → Type v\nI : Type u_1\nJ : Type u_2\nα : Type u_3\nx : I → α\ny : J → α\ninst✝ : Star α\nval✝ : J\n⊢ star (Sum.elim x y) (Sum.inr val✝) = Sum.elim (star x) (star y) (Sum.inr val✝)\n[PROOFSTEP]\nsimp only [Pi.star_apply, Sum.elim_inl, Sum.elim_inr]\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Star.Pi", "llama_tokens": 525, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7799929104825007, "lm_q2_score": 0.7025300636233416, "lm_q1q2_score": 0.5479684690270267}}
{"text": "[GOAL]\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\ni j : n\n⊢ transvection i j 0 = 1\n[PROOFSTEP]\nsimp [transvection]\n[GOAL]\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁴ : Field 𝕜\ninst✝³ : DecidableEq n\ninst✝² : DecidableEq p\ninst✝¹ : CommRing R\ni j : n\ninst✝ : Finite n\nc : R\n⊢ updateRow 1 i (OfNat.ofNat 1 i + c • OfNat.ofNat 1 j) = transvection i j c\n[PROOFSTEP]\ncases nonempty_fintype n\n[GOAL]\ncase intro\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁴ : Field 𝕜\ninst✝³ : DecidableEq n\ninst✝² : DecidableEq p\ninst✝¹ : CommRing R\ni j : n\ninst✝ : Finite n\nc : R\nval✝ : Fintype n\n⊢ updateRow 1 i (OfNat.ofNat 1 i + c • OfNat.ofNat 1 j) = transvection i j c\n[PROOFSTEP]\next a b\n[GOAL]\ncase intro.a.h\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁴ : Field 𝕜\ninst✝³ : DecidableEq n\ninst✝² : DecidableEq p\ninst✝¹ : CommRing R\ni j : n\ninst✝ : Finite n\nc : R\nval✝ : Fintype n\na b : n\n⊢ updateRow 1 i (OfNat.ofNat 1 i + c • OfNat.ofNat 1 j) a b = transvection i j c a b\n[PROOFSTEP]\nby_cases ha : i = a\n[GOAL]\ncase pos\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁴ : Field 𝕜\ninst✝³ : DecidableEq n\ninst✝² : DecidableEq p\ninst✝¹ : CommRing R\ni j : n\ninst✝ : Finite n\nc : R\nval✝ : Fintype n\na b : n\nha : i = a\n⊢ updateRow 1 i (OfNat.ofNat 1 i + c • OfNat.ofNat 1 j) a b = transvection i j c a b\ncase neg\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁴ : Field 𝕜\ninst✝³ : DecidableEq n\ninst✝² : DecidableEq p\ninst✝¹ : CommRing R\ni j : n\ninst✝ : Finite n\nc : R\nval✝ : Fintype n\na b : n\nha : ¬i = a\n⊢ updateRow 1 i (OfNat.ofNat 1 i + c • OfNat.ofNat 1 j) a b = transvection i j c a b\n[PROOFSTEP]\nby_cases hb : j = b\n[GOAL]\ncase pos\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁴ : Field 𝕜\ninst✝³ : DecidableEq n\ninst✝² : DecidableEq p\ninst✝¹ : CommRing R\ni j : n\ninst✝ : Finite n\nc : R\nval✝ : Fintype n\na b : n\nha : i = a\nhb : j = b\n⊢ updateRow 1 i (OfNat.ofNat 1 i + c • OfNat.ofNat 1 j) a b = transvection i j c a b\n[PROOFSTEP]\nsimp only [updateRow_self, transvection, ha, hb, Pi.add_apply, StdBasisMatrix.apply_same, one_apply_eq, Pi.smul_apply,\n  mul_one, Algebra.id.smul_eq_mul, add_apply]\n[GOAL]\ncase neg\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁴ : Field 𝕜\ninst✝³ : DecidableEq n\ninst✝² : DecidableEq p\ninst✝¹ : CommRing R\ni j : n\ninst✝ : Finite n\nc : R\nval✝ : Fintype n\na b : n\nha : i = a\nhb : ¬j = b\n⊢ updateRow 1 i (OfNat.ofNat 1 i + c • OfNat.ofNat 1 j) a b = transvection i j c a b\n[PROOFSTEP]\nsimp only [updateRow_self, transvection, ha, hb, StdBasisMatrix.apply_of_ne, Pi.add_apply, Ne.def, not_false_iff,\n  Pi.smul_apply, and_false_iff, one_apply_ne, Algebra.id.smul_eq_mul, mul_zero, add_apply]\n[GOAL]\ncase neg\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁴ : Field 𝕜\ninst✝³ : DecidableEq n\ninst✝² : DecidableEq p\ninst✝¹ : CommRing R\ni j : n\ninst✝ : Finite n\nc : R\nval✝ : Fintype n\na b : n\nha : ¬i = a\n⊢ updateRow 1 i (OfNat.ofNat 1 i + c • OfNat.ofNat 1 j) a b = transvection i j c a b\n[PROOFSTEP]\nsimp only [updateRow_ne, transvection, ha, Ne.symm ha, StdBasisMatrix.apply_of_ne, add_zero, Algebra.id.smul_eq_mul,\n  Ne.def, not_false_iff, DMatrix.add_apply, Pi.smul_apply, mul_zero, false_and_iff, add_apply]\n[GOAL]\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁴ : Field 𝕜\ninst✝³ : DecidableEq n\ninst✝² : DecidableEq p\ninst✝¹ : CommRing R\ni j : n\ninst✝ : Fintype n\nh : i ≠ j\nc d : R\n⊢ transvection i j c * transvection i j d = transvection i j (c + d)\n[PROOFSTEP]\nsimp [transvection, Matrix.add_mul, Matrix.mul_add, h, h.symm, add_smul, add_assoc, stdBasisMatrix_add]\n[GOAL]\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁴ : Field 𝕜\ninst✝³ : DecidableEq n\ninst✝² : DecidableEq p\ninst✝¹ : CommRing R\ni j : n\ninst✝ : Fintype n\nb : n\nc : R\nM : Matrix n n R\n⊢ (transvection i j c * M) i b = M i b + c * M j b\n[PROOFSTEP]\nsimp [transvection, Matrix.add_mul]\n[GOAL]\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁴ : Field 𝕜\ninst✝³ : DecidableEq n\ninst✝² : DecidableEq p\ninst✝¹ : CommRing R\ni j : n\ninst✝ : Fintype n\na : n\nc : R\nM : Matrix n n R\n⊢ (M * transvection i j c) a j = M a j + c * M a i\n[PROOFSTEP]\nsimp [transvection, Matrix.mul_add, mul_comm]\n[GOAL]\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁴ : Field 𝕜\ninst✝³ : DecidableEq n\ninst✝² : DecidableEq p\ninst✝¹ : CommRing R\ni j : n\ninst✝ : Fintype n\na b : n\nha : a ≠ i\nc : R\nM : Matrix n n R\n⊢ (transvection i j c * M) a b = M a b\n[PROOFSTEP]\nsimp [transvection, Matrix.add_mul, ha]\n[GOAL]\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁴ : Field 𝕜\ninst✝³ : DecidableEq n\ninst✝² : DecidableEq p\ninst✝¹ : CommRing R\ni j : n\ninst✝ : Fintype n\na b : n\nhb : b ≠ j\nc : R\nM : Matrix n n R\n⊢ (M * transvection i j c) a b = M a b\n[PROOFSTEP]\nsimp [transvection, Matrix.mul_add, hb]\n[GOAL]\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁴ : Field 𝕜\ninst✝³ : DecidableEq n\ninst✝² : DecidableEq p\ninst✝¹ : CommRing R\ni j : n\ninst✝ : Fintype n\nh : i ≠ j\nc : R\n⊢ det (transvection i j c) = 1\n[PROOFSTEP]\nrw [← updateRow_eq_transvection i j, det_updateRow_add_smul_self _ h, det_one]\n[GOAL]\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁴ : Field 𝕜\ninst✝³ : DecidableEq n\ninst✝² : DecidableEq p\ninst✝¹ : CommRing R\ni j : n\ninst✝ : Nontrivial n\n⊢ Nonempty (TransvectionStruct n R)\n[PROOFSTEP]\nchoose x y hxy using exists_pair_ne n\n[GOAL]\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁴ : Field 𝕜\ninst✝³ : DecidableEq n\ninst✝² : DecidableEq p\ninst✝¹ : CommRing R\ni j : n\ninst✝ : Nontrivial n\nx y : n\nhxy : x ≠ y\n⊢ Nonempty (TransvectionStruct n R)\n[PROOFSTEP]\nexact ⟨⟨x, y, hxy, 0⟩⟩\n[GOAL]\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁴ : Field 𝕜\ninst✝³ : DecidableEq n\ninst✝² : DecidableEq p\ninst✝¹ : CommRing R\ni j : n\ninst✝ : Fintype n\nL : List (TransvectionStruct n 𝕜)\n⊢ det (List.prod (List.map toMatrix L)) = 1\n[PROOFSTEP]\ninduction' L with t L IH\n[GOAL]\ncase nil\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁴ : Field 𝕜\ninst✝³ : DecidableEq n\ninst✝² : DecidableEq p\ninst✝¹ : CommRing R\ni j : n\ninst✝ : Fintype n\n⊢ det (List.prod (List.map toMatrix [])) = 1\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁴ : Field 𝕜\ninst✝³ : DecidableEq n\ninst✝² : DecidableEq p\ninst✝¹ : CommRing R\ni j : n\ninst✝ : Fintype n\nt : TransvectionStruct n 𝕜\nL : List (TransvectionStruct n 𝕜)\nIH : det (List.prod (List.map toMatrix L)) = 1\n⊢ det (List.prod (List.map toMatrix (t :: L))) = 1\n[PROOFSTEP]\nsimp [IH]\n[GOAL]\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁴ : Field 𝕜\ninst✝³ : DecidableEq n\ninst✝² : DecidableEq p\ninst✝¹ : CommRing R\ni j : n\ninst✝ : Fintype n\nt : TransvectionStruct n R\n⊢ toMatrix (TransvectionStruct.inv t) * toMatrix t = 1\n[PROOFSTEP]\nrcases t with ⟨_, _, t_hij⟩\n[GOAL]\ncase mk\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁴ : Field 𝕜\ninst✝³ : DecidableEq n\ninst✝² : DecidableEq p\ninst✝¹ : CommRing R\ni j : n\ninst✝ : Fintype n\ni✝ j✝ : n\nt_hij : i✝ ≠ j✝\nc✝ : R\n⊢ toMatrix (TransvectionStruct.inv { i := i✝, j := j✝, hij := t_hij, c := c✝ }) *\n      toMatrix { i := i✝, j := j✝, hij := t_hij, c := c✝ } =\n    1\n[PROOFSTEP]\nsimp [toMatrix, transvection_mul_transvection_same, t_hij]\n[GOAL]\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁴ : Field 𝕜\ninst✝³ : DecidableEq n\ninst✝² : DecidableEq p\ninst✝¹ : CommRing R\ni j : n\ninst✝ : Fintype n\nt : TransvectionStruct n R\n⊢ toMatrix t * toMatrix (TransvectionStruct.inv t) = 1\n[PROOFSTEP]\nrcases t with ⟨_, _, t_hij⟩\n[GOAL]\ncase mk\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁴ : Field 𝕜\ninst✝³ : DecidableEq n\ninst✝² : DecidableEq p\ninst✝¹ : CommRing R\ni j : n\ninst✝ : Fintype n\ni✝ j✝ : n\nt_hij : i✝ ≠ j✝\nc✝ : R\n⊢ toMatrix { i := i✝, j := j✝, hij := t_hij, c := c✝ } *\n      toMatrix (TransvectionStruct.inv { i := i✝, j := j✝, hij := t_hij, c := c✝ }) =\n    1\n[PROOFSTEP]\nsimp [toMatrix, transvection_mul_transvection_same, t_hij]\n[GOAL]\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁴ : Field 𝕜\ninst✝³ : DecidableEq n\ninst✝² : DecidableEq p\ninst✝¹ : CommRing R\ni j : n\ninst✝ : Fintype n\nL : List (TransvectionStruct n R)\n⊢ List.prod (List.map (toMatrix ∘ TransvectionStruct.inv) (List.reverse L)) * List.prod (List.map toMatrix L) = 1\n[PROOFSTEP]\ninduction' L with t L IH\n[GOAL]\ncase nil\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁴ : Field 𝕜\ninst✝³ : DecidableEq n\ninst✝² : DecidableEq p\ninst✝¹ : CommRing R\ni j : n\ninst✝ : Fintype n\n⊢ List.prod (List.map (toMatrix ∘ TransvectionStruct.inv) (List.reverse [])) * List.prod (List.map toMatrix []) = 1\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁴ : Field 𝕜\ninst✝³ : DecidableEq n\ninst✝² : DecidableEq p\ninst✝¹ : CommRing R\ni j : n\ninst✝ : Fintype n\nt : TransvectionStruct n R\nL : List (TransvectionStruct n R)\nIH : List.prod (List.map (toMatrix ∘ TransvectionStruct.inv) (List.reverse L)) * List.prod (List.map toMatrix L) = 1\n⊢ List.prod (List.map (toMatrix ∘ TransvectionStruct.inv) (List.reverse (t :: L))) *\n      List.prod (List.map toMatrix (t :: L)) =\n    1\n[PROOFSTEP]\nsuffices\n  (L.reverse.map (toMatrix ∘ TransvectionStruct.inv)).prod * (t.inv.toMatrix * t.toMatrix) * (L.map toMatrix).prod = 1\n  by simpa [Matrix.mul_assoc]\n[GOAL]\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁴ : Field 𝕜\ninst✝³ : DecidableEq n\ninst✝² : DecidableEq p\ninst✝¹ : CommRing R\ni j : n\ninst✝ : Fintype n\nt : TransvectionStruct n R\nL : List (TransvectionStruct n R)\nIH : List.prod (List.map (toMatrix ∘ TransvectionStruct.inv) (List.reverse L)) * List.prod (List.map toMatrix L) = 1\nthis :\n  List.prod (List.map (toMatrix ∘ TransvectionStruct.inv) (List.reverse L)) *\n        (toMatrix (TransvectionStruct.inv t) * toMatrix t) *\n      List.prod (List.map toMatrix L) =\n    1\n⊢ List.prod (List.map (toMatrix ∘ TransvectionStruct.inv) (List.reverse (t :: L))) *\n      List.prod (List.map toMatrix (t :: L)) =\n    1\n[PROOFSTEP]\nsimpa [Matrix.mul_assoc]\n[GOAL]\ncase cons\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁴ : Field 𝕜\ninst✝³ : DecidableEq n\ninst✝² : DecidableEq p\ninst✝¹ : CommRing R\ni j : n\ninst✝ : Fintype n\nt : TransvectionStruct n R\nL : List (TransvectionStruct n R)\nIH : List.prod (List.map (toMatrix ∘ TransvectionStruct.inv) (List.reverse L)) * List.prod (List.map toMatrix L) = 1\n⊢ List.prod (List.map (toMatrix ∘ TransvectionStruct.inv) (List.reverse L)) *\n        (toMatrix (TransvectionStruct.inv t) * toMatrix t) *\n      List.prod (List.map toMatrix L) =\n    1\n[PROOFSTEP]\nsimpa [inv_mul] using IH\n[GOAL]\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁴ : Field 𝕜\ninst✝³ : DecidableEq n\ninst✝² : DecidableEq p\ninst✝¹ : CommRing R\ni j : n\ninst✝ : Fintype n\nL : List (TransvectionStruct n R)\n⊢ List.prod (List.map toMatrix L) * List.prod (List.map (toMatrix ∘ TransvectionStruct.inv) (List.reverse L)) = 1\n[PROOFSTEP]\ninduction' L with t L IH\n[GOAL]\ncase nil\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁴ : Field 𝕜\ninst✝³ : DecidableEq n\ninst✝² : DecidableEq p\ninst✝¹ : CommRing R\ni j : n\ninst✝ : Fintype n\n⊢ List.prod (List.map toMatrix []) * List.prod (List.map (toMatrix ∘ TransvectionStruct.inv) (List.reverse [])) = 1\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁴ : Field 𝕜\ninst✝³ : DecidableEq n\ninst✝² : DecidableEq p\ninst✝¹ : CommRing R\ni j : n\ninst✝ : Fintype n\nt : TransvectionStruct n R\nL : List (TransvectionStruct n R)\nIH : List.prod (List.map toMatrix L) * List.prod (List.map (toMatrix ∘ TransvectionStruct.inv) (List.reverse L)) = 1\n⊢ List.prod (List.map toMatrix (t :: L)) *\n      List.prod (List.map (toMatrix ∘ TransvectionStruct.inv) (List.reverse (t :: L))) =\n    1\n[PROOFSTEP]\nsuffices\n  t.toMatrix * ((L.map toMatrix).prod * (L.reverse.map (toMatrix ∘ TransvectionStruct.inv)).prod) * t.inv.toMatrix = 1\n  by simpa [Matrix.mul_assoc]\n[GOAL]\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁴ : Field 𝕜\ninst✝³ : DecidableEq n\ninst✝² : DecidableEq p\ninst✝¹ : CommRing R\ni j : n\ninst✝ : Fintype n\nt : TransvectionStruct n R\nL : List (TransvectionStruct n R)\nIH : List.prod (List.map toMatrix L) * List.prod (List.map (toMatrix ∘ TransvectionStruct.inv) (List.reverse L)) = 1\nthis :\n  toMatrix t *\n        (List.prod (List.map toMatrix L) * List.prod (List.map (toMatrix ∘ TransvectionStruct.inv) (List.reverse L))) *\n      toMatrix (TransvectionStruct.inv t) =\n    1\n⊢ List.prod (List.map toMatrix (t :: L)) *\n      List.prod (List.map (toMatrix ∘ TransvectionStruct.inv) (List.reverse (t :: L))) =\n    1\n[PROOFSTEP]\nsimpa [Matrix.mul_assoc]\n[GOAL]\ncase cons\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁴ : Field 𝕜\ninst✝³ : DecidableEq n\ninst✝² : DecidableEq p\ninst✝¹ : CommRing R\ni j : n\ninst✝ : Fintype n\nt : TransvectionStruct n R\nL : List (TransvectionStruct n R)\nIH : List.prod (List.map toMatrix L) * List.prod (List.map (toMatrix ∘ TransvectionStruct.inv) (List.reverse L)) = 1\n⊢ toMatrix t *\n        (List.prod (List.map toMatrix L) * List.prod (List.map (toMatrix ∘ TransvectionStruct.inv) (List.reverse L))) *\n      toMatrix (TransvectionStruct.inv t) =\n    1\n[PROOFSTEP]\nsimp_rw [IH, Matrix.mul_one, t.mul_inv]\n[GOAL]\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\ni j : n\nt : TransvectionStruct n R\n⊢ inl t.i ≠ inl t.j\n[PROOFSTEP]\nsimp [t.hij]\n[GOAL]\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\ni j : n\nt : TransvectionStruct n R\n⊢ toMatrix (sumInl p t) = fromBlocks (toMatrix t) 0 0 1\n[PROOFSTEP]\ncases t\n[GOAL]\ncase mk\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\ni j i✝ j✝ : n\nhij✝ : i✝ ≠ j✝\nc✝ : R\n⊢ toMatrix (sumInl p { i := i✝, j := j✝, hij := hij✝, c := c✝ }) =\n    fromBlocks (toMatrix { i := i✝, j := j✝, hij := hij✝, c := c✝ }) 0 0 1\n[PROOFSTEP]\next a b\n[GOAL]\ncase mk.a.h\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\ni j i✝ j✝ : n\nhij✝ : i✝ ≠ j✝\nc✝ : R\na b : n ⊕ p\n⊢ toMatrix (sumInl p { i := i✝, j := j✝, hij := hij✝, c := c✝ }) a b =\n    fromBlocks (toMatrix { i := i✝, j := j✝, hij := hij✝, c := c✝ }) 0 0 1 a b\n[PROOFSTEP]\ncases' a with a a\n[GOAL]\ncase mk.a.h.inl\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\ni j i✝ j✝ : n\nhij✝ : i✝ ≠ j✝\nc✝ : R\nb : n ⊕ p\na : n\n⊢ toMatrix (sumInl p { i := i✝, j := j✝, hij := hij✝, c := c✝ }) (inl a) b =\n    fromBlocks (toMatrix { i := i✝, j := j✝, hij := hij✝, c := c✝ }) 0 0 1 (inl a) b\n[PROOFSTEP]\ncases' b with b b\n[GOAL]\ncase mk.a.h.inr\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\ni j i✝ j✝ : n\nhij✝ : i✝ ≠ j✝\nc✝ : R\nb : n ⊕ p\na : p\n⊢ toMatrix (sumInl p { i := i✝, j := j✝, hij := hij✝, c := c✝ }) (inr a) b =\n    fromBlocks (toMatrix { i := i✝, j := j✝, hij := hij✝, c := c✝ }) 0 0 1 (inr a) b\n[PROOFSTEP]\ncases' b with b b\n[GOAL]\ncase mk.a.h.inl.inl\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\ni j i✝ j✝ : n\nhij✝ : i✝ ≠ j✝\nc✝ : R\na b : n\n⊢ toMatrix (sumInl p { i := i✝, j := j✝, hij := hij✝, c := c✝ }) (inl a) (inl b) =\n    fromBlocks (toMatrix { i := i✝, j := j✝, hij := hij✝, c := c✝ }) 0 0 1 (inl a) (inl b)\n[PROOFSTEP]\nby_cases h : a = b\n[GOAL]\ncase pos\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\ni j i✝ j✝ : n\nhij✝ : i✝ ≠ j✝\nc✝ : R\na b : n\nh : a = b\n⊢ toMatrix (sumInl p { i := i✝, j := j✝, hij := hij✝, c := c✝ }) (inl a) (inl b) =\n    fromBlocks (toMatrix { i := i✝, j := j✝, hij := hij✝, c := c✝ }) 0 0 1 (inl a) (inl b)\n[PROOFSTEP]\nsimp [TransvectionStruct.sumInl, transvection, h, stdBasisMatrix]\n[GOAL]\ncase neg\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\ni j i✝ j✝ : n\nhij✝ : i✝ ≠ j✝\nc✝ : R\na b : n\nh : ¬a = b\n⊢ toMatrix (sumInl p { i := i✝, j := j✝, hij := hij✝, c := c✝ }) (inl a) (inl b) =\n    fromBlocks (toMatrix { i := i✝, j := j✝, hij := hij✝, c := c✝ }) 0 0 1 (inl a) (inl b)\n[PROOFSTEP]\nsimp [TransvectionStruct.sumInl, transvection, h, stdBasisMatrix]\n[GOAL]\ncase mk.a.h.inl.inr\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\ni j i✝ j✝ : n\nhij✝ : i✝ ≠ j✝\nc✝ : R\na : n\nb : p\n⊢ toMatrix (sumInl p { i := i✝, j := j✝, hij := hij✝, c := c✝ }) (inl a) (inr b) =\n    fromBlocks (toMatrix { i := i✝, j := j✝, hij := hij✝, c := c✝ }) 0 0 1 (inl a) (inr b)\n[PROOFSTEP]\nsimp [TransvectionStruct.sumInl, transvection]\n[GOAL]\ncase mk.a.h.inr.inl\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\ni j i✝ j✝ : n\nhij✝ : i✝ ≠ j✝\nc✝ : R\na : p\nb : n\n⊢ toMatrix (sumInl p { i := i✝, j := j✝, hij := hij✝, c := c✝ }) (inr a) (inl b) =\n    fromBlocks (toMatrix { i := i✝, j := j✝, hij := hij✝, c := c✝ }) 0 0 1 (inr a) (inl b)\n[PROOFSTEP]\nsimp [TransvectionStruct.sumInl, transvection]\n[GOAL]\ncase mk.a.h.inr.inr\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\ni j i✝ j✝ : n\nhij✝ : i✝ ≠ j✝\nc✝ : R\na b : p\n⊢ toMatrix (sumInl p { i := i✝, j := j✝, hij := hij✝, c := c✝ }) (inr a) (inr b) =\n    fromBlocks (toMatrix { i := i✝, j := j✝, hij := hij✝, c := c✝ }) 0 0 1 (inr a) (inr b)\n[PROOFSTEP]\nby_cases h : a = b\n[GOAL]\ncase pos\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\ni j i✝ j✝ : n\nhij✝ : i✝ ≠ j✝\nc✝ : R\na b : p\nh : a = b\n⊢ toMatrix (sumInl p { i := i✝, j := j✝, hij := hij✝, c := c✝ }) (inr a) (inr b) =\n    fromBlocks (toMatrix { i := i✝, j := j✝, hij := hij✝, c := c✝ }) 0 0 1 (inr a) (inr b)\n[PROOFSTEP]\nsimp [TransvectionStruct.sumInl, transvection, h]\n[GOAL]\ncase neg\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\ni j i✝ j✝ : n\nhij✝ : i✝ ≠ j✝\nc✝ : R\na b : p\nh : ¬a = b\n⊢ toMatrix (sumInl p { i := i✝, j := j✝, hij := hij✝, c := c✝ }) (inr a) (inr b) =\n    fromBlocks (toMatrix { i := i✝, j := j✝, hij := hij✝, c := c✝ }) 0 0 1 (inr a) (inr b)\n[PROOFSTEP]\nsimp [TransvectionStruct.sumInl, transvection, h]\n[GOAL]\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁵ : Field 𝕜\ninst✝⁴ : DecidableEq n\ninst✝³ : DecidableEq p\ninst✝² : CommRing R\ni j : n\ninst✝¹ : Fintype n\ninst✝ : Fintype p\nM : Matrix n n R\nL : List (TransvectionStruct n R)\nN : Matrix p p R\n⊢ List.prod (List.map (toMatrix ∘ sumInl p) L) * fromBlocks M 0 0 N =\n    fromBlocks (List.prod (List.map toMatrix L) * M) 0 0 N\n[PROOFSTEP]\ninduction' L with t L IH\n[GOAL]\ncase nil\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁵ : Field 𝕜\ninst✝⁴ : DecidableEq n\ninst✝³ : DecidableEq p\ninst✝² : CommRing R\ni j : n\ninst✝¹ : Fintype n\ninst✝ : Fintype p\nM : Matrix n n R\nN : Matrix p p R\n⊢ List.prod (List.map (toMatrix ∘ sumInl p) []) * fromBlocks M 0 0 N =\n    fromBlocks (List.prod (List.map toMatrix []) * M) 0 0 N\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁵ : Field 𝕜\ninst✝⁴ : DecidableEq n\ninst✝³ : DecidableEq p\ninst✝² : CommRing R\ni j : n\ninst✝¹ : Fintype n\ninst✝ : Fintype p\nM : Matrix n n R\nN : Matrix p p R\nt : TransvectionStruct n R\nL : List (TransvectionStruct n R)\nIH :\n  List.prod (List.map (toMatrix ∘ sumInl p) L) * fromBlocks M 0 0 N =\n    fromBlocks (List.prod (List.map toMatrix L) * M) 0 0 N\n⊢ List.prod (List.map (toMatrix ∘ sumInl p) (t :: L)) * fromBlocks M 0 0 N =\n    fromBlocks (List.prod (List.map toMatrix (t :: L)) * M) 0 0 N\n[PROOFSTEP]\nsimp [Matrix.mul_assoc, IH, toMatrix_sumInl, fromBlocks_multiply]\n[GOAL]\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁵ : Field 𝕜\ninst✝⁴ : DecidableEq n\ninst✝³ : DecidableEq p\ninst✝² : CommRing R\ni j : n\ninst✝¹ : Fintype n\ninst✝ : Fintype p\nM : Matrix n n R\nL : List (TransvectionStruct n R)\nN : Matrix p p R\n⊢ fromBlocks M 0 0 N * List.prod (List.map (toMatrix ∘ sumInl p) L) =\n    fromBlocks (M * List.prod (List.map toMatrix L)) 0 0 N\n[PROOFSTEP]\ninduction' L with t L IH generalizing M N\n[GOAL]\ncase nil\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁵ : Field 𝕜\ninst✝⁴ : DecidableEq n\ninst✝³ : DecidableEq p\ninst✝² : CommRing R\ni j : n\ninst✝¹ : Fintype n\ninst✝ : Fintype p\nM✝ : Matrix n n R\nN✝ : Matrix p p R\nM : Matrix n n R\nN : Matrix p p R\n⊢ fromBlocks M 0 0 N * List.prod (List.map (toMatrix ∘ sumInl p) []) =\n    fromBlocks (M * List.prod (List.map toMatrix [])) 0 0 N\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁵ : Field 𝕜\ninst✝⁴ : DecidableEq n\ninst✝³ : DecidableEq p\ninst✝² : CommRing R\ni j : n\ninst✝¹ : Fintype n\ninst✝ : Fintype p\nM✝ : Matrix n n R\nN✝ : Matrix p p R\nt : TransvectionStruct n R\nL : List (TransvectionStruct n R)\nIH :\n  ∀ (M : Matrix n n R) (N : Matrix p p R),\n    fromBlocks M 0 0 N * List.prod (List.map (toMatrix ∘ sumInl p) L) =\n      fromBlocks (M * List.prod (List.map toMatrix L)) 0 0 N\nM : Matrix n n R\nN : Matrix p p R\n⊢ fromBlocks M 0 0 N * List.prod (List.map (toMatrix ∘ sumInl p) (t :: L)) =\n    fromBlocks (M * List.prod (List.map toMatrix (t :: L))) 0 0 N\n[PROOFSTEP]\nsimp [IH, toMatrix_sumInl, fromBlocks_multiply]\n[GOAL]\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\ni j : n\ne : n ≃ p\nt : TransvectionStruct n R\n⊢ ↑e t.i ≠ ↑e t.j\n[PROOFSTEP]\nsimp [t.hij]\n[GOAL]\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁵ : Field 𝕜\ninst✝⁴ : DecidableEq n\ninst✝³ : DecidableEq p\ninst✝² : CommRing R\ni j : n\ninst✝¹ : Fintype n\ninst✝ : Fintype p\ne : n ≃ p\nt : TransvectionStruct n R\n⊢ toMatrix (reindexEquiv e t) = ↑(reindexAlgEquiv R e) (toMatrix t)\n[PROOFSTEP]\nrcases t with ⟨t_i, t_j, _⟩\n[GOAL]\ncase mk\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁵ : Field 𝕜\ninst✝⁴ : DecidableEq n\ninst✝³ : DecidableEq p\ninst✝² : CommRing R\ni j : n\ninst✝¹ : Fintype n\ninst✝ : Fintype p\ne : n ≃ p\nt_i t_j : n\nhij✝ : t_i ≠ t_j\nc✝ : R\n⊢ toMatrix (reindexEquiv e { i := t_i, j := t_j, hij := hij✝, c := c✝ }) =\n    ↑(reindexAlgEquiv R e) (toMatrix { i := t_i, j := t_j, hij := hij✝, c := c✝ })\n[PROOFSTEP]\next a b\n[GOAL]\ncase mk.a.h\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁵ : Field 𝕜\ninst✝⁴ : DecidableEq n\ninst✝³ : DecidableEq p\ninst✝² : CommRing R\ni j : n\ninst✝¹ : Fintype n\ninst✝ : Fintype p\ne : n ≃ p\nt_i t_j : n\nhij✝ : t_i ≠ t_j\nc✝ : R\na b : p\n⊢ toMatrix (reindexEquiv e { i := t_i, j := t_j, hij := hij✝, c := c✝ }) a b =\n    ↑(reindexAlgEquiv R e) (toMatrix { i := t_i, j := t_j, hij := hij✝, c := c✝ }) a b\n[PROOFSTEP]\nsimp only [reindexEquiv, transvection, mul_boole, Algebra.id.smul_eq_mul, toMatrix_mk, submatrix_apply, reindex_apply,\n  DMatrix.add_apply, Pi.smul_apply, reindexAlgEquiv_apply]\n[GOAL]\ncase mk.a.h\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁵ : Field 𝕜\ninst✝⁴ : DecidableEq n\ninst✝³ : DecidableEq p\ninst✝² : CommRing R\ni j : n\ninst✝¹ : Fintype n\ninst✝ : Fintype p\ne : n ≃ p\nt_i t_j : n\nhij✝ : t_i ≠ t_j\nc✝ : R\na b : p\n⊢ (1 + stdBasisMatrix (↑e t_i) (↑e t_j) c✝) a b = (1 + stdBasisMatrix t_i t_j c✝) (↑e.symm a) (↑e.symm b)\n[PROOFSTEP]\nby_cases ha : e t_i = a\n[GOAL]\ncase pos\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁵ : Field 𝕜\ninst✝⁴ : DecidableEq n\ninst✝³ : DecidableEq p\ninst✝² : CommRing R\ni j : n\ninst✝¹ : Fintype n\ninst✝ : Fintype p\ne : n ≃ p\nt_i t_j : n\nhij✝ : t_i ≠ t_j\nc✝ : R\na b : p\nha : ↑e t_i = a\n⊢ (1 + stdBasisMatrix (↑e t_i) (↑e t_j) c✝) a b = (1 + stdBasisMatrix t_i t_j c✝) (↑e.symm a) (↑e.symm b)\n[PROOFSTEP]\nby_cases hb : e t_j = b\n[GOAL]\ncase neg\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁵ : Field 𝕜\ninst✝⁴ : DecidableEq n\ninst✝³ : DecidableEq p\ninst✝² : CommRing R\ni j : n\ninst✝¹ : Fintype n\ninst✝ : Fintype p\ne : n ≃ p\nt_i t_j : n\nhij✝ : t_i ≠ t_j\nc✝ : R\na b : p\nha : ¬↑e t_i = a\n⊢ (1 + stdBasisMatrix (↑e t_i) (↑e t_j) c✝) a b = (1 + stdBasisMatrix t_i t_j c✝) (↑e.symm a) (↑e.symm b)\n[PROOFSTEP]\nby_cases hb : e t_j = b\n[GOAL]\ncase pos\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁵ : Field 𝕜\ninst✝⁴ : DecidableEq n\ninst✝³ : DecidableEq p\ninst✝² : CommRing R\ni j : n\ninst✝¹ : Fintype n\ninst✝ : Fintype p\ne : n ≃ p\nt_i t_j : n\nhij✝ : t_i ≠ t_j\nc✝ : R\na b : p\nha : ↑e t_i = a\nhb : ↑e t_j = b\n⊢ (1 + stdBasisMatrix (↑e t_i) (↑e t_j) c✝) a b = (1 + stdBasisMatrix t_i t_j c✝) (↑e.symm a) (↑e.symm b)\n[PROOFSTEP]\nby_cases hab : a = b\n[GOAL]\ncase neg\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁵ : Field 𝕜\ninst✝⁴ : DecidableEq n\ninst✝³ : DecidableEq p\ninst✝² : CommRing R\ni j : n\ninst✝¹ : Fintype n\ninst✝ : Fintype p\ne : n ≃ p\nt_i t_j : n\nhij✝ : t_i ≠ t_j\nc✝ : R\na b : p\nha : ↑e t_i = a\nhb : ¬↑e t_j = b\n⊢ (1 + stdBasisMatrix (↑e t_i) (↑e t_j) c✝) a b = (1 + stdBasisMatrix t_i t_j c✝) (↑e.symm a) (↑e.symm b)\n[PROOFSTEP]\nby_cases hab : a = b\n[GOAL]\ncase pos\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁵ : Field 𝕜\ninst✝⁴ : DecidableEq n\ninst✝³ : DecidableEq p\ninst✝² : CommRing R\ni j : n\ninst✝¹ : Fintype n\ninst✝ : Fintype p\ne : n ≃ p\nt_i t_j : n\nhij✝ : t_i ≠ t_j\nc✝ : R\na b : p\nha : ¬↑e t_i = a\nhb : ↑e t_j = b\n⊢ (1 + stdBasisMatrix (↑e t_i) (↑e t_j) c✝) a b = (1 + stdBasisMatrix t_i t_j c✝) (↑e.symm a) (↑e.symm b)\n[PROOFSTEP]\nby_cases hab : a = b\n[GOAL]\ncase neg\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁵ : Field 𝕜\ninst✝⁴ : DecidableEq n\ninst✝³ : DecidableEq p\ninst✝² : CommRing R\ni j : n\ninst✝¹ : Fintype n\ninst✝ : Fintype p\ne : n ≃ p\nt_i t_j : n\nhij✝ : t_i ≠ t_j\nc✝ : R\na b : p\nha : ¬↑e t_i = a\nhb : ¬↑e t_j = b\n⊢ (1 + stdBasisMatrix (↑e t_i) (↑e t_j) c✝) a b = (1 + stdBasisMatrix t_i t_j c✝) (↑e.symm a) (↑e.symm b)\n[PROOFSTEP]\nby_cases hab : a = b\n[GOAL]\ncase pos\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁵ : Field 𝕜\ninst✝⁴ : DecidableEq n\ninst✝³ : DecidableEq p\ninst✝² : CommRing R\ni j : n\ninst✝¹ : Fintype n\ninst✝ : Fintype p\ne : n ≃ p\nt_i t_j : n\nhij✝ : t_i ≠ t_j\nc✝ : R\na b : p\nha : ↑e t_i = a\nhb : ↑e t_j = b\nhab : a = b\n⊢ (1 + stdBasisMatrix (↑e t_i) (↑e t_j) c✝) a b = (1 + stdBasisMatrix t_i t_j c✝) (↑e.symm a) (↑e.symm b)\n[PROOFSTEP]\nsimp [ha, hb, hab, ← e.apply_eq_iff_eq_symm_apply, stdBasisMatrix]\n[GOAL]\ncase neg\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁵ : Field 𝕜\ninst✝⁴ : DecidableEq n\ninst✝³ : DecidableEq p\ninst✝² : CommRing R\ni j : n\ninst✝¹ : Fintype n\ninst✝ : Fintype p\ne : n ≃ p\nt_i t_j : n\nhij✝ : t_i ≠ t_j\nc✝ : R\na b : p\nha : ↑e t_i = a\nhb : ↑e t_j = b\nhab : ¬a = b\n⊢ (1 + stdBasisMatrix (↑e t_i) (↑e t_j) c✝) a b = (1 + stdBasisMatrix t_i t_j c✝) (↑e.symm a) (↑e.symm b)\n[PROOFSTEP]\nsimp [ha, hb, hab, ← e.apply_eq_iff_eq_symm_apply, stdBasisMatrix]\n[GOAL]\ncase pos\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁵ : Field 𝕜\ninst✝⁴ : DecidableEq n\ninst✝³ : DecidableEq p\ninst✝² : CommRing R\ni j : n\ninst✝¹ : Fintype n\ninst✝ : Fintype p\ne : n ≃ p\nt_i t_j : n\nhij✝ : t_i ≠ t_j\nc✝ : R\na b : p\nha : ↑e t_i = a\nhb : ¬↑e t_j = b\nhab : a = b\n⊢ (1 + stdBasisMatrix (↑e t_i) (↑e t_j) c✝) a b = (1 + stdBasisMatrix t_i t_j c✝) (↑e.symm a) (↑e.symm b)\n[PROOFSTEP]\nsimp [ha, hb, hab, ← e.apply_eq_iff_eq_symm_apply, stdBasisMatrix]\n[GOAL]\ncase neg\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁵ : Field 𝕜\ninst✝⁴ : DecidableEq n\ninst✝³ : DecidableEq p\ninst✝² : CommRing R\ni j : n\ninst✝¹ : Fintype n\ninst✝ : Fintype p\ne : n ≃ p\nt_i t_j : n\nhij✝ : t_i ≠ t_j\nc✝ : R\na b : p\nha : ↑e t_i = a\nhb : ¬↑e t_j = b\nhab : ¬a = b\n⊢ (1 + stdBasisMatrix (↑e t_i) (↑e t_j) c✝) a b = (1 + stdBasisMatrix t_i t_j c✝) (↑e.symm a) (↑e.symm b)\n[PROOFSTEP]\nsimp [ha, hb, hab, ← e.apply_eq_iff_eq_symm_apply, stdBasisMatrix]\n[GOAL]\ncase pos\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁵ : Field 𝕜\ninst✝⁴ : DecidableEq n\ninst✝³ : DecidableEq p\ninst✝² : CommRing R\ni j : n\ninst✝¹ : Fintype n\ninst✝ : Fintype p\ne : n ≃ p\nt_i t_j : n\nhij✝ : t_i ≠ t_j\nc✝ : R\na b : p\nha : ¬↑e t_i = a\nhb : ↑e t_j = b\nhab : a = b\n⊢ (1 + stdBasisMatrix (↑e t_i) (↑e t_j) c✝) a b = (1 + stdBasisMatrix t_i t_j c✝) (↑e.symm a) (↑e.symm b)\n[PROOFSTEP]\nsimp [ha, hb, hab, ← e.apply_eq_iff_eq_symm_apply, stdBasisMatrix]\n[GOAL]\ncase neg\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁵ : Field 𝕜\ninst✝⁴ : DecidableEq n\ninst✝³ : DecidableEq p\ninst✝² : CommRing R\ni j : n\ninst✝¹ : Fintype n\ninst✝ : Fintype p\ne : n ≃ p\nt_i t_j : n\nhij✝ : t_i ≠ t_j\nc✝ : R\na b : p\nha : ¬↑e t_i = a\nhb : ↑e t_j = b\nhab : ¬a = b\n⊢ (1 + stdBasisMatrix (↑e t_i) (↑e t_j) c✝) a b = (1 + stdBasisMatrix t_i t_j c✝) (↑e.symm a) (↑e.symm b)\n[PROOFSTEP]\nsimp [ha, hb, hab, ← e.apply_eq_iff_eq_symm_apply, stdBasisMatrix]\n[GOAL]\ncase pos\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁵ : Field 𝕜\ninst✝⁴ : DecidableEq n\ninst✝³ : DecidableEq p\ninst✝² : CommRing R\ni j : n\ninst✝¹ : Fintype n\ninst✝ : Fintype p\ne : n ≃ p\nt_i t_j : n\nhij✝ : t_i ≠ t_j\nc✝ : R\na b : p\nha : ¬↑e t_i = a\nhb : ¬↑e t_j = b\nhab : a = b\n⊢ (1 + stdBasisMatrix (↑e t_i) (↑e t_j) c✝) a b = (1 + stdBasisMatrix t_i t_j c✝) (↑e.symm a) (↑e.symm b)\n[PROOFSTEP]\nsimp [ha, hb, hab, ← e.apply_eq_iff_eq_symm_apply, stdBasisMatrix]\n[GOAL]\ncase neg\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁵ : Field 𝕜\ninst✝⁴ : DecidableEq n\ninst✝³ : DecidableEq p\ninst✝² : CommRing R\ni j : n\ninst✝¹ : Fintype n\ninst✝ : Fintype p\ne : n ≃ p\nt_i t_j : n\nhij✝ : t_i ≠ t_j\nc✝ : R\na b : p\nha : ¬↑e t_i = a\nhb : ¬↑e t_j = b\nhab : ¬a = b\n⊢ (1 + stdBasisMatrix (↑e t_i) (↑e t_j) c✝) a b = (1 + stdBasisMatrix t_i t_j c✝) (↑e.symm a) (↑e.symm b)\n[PROOFSTEP]\nsimp [ha, hb, hab, ← e.apply_eq_iff_eq_symm_apply, stdBasisMatrix]\n[GOAL]\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁵ : Field 𝕜\ninst✝⁴ : DecidableEq n\ninst✝³ : DecidableEq p\ninst✝² : CommRing R\ni j : n\ninst✝¹ : Fintype n\ninst✝ : Fintype p\ne : n ≃ p\nL : List (TransvectionStruct n R)\n⊢ List.prod (List.map (toMatrix ∘ reindexEquiv e) L) = ↑(reindexAlgEquiv R e) (List.prod (List.map toMatrix L))\n[PROOFSTEP]\ninduction' L with t L IH\n[GOAL]\ncase nil\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁵ : Field 𝕜\ninst✝⁴ : DecidableEq n\ninst✝³ : DecidableEq p\ninst✝² : CommRing R\ni j : n\ninst✝¹ : Fintype n\ninst✝ : Fintype p\ne : n ≃ p\n⊢ List.prod (List.map (toMatrix ∘ reindexEquiv e) []) = ↑(reindexAlgEquiv R e) (List.prod (List.map toMatrix []))\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁵ : Field 𝕜\ninst✝⁴ : DecidableEq n\ninst✝³ : DecidableEq p\ninst✝² : CommRing R\ni j : n\ninst✝¹ : Fintype n\ninst✝ : Fintype p\ne : n ≃ p\nt : TransvectionStruct n R\nL : List (TransvectionStruct n R)\nIH : List.prod (List.map (toMatrix ∘ reindexEquiv e) L) = ↑(reindexAlgEquiv R e) (List.prod (List.map toMatrix L))\n⊢ List.prod (List.map (toMatrix ∘ reindexEquiv e) (t :: L)) =\n    ↑(reindexAlgEquiv R e) (List.prod (List.map toMatrix (t :: L)))\n[PROOFSTEP]\nsimp only [toMatrix_reindexEquiv, IH, Function.comp_apply, List.prod_cons, reindexAlgEquiv_apply, List.map]\n[GOAL]\ncase cons\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁵ : Field 𝕜\ninst✝⁴ : DecidableEq n\ninst✝³ : DecidableEq p\ninst✝² : CommRing R\ni j : n\ninst✝¹ : Fintype n\ninst✝ : Fintype p\ne : n ≃ p\nt : TransvectionStruct n R\nL : List (TransvectionStruct n R)\nIH : List.prod (List.map (toMatrix ∘ reindexEquiv e) L) = ↑(reindexAlgEquiv R e) (List.prod (List.map toMatrix L))\n⊢ ↑(reindex e e) (toMatrix t) * ↑(reindex e e) (List.prod (List.map toMatrix L)) =\n    ↑(reindex e e) (toMatrix t * List.prod (List.map toMatrix L))\n[PROOFSTEP]\nexact (reindexAlgEquiv_mul _ _ _ _).symm\n[GOAL]\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\ni : Fin r ⊕ Unit\nk : ℕ\nhk : k ≤ r\n⊢ (List.prod (List.drop k (listTransvecCol M)) * M) (inr ()) i = M (inr ()) i\n[PROOFSTEP]\nrefine' Nat.decreasingInduction' _ hk _\n[GOAL]\ncase refine'_1\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\ni : Fin r ⊕ Unit\nk : ℕ\nhk : k ≤ r\n⊢ ∀ (k_1 : ℕ),\n    k_1 < r →\n      k ≤ k_1 →\n        (List.prod (List.drop (k_1 + 1) (listTransvecCol M)) * M) (inr ()) i = M (inr ()) i →\n          (List.prod (List.drop k_1 (listTransvecCol M)) * M) (inr ()) i = M (inr ()) i\n[PROOFSTEP]\nintro n hn _ IH\n[GOAL]\ncase refine'_1\nn✝ : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n✝\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\ni : Fin r ⊕ Unit\nk : ℕ\nhk : k ≤ r\nn : ℕ\nhn : n < r\na✝ : k ≤ n\nIH : (List.prod (List.drop (n + 1) (listTransvecCol M)) * M) (inr ()) i = M (inr ()) i\n⊢ (List.prod (List.drop n (listTransvecCol M)) * M) (inr ()) i = M (inr ()) i\n[PROOFSTEP]\nhave hn' : n < (listTransvecCol M).length := by simpa [listTransvecCol] using hn\n[GOAL]\nn✝ : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n✝\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\ni : Fin r ⊕ Unit\nk : ℕ\nhk : k ≤ r\nn : ℕ\nhn : n < r\na✝ : k ≤ n\nIH : (List.prod (List.drop (n + 1) (listTransvecCol M)) * M) (inr ()) i = M (inr ()) i\n⊢ n < List.length (listTransvecCol M)\n[PROOFSTEP]\nsimpa [listTransvecCol] using hn\n[GOAL]\ncase refine'_1\nn✝ : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n✝\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\ni : Fin r ⊕ Unit\nk : ℕ\nhk : k ≤ r\nn : ℕ\nhn : n < r\na✝ : k ≤ n\nIH : (List.prod (List.drop (n + 1) (listTransvecCol M)) * M) (inr ()) i = M (inr ()) i\nhn' : n < List.length (listTransvecCol M)\n⊢ (List.prod (List.drop n (listTransvecCol M)) * M) (inr ()) i = M (inr ()) i\n[PROOFSTEP]\nrw [← @List.cons_get_drop_succ _ _ ⟨n, hn'⟩]\n[GOAL]\ncase refine'_1\nn✝ : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n✝\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\ni : Fin r ⊕ Unit\nk : ℕ\nhk : k ≤ r\nn : ℕ\nhn : n < r\na✝ : k ≤ n\nIH : (List.prod (List.drop (n + 1) (listTransvecCol M)) * M) (inr ()) i = M (inr ()) i\nhn' : n < List.length (listTransvecCol M)\n⊢ (List.prod\n          (List.get (listTransvecCol M) { val := n, isLt := hn' } ::\n            List.drop (↑{ val := n, isLt := hn' } + 1) (listTransvecCol M)) *\n        M)\n      (inr ()) i =\n    M (inr ()) i\n[PROOFSTEP]\nsimpa [listTransvecCol, Matrix.mul_assoc]\n[GOAL]\ncase refine'_2\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\ni : Fin r ⊕ Unit\nk : ℕ\nhk : k ≤ r\n⊢ (List.prod (List.drop r (listTransvecCol M)) * M) (inr ()) i = M (inr ()) i\n[PROOFSTEP]\nsimp only [listTransvecCol, List.length_ofFn, le_refl, List.drop_eq_nil_of_le, List.prod_nil, Matrix.one_mul]\n[GOAL]\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\ni : Fin r ⊕ Unit\n⊢ (List.prod (listTransvecCol M) * M) (inr ()) i = M (inr ()) i\n[PROOFSTEP]\nsimpa using listTransvecCol_mul_last_row_drop M i (zero_le _)\n[GOAL]\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\ni : Fin r\n⊢ (List.prod (listTransvecCol M) * M) (inl i) (inr ()) = 0\n[PROOFSTEP]\nsuffices H :\n  ∀ k : ℕ,\n    k ≤ r → (((listTransvecCol M).drop k).prod * M) (inl i) (inr unit) = if k ≤ i then 0 else M (inl i) (inr unit)\n[GOAL]\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\ni : Fin r\nH :\n  ∀ (k : ℕ),\n    k ≤ r →\n      (List.prod (List.drop k (listTransvecCol M)) * M) (inl i) (inr ()) = if k ≤ ↑i then 0 else M (inl i) (inr ())\n⊢ (List.prod (listTransvecCol M) * M) (inl i) (inr ()) = 0\n[PROOFSTEP]\nsimpa only [List.drop, _root_.zero_le, ite_true] using H 0 (zero_le _)\n[GOAL]\ncase H\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\ni : Fin r\n⊢ ∀ (k : ℕ),\n    k ≤ r →\n      (List.prod (List.drop k (listTransvecCol M)) * M) (inl i) (inr ()) = if k ≤ ↑i then 0 else M (inl i) (inr ())\n[PROOFSTEP]\nintro k hk\n[GOAL]\ncase H\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\ni : Fin r\nk : ℕ\nhk : k ≤ r\n⊢ (List.prod (List.drop k (listTransvecCol M)) * M) (inl i) (inr ()) = if k ≤ ↑i then 0 else M (inl i) (inr ())\n[PROOFSTEP]\nrefine' Nat.decreasingInduction' _ hk _\n[GOAL]\ncase H.refine'_1\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\ni : Fin r\nk : ℕ\nhk : k ≤ r\n⊢ ∀ (k_1 : ℕ),\n    k_1 < r →\n      k ≤ k_1 →\n        ((List.prod (List.drop (k_1 + 1) (listTransvecCol M)) * M) (inl i) (inr ()) =\n            if k_1 + 1 ≤ ↑i then 0 else M (inl i) (inr ())) →\n          (List.prod (List.drop k_1 (listTransvecCol M)) * M) (inl i) (inr ()) =\n            if k_1 ≤ ↑i then 0 else M (inl i) (inr ())\n[PROOFSTEP]\nintro n hn hk IH\n[GOAL]\ncase H.refine'_1\nn✝ : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n✝\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\ni : Fin r\nk : ℕ\nhk✝ : k ≤ r\nn : ℕ\nhn : n < r\nhk : k ≤ n\nIH :\n  (List.prod (List.drop (n + 1) (listTransvecCol M)) * M) (inl i) (inr ()) =\n    if n + 1 ≤ ↑i then 0 else M (inl i) (inr ())\n⊢ (List.prod (List.drop n (listTransvecCol M)) * M) (inl i) (inr ()) = if n ≤ ↑i then 0 else M (inl i) (inr ())\n[PROOFSTEP]\nhave hn' : n < (listTransvecCol M).length := by simpa [listTransvecCol] using hn\n[GOAL]\nn✝ : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n✝\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\ni : Fin r\nk : ℕ\nhk✝ : k ≤ r\nn : ℕ\nhn : n < r\nhk : k ≤ n\nIH :\n  (List.prod (List.drop (n + 1) (listTransvecCol M)) * M) (inl i) (inr ()) =\n    if n + 1 ≤ ↑i then 0 else M (inl i) (inr ())\n⊢ n < List.length (listTransvecCol M)\n[PROOFSTEP]\nsimpa [listTransvecCol] using hn\n[GOAL]\ncase H.refine'_1\nn✝ : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n✝\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\ni : Fin r\nk : ℕ\nhk✝ : k ≤ r\nn : ℕ\nhn : n < r\nhk : k ≤ n\nIH :\n  (List.prod (List.drop (n + 1) (listTransvecCol M)) * M) (inl i) (inr ()) =\n    if n + 1 ≤ ↑i then 0 else M (inl i) (inr ())\nhn' : n < List.length (listTransvecCol M)\n⊢ (List.prod (List.drop n (listTransvecCol M)) * M) (inl i) (inr ()) = if n ≤ ↑i then 0 else M (inl i) (inr ())\n[PROOFSTEP]\nlet n' : Fin r :=\n  ⟨n, hn⟩\n    -- porting note: after changing from `nthLe` to `get`, we need to provide all arguments\n[GOAL]\ncase H.refine'_1\nn✝ : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n✝\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\ni : Fin r\nk : ℕ\nhk✝ : k ≤ r\nn : ℕ\nhn : n < r\nhk : k ≤ n\nIH :\n  (List.prod (List.drop (n + 1) (listTransvecCol M)) * M) (inl i) (inr ()) =\n    if n + 1 ≤ ↑i then 0 else M (inl i) (inr ())\nhn' : n < List.length (listTransvecCol M)\nn' : Fin r := { val := n, isLt := hn }\n⊢ (List.prod (List.drop n (listTransvecCol M)) * M) (inl i) (inr ()) = if n ≤ ↑i then 0 else M (inl i) (inr ())\n[PROOFSTEP]\nrw [← @List.cons_get_drop_succ _ _ ⟨n, hn'⟩]\n[GOAL]\ncase H.refine'_1\nn✝ : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n✝\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\ni : Fin r\nk : ℕ\nhk✝ : k ≤ r\nn : ℕ\nhn : n < r\nhk : k ≤ n\nIH :\n  (List.prod (List.drop (n + 1) (listTransvecCol M)) * M) (inl i) (inr ()) =\n    if n + 1 ≤ ↑i then 0 else M (inl i) (inr ())\nhn' : n < List.length (listTransvecCol M)\nn' : Fin r := { val := n, isLt := hn }\n⊢ (List.prod\n          (List.get (listTransvecCol M) { val := n, isLt := hn' } ::\n            List.drop (↑{ val := n, isLt := hn' } + 1) (listTransvecCol M)) *\n        M)\n      (inl i) (inr ()) =\n    if n ≤ ↑i then 0 else M (inl i) (inr ())\n[PROOFSTEP]\nhave A :\n  (listTransvecCol M).get ⟨n, hn'⟩ =\n    transvection (inl n') (inr unit) (-M (inl n') (inr unit) / M (inr unit) (inr unit)) :=\n  by simp [listTransvecCol]\n[GOAL]\nn✝ : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n✝\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\ni : Fin r\nk : ℕ\nhk✝ : k ≤ r\nn : ℕ\nhn : n < r\nhk : k ≤ n\nIH :\n  (List.prod (List.drop (n + 1) (listTransvecCol M)) * M) (inl i) (inr ()) =\n    if n + 1 ≤ ↑i then 0 else M (inl i) (inr ())\nhn' : n < List.length (listTransvecCol M)\nn' : Fin r := { val := n, isLt := hn }\n⊢ List.get (listTransvecCol M) { val := n, isLt := hn' } =\n    transvection (inl n') (inr ()) (-M (inl n') (inr ()) / M (inr ()) (inr ()))\n[PROOFSTEP]\nsimp [listTransvecCol]\n[GOAL]\ncase H.refine'_1\nn✝ : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n✝\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\ni : Fin r\nk : ℕ\nhk✝ : k ≤ r\nn : ℕ\nhn : n < r\nhk : k ≤ n\nIH :\n  (List.prod (List.drop (n + 1) (listTransvecCol M)) * M) (inl i) (inr ()) =\n    if n + 1 ≤ ↑i then 0 else M (inl i) (inr ())\nhn' : n < List.length (listTransvecCol M)\nn' : Fin r := { val := n, isLt := hn }\nA :\n  List.get (listTransvecCol M) { val := n, isLt := hn' } =\n    transvection (inl n') (inr ()) (-M (inl n') (inr ()) / M (inr ()) (inr ()))\n⊢ (List.prod\n          (List.get (listTransvecCol M) { val := n, isLt := hn' } ::\n            List.drop (↑{ val := n, isLt := hn' } + 1) (listTransvecCol M)) *\n        M)\n      (inl i) (inr ()) =\n    if n ≤ ↑i then 0 else M (inl i) (inr ())\n[PROOFSTEP]\nsimp only [Matrix.mul_assoc, A, List.prod_cons]\n[GOAL]\ncase H.refine'_1\nn✝ : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n✝\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\ni : Fin r\nk : ℕ\nhk✝ : k ≤ r\nn : ℕ\nhn : n < r\nhk : k ≤ n\nIH :\n  (List.prod (List.drop (n + 1) (listTransvecCol M)) * M) (inl i) (inr ()) =\n    if n + 1 ≤ ↑i then 0 else M (inl i) (inr ())\nhn' : n < List.length (listTransvecCol M)\nn' : Fin r := { val := n, isLt := hn }\nA :\n  List.get (listTransvecCol M) { val := n, isLt := hn' } =\n    transvection (inl n') (inr ()) (-M (inl n') (inr ()) / M (inr ()) (inr ()))\n⊢ (transvection (inl { val := n, isLt := hn }) (inr ())\n          (-M (inl { val := n, isLt := hn }) (inr ()) / M (inr ()) (inr ())) *\n        (List.prod (List.drop (n + 1) (listTransvecCol M)) * M))\n      (inl i) (inr ()) =\n    if n ≤ ↑i then 0 else M (inl i) (inr ())\n[PROOFSTEP]\nby_cases h : n' = i\n[GOAL]\ncase pos\nn✝ : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n✝\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\ni : Fin r\nk : ℕ\nhk✝ : k ≤ r\nn : ℕ\nhn : n < r\nhk : k ≤ n\nIH :\n  (List.prod (List.drop (n + 1) (listTransvecCol M)) * M) (inl i) (inr ()) =\n    if n + 1 ≤ ↑i then 0 else M (inl i) (inr ())\nhn' : n < List.length (listTransvecCol M)\nn' : Fin r := { val := n, isLt := hn }\nA :\n  List.get (listTransvecCol M) { val := n, isLt := hn' } =\n    transvection (inl n') (inr ()) (-M (inl n') (inr ()) / M (inr ()) (inr ()))\nh : n' = i\n⊢ (transvection (inl { val := n, isLt := hn }) (inr ())\n          (-M (inl { val := n, isLt := hn }) (inr ()) / M (inr ()) (inr ())) *\n        (List.prod (List.drop (n + 1) (listTransvecCol M)) * M))\n      (inl i) (inr ()) =\n    if n ≤ ↑i then 0 else M (inl i) (inr ())\n[PROOFSTEP]\nhave hni : n = i := by\n  cases i\n  simp only [Fin.mk_eq_mk] at h \n  simp [h]\n[GOAL]\nn✝ : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n✝\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\ni : Fin r\nk : ℕ\nhk✝ : k ≤ r\nn : ℕ\nhn : n < r\nhk : k ≤ n\nIH :\n  (List.prod (List.drop (n + 1) (listTransvecCol M)) * M) (inl i) (inr ()) =\n    if n + 1 ≤ ↑i then 0 else M (inl i) (inr ())\nhn' : n < List.length (listTransvecCol M)\nn' : Fin r := { val := n, isLt := hn }\nA :\n  List.get (listTransvecCol M) { val := n, isLt := hn' } =\n    transvection (inl n') (inr ()) (-M (inl n') (inr ()) / M (inr ()) (inr ()))\nh : n' = i\n⊢ n = ↑i\n[PROOFSTEP]\ncases i\n[GOAL]\ncase mk\nn✝ : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n✝\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\nk : ℕ\nhk✝ : k ≤ r\nn : ℕ\nhn : n < r\nhk : k ≤ n\nhn' : n < List.length (listTransvecCol M)\nn' : Fin r := { val := n, isLt := hn }\nA :\n  List.get (listTransvecCol M) { val := n, isLt := hn' } =\n    transvection (inl n') (inr ()) (-M (inl n') (inr ()) / M (inr ()) (inr ()))\nval✝ : ℕ\nisLt✝ : val✝ < r\nIH :\n  (List.prod (List.drop (n + 1) (listTransvecCol M)) * M) (inl { val := val✝, isLt := isLt✝ }) (inr ()) =\n    if n + 1 ≤ ↑{ val := val✝, isLt := isLt✝ } then 0 else M (inl { val := val✝, isLt := isLt✝ }) (inr ())\nh : n' = { val := val✝, isLt := isLt✝ }\n⊢ n = ↑{ val := val✝, isLt := isLt✝ }\n[PROOFSTEP]\nsimp only [Fin.mk_eq_mk] at h \n[GOAL]\ncase mk\nn✝ : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n✝\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\nk : ℕ\nhk✝ : k ≤ r\nn : ℕ\nhn : n < r\nhk : k ≤ n\nhn' : n < List.length (listTransvecCol M)\nn' : Fin r := { val := n, isLt := hn }\nA :\n  List.get (listTransvecCol M) { val := n, isLt := hn' } =\n    transvection (inl n') (inr ()) (-M (inl n') (inr ()) / M (inr ()) (inr ()))\nval✝ : ℕ\nisLt✝ : val✝ < r\nIH :\n  (List.prod (List.drop (n + 1) (listTransvecCol M)) * M) (inl { val := val✝, isLt := isLt✝ }) (inr ()) =\n    if n + 1 ≤ ↑{ val := val✝, isLt := isLt✝ } then 0 else M (inl { val := val✝, isLt := isLt✝ }) (inr ())\nh : n = val✝\n⊢ n = ↑{ val := val✝, isLt := isLt✝ }\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase pos\nn✝ : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n✝\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\ni : Fin r\nk : ℕ\nhk✝ : k ≤ r\nn : ℕ\nhn : n < r\nhk : k ≤ n\nIH :\n  (List.prod (List.drop (n + 1) (listTransvecCol M)) * M) (inl i) (inr ()) =\n    if n + 1 ≤ ↑i then 0 else M (inl i) (inr ())\nhn' : n < List.length (listTransvecCol M)\nn' : Fin r := { val := n, isLt := hn }\nA :\n  List.get (listTransvecCol M) { val := n, isLt := hn' } =\n    transvection (inl n') (inr ()) (-M (inl n') (inr ()) / M (inr ()) (inr ()))\nh : n' = i\nhni : n = ↑i\n⊢ (transvection (inl { val := n, isLt := hn }) (inr ())\n          (-M (inl { val := n, isLt := hn }) (inr ()) / M (inr ()) (inr ())) *\n        (List.prod (List.drop (n + 1) (listTransvecCol M)) * M))\n      (inl i) (inr ()) =\n    if n ≤ ↑i then 0 else M (inl i) (inr ())\n[PROOFSTEP]\nsimp only [h, transvection_mul_apply_same, IH, ← hni, add_le_iff_nonpos_right, listTransvecCol_mul_last_row_drop _ _ hn]\n[GOAL]\ncase pos\nn✝ : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n✝\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\ni : Fin r\nk : ℕ\nhk✝ : k ≤ r\nn : ℕ\nhn : n < r\nhk : k ≤ n\nIH :\n  (List.prod (List.drop (n + 1) (listTransvecCol M)) * M) (inl i) (inr ()) =\n    if n + 1 ≤ ↑i then 0 else M (inl i) (inr ())\nhn' : n < List.length (listTransvecCol M)\nn' : Fin r := { val := n, isLt := hn }\nA :\n  List.get (listTransvecCol M) { val := n, isLt := hn' } =\n    transvection (inl n') (inr ()) (-M (inl n') (inr ()) / M (inr ()) (inr ()))\nh : n' = i\nhni : n = ↑i\n⊢ (if False then 0 else M (inl i) (inr ())) + -M (inl i) (inr ()) / M (inr ()) (inr ()) * M (inr ()) (inr ()) =\n    if n ≤ n then 0 else M (inl i) (inr ())\n[PROOFSTEP]\nfield_simp [hM]\n[GOAL]\ncase neg\nn✝ : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n✝\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\ni : Fin r\nk : ℕ\nhk✝ : k ≤ r\nn : ℕ\nhn : n < r\nhk : k ≤ n\nIH :\n  (List.prod (List.drop (n + 1) (listTransvecCol M)) * M) (inl i) (inr ()) =\n    if n + 1 ≤ ↑i then 0 else M (inl i) (inr ())\nhn' : n < List.length (listTransvecCol M)\nn' : Fin r := { val := n, isLt := hn }\nA :\n  List.get (listTransvecCol M) { val := n, isLt := hn' } =\n    transvection (inl n') (inr ()) (-M (inl n') (inr ()) / M (inr ()) (inr ()))\nh : ¬n' = i\n⊢ (transvection (inl { val := n, isLt := hn }) (inr ())\n          (-M (inl { val := n, isLt := hn }) (inr ()) / M (inr ()) (inr ())) *\n        (List.prod (List.drop (n + 1) (listTransvecCol M)) * M))\n      (inl i) (inr ()) =\n    if n ≤ ↑i then 0 else M (inl i) (inr ())\n[PROOFSTEP]\nhave hni : n ≠ i := by\n  rintro rfl\n  cases i\n  simp at h \n[GOAL]\nn✝ : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n✝\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\ni : Fin r\nk : ℕ\nhk✝ : k ≤ r\nn : ℕ\nhn : n < r\nhk : k ≤ n\nIH :\n  (List.prod (List.drop (n + 1) (listTransvecCol M)) * M) (inl i) (inr ()) =\n    if n + 1 ≤ ↑i then 0 else M (inl i) (inr ())\nhn' : n < List.length (listTransvecCol M)\nn' : Fin r := { val := n, isLt := hn }\nA :\n  List.get (listTransvecCol M) { val := n, isLt := hn' } =\n    transvection (inl n') (inr ()) (-M (inl n') (inr ()) / M (inr ()) (inr ()))\nh : ¬n' = i\n⊢ n ≠ ↑i\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\ni : Fin r\nk : ℕ\nhk✝ : k ≤ r\nhn : ↑i < r\nhk : k ≤ ↑i\nIH :\n  (List.prod (List.drop (↑i + 1) (listTransvecCol M)) * M) (inl i) (inr ()) =\n    if ↑i + 1 ≤ ↑i then 0 else M (inl i) (inr ())\nhn' : ↑i < List.length (listTransvecCol M)\nn' : Fin r := { val := ↑i, isLt := hn }\nA :\n  List.get (listTransvecCol M) { val := ↑i, isLt := hn' } =\n    transvection (inl n') (inr ()) (-M (inl n') (inr ()) / M (inr ()) (inr ()))\nh : ¬n' = i\n⊢ False\n[PROOFSTEP]\ncases i\n[GOAL]\ncase mk\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\nk : ℕ\nhk✝ : k ≤ r\nval✝ : ℕ\nisLt✝ : val✝ < r\nhn : ↑{ val := val✝, isLt := isLt✝ } < r\nhk : k ≤ ↑{ val := val✝, isLt := isLt✝ }\nIH :\n  (List.prod (List.drop (↑{ val := val✝, isLt := isLt✝ } + 1) (listTransvecCol M)) * M)\n      (inl { val := val✝, isLt := isLt✝ }) (inr ()) =\n    if ↑{ val := val✝, isLt := isLt✝ } + 1 ≤ ↑{ val := val✝, isLt := isLt✝ } then 0\n    else M (inl { val := val✝, isLt := isLt✝ }) (inr ())\nhn' : ↑{ val := val✝, isLt := isLt✝ } < List.length (listTransvecCol M)\nn' : Fin r := { val := ↑{ val := val✝, isLt := isLt✝ }, isLt := hn }\nA :\n  List.get (listTransvecCol M) { val := ↑{ val := val✝, isLt := isLt✝ }, isLt := hn' } =\n    transvection (inl n') (inr ()) (-M (inl n') (inr ()) / M (inr ()) (inr ()))\nh : ¬n' = { val := val✝, isLt := isLt✝ }\n⊢ False\n[PROOFSTEP]\nsimp at h \n[GOAL]\ncase neg\nn✝ : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n✝\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\ni : Fin r\nk : ℕ\nhk✝ : k ≤ r\nn : ℕ\nhn : n < r\nhk : k ≤ n\nIH :\n  (List.prod (List.drop (n + 1) (listTransvecCol M)) * M) (inl i) (inr ()) =\n    if n + 1 ≤ ↑i then 0 else M (inl i) (inr ())\nhn' : n < List.length (listTransvecCol M)\nn' : Fin r := { val := n, isLt := hn }\nA :\n  List.get (listTransvecCol M) { val := n, isLt := hn' } =\n    transvection (inl n') (inr ()) (-M (inl n') (inr ()) / M (inr ()) (inr ()))\nh : ¬n' = i\nhni : n ≠ ↑i\n⊢ (transvection (inl { val := n, isLt := hn }) (inr ())\n          (-M (inl { val := n, isLt := hn }) (inr ()) / M (inr ()) (inr ())) *\n        (List.prod (List.drop (n + 1) (listTransvecCol M)) * M))\n      (inl i) (inr ()) =\n    if n ≤ ↑i then 0 else M (inl i) (inr ())\n[PROOFSTEP]\nsimp only [ne_eq, inl.injEq, Ne.symm h, not_false_eq_true, transvection_mul_apply_of_ne]\n[GOAL]\ncase neg\nn✝ : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n✝\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\ni : Fin r\nk : ℕ\nhk✝ : k ≤ r\nn : ℕ\nhn : n < r\nhk : k ≤ n\nIH :\n  (List.prod (List.drop (n + 1) (listTransvecCol M)) * M) (inl i) (inr ()) =\n    if n + 1 ≤ ↑i then 0 else M (inl i) (inr ())\nhn' : n < List.length (listTransvecCol M)\nn' : Fin r := { val := n, isLt := hn }\nA :\n  List.get (listTransvecCol M) { val := n, isLt := hn' } =\n    transvection (inl n') (inr ()) (-M (inl n') (inr ()) / M (inr ()) (inr ()))\nh : ¬n' = i\nhni : n ≠ ↑i\n⊢ (List.prod (List.drop (n + 1) (listTransvecCol M)) * M) (inl i) (inr ()) = if n ≤ ↑i then 0 else M (inl i) (inr ())\n[PROOFSTEP]\nrw [IH]\n[GOAL]\ncase neg\nn✝ : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n✝\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\ni : Fin r\nk : ℕ\nhk✝ : k ≤ r\nn : ℕ\nhn : n < r\nhk : k ≤ n\nIH :\n  (List.prod (List.drop (n + 1) (listTransvecCol M)) * M) (inl i) (inr ()) =\n    if n + 1 ≤ ↑i then 0 else M (inl i) (inr ())\nhn' : n < List.length (listTransvecCol M)\nn' : Fin r := { val := n, isLt := hn }\nA :\n  List.get (listTransvecCol M) { val := n, isLt := hn' } =\n    transvection (inl n') (inr ()) (-M (inl n') (inr ()) / M (inr ()) (inr ()))\nh : ¬n' = i\nhni : n ≠ ↑i\n⊢ (if n + 1 ≤ ↑i then 0 else M (inl i) (inr ())) = if n ≤ ↑i then 0 else M (inl i) (inr ())\n[PROOFSTEP]\nrcases le_or_lt (n + 1) i with (hi | hi)\n[GOAL]\ncase neg.inl\nn✝ : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n✝\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\ni : Fin r\nk : ℕ\nhk✝ : k ≤ r\nn : ℕ\nhn : n < r\nhk : k ≤ n\nIH :\n  (List.prod (List.drop (n + 1) (listTransvecCol M)) * M) (inl i) (inr ()) =\n    if n + 1 ≤ ↑i then 0 else M (inl i) (inr ())\nhn' : n < List.length (listTransvecCol M)\nn' : Fin r := { val := n, isLt := hn }\nA :\n  List.get (listTransvecCol M) { val := n, isLt := hn' } =\n    transvection (inl n') (inr ()) (-M (inl n') (inr ()) / M (inr ()) (inr ()))\nh : ¬n' = i\nhni : n ≠ ↑i\nhi : n + 1 ≤ ↑i\n⊢ (if n + 1 ≤ ↑i then 0 else M (inl i) (inr ())) = if n ≤ ↑i then 0 else M (inl i) (inr ())\n[PROOFSTEP]\nsimp only [hi, n.le_succ.trans hi, if_true]\n[GOAL]\ncase neg.inr\nn✝ : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n✝\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\ni : Fin r\nk : ℕ\nhk✝ : k ≤ r\nn : ℕ\nhn : n < r\nhk : k ≤ n\nIH :\n  (List.prod (List.drop (n + 1) (listTransvecCol M)) * M) (inl i) (inr ()) =\n    if n + 1 ≤ ↑i then 0 else M (inl i) (inr ())\nhn' : n < List.length (listTransvecCol M)\nn' : Fin r := { val := n, isLt := hn }\nA :\n  List.get (listTransvecCol M) { val := n, isLt := hn' } =\n    transvection (inl n') (inr ()) (-M (inl n') (inr ()) / M (inr ()) (inr ()))\nh : ¬n' = i\nhni : n ≠ ↑i\nhi : ↑i < n + 1\n⊢ (if n + 1 ≤ ↑i then 0 else M (inl i) (inr ())) = if n ≤ ↑i then 0 else M (inl i) (inr ())\n[PROOFSTEP]\nrw [if_neg, if_neg]\n[GOAL]\ncase neg.inr.hnc\nn✝ : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n✝\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\ni : Fin r\nk : ℕ\nhk✝ : k ≤ r\nn : ℕ\nhn : n < r\nhk : k ≤ n\nIH :\n  (List.prod (List.drop (n + 1) (listTransvecCol M)) * M) (inl i) (inr ()) =\n    if n + 1 ≤ ↑i then 0 else M (inl i) (inr ())\nhn' : n < List.length (listTransvecCol M)\nn' : Fin r := { val := n, isLt := hn }\nA :\n  List.get (listTransvecCol M) { val := n, isLt := hn' } =\n    transvection (inl n') (inr ()) (-M (inl n') (inr ()) / M (inr ()) (inr ()))\nh : ¬n' = i\nhni : n ≠ ↑i\nhi : ↑i < n + 1\n⊢ ¬n ≤ ↑i\n[PROOFSTEP]\nsimpa only [hni.symm, not_le, or_false_iff] using Nat.lt_succ_iff_lt_or_eq.1 hi\n[GOAL]\ncase neg.inr.hnc\nn✝ : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n✝\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\ni : Fin r\nk : ℕ\nhk✝ : k ≤ r\nn : ℕ\nhn : n < r\nhk : k ≤ n\nIH :\n  (List.prod (List.drop (n + 1) (listTransvecCol M)) * M) (inl i) (inr ()) =\n    if n + 1 ≤ ↑i then 0 else M (inl i) (inr ())\nhn' : n < List.length (listTransvecCol M)\nn' : Fin r := { val := n, isLt := hn }\nA :\n  List.get (listTransvecCol M) { val := n, isLt := hn' } =\n    transvection (inl n') (inr ()) (-M (inl n') (inr ()) / M (inr ()) (inr ()))\nh : ¬n' = i\nhni : n ≠ ↑i\nhi : ↑i < n + 1\n⊢ ¬n + 1 ≤ ↑i\n[PROOFSTEP]\nsimpa only [not_le] using hi\n[GOAL]\ncase H.refine'_2\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\ni : Fin r\nk : ℕ\nhk : k ≤ r\n⊢ (List.prod (List.drop r (listTransvecCol M)) * M) (inl i) (inr ()) = if r ≤ ↑i then 0 else M (inl i) (inr ())\n[PROOFSTEP]\nsimp only [listTransvecCol, List.length_ofFn, le_refl, List.drop_eq_nil_of_le, List.prod_nil, Matrix.one_mul]\n[GOAL]\ncase H.refine'_2\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\ni : Fin r\nk : ℕ\nhk : k ≤ r\n⊢ M (inl i) (inr ()) = if r ≤ ↑i then 0 else M (inl i) (inr ())\n[PROOFSTEP]\nrw [if_neg]\n[GOAL]\ncase H.refine'_2.hnc\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\ni : Fin r\nk : ℕ\nhk : k ≤ r\n⊢ ¬r ≤ ↑i\n[PROOFSTEP]\nsimpa only [not_le] using i.2\n[GOAL]\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\ni : Fin r ⊕ Unit\nk : ℕ\nhk : k ≤ r\n⊢ (M * List.prod (List.take k (listTransvecRow M))) i (inr ()) = M i (inr ())\n[PROOFSTEP]\ninduction' k with k IH\n[GOAL]\ncase zero\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\ni : Fin r ⊕ Unit\nk : ℕ\nhk✝ : k ≤ r\nhk : Nat.zero ≤ r\n⊢ (M * List.prod (List.take Nat.zero (listTransvecRow M))) i (inr ()) = M i (inr ())\n[PROOFSTEP]\nsimp only [Matrix.mul_one, List.take_zero, List.prod_nil, List.take, Matrix.mul_one]\n[GOAL]\ncase succ\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\ni : Fin r ⊕ Unit\nk✝ : ℕ\nhk✝ : k✝ ≤ r\nk : ℕ\nIH : k ≤ r → (M * List.prod (List.take k (listTransvecRow M))) i (inr ()) = M i (inr ())\nhk : Nat.succ k ≤ r\n⊢ (M * List.prod (List.take (Nat.succ k) (listTransvecRow M))) i (inr ()) = M i (inr ())\n[PROOFSTEP]\nhave hkr : k < r := hk\n[GOAL]\ncase succ\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\ni : Fin r ⊕ Unit\nk✝ : ℕ\nhk✝ : k✝ ≤ r\nk : ℕ\nIH : k ≤ r → (M * List.prod (List.take k (listTransvecRow M))) i (inr ()) = M i (inr ())\nhk : Nat.succ k ≤ r\nhkr : k < r\n⊢ (M * List.prod (List.take (Nat.succ k) (listTransvecRow M))) i (inr ()) = M i (inr ())\n[PROOFSTEP]\nlet k' : Fin r := ⟨k, hkr⟩\n[GOAL]\ncase succ\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\ni : Fin r ⊕ Unit\nk✝ : ℕ\nhk✝ : k✝ ≤ r\nk : ℕ\nIH : k ≤ r → (M * List.prod (List.take k (listTransvecRow M))) i (inr ()) = M i (inr ())\nhk : Nat.succ k ≤ r\nhkr : k < r\nk' : Fin r := { val := k, isLt := hkr }\n⊢ (M * List.prod (List.take (Nat.succ k) (listTransvecRow M))) i (inr ()) = M i (inr ())\n[PROOFSTEP]\nhave :\n  (listTransvecRow M).get? k =\n    ↑(transvection (inr Unit.unit) (inl k') (-M (inr Unit.unit) (inl k') / M (inr Unit.unit) (inr Unit.unit))) :=\n  by simp only [listTransvecRow, List.ofFnNthVal, hkr, dif_pos, List.get?_ofFn]\n[GOAL]\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\ni : Fin r ⊕ Unit\nk✝ : ℕ\nhk✝ : k✝ ≤ r\nk : ℕ\nIH : k ≤ r → (M * List.prod (List.take k (listTransvecRow M))) i (inr ()) = M i (inr ())\nhk : Nat.succ k ≤ r\nhkr : k < r\nk' : Fin r := { val := k, isLt := hkr }\n⊢ List.get? (listTransvecRow M) k = some (transvection (inr ()) (inl k') (-M (inr ()) (inl k') / M (inr ()) (inr ())))\n[PROOFSTEP]\nsimp only [listTransvecRow, List.ofFnNthVal, hkr, dif_pos, List.get?_ofFn]\n[GOAL]\ncase succ\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\ni : Fin r ⊕ Unit\nk✝ : ℕ\nhk✝ : k✝ ≤ r\nk : ℕ\nIH : k ≤ r → (M * List.prod (List.take k (listTransvecRow M))) i (inr ()) = M i (inr ())\nhk : Nat.succ k ≤ r\nhkr : k < r\nk' : Fin r := { val := k, isLt := hkr }\nthis :\n  List.get? (listTransvecRow M) k = some (transvection (inr ()) (inl k') (-M (inr ()) (inl k') / M (inr ()) (inr ())))\n⊢ (M * List.prod (List.take (Nat.succ k) (listTransvecRow M))) i (inr ()) = M i (inr ())\n[PROOFSTEP]\nsimp only [List.take_succ, ← Matrix.mul_assoc, this, List.prod_append, Matrix.mul_one, List.prod_cons, List.prod_nil,\n  Option.to_list_some]\n[GOAL]\ncase succ\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\ni : Fin r ⊕ Unit\nk✝ : ℕ\nhk✝ : k✝ ≤ r\nk : ℕ\nIH : k ≤ r → (M * List.prod (List.take k (listTransvecRow M))) i (inr ()) = M i (inr ())\nhk : Nat.succ k ≤ r\nhkr : k < r\nk' : Fin r := { val := k, isLt := hkr }\nthis :\n  List.get? (listTransvecRow M) k = some (transvection (inr ()) (inl k') (-M (inr ()) (inl k') / M (inr ()) (inr ())))\n⊢ (M * List.prod (List.take k (listTransvecRow M)) *\n        transvection (inr ()) (inl { val := k, isLt := hkr })\n          (-M (inr ()) (inl { val := k, isLt := hkr }) / M (inr ()) (inr ())))\n      i (inr ()) =\n    M i (inr ())\n[PROOFSTEP]\nrw [mul_transvection_apply_of_ne, IH hkr.le]\n[GOAL]\ncase succ.hb\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\ni : Fin r ⊕ Unit\nk✝ : ℕ\nhk✝ : k✝ ≤ r\nk : ℕ\nIH : k ≤ r → (M * List.prod (List.take k (listTransvecRow M))) i (inr ()) = M i (inr ())\nhk : Nat.succ k ≤ r\nhkr : k < r\nk' : Fin r := { val := k, isLt := hkr }\nthis :\n  List.get? (listTransvecRow M) k = some (transvection (inr ()) (inl k') (-M (inr ()) (inl k') / M (inr ()) (inr ())))\n⊢ inr () ≠ inl { val := k, isLt := hkr }\n[PROOFSTEP]\nsimp only [Ne.def, not_false_iff]\n[GOAL]\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\ni : Fin r ⊕ Unit\n⊢ (M * List.prod (listTransvecRow M)) i (inr ()) = M i (inr ())\n[PROOFSTEP]\nhave A : (listTransvecRow M).length = r := by simp [listTransvecRow]\n[GOAL]\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\ni : Fin r ⊕ Unit\n⊢ List.length (listTransvecRow M) = r\n[PROOFSTEP]\nsimp [listTransvecRow]\n[GOAL]\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\ni : Fin r ⊕ Unit\nA : List.length (listTransvecRow M) = r\n⊢ (M * List.prod (listTransvecRow M)) i (inr ()) = M i (inr ())\n[PROOFSTEP]\nrw [← List.take_length (listTransvecRow M), A]\n[GOAL]\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\ni : Fin r ⊕ Unit\nA : List.length (listTransvecRow M) = r\n⊢ (M * List.prod (List.take r (listTransvecRow M))) i (inr ()) = M i (inr ())\n[PROOFSTEP]\nsimpa using mul_listTransvecRow_last_col_take M i le_rfl\n[GOAL]\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\ni : Fin r\n⊢ (M * List.prod (listTransvecRow M)) (inr ()) (inl i) = 0\n[PROOFSTEP]\nsuffices H :\n  ∀ k : ℕ,\n    k ≤ r → (M * ((listTransvecRow M).take k).prod) (inr unit) (inl i) = if k ≤ i then M (inr unit) (inl i) else 0\n[GOAL]\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\ni : Fin r\nH :\n  ∀ (k : ℕ),\n    k ≤ r →\n      (M * List.prod (List.take k (listTransvecRow M))) (inr ()) (inl i) = if k ≤ ↑i then M (inr ()) (inl i) else 0\n⊢ (M * List.prod (listTransvecRow M)) (inr ()) (inl i) = 0\n[PROOFSTEP]\nhave A : (listTransvecRow M).length = r := by simp [listTransvecRow]\n[GOAL]\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\ni : Fin r\nH :\n  ∀ (k : ℕ),\n    k ≤ r →\n      (M * List.prod (List.take k (listTransvecRow M))) (inr ()) (inl i) = if k ≤ ↑i then M (inr ()) (inl i) else 0\n⊢ List.length (listTransvecRow M) = r\n[PROOFSTEP]\nsimp [listTransvecRow]\n[GOAL]\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\ni : Fin r\nH :\n  ∀ (k : ℕ),\n    k ≤ r →\n      (M * List.prod (List.take k (listTransvecRow M))) (inr ()) (inl i) = if k ≤ ↑i then M (inr ()) (inl i) else 0\nA : List.length (listTransvecRow M) = r\n⊢ (M * List.prod (listTransvecRow M)) (inr ()) (inl i) = 0\n[PROOFSTEP]\nrw [← List.take_length (listTransvecRow M), A]\n[GOAL]\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\ni : Fin r\nH :\n  ∀ (k : ℕ),\n    k ≤ r →\n      (M * List.prod (List.take k (listTransvecRow M))) (inr ()) (inl i) = if k ≤ ↑i then M (inr ()) (inl i) else 0\nA : List.length (listTransvecRow M) = r\n⊢ (M * List.prod (List.take r (listTransvecRow M))) (inr ()) (inl i) = 0\n[PROOFSTEP]\nhave : ¬r ≤ i := by simp\n[GOAL]\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\ni : Fin r\nH :\n  ∀ (k : ℕ),\n    k ≤ r →\n      (M * List.prod (List.take k (listTransvecRow M))) (inr ()) (inl i) = if k ≤ ↑i then M (inr ()) (inl i) else 0\nA : List.length (listTransvecRow M) = r\n⊢ ¬r ≤ ↑i\n[PROOFSTEP]\nsimp\n[GOAL]\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\ni : Fin r\nH :\n  ∀ (k : ℕ),\n    k ≤ r →\n      (M * List.prod (List.take k (listTransvecRow M))) (inr ()) (inl i) = if k ≤ ↑i then M (inr ()) (inl i) else 0\nA : List.length (listTransvecRow M) = r\nthis : ¬r ≤ ↑i\n⊢ (M * List.prod (List.take r (listTransvecRow M))) (inr ()) (inl i) = 0\n[PROOFSTEP]\nsimpa only [this, ite_eq_right_iff] using H r le_rfl\n[GOAL]\ncase H\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\ni : Fin r\n⊢ ∀ (k : ℕ),\n    k ≤ r →\n      (M * List.prod (List.take k (listTransvecRow M))) (inr ()) (inl i) = if k ≤ ↑i then M (inr ()) (inl i) else 0\n[PROOFSTEP]\nintro k hk\n[GOAL]\ncase H\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\ni : Fin r\nk : ℕ\nhk : k ≤ r\n⊢ (M * List.prod (List.take k (listTransvecRow M))) (inr ()) (inl i) = if k ≤ ↑i then M (inr ()) (inl i) else 0\n[PROOFSTEP]\ninduction' k with n IH\n[GOAL]\ncase H.zero\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\ni : Fin r\nk : ℕ\nhk✝ : k ≤ r\nhk : Nat.zero ≤ r\n⊢ (M * List.prod (List.take Nat.zero (listTransvecRow M))) (inr ()) (inl i) =\n    if Nat.zero ≤ ↑i then M (inr ()) (inl i) else 0\n[PROOFSTEP]\nsimp only [if_true, Matrix.mul_one, List.take_zero, zero_le', List.prod_nil, Nat.zero_eq]\n[GOAL]\ncase H.succ\nn✝ : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n✝\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\ni : Fin r\nk : ℕ\nhk✝ : k ≤ r\nn : ℕ\nIH :\n  n ≤ r → (M * List.prod (List.take n (listTransvecRow M))) (inr ()) (inl i) = if n ≤ ↑i then M (inr ()) (inl i) else 0\nhk : Nat.succ n ≤ r\n⊢ (M * List.prod (List.take (Nat.succ n) (listTransvecRow M))) (inr ()) (inl i) =\n    if Nat.succ n ≤ ↑i then M (inr ()) (inl i) else 0\n[PROOFSTEP]\nhave hnr : n < r := hk\n[GOAL]\ncase H.succ\nn✝ : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n✝\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\ni : Fin r\nk : ℕ\nhk✝ : k ≤ r\nn : ℕ\nIH :\n  n ≤ r → (M * List.prod (List.take n (listTransvecRow M))) (inr ()) (inl i) = if n ≤ ↑i then M (inr ()) (inl i) else 0\nhk : Nat.succ n ≤ r\nhnr : n < r\n⊢ (M * List.prod (List.take (Nat.succ n) (listTransvecRow M))) (inr ()) (inl i) =\n    if Nat.succ n ≤ ↑i then M (inr ()) (inl i) else 0\n[PROOFSTEP]\nlet n' : Fin r := ⟨n, hnr⟩\n[GOAL]\ncase H.succ\nn✝ : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n✝\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\ni : Fin r\nk : ℕ\nhk✝ : k ≤ r\nn : ℕ\nIH :\n  n ≤ r → (M * List.prod (List.take n (listTransvecRow M))) (inr ()) (inl i) = if n ≤ ↑i then M (inr ()) (inl i) else 0\nhk : Nat.succ n ≤ r\nhnr : n < r\nn' : Fin r := { val := n, isLt := hnr }\n⊢ (M * List.prod (List.take (Nat.succ n) (listTransvecRow M))) (inr ()) (inl i) =\n    if Nat.succ n ≤ ↑i then M (inr ()) (inl i) else 0\n[PROOFSTEP]\nhave A :\n  (listTransvecRow M).get? n = ↑(transvection (inr unit) (inl n') (-M (inr unit) (inl n') / M (inr unit) (inr unit))) :=\n  by simp only [listTransvecRow, List.ofFnNthVal, hnr, dif_pos, List.get?_ofFn]\n[GOAL]\nn✝ : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n✝\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\ni : Fin r\nk : ℕ\nhk✝ : k ≤ r\nn : ℕ\nIH :\n  n ≤ r → (M * List.prod (List.take n (listTransvecRow M))) (inr ()) (inl i) = if n ≤ ↑i then M (inr ()) (inl i) else 0\nhk : Nat.succ n ≤ r\nhnr : n < r\nn' : Fin r := { val := n, isLt := hnr }\n⊢ List.get? (listTransvecRow M) n = some (transvection (inr ()) (inl n') (-M (inr ()) (inl n') / M (inr ()) (inr ())))\n[PROOFSTEP]\nsimp only [listTransvecRow, List.ofFnNthVal, hnr, dif_pos, List.get?_ofFn]\n[GOAL]\ncase H.succ\nn✝ : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n✝\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\ni : Fin r\nk : ℕ\nhk✝ : k ≤ r\nn : ℕ\nIH :\n  n ≤ r → (M * List.prod (List.take n (listTransvecRow M))) (inr ()) (inl i) = if n ≤ ↑i then M (inr ()) (inl i) else 0\nhk : Nat.succ n ≤ r\nhnr : n < r\nn' : Fin r := { val := n, isLt := hnr }\nA : List.get? (listTransvecRow M) n = some (transvection (inr ()) (inl n') (-M (inr ()) (inl n') / M (inr ()) (inr ())))\n⊢ (M * List.prod (List.take (Nat.succ n) (listTransvecRow M))) (inr ()) (inl i) =\n    if Nat.succ n ≤ ↑i then M (inr ()) (inl i) else 0\n[PROOFSTEP]\nsimp only [List.take_succ, A, ← Matrix.mul_assoc, List.prod_append, Matrix.mul_one, List.prod_cons, List.prod_nil,\n  Option.to_list_some]\n[GOAL]\ncase H.succ\nn✝ : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n✝\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\ni : Fin r\nk : ℕ\nhk✝ : k ≤ r\nn : ℕ\nIH :\n  n ≤ r → (M * List.prod (List.take n (listTransvecRow M))) (inr ()) (inl i) = if n ≤ ↑i then M (inr ()) (inl i) else 0\nhk : Nat.succ n ≤ r\nhnr : n < r\nn' : Fin r := { val := n, isLt := hnr }\nA : List.get? (listTransvecRow M) n = some (transvection (inr ()) (inl n') (-M (inr ()) (inl n') / M (inr ()) (inr ())))\n⊢ (M * List.prod (List.take n (listTransvecRow M)) *\n        transvection (inr ()) (inl { val := n, isLt := hnr })\n          (-M (inr ()) (inl { val := n, isLt := hnr }) / M (inr ()) (inr ())))\n      (inr ()) (inl i) =\n    if Nat.succ n ≤ ↑i then M (inr ()) (inl i) else 0\n[PROOFSTEP]\nby_cases h : n' = i\n[GOAL]\ncase pos\nn✝ : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n✝\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\ni : Fin r\nk : ℕ\nhk✝ : k ≤ r\nn : ℕ\nIH :\n  n ≤ r → (M * List.prod (List.take n (listTransvecRow M))) (inr ()) (inl i) = if n ≤ ↑i then M (inr ()) (inl i) else 0\nhk : Nat.succ n ≤ r\nhnr : n < r\nn' : Fin r := { val := n, isLt := hnr }\nA : List.get? (listTransvecRow M) n = some (transvection (inr ()) (inl n') (-M (inr ()) (inl n') / M (inr ()) (inr ())))\nh : n' = i\n⊢ (M * List.prod (List.take n (listTransvecRow M)) *\n        transvection (inr ()) (inl { val := n, isLt := hnr })\n          (-M (inr ()) (inl { val := n, isLt := hnr }) / M (inr ()) (inr ())))\n      (inr ()) (inl i) =\n    if Nat.succ n ≤ ↑i then M (inr ()) (inl i) else 0\n[PROOFSTEP]\nhave hni : n = i := by\n  cases i\n  simp only [Fin.mk_eq_mk] at h \n  simp only [h]\n[GOAL]\nn✝ : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n✝\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\ni : Fin r\nk : ℕ\nhk✝ : k ≤ r\nn : ℕ\nIH :\n  n ≤ r → (M * List.prod (List.take n (listTransvecRow M))) (inr ()) (inl i) = if n ≤ ↑i then M (inr ()) (inl i) else 0\nhk : Nat.succ n ≤ r\nhnr : n < r\nn' : Fin r := { val := n, isLt := hnr }\nA : List.get? (listTransvecRow M) n = some (transvection (inr ()) (inl n') (-M (inr ()) (inl n') / M (inr ()) (inr ())))\nh : n' = i\n⊢ n = ↑i\n[PROOFSTEP]\ncases i\n[GOAL]\ncase mk\nn✝ : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n✝\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\nk : ℕ\nhk✝ : k ≤ r\nn : ℕ\nhk : Nat.succ n ≤ r\nhnr : n < r\nn' : Fin r := { val := n, isLt := hnr }\nA : List.get? (listTransvecRow M) n = some (transvection (inr ()) (inl n') (-M (inr ()) (inl n') / M (inr ()) (inr ())))\nval✝ : ℕ\nisLt✝ : val✝ < r\nIH :\n  n ≤ r →\n    (M * List.prod (List.take n (listTransvecRow M))) (inr ()) (inl { val := val✝, isLt := isLt✝ }) =\n      if n ≤ ↑{ val := val✝, isLt := isLt✝ } then M (inr ()) (inl { val := val✝, isLt := isLt✝ }) else 0\nh : n' = { val := val✝, isLt := isLt✝ }\n⊢ n = ↑{ val := val✝, isLt := isLt✝ }\n[PROOFSTEP]\nsimp only [Fin.mk_eq_mk] at h \n[GOAL]\ncase mk\nn✝ : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n✝\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\nk : ℕ\nhk✝ : k ≤ r\nn : ℕ\nhk : Nat.succ n ≤ r\nhnr : n < r\nn' : Fin r := { val := n, isLt := hnr }\nA : List.get? (listTransvecRow M) n = some (transvection (inr ()) (inl n') (-M (inr ()) (inl n') / M (inr ()) (inr ())))\nval✝ : ℕ\nisLt✝ : val✝ < r\nIH :\n  n ≤ r →\n    (M * List.prod (List.take n (listTransvecRow M))) (inr ()) (inl { val := val✝, isLt := isLt✝ }) =\n      if n ≤ ↑{ val := val✝, isLt := isLt✝ } then M (inr ()) (inl { val := val✝, isLt := isLt✝ }) else 0\nh : n = val✝\n⊢ n = ↑{ val := val✝, isLt := isLt✝ }\n[PROOFSTEP]\nsimp only [h]\n[GOAL]\ncase pos\nn✝ : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n✝\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\ni : Fin r\nk : ℕ\nhk✝ : k ≤ r\nn : ℕ\nIH :\n  n ≤ r → (M * List.prod (List.take n (listTransvecRow M))) (inr ()) (inl i) = if n ≤ ↑i then M (inr ()) (inl i) else 0\nhk : Nat.succ n ≤ r\nhnr : n < r\nn' : Fin r := { val := n, isLt := hnr }\nA : List.get? (listTransvecRow M) n = some (transvection (inr ()) (inl n') (-M (inr ()) (inl n') / M (inr ()) (inr ())))\nh : n' = i\nhni : n = ↑i\n⊢ (M * List.prod (List.take n (listTransvecRow M)) *\n        transvection (inr ()) (inl { val := n, isLt := hnr })\n          (-M (inr ()) (inl { val := n, isLt := hnr }) / M (inr ()) (inr ())))\n      (inr ()) (inl i) =\n    if Nat.succ n ≤ ↑i then M (inr ()) (inl i) else 0\n[PROOFSTEP]\nhave : ¬n.succ ≤ i := by simp only [← hni, n.lt_succ_self, not_le]\n[GOAL]\nn✝ : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n✝\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\ni : Fin r\nk : ℕ\nhk✝ : k ≤ r\nn : ℕ\nIH :\n  n ≤ r → (M * List.prod (List.take n (listTransvecRow M))) (inr ()) (inl i) = if n ≤ ↑i then M (inr ()) (inl i) else 0\nhk : Nat.succ n ≤ r\nhnr : n < r\nn' : Fin r := { val := n, isLt := hnr }\nA : List.get? (listTransvecRow M) n = some (transvection (inr ()) (inl n') (-M (inr ()) (inl n') / M (inr ()) (inr ())))\nh : n' = i\nhni : n = ↑i\n⊢ ¬Nat.succ n ≤ ↑i\n[PROOFSTEP]\nsimp only [← hni, n.lt_succ_self, not_le]\n[GOAL]\ncase pos\nn✝ : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n✝\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\ni : Fin r\nk : ℕ\nhk✝ : k ≤ r\nn : ℕ\nIH :\n  n ≤ r → (M * List.prod (List.take n (listTransvecRow M))) (inr ()) (inl i) = if n ≤ ↑i then M (inr ()) (inl i) else 0\nhk : Nat.succ n ≤ r\nhnr : n < r\nn' : Fin r := { val := n, isLt := hnr }\nA : List.get? (listTransvecRow M) n = some (transvection (inr ()) (inl n') (-M (inr ()) (inl n') / M (inr ()) (inr ())))\nh : n' = i\nhni : n = ↑i\nthis : ¬Nat.succ n ≤ ↑i\n⊢ (M * List.prod (List.take n (listTransvecRow M)) *\n        transvection (inr ()) (inl { val := n, isLt := hnr })\n          (-M (inr ()) (inl { val := n, isLt := hnr }) / M (inr ()) (inr ())))\n      (inr ()) (inl i) =\n    if Nat.succ n ≤ ↑i then M (inr ()) (inl i) else 0\n[PROOFSTEP]\nsimp only [h, mul_transvection_apply_same, List.take, if_false, mul_listTransvecRow_last_col_take _ _ hnr.le, hni.le,\n  this, if_true, IH hnr.le]\n[GOAL]\ncase pos\nn✝ : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n✝\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\ni : Fin r\nk : ℕ\nhk✝ : k ≤ r\nn : ℕ\nIH :\n  n ≤ r → (M * List.prod (List.take n (listTransvecRow M))) (inr ()) (inl i) = if n ≤ ↑i then M (inr ()) (inl i) else 0\nhk : Nat.succ n ≤ r\nhnr : n < r\nn' : Fin r := { val := n, isLt := hnr }\nA : List.get? (listTransvecRow M) n = some (transvection (inr ()) (inl n') (-M (inr ()) (inl n') / M (inr ()) (inr ())))\nh : n' = i\nhni : n = ↑i\nthis : ¬Nat.succ n ≤ ↑i\n⊢ M (inr ()) (inl i) + -M (inr ()) (inl i) / M (inr ()) (inr ()) * M (inr ()) (inr ()) = 0\n[PROOFSTEP]\nfield_simp [hM]\n[GOAL]\ncase neg\nn✝ : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n✝\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\ni : Fin r\nk : ℕ\nhk✝ : k ≤ r\nn : ℕ\nIH :\n  n ≤ r → (M * List.prod (List.take n (listTransvecRow M))) (inr ()) (inl i) = if n ≤ ↑i then M (inr ()) (inl i) else 0\nhk : Nat.succ n ≤ r\nhnr : n < r\nn' : Fin r := { val := n, isLt := hnr }\nA : List.get? (listTransvecRow M) n = some (transvection (inr ()) (inl n') (-M (inr ()) (inl n') / M (inr ()) (inr ())))\nh : ¬n' = i\n⊢ (M * List.prod (List.take n (listTransvecRow M)) *\n        transvection (inr ()) (inl { val := n, isLt := hnr })\n          (-M (inr ()) (inl { val := n, isLt := hnr }) / M (inr ()) (inr ())))\n      (inr ()) (inl i) =\n    if Nat.succ n ≤ ↑i then M (inr ()) (inl i) else 0\n[PROOFSTEP]\nhave hni : n ≠ i := by\n  rintro rfl\n  cases i\n  tauto\n[GOAL]\nn✝ : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n✝\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\ni : Fin r\nk : ℕ\nhk✝ : k ≤ r\nn : ℕ\nIH :\n  n ≤ r → (M * List.prod (List.take n (listTransvecRow M))) (inr ()) (inl i) = if n ≤ ↑i then M (inr ()) (inl i) else 0\nhk : Nat.succ n ≤ r\nhnr : n < r\nn' : Fin r := { val := n, isLt := hnr }\nA : List.get? (listTransvecRow M) n = some (transvection (inr ()) (inl n') (-M (inr ()) (inl n') / M (inr ()) (inr ())))\nh : ¬n' = i\n⊢ n ≠ ↑i\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\ni : Fin r\nk : ℕ\nhk✝ : k ≤ r\nIH :\n  ↑i ≤ r →\n    (M * List.prod (List.take (↑i) (listTransvecRow M))) (inr ()) (inl i) = if ↑i ≤ ↑i then M (inr ()) (inl i) else 0\nhk : Nat.succ ↑i ≤ r\nhnr : ↑i < r\nn' : Fin r := { val := ↑i, isLt := hnr }\nA :\n  List.get? (listTransvecRow M) ↑i = some (transvection (inr ()) (inl n') (-M (inr ()) (inl n') / M (inr ()) (inr ())))\nh : ¬n' = i\n⊢ False\n[PROOFSTEP]\ncases i\n[GOAL]\ncase mk\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\nk : ℕ\nhk✝ : k ≤ r\nval✝ : ℕ\nisLt✝ : val✝ < r\nIH :\n  ↑{ val := val✝, isLt := isLt✝ } ≤ r →\n    (M * List.prod (List.take (↑{ val := val✝, isLt := isLt✝ }) (listTransvecRow M))) (inr ())\n        (inl { val := val✝, isLt := isLt✝ }) =\n      if ↑{ val := val✝, isLt := isLt✝ } ≤ ↑{ val := val✝, isLt := isLt✝ } then\n        M (inr ()) (inl { val := val✝, isLt := isLt✝ })\n      else 0\nhk : Nat.succ ↑{ val := val✝, isLt := isLt✝ } ≤ r\nhnr : ↑{ val := val✝, isLt := isLt✝ } < r\nn' : Fin r := { val := ↑{ val := val✝, isLt := isLt✝ }, isLt := hnr }\nA :\n  List.get? (listTransvecRow M) ↑{ val := val✝, isLt := isLt✝ } =\n    some (transvection (inr ()) (inl n') (-M (inr ()) (inl n') / M (inr ()) (inr ())))\nh : ¬n' = { val := val✝, isLt := isLt✝ }\n⊢ False\n[PROOFSTEP]\ntauto\n[GOAL]\ncase neg\nn✝ : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n✝\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\ni : Fin r\nk : ℕ\nhk✝ : k ≤ r\nn : ℕ\nIH :\n  n ≤ r → (M * List.prod (List.take n (listTransvecRow M))) (inr ()) (inl i) = if n ≤ ↑i then M (inr ()) (inl i) else 0\nhk : Nat.succ n ≤ r\nhnr : n < r\nn' : Fin r := { val := n, isLt := hnr }\nA : List.get? (listTransvecRow M) n = some (transvection (inr ()) (inl n') (-M (inr ()) (inl n') / M (inr ()) (inr ())))\nh : ¬n' = i\nhni : n ≠ ↑i\n⊢ (M * List.prod (List.take n (listTransvecRow M)) *\n        transvection (inr ()) (inl { val := n, isLt := hnr })\n          (-M (inr ()) (inl { val := n, isLt := hnr }) / M (inr ()) (inr ())))\n      (inr ()) (inl i) =\n    if Nat.succ n ≤ ↑i then M (inr ()) (inl i) else 0\n[PROOFSTEP]\nsimp only [IH hnr.le, Ne.def, mul_transvection_apply_of_ne, Ne.symm h, inl.injEq]\n[GOAL]\ncase neg\nn✝ : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n✝\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\ni : Fin r\nk : ℕ\nhk✝ : k ≤ r\nn : ℕ\nIH :\n  n ≤ r → (M * List.prod (List.take n (listTransvecRow M))) (inr ()) (inl i) = if n ≤ ↑i then M (inr ()) (inl i) else 0\nhk : Nat.succ n ≤ r\nhnr : n < r\nn' : Fin r := { val := n, isLt := hnr }\nA : List.get? (listTransvecRow M) n = some (transvection (inr ()) (inl n') (-M (inr ()) (inl n') / M (inr ()) (inr ())))\nh : ¬n' = i\nhni : n ≠ ↑i\n⊢ (if n ≤ ↑i then M (inr ()) (inl i) else 0) = if Nat.succ n ≤ ↑i then M (inr ()) (inl i) else 0\n[PROOFSTEP]\nrcases le_or_lt (n + 1) i with (hi | hi)\n[GOAL]\ncase neg.inl\nn✝ : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n✝\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\ni : Fin r\nk : ℕ\nhk✝ : k ≤ r\nn : ℕ\nIH :\n  n ≤ r → (M * List.prod (List.take n (listTransvecRow M))) (inr ()) (inl i) = if n ≤ ↑i then M (inr ()) (inl i) else 0\nhk : Nat.succ n ≤ r\nhnr : n < r\nn' : Fin r := { val := n, isLt := hnr }\nA : List.get? (listTransvecRow M) n = some (transvection (inr ()) (inl n') (-M (inr ()) (inl n') / M (inr ()) (inr ())))\nh : ¬n' = i\nhni : n ≠ ↑i\nhi : n + 1 ≤ ↑i\n⊢ (if n ≤ ↑i then M (inr ()) (inl i) else 0) = if Nat.succ n ≤ ↑i then M (inr ()) (inl i) else 0\n[PROOFSTEP]\nsimp [hi, n.le_succ.trans hi, if_true]\n[GOAL]\ncase neg.inr\nn✝ : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n✝\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\ni : Fin r\nk : ℕ\nhk✝ : k ≤ r\nn : ℕ\nIH :\n  n ≤ r → (M * List.prod (List.take n (listTransvecRow M))) (inr ()) (inl i) = if n ≤ ↑i then M (inr ()) (inl i) else 0\nhk : Nat.succ n ≤ r\nhnr : n < r\nn' : Fin r := { val := n, isLt := hnr }\nA : List.get? (listTransvecRow M) n = some (transvection (inr ()) (inl n') (-M (inr ()) (inl n') / M (inr ()) (inr ())))\nh : ¬n' = i\nhni : n ≠ ↑i\nhi : ↑i < n + 1\n⊢ (if n ≤ ↑i then M (inr ()) (inl i) else 0) = if Nat.succ n ≤ ↑i then M (inr ()) (inl i) else 0\n[PROOFSTEP]\nrw [if_neg, if_neg]\n[GOAL]\ncase neg.inr.hnc\nn✝ : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n✝\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\ni : Fin r\nk : ℕ\nhk✝ : k ≤ r\nn : ℕ\nIH :\n  n ≤ r → (M * List.prod (List.take n (listTransvecRow M))) (inr ()) (inl i) = if n ≤ ↑i then M (inr ()) (inl i) else 0\nhk : Nat.succ n ≤ r\nhnr : n < r\nn' : Fin r := { val := n, isLt := hnr }\nA : List.get? (listTransvecRow M) n = some (transvection (inr ()) (inl n') (-M (inr ()) (inl n') / M (inr ()) (inr ())))\nh : ¬n' = i\nhni : n ≠ ↑i\nhi : ↑i < n + 1\n⊢ ¬Nat.succ n ≤ ↑i\n[PROOFSTEP]\nsimpa only [not_le] using hi\n[GOAL]\ncase neg.inr.hnc\nn✝ : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n✝\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\ni : Fin r\nk : ℕ\nhk✝ : k ≤ r\nn : ℕ\nIH :\n  n ≤ r → (M * List.prod (List.take n (listTransvecRow M))) (inr ()) (inl i) = if n ≤ ↑i then M (inr ()) (inl i) else 0\nhk : Nat.succ n ≤ r\nhnr : n < r\nn' : Fin r := { val := n, isLt := hnr }\nA : List.get? (listTransvecRow M) n = some (transvection (inr ()) (inl n') (-M (inr ()) (inl n') / M (inr ()) (inr ())))\nh : ¬n' = i\nhni : n ≠ ↑i\nhi : ↑i < n + 1\n⊢ ¬n ≤ ↑i\n[PROOFSTEP]\nsimpa only [hni.symm, not_le, or_false_iff] using Nat.lt_succ_iff_lt_or_eq.1 hi\n[GOAL]\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\ni : Fin r\n⊢ (List.prod (listTransvecCol M) * M * List.prod (listTransvecRow M)) (inr ()) (inl i) = 0\n[PROOFSTEP]\nhave : listTransvecRow M = listTransvecRow ((listTransvecCol M).prod * M) := by\n  simp [listTransvecRow, listTransvecCol_mul_last_row]\n[GOAL]\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\ni : Fin r\n⊢ listTransvecRow M = listTransvecRow (List.prod (listTransvecCol M) * M)\n[PROOFSTEP]\nsimp [listTransvecRow, listTransvecCol_mul_last_row]\n[GOAL]\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\ni : Fin r\nthis : listTransvecRow M = listTransvecRow (List.prod (listTransvecCol M) * M)\n⊢ (List.prod (listTransvecCol M) * M * List.prod (listTransvecRow M)) (inr ()) (inl i) = 0\n[PROOFSTEP]\nrw [this]\n[GOAL]\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\ni : Fin r\nthis : listTransvecRow M = listTransvecRow (List.prod (listTransvecCol M) * M)\n⊢ (List.prod (listTransvecCol M) * M * List.prod (listTransvecRow (List.prod (listTransvecCol M) * M))) (inr ())\n      (inl i) =\n    0\n[PROOFSTEP]\napply mul_listTransvecRow_last_row\n[GOAL]\ncase hM\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\ni : Fin r\nthis : listTransvecRow M = listTransvecRow (List.prod (listTransvecCol M) * M)\n⊢ (List.prod (listTransvecCol M) * M) (inr ()) (inr ()) ≠ 0\n[PROOFSTEP]\nsimpa [listTransvecCol_mul_last_row] using hM\n[GOAL]\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\ni : Fin r\n⊢ (List.prod (listTransvecCol M) * M * List.prod (listTransvecRow M)) (inl i) (inr ()) = 0\n[PROOFSTEP]\nhave : listTransvecCol M = listTransvecCol (M * (listTransvecRow M).prod) := by\n  simp [listTransvecCol, mul_listTransvecRow_last_col]\n[GOAL]\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\ni : Fin r\n⊢ listTransvecCol M = listTransvecCol (M * List.prod (listTransvecRow M))\n[PROOFSTEP]\nsimp [listTransvecCol, mul_listTransvecRow_last_col]\n[GOAL]\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\ni : Fin r\nthis : listTransvecCol M = listTransvecCol (M * List.prod (listTransvecRow M))\n⊢ (List.prod (listTransvecCol M) * M * List.prod (listTransvecRow M)) (inl i) (inr ()) = 0\n[PROOFSTEP]\nrw [this, Matrix.mul_assoc]\n[GOAL]\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\ni : Fin r\nthis : listTransvecCol M = listTransvecCol (M * List.prod (listTransvecRow M))\n⊢ (List.prod (listTransvecCol (M * List.prod (listTransvecRow M))) * (M * List.prod (listTransvecRow M))) (inl i)\n      (inr ()) =\n    0\n[PROOFSTEP]\napply listTransvecCol_mul_last_col\n[GOAL]\ncase hM\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\ni : Fin r\nthis : listTransvecCol M = listTransvecCol (M * List.prod (listTransvecRow M))\n⊢ (M * List.prod (listTransvecRow M)) (inr ()) (inr ()) ≠ 0\n[PROOFSTEP]\nsimpa [mul_listTransvecRow_last_col] using hM\n[GOAL]\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\n⊢ IsTwoBlockDiagonal (List.prod (listTransvecCol M) * M * List.prod (listTransvecRow M))\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase left\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\n⊢ toBlocks₁₂ (List.prod (listTransvecCol M) * M * List.prod (listTransvecRow M)) = 0\n[PROOFSTEP]\next i j\n[GOAL]\ncase left.a.h\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\ni : Fin r\nj : Unit\n⊢ toBlocks₁₂ (List.prod (listTransvecCol M) * M * List.prod (listTransvecRow M)) i j = OfNat.ofNat 0 i j\n[PROOFSTEP]\nhave : j = unit := by simp only [eq_iff_true_of_subsingleton]\n[GOAL]\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\ni : Fin r\nj : Unit\n⊢ j = ()\n[PROOFSTEP]\nsimp only [eq_iff_true_of_subsingleton]\n[GOAL]\ncase left.a.h\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\ni : Fin r\nj : Unit\nthis : j = ()\n⊢ toBlocks₁₂ (List.prod (listTransvecCol M) * M * List.prod (listTransvecRow M)) i j = OfNat.ofNat 0 i j\n[PROOFSTEP]\nsimp [toBlocks₁₂, this, listTransvecCol_mul_mul_listTransvecRow_last_row M hM]\n[GOAL]\ncase right\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\n⊢ toBlocks₂₁ (List.prod (listTransvecCol M) * M * List.prod (listTransvecRow M)) = 0\n[PROOFSTEP]\next i j\n[GOAL]\ncase right.a.h\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\ni : Unit\nj : Fin r\n⊢ toBlocks₂₁ (List.prod (listTransvecCol M) * M * List.prod (listTransvecRow M)) i j = OfNat.ofNat 0 i j\n[PROOFSTEP]\nhave : i = unit := by simp only [eq_iff_true_of_subsingleton]\n[GOAL]\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\ni : Unit\nj : Fin r\n⊢ i = ()\n[PROOFSTEP]\nsimp only [eq_iff_true_of_subsingleton]\n[GOAL]\ncase right.a.h\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\ni : Unit\nj : Fin r\nthis : i = ()\n⊢ toBlocks₂₁ (List.prod (listTransvecCol M) * M * List.prod (listTransvecRow M)) i j = OfNat.ofNat 0 i j\n[PROOFSTEP]\nsimp [toBlocks₂₁, this, listTransvecCol_mul_mul_listTransvecRow_last_col M hM]\n[GOAL]\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\n⊢ ∃ L L', IsTwoBlockDiagonal (List.prod (List.map toMatrix L) * M * List.prod (List.map toMatrix L'))\n[PROOFSTEP]\nlet L : List (TransvectionStruct (Sum (Fin r) Unit) 𝕜) :=\n  List.ofFn fun i : Fin r => ⟨inl i, inr unit, by simp, -M (inl i) (inr unit) / M (inr unit) (inr unit)⟩\n[GOAL]\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\ni : Fin r\n⊢ inl i ≠ inr ()\n[PROOFSTEP]\nsimp\n[GOAL]\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\nL : List (TransvectionStruct (Fin r ⊕ Unit) 𝕜) :=\n  List.ofFn fun i =>\n    { i := inl i, j := inr (), hij := (_ : ¬inl i = inr ()), c := -M (inl i) (inr ()) / M (inr ()) (inr ()) }\n⊢ ∃ L L', IsTwoBlockDiagonal (List.prod (List.map toMatrix L) * M * List.prod (List.map toMatrix L'))\n[PROOFSTEP]\nlet L' : List (TransvectionStruct (Sum (Fin r) Unit) 𝕜) :=\n  List.ofFn fun i : Fin r => ⟨inr unit, inl i, by simp, -M (inr unit) (inl i) / M (inr unit) (inr unit)⟩\n[GOAL]\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\nL : List (TransvectionStruct (Fin r ⊕ Unit) 𝕜) :=\n  List.ofFn fun i =>\n    { i := inl i, j := inr (), hij := (_ : ¬inl i = inr ()), c := -M (inl i) (inr ()) / M (inr ()) (inr ()) }\ni : Fin r\n⊢ inr () ≠ inl i\n[PROOFSTEP]\nsimp\n[GOAL]\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\nL : List (TransvectionStruct (Fin r ⊕ Unit) 𝕜) :=\n  List.ofFn fun i =>\n    { i := inl i, j := inr (), hij := (_ : ¬inl i = inr ()), c := -M (inl i) (inr ()) / M (inr ()) (inr ()) }\nL' : List (TransvectionStruct (Fin r ⊕ Unit) 𝕜) :=\n  List.ofFn fun i =>\n    { i := inr (), j := inl i, hij := (_ : ¬inr () = inl i), c := -M (inr ()) (inl i) / M (inr ()) (inr ()) }\n⊢ ∃ L L', IsTwoBlockDiagonal (List.prod (List.map toMatrix L) * M * List.prod (List.map toMatrix L'))\n[PROOFSTEP]\nrefine' ⟨L, L', _⟩\n[GOAL]\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\nL : List (TransvectionStruct (Fin r ⊕ Unit) 𝕜) :=\n  List.ofFn fun i =>\n    { i := inl i, j := inr (), hij := (_ : ¬inl i = inr ()), c := -M (inl i) (inr ()) / M (inr ()) (inr ()) }\nL' : List (TransvectionStruct (Fin r ⊕ Unit) 𝕜) :=\n  List.ofFn fun i =>\n    { i := inr (), j := inl i, hij := (_ : ¬inr () = inl i), c := -M (inr ()) (inl i) / M (inr ()) (inr ()) }\n⊢ IsTwoBlockDiagonal (List.prod (List.map toMatrix L) * M * List.prod (List.map toMatrix L'))\n[PROOFSTEP]\nhave A : L.map toMatrix = listTransvecCol M := by simp [listTransvecCol, (· ∘ ·)]\n[GOAL]\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\nL : List (TransvectionStruct (Fin r ⊕ Unit) 𝕜) :=\n  List.ofFn fun i =>\n    { i := inl i, j := inr (), hij := (_ : ¬inl i = inr ()), c := -M (inl i) (inr ()) / M (inr ()) (inr ()) }\nL' : List (TransvectionStruct (Fin r ⊕ Unit) 𝕜) :=\n  List.ofFn fun i =>\n    { i := inr (), j := inl i, hij := (_ : ¬inr () = inl i), c := -M (inr ()) (inl i) / M (inr ()) (inr ()) }\n⊢ List.map toMatrix L = listTransvecCol M\n[PROOFSTEP]\nsimp [listTransvecCol, (· ∘ ·)]\n[GOAL]\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\nL : List (TransvectionStruct (Fin r ⊕ Unit) 𝕜) :=\n  List.ofFn fun i =>\n    { i := inl i, j := inr (), hij := (_ : ¬inl i = inr ()), c := -M (inl i) (inr ()) / M (inr ()) (inr ()) }\nL' : List (TransvectionStruct (Fin r ⊕ Unit) 𝕜) :=\n  List.ofFn fun i =>\n    { i := inr (), j := inl i, hij := (_ : ¬inr () = inl i), c := -M (inr ()) (inl i) / M (inr ()) (inr ()) }\nA : List.map toMatrix L = listTransvecCol M\n⊢ IsTwoBlockDiagonal (List.prod (List.map toMatrix L) * M * List.prod (List.map toMatrix L'))\n[PROOFSTEP]\nhave B : L'.map toMatrix = listTransvecRow M := by simp [listTransvecRow, (· ∘ ·)]\n[GOAL]\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\nL : List (TransvectionStruct (Fin r ⊕ Unit) 𝕜) :=\n  List.ofFn fun i =>\n    { i := inl i, j := inr (), hij := (_ : ¬inl i = inr ()), c := -M (inl i) (inr ()) / M (inr ()) (inr ()) }\nL' : List (TransvectionStruct (Fin r ⊕ Unit) 𝕜) :=\n  List.ofFn fun i =>\n    { i := inr (), j := inl i, hij := (_ : ¬inr () = inl i), c := -M (inr ()) (inl i) / M (inr ()) (inr ()) }\nA : List.map toMatrix L = listTransvecCol M\n⊢ List.map toMatrix L' = listTransvecRow M\n[PROOFSTEP]\nsimp [listTransvecRow, (· ∘ ·)]\n[GOAL]\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\nL : List (TransvectionStruct (Fin r ⊕ Unit) 𝕜) :=\n  List.ofFn fun i =>\n    { i := inl i, j := inr (), hij := (_ : ¬inl i = inr ()), c := -M (inl i) (inr ()) / M (inr ()) (inr ()) }\nL' : List (TransvectionStruct (Fin r ⊕ Unit) 𝕜) :=\n  List.ofFn fun i =>\n    { i := inr (), j := inl i, hij := (_ : ¬inr () = inl i), c := -M (inr ()) (inl i) / M (inr ()) (inr ()) }\nA : List.map toMatrix L = listTransvecCol M\nB : List.map toMatrix L' = listTransvecRow M\n⊢ IsTwoBlockDiagonal (List.prod (List.map toMatrix L) * M * List.prod (List.map toMatrix L'))\n[PROOFSTEP]\nrw [A, B]\n[GOAL]\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) ≠ 0\nL : List (TransvectionStruct (Fin r ⊕ Unit) 𝕜) :=\n  List.ofFn fun i =>\n    { i := inl i, j := inr (), hij := (_ : ¬inl i = inr ()), c := -M (inl i) (inr ()) / M (inr ()) (inr ()) }\nL' : List (TransvectionStruct (Fin r ⊕ Unit) 𝕜) :=\n  List.ofFn fun i =>\n    { i := inr (), j := inl i, hij := (_ : ¬inr () = inl i), c := -M (inr ()) (inl i) / M (inr ()) (inr ()) }\nA : List.map toMatrix L = listTransvecCol M\nB : List.map toMatrix L' = listTransvecRow M\n⊢ IsTwoBlockDiagonal (List.prod (listTransvecCol M) * M * List.prod (listTransvecRow M))\n[PROOFSTEP]\nexact isTwoBlockDiagonal_listTransvecCol_mul_mul_listTransvecRow M hM\n[GOAL]\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM✝ M : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\n⊢ ∃ L L', IsTwoBlockDiagonal (List.prod (List.map toMatrix L) * M * List.prod (List.map toMatrix L'))\n[PROOFSTEP]\nby_cases H : IsTwoBlockDiagonal M\n[GOAL]\ncase pos\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM✝ M : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nH : IsTwoBlockDiagonal M\n⊢ ∃ L L', IsTwoBlockDiagonal (List.prod (List.map toMatrix L) * M * List.prod (List.map toMatrix L'))\n[PROOFSTEP]\nrefine'\n  ⟨List.nil, List.nil, by simpa using H⟩\n    -- we have already proved this when the last coefficient is nonzero\n[GOAL]\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM✝ M : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nH : IsTwoBlockDiagonal M\n⊢ IsTwoBlockDiagonal (List.prod (List.map toMatrix []) * M * List.prod (List.map toMatrix []))\n[PROOFSTEP]\nsimpa using H\n[GOAL]\ncase neg\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM✝ M : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nH : ¬IsTwoBlockDiagonal M\n⊢ ∃ L L', IsTwoBlockDiagonal (List.prod (List.map toMatrix L) * M * List.prod (List.map toMatrix L'))\n[PROOFSTEP]\nby_cases hM : M (inr unit) (inr unit) ≠ 0\n[GOAL]\ncase pos\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM✝ M : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nH : ¬IsTwoBlockDiagonal M\nhM : M (inr ()) (inr ()) ≠ 0\n⊢ ∃ L L', IsTwoBlockDiagonal (List.prod (List.map toMatrix L) * M * List.prod (List.map toMatrix L'))\n[PROOFSTEP]\nexact exists_isTwoBlockDiagonal_of_ne_zero M hM\n[GOAL]\ncase neg\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM✝ M : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nH : ¬IsTwoBlockDiagonal M\nhM : ¬M (inr ()) (inr ()) ≠ 0\n⊢ ∃ L L', IsTwoBlockDiagonal (List.prod (List.map toMatrix L) * M * List.prod (List.map toMatrix L'))\n[PROOFSTEP]\npush_neg at hM \n[GOAL]\ncase neg\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM✝ M : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nH : ¬IsTwoBlockDiagonal M\nhM : M (inr ()) (inr ()) = 0\n⊢ ∃ L L', IsTwoBlockDiagonal (List.prod (List.map toMatrix L) * M * List.prod (List.map toMatrix L'))\n[PROOFSTEP]\nsimp only [not_and_or, IsTwoBlockDiagonal, toBlocks₁₂, toBlocks₂₁, ← Matrix.ext_iff] at H \n[GOAL]\ncase neg\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM✝ M : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) = 0\nH :\n  (¬∀ (i : Fin r) (j : Unit), ↑of (fun i j => M (inl i) (inr j)) i j = OfNat.ofNat 0 i j) ∨\n    ¬∀ (i : Unit) (j : Fin r), ↑of (fun i j => M (inr i) (inl j)) i j = OfNat.ofNat 0 i j\n⊢ ∃ L L', IsTwoBlockDiagonal (List.prod (List.map toMatrix L) * M * List.prod (List.map toMatrix L'))\n[PROOFSTEP]\nhave : ∃ i : Fin r, M (inl i) (inr unit) ≠ 0 ∨ M (inr unit) (inl i) ≠ 0 :=\n  by\n  cases' H with H H\n  · contrapose! H\n    rintro i ⟨⟩\n    exact (H i).1\n  · contrapose! H\n    rintro ⟨⟩ j\n    exact (H j).2\n[GOAL]\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM✝ M : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) = 0\nH :\n  (¬∀ (i : Fin r) (j : Unit), ↑of (fun i j => M (inl i) (inr j)) i j = OfNat.ofNat 0 i j) ∨\n    ¬∀ (i : Unit) (j : Fin r), ↑of (fun i j => M (inr i) (inl j)) i j = OfNat.ofNat 0 i j\n⊢ ∃ i, M (inl i) (inr ()) ≠ 0 ∨ M (inr ()) (inl i) ≠ 0\n[PROOFSTEP]\ncases' H with H H\n[GOAL]\ncase inl\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM✝ M : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) = 0\nH : ¬∀ (i : Fin r) (j : Unit), ↑of (fun i j => M (inl i) (inr j)) i j = OfNat.ofNat 0 i j\n⊢ ∃ i, M (inl i) (inr ()) ≠ 0 ∨ M (inr ()) (inl i) ≠ 0\n[PROOFSTEP]\ncontrapose! H\n[GOAL]\ncase inl\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM✝ M : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) = 0\nH : ∀ (i : Fin r), M (inl i) (inr ()) = 0 ∧ M (inr ()) (inl i) = 0\n⊢ ∀ (i : Fin r) (j : Unit), ↑of (fun i j => M (inl i) (inr j)) i j = OfNat.ofNat 0 i j\n[PROOFSTEP]\nrintro i ⟨⟩\n[GOAL]\ncase inl.unit\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM✝ M : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) = 0\nH : ∀ (i : Fin r), M (inl i) (inr ()) = 0 ∧ M (inr ()) (inl i) = 0\ni : Fin r\n⊢ ↑of (fun i j => M (inl i) (inr j)) i PUnit.unit = OfNat.ofNat 0 i PUnit.unit\n[PROOFSTEP]\nexact (H i).1\n[GOAL]\ncase inr\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM✝ M : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) = 0\nH : ¬∀ (i : Unit) (j : Fin r), ↑of (fun i j => M (inr i) (inl j)) i j = OfNat.ofNat 0 i j\n⊢ ∃ i, M (inl i) (inr ()) ≠ 0 ∨ M (inr ()) (inl i) ≠ 0\n[PROOFSTEP]\ncontrapose! H\n[GOAL]\ncase inr\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM✝ M : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) = 0\nH : ∀ (i : Fin r), M (inl i) (inr ()) = 0 ∧ M (inr ()) (inl i) = 0\n⊢ ∀ (i : Unit) (j : Fin r), ↑of (fun i j => M (inr i) (inl j)) i j = OfNat.ofNat 0 i j\n[PROOFSTEP]\nrintro ⟨⟩ j\n[GOAL]\ncase inr.unit\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM✝ M : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) = 0\nH : ∀ (i : Fin r), M (inl i) (inr ()) = 0 ∧ M (inr ()) (inl i) = 0\nj : Fin r\n⊢ ↑of (fun i j => M (inr i) (inl j)) PUnit.unit j = OfNat.ofNat 0 PUnit.unit j\n[PROOFSTEP]\nexact (H j).2\n[GOAL]\ncase neg\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM✝ M : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) = 0\nH :\n  (¬∀ (i : Fin r) (j : Unit), ↑of (fun i j => M (inl i) (inr j)) i j = OfNat.ofNat 0 i j) ∨\n    ¬∀ (i : Unit) (j : Fin r), ↑of (fun i j => M (inr i) (inl j)) i j = OfNat.ofNat 0 i j\nthis : ∃ i, M (inl i) (inr ()) ≠ 0 ∨ M (inr ()) (inl i) ≠ 0\n⊢ ∃ L L', IsTwoBlockDiagonal (List.prod (List.map toMatrix L) * M * List.prod (List.map toMatrix L'))\n[PROOFSTEP]\nrcases this with ⟨i, h | h⟩\n[GOAL]\ncase neg.intro.inl\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM✝ M : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) = 0\nH :\n  (¬∀ (i : Fin r) (j : Unit), ↑of (fun i j => M (inl i) (inr j)) i j = OfNat.ofNat 0 i j) ∨\n    ¬∀ (i : Unit) (j : Fin r), ↑of (fun i j => M (inr i) (inl j)) i j = OfNat.ofNat 0 i j\ni : Fin r\nh : M (inl i) (inr ()) ≠ 0\n⊢ ∃ L L', IsTwoBlockDiagonal (List.prod (List.map toMatrix L) * M * List.prod (List.map toMatrix L'))\n[PROOFSTEP]\nlet M' := transvection (inr Unit.unit) (inl i) 1 * M\n[GOAL]\ncase neg.intro.inl\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM✝ M : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) = 0\nH :\n  (¬∀ (i : Fin r) (j : Unit), ↑of (fun i j => M (inl i) (inr j)) i j = OfNat.ofNat 0 i j) ∨\n    ¬∀ (i : Unit) (j : Fin r), ↑of (fun i j => M (inr i) (inl j)) i j = OfNat.ofNat 0 i j\ni : Fin r\nh : M (inl i) (inr ()) ≠ 0\nM' : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜 := transvection (inr ()) (inl i) 1 * M\n⊢ ∃ L L', IsTwoBlockDiagonal (List.prod (List.map toMatrix L) * M * List.prod (List.map toMatrix L'))\n[PROOFSTEP]\nhave hM' : M' (inr unit) (inr unit) ≠ 0 := by simpa [hM]\n[GOAL]\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM✝ M : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) = 0\nH :\n  (¬∀ (i : Fin r) (j : Unit), ↑of (fun i j => M (inl i) (inr j)) i j = OfNat.ofNat 0 i j) ∨\n    ¬∀ (i : Unit) (j : Fin r), ↑of (fun i j => M (inr i) (inl j)) i j = OfNat.ofNat 0 i j\ni : Fin r\nh : M (inl i) (inr ()) ≠ 0\nM' : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜 := transvection (inr ()) (inl i) 1 * M\n⊢ M' (inr ()) (inr ()) ≠ 0\n[PROOFSTEP]\nsimpa [hM]\n[GOAL]\ncase neg.intro.inl\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM✝ M : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) = 0\nH :\n  (¬∀ (i : Fin r) (j : Unit), ↑of (fun i j => M (inl i) (inr j)) i j = OfNat.ofNat 0 i j) ∨\n    ¬∀ (i : Unit) (j : Fin r), ↑of (fun i j => M (inr i) (inl j)) i j = OfNat.ofNat 0 i j\ni : Fin r\nh : M (inl i) (inr ()) ≠ 0\nM' : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜 := transvection (inr ()) (inl i) 1 * M\nhM' : M' (inr ()) (inr ()) ≠ 0\n⊢ ∃ L L', IsTwoBlockDiagonal (List.prod (List.map toMatrix L) * M * List.prod (List.map toMatrix L'))\n[PROOFSTEP]\nrcases exists_isTwoBlockDiagonal_of_ne_zero M' hM' with ⟨L, L', hLL'⟩\n[GOAL]\ncase neg.intro.inl.intro.intro\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM✝ M : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) = 0\nH :\n  (¬∀ (i : Fin r) (j : Unit), ↑of (fun i j => M (inl i) (inr j)) i j = OfNat.ofNat 0 i j) ∨\n    ¬∀ (i : Unit) (j : Fin r), ↑of (fun i j => M (inr i) (inl j)) i j = OfNat.ofNat 0 i j\ni : Fin r\nh : M (inl i) (inr ()) ≠ 0\nM' : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜 := transvection (inr ()) (inl i) 1 * M\nhM' : M' (inr ()) (inr ()) ≠ 0\nL L' : List (TransvectionStruct (Fin r ⊕ Unit) 𝕜)\nhLL' : IsTwoBlockDiagonal (List.prod (List.map toMatrix L) * M' * List.prod (List.map toMatrix L'))\n⊢ ∃ L L', IsTwoBlockDiagonal (List.prod (List.map toMatrix L) * M * List.prod (List.map toMatrix L'))\n[PROOFSTEP]\nrw [Matrix.mul_assoc] at hLL' \n[GOAL]\ncase neg.intro.inl.intro.intro\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM✝ M : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) = 0\nH :\n  (¬∀ (i : Fin r) (j : Unit), ↑of (fun i j => M (inl i) (inr j)) i j = OfNat.ofNat 0 i j) ∨\n    ¬∀ (i : Unit) (j : Fin r), ↑of (fun i j => M (inr i) (inl j)) i j = OfNat.ofNat 0 i j\ni : Fin r\nh : M (inl i) (inr ()) ≠ 0\nM' : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜 := transvection (inr ()) (inl i) 1 * M\nhM' : M' (inr ()) (inr ()) ≠ 0\nL L' : List (TransvectionStruct (Fin r ⊕ Unit) 𝕜)\nhLL' : IsTwoBlockDiagonal (List.prod (List.map toMatrix L) * (M' * List.prod (List.map toMatrix L')))\n⊢ ∃ L L', IsTwoBlockDiagonal (List.prod (List.map toMatrix L) * M * List.prod (List.map toMatrix L'))\n[PROOFSTEP]\nrefine' ⟨L ++ [⟨inr unit, inl i, by simp, 1⟩], L', _⟩\n[GOAL]\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM✝ M : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) = 0\nH :\n  (¬∀ (i : Fin r) (j : Unit), ↑of (fun i j => M (inl i) (inr j)) i j = OfNat.ofNat 0 i j) ∨\n    ¬∀ (i : Unit) (j : Fin r), ↑of (fun i j => M (inr i) (inl j)) i j = OfNat.ofNat 0 i j\ni : Fin r\nh : M (inl i) (inr ()) ≠ 0\nM' : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜 := transvection (inr ()) (inl i) 1 * M\nhM' : M' (inr ()) (inr ()) ≠ 0\nL L' : List (TransvectionStruct (Fin r ⊕ Unit) 𝕜)\nhLL' : IsTwoBlockDiagonal (List.prod (List.map toMatrix L) * (M' * List.prod (List.map toMatrix L')))\n⊢ inr () ≠ inl i\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg.intro.inl.intro.intro\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM✝ M : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) = 0\nH :\n  (¬∀ (i : Fin r) (j : Unit), ↑of (fun i j => M (inl i) (inr j)) i j = OfNat.ofNat 0 i j) ∨\n    ¬∀ (i : Unit) (j : Fin r), ↑of (fun i j => M (inr i) (inl j)) i j = OfNat.ofNat 0 i j\ni : Fin r\nh : M (inl i) (inr ()) ≠ 0\nM' : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜 := transvection (inr ()) (inl i) 1 * M\nhM' : M' (inr ()) (inr ()) ≠ 0\nL L' : List (TransvectionStruct (Fin r ⊕ Unit) 𝕜)\nhLL' : IsTwoBlockDiagonal (List.prod (List.map toMatrix L) * (M' * List.prod (List.map toMatrix L')))\n⊢ IsTwoBlockDiagonal\n    (List.prod (List.map toMatrix (L ++ [{ i := inr (), j := inl i, hij := (_ : ¬inr () = inl i), c := 1 }])) * M *\n      List.prod (List.map toMatrix L'))\n[PROOFSTEP]\nsimp only [List.map_append, List.prod_append, Matrix.mul_one, toMatrix_mk, List.prod_cons, List.prod_nil, List.map,\n  Matrix.mul_assoc (L.map toMatrix).prod]\n[GOAL]\ncase neg.intro.inl.intro.intro\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM✝ M : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) = 0\nH :\n  (¬∀ (i : Fin r) (j : Unit), ↑of (fun i j => M (inl i) (inr j)) i j = OfNat.ofNat 0 i j) ∨\n    ¬∀ (i : Unit) (j : Fin r), ↑of (fun i j => M (inr i) (inl j)) i j = OfNat.ofNat 0 i j\ni : Fin r\nh : M (inl i) (inr ()) ≠ 0\nM' : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜 := transvection (inr ()) (inl i) 1 * M\nhM' : M' (inr ()) (inr ()) ≠ 0\nL L' : List (TransvectionStruct (Fin r ⊕ Unit) 𝕜)\nhLL' : IsTwoBlockDiagonal (List.prod (List.map toMatrix L) * (M' * List.prod (List.map toMatrix L')))\n⊢ IsTwoBlockDiagonal\n    (List.prod (List.map toMatrix L) * (transvection (inr ()) (inl i) 1 * M * List.prod (List.map toMatrix L')))\n[PROOFSTEP]\nexact hLL'\n[GOAL]\ncase neg.intro.inr\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM✝ M : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) = 0\nH :\n  (¬∀ (i : Fin r) (j : Unit), ↑of (fun i j => M (inl i) (inr j)) i j = OfNat.ofNat 0 i j) ∨\n    ¬∀ (i : Unit) (j : Fin r), ↑of (fun i j => M (inr i) (inl j)) i j = OfNat.ofNat 0 i j\ni : Fin r\nh : M (inr ()) (inl i) ≠ 0\n⊢ ∃ L L', IsTwoBlockDiagonal (List.prod (List.map toMatrix L) * M * List.prod (List.map toMatrix L'))\n[PROOFSTEP]\nlet M' := M * transvection (inl i) (inr unit) 1\n[GOAL]\ncase neg.intro.inr\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM✝ M : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) = 0\nH :\n  (¬∀ (i : Fin r) (j : Unit), ↑of (fun i j => M (inl i) (inr j)) i j = OfNat.ofNat 0 i j) ∨\n    ¬∀ (i : Unit) (j : Fin r), ↑of (fun i j => M (inr i) (inl j)) i j = OfNat.ofNat 0 i j\ni : Fin r\nh : M (inr ()) (inl i) ≠ 0\nM' : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜 := M * transvection (inl i) (inr ()) 1\n⊢ ∃ L L', IsTwoBlockDiagonal (List.prod (List.map toMatrix L) * M * List.prod (List.map toMatrix L'))\n[PROOFSTEP]\nhave hM' : M' (inr unit) (inr unit) ≠ 0 := by simpa [hM]\n[GOAL]\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM✝ M : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) = 0\nH :\n  (¬∀ (i : Fin r) (j : Unit), ↑of (fun i j => M (inl i) (inr j)) i j = OfNat.ofNat 0 i j) ∨\n    ¬∀ (i : Unit) (j : Fin r), ↑of (fun i j => M (inr i) (inl j)) i j = OfNat.ofNat 0 i j\ni : Fin r\nh : M (inr ()) (inl i) ≠ 0\nM' : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜 := M * transvection (inl i) (inr ()) 1\n⊢ M' (inr ()) (inr ()) ≠ 0\n[PROOFSTEP]\nsimpa [hM]\n[GOAL]\ncase neg.intro.inr\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM✝ M : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) = 0\nH :\n  (¬∀ (i : Fin r) (j : Unit), ↑of (fun i j => M (inl i) (inr j)) i j = OfNat.ofNat 0 i j) ∨\n    ¬∀ (i : Unit) (j : Fin r), ↑of (fun i j => M (inr i) (inl j)) i j = OfNat.ofNat 0 i j\ni : Fin r\nh : M (inr ()) (inl i) ≠ 0\nM' : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜 := M * transvection (inl i) (inr ()) 1\nhM' : M' (inr ()) (inr ()) ≠ 0\n⊢ ∃ L L', IsTwoBlockDiagonal (List.prod (List.map toMatrix L) * M * List.prod (List.map toMatrix L'))\n[PROOFSTEP]\nrcases exists_isTwoBlockDiagonal_of_ne_zero M' hM' with ⟨L, L', hLL'⟩\n[GOAL]\ncase neg.intro.inr.intro.intro\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM✝ M : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) = 0\nH :\n  (¬∀ (i : Fin r) (j : Unit), ↑of (fun i j => M (inl i) (inr j)) i j = OfNat.ofNat 0 i j) ∨\n    ¬∀ (i : Unit) (j : Fin r), ↑of (fun i j => M (inr i) (inl j)) i j = OfNat.ofNat 0 i j\ni : Fin r\nh : M (inr ()) (inl i) ≠ 0\nM' : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜 := M * transvection (inl i) (inr ()) 1\nhM' : M' (inr ()) (inr ()) ≠ 0\nL L' : List (TransvectionStruct (Fin r ⊕ Unit) 𝕜)\nhLL' : IsTwoBlockDiagonal (List.prod (List.map toMatrix L) * M' * List.prod (List.map toMatrix L'))\n⊢ ∃ L L', IsTwoBlockDiagonal (List.prod (List.map toMatrix L) * M * List.prod (List.map toMatrix L'))\n[PROOFSTEP]\nrefine' ⟨L, ⟨inl i, inr unit, by simp, 1⟩ :: L', _⟩\n[GOAL]\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM✝ M : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) = 0\nH :\n  (¬∀ (i : Fin r) (j : Unit), ↑of (fun i j => M (inl i) (inr j)) i j = OfNat.ofNat 0 i j) ∨\n    ¬∀ (i : Unit) (j : Fin r), ↑of (fun i j => M (inr i) (inl j)) i j = OfNat.ofNat 0 i j\ni : Fin r\nh : M (inr ()) (inl i) ≠ 0\nM' : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜 := M * transvection (inl i) (inr ()) 1\nhM' : M' (inr ()) (inr ()) ≠ 0\nL L' : List (TransvectionStruct (Fin r ⊕ Unit) 𝕜)\nhLL' : IsTwoBlockDiagonal (List.prod (List.map toMatrix L) * M' * List.prod (List.map toMatrix L'))\n⊢ inl i ≠ inr ()\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg.intro.inr.intro.intro\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM✝ M : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) = 0\nH :\n  (¬∀ (i : Fin r) (j : Unit), ↑of (fun i j => M (inl i) (inr j)) i j = OfNat.ofNat 0 i j) ∨\n    ¬∀ (i : Unit) (j : Fin r), ↑of (fun i j => M (inr i) (inl j)) i j = OfNat.ofNat 0 i j\ni : Fin r\nh : M (inr ()) (inl i) ≠ 0\nM' : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜 := M * transvection (inl i) (inr ()) 1\nhM' : M' (inr ()) (inr ()) ≠ 0\nL L' : List (TransvectionStruct (Fin r ⊕ Unit) 𝕜)\nhLL' : IsTwoBlockDiagonal (List.prod (List.map toMatrix L) * M' * List.prod (List.map toMatrix L'))\n⊢ IsTwoBlockDiagonal\n    (List.prod (List.map toMatrix L) * M *\n      List.prod (List.map toMatrix ({ i := inl i, j := inr (), hij := (_ : ¬inl i = inr ()), c := 1 } :: L')))\n[PROOFSTEP]\nsimp only [← Matrix.mul_assoc, toMatrix_mk, List.prod_cons, List.map]\n[GOAL]\ncase neg.intro.inr.intro.intro\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM✝ M : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) = 0\nH :\n  (¬∀ (i : Fin r) (j : Unit), ↑of (fun i j => M (inl i) (inr j)) i j = OfNat.ofNat 0 i j) ∨\n    ¬∀ (i : Unit) (j : Fin r), ↑of (fun i j => M (inr i) (inl j)) i j = OfNat.ofNat 0 i j\ni : Fin r\nh : M (inr ()) (inl i) ≠ 0\nM' : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜 := M * transvection (inl i) (inr ()) 1\nhM' : M' (inr ()) (inr ()) ≠ 0\nL L' : List (TransvectionStruct (Fin r ⊕ Unit) 𝕜)\nhLL' : IsTwoBlockDiagonal (List.prod (List.map toMatrix L) * M' * List.prod (List.map toMatrix L'))\n⊢ IsTwoBlockDiagonal\n    (List.prod (List.map toMatrix L) * M * transvection (inl i) (inr ()) 1 * List.prod (List.map toMatrix L'))\n[PROOFSTEP]\nrw [Matrix.mul_assoc (L.map toMatrix).prod]\n[GOAL]\ncase neg.intro.inr.intro.intro\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM✝ M : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nhM : M (inr ()) (inr ()) = 0\nH :\n  (¬∀ (i : Fin r) (j : Unit), ↑of (fun i j => M (inl i) (inr j)) i j = OfNat.ofNat 0 i j) ∨\n    ¬∀ (i : Unit) (j : Fin r), ↑of (fun i j => M (inr i) (inl j)) i j = OfNat.ofNat 0 i j\ni : Fin r\nh : M (inr ()) (inl i) ≠ 0\nM' : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜 := M * transvection (inl i) (inr ()) 1\nhM' : M' (inr ()) (inr ()) ≠ 0\nL L' : List (TransvectionStruct (Fin r ⊕ Unit) 𝕜)\nhLL' : IsTwoBlockDiagonal (List.prod (List.map toMatrix L) * M' * List.prod (List.map toMatrix L'))\n⊢ IsTwoBlockDiagonal\n    (List.prod (List.map toMatrix L) * (M * transvection (inl i) (inr ()) 1) * List.prod (List.map toMatrix L'))\n[PROOFSTEP]\nexact hLL'\n[GOAL]\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM✝ : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nIH :\n  ∀ (M : Matrix (Fin r) (Fin r) 𝕜),\n    ∃ L₀ L₀' D₀, List.prod (List.map toMatrix L₀) * M * List.prod (List.map toMatrix L₀') = diagonal D₀\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\n⊢ ∃ L L' D, List.prod (List.map toMatrix L) * M * List.prod (List.map toMatrix L') = diagonal D\n[PROOFSTEP]\nrcases exists_isTwoBlockDiagonal_list_transvec_mul_mul_list_transvec M with ⟨L₁, L₁', hM⟩\n[GOAL]\ncase intro.intro\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM✝ : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nIH :\n  ∀ (M : Matrix (Fin r) (Fin r) 𝕜),\n    ∃ L₀ L₀' D₀, List.prod (List.map toMatrix L₀) * M * List.prod (List.map toMatrix L₀') = diagonal D₀\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nL₁ L₁' : List (TransvectionStruct (Fin r ⊕ Unit) 𝕜)\nhM : IsTwoBlockDiagonal (List.prod (List.map toMatrix L₁) * M * List.prod (List.map toMatrix L₁'))\n⊢ ∃ L L' D, List.prod (List.map toMatrix L) * M * List.prod (List.map toMatrix L') = diagonal D\n[PROOFSTEP]\nlet M' := (L₁.map toMatrix).prod * M * (L₁'.map toMatrix).prod\n[GOAL]\ncase intro.intro\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM✝ : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nIH :\n  ∀ (M : Matrix (Fin r) (Fin r) 𝕜),\n    ∃ L₀ L₀' D₀, List.prod (List.map toMatrix L₀) * M * List.prod (List.map toMatrix L₀') = diagonal D₀\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nL₁ L₁' : List (TransvectionStruct (Fin r ⊕ Unit) 𝕜)\nhM : IsTwoBlockDiagonal (List.prod (List.map toMatrix L₁) * M * List.prod (List.map toMatrix L₁'))\nM' : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜 := List.prod (List.map toMatrix L₁) * M * List.prod (List.map toMatrix L₁')\n⊢ ∃ L L' D, List.prod (List.map toMatrix L) * M * List.prod (List.map toMatrix L') = diagonal D\n[PROOFSTEP]\nlet M'' := toBlocks₁₁ M'\n[GOAL]\ncase intro.intro\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM✝ : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nIH :\n  ∀ (M : Matrix (Fin r) (Fin r) 𝕜),\n    ∃ L₀ L₀' D₀, List.prod (List.map toMatrix L₀) * M * List.prod (List.map toMatrix L₀') = diagonal D₀\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nL₁ L₁' : List (TransvectionStruct (Fin r ⊕ Unit) 𝕜)\nhM : IsTwoBlockDiagonal (List.prod (List.map toMatrix L₁) * M * List.prod (List.map toMatrix L₁'))\nM' : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜 := List.prod (List.map toMatrix L₁) * M * List.prod (List.map toMatrix L₁')\nM'' : Matrix (Fin r) (Fin r) 𝕜 := toBlocks₁₁ M'\n⊢ ∃ L L' D, List.prod (List.map toMatrix L) * M * List.prod (List.map toMatrix L') = diagonal D\n[PROOFSTEP]\nrcases IH M'' with ⟨L₀, L₀', D₀, h₀⟩\n[GOAL]\ncase intro.intro.intro.intro.intro\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM✝ : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nIH :\n  ∀ (M : Matrix (Fin r) (Fin r) 𝕜),\n    ∃ L₀ L₀' D₀, List.prod (List.map toMatrix L₀) * M * List.prod (List.map toMatrix L₀') = diagonal D₀\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nL₁ L₁' : List (TransvectionStruct (Fin r ⊕ Unit) 𝕜)\nhM : IsTwoBlockDiagonal (List.prod (List.map toMatrix L₁) * M * List.prod (List.map toMatrix L₁'))\nM' : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜 := List.prod (List.map toMatrix L₁) * M * List.prod (List.map toMatrix L₁')\nM'' : Matrix (Fin r) (Fin r) 𝕜 := toBlocks₁₁ M'\nL₀ L₀' : List (TransvectionStruct (Fin r) 𝕜)\nD₀ : Fin r → 𝕜\nh₀ : List.prod (List.map toMatrix L₀) * M'' * List.prod (List.map toMatrix L₀') = diagonal D₀\n⊢ ∃ L L' D, List.prod (List.map toMatrix L) * M * List.prod (List.map toMatrix L') = diagonal D\n[PROOFSTEP]\nset c := M' (inr unit) (inr unit)\n[GOAL]\ncase intro.intro.intro.intro.intro\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM✝ : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nIH :\n  ∀ (M : Matrix (Fin r) (Fin r) 𝕜),\n    ∃ L₀ L₀' D₀, List.prod (List.map toMatrix L₀) * M * List.prod (List.map toMatrix L₀') = diagonal D₀\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nL₁ L₁' : List (TransvectionStruct (Fin r ⊕ Unit) 𝕜)\nhM : IsTwoBlockDiagonal (List.prod (List.map toMatrix L₁) * M * List.prod (List.map toMatrix L₁'))\nM' : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜 := List.prod (List.map toMatrix L₁) * M * List.prod (List.map toMatrix L₁')\nM'' : Matrix (Fin r) (Fin r) 𝕜 := toBlocks₁₁ M'\nL₀ L₀' : List (TransvectionStruct (Fin r) 𝕜)\nD₀ : Fin r → 𝕜\nh₀ : List.prod (List.map toMatrix L₀) * M'' * List.prod (List.map toMatrix L₀') = diagonal D₀\nc : 𝕜 := M' (inr ()) (inr ())\n⊢ ∃ L L' D, List.prod (List.map toMatrix L) * M * List.prod (List.map toMatrix L') = diagonal D\n[PROOFSTEP]\nrefine' ⟨L₀.map (sumInl Unit) ++ L₁, L₁' ++ L₀'.map (sumInl Unit), Sum.elim D₀ fun _ => M' (inr unit) (inr unit), _⟩\n[GOAL]\ncase intro.intro.intro.intro.intro\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM✝ : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nIH :\n  ∀ (M : Matrix (Fin r) (Fin r) 𝕜),\n    ∃ L₀ L₀' D₀, List.prod (List.map toMatrix L₀) * M * List.prod (List.map toMatrix L₀') = diagonal D₀\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nL₁ L₁' : List (TransvectionStruct (Fin r ⊕ Unit) 𝕜)\nhM : IsTwoBlockDiagonal (List.prod (List.map toMatrix L₁) * M * List.prod (List.map toMatrix L₁'))\nM' : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜 := List.prod (List.map toMatrix L₁) * M * List.prod (List.map toMatrix L₁')\nM'' : Matrix (Fin r) (Fin r) 𝕜 := toBlocks₁₁ M'\nL₀ L₀' : List (TransvectionStruct (Fin r) 𝕜)\nD₀ : Fin r → 𝕜\nh₀ : List.prod (List.map toMatrix L₀) * M'' * List.prod (List.map toMatrix L₀') = diagonal D₀\nc : 𝕜 := M' (inr ()) (inr ())\n⊢ List.prod (List.map toMatrix (List.map (sumInl Unit) L₀ ++ L₁)) * M *\n      List.prod (List.map toMatrix (L₁' ++ List.map (sumInl Unit) L₀')) =\n    diagonal (Sum.elim D₀ fun x => M' (inr ()) (inr ()))\n[PROOFSTEP]\nsuffices\n  (L₀.map (toMatrix ∘ sumInl Unit)).prod * M' * (L₀'.map (toMatrix ∘ sumInl Unit)).prod =\n    diagonal (Sum.elim D₀ fun _ => c)\n  by simpa [Matrix.mul_assoc]\n[GOAL]\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM✝ : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nIH :\n  ∀ (M : Matrix (Fin r) (Fin r) 𝕜),\n    ∃ L₀ L₀' D₀, List.prod (List.map toMatrix L₀) * M * List.prod (List.map toMatrix L₀') = diagonal D₀\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nL₁ L₁' : List (TransvectionStruct (Fin r ⊕ Unit) 𝕜)\nhM : IsTwoBlockDiagonal (List.prod (List.map toMatrix L₁) * M * List.prod (List.map toMatrix L₁'))\nM' : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜 := List.prod (List.map toMatrix L₁) * M * List.prod (List.map toMatrix L₁')\nM'' : Matrix (Fin r) (Fin r) 𝕜 := toBlocks₁₁ M'\nL₀ L₀' : List (TransvectionStruct (Fin r) 𝕜)\nD₀ : Fin r → 𝕜\nh₀ : List.prod (List.map toMatrix L₀) * M'' * List.prod (List.map toMatrix L₀') = diagonal D₀\nc : 𝕜 := M' (inr ()) (inr ())\nthis :\n  List.prod (List.map (toMatrix ∘ sumInl Unit) L₀) * M' * List.prod (List.map (toMatrix ∘ sumInl Unit) L₀') =\n    diagonal (Sum.elim D₀ fun x => c)\n⊢ List.prod (List.map toMatrix (List.map (sumInl Unit) L₀ ++ L₁)) * M *\n      List.prod (List.map toMatrix (L₁' ++ List.map (sumInl Unit) L₀')) =\n    diagonal (Sum.elim D₀ fun x => M' (inr ()) (inr ()))\n[PROOFSTEP]\nsimpa [Matrix.mul_assoc]\n[GOAL]\ncase intro.intro.intro.intro.intro\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM✝ : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nIH :\n  ∀ (M : Matrix (Fin r) (Fin r) 𝕜),\n    ∃ L₀ L₀' D₀, List.prod (List.map toMatrix L₀) * M * List.prod (List.map toMatrix L₀') = diagonal D₀\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nL₁ L₁' : List (TransvectionStruct (Fin r ⊕ Unit) 𝕜)\nhM : IsTwoBlockDiagonal (List.prod (List.map toMatrix L₁) * M * List.prod (List.map toMatrix L₁'))\nM' : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜 := List.prod (List.map toMatrix L₁) * M * List.prod (List.map toMatrix L₁')\nM'' : Matrix (Fin r) (Fin r) 𝕜 := toBlocks₁₁ M'\nL₀ L₀' : List (TransvectionStruct (Fin r) 𝕜)\nD₀ : Fin r → 𝕜\nh₀ : List.prod (List.map toMatrix L₀) * M'' * List.prod (List.map toMatrix L₀') = diagonal D₀\nc : 𝕜 := M' (inr ()) (inr ())\n⊢ List.prod (List.map (toMatrix ∘ sumInl Unit) L₀) * M' * List.prod (List.map (toMatrix ∘ sumInl Unit) L₀') =\n    diagonal (Sum.elim D₀ fun x => c)\n[PROOFSTEP]\nhave : M' = fromBlocks M'' 0 0 (diagonal fun _ => c) := by\n  -- porting note: simplified proof, because `congr` didn't work anymore\n  rw [← fromBlocks_toBlocks M', hM.1, hM.2]\n  rfl\n[GOAL]\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM✝ : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nIH :\n  ∀ (M : Matrix (Fin r) (Fin r) 𝕜),\n    ∃ L₀ L₀' D₀, List.prod (List.map toMatrix L₀) * M * List.prod (List.map toMatrix L₀') = diagonal D₀\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nL₁ L₁' : List (TransvectionStruct (Fin r ⊕ Unit) 𝕜)\nhM : IsTwoBlockDiagonal (List.prod (List.map toMatrix L₁) * M * List.prod (List.map toMatrix L₁'))\nM' : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜 := List.prod (List.map toMatrix L₁) * M * List.prod (List.map toMatrix L₁')\nM'' : Matrix (Fin r) (Fin r) 𝕜 := toBlocks₁₁ M'\nL₀ L₀' : List (TransvectionStruct (Fin r) 𝕜)\nD₀ : Fin r → 𝕜\nh₀ : List.prod (List.map toMatrix L₀) * M'' * List.prod (List.map toMatrix L₀') = diagonal D₀\nc : 𝕜 := M' (inr ()) (inr ())\n⊢ M' = fromBlocks M'' 0 0 (diagonal fun x => c)\n[PROOFSTEP]\nrw [← fromBlocks_toBlocks M', hM.1, hM.2]\n[GOAL]\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM✝ : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nIH :\n  ∀ (M : Matrix (Fin r) (Fin r) 𝕜),\n    ∃ L₀ L₀' D₀, List.prod (List.map toMatrix L₀) * M * List.prod (List.map toMatrix L₀') = diagonal D₀\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nL₁ L₁' : List (TransvectionStruct (Fin r ⊕ Unit) 𝕜)\nhM : IsTwoBlockDiagonal (List.prod (List.map toMatrix L₁) * M * List.prod (List.map toMatrix L₁'))\nM' : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜 := List.prod (List.map toMatrix L₁) * M * List.prod (List.map toMatrix L₁')\nM'' : Matrix (Fin r) (Fin r) 𝕜 := toBlocks₁₁ M'\nL₀ L₀' : List (TransvectionStruct (Fin r) 𝕜)\nD₀ : Fin r → 𝕜\nh₀ : List.prod (List.map toMatrix L₀) * M'' * List.prod (List.map toMatrix L₀') = diagonal D₀\nc : 𝕜 := M' (inr ()) (inr ())\n⊢ fromBlocks (toBlocks₁₁ M') 0 0 (toBlocks₂₂ M') = fromBlocks M'' 0 0 (diagonal fun x => c)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase intro.intro.intro.intro.intro\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM✝ : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nIH :\n  ∀ (M : Matrix (Fin r) (Fin r) 𝕜),\n    ∃ L₀ L₀' D₀, List.prod (List.map toMatrix L₀) * M * List.prod (List.map toMatrix L₀') = diagonal D₀\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nL₁ L₁' : List (TransvectionStruct (Fin r ⊕ Unit) 𝕜)\nhM : IsTwoBlockDiagonal (List.prod (List.map toMatrix L₁) * M * List.prod (List.map toMatrix L₁'))\nM' : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜 := List.prod (List.map toMatrix L₁) * M * List.prod (List.map toMatrix L₁')\nM'' : Matrix (Fin r) (Fin r) 𝕜 := toBlocks₁₁ M'\nL₀ L₀' : List (TransvectionStruct (Fin r) 𝕜)\nD₀ : Fin r → 𝕜\nh₀ : List.prod (List.map toMatrix L₀) * M'' * List.prod (List.map toMatrix L₀') = diagonal D₀\nc : 𝕜 := M' (inr ()) (inr ())\nthis : M' = fromBlocks M'' 0 0 (diagonal fun x => c)\n⊢ List.prod (List.map (toMatrix ∘ sumInl Unit) L₀) * M' * List.prod (List.map (toMatrix ∘ sumInl Unit) L₀') =\n    diagonal (Sum.elim D₀ fun x => c)\n[PROOFSTEP]\nrw [this]\n[GOAL]\ncase intro.intro.intro.intro.intro\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝³ : Field 𝕜\ninst✝² : DecidableEq n\ninst✝¹ : DecidableEq p\ninst✝ : CommRing R\nr : ℕ\nM✝ : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nIH :\n  ∀ (M : Matrix (Fin r) (Fin r) 𝕜),\n    ∃ L₀ L₀' D₀, List.prod (List.map toMatrix L₀) * M * List.prod (List.map toMatrix L₀') = diagonal D₀\nM : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\nL₁ L₁' : List (TransvectionStruct (Fin r ⊕ Unit) 𝕜)\nhM : IsTwoBlockDiagonal (List.prod (List.map toMatrix L₁) * M * List.prod (List.map toMatrix L₁'))\nM' : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜 := List.prod (List.map toMatrix L₁) * M * List.prod (List.map toMatrix L₁')\nM'' : Matrix (Fin r) (Fin r) 𝕜 := toBlocks₁₁ M'\nL₀ L₀' : List (TransvectionStruct (Fin r) 𝕜)\nD₀ : Fin r → 𝕜\nh₀ : List.prod (List.map toMatrix L₀) * M'' * List.prod (List.map toMatrix L₀') = diagonal D₀\nc : 𝕜 := M' (inr ()) (inr ())\nthis : M' = fromBlocks M'' 0 0 (diagonal fun x => c)\n⊢ List.prod (List.map (toMatrix ∘ sumInl Unit) L₀) * fromBlocks M'' 0 0 (diagonal fun x => c) *\n      List.prod (List.map (toMatrix ∘ sumInl Unit) L₀') =\n    diagonal (Sum.elim D₀ fun x => c)\n[PROOFSTEP]\nsimp [h₀]\n[GOAL]\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁵ : Field 𝕜\ninst✝⁴ : DecidableEq n\ninst✝³ : DecidableEq p\ninst✝² : CommRing R\nr : ℕ\nM✝ : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\ninst✝¹ : Fintype n\ninst✝ : Fintype p\nM : Matrix p p 𝕜\ne : p ≃ n\nH : ∃ L L' D, List.prod (List.map toMatrix L) * ↑(reindexAlgEquiv 𝕜 e) M * List.prod (List.map toMatrix L') = diagonal D\n⊢ ∃ L L' D, List.prod (List.map toMatrix L) * M * List.prod (List.map toMatrix L') = diagonal D\n[PROOFSTEP]\nrcases H with ⟨L₀, L₀', D₀, h₀⟩\n[GOAL]\ncase intro.intro.intro\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁵ : Field 𝕜\ninst✝⁴ : DecidableEq n\ninst✝³ : DecidableEq p\ninst✝² : CommRing R\nr : ℕ\nM✝ : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\ninst✝¹ : Fintype n\ninst✝ : Fintype p\nM : Matrix p p 𝕜\ne : p ≃ n\nL₀ L₀' : List (TransvectionStruct n 𝕜)\nD₀ : n → 𝕜\nh₀ : List.prod (List.map toMatrix L₀) * ↑(reindexAlgEquiv 𝕜 e) M * List.prod (List.map toMatrix L₀') = diagonal D₀\n⊢ ∃ L L' D, List.prod (List.map toMatrix L) * M * List.prod (List.map toMatrix L') = diagonal D\n[PROOFSTEP]\nrefine' ⟨L₀.map (reindexEquiv e.symm), L₀'.map (reindexEquiv e.symm), D₀ ∘ e, _⟩\n[GOAL]\ncase intro.intro.intro\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁵ : Field 𝕜\ninst✝⁴ : DecidableEq n\ninst✝³ : DecidableEq p\ninst✝² : CommRing R\nr : ℕ\nM✝ : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\ninst✝¹ : Fintype n\ninst✝ : Fintype p\nM : Matrix p p 𝕜\ne : p ≃ n\nL₀ L₀' : List (TransvectionStruct n 𝕜)\nD₀ : n → 𝕜\nh₀ : List.prod (List.map toMatrix L₀) * ↑(reindexAlgEquiv 𝕜 e) M * List.prod (List.map toMatrix L₀') = diagonal D₀\n⊢ List.prod (List.map toMatrix (List.map (reindexEquiv e.symm) L₀)) * M *\n      List.prod (List.map toMatrix (List.map (reindexEquiv e.symm) L₀')) =\n    diagonal (D₀ ∘ ↑e)\n[PROOFSTEP]\nhave : M = reindexAlgEquiv 𝕜 e.symm (reindexAlgEquiv 𝕜 e M) := by\n  simp only [Equiv.symm_symm, submatrix_submatrix, reindex_apply, submatrix_id_id, Equiv.symm_comp_self,\n    reindexAlgEquiv_apply]\n[GOAL]\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁵ : Field 𝕜\ninst✝⁴ : DecidableEq n\ninst✝³ : DecidableEq p\ninst✝² : CommRing R\nr : ℕ\nM✝ : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\ninst✝¹ : Fintype n\ninst✝ : Fintype p\nM : Matrix p p 𝕜\ne : p ≃ n\nL₀ L₀' : List (TransvectionStruct n 𝕜)\nD₀ : n → 𝕜\nh₀ : List.prod (List.map toMatrix L₀) * ↑(reindexAlgEquiv 𝕜 e) M * List.prod (List.map toMatrix L₀') = diagonal D₀\n⊢ M = ↑(reindexAlgEquiv 𝕜 e.symm) (↑(reindexAlgEquiv 𝕜 e) M)\n[PROOFSTEP]\nsimp only [Equiv.symm_symm, submatrix_submatrix, reindex_apply, submatrix_id_id, Equiv.symm_comp_self,\n  reindexAlgEquiv_apply]\n[GOAL]\ncase intro.intro.intro\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁵ : Field 𝕜\ninst✝⁴ : DecidableEq n\ninst✝³ : DecidableEq p\ninst✝² : CommRing R\nr : ℕ\nM✝ : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\ninst✝¹ : Fintype n\ninst✝ : Fintype p\nM : Matrix p p 𝕜\ne : p ≃ n\nL₀ L₀' : List (TransvectionStruct n 𝕜)\nD₀ : n → 𝕜\nh₀ : List.prod (List.map toMatrix L₀) * ↑(reindexAlgEquiv 𝕜 e) M * List.prod (List.map toMatrix L₀') = diagonal D₀\nthis : M = ↑(reindexAlgEquiv 𝕜 e.symm) (↑(reindexAlgEquiv 𝕜 e) M)\n⊢ List.prod (List.map toMatrix (List.map (reindexEquiv e.symm) L₀)) * M *\n      List.prod (List.map toMatrix (List.map (reindexEquiv e.symm) L₀')) =\n    diagonal (D₀ ∘ ↑e)\n[PROOFSTEP]\nrw [this]\n[GOAL]\ncase intro.intro.intro\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁵ : Field 𝕜\ninst✝⁴ : DecidableEq n\ninst✝³ : DecidableEq p\ninst✝² : CommRing R\nr : ℕ\nM✝ : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\ninst✝¹ : Fintype n\ninst✝ : Fintype p\nM : Matrix p p 𝕜\ne : p ≃ n\nL₀ L₀' : List (TransvectionStruct n 𝕜)\nD₀ : n → 𝕜\nh₀ : List.prod (List.map toMatrix L₀) * ↑(reindexAlgEquiv 𝕜 e) M * List.prod (List.map toMatrix L₀') = diagonal D₀\nthis : M = ↑(reindexAlgEquiv 𝕜 e.symm) (↑(reindexAlgEquiv 𝕜 e) M)\n⊢ List.prod (List.map toMatrix (List.map (reindexEquiv e.symm) L₀)) *\n        ↑(reindexAlgEquiv 𝕜 e.symm) (↑(reindexAlgEquiv 𝕜 e) M) *\n      List.prod (List.map toMatrix (List.map (reindexEquiv e.symm) L₀')) =\n    diagonal (D₀ ∘ ↑e)\n[PROOFSTEP]\nsimp only [toMatrix_reindexEquiv_prod, List.map_map, reindexAlgEquiv_apply]\n[GOAL]\ncase intro.intro.intro\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁵ : Field 𝕜\ninst✝⁴ : DecidableEq n\ninst✝³ : DecidableEq p\ninst✝² : CommRing R\nr : ℕ\nM✝ : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\ninst✝¹ : Fintype n\ninst✝ : Fintype p\nM : Matrix p p 𝕜\ne : p ≃ n\nL₀ L₀' : List (TransvectionStruct n 𝕜)\nD₀ : n → 𝕜\nh₀ : List.prod (List.map toMatrix L₀) * ↑(reindexAlgEquiv 𝕜 e) M * List.prod (List.map toMatrix L₀') = diagonal D₀\nthis : M = ↑(reindexAlgEquiv 𝕜 e.symm) (↑(reindexAlgEquiv 𝕜 e) M)\n⊢ ↑(reindex e.symm e.symm) (List.prod (List.map toMatrix L₀)) * ↑(reindex e.symm e.symm) (↑(reindex e e) M) *\n      ↑(reindex e.symm e.symm) (List.prod (List.map toMatrix L₀')) =\n    diagonal (D₀ ∘ ↑e)\n[PROOFSTEP]\nsimp only [← reindexAlgEquiv_apply, ← reindexAlgEquiv_mul, h₀]\n[GOAL]\ncase intro.intro.intro\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁵ : Field 𝕜\ninst✝⁴ : DecidableEq n\ninst✝³ : DecidableEq p\ninst✝² : CommRing R\nr : ℕ\nM✝ : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\ninst✝¹ : Fintype n\ninst✝ : Fintype p\nM : Matrix p p 𝕜\ne : p ≃ n\nL₀ L₀' : List (TransvectionStruct n 𝕜)\nD₀ : n → 𝕜\nh₀ : List.prod (List.map toMatrix L₀) * ↑(reindexAlgEquiv 𝕜 e) M * List.prod (List.map toMatrix L₀') = diagonal D₀\nthis : M = ↑(reindexAlgEquiv 𝕜 e.symm) (↑(reindexAlgEquiv 𝕜 e) M)\n⊢ ↑(reindexAlgEquiv 𝕜 e.symm) (diagonal D₀) = diagonal (D₀ ∘ ↑e)\n[PROOFSTEP]\nsimp only [Equiv.symm_symm, reindex_apply, submatrix_diagonal_equiv, reindexAlgEquiv_apply]\n[GOAL]\nn✝ : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁷ : Field 𝕜\ninst✝⁶ : DecidableEq n✝\ninst✝⁵ : DecidableEq p\ninst✝⁴ : CommRing R\nr : ℕ\nM✝ : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\ninst✝³ : Fintype n✝\ninst✝² : Fintype p\nn : Type\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nM : Matrix n n 𝕜\n⊢ ∃ L L' D, List.prod (List.map toMatrix L) * M * List.prod (List.map toMatrix L') = diagonal D\n[PROOFSTEP]\ninduction' hn : Fintype.card n with r IH generalizing n M\n[GOAL]\ncase zero\nn✝¹ : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁹ : Field 𝕜\ninst✝⁸ : DecidableEq n✝¹\ninst✝⁷ : DecidableEq p\ninst✝⁶ : CommRing R\nr : ℕ\nM✝¹ : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\ninst✝⁵ : Fintype n✝¹\ninst✝⁴ : Fintype p\nn✝ : Type\ninst✝³ : Fintype n✝\ninst✝² : DecidableEq n✝\nM✝ : Matrix n✝ n✝ 𝕜\nx✝ : ℕ\nhn✝ : Fintype.card n✝ = x✝\nn : Type\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nM : Matrix n n 𝕜\nhn : Fintype.card n = Nat.zero\n⊢ ∃ L L' D, List.prod (List.map toMatrix L) * M * List.prod (List.map toMatrix L') = diagonal D\n[PROOFSTEP]\nrefine' ⟨List.nil, List.nil, fun _ => 1, _⟩\n[GOAL]\ncase zero\nn✝¹ : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁹ : Field 𝕜\ninst✝⁸ : DecidableEq n✝¹\ninst✝⁷ : DecidableEq p\ninst✝⁶ : CommRing R\nr : ℕ\nM✝¹ : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\ninst✝⁵ : Fintype n✝¹\ninst✝⁴ : Fintype p\nn✝ : Type\ninst✝³ : Fintype n✝\ninst✝² : DecidableEq n✝\nM✝ : Matrix n✝ n✝ 𝕜\nx✝ : ℕ\nhn✝ : Fintype.card n✝ = x✝\nn : Type\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nM : Matrix n n 𝕜\nhn : Fintype.card n = Nat.zero\n⊢ List.prod (List.map toMatrix []) * M * List.prod (List.map toMatrix []) = diagonal fun x => 1\n[PROOFSTEP]\next i j\n[GOAL]\ncase zero.a.h\nn✝¹ : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁹ : Field 𝕜\ninst✝⁸ : DecidableEq n✝¹\ninst✝⁷ : DecidableEq p\ninst✝⁶ : CommRing R\nr : ℕ\nM✝¹ : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\ninst✝⁵ : Fintype n✝¹\ninst✝⁴ : Fintype p\nn✝ : Type\ninst✝³ : Fintype n✝\ninst✝² : DecidableEq n✝\nM✝ : Matrix n✝ n✝ 𝕜\nx✝ : ℕ\nhn✝ : Fintype.card n✝ = x✝\nn : Type\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nM : Matrix n n 𝕜\nhn : Fintype.card n = Nat.zero\ni j : n\n⊢ (List.prod (List.map toMatrix []) * M * List.prod (List.map toMatrix [])) i j = diagonal (fun x => 1) i j\n[PROOFSTEP]\nrw [Fintype.card_eq_zero_iff] at hn \n[GOAL]\ncase zero.a.h\nn✝¹ : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁹ : Field 𝕜\ninst✝⁸ : DecidableEq n✝¹\ninst✝⁷ : DecidableEq p\ninst✝⁶ : CommRing R\nr : ℕ\nM✝¹ : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\ninst✝⁵ : Fintype n✝¹\ninst✝⁴ : Fintype p\nn✝ : Type\ninst✝³ : Fintype n✝\ninst✝² : DecidableEq n✝\nM✝ : Matrix n✝ n✝ 𝕜\nx✝ : ℕ\nhn✝ : Fintype.card n✝ = x✝\nn : Type\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nM : Matrix n n 𝕜\nhn : IsEmpty n\ni j : n\n⊢ (List.prod (List.map toMatrix []) * M * List.prod (List.map toMatrix [])) i j = diagonal (fun x => 1) i j\n[PROOFSTEP]\nexact hn.elim' i\n[GOAL]\ncase succ\nn✝¹ : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁹ : Field 𝕜\ninst✝⁸ : DecidableEq n✝¹\ninst✝⁷ : DecidableEq p\ninst✝⁶ : CommRing R\nr✝ : ℕ\nM✝¹ : Matrix (Fin r✝ ⊕ Unit) (Fin r✝ ⊕ Unit) 𝕜\ninst✝⁵ : Fintype n✝¹\ninst✝⁴ : Fintype p\nn✝ : Type\ninst✝³ : Fintype n✝\ninst✝² : DecidableEq n✝\nM✝ : Matrix n✝ n✝ 𝕜\nx✝ : ℕ\nhn✝ : Fintype.card n✝ = x✝\nr : ℕ\nIH :\n  ∀ (n : Type) [inst : Fintype n] [inst_1 : DecidableEq n] (M : Matrix n n 𝕜),\n    Fintype.card n = r → ∃ L L' D, List.prod (List.map toMatrix L) * M * List.prod (List.map toMatrix L') = diagonal D\nn : Type\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nM : Matrix n n 𝕜\nhn : Fintype.card n = Nat.succ r\n⊢ ∃ L L' D, List.prod (List.map toMatrix L) * M * List.prod (List.map toMatrix L') = diagonal D\n[PROOFSTEP]\nhave e : n ≃ Sum (Fin r) Unit := by\n  refine' Fintype.equivOfCardEq _\n  rw [hn]\n  rw [@Fintype.card_sum (Fin r) Unit _ _]\n  simp\n[GOAL]\nn✝¹ : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁹ : Field 𝕜\ninst✝⁸ : DecidableEq n✝¹\ninst✝⁷ : DecidableEq p\ninst✝⁶ : CommRing R\nr✝ : ℕ\nM✝¹ : Matrix (Fin r✝ ⊕ Unit) (Fin r✝ ⊕ Unit) 𝕜\ninst✝⁵ : Fintype n✝¹\ninst✝⁴ : Fintype p\nn✝ : Type\ninst✝³ : Fintype n✝\ninst✝² : DecidableEq n✝\nM✝ : Matrix n✝ n✝ 𝕜\nx✝ : ℕ\nhn✝ : Fintype.card n✝ = x✝\nr : ℕ\nIH :\n  ∀ (n : Type) [inst : Fintype n] [inst_1 : DecidableEq n] (M : Matrix n n 𝕜),\n    Fintype.card n = r → ∃ L L' D, List.prod (List.map toMatrix L) * M * List.prod (List.map toMatrix L') = diagonal D\nn : Type\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nM : Matrix n n 𝕜\nhn : Fintype.card n = Nat.succ r\n⊢ n ≃ Fin r ⊕ Unit\n[PROOFSTEP]\nrefine' Fintype.equivOfCardEq _\n[GOAL]\nn✝¹ : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁹ : Field 𝕜\ninst✝⁸ : DecidableEq n✝¹\ninst✝⁷ : DecidableEq p\ninst✝⁶ : CommRing R\nr✝ : ℕ\nM✝¹ : Matrix (Fin r✝ ⊕ Unit) (Fin r✝ ⊕ Unit) 𝕜\ninst✝⁵ : Fintype n✝¹\ninst✝⁴ : Fintype p\nn✝ : Type\ninst✝³ : Fintype n✝\ninst✝² : DecidableEq n✝\nM✝ : Matrix n✝ n✝ 𝕜\nx✝ : ℕ\nhn✝ : Fintype.card n✝ = x✝\nr : ℕ\nIH :\n  ∀ (n : Type) [inst : Fintype n] [inst_1 : DecidableEq n] (M : Matrix n n 𝕜),\n    Fintype.card n = r → ∃ L L' D, List.prod (List.map toMatrix L) * M * List.prod (List.map toMatrix L') = diagonal D\nn : Type\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nM : Matrix n n 𝕜\nhn : Fintype.card n = Nat.succ r\n⊢ Fintype.card n = Fintype.card (Fin r ⊕ Unit)\n[PROOFSTEP]\nrw [hn]\n[GOAL]\nn✝¹ : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁹ : Field 𝕜\ninst✝⁸ : DecidableEq n✝¹\ninst✝⁷ : DecidableEq p\ninst✝⁶ : CommRing R\nr✝ : ℕ\nM✝¹ : Matrix (Fin r✝ ⊕ Unit) (Fin r✝ ⊕ Unit) 𝕜\ninst✝⁵ : Fintype n✝¹\ninst✝⁴ : Fintype p\nn✝ : Type\ninst✝³ : Fintype n✝\ninst✝² : DecidableEq n✝\nM✝ : Matrix n✝ n✝ 𝕜\nx✝ : ℕ\nhn✝ : Fintype.card n✝ = x✝\nr : ℕ\nIH :\n  ∀ (n : Type) [inst : Fintype n] [inst_1 : DecidableEq n] (M : Matrix n n 𝕜),\n    Fintype.card n = r → ∃ L L' D, List.prod (List.map toMatrix L) * M * List.prod (List.map toMatrix L') = diagonal D\nn : Type\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nM : Matrix n n 𝕜\nhn : Fintype.card n = Nat.succ r\n⊢ Nat.succ r = Fintype.card (Fin r ⊕ Unit)\n[PROOFSTEP]\nrw [@Fintype.card_sum (Fin r) Unit _ _]\n[GOAL]\nn✝¹ : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁹ : Field 𝕜\ninst✝⁸ : DecidableEq n✝¹\ninst✝⁷ : DecidableEq p\ninst✝⁶ : CommRing R\nr✝ : ℕ\nM✝¹ : Matrix (Fin r✝ ⊕ Unit) (Fin r✝ ⊕ Unit) 𝕜\ninst✝⁵ : Fintype n✝¹\ninst✝⁴ : Fintype p\nn✝ : Type\ninst✝³ : Fintype n✝\ninst✝² : DecidableEq n✝\nM✝ : Matrix n✝ n✝ 𝕜\nx✝ : ℕ\nhn✝ : Fintype.card n✝ = x✝\nr : ℕ\nIH :\n  ∀ (n : Type) [inst : Fintype n] [inst_1 : DecidableEq n] (M : Matrix n n 𝕜),\n    Fintype.card n = r → ∃ L L' D, List.prod (List.map toMatrix L) * M * List.prod (List.map toMatrix L') = diagonal D\nn : Type\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nM : Matrix n n 𝕜\nhn : Fintype.card n = Nat.succ r\n⊢ Nat.succ r = Fintype.card (Fin r) + Fintype.card Unit\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\nn✝¹ : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁹ : Field 𝕜\ninst✝⁸ : DecidableEq n✝¹\ninst✝⁷ : DecidableEq p\ninst✝⁶ : CommRing R\nr✝ : ℕ\nM✝¹ : Matrix (Fin r✝ ⊕ Unit) (Fin r✝ ⊕ Unit) 𝕜\ninst✝⁵ : Fintype n✝¹\ninst✝⁴ : Fintype p\nn✝ : Type\ninst✝³ : Fintype n✝\ninst✝² : DecidableEq n✝\nM✝ : Matrix n✝ n✝ 𝕜\nx✝ : ℕ\nhn✝ : Fintype.card n✝ = x✝\nr : ℕ\nIH :\n  ∀ (n : Type) [inst : Fintype n] [inst_1 : DecidableEq n] (M : Matrix n n 𝕜),\n    Fintype.card n = r → ∃ L L' D, List.prod (List.map toMatrix L) * M * List.prod (List.map toMatrix L') = diagonal D\nn : Type\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nM : Matrix n n 𝕜\nhn : Fintype.card n = Nat.succ r\ne : n ≃ Fin r ⊕ Unit\n⊢ ∃ L L' D, List.prod (List.map toMatrix L) * M * List.prod (List.map toMatrix L') = diagonal D\n[PROOFSTEP]\napply reindex_exists_list_transvec_mul_mul_list_transvec_eq_diagonal M e\n[GOAL]\ncase succ\nn✝¹ : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁹ : Field 𝕜\ninst✝⁸ : DecidableEq n✝¹\ninst✝⁷ : DecidableEq p\ninst✝⁶ : CommRing R\nr✝ : ℕ\nM✝¹ : Matrix (Fin r✝ ⊕ Unit) (Fin r✝ ⊕ Unit) 𝕜\ninst✝⁵ : Fintype n✝¹\ninst✝⁴ : Fintype p\nn✝ : Type\ninst✝³ : Fintype n✝\ninst✝² : DecidableEq n✝\nM✝ : Matrix n✝ n✝ 𝕜\nx✝ : ℕ\nhn✝ : Fintype.card n✝ = x✝\nr : ℕ\nIH :\n  ∀ (n : Type) [inst : Fintype n] [inst_1 : DecidableEq n] (M : Matrix n n 𝕜),\n    Fintype.card n = r → ∃ L L' D, List.prod (List.map toMatrix L) * M * List.prod (List.map toMatrix L') = diagonal D\nn : Type\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nM : Matrix n n 𝕜\nhn : Fintype.card n = Nat.succ r\ne : n ≃ Fin r ⊕ Unit\n⊢ ∃ L L' D, List.prod (List.map toMatrix L) * ↑(reindexAlgEquiv 𝕜 e) M * List.prod (List.map toMatrix L') = diagonal D\n[PROOFSTEP]\napply exists_list_transvec_mul_mul_list_transvec_eq_diagonal_induction fun N => IH (Fin r) N (by simp)\n[GOAL]\nn✝¹ : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁹ : Field 𝕜\ninst✝⁸ : DecidableEq n✝¹\ninst✝⁷ : DecidableEq p\ninst✝⁶ : CommRing R\nr✝ : ℕ\nM✝¹ : Matrix (Fin r✝ ⊕ Unit) (Fin r✝ ⊕ Unit) 𝕜\ninst✝⁵ : Fintype n✝¹\ninst✝⁴ : Fintype p\nn✝ : Type\ninst✝³ : Fintype n✝\ninst✝² : DecidableEq n✝\nM✝ : Matrix n✝ n✝ 𝕜\nx✝ : ℕ\nhn✝ : Fintype.card n✝ = x✝\nr : ℕ\nIH :\n  ∀ (n : Type) [inst : Fintype n] [inst_1 : DecidableEq n] (M : Matrix n n 𝕜),\n    Fintype.card n = r → ∃ L L' D, List.prod (List.map toMatrix L) * M * List.prod (List.map toMatrix L') = diagonal D\nn : Type\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nM : Matrix n n 𝕜\nhn : Fintype.card n = Nat.succ r\ne : n ≃ Fin r ⊕ Unit\nN : Matrix (Fin r) (Fin r) 𝕜\n⊢ Fintype.card (Fin r) = r\n[PROOFSTEP]\nsimp\n[GOAL]\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁵ : Field 𝕜\ninst✝⁴ : DecidableEq n\ninst✝³ : DecidableEq p\ninst✝² : CommRing R\nr : ℕ\nM✝ : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\ninst✝¹ : Fintype n\ninst✝ : Fintype p\nM : Matrix n n 𝕜\n⊢ ∃ L L' D, List.prod (List.map toMatrix L) * M * List.prod (List.map toMatrix L') = diagonal D\n[PROOFSTEP]\nhave e : n ≃ Fin (Fintype.card n) := Fintype.equivOfCardEq (by simp)\n[GOAL]\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁵ : Field 𝕜\ninst✝⁴ : DecidableEq n\ninst✝³ : DecidableEq p\ninst✝² : CommRing R\nr : ℕ\nM✝ : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\ninst✝¹ : Fintype n\ninst✝ : Fintype p\nM : Matrix n n 𝕜\n⊢ Fintype.card n = Fintype.card (Fin (Fintype.card n))\n[PROOFSTEP]\nsimp\n[GOAL]\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁵ : Field 𝕜\ninst✝⁴ : DecidableEq n\ninst✝³ : DecidableEq p\ninst✝² : CommRing R\nr : ℕ\nM✝ : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\ninst✝¹ : Fintype n\ninst✝ : Fintype p\nM : Matrix n n 𝕜\ne : n ≃ Fin (Fintype.card n)\n⊢ ∃ L L' D, List.prod (List.map toMatrix L) * M * List.prod (List.map toMatrix L') = diagonal D\n[PROOFSTEP]\napply reindex_exists_list_transvec_mul_mul_list_transvec_eq_diagonal M e\n[GOAL]\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁵ : Field 𝕜\ninst✝⁴ : DecidableEq n\ninst✝³ : DecidableEq p\ninst✝² : CommRing R\nr : ℕ\nM✝ : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\ninst✝¹ : Fintype n\ninst✝ : Fintype p\nM : Matrix n n 𝕜\ne : n ≃ Fin (Fintype.card n)\n⊢ ∃ L L' D, List.prod (List.map toMatrix L) * ↑(reindexAlgEquiv 𝕜 e) M * List.prod (List.map toMatrix L') = diagonal D\n[PROOFSTEP]\napply exists_list_transvec_mul_mul_list_transvec_eq_diagonal_aux\n[GOAL]\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁵ : Field 𝕜\ninst✝⁴ : DecidableEq n\ninst✝³ : DecidableEq p\ninst✝² : CommRing R\nr : ℕ\nM✝ : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\ninst✝¹ : Fintype n\ninst✝ : Fintype p\nM : Matrix n n 𝕜\n⊢ ∃ L L' D, M = List.prod (List.map toMatrix L) * diagonal D * List.prod (List.map toMatrix L')\n[PROOFSTEP]\nrcases exists_list_transvec_mul_mul_list_transvec_eq_diagonal M with ⟨L, L', D, h⟩\n[GOAL]\ncase intro.intro.intro\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁵ : Field 𝕜\ninst✝⁴ : DecidableEq n\ninst✝³ : DecidableEq p\ninst✝² : CommRing R\nr : ℕ\nM✝ : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\ninst✝¹ : Fintype n\ninst✝ : Fintype p\nM : Matrix n n 𝕜\nL L' : List (TransvectionStruct n 𝕜)\nD : n → 𝕜\nh : List.prod (List.map toMatrix L) * M * List.prod (List.map toMatrix L') = diagonal D\n⊢ ∃ L L' D, M = List.prod (List.map toMatrix L) * diagonal D * List.prod (List.map toMatrix L')\n[PROOFSTEP]\nrefine' ⟨L.reverse.map TransvectionStruct.inv, L'.reverse.map TransvectionStruct.inv, D, _⟩\n[GOAL]\ncase intro.intro.intro\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁵ : Field 𝕜\ninst✝⁴ : DecidableEq n\ninst✝³ : DecidableEq p\ninst✝² : CommRing R\nr : ℕ\nM✝ : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\ninst✝¹ : Fintype n\ninst✝ : Fintype p\nM : Matrix n n 𝕜\nL L' : List (TransvectionStruct n 𝕜)\nD : n → 𝕜\nh : List.prod (List.map toMatrix L) * M * List.prod (List.map toMatrix L') = diagonal D\n⊢ M =\n    List.prod (List.map toMatrix (List.map TransvectionStruct.inv (List.reverse L))) * diagonal D *\n      List.prod (List.map toMatrix (List.map TransvectionStruct.inv (List.reverse L')))\n[PROOFSTEP]\nsuffices\n  M =\n    (L.reverse.map (toMatrix ∘ TransvectionStruct.inv)).prod * (L.map toMatrix).prod * M *\n      ((L'.map toMatrix).prod * (L'.reverse.map (toMatrix ∘ TransvectionStruct.inv)).prod)\n  by simpa [← h, Matrix.mul_assoc]\n[GOAL]\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁵ : Field 𝕜\ninst✝⁴ : DecidableEq n\ninst✝³ : DecidableEq p\ninst✝² : CommRing R\nr : ℕ\nM✝ : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\ninst✝¹ : Fintype n\ninst✝ : Fintype p\nM : Matrix n n 𝕜\nL L' : List (TransvectionStruct n 𝕜)\nD : n → 𝕜\nh : List.prod (List.map toMatrix L) * M * List.prod (List.map toMatrix L') = diagonal D\nthis :\n  M =\n    List.prod (List.map (toMatrix ∘ TransvectionStruct.inv) (List.reverse L)) * List.prod (List.map toMatrix L) * M *\n      (List.prod (List.map toMatrix L') * List.prod (List.map (toMatrix ∘ TransvectionStruct.inv) (List.reverse L')))\n⊢ M =\n    List.prod (List.map toMatrix (List.map TransvectionStruct.inv (List.reverse L))) * diagonal D *\n      List.prod (List.map toMatrix (List.map TransvectionStruct.inv (List.reverse L')))\n[PROOFSTEP]\nsimpa [← h, Matrix.mul_assoc]\n[GOAL]\ncase intro.intro.intro\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁵ : Field 𝕜\ninst✝⁴ : DecidableEq n\ninst✝³ : DecidableEq p\ninst✝² : CommRing R\nr : ℕ\nM✝ : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜\ninst✝¹ : Fintype n\ninst✝ : Fintype p\nM : Matrix n n 𝕜\nL L' : List (TransvectionStruct n 𝕜)\nD : n → 𝕜\nh : List.prod (List.map toMatrix L) * M * List.prod (List.map toMatrix L') = diagonal D\n⊢ M =\n    List.prod (List.map (toMatrix ∘ TransvectionStruct.inv) (List.reverse L)) * List.prod (List.map toMatrix L) * M *\n      (List.prod (List.map toMatrix L') * List.prod (List.map (toMatrix ∘ TransvectionStruct.inv) (List.reverse L')))\n[PROOFSTEP]\nrw [reverse_inv_prod_mul_prod, prod_mul_reverse_inv_prod, Matrix.one_mul, Matrix.mul_one]\n[GOAL]\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁴ : Field 𝕜\ninst✝³ : DecidableEq n\ninst✝² : DecidableEq p\ninst✝¹ : CommRing R\ninst✝ : Fintype n\nP : Matrix n n 𝕜 → Prop\nM : Matrix n n 𝕜\nhdiag : ∀ (D : n → 𝕜), det (diagonal D) = det M → P (diagonal D)\nhtransvec : ∀ (t : TransvectionStruct n 𝕜), P (toMatrix t)\nhmul : ∀ (A B : Matrix n n 𝕜), P A → P B → P (A * B)\n⊢ P M\n[PROOFSTEP]\nrcases exists_list_transvec_mul_diagonal_mul_list_transvec M with ⟨L, L', D, h⟩\n[GOAL]\ncase intro.intro.intro\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁴ : Field 𝕜\ninst✝³ : DecidableEq n\ninst✝² : DecidableEq p\ninst✝¹ : CommRing R\ninst✝ : Fintype n\nP : Matrix n n 𝕜 → Prop\nM : Matrix n n 𝕜\nhdiag : ∀ (D : n → 𝕜), det (diagonal D) = det M → P (diagonal D)\nhtransvec : ∀ (t : TransvectionStruct n 𝕜), P (toMatrix t)\nhmul : ∀ (A B : Matrix n n 𝕜), P A → P B → P (A * B)\nL L' : List (TransvectionStruct n 𝕜)\nD : n → 𝕜\nh : M = List.prod (List.map toMatrix L) * diagonal D * List.prod (List.map toMatrix L')\n⊢ P M\n[PROOFSTEP]\nhave PD : P (diagonal D) := hdiag D (by simp [h])\n[GOAL]\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁴ : Field 𝕜\ninst✝³ : DecidableEq n\ninst✝² : DecidableEq p\ninst✝¹ : CommRing R\ninst✝ : Fintype n\nP : Matrix n n 𝕜 → Prop\nM : Matrix n n 𝕜\nhdiag : ∀ (D : n → 𝕜), det (diagonal D) = det M → P (diagonal D)\nhtransvec : ∀ (t : TransvectionStruct n 𝕜), P (toMatrix t)\nhmul : ∀ (A B : Matrix n n 𝕜), P A → P B → P (A * B)\nL L' : List (TransvectionStruct n 𝕜)\nD : n → 𝕜\nh : M = List.prod (List.map toMatrix L) * diagonal D * List.prod (List.map toMatrix L')\n⊢ det (diagonal D) = det M\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase intro.intro.intro\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁴ : Field 𝕜\ninst✝³ : DecidableEq n\ninst✝² : DecidableEq p\ninst✝¹ : CommRing R\ninst✝ : Fintype n\nP : Matrix n n 𝕜 → Prop\nM : Matrix n n 𝕜\nhdiag : ∀ (D : n → 𝕜), det (diagonal D) = det M → P (diagonal D)\nhtransvec : ∀ (t : TransvectionStruct n 𝕜), P (toMatrix t)\nhmul : ∀ (A B : Matrix n n 𝕜), P A → P B → P (A * B)\nL L' : List (TransvectionStruct n 𝕜)\nD : n → 𝕜\nh : M = List.prod (List.map toMatrix L) * diagonal D * List.prod (List.map toMatrix L')\nPD : P (diagonal D)\n⊢ P M\n[PROOFSTEP]\nsuffices H :\n  ∀ (L₁ L₂ : List (TransvectionStruct n 𝕜)) (E : Matrix n n 𝕜),\n    P E → P ((L₁.map toMatrix).prod * E * (L₂.map toMatrix).prod)\n[GOAL]\ncase intro.intro.intro\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁴ : Field 𝕜\ninst✝³ : DecidableEq n\ninst✝² : DecidableEq p\ninst✝¹ : CommRing R\ninst✝ : Fintype n\nP : Matrix n n 𝕜 → Prop\nM : Matrix n n 𝕜\nhdiag : ∀ (D : n → 𝕜), det (diagonal D) = det M → P (diagonal D)\nhtransvec : ∀ (t : TransvectionStruct n 𝕜), P (toMatrix t)\nhmul : ∀ (A B : Matrix n n 𝕜), P A → P B → P (A * B)\nL L' : List (TransvectionStruct n 𝕜)\nD : n → 𝕜\nh : M = List.prod (List.map toMatrix L) * diagonal D * List.prod (List.map toMatrix L')\nPD : P (diagonal D)\nH :\n  ∀ (L₁ L₂ : List (TransvectionStruct n 𝕜)) (E : Matrix n n 𝕜),\n    P E → P (List.prod (List.map toMatrix L₁) * E * List.prod (List.map toMatrix L₂))\n⊢ P M\n[PROOFSTEP]\nrw [h]\n[GOAL]\ncase intro.intro.intro\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁴ : Field 𝕜\ninst✝³ : DecidableEq n\ninst✝² : DecidableEq p\ninst✝¹ : CommRing R\ninst✝ : Fintype n\nP : Matrix n n 𝕜 → Prop\nM : Matrix n n 𝕜\nhdiag : ∀ (D : n → 𝕜), det (diagonal D) = det M → P (diagonal D)\nhtransvec : ∀ (t : TransvectionStruct n 𝕜), P (toMatrix t)\nhmul : ∀ (A B : Matrix n n 𝕜), P A → P B → P (A * B)\nL L' : List (TransvectionStruct n 𝕜)\nD : n → 𝕜\nh : M = List.prod (List.map toMatrix L) * diagonal D * List.prod (List.map toMatrix L')\nPD : P (diagonal D)\nH :\n  ∀ (L₁ L₂ : List (TransvectionStruct n 𝕜)) (E : Matrix n n 𝕜),\n    P E → P (List.prod (List.map toMatrix L₁) * E * List.prod (List.map toMatrix L₂))\n⊢ P (List.prod (List.map toMatrix L) * diagonal D * List.prod (List.map toMatrix L'))\n[PROOFSTEP]\napply H L L'\n[GOAL]\ncase intro.intro.intro.a\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁴ : Field 𝕜\ninst✝³ : DecidableEq n\ninst✝² : DecidableEq p\ninst✝¹ : CommRing R\ninst✝ : Fintype n\nP : Matrix n n 𝕜 → Prop\nM : Matrix n n 𝕜\nhdiag : ∀ (D : n → 𝕜), det (diagonal D) = det M → P (diagonal D)\nhtransvec : ∀ (t : TransvectionStruct n 𝕜), P (toMatrix t)\nhmul : ∀ (A B : Matrix n n 𝕜), P A → P B → P (A * B)\nL L' : List (TransvectionStruct n 𝕜)\nD : n → 𝕜\nh : M = List.prod (List.map toMatrix L) * diagonal D * List.prod (List.map toMatrix L')\nPD : P (diagonal D)\nH :\n  ∀ (L₁ L₂ : List (TransvectionStruct n 𝕜)) (E : Matrix n n 𝕜),\n    P E → P (List.prod (List.map toMatrix L₁) * E * List.prod (List.map toMatrix L₂))\n⊢ P (diagonal D)\n[PROOFSTEP]\nexact PD\n[GOAL]\ncase H\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁴ : Field 𝕜\ninst✝³ : DecidableEq n\ninst✝² : DecidableEq p\ninst✝¹ : CommRing R\ninst✝ : Fintype n\nP : Matrix n n 𝕜 → Prop\nM : Matrix n n 𝕜\nhdiag : ∀ (D : n → 𝕜), det (diagonal D) = det M → P (diagonal D)\nhtransvec : ∀ (t : TransvectionStruct n 𝕜), P (toMatrix t)\nhmul : ∀ (A B : Matrix n n 𝕜), P A → P B → P (A * B)\nL L' : List (TransvectionStruct n 𝕜)\nD : n → 𝕜\nh : M = List.prod (List.map toMatrix L) * diagonal D * List.prod (List.map toMatrix L')\nPD : P (diagonal D)\n⊢ ∀ (L₁ L₂ : List (TransvectionStruct n 𝕜)) (E : Matrix n n 𝕜),\n    P E → P (List.prod (List.map toMatrix L₁) * E * List.prod (List.map toMatrix L₂))\n[PROOFSTEP]\nintro L₁ L₂ E PE\n[GOAL]\ncase H\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁴ : Field 𝕜\ninst✝³ : DecidableEq n\ninst✝² : DecidableEq p\ninst✝¹ : CommRing R\ninst✝ : Fintype n\nP : Matrix n n 𝕜 → Prop\nM : Matrix n n 𝕜\nhdiag : ∀ (D : n → 𝕜), det (diagonal D) = det M → P (diagonal D)\nhtransvec : ∀ (t : TransvectionStruct n 𝕜), P (toMatrix t)\nhmul : ∀ (A B : Matrix n n 𝕜), P A → P B → P (A * B)\nL L' : List (TransvectionStruct n 𝕜)\nD : n → 𝕜\nh : M = List.prod (List.map toMatrix L) * diagonal D * List.prod (List.map toMatrix L')\nPD : P (diagonal D)\nL₁ L₂ : List (TransvectionStruct n 𝕜)\nE : Matrix n n 𝕜\nPE : P E\n⊢ P (List.prod (List.map toMatrix L₁) * E * List.prod (List.map toMatrix L₂))\n[PROOFSTEP]\ninduction' L₁ with t L₁ IH\n[GOAL]\ncase H.nil\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁴ : Field 𝕜\ninst✝³ : DecidableEq n\ninst✝² : DecidableEq p\ninst✝¹ : CommRing R\ninst✝ : Fintype n\nP : Matrix n n 𝕜 → Prop\nM : Matrix n n 𝕜\nhdiag : ∀ (D : n → 𝕜), det (diagonal D) = det M → P (diagonal D)\nhtransvec : ∀ (t : TransvectionStruct n 𝕜), P (toMatrix t)\nhmul : ∀ (A B : Matrix n n 𝕜), P A → P B → P (A * B)\nL L' : List (TransvectionStruct n 𝕜)\nD : n → 𝕜\nh : M = List.prod (List.map toMatrix L) * diagonal D * List.prod (List.map toMatrix L')\nPD : P (diagonal D)\nL₂ : List (TransvectionStruct n 𝕜)\nE : Matrix n n 𝕜\nPE : P E\n⊢ P (List.prod (List.map toMatrix []) * E * List.prod (List.map toMatrix L₂))\n[PROOFSTEP]\nsimp only [Matrix.one_mul, List.prod_nil, List.map]\n[GOAL]\ncase H.nil\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁴ : Field 𝕜\ninst✝³ : DecidableEq n\ninst✝² : DecidableEq p\ninst✝¹ : CommRing R\ninst✝ : Fintype n\nP : Matrix n n 𝕜 → Prop\nM : Matrix n n 𝕜\nhdiag : ∀ (D : n → 𝕜), det (diagonal D) = det M → P (diagonal D)\nhtransvec : ∀ (t : TransvectionStruct n 𝕜), P (toMatrix t)\nhmul : ∀ (A B : Matrix n n 𝕜), P A → P B → P (A * B)\nL L' : List (TransvectionStruct n 𝕜)\nD : n → 𝕜\nh : M = List.prod (List.map toMatrix L) * diagonal D * List.prod (List.map toMatrix L')\nPD : P (diagonal D)\nL₂ : List (TransvectionStruct n 𝕜)\nE : Matrix n n 𝕜\nPE : P E\n⊢ P (E * List.prod (List.map toMatrix L₂))\n[PROOFSTEP]\ninduction' L₂ with t L₂ IH generalizing E\n[GOAL]\ncase H.nil.nil\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁴ : Field 𝕜\ninst✝³ : DecidableEq n\ninst✝² : DecidableEq p\ninst✝¹ : CommRing R\ninst✝ : Fintype n\nP : Matrix n n 𝕜 → Prop\nM : Matrix n n 𝕜\nhdiag : ∀ (D : n → 𝕜), det (diagonal D) = det M → P (diagonal D)\nhtransvec : ∀ (t : TransvectionStruct n 𝕜), P (toMatrix t)\nhmul : ∀ (A B : Matrix n n 𝕜), P A → P B → P (A * B)\nL L' : List (TransvectionStruct n 𝕜)\nD : n → 𝕜\nh : M = List.prod (List.map toMatrix L) * diagonal D * List.prod (List.map toMatrix L')\nPD : P (diagonal D)\nE✝ : Matrix n n 𝕜\nPE✝ : P E✝\nE : Matrix n n 𝕜\nPE : P E\n⊢ P (E * List.prod (List.map toMatrix []))\n[PROOFSTEP]\nsimpa\n[GOAL]\ncase H.nil.cons\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁴ : Field 𝕜\ninst✝³ : DecidableEq n\ninst✝² : DecidableEq p\ninst✝¹ : CommRing R\ninst✝ : Fintype n\nP : Matrix n n 𝕜 → Prop\nM : Matrix n n 𝕜\nhdiag : ∀ (D : n → 𝕜), det (diagonal D) = det M → P (diagonal D)\nhtransvec : ∀ (t : TransvectionStruct n 𝕜), P (toMatrix t)\nhmul : ∀ (A B : Matrix n n 𝕜), P A → P B → P (A * B)\nL L' : List (TransvectionStruct n 𝕜)\nD : n → 𝕜\nh : M = List.prod (List.map toMatrix L) * diagonal D * List.prod (List.map toMatrix L')\nPD : P (diagonal D)\nE✝ : Matrix n n 𝕜\nPE✝ : P E✝\nt : TransvectionStruct n 𝕜\nL₂ : List (TransvectionStruct n 𝕜)\nIH : ∀ (E : Matrix n n 𝕜), P E → P (E * List.prod (List.map toMatrix L₂))\nE : Matrix n n 𝕜\nPE : P E\n⊢ P (E * List.prod (List.map toMatrix (t :: L₂)))\n[PROOFSTEP]\nsimp only [← Matrix.mul_assoc, List.prod_cons, List.map]\n[GOAL]\ncase H.nil.cons\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁴ : Field 𝕜\ninst✝³ : DecidableEq n\ninst✝² : DecidableEq p\ninst✝¹ : CommRing R\ninst✝ : Fintype n\nP : Matrix n n 𝕜 → Prop\nM : Matrix n n 𝕜\nhdiag : ∀ (D : n → 𝕜), det (diagonal D) = det M → P (diagonal D)\nhtransvec : ∀ (t : TransvectionStruct n 𝕜), P (toMatrix t)\nhmul : ∀ (A B : Matrix n n 𝕜), P A → P B → P (A * B)\nL L' : List (TransvectionStruct n 𝕜)\nD : n → 𝕜\nh : M = List.prod (List.map toMatrix L) * diagonal D * List.prod (List.map toMatrix L')\nPD : P (diagonal D)\nE✝ : Matrix n n 𝕜\nPE✝ : P E✝\nt : TransvectionStruct n 𝕜\nL₂ : List (TransvectionStruct n 𝕜)\nIH : ∀ (E : Matrix n n 𝕜), P E → P (E * List.prod (List.map toMatrix L₂))\nE : Matrix n n 𝕜\nPE : P E\n⊢ P (E * toMatrix t * List.prod (List.map toMatrix L₂))\n[PROOFSTEP]\napply IH\n[GOAL]\ncase H.nil.cons.PE\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁴ : Field 𝕜\ninst✝³ : DecidableEq n\ninst✝² : DecidableEq p\ninst✝¹ : CommRing R\ninst✝ : Fintype n\nP : Matrix n n 𝕜 → Prop\nM : Matrix n n 𝕜\nhdiag : ∀ (D : n → 𝕜), det (diagonal D) = det M → P (diagonal D)\nhtransvec : ∀ (t : TransvectionStruct n 𝕜), P (toMatrix t)\nhmul : ∀ (A B : Matrix n n 𝕜), P A → P B → P (A * B)\nL L' : List (TransvectionStruct n 𝕜)\nD : n → 𝕜\nh : M = List.prod (List.map toMatrix L) * diagonal D * List.prod (List.map toMatrix L')\nPD : P (diagonal D)\nE✝ : Matrix n n 𝕜\nPE✝ : P E✝\nt : TransvectionStruct n 𝕜\nL₂ : List (TransvectionStruct n 𝕜)\nIH : ∀ (E : Matrix n n 𝕜), P E → P (E * List.prod (List.map toMatrix L₂))\nE : Matrix n n 𝕜\nPE : P E\n⊢ P (E * toMatrix t)\n[PROOFSTEP]\nexact hmul _ _ PE (htransvec _)\n[GOAL]\ncase H.cons\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁴ : Field 𝕜\ninst✝³ : DecidableEq n\ninst✝² : DecidableEq p\ninst✝¹ : CommRing R\ninst✝ : Fintype n\nP : Matrix n n 𝕜 → Prop\nM : Matrix n n 𝕜\nhdiag : ∀ (D : n → 𝕜), det (diagonal D) = det M → P (diagonal D)\nhtransvec : ∀ (t : TransvectionStruct n 𝕜), P (toMatrix t)\nhmul : ∀ (A B : Matrix n n 𝕜), P A → P B → P (A * B)\nL L' : List (TransvectionStruct n 𝕜)\nD : n → 𝕜\nh : M = List.prod (List.map toMatrix L) * diagonal D * List.prod (List.map toMatrix L')\nPD : P (diagonal D)\nL₂ : List (TransvectionStruct n 𝕜)\nE : Matrix n n 𝕜\nPE : P E\nt : TransvectionStruct n 𝕜\nL₁ : List (TransvectionStruct n 𝕜)\nIH : P (List.prod (List.map toMatrix L₁) * E * List.prod (List.map toMatrix L₂))\n⊢ P (List.prod (List.map toMatrix (t :: L₁)) * E * List.prod (List.map toMatrix L₂))\n[PROOFSTEP]\nsimp only [Matrix.mul_assoc, List.prod_cons, List.map] at IH ⊢\n[GOAL]\ncase H.cons\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁴ : Field 𝕜\ninst✝³ : DecidableEq n\ninst✝² : DecidableEq p\ninst✝¹ : CommRing R\ninst✝ : Fintype n\nP : Matrix n n 𝕜 → Prop\nM : Matrix n n 𝕜\nhdiag : ∀ (D : n → 𝕜), det (diagonal D) = det M → P (diagonal D)\nhtransvec : ∀ (t : TransvectionStruct n 𝕜), P (toMatrix t)\nhmul : ∀ (A B : Matrix n n 𝕜), P A → P B → P (A * B)\nL L' : List (TransvectionStruct n 𝕜)\nD : n → 𝕜\nh : M = List.prod (List.map toMatrix L) * diagonal D * List.prod (List.map toMatrix L')\nPD : P (diagonal D)\nL₂ : List (TransvectionStruct n 𝕜)\nE : Matrix n n 𝕜\nPE : P E\nt : TransvectionStruct n 𝕜\nL₁ : List (TransvectionStruct n 𝕜)\nIH : P (List.prod (List.map toMatrix L₁) * (E * List.prod (List.map toMatrix L₂)))\n⊢ P (toMatrix t * (List.prod (List.map toMatrix L₁) * (E * List.prod (List.map toMatrix L₂))))\n[PROOFSTEP]\nexact hmul _ _ (htransvec _) IH\n[GOAL]\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁴ : Field 𝕜\ninst✝³ : DecidableEq n\ninst✝² : DecidableEq p\ninst✝¹ : CommRing R\ninst✝ : Fintype n\nP : Matrix n n 𝕜 → Prop\nM : Matrix n n 𝕜\nhMdet : det M ≠ 0\nhdiag : ∀ (D : n → 𝕜), det (diagonal D) ≠ 0 → P (diagonal D)\nhtransvec : ∀ (t : TransvectionStruct n 𝕜), P (toMatrix t)\nhmul : ∀ (A B : Matrix n n 𝕜), det A ≠ 0 → det B ≠ 0 → P A → P B → P (A * B)\n⊢ P M\n[PROOFSTEP]\nlet Q : Matrix n n 𝕜 → Prop := fun N => det N ≠ 0 ∧ P N\n[GOAL]\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁴ : Field 𝕜\ninst✝³ : DecidableEq n\ninst✝² : DecidableEq p\ninst✝¹ : CommRing R\ninst✝ : Fintype n\nP : Matrix n n 𝕜 → Prop\nM : Matrix n n 𝕜\nhMdet : det M ≠ 0\nhdiag : ∀ (D : n → 𝕜), det (diagonal D) ≠ 0 → P (diagonal D)\nhtransvec : ∀ (t : TransvectionStruct n 𝕜), P (toMatrix t)\nhmul : ∀ (A B : Matrix n n 𝕜), det A ≠ 0 → det B ≠ 0 → P A → P B → P (A * B)\nQ : Matrix n n 𝕜 → Prop := fun N => det N ≠ 0 ∧ P N\n⊢ P M\n[PROOFSTEP]\nhave : Q M := by\n  apply diagonal_transvection_induction Q M\n  · intro D hD\n    have detD : det (diagonal D) ≠ 0 := by\n      rw [hD]\n      exact hMdet\n    exact ⟨detD, hdiag _ detD⟩\n  · intro t\n    exact ⟨by simp, htransvec t⟩\n  · intro A B QA QB\n    exact ⟨by simp [QA.1, QB.1], hmul A B QA.1 QB.1 QA.2 QB.2⟩\n[GOAL]\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁴ : Field 𝕜\ninst✝³ : DecidableEq n\ninst✝² : DecidableEq p\ninst✝¹ : CommRing R\ninst✝ : Fintype n\nP : Matrix n n 𝕜 → Prop\nM : Matrix n n 𝕜\nhMdet : det M ≠ 0\nhdiag : ∀ (D : n → 𝕜), det (diagonal D) ≠ 0 → P (diagonal D)\nhtransvec : ∀ (t : TransvectionStruct n 𝕜), P (toMatrix t)\nhmul : ∀ (A B : Matrix n n 𝕜), det A ≠ 0 → det B ≠ 0 → P A → P B → P (A * B)\nQ : Matrix n n 𝕜 → Prop := fun N => det N ≠ 0 ∧ P N\n⊢ Q M\n[PROOFSTEP]\napply diagonal_transvection_induction Q M\n[GOAL]\ncase hdiag\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁴ : Field 𝕜\ninst✝³ : DecidableEq n\ninst✝² : DecidableEq p\ninst✝¹ : CommRing R\ninst✝ : Fintype n\nP : Matrix n n 𝕜 → Prop\nM : Matrix n n 𝕜\nhMdet : det M ≠ 0\nhdiag : ∀ (D : n → 𝕜), det (diagonal D) ≠ 0 → P (diagonal D)\nhtransvec : ∀ (t : TransvectionStruct n 𝕜), P (toMatrix t)\nhmul : ∀ (A B : Matrix n n 𝕜), det A ≠ 0 → det B ≠ 0 → P A → P B → P (A * B)\nQ : Matrix n n 𝕜 → Prop := fun N => det N ≠ 0 ∧ P N\n⊢ ∀ (D : n → 𝕜), det (diagonal D) = det M → Q (diagonal D)\n[PROOFSTEP]\nintro D hD\n[GOAL]\ncase hdiag\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁴ : Field 𝕜\ninst✝³ : DecidableEq n\ninst✝² : DecidableEq p\ninst✝¹ : CommRing R\ninst✝ : Fintype n\nP : Matrix n n 𝕜 → Prop\nM : Matrix n n 𝕜\nhMdet : det M ≠ 0\nhdiag : ∀ (D : n → 𝕜), det (diagonal D) ≠ 0 → P (diagonal D)\nhtransvec : ∀ (t : TransvectionStruct n 𝕜), P (toMatrix t)\nhmul : ∀ (A B : Matrix n n 𝕜), det A ≠ 0 → det B ≠ 0 → P A → P B → P (A * B)\nQ : Matrix n n 𝕜 → Prop := fun N => det N ≠ 0 ∧ P N\nD : n → 𝕜\nhD : det (diagonal D) = det M\n⊢ Q (diagonal D)\n[PROOFSTEP]\nhave detD : det (diagonal D) ≠ 0 := by\n  rw [hD]\n  exact hMdet\n[GOAL]\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁴ : Field 𝕜\ninst✝³ : DecidableEq n\ninst✝² : DecidableEq p\ninst✝¹ : CommRing R\ninst✝ : Fintype n\nP : Matrix n n 𝕜 → Prop\nM : Matrix n n 𝕜\nhMdet : det M ≠ 0\nhdiag : ∀ (D : n → 𝕜), det (diagonal D) ≠ 0 → P (diagonal D)\nhtransvec : ∀ (t : TransvectionStruct n 𝕜), P (toMatrix t)\nhmul : ∀ (A B : Matrix n n 𝕜), det A ≠ 0 → det B ≠ 0 → P A → P B → P (A * B)\nQ : Matrix n n 𝕜 → Prop := fun N => det N ≠ 0 ∧ P N\nD : n → 𝕜\nhD : det (diagonal D) = det M\n⊢ det (diagonal D) ≠ 0\n[PROOFSTEP]\nrw [hD]\n[GOAL]\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁴ : Field 𝕜\ninst✝³ : DecidableEq n\ninst✝² : DecidableEq p\ninst✝¹ : CommRing R\ninst✝ : Fintype n\nP : Matrix n n 𝕜 → Prop\nM : Matrix n n 𝕜\nhMdet : det M ≠ 0\nhdiag : ∀ (D : n → 𝕜), det (diagonal D) ≠ 0 → P (diagonal D)\nhtransvec : ∀ (t : TransvectionStruct n 𝕜), P (toMatrix t)\nhmul : ∀ (A B : Matrix n n 𝕜), det A ≠ 0 → det B ≠ 0 → P A → P B → P (A * B)\nQ : Matrix n n 𝕜 → Prop := fun N => det N ≠ 0 ∧ P N\nD : n → 𝕜\nhD : det (diagonal D) = det M\n⊢ det M ≠ 0\n[PROOFSTEP]\nexact hMdet\n[GOAL]\ncase hdiag\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁴ : Field 𝕜\ninst✝³ : DecidableEq n\ninst✝² : DecidableEq p\ninst✝¹ : CommRing R\ninst✝ : Fintype n\nP : Matrix n n 𝕜 → Prop\nM : Matrix n n 𝕜\nhMdet : det M ≠ 0\nhdiag : ∀ (D : n → 𝕜), det (diagonal D) ≠ 0 → P (diagonal D)\nhtransvec : ∀ (t : TransvectionStruct n 𝕜), P (toMatrix t)\nhmul : ∀ (A B : Matrix n n 𝕜), det A ≠ 0 → det B ≠ 0 → P A → P B → P (A * B)\nQ : Matrix n n 𝕜 → Prop := fun N => det N ≠ 0 ∧ P N\nD : n → 𝕜\nhD : det (diagonal D) = det M\ndetD : det (diagonal D) ≠ 0\n⊢ Q (diagonal D)\n[PROOFSTEP]\nexact ⟨detD, hdiag _ detD⟩\n[GOAL]\ncase htransvec\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁴ : Field 𝕜\ninst✝³ : DecidableEq n\ninst✝² : DecidableEq p\ninst✝¹ : CommRing R\ninst✝ : Fintype n\nP : Matrix n n 𝕜 → Prop\nM : Matrix n n 𝕜\nhMdet : det M ≠ 0\nhdiag : ∀ (D : n → 𝕜), det (diagonal D) ≠ 0 → P (diagonal D)\nhtransvec : ∀ (t : TransvectionStruct n 𝕜), P (toMatrix t)\nhmul : ∀ (A B : Matrix n n 𝕜), det A ≠ 0 → det B ≠ 0 → P A → P B → P (A * B)\nQ : Matrix n n 𝕜 → Prop := fun N => det N ≠ 0 ∧ P N\n⊢ ∀ (t : TransvectionStruct n 𝕜), Q (toMatrix t)\n[PROOFSTEP]\nintro t\n[GOAL]\ncase htransvec\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁴ : Field 𝕜\ninst✝³ : DecidableEq n\ninst✝² : DecidableEq p\ninst✝¹ : CommRing R\ninst✝ : Fintype n\nP : Matrix n n 𝕜 → Prop\nM : Matrix n n 𝕜\nhMdet : det M ≠ 0\nhdiag : ∀ (D : n → 𝕜), det (diagonal D) ≠ 0 → P (diagonal D)\nhtransvec : ∀ (t : TransvectionStruct n 𝕜), P (toMatrix t)\nhmul : ∀ (A B : Matrix n n 𝕜), det A ≠ 0 → det B ≠ 0 → P A → P B → P (A * B)\nQ : Matrix n n 𝕜 → Prop := fun N => det N ≠ 0 ∧ P N\nt : TransvectionStruct n 𝕜\n⊢ Q (toMatrix t)\n[PROOFSTEP]\nexact ⟨by simp, htransvec t⟩\n[GOAL]\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁴ : Field 𝕜\ninst✝³ : DecidableEq n\ninst✝² : DecidableEq p\ninst✝¹ : CommRing R\ninst✝ : Fintype n\nP : Matrix n n 𝕜 → Prop\nM : Matrix n n 𝕜\nhMdet : det M ≠ 0\nhdiag : ∀ (D : n → 𝕜), det (diagonal D) ≠ 0 → P (diagonal D)\nhtransvec : ∀ (t : TransvectionStruct n 𝕜), P (toMatrix t)\nhmul : ∀ (A B : Matrix n n 𝕜), det A ≠ 0 → det B ≠ 0 → P A → P B → P (A * B)\nQ : Matrix n n 𝕜 → Prop := fun N => det N ≠ 0 ∧ P N\nt : TransvectionStruct n 𝕜\n⊢ det (toMatrix t) ≠ 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase hmul\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁴ : Field 𝕜\ninst✝³ : DecidableEq n\ninst✝² : DecidableEq p\ninst✝¹ : CommRing R\ninst✝ : Fintype n\nP : Matrix n n 𝕜 → Prop\nM : Matrix n n 𝕜\nhMdet : det M ≠ 0\nhdiag : ∀ (D : n → 𝕜), det (diagonal D) ≠ 0 → P (diagonal D)\nhtransvec : ∀ (t : TransvectionStruct n 𝕜), P (toMatrix t)\nhmul : ∀ (A B : Matrix n n 𝕜), det A ≠ 0 → det B ≠ 0 → P A → P B → P (A * B)\nQ : Matrix n n 𝕜 → Prop := fun N => det N ≠ 0 ∧ P N\n⊢ ∀ (A B : Matrix n n 𝕜), Q A → Q B → Q (A * B)\n[PROOFSTEP]\nintro A B QA QB\n[GOAL]\ncase hmul\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁴ : Field 𝕜\ninst✝³ : DecidableEq n\ninst✝² : DecidableEq p\ninst✝¹ : CommRing R\ninst✝ : Fintype n\nP : Matrix n n 𝕜 → Prop\nM : Matrix n n 𝕜\nhMdet : det M ≠ 0\nhdiag : ∀ (D : n → 𝕜), det (diagonal D) ≠ 0 → P (diagonal D)\nhtransvec : ∀ (t : TransvectionStruct n 𝕜), P (toMatrix t)\nhmul : ∀ (A B : Matrix n n 𝕜), det A ≠ 0 → det B ≠ 0 → P A → P B → P (A * B)\nQ : Matrix n n 𝕜 → Prop := fun N => det N ≠ 0 ∧ P N\nA B : Matrix n n 𝕜\nQA : Q A\nQB : Q B\n⊢ Q (A * B)\n[PROOFSTEP]\nexact ⟨by simp [QA.1, QB.1], hmul A B QA.1 QB.1 QA.2 QB.2⟩\n[GOAL]\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁴ : Field 𝕜\ninst✝³ : DecidableEq n\ninst✝² : DecidableEq p\ninst✝¹ : CommRing R\ninst✝ : Fintype n\nP : Matrix n n 𝕜 → Prop\nM : Matrix n n 𝕜\nhMdet : det M ≠ 0\nhdiag : ∀ (D : n → 𝕜), det (diagonal D) ≠ 0 → P (diagonal D)\nhtransvec : ∀ (t : TransvectionStruct n 𝕜), P (toMatrix t)\nhmul : ∀ (A B : Matrix n n 𝕜), det A ≠ 0 → det B ≠ 0 → P A → P B → P (A * B)\nQ : Matrix n n 𝕜 → Prop := fun N => det N ≠ 0 ∧ P N\nA B : Matrix n n 𝕜\nQA : Q A\nQB : Q B\n⊢ det (A * B) ≠ 0\n[PROOFSTEP]\nsimp [QA.1, QB.1]\n[GOAL]\nn : Type u_1\np : Type u_2\nR : Type u₂\n𝕜 : Type u_3\ninst✝⁴ : Field 𝕜\ninst✝³ : DecidableEq n\ninst✝² : DecidableEq p\ninst✝¹ : CommRing R\ninst✝ : Fintype n\nP : Matrix n n 𝕜 → Prop\nM : Matrix n n 𝕜\nhMdet : det M ≠ 0\nhdiag : ∀ (D : n → 𝕜), det (diagonal D) ≠ 0 → P (diagonal D)\nhtransvec : ∀ (t : TransvectionStruct n 𝕜), P (toMatrix t)\nhmul : ∀ (A B : Matrix n n 𝕜), det A ≠ 0 → det B ≠ 0 → P A → P B → P (A * B)\nQ : Matrix n n 𝕜 → Prop := fun N => det N ≠ 0 ∧ P N\nthis : Q M\n⊢ P M\n[PROOFSTEP]\nexact this.2\n", "meta": {"mathlib_filename": "Mathlib.LinearAlgebra.Matrix.Transvection", "llama_tokens": 91700, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7431680199891789, "lm_q2_score": 0.7371581568543044, "lm_q1q2_score": 0.547832367848286}}
{"text": "[GOAL]\nR : Type u_1\ninst✝ : CommRing R\na b x₁ x₂ x₃ x₄ x₅ x₆ x₇ x₈ y₁ y₂ y₃ y₄ y₅ y₆ y₇ y₈ n : R\n⊢ (x₁ ^ 2 + x₂ ^ 2) * (y₁ ^ 2 + y₂ ^ 2) = (x₁ * y₁ - x₂ * y₂) ^ 2 + (x₁ * y₂ + x₂ * y₁) ^ 2\n[PROOFSTEP]\nring\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\na b x₁ x₂ x₃ x₄ x₅ x₆ x₇ x₈ y₁ y₂ y₃ y₄ y₅ y₆ y₇ y₈ n : R\n⊢ (x₁ ^ 2 + n * x₂ ^ 2) * (y₁ ^ 2 + n * y₂ ^ 2) = (x₁ * y₁ - n * x₂ * y₂) ^ 2 + n * (x₁ * y₂ + x₂ * y₁) ^ 2\n[PROOFSTEP]\nring\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\na b x₁ x₂ x₃ x₄ x₅ x₆ x₇ x₈ y₁ y₂ y₃ y₄ y₅ y₆ y₇ y₈ n : R\n⊢ a ^ 4 + 4 * b ^ 4 = ((a - b) ^ 2 + b ^ 2) * ((a + b) ^ 2 + b ^ 2)\n[PROOFSTEP]\nring\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\na b x₁ x₂ x₃ x₄ x₅ x₆ x₇ x₈ y₁ y₂ y₃ y₄ y₅ y₆ y₇ y₈ n : R\n⊢ a ^ 4 + 4 * b ^ 4 = (a ^ 2 - 2 * a * b + 2 * b ^ 2) * (a ^ 2 + 2 * a * b + 2 * b ^ 2)\n[PROOFSTEP]\nring\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\na b x₁ x₂ x₃ x₄ x₅ x₆ x₇ x₈ y₁ y₂ y₃ y₄ y₅ y₆ y₇ y₈ n : R\n⊢ (x₁ ^ 2 + x₂ ^ 2 + x₃ ^ 2 + x₄ ^ 2) * (y₁ ^ 2 + y₂ ^ 2 + y₃ ^ 2 + y₄ ^ 2) =\n    (x₁ * y₁ - x₂ * y₂ - x₃ * y₃ - x₄ * y₄) ^ 2 + (x₁ * y₂ + x₂ * y₁ + x₃ * y₄ - x₄ * y₃) ^ 2 +\n        (x₁ * y₃ - x₂ * y₄ + x₃ * y₁ + x₄ * y₂) ^ 2 +\n      (x₁ * y₄ + x₂ * y₃ - x₃ * y₂ + x₄ * y₁) ^ 2\n[PROOFSTEP]\nring\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\na b x₁ x₂ x₃ x₄ x₅ x₆ x₇ x₈ y₁ y₂ y₃ y₄ y₅ y₆ y₇ y₈ n : R\n⊢ (x₁ ^ 2 + x₂ ^ 2 + x₃ ^ 2 + x₄ ^ 2 + x₅ ^ 2 + x₆ ^ 2 + x₇ ^ 2 + x₈ ^ 2) *\n      (y₁ ^ 2 + y₂ ^ 2 + y₃ ^ 2 + y₄ ^ 2 + y₅ ^ 2 + y₆ ^ 2 + y₇ ^ 2 + y₈ ^ 2) =\n    (x₁ * y₁ - x₂ * y₂ - x₃ * y₃ - x₄ * y₄ - x₅ * y₅ - x₆ * y₆ - x₇ * y₇ - x₈ * y₈) ^ 2 +\n                  (x₁ * y₂ + x₂ * y₁ + x₃ * y₄ - x₄ * y₃ + x₅ * y₆ - x₆ * y₅ - x₇ * y₈ + x₈ * y₇) ^ 2 +\n                (x₁ * y₃ - x₂ * y₄ + x₃ * y₁ + x₄ * y₂ + x₅ * y₇ + x₆ * y₈ - x₇ * y₅ - x₈ * y₆) ^ 2 +\n              (x₁ * y₄ + x₂ * y₃ - x₃ * y₂ + x₄ * y₁ + x₅ * y₈ - x₆ * y₇ + x₇ * y₆ - x₈ * y₅) ^ 2 +\n            (x₁ * y₅ - x₂ * y₆ - x₃ * y₇ - x₄ * y₈ + x₅ * y₁ + x₆ * y₂ + x₇ * y₃ + x₈ * y₄) ^ 2 +\n          (x₁ * y₆ + x₂ * y₅ - x₃ * y₈ + x₄ * y₇ - x₅ * y₂ + x₆ * y₁ - x₇ * y₄ + x₈ * y₃) ^ 2 +\n        (x₁ * y₇ + x₂ * y₈ + x₃ * y₅ - x₄ * y₆ - x₅ * y₃ + x₆ * y₄ + x₇ * y₁ - x₈ * y₂) ^ 2 +\n      (x₁ * y₈ - x₂ * y₇ + x₃ * y₆ + x₄ * y₅ - x₅ * y₄ - x₆ * y₃ + x₇ * y₂ + x₈ * y₁) ^ 2\n[PROOFSTEP]\nring\n", "meta": {"mathlib_filename": "Mathlib.Algebra.GroupPower.Identities", "llama_tokens": 1369, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8267117983401363, "lm_q2_score": 0.6619228891883799, "lm_q1q2_score": 0.5472194620834243}}
{"text": "[GOAL]\nα β : LinOrdCat\ne : ↑α ≃o ↑β\n⊢ ↑e ≫ ↑(OrderIso.symm e) = 𝟙 α\n[PROOFSTEP]\next x\n[GOAL]\ncase w\nα β : LinOrdCat\ne : ↑α ≃o ↑β\nx : (forget LinOrdCat).obj α\n⊢ ↑(↑e ≫ ↑(OrderIso.symm e)) x = ↑(𝟙 α) x\n[PROOFSTEP]\nexact e.symm_apply_apply x\n[GOAL]\nα β : LinOrdCat\ne : ↑α ≃o ↑β\n⊢ ↑(OrderIso.symm e) ≫ ↑e = 𝟙 β\n[PROOFSTEP]\next x\n[GOAL]\ncase w\nα β : LinOrdCat\ne : ↑α ≃o ↑β\nx : (forget LinOrdCat).obj β\n⊢ ↑(↑(OrderIso.symm e) ≫ ↑e) x = ↑(𝟙 β) x\n[PROOFSTEP]\nexact e.apply_symm_apply x\n", "meta": {"mathlib_filename": "Mathlib.Order.Category.LinOrdCat", "llama_tokens": 306, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8267118026095991, "lm_q2_score": 0.661922862511608, "lm_q1q2_score": 0.5472194428554773}}
{"text": "[GOAL]\np : ℕ\n⊢ padicValNat p 0 = 0\n[PROOFSTEP]\nsimp [padicValNat]\n[GOAL]\np : ℕ\n⊢ padicValNat p 1 = 0\n[PROOFSTEP]\nunfold padicValNat\n[GOAL]\np : ℕ\n⊢ (if h : p ≠ 1 ∧ 0 < 1 then Part.get (multiplicity p 1) (_ : multiplicity.Finite p 1) else 0) = 0\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\np : ℕ\nh✝ : p ≠ 1 ∧ 0 < 1\n⊢ Part.get (multiplicity p 1) (_ : multiplicity.Finite p 1) = 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg\np : ℕ\nh✝ : ¬(p ≠ 1 ∧ 0 < 1)\n⊢ 0 = 0\n[PROOFSTEP]\nrfl\n[GOAL]\np : ℕ\nhp : 1 < p\n⊢ padicValNat p p = 1\n[PROOFSTEP]\nhave neq_one : ¬p = 1 ↔ True := iff_of_true hp.ne' trivial\n[GOAL]\np : ℕ\nhp : 1 < p\nneq_one : ¬p = 1 ↔ True\n⊢ padicValNat p p = 1\n[PROOFSTEP]\nhave eq_zero_false : p = 0 ↔ False := iff_false_intro (zero_lt_one.trans hp).ne'\n[GOAL]\np : ℕ\nhp : 1 < p\nneq_one : ¬p = 1 ↔ True\neq_zero_false : p = 0 ↔ False\n⊢ padicValNat p p = 1\n[PROOFSTEP]\nsimp [padicValNat, neq_one, eq_zero_false]\n[GOAL]\np n : ℕ\n⊢ padicValNat p n = 0 ↔ p = 1 ∨ n = 0 ∨ ¬p ∣ n\n[PROOFSTEP]\nsimp only [padicValNat, dite_eq_right_iff, PartENat.get_eq_iff_eq_coe, Nat.cast_zero, multiplicity_eq_zero, and_imp,\n  pos_iff_ne_zero, Ne.def, ← or_iff_not_imp_left]\n[GOAL]\np✝ p n : ℕ\nhp : 1 < p\nhn : 0 < n\n⊢ ↑(maxPowDiv p n) = multiplicity p n\n[PROOFSTEP]\napply multiplicity.unique <| pow_dvd p n\n[GOAL]\np✝ p n : ℕ\nhp : 1 < p\nhn : 0 < n\n⊢ ¬p ^ (maxPowDiv p n + 1) ∣ n\n[PROOFSTEP]\nintro h\n[GOAL]\np✝ p n : ℕ\nhp : 1 < p\nhn : 0 < n\nh : p ^ (maxPowDiv p n + 1) ∣ n\n⊢ False\n[PROOFSTEP]\napply Nat.not_lt.mpr <| le_of_dvd hp hn h\n[GOAL]\np✝ p n : ℕ\nhp : 1 < p\nhn : 0 < n\nh : p ^ (maxPowDiv p n + 1) ∣ n\n⊢ maxPowDiv p n < maxPowDiv p n + 1\n[PROOFSTEP]\nsimp\n[GOAL]\np✝ p n : ℕ\nhp : 1 < p\nhn : 0 < n\nh : multiplicity.Finite p n\n⊢ maxPowDiv p n = Part.get (multiplicity p n) h\n[PROOFSTEP]\nrw [PartENat.get_eq_iff_eq_coe.mpr]\n[GOAL]\np✝ p n : ℕ\nhp : 1 < p\nhn : 0 < n\nh : multiplicity.Finite p n\n⊢ multiplicity p n = ↑(maxPowDiv p n)\n[PROOFSTEP]\napply maxPowDiv_eq_multiplicity hp hn |>.symm\n[GOAL]\np : ℕ\n⊢ padicValNat = maxPowDiv\n[PROOFSTEP]\next p n\n[GOAL]\ncase h.h\np✝ p n : ℕ\n⊢ padicValNat p n = maxPowDiv p n\n[PROOFSTEP]\nby_cases (1 < p ∧ 0 < n)\n[GOAL]\ncase h.h\np✝ p n : ℕ\n⊢ padicValNat p n = maxPowDiv p n\n[PROOFSTEP]\nby_cases (1 < p ∧ 0 < n)\n[GOAL]\ncase pos\np✝ p n : ℕ\nh : 1 < p ∧ 0 < n\n⊢ padicValNat p n = maxPowDiv p n\n[PROOFSTEP]\ndsimp [padicValNat]\n[GOAL]\ncase pos\np✝ p n : ℕ\nh : 1 < p ∧ 0 < n\n⊢ (if h : ¬p = 1 ∧ 0 < n then Part.get (multiplicity p n) (_ : multiplicity.Finite p n) else 0) = maxPowDiv p n\n[PROOFSTEP]\nrw [dif_pos ⟨Nat.ne_of_gt h.1, h.2⟩, maxPowDiv_eq_multiplicity_get h.1 h.2]\n[GOAL]\ncase neg\np✝ p n : ℕ\nh : ¬(1 < p ∧ 0 < n)\n⊢ padicValNat p n = maxPowDiv p n\n[PROOFSTEP]\nsimp only [not_and_or, not_gt_eq, le_zero_iff] at h \n[GOAL]\ncase neg\np✝ p n : ℕ\nh : p ≤ 1 ∨ n = 0\n⊢ padicValNat p n = maxPowDiv p n\n[PROOFSTEP]\napply h.elim\n[GOAL]\ncase neg.left\np✝ p n : ℕ\nh : p ≤ 1 ∨ n = 0\n⊢ p ≤ 1 → padicValNat p n = maxPowDiv p n\n[PROOFSTEP]\nintro h\n[GOAL]\ncase neg.left\np✝ p n : ℕ\nh✝ : p ≤ 1 ∨ n = 0\nh : p ≤ 1\n⊢ padicValNat p n = maxPowDiv p n\n[PROOFSTEP]\ninterval_cases p\n[GOAL]\ncase neg.left.«0»\np✝ p n : ℕ\nh✝ : 0 ≤ 1 ∨ n = 0\nh : 0 ≤ 1\n⊢ padicValNat 0 n = maxPowDiv 0 n\n[PROOFSTEP]\nsimp [Classical.em]\n[GOAL]\ncase neg.left.«1»\np✝ p n : ℕ\nh✝ : 1 ≤ 1 ∨ n = 0\nh : 1 ≤ 1\n⊢ padicValNat 1 n = maxPowDiv 1 n\n[PROOFSTEP]\ndsimp [padicValNat, maxPowDiv]\n[GOAL]\ncase neg.left.«1»\np✝ p n : ℕ\nh✝ : 1 ≤ 1 ∨ n = 0\nh : 1 ≤ 1\n⊢ (if h : ¬1 = 1 ∧ 0 < n then Part.get (multiplicity 1 n) (_ : multiplicity.Finite 1 n) else 0) = go 0 1 n\n[PROOFSTEP]\nrw [go_eq, if_neg, dif_neg]\n[GOAL]\ncase neg.left.«1».hnc\np✝ p n : ℕ\nh✝ : 1 ≤ 1 ∨ n = 0\nh : 1 ≤ 1\n⊢ ¬(¬1 = 1 ∧ 0 < n)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg.left.«1».hnc\np✝ p n : ℕ\nh✝ : 1 ≤ 1 ∨ n = 0\nh : 1 ≤ 1\n⊢ ¬(1 < 1 ∧ 0 < n ∧ n % 1 = 0)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg.right\np✝ p n : ℕ\nh : p ≤ 1 ∨ n = 0\n⊢ n = 0 → padicValNat p n = maxPowDiv p n\n[PROOFSTEP]\nintro h\n[GOAL]\ncase neg.right\np✝ p n : ℕ\nh✝ : p ≤ 1 ∨ n = 0\nh : n = 0\n⊢ padicValNat p n = maxPowDiv p n\n[PROOFSTEP]\nsimp [h]\n[GOAL]\np : ℕ\nz : ℤ\nhp : p ≠ 1\nhz : z ≠ 0\n⊢ (multiplicity (↑p) z).Dom\n[PROOFSTEP]\napply multiplicity.finite_int_iff.2\n[GOAL]\np : ℕ\nz : ℤ\nhp : p ≠ 1\nhz : z ≠ 0\n⊢ Int.natAbs ↑p ≠ 1 ∧ z ≠ 0\n[PROOFSTEP]\nsimp [hp, hz]\n[GOAL]\np : ℕ\nz : ℤ\nhp : p ≠ 1\nhz : z ≠ 0\n⊢ padicValInt p z = Part.get (multiplicity (↑p) z) (_ : multiplicity.Finite (↑p) z)\n[PROOFSTEP]\nrw [padicValInt, padicValNat, dif_pos (And.intro hp (Int.natAbs_pos.mpr hz))]\n[GOAL]\np : ℕ\nz : ℤ\nhp : p ≠ 1\nhz : z ≠ 0\n⊢ Part.get (multiplicity p (Int.natAbs z)) (_ : multiplicity.Finite p (Int.natAbs z)) =\n    Part.get (multiplicity (↑p) z) (_ : multiplicity.Finite (↑p) z)\n[PROOFSTEP]\nsimp only [multiplicity.Int.natAbs p z]\n[GOAL]\np : ℕ\n⊢ padicValInt p 0 = 0\n[PROOFSTEP]\nsimp [padicValInt]\n[GOAL]\np : ℕ\n⊢ padicValInt p 1 = 0\n[PROOFSTEP]\nsimp [padicValInt]\n[GOAL]\np n : ℕ\n⊢ padicValInt p ↑n = padicValNat p n\n[PROOFSTEP]\nsimp [padicValInt]\n[GOAL]\np : ℕ\nhp : 1 < p\n⊢ padicValInt p ↑p = 1\n[PROOFSTEP]\nsimp [padicValNat.self hp]\n[GOAL]\np : ℕ\nz : ℤ\nh : ¬↑p ∣ z\n⊢ padicValInt p z = 0\n[PROOFSTEP]\nrw [padicValInt, padicValNat]\n[GOAL]\np : ℕ\nz : ℤ\nh : ¬↑p ∣ z\n⊢ (if h : p ≠ 1 ∧ 0 < Int.natAbs z then\n      Part.get (multiplicity p (Int.natAbs z)) (_ : multiplicity.Finite p (Int.natAbs z))\n    else 0) =\n    0\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\np : ℕ\nz : ℤ\nh : ¬↑p ∣ z\nh✝ : p ≠ 1 ∧ 0 < Int.natAbs z\n⊢ Part.get (multiplicity p (Int.natAbs z)) (_ : multiplicity.Finite p (Int.natAbs z)) = 0\n[PROOFSTEP]\nsimp [multiplicity.Int.natAbs, multiplicity_eq_zero.2 h]\n[GOAL]\ncase neg\np : ℕ\nz : ℤ\nh : ¬↑p ∣ z\nh✝ : ¬(p ≠ 1 ∧ 0 < Int.natAbs z)\n⊢ 0 = 0\n[PROOFSTEP]\nsimp [multiplicity.Int.natAbs, multiplicity_eq_zero.2 h]\n[GOAL]\np : ℕ\nq : ℚ\n⊢ padicValRat p (-q) = padicValRat p q\n[PROOFSTEP]\nsimp [padicValRat, padicValInt]\n[GOAL]\np : ℕ\n⊢ padicValRat p 0 = 0\n[PROOFSTEP]\nsimp [padicValRat]\n[GOAL]\np : ℕ\n⊢ padicValRat p 1 = 0\n[PROOFSTEP]\nsimp [padicValRat]\n[GOAL]\np : ℕ\nz : ℤ\n⊢ padicValRat p ↑z = ↑(padicValInt p z)\n[PROOFSTEP]\nsimp [padicValRat]\n[GOAL]\np : ℕ\nz : ℤ\nhp : p ≠ 1\nhz : z ≠ 0\n⊢ padicValRat p ↑z = ↑(Part.get (multiplicity (↑p) z) (_ : multiplicity.Finite (↑p) z))\n[PROOFSTEP]\nrw [of_int, padicValInt.of_ne_one_ne_zero hp hz]\n[GOAL]\np : ℕ\nq : ℚ\nhp : p ≠ 1\nhq : q ≠ 0\n⊢ (multiplicity p q.den).Dom\n[PROOFSTEP]\nrw [← finite_iff_dom, finite_nat_iff]\n[GOAL]\np : ℕ\nq : ℚ\nhp : p ≠ 1\nhq : q ≠ 0\n⊢ p ≠ 1 ∧ 0 < q.den\n[PROOFSTEP]\nexact ⟨hp, q.pos⟩\n[GOAL]\np : ℕ\nq : ℚ\nhp : p ≠ 1\nhq : q ≠ 0\n⊢ padicValRat p q =\n    ↑(Part.get (multiplicity (↑p) q.num) (_ : multiplicity.Finite (↑p) q.num)) -\n      ↑(Part.get (multiplicity p q.den) (_ : (multiplicity p q.den).Dom))\n[PROOFSTEP]\nrw [padicValRat, padicValInt.of_ne_one_ne_zero hp, padicValNat, dif_pos]\n[GOAL]\ncase hc\np : ℕ\nq : ℚ\nhp : p ≠ 1\nhq : q ≠ 0\n⊢ p ≠ 1 ∧ 0 < q.den\n[PROOFSTEP]\nexact ⟨hp, q.pos⟩\n[GOAL]\np : ℕ\nq : ℚ\nhp : p ≠ 1\nhq : q ≠ 0\n⊢ q.num ≠ 0\n[PROOFSTEP]\nexact Rat.num_ne_zero_of_ne_zero hq\n[GOAL]\np n : ℕ\n⊢ padicValRat p ↑n = ↑(padicValNat p n)\n[PROOFSTEP]\nsimp [padicValRat]\n[GOAL]\np : ℕ\nhp : 1 < p\n⊢ padicValRat p ↑p = 1\n[PROOFSTEP]\nsimp [hp]\n[GOAL]\np n : ℕ\n⊢ 0 ≤ padicValRat p ↑n\n[PROOFSTEP]\nsimp\n[GOAL]\np n : ℕ\n⊢ ↑(padicValNat p n) = padicValRat p ↑n\n[PROOFSTEP]\nsimp\n[GOAL]\np n : ℕ\nhp : p ≠ 1\nhn : 0 < n\n⊢ ↑(padicValNat p n) = multiplicity p n\n[PROOFSTEP]\nsimp [padicValNat, hp, hn]\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\n⊢ padicValNat p p = 1\n[PROOFSTEP]\nrw [padicValNat_def (@Fact.out p.Prime).pos]\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\n⊢ Part.get (multiplicity p p) (_ : multiplicity.Finite p p) = 1\n[PROOFSTEP]\nsimp\n[GOAL]\np n : ℕ\nhp : Fact (Nat.Prime p)\nhn : 0 < n\ndiv : p ∣ n\n⊢ 1 ≤ padicValNat p n\n[PROOFSTEP]\nrwa [← PartENat.coe_le_coe, padicValNat_def' hp.out.ne_one hn, ← pow_dvd_iff_le_multiplicity, pow_one]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\na : ℤ\n⊢ multiplicity.Finite (↑p) a ↔ a ≠ 0\n[PROOFSTEP]\nsimp [finite_int_iff, hp.1.ne_one]\n[GOAL]\np✝ : ℕ\nhp✝ : Fact (Nat.Prime p✝)\np : ℕ\nhp : Fact (Nat.Prime p)\nq : ℚ\nn d : ℤ\nhqz : q ≠ 0\nqdf : q = n /. d\nhn : n = 0\n⊢ False\n[PROOFSTEP]\nsimp_all\n[GOAL]\np✝ : ℕ\nhp✝ : Fact (Nat.Prime p✝)\np : ℕ\nhp : Fact (Nat.Prime p)\nq : ℚ\nn d : ℤ\nhqz : q ≠ 0\nqdf : q = n /. d\nhd : d = 0\n⊢ False\n[PROOFSTEP]\nsimp_all\n[GOAL]\np✝ : ℕ\nhp✝ : Fact (Nat.Prime p✝)\np : ℕ\nhp : Fact (Nat.Prime p)\nq : ℚ\nn d : ℤ\nhqz : q ≠ 0\nqdf : q = n /. d\n⊢ padicValRat p q =\n    ↑(Part.get (multiplicity (↑p) n) (_ : multiplicity.Finite (↑p) n)) -\n      ↑(Part.get (multiplicity (↑p) d) (_ : multiplicity.Finite (↑p) d))\n[PROOFSTEP]\nhave hd : d ≠ 0 := Rat.mk_denom_ne_zero_of_ne_zero hqz qdf\n[GOAL]\np✝ : ℕ\nhp✝ : Fact (Nat.Prime p✝)\np : ℕ\nhp : Fact (Nat.Prime p)\nq : ℚ\nn d : ℤ\nhqz : q ≠ 0\nqdf : q = n /. d\nhd : d ≠ 0\n⊢ padicValRat p q =\n    ↑(Part.get (multiplicity (↑p) n) (_ : multiplicity.Finite (↑p) n)) -\n      ↑(Part.get (multiplicity (↑p) d) (_ : multiplicity.Finite (↑p) d))\n[PROOFSTEP]\nlet ⟨c, hc1, hc2⟩ := Rat.num_den_mk hd qdf\n[GOAL]\np✝ : ℕ\nhp✝ : Fact (Nat.Prime p✝)\np : ℕ\nhp : Fact (Nat.Prime p)\nq : ℚ\nn d : ℤ\nhqz : q ≠ 0\nqdf : q = n /. d\nhd : d ≠ 0\nc : ℤ\nhc1 : n = c * q.num\nhc2 : d = c * ↑q.den\n⊢ padicValRat p q =\n    ↑(Part.get (multiplicity (↑p) n) (_ : multiplicity.Finite (↑p) n)) -\n      ↑(Part.get (multiplicity (↑p) d) (_ : multiplicity.Finite (↑p) d))\n[PROOFSTEP]\nrw [padicValRat.multiplicity_sub_multiplicity hp.1.ne_one hqz]\n[GOAL]\np✝ : ℕ\nhp✝ : Fact (Nat.Prime p✝)\np : ℕ\nhp : Fact (Nat.Prime p)\nq : ℚ\nn d : ℤ\nhqz : q ≠ 0\nqdf : q = n /. d\nhd : d ≠ 0\nc : ℤ\nhc1 : n = c * q.num\nhc2 : d = c * ↑q.den\n⊢ ↑(Part.get (multiplicity (↑p) q.num) (_ : multiplicity.Finite (↑p) q.num)) -\n      ↑(Part.get (multiplicity p q.den) (_ : (multiplicity p q.den).Dom)) =\n    ↑(Part.get (multiplicity (↑p) n) (_ : multiplicity.Finite (↑p) n)) -\n      ↑(Part.get (multiplicity (↑p) d) (_ : multiplicity.Finite (↑p) d))\n[PROOFSTEP]\nsimp only [Nat.isUnit_iff, hc1, hc2]\n[GOAL]\np✝ : ℕ\nhp✝ : Fact (Nat.Prime p✝)\np : ℕ\nhp : Fact (Nat.Prime p)\nq : ℚ\nn d : ℤ\nhqz : q ≠ 0\nqdf : q = n /. d\nhd : d ≠ 0\nc : ℤ\nhc1 : n = c * q.num\nhc2 : d = c * ↑q.den\n⊢ ↑(Part.get (multiplicity (↑p) q.num) (_ : multiplicity.Finite (↑p) q.num)) -\n      ↑(Part.get (multiplicity p q.den) (_ : (multiplicity p q.den).Dom)) =\n    ↑(Part.get (multiplicity (↑p) (c * q.num)) (_ : (multiplicity (↑p) (c * q.num)).Dom)) -\n      ↑(Part.get (multiplicity (↑p) (c * ↑q.den)) (_ : (multiplicity (↑p) (c * ↑q.den)).Dom))\n[PROOFSTEP]\nrw [multiplicity.mul' (Nat.prime_iff_prime_int.1 hp.1), multiplicity.mul' (Nat.prime_iff_prime_int.1 hp.1)]\n[GOAL]\np✝ : ℕ\nhp✝ : Fact (Nat.Prime p✝)\np : ℕ\nhp : Fact (Nat.Prime p)\nq : ℚ\nn d : ℤ\nhqz : q ≠ 0\nqdf : q = n /. d\nhd : d ≠ 0\nc : ℤ\nhc1 : n = c * q.num\nhc2 : d = c * ↑q.den\n⊢ ↑(Part.get (multiplicity (↑p) q.num) (_ : multiplicity.Finite (↑p) q.num)) -\n      ↑(Part.get (multiplicity p q.den) (_ : (multiplicity p q.den).Dom)) =\n    ↑(Part.get (multiplicity (↑p) c) (_ : multiplicity.Finite (↑p) c) +\n          Part.get (multiplicity (↑p) q.num) (_ : multiplicity.Finite (↑p) q.num)) -\n      ↑(Part.get (multiplicity (↑p) c) (_ : multiplicity.Finite (↑p) c) +\n          Part.get (multiplicity ↑p ↑q.den) (_ : multiplicity.Finite ↑p ↑q.den))\n[PROOFSTEP]\nrw [Nat.cast_add, Nat.cast_add]\n[GOAL]\np✝ : ℕ\nhp✝ : Fact (Nat.Prime p✝)\np : ℕ\nhp : Fact (Nat.Prime p)\nq : ℚ\nn d : ℤ\nhqz : q ≠ 0\nqdf : q = n /. d\nhd : d ≠ 0\nc : ℤ\nhc1 : n = c * q.num\nhc2 : d = c * ↑q.den\n⊢ ↑(Part.get (multiplicity (↑p) q.num) (_ : multiplicity.Finite (↑p) q.num)) -\n      ↑(Part.get (multiplicity p q.den) (_ : (multiplicity p q.den).Dom)) =\n    ↑(Part.get (multiplicity (↑p) c) (_ : multiplicity.Finite (↑p) c)) +\n        ↑(Part.get (multiplicity (↑p) q.num) (_ : multiplicity.Finite (↑p) q.num)) -\n      (↑(Part.get (multiplicity (↑p) c) (_ : multiplicity.Finite (↑p) c)) +\n        ↑(Part.get (multiplicity ↑p ↑q.den) (_ : multiplicity.Finite ↑p ↑q.den)))\n[PROOFSTEP]\nsimp_rw [Int.coe_nat_multiplicity p q.den]\n[GOAL]\np✝ : ℕ\nhp✝ : Fact (Nat.Prime p✝)\np : ℕ\nhp : Fact (Nat.Prime p)\nq : ℚ\nn d : ℤ\nhqz : q ≠ 0\nqdf : q = n /. d\nhd : d ≠ 0\nc : ℤ\nhc1 : n = c * q.num\nhc2 : d = c * ↑q.den\n⊢ ↑(Part.get (multiplicity (↑p) q.num) (_ : multiplicity.Finite (↑p) q.num)) -\n      ↑(Part.get (multiplicity p q.den) (_ : (multiplicity p q.den).Dom)) =\n    ↑(Part.get (multiplicity (↑p) c) (_ : multiplicity.Finite (↑p) c)) +\n        ↑(Part.get (multiplicity (↑p) q.num) (_ : multiplicity.Finite (↑p) q.num)) -\n      (↑(Part.get (multiplicity (↑p) c) (_ : multiplicity.Finite (↑p) c)) +\n        ↑(Part.get (multiplicity p q.den) (_ : (multiplicity p q.den).Dom)))\n[PROOFSTEP]\nring\n  -- Porting note: was\n    -- simp only [hc1, hc2, multiplicity.mul' (Nat.prime_iff_prime_int.1 hp.1),\n    --   hp.1.ne_one, hqz, pos_iff_ne_zero, Int.coe_nat_multiplicity p q.den\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nq r : ℚ\nhq : q ≠ 0\nhr : r ≠ 0\n⊢ padicValRat p (q * r) = padicValRat p q + padicValRat p r\n[PROOFSTEP]\nhave : q * r = q.num * r.num /. (q.den * r.den) := by rw_mod_cast [Rat.mul_num_den]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nq r : ℚ\nhq : q ≠ 0\nhr : r ≠ 0\n⊢ q * r = q.num * r.num /. (↑q.den * ↑r.den)\n[PROOFSTEP]\nrw_mod_cast [Rat.mul_num_den]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nq r : ℚ\nhq : q ≠ 0\nhr : r ≠ 0\nthis : q * r = q.num * r.num /. (↑q.den * ↑r.den)\n⊢ padicValRat p (q * r) = padicValRat p q + padicValRat p r\n[PROOFSTEP]\nhave hq' : q.num /. q.den ≠ 0 := by rwa [Rat.num_den]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nq r : ℚ\nhq : q ≠ 0\nhr : r ≠ 0\nthis : q * r = q.num * r.num /. (↑q.den * ↑r.den)\n⊢ q.num /. ↑q.den ≠ 0\n[PROOFSTEP]\nrwa [Rat.num_den]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nq r : ℚ\nhq : q ≠ 0\nhr : r ≠ 0\nthis : q * r = q.num * r.num /. (↑q.den * ↑r.den)\nhq' : q.num /. ↑q.den ≠ 0\n⊢ padicValRat p (q * r) = padicValRat p q + padicValRat p r\n[PROOFSTEP]\nhave hr' : r.num /. r.den ≠ 0 := by rwa [Rat.num_den]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nq r : ℚ\nhq : q ≠ 0\nhr : r ≠ 0\nthis : q * r = q.num * r.num /. (↑q.den * ↑r.den)\nhq' : q.num /. ↑q.den ≠ 0\n⊢ r.num /. ↑r.den ≠ 0\n[PROOFSTEP]\nrwa [Rat.num_den]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nq r : ℚ\nhq : q ≠ 0\nhr : r ≠ 0\nthis : q * r = q.num * r.num /. (↑q.den * ↑r.den)\nhq' : q.num /. ↑q.den ≠ 0\nhr' : r.num /. ↑r.den ≠ 0\n⊢ padicValRat p (q * r) = padicValRat p q + padicValRat p r\n[PROOFSTEP]\nhave hp' : Prime (p : ℤ) := Nat.prime_iff_prime_int.1 hp.1\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nq r : ℚ\nhq : q ≠ 0\nhr : r ≠ 0\nthis : q * r = q.num * r.num /. (↑q.den * ↑r.den)\nhq' : q.num /. ↑q.den ≠ 0\nhr' : r.num /. ↑r.den ≠ 0\nhp' : _root_.Prime ↑p\n⊢ padicValRat p (q * r) = padicValRat p q + padicValRat p r\n[PROOFSTEP]\nrw [padicValRat.defn p (mul_ne_zero hq hr) this]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nq r : ℚ\nhq : q ≠ 0\nhr : r ≠ 0\nthis : q * r = q.num * r.num /. (↑q.den * ↑r.den)\nhq' : q.num /. ↑q.den ≠ 0\nhr' : r.num /. ↑r.den ≠ 0\nhp' : _root_.Prime ↑p\n⊢ ↑(Part.get (multiplicity (↑p) (q.num * r.num)) (_ : multiplicity.Finite (↑p) (q.num * r.num))) -\n      ↑(Part.get (multiplicity (↑p) (↑q.den * ↑r.den)) (_ : multiplicity.Finite (↑p) (↑q.den * ↑r.den))) =\n    padicValRat p q + padicValRat p r\n[PROOFSTEP]\nconv_rhs => rw [← @Rat.num_den q, padicValRat.defn p hq', ← @Rat.num_den r, padicValRat.defn p hr']\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nq r : ℚ\nhq : q ≠ 0\nhr : r ≠ 0\nthis : q * r = q.num * r.num /. (↑q.den * ↑r.den)\nhq' : q.num /. ↑q.den ≠ 0\nhr' : r.num /. ↑r.den ≠ 0\nhp' : _root_.Prime ↑p\n| padicValRat p q + padicValRat p r\n[PROOFSTEP]\nrw [← @Rat.num_den q, padicValRat.defn p hq', ← @Rat.num_den r, padicValRat.defn p hr']\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nq r : ℚ\nhq : q ≠ 0\nhr : r ≠ 0\nthis : q * r = q.num * r.num /. (↑q.den * ↑r.den)\nhq' : q.num /. ↑q.den ≠ 0\nhr' : r.num /. ↑r.den ≠ 0\nhp' : _root_.Prime ↑p\n| padicValRat p q + padicValRat p r\n[PROOFSTEP]\nrw [← @Rat.num_den q, padicValRat.defn p hq', ← @Rat.num_den r, padicValRat.defn p hr']\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nq r : ℚ\nhq : q ≠ 0\nhr : r ≠ 0\nthis : q * r = q.num * r.num /. (↑q.den * ↑r.den)\nhq' : q.num /. ↑q.den ≠ 0\nhr' : r.num /. ↑r.den ≠ 0\nhp' : _root_.Prime ↑p\n| padicValRat p q + padicValRat p r\n[PROOFSTEP]\nrw [← @Rat.num_den q, padicValRat.defn p hq', ← @Rat.num_den r, padicValRat.defn p hr']\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nq r : ℚ\nhq : q ≠ 0\nhr : r ≠ 0\nthis : q * r = q.num * r.num /. (↑q.den * ↑r.den)\nhq' : q.num /. ↑q.den ≠ 0\nhr' : r.num /. ↑r.den ≠ 0\nhp' : _root_.Prime ↑p\n⊢ ↑(Part.get (multiplicity (↑p) (q.num * r.num)) (_ : multiplicity.Finite (↑p) (q.num * r.num))) -\n      ↑(Part.get (multiplicity (↑p) (↑q.den * ↑r.den)) (_ : multiplicity.Finite (↑p) (↑q.den * ↑r.den))) =\n    ↑(Part.get (multiplicity (↑p) q.num) (_ : multiplicity.Finite (↑p) q.num)) -\n        ↑(Part.get (multiplicity ↑p ↑q.den) (_ : multiplicity.Finite ↑p ↑q.den)) +\n      (↑(Part.get (multiplicity (↑p) r.num) (_ : multiplicity.Finite (↑p) r.num)) -\n        ↑(Part.get (multiplicity ↑p ↑r.den) (_ : multiplicity.Finite ↑p ↑r.den)))\n[PROOFSTEP]\nrw [multiplicity.mul' hp', multiplicity.mul' hp', Nat.cast_add, Nat.cast_add]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nq r : ℚ\nhq : q ≠ 0\nhr : r ≠ 0\nthis : q * r = q.num * r.num /. (↑q.den * ↑r.den)\nhq' : q.num /. ↑q.den ≠ 0\nhr' : r.num /. ↑r.den ≠ 0\nhp' : _root_.Prime ↑p\n⊢ ↑(Part.get (multiplicity (↑p) q.num) (_ : multiplicity.Finite (↑p) q.num)) +\n        ↑(Part.get (multiplicity (↑p) r.num) (_ : multiplicity.Finite (↑p) r.num)) -\n      (↑(Part.get (multiplicity ↑p ↑q.den) (_ : multiplicity.Finite ↑p ↑q.den)) +\n        ↑(Part.get (multiplicity ↑p ↑r.den) (_ : multiplicity.Finite ↑p ↑r.den))) =\n    ↑(Part.get (multiplicity (↑p) q.num) (_ : multiplicity.Finite (↑p) q.num)) -\n        ↑(Part.get (multiplicity ↑p ↑q.den) (_ : multiplicity.Finite ↑p ↑q.den)) +\n      (↑(Part.get (multiplicity (↑p) r.num) (_ : multiplicity.Finite (↑p) r.num)) -\n        ↑(Part.get (multiplicity ↑p ↑r.den) (_ : multiplicity.Finite ↑p ↑r.den)))\n[PROOFSTEP]\nring\n  -- Porting note: was\n    -- simp [add_comm, add_left_comm, sub_eq_add_neg]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nq : ℚ\nhq : q ≠ 0\nk : ℕ\n⊢ padicValRat p (q ^ k) = ↑k * padicValRat p q\n[PROOFSTEP]\ninduction k\n[GOAL]\ncase zero\np : ℕ\nhp : Fact (Nat.Prime p)\nq : ℚ\nhq : q ≠ 0\n⊢ padicValRat p (q ^ zero) = ↑zero * padicValRat p q\n[PROOFSTEP]\nsimp [*, padicValRat.mul hq (pow_ne_zero _ hq), _root_.pow_succ, add_mul, add_comm]\n[GOAL]\ncase succ\np : ℕ\nhp : Fact (Nat.Prime p)\nq : ℚ\nhq : q ≠ 0\nn✝ : ℕ\nn_ih✝ : padicValRat p (q ^ n✝) = ↑n✝ * padicValRat p q\n⊢ padicValRat p (q ^ succ n✝) = ↑(succ n✝) * padicValRat p q\n[PROOFSTEP]\nsimp [*, padicValRat.mul hq (pow_ne_zero _ hq), _root_.pow_succ, add_mul, add_comm]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nq : ℚ\n⊢ padicValRat p q⁻¹ = -padicValRat p q\n[PROOFSTEP]\nby_cases hq : q = 0\n[GOAL]\ncase pos\np : ℕ\nhp : Fact (Nat.Prime p)\nq : ℚ\nhq : q = 0\n⊢ padicValRat p q⁻¹ = -padicValRat p q\n[PROOFSTEP]\nsimp [hq]\n[GOAL]\ncase neg\np : ℕ\nhp : Fact (Nat.Prime p)\nq : ℚ\nhq : ¬q = 0\n⊢ padicValRat p q⁻¹ = -padicValRat p q\n[PROOFSTEP]\nrw [eq_neg_iff_add_eq_zero, ← padicValRat.mul (inv_ne_zero hq) hq, inv_mul_cancel hq, padicValRat.one]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nq r : ℚ\nhq : q ≠ 0\nhr : r ≠ 0\n⊢ padicValRat p (q / r) = padicValRat p q - padicValRat p r\n[PROOFSTEP]\nrw [div_eq_mul_inv, padicValRat.mul hq (inv_ne_zero hr), padicValRat.inv r, sub_eq_add_neg]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nn₁ n₂ d₁ d₂ : ℤ\nhn₁ : n₁ ≠ 0\nhn₂ : n₂ ≠ 0\nhd₁ : d₁ ≠ 0\nhd₂ : d₂ ≠ 0\n⊢ padicValRat p (n₁ /. d₁) ≤ padicValRat p (n₂ /. d₂) ↔ ∀ (n : ℕ), ↑p ^ n ∣ n₁ * d₂ → ↑p ^ n ∣ n₂ * d₁\n[PROOFSTEP]\nhave hf1 : Finite (p : ℤ) (n₁ * d₂) := finite_int_prime_iff.2 (mul_ne_zero hn₁ hd₂)\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nn₁ n₂ d₁ d₂ : ℤ\nhn₁ : n₁ ≠ 0\nhn₂ : n₂ ≠ 0\nhd₁ : d₁ ≠ 0\nhd₂ : d₂ ≠ 0\nhf1 : multiplicity.Finite (↑p) (n₁ * d₂)\n⊢ padicValRat p (n₁ /. d₁) ≤ padicValRat p (n₂ /. d₂) ↔ ∀ (n : ℕ), ↑p ^ n ∣ n₁ * d₂ → ↑p ^ n ∣ n₂ * d₁\n[PROOFSTEP]\nhave hf2 : Finite (p : ℤ) (n₂ * d₁) := finite_int_prime_iff.2 (mul_ne_zero hn₂ hd₁)\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nn₁ n₂ d₁ d₂ : ℤ\nhn₁ : n₁ ≠ 0\nhn₂ : n₂ ≠ 0\nhd₁ : d₁ ≠ 0\nhd₂ : d₂ ≠ 0\nhf1 : multiplicity.Finite (↑p) (n₁ * d₂)\nhf2 : multiplicity.Finite (↑p) (n₂ * d₁)\n⊢ padicValRat p (n₁ /. d₁) ≤ padicValRat p (n₂ /. d₂) ↔ ∀ (n : ℕ), ↑p ^ n ∣ n₁ * d₂ → ↑p ^ n ∣ n₂ * d₁\n[PROOFSTEP]\nconv =>\n  lhs\n  rw [padicValRat.defn p (Rat.divInt_ne_zero_of_ne_zero hn₁ hd₁) rfl,\n    padicValRat.defn p (Rat.divInt_ne_zero_of_ne_zero hn₂ hd₂) rfl, sub_le_iff_le_add', ← add_sub_assoc,\n    _root_.le_sub_iff_add_le]\n  norm_cast\n  rw [← multiplicity.mul' (Nat.prime_iff_prime_int.1 hp.1) hf1, add_comm, ←\n    multiplicity.mul' (Nat.prime_iff_prime_int.1 hp.1) hf2, PartENat.get_le_get, multiplicity_le_multiplicity_iff]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nn₁ n₂ d₁ d₂ : ℤ\nhn₁ : n₁ ≠ 0\nhn₂ : n₂ ≠ 0\nhd₁ : d₁ ≠ 0\nhd₂ : d₂ ≠ 0\nhf1 : multiplicity.Finite (↑p) (n₁ * d₂)\nhf2 : multiplicity.Finite (↑p) (n₂ * d₁)\n| padicValRat p (n₁ /. d₁) ≤ padicValRat p (n₂ /. d₂) ↔ ∀ (n : ℕ), ↑p ^ n ∣ n₁ * d₂ → ↑p ^ n ∣ n₂ * d₁\n[PROOFSTEP]\n  lhs\n  rw [padicValRat.defn p (Rat.divInt_ne_zero_of_ne_zero hn₁ hd₁) rfl,\n    padicValRat.defn p (Rat.divInt_ne_zero_of_ne_zero hn₂ hd₂) rfl, sub_le_iff_le_add', ← add_sub_assoc,\n    _root_.le_sub_iff_add_le]\n  norm_cast\n  rw [← multiplicity.mul' (Nat.prime_iff_prime_int.1 hp.1) hf1, add_comm, ←\n    multiplicity.mul' (Nat.prime_iff_prime_int.1 hp.1) hf2, PartENat.get_le_get, multiplicity_le_multiplicity_iff]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nn₁ n₂ d₁ d₂ : ℤ\nhn₁ : n₁ ≠ 0\nhn₂ : n₂ ≠ 0\nhd₁ : d₁ ≠ 0\nhd₂ : d₂ ≠ 0\nhf1 : multiplicity.Finite (↑p) (n₁ * d₂)\nhf2 : multiplicity.Finite (↑p) (n₂ * d₁)\n| padicValRat p (n₁ /. d₁) ≤ padicValRat p (n₂ /. d₂) ↔ ∀ (n : ℕ), ↑p ^ n ∣ n₁ * d₂ → ↑p ^ n ∣ n₂ * d₁\n[PROOFSTEP]\n  lhs\n  rw [padicValRat.defn p (Rat.divInt_ne_zero_of_ne_zero hn₁ hd₁) rfl,\n    padicValRat.defn p (Rat.divInt_ne_zero_of_ne_zero hn₂ hd₂) rfl, sub_le_iff_le_add', ← add_sub_assoc,\n    _root_.le_sub_iff_add_le]\n  norm_cast\n  rw [← multiplicity.mul' (Nat.prime_iff_prime_int.1 hp.1) hf1, add_comm, ←\n    multiplicity.mul' (Nat.prime_iff_prime_int.1 hp.1) hf2, PartENat.get_le_get, multiplicity_le_multiplicity_iff]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nn₁ n₂ d₁ d₂ : ℤ\nhn₁ : n₁ ≠ 0\nhn₂ : n₂ ≠ 0\nhd₁ : d₁ ≠ 0\nhd₂ : d₂ ≠ 0\nhf1 : multiplicity.Finite (↑p) (n₁ * d₂)\nhf2 : multiplicity.Finite (↑p) (n₂ * d₁)\n| padicValRat p (n₁ /. d₁) ≤ padicValRat p (n₂ /. d₂) ↔ ∀ (n : ℕ), ↑p ^ n ∣ n₁ * d₂ → ↑p ^ n ∣ n₂ * d₁\n[PROOFSTEP]\nlhs\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nn₁ n₂ d₁ d₂ : ℤ\nhn₁ : n₁ ≠ 0\nhn₂ : n₂ ≠ 0\nhd₁ : d₁ ≠ 0\nhd₂ : d₂ ≠ 0\nhf1 : multiplicity.Finite (↑p) (n₁ * d₂)\nhf2 : multiplicity.Finite (↑p) (n₂ * d₁)\n| padicValRat p (n₁ /. d₁) ≤ padicValRat p (n₂ /. d₂)\n[PROOFSTEP]\nrw [padicValRat.defn p (Rat.divInt_ne_zero_of_ne_zero hn₁ hd₁) rfl,\n  padicValRat.defn p (Rat.divInt_ne_zero_of_ne_zero hn₂ hd₂) rfl, sub_le_iff_le_add', ← add_sub_assoc,\n  _root_.le_sub_iff_add_le]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nn₁ n₂ d₁ d₂ : ℤ\nhn₁ : n₁ ≠ 0\nhn₂ : n₂ ≠ 0\nhd₁ : d₁ ≠ 0\nhd₂ : d₂ ≠ 0\nhf1 : multiplicity.Finite (↑p) (n₁ * d₂)\nhf2 : multiplicity.Finite (↑p) (n₂ * d₁)\n| ↑(Part.get (multiplicity (↑p) n₁) (_ : multiplicity.Finite (↑p) n₁)) +\n      ↑(Part.get (multiplicity (↑p) d₂) (_ : multiplicity.Finite (↑p) d₂)) ≤\n    ↑(Part.get (multiplicity (↑p) d₁) (_ : multiplicity.Finite (↑p) d₁)) +\n      ↑(Part.get (multiplicity (↑p) n₂) (_ : multiplicity.Finite (↑p) n₂))\n[PROOFSTEP]\nnorm_cast\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nn₁ n₂ d₁ d₂ : ℤ\nhn₁ : n₁ ≠ 0\nhn₂ : n₂ ≠ 0\nhd₁ : d₁ ≠ 0\nhd₂ : d₂ ≠ 0\nhf1 : multiplicity.Finite (↑p) (n₁ * d₂)\nhf2 : multiplicity.Finite (↑p) (n₂ * d₁)\n| Part.get (multiplicity (↑p) n₁) (_ : multiplicity.Finite (↑p) n₁) +\n      Part.get (multiplicity (↑p) d₂) (_ : multiplicity.Finite (↑p) d₂) ≤\n    Part.get (multiplicity (↑p) d₁) (_ : multiplicity.Finite (↑p) d₁) +\n      Part.get (multiplicity (↑p) n₂) (_ : multiplicity.Finite (↑p) n₂)\n[PROOFSTEP]\nrw [← multiplicity.mul' (Nat.prime_iff_prime_int.1 hp.1) hf1, add_comm, ←\n  multiplicity.mul' (Nat.prime_iff_prime_int.1 hp.1) hf2, PartENat.get_le_get, multiplicity_le_multiplicity_iff]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nq r : ℚ\nhqr : q + r ≠ 0\nh : padicValRat p q ≤ padicValRat p r\nhq : q = 0\n⊢ padicValRat p q ≤ padicValRat p (q + r)\n[PROOFSTEP]\nsimpa [hq] using h\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nq r : ℚ\nhqr : q + r ≠ 0\nh : padicValRat p q ≤ padicValRat p r\nhq : ¬q = 0\nhr : r = 0\n⊢ padicValRat p q ≤ padicValRat p (q + r)\n[PROOFSTEP]\nsimp [hr]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nq r : ℚ\nhqr : q + r ≠ 0\nh : padicValRat p q ≤ padicValRat p r\nhq : ¬q = 0\nhr : ¬r = 0\n⊢ padicValRat p q ≤ padicValRat p (q + r)\n[PROOFSTEP]\nhave hqn : q.num ≠ 0 := Rat.num_ne_zero_of_ne_zero hq\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nq r : ℚ\nhqr : q + r ≠ 0\nh : padicValRat p q ≤ padicValRat p r\nhq : ¬q = 0\nhr : ¬r = 0\nhqn : q.num ≠ 0\n⊢ padicValRat p q ≤ padicValRat p (q + r)\n[PROOFSTEP]\nhave hqd : (q.den : ℤ) ≠ 0 := by exact_mod_cast Rat.den_nz _\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nq r : ℚ\nhqr : q + r ≠ 0\nh : padicValRat p q ≤ padicValRat p r\nhq : ¬q = 0\nhr : ¬r = 0\nhqn : q.num ≠ 0\n⊢ ↑q.den ≠ 0\n[PROOFSTEP]\nexact_mod_cast Rat.den_nz _\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nq r : ℚ\nhqr : q + r ≠ 0\nh : padicValRat p q ≤ padicValRat p r\nhq : ¬q = 0\nhr : ¬r = 0\nhqn : q.num ≠ 0\nhqd : ↑q.den ≠ 0\n⊢ padicValRat p q ≤ padicValRat p (q + r)\n[PROOFSTEP]\nhave hrn : r.num ≠ 0 := Rat.num_ne_zero_of_ne_zero hr\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nq r : ℚ\nhqr : q + r ≠ 0\nh : padicValRat p q ≤ padicValRat p r\nhq : ¬q = 0\nhr : ¬r = 0\nhqn : q.num ≠ 0\nhqd : ↑q.den ≠ 0\nhrn : r.num ≠ 0\n⊢ padicValRat p q ≤ padicValRat p (q + r)\n[PROOFSTEP]\nhave hrd : (r.den : ℤ) ≠ 0 := by exact_mod_cast Rat.den_nz _\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nq r : ℚ\nhqr : q + r ≠ 0\nh : padicValRat p q ≤ padicValRat p r\nhq : ¬q = 0\nhr : ¬r = 0\nhqn : q.num ≠ 0\nhqd : ↑q.den ≠ 0\nhrn : r.num ≠ 0\n⊢ ↑r.den ≠ 0\n[PROOFSTEP]\nexact_mod_cast Rat.den_nz _\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nq r : ℚ\nhqr : q + r ≠ 0\nh : padicValRat p q ≤ padicValRat p r\nhq : ¬q = 0\nhr : ¬r = 0\nhqn : q.num ≠ 0\nhqd : ↑q.den ≠ 0\nhrn : r.num ≠ 0\nhrd : ↑r.den ≠ 0\n⊢ padicValRat p q ≤ padicValRat p (q + r)\n[PROOFSTEP]\nhave hqreq : q + r = (q.num * r.den + q.den * r.num) /. (q.den * r.den) := Rat.add_num_den _ _\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nq r : ℚ\nhqr : q + r ≠ 0\nh : padicValRat p q ≤ padicValRat p r\nhq : ¬q = 0\nhr : ¬r = 0\nhqn : q.num ≠ 0\nhqd : ↑q.den ≠ 0\nhrn : r.num ≠ 0\nhrd : ↑r.den ≠ 0\nhqreq : q + r = (q.num * ↑r.den + ↑q.den * r.num) /. (↑q.den * ↑r.den)\n⊢ padicValRat p q ≤ padicValRat p (q + r)\n[PROOFSTEP]\nhave hqrd : q.num * r.den + q.den * r.num ≠ 0 := Rat.mk_num_ne_zero_of_ne_zero hqr hqreq\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nq r : ℚ\nhqr : q + r ≠ 0\nh : padicValRat p q ≤ padicValRat p r\nhq : ¬q = 0\nhr : ¬r = 0\nhqn : q.num ≠ 0\nhqd : ↑q.den ≠ 0\nhrn : r.num ≠ 0\nhrd : ↑r.den ≠ 0\nhqreq : q + r = (q.num * ↑r.den + ↑q.den * r.num) /. (↑q.den * ↑r.den)\nhqrd : q.num * ↑r.den + ↑q.den * r.num ≠ 0\n⊢ padicValRat p q ≤ padicValRat p (q + r)\n[PROOFSTEP]\nconv_lhs => rw [← @Rat.num_den q]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nq r : ℚ\nhqr : q + r ≠ 0\nh : padicValRat p q ≤ padicValRat p r\nhq : ¬q = 0\nhr : ¬r = 0\nhqn : q.num ≠ 0\nhqd : ↑q.den ≠ 0\nhrn : r.num ≠ 0\nhrd : ↑r.den ≠ 0\nhqreq : q + r = (q.num * ↑r.den + ↑q.den * r.num) /. (↑q.den * ↑r.den)\nhqrd : q.num * ↑r.den + ↑q.den * r.num ≠ 0\n| padicValRat p q\n[PROOFSTEP]\nrw [← @Rat.num_den q]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nq r : ℚ\nhqr : q + r ≠ 0\nh : padicValRat p q ≤ padicValRat p r\nhq : ¬q = 0\nhr : ¬r = 0\nhqn : q.num ≠ 0\nhqd : ↑q.den ≠ 0\nhrn : r.num ≠ 0\nhrd : ↑r.den ≠ 0\nhqreq : q + r = (q.num * ↑r.den + ↑q.den * r.num) /. (↑q.den * ↑r.den)\nhqrd : q.num * ↑r.den + ↑q.den * r.num ≠ 0\n| padicValRat p q\n[PROOFSTEP]\nrw [← @Rat.num_den q]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nq r : ℚ\nhqr : q + r ≠ 0\nh : padicValRat p q ≤ padicValRat p r\nhq : ¬q = 0\nhr : ¬r = 0\nhqn : q.num ≠ 0\nhqd : ↑q.den ≠ 0\nhrn : r.num ≠ 0\nhrd : ↑r.den ≠ 0\nhqreq : q + r = (q.num * ↑r.den + ↑q.den * r.num) /. (↑q.den * ↑r.den)\nhqrd : q.num * ↑r.den + ↑q.den * r.num ≠ 0\n| padicValRat p q\n[PROOFSTEP]\nrw [← @Rat.num_den q]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nq r : ℚ\nhqr : q + r ≠ 0\nh : padicValRat p q ≤ padicValRat p r\nhq : ¬q = 0\nhr : ¬r = 0\nhqn : q.num ≠ 0\nhqd : ↑q.den ≠ 0\nhrn : r.num ≠ 0\nhrd : ↑r.den ≠ 0\nhqreq : q + r = (q.num * ↑r.den + ↑q.den * r.num) /. (↑q.den * ↑r.den)\nhqrd : q.num * ↑r.den + ↑q.den * r.num ≠ 0\n⊢ padicValRat p (q.num /. ↑q.den) ≤ padicValRat p (q + r)\n[PROOFSTEP]\nrw [hqreq, padicValRat_le_padicValRat_iff hqn hqrd hqd (mul_ne_zero hqd hrd), ← multiplicity_le_multiplicity_iff,\n  mul_left_comm, multiplicity.mul (Nat.prime_iff_prime_int.1 hp.1), add_mul]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nq r : ℚ\nhqr : q + r ≠ 0\nh : padicValRat p q ≤ padicValRat p r\nhq : ¬q = 0\nhr : ¬r = 0\nhqn : q.num ≠ 0\nhqd : ↑q.den ≠ 0\nhrn : r.num ≠ 0\nhrd : ↑r.den ≠ 0\nhqreq : q + r = (q.num * ↑r.den + ↑q.den * r.num) /. (↑q.den * ↑r.den)\nhqrd : q.num * ↑r.den + ↑q.den * r.num ≠ 0\n⊢ multiplicity ↑p ↑q.den + multiplicity (↑p) (q.num * ↑r.den) ≤\n    multiplicity (↑p) (q.num * ↑r.den * ↑q.den + ↑q.den * r.num * ↑q.den)\n[PROOFSTEP]\nrw [← @Rat.num_den q, ← @Rat.num_den r, padicValRat_le_padicValRat_iff hqn hrn hqd hrd, ←\n  multiplicity_le_multiplicity_iff] at h \n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nq r : ℚ\nhqr : q + r ≠ 0\nh✝ : ∀ (n : ℕ), ↑p ^ n ∣ q.num * ↑r.den → ↑p ^ n ∣ r.num * ↑q.den\nh : multiplicity (↑p) (q.num * ↑r.den) ≤ multiplicity (↑p) (r.num * ↑q.den)\nhq : ¬q = 0\nhr : ¬r = 0\nhqn : q.num ≠ 0\nhqd : ↑q.den ≠ 0\nhrn : r.num ≠ 0\nhrd : ↑r.den ≠ 0\nhqreq : q + r = (q.num * ↑r.den + ↑q.den * r.num) /. (↑q.den * ↑r.den)\nhqrd : q.num * ↑r.den + ↑q.den * r.num ≠ 0\n⊢ multiplicity ↑p ↑q.den + multiplicity (↑p) (q.num * ↑r.den) ≤\n    multiplicity (↑p) (q.num * ↑r.den * ↑q.den + ↑q.den * r.num * ↑q.den)\n[PROOFSTEP]\ncalc\n  _ ≤ min (multiplicity (↑p) (q.num * r.den * q.den)) (multiplicity (↑p) (↑q.den * r.num * ↑q.den)) :=\n    le_min (by rw [@multiplicity.mul _ _ _ _ (_ * _) _ (Nat.prime_iff_prime_int.1 hp.1), add_comm])\n      (by\n        rw [mul_assoc, @multiplicity.mul _ _ _ _ (q.den : ℤ) (_ * _) (Nat.prime_iff_prime_int.1 hp.1)]\n        exact add_le_add_left h _)\n  _ ≤ _ := min_le_multiplicity_add\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nq r : ℚ\nhqr : q + r ≠ 0\nh✝ : ∀ (n : ℕ), ↑p ^ n ∣ q.num * ↑r.den → ↑p ^ n ∣ r.num * ↑q.den\nh : multiplicity (↑p) (q.num * ↑r.den) ≤ multiplicity (↑p) (r.num * ↑q.den)\nhq : ¬q = 0\nhr : ¬r = 0\nhqn : q.num ≠ 0\nhqd : ↑q.den ≠ 0\nhrn : r.num ≠ 0\nhrd : ↑r.den ≠ 0\nhqreq : q + r = (q.num * ↑r.den + ↑q.den * r.num) /. (↑q.den * ↑r.den)\nhqrd : q.num * ↑r.den + ↑q.den * r.num ≠ 0\n⊢ multiplicity ↑p ↑q.den + multiplicity (↑p) (q.num * ↑r.den) ≤ multiplicity (↑p) (q.num * ↑r.den * ↑q.den)\n[PROOFSTEP]\nrw [@multiplicity.mul _ _ _ _ (_ * _) _ (Nat.prime_iff_prime_int.1 hp.1), add_comm]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nq r : ℚ\nhqr : q + r ≠ 0\nh✝ : ∀ (n : ℕ), ↑p ^ n ∣ q.num * ↑r.den → ↑p ^ n ∣ r.num * ↑q.den\nh : multiplicity (↑p) (q.num * ↑r.den) ≤ multiplicity (↑p) (r.num * ↑q.den)\nhq : ¬q = 0\nhr : ¬r = 0\nhqn : q.num ≠ 0\nhqd : ↑q.den ≠ 0\nhrn : r.num ≠ 0\nhrd : ↑r.den ≠ 0\nhqreq : q + r = (q.num * ↑r.den + ↑q.den * r.num) /. (↑q.den * ↑r.den)\nhqrd : q.num * ↑r.den + ↑q.den * r.num ≠ 0\n⊢ multiplicity ↑p ↑q.den + multiplicity (↑p) (q.num * ↑r.den) ≤ multiplicity (↑p) (↑q.den * r.num * ↑q.den)\n[PROOFSTEP]\nrw [mul_assoc, @multiplicity.mul _ _ _ _ (q.den : ℤ) (_ * _) (Nat.prime_iff_prime_int.1 hp.1)]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nq r : ℚ\nhqr : q + r ≠ 0\nh✝ : ∀ (n : ℕ), ↑p ^ n ∣ q.num * ↑r.den → ↑p ^ n ∣ r.num * ↑q.den\nh : multiplicity (↑p) (q.num * ↑r.den) ≤ multiplicity (↑p) (r.num * ↑q.den)\nhq : ¬q = 0\nhr : ¬r = 0\nhqn : q.num ≠ 0\nhqd : ↑q.den ≠ 0\nhrn : r.num ≠ 0\nhrd : ↑r.den ≠ 0\nhqreq : q + r = (q.num * ↑r.den + ↑q.den * r.num) /. (↑q.den * ↑r.den)\nhqrd : q.num * ↑r.den + ↑q.den * r.num ≠ 0\n⊢ multiplicity ↑p ↑q.den + multiplicity (↑p) (q.num * ↑r.den) ≤\n    multiplicity ↑p ↑q.den + multiplicity (↑p) (r.num * ↑q.den)\n[PROOFSTEP]\nexact add_le_add_left h _\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nq r : ℚ\nhqr : q + r ≠ 0\nh : padicValRat p q ≤ padicValRat p r\n⊢ min (padicValRat p q) (padicValRat p r) ≤ padicValRat p (q + r)\n[PROOFSTEP]\nrw [min_eq_left h]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nq r : ℚ\nhqr : q + r ≠ 0\nh : padicValRat p q ≤ padicValRat p r\n⊢ padicValRat p q ≤ padicValRat p (q + r)\n[PROOFSTEP]\nexact le_padicValRat_add_of_le hqr h\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nq r : ℚ\nhqr : q + r ≠ 0\nh : padicValRat p r ≤ padicValRat p q\n⊢ min (padicValRat p q) (padicValRat p r) ≤ padicValRat p (q + r)\n[PROOFSTEP]\nrw [min_eq_right h, add_comm]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nq r : ℚ\nhqr : q + r ≠ 0\nh : padicValRat p r ≤ padicValRat p q\n⊢ padicValRat p r ≤ padicValRat p (r + q)\n[PROOFSTEP]\nexact le_padicValRat_add_of_le (by rwa [add_comm]) h\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nq r : ℚ\nhqr : q + r ≠ 0\nh : padicValRat p r ≤ padicValRat p q\n⊢ r + q ≠ 0\n[PROOFSTEP]\nrwa [add_comm]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nn : ℕ\nF : ℕ → ℚ\nhF : ∀ (i : ℕ), i < n → 0 < padicValRat p (F i)\nhn0 : ∑ i in Finset.range n, F i ≠ 0\n⊢ 0 < padicValRat p (∑ i in Finset.range n, F i)\n[PROOFSTEP]\ninduction' n with d hd\n[GOAL]\ncase zero\np : ℕ\nhp : Fact (Nat.Prime p)\nn : ℕ\nF : ℕ → ℚ\nhF✝ : ∀ (i : ℕ), i < n → 0 < padicValRat p (F i)\nhn0✝ : ∑ i in Finset.range n, F i ≠ 0\nhF : ∀ (i : ℕ), i < zero → 0 < padicValRat p (F i)\nhn0 : ∑ i in Finset.range zero, F i ≠ 0\n⊢ 0 < padicValRat p (∑ i in Finset.range zero, F i)\n[PROOFSTEP]\nexact False.elim (hn0 rfl)\n[GOAL]\ncase succ\np : ℕ\nhp : Fact (Nat.Prime p)\nn : ℕ\nF : ℕ → ℚ\nhF✝ : ∀ (i : ℕ), i < n → 0 < padicValRat p (F i)\nhn0✝ : ∑ i in Finset.range n, F i ≠ 0\nd : ℕ\nhd :\n  (∀ (i : ℕ), i < d → 0 < padicValRat p (F i)) →\n    ∑ i in Finset.range d, F i ≠ 0 → 0 < padicValRat p (∑ i in Finset.range d, F i)\nhF : ∀ (i : ℕ), i < succ d → 0 < padicValRat p (F i)\nhn0 : ∑ i in Finset.range (succ d), F i ≠ 0\n⊢ 0 < padicValRat p (∑ i in Finset.range (succ d), F i)\n[PROOFSTEP]\nrw [Finset.sum_range_succ] at hn0 ⊢\n[GOAL]\ncase succ\np : ℕ\nhp : Fact (Nat.Prime p)\nn : ℕ\nF : ℕ → ℚ\nhF✝ : ∀ (i : ℕ), i < n → 0 < padicValRat p (F i)\nhn0✝ : ∑ i in Finset.range n, F i ≠ 0\nd : ℕ\nhd :\n  (∀ (i : ℕ), i < d → 0 < padicValRat p (F i)) →\n    ∑ i in Finset.range d, F i ≠ 0 → 0 < padicValRat p (∑ i in Finset.range d, F i)\nhF : ∀ (i : ℕ), i < succ d → 0 < padicValRat p (F i)\nhn0 : ∑ x in Finset.range d, F x + F d ≠ 0\n⊢ 0 < padicValRat p (∑ x in Finset.range d, F x + F d)\n[PROOFSTEP]\nby_cases h : ∑ x : ℕ in Finset.range d, F x = 0\n[GOAL]\ncase pos\np : ℕ\nhp : Fact (Nat.Prime p)\nn : ℕ\nF : ℕ → ℚ\nhF✝ : ∀ (i : ℕ), i < n → 0 < padicValRat p (F i)\nhn0✝ : ∑ i in Finset.range n, F i ≠ 0\nd : ℕ\nhd :\n  (∀ (i : ℕ), i < d → 0 < padicValRat p (F i)) →\n    ∑ i in Finset.range d, F i ≠ 0 → 0 < padicValRat p (∑ i in Finset.range d, F i)\nhF : ∀ (i : ℕ), i < succ d → 0 < padicValRat p (F i)\nhn0 : ∑ x in Finset.range d, F x + F d ≠ 0\nh : ∑ x in Finset.range d, F x = 0\n⊢ 0 < padicValRat p (∑ x in Finset.range d, F x + F d)\n[PROOFSTEP]\nrw [h, zero_add]\n[GOAL]\ncase pos\np : ℕ\nhp : Fact (Nat.Prime p)\nn : ℕ\nF : ℕ → ℚ\nhF✝ : ∀ (i : ℕ), i < n → 0 < padicValRat p (F i)\nhn0✝ : ∑ i in Finset.range n, F i ≠ 0\nd : ℕ\nhd :\n  (∀ (i : ℕ), i < d → 0 < padicValRat p (F i)) →\n    ∑ i in Finset.range d, F i ≠ 0 → 0 < padicValRat p (∑ i in Finset.range d, F i)\nhF : ∀ (i : ℕ), i < succ d → 0 < padicValRat p (F i)\nhn0 : ∑ x in Finset.range d, F x + F d ≠ 0\nh : ∑ x in Finset.range d, F x = 0\n⊢ 0 < padicValRat p (F d)\n[PROOFSTEP]\nexact hF d (lt_add_one _)\n[GOAL]\ncase neg\np : ℕ\nhp : Fact (Nat.Prime p)\nn : ℕ\nF : ℕ → ℚ\nhF✝ : ∀ (i : ℕ), i < n → 0 < padicValRat p (F i)\nhn0✝ : ∑ i in Finset.range n, F i ≠ 0\nd : ℕ\nhd :\n  (∀ (i : ℕ), i < d → 0 < padicValRat p (F i)) →\n    ∑ i in Finset.range d, F i ≠ 0 → 0 < padicValRat p (∑ i in Finset.range d, F i)\nhF : ∀ (i : ℕ), i < succ d → 0 < padicValRat p (F i)\nhn0 : ∑ x in Finset.range d, F x + F d ≠ 0\nh : ¬∑ x in Finset.range d, F x = 0\n⊢ 0 < padicValRat p (∑ x in Finset.range d, F x + F d)\n[PROOFSTEP]\nrefine' lt_of_lt_of_le _ (min_le_padicValRat_add hn0)\n[GOAL]\ncase neg\np : ℕ\nhp : Fact (Nat.Prime p)\nn : ℕ\nF : ℕ → ℚ\nhF✝ : ∀ (i : ℕ), i < n → 0 < padicValRat p (F i)\nhn0✝ : ∑ i in Finset.range n, F i ≠ 0\nd : ℕ\nhd :\n  (∀ (i : ℕ), i < d → 0 < padicValRat p (F i)) →\n    ∑ i in Finset.range d, F i ≠ 0 → 0 < padicValRat p (∑ i in Finset.range d, F i)\nhF : ∀ (i : ℕ), i < succ d → 0 < padicValRat p (F i)\nhn0 : ∑ x in Finset.range d, F x + F d ≠ 0\nh : ¬∑ x in Finset.range d, F x = 0\n⊢ 0 < min (padicValRat p (∑ x in Finset.range d, F x)) (padicValRat p (F d))\n[PROOFSTEP]\nrefine' lt_min (hd (fun i hi => _) h) (hF d (lt_add_one _))\n[GOAL]\ncase neg\np : ℕ\nhp : Fact (Nat.Prime p)\nn : ℕ\nF : ℕ → ℚ\nhF✝ : ∀ (i : ℕ), i < n → 0 < padicValRat p (F i)\nhn0✝ : ∑ i in Finset.range n, F i ≠ 0\nd : ℕ\nhd :\n  (∀ (i : ℕ), i < d → 0 < padicValRat p (F i)) →\n    ∑ i in Finset.range d, F i ≠ 0 → 0 < padicValRat p (∑ i in Finset.range d, F i)\nhF : ∀ (i : ℕ), i < succ d → 0 < padicValRat p (F i)\nhn0 : ∑ x in Finset.range d, F x + F d ≠ 0\nh : ¬∑ x in Finset.range d, F x = 0\ni : ℕ\nhi : i < d\n⊢ 0 < padicValRat p (F i)\n[PROOFSTEP]\nexact hF _ (lt_trans hi (lt_add_one _))\n[GOAL]\np a b : ℕ\nhp : Fact (Nat.Prime p)\n⊢ a ≠ 0 → b ≠ 0 → padicValNat p (a * b) = padicValNat p a + padicValNat p b\n[PROOFSTEP]\nexact_mod_cast @padicValRat.mul p _ a b\n[GOAL]\np a b : ℕ\nhp : Fact (Nat.Prime p)\nh : b ∣ a\n⊢ padicValNat p (a / b) = padicValNat p a - padicValNat p b\n[PROOFSTEP]\nrcases eq_or_ne a 0 with (rfl | ha)\n[GOAL]\ncase inl\np b : ℕ\nhp : Fact (Nat.Prime p)\nh : b ∣ 0\n⊢ padicValNat p (0 / b) = padicValNat p 0 - padicValNat p b\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\np a b : ℕ\nhp : Fact (Nat.Prime p)\nh : b ∣ a\nha : a ≠ 0\n⊢ padicValNat p (a / b) = padicValNat p a - padicValNat p b\n[PROOFSTEP]\nobtain ⟨k, rfl⟩ := h\n[GOAL]\ncase inr.intro\np b : ℕ\nhp : Fact (Nat.Prime p)\nk : ℕ\nha : b * k ≠ 0\n⊢ padicValNat p (b * k / b) = padicValNat p (b * k) - padicValNat p b\n[PROOFSTEP]\nobtain ⟨hb, hk⟩ := mul_ne_zero_iff.mp ha\n[GOAL]\ncase inr.intro.intro\np b : ℕ\nhp : Fact (Nat.Prime p)\nk : ℕ\nha : b * k ≠ 0\nhb : b ≠ 0\nhk : k ≠ 0\n⊢ padicValNat p (b * k / b) = padicValNat p (b * k) - padicValNat p b\n[PROOFSTEP]\nrw [mul_comm, k.mul_div_cancel hb.bot_lt, padicValNat.mul hk hb, Nat.add_sub_cancel]\n[GOAL]\np a b : ℕ\nhp : Fact (Nat.Prime p)\ndvd : p ∣ b\n⊢ padicValNat p (b / p) = padicValNat p b - 1\n[PROOFSTEP]\nrw [padicValNat.div_of_dvd dvd, padicValNat_self]\n[GOAL]\np a b : ℕ\nhp : Fact (Nat.Prime p)\nn : ℕ\nha : a ≠ 0\n⊢ padicValNat p (a ^ n) = n * padicValNat p a\n[PROOFSTEP]\nsimpa only [← @Nat.cast_inj ℤ, push_cast] using padicValRat.pow (Nat.cast_ne_zero.mpr ha)\n[GOAL]\np a b : ℕ\nhp : Fact (Nat.Prime p)\nn : ℕ\n⊢ padicValNat p (p ^ n) = n\n[PROOFSTEP]\nrw [padicValNat.pow _ (@Fact.out p.Prime).ne_zero, padicValNat_self, mul_one]\n[GOAL]\np a b : ℕ\nhp : Fact (Nat.Prime p)\ndvd : p ^ a ∣ b\n⊢ padicValNat p (b / p ^ a) = padicValNat p b - a\n[PROOFSTEP]\nrw [padicValNat.div_of_dvd dvd, padicValNat.prime_pow]\n[GOAL]\np a b✝ : ℕ\nhp : Fact (Nat.Prime p)\nm : ℕ\ncpm : coprime p m\nb : ℕ\ndvd : m ∣ b\n⊢ padicValNat p (b / m) = padicValNat p b\n[PROOFSTEP]\nrw [padicValNat.div_of_dvd dvd, eq_zero_of_not_dvd (hp.out.coprime_iff_not_dvd.mp cpm), Nat.sub_zero]\n[GOAL]\np n : ℕ\nhp : 1 ≤ padicValNat p n\n⊢ p ∣ n\n[PROOFSTEP]\nby_contra h\n[GOAL]\np n : ℕ\nhp : 1 ≤ padicValNat p n\nh : ¬p ∣ n\n⊢ False\n[PROOFSTEP]\nrw [padicValNat.eq_zero_of_not_dvd h] at hp \n[GOAL]\np n : ℕ\nhp : 1 ≤ 0\nh : ¬p ∣ n\n⊢ False\n[PROOFSTEP]\nexact lt_irrefl 0 (lt_of_lt_of_le zero_lt_one hp)\n[GOAL]\np n : ℕ\n⊢ p ^ padicValNat p n ∣ n\n[PROOFSTEP]\nrcases n.eq_zero_or_pos with (rfl | hn)\n[GOAL]\ncase inl\np : ℕ\n⊢ p ^ padicValNat p 0 ∣ 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\np n : ℕ\nhn : n > 0\n⊢ p ^ padicValNat p n ∣ n\n[PROOFSTEP]\nrcases eq_or_ne p 1 with (rfl | hp)\n[GOAL]\ncase inr.inl\nn : ℕ\nhn : n > 0\n⊢ 1 ^ padicValNat 1 n ∣ n\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr.inr\np n : ℕ\nhn : n > 0\nhp : p ≠ 1\n⊢ p ^ padicValNat p n ∣ n\n[PROOFSTEP]\nrw [multiplicity.pow_dvd_iff_le_multiplicity, padicValNat_def']\n[GOAL]\ncase inr.inr.hp\np n : ℕ\nhn : n > 0\nhp : p ≠ 1\n⊢ p ≠ 1\n[PROOFSTEP]\nassumption\n[GOAL]\ncase inr.inr.hn\np n : ℕ\nhn : n > 0\nhp : p ≠ 1\n⊢ 0 < n\n[PROOFSTEP]\nassumption\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\na n : ℕ\nha : a ≠ 0\n⊢ p ^ n ∣ a ↔ n ≤ padicValNat p a\n[PROOFSTEP]\nrw [pow_dvd_iff_le_multiplicity, ← padicValNat_def' hp.out.ne_one ha.bot_lt, PartENat.coe_le_coe]\n[GOAL]\np n : ℕ\nhp : Fact (Nat.Prime p)\na : ℕ\n⊢ p ^ n ∣ a ↔ a = 0 ∨ n ≤ padicValNat p a\n[PROOFSTEP]\nrcases eq_or_ne a 0 with (rfl | ha)\n[GOAL]\ncase inl\np n : ℕ\nhp : Fact (Nat.Prime p)\n⊢ p ^ n ∣ 0 ↔ 0 = 0 ∨ n ≤ padicValNat p 0\n[PROOFSTEP]\nexact iff_of_true (dvd_zero _) (Or.inl rfl)\n[GOAL]\ncase inr\np n : ℕ\nhp : Fact (Nat.Prime p)\na : ℕ\nha : a ≠ 0\n⊢ p ^ n ∣ a ↔ a = 0 ∨ n ≤ padicValNat p a\n[PROOFSTEP]\nrw [padicValNat_dvd_iff_le ha, or_iff_right ha]\n[GOAL]\np n : ℕ\nhp : Fact (Nat.Prime p)\nhn : n ≠ 0\n⊢ ¬p ^ (padicValNat p n + 1) ∣ n\n[PROOFSTEP]\nrw [padicValNat_dvd_iff_le hn, not_le]\n[GOAL]\np n : ℕ\nhp : Fact (Nat.Prime p)\nhn : n ≠ 0\n⊢ padicValNat p n < padicValNat p n + 1\n[PROOFSTEP]\nexact Nat.lt_succ_self _\n[GOAL]\np n : ℕ\nhn : n ≠ 0\n⊢ Finset.image (fun x => p ^ x) (Finset.range (padicValNat p n + 1)) ⊆ divisors n\n[PROOFSTEP]\nintro t ht\n[GOAL]\np n : ℕ\nhn : n ≠ 0\nt : ℕ\nht : t ∈ Finset.image (fun x => p ^ x) (Finset.range (padicValNat p n + 1))\n⊢ t ∈ divisors n\n[PROOFSTEP]\nsimp only [exists_prop, Finset.mem_image, Finset.mem_range] at ht \n[GOAL]\np n : ℕ\nhn : n ≠ 0\nt : ℕ\nht : ∃ a, a < padicValNat p n + 1 ∧ p ^ a = t\n⊢ t ∈ divisors n\n[PROOFSTEP]\nobtain ⟨k, hk, rfl⟩ := ht\n[GOAL]\ncase intro.intro\np n : ℕ\nhn : n ≠ 0\nk : ℕ\nhk : k < padicValNat p n + 1\n⊢ p ^ k ∈ divisors n\n[PROOFSTEP]\nrw [Nat.mem_divisors]\n[GOAL]\ncase intro.intro\np n : ℕ\nhn : n ≠ 0\nk : ℕ\nhk : k < padicValNat p n + 1\n⊢ p ^ k ∣ n ∧ n ≠ 0\n[PROOFSTEP]\nexact ⟨(pow_dvd_pow p <| by linarith).trans pow_padicValNat_dvd, hn⟩\n[GOAL]\np n : ℕ\nhn : n ≠ 0\nk : ℕ\nhk : k < padicValNat p n + 1\n⊢ k ≤ padicValNat p n\n[PROOFSTEP]\nlinarith\n[GOAL]\np n : ℕ\nhp : Fact (Nat.Prime p)\n⊢ Finset.image (fun t => p ^ (t + 1)) (Finset.range (padicValNat p n)) ⊆ Finset.erase (divisors n) 1\n[PROOFSTEP]\nrcases eq_or_ne n 0 with (rfl | hn)\n[GOAL]\ncase inl\np : ℕ\nhp : Fact (Nat.Prime p)\n⊢ Finset.image (fun t => p ^ (t + 1)) (Finset.range (padicValNat p 0)) ⊆ Finset.erase (divisors 0) 1\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\np n : ℕ\nhp : Fact (Nat.Prime p)\nhn : n ≠ 0\n⊢ Finset.image (fun t => p ^ (t + 1)) (Finset.range (padicValNat p n)) ⊆ Finset.erase (divisors n) 1\n[PROOFSTEP]\nintro t ht\n[GOAL]\ncase inr\np n : ℕ\nhp : Fact (Nat.Prime p)\nhn : n ≠ 0\nt : ℕ\nht : t ∈ Finset.image (fun t => p ^ (t + 1)) (Finset.range (padicValNat p n))\n⊢ t ∈ Finset.erase (divisors n) 1\n[PROOFSTEP]\nsimp only [exists_prop, Finset.mem_image, Finset.mem_range] at ht \n[GOAL]\ncase inr\np n : ℕ\nhp : Fact (Nat.Prime p)\nhn : n ≠ 0\nt : ℕ\nht : ∃ a, a < padicValNat p n ∧ p ^ (a + 1) = t\n⊢ t ∈ Finset.erase (divisors n) 1\n[PROOFSTEP]\nobtain ⟨k, hk, rfl⟩ := ht\n[GOAL]\ncase inr.intro.intro\np n : ℕ\nhp : Fact (Nat.Prime p)\nhn : n ≠ 0\nk : ℕ\nhk : k < padicValNat p n\n⊢ p ^ (k + 1) ∈ Finset.erase (divisors n) 1\n[PROOFSTEP]\nrw [Finset.mem_erase, Nat.mem_divisors]\n[GOAL]\ncase inr.intro.intro\np n : ℕ\nhp : Fact (Nat.Prime p)\nhn : n ≠ 0\nk : ℕ\nhk : k < padicValNat p n\n⊢ p ^ (k + 1) ≠ 1 ∧ p ^ (k + 1) ∣ n ∧ n ≠ 0\n[PROOFSTEP]\nrefine' ⟨_, (pow_dvd_pow p <| succ_le_iff.2 hk).trans pow_padicValNat_dvd, hn⟩\n[GOAL]\ncase inr.intro.intro\np n : ℕ\nhp : Fact (Nat.Prime p)\nhn : n ≠ 0\nk : ℕ\nhk : k < padicValNat p n\n⊢ p ^ (k + 1) ≠ 1\n[PROOFSTEP]\nexact (Nat.one_lt_pow _ _ k.succ_pos hp.out.one_lt).ne'\n[GOAL]\np n : ℕ\nhp : Fact (Nat.Prime p)\n⊢ padicValNat p (p * n)! = padicValNat p n ! + n\n[PROOFSTEP]\nrefine' PartENat.natCast_inj.mp _\n[GOAL]\np n : ℕ\nhp : Fact (Nat.Prime p)\n⊢ ↑(padicValNat p (p * n)!) = ↑(padicValNat p n ! + n)\n[PROOFSTEP]\nrw [padicValNat_def' (Nat.Prime.ne_one hp.out) <| factorial_pos (p * n), Nat.cast_add,\n  padicValNat_def' (Nat.Prime.ne_one hp.out) <| factorial_pos n]\n[GOAL]\np n : ℕ\nhp : Fact (Nat.Prime p)\n⊢ multiplicity p (p * n)! = multiplicity p n ! + ↑n\n[PROOFSTEP]\nexact Prime.multiplicity_factorial_mul hp.out\n[GOAL]\np n m : ℕ\nhp : Fact (Nat.Prime p)\nh : n < p\n⊢ padicValNat p (p * m + n)! = padicValNat p (p * m)!\n[PROOFSTEP]\ninduction' n with n hn\n[GOAL]\ncase zero\np n m : ℕ\nhp : Fact (Nat.Prime p)\nh✝ : n < p\nh : zero < p\n⊢ padicValNat p (p * m + zero)! = padicValNat p (p * m)!\n[PROOFSTEP]\nrw [zero_eq, add_zero]\n[GOAL]\ncase succ\np n✝ m : ℕ\nhp : Fact (Nat.Prime p)\nh✝ : n✝ < p\nn : ℕ\nhn : n < p → padicValNat p (p * m + n)! = padicValNat p (p * m)!\nh : succ n < p\n⊢ padicValNat p (p * m + succ n)! = padicValNat p (p * m)!\n[PROOFSTEP]\nrw [add_succ, factorial_succ, padicValNat.mul (succ_ne_zero (p * m + n)) <| factorial_ne_zero (p * m + _),\n  hn <| lt_of_succ_lt h, ← add_succ,\n  padicValNat_eq_zero_of_mem_Ioo\n    ⟨(Nat.lt_add_of_pos_right <| succ_pos n),\n      (Nat.mul_add _ _ _ ▸ Nat.mul_one _ ▸ ((add_lt_add_iff_left (p * m)).mpr h))⟩,\n  zero_add]\n[GOAL]\np n : ℕ\nhp : Fact (Nat.Prime p)\n⊢ padicValNat p (p * (n / p))! = padicValNat p n !\n[PROOFSTEP]\nnth_rw 2 [← div_add_mod n p]\n[GOAL]\np n : ℕ\nhp : Fact (Nat.Prime p)\n⊢ padicValNat p (p * (n / p))! = padicValNat p (p * (n / p) + n % p)!\n[PROOFSTEP]\nexact (padicValNat_factorial_mul_add (n / p) <| mod_lt n <| Prime.pos hp.out).symm\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nn : ℕ\n⊢ (p - 1) * padicValNat p n ! = n - List.sum (digits p n)\n[PROOFSTEP]\nrw [padicValNat_factorial <| lt_succ_of_lt <| lt.base (log p n), ← Finset.sum_Ico_add' _ 0 _ 1, Ico_zero_eq_range, ←\n  sub_one_mul_sum_log_div_pow_eq_sub_sum_digits]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nn : ℕ\na : ℤ\n⊢ ↑p ^ n ∣ a ↔ a = 0 ∨ n ≤ padicValInt p a\n[PROOFSTEP]\nrw [padicValInt, ← Int.natAbs_eq_zero, ← padicValNat_dvd_iff, ← Int.coe_nat_dvd_left, Int.coe_nat_pow]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\na : ℤ\n⊢ ↑p ^ padicValInt p a ∣ a\n[PROOFSTEP]\nrw [padicValInt_dvd_iff]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\na : ℤ\n⊢ a = 0 ∨ padicValInt p a ≤ padicValInt p a\n[PROOFSTEP]\nexact Or.inr le_rfl\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\na b : ℤ\nha : a ≠ 0\nhb : b ≠ 0\n⊢ padicValInt p (a * b) = padicValInt p a + padicValInt p b\n[PROOFSTEP]\nsimp_rw [padicValInt]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\na b : ℤ\nha : a ≠ 0\nhb : b ≠ 0\n⊢ padicValNat p (Int.natAbs (a * b)) = padicValNat p (Int.natAbs a) + padicValNat p (Int.natAbs b)\n[PROOFSTEP]\nrw [Int.natAbs_mul, padicValNat.mul]\n[GOAL]\ncase a\np : ℕ\nhp : Fact (Nat.Prime p)\na b : ℤ\nha : a ≠ 0\nhb : b ≠ 0\n⊢ Int.natAbs a ≠ 0\n[PROOFSTEP]\nrwa [Int.natAbs_ne_zero]\n[GOAL]\ncase a\np : ℕ\nhp : Fact (Nat.Prime p)\na b : ℤ\nha : a ≠ 0\nhb : b ≠ 0\n⊢ Int.natAbs b ≠ 0\n[PROOFSTEP]\nrwa [Int.natAbs_ne_zero]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\na : ℤ\nha : a ≠ 0\n⊢ padicValInt p (a * ↑p) = padicValInt p a + 1\n[PROOFSTEP]\nrw [padicValInt.mul ha (Int.coe_nat_ne_zero.mpr hp.out.ne_zero)]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\na : ℤ\nha : a ≠ 0\n⊢ padicValInt p a + padicValInt p ↑p = padicValInt p a + 1\n[PROOFSTEP]\nsimp only [eq_self_iff_true, padicValInt.of_nat, padicValNat_self]\n", "meta": {"mathlib_filename": "Mathlib.NumberTheory.Padics.PadicVal", "llama_tokens": 26118, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8267117940706734, "lm_q2_score": 0.661922862511608, "lm_q1q2_score": 0.5472194372033672}}
{"text": "[GOAL]\nC : Type u_1\ninst✝⁶ : Category.{?u.100, u_1} C\ninst✝⁵ : HasZeroMorphisms C\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : HasKernels C\ninst✝² : NormalMonoCategory C\nX Y Z : C\na : X ⟶ Z\nb : Y ⟶ Z\ninst✝¹ : Mono a\ninst✝ : Mono b\nP : C\nf : Z ⟶ P\nhaf : a ≫ f = 0\ni : IsLimit (KernelFork.ofι a haf)\nQ : C\ng : Z ⟶ Q\nhbg : b ≫ g = 0\ni' : IsLimit (KernelFork.ofι b hbg)\n⊢ kernel.ι (prod.lift f g) ≫ f = kernel.ι (prod.lift f g) ≫ prod.lift f g ≫ prod.fst\n[PROOFSTEP]\nrw [prod.lift_fst]\n[GOAL]\nC : Type u_1\ninst✝⁶ : Category.{?u.100, u_1} C\ninst✝⁵ : HasZeroMorphisms C\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : HasKernels C\ninst✝² : NormalMonoCategory C\nX Y Z : C\na : X ⟶ Z\nb : Y ⟶ Z\ninst✝¹ : Mono a\ninst✝ : Mono b\nP : C\nf : Z ⟶ P\nhaf : a ≫ f = 0\ni : IsLimit (KernelFork.ofι a haf)\nQ : C\ng : Z ⟶ Q\nhbg : b ≫ g = 0\ni' : IsLimit (KernelFork.ofι b hbg)\n⊢ kernel.ι (prod.lift f g) ≫ prod.lift f g ≫ prod.fst = 0 ≫ prod.fst\n[PROOFSTEP]\nrw [kernel.condition_assoc]\n[GOAL]\nC : Type u_1\ninst✝⁶ : Category.{?u.100, u_1} C\ninst✝⁵ : HasZeroMorphisms C\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : HasKernels C\ninst✝² : NormalMonoCategory C\nX Y Z : C\na : X ⟶ Z\nb : Y ⟶ Z\ninst✝¹ : Mono a\ninst✝ : Mono b\nP : C\nf : Z ⟶ P\nhaf : a ≫ f = 0\ni : IsLimit (KernelFork.ofι a haf)\nQ : C\ng : Z ⟶ Q\nhbg : b ≫ g = 0\ni' : IsLimit (KernelFork.ofι b hbg)\na' : kernel (prod.lift f g) ⟶ (KernelFork.ofι a haf).pt\nha' : a' ≫ Fork.ι (KernelFork.ofι a haf) = kernel.ι (prod.lift f g)\n⊢ kernel.ι (prod.lift f g) ≫ g = kernel.ι (prod.lift f g) ≫ prod.lift f g ≫ prod.snd\n[PROOFSTEP]\nrw [prod.lift_snd]\n[GOAL]\nC : Type u_1\ninst✝⁶ : Category.{?u.100, u_1} C\ninst✝⁵ : HasZeroMorphisms C\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : HasKernels C\ninst✝² : NormalMonoCategory C\nX Y Z : C\na : X ⟶ Z\nb : Y ⟶ Z\ninst✝¹ : Mono a\ninst✝ : Mono b\nP : C\nf : Z ⟶ P\nhaf : a ≫ f = 0\ni : IsLimit (KernelFork.ofι a haf)\nQ : C\ng : Z ⟶ Q\nhbg : b ≫ g = 0\ni' : IsLimit (KernelFork.ofι b hbg)\na' : kernel (prod.lift f g) ⟶ (KernelFork.ofι a haf).pt\nha' : a' ≫ Fork.ι (KernelFork.ofι a haf) = kernel.ι (prod.lift f g)\n⊢ kernel.ι (prod.lift f g) ≫ prod.lift f g ≫ prod.snd = 0 ≫ prod.snd\n[PROOFSTEP]\nrw [kernel.condition_assoc]\n[GOAL]\nC : Type u_1\ninst✝⁶ : Category.{?u.100, u_1} C\ninst✝⁵ : HasZeroMorphisms C\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : HasKernels C\ninst✝² : NormalMonoCategory C\nX Y Z : C\na : X ⟶ Z\nb : Y ⟶ Z\ninst✝¹ : Mono a\ninst✝ : Mono b\nP : C\nf : Z ⟶ P\nhaf : a ≫ f = 0\ni : IsLimit (KernelFork.ofι a haf)\nQ : C\ng : Z ⟶ Q\nhbg : b ≫ g = 0\ni' : IsLimit (KernelFork.ofι b hbg)\na' : kernel (prod.lift f g) ⟶ (KernelFork.ofι a haf).pt\nha' : a' ≫ Fork.ι (KernelFork.ofι a haf) = kernel.ι (prod.lift f g)\nb' : kernel (prod.lift f g) ⟶ (KernelFork.ofι b hbg).pt\nhb' : b' ≫ Fork.ι (KernelFork.ofι b hbg) = kernel.ι (prod.lift f g)\n⊢ a' ≫ a = b' ≫ b\n[PROOFSTEP]\nsimp at ha' hb' \n[GOAL]\nC : Type u_1\ninst✝⁶ : Category.{?u.100, u_1} C\ninst✝⁵ : HasZeroMorphisms C\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : HasKernels C\ninst✝² : NormalMonoCategory C\nX Y Z : C\na : X ⟶ Z\nb : Y ⟶ Z\ninst✝¹ : Mono a\ninst✝ : Mono b\nP : C\nf : Z ⟶ P\nhaf : a ≫ f = 0\ni : IsLimit (KernelFork.ofι a haf)\nQ : C\ng : Z ⟶ Q\nhbg : b ≫ g = 0\ni' : IsLimit (KernelFork.ofι b hbg)\na' : kernel (prod.lift f g) ⟶ (KernelFork.ofι a haf).pt\nha' : a' ≫ a = kernel.ι (prod.lift f g)\nb' : kernel (prod.lift f g) ⟶ (KernelFork.ofι b hbg).pt\nhb' : b' ≫ b = kernel.ι (prod.lift f g)\n⊢ a' ≫ a = b' ≫ b\n[PROOFSTEP]\nrw [ha', hb']\n[GOAL]\nC : Type u_1\ninst✝⁶ : Category.{?u.100, u_1} C\ninst✝⁵ : HasZeroMorphisms C\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : HasKernels C\ninst✝² : NormalMonoCategory C\nX Y Z : C\na : X ⟶ Z\nb : Y ⟶ Z\ninst✝¹ : Mono a\ninst✝ : Mono b\nP : C\nf : Z ⟶ P\nhaf : a ≫ f = 0\ni : IsLimit (KernelFork.ofι a haf)\nQ : C\ng : Z ⟶ Q\nhbg : b ≫ g = 0\ni' : IsLimit (KernelFork.ofι b hbg)\na' : kernel (prod.lift f g) ⟶ (KernelFork.ofι a haf).pt\nha' : a' ≫ Fork.ι (KernelFork.ofι a haf) = kernel.ι (prod.lift f g)\nb' : kernel (prod.lift f g) ⟶ (KernelFork.ofι b hbg).pt\nhb' : b' ≫ Fork.ι (KernelFork.ofι b hbg) = kernel.ι (prod.lift f g)\ns : PullbackCone a b\n⊢ ((PullbackCone.snd s ≫ b) ≫ prod.lift f g) ≫ prod.fst = PullbackCone.snd s ≫ b ≫ f\n[PROOFSTEP]\nsimp only [prod.lift_fst, Category.assoc]\n[GOAL]\nC : Type u_1\ninst✝⁶ : Category.{?u.100, u_1} C\ninst✝⁵ : HasZeroMorphisms C\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : HasKernels C\ninst✝² : NormalMonoCategory C\nX Y Z : C\na : X ⟶ Z\nb : Y ⟶ Z\ninst✝¹ : Mono a\ninst✝ : Mono b\nP : C\nf : Z ⟶ P\nhaf : a ≫ f = 0\ni : IsLimit (KernelFork.ofι a haf)\nQ : C\ng : Z ⟶ Q\nhbg : b ≫ g = 0\ni' : IsLimit (KernelFork.ofι b hbg)\na' : kernel (prod.lift f g) ⟶ (KernelFork.ofι a haf).pt\nha' : a' ≫ Fork.ι (KernelFork.ofι a haf) = kernel.ι (prod.lift f g)\nb' : kernel (prod.lift f g) ⟶ (KernelFork.ofι b hbg).pt\nhb' : b' ≫ Fork.ι (KernelFork.ofι b hbg) = kernel.ι (prod.lift f g)\ns : PullbackCone a b\n⊢ PullbackCone.snd s ≫ b ≫ f = PullbackCone.fst s ≫ a ≫ f\n[PROOFSTEP]\nrw [PullbackCone.condition_assoc]\n[GOAL]\nC : Type u_1\ninst✝⁶ : Category.{?u.100, u_1} C\ninst✝⁵ : HasZeroMorphisms C\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : HasKernels C\ninst✝² : NormalMonoCategory C\nX Y Z : C\na : X ⟶ Z\nb : Y ⟶ Z\ninst✝¹ : Mono a\ninst✝ : Mono b\nP : C\nf : Z ⟶ P\nhaf : a ≫ f = 0\ni : IsLimit (KernelFork.ofι a haf)\nQ : C\ng : Z ⟶ Q\nhbg : b ≫ g = 0\ni' : IsLimit (KernelFork.ofι b hbg)\na' : kernel (prod.lift f g) ⟶ (KernelFork.ofι a haf).pt\nha' : a' ≫ Fork.ι (KernelFork.ofι a haf) = kernel.ι (prod.lift f g)\nb' : kernel (prod.lift f g) ⟶ (KernelFork.ofι b hbg).pt\nhb' : b' ≫ Fork.ι (KernelFork.ofι b hbg) = kernel.ι (prod.lift f g)\ns : PullbackCone a b\n⊢ PullbackCone.fst s ≫ a ≫ f = PullbackCone.fst s ≫ 0\n[PROOFSTEP]\nrw [haf]\n[GOAL]\nC : Type u_1\ninst✝⁶ : Category.{?u.100, u_1} C\ninst✝⁵ : HasZeroMorphisms C\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : HasKernels C\ninst✝² : NormalMonoCategory C\nX Y Z : C\na : X ⟶ Z\nb : Y ⟶ Z\ninst✝¹ : Mono a\ninst✝ : Mono b\nP : C\nf : Z ⟶ P\nhaf : a ≫ f = 0\ni : IsLimit (KernelFork.ofι a haf)\nQ : C\ng : Z ⟶ Q\nhbg : b ≫ g = 0\ni' : IsLimit (KernelFork.ofι b hbg)\na' : kernel (prod.lift f g) ⟶ (KernelFork.ofι a haf).pt\nha' : a' ≫ Fork.ι (KernelFork.ofι a haf) = kernel.ι (prod.lift f g)\nb' : kernel (prod.lift f g) ⟶ (KernelFork.ofι b hbg).pt\nhb' : b' ≫ Fork.ι (KernelFork.ofι b hbg) = kernel.ι (prod.lift f g)\ns : PullbackCone a b\n⊢ PullbackCone.fst s ≫ 0 = 0 ≫ prod.fst\n[PROOFSTEP]\nrw [comp_zero, zero_comp]\n[GOAL]\nC : Type u_1\ninst✝⁶ : Category.{?u.100, u_1} C\ninst✝⁵ : HasZeroMorphisms C\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : HasKernels C\ninst✝² : NormalMonoCategory C\nX Y Z : C\na : X ⟶ Z\nb : Y ⟶ Z\ninst✝¹ : Mono a\ninst✝ : Mono b\nP : C\nf : Z ⟶ P\nhaf : a ≫ f = 0\ni : IsLimit (KernelFork.ofι a haf)\nQ : C\ng : Z ⟶ Q\nhbg : b ≫ g = 0\ni' : IsLimit (KernelFork.ofι b hbg)\na' : kernel (prod.lift f g) ⟶ (KernelFork.ofι a haf).pt\nha' : a' ≫ Fork.ι (KernelFork.ofι a haf) = kernel.ι (prod.lift f g)\nb' : kernel (prod.lift f g) ⟶ (KernelFork.ofι b hbg).pt\nhb' : b' ≫ Fork.ι (KernelFork.ofι b hbg) = kernel.ι (prod.lift f g)\ns : PullbackCone a b\n⊢ ((PullbackCone.snd s ≫ b) ≫ prod.lift f g) ≫ prod.snd = PullbackCone.snd s ≫ b ≫ g\n[PROOFSTEP]\nsimp only [prod.lift_snd, Category.assoc]\n[GOAL]\nC : Type u_1\ninst✝⁶ : Category.{?u.100, u_1} C\ninst✝⁵ : HasZeroMorphisms C\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : HasKernels C\ninst✝² : NormalMonoCategory C\nX Y Z : C\na : X ⟶ Z\nb : Y ⟶ Z\ninst✝¹ : Mono a\ninst✝ : Mono b\nP : C\nf : Z ⟶ P\nhaf : a ≫ f = 0\ni : IsLimit (KernelFork.ofι a haf)\nQ : C\ng : Z ⟶ Q\nhbg : b ≫ g = 0\ni' : IsLimit (KernelFork.ofι b hbg)\na' : kernel (prod.lift f g) ⟶ (KernelFork.ofι a haf).pt\nha' : a' ≫ Fork.ι (KernelFork.ofι a haf) = kernel.ι (prod.lift f g)\nb' : kernel (prod.lift f g) ⟶ (KernelFork.ofι b hbg).pt\nhb' : b' ≫ Fork.ι (KernelFork.ofι b hbg) = kernel.ι (prod.lift f g)\ns : PullbackCone a b\n⊢ PullbackCone.snd s ≫ b ≫ g = PullbackCone.snd s ≫ 0\n[PROOFSTEP]\nrw [hbg]\n[GOAL]\nC : Type u_1\ninst✝⁶ : Category.{?u.100, u_1} C\ninst✝⁵ : HasZeroMorphisms C\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : HasKernels C\ninst✝² : NormalMonoCategory C\nX Y Z : C\na : X ⟶ Z\nb : Y ⟶ Z\ninst✝¹ : Mono a\ninst✝ : Mono b\nP : C\nf : Z ⟶ P\nhaf : a ≫ f = 0\ni : IsLimit (KernelFork.ofι a haf)\nQ : C\ng : Z ⟶ Q\nhbg : b ≫ g = 0\ni' : IsLimit (KernelFork.ofι b hbg)\na' : kernel (prod.lift f g) ⟶ (KernelFork.ofι a haf).pt\nha' : a' ≫ Fork.ι (KernelFork.ofι a haf) = kernel.ι (prod.lift f g)\nb' : kernel (prod.lift f g) ⟶ (KernelFork.ofι b hbg).pt\nhb' : b' ≫ Fork.ι (KernelFork.ofι b hbg) = kernel.ι (prod.lift f g)\ns : PullbackCone a b\n⊢ PullbackCone.snd s ≫ 0 = 0 ≫ prod.snd\n[PROOFSTEP]\nrw [comp_zero, zero_comp]\n[GOAL]\nC : Type u_1\ninst✝⁶ : Category.{?u.100, u_1} C\ninst✝⁵ : HasZeroMorphisms C\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : HasKernels C\ninst✝² : NormalMonoCategory C\nX Y Z : C\na : X ⟶ Z\nb : Y ⟶ Z\ninst✝¹ : Mono a\ninst✝ : Mono b\nP : C\nf : Z ⟶ P\nhaf : a ≫ f = 0\ni : IsLimit (KernelFork.ofι a haf)\nQ : C\ng : Z ⟶ Q\nhbg : b ≫ g = 0\ni' : IsLimit (KernelFork.ofι b hbg)\na' : kernel (prod.lift f g) ⟶ (KernelFork.ofι a haf).pt\nha' : a' ≫ Fork.ι (KernelFork.ofι a haf) = kernel.ι (prod.lift f g)\nb' : kernel (prod.lift f g) ⟶ (KernelFork.ofι b hbg).pt\nhb' : b' ≫ Fork.ι (KernelFork.ofι b hbg) = kernel.ι (prod.lift f g)\ns : PullbackCone a b\n⊢ ((fun s => kernel.lift (prod.lift f g) (PullbackCone.snd s ≫ b) (_ : (PullbackCone.snd s ≫ b) ≫ prod.lift f g = 0))\n          s ≫\n        a') ≫\n      a =\n    PullbackCone.fst s ≫ a\n[PROOFSTEP]\nrw [KernelFork.ι_ofι] at ha' \n[GOAL]\nC : Type u_1\ninst✝⁶ : Category.{?u.100, u_1} C\ninst✝⁵ : HasZeroMorphisms C\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : HasKernels C\ninst✝² : NormalMonoCategory C\nX Y Z : C\na : X ⟶ Z\nb : Y ⟶ Z\ninst✝¹ : Mono a\ninst✝ : Mono b\nP : C\nf : Z ⟶ P\nhaf : a ≫ f = 0\ni : IsLimit (KernelFork.ofι a haf)\nQ : C\ng : Z ⟶ Q\nhbg : b ≫ g = 0\ni' : IsLimit (KernelFork.ofι b hbg)\na' : kernel (prod.lift f g) ⟶ (KernelFork.ofι a haf).pt\nha' : a' ≫ a = kernel.ι (prod.lift f g)\nb' : kernel (prod.lift f g) ⟶ (KernelFork.ofι b hbg).pt\nhb' : b' ≫ Fork.ι (KernelFork.ofι b hbg) = kernel.ι (prod.lift f g)\ns : PullbackCone a b\n⊢ ((fun s => kernel.lift (prod.lift f g) (PullbackCone.snd s ≫ b) (_ : (PullbackCone.snd s ≫ b) ≫ prod.lift f g = 0))\n          s ≫\n        a') ≫\n      a =\n    PullbackCone.fst s ≫ a\n[PROOFSTEP]\nsimp [ha', PullbackCone.condition s]\n[GOAL]\nC : Type u_1\ninst✝⁶ : Category.{?u.100, u_1} C\ninst✝⁵ : HasZeroMorphisms C\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : HasKernels C\ninst✝² : NormalMonoCategory C\nX Y Z : C\na : X ⟶ Z\nb : Y ⟶ Z\ninst✝¹ : Mono a\ninst✝ : Mono b\nP : C\nf : Z ⟶ P\nhaf : a ≫ f = 0\ni : IsLimit (KernelFork.ofι a haf)\nQ : C\ng : Z ⟶ Q\nhbg : b ≫ g = 0\ni' : IsLimit (KernelFork.ofι b hbg)\na' : kernel (prod.lift f g) ⟶ (KernelFork.ofι a haf).pt\nha' : a' ≫ Fork.ι (KernelFork.ofι a haf) = kernel.ι (prod.lift f g)\nb' : kernel (prod.lift f g) ⟶ (KernelFork.ofι b hbg).pt\nhb' : b' ≫ Fork.ι (KernelFork.ofι b hbg) = kernel.ι (prod.lift f g)\ns : PullbackCone a b\n⊢ ((fun s => kernel.lift (prod.lift f g) (PullbackCone.snd s ≫ b) (_ : (PullbackCone.snd s ≫ b) ≫ prod.lift f g = 0))\n          s ≫\n        b') ≫\n      b =\n    PullbackCone.snd s ≫ b\n[PROOFSTEP]\nrw [KernelFork.ι_ofι] at hb' \n[GOAL]\nC : Type u_1\ninst✝⁶ : Category.{?u.100, u_1} C\ninst✝⁵ : HasZeroMorphisms C\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : HasKernels C\ninst✝² : NormalMonoCategory C\nX Y Z : C\na : X ⟶ Z\nb : Y ⟶ Z\ninst✝¹ : Mono a\ninst✝ : Mono b\nP : C\nf : Z ⟶ P\nhaf : a ≫ f = 0\ni : IsLimit (KernelFork.ofι a haf)\nQ : C\ng : Z ⟶ Q\nhbg : b ≫ g = 0\ni' : IsLimit (KernelFork.ofι b hbg)\na' : kernel (prod.lift f g) ⟶ (KernelFork.ofι a haf).pt\nha' : a' ≫ Fork.ι (KernelFork.ofι a haf) = kernel.ι (prod.lift f g)\nb' : kernel (prod.lift f g) ⟶ (KernelFork.ofι b hbg).pt\nhb' : b' ≫ b = kernel.ι (prod.lift f g)\ns : PullbackCone a b\n⊢ ((fun s => kernel.lift (prod.lift f g) (PullbackCone.snd s ≫ b) (_ : (PullbackCone.snd s ≫ b) ≫ prod.lift f g = 0))\n          s ≫\n        b') ≫\n      b =\n    PullbackCone.snd s ≫ b\n[PROOFSTEP]\nsimp [hb']\n[GOAL]\nC : Type u_1\ninst✝⁶ : Category.{?u.100, u_1} C\ninst✝⁵ : HasZeroMorphisms C\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : HasKernels C\ninst✝² : NormalMonoCategory C\nX Y Z : C\na : X ⟶ Z\nb : Y ⟶ Z\ninst✝¹ : Mono a\ninst✝ : Mono b\nP : C\nf : Z ⟶ P\nhaf : a ≫ f = 0\ni : IsLimit (KernelFork.ofι a haf)\nQ : C\ng : Z ⟶ Q\nhbg : b ≫ g = 0\ni' : IsLimit (KernelFork.ofι b hbg)\na' : kernel (prod.lift f g) ⟶ (KernelFork.ofι a haf).pt\nha' : a' ≫ Fork.ι (KernelFork.ofι a haf) = kernel.ι (prod.lift f g)\nb' : kernel (prod.lift f g) ⟶ (KernelFork.ofι b hbg).pt\nhb' : b' ≫ Fork.ι (KernelFork.ofι b hbg) = kernel.ι (prod.lift f g)\ns : PullbackCone a b\nm : s.pt ⟶ kernel (prod.lift f g)\nh₁ : m ≫ a' = PullbackCone.fst s\nx✝ : m ≫ b' = PullbackCone.snd s\n⊢ m ≫ kernel.ι (prod.lift f g) = m ≫ a' ≫ a\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_a\nC : Type u_1\ninst✝⁶ : Category.{?u.100, u_1} C\ninst✝⁵ : HasZeroMorphisms C\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : HasKernels C\ninst✝² : NormalMonoCategory C\nX Y Z : C\na : X ⟶ Z\nb : Y ⟶ Z\ninst✝¹ : Mono a\ninst✝ : Mono b\nP : C\nf : Z ⟶ P\nhaf : a ≫ f = 0\ni : IsLimit (KernelFork.ofι a haf)\nQ : C\ng : Z ⟶ Q\nhbg : b ≫ g = 0\ni' : IsLimit (KernelFork.ofι b hbg)\na' : kernel (prod.lift f g) ⟶ (KernelFork.ofι a haf).pt\nha' : a' ≫ Fork.ι (KernelFork.ofι a haf) = kernel.ι (prod.lift f g)\nb' : kernel (prod.lift f g) ⟶ (KernelFork.ofι b hbg).pt\nhb' : b' ≫ Fork.ι (KernelFork.ofι b hbg) = kernel.ι (prod.lift f g)\ns : PullbackCone a b\nm : s.pt ⟶ kernel (prod.lift f g)\nh₁ : m ≫ a' = PullbackCone.fst s\nx✝ : m ≫ b' = PullbackCone.snd s\n⊢ kernel.ι (prod.lift f g) = a' ≫ a\n[PROOFSTEP]\nexact ha'.symm\n[GOAL]\nC : Type u_1\ninst✝⁶ : Category.{?u.100, u_1} C\ninst✝⁵ : HasZeroMorphisms C\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : HasKernels C\ninst✝² : NormalMonoCategory C\nX Y Z : C\na : X ⟶ Z\nb : Y ⟶ Z\ninst✝¹ : Mono a\ninst✝ : Mono b\nP : C\nf : Z ⟶ P\nhaf : a ≫ f = 0\ni : IsLimit (KernelFork.ofι a haf)\nQ : C\ng : Z ⟶ Q\nhbg : b ≫ g = 0\ni' : IsLimit (KernelFork.ofι b hbg)\na' : kernel (prod.lift f g) ⟶ (KernelFork.ofι a haf).pt\nha' : a' ≫ Fork.ι (KernelFork.ofι a haf) = kernel.ι (prod.lift f g)\nb' : kernel (prod.lift f g) ⟶ (KernelFork.ofι b hbg).pt\nhb' : b' ≫ Fork.ι (KernelFork.ofι b hbg) = kernel.ι (prod.lift f g)\ns : PullbackCone a b\nm : s.pt ⟶ kernel (prod.lift f g)\nh₁ : m ≫ a' = PullbackCone.fst s\nx✝ : m ≫ b' = PullbackCone.snd s\n⊢ m ≫ a' ≫ a = PullbackCone.fst s ≫ a\n[PROOFSTEP]\nrw [← Category.assoc, h₁]\n[GOAL]\nC : Type u_1\ninst✝⁶ : Category.{?u.100, u_1} C\ninst✝⁵ : HasZeroMorphisms C\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : HasKernels C\ninst✝² : NormalMonoCategory C\nX Y Z : C\na : X ⟶ Z\nb : Y ⟶ Z\ninst✝¹ : Mono a\ninst✝ : Mono b\nP : C\nf : Z ⟶ P\nhaf : a ≫ f = 0\ni : IsLimit (KernelFork.ofι a haf)\nQ : C\ng : Z ⟶ Q\nhbg : b ≫ g = 0\ni' : IsLimit (KernelFork.ofι b hbg)\na' : kernel (prod.lift f g) ⟶ (KernelFork.ofι a haf).pt\nha' : a' ≫ Fork.ι (KernelFork.ofι a haf) = kernel.ι (prod.lift f g)\nb' : kernel (prod.lift f g) ⟶ (KernelFork.ofι b hbg).pt\nhb' : b' ≫ Fork.ι (KernelFork.ofι b hbg) = kernel.ι (prod.lift f g)\ns : PullbackCone a b\nm : s.pt ⟶ kernel (prod.lift f g)\nh₁ : m ≫ a' = PullbackCone.fst s\nx✝ : m ≫ b' = PullbackCone.snd s\n⊢ PullbackCone.snd s ≫ b =\n    kernel.lift (prod.lift f g) (PullbackCone.snd s ≫ b) (_ : (PullbackCone.snd s ≫ b) ≫ prod.lift f g = 0) ≫\n      kernel.ι (prod.lift f g)\n[PROOFSTEP]\nrw [kernel.lift_ι]\n[GOAL]\nC : Type u_1\ninst✝⁴ : Category.{?u.45510, u_1} C\ninst✝³ : HasZeroMorphisms C\ninst✝² : HasFiniteProducts C\ninst✝¹ : HasKernels C\ninst✝ : NormalMonoCategory C\nX Y : C\nf g : X ⟶ Y\n⊢ pullback.fst ≫ 𝟙 X = pullback.fst ≫ prod.lift (𝟙 X) f ≫ prod.fst\n[PROOFSTEP]\nrw [prod.lift_fst]\n[GOAL]\nC : Type u_1\ninst✝⁴ : Category.{?u.45510, u_1} C\ninst✝³ : HasZeroMorphisms C\ninst✝² : HasFiniteProducts C\ninst✝¹ : HasKernels C\ninst✝ : NormalMonoCategory C\nX Y : C\nf g : X ⟶ Y\n⊢ pullback.fst ≫ prod.lift (𝟙 X) f ≫ prod.fst = pullback.snd ≫ prod.lift (𝟙 X) g ≫ prod.fst\n[PROOFSTEP]\nrw [pullback.condition_assoc]\n[GOAL]\nC : Type u_1\ninst✝⁴ : Category.{?u.45510, u_1} C\ninst✝³ : HasZeroMorphisms C\ninst✝² : HasFiniteProducts C\ninst✝¹ : HasKernels C\ninst✝ : NormalMonoCategory C\nX Y : C\nf g : X ⟶ Y\n⊢ pullback.snd ≫ prod.lift (𝟙 X) g ≫ prod.fst = pullback.snd\n[PROOFSTEP]\nrw [prod.lift_fst, Category.comp_id]\n[GOAL]\nC : Type u_1\ninst✝⁴ : Category.{?u.45510, u_1} C\ninst✝³ : HasZeroMorphisms C\ninst✝² : HasFiniteProducts C\ninst✝¹ : HasKernels C\ninst✝ : NormalMonoCategory C\nX Y : C\nf g : X ⟶ Y\nhuv : pullback.fst = pullback.snd\n⊢ pullback.fst ≫ f = pullback.fst ≫ prod.lift (𝟙 X) f ≫ prod.snd\n[PROOFSTEP]\nrw [prod.lift_snd]\n[GOAL]\nC : Type u_1\ninst✝⁴ : Category.{?u.45510, u_1} C\ninst✝³ : HasZeroMorphisms C\ninst✝² : HasFiniteProducts C\ninst✝¹ : HasKernels C\ninst✝ : NormalMonoCategory C\nX Y : C\nf g : X ⟶ Y\nhuv : pullback.fst = pullback.snd\n⊢ pullback.fst ≫ prod.lift (𝟙 X) f ≫ prod.snd = pullback.snd ≫ prod.lift (𝟙 X) g ≫ prod.snd\n[PROOFSTEP]\nrw [pullback.condition_assoc]\n[GOAL]\nC : Type u_1\ninst✝⁴ : Category.{?u.45510, u_1} C\ninst✝³ : HasZeroMorphisms C\ninst✝² : HasFiniteProducts C\ninst✝¹ : HasKernels C\ninst✝ : NormalMonoCategory C\nX Y : C\nf g : X ⟶ Y\nhuv : pullback.fst = pullback.snd\n⊢ pullback.snd ≫ prod.lift (𝟙 X) g ≫ prod.snd = pullback.snd ≫ g\n[PROOFSTEP]\nrw [prod.lift_snd]\n[GOAL]\nC : Type u_1\ninst✝⁴ : Category.{?u.45510, u_1} C\ninst✝³ : HasZeroMorphisms C\ninst✝² : HasFiniteProducts C\ninst✝¹ : HasKernels C\ninst✝ : NormalMonoCategory C\nX Y : C\nf g : X ⟶ Y\nhuv : pullback.fst = pullback.snd\nhvu : pullback.fst ≫ f = pullback.snd ≫ g\n⊢ pullback.fst ≫ f = pullback.fst ≫ g\n[PROOFSTEP]\nrw [hvu, ← huv]\n[GOAL]\nC : Type u_1\ninst✝⁴ : Category.{?u.45510, u_1} C\ninst✝³ : HasZeroMorphisms C\ninst✝² : HasFiniteProducts C\ninst✝¹ : HasKernels C\ninst✝ : NormalMonoCategory C\nX Y : C\nf g : X ⟶ Y\nhuv : pullback.fst = pullback.snd\nhvu : pullback.fst ≫ f = pullback.snd ≫ g\nhuu : pullback.fst ≫ f = pullback.fst ≫ g\ns : Fork f g\n⊢ (Fork.ι s ≫ prod.lift (𝟙 X) f) ≫ prod.fst = (Fork.ι s ≫ prod.lift (𝟙 X) g) ≫ prod.fst\n[PROOFSTEP]\nsimp only [prod.lift_fst, Category.assoc]\n[GOAL]\nC : Type u_1\ninst✝⁴ : Category.{?u.45510, u_1} C\ninst✝³ : HasZeroMorphisms C\ninst✝² : HasFiniteProducts C\ninst✝¹ : HasKernels C\ninst✝ : NormalMonoCategory C\nX Y : C\nf g : X ⟶ Y\nhuv : pullback.fst = pullback.snd\nhvu : pullback.fst ≫ f = pullback.snd ≫ g\nhuu : pullback.fst ≫ f = pullback.fst ≫ g\ns : Fork f g\n⊢ (Fork.ι s ≫ prod.lift (𝟙 X) f) ≫ prod.snd = (Fork.ι s ≫ prod.lift (𝟙 X) g) ≫ prod.snd\n[PROOFSTEP]\nsimp only [prod.comp_lift, Fork.condition s]\n[GOAL]\nC : Type u_1\ninst✝⁴ : Category.{?u.45510, u_1} C\ninst✝³ : HasZeroMorphisms C\ninst✝² : HasFiniteProducts C\ninst✝¹ : HasKernels C\ninst✝ : NormalMonoCategory C\nX Y : C\nf g : X ⟶ Y\nhuv : pullback.fst = pullback.snd\nhvu : pullback.fst ≫ f = pullback.snd ≫ g\nhuu : pullback.fst ≫ f = pullback.fst ≫ g\ns : Fork f g\n⊢ (fun s => pullback.lift (Fork.ι s) (Fork.ι s) (_ : Fork.ι s ≫ prod.lift (𝟙 X) f = Fork.ι s ≫ prod.lift (𝟙 X) g)) s ≫\n      Fork.ι (Fork.ofι pullback.fst huu) =\n    Fork.ι s\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u_1\ninst✝⁴ : Category.{?u.45510, u_1} C\ninst✝³ : HasZeroMorphisms C\ninst✝² : HasFiniteProducts C\ninst✝¹ : HasKernels C\ninst✝ : NormalMonoCategory C\nX Y : C\nf g : X ⟶ Y\nhuv : pullback.fst = pullback.snd\nhvu : pullback.fst ≫ f = pullback.snd ≫ g\nhuu : pullback.fst ≫ f = pullback.fst ≫ g\ns : Fork f g\nm : s.pt ⟶ (Fork.ofι pullback.fst huu).pt\nh : m ≫ Fork.ι (Fork.ofι pullback.fst huu) = Fork.ι s\n⊢ m ≫ pullback.fst =\n    (fun s => pullback.lift (Fork.ι s) (Fork.ι s) (_ : Fork.ι s ≫ prod.lift (𝟙 X) f = Fork.ι s ≫ prod.lift (𝟙 X) g)) s ≫\n      pullback.fst\n[PROOFSTEP]\nsimpa only [pullback.lift_fst] using h\n[GOAL]\nC : Type u_1\ninst✝⁴ : Category.{?u.45510, u_1} C\ninst✝³ : HasZeroMorphisms C\ninst✝² : HasFiniteProducts C\ninst✝¹ : HasKernels C\ninst✝ : NormalMonoCategory C\nX Y : C\nf g : X ⟶ Y\nhuv : pullback.fst = pullback.snd\nhvu : pullback.fst ≫ f = pullback.snd ≫ g\nhuu : pullback.fst ≫ f = pullback.fst ≫ g\ns : Fork f g\nm : s.pt ⟶ (Fork.ofι pullback.fst huu).pt\nh : m ≫ Fork.ι (Fork.ofι pullback.fst huu) = Fork.ι s\n⊢ m ≫ pullback.snd =\n    (fun s => pullback.lift (Fork.ι s) (Fork.ι s) (_ : Fork.ι s ≫ prod.lift (𝟙 X) f = Fork.ι s ≫ prod.lift (𝟙 X) g)) s ≫\n      pullback.snd\n[PROOFSTEP]\nsimpa only [huv.symm, pullback.lift_fst] using h\n[GOAL]\nC : Type u_1\ninst✝⁴ : Category.{?u.76598, u_1} C\ninst✝³ : HasZeroMorphisms C\ninst✝² : HasFiniteProducts C\ninst✝¹ : HasKernels C\ninst✝ : NormalMonoCategory C\nX Y : C\nf : X ⟶ Y\nZ : C\n⊢ f ≫ 0 = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u_1\ninst✝⁴ : Category.{u_2, u_1} C\ninst✝³ : HasZeroMorphisms C\ninst✝² : HasFiniteProducts C\ninst✝¹ : HasKernels C\ninst✝ : NormalMonoCategory C\nX Y : C\nf : X ⟶ Y\nZ : C\nl : IsColimit (CokernelCofork.ofπ 0 (_ : f ≫ 0 = 0))\nZ✝ : C\nu v : Y ⟶ Z✝\nhuv : f ≫ u = f ≫ v\n⊢ u = v\n[PROOFSTEP]\nobtain ⟨W, w, hw, hl⟩ := normalMonoOfMono (equalizer.ι u v)\n[GOAL]\ncase mk\nC : Type u_1\ninst✝⁴ : Category.{u_2, u_1} C\ninst✝³ : HasZeroMorphisms C\ninst✝² : HasFiniteProducts C\ninst✝¹ : HasKernels C\ninst✝ : NormalMonoCategory C\nX Y : C\nf : X ⟶ Y\nZ : C\nl : IsColimit (CokernelCofork.ofπ 0 (_ : f ≫ 0 = 0))\nZ✝ : C\nu v : Y ⟶ Z✝\nhuv : f ≫ u = f ≫ v\nW : C\nw : Y ⟶ W\nhw : equalizer.ι u v ≫ w = 0\nhl : IsLimit (KernelFork.ofι (equalizer.ι u v) hw)\n⊢ u = v\n[PROOFSTEP]\nobtain ⟨m, hm⟩ := equalizer.lift' f huv\n[GOAL]\ncase mk.mk\nC : Type u_1\ninst✝⁴ : Category.{u_2, u_1} C\ninst✝³ : HasZeroMorphisms C\ninst✝² : HasFiniteProducts C\ninst✝¹ : HasKernels C\ninst✝ : NormalMonoCategory C\nX Y : C\nf : X ⟶ Y\nZ : C\nl : IsColimit (CokernelCofork.ofπ 0 (_ : f ≫ 0 = 0))\nZ✝ : C\nu v : Y ⟶ Z✝\nhuv : f ≫ u = f ≫ v\nW : C\nw : Y ⟶ W\nhw : equalizer.ι u v ≫ w = 0\nhl : IsLimit (KernelFork.ofι (equalizer.ι u v) hw)\nm : X ⟶ equalizer u v\nhm : m ≫ equalizer.ι u v = f\n⊢ u = v\n[PROOFSTEP]\nhave hwf : f ≫ w = 0 := by rw [← hm, Category.assoc, hw, comp_zero]\n[GOAL]\nC : Type u_1\ninst✝⁴ : Category.{u_2, u_1} C\ninst✝³ : HasZeroMorphisms C\ninst✝² : HasFiniteProducts C\ninst✝¹ : HasKernels C\ninst✝ : NormalMonoCategory C\nX Y : C\nf : X ⟶ Y\nZ : C\nl : IsColimit (CokernelCofork.ofπ 0 (_ : f ≫ 0 = 0))\nZ✝ : C\nu v : Y ⟶ Z✝\nhuv : f ≫ u = f ≫ v\nW : C\nw : Y ⟶ W\nhw : equalizer.ι u v ≫ w = 0\nhl : IsLimit (KernelFork.ofι (equalizer.ι u v) hw)\nm : X ⟶ equalizer u v\nhm : m ≫ equalizer.ι u v = f\n⊢ f ≫ w = 0\n[PROOFSTEP]\nrw [← hm, Category.assoc, hw, comp_zero]\n[GOAL]\ncase mk.mk\nC : Type u_1\ninst✝⁴ : Category.{u_2, u_1} C\ninst✝³ : HasZeroMorphisms C\ninst✝² : HasFiniteProducts C\ninst✝¹ : HasKernels C\ninst✝ : NormalMonoCategory C\nX Y : C\nf : X ⟶ Y\nZ : C\nl : IsColimit (CokernelCofork.ofπ 0 (_ : f ≫ 0 = 0))\nZ✝ : C\nu v : Y ⟶ Z✝\nhuv : f ≫ u = f ≫ v\nW : C\nw : Y ⟶ W\nhw : equalizer.ι u v ≫ w = 0\nhl : IsLimit (KernelFork.ofι (equalizer.ι u v) hw)\nm : X ⟶ equalizer u v\nhm : m ≫ equalizer.ι u v = f\nhwf : f ≫ w = 0\n⊢ u = v\n[PROOFSTEP]\nobtain ⟨n, hn⟩ := CokernelCofork.IsColimit.desc' l _ hwf\n[GOAL]\ncase mk.mk.mk\nC : Type u_1\ninst✝⁴ : Category.{u_2, u_1} C\ninst✝³ : HasZeroMorphisms C\ninst✝² : HasFiniteProducts C\ninst✝¹ : HasKernels C\ninst✝ : NormalMonoCategory C\nX Y : C\nf : X ⟶ Y\nZ : C\nl : IsColimit (CokernelCofork.ofπ 0 (_ : f ≫ 0 = 0))\nZ✝ : C\nu v : Y ⟶ Z✝\nhuv : f ≫ u = f ≫ v\nW : C\nw : Y ⟶ W\nhw : equalizer.ι u v ≫ w = 0\nhl : IsLimit (KernelFork.ofι (equalizer.ι u v) hw)\nm : X ⟶ equalizer u v\nhm : m ≫ equalizer.ι u v = f\nhwf : f ≫ w = 0\nn : (CokernelCofork.ofπ 0 (_ : f ≫ 0 = 0)).pt ⟶ W\nhn : Cofork.π (CokernelCofork.ofπ 0 (_ : f ≫ 0 = 0)) ≫ n = w\n⊢ u = v\n[PROOFSTEP]\nrw [Cofork.π_ofπ, zero_comp] at hn \n[GOAL]\ncase mk.mk.mk\nC : Type u_1\ninst✝⁴ : Category.{u_2, u_1} C\ninst✝³ : HasZeroMorphisms C\ninst✝² : HasFiniteProducts C\ninst✝¹ : HasKernels C\ninst✝ : NormalMonoCategory C\nX Y : C\nf : X ⟶ Y\nZ : C\nl : IsColimit (CokernelCofork.ofπ 0 (_ : f ≫ 0 = 0))\nZ✝ : C\nu v : Y ⟶ Z✝\nhuv : f ≫ u = f ≫ v\nW : C\nw : Y ⟶ W\nhw : equalizer.ι u v ≫ w = 0\nhl : IsLimit (KernelFork.ofι (equalizer.ι u v) hw)\nm : X ⟶ equalizer u v\nhm : m ≫ equalizer.ι u v = f\nhwf : f ≫ w = 0\nn : (CokernelCofork.ofπ 0 (_ : f ≫ 0 = 0)).pt ⟶ W\nhn : 0 = w\n⊢ u = v\n[PROOFSTEP]\nhave : IsIso (equalizer.ι u v) := by apply isIso_limit_cone_parallelPair_of_eq hn.symm hl\n[GOAL]\nC : Type u_1\ninst✝⁴ : Category.{u_2, u_1} C\ninst✝³ : HasZeroMorphisms C\ninst✝² : HasFiniteProducts C\ninst✝¹ : HasKernels C\ninst✝ : NormalMonoCategory C\nX Y : C\nf : X ⟶ Y\nZ : C\nl : IsColimit (CokernelCofork.ofπ 0 (_ : f ≫ 0 = 0))\nZ✝ : C\nu v : Y ⟶ Z✝\nhuv : f ≫ u = f ≫ v\nW : C\nw : Y ⟶ W\nhw : equalizer.ι u v ≫ w = 0\nhl : IsLimit (KernelFork.ofι (equalizer.ι u v) hw)\nm : X ⟶ equalizer u v\nhm : m ≫ equalizer.ι u v = f\nhwf : f ≫ w = 0\nn : (CokernelCofork.ofπ 0 (_ : f ≫ 0 = 0)).pt ⟶ W\nhn : 0 = w\n⊢ IsIso (equalizer.ι u v)\n[PROOFSTEP]\napply isIso_limit_cone_parallelPair_of_eq hn.symm hl\n[GOAL]\ncase mk.mk.mk\nC : Type u_1\ninst✝⁴ : Category.{u_2, u_1} C\ninst✝³ : HasZeroMorphisms C\ninst✝² : HasFiniteProducts C\ninst✝¹ : HasKernels C\ninst✝ : NormalMonoCategory C\nX Y : C\nf : X ⟶ Y\nZ : C\nl : IsColimit (CokernelCofork.ofπ 0 (_ : f ≫ 0 = 0))\nZ✝ : C\nu v : Y ⟶ Z✝\nhuv : f ≫ u = f ≫ v\nW : C\nw : Y ⟶ W\nhw : equalizer.ι u v ≫ w = 0\nhl : IsLimit (KernelFork.ofι (equalizer.ι u v) hw)\nm : X ⟶ equalizer u v\nhm : m ≫ equalizer.ι u v = f\nhwf : f ≫ w = 0\nn : (CokernelCofork.ofπ 0 (_ : f ≫ 0 = 0)).pt ⟶ W\nhn : 0 = w\nthis : IsIso (equalizer.ι u v)\n⊢ u = v\n[PROOFSTEP]\napply (cancel_epi (equalizer.ι u v)).1\n[GOAL]\ncase mk.mk.mk\nC : Type u_1\ninst✝⁴ : Category.{u_2, u_1} C\ninst✝³ : HasZeroMorphisms C\ninst✝² : HasFiniteProducts C\ninst✝¹ : HasKernels C\ninst✝ : NormalMonoCategory C\nX Y : C\nf : X ⟶ Y\nZ : C\nl : IsColimit (CokernelCofork.ofπ 0 (_ : f ≫ 0 = 0))\nZ✝ : C\nu v : Y ⟶ Z✝\nhuv : f ≫ u = f ≫ v\nW : C\nw : Y ⟶ W\nhw : equalizer.ι u v ≫ w = 0\nhl : IsLimit (KernelFork.ofι (equalizer.ι u v) hw)\nm : X ⟶ equalizer u v\nhm : m ≫ equalizer.ι u v = f\nhwf : f ≫ w = 0\nn : (CokernelCofork.ofπ 0 (_ : f ≫ 0 = 0)).pt ⟶ W\nhn : 0 = w\nthis : IsIso (equalizer.ι u v)\n⊢ equalizer.ι u v ≫ u = equalizer.ι u v ≫ v\n[PROOFSTEP]\nexact equalizer.condition _ _\n[GOAL]\nC : Type u_1\ninst✝⁶ : Category.{?u.80661, u_1} C\ninst✝⁵ : HasZeroMorphisms C\ninst✝⁴ : HasFiniteCoproducts C\ninst✝³ : HasCokernels C\ninst✝² : NormalEpiCategory C\nX Y Z : C\na : X ⟶ Y\nb : X ⟶ Z\ninst✝¹ : Epi a\ninst✝ : Epi b\nP : C\nf : P ⟶ X\nhfa : f ≫ a = 0\ni : IsColimit (CokernelCofork.ofπ a hfa)\nQ : C\ng : Q ⟶ X\nhgb : g ≫ b = 0\ni' : IsColimit (CokernelCofork.ofπ b hgb)\n⊢ f ≫ cokernel.π (coprod.desc f g) = coprod.inl ≫ coprod.desc f g ≫ cokernel.π (coprod.desc f g)\n[PROOFSTEP]\nrw [coprod.inl_desc_assoc]\n[GOAL]\nC : Type u_1\ninst✝⁶ : Category.{?u.80661, u_1} C\ninst✝⁵ : HasZeroMorphisms C\ninst✝⁴ : HasFiniteCoproducts C\ninst✝³ : HasCokernels C\ninst✝² : NormalEpiCategory C\nX Y Z : C\na : X ⟶ Y\nb : X ⟶ Z\ninst✝¹ : Epi a\ninst✝ : Epi b\nP : C\nf : P ⟶ X\nhfa : f ≫ a = 0\ni : IsColimit (CokernelCofork.ofπ a hfa)\nQ : C\ng : Q ⟶ X\nhgb : g ≫ b = 0\ni' : IsColimit (CokernelCofork.ofπ b hgb)\n⊢ coprod.inl ≫ coprod.desc f g ≫ cokernel.π (coprod.desc f g) = coprod.inl ≫ 0\n[PROOFSTEP]\nrw [cokernel.condition]\n[GOAL]\nC : Type u_1\ninst✝⁶ : Category.{?u.80661, u_1} C\ninst✝⁵ : HasZeroMorphisms C\ninst✝⁴ : HasFiniteCoproducts C\ninst✝³ : HasCokernels C\ninst✝² : NormalEpiCategory C\nX Y Z : C\na : X ⟶ Y\nb : X ⟶ Z\ninst✝¹ : Epi a\ninst✝ : Epi b\nP : C\nf : P ⟶ X\nhfa : f ≫ a = 0\ni : IsColimit (CokernelCofork.ofπ a hfa)\nQ : C\ng : Q ⟶ X\nhgb : g ≫ b = 0\ni' : IsColimit (CokernelCofork.ofπ b hgb)\na' : (CokernelCofork.ofπ a hfa).pt ⟶ cokernel (coprod.desc f g)\nha' : Cofork.π (CokernelCofork.ofπ a hfa) ≫ a' = cokernel.π (coprod.desc f g)\n⊢ g ≫ cokernel.π (coprod.desc f g) = coprod.inr ≫ coprod.desc f g ≫ cokernel.π (coprod.desc f g)\n[PROOFSTEP]\nrw [coprod.inr_desc_assoc]\n[GOAL]\nC : Type u_1\ninst✝⁶ : Category.{?u.80661, u_1} C\ninst✝⁵ : HasZeroMorphisms C\ninst✝⁴ : HasFiniteCoproducts C\ninst✝³ : HasCokernels C\ninst✝² : NormalEpiCategory C\nX Y Z : C\na : X ⟶ Y\nb : X ⟶ Z\ninst✝¹ : Epi a\ninst✝ : Epi b\nP : C\nf : P ⟶ X\nhfa : f ≫ a = 0\ni : IsColimit (CokernelCofork.ofπ a hfa)\nQ : C\ng : Q ⟶ X\nhgb : g ≫ b = 0\ni' : IsColimit (CokernelCofork.ofπ b hgb)\na' : (CokernelCofork.ofπ a hfa).pt ⟶ cokernel (coprod.desc f g)\nha' : Cofork.π (CokernelCofork.ofπ a hfa) ≫ a' = cokernel.π (coprod.desc f g)\n⊢ coprod.inr ≫ coprod.desc f g ≫ cokernel.π (coprod.desc f g) = coprod.inr ≫ 0\n[PROOFSTEP]\nrw [cokernel.condition]\n[GOAL]\nC : Type u_1\ninst✝⁶ : Category.{?u.80661, u_1} C\ninst✝⁵ : HasZeroMorphisms C\ninst✝⁴ : HasFiniteCoproducts C\ninst✝³ : HasCokernels C\ninst✝² : NormalEpiCategory C\nX Y Z : C\na : X ⟶ Y\nb : X ⟶ Z\ninst✝¹ : Epi a\ninst✝ : Epi b\nP : C\nf : P ⟶ X\nhfa : f ≫ a = 0\ni : IsColimit (CokernelCofork.ofπ a hfa)\nQ : C\ng : Q ⟶ X\nhgb : g ≫ b = 0\ni' : IsColimit (CokernelCofork.ofπ b hgb)\na' : (CokernelCofork.ofπ a hfa).pt ⟶ cokernel (coprod.desc f g)\nha' : Cofork.π (CokernelCofork.ofπ a hfa) ≫ a' = cokernel.π (coprod.desc f g)\nb' : (CokernelCofork.ofπ b hgb).pt ⟶ cokernel (coprod.desc f g)\nhb' : Cofork.π (CokernelCofork.ofπ b hgb) ≫ b' = cokernel.π (coprod.desc f g)\n⊢ a ≫ a' = b ≫ b'\n[PROOFSTEP]\nsimp only [Cofork.π_ofπ] at ha' hb' \n[GOAL]\nC : Type u_1\ninst✝⁶ : Category.{?u.80661, u_1} C\ninst✝⁵ : HasZeroMorphisms C\ninst✝⁴ : HasFiniteCoproducts C\ninst✝³ : HasCokernels C\ninst✝² : NormalEpiCategory C\nX Y Z : C\na : X ⟶ Y\nb : X ⟶ Z\ninst✝¹ : Epi a\ninst✝ : Epi b\nP : C\nf : P ⟶ X\nhfa : f ≫ a = 0\ni : IsColimit (CokernelCofork.ofπ a hfa)\nQ : C\ng : Q ⟶ X\nhgb : g ≫ b = 0\ni' : IsColimit (CokernelCofork.ofπ b hgb)\na' : (CokernelCofork.ofπ a hfa).pt ⟶ cokernel (coprod.desc f g)\nha' : a ≫ a' = cokernel.π (coprod.desc f g)\nb' : (CokernelCofork.ofπ b hgb).pt ⟶ cokernel (coprod.desc f g)\nhb' : b ≫ b' = cokernel.π (coprod.desc f g)\n⊢ a ≫ a' = b ≫ b'\n[PROOFSTEP]\nrw [ha', hb']\n[GOAL]\nC : Type u_1\ninst✝⁶ : Category.{?u.80661, u_1} C\ninst✝⁵ : HasZeroMorphisms C\ninst✝⁴ : HasFiniteCoproducts C\ninst✝³ : HasCokernels C\ninst✝² : NormalEpiCategory C\nX Y Z : C\na : X ⟶ Y\nb : X ⟶ Z\ninst✝¹ : Epi a\ninst✝ : Epi b\nP : C\nf : P ⟶ X\nhfa : f ≫ a = 0\ni : IsColimit (CokernelCofork.ofπ a hfa)\nQ : C\ng : Q ⟶ X\nhgb : g ≫ b = 0\ni' : IsColimit (CokernelCofork.ofπ b hgb)\na' : (CokernelCofork.ofπ a hfa).pt ⟶ cokernel (coprod.desc f g)\nha' : Cofork.π (CokernelCofork.ofπ a hfa) ≫ a' = cokernel.π (coprod.desc f g)\nb' : (CokernelCofork.ofπ b hgb).pt ⟶ cokernel (coprod.desc f g)\nhb' : Cofork.π (CokernelCofork.ofπ b hgb) ≫ b' = cokernel.π (coprod.desc f g)\ns : PushoutCocone a b\n⊢ coprod.inl ≫ coprod.desc f g ≫ b ≫ PushoutCocone.inr s = f ≫ b ≫ PushoutCocone.inr s\n[PROOFSTEP]\nrw [coprod.inl_desc_assoc]\n[GOAL]\nC : Type u_1\ninst✝⁶ : Category.{?u.80661, u_1} C\ninst✝⁵ : HasZeroMorphisms C\ninst✝⁴ : HasFiniteCoproducts C\ninst✝³ : HasCokernels C\ninst✝² : NormalEpiCategory C\nX Y Z : C\na : X ⟶ Y\nb : X ⟶ Z\ninst✝¹ : Epi a\ninst✝ : Epi b\nP : C\nf : P ⟶ X\nhfa : f ≫ a = 0\ni : IsColimit (CokernelCofork.ofπ a hfa)\nQ : C\ng : Q ⟶ X\nhgb : g ≫ b = 0\ni' : IsColimit (CokernelCofork.ofπ b hgb)\na' : (CokernelCofork.ofπ a hfa).pt ⟶ cokernel (coprod.desc f g)\nha' : Cofork.π (CokernelCofork.ofπ a hfa) ≫ a' = cokernel.π (coprod.desc f g)\nb' : (CokernelCofork.ofπ b hgb).pt ⟶ cokernel (coprod.desc f g)\nhb' : Cofork.π (CokernelCofork.ofπ b hgb) ≫ b' = cokernel.π (coprod.desc f g)\ns : PushoutCocone a b\n⊢ f ≫ b ≫ PushoutCocone.inr s = f ≫ a ≫ PushoutCocone.inl s\n[PROOFSTEP]\nrw [PushoutCocone.condition]\n[GOAL]\nC : Type u_1\ninst✝⁶ : Category.{?u.80661, u_1} C\ninst✝⁵ : HasZeroMorphisms C\ninst✝⁴ : HasFiniteCoproducts C\ninst✝³ : HasCokernels C\ninst✝² : NormalEpiCategory C\nX Y Z : C\na : X ⟶ Y\nb : X ⟶ Z\ninst✝¹ : Epi a\ninst✝ : Epi b\nP : C\nf : P ⟶ X\nhfa : f ≫ a = 0\ni : IsColimit (CokernelCofork.ofπ a hfa)\nQ : C\ng : Q ⟶ X\nhgb : g ≫ b = 0\ni' : IsColimit (CokernelCofork.ofπ b hgb)\na' : (CokernelCofork.ofπ a hfa).pt ⟶ cokernel (coprod.desc f g)\nha' : Cofork.π (CokernelCofork.ofπ a hfa) ≫ a' = cokernel.π (coprod.desc f g)\nb' : (CokernelCofork.ofπ b hgb).pt ⟶ cokernel (coprod.desc f g)\nhb' : Cofork.π (CokernelCofork.ofπ b hgb) ≫ b' = cokernel.π (coprod.desc f g)\ns : PushoutCocone a b\n⊢ f ≫ a ≫ PushoutCocone.inl s = 0 ≫ PushoutCocone.inl s\n[PROOFSTEP]\nrw [← Category.assoc, eq_whisker hfa]\n[GOAL]\nC : Type u_1\ninst✝⁶ : Category.{?u.80661, u_1} C\ninst✝⁵ : HasZeroMorphisms C\ninst✝⁴ : HasFiniteCoproducts C\ninst✝³ : HasCokernels C\ninst✝² : NormalEpiCategory C\nX Y Z : C\na : X ⟶ Y\nb : X ⟶ Z\ninst✝¹ : Epi a\ninst✝ : Epi b\nP : C\nf : P ⟶ X\nhfa : f ≫ a = 0\ni : IsColimit (CokernelCofork.ofπ a hfa)\nQ : C\ng : Q ⟶ X\nhgb : g ≫ b = 0\ni' : IsColimit (CokernelCofork.ofπ b hgb)\na' : (CokernelCofork.ofπ a hfa).pt ⟶ cokernel (coprod.desc f g)\nha' : Cofork.π (CokernelCofork.ofπ a hfa) ≫ a' = cokernel.π (coprod.desc f g)\nb' : (CokernelCofork.ofπ b hgb).pt ⟶ cokernel (coprod.desc f g)\nhb' : Cofork.π (CokernelCofork.ofπ b hgb) ≫ b' = cokernel.π (coprod.desc f g)\ns : PushoutCocone a b\n⊢ 0 ≫ PushoutCocone.inl s = coprod.inl ≫ 0\n[PROOFSTEP]\nrw [comp_zero, zero_comp]\n[GOAL]\nC : Type u_1\ninst✝⁶ : Category.{?u.80661, u_1} C\ninst✝⁵ : HasZeroMorphisms C\ninst✝⁴ : HasFiniteCoproducts C\ninst✝³ : HasCokernels C\ninst✝² : NormalEpiCategory C\nX Y Z : C\na : X ⟶ Y\nb : X ⟶ Z\ninst✝¹ : Epi a\ninst✝ : Epi b\nP : C\nf : P ⟶ X\nhfa : f ≫ a = 0\ni : IsColimit (CokernelCofork.ofπ a hfa)\nQ : C\ng : Q ⟶ X\nhgb : g ≫ b = 0\ni' : IsColimit (CokernelCofork.ofπ b hgb)\na' : (CokernelCofork.ofπ a hfa).pt ⟶ cokernel (coprod.desc f g)\nha' : Cofork.π (CokernelCofork.ofπ a hfa) ≫ a' = cokernel.π (coprod.desc f g)\nb' : (CokernelCofork.ofπ b hgb).pt ⟶ cokernel (coprod.desc f g)\nhb' : Cofork.π (CokernelCofork.ofπ b hgb) ≫ b' = cokernel.π (coprod.desc f g)\ns : PushoutCocone a b\n⊢ coprod.inr ≫ coprod.desc f g ≫ b ≫ PushoutCocone.inr s = g ≫ b ≫ PushoutCocone.inr s\n[PROOFSTEP]\nrw [coprod.inr_desc_assoc]\n[GOAL]\nC : Type u_1\ninst✝⁶ : Category.{?u.80661, u_1} C\ninst✝⁵ : HasZeroMorphisms C\ninst✝⁴ : HasFiniteCoproducts C\ninst✝³ : HasCokernels C\ninst✝² : NormalEpiCategory C\nX Y Z : C\na : X ⟶ Y\nb : X ⟶ Z\ninst✝¹ : Epi a\ninst✝ : Epi b\nP : C\nf : P ⟶ X\nhfa : f ≫ a = 0\ni : IsColimit (CokernelCofork.ofπ a hfa)\nQ : C\ng : Q ⟶ X\nhgb : g ≫ b = 0\ni' : IsColimit (CokernelCofork.ofπ b hgb)\na' : (CokernelCofork.ofπ a hfa).pt ⟶ cokernel (coprod.desc f g)\nha' : Cofork.π (CokernelCofork.ofπ a hfa) ≫ a' = cokernel.π (coprod.desc f g)\nb' : (CokernelCofork.ofπ b hgb).pt ⟶ cokernel (coprod.desc f g)\nhb' : Cofork.π (CokernelCofork.ofπ b hgb) ≫ b' = cokernel.π (coprod.desc f g)\ns : PushoutCocone a b\n⊢ g ≫ b ≫ PushoutCocone.inr s = 0 ≫ PushoutCocone.inr s\n[PROOFSTEP]\nrw [← Category.assoc, eq_whisker hgb]\n[GOAL]\nC : Type u_1\ninst✝⁶ : Category.{?u.80661, u_1} C\ninst✝⁵ : HasZeroMorphisms C\ninst✝⁴ : HasFiniteCoproducts C\ninst✝³ : HasCokernels C\ninst✝² : NormalEpiCategory C\nX Y Z : C\na : X ⟶ Y\nb : X ⟶ Z\ninst✝¹ : Epi a\ninst✝ : Epi b\nP : C\nf : P ⟶ X\nhfa : f ≫ a = 0\ni : IsColimit (CokernelCofork.ofπ a hfa)\nQ : C\ng : Q ⟶ X\nhgb : g ≫ b = 0\ni' : IsColimit (CokernelCofork.ofπ b hgb)\na' : (CokernelCofork.ofπ a hfa).pt ⟶ cokernel (coprod.desc f g)\nha' : Cofork.π (CokernelCofork.ofπ a hfa) ≫ a' = cokernel.π (coprod.desc f g)\nb' : (CokernelCofork.ofπ b hgb).pt ⟶ cokernel (coprod.desc f g)\nhb' : Cofork.π (CokernelCofork.ofπ b hgb) ≫ b' = cokernel.π (coprod.desc f g)\ns : PushoutCocone a b\n⊢ 0 ≫ PushoutCocone.inr s = coprod.inr ≫ 0\n[PROOFSTEP]\nrw [comp_zero, zero_comp]\n[GOAL]\nC : Type u_1\ninst✝⁶ : Category.{?u.80661, u_1} C\ninst✝⁵ : HasZeroMorphisms C\ninst✝⁴ : HasFiniteCoproducts C\ninst✝³ : HasCokernels C\ninst✝² : NormalEpiCategory C\nX Y Z : C\na : X ⟶ Y\nb : X ⟶ Z\ninst✝¹ : Epi a\ninst✝ : Epi b\nP : C\nf : P ⟶ X\nhfa : f ≫ a = 0\ni : IsColimit (CokernelCofork.ofπ a hfa)\nQ : C\ng : Q ⟶ X\nhgb : g ≫ b = 0\ni' : IsColimit (CokernelCofork.ofπ b hgb)\na' : (CokernelCofork.ofπ a hfa).pt ⟶ cokernel (coprod.desc f g)\nha' : Cofork.π (CokernelCofork.ofπ a hfa) ≫ a' = cokernel.π (coprod.desc f g)\nb' : (CokernelCofork.ofπ b hgb).pt ⟶ cokernel (coprod.desc f g)\nhb' : Cofork.π (CokernelCofork.ofπ b hgb) ≫ b' = cokernel.π (coprod.desc f g)\ns : PushoutCocone a b\n⊢ a ≫\n      a' ≫\n        (fun s =>\n            cokernel.desc (coprod.desc f g) (b ≫ PushoutCocone.inr s)\n              (_ : coprod.desc f g ≫ b ≫ PushoutCocone.inr s = 0))\n          s =\n    a ≫ PushoutCocone.inl s\n[PROOFSTEP]\nrw [CokernelCofork.π_ofπ] at ha' \n[GOAL]\nC : Type u_1\ninst✝⁶ : Category.{?u.80661, u_1} C\ninst✝⁵ : HasZeroMorphisms C\ninst✝⁴ : HasFiniteCoproducts C\ninst✝³ : HasCokernels C\ninst✝² : NormalEpiCategory C\nX Y Z : C\na : X ⟶ Y\nb : X ⟶ Z\ninst✝¹ : Epi a\ninst✝ : Epi b\nP : C\nf : P ⟶ X\nhfa : f ≫ a = 0\ni : IsColimit (CokernelCofork.ofπ a hfa)\nQ : C\ng : Q ⟶ X\nhgb : g ≫ b = 0\ni' : IsColimit (CokernelCofork.ofπ b hgb)\na' : (CokernelCofork.ofπ a hfa).pt ⟶ cokernel (coprod.desc f g)\nha' : a ≫ a' = cokernel.π (coprod.desc f g)\nb' : (CokernelCofork.ofπ b hgb).pt ⟶ cokernel (coprod.desc f g)\nhb' : Cofork.π (CokernelCofork.ofπ b hgb) ≫ b' = cokernel.π (coprod.desc f g)\ns : PushoutCocone a b\n⊢ a ≫\n      a' ≫\n        (fun s =>\n            cokernel.desc (coprod.desc f g) (b ≫ PushoutCocone.inr s)\n              (_ : coprod.desc f g ≫ b ≫ PushoutCocone.inr s = 0))\n          s =\n    a ≫ PushoutCocone.inl s\n[PROOFSTEP]\nhave reassoced {W : C} (h : cokernel (coprod.desc f g) ⟶ W) : a ≫ a' ≫ h = cokernel.π (coprod.desc f g) ≫ h := by\n  rw [← Category.assoc, eq_whisker ha']\n[GOAL]\nC : Type u_1\ninst✝⁶ : Category.{?u.80661, u_1} C\ninst✝⁵ : HasZeroMorphisms C\ninst✝⁴ : HasFiniteCoproducts C\ninst✝³ : HasCokernels C\ninst✝² : NormalEpiCategory C\nX Y Z : C\na : X ⟶ Y\nb : X ⟶ Z\ninst✝¹ : Epi a\ninst✝ : Epi b\nP : C\nf : P ⟶ X\nhfa : f ≫ a = 0\ni : IsColimit (CokernelCofork.ofπ a hfa)\nQ : C\ng : Q ⟶ X\nhgb : g ≫ b = 0\ni' : IsColimit (CokernelCofork.ofπ b hgb)\na' : (CokernelCofork.ofπ a hfa).pt ⟶ cokernel (coprod.desc f g)\nha' : a ≫ a' = cokernel.π (coprod.desc f g)\nb' : (CokernelCofork.ofπ b hgb).pt ⟶ cokernel (coprod.desc f g)\nhb' : Cofork.π (CokernelCofork.ofπ b hgb) ≫ b' = cokernel.π (coprod.desc f g)\ns : PushoutCocone a b\nW : C\nh : cokernel (coprod.desc f g) ⟶ W\n⊢ a ≫ a' ≫ h = cokernel.π (coprod.desc f g) ≫ h\n[PROOFSTEP]\nrw [← Category.assoc, eq_whisker ha']\n[GOAL]\nC : Type u_1\ninst✝⁶ : Category.{?u.80661, u_1} C\ninst✝⁵ : HasZeroMorphisms C\ninst✝⁴ : HasFiniteCoproducts C\ninst✝³ : HasCokernels C\ninst✝² : NormalEpiCategory C\nX Y Z : C\na : X ⟶ Y\nb : X ⟶ Z\ninst✝¹ : Epi a\ninst✝ : Epi b\nP : C\nf : P ⟶ X\nhfa : f ≫ a = 0\ni : IsColimit (CokernelCofork.ofπ a hfa)\nQ : C\ng : Q ⟶ X\nhgb : g ≫ b = 0\ni' : IsColimit (CokernelCofork.ofπ b hgb)\na' : (CokernelCofork.ofπ a hfa).pt ⟶ cokernel (coprod.desc f g)\nha' : a ≫ a' = cokernel.π (coprod.desc f g)\nb' : (CokernelCofork.ofπ b hgb).pt ⟶ cokernel (coprod.desc f g)\nhb' : Cofork.π (CokernelCofork.ofπ b hgb) ≫ b' = cokernel.π (coprod.desc f g)\ns : PushoutCocone a b\nreassoced : ∀ {W : C} (h : cokernel (coprod.desc f g) ⟶ W), a ≫ a' ≫ h = cokernel.π (coprod.desc f g) ≫ h\n⊢ a ≫\n      a' ≫\n        (fun s =>\n            cokernel.desc (coprod.desc f g) (b ≫ PushoutCocone.inr s)\n              (_ : coprod.desc f g ≫ b ≫ PushoutCocone.inr s = 0))\n          s =\n    a ≫ PushoutCocone.inl s\n[PROOFSTEP]\nsimp [reassoced, PushoutCocone.condition s]\n[GOAL]\nC : Type u_1\ninst✝⁶ : Category.{?u.80661, u_1} C\ninst✝⁵ : HasZeroMorphisms C\ninst✝⁴ : HasFiniteCoproducts C\ninst✝³ : HasCokernels C\ninst✝² : NormalEpiCategory C\nX Y Z : C\na : X ⟶ Y\nb : X ⟶ Z\ninst✝¹ : Epi a\ninst✝ : Epi b\nP : C\nf : P ⟶ X\nhfa : f ≫ a = 0\ni : IsColimit (CokernelCofork.ofπ a hfa)\nQ : C\ng : Q ⟶ X\nhgb : g ≫ b = 0\ni' : IsColimit (CokernelCofork.ofπ b hgb)\na' : (CokernelCofork.ofπ a hfa).pt ⟶ cokernel (coprod.desc f g)\nha' : Cofork.π (CokernelCofork.ofπ a hfa) ≫ a' = cokernel.π (coprod.desc f g)\nb' : (CokernelCofork.ofπ b hgb).pt ⟶ cokernel (coprod.desc f g)\nhb' : Cofork.π (CokernelCofork.ofπ b hgb) ≫ b' = cokernel.π (coprod.desc f g)\ns : PushoutCocone a b\n⊢ b ≫\n      b' ≫\n        (fun s =>\n            cokernel.desc (coprod.desc f g) (b ≫ PushoutCocone.inr s)\n              (_ : coprod.desc f g ≫ b ≫ PushoutCocone.inr s = 0))\n          s =\n    b ≫ PushoutCocone.inr s\n[PROOFSTEP]\nrw [CokernelCofork.π_ofπ] at hb' \n[GOAL]\nC : Type u_1\ninst✝⁶ : Category.{?u.80661, u_1} C\ninst✝⁵ : HasZeroMorphisms C\ninst✝⁴ : HasFiniteCoproducts C\ninst✝³ : HasCokernels C\ninst✝² : NormalEpiCategory C\nX Y Z : C\na : X ⟶ Y\nb : X ⟶ Z\ninst✝¹ : Epi a\ninst✝ : Epi b\nP : C\nf : P ⟶ X\nhfa : f ≫ a = 0\ni : IsColimit (CokernelCofork.ofπ a hfa)\nQ : C\ng : Q ⟶ X\nhgb : g ≫ b = 0\ni' : IsColimit (CokernelCofork.ofπ b hgb)\na' : (CokernelCofork.ofπ a hfa).pt ⟶ cokernel (coprod.desc f g)\nha' : Cofork.π (CokernelCofork.ofπ a hfa) ≫ a' = cokernel.π (coprod.desc f g)\nb' : (CokernelCofork.ofπ b hgb).pt ⟶ cokernel (coprod.desc f g)\nhb' : b ≫ b' = cokernel.π (coprod.desc f g)\ns : PushoutCocone a b\n⊢ b ≫\n      b' ≫\n        (fun s =>\n            cokernel.desc (coprod.desc f g) (b ≫ PushoutCocone.inr s)\n              (_ : coprod.desc f g ≫ b ≫ PushoutCocone.inr s = 0))\n          s =\n    b ≫ PushoutCocone.inr s\n[PROOFSTEP]\nhave reassoced' {W : C} (h : cokernel (coprod.desc f g) ⟶ W) : b ≫ b' ≫ h = cokernel.π (coprod.desc f g) ≫ h := by\n  rw [← Category.assoc, eq_whisker hb']\n[GOAL]\nC : Type u_1\ninst✝⁶ : Category.{?u.80661, u_1} C\ninst✝⁵ : HasZeroMorphisms C\ninst✝⁴ : HasFiniteCoproducts C\ninst✝³ : HasCokernels C\ninst✝² : NormalEpiCategory C\nX Y Z : C\na : X ⟶ Y\nb : X ⟶ Z\ninst✝¹ : Epi a\ninst✝ : Epi b\nP : C\nf : P ⟶ X\nhfa : f ≫ a = 0\ni : IsColimit (CokernelCofork.ofπ a hfa)\nQ : C\ng : Q ⟶ X\nhgb : g ≫ b = 0\ni' : IsColimit (CokernelCofork.ofπ b hgb)\na' : (CokernelCofork.ofπ a hfa).pt ⟶ cokernel (coprod.desc f g)\nha' : Cofork.π (CokernelCofork.ofπ a hfa) ≫ a' = cokernel.π (coprod.desc f g)\nb' : (CokernelCofork.ofπ b hgb).pt ⟶ cokernel (coprod.desc f g)\nhb' : b ≫ b' = cokernel.π (coprod.desc f g)\ns : PushoutCocone a b\nW : C\nh : cokernel (coprod.desc f g) ⟶ W\n⊢ b ≫ b' ≫ h = cokernel.π (coprod.desc f g) ≫ h\n[PROOFSTEP]\nrw [← Category.assoc, eq_whisker hb']\n[GOAL]\nC : Type u_1\ninst✝⁶ : Category.{?u.80661, u_1} C\ninst✝⁵ : HasZeroMorphisms C\ninst✝⁴ : HasFiniteCoproducts C\ninst✝³ : HasCokernels C\ninst✝² : NormalEpiCategory C\nX Y Z : C\na : X ⟶ Y\nb : X ⟶ Z\ninst✝¹ : Epi a\ninst✝ : Epi b\nP : C\nf : P ⟶ X\nhfa : f ≫ a = 0\ni : IsColimit (CokernelCofork.ofπ a hfa)\nQ : C\ng : Q ⟶ X\nhgb : g ≫ b = 0\ni' : IsColimit (CokernelCofork.ofπ b hgb)\na' : (CokernelCofork.ofπ a hfa).pt ⟶ cokernel (coprod.desc f g)\nha' : Cofork.π (CokernelCofork.ofπ a hfa) ≫ a' = cokernel.π (coprod.desc f g)\nb' : (CokernelCofork.ofπ b hgb).pt ⟶ cokernel (coprod.desc f g)\nhb' : b ≫ b' = cokernel.π (coprod.desc f g)\ns : PushoutCocone a b\nreassoced' : ∀ {W : C} (h : cokernel (coprod.desc f g) ⟶ W), b ≫ b' ≫ h = cokernel.π (coprod.desc f g) ≫ h\n⊢ b ≫\n      b' ≫\n        (fun s =>\n            cokernel.desc (coprod.desc f g) (b ≫ PushoutCocone.inr s)\n              (_ : coprod.desc f g ≫ b ≫ PushoutCocone.inr s = 0))\n          s =\n    b ≫ PushoutCocone.inr s\n[PROOFSTEP]\nsimp [reassoced']\n[GOAL]\nC : Type u_1\ninst✝⁶ : Category.{?u.80661, u_1} C\ninst✝⁵ : HasZeroMorphisms C\ninst✝⁴ : HasFiniteCoproducts C\ninst✝³ : HasCokernels C\ninst✝² : NormalEpiCategory C\nX Y Z : C\na : X ⟶ Y\nb : X ⟶ Z\ninst✝¹ : Epi a\ninst✝ : Epi b\nP : C\nf : P ⟶ X\nhfa : f ≫ a = 0\ni : IsColimit (CokernelCofork.ofπ a hfa)\nQ : C\ng : Q ⟶ X\nhgb : g ≫ b = 0\ni' : IsColimit (CokernelCofork.ofπ b hgb)\na' : (CokernelCofork.ofπ a hfa).pt ⟶ cokernel (coprod.desc f g)\nha' : Cofork.π (CokernelCofork.ofπ a hfa) ≫ a' = cokernel.π (coprod.desc f g)\nb' : (CokernelCofork.ofπ b hgb).pt ⟶ cokernel (coprod.desc f g)\nhb' : Cofork.π (CokernelCofork.ofπ b hgb) ≫ b' = cokernel.π (coprod.desc f g)\ns : PushoutCocone a b\nm : cokernel (coprod.desc f g) ⟶ s.pt\nh₁ : a' ≫ m = PushoutCocone.inl s\nx✝ : b' ≫ m = PushoutCocone.inr s\n⊢ cokernel.π (coprod.desc f g) ≫ m = (a ≫ a') ≫ m\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_a\nC : Type u_1\ninst✝⁶ : Category.{?u.80661, u_1} C\ninst✝⁵ : HasZeroMorphisms C\ninst✝⁴ : HasFiniteCoproducts C\ninst✝³ : HasCokernels C\ninst✝² : NormalEpiCategory C\nX Y Z : C\na : X ⟶ Y\nb : X ⟶ Z\ninst✝¹ : Epi a\ninst✝ : Epi b\nP : C\nf : P ⟶ X\nhfa : f ≫ a = 0\ni : IsColimit (CokernelCofork.ofπ a hfa)\nQ : C\ng : Q ⟶ X\nhgb : g ≫ b = 0\ni' : IsColimit (CokernelCofork.ofπ b hgb)\na' : (CokernelCofork.ofπ a hfa).pt ⟶ cokernel (coprod.desc f g)\nha' : Cofork.π (CokernelCofork.ofπ a hfa) ≫ a' = cokernel.π (coprod.desc f g)\nb' : (CokernelCofork.ofπ b hgb).pt ⟶ cokernel (coprod.desc f g)\nhb' : Cofork.π (CokernelCofork.ofπ b hgb) ≫ b' = cokernel.π (coprod.desc f g)\ns : PushoutCocone a b\nm : cokernel (coprod.desc f g) ⟶ s.pt\nh₁ : a' ≫ m = PushoutCocone.inl s\nx✝ : b' ≫ m = PushoutCocone.inr s\n⊢ cokernel.π (coprod.desc f g) = a ≫ a'\n[PROOFSTEP]\nexact ha'.symm\n[GOAL]\nC : Type u_1\ninst✝⁶ : Category.{?u.80661, u_1} C\ninst✝⁵ : HasZeroMorphisms C\ninst✝⁴ : HasFiniteCoproducts C\ninst✝³ : HasCokernels C\ninst✝² : NormalEpiCategory C\nX Y Z : C\na : X ⟶ Y\nb : X ⟶ Z\ninst✝¹ : Epi a\ninst✝ : Epi b\nP : C\nf : P ⟶ X\nhfa : f ≫ a = 0\ni : IsColimit (CokernelCofork.ofπ a hfa)\nQ : C\ng : Q ⟶ X\nhgb : g ≫ b = 0\ni' : IsColimit (CokernelCofork.ofπ b hgb)\na' : (CokernelCofork.ofπ a hfa).pt ⟶ cokernel (coprod.desc f g)\nha' : Cofork.π (CokernelCofork.ofπ a hfa) ≫ a' = cokernel.π (coprod.desc f g)\nb' : (CokernelCofork.ofπ b hgb).pt ⟶ cokernel (coprod.desc f g)\nhb' : Cofork.π (CokernelCofork.ofπ b hgb) ≫ b' = cokernel.π (coprod.desc f g)\ns : PushoutCocone a b\nm : cokernel (coprod.desc f g) ⟶ s.pt\nh₁ : a' ≫ m = PushoutCocone.inl s\nx✝ : b' ≫ m = PushoutCocone.inr s\n⊢ (a ≫ a') ≫ m = a ≫ PushoutCocone.inl s\n[PROOFSTEP]\nrw [Category.assoc, h₁]\n[GOAL]\nC : Type u_1\ninst✝⁶ : Category.{?u.80661, u_1} C\ninst✝⁵ : HasZeroMorphisms C\ninst✝⁴ : HasFiniteCoproducts C\ninst✝³ : HasCokernels C\ninst✝² : NormalEpiCategory C\nX Y Z : C\na : X ⟶ Y\nb : X ⟶ Z\ninst✝¹ : Epi a\ninst✝ : Epi b\nP : C\nf : P ⟶ X\nhfa : f ≫ a = 0\ni : IsColimit (CokernelCofork.ofπ a hfa)\nQ : C\ng : Q ⟶ X\nhgb : g ≫ b = 0\ni' : IsColimit (CokernelCofork.ofπ b hgb)\na' : (CokernelCofork.ofπ a hfa).pt ⟶ cokernel (coprod.desc f g)\nha' : Cofork.π (CokernelCofork.ofπ a hfa) ≫ a' = cokernel.π (coprod.desc f g)\nb' : (CokernelCofork.ofπ b hgb).pt ⟶ cokernel (coprod.desc f g)\nhb' : Cofork.π (CokernelCofork.ofπ b hgb) ≫ b' = cokernel.π (coprod.desc f g)\ns : PushoutCocone a b\nm : cokernel (coprod.desc f g) ⟶ s.pt\nh₁ : a' ≫ m = PushoutCocone.inl s\nx✝ : b' ≫ m = PushoutCocone.inr s\n⊢ b ≫ PushoutCocone.inr s =\n    cokernel.π (coprod.desc f g) ≫\n      cokernel.desc (coprod.desc f g) (b ≫ PushoutCocone.inr s) (_ : coprod.desc f g ≫ b ≫ PushoutCocone.inr s = 0)\n[PROOFSTEP]\nrw [cokernel.π_desc]\n[GOAL]\nC : Type u_1\ninst✝⁴ : Category.{?u.141722, u_1} C\ninst✝³ : HasZeroMorphisms C\ninst✝² : HasFiniteCoproducts C\ninst✝¹ : HasCokernels C\ninst✝ : NormalEpiCategory C\nX Y : C\nf g : X ⟶ Y\n⊢ 𝟙 Y ≫ pushout.inl = (coprod.inl ≫ coprod.desc (𝟙 Y) f) ≫ pushout.inl\n[PROOFSTEP]\nrw [coprod.inl_desc]\n[GOAL]\nC : Type u_1\ninst✝⁴ : Category.{?u.141722, u_1} C\ninst✝³ : HasZeroMorphisms C\ninst✝² : HasFiniteCoproducts C\ninst✝¹ : HasCokernels C\ninst✝ : NormalEpiCategory C\nX Y : C\nf g : X ⟶ Y\n⊢ (coprod.inl ≫ coprod.desc (𝟙 Y) f) ≫ pushout.inl = (coprod.inl ≫ coprod.desc (𝟙 Y) g) ≫ pushout.inr\n[PROOFSTEP]\nsimp only [Category.assoc, pushout.condition]\n[GOAL]\nC : Type u_1\ninst✝⁴ : Category.{?u.141722, u_1} C\ninst✝³ : HasZeroMorphisms C\ninst✝² : HasFiniteCoproducts C\ninst✝¹ : HasCokernels C\ninst✝ : NormalEpiCategory C\nX Y : C\nf g : X ⟶ Y\n⊢ (coprod.inl ≫ coprod.desc (𝟙 Y) g) ≫ pushout.inr = pushout.inr\n[PROOFSTEP]\nrw [coprod.inl_desc, Category.id_comp]\n[GOAL]\nC : Type u_1\ninst✝⁴ : Category.{?u.141722, u_1} C\ninst✝³ : HasZeroMorphisms C\ninst✝² : HasFiniteCoproducts C\ninst✝¹ : HasCokernels C\ninst✝ : NormalEpiCategory C\nX Y : C\nf g : X ⟶ Y\nhuv : pushout.inl = pushout.inr\n⊢ f ≫ pushout.inl = (coprod.inr ≫ coprod.desc (𝟙 Y) f) ≫ pushout.inl\n[PROOFSTEP]\nrw [coprod.inr_desc]\n[GOAL]\nC : Type u_1\ninst✝⁴ : Category.{?u.141722, u_1} C\ninst✝³ : HasZeroMorphisms C\ninst✝² : HasFiniteCoproducts C\ninst✝¹ : HasCokernels C\ninst✝ : NormalEpiCategory C\nX Y : C\nf g : X ⟶ Y\nhuv : pushout.inl = pushout.inr\n⊢ (coprod.inr ≫ coprod.desc (𝟙 Y) f) ≫ pushout.inl = (coprod.inr ≫ coprod.desc (𝟙 Y) g) ≫ pushout.inr\n[PROOFSTEP]\nsimp only [Category.assoc, pushout.condition]\n[GOAL]\nC : Type u_1\ninst✝⁴ : Category.{?u.141722, u_1} C\ninst✝³ : HasZeroMorphisms C\ninst✝² : HasFiniteCoproducts C\ninst✝¹ : HasCokernels C\ninst✝ : NormalEpiCategory C\nX Y : C\nf g : X ⟶ Y\nhuv : pushout.inl = pushout.inr\n⊢ (coprod.inr ≫ coprod.desc (𝟙 Y) g) ≫ pushout.inr = g ≫ pushout.inr\n[PROOFSTEP]\nrw [coprod.inr_desc]\n[GOAL]\nC : Type u_1\ninst✝⁴ : Category.{?u.141722, u_1} C\ninst✝³ : HasZeroMorphisms C\ninst✝² : HasFiniteCoproducts C\ninst✝¹ : HasCokernels C\ninst✝ : NormalEpiCategory C\nX Y : C\nf g : X ⟶ Y\nhuv : pushout.inl = pushout.inr\nhvu : f ≫ pushout.inl = g ≫ pushout.inr\n⊢ f ≫ pushout.inl = g ≫ pushout.inl\n[PROOFSTEP]\nrw [hvu, huv]\n[GOAL]\nC : Type u_1\ninst✝⁴ : Category.{?u.141722, u_1} C\ninst✝³ : HasZeroMorphisms C\ninst✝² : HasFiniteCoproducts C\ninst✝¹ : HasCokernels C\ninst✝ : NormalEpiCategory C\nX Y : C\nf g : X ⟶ Y\nhuv : pushout.inl = pushout.inr\nhvu : f ≫ pushout.inl = g ≫ pushout.inr\nhuu : f ≫ pushout.inl = g ≫ pushout.inl\ns : Cofork f g\n⊢ coprod.inl ≫ coprod.desc (𝟙 Y) f ≫ Cofork.π s = coprod.inl ≫ coprod.desc (𝟙 Y) g ≫ Cofork.π s\n[PROOFSTEP]\nsimp only [coprod.inl_desc_assoc]\n[GOAL]\nC : Type u_1\ninst✝⁴ : Category.{?u.141722, u_1} C\ninst✝³ : HasZeroMorphisms C\ninst✝² : HasFiniteCoproducts C\ninst✝¹ : HasCokernels C\ninst✝ : NormalEpiCategory C\nX Y : C\nf g : X ⟶ Y\nhuv : pushout.inl = pushout.inr\nhvu : f ≫ pushout.inl = g ≫ pushout.inr\nhuu : f ≫ pushout.inl = g ≫ pushout.inl\ns : Cofork f g\n⊢ coprod.inr ≫ coprod.desc (𝟙 Y) f ≫ Cofork.π s = coprod.inr ≫ coprod.desc (𝟙 Y) g ≫ Cofork.π s\n[PROOFSTEP]\nsimp only [coprod.desc_comp, Cofork.condition s]\n[GOAL]\nC : Type u_1\ninst✝⁴ : Category.{?u.141722, u_1} C\ninst✝³ : HasZeroMorphisms C\ninst✝² : HasFiniteCoproducts C\ninst✝¹ : HasCokernels C\ninst✝ : NormalEpiCategory C\nX Y : C\nf g : X ⟶ Y\nhuv : pushout.inl = pushout.inr\nhvu : f ≫ pushout.inl = g ≫ pushout.inr\nhuu : f ≫ pushout.inl = g ≫ pushout.inl\ns : Cofork f g\n⊢ Cofork.π (Cofork.ofπ pushout.inl huu) ≫\n      (fun s =>\n          pushout.desc (Cofork.π s) (Cofork.π s)\n            (_ : coprod.desc (𝟙 Y) f ≫ Cofork.π s = coprod.desc (𝟙 Y) g ≫ Cofork.π s))\n        s =\n    Cofork.π s\n[PROOFSTEP]\nsimp only [pushout.inl_desc, Cofork.π_ofπ]\n[GOAL]\nC : Type u_1\ninst✝⁴ : Category.{?u.141722, u_1} C\ninst✝³ : HasZeroMorphisms C\ninst✝² : HasFiniteCoproducts C\ninst✝¹ : HasCokernels C\ninst✝ : NormalEpiCategory C\nX Y : C\nf g : X ⟶ Y\nhuv : pushout.inl = pushout.inr\nhvu : f ≫ pushout.inl = g ≫ pushout.inr\nhuu : f ≫ pushout.inl = g ≫ pushout.inl\ns : Cofork f g\nm : (Cofork.ofπ pushout.inl huu).pt ⟶ s.pt\nh : Cofork.π (Cofork.ofπ pushout.inl huu) ≫ m = Cofork.π s\n⊢ pushout.inl ≫ m =\n    pushout.inl ≫\n      (fun s =>\n          pushout.desc (Cofork.π s) (Cofork.π s)\n            (_ : coprod.desc (𝟙 Y) f ≫ Cofork.π s = coprod.desc (𝟙 Y) g ≫ Cofork.π s))\n        s\n[PROOFSTEP]\nsimpa only [pushout.inl_desc] using h\n[GOAL]\nC : Type u_1\ninst✝⁴ : Category.{?u.141722, u_1} C\ninst✝³ : HasZeroMorphisms C\ninst✝² : HasFiniteCoproducts C\ninst✝¹ : HasCokernels C\ninst✝ : NormalEpiCategory C\nX Y : C\nf g : X ⟶ Y\nhuv : pushout.inl = pushout.inr\nhvu : f ≫ pushout.inl = g ≫ pushout.inr\nhuu : f ≫ pushout.inl = g ≫ pushout.inl\ns : Cofork f g\nm : (Cofork.ofπ pushout.inl huu).pt ⟶ s.pt\nh : Cofork.π (Cofork.ofπ pushout.inl huu) ≫ m = Cofork.π s\n⊢ pushout.inr ≫ m =\n    pushout.inr ≫\n      (fun s =>\n          pushout.desc (Cofork.π s) (Cofork.π s)\n            (_ : coprod.desc (𝟙 Y) f ≫ Cofork.π s = coprod.desc (𝟙 Y) g ≫ Cofork.π s))\n        s\n[PROOFSTEP]\nsimpa only [huv.symm, pushout.inl_desc] using h\n[GOAL]\nC : Type u_1\ninst✝⁴ : Category.{?u.173668, u_1} C\ninst✝³ : HasZeroMorphisms C\ninst✝² : HasFiniteCoproducts C\ninst✝¹ : HasCokernels C\ninst✝ : NormalEpiCategory C\nX Y : C\nf : X ⟶ Y\nZ : C\n⊢ 0 ≫ f = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u_1\ninst✝⁴ : Category.{u_2, u_1} C\ninst✝³ : HasZeroMorphisms C\ninst✝² : HasFiniteCoproducts C\ninst✝¹ : HasCokernels C\ninst✝ : NormalEpiCategory C\nX Y : C\nf : X ⟶ Y\nZ : C\nl : IsLimit (KernelFork.ofι 0 (_ : 0 ≫ f = 0))\nZ✝ : C\nu v : Z✝ ⟶ X\nhuv : u ≫ f = v ≫ f\n⊢ u = v\n[PROOFSTEP]\nobtain ⟨W, w, hw, hl⟩ := normalEpiOfEpi (coequalizer.π u v)\n[GOAL]\ncase mk\nC : Type u_1\ninst✝⁴ : Category.{u_2, u_1} C\ninst✝³ : HasZeroMorphisms C\ninst✝² : HasFiniteCoproducts C\ninst✝¹ : HasCokernels C\ninst✝ : NormalEpiCategory C\nX Y : C\nf : X ⟶ Y\nZ : C\nl : IsLimit (KernelFork.ofι 0 (_ : 0 ≫ f = 0))\nZ✝ : C\nu v : Z✝ ⟶ X\nhuv : u ≫ f = v ≫ f\nW : C\nw : W ⟶ X\nhw : w ≫ coequalizer.π u v = 0\nhl : IsColimit (CokernelCofork.ofπ (coequalizer.π u v) hw)\n⊢ u = v\n[PROOFSTEP]\nobtain ⟨m, hm⟩ := coequalizer.desc' f huv\n[GOAL]\ncase mk.mk\nC : Type u_1\ninst✝⁴ : Category.{u_2, u_1} C\ninst✝³ : HasZeroMorphisms C\ninst✝² : HasFiniteCoproducts C\ninst✝¹ : HasCokernels C\ninst✝ : NormalEpiCategory C\nX Y : C\nf : X ⟶ Y\nZ : C\nl : IsLimit (KernelFork.ofι 0 (_ : 0 ≫ f = 0))\nZ✝ : C\nu v : Z✝ ⟶ X\nhuv : u ≫ f = v ≫ f\nW : C\nw : W ⟶ X\nhw : w ≫ coequalizer.π u v = 0\nhl : IsColimit (CokernelCofork.ofπ (coequalizer.π u v) hw)\nm : coequalizer u v ⟶ Y\nhm : coequalizer.π u v ≫ m = f\n⊢ u = v\n[PROOFSTEP]\nhave reassoced {W : C} (h : coequalizer u v ⟶ W) : w ≫ coequalizer.π u v ≫ h = 0 ≫ h := by\n  rw [← Category.assoc, eq_whisker hw]\n[GOAL]\nC : Type u_1\ninst✝⁴ : Category.{u_2, u_1} C\ninst✝³ : HasZeroMorphisms C\ninst✝² : HasFiniteCoproducts C\ninst✝¹ : HasCokernels C\ninst✝ : NormalEpiCategory C\nX Y : C\nf : X ⟶ Y\nZ : C\nl : IsLimit (KernelFork.ofι 0 (_ : 0 ≫ f = 0))\nZ✝ : C\nu v : Z✝ ⟶ X\nhuv : u ≫ f = v ≫ f\nW✝ : C\nw : W✝ ⟶ X\nhw : w ≫ coequalizer.π u v = 0\nhl : IsColimit (CokernelCofork.ofπ (coequalizer.π u v) hw)\nm : coequalizer u v ⟶ Y\nhm : coequalizer.π u v ≫ m = f\nW : C\nh : coequalizer u v ⟶ W\n⊢ w ≫ coequalizer.π u v ≫ h = 0 ≫ h\n[PROOFSTEP]\nrw [← Category.assoc, eq_whisker hw]\n[GOAL]\ncase mk.mk\nC : Type u_1\ninst✝⁴ : Category.{u_2, u_1} C\ninst✝³ : HasZeroMorphisms C\ninst✝² : HasFiniteCoproducts C\ninst✝¹ : HasCokernels C\ninst✝ : NormalEpiCategory C\nX Y : C\nf : X ⟶ Y\nZ : C\nl : IsLimit (KernelFork.ofι 0 (_ : 0 ≫ f = 0))\nZ✝ : C\nu v : Z✝ ⟶ X\nhuv : u ≫ f = v ≫ f\nW : C\nw : W ⟶ X\nhw : w ≫ coequalizer.π u v = 0\nhl : IsColimit (CokernelCofork.ofπ (coequalizer.π u v) hw)\nm : coequalizer u v ⟶ Y\nhm : coequalizer.π u v ≫ m = f\nreassoced : ∀ {W_1 : C} (h : coequalizer u v ⟶ W_1), w ≫ coequalizer.π u v ≫ h = 0 ≫ h\n⊢ u = v\n[PROOFSTEP]\nhave hwf : w ≫ f = 0 := by rw [← hm, reassoced, zero_comp]\n[GOAL]\nC : Type u_1\ninst✝⁴ : Category.{u_2, u_1} C\ninst✝³ : HasZeroMorphisms C\ninst✝² : HasFiniteCoproducts C\ninst✝¹ : HasCokernels C\ninst✝ : NormalEpiCategory C\nX Y : C\nf : X ⟶ Y\nZ : C\nl : IsLimit (KernelFork.ofι 0 (_ : 0 ≫ f = 0))\nZ✝ : C\nu v : Z✝ ⟶ X\nhuv : u ≫ f = v ≫ f\nW : C\nw : W ⟶ X\nhw : w ≫ coequalizer.π u v = 0\nhl : IsColimit (CokernelCofork.ofπ (coequalizer.π u v) hw)\nm : coequalizer u v ⟶ Y\nhm : coequalizer.π u v ≫ m = f\nreassoced : ∀ {W_1 : C} (h : coequalizer u v ⟶ W_1), w ≫ coequalizer.π u v ≫ h = 0 ≫ h\n⊢ w ≫ f = 0\n[PROOFSTEP]\nrw [← hm, reassoced, zero_comp]\n[GOAL]\ncase mk.mk\nC : Type u_1\ninst✝⁴ : Category.{u_2, u_1} C\ninst✝³ : HasZeroMorphisms C\ninst✝² : HasFiniteCoproducts C\ninst✝¹ : HasCokernels C\ninst✝ : NormalEpiCategory C\nX Y : C\nf : X ⟶ Y\nZ : C\nl : IsLimit (KernelFork.ofι 0 (_ : 0 ≫ f = 0))\nZ✝ : C\nu v : Z✝ ⟶ X\nhuv : u ≫ f = v ≫ f\nW : C\nw : W ⟶ X\nhw : w ≫ coequalizer.π u v = 0\nhl : IsColimit (CokernelCofork.ofπ (coequalizer.π u v) hw)\nm : coequalizer u v ⟶ Y\nhm : coequalizer.π u v ≫ m = f\nreassoced : ∀ {W_1 : C} (h : coequalizer u v ⟶ W_1), w ≫ coequalizer.π u v ≫ h = 0 ≫ h\nhwf : w ≫ f = 0\n⊢ u = v\n[PROOFSTEP]\nobtain ⟨n, hn⟩ := KernelFork.IsLimit.lift' l _ hwf\n[GOAL]\ncase mk.mk.mk\nC : Type u_1\ninst✝⁴ : Category.{u_2, u_1} C\ninst✝³ : HasZeroMorphisms C\ninst✝² : HasFiniteCoproducts C\ninst✝¹ : HasCokernels C\ninst✝ : NormalEpiCategory C\nX Y : C\nf : X ⟶ Y\nZ : C\nl : IsLimit (KernelFork.ofι 0 (_ : 0 ≫ f = 0))\nZ✝ : C\nu v : Z✝ ⟶ X\nhuv : u ≫ f = v ≫ f\nW : C\nw : W ⟶ X\nhw : w ≫ coequalizer.π u v = 0\nhl : IsColimit (CokernelCofork.ofπ (coequalizer.π u v) hw)\nm : coequalizer u v ⟶ Y\nhm : coequalizer.π u v ≫ m = f\nreassoced : ∀ {W_1 : C} (h : coequalizer u v ⟶ W_1), w ≫ coequalizer.π u v ≫ h = 0 ≫ h\nhwf : w ≫ f = 0\nn : W ⟶ (KernelFork.ofι 0 (_ : 0 ≫ f = 0)).pt\nhn : n ≫ Fork.ι (KernelFork.ofι 0 (_ : 0 ≫ f = 0)) = w\n⊢ u = v\n[PROOFSTEP]\nrw [Fork.ι_ofι, HasZeroMorphisms.comp_zero] at hn \n[GOAL]\ncase mk.mk.mk\nC : Type u_1\ninst✝⁴ : Category.{u_2, u_1} C\ninst✝³ : HasZeroMorphisms C\ninst✝² : HasFiniteCoproducts C\ninst✝¹ : HasCokernels C\ninst✝ : NormalEpiCategory C\nX Y : C\nf : X ⟶ Y\nZ : C\nl : IsLimit (KernelFork.ofι 0 (_ : 0 ≫ f = 0))\nZ✝ : C\nu v : Z✝ ⟶ X\nhuv : u ≫ f = v ≫ f\nW : C\nw : W ⟶ X\nhw : w ≫ coequalizer.π u v = 0\nhl : IsColimit (CokernelCofork.ofπ (coequalizer.π u v) hw)\nm : coequalizer u v ⟶ Y\nhm : coequalizer.π u v ≫ m = f\nreassoced : ∀ {W_1 : C} (h : coequalizer u v ⟶ W_1), w ≫ coequalizer.π u v ≫ h = 0 ≫ h\nhwf : w ≫ f = 0\nn : W ⟶ (KernelFork.ofι 0 (_ : 0 ≫ f = 0)).pt\nhn : 0 = w\n⊢ u = v\n[PROOFSTEP]\nhave : IsIso (coequalizer.π u v) := by apply isIso_colimit_cocone_parallelPair_of_eq hn.symm hl\n[GOAL]\nC : Type u_1\ninst✝⁴ : Category.{u_2, u_1} C\ninst✝³ : HasZeroMorphisms C\ninst✝² : HasFiniteCoproducts C\ninst✝¹ : HasCokernels C\ninst✝ : NormalEpiCategory C\nX Y : C\nf : X ⟶ Y\nZ : C\nl : IsLimit (KernelFork.ofι 0 (_ : 0 ≫ f = 0))\nZ✝ : C\nu v : Z✝ ⟶ X\nhuv : u ≫ f = v ≫ f\nW : C\nw : W ⟶ X\nhw : w ≫ coequalizer.π u v = 0\nhl : IsColimit (CokernelCofork.ofπ (coequalizer.π u v) hw)\nm : coequalizer u v ⟶ Y\nhm : coequalizer.π u v ≫ m = f\nreassoced : ∀ {W_1 : C} (h : coequalizer u v ⟶ W_1), w ≫ coequalizer.π u v ≫ h = 0 ≫ h\nhwf : w ≫ f = 0\nn : W ⟶ (KernelFork.ofι 0 (_ : 0 ≫ f = 0)).pt\nhn : 0 = w\n⊢ IsIso (coequalizer.π u v)\n[PROOFSTEP]\napply isIso_colimit_cocone_parallelPair_of_eq hn.symm hl\n[GOAL]\ncase mk.mk.mk\nC : Type u_1\ninst✝⁴ : Category.{u_2, u_1} C\ninst✝³ : HasZeroMorphisms C\ninst✝² : HasFiniteCoproducts C\ninst✝¹ : HasCokernels C\ninst✝ : NormalEpiCategory C\nX Y : C\nf : X ⟶ Y\nZ : C\nl : IsLimit (KernelFork.ofι 0 (_ : 0 ≫ f = 0))\nZ✝ : C\nu v : Z✝ ⟶ X\nhuv : u ≫ f = v ≫ f\nW : C\nw : W ⟶ X\nhw : w ≫ coequalizer.π u v = 0\nhl : IsColimit (CokernelCofork.ofπ (coequalizer.π u v) hw)\nm : coequalizer u v ⟶ Y\nhm : coequalizer.π u v ≫ m = f\nreassoced : ∀ {W_1 : C} (h : coequalizer u v ⟶ W_1), w ≫ coequalizer.π u v ≫ h = 0 ≫ h\nhwf : w ≫ f = 0\nn : W ⟶ (KernelFork.ofι 0 (_ : 0 ≫ f = 0)).pt\nhn : 0 = w\nthis : IsIso (coequalizer.π u v)\n⊢ u = v\n[PROOFSTEP]\napply (cancel_mono (coequalizer.π u v)).1\n[GOAL]\ncase mk.mk.mk\nC : Type u_1\ninst✝⁴ : Category.{u_2, u_1} C\ninst✝³ : HasZeroMorphisms C\ninst✝² : HasFiniteCoproducts C\ninst✝¹ : HasCokernels C\ninst✝ : NormalEpiCategory C\nX Y : C\nf : X ⟶ Y\nZ : C\nl : IsLimit (KernelFork.ofι 0 (_ : 0 ≫ f = 0))\nZ✝ : C\nu v : Z✝ ⟶ X\nhuv : u ≫ f = v ≫ f\nW : C\nw : W ⟶ X\nhw : w ≫ coequalizer.π u v = 0\nhl : IsColimit (CokernelCofork.ofπ (coequalizer.π u v) hw)\nm : coequalizer u v ⟶ Y\nhm : coequalizer.π u v ≫ m = f\nreassoced : ∀ {W_1 : C} (h : coequalizer u v ⟶ W_1), w ≫ coequalizer.π u v ≫ h = 0 ≫ h\nhwf : w ≫ f = 0\nn : W ⟶ (KernelFork.ofι 0 (_ : 0 ≫ f = 0)).pt\nhn : 0 = w\nthis : IsIso (coequalizer.π u v)\n⊢ u ≫ coequalizer.π u v = v ≫ coequalizer.π u v\n[PROOFSTEP]\nexact coequalizer.condition _ _\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Limits.Shapes.NormalMono.Equalizers", "llama_tokens": 31475, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8267117769928211, "lm_q2_score": 0.6619228691808011, "lm_q1q2_score": 0.5472194314126467}}
{"text": "[GOAL]\nA : Type u_1\ninst✝⁵ : NormedRing A\ninst✝⁴ : NormedAlgebra ℂ A\ninst✝³ : StarRing A\ninst✝² : ContinuousStar A\ninst✝¹ : CompleteSpace A\ninst✝ : StarModule ℂ A\na b : { x // x ∈ selfAdjoint A }\nh : Commute ↑a ↑b\n⊢ expUnitary (a + b) = expUnitary a * expUnitary b\n[PROOFSTEP]\next\n[GOAL]\ncase a\nA : Type u_1\ninst✝⁵ : NormedRing A\ninst✝⁴ : NormedAlgebra ℂ A\ninst✝³ : StarRing A\ninst✝² : ContinuousStar A\ninst✝¹ : CompleteSpace A\ninst✝ : StarModule ℂ A\na b : { x // x ∈ selfAdjoint A }\nh : Commute ↑a ↑b\n⊢ ↑(expUnitary (a + b)) = ↑(expUnitary a * expUnitary b)\n[PROOFSTEP]\nhave hcomm : Commute (I • (a : A)) (I • (b : A)) :=\n  by\n  unfold Commute SemiconjBy\n  simp only [h.eq, Algebra.smul_mul_assoc, Algebra.mul_smul_comm]\n[GOAL]\nA : Type u_1\ninst✝⁵ : NormedRing A\ninst✝⁴ : NormedAlgebra ℂ A\ninst✝³ : StarRing A\ninst✝² : ContinuousStar A\ninst✝¹ : CompleteSpace A\ninst✝ : StarModule ℂ A\na b : { x // x ∈ selfAdjoint A }\nh : Commute ↑a ↑b\n⊢ Commute (I • ↑a) (I • ↑b)\n[PROOFSTEP]\nunfold Commute SemiconjBy\n[GOAL]\nA : Type u_1\ninst✝⁵ : NormedRing A\ninst✝⁴ : NormedAlgebra ℂ A\ninst✝³ : StarRing A\ninst✝² : ContinuousStar A\ninst✝¹ : CompleteSpace A\ninst✝ : StarModule ℂ A\na b : { x // x ∈ selfAdjoint A }\nh : Commute ↑a ↑b\n⊢ I • ↑a * I • ↑b = I • ↑b * I • ↑a\n[PROOFSTEP]\nsimp only [h.eq, Algebra.smul_mul_assoc, Algebra.mul_smul_comm]\n[GOAL]\ncase a\nA : Type u_1\ninst✝⁵ : NormedRing A\ninst✝⁴ : NormedAlgebra ℂ A\ninst✝³ : StarRing A\ninst✝² : ContinuousStar A\ninst✝¹ : CompleteSpace A\ninst✝ : StarModule ℂ A\na b : { x // x ∈ selfAdjoint A }\nh : Commute ↑a ↑b\nhcomm : Commute (I • ↑a) (I • ↑b)\n⊢ ↑(expUnitary (a + b)) = ↑(expUnitary a * expUnitary b)\n[PROOFSTEP]\nsimpa only [expUnitary_coe, AddSubgroup.coe_add, smul_add] using exp_add_of_commute hcomm\n[GOAL]\nA : Type u_1\ninst✝⁵ : NormedRing A\ninst✝⁴ : NormedAlgebra ℂ A\ninst✝³ : StarRing A\ninst✝² : ContinuousStar A\ninst✝¹ : CompleteSpace A\ninst✝ : StarModule ℂ A\na b : { x // x ∈ selfAdjoint A }\nh : Commute ↑a ↑b\n⊢ selfAdjoint.expUnitary a * selfAdjoint.expUnitary b = selfAdjoint.expUnitary b * selfAdjoint.expUnitary a\n[PROOFSTEP]\nrw [← h.expUnitary_add, ← h.symm.expUnitary_add, add_comm]\n", "meta": {"mathlib_filename": "Mathlib.Analysis.NormedSpace.Star.Exponential", "llama_tokens": 1040, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8221891218080991, "lm_q2_score": 0.6654105521116443, "lm_q1q2_score": 0.5470933174825152}}
{"text": "[GOAL]\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nf g : { x // x ∈ lp G 2 }\n⊢ Summable fun i => inner (↑f i) (↑g i)\n[PROOFSTEP]\nrefine' summable_of_norm_bounded (fun i => ‖f i‖ * ‖g i‖) (lp.summable_mul _ f g) _\n[GOAL]\ncase refine'_1\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nf g : { x // x ∈ lp G 2 }\n⊢ Real.IsConjugateExponent (ENNReal.toReal 2) (ENNReal.toReal 2)\n[PROOFSTEP]\nrw [Real.isConjugateExponent_iff]\n[GOAL]\ncase refine'_1\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nf g : { x // x ∈ lp G 2 }\n⊢ ENNReal.toReal 2 = ENNReal.toReal 2 / (ENNReal.toReal 2 - 1)\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase refine'_1\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nf g : { x // x ∈ lp G 2 }\n⊢ 1 < ENNReal.toReal 2\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase refine'_2\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nf g : { x // x ∈ lp G 2 }\n⊢ ∀ (i : ι), ‖inner (↑f i) (↑g i)‖ ≤ (fun i => ‖↑f i‖ * ‖↑g i‖) i\n[PROOFSTEP]\nintro i\n[GOAL]\ncase refine'_2\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nf g : { x // x ∈ lp G 2 }\ni : ι\n⊢ ‖inner (↑f i) (↑g i)‖ ≤ (fun i => ‖↑f i‖ * ‖↑g i‖) i\n[PROOFSTEP]\nexact norm_inner_le_norm (𝕜 := 𝕜) _ _\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nsrc✝ : NormedAddCommGroup { x // x ∈ lp G 2 } := normedAddCommGroup\nf : { x // x ∈ lp G 2 }\n⊢ ‖f‖ ^ 2 = ↑re (inner f f)\n[PROOFSTEP]\ncalc\n  ‖f‖ ^ 2 = ‖f‖ ^ (2 : ℝ≥0∞).toReal := by norm_cast\n  _ = ∑' i, ‖f i‖ ^ (2 : ℝ≥0∞).toReal := (lp.norm_rpow_eq_tsum ?_ f)\n  _ = ∑' i, ‖f i‖ ^ (2 : ℕ) := by norm_cast\n  _ = ∑' i, re ⟪f i, f i⟫ := by\n    congr\n    funext i\n    rw [norm_sq_eq_inner (𝕜 := 𝕜)]\n      -- porting note: `simp` couldn't do this anymore\n  _ = re (∑' i, ⟪f i, f i⟫) := (IsROrC.reClm.map_tsum ?_).symm\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nsrc✝ : NormedAddCommGroup { x // x ∈ lp G 2 } := normedAddCommGroup\nf : { x // x ∈ lp G 2 }\n⊢ ‖f‖ ^ 2 = ‖f‖ ^ ENNReal.toReal 2\n[PROOFSTEP]\nnorm_cast\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nsrc✝ : NormedAddCommGroup { x // x ∈ lp G 2 } := normedAddCommGroup\nf : { x // x ∈ lp G 2 }\n⊢ ∑' (i : ι), ‖↑f i‖ ^ ENNReal.toReal 2 = ∑' (i : ι), ‖↑f i‖ ^ 2\n[PROOFSTEP]\nnorm_cast\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nsrc✝ : NormedAddCommGroup { x // x ∈ lp G 2 } := normedAddCommGroup\nf : { x // x ∈ lp G 2 }\n⊢ ∑' (i : ι), ‖↑f i‖ ^ 2 = ∑' (i : ι), ↑re (inner (↑f i) (↑f i))\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_f\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nsrc✝ : NormedAddCommGroup { x // x ∈ lp G 2 } := normedAddCommGroup\nf : { x // x ∈ lp G 2 }\n⊢ (fun i => ‖↑f i‖ ^ 2) = fun i => ↑re (inner (↑f i) (↑f i))\n[PROOFSTEP]\nfunext i\n[GOAL]\ncase e_f.h\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nsrc✝ : NormedAddCommGroup { x // x ∈ lp G 2 } := normedAddCommGroup\nf : { x // x ∈ lp G 2 }\ni : ι\n⊢ ‖↑f i‖ ^ 2 = ↑re (inner (↑f i) (↑f i))\n[PROOFSTEP]\nrw [norm_sq_eq_inner (𝕜 := 𝕜)]\n  -- porting note: `simp` couldn't do this anymore\n[GOAL]\ncase calc_1\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nsrc✝ : NormedAddCommGroup { x // x ∈ lp G 2 } := normedAddCommGroup\nf : { x // x ∈ lp G 2 }\n⊢ 0 < ENNReal.toReal 2\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase calc_2\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nsrc✝ : NormedAddCommGroup { x // x ∈ lp G 2 } := normedAddCommGroup\nf : { x // x ∈ lp G 2 }\n⊢ Summable fun i => inner (↑f i) (↑f i)\n[PROOFSTEP]\nexact summable_inner f f\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nsrc✝ : NormedAddCommGroup { x // x ∈ lp G 2 } := normedAddCommGroup\nf g : { x // x ∈ lp G 2 }\n⊢ ↑(starRingEnd 𝕜) (inner g f) = inner f g\n[PROOFSTEP]\ncalc\n  conj _ = conj (∑' i, ⟪g i, f i⟫) := by congr\n  _ = ∑' i, conj ⟪g i, f i⟫ := IsROrC.conjCle.map_tsum\n  _ = ∑' i, ⟪f i, g i⟫ := by simp only [inner_conj_symm]\n  _ = _ := by congr\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nsrc✝ : NormedAddCommGroup { x // x ∈ lp G 2 } := normedAddCommGroup\nf g : { x // x ∈ lp G 2 }\n⊢ ↑(starRingEnd 𝕜) (inner g f) = ↑(starRingEnd 𝕜) (∑' (i : ι), inner (↑g i) (↑f i))\n[PROOFSTEP]\ncongr\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nsrc✝ : NormedAddCommGroup { x // x ∈ lp G 2 } := normedAddCommGroup\nf g : { x // x ∈ lp G 2 }\n⊢ ∑' (i : ι), ↑(starRingEnd 𝕜) (inner (↑g i) (↑f i)) = ∑' (i : ι), inner (↑f i) (↑g i)\n[PROOFSTEP]\nsimp only [inner_conj_symm]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nsrc✝ : NormedAddCommGroup { x // x ∈ lp G 2 } := normedAddCommGroup\nf g : { x // x ∈ lp G 2 }\n⊢ ∑' (i : ι), inner (↑f i) (↑g i) = inner f g\n[PROOFSTEP]\ncongr\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nsrc✝ : NormedAddCommGroup { x // x ∈ lp G 2 } := normedAddCommGroup\nf₁ f₂ g : { x // x ∈ lp G 2 }\n⊢ inner (f₁ + f₂) g = inner f₁ g + inner f₂ g\n[PROOFSTEP]\ncalc\n  _ = ∑' i, ⟪(f₁ + f₂) i, g i⟫ := ?_\n  _ = ∑' i, (⟪f₁ i, g i⟫ + ⟪f₂ i, g i⟫) := by simp only [inner_add_left, Pi.add_apply, coeFn_add]\n  _ = (∑' i, ⟪f₁ i, g i⟫) + ∑' i, ⟪f₂ i, g i⟫ := (tsum_add ?_ ?_)\n  _ = _ := by congr\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nsrc✝ : NormedAddCommGroup { x // x ∈ lp G 2 } := normedAddCommGroup\nf₁ f₂ g : { x // x ∈ lp G 2 }\n⊢ ∑' (i : ι), inner (↑(f₁ + f₂) i) (↑g i) = ∑' (i : ι), (inner (↑f₁ i) (↑g i) + inner (↑f₂ i) (↑g i))\n[PROOFSTEP]\nsimp only [inner_add_left, Pi.add_apply, coeFn_add]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nsrc✝ : NormedAddCommGroup { x // x ∈ lp G 2 } := normedAddCommGroup\nf₁ f₂ g : { x // x ∈ lp G 2 }\n⊢ ∑' (i : ι), inner (↑f₁ i) (↑g i) + ∑' (i : ι), inner (↑f₂ i) (↑g i) = inner f₁ g + inner f₂ g\n[PROOFSTEP]\ncongr\n[GOAL]\ncase calc_1\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nsrc✝ : NormedAddCommGroup { x // x ∈ lp G 2 } := normedAddCommGroup\nf₁ f₂ g : { x // x ∈ lp G 2 }\n⊢ inner (f₁ + f₂) g = ∑' (i : ι), inner (↑(f₁ + f₂) i) (↑g i)\n[PROOFSTEP]\ncongr\n[GOAL]\ncase calc_2\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nsrc✝ : NormedAddCommGroup { x // x ∈ lp G 2 } := normedAddCommGroup\nf₁ f₂ g : { x // x ∈ lp G 2 }\n⊢ Summable fun i => inner (↑f₁ i) (↑g i)\n[PROOFSTEP]\nexact summable_inner f₁ g\n[GOAL]\ncase calc_3\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nsrc✝ : NormedAddCommGroup { x // x ∈ lp G 2 } := normedAddCommGroup\nf₁ f₂ g : { x // x ∈ lp G 2 }\n⊢ Summable fun i => inner (↑f₂ i) (↑g i)\n[PROOFSTEP]\nexact summable_inner f₂ g\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nsrc✝ : NormedAddCommGroup { x // x ∈ lp G 2 } := normedAddCommGroup\nf g : { x // x ∈ lp G 2 }\nc : 𝕜\n⊢ inner (c • f) g = ↑(starRingEnd 𝕜) c * inner f g\n[PROOFSTEP]\ncalc\n  _ = ∑' i, ⟪c • f i, g i⟫ := ?_\n  _ = ∑' i, conj c * ⟪f i, g i⟫ := by simp only [inner_smul_left]\n  _ = conj c * ∑' i, ⟪f i, g i⟫ := tsum_mul_left\n  _ = _ := ?_\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nsrc✝ : NormedAddCommGroup { x // x ∈ lp G 2 } := normedAddCommGroup\nf g : { x // x ∈ lp G 2 }\nc : 𝕜\n⊢ ∑' (i : ι), inner (c • ↑f i) (↑g i) = ∑' (i : ι), ↑(starRingEnd 𝕜) c * inner (↑f i) (↑g i)\n[PROOFSTEP]\nsimp only [inner_smul_left]\n[GOAL]\ncase calc_1\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nsrc✝ : NormedAddCommGroup { x // x ∈ lp G 2 } := normedAddCommGroup\nf g : { x // x ∈ lp G 2 }\nc : 𝕜\n⊢ inner (c • f) g = ∑' (i : ι), inner (c • ↑f i) (↑g i)\n[PROOFSTEP]\nsimp only [coeFn_smul, Pi.smul_apply]\n[GOAL]\ncase calc_2\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nsrc✝ : NormedAddCommGroup { x // x ∈ lp G 2 } := normedAddCommGroup\nf g : { x // x ∈ lp G 2 }\nc : 𝕜\n⊢ ↑(starRingEnd 𝕜) c * ∑' (i : ι), inner (↑f i) (↑g i) = ↑(starRingEnd 𝕜) c * inner f g\n[PROOFSTEP]\ncongr\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\ni : ι\na : G i\nf : { x // x ∈ lp G 2 }\n⊢ inner (lp.single 2 i a) f = inner a (↑f i)\n[PROOFSTEP]\nrefine' (hasSum_inner (lp.single 2 i a) f).unique _\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\ni : ι\na : G i\nf : { x // x ∈ lp G 2 }\n⊢ HasSum (fun i_1 => inner (↑(lp.single 2 i a) i_1) (↑f i_1)) (inner a (↑f i))\n[PROOFSTEP]\nconvert hasSum_ite_eq i ⟪a, f i⟫ using 1\n[GOAL]\ncase h.e'_5\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\ni : ι\na : G i\nf : { x // x ∈ lp G 2 }\n⊢ (fun i_1 => inner (↑(lp.single 2 i a) i_1) (↑f i_1)) = fun b' => if b' = i then inner a (↑f i) else 0\n[PROOFSTEP]\next j\n[GOAL]\ncase h.e'_5.h\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\ni : ι\na : G i\nf : { x // x ∈ lp G 2 }\nj : ι\n⊢ inner (↑(lp.single 2 i a) j) (↑f j) = if j = i then inner a (↑f i) else 0\n[PROOFSTEP]\nrw [lp.single_apply]\n[GOAL]\ncase h.e'_5.h\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\ni : ι\na : G i\nf : { x // x ∈ lp G 2 }\nj : ι\n⊢ inner (if h : j = i then (_ : i = j) ▸ a else 0) (↑f j) = if j = i then inner a (↑f i) else 0\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\ni : ι\na : G i\nf : { x // x ∈ lp G 2 }\nj : ι\nh : j = i\n⊢ inner ((_ : i = j) ▸ a) (↑f j) = inner a (↑f i)\n[PROOFSTEP]\nsubst h\n[GOAL]\ncase pos\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nf : { x // x ∈ lp G 2 }\nj : ι\na : G j\n⊢ inner ((_ : j = j) ▸ a) (↑f j) = inner a (↑f j)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\ni : ι\na : G i\nf : { x // x ∈ lp G 2 }\nj : ι\nh : ¬j = i\n⊢ inner 0 (↑f j) = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\ni : ι\na : G i\nf : { x // x ∈ lp G 2 }\n⊢ inner f (lp.single 2 i a) = inner (↑f i) a\n[PROOFSTEP]\nsimpa [inner_conj_symm] using congr_arg conj (@inner_single_left _ 𝕜 _ _ _ _ i a f)\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\nf : { x // x ∈ lp G 2 }\n⊢ Summable fun i => ↑(V i) (↑f i)\n[PROOFSTEP]\nrw [hV.summable_iff_norm_sq_summable]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\nf : { x // x ∈ lp G 2 }\n⊢ Summable fun i => ‖↑f i‖ ^ 2\n[PROOFSTEP]\nconvert (lp.memℓp f).summable _\n[GOAL]\ncase h.e'_5.h\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\nf : { x // x ∈ lp G 2 }\nx✝ : ι\n⊢ ‖↑f x✝‖ ^ 2 = ‖↑f x✝‖ ^ ENNReal.toReal 2\n[PROOFSTEP]\nnorm_cast\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\nf : { x // x ∈ lp G 2 }\n⊢ 0 < ENNReal.toReal 2\n[PROOFSTEP]\nnorm_num\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\nf g : { x // x ∈ lp G 2 }\n⊢ (fun f => ∑' (i : ι), ↑(V i) (↑f i)) (f + g) =\n    (fun f => ∑' (i : ι), ↑(V i) (↑f i)) f + (fun f => ∑' (i : ι), ↑(V i) (↑f i)) g\n[PROOFSTEP]\nsimp only [tsum_add (hV.summable_of_lp f) (hV.summable_of_lp g), lp.coeFn_add, Pi.add_apply, LinearIsometry.map_add]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\nc : 𝕜\nf : { x // x ∈ lp G 2 }\n⊢ AddHom.toFun\n      { toFun := fun f => ∑' (i : ι), ↑(V i) (↑f i),\n        map_add' :=\n          (_ :\n            ∀ (f g : { x // x ∈ lp G 2 }),\n              ∑' (x : ι), ↑(V x) (↑f x + ↑g x) = ∑' (b : ι), ↑(V b) (↑f b) + ∑' (b : ι), ↑(V b) (↑g b)) }\n      (c • f) =\n    ↑(RingHom.id 𝕜) c •\n      AddHom.toFun\n        { toFun := fun f => ∑' (i : ι), ↑(V i) (↑f i),\n          map_add' :=\n            (_ :\n              ∀ (f g : { x // x ∈ lp G 2 }),\n                ∑' (x : ι), ↑(V x) (↑f x + ↑g x) = ∑' (b : ι), ↑(V b) (↑f b) + ∑' (b : ι), ↑(V b) (↑g b)) }\n        f\n[PROOFSTEP]\nsimpa only [LinearIsometry.map_smul, Pi.smul_apply, lp.coeFn_smul] using tsum_const_smul c (hV.summable_of_lp f)\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\nf : { x // x ∈ lp G 2 }\n⊢ ‖↑{\n            toAddHom :=\n              { toFun := fun f => ∑' (i : ι), ↑(V i) (↑f i),\n                map_add' :=\n                  (_ :\n                    ∀ (f g : { x // x ∈ lp G 2 }),\n                      ∑' (x : ι), ↑(V x) (↑f x + ↑g x) = ∑' (b : ι), ↑(V b) (↑f b) + ∑' (b : ι), ↑(V b) (↑g b)) },\n            map_smul' :=\n              (_ :\n                ∀ (c : 𝕜) (f : { x // x ∈ lp G 2 }),\n                  AddHom.toFun\n                      { toFun := fun f => ∑' (i : ι), ↑(V i) (↑f i),\n                        map_add' :=\n                          (_ :\n                            ∀ (f g : { x // x ∈ lp G 2 }),\n                              ∑' (x : ι), ↑(V x) (↑f x + ↑g x) =\n                                ∑' (b : ι), ↑(V b) (↑f b) + ∑' (b : ι), ↑(V b) (↑g b)) }\n                      (c • f) =\n                    ↑(RingHom.id 𝕜) c •\n                      AddHom.toFun\n                        { toFun := fun f => ∑' (i : ι), ↑(V i) (↑f i),\n                          map_add' :=\n                            (_ :\n                              ∀ (f g : { x // x ∈ lp G 2 }),\n                                ∑' (x : ι), ↑(V x) (↑f x + ↑g x) =\n                                  ∑' (b : ι), ↑(V b) (↑f b) + ∑' (b : ι), ↑(V b) (↑g b)) }\n                        f) }\n        f‖ =\n    ‖f‖\n[PROOFSTEP]\nclassical\n  -- needed for lattice instance on `Finset ι`, for `Filter.atTop_neBot`\nhave H : 0 < (2 : ℝ≥0∞).toReal := by norm_num\nsuffices ‖∑' i : ι, V i (f i)‖ ^ (2 : ℝ≥0∞).toReal = ‖f‖ ^ (2 : ℝ≥0∞).toReal by\n  exact Real.rpow_left_injOn H.ne' (norm_nonneg _) (norm_nonneg _) this\nrefine' tendsto_nhds_unique _ (lp.hasSum_norm H f)\nconvert (hV.summable_of_lp f).hasSum.norm.rpow_const (Or.inr H.le) using 1\next s\nexact_mod_cast (hV.norm_sum f s).symm\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\nf : { x // x ∈ lp G 2 }\n⊢ ‖↑{\n            toAddHom :=\n              { toFun := fun f => ∑' (i : ι), ↑(V i) (↑f i),\n                map_add' :=\n                  (_ :\n                    ∀ (f g : { x // x ∈ lp G 2 }),\n                      ∑' (x : ι), ↑(V x) (↑f x + ↑g x) = ∑' (b : ι), ↑(V b) (↑f b) + ∑' (b : ι), ↑(V b) (↑g b)) },\n            map_smul' :=\n              (_ :\n                ∀ (c : 𝕜) (f : { x // x ∈ lp G 2 }),\n                  AddHom.toFun\n                      { toFun := fun f => ∑' (i : ι), ↑(V i) (↑f i),\n                        map_add' :=\n                          (_ :\n                            ∀ (f g : { x // x ∈ lp G 2 }),\n                              ∑' (x : ι), ↑(V x) (↑f x + ↑g x) =\n                                ∑' (b : ι), ↑(V b) (↑f b) + ∑' (b : ι), ↑(V b) (↑g b)) }\n                      (c • f) =\n                    ↑(RingHom.id 𝕜) c •\n                      AddHom.toFun\n                        { toFun := fun f => ∑' (i : ι), ↑(V i) (↑f i),\n                          map_add' :=\n                            (_ :\n                              ∀ (f g : { x // x ∈ lp G 2 }),\n                                ∑' (x : ι), ↑(V x) (↑f x + ↑g x) =\n                                  ∑' (b : ι), ↑(V b) (↑f b) + ∑' (b : ι), ↑(V b) (↑g b)) }\n                        f) }\n        f‖ =\n    ‖f‖\n[PROOFSTEP]\nhave H : 0 < (2 : ℝ≥0∞).toReal := by norm_num\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\nf : { x // x ∈ lp G 2 }\n⊢ 0 < ENNReal.toReal 2\n[PROOFSTEP]\nnorm_num\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\nf : { x // x ∈ lp G 2 }\nH : 0 < ENNReal.toReal 2\n⊢ ‖↑{\n            toAddHom :=\n              { toFun := fun f => ∑' (i : ι), ↑(V i) (↑f i),\n                map_add' :=\n                  (_ :\n                    ∀ (f g : { x // x ∈ lp G 2 }),\n                      ∑' (x : ι), ↑(V x) (↑f x + ↑g x) = ∑' (b : ι), ↑(V b) (↑f b) + ∑' (b : ι), ↑(V b) (↑g b)) },\n            map_smul' :=\n              (_ :\n                ∀ (c : 𝕜) (f : { x // x ∈ lp G 2 }),\n                  AddHom.toFun\n                      { toFun := fun f => ∑' (i : ι), ↑(V i) (↑f i),\n                        map_add' :=\n                          (_ :\n                            ∀ (f g : { x // x ∈ lp G 2 }),\n                              ∑' (x : ι), ↑(V x) (↑f x + ↑g x) =\n                                ∑' (b : ι), ↑(V b) (↑f b) + ∑' (b : ι), ↑(V b) (↑g b)) }\n                      (c • f) =\n                    ↑(RingHom.id 𝕜) c •\n                      AddHom.toFun\n                        { toFun := fun f => ∑' (i : ι), ↑(V i) (↑f i),\n                          map_add' :=\n                            (_ :\n                              ∀ (f g : { x // x ∈ lp G 2 }),\n                                ∑' (x : ι), ↑(V x) (↑f x + ↑g x) =\n                                  ∑' (b : ι), ↑(V b) (↑f b) + ∑' (b : ι), ↑(V b) (↑g b)) }\n                        f) }\n        f‖ =\n    ‖f‖\n[PROOFSTEP]\nsuffices ‖∑' i : ι, V i (f i)‖ ^ (2 : ℝ≥0∞).toReal = ‖f‖ ^ (2 : ℝ≥0∞).toReal by\n  exact Real.rpow_left_injOn H.ne' (norm_nonneg _) (norm_nonneg _) this\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\nf : { x // x ∈ lp G 2 }\nH : 0 < ENNReal.toReal 2\nthis : ‖∑' (i : ι), ↑(V i) (↑f i)‖ ^ ENNReal.toReal 2 = ‖f‖ ^ ENNReal.toReal 2\n⊢ ‖↑{\n            toAddHom :=\n              { toFun := fun f => ∑' (i : ι), ↑(V i) (↑f i),\n                map_add' :=\n                  (_ :\n                    ∀ (f g : { x // x ∈ lp G 2 }),\n                      ∑' (x : ι), ↑(V x) (↑f x + ↑g x) = ∑' (b : ι), ↑(V b) (↑f b) + ∑' (b : ι), ↑(V b) (↑g b)) },\n            map_smul' :=\n              (_ :\n                ∀ (c : 𝕜) (f : { x // x ∈ lp G 2 }),\n                  AddHom.toFun\n                      { toFun := fun f => ∑' (i : ι), ↑(V i) (↑f i),\n                        map_add' :=\n                          (_ :\n                            ∀ (f g : { x // x ∈ lp G 2 }),\n                              ∑' (x : ι), ↑(V x) (↑f x + ↑g x) =\n                                ∑' (b : ι), ↑(V b) (↑f b) + ∑' (b : ι), ↑(V b) (↑g b)) }\n                      (c • f) =\n                    ↑(RingHom.id 𝕜) c •\n                      AddHom.toFun\n                        { toFun := fun f => ∑' (i : ι), ↑(V i) (↑f i),\n                          map_add' :=\n                            (_ :\n                              ∀ (f g : { x // x ∈ lp G 2 }),\n                                ∑' (x : ι), ↑(V x) (↑f x + ↑g x) =\n                                  ∑' (b : ι), ↑(V b) (↑f b) + ∑' (b : ι), ↑(V b) (↑g b)) }\n                        f) }\n        f‖ =\n    ‖f‖\n[PROOFSTEP]\nexact Real.rpow_left_injOn H.ne' (norm_nonneg _) (norm_nonneg _) this\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\nf : { x // x ∈ lp G 2 }\nH : 0 < ENNReal.toReal 2\n⊢ ‖∑' (i : ι), ↑(V i) (↑f i)‖ ^ ENNReal.toReal 2 = ‖f‖ ^ ENNReal.toReal 2\n[PROOFSTEP]\nrefine' tendsto_nhds_unique _ (lp.hasSum_norm H f)\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\nf : { x // x ∈ lp G 2 }\nH : 0 < ENNReal.toReal 2\n⊢ Tendsto (fun s => ∑ b in s, (fun i => ‖↑f i‖ ^ ENNReal.toReal 2) b) atTop\n    (𝓝 (‖∑' (i : ι), ↑(V i) (↑f i)‖ ^ ENNReal.toReal 2))\n[PROOFSTEP]\nconvert (hV.summable_of_lp f).hasSum.norm.rpow_const (Or.inr H.le) using 1\n[GOAL]\ncase h.e'_3\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\nf : { x // x ∈ lp G 2 }\nH : 0 < ENNReal.toReal 2\n⊢ (fun s => ∑ b in s, (fun i => ‖↑f i‖ ^ ENNReal.toReal 2) b) = fun a =>\n    ‖∑ b in a, (fun i => ↑(V i) (↑f i)) b‖ ^ ENNReal.toReal 2\n[PROOFSTEP]\next s\n[GOAL]\ncase h.e'_3.h\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\nf : { x // x ∈ lp G 2 }\nH : 0 < ENNReal.toReal 2\ns : Finset ι\n⊢ ∑ b in s, (fun i => ‖↑f i‖ ^ ENNReal.toReal 2) b = ‖∑ b in s, (fun i => ↑(V i) (↑f i)) b‖ ^ ENNReal.toReal 2\n[PROOFSTEP]\nexact_mod_cast (hV.norm_sum f s).symm\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ni : ι\nx : G i\n⊢ ↑(OrthogonalFamily.linearIsometry hV) (lp.single 2 i x) = ↑(V i) x\n[PROOFSTEP]\nrw [hV.linearIsometry_apply, ← tsum_ite_eq i (V i x)]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ni : ι\nx : G i\n⊢ ∑' (i_1 : ι), ↑(V i_1) (↑(lp.single 2 i x) i_1) = ∑' (b' : ι), if b' = i then ↑(V i) x else 0\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_f\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ni : ι\nx : G i\n⊢ (fun i_1 => ↑(V i_1) (↑(lp.single 2 i x) i_1)) = fun b' => if b' = i then ↑(V i) x else 0\n[PROOFSTEP]\next j\n[GOAL]\ncase e_f.h\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ni : ι\nx : G i\nj : ι\n⊢ ↑(V j) (↑(lp.single 2 i x) j) = if j = i then ↑(V i) x else 0\n[PROOFSTEP]\nrw [lp.single_apply]\n[GOAL]\ncase e_f.h\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ni : ι\nx : G i\nj : ι\n⊢ ↑(V j) (if h : j = i then (_ : i = j) ▸ x else 0) = if j = i then ↑(V i) x else 0\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ni : ι\nx : G i\nj : ι\nh : j = i\n⊢ ↑(V j) (if h : j = i then (_ : i = j) ▸ x else 0) = ↑(V i) x\n[PROOFSTEP]\nsubst h\n[GOAL]\ncase pos\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\nj : ι\nx : G j\n⊢ ↑(V j) (if h : j = j then (_ : j = j) ▸ x else 0) = ↑(V j) x\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ni : ι\nx : G i\nj : ι\nh : ¬j = i\n⊢ ↑(V j) (if h : j = i then (_ : i = j) ▸ x else 0) = 0\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\nW₀ : Π₀ (i : ι), G i\n⊢ ↑(OrthogonalFamily.linearIsometry hV) (DFinsupp.sum W₀ (lp.single 2)) = DFinsupp.sum W₀ fun i => ↑(V i)\n[PROOFSTEP]\nhave :\n  hV.linearIsometry (∑ i in W₀.support, lp.single 2 i (W₀ i)) =\n    ∑ i in W₀.support, hV.linearIsometry (lp.single 2 i (W₀ i)) :=\n  hV.linearIsometry.toLinearMap.map_sum\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\nW₀ : Π₀ (i : ι), G i\nthis :\n  ↑(OrthogonalFamily.linearIsometry hV) (∑ i in DFinsupp.support W₀, lp.single 2 i (↑W₀ i)) =\n    ∑ i in DFinsupp.support W₀, ↑(OrthogonalFamily.linearIsometry hV) (lp.single 2 i (↑W₀ i))\n⊢ ↑(OrthogonalFamily.linearIsometry hV) (DFinsupp.sum W₀ (lp.single 2)) = DFinsupp.sum W₀ fun i => ↑(V i)\n[PROOFSTEP]\nsimp (config := { contextual := true }) [DFinsupp.sum, this]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁵ : IsROrC 𝕜\nE : Type u_3\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝² : (i : ι) → NormedAddCommGroup (G i)\ninst✝¹ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ninst✝ : ∀ (i : ι), CompleteSpace (G i)\n⊢ LinearMap.range (OrthogonalFamily.linearIsometry hV).toLinearMap =\n    topologicalClosure (⨆ (i : ι), LinearMap.range (V i).toLinearMap)\n[PROOFSTEP]\nrefine' le_antisymm _ _\n[GOAL]\ncase refine'_1\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁵ : IsROrC 𝕜\nE : Type u_3\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝² : (i : ι) → NormedAddCommGroup (G i)\ninst✝¹ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ninst✝ : ∀ (i : ι), CompleteSpace (G i)\n⊢ LinearMap.range (OrthogonalFamily.linearIsometry hV).toLinearMap ≤\n    topologicalClosure (⨆ (i : ι), LinearMap.range (V i).toLinearMap)\n[PROOFSTEP]\nrintro x ⟨f, rfl⟩\n[GOAL]\ncase refine'_1.intro\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁵ : IsROrC 𝕜\nE : Type u_3\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝² : (i : ι) → NormedAddCommGroup (G i)\ninst✝¹ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ninst✝ : ∀ (i : ι), CompleteSpace (G i)\nf : { x // x ∈ lp G 2 }\n⊢ ↑(OrthogonalFamily.linearIsometry hV).toLinearMap f ∈\n    topologicalClosure (⨆ (i : ι), LinearMap.range (V i).toLinearMap)\n[PROOFSTEP]\nrefine' mem_closure_of_tendsto (hV.hasSum_linearIsometry f) (eventually_of_forall _)\n[GOAL]\ncase refine'_1.intro\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁵ : IsROrC 𝕜\nE : Type u_3\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝² : (i : ι) → NormedAddCommGroup (G i)\ninst✝¹ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ninst✝ : ∀ (i : ι), CompleteSpace (G i)\nf : { x // x ∈ lp G 2 }\n⊢ ∀ (x : Finset ι), ∑ b in x, (fun i => ↑(V i) (↑f i)) b ∈ ↑(⨆ (i : ι), LinearMap.range (V i).toLinearMap)\n[PROOFSTEP]\nintro s\n[GOAL]\ncase refine'_1.intro\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁵ : IsROrC 𝕜\nE : Type u_3\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝² : (i : ι) → NormedAddCommGroup (G i)\ninst✝¹ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ninst✝ : ∀ (i : ι), CompleteSpace (G i)\nf : { x // x ∈ lp G 2 }\ns : Finset ι\n⊢ ∑ b in s, (fun i => ↑(V i) (↑f i)) b ∈ ↑(⨆ (i : ι), LinearMap.range (V i).toLinearMap)\n[PROOFSTEP]\nrw [SetLike.mem_coe]\n[GOAL]\ncase refine'_1.intro\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁵ : IsROrC 𝕜\nE : Type u_3\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝² : (i : ι) → NormedAddCommGroup (G i)\ninst✝¹ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ninst✝ : ∀ (i : ι), CompleteSpace (G i)\nf : { x // x ∈ lp G 2 }\ns : Finset ι\n⊢ ∑ b in s, (fun i => ↑(V i) (↑f i)) b ∈ ⨆ (i : ι), LinearMap.range (V i).toLinearMap\n[PROOFSTEP]\nrefine' sum_mem _\n[GOAL]\ncase refine'_1.intro\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁵ : IsROrC 𝕜\nE : Type u_3\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝² : (i : ι) → NormedAddCommGroup (G i)\ninst✝¹ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ninst✝ : ∀ (i : ι), CompleteSpace (G i)\nf : { x // x ∈ lp G 2 }\ns : Finset ι\n⊢ ∀ (c : ι), c ∈ s → (fun i => ↑(V i) (↑f i)) c ∈ ⨆ (i : ι), LinearMap.range (V i).toLinearMap\n[PROOFSTEP]\nintro i _\n[GOAL]\ncase refine'_1.intro\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁵ : IsROrC 𝕜\nE : Type u_3\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝² : (i : ι) → NormedAddCommGroup (G i)\ninst✝¹ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ninst✝ : ∀ (i : ι), CompleteSpace (G i)\nf : { x // x ∈ lp G 2 }\ns : Finset ι\ni : ι\na✝ : i ∈ s\n⊢ (fun i => ↑(V i) (↑f i)) i ∈ ⨆ (i : ι), LinearMap.range (V i).toLinearMap\n[PROOFSTEP]\nrefine' mem_iSup_of_mem i _\n[GOAL]\ncase refine'_1.intro\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁵ : IsROrC 𝕜\nE : Type u_3\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝² : (i : ι) → NormedAddCommGroup (G i)\ninst✝¹ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ninst✝ : ∀ (i : ι), CompleteSpace (G i)\nf : { x // x ∈ lp G 2 }\ns : Finset ι\ni : ι\na✝ : i ∈ s\n⊢ (fun i => ↑(V i) (↑f i)) i ∈ LinearMap.range (V i).toLinearMap\n[PROOFSTEP]\nexact LinearMap.mem_range_self _ (f i)\n[GOAL]\ncase refine'_2\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁵ : IsROrC 𝕜\nE : Type u_3\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝² : (i : ι) → NormedAddCommGroup (G i)\ninst✝¹ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ninst✝ : ∀ (i : ι), CompleteSpace (G i)\n⊢ topologicalClosure (⨆ (i : ι), LinearMap.range (V i).toLinearMap) ≤\n    LinearMap.range (OrthogonalFamily.linearIsometry hV).toLinearMap\n[PROOFSTEP]\napply topologicalClosure_minimal\n[GOAL]\ncase refine'_2.h\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁵ : IsROrC 𝕜\nE : Type u_3\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝² : (i : ι) → NormedAddCommGroup (G i)\ninst✝¹ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ninst✝ : ∀ (i : ι), CompleteSpace (G i)\n⊢ ⨆ (i : ι), LinearMap.range (V i).toLinearMap ≤ LinearMap.range (OrthogonalFamily.linearIsometry hV).toLinearMap\n[PROOFSTEP]\nrefine' iSup_le _\n[GOAL]\ncase refine'_2.h\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁵ : IsROrC 𝕜\nE : Type u_3\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝² : (i : ι) → NormedAddCommGroup (G i)\ninst✝¹ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ninst✝ : ∀ (i : ι), CompleteSpace (G i)\n⊢ ∀ (i : ι), LinearMap.range (V i).toLinearMap ≤ LinearMap.range (OrthogonalFamily.linearIsometry hV).toLinearMap\n[PROOFSTEP]\nrintro i x ⟨x, rfl⟩\n[GOAL]\ncase refine'_2.h.intro\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁵ : IsROrC 𝕜\nE : Type u_3\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝² : (i : ι) → NormedAddCommGroup (G i)\ninst✝¹ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ninst✝ : ∀ (i : ι), CompleteSpace (G i)\ni : ι\nx : G i\n⊢ ↑(V i).toLinearMap x ∈ LinearMap.range (OrthogonalFamily.linearIsometry hV).toLinearMap\n[PROOFSTEP]\nuse lp.single 2 i x\n[GOAL]\ncase h\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁵ : IsROrC 𝕜\nE : Type u_3\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝² : (i : ι) → NormedAddCommGroup (G i)\ninst✝¹ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ninst✝ : ∀ (i : ι), CompleteSpace (G i)\ni : ι\nx : G i\n⊢ ↑(OrthogonalFamily.linearIsometry hV).toLinearMap (lp.single 2 i x) = ↑(V i).toLinearMap x\n[PROOFSTEP]\nexact hV.linearIsometry_apply_single x\n[GOAL]\ncase refine'_2.ht\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁵ : IsROrC 𝕜\nE : Type u_3\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝² : (i : ι) → NormedAddCommGroup (G i)\ninst✝¹ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ninst✝ : ∀ (i : ι), CompleteSpace (G i)\n⊢ IsClosed ↑(LinearMap.range (OrthogonalFamily.linearIsometry hV).toLinearMap)\n[PROOFSTEP]\nexact hV.linearIsometry.isometry.uniformInducing.isComplete_range.isClosed\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁵ : IsROrC 𝕜\nE : Type u_3\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝² : (i : ι) → NormedAddCommGroup (G i)\ninst✝¹ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nF : ι → Submodule 𝕜 E\ninst✝ : ∀ (i : ι), CompleteSpace (G i)\nhVortho : OrthogonalFamily 𝕜 G V\nhVtotal : ⊤ ≤ topologicalClosure (⨆ (i : ι), LinearMap.range (V i).toLinearMap)\n⊢ Function.Surjective ↑(OrthogonalFamily.linearIsometry hVortho)\n[PROOFSTEP]\nrw [← LinearIsometry.coe_toLinearMap]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁵ : IsROrC 𝕜\nE : Type u_3\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝² : (i : ι) → NormedAddCommGroup (G i)\ninst✝¹ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nF : ι → Submodule 𝕜 E\ninst✝ : ∀ (i : ι), CompleteSpace (G i)\nhVortho : OrthogonalFamily 𝕜 G V\nhVtotal : ⊤ ≤ topologicalClosure (⨆ (i : ι), LinearMap.range (V i).toLinearMap)\n⊢ Function.Surjective ↑(OrthogonalFamily.linearIsometry hVortho).toLinearMap\n[PROOFSTEP]\nexact LinearMap.range_eq_top.mp (eq_top_iff.mpr <| hVtotal.trans_eq hVortho.range_linearIsometry.symm)\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁵ : IsROrC 𝕜\nE : Type u_3\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝² : (i : ι) → NormedAddCommGroup (G i)\ninst✝¹ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nF : ι → Submodule 𝕜 E\ninst✝ : ∀ (i : ι), CompleteSpace { x // x ∈ F i }\nhFortho : OrthogonalFamily 𝕜 (fun i => { x // x ∈ F i }) fun i => subtypeₗᵢ (F i)\nhFtotal : ⊤ ≤ topologicalClosure (⨆ (i : ι), F i)\n⊢ ⊤ ≤ topologicalClosure (⨆ (i : ι), LinearMap.range (subtypeₗᵢ (F i)).toLinearMap)\n[PROOFSTEP]\nsimpa [subtypeₗᵢ_toLinearMap, range_subtype] using hFtotal\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nF : ι → Submodule 𝕜 E\nhV : IsHilbertSum 𝕜 G V\nw : { x // x ∈ lp G 2 }\n⊢ ↑(LinearIsometryEquiv.symm (linearIsometryEquiv hV)) w = ∑' (i : ι), ↑(V i) (↑w i)\n[PROOFSTEP]\nsimp [IsHilbertSum.linearIsometryEquiv, OrthogonalFamily.linearIsometry_apply]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nF : ι → Submodule 𝕜 E\nhV : IsHilbertSum 𝕜 G V\nw : { x // x ∈ lp G 2 }\n⊢ HasSum (fun i => ↑(V i) (↑w i)) (↑(LinearIsometryEquiv.symm (linearIsometryEquiv hV)) w)\n[PROOFSTEP]\nsimp [IsHilbertSum.linearIsometryEquiv, OrthogonalFamily.hasSum_linearIsometry]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nF : ι → Submodule 𝕜 E\nhV : IsHilbertSum 𝕜 G V\ni : ι\nx : G i\n⊢ ↑(LinearIsometryEquiv.symm (linearIsometryEquiv hV)) (lp.single 2 i x) = ↑(V i) x\n[PROOFSTEP]\nsimp [IsHilbertSum.linearIsometryEquiv, OrthogonalFamily.linearIsometry_apply_single]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nF : ι → Submodule 𝕜 E\nhV : IsHilbertSum 𝕜 G V\nW₀ : Π₀ (i : ι), G i\n⊢ ↑(LinearIsometryEquiv.symm (linearIsometryEquiv hV)) (DFinsupp.sum W₀ (lp.single 2)) = DFinsupp.sum W₀ fun i => ↑(V i)\n[PROOFSTEP]\nsimp [IsHilbertSum.linearIsometryEquiv, OrthogonalFamily.linearIsometry_apply_dfinsupp_sum_single]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nF : ι → Submodule 𝕜 E\nhV : IsHilbertSum 𝕜 G V\nW₀ : Π₀ (i : ι), G i\n⊢ ↑(↑(linearIsometryEquiv hV) (DFinsupp.sum W₀ fun i => ↑(V i))) = ↑W₀\n[PROOFSTEP]\nrw [← hV.linearIsometryEquiv_symm_apply_dfinsupp_sum_single]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nF : ι → Submodule 𝕜 E\nhV : IsHilbertSum 𝕜 G V\nW₀ : Π₀ (i : ι), G i\n⊢ ↑(↑(linearIsometryEquiv hV) (↑(LinearIsometryEquiv.symm (linearIsometryEquiv hV)) (DFinsupp.sum W₀ (lp.single 2)))) =\n    ↑W₀\n[PROOFSTEP]\nrw [LinearIsometryEquiv.apply_symm_apply]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nF : ι → Submodule 𝕜 E\nhV : IsHilbertSum 𝕜 G V\nW₀ : Π₀ (i : ι), G i\n⊢ ↑(DFinsupp.sum W₀ (lp.single 2)) = ↑W₀\n[PROOFSTEP]\next i\n[GOAL]\ncase h\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nF : ι → Submodule 𝕜 E\nhV : IsHilbertSum 𝕜 G V\nW₀ : Π₀ (i : ι), G i\ni : ι\n⊢ ↑(DFinsupp.sum W₀ (lp.single 2)) i = ↑W₀ i\n[PROOFSTEP]\nsimp (config := { contextual := true }) [DFinsupp.sum, lp.single_apply]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nF : ι → Submodule 𝕜 E\nv : ι → E\nhv : Orthonormal 𝕜 v\nhsp : ⊤ ≤ topologicalClosure (span 𝕜 (Set.range v))\n⊢ ⊤ ≤ topologicalClosure (⨆ (i : ι), LinearMap.range (LinearIsometry.toSpanSingleton 𝕜 E (_ : ‖v i‖ = 1)).toLinearMap)\n[PROOFSTEP]\nconvert hsp\n[GOAL]\ncase h.e'_4.h.e'_9\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nF : ι → Submodule 𝕜 E\nv : ι → E\nhv : Orthonormal 𝕜 v\nhsp : ⊤ ≤ topologicalClosure (span 𝕜 (Set.range v))\n⊢ ⨆ (i : ι), LinearMap.range (LinearIsometry.toSpanSingleton 𝕜 E (_ : ‖v i‖ = 1)).toLinearMap = span 𝕜 (Set.range v)\n[PROOFSTEP]\nsimp [← LinearMap.span_singleton_eq_range, ← Submodule.span_iUnion]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nF : ι → Submodule 𝕜 E\nK : Submodule 𝕜 E\nhK : CompleteSpace { x // x ∈ K }\n⊢ IsHilbertSum 𝕜 (fun b => { x // x ∈ bif b then K else Kᗮ }) fun b => subtypeₗᵢ (bif b then K else Kᗮ)\n[PROOFSTEP]\nhave : ∀ b, CompleteSpace (↥(cond b K Kᗮ)) := by\n  intro b\n  cases b <;>\n    first\n    | exact instOrthogonalCompleteSpace K\n    | assumption\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nF : ι → Submodule 𝕜 E\nK : Submodule 𝕜 E\nhK : CompleteSpace { x // x ∈ K }\n⊢ ∀ (b : Bool), CompleteSpace { x // x ∈ bif b then K else Kᗮ }\n[PROOFSTEP]\nintro b\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nF : ι → Submodule 𝕜 E\nK : Submodule 𝕜 E\nhK : CompleteSpace { x // x ∈ K }\nb : Bool\n⊢ CompleteSpace { x // x ∈ bif b then K else Kᗮ }\n[PROOFSTEP]\ncases b\n[GOAL]\ncase false\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nF : ι → Submodule 𝕜 E\nK : Submodule 𝕜 E\nhK : CompleteSpace { x // x ∈ K }\n⊢ CompleteSpace { x // x ∈ bif false then K else Kᗮ }\n[PROOFSTEP]\nfirst\n| exact instOrthogonalCompleteSpace K\n| assumption\n[GOAL]\ncase false\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nF : ι → Submodule 𝕜 E\nK : Submodule 𝕜 E\nhK : CompleteSpace { x // x ∈ K }\n⊢ CompleteSpace { x // x ∈ bif false then K else Kᗮ }\n[PROOFSTEP]\nexact instOrthogonalCompleteSpace K\n[GOAL]\ncase true\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nF : ι → Submodule 𝕜 E\nK : Submodule 𝕜 E\nhK : CompleteSpace { x // x ∈ K }\n⊢ CompleteSpace { x // x ∈ bif true then K else Kᗮ }\n[PROOFSTEP]\nfirst\n| exact instOrthogonalCompleteSpace K\n| assumption\n[GOAL]\ncase true\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nF : ι → Submodule 𝕜 E\nK : Submodule 𝕜 E\nhK : CompleteSpace { x // x ∈ K }\n⊢ CompleteSpace { x // x ∈ bif true then K else Kᗮ }\n[PROOFSTEP]\nexact instOrthogonalCompleteSpace K\n[GOAL]\ncase true\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nF : ι → Submodule 𝕜 E\nK : Submodule 𝕜 E\nhK : CompleteSpace { x // x ∈ K }\n⊢ CompleteSpace { x // x ∈ bif true then K else Kᗮ }\n[PROOFSTEP]\nassumption\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nF : ι → Submodule 𝕜 E\nK : Submodule 𝕜 E\nhK : CompleteSpace { x // x ∈ K }\nthis : ∀ (b : Bool), CompleteSpace { x // x ∈ bif b then K else Kᗮ }\n⊢ IsHilbertSum 𝕜 (fun b => { x // x ∈ bif b then K else Kᗮ }) fun b => subtypeₗᵢ (bif b then K else Kᗮ)\n[PROOFSTEP]\nrefine' IsHilbertSum.mkInternal _ K.orthogonalFamily_self _\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nF : ι → Submodule 𝕜 E\nK : Submodule 𝕜 E\nhK : CompleteSpace { x // x ∈ K }\nthis : ∀ (b : Bool), CompleteSpace { x // x ∈ bif b then K else Kᗮ }\n⊢ ⊤ ≤ topologicalClosure (⨆ (i : Bool), bif i then K else Kᗮ)\n[PROOFSTEP]\nrefine' le_trans _ (Submodule.le_topologicalClosure _)\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nF : ι → Submodule 𝕜 E\nK : Submodule 𝕜 E\nhK : CompleteSpace { x // x ∈ K }\nthis : ∀ (b : Bool), CompleteSpace { x // x ∈ bif b then K else Kᗮ }\n⊢ ⊤ ≤ ⨆ (i : Bool), bif i then K else Kᗮ\n[PROOFSTEP]\nrw [iSup_bool_eq, cond, cond]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nF : ι → Submodule 𝕜 E\nK : Submodule 𝕜 E\nhK : CompleteSpace { x // x ∈ K }\nthis : ∀ (b : Bool), CompleteSpace { x // x ∈ bif b then K else Kᗮ }\n⊢ ⊤ ≤\n    (match true with\n      | true => K\n      | false => Kᗮ) ⊔\n      match false with\n      | true => K\n      | false => Kᗮ\n[PROOFSTEP]\nrefine' Codisjoint.top_le _\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nF : ι → Submodule 𝕜 E\nK : Submodule 𝕜 E\nhK : CompleteSpace { x // x ∈ K }\nthis : ∀ (b : Bool), CompleteSpace { x // x ∈ bif b then K else Kᗮ }\n⊢ Codisjoint\n    (match true with\n    | true => K\n    | false => Kᗮ)\n    (match false with\n    | true => K\n    | false => Kᗮ)\n[PROOFSTEP]\nexact Submodule.isCompl_orthogonal_of_completeSpace.codisjoint\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nb : HilbertBasis ι 𝕜 E\ni : ι\n⊢ ↑b.repr ((fun i => ↑(LinearIsometryEquiv.symm b.repr) (lp.single 2 i 1)) i) = lp.single 2 i 1\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nb : HilbertBasis ι 𝕜 E\nv : E\ni : ι\n⊢ ↑(↑b.repr v) i = inner ((fun i => ↑(LinearIsometryEquiv.symm b.repr) (lp.single 2 i 1)) i) v\n[PROOFSTEP]\nrw [← b.repr.inner_map_map (b i) v, b.repr_self, lp.inner_single_left]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nb : HilbertBasis ι 𝕜 E\nv : E\ni : ι\n⊢ ↑(↑b.repr v) i = inner 1 (↑(↑b.repr v) i)\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nb : HilbertBasis ι 𝕜 E\n⊢ Orthonormal 𝕜 fun i => ↑(LinearIsometryEquiv.symm b.repr) (lp.single 2 i 1)\n[PROOFSTEP]\nrw [orthonormal_iff_ite]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nb : HilbertBasis ι 𝕜 E\n⊢ ∀ (i j : ι),\n    inner (↑(LinearIsometryEquiv.symm b.repr) (lp.single 2 i 1))\n        (↑(LinearIsometryEquiv.symm b.repr) (lp.single 2 j 1)) =\n      if i = j then 1 else 0\n[PROOFSTEP]\nintro i j\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nb : HilbertBasis ι 𝕜 E\ni j : ι\n⊢ inner (↑(LinearIsometryEquiv.symm b.repr) (lp.single 2 i 1)) (↑(LinearIsometryEquiv.symm b.repr) (lp.single 2 j 1)) =\n    if i = j then 1 else 0\n[PROOFSTEP]\nrw [← b.repr.inner_map_map (b i) (b j), b.repr_self, b.repr_self, lp.inner_single_left, lp.single_apply]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nb : HilbertBasis ι 𝕜 E\ni j : ι\n⊢ inner 1 (if h : i = j then (_ : j = i) ▸ 1 else 0) = if i = j then 1 else 0\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nb : HilbertBasis ι 𝕜 E\nf : { x // x ∈ lp (fun i => 𝕜) 2 }\n⊢ HasSum (fun i => ↑f i • (fun i => ↑(LinearIsometryEquiv.symm b.repr) (lp.single 2 i 1)) i)\n    (↑(LinearIsometryEquiv.symm b.repr) f)\n[PROOFSTEP]\nsuffices H :\n  (fun i : ι => f i • b i) = fun b_1 : ι =>\n    b.repr.symm.toContinuousLinearEquiv <| (fun i : ι => lp.single 2 i (f i) (E := (fun _ : ι => 𝕜))) b_1\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nb : HilbertBasis ι 𝕜 E\nf : { x // x ∈ lp (fun i => 𝕜) 2 }\nH :\n  (fun i => ↑f i • (fun i => ↑(LinearIsometryEquiv.symm b.repr) (lp.single 2 i 1)) i) = fun b_1 =>\n    ↑(LinearIsometryEquiv.toContinuousLinearEquiv (LinearIsometryEquiv.symm b.repr))\n      ((fun i => lp.single 2 i (↑f i)) b_1)\n⊢ HasSum (fun i => ↑f i • (fun i => ↑(LinearIsometryEquiv.symm b.repr) (lp.single 2 i 1)) i)\n    (↑(LinearIsometryEquiv.symm b.repr) f)\n[PROOFSTEP]\nrw [H]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nb : HilbertBasis ι 𝕜 E\nf : { x // x ∈ lp (fun i => 𝕜) 2 }\nH :\n  (fun i => ↑f i • (fun i => ↑(LinearIsometryEquiv.symm b.repr) (lp.single 2 i 1)) i) = fun b_1 =>\n    ↑(LinearIsometryEquiv.toContinuousLinearEquiv (LinearIsometryEquiv.symm b.repr))\n      ((fun i => lp.single 2 i (↑f i)) b_1)\n⊢ HasSum\n    (fun b_1 =>\n      ↑(LinearIsometryEquiv.toContinuousLinearEquiv (LinearIsometryEquiv.symm b.repr))\n        ((fun i => lp.single 2 i (↑f i)) b_1))\n    (↑(LinearIsometryEquiv.symm b.repr) f)\n[PROOFSTEP]\nhave : HasSum (fun i : ι => lp.single 2 i (f i)) f := lp.hasSum_single ENNReal.two_ne_top f\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nb : HilbertBasis ι 𝕜 E\nf : { x // x ∈ lp (fun i => 𝕜) 2 }\nH :\n  (fun i => ↑f i • (fun i => ↑(LinearIsometryEquiv.symm b.repr) (lp.single 2 i 1)) i) = fun b_1 =>\n    ↑(LinearIsometryEquiv.toContinuousLinearEquiv (LinearIsometryEquiv.symm b.repr))\n      ((fun i => lp.single 2 i (↑f i)) b_1)\nthis : HasSum (fun i => lp.single 2 i (↑f i)) f\n⊢ HasSum\n    (fun b_1 =>\n      ↑(LinearIsometryEquiv.toContinuousLinearEquiv (LinearIsometryEquiv.symm b.repr))\n        ((fun i => lp.single 2 i (↑f i)) b_1))\n    (↑(LinearIsometryEquiv.symm b.repr) f)\n[PROOFSTEP]\nexact (↑b.repr.symm.toContinuousLinearEquiv : ℓ²(ι, 𝕜) →L[𝕜] E).hasSum this\n[GOAL]\ncase H\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nb : HilbertBasis ι 𝕜 E\nf : { x // x ∈ lp (fun i => 𝕜) 2 }\n⊢ (fun i => ↑f i • (fun i => ↑(LinearIsometryEquiv.symm b.repr) (lp.single 2 i 1)) i) = fun b_1 =>\n    ↑(LinearIsometryEquiv.toContinuousLinearEquiv (LinearIsometryEquiv.symm b.repr))\n      ((fun i => lp.single 2 i (↑f i)) b_1)\n[PROOFSTEP]\next i\n[GOAL]\ncase H.h\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nb : HilbertBasis ι 𝕜 E\nf : { x // x ∈ lp (fun i => 𝕜) 2 }\ni : ι\n⊢ ↑f i • (fun i => ↑(LinearIsometryEquiv.symm b.repr) (lp.single 2 i 1)) i =\n    ↑(LinearIsometryEquiv.toContinuousLinearEquiv (LinearIsometryEquiv.symm b.repr)) ((fun i => lp.single 2 i (↑f i)) i)\n[PROOFSTEP]\napply b.repr.injective\n[GOAL]\ncase H.h.a\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nb : HilbertBasis ι 𝕜 E\nf : { x // x ∈ lp (fun i => 𝕜) 2 }\ni : ι\n⊢ ↑b.repr (↑f i • (fun i => ↑(LinearIsometryEquiv.symm b.repr) (lp.single 2 i 1)) i) =\n    ↑b.repr\n      (↑(LinearIsometryEquiv.toContinuousLinearEquiv (LinearIsometryEquiv.symm b.repr))\n        ((fun i => lp.single 2 i (↑f i)) i))\n[PROOFSTEP]\nletI : NormedSpace 𝕜 (lp (fun _i : ι => 𝕜) 2) := by infer_instance\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nb : HilbertBasis ι 𝕜 E\nf : { x // x ∈ lp (fun i => 𝕜) 2 }\ni : ι\n⊢ NormedSpace 𝕜 { x // x ∈ lp (fun _i => 𝕜) 2 }\n[PROOFSTEP]\ninfer_instance\n[GOAL]\ncase H.h.a\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nb : HilbertBasis ι 𝕜 E\nf : { x // x ∈ lp (fun i => 𝕜) 2 }\ni : ι\nthis : NormedSpace 𝕜 { x // x ∈ lp (fun _i => 𝕜) 2 } := inferInstance\n⊢ ↑b.repr (↑f i • (fun i => ↑(LinearIsometryEquiv.symm b.repr) (lp.single 2 i 1)) i) =\n    ↑b.repr\n      (↑(LinearIsometryEquiv.toContinuousLinearEquiv (LinearIsometryEquiv.symm b.repr))\n        ((fun i => lp.single 2 i (↑f i)) i))\n[PROOFSTEP]\nhave : lp.single (E := (fun _ : ι => 𝕜)) 2 i (f i * 1) = f i • lp.single 2 i 1 :=\n  lp.single_smul (E := (fun _ : ι => 𝕜)) 2 i (1 : 𝕜) (f i)\n[GOAL]\ncase H.h.a\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nb : HilbertBasis ι 𝕜 E\nf : { x // x ∈ lp (fun i => 𝕜) 2 }\ni : ι\nthis✝ : NormedSpace 𝕜 { x // x ∈ lp (fun _i => 𝕜) 2 } := inferInstance\nthis : lp.single 2 i (↑f i * 1) = ↑f i • lp.single 2 i 1\n⊢ ↑b.repr (↑f i • (fun i => ↑(LinearIsometryEquiv.symm b.repr) (lp.single 2 i 1)) i) =\n    ↑b.repr\n      (↑(LinearIsometryEquiv.toContinuousLinearEquiv (LinearIsometryEquiv.symm b.repr))\n        ((fun i => lp.single 2 i (↑f i)) i))\n[PROOFSTEP]\nrw [mul_one] at this \n[GOAL]\ncase H.h.a\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nb : HilbertBasis ι 𝕜 E\nf : { x // x ∈ lp (fun i => 𝕜) 2 }\ni : ι\nthis✝ : NormedSpace 𝕜 { x // x ∈ lp (fun _i => 𝕜) 2 } := inferInstance\nthis : lp.single 2 i (↑f i) = ↑f i • lp.single 2 i 1\n⊢ ↑b.repr (↑f i • (fun i => ↑(LinearIsometryEquiv.symm b.repr) (lp.single 2 i 1)) i) =\n    ↑b.repr\n      (↑(LinearIsometryEquiv.toContinuousLinearEquiv (LinearIsometryEquiv.symm b.repr))\n        ((fun i => lp.single 2 i (↑f i)) i))\n[PROOFSTEP]\nrw [LinearIsometryEquiv.map_smul, b.repr_self, ← this, LinearIsometryEquiv.coe_toContinuousLinearEquiv]\n[GOAL]\ncase H.h.a\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nb : HilbertBasis ι 𝕜 E\nf : { x // x ∈ lp (fun i => 𝕜) 2 }\ni : ι\nthis✝ : NormedSpace 𝕜 { x // x ∈ lp (fun _i => 𝕜) 2 } := inferInstance\nthis : lp.single 2 i (↑f i) = ↑f i • lp.single 2 i 1\n⊢ lp.single 2 i (↑f i) = ↑b.repr (↑(LinearIsometryEquiv.symm b.repr) ((fun i => lp.single 2 i (↑f i)) i))\n[PROOFSTEP]\nexact (b.repr.apply_symm_apply (lp.single 2 i (f i))).symm\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nb : HilbertBasis ι 𝕜 E\nx : E\n⊢ HasSum (fun i => ↑(↑b.repr x) i • (fun i => ↑(LinearIsometryEquiv.symm b.repr) (lp.single 2 i 1)) i) x\n[PROOFSTEP]\nsimpa using b.hasSum_repr_symm (b.repr x)\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nb : HilbertBasis ι 𝕜 E\n⊢ topologicalClosure (span 𝕜 (Set.range fun i => ↑(LinearIsometryEquiv.symm b.repr) (lp.single 2 i 1))) = ⊤\n[PROOFSTEP]\nclassical\nrw [eq_top_iff]\nrintro x -\nrefine' mem_closure_of_tendsto (b.hasSum_repr x) (eventually_of_forall _)\nintro s\nsimp only [SetLike.mem_coe]\nrefine' sum_mem _\nrintro i -\nrefine' smul_mem _ _ _\nexact subset_span ⟨i, rfl⟩\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nb : HilbertBasis ι 𝕜 E\n⊢ topologicalClosure (span 𝕜 (Set.range fun i => ↑(LinearIsometryEquiv.symm b.repr) (lp.single 2 i 1))) = ⊤\n[PROOFSTEP]\nrw [eq_top_iff]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nb : HilbertBasis ι 𝕜 E\n⊢ ⊤ ≤ topologicalClosure (span 𝕜 (Set.range fun i => ↑(LinearIsometryEquiv.symm b.repr) (lp.single 2 i 1)))\n[PROOFSTEP]\nrintro x -\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nb : HilbertBasis ι 𝕜 E\nx : E\n⊢ x ∈ topologicalClosure (span 𝕜 (Set.range fun i => ↑(LinearIsometryEquiv.symm b.repr) (lp.single 2 i 1)))\n[PROOFSTEP]\nrefine' mem_closure_of_tendsto (b.hasSum_repr x) (eventually_of_forall _)\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nb : HilbertBasis ι 𝕜 E\nx : E\n⊢ ∀ (x_1 : Finset ι),\n    ∑ b_1 in x_1, (fun i => ↑(↑b.repr x) i • (fun i => ↑(LinearIsometryEquiv.symm b.repr) (lp.single 2 i 1)) i) b_1 ∈\n      ↑(span 𝕜 (Set.range fun i => ↑(LinearIsometryEquiv.symm b.repr) (lp.single 2 i 1)))\n[PROOFSTEP]\nintro s\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nb : HilbertBasis ι 𝕜 E\nx : E\ns : Finset ι\n⊢ ∑ b_1 in s, (fun i => ↑(↑b.repr x) i • (fun i => ↑(LinearIsometryEquiv.symm b.repr) (lp.single 2 i 1)) i) b_1 ∈\n    ↑(span 𝕜 (Set.range fun i => ↑(LinearIsometryEquiv.symm b.repr) (lp.single 2 i 1)))\n[PROOFSTEP]\nsimp only [SetLike.mem_coe]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nb : HilbertBasis ι 𝕜 E\nx : E\ns : Finset ι\n⊢ ∑ x_1 in s, ↑(↑b.repr x) x_1 • ↑(LinearIsometryEquiv.symm b.repr) (lp.single 2 x_1 1) ∈\n    span 𝕜 (Set.range fun i => ↑(LinearIsometryEquiv.symm b.repr) (lp.single 2 i 1))\n[PROOFSTEP]\nrefine' sum_mem _\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nb : HilbertBasis ι 𝕜 E\nx : E\ns : Finset ι\n⊢ ∀ (c : ι),\n    c ∈ s →\n      ↑(↑b.repr x) c • ↑(LinearIsometryEquiv.symm b.repr) (lp.single 2 c 1) ∈\n        span 𝕜 (Set.range fun i => ↑(LinearIsometryEquiv.symm b.repr) (lp.single 2 i 1))\n[PROOFSTEP]\nrintro i -\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nb : HilbertBasis ι 𝕜 E\nx : E\ns : Finset ι\ni : ι\n⊢ ↑(↑b.repr x) i • ↑(LinearIsometryEquiv.symm b.repr) (lp.single 2 i 1) ∈\n    span 𝕜 (Set.range fun i => ↑(LinearIsometryEquiv.symm b.repr) (lp.single 2 i 1))\n[PROOFSTEP]\nrefine' smul_mem _ _ _\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nb : HilbertBasis ι 𝕜 E\nx : E\ns : Finset ι\ni : ι\n⊢ ↑(LinearIsometryEquiv.symm b.repr) (lp.single 2 i 1) ∈\n    span 𝕜 (Set.range fun i => ↑(LinearIsometryEquiv.symm b.repr) (lp.single 2 i 1))\n[PROOFSTEP]\nexact subset_span ⟨i, rfl⟩\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nb : HilbertBasis ι 𝕜 E\nx y : E\n⊢ HasSum\n    (fun i =>\n      inner x ((fun i => ↑(LinearIsometryEquiv.symm b.repr) (lp.single 2 i 1)) i) *\n        inner ((fun i => ↑(LinearIsometryEquiv.symm b.repr) (lp.single 2 i 1)) i) y)\n    (inner x y)\n[PROOFSTEP]\nconvert (b.hasSum_repr y).mapL (innerSL _ x) using 1\n[GOAL]\ncase h.e'_5\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nb : HilbertBasis ι 𝕜 E\nx y : E\n⊢ (fun i =>\n      inner x ((fun i => ↑(LinearIsometryEquiv.symm b.repr) (lp.single 2 i 1)) i) *\n        inner ((fun i => ↑(LinearIsometryEquiv.symm b.repr) (lp.single 2 i 1)) i) y) =\n    fun b_1 =>\n    ↑(↑(innerSL 𝕜) x) (↑(↑b.repr y) b_1 • (fun i => ↑(LinearIsometryEquiv.symm b.repr) (lp.single 2 i 1)) b_1)\n[PROOFSTEP]\next i\n[GOAL]\ncase h.e'_5.h\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nb : HilbertBasis ι 𝕜 E\nx y : E\ni : ι\n⊢ inner x ((fun i => ↑(LinearIsometryEquiv.symm b.repr) (lp.single 2 i 1)) i) *\n      inner ((fun i => ↑(LinearIsometryEquiv.symm b.repr) (lp.single 2 i 1)) i) y =\n    ↑(↑(innerSL 𝕜) x) (↑(↑b.repr y) i • (fun i => ↑(LinearIsometryEquiv.symm b.repr) (lp.single 2 i 1)) i)\n[PROOFSTEP]\nrw [innerSL_apply, b.repr_apply_apply, inner_smul_right, mul_comm]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁵ : IsROrC 𝕜\nE : Type u_3\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝² : (i : ι) → NormedAddCommGroup (G i)\ninst✝¹ : (i : ι) → InnerProductSpace 𝕜 (G i)\ninst✝ : Fintype ι\nb : HilbertBasis ι 𝕜 E\n⊢ ⊤ ≤ span 𝕜 (Set.range fun i => ↑(LinearIsometryEquiv.symm b.repr) (lp.single 2 i 1))\n[PROOFSTEP]\nrefine' Eq.ge _\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁵ : IsROrC 𝕜\nE : Type u_3\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝² : (i : ι) → NormedAddCommGroup (G i)\ninst✝¹ : (i : ι) → InnerProductSpace 𝕜 (G i)\ninst✝ : Fintype ι\nb : HilbertBasis ι 𝕜 E\n⊢ span 𝕜 (Set.range fun i => ↑(LinearIsometryEquiv.symm b.repr) (lp.single 2 i 1)) = ⊤\n[PROOFSTEP]\nhave := (span 𝕜 (Finset.univ.image b : Set E)).closed_of_finiteDimensional\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁵ : IsROrC 𝕜\nE : Type u_3\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝² : (i : ι) → NormedAddCommGroup (G i)\ninst✝¹ : (i : ι) → InnerProductSpace 𝕜 (G i)\ninst✝ : Fintype ι\nb : HilbertBasis ι 𝕜 E\nthis : IsClosed ↑(span 𝕜 ↑(Finset.image (fun i => ↑(LinearIsometryEquiv.symm b.repr) (lp.single 2 i 1)) Finset.univ))\n⊢ span 𝕜 (Set.range fun i => ↑(LinearIsometryEquiv.symm b.repr) (lp.single 2 i 1)) = ⊤\n[PROOFSTEP]\nsimpa only [Finset.coe_image, Finset.coe_univ, Set.image_univ, HilbertBasis.dense_span] using\n  this.submodule_topologicalClosure_eq.symm\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁵ : IsROrC 𝕜\nE : Type u_3\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝² : (i : ι) → NormedAddCommGroup (G i)\ninst✝¹ : (i : ι) → InnerProductSpace 𝕜 (G i)\nU : Submodule 𝕜 E\ninst✝ : CompleteSpace { x // x ∈ U }\nb : HilbertBasis ι 𝕜 { x // x ∈ U }\nx : E\n⊢ HasSum\n    (fun i =>\n      inner (↑((fun i => ↑(LinearIsometryEquiv.symm b.repr) (lp.single 2 i 1)) i)) x •\n        (fun i => ↑(LinearIsometryEquiv.symm b.repr) (lp.single 2 i 1)) i)\n    (↑(orthogonalProjection U) x)\n[PROOFSTEP]\nsimpa only [b.repr_apply_apply, inner_orthogonalProjection_eq_of_mem_left] using\n  b.hasSum_repr (orthogonalProjection U x)\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nb : HilbertBasis ι 𝕜 E\n⊢ topologicalClosure (span 𝕜 (Set.range fun i => ↑(LinearIsometryEquiv.symm b.repr) (lp.single 2 i 1))) ≤\n    topologicalClosure\n      (⨆ (J : Finset ι), span 𝕜 ↑(Finset.image (fun i => ↑(LinearIsometryEquiv.symm b.repr) (lp.single 2 i 1)) J))\n[PROOFSTEP]\nsimp_rw [← Submodule.span_iUnion]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nb : HilbertBasis ι 𝕜 E\n⊢ topologicalClosure (span 𝕜 (Set.range fun i => ↑(LinearIsometryEquiv.symm b.repr) (lp.single 2 i 1))) ≤\n    topologicalClosure\n      (span 𝕜 (⋃ (i : Finset ι), ↑(Finset.image (fun i => ↑(LinearIsometryEquiv.symm b.repr) (lp.single 2 i 1)) i)))\n[PROOFSTEP]\nexact\n  topologicalClosure_mono\n    (span_mono <|\n      Set.range_subset_iff.mpr fun i =>\n        Set.mem_iUnion_of_mem { i } <| Finset.mem_coe.mpr <| Finset.mem_image_of_mem _ <| Finset.mem_singleton_self i)\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nv : ι → E\nhv : Orthonormal 𝕜 v\nh : ⊤ ≤ topologicalClosure (span 𝕜 (Set.range v))\ni : ι\n⊢ ↑(LinearIsometryEquiv.symm\n          (IsHilbertSum.linearIsometryEquiv\n            (_ : IsHilbertSum 𝕜 (fun x => 𝕜) fun i => LinearIsometry.toSpanSingleton 𝕜 E (_ : ‖v i‖ = 1))))\n      (lp.single 2 i 1) =\n    v i\n[PROOFSTEP]\nrw [IsHilbertSum.linearIsometryEquiv_symm_apply_single, LinearIsometry.toSpanSingleton_apply, one_smul]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nv : ι → E\nhv : Orthonormal 𝕜 v\nhsp : ⊤ ≤ topologicalClosure (span 𝕜 (Set.range v))\n⊢ (fun i => ↑(LinearIsometryEquiv.symm (HilbertBasis.mk hv hsp).repr) (lp.single 2 i 1)) = v\n[PROOFSTEP]\napply funext <| Orthonormal.linearIsometryEquiv_symm_apply_single_one hv hsp\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nv : ι → E\nhv : Orthonormal 𝕜 v\nhsp : (span 𝕜 (Set.range v))ᗮ = ⊥\n⊢ ⊤ ≤ topologicalClosure (span 𝕜 (Set.range v))\n[PROOFSTEP]\nrw [← orthogonal_orthogonal_eq_closure, ← eq_top_iff, orthogonal_eq_top_iff, hsp]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁵ : IsROrC 𝕜\nE : Type u_3\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝² : (i : ι) → NormedAddCommGroup (G i)\ninst✝¹ : (i : ι) → InnerProductSpace 𝕜 (G i)\nv : ι → E\nhv : Orthonormal 𝕜 v\ninst✝ : Fintype ι\nb : OrthonormalBasis ι 𝕜 E\n⊢ ⊤ ≤ topologicalClosure (span 𝕜 (Set.range ↑b))\n[PROOFSTEP]\nsimpa only [← OrthonormalBasis.coe_toBasis, b.toBasis.span_eq, eq_top_iff] using @subset_closure E _ _\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\ninst✝⁴ : IsROrC 𝕜\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ncplt : CompleteSpace E\nG : ι → Type u_4\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nv : ι → E\nhv : Orthonormal 𝕜 v\ns : Set E\nhs : Orthonormal 𝕜 Subtype.val\nw : Set E\nhws : w ⊇ s\nhw_ortho : Orthonormal 𝕜 Subtype.val\nhw_max : ∀ (u : Set E), u ⊇ w → Orthonormal 𝕜 Subtype.val → u = w\n⊢ (span 𝕜 (Set.range Subtype.val))ᗮ = ⊥\n[PROOFSTEP]\nsimpa [maximal_orthonormal_iff_orthogonalComplement_eq_bot hw_ortho] using hw_max\n", "meta": {"mathlib_filename": "Mathlib.Analysis.InnerProductSpace.l2Space", "llama_tokens": 40302, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8221891218080991, "lm_q2_score": 0.6654105521116443, "lm_q1q2_score": 0.5470933174825152}}
{"text": "[GOAL]\nn : ℕ\nA : Type u\nF : A → TypeVec n → Type u\ninst✝¹ : (α : A) → MvFunctor (F α)\ninst✝ : (α : A) → MvQPF (F α)\n⊢ ∀ {α : TypeVec n} (x : Sigma F α), (fun {α} => Sigma.abs F) ((fun {α} => Sigma.repr F) x) = x\n[PROOFSTEP]\nrintro α ⟨x, f⟩\n[GOAL]\ncase mk\nn : ℕ\nA : Type u\nF : A → TypeVec n → Type u\ninst✝¹ : (α : A) → MvFunctor (F α)\ninst✝ : (α : A) → MvQPF (F α)\nα : TypeVec n\nx : A\nf : F x α\n⊢ (fun {α} => Sigma.abs F) ((fun {α} => Sigma.repr F) { fst := x, snd := f }) = { fst := x, snd := f }\n[PROOFSTEP]\nsimp only [Sigma.abs, Sigma.repr, Sigma.eta, abs_repr]\n[GOAL]\nn : ℕ\nA : Type u\nF : A → TypeVec n → Type u\ninst✝¹ : (α : A) → MvFunctor (F α)\ninst✝ : (α : A) → MvQPF (F α)\n⊢ ∀ {α β : TypeVec n} (f : α ⟹ β) (p : MvPFunctor.Obj (Sigma.P F) α),\n    (fun {α} => Sigma.abs F) (f <$$> p) = f <$$> (fun {α} => Sigma.abs F) p\n[PROOFSTEP]\nrintro α β f ⟨x, g⟩\n[GOAL]\ncase mk\nn : ℕ\nA : Type u\nF : A → TypeVec n → Type u\ninst✝¹ : (α : A) → MvFunctor (F α)\ninst✝ : (α : A) → MvQPF (F α)\nα β : TypeVec n\nf : α ⟹ β\nx : (Sigma.P F).A\ng : MvPFunctor.B (Sigma.P F) x ⟹ α\n⊢ (fun {α} => Sigma.abs F) (f <$$> { fst := x, snd := g }) = f <$$> (fun {α} => Sigma.abs F) { fst := x, snd := g }\n[PROOFSTEP]\nsimp only [Sigma.abs, MvPFunctor.map_eq]\n[GOAL]\ncase mk\nn : ℕ\nA : Type u\nF : A → TypeVec n → Type u\ninst✝¹ : (α : A) → MvFunctor (F α)\ninst✝ : (α : A) → MvQPF (F α)\nα β : TypeVec n\nf : α ⟹ β\nx : (Sigma.P F).A\ng : MvPFunctor.B (Sigma.P F) x ⟹ α\n⊢ { fst := x.fst, snd := abs { fst := x.snd, snd := f ⊚ g } } =\n    f <$$> { fst := x.fst, snd := abs { fst := x.snd, snd := g } }\n[PROOFSTEP]\nsimp only [(· <$$> ·), ← abs_map, ← MvPFunctor.map_eq]\n[GOAL]\nn : ℕ\nA : Type u\nF : A → TypeVec n → Type u\ninst✝¹ : (α : A) → MvFunctor (F α)\ninst✝ : (α : A) → MvQPF (F α)\n⊢ ∀ {α : TypeVec n} (x : Pi F α), Pi.abs F (Pi.repr F x) = x\n[PROOFSTEP]\nrintro α f\n[GOAL]\nn : ℕ\nA : Type u\nF : A → TypeVec n → Type u\ninst✝¹ : (α : A) → MvFunctor (F α)\ninst✝ : (α : A) → MvQPF (F α)\nα : TypeVec n\nf : Pi F α\n⊢ Pi.abs F (Pi.repr F f) = f\n[PROOFSTEP]\nsimp only [Pi.abs, Pi.repr, Sigma.eta, abs_repr]\n[GOAL]\nn : ℕ\nA : Type u\nF : A → TypeVec n → Type u\ninst✝¹ : (α : A) → MvFunctor (F α)\ninst✝ : (α : A) → MvQPF (F α)\n⊢ ∀ {α β : TypeVec n} (f : α ⟹ β) (p : MvPFunctor.Obj (Pi.P F) α), Pi.abs F (f <$$> p) = f <$$> Pi.abs F p\n[PROOFSTEP]\nrintro α β f ⟨x, g⟩\n[GOAL]\ncase mk\nn : ℕ\nA : Type u\nF : A → TypeVec n → Type u\ninst✝¹ : (α : A) → MvFunctor (F α)\ninst✝ : (α : A) → MvQPF (F α)\nα β : TypeVec n\nf : α ⟹ β\nx : (Pi.P F).A\ng : MvPFunctor.B (Pi.P F) x ⟹ α\n⊢ Pi.abs F (f <$$> { fst := x, snd := g }) = f <$$> Pi.abs F { fst := x, snd := g }\n[PROOFSTEP]\nsimp only [Pi.abs, (· <$$> ·), ← abs_map]\n[GOAL]\ncase mk\nn : ℕ\nA : Type u\nF : A → TypeVec n → Type u\ninst✝¹ : (α : A) → MvFunctor (F α)\ninst✝ : (α : A) → MvQPF (F α)\nα β : TypeVec n\nf : α ⟹ β\nx : (Pi.P F).A\ng : MvPFunctor.B (Pi.P F) x ⟹ α\n⊢ (match MvPFunctor.map (Pi.P F) f { fst := x, snd := g } with\n    | { fst := a, snd := f } => fun x => abs { fst := a x, snd := fun i y => f i { fst := x, snd := y } }) =\n    fun a => abs (MvPFunctor.map (P (F a)) f { fst := x a, snd := fun i y => g i { fst := a, snd := y } })\n[PROOFSTEP]\nrfl\n", "meta": {"mathlib_filename": "Mathlib.Data.QPF.Multivariate.Constructions.Sigma", "llama_tokens": 1728, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8539127417985636, "lm_q2_score": 0.640635854839898, "lm_q1q2_score": 0.547047119300804}}
{"text": "[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝ : ConditionallyCompleteLinearOrder R\nsrc✝¹ : ConditionallyCompleteLattice (Tropical R) := instConditionallyCompleteLatticeTropical\nsrc✝ : LinearOrder (Tropical R) := instLinearOrderTropical\n⊢ ∀ (s : Set (Tropical R)), ¬BddAbove s → sSup s = sSup Set.univ\n[PROOFSTEP]\nintro s hs\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝ : ConditionallyCompleteLinearOrder R\nsrc✝¹ : ConditionallyCompleteLattice (Tropical R) := instConditionallyCompleteLatticeTropical\nsrc✝ : LinearOrder (Tropical R) := instLinearOrderTropical\ns : Set (Tropical R)\nhs : ¬BddAbove s\n⊢ sSup s = sSup Set.univ\n[PROOFSTEP]\nhave : Set.range untrop = (Set.univ : Set R) := Equiv.range_eq_univ tropEquiv.symm\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝ : ConditionallyCompleteLinearOrder R\nsrc✝¹ : ConditionallyCompleteLattice (Tropical R) := instConditionallyCompleteLatticeTropical\nsrc✝ : LinearOrder (Tropical R) := instLinearOrderTropical\ns : Set (Tropical R)\nhs : ¬BddAbove s\nthis : Set.range untrop = Set.univ\n⊢ sSup s = sSup Set.univ\n[PROOFSTEP]\nsimp [sSup, this]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝ : ConditionallyCompleteLinearOrder R\nsrc✝¹ : ConditionallyCompleteLattice (Tropical R) := instConditionallyCompleteLatticeTropical\nsrc✝ : LinearOrder (Tropical R) := instLinearOrderTropical\ns : Set (Tropical R)\nhs : ¬BddAbove s\nthis : Set.range untrop = Set.univ\n⊢ sSup (untrop '' s) = sSup Set.univ\n[PROOFSTEP]\napply csSup_of_not_bddAbove\n[GOAL]\ncase hs\nR : Type u_1\nS : Type u_2\ninst✝ : ConditionallyCompleteLinearOrder R\nsrc✝¹ : ConditionallyCompleteLattice (Tropical R) := instConditionallyCompleteLatticeTropical\nsrc✝ : LinearOrder (Tropical R) := instLinearOrderTropical\ns : Set (Tropical R)\nhs : ¬BddAbove s\nthis : Set.range untrop = Set.univ\n⊢ ¬BddAbove (untrop '' s)\n[PROOFSTEP]\ncontrapose! hs\n[GOAL]\ncase hs\nR : Type u_1\nS : Type u_2\ninst✝ : ConditionallyCompleteLinearOrder R\nsrc✝¹ : ConditionallyCompleteLattice (Tropical R) := instConditionallyCompleteLatticeTropical\nsrc✝ : LinearOrder (Tropical R) := instLinearOrderTropical\ns : Set (Tropical R)\nthis : Set.range untrop = Set.univ\nhs : BddAbove (untrop '' s)\n⊢ BddAbove s\n[PROOFSTEP]\nchange BddAbove (tropOrderIso.symm '' s) at hs \n[GOAL]\ncase hs\nR : Type u_1\nS : Type u_2\ninst✝ : ConditionallyCompleteLinearOrder R\nsrc✝¹ : ConditionallyCompleteLattice (Tropical R) := instConditionallyCompleteLatticeTropical\nsrc✝ : LinearOrder (Tropical R) := instLinearOrderTropical\ns : Set (Tropical R)\nthis : Set.range untrop = Set.univ\nhs : BddAbove (↑(OrderIso.symm tropOrderIso) '' s)\n⊢ BddAbove s\n[PROOFSTEP]\nexact tropOrderIso.symm.bddAbove_image.1 hs\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝ : ConditionallyCompleteLinearOrder R\nsrc✝¹ : ConditionallyCompleteLattice (Tropical R) := instConditionallyCompleteLatticeTropical\nsrc✝ : LinearOrder (Tropical R) := instLinearOrderTropical\n⊢ ∀ (s : Set (Tropical R)), ¬BddBelow s → sInf s = sInf Set.univ\n[PROOFSTEP]\nintro s hs\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝ : ConditionallyCompleteLinearOrder R\nsrc✝¹ : ConditionallyCompleteLattice (Tropical R) := instConditionallyCompleteLatticeTropical\nsrc✝ : LinearOrder (Tropical R) := instLinearOrderTropical\ns : Set (Tropical R)\nhs : ¬BddBelow s\n⊢ sInf s = sInf Set.univ\n[PROOFSTEP]\nhave : Set.range untrop = (Set.univ : Set R) := Equiv.range_eq_univ tropEquiv.symm\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝ : ConditionallyCompleteLinearOrder R\nsrc✝¹ : ConditionallyCompleteLattice (Tropical R) := instConditionallyCompleteLatticeTropical\nsrc✝ : LinearOrder (Tropical R) := instLinearOrderTropical\ns : Set (Tropical R)\nhs : ¬BddBelow s\nthis : Set.range untrop = Set.univ\n⊢ sInf s = sInf Set.univ\n[PROOFSTEP]\nsimp [sInf, this]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝ : ConditionallyCompleteLinearOrder R\nsrc✝¹ : ConditionallyCompleteLattice (Tropical R) := instConditionallyCompleteLatticeTropical\nsrc✝ : LinearOrder (Tropical R) := instLinearOrderTropical\ns : Set (Tropical R)\nhs : ¬BddBelow s\nthis : Set.range untrop = Set.univ\n⊢ sInf (untrop '' s) = sInf Set.univ\n[PROOFSTEP]\napply csInf_of_not_bddBelow\n[GOAL]\ncase hs\nR : Type u_1\nS : Type u_2\ninst✝ : ConditionallyCompleteLinearOrder R\nsrc✝¹ : ConditionallyCompleteLattice (Tropical R) := instConditionallyCompleteLatticeTropical\nsrc✝ : LinearOrder (Tropical R) := instLinearOrderTropical\ns : Set (Tropical R)\nhs : ¬BddBelow s\nthis : Set.range untrop = Set.univ\n⊢ ¬BddBelow (untrop '' s)\n[PROOFSTEP]\ncontrapose! hs\n[GOAL]\ncase hs\nR : Type u_1\nS : Type u_2\ninst✝ : ConditionallyCompleteLinearOrder R\nsrc✝¹ : ConditionallyCompleteLattice (Tropical R) := instConditionallyCompleteLatticeTropical\nsrc✝ : LinearOrder (Tropical R) := instLinearOrderTropical\ns : Set (Tropical R)\nthis : Set.range untrop = Set.univ\nhs : BddBelow (untrop '' s)\n⊢ BddBelow s\n[PROOFSTEP]\nchange BddBelow (tropOrderIso.symm '' s) at hs \n[GOAL]\ncase hs\nR : Type u_1\nS : Type u_2\ninst✝ : ConditionallyCompleteLinearOrder R\nsrc✝¹ : ConditionallyCompleteLattice (Tropical R) := instConditionallyCompleteLatticeTropical\nsrc✝ : LinearOrder (Tropical R) := instLinearOrderTropical\ns : Set (Tropical R)\nthis : Set.range untrop = Set.univ\nhs : BddBelow (↑(OrderIso.symm tropOrderIso) '' s)\n⊢ BddBelow s\n[PROOFSTEP]\nexact tropOrderIso.symm.bddBelow_image.1 hs\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Tropical.Lattice", "llama_tokens": 2090, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7577943712746406, "lm_q2_score": 0.721743206297598, "lm_q1q2_score": 0.5469329392380315}}
{"text": "[GOAL]\nα : Type u_1\nn : ℕ\nr : α → α → Prop\ninst✝ : IsTrans α r\nf : Fin (n + 1) → α\na : α\n⊢ ((fun x x_1 => x < x_1) ⇒ r) (vecCons a f) (vecCons a f) ↔ r a (f 0) ∧ ((fun x x_1 => x < x_1) ⇒ r) f f\n[PROOFSTEP]\nsimp only [liftFun_iff_succ r, forall_fin_succ, cons_val_succ, cons_val_zero, ← succ_castSucc, castSucc_zero]\n[GOAL]\nα : Type u_1\ninst✝ : Preorder α\nn : ℕ\nf : Fin (n + 1) → α\na : α\n⊢ Monotone (vecCons a f) ↔ a ≤ f 0 ∧ Monotone f\n[PROOFSTEP]\nsimpa only [monotone_iff_forall_lt] using @liftFun_vecCons α n (· ≤ ·) _ f a\n[GOAL]\nα : Type u_1\ninst✝ : Preorder α\nn : ℕ\nf : Fin (n + 1) → α\na : α\n⊢ Monotone ![1, 2, 2, 3]\n[PROOFSTEP]\nsimp\n", "meta": {"mathlib_filename": "Mathlib.Data.Fin.Tuple.Monotone", "llama_tokens": 344, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8175744761936435, "lm_q2_score": 0.6688802537704063, "lm_q1q2_score": 0.5468594231126113}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nM : Type u_4\ninst✝¹ : Monoid M\nN : Type u_5\ninst✝ : Monoid N\nxs : List (FreeMonoid α)\n⊢ ↑toList (List.prod xs) = List.join (List.map (↑toList) xs)\n[PROOFSTEP]\ninduction xs\n[GOAL]\ncase nil\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nM : Type u_4\ninst✝¹ : Monoid M\nN : Type u_5\ninst✝ : Monoid N\n⊢ ↑toList (List.prod []) = List.join (List.map ↑toList [])\n[PROOFSTEP]\nsimp [*, List.join]\n[GOAL]\ncase cons\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nM : Type u_4\ninst✝¹ : Monoid M\nN : Type u_5\ninst✝ : Monoid N\nhead✝ : FreeMonoid α\ntail✝ : List (FreeMonoid α)\ntail_ih✝ : ↑toList (List.prod tail✝) = List.join (List.map (↑toList) tail✝)\n⊢ ↑toList (List.prod (head✝ :: tail✝)) = List.join (List.map (↑toList) (head✝ :: tail✝))\n[PROOFSTEP]\nsimp [*, List.join]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nM : Type u_4\ninst✝¹ : Monoid M\nN : Type u_5\ninst✝ : Monoid N\nxs : List (List α)\n⊢ ↑toList (↑ofList (List.join xs)) = ↑toList (List.prod (List.map (↑ofList) xs))\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nM : Type u_4\ninst✝¹ : Monoid M\nN : Type u_5\ninst✝ : Monoid N\nf g : FreeMonoid α →* M\nh : ∀ (x : α), ↑f (of x) = ↑g (of x)\nl : FreeMonoid α\nx : α\nxs : FreeMonoid α\nhxs : ↑f xs = ↑g xs\n⊢ ↑f (of x * xs) = ↑g (of x * xs)\n[PROOFSTEP]\nsimp only [h, hxs, MonoidHom.map_mul]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nM : Type u_4\ninst✝¹ : Monoid M\nN : Type u_5\ninst✝ : Monoid N\nf : α → M\nx✝¹ x✝ : FreeMonoid α\n⊢ OneHom.toFun\n      { toFun := fun l => prodAux (List.map f (↑toList l)),\n        map_one' :=\n          (_ : (fun l => prodAux (List.map f (↑toList l))) 1 = (fun l => prodAux (List.map f (↑toList l))) 1) }\n      (x✝¹ * x✝) =\n    OneHom.toFun\n        { toFun := fun l => prodAux (List.map f (↑toList l)),\n          map_one' :=\n            (_ : (fun l => prodAux (List.map f (↑toList l))) 1 = (fun l => prodAux (List.map f (↑toList l))) 1) }\n        x✝¹ *\n      OneHom.toFun\n        { toFun := fun l => prodAux (List.map f (↑toList l)),\n          map_one' :=\n            (_ : (fun l => prodAux (List.map f (↑toList l))) 1 = (fun l => prodAux (List.map f (↑toList l))) 1) }\n        x✝\n[PROOFSTEP]\nsimp only [prodAux_eq, toList_mul, List.map_append, List.prod_append]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nM : Type u_4\ninst✝¹ : Monoid M\nN : Type u_5\ninst✝ : Monoid N\ng : M →* N\nf : α → M\n⊢ MonoidHom.comp g (↑lift f) = ↑lift (↑g ∘ f)\n[PROOFSTEP]\next\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nM : Type u_4\ninst✝¹ : Monoid M\nN : Type u_5\ninst✝ : Monoid N\ng : M →* N\nf : α → M\nx✝ : α\n⊢ ↑(MonoidHom.comp g (↑lift f)) (of x✝) = ↑(↑lift (↑g ∘ f)) (of x✝)\n[PROOFSTEP]\nsimp\n", "meta": {"mathlib_filename": "Mathlib.Algebra.FreeMonoid.Basic", "llama_tokens": 1323, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.793105951184112, "lm_q2_score": 0.6893056231680121, "lm_q1q2_score": 0.5466923919192234}}
{"text": "[GOAL]\nF : Type u_1\nι : Type u_2\nα : Type u_3\nβ : Type u_4\na : ℤ\nb : ℕ\nhb : b ≠ 0\n⊢ toNat a < b ↔ a < ↑b\n[PROOFSTEP]\nrw [← toNat_lt_toNat, toNat_coe_nat]\n[GOAL]\nF : Type u_1\nι : Type u_2\nα : Type u_3\nβ : Type u_4\na : ℤ\nb : ℕ\nhb : b ≠ 0\n⊢ 0 < ↑b\n[PROOFSTEP]\nexact coe_nat_pos.2 hb.bot_lt\n[GOAL]\nF : Type u_1\nι : Type u_2\nα : Type u_3\nβ : Type u_4\ninst✝ : NonAssocRing α\nm : ℤ\n⊢ ∀ (n : ℤ), ↑(0 * n) = ↑0 * ↑n\n[PROOFSTEP]\nsimp\n[GOAL]\nF : Type u_1\nι : Type u_2\nα : Type u_3\nβ : Type u_4\ninst✝ : NonAssocRing α\nm k : ℤ\nx✝ : 0 ≤ k\nih : ∀ (n : ℤ), ↑(k * n) = ↑k * ↑n\nn : ℤ\n⊢ ↑((k + 1) * n) = ↑(k + 1) * ↑n\n[PROOFSTEP]\nsimp [add_mul, ih]\n[GOAL]\nF : Type u_1\nι : Type u_2\nα : Type u_3\nβ : Type u_4\ninst✝ : NonAssocRing α\nm k : ℤ\nx✝ : k ≤ 0\nih : ∀ (n : ℤ), ↑(k * n) = ↑k * ↑n\nn : ℤ\n⊢ ↑((k - 1) * n) = ↑(k - 1) * ↑n\n[PROOFSTEP]\nsimp [sub_mul, ih]\n[GOAL]\nF : Type u_1\nι : Type u_2\nα : Type u_3\nβ : Type u_4\ninst✝ : NonAssocRing α\nn : ℕ\nx : α\n⊢ Commute (↑↑n) x\n[PROOFSTEP]\nsimpa using n.cast_commute x\n[GOAL]\nF : Type u_1\nι : Type u_2\nα : Type u_3\nβ : Type u_4\ninst✝ : NonAssocRing α\nn : ℕ\nx : α\n⊢ Commute (↑-[n+1]) x\n[PROOFSTEP]\nsimpa only [cast_negSucc, Commute.neg_left_iff, Commute.neg_right_iff] using (n + 1).cast_commute (-x)\n[GOAL]\nF : Type u_1\nι : Type u_2\nα : Type u_3\nβ : Type u_4\ninst✝ : OrderedRing α\n⊢ Monotone fun x => ↑x\n[PROOFSTEP]\nintro m n h\n[GOAL]\nF : Type u_1\nι : Type u_2\nα : Type u_3\nβ : Type u_4\ninst✝ : OrderedRing α\nm n : ℤ\nh : m ≤ n\n⊢ (fun x => ↑x) m ≤ (fun x => ↑x) n\n[PROOFSTEP]\nrw [← sub_nonneg] at h \n[GOAL]\nF : Type u_1\nι : Type u_2\nα : Type u_3\nβ : Type u_4\ninst✝ : OrderedRing α\nm n : ℤ\nh✝ : m ≤ n\nh : 0 ≤ n - m\n⊢ (fun x => ↑x) m ≤ (fun x => ↑x) n\n[PROOFSTEP]\nlift n - m to ℕ using h with k hk\n[GOAL]\ncase intro\nF : Type u_1\nι : Type u_2\nα : Type u_3\nβ : Type u_4\ninst✝ : OrderedRing α\nm n : ℤ\nh : m ≤ n\nk : ℕ\nhk : ↑k = n - m\n⊢ ↑m ≤ ↑n\n[PROOFSTEP]\nrw [← sub_nonneg, ← cast_sub, ← hk, cast_ofNat]\n[GOAL]\ncase intro\nF : Type u_1\nι : Type u_2\nα : Type u_3\nβ : Type u_4\ninst✝ : OrderedRing α\nm n : ℤ\nh : m ≤ n\nk : ℕ\nhk : ↑k = n - m\n⊢ 0 ≤ ↑k\n[PROOFSTEP]\nexact k.cast_nonneg\n[GOAL]\nF : Type u_1\nι : Type u_2\nα : Type u_3\nβ : Type u_4\ninst✝¹ : OrderedRing α\ninst✝ : Nontrivial α\nn : ℕ\n⊢ 0 ≤ ↑↑n ↔ 0 ≤ ↑n\n[PROOFSTEP]\nsimp\n[GOAL]\nF : Type u_1\nι : Type u_2\nα : Type u_3\nβ : Type u_4\ninst✝¹ : OrderedRing α\ninst✝ : Nontrivial α\nn : ℕ\n⊢ 0 ≤ ↑-[n+1] ↔ 0 ≤ -[n+1]\n[PROOFSTEP]\nhave : -(n : α) < 1 := lt_of_le_of_lt (by simp) zero_lt_one\n[GOAL]\nF : Type u_1\nι : Type u_2\nα : Type u_3\nβ : Type u_4\ninst✝¹ : OrderedRing α\ninst✝ : Nontrivial α\nn : ℕ\n⊢ -↑n ≤ 0\n[PROOFSTEP]\nsimp\n[GOAL]\nF : Type u_1\nι : Type u_2\nα : Type u_3\nβ : Type u_4\ninst✝¹ : OrderedRing α\ninst✝ : Nontrivial α\nn : ℕ\nthis : -↑n < 1\n⊢ 0 ≤ ↑-[n+1] ↔ 0 ≤ -[n+1]\n[PROOFSTEP]\nsimpa [(negSucc_lt_zero n).not_le, ← sub_eq_add_neg, le_neg] using this.not_le\n[GOAL]\nF : Type u_1\nι : Type u_2\nα : Type u_3\nβ : Type u_4\ninst✝¹ : OrderedRing α\ninst✝ : Nontrivial α\nm n : ℤ\n⊢ ↑m ≤ ↑n ↔ m ≤ n\n[PROOFSTEP]\nrw [← sub_nonneg, ← cast_sub, cast_nonneg, sub_nonneg]\n[GOAL]\nF : Type u_1\nι : Type u_2\nα : Type u_3\nβ : Type u_4\ninst✝¹ : OrderedRing α\ninst✝ : Nontrivial α\nn : ℤ\n⊢ ↑n ≤ 0 ↔ n ≤ 0\n[PROOFSTEP]\nrw [← cast_zero, cast_le]\n[GOAL]\nF : Type u_1\nι : Type u_2\nα : Type u_3\nβ : Type u_4\ninst✝¹ : OrderedRing α\ninst✝ : Nontrivial α\nn : ℤ\n⊢ 0 < ↑n ↔ 0 < n\n[PROOFSTEP]\nrw [← cast_zero, cast_lt]\n[GOAL]\nF : Type u_1\nι : Type u_2\nα : Type u_3\nβ : Type u_4\ninst✝¹ : OrderedRing α\ninst✝ : Nontrivial α\nn : ℤ\n⊢ ↑n < 0 ↔ n < 0\n[PROOFSTEP]\nrw [← cast_zero, cast_lt]\n[GOAL]\nF : Type u_1\nι : Type u_2\nα : Type u_3\nβ : Type u_4\ninst✝ : LinearOrderedRing α\na b n : ℤ\n⊢ ↑|a| = |↑a|\n[PROOFSTEP]\nsimp [abs_eq_max_neg]\n[GOAL]\nF : Type u_1\nι : Type u_2\nα : Type u_3\nβ : Type u_4\ninst✝ : LinearOrderedRing α\na b n : ℤ\nh : 0 < a\n⊢ 1 ≤ ↑a\n[PROOFSTEP]\nexact_mod_cast Int.add_one_le_of_lt h\n[GOAL]\nF : Type u_1\nι : Type u_2\nα : Type u_3\nβ : Type u_4\ninst✝ : LinearOrderedRing α\na b n : ℤ\nh : a < 0\n⊢ ↑a ≤ -1\n[PROOFSTEP]\nrw [← Int.cast_one, ← Int.cast_neg, cast_le]\n[GOAL]\nF : Type u_1\nι : Type u_2\nα : Type u_3\nβ : Type u_4\ninst✝ : LinearOrderedRing α\na b n : ℤ\nh : a < 0\n⊢ a ≤ -1\n[PROOFSTEP]\nexact Int.le_sub_one_of_lt h\n[GOAL]\nF : Type u_1\nι : Type u_2\nα : Type u_3\nβ : Type u_4\ninst✝ : LinearOrderedRing α\na b n : ℤ\nx : α\nhx : |x| ≤ 1\n⊢ 0 ≤ ↑n * x + ↑n * ↑n\n[PROOFSTEP]\nhave hnx : 0 < n → 0 ≤ x + n := fun hn =>\n  by\n  have := _root_.add_le_add (neg_le_of_abs_le hx) (cast_one_le_of_pos hn)\n  rwa [add_left_neg] at this \n[GOAL]\nF : Type u_1\nι : Type u_2\nα : Type u_3\nβ : Type u_4\ninst✝ : LinearOrderedRing α\na b n : ℤ\nx : α\nhx : |x| ≤ 1\nhn : 0 < n\n⊢ 0 ≤ x + ↑n\n[PROOFSTEP]\nhave := _root_.add_le_add (neg_le_of_abs_le hx) (cast_one_le_of_pos hn)\n[GOAL]\nF : Type u_1\nι : Type u_2\nα : Type u_3\nβ : Type u_4\ninst✝ : LinearOrderedRing α\na b n : ℤ\nx : α\nhx : |x| ≤ 1\nhn : 0 < n\nthis : -1 + 1 ≤ x + ↑n\n⊢ 0 ≤ x + ↑n\n[PROOFSTEP]\nrwa [add_left_neg] at this \n[GOAL]\nF : Type u_1\nι : Type u_2\nα : Type u_3\nβ : Type u_4\ninst✝ : LinearOrderedRing α\na b n : ℤ\nx : α\nhx : |x| ≤ 1\nhnx : 0 < n → 0 ≤ x + ↑n\n⊢ 0 ≤ ↑n * x + ↑n * ↑n\n[PROOFSTEP]\nhave hnx' : n < 0 → x + n ≤ 0 := fun hn =>\n  by\n  have := _root_.add_le_add (le_of_abs_le hx) (cast_le_neg_one_of_neg hn)\n  rwa [add_right_neg] at this \n[GOAL]\nF : Type u_1\nι : Type u_2\nα : Type u_3\nβ : Type u_4\ninst✝ : LinearOrderedRing α\na b n : ℤ\nx : α\nhx : |x| ≤ 1\nhnx : 0 < n → 0 ≤ x + ↑n\nhn : n < 0\n⊢ x + ↑n ≤ 0\n[PROOFSTEP]\nhave := _root_.add_le_add (le_of_abs_le hx) (cast_le_neg_one_of_neg hn)\n[GOAL]\nF : Type u_1\nι : Type u_2\nα : Type u_3\nβ : Type u_4\ninst✝ : LinearOrderedRing α\na b n : ℤ\nx : α\nhx : |x| ≤ 1\nhnx : 0 < n → 0 ≤ x + ↑n\nhn : n < 0\nthis : x + ↑n ≤ 1 + -1\n⊢ x + ↑n ≤ 0\n[PROOFSTEP]\nrwa [add_right_neg] at this \n[GOAL]\nF : Type u_1\nι : Type u_2\nα : Type u_3\nβ : Type u_4\ninst✝ : LinearOrderedRing α\na b n : ℤ\nx : α\nhx : |x| ≤ 1\nhnx : 0 < n → 0 ≤ x + ↑n\nhnx' : n < 0 → x + ↑n ≤ 0\n⊢ 0 ≤ ↑n * x + ↑n * ↑n\n[PROOFSTEP]\nrw [← mul_add, mul_nonneg_iff]\n[GOAL]\nF : Type u_1\nι : Type u_2\nα : Type u_3\nβ : Type u_4\ninst✝ : LinearOrderedRing α\na b n : ℤ\nx : α\nhx : |x| ≤ 1\nhnx : 0 < n → 0 ≤ x + ↑n\nhnx' : n < 0 → x + ↑n ≤ 0\n⊢ 0 ≤ ↑n ∧ 0 ≤ x + ↑n ∨ ↑n ≤ 0 ∧ x + ↑n ≤ 0\n[PROOFSTEP]\nrcases lt_trichotomy n 0 with (h | rfl | h)\n[GOAL]\ncase inl\nF : Type u_1\nι : Type u_2\nα : Type u_3\nβ : Type u_4\ninst✝ : LinearOrderedRing α\na b n : ℤ\nx : α\nhx : |x| ≤ 1\nhnx : 0 < n → 0 ≤ x + ↑n\nhnx' : n < 0 → x + ↑n ≤ 0\nh : n < 0\n⊢ 0 ≤ ↑n ∧ 0 ≤ x + ↑n ∨ ↑n ≤ 0 ∧ x + ↑n ≤ 0\n[PROOFSTEP]\nexact Or.inr ⟨by exact_mod_cast h.le, hnx' h⟩\n[GOAL]\nF : Type u_1\nι : Type u_2\nα : Type u_3\nβ : Type u_4\ninst✝ : LinearOrderedRing α\na b n : ℤ\nx : α\nhx : |x| ≤ 1\nhnx : 0 < n → 0 ≤ x + ↑n\nhnx' : n < 0 → x + ↑n ≤ 0\nh : n < 0\n⊢ ↑n ≤ 0\n[PROOFSTEP]\nexact_mod_cast h.le\n[GOAL]\ncase inr.inl\nF : Type u_1\nι : Type u_2\nα : Type u_3\nβ : Type u_4\ninst✝ : LinearOrderedRing α\na b : ℤ\nx : α\nhx : |x| ≤ 1\nhnx : 0 < 0 → 0 ≤ x + ↑0\nhnx' : 0 < 0 → x + ↑0 ≤ 0\n⊢ 0 ≤ ↑0 ∧ 0 ≤ x + ↑0 ∨ ↑0 ≤ 0 ∧ x + ↑0 ≤ 0\n[PROOFSTEP]\nsimp [le_total 0 x]\n[GOAL]\ncase inr.inr\nF : Type u_1\nι : Type u_2\nα : Type u_3\nβ : Type u_4\ninst✝ : LinearOrderedRing α\na b n : ℤ\nx : α\nhx : |x| ≤ 1\nhnx : 0 < n → 0 ≤ x + ↑n\nhnx' : n < 0 → x + ↑n ≤ 0\nh : 0 < n\n⊢ 0 ≤ ↑n ∧ 0 ≤ x + ↑n ∨ ↑n ≤ 0 ∧ x + ↑n ≤ 0\n[PROOFSTEP]\nexact Or.inl ⟨by exact_mod_cast h.le, hnx h⟩\n[GOAL]\nF : Type u_1\nι : Type u_2\nα : Type u_3\nβ : Type u_4\ninst✝ : LinearOrderedRing α\na b n : ℤ\nx : α\nhx : |x| ≤ 1\nhnx : 0 < n → 0 ≤ x + ↑n\nhnx' : n < 0 → x + ↑n ≤ 0\nh : 0 < n\n⊢ 0 ≤ ↑n\n[PROOFSTEP]\nexact_mod_cast h.le\n[GOAL]\nF : Type u_1\nι : Type u_2\nα : Type u_3\nβ : Type u_4\ninst✝ : LinearOrderedRing α\na b n : ℤ\n⊢ ↑(natAbs n) = ↑|n|\n[PROOFSTEP]\ncases n\n[GOAL]\ncase ofNat\nF : Type u_1\nι : Type u_2\nα : Type u_3\nβ : Type u_4\ninst✝ : LinearOrderedRing α\na b : ℤ\na✝ : ℕ\n⊢ ↑(natAbs (ofNat a✝)) = ↑|ofNat a✝|\n[PROOFSTEP]\nsimp\n[GOAL]\ncase negSucc\nF : Type u_1\nι : Type u_2\nα : Type u_3\nβ : Type u_4\ninst✝ : LinearOrderedRing α\na b : ℤ\na✝ : ℕ\n⊢ ↑(natAbs -[a✝+1]) = ↑|-[a✝+1]|\n[PROOFSTEP]\nrw [abs_eq_natAbs, natAbs_negSucc, cast_succ, cast_ofNat, cast_succ]\n[GOAL]\nF : Type u_1\nι : Type u_2\nα : Type u_3\nβ : Type u_4\nA : Type u_5\ninst✝ : AddGroupWithOne A\nf : ℤ →+ A\nh1 : ↑f 1 = 1\n⊢ ↑f 1 = ↑(castAddHom A) 1\n[PROOFSTEP]\nsimp [h1]\n[GOAL]\nF : Type u_1\nι : Type u_2\nα : Type u_3\nβ : Type u_4\nM : Type u_5\ninst✝ : Monoid M\nf g : ℤ →* M\nh_neg_one : ↑f (-1) = ↑g (-1)\nh_nat : comp f ↑ofNatHom = comp g ↑ofNatHom\n⊢ f = g\n[PROOFSTEP]\next (x | x)\n[GOAL]\ncase h.ofNat\nF : Type u_1\nι : Type u_2\nα : Type u_3\nβ : Type u_4\nM : Type u_5\ninst✝ : Monoid M\nf g : ℤ →* M\nh_neg_one : ↑f (-1) = ↑g (-1)\nh_nat : comp f ↑ofNatHom = comp g ↑ofNatHom\nx : ℕ\n⊢ ↑f (ofNat x) = ↑g (ofNat x)\n[PROOFSTEP]\nexact (FunLike.congr_fun h_nat x : _)\n[GOAL]\ncase h.negSucc\nF : Type u_1\nι : Type u_2\nα : Type u_3\nβ : Type u_4\nM : Type u_5\ninst✝ : Monoid M\nf g : ℤ →* M\nh_neg_one : ↑f (-1) = ↑g (-1)\nh_nat : comp f ↑ofNatHom = comp g ↑ofNatHom\nx : ℕ\n⊢ ↑f -[x+1] = ↑g -[x+1]\n[PROOFSTEP]\nrw [Int.negSucc_eq, ← neg_one_mul, f.map_mul, g.map_mul]\n[GOAL]\ncase h.negSucc\nF : Type u_1\nι : Type u_2\nα : Type u_3\nβ : Type u_4\nM : Type u_5\ninst✝ : Monoid M\nf g : ℤ →* M\nh_neg_one : ↑f (-1) = ↑g (-1)\nh_nat : comp f ↑ofNatHom = comp g ↑ofNatHom\nx : ℕ\n⊢ ↑f (-1) * ↑f (↑x + 1) = ↑g (-1) * ↑g (↑x + 1)\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase h.negSucc.e_a\nF : Type u_1\nι : Type u_2\nα : Type u_3\nβ : Type u_4\nM : Type u_5\ninst✝ : Monoid M\nf g : ℤ →* M\nh_neg_one : ↑f (-1) = ↑g (-1)\nh_nat : comp f ↑ofNatHom = comp g ↑ofNatHom\nx : ℕ\n⊢ ↑f (↑x + 1) = ↑g (↑x + 1)\n[PROOFSTEP]\nexact_mod_cast (FunLike.congr_fun h_nat (x + 1) : _)\n", "meta": {"mathlib_filename": "Mathlib.Data.Int.Cast.Lemmas", "llama_tokens": 5647, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7931059609645724, "lm_q2_score": 0.6893056104028799, "lm_q1q2_score": 0.5466923885368472}}
{"text": "[GOAL]\nα β : Type u\nf g : α ⟶ β\nh : ∀ (a : α), f a = g a\n⊢ f = g\n[PROOFSTEP]\nfunext x\n[GOAL]\ncase h\nα β : Type u\nf g : α ⟶ β\nh : ∀ (a : α), f a = g a\nx : α\n⊢ f x = g x\n[PROOFSTEP]\nexact h x\n[GOAL]\nα β γ : Type u\nf : α → β\ng : β → γ\ninst✝ : IsIso (↾f)\n⊢ Mono (↾f)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα β γ : Type u\nf : α → β\ng : β → γ\ninst✝ : IsIso (↾f)\n⊢ ↾f ≫ inv (↾f) = 𝟙 α\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nF G H : C ⥤ Type w\nX Y Z : C\nσ : F ⟶ G\nτ : G ⟶ H\nf : X ⟶ Y\ng : Y ⟶ Z\na : F.obj X\n⊢ F.map (f ≫ g) a = F.map g (F.map f a)\n[PROOFSTEP]\nsimp [types_comp]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nF G H : C ⥤ Type w\nX Y Z : C\nσ : F ⟶ G\nτ : G ⟶ H\na : F.obj X\n⊢ F.map (𝟙 X) a = a\n[PROOFSTEP]\nsimp [types_id]\n[GOAL]\nX : Type u\nx y : X\n⊢ x = y → homOfElement x = homOfElement y\n[PROOFSTEP]\naesop\n[GOAL]\nX Y : Type u\nf : X ⟶ Y\n⊢ Mono f ↔ Function.Injective f\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nX Y : Type u\nf : X ⟶ Y\n⊢ Mono f → Function.Injective f\n[PROOFSTEP]\nintro H x x' h\n[GOAL]\ncase mp\nX Y : Type u\nf : X ⟶ Y\nH : Mono f\nx x' : X\nh : f x = f x'\n⊢ x = x'\n[PROOFSTEP]\nskip\n[GOAL]\ncase mp\nX Y : Type u\nf : X ⟶ Y\nH : Mono f\nx x' : X\nh : f x = f x'\n⊢ x = x'\n[PROOFSTEP]\nrw [← homOfElement_eq_iff] at h ⊢\n[GOAL]\ncase mp\nX Y : Type u\nf : X ⟶ Y\nH : Mono f\nx x' : X\nh : homOfElement (f x) = homOfElement (f x')\n⊢ homOfElement x = homOfElement x'\n[PROOFSTEP]\nexact (cancel_mono f).mp h\n[GOAL]\ncase mpr\nX Y : Type u\nf : X ⟶ Y\n⊢ Function.Injective f → Mono f\n[PROOFSTEP]\nexact fun H => ⟨fun g g' h => H.comp_left h⟩\n[GOAL]\nX Y : Type u\nf : X ⟶ Y\n⊢ Epi f ↔ Function.Surjective f\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nX Y : Type u\nf : X ⟶ Y\n⊢ Epi f → Function.Surjective f\n[PROOFSTEP]\nrintro ⟨H⟩\n[GOAL]\ncase mp.mk\nX Y : Type u\nf : X ⟶ Y\nH : ∀ {Z : Type u} (g h : Y ⟶ Z), f ≫ g = f ≫ h → g = h\n⊢ Function.Surjective f\n[PROOFSTEP]\nrefine' Function.surjective_of_right_cancellable_Prop fun g₁ g₂ hg => _\n[GOAL]\ncase mp.mk\nX Y : Type u\nf : X ⟶ Y\nH : ∀ {Z : Type u} (g h : Y ⟶ Z), f ≫ g = f ≫ h → g = h\ng₁ g₂ : Y → Prop\nhg : g₁ ∘ f = g₂ ∘ f\n⊢ g₁ = g₂\n[PROOFSTEP]\nrw [← Equiv.ulift.symm.injective.comp_left.eq_iff]\n[GOAL]\ncase mp.mk\nX Y : Type u\nf : X ⟶ Y\nH : ∀ {Z : Type u} (g h : Y ⟶ Z), f ≫ g = f ≫ h → g = h\ng₁ g₂ : Y → Prop\nhg : g₁ ∘ f = g₂ ∘ f\n⊢ (fun x x_1 => x ∘ x_1) (↑Equiv.ulift.symm) g₁ = (fun x x_1 => x ∘ x_1) (↑Equiv.ulift.symm) g₂\n[PROOFSTEP]\napply H\n[GOAL]\ncase mp.mk.a\nX Y : Type u\nf : X ⟶ Y\nH : ∀ {Z : Type u} (g h : Y ⟶ Z), f ≫ g = f ≫ h → g = h\ng₁ g₂ : Y → Prop\nhg : g₁ ∘ f = g₂ ∘ f\n⊢ f ≫ (fun x x_1 => x ∘ x_1) (↑Equiv.ulift.symm) g₁ = f ≫ (fun x x_1 => x ∘ x_1) (↑Equiv.ulift.symm) g₂\n[PROOFSTEP]\nchange ULift.up ∘ g₁ ∘ f = ULift.up ∘ g₂ ∘ f\n[GOAL]\ncase mp.mk.a\nX Y : Type u\nf : X ⟶ Y\nH : ∀ {Z : Type u} (g h : Y ⟶ Z), f ≫ g = f ≫ h → g = h\ng₁ g₂ : Y → Prop\nhg : g₁ ∘ f = g₂ ∘ f\n⊢ ULift.up ∘ g₁ ∘ f = ULift.up ∘ g₂ ∘ f\n[PROOFSTEP]\nrw [hg]\n[GOAL]\ncase mpr\nX Y : Type u\nf : X ⟶ Y\n⊢ Function.Surjective f → Epi f\n[PROOFSTEP]\nexact fun H => ⟨fun g g' h => H.injective_comp_right h⟩\n[GOAL]\nm : Type u → Type v\ninst✝¹ : _root_.Functor m\ninst✝ : LawfulFunctor m\nα : Type u\n⊢ { obj := m, map := fun {X Y} f => Functor.map f }.map (𝟙 α) =\n    𝟙 ({ obj := m, map := fun {X Y} f => Functor.map f }.obj α)\n[PROOFSTEP]\nfunext X\n[GOAL]\ncase h\nm : Type u → Type v\ninst✝¹ : _root_.Functor m\ninst✝ : LawfulFunctor m\nα : Type u\nX : { obj := m, map := fun {X Y} f => Functor.map f }.obj α\n⊢ { obj := m, map := fun {X Y} f => Functor.map f }.map (𝟙 α) X =\n    𝟙 ({ obj := m, map := fun {X Y} f => Functor.map f }.obj α) X\n[PROOFSTEP]\napply id_map\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Types", "llama_tokens": 1929, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7931059560743421, "lm_q2_score": 0.6893056040203135, "lm_q1q2_score": 0.5466923801039326}}
{"text": "[GOAL]\nB : Type u_1\nF : Type u_2\nE : B → Type u_3\nx x' : B\nh : x = x'\nb : E x\n⊢ mk' F x' (cast (_ : E x = E x') b) = { proj := x, snd := b }\n[PROOFSTEP]\nsubst h\n[GOAL]\nB : Type u_1\nF : Type u_2\nE : B → Type u_3\nx : B\nb : E x\n⊢ mk' F x (cast (_ : E x = E x) b) = { proj := x, snd := b }\n[PROOFSTEP]\nrfl\n[GOAL]\nB : Type u_1\nF : Type u_2\nE : B → Type u_3\nb : B\ny y' : E b\n⊢ mk' F b y = mk' F b y' ↔ y = y'\n[PROOFSTEP]\nsimp [TotalSpace.ext_iff]\n[GOAL]\nB : Type u_1\nF : Type u_2\nE : B → Type u_3\nb : B\n⊢ range (mk b) = proj ⁻¹' {b}\n[PROOFSTEP]\napply Subset.antisymm\n[GOAL]\ncase h₁\nB : Type u_1\nF : Type u_2\nE : B → Type u_3\nb : B\n⊢ range (mk b) ⊆ proj ⁻¹' {b}\n[PROOFSTEP]\nrintro _ ⟨x, rfl⟩\n[GOAL]\ncase h₁.intro\nB : Type u_1\nF : Type u_2\nE : B → Type u_3\nb : B\nx : E b\n⊢ { proj := b, snd := x } ∈ proj ⁻¹' {b}\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h₂\nB : Type u_1\nF : Type u_2\nE : B → Type u_3\nb : B\n⊢ proj ⁻¹' {b} ⊆ range (mk b)\n[PROOFSTEP]\nrintro ⟨_, x⟩ rfl\n[GOAL]\ncase h₂.mk\nB : Type u_1\nF : Type u_2\nE : B → Type u_3\nproj✝ : B\nx : E proj✝\n⊢ { proj := proj✝, snd := x } ∈ range (mk { proj := proj✝, snd := x }.proj)\n[PROOFSTEP]\nexact ⟨x, rfl⟩\n", "meta": {"mathlib_filename": "Mathlib.Data.Bundle", "llama_tokens": 632, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7745833737577158, "lm_q2_score": 0.7057850278370112, "lm_q1q2_score": 0.5466893480096755}}
{"text": "[GOAL]\nα : Type u_1\nm : MeasurableSpace α\nμ : Measure α\nβ : Type u_2\ninst✝⁶ : CompleteLinearOrder β\ninst✝⁵ : DenselyOrdered β\ninst✝⁴ : TopologicalSpace β\ninst✝³ : OrderTopology β\ninst✝² : SecondCountableTopology β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\ns : Set β\ns_count : Set.Countable s\ns_dense : Dense s\nf : α → β\nh :\n  ∀ (p : β),\n    p ∈ s →\n      ∀ (q : β),\n        q ∈ s →\n          p < q → ∃ u v, MeasurableSet u ∧ MeasurableSet v ∧ {x | f x < p} ⊆ u ∧ {x | q < f x} ⊆ v ∧ ↑↑μ (u ∩ v) = 0\n⊢ AEMeasurable f\n[PROOFSTEP]\nhaveI : Encodable s := s_count.toEncodable\n[GOAL]\nα : Type u_1\nm : MeasurableSpace α\nμ : Measure α\nβ : Type u_2\ninst✝⁶ : CompleteLinearOrder β\ninst✝⁵ : DenselyOrdered β\ninst✝⁴ : TopologicalSpace β\ninst✝³ : OrderTopology β\ninst✝² : SecondCountableTopology β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\ns : Set β\ns_count : Set.Countable s\ns_dense : Dense s\nf : α → β\nh :\n  ∀ (p : β),\n    p ∈ s →\n      ∀ (q : β),\n        q ∈ s →\n          p < q → ∃ u v, MeasurableSet u ∧ MeasurableSet v ∧ {x | f x < p} ⊆ u ∧ {x | q < f x} ⊆ v ∧ ↑↑μ (u ∩ v) = 0\nthis : Encodable ↑s\n⊢ AEMeasurable f\n[PROOFSTEP]\nhave h' :\n  ∀ p q,\n    ∃ u v,\n      MeasurableSet u ∧\n        MeasurableSet v ∧ {x | f x < p} ⊆ u ∧ {x | q < f x} ⊆ v ∧ (p ∈ s → q ∈ s → p < q → μ (u ∩ v) = 0) :=\n  by\n  intro p q\n  by_cases H : p ∈ s ∧ q ∈ s ∧ p < q\n  · rcases h p H.1 q H.2.1 H.2.2 with ⟨u, v, hu, hv, h'u, h'v, hμ⟩\n    exact ⟨u, v, hu, hv, h'u, h'v, fun _ _ _ => hμ⟩\n  · refine' ⟨univ, univ, MeasurableSet.univ, MeasurableSet.univ, subset_univ _, subset_univ _, fun ps qs pq => _⟩\n    simp only [not_and] at H \n    exact (H ps qs pq).elim\n[GOAL]\nα : Type u_1\nm : MeasurableSpace α\nμ : Measure α\nβ : Type u_2\ninst✝⁶ : CompleteLinearOrder β\ninst✝⁵ : DenselyOrdered β\ninst✝⁴ : TopologicalSpace β\ninst✝³ : OrderTopology β\ninst✝² : SecondCountableTopology β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\ns : Set β\ns_count : Set.Countable s\ns_dense : Dense s\nf : α → β\nh :\n  ∀ (p : β),\n    p ∈ s →\n      ∀ (q : β),\n        q ∈ s →\n          p < q → ∃ u v, MeasurableSet u ∧ MeasurableSet v ∧ {x | f x < p} ⊆ u ∧ {x | q < f x} ⊆ v ∧ ↑↑μ (u ∩ v) = 0\nthis : Encodable ↑s\n⊢ ∀ (p q : β),\n    ∃ u v,\n      MeasurableSet u ∧\n        MeasurableSet v ∧ {x | f x < p} ⊆ u ∧ {x | q < f x} ⊆ v ∧ (p ∈ s → q ∈ s → p < q → ↑↑μ (u ∩ v) = 0)\n[PROOFSTEP]\nintro p q\n[GOAL]\nα : Type u_1\nm : MeasurableSpace α\nμ : Measure α\nβ : Type u_2\ninst✝⁶ : CompleteLinearOrder β\ninst✝⁵ : DenselyOrdered β\ninst✝⁴ : TopologicalSpace β\ninst✝³ : OrderTopology β\ninst✝² : SecondCountableTopology β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\ns : Set β\ns_count : Set.Countable s\ns_dense : Dense s\nf : α → β\nh :\n  ∀ (p : β),\n    p ∈ s →\n      ∀ (q : β),\n        q ∈ s →\n          p < q → ∃ u v, MeasurableSet u ∧ MeasurableSet v ∧ {x | f x < p} ⊆ u ∧ {x | q < f x} ⊆ v ∧ ↑↑μ (u ∩ v) = 0\nthis : Encodable ↑s\np q : β\n⊢ ∃ u v,\n    MeasurableSet u ∧\n      MeasurableSet v ∧ {x | f x < p} ⊆ u ∧ {x | q < f x} ⊆ v ∧ (p ∈ s → q ∈ s → p < q → ↑↑μ (u ∩ v) = 0)\n[PROOFSTEP]\nby_cases H : p ∈ s ∧ q ∈ s ∧ p < q\n[GOAL]\ncase pos\nα : Type u_1\nm : MeasurableSpace α\nμ : Measure α\nβ : Type u_2\ninst✝⁶ : CompleteLinearOrder β\ninst✝⁵ : DenselyOrdered β\ninst✝⁴ : TopologicalSpace β\ninst✝³ : OrderTopology β\ninst✝² : SecondCountableTopology β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\ns : Set β\ns_count : Set.Countable s\ns_dense : Dense s\nf : α → β\nh :\n  ∀ (p : β),\n    p ∈ s →\n      ∀ (q : β),\n        q ∈ s →\n          p < q → ∃ u v, MeasurableSet u ∧ MeasurableSet v ∧ {x | f x < p} ⊆ u ∧ {x | q < f x} ⊆ v ∧ ↑↑μ (u ∩ v) = 0\nthis : Encodable ↑s\np q : β\nH : p ∈ s ∧ q ∈ s ∧ p < q\n⊢ ∃ u v,\n    MeasurableSet u ∧\n      MeasurableSet v ∧ {x | f x < p} ⊆ u ∧ {x | q < f x} ⊆ v ∧ (p ∈ s → q ∈ s → p < q → ↑↑μ (u ∩ v) = 0)\n[PROOFSTEP]\nrcases h p H.1 q H.2.1 H.2.2 with ⟨u, v, hu, hv, h'u, h'v, hμ⟩\n[GOAL]\ncase pos.intro.intro.intro.intro.intro.intro\nα : Type u_1\nm : MeasurableSpace α\nμ : Measure α\nβ : Type u_2\ninst✝⁶ : CompleteLinearOrder β\ninst✝⁵ : DenselyOrdered β\ninst✝⁴ : TopologicalSpace β\ninst✝³ : OrderTopology β\ninst✝² : SecondCountableTopology β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\ns : Set β\ns_count : Set.Countable s\ns_dense : Dense s\nf : α → β\nh :\n  ∀ (p : β),\n    p ∈ s →\n      ∀ (q : β),\n        q ∈ s →\n          p < q → ∃ u v, MeasurableSet u ∧ MeasurableSet v ∧ {x | f x < p} ⊆ u ∧ {x | q < f x} ⊆ v ∧ ↑↑μ (u ∩ v) = 0\nthis : Encodable ↑s\np q : β\nH : p ∈ s ∧ q ∈ s ∧ p < q\nu v : Set α\nhu : MeasurableSet u\nhv : MeasurableSet v\nh'u : {x | f x < p} ⊆ u\nh'v : {x | q < f x} ⊆ v\nhμ : ↑↑μ (u ∩ v) = 0\n⊢ ∃ u v,\n    MeasurableSet u ∧\n      MeasurableSet v ∧ {x | f x < p} ⊆ u ∧ {x | q < f x} ⊆ v ∧ (p ∈ s → q ∈ s → p < q → ↑↑μ (u ∩ v) = 0)\n[PROOFSTEP]\nexact ⟨u, v, hu, hv, h'u, h'v, fun _ _ _ => hμ⟩\n[GOAL]\ncase neg\nα : Type u_1\nm : MeasurableSpace α\nμ : Measure α\nβ : Type u_2\ninst✝⁶ : CompleteLinearOrder β\ninst✝⁵ : DenselyOrdered β\ninst✝⁴ : TopologicalSpace β\ninst✝³ : OrderTopology β\ninst✝² : SecondCountableTopology β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\ns : Set β\ns_count : Set.Countable s\ns_dense : Dense s\nf : α → β\nh :\n  ∀ (p : β),\n    p ∈ s →\n      ∀ (q : β),\n        q ∈ s →\n          p < q → ∃ u v, MeasurableSet u ∧ MeasurableSet v ∧ {x | f x < p} ⊆ u ∧ {x | q < f x} ⊆ v ∧ ↑↑μ (u ∩ v) = 0\nthis : Encodable ↑s\np q : β\nH : ¬(p ∈ s ∧ q ∈ s ∧ p < q)\n⊢ ∃ u v,\n    MeasurableSet u ∧\n      MeasurableSet v ∧ {x | f x < p} ⊆ u ∧ {x | q < f x} ⊆ v ∧ (p ∈ s → q ∈ s → p < q → ↑↑μ (u ∩ v) = 0)\n[PROOFSTEP]\nrefine' ⟨univ, univ, MeasurableSet.univ, MeasurableSet.univ, subset_univ _, subset_univ _, fun ps qs pq => _⟩\n[GOAL]\ncase neg\nα : Type u_1\nm : MeasurableSpace α\nμ : Measure α\nβ : Type u_2\ninst✝⁶ : CompleteLinearOrder β\ninst✝⁵ : DenselyOrdered β\ninst✝⁴ : TopologicalSpace β\ninst✝³ : OrderTopology β\ninst✝² : SecondCountableTopology β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\ns : Set β\ns_count : Set.Countable s\ns_dense : Dense s\nf : α → β\nh :\n  ∀ (p : β),\n    p ∈ s →\n      ∀ (q : β),\n        q ∈ s →\n          p < q → ∃ u v, MeasurableSet u ∧ MeasurableSet v ∧ {x | f x < p} ⊆ u ∧ {x | q < f x} ⊆ v ∧ ↑↑μ (u ∩ v) = 0\nthis : Encodable ↑s\np q : β\nH : ¬(p ∈ s ∧ q ∈ s ∧ p < q)\nps : p ∈ s\nqs : q ∈ s\npq : p < q\n⊢ ↑↑μ (univ ∩ univ) = 0\n[PROOFSTEP]\nsimp only [not_and] at H \n[GOAL]\ncase neg\nα : Type u_1\nm : MeasurableSpace α\nμ : Measure α\nβ : Type u_2\ninst✝⁶ : CompleteLinearOrder β\ninst✝⁵ : DenselyOrdered β\ninst✝⁴ : TopologicalSpace β\ninst✝³ : OrderTopology β\ninst✝² : SecondCountableTopology β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\ns : Set β\ns_count : Set.Countable s\ns_dense : Dense s\nf : α → β\nh :\n  ∀ (p : β),\n    p ∈ s →\n      ∀ (q : β),\n        q ∈ s →\n          p < q → ∃ u v, MeasurableSet u ∧ MeasurableSet v ∧ {x | f x < p} ⊆ u ∧ {x | q < f x} ⊆ v ∧ ↑↑μ (u ∩ v) = 0\nthis : Encodable ↑s\np q : β\nps : p ∈ s\nqs : q ∈ s\npq : p < q\nH : p ∈ s → q ∈ s → ¬p < q\n⊢ ↑↑μ (univ ∩ univ) = 0\n[PROOFSTEP]\nexact (H ps qs pq).elim\n[GOAL]\nα : Type u_1\nm : MeasurableSpace α\nμ : Measure α\nβ : Type u_2\ninst✝⁶ : CompleteLinearOrder β\ninst✝⁵ : DenselyOrdered β\ninst✝⁴ : TopologicalSpace β\ninst✝³ : OrderTopology β\ninst✝² : SecondCountableTopology β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\ns : Set β\ns_count : Set.Countable s\ns_dense : Dense s\nf : α → β\nh :\n  ∀ (p : β),\n    p ∈ s →\n      ∀ (q : β),\n        q ∈ s →\n          p < q → ∃ u v, MeasurableSet u ∧ MeasurableSet v ∧ {x | f x < p} ⊆ u ∧ {x | q < f x} ⊆ v ∧ ↑↑μ (u ∩ v) = 0\nthis : Encodable ↑s\nh' :\n  ∀ (p q : β),\n    ∃ u v,\n      MeasurableSet u ∧\n        MeasurableSet v ∧ {x | f x < p} ⊆ u ∧ {x | q < f x} ⊆ v ∧ (p ∈ s → q ∈ s → p < q → ↑↑μ (u ∩ v) = 0)\n⊢ AEMeasurable f\n[PROOFSTEP]\nchoose! u v huv using h'\n[GOAL]\nα : Type u_1\nm : MeasurableSpace α\nμ : Measure α\nβ : Type u_2\ninst✝⁶ : CompleteLinearOrder β\ninst✝⁵ : DenselyOrdered β\ninst✝⁴ : TopologicalSpace β\ninst✝³ : OrderTopology β\ninst✝² : SecondCountableTopology β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\ns : Set β\ns_count : Set.Countable s\ns_dense : Dense s\nf : α → β\nh :\n  ∀ (p : β),\n    p ∈ s →\n      ∀ (q : β),\n        q ∈ s →\n          p < q → ∃ u v, MeasurableSet u ∧ MeasurableSet v ∧ {x | f x < p} ⊆ u ∧ {x | q < f x} ⊆ v ∧ ↑↑μ (u ∩ v) = 0\nthis : Encodable ↑s\nu v : β → β → Set α\nhuv :\n  ∀ (p q : β),\n    MeasurableSet (u p q) ∧\n      MeasurableSet (v p q) ∧\n        {x | f x < p} ⊆ u p q ∧ {x | q < f x} ⊆ v p q ∧ (p ∈ s → q ∈ s → p < q → ↑↑μ (u p q ∩ v p q) = 0)\n⊢ AEMeasurable f\n[PROOFSTEP]\nlet u' : β → Set α := fun p => ⋂ q ∈ s ∩ Ioi p, u p q\n[GOAL]\nα : Type u_1\nm : MeasurableSpace α\nμ : Measure α\nβ : Type u_2\ninst✝⁶ : CompleteLinearOrder β\ninst✝⁵ : DenselyOrdered β\ninst✝⁴ : TopologicalSpace β\ninst✝³ : OrderTopology β\ninst✝² : SecondCountableTopology β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\ns : Set β\ns_count : Set.Countable s\ns_dense : Dense s\nf : α → β\nh :\n  ∀ (p : β),\n    p ∈ s →\n      ∀ (q : β),\n        q ∈ s →\n          p < q → ∃ u v, MeasurableSet u ∧ MeasurableSet v ∧ {x | f x < p} ⊆ u ∧ {x | q < f x} ⊆ v ∧ ↑↑μ (u ∩ v) = 0\nthis : Encodable ↑s\nu v : β → β → Set α\nhuv :\n  ∀ (p q : β),\n    MeasurableSet (u p q) ∧\n      MeasurableSet (v p q) ∧\n        {x | f x < p} ⊆ u p q ∧ {x | q < f x} ⊆ v p q ∧ (p ∈ s → q ∈ s → p < q → ↑↑μ (u p q ∩ v p q) = 0)\nu' : β → Set α := fun p => ⋂ (q : β) (_ : q ∈ s ∩ Ioi p), u p q\n⊢ AEMeasurable f\n[PROOFSTEP]\nhave u'_meas : ∀ i, MeasurableSet (u' i) := by\n  intro i\n  exact MeasurableSet.biInter (s_count.mono (inter_subset_left _ _)) fun b _ => (huv i b).1\n[GOAL]\nα : Type u_1\nm : MeasurableSpace α\nμ : Measure α\nβ : Type u_2\ninst✝⁶ : CompleteLinearOrder β\ninst✝⁵ : DenselyOrdered β\ninst✝⁴ : TopologicalSpace β\ninst✝³ : OrderTopology β\ninst✝² : SecondCountableTopology β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\ns : Set β\ns_count : Set.Countable s\ns_dense : Dense s\nf : α → β\nh :\n  ∀ (p : β),\n    p ∈ s →\n      ∀ (q : β),\n        q ∈ s →\n          p < q → ∃ u v, MeasurableSet u ∧ MeasurableSet v ∧ {x | f x < p} ⊆ u ∧ {x | q < f x} ⊆ v ∧ ↑↑μ (u ∩ v) = 0\nthis : Encodable ↑s\nu v : β → β → Set α\nhuv :\n  ∀ (p q : β),\n    MeasurableSet (u p q) ∧\n      MeasurableSet (v p q) ∧\n        {x | f x < p} ⊆ u p q ∧ {x | q < f x} ⊆ v p q ∧ (p ∈ s → q ∈ s → p < q → ↑↑μ (u p q ∩ v p q) = 0)\nu' : β → Set α := fun p => ⋂ (q : β) (_ : q ∈ s ∩ Ioi p), u p q\n⊢ ∀ (i : β), MeasurableSet (u' i)\n[PROOFSTEP]\nintro i\n[GOAL]\nα : Type u_1\nm : MeasurableSpace α\nμ : Measure α\nβ : Type u_2\ninst✝⁶ : CompleteLinearOrder β\ninst✝⁵ : DenselyOrdered β\ninst✝⁴ : TopologicalSpace β\ninst✝³ : OrderTopology β\ninst✝² : SecondCountableTopology β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\ns : Set β\ns_count : Set.Countable s\ns_dense : Dense s\nf : α → β\nh :\n  ∀ (p : β),\n    p ∈ s →\n      ∀ (q : β),\n        q ∈ s →\n          p < q → ∃ u v, MeasurableSet u ∧ MeasurableSet v ∧ {x | f x < p} ⊆ u ∧ {x | q < f x} ⊆ v ∧ ↑↑μ (u ∩ v) = 0\nthis : Encodable ↑s\nu v : β → β → Set α\nhuv :\n  ∀ (p q : β),\n    MeasurableSet (u p q) ∧\n      MeasurableSet (v p q) ∧\n        {x | f x < p} ⊆ u p q ∧ {x | q < f x} ⊆ v p q ∧ (p ∈ s → q ∈ s → p < q → ↑↑μ (u p q ∩ v p q) = 0)\nu' : β → Set α := fun p => ⋂ (q : β) (_ : q ∈ s ∩ Ioi p), u p q\ni : β\n⊢ MeasurableSet (u' i)\n[PROOFSTEP]\nexact MeasurableSet.biInter (s_count.mono (inter_subset_left _ _)) fun b _ => (huv i b).1\n[GOAL]\nα : Type u_1\nm : MeasurableSpace α\nμ : Measure α\nβ : Type u_2\ninst✝⁶ : CompleteLinearOrder β\ninst✝⁵ : DenselyOrdered β\ninst✝⁴ : TopologicalSpace β\ninst✝³ : OrderTopology β\ninst✝² : SecondCountableTopology β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\ns : Set β\ns_count : Set.Countable s\ns_dense : Dense s\nf : α → β\nh :\n  ∀ (p : β),\n    p ∈ s →\n      ∀ (q : β),\n        q ∈ s →\n          p < q → ∃ u v, MeasurableSet u ∧ MeasurableSet v ∧ {x | f x < p} ⊆ u ∧ {x | q < f x} ⊆ v ∧ ↑↑μ (u ∩ v) = 0\nthis : Encodable ↑s\nu v : β → β → Set α\nhuv :\n  ∀ (p q : β),\n    MeasurableSet (u p q) ∧\n      MeasurableSet (v p q) ∧\n        {x | f x < p} ⊆ u p q ∧ {x | q < f x} ⊆ v p q ∧ (p ∈ s → q ∈ s → p < q → ↑↑μ (u p q ∩ v p q) = 0)\nu' : β → Set α := fun p => ⋂ (q : β) (_ : q ∈ s ∩ Ioi p), u p q\nu'_meas : ∀ (i : β), MeasurableSet (u' i)\n⊢ AEMeasurable f\n[PROOFSTEP]\nlet f' : α → β := fun x => ⨅ i : s, piecewise (u' i) (fun _ => (i : β)) (fun _ => (⊤ : β)) x\n[GOAL]\nα : Type u_1\nm : MeasurableSpace α\nμ : Measure α\nβ : Type u_2\ninst✝⁶ : CompleteLinearOrder β\ninst✝⁵ : DenselyOrdered β\ninst✝⁴ : TopologicalSpace β\ninst✝³ : OrderTopology β\ninst✝² : SecondCountableTopology β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\ns : Set β\ns_count : Set.Countable s\ns_dense : Dense s\nf : α → β\nh :\n  ∀ (p : β),\n    p ∈ s →\n      ∀ (q : β),\n        q ∈ s →\n          p < q → ∃ u v, MeasurableSet u ∧ MeasurableSet v ∧ {x | f x < p} ⊆ u ∧ {x | q < f x} ⊆ v ∧ ↑↑μ (u ∩ v) = 0\nthis : Encodable ↑s\nu v : β → β → Set α\nhuv :\n  ∀ (p q : β),\n    MeasurableSet (u p q) ∧\n      MeasurableSet (v p q) ∧\n        {x | f x < p} ⊆ u p q ∧ {x | q < f x} ⊆ v p q ∧ (p ∈ s → q ∈ s → p < q → ↑↑μ (u p q ∩ v p q) = 0)\nu' : β → Set α := fun p => ⋂ (q : β) (_ : q ∈ s ∩ Ioi p), u p q\nu'_meas : ∀ (i : β), MeasurableSet (u' i)\nf' : α → β := fun x => ⨅ (i : ↑s), piecewise (u' ↑i) (fun x => ↑i) (fun x => ⊤) x\n⊢ AEMeasurable f\n[PROOFSTEP]\nhave f'_meas : Measurable f' := by\n  apply measurable_iInf\n  exact fun i => Measurable.piecewise (u'_meas i) measurable_const measurable_const\n[GOAL]\nα : Type u_1\nm : MeasurableSpace α\nμ : Measure α\nβ : Type u_2\ninst✝⁶ : CompleteLinearOrder β\ninst✝⁵ : DenselyOrdered β\ninst✝⁴ : TopologicalSpace β\ninst✝³ : OrderTopology β\ninst✝² : SecondCountableTopology β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\ns : Set β\ns_count : Set.Countable s\ns_dense : Dense s\nf : α → β\nh :\n  ∀ (p : β),\n    p ∈ s →\n      ∀ (q : β),\n        q ∈ s →\n          p < q → ∃ u v, MeasurableSet u ∧ MeasurableSet v ∧ {x | f x < p} ⊆ u ∧ {x | q < f x} ⊆ v ∧ ↑↑μ (u ∩ v) = 0\nthis : Encodable ↑s\nu v : β → β → Set α\nhuv :\n  ∀ (p q : β),\n    MeasurableSet (u p q) ∧\n      MeasurableSet (v p q) ∧\n        {x | f x < p} ⊆ u p q ∧ {x | q < f x} ⊆ v p q ∧ (p ∈ s → q ∈ s → p < q → ↑↑μ (u p q ∩ v p q) = 0)\nu' : β → Set α := fun p => ⋂ (q : β) (_ : q ∈ s ∩ Ioi p), u p q\nu'_meas : ∀ (i : β), MeasurableSet (u' i)\nf' : α → β := fun x => ⨅ (i : ↑s), piecewise (u' ↑i) (fun x => ↑i) (fun x => ⊤) x\n⊢ Measurable f'\n[PROOFSTEP]\napply measurable_iInf\n[GOAL]\ncase hf\nα : Type u_1\nm : MeasurableSpace α\nμ : Measure α\nβ : Type u_2\ninst✝⁶ : CompleteLinearOrder β\ninst✝⁵ : DenselyOrdered β\ninst✝⁴ : TopologicalSpace β\ninst✝³ : OrderTopology β\ninst✝² : SecondCountableTopology β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\ns : Set β\ns_count : Set.Countable s\ns_dense : Dense s\nf : α → β\nh :\n  ∀ (p : β),\n    p ∈ s →\n      ∀ (q : β),\n        q ∈ s →\n          p < q → ∃ u v, MeasurableSet u ∧ MeasurableSet v ∧ {x | f x < p} ⊆ u ∧ {x | q < f x} ⊆ v ∧ ↑↑μ (u ∩ v) = 0\nthis : Encodable ↑s\nu v : β → β → Set α\nhuv :\n  ∀ (p q : β),\n    MeasurableSet (u p q) ∧\n      MeasurableSet (v p q) ∧\n        {x | f x < p} ⊆ u p q ∧ {x | q < f x} ⊆ v p q ∧ (p ∈ s → q ∈ s → p < q → ↑↑μ (u p q ∩ v p q) = 0)\nu' : β → Set α := fun p => ⋂ (q : β) (_ : q ∈ s ∩ Ioi p), u p q\nu'_meas : ∀ (i : β), MeasurableSet (u' i)\nf' : α → β := fun x => ⨅ (i : ↑s), piecewise (u' ↑i) (fun x => ↑i) (fun x => ⊤) x\n⊢ ∀ (i : ↑s), Measurable fun b => piecewise (u' ↑i) (fun x => ↑i) (fun x => ⊤) b\n[PROOFSTEP]\nexact fun i => Measurable.piecewise (u'_meas i) measurable_const measurable_const\n[GOAL]\nα : Type u_1\nm : MeasurableSpace α\nμ : Measure α\nβ : Type u_2\ninst✝⁶ : CompleteLinearOrder β\ninst✝⁵ : DenselyOrdered β\ninst✝⁴ : TopologicalSpace β\ninst✝³ : OrderTopology β\ninst✝² : SecondCountableTopology β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\ns : Set β\ns_count : Set.Countable s\ns_dense : Dense s\nf : α → β\nh :\n  ∀ (p : β),\n    p ∈ s →\n      ∀ (q : β),\n        q ∈ s →\n          p < q → ∃ u v, MeasurableSet u ∧ MeasurableSet v ∧ {x | f x < p} ⊆ u ∧ {x | q < f x} ⊆ v ∧ ↑↑μ (u ∩ v) = 0\nthis : Encodable ↑s\nu v : β → β → Set α\nhuv :\n  ∀ (p q : β),\n    MeasurableSet (u p q) ∧\n      MeasurableSet (v p q) ∧\n        {x | f x < p} ⊆ u p q ∧ {x | q < f x} ⊆ v p q ∧ (p ∈ s → q ∈ s → p < q → ↑↑μ (u p q ∩ v p q) = 0)\nu' : β → Set α := fun p => ⋂ (q : β) (_ : q ∈ s ∩ Ioi p), u p q\nu'_meas : ∀ (i : β), MeasurableSet (u' i)\nf' : α → β := fun x => ⨅ (i : ↑s), piecewise (u' ↑i) (fun x => ↑i) (fun x => ⊤) x\nf'_meas : Measurable f'\n⊢ AEMeasurable f\n[PROOFSTEP]\nlet t := ⋃ (p : s) (q : ↥(s ∩ Ioi p)), u' p ∩ v p q\n[GOAL]\nα : Type u_1\nm : MeasurableSpace α\nμ : Measure α\nβ : Type u_2\ninst✝⁶ : CompleteLinearOrder β\ninst✝⁵ : DenselyOrdered β\ninst✝⁴ : TopologicalSpace β\ninst✝³ : OrderTopology β\ninst✝² : SecondCountableTopology β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\ns : Set β\ns_count : Set.Countable s\ns_dense : Dense s\nf : α → β\nh :\n  ∀ (p : β),\n    p ∈ s →\n      ∀ (q : β),\n        q ∈ s →\n          p < q → ∃ u v, MeasurableSet u ∧ MeasurableSet v ∧ {x | f x < p} ⊆ u ∧ {x | q < f x} ⊆ v ∧ ↑↑μ (u ∩ v) = 0\nthis : Encodable ↑s\nu v : β → β → Set α\nhuv :\n  ∀ (p q : β),\n    MeasurableSet (u p q) ∧\n      MeasurableSet (v p q) ∧\n        {x | f x < p} ⊆ u p q ∧ {x | q < f x} ⊆ v p q ∧ (p ∈ s → q ∈ s → p < q → ↑↑μ (u p q ∩ v p q) = 0)\nu' : β → Set α := fun p => ⋂ (q : β) (_ : q ∈ s ∩ Ioi p), u p q\nu'_meas : ∀ (i : β), MeasurableSet (u' i)\nf' : α → β := fun x => ⨅ (i : ↑s), piecewise (u' ↑i) (fun x => ↑i) (fun x => ⊤) x\nf'_meas : Measurable f'\nt : Set α := ⋃ (p : ↑s) (q : ↑(s ∩ Ioi ↑p)), u' ↑p ∩ v ↑p ↑q\n⊢ AEMeasurable f\n[PROOFSTEP]\nhave μt : μ t ≤ 0 :=\n  calc\n    μ t ≤ ∑' (p : s) (q : ↥(s ∩ Ioi p)), μ (u' p ∩ v p q) :=\n      by\n      refine (measure_iUnion_le _).trans ?_\n      refine ENNReal.tsum_le_tsum fun p => ?_\n      refine @measure_iUnion_le _ _ _ _ ?_ _\n      exact (s_count.mono (inter_subset_left _ _)).to_subtype\n    _ ≤ ∑' (p : s) (q : ↥(s ∩ Ioi p)), μ (u p q ∩ v p q) :=\n      by\n      refine ENNReal.tsum_le_tsum fun p => ?_\n      refine ENNReal.tsum_le_tsum fun q => measure_mono ?_\n      exact inter_subset_inter_left _ (biInter_subset_of_mem q.2)\n    _ = ∑' (p : s) (_ : ↥(s ∩ Ioi p)), (0 : ℝ≥0∞) := by\n      congr\n      ext1 p\n      congr\n      ext1 q\n      exact (huv p q).2.2.2.2 p.2 q.2.1 q.2.2\n    _ = 0 := by simp only [tsum_zero]\n[GOAL]\nα : Type u_1\nm : MeasurableSpace α\nμ : Measure α\nβ : Type u_2\ninst✝⁶ : CompleteLinearOrder β\ninst✝⁵ : DenselyOrdered β\ninst✝⁴ : TopologicalSpace β\ninst✝³ : OrderTopology β\ninst✝² : SecondCountableTopology β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\ns : Set β\ns_count : Set.Countable s\ns_dense : Dense s\nf : α → β\nh :\n  ∀ (p : β),\n    p ∈ s →\n      ∀ (q : β),\n        q ∈ s →\n          p < q → ∃ u v, MeasurableSet u ∧ MeasurableSet v ∧ {x | f x < p} ⊆ u ∧ {x | q < f x} ⊆ v ∧ ↑↑μ (u ∩ v) = 0\nthis : Encodable ↑s\nu v : β → β → Set α\nhuv :\n  ∀ (p q : β),\n    MeasurableSet (u p q) ∧\n      MeasurableSet (v p q) ∧\n        {x | f x < p} ⊆ u p q ∧ {x | q < f x} ⊆ v p q ∧ (p ∈ s → q ∈ s → p < q → ↑↑μ (u p q ∩ v p q) = 0)\nu' : β → Set α := fun p => ⋂ (q : β) (_ : q ∈ s ∩ Ioi p), u p q\nu'_meas : ∀ (i : β), MeasurableSet (u' i)\nf' : α → β := fun x => ⨅ (i : ↑s), piecewise (u' ↑i) (fun x => ↑i) (fun x => ⊤) x\nf'_meas : Measurable f'\nt : Set α := ⋃ (p : ↑s) (q : ↑(s ∩ Ioi ↑p)), u' ↑p ∩ v ↑p ↑q\n⊢ ↑↑μ t ≤ ∑' (p : ↑s) (q : ↑(s ∩ Ioi ↑p)), ↑↑μ (u' ↑p ∩ v ↑p ↑q)\n[PROOFSTEP]\nrefine (measure_iUnion_le _).trans ?_\n[GOAL]\nα : Type u_1\nm : MeasurableSpace α\nμ : Measure α\nβ : Type u_2\ninst✝⁶ : CompleteLinearOrder β\ninst✝⁵ : DenselyOrdered β\ninst✝⁴ : TopologicalSpace β\ninst✝³ : OrderTopology β\ninst✝² : SecondCountableTopology β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\ns : Set β\ns_count : Set.Countable s\ns_dense : Dense s\nf : α → β\nh :\n  ∀ (p : β),\n    p ∈ s →\n      ∀ (q : β),\n        q ∈ s →\n          p < q → ∃ u v, MeasurableSet u ∧ MeasurableSet v ∧ {x | f x < p} ⊆ u ∧ {x | q < f x} ⊆ v ∧ ↑↑μ (u ∩ v) = 0\nthis : Encodable ↑s\nu v : β → β → Set α\nhuv :\n  ∀ (p q : β),\n    MeasurableSet (u p q) ∧\n      MeasurableSet (v p q) ∧\n        {x | f x < p} ⊆ u p q ∧ {x | q < f x} ⊆ v p q ∧ (p ∈ s → q ∈ s → p < q → ↑↑μ (u p q ∩ v p q) = 0)\nu' : β → Set α := fun p => ⋂ (q : β) (_ : q ∈ s ∩ Ioi p), u p q\nu'_meas : ∀ (i : β), MeasurableSet (u' i)\nf' : α → β := fun x => ⨅ (i : ↑s), piecewise (u' ↑i) (fun x => ↑i) (fun x => ⊤) x\nf'_meas : Measurable f'\nt : Set α := ⋃ (p : ↑s) (q : ↑(s ∩ Ioi ↑p)), u' ↑p ∩ v ↑p ↑q\n⊢ ∑' (i : ↑s), ↑↑μ (⋃ (q : ↑(s ∩ Ioi ↑i)), u' ↑i ∩ v ↑i ↑q) ≤ ∑' (p : ↑s) (q : ↑(s ∩ Ioi ↑p)), ↑↑μ (u' ↑p ∩ v ↑p ↑q)\n[PROOFSTEP]\nrefine ENNReal.tsum_le_tsum fun p => ?_\n[GOAL]\nα : Type u_1\nm : MeasurableSpace α\nμ : Measure α\nβ : Type u_2\ninst✝⁶ : CompleteLinearOrder β\ninst✝⁵ : DenselyOrdered β\ninst✝⁴ : TopologicalSpace β\ninst✝³ : OrderTopology β\ninst✝² : SecondCountableTopology β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\ns : Set β\ns_count : Set.Countable s\ns_dense : Dense s\nf : α → β\nh :\n  ∀ (p : β),\n    p ∈ s →\n      ∀ (q : β),\n        q ∈ s →\n          p < q → ∃ u v, MeasurableSet u ∧ MeasurableSet v ∧ {x | f x < p} ⊆ u ∧ {x | q < f x} ⊆ v ∧ ↑↑μ (u ∩ v) = 0\nthis : Encodable ↑s\nu v : β → β → Set α\nhuv :\n  ∀ (p q : β),\n    MeasurableSet (u p q) ∧\n      MeasurableSet (v p q) ∧\n        {x | f x < p} ⊆ u p q ∧ {x | q < f x} ⊆ v p q ∧ (p ∈ s → q ∈ s → p < q → ↑↑μ (u p q ∩ v p q) = 0)\nu' : β → Set α := fun p => ⋂ (q : β) (_ : q ∈ s ∩ Ioi p), u p q\nu'_meas : ∀ (i : β), MeasurableSet (u' i)\nf' : α → β := fun x => ⨅ (i : ↑s), piecewise (u' ↑i) (fun x => ↑i) (fun x => ⊤) x\nf'_meas : Measurable f'\nt : Set α := ⋃ (p : ↑s) (q : ↑(s ∩ Ioi ↑p)), u' ↑p ∩ v ↑p ↑q\np : ↑s\n⊢ ↑↑μ (⋃ (q : ↑(s ∩ Ioi ↑p)), u' ↑p ∩ v ↑p ↑q) ≤ ∑' (q : ↑(s ∩ Ioi ↑p)), ↑↑μ (u' ↑p ∩ v ↑p ↑q)\n[PROOFSTEP]\nrefine @measure_iUnion_le _ _ _ _ ?_ _\n[GOAL]\nα : Type u_1\nm : MeasurableSpace α\nμ : Measure α\nβ : Type u_2\ninst✝⁶ : CompleteLinearOrder β\ninst✝⁵ : DenselyOrdered β\ninst✝⁴ : TopologicalSpace β\ninst✝³ : OrderTopology β\ninst✝² : SecondCountableTopology β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\ns : Set β\ns_count : Set.Countable s\ns_dense : Dense s\nf : α → β\nh :\n  ∀ (p : β),\n    p ∈ s →\n      ∀ (q : β),\n        q ∈ s →\n          p < q → ∃ u v, MeasurableSet u ∧ MeasurableSet v ∧ {x | f x < p} ⊆ u ∧ {x | q < f x} ⊆ v ∧ ↑↑μ (u ∩ v) = 0\nthis : Encodable ↑s\nu v : β → β → Set α\nhuv :\n  ∀ (p q : β),\n    MeasurableSet (u p q) ∧\n      MeasurableSet (v p q) ∧\n        {x | f x < p} ⊆ u p q ∧ {x | q < f x} ⊆ v p q ∧ (p ∈ s → q ∈ s → p < q → ↑↑μ (u p q ∩ v p q) = 0)\nu' : β → Set α := fun p => ⋂ (q : β) (_ : q ∈ s ∩ Ioi p), u p q\nu'_meas : ∀ (i : β), MeasurableSet (u' i)\nf' : α → β := fun x => ⨅ (i : ↑s), piecewise (u' ↑i) (fun x => ↑i) (fun x => ⊤) x\nf'_meas : Measurable f'\nt : Set α := ⋃ (p : ↑s) (q : ↑(s ∩ Ioi ↑p)), u' ↑p ∩ v ↑p ↑q\np : ↑s\n⊢ Countable ↑(s ∩ Ioi ↑p)\n[PROOFSTEP]\nexact (s_count.mono (inter_subset_left _ _)).to_subtype\n[GOAL]\nα : Type u_1\nm : MeasurableSpace α\nμ : Measure α\nβ : Type u_2\ninst✝⁶ : CompleteLinearOrder β\ninst✝⁵ : DenselyOrdered β\ninst✝⁴ : TopologicalSpace β\ninst✝³ : OrderTopology β\ninst✝² : SecondCountableTopology β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\ns : Set β\ns_count : Set.Countable s\ns_dense : Dense s\nf : α → β\nh :\n  ∀ (p : β),\n    p ∈ s →\n      ∀ (q : β),\n        q ∈ s →\n          p < q → ∃ u v, MeasurableSet u ∧ MeasurableSet v ∧ {x | f x < p} ⊆ u ∧ {x | q < f x} ⊆ v ∧ ↑↑μ (u ∩ v) = 0\nthis : Encodable ↑s\nu v : β → β → Set α\nhuv :\n  ∀ (p q : β),\n    MeasurableSet (u p q) ∧\n      MeasurableSet (v p q) ∧\n        {x | f x < p} ⊆ u p q ∧ {x | q < f x} ⊆ v p q ∧ (p ∈ s → q ∈ s → p < q → ↑↑μ (u p q ∩ v p q) = 0)\nu' : β → Set α := fun p => ⋂ (q : β) (_ : q ∈ s ∩ Ioi p), u p q\nu'_meas : ∀ (i : β), MeasurableSet (u' i)\nf' : α → β := fun x => ⨅ (i : ↑s), piecewise (u' ↑i) (fun x => ↑i) (fun x => ⊤) x\nf'_meas : Measurable f'\nt : Set α := ⋃ (p : ↑s) (q : ↑(s ∩ Ioi ↑p)), u' ↑p ∩ v ↑p ↑q\n⊢ ∑' (p : ↑s) (q : ↑(s ∩ Ioi ↑p)), ↑↑μ (u' ↑p ∩ v ↑p ↑q) ≤ ∑' (p : ↑s) (q : ↑(s ∩ Ioi ↑p)), ↑↑μ (u ↑p ↑q ∩ v ↑p ↑q)\n[PROOFSTEP]\nrefine ENNReal.tsum_le_tsum fun p => ?_\n[GOAL]\nα : Type u_1\nm : MeasurableSpace α\nμ : Measure α\nβ : Type u_2\ninst✝⁶ : CompleteLinearOrder β\ninst✝⁵ : DenselyOrdered β\ninst✝⁴ : TopologicalSpace β\ninst✝³ : OrderTopology β\ninst✝² : SecondCountableTopology β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\ns : Set β\ns_count : Set.Countable s\ns_dense : Dense s\nf : α → β\nh :\n  ∀ (p : β),\n    p ∈ s →\n      ∀ (q : β),\n        q ∈ s →\n          p < q → ∃ u v, MeasurableSet u ∧ MeasurableSet v ∧ {x | f x < p} ⊆ u ∧ {x | q < f x} ⊆ v ∧ ↑↑μ (u ∩ v) = 0\nthis : Encodable ↑s\nu v : β → β → Set α\nhuv :\n  ∀ (p q : β),\n    MeasurableSet (u p q) ∧\n      MeasurableSet (v p q) ∧\n        {x | f x < p} ⊆ u p q ∧ {x | q < f x} ⊆ v p q ∧ (p ∈ s → q ∈ s → p < q → ↑↑μ (u p q ∩ v p q) = 0)\nu' : β → Set α := fun p => ⋂ (q : β) (_ : q ∈ s ∩ Ioi p), u p q\nu'_meas : ∀ (i : β), MeasurableSet (u' i)\nf' : α → β := fun x => ⨅ (i : ↑s), piecewise (u' ↑i) (fun x => ↑i) (fun x => ⊤) x\nf'_meas : Measurable f'\nt : Set α := ⋃ (p : ↑s) (q : ↑(s ∩ Ioi ↑p)), u' ↑p ∩ v ↑p ↑q\np : ↑s\n⊢ ∑' (q : ↑(s ∩ Ioi ↑p)), ↑↑μ (u' ↑p ∩ v ↑p ↑q) ≤ ∑' (q : ↑(s ∩ Ioi ↑p)), ↑↑μ (u ↑p ↑q ∩ v ↑p ↑q)\n[PROOFSTEP]\nrefine ENNReal.tsum_le_tsum fun q => measure_mono ?_\n[GOAL]\nα : Type u_1\nm : MeasurableSpace α\nμ : Measure α\nβ : Type u_2\ninst✝⁶ : CompleteLinearOrder β\ninst✝⁵ : DenselyOrdered β\ninst✝⁴ : TopologicalSpace β\ninst✝³ : OrderTopology β\ninst✝² : SecondCountableTopology β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\ns : Set β\ns_count : Set.Countable s\ns_dense : Dense s\nf : α → β\nh :\n  ∀ (p : β),\n    p ∈ s →\n      ∀ (q : β),\n        q ∈ s →\n          p < q → ∃ u v, MeasurableSet u ∧ MeasurableSet v ∧ {x | f x < p} ⊆ u ∧ {x | q < f x} ⊆ v ∧ ↑↑μ (u ∩ v) = 0\nthis : Encodable ↑s\nu v : β → β → Set α\nhuv :\n  ∀ (p q : β),\n    MeasurableSet (u p q) ∧\n      MeasurableSet (v p q) ∧\n        {x | f x < p} ⊆ u p q ∧ {x | q < f x} ⊆ v p q ∧ (p ∈ s → q ∈ s → p < q → ↑↑μ (u p q ∩ v p q) = 0)\nu' : β → Set α := fun p => ⋂ (q : β) (_ : q ∈ s ∩ Ioi p), u p q\nu'_meas : ∀ (i : β), MeasurableSet (u' i)\nf' : α → β := fun x => ⨅ (i : ↑s), piecewise (u' ↑i) (fun x => ↑i) (fun x => ⊤) x\nf'_meas : Measurable f'\nt : Set α := ⋃ (p : ↑s) (q : ↑(s ∩ Ioi ↑p)), u' ↑p ∩ v ↑p ↑q\np : ↑s\nq : ↑(s ∩ Ioi ↑p)\n⊢ u' ↑p ∩ v ↑p ↑q ⊆ u ↑p ↑q ∩ v ↑p ↑q\n[PROOFSTEP]\nexact inter_subset_inter_left _ (biInter_subset_of_mem q.2)\n[GOAL]\nα : Type u_1\nm : MeasurableSpace α\nμ : Measure α\nβ : Type u_2\ninst✝⁶ : CompleteLinearOrder β\ninst✝⁵ : DenselyOrdered β\ninst✝⁴ : TopologicalSpace β\ninst✝³ : OrderTopology β\ninst✝² : SecondCountableTopology β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\ns : Set β\ns_count : Set.Countable s\ns_dense : Dense s\nf : α → β\nh :\n  ∀ (p : β),\n    p ∈ s →\n      ∀ (q : β),\n        q ∈ s →\n          p < q → ∃ u v, MeasurableSet u ∧ MeasurableSet v ∧ {x | f x < p} ⊆ u ∧ {x | q < f x} ⊆ v ∧ ↑↑μ (u ∩ v) = 0\nthis : Encodable ↑s\nu v : β → β → Set α\nhuv :\n  ∀ (p q : β),\n    MeasurableSet (u p q) ∧\n      MeasurableSet (v p q) ∧\n        {x | f x < p} ⊆ u p q ∧ {x | q < f x} ⊆ v p q ∧ (p ∈ s → q ∈ s → p < q → ↑↑μ (u p q ∩ v p q) = 0)\nu' : β → Set α := fun p => ⋂ (q : β) (_ : q ∈ s ∩ Ioi p), u p q\nu'_meas : ∀ (i : β), MeasurableSet (u' i)\nf' : α → β := fun x => ⨅ (i : ↑s), piecewise (u' ↑i) (fun x => ↑i) (fun x => ⊤) x\nf'_meas : Measurable f'\nt : Set α := ⋃ (p : ↑s) (q : ↑(s ∩ Ioi ↑p)), u' ↑p ∩ v ↑p ↑q\n⊢ ∑' (p : ↑s) (q : ↑(s ∩ Ioi ↑p)), ↑↑μ (u ↑p ↑q ∩ v ↑p ↑q) = ∑' (p : ↑s) (x : ↑(s ∩ Ioi ↑p)), 0\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_f\nα : Type u_1\nm : MeasurableSpace α\nμ : Measure α\nβ : Type u_2\ninst✝⁶ : CompleteLinearOrder β\ninst✝⁵ : DenselyOrdered β\ninst✝⁴ : TopologicalSpace β\ninst✝³ : OrderTopology β\ninst✝² : SecondCountableTopology β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\ns : Set β\ns_count : Set.Countable s\ns_dense : Dense s\nf : α → β\nh :\n  ∀ (p : β),\n    p ∈ s →\n      ∀ (q : β),\n        q ∈ s →\n          p < q → ∃ u v, MeasurableSet u ∧ MeasurableSet v ∧ {x | f x < p} ⊆ u ∧ {x | q < f x} ⊆ v ∧ ↑↑μ (u ∩ v) = 0\nthis : Encodable ↑s\nu v : β → β → Set α\nhuv :\n  ∀ (p q : β),\n    MeasurableSet (u p q) ∧\n      MeasurableSet (v p q) ∧\n        {x | f x < p} ⊆ u p q ∧ {x | q < f x} ⊆ v p q ∧ (p ∈ s → q ∈ s → p < q → ↑↑μ (u p q ∩ v p q) = 0)\nu' : β → Set α := fun p => ⋂ (q : β) (_ : q ∈ s ∩ Ioi p), u p q\nu'_meas : ∀ (i : β), MeasurableSet (u' i)\nf' : α → β := fun x => ⨅ (i : ↑s), piecewise (u' ↑i) (fun x => ↑i) (fun x => ⊤) x\nf'_meas : Measurable f'\nt : Set α := ⋃ (p : ↑s) (q : ↑(s ∩ Ioi ↑p)), u' ↑p ∩ v ↑p ↑q\n⊢ (fun p => ∑' (q : ↑(s ∩ Ioi ↑p)), ↑↑μ (u ↑p ↑q ∩ v ↑p ↑q)) = fun p => ∑' (x : ↑(s ∩ Ioi ↑p)), 0\n[PROOFSTEP]\next1 p\n[GOAL]\ncase e_f.h\nα : Type u_1\nm : MeasurableSpace α\nμ : Measure α\nβ : Type u_2\ninst✝⁶ : CompleteLinearOrder β\ninst✝⁵ : DenselyOrdered β\ninst✝⁴ : TopologicalSpace β\ninst✝³ : OrderTopology β\ninst✝² : SecondCountableTopology β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\ns : Set β\ns_count : Set.Countable s\ns_dense : Dense s\nf : α → β\nh :\n  ∀ (p : β),\n    p ∈ s →\n      ∀ (q : β),\n        q ∈ s →\n          p < q → ∃ u v, MeasurableSet u ∧ MeasurableSet v ∧ {x | f x < p} ⊆ u ∧ {x | q < f x} ⊆ v ∧ ↑↑μ (u ∩ v) = 0\nthis : Encodable ↑s\nu v : β → β → Set α\nhuv :\n  ∀ (p q : β),\n    MeasurableSet (u p q) ∧\n      MeasurableSet (v p q) ∧\n        {x | f x < p} ⊆ u p q ∧ {x | q < f x} ⊆ v p q ∧ (p ∈ s → q ∈ s → p < q → ↑↑μ (u p q ∩ v p q) = 0)\nu' : β → Set α := fun p => ⋂ (q : β) (_ : q ∈ s ∩ Ioi p), u p q\nu'_meas : ∀ (i : β), MeasurableSet (u' i)\nf' : α → β := fun x => ⨅ (i : ↑s), piecewise (u' ↑i) (fun x => ↑i) (fun x => ⊤) x\nf'_meas : Measurable f'\nt : Set α := ⋃ (p : ↑s) (q : ↑(s ∩ Ioi ↑p)), u' ↑p ∩ v ↑p ↑q\np : ↑s\n⊢ ∑' (q : ↑(s ∩ Ioi ↑p)), ↑↑μ (u ↑p ↑q ∩ v ↑p ↑q) = ∑' (x : ↑(s ∩ Ioi ↑p)), 0\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_f.h.e_f\nα : Type u_1\nm : MeasurableSpace α\nμ : Measure α\nβ : Type u_2\ninst✝⁶ : CompleteLinearOrder β\ninst✝⁵ : DenselyOrdered β\ninst✝⁴ : TopologicalSpace β\ninst✝³ : OrderTopology β\ninst✝² : SecondCountableTopology β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\ns : Set β\ns_count : Set.Countable s\ns_dense : Dense s\nf : α → β\nh :\n  ∀ (p : β),\n    p ∈ s →\n      ∀ (q : β),\n        q ∈ s →\n          p < q → ∃ u v, MeasurableSet u ∧ MeasurableSet v ∧ {x | f x < p} ⊆ u ∧ {x | q < f x} ⊆ v ∧ ↑↑μ (u ∩ v) = 0\nthis : Encodable ↑s\nu v : β → β → Set α\nhuv :\n  ∀ (p q : β),\n    MeasurableSet (u p q) ∧\n      MeasurableSet (v p q) ∧\n        {x | f x < p} ⊆ u p q ∧ {x | q < f x} ⊆ v p q ∧ (p ∈ s → q ∈ s → p < q → ↑↑μ (u p q ∩ v p q) = 0)\nu' : β → Set α := fun p => ⋂ (q : β) (_ : q ∈ s ∩ Ioi p), u p q\nu'_meas : ∀ (i : β), MeasurableSet (u' i)\nf' : α → β := fun x => ⨅ (i : ↑s), piecewise (u' ↑i) (fun x => ↑i) (fun x => ⊤) x\nf'_meas : Measurable f'\nt : Set α := ⋃ (p : ↑s) (q : ↑(s ∩ Ioi ↑p)), u' ↑p ∩ v ↑p ↑q\np : ↑s\n⊢ (fun q => ↑↑μ (u ↑p ↑q ∩ v ↑p ↑q)) = fun x => 0\n[PROOFSTEP]\next1 q\n[GOAL]\ncase e_f.h.e_f.h\nα : Type u_1\nm : MeasurableSpace α\nμ : Measure α\nβ : Type u_2\ninst✝⁶ : CompleteLinearOrder β\ninst✝⁵ : DenselyOrdered β\ninst✝⁴ : TopologicalSpace β\ninst✝³ : OrderTopology β\ninst✝² : SecondCountableTopology β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\ns : Set β\ns_count : Set.Countable s\ns_dense : Dense s\nf : α → β\nh :\n  ∀ (p : β),\n    p ∈ s →\n      ∀ (q : β),\n        q ∈ s →\n          p < q → ∃ u v, MeasurableSet u ∧ MeasurableSet v ∧ {x | f x < p} ⊆ u ∧ {x | q < f x} ⊆ v ∧ ↑↑μ (u ∩ v) = 0\nthis : Encodable ↑s\nu v : β → β → Set α\nhuv :\n  ∀ (p q : β),\n    MeasurableSet (u p q) ∧\n      MeasurableSet (v p q) ∧\n        {x | f x < p} ⊆ u p q ∧ {x | q < f x} ⊆ v p q ∧ (p ∈ s → q ∈ s → p < q → ↑↑μ (u p q ∩ v p q) = 0)\nu' : β → Set α := fun p => ⋂ (q : β) (_ : q ∈ s ∩ Ioi p), u p q\nu'_meas : ∀ (i : β), MeasurableSet (u' i)\nf' : α → β := fun x => ⨅ (i : ↑s), piecewise (u' ↑i) (fun x => ↑i) (fun x => ⊤) x\nf'_meas : Measurable f'\nt : Set α := ⋃ (p : ↑s) (q : ↑(s ∩ Ioi ↑p)), u' ↑p ∩ v ↑p ↑q\np : ↑s\nq : ↑(s ∩ Ioi ↑p)\n⊢ ↑↑μ (u ↑p ↑q ∩ v ↑p ↑q) = 0\n[PROOFSTEP]\nexact (huv p q).2.2.2.2 p.2 q.2.1 q.2.2\n[GOAL]\nα : Type u_1\nm : MeasurableSpace α\nμ : Measure α\nβ : Type u_2\ninst✝⁶ : CompleteLinearOrder β\ninst✝⁵ : DenselyOrdered β\ninst✝⁴ : TopologicalSpace β\ninst✝³ : OrderTopology β\ninst✝² : SecondCountableTopology β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\ns : Set β\ns_count : Set.Countable s\ns_dense : Dense s\nf : α → β\nh :\n  ∀ (p : β),\n    p ∈ s →\n      ∀ (q : β),\n        q ∈ s →\n          p < q → ∃ u v, MeasurableSet u ∧ MeasurableSet v ∧ {x | f x < p} ⊆ u ∧ {x | q < f x} ⊆ v ∧ ↑↑μ (u ∩ v) = 0\nthis : Encodable ↑s\nu v : β → β → Set α\nhuv :\n  ∀ (p q : β),\n    MeasurableSet (u p q) ∧\n      MeasurableSet (v p q) ∧\n        {x | f x < p} ⊆ u p q ∧ {x | q < f x} ⊆ v p q ∧ (p ∈ s → q ∈ s → p < q → ↑↑μ (u p q ∩ v p q) = 0)\nu' : β → Set α := fun p => ⋂ (q : β) (_ : q ∈ s ∩ Ioi p), u p q\nu'_meas : ∀ (i : β), MeasurableSet (u' i)\nf' : α → β := fun x => ⨅ (i : ↑s), piecewise (u' ↑i) (fun x => ↑i) (fun x => ⊤) x\nf'_meas : Measurable f'\nt : Set α := ⋃ (p : ↑s) (q : ↑(s ∩ Ioi ↑p)), u' ↑p ∩ v ↑p ↑q\n⊢ ∑' (p : ↑s) (x : ↑(s ∩ Ioi ↑p)), 0 = 0\n[PROOFSTEP]\nsimp only [tsum_zero]\n[GOAL]\nα : Type u_1\nm : MeasurableSpace α\nμ : Measure α\nβ : Type u_2\ninst✝⁶ : CompleteLinearOrder β\ninst✝⁵ : DenselyOrdered β\ninst✝⁴ : TopologicalSpace β\ninst✝³ : OrderTopology β\ninst✝² : SecondCountableTopology β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\ns : Set β\ns_count : Set.Countable s\ns_dense : Dense s\nf : α → β\nh :\n  ∀ (p : β),\n    p ∈ s →\n      ∀ (q : β),\n        q ∈ s →\n          p < q → ∃ u v, MeasurableSet u ∧ MeasurableSet v ∧ {x | f x < p} ⊆ u ∧ {x | q < f x} ⊆ v ∧ ↑↑μ (u ∩ v) = 0\nthis : Encodable ↑s\nu v : β → β → Set α\nhuv :\n  ∀ (p q : β),\n    MeasurableSet (u p q) ∧\n      MeasurableSet (v p q) ∧\n        {x | f x < p} ⊆ u p q ∧ {x | q < f x} ⊆ v p q ∧ (p ∈ s → q ∈ s → p < q → ↑↑μ (u p q ∩ v p q) = 0)\nu' : β → Set α := fun p => ⋂ (q : β) (_ : q ∈ s ∩ Ioi p), u p q\nu'_meas : ∀ (i : β), MeasurableSet (u' i)\nf' : α → β := fun x => ⨅ (i : ↑s), piecewise (u' ↑i) (fun x => ↑i) (fun x => ⊤) x\nf'_meas : Measurable f'\nt : Set α := ⋃ (p : ↑s) (q : ↑(s ∩ Ioi ↑p)), u' ↑p ∩ v ↑p ↑q\nμt : ↑↑μ t ≤ 0\n⊢ AEMeasurable f\n[PROOFSTEP]\nhave ff' : ∀ᵐ x ∂μ, f x = f' x :=\n  by\n  have : ∀ᵐ x ∂μ, x ∉ t := by\n    have : μ t = 0 := le_antisymm μt bot_le\n    change μ _ = 0\n    convert this\n    ext y\n    simp only [not_exists, exists_prop, mem_setOf_eq, mem_compl_iff, not_not_mem]\n  filter_upwards [this] with x hx\n  apply (iInf_eq_of_forall_ge_of_forall_gt_exists_lt _ _).symm\n  · intro i\n    by_cases H : x ∈ u' i\n    swap\n    · simp only [H, le_top, not_false_iff, piecewise_eq_of_not_mem]\n    simp only [H, piecewise_eq_of_mem]\n    contrapose! hx\n    obtain ⟨r, ⟨xr, rq⟩, rs⟩ : ∃ r, r ∈ Ioo (i : β) (f x) ∩ s :=\n      dense_iff_inter_open.1 s_dense (Ioo i (f x)) isOpen_Ioo (nonempty_Ioo.2 hx)\n    have A : x ∈ v i r := (huv i r).2.2.2.1 rq\n    refine mem_iUnion.2 ⟨i, ?_⟩\n    refine mem_iUnion.2 ⟨⟨r, ⟨rs, xr⟩⟩, ?_⟩\n    exact ⟨H, A⟩\n  · intro q hq\n    obtain ⟨r, ⟨xr, rq⟩, rs⟩ : ∃ r, r ∈ Ioo (f x) q ∩ s :=\n      dense_iff_inter_open.1 s_dense (Ioo (f x) q) isOpen_Ioo (nonempty_Ioo.2 hq)\n    refine' ⟨⟨r, rs⟩, _⟩\n    have A : x ∈ u' r := mem_biInter fun i _ => (huv r i).2.2.1 xr\n    simp only [A, rq, piecewise_eq_of_mem, Subtype.coe_mk]\n[GOAL]\nα : Type u_1\nm : MeasurableSpace α\nμ : Measure α\nβ : Type u_2\ninst✝⁶ : CompleteLinearOrder β\ninst✝⁵ : DenselyOrdered β\ninst✝⁴ : TopologicalSpace β\ninst✝³ : OrderTopology β\ninst✝² : SecondCountableTopology β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\ns : Set β\ns_count : Set.Countable s\ns_dense : Dense s\nf : α → β\nh :\n  ∀ (p : β),\n    p ∈ s →\n      ∀ (q : β),\n        q ∈ s →\n          p < q → ∃ u v, MeasurableSet u ∧ MeasurableSet v ∧ {x | f x < p} ⊆ u ∧ {x | q < f x} ⊆ v ∧ ↑↑μ (u ∩ v) = 0\nthis : Encodable ↑s\nu v : β → β → Set α\nhuv :\n  ∀ (p q : β),\n    MeasurableSet (u p q) ∧\n      MeasurableSet (v p q) ∧\n        {x | f x < p} ⊆ u p q ∧ {x | q < f x} ⊆ v p q ∧ (p ∈ s → q ∈ s → p < q → ↑↑μ (u p q ∩ v p q) = 0)\nu' : β → Set α := fun p => ⋂ (q : β) (_ : q ∈ s ∩ Ioi p), u p q\nu'_meas : ∀ (i : β), MeasurableSet (u' i)\nf' : α → β := fun x => ⨅ (i : ↑s), piecewise (u' ↑i) (fun x => ↑i) (fun x => ⊤) x\nf'_meas : Measurable f'\nt : Set α := ⋃ (p : ↑s) (q : ↑(s ∩ Ioi ↑p)), u' ↑p ∩ v ↑p ↑q\nμt : ↑↑μ t ≤ 0\n⊢ ∀ᵐ (x : α) ∂μ, f x = f' x\n[PROOFSTEP]\nhave : ∀ᵐ x ∂μ, x ∉ t := by\n  have : μ t = 0 := le_antisymm μt bot_le\n  change μ _ = 0\n  convert this\n  ext y\n  simp only [not_exists, exists_prop, mem_setOf_eq, mem_compl_iff, not_not_mem]\n[GOAL]\nα : Type u_1\nm : MeasurableSpace α\nμ : Measure α\nβ : Type u_2\ninst✝⁶ : CompleteLinearOrder β\ninst✝⁵ : DenselyOrdered β\ninst✝⁴ : TopologicalSpace β\ninst✝³ : OrderTopology β\ninst✝² : SecondCountableTopology β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\ns : Set β\ns_count : Set.Countable s\ns_dense : Dense s\nf : α → β\nh :\n  ∀ (p : β),\n    p ∈ s →\n      ∀ (q : β),\n        q ∈ s →\n          p < q → ∃ u v, MeasurableSet u ∧ MeasurableSet v ∧ {x | f x < p} ⊆ u ∧ {x | q < f x} ⊆ v ∧ ↑↑μ (u ∩ v) = 0\nthis : Encodable ↑s\nu v : β → β → Set α\nhuv :\n  ∀ (p q : β),\n    MeasurableSet (u p q) ∧\n      MeasurableSet (v p q) ∧\n        {x | f x < p} ⊆ u p q ∧ {x | q < f x} ⊆ v p q ∧ (p ∈ s → q ∈ s → p < q → ↑↑μ (u p q ∩ v p q) = 0)\nu' : β → Set α := fun p => ⋂ (q : β) (_ : q ∈ s ∩ Ioi p), u p q\nu'_meas : ∀ (i : β), MeasurableSet (u' i)\nf' : α → β := fun x => ⨅ (i : ↑s), piecewise (u' ↑i) (fun x => ↑i) (fun x => ⊤) x\nf'_meas : Measurable f'\nt : Set α := ⋃ (p : ↑s) (q : ↑(s ∩ Ioi ↑p)), u' ↑p ∩ v ↑p ↑q\nμt : ↑↑μ t ≤ 0\n⊢ ∀ᵐ (x : α) ∂μ, ¬x ∈ t\n[PROOFSTEP]\nhave : μ t = 0 := le_antisymm μt bot_le\n[GOAL]\nα : Type u_1\nm : MeasurableSpace α\nμ : Measure α\nβ : Type u_2\ninst✝⁶ : CompleteLinearOrder β\ninst✝⁵ : DenselyOrdered β\ninst✝⁴ : TopologicalSpace β\ninst✝³ : OrderTopology β\ninst✝² : SecondCountableTopology β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\ns : Set β\ns_count : Set.Countable s\ns_dense : Dense s\nf : α → β\nh :\n  ∀ (p : β),\n    p ∈ s →\n      ∀ (q : β),\n        q ∈ s →\n          p < q → ∃ u v, MeasurableSet u ∧ MeasurableSet v ∧ {x | f x < p} ⊆ u ∧ {x | q < f x} ⊆ v ∧ ↑↑μ (u ∩ v) = 0\nthis✝ : Encodable ↑s\nu v : β → β → Set α\nhuv :\n  ∀ (p q : β),\n    MeasurableSet (u p q) ∧\n      MeasurableSet (v p q) ∧\n        {x | f x < p} ⊆ u p q ∧ {x | q < f x} ⊆ v p q ∧ (p ∈ s → q ∈ s → p < q → ↑↑μ (u p q ∩ v p q) = 0)\nu' : β → Set α := fun p => ⋂ (q : β) (_ : q ∈ s ∩ Ioi p), u p q\nu'_meas : ∀ (i : β), MeasurableSet (u' i)\nf' : α → β := fun x => ⨅ (i : ↑s), piecewise (u' ↑i) (fun x => ↑i) (fun x => ⊤) x\nf'_meas : Measurable f'\nt : Set α := ⋃ (p : ↑s) (q : ↑(s ∩ Ioi ↑p)), u' ↑p ∩ v ↑p ↑q\nμt : ↑↑μ t ≤ 0\nthis : ↑↑μ t = 0\n⊢ ∀ᵐ (x : α) ∂μ, ¬x ∈ t\n[PROOFSTEP]\nchange μ _ = 0\n[GOAL]\nα : Type u_1\nm : MeasurableSpace α\nμ : Measure α\nβ : Type u_2\ninst✝⁶ : CompleteLinearOrder β\ninst✝⁵ : DenselyOrdered β\ninst✝⁴ : TopologicalSpace β\ninst✝³ : OrderTopology β\ninst✝² : SecondCountableTopology β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\ns : Set β\ns_count : Set.Countable s\ns_dense : Dense s\nf : α → β\nh :\n  ∀ (p : β),\n    p ∈ s →\n      ∀ (q : β),\n        q ∈ s →\n          p < q → ∃ u v, MeasurableSet u ∧ MeasurableSet v ∧ {x | f x < p} ⊆ u ∧ {x | q < f x} ⊆ v ∧ ↑↑μ (u ∩ v) = 0\nthis✝ : Encodable ↑s\nu v : β → β → Set α\nhuv :\n  ∀ (p q : β),\n    MeasurableSet (u p q) ∧\n      MeasurableSet (v p q) ∧\n        {x | f x < p} ⊆ u p q ∧ {x | q < f x} ⊆ v p q ∧ (p ∈ s → q ∈ s → p < q → ↑↑μ (u p q ∩ v p q) = 0)\nu' : β → Set α := fun p => ⋂ (q : β) (_ : q ∈ s ∩ Ioi p), u p q\nu'_meas : ∀ (i : β), MeasurableSet (u' i)\nf' : α → β := fun x => ⨅ (i : ↑s), piecewise (u' ↑i) (fun x => ↑i) (fun x => ⊤) x\nf'_meas : Measurable f'\nt : Set α := ⋃ (p : ↑s) (q : ↑(s ∩ Ioi ↑p)), u' ↑p ∩ v ↑p ↑q\nμt : ↑↑μ t ≤ 0\nthis : ↑↑μ t = 0\n⊢ ↑↑μ {x | (fun x => ¬x ∈ t) x}ᶜ = 0\n[PROOFSTEP]\nconvert this\n[GOAL]\ncase h.e'_2.h.e'_3\nα : Type u_1\nm : MeasurableSpace α\nμ : Measure α\nβ : Type u_2\ninst✝⁶ : CompleteLinearOrder β\ninst✝⁵ : DenselyOrdered β\ninst✝⁴ : TopologicalSpace β\ninst✝³ : OrderTopology β\ninst✝² : SecondCountableTopology β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\ns : Set β\ns_count : Set.Countable s\ns_dense : Dense s\nf : α → β\nh :\n  ∀ (p : β),\n    p ∈ s →\n      ∀ (q : β),\n        q ∈ s →\n          p < q → ∃ u v, MeasurableSet u ∧ MeasurableSet v ∧ {x | f x < p} ⊆ u ∧ {x | q < f x} ⊆ v ∧ ↑↑μ (u ∩ v) = 0\nthis✝ : Encodable ↑s\nu v : β → β → Set α\nhuv :\n  ∀ (p q : β),\n    MeasurableSet (u p q) ∧\n      MeasurableSet (v p q) ∧\n        {x | f x < p} ⊆ u p q ∧ {x | q < f x} ⊆ v p q ∧ (p ∈ s → q ∈ s → p < q → ↑↑μ (u p q ∩ v p q) = 0)\nu' : β → Set α := fun p => ⋂ (q : β) (_ : q ∈ s ∩ Ioi p), u p q\nu'_meas : ∀ (i : β), MeasurableSet (u' i)\nf' : α → β := fun x => ⨅ (i : ↑s), piecewise (u' ↑i) (fun x => ↑i) (fun x => ⊤) x\nf'_meas : Measurable f'\nt : Set α := ⋃ (p : ↑s) (q : ↑(s ∩ Ioi ↑p)), u' ↑p ∩ v ↑p ↑q\nμt : ↑↑μ t ≤ 0\nthis : ↑↑μ t = 0\n⊢ {x | (fun x => ¬x ∈ t) x}ᶜ = t\n[PROOFSTEP]\next y\n[GOAL]\ncase h.e'_2.h.e'_3.h\nα : Type u_1\nm : MeasurableSpace α\nμ : Measure α\nβ : Type u_2\ninst✝⁶ : CompleteLinearOrder β\ninst✝⁵ : DenselyOrdered β\ninst✝⁴ : TopologicalSpace β\ninst✝³ : OrderTopology β\ninst✝² : SecondCountableTopology β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\ns : Set β\ns_count : Set.Countable s\ns_dense : Dense s\nf : α → β\nh :\n  ∀ (p : β),\n    p ∈ s →\n      ∀ (q : β),\n        q ∈ s →\n          p < q → ∃ u v, MeasurableSet u ∧ MeasurableSet v ∧ {x | f x < p} ⊆ u ∧ {x | q < f x} ⊆ v ∧ ↑↑μ (u ∩ v) = 0\nthis✝ : Encodable ↑s\nu v : β → β → Set α\nhuv :\n  ∀ (p q : β),\n    MeasurableSet (u p q) ∧\n      MeasurableSet (v p q) ∧\n        {x | f x < p} ⊆ u p q ∧ {x | q < f x} ⊆ v p q ∧ (p ∈ s → q ∈ s → p < q → ↑↑μ (u p q ∩ v p q) = 0)\nu' : β → Set α := fun p => ⋂ (q : β) (_ : q ∈ s ∩ Ioi p), u p q\nu'_meas : ∀ (i : β), MeasurableSet (u' i)\nf' : α → β := fun x => ⨅ (i : ↑s), piecewise (u' ↑i) (fun x => ↑i) (fun x => ⊤) x\nf'_meas : Measurable f'\nt : Set α := ⋃ (p : ↑s) (q : ↑(s ∩ Ioi ↑p)), u' ↑p ∩ v ↑p ↑q\nμt : ↑↑μ t ≤ 0\nthis : ↑↑μ t = 0\ny : α\n⊢ y ∈ {x | (fun x => ¬x ∈ t) x}ᶜ ↔ y ∈ t\n[PROOFSTEP]\nsimp only [not_exists, exists_prop, mem_setOf_eq, mem_compl_iff, not_not_mem]\n[GOAL]\nα : Type u_1\nm : MeasurableSpace α\nμ : Measure α\nβ : Type u_2\ninst✝⁶ : CompleteLinearOrder β\ninst✝⁵ : DenselyOrdered β\ninst✝⁴ : TopologicalSpace β\ninst✝³ : OrderTopology β\ninst✝² : SecondCountableTopology β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\ns : Set β\ns_count : Set.Countable s\ns_dense : Dense s\nf : α → β\nh :\n  ∀ (p : β),\n    p ∈ s →\n      ∀ (q : β),\n        q ∈ s →\n          p < q → ∃ u v, MeasurableSet u ∧ MeasurableSet v ∧ {x | f x < p} ⊆ u ∧ {x | q < f x} ⊆ v ∧ ↑↑μ (u ∩ v) = 0\nthis✝ : Encodable ↑s\nu v : β → β → Set α\nhuv :\n  ∀ (p q : β),\n    MeasurableSet (u p q) ∧\n      MeasurableSet (v p q) ∧\n        {x | f x < p} ⊆ u p q ∧ {x | q < f x} ⊆ v p q ∧ (p ∈ s → q ∈ s → p < q → ↑↑μ (u p q ∩ v p q) = 0)\nu' : β → Set α := fun p => ⋂ (q : β) (_ : q ∈ s ∩ Ioi p), u p q\nu'_meas : ∀ (i : β), MeasurableSet (u' i)\nf' : α → β := fun x => ⨅ (i : ↑s), piecewise (u' ↑i) (fun x => ↑i) (fun x => ⊤) x\nf'_meas : Measurable f'\nt : Set α := ⋃ (p : ↑s) (q : ↑(s ∩ Ioi ↑p)), u' ↑p ∩ v ↑p ↑q\nμt : ↑↑μ t ≤ 0\nthis : ∀ᵐ (x : α) ∂μ, ¬x ∈ t\n⊢ ∀ᵐ (x : α) ∂μ, f x = f' x\n[PROOFSTEP]\nfilter_upwards [this] with x hx\n[GOAL]\ncase h\nα : Type u_1\nm : MeasurableSpace α\nμ : Measure α\nβ : Type u_2\ninst✝⁶ : CompleteLinearOrder β\ninst✝⁵ : DenselyOrdered β\ninst✝⁴ : TopologicalSpace β\ninst✝³ : OrderTopology β\ninst✝² : SecondCountableTopology β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\ns : Set β\ns_count : Set.Countable s\ns_dense : Dense s\nf : α → β\nh :\n  ∀ (p : β),\n    p ∈ s →\n      ∀ (q : β),\n        q ∈ s →\n          p < q → ∃ u v, MeasurableSet u ∧ MeasurableSet v ∧ {x | f x < p} ⊆ u ∧ {x | q < f x} ⊆ v ∧ ↑↑μ (u ∩ v) = 0\nthis✝ : Encodable ↑s\nu v : β → β → Set α\nhuv :\n  ∀ (p q : β),\n    MeasurableSet (u p q) ∧\n      MeasurableSet (v p q) ∧\n        {x | f x < p} ⊆ u p q ∧ {x | q < f x} ⊆ v p q ∧ (p ∈ s → q ∈ s → p < q → ↑↑μ (u p q ∩ v p q) = 0)\nu' : β → Set α := fun p => ⋂ (q : β) (_ : q ∈ s ∩ Ioi p), u p q\nu'_meas : ∀ (i : β), MeasurableSet (u' i)\nf' : α → β := fun x => ⨅ (i : ↑s), piecewise (u' ↑i) (fun x => ↑i) (fun x => ⊤) x\nf'_meas : Measurable f'\nt : Set α := ⋃ (p : ↑s) (q : ↑(s ∩ Ioi ↑p)), u' ↑p ∩ v ↑p ↑q\nμt : ↑↑μ t ≤ 0\nthis : ∀ᵐ (x : α) ∂μ, ¬x ∈ t\nx : α\nhx : ¬x ∈ ⋃ (p : ↑s) (q : ↑(s ∩ Ioi ↑p)), (⋂ (q : β) (_ : q ∈ s ∩ Ioi ↑p), u (↑p) q) ∩ v ↑p ↑q\n⊢ f x = ⨅ (i : ↑s), piecewise (⋂ (q : β) (_ : q ∈ s ∩ Ioi ↑i), u (↑i) q) (fun x => ↑i) (fun x => ⊤) x\n[PROOFSTEP]\napply (iInf_eq_of_forall_ge_of_forall_gt_exists_lt _ _).symm\n[GOAL]\nα : Type u_1\nm : MeasurableSpace α\nμ : Measure α\nβ : Type u_2\ninst✝⁶ : CompleteLinearOrder β\ninst✝⁵ : DenselyOrdered β\ninst✝⁴ : TopologicalSpace β\ninst✝³ : OrderTopology β\ninst✝² : SecondCountableTopology β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\ns : Set β\ns_count : Set.Countable s\ns_dense : Dense s\nf : α → β\nh :\n  ∀ (p : β),\n    p ∈ s →\n      ∀ (q : β),\n        q ∈ s →\n          p < q → ∃ u v, MeasurableSet u ∧ MeasurableSet v ∧ {x | f x < p} ⊆ u ∧ {x | q < f x} ⊆ v ∧ ↑↑μ (u ∩ v) = 0\nthis✝ : Encodable ↑s\nu v : β → β → Set α\nhuv :\n  ∀ (p q : β),\n    MeasurableSet (u p q) ∧\n      MeasurableSet (v p q) ∧\n        {x | f x < p} ⊆ u p q ∧ {x | q < f x} ⊆ v p q ∧ (p ∈ s → q ∈ s → p < q → ↑↑μ (u p q ∩ v p q) = 0)\nu' : β → Set α := fun p => ⋂ (q : β) (_ : q ∈ s ∩ Ioi p), u p q\nu'_meas : ∀ (i : β), MeasurableSet (u' i)\nf' : α → β := fun x => ⨅ (i : ↑s), piecewise (u' ↑i) (fun x => ↑i) (fun x => ⊤) x\nf'_meas : Measurable f'\nt : Set α := ⋃ (p : ↑s) (q : ↑(s ∩ Ioi ↑p)), u' ↑p ∩ v ↑p ↑q\nμt : ↑↑μ t ≤ 0\nthis : ∀ᵐ (x : α) ∂μ, ¬x ∈ t\nx : α\nhx : ¬x ∈ ⋃ (p : ↑s) (q : ↑(s ∩ Ioi ↑p)), (⋂ (q : β) (_ : q ∈ s ∩ Ioi ↑p), u (↑p) q) ∩ v ↑p ↑q\n⊢ ∀ (i : ↑s), f x ≤ piecewise (⋂ (q : β) (_ : q ∈ s ∩ Ioi ↑i), u (↑i) q) (fun x => ↑i) (fun x => ⊤) x\n[PROOFSTEP]\nintro i\n[GOAL]\nα : Type u_1\nm : MeasurableSpace α\nμ : Measure α\nβ : Type u_2\ninst✝⁶ : CompleteLinearOrder β\ninst✝⁵ : DenselyOrdered β\ninst✝⁴ : TopologicalSpace β\ninst✝³ : OrderTopology β\ninst✝² : SecondCountableTopology β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\ns : Set β\ns_count : Set.Countable s\ns_dense : Dense s\nf : α → β\nh :\n  ∀ (p : β),\n    p ∈ s →\n      ∀ (q : β),\n        q ∈ s →\n          p < q → ∃ u v, MeasurableSet u ∧ MeasurableSet v ∧ {x | f x < p} ⊆ u ∧ {x | q < f x} ⊆ v ∧ ↑↑μ (u ∩ v) = 0\nthis✝ : Encodable ↑s\nu v : β → β → Set α\nhuv :\n  ∀ (p q : β),\n    MeasurableSet (u p q) ∧\n      MeasurableSet (v p q) ∧\n        {x | f x < p} ⊆ u p q ∧ {x | q < f x} ⊆ v p q ∧ (p ∈ s → q ∈ s → p < q → ↑↑μ (u p q ∩ v p q) = 0)\nu' : β → Set α := fun p => ⋂ (q : β) (_ : q ∈ s ∩ Ioi p), u p q\nu'_meas : ∀ (i : β), MeasurableSet (u' i)\nf' : α → β := fun x => ⨅ (i : ↑s), piecewise (u' ↑i) (fun x => ↑i) (fun x => ⊤) x\nf'_meas : Measurable f'\nt : Set α := ⋃ (p : ↑s) (q : ↑(s ∩ Ioi ↑p)), u' ↑p ∩ v ↑p ↑q\nμt : ↑↑μ t ≤ 0\nthis : ∀ᵐ (x : α) ∂μ, ¬x ∈ t\nx : α\nhx : ¬x ∈ ⋃ (p : ↑s) (q : ↑(s ∩ Ioi ↑p)), (⋂ (q : β) (_ : q ∈ s ∩ Ioi ↑p), u (↑p) q) ∩ v ↑p ↑q\ni : ↑s\n⊢ f x ≤ piecewise (⋂ (q : β) (_ : q ∈ s ∩ Ioi ↑i), u (↑i) q) (fun x => ↑i) (fun x => ⊤) x\n[PROOFSTEP]\nby_cases H : x ∈ u' i\n[GOAL]\ncase pos\nα : Type u_1\nm : MeasurableSpace α\nμ : Measure α\nβ : Type u_2\ninst✝⁶ : CompleteLinearOrder β\ninst✝⁵ : DenselyOrdered β\ninst✝⁴ : TopologicalSpace β\ninst✝³ : OrderTopology β\ninst✝² : SecondCountableTopology β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\ns : Set β\ns_count : Set.Countable s\ns_dense : Dense s\nf : α → β\nh :\n  ∀ (p : β),\n    p ∈ s →\n      ∀ (q : β),\n        q ∈ s →\n          p < q → ∃ u v, MeasurableSet u ∧ MeasurableSet v ∧ {x | f x < p} ⊆ u ∧ {x | q < f x} ⊆ v ∧ ↑↑μ (u ∩ v) = 0\nthis✝ : Encodable ↑s\nu v : β → β → Set α\nhuv :\n  ∀ (p q : β),\n    MeasurableSet (u p q) ∧\n      MeasurableSet (v p q) ∧\n        {x | f x < p} ⊆ u p q ∧ {x | q < f x} ⊆ v p q ∧ (p ∈ s → q ∈ s → p < q → ↑↑μ (u p q ∩ v p q) = 0)\nu' : β → Set α := fun p => ⋂ (q : β) (_ : q ∈ s ∩ Ioi p), u p q\nu'_meas : ∀ (i : β), MeasurableSet (u' i)\nf' : α → β := fun x => ⨅ (i : ↑s), piecewise (u' ↑i) (fun x => ↑i) (fun x => ⊤) x\nf'_meas : Measurable f'\nt : Set α := ⋃ (p : ↑s) (q : ↑(s ∩ Ioi ↑p)), u' ↑p ∩ v ↑p ↑q\nμt : ↑↑μ t ≤ 0\nthis : ∀ᵐ (x : α) ∂μ, ¬x ∈ t\nx : α\nhx : ¬x ∈ ⋃ (p : ↑s) (q : ↑(s ∩ Ioi ↑p)), (⋂ (q : β) (_ : q ∈ s ∩ Ioi ↑p), u (↑p) q) ∩ v ↑p ↑q\ni : ↑s\nH : x ∈ u' ↑i\n⊢ f x ≤ piecewise (⋂ (q : β) (_ : q ∈ s ∩ Ioi ↑i), u (↑i) q) (fun x => ↑i) (fun x => ⊤) x\ncase neg\nα : Type u_1\nm : MeasurableSpace α\nμ : Measure α\nβ : Type u_2\ninst✝⁶ : CompleteLinearOrder β\ninst✝⁵ : DenselyOrdered β\ninst✝⁴ : TopologicalSpace β\ninst✝³ : OrderTopology β\ninst✝² : SecondCountableTopology β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\ns : Set β\ns_count : Set.Countable s\ns_dense : Dense s\nf : α → β\nh :\n  ∀ (p : β),\n    p ∈ s →\n      ∀ (q : β),\n        q ∈ s →\n          p < q → ∃ u v, MeasurableSet u ∧ MeasurableSet v ∧ {x | f x < p} ⊆ u ∧ {x | q < f x} ⊆ v ∧ ↑↑μ (u ∩ v) = 0\nthis✝ : Encodable ↑s\nu v : β → β → Set α\nhuv :\n  ∀ (p q : β),\n    MeasurableSet (u p q) ∧\n      MeasurableSet (v p q) ∧\n        {x | f x < p} ⊆ u p q ∧ {x | q < f x} ⊆ v p q ∧ (p ∈ s → q ∈ s → p < q → ↑↑μ (u p q ∩ v p q) = 0)\nu' : β → Set α := fun p => ⋂ (q : β) (_ : q ∈ s ∩ Ioi p), u p q\nu'_meas : ∀ (i : β), MeasurableSet (u' i)\nf' : α → β := fun x => ⨅ (i : ↑s), piecewise (u' ↑i) (fun x => ↑i) (fun x => ⊤) x\nf'_meas : Measurable f'\nt : Set α := ⋃ (p : ↑s) (q : ↑(s ∩ Ioi ↑p)), u' ↑p ∩ v ↑p ↑q\nμt : ↑↑μ t ≤ 0\nthis : ∀ᵐ (x : α) ∂μ, ¬x ∈ t\nx : α\nhx : ¬x ∈ ⋃ (p : ↑s) (q : ↑(s ∩ Ioi ↑p)), (⋂ (q : β) (_ : q ∈ s ∩ Ioi ↑p), u (↑p) q) ∩ v ↑p ↑q\ni : ↑s\nH : ¬x ∈ u' ↑i\n⊢ f x ≤ piecewise (⋂ (q : β) (_ : q ∈ s ∩ Ioi ↑i), u (↑i) q) (fun x => ↑i) (fun x => ⊤) x\n[PROOFSTEP]\nswap\n[GOAL]\ncase neg\nα : Type u_1\nm : MeasurableSpace α\nμ : Measure α\nβ : Type u_2\ninst✝⁶ : CompleteLinearOrder β\ninst✝⁵ : DenselyOrdered β\ninst✝⁴ : TopologicalSpace β\ninst✝³ : OrderTopology β\ninst✝² : SecondCountableTopology β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\ns : Set β\ns_count : Set.Countable s\ns_dense : Dense s\nf : α → β\nh :\n  ∀ (p : β),\n    p ∈ s →\n      ∀ (q : β),\n        q ∈ s →\n          p < q → ∃ u v, MeasurableSet u ∧ MeasurableSet v ∧ {x | f x < p} ⊆ u ∧ {x | q < f x} ⊆ v ∧ ↑↑μ (u ∩ v) = 0\nthis✝ : Encodable ↑s\nu v : β → β → Set α\nhuv :\n  ∀ (p q : β),\n    MeasurableSet (u p q) ∧\n      MeasurableSet (v p q) ∧\n        {x | f x < p} ⊆ u p q ∧ {x | q < f x} ⊆ v p q ∧ (p ∈ s → q ∈ s → p < q → ↑↑μ (u p q ∩ v p q) = 0)\nu' : β → Set α := fun p => ⋂ (q : β) (_ : q ∈ s ∩ Ioi p), u p q\nu'_meas : ∀ (i : β), MeasurableSet (u' i)\nf' : α → β := fun x => ⨅ (i : ↑s), piecewise (u' ↑i) (fun x => ↑i) (fun x => ⊤) x\nf'_meas : Measurable f'\nt : Set α := ⋃ (p : ↑s) (q : ↑(s ∩ Ioi ↑p)), u' ↑p ∩ v ↑p ↑q\nμt : ↑↑μ t ≤ 0\nthis : ∀ᵐ (x : α) ∂μ, ¬x ∈ t\nx : α\nhx : ¬x ∈ ⋃ (p : ↑s) (q : ↑(s ∩ Ioi ↑p)), (⋂ (q : β) (_ : q ∈ s ∩ Ioi ↑p), u (↑p) q) ∩ v ↑p ↑q\ni : ↑s\nH : ¬x ∈ u' ↑i\n⊢ f x ≤ piecewise (⋂ (q : β) (_ : q ∈ s ∩ Ioi ↑i), u (↑i) q) (fun x => ↑i) (fun x => ⊤) x\n[PROOFSTEP]\nsimp only [H, le_top, not_false_iff, piecewise_eq_of_not_mem]\n[GOAL]\ncase pos\nα : Type u_1\nm : MeasurableSpace α\nμ : Measure α\nβ : Type u_2\ninst✝⁶ : CompleteLinearOrder β\ninst✝⁵ : DenselyOrdered β\ninst✝⁴ : TopologicalSpace β\ninst✝³ : OrderTopology β\ninst✝² : SecondCountableTopology β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\ns : Set β\ns_count : Set.Countable s\ns_dense : Dense s\nf : α → β\nh :\n  ∀ (p : β),\n    p ∈ s →\n      ∀ (q : β),\n        q ∈ s →\n          p < q → ∃ u v, MeasurableSet u ∧ MeasurableSet v ∧ {x | f x < p} ⊆ u ∧ {x | q < f x} ⊆ v ∧ ↑↑μ (u ∩ v) = 0\nthis✝ : Encodable ↑s\nu v : β → β → Set α\nhuv :\n  ∀ (p q : β),\n    MeasurableSet (u p q) ∧\n      MeasurableSet (v p q) ∧\n        {x | f x < p} ⊆ u p q ∧ {x | q < f x} ⊆ v p q ∧ (p ∈ s → q ∈ s → p < q → ↑↑μ (u p q ∩ v p q) = 0)\nu' : β → Set α := fun p => ⋂ (q : β) (_ : q ∈ s ∩ Ioi p), u p q\nu'_meas : ∀ (i : β), MeasurableSet (u' i)\nf' : α → β := fun x => ⨅ (i : ↑s), piecewise (u' ↑i) (fun x => ↑i) (fun x => ⊤) x\nf'_meas : Measurable f'\nt : Set α := ⋃ (p : ↑s) (q : ↑(s ∩ Ioi ↑p)), u' ↑p ∩ v ↑p ↑q\nμt : ↑↑μ t ≤ 0\nthis : ∀ᵐ (x : α) ∂μ, ¬x ∈ t\nx : α\nhx : ¬x ∈ ⋃ (p : ↑s) (q : ↑(s ∩ Ioi ↑p)), (⋂ (q : β) (_ : q ∈ s ∩ Ioi ↑p), u (↑p) q) ∩ v ↑p ↑q\ni : ↑s\nH : x ∈ u' ↑i\n⊢ f x ≤ piecewise (⋂ (q : β) (_ : q ∈ s ∩ Ioi ↑i), u (↑i) q) (fun x => ↑i) (fun x => ⊤) x\n[PROOFSTEP]\nsimp only [H, piecewise_eq_of_mem]\n[GOAL]\ncase pos\nα : Type u_1\nm : MeasurableSpace α\nμ : Measure α\nβ : Type u_2\ninst✝⁶ : CompleteLinearOrder β\ninst✝⁵ : DenselyOrdered β\ninst✝⁴ : TopologicalSpace β\ninst✝³ : OrderTopology β\ninst✝² : SecondCountableTopology β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\ns : Set β\ns_count : Set.Countable s\ns_dense : Dense s\nf : α → β\nh :\n  ∀ (p : β),\n    p ∈ s →\n      ∀ (q : β),\n        q ∈ s →\n          p < q → ∃ u v, MeasurableSet u ∧ MeasurableSet v ∧ {x | f x < p} ⊆ u ∧ {x | q < f x} ⊆ v ∧ ↑↑μ (u ∩ v) = 0\nthis✝ : Encodable ↑s\nu v : β → β → Set α\nhuv :\n  ∀ (p q : β),\n    MeasurableSet (u p q) ∧\n      MeasurableSet (v p q) ∧\n        {x | f x < p} ⊆ u p q ∧ {x | q < f x} ⊆ v p q ∧ (p ∈ s → q ∈ s → p < q → ↑↑μ (u p q ∩ v p q) = 0)\nu' : β → Set α := fun p => ⋂ (q : β) (_ : q ∈ s ∩ Ioi p), u p q\nu'_meas : ∀ (i : β), MeasurableSet (u' i)\nf' : α → β := fun x => ⨅ (i : ↑s), piecewise (u' ↑i) (fun x => ↑i) (fun x => ⊤) x\nf'_meas : Measurable f'\nt : Set α := ⋃ (p : ↑s) (q : ↑(s ∩ Ioi ↑p)), u' ↑p ∩ v ↑p ↑q\nμt : ↑↑μ t ≤ 0\nthis : ∀ᵐ (x : α) ∂μ, ¬x ∈ t\nx : α\nhx : ¬x ∈ ⋃ (p : ↑s) (q : ↑(s ∩ Ioi ↑p)), (⋂ (q : β) (_ : q ∈ s ∩ Ioi ↑p), u (↑p) q) ∩ v ↑p ↑q\ni : ↑s\nH : x ∈ u' ↑i\n⊢ f x ≤ ↑i\n[PROOFSTEP]\ncontrapose! hx\n[GOAL]\ncase pos\nα : Type u_1\nm : MeasurableSpace α\nμ : Measure α\nβ : Type u_2\ninst✝⁶ : CompleteLinearOrder β\ninst✝⁵ : DenselyOrdered β\ninst✝⁴ : TopologicalSpace β\ninst✝³ : OrderTopology β\ninst✝² : SecondCountableTopology β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\ns : Set β\ns_count : Set.Countable s\ns_dense : Dense s\nf : α → β\nh :\n  ∀ (p : β),\n    p ∈ s →\n      ∀ (q : β),\n        q ∈ s →\n          p < q → ∃ u v, MeasurableSet u ∧ MeasurableSet v ∧ {x | f x < p} ⊆ u ∧ {x | q < f x} ⊆ v ∧ ↑↑μ (u ∩ v) = 0\nthis✝ : Encodable ↑s\nu v : β → β → Set α\nhuv :\n  ∀ (p q : β),\n    MeasurableSet (u p q) ∧\n      MeasurableSet (v p q) ∧\n        {x | f x < p} ⊆ u p q ∧ {x | q < f x} ⊆ v p q ∧ (p ∈ s → q ∈ s → p < q → ↑↑μ (u p q ∩ v p q) = 0)\nu' : β → Set α := fun p => ⋂ (q : β) (_ : q ∈ s ∩ Ioi p), u p q\nu'_meas : ∀ (i : β), MeasurableSet (u' i)\nf' : α → β := fun x => ⨅ (i : ↑s), piecewise (u' ↑i) (fun x => ↑i) (fun x => ⊤) x\nf'_meas : Measurable f'\nt : Set α := ⋃ (p : ↑s) (q : ↑(s ∩ Ioi ↑p)), u' ↑p ∩ v ↑p ↑q\nμt : ↑↑μ t ≤ 0\nthis : ∀ᵐ (x : α) ∂μ, ¬x ∈ t\nx : α\ni : ↑s\nH : x ∈ u' ↑i\nhx : ↑i < f x\n⊢ x ∈ ⋃ (p : ↑s) (q : ↑(s ∩ Ioi ↑p)), (⋂ (q : β) (_ : q ∈ s ∩ Ioi ↑p), u (↑p) q) ∩ v ↑p ↑q\n[PROOFSTEP]\nobtain ⟨r, ⟨xr, rq⟩, rs⟩ : ∃ r, r ∈ Ioo (i : β) (f x) ∩ s :=\n  dense_iff_inter_open.1 s_dense (Ioo i (f x)) isOpen_Ioo (nonempty_Ioo.2 hx)\n[GOAL]\ncase pos.intro.intro.intro\nα : Type u_1\nm : MeasurableSpace α\nμ : Measure α\nβ : Type u_2\ninst✝⁶ : CompleteLinearOrder β\ninst✝⁵ : DenselyOrdered β\ninst✝⁴ : TopologicalSpace β\ninst✝³ : OrderTopology β\ninst✝² : SecondCountableTopology β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\ns : Set β\ns_count : Set.Countable s\ns_dense : Dense s\nf : α → β\nh :\n  ∀ (p : β),\n    p ∈ s →\n      ∀ (q : β),\n        q ∈ s →\n          p < q → ∃ u v, MeasurableSet u ∧ MeasurableSet v ∧ {x | f x < p} ⊆ u ∧ {x | q < f x} ⊆ v ∧ ↑↑μ (u ∩ v) = 0\nthis✝ : Encodable ↑s\nu v : β → β → Set α\nhuv :\n  ∀ (p q : β),\n    MeasurableSet (u p q) ∧\n      MeasurableSet (v p q) ∧\n        {x | f x < p} ⊆ u p q ∧ {x | q < f x} ⊆ v p q ∧ (p ∈ s → q ∈ s → p < q → ↑↑μ (u p q ∩ v p q) = 0)\nu' : β → Set α := fun p => ⋂ (q : β) (_ : q ∈ s ∩ Ioi p), u p q\nu'_meas : ∀ (i : β), MeasurableSet (u' i)\nf' : α → β := fun x => ⨅ (i : ↑s), piecewise (u' ↑i) (fun x => ↑i) (fun x => ⊤) x\nf'_meas : Measurable f'\nt : Set α := ⋃ (p : ↑s) (q : ↑(s ∩ Ioi ↑p)), u' ↑p ∩ v ↑p ↑q\nμt : ↑↑μ t ≤ 0\nthis : ∀ᵐ (x : α) ∂μ, ¬x ∈ t\nx : α\ni : ↑s\nH : x ∈ u' ↑i\nhx : ↑i < f x\nr : β\nrs : r ∈ s\nxr : ↑i < r\nrq : r < f x\n⊢ x ∈ ⋃ (p : ↑s) (q : ↑(s ∩ Ioi ↑p)), (⋂ (q : β) (_ : q ∈ s ∩ Ioi ↑p), u (↑p) q) ∩ v ↑p ↑q\n[PROOFSTEP]\nhave A : x ∈ v i r := (huv i r).2.2.2.1 rq\n[GOAL]\ncase pos.intro.intro.intro\nα : Type u_1\nm : MeasurableSpace α\nμ : Measure α\nβ : Type u_2\ninst✝⁶ : CompleteLinearOrder β\ninst✝⁵ : DenselyOrdered β\ninst✝⁴ : TopologicalSpace β\ninst✝³ : OrderTopology β\ninst✝² : SecondCountableTopology β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\ns : Set β\ns_count : Set.Countable s\ns_dense : Dense s\nf : α → β\nh :\n  ∀ (p : β),\n    p ∈ s →\n      ∀ (q : β),\n        q ∈ s →\n          p < q → ∃ u v, MeasurableSet u ∧ MeasurableSet v ∧ {x | f x < p} ⊆ u ∧ {x | q < f x} ⊆ v ∧ ↑↑μ (u ∩ v) = 0\nthis✝ : Encodable ↑s\nu v : β → β → Set α\nhuv :\n  ∀ (p q : β),\n    MeasurableSet (u p q) ∧\n      MeasurableSet (v p q) ∧\n        {x | f x < p} ⊆ u p q ∧ {x | q < f x} ⊆ v p q ∧ (p ∈ s → q ∈ s → p < q → ↑↑μ (u p q ∩ v p q) = 0)\nu' : β → Set α := fun p => ⋂ (q : β) (_ : q ∈ s ∩ Ioi p), u p q\nu'_meas : ∀ (i : β), MeasurableSet (u' i)\nf' : α → β := fun x => ⨅ (i : ↑s), piecewise (u' ↑i) (fun x => ↑i) (fun x => ⊤) x\nf'_meas : Measurable f'\nt : Set α := ⋃ (p : ↑s) (q : ↑(s ∩ Ioi ↑p)), u' ↑p ∩ v ↑p ↑q\nμt : ↑↑μ t ≤ 0\nthis : ∀ᵐ (x : α) ∂μ, ¬x ∈ t\nx : α\ni : ↑s\nH : x ∈ u' ↑i\nhx : ↑i < f x\nr : β\nrs : r ∈ s\nxr : ↑i < r\nrq : r < f x\nA : x ∈ v (↑i) r\n⊢ x ∈ ⋃ (p : ↑s) (q : ↑(s ∩ Ioi ↑p)), (⋂ (q : β) (_ : q ∈ s ∩ Ioi ↑p), u (↑p) q) ∩ v ↑p ↑q\n[PROOFSTEP]\nrefine mem_iUnion.2 ⟨i, ?_⟩\n[GOAL]\ncase pos.intro.intro.intro\nα : Type u_1\nm : MeasurableSpace α\nμ : Measure α\nβ : Type u_2\ninst✝⁶ : CompleteLinearOrder β\ninst✝⁵ : DenselyOrdered β\ninst✝⁴ : TopologicalSpace β\ninst✝³ : OrderTopology β\ninst✝² : SecondCountableTopology β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\ns : Set β\ns_count : Set.Countable s\ns_dense : Dense s\nf : α → β\nh :\n  ∀ (p : β),\n    p ∈ s →\n      ∀ (q : β),\n        q ∈ s →\n          p < q → ∃ u v, MeasurableSet u ∧ MeasurableSet v ∧ {x | f x < p} ⊆ u ∧ {x | q < f x} ⊆ v ∧ ↑↑μ (u ∩ v) = 0\nthis✝ : Encodable ↑s\nu v : β → β → Set α\nhuv :\n  ∀ (p q : β),\n    MeasurableSet (u p q) ∧\n      MeasurableSet (v p q) ∧\n        {x | f x < p} ⊆ u p q ∧ {x | q < f x} ⊆ v p q ∧ (p ∈ s → q ∈ s → p < q → ↑↑μ (u p q ∩ v p q) = 0)\nu' : β → Set α := fun p => ⋂ (q : β) (_ : q ∈ s ∩ Ioi p), u p q\nu'_meas : ∀ (i : β), MeasurableSet (u' i)\nf' : α → β := fun x => ⨅ (i : ↑s), piecewise (u' ↑i) (fun x => ↑i) (fun x => ⊤) x\nf'_meas : Measurable f'\nt : Set α := ⋃ (p : ↑s) (q : ↑(s ∩ Ioi ↑p)), u' ↑p ∩ v ↑p ↑q\nμt : ↑↑μ t ≤ 0\nthis : ∀ᵐ (x : α) ∂μ, ¬x ∈ t\nx : α\ni : ↑s\nH : x ∈ u' ↑i\nhx : ↑i < f x\nr : β\nrs : r ∈ s\nxr : ↑i < r\nrq : r < f x\nA : x ∈ v (↑i) r\n⊢ x ∈ ⋃ (q : ↑(s ∩ Ioi ↑i)), (⋂ (q : β) (_ : q ∈ s ∩ Ioi ↑i), u (↑i) q) ∩ v ↑i ↑q\n[PROOFSTEP]\nrefine mem_iUnion.2 ⟨⟨r, ⟨rs, xr⟩⟩, ?_⟩\n[GOAL]\ncase pos.intro.intro.intro\nα : Type u_1\nm : MeasurableSpace α\nμ : Measure α\nβ : Type u_2\ninst✝⁶ : CompleteLinearOrder β\ninst✝⁵ : DenselyOrdered β\ninst✝⁴ : TopologicalSpace β\ninst✝³ : OrderTopology β\ninst✝² : SecondCountableTopology β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\ns : Set β\ns_count : Set.Countable s\ns_dense : Dense s\nf : α → β\nh :\n  ∀ (p : β),\n    p ∈ s →\n      ∀ (q : β),\n        q ∈ s →\n          p < q → ∃ u v, MeasurableSet u ∧ MeasurableSet v ∧ {x | f x < p} ⊆ u ∧ {x | q < f x} ⊆ v ∧ ↑↑μ (u ∩ v) = 0\nthis✝ : Encodable ↑s\nu v : β → β → Set α\nhuv :\n  ∀ (p q : β),\n    MeasurableSet (u p q) ∧\n      MeasurableSet (v p q) ∧\n        {x | f x < p} ⊆ u p q ∧ {x | q < f x} ⊆ v p q ∧ (p ∈ s → q ∈ s → p < q → ↑↑μ (u p q ∩ v p q) = 0)\nu' : β → Set α := fun p => ⋂ (q : β) (_ : q ∈ s ∩ Ioi p), u p q\nu'_meas : ∀ (i : β), MeasurableSet (u' i)\nf' : α → β := fun x => ⨅ (i : ↑s), piecewise (u' ↑i) (fun x => ↑i) (fun x => ⊤) x\nf'_meas : Measurable f'\nt : Set α := ⋃ (p : ↑s) (q : ↑(s ∩ Ioi ↑p)), u' ↑p ∩ v ↑p ↑q\nμt : ↑↑μ t ≤ 0\nthis : ∀ᵐ (x : α) ∂μ, ¬x ∈ t\nx : α\ni : ↑s\nH : x ∈ u' ↑i\nhx : ↑i < f x\nr : β\nrs : r ∈ s\nxr : ↑i < r\nrq : r < f x\nA : x ∈ v (↑i) r\n⊢ x ∈ (⋂ (q : β) (_ : q ∈ s ∩ Ioi ↑i), u (↑i) q) ∩ v ↑i ↑{ val := r, property := (_ : r ∈ s ∧ r ∈ Ioi ↑i) }\n[PROOFSTEP]\nexact ⟨H, A⟩\n[GOAL]\nα : Type u_1\nm : MeasurableSpace α\nμ : Measure α\nβ : Type u_2\ninst✝⁶ : CompleteLinearOrder β\ninst✝⁵ : DenselyOrdered β\ninst✝⁴ : TopologicalSpace β\ninst✝³ : OrderTopology β\ninst✝² : SecondCountableTopology β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\ns : Set β\ns_count : Set.Countable s\ns_dense : Dense s\nf : α → β\nh :\n  ∀ (p : β),\n    p ∈ s →\n      ∀ (q : β),\n        q ∈ s →\n          p < q → ∃ u v, MeasurableSet u ∧ MeasurableSet v ∧ {x | f x < p} ⊆ u ∧ {x | q < f x} ⊆ v ∧ ↑↑μ (u ∩ v) = 0\nthis✝ : Encodable ↑s\nu v : β → β → Set α\nhuv :\n  ∀ (p q : β),\n    MeasurableSet (u p q) ∧\n      MeasurableSet (v p q) ∧\n        {x | f x < p} ⊆ u p q ∧ {x | q < f x} ⊆ v p q ∧ (p ∈ s → q ∈ s → p < q → ↑↑μ (u p q ∩ v p q) = 0)\nu' : β → Set α := fun p => ⋂ (q : β) (_ : q ∈ s ∩ Ioi p), u p q\nu'_meas : ∀ (i : β), MeasurableSet (u' i)\nf' : α → β := fun x => ⨅ (i : ↑s), piecewise (u' ↑i) (fun x => ↑i) (fun x => ⊤) x\nf'_meas : Measurable f'\nt : Set α := ⋃ (p : ↑s) (q : ↑(s ∩ Ioi ↑p)), u' ↑p ∩ v ↑p ↑q\nμt : ↑↑μ t ≤ 0\nthis : ∀ᵐ (x : α) ∂μ, ¬x ∈ t\nx : α\nhx : ¬x ∈ ⋃ (p : ↑s) (q : ↑(s ∩ Ioi ↑p)), (⋂ (q : β) (_ : q ∈ s ∩ Ioi ↑p), u (↑p) q) ∩ v ↑p ↑q\n⊢ ∀ (w : β), f x < w → ∃ i, piecewise (⋂ (q : β) (_ : q ∈ s ∩ Ioi ↑i), u (↑i) q) (fun x => ↑i) (fun x => ⊤) x < w\n[PROOFSTEP]\nintro q hq\n[GOAL]\nα : Type u_1\nm : MeasurableSpace α\nμ : Measure α\nβ : Type u_2\ninst✝⁶ : CompleteLinearOrder β\ninst✝⁵ : DenselyOrdered β\ninst✝⁴ : TopologicalSpace β\ninst✝³ : OrderTopology β\ninst✝² : SecondCountableTopology β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\ns : Set β\ns_count : Set.Countable s\ns_dense : Dense s\nf : α → β\nh :\n  ∀ (p : β),\n    p ∈ s →\n      ∀ (q : β),\n        q ∈ s →\n          p < q → ∃ u v, MeasurableSet u ∧ MeasurableSet v ∧ {x | f x < p} ⊆ u ∧ {x | q < f x} ⊆ v ∧ ↑↑μ (u ∩ v) = 0\nthis✝ : Encodable ↑s\nu v : β → β → Set α\nhuv :\n  ∀ (p q : β),\n    MeasurableSet (u p q) ∧\n      MeasurableSet (v p q) ∧\n        {x | f x < p} ⊆ u p q ∧ {x | q < f x} ⊆ v p q ∧ (p ∈ s → q ∈ s → p < q → ↑↑μ (u p q ∩ v p q) = 0)\nu' : β → Set α := fun p => ⋂ (q : β) (_ : q ∈ s ∩ Ioi p), u p q\nu'_meas : ∀ (i : β), MeasurableSet (u' i)\nf' : α → β := fun x => ⨅ (i : ↑s), piecewise (u' ↑i) (fun x => ↑i) (fun x => ⊤) x\nf'_meas : Measurable f'\nt : Set α := ⋃ (p : ↑s) (q : ↑(s ∩ Ioi ↑p)), u' ↑p ∩ v ↑p ↑q\nμt : ↑↑μ t ≤ 0\nthis : ∀ᵐ (x : α) ∂μ, ¬x ∈ t\nx : α\nhx : ¬x ∈ ⋃ (p : ↑s) (q : ↑(s ∩ Ioi ↑p)), (⋂ (q : β) (_ : q ∈ s ∩ Ioi ↑p), u (↑p) q) ∩ v ↑p ↑q\nq : β\nhq : f x < q\n⊢ ∃ i, piecewise (⋂ (q : β) (_ : q ∈ s ∩ Ioi ↑i), u (↑i) q) (fun x => ↑i) (fun x => ⊤) x < q\n[PROOFSTEP]\nobtain ⟨r, ⟨xr, rq⟩, rs⟩ : ∃ r, r ∈ Ioo (f x) q ∩ s :=\n  dense_iff_inter_open.1 s_dense (Ioo (f x) q) isOpen_Ioo (nonempty_Ioo.2 hq)\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nm : MeasurableSpace α\nμ : Measure α\nβ : Type u_2\ninst✝⁶ : CompleteLinearOrder β\ninst✝⁵ : DenselyOrdered β\ninst✝⁴ : TopologicalSpace β\ninst✝³ : OrderTopology β\ninst✝² : SecondCountableTopology β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\ns : Set β\ns_count : Set.Countable s\ns_dense : Dense s\nf : α → β\nh :\n  ∀ (p : β),\n    p ∈ s →\n      ∀ (q : β),\n        q ∈ s →\n          p < q → ∃ u v, MeasurableSet u ∧ MeasurableSet v ∧ {x | f x < p} ⊆ u ∧ {x | q < f x} ⊆ v ∧ ↑↑μ (u ∩ v) = 0\nthis✝ : Encodable ↑s\nu v : β → β → Set α\nhuv :\n  ∀ (p q : β),\n    MeasurableSet (u p q) ∧\n      MeasurableSet (v p q) ∧\n        {x | f x < p} ⊆ u p q ∧ {x | q < f x} ⊆ v p q ∧ (p ∈ s → q ∈ s → p < q → ↑↑μ (u p q ∩ v p q) = 0)\nu' : β → Set α := fun p => ⋂ (q : β) (_ : q ∈ s ∩ Ioi p), u p q\nu'_meas : ∀ (i : β), MeasurableSet (u' i)\nf' : α → β := fun x => ⨅ (i : ↑s), piecewise (u' ↑i) (fun x => ↑i) (fun x => ⊤) x\nf'_meas : Measurable f'\nt : Set α := ⋃ (p : ↑s) (q : ↑(s ∩ Ioi ↑p)), u' ↑p ∩ v ↑p ↑q\nμt : ↑↑μ t ≤ 0\nthis : ∀ᵐ (x : α) ∂μ, ¬x ∈ t\nx : α\nhx : ¬x ∈ ⋃ (p : ↑s) (q : ↑(s ∩ Ioi ↑p)), (⋂ (q : β) (_ : q ∈ s ∩ Ioi ↑p), u (↑p) q) ∩ v ↑p ↑q\nq : β\nhq : f x < q\nr : β\nrs : r ∈ s\nxr : f x < r\nrq : r < q\n⊢ ∃ i, piecewise (⋂ (q : β) (_ : q ∈ s ∩ Ioi ↑i), u (↑i) q) (fun x => ↑i) (fun x => ⊤) x < q\n[PROOFSTEP]\nrefine' ⟨⟨r, rs⟩, _⟩\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nm : MeasurableSpace α\nμ : Measure α\nβ : Type u_2\ninst✝⁶ : CompleteLinearOrder β\ninst✝⁵ : DenselyOrdered β\ninst✝⁴ : TopologicalSpace β\ninst✝³ : OrderTopology β\ninst✝² : SecondCountableTopology β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\ns : Set β\ns_count : Set.Countable s\ns_dense : Dense s\nf : α → β\nh :\n  ∀ (p : β),\n    p ∈ s →\n      ∀ (q : β),\n        q ∈ s →\n          p < q → ∃ u v, MeasurableSet u ∧ MeasurableSet v ∧ {x | f x < p} ⊆ u ∧ {x | q < f x} ⊆ v ∧ ↑↑μ (u ∩ v) = 0\nthis✝ : Encodable ↑s\nu v : β → β → Set α\nhuv :\n  ∀ (p q : β),\n    MeasurableSet (u p q) ∧\n      MeasurableSet (v p q) ∧\n        {x | f x < p} ⊆ u p q ∧ {x | q < f x} ⊆ v p q ∧ (p ∈ s → q ∈ s → p < q → ↑↑μ (u p q ∩ v p q) = 0)\nu' : β → Set α := fun p => ⋂ (q : β) (_ : q ∈ s ∩ Ioi p), u p q\nu'_meas : ∀ (i : β), MeasurableSet (u' i)\nf' : α → β := fun x => ⨅ (i : ↑s), piecewise (u' ↑i) (fun x => ↑i) (fun x => ⊤) x\nf'_meas : Measurable f'\nt : Set α := ⋃ (p : ↑s) (q : ↑(s ∩ Ioi ↑p)), u' ↑p ∩ v ↑p ↑q\nμt : ↑↑μ t ≤ 0\nthis : ∀ᵐ (x : α) ∂μ, ¬x ∈ t\nx : α\nhx : ¬x ∈ ⋃ (p : ↑s) (q : ↑(s ∩ Ioi ↑p)), (⋂ (q : β) (_ : q ∈ s ∩ Ioi ↑p), u (↑p) q) ∩ v ↑p ↑q\nq : β\nhq : f x < q\nr : β\nrs : r ∈ s\nxr : f x < r\nrq : r < q\n⊢ piecewise (⋂ (q : β) (_ : q ∈ s ∩ Ioi ↑{ val := r, property := rs }), u (↑{ val := r, property := rs }) q)\n      (fun x => ↑{ val := r, property := rs }) (fun x => ⊤) x <\n    q\n[PROOFSTEP]\nhave A : x ∈ u' r := mem_biInter fun i _ => (huv r i).2.2.1 xr\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nm : MeasurableSpace α\nμ : Measure α\nβ : Type u_2\ninst✝⁶ : CompleteLinearOrder β\ninst✝⁵ : DenselyOrdered β\ninst✝⁴ : TopologicalSpace β\ninst✝³ : OrderTopology β\ninst✝² : SecondCountableTopology β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\ns : Set β\ns_count : Set.Countable s\ns_dense : Dense s\nf : α → β\nh :\n  ∀ (p : β),\n    p ∈ s →\n      ∀ (q : β),\n        q ∈ s →\n          p < q → ∃ u v, MeasurableSet u ∧ MeasurableSet v ∧ {x | f x < p} ⊆ u ∧ {x | q < f x} ⊆ v ∧ ↑↑μ (u ∩ v) = 0\nthis✝ : Encodable ↑s\nu v : β → β → Set α\nhuv :\n  ∀ (p q : β),\n    MeasurableSet (u p q) ∧\n      MeasurableSet (v p q) ∧\n        {x | f x < p} ⊆ u p q ∧ {x | q < f x} ⊆ v p q ∧ (p ∈ s → q ∈ s → p < q → ↑↑μ (u p q ∩ v p q) = 0)\nu' : β → Set α := fun p => ⋂ (q : β) (_ : q ∈ s ∩ Ioi p), u p q\nu'_meas : ∀ (i : β), MeasurableSet (u' i)\nf' : α → β := fun x => ⨅ (i : ↑s), piecewise (u' ↑i) (fun x => ↑i) (fun x => ⊤) x\nf'_meas : Measurable f'\nt : Set α := ⋃ (p : ↑s) (q : ↑(s ∩ Ioi ↑p)), u' ↑p ∩ v ↑p ↑q\nμt : ↑↑μ t ≤ 0\nthis : ∀ᵐ (x : α) ∂μ, ¬x ∈ t\nx : α\nhx : ¬x ∈ ⋃ (p : ↑s) (q : ↑(s ∩ Ioi ↑p)), (⋂ (q : β) (_ : q ∈ s ∩ Ioi ↑p), u (↑p) q) ∩ v ↑p ↑q\nq : β\nhq : f x < q\nr : β\nrs : r ∈ s\nxr : f x < r\nrq : r < q\nA : x ∈ u' r\n⊢ piecewise (⋂ (q : β) (_ : q ∈ s ∩ Ioi ↑{ val := r, property := rs }), u (↑{ val := r, property := rs }) q)\n      (fun x => ↑{ val := r, property := rs }) (fun x => ⊤) x <\n    q\n[PROOFSTEP]\nsimp only [A, rq, piecewise_eq_of_mem, Subtype.coe_mk]\n[GOAL]\nα : Type u_1\nm : MeasurableSpace α\nμ : Measure α\nβ : Type u_2\ninst✝⁶ : CompleteLinearOrder β\ninst✝⁵ : DenselyOrdered β\ninst✝⁴ : TopologicalSpace β\ninst✝³ : OrderTopology β\ninst✝² : SecondCountableTopology β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\ns : Set β\ns_count : Set.Countable s\ns_dense : Dense s\nf : α → β\nh :\n  ∀ (p : β),\n    p ∈ s →\n      ∀ (q : β),\n        q ∈ s →\n          p < q → ∃ u v, MeasurableSet u ∧ MeasurableSet v ∧ {x | f x < p} ⊆ u ∧ {x | q < f x} ⊆ v ∧ ↑↑μ (u ∩ v) = 0\nthis : Encodable ↑s\nu v : β → β → Set α\nhuv :\n  ∀ (p q : β),\n    MeasurableSet (u p q) ∧\n      MeasurableSet (v p q) ∧\n        {x | f x < p} ⊆ u p q ∧ {x | q < f x} ⊆ v p q ∧ (p ∈ s → q ∈ s → p < q → ↑↑μ (u p q ∩ v p q) = 0)\nu' : β → Set α := fun p => ⋂ (q : β) (_ : q ∈ s ∩ Ioi p), u p q\nu'_meas : ∀ (i : β), MeasurableSet (u' i)\nf' : α → β := fun x => ⨅ (i : ↑s), piecewise (u' ↑i) (fun x => ↑i) (fun x => ⊤) x\nf'_meas : Measurable f'\nt : Set α := ⋃ (p : ↑s) (q : ↑(s ∩ Ioi ↑p)), u' ↑p ∩ v ↑p ↑q\nμt : ↑↑μ t ≤ 0\nff' : ∀ᵐ (x : α) ∂μ, f x = f' x\n⊢ AEMeasurable f\n[PROOFSTEP]\nexact ⟨f', f'_meas, ff'⟩\n[GOAL]\nα : Type u_1\nm : MeasurableSpace α\nμ : Measure α\nf : α → ℝ≥0∞\nh :\n  ∀ (p q : ℝ≥0),\n    p < q → ∃ u v, MeasurableSet u ∧ MeasurableSet v ∧ {x | f x < ↑p} ⊆ u ∧ {x | ↑q < f x} ⊆ v ∧ ↑↑μ (u ∩ v) = 0\n⊢ AEMeasurable f\n[PROOFSTEP]\nobtain ⟨s, s_count, s_dense, _, s_top⟩ : ∃ s : Set ℝ≥0∞, s.Countable ∧ Dense s ∧ 0 ∉ s ∧ ∞ ∉ s :=\n  ENNReal.exists_countable_dense_no_zero_top\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\nm : MeasurableSpace α\nμ : Measure α\nf : α → ℝ≥0∞\nh :\n  ∀ (p q : ℝ≥0),\n    p < q → ∃ u v, MeasurableSet u ∧ MeasurableSet v ∧ {x | f x < ↑p} ⊆ u ∧ {x | ↑q < f x} ⊆ v ∧ ↑↑μ (u ∩ v) = 0\ns : Set ℝ≥0∞\ns_count : Set.Countable s\ns_dense : Dense s\nleft✝ : ¬0 ∈ s\ns_top : ¬⊤ ∈ s\n⊢ AEMeasurable f\n[PROOFSTEP]\nhave I : ∀ x ∈ s, x ≠ ∞ := fun x xs hx => s_top (hx ▸ xs)\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\nm : MeasurableSpace α\nμ : Measure α\nf : α → ℝ≥0∞\nh :\n  ∀ (p q : ℝ≥0),\n    p < q → ∃ u v, MeasurableSet u ∧ MeasurableSet v ∧ {x | f x < ↑p} ⊆ u ∧ {x | ↑q < f x} ⊆ v ∧ ↑↑μ (u ∩ v) = 0\ns : Set ℝ≥0∞\ns_count : Set.Countable s\ns_dense : Dense s\nleft✝ : ¬0 ∈ s\ns_top : ¬⊤ ∈ s\nI : ∀ (x : ℝ≥0∞), x ∈ s → x ≠ ⊤\n⊢ AEMeasurable f\n[PROOFSTEP]\napply MeasureTheory.aemeasurable_of_exist_almost_disjoint_supersets μ s s_count s_dense _\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\nm : MeasurableSpace α\nμ : Measure α\nf : α → ℝ≥0∞\nh :\n  ∀ (p q : ℝ≥0),\n    p < q → ∃ u v, MeasurableSet u ∧ MeasurableSet v ∧ {x | f x < ↑p} ⊆ u ∧ {x | ↑q < f x} ⊆ v ∧ ↑↑μ (u ∩ v) = 0\ns : Set ℝ≥0∞\ns_count : Set.Countable s\ns_dense : Dense s\nleft✝ : ¬0 ∈ s\ns_top : ¬⊤ ∈ s\nI : ∀ (x : ℝ≥0∞), x ∈ s → x ≠ ⊤\n⊢ ∀ (p : ℝ≥0∞),\n    p ∈ s →\n      ∀ (q : ℝ≥0∞),\n        q ∈ s →\n          p < q → ∃ u v, MeasurableSet u ∧ MeasurableSet v ∧ {x | f x < p} ⊆ u ∧ {x | q < f x} ⊆ v ∧ ↑↑μ (u ∩ v) = 0\n[PROOFSTEP]\nrintro p hp q hq hpq\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\nm : MeasurableSpace α\nμ : Measure α\nf : α → ℝ≥0∞\nh :\n  ∀ (p q : ℝ≥0),\n    p < q → ∃ u v, MeasurableSet u ∧ MeasurableSet v ∧ {x | f x < ↑p} ⊆ u ∧ {x | ↑q < f x} ⊆ v ∧ ↑↑μ (u ∩ v) = 0\ns : Set ℝ≥0∞\ns_count : Set.Countable s\ns_dense : Dense s\nleft✝ : ¬0 ∈ s\ns_top : ¬⊤ ∈ s\nI : ∀ (x : ℝ≥0∞), x ∈ s → x ≠ ⊤\np : ℝ≥0∞\nhp : p ∈ s\nq : ℝ≥0∞\nhq : q ∈ s\nhpq : p < q\n⊢ ∃ u v, MeasurableSet u ∧ MeasurableSet v ∧ {x | f x < p} ⊆ u ∧ {x | q < f x} ⊆ v ∧ ↑↑μ (u ∩ v) = 0\n[PROOFSTEP]\nlift p to ℝ≥0 using I p hp\n[GOAL]\ncase intro.intro.intro.intro.intro\nα : Type u_1\nm : MeasurableSpace α\nμ : Measure α\nf : α → ℝ≥0∞\nh :\n  ∀ (p q : ℝ≥0),\n    p < q → ∃ u v, MeasurableSet u ∧ MeasurableSet v ∧ {x | f x < ↑p} ⊆ u ∧ {x | ↑q < f x} ⊆ v ∧ ↑↑μ (u ∩ v) = 0\ns : Set ℝ≥0∞\ns_count : Set.Countable s\ns_dense : Dense s\nleft✝ : ¬0 ∈ s\ns_top : ¬⊤ ∈ s\nI : ∀ (x : ℝ≥0∞), x ∈ s → x ≠ ⊤\nq : ℝ≥0∞\nhq : q ∈ s\np : ℝ≥0\nhp : ↑p ∈ s\nhpq : ↑p < q\n⊢ ∃ u v, MeasurableSet u ∧ MeasurableSet v ∧ {x | f x < ↑p} ⊆ u ∧ {x | q < f x} ⊆ v ∧ ↑↑μ (u ∩ v) = 0\n[PROOFSTEP]\nlift q to ℝ≥0 using I q hq\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nα : Type u_1\nm : MeasurableSpace α\nμ : Measure α\nf : α → ℝ≥0∞\nh :\n  ∀ (p q : ℝ≥0),\n    p < q → ∃ u v, MeasurableSet u ∧ MeasurableSet v ∧ {x | f x < ↑p} ⊆ u ∧ {x | ↑q < f x} ⊆ v ∧ ↑↑μ (u ∩ v) = 0\ns : Set ℝ≥0∞\ns_count : Set.Countable s\ns_dense : Dense s\nleft✝ : ¬0 ∈ s\ns_top : ¬⊤ ∈ s\nI : ∀ (x : ℝ≥0∞), x ∈ s → x ≠ ⊤\np : ℝ≥0\nhp : ↑p ∈ s\nq : ℝ≥0\nhq : ↑q ∈ s\nhpq : ↑p < ↑q\n⊢ ∃ u v, MeasurableSet u ∧ MeasurableSet v ∧ {x | f x < ↑p} ⊆ u ∧ {x | ↑q < f x} ⊆ v ∧ ↑↑μ (u ∩ v) = 0\n[PROOFSTEP]\nexact h p q (ENNReal.coe_lt_coe.1 hpq)\n", "meta": {"mathlib_filename": "Mathlib.MeasureTheory.Function.AEMeasurableOrder", "llama_tokens": 39542, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7853085808877581, "lm_q2_score": 0.6959583250334526, "lm_q1q2_score": 0.5465420445890418}}
{"text": "[GOAL]\nR✝ : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM✝ : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂✝ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\nα : Type u_20\nR : Type u_21\nM : Type u_22\nM₂ : Type u_23\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid M₂\ninst✝ : Module R M₂\nv : α →₀ M\nc : R\nh : α → M →ₗ[R] M₂\n⊢ (sum (c • v) fun a => ↑(h a)) = c • sum v fun a => ↑(h a)\n[PROOFSTEP]\nrw [Finsupp.sum_smul_index', Finsupp.smul_sum]\n[GOAL]\nR✝ : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM✝ : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂✝ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\nα : Type u_20\nR : Type u_21\nM : Type u_22\nM₂ : Type u_23\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid M₂\ninst✝ : Module R M₂\nv : α →₀ M\nc : R\nh : α → M →ₗ[R] M₂\n⊢ (sum v fun i c_1 => ↑(h i) (c • c_1)) = sum v fun a b => c • ↑(h a) b\n[PROOFSTEP]\nsimp only [map_smul]\n[GOAL]\nR✝ : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM✝ : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂✝ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\nα : Type u_20\nR : Type u_21\nM : Type u_22\nM₂ : Type u_23\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid M₂\ninst✝ : Module R M₂\nv : α →₀ M\nc : R\nh : α → M →ₗ[R] M₂\n⊢ ∀ (i : α), ↑(h i) 0 = 0\n[PROOFSTEP]\nintro i\n[GOAL]\nR✝ : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM✝ : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂✝ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\nα : Type u_20\nR : Type u_21\nM : Type u_22\nM₂ : Type u_23\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : AddCommMonoid M₂\ninst✝ : Module R M₂\nv : α →₀ M\nc : R\nh : α → M →ₗ[R] M₂\ni : α\n⊢ ↑(h i) 0 = 0\n[PROOFSTEP]\nexact (h i).map_zero\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\nα✝ : Type u_20\ninst✝⁴ : Finite α✝\ninst✝³ : AddCommMonoid M\ninst✝² : Semiring R\ninst✝¹ : Module R M\nα : Type u_21\ninst✝ : Unique α\nm : M\n⊢ ↑(LinearEquiv.symm (finsuppUnique R M α)) m = single default m\n[PROOFSTEP]\next\n[GOAL]\ncase h\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\nα✝ : Type u_20\ninst✝⁴ : Finite α✝\ninst✝³ : AddCommMonoid M\ninst✝² : Semiring R\ninst✝¹ : Module R M\nα : Type u_21\ninst✝ : Unique α\nm : M\n⊢ ↑(↑(LinearEquiv.symm (finsuppUnique R M α)) m) default = ↑(single default m) default\n[PROOFSTEP]\nsimp [LinearEquiv.finsuppUnique, Equiv.funUnique, single, Pi.single, equivFunOnFinite, Function.update]\n[GOAL]\nR✝ : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι✝ : Type u_17\nV : Type u_18\nV₂ : Type u_19\nι : Type u_20\ninst✝² : Fintype ι\ninst✝¹ : DecidableEq ι\nR : Type u_21\ninst✝ : Semiring R\nx : ι → R\n⊢ x = ∑ i : ι, x i • fun j => if i = j then 1 else 0\n[PROOFSTEP]\next\n[GOAL]\ncase h\nR✝ : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι✝ : Type u_17\nV : Type u_18\nV₂ : Type u_19\nι : Type u_20\ninst✝² : Fintype ι\ninst✝¹ : DecidableEq ι\nR : Type u_21\ninst✝ : Semiring R\nx : ι → R\nx✝ : ι\n⊢ x x✝ = Finset.sum Finset.univ (fun i => x i • fun j => if i = j then 1 else 0) x✝\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : Semiring R₂\ninst✝¹⁵ : Semiring R₃\ninst✝¹⁴ : Semiring R₄\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid M₁\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : AddCommMonoid M₃\ninst✝⁹ : AddCommMonoid M₄\ninst✝⁸ : Module R M\ninst✝⁷ : Module R M₁\ninst✝⁶ : Module R₂ M₂\ninst✝⁵ : Module R₃ M₃\ninst✝⁴ : Module R₄ M₄\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₃₄ : R₃ →+* R₄\nσ₁₃ : R →+* R₃\nσ₂₄ : R₂ →+* R₄\nσ₁₄ : R →+* R₄\ninst✝³ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝² : RingHomCompTriple σ₂₃ σ₃₄ σ₂₄\ninst✝¹ : RingHomCompTriple σ₁₃ σ₃₄ σ₁₄\ninst✝ : RingHomCompTriple σ₁₂ σ₂₄ σ₁₄\nf✝ : M →ₛₗ[σ₁₂] M₂\ng : M₂ →ₛₗ[σ₂₃] M₃\np : Submodule R₂ M₂\nf : M →ₛₗ[σ₁₂] M₂\nh : ∀ (c : M), ↑f c ∈ p\n⊢ M →ₛₗ[σ₁₂] { x // x ∈ p }\n[PROOFSTEP]\nrefine' { toFun := fun c => ⟨f c, h c⟩ .. }\n[GOAL]\ncase refine'_1\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : Semiring R₂\ninst✝¹⁵ : Semiring R₃\ninst✝¹⁴ : Semiring R₄\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid M₁\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : AddCommMonoid M₃\ninst✝⁹ : AddCommMonoid M₄\ninst✝⁸ : Module R M\ninst✝⁷ : Module R M₁\ninst✝⁶ : Module R₂ M₂\ninst✝⁵ : Module R₃ M₃\ninst✝⁴ : Module R₄ M₄\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₃₄ : R₃ →+* R₄\nσ₁₃ : R →+* R₃\nσ₂₄ : R₂ →+* R₄\nσ₁₄ : R →+* R₄\ninst✝³ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝² : RingHomCompTriple σ₂₃ σ₃₄ σ₂₄\ninst✝¹ : RingHomCompTriple σ₁₃ σ₃₄ σ₁₄\ninst✝ : RingHomCompTriple σ₁₂ σ₂₄ σ₁₄\nf✝ : M →ₛₗ[σ₁₂] M₂\ng : M₂ →ₛₗ[σ₂₃] M₃\np : Submodule R₂ M₂\nf : M →ₛₗ[σ₁₂] M₂\nh : ∀ (c : M), ↑f c ∈ p\n⊢ ∀ (x y : M),\n    (fun c => { val := ↑f c, property := (_ : ↑f c ∈ p) }) (x + y) =\n      (fun c => { val := ↑f c, property := (_ : ↑f c ∈ p) }) x +\n        (fun c => { val := ↑f c, property := (_ : ↑f c ∈ p) }) y\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_2\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : Semiring R₂\ninst✝¹⁵ : Semiring R₃\ninst✝¹⁴ : Semiring R₄\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid M₁\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : AddCommMonoid M₃\ninst✝⁹ : AddCommMonoid M₄\ninst✝⁸ : Module R M\ninst✝⁷ : Module R M₁\ninst✝⁶ : Module R₂ M₂\ninst✝⁵ : Module R₃ M₃\ninst✝⁴ : Module R₄ M₄\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₃₄ : R₃ →+* R₄\nσ₁₃ : R →+* R₃\nσ₂₄ : R₂ →+* R₄\nσ₁₄ : R →+* R₄\ninst✝³ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝² : RingHomCompTriple σ₂₃ σ₃₄ σ₂₄\ninst✝¹ : RingHomCompTriple σ₁₃ σ₃₄ σ₁₄\ninst✝ : RingHomCompTriple σ₁₂ σ₂₄ σ₁₄\nf✝ : M →ₛₗ[σ₁₂] M₂\ng : M₂ →ₛₗ[σ₂₃] M₃\np : Submodule R₂ M₂\nf : M →ₛₗ[σ₁₂] M₂\nh : ∀ (c : M), ↑f c ∈ p\n⊢ ∀ (r : R) (x : M),\n    AddHom.toFun\n        { toFun := fun c => { val := ↑f c, property := (_ : ↑f c ∈ p) },\n          map_add' :=\n            (_ :\n              ∀ (x y : M),\n                (fun c => { val := ↑f c, property := (_ : ↑f c ∈ p) }) (x + y) =\n                  (fun c => { val := ↑f c, property := (_ : ↑f c ∈ p) }) x +\n                    (fun c => { val := ↑f c, property := (_ : ↑f c ∈ p) }) y) }\n        (r • x) =\n      ↑σ₁₂ r •\n        AddHom.toFun\n          { toFun := fun c => { val := ↑f c, property := (_ : ↑f c ∈ p) },\n            map_add' :=\n              (_ :\n                ∀ (x y : M),\n                  (fun c => { val := ↑f c, property := (_ : ↑f c ∈ p) }) (x + y) =\n                    (fun c => { val := ↑f c, property := (_ : ↑f c ∈ p) }) x +\n                      (fun c => { val := ↑f c, property := (_ : ↑f c ∈ p) }) y) }\n          x\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_1\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : Semiring R₂\ninst✝¹⁵ : Semiring R₃\ninst✝¹⁴ : Semiring R₄\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid M₁\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : AddCommMonoid M₃\ninst✝⁹ : AddCommMonoid M₄\ninst✝⁸ : Module R M\ninst✝⁷ : Module R M₁\ninst✝⁶ : Module R₂ M₂\ninst✝⁵ : Module R₃ M₃\ninst✝⁴ : Module R₄ M₄\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₃₄ : R₃ →+* R₄\nσ₁₃ : R →+* R₃\nσ₂₄ : R₂ →+* R₄\nσ₁₄ : R →+* R₄\ninst✝³ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝² : RingHomCompTriple σ₂₃ σ₃₄ σ₂₄\ninst✝¹ : RingHomCompTriple σ₁₃ σ₃₄ σ₁₄\ninst✝ : RingHomCompTriple σ₁₂ σ₂₄ σ₁₄\nf✝ : M →ₛₗ[σ₁₂] M₂\ng : M₂ →ₛₗ[σ₂₃] M₃\np : Submodule R₂ M₂\nf : M →ₛₗ[σ₁₂] M₂\nh : ∀ (c : M), ↑f c ∈ p\nx✝ y✝ : M\n⊢ (fun c => { val := ↑f c, property := (_ : ↑f c ∈ p) }) (x✝ + y✝) =\n    (fun c => { val := ↑f c, property := (_ : ↑f c ∈ p) }) x✝ +\n      (fun c => { val := ↑f c, property := (_ : ↑f c ∈ p) }) y✝\n[PROOFSTEP]\napply SetCoe.ext\n[GOAL]\ncase refine'_2\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : Semiring R₂\ninst✝¹⁵ : Semiring R₃\ninst✝¹⁴ : Semiring R₄\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid M₁\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : AddCommMonoid M₃\ninst✝⁹ : AddCommMonoid M₄\ninst✝⁸ : Module R M\ninst✝⁷ : Module R M₁\ninst✝⁶ : Module R₂ M₂\ninst✝⁵ : Module R₃ M₃\ninst✝⁴ : Module R₄ M₄\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₃₄ : R₃ →+* R₄\nσ₁₃ : R →+* R₃\nσ₂₄ : R₂ →+* R₄\nσ₁₄ : R →+* R₄\ninst✝³ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝² : RingHomCompTriple σ₂₃ σ₃₄ σ₂₄\ninst✝¹ : RingHomCompTriple σ₁₃ σ₃₄ σ₁₄\ninst✝ : RingHomCompTriple σ₁₂ σ₂₄ σ₁₄\nf✝ : M →ₛₗ[σ₁₂] M₂\ng : M₂ →ₛₗ[σ₂₃] M₃\np : Submodule R₂ M₂\nf : M →ₛₗ[σ₁₂] M₂\nh : ∀ (c : M), ↑f c ∈ p\nr✝ : R\nx✝ : M\n⊢ AddHom.toFun\n      { toFun := fun c => { val := ↑f c, property := (_ : ↑f c ∈ p) },\n        map_add' :=\n          (_ :\n            ∀ (x y : M),\n              (fun c => { val := ↑f c, property := (_ : ↑f c ∈ p) }) (x + y) =\n                (fun c => { val := ↑f c, property := (_ : ↑f c ∈ p) }) x +\n                  (fun c => { val := ↑f c, property := (_ : ↑f c ∈ p) }) y) }\n      (r✝ • x✝) =\n    ↑σ₁₂ r✝ •\n      AddHom.toFun\n        { toFun := fun c => { val := ↑f c, property := (_ : ↑f c ∈ p) },\n          map_add' :=\n            (_ :\n              ∀ (x y : M),\n                (fun c => { val := ↑f c, property := (_ : ↑f c ∈ p) }) (x + y) =\n                  (fun c => { val := ↑f c, property := (_ : ↑f c ∈ p) }) x +\n                    (fun c => { val := ↑f c, property := (_ : ↑f c ∈ p) }) y) }\n        x✝\n[PROOFSTEP]\napply SetCoe.ext\n[GOAL]\ncase refine'_1.a\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : Semiring R₂\ninst✝¹⁵ : Semiring R₃\ninst✝¹⁴ : Semiring R₄\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid M₁\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : AddCommMonoid M₃\ninst✝⁹ : AddCommMonoid M₄\ninst✝⁸ : Module R M\ninst✝⁷ : Module R M₁\ninst✝⁶ : Module R₂ M₂\ninst✝⁵ : Module R₃ M₃\ninst✝⁴ : Module R₄ M₄\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₃₄ : R₃ →+* R₄\nσ₁₃ : R →+* R₃\nσ₂₄ : R₂ →+* R₄\nσ₁₄ : R →+* R₄\ninst✝³ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝² : RingHomCompTriple σ₂₃ σ₃₄ σ₂₄\ninst✝¹ : RingHomCompTriple σ₁₃ σ₃₄ σ₁₄\ninst✝ : RingHomCompTriple σ₁₂ σ₂₄ σ₁₄\nf✝ : M →ₛₗ[σ₁₂] M₂\ng : M₂ →ₛₗ[σ₂₃] M₃\np : Submodule R₂ M₂\nf : M →ₛₗ[σ₁₂] M₂\nh : ∀ (c : M), ↑f c ∈ p\nx✝ y✝ : M\n⊢ ↑((fun c => { val := ↑f c, property := (_ : ↑f c ∈ p) }) (x✝ + y✝)) =\n    ↑((fun c => { val := ↑f c, property := (_ : ↑f c ∈ p) }) x✝ +\n        (fun c => { val := ↑f c, property := (_ : ↑f c ∈ p) }) y✝)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase refine'_2.a\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : Semiring R₂\ninst✝¹⁵ : Semiring R₃\ninst✝¹⁴ : Semiring R₄\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid M₁\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : AddCommMonoid M₃\ninst✝⁹ : AddCommMonoid M₄\ninst✝⁸ : Module R M\ninst✝⁷ : Module R M₁\ninst✝⁶ : Module R₂ M₂\ninst✝⁵ : Module R₃ M₃\ninst✝⁴ : Module R₄ M₄\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₃₄ : R₃ →+* R₄\nσ₁₃ : R →+* R₃\nσ₂₄ : R₂ →+* R₄\nσ₁₄ : R →+* R₄\ninst✝³ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝² : RingHomCompTriple σ₂₃ σ₃₄ σ₂₄\ninst✝¹ : RingHomCompTriple σ₁₃ σ₃₄ σ₁₄\ninst✝ : RingHomCompTriple σ₁₂ σ₂₄ σ₁₄\nf✝ : M →ₛₗ[σ₁₂] M₂\ng : M₂ →ₛₗ[σ₂₃] M₃\np : Submodule R₂ M₂\nf : M →ₛₗ[σ₁₂] M₂\nh : ∀ (c : M), ↑f c ∈ p\nr✝ : R\nx✝ : M\n⊢ ↑(AddHom.toFun\n        { toFun := fun c => { val := ↑f c, property := (_ : ↑f c ∈ p) },\n          map_add' :=\n            (_ :\n              ∀ (x y : M),\n                (fun c => { val := ↑f c, property := (_ : ↑f c ∈ p) }) (x + y) =\n                  (fun c => { val := ↑f c, property := (_ : ↑f c ∈ p) }) x +\n                    (fun c => { val := ↑f c, property := (_ : ↑f c ∈ p) }) y) }\n        (r✝ • x✝)) =\n    ↑(↑σ₁₂ r✝ •\n        AddHom.toFun\n          { toFun := fun c => { val := ↑f c, property := (_ : ↑f c ∈ p) },\n            map_add' :=\n              (_ :\n                ∀ (x y : M),\n                  (fun c => { val := ↑f c, property := (_ : ↑f c ∈ p) }) (x + y) =\n                    (fun c => { val := ↑f c, property := (_ : ↑f c ∈ p) }) x +\n                      (fun c => { val := ↑f c, property := (_ : ↑f c ∈ p) }) y) }\n          x✝)\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁸ : Semiring R\ninst✝¹⁷ : Semiring R₂\ninst✝¹⁶ : Semiring R₃\ninst✝¹⁵ : Semiring R₄\ninst✝¹⁴ : AddCommMonoid M\ninst✝¹³ : AddCommMonoid M₁\ninst✝¹² : AddCommMonoid M₂\ninst✝¹¹ : AddCommMonoid M₃\ninst✝¹⁰ : AddCommMonoid M₄\ninst✝⁹ : Module R M\ninst✝⁸ : Module R M₁\ninst✝⁷ : Module R₂ M₂\ninst✝⁶ : Module R₃ M₃\ninst✝⁵ : Module R₄ M₄\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₃₄ : R₃ →+* R₄\nσ₁₃ : R →+* R₃\nσ₂₄ : R₂ →+* R₄\nσ₁₄ : R →+* R₄\ninst✝⁴ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝³ : RingHomCompTriple σ₂₃ σ₃₄ σ₂₄\ninst✝² : RingHomCompTriple σ₁₃ σ₃₄ σ₁₄\ninst✝¹ : RingHomCompTriple σ₁₂ σ₂₄ σ₁₄\nf✝ : M →ₛₗ[σ₁₂] M₂\ng : M₂ →ₛₗ[σ₂₃] M₃\ninst✝ : Subsingleton M\nsrc✝ : Inhabited (M →ₛₗ[σ₁₂] M₂) := inferInstanceAs (Inhabited (M →ₛₗ[σ₁₂] M₂))\nf : M →ₛₗ[σ₁₂] M₂\nx : M\n⊢ ↑f x = ↑default x\n[PROOFSTEP]\nrw [Subsingleton.elim x 0, map_zero, map_zero]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : Semiring R₂\ninst✝¹⁵ : Semiring R₃\ninst✝¹⁴ : Semiring R₄\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid M₁\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : AddCommMonoid M₃\ninst✝⁹ : AddCommMonoid M₄\ninst✝⁸ : Module R M\ninst✝⁷ : Module R M₁\ninst✝⁶ : Module R₂ M₂\ninst✝⁵ : Module R₃ M₃\ninst✝⁴ : Module R₄ M₄\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₃₄ : R₃ →+* R₄\nσ₁₃ : R →+* R₃\nσ₂₄ : R₂ →+* R₄\nσ₁₄ : R →+* R₄\ninst✝³ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝² : RingHomCompTriple σ₂₃ σ₃₄ σ₂₄\ninst✝¹ : RingHomCompTriple σ₁₃ σ₃₄ σ₁₄\ninst✝ : RingHomCompTriple σ₁₂ σ₂₄ σ₁₄\nf : M →ₛₗ[σ₁₂] M₂\ng : M₂ →ₛₗ[σ₂₃] M₃\n⊢ toAddMonoidHom 0 = 0\n[PROOFSTEP]\next\n[GOAL]\ncase h\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : Semiring R₂\ninst✝¹⁵ : Semiring R₃\ninst✝¹⁴ : Semiring R₄\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid M₁\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : AddCommMonoid M₃\ninst✝⁹ : AddCommMonoid M₄\ninst✝⁸ : Module R M\ninst✝⁷ : Module R M₁\ninst✝⁶ : Module R₂ M₂\ninst✝⁵ : Module R₃ M₃\ninst✝⁴ : Module R₄ M₄\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₃₄ : R₃ →+* R₄\nσ₁₃ : R →+* R₃\nσ₂₄ : R₂ →+* R₄\nσ₁₄ : R →+* R₄\ninst✝³ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝² : RingHomCompTriple σ₂₃ σ₃₄ σ₂₄\ninst✝¹ : RingHomCompTriple σ₁₃ σ₃₄ σ₁₄\ninst✝ : RingHomCompTriple σ₁₂ σ₂₄ σ₁₄\nf : M →ₛₗ[σ₁₂] M₂\ng : M₂ →ₛₗ[σ₂₃] M₃\nx✝ : M\n⊢ ↑(toAddMonoidHom 0) x✝ = ↑0 x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : Semiring R₂\ninst✝¹⁵ : Semiring R₃\ninst✝¹⁴ : Semiring R₄\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid M₁\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : AddCommMonoid M₃\ninst✝⁹ : AddCommMonoid M₄\ninst✝⁸ : Module R M\ninst✝⁷ : Module R M₁\ninst✝⁶ : Module R₂ M₂\ninst✝⁵ : Module R₃ M₃\ninst✝⁴ : Module R₄ M₄\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₃₄ : R₃ →+* R₄\nσ₁₃ : R →+* R₃\nσ₂₄ : R₂ →+* R₄\nσ₁₄ : R →+* R₄\ninst✝³ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝² : RingHomCompTriple σ₂₃ σ₃₄ σ₂₄\ninst✝¹ : RingHomCompTriple σ₁₃ σ₃₄ σ₁₄\ninst✝ : RingHomCompTriple σ₁₂ σ₂₄ σ₁₄\nf : M →ₛₗ[σ₁₂] M₂\ng : M₂ →ₛₗ[σ₂₃] M₃\n⊢ ∀ (x y : M →ₛₗ[σ₁₂] M₂),\n    ZeroHom.toFun { toFun := toAddMonoidHom, map_zero' := (_ : toAddMonoidHom 0 = 0) } (x + y) =\n      ZeroHom.toFun { toFun := toAddMonoidHom, map_zero' := (_ : toAddMonoidHom 0 = 0) } x +\n        ZeroHom.toFun { toFun := toAddMonoidHom, map_zero' := (_ : toAddMonoidHom 0 = 0) } y\n[PROOFSTEP]\nintros\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : Semiring R₂\ninst✝¹⁵ : Semiring R₃\ninst✝¹⁴ : Semiring R₄\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid M₁\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : AddCommMonoid M₃\ninst✝⁹ : AddCommMonoid M₄\ninst✝⁸ : Module R M\ninst✝⁷ : Module R M₁\ninst✝⁶ : Module R₂ M₂\ninst✝⁵ : Module R₃ M₃\ninst✝⁴ : Module R₄ M₄\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₃₄ : R₃ →+* R₄\nσ₁₃ : R →+* R₃\nσ₂₄ : R₂ →+* R₄\nσ₁₄ : R →+* R₄\ninst✝³ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝² : RingHomCompTriple σ₂₃ σ₃₄ σ₂₄\ninst✝¹ : RingHomCompTriple σ₁₃ σ₃₄ σ₁₄\ninst✝ : RingHomCompTriple σ₁₂ σ₂₄ σ₁₄\nf : M →ₛₗ[σ₁₂] M₂\ng : M₂ →ₛₗ[σ₂₃] M₃\nx✝ y✝ : M →ₛₗ[σ₁₂] M₂\n⊢ ZeroHom.toFun { toFun := toAddMonoidHom, map_zero' := (_ : toAddMonoidHom 0 = 0) } (x✝ + y✝) =\n    ZeroHom.toFun { toFun := toAddMonoidHom, map_zero' := (_ : toAddMonoidHom 0 = 0) } x✝ +\n      ZeroHom.toFun { toFun := toAddMonoidHom, map_zero' := (_ : toAddMonoidHom 0 = 0) } y✝\n[PROOFSTEP]\next\n[GOAL]\ncase h\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : Semiring R₂\ninst✝¹⁵ : Semiring R₃\ninst✝¹⁴ : Semiring R₄\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid M₁\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : AddCommMonoid M₃\ninst✝⁹ : AddCommMonoid M₄\ninst✝⁸ : Module R M\ninst✝⁷ : Module R M₁\ninst✝⁶ : Module R₂ M₂\ninst✝⁵ : Module R₃ M₃\ninst✝⁴ : Module R₄ M₄\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₃₄ : R₃ →+* R₄\nσ₁₃ : R →+* R₃\nσ₂₄ : R₂ →+* R₄\nσ₁₄ : R →+* R₄\ninst✝³ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝² : RingHomCompTriple σ₂₃ σ₃₄ σ₂₄\ninst✝¹ : RingHomCompTriple σ₁₃ σ₃₄ σ₁₄\ninst✝ : RingHomCompTriple σ₁₂ σ₂₄ σ₁₄\nf : M →ₛₗ[σ₁₂] M₂\ng : M₂ →ₛₗ[σ₂₃] M₃\nx✝¹ y✝ : M →ₛₗ[σ₁₂] M₂\nx✝ : M\n⊢ ↑(ZeroHom.toFun { toFun := toAddMonoidHom, map_zero' := (_ : toAddMonoidHom 0 = 0) } (x✝¹ + y✝)) x✝ =\n    ↑(ZeroHom.toFun { toFun := toAddMonoidHom, map_zero' := (_ : toAddMonoidHom 0 = 0) } x✝¹ +\n          ZeroHom.toFun { toFun := toAddMonoidHom, map_zero' := (_ : toAddMonoidHom 0 = 0) } y✝)\n      x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝²¹ : Semiring R\ninst✝²⁰ : Semiring R₂\ninst✝¹⁹ : Semiring R₃\ninst✝¹⁸ : Semiring R₄\ninst✝¹⁷ : AddCommMonoid M\ninst✝¹⁶ : AddCommMonoid M₁\ninst✝¹⁵ : AddCommMonoid M₂\ninst✝¹⁴ : AddCommMonoid M₃\ninst✝¹³ : AddCommMonoid M₄\ninst✝¹² : Module R M\ninst✝¹¹ : Module R M₁\ninst✝¹⁰ : Module R₂ M₂\ninst✝⁹ : Module R₃ M₃\ninst✝⁸ : Module R₄ M₄\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₃₄ : R₃ →+* R₄\nσ₁₃ : R →+* R₃\nσ₂₄ : R₂ →+* R₄\nσ₁₄ : R →+* R₄\ninst✝⁷ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝⁶ : RingHomCompTriple σ₂₃ σ₃₄ σ₂₄\ninst✝⁵ : RingHomCompTriple σ₁₃ σ₃₄ σ₁₄\ninst✝⁴ : RingHomCompTriple σ₁₂ σ₂₄ σ₁₄\nf✝ : M →ₛₗ[σ₁₂] M₂\ng : M₂ →ₛₗ[σ₂₃] M₃\ninst✝³ : Semiring S\ninst✝² : Module R S\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nf : M₁ →ₗ[R] S\nx✝ : M\nx y : M₁\n⊢ (fun b => ↑f b • x✝) (x + y) = (fun b => ↑f b • x✝) x + (fun b => ↑f b • x✝) y\n[PROOFSTEP]\ndsimp only\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝²¹ : Semiring R\ninst✝²⁰ : Semiring R₂\ninst✝¹⁹ : Semiring R₃\ninst✝¹⁸ : Semiring R₄\ninst✝¹⁷ : AddCommMonoid M\ninst✝¹⁶ : AddCommMonoid M₁\ninst✝¹⁵ : AddCommMonoid M₂\ninst✝¹⁴ : AddCommMonoid M₃\ninst✝¹³ : AddCommMonoid M₄\ninst✝¹² : Module R M\ninst✝¹¹ : Module R M₁\ninst✝¹⁰ : Module R₂ M₂\ninst✝⁹ : Module R₃ M₃\ninst✝⁸ : Module R₄ M₄\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₃₄ : R₃ →+* R₄\nσ₁₃ : R →+* R₃\nσ₂₄ : R₂ →+* R₄\nσ₁₄ : R →+* R₄\ninst✝⁷ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝⁶ : RingHomCompTriple σ₂₃ σ₃₄ σ₂₄\ninst✝⁵ : RingHomCompTriple σ₁₃ σ₃₄ σ₁₄\ninst✝⁴ : RingHomCompTriple σ₁₂ σ₂₄ σ₁₄\nf✝ : M →ₛₗ[σ₁₂] M₂\ng : M₂ →ₛₗ[σ₂₃] M₃\ninst✝³ : Semiring S\ninst✝² : Module R S\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nf : M₁ →ₗ[R] S\nx✝ : M\nx y : M₁\n⊢ ↑f (x + y) • x✝ = ↑f x • x✝ + ↑f y • x✝\n[PROOFSTEP]\nrw [f.map_add, add_smul]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝²¹ : Semiring R\ninst✝²⁰ : Semiring R₂\ninst✝¹⁹ : Semiring R₃\ninst✝¹⁸ : Semiring R₄\ninst✝¹⁷ : AddCommMonoid M\ninst✝¹⁶ : AddCommMonoid M₁\ninst✝¹⁵ : AddCommMonoid M₂\ninst✝¹⁴ : AddCommMonoid M₃\ninst✝¹³ : AddCommMonoid M₄\ninst✝¹² : Module R M\ninst✝¹¹ : Module R M₁\ninst✝¹⁰ : Module R₂ M₂\ninst✝⁹ : Module R₃ M₃\ninst✝⁸ : Module R₄ M₄\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₃₄ : R₃ →+* R₄\nσ₁₃ : R →+* R₃\nσ₂₄ : R₂ →+* R₄\nσ₁₄ : R →+* R₄\ninst✝⁷ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝⁶ : RingHomCompTriple σ₂₃ σ₃₄ σ₂₄\ninst✝⁵ : RingHomCompTriple σ₁₃ σ₃₄ σ₁₄\ninst✝⁴ : RingHomCompTriple σ₁₂ σ₂₄ σ₁₄\nf✝ : M →ₛₗ[σ₁₂] M₂\ng : M₂ →ₛₗ[σ₂₃] M₃\ninst✝³ : Semiring S\ninst✝² : Module R S\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nf : M₁ →ₗ[R] S\nx : M\nb : R\ny : M₁\n⊢ AddHom.toFun\n      { toFun := fun b => ↑f b • x,\n        map_add' :=\n          (_ : ∀ (x_1 y : M₁), (fun b => ↑f b • x) (x_1 + y) = (fun b => ↑f b • x) x_1 + (fun b => ↑f b • x) y) }\n      (b • y) =\n    ↑(RingHom.id R) b •\n      AddHom.toFun\n        { toFun := fun b => ↑f b • x,\n          map_add' :=\n            (_ : ∀ (x_1 y : M₁), (fun b => ↑f b • x) (x_1 + y) = (fun b => ↑f b • x) x_1 + (fun b => ↑f b • x) y) }\n        y\n[PROOFSTEP]\ndsimp\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝²¹ : Semiring R\ninst✝²⁰ : Semiring R₂\ninst✝¹⁹ : Semiring R₃\ninst✝¹⁸ : Semiring R₄\ninst✝¹⁷ : AddCommMonoid M\ninst✝¹⁶ : AddCommMonoid M₁\ninst✝¹⁵ : AddCommMonoid M₂\ninst✝¹⁴ : AddCommMonoid M₃\ninst✝¹³ : AddCommMonoid M₄\ninst✝¹² : Module R M\ninst✝¹¹ : Module R M₁\ninst✝¹⁰ : Module R₂ M₂\ninst✝⁹ : Module R₃ M₃\ninst✝⁸ : Module R₄ M₄\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₃₄ : R₃ →+* R₄\nσ₁₃ : R →+* R₃\nσ₂₄ : R₂ →+* R₄\nσ₁₄ : R →+* R₄\ninst✝⁷ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝⁶ : RingHomCompTriple σ₂₃ σ₃₄ σ₂₄\ninst✝⁵ : RingHomCompTriple σ₁₃ σ₃₄ σ₁₄\ninst✝⁴ : RingHomCompTriple σ₁₂ σ₂₄ σ₁₄\nf✝ : M →ₛₗ[σ₁₂] M₂\ng : M₂ →ₛₗ[σ₂₃] M₃\ninst✝³ : Semiring S\ninst✝² : Module R S\ninst✝¹ : Module S M\ninst✝ : IsScalarTower R S M\nf : M₁ →ₗ[R] S\nx : M\nb : R\ny : M₁\n⊢ ↑f (b • y) • x = b • ↑f y • x\n[PROOFSTEP]\nrw [map_smul, smul_assoc]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁸ : Semiring R\ninst✝¹⁷ : Semiring R₂\ninst✝¹⁶ : Semiring R₃\ninst✝¹⁵ : Semiring R₄\ninst✝¹⁴ : AddCommMonoid M\ninst✝¹³ : AddCommMonoid M₁\ninst✝¹² : AddCommMonoid M₂\ninst✝¹¹ : AddCommMonoid M₃\ninst✝¹⁰ : AddCommMonoid M₄\ninst✝⁹ : Module R M\ninst✝⁸ : Module R M₁\ninst✝⁷ : Module R₂ M₂\ninst✝⁶ : Module R₃ M₃\ninst✝⁵ : Module R₄ M₄\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₃₄ : R₃ →+* R₄\nσ₁₃ : R →+* R₃\nσ₂₄ : R₂ →+* R₄\nσ₁₄ : R →+* R₄\ninst✝⁴ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝³ : RingHomCompTriple σ₂₃ σ₃₄ σ₂₄\ninst✝² : RingHomCompTriple σ₁₃ σ₃₄ σ₁₄\ninst✝¹ : RingHomCompTriple σ₁₂ σ₂₄ σ₁₄\nf : M →ₛₗ[σ₁₂] M₂\ng : M₂ →ₛₗ[σ₂₃] M₃\ninst✝ : Nontrivial M\n⊢ Nontrivial (Module.End R M)\n[PROOFSTEP]\nobtain ⟨m, ne⟩ := (nontrivial_iff_exists_ne (0 : M)).mp inferInstance\n[GOAL]\ncase intro\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁸ : Semiring R\ninst✝¹⁷ : Semiring R₂\ninst✝¹⁶ : Semiring R₃\ninst✝¹⁵ : Semiring R₄\ninst✝¹⁴ : AddCommMonoid M\ninst✝¹³ : AddCommMonoid M₁\ninst✝¹² : AddCommMonoid M₂\ninst✝¹¹ : AddCommMonoid M₃\ninst✝¹⁰ : AddCommMonoid M₄\ninst✝⁹ : Module R M\ninst✝⁸ : Module R M₁\ninst✝⁷ : Module R₂ M₂\ninst✝⁶ : Module R₃ M₃\ninst✝⁵ : Module R₄ M₄\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₃₄ : R₃ →+* R₄\nσ₁₃ : R →+* R₃\nσ₂₄ : R₂ →+* R₄\nσ₁₄ : R →+* R₄\ninst✝⁴ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝³ : RingHomCompTriple σ₂₃ σ₃₄ σ₂₄\ninst✝² : RingHomCompTriple σ₁₃ σ₃₄ σ₁₄\ninst✝¹ : RingHomCompTriple σ₁₂ σ₂₄ σ₁₄\nf : M →ₛₗ[σ₁₂] M₂\ng : M₂ →ₛₗ[σ₂₃] M₃\ninst✝ : Nontrivial M\nm : M\nne : m ≠ 0\n⊢ Nontrivial (Module.End R M)\n[PROOFSTEP]\nexact nontrivial_of_ne 1 0 fun p => ne (LinearMap.congr_fun p m)\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : Semiring R₂\ninst✝¹⁵ : Semiring R₃\ninst✝¹⁴ : Semiring R₄\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid M₁\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : AddCommMonoid M₃\ninst✝⁹ : AddCommMonoid M₄\ninst✝⁸ : Module R M\ninst✝⁷ : Module R M₁\ninst✝⁶ : Module R₂ M₂\ninst✝⁵ : Module R₃ M₃\ninst✝⁴ : Module R₄ M₄\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₃₄ : R₃ →+* R₄\nσ₁₃ : R →+* R₃\nσ₂₄ : R₂ →+* R₄\nσ₁₄ : R →+* R₄\ninst✝³ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝² : RingHomCompTriple σ₂₃ σ₃₄ σ₂₄\ninst✝¹ : RingHomCompTriple σ₁₃ σ₃₄ σ₁₄\ninst✝ : RingHomCompTriple σ₁₂ σ₂₄ σ₁₄\nf✝ : M →ₛₗ[σ₁₂] M₂\ng : M₂ →ₛₗ[σ₂₃] M₃\nf : Module.End R M\nm : M\nk l : ℕ\nhk : k ≤ l\nhm : ↑(f ^ k) m = 0\n⊢ ↑(f ^ l) m = 0\n[PROOFSTEP]\nrw [← tsub_add_cancel_of_le hk, pow_add, mul_apply, hm, map_zero]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : Semiring R₂\ninst✝¹⁵ : Semiring R₃\ninst✝¹⁴ : Semiring R₄\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid M₁\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : AddCommMonoid M₃\ninst✝⁹ : AddCommMonoid M₄\ninst✝⁸ : Module R M\ninst✝⁷ : Module R M₁\ninst✝⁶ : Module R₂ M₂\ninst✝⁵ : Module R₃ M₃\ninst✝⁴ : Module R₄ M₄\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₃₄ : R₃ →+* R₄\nσ₁₃ : R →+* R₃\nσ₂₄ : R₂ →+* R₄\nσ₁₄ : R →+* R₄\ninst✝³ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝² : RingHomCompTriple σ₂₃ σ₃₄ σ₂₄\ninst✝¹ : RingHomCompTriple σ₁₃ σ₃₄ σ₁₄\ninst✝ : RingHomCompTriple σ₁₂ σ₂₄ σ₁₄\nf✝ : M →ₛₗ[σ₁₂] M₂\ng✝ : M₂ →ₛₗ[σ₂₃] M₃\nf : M →ₛₗ[σ₁₂] M₂\ng : Module.End R M\ng₂ : Module.End R₂ M₂\nh : comp g₂ f = comp f g\nk : ℕ\n⊢ comp (g₂ ^ k) f = comp f (g ^ k)\n[PROOFSTEP]\ninduction' k with k ih\n[GOAL]\ncase zero\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : Semiring R₂\ninst✝¹⁵ : Semiring R₃\ninst✝¹⁴ : Semiring R₄\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid M₁\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : AddCommMonoid M₃\ninst✝⁹ : AddCommMonoid M₄\ninst✝⁸ : Module R M\ninst✝⁷ : Module R M₁\ninst✝⁶ : Module R₂ M₂\ninst✝⁵ : Module R₃ M₃\ninst✝⁴ : Module R₄ M₄\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₃₄ : R₃ →+* R₄\nσ₁₃ : R →+* R₃\nσ₂₄ : R₂ →+* R₄\nσ₁₄ : R →+* R₄\ninst✝³ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝² : RingHomCompTriple σ₂₃ σ₃₄ σ₂₄\ninst✝¹ : RingHomCompTriple σ₁₃ σ₃₄ σ₁₄\ninst✝ : RingHomCompTriple σ₁₂ σ₂₄ σ₁₄\nf✝ : M →ₛₗ[σ₁₂] M₂\ng✝ : M₂ →ₛₗ[σ₂₃] M₃\nf : M →ₛₗ[σ₁₂] M₂\ng : Module.End R M\ng₂ : Module.End R₂ M₂\nh : comp g₂ f = comp f g\n⊢ comp (g₂ ^ Nat.zero) f = comp f (g ^ Nat.zero)\n[PROOFSTEP]\nsimp only [pow_zero, Nat.zero_eq]\n[GOAL]\ncase zero\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : Semiring R₂\ninst✝¹⁵ : Semiring R₃\ninst✝¹⁴ : Semiring R₄\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid M₁\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : AddCommMonoid M₃\ninst✝⁹ : AddCommMonoid M₄\ninst✝⁸ : Module R M\ninst✝⁷ : Module R M₁\ninst✝⁶ : Module R₂ M₂\ninst✝⁵ : Module R₃ M₃\ninst✝⁴ : Module R₄ M₄\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₃₄ : R₃ →+* R₄\nσ₁₃ : R →+* R₃\nσ₂₄ : R₂ →+* R₄\nσ₁₄ : R →+* R₄\ninst✝³ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝² : RingHomCompTriple σ₂₃ σ₃₄ σ₂₄\ninst✝¹ : RingHomCompTriple σ₁₃ σ₃₄ σ₁₄\ninst✝ : RingHomCompTriple σ₁₂ σ₂₄ σ₁₄\nf✝ : M →ₛₗ[σ₁₂] M₂\ng✝ : M₂ →ₛₗ[σ₂₃] M₃\nf : M →ₛₗ[σ₁₂] M₂\ng : Module.End R M\ng₂ : Module.End R₂ M₂\nh : comp g₂ f = comp f g\n⊢ comp 1 f = comp f 1\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : Semiring R₂\ninst✝¹⁵ : Semiring R₃\ninst✝¹⁴ : Semiring R₄\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid M₁\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : AddCommMonoid M₃\ninst✝⁹ : AddCommMonoid M₄\ninst✝⁸ : Module R M\ninst✝⁷ : Module R M₁\ninst✝⁶ : Module R₂ M₂\ninst✝⁵ : Module R₃ M₃\ninst✝⁴ : Module R₄ M₄\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₃₄ : R₃ →+* R₄\nσ₁₃ : R →+* R₃\nσ₂₄ : R₂ →+* R₄\nσ₁₄ : R →+* R₄\ninst✝³ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝² : RingHomCompTriple σ₂₃ σ₃₄ σ₂₄\ninst✝¹ : RingHomCompTriple σ₁₃ σ₃₄ σ₁₄\ninst✝ : RingHomCompTriple σ₁₂ σ₂₄ σ₁₄\nf✝ : M →ₛₗ[σ₁₂] M₂\ng✝ : M₂ →ₛₗ[σ₂₃] M₃\nf : M →ₛₗ[σ₁₂] M₂\ng : Module.End R M\ng₂ : Module.End R₂ M₂\nh : comp g₂ f = comp f g\nk : ℕ\nih : comp (g₂ ^ k) f = comp f (g ^ k)\n⊢ comp (g₂ ^ Nat.succ k) f = comp f (g ^ Nat.succ k)\n[PROOFSTEP]\nrw [pow_succ, pow_succ, LinearMap.mul_eq_comp, LinearMap.comp_assoc, ih, ← LinearMap.comp_assoc, h,\n  LinearMap.comp_assoc, LinearMap.mul_eq_comp]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN✝ : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : Semiring R₂\ninst✝¹⁵ : Semiring R₃\ninst✝¹⁴ : Semiring R₄\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid M₁\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : AddCommMonoid M₃\ninst✝⁹ : AddCommMonoid M₄\ninst✝⁸ : Module R M\ninst✝⁷ : Module R M₁\ninst✝⁶ : Module R₂ M₂\ninst✝⁵ : Module R₃ M₃\ninst✝⁴ : Module R₄ M₄\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₃₄ : R₃ →+* R₄\nσ₁₃ : R →+* R₃\nσ₂₄ : R₂ →+* R₄\nσ₁₄ : R →+* R₄\ninst✝³ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝² : RingHomCompTriple σ₂₃ σ₃₄ σ₂₄\ninst✝¹ : RingHomCompTriple σ₁₃ σ₃₄ σ₁₄\ninst✝ : RingHomCompTriple σ₁₂ σ₂₄ σ₁₄\nf : M →ₛₗ[σ₁₂] M₂\ng✝ : M₂ →ₛₗ[σ₂₃] M₃\nN : Submodule R M\ng : Module.End R { x // x ∈ N }\nG : Module.End R M\nh : comp G (Submodule.subtype N) = comp (Submodule.subtype N) g\nk : ℕ\nhG : G ^ k = 0\n⊢ g ^ k = 0\n[PROOFSTEP]\next m\n[GOAL]\ncase h.a\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN✝ : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : Semiring R₂\ninst✝¹⁵ : Semiring R₃\ninst✝¹⁴ : Semiring R₄\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid M₁\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : AddCommMonoid M₃\ninst✝⁹ : AddCommMonoid M₄\ninst✝⁸ : Module R M\ninst✝⁷ : Module R M₁\ninst✝⁶ : Module R₂ M₂\ninst✝⁵ : Module R₃ M₃\ninst✝⁴ : Module R₄ M₄\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₃₄ : R₃ →+* R₄\nσ₁₃ : R →+* R₃\nσ₂₄ : R₂ →+* R₄\nσ₁₄ : R →+* R₄\ninst✝³ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝² : RingHomCompTriple σ₂₃ σ₃₄ σ₂₄\ninst✝¹ : RingHomCompTriple σ₁₃ σ₃₄ σ₁₄\ninst✝ : RingHomCompTriple σ₁₂ σ₂₄ σ₁₄\nf : M →ₛₗ[σ₁₂] M₂\ng✝ : M₂ →ₛₗ[σ₂₃] M₃\nN : Submodule R M\ng : Module.End R { x // x ∈ N }\nG : Module.End R M\nh : comp G (Submodule.subtype N) = comp (Submodule.subtype N) g\nk : ℕ\nhG : G ^ k = 0\nm : { x // x ∈ N }\n⊢ ↑(↑(g ^ k) m) = ↑(↑0 m)\n[PROOFSTEP]\nhave hg : N.subtype.comp (g ^ k) m = 0 := by rw [← commute_pow_left_of_commute h, hG, zero_comp, zero_apply]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN✝ : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : Semiring R₂\ninst✝¹⁵ : Semiring R₃\ninst✝¹⁴ : Semiring R₄\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid M₁\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : AddCommMonoid M₃\ninst✝⁹ : AddCommMonoid M₄\ninst✝⁸ : Module R M\ninst✝⁷ : Module R M₁\ninst✝⁶ : Module R₂ M₂\ninst✝⁵ : Module R₃ M₃\ninst✝⁴ : Module R₄ M₄\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₃₄ : R₃ →+* R₄\nσ₁₃ : R →+* R₃\nσ₂₄ : R₂ →+* R₄\nσ₁₄ : R →+* R₄\ninst✝³ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝² : RingHomCompTriple σ₂₃ σ₃₄ σ₂₄\ninst✝¹ : RingHomCompTriple σ₁₃ σ₃₄ σ₁₄\ninst✝ : RingHomCompTriple σ₁₂ σ₂₄ σ₁₄\nf : M →ₛₗ[σ₁₂] M₂\ng✝ : M₂ →ₛₗ[σ₂₃] M₃\nN : Submodule R M\ng : Module.End R { x // x ∈ N }\nG : Module.End R M\nh : comp G (Submodule.subtype N) = comp (Submodule.subtype N) g\nk : ℕ\nhG : G ^ k = 0\nm : { x // x ∈ N }\n⊢ ↑(comp (Submodule.subtype N) (g ^ k)) m = 0\n[PROOFSTEP]\nrw [← commute_pow_left_of_commute h, hG, zero_comp, zero_apply]\n[GOAL]\ncase h.a\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN✝ : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : Semiring R₂\ninst✝¹⁵ : Semiring R₃\ninst✝¹⁴ : Semiring R₄\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid M₁\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : AddCommMonoid M₃\ninst✝⁹ : AddCommMonoid M₄\ninst✝⁸ : Module R M\ninst✝⁷ : Module R M₁\ninst✝⁶ : Module R₂ M₂\ninst✝⁵ : Module R₃ M₃\ninst✝⁴ : Module R₄ M₄\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₃₄ : R₃ →+* R₄\nσ₁₃ : R →+* R₃\nσ₂₄ : R₂ →+* R₄\nσ₁₄ : R →+* R₄\ninst✝³ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝² : RingHomCompTriple σ₂₃ σ₃₄ σ₂₄\ninst✝¹ : RingHomCompTriple σ₁₃ σ₃₄ σ₁₄\ninst✝ : RingHomCompTriple σ₁₂ σ₂₄ σ₁₄\nf : M →ₛₗ[σ₁₂] M₂\ng✝ : M₂ →ₛₗ[σ₂₃] M₃\nN : Submodule R M\ng : Module.End R { x // x ∈ N }\nG : Module.End R M\nh : comp G (Submodule.subtype N) = comp (Submodule.subtype N) g\nk : ℕ\nhG : G ^ k = 0\nm : { x // x ∈ N }\nhg : ↑(comp (Submodule.subtype N) (g ^ k)) m = 0\n⊢ ↑(↑(g ^ k) m) = ↑(↑0 m)\n[PROOFSTEP]\nsimpa using hg\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : Semiring R₂\ninst✝¹⁵ : Semiring R₃\ninst✝¹⁴ : Semiring R₄\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid M₁\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : AddCommMonoid M₃\ninst✝⁹ : AddCommMonoid M₄\ninst✝⁸ : Module R M\ninst✝⁷ : Module R M₁\ninst✝⁶ : Module R₂ M₂\ninst✝⁵ : Module R₃ M₃\ninst✝⁴ : Module R₄ M₄\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₃₄ : R₃ →+* R₄\nσ₁₃ : R →+* R₃\nσ₂₄ : R₂ →+* R₄\nσ₁₄ : R →+* R₄\ninst✝³ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝² : RingHomCompTriple σ₂₃ σ₃₄ σ₂₄\ninst✝¹ : RingHomCompTriple σ₁₃ σ₃₄ σ₁₄\ninst✝ : RingHomCompTriple σ₁₂ σ₂₄ σ₁₄\nf : M →ₛₗ[σ₁₂] M₂\ng : M₂ →ₛₗ[σ₂₃] M₃\nf' : M →ₗ[R] M\nn : ℕ\n⊢ f' ^ (n + 1) = comp (f' ^ n) f'\n[PROOFSTEP]\nrw [pow_succ', mul_eq_comp]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : Semiring R₂\ninst✝¹⁵ : Semiring R₃\ninst✝¹⁴ : Semiring R₄\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid M₁\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : AddCommMonoid M₃\ninst✝⁹ : AddCommMonoid M₄\ninst✝⁸ : Module R M\ninst✝⁷ : Module R M₁\ninst✝⁶ : Module R₂ M₂\ninst✝⁵ : Module R₃ M₃\ninst✝⁴ : Module R₄ M₄\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₃₄ : R₃ →+* R₄\nσ₁₃ : R →+* R₃\nσ₂₄ : R₂ →+* R₄\nσ₁₄ : R →+* R₄\ninst✝³ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝² : RingHomCompTriple σ₂₃ σ₃₄ σ₂₄\ninst✝¹ : RingHomCompTriple σ₁₃ σ₃₄ σ₁₄\ninst✝ : RingHomCompTriple σ₁₂ σ₂₄ σ₁₄\nf : M →ₛₗ[σ₁₂] M₂\ng : M₂ →ₛₗ[σ₂₃] M₃\nf' : M →ₗ[R] M\nh : Surjective ↑f'\nn : ℕ\n⊢ Surjective ↑(f' ^ (n + 1))\n[PROOFSTEP]\nrw [iterate_succ]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : Semiring R₂\ninst✝¹⁵ : Semiring R₃\ninst✝¹⁴ : Semiring R₄\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid M₁\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : AddCommMonoid M₃\ninst✝⁹ : AddCommMonoid M₄\ninst✝⁸ : Module R M\ninst✝⁷ : Module R M₁\ninst✝⁶ : Module R₂ M₂\ninst✝⁵ : Module R₃ M₃\ninst✝⁴ : Module R₄ M₄\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₃₄ : R₃ →+* R₄\nσ₁₃ : R →+* R₃\nσ₂₄ : R₂ →+* R₄\nσ₁₄ : R →+* R₄\ninst✝³ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝² : RingHomCompTriple σ₂₃ σ₃₄ σ₂₄\ninst✝¹ : RingHomCompTriple σ₁₃ σ₃₄ σ₁₄\ninst✝ : RingHomCompTriple σ₁₂ σ₂₄ σ₁₄\nf : M →ₛₗ[σ₁₂] M₂\ng : M₂ →ₛₗ[σ₂₃] M₃\nf' : M →ₗ[R] M\nh : Surjective ↑f'\nn : ℕ\n⊢ Surjective ↑(comp (f' ^ n) f')\n[PROOFSTEP]\nexact (iterate_surjective h n).comp h\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : Semiring R₂\ninst✝¹⁵ : Semiring R₃\ninst✝¹⁴ : Semiring R₄\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid M₁\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : AddCommMonoid M₃\ninst✝⁹ : AddCommMonoid M₄\ninst✝⁸ : Module R M\ninst✝⁷ : Module R M₁\ninst✝⁶ : Module R₂ M₂\ninst✝⁵ : Module R₃ M₃\ninst✝⁴ : Module R₄ M₄\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₃₄ : R₃ →+* R₄\nσ₁₃ : R →+* R₃\nσ₂₄ : R₂ →+* R₄\nσ₁₄ : R →+* R₄\ninst✝³ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝² : RingHomCompTriple σ₂₃ σ₃₄ σ₂₄\ninst✝¹ : RingHomCompTriple σ₁₃ σ₃₄ σ₁₄\ninst✝ : RingHomCompTriple σ₁₂ σ₂₄ σ₁₄\nf : M →ₛₗ[σ₁₂] M₂\ng : M₂ →ₛₗ[σ₂₃] M₃\nf' : M →ₗ[R] M\nh : Injective ↑f'\nn : ℕ\n⊢ Injective ↑(f' ^ (n + 1))\n[PROOFSTEP]\nrw [iterate_succ]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : Semiring R₂\ninst✝¹⁵ : Semiring R₃\ninst✝¹⁴ : Semiring R₄\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid M₁\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : AddCommMonoid M₃\ninst✝⁹ : AddCommMonoid M₄\ninst✝⁸ : Module R M\ninst✝⁷ : Module R M₁\ninst✝⁶ : Module R₂ M₂\ninst✝⁵ : Module R₃ M₃\ninst✝⁴ : Module R₄ M₄\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₃₄ : R₃ →+* R₄\nσ₁₃ : R →+* R₃\nσ₂₄ : R₂ →+* R₄\nσ₁₄ : R →+* R₄\ninst✝³ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝² : RingHomCompTriple σ₂₃ σ₃₄ σ₂₄\ninst✝¹ : RingHomCompTriple σ₁₃ σ₃₄ σ₁₄\ninst✝ : RingHomCompTriple σ₁₂ σ₂₄ σ₁₄\nf : M →ₛₗ[σ₁₂] M₂\ng : M₂ →ₛₗ[σ₂₃] M₃\nf' : M →ₗ[R] M\nh : Injective ↑f'\nn : ℕ\n⊢ Injective ↑(comp (f' ^ n) f')\n[PROOFSTEP]\nexact (iterate_injective h n).comp h\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : Semiring R₂\ninst✝¹⁵ : Semiring R₃\ninst✝¹⁴ : Semiring R₄\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid M₁\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : AddCommMonoid M₃\ninst✝⁹ : AddCommMonoid M₄\ninst✝⁸ : Module R M\ninst✝⁷ : Module R M₁\ninst✝⁶ : Module R₂ M₂\ninst✝⁵ : Module R₃ M₃\ninst✝⁴ : Module R₄ M₄\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₃₄ : R₃ →+* R₄\nσ₁₃ : R →+* R₃\nσ₂₄ : R₂ →+* R₄\nσ₁₄ : R →+* R₄\ninst✝³ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝² : RingHomCompTriple σ₂₃ σ₃₄ σ₂₄\ninst✝¹ : RingHomCompTriple σ₁₃ σ₃₄ σ₁₄\ninst✝ : RingHomCompTriple σ₁₂ σ₂₄ σ₁₄\nf : M →ₛₗ[σ₁₂] M₂\ng : M₂ →ₛₗ[σ₂₃] M₃\nf' : M →ₗ[R] M\nh : Bijective ↑f'\nn : ℕ\n⊢ Bijective ↑(f' ^ (n + 1))\n[PROOFSTEP]\nrw [iterate_succ]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : Semiring R₂\ninst✝¹⁵ : Semiring R₃\ninst✝¹⁴ : Semiring R₄\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid M₁\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : AddCommMonoid M₃\ninst✝⁹ : AddCommMonoid M₄\ninst✝⁸ : Module R M\ninst✝⁷ : Module R M₁\ninst✝⁶ : Module R₂ M₂\ninst✝⁵ : Module R₃ M₃\ninst✝⁴ : Module R₄ M₄\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₃₄ : R₃ →+* R₄\nσ₁₃ : R →+* R₃\nσ₂₄ : R₂ →+* R₄\nσ₁₄ : R →+* R₄\ninst✝³ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝² : RingHomCompTriple σ₂₃ σ₃₄ σ₂₄\ninst✝¹ : RingHomCompTriple σ₁₃ σ₃₄ σ₁₄\ninst✝ : RingHomCompTriple σ₁₂ σ₂₄ σ₁₄\nf : M →ₛₗ[σ₁₂] M₂\ng : M₂ →ₛₗ[σ₂₃] M₃\nf' : M →ₗ[R] M\nh : Bijective ↑f'\nn : ℕ\n⊢ Bijective ↑(comp (f' ^ n) f')\n[PROOFSTEP]\nexact (iterate_bijective h n).comp h\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : Semiring R₂\ninst✝¹⁵ : Semiring R₃\ninst✝¹⁴ : Semiring R₄\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid M₁\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : AddCommMonoid M₃\ninst✝⁹ : AddCommMonoid M₄\ninst✝⁸ : Module R M\ninst✝⁷ : Module R M₁\ninst✝⁶ : Module R₂ M₂\ninst✝⁵ : Module R₃ M₃\ninst✝⁴ : Module R₄ M₄\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₃₄ : R₃ →+* R₄\nσ₁₃ : R →+* R₃\nσ₂₄ : R₂ →+* R₄\nσ₁₄ : R →+* R₄\ninst✝³ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝² : RingHomCompTriple σ₂₃ σ₃₄ σ₂₄\ninst✝¹ : RingHomCompTriple σ₁₃ σ₃₄ σ₁₄\ninst✝ : RingHomCompTriple σ₁₂ σ₂₄ σ₁₄\nf : M →ₛₗ[σ₁₂] M₂\ng : M₂ →ₛₗ[σ₂₃] M₃\nf' : M →ₗ[R] M\nn : ℕ\nhn : n ≠ 0\nh : Injective ↑(f' ^ n)\n⊢ Injective ↑f'\n[PROOFSTEP]\nrw [← Nat.succ_pred_eq_of_pos (pos_iff_ne_zero.mpr hn), iterate_succ, coe_comp] at h \n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : Semiring R₂\ninst✝¹⁵ : Semiring R₃\ninst✝¹⁴ : Semiring R₄\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid M₁\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : AddCommMonoid M₃\ninst✝⁹ : AddCommMonoid M₄\ninst✝⁸ : Module R M\ninst✝⁷ : Module R M₁\ninst✝⁶ : Module R₂ M₂\ninst✝⁵ : Module R₃ M₃\ninst✝⁴ : Module R₄ M₄\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₃₄ : R₃ →+* R₄\nσ₁₃ : R →+* R₃\nσ₂₄ : R₂ →+* R₄\nσ₁₄ : R →+* R₄\ninst✝³ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝² : RingHomCompTriple σ₂₃ σ₃₄ σ₂₄\ninst✝¹ : RingHomCompTriple σ₁₃ σ₃₄ σ₁₄\ninst✝ : RingHomCompTriple σ₁₂ σ₂₄ σ₁₄\nf : M →ₛₗ[σ₁₂] M₂\ng : M₂ →ₛₗ[σ₂₃] M₃\nf' : M →ₗ[R] M\nn : ℕ\nhn : n ≠ 0\nh : Injective (↑(f' ^ Nat.pred n) ∘ ↑f')\n⊢ Injective ↑f'\n[PROOFSTEP]\nexact h.of_comp\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : Semiring R₂\ninst✝¹⁵ : Semiring R₃\ninst✝¹⁴ : Semiring R₄\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid M₁\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : AddCommMonoid M₃\ninst✝⁹ : AddCommMonoid M₄\ninst✝⁸ : Module R M\ninst✝⁷ : Module R M₁\ninst✝⁶ : Module R₂ M₂\ninst✝⁵ : Module R₃ M₃\ninst✝⁴ : Module R₄ M₄\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₃₄ : R₃ →+* R₄\nσ₁₃ : R →+* R₃\nσ₂₄ : R₂ →+* R₄\nσ₁₄ : R →+* R₄\ninst✝³ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝² : RingHomCompTriple σ₂₃ σ₃₄ σ₂₄\ninst✝¹ : RingHomCompTriple σ₁₃ σ₃₄ σ₁₄\ninst✝ : RingHomCompTriple σ₁₂ σ₂₄ σ₁₄\nf : M →ₛₗ[σ₁₂] M₂\ng : M₂ →ₛₗ[σ₂₃] M₃\nf' : M →ₗ[R] M\nn : ℕ\nhn : n ≠ 0\nh : Surjective ↑(f' ^ n)\n⊢ Surjective ↑f'\n[PROOFSTEP]\nrw [← Nat.succ_pred_eq_of_pos (pos_iff_ne_zero.mpr hn), Nat.succ_eq_add_one, add_comm, pow_add] at h \n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : Semiring R₂\ninst✝¹⁵ : Semiring R₃\ninst✝¹⁴ : Semiring R₄\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid M₁\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : AddCommMonoid M₃\ninst✝⁹ : AddCommMonoid M₄\ninst✝⁸ : Module R M\ninst✝⁷ : Module R M₁\ninst✝⁶ : Module R₂ M₂\ninst✝⁵ : Module R₃ M₃\ninst✝⁴ : Module R₄ M₄\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₃₄ : R₃ →+* R₄\nσ₁₃ : R →+* R₃\nσ₂₄ : R₂ →+* R₄\nσ₁₄ : R →+* R₄\ninst✝³ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝² : RingHomCompTriple σ₂₃ σ₃₄ σ₂₄\ninst✝¹ : RingHomCompTriple σ₁₃ σ₃₄ σ₁₄\ninst✝ : RingHomCompTriple σ₁₂ σ₂₄ σ₁₄\nf : M →ₛₗ[σ₁₂] M₂\ng : M₂ →ₛₗ[σ₂₃] M₃\nf' : M →ₗ[R] M\nn : ℕ\nhn : n ≠ 0\nh : Surjective ↑(f' ^ 1 * f' ^ Nat.pred n)\n⊢ Surjective ↑f'\n[PROOFSTEP]\nexact Surjective.of_comp h\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : Semiring R₂\ninst✝¹⁵ : Semiring R₃\ninst✝¹⁴ : Semiring R₄\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid M₁\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : AddCommMonoid M₃\ninst✝⁹ : AddCommMonoid M₄\ninst✝⁸ : Module R M\ninst✝⁷ : Module R M₁\ninst✝⁶ : Module R₂ M₂\ninst✝⁵ : Module R₃ M₃\ninst✝⁴ : Module R₄ M₄\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₃₄ : R₃ →+* R₄\nσ₁₃ : R →+* R₃\nσ₂₄ : R₂ →+* R₄\nσ₁₄ : R →+* R₄\ninst✝³ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝² : RingHomCompTriple σ₂₃ σ₃₄ σ₂₄\ninst✝¹ : RingHomCompTriple σ₁₃ σ₃₄ σ₁₄\ninst✝ : RingHomCompTriple σ₁₂ σ₂₄ σ₁₄\nf : M →ₛₗ[σ₁₂] M₂\ng : M₂ →ₛₗ[σ₂₃] M₃\nf' : M →ₗ[R] M\np : Submodule R M\nn : ℕ\nh : ∀ (x : M), x ∈ p → ↑f' x ∈ p\nx : M\nhx : x ∈ p\n⊢ ↑(f' ^ n) x ∈ p\n[PROOFSTEP]\ninduction' n with n ih generalizing x\n[GOAL]\ncase zero\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : Semiring R₂\ninst✝¹⁵ : Semiring R₃\ninst✝¹⁴ : Semiring R₄\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid M₁\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : AddCommMonoid M₃\ninst✝⁹ : AddCommMonoid M₄\ninst✝⁸ : Module R M\ninst✝⁷ : Module R M₁\ninst✝⁶ : Module R₂ M₂\ninst✝⁵ : Module R₃ M₃\ninst✝⁴ : Module R₄ M₄\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₃₄ : R₃ →+* R₄\nσ₁₃ : R →+* R₃\nσ₂₄ : R₂ →+* R₄\nσ₁₄ : R →+* R₄\ninst✝³ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝² : RingHomCompTriple σ₂₃ σ₃₄ σ₂₄\ninst✝¹ : RingHomCompTriple σ₁₃ σ₃₄ σ₁₄\ninst✝ : RingHomCompTriple σ₁₂ σ₂₄ σ₁₄\nf : M →ₛₗ[σ₁₂] M₂\ng : M₂ →ₛₗ[σ₂₃] M₃\nf' : M →ₗ[R] M\np : Submodule R M\nh : ∀ (x : M), x ∈ p → ↑f' x ∈ p\nx✝ : M\nhx✝ : x✝ ∈ p\nx : M\nhx : x ∈ p\n⊢ ↑(f' ^ Nat.zero) x ∈ p\n[PROOFSTEP]\nsimpa\n[GOAL]\ncase succ\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : Semiring R₂\ninst✝¹⁵ : Semiring R₃\ninst✝¹⁴ : Semiring R₄\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid M₁\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : AddCommMonoid M₃\ninst✝⁹ : AddCommMonoid M₄\ninst✝⁸ : Module R M\ninst✝⁷ : Module R M₁\ninst✝⁶ : Module R₂ M₂\ninst✝⁵ : Module R₃ M₃\ninst✝⁴ : Module R₄ M₄\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₃₄ : R₃ →+* R₄\nσ₁₃ : R →+* R₃\nσ₂₄ : R₂ →+* R₄\nσ₁₄ : R →+* R₄\ninst✝³ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝² : RingHomCompTriple σ₂₃ σ₃₄ σ₂₄\ninst✝¹ : RingHomCompTriple σ₁₃ σ₃₄ σ₁₄\ninst✝ : RingHomCompTriple σ₁₂ σ₂₄ σ₁₄\nf : M →ₛₗ[σ₁₂] M₂\ng : M₂ →ₛₗ[σ₂₃] M₃\nf' : M →ₗ[R] M\np : Submodule R M\nh : ∀ (x : M), x ∈ p → ↑f' x ∈ p\nx✝ : M\nhx✝ : x✝ ∈ p\nn : ℕ\nih : ∀ (x : M), x ∈ p → ↑(f' ^ n) x ∈ p\nx : M\nhx : x ∈ p\n⊢ ↑(f' ^ Nat.succ n) x ∈ p\n[PROOFSTEP]\nsimpa only [iterate_succ, coe_comp, Function.comp_apply, restrict_apply] using ih _ (h _ hx)\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : Semiring R₂\ninst✝¹⁵ : Semiring R₃\ninst✝¹⁴ : Semiring R₄\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid M₁\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : AddCommMonoid M₃\ninst✝⁹ : AddCommMonoid M₄\ninst✝⁸ : Module R M\ninst✝⁷ : Module R M₁\ninst✝⁶ : Module R₂ M₂\ninst✝⁵ : Module R₃ M₃\ninst✝⁴ : Module R₄ M₄\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₃₄ : R₃ →+* R₄\nσ₁₃ : R →+* R₃\nσ₂₄ : R₂ →+* R₄\nσ₁₄ : R →+* R₄\ninst✝³ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝² : RingHomCompTriple σ₂₃ σ₃₄ σ₂₄\ninst✝¹ : RingHomCompTriple σ₁₃ σ₃₄ σ₁₄\ninst✝ : RingHomCompTriple σ₁₂ σ₂₄ σ₁₄\nf : M →ₛₗ[σ₁₂] M₂\ng : M₂ →ₛₗ[σ₂₃] M₃\nf' : M →ₗ[R] M\np : Submodule R M\nn : ℕ\nh : ∀ (x : M), x ∈ p → ↑f' x ∈ p\nh' : optParam (∀ (x : M), x ∈ p → ↑(f' ^ n) x ∈ p) (_ : ∀ (x : M), x ∈ p → ↑(f' ^ n) x ∈ p)\n⊢ restrict f' h ^ n = restrict (f' ^ n) h'\n[PROOFSTEP]\next x\n[GOAL]\ncase h.a\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : Semiring R₂\ninst✝¹⁵ : Semiring R₃\ninst✝¹⁴ : Semiring R₄\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid M₁\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : AddCommMonoid M₃\ninst✝⁹ : AddCommMonoid M₄\ninst✝⁸ : Module R M\ninst✝⁷ : Module R M₁\ninst✝⁶ : Module R₂ M₂\ninst✝⁵ : Module R₃ M₃\ninst✝⁴ : Module R₄ M₄\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₃₄ : R₃ →+* R₄\nσ₁₃ : R →+* R₃\nσ₂₄ : R₂ →+* R₄\nσ₁₄ : R →+* R₄\ninst✝³ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝² : RingHomCompTriple σ₂₃ σ₃₄ σ₂₄\ninst✝¹ : RingHomCompTriple σ₁₃ σ₃₄ σ₁₄\ninst✝ : RingHomCompTriple σ₁₂ σ₂₄ σ₁₄\nf : M →ₛₗ[σ₁₂] M₂\ng : M₂ →ₛₗ[σ₂₃] M₃\nf' : M →ₗ[R] M\np : Submodule R M\nn : ℕ\nh : ∀ (x : M), x ∈ p → ↑f' x ∈ p\nh' : optParam (∀ (x : M), x ∈ p → ↑(f' ^ n) x ∈ p) (_ : ∀ (x : M), x ∈ p → ↑(f' ^ n) x ∈ p)\nx : { x // x ∈ p }\n⊢ ↑(↑(restrict f' h ^ n) x) = ↑(↑(restrict (f' ^ n) h') x)\n[PROOFSTEP]\nhave : Semiconj (↑) (f'.restrict h) f' := fun _ ↦ rfl\n[GOAL]\ncase h.a\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : Semiring R₂\ninst✝¹⁵ : Semiring R₃\ninst✝¹⁴ : Semiring R₄\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid M₁\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : AddCommMonoid M₃\ninst✝⁹ : AddCommMonoid M₄\ninst✝⁸ : Module R M\ninst✝⁷ : Module R M₁\ninst✝⁶ : Module R₂ M₂\ninst✝⁵ : Module R₃ M₃\ninst✝⁴ : Module R₄ M₄\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₃₄ : R₃ →+* R₄\nσ₁₃ : R →+* R₃\nσ₂₄ : R₂ →+* R₄\nσ₁₄ : R →+* R₄\ninst✝³ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝² : RingHomCompTriple σ₂₃ σ₃₄ σ₂₄\ninst✝¹ : RingHomCompTriple σ₁₃ σ₃₄ σ₁₄\ninst✝ : RingHomCompTriple σ₁₂ σ₂₄ σ₁₄\nf : M →ₛₗ[σ₁₂] M₂\ng : M₂ →ₛₗ[σ₂₃] M₃\nf' : M →ₗ[R] M\np : Submodule R M\nn : ℕ\nh : ∀ (x : M), x ∈ p → ↑f' x ∈ p\nh' : optParam (∀ (x : M), x ∈ p → ↑(f' ^ n) x ∈ p) (_ : ∀ (x : M), x ∈ p → ↑(f' ^ n) x ∈ p)\nx : { x // x ∈ p }\nthis : Semiconj Subtype.val ↑(restrict f' h) ↑f'\n⊢ ↑(↑(restrict f' h ^ n) x) = ↑(↑(restrict (f' ^ n) h') x)\n[PROOFSTEP]\nsimp [coe_pow, this.iterate_right _ _]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁹ : Semiring R\ninst✝¹⁸ : Semiring R₂\ninst✝¹⁷ : Semiring R₃\ninst✝¹⁶ : Semiring R₄\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : AddCommMonoid M₁\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : AddCommMonoid M₃\ninst✝¹¹ : AddCommMonoid M₄\ninst✝¹⁰ : Module R M\ninst✝⁹ : Module R M₁\ninst✝⁸ : Module R₂ M₂\ninst✝⁷ : Module R₃ M₃\ninst✝⁶ : Module R₄ M₄\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₃₄ : R₃ →+* R₄\nσ₁₃ : R →+* R₃\nσ₂₄ : R₂ →+* R₄\nσ₁₄ : R →+* R₄\ninst✝⁵ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝⁴ : RingHomCompTriple σ₂₃ σ₃₄ σ₂₄\ninst✝³ : RingHomCompTriple σ₁₃ σ₃₄ σ₁₄\ninst✝² : RingHomCompTriple σ₁₂ σ₂₄ σ₁₄\nf✝ : M →ₛₗ[σ₁₂] M₂\ng : M₂ →ₛₗ[σ₂₃] M₃\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nf : (ι → R) →ₗ[R] M\nx : ι → R\n⊢ ↑f x = ∑ i : ι, x i • ↑f fun j => if i = j then 1 else 0\n[PROOFSTEP]\nconv_lhs => rw [pi_eq_sum_univ x, f.map_sum]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁹ : Semiring R\ninst✝¹⁸ : Semiring R₂\ninst✝¹⁷ : Semiring R₃\ninst✝¹⁶ : Semiring R₄\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : AddCommMonoid M₁\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : AddCommMonoid M₃\ninst✝¹¹ : AddCommMonoid M₄\ninst✝¹⁰ : Module R M\ninst✝⁹ : Module R M₁\ninst✝⁸ : Module R₂ M₂\ninst✝⁷ : Module R₃ M₃\ninst✝⁶ : Module R₄ M₄\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₃₄ : R₃ →+* R₄\nσ₁₃ : R →+* R₃\nσ₂₄ : R₂ →+* R₄\nσ₁₄ : R →+* R₄\ninst✝⁵ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝⁴ : RingHomCompTriple σ₂₃ σ₃₄ σ₂₄\ninst✝³ : RingHomCompTriple σ₁₃ σ₃₄ σ₁₄\ninst✝² : RingHomCompTriple σ₁₂ σ₂₄ σ₁₄\nf✝ : M →ₛₗ[σ₁₂] M₂\ng : M₂ →ₛₗ[σ₂₃] M₃\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nf : (ι → R) →ₗ[R] M\nx : ι → R\n| ↑f x\n[PROOFSTEP]\nrw [pi_eq_sum_univ x, f.map_sum]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁹ : Semiring R\ninst✝¹⁸ : Semiring R₂\ninst✝¹⁷ : Semiring R₃\ninst✝¹⁶ : Semiring R₄\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : AddCommMonoid M₁\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : AddCommMonoid M₃\ninst✝¹¹ : AddCommMonoid M₄\ninst✝¹⁰ : Module R M\ninst✝⁹ : Module R M₁\ninst✝⁸ : Module R₂ M₂\ninst✝⁷ : Module R₃ M₃\ninst✝⁶ : Module R₄ M₄\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₃₄ : R₃ →+* R₄\nσ₁₃ : R →+* R₃\nσ₂₄ : R₂ →+* R₄\nσ₁₄ : R →+* R₄\ninst✝⁵ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝⁴ : RingHomCompTriple σ₂₃ σ₃₄ σ₂₄\ninst✝³ : RingHomCompTriple σ₁₃ σ₃₄ σ₁₄\ninst✝² : RingHomCompTriple σ₁₂ σ₂₄ σ₁₄\nf✝ : M →ₛₗ[σ₁₂] M₂\ng : M₂ →ₛₗ[σ₂₃] M₃\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nf : (ι → R) →ₗ[R] M\nx : ι → R\n| ↑f x\n[PROOFSTEP]\nrw [pi_eq_sum_univ x, f.map_sum]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁹ : Semiring R\ninst✝¹⁸ : Semiring R₂\ninst✝¹⁷ : Semiring R₃\ninst✝¹⁶ : Semiring R₄\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : AddCommMonoid M₁\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : AddCommMonoid M₃\ninst✝¹¹ : AddCommMonoid M₄\ninst✝¹⁰ : Module R M\ninst✝⁹ : Module R M₁\ninst✝⁸ : Module R₂ M₂\ninst✝⁷ : Module R₃ M₃\ninst✝⁶ : Module R₄ M₄\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₃₄ : R₃ →+* R₄\nσ₁₃ : R →+* R₃\nσ₂₄ : R₂ →+* R₄\nσ₁₄ : R →+* R₄\ninst✝⁵ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝⁴ : RingHomCompTriple σ₂₃ σ₃₄ σ₂₄\ninst✝³ : RingHomCompTriple σ₁₃ σ₃₄ σ₁₄\ninst✝² : RingHomCompTriple σ₁₂ σ₂₄ σ₁₄\nf✝ : M →ₛₗ[σ₁₂] M₂\ng : M₂ →ₛₗ[σ₂₃] M₃\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nf : (ι → R) →ₗ[R] M\nx : ι → R\n| ↑f x\n[PROOFSTEP]\nrw [pi_eq_sum_univ x, f.map_sum]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁹ : Semiring R\ninst✝¹⁸ : Semiring R₂\ninst✝¹⁷ : Semiring R₃\ninst✝¹⁶ : Semiring R₄\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : AddCommMonoid M₁\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : AddCommMonoid M₃\ninst✝¹¹ : AddCommMonoid M₄\ninst✝¹⁰ : Module R M\ninst✝⁹ : Module R M₁\ninst✝⁸ : Module R₂ M₂\ninst✝⁷ : Module R₃ M₃\ninst✝⁶ : Module R₄ M₄\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₃₄ : R₃ →+* R₄\nσ₁₃ : R →+* R₃\nσ₂₄ : R₂ →+* R₄\nσ₁₄ : R →+* R₄\ninst✝⁵ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝⁴ : RingHomCompTriple σ₂₃ σ₃₄ σ₂₄\ninst✝³ : RingHomCompTriple σ₁₃ σ₃₄ σ₁₄\ninst✝² : RingHomCompTriple σ₁₂ σ₂₄ σ₁₄\nf✝ : M →ₛₗ[σ₁₂] M₂\ng : M₂ →ₛₗ[σ₂₃] M₃\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nf : (ι → R) →ₗ[R] M\nx : ι → R\n⊢ ∑ i : ι, ↑f (x i • fun j => if i = j then 1 else 0) = ∑ i : ι, x i • ↑f fun j => if i = j then 1 else 0\n[PROOFSTEP]\nrefine Finset.sum_congr rfl (fun _ _ => ?_)\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁹ : Semiring R\ninst✝¹⁸ : Semiring R₂\ninst✝¹⁷ : Semiring R₃\ninst✝¹⁶ : Semiring R₄\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : AddCommMonoid M₁\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : AddCommMonoid M₃\ninst✝¹¹ : AddCommMonoid M₄\ninst✝¹⁰ : Module R M\ninst✝⁹ : Module R M₁\ninst✝⁸ : Module R₂ M₂\ninst✝⁷ : Module R₃ M₃\ninst✝⁶ : Module R₄ M₄\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₃₄ : R₃ →+* R₄\nσ₁₃ : R →+* R₃\nσ₂₄ : R₂ →+* R₄\nσ₁₄ : R →+* R₄\ninst✝⁵ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝⁴ : RingHomCompTriple σ₂₃ σ₃₄ σ₂₄\ninst✝³ : RingHomCompTriple σ₁₃ σ₃₄ σ₁₄\ninst✝² : RingHomCompTriple σ₁₂ σ₂₄ σ₁₄\nf✝ : M →ₛₗ[σ₁₂] M₂\ng : M₂ →ₛₗ[σ₂₃] M₃\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nf : (ι → R) →ₗ[R] M\nx : ι → R\nx✝¹ : ι\nx✝ : x✝¹ ∈ Finset.univ\n⊢ ↑f (x x✝¹ • fun j => if x✝¹ = j then 1 else 0) = x x✝¹ • ↑f fun j => if x✝¹ = j then 1 else 0\n[PROOFSTEP]\nrw [map_smul]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹³ : Semiring R\ninst✝¹² : Semiring S\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : AddCommMonoid M₃\ninst✝⁸ : Module R M\ninst✝⁷ : Module R M₂\ninst✝⁶ : Module R M₃\ninst✝⁵ : Module S M₂\ninst✝⁴ : Module S M₃\ninst✝³ : SMulCommClass R S M₂\ninst✝² : SMulCommClass R S M₃\nf✝ : M →ₗ[R] M₂\ninst✝¹ : Module S M\ninst✝ : SMulCommClass R S M\nsrc✝ : (fun x => (R →ₗ[R] M) →ₗ[S] M) 1 := ↑(applyₗ' S) 1\nf : R →ₗ[R] M\n⊢ smulRight 1\n      (AddHom.toFun\n        {\n            toAddHom :=\n              { toFun := fun f => ↑f 1,\n                map_add' :=\n                  (_ :\n                    ∀ (x y : R →ₗ[R] M),\n                      AddHom.toFun src✝.toAddHom (x + y) =\n                        AddHom.toFun src✝.toAddHom x + AddHom.toFun src✝.toAddHom y) },\n            map_smul' :=\n              (_ :\n                ∀ (r : S) (x : R →ₗ[R] M),\n                  AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id S) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n        f) =\n    f\n[PROOFSTEP]\next\n[GOAL]\ncase h\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹³ : Semiring R\ninst✝¹² : Semiring S\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : AddCommMonoid M₃\ninst✝⁸ : Module R M\ninst✝⁷ : Module R M₂\ninst✝⁶ : Module R M₃\ninst✝⁵ : Module S M₂\ninst✝⁴ : Module S M₃\ninst✝³ : SMulCommClass R S M₂\ninst✝² : SMulCommClass R S M₃\nf✝ : M →ₗ[R] M₂\ninst✝¹ : Module S M\ninst✝ : SMulCommClass R S M\nsrc✝ : (fun x => (R →ₗ[R] M) →ₗ[S] M) 1 := ↑(applyₗ' S) 1\nf : R →ₗ[R] M\n⊢ ↑(smulRight 1\n          (AddHom.toFun\n            {\n                toAddHom :=\n                  { toFun := fun f => ↑f 1,\n                    map_add' :=\n                      (_ :\n                        ∀ (x y : R →ₗ[R] M),\n                          AddHom.toFun src✝.toAddHom (x + y) =\n                            AddHom.toFun src✝.toAddHom x + AddHom.toFun src✝.toAddHom y) },\n                map_smul' :=\n                  (_ :\n                    ∀ (r : S) (x : R →ₗ[R] M),\n                      AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id S) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n            f))\n      1 =\n    ↑f 1\n[PROOFSTEP]\nsimp only [coe_smulRight, one_apply, smul_eq_mul, ← map_smul f, mul_one]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹³ : Semiring R\ninst✝¹² : Semiring S\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : AddCommMonoid M₃\ninst✝⁸ : Module R M\ninst✝⁷ : Module R M₂\ninst✝⁶ : Module R M₃\ninst✝⁵ : Module S M₂\ninst✝⁴ : Module S M₃\ninst✝³ : SMulCommClass R S M₂\ninst✝² : SMulCommClass R S M₃\nf : M →ₗ[R] M₂\ninst✝¹ : Module S M\ninst✝ : SMulCommClass R S M\nsrc✝ : (fun x => (R →ₗ[R] M) →ₗ[S] M) 1 := ↑(applyₗ' S) 1\nx : M\n⊢ AddHom.toFun\n      {\n          toAddHom :=\n            { toFun := fun f => ↑f 1,\n              map_add' :=\n                (_ :\n                  ∀ (x y : R →ₗ[R] M),\n                    AddHom.toFun src✝.toAddHom (x + y) = AddHom.toFun src✝.toAddHom x + AddHom.toFun src✝.toAddHom y) },\n          map_smul' :=\n            (_ :\n              ∀ (r : S) (x : R →ₗ[R] M),\n                AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id S) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n      (smulRight 1 x) =\n    x\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝⁶ : CommSemiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M₂\ninst✝³ : AddCommMonoid M₃\ninst✝² : Module R M\ninst✝¹ : Module R M₂\ninst✝ : Module R M₃\nf g : M →ₗ[R] M₂\np : Submodule R M\n⊢ ∀ (x y : M →ₗ[R] M₂), (fun φ => domRestrict φ p) (x + y) = (fun φ => domRestrict φ p) x + (fun φ => domRestrict φ p) y\n[PROOFSTEP]\nsimp [LinearMap.ext_iff]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝⁶ : CommSemiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M₂\ninst✝³ : AddCommMonoid M₃\ninst✝² : Module R M\ninst✝¹ : Module R M₂\ninst✝ : Module R M₃\nf g : M →ₗ[R] M₂\np : Submodule R M\n⊢ ∀ (r : R) (x : M →ₗ[R] M₂),\n    AddHom.toFun\n        { toFun := fun φ => domRestrict φ p,\n          map_add' := (_ : ∀ (a a_1 : M →ₗ[R] M₂), domRestrict (a + a_1) p = domRestrict a p + domRestrict a_1 p) }\n        (r • x) =\n      ↑(RingHom.id R) r •\n        AddHom.toFun\n          { toFun := fun φ => domRestrict φ p,\n            map_add' := (_ : ∀ (a a_1 : M →ₗ[R] M₂), domRestrict (a + a_1) p = domRestrict a p + domRestrict a_1 p) }\n          x\n[PROOFSTEP]\nsimp [LinearMap.ext_iff]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝⁶ : CommSemiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M₂\ninst✝³ : AddCommMonoid M₃\ninst✝² : Module R M\ninst✝¹ : Module R M₂\ninst✝ : Module R M₃\nf✝ g : M →ₗ[R] M₂\nf : M₂ →ₗ[R] R\nm m' : M\n⊢ smulRight f (m + m') = smulRight f m + smulRight f m'\n[PROOFSTEP]\next\n[GOAL]\ncase h\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝⁶ : CommSemiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M₂\ninst✝³ : AddCommMonoid M₃\ninst✝² : Module R M\ninst✝¹ : Module R M₂\ninst✝ : Module R M₃\nf✝ g : M →ₗ[R] M₂\nf : M₂ →ₗ[R] R\nm m' : M\nx✝ : M₂\n⊢ ↑(smulRight f (m + m')) x✝ = ↑(smulRight f m + smulRight f m') x✝\n[PROOFSTEP]\napply smul_add\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝⁶ : CommSemiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M₂\ninst✝³ : AddCommMonoid M₃\ninst✝² : Module R M\ninst✝¹ : Module R M₂\ninst✝ : Module R M₃\nf✝ g : M →ₗ[R] M₂\nf : M₂ →ₗ[R] R\nc : R\nm : M\n⊢ AddHom.toFun\n      { toFun := smulRight f, map_add' := (_ : ∀ (m m' : M), smulRight f (m + m') = smulRight f m + smulRight f m') }\n      (c • m) =\n    ↑(RingHom.id R) c •\n      AddHom.toFun\n        { toFun := smulRight f, map_add' := (_ : ∀ (m m' : M), smulRight f (m + m') = smulRight f m + smulRight f m') }\n        m\n[PROOFSTEP]\next\n[GOAL]\ncase h\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝⁶ : CommSemiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M₂\ninst✝³ : AddCommMonoid M₃\ninst✝² : Module R M\ninst✝¹ : Module R M₂\ninst✝ : Module R M₃\nf✝ g : M →ₗ[R] M₂\nf : M₂ →ₗ[R] R\nc : R\nm : M\nx✝ : M₂\n⊢ ↑(AddHom.toFun\n          { toFun := smulRight f,\n            map_add' := (_ : ∀ (m m' : M), smulRight f (m + m') = smulRight f m + smulRight f m') }\n          (c • m))\n      x✝ =\n    ↑(↑(RingHom.id R) c •\n          AddHom.toFun\n            { toFun := smulRight f,\n              map_add' := (_ : ∀ (m m' : M), smulRight f (m + m') = smulRight f m + smulRight f m') }\n            m)\n      x✝\n[PROOFSTEP]\napply smul_comm\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝⁶ : CommSemiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M₂\ninst✝³ : AddCommMonoid M₃\ninst✝² : Module R M\ninst✝¹ : Module R M₂\ninst✝ : Module R M₃\nf✝ g : M →ₗ[R] M₂\nf f' : M₂ →ₗ[R] R\n⊢ (fun f =>\n        {\n          toAddHom :=\n            { toFun := smulRight f,\n              map_add' := (_ : ∀ (m m' : M), smulRight f (m + m') = smulRight f m + smulRight f m') },\n          map_smul' :=\n            (_ :\n              ∀ (c : R) (m : M),\n                AddHom.toFun\n                    { toFun := smulRight f,\n                      map_add' := (_ : ∀ (m m' : M), smulRight f (m + m') = smulRight f m + smulRight f m') }\n                    (c • m) =\n                  ↑(RingHom.id R) c •\n                    AddHom.toFun\n                      { toFun := smulRight f,\n                        map_add' := (_ : ∀ (m m' : M), smulRight f (m + m') = smulRight f m + smulRight f m') }\n                      m) })\n      (f + f') =\n    (fun f =>\n          {\n            toAddHom :=\n              { toFun := smulRight f,\n                map_add' := (_ : ∀ (m m' : M), smulRight f (m + m') = smulRight f m + smulRight f m') },\n            map_smul' :=\n              (_ :\n                ∀ (c : R) (m : M),\n                  AddHom.toFun\n                      { toFun := smulRight f,\n                        map_add' := (_ : ∀ (m m' : M), smulRight f (m + m') = smulRight f m + smulRight f m') }\n                      (c • m) =\n                    ↑(RingHom.id R) c •\n                      AddHom.toFun\n                        { toFun := smulRight f,\n                          map_add' := (_ : ∀ (m m' : M), smulRight f (m + m') = smulRight f m + smulRight f m') }\n                        m) })\n        f +\n      (fun f =>\n          {\n            toAddHom :=\n              { toFun := smulRight f,\n                map_add' := (_ : ∀ (m m' : M), smulRight f (m + m') = smulRight f m + smulRight f m') },\n            map_smul' :=\n              (_ :\n                ∀ (c : R) (m : M),\n                  AddHom.toFun\n                      { toFun := smulRight f,\n                        map_add' := (_ : ∀ (m m' : M), smulRight f (m + m') = smulRight f m + smulRight f m') }\n                      (c • m) =\n                    ↑(RingHom.id R) c •\n                      AddHom.toFun\n                        { toFun := smulRight f,\n                          map_add' := (_ : ∀ (m m' : M), smulRight f (m + m') = smulRight f m + smulRight f m') }\n                        m) })\n        f'\n[PROOFSTEP]\next\n[GOAL]\ncase h.h\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝⁶ : CommSemiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M₂\ninst✝³ : AddCommMonoid M₃\ninst✝² : Module R M\ninst✝¹ : Module R M₂\ninst✝ : Module R M₃\nf✝ g : M →ₗ[R] M₂\nf f' : M₂ →ₗ[R] R\nx✝¹ : M\nx✝ : M₂\n⊢ ↑(↑((fun f =>\n                {\n                  toAddHom :=\n                    { toFun := smulRight f,\n                      map_add' := (_ : ∀ (m m' : M), smulRight f (m + m') = smulRight f m + smulRight f m') },\n                  map_smul' :=\n                    (_ :\n                      ∀ (c : R) (m : M),\n                        AddHom.toFun\n                            { toFun := smulRight f,\n                              map_add' := (_ : ∀ (m m' : M), smulRight f (m + m') = smulRight f m + smulRight f m') }\n                            (c • m) =\n                          ↑(RingHom.id R) c •\n                            AddHom.toFun\n                              { toFun := smulRight f,\n                                map_add' := (_ : ∀ (m m' : M), smulRight f (m + m') = smulRight f m + smulRight f m') }\n                              m) })\n              (f + f'))\n          x✝¹)\n      x✝ =\n    ↑(↑((fun f =>\n                  {\n                    toAddHom :=\n                      { toFun := smulRight f,\n                        map_add' := (_ : ∀ (m m' : M), smulRight f (m + m') = smulRight f m + smulRight f m') },\n                    map_smul' :=\n                      (_ :\n                        ∀ (c : R) (m : M),\n                          AddHom.toFun\n                              { toFun := smulRight f,\n                                map_add' := (_ : ∀ (m m' : M), smulRight f (m + m') = smulRight f m + smulRight f m') }\n                              (c • m) =\n                            ↑(RingHom.id R) c •\n                              AddHom.toFun\n                                { toFun := smulRight f,\n                                  map_add' :=\n                                    (_ : ∀ (m m' : M), smulRight f (m + m') = smulRight f m + smulRight f m') }\n                                m) })\n                f +\n              (fun f =>\n                  {\n                    toAddHom :=\n                      { toFun := smulRight f,\n                        map_add' := (_ : ∀ (m m' : M), smulRight f (m + m') = smulRight f m + smulRight f m') },\n                    map_smul' :=\n                      (_ :\n                        ∀ (c : R) (m : M),\n                          AddHom.toFun\n                              { toFun := smulRight f,\n                                map_add' := (_ : ∀ (m m' : M), smulRight f (m + m') = smulRight f m + smulRight f m') }\n                              (c • m) =\n                            ↑(RingHom.id R) c •\n                              AddHom.toFun\n                                { toFun := smulRight f,\n                                  map_add' :=\n                                    (_ : ∀ (m m' : M), smulRight f (m + m') = smulRight f m + smulRight f m') }\n                                m) })\n                f')\n          x✝¹)\n      x✝\n[PROOFSTEP]\napply add_smul\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝⁶ : CommSemiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M₂\ninst✝³ : AddCommMonoid M₃\ninst✝² : Module R M\ninst✝¹ : Module R M₂\ninst✝ : Module R M₃\nf✝ g : M →ₗ[R] M₂\nc : R\nf : M₂ →ₗ[R] R\n⊢ AddHom.toFun\n      {\n        toFun := fun f =>\n          {\n            toAddHom :=\n              { toFun := smulRight f,\n                map_add' := (_ : ∀ (m m' : M), smulRight f (m + m') = smulRight f m + smulRight f m') },\n            map_smul' :=\n              (_ :\n                ∀ (c : R) (m : M),\n                  AddHom.toFun\n                      { toFun := smulRight f,\n                        map_add' := (_ : ∀ (m m' : M), smulRight f (m + m') = smulRight f m + smulRight f m') }\n                      (c • m) =\n                    ↑(RingHom.id R) c •\n                      AddHom.toFun\n                        { toFun := smulRight f,\n                          map_add' := (_ : ∀ (m m' : M), smulRight f (m + m') = smulRight f m + smulRight f m') }\n                        m) },\n        map_add' :=\n          (_ :\n            ∀ (f f' : M₂ →ₗ[R] R),\n              (fun f =>\n                    {\n                      toAddHom :=\n                        { toFun := smulRight f,\n                          map_add' := (_ : ∀ (m m' : M), smulRight f (m + m') = smulRight f m + smulRight f m') },\n                      map_smul' :=\n                        (_ :\n                          ∀ (c : R) (m : M),\n                            AddHom.toFun\n                                { toFun := smulRight f,\n                                  map_add' :=\n                                    (_ : ∀ (m m' : M), smulRight f (m + m') = smulRight f m + smulRight f m') }\n                                (c • m) =\n                              ↑(RingHom.id R) c •\n                                AddHom.toFun\n                                  { toFun := smulRight f,\n                                    map_add' :=\n                                      (_ : ∀ (m m' : M), smulRight f (m + m') = smulRight f m + smulRight f m') }\n                                  m) })\n                  (f + f') =\n                (fun f =>\n                      {\n                        toAddHom :=\n                          { toFun := smulRight f,\n                            map_add' := (_ : ∀ (m m' : M), smulRight f (m + m') = smulRight f m + smulRight f m') },\n                        map_smul' :=\n                          (_ :\n                            ∀ (c : R) (m : M),\n                              AddHom.toFun\n                                  { toFun := smulRight f,\n                                    map_add' :=\n                                      (_ : ∀ (m m' : M), smulRight f (m + m') = smulRight f m + smulRight f m') }\n                                  (c • m) =\n                                ↑(RingHom.id R) c •\n                                  AddHom.toFun\n                                    { toFun := smulRight f,\n                                      map_add' :=\n                                        (_ : ∀ (m m' : M), smulRight f (m + m') = smulRight f m + smulRight f m') }\n                                    m) })\n                    f +\n                  (fun f =>\n                      {\n                        toAddHom :=\n                          { toFun := smulRight f,\n                            map_add' := (_ : ∀ (m m' : M), smulRight f (m + m') = smulRight f m + smulRight f m') },\n                        map_smul' :=\n                          (_ :\n                            ∀ (c : R) (m : M),\n                              AddHom.toFun\n                                  { toFun := smulRight f,\n                                    map_add' :=\n                                      (_ : ∀ (m m' : M), smulRight f (m + m') = smulRight f m + smulRight f m') }\n                                  (c • m) =\n                                ↑(RingHom.id R) c •\n                                  AddHom.toFun\n                                    { toFun := smulRight f,\n                                      map_add' :=\n                                        (_ : ∀ (m m' : M), smulRight f (m + m') = smulRight f m + smulRight f m') }\n                                    m) })\n                    f') }\n      (c • f) =\n    ↑(RingHom.id R) c •\n      AddHom.toFun\n        {\n          toFun := fun f =>\n            {\n              toAddHom :=\n                { toFun := smulRight f,\n                  map_add' := (_ : ∀ (m m' : M), smulRight f (m + m') = smulRight f m + smulRight f m') },\n              map_smul' :=\n                (_ :\n                  ∀ (c : R) (m : M),\n                    AddHom.toFun\n                        { toFun := smulRight f,\n                          map_add' := (_ : ∀ (m m' : M), smulRight f (m + m') = smulRight f m + smulRight f m') }\n                        (c • m) =\n                      ↑(RingHom.id R) c •\n                        AddHom.toFun\n                          { toFun := smulRight f,\n                            map_add' := (_ : ∀ (m m' : M), smulRight f (m + m') = smulRight f m + smulRight f m') }\n                          m) },\n          map_add' :=\n            (_ :\n              ∀ (f f' : M₂ →ₗ[R] R),\n                (fun f =>\n                      {\n                        toAddHom :=\n                          { toFun := smulRight f,\n                            map_add' := (_ : ∀ (m m' : M), smulRight f (m + m') = smulRight f m + smulRight f m') },\n                        map_smul' :=\n                          (_ :\n                            ∀ (c : R) (m : M),\n                              AddHom.toFun\n                                  { toFun := smulRight f,\n                                    map_add' :=\n                                      (_ : ∀ (m m' : M), smulRight f (m + m') = smulRight f m + smulRight f m') }\n                                  (c • m) =\n                                ↑(RingHom.id R) c •\n                                  AddHom.toFun\n                                    { toFun := smulRight f,\n                                      map_add' :=\n                                        (_ : ∀ (m m' : M), smulRight f (m + m') = smulRight f m + smulRight f m') }\n                                    m) })\n                    (f + f') =\n                  (fun f =>\n                        {\n                          toAddHom :=\n                            { toFun := smulRight f,\n                              map_add' := (_ : ∀ (m m' : M), smulRight f (m + m') = smulRight f m + smulRight f m') },\n                          map_smul' :=\n                            (_ :\n                              ∀ (c : R) (m : M),\n                                AddHom.toFun\n                                    { toFun := smulRight f,\n                                      map_add' :=\n                                        (_ : ∀ (m m' : M), smulRight f (m + m') = smulRight f m + smulRight f m') }\n                                    (c • m) =\n                                  ↑(RingHom.id R) c •\n                                    AddHom.toFun\n                                      { toFun := smulRight f,\n                                        map_add' :=\n                                          (_ : ∀ (m m' : M), smulRight f (m + m') = smulRight f m + smulRight f m') }\n                                      m) })\n                      f +\n                    (fun f =>\n                        {\n                          toAddHom :=\n                            { toFun := smulRight f,\n                              map_add' := (_ : ∀ (m m' : M), smulRight f (m + m') = smulRight f m + smulRight f m') },\n                          map_smul' :=\n                            (_ :\n                              ∀ (c : R) (m : M),\n                                AddHom.toFun\n                                    { toFun := smulRight f,\n                                      map_add' :=\n                                        (_ : ∀ (m m' : M), smulRight f (m + m') = smulRight f m + smulRight f m') }\n                                    (c • m) =\n                                  ↑(RingHom.id R) c •\n                                    AddHom.toFun\n                                      { toFun := smulRight f,\n                                        map_add' :=\n                                          (_ : ∀ (m m' : M), smulRight f (m + m') = smulRight f m + smulRight f m') }\n                                      m) })\n                      f') }\n        f\n[PROOFSTEP]\next\n[GOAL]\ncase h.h\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝⁶ : CommSemiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M₂\ninst✝³ : AddCommMonoid M₃\ninst✝² : Module R M\ninst✝¹ : Module R M₂\ninst✝ : Module R M₃\nf✝ g : M →ₗ[R] M₂\nc : R\nf : M₂ →ₗ[R] R\nx✝¹ : M\nx✝ : M₂\n⊢ ↑(↑(AddHom.toFun\n              {\n                toFun := fun f =>\n                  {\n                    toAddHom :=\n                      { toFun := smulRight f,\n                        map_add' := (_ : ∀ (m m' : M), smulRight f (m + m') = smulRight f m + smulRight f m') },\n                    map_smul' :=\n                      (_ :\n                        ∀ (c : R) (m : M),\n                          AddHom.toFun\n                              { toFun := smulRight f,\n                                map_add' := (_ : ∀ (m m' : M), smulRight f (m + m') = smulRight f m + smulRight f m') }\n                              (c • m) =\n                            ↑(RingHom.id R) c •\n                              AddHom.toFun\n                                { toFun := smulRight f,\n                                  map_add' :=\n                                    (_ : ∀ (m m' : M), smulRight f (m + m') = smulRight f m + smulRight f m') }\n                                m) },\n                map_add' :=\n                  (_ :\n                    ∀ (f f' : M₂ →ₗ[R] R),\n                      (fun f =>\n                            {\n                              toAddHom :=\n                                { toFun := smulRight f,\n                                  map_add' :=\n                                    (_ : ∀ (m m' : M), smulRight f (m + m') = smulRight f m + smulRight f m') },\n                              map_smul' :=\n                                (_ :\n                                  ∀ (c : R) (m : M),\n                                    AddHom.toFun\n                                        { toFun := smulRight f,\n                                          map_add' :=\n                                            (_ : ∀ (m m' : M), smulRight f (m + m') = smulRight f m + smulRight f m') }\n                                        (c • m) =\n                                      ↑(RingHom.id R) c •\n                                        AddHom.toFun\n                                          { toFun := smulRight f,\n                                            map_add' :=\n                                              (_ :\n                                                ∀ (m m' : M), smulRight f (m + m') = smulRight f m + smulRight f m') }\n                                          m) })\n                          (f + f') =\n                        (fun f =>\n                              {\n                                toAddHom :=\n                                  { toFun := smulRight f,\n                                    map_add' :=\n                                      (_ : ∀ (m m' : M), smulRight f (m + m') = smulRight f m + smulRight f m') },\n                                map_smul' :=\n                                  (_ :\n                                    ∀ (c : R) (m : M),\n                                      AddHom.toFun\n                                          { toFun := smulRight f,\n                                            map_add' :=\n                                              (_ :\n                                                ∀ (m m' : M), smulRight f (m + m') = smulRight f m + smulRight f m') }\n                                          (c • m) =\n                                        ↑(RingHom.id R) c •\n                                          AddHom.toFun\n                                            { toFun := smulRight f,\n                                              map_add' :=\n                                                (_ :\n                                                  ∀ (m m' : M), smulRight f (m + m') = smulRight f m + smulRight f m') }\n                                            m) })\n                            f +\n                          (fun f =>\n                              {\n                                toAddHom :=\n                                  { toFun := smulRight f,\n                                    map_add' :=\n                                      (_ : ∀ (m m' : M), smulRight f (m + m') = smulRight f m + smulRight f m') },\n                                map_smul' :=\n                                  (_ :\n                                    ∀ (c : R) (m : M),\n                                      AddHom.toFun\n                                          { toFun := smulRight f,\n                                            map_add' :=\n                                              (_ :\n                                                ∀ (m m' : M), smulRight f (m + m') = smulRight f m + smulRight f m') }\n                                          (c • m) =\n                                        ↑(RingHom.id R) c •\n                                          AddHom.toFun\n                                            { toFun := smulRight f,\n                                              map_add' :=\n                                                (_ :\n                                                  ∀ (m m' : M), smulRight f (m + m') = smulRight f m + smulRight f m') }\n                                            m) })\n                            f') }\n              (c • f))\n          x✝¹)\n      x✝ =\n    ↑(↑(↑(RingHom.id R) c •\n              AddHom.toFun\n                {\n                  toFun := fun f =>\n                    {\n                      toAddHom :=\n                        { toFun := smulRight f,\n                          map_add' := (_ : ∀ (m m' : M), smulRight f (m + m') = smulRight f m + smulRight f m') },\n                      map_smul' :=\n                        (_ :\n                          ∀ (c : R) (m : M),\n                            AddHom.toFun\n                                { toFun := smulRight f,\n                                  map_add' :=\n                                    (_ : ∀ (m m' : M), smulRight f (m + m') = smulRight f m + smulRight f m') }\n                                (c • m) =\n                              ↑(RingHom.id R) c •\n                                AddHom.toFun\n                                  { toFun := smulRight f,\n                                    map_add' :=\n                                      (_ : ∀ (m m' : M), smulRight f (m + m') = smulRight f m + smulRight f m') }\n                                  m) },\n                  map_add' :=\n                    (_ :\n                      ∀ (f f' : M₂ →ₗ[R] R),\n                        (fun f =>\n                              {\n                                toAddHom :=\n                                  { toFun := smulRight f,\n                                    map_add' :=\n                                      (_ : ∀ (m m' : M), smulRight f (m + m') = smulRight f m + smulRight f m') },\n                                map_smul' :=\n                                  (_ :\n                                    ∀ (c : R) (m : M),\n                                      AddHom.toFun\n                                          { toFun := smulRight f,\n                                            map_add' :=\n                                              (_ :\n                                                ∀ (m m' : M), smulRight f (m + m') = smulRight f m + smulRight f m') }\n                                          (c • m) =\n                                        ↑(RingHom.id R) c •\n                                          AddHom.toFun\n                                            { toFun := smulRight f,\n                                              map_add' :=\n                                                (_ :\n                                                  ∀ (m m' : M), smulRight f (m + m') = smulRight f m + smulRight f m') }\n                                            m) })\n                            (f + f') =\n                          (fun f =>\n                                {\n                                  toAddHom :=\n                                    { toFun := smulRight f,\n                                      map_add' :=\n                                        (_ : ∀ (m m' : M), smulRight f (m + m') = smulRight f m + smulRight f m') },\n                                  map_smul' :=\n                                    (_ :\n                                      ∀ (c : R) (m : M),\n                                        AddHom.toFun\n                                            { toFun := smulRight f,\n                                              map_add' :=\n                                                (_ :\n                                                  ∀ (m m' : M), smulRight f (m + m') = smulRight f m + smulRight f m') }\n                                            (c • m) =\n                                          ↑(RingHom.id R) c •\n                                            AddHom.toFun\n                                              { toFun := smulRight f,\n                                                map_add' :=\n                                                  (_ :\n                                                    ∀ (m m' : M),\n                                                      smulRight f (m + m') = smulRight f m + smulRight f m') }\n                                              m) })\n                              f +\n                            (fun f =>\n                                {\n                                  toAddHom :=\n                                    { toFun := smulRight f,\n                                      map_add' :=\n                                        (_ : ∀ (m m' : M), smulRight f (m + m') = smulRight f m + smulRight f m') },\n                                  map_smul' :=\n                                    (_ :\n                                      ∀ (c : R) (m : M),\n                                        AddHom.toFun\n                                            { toFun := smulRight f,\n                                              map_add' :=\n                                                (_ :\n                                                  ∀ (m m' : M), smulRight f (m + m') = smulRight f m + smulRight f m') }\n                                            (c • m) =\n                                          ↑(RingHom.id R) c •\n                                            AddHom.toFun\n                                              { toFun := smulRight f,\n                                                map_add' :=\n                                                  (_ :\n                                                    ∀ (m m' : M),\n                                                      smulRight f (m + m') = smulRight f m + smulRight f m') }\n                                              m) })\n                              f') }\n                f)\n          x✝¹)\n      x✝\n[PROOFSTEP]\napply mul_smul\n[GOAL]\nR✝ : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\nA : Type u_20\nB : Type u_21\nR : Type u_22\ninst✝³ : Semiring R\ninst✝² : AddCommMonoid A\ninst✝¹ : AddCommMonoid B\ninst✝ : Module R B\n⊢ ∀ (x y : A →+ B), AddMonoidHom.toNatLinearMap (x + y) = AddMonoidHom.toNatLinearMap x + AddMonoidHom.toNatLinearMap y\n[PROOFSTEP]\nintros\n[GOAL]\nR✝ : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\nA : Type u_20\nB : Type u_21\nR : Type u_22\ninst✝³ : Semiring R\ninst✝² : AddCommMonoid A\ninst✝¹ : AddCommMonoid B\ninst✝ : Module R B\nx✝ y✝ : A →+ B\n⊢ AddMonoidHom.toNatLinearMap (x✝ + y✝) = AddMonoidHom.toNatLinearMap x✝ + AddMonoidHom.toNatLinearMap y✝\n[PROOFSTEP]\next\n[GOAL]\ncase h\nR✝ : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\nA : Type u_20\nB : Type u_21\nR : Type u_22\ninst✝³ : Semiring R\ninst✝² : AddCommMonoid A\ninst✝¹ : AddCommMonoid B\ninst✝ : Module R B\nx✝¹ y✝ : A →+ B\nx✝ : A\n⊢ ↑(AddMonoidHom.toNatLinearMap (x✝¹ + y✝)) x✝ = ↑(AddMonoidHom.toNatLinearMap x✝¹ + AddMonoidHom.toNatLinearMap y✝) x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nR✝ : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\nA : Type u_20\nB : Type u_21\nR : Type u_22\ninst✝³ : Semiring R\ninst✝² : AddCommMonoid A\ninst✝¹ : AddCommMonoid B\ninst✝ : Module R B\n⊢ ∀ (r : R) (x : A →+ B),\n    AddHom.toFun\n        { toFun := AddMonoidHom.toNatLinearMap,\n          map_add' :=\n            (_ :\n              ∀ (x y : A →+ B),\n                AddMonoidHom.toNatLinearMap (x + y) = AddMonoidHom.toNatLinearMap x + AddMonoidHom.toNatLinearMap y) }\n        (r • x) =\n      ↑(RingHom.id R) r •\n        AddHom.toFun\n          { toFun := AddMonoidHom.toNatLinearMap,\n            map_add' :=\n              (_ :\n                ∀ (x y : A →+ B),\n                  AddMonoidHom.toNatLinearMap (x + y) = AddMonoidHom.toNatLinearMap x + AddMonoidHom.toNatLinearMap y) }\n          x\n[PROOFSTEP]\nintros\n[GOAL]\nR✝ : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\nA : Type u_20\nB : Type u_21\nR : Type u_22\ninst✝³ : Semiring R\ninst✝² : AddCommMonoid A\ninst✝¹ : AddCommMonoid B\ninst✝ : Module R B\nr✝ : R\nx✝ : A →+ B\n⊢ AddHom.toFun\n      { toFun := AddMonoidHom.toNatLinearMap,\n        map_add' :=\n          (_ :\n            ∀ (x y : A →+ B),\n              AddMonoidHom.toNatLinearMap (x + y) = AddMonoidHom.toNatLinearMap x + AddMonoidHom.toNatLinearMap y) }\n      (r✝ • x✝) =\n    ↑(RingHom.id R) r✝ •\n      AddHom.toFun\n        { toFun := AddMonoidHom.toNatLinearMap,\n          map_add' :=\n            (_ :\n              ∀ (x y : A →+ B),\n                AddMonoidHom.toNatLinearMap (x + y) = AddMonoidHom.toNatLinearMap x + AddMonoidHom.toNatLinearMap y) }\n        x✝\n[PROOFSTEP]\next\n[GOAL]\ncase h\nR✝ : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\nA : Type u_20\nB : Type u_21\nR : Type u_22\ninst✝³ : Semiring R\ninst✝² : AddCommMonoid A\ninst✝¹ : AddCommMonoid B\ninst✝ : Module R B\nr✝ : R\nx✝¹ : A →+ B\nx✝ : A\n⊢ ↑(AddHom.toFun\n          { toFun := AddMonoidHom.toNatLinearMap,\n            map_add' :=\n              (_ :\n                ∀ (x y : A →+ B),\n                  AddMonoidHom.toNatLinearMap (x + y) = AddMonoidHom.toNatLinearMap x + AddMonoidHom.toNatLinearMap y) }\n          (r✝ • x✝¹))\n      x✝ =\n    ↑(↑(RingHom.id R) r✝ •\n          AddHom.toFun\n            { toFun := AddMonoidHom.toNatLinearMap,\n              map_add' :=\n                (_ :\n                  ∀ (x y : A →+ B),\n                    AddMonoidHom.toNatLinearMap (x + y) =\n                      AddMonoidHom.toNatLinearMap x + AddMonoidHom.toNatLinearMap y) }\n            x✝¹)\n      x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nR✝ : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\nA : Type u_20\nB : Type u_21\nR : Type u_22\ninst✝³ : Semiring R\ninst✝² : AddCommMonoid A\ninst✝¹ : AddCommMonoid B\ninst✝ : Module R B\n⊢ LeftInverse LinearMap.toAddMonoidHom\n    {\n          toAddHom :=\n            { toFun := AddMonoidHom.toNatLinearMap,\n              map_add' :=\n                (_ :\n                  ∀ (x y : A →+ B),\n                    AddMonoidHom.toNatLinearMap (x + y) =\n                      AddMonoidHom.toNatLinearMap x + AddMonoidHom.toNatLinearMap y) },\n          map_smul' :=\n            (_ :\n              ∀ (r : R) (x : A →+ B),\n                AddHom.toFun\n                    { toFun := AddMonoidHom.toNatLinearMap,\n                      map_add' :=\n                        (_ :\n                          ∀ (x y : A →+ B),\n                            AddMonoidHom.toNatLinearMap (x + y) =\n                              AddMonoidHom.toNatLinearMap x + AddMonoidHom.toNatLinearMap y) }\n                    (r • x) =\n                  ↑(RingHom.id R) r •\n                    AddHom.toFun\n                      { toFun := AddMonoidHom.toNatLinearMap,\n                        map_add' :=\n                          (_ :\n                            ∀ (x y : A →+ B),\n                              AddMonoidHom.toNatLinearMap (x + y) =\n                                AddMonoidHom.toNatLinearMap x + AddMonoidHom.toNatLinearMap y) }\n                      x) }.toAddHom.toFun\n[PROOFSTEP]\nintro f\n[GOAL]\nR✝ : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\nA : Type u_20\nB : Type u_21\nR : Type u_22\ninst✝³ : Semiring R\ninst✝² : AddCommMonoid A\ninst✝¹ : AddCommMonoid B\ninst✝ : Module R B\nf : A →+ B\n⊢ LinearMap.toAddMonoidHom\n      (AddHom.toFun\n        {\n            toAddHom :=\n              { toFun := AddMonoidHom.toNatLinearMap,\n                map_add' :=\n                  (_ :\n                    ∀ (x y : A →+ B),\n                      AddMonoidHom.toNatLinearMap (x + y) =\n                        AddMonoidHom.toNatLinearMap x + AddMonoidHom.toNatLinearMap y) },\n            map_smul' :=\n              (_ :\n                ∀ (r : R) (x : A →+ B),\n                  AddHom.toFun\n                      { toFun := AddMonoidHom.toNatLinearMap,\n                        map_add' :=\n                          (_ :\n                            ∀ (x y : A →+ B),\n                              AddMonoidHom.toNatLinearMap (x + y) =\n                                AddMonoidHom.toNatLinearMap x + AddMonoidHom.toNatLinearMap y) }\n                      (r • x) =\n                    ↑(RingHom.id R) r •\n                      AddHom.toFun\n                        { toFun := AddMonoidHom.toNatLinearMap,\n                          map_add' :=\n                            (_ :\n                              ∀ (x y : A →+ B),\n                                AddMonoidHom.toNatLinearMap (x + y) =\n                                  AddMonoidHom.toNatLinearMap x + AddMonoidHom.toNatLinearMap y) }\n                        x) }.toAddHom\n        f) =\n    f\n[PROOFSTEP]\next\n[GOAL]\ncase h\nR✝ : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\nA : Type u_20\nB : Type u_21\nR : Type u_22\ninst✝³ : Semiring R\ninst✝² : AddCommMonoid A\ninst✝¹ : AddCommMonoid B\ninst✝ : Module R B\nf : A →+ B\nx✝ : A\n⊢ ↑(LinearMap.toAddMonoidHom\n          (AddHom.toFun\n            {\n                toAddHom :=\n                  { toFun := AddMonoidHom.toNatLinearMap,\n                    map_add' :=\n                      (_ :\n                        ∀ (x y : A →+ B),\n                          AddMonoidHom.toNatLinearMap (x + y) =\n                            AddMonoidHom.toNatLinearMap x + AddMonoidHom.toNatLinearMap y) },\n                map_smul' :=\n                  (_ :\n                    ∀ (r : R) (x : A →+ B),\n                      AddHom.toFun\n                          { toFun := AddMonoidHom.toNatLinearMap,\n                            map_add' :=\n                              (_ :\n                                ∀ (x y : A →+ B),\n                                  AddMonoidHom.toNatLinearMap (x + y) =\n                                    AddMonoidHom.toNatLinearMap x + AddMonoidHom.toNatLinearMap y) }\n                          (r • x) =\n                        ↑(RingHom.id R) r •\n                          AddHom.toFun\n                            { toFun := AddMonoidHom.toNatLinearMap,\n                              map_add' :=\n                                (_ :\n                                  ∀ (x y : A →+ B),\n                                    AddMonoidHom.toNatLinearMap (x + y) =\n                                      AddMonoidHom.toNatLinearMap x + AddMonoidHom.toNatLinearMap y) }\n                            x) }.toAddHom\n            f))\n      x✝ =\n    ↑f x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nR✝ : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\nA : Type u_20\nB : Type u_21\nR : Type u_22\ninst✝³ : Semiring R\ninst✝² : AddCommMonoid A\ninst✝¹ : AddCommMonoid B\ninst✝ : Module R B\n⊢ Function.RightInverse LinearMap.toAddMonoidHom\n    {\n          toAddHom :=\n            { toFun := AddMonoidHom.toNatLinearMap,\n              map_add' :=\n                (_ :\n                  ∀ (x y : A →+ B),\n                    AddMonoidHom.toNatLinearMap (x + y) =\n                      AddMonoidHom.toNatLinearMap x + AddMonoidHom.toNatLinearMap y) },\n          map_smul' :=\n            (_ :\n              ∀ (r : R) (x : A →+ B),\n                AddHom.toFun\n                    { toFun := AddMonoidHom.toNatLinearMap,\n                      map_add' :=\n                        (_ :\n                          ∀ (x y : A →+ B),\n                            AddMonoidHom.toNatLinearMap (x + y) =\n                              AddMonoidHom.toNatLinearMap x + AddMonoidHom.toNatLinearMap y) }\n                    (r • x) =\n                  ↑(RingHom.id R) r •\n                    AddHom.toFun\n                      { toFun := AddMonoidHom.toNatLinearMap,\n                        map_add' :=\n                          (_ :\n                            ∀ (x y : A →+ B),\n                              AddMonoidHom.toNatLinearMap (x + y) =\n                                AddMonoidHom.toNatLinearMap x + AddMonoidHom.toNatLinearMap y) }\n                      x) }.toAddHom.toFun\n[PROOFSTEP]\nintro f\n[GOAL]\nR✝ : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\nA : Type u_20\nB : Type u_21\nR : Type u_22\ninst✝³ : Semiring R\ninst✝² : AddCommMonoid A\ninst✝¹ : AddCommMonoid B\ninst✝ : Module R B\nf : A →ₗ[ℕ] B\n⊢ AddHom.toFun\n      {\n          toAddHom :=\n            { toFun := AddMonoidHom.toNatLinearMap,\n              map_add' :=\n                (_ :\n                  ∀ (x y : A →+ B),\n                    AddMonoidHom.toNatLinearMap (x + y) =\n                      AddMonoidHom.toNatLinearMap x + AddMonoidHom.toNatLinearMap y) },\n          map_smul' :=\n            (_ :\n              ∀ (r : R) (x : A →+ B),\n                AddHom.toFun\n                    { toFun := AddMonoidHom.toNatLinearMap,\n                      map_add' :=\n                        (_ :\n                          ∀ (x y : A →+ B),\n                            AddMonoidHom.toNatLinearMap (x + y) =\n                              AddMonoidHom.toNatLinearMap x + AddMonoidHom.toNatLinearMap y) }\n                    (r • x) =\n                  ↑(RingHom.id R) r •\n                    AddHom.toFun\n                      { toFun := AddMonoidHom.toNatLinearMap,\n                        map_add' :=\n                          (_ :\n                            ∀ (x y : A →+ B),\n                              AddMonoidHom.toNatLinearMap (x + y) =\n                                AddMonoidHom.toNatLinearMap x + AddMonoidHom.toNatLinearMap y) }\n                      x) }.toAddHom\n      (LinearMap.toAddMonoidHom f) =\n    f\n[PROOFSTEP]\next\n[GOAL]\ncase h\nR✝ : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\nA : Type u_20\nB : Type u_21\nR : Type u_22\ninst✝³ : Semiring R\ninst✝² : AddCommMonoid A\ninst✝¹ : AddCommMonoid B\ninst✝ : Module R B\nf : A →ₗ[ℕ] B\nx✝ : A\n⊢ ↑(AddHom.toFun\n          {\n              toAddHom :=\n                { toFun := AddMonoidHom.toNatLinearMap,\n                  map_add' :=\n                    (_ :\n                      ∀ (x y : A →+ B),\n                        AddMonoidHom.toNatLinearMap (x + y) =\n                          AddMonoidHom.toNatLinearMap x + AddMonoidHom.toNatLinearMap y) },\n              map_smul' :=\n                (_ :\n                  ∀ (r : R) (x : A →+ B),\n                    AddHom.toFun\n                        { toFun := AddMonoidHom.toNatLinearMap,\n                          map_add' :=\n                            (_ :\n                              ∀ (x y : A →+ B),\n                                AddMonoidHom.toNatLinearMap (x + y) =\n                                  AddMonoidHom.toNatLinearMap x + AddMonoidHom.toNatLinearMap y) }\n                        (r • x) =\n                      ↑(RingHom.id R) r •\n                        AddHom.toFun\n                          { toFun := AddMonoidHom.toNatLinearMap,\n                            map_add' :=\n                              (_ :\n                                ∀ (x y : A →+ B),\n                                  AddMonoidHom.toNatLinearMap (x + y) =\n                                    AddMonoidHom.toNatLinearMap x + AddMonoidHom.toNatLinearMap y) }\n                          x) }.toAddHom\n          (LinearMap.toAddMonoidHom f))\n      x✝ =\n    ↑f x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nR✝ : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\nA : Type u_20\nB : Type u_21\nR : Type u_22\ninst✝³ : Semiring R\ninst✝² : AddCommGroup A\ninst✝¹ : AddCommGroup B\ninst✝ : Module R B\n⊢ ∀ (x y : A →+ B), AddMonoidHom.toIntLinearMap (x + y) = AddMonoidHom.toIntLinearMap x + AddMonoidHom.toIntLinearMap y\n[PROOFSTEP]\nintros\n[GOAL]\nR✝ : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\nA : Type u_20\nB : Type u_21\nR : Type u_22\ninst✝³ : Semiring R\ninst✝² : AddCommGroup A\ninst✝¹ : AddCommGroup B\ninst✝ : Module R B\nx✝ y✝ : A →+ B\n⊢ AddMonoidHom.toIntLinearMap (x✝ + y✝) = AddMonoidHom.toIntLinearMap x✝ + AddMonoidHom.toIntLinearMap y✝\n[PROOFSTEP]\next\n[GOAL]\ncase h\nR✝ : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\nA : Type u_20\nB : Type u_21\nR : Type u_22\ninst✝³ : Semiring R\ninst✝² : AddCommGroup A\ninst✝¹ : AddCommGroup B\ninst✝ : Module R B\nx✝¹ y✝ : A →+ B\nx✝ : A\n⊢ ↑(AddMonoidHom.toIntLinearMap (x✝¹ + y✝)) x✝ = ↑(AddMonoidHom.toIntLinearMap x✝¹ + AddMonoidHom.toIntLinearMap y✝) x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nR✝ : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\nA : Type u_20\nB : Type u_21\nR : Type u_22\ninst✝³ : Semiring R\ninst✝² : AddCommGroup A\ninst✝¹ : AddCommGroup B\ninst✝ : Module R B\n⊢ ∀ (r : R) (x : A →+ B),\n    AddHom.toFun\n        { toFun := AddMonoidHom.toIntLinearMap,\n          map_add' :=\n            (_ :\n              ∀ (x y : A →+ B),\n                AddMonoidHom.toIntLinearMap (x + y) = AddMonoidHom.toIntLinearMap x + AddMonoidHom.toIntLinearMap y) }\n        (r • x) =\n      ↑(RingHom.id R) r •\n        AddHom.toFun\n          { toFun := AddMonoidHom.toIntLinearMap,\n            map_add' :=\n              (_ :\n                ∀ (x y : A →+ B),\n                  AddMonoidHom.toIntLinearMap (x + y) = AddMonoidHom.toIntLinearMap x + AddMonoidHom.toIntLinearMap y) }\n          x\n[PROOFSTEP]\nintros\n[GOAL]\nR✝ : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\nA : Type u_20\nB : Type u_21\nR : Type u_22\ninst✝³ : Semiring R\ninst✝² : AddCommGroup A\ninst✝¹ : AddCommGroup B\ninst✝ : Module R B\nr✝ : R\nx✝ : A →+ B\n⊢ AddHom.toFun\n      { toFun := AddMonoidHom.toIntLinearMap,\n        map_add' :=\n          (_ :\n            ∀ (x y : A →+ B),\n              AddMonoidHom.toIntLinearMap (x + y) = AddMonoidHom.toIntLinearMap x + AddMonoidHom.toIntLinearMap y) }\n      (r✝ • x✝) =\n    ↑(RingHom.id R) r✝ •\n      AddHom.toFun\n        { toFun := AddMonoidHom.toIntLinearMap,\n          map_add' :=\n            (_ :\n              ∀ (x y : A →+ B),\n                AddMonoidHom.toIntLinearMap (x + y) = AddMonoidHom.toIntLinearMap x + AddMonoidHom.toIntLinearMap y) }\n        x✝\n[PROOFSTEP]\next\n[GOAL]\ncase h\nR✝ : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\nA : Type u_20\nB : Type u_21\nR : Type u_22\ninst✝³ : Semiring R\ninst✝² : AddCommGroup A\ninst✝¹ : AddCommGroup B\ninst✝ : Module R B\nr✝ : R\nx✝¹ : A →+ B\nx✝ : A\n⊢ ↑(AddHom.toFun\n          { toFun := AddMonoidHom.toIntLinearMap,\n            map_add' :=\n              (_ :\n                ∀ (x y : A →+ B),\n                  AddMonoidHom.toIntLinearMap (x + y) = AddMonoidHom.toIntLinearMap x + AddMonoidHom.toIntLinearMap y) }\n          (r✝ • x✝¹))\n      x✝ =\n    ↑(↑(RingHom.id R) r✝ •\n          AddHom.toFun\n            { toFun := AddMonoidHom.toIntLinearMap,\n              map_add' :=\n                (_ :\n                  ∀ (x y : A →+ B),\n                    AddMonoidHom.toIntLinearMap (x + y) =\n                      AddMonoidHom.toIntLinearMap x + AddMonoidHom.toIntLinearMap y) }\n            x✝¹)\n      x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nR✝ : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\nA : Type u_20\nB : Type u_21\nR : Type u_22\ninst✝³ : Semiring R\ninst✝² : AddCommGroup A\ninst✝¹ : AddCommGroup B\ninst✝ : Module R B\n⊢ LeftInverse LinearMap.toAddMonoidHom\n    {\n          toAddHom :=\n            { toFun := AddMonoidHom.toIntLinearMap,\n              map_add' :=\n                (_ :\n                  ∀ (x y : A →+ B),\n                    AddMonoidHom.toIntLinearMap (x + y) =\n                      AddMonoidHom.toIntLinearMap x + AddMonoidHom.toIntLinearMap y) },\n          map_smul' :=\n            (_ :\n              ∀ (r : R) (x : A →+ B),\n                AddHom.toFun\n                    { toFun := AddMonoidHom.toIntLinearMap,\n                      map_add' :=\n                        (_ :\n                          ∀ (x y : A →+ B),\n                            AddMonoidHom.toIntLinearMap (x + y) =\n                              AddMonoidHom.toIntLinearMap x + AddMonoidHom.toIntLinearMap y) }\n                    (r • x) =\n                  ↑(RingHom.id R) r •\n                    AddHom.toFun\n                      { toFun := AddMonoidHom.toIntLinearMap,\n                        map_add' :=\n                          (_ :\n                            ∀ (x y : A →+ B),\n                              AddMonoidHom.toIntLinearMap (x + y) =\n                                AddMonoidHom.toIntLinearMap x + AddMonoidHom.toIntLinearMap y) }\n                      x) }.toAddHom.toFun\n[PROOFSTEP]\nintro f\n[GOAL]\nR✝ : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\nA : Type u_20\nB : Type u_21\nR : Type u_22\ninst✝³ : Semiring R\ninst✝² : AddCommGroup A\ninst✝¹ : AddCommGroup B\ninst✝ : Module R B\nf : A →+ B\n⊢ LinearMap.toAddMonoidHom\n      (AddHom.toFun\n        {\n            toAddHom :=\n              { toFun := AddMonoidHom.toIntLinearMap,\n                map_add' :=\n                  (_ :\n                    ∀ (x y : A →+ B),\n                      AddMonoidHom.toIntLinearMap (x + y) =\n                        AddMonoidHom.toIntLinearMap x + AddMonoidHom.toIntLinearMap y) },\n            map_smul' :=\n              (_ :\n                ∀ (r : R) (x : A →+ B),\n                  AddHom.toFun\n                      { toFun := AddMonoidHom.toIntLinearMap,\n                        map_add' :=\n                          (_ :\n                            ∀ (x y : A →+ B),\n                              AddMonoidHom.toIntLinearMap (x + y) =\n                                AddMonoidHom.toIntLinearMap x + AddMonoidHom.toIntLinearMap y) }\n                      (r • x) =\n                    ↑(RingHom.id R) r •\n                      AddHom.toFun\n                        { toFun := AddMonoidHom.toIntLinearMap,\n                          map_add' :=\n                            (_ :\n                              ∀ (x y : A →+ B),\n                                AddMonoidHom.toIntLinearMap (x + y) =\n                                  AddMonoidHom.toIntLinearMap x + AddMonoidHom.toIntLinearMap y) }\n                        x) }.toAddHom\n        f) =\n    f\n[PROOFSTEP]\next\n[GOAL]\ncase h\nR✝ : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\nA : Type u_20\nB : Type u_21\nR : Type u_22\ninst✝³ : Semiring R\ninst✝² : AddCommGroup A\ninst✝¹ : AddCommGroup B\ninst✝ : Module R B\nf : A →+ B\nx✝ : A\n⊢ ↑(LinearMap.toAddMonoidHom\n          (AddHom.toFun\n            {\n                toAddHom :=\n                  { toFun := AddMonoidHom.toIntLinearMap,\n                    map_add' :=\n                      (_ :\n                        ∀ (x y : A →+ B),\n                          AddMonoidHom.toIntLinearMap (x + y) =\n                            AddMonoidHom.toIntLinearMap x + AddMonoidHom.toIntLinearMap y) },\n                map_smul' :=\n                  (_ :\n                    ∀ (r : R) (x : A →+ B),\n                      AddHom.toFun\n                          { toFun := AddMonoidHom.toIntLinearMap,\n                            map_add' :=\n                              (_ :\n                                ∀ (x y : A →+ B),\n                                  AddMonoidHom.toIntLinearMap (x + y) =\n                                    AddMonoidHom.toIntLinearMap x + AddMonoidHom.toIntLinearMap y) }\n                          (r • x) =\n                        ↑(RingHom.id R) r •\n                          AddHom.toFun\n                            { toFun := AddMonoidHom.toIntLinearMap,\n                              map_add' :=\n                                (_ :\n                                  ∀ (x y : A →+ B),\n                                    AddMonoidHom.toIntLinearMap (x + y) =\n                                      AddMonoidHom.toIntLinearMap x + AddMonoidHom.toIntLinearMap y) }\n                            x) }.toAddHom\n            f))\n      x✝ =\n    ↑f x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nR✝ : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\nA : Type u_20\nB : Type u_21\nR : Type u_22\ninst✝³ : Semiring R\ninst✝² : AddCommGroup A\ninst✝¹ : AddCommGroup B\ninst✝ : Module R B\n⊢ Function.RightInverse LinearMap.toAddMonoidHom\n    {\n          toAddHom :=\n            { toFun := AddMonoidHom.toIntLinearMap,\n              map_add' :=\n                (_ :\n                  ∀ (x y : A →+ B),\n                    AddMonoidHom.toIntLinearMap (x + y) =\n                      AddMonoidHom.toIntLinearMap x + AddMonoidHom.toIntLinearMap y) },\n          map_smul' :=\n            (_ :\n              ∀ (r : R) (x : A →+ B),\n                AddHom.toFun\n                    { toFun := AddMonoidHom.toIntLinearMap,\n                      map_add' :=\n                        (_ :\n                          ∀ (x y : A →+ B),\n                            AddMonoidHom.toIntLinearMap (x + y) =\n                              AddMonoidHom.toIntLinearMap x + AddMonoidHom.toIntLinearMap y) }\n                    (r • x) =\n                  ↑(RingHom.id R) r •\n                    AddHom.toFun\n                      { toFun := AddMonoidHom.toIntLinearMap,\n                        map_add' :=\n                          (_ :\n                            ∀ (x y : A →+ B),\n                              AddMonoidHom.toIntLinearMap (x + y) =\n                                AddMonoidHom.toIntLinearMap x + AddMonoidHom.toIntLinearMap y) }\n                      x) }.toAddHom.toFun\n[PROOFSTEP]\nintro f\n[GOAL]\nR✝ : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\nA : Type u_20\nB : Type u_21\nR : Type u_22\ninst✝³ : Semiring R\ninst✝² : AddCommGroup A\ninst✝¹ : AddCommGroup B\ninst✝ : Module R B\nf : A →ₗ[ℤ] B\n⊢ AddHom.toFun\n      {\n          toAddHom :=\n            { toFun := AddMonoidHom.toIntLinearMap,\n              map_add' :=\n                (_ :\n                  ∀ (x y : A →+ B),\n                    AddMonoidHom.toIntLinearMap (x + y) =\n                      AddMonoidHom.toIntLinearMap x + AddMonoidHom.toIntLinearMap y) },\n          map_smul' :=\n            (_ :\n              ∀ (r : R) (x : A →+ B),\n                AddHom.toFun\n                    { toFun := AddMonoidHom.toIntLinearMap,\n                      map_add' :=\n                        (_ :\n                          ∀ (x y : A →+ B),\n                            AddMonoidHom.toIntLinearMap (x + y) =\n                              AddMonoidHom.toIntLinearMap x + AddMonoidHom.toIntLinearMap y) }\n                    (r • x) =\n                  ↑(RingHom.id R) r •\n                    AddHom.toFun\n                      { toFun := AddMonoidHom.toIntLinearMap,\n                        map_add' :=\n                          (_ :\n                            ∀ (x y : A →+ B),\n                              AddMonoidHom.toIntLinearMap (x + y) =\n                                AddMonoidHom.toIntLinearMap x + AddMonoidHom.toIntLinearMap y) }\n                      x) }.toAddHom\n      (LinearMap.toAddMonoidHom f) =\n    f\n[PROOFSTEP]\next\n[GOAL]\ncase h\nR✝ : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\nA : Type u_20\nB : Type u_21\nR : Type u_22\ninst✝³ : Semiring R\ninst✝² : AddCommGroup A\ninst✝¹ : AddCommGroup B\ninst✝ : Module R B\nf : A →ₗ[ℤ] B\nx✝ : A\n⊢ ↑(AddHom.toFun\n          {\n              toAddHom :=\n                { toFun := AddMonoidHom.toIntLinearMap,\n                  map_add' :=\n                    (_ :\n                      ∀ (x y : A →+ B),\n                        AddMonoidHom.toIntLinearMap (x + y) =\n                          AddMonoidHom.toIntLinearMap x + AddMonoidHom.toIntLinearMap y) },\n              map_smul' :=\n                (_ :\n                  ∀ (r : R) (x : A →+ B),\n                    AddHom.toFun\n                        { toFun := AddMonoidHom.toIntLinearMap,\n                          map_add' :=\n                            (_ :\n                              ∀ (x y : A →+ B),\n                                AddMonoidHom.toIntLinearMap (x + y) =\n                                  AddMonoidHom.toIntLinearMap x + AddMonoidHom.toIntLinearMap y) }\n                        (r • x) =\n                      ↑(RingHom.id R) r •\n                        AddHom.toFun\n                          { toFun := AddMonoidHom.toIntLinearMap,\n                            map_add' :=\n                              (_ :\n                                ∀ (x y : A →+ B),\n                                  AddMonoidHom.toIntLinearMap (x + y) =\n                                    AddMonoidHom.toIntLinearMap x + AddMonoidHom.toIntLinearMap y) }\n                          x) }.toAddHom\n          (LinearMap.toAddMonoidHom f))\n      x✝ =\n    ↑f x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹³ : Semiring R\ninst✝¹² : Semiring R₂\ninst✝¹¹ : Semiring R₃\ninst✝¹⁰ : AddCommMonoid M\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : Module R M\ninst✝⁵ : Module R M'\ninst✝⁴ : Module R₂ M₂\ninst✝³ : Module R₃ M₃\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\nσ₂₁ : R₂ →+* R\ninst✝² : RingHomInvPair σ₁₂ σ₂₁\ninst✝¹ : RingHomInvPair σ₂₁ σ₁₂\ninst✝ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\np✝ p' : Submodule R M\nq✝ q' : Submodule R₂ M₂\nq₁ q₁' : Submodule R M'\nr : R\nx y : M\np q : Submodule R M\nh : p ≤ q\n⊢ LinearMap.comp (Submodule.subtype q) (ofLe h) = Submodule.subtype p\n[PROOFSTEP]\next ⟨b, hb⟩\n[GOAL]\ncase h.mk\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹³ : Semiring R\ninst✝¹² : Semiring R₂\ninst✝¹¹ : Semiring R₃\ninst✝¹⁰ : AddCommMonoid M\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : Module R M\ninst✝⁵ : Module R M'\ninst✝⁴ : Module R₂ M₂\ninst✝³ : Module R₃ M₃\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\nσ₂₁ : R₂ →+* R\ninst✝² : RingHomInvPair σ₁₂ σ₂₁\ninst✝¹ : RingHomInvPair σ₂₁ σ₁₂\ninst✝ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\np✝ p' : Submodule R M\nq✝ q' : Submodule R₂ M₂\nq₁ q₁' : Submodule R M'\nr : R\nx y : M\np q : Submodule R M\nh : p ≤ q\nb : M\nhb : b ∈ p\n⊢ ↑(LinearMap.comp (Submodule.subtype q) (ofLe h)) { val := b, property := hb } =\n    ↑(Submodule.subtype p) { val := b, property := hb }\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹³ : Semiring R\ninst✝¹² : Semiring R₂\ninst✝¹¹ : Semiring R₃\ninst✝¹⁰ : AddCommMonoid M\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : Module R M\ninst✝⁵ : Module R M'\ninst✝⁴ : Module R₂ M₂\ninst✝³ : Module R₃ M₃\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\nσ₂₁ : R₂ →+* R\ninst✝² : RingHomInvPair σ₁₂ σ₂₁\ninst✝¹ : RingHomInvPair σ₂₁ σ₁₂\ninst✝ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\np p' : Submodule R M\nq q' : Submodule R₂ M₂\nq₁ q₁' : Submodule R M'\nr : R\nx y : M\n⊢ Subsingleton (Submodule R M) ↔ Subsingleton (AddSubmonoid M)\n[PROOFSTEP]\nrw [← subsingleton_iff_bot_eq_top, ← subsingleton_iff_bot_eq_top, ← toAddSubmonoid_eq]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹³ : Semiring R\ninst✝¹² : Semiring R₂\ninst✝¹¹ : Semiring R₃\ninst✝¹⁰ : AddCommMonoid M\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : Module R M\ninst✝⁵ : Module R M'\ninst✝⁴ : Module R₂ M₂\ninst✝³ : Module R₃ M₃\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\nσ₂₁ : R₂ →+* R\ninst✝² : RingHomInvPair σ₁₂ σ₂₁\ninst✝¹ : RingHomInvPair σ₂₁ σ₁₂\ninst✝ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\np p' : Submodule R M\nq q' : Submodule R₂ M₂\nq₁ q₁' : Submodule R M'\nr : R\nx y : M\n⊢ ⊥.toAddSubmonoid = ⊤.toAddSubmonoid ↔ ⊥ = ⊤\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁴ : Semiring R\ninst✝¹³ : Semiring R₂\ninst✝¹² : Semiring R₃\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : AddCommMonoid M₃\ninst✝⁸ : AddCommMonoid M'\ninst✝⁷ : Module R M\ninst✝⁶ : Module R M'\ninst✝⁵ : Module R₂ M₂\ninst✝⁴ : Module R₃ M₃\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\nσ₂₁ : R₂ →+* R\ninst✝³ : RingHomInvPair σ₁₂ σ₂₁\ninst✝² : RingHomInvPair σ₂₁ σ₁₂\ninst✝¹ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\np p' : Submodule R M\nq q' : Submodule R₂ M₂\nq₁ q₁' : Submodule R M'\nr : R\nx y : M\ninst✝ : Subsingleton R\n⊢ Unique (Submodule R M)\n[PROOFSTEP]\nhaveI := Module.subsingleton R M\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁴ : Semiring R\ninst✝¹³ : Semiring R₂\ninst✝¹² : Semiring R₃\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : AddCommMonoid M₃\ninst✝⁸ : AddCommMonoid M'\ninst✝⁷ : Module R M\ninst✝⁶ : Module R M'\ninst✝⁵ : Module R₂ M₂\ninst✝⁴ : Module R₃ M₃\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\nσ₂₁ : R₂ →+* R\ninst✝³ : RingHomInvPair σ₁₂ σ₂₁\ninst✝² : RingHomInvPair σ₂₁ σ₁₂\ninst✝¹ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\np p' : Submodule R M\nq q' : Submodule R₂ M₂\nq₁ q₁' : Submodule R M'\nr : R\nx y : M\ninst✝ : Subsingleton R\nthis : Subsingleton M\n⊢ Unique (Submodule R M)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁴ : Semiring R\ninst✝¹³ : Semiring R₂\ninst✝¹² : Semiring R₃\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : AddCommMonoid M₃\ninst✝⁸ : AddCommMonoid M'\ninst✝⁷ : Module R M\ninst✝⁶ : Module R M'\ninst✝⁵ : Module R₂ M₂\ninst✝⁴ : Module R₃ M₃\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\nσ₂₁ : R₂ →+* R\ninst✝³ : RingHomInvPair σ₁₂ σ₂₁\ninst✝² : RingHomInvPair σ₂₁ σ₁₂\ninst✝¹ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\np✝ p' : Submodule R M\nq q' : Submodule R₂ M₂\nq₁ q₁' : Submodule R M'\nr : R\nx y : M\ninst✝ : RingHomSurjective σ₁₂\nF : Type u_20\nsc : SemilinearMapClass F σ₁₂ M M₂\nf : F\np : Submodule R M\nsrc✝ : AddSubmonoid M₂ := AddSubmonoid.map f p.toAddSubmonoid\n⊢ ∀ (c : R₂) {x : M₂},\n    x ∈\n        {\n              toAddSubsemigroup :=\n                { carrier := ↑f '' ↑p,\n                  add_mem' := (_ : ∀ {a b : M₂}, a ∈ src✝.carrier → b ∈ src✝.carrier → a + b ∈ src✝.carrier) },\n              zero_mem' := (_ : 0 ∈ src✝.carrier) }.toAddSubsemigroup.carrier →\n      c • x ∈\n        {\n              toAddSubsemigroup :=\n                { carrier := ↑f '' ↑p,\n                  add_mem' := (_ : ∀ {a b : M₂}, a ∈ src✝.carrier → b ∈ src✝.carrier → a + b ∈ src✝.carrier) },\n              zero_mem' := (_ : 0 ∈ src✝.carrier) }.toAddSubsemigroup.carrier\n[PROOFSTEP]\nrintro c x ⟨y, hy, rfl⟩\n[GOAL]\ncase intro.intro\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁴ : Semiring R\ninst✝¹³ : Semiring R₂\ninst✝¹² : Semiring R₃\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : AddCommMonoid M₃\ninst✝⁸ : AddCommMonoid M'\ninst✝⁷ : Module R M\ninst✝⁶ : Module R M'\ninst✝⁵ : Module R₂ M₂\ninst✝⁴ : Module R₃ M₃\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\nσ₂₁ : R₂ →+* R\ninst✝³ : RingHomInvPair σ₁₂ σ₂₁\ninst✝² : RingHomInvPair σ₂₁ σ₁₂\ninst✝¹ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\np✝ p' : Submodule R M\nq q' : Submodule R₂ M₂\nq₁ q₁' : Submodule R M'\nr : R\nx y✝ : M\ninst✝ : RingHomSurjective σ₁₂\nF : Type u_20\nsc : SemilinearMapClass F σ₁₂ M M₂\nf : F\np : Submodule R M\nsrc✝ : AddSubmonoid M₂ := AddSubmonoid.map f p.toAddSubmonoid\nc : R₂\ny : M\nhy : y ∈ ↑p\n⊢ c • ↑f y ∈\n    {\n          toAddSubsemigroup :=\n            { carrier := ↑f '' ↑p,\n              add_mem' := (_ : ∀ {a b : M₂}, a ∈ src✝.carrier → b ∈ src✝.carrier → a + b ∈ src✝.carrier) },\n          zero_mem' := (_ : 0 ∈ src✝.carrier) }.toAddSubsemigroup.carrier\n[PROOFSTEP]\nobtain ⟨a, rfl⟩ := σ₁₂.surjective c\n[GOAL]\ncase intro.intro.intro\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁴ : Semiring R\ninst✝¹³ : Semiring R₂\ninst✝¹² : Semiring R₃\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : AddCommMonoid M₃\ninst✝⁸ : AddCommMonoid M'\ninst✝⁷ : Module R M\ninst✝⁶ : Module R M'\ninst✝⁵ : Module R₂ M₂\ninst✝⁴ : Module R₃ M₃\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\nσ₂₁ : R₂ →+* R\ninst✝³ : RingHomInvPair σ₁₂ σ₂₁\ninst✝² : RingHomInvPair σ₂₁ σ₁₂\ninst✝¹ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\np✝ p' : Submodule R M\nq q' : Submodule R₂ M₂\nq₁ q₁' : Submodule R M'\nr : R\nx y✝ : M\ninst✝ : RingHomSurjective σ₁₂\nF : Type u_20\nsc : SemilinearMapClass F σ₁₂ M M₂\nf : F\np : Submodule R M\nsrc✝ : AddSubmonoid M₂ := AddSubmonoid.map f p.toAddSubmonoid\ny : M\nhy : y ∈ ↑p\na : R\n⊢ ↑σ₁₂ a • ↑f y ∈\n    {\n          toAddSubsemigroup :=\n            { carrier := ↑f '' ↑p,\n              add_mem' := (_ : ∀ {a b : M₂}, a ∈ src✝.carrier → b ∈ src✝.carrier → a + b ∈ src✝.carrier) },\n          zero_mem' := (_ : 0 ∈ src✝.carrier) }.toAddSubsemigroup.carrier\n[PROOFSTEP]\nexact ⟨_, p.smul_mem a hy, map_smulₛₗ f _ _⟩\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁴ : Semiring R\ninst✝¹³ : Semiring R₂\ninst✝¹² : Semiring R₃\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : AddCommMonoid M₃\ninst✝⁸ : AddCommMonoid M'\ninst✝⁷ : Module R M\ninst✝⁶ : Module R M'\ninst✝⁵ : Module R₂ M₂\ninst✝⁴ : Module R₃ M₃\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\nσ₂₁ : R₂ →+* R\ninst✝³ : RingHomInvPair σ₁₂ σ₂₁\ninst✝² : RingHomInvPair σ₂₁ σ₁₂\ninst✝¹ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\np p' : Submodule R M\nq q' : Submodule R₂ M₂\nq₁ q₁' : Submodule R M'\nr : R\nx y : M\ninst✝ : RingHomSurjective σ₁₂\nF : Type u_20\nsc : SemilinearMapClass F σ₁₂ M M₂\na : M\n⊢ a ∈ map LinearMap.id p ↔ a ∈ p\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : Semiring R₂\ninst✝¹⁴ : Semiring R₃\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid M₂\ninst✝¹¹ : AddCommMonoid M₃\ninst✝¹⁰ : AddCommMonoid M'\ninst✝⁹ : Module R M\ninst✝⁸ : Module R M'\ninst✝⁷ : Module R₂ M₂\ninst✝⁶ : Module R₃ M₃\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\nσ₂₁ : R₂ →+* R\ninst✝⁵ : RingHomInvPair σ₁₂ σ₂₁\ninst✝⁴ : RingHomInvPair σ₂₁ σ₁₂\ninst✝³ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\np✝ p' : Submodule R M\nq q' : Submodule R₂ M₂\nq₁ q₁' : Submodule R M'\nr : R\nx y : M\ninst✝² : RingHomSurjective σ₁₂\nF : Type u_20\nsc : SemilinearMapClass F σ₁₂ M M₂\ninst✝¹ : RingHomSurjective σ₂₃\ninst✝ : RingHomSurjective σ₁₃\nf : M →ₛₗ[σ₁₂] M₂\ng : M₂ →ₛₗ[σ₂₃] M₃\np : Submodule R M\n⊢ ↑(map (LinearMap.comp g f) p) = ↑(map g (map f p))\n[PROOFSTEP]\nsimp only [← image_comp, map_coe, LinearMap.coe_comp, comp_apply]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁴ : Semiring R\ninst✝¹³ : Semiring R₂\ninst✝¹² : Semiring R₃\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : AddCommMonoid M₃\ninst✝⁸ : AddCommMonoid M'\ninst✝⁷ : Module R M\ninst✝⁶ : Module R M'\ninst✝⁵ : Module R₂ M₂\ninst✝⁴ : Module R₃ M₃\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\nσ₂₁ : R₂ →+* R\ninst✝³ : RingHomInvPair σ₁₂ σ₂₁\ninst✝² : RingHomInvPair σ₂₁ σ₁₂\ninst✝¹ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\np p' : Submodule R M\nq q' : Submodule R₂ M₂\nq₁ q₁' : Submodule R M'\nr : R\nx y : M\ninst✝ : RingHomSurjective σ₁₂\nF : Type u_20\nsc : SemilinearMapClass F σ₁₂ M M₂\nthis : ∃ x, x ∈ p\n⊢ ∀ (x : M₂), x ∈ map 0 p ↔ x ∈ ⊥\n[PROOFSTEP]\nsimp [this, eq_comm]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁴ : Semiring R\ninst✝¹³ : Semiring R₂\ninst✝¹² : Semiring R₃\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : AddCommMonoid M₃\ninst✝⁸ : AddCommMonoid M'\ninst✝⁷ : Module R M\ninst✝⁶ : Module R M'\ninst✝⁵ : Module R₂ M₂\ninst✝⁴ : Module R₃ M₃\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\nσ₂₁ : R₂ →+* R\ninst✝³ : RingHomInvPair σ₁₂ σ₂₁\ninst✝² : RingHomInvPair σ₂₁ σ₁₂\ninst✝¹ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\np p' : Submodule R M\nq q' : Submodule R₂ M₂\nq₁ q₁' : Submodule R M'\nr : R\nx y : M\ninst✝ : RingHomSurjective σ₁₂\nF : Type u_20\nsc : SemilinearMapClass F σ₁₂ M M₂\nf g : M →ₛₗ[σ₁₂] M₂\n⊢ map (f + g) p ≤ map f p ⊔ map g p\n[PROOFSTEP]\nrintro x ⟨m, hm, rfl⟩\n[GOAL]\ncase intro.intro\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁴ : Semiring R\ninst✝¹³ : Semiring R₂\ninst✝¹² : Semiring R₃\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : AddCommMonoid M₃\ninst✝⁸ : AddCommMonoid M'\ninst✝⁷ : Module R M\ninst✝⁶ : Module R M'\ninst✝⁵ : Module R₂ M₂\ninst✝⁴ : Module R₃ M₃\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\nσ₂₁ : R₂ →+* R\ninst✝³ : RingHomInvPair σ₁₂ σ₂₁\ninst✝² : RingHomInvPair σ₂₁ σ₁₂\ninst✝¹ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\np p' : Submodule R M\nq q' : Submodule R₂ M₂\nq₁ q₁' : Submodule R M'\nr : R\nx y : M\ninst✝ : RingHomSurjective σ₁₂\nF : Type u_20\nsc : SemilinearMapClass F σ₁₂ M M₂\nf g : M →ₛₗ[σ₁₂] M₂\nm : M\nhm : m ∈ ↑p\n⊢ ↑(f + g) m ∈ map f p ⊔ map g p\n[PROOFSTEP]\nexact add_mem_sup (mem_map_of_mem hm) (mem_map_of_mem hm)\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹³ : Semiring R\ninst✝¹² : Semiring R₂\ninst✝¹¹ : Semiring R₃\ninst✝¹⁰ : AddCommMonoid M\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : Module R M\ninst✝⁵ : Module R M'\ninst✝⁴ : Module R₂ M₂\ninst✝³ : Module R₃ M₃\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\nσ₂₁ : R₂ →+* R\ninst✝² : RingHomInvPair σ₁₂ σ₂₁\ninst✝¹ : RingHomInvPair σ₂₁ σ₁₂\ninst✝ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\np✝ p' : Submodule R M\nq q' : Submodule R₂ M₂\nq₁ q₁' : Submodule R M'\nr : R\nx y : M\nF : Type u_20\nsc : SemilinearMapClass F σ₁₂ M M₂\nf : F\ni : Injective ↑f\np : Submodule R M\nsrc✝ : ↑↑p ≃ ↑(↑f '' ↑p) := Equiv.Set.image (↑f) (↑p) i\n⊢ ∀ (x y : { x // x ∈ p }), Equiv.toFun src✝ (x + y) = Equiv.toFun src✝ x + Equiv.toFun src✝ y\n[PROOFSTEP]\nintros\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹³ : Semiring R\ninst✝¹² : Semiring R₂\ninst✝¹¹ : Semiring R₃\ninst✝¹⁰ : AddCommMonoid M\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : Module R M\ninst✝⁵ : Module R M'\ninst✝⁴ : Module R₂ M₂\ninst✝³ : Module R₃ M₃\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\nσ₂₁ : R₂ →+* R\ninst✝² : RingHomInvPair σ₁₂ σ₂₁\ninst✝¹ : RingHomInvPair σ₂₁ σ₁₂\ninst✝ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\np✝ p' : Submodule R M\nq q' : Submodule R₂ M₂\nq₁ q₁' : Submodule R M'\nr : R\nx y : M\nF : Type u_20\nsc : SemilinearMapClass F σ₁₂ M M₂\nf : F\ni : Injective ↑f\np : Submodule R M\nsrc✝ : ↑↑p ≃ ↑(↑f '' ↑p) := Equiv.Set.image (↑f) (↑p) i\nx✝ y✝ : { x // x ∈ p }\n⊢ Equiv.toFun src✝ (x✝ + y✝) = Equiv.toFun src✝ x✝ + Equiv.toFun src✝ y✝\n[PROOFSTEP]\nsimp only [coe_add, map_add, Equiv.toFun_as_coe, Equiv.Set.image_apply]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹³ : Semiring R\ninst✝¹² : Semiring R₂\ninst✝¹¹ : Semiring R₃\ninst✝¹⁰ : AddCommMonoid M\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : Module R M\ninst✝⁵ : Module R M'\ninst✝⁴ : Module R₂ M₂\ninst✝³ : Module R₃ M₃\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\nσ₂₁ : R₂ →+* R\ninst✝² : RingHomInvPair σ₁₂ σ₂₁\ninst✝¹ : RingHomInvPair σ₂₁ σ₁₂\ninst✝ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\np✝ p' : Submodule R M\nq q' : Submodule R₂ M₂\nq₁ q₁' : Submodule R M'\nr : R\nx y : M\nF : Type u_20\nsc : SemilinearMapClass F σ₁₂ M M₂\nf : F\ni : Injective ↑f\np : Submodule R M\nsrc✝ : ↑↑p ≃ ↑(↑f '' ↑p) := Equiv.Set.image (↑f) (↑p) i\nx✝ y✝ : { x // x ∈ p }\n⊢ { val := ↑f ↑x✝ + ↑f ↑y✝, property := (_ : (fun x => x ∈ ↑f '' ↑p) (↑f ↑x✝ + ↑f ↑y✝)) } =\n    { val := ↑f ↑x✝, property := (_ : ↑f ↑x✝ ∈ ↑f '' ↑p) } + { val := ↑f ↑y✝, property := (_ : ↑f ↑y✝ ∈ ↑f '' ↑p) }\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹³ : Semiring R\ninst✝¹² : Semiring R₂\ninst✝¹¹ : Semiring R₃\ninst✝¹⁰ : AddCommMonoid M\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : Module R M\ninst✝⁵ : Module R M'\ninst✝⁴ : Module R₂ M₂\ninst✝³ : Module R₃ M₃\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\nσ₂₁ : R₂ →+* R\ninst✝² : RingHomInvPair σ₁₂ σ₂₁\ninst✝¹ : RingHomInvPair σ₂₁ σ₁₂\ninst✝ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\np✝ p' : Submodule R M\nq q' : Submodule R₂ M₂\nq₁ q₁' : Submodule R M'\nr : R\nx y : M\nF : Type u_20\nsc : SemilinearMapClass F σ₁₂ M M₂\nf : F\ni : Injective ↑f\np : Submodule R M\nsrc✝ : ↑↑p ≃ ↑(↑f '' ↑p) := Equiv.Set.image (↑f) (↑p) i\n⊢ ∀ (r : R) (x : { x // x ∈ p }),\n    AddHom.toFun\n        { toFun := src✝.toFun,\n          map_add' :=\n            (_ : ∀ (x y : { x // x ∈ p }), Equiv.toFun src✝ (x + y) = Equiv.toFun src✝ x + Equiv.toFun src✝ y) }\n        (r • x) =\n      ↑σ₁₂ r •\n        AddHom.toFun\n          { toFun := src✝.toFun,\n            map_add' :=\n              (_ : ∀ (x y : { x // x ∈ p }), Equiv.toFun src✝ (x + y) = Equiv.toFun src✝ x + Equiv.toFun src✝ y) }\n          x\n[PROOFSTEP]\nintros\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹³ : Semiring R\ninst✝¹² : Semiring R₂\ninst✝¹¹ : Semiring R₃\ninst✝¹⁰ : AddCommMonoid M\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : Module R M\ninst✝⁵ : Module R M'\ninst✝⁴ : Module R₂ M₂\ninst✝³ : Module R₃ M₃\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\nσ₂₁ : R₂ →+* R\ninst✝² : RingHomInvPair σ₁₂ σ₂₁\ninst✝¹ : RingHomInvPair σ₂₁ σ₁₂\ninst✝ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\np✝ p' : Submodule R M\nq q' : Submodule R₂ M₂\nq₁ q₁' : Submodule R M'\nr : R\nx y : M\nF : Type u_20\nsc : SemilinearMapClass F σ₁₂ M M₂\nf : F\ni : Injective ↑f\np : Submodule R M\nsrc✝ : ↑↑p ≃ ↑(↑f '' ↑p) := Equiv.Set.image (↑f) (↑p) i\nr✝ : R\nx✝ : { x // x ∈ p }\n⊢ AddHom.toFun\n      { toFun := src✝.toFun,\n        map_add' := (_ : ∀ (x y : { x // x ∈ p }), Equiv.toFun src✝ (x + y) = Equiv.toFun src✝ x + Equiv.toFun src✝ y) }\n      (r✝ • x✝) =\n    ↑σ₁₂ r✝ •\n      AddHom.toFun\n        { toFun := src✝.toFun,\n          map_add' :=\n            (_ : ∀ (x y : { x // x ∈ p }), Equiv.toFun src✝ (x + y) = Equiv.toFun src✝ x + Equiv.toFun src✝ y) }\n        x✝\n[PROOFSTEP]\nsimp only [coe_smul_of_tower, map_smulₛₗ, Equiv.toFun_as_coe, Equiv.Set.image_apply]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹³ : Semiring R\ninst✝¹² : Semiring R₂\ninst✝¹¹ : Semiring R₃\ninst✝¹⁰ : AddCommMonoid M\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : Module R M\ninst✝⁵ : Module R M'\ninst✝⁴ : Module R₂ M₂\ninst✝³ : Module R₃ M₃\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\nσ₂₁ : R₂ →+* R\ninst✝² : RingHomInvPair σ₁₂ σ₂₁\ninst✝¹ : RingHomInvPair σ₂₁ σ₁₂\ninst✝ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\np✝ p' : Submodule R M\nq q' : Submodule R₂ M₂\nq₁ q₁' : Submodule R M'\nr : R\nx y : M\nF : Type u_20\nsc : SemilinearMapClass F σ₁₂ M M₂\nf : F\ni : Injective ↑f\np : Submodule R M\nsrc✝ : ↑↑p ≃ ↑(↑f '' ↑p) := Equiv.Set.image (↑f) (↑p) i\nr✝ : R\nx✝ : { x // x ∈ p }\n⊢ { val := ↑σ₁₂ r✝ • ↑f ↑x✝, property := (_ : (fun x => x ∈ ↑f '' ↑p) (↑σ₁₂ r✝ • ↑f ↑x✝)) } =\n    ↑σ₁₂ r✝ • { val := ↑f ↑x✝, property := (_ : ↑f ↑x✝ ∈ ↑f '' ↑p) }\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹³ : Semiring R\ninst✝¹² : Semiring R₂\ninst✝¹¹ : Semiring R₃\ninst✝¹⁰ : AddCommMonoid M\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : Module R M\ninst✝⁵ : Module R M'\ninst✝⁴ : Module R₂ M₂\ninst✝³ : Module R₃ M₃\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\nσ₂₁ : R₂ →+* R\ninst✝² : RingHomInvPair σ₁₂ σ₂₁\ninst✝¹ : RingHomInvPair σ₂₁ σ₁₂\ninst✝ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\np✝ p' : Submodule R M\nq q' : Submodule R₂ M₂\nq₁ q₁' : Submodule R M'\nr : R\nx✝ y : M\nF : Type u_20\nsc : SemilinearMapClass F σ₁₂ M M₂\nf : F\np : Submodule R₂ M₂\nsrc✝ : AddSubmonoid M := AddSubmonoid.comap f p.toAddSubmonoid\na : R\nx : M\nh :\n  x ∈\n    {\n          toAddSubsemigroup :=\n            { carrier := ↑f ⁻¹' ↑p,\n              add_mem' := (_ : ∀ {a b : M}, a ∈ src✝.carrier → b ∈ src✝.carrier → a + b ∈ src✝.carrier) },\n          zero_mem' := (_ : 0 ∈ src✝.carrier) }.toAddSubsemigroup.carrier\n⊢ a • x ∈\n    {\n          toAddSubsemigroup :=\n            { carrier := ↑f ⁻¹' ↑p,\n              add_mem' := (_ : ∀ {a b : M}, a ∈ src✝.carrier → b ∈ src✝.carrier → a + b ∈ src✝.carrier) },\n          zero_mem' := (_ : 0 ∈ src✝.carrier) }.toAddSubsemigroup.carrier\n[PROOFSTEP]\nsimp [p.smul_mem (σ₁₂ a) h]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹³ : Semiring R\ninst✝¹² : Semiring R₂\ninst✝¹¹ : Semiring R₃\ninst✝¹⁰ : AddCommMonoid M\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : Module R M\ninst✝⁵ : Module R M'\ninst✝⁴ : Module R₂ M₂\ninst✝³ : Module R₃ M₃\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\nσ₂₁ : R₂ →+* R\ninst✝² : RingHomInvPair σ₁₂ σ₂₁\ninst✝¹ : RingHomInvPair σ₂₁ σ₁₂\ninst✝ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\np✝ p' : Submodule R M\nq q' : Submodule R₂ M₂\nq₁ q₁' : Submodule R M'\nr : R\nx y : M\nF : Type u_20\nsc : SemilinearMapClass F σ₁₂ M M₂\np : Submodule R M\nf : M →ₗ[R] M\nh : p ≤ comap f p\nk : ℕ\n⊢ p ≤ comap (f ^ k) p\n[PROOFSTEP]\ninduction' k with k ih\n[GOAL]\ncase zero\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹³ : Semiring R\ninst✝¹² : Semiring R₂\ninst✝¹¹ : Semiring R₃\ninst✝¹⁰ : AddCommMonoid M\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : Module R M\ninst✝⁵ : Module R M'\ninst✝⁴ : Module R₂ M₂\ninst✝³ : Module R₃ M₃\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\nσ₂₁ : R₂ →+* R\ninst✝² : RingHomInvPair σ₁₂ σ₂₁\ninst✝¹ : RingHomInvPair σ₂₁ σ₁₂\ninst✝ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\np✝ p' : Submodule R M\nq q' : Submodule R₂ M₂\nq₁ q₁' : Submodule R M'\nr : R\nx y : M\nF : Type u_20\nsc : SemilinearMapClass F σ₁₂ M M₂\np : Submodule R M\nf : M →ₗ[R] M\nh : p ≤ comap f p\n⊢ p ≤ comap (f ^ Nat.zero) p\n[PROOFSTEP]\nsimp [LinearMap.one_eq_id]\n[GOAL]\ncase succ\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹³ : Semiring R\ninst✝¹² : Semiring R₂\ninst✝¹¹ : Semiring R₃\ninst✝¹⁰ : AddCommMonoid M\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : Module R M\ninst✝⁵ : Module R M'\ninst✝⁴ : Module R₂ M₂\ninst✝³ : Module R₃ M₃\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\nσ₂₁ : R₂ →+* R\ninst✝² : RingHomInvPair σ₁₂ σ₂₁\ninst✝¹ : RingHomInvPair σ₂₁ σ₁₂\ninst✝ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\np✝ p' : Submodule R M\nq q' : Submodule R₂ M₂\nq₁ q₁' : Submodule R M'\nr : R\nx y : M\nF : Type u_20\nsc : SemilinearMapClass F σ₁₂ M M₂\np : Submodule R M\nf : M →ₗ[R] M\nh : p ≤ comap f p\nk : ℕ\nih : p ≤ comap (f ^ k) p\n⊢ p ≤ comap (f ^ Nat.succ k) p\n[PROOFSTEP]\nsimp [LinearMap.iterate_succ, comap_comp, h.trans (comap_mono ih)]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹³ : Semiring R\ninst✝¹² : Semiring R₂\ninst✝¹¹ : Semiring R₃\ninst✝¹⁰ : AddCommMonoid M\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : Module R M\ninst✝⁵ : Module R M'\ninst✝⁴ : Module R₂ M₂\ninst✝³ : Module R₃ M₃\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\nσ₂₁ : R₂ →+* R\ninst✝² : RingHomInvPair σ₁₂ σ₂₁\ninst✝¹ : RingHomInvPair σ₂₁ σ₁₂\ninst✝ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\np p' : Submodule R M\nq q' : Submodule R₂ M₂\nq₁ q₁' : Submodule R M'\nr : R\nx y : M\nF : Type u_20\nsc : SemilinearMapClass F σ₁₂ M M₂\n⊢ ∀ (x : M), x ∈ comap 0 q ↔ x ∈ ⊤\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS✝ : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁴ : Semiring R\ninst✝¹³ : Semiring R₂\ninst✝¹² : Semiring R₃\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : AddCommMonoid M₃\ninst✝⁸ : AddCommMonoid M'\ninst✝⁷ : Module R M\ninst✝⁶ : Module R M'\ninst✝⁵ : Module R₂ M₂\ninst✝⁴ : Module R₃ M₃\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\nσ₂₁ : R₂ →+* R\ninst✝³ : RingHomInvPair σ₁₂ σ₂₁\ninst✝² : RingHomInvPair σ₂₁ σ₁₂\ninst✝¹ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\np p' : Submodule R M\nq q' : Submodule R₂ M₂\nq₁ q₁' : Submodule R M'\nr : R\nx✝ y : M\nF : Type u_20\nsc : SemilinearMapClass F σ₁₂ M M₂\nf : F\nhf : Surjective ↑f\ninst✝ : RingHomSurjective σ₁₂\nS : Submodule R₂ M₂\nx : M₂\nhx : x ∈ S\n⊢ x ∈ map f (comap f S)\n[PROOFSTEP]\nrcases hf x with ⟨y, rfl⟩\n[GOAL]\ncase intro\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS✝ : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁴ : Semiring R\ninst✝¹³ : Semiring R₂\ninst✝¹² : Semiring R₃\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : AddCommMonoid M₃\ninst✝⁸ : AddCommMonoid M'\ninst✝⁷ : Module R M\ninst✝⁶ : Module R M'\ninst✝⁵ : Module R₂ M₂\ninst✝⁴ : Module R₃ M₃\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\nσ₂₁ : R₂ →+* R\ninst✝³ : RingHomInvPair σ₁₂ σ₂₁\ninst✝² : RingHomInvPair σ₂₁ σ₁₂\ninst✝¹ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\np p' : Submodule R M\nq q' : Submodule R₂ M₂\nq₁ q₁' : Submodule R M'\nr : R\nx y✝ : M\nF : Type u_20\nsc : SemilinearMapClass F σ₁₂ M M₂\nf : F\nhf : Surjective ↑f\ninst✝ : RingHomSurjective σ₁₂\nS : Submodule R₂ M₂\ny : M\nhx : ↑f y ∈ S\n⊢ ↑f y ∈ map f (comap f S)\n[PROOFSTEP]\nsimp only [mem_map, mem_comap]\n[GOAL]\ncase intro\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS✝ : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁴ : Semiring R\ninst✝¹³ : Semiring R₂\ninst✝¹² : Semiring R₃\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : AddCommMonoid M₃\ninst✝⁸ : AddCommMonoid M'\ninst✝⁷ : Module R M\ninst✝⁶ : Module R M'\ninst✝⁵ : Module R₂ M₂\ninst✝⁴ : Module R₃ M₃\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\nσ₂₁ : R₂ →+* R\ninst✝³ : RingHomInvPair σ₁₂ σ₂₁\ninst✝² : RingHomInvPair σ₂₁ σ₁₂\ninst✝¹ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\np p' : Submodule R M\nq q' : Submodule R₂ M₂\nq₁ q₁' : Submodule R M'\nr : R\nx y✝ : M\nF : Type u_20\nsc : SemilinearMapClass F σ₁₂ M M₂\nf : F\nhf : Surjective ↑f\ninst✝ : RingHomSurjective σ₁₂\nS : Submodule R₂ M₂\ny : M\nhx : ↑f y ∈ S\n⊢ ∃ y_1, ↑f y_1 ∈ S ∧ ↑f y_1 = ↑f y\n[PROOFSTEP]\nexact ⟨y, hx, rfl⟩\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS✝ : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁴ : Semiring R\ninst✝¹³ : Semiring R₂\ninst✝¹² : Semiring R₃\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : AddCommMonoid M₃\ninst✝⁸ : AddCommMonoid M'\ninst✝⁷ : Module R M\ninst✝⁶ : Module R M'\ninst✝⁵ : Module R₂ M₂\ninst✝⁴ : Module R₃ M₃\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\nσ₂₁ : R₂ →+* R\ninst✝³ : RingHomInvPair σ₁₂ σ₂₁\ninst✝² : RingHomInvPair σ₂₁ σ₁₂\ninst✝¹ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\np p' : Submodule R M\nq q' : Submodule R₂ M₂\nq₁ q₁' : Submodule R M'\nr : R\nx✝ y : M\nF : Type u_20\nsc : SemilinearMapClass F σ₁₂ M M₂\ninst✝ : RingHomSurjective σ₁₂\nf : F\nhf : Injective ↑f\nS : Submodule R M\nx : M\n⊢ x ∈ comap f (map f S) → x ∈ S\n[PROOFSTEP]\nsimp [mem_comap, mem_map, forall_exists_index, and_imp]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS✝ : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁴ : Semiring R\ninst✝¹³ : Semiring R₂\ninst✝¹² : Semiring R₃\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : AddCommMonoid M₃\ninst✝⁸ : AddCommMonoid M'\ninst✝⁷ : Module R M\ninst✝⁶ : Module R M'\ninst✝⁵ : Module R₂ M₂\ninst✝⁴ : Module R₃ M₃\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\nσ₂₁ : R₂ →+* R\ninst✝³ : RingHomInvPair σ₁₂ σ₂₁\ninst✝² : RingHomInvPair σ₂₁ σ₁₂\ninst✝¹ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\np p' : Submodule R M\nq q' : Submodule R₂ M₂\nq₁ q₁' : Submodule R M'\nr : R\nx✝ y : M\nF : Type u_20\nsc : SemilinearMapClass F σ₁₂ M M₂\ninst✝ : RingHomSurjective σ₁₂\nf : F\nhf : Injective ↑f\nS : Submodule R M\nx : M\n⊢ ∀ (x_1 : M), x_1 ∈ S → ↑f x_1 = ↑f x → x ∈ S\n[PROOFSTEP]\nintro y hy hxy\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS✝ : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁴ : Semiring R\ninst✝¹³ : Semiring R₂\ninst✝¹² : Semiring R₃\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : AddCommMonoid M₃\ninst✝⁸ : AddCommMonoid M'\ninst✝⁷ : Module R M\ninst✝⁶ : Module R M'\ninst✝⁵ : Module R₂ M₂\ninst✝⁴ : Module R₃ M₃\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\nσ₂₁ : R₂ →+* R\ninst✝³ : RingHomInvPair σ₁₂ σ₂₁\ninst✝² : RingHomInvPair σ₂₁ σ₁₂\ninst✝¹ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\np p' : Submodule R M\nq q' : Submodule R₂ M₂\nq₁ q₁' : Submodule R M'\nr : R\nx✝ y✝ : M\nF : Type u_20\nsc : SemilinearMapClass F σ₁₂ M M₂\ninst✝ : RingHomSurjective σ₁₂\nf : F\nhf : Injective ↑f\nS : Submodule R M\nx y : M\nhy : y ∈ S\nhxy : ↑f y = ↑f x\n⊢ x ∈ S\n[PROOFSTEP]\nrw [hf.eq_iff] at hxy \n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS✝ : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁴ : Semiring R\ninst✝¹³ : Semiring R₂\ninst✝¹² : Semiring R₃\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : AddCommMonoid M₃\ninst✝⁸ : AddCommMonoid M'\ninst✝⁷ : Module R M\ninst✝⁶ : Module R M'\ninst✝⁵ : Module R₂ M₂\ninst✝⁴ : Module R₃ M₃\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\nσ₂₁ : R₂ →+* R\ninst✝³ : RingHomInvPair σ₁₂ σ₂₁\ninst✝² : RingHomInvPair σ₂₁ σ₁₂\ninst✝¹ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\np p' : Submodule R M\nq q' : Submodule R₂ M₂\nq₁ q₁' : Submodule R M'\nr : R\nx✝ y✝ : M\nF : Type u_20\nsc : SemilinearMapClass F σ₁₂ M M₂\ninst✝ : RingHomSurjective σ₁₂\nf : F\nhf : Injective ↑f\nS : Submodule R M\nx y : M\nhy : y ∈ S\nhxy : y = x\n⊢ x ∈ S\n[PROOFSTEP]\nrwa [← hxy]\n[GOAL]\nF : Type u_20\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁴ : Semiring R\ninst✝¹³ : Semiring R₂\ninst✝¹² : Semiring R₃\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : AddCommMonoid M₃\ninst✝⁸ : AddCommMonoid M'\ninst✝⁷ : Module R M\ninst✝⁶ : Module R M'\ninst✝⁵ : Module R₂ M₂\ninst✝⁴ : Module R₃ M₃\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\nσ₂₁ : R₂ →+* R\ninst✝³ : RingHomInvPair σ₁₂ σ₂₁\ninst✝² : RingHomInvPair σ₂₁ σ₁₂\ninst✝¹ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\np✝ p'✝ : Submodule R M\nq q' : Submodule R₂ M₂\nq₁ q₁' : Submodule R M'\nr : R\nx y : M\nsc : SemilinearMapClass F σ₁₂ M M₂\ninst✝ : RingHomSurjective σ₁₂\nf : F\np : Submodule R M\np' : Submodule R₂ M₂\n⊢ map f p ⊓ p' ≤ map f (p ⊓ comap f p')\n[PROOFSTEP]\nrintro _ ⟨⟨x, h₁, rfl⟩, h₂⟩\n[GOAL]\ncase intro.intro.intro\nF : Type u_20\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁴ : Semiring R\ninst✝¹³ : Semiring R₂\ninst✝¹² : Semiring R₃\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : AddCommMonoid M₃\ninst✝⁸ : AddCommMonoid M'\ninst✝⁷ : Module R M\ninst✝⁶ : Module R M'\ninst✝⁵ : Module R₂ M₂\ninst✝⁴ : Module R₃ M₃\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\nσ₂₁ : R₂ →+* R\ninst✝³ : RingHomInvPair σ₁₂ σ₂₁\ninst✝² : RingHomInvPair σ₂₁ σ₁₂\ninst✝¹ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\np✝ p'✝ : Submodule R M\nq q' : Submodule R₂ M₂\nq₁ q₁' : Submodule R M'\nr : R\nx✝ y : M\nsc : SemilinearMapClass F σ₁₂ M M₂\ninst✝ : RingHomSurjective σ₁₂\nf : F\np : Submodule R M\np' : Submodule R₂ M₂\nx : M\nh₁ : x ∈ ↑p\nh₂ : ↑f x ∈ ↑p'\n⊢ ↑f x ∈ map f (p ⊓ comap f p')\n[PROOFSTEP]\nexact ⟨_, ⟨h₁, h₂⟩, rfl⟩\n[GOAL]\nF : Type ?u.972060\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹³ : Semiring R\ninst✝¹² : Semiring R₂\ninst✝¹¹ : Semiring R₃\ninst✝¹⁰ : AddCommMonoid M\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : Module R M\ninst✝⁵ : Module R M'\ninst✝⁴ : Module R₂ M₂\ninst✝³ : Module R₃ M₃\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\nσ₂₁ : R₂ →+* R\ninst✝² : RingHomInvPair σ₁₂ σ₂₁\ninst✝¹ : RingHomInvPair σ₂₁ σ₁₂\ninst✝ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\np p' : Submodule R M\nq q' : Submodule R₂ M₂\nq₁ q₁' : Submodule R M'\nr : R\nx✝ y : M\nsc : SemilinearMapClass F σ₁₂ M M₂\nx : M\n⊢ x ∈ map (Submodule.subtype p) (comap (Submodule.subtype p) p') → x ∈ p ⊓ p'\n[PROOFSTEP]\nrintro ⟨⟨_, h₁⟩, h₂, rfl⟩\n[GOAL]\ncase intro.mk.intro\nF : Type ?u.972060\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹³ : Semiring R\ninst✝¹² : Semiring R₂\ninst✝¹¹ : Semiring R₃\ninst✝¹⁰ : AddCommMonoid M\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : AddCommMonoid M₃\ninst✝⁷ : AddCommMonoid M'\ninst✝⁶ : Module R M\ninst✝⁵ : Module R M'\ninst✝⁴ : Module R₂ M₂\ninst✝³ : Module R₃ M₃\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\nσ₂₁ : R₂ →+* R\ninst✝² : RingHomInvPair σ₁₂ σ₂₁\ninst✝¹ : RingHomInvPair σ₂₁ σ₁₂\ninst✝ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\np p' : Submodule R M\nq q' : Submodule R₂ M₂\nq₁ q₁' : Submodule R M'\nr : R\nx y : M\nsc : SemilinearMapClass F σ₁₂ M M₂\nval✝ : M\nh₁ : val✝ ∈ p\nh₂ : { val := val✝, property := h₁ } ∈ ↑(comap (Submodule.subtype p) p')\n⊢ ↑(Submodule.subtype p) { val := val✝, property := h₁ } ∈ p ⊓ p'\n[PROOFSTEP]\nexact ⟨h₁, h₂⟩\n[GOAL]\nF : Type ?u.976655\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι✝ : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁴ : Semiring R\ninst✝¹³ : Semiring R₂\ninst✝¹² : Semiring R₃\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : AddCommMonoid M₃\ninst✝⁸ : AddCommMonoid M'\ninst✝⁷ : Module R M\ninst✝⁶ : Module R M'\ninst✝⁵ : Module R₂ M₂\ninst✝⁴ : Module R₃ M₃\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\nσ₂₁ : R₂ →+* R\ninst✝³ : RingHomInvPair σ₁₂ σ₂₁\ninst✝² : RingHomInvPair σ₂₁ σ₁₂\ninst✝¹ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\np✝ p' : Submodule R M\nq q' : Submodule R₂ M₂\nq₁ q₁' : Submodule R M'\nr : R\nx y : M\nsc : SemilinearMapClass F σ₁₂ M M₂\nσ : R →+* R\ninst✝ : RingHomSurjective σ\nι : Sort u_20\nf : M →ₛₗ[σ] M\np : ι → Submodule R M\nhf : ∀ (i : ι) (v : M), v ∈ p i → ↑f v ∈ p i\n⊢ ∀ (v : M), v ∈ iInf p → ↑f v ∈ iInf p\n[PROOFSTEP]\nhave : ∀ i, (p i).map f ≤ p i := by\n  rintro i - ⟨v, hv, rfl⟩\n  exact hf i v hv\n[GOAL]\nF : Type ?u.976655\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι✝ : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁴ : Semiring R\ninst✝¹³ : Semiring R₂\ninst✝¹² : Semiring R₃\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : AddCommMonoid M₃\ninst✝⁸ : AddCommMonoid M'\ninst✝⁷ : Module R M\ninst✝⁶ : Module R M'\ninst✝⁵ : Module R₂ M₂\ninst✝⁴ : Module R₃ M₃\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\nσ₂₁ : R₂ →+* R\ninst✝³ : RingHomInvPair σ₁₂ σ₂₁\ninst✝² : RingHomInvPair σ₂₁ σ₁₂\ninst✝¹ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\np✝ p' : Submodule R M\nq q' : Submodule R₂ M₂\nq₁ q₁' : Submodule R M'\nr : R\nx y : M\nsc : SemilinearMapClass F σ₁₂ M M₂\nσ : R →+* R\ninst✝ : RingHomSurjective σ\nι : Sort u_20\nf : M →ₛₗ[σ] M\np : ι → Submodule R M\nhf : ∀ (i : ι) (v : M), v ∈ p i → ↑f v ∈ p i\n⊢ ∀ (i : ι), map f (p i) ≤ p i\n[PROOFSTEP]\nrintro i - ⟨v, hv, rfl⟩\n[GOAL]\ncase intro.intro\nF : Type ?u.976655\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι✝ : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁴ : Semiring R\ninst✝¹³ : Semiring R₂\ninst✝¹² : Semiring R₃\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : AddCommMonoid M₃\ninst✝⁸ : AddCommMonoid M'\ninst✝⁷ : Module R M\ninst✝⁶ : Module R M'\ninst✝⁵ : Module R₂ M₂\ninst✝⁴ : Module R₃ M₃\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\nσ₂₁ : R₂ →+* R\ninst✝³ : RingHomInvPair σ₁₂ σ₂₁\ninst✝² : RingHomInvPair σ₂₁ σ₁₂\ninst✝¹ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\np✝ p' : Submodule R M\nq q' : Submodule R₂ M₂\nq₁ q₁' : Submodule R M'\nr : R\nx y : M\nsc : SemilinearMapClass F σ₁₂ M M₂\nσ : R →+* R\ninst✝ : RingHomSurjective σ\nι : Sort u_20\nf : M →ₛₗ[σ] M\np : ι → Submodule R M\nhf : ∀ (i : ι) (v : M), v ∈ p i → ↑f v ∈ p i\ni : ι\nv : M\nhv : v ∈ ↑(p i)\n⊢ ↑f v ∈ p i\n[PROOFSTEP]\nexact hf i v hv\n[GOAL]\nF : Type ?u.976655\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι✝ : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁴ : Semiring R\ninst✝¹³ : Semiring R₂\ninst✝¹² : Semiring R₃\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : AddCommMonoid M₃\ninst✝⁸ : AddCommMonoid M'\ninst✝⁷ : Module R M\ninst✝⁶ : Module R M'\ninst✝⁵ : Module R₂ M₂\ninst✝⁴ : Module R₃ M₃\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\nσ₂₁ : R₂ →+* R\ninst✝³ : RingHomInvPair σ₁₂ σ₂₁\ninst✝² : RingHomInvPair σ₂₁ σ₁₂\ninst✝¹ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\np✝ p' : Submodule R M\nq q' : Submodule R₂ M₂\nq₁ q₁' : Submodule R M'\nr : R\nx y : M\nsc : SemilinearMapClass F σ₁₂ M M₂\nσ : R →+* R\ninst✝ : RingHomSurjective σ\nι : Sort u_20\nf : M →ₛₗ[σ] M\np : ι → Submodule R M\nhf : ∀ (i : ι) (v : M), v ∈ p i → ↑f v ∈ p i\nthis : ∀ (i : ι), map f (p i) ≤ p i\n⊢ ∀ (v : M), v ∈ iInf p → ↑f v ∈ iInf p\n[PROOFSTEP]\nsuffices (iInf p).map f ≤ iInf p by exact fun v hv => this ⟨v, hv, rfl⟩\n[GOAL]\nF : Type ?u.976655\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι✝ : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁴ : Semiring R\ninst✝¹³ : Semiring R₂\ninst✝¹² : Semiring R₃\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : AddCommMonoid M₃\ninst✝⁸ : AddCommMonoid M'\ninst✝⁷ : Module R M\ninst✝⁶ : Module R M'\ninst✝⁵ : Module R₂ M₂\ninst✝⁴ : Module R₃ M₃\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\nσ₂₁ : R₂ →+* R\ninst✝³ : RingHomInvPair σ₁₂ σ₂₁\ninst✝² : RingHomInvPair σ₂₁ σ₁₂\ninst✝¹ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\np✝ p' : Submodule R M\nq q' : Submodule R₂ M₂\nq₁ q₁' : Submodule R M'\nr : R\nx y : M\nsc : SemilinearMapClass F σ₁₂ M M₂\nσ : R →+* R\ninst✝ : RingHomSurjective σ\nι : Sort u_20\nf : M →ₛₗ[σ] M\np : ι → Submodule R M\nhf : ∀ (i : ι) (v : M), v ∈ p i → ↑f v ∈ p i\nthis✝ : ∀ (i : ι), map f (p i) ≤ p i\nthis : map f (iInf p) ≤ iInf p\n⊢ ∀ (v : M), v ∈ iInf p → ↑f v ∈ iInf p\n[PROOFSTEP]\nexact fun v hv => this ⟨v, hv, rfl⟩\n[GOAL]\nF : Type ?u.976655\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι✝ : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁴ : Semiring R\ninst✝¹³ : Semiring R₂\ninst✝¹² : Semiring R₃\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : AddCommMonoid M₃\ninst✝⁸ : AddCommMonoid M'\ninst✝⁷ : Module R M\ninst✝⁶ : Module R M'\ninst✝⁵ : Module R₂ M₂\ninst✝⁴ : Module R₃ M₃\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\nσ₂₁ : R₂ →+* R\ninst✝³ : RingHomInvPair σ₁₂ σ₂₁\ninst✝² : RingHomInvPair σ₂₁ σ₁₂\ninst✝¹ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\np✝ p' : Submodule R M\nq q' : Submodule R₂ M₂\nq₁ q₁' : Submodule R M'\nr : R\nx y : M\nsc : SemilinearMapClass F σ₁₂ M M₂\nσ : R →+* R\ninst✝ : RingHomSurjective σ\nι : Sort u_20\nf : M →ₛₗ[σ] M\np : ι → Submodule R M\nhf : ∀ (i : ι) (v : M), v ∈ p i → ↑f v ∈ p i\nthis : ∀ (i : ι), map f (p i) ≤ p i\n⊢ map f (iInf p) ≤ iInf p\n[PROOFSTEP]\nexact le_iInf fun i => (Submodule.map_mono (iInf_le p i)).trans (this i)\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝⁴ : Semifield K\ninst✝³ : AddCommMonoid V\ninst✝² : Module K V\ninst✝¹ : AddCommMonoid V₂\ninst✝ : Module K V₂\nf : V →ₗ[K] V₂\np : Submodule K V₂\na : K\nh : a ≠ 0\n⊢ comap (a • f) p = comap f p\n[PROOFSTEP]\next b\n[GOAL]\ncase h\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝⁴ : Semifield K\ninst✝³ : AddCommMonoid V\ninst✝² : Module K V\ninst✝¹ : AddCommMonoid V₂\ninst✝ : Module K V₂\nf : V →ₗ[K] V₂\np : Submodule K V₂\na : K\nh : a ≠ 0\nb : V\n⊢ b ∈ comap (a • f) p ↔ b ∈ comap f p\n[PROOFSTEP]\nsimp only [Submodule.mem_comap, p.smul_mem_iff h, LinearMap.smul_apply]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝⁴ : Semifield K\ninst✝³ : AddCommMonoid V\ninst✝² : Module K V\ninst✝¹ : AddCommMonoid V₂\ninst✝ : Module K V₂\nf : V →ₗ[K] V₂\np : Submodule K V\na : K\nh : a ≠ 0\n⊢ map (a • f) p ≤ map f p\n[PROOFSTEP]\nrw [map_le_iff_le_comap, comap_smul f _ a h, ← map_le_iff_le_comap]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝⁴ : Semifield K\ninst✝³ : AddCommMonoid V\ninst✝² : Module K V\ninst✝¹ : AddCommMonoid V₂\ninst✝ : Module K V₂\nf : V →ₗ[K] V₂\np : Submodule K V\na : K\nh : a ≠ 0\n⊢ map f p ≤ map (a • f) p\n[PROOFSTEP]\nrw [map_le_iff_le_comap, ← comap_smul f _ a h, ← map_le_iff_le_comap]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝⁴ : Semifield K\ninst✝³ : AddCommMonoid V\ninst✝² : Module K V\ninst✝¹ : AddCommMonoid V₂\ninst✝ : Module K V₂\nf : V →ₗ[K] V₂\np : Submodule K V₂\na : K\n⊢ comap (a • f) p = ⨅ (_ : a ≠ 0), comap f p\n[PROOFSTEP]\nclassical by_cases h : a = 0 <;> simp [h, comap_smul]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝⁴ : Semifield K\ninst✝³ : AddCommMonoid V\ninst✝² : Module K V\ninst✝¹ : AddCommMonoid V₂\ninst✝ : Module K V₂\nf : V →ₗ[K] V₂\np : Submodule K V₂\na : K\n⊢ comap (a • f) p = ⨅ (_ : a ≠ 0), comap f p\n[PROOFSTEP]\nby_cases h : a = 0\n[GOAL]\ncase pos\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝⁴ : Semifield K\ninst✝³ : AddCommMonoid V\ninst✝² : Module K V\ninst✝¹ : AddCommMonoid V₂\ninst✝ : Module K V₂\nf : V →ₗ[K] V₂\np : Submodule K V₂\na : K\nh : a = 0\n⊢ comap (a • f) p = ⨅ (_ : a ≠ 0), comap f p\n[PROOFSTEP]\nsimp [h, comap_smul]\n[GOAL]\ncase neg\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝⁴ : Semifield K\ninst✝³ : AddCommMonoid V\ninst✝² : Module K V\ninst✝¹ : AddCommMonoid V₂\ninst✝ : Module K V₂\nf : V →ₗ[K] V₂\np : Submodule K V₂\na : K\nh : ¬a = 0\n⊢ comap (a • f) p = ⨅ (_ : a ≠ 0), comap f p\n[PROOFSTEP]\nsimp [h, comap_smul]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝⁴ : Semifield K\ninst✝³ : AddCommMonoid V\ninst✝² : Module K V\ninst✝¹ : AddCommMonoid V₂\ninst✝ : Module K V₂\nf : V →ₗ[K] V₂\np : Submodule K V\na : K\n⊢ map (a • f) p = ⨆ (_ : a ≠ 0), map f p\n[PROOFSTEP]\nclassical by_cases h : a = 0 <;> simp [h, Submodule.map_smul]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝⁴ : Semifield K\ninst✝³ : AddCommMonoid V\ninst✝² : Module K V\ninst✝¹ : AddCommMonoid V₂\ninst✝ : Module K V₂\nf : V →ₗ[K] V₂\np : Submodule K V\na : K\n⊢ map (a • f) p = ⨆ (_ : a ≠ 0), map f p\n[PROOFSTEP]\nby_cases h : a = 0\n[GOAL]\ncase pos\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝⁴ : Semifield K\ninst✝³ : AddCommMonoid V\ninst✝² : Module K V\ninst✝¹ : AddCommMonoid V₂\ninst✝ : Module K V₂\nf : V →ₗ[K] V₂\np : Submodule K V\na : K\nh : a = 0\n⊢ map (a • f) p = ⨆ (_ : a ≠ 0), map f p\n[PROOFSTEP]\nsimp [h, Submodule.map_smul]\n[GOAL]\ncase neg\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝⁴ : Semifield K\ninst✝³ : AddCommMonoid V\ninst✝² : Module K V\ninst✝¹ : AddCommMonoid V₂\ninst✝ : Module K V₂\nf : V →ₗ[K] V₂\np : Submodule K V\na : K\nh : ¬a = 0\n⊢ map (a • f) p = ⨆ (_ : a ≠ 0), map f p\n[PROOFSTEP]\nsimp [h, Submodule.map_smul]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : Semiring R₂\ninst✝⁹ : Semiring R₃\ninst✝⁸ : AddCommMonoid M\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : AddCommMonoid M₃\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\ninst✝⁵ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝⁴ : Module R M\ninst✝³ : Module R₂ M₂\ninst✝² : Module R₃ M₃\nσ₂₁ : R₂ →+* R\nτ₁₂ : R →+* R₂\nτ₂₃ : R₂ →+* R₃\nτ₁₃ : R →+* R₃\ninst✝¹ : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃\ninst✝ : RingHomSurjective σ₂₁\np : Submodule R M\nf : M₂ →ₛₗ[σ₂₁] M\nh : ∀ (c : M₂), ↑f c ∈ p\np' : Submodule R₂ M₂\nx✝ : { x // x ∈ p }\nx : M\nhx : x ∈ p\n⊢ { val := x, property := hx } ∈ map (codRestrict p f h) p' ↔\n    { val := x, property := hx } ∈ comap (Submodule.subtype p) (map f p')\n[PROOFSTEP]\nsimp [Subtype.ext_iff_val]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁰ : Semiring R\ninst✝⁹ : Semiring R₂\ninst✝⁸ : Semiring R₃\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : AddCommMonoid M₂\ninst✝⁵ : AddCommMonoid M₃\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\ninst✝⁴ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝³ : Module R M\ninst✝² : Module R₂ M₂\ninst✝¹ : Module R₃ M₃\nσ₂₁ : R₂ →+* R\nτ₁₂ : R →+* R₂\nτ₂₃ : R₂ →+* R₃\nτ₁₃ : R →+* R₃\ninst✝ : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃\np : Submodule R M\nf : M₂ →ₛₗ[σ₂₁] M\nhf : ∀ (c : M₂), ↑f c ∈ p\np' : Submodule R { x // x ∈ p }\nx : M₂\n⊢ x ∈ comap f (map (Submodule.subtype p) p') → x ∈ comap (codRestrict p f hf) p'\n[PROOFSTEP]\nrintro ⟨⟨_, _⟩, h, ⟨⟩⟩\n[GOAL]\ncase intro.mk.intro.refl\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁰ : Semiring R\ninst✝⁹ : Semiring R₂\ninst✝⁸ : Semiring R₃\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : AddCommMonoid M₂\ninst✝⁵ : AddCommMonoid M₃\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\ninst✝⁴ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝³ : Module R M\ninst✝² : Module R₂ M₂\ninst✝¹ : Module R₃ M₃\nσ₂₁ : R₂ →+* R\nτ₁₂ : R →+* R₂\nτ₂₃ : R₂ →+* R₃\nτ₁₃ : R →+* R₃\ninst✝ : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃\np : Submodule R M\nf : M₂ →ₛₗ[σ₂₁] M\nhf : ∀ (c : M₂), ↑f c ∈ p\np' : Submodule R { x // x ∈ p }\nx : M₂\nproperty✝ : f.toAddHom.1 x ∈ p\nh : { val := f.toAddHom.1 x, property := property✝ } ∈ ↑p'\n⊢ x ∈ comap (codRestrict p f hf) p'\n[PROOFSTEP]\nexact h\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : Semiring R₂\ninst✝⁹ : Semiring R₃\ninst✝⁸ : AddCommMonoid M\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : AddCommMonoid M₃\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\ninst✝⁵ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝⁴ : Module R M\ninst✝³ : Module R₂ M₂\ninst✝² : Module R₃ M₃\nσ₂₁ : R₂ →+* R\nτ₁₂ : R →+* R₂\nτ₂₃ : R₂ →+* R₃\nτ₁₃ : R →+* R₃\ninst✝¹ : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃\nF : Type u_20\nsc : SemilinearMapClass F τ₁₂ M M₂\ninst✝ : RingHomSurjective τ₁₂\nf : F\n⊢ range f = map f ⊤\n[PROOFSTEP]\next\n[GOAL]\ncase h\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : Semiring R₂\ninst✝⁹ : Semiring R₃\ninst✝⁸ : AddCommMonoid M\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : AddCommMonoid M₃\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\ninst✝⁵ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝⁴ : Module R M\ninst✝³ : Module R₂ M₂\ninst✝² : Module R₃ M₃\nσ₂₁ : R₂ →+* R\nτ₁₂ : R →+* R₂\nτ₂₃ : R₂ →+* R₃\nτ₁₃ : R →+* R₃\ninst✝¹ : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃\nF : Type u_20\nsc : SemilinearMapClass F τ₁₂ M M₂\ninst✝ : RingHomSurjective τ₁₂\nf : F\nx✝ : M₂\n⊢ x✝ ∈ range f ↔ x✝ ∈ map f ⊤\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : Semiring R₂\ninst✝⁹ : Semiring R₃\ninst✝⁸ : AddCommMonoid M\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : AddCommMonoid M₃\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\ninst✝⁵ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝⁴ : Module R M\ninst✝³ : Module R₂ M₂\ninst✝² : Module R₃ M₃\nσ₂₁ : R₂ →+* R\nτ₁₂ : R →+* R₂\nτ₂₃ : R₂ →+* R₃\nτ₁₃ : R →+* R₃\ninst✝¹ : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃\nF : Type u_20\nsc : SemilinearMapClass F τ₁₂ M M₂\ninst✝ : RingHomSurjective τ₁₂\nf : F\n⊢ range f = ⊤ ↔ Surjective ↑f\n[PROOFSTEP]\nrw [SetLike.ext'_iff, range_coe, top_coe, Set.range_iff_surjective]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : Semiring R₂\ninst✝⁹ : Semiring R₃\ninst✝⁸ : AddCommMonoid M\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : AddCommMonoid M₃\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\ninst✝⁵ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝⁴ : Module R M\ninst✝³ : Module R₂ M₂\ninst✝² : Module R₃ M₃\nσ₂₁ : R₂ →+* R\nτ₁₂ : R →+* R₂\nτ₂₃ : R₂ →+* R₃\nτ₁₃ : R →+* R₃\ninst✝¹ : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃\nF : Type u_20\nsc : SemilinearMapClass F τ₁₂ M M₂\ninst✝ : RingHomSurjective τ₁₂\nf : F\np : Submodule R₂ M₂\n⊢ range f ≤ p ↔ comap f p = ⊤\n[PROOFSTEP]\nrw [range_eq_map, map_le_iff_le_comap, eq_top_iff]\n[GOAL]\nR✝ : Type u_1\nR₁ : Type u_2\nR₂✝ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM✝ : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂✝ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁷ : Semiring R✝\ninst✝¹⁶ : Semiring R₂✝\ninst✝¹⁵ : Semiring R₃\ninst✝¹⁴ : AddCommMonoid M✝\ninst✝¹³ : AddCommMonoid M₂✝\ninst✝¹² : AddCommMonoid M₃\nσ₁₂ : R✝ →+* R₂✝\nσ₂₃ : R₂✝ →+* R₃\nσ₁₃ : R✝ →+* R₃\ninst✝¹¹ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝¹⁰ : Module R✝ M✝\ninst✝⁹ : Module R₂✝ M₂✝\ninst✝⁸ : Module R₃ M₃\nσ₂₁ : R₂✝ →+* R✝\nτ₁₂✝ : R✝ →+* R₂✝\nτ₂₃ : R₂✝ →+* R₃\nτ₁₃ : R✝ →+* R₃\ninst✝⁷ : RingHomCompTriple τ₁₂✝ τ₂₃ τ₁₃\nF : Type u_20\nsc : SemilinearMapClass F τ₁₂✝ M✝ M₂✝\nR : Type u_21\nR₂ : Type u_22\nM : Type u_23\nM₂ : Type u_24\ninst✝⁶ : Semiring R\ninst✝⁵ : Ring R₂\ninst✝⁴ : AddCommMonoid M\ninst✝³ : AddCommGroup M₂\ninst✝² : Module R M\ninst✝¹ : Module R₂ M₂\nτ₁₂ : R →+* R₂\ninst✝ : RingHomSurjective τ₁₂\nf : M →ₛₗ[τ₁₂] M₂\n⊢ range (-f) = range f\n[PROOFSTEP]\nchange range ((-LinearMap.id : M₂ →ₗ[R₂] M₂).comp f) = _\n[GOAL]\nR✝ : Type u_1\nR₁ : Type u_2\nR₂✝ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM✝ : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂✝ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁷ : Semiring R✝\ninst✝¹⁶ : Semiring R₂✝\ninst✝¹⁵ : Semiring R₃\ninst✝¹⁴ : AddCommMonoid M✝\ninst✝¹³ : AddCommMonoid M₂✝\ninst✝¹² : AddCommMonoid M₃\nσ₁₂ : R✝ →+* R₂✝\nσ₂₃ : R₂✝ →+* R₃\nσ₁₃ : R✝ →+* R₃\ninst✝¹¹ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝¹⁰ : Module R✝ M✝\ninst✝⁹ : Module R₂✝ M₂✝\ninst✝⁸ : Module R₃ M₃\nσ₂₁ : R₂✝ →+* R✝\nτ₁₂✝ : R✝ →+* R₂✝\nτ₂₃ : R₂✝ →+* R₃\nτ₁₃ : R✝ →+* R₃\ninst✝⁷ : RingHomCompTriple τ₁₂✝ τ₂₃ τ₁₃\nF : Type u_20\nsc : SemilinearMapClass F τ₁₂✝ M✝ M₂✝\nR : Type u_21\nR₂ : Type u_22\nM : Type u_23\nM₂ : Type u_24\ninst✝⁶ : Semiring R\ninst✝⁵ : Ring R₂\ninst✝⁴ : AddCommMonoid M\ninst✝³ : AddCommGroup M₂\ninst✝² : Module R M\ninst✝¹ : Module R₂ M₂\nτ₁₂ : R →+* R₂\ninst✝ : RingHomSurjective τ₁₂\nf : M →ₛₗ[τ₁₂] M₂\n⊢ range (comp (-id) f) = range f\n[PROOFSTEP]\nrw [range_comp, Submodule.map_neg, Submodule.map_id]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁰ : Semiring R\ninst✝⁹ : Semiring R₂\ninst✝⁸ : Semiring R₃\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : AddCommMonoid M₂\ninst✝⁵ : AddCommMonoid M₃\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\ninst✝⁴ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝³ : Module R M\ninst✝² : Module R₂ M₂\ninst✝¹ : Module R₃ M₃\nσ₂₁ : R₂ →+* R\nτ₁₂ : R →+* R₂\nτ₂₃ : R₂ →+* R₃\nτ₁₃ : R →+* R₃\ninst✝ : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃\nF : Type u_20\nsc : SemilinearMapClass F τ₁₂ M M₂\nf g : F\nsrc✝ : AddSubmonoid M := AddMonoidHom.eqLocusM ↑f ↑g\nr : R\nx : M\nhx : ↑f x = ↑g x\n⊢ ↑f (r • x) = ↑g (r • x)\n[PROOFSTEP]\nsimpa only [map_smulₛₗ] using congr_arg ((· • ·) (τ₁₂ r)) hx\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁰ : Semiring R\ninst✝⁹ : Semiring R₂\ninst✝⁸ : Semiring R₃\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : AddCommMonoid M₂\ninst✝⁵ : AddCommMonoid M₃\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\ninst✝⁴ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝³ : Module R M\ninst✝² : Module R₂ M₂\ninst✝¹ : Module R₃ M₃\nσ₂₁ : R₂ →+* R\nτ₁₂ : R →+* R₂\nτ₂₃ : R₂ →+* R₃\nτ₁₃ : R →+* R₃\ninst✝ : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃\nF : Type u_20\nsc : SemilinearMapClass F τ₁₂ M M₂\nf g : F\n⊢ eqLocus f g = ⊤ ↔ f = g\n[PROOFSTEP]\nsimp [SetLike.ext_iff, FunLike.ext_iff]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS✝ : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁰ : Semiring R\ninst✝⁹ : Semiring R₂\ninst✝⁸ : Semiring R₃\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : AddCommMonoid M₂\ninst✝⁵ : AddCommMonoid M₃\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\ninst✝⁴ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝³ : Module R M\ninst✝² : Module R₂ M₂\ninst✝¹ : Module R₃ M₃\nσ₂₁ : R₂ →+* R\nτ₁₂ : R →+* R₂\nτ₂₃ : R₂ →+* R₃\nτ₁₃ : R →+* R₃\ninst✝ : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃\nF : Type u_20\nsc : SemilinearMapClass F τ₁₂ M M₂\nf g : F\nS T : Submodule R M\nhS : Set.EqOn ↑f ↑g ↑S\nhT : Set.EqOn ↑f ↑g ↑T\n⊢ Set.EqOn ↑f ↑g ↑(S ⊔ T)\n[PROOFSTEP]\nrw [← le_eqLocus] at hS hT ⊢\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS✝ : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁰ : Semiring R\ninst✝⁹ : Semiring R₂\ninst✝⁸ : Semiring R₃\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : AddCommMonoid M₂\ninst✝⁵ : AddCommMonoid M₃\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\ninst✝⁴ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝³ : Module R M\ninst✝² : Module R₂ M₂\ninst✝¹ : Module R₃ M₃\nσ₂₁ : R₂ →+* R\nτ₁₂ : R →+* R₂\nτ₂₃ : R₂ →+* R₃\nτ₁₃ : R →+* R₃\ninst✝ : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃\nF : Type u_20\nsc : SemilinearMapClass F τ₁₂ M M₂\nf g : F\nS T : Submodule R M\nhS : S ≤ eqLocus f g\nhT : T ≤ eqLocus f g\n⊢ S ⊔ T ≤ eqLocus f g\n[PROOFSTEP]\nexact sup_le hS hT\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁰ : Semiring R\ninst✝⁹ : Semiring R₂\ninst✝⁸ : Semiring R₃\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : AddCommMonoid M₂\ninst✝⁵ : AddCommMonoid M₃\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\ninst✝⁴ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝³ : Module R M\ninst✝² : Module R₂ M₂\ninst✝¹ : Module R₃ M₃\nσ₂₁ : R₂ →+* R\nτ₁₂ : R →+* R₂\nτ₂₃ : R₂ →+* R₃\nτ₁₃ : R →+* R₃\ninst✝ : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃\nf : M →ₗ[R] M\nn m : ℕ\nw : n ≤ m\nx : M\nh : x ∈ (fun n => range (f ^ n)) m\n⊢ x ∈ (fun n => range (f ^ n)) n\n[PROOFSTEP]\nobtain ⟨c, rfl⟩ := le_iff_exists_add.mp w\n[GOAL]\ncase intro\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁰ : Semiring R\ninst✝⁹ : Semiring R₂\ninst✝⁸ : Semiring R₃\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : AddCommMonoid M₂\ninst✝⁵ : AddCommMonoid M₃\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\ninst✝⁴ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝³ : Module R M\ninst✝² : Module R₂ M₂\ninst✝¹ : Module R₃ M₃\nσ₂₁ : R₂ →+* R\nτ₁₂ : R →+* R₂\nτ₂₃ : R₂ →+* R₃\nτ₁₃ : R →+* R₃\ninst✝ : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃\nf : M →ₗ[R] M\nn : ℕ\nx : M\nc : ℕ\nw : n ≤ n + c\nh : x ∈ (fun n => range (f ^ n)) (n + c)\n⊢ x ∈ (fun n => range (f ^ n)) n\n[PROOFSTEP]\nrw [LinearMap.mem_range] at h \n[GOAL]\ncase intro\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁰ : Semiring R\ninst✝⁹ : Semiring R₂\ninst✝⁸ : Semiring R₃\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : AddCommMonoid M₂\ninst✝⁵ : AddCommMonoid M₃\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\ninst✝⁴ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝³ : Module R M\ninst✝² : Module R₂ M₂\ninst✝¹ : Module R₃ M₃\nσ₂₁ : R₂ →+* R\nτ₁₂ : R →+* R₂\nτ₂₃ : R₂ →+* R₃\nτ₁₃ : R →+* R₃\ninst✝ : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃\nf : M →ₗ[R] M\nn : ℕ\nx : M\nc : ℕ\nw : n ≤ n + c\nh : ∃ y, ↑(f ^ (n + c)) y = x\n⊢ x ∈ (fun n => range (f ^ n)) n\n[PROOFSTEP]\nobtain ⟨m, rfl⟩ := h\n[GOAL]\ncase intro.intro\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁰ : Semiring R\ninst✝⁹ : Semiring R₂\ninst✝⁸ : Semiring R₃\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : AddCommMonoid M₂\ninst✝⁵ : AddCommMonoid M₃\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\ninst✝⁴ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝³ : Module R M\ninst✝² : Module R₂ M₂\ninst✝¹ : Module R₃ M₃\nσ₂₁ : R₂ →+* R\nτ₁₂ : R →+* R₂\nτ₂₃ : R₂ →+* R₃\nτ₁₃ : R →+* R₃\ninst✝ : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃\nf : M →ₗ[R] M\nn c : ℕ\nw : n ≤ n + c\nm : M\n⊢ ↑(f ^ (n + c)) m ∈ (fun n => range (f ^ n)) n\n[PROOFSTEP]\nrw [LinearMap.mem_range]\n[GOAL]\ncase intro.intro\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁰ : Semiring R\ninst✝⁹ : Semiring R₂\ninst✝⁸ : Semiring R₃\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : AddCommMonoid M₂\ninst✝⁵ : AddCommMonoid M₃\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\ninst✝⁴ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝³ : Module R M\ninst✝² : Module R₂ M₂\ninst✝¹ : Module R₃ M₃\nσ₂₁ : R₂ →+* R\nτ₁₂ : R →+* R₂\nτ₂₃ : R₂ →+* R₃\nτ₁₃ : R →+* R₃\ninst✝ : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃\nf : M →ₗ[R] M\nn c : ℕ\nw : n ≤ n + c\nm : M\n⊢ ∃ y, ↑(f ^ n) y = ↑(f ^ (n + c)) m\n[PROOFSTEP]\nuse(f ^ c) m\n[GOAL]\ncase h\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁰ : Semiring R\ninst✝⁹ : Semiring R₂\ninst✝⁸ : Semiring R₃\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : AddCommMonoid M₂\ninst✝⁵ : AddCommMonoid M₃\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\ninst✝⁴ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝³ : Module R M\ninst✝² : Module R₂ M₂\ninst✝¹ : Module R₃ M₃\nσ₂₁ : R₂ →+* R\nτ₁₂ : R →+* R₂\nτ₂₃ : R₂ →+* R₃\nτ₁₃ : R →+* R₃\ninst✝ : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃\nf : M →ₗ[R] M\nn c : ℕ\nw : n ≤ n + c\nm : M\n⊢ ↑(f ^ n) (↑(f ^ c) m) = ↑(f ^ (n + c)) m\n[PROOFSTEP]\nrw [pow_add, LinearMap.mul_apply]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁰ : Semiring R\ninst✝⁹ : Semiring R₂\ninst✝⁸ : Semiring R₃\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : AddCommMonoid M₂\ninst✝⁵ : AddCommMonoid M₃\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\ninst✝⁴ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝³ : Module R M\ninst✝² : Module R₂ M₂\ninst✝¹ : Module R₃ M₃\nσ₂₁ : R₂ →+* R\nτ₁₂ : R →+* R₂\nτ₂₃ : R₂ →+* R₃\nτ₁₃ : R →+* R₃\ninst✝ : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃\nF : Type u_20\nsc : SemilinearMapClass F τ₁₂ M M₂\nf : M →ₛₗ[τ₁₂] M₂\ng : M₂ →ₛₗ[τ₂₃] M₃\n⊢ ker f ≤ ker (comp g f)\n[PROOFSTEP]\nrw [ker_comp]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁰ : Semiring R\ninst✝⁹ : Semiring R₂\ninst✝⁸ : Semiring R₃\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : AddCommMonoid M₂\ninst✝⁵ : AddCommMonoid M₃\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\ninst✝⁴ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝³ : Module R M\ninst✝² : Module R₂ M₂\ninst✝¹ : Module R₃ M₃\nσ₂₁ : R₂ →+* R\nτ₁₂ : R →+* R₂\nτ₂₃ : R₂ →+* R₃\nτ₁₃ : R →+* R₃\ninst✝ : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃\nF : Type u_20\nsc : SemilinearMapClass F τ₁₂ M M₂\nf : M →ₛₗ[τ₁₂] M₂\ng : M₂ →ₛₗ[τ₂₃] M₃\n⊢ ker f ≤ comap f (ker g)\n[PROOFSTEP]\nexact comap_mono bot_le\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁰ : Semiring R\ninst✝⁹ : Semiring R₂\ninst✝⁸ : Semiring R₃\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : AddCommMonoid M₂\ninst✝⁵ : AddCommMonoid M₃\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\ninst✝⁴ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝³ : Module R M\ninst✝² : Module R₂ M₂\ninst✝¹ : Module R₃ M₃\nσ₂₁ : R₂ →+* R\nτ₁₂ : R →+* R₂\nτ₂₃ : R₂ →+* R₃\nτ₁₃ : R →+* R₃\ninst✝ : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃\nF : Type u_20\nsc : SemilinearMapClass F τ₁₂ M M₂\nf : F\np : Submodule R M\n⊢ Disjoint p (ker f) ↔ ∀ (x : M), x ∈ p → ↑f x = 0 → x = 0\n[PROOFSTEP]\nsimp [disjoint_def]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁰ : Semiring R\ninst✝⁹ : Semiring R₂\ninst✝⁸ : Semiring R₃\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : AddCommMonoid M₂\ninst✝⁵ : AddCommMonoid M₃\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\ninst✝⁴ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝³ : Module R M\ninst✝² : Module R₂ M₂\ninst✝¹ : Module R₃ M₃\nσ₂₁ : R₂ →+* R\nτ₁₂ : R →+* R₂\nτ₂₃ : R₂ →+* R₃\nτ₁₃ : R →+* R₃\ninst✝ : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃\nF : Type u_20\nsc : SemilinearMapClass F τ₁₂ M M₂\nf : F\n⊢ ker f = ⊥ ↔ ∀ (m : M), ↑f m = 0 → m = 0\n[PROOFSTEP]\nsimpa [disjoint_iff_inf_le] using @disjoint_ker _ _ _ _ _ _ _ _ _ _ _ _ _ f ⊤\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : Semiring R₂\ninst✝⁹ : Semiring R₃\ninst✝⁸ : AddCommMonoid M\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : AddCommMonoid M₃\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\ninst✝⁵ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝⁴ : Module R M\ninst✝³ : Module R₂ M₂\ninst✝² : Module R₃ M₃\nσ₂₁ : R₂ →+* R\nτ₁₂ : R →+* R₂\nτ₂₃ : R₂ →+* R₃\nτ₁₃ : R →+* R₃\ninst✝¹ : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃\nF : Type u_20\nsc : SemilinearMapClass F τ₁₂ M M₂\nτ₂₁ : R₂ →+* R\ninst✝ : RingHomInvPair τ₁₂ τ₂₁\nf : M →ₛₗ[τ₁₂] M₂\ng : M₂ →ₛₗ[τ₂₁] M\nh : comp g f = id\nm : M\nhm : ↑f m = 0\n⊢ m = 0\n[PROOFSTEP]\nrw [← id_apply (R := R) m, ← h, comp_apply, hm, g.map_zero]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : Semiring R₂\ninst✝⁹ : Semiring R₃\ninst✝⁸ : AddCommMonoid M\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : AddCommMonoid M₃\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\ninst✝⁵ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝⁴ : Module R M\ninst✝³ : Module R₂ M₂\ninst✝² : Module R₃ M₃\nσ₂₁ : R₂ →+* R\nτ₁₂ : R →+* R₂\nτ₂₃ : R₂ →+* R₃\nτ₁₃ : R →+* R₃\ninst✝¹ : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃\nF : Type u_20\nsc : SemilinearMapClass F τ₁₂ M M₂\ninst✝ : RingHomSurjective τ₁₂\nf : F\np : Submodule R M\n⊢ p ≤ ker f ↔ map f p = ⊥\n[PROOFSTEP]\nrw [ker, eq_bot_iff, map_le_iff_le_comap]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁰ : Semiring R\ninst✝⁹ : Semiring R₂\ninst✝⁸ : Semiring R₃\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : AddCommMonoid M₂\ninst✝⁵ : AddCommMonoid M₃\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\ninst✝⁴ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝³ : Module R M\ninst✝² : Module R₂ M₂\ninst✝¹ : Module R₃ M₃\nσ₂₁ : R₂ →+* R\nτ₁₂ : R →+* R₂\nτ₂₃ : R₂ →+* R₃\nτ₁₃ : R →+* R₃\ninst✝ : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃\nF : Type u_20\nsc : SemilinearMapClass F τ₁₂ M M₂\nτ₂₁ : R₂ →+* R\np : Submodule R M\nf : M₂ →ₛₗ[τ₂₁] M\nhf : ∀ (c : M₂), ↑f c ∈ p\n⊢ ker (codRestrict p f hf) = ker f\n[PROOFSTEP]\nrw [ker, comap_codRestrict, Submodule.map_bot]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁰ : Semiring R\ninst✝⁹ : Semiring R₂\ninst✝⁸ : Semiring R₃\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : AddCommMonoid M₂\ninst✝⁵ : AddCommMonoid M₃\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\ninst✝⁴ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝³ : Module R M\ninst✝² : Module R₂ M₂\ninst✝¹ : Module R₃ M₃\nσ₂₁ : R₂ →+* R\nτ₁₂ : R →+* R₂\nτ₂₃ : R₂ →+* R₃\nτ₁₃ : R →+* R₃\ninst✝ : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃\nF : Type u_20\nsc : SemilinearMapClass F τ₁₂ M M₂\nτ₂₁ : R₂ →+* R\np : Submodule R M\nf : M₂ →ₛₗ[τ₂₁] M\nhf : ∀ (c : M₂), ↑f c ∈ p\n⊢ comap f ⊥ = ker f\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : Semiring R₂\ninst✝⁹ : Semiring R₃\ninst✝⁸ : AddCommMonoid M\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : AddCommMonoid M₃\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\ninst✝⁵ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝⁴ : Module R M\ninst✝³ : Module R₂ M₂\ninst✝² : Module R₃ M₃\nσ₂₁ : R₂ →+* R\nτ₁₂ : R →+* R₂\nτ₂₃ : R₂ →+* R₃\nτ₁₃ : R →+* R₃\ninst✝¹ : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃\nF : Type u_20\nsc : SemilinearMapClass F τ₁₂ M M₂\nτ₂₁ : R₂ →+* R\ninst✝ : RingHomSurjective τ₂₁\np : Submodule R M\nf : M₂ →ₛₗ[τ₂₁] M\nhf : ∀ (c : M₂), ↑f c ∈ p\n⊢ range (codRestrict p f hf) = comap (Submodule.subtype p) (range f)\n[PROOFSTEP]\nsimpa only [range_eq_map] using map_codRestrict _ _ _ _\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹² : Semiring R\ninst✝¹¹ : Semiring R₂\ninst✝¹⁰ : Semiring R₃\ninst✝⁹ : AddCommMonoid M\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : AddCommMonoid M₃\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\ninst✝⁶ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝⁵ : Module R M\ninst✝⁴ : Module R₂ M₂\ninst✝³ : Module R₃ M₃\nσ₂₁ : R₂ →+* R\nτ₁₂ : R →+* R₂\nτ₂₃ : R₂ →+* R₃\nτ₁₃ : R →+* R₃\ninst✝² : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃\nF : Type u_20\nsc : SemilinearMapClass F τ₁₂ M M₂\ninst✝¹ : AddCommMonoid M₁\ninst✝ : Module R M₁\np : Submodule R M\nq : Submodule R M₁\nf : M →ₗ[R] M₁\nhf : ∀ (x : M), x ∈ p → ↑f x ∈ q\n⊢ ker (restrict f hf) = ker (domRestrict f p)\n[PROOFSTEP]\nrw [restrict_eq_codRestrict_domRestrict, ker_codRestrict]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : Semiring R₂\ninst✝⁹ : Semiring R₃\ninst✝⁸ : AddCommMonoid M\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : AddCommMonoid M₃\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\ninst✝⁵ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝⁴ : Module R M\ninst✝³ : Module R₂ M₂\ninst✝² : Module R₃ M₃\nσ₂₁ : R₂ →+* R\nτ₁₂ : R →+* R₂\nτ₂₃ : R₂ →+* R₃\nτ₁₃ : R →+* R₃\ninst✝¹ : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃\nF : Type u_20\nsc : SemilinearMapClass F τ₁₂ M M₂\ninst✝ : RingHomSurjective τ₁₂\nf : F\nq : Submodule R₂ M₂\n⊢ range f ⊓ q ≤ map f (comap f q)\n[PROOFSTEP]\nrintro _ ⟨⟨x, _, rfl⟩, hx⟩\n[GOAL]\ncase intro.intro.refl\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : Semiring R₂\ninst✝⁹ : Semiring R₃\ninst✝⁸ : AddCommMonoid M\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : AddCommMonoid M₃\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\ninst✝⁵ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝⁴ : Module R M\ninst✝³ : Module R₂ M₂\ninst✝² : Module R₃ M₃\nσ₂₁ : R₂ →+* R\nτ₁₂ : R →+* R₂\nτ₂₃ : R₂ →+* R₃\nτ₁₃ : R →+* R₃\ninst✝¹ : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃\nF : Type u_20\nsc : SemilinearMapClass F τ₁₂ M M₂\ninst✝ : RingHomSurjective τ₁₂\nf : F\nq : Submodule R₂ M₂\nx : M\nhx : ↑f x ∈ ↑q\n⊢ ↑f x ∈ map f (comap f q)\n[PROOFSTEP]\nexact ⟨x, hx, rfl⟩\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : Semiring R₂\ninst✝⁹ : Semiring R₃\ninst✝⁸ : AddCommMonoid M\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : AddCommMonoid M₃\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\ninst✝⁵ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝⁴ : Module R M\ninst✝³ : Module R₂ M₂\ninst✝² : Module R₃ M₃\nσ₂₁ : R₂ →+* R\nτ₁₂ : R →+* R₂\nτ₂₃ : R₂ →+* R₃\nτ₁₃ : R →+* R₃\ninst✝¹ : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃\nF : Type u_20\nsc : SemilinearMapClass F τ₁₂ M M₂\ninst✝ : RingHomSurjective τ₁₂\nf : F\nq : Submodule R₂ M₂\nh : q ≤ range f\n⊢ map f (comap f q) = q\n[PROOFSTEP]\nrwa [Submodule.map_comap_eq, inf_eq_right]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁰ : Semiring R\ninst✝⁹ : Semiring R₂\ninst✝⁸ : Semiring R₃\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : AddCommMonoid M₂\ninst✝⁵ : AddCommMonoid M₃\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\ninst✝⁴ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝³ : Module R M\ninst✝² : Module R₂ M₂\ninst✝¹ : Module R₃ M₃\nσ₂₁ : R₂ →+* R\nτ₁₂ : R →+* R₂\nτ₂₃ : R₂ →+* R₃\nτ₁₃ : R →+* R₃\ninst✝ : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃\nF : Type u_20\nsc : SemilinearMapClass F τ₁₂ M M₂\nx : M\n⊢ x ∈ ker 0\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : Semiring R₂\ninst✝⁹ : Semiring R₃\ninst✝⁸ : AddCommMonoid M\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : AddCommMonoid M₃\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\ninst✝⁵ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝⁴ : Module R M\ninst✝³ : Module R₂ M₂\ninst✝² : Module R₃ M₃\nσ₂₁ : R₂ →+* R\nτ₁₂ : R →+* R₂\nτ₂₃ : R₂ →+* R₃\nτ₁₃ : R →+* R₃\ninst✝¹ : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃\nF : Type u_20\nsc : SemilinearMapClass F τ₁₂ M M₂\ninst✝ : RingHomSurjective τ₁₂\n⊢ range 0 = ⊥\n[PROOFSTEP]\nsimpa only [range_eq_map] using Submodule.map_zero _\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : Semiring R₂\ninst✝⁹ : Semiring R₃\ninst✝⁸ : AddCommMonoid M\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : AddCommMonoid M₃\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\ninst✝⁵ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝⁴ : Module R M\ninst✝³ : Module R₂ M₂\ninst✝² : Module R₃ M₃\nσ₂₁ : R₂ →+* R\nτ₁₂ : R →+* R₂\nτ₂₃ : R₂ →+* R₃\nτ₁₃ : R →+* R₃\ninst✝¹ : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃\nF : Type u_20\nsc : SemilinearMapClass F τ₁₂ M M₂\ninst✝ : RingHomSurjective τ₁₂\nf : M →ₛₗ[τ₁₂] M₂\n⊢ range f ≤ ⊥ ↔ f = 0\n[PROOFSTEP]\nrw [range_le_iff_comap]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : Semiring R₂\ninst✝⁹ : Semiring R₃\ninst✝⁸ : AddCommMonoid M\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : AddCommMonoid M₃\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\ninst✝⁵ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝⁴ : Module R M\ninst✝³ : Module R₂ M₂\ninst✝² : Module R₃ M₃\nσ₂₁ : R₂ →+* R\nτ₁₂ : R →+* R₂\nτ₂₃ : R₂ →+* R₃\nτ₁₃ : R →+* R₃\ninst✝¹ : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃\nF : Type u_20\nsc : SemilinearMapClass F τ₁₂ M M₂\ninst✝ : RingHomSurjective τ₁₂\nf : M →ₛₗ[τ₁₂] M₂\n⊢ comap f ⊥ = ⊤ ↔ f = 0\n[PROOFSTEP]\nexact ker_eq_top\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : Semiring R₂\ninst✝⁹ : Semiring R₃\ninst✝⁸ : AddCommMonoid M\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : AddCommMonoid M₃\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\ninst✝⁵ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝⁴ : Module R M\ninst✝³ : Module R₂ M₂\ninst✝² : Module R₃ M₃\nσ₂₁ : R₂ →+* R\nτ₁₂ : R →+* R₂\nτ₂₃ : R₂ →+* R₃\nτ₁₃ : R →+* R₃\ninst✝¹ : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃\nF : Type u_20\nsc : SemilinearMapClass F τ₁₂ M M₂\ninst✝ : RingHomSurjective τ₁₂\nf : M →ₛₗ[τ₁₂] M₂\n⊢ range f = ⊥ ↔ f = 0\n[PROOFSTEP]\nrw [← range_le_bot_iff, le_bot_iff]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : Semiring R₂\ninst✝⁹ : Semiring R₃\ninst✝⁸ : AddCommMonoid M\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : AddCommMonoid M₃\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\ninst✝⁵ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝⁴ : Module R M\ninst✝³ : Module R₂ M₂\ninst✝² : Module R₃ M₃\nσ₂₁ : R₂ →+* R\nτ₁₂ : R →+* R₂\nτ₂₃ : R₂ →+* R₃\nτ₁₃ : R →+* R₃\ninst✝¹ : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃\nF : Type u_20\nsc : SemilinearMapClass F τ₁₂ M M₂\ninst✝ : RingHomSurjective τ₁₂\nf : M →ₛₗ[τ₁₂] M₂\ng : M₂ →ₛₗ[τ₂₃] M₃\nh : comp g f = 0\nx : M₂\nhx : x ∈ range f\ny : M\nhy : ↑f y = x\n⊢ ↑g x = 0\n[PROOFSTEP]\nrw [← hy, ← comp_apply, h, zero_apply]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : Semiring R₂\ninst✝⁹ : Semiring R₃\ninst✝⁸ : AddCommMonoid M\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : AddCommMonoid M₃\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\ninst✝⁵ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝⁴ : Module R M\ninst✝³ : Module R₂ M₂\ninst✝² : Module R₃ M₃\nσ₂₁ : R₂ →+* R\nτ₁₂ : R →+* R₂\nτ₂₃ : R₂ →+* R₃\nτ₁₃ : R →+* R₃\ninst✝¹ : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃\nF : Type u_20\nsc : SemilinearMapClass F τ₁₂ M M₂\ninst✝ : RingHomSurjective τ₁₂\nf : F\nhf : range f = ⊤\np p' : Submodule R₂ M₂\nH : comap f p ≤ comap f p'\nx : M₂\nhx : x ∈ p\n⊢ x ∈ p'\n[PROOFSTEP]\nrcases range_eq_top.1 hf x with ⟨y, hy, rfl⟩\n[GOAL]\ncase intro.refl\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : Semiring R₂\ninst✝⁹ : Semiring R₃\ninst✝⁸ : AddCommMonoid M\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : AddCommMonoid M₃\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\ninst✝⁵ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝⁴ : Module R M\ninst✝³ : Module R₂ M₂\ninst✝² : Module R₃ M₃\nσ₂₁ : R₂ →+* R\nτ₁₂ : R →+* R₂\nτ₂₃ : R₂ →+* R₃\nτ₁₃ : R →+* R₃\ninst✝¹ : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃\nF : Type u_20\nsc : SemilinearMapClass F τ₁₂ M M₂\ninst✝ : RingHomSurjective τ₁₂\nf : F\nhf : range f = ⊤\np p' : Submodule R₂ M₂\nH : comap f p ≤ comap f p'\ny : M\nhx : ↑f y ∈ p\n⊢ ↑f y ∈ p'\n[PROOFSTEP]\nexact H hx\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁰ : Semiring R\ninst✝⁹ : Semiring R₂\ninst✝⁸ : Semiring R₃\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : AddCommMonoid M₂\ninst✝⁵ : AddCommMonoid M₃\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\ninst✝⁴ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝³ : Module R M\ninst✝² : Module R₂ M₂\ninst✝¹ : Module R₃ M₃\nσ₂₁ : R₂ →+* R\nτ₁₂ : R →+* R₂\nτ₂₃ : R₂ →+* R₃\nτ₁₃ : R →+* R₃\ninst✝ : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃\nF : Type u_20\nsc : SemilinearMapClass F τ₁₂ M M₂\nf : F\nhf : Injective ↑f\n⊢ ker f = ⊥\n[PROOFSTEP]\nhave : Disjoint ⊤ (ker f) := by\n  -- Porting note: `← map_zero f` should work here, but it needs to be directly applied to H.\n  rw [disjoint_ker]\n  intros _ _ H\n  rw [← map_zero f] at H \n  exact hf H\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁰ : Semiring R\ninst✝⁹ : Semiring R₂\ninst✝⁸ : Semiring R₃\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : AddCommMonoid M₂\ninst✝⁵ : AddCommMonoid M₃\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\ninst✝⁴ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝³ : Module R M\ninst✝² : Module R₂ M₂\ninst✝¹ : Module R₃ M₃\nσ₂₁ : R₂ →+* R\nτ₁₂ : R →+* R₂\nτ₂₃ : R₂ →+* R₃\nτ₁₃ : R →+* R₃\ninst✝ : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃\nF : Type u_20\nsc : SemilinearMapClass F τ₁₂ M M₂\nf : F\nhf : Injective ↑f\n⊢ Disjoint ⊤ (ker f)\n[PROOFSTEP]\nrw [disjoint_ker]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁰ : Semiring R\ninst✝⁹ : Semiring R₂\ninst✝⁸ : Semiring R₃\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : AddCommMonoid M₂\ninst✝⁵ : AddCommMonoid M₃\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\ninst✝⁴ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝³ : Module R M\ninst✝² : Module R₂ M₂\ninst✝¹ : Module R₃ M₃\nσ₂₁ : R₂ →+* R\nτ₁₂ : R →+* R₂\nτ₂₃ : R₂ →+* R₃\nτ₁₃ : R →+* R₃\ninst✝ : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃\nF : Type u_20\nsc : SemilinearMapClass F τ₁₂ M M₂\nf : F\nhf : Injective ↑f\n⊢ ∀ (x : M), x ∈ ⊤ → ↑f x = 0 → x = 0\n[PROOFSTEP]\nintros _ _ H\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁰ : Semiring R\ninst✝⁹ : Semiring R₂\ninst✝⁸ : Semiring R₃\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : AddCommMonoid M₂\ninst✝⁵ : AddCommMonoid M₃\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\ninst✝⁴ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝³ : Module R M\ninst✝² : Module R₂ M₂\ninst✝¹ : Module R₃ M₃\nσ₂₁ : R₂ →+* R\nτ₁₂ : R →+* R₂\nτ₂₃ : R₂ →+* R₃\nτ₁₃ : R →+* R₃\ninst✝ : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃\nF : Type u_20\nsc : SemilinearMapClass F τ₁₂ M M₂\nf : F\nhf : Injective ↑f\nx✝ : M\na✝ : x✝ ∈ ⊤\nH : ↑f x✝ = 0\n⊢ x✝ = 0\n[PROOFSTEP]\nrw [← map_zero f] at H \n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁰ : Semiring R\ninst✝⁹ : Semiring R₂\ninst✝⁸ : Semiring R₃\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : AddCommMonoid M₂\ninst✝⁵ : AddCommMonoid M₃\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\ninst✝⁴ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝³ : Module R M\ninst✝² : Module R₂ M₂\ninst✝¹ : Module R₃ M₃\nσ₂₁ : R₂ →+* R\nτ₁₂ : R →+* R₂\nτ₂₃ : R₂ →+* R₃\nτ₁₃ : R →+* R₃\ninst✝ : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃\nF : Type u_20\nsc : SemilinearMapClass F τ₁₂ M M₂\nf : F\nhf : Injective ↑f\nx✝ : M\na✝ : x✝ ∈ ⊤\nH : ↑f x✝ = ↑f 0\n⊢ x✝ = 0\n[PROOFSTEP]\nexact hf H\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁰ : Semiring R\ninst✝⁹ : Semiring R₂\ninst✝⁸ : Semiring R₃\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : AddCommMonoid M₂\ninst✝⁵ : AddCommMonoid M₃\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\ninst✝⁴ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝³ : Module R M\ninst✝² : Module R₂ M₂\ninst✝¹ : Module R₃ M₃\nσ₂₁ : R₂ →+* R\nτ₁₂ : R →+* R₂\nτ₂₃ : R₂ →+* R₃\nτ₁₃ : R →+* R₃\ninst✝ : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃\nF : Type u_20\nsc : SemilinearMapClass F τ₁₂ M M₂\nf : F\nhf : Injective ↑f\nthis : Disjoint ⊤ (ker f)\n⊢ ker f = ⊥\n[PROOFSTEP]\nrw [disjoint_iff_inf_le, top_inf_eq, le_bot_iff] at this \n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁰ : Semiring R\ninst✝⁹ : Semiring R₂\ninst✝⁸ : Semiring R₃\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : AddCommMonoid M₂\ninst✝⁵ : AddCommMonoid M₃\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\ninst✝⁴ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝³ : Module R M\ninst✝² : Module R₂ M₂\ninst✝¹ : Module R₃ M₃\nσ₂₁ : R₂ →+* R\nτ₁₂ : R →+* R₂\nτ₂₃ : R₂ →+* R₃\nτ₁₃ : R →+* R₃\ninst✝ : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃\nF : Type u_20\nsc : SemilinearMapClass F τ₁₂ M M₂\nf : F\nhf : Injective ↑f\nthis : ker f = ⊥\n⊢ ker f = ⊥\n[PROOFSTEP]\nassumption\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁰ : Semiring R\ninst✝⁹ : Semiring R₂\ninst✝⁸ : Semiring R₃\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : AddCommMonoid M₂\ninst✝⁵ : AddCommMonoid M₃\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\ninst✝⁴ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝³ : Module R M\ninst✝² : Module R₂ M₂\ninst✝¹ : Module R₃ M₃\nσ₂₁ : R₂ →+* R\nτ₁₂ : R →+* R₂\nτ₂₃ : R₂ →+* R₃\nτ₁₃ : R →+* R₃\ninst✝ : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃\nF : Type u_20\nsc : SemilinearMapClass F τ₁₂ M M₂\nf : M →ₗ[R] M\nn m : ℕ\nw : n ≤ m\nx : M\nh : x ∈ (fun n => ker (f ^ n)) n\n⊢ x ∈ (fun n => ker (f ^ n)) m\n[PROOFSTEP]\nobtain ⟨c, rfl⟩ := le_iff_exists_add.mp w\n[GOAL]\ncase intro\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁰ : Semiring R\ninst✝⁹ : Semiring R₂\ninst✝⁸ : Semiring R₃\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : AddCommMonoid M₂\ninst✝⁵ : AddCommMonoid M₃\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\ninst✝⁴ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝³ : Module R M\ninst✝² : Module R₂ M₂\ninst✝¹ : Module R₃ M₃\nσ₂₁ : R₂ →+* R\nτ₁₂ : R →+* R₂\nτ₂₃ : R₂ →+* R₃\nτ₁₃ : R →+* R₃\ninst✝ : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃\nF : Type u_20\nsc : SemilinearMapClass F τ₁₂ M M₂\nf : M →ₗ[R] M\nn : ℕ\nx : M\nh : x ∈ (fun n => ker (f ^ n)) n\nc : ℕ\nw : n ≤ n + c\n⊢ x ∈ (fun n => ker (f ^ n)) (n + c)\n[PROOFSTEP]\nrw [LinearMap.mem_ker] at h \n[GOAL]\ncase intro\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁰ : Semiring R\ninst✝⁹ : Semiring R₂\ninst✝⁸ : Semiring R₃\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : AddCommMonoid M₂\ninst✝⁵ : AddCommMonoid M₃\nσ₁₂ : R →+* R₂\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\ninst✝⁴ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\ninst✝³ : Module R M\ninst✝² : Module R₂ M₂\ninst✝¹ : Module R₃ M₃\nσ₂₁ : R₂ →+* R\nτ₁₂ : R →+* R₂\nτ₂₃ : R₂ →+* R₃\nτ₁₃ : R →+* R₃\ninst✝ : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃\nF : Type u_20\nsc : SemilinearMapClass F τ₁₂ M M₂\nf : M →ₗ[R] M\nn : ℕ\nx : M\nh : ↑(f ^ n) x = 0\nc : ℕ\nw : n ≤ n + c\n⊢ x ∈ (fun n => ker (f ^ n)) (n + c)\n[PROOFSTEP]\nrw [LinearMap.mem_ker, add_comm, pow_add, LinearMap.mul_apply, h, LinearMap.map_zero]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝⁹ : Ring R\ninst✝⁸ : Ring R₂\ninst✝⁷ : Ring R₃\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M₂\ninst✝⁴ : AddCommGroup M₃\ninst✝³ : Module R M\ninst✝² : Module R₂ M₂\ninst✝¹ : Module R₃ M₃\nτ₁₂ : R →+* R₂\nτ₂₃ : R₂ →+* R₃\nτ₁₃ : R →+* R₃\ninst✝ : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃\nF : Type u_20\nsc : SemilinearMapClass F τ₁₂ M M₂\nf : F\nx y : M\n⊢ x - y ∈ ker f ↔ ↑f x = ↑f y\n[PROOFSTEP]\nrw [mem_ker, map_sub, sub_eq_zero]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝⁹ : Ring R\ninst✝⁸ : Ring R₂\ninst✝⁷ : Ring R₃\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M₂\ninst✝⁴ : AddCommGroup M₃\ninst✝³ : Module R M\ninst✝² : Module R₂ M₂\ninst✝¹ : Module R₃ M₃\nτ₁₂ : R →+* R₂\nτ₂₃ : R₂ →+* R₃\nτ₁₃ : R →+* R₃\ninst✝ : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃\nF : Type u_20\nsc : SemilinearMapClass F τ₁₂ M M₂\nf : F\np : Submodule R M\nH : ∀ (x : M), x ∈ p → ↑f x = 0 → x = 0\nx : M\nhx : x ∈ p\ny : M\nhy : y ∈ p\nh : ↑f x = ↑f y\n⊢ ↑f (x - y) = 0\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝⁹ : Ring R\ninst✝⁸ : Ring R₂\ninst✝⁷ : Ring R₃\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M₂\ninst✝⁴ : AddCommGroup M₃\ninst✝³ : Module R M\ninst✝² : Module R₂ M₂\ninst✝¹ : Module R₃ M₃\nτ₁₂ : R →+* R₂\nτ₂₃ : R₂ →+* R₃\nτ₁₃ : R →+* R₃\ninst✝ : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃\nF : Type u_20\nsc : SemilinearMapClass F τ₁₂ M M₂\nf : F\np : Submodule R M\nH : ∀ (x : M), x ∈ p → ∀ (y : M), y ∈ p → ↑f x = ↑f y → x = y\nx : M\nh₁ : x ∈ p\nh₂ : ↑f x = 0\n⊢ ↑f x = ↑f 0\n[PROOFSTEP]\nsimpa using h₂\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝⁹ : Ring R\ninst✝⁸ : Ring R₂\ninst✝⁷ : Ring R₃\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M₂\ninst✝⁴ : AddCommGroup M₃\ninst✝³ : Module R M\ninst✝² : Module R₂ M₂\ninst✝¹ : Module R₃ M₃\nτ₁₂ : R →+* R₂\nτ₂₃ : R₂ →+* R₃\nτ₁₃ : R →+* R₃\ninst✝ : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃\nF : Type u_20\nsc : SemilinearMapClass F τ₁₂ M M₂\nf : F\n⊢ ker f = ⊥ ↔ Injective ↑f\n[PROOFSTEP]\nsimpa [disjoint_iff_inf_le] using @disjoint_ker' _ _ _ _ _ _ _ _ _ _ _ _ _ f ⊤\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁰ : Ring R\ninst✝⁹ : Ring R₂\ninst✝⁸ : Ring R₃\ninst✝⁷ : AddCommGroup M\ninst✝⁶ : AddCommGroup M₂\ninst✝⁵ : AddCommGroup M₃\ninst✝⁴ : Module R M\ninst✝³ : Module R₂ M₂\ninst✝² : Module R₃ M₃\nτ₁₂ : R →+* R₂\nτ₂₃ : R₂ →+* R₃\nτ₁₃ : R →+* R₃\ninst✝¹ : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃\nF : Type u_20\nsc : SemilinearMapClass F τ₁₂ M M₂\nf : F\ninst✝ : RingHomSurjective τ₁₂\np : Submodule R M\n⊢ ker f ≤ p ↔ ∃ y, y ∈ range f ∧ ↑f ⁻¹' {y} ⊆ ↑p\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁰ : Ring R\ninst✝⁹ : Ring R₂\ninst✝⁸ : Ring R₃\ninst✝⁷ : AddCommGroup M\ninst✝⁶ : AddCommGroup M₂\ninst✝⁵ : AddCommGroup M₃\ninst✝⁴ : Module R M\ninst✝³ : Module R₂ M₂\ninst✝² : Module R₃ M₃\nτ₁₂ : R →+* R₂\nτ₂₃ : R₂ →+* R₃\nτ₁₃ : R →+* R₃\ninst✝¹ : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃\nF : Type u_20\nsc : SemilinearMapClass F τ₁₂ M M₂\nf : F\ninst✝ : RingHomSurjective τ₁₂\np : Submodule R M\n⊢ ker f ≤ p → ∃ y, y ∈ range f ∧ ↑f ⁻¹' {y} ⊆ ↑p\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁰ : Ring R\ninst✝⁹ : Ring R₂\ninst✝⁸ : Ring R₃\ninst✝⁷ : AddCommGroup M\ninst✝⁶ : AddCommGroup M₂\ninst✝⁵ : AddCommGroup M₃\ninst✝⁴ : Module R M\ninst✝³ : Module R₂ M₂\ninst✝² : Module R₃ M₃\nτ₁₂ : R →+* R₂\nτ₂₃ : R₂ →+* R₃\nτ₁₃ : R →+* R₃\ninst✝¹ : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃\nF : Type u_20\nsc : SemilinearMapClass F τ₁₂ M M₂\nf : F\ninst✝ : RingHomSurjective τ₁₂\np : Submodule R M\nh : ker f ≤ p\n⊢ ∃ y, y ∈ range f ∧ ↑f ⁻¹' {y} ⊆ ↑p\n[PROOFSTEP]\nuse 0\n[GOAL]\ncase h\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁰ : Ring R\ninst✝⁹ : Ring R₂\ninst✝⁸ : Ring R₃\ninst✝⁷ : AddCommGroup M\ninst✝⁶ : AddCommGroup M₂\ninst✝⁵ : AddCommGroup M₃\ninst✝⁴ : Module R M\ninst✝³ : Module R₂ M₂\ninst✝² : Module R₃ M₃\nτ₁₂ : R →+* R₂\nτ₂₃ : R₂ →+* R₃\nτ₁₃ : R →+* R₃\ninst✝¹ : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃\nF : Type u_20\nsc : SemilinearMapClass F τ₁₂ M M₂\nf : F\ninst✝ : RingHomSurjective τ₁₂\np : Submodule R M\nh : ker f ≤ p\n⊢ 0 ∈ range f ∧ ↑f ⁻¹' {0} ⊆ ↑p\n[PROOFSTEP]\nrw [← SetLike.mem_coe, range_coe]\n[GOAL]\ncase h\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁰ : Ring R\ninst✝⁹ : Ring R₂\ninst✝⁸ : Ring R₃\ninst✝⁷ : AddCommGroup M\ninst✝⁶ : AddCommGroup M₂\ninst✝⁵ : AddCommGroup M₃\ninst✝⁴ : Module R M\ninst✝³ : Module R₂ M₂\ninst✝² : Module R₃ M₃\nτ₁₂ : R →+* R₂\nτ₂₃ : R₂ →+* R₃\nτ₁₃ : R →+* R₃\ninst✝¹ : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃\nF : Type u_20\nsc : SemilinearMapClass F τ₁₂ M M₂\nf : F\ninst✝ : RingHomSurjective τ₁₂\np : Submodule R M\nh : ker f ≤ p\n⊢ 0 ∈ Set.range ↑f ∧ ↑f ⁻¹' {0} ⊆ ↑p\n[PROOFSTEP]\nexact ⟨⟨0, map_zero f⟩, h⟩\n[GOAL]\ncase mpr\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁰ : Ring R\ninst✝⁹ : Ring R₂\ninst✝⁸ : Ring R₃\ninst✝⁷ : AddCommGroup M\ninst✝⁶ : AddCommGroup M₂\ninst✝⁵ : AddCommGroup M₃\ninst✝⁴ : Module R M\ninst✝³ : Module R₂ M₂\ninst✝² : Module R₃ M₃\nτ₁₂ : R →+* R₂\nτ₂₃ : R₂ →+* R₃\nτ₁₃ : R →+* R₃\ninst✝¹ : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃\nF : Type u_20\nsc : SemilinearMapClass F τ₁₂ M M₂\nf : F\ninst✝ : RingHomSurjective τ₁₂\np : Submodule R M\n⊢ (∃ y, y ∈ range f ∧ ↑f ⁻¹' {y} ⊆ ↑p) → ker f ≤ p\n[PROOFSTEP]\nrintro ⟨y, h₁, h₂⟩\n[GOAL]\ncase mpr.intro.intro\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁰ : Ring R\ninst✝⁹ : Ring R₂\ninst✝⁸ : Ring R₃\ninst✝⁷ : AddCommGroup M\ninst✝⁶ : AddCommGroup M₂\ninst✝⁵ : AddCommGroup M₃\ninst✝⁴ : Module R M\ninst✝³ : Module R₂ M₂\ninst✝² : Module R₃ M₃\nτ₁₂ : R →+* R₂\nτ₂₃ : R₂ →+* R₃\nτ₁₃ : R →+* R₃\ninst✝¹ : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃\nF : Type u_20\nsc : SemilinearMapClass F τ₁₂ M M₂\nf : F\ninst✝ : RingHomSurjective τ₁₂\np : Submodule R M\ny : M₂\nh₁ : y ∈ range f\nh₂ : ↑f ⁻¹' {y} ⊆ ↑p\n⊢ ker f ≤ p\n[PROOFSTEP]\nrw [SetLike.le_def]\n[GOAL]\ncase mpr.intro.intro\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁰ : Ring R\ninst✝⁹ : Ring R₂\ninst✝⁸ : Ring R₃\ninst✝⁷ : AddCommGroup M\ninst✝⁶ : AddCommGroup M₂\ninst✝⁵ : AddCommGroup M₃\ninst✝⁴ : Module R M\ninst✝³ : Module R₂ M₂\ninst✝² : Module R₃ M₃\nτ₁₂ : R →+* R₂\nτ₂₃ : R₂ →+* R₃\nτ₁₃ : R →+* R₃\ninst✝¹ : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃\nF : Type u_20\nsc : SemilinearMapClass F τ₁₂ M M₂\nf : F\ninst✝ : RingHomSurjective τ₁₂\np : Submodule R M\ny : M₂\nh₁ : y ∈ range f\nh₂ : ↑f ⁻¹' {y} ⊆ ↑p\n⊢ ∀ ⦃x : M⦄, x ∈ ker f → x ∈ p\n[PROOFSTEP]\nintro z hz\n[GOAL]\ncase mpr.intro.intro\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁰ : Ring R\ninst✝⁹ : Ring R₂\ninst✝⁸ : Ring R₃\ninst✝⁷ : AddCommGroup M\ninst✝⁶ : AddCommGroup M₂\ninst✝⁵ : AddCommGroup M₃\ninst✝⁴ : Module R M\ninst✝³ : Module R₂ M₂\ninst✝² : Module R₃ M₃\nτ₁₂ : R →+* R₂\nτ₂₃ : R₂ →+* R₃\nτ₁₃ : R →+* R₃\ninst✝¹ : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃\nF : Type u_20\nsc : SemilinearMapClass F τ₁₂ M M₂\nf : F\ninst✝ : RingHomSurjective τ₁₂\np : Submodule R M\ny : M₂\nh₁ : y ∈ range f\nh₂ : ↑f ⁻¹' {y} ⊆ ↑p\nz : M\nhz : z ∈ ker f\n⊢ z ∈ p\n[PROOFSTEP]\nsimp only [mem_ker, SetLike.mem_coe] at hz \n[GOAL]\ncase mpr.intro.intro\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁰ : Ring R\ninst✝⁹ : Ring R₂\ninst✝⁸ : Ring R₃\ninst✝⁷ : AddCommGroup M\ninst✝⁶ : AddCommGroup M₂\ninst✝⁵ : AddCommGroup M₃\ninst✝⁴ : Module R M\ninst✝³ : Module R₂ M₂\ninst✝² : Module R₃ M₃\nτ₁₂ : R →+* R₂\nτ₂₃ : R₂ →+* R₃\nτ₁₃ : R →+* R₃\ninst✝¹ : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃\nF : Type u_20\nsc : SemilinearMapClass F τ₁₂ M M₂\nf : F\ninst✝ : RingHomSurjective τ₁₂\np : Submodule R M\ny : M₂\nh₁ : y ∈ range f\nh₂ : ↑f ⁻¹' {y} ⊆ ↑p\nz : M\nhz : ↑f z = 0\n⊢ z ∈ p\n[PROOFSTEP]\nrw [← SetLike.mem_coe, range_coe, Set.mem_range] at h₁ \n[GOAL]\ncase mpr.intro.intro\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁰ : Ring R\ninst✝⁹ : Ring R₂\ninst✝⁸ : Ring R₃\ninst✝⁷ : AddCommGroup M\ninst✝⁶ : AddCommGroup M₂\ninst✝⁵ : AddCommGroup M₃\ninst✝⁴ : Module R M\ninst✝³ : Module R₂ M₂\ninst✝² : Module R₃ M₃\nτ₁₂ : R →+* R₂\nτ₂₃ : R₂ →+* R₃\nτ₁₃ : R →+* R₃\ninst✝¹ : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃\nF : Type u_20\nsc : SemilinearMapClass F τ₁₂ M M₂\nf : F\ninst✝ : RingHomSurjective τ₁₂\np : Submodule R M\ny : M₂\nh₁ : ∃ y_1, ↑f y_1 = y\nh₂ : ↑f ⁻¹' {y} ⊆ ↑p\nz : M\nhz : ↑f z = 0\n⊢ z ∈ p\n[PROOFSTEP]\nobtain ⟨x, hx⟩ := h₁\n[GOAL]\ncase mpr.intro.intro.intro\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁰ : Ring R\ninst✝⁹ : Ring R₂\ninst✝⁸ : Ring R₃\ninst✝⁷ : AddCommGroup M\ninst✝⁶ : AddCommGroup M₂\ninst✝⁵ : AddCommGroup M₃\ninst✝⁴ : Module R M\ninst✝³ : Module R₂ M₂\ninst✝² : Module R₃ M₃\nτ₁₂ : R →+* R₂\nτ₂₃ : R₂ →+* R₃\nτ₁₃ : R →+* R₃\ninst✝¹ : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃\nF : Type u_20\nsc : SemilinearMapClass F τ₁₂ M M₂\nf : F\ninst✝ : RingHomSurjective τ₁₂\np : Submodule R M\ny : M₂\nh₂ : ↑f ⁻¹' {y} ⊆ ↑p\nz : M\nhz : ↑f z = 0\nx : M\nhx : ↑f x = y\n⊢ z ∈ p\n[PROOFSTEP]\nhave hx' : x ∈ p := h₂ hx\n[GOAL]\ncase mpr.intro.intro.intro\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁰ : Ring R\ninst✝⁹ : Ring R₂\ninst✝⁸ : Ring R₃\ninst✝⁷ : AddCommGroup M\ninst✝⁶ : AddCommGroup M₂\ninst✝⁵ : AddCommGroup M₃\ninst✝⁴ : Module R M\ninst✝³ : Module R₂ M₂\ninst✝² : Module R₃ M₃\nτ₁₂ : R →+* R₂\nτ₂₃ : R₂ →+* R₃\nτ₁₃ : R →+* R₃\ninst✝¹ : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃\nF : Type u_20\nsc : SemilinearMapClass F τ₁₂ M M₂\nf : F\ninst✝ : RingHomSurjective τ₁₂\np : Submodule R M\ny : M₂\nh₂ : ↑f ⁻¹' {y} ⊆ ↑p\nz : M\nhz : ↑f z = 0\nx : M\nhx : ↑f x = y\nhx' : x ∈ p\n⊢ z ∈ p\n[PROOFSTEP]\nhave hxz : z + x ∈ p := by\n  apply h₂\n  simp [hx, hz]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁰ : Ring R\ninst✝⁹ : Ring R₂\ninst✝⁸ : Ring R₃\ninst✝⁷ : AddCommGroup M\ninst✝⁶ : AddCommGroup M₂\ninst✝⁵ : AddCommGroup M₃\ninst✝⁴ : Module R M\ninst✝³ : Module R₂ M₂\ninst✝² : Module R₃ M₃\nτ₁₂ : R →+* R₂\nτ₂₃ : R₂ →+* R₃\nτ₁₃ : R →+* R₃\ninst✝¹ : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃\nF : Type u_20\nsc : SemilinearMapClass F τ₁₂ M M₂\nf : F\ninst✝ : RingHomSurjective τ₁₂\np : Submodule R M\ny : M₂\nh₂ : ↑f ⁻¹' {y} ⊆ ↑p\nz : M\nhz : ↑f z = 0\nx : M\nhx : ↑f x = y\nhx' : x ∈ p\n⊢ z + x ∈ p\n[PROOFSTEP]\napply h₂\n[GOAL]\ncase a\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁰ : Ring R\ninst✝⁹ : Ring R₂\ninst✝⁸ : Ring R₃\ninst✝⁷ : AddCommGroup M\ninst✝⁶ : AddCommGroup M₂\ninst✝⁵ : AddCommGroup M₃\ninst✝⁴ : Module R M\ninst✝³ : Module R₂ M₂\ninst✝² : Module R₃ M₃\nτ₁₂ : R →+* R₂\nτ₂₃ : R₂ →+* R₃\nτ₁₃ : R →+* R₃\ninst✝¹ : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃\nF : Type u_20\nsc : SemilinearMapClass F τ₁₂ M M₂\nf : F\ninst✝ : RingHomSurjective τ₁₂\np : Submodule R M\ny : M₂\nh₂ : ↑f ⁻¹' {y} ⊆ ↑p\nz : M\nhz : ↑f z = 0\nx : M\nhx : ↑f x = y\nhx' : x ∈ p\n⊢ z + x ∈ ↑f ⁻¹' {y}\n[PROOFSTEP]\nsimp [hx, hz]\n[GOAL]\ncase mpr.intro.intro.intro\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁰ : Ring R\ninst✝⁹ : Ring R₂\ninst✝⁸ : Ring R₃\ninst✝⁷ : AddCommGroup M\ninst✝⁶ : AddCommGroup M₂\ninst✝⁵ : AddCommGroup M₃\ninst✝⁴ : Module R M\ninst✝³ : Module R₂ M₂\ninst✝² : Module R₃ M₃\nτ₁₂ : R →+* R₂\nτ₂₃ : R₂ →+* R₃\nτ₁₃ : R →+* R₃\ninst✝¹ : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃\nF : Type u_20\nsc : SemilinearMapClass F τ₁₂ M M₂\nf : F\ninst✝ : RingHomSurjective τ₁₂\np : Submodule R M\ny : M₂\nh₂ : ↑f ⁻¹' {y} ⊆ ↑p\nz : M\nhz : ↑f z = 0\nx : M\nhx : ↑f x = y\nhx' : x ∈ p\nhxz : z + x ∈ p\n⊢ z ∈ p\n[PROOFSTEP]\nsuffices z + x - x ∈ p by simpa only [this, add_sub_cancel]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁰ : Ring R\ninst✝⁹ : Ring R₂\ninst✝⁸ : Ring R₃\ninst✝⁷ : AddCommGroup M\ninst✝⁶ : AddCommGroup M₂\ninst✝⁵ : AddCommGroup M₃\ninst✝⁴ : Module R M\ninst✝³ : Module R₂ M₂\ninst✝² : Module R₃ M₃\nτ₁₂ : R →+* R₂\nτ₂₃ : R₂ →+* R₃\nτ₁₃ : R →+* R₃\ninst✝¹ : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃\nF : Type u_20\nsc : SemilinearMapClass F τ₁₂ M M₂\nf : F\ninst✝ : RingHomSurjective τ₁₂\np : Submodule R M\ny : M₂\nh₂ : ↑f ⁻¹' {y} ⊆ ↑p\nz : M\nhz : ↑f z = 0\nx : M\nhx : ↑f x = y\nhx' : x ∈ p\nhxz : z + x ∈ p\nthis : z + x - x ∈ p\n⊢ z ∈ p\n[PROOFSTEP]\nsimpa only [this, add_sub_cancel]\n[GOAL]\ncase mpr.intro.intro.intro\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁰ : Ring R\ninst✝⁹ : Ring R₂\ninst✝⁸ : Ring R₃\ninst✝⁷ : AddCommGroup M\ninst✝⁶ : AddCommGroup M₂\ninst✝⁵ : AddCommGroup M₃\ninst✝⁴ : Module R M\ninst✝³ : Module R₂ M₂\ninst✝² : Module R₃ M₃\nτ₁₂ : R →+* R₂\nτ₂₃ : R₂ →+* R₃\nτ₁₃ : R →+* R₃\ninst✝¹ : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃\nF : Type u_20\nsc : SemilinearMapClass F τ₁₂ M M₂\nf : F\ninst✝ : RingHomSurjective τ₁₂\np : Submodule R M\ny : M₂\nh₂ : ↑f ⁻¹' {y} ⊆ ↑p\nz : M\nhz : ↑f z = 0\nx : M\nhx : ↑f x = y\nhx' : x ∈ p\nhxz : z + x ∈ p\n⊢ z + x - x ∈ p\n[PROOFSTEP]\nexact p.sub_mem hxz hx'\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝⁵ : Semifield K\ninst✝⁴ : Semifield K₂\ninst✝³ : AddCommMonoid V\ninst✝² : Module K V\ninst✝¹ : AddCommMonoid V₂\ninst✝ : Module K V₂\nf : V →ₗ[K] V₂\na : K\nh : a ≠ 0\n⊢ range (a • f) = range f\n[PROOFSTEP]\nsimpa only [range_eq_map] using Submodule.map_smul f _ a h\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝⁵ : Semifield K\ninst✝⁴ : Semifield K₂\ninst✝³ : AddCommMonoid V\ninst✝² : Module K V\ninst✝¹ : AddCommMonoid V₂\ninst✝ : Module K V₂\nf : V →ₗ[K] V₂\na : K\n⊢ range (a • f) = ⨆ (_ : a ≠ 0), range f\n[PROOFSTEP]\nsimpa only [range_eq_map] using Submodule.map_smul' f _ a\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\n⊢ IsLinearMap R fun x => x.fst + x.snd\n[PROOFSTEP]\napply IsLinearMap.mk\n[GOAL]\ncase map_add\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\n⊢ ∀ (x y : M × M), (x + y).fst + (x + y).snd = x.fst + x.snd + (y.fst + y.snd)\n[PROOFSTEP]\nintro x y\n[GOAL]\ncase map_add\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nx y : M × M\n⊢ (x + y).fst + (x + y).snd = x.fst + x.snd + (y.fst + y.snd)\n[PROOFSTEP]\nsimp only [Prod.fst_add, Prod.snd_add]\n[GOAL]\ncase map_add\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nx y : M × M\n⊢ x.fst + y.fst + (x.snd + y.snd) = x.fst + x.snd + (y.fst + y.snd)\n[PROOFSTEP]\nabel\n  -- Porting Note: was cc\n[GOAL]\ncase map_add\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nx y : M × M\n⊢ x.fst + y.fst + (x.snd + y.snd) = x.fst + x.snd + (y.fst + y.snd)\n[PROOFSTEP]\nabel\n  -- Porting Note: was cc\n[GOAL]\ncase map_smul\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\n⊢ ∀ (c : R) (x : M × M), (c • x).fst + (c • x).snd = c • (x.fst + x.snd)\n[PROOFSTEP]\nintro x y\n[GOAL]\ncase map_smul\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nx : R\ny : M × M\n⊢ (x • y).fst + (x • y).snd = x • (y.fst + y.snd)\n[PROOFSTEP]\nsimp [smul_add]\n[GOAL]\nR✝ : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM✝ : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\nR : Type u_20\nM : Type u_21\ninst✝² : Semiring R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\n⊢ IsLinearMap R fun x => x.fst - x.snd\n[PROOFSTEP]\napply IsLinearMap.mk\n[GOAL]\ncase map_add\nR✝ : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM✝ : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\nR : Type u_20\nM : Type u_21\ninst✝² : Semiring R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\n⊢ ∀ (x y : M × M), (x + y).fst - (x + y).snd = x.fst - x.snd + (y.fst - y.snd)\n[PROOFSTEP]\nintro x y\n[GOAL]\ncase map_add\nR✝ : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM✝ : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\nR : Type u_20\nM : Type u_21\ninst✝² : Semiring R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nx y : M × M\n⊢ (x + y).fst - (x + y).snd = x.fst - x.snd + (y.fst - y.snd)\n[PROOFSTEP]\nrw [Prod.fst_add, Prod.snd_add]\n[GOAL]\ncase map_add\nR✝ : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM✝ : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\nR : Type u_20\nM : Type u_21\ninst✝² : Semiring R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nx y : M × M\n⊢ x.fst + y.fst - (x.snd + y.snd) = x.fst - x.snd + (y.fst - y.snd)\n[PROOFSTEP]\nabel\n[GOAL]\ncase map_add\nR✝ : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM✝ : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\nR : Type u_20\nM : Type u_21\ninst✝² : Semiring R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nx y : M × M\n⊢ x.fst + y.fst - (x.snd + y.snd) = x.fst - x.snd + (y.fst - y.snd)\n[PROOFSTEP]\nabel\n[GOAL]\ncase map_smul\nR✝ : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM✝ : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\nR : Type u_20\nM : Type u_21\ninst✝² : Semiring R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\n⊢ ∀ (c : R) (x : M × M), (c • x).fst - (c • x).snd = c • (x.fst - x.snd)\n[PROOFSTEP]\nintro x y\n[GOAL]\ncase map_smul\nR✝ : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM✝ : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\nR : Type u_20\nM : Type u_21\ninst✝² : Semiring R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nx : R\ny : M × M\n⊢ (x • y).fst - (x • y).snd = x • (y.fst - y.snd)\n[PROOFSTEP]\nsimp [smul_sub]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝⁵ : Semiring R\ninst✝⁴ : Semiring R₂\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R₂ M₂\np p' : Submodule R M\nq : Submodule R₂ M₂\nτ₁₂ : R →+* R₂\nF : Type u_20\nsc : SemilinearMapClass F τ₁₂ M M₂\n⊢ range (Submodule.subtype p) = p\n[PROOFSTEP]\nsimpa using map_comap_subtype p ⊤\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝⁵ : Semiring R\ninst✝⁴ : Semiring R₂\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R₂ M₂\np p'✝ : Submodule R M\nq : Submodule R₂ M₂\nτ₁₂ : R →+* R₂\nF : Type u_20\nsc : SemilinearMapClass F τ₁₂ M M₂\np' : Submodule R { x // x ∈ p }\n⊢ map (Submodule.subtype p) p' ≤ p\n[PROOFSTEP]\nsimpa using (map_le_range : map p.subtype p' ≤ range p.subtype)\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝⁵ : Semiring R\ninst✝⁴ : Semiring R₂\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R₂ M₂\np p' : Submodule R M\nq : Submodule R₂ M₂\nτ₁₂ : R →+* R₂\nF : Type u_20\nsc : SemilinearMapClass F τ₁₂ M M₂\n⊢ map (Submodule.subtype p) ⊤ = p\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝⁵ : Semiring R\ninst✝⁴ : Semiring R₂\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R₂ M₂\np✝ p'✝ : Submodule R M\nq : Submodule R₂ M₂\nτ₁₂ : R →+* R₂\nF : Type u_20\nsc : SemilinearMapClass F τ₁₂ M M₂\np p' : Submodule R M\n⊢ map (Submodule.subtype p) ⊤ ≤ p' ↔ p ≤ p'\n[PROOFSTEP]\nrw [map_subtype_top]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝⁵ : Semiring R\ninst✝⁴ : Semiring R₂\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R₂ M₂\np✝ p'✝ : Submodule R M\nq : Submodule R₂ M₂\nτ₁₂ : R →+* R₂\nF : Type u_20\nsc : SemilinearMapClass F τ₁₂ M M₂\np p' : Submodule R M\nh : p ≤ p'\n⊢ ker (ofLe h) = ⊥\n[PROOFSTEP]\nrw [ofLe, ker_codRestrict, ker_subtype]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝⁵ : Semiring R\ninst✝⁴ : Semiring R₂\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R₂ M₂\np✝ p' : Submodule R M\nq✝ : Submodule R₂ M₂\nτ₁₂ : R →+* R₂\nF : Type u_20\nsc : SemilinearMapClass F τ₁₂ M M₂\np q : Submodule R M\nh : p ≤ q\n⊢ range (ofLe h) = comap (Submodule.subtype q) p\n[PROOFSTEP]\nrw [← map_top, ofLe, LinearMap.map_codRestrict, map_top, range_subtype]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝⁵ : Semiring R\ninst✝⁴ : Semiring R₂\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R₂ M₂\np✝ p'✝ : Submodule R M\nq : Submodule R₂ M₂\nτ₁₂ : R →+* R₂\nF : Type u_20\nsc : SemilinearMapClass F τ₁₂ M M₂\np p' : Submodule R M\nh : p ≤ p'\n⊢ map (Submodule.subtype p') (range (ofLe h)) = p\n[PROOFSTEP]\nsimp [range_ofLe, map_comap_eq, h]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝⁵ : Semiring R\ninst✝⁴ : Semiring R₂\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R₂ M₂\np✝ p' : Submodule R M\nq✝ : Submodule R₂ M₂\nτ₁₂ : R →+* R₂\nF : Type u_20\nsc : SemilinearMapClass F τ₁₂ M M₂\np q : Submodule R M\n⊢ Disjoint p q ↔ comap (Submodule.subtype p) q = ⊥\n[PROOFSTEP]\nrw [← (map_injective_of_injective (show Injective p.subtype from Subtype.coe_injective)).eq_iff, map_comap_subtype,\n  map_bot, disjoint_iff]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝⁵ : Semiring R\ninst✝⁴ : Semiring R₂\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R₂ M₂\np p'✝ : Submodule R M\nq : Submodule R₂ M₂\nτ₁₂ : R →+* R₂\nF : Type u_20\nsc : SemilinearMapClass F τ₁₂ M M₂\np' : Submodule R { x // x ∈ p }\n⊢ Injective ↑(Submodule.subtype p)\n[PROOFSTEP]\nexact Subtype.val_injective\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝⁵ : Semiring R\ninst✝⁴ : Semiring R₂\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R₂ M₂\np p' : Submodule R M\nq✝ : Submodule R₂ M₂\nτ₁₂ : R →+* R₂\nF : Type u_20\nsc : SemilinearMapClass F τ₁₂ M M₂\nx✝ : { p' // p' ≤ p }\nq : Submodule R M\nhq : q ≤ p\n⊢ ↑((fun p' => { val := map (Submodule.subtype p) p', property := (_ : map (Submodule.subtype p) p' ≤ p) })\n        ((fun q => comap (Submodule.subtype p) ↑q) { val := q, property := hq })) =\n    ↑{ val := q, property := hq }\n[PROOFSTEP]\nsimp [map_comap_subtype p, inf_of_le_right hq]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝⁵ : Semiring R\ninst✝⁴ : Semiring R₂\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R₂ M₂\np p' : Submodule R M\nq : Submodule R₂ M₂\nτ₁₂ : R →+* R₂\nF : Type u_20\nsc : SemilinearMapClass F τ₁₂ M M₂\np₁ p₂ : Submodule R { x // x ∈ p }\n⊢ ↑(↑{ toFun := fun p' => { val := map (Submodule.subtype p) p', property := (_ : map (Submodule.subtype p) p' ≤ p) },\n              invFun := fun q => comap (Submodule.subtype p) ↑q,\n              left_inv :=\n                (_ :\n                  ∀ (p' : Submodule R { x // x ∈ p }), comap (Submodule.subtype p) (map (Submodule.subtype p) p') = p'),\n              right_inv :=\n                (_ :\n                  ∀ (x : { p' // p' ≤ p }),\n                    (fun p' =>\n                          { val := map (Submodule.subtype p) p', property := (_ : map (Submodule.subtype p) p' ≤ p) })\n                        ((fun q => comap (Submodule.subtype p) ↑q) x) =\n                      x) }\n          p₁) ≤\n      ↑(↑{\n              toFun := fun p' =>\n                { val := map (Submodule.subtype p) p', property := (_ : map (Submodule.subtype p) p' ≤ p) },\n              invFun := fun q => comap (Submodule.subtype p) ↑q,\n              left_inv :=\n                (_ :\n                  ∀ (p' : Submodule R { x // x ∈ p }), comap (Submodule.subtype p) (map (Submodule.subtype p) p') = p'),\n              right_inv :=\n                (_ :\n                  ∀ (x : { p' // p' ≤ p }),\n                    (fun p' =>\n                          { val := map (Submodule.subtype p) p', property := (_ : map (Submodule.subtype p) p' ≤ p) })\n                        ((fun q => comap (Submodule.subtype p) ↑q) x) =\n                      x) }\n          p₂) ↔\n    p₁ ≤ p₂\n[PROOFSTEP]\ndsimp\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝⁵ : Semiring R\ninst✝⁴ : Semiring R₂\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R₂ M₂\np p' : Submodule R M\nq : Submodule R₂ M₂\nτ₁₂ : R →+* R₂\nF : Type u_20\nsc : SemilinearMapClass F τ₁₂ M M₂\np₁ p₂ : Submodule R { x // x ∈ p }\n⊢ map (Submodule.subtype p) p₁ ≤ map (Submodule.subtype p) p₂ ↔ p₁ ≤ p₂\n[PROOFSTEP]\nrw [map_le_iff_le_comap, comap_map_eq_of_injective (show Injective p.subtype from Subtype.coe_injective) p₂]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring R₂\ninst✝⁷ : Semiring R₃\ninst✝⁶ : AddCommMonoid M\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : AddCommMonoid M₃\ninst✝³ : Module R M\ninst✝² : Module R₂ M₂\ninst✝¹ : Module R₃ M₃\nτ₁₂ : R →+* R₂\nτ₂₃ : R₂ →+* R₃\nτ₁₃ : R →+* R₃\ninst✝ : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃\nf : M →ₛₗ[τ₁₂] M₂\nh : ∀ (u v : { x // x ∈ ker f } →ₗ[R] M), comp f u = comp f v → u = v\n⊢ ker f = ⊥\n[PROOFSTEP]\nhave h₁ : f.comp (0 : ker f →ₗ[R] M) = 0 := comp_zero _\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring R₂\ninst✝⁷ : Semiring R₃\ninst✝⁶ : AddCommMonoid M\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : AddCommMonoid M₃\ninst✝³ : Module R M\ninst✝² : Module R₂ M₂\ninst✝¹ : Module R₃ M₃\nτ₁₂ : R →+* R₂\nτ₂₃ : R₂ →+* R₃\nτ₁₃ : R →+* R₃\ninst✝ : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃\nf : M →ₛₗ[τ₁₂] M₂\nh : ∀ (u v : { x // x ∈ ker f } →ₗ[R] M), comp f u = comp f v → u = v\nh₁ : comp f 0 = 0\n⊢ ker f = ⊥\n[PROOFSTEP]\nrw [← Submodule.range_subtype (ker f), ← h 0 f.ker.subtype (Eq.trans h₁ (comp_ker_subtype f).symm)]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring R₂\ninst✝⁷ : Semiring R₃\ninst✝⁶ : AddCommMonoid M\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : AddCommMonoid M₃\ninst✝³ : Module R M\ninst✝² : Module R₂ M₂\ninst✝¹ : Module R₃ M₃\nτ₁₂ : R →+* R₂\nτ₂₃ : R₂ →+* R₃\nτ₁₃ : R →+* R₃\ninst✝ : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃\nf : M →ₛₗ[τ₁₂] M₂\nh : ∀ (u v : { x // x ∈ ker f } →ₗ[R] M), comp f u = comp f v → u = v\nh₁ : comp f 0 = 0\n⊢ range 0 = ⊥\n[PROOFSTEP]\nexact range_zero\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹² : Semiring R\ninst✝¹¹ : Semiring R₂\ninst✝¹⁰ : Semiring R₃\ninst✝⁹ : AddCommMonoid M\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : AddCommMonoid M₃\ninst✝⁶ : Module R M\ninst✝⁵ : Module R₂ M₂\ninst✝⁴ : Module R₃ M₃\nτ₁₂ : R →+* R₂\nτ₂₃ : R₂ →+* R₃\nτ₁₃ : R →+* R₃\ninst✝³ : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃\ninst✝² : RingHomSurjective τ₁₂\ninst✝¹ : RingHomSurjective τ₂₃\ninst✝ : RingHomSurjective τ₁₃\nf : M →ₛₗ[τ₁₂] M₂\ng : M₂ →ₛₗ[τ₂₃] M₃\nhf : range f = ⊤\n⊢ range (comp g f) = range g\n[PROOFSTEP]\nrw [range_comp, hf, Submodule.map_top]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring R₂\ninst✝⁷ : Semiring R₃\ninst✝⁶ : AddCommMonoid M\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : AddCommMonoid M₃\ninst✝³ : Module R M\ninst✝² : Module R₂ M₂\ninst✝¹ : Module R₃ M₃\nτ₁₂ : R →+* R₂\nτ₂₃ : R₂ →+* R₃\nτ₁₃ : R →+* R₃\ninst✝ : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃\nf : M →ₛₗ[τ₁₂] M₂\ng : M₂ →ₛₗ[τ₂₃] M₃\nhg : ker g = ⊥\n⊢ ker (comp g f) = ker f\n[PROOFSTEP]\nrw [ker_comp, hg, Submodule.comap_bot]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM'✝ : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN✝ : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : Semiring R₂\ninst✝⁹ : Semiring R₃\ninst✝⁸ : AddCommMonoid M\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : AddCommMonoid M₃\ninst✝⁵ : Module R M\ninst✝⁴ : Module R₂ M₂\ninst✝³ : Module R₃ M₃\nτ₁₂ : R →+* R₂\nτ₂₃ : R₂ →+* R₃\nτ₁₃ : R →+* R₃\ninst✝² : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃\nM' : Type u_20\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nO : Submodule R M\nϕ : { x // x ∈ O } →ₗ[R] M'\nN : Submodule R M\nx : M'\n⊢ x ∈ submoduleImage ϕ N ↔ ∃ y yO x_1, ↑ϕ { val := y, property := yO } = x\n[PROOFSTEP]\nrefine' Submodule.mem_map.trans ⟨_, _⟩\n[GOAL]\ncase refine'_1\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM'✝ : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN✝ : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : Semiring R₂\ninst✝⁹ : Semiring R₃\ninst✝⁸ : AddCommMonoid M\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : AddCommMonoid M₃\ninst✝⁵ : Module R M\ninst✝⁴ : Module R₂ M₂\ninst✝³ : Module R₃ M₃\nτ₁₂ : R →+* R₂\nτ₂₃ : R₂ →+* R₃\nτ₁₃ : R →+* R₃\ninst✝² : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃\nM' : Type u_20\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nO : Submodule R M\nϕ : { x // x ∈ O } →ₗ[R] M'\nN : Submodule R M\nx : M'\n⊢ (∃ y, y ∈ Submodule.comap (Submodule.subtype O) N ∧ ↑ϕ y = x) → ∃ y yO x_1, ↑ϕ { val := y, property := yO } = x\n[PROOFSTEP]\nsimp_rw [Submodule.mem_comap]\n[GOAL]\ncase refine'_2\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM'✝ : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN✝ : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : Semiring R₂\ninst✝⁹ : Semiring R₃\ninst✝⁸ : AddCommMonoid M\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : AddCommMonoid M₃\ninst✝⁵ : Module R M\ninst✝⁴ : Module R₂ M₂\ninst✝³ : Module R₃ M₃\nτ₁₂ : R →+* R₂\nτ₂₃ : R₂ →+* R₃\nτ₁₃ : R →+* R₃\ninst✝² : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃\nM' : Type u_20\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nO : Submodule R M\nϕ : { x // x ∈ O } →ₗ[R] M'\nN : Submodule R M\nx : M'\n⊢ (∃ y yO x_1, ↑ϕ { val := y, property := yO } = x) → ∃ y, y ∈ Submodule.comap (Submodule.subtype O) N ∧ ↑ϕ y = x\n[PROOFSTEP]\nsimp_rw [Submodule.mem_comap]\n[GOAL]\ncase refine'_1\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM'✝ : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN✝ : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : Semiring R₂\ninst✝⁹ : Semiring R₃\ninst✝⁸ : AddCommMonoid M\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : AddCommMonoid M₃\ninst✝⁵ : Module R M\ninst✝⁴ : Module R₂ M₂\ninst✝³ : Module R₃ M₃\nτ₁₂ : R →+* R₂\nτ₂₃ : R₂ →+* R₃\nτ₁₃ : R →+* R₃\ninst✝² : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃\nM' : Type u_20\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nO : Submodule R M\nϕ : { x // x ∈ O } →ₗ[R] M'\nN : Submodule R M\nx : M'\n⊢ (∃ y, ↑(Submodule.subtype O) y ∈ N ∧ ↑ϕ y = x) → ∃ y h h_1, ↑ϕ { val := y, property := (_ : y ∈ O) } = x\n[PROOFSTEP]\nrintro ⟨⟨y, yO⟩, yN : y ∈ N, h⟩\n[GOAL]\ncase refine'_1.intro.mk.intro\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM'✝ : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN✝ : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : Semiring R₂\ninst✝⁹ : Semiring R₃\ninst✝⁸ : AddCommMonoid M\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : AddCommMonoid M₃\ninst✝⁵ : Module R M\ninst✝⁴ : Module R₂ M₂\ninst✝³ : Module R₃ M₃\nτ₁₂ : R →+* R₂\nτ₂₃ : R₂ →+* R₃\nτ₁₃ : R →+* R₃\ninst✝² : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃\nM' : Type u_20\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nO : Submodule R M\nϕ : { x // x ∈ O } →ₗ[R] M'\nN : Submodule R M\nx : M'\ny : M\nyO : y ∈ O\nyN : y ∈ N\nh : ↑ϕ { val := y, property := yO } = x\n⊢ ∃ y h h_1, ↑ϕ { val := y, property := (_ : y ∈ O) } = x\n[PROOFSTEP]\nexact ⟨y, yO, yN, h⟩\n[GOAL]\ncase refine'_2\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM'✝ : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN✝ : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : Semiring R₂\ninst✝⁹ : Semiring R₃\ninst✝⁸ : AddCommMonoid M\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : AddCommMonoid M₃\ninst✝⁵ : Module R M\ninst✝⁴ : Module R₂ M₂\ninst✝³ : Module R₃ M₃\nτ₁₂ : R →+* R₂\nτ₂₃ : R₂ →+* R₃\nτ₁₃ : R →+* R₃\ninst✝² : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃\nM' : Type u_20\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nO : Submodule R M\nϕ : { x // x ∈ O } →ₗ[R] M'\nN : Submodule R M\nx : M'\n⊢ (∃ y h h_1, ↑ϕ { val := y, property := (_ : y ∈ O) } = x) → ∃ y, ↑(Submodule.subtype O) y ∈ N ∧ ↑ϕ y = x\n[PROOFSTEP]\nrintro ⟨y, yO, yN, h⟩\n[GOAL]\ncase refine'_2.intro.intro.intro\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM'✝ : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN✝ : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : Semiring R₂\ninst✝⁹ : Semiring R₃\ninst✝⁸ : AddCommMonoid M\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : AddCommMonoid M₃\ninst✝⁵ : Module R M\ninst✝⁴ : Module R₂ M₂\ninst✝³ : Module R₃ M₃\nτ₁₂ : R →+* R₂\nτ₂₃ : R₂ →+* R₃\nτ₁₃ : R →+* R₃\ninst✝² : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃\nM' : Type u_20\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nO : Submodule R M\nϕ : { x // x ∈ O } →ₗ[R] M'\nN : Submodule R M\nx : M'\ny : M\nyO : y ∈ O\nyN : y ∈ N\nh : ↑ϕ { val := y, property := (_ : y ∈ O) } = x\n⊢ ∃ y, ↑(Submodule.subtype O) y ∈ N ∧ ↑ϕ y = x\n[PROOFSTEP]\nexact ⟨⟨y, yO⟩, yN, h⟩\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM'✝ : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN✝ : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : Semiring R₂\ninst✝⁹ : Semiring R₃\ninst✝⁸ : AddCommMonoid M\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : AddCommMonoid M₃\ninst✝⁵ : Module R M\ninst✝⁴ : Module R₂ M₂\ninst✝³ : Module R₃ M₃\nτ₁₂ : R →+* R₂\nτ₂₃ : R₂ →+* R₃\nτ₁₃ : R →+* R₃\ninst✝² : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃\nM' : Type u_20\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nO : Submodule R M\nϕ : { x // x ∈ O } →ₗ[R] M'\nN : Submodule R M\nhNO : N ≤ O\nx : M'\n⊢ x ∈ submoduleImage ϕ N ↔ ∃ y yN, ↑ϕ { val := y, property := (_ : y ∈ O) } = x\n[PROOFSTEP]\nrefine' mem_submoduleImage.trans ⟨_, _⟩\n[GOAL]\ncase refine'_1\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM'✝ : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN✝ : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : Semiring R₂\ninst✝⁹ : Semiring R₃\ninst✝⁸ : AddCommMonoid M\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : AddCommMonoid M₃\ninst✝⁵ : Module R M\ninst✝⁴ : Module R₂ M₂\ninst✝³ : Module R₃ M₃\nτ₁₂ : R →+* R₂\nτ₂₃ : R₂ →+* R₃\nτ₁₃ : R →+* R₃\ninst✝² : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃\nM' : Type u_20\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nO : Submodule R M\nϕ : { x // x ∈ O } →ₗ[R] M'\nN : Submodule R M\nhNO : N ≤ O\nx : M'\n⊢ (∃ y yO x_1, ↑ϕ { val := y, property := yO } = x) → ∃ y yN, ↑ϕ { val := y, property := (_ : y ∈ O) } = x\n[PROOFSTEP]\nrintro ⟨y, yO, yN, h⟩\n[GOAL]\ncase refine'_1.intro.intro.intro\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM'✝ : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN✝ : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : Semiring R₂\ninst✝⁹ : Semiring R₃\ninst✝⁸ : AddCommMonoid M\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : AddCommMonoid M₃\ninst✝⁵ : Module R M\ninst✝⁴ : Module R₂ M₂\ninst✝³ : Module R₃ M₃\nτ₁₂ : R →+* R₂\nτ₂₃ : R₂ →+* R₃\nτ₁₃ : R →+* R₃\ninst✝² : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃\nM' : Type u_20\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nO : Submodule R M\nϕ : { x // x ∈ O } →ₗ[R] M'\nN : Submodule R M\nhNO : N ≤ O\nx : M'\ny : M\nyO : y ∈ O\nyN : y ∈ N\nh : ↑ϕ { val := y, property := yO } = x\n⊢ ∃ y yN, ↑ϕ { val := y, property := (_ : y ∈ O) } = x\n[PROOFSTEP]\nexact ⟨y, yN, h⟩\n[GOAL]\ncase refine'_2\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM'✝ : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN✝ : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : Semiring R₂\ninst✝⁹ : Semiring R₃\ninst✝⁸ : AddCommMonoid M\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : AddCommMonoid M₃\ninst✝⁵ : Module R M\ninst✝⁴ : Module R₂ M₂\ninst✝³ : Module R₃ M₃\nτ₁₂ : R →+* R₂\nτ₂₃ : R₂ →+* R₃\nτ₁₃ : R →+* R₃\ninst✝² : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃\nM' : Type u_20\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nO : Submodule R M\nϕ : { x // x ∈ O } →ₗ[R] M'\nN : Submodule R M\nhNO : N ≤ O\nx : M'\n⊢ (∃ y yN, ↑ϕ { val := y, property := (_ : y ∈ O) } = x) → ∃ y yO x_1, ↑ϕ { val := y, property := yO } = x\n[PROOFSTEP]\nrintro ⟨y, yN, h⟩\n[GOAL]\ncase refine'_2.intro.intro\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM'✝ : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN✝ : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : Semiring R₂\ninst✝⁹ : Semiring R₃\ninst✝⁸ : AddCommMonoid M\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : AddCommMonoid M₃\ninst✝⁵ : Module R M\ninst✝⁴ : Module R₂ M₂\ninst✝³ : Module R₃ M₃\nτ₁₂ : R →+* R₂\nτ₂₃ : R₂ →+* R₃\nτ₁₃ : R →+* R₃\ninst✝² : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃\nM' : Type u_20\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nO : Submodule R M\nϕ : { x // x ∈ O } →ₗ[R] M'\nN : Submodule R M\nhNO : N ≤ O\nx : M'\ny : M\nyN : y ∈ N\nh : ↑ϕ { val := y, property := (_ : y ∈ O) } = x\n⊢ ∃ y yO x_1, ↑ϕ { val := y, property := yO } = x\n[PROOFSTEP]\nexact ⟨y, hNO yN, yN, h⟩\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM'✝ : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN✝ : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : Semiring R₂\ninst✝⁹ : Semiring R₃\ninst✝⁸ : AddCommMonoid M\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : AddCommMonoid M₃\ninst✝⁵ : Module R M\ninst✝⁴ : Module R₂ M₂\ninst✝³ : Module R₃ M₃\nτ₁₂ : R →+* R₂\nτ₂₃ : R₂ →+* R₃\nτ₁₃ : R →+* R₃\ninst✝² : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃\nM' : Type u_20\ninst✝¹ : AddCommGroup M'\ninst✝ : Module R M'\nO : Submodule R M\nϕ : { x // x ∈ O } →ₗ[R] M'\nN : Submodule R M\nhNO : N ≤ O\n⊢ submoduleImage ϕ N = range (comp ϕ (Submodule.ofLe hNO))\n[PROOFSTEP]\nrw [submoduleImage, range_comp, Submodule.range_ofLe]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R M₂\nf : M →ₗ[R] M₂\n⊢ range (rangeRestrict f) = ⊤\n[PROOFSTEP]\nsimp [f.range_codRestrict _]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring R₂\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : AddCommMonoid M₂\ninst✝⁵ : Module R M\ninst✝⁴ : Module R₂ M₂\nσ₁₂ : R →+* R₂\nσ₂₁ : R₂ →+* R\ninst✝³ : RingHomInvPair σ₁₂ σ₂₁\ninst✝² : RingHomInvPair σ₂₁ σ₁₂\ninst✝¹ : Subsingleton R\ninst✝ : Subsingleton R₂\n⊢ Unique (M ≃ₛₗ[σ₁₂] M₂)\n[PROOFSTEP]\nhaveI := Module.subsingleton R M\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring R₂\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : AddCommMonoid M₂\ninst✝⁵ : Module R M\ninst✝⁴ : Module R₂ M₂\nσ₁₂ : R →+* R₂\nσ₂₁ : R₂ →+* R\ninst✝³ : RingHomInvPair σ₁₂ σ₂₁\ninst✝² : RingHomInvPair σ₂₁ σ₁₂\ninst✝¹ : Subsingleton R\ninst✝ : Subsingleton R₂\nthis : Subsingleton M\n⊢ Unique (M ≃ₛₗ[σ₁₂] M₂)\n[PROOFSTEP]\nhaveI := Module.subsingleton R₂ M₂\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring R₂\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : AddCommMonoid M₂\ninst✝⁵ : Module R M\ninst✝⁴ : Module R₂ M₂\nσ₁₂ : R →+* R₂\nσ₂₁ : R₂ →+* R\ninst✝³ : RingHomInvPair σ₁₂ σ₂₁\ninst✝² : RingHomInvPair σ₂₁ σ₁₂\ninst✝¹ : Subsingleton R\ninst✝ : Subsingleton R₂\nthis✝ : Subsingleton M\nthis : Subsingleton M₂\n⊢ Unique (M ≃ₛₗ[σ₁₂] M₂)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring R₂\ninst✝⁵ : Semiring R₃\ninst✝⁴ : Semiring R₄\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : AddCommMonoid M₃\ninst✝ : AddCommMonoid M₄\nmodule_M : Module R M\nmodule_M₂ : Module R₂ M₂\nσ₁₂ : R →+* R₂\nσ₂₁ : R₂ →+* R\nre₁₂ : RingHomInvPair σ₁₂ σ₂₁\nre₂₁ : RingHomInvPair σ₂₁ σ₁₂\ne e' : M ≃ₛₗ[σ₁₂] M₂\np : Submodule R M\n⊢ ↑(Submodule.map (↑e) p) = ↑(Submodule.comap (↑(symm e)) p)\n[PROOFSTEP]\nsimp [e.image_eq_preimage]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring R₂\ninst✝⁵ : Semiring R₃\ninst✝⁴ : Semiring R₄\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : AddCommMonoid M₃\ninst✝ : AddCommMonoid M₄\nmodule_M : Module R M\nmodule_M₂ : Module R₂ M₂\nσ₁₂ : R →+* R₂\nσ₂₁ : R₂ →+* R\nre₁₂ : RingHomInvPair σ₁₂ σ₂₁\nre₂₁ : RingHomInvPair σ₂₁ σ₁₂\ne e' : M ≃ₛₗ[σ₁₂] M₂\np : Submodule R M\nx : { x // x ∈ p }\n⊢ ↑x ∈ ↑p ∧ ↑↑e ↑x = ↑(LinearMap.domRestrict (↑e) p) x\n[PROOFSTEP]\nsimp only [LinearMap.domRestrict_apply, eq_self_iff_true, and_true_iff, SetLike.coe_mem, SetLike.mem_coe]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring R₂\ninst✝⁵ : Semiring R₃\ninst✝⁴ : Semiring R₄\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : AddCommMonoid M₃\ninst✝ : AddCommMonoid M₄\nmodule_M : Module R M\nmodule_M₂ : Module R₂ M₂\nσ₁₂ : R →+* R₂\nσ₂₁ : R₂ →+* R\nre₁₂ : RingHomInvPair σ₁₂ σ₂₁\nre₂₁ : RingHomInvPair σ₂₁ σ₁₂\ne e' : M ≃ₛₗ[σ₁₂] M₂\np : Submodule R M\nsrc✝ : { x // x ∈ p } →ₛₗ[σ₁₂] { x // x ∈ Submodule.map (↑e) p } :=\n  LinearMap.codRestrict (Submodule.map (↑e) p) (LinearMap.domRestrict (↑e) p)\n    (_ : ∀ (x : { x // x ∈ p }), ∃ a, a ∈ ↑p ∧ ↑↑e a = ↑(LinearMap.domRestrict (↑e) p) x)\ny : { x // x ∈ Submodule.map (↑e) p }\n⊢ ↑↑(symm e) ↑y ∈ p\n[PROOFSTEP]\nrcases y with ⟨y', hy⟩\n[GOAL]\ncase mk\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring R₂\ninst✝⁵ : Semiring R₃\ninst✝⁴ : Semiring R₄\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : AddCommMonoid M₃\ninst✝ : AddCommMonoid M₄\nmodule_M : Module R M\nmodule_M₂ : Module R₂ M₂\nσ₁₂ : R →+* R₂\nσ₂₁ : R₂ →+* R\nre₁₂ : RingHomInvPair σ₁₂ σ₂₁\nre₂₁ : RingHomInvPair σ₂₁ σ₁₂\ne e' : M ≃ₛₗ[σ₁₂] M₂\np : Submodule R M\nsrc✝ : { x // x ∈ p } →ₛₗ[σ₁₂] { x // x ∈ Submodule.map (↑e) p } :=\n  LinearMap.codRestrict (Submodule.map (↑e) p) (LinearMap.domRestrict (↑e) p)\n    (_ : ∀ (x : { x // x ∈ p }), ∃ a, a ∈ ↑p ∧ ↑↑e a = ↑(LinearMap.domRestrict (↑e) p) x)\ny' : M₂\nhy : y' ∈ Submodule.map (↑e) p\n⊢ ↑↑(symm e) ↑{ val := y', property := hy } ∈ p\n[PROOFSTEP]\nrw [Submodule.mem_map] at hy \n[GOAL]\ncase mk\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring R₂\ninst✝⁵ : Semiring R₃\ninst✝⁴ : Semiring R₄\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : AddCommMonoid M₃\ninst✝ : AddCommMonoid M₄\nmodule_M : Module R M\nmodule_M₂ : Module R₂ M₂\nσ₁₂ : R →+* R₂\nσ₂₁ : R₂ →+* R\nre₁₂ : RingHomInvPair σ₁₂ σ₂₁\nre₂₁ : RingHomInvPair σ₂₁ σ₁₂\ne e' : M ≃ₛₗ[σ₁₂] M₂\np : Submodule R M\nsrc✝ : { x // x ∈ p } →ₛₗ[σ₁₂] { x // x ∈ Submodule.map (↑e) p } :=\n  LinearMap.codRestrict (Submodule.map (↑e) p) (LinearMap.domRestrict (↑e) p)\n    (_ : ∀ (x : { x // x ∈ p }), ∃ a, a ∈ ↑p ∧ ↑↑e a = ↑(LinearMap.domRestrict (↑e) p) x)\ny' : M₂\nhy✝ : y' ∈ Submodule.map (↑e) p\nhy : ∃ y, y ∈ p ∧ ↑↑e y = y'\n⊢ ↑↑(symm e) ↑{ val := y', property := hy✝ } ∈ p\n[PROOFSTEP]\nrcases hy with ⟨x, hx, hxy⟩\n[GOAL]\ncase mk.intro.intro\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring R₂\ninst✝⁵ : Semiring R₃\ninst✝⁴ : Semiring R₄\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : AddCommMonoid M₃\ninst✝ : AddCommMonoid M₄\nmodule_M : Module R M\nmodule_M₂ : Module R₂ M₂\nσ₁₂ : R →+* R₂\nσ₂₁ : R₂ →+* R\nre₁₂ : RingHomInvPair σ₁₂ σ₂₁\nre₂₁ : RingHomInvPair σ₂₁ σ₁₂\ne e' : M ≃ₛₗ[σ₁₂] M₂\np : Submodule R M\nsrc✝ : { x // x ∈ p } →ₛₗ[σ₁₂] { x // x ∈ Submodule.map (↑e) p } :=\n  LinearMap.codRestrict (Submodule.map (↑e) p) (LinearMap.domRestrict (↑e) p)\n    (_ : ∀ (x : { x // x ∈ p }), ∃ a, a ∈ ↑p ∧ ↑↑e a = ↑(LinearMap.domRestrict (↑e) p) x)\ny' : M₂\nhy : y' ∈ Submodule.map (↑e) p\nx : M\nhx : x ∈ p\nhxy : ↑↑e x = y'\n⊢ ↑↑(symm e) ↑{ val := y', property := hy } ∈ p\n[PROOFSTEP]\nsubst hxy\n[GOAL]\ncase mk.intro.intro\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring R₂\ninst✝⁵ : Semiring R₃\ninst✝⁴ : Semiring R₄\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : AddCommMonoid M₃\ninst✝ : AddCommMonoid M₄\nmodule_M : Module R M\nmodule_M₂ : Module R₂ M₂\nσ₁₂ : R →+* R₂\nσ₂₁ : R₂ →+* R\nre₁₂ : RingHomInvPair σ₁₂ σ₂₁\nre₂₁ : RingHomInvPair σ₂₁ σ₁₂\ne e' : M ≃ₛₗ[σ₁₂] M₂\np : Submodule R M\nsrc✝ : { x // x ∈ p } →ₛₗ[σ₁₂] { x // x ∈ Submodule.map (↑e) p } :=\n  LinearMap.codRestrict (Submodule.map (↑e) p) (LinearMap.domRestrict (↑e) p)\n    (_ : ∀ (x : { x // x ∈ p }), ∃ a, a ∈ ↑p ∧ ↑↑e a = ↑(LinearMap.domRestrict (↑e) p) x)\nx : M\nhx : x ∈ p\nhy : ↑↑e x ∈ Submodule.map (↑e) p\n⊢ ↑↑(symm e) ↑{ val := ↑↑e x, property := hy } ∈ p\n[PROOFSTEP]\nsimp only [symm_apply_apply, Submodule.coe_mk, coe_coe, hx]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring R₂\ninst✝⁵ : Semiring R₃\ninst✝⁴ : Semiring R₄\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : AddCommMonoid M₃\ninst✝ : AddCommMonoid M₄\nmodule_M : Module R M\nmodule_M₂ : Module R₂ M₂\nσ₁₂ : R →+* R₂\nσ₂₁ : R₂ →+* R\nre₁₂ : RingHomInvPair σ₁₂ σ₂₁\nre₂₁ : RingHomInvPair σ₂₁ σ₁₂\ne e' : M ≃ₛₗ[σ₁₂] M₂\np : Submodule R M\nsrc✝ : { x // x ∈ p } →ₛₗ[σ₁₂] { x // x ∈ Submodule.map (↑e) p } :=\n  LinearMap.codRestrict (Submodule.map (↑e) p) (LinearMap.domRestrict (↑e) p)\n    (_ : ∀ (x : { x // x ∈ p }), ∃ a, a ∈ ↑p ∧ ↑↑e a = ↑(LinearMap.domRestrict (↑e) p) x)\nx : { x // x ∈ p }\n⊢ (fun y => { val := ↑↑(symm e) ↑y, property := (_ : ↑↑(symm e) ↑y ∈ p) })\n      (AddHom.toFun\n        { toAddHom := src✝.toAddHom,\n            map_smul' :=\n              (_ :\n                ∀ (r : R) (x : { x // x ∈ p }),\n                  AddHom.toFun src✝.toAddHom (r • x) = ↑σ₁₂ r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n        x) =\n    x\n[PROOFSTEP]\nsimp only [LinearMap.domRestrict_apply, LinearMap.codRestrict_apply, LinearMap.toFun_eq_coe, LinearEquiv.coe_coe,\n  LinearEquiv.symm_apply_apply, SetLike.eta]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring R₂\ninst✝⁵ : Semiring R₃\ninst✝⁴ : Semiring R₄\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : AddCommMonoid M₃\ninst✝ : AddCommMonoid M₄\nmodule_M : Module R M\nmodule_M₂ : Module R₂ M₂\nσ₁₂ : R →+* R₂\nσ₂₁ : R₂ →+* R\nre₁₂ : RingHomInvPair σ₁₂ σ₂₁\nre₂₁ : RingHomInvPair σ₂₁ σ₁₂\ne e' : M ≃ₛₗ[σ₁₂] M₂\np : Submodule R M\nsrc✝ : { x // x ∈ p } →ₛₗ[σ₁₂] { x // x ∈ Submodule.map (↑e) p } :=\n  LinearMap.codRestrict (Submodule.map (↑e) p) (LinearMap.domRestrict (↑e) p)\n    (_ : ∀ (x : { x // x ∈ p }), ∃ a, a ∈ ↑p ∧ ↑↑e a = ↑(LinearMap.domRestrict (↑e) p) x)\ny : { x // x ∈ Submodule.map (↑e) p }\n⊢ AddHom.toFun\n      { toAddHom := src✝.toAddHom,\n          map_smul' :=\n            (_ :\n              ∀ (r : R) (x : { x // x ∈ p }),\n                AddHom.toFun src✝.toAddHom (r • x) = ↑σ₁₂ r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n      ((fun y => { val := ↑↑(symm e) ↑y, property := (_ : ↑↑(symm e) ↑y ∈ p) }) y) =\n    y\n[PROOFSTEP]\napply SetCoe.ext\n[GOAL]\ncase a\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring R₂\ninst✝⁵ : Semiring R₃\ninst✝⁴ : Semiring R₄\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : AddCommMonoid M₃\ninst✝ : AddCommMonoid M₄\nmodule_M : Module R M\nmodule_M₂ : Module R₂ M₂\nσ₁₂ : R →+* R₂\nσ₂₁ : R₂ →+* R\nre₁₂ : RingHomInvPair σ₁₂ σ₂₁\nre₂₁ : RingHomInvPair σ₂₁ σ₁₂\ne e' : M ≃ₛₗ[σ₁₂] M₂\np : Submodule R M\nsrc✝ : { x // x ∈ p } →ₛₗ[σ₁₂] { x // x ∈ Submodule.map (↑e) p } :=\n  LinearMap.codRestrict (Submodule.map (↑e) p) (LinearMap.domRestrict (↑e) p)\n    (_ : ∀ (x : { x // x ∈ p }), ∃ a, a ∈ ↑p ∧ ↑↑e a = ↑(LinearMap.domRestrict (↑e) p) x)\ny : { x // x ∈ Submodule.map (↑e) p }\n⊢ ↑(AddHom.toFun\n        { toAddHom := src✝.toAddHom,\n            map_smul' :=\n              (_ :\n                ∀ (r : R) (x : { x // x ∈ p }),\n                  AddHom.toFun src✝.toAddHom (r • x) = ↑σ₁₂ r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n        ((fun y => { val := ↑↑(symm e) ↑y, property := (_ : ↑↑(symm e) ↑y ∈ p) }) y)) =\n    ↑y\n[PROOFSTEP]\nsimp only [LinearMap.domRestrict_apply, LinearMap.codRestrict_apply, LinearMap.toFun_eq_coe, LinearEquiv.coe_coe,\n  LinearEquiv.apply_symm_apply]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring R₂\ninst✝⁵ : Semiring R₃\ninst✝⁴ : Semiring R₄\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : AddCommMonoid M₃\ninst✝ : AddCommMonoid M₄\nsrc✝ : (V × V₂ → R) ≃ (V → V₂ → R) := Equiv.curry V V₂ R\nx✝¹ x✝ : V × V₂ → R\n⊢ Equiv.toFun src✝ (x✝¹ + x✝) = Equiv.toFun src✝ x✝¹ + Equiv.toFun src✝ x✝\n[PROOFSTEP]\next\n[GOAL]\ncase h.h\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring R₂\ninst✝⁵ : Semiring R₃\ninst✝⁴ : Semiring R₄\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : AddCommMonoid M₃\ninst✝ : AddCommMonoid M₄\nsrc✝ : (V × V₂ → R) ≃ (V → V₂ → R) := Equiv.curry V V₂ R\nx✝³ x✝² : V × V₂ → R\nx✝¹ : V\nx✝ : V₂\n⊢ Equiv.toFun src✝ (x✝³ + x✝²) x✝¹ x✝ = (Equiv.toFun src✝ x✝³ + Equiv.toFun src✝ x✝²) x✝¹ x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring R₂\ninst✝⁵ : Semiring R₃\ninst✝⁴ : Semiring R₄\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : AddCommMonoid M₃\ninst✝ : AddCommMonoid M₄\nsrc✝ : (V × V₂ → R) ≃ (V → V₂ → R) := Equiv.curry V V₂ R\nx✝¹ : R\nx✝ : V × V₂ → R\n⊢ AddHom.toFun\n      { toFun := src✝.toFun,\n        map_add' :=\n          (_ : ∀ (x x_1 : V × V₂ → R), Equiv.toFun src✝ (x + x_1) = Equiv.toFun src✝ x + Equiv.toFun src✝ x_1) }\n      (x✝¹ • x✝) =\n    ↑(RingHom.id R) x✝¹ •\n      AddHom.toFun\n        { toFun := src✝.toFun,\n          map_add' :=\n            (_ : ∀ (x x_1 : V × V₂ → R), Equiv.toFun src✝ (x + x_1) = Equiv.toFun src✝ x + Equiv.toFun src✝ x_1) }\n        x✝\n[PROOFSTEP]\next\n[GOAL]\ncase h.h\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝⁷ : Semiring R\ninst✝⁶ : Semiring R₂\ninst✝⁵ : Semiring R₃\ninst✝⁴ : Semiring R₄\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : AddCommMonoid M₃\ninst✝ : AddCommMonoid M₄\nsrc✝ : (V × V₂ → R) ≃ (V → V₂ → R) := Equiv.curry V V₂ R\nx✝³ : R\nx✝² : V × V₂ → R\nx✝¹ : V\nx✝ : V₂\n⊢ AddHom.toFun\n      { toFun := src✝.toFun,\n        map_add' :=\n          (_ : ∀ (x x_1 : V × V₂ → R), Equiv.toFun src✝ (x + x_1) = Equiv.toFun src✝ x + Equiv.toFun src✝ x_1) }\n      (x✝³ • x✝²) x✝¹ x✝ =\n    (↑(RingHom.id R) x✝³ •\n        AddHom.toFun\n          { toFun := src✝.toFun,\n            map_add' :=\n              (_ : ∀ (x x_1 : V × V₂ → R), Equiv.toFun src✝ (x + x_1) = Equiv.toFun src✝ x + Equiv.toFun src✝ x_1) }\n          x✝²)\n      x✝¹ x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝⁸ : Semiring R\ninst✝⁷ : Semiring R₂\ninst✝⁶ : Semiring R₃\ninst✝⁵ : Semiring R₄\ninst✝⁴ : AddCommMonoid M\ninst✝³ : AddCommMonoid M₂\ninst✝² : AddCommMonoid M₃\ninst✝¹ : AddCommMonoid M₄\nmodule_M : Module R M\nmodule_M₂ : Module R₂ M₂\nmodule_M₃ : Module R₃ M₃\nσ₁₂ : R →+* R₂\nσ₂₁ : R₂ →+* R\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\ninst✝ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\nσ₃₂ : R₃ →+* R₂\nre₁₂ : RingHomInvPair σ₁₂ σ₂₁\nre₂₁ : RingHomInvPair σ₂₁ σ₁₂\nre₂₃ : RingHomInvPair σ₂₃ σ₃₂\nre₃₂ : RingHomInvPair σ₃₂ σ₂₃\nf : M →ₛₗ[σ₁₂] M₂\ng : M₂ →ₛₗ[σ₂₁] M\ne : M ≃ₛₗ[σ₁₂] M₂\nh : M₂ →ₛₗ[σ₂₃] M₃\ne'' : M₂ ≃ₛₗ[σ₂₃] M₃\np q : Submodule R M\n⊢ ofEq p p (_ : p = p) = refl R { x // x ∈ p }\n[PROOFSTEP]\next\n[GOAL]\ncase h.a\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝⁸ : Semiring R\ninst✝⁷ : Semiring R₂\ninst✝⁶ : Semiring R₃\ninst✝⁵ : Semiring R₄\ninst✝⁴ : AddCommMonoid M\ninst✝³ : AddCommMonoid M₂\ninst✝² : AddCommMonoid M₃\ninst✝¹ : AddCommMonoid M₄\nmodule_M : Module R M\nmodule_M₂ : Module R₂ M₂\nmodule_M₃ : Module R₃ M₃\nσ₁₂ : R →+* R₂\nσ₂₁ : R₂ →+* R\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\ninst✝ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\nσ₃₂ : R₃ →+* R₂\nre₁₂ : RingHomInvPair σ₁₂ σ₂₁\nre₂₁ : RingHomInvPair σ₂₁ σ₁₂\nre₂₃ : RingHomInvPair σ₂₃ σ₃₂\nre₃₂ : RingHomInvPair σ₃₂ σ₂₃\nf : M →ₛₗ[σ₁₂] M₂\ng : M₂ →ₛₗ[σ₂₁] M\ne : M ≃ₛₗ[σ₁₂] M₂\nh : M₂ →ₛₗ[σ₂₃] M₃\ne'' : M₂ ≃ₛₗ[σ₂₃] M₃\np q : Submodule R M\nx✝ : { x // x ∈ p }\n⊢ ↑(↑(ofEq p p (_ : p = p)) x✝) = ↑(↑(refl R { x // x ∈ p }) x✝)\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁰ : Semiring R\ninst✝⁹ : Semiring R₂\ninst✝⁸ : Semiring R₃\ninst✝⁷ : Semiring R₄\ninst✝⁶ : AddCommMonoid M\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : AddCommMonoid M₃\ninst✝³ : AddCommMonoid M₄\nmodule_M : Module R M\nmodule_M₂ : Module R₂ M₂\nmodule_M₃ : Module R₃ M₃\nσ₁₂ : R →+* R₂\nσ₂₁ : R₂ →+* R\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\ninst✝² : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\nσ₃₂ : R₃ →+* R₂\nre₁₂ : RingHomInvPair σ₁₂ σ₂₁\nre₂₁ : RingHomInvPair σ₂₁ σ₁₂\nre₂₃ : RingHomInvPair σ₂₃ σ₃₂\nre₃₂ : RingHomInvPair σ₃₂ σ₂₃\nf✝ : M →ₛₗ[σ₁₂] M₂\ng : M₂ →ₛₗ[σ₂₁] M\ne : M ≃ₛₗ[σ₁₂] M₂\nh : M₂ →ₛₗ[σ₂₃] M₃\ne'' : M₂ ≃ₛₗ[σ₂₃] M₃\np q : Submodule R M\ninst✝¹ : Module R M\ninst✝ : Module R₂ M₂\nf : M ≃ₛₗ[σ₁₂] M₂\nU : Submodule R₂ M₂\n⊢ ↑(ofSubmodule' f U) =\n    LinearMap.codRestrict U (LinearMap.domRestrict (↑f) (Submodule.comap (↑f) U))\n      (_ : ∀ (x : { x // x ∈ Submodule.comap (↑f) U }), ↑x ∈ Submodule.comap (↑f) U)\n[PROOFSTEP]\next\n[GOAL]\ncase h.a\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁰ : Semiring R\ninst✝⁹ : Semiring R₂\ninst✝⁸ : Semiring R₃\ninst✝⁷ : Semiring R₄\ninst✝⁶ : AddCommMonoid M\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : AddCommMonoid M₃\ninst✝³ : AddCommMonoid M₄\nmodule_M : Module R M\nmodule_M₂ : Module R₂ M₂\nmodule_M₃ : Module R₃ M₃\nσ₁₂ : R →+* R₂\nσ₂₁ : R₂ →+* R\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\ninst✝² : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\nσ₃₂ : R₃ →+* R₂\nre₁₂ : RingHomInvPair σ₁₂ σ₂₁\nre₂₁ : RingHomInvPair σ₂₁ σ₁₂\nre₂₃ : RingHomInvPair σ₂₃ σ₃₂\nre₃₂ : RingHomInvPair σ₃₂ σ₂₃\nf✝ : M →ₛₗ[σ₁₂] M₂\ng : M₂ →ₛₗ[σ₂₁] M\ne : M ≃ₛₗ[σ₁₂] M₂\nh : M₂ →ₛₗ[σ₂₃] M₃\ne'' : M₂ ≃ₛₗ[σ₂₃] M₃\np q : Submodule R M\ninst✝¹ : Module R M\ninst✝ : Module R₂ M₂\nf : M ≃ₛₗ[σ₁₂] M₂\nU : Submodule R₂ M₂\nx✝ : { x // x ∈ Submodule.comap (↑f) U }\n⊢ ↑(↑↑(ofSubmodule' f U) x✝) =\n    ↑(↑(LinearMap.codRestrict U (LinearMap.domRestrict (↑f) (Submodule.comap (↑f) U))\n            (_ : ∀ (x : { x // x ∈ Submodule.comap (↑f) U }), ↑x ∈ Submodule.comap (↑f) U))\n        x✝)\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring R₂\ninst✝⁷ : Semiring R₃\ninst✝⁶ : Semiring R₄\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M₂\ninst✝³ : AddCommMonoid M₃\ninst✝² : AddCommMonoid M₄\nmodule_M : Module R M\nmodule_M₂ : Module R₂ M₂\nmodule_M₃ : Module R₃ M₃\nσ₁₂ : R →+* R₂\nσ₂₁ : R₂ →+* R\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\ninst✝¹ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\nσ₃₂ : R₃ →+* R₂\nre₁₂ : RingHomInvPair σ₁₂ σ₂₁\nre₂₁ : RingHomInvPair σ₂₁ σ₁₂\nre₂₃ : RingHomInvPair σ₂₃ σ₃₂\nre₃₂ : RingHomInvPair σ₃₂ σ₂₃\nf : M →ₛₗ[σ₁₂] M₂\ng : M₂ →ₛₗ[σ₂₁] M\ne✝ : M ≃ₛₗ[σ₁₂] M₂\nh : M₂ →ₛₗ[σ₂₃] M₃\ne'' : M₂ ≃ₛₗ[σ₂₃] M₃\np q : Submodule R M\ninst✝ : Module R₂ M₂\ne : { x // x ∈ p } ≃ₛₗ[σ₁₂] { x // x ∈ ⊥ }\n⊢ p = ⊥\n[PROOFSTEP]\nrefine' bot_unique (SetLike.le_def.2 fun b hb => (Submodule.mem_bot R).2 _)\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring R₂\ninst✝⁷ : Semiring R₃\ninst✝⁶ : Semiring R₄\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M₂\ninst✝³ : AddCommMonoid M₃\ninst✝² : AddCommMonoid M₄\nmodule_M : Module R M\nmodule_M₂ : Module R₂ M₂\nmodule_M₃ : Module R₃ M₃\nσ₁₂ : R →+* R₂\nσ₂₁ : R₂ →+* R\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\ninst✝¹ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\nσ₃₂ : R₃ →+* R₂\nre₁₂ : RingHomInvPair σ₁₂ σ₂₁\nre₂₁ : RingHomInvPair σ₂₁ σ₁₂\nre₂₃ : RingHomInvPair σ₂₃ σ₃₂\nre₃₂ : RingHomInvPair σ₃₂ σ₂₃\nf : M →ₛₗ[σ₁₂] M₂\ng : M₂ →ₛₗ[σ₂₁] M\ne✝ : M ≃ₛₗ[σ₁₂] M₂\nh : M₂ →ₛₗ[σ₂₃] M₃\ne'' : M₂ ≃ₛₗ[σ₂₃] M₃\np q : Submodule R M\ninst✝ : Module R₂ M₂\ne : { x // x ∈ p } ≃ₛₗ[σ₁₂] { x // x ∈ ⊥ }\nb : M\nhb : b ∈ p\n⊢ b = 0\n[PROOFSTEP]\nrw [← p.mk_eq_zero hb, ← e.map_eq_zero_iff]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring R₂\ninst✝⁷ : Semiring R₃\ninst✝⁶ : Semiring R₄\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M₂\ninst✝³ : AddCommMonoid M₃\ninst✝² : AddCommMonoid M₄\nmodule_M : Module R M\nmodule_M₂ : Module R₂ M₂\nmodule_M₃ : Module R₃ M₃\nσ₁₂ : R →+* R₂\nσ₂₁ : R₂ →+* R\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\ninst✝¹ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\nσ₃₂ : R₃ →+* R₂\nre₁₂ : RingHomInvPair σ₁₂ σ₂₁\nre₂₁ : RingHomInvPair σ₂₁ σ₁₂\nre₂₃ : RingHomInvPair σ₂₃ σ₃₂\nre₃₂ : RingHomInvPair σ₃₂ σ₂₃\nf : M →ₛₗ[σ₁₂] M₂\ng : M₂ →ₛₗ[σ₂₁] M\ne✝ : M ≃ₛₗ[σ₁₂] M₂\nh : M₂ →ₛₗ[σ₂₃] M₃\ne'' : M₂ ≃ₛₗ[σ₂₃] M₃\np q : Submodule R M\ninst✝ : Module R₂ M₂\ne : { x // x ∈ p } ≃ₛₗ[σ₁₂] { x // x ∈ ⊥ }\nb : M\nhb : b ∈ p\n⊢ ↑e { val := b, property := hb } = 0\n[PROOFSTEP]\napply Submodule.eq_zero_of_bot_submodule\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁰ : Semiring R\ninst✝⁹ : Semiring R₂\ninst✝⁸ : Semiring R₃\ninst✝⁷ : Semiring R₄\ninst✝⁶ : AddCommMonoid M\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : AddCommMonoid M₃\ninst✝³ : AddCommMonoid M₄\nmodule_M : Module R M\nmodule_M₂ : Module R₂ M₂\nmodule_M₃ : Module R₃ M₃\nσ₁₂ : R →+* R₂\nσ₂₁ : R₂ →+* R\nσ₂₃ : R₂ →+* R₃\nσ₁₃ : R →+* R₃\ninst✝² : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃\nσ₃₂ : R₃ →+* R₂\nre₁₂ : RingHomInvPair σ₁₂ σ₂₁\nre₂₁ : RingHomInvPair σ₂₁ σ₁₂\nre₂₃ : RingHomInvPair σ₂₃ σ₃₂\nre₃₂ : RingHomInvPair σ₃₂ σ₂₃\nf : M →ₛₗ[σ₁₂] M₂\ng✝ : M₂ →ₛₗ[σ₂₁] M\ne : M ≃ₛₗ[σ₁₂] M₂\nh✝ : M₂ →ₛₗ[σ₂₃] M₃\ne'' : M₂ ≃ₛₗ[σ₂₃] M₃\np q : Submodule R M\ninst✝¹ : RingHomInvPair σ₁₂ σ₂₁\ninst✝ : RingHomInvPair σ₂₁ σ₁₂\ng : M₂ → M\nh : LeftInverse g ↑f\nsrc✝ : M →ₛₗ[σ₁₂] { x // x ∈ LinearMap.range f } := LinearMap.rangeRestrict f\nx : { x // x ∈ LinearMap.range f }\nx' : M\nhx' : ↑f x' = ↑x\n⊢ ↑f (g ↑x) = ↑x\n[PROOFSTEP]\nrw [← hx', h x']\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝² : Semiring R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nx : M\n⊢ ↑(neg R) x = -x\n[PROOFSTEP]\nsimp\n[GOAL]\nR✝ : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁✝ : Type u_11\nM₂✝ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁵ : CommSemiring R✝\ninst✝¹⁴ : AddCommMonoid M\ninst✝¹³ : AddCommMonoid M₂✝\ninst✝¹² : AddCommMonoid M₃\ninst✝¹¹ : Module R✝ M\ninst✝¹⁰ : Module R✝ M₂✝\ninst✝⁹ : Module R✝ M₃\nR : Type ?u.2478657\nM₁ : Type ?u.2478660\nM₂ : Type ?u.2478663\nM₂₁ : Type ?u.2478666\nM₂₂ : Type ?u.2478669\ninst✝⁸ : CommSemiring R\ninst✝⁷ : AddCommMonoid M₁\ninst✝⁶ : AddCommMonoid M₂\ninst✝⁵ : AddCommMonoid M₂₁\ninst✝⁴ : AddCommMonoid M₂₂\ninst✝³ : Module R M₁\ninst✝² : Module R M₂\ninst✝¹ : Module R M₂₁\ninst✝ : Module R M₂₂\ne₁ : M₁ ≃ₗ[R] M₂\ne₂ : M₂₁ ≃ₗ[R] M₂₂\nf g : M₁ →ₗ[R] M₂₁\n⊢ (fun f => LinearMap.comp (↑e₂) (LinearMap.comp f ↑(symm e₁))) (f + g) =\n    (fun f => LinearMap.comp (↑e₂) (LinearMap.comp f ↑(symm e₁))) f +\n      (fun f => LinearMap.comp (↑e₂) (LinearMap.comp f ↑(symm e₁))) g\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nR✝ : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁✝ : Type u_11\nM₂✝ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁵ : CommSemiring R✝\ninst✝¹⁴ : AddCommMonoid M\ninst✝¹³ : AddCommMonoid M₂✝\ninst✝¹² : AddCommMonoid M₃\ninst✝¹¹ : Module R✝ M\ninst✝¹⁰ : Module R✝ M₂✝\ninst✝⁹ : Module R✝ M₃\nR : Type ?u.2478657\nM₁ : Type ?u.2478660\nM₂ : Type ?u.2478663\nM₂₁ : Type ?u.2478666\nM₂₂ : Type ?u.2478669\ninst✝⁸ : CommSemiring R\ninst✝⁷ : AddCommMonoid M₁\ninst✝⁶ : AddCommMonoid M₂\ninst✝⁵ : AddCommMonoid M₂₁\ninst✝⁴ : AddCommMonoid M₂₂\ninst✝³ : Module R M₁\ninst✝² : Module R M₂\ninst✝¹ : Module R M₂₁\ninst✝ : Module R M₂₂\ne₁ : M₁ ≃ₗ[R] M₂\ne₂ : M₂₁ ≃ₗ[R] M₂₂\nf g : M₁ →ₗ[R] M₂₁\nx : M₂\n⊢ ↑((fun f => LinearMap.comp (↑e₂) (LinearMap.comp f ↑(symm e₁))) (f + g)) x =\n    ↑((fun f => LinearMap.comp (↑e₂) (LinearMap.comp f ↑(symm e₁))) f +\n          (fun f => LinearMap.comp (↑e₂) (LinearMap.comp f ↑(symm e₁))) g)\n      x\n[PROOFSTEP]\nsimp only [map_add, add_apply, Function.comp_apply, coe_comp, coe_coe]\n[GOAL]\nR✝ : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁✝ : Type u_11\nM₂✝ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁵ : CommSemiring R✝\ninst✝¹⁴ : AddCommMonoid M\ninst✝¹³ : AddCommMonoid M₂✝\ninst✝¹² : AddCommMonoid M₃\ninst✝¹¹ : Module R✝ M\ninst✝¹⁰ : Module R✝ M₂✝\ninst✝⁹ : Module R✝ M₃\nR : Type ?u.2478657\nM₁ : Type ?u.2478660\nM₂ : Type ?u.2478663\nM₂₁ : Type ?u.2478666\nM₂₂ : Type ?u.2478669\ninst✝⁸ : CommSemiring R\ninst✝⁷ : AddCommMonoid M₁\ninst✝⁶ : AddCommMonoid M₂\ninst✝⁵ : AddCommMonoid M₂₁\ninst✝⁴ : AddCommMonoid M₂₂\ninst✝³ : Module R M₁\ninst✝² : Module R M₂\ninst✝¹ : Module R M₂₁\ninst✝ : Module R M₂₂\ne₁ : M₁ ≃ₗ[R] M₂\ne₂ : M₂₁ ≃ₗ[R] M₂₂\nc : R\nf : M₁ →ₗ[R] M₂₁\n⊢ AddHom.toFun\n      { toFun := fun f => LinearMap.comp (↑e₂) (LinearMap.comp f ↑(symm e₁)),\n        map_add' :=\n          (_ :\n            ∀ (f g : M₁ →ₗ[R] M₂₁),\n              (fun f => LinearMap.comp (↑e₂) (LinearMap.comp f ↑(symm e₁))) (f + g) =\n                (fun f => LinearMap.comp (↑e₂) (LinearMap.comp f ↑(symm e₁))) f +\n                  (fun f => LinearMap.comp (↑e₂) (LinearMap.comp f ↑(symm e₁))) g) }\n      (c • f) =\n    ↑(RingHom.id R) c •\n      AddHom.toFun\n        { toFun := fun f => LinearMap.comp (↑e₂) (LinearMap.comp f ↑(symm e₁)),\n          map_add' :=\n            (_ :\n              ∀ (f g : M₁ →ₗ[R] M₂₁),\n                (fun f => LinearMap.comp (↑e₂) (LinearMap.comp f ↑(symm e₁))) (f + g) =\n                  (fun f => LinearMap.comp (↑e₂) (LinearMap.comp f ↑(symm e₁))) f +\n                    (fun f => LinearMap.comp (↑e₂) (LinearMap.comp f ↑(symm e₁))) g) }\n        f\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nR✝ : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁✝ : Type u_11\nM₂✝ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁵ : CommSemiring R✝\ninst✝¹⁴ : AddCommMonoid M\ninst✝¹³ : AddCommMonoid M₂✝\ninst✝¹² : AddCommMonoid M₃\ninst✝¹¹ : Module R✝ M\ninst✝¹⁰ : Module R✝ M₂✝\ninst✝⁹ : Module R✝ M₃\nR : Type ?u.2478657\nM₁ : Type ?u.2478660\nM₂ : Type ?u.2478663\nM₂₁ : Type ?u.2478666\nM₂₂ : Type ?u.2478669\ninst✝⁸ : CommSemiring R\ninst✝⁷ : AddCommMonoid M₁\ninst✝⁶ : AddCommMonoid M₂\ninst✝⁵ : AddCommMonoid M₂₁\ninst✝⁴ : AddCommMonoid M₂₂\ninst✝³ : Module R M₁\ninst✝² : Module R M₂\ninst✝¹ : Module R M₂₁\ninst✝ : Module R M₂₂\ne₁ : M₁ ≃ₗ[R] M₂\ne₂ : M₂₁ ≃ₗ[R] M₂₂\nc : R\nf : M₁ →ₗ[R] M₂₁\nx : M₂\n⊢ ↑(AddHom.toFun\n          { toFun := fun f => LinearMap.comp (↑e₂) (LinearMap.comp f ↑(symm e₁)),\n            map_add' :=\n              (_ :\n                ∀ (f g : M₁ →ₗ[R] M₂₁),\n                  (fun f => LinearMap.comp (↑e₂) (LinearMap.comp f ↑(symm e₁))) (f + g) =\n                    (fun f => LinearMap.comp (↑e₂) (LinearMap.comp f ↑(symm e₁))) f +\n                      (fun f => LinearMap.comp (↑e₂) (LinearMap.comp f ↑(symm e₁))) g) }\n          (c • f))\n      x =\n    ↑(↑(RingHom.id R) c •\n          AddHom.toFun\n            { toFun := fun f => LinearMap.comp (↑e₂) (LinearMap.comp f ↑(symm e₁)),\n              map_add' :=\n                (_ :\n                  ∀ (f g : M₁ →ₗ[R] M₂₁),\n                    (fun f => LinearMap.comp (↑e₂) (LinearMap.comp f ↑(symm e₁))) (f + g) =\n                      (fun f => LinearMap.comp (↑e₂) (LinearMap.comp f ↑(symm e₁))) f +\n                        (fun f => LinearMap.comp (↑e₂) (LinearMap.comp f ↑(symm e₁))) g) }\n            f)\n      x\n[PROOFSTEP]\nsimp only [smul_apply, Function.comp_apply, coe_comp, map_smulₛₗ e₂, coe_coe]\n[GOAL]\nR✝ : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁✝ : Type u_11\nM₂✝ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁵ : CommSemiring R✝\ninst✝¹⁴ : AddCommMonoid M\ninst✝¹³ : AddCommMonoid M₂✝\ninst✝¹² : AddCommMonoid M₃\ninst✝¹¹ : Module R✝ M\ninst✝¹⁰ : Module R✝ M₂✝\ninst✝⁹ : Module R✝ M₃\nR : Type ?u.2478657\nM₁ : Type ?u.2478660\nM₂ : Type ?u.2478663\nM₂₁ : Type ?u.2478666\nM₂₂ : Type ?u.2478669\ninst✝⁸ : CommSemiring R\ninst✝⁷ : AddCommMonoid M₁\ninst✝⁶ : AddCommMonoid M₂\ninst✝⁵ : AddCommMonoid M₂₁\ninst✝⁴ : AddCommMonoid M₂₂\ninst✝³ : Module R M₁\ninst✝² : Module R M₂\ninst✝¹ : Module R M₂₁\ninst✝ : Module R M₂₂\ne₁ : M₁ ≃ₗ[R] M₂\ne₂ : M₂₁ ≃ₗ[R] M₂₂\nf : M₁ →ₗ[R] M₂₁\n⊢ (fun f => LinearMap.comp (↑(symm e₂)) (LinearMap.comp f ↑e₁))\n      (AddHom.toFun\n        {\n            toAddHom :=\n              { toFun := fun f => LinearMap.comp (↑e₂) (LinearMap.comp f ↑(symm e₁)),\n                map_add' :=\n                  (_ :\n                    ∀ (f g : M₁ →ₗ[R] M₂₁),\n                      (fun f => LinearMap.comp (↑e₂) (LinearMap.comp f ↑(symm e₁))) (f + g) =\n                        (fun f => LinearMap.comp (↑e₂) (LinearMap.comp f ↑(symm e₁))) f +\n                          (fun f => LinearMap.comp (↑e₂) (LinearMap.comp f ↑(symm e₁))) g) },\n            map_smul' :=\n              (_ :\n                ∀ (c : R) (f : M₁ →ₗ[R] M₂₁),\n                  AddHom.toFun\n                      { toFun := fun f => LinearMap.comp (↑e₂) (LinearMap.comp f ↑(symm e₁)),\n                        map_add' :=\n                          (_ :\n                            ∀ (f g : M₁ →ₗ[R] M₂₁),\n                              (fun f => LinearMap.comp (↑e₂) (LinearMap.comp f ↑(symm e₁))) (f + g) =\n                                (fun f => LinearMap.comp (↑e₂) (LinearMap.comp f ↑(symm e₁))) f +\n                                  (fun f => LinearMap.comp (↑e₂) (LinearMap.comp f ↑(symm e₁))) g) }\n                      (c • f) =\n                    ↑(RingHom.id R) c •\n                      AddHom.toFun\n                        { toFun := fun f => LinearMap.comp (↑e₂) (LinearMap.comp f ↑(symm e₁)),\n                          map_add' :=\n                            (_ :\n                              ∀ (f g : M₁ →ₗ[R] M₂₁),\n                                (fun f => LinearMap.comp (↑e₂) (LinearMap.comp f ↑(symm e₁))) (f + g) =\n                                  (fun f => LinearMap.comp (↑e₂) (LinearMap.comp f ↑(symm e₁))) f +\n                                    (fun f => LinearMap.comp (↑e₂) (LinearMap.comp f ↑(symm e₁))) g) }\n                        f) }.toAddHom\n        f) =\n    f\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nR✝ : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁✝ : Type u_11\nM₂✝ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁵ : CommSemiring R✝\ninst✝¹⁴ : AddCommMonoid M\ninst✝¹³ : AddCommMonoid M₂✝\ninst✝¹² : AddCommMonoid M₃\ninst✝¹¹ : Module R✝ M\ninst✝¹⁰ : Module R✝ M₂✝\ninst✝⁹ : Module R✝ M₃\nR : Type ?u.2478657\nM₁ : Type ?u.2478660\nM₂ : Type ?u.2478663\nM₂₁ : Type ?u.2478666\nM₂₂ : Type ?u.2478669\ninst✝⁸ : CommSemiring R\ninst✝⁷ : AddCommMonoid M₁\ninst✝⁶ : AddCommMonoid M₂\ninst✝⁵ : AddCommMonoid M₂₁\ninst✝⁴ : AddCommMonoid M₂₂\ninst✝³ : Module R M₁\ninst✝² : Module R M₂\ninst✝¹ : Module R M₂₁\ninst✝ : Module R M₂₂\ne₁ : M₁ ≃ₗ[R] M₂\ne₂ : M₂₁ ≃ₗ[R] M₂₂\nf : M₁ →ₗ[R] M₂₁\nx : M₁\n⊢ ↑((fun f => LinearMap.comp (↑(symm e₂)) (LinearMap.comp f ↑e₁))\n          (AddHom.toFun\n            {\n                toAddHom :=\n                  { toFun := fun f => LinearMap.comp (↑e₂) (LinearMap.comp f ↑(symm e₁)),\n                    map_add' :=\n                      (_ :\n                        ∀ (f g : M₁ →ₗ[R] M₂₁),\n                          (fun f => LinearMap.comp (↑e₂) (LinearMap.comp f ↑(symm e₁))) (f + g) =\n                            (fun f => LinearMap.comp (↑e₂) (LinearMap.comp f ↑(symm e₁))) f +\n                              (fun f => LinearMap.comp (↑e₂) (LinearMap.comp f ↑(symm e₁))) g) },\n                map_smul' :=\n                  (_ :\n                    ∀ (c : R) (f : M₁ →ₗ[R] M₂₁),\n                      AddHom.toFun\n                          { toFun := fun f => LinearMap.comp (↑e₂) (LinearMap.comp f ↑(symm e₁)),\n                            map_add' :=\n                              (_ :\n                                ∀ (f g : M₁ →ₗ[R] M₂₁),\n                                  (fun f => LinearMap.comp (↑e₂) (LinearMap.comp f ↑(symm e₁))) (f + g) =\n                                    (fun f => LinearMap.comp (↑e₂) (LinearMap.comp f ↑(symm e₁))) f +\n                                      (fun f => LinearMap.comp (↑e₂) (LinearMap.comp f ↑(symm e₁))) g) }\n                          (c • f) =\n                        ↑(RingHom.id R) c •\n                          AddHom.toFun\n                            { toFun := fun f => LinearMap.comp (↑e₂) (LinearMap.comp f ↑(symm e₁)),\n                              map_add' :=\n                                (_ :\n                                  ∀ (f g : M₁ →ₗ[R] M₂₁),\n                                    (fun f => LinearMap.comp (↑e₂) (LinearMap.comp f ↑(symm e₁))) (f + g) =\n                                      (fun f => LinearMap.comp (↑e₂) (LinearMap.comp f ↑(symm e₁))) f +\n                                        (fun f => LinearMap.comp (↑e₂) (LinearMap.comp f ↑(symm e₁))) g) }\n                            f) }.toAddHom\n            f))\n      x =\n    ↑f x\n[PROOFSTEP]\nsimp only [symm_apply_apply, Function.comp_apply, coe_comp, coe_coe]\n[GOAL]\nR✝ : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁✝ : Type u_11\nM₂✝ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁵ : CommSemiring R✝\ninst✝¹⁴ : AddCommMonoid M\ninst✝¹³ : AddCommMonoid M₂✝\ninst✝¹² : AddCommMonoid M₃\ninst✝¹¹ : Module R✝ M\ninst✝¹⁰ : Module R✝ M₂✝\ninst✝⁹ : Module R✝ M₃\nR : Type ?u.2478657\nM₁ : Type ?u.2478660\nM₂ : Type ?u.2478663\nM₂₁ : Type ?u.2478666\nM₂₂ : Type ?u.2478669\ninst✝⁸ : CommSemiring R\ninst✝⁷ : AddCommMonoid M₁\ninst✝⁶ : AddCommMonoid M₂\ninst✝⁵ : AddCommMonoid M₂₁\ninst✝⁴ : AddCommMonoid M₂₂\ninst✝³ : Module R M₁\ninst✝² : Module R M₂\ninst✝¹ : Module R M₂₁\ninst✝ : Module R M₂₂\ne₁ : M₁ ≃ₗ[R] M₂\ne₂ : M₂₁ ≃ₗ[R] M₂₂\nf : M₂ →ₗ[R] M₂₂\n⊢ AddHom.toFun\n      {\n          toAddHom :=\n            { toFun := fun f => LinearMap.comp (↑e₂) (LinearMap.comp f ↑(symm e₁)),\n              map_add' :=\n                (_ :\n                  ∀ (f g : M₁ →ₗ[R] M₂₁),\n                    (fun f => LinearMap.comp (↑e₂) (LinearMap.comp f ↑(symm e₁))) (f + g) =\n                      (fun f => LinearMap.comp (↑e₂) (LinearMap.comp f ↑(symm e₁))) f +\n                        (fun f => LinearMap.comp (↑e₂) (LinearMap.comp f ↑(symm e₁))) g) },\n          map_smul' :=\n            (_ :\n              ∀ (c : R) (f : M₁ →ₗ[R] M₂₁),\n                AddHom.toFun\n                    { toFun := fun f => LinearMap.comp (↑e₂) (LinearMap.comp f ↑(symm e₁)),\n                      map_add' :=\n                        (_ :\n                          ∀ (f g : M₁ →ₗ[R] M₂₁),\n                            (fun f => LinearMap.comp (↑e₂) (LinearMap.comp f ↑(symm e₁))) (f + g) =\n                              (fun f => LinearMap.comp (↑e₂) (LinearMap.comp f ↑(symm e₁))) f +\n                                (fun f => LinearMap.comp (↑e₂) (LinearMap.comp f ↑(symm e₁))) g) }\n                    (c • f) =\n                  ↑(RingHom.id R) c •\n                    AddHom.toFun\n                      { toFun := fun f => LinearMap.comp (↑e₂) (LinearMap.comp f ↑(symm e₁)),\n                        map_add' :=\n                          (_ :\n                            ∀ (f g : M₁ →ₗ[R] M₂₁),\n                              (fun f => LinearMap.comp (↑e₂) (LinearMap.comp f ↑(symm e₁))) (f + g) =\n                                (fun f => LinearMap.comp (↑e₂) (LinearMap.comp f ↑(symm e₁))) f +\n                                  (fun f => LinearMap.comp (↑e₂) (LinearMap.comp f ↑(symm e₁))) g) }\n                      f) }.toAddHom\n      ((fun f => LinearMap.comp (↑(symm e₂)) (LinearMap.comp f ↑e₁)) f) =\n    f\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nR✝ : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁✝ : Type u_11\nM₂✝ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹⁵ : CommSemiring R✝\ninst✝¹⁴ : AddCommMonoid M\ninst✝¹³ : AddCommMonoid M₂✝\ninst✝¹² : AddCommMonoid M₃\ninst✝¹¹ : Module R✝ M\ninst✝¹⁰ : Module R✝ M₂✝\ninst✝⁹ : Module R✝ M₃\nR : Type ?u.2478657\nM₁ : Type ?u.2478660\nM₂ : Type ?u.2478663\nM₂₁ : Type ?u.2478666\nM₂₂ : Type ?u.2478669\ninst✝⁸ : CommSemiring R\ninst✝⁷ : AddCommMonoid M₁\ninst✝⁶ : AddCommMonoid M₂\ninst✝⁵ : AddCommMonoid M₂₁\ninst✝⁴ : AddCommMonoid M₂₂\ninst✝³ : Module R M₁\ninst✝² : Module R M₂\ninst✝¹ : Module R M₂₁\ninst✝ : Module R M₂₂\ne₁ : M₁ ≃ₗ[R] M₂\ne₂ : M₂₁ ≃ₗ[R] M₂₂\nf : M₂ →ₗ[R] M₂₂\nx : M₂\n⊢ ↑(AddHom.toFun\n          {\n              toAddHom :=\n                { toFun := fun f => LinearMap.comp (↑e₂) (LinearMap.comp f ↑(symm e₁)),\n                  map_add' :=\n                    (_ :\n                      ∀ (f g : M₁ →ₗ[R] M₂₁),\n                        (fun f => LinearMap.comp (↑e₂) (LinearMap.comp f ↑(symm e₁))) (f + g) =\n                          (fun f => LinearMap.comp (↑e₂) (LinearMap.comp f ↑(symm e₁))) f +\n                            (fun f => LinearMap.comp (↑e₂) (LinearMap.comp f ↑(symm e₁))) g) },\n              map_smul' :=\n                (_ :\n                  ∀ (c : R) (f : M₁ →ₗ[R] M₂₁),\n                    AddHom.toFun\n                        { toFun := fun f => LinearMap.comp (↑e₂) (LinearMap.comp f ↑(symm e₁)),\n                          map_add' :=\n                            (_ :\n                              ∀ (f g : M₁ →ₗ[R] M₂₁),\n                                (fun f => LinearMap.comp (↑e₂) (LinearMap.comp f ↑(symm e₁))) (f + g) =\n                                  (fun f => LinearMap.comp (↑e₂) (LinearMap.comp f ↑(symm e₁))) f +\n                                    (fun f => LinearMap.comp (↑e₂) (LinearMap.comp f ↑(symm e₁))) g) }\n                        (c • f) =\n                      ↑(RingHom.id R) c •\n                        AddHom.toFun\n                          { toFun := fun f => LinearMap.comp (↑e₂) (LinearMap.comp f ↑(symm e₁)),\n                            map_add' :=\n                              (_ :\n                                ∀ (f g : M₁ →ₗ[R] M₂₁),\n                                  (fun f => LinearMap.comp (↑e₂) (LinearMap.comp f ↑(symm e₁))) (f + g) =\n                                    (fun f => LinearMap.comp (↑e₂) (LinearMap.comp f ↑(symm e₁))) f +\n                                      (fun f => LinearMap.comp (↑e₂) (LinearMap.comp f ↑(symm e₁))) g) }\n                          f) }.toAddHom\n          ((fun f => LinearMap.comp (↑(symm e₂)) (LinearMap.comp f ↑e₁)) f))\n      x =\n    ↑f x\n[PROOFSTEP]\nsimp only [Function.comp_apply, apply_symm_apply, coe_comp, coe_coe]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN✝ : Type u_15\nN₂✝ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹² : CommSemiring R\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : AddCommMonoid M₃\ninst✝⁸ : Module R M\ninst✝⁷ : Module R M₂\ninst✝⁶ : Module R M₃\nN : Type u_20\nN₂ : Type u_21\nN₃ : Type u_22\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : AddCommMonoid N₂\ninst✝³ : AddCommMonoid N₃\ninst✝² : Module R N\ninst✝¹ : Module R N₂\ninst✝ : Module R N₃\ne₁ : M ≃ₗ[R] N\ne₂ : M₂ ≃ₗ[R] N₂\ne₃ : M₃ ≃ₗ[R] N₃\nf : M →ₗ[R] M₂\ng : M₂ →ₗ[R] M₃\n⊢ ↑(arrowCongr e₁ e₃) (LinearMap.comp g f) = LinearMap.comp (↑(arrowCongr e₂ e₃) g) (↑(arrowCongr e₁ e₂) f)\n[PROOFSTEP]\next\n[GOAL]\ncase h\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN✝ : Type u_15\nN₂✝ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹² : CommSemiring R\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : AddCommMonoid M₃\ninst✝⁸ : Module R M\ninst✝⁷ : Module R M₂\ninst✝⁶ : Module R M₃\nN : Type u_20\nN₂ : Type u_21\nN₃ : Type u_22\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : AddCommMonoid N₂\ninst✝³ : AddCommMonoid N₃\ninst✝² : Module R N\ninst✝¹ : Module R N₂\ninst✝ : Module R N₃\ne₁ : M ≃ₗ[R] N\ne₂ : M₂ ≃ₗ[R] N₂\ne₃ : M₃ ≃ₗ[R] N₃\nf : M →ₗ[R] M₂\ng : M₂ →ₗ[R] M₃\nx✝ : N\n⊢ ↑(↑(arrowCongr e₁ e₃) (LinearMap.comp g f)) x✝ = ↑(LinearMap.comp (↑(arrowCongr e₂ e₃) g) (↑(arrowCongr e₁ e₂) f)) x✝\n[PROOFSTEP]\nsimp only [symm_apply_apply, arrowCongr_apply, LinearMap.comp_apply]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝⁶ : CommSemiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M₂\ninst✝³ : AddCommMonoid M₃\ninst✝² : Module R M\ninst✝¹ : Module R M₂\ninst✝ : Module R M₃\ne₁ : M ≃ₗ[R] M₂\ne₂ : M₂ ≃ₗ[R] M₃\n⊢ trans (conj e₁) (conj e₂) = conj (trans e₁ e₂)\n[PROOFSTEP]\next f x\n[GOAL]\ncase h.h\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝⁶ : CommSemiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M₂\ninst✝³ : AddCommMonoid M₃\ninst✝² : Module R M\ninst✝¹ : Module R M₂\ninst✝ : Module R M₃\ne₁ : M ≃ₗ[R] M₂\ne₂ : M₂ ≃ₗ[R] M₃\nf : Module.End R M\nx : M₃\n⊢ ↑(↑(trans (conj e₁) (conj e₂)) f) x = ↑(↑(conj (trans e₁ e₂)) f) x\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝⁶ : CommSemiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M₂\ninst✝³ : AddCommMonoid M₃\ninst✝² : Module R M\ninst✝¹ : Module R M₂\ninst✝ : Module R M₃\ne : M ≃ₗ[R] M₂\n⊢ ↑(conj e) LinearMap.id = LinearMap.id\n[PROOFSTEP]\next\n[GOAL]\ncase h\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝⁶ : CommSemiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M₂\ninst✝³ : AddCommMonoid M₃\ninst✝² : Module R M\ninst✝¹ : Module R M₂\ninst✝ : Module R M₃\ne : M ≃ₗ[R] M₂\nx✝ : M₂\n⊢ ↑(↑(conj e) LinearMap.id) x✝ = ↑LinearMap.id x✝\n[PROOFSTEP]\nsimp [conj_apply]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\np : Submodule R M\nq : Submodule R { x // x ∈ p }\n⊢ ∀ (c : { x // x ∈ q }), ↑(LinearMap.domRestrict (Submodule.subtype p) q) c ∈ map (Submodule.subtype p) q\n[PROOFSTEP]\nrintro ⟨x, hx⟩\n[GOAL]\ncase mk\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\np : Submodule R M\nq : Submodule R { x // x ∈ p }\nx : { x // x ∈ p }\nhx : x ∈ q\n⊢ ↑(LinearMap.domRestrict (Submodule.subtype p) q) { val := x, property := hx } ∈ map (Submodule.subtype p) q\n[PROOFSTEP]\nexact ⟨x, hx, rfl⟩\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\np : Submodule R M\nq : Submodule R { x // x ∈ p }\nsrc✝ : { x // x ∈ q } →ₗ[R] { x // x ∈ map (Submodule.subtype p) q } :=\n  LinearMap.codRestrict (map (Submodule.subtype p) q) (LinearMap.domRestrict (Submodule.subtype p) q)\n    (_ : ∀ (c : { x // x ∈ q }), ↑(LinearMap.domRestrict (Submodule.subtype p) q) c ∈ map (Submodule.subtype p) q)\n⊢ { x // x ∈ map (Submodule.subtype p) q } → { x // x ∈ q }\n[PROOFSTEP]\nrintro ⟨x, hx⟩\n[GOAL]\ncase mk\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\np : Submodule R M\nq : Submodule R { x // x ∈ p }\nsrc✝ : { x // x ∈ q } →ₗ[R] { x // x ∈ map (Submodule.subtype p) q } :=\n  LinearMap.codRestrict (map (Submodule.subtype p) q) (LinearMap.domRestrict (Submodule.subtype p) q)\n    (_ : ∀ (c : { x // x ∈ q }), ↑(LinearMap.domRestrict (Submodule.subtype p) q) c ∈ map (Submodule.subtype p) q)\nx : M\nhx : x ∈ map (Submodule.subtype p) q\n⊢ { x // x ∈ q }\n[PROOFSTEP]\nrefine' ⟨⟨x, _⟩, _⟩\n[GOAL]\ncase mk.refine'_1\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\np : Submodule R M\nq : Submodule R { x // x ∈ p }\nsrc✝ : { x // x ∈ q } →ₗ[R] { x // x ∈ map (Submodule.subtype p) q } :=\n  LinearMap.codRestrict (map (Submodule.subtype p) q) (LinearMap.domRestrict (Submodule.subtype p) q)\n    (_ : ∀ (c : { x // x ∈ q }), ↑(LinearMap.domRestrict (Submodule.subtype p) q) c ∈ map (Submodule.subtype p) q)\nx : M\nhx : x ∈ map (Submodule.subtype p) q\n⊢ x ∈ p\n[PROOFSTEP]\nrcases hx with ⟨⟨_, h⟩, _, rfl⟩\n[GOAL]\ncase mk.refine'_2\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\np : Submodule R M\nq : Submodule R { x // x ∈ p }\nsrc✝ : { x // x ∈ q } →ₗ[R] { x // x ∈ map (Submodule.subtype p) q } :=\n  LinearMap.codRestrict (map (Submodule.subtype p) q) (LinearMap.domRestrict (Submodule.subtype p) q)\n    (_ : ∀ (c : { x // x ∈ q }), ↑(LinearMap.domRestrict (Submodule.subtype p) q) c ∈ map (Submodule.subtype p) q)\nx : M\nhx : x ∈ map (Submodule.subtype p) q\n⊢ { val := x, property := (_ : x ∈ p) } ∈ q\n[PROOFSTEP]\nrcases hx with ⟨⟨_, h⟩, _, rfl⟩\n[GOAL]\ncase mk.refine'_1.intro.mk.intro\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\np : Submodule R M\nq : Submodule R { x // x ∈ p }\nsrc✝ : { x // x ∈ q } →ₗ[R] { x // x ∈ map (Submodule.subtype p) q } :=\n  LinearMap.codRestrict (map (Submodule.subtype p) q) (LinearMap.domRestrict (Submodule.subtype p) q)\n    (_ : ∀ (c : { x // x ∈ q }), ↑(LinearMap.domRestrict (Submodule.subtype p) q) c ∈ map (Submodule.subtype p) q)\nval✝ : M\nh : val✝ ∈ p\nleft✝ : { val := val✝, property := h } ∈ ↑q\n⊢ ↑(Submodule.subtype p) { val := val✝, property := h } ∈ p\n[PROOFSTEP]\nassumption\n[GOAL]\ncase mk.refine'_2.intro.mk.intro\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\np : Submodule R M\nq : Submodule R { x // x ∈ p }\nsrc✝ : { x // x ∈ q } →ₗ[R] { x // x ∈ map (Submodule.subtype p) q } :=\n  LinearMap.codRestrict (map (Submodule.subtype p) q) (LinearMap.domRestrict (Submodule.subtype p) q)\n    (_ : ∀ (c : { x // x ∈ q }), ↑(LinearMap.domRestrict (Submodule.subtype p) q) c ∈ map (Submodule.subtype p) q)\nval✝ : M\nh : val✝ ∈ p\nleft✝ : { val := val✝, property := h } ∈ ↑q\n⊢ { val := ↑(Submodule.subtype p) { val := val✝, property := h },\n      property := (_ : ↑(Submodule.subtype p) { val := val✝, property := h } ∈ p) } ∈\n    q\n[PROOFSTEP]\nassumption\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\np : Submodule R M\nq : Submodule R { x // x ∈ p }\nsrc✝ : { x // x ∈ q } →ₗ[R] { x // x ∈ map (Submodule.subtype p) q } :=\n  LinearMap.codRestrict (map (Submodule.subtype p) q) (LinearMap.domRestrict (Submodule.subtype p) q)\n    (_ : ∀ (c : { x // x ∈ q }), ↑(LinearMap.domRestrict (Submodule.subtype p) q) c ∈ map (Submodule.subtype p) q)\nx✝ : { x // x ∈ map (Submodule.subtype p) q }\nx : M\nh : x ∈ p\nleft✝ : { val := x, property := h } ∈ ↑q\n⊢ AddHom.toFun\n      { toAddHom := src✝.toAddHom,\n          map_smul' :=\n            (_ :\n              ∀ (r : R) (x : { x // x ∈ q }),\n                AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n      (Subtype.casesOn { val := x, property := (_ : ∃ a, a ∈ ↑q ∧ ↑(Submodule.subtype p) a = x) } fun x hx =>\n        { val := { val := x, property := (_ : x ∈ p) }, property := (_ : { val := x, property := (_ : x ∈ p) } ∈ q) }) =\n    { val := x, property := (_ : ∃ a, a ∈ ↑q ∧ ↑(Submodule.subtype p) a = x) }\n[PROOFSTEP]\next\n[GOAL]\ncase a\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\np : Submodule R M\nq : Submodule R { x // x ∈ p }\nsrc✝ : { x // x ∈ q } →ₗ[R] { x // x ∈ map (Submodule.subtype p) q } :=\n  LinearMap.codRestrict (map (Submodule.subtype p) q) (LinearMap.domRestrict (Submodule.subtype p) q)\n    (_ : ∀ (c : { x // x ∈ q }), ↑(LinearMap.domRestrict (Submodule.subtype p) q) c ∈ map (Submodule.subtype p) q)\nx✝ : { x // x ∈ map (Submodule.subtype p) q }\nx : M\nh : x ∈ p\nleft✝ : { val := x, property := h } ∈ ↑q\n⊢ ↑(AddHom.toFun\n        { toAddHom := src✝.toAddHom,\n            map_smul' :=\n              (_ :\n                ∀ (r : R) (x : { x // x ∈ q }),\n                  AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n        (Subtype.casesOn { val := x, property := (_ : ∃ a, a ∈ ↑q ∧ ↑(Submodule.subtype p) a = x) } fun x hx =>\n          { val := { val := x, property := (_ : x ∈ p) },\n            property := (_ : { val := x, property := (_ : x ∈ p) } ∈ q) })) =\n    ↑{ val := x, property := (_ : ∃ a, a ∈ ↑q ∧ ↑(Submodule.subtype p) a = x) }\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\np : Submodule R M\nq : Submodule R { x // x ∈ p }\nx : { x // x ∈ map (Submodule.subtype p) q }\n⊢ ↑↑(↑(LinearEquiv.symm (equivSubtypeMap p q)) x) = ↑x\n[PROOFSTEP]\ncases x\n[GOAL]\ncase mk\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\np : Submodule R M\nq : Submodule R { x // x ∈ p }\nval✝ : M\nproperty✝ : val✝ ∈ map (Submodule.subtype p) q\n⊢ ↑↑(↑(LinearEquiv.symm (equivSubtypeMap p q)) { val := val✝, property := property✝ }) =\n    ↑{ val := val✝, property := property✝ }\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\np q : Submodule R M\nhpq : p ≤ q\nx : { x // x ∈ comap (Submodule.subtype q) p }\n⊢ (fun x => { val := { val := ↑x, property := (_ : ↑x ∈ q) }, property := (_ : ↑x ∈ p) })\n      (AddHom.toFun\n        {\n            toAddHom :=\n              { toFun := fun x => { val := ↑↑x, property := (_ : ↑x ∈ comap (Submodule.subtype q) p) },\n                map_add' :=\n                  (_ :\n                    ∀ (x y : { x // x ∈ comap (Submodule.subtype q) p }),\n                      (fun x => { val := ↑↑x, property := (_ : ↑x ∈ comap (Submodule.subtype q) p) }) (x + y) =\n                        (fun x => { val := ↑↑x, property := (_ : ↑x ∈ comap (Submodule.subtype q) p) }) (x + y)) },\n            map_smul' :=\n              (_ :\n                ∀ (c : R) (x : { x // x ∈ comap (Submodule.subtype q) p }),\n                  AddHom.toFun\n                      { toFun := fun x => { val := ↑↑x, property := (_ : ↑x ∈ comap (Submodule.subtype q) p) },\n                        map_add' :=\n                          (_ :\n                            ∀ (x y : { x // x ∈ comap (Submodule.subtype q) p }),\n                              (fun x => { val := ↑↑x, property := (_ : ↑x ∈ comap (Submodule.subtype q) p) }) (x + y) =\n                                (fun x => { val := ↑↑x, property := (_ : ↑x ∈ comap (Submodule.subtype q) p) })\n                                  (x + y)) }\n                      (c • x) =\n                    AddHom.toFun\n                      { toFun := fun x => { val := ↑↑x, property := (_ : ↑x ∈ comap (Submodule.subtype q) p) },\n                        map_add' :=\n                          (_ :\n                            ∀ (x y : { x // x ∈ comap (Submodule.subtype q) p }),\n                              (fun x => { val := ↑↑x, property := (_ : ↑x ∈ comap (Submodule.subtype q) p) }) (x + y) =\n                                (fun x => { val := ↑↑x, property := (_ : ↑x ∈ comap (Submodule.subtype q) p) })\n                                  (x + y)) }\n                      (c • x)) }.toAddHom\n        x) =\n    x\n[PROOFSTEP]\nsimp only [coe_mk, SetLike.eta, LinearEquiv.coe_coe]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\np q : Submodule R M\nhpq : p ≤ q\nx : { x // x ∈ p }\n⊢ AddHom.toFun\n      {\n          toAddHom :=\n            { toFun := fun x => { val := ↑↑x, property := (_ : ↑x ∈ comap (Submodule.subtype q) p) },\n              map_add' :=\n                (_ :\n                  ∀ (x y : { x // x ∈ comap (Submodule.subtype q) p }),\n                    (fun x => { val := ↑↑x, property := (_ : ↑x ∈ comap (Submodule.subtype q) p) }) (x + y) =\n                      (fun x => { val := ↑↑x, property := (_ : ↑x ∈ comap (Submodule.subtype q) p) }) (x + y)) },\n          map_smul' :=\n            (_ :\n              ∀ (c : R) (x : { x // x ∈ comap (Submodule.subtype q) p }),\n                AddHom.toFun\n                    { toFun := fun x => { val := ↑↑x, property := (_ : ↑x ∈ comap (Submodule.subtype q) p) },\n                      map_add' :=\n                        (_ :\n                          ∀ (x y : { x // x ∈ comap (Submodule.subtype q) p }),\n                            (fun x => { val := ↑↑x, property := (_ : ↑x ∈ comap (Submodule.subtype q) p) }) (x + y) =\n                              (fun x => { val := ↑↑x, property := (_ : ↑x ∈ comap (Submodule.subtype q) p) }) (x + y)) }\n                    (c • x) =\n                  AddHom.toFun\n                    { toFun := fun x => { val := ↑↑x, property := (_ : ↑x ∈ comap (Submodule.subtype q) p) },\n                      map_add' :=\n                        (_ :\n                          ∀ (x y : { x // x ∈ comap (Submodule.subtype q) p }),\n                            (fun x => { val := ↑↑x, property := (_ : ↑x ∈ comap (Submodule.subtype q) p) }) (x + y) =\n                              (fun x => { val := ↑↑x, property := (_ : ↑x ∈ comap (Submodule.subtype q) p) }) (x + y)) }\n                    (c • x)) }.toAddHom\n      ((fun x => { val := { val := ↑x, property := (_ : ↑x ∈ q) }, property := (_ : ↑x ∈ p) }) x) =\n    x\n[PROOFSTEP]\nsimp only [Subtype.coe_mk, SetLike.eta, LinearEquiv.coe_coe]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹¹ : CommSemiring R\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : Module R M\ninst✝⁶ : Module R₂ M₂\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : AddCommMonoid N₂\ninst✝³ : Module R N\ninst✝² : Module R N₂\nτ₁₂ : R →+* R₂\nτ₂₁ : R₂ →+* R\ninst✝¹ : RingHomInvPair τ₁₂ τ₂₁\ninst✝ : RingHomInvPair τ₂₁ τ₁₂\np : Submodule R M\nq : Submodule R₂ M₂\npₗ : Submodule R N\nqₗ : Submodule R N₂\ne : M ≃ₛₗ[τ₁₂] M₂\nx : M₂\n⊢ x ∈ map (↑e) p ↔ ↑(LinearEquiv.symm e) x ∈ p\n[PROOFSTEP]\nrw [Submodule.mem_map]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹¹ : CommSemiring R\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : Module R M\ninst✝⁶ : Module R₂ M₂\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : AddCommMonoid N₂\ninst✝³ : Module R N\ninst✝² : Module R N₂\nτ₁₂ : R →+* R₂\nτ₂₁ : R₂ →+* R\ninst✝¹ : RingHomInvPair τ₁₂ τ₂₁\ninst✝ : RingHomInvPair τ₂₁ τ₁₂\np : Submodule R M\nq : Submodule R₂ M₂\npₗ : Submodule R N\nqₗ : Submodule R N₂\ne : M ≃ₛₗ[τ₁₂] M₂\nx : M₂\n⊢ (∃ y, y ∈ p ∧ ↑↑e y = x) ↔ ↑(LinearEquiv.symm e) x ∈ p\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹¹ : CommSemiring R\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : Module R M\ninst✝⁶ : Module R₂ M₂\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : AddCommMonoid N₂\ninst✝³ : Module R N\ninst✝² : Module R N₂\nτ₁₂ : R →+* R₂\nτ₂₁ : R₂ →+* R\ninst✝¹ : RingHomInvPair τ₁₂ τ₂₁\ninst✝ : RingHomInvPair τ₂₁ τ₁₂\np : Submodule R M\nq : Submodule R₂ M₂\npₗ : Submodule R N\nqₗ : Submodule R N₂\ne : M ≃ₛₗ[τ₁₂] M₂\nx : M₂\n⊢ (∃ y, y ∈ p ∧ ↑↑e y = x) → ↑(LinearEquiv.symm e) x ∈ p\n[PROOFSTEP]\nrintro ⟨y, hy, hx⟩\n[GOAL]\ncase mp.intro.intro\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹¹ : CommSemiring R\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : Module R M\ninst✝⁶ : Module R₂ M₂\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : AddCommMonoid N₂\ninst✝³ : Module R N\ninst✝² : Module R N₂\nτ₁₂ : R →+* R₂\nτ₂₁ : R₂ →+* R\ninst✝¹ : RingHomInvPair τ₁₂ τ₂₁\ninst✝ : RingHomInvPair τ₂₁ τ₁₂\np : Submodule R M\nq : Submodule R₂ M₂\npₗ : Submodule R N\nqₗ : Submodule R N₂\ne : M ≃ₛₗ[τ₁₂] M₂\nx : M₂\ny : M\nhy : y ∈ p\nhx : ↑↑e y = x\n⊢ ↑(LinearEquiv.symm e) x ∈ p\n[PROOFSTEP]\nsimp [← hx, hy]\n[GOAL]\ncase mpr\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹¹ : CommSemiring R\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : Module R M\ninst✝⁶ : Module R₂ M₂\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : AddCommMonoid N₂\ninst✝³ : Module R N\ninst✝² : Module R N₂\nτ₁₂ : R →+* R₂\nτ₂₁ : R₂ →+* R\ninst✝¹ : RingHomInvPair τ₁₂ τ₂₁\ninst✝ : RingHomInvPair τ₂₁ τ₁₂\np : Submodule R M\nq : Submodule R₂ M₂\npₗ : Submodule R N\nqₗ : Submodule R N₂\ne : M ≃ₛₗ[τ₁₂] M₂\nx : M₂\n⊢ ↑(LinearEquiv.symm e) x ∈ p → ∃ y, y ∈ p ∧ ↑↑e y = x\n[PROOFSTEP]\nintro hx\n[GOAL]\ncase mpr\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹¹ : CommSemiring R\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : Module R M\ninst✝⁶ : Module R₂ M₂\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : AddCommMonoid N₂\ninst✝³ : Module R N\ninst✝² : Module R N₂\nτ₁₂ : R →+* R₂\nτ₂₁ : R₂ →+* R\ninst✝¹ : RingHomInvPair τ₁₂ τ₂₁\ninst✝ : RingHomInvPair τ₂₁ τ₁₂\np : Submodule R M\nq : Submodule R₂ M₂\npₗ : Submodule R N\nqₗ : Submodule R N₂\ne : M ≃ₛₗ[τ₁₂] M₂\nx : M₂\nhx : ↑(LinearEquiv.symm e) x ∈ p\n⊢ ∃ y, y ∈ p ∧ ↑↑e y = x\n[PROOFSTEP]\nrefine' ⟨e.symm x, hx, by simp⟩\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹¹ : CommSemiring R\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : Module R M\ninst✝⁶ : Module R₂ M₂\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : AddCommMonoid N₂\ninst✝³ : Module R N\ninst✝² : Module R N₂\nτ₁₂ : R →+* R₂\nτ₂₁ : R₂ →+* R\ninst✝¹ : RingHomInvPair τ₁₂ τ₂₁\ninst✝ : RingHomInvPair τ₂₁ τ₁₂\np : Submodule R M\nq : Submodule R₂ M₂\npₗ : Submodule R N\nqₗ : Submodule R N₂\ne : M ≃ₛₗ[τ₁₂] M₂\nx : M₂\nhx : ↑(LinearEquiv.symm e) x ∈ p\n⊢ ↑↑e (↑(LinearEquiv.symm e) x) = x\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK✝ : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹¹ : CommSemiring R\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : Module R M\ninst✝⁶ : Module R₂ M₂\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : AddCommMonoid N₂\ninst✝³ : Module R N\ninst✝² : Module R N₂\nτ₁₂ : R →+* R₂\nτ₂₁ : R₂ →+* R\ninst✝¹ : RingHomInvPair τ₁₂ τ₂₁\ninst✝ : RingHomInvPair τ₂₁ τ₁₂\np : Submodule R M\nq : Submodule R₂ M₂\npₗ : Submodule R N\nqₗ : Submodule R N₂\ne : M ≃ₛₗ[τ₁₂] M₂\nK : Submodule R M\nx✝ : M₂\n⊢ x✝ ∈ map (↑e) K ↔ x✝ ∈ comap (↑(LinearEquiv.symm e)) K\n[PROOFSTEP]\nrw [mem_map_equiv, mem_comap, LinearEquiv.coe_coe]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK✝ : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹¹ : CommSemiring R\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : Module R M\ninst✝⁶ : Module R₂ M₂\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : AddCommMonoid N₂\ninst✝³ : Module R N\ninst✝² : Module R N₂\nτ₁₂ : R →+* R₂\nτ₂₁ : R₂ →+* R\ninst✝¹ : RingHomInvPair τ₁₂ τ₂₁\ninst✝ : RingHomInvPair τ₂₁ τ₁₂\np : Submodule R M\nq : Submodule R₂ M₂\npₗ : Submodule R N\nqₗ : Submodule R N₂\ne : M ≃ₛₗ[τ₁₂] M₂\nK : Submodule R₂ M₂\n⊢ map (LinearEquiv.symm e) K = p ↔ map e p = K\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK✝ : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹¹ : CommSemiring R\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : Module R M\ninst✝⁶ : Module R₂ M₂\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : AddCommMonoid N₂\ninst✝³ : Module R N\ninst✝² : Module R N₂\nτ₁₂ : R →+* R₂\nτ₂₁ : R₂ →+* R\ninst✝¹ : RingHomInvPair τ₁₂ τ₂₁\ninst✝ : RingHomInvPair τ₂₁ τ₁₂\np : Submodule R M\nq : Submodule R₂ M₂\npₗ : Submodule R N\nqₗ : Submodule R N₂\ne : M ≃ₛₗ[τ₁₂] M₂\nK : Submodule R₂ M₂\n⊢ map (LinearEquiv.symm e) K = p → map e p = K\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase mpr\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK✝ : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹¹ : CommSemiring R\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : Module R M\ninst✝⁶ : Module R₂ M₂\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : AddCommMonoid N₂\ninst✝³ : Module R N\ninst✝² : Module R N₂\nτ₁₂ : R →+* R₂\nτ₂₁ : R₂ →+* R\ninst✝¹ : RingHomInvPair τ₁₂ τ₂₁\ninst✝ : RingHomInvPair τ₂₁ τ₁₂\np : Submodule R M\nq : Submodule R₂ M₂\npₗ : Submodule R N\nqₗ : Submodule R N₂\ne : M ≃ₛₗ[τ₁₂] M₂\nK : Submodule R₂ M₂\n⊢ map e p = K → map (LinearEquiv.symm e) K = p\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase mp\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK✝ : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹¹ : CommSemiring R\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : Module R M\ninst✝⁶ : Module R₂ M₂\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : AddCommMonoid N₂\ninst✝³ : Module R N\ninst✝² : Module R N₂\nτ₁₂ : R →+* R₂\nτ₂₁ : R₂ →+* R\ninst✝¹ : RingHomInvPair τ₁₂ τ₂₁\ninst✝ : RingHomInvPair τ₂₁ τ₁₂\nq : Submodule R₂ M₂\npₗ : Submodule R N\nqₗ : Submodule R N₂\ne : M ≃ₛₗ[τ₁₂] M₂\nK : Submodule R₂ M₂\n⊢ map e (map (LinearEquiv.symm e) K) = K\n[PROOFSTEP]\ncalc\n  map e (map e.symm K) = comap e.symm (map e.symm K) := map_equiv_eq_comap_symm _ _\n  _ = K := comap_map_eq_of_injective e.symm.injective _\n[GOAL]\ncase mpr\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹¹ : CommSemiring R\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : Module R M\ninst✝⁶ : Module R₂ M₂\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : AddCommMonoid N₂\ninst✝³ : Module R N\ninst✝² : Module R N₂\nτ₁₂ : R →+* R₂\nτ₂₁ : R₂ →+* R\ninst✝¹ : RingHomInvPair τ₁₂ τ₂₁\ninst✝ : RingHomInvPair τ₂₁ τ₁₂\np : Submodule R M\nq : Submodule R₂ M₂\npₗ : Submodule R N\nqₗ : Submodule R N₂\ne : M ≃ₛₗ[τ₁₂] M₂\n⊢ map (LinearEquiv.symm e) (map e p) = p\n[PROOFSTEP]\ncalc\n  map e.symm (map e p) = comap e (map e p) := (comap_equiv_eq_map_symm _ _).symm\n  _ = p := comap_map_eq_of_injective e.injective _\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹¹ : CommSemiring R\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : Module R M\ninst✝⁶ : Module R₂ M₂\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : AddCommMonoid N₂\ninst✝³ : Module R N\ninst✝² : Module R N₂\nτ₁₂ : R →+* R₂\nτ₂₁ : R₂ →+* R\ninst✝¹ : RingHomInvPair τ₁₂ τ₂₁\ninst✝ : RingHomInvPair τ₂₁ τ₁₂\np : Submodule R M\nq : Submodule R₂ M₂\npₗ : Submodule R N\nqₗ : Submodule R N₂\nfₗ : N →ₗ[R] N₂\nc : R\n⊢ comap fₗ qₗ ≤ comap (c • fₗ) qₗ\n[PROOFSTEP]\nrw [SetLike.le_def]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹¹ : CommSemiring R\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : Module R M\ninst✝⁶ : Module R₂ M₂\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : AddCommMonoid N₂\ninst✝³ : Module R N\ninst✝² : Module R N₂\nτ₁₂ : R →+* R₂\nτ₂₁ : R₂ →+* R\ninst✝¹ : RingHomInvPair τ₁₂ τ₂₁\ninst✝ : RingHomInvPair τ₂₁ τ₁₂\np : Submodule R M\nq : Submodule R₂ M₂\npₗ : Submodule R N\nqₗ : Submodule R N₂\nfₗ : N →ₗ[R] N₂\nc : R\n⊢ ∀ ⦃x : N⦄, x ∈ comap fₗ qₗ → x ∈ comap (c • fₗ) qₗ\n[PROOFSTEP]\nintro m h\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹¹ : CommSemiring R\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : Module R M\ninst✝⁶ : Module R₂ M₂\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : AddCommMonoid N₂\ninst✝³ : Module R N\ninst✝² : Module R N₂\nτ₁₂ : R →+* R₂\nτ₂₁ : R₂ →+* R\ninst✝¹ : RingHomInvPair τ₁₂ τ₂₁\ninst✝ : RingHomInvPair τ₂₁ τ₁₂\np : Submodule R M\nq : Submodule R₂ M₂\npₗ : Submodule R N\nqₗ : Submodule R N₂\nfₗ : N →ₗ[R] N₂\nc : R\nm : N\nh : m ∈ comap fₗ qₗ\n⊢ m ∈ comap (c • fₗ) qₗ\n[PROOFSTEP]\nchange c • fₗ m ∈ qₗ\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹¹ : CommSemiring R\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : Module R M\ninst✝⁶ : Module R₂ M₂\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : AddCommMonoid N₂\ninst✝³ : Module R N\ninst✝² : Module R N₂\nτ₁₂ : R →+* R₂\nτ₂₁ : R₂ →+* R\ninst✝¹ : RingHomInvPair τ₁₂ τ₂₁\ninst✝ : RingHomInvPair τ₂₁ τ₁₂\np : Submodule R M\nq : Submodule R₂ M₂\npₗ : Submodule R N\nqₗ : Submodule R N₂\nfₗ : N →ₗ[R] N₂\nc : R\nm : N\nh : m ∈ comap fₗ qₗ\n⊢ c • ↑fₗ m ∈ qₗ\n[PROOFSTEP]\nreplace h : fₗ m ∈ qₗ := h\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹¹ : CommSemiring R\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : Module R M\ninst✝⁶ : Module R₂ M₂\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : AddCommMonoid N₂\ninst✝³ : Module R N\ninst✝² : Module R N₂\nτ₁₂ : R →+* R₂\nτ₂₁ : R₂ →+* R\ninst✝¹ : RingHomInvPair τ₁₂ τ₂₁\ninst✝ : RingHomInvPair τ₂₁ τ₁₂\np : Submodule R M\nq : Submodule R₂ M₂\npₗ : Submodule R N\nqₗ : Submodule R N₂\nfₗ : N →ₗ[R] N₂\nc : R\nm : N\nh : ↑fₗ m ∈ qₗ\n⊢ c • ↑fₗ m ∈ qₗ\n[PROOFSTEP]\napply qₗ.smul_mem _ h\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹¹ : CommSemiring R\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : Module R M\ninst✝⁶ : Module R₂ M₂\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : AddCommMonoid N₂\ninst✝³ : Module R N\ninst✝² : Module R N₂\nτ₁₂ : R →+* R₂\nτ₂₁ : R₂ →+* R\ninst✝¹ : RingHomInvPair τ₁₂ τ₂₁\ninst✝ : RingHomInvPair τ₂₁ τ₁₂\np : Submodule R M\nq : Submodule R₂ M₂\npₗ : Submodule R N\nqₗ : Submodule R N₂\nf₁ f₂ : M →ₛₗ[τ₁₂] M₂\n⊢ comap f₁ q ⊓ comap f₂ q ≤ comap (f₁ + f₂) q\n[PROOFSTEP]\nrw [SetLike.le_def]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹¹ : CommSemiring R\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : Module R M\ninst✝⁶ : Module R₂ M₂\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : AddCommMonoid N₂\ninst✝³ : Module R N\ninst✝² : Module R N₂\nτ₁₂ : R →+* R₂\nτ₂₁ : R₂ →+* R\ninst✝¹ : RingHomInvPair τ₁₂ τ₂₁\ninst✝ : RingHomInvPair τ₂₁ τ₁₂\np : Submodule R M\nq : Submodule R₂ M₂\npₗ : Submodule R N\nqₗ : Submodule R N₂\nf₁ f₂ : M →ₛₗ[τ₁₂] M₂\n⊢ ∀ ⦃x : M⦄, x ∈ comap f₁ q ⊓ comap f₂ q → x ∈ comap (f₁ + f₂) q\n[PROOFSTEP]\nintro m h\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹¹ : CommSemiring R\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : Module R M\ninst✝⁶ : Module R₂ M₂\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : AddCommMonoid N₂\ninst✝³ : Module R N\ninst✝² : Module R N₂\nτ₁₂ : R →+* R₂\nτ₂₁ : R₂ →+* R\ninst✝¹ : RingHomInvPair τ₁₂ τ₂₁\ninst✝ : RingHomInvPair τ₂₁ τ₁₂\np : Submodule R M\nq : Submodule R₂ M₂\npₗ : Submodule R N\nqₗ : Submodule R N₂\nf₁ f₂ : M →ₛₗ[τ₁₂] M₂\nm : M\nh : m ∈ comap f₁ q ⊓ comap f₂ q\n⊢ m ∈ comap (f₁ + f₂) q\n[PROOFSTEP]\nchange f₁ m + f₂ m ∈ q\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹¹ : CommSemiring R\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : Module R M\ninst✝⁶ : Module R₂ M₂\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : AddCommMonoid N₂\ninst✝³ : Module R N\ninst✝² : Module R N₂\nτ₁₂ : R →+* R₂\nτ₂₁ : R₂ →+* R\ninst✝¹ : RingHomInvPair τ₁₂ τ₂₁\ninst✝ : RingHomInvPair τ₂₁ τ₁₂\np : Submodule R M\nq : Submodule R₂ M₂\npₗ : Submodule R N\nqₗ : Submodule R N₂\nf₁ f₂ : M →ₛₗ[τ₁₂] M₂\nm : M\nh : m ∈ comap f₁ q ⊓ comap f₂ q\n⊢ ↑f₁ m + ↑f₂ m ∈ q\n[PROOFSTEP]\nreplace h : f₁ m ∈ q ∧ f₂ m ∈ q := h\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹¹ : CommSemiring R\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : Module R M\ninst✝⁶ : Module R₂ M₂\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : AddCommMonoid N₂\ninst✝³ : Module R N\ninst✝² : Module R N₂\nτ₁₂ : R →+* R₂\nτ₂₁ : R₂ →+* R\ninst✝¹ : RingHomInvPair τ₁₂ τ₂₁\ninst✝ : RingHomInvPair τ₂₁ τ₁₂\np : Submodule R M\nq : Submodule R₂ M₂\npₗ : Submodule R N\nqₗ : Submodule R N₂\nf₁ f₂ : M →ₛₗ[τ₁₂] M₂\nm : M\nh : ↑f₁ m ∈ q ∧ ↑f₂ m ∈ q\n⊢ ↑f₁ m + ↑f₂ m ∈ q\n[PROOFSTEP]\napply q.add_mem h.1 h.2\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹¹ : CommSemiring R\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : Module R M\ninst✝⁶ : Module R₂ M₂\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : AddCommMonoid N₂\ninst✝³ : Module R N\ninst✝² : Module R N₂\nτ₁₂ : R →+* R₂\nτ₂₁ : R₂ →+* R\ninst✝¹ : RingHomInvPair τ₁₂ τ₂₁\ninst✝ : RingHomInvPair τ₂₁ τ₁₂\np : Submodule R M\nq : Submodule R₂ M₂\npₗ : Submodule R N\nqₗ : Submodule R N₂\nf₁ f₂ : N →ₗ[R] N₂\nh₁ : f₁ ∈ {fₗ | pₗ ≤ comap fₗ qₗ}\nh₂ : f₂ ∈ {fₗ | pₗ ≤ comap fₗ qₗ}\n⊢ f₁ + f₂ ∈ {fₗ | pₗ ≤ comap fₗ qₗ}\n[PROOFSTEP]\napply le_trans _ (inf_comap_le_comap_add qₗ f₁ f₂)\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹¹ : CommSemiring R\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : Module R M\ninst✝⁶ : Module R₂ M₂\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : AddCommMonoid N₂\ninst✝³ : Module R N\ninst✝² : Module R N₂\nτ₁₂ : R →+* R₂\nτ₂₁ : R₂ →+* R\ninst✝¹ : RingHomInvPair τ₁₂ τ₂₁\ninst✝ : RingHomInvPair τ₂₁ τ₁₂\np : Submodule R M\nq : Submodule R₂ M₂\npₗ : Submodule R N\nqₗ : Submodule R N₂\nf₁ f₂ : N →ₗ[R] N₂\nh₁ : f₁ ∈ {fₗ | pₗ ≤ comap fₗ qₗ}\nh₂ : f₂ ∈ {fₗ | pₗ ≤ comap fₗ qₗ}\n⊢ pₗ ≤ comap f₁ qₗ ⊓ comap f₂ qₗ\n[PROOFSTEP]\nrw [le_inf_iff]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹¹ : CommSemiring R\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : Module R M\ninst✝⁶ : Module R₂ M₂\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : AddCommMonoid N₂\ninst✝³ : Module R N\ninst✝² : Module R N₂\nτ₁₂ : R →+* R₂\nτ₂₁ : R₂ →+* R\ninst✝¹ : RingHomInvPair τ₁₂ τ₂₁\ninst✝ : RingHomInvPair τ₂₁ τ₁₂\np : Submodule R M\nq : Submodule R₂ M₂\npₗ : Submodule R N\nqₗ : Submodule R N₂\nf₁ f₂ : N →ₗ[R] N₂\nh₁ : f₁ ∈ {fₗ | pₗ ≤ comap fₗ qₗ}\nh₂ : f₂ ∈ {fₗ | pₗ ≤ comap fₗ qₗ}\n⊢ pₗ ≤ comap f₁ qₗ ∧ pₗ ≤ comap f₂ qₗ\n[PROOFSTEP]\nexact ⟨h₁, h₂⟩\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹¹ : CommSemiring R\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : Module R M\ninst✝⁶ : Module R₂ M₂\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : AddCommMonoid N₂\ninst✝³ : Module R N\ninst✝² : Module R N₂\nτ₁₂ : R →+* R₂\nτ₂₁ : R₂ →+* R\ninst✝¹ : RingHomInvPair τ₁₂ τ₂₁\ninst✝ : RingHomInvPair τ₂₁ τ₁₂\np : Submodule R M\nq : Submodule R₂ M₂\npₗ : Submodule R N\nqₗ : Submodule R N₂\n⊢ 0 ∈\n    { carrier := {fₗ | pₗ ≤ comap fₗ qₗ},\n        add_mem' :=\n          (_ :\n            ∀ {f₁ f₂ : N →ₗ[R] N₂},\n              f₁ ∈ {fₗ | pₗ ≤ comap fₗ qₗ} → f₂ ∈ {fₗ | pₗ ≤ comap fₗ qₗ} → pₗ ≤ comap (f₁ + f₂) qₗ) }.carrier\n[PROOFSTEP]\nchange pₗ ≤ comap (0 : N →ₗ[R] N₂) qₗ\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹¹ : CommSemiring R\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : Module R M\ninst✝⁶ : Module R₂ M₂\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : AddCommMonoid N₂\ninst✝³ : Module R N\ninst✝² : Module R N₂\nτ₁₂ : R →+* R₂\nτ₂₁ : R₂ →+* R\ninst✝¹ : RingHomInvPair τ₁₂ τ₂₁\ninst✝ : RingHomInvPair τ₂₁ τ₁₂\np : Submodule R M\nq : Submodule R₂ M₂\npₗ : Submodule R N\nqₗ : Submodule R N₂\n⊢ pₗ ≤ comap 0 qₗ\n[PROOFSTEP]\nrw [comap_zero]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹¹ : CommSemiring R\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : Module R M\ninst✝⁶ : Module R₂ M₂\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : AddCommMonoid N₂\ninst✝³ : Module R N\ninst✝² : Module R N₂\nτ₁₂ : R →+* R₂\nτ₂₁ : R₂ →+* R\ninst✝¹ : RingHomInvPair τ₁₂ τ₂₁\ninst✝ : RingHomInvPair τ₂₁ τ₁₂\np : Submodule R M\nq : Submodule R₂ M₂\npₗ : Submodule R N\nqₗ : Submodule R N₂\n⊢ pₗ ≤ ⊤\n[PROOFSTEP]\nrefine' le_top\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹¹ : CommSemiring R\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : Module R M\ninst✝⁶ : Module R₂ M₂\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : AddCommMonoid N₂\ninst✝³ : Module R N\ninst✝² : Module R N₂\nτ₁₂ : R →+* R₂\nτ₂₁ : R₂ →+* R\ninst✝¹ : RingHomInvPair τ₁₂ τ₂₁\ninst✝ : RingHomInvPair τ₂₁ τ₁₂\np : Submodule R M\nq : Submodule R₂ M₂\npₗ : Submodule R N\nqₗ : Submodule R N₂\nc : R\nfₗ : N →ₗ[R] N₂\nh :\n  fₗ ∈\n    {\n          toAddSubsemigroup :=\n            { carrier := {fₗ | pₗ ≤ comap fₗ qₗ},\n              add_mem' :=\n                (_ :\n                  ∀ {f₁ f₂ : N →ₗ[R] N₂},\n                    f₁ ∈ {fₗ | pₗ ≤ comap fₗ qₗ} → f₂ ∈ {fₗ | pₗ ≤ comap fₗ qₗ} → pₗ ≤ comap (f₁ + f₂) qₗ) },\n          zero_mem' := (_ : pₗ ≤ comap 0 qₗ) }.toAddSubsemigroup.carrier\n⊢ c • fₗ ∈\n    {\n          toAddSubsemigroup :=\n            { carrier := {fₗ | pₗ ≤ comap fₗ qₗ},\n              add_mem' :=\n                (_ :\n                  ∀ {f₁ f₂ : N →ₗ[R] N₂},\n                    f₁ ∈ {fₗ | pₗ ≤ comap fₗ qₗ} → f₂ ∈ {fₗ | pₗ ≤ comap fₗ qₗ} → pₗ ≤ comap (f₁ + f₂) qₗ) },\n          zero_mem' := (_ : pₗ ≤ comap 0 qₗ) }.toAddSubsemigroup.carrier\n[PROOFSTEP]\ndsimp at h \n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝¹¹ : CommSemiring R\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : Module R M\ninst✝⁶ : Module R₂ M₂\ninst✝⁵ : AddCommMonoid N\ninst✝⁴ : AddCommMonoid N₂\ninst✝³ : Module R N\ninst✝² : Module R N₂\nτ₁₂ : R →+* R₂\nτ₂₁ : R₂ →+* R\ninst✝¹ : RingHomInvPair τ₁₂ τ₂₁\ninst✝ : RingHomInvPair τ₂₁ τ₁₂\np : Submodule R M\nq : Submodule R₂ M₂\npₗ : Submodule R N\nqₗ : Submodule R N₂\nc : R\nfₗ : N →ₗ[R] N₂\nh : pₗ ≤ comap fₗ qₗ\n⊢ c • fₗ ∈\n    {\n          toAddSubsemigroup :=\n            { carrier := {fₗ | pₗ ≤ comap fₗ qₗ},\n              add_mem' :=\n                (_ :\n                  ∀ {f₁ f₂ : N →ₗ[R] N₂},\n                    f₁ ∈ {fₗ | pₗ ≤ comap fₗ qₗ} → f₂ ∈ {fₗ | pₗ ≤ comap fₗ qₗ} → pₗ ≤ comap (f₁ + f₂) qₗ) },\n          zero_mem' := (_ : pₗ ≤ comap 0 qₗ) }.toAddSubsemigroup.carrier\n[PROOFSTEP]\nexact le_trans h (comap_le_comap_smul qₗ fₗ c)\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nm : Type u_20\nn : Type u_21\np : Type u_22\nf : m → n\nhf : Injective f\n⊢ Surjective ↑(funLeft R M f)\n[PROOFSTEP]\nclassical\nintro g\nrefine' ⟨fun x => if h : ∃ y, f y = x then g h.choose else 0, _⟩\n· ext\n  dsimp only [funLeft_apply]\n  split_ifs with w\n  · congr\n    exact hf w.choose_spec\n  · simp only [not_true, exists_apply_eq_apply] at w \n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nm : Type u_20\nn : Type u_21\np : Type u_22\nf : m → n\nhf : Injective f\n⊢ Surjective ↑(funLeft R M f)\n[PROOFSTEP]\nintro g\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nm : Type u_20\nn : Type u_21\np : Type u_22\nf : m → n\nhf : Injective f\ng : m → M\n⊢ ∃ a, ↑(funLeft R M f) a = g\n[PROOFSTEP]\nrefine' ⟨fun x => if h : ∃ y, f y = x then g h.choose else 0, _⟩\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nm : Type u_20\nn : Type u_21\np : Type u_22\nf : m → n\nhf : Injective f\ng : m → M\n⊢ (↑(funLeft R M f) fun x => if h : ∃ y, f y = x then g (Exists.choose h) else 0) = g\n[PROOFSTEP]\next\n[GOAL]\ncase h\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nm : Type u_20\nn : Type u_21\np : Type u_22\nf : m → n\nhf : Injective f\ng : m → M\nx✝ : m\n⊢ ↑(funLeft R M f) (fun x => if h : ∃ y, f y = x then g (Exists.choose h) else 0) x✝ = g x✝\n[PROOFSTEP]\ndsimp only [funLeft_apply]\n[GOAL]\ncase h\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nm : Type u_20\nn : Type u_21\np : Type u_22\nf : m → n\nhf : Injective f\ng : m → M\nx✝ : m\n⊢ (if h : ∃ y, f y = f x✝ then g (Exists.choose h) else 0) = g x✝\n[PROOFSTEP]\nsplit_ifs with w\n[GOAL]\ncase pos\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nm : Type u_20\nn : Type u_21\np : Type u_22\nf : m → n\nhf : Injective f\ng : m → M\nx✝ : m\nw : ∃ y, f y = f x✝\n⊢ g (Exists.choose w) = g x✝\n[PROOFSTEP]\ncongr\n[GOAL]\ncase pos.e_a\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nm : Type u_20\nn : Type u_21\np : Type u_22\nf : m → n\nhf : Injective f\ng : m → M\nx✝ : m\nw : ∃ y, f y = f x✝\n⊢ Exists.choose w = x✝\n[PROOFSTEP]\nexact hf w.choose_spec\n[GOAL]\ncase neg\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nm : Type u_20\nn : Type u_21\np : Type u_22\nf : m → n\nhf : Injective f\ng : m → M\nx✝ : m\nw : ¬∃ y, f y = f x✝\n⊢ 0 = g x✝\n[PROOFSTEP]\nsimp only [not_true, exists_apply_eq_apply] at w \n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nm : Type u_20\nn : Type u_21\np : Type u_22\nf : m → n\nhf : Surjective f\n⊢ Injective ↑(funLeft R M f)\n[PROOFSTEP]\nobtain ⟨g, hg⟩ := hf.hasRightInverse\n[GOAL]\ncase intro\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nm : Type u_20\nn : Type u_21\np : Type u_22\nf : m → n\nhf : Surjective f\ng : n → m\nhg : Function.RightInverse g f\n⊢ Injective ↑(funLeft R M f)\n[PROOFSTEP]\nsuffices LeftInverse (funLeft R M g) (funLeft R M f) by exact this.injective\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nm : Type u_20\nn : Type u_21\np : Type u_22\nf : m → n\nhf : Surjective f\ng : n → m\nhg : Function.RightInverse g f\nthis : LeftInverse ↑(funLeft R M g) ↑(funLeft R M f)\n⊢ Injective ↑(funLeft R M f)\n[PROOFSTEP]\nexact this.injective\n[GOAL]\ncase intro\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nm : Type u_20\nn : Type u_21\np : Type u_22\nf : m → n\nhf : Surjective f\ng : n → m\nhg : Function.RightInverse g f\n⊢ LeftInverse ↑(funLeft R M g) ↑(funLeft R M f)\n[PROOFSTEP]\nintro x\n[GOAL]\ncase intro\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nm : Type u_20\nn : Type u_21\np : Type u_22\nf : m → n\nhf : Surjective f\ng : n → m\nhg : Function.RightInverse g f\nx : n → M\n⊢ ↑(funLeft R M g) (↑(funLeft R M f) x) = x\n[PROOFSTEP]\nrw [← LinearMap.comp_apply, ← funLeft_comp, hg.id, funLeft_id]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nm : Type u_20\nn : Type u_21\np : Type u_22\ne : m ≃ n\nx : m → M\ni : m\n⊢ ↑(LinearMap.comp (funLeft R M ↑e) (funLeft R M ↑e.symm)) x i = ↑LinearMap.id x i\n[PROOFSTEP]\nrw [id_apply, ← funLeft_comp, Equiv.symm_comp_self, LinearMap.funLeft_id]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nR₃ : Type u_4\nR₄ : Type u_5\nS : Type u_6\nK : Type u_7\nK₂ : Type u_8\nM : Type u_9\nM' : Type u_10\nM₁ : Type u_11\nM₂ : Type u_12\nM₃ : Type u_13\nM₄ : Type u_14\nN : Type u_15\nN₂ : Type u_16\nι : Type u_17\nV : Type u_18\nV₂ : Type u_19\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nm : Type u_20\nn : Type u_21\np : Type u_22\ne : m ≃ n\nx : n → M\ni : n\n⊢ ↑(LinearMap.comp (funLeft R M ↑e.symm) (funLeft R M ↑e)) x i = ↑LinearMap.id x i\n[PROOFSTEP]\nrw [id_apply, ← funLeft_comp, Equiv.self_comp_symm, LinearMap.funLeft_id]\n", "meta": {"mathlib_filename": "Mathlib.LinearAlgebra.Basic", "llama_tokens": 192002, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8006920020959544, "lm_q2_score": 0.6825737344123242, "lm_q1q2_score": 0.5465313299847161}}
{"text": "[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\nR : Type u_5\nm_fin : Fintype m\ninst✝⁴ : Fintype n\ninst✝³ : Fintype o\ninst✝² : CommRing R\ninst✝¹ : StrongRankCondition R\ninst✝ : DecidableEq n\n⊢ rank 1 = Fintype.card n\n[PROOFSTEP]\nrw [rank, mulVecLin_one, LinearMap.range_id, finrank_top, finrank_pi]\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\nR : Type u_5\nm_fin : Fintype m\ninst✝³ : Fintype n\ninst✝² : Fintype o\ninst✝¹ : CommRing R\ninst✝ : Nontrivial R\n⊢ rank 0 = 0\n[PROOFSTEP]\nrw [rank, mulVecLin_zero, LinearMap.range_zero, finrank_bot]\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\nR : Type u_5\nm_fin : Fintype m\ninst✝³ : Fintype n\ninst✝² : Fintype o\ninst✝¹ : CommRing R\ninst✝ : StrongRankCondition R\nA : Matrix m n R\n⊢ rank A ≤ Fintype.card n\n[PROOFSTEP]\nhaveI : Module.Finite R (n → R) := Module.Finite.pi\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\nR : Type u_5\nm_fin : Fintype m\ninst✝³ : Fintype n\ninst✝² : Fintype o\ninst✝¹ : CommRing R\ninst✝ : StrongRankCondition R\nA : Matrix m n R\nthis : Module.Finite R (n → R)\n⊢ rank A ≤ Fintype.card n\n[PROOFSTEP]\nhaveI : Module.Free R (n → R) := Module.Free.pi _ _\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\nR : Type u_5\nm_fin : Fintype m\ninst✝³ : Fintype n\ninst✝² : Fintype o\ninst✝¹ : CommRing R\ninst✝ : StrongRankCondition R\nA : Matrix m n R\nthis✝ : Module.Finite R (n → R)\nthis : Module.Free R (n → R)\n⊢ rank A ≤ Fintype.card n\n[PROOFSTEP]\nexact A.mulVecLin.finrank_range_le.trans_eq (finrank_pi _)\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\nR : Type u_5\nm_fin : Fintype m\ninst✝³ : Fintype n\ninst✝² : Fintype o\ninst✝¹ : CommRing R\ninst✝ : StrongRankCondition R\nA : Matrix m n R\nB : Matrix n o R\n⊢ rank (A * B) ≤ rank A\n[PROOFSTEP]\nrw [rank, rank, mulVecLin_mul]\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\nR : Type u_5\nm_fin : Fintype m\ninst✝³ : Fintype n\ninst✝² : Fintype o\ninst✝¹ : CommRing R\ninst✝ : StrongRankCondition R\nA : Matrix m n R\nB : Matrix n o R\n⊢ finrank R { x // x ∈ LinearMap.range (LinearMap.comp (mulVecLin A) (mulVecLin B)) } ≤\n    finrank R { x // x ∈ LinearMap.range (mulVecLin A) }\n[PROOFSTEP]\nexact Cardinal.toNat_le_of_le_of_lt_aleph0 (rank_lt_aleph0 _ _) (LinearMap.rank_comp_le_left _ _)\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\nR : Type u_5\nm_fin : Fintype m\ninst✝³ : Fintype n\ninst✝² : Fintype o\ninst✝¹ : CommRing R\ninst✝ : StrongRankCondition R\nA : Matrix l m R\nB : Matrix m n R\n⊢ rank (A * B) ≤ rank B\n[PROOFSTEP]\nrw [rank, rank, mulVecLin_mul]\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\nR : Type u_5\nm_fin : Fintype m\ninst✝³ : Fintype n\ninst✝² : Fintype o\ninst✝¹ : CommRing R\ninst✝ : StrongRankCondition R\nA : Matrix l m R\nB : Matrix m n R\n⊢ finrank R { x // x ∈ LinearMap.range (LinearMap.comp (mulVecLin A) (mulVecLin B)) } ≤\n    finrank R { x // x ∈ LinearMap.range (mulVecLin B) }\n[PROOFSTEP]\nexact finrank_le_finrank_of_rank_le_rank (LinearMap.lift_rank_comp_le_right _ _) (rank_lt_aleph0 _ _)\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\nR : Type u_5\nm_fin : Fintype m\ninst✝⁴ : Fintype n\ninst✝³ : Fintype o\ninst✝² : CommRing R\ninst✝¹ : StrongRankCondition R\ninst✝ : DecidableEq n\nA : (Matrix n n R)ˣ\n⊢ rank ↑A = Fintype.card n\n[PROOFSTEP]\nrefine' le_antisymm (rank_le_card_width A) _\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\nR : Type u_5\nm_fin : Fintype m\ninst✝⁴ : Fintype n\ninst✝³ : Fintype o\ninst✝² : CommRing R\ninst✝¹ : StrongRankCondition R\ninst✝ : DecidableEq n\nA : (Matrix n n R)ˣ\n⊢ Fintype.card n ≤ rank ↑A\n[PROOFSTEP]\nhave := rank_mul_le_left (A : Matrix n n R) (↑A⁻¹ : Matrix n n R)\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\nR : Type u_5\nm_fin : Fintype m\ninst✝⁴ : Fintype n\ninst✝³ : Fintype o\ninst✝² : CommRing R\ninst✝¹ : StrongRankCondition R\ninst✝ : DecidableEq n\nA : (Matrix n n R)ˣ\nthis : rank (↑A * ↑A⁻¹) ≤ rank ↑A\n⊢ Fintype.card n ≤ rank ↑A\n[PROOFSTEP]\nrwa [← Units.val_mul, mul_inv_self, Units.val_one, rank_one] at this \n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\nR : Type u_5\nm_fin : Fintype m\ninst✝⁴ : Fintype n\ninst✝³ : Fintype o\ninst✝² : CommRing R\ninst✝¹ : StrongRankCondition R\ninst✝ : DecidableEq n\nA : Matrix n n R\nh : IsUnit A\n⊢ rank A = Fintype.card n\n[PROOFSTEP]\nobtain ⟨A, rfl⟩ := h\n[GOAL]\ncase intro\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\nR : Type u_5\nm_fin : Fintype m\ninst✝⁴ : Fintype n\ninst✝³ : Fintype o\ninst✝² : CommRing R\ninst✝¹ : StrongRankCondition R\ninst✝ : DecidableEq n\nA : (Matrix n n R)ˣ\n⊢ rank ↑A = Fintype.card n\n[PROOFSTEP]\nexact rank_unit A\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\nR : Type u_5\nm_fin : Fintype m\ninst✝³ : Fintype n\ninst✝² : Fintype o\ninst✝¹ : CommRing R\ninst✝ : DecidableEq n\nA : Matrix n n R\nB : Matrix m n R\nhA : IsUnit (det A)\n⊢ rank (B * A) = rank B\n[PROOFSTEP]\nsuffices : Function.Surjective A.mulVecLin\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\nR : Type u_5\nm_fin : Fintype m\ninst✝³ : Fintype n\ninst✝² : Fintype o\ninst✝¹ : CommRing R\ninst✝ : DecidableEq n\nA : Matrix n n R\nB : Matrix m n R\nhA : IsUnit (det A)\nthis : Function.Surjective ↑(mulVecLin A)\n⊢ rank (B * A) = rank B\n[PROOFSTEP]\nrw [rank, mulVecLin_mul, LinearMap.range_comp_of_range_eq_top _ (LinearMap.range_eq_top.mpr this), ← rank]\n[GOAL]\ncase this\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\nR : Type u_5\nm_fin : Fintype m\ninst✝³ : Fintype n\ninst✝² : Fintype o\ninst✝¹ : CommRing R\ninst✝ : DecidableEq n\nA : Matrix n n R\nB : Matrix m n R\nhA : IsUnit (det A)\n⊢ Function.Surjective ↑(mulVecLin A)\n[PROOFSTEP]\nintro v\n[GOAL]\ncase this\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\nR : Type u_5\nm_fin : Fintype m\ninst✝³ : Fintype n\ninst✝² : Fintype o\ninst✝¹ : CommRing R\ninst✝ : DecidableEq n\nA : Matrix n n R\nB : Matrix m n R\nhA : IsUnit (det A)\nv : n → R\n⊢ ∃ a, ↑(mulVecLin A) a = v\n[PROOFSTEP]\nexact ⟨(A⁻¹).mulVecLin v, by simp [mul_nonsing_inv _ hA]⟩\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\nR : Type u_5\nm_fin : Fintype m\ninst✝³ : Fintype n\ninst✝² : Fintype o\ninst✝¹ : CommRing R\ninst✝ : DecidableEq n\nA : Matrix n n R\nB : Matrix m n R\nhA : IsUnit (det A)\nv : n → R\n⊢ ↑(mulVecLin A) (↑(mulVecLin A⁻¹) v) = v\n[PROOFSTEP]\nsimp [mul_nonsing_inv _ hA]\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\nR : Type u_5\nm_fin : Fintype m\ninst✝³ : Fintype n\ninst✝² : Fintype o\ninst✝¹ : CommRing R\ninst✝ : DecidableEq m\nA : Matrix m m R\nB : Matrix m n R\nhA : IsUnit (det A)\n⊢ rank (A * B) = rank B\n[PROOFSTEP]\nlet b : Basis m R (m → R) := Pi.basisFun R m\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\nR : Type u_5\nm_fin : Fintype m\ninst✝³ : Fintype n\ninst✝² : Fintype o\ninst✝¹ : CommRing R\ninst✝ : DecidableEq m\nA : Matrix m m R\nB : Matrix m n R\nhA : IsUnit (det A)\nb : Basis m R (m → R) := Pi.basisFun R m\n⊢ rank (A * B) = rank B\n[PROOFSTEP]\nreplace hA : IsUnit (LinearMap.toMatrix b b A.mulVecLin).det := by convert hA; rw [← LinearEquiv.eq_symm_apply]; rfl\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\nR : Type u_5\nm_fin : Fintype m\ninst✝³ : Fintype n\ninst✝² : Fintype o\ninst✝¹ : CommRing R\ninst✝ : DecidableEq m\nA : Matrix m m R\nB : Matrix m n R\nhA : IsUnit (det A)\nb : Basis m R (m → R) := Pi.basisFun R m\n⊢ IsUnit (det (↑(LinearMap.toMatrix b b) (mulVecLin A)))\n[PROOFSTEP]\nconvert hA\n[GOAL]\ncase h.e'_3.h.e'_6\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\nR : Type u_5\nm_fin : Fintype m\ninst✝³ : Fintype n\ninst✝² : Fintype o\ninst✝¹ : CommRing R\ninst✝ : DecidableEq m\nA : Matrix m m R\nB : Matrix m n R\nhA : IsUnit (det A)\nb : Basis m R (m → R) := Pi.basisFun R m\n⊢ ↑(LinearMap.toMatrix b b) (mulVecLin A) = A\n[PROOFSTEP]\nrw [← LinearEquiv.eq_symm_apply]\n[GOAL]\ncase h.e'_3.h.e'_6\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\nR : Type u_5\nm_fin : Fintype m\ninst✝³ : Fintype n\ninst✝² : Fintype o\ninst✝¹ : CommRing R\ninst✝ : DecidableEq m\nA : Matrix m m R\nB : Matrix m n R\nhA : IsUnit (det A)\nb : Basis m R (m → R) := Pi.basisFun R m\n⊢ mulVecLin A = ↑(LinearEquiv.symm (LinearMap.toMatrix b b)) A\n[PROOFSTEP]\nrfl\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\nR : Type u_5\nm_fin : Fintype m\ninst✝³ : Fintype n\ninst✝² : Fintype o\ninst✝¹ : CommRing R\ninst✝ : DecidableEq m\nA : Matrix m m R\nB : Matrix m n R\nb : Basis m R (m → R) := Pi.basisFun R m\nhA : IsUnit (det (↑(LinearMap.toMatrix b b) (mulVecLin A)))\n⊢ rank (A * B) = rank B\n[PROOFSTEP]\nhave hAB : mulVecLin (A * B) = (LinearEquiv.ofIsUnitDet hA).comp (mulVecLin B) := by ext; simp\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\nR : Type u_5\nm_fin : Fintype m\ninst✝³ : Fintype n\ninst✝² : Fintype o\ninst✝¹ : CommRing R\ninst✝ : DecidableEq m\nA : Matrix m m R\nB : Matrix m n R\nb : Basis m R (m → R) := Pi.basisFun R m\nhA : IsUnit (det (↑(LinearMap.toMatrix b b) (mulVecLin A)))\n⊢ mulVecLin (A * B) = LinearMap.comp (↑(LinearEquiv.ofIsUnitDet hA)) (mulVecLin B)\n[PROOFSTEP]\next\n[GOAL]\ncase h.h\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\nR : Type u_5\nm_fin : Fintype m\ninst✝³ : Fintype n\ninst✝² : Fintype o\ninst✝¹ : CommRing R\ninst✝ : DecidableEq m\nA : Matrix m m R\nB : Matrix m n R\nb : Basis m R (m → R) := Pi.basisFun R m\nhA : IsUnit (det (↑(LinearMap.toMatrix b b) (mulVecLin A)))\nx✝¹ : n → R\nx✝ : m\n⊢ ↑(mulVecLin (A * B)) x✝¹ x✝ = ↑(LinearMap.comp (↑(LinearEquiv.ofIsUnitDet hA)) (mulVecLin B)) x✝¹ x✝\n[PROOFSTEP]\nsimp\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\nR : Type u_5\nm_fin : Fintype m\ninst✝³ : Fintype n\ninst✝² : Fintype o\ninst✝¹ : CommRing R\ninst✝ : DecidableEq m\nA : Matrix m m R\nB : Matrix m n R\nb : Basis m R (m → R) := Pi.basisFun R m\nhA : IsUnit (det (↑(LinearMap.toMatrix b b) (mulVecLin A)))\nhAB : mulVecLin (A * B) = LinearMap.comp (↑(LinearEquiv.ofIsUnitDet hA)) (mulVecLin B)\n⊢ rank (A * B) = rank B\n[PROOFSTEP]\nrw [rank, rank, hAB, LinearMap.range_comp, LinearEquiv.finrank_map_eq]\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\nR : Type u_5\nm_fin : Fintype m\ninst✝⁴ : Fintype n\ninst✝³ : Fintype o\ninst✝² : CommRing R\ninst✝¹ : StrongRankCondition R\ninst✝ : Fintype m\nf : n → m\ne : n ≃ m\nA : Matrix m m R\n⊢ rank (submatrix A f ↑e) ≤ rank A\n[PROOFSTEP]\nrw [rank, rank, mulVecLin_submatrix, LinearMap.range_comp, LinearMap.range_comp,\n  show LinearMap.funLeft R R e.symm = LinearEquiv.funCongrLeft R R e.symm from rfl, LinearEquiv.range,\n  Submodule.map_top]\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\nR : Type u_5\nm_fin : Fintype m\ninst✝⁴ : Fintype n\ninst✝³ : Fintype o\ninst✝² : CommRing R\ninst✝¹ : StrongRankCondition R\ninst✝ : Fintype m\nf : n → m\ne : n ≃ m\nA : Matrix m m R\n⊢ finrank R { x // x ∈ Submodule.map (LinearMap.funLeft R R f) (LinearMap.range (mulVecLin A)) } ≤\n    finrank R { x // x ∈ LinearMap.range (mulVecLin A) }\n[PROOFSTEP]\nexact Submodule.finrank_map_le _ _\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\nR : Type u_5\nm_fin : Fintype m\ninst✝³ : Fintype n\ninst✝² : Fintype o\ninst✝¹ : CommRing R\ninst✝ : Fintype m\ne₁ e₂ : m ≃ n\nA : Matrix m m R\n⊢ rank (↑(reindex e₁ e₂) A) = rank A\n[PROOFSTEP]\nrw [rank, rank, mulVecLin_reindex, LinearMap.range_comp, LinearMap.range_comp, LinearEquiv.range, Submodule.map_top,\n  LinearEquiv.finrank_map_eq]\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\nR : Type u_5\nm_fin : Fintype m\ninst✝³ : Fintype n\ninst✝² : Fintype o\ninst✝¹ : CommRing R\ninst✝ : Fintype m\nA : Matrix m m R\ne₁ e₂ : n ≃ m\n⊢ rank (submatrix A ↑e₁ ↑e₂) = rank A\n[PROOFSTEP]\nsimpa only [reindex_apply] using rank_reindex e₁.symm e₂.symm A\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\nR : Type u_5\nm_fin : Fintype m\ninst✝⁷ : Fintype n\ninst✝⁶ : Fintype o\ninst✝⁵ : CommRing R\ninst✝⁴ : DecidableEq n\nM₁ : Type u_6\nM₂ : Type u_7\ninst✝³ : AddCommGroup M₁\ninst✝² : AddCommGroup M₂\ninst✝¹ : Module R M₁\ninst✝ : Module R M₂\nA : Matrix m n R\nv₁ : Basis m R M₁\nv₂ : Basis n R M₂\n⊢ rank A = finrank R { x // x ∈ LinearMap.range (↑(toLin v₂ v₁) A) }\n[PROOFSTEP]\nlet e₁ := (Pi.basisFun R m).equiv v₁ (Equiv.refl _)\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\nR : Type u_5\nm_fin : Fintype m\ninst✝⁷ : Fintype n\ninst✝⁶ : Fintype o\ninst✝⁵ : CommRing R\ninst✝⁴ : DecidableEq n\nM₁ : Type u_6\nM₂ : Type u_7\ninst✝³ : AddCommGroup M₁\ninst✝² : AddCommGroup M₂\ninst✝¹ : Module R M₁\ninst✝ : Module R M₂\nA : Matrix m n R\nv₁ : Basis m R M₁\nv₂ : Basis n R M₂\ne₁ : (m → R) ≃ₗ[R] M₁ := Basis.equiv (Pi.basisFun R m) v₁ (Equiv.refl m)\n⊢ rank A = finrank R { x // x ∈ LinearMap.range (↑(toLin v₂ v₁) A) }\n[PROOFSTEP]\nlet e₂ := (Pi.basisFun R n).equiv v₂ (Equiv.refl _)\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\nR : Type u_5\nm_fin : Fintype m\ninst✝⁷ : Fintype n\ninst✝⁶ : Fintype o\ninst✝⁵ : CommRing R\ninst✝⁴ : DecidableEq n\nM₁ : Type u_6\nM₂ : Type u_7\ninst✝³ : AddCommGroup M₁\ninst✝² : AddCommGroup M₂\ninst✝¹ : Module R M₁\ninst✝ : Module R M₂\nA : Matrix m n R\nv₁ : Basis m R M₁\nv₂ : Basis n R M₂\ne₁ : (m → R) ≃ₗ[R] M₁ := Basis.equiv (Pi.basisFun R m) v₁ (Equiv.refl m)\ne₂ : (n → R) ≃ₗ[R] M₂ := Basis.equiv (Pi.basisFun R n) v₂ (Equiv.refl n)\n⊢ rank A = finrank R { x // x ∈ LinearMap.range (↑(toLin v₂ v₁) A) }\n[PROOFSTEP]\nhave range_e₂ : LinearMap.range e₂ = ⊤ := by\n  rw [LinearMap.range_eq_top]\n  exact e₂.surjective\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\nR : Type u_5\nm_fin : Fintype m\ninst✝⁷ : Fintype n\ninst✝⁶ : Fintype o\ninst✝⁵ : CommRing R\ninst✝⁴ : DecidableEq n\nM₁ : Type u_6\nM₂ : Type u_7\ninst✝³ : AddCommGroup M₁\ninst✝² : AddCommGroup M₂\ninst✝¹ : Module R M₁\ninst✝ : Module R M₂\nA : Matrix m n R\nv₁ : Basis m R M₁\nv₂ : Basis n R M₂\ne₁ : (m → R) ≃ₗ[R] M₁ := Basis.equiv (Pi.basisFun R m) v₁ (Equiv.refl m)\ne₂ : (n → R) ≃ₗ[R] M₂ := Basis.equiv (Pi.basisFun R n) v₂ (Equiv.refl n)\n⊢ LinearMap.range e₂ = ⊤\n[PROOFSTEP]\nrw [LinearMap.range_eq_top]\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\nR : Type u_5\nm_fin : Fintype m\ninst✝⁷ : Fintype n\ninst✝⁶ : Fintype o\ninst✝⁵ : CommRing R\ninst✝⁴ : DecidableEq n\nM₁ : Type u_6\nM₂ : Type u_7\ninst✝³ : AddCommGroup M₁\ninst✝² : AddCommGroup M₂\ninst✝¹ : Module R M₁\ninst✝ : Module R M₂\nA : Matrix m n R\nv₁ : Basis m R M₁\nv₂ : Basis n R M₂\ne₁ : (m → R) ≃ₗ[R] M₁ := Basis.equiv (Pi.basisFun R m) v₁ (Equiv.refl m)\ne₂ : (n → R) ≃ₗ[R] M₂ := Basis.equiv (Pi.basisFun R n) v₂ (Equiv.refl n)\n⊢ Function.Surjective ↑e₂\n[PROOFSTEP]\nexact e₂.surjective\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\nR : Type u_5\nm_fin : Fintype m\ninst✝⁷ : Fintype n\ninst✝⁶ : Fintype o\ninst✝⁵ : CommRing R\ninst✝⁴ : DecidableEq n\nM₁ : Type u_6\nM₂ : Type u_7\ninst✝³ : AddCommGroup M₁\ninst✝² : AddCommGroup M₂\ninst✝¹ : Module R M₁\ninst✝ : Module R M₂\nA : Matrix m n R\nv₁ : Basis m R M₁\nv₂ : Basis n R M₂\ne₁ : (m → R) ≃ₗ[R] M₁ := Basis.equiv (Pi.basisFun R m) v₁ (Equiv.refl m)\ne₂ : (n → R) ≃ₗ[R] M₂ := Basis.equiv (Pi.basisFun R n) v₂ (Equiv.refl n)\nrange_e₂ : LinearMap.range e₂ = ⊤\n⊢ rank A = finrank R { x // x ∈ LinearMap.range (↑(toLin v₂ v₁) A) }\n[PROOFSTEP]\nrefine' LinearEquiv.finrank_eq (e₁.ofSubmodules _ _ _)\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\nR : Type u_5\nm_fin : Fintype m\ninst✝⁷ : Fintype n\ninst✝⁶ : Fintype o\ninst✝⁵ : CommRing R\ninst✝⁴ : DecidableEq n\nM₁ : Type u_6\nM₂ : Type u_7\ninst✝³ : AddCommGroup M₁\ninst✝² : AddCommGroup M₂\ninst✝¹ : Module R M₁\ninst✝ : Module R M₂\nA : Matrix m n R\nv₁ : Basis m R M₁\nv₂ : Basis n R M₂\ne₁ : (m → R) ≃ₗ[R] M₁ := Basis.equiv (Pi.basisFun R m) v₁ (Equiv.refl m)\ne₂ : (n → R) ≃ₗ[R] M₂ := Basis.equiv (Pi.basisFun R n) v₂ (Equiv.refl n)\nrange_e₂ : LinearMap.range e₂ = ⊤\n⊢ Submodule.map (↑e₁) (LinearMap.range (mulVecLin A)) = LinearMap.range (↑(toLin v₂ v₁) A)\n[PROOFSTEP]\nrw [← LinearMap.range_comp, ← LinearMap.range_comp_of_range_eq_top (toLin v₂ v₁ A) range_e₂]\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\nR : Type u_5\nm_fin : Fintype m\ninst✝⁷ : Fintype n\ninst✝⁶ : Fintype o\ninst✝⁵ : CommRing R\ninst✝⁴ : DecidableEq n\nM₁ : Type u_6\nM₂ : Type u_7\ninst✝³ : AddCommGroup M₁\ninst✝² : AddCommGroup M₂\ninst✝¹ : Module R M₁\ninst✝ : Module R M₂\nA : Matrix m n R\nv₁ : Basis m R M₁\nv₂ : Basis n R M₂\ne₁ : (m → R) ≃ₗ[R] M₁ := Basis.equiv (Pi.basisFun R m) v₁ (Equiv.refl m)\ne₂ : (n → R) ≃ₗ[R] M₂ := Basis.equiv (Pi.basisFun R n) v₂ (Equiv.refl n)\nrange_e₂ : LinearMap.range e₂ = ⊤\n⊢ LinearMap.range (LinearMap.comp (↑e₁) (mulVecLin A)) = LinearMap.range (LinearMap.comp (↑(toLin v₂ v₁) A) ↑e₂)\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_f\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\nR : Type u_5\nm_fin : Fintype m\ninst✝⁷ : Fintype n\ninst✝⁶ : Fintype o\ninst✝⁵ : CommRing R\ninst✝⁴ : DecidableEq n\nM₁ : Type u_6\nM₂ : Type u_7\ninst✝³ : AddCommGroup M₁\ninst✝² : AddCommGroup M₂\ninst✝¹ : Module R M₁\ninst✝ : Module R M₂\nA : Matrix m n R\nv₁ : Basis m R M₁\nv₂ : Basis n R M₂\ne₁ : (m → R) ≃ₗ[R] M₁ := Basis.equiv (Pi.basisFun R m) v₁ (Equiv.refl m)\ne₂ : (n → R) ≃ₗ[R] M₂ := Basis.equiv (Pi.basisFun R n) v₂ (Equiv.refl n)\nrange_e₂ : LinearMap.range e₂ = ⊤\n⊢ LinearMap.comp (↑e₁) (mulVecLin A) = LinearMap.comp (↑(toLin v₂ v₁) A) ↑e₂\n[PROOFSTEP]\napply LinearMap.pi_ext'\n[GOAL]\ncase e_f.h\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\nR : Type u_5\nm_fin : Fintype m\ninst✝⁷ : Fintype n\ninst✝⁶ : Fintype o\ninst✝⁵ : CommRing R\ninst✝⁴ : DecidableEq n\nM₁ : Type u_6\nM₂ : Type u_7\ninst✝³ : AddCommGroup M₁\ninst✝² : AddCommGroup M₂\ninst✝¹ : Module R M₁\ninst✝ : Module R M₂\nA : Matrix m n R\nv₁ : Basis m R M₁\nv₂ : Basis n R M₂\ne₁ : (m → R) ≃ₗ[R] M₁ := Basis.equiv (Pi.basisFun R m) v₁ (Equiv.refl m)\ne₂ : (n → R) ≃ₗ[R] M₂ := Basis.equiv (Pi.basisFun R n) v₂ (Equiv.refl n)\nrange_e₂ : LinearMap.range e₂ = ⊤\n⊢ ∀ (i : n),\n    LinearMap.comp (LinearMap.comp (↑e₁) (mulVecLin A)) (LinearMap.single i) =\n      LinearMap.comp (LinearMap.comp (↑(toLin v₂ v₁) A) ↑e₂) (LinearMap.single i)\n[PROOFSTEP]\nrintro i\n[GOAL]\ncase e_f.h\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\nR : Type u_5\nm_fin : Fintype m\ninst✝⁷ : Fintype n\ninst✝⁶ : Fintype o\ninst✝⁵ : CommRing R\ninst✝⁴ : DecidableEq n\nM₁ : Type u_6\nM₂ : Type u_7\ninst✝³ : AddCommGroup M₁\ninst✝² : AddCommGroup M₂\ninst✝¹ : Module R M₁\ninst✝ : Module R M₂\nA : Matrix m n R\nv₁ : Basis m R M₁\nv₂ : Basis n R M₂\ne₁ : (m → R) ≃ₗ[R] M₁ := Basis.equiv (Pi.basisFun R m) v₁ (Equiv.refl m)\ne₂ : (n → R) ≃ₗ[R] M₂ := Basis.equiv (Pi.basisFun R n) v₂ (Equiv.refl n)\nrange_e₂ : LinearMap.range e₂ = ⊤\ni : n\n⊢ LinearMap.comp (LinearMap.comp (↑e₁) (mulVecLin A)) (LinearMap.single i) =\n    LinearMap.comp (LinearMap.comp (↑(toLin v₂ v₁) A) ↑e₂) (LinearMap.single i)\n[PROOFSTEP]\napply LinearMap.ext_ring\n[GOAL]\ncase e_f.h.h\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\nR : Type u_5\nm_fin : Fintype m\ninst✝⁷ : Fintype n\ninst✝⁶ : Fintype o\ninst✝⁵ : CommRing R\ninst✝⁴ : DecidableEq n\nM₁ : Type u_6\nM₂ : Type u_7\ninst✝³ : AddCommGroup M₁\ninst✝² : AddCommGroup M₂\ninst✝¹ : Module R M₁\ninst✝ : Module R M₂\nA : Matrix m n R\nv₁ : Basis m R M₁\nv₂ : Basis n R M₂\ne₁ : (m → R) ≃ₗ[R] M₁ := Basis.equiv (Pi.basisFun R m) v₁ (Equiv.refl m)\ne₂ : (n → R) ≃ₗ[R] M₂ := Basis.equiv (Pi.basisFun R n) v₂ (Equiv.refl n)\nrange_e₂ : LinearMap.range e₂ = ⊤\ni : n\n⊢ ↑(LinearMap.comp (LinearMap.comp (↑e₁) (mulVecLin A)) (LinearMap.single i)) 1 =\n    ↑(LinearMap.comp (LinearMap.comp (↑(toLin v₂ v₁) A) ↑e₂) (LinearMap.single i)) 1\n[PROOFSTEP]\nhave aux₁ := toLin_self (Pi.basisFun R n) (Pi.basisFun R m) A i\n[GOAL]\ncase e_f.h.h\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\nR : Type u_5\nm_fin : Fintype m\ninst✝⁷ : Fintype n\ninst✝⁶ : Fintype o\ninst✝⁵ : CommRing R\ninst✝⁴ : DecidableEq n\nM₁ : Type u_6\nM₂ : Type u_7\ninst✝³ : AddCommGroup M₁\ninst✝² : AddCommGroup M₂\ninst✝¹ : Module R M₁\ninst✝ : Module R M₂\nA : Matrix m n R\nv₁ : Basis m R M₁\nv₂ : Basis n R M₂\ne₁ : (m → R) ≃ₗ[R] M₁ := Basis.equiv (Pi.basisFun R m) v₁ (Equiv.refl m)\ne₂ : (n → R) ≃ₗ[R] M₂ := Basis.equiv (Pi.basisFun R n) v₂ (Equiv.refl n)\nrange_e₂ : LinearMap.range e₂ = ⊤\ni : n\naux₁ :\n  ↑(↑(toLin (Pi.basisFun R n) (Pi.basisFun R m)) A) (↑(Pi.basisFun R n) i) =\n    Finset.sum Finset.univ fun j => A j i • ↑(Pi.basisFun R m) j\n⊢ ↑(LinearMap.comp (LinearMap.comp (↑e₁) (mulVecLin A)) (LinearMap.single i)) 1 =\n    ↑(LinearMap.comp (LinearMap.comp (↑(toLin v₂ v₁) A) ↑e₂) (LinearMap.single i)) 1\n[PROOFSTEP]\nhave aux₂ := Basis.equiv_apply (Pi.basisFun R n) i v₂\n[GOAL]\ncase e_f.h.h\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\nR : Type u_5\nm_fin : Fintype m\ninst✝⁷ : Fintype n\ninst✝⁶ : Fintype o\ninst✝⁵ : CommRing R\ninst✝⁴ : DecidableEq n\nM₁ : Type u_6\nM₂ : Type u_7\ninst✝³ : AddCommGroup M₁\ninst✝² : AddCommGroup M₂\ninst✝¹ : Module R M₁\ninst✝ : Module R M₂\nA : Matrix m n R\nv₁ : Basis m R M₁\nv₂ : Basis n R M₂\ne₁ : (m → R) ≃ₗ[R] M₁ := Basis.equiv (Pi.basisFun R m) v₁ (Equiv.refl m)\ne₂ : (n → R) ≃ₗ[R] M₂ := Basis.equiv (Pi.basisFun R n) v₂ (Equiv.refl n)\nrange_e₂ : LinearMap.range e₂ = ⊤\ni : n\naux₁ :\n  ↑(↑(toLin (Pi.basisFun R n) (Pi.basisFun R m)) A) (↑(Pi.basisFun R n) i) =\n    Finset.sum Finset.univ fun j => A j i • ↑(Pi.basisFun R m) j\naux₂ : ∀ (e : n ≃ n), ↑(Basis.equiv (Pi.basisFun R n) v₂ e) (↑(Pi.basisFun R n) i) = ↑v₂ (↑e i)\n⊢ ↑(LinearMap.comp (LinearMap.comp (↑e₁) (mulVecLin A)) (LinearMap.single i)) 1 =\n    ↑(LinearMap.comp (LinearMap.comp (↑(toLin v₂ v₁) A) ↑e₂) (LinearMap.single i)) 1\n[PROOFSTEP]\nrw [toLin_eq_toLin', toLin'_apply'] at aux₁ \n[GOAL]\ncase e_f.h.h\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\nR : Type u_5\nm_fin : Fintype m\ninst✝⁷ : Fintype n\ninst✝⁶ : Fintype o\ninst✝⁵ : CommRing R\ninst✝⁴ : DecidableEq n\nM₁ : Type u_6\nM₂ : Type u_7\ninst✝³ : AddCommGroup M₁\ninst✝² : AddCommGroup M₂\ninst✝¹ : Module R M₁\ninst✝ : Module R M₂\nA : Matrix m n R\nv₁ : Basis m R M₁\nv₂ : Basis n R M₂\ne₁ : (m → R) ≃ₗ[R] M₁ := Basis.equiv (Pi.basisFun R m) v₁ (Equiv.refl m)\ne₂ : (n → R) ≃ₗ[R] M₂ := Basis.equiv (Pi.basisFun R n) v₂ (Equiv.refl n)\nrange_e₂ : LinearMap.range e₂ = ⊤\ni : n\naux₁ : ↑(mulVecLin A) (↑(Pi.basisFun R n) i) = Finset.sum Finset.univ fun j => A j i • ↑(Pi.basisFun R m) j\naux₂ : ∀ (e : n ≃ n), ↑(Basis.equiv (Pi.basisFun R n) v₂ e) (↑(Pi.basisFun R n) i) = ↑v₂ (↑e i)\n⊢ ↑(LinearMap.comp (LinearMap.comp (↑e₁) (mulVecLin A)) (LinearMap.single i)) 1 =\n    ↑(LinearMap.comp (LinearMap.comp (↑(toLin v₂ v₁) A) ↑e₂) (LinearMap.single i)) 1\n[PROOFSTEP]\nrw [Pi.basisFun_apply, LinearMap.coe_stdBasis] at aux₁ aux₂ \n[GOAL]\ncase e_f.h.h\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\nR : Type u_5\nm_fin : Fintype m\ninst✝⁷ : Fintype n\ninst✝⁶ : Fintype o\ninst✝⁵ : CommRing R\ninst✝⁴ : DecidableEq n\nM₁ : Type u_6\nM₂ : Type u_7\ninst✝³ : AddCommGroup M₁\ninst✝² : AddCommGroup M₂\ninst✝¹ : Module R M₁\ninst✝ : Module R M₂\nA : Matrix m n R\nv₁ : Basis m R M₁\nv₂ : Basis n R M₂\ne₁ : (m → R) ≃ₗ[R] M₁ := Basis.equiv (Pi.basisFun R m) v₁ (Equiv.refl m)\ne₂ : (n → R) ≃ₗ[R] M₂ := Basis.equiv (Pi.basisFun R n) v₂ (Equiv.refl n)\nrange_e₂ : LinearMap.range e₂ = ⊤\ni : n\naux₁ : ↑(mulVecLin A) (Pi.single i 1) = Finset.sum Finset.univ fun j => A j i • ↑(Pi.basisFun R m) j\naux₂ : ∀ (e : n ≃ n), ↑(Basis.equiv (Pi.basisFun R n) v₂ e) (Pi.single i 1) = ↑v₂ (↑e i)\n⊢ ↑(LinearMap.comp (LinearMap.comp (↑e₁) (mulVecLin A)) (LinearMap.single i)) 1 =\n    ↑(LinearMap.comp (LinearMap.comp (↑(toLin v₂ v₁) A) ↑e₂) (LinearMap.single i)) 1\n[PROOFSTEP]\nsimp only [LinearMap.comp_apply, LinearEquiv.coe_coe, Equiv.refl_apply, aux₁, aux₂, LinearMap.coe_single, toLin_self,\n  LinearEquiv.map_sum, LinearEquiv.map_smul, Basis.equiv_apply]\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\nR : Type u_5\nm_fin : Fintype m\ninst✝³ : Fintype n\ninst✝² : Fintype o\ninst✝¹ : CommRing R\ninst✝ : StrongRankCondition R\nA : Matrix m n R\n⊢ rank A ≤ Fintype.card m\n[PROOFSTEP]\nhaveI : Module.Finite R (m → R) := Module.Finite.pi\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\nR : Type u_5\nm_fin : Fintype m\ninst✝³ : Fintype n\ninst✝² : Fintype o\ninst✝¹ : CommRing R\ninst✝ : StrongRankCondition R\nA : Matrix m n R\nthis : Module.Finite R (m → R)\n⊢ rank A ≤ Fintype.card m\n[PROOFSTEP]\nhaveI : Module.Free R (m → R) := Module.Free.pi _ _\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\nR : Type u_5\nm_fin : Fintype m\ninst✝³ : Fintype n\ninst✝² : Fintype o\ninst✝¹ : CommRing R\ninst✝ : StrongRankCondition R\nA : Matrix m n R\nthis✝ : Module.Finite R (m → R)\nthis : Module.Free R (m → R)\n⊢ rank A ≤ Fintype.card m\n[PROOFSTEP]\nexact (Submodule.finrank_le _).trans (finrank_pi R).le\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\nR : Type u_5\nm_fin : Fintype m\ninst✝² : Fintype n\ninst✝¹ : Fintype o\ninst✝ : CommRing R\nA : Matrix m n R\n⊢ rank A = finrank R { x // x ∈ Submodule.span R (Set.range Aᵀ) }\n[PROOFSTEP]\nrw [rank, Matrix.range_mulVecLin]\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\nR : Type u_5\nm_fin : Fintype m\ninst✝⁴ : Fintype n\ninst✝³ : Fintype o\ninst✝² : Field R\ninst✝¹ : DecidableEq m\ninst✝ : DecidableEq R\nw : m → R\n⊢ rank (diagonal w) = Fintype.card { i // w i ≠ 0 }\n[PROOFSTEP]\nrw [Matrix.rank, ← Matrix.toLin'_apply', FiniteDimensional.finrank, ← LinearMap.rank, LinearMap.rank_diagonal,\n  Cardinal.toNat_cast]\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\nR : Type u_5\nm_fin : Fintype m\ninst✝⁵ : Fintype n\ninst✝⁴ : Fintype o\ninst✝³ : Fintype m\ninst✝² : Field R\ninst✝¹ : PartialOrder R\ninst✝ : StarOrderedRing R\nA : Matrix m n R\n⊢ LinearMap.ker (mulVecLin (Aᴴ * A)) = LinearMap.ker (mulVecLin A)\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\nR : Type u_5\nm_fin : Fintype m\ninst✝⁵ : Fintype n\ninst✝⁴ : Fintype o\ninst✝³ : Fintype m\ninst✝² : Field R\ninst✝¹ : PartialOrder R\ninst✝ : StarOrderedRing R\nA : Matrix m n R\nx : n → R\n⊢ x ∈ LinearMap.ker (mulVecLin (Aᴴ * A)) ↔ x ∈ LinearMap.ker (mulVecLin A)\n[PROOFSTEP]\nsimp only [LinearMap.mem_ker, mulVecLin_apply, conjTranspose_mul_self_mulVec_eq_zero]\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\nR : Type u_5\nm_fin : Fintype m\ninst✝⁵ : Fintype n\ninst✝⁴ : Fintype o\ninst✝³ : Fintype m\ninst✝² : Field R\ninst✝¹ : PartialOrder R\ninst✝ : StarOrderedRing R\nA : Matrix m n R\n⊢ rank (Aᴴ * A) = rank A\n[PROOFSTEP]\ndsimp only [rank]\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\nR : Type u_5\nm_fin : Fintype m\ninst✝⁵ : Fintype n\ninst✝⁴ : Fintype o\ninst✝³ : Fintype m\ninst✝² : Field R\ninst✝¹ : PartialOrder R\ninst✝ : StarOrderedRing R\nA : Matrix m n R\n⊢ finrank R { x // x ∈ LinearMap.range (mulVecLin (Aᴴ * A)) } = finrank R { x // x ∈ LinearMap.range (mulVecLin A) }\n[PROOFSTEP]\nrefine' add_left_injective (finrank R (LinearMap.ker (mulVecLin A))) _\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\nR : Type u_5\nm_fin : Fintype m\ninst✝⁵ : Fintype n\ninst✝⁴ : Fintype o\ninst✝³ : Fintype m\ninst✝² : Field R\ninst✝¹ : PartialOrder R\ninst✝ : StarOrderedRing R\nA : Matrix m n R\n⊢ (fun x => x + finrank R { x // x ∈ LinearMap.ker (mulVecLin A) })\n      (finrank R { x // x ∈ LinearMap.range (mulVecLin (Aᴴ * A)) }) =\n    (fun x => x + finrank R { x // x ∈ LinearMap.ker (mulVecLin A) })\n      (finrank R { x // x ∈ LinearMap.range (mulVecLin A) })\n[PROOFSTEP]\ndsimp only\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\nR : Type u_5\nm_fin : Fintype m\ninst✝⁵ : Fintype n\ninst✝⁴ : Fintype o\ninst✝³ : Fintype m\ninst✝² : Field R\ninst✝¹ : PartialOrder R\ninst✝ : StarOrderedRing R\nA : Matrix m n R\n⊢ finrank R { x // x ∈ LinearMap.range (mulVecLin (Aᴴ * A)) } + finrank R { x // x ∈ LinearMap.ker (mulVecLin A) } =\n    finrank R { x // x ∈ LinearMap.range (mulVecLin A) } + finrank R { x // x ∈ LinearMap.ker (mulVecLin A) }\n[PROOFSTEP]\ntrans\n  finrank R { x // x ∈ LinearMap.range (mulVecLin (Aᴴ * A)) } +\n    finrank R { x // x ∈ LinearMap.ker (mulVecLin (Aᴴ * A)) }\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\nR : Type u_5\nm_fin : Fintype m\ninst✝⁵ : Fintype n\ninst✝⁴ : Fintype o\ninst✝³ : Fintype m\ninst✝² : Field R\ninst✝¹ : PartialOrder R\ninst✝ : StarOrderedRing R\nA : Matrix m n R\n⊢ finrank R { x // x ∈ LinearMap.range (mulVecLin (Aᴴ * A)) } + finrank R { x // x ∈ LinearMap.ker (mulVecLin A) } =\n    finrank R { x // x ∈ LinearMap.range (mulVecLin (Aᴴ * A)) } +\n      finrank R { x // x ∈ LinearMap.ker (mulVecLin (Aᴴ * A)) }\n[PROOFSTEP]\nrw [ker_mulVecLin_conjTranspose_mul_self]\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\nR : Type u_5\nm_fin : Fintype m\ninst✝⁵ : Fintype n\ninst✝⁴ : Fintype o\ninst✝³ : Fintype m\ninst✝² : Field R\ninst✝¹ : PartialOrder R\ninst✝ : StarOrderedRing R\nA : Matrix m n R\n⊢ finrank R { x // x ∈ LinearMap.range (mulVecLin (Aᴴ * A)) } +\n      finrank R { x // x ∈ LinearMap.ker (mulVecLin (Aᴴ * A)) } =\n    finrank R { x // x ∈ LinearMap.range (mulVecLin A) } + finrank R { x // x ∈ LinearMap.ker (mulVecLin A) }\n[PROOFSTEP]\nsimp only [LinearMap.finrank_range_add_finrank_ker]\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\nR : Type u_5\nm_fin : Fintype m\ninst✝⁵ : Fintype n\ninst✝⁴ : Fintype o\ninst✝³ : Fintype m\ninst✝² : Field R\ninst✝¹ : PartialOrder R\ninst✝ : StarOrderedRing R\nA : Matrix m n R\n⊢ rank (A * Aᴴ) = rank A\n[PROOFSTEP]\nsimpa only [rank_conjTranspose, conjTranspose_conjTranspose] using rank_conjTranspose_mul_self Aᴴ\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\nR : Type u_5\nm_fin : Fintype m\ninst✝³ : Fintype n\ninst✝² : Fintype o\ninst✝¹ : Fintype m\ninst✝ : LinearOrderedField R\nA : Matrix m n R\n⊢ LinearMap.ker (mulVecLin (Aᵀ * A)) = LinearMap.ker (mulVecLin A)\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\nR : Type u_5\nm_fin : Fintype m\ninst✝³ : Fintype n\ninst✝² : Fintype o\ninst✝¹ : Fintype m\ninst✝ : LinearOrderedField R\nA : Matrix m n R\nx : n → R\n⊢ x ∈ LinearMap.ker (mulVecLin (Aᵀ * A)) ↔ x ∈ LinearMap.ker (mulVecLin A)\n[PROOFSTEP]\nsimp only [LinearMap.mem_ker, mulVecLin_apply, ← mulVec_mulVec]\n[GOAL]\ncase h\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\nR : Type u_5\nm_fin : Fintype m\ninst✝³ : Fintype n\ninst✝² : Fintype o\ninst✝¹ : Fintype m\ninst✝ : LinearOrderedField R\nA : Matrix m n R\nx : n → R\n⊢ mulVec Aᵀ (mulVec A x) = 0 ↔ mulVec A x = 0\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\nR : Type u_5\nm_fin : Fintype m\ninst✝³ : Fintype n\ninst✝² : Fintype o\ninst✝¹ : Fintype m\ninst✝ : LinearOrderedField R\nA : Matrix m n R\nx : n → R\n⊢ mulVec Aᵀ (mulVec A x) = 0 → mulVec A x = 0\n[PROOFSTEP]\nintro h\n[GOAL]\ncase h.mp\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\nR : Type u_5\nm_fin : Fintype m\ninst✝³ : Fintype n\ninst✝² : Fintype o\ninst✝¹ : Fintype m\ninst✝ : LinearOrderedField R\nA : Matrix m n R\nx : n → R\nh : mulVec Aᵀ (mulVec A x) = 0\n⊢ mulVec A x = 0\n[PROOFSTEP]\nreplace h := congr_arg (dotProduct x) h\n[GOAL]\ncase h.mp\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\nR : Type u_5\nm_fin : Fintype m\ninst✝³ : Fintype n\ninst✝² : Fintype o\ninst✝¹ : Fintype m\ninst✝ : LinearOrderedField R\nA : Matrix m n R\nx : n → R\nh : x ⬝ᵥ mulVec Aᵀ (mulVec A x) = x ⬝ᵥ 0\n⊢ mulVec A x = 0\n[PROOFSTEP]\nrwa [dotProduct_mulVec, dotProduct_zero, vecMul_transpose, dotProduct_self_eq_zero] at h \n[GOAL]\ncase h.mpr\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\nR : Type u_5\nm_fin : Fintype m\ninst✝³ : Fintype n\ninst✝² : Fintype o\ninst✝¹ : Fintype m\ninst✝ : LinearOrderedField R\nA : Matrix m n R\nx : n → R\n⊢ mulVec A x = 0 → mulVec Aᵀ (mulVec A x) = 0\n[PROOFSTEP]\nintro h\n[GOAL]\ncase h.mpr\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\nR : Type u_5\nm_fin : Fintype m\ninst✝³ : Fintype n\ninst✝² : Fintype o\ninst✝¹ : Fintype m\ninst✝ : LinearOrderedField R\nA : Matrix m n R\nx : n → R\nh : mulVec A x = 0\n⊢ mulVec Aᵀ (mulVec A x) = 0\n[PROOFSTEP]\nrw [h, mulVec_zero]\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\nR : Type u_5\nm_fin : Fintype m\ninst✝³ : Fintype n\ninst✝² : Fintype o\ninst✝¹ : Fintype m\ninst✝ : LinearOrderedField R\nA : Matrix m n R\n⊢ rank (Aᵀ * A) = rank A\n[PROOFSTEP]\ndsimp only [rank]\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\nR : Type u_5\nm_fin : Fintype m\ninst✝³ : Fintype n\ninst✝² : Fintype o\ninst✝¹ : Fintype m\ninst✝ : LinearOrderedField R\nA : Matrix m n R\n⊢ finrank R { x // x ∈ LinearMap.range (mulVecLin (Aᵀ * A)) } = finrank R { x // x ∈ LinearMap.range (mulVecLin A) }\n[PROOFSTEP]\nrefine' add_left_injective (finrank R <| LinearMap.ker A.mulVecLin) _\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\nR : Type u_5\nm_fin : Fintype m\ninst✝³ : Fintype n\ninst✝² : Fintype o\ninst✝¹ : Fintype m\ninst✝ : LinearOrderedField R\nA : Matrix m n R\n⊢ (fun x => x + finrank R { x // x ∈ LinearMap.ker (mulVecLin A) })\n      (finrank R { x // x ∈ LinearMap.range (mulVecLin (Aᵀ * A)) }) =\n    (fun x => x + finrank R { x // x ∈ LinearMap.ker (mulVecLin A) })\n      (finrank R { x // x ∈ LinearMap.range (mulVecLin A) })\n[PROOFSTEP]\ndsimp only\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\nR : Type u_5\nm_fin : Fintype m\ninst✝³ : Fintype n\ninst✝² : Fintype o\ninst✝¹ : Fintype m\ninst✝ : LinearOrderedField R\nA : Matrix m n R\n⊢ finrank R { x // x ∈ LinearMap.range (mulVecLin (Aᵀ * A)) } + finrank R { x // x ∈ LinearMap.ker (mulVecLin A) } =\n    finrank R { x // x ∈ LinearMap.range (mulVecLin A) } + finrank R { x // x ∈ LinearMap.ker (mulVecLin A) }\n[PROOFSTEP]\ntrans\n  finrank R { x // x ∈ LinearMap.range (mulVecLin (Aᵀ * A)) } +\n    finrank R { x // x ∈ LinearMap.ker (mulVecLin (Aᵀ * A)) }\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\nR : Type u_5\nm_fin : Fintype m\ninst✝³ : Fintype n\ninst✝² : Fintype o\ninst✝¹ : Fintype m\ninst✝ : LinearOrderedField R\nA : Matrix m n R\n⊢ finrank R { x // x ∈ LinearMap.range (mulVecLin (Aᵀ * A)) } + finrank R { x // x ∈ LinearMap.ker (mulVecLin A) } =\n    finrank R { x // x ∈ LinearMap.range (mulVecLin (Aᵀ * A)) } +\n      finrank R { x // x ∈ LinearMap.ker (mulVecLin (Aᵀ * A)) }\n[PROOFSTEP]\nrw [ker_mulVecLin_transpose_mul_self]\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\nR : Type u_5\nm_fin : Fintype m\ninst✝³ : Fintype n\ninst✝² : Fintype o\ninst✝¹ : Fintype m\ninst✝ : LinearOrderedField R\nA : Matrix m n R\n⊢ finrank R { x // x ∈ LinearMap.range (mulVecLin (Aᵀ * A)) } +\n      finrank R { x // x ∈ LinearMap.ker (mulVecLin (Aᵀ * A)) } =\n    finrank R { x // x ∈ LinearMap.range (mulVecLin A) } + finrank R { x // x ∈ LinearMap.ker (mulVecLin A) }\n[PROOFSTEP]\nsimp only [LinearMap.finrank_range_add_finrank_ker]\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\nR : Type u_5\nm_fin : Fintype m\ninst✝³ : Fintype n\ninst✝² : Fintype o\ninst✝¹ : Fintype m\ninst✝ : LinearOrderedField R\nA : Matrix m n R\n⊢ rank (A * Aᵀ) = rank A\n[PROOFSTEP]\nsimpa only [rank_transpose, transpose_transpose] using rank_transpose_mul_self Aᵀ\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\nR : Type u_5\nm_fin : Fintype m\ninst✝³ : Fintype n\ninst✝² : Fintype o\ninst✝¹ : LinearOrderedField R\ninst✝ : Finite m\nA : Matrix m n R\n⊢ rank A = finrank R { x // x ∈ Submodule.span R (Set.range A) }\n[PROOFSTEP]\ncases nonempty_fintype m\n[GOAL]\ncase intro\nl : Type u_1\nm : Type u_2\nn : Type u_3\no : Type u_4\nR : Type u_5\nm_fin : Fintype m\ninst✝³ : Fintype n\ninst✝² : Fintype o\ninst✝¹ : LinearOrderedField R\ninst✝ : Finite m\nA : Matrix m n R\nval✝ : Fintype m\n⊢ rank A = finrank R { x // x ∈ Submodule.span R (Set.range A) }\n[PROOFSTEP]\nrw [← rank_transpose, rank_eq_finrank_span_cols, transpose_transpose]\n", "meta": {"mathlib_filename": "Mathlib.Data.Matrix.Rank", "llama_tokens": 17397, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8006920020959544, "lm_q2_score": 0.6825737344123242, "lm_q1q2_score": 0.5465313299847161}}
{"text": "[GOAL]\nR : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nI J : Ideal R\nN P : Submodule R M\ns : Set M\nr : R\n⊢ r ∈ annihilator (span R s) ↔ ∀ (n : ↑s), r • ↑n = 0\n[PROOFSTEP]\nrw [Submodule.mem_annihilator]\n[GOAL]\nR : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nI J : Ideal R\nN P : Submodule R M\ns : Set M\nr : R\n⊢ (∀ (n : M), n ∈ span R s → r • n = 0) ↔ ∀ (n : ↑s), r • ↑n = 0\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nR : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nI J : Ideal R\nN P : Submodule R M\ns : Set M\nr : R\n⊢ (∀ (n : M), n ∈ span R s → r • n = 0) → ∀ (n : ↑s), r • ↑n = 0\n[PROOFSTEP]\nintro h n\n[GOAL]\ncase mp\nR : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nI J : Ideal R\nN P : Submodule R M\ns : Set M\nr : R\nh : ∀ (n : M), n ∈ span R s → r • n = 0\nn : ↑s\n⊢ r • ↑n = 0\n[PROOFSTEP]\nexact h _ (Submodule.subset_span n.prop)\n[GOAL]\ncase mpr\nR : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nI J : Ideal R\nN P : Submodule R M\ns : Set M\nr : R\n⊢ (∀ (n : ↑s), r • ↑n = 0) → ∀ (n : M), n ∈ span R s → r • n = 0\n[PROOFSTEP]\nintro h n hn\n[GOAL]\ncase mpr\nR : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nI J : Ideal R\nN P : Submodule R M\ns : Set M\nr : R\nh : ∀ (n : ↑s), r • ↑n = 0\nn : M\nhn : n ∈ span R s\n⊢ r • n = 0\n[PROOFSTEP]\nrefine Submodule.span_induction hn ?_ ?_ ?_ ?_\n[GOAL]\ncase mpr.refine_1\nR : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nI J : Ideal R\nN P : Submodule R M\ns : Set M\nr : R\nh : ∀ (n : ↑s), r • ↑n = 0\nn : M\nhn : n ∈ span R s\n⊢ ∀ (x : M), x ∈ s → r • x = 0\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase mpr.refine_1\nR : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nI J : Ideal R\nN P : Submodule R M\ns : Set M\nr : R\nh : ∀ (n : ↑s), r • ↑n = 0\nn : M\nhn : n ∈ span R s\nx : M\nhx : x ∈ s\n⊢ r • x = 0\n[PROOFSTEP]\nexact h ⟨x, hx⟩\n[GOAL]\ncase mpr.refine_2\nR : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nI J : Ideal R\nN P : Submodule R M\ns : Set M\nr : R\nh : ∀ (n : ↑s), r • ↑n = 0\nn : M\nhn : n ∈ span R s\n⊢ r • 0 = 0\n[PROOFSTEP]\nexact smul_zero _\n[GOAL]\ncase mpr.refine_3\nR : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nI J : Ideal R\nN P : Submodule R M\ns : Set M\nr : R\nh : ∀ (n : ↑s), r • ↑n = 0\nn : M\nhn : n ∈ span R s\n⊢ ∀ (x y : M), r • x = 0 → r • y = 0 → r • (x + y) = 0\n[PROOFSTEP]\nintro x y hx hy\n[GOAL]\ncase mpr.refine_3\nR : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nI J : Ideal R\nN P : Submodule R M\ns : Set M\nr : R\nh : ∀ (n : ↑s), r • ↑n = 0\nn : M\nhn : n ∈ span R s\nx y : M\nhx : r • x = 0\nhy : r • y = 0\n⊢ r • (x + y) = 0\n[PROOFSTEP]\nrw [smul_add, hx, hy, zero_add]\n[GOAL]\ncase mpr.refine_4\nR : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nI J : Ideal R\nN P : Submodule R M\ns : Set M\nr : R\nh : ∀ (n : ↑s), r • ↑n = 0\nn : M\nhn : n ∈ span R s\n⊢ ∀ (a : R) (x : M), r • x = 0 → r • a • x = 0\n[PROOFSTEP]\nintro a x hx\n[GOAL]\ncase mpr.refine_4\nR : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nI J : Ideal R\nN P : Submodule R M\ns : Set M\nr : R\nh : ∀ (n : ↑s), r • ↑n = 0\nn : M\nhn : n ∈ span R s\na : R\nx : M\nhx : r • x = 0\n⊢ r • a • x = 0\n[PROOFSTEP]\nrw [smul_comm, hx, smul_zero]\n[GOAL]\nR : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nI J : Ideal R\nN P : Submodule R M\ng : M\nr : R\n⊢ r ∈ annihilator (span R {g}) ↔ r • g = 0\n[PROOFSTEP]\nsimp [mem_annihilator_span]\n[GOAL]\nR : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nI J : Ideal R\nN P : Submodule R M\np : M → Prop\nx : M\nH : x ∈ I • N\nHb : ∀ (r : R), r ∈ I → ∀ (n : M), n ∈ N → p (r • n)\nH1 : ∀ (x y : M), p x → p y → p (x + y)\n⊢ p x\n[PROOFSTEP]\nhave H0 : p 0 := by simpa only [zero_smul] using Hb 0 I.zero_mem 0 N.zero_mem\n[GOAL]\nR : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nI J : Ideal R\nN P : Submodule R M\np : M → Prop\nx : M\nH : x ∈ I • N\nHb : ∀ (r : R), r ∈ I → ∀ (n : M), n ∈ N → p (r • n)\nH1 : ∀ (x y : M), p x → p y → p (x + y)\n⊢ p 0\n[PROOFSTEP]\nsimpa only [zero_smul] using Hb 0 I.zero_mem 0 N.zero_mem\n[GOAL]\nR : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nI J : Ideal R\nN P : Submodule R M\np : M → Prop\nx : M\nH : x ∈ I • N\nHb : ∀ (r : R), r ∈ I → ∀ (n : M), n ∈ N → p (r • n)\nH1 : ∀ (x y : M), p x → p y → p (x + y)\nH0 : p 0\n⊢ p x\n[PROOFSTEP]\nrefine Submodule.iSup_induction (x := x) _ H ?_ H0 H1\n[GOAL]\nR : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nI J : Ideal R\nN P : Submodule R M\np : M → Prop\nx : M\nH : x ∈ I • N\nHb : ∀ (r : R), r ∈ I → ∀ (n : M), n ∈ N → p (r • n)\nH1 : ∀ (x y : M), p x → p y → p (x + y)\nH0 : p 0\n⊢ ∀ (i : { x // x ∈ I }) (x : M), x ∈ map (↑(LinearMap.lsmul R M) ↑i) N → p x\n[PROOFSTEP]\nrintro ⟨i, hi⟩ m ⟨j, hj, hj'⟩\n[GOAL]\ncase mk.intro.intro\nR : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nI J : Ideal R\nN P : Submodule R M\np : M → Prop\nx : M\nH : x ∈ I • N\nHb : ∀ (r : R), r ∈ I → ∀ (n : M), n ∈ N → p (r • n)\nH1 : ∀ (x y : M), p x → p y → p (x + y)\nH0 : p 0\ni : R\nhi : i ∈ I\nm j : M\nhj : j ∈ ↑N\nhj' : ↑(↑(LinearMap.lsmul R M) ↑{ val := i, property := hi }) j = m\n⊢ p m\n[PROOFSTEP]\nrw [← hj']\n[GOAL]\ncase mk.intro.intro\nR : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nI J : Ideal R\nN P : Submodule R M\np : M → Prop\nx : M\nH : x ∈ I • N\nHb : ∀ (r : R), r ∈ I → ∀ (n : M), n ∈ N → p (r • n)\nH1 : ∀ (x y : M), p x → p y → p (x + y)\nH0 : p 0\ni : R\nhi : i ∈ I\nm j : M\nhj : j ∈ ↑N\nhj' : ↑(↑(LinearMap.lsmul R M) ↑{ val := i, property := hi }) j = m\n⊢ p (↑(↑(LinearMap.lsmul R M) ↑{ val := i, property := hi }) j)\n[PROOFSTEP]\nexact Hb _ hi _ hj\n[GOAL]\nR : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nI J : Ideal R\nN P : Submodule R M\nx : M\nhx : x ∈ I • N\np : (x : M) → x ∈ I • N → Prop\nHb : ∀ (r : R) (hr : r ∈ I) (n : M) (hn : n ∈ N), p (r • n) (_ : r • n ∈ I • N)\nH1 : ∀ (x : M) (hx : x ∈ I • N) (y : M) (hy : y ∈ I • N), p x hx → p y hy → p (x + y) (_ : x + y ∈ I • N)\n⊢ p x hx\n[PROOFSTEP]\nrefine' Exists.elim _ fun (h : x ∈ I • N) (H : p x h) => H\n[GOAL]\nR : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nI J : Ideal R\nN P : Submodule R M\nx : M\nhx : x ∈ I • N\np : (x : M) → x ∈ I • N → Prop\nHb : ∀ (r : R) (hr : r ∈ I) (n : M) (hn : n ∈ N), p (r • n) (_ : r • n ∈ I • N)\nH1 : ∀ (x : M) (hx : x ∈ I • N) (y : M) (hy : y ∈ I • N), p x hx → p y hy → p (x + y) (_ : x + y ∈ I • N)\n⊢ ∃ x_1, p x x_1\n[PROOFSTEP]\nexact smul_induction_on hx (fun a ha x hx => ⟨_, Hb _ ha _ hx⟩) fun x y ⟨_, hx⟩ ⟨_, hy⟩ => ⟨_, H1 _ _ _ _ hx hy⟩\n[GOAL]\nR : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nI✝ J : Ideal R\nN P : Submodule R M\nI : Ideal R\nm x : M\nhx : x ∈ I • span R {m}\nm1 m2 : M\nx✝¹ : ∃ y, y ∈ I ∧ y • m = m1\nx✝ : ∃ y, y ∈ I ∧ y • m = m2\ny1 : R\nhyi1 : y1 ∈ I\nhy1 : y1 • m = m1\ny2 : R\nhyi2 : y2 ∈ I\nhy2 : y2 • m = m2\n⊢ (y1 + y2) • m = m1 + m2\n[PROOFSTEP]\nrw [add_smul, hy1, hy2]\n[GOAL]\nR : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nI✝ J : Ideal R\nN P : Submodule R M\nI : Ideal R\nf : R →ₗ[R] M\n⊢ map f I ≤ I • ⊤\n[PROOFSTEP]\nrintro _ ⟨y, hy, rfl⟩\n[GOAL]\ncase intro.intro\nR : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nI✝ J : Ideal R\nN P : Submodule R M\nI : Ideal R\nf : R →ₗ[R] M\ny : R\nhy : y ∈ ↑I\n⊢ ↑f y ∈ I • ⊤\n[PROOFSTEP]\nrw [← mul_one y, ← smul_eq_mul, f.map_smul]\n[GOAL]\ncase intro.intro\nR : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nI✝ J : Ideal R\nN P : Submodule R M\nI : Ideal R\nf : R →ₗ[R] M\ny : R\nhy : y ∈ ↑I\n⊢ y • ↑f 1 ∈ I • ⊤\n[PROOFSTEP]\nexact smul_mem_smul hy mem_top\n[GOAL]\nR : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nI✝ J : Ideal R\nN P : Submodule R M\nI : Ideal R\n⊢ I * annihilator I = ⊥\n[PROOFSTEP]\nrw [mul_comm, annihilator_mul]\n[GOAL]\nR : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nI J : Ideal R\nN✝ P : Submodule R M\nS : Set R\nT : Set M\nr : R\nN : Submodule R M\n⊢ Ideal.span {r} • N = r • N\n[PROOFSTEP]\nhave : span R (⋃ (t : M) (_ : t ∈ N), {r • t}) = r • N :=\n  by\n  convert span_eq (r • N)\n  exact (Set.image_eq_iUnion _ (N : Set M)).symm\n[GOAL]\nR : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nI J : Ideal R\nN✝ P : Submodule R M\nS : Set R\nT : Set M\nr : R\nN : Submodule R M\n⊢ span R (⋃ (t : M) (_ : t ∈ N), {r • t}) = r • N\n[PROOFSTEP]\nconvert span_eq (r • N)\n[GOAL]\ncase h.e'_2.h.e'_6\nR : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nI J : Ideal R\nN✝ P : Submodule R M\nS : Set R\nT : Set M\nr : R\nN : Submodule R M\n⊢ ⋃ (t : M) (_ : t ∈ N), {r • t} = ↑(r • N)\n[PROOFSTEP]\nexact (Set.image_eq_iUnion _ (N : Set M)).symm\n[GOAL]\nR : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nI J : Ideal R\nN✝ P : Submodule R M\nS : Set R\nT : Set M\nr : R\nN : Submodule R M\nthis : span R (⋃ (t : M) (_ : t ∈ N), {r • t}) = r • N\n⊢ Ideal.span {r} • N = r • N\n[PROOFSTEP]\nconv_lhs => rw [← span_eq N, span_smul_span]\n[GOAL]\nR : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nI J : Ideal R\nN✝ P : Submodule R M\nS : Set R\nT : Set M\nr : R\nN : Submodule R M\nthis : span R (⋃ (t : M) (_ : t ∈ N), {r • t}) = r • N\n| Ideal.span {r} • N\n[PROOFSTEP]\nrw [← span_eq N, span_smul_span]\n[GOAL]\nR : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nI J : Ideal R\nN✝ P : Submodule R M\nS : Set R\nT : Set M\nr : R\nN : Submodule R M\nthis : span R (⋃ (t : M) (_ : t ∈ N), {r • t}) = r • N\n| Ideal.span {r} • N\n[PROOFSTEP]\nrw [← span_eq N, span_smul_span]\n[GOAL]\nR : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nI J : Ideal R\nN✝ P : Submodule R M\nS : Set R\nT : Set M\nr : R\nN : Submodule R M\nthis : span R (⋃ (t : M) (_ : t ∈ N), {r • t}) = r • N\n| Ideal.span {r} • N\n[PROOFSTEP]\nrw [← span_eq N, span_smul_span]\n[GOAL]\nR : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nI J : Ideal R\nN✝ P : Submodule R M\nS : Set R\nT : Set M\nr : R\nN : Submodule R M\nthis : span R (⋃ (t : M) (_ : t ∈ N), {r • t}) = r • N\n⊢ span R (⋃ (s : R) (_ : s ∈ {r}) (t : M) (_ : t ∈ ↑N), {s • t}) = r • N\n[PROOFSTEP]\nsimpa\n[GOAL]\nR : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nI J : Ideal R\nN P : Submodule R M\nS : Set R\nT : Set M\nM' : Submodule R M\ns : Set R\nhs : Ideal.span s = ⊤\nx : M\nH : ∀ (r : ↑s), ↑r • x ∈ M'\n⊢ x ∈ M'\n[PROOFSTEP]\nsuffices (⊤ : Ideal R) • span R ({ x } : Set M) ≤ M'\n  by\n  rw [top_smul] at this \n  exact this (subset_span (Set.mem_singleton x))\n[GOAL]\nR : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nI J : Ideal R\nN P : Submodule R M\nS : Set R\nT : Set M\nM' : Submodule R M\ns : Set R\nhs : Ideal.span s = ⊤\nx : M\nH : ∀ (r : ↑s), ↑r • x ∈ M'\nthis : ⊤ • span R {x} ≤ M'\n⊢ x ∈ M'\n[PROOFSTEP]\nrw [top_smul] at this \n[GOAL]\nR : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nI J : Ideal R\nN P : Submodule R M\nS : Set R\nT : Set M\nM' : Submodule R M\ns : Set R\nhs : Ideal.span s = ⊤\nx : M\nH : ∀ (r : ↑s), ↑r • x ∈ M'\nthis : span R {x} ≤ M'\n⊢ x ∈ M'\n[PROOFSTEP]\nexact this (subset_span (Set.mem_singleton x))\n[GOAL]\nR : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nI J : Ideal R\nN P : Submodule R M\nS : Set R\nT : Set M\nM' : Submodule R M\ns : Set R\nhs : Ideal.span s = ⊤\nx : M\nH : ∀ (r : ↑s), ↑r • x ∈ M'\n⊢ ⊤ • span R {x} ≤ M'\n[PROOFSTEP]\nrw [← hs, span_smul_span, span_le]\n[GOAL]\nR : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nI J : Ideal R\nN P : Submodule R M\nS : Set R\nT : Set M\nM' : Submodule R M\ns : Set R\nhs : Ideal.span s = ⊤\nx : M\nH : ∀ (r : ↑s), ↑r • x ∈ M'\n⊢ ⋃ (s_1 : R) (_ : s_1 ∈ s) (t : M) (_ : t ∈ {x}), {s_1 • t} ⊆ ↑M'\n[PROOFSTEP]\nsimpa using H\n[GOAL]\nR : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nI J : Ideal R\nN P : Submodule R M\nS : Set R\nT : Set M\nM' : Submodule R M\ns : Set R\nhs : Ideal.span s = ⊤\nx : M\nH : ∀ (r : ↑s), ∃ n, ↑r ^ n • x ∈ M'\n⊢ x ∈ M'\n[PROOFSTEP]\nobtain ⟨s', hs₁, hs₂⟩ := (Ideal.span_eq_top_iff_finite _).mp hs\n[GOAL]\ncase intro.intro\nR : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nI J : Ideal R\nN P : Submodule R M\nS : Set R\nT : Set M\nM' : Submodule R M\ns : Set R\nhs : Ideal.span s = ⊤\nx : M\nH : ∀ (r : ↑s), ∃ n, ↑r ^ n • x ∈ M'\ns' : Finset R\nhs₁ : ↑s' ⊆ s\nhs₂ : Ideal.span ↑s' = ⊤\n⊢ x ∈ M'\n[PROOFSTEP]\nreplace H : ∀ r : s', ∃ n : ℕ, ((r : R) ^ n : R) • x ∈ M' := fun r => H ⟨_, hs₁ r.2⟩\n[GOAL]\ncase intro.intro\nR : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nI J : Ideal R\nN P : Submodule R M\nS : Set R\nT : Set M\nM' : Submodule R M\ns : Set R\nhs : Ideal.span s = ⊤\nx : M\ns' : Finset R\nhs₁ : ↑s' ⊆ s\nhs₂ : Ideal.span ↑s' = ⊤\nH : ∀ (r : { x // x ∈ s' }), ∃ n, ↑r ^ n • x ∈ M'\n⊢ x ∈ M'\n[PROOFSTEP]\nchoose n₁ n₂ using H\n[GOAL]\ncase intro.intro\nR : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nI J : Ideal R\nN P : Submodule R M\nS : Set R\nT : Set M\nM' : Submodule R M\ns : Set R\nhs : Ideal.span s = ⊤\nx : M\ns' : Finset R\nhs₁ : ↑s' ⊆ s\nhs₂ : Ideal.span ↑s' = ⊤\nn₁ : { x // x ∈ s' } → ℕ\nn₂ : ∀ (r : { x // x ∈ s' }), ↑r ^ n₁ r • x ∈ M'\n⊢ x ∈ M'\n[PROOFSTEP]\nlet N := s'.attach.sup n₁\n[GOAL]\ncase intro.intro\nR : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nI J : Ideal R\nN✝ P : Submodule R M\nS : Set R\nT : Set M\nM' : Submodule R M\ns : Set R\nhs : Ideal.span s = ⊤\nx : M\ns' : Finset R\nhs₁ : ↑s' ⊆ s\nhs₂ : Ideal.span ↑s' = ⊤\nn₁ : { x // x ∈ s' } → ℕ\nn₂ : ∀ (r : { x // x ∈ s' }), ↑r ^ n₁ r • x ∈ M'\nN : ℕ := Finset.sup (Finset.attach s') n₁\n⊢ x ∈ M'\n[PROOFSTEP]\nhave hs' := Ideal.span_pow_eq_top (s' : Set R) hs₂ N\n[GOAL]\ncase intro.intro\nR : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nI J : Ideal R\nN✝ P : Submodule R M\nS : Set R\nT : Set M\nM' : Submodule R M\ns : Set R\nhs : Ideal.span s = ⊤\nx : M\ns' : Finset R\nhs₁ : ↑s' ⊆ s\nhs₂ : Ideal.span ↑s' = ⊤\nn₁ : { x // x ∈ s' } → ℕ\nn₂ : ∀ (r : { x // x ∈ s' }), ↑r ^ n₁ r • x ∈ M'\nN : ℕ := Finset.sup (Finset.attach s') n₁\nhs' : Ideal.span ((fun x => x ^ N) '' ↑s') = ⊤\n⊢ x ∈ M'\n[PROOFSTEP]\napply M'.mem_of_span_top_of_smul_mem _ hs'\n[GOAL]\ncase intro.intro.H\nR : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nI J : Ideal R\nN✝ P : Submodule R M\nS : Set R\nT : Set M\nM' : Submodule R M\ns : Set R\nhs : Ideal.span s = ⊤\nx : M\ns' : Finset R\nhs₁ : ↑s' ⊆ s\nhs₂ : Ideal.span ↑s' = ⊤\nn₁ : { x // x ∈ s' } → ℕ\nn₂ : ∀ (r : { x // x ∈ s' }), ↑r ^ n₁ r • x ∈ M'\nN : ℕ := Finset.sup (Finset.attach s') n₁\nhs' : Ideal.span ((fun x => x ^ N) '' ↑s') = ⊤\n⊢ ∀ (r : ↑((fun x => x ^ N) '' ↑s')), ↑r • x ∈ M'\n[PROOFSTEP]\nrintro ⟨_, r, hr, rfl⟩\n[GOAL]\ncase intro.intro.H.mk.intro.intro\nR : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nI J : Ideal R\nN✝ P : Submodule R M\nS : Set R\nT : Set M\nM' : Submodule R M\ns : Set R\nhs : Ideal.span s = ⊤\nx : M\ns' : Finset R\nhs₁ : ↑s' ⊆ s\nhs₂ : Ideal.span ↑s' = ⊤\nn₁ : { x // x ∈ s' } → ℕ\nn₂ : ∀ (r : { x // x ∈ s' }), ↑r ^ n₁ r • x ∈ M'\nN : ℕ := Finset.sup (Finset.attach s') n₁\nhs' : Ideal.span ((fun x => x ^ N) '' ↑s') = ⊤\nr : R\nhr : r ∈ ↑s'\n⊢ ↑{ val := (fun x => x ^ N) r, property := (_ : ∃ a, a ∈ ↑s' ∧ (fun x => x ^ N) a = (fun x => x ^ N) r) } • x ∈ M'\n[PROOFSTEP]\nconvert M'.smul_mem (r ^ (N - n₁ ⟨r, hr⟩)) (n₂ ⟨r, hr⟩) using 1\n[GOAL]\ncase h.e'_4\nR : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nI J : Ideal R\nN✝ P : Submodule R M\nS : Set R\nT : Set M\nM' : Submodule R M\ns : Set R\nhs : Ideal.span s = ⊤\nx : M\ns' : Finset R\nhs₁ : ↑s' ⊆ s\nhs₂ : Ideal.span ↑s' = ⊤\nn₁ : { x // x ∈ s' } → ℕ\nn₂ : ∀ (r : { x // x ∈ s' }), ↑r ^ n₁ r • x ∈ M'\nN : ℕ := Finset.sup (Finset.attach s') n₁\nhs' : Ideal.span ((fun x => x ^ N) '' ↑s') = ⊤\nr : R\nhr : r ∈ ↑s'\n⊢ ↑{ val := (fun x => x ^ N) r, property := (_ : ∃ a, a ∈ ↑s' ∧ (fun x => x ^ N) a = (fun x => x ^ N) r) } • x =\n    r ^ (N - n₁ { val := r, property := hr }) • ↑{ val := r, property := hr } ^ n₁ { val := r, property := hr } • x\n[PROOFSTEP]\nsimp only [Subtype.coe_mk, smul_smul, ← pow_add]\n[GOAL]\ncase h.e'_4\nR : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nI J : Ideal R\nN✝ P : Submodule R M\nS : Set R\nT : Set M\nM' : Submodule R M\ns : Set R\nhs : Ideal.span s = ⊤\nx : M\ns' : Finset R\nhs₁ : ↑s' ⊆ s\nhs₂ : Ideal.span ↑s' = ⊤\nn₁ : { x // x ∈ s' } → ℕ\nn₂ : ∀ (r : { x // x ∈ s' }), ↑r ^ n₁ r • x ∈ M'\nN : ℕ := Finset.sup (Finset.attach s') n₁\nhs' : Ideal.span ((fun x => x ^ N) '' ↑s') = ⊤\nr : R\nhr : r ∈ ↑s'\n⊢ r ^ Finset.sup (Finset.attach s') n₁ • x =\n    r ^ (Finset.sup (Finset.attach s') n₁ - n₁ { val := r, property := hr } + n₁ { val := r, property := hr }) • x\n[PROOFSTEP]\nrw [tsub_add_cancel_of_le (Finset.le_sup (s'.mem_attach _) : n₁ ⟨r, hr⟩ ≤ N)]\n[GOAL]\nR : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\nI J : Ideal R\nN P : Submodule R M\nS : Set R\nT : Set M\nM' : Type w\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\ns : Set M\nx : M\n⊢ x ∈ I • span R s ↔ x ∈ span R (⋃ (a : R) (_ : a ∈ I) (b : M) (_ : b ∈ s), {a • b})\n[PROOFSTEP]\nrw [← I.span_eq, Submodule.span_smul_span, I.span_eq]\n[GOAL]\nR : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\nI J : Ideal R\nN P : Submodule R M\nS : Set R\nT : Set M\nM' : Type w\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\ns : Set M\nx : M\n⊢ x ∈ span R (⋃ (s_1 : R) (_ : s_1 ∈ ↑I) (t : M) (_ : t ∈ s), {s_1 • t}) ↔\n    x ∈ span R (⋃ (a : R) (_ : a ∈ I) (b : M) (_ : b ∈ s), {a • b})\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\nI J : Ideal R\nN P : Submodule R M\nS : Set R\nT : Set M\nM' : Type w\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nι : Type u_3\nf : ι → M\nx : M\n⊢ x ∈ I • span R (Set.range f) ↔ ∃ a x_1, (Finsupp.sum a fun i c => c • f i) = x\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nR : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\nI J : Ideal R\nN P : Submodule R M\nS : Set R\nT : Set M\nM' : Type w\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nι : Type u_3\nf : ι → M\nx : M\n⊢ x ∈ I • span R (Set.range f) → ∃ a x_1, (Finsupp.sum a fun i c => c • f i) = x\ncase mpr\nR : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\nI J : Ideal R\nN P : Submodule R M\nS : Set R\nT : Set M\nM' : Type w\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nι : Type u_3\nf : ι → M\nx : M\n⊢ (∃ a x_1, (Finsupp.sum a fun i c => c • f i) = x) → x ∈ I • span R (Set.range f)\n[PROOFSTEP]\nswap\n[GOAL]\ncase mpr\nR : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\nI J : Ideal R\nN P : Submodule R M\nS : Set R\nT : Set M\nM' : Type w\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nι : Type u_3\nf : ι → M\nx : M\n⊢ (∃ a x_1, (Finsupp.sum a fun i c => c • f i) = x) → x ∈ I • span R (Set.range f)\n[PROOFSTEP]\nrintro ⟨a, ha, rfl⟩\n[GOAL]\ncase mpr.intro.intro\nR : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\nI J : Ideal R\nN P : Submodule R M\nS : Set R\nT : Set M\nM' : Type w\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nι : Type u_3\nf : ι → M\na : ι →₀ R\nha : ∀ (i : ι), ↑a i ∈ I\n⊢ (Finsupp.sum a fun i c => c • f i) ∈ I • span R (Set.range f)\n[PROOFSTEP]\nexact Submodule.sum_mem _ fun c _ => smul_mem_smul (ha c) <| subset_span <| Set.mem_range_self _\n[GOAL]\ncase mp\nR : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\nI J : Ideal R\nN P : Submodule R M\nS : Set R\nT : Set M\nM' : Type w\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nι : Type u_3\nf : ι → M\nx : M\n⊢ x ∈ I • span R (Set.range f) → ∃ a x_1, (Finsupp.sum a fun i c => c • f i) = x\n[PROOFSTEP]\nrefine' fun hx => span_induction (mem_smul_span.mp hx) _ _ _ _\n[GOAL]\ncase mp.refine'_1\nR : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\nI J : Ideal R\nN P : Submodule R M\nS : Set R\nT : Set M\nM' : Type w\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nι : Type u_3\nf : ι → M\nx : M\nhx : x ∈ I • span R (Set.range f)\n⊢ ∀ (x : M),\n    x ∈ ⋃ (a : R) (_ : a ∈ I) (b : M) (_ : b ∈ Set.range f), {a • b} → ∃ a x_1, (Finsupp.sum a fun i c => c • f i) = x\n[PROOFSTEP]\nsimp only [Set.mem_iUnion, Set.mem_range, Set.mem_singleton_iff]\n[GOAL]\ncase mp.refine'_1\nR : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\nI J : Ideal R\nN P : Submodule R M\nS : Set R\nT : Set M\nM' : Type w\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nι : Type u_3\nf : ι → M\nx : M\nhx : x ∈ I • span R (Set.range f)\n⊢ ∀ (x : M), (∃ i h i_1 h, x = i • i_1) → ∃ a x_1, (Finsupp.sum a fun i c => c • f i) = x\n[PROOFSTEP]\nrintro x ⟨y, hy, x, ⟨i, rfl⟩, rfl⟩\n[GOAL]\ncase mp.refine'_1.intro.intro.intro.intro.intro\nR : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\nI J : Ideal R\nN P : Submodule R M\nS : Set R\nT : Set M\nM' : Type w\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nι : Type u_3\nf : ι → M\nx : M\nhx : x ∈ I • span R (Set.range f)\ny : R\nhy : y ∈ I\ni : ι\n⊢ ∃ a x, (Finsupp.sum a fun i c => c • f i) = y • f i\n[PROOFSTEP]\nrefine' ⟨Finsupp.single i y, fun j => _, _⟩\n[GOAL]\ncase mp.refine'_1.intro.intro.intro.intro.intro.refine'_1\nR : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\nI J : Ideal R\nN P : Submodule R M\nS : Set R\nT : Set M\nM' : Type w\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nι : Type u_3\nf : ι → M\nx : M\nhx : x ∈ I • span R (Set.range f)\ny : R\nhy : y ∈ I\ni j : ι\n⊢ ↑(Finsupp.single i y) j ∈ I\n[PROOFSTEP]\nletI := Classical.decEq ι\n[GOAL]\ncase mp.refine'_1.intro.intro.intro.intro.intro.refine'_1\nR : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\nI J : Ideal R\nN P : Submodule R M\nS : Set R\nT : Set M\nM' : Type w\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nι : Type u_3\nf : ι → M\nx : M\nhx : x ∈ I • span R (Set.range f)\ny : R\nhy : y ∈ I\ni j : ι\nthis : DecidableEq ι := Classical.decEq ι\n⊢ ↑(Finsupp.single i y) j ∈ I\n[PROOFSTEP]\nrw [Finsupp.single_apply]\n[GOAL]\ncase mp.refine'_1.intro.intro.intro.intro.intro.refine'_1\nR : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\nI J : Ideal R\nN P : Submodule R M\nS : Set R\nT : Set M\nM' : Type w\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nι : Type u_3\nf : ι → M\nx : M\nhx : x ∈ I • span R (Set.range f)\ny : R\nhy : y ∈ I\ni j : ι\nthis : DecidableEq ι := Classical.decEq ι\n⊢ (if i = j then y else 0) ∈ I\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nR : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\nI J : Ideal R\nN P : Submodule R M\nS : Set R\nT : Set M\nM' : Type w\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nι : Type u_3\nf : ι → M\nx : M\nhx : x ∈ I • span R (Set.range f)\ny : R\nhy : y ∈ I\ni j : ι\nthis : DecidableEq ι := Classical.decEq ι\nh✝ : i = j\n⊢ y ∈ I\n[PROOFSTEP]\nassumption\n[GOAL]\ncase neg\nR : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\nI J : Ideal R\nN P : Submodule R M\nS : Set R\nT : Set M\nM' : Type w\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nι : Type u_3\nf : ι → M\nx : M\nhx : x ∈ I • span R (Set.range f)\ny : R\nhy : y ∈ I\ni j : ι\nthis : DecidableEq ι := Classical.decEq ι\nh✝ : ¬i = j\n⊢ 0 ∈ I\n[PROOFSTEP]\nexact I.zero_mem\n[GOAL]\ncase mp.refine'_1.intro.intro.intro.intro.intro.refine'_2\nR : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\nI J : Ideal R\nN P : Submodule R M\nS : Set R\nT : Set M\nM' : Type w\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nι : Type u_3\nf : ι → M\nx : M\nhx : x ∈ I • span R (Set.range f)\ny : R\nhy : y ∈ I\ni : ι\n⊢ (Finsupp.sum (Finsupp.single i y) fun i c => c • f i) = y • f i\n[PROOFSTEP]\nrefine' @Finsupp.sum_single_index ι R M _ _ i _ (fun i y => y • f i) _\n[GOAL]\ncase mp.refine'_1.intro.intro.intro.intro.intro.refine'_2\nR : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\nI J : Ideal R\nN P : Submodule R M\nS : Set R\nT : Set M\nM' : Type w\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nι : Type u_3\nf : ι → M\nx : M\nhx : x ∈ I • span R (Set.range f)\ny : R\nhy : y ∈ I\ni : ι\n⊢ (fun i y => y • f i) i 0 = 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mp.refine'_2\nR : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\nI J : Ideal R\nN P : Submodule R M\nS : Set R\nT : Set M\nM' : Type w\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nι : Type u_3\nf : ι → M\nx : M\nhx : x ∈ I • span R (Set.range f)\n⊢ ∃ a x, (Finsupp.sum a fun i c => c • f i) = 0\n[PROOFSTEP]\nexact ⟨0, fun _ => I.zero_mem, Finsupp.sum_zero_index⟩\n[GOAL]\ncase mp.refine'_3\nR : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\nI J : Ideal R\nN P : Submodule R M\nS : Set R\nT : Set M\nM' : Type w\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nι : Type u_3\nf : ι → M\nx : M\nhx : x ∈ I • span R (Set.range f)\n⊢ ∀ (x y : M),\n    (∃ a x_1, (Finsupp.sum a fun i c => c • f i) = x) →\n      (∃ a x, (Finsupp.sum a fun i c => c • f i) = y) → ∃ a x_1, (Finsupp.sum a fun i c => c • f i) = x + y\n[PROOFSTEP]\nrintro x y ⟨ax, hax, rfl⟩ ⟨ay, hay, rfl⟩\n[GOAL]\ncase mp.refine'_3.intro.intro.intro.intro\nR : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\nI J : Ideal R\nN P : Submodule R M\nS : Set R\nT : Set M\nM' : Type w\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nι : Type u_3\nf : ι → M\nx : M\nhx : x ∈ I • span R (Set.range f)\nax : ι →₀ R\nhax : ∀ (i : ι), ↑ax i ∈ I\nay : ι →₀ R\nhay : ∀ (i : ι), ↑ay i ∈ I\n⊢ ∃ a x, (Finsupp.sum a fun i c => c • f i) = (Finsupp.sum ax fun i c => c • f i) + Finsupp.sum ay fun i c => c • f i\n[PROOFSTEP]\nrefine' ⟨ax + ay, fun i => I.add_mem (hax i) (hay i), Finsupp.sum_add_index' _ _⟩\n[GOAL]\ncase mp.refine'_3.intro.intro.intro.intro.refine'_1\nR : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\nI J : Ideal R\nN P : Submodule R M\nS : Set R\nT : Set M\nM' : Type w\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nι : Type u_3\nf : ι → M\nx : M\nhx : x ∈ I • span R (Set.range f)\nax : ι →₀ R\nhax : ∀ (i : ι), ↑ax i ∈ I\nay : ι →₀ R\nhay : ∀ (i : ι), ↑ay i ∈ I\n⊢ ∀ (a : ι), 0 • f a = 0\n[PROOFSTEP]\nintros\n[GOAL]\ncase mp.refine'_3.intro.intro.intro.intro.refine'_2\nR : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\nI J : Ideal R\nN P : Submodule R M\nS : Set R\nT : Set M\nM' : Type w\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nι : Type u_3\nf : ι → M\nx : M\nhx : x ∈ I • span R (Set.range f)\nax : ι →₀ R\nhax : ∀ (i : ι), ↑ax i ∈ I\nay : ι →₀ R\nhay : ∀ (i : ι), ↑ay i ∈ I\n⊢ ∀ (a : ι) (b₁ b₂ : R), (b₁ + b₂) • f a = b₁ • f a + b₂ • f a\n[PROOFSTEP]\nintros\n[GOAL]\ncase mp.refine'_3.intro.intro.intro.intro.refine'_1\nR : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\nI J : Ideal R\nN P : Submodule R M\nS : Set R\nT : Set M\nM' : Type w\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nι : Type u_3\nf : ι → M\nx : M\nhx : x ∈ I • span R (Set.range f)\nax : ι →₀ R\nhax : ∀ (i : ι), ↑ax i ∈ I\nay : ι →₀ R\nhay : ∀ (i : ι), ↑ay i ∈ I\na✝ : ι\n⊢ 0 • f a✝ = 0\n[PROOFSTEP]\nsimp only [zero_smul, add_smul]\n[GOAL]\ncase mp.refine'_3.intro.intro.intro.intro.refine'_2\nR : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\nI J : Ideal R\nN P : Submodule R M\nS : Set R\nT : Set M\nM' : Type w\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nι : Type u_3\nf : ι → M\nx : M\nhx : x ∈ I • span R (Set.range f)\nax : ι →₀ R\nhax : ∀ (i : ι), ↑ax i ∈ I\nay : ι →₀ R\nhay : ∀ (i : ι), ↑ay i ∈ I\na✝ : ι\nb₁✝ b₂✝ : R\n⊢ (b₁✝ + b₂✝) • f a✝ = b₁✝ • f a✝ + b₂✝ • f a✝\n[PROOFSTEP]\nsimp only [zero_smul, add_smul]\n[GOAL]\ncase mp.refine'_4\nR : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\nI J : Ideal R\nN P : Submodule R M\nS : Set R\nT : Set M\nM' : Type w\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nι : Type u_3\nf : ι → M\nx : M\nhx : x ∈ I • span R (Set.range f)\n⊢ ∀ (a : R) (x : M),\n    (∃ a x_1, (Finsupp.sum a fun i c => c • f i) = x) → ∃ a_2 x_1, (Finsupp.sum a_2 fun i c => c • f i) = a • x\n[PROOFSTEP]\nrintro c x ⟨a, ha, rfl⟩\n[GOAL]\ncase mp.refine'_4.intro.intro\nR : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\nI J : Ideal R\nN P : Submodule R M\nS : Set R\nT : Set M\nM' : Type w\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nι : Type u_3\nf : ι → M\nx : M\nhx : x ∈ I • span R (Set.range f)\nc : R\na : ι →₀ R\nha : ∀ (i : ι), ↑a i ∈ I\n⊢ ∃ a_1 x, (Finsupp.sum a_1 fun i c => c • f i) = c • Finsupp.sum a fun i c => c • f i\n[PROOFSTEP]\nrefine' ⟨c • a, fun i => I.mul_mem_left c (ha i), _⟩\n[GOAL]\ncase mp.refine'_4.intro.intro\nR : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\nI J : Ideal R\nN P : Submodule R M\nS : Set R\nT : Set M\nM' : Type w\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nι : Type u_3\nf : ι → M\nx : M\nhx : x ∈ I • span R (Set.range f)\nc : R\na : ι →₀ R\nha : ∀ (i : ι), ↑a i ∈ I\n⊢ (Finsupp.sum (c • a) fun i c => c • f i) = c • Finsupp.sum a fun i c => c • f i\n[PROOFSTEP]\nrw [Finsupp.sum_smul_index, Finsupp.smul_sum]\n[GOAL]\ncase mp.refine'_4.intro.intro\nR : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\nI J : Ideal R\nN P : Submodule R M\nS : Set R\nT : Set M\nM' : Type w\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nι : Type u_3\nf : ι → M\nx : M\nhx : x ∈ I • span R (Set.range f)\nc : R\na : ι →₀ R\nha : ∀ (i : ι), ↑a i ∈ I\n⊢ (Finsupp.sum a fun i a => (c * a) • f i) = Finsupp.sum a fun a b => c • b • f a\n[PROOFSTEP]\nintros\n[GOAL]\ncase mp.refine'_4.intro.intro\nR : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\nI J : Ideal R\nN P : Submodule R M\nS : Set R\nT : Set M\nM' : Type w\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nι : Type u_3\nf : ι → M\nx : M\nhx : x ∈ I • span R (Set.range f)\nc : R\na : ι →₀ R\nha : ∀ (i : ι), ↑a i ∈ I\n⊢ ∀ (i : ι), 0 • f i = 0\n[PROOFSTEP]\nintros\n[GOAL]\ncase mp.refine'_4.intro.intro\nR : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\nI J : Ideal R\nN P : Submodule R M\nS : Set R\nT : Set M\nM' : Type w\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nι : Type u_3\nf : ι → M\nx : M\nhx : x ∈ I • span R (Set.range f)\nc : R\na : ι →₀ R\nha : ∀ (i : ι), ↑a i ∈ I\n⊢ (Finsupp.sum a fun i a => (c * a) • f i) = Finsupp.sum a fun a b => c • b • f a\n[PROOFSTEP]\nsimp only [zero_smul, mul_smul]\n[GOAL]\ncase mp.refine'_4.intro.intro\nR : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\nI J : Ideal R\nN P : Submodule R M\nS : Set R\nT : Set M\nM' : Type w\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nι : Type u_3\nf : ι → M\nx : M\nhx : x ∈ I • span R (Set.range f)\nc : R\na : ι →₀ R\nha : ∀ (i : ι), ↑a i ∈ I\ni✝ : ι\n⊢ 0 • f i✝ = 0\n[PROOFSTEP]\nsimp only [zero_smul, mul_smul]\n[GOAL]\nR : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\nI J : Ideal R\nN P : Submodule R M\nS : Set R\nT : Set M\nM' : Type w\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nι : Type u_3\ns : Set ι\nf : ι → M\nx : M\n⊢ x ∈ I • span R (f '' s) ↔ ∃ a x_1, (Finsupp.sum a fun i c => c • f ↑i) = x\n[PROOFSTEP]\nrw [← Submodule.mem_ideal_smul_span_iff_exists_sum, ← Set.image_eq_range]\n[GOAL]\nR : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\nI J : Ideal R\nN✝ P : Submodule R M\nS : Set R\nT : Set M\nM' : Type w\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nN : Submodule R M\nx : { x // x ∈ N }\n⊢ x ∈ I • ⊤ ↔ ↑x ∈ I • N\n[PROOFSTEP]\nchange _ ↔ N.subtype x ∈ I • N\n[GOAL]\nR : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\nI J : Ideal R\nN✝ P : Submodule R M\nS : Set R\nT : Set M\nM' : Type w\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nN : Submodule R M\nx : { x // x ∈ N }\n⊢ x ∈ I • ⊤ ↔ ↑(Submodule.subtype N) x ∈ I • N\n[PROOFSTEP]\nhave : Submodule.map N.subtype (I • ⊤) = I • N := by\n  rw [Submodule.map_smul'', Submodule.map_top, Submodule.range_subtype]\n[GOAL]\nR : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\nI J : Ideal R\nN✝ P : Submodule R M\nS : Set R\nT : Set M\nM' : Type w\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nN : Submodule R M\nx : { x // x ∈ N }\n⊢ map (Submodule.subtype N) (I • ⊤) = I • N\n[PROOFSTEP]\nrw [Submodule.map_smul'', Submodule.map_top, Submodule.range_subtype]\n[GOAL]\nR : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\nI J : Ideal R\nN✝ P : Submodule R M\nS : Set R\nT : Set M\nM' : Type w\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nN : Submodule R M\nx : { x // x ∈ N }\nthis : map (Submodule.subtype N) (I • ⊤) = I • N\n⊢ x ∈ I • ⊤ ↔ ↑(Submodule.subtype N) x ∈ I • N\n[PROOFSTEP]\nrw [← this]\n[GOAL]\nR : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\nI J : Ideal R\nN✝ P : Submodule R M\nS : Set R\nT : Set M\nM' : Type w\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nN : Submodule R M\nx : { x // x ∈ N }\nthis : map (Submodule.subtype N) (I • ⊤) = I • N\n⊢ x ∈ I • ⊤ ↔ ↑(Submodule.subtype N) x ∈ map (Submodule.subtype N) (I • ⊤)\n[PROOFSTEP]\nexact (Function.Injective.mem_set_image N.injective_subtype).symm\n[GOAL]\nR : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\nI✝ J : Ideal R\nN P : Submodule R M\nS✝ : Set R\nT : Set M\nM' : Type w\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nf : M →ₗ[R] M'\nS : Submodule R M'\nI : Ideal R\n⊢ I • comap f S ≤ comap f (I • S)\n[PROOFSTEP]\nrefine' Submodule.smul_le.mpr fun r hr x hx => _\n[GOAL]\nR : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\nI✝ J : Ideal R\nN P : Submodule R M\nS✝ : Set R\nT : Set M\nM' : Type w\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nf : M →ₗ[R] M'\nS : Submodule R M'\nI : Ideal R\nr : R\nhr : r ∈ I\nx : M\nhx : x ∈ comap f S\n⊢ r • x ∈ comap f (I • S)\n[PROOFSTEP]\nrw [Submodule.mem_comap] at hx ⊢\n[GOAL]\nR : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\nI✝ J : Ideal R\nN P : Submodule R M\nS✝ : Set R\nT : Set M\nM' : Type w\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nf : M →ₗ[R] M'\nS : Submodule R M'\nI : Ideal R\nr : R\nhr : r ∈ I\nx : M\nhx : ↑f x ∈ S\n⊢ ↑f (r • x) ∈ I • S\n[PROOFSTEP]\nrw [f.map_smul]\n[GOAL]\nR : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\nI✝ J : Ideal R\nN P : Submodule R M\nS✝ : Set R\nT : Set M\nM' : Type w\ninst✝¹ : AddCommMonoid M'\ninst✝ : Module R M'\nf : M →ₗ[R] M'\nS : Submodule R M'\nI : Ideal R\nr : R\nhr : r ∈ I\nx : M\nhx : ↑f x ∈ S\n⊢ r • ↑f x ∈ I • S\n[PROOFSTEP]\nexact Submodule.smul_mem_smul hr hx\n[GOAL]\nR : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nN✝ N₁ N₂ P P₁ P₂ N : Submodule R M\nx : M\nr : R\n⊢ r ∈ colon N (span R {x}) ↔ ∀ (a : R), r • a • x ∈ N\n[PROOFSTEP]\nsimp [Submodule.mem_colon, Submodule.mem_span_singleton]\n[GOAL]\nR : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nN✝ N₁ N₂ P P₁ P₂ N : Submodule R M\nx : M\nr : R\n⊢ (∀ (a : R), r • a • x ∈ N) ↔ r • x ∈ N\n[PROOFSTEP]\nsimp_rw [fun (a : R) ↦ smul_comm r a x]\n[GOAL]\nR : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nN✝ N₁ N₂ P P₁ P₂ N : Submodule R M\nx : M\nr : R\n⊢ (∀ (a : R), a • r • x ∈ N) ↔ r • x ∈ N\n[PROOFSTEP]\nexact SetLike.forall_smul_mem_iff\n[GOAL]\nR : Type u\nM : Type v\nF : Type u_1\nG : Type u_2\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nN N₁ N₂ P P₁ P₂ : Submodule R M\nI : Ideal R\nx r : R\n⊢ r ∈ colon I (Ideal.span {x}) ↔ r * x ∈ I\n[PROOFSTEP]\nsimp only [← Ideal.submodule_span_eq, Submodule.mem_colon_singleton, smul_eq_mul]\n[GOAL]\nR : Type u\nι : Type u_1\ninst✝ : CommSemiring R\nI J K L : Ideal R\n⊢ 1 = ⊤\n[PROOFSTEP]\nerw [Submodule.one_eq_range, LinearMap.range_id]\n[GOAL]\nR : Type u\nι✝ : Type u_1\ninst✝ : CommSemiring R\nI✝ J K L : Ideal R\nι : Type u_2\ns : Finset ι\nI : ι → Ideal R\nx : ι → R\n⊢ (∀ (i : ι), i ∈ s → x i ∈ I i) → ∏ i in s, x i ∈ ∏ i in s, I i\n[PROOFSTEP]\nclassical\nrefine Finset.induction_on s ?_ ?_\n· intro\n  rw [Finset.prod_empty, Finset.prod_empty, one_eq_top]\n  exact Submodule.mem_top\n· intro a s ha IH h\n  rw [Finset.prod_insert ha, Finset.prod_insert ha]\n  exact mul_mem_mul (h a <| Finset.mem_insert_self a s) (IH fun i hi => h i <| Finset.mem_insert_of_mem hi)\n[GOAL]\nR : Type u\nι✝ : Type u_1\ninst✝ : CommSemiring R\nI✝ J K L : Ideal R\nι : Type u_2\ns : Finset ι\nI : ι → Ideal R\nx : ι → R\n⊢ (∀ (i : ι), i ∈ s → x i ∈ I i) → ∏ i in s, x i ∈ ∏ i in s, I i\n[PROOFSTEP]\nrefine Finset.induction_on s ?_ ?_\n[GOAL]\ncase refine_1\nR : Type u\nι✝ : Type u_1\ninst✝ : CommSemiring R\nI✝ J K L : Ideal R\nι : Type u_2\ns : Finset ι\nI : ι → Ideal R\nx : ι → R\n⊢ (∀ (i : ι), i ∈ ∅ → x i ∈ I i) → ∏ i in ∅, x i ∈ ∏ i in ∅, I i\n[PROOFSTEP]\nintro\n[GOAL]\ncase refine_1\nR : Type u\nι✝ : Type u_1\ninst✝ : CommSemiring R\nI✝ J K L : Ideal R\nι : Type u_2\ns : Finset ι\nI : ι → Ideal R\nx : ι → R\na✝ : ∀ (i : ι), i ∈ ∅ → x i ∈ I i\n⊢ ∏ i in ∅, x i ∈ ∏ i in ∅, I i\n[PROOFSTEP]\nrw [Finset.prod_empty, Finset.prod_empty, one_eq_top]\n[GOAL]\ncase refine_1\nR : Type u\nι✝ : Type u_1\ninst✝ : CommSemiring R\nI✝ J K L : Ideal R\nι : Type u_2\ns : Finset ι\nI : ι → Ideal R\nx : ι → R\na✝ : ∀ (i : ι), i ∈ ∅ → x i ∈ I i\n⊢ 1 ∈ ⊤\n[PROOFSTEP]\nexact Submodule.mem_top\n[GOAL]\ncase refine_2\nR : Type u\nι✝ : Type u_1\ninst✝ : CommSemiring R\nI✝ J K L : Ideal R\nι : Type u_2\ns : Finset ι\nI : ι → Ideal R\nx : ι → R\n⊢ ∀ ⦃a : ι⦄ {s : Finset ι},\n    ¬a ∈ s →\n      ((∀ (i : ι), i ∈ s → x i ∈ I i) → ∏ i in s, x i ∈ ∏ i in s, I i) →\n        (∀ (i : ι), i ∈ insert a s → x i ∈ I i) → ∏ i in insert a s, x i ∈ ∏ i in insert a s, I i\n[PROOFSTEP]\nintro a s ha IH h\n[GOAL]\ncase refine_2\nR : Type u\nι✝ : Type u_1\ninst✝ : CommSemiring R\nI✝ J K L : Ideal R\nι : Type u_2\ns✝ : Finset ι\nI : ι → Ideal R\nx : ι → R\na : ι\ns : Finset ι\nha : ¬a ∈ s\nIH : (∀ (i : ι), i ∈ s → x i ∈ I i) → ∏ i in s, x i ∈ ∏ i in s, I i\nh : ∀ (i : ι), i ∈ insert a s → x i ∈ I i\n⊢ ∏ i in insert a s, x i ∈ ∏ i in insert a s, I i\n[PROOFSTEP]\nrw [Finset.prod_insert ha, Finset.prod_insert ha]\n[GOAL]\ncase refine_2\nR : Type u\nι✝ : Type u_1\ninst✝ : CommSemiring R\nI✝ J K L : Ideal R\nι : Type u_2\ns✝ : Finset ι\nI : ι → Ideal R\nx : ι → R\na : ι\ns : Finset ι\nha : ¬a ∈ s\nIH : (∀ (i : ι), i ∈ s → x i ∈ I i) → ∏ i in s, x i ∈ ∏ i in s, I i\nh : ∀ (i : ι), i ∈ insert a s → x i ∈ I i\n⊢ x a * ∏ x_1 in s, x x_1 ∈ I a * ∏ x in s, I x\n[PROOFSTEP]\nexact mul_mem_mul (h a <| Finset.mem_insert_self a s) (IH fun i hi => h i <| Finset.mem_insert_of_mem hi)\n[GOAL]\nR : Type u\nι : Type u_1\ninst✝ : CommSemiring R\nI J K L : Ideal R\nS T : Set R\n⊢ span S * span T = span (S * T)\n[PROOFSTEP]\nunfold span\n[GOAL]\nR : Type u\nι : Type u_1\ninst✝ : CommSemiring R\nI J K L : Ideal R\nS T : Set R\n⊢ Submodule.span R S * Submodule.span R T = Submodule.span R (S * T)\n[PROOFSTEP]\nrw [Submodule.span_mul_span]\n[GOAL]\nR : Type u\nι : Type u_1\ninst✝ : CommSemiring R\nI J K L : Ideal R\nr s : R\n⊢ span {r} * span {s} = span {r * s}\n[PROOFSTEP]\nunfold span\n[GOAL]\nR : Type u\nι : Type u_1\ninst✝ : CommSemiring R\nI J K L : Ideal R\nr s : R\n⊢ Submodule.span R {r} * Submodule.span R {s} = Submodule.span R {r * s}\n[PROOFSTEP]\nrw [Submodule.span_mul_span, Set.singleton_mul_singleton]\n[GOAL]\nR : Type u\nι : Type u_1\ninst✝ : CommSemiring R\nI J K L : Ideal R\ns : R\nn : ℕ\n⊢ span {s} ^ n = span {s ^ n}\n[PROOFSTEP]\ninduction' n with n ih\n[GOAL]\ncase zero\nR : Type u\nι : Type u_1\ninst✝ : CommSemiring R\nI J K L : Ideal R\ns : R\n⊢ span {s} ^ Nat.zero = span {s ^ Nat.zero}\n[PROOFSTEP]\nsimp [Set.singleton_one]\n[GOAL]\ncase succ\nR : Type u\nι : Type u_1\ninst✝ : CommSemiring R\nI J K L : Ideal R\ns : R\nn : ℕ\nih : span {s} ^ n = span {s ^ n}\n⊢ span {s} ^ Nat.succ n = span {s ^ Nat.succ n}\n[PROOFSTEP]\nsimp only [pow_succ, ih, span_singleton_mul_span_singleton]\n[GOAL]\nR : Type u\nι : Type u_1\ninst✝ : CommSemiring R\nI✝ J K L : Ideal R\nx y : R\nI : Ideal R\n⊢ x ∈ span {y} * I ↔ ∃ z, z ∈ I ∧ y * z = x\n[PROOFSTEP]\nsimp only [mul_comm, mem_mul_span_singleton]\n[GOAL]\nR : Type u\nι : Type u_1\ninst✝ : CommSemiring R\nI✝ J✝ K L : Ideal R\nx : R\nI J : Ideal R\n⊢ (∀ {zI : R}, zI ∈ I → zI ∈ span {x} * J) ↔ ∀ (zI : R), zI ∈ I → ∃ zJ, zJ ∈ J ∧ x * zJ = zI\n[PROOFSTEP]\nsimp only [mem_span_singleton_mul]\n[GOAL]\nR : Type u\nι : Type u_1\ninst✝ : CommSemiring R\nI✝ J✝ K L : Ideal R\nx : R\nI J : Ideal R\n⊢ span {x} * I ≤ J ↔ ∀ (z : R), z ∈ I → x * z ∈ J\n[PROOFSTEP]\nsimp only [mul_le, mem_span_singleton_mul, mem_span_singleton]\n[GOAL]\nR : Type u\nι : Type u_1\ninst✝ : CommSemiring R\nI✝ J✝ K L : Ideal R\nx : R\nI J : Ideal R\n⊢ (∀ (r : R), x ∣ r → ∀ (s : R), s ∈ I → r * s ∈ J) ↔ ∀ (z : R), z ∈ I → x * z ∈ J\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nR : Type u\nι : Type u_1\ninst✝ : CommSemiring R\nI✝ J✝ K L : Ideal R\nx : R\nI J : Ideal R\n⊢ (∀ (r : R), x ∣ r → ∀ (s : R), s ∈ I → r * s ∈ J) → ∀ (z : R), z ∈ I → x * z ∈ J\n[PROOFSTEP]\nintro h zI hzI\n[GOAL]\ncase mp\nR : Type u\nι : Type u_1\ninst✝ : CommSemiring R\nI✝ J✝ K L : Ideal R\nx : R\nI J : Ideal R\nh : ∀ (r : R), x ∣ r → ∀ (s : R), s ∈ I → r * s ∈ J\nzI : R\nhzI : zI ∈ I\n⊢ x * zI ∈ J\n[PROOFSTEP]\nexact h x (dvd_refl x) zI hzI\n[GOAL]\ncase mpr\nR : Type u\nι : Type u_1\ninst✝ : CommSemiring R\nI✝ J✝ K L : Ideal R\nx : R\nI J : Ideal R\n⊢ (∀ (z : R), z ∈ I → x * z ∈ J) → ∀ (r : R), x ∣ r → ∀ (s : R), s ∈ I → r * s ∈ J\n[PROOFSTEP]\nrintro h _ ⟨z, rfl⟩ zI hzI\n[GOAL]\ncase mpr.intro\nR : Type u\nι : Type u_1\ninst✝ : CommSemiring R\nI✝ J✝ K L : Ideal R\nx : R\nI J : Ideal R\nh : ∀ (z : R), z ∈ I → x * z ∈ J\nz zI : R\nhzI : zI ∈ I\n⊢ x * z * zI ∈ J\n[PROOFSTEP]\nrw [mul_comm x z, mul_assoc]\n[GOAL]\ncase mpr.intro\nR : Type u\nι : Type u_1\ninst✝ : CommSemiring R\nI✝ J✝ K L : Ideal R\nx : R\nI J : Ideal R\nh : ∀ (z : R), z ∈ I → x * z ∈ J\nz zI : R\nhzI : zI ∈ I\n⊢ z * (x * zI) ∈ J\n[PROOFSTEP]\nexact J.mul_mem_left _ (h zI hzI)\n[GOAL]\nR : Type u\nι : Type u_1\ninst✝ : CommSemiring R\nI✝ J✝ K L : Ideal R\nx y : R\nI J : Ideal R\n⊢ span {x} * I ≤ span {y} * J ↔ ∀ (zI : R), zI ∈ I → ∃ zJ, zJ ∈ J ∧ x * zI = y * zJ\n[PROOFSTEP]\nsimp only [span_singleton_mul_le_iff, mem_span_singleton_mul, eq_comm]\n[GOAL]\nR : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R\nI J K L : Ideal R\ninst✝ : IsDomain R\nx : R\nhx : x ≠ 0\n⊢ span {x} * I ≤ span {x} * J ↔ I ≤ J\n[PROOFSTEP]\nsimp_rw [span_singleton_mul_le_span_singleton_mul, mul_right_inj' hx, exists_eq_right', SetLike.le_def]\n[GOAL]\nR : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R\nI J K L : Ideal R\ninst✝ : IsDomain R\nx : R\nhx : x ≠ 0\n⊢ I * span {x} ≤ J * span {x} ↔ I ≤ J\n[PROOFSTEP]\nsimpa only [mul_comm I, mul_comm J] using span_singleton_mul_right_mono hx\n[GOAL]\nR : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R\nI J K L : Ideal R\ninst✝ : IsDomain R\nx : R\nhx : x ≠ 0\n⊢ span {x} * I = span {x} * J ↔ I = J\n[PROOFSTEP]\nsimp only [le_antisymm_iff, span_singleton_mul_right_mono hx]\n[GOAL]\nR : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R\nI J K L : Ideal R\ninst✝ : IsDomain R\nx : R\nhx : x ≠ 0\n⊢ I * span {x} = J * span {x} ↔ I = J\n[PROOFSTEP]\nsimp only [le_antisymm_iff, span_singleton_mul_left_mono hx]\n[GOAL]\nR : Type u\nι : Type u_1\ninst✝ : CommSemiring R\nI✝ J✝ K L : Ideal R\nx : R\nI J : Ideal R\n⊢ I = span {x} * J ↔ (∀ (zI : R), zI ∈ I → ∃ zJ, zJ ∈ J ∧ x * zJ = zI) ∧ ∀ (z : R), z ∈ J → x * z ∈ I\n[PROOFSTEP]\nsimp only [le_antisymm_iff, le_span_singleton_mul_iff, span_singleton_mul_le_iff]\n[GOAL]\nR : Type u\nι : Type u_1\ninst✝ : CommSemiring R\nI✝ J✝ K L : Ideal R\nx y : R\nI J : Ideal R\n⊢ span {x} * I = span {y} * J ↔\n    (∀ (zI : R), zI ∈ I → ∃ zJ, zJ ∈ J ∧ x * zI = y * zJ) ∧ ∀ (zJ : R), zJ ∈ J → ∃ zI, zI ∈ I ∧ x * zI = y * zJ\n[PROOFSTEP]\nsimp only [le_antisymm_iff, span_singleton_mul_le_span_singleton_mul, eq_comm]\n[GOAL]\nR : Type u\nι : Type u_1\ninst✝ : CommSemiring R\nI J K L : Ideal R\nm : Multiset R\n⊢ Multiset.prod (Multiset.map (fun x => span {x}) 0) = span {Multiset.prod 0}\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nι : Type u_1\ninst✝ : CommSemiring R\nI J K L : Ideal R\nm✝ : Multiset R\na : R\nm : Multiset R\nih : Multiset.prod (Multiset.map (fun x => span {x}) m) = span {Multiset.prod m}\n⊢ Multiset.prod (Multiset.map (fun x => span {x}) (a ::ₘ m)) = span {Multiset.prod (a ::ₘ m)}\n[PROOFSTEP]\nsimp only [Multiset.map_cons, Multiset.prod_cons, ih, ← Ideal.span_singleton_mul_span_singleton]\n[GOAL]\nR : Type u\nι✝ : Type u_1\ninst✝ : CommSemiring R\nI✝ J K L : Ideal R\nι : Type u_2\ns : Finset ι\nI : ι → R\nhI : Set.Pairwise (↑s) (IsCoprime on I)\n⊢ (Finset.inf s fun i => span {I i}) = span {∏ i in s, I i}\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nR : Type u\nι✝ : Type u_1\ninst✝ : CommSemiring R\nI✝ J K L : Ideal R\nι : Type u_2\ns : Finset ι\nI : ι → R\nhI : Set.Pairwise (↑s) (IsCoprime on I)\nx : R\n⊢ (x ∈ Finset.inf s fun i => span {I i}) ↔ x ∈ span {∏ i in s, I i}\n[PROOFSTEP]\nsimp only [Submodule.mem_finset_inf, Ideal.mem_span_singleton]\n[GOAL]\ncase h\nR : Type u\nι✝ : Type u_1\ninst✝ : CommSemiring R\nI✝ J K L : Ideal R\nι : Type u_2\ns : Finset ι\nI : ι → R\nhI : Set.Pairwise (↑s) (IsCoprime on I)\nx : R\n⊢ (∀ (i : ι), i ∈ s → I i ∣ x) ↔ ∏ i in s, I i ∣ x\n[PROOFSTEP]\nexact ⟨Finset.prod_dvd_of_coprime hI, fun h i hi => (Finset.dvd_prod_of_mem _ hi).trans h⟩\n[GOAL]\nR : Type u\nι✝ : Type u_1\ninst✝¹ : CommSemiring R\nI✝ J K L : Ideal R\nι : Type u_2\ninst✝ : Fintype ι\nI : ι → R\nhI : ∀ (i j : ι), i ≠ j → IsCoprime (I i) (I j)\n⊢ ⨅ (i : ι), span {I i} = span {∏ i : ι, I i}\n[PROOFSTEP]\nrw [← Finset.inf_univ_eq_iInf, finset_inf_span_singleton]\n[GOAL]\ncase hI\nR : Type u\nι✝ : Type u_1\ninst✝¹ : CommSemiring R\nI✝ J K L : Ideal R\nι : Type u_2\ninst✝ : Fintype ι\nI : ι → R\nhI : ∀ (i j : ι), i ≠ j → IsCoprime (I i) (I j)\n⊢ Set.Pairwise (↑Finset.univ) (IsCoprime on fun i => I i)\n[PROOFSTEP]\nrwa [Finset.coe_univ, Set.pairwise_univ]\n[GOAL]\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI J K L : Ideal R✝\nR : Type u_2\ninst✝ : CommSemiring R\nx y : R\n⊢ span {x} ⊔ span {y} = ⊤ ↔ IsCoprime x y\n[PROOFSTEP]\nrw [eq_top_iff_one, Submodule.mem_sup]\n[GOAL]\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI J K L : Ideal R✝\nR : Type u_2\ninst✝ : CommSemiring R\nx y : R\n⊢ (∃ y_1, y_1 ∈ span {x} ∧ ∃ z, z ∈ span {y} ∧ y_1 + z = 1) ↔ IsCoprime x y\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI J K L : Ideal R✝\nR : Type u_2\ninst✝ : CommSemiring R\nx y : R\n⊢ (∃ y_1, y_1 ∈ span {x} ∧ ∃ z, z ∈ span {y} ∧ y_1 + z = 1) → IsCoprime x y\n[PROOFSTEP]\nrintro ⟨u, hu, v, hv, h1⟩\n[GOAL]\ncase mp.intro.intro.intro.intro\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI J K L : Ideal R✝\nR : Type u_2\ninst✝ : CommSemiring R\nx y u : R\nhu : u ∈ span {x}\nv : R\nhv : v ∈ span {y}\nh1 : u + v = 1\n⊢ IsCoprime x y\n[PROOFSTEP]\nrw [mem_span_singleton'] at hu hv \n[GOAL]\ncase mp.intro.intro.intro.intro\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI J K L : Ideal R✝\nR : Type u_2\ninst✝ : CommSemiring R\nx y u : R\nhu : ∃ a, a * x = u\nv : R\nhv : ∃ a, a * y = v\nh1 : u + v = 1\n⊢ IsCoprime x y\n[PROOFSTEP]\nrw [← hu.choose_spec, ← hv.choose_spec] at h1 \n[GOAL]\ncase mp.intro.intro.intro.intro\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI J K L : Ideal R✝\nR : Type u_2\ninst✝ : CommSemiring R\nx y u : R\nhu : ∃ a, a * x = u\nv : R\nhv : ∃ a, a * y = v\nh1 : Exists.choose hu * x + Exists.choose hv * y = 1\n⊢ IsCoprime x y\n[PROOFSTEP]\nexact ⟨_, _, h1⟩\n[GOAL]\ncase mpr\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI J K L : Ideal R✝\nR : Type u_2\ninst✝ : CommSemiring R\nx y : R\n⊢ IsCoprime x y → ∃ y_1, y_1 ∈ span {x} ∧ ∃ z, z ∈ span {y} ∧ y_1 + z = 1\n[PROOFSTEP]\nexact fun ⟨u, v, h1⟩ => ⟨_, mem_span_singleton'.mpr ⟨_, rfl⟩, _, mem_span_singleton'.mpr ⟨_, rfl⟩, h1⟩\n[GOAL]\nR : Type u\nι : Type u_1\ninst✝ : CommSemiring R\nI J K L : Ideal R\ns : Multiset (Ideal R)\n⊢ Multiset.prod s ≤ Multiset.inf s\n[PROOFSTEP]\nclassical\nrefine' s.induction_on _ _\n· rw [Multiset.inf_zero]\n  exact le_top\nintro a s ih\nrw [Multiset.prod_cons, Multiset.inf_cons]\nexact le_trans mul_le_inf (inf_le_inf le_rfl ih)\n[GOAL]\nR : Type u\nι : Type u_1\ninst✝ : CommSemiring R\nI J K L : Ideal R\ns : Multiset (Ideal R)\n⊢ Multiset.prod s ≤ Multiset.inf s\n[PROOFSTEP]\nrefine' s.induction_on _ _\n[GOAL]\ncase refine'_1\nR : Type u\nι : Type u_1\ninst✝ : CommSemiring R\nI J K L : Ideal R\ns : Multiset (Ideal R)\n⊢ Multiset.prod 0 ≤ Multiset.inf 0\n[PROOFSTEP]\nrw [Multiset.inf_zero]\n[GOAL]\ncase refine'_1\nR : Type u\nι : Type u_1\ninst✝ : CommSemiring R\nI J K L : Ideal R\ns : Multiset (Ideal R)\n⊢ Multiset.prod 0 ≤ ⊤\n[PROOFSTEP]\nexact le_top\n[GOAL]\ncase refine'_2\nR : Type u\nι : Type u_1\ninst✝ : CommSemiring R\nI J K L : Ideal R\ns : Multiset (Ideal R)\n⊢ ∀ ⦃a : Ideal R⦄ {s : Multiset (Ideal R)},\n    Multiset.prod s ≤ Multiset.inf s → Multiset.prod (a ::ₘ s) ≤ Multiset.inf (a ::ₘ s)\n[PROOFSTEP]\nintro a s ih\n[GOAL]\ncase refine'_2\nR : Type u\nι : Type u_1\ninst✝ : CommSemiring R\nI J K L : Ideal R\ns✝ : Multiset (Ideal R)\na : Ideal R\ns : Multiset (Ideal R)\nih : Multiset.prod s ≤ Multiset.inf s\n⊢ Multiset.prod (a ::ₘ s) ≤ Multiset.inf (a ::ₘ s)\n[PROOFSTEP]\nrw [Multiset.prod_cons, Multiset.inf_cons]\n[GOAL]\ncase refine'_2\nR : Type u\nι : Type u_1\ninst✝ : CommSemiring R\nI J K L : Ideal R\ns✝ : Multiset (Ideal R)\na : Ideal R\ns : Multiset (Ideal R)\nih : Multiset.prod s ≤ Multiset.inf s\n⊢ a * Multiset.prod s ≤ a ⊓ Multiset.inf s\n[PROOFSTEP]\nexact le_trans mul_le_inf (inf_le_inf le_rfl ih)\n[GOAL]\nR : Type u\nι : Type u_1\ninst✝ : CommSemiring R\nI J K L : Ideal R\nh : I ⊔ J = ⊤\ni : R\nhi : i ∈ I ⊔ K\n⊢ i ∈ I ⊔ J * K\n[PROOFSTEP]\nrw [eq_top_iff_one] at h \n[GOAL]\nR : Type u\nι : Type u_1\ninst✝ : CommSemiring R\nI J K L : Ideal R\nh : 1 ∈ I ⊔ J\ni : R\nhi : i ∈ I ⊔ K\n⊢ i ∈ I ⊔ J * K\n[PROOFSTEP]\nrw [Submodule.mem_sup] at h hi ⊢\n[GOAL]\nR : Type u\nι : Type u_1\ninst✝ : CommSemiring R\nI J K L : Ideal R\nh : ∃ y, y ∈ I ∧ ∃ z, z ∈ J ∧ y + z = 1\ni : R\nhi : ∃ y, y ∈ I ∧ ∃ z, z ∈ K ∧ y + z = i\n⊢ ∃ y, y ∈ I ∧ ∃ z, z ∈ J * K ∧ y + z = i\n[PROOFSTEP]\nobtain ⟨i1, hi1, j, hj, h⟩ := h\n[GOAL]\ncase intro.intro.intro.intro\nR : Type u\nι : Type u_1\ninst✝ : CommSemiring R\nI J K L : Ideal R\ni : R\nhi : ∃ y, y ∈ I ∧ ∃ z, z ∈ K ∧ y + z = i\ni1 : R\nhi1 : i1 ∈ I\nj : R\nhj : j ∈ J\nh : i1 + j = 1\n⊢ ∃ y, y ∈ I ∧ ∃ z, z ∈ J * K ∧ y + z = i\n[PROOFSTEP]\nobtain ⟨i', hi', k, hk, hi⟩ := hi\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nR : Type u\nι : Type u_1\ninst✝ : CommSemiring R\nI J K L : Ideal R\ni i1 : R\nhi1 : i1 ∈ I\nj : R\nhj : j ∈ J\nh : i1 + j = 1\ni' : R\nhi' : i' ∈ I\nk : R\nhk : k ∈ K\nhi : i' + k = i\n⊢ ∃ y, y ∈ I ∧ ∃ z, z ∈ J * K ∧ y + z = i\n[PROOFSTEP]\nrefine' ⟨_, add_mem hi' (mul_mem_right k _ hi1), _, mul_mem_mul hj hk, _⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nR : Type u\nι : Type u_1\ninst✝ : CommSemiring R\nI J K L : Ideal R\ni i1 : R\nhi1 : i1 ∈ I\nj : R\nhj : j ∈ J\nh : i1 + j = 1\ni' : R\nhi' : i' ∈ I\nk : R\nhk : k ∈ K\nhi : i' + k = i\n⊢ i' + i1 * k + j * k = i\n[PROOFSTEP]\nrw [add_assoc, ← add_mul, h, one_mul, hi]\n[GOAL]\nR : Type u\nι : Type u_1\ninst✝ : CommSemiring R\nI J K L : Ideal R\nh : I ⊔ K = ⊤\n⊢ I ⊔ J * K = I ⊔ J\n[PROOFSTEP]\nrw [mul_comm]\n[GOAL]\nR : Type u\nι : Type u_1\ninst✝ : CommSemiring R\nI J K L : Ideal R\nh : I ⊔ K = ⊤\n⊢ I ⊔ K * J = I ⊔ J\n[PROOFSTEP]\nexact sup_mul_eq_of_coprime_left h\n[GOAL]\nR : Type u\nι : Type u_1\ninst✝ : CommSemiring R\nI J K L : Ideal R\nh : I ⊔ J = ⊤\n⊢ I * K ⊔ J = K ⊔ J\n[PROOFSTEP]\nrw [sup_comm] at h \n[GOAL]\nR : Type u\nι : Type u_1\ninst✝ : CommSemiring R\nI J K L : Ideal R\nh : J ⊔ I = ⊤\n⊢ I * K ⊔ J = K ⊔ J\n[PROOFSTEP]\nrw [sup_comm, sup_mul_eq_of_coprime_left h, sup_comm]\n[GOAL]\nR : Type u\nι : Type u_1\ninst✝ : CommSemiring R\nI J K L : Ideal R\nh : K ⊔ J = ⊤\n⊢ I * K ⊔ J = I ⊔ J\n[PROOFSTEP]\nrw [sup_comm] at h \n[GOAL]\nR : Type u\nι : Type u_1\ninst✝ : CommSemiring R\nI J K L : Ideal R\nh : J ⊔ K = ⊤\n⊢ I * K ⊔ J = I ⊔ J\n[PROOFSTEP]\nrw [sup_comm, sup_mul_eq_of_coprime_right h, sup_comm]\n[GOAL]\nR : Type u\nι : Type u_1\ninst✝ : CommSemiring R\nI J✝ K L : Ideal R\ns : Finset ι\nJ : ι → Ideal R\nh : ∀ (i : ι), i ∈ s → I ⊔ J i = ⊤\n⊢ (fun J => I ⊔ J = ⊤) 1\n[PROOFSTEP]\nsimp_rw [one_eq_top, sup_top_eq]\n[GOAL]\nR : Type u\nι : Type u_1\ninst✝ : CommSemiring R\nI J K L : Ideal R\nn : ℕ\nh : I ⊔ J = ⊤\n⊢ I ⊔ J ^ n = ⊤\n[PROOFSTEP]\nrw [← Finset.card_range n, ← Finset.prod_const]\n[GOAL]\nR : Type u\nι : Type u_1\ninst✝ : CommSemiring R\nI J K L : Ideal R\nn : ℕ\nh : I ⊔ J = ⊤\n⊢ I ⊔ ∏ _x in Finset.range n, J = ⊤\n[PROOFSTEP]\nexact sup_prod_eq_top fun _ _ => h\n[GOAL]\nR : Type u\nι : Type u_1\ninst✝ : CommSemiring R\nI J K L : Ideal R\nn : ℕ\nh : I ⊔ J = ⊤\n⊢ I ^ n ⊔ J = ⊤\n[PROOFSTEP]\nrw [← Finset.card_range n, ← Finset.prod_const]\n[GOAL]\nR : Type u\nι : Type u_1\ninst✝ : CommSemiring R\nI J K L : Ideal R\nn : ℕ\nh : I ⊔ J = ⊤\n⊢ (∏ _x in Finset.range n, I) ⊔ J = ⊤\n[PROOFSTEP]\nexact prod_sup_eq_top fun _ _ => h\n[GOAL]\nR : Type u\nι : Type u_1\ninst✝ : CommSemiring R\nI J K L : Ideal R\n⊢ I * ⊥ = ⊥\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nι : Type u_1\ninst✝ : CommSemiring R\nI J K L : Ideal R\n⊢ ⊥ * I = ⊥\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nι : Type u_1\ninst✝ : CommSemiring R\nI J K L : Ideal R\nm n : ℕ\nh : m ≤ n\n⊢ I ^ n ≤ I ^ m\n[PROOFSTEP]\ncases' Nat.exists_eq_add_of_le h with k hk\n[GOAL]\ncase intro\nR : Type u\nι : Type u_1\ninst✝ : CommSemiring R\nI J K L : Ideal R\nm n : ℕ\nh : m ≤ n\nk : ℕ\nhk : n = m + k\n⊢ I ^ n ≤ I ^ m\n[PROOFSTEP]\nrw [hk, pow_add]\n[GOAL]\ncase intro\nR : Type u\nι : Type u_1\ninst✝ : CommSemiring R\nI J K L : Ideal R\nm n : ℕ\nh : m ≤ n\nk : ℕ\nhk : n = m + k\n⊢ I ^ m * I ^ k ≤ I ^ m\n[PROOFSTEP]\nexact le_trans mul_le_inf inf_le_left\n[GOAL]\nR : Type u\nι : Type u_1\ninst✝ : CommSemiring R\nI✝ J✝ K L I J : Ideal R\ne : I ≤ J\nn : ℕ\n⊢ I ^ n ≤ J ^ n\n[PROOFSTEP]\ninduction' n with _ hn\n[GOAL]\ncase zero\nR : Type u\nι : Type u_1\ninst✝ : CommSemiring R\nI✝ J✝ K L I J : Ideal R\ne : I ≤ J\n⊢ I ^ Nat.zero ≤ J ^ Nat.zero\n[PROOFSTEP]\nrw [pow_zero, pow_zero]\n[GOAL]\ncase succ\nR : Type u\nι : Type u_1\ninst✝ : CommSemiring R\nI✝ J✝ K L I J : Ideal R\ne : I ≤ J\nn✝ : ℕ\nhn : I ^ n✝ ≤ J ^ n✝\n⊢ I ^ Nat.succ n✝ ≤ J ^ Nat.succ n✝\n[PROOFSTEP]\nrw [pow_succ, pow_succ]\n[GOAL]\ncase succ\nR : Type u\nι : Type u_1\ninst✝ : CommSemiring R\nI✝ J✝ K L I J : Ideal R\ne : I ≤ J\nn✝ : ℕ\nhn : I ^ n✝ ≤ J ^ n✝\n⊢ I * I ^ n✝ ≤ J * J ^ n✝\n[PROOFSTEP]\nexact Ideal.mul_mono e hn\n[GOAL]\nR✝ : Type u\nι : Type u_1\ninst✝² : CommSemiring R✝\nI✝ J✝ K L : Ideal R✝\nR : Type u_2\ninst✝¹ : CommSemiring R\ninst✝ : NoZeroDivisors R\nI J : Ideal R\nh : I = ⊥ ∨ J = ⊥\n⊢ I * J = ⊥\n[PROOFSTEP]\ncases' h with h h\n[GOAL]\ncase inl\nR✝ : Type u\nι : Type u_1\ninst✝² : CommSemiring R✝\nI✝ J✝ K L : Ideal R✝\nR : Type u_2\ninst✝¹ : CommSemiring R\ninst✝ : NoZeroDivisors R\nI J : Ideal R\nh : I = ⊥\n⊢ I * J = ⊥\n[PROOFSTEP]\nrw [← Ideal.mul_bot, h, Ideal.mul_comm]\n[GOAL]\ncase inr\nR✝ : Type u\nι : Type u_1\ninst✝² : CommSemiring R✝\nI✝ J✝ K L : Ideal R✝\nR : Type u_2\ninst✝¹ : CommSemiring R\ninst✝ : NoZeroDivisors R\nI J : Ideal R\nh : J = ⊥\n⊢ I * J = ⊥\n[PROOFSTEP]\nrw [← Ideal.mul_bot, h, Ideal.mul_comm]\n[GOAL]\nR✝ : Type u\nι : Type u_1\ninst✝² : CommSemiring R✝\nI J K L : Ideal R✝\nR : Type u_2\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\ns : Multiset (Ideal R)\n⊢ Multiset.prod s = ⊥ ↔ ∃ I, I ∈ s ∧ I = ⊥\n[PROOFSTEP]\nrw [bot_eq_zero, prod_zero_iff_exists_zero]\n[GOAL]\nR✝ : Type u\nι : Type u_1\ninst✝² : CommSemiring R✝\nI J K L : Ideal R✝\nR : Type u_2\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\ns : Multiset (Ideal R)\n⊢ (∃ r x, r = 0) ↔ ∃ I, I ∈ s ∧ I = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nι : Type u_1\ninst✝ : CommSemiring R\nI J K L : Ideal R\nw x y z : R\n⊢ span {w, x} * span {y, z} = span {w * y, w * z, x * y, x * z}\n[PROOFSTEP]\nsimp_rw [span_insert, sup_mul, mul_sup, span_singleton_mul_span_singleton, sup_assoc]\n[GOAL]\nR : Type u\nι : Type u_1\ninst✝ : CommSemiring R\nI✝ J K L I : Ideal R\nr s : R\n⊢ s ∈\n      {\n            toAddSubsemigroup :=\n              { carrier := {r | ∃ n, r ^ n ∈ I},\n                add_mem' :=\n                  (_ :\n                    ∀ {x y : R}, x ∈ {r | ∃ n, r ^ n ∈ I} → y ∈ {r | ∃ n, r ^ n ∈ I} → x + y ∈ {r | ∃ n, r ^ n ∈ I}) },\n            zero_mem' := (_ : ∃ n, 0 ^ n ∈ I) }.toAddSubsemigroup.carrier →\n    r • s ∈\n      {\n            toAddSubsemigroup :=\n              { carrier := {r | ∃ n, r ^ n ∈ I},\n                add_mem' :=\n                  (_ :\n                    ∀ {x y : R}, x ∈ {r | ∃ n, r ^ n ∈ I} → y ∈ {r | ∃ n, r ^ n ∈ I} → x + y ∈ {r | ∃ n, r ^ n ∈ I}) },\n            zero_mem' := (_ : ∃ n, 0 ^ n ∈ I) }.toAddSubsemigroup.carrier\n[PROOFSTEP]\nexact fun ⟨n, h⟩ ↦ ⟨n, (mul_pow r s n).symm ▸ I.mul_mem_left (r ^ n) h⟩\n[GOAL]\nR : Type u\nι : Type u_1\ninst✝ : CommSemiring R\nI J K L : Ideal R\n⊢ radical I = I ↔ IsRadical I\n[PROOFSTEP]\nrw [le_antisymm_iff, and_iff_left le_radical, IsRadical]\n[GOAL]\nR : Type u\nι : Type u_1\ninst✝ : CommSemiring R\nI J K L : Ideal R\n⊢ radical (I * J) = radical I ⊓ radical J\n[PROOFSTEP]\nrefine le_antisymm ?_ fun r ⟨⟨m, hrm⟩, ⟨n, hrn⟩⟩ => ⟨m + n, (pow_add r m n).symm ▸ mul_mem_mul hrm hrn⟩\n[GOAL]\nR : Type u\nι : Type u_1\ninst✝ : CommSemiring R\nI J K L : Ideal R\n⊢ radical (I * J) ≤ radical I ⊓ radical J\n[PROOFSTEP]\nhave := radical_mono <| @mul_le_inf _ _ I J\n[GOAL]\nR : Type u\nι : Type u_1\ninst✝ : CommSemiring R\nI J K L : Ideal R\nthis : radical (I * J) ≤ radical (I ⊓ J)\n⊢ radical (I * J) ≤ radical I ⊓ radical J\n[PROOFSTEP]\nsimp_rw [radical_inf I J] at this \n[GOAL]\nR : Type u\nι : Type u_1\ninst✝ : CommSemiring R\nI J K L : Ideal R\nthis : radical (I * J) ≤ radical I ⊓ radical J\n⊢ radical (I * J) ≤ radical I ⊓ radical J\n[PROOFSTEP]\nassumption\n[GOAL]\nR : Type u\nι : Type u_1\ninst✝ : CommSemiring R\nI✝ J K L I : Ideal R\nr : R\nhr : r ∈ sInf {J | I ≤ J ∧ IsPrime J}\nhri : ¬r ∈ radical I\nm : Ideal R\nhrm : ¬r ∈ radical m\nhim : I ≤ m\nhm : ∀ (z : Ideal R), z ∈ {K | ¬r ∈ radical K} → m ≤ z → z = m\nthis : ∀ (x : R), ¬x ∈ m → r ∈ radical (m ⊔ span {x})\n⊢ m ≠ ⊤\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nR : Type u\nι : Type u_1\ninst✝ : CommSemiring R\nI✝ J K L I : Ideal R\nr : R\nhr : r ∈ sInf {J | I ≤ J ∧ IsPrime J}\nhri : ¬r ∈ radical I\nhrm : ¬r ∈ radical ⊤\nhim : I ≤ ⊤\nhm : ∀ (z : Ideal R), z ∈ {K | ¬r ∈ radical K} → ⊤ ≤ z → z = ⊤\nthis : ∀ (x : R), ¬x ∈ ⊤ → r ∈ radical (⊤ ⊔ span {x})\n⊢ False\n[PROOFSTEP]\nrw [radical_top] at hrm \n[GOAL]\nR : Type u\nι : Type u_1\ninst✝ : CommSemiring R\nI✝ J K L I : Ideal R\nr : R\nhr : r ∈ sInf {J | I ≤ J ∧ IsPrime J}\nhri : ¬r ∈ radical I\nhrm : ¬r ∈ ⊤\nhim : I ≤ ⊤\nhm : ∀ (z : Ideal R), z ∈ {K | ¬r ∈ radical K} → ⊤ ≤ z → z = ⊤\nthis : ∀ (x : R), ¬x ∈ ⊤ → r ∈ radical (⊤ ⊔ span {x})\n⊢ False\n[PROOFSTEP]\nexact hrm trivial\n[GOAL]\nR : Type u\nι : Type u_1\ninst✝ : CommSemiring R\nI✝ J K L I : Ideal R\nr : R\nhr : r ∈ sInf {J | I ≤ J ∧ IsPrime J}\nhri : ¬r ∈ radical I\nm : Ideal R\nhrm : ¬r ∈ radical m\nhim : I ≤ m\nhm : ∀ (z : Ideal R), z ∈ {K | ¬r ∈ radical K} → m ≤ z → z = m\nthis : ∀ (x : R), ¬x ∈ m → r ∈ radical (m ⊔ span {x})\nx y : R\nhxym : x * y ∈ m\nhxm : ¬x ∈ m\nhym : ¬y ∈ m\nn : ℕ\nhrn : r ^ n ∈ m ⊔ span {x}\np : R\nhpm : p ∈ m\nq : R\nhq : q ∈ span {x}\nhpqrn : p + q = r ^ n\nc : R\nhcxq : c * x = q\nk : ℕ\nhrk : r ^ k ∈ m ⊔ span {y}\nf : R\nhfm : f ∈ m\ng : R\nhg : g ∈ span {y}\nhfgrk : f + g = r ^ k\nd : R\nhdyg : d * y = g\n⊢ r ^ (n + k) ∈ m\n[PROOFSTEP]\nrw [pow_add, ← hpqrn, ← hcxq, ← hfgrk, ← hdyg, add_mul, mul_add (c * x), mul_assoc c x (d * y), mul_left_comm x, ←\n  mul_assoc]\n[GOAL]\nR : Type u\nι : Type u_1\ninst✝ : CommSemiring R\nI✝ J K L I : Ideal R\nr : R\nhr : r ∈ sInf {J | I ≤ J ∧ IsPrime J}\nhri : ¬r ∈ radical I\nm : Ideal R\nhrm : ¬r ∈ radical m\nhim : I ≤ m\nhm : ∀ (z : Ideal R), z ∈ {K | ¬r ∈ radical K} → m ≤ z → z = m\nthis : ∀ (x : R), ¬x ∈ m → r ∈ radical (m ⊔ span {x})\nx y : R\nhxym : x * y ∈ m\nhxm : ¬x ∈ m\nhym : ¬y ∈ m\nn : ℕ\nhrn : r ^ n ∈ m ⊔ span {x}\np : R\nhpm : p ∈ m\nq : R\nhq : q ∈ span {x}\nhpqrn : p + q = r ^ n\nc : R\nhcxq : c * x = q\nk : ℕ\nhrk : r ^ k ∈ m ⊔ span {y}\nf : R\nhfm : f ∈ m\ng : R\nhg : g ∈ span {y}\nhfgrk : f + g = r ^ k\nd : R\nhdyg : d * y = g\n⊢ p * (f + d * y) + (c * x * f + c * d * (x * y)) ∈ m\n[PROOFSTEP]\nrefine' m.add_mem (m.mul_mem_right _ hpm) (m.add_mem (m.mul_mem_left _ hfm) (m.mul_mem_left _ hxym))\n[GOAL]\nR : Type u\nι : Type u_1\ninst✝ : CommSemiring R\nI J K L : Ideal R\nn✝ n : ℕ\nih : ⊤ ^ n = ⊤\n⊢ ⊤ ^ Nat.succ n = ⊤\n[PROOFSTEP]\nrw [pow_succ, ih, top_mul]\n[GOAL]\nR : Type u\nι : Type u_1\ninst✝ : CommSemiring R\nI J K L : Ideal R\nn : ℕ\nH : n > 0\n⊢ ¬Nat.zero > 0\n[PROOFSTEP]\ndecide\n[GOAL]\nR : Type u\nι : Type u_1\ninst✝ : CommSemiring R\nI J K L : Ideal R\nn✝ : ℕ\nH✝¹ : n✝ > 0\nn : ℕ\nih : n > 0 → radical (I ^ n) = radical I\nH✝ : Nat.succ n > 0\nH : 0 < n\n⊢ radical (I ^ (n + 1)) = radical I ⊓ radical (I ^ n)\n[PROOFSTEP]\nrw [pow_succ]\n[GOAL]\nR : Type u\nι : Type u_1\ninst✝ : CommSemiring R\nI J K L : Ideal R\nn✝ : ℕ\nH✝¹ : n✝ > 0\nn : ℕ\nih : n > 0 → radical (I ^ n) = radical I\nH✝ : Nat.succ n > 0\nH : 0 < n\n⊢ radical (I * I ^ n) = radical I ⊓ radical (I ^ n)\n[PROOFSTEP]\nexact radical_mul _ _\n[GOAL]\nR : Type u\nι : Type u_1\ninst✝ : CommSemiring R\nI J K L : Ideal R\nn✝ : ℕ\nH✝¹ : n✝ > 0\nn : ℕ\nih : n > 0 → radical (I ^ n) = radical I\nH✝ : Nat.succ n > 0\nH : 0 < n\n⊢ radical I ⊓ radical (I ^ n) = radical I ⊓ radical I\n[PROOFSTEP]\nrw [ih H]\n[GOAL]\nR : Type u\nι : Type u_1\ninst✝ : CommSemiring R\nI J K L : Ideal R\ns : Multiset (Ideal R)\nP : Ideal R\nhp : IsPrime P\nhne : s ≠ 0\n⊢ Multiset.prod s ≤ P ↔ ∃ I, I ∈ s ∧ I ≤ P\n[PROOFSTEP]\nsuffices s.prod ≤ P → ∃ I ∈ s, I ≤ P from\n  ⟨this, fun ⟨i, his, hip⟩ => le_trans multiset_prod_le_inf <| le_trans (Multiset.inf_le his) hip⟩\n[GOAL]\nR : Type u\nι : Type u_1\ninst✝ : CommSemiring R\nI J K L : Ideal R\ns : Multiset (Ideal R)\nP : Ideal R\nhp : IsPrime P\nhne : s ≠ 0\n⊢ Multiset.prod s ≤ P → ∃ I, I ∈ s ∧ I ≤ P\n[PROOFSTEP]\nclassical\nobtain ⟨b, hb⟩ : ∃ b, b ∈ s := Multiset.exists_mem_of_ne_zero hne\nobtain ⟨t, rfl⟩ : ∃ t, s = b ::ₘ t\nexact ⟨s.erase b, (Multiset.cons_erase hb).symm⟩\nrefine' t.induction_on _ _\n· simp only [exists_prop, Multiset.cons_zero, Multiset.prod_singleton, Multiset.mem_singleton, exists_eq_left, imp_self]\nintro a s ih h\nrw [Multiset.cons_swap, Multiset.prod_cons, hp.mul_le] at h \nrw [Multiset.cons_swap]\ncases' h with h h\n· exact ⟨a, Multiset.mem_cons_self a _, h⟩\nobtain ⟨I, hI, ih⟩ : ∃ I ∈ b ::ₘ s, I ≤ P := ih h\nexact ⟨I, Multiset.mem_cons_of_mem hI, ih⟩\n[GOAL]\nR : Type u\nι : Type u_1\ninst✝ : CommSemiring R\nI J K L : Ideal R\ns : Multiset (Ideal R)\nP : Ideal R\nhp : IsPrime P\nhne : s ≠ 0\n⊢ Multiset.prod s ≤ P → ∃ I, I ∈ s ∧ I ≤ P\n[PROOFSTEP]\nobtain ⟨b, hb⟩ : ∃ b, b ∈ s := Multiset.exists_mem_of_ne_zero hne\n[GOAL]\ncase intro\nR : Type u\nι : Type u_1\ninst✝ : CommSemiring R\nI J K L : Ideal R\ns : Multiset (Ideal R)\nP : Ideal R\nhp : IsPrime P\nhne : s ≠ 0\nb : Ideal R\nhb : b ∈ s\n⊢ Multiset.prod s ≤ P → ∃ I, I ∈ s ∧ I ≤ P\n[PROOFSTEP]\nobtain ⟨t, rfl⟩ : ∃ t, s = b ::ₘ t\n[GOAL]\nR : Type u\nι : Type u_1\ninst✝ : CommSemiring R\nI J K L : Ideal R\ns : Multiset (Ideal R)\nP : Ideal R\nhp : IsPrime P\nhne : s ≠ 0\nb : Ideal R\nhb : b ∈ s\n⊢ ∃ t, s = b ::ₘ t\ncase intro.intro\nR : Type u\nι : Type u_1\ninst✝ : CommSemiring R\nI J K L P : Ideal R\nhp : IsPrime P\nb : Ideal R\nt : Multiset (Ideal R)\nhne : b ::ₘ t ≠ 0\nhb : b ∈ b ::ₘ t\n⊢ Multiset.prod (b ::ₘ t) ≤ P → ∃ I, I ∈ b ::ₘ t ∧ I ≤ P\n[PROOFSTEP]\nexact ⟨s.erase b, (Multiset.cons_erase hb).symm⟩\n[GOAL]\ncase intro.intro\nR : Type u\nι : Type u_1\ninst✝ : CommSemiring R\nI J K L P : Ideal R\nhp : IsPrime P\nb : Ideal R\nt : Multiset (Ideal R)\nhne : b ::ₘ t ≠ 0\nhb : b ∈ b ::ₘ t\n⊢ Multiset.prod (b ::ₘ t) ≤ P → ∃ I, I ∈ b ::ₘ t ∧ I ≤ P\n[PROOFSTEP]\nrefine' t.induction_on _ _\n[GOAL]\ncase intro.intro.refine'_1\nR : Type u\nι : Type u_1\ninst✝ : CommSemiring R\nI J K L P : Ideal R\nhp : IsPrime P\nb : Ideal R\nt : Multiset (Ideal R)\nhne : b ::ₘ t ≠ 0\nhb : b ∈ b ::ₘ t\n⊢ Multiset.prod (b ::ₘ 0) ≤ P → ∃ I, I ∈ b ::ₘ 0 ∧ I ≤ P\n[PROOFSTEP]\nsimp only [exists_prop, Multiset.cons_zero, Multiset.prod_singleton, Multiset.mem_singleton, exists_eq_left, imp_self]\n[GOAL]\ncase intro.intro.refine'_2\nR : Type u\nι : Type u_1\ninst✝ : CommSemiring R\nI J K L P : Ideal R\nhp : IsPrime P\nb : Ideal R\nt : Multiset (Ideal R)\nhne : b ::ₘ t ≠ 0\nhb : b ∈ b ::ₘ t\n⊢ ∀ ⦃a : Ideal R⦄ {s : Multiset (Ideal R)},\n    (Multiset.prod (b ::ₘ s) ≤ P → ∃ I, I ∈ b ::ₘ s ∧ I ≤ P) →\n      Multiset.prod (b ::ₘ a ::ₘ s) ≤ P → ∃ I, I ∈ b ::ₘ a ::ₘ s ∧ I ≤ P\n[PROOFSTEP]\nintro a s ih h\n[GOAL]\ncase intro.intro.refine'_2\nR : Type u\nι : Type u_1\ninst✝ : CommSemiring R\nI J K L P : Ideal R\nhp : IsPrime P\nb : Ideal R\nt : Multiset (Ideal R)\nhne : b ::ₘ t ≠ 0\nhb : b ∈ b ::ₘ t\na : Ideal R\ns : Multiset (Ideal R)\nih : Multiset.prod (b ::ₘ s) ≤ P → ∃ I, I ∈ b ::ₘ s ∧ I ≤ P\nh : Multiset.prod (b ::ₘ a ::ₘ s) ≤ P\n⊢ ∃ I, I ∈ b ::ₘ a ::ₘ s ∧ I ≤ P\n[PROOFSTEP]\nrw [Multiset.cons_swap, Multiset.prod_cons, hp.mul_le] at h \n[GOAL]\ncase intro.intro.refine'_2\nR : Type u\nι : Type u_1\ninst✝ : CommSemiring R\nI J K L P : Ideal R\nhp : IsPrime P\nb : Ideal R\nt : Multiset (Ideal R)\nhne : b ::ₘ t ≠ 0\nhb : b ∈ b ::ₘ t\na : Ideal R\ns : Multiset (Ideal R)\nih : Multiset.prod (b ::ₘ s) ≤ P → ∃ I, I ∈ b ::ₘ s ∧ I ≤ P\nh : a ≤ P ∨ Multiset.prod (b ::ₘ s) ≤ P\n⊢ ∃ I, I ∈ b ::ₘ a ::ₘ s ∧ I ≤ P\n[PROOFSTEP]\nrw [Multiset.cons_swap]\n[GOAL]\ncase intro.intro.refine'_2\nR : Type u\nι : Type u_1\ninst✝ : CommSemiring R\nI J K L P : Ideal R\nhp : IsPrime P\nb : Ideal R\nt : Multiset (Ideal R)\nhne : b ::ₘ t ≠ 0\nhb : b ∈ b ::ₘ t\na : Ideal R\ns : Multiset (Ideal R)\nih : Multiset.prod (b ::ₘ s) ≤ P → ∃ I, I ∈ b ::ₘ s ∧ I ≤ P\nh : a ≤ P ∨ Multiset.prod (b ::ₘ s) ≤ P\n⊢ ∃ I, I ∈ a ::ₘ b ::ₘ s ∧ I ≤ P\n[PROOFSTEP]\ncases' h with h h\n[GOAL]\ncase intro.intro.refine'_2.inl\nR : Type u\nι : Type u_1\ninst✝ : CommSemiring R\nI J K L P : Ideal R\nhp : IsPrime P\nb : Ideal R\nt : Multiset (Ideal R)\nhne : b ::ₘ t ≠ 0\nhb : b ∈ b ::ₘ t\na : Ideal R\ns : Multiset (Ideal R)\nih : Multiset.prod (b ::ₘ s) ≤ P → ∃ I, I ∈ b ::ₘ s ∧ I ≤ P\nh : a ≤ P\n⊢ ∃ I, I ∈ a ::ₘ b ::ₘ s ∧ I ≤ P\n[PROOFSTEP]\nexact ⟨a, Multiset.mem_cons_self a _, h⟩\n[GOAL]\ncase intro.intro.refine'_2.inr\nR : Type u\nι : Type u_1\ninst✝ : CommSemiring R\nI J K L P : Ideal R\nhp : IsPrime P\nb : Ideal R\nt : Multiset (Ideal R)\nhne : b ::ₘ t ≠ 0\nhb : b ∈ b ::ₘ t\na : Ideal R\ns : Multiset (Ideal R)\nih : Multiset.prod (b ::ₘ s) ≤ P → ∃ I, I ∈ b ::ₘ s ∧ I ≤ P\nh : Multiset.prod (b ::ₘ s) ≤ P\n⊢ ∃ I, I ∈ a ::ₘ b ::ₘ s ∧ I ≤ P\n[PROOFSTEP]\nobtain ⟨I, hI, ih⟩ : ∃ I ∈ b ::ₘ s, I ≤ P := ih h\n[GOAL]\ncase intro.intro.refine'_2.inr.intro.intro\nR : Type u\nι : Type u_1\ninst✝ : CommSemiring R\nI✝ J K L P : Ideal R\nhp : IsPrime P\nb : Ideal R\nt : Multiset (Ideal R)\nhne : b ::ₘ t ≠ 0\nhb : b ∈ b ::ₘ t\na : Ideal R\ns : Multiset (Ideal R)\nih✝ : Multiset.prod (b ::ₘ s) ≤ P → ∃ I, I ∈ b ::ₘ s ∧ I ≤ P\nh : Multiset.prod (b ::ₘ s) ≤ P\nI : Ideal R\nhI : I ∈ b ::ₘ s\nih : I ≤ P\n⊢ ∃ I, I ∈ a ::ₘ b ::ₘ s ∧ I ≤ P\n[PROOFSTEP]\nexact ⟨I, Multiset.mem_cons_of_mem hI, ih⟩\n[GOAL]\nR : Type u\nι : Type u_1\ninst✝ : CommSemiring R\nI J K L : Ideal R\ns : Multiset ι\nf : ι → Ideal R\nP : Ideal R\nhp : IsPrime P\nhne : s ≠ 0\n⊢ Multiset.prod (Multiset.map f s) ≤ P ↔ ∃ i, i ∈ s ∧ f i ≤ P\n[PROOFSTEP]\nrw [hp.multiset_prod_le (mt Multiset.map_eq_zero.mp hne)]\n[GOAL]\nR : Type u\nι : Type u_1\ninst✝ : CommSemiring R\nI J K L : Ideal R\ns : Multiset ι\nf : ι → Ideal R\nP : Ideal R\nhp : IsPrime P\nhne : s ≠ 0\n⊢ (∃ I, I ∈ Multiset.map f s ∧ I ≤ P) ↔ ∃ i, i ∈ s ∧ f i ≤ P\n[PROOFSTEP]\nsimp_rw [Multiset.mem_map, exists_exists_and_eq_and]\n[GOAL]\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns : Finset ι\nf : ι → Ideal R\na b : ι\nhp : ∀ (i : ι), i ∈ s → IsPrime (f i)\nI : Ideal R\n⊢ ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i) ↔ I ≤ f a ∨ I ≤ f b ∨ ∃ i, i ∈ s ∧ I ≤ f i\n[PROOFSTEP]\nsuffices ((I : Set R) ⊆ f a ∪ f b ∪ ⋃ i ∈ (↑s : Set ι), f i) → I ≤ f a ∨ I ≤ f b ∨ ∃ i ∈ s, I ≤ f i from\n  ⟨this, fun h =>\n    Or.casesOn h\n      (fun h => Set.Subset.trans h <| Set.Subset.trans (Set.subset_union_left _ _) (Set.subset_union_left _ _)) fun h =>\n      Or.casesOn h\n        (fun h => Set.Subset.trans h <| Set.Subset.trans (Set.subset_union_right _ _) (Set.subset_union_left _ _))\n        fun ⟨i, his, hi⟩ => by refine' Set.Subset.trans hi <| Set.Subset.trans _ <| Set.subset_union_right _ _;\n        exact Set.subset_biUnion_of_mem (u := fun x ↦ (f x : Set R)) (Finset.mem_coe.2 his)⟩\n[GOAL]\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns : Finset ι\nf : ι → Ideal R\na b : ι\nhp : ∀ (i : ι), i ∈ s → IsPrime (f i)\nI : Ideal R\nthis : ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i) → I ≤ f a ∨ I ≤ f b ∨ ∃ i, i ∈ s ∧ I ≤ f i\nh✝ : I ≤ f a ∨ I ≤ f b ∨ ∃ i, i ∈ s ∧ I ≤ f i\nh : I ≤ f b ∨ ∃ i, i ∈ s ∧ I ≤ f i\nx✝ : ∃ i, i ∈ s ∧ I ≤ f i\ni : ι\nhis : i ∈ s\nhi : I ≤ f i\n⊢ ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i)\n[PROOFSTEP]\nrefine' Set.Subset.trans hi <| Set.Subset.trans _ <| Set.subset_union_right _ _\n[GOAL]\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns : Finset ι\nf : ι → Ideal R\na b : ι\nhp : ∀ (i : ι), i ∈ s → IsPrime (f i)\nI : Ideal R\nthis : ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i) → I ≤ f a ∨ I ≤ f b ∨ ∃ i, i ∈ s ∧ I ≤ f i\nh✝ : I ≤ f a ∨ I ≤ f b ∨ ∃ i, i ∈ s ∧ I ≤ f i\nh : I ≤ f b ∨ ∃ i, i ∈ s ∧ I ≤ f i\nx✝ : ∃ i, i ∈ s ∧ I ≤ f i\ni : ι\nhis : i ∈ s\nhi : I ≤ f i\n⊢ ↑(f i) ⊆ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i)\n[PROOFSTEP]\nexact Set.subset_biUnion_of_mem (u := fun x ↦ (f x : Set R)) (Finset.mem_coe.2 his)\n[GOAL]\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns : Finset ι\nf : ι → Ideal R\na b : ι\nhp : ∀ (i : ι), i ∈ s → IsPrime (f i)\nI : Ideal R\n⊢ ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i) → I ≤ f a ∨ I ≤ f b ∨ ∃ i, i ∈ s ∧ I ≤ f i\n[PROOFSTEP]\ngeneralize hn : s.card = n\n[GOAL]\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns : Finset ι\nf : ι → Ideal R\na b : ι\nhp : ∀ (i : ι), i ∈ s → IsPrime (f i)\nI : Ideal R\nn : ℕ\nhn : Finset.card s = n\n⊢ ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i) → I ≤ f a ∨ I ≤ f b ∨ ∃ i, i ∈ s ∧ I ≤ f i\n[PROOFSTEP]\nintro h\n[GOAL]\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns : Finset ι\nf : ι → Ideal R\na b : ι\nhp : ∀ (i : ι), i ∈ s → IsPrime (f i)\nI : Ideal R\nn : ℕ\nhn : Finset.card s = n\nh : ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i)\n⊢ I ≤ f a ∨ I ≤ f b ∨ ∃ i, i ∈ s ∧ I ≤ f i\n[PROOFSTEP]\ninduction' n with n ih generalizing a b s\n[GOAL]\ncase zero\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns✝ : Finset ι\nf : ι → Ideal R\na✝ b✝ : ι\nhp✝ : ∀ (i : ι), i ∈ s✝ → IsPrime (f i)\nI : Ideal R\nn : ℕ\nhn✝ : Finset.card s✝ = n\nh✝ : ↑I ⊆ ↑(f a✝) ∪ ↑(f b✝) ∪ ⋃ (i : ι) (_ : i ∈ ↑s✝), ↑(f i)\ns : Finset ι\na b : ι\nhp : ∀ (i : ι), i ∈ s → IsPrime (f i)\nhn : Finset.card s = Nat.zero\nh : ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i)\n⊢ I ≤ f a ∨ I ≤ f b ∨ ∃ i, i ∈ s ∧ I ≤ f i\n[PROOFSTEP]\nclear hp\n[GOAL]\ncase zero\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns✝ : Finset ι\nf : ι → Ideal R\na✝ b✝ : ι\nhp : ∀ (i : ι), i ∈ s✝ → IsPrime (f i)\nI : Ideal R\nn : ℕ\nhn✝ : Finset.card s✝ = n\nh✝ : ↑I ⊆ ↑(f a✝) ∪ ↑(f b✝) ∪ ⋃ (i : ι) (_ : i ∈ ↑s✝), ↑(f i)\ns : Finset ι\na b : ι\nhn : Finset.card s = Nat.zero\nh : ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i)\n⊢ I ≤ f a ∨ I ≤ f b ∨ ∃ i, i ∈ s ∧ I ≤ f i\n[PROOFSTEP]\nrw [Finset.card_eq_zero] at hn \n[GOAL]\ncase zero\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns✝ : Finset ι\nf : ι → Ideal R\na✝ b✝ : ι\nhp : ∀ (i : ι), i ∈ s✝ → IsPrime (f i)\nI : Ideal R\nn : ℕ\nhn✝ : Finset.card s✝ = n\nh✝ : ↑I ⊆ ↑(f a✝) ∪ ↑(f b✝) ∪ ⋃ (i : ι) (_ : i ∈ ↑s✝), ↑(f i)\ns : Finset ι\na b : ι\nhn : s = ∅\nh : ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i)\n⊢ I ≤ f a ∨ I ≤ f b ∨ ∃ i, i ∈ s ∧ I ≤ f i\n[PROOFSTEP]\nsubst hn\n[GOAL]\ncase zero\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns : Finset ι\nf : ι → Ideal R\na✝ b✝ : ι\nhp : ∀ (i : ι), i ∈ s → IsPrime (f i)\nI : Ideal R\nn : ℕ\nhn : Finset.card s = n\nh✝ : ↑I ⊆ ↑(f a✝) ∪ ↑(f b✝) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i)\na b : ι\nh : ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i : ι) (_ : i ∈ ↑∅), ↑(f i)\n⊢ I ≤ f a ∨ I ≤ f b ∨ ∃ i, i ∈ ∅ ∧ I ≤ f i\n[PROOFSTEP]\nrw [Finset.coe_empty, Set.biUnion_empty, Set.union_empty, subset_union] at h \n[GOAL]\ncase zero\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns : Finset ι\nf : ι → Ideal R\na✝ b✝ : ι\nhp : ∀ (i : ι), i ∈ s → IsPrime (f i)\nI : Ideal R\nn : ℕ\nhn : Finset.card s = n\nh✝ : ↑I ⊆ ↑(f a✝) ∪ ↑(f b✝) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i)\na b : ι\nh : I ≤ f a ∨ I ≤ f b\n⊢ I ≤ f a ∨ I ≤ f b ∨ ∃ i, i ∈ ∅ ∧ I ≤ f i\n[PROOFSTEP]\nsimpa only [exists_prop, Finset.not_mem_empty, false_and_iff, exists_false, or_false_iff]\n[GOAL]\ncase succ\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns✝ : Finset ι\nf : ι → Ideal R\na✝ b✝ : ι\nhp✝ : ∀ (i : ι), i ∈ s✝ → IsPrime (f i)\nI : Ideal R\nn✝ : ℕ\nhn✝ : Finset.card s✝ = n✝\nh✝ : ↑I ⊆ ↑(f a✝) ∪ ↑(f b✝) ∪ ⋃ (i : ι) (_ : i ∈ ↑s✝), ↑(f i)\nn : ℕ\nih :\n  ∀ {s : Finset ι} {a b : ι},\n    (∀ (i : ι), i ∈ s → IsPrime (f i)) →\n      Finset.card s = n →\n        ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i) → I ≤ f a ∨ I ≤ f b ∨ ∃ i, i ∈ s ∧ I ≤ f i\ns : Finset ι\na b : ι\nhp : ∀ (i : ι), i ∈ s → IsPrime (f i)\nhn : Finset.card s = Nat.succ n\nh : ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i)\n⊢ I ≤ f a ∨ I ≤ f b ∨ ∃ i, i ∈ s ∧ I ≤ f i\n[PROOFSTEP]\nclassical\nreplace hn : ∃ (i : ι) (t : Finset ι), i ∉ t ∧ insert i t = s ∧ t.card = n := Finset.card_eq_succ.1 hn\nrcases hn with ⟨i, t, hit, rfl, hn⟩\nreplace hp : IsPrime (f i) ∧ ∀ x ∈ t, IsPrime (f x) := (t.forall_mem_insert _ _).1 hp\nby_cases Ht : ∃ j ∈ t, f j ≤ f i\n· obtain ⟨j, hjt, hfji⟩ : ∃ j ∈ t, f j ≤ f i := Ht\n  obtain ⟨u, hju, rfl⟩ : ∃ u, j ∉ u ∧ insert j u = t := ⟨t.erase j, t.not_mem_erase j, Finset.insert_erase hjt⟩\n  have hp' : ∀ k ∈ insert i u, IsPrime (f k) :=\n    by\n    rw [Finset.forall_mem_insert] at hp ⊢\n    exact ⟨hp.1, hp.2.2⟩\n  have hiu : i ∉ u := mt Finset.mem_insert_of_mem hit\n  have hn' : (insert i u).card = n := by\n    rwa [Finset.card_insert_of_not_mem] at hn ⊢\n    exacts [hiu, hju]\n  have h' : (I : Set R) ⊆ f a ∪ f b ∪ ⋃ k ∈ (↑(insert i u) : Set ι), f k :=\n    by\n    rw [Finset.coe_insert] at h ⊢\n    rw [Finset.coe_insert] at h \n    simp only [Set.biUnion_insert] at h ⊢\n    rw [← Set.union_assoc (f i : Set R)] at h \n    erw [Set.union_eq_self_of_subset_right hfji] at h \n    exact h\n  specialize ih hp' hn' h'\n  refine' ih.imp id (Or.imp id (Exists.imp fun k => _))\n  exact And.imp (fun hk => Finset.insert_subset_insert i (Finset.subset_insert j u) hk) id\nby_cases Ha : f a ≤ f i\n· have h' : (I : Set R) ⊆ f i ∪ f b ∪ ⋃ j ∈ (↑t : Set ι), f j :=\n    by\n    rw [Finset.coe_insert, Set.biUnion_insert, ← Set.union_assoc, Set.union_right_comm (f a : Set R)] at h \n    erw [Set.union_eq_self_of_subset_left Ha] at h \n    exact h\n  specialize ih hp.2 hn h'\n  right\n  rcases ih with (ih | ih | ⟨k, hkt, ih⟩)\n  · exact Or.inr ⟨i, Finset.mem_insert_self i t, ih⟩\n  · exact Or.inl ih\n  · exact Or.inr ⟨k, Finset.mem_insert_of_mem hkt, ih⟩\nby_cases Hb : f b ≤ f i\n· have h' : (I : Set R) ⊆ f a ∪ f i ∪ ⋃ j ∈ (↑t : Set ι), f j :=\n    by\n    rw [Finset.coe_insert, Set.biUnion_insert, ← Set.union_assoc, Set.union_assoc (f a : Set R)] at h \n    erw [Set.union_eq_self_of_subset_left Hb] at h \n    exact h\n  specialize ih hp.2 hn h'\n  rcases ih with (ih | ih | ⟨k, hkt, ih⟩)\n  · exact Or.inl ih\n  · exact Or.inr (Or.inr ⟨i, Finset.mem_insert_self i t, ih⟩)\n  · exact Or.inr (Or.inr ⟨k, Finset.mem_insert_of_mem hkt, ih⟩)\nby_cases Hi : I ≤ f i\n· exact Or.inr (Or.inr ⟨i, Finset.mem_insert_self i t, Hi⟩)\nhave : ¬I ⊓ f a ⊓ f b ⊓ t.inf f ≤ f i :=\n  by\n  rcases t.eq_empty_or_nonempty with (rfl | hsne)\n  · rw [Finset.inf_empty, inf_top_eq, hp.1.inf_le, hp.1.inf_le, not_or, not_or]\n    exact ⟨⟨Hi, Ha⟩, Hb⟩\n  simp only [hp.1.inf_le, hp.1.inf_le' hsne, not_or]\n  exact ⟨⟨⟨Hi, Ha⟩, Hb⟩, Ht⟩\nrcases Set.not_subset.1 this with ⟨r, ⟨⟨⟨hrI, hra⟩, hrb⟩, hr⟩, hri⟩\nby_cases HI : (I : Set R) ⊆ f a ∪ f b ∪ ⋃ j ∈ (↑t : Set ι), f j\n· specialize ih hp.2 hn HI\n  rcases ih with (ih | ih | ⟨k, hkt, ih⟩)\n  · left\n    exact ih\n  · right\n    left\n    exact ih\n  · right\n    right\n    exact ⟨k, Finset.mem_insert_of_mem hkt, ih⟩\nexfalso\nrcases Set.not_subset.1 HI with ⟨s, hsI, hs⟩\nrw [Finset.coe_insert, Set.biUnion_insert] at h \nhave hsi : s ∈ f i := ((h hsI).resolve_left (mt Or.inl hs)).resolve_right (mt Or.inr hs)\nrcases h (I.add_mem hrI hsI) with (⟨ha | hb⟩ | hi | ht)\n· exact hs (Or.inl <| Or.inl <| add_sub_cancel' r s ▸ (f a).sub_mem ha hra)\n· exact hs (Or.inl <| Or.inr <| add_sub_cancel' r s ▸ (f b).sub_mem hb hrb)\n· exact hri (add_sub_cancel r s ▸ (f i).sub_mem hi hsi)\n· rw [Set.mem_iUnion₂] at ht \n  rcases ht with ⟨j, hjt, hj⟩\n  simp only [Finset.inf_eq_iInf, SetLike.mem_coe, Submodule.mem_iInf] at hr \n  exact hs (Or.inr <| Set.mem_biUnion hjt <| add_sub_cancel' r s ▸ (f j).sub_mem hj <| hr j hjt)\n[GOAL]\ncase succ\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns✝ : Finset ι\nf : ι → Ideal R\na✝ b✝ : ι\nhp✝ : ∀ (i : ι), i ∈ s✝ → IsPrime (f i)\nI : Ideal R\nn✝ : ℕ\nhn✝ : Finset.card s✝ = n✝\nh✝ : ↑I ⊆ ↑(f a✝) ∪ ↑(f b✝) ∪ ⋃ (i : ι) (_ : i ∈ ↑s✝), ↑(f i)\nn : ℕ\nih :\n  ∀ {s : Finset ι} {a b : ι},\n    (∀ (i : ι), i ∈ s → IsPrime (f i)) →\n      Finset.card s = n →\n        ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i) → I ≤ f a ∨ I ≤ f b ∨ ∃ i, i ∈ s ∧ I ≤ f i\ns : Finset ι\na b : ι\nhp : ∀ (i : ι), i ∈ s → IsPrime (f i)\nhn : Finset.card s = Nat.succ n\nh : ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i)\n⊢ I ≤ f a ∨ I ≤ f b ∨ ∃ i, i ∈ s ∧ I ≤ f i\n[PROOFSTEP]\nreplace hn : ∃ (i : ι) (t : Finset ι), i ∉ t ∧ insert i t = s ∧ t.card = n := Finset.card_eq_succ.1 hn\n[GOAL]\ncase succ\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns✝ : Finset ι\nf : ι → Ideal R\na✝ b✝ : ι\nhp✝ : ∀ (i : ι), i ∈ s✝ → IsPrime (f i)\nI : Ideal R\nn✝ : ℕ\nhn✝ : Finset.card s✝ = n✝\nh✝ : ↑I ⊆ ↑(f a✝) ∪ ↑(f b✝) ∪ ⋃ (i : ι) (_ : i ∈ ↑s✝), ↑(f i)\nn : ℕ\nih :\n  ∀ {s : Finset ι} {a b : ι},\n    (∀ (i : ι), i ∈ s → IsPrime (f i)) →\n      Finset.card s = n →\n        ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i) → I ≤ f a ∨ I ≤ f b ∨ ∃ i, i ∈ s ∧ I ≤ f i\ns : Finset ι\na b : ι\nhp : ∀ (i : ι), i ∈ s → IsPrime (f i)\nh : ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i)\nhn : ∃ i t, ¬i ∈ t ∧ insert i t = s ∧ Finset.card t = n\n⊢ I ≤ f a ∨ I ≤ f b ∨ ∃ i, i ∈ s ∧ I ≤ f i\n[PROOFSTEP]\nrcases hn with ⟨i, t, hit, rfl, hn⟩\n[GOAL]\ncase succ.intro.intro.intro.intro\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns : Finset ι\nf : ι → Ideal R\na✝ b✝ : ι\nhp✝ : ∀ (i : ι), i ∈ s → IsPrime (f i)\nI : Ideal R\nn✝ : ℕ\nhn✝ : Finset.card s = n✝\nh✝ : ↑I ⊆ ↑(f a✝) ∪ ↑(f b✝) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i)\nn : ℕ\nih :\n  ∀ {s : Finset ι} {a b : ι},\n    (∀ (i : ι), i ∈ s → IsPrime (f i)) →\n      Finset.card s = n →\n        ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i) → I ≤ f a ∨ I ≤ f b ∨ ∃ i, i ∈ s ∧ I ≤ f i\na b i : ι\nt : Finset ι\nhit : ¬i ∈ t\nhn : Finset.card t = n\nhp : ∀ (i_1 : ι), i_1 ∈ insert i t → IsPrime (f i_1)\nh : ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i_1 : ι) (_ : i_1 ∈ ↑(insert i t)), ↑(f i_1)\n⊢ I ≤ f a ∨ I ≤ f b ∨ ∃ i_1, i_1 ∈ insert i t ∧ I ≤ f i_1\n[PROOFSTEP]\nreplace hp : IsPrime (f i) ∧ ∀ x ∈ t, IsPrime (f x) := (t.forall_mem_insert _ _).1 hp\n[GOAL]\ncase succ.intro.intro.intro.intro\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns : Finset ι\nf : ι → Ideal R\na✝ b✝ : ι\nhp✝ : ∀ (i : ι), i ∈ s → IsPrime (f i)\nI : Ideal R\nn✝ : ℕ\nhn✝ : Finset.card s = n✝\nh✝ : ↑I ⊆ ↑(f a✝) ∪ ↑(f b✝) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i)\nn : ℕ\nih :\n  ∀ {s : Finset ι} {a b : ι},\n    (∀ (i : ι), i ∈ s → IsPrime (f i)) →\n      Finset.card s = n →\n        ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i) → I ≤ f a ∨ I ≤ f b ∨ ∃ i, i ∈ s ∧ I ≤ f i\na b i : ι\nt : Finset ι\nhit : ¬i ∈ t\nhn : Finset.card t = n\nh : ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i_1 : ι) (_ : i_1 ∈ ↑(insert i t)), ↑(f i_1)\nhp : IsPrime (f i) ∧ ∀ (x : ι), x ∈ t → IsPrime (f x)\n⊢ I ≤ f a ∨ I ≤ f b ∨ ∃ i_1, i_1 ∈ insert i t ∧ I ≤ f i_1\n[PROOFSTEP]\nby_cases Ht : ∃ j ∈ t, f j ≤ f i\n[GOAL]\ncase pos\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns : Finset ι\nf : ι → Ideal R\na✝ b✝ : ι\nhp✝ : ∀ (i : ι), i ∈ s → IsPrime (f i)\nI : Ideal R\nn✝ : ℕ\nhn✝ : Finset.card s = n✝\nh✝ : ↑I ⊆ ↑(f a✝) ∪ ↑(f b✝) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i)\nn : ℕ\nih :\n  ∀ {s : Finset ι} {a b : ι},\n    (∀ (i : ι), i ∈ s → IsPrime (f i)) →\n      Finset.card s = n →\n        ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i) → I ≤ f a ∨ I ≤ f b ∨ ∃ i, i ∈ s ∧ I ≤ f i\na b i : ι\nt : Finset ι\nhit : ¬i ∈ t\nhn : Finset.card t = n\nh : ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i_1 : ι) (_ : i_1 ∈ ↑(insert i t)), ↑(f i_1)\nhp : IsPrime (f i) ∧ ∀ (x : ι), x ∈ t → IsPrime (f x)\nHt : ∃ j, j ∈ t ∧ f j ≤ f i\n⊢ I ≤ f a ∨ I ≤ f b ∨ ∃ i_1, i_1 ∈ insert i t ∧ I ≤ f i_1\n[PROOFSTEP]\nobtain ⟨j, hjt, hfji⟩ : ∃ j ∈ t, f j ≤ f i := Ht\n[GOAL]\ncase pos.intro.intro\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns : Finset ι\nf : ι → Ideal R\na✝ b✝ : ι\nhp✝ : ∀ (i : ι), i ∈ s → IsPrime (f i)\nI : Ideal R\nn✝ : ℕ\nhn✝ : Finset.card s = n✝\nh✝ : ↑I ⊆ ↑(f a✝) ∪ ↑(f b✝) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i)\nn : ℕ\nih :\n  ∀ {s : Finset ι} {a b : ι},\n    (∀ (i : ι), i ∈ s → IsPrime (f i)) →\n      Finset.card s = n →\n        ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i) → I ≤ f a ∨ I ≤ f b ∨ ∃ i, i ∈ s ∧ I ≤ f i\na b i : ι\nt : Finset ι\nhit : ¬i ∈ t\nhn : Finset.card t = n\nh : ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i_1 : ι) (_ : i_1 ∈ ↑(insert i t)), ↑(f i_1)\nhp : IsPrime (f i) ∧ ∀ (x : ι), x ∈ t → IsPrime (f x)\nj : ι\nhjt : j ∈ t\nhfji : f j ≤ f i\n⊢ I ≤ f a ∨ I ≤ f b ∨ ∃ i_1, i_1 ∈ insert i t ∧ I ≤ f i_1\n[PROOFSTEP]\nobtain ⟨u, hju, rfl⟩ : ∃ u, j ∉ u ∧ insert j u = t := ⟨t.erase j, t.not_mem_erase j, Finset.insert_erase hjt⟩\n[GOAL]\ncase pos.intro.intro.intro.intro\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns : Finset ι\nf : ι → Ideal R\na✝ b✝ : ι\nhp✝ : ∀ (i : ι), i ∈ s → IsPrime (f i)\nI : Ideal R\nn✝ : ℕ\nhn✝ : Finset.card s = n✝\nh✝ : ↑I ⊆ ↑(f a✝) ∪ ↑(f b✝) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i)\nn : ℕ\nih :\n  ∀ {s : Finset ι} {a b : ι},\n    (∀ (i : ι), i ∈ s → IsPrime (f i)) →\n      Finset.card s = n →\n        ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i) → I ≤ f a ∨ I ≤ f b ∨ ∃ i, i ∈ s ∧ I ≤ f i\na b i j : ι\nhfji : f j ≤ f i\nu : Finset ι\nhju : ¬j ∈ u\nhit : ¬i ∈ insert j u\nhn : Finset.card (insert j u) = n\nh : ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i_1 : ι) (_ : i_1 ∈ ↑(insert i (insert j u))), ↑(f i_1)\nhp : IsPrime (f i) ∧ ∀ (x : ι), x ∈ insert j u → IsPrime (f x)\nhjt : j ∈ insert j u\n⊢ I ≤ f a ∨ I ≤ f b ∨ ∃ i_1, i_1 ∈ insert i (insert j u) ∧ I ≤ f i_1\n[PROOFSTEP]\nhave hp' : ∀ k ∈ insert i u, IsPrime (f k) :=\n  by\n  rw [Finset.forall_mem_insert] at hp ⊢\n  exact ⟨hp.1, hp.2.2⟩\n[GOAL]\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns : Finset ι\nf : ι → Ideal R\na✝ b✝ : ι\nhp✝ : ∀ (i : ι), i ∈ s → IsPrime (f i)\nI : Ideal R\nn✝ : ℕ\nhn✝ : Finset.card s = n✝\nh✝ : ↑I ⊆ ↑(f a✝) ∪ ↑(f b✝) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i)\nn : ℕ\nih :\n  ∀ {s : Finset ι} {a b : ι},\n    (∀ (i : ι), i ∈ s → IsPrime (f i)) →\n      Finset.card s = n →\n        ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i) → I ≤ f a ∨ I ≤ f b ∨ ∃ i, i ∈ s ∧ I ≤ f i\na b i j : ι\nhfji : f j ≤ f i\nu : Finset ι\nhju : ¬j ∈ u\nhit : ¬i ∈ insert j u\nhn : Finset.card (insert j u) = n\nh : ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i_1 : ι) (_ : i_1 ∈ ↑(insert i (insert j u))), ↑(f i_1)\nhp : IsPrime (f i) ∧ ∀ (x : ι), x ∈ insert j u → IsPrime (f x)\nhjt : j ∈ insert j u\n⊢ ∀ (k : ι), k ∈ insert i u → IsPrime (f k)\n[PROOFSTEP]\nrw [Finset.forall_mem_insert] at hp ⊢\n[GOAL]\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns : Finset ι\nf : ι → Ideal R\na✝ b✝ : ι\nhp✝ : ∀ (i : ι), i ∈ s → IsPrime (f i)\nI : Ideal R\nn✝ : ℕ\nhn✝ : Finset.card s = n✝\nh✝ : ↑I ⊆ ↑(f a✝) ∪ ↑(f b✝) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i)\nn : ℕ\nih :\n  ∀ {s : Finset ι} {a b : ι},\n    (∀ (i : ι), i ∈ s → IsPrime (f i)) →\n      Finset.card s = n →\n        ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i) → I ≤ f a ∨ I ≤ f b ∨ ∃ i, i ∈ s ∧ I ≤ f i\na b i j : ι\nhfji : f j ≤ f i\nu : Finset ι\nhju : ¬j ∈ u\nhit : ¬i ∈ insert j u\nhn : Finset.card (insert j u) = n\nh : ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i_1 : ι) (_ : i_1 ∈ ↑(insert i (insert j u))), ↑(f i_1)\nhp : IsPrime (f i) ∧ IsPrime (f j) ∧ ∀ (x : ι), x ∈ u → IsPrime (f x)\nhjt : j ∈ insert j u\n⊢ IsPrime (f i) ∧ ∀ (x : ι), x ∈ u → IsPrime (f x)\n[PROOFSTEP]\nexact ⟨hp.1, hp.2.2⟩\n[GOAL]\ncase pos.intro.intro.intro.intro\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns : Finset ι\nf : ι → Ideal R\na✝ b✝ : ι\nhp✝ : ∀ (i : ι), i ∈ s → IsPrime (f i)\nI : Ideal R\nn✝ : ℕ\nhn✝ : Finset.card s = n✝\nh✝ : ↑I ⊆ ↑(f a✝) ∪ ↑(f b✝) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i)\nn : ℕ\nih :\n  ∀ {s : Finset ι} {a b : ι},\n    (∀ (i : ι), i ∈ s → IsPrime (f i)) →\n      Finset.card s = n →\n        ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i) → I ≤ f a ∨ I ≤ f b ∨ ∃ i, i ∈ s ∧ I ≤ f i\na b i j : ι\nhfji : f j ≤ f i\nu : Finset ι\nhju : ¬j ∈ u\nhit : ¬i ∈ insert j u\nhn : Finset.card (insert j u) = n\nh : ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i_1 : ι) (_ : i_1 ∈ ↑(insert i (insert j u))), ↑(f i_1)\nhp : IsPrime (f i) ∧ ∀ (x : ι), x ∈ insert j u → IsPrime (f x)\nhjt : j ∈ insert j u\nhp' : ∀ (k : ι), k ∈ insert i u → IsPrime (f k)\n⊢ I ≤ f a ∨ I ≤ f b ∨ ∃ i_1, i_1 ∈ insert i (insert j u) ∧ I ≤ f i_1\n[PROOFSTEP]\nhave hiu : i ∉ u := mt Finset.mem_insert_of_mem hit\n[GOAL]\ncase pos.intro.intro.intro.intro\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns : Finset ι\nf : ι → Ideal R\na✝ b✝ : ι\nhp✝ : ∀ (i : ι), i ∈ s → IsPrime (f i)\nI : Ideal R\nn✝ : ℕ\nhn✝ : Finset.card s = n✝\nh✝ : ↑I ⊆ ↑(f a✝) ∪ ↑(f b✝) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i)\nn : ℕ\nih :\n  ∀ {s : Finset ι} {a b : ι},\n    (∀ (i : ι), i ∈ s → IsPrime (f i)) →\n      Finset.card s = n →\n        ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i) → I ≤ f a ∨ I ≤ f b ∨ ∃ i, i ∈ s ∧ I ≤ f i\na b i j : ι\nhfji : f j ≤ f i\nu : Finset ι\nhju : ¬j ∈ u\nhit : ¬i ∈ insert j u\nhn : Finset.card (insert j u) = n\nh : ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i_1 : ι) (_ : i_1 ∈ ↑(insert i (insert j u))), ↑(f i_1)\nhp : IsPrime (f i) ∧ ∀ (x : ι), x ∈ insert j u → IsPrime (f x)\nhjt : j ∈ insert j u\nhp' : ∀ (k : ι), k ∈ insert i u → IsPrime (f k)\nhiu : ¬i ∈ u\n⊢ I ≤ f a ∨ I ≤ f b ∨ ∃ i_1, i_1 ∈ insert i (insert j u) ∧ I ≤ f i_1\n[PROOFSTEP]\nhave hn' : (insert i u).card = n := by\n  rwa [Finset.card_insert_of_not_mem] at hn ⊢\n  exacts [hiu, hju]\n[GOAL]\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns : Finset ι\nf : ι → Ideal R\na✝ b✝ : ι\nhp✝ : ∀ (i : ι), i ∈ s → IsPrime (f i)\nI : Ideal R\nn✝ : ℕ\nhn✝ : Finset.card s = n✝\nh✝ : ↑I ⊆ ↑(f a✝) ∪ ↑(f b✝) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i)\nn : ℕ\nih :\n  ∀ {s : Finset ι} {a b : ι},\n    (∀ (i : ι), i ∈ s → IsPrime (f i)) →\n      Finset.card s = n →\n        ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i) → I ≤ f a ∨ I ≤ f b ∨ ∃ i, i ∈ s ∧ I ≤ f i\na b i j : ι\nhfji : f j ≤ f i\nu : Finset ι\nhju : ¬j ∈ u\nhit : ¬i ∈ insert j u\nhn : Finset.card (insert j u) = n\nh : ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i_1 : ι) (_ : i_1 ∈ ↑(insert i (insert j u))), ↑(f i_1)\nhp : IsPrime (f i) ∧ ∀ (x : ι), x ∈ insert j u → IsPrime (f x)\nhjt : j ∈ insert j u\nhp' : ∀ (k : ι), k ∈ insert i u → IsPrime (f k)\nhiu : ¬i ∈ u\n⊢ Finset.card (insert i u) = n\n[PROOFSTEP]\nrwa [Finset.card_insert_of_not_mem] at hn ⊢\n[GOAL]\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns : Finset ι\nf : ι → Ideal R\na✝ b✝ : ι\nhp✝ : ∀ (i : ι), i ∈ s → IsPrime (f i)\nI : Ideal R\nn✝ : ℕ\nhn✝ : Finset.card s = n✝\nh✝ : ↑I ⊆ ↑(f a✝) ∪ ↑(f b✝) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i)\nn : ℕ\nih :\n  ∀ {s : Finset ι} {a b : ι},\n    (∀ (i : ι), i ∈ s → IsPrime (f i)) →\n      Finset.card s = n →\n        ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i) → I ≤ f a ∨ I ≤ f b ∨ ∃ i, i ∈ s ∧ I ≤ f i\na b i j : ι\nhfji : f j ≤ f i\nu : Finset ι\nhju : ¬j ∈ u\nhit : ¬i ∈ insert j u\nhn : Finset.card u + 1 = n\nh : ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i_1 : ι) (_ : i_1 ∈ ↑(insert i (insert j u))), ↑(f i_1)\nhp : IsPrime (f i) ∧ ∀ (x : ι), x ∈ insert j u → IsPrime (f x)\nhjt : j ∈ insert j u\nhp' : ∀ (k : ι), k ∈ insert i u → IsPrime (f k)\nhiu : ¬i ∈ u\n⊢ ¬i ∈ u\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns : Finset ι\nf : ι → Ideal R\na✝ b✝ : ι\nhp✝ : ∀ (i : ι), i ∈ s → IsPrime (f i)\nI : Ideal R\nn✝ : ℕ\nhn✝ : Finset.card s = n✝\nh✝ : ↑I ⊆ ↑(f a✝) ∪ ↑(f b✝) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i)\nn : ℕ\nih :\n  ∀ {s : Finset ι} {a b : ι},\n    (∀ (i : ι), i ∈ s → IsPrime (f i)) →\n      Finset.card s = n →\n        ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i) → I ≤ f a ∨ I ≤ f b ∨ ∃ i, i ∈ s ∧ I ≤ f i\na b i j : ι\nhfji : f j ≤ f i\nu : Finset ι\nhju : ¬j ∈ u\nhit : ¬i ∈ insert j u\nhn : Finset.card (insert j u) = n\nh : ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i_1 : ι) (_ : i_1 ∈ ↑(insert i (insert j u))), ↑(f i_1)\nhp : IsPrime (f i) ∧ ∀ (x : ι), x ∈ insert j u → IsPrime (f x)\nhjt : j ∈ insert j u\nhp' : ∀ (k : ι), k ∈ insert i u → IsPrime (f k)\nhiu : ¬i ∈ u\n⊢ ¬j ∈ u\n[PROOFSTEP]\nexacts [hiu, hju]\n[GOAL]\ncase pos.intro.intro.intro.intro\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns : Finset ι\nf : ι → Ideal R\na✝ b✝ : ι\nhp✝ : ∀ (i : ι), i ∈ s → IsPrime (f i)\nI : Ideal R\nn✝ : ℕ\nhn✝ : Finset.card s = n✝\nh✝ : ↑I ⊆ ↑(f a✝) ∪ ↑(f b✝) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i)\nn : ℕ\nih :\n  ∀ {s : Finset ι} {a b : ι},\n    (∀ (i : ι), i ∈ s → IsPrime (f i)) →\n      Finset.card s = n →\n        ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i) → I ≤ f a ∨ I ≤ f b ∨ ∃ i, i ∈ s ∧ I ≤ f i\na b i j : ι\nhfji : f j ≤ f i\nu : Finset ι\nhju : ¬j ∈ u\nhit : ¬i ∈ insert j u\nhn : Finset.card (insert j u) = n\nh : ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i_1 : ι) (_ : i_1 ∈ ↑(insert i (insert j u))), ↑(f i_1)\nhp : IsPrime (f i) ∧ ∀ (x : ι), x ∈ insert j u → IsPrime (f x)\nhjt : j ∈ insert j u\nhp' : ∀ (k : ι), k ∈ insert i u → IsPrime (f k)\nhiu : ¬i ∈ u\nhn' : Finset.card (insert i u) = n\n⊢ I ≤ f a ∨ I ≤ f b ∨ ∃ i_1, i_1 ∈ insert i (insert j u) ∧ I ≤ f i_1\n[PROOFSTEP]\nhave h' : (I : Set R) ⊆ f a ∪ f b ∪ ⋃ k ∈ (↑(insert i u) : Set ι), f k :=\n  by\n  rw [Finset.coe_insert] at h ⊢\n  rw [Finset.coe_insert] at h \n  simp only [Set.biUnion_insert] at h ⊢\n  rw [← Set.union_assoc (f i : Set R)] at h \n  erw [Set.union_eq_self_of_subset_right hfji] at h \n  exact h\n[GOAL]\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns : Finset ι\nf : ι → Ideal R\na✝ b✝ : ι\nhp✝ : ∀ (i : ι), i ∈ s → IsPrime (f i)\nI : Ideal R\nn✝ : ℕ\nhn✝ : Finset.card s = n✝\nh✝ : ↑I ⊆ ↑(f a✝) ∪ ↑(f b✝) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i)\nn : ℕ\nih :\n  ∀ {s : Finset ι} {a b : ι},\n    (∀ (i : ι), i ∈ s → IsPrime (f i)) →\n      Finset.card s = n →\n        ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i) → I ≤ f a ∨ I ≤ f b ∨ ∃ i, i ∈ s ∧ I ≤ f i\na b i j : ι\nhfji : f j ≤ f i\nu : Finset ι\nhju : ¬j ∈ u\nhit : ¬i ∈ insert j u\nhn : Finset.card (insert j u) = n\nh : ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i_1 : ι) (_ : i_1 ∈ ↑(insert i (insert j u))), ↑(f i_1)\nhp : IsPrime (f i) ∧ ∀ (x : ι), x ∈ insert j u → IsPrime (f x)\nhjt : j ∈ insert j u\nhp' : ∀ (k : ι), k ∈ insert i u → IsPrime (f k)\nhiu : ¬i ∈ u\nhn' : Finset.card (insert i u) = n\n⊢ ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (k : ι) (_ : k ∈ ↑(insert i u)), ↑(f k)\n[PROOFSTEP]\nrw [Finset.coe_insert] at h ⊢\n[GOAL]\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns : Finset ι\nf : ι → Ideal R\na✝ b✝ : ι\nhp✝ : ∀ (i : ι), i ∈ s → IsPrime (f i)\nI : Ideal R\nn✝ : ℕ\nhn✝ : Finset.card s = n✝\nh✝ : ↑I ⊆ ↑(f a✝) ∪ ↑(f b✝) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i)\nn : ℕ\nih :\n  ∀ {s : Finset ι} {a b : ι},\n    (∀ (i : ι), i ∈ s → IsPrime (f i)) →\n      Finset.card s = n →\n        ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i) → I ≤ f a ∨ I ≤ f b ∨ ∃ i, i ∈ s ∧ I ≤ f i\na b i j : ι\nhfji : f j ≤ f i\nu : Finset ι\nhju : ¬j ∈ u\nhit : ¬i ∈ insert j u\nhn : Finset.card (insert j u) = n\nh : ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i_1 : ι) (_ : i_1 ∈ insert i ↑(insert j u)), ↑(f i_1)\nhp : IsPrime (f i) ∧ ∀ (x : ι), x ∈ insert j u → IsPrime (f x)\nhjt : j ∈ insert j u\nhp' : ∀ (k : ι), k ∈ insert i u → IsPrime (f k)\nhiu : ¬i ∈ u\nhn' : Finset.card (insert i u) = n\n⊢ ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (k : ι) (_ : k ∈ insert i ↑u), ↑(f k)\n[PROOFSTEP]\nrw [Finset.coe_insert] at h \n[GOAL]\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns : Finset ι\nf : ι → Ideal R\na✝ b✝ : ι\nhp✝ : ∀ (i : ι), i ∈ s → IsPrime (f i)\nI : Ideal R\nn✝ : ℕ\nhn✝ : Finset.card s = n✝\nh✝ : ↑I ⊆ ↑(f a✝) ∪ ↑(f b✝) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i)\nn : ℕ\nih :\n  ∀ {s : Finset ι} {a b : ι},\n    (∀ (i : ι), i ∈ s → IsPrime (f i)) →\n      Finset.card s = n →\n        ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i) → I ≤ f a ∨ I ≤ f b ∨ ∃ i, i ∈ s ∧ I ≤ f i\na b i j : ι\nhfji : f j ≤ f i\nu : Finset ι\nhju : ¬j ∈ u\nhit : ¬i ∈ insert j u\nhn : Finset.card (insert j u) = n\nh : ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i_1 : ι) (_ : i_1 ∈ insert i (insert j ↑u)), ↑(f i_1)\nhp : IsPrime (f i) ∧ ∀ (x : ι), x ∈ insert j u → IsPrime (f x)\nhjt : j ∈ insert j u\nhp' : ∀ (k : ι), k ∈ insert i u → IsPrime (f k)\nhiu : ¬i ∈ u\nhn' : Finset.card (insert i u) = n\n⊢ ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (k : ι) (_ : k ∈ insert i ↑u), ↑(f k)\n[PROOFSTEP]\nsimp only [Set.biUnion_insert] at h ⊢\n[GOAL]\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns : Finset ι\nf : ι → Ideal R\na✝ b✝ : ι\nhp✝ : ∀ (i : ι), i ∈ s → IsPrime (f i)\nI : Ideal R\nn✝ : ℕ\nhn✝ : Finset.card s = n✝\nh✝ : ↑I ⊆ ↑(f a✝) ∪ ↑(f b✝) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i)\nn : ℕ\nih :\n  ∀ {s : Finset ι} {a b : ι},\n    (∀ (i : ι), i ∈ s → IsPrime (f i)) →\n      Finset.card s = n →\n        ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i) → I ≤ f a ∨ I ≤ f b ∨ ∃ i, i ∈ s ∧ I ≤ f i\na b i j : ι\nhfji : f j ≤ f i\nu : Finset ι\nhju : ¬j ∈ u\nhit : ¬i ∈ insert j u\nhn : Finset.card (insert j u) = n\nhp : IsPrime (f i) ∧ ∀ (x : ι), x ∈ insert j u → IsPrime (f x)\nhjt : j ∈ insert j u\nhp' : ∀ (k : ι), k ∈ insert i u → IsPrime (f k)\nhiu : ¬i ∈ u\nhn' : Finset.card (insert i u) = n\nh : ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ (↑(f i) ∪ (↑(f j) ∪ ⋃ (x : ι) (_ : x ∈ ↑u), ↑(f x)))\n⊢ ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ (↑(f i) ∪ ⋃ (x : ι) (_ : x ∈ ↑u), ↑(f x))\n[PROOFSTEP]\nrw [← Set.union_assoc (f i : Set R)] at h \n[GOAL]\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns : Finset ι\nf : ι → Ideal R\na✝ b✝ : ι\nhp✝ : ∀ (i : ι), i ∈ s → IsPrime (f i)\nI : Ideal R\nn✝ : ℕ\nhn✝ : Finset.card s = n✝\nh✝ : ↑I ⊆ ↑(f a✝) ∪ ↑(f b✝) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i)\nn : ℕ\nih :\n  ∀ {s : Finset ι} {a b : ι},\n    (∀ (i : ι), i ∈ s → IsPrime (f i)) →\n      Finset.card s = n →\n        ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i) → I ≤ f a ∨ I ≤ f b ∨ ∃ i, i ∈ s ∧ I ≤ f i\na b i j : ι\nhfji : f j ≤ f i\nu : Finset ι\nhju : ¬j ∈ u\nhit : ¬i ∈ insert j u\nhn : Finset.card (insert j u) = n\nhp : IsPrime (f i) ∧ ∀ (x : ι), x ∈ insert j u → IsPrime (f x)\nhjt : j ∈ insert j u\nhp' : ∀ (k : ι), k ∈ insert i u → IsPrime (f k)\nhiu : ¬i ∈ u\nhn' : Finset.card (insert i u) = n\nh : ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ (↑(f i) ∪ ↑(f j) ∪ ⋃ (x : ι) (_ : x ∈ ↑u), ↑(f x))\n⊢ ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ (↑(f i) ∪ ⋃ (x : ι) (_ : x ∈ ↑u), ↑(f x))\n[PROOFSTEP]\nerw [Set.union_eq_self_of_subset_right hfji] at h \n[GOAL]\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns : Finset ι\nf : ι → Ideal R\na✝ b✝ : ι\nhp✝ : ∀ (i : ι), i ∈ s → IsPrime (f i)\nI : Ideal R\nn✝ : ℕ\nhn✝ : Finset.card s = n✝\nh✝ : ↑I ⊆ ↑(f a✝) ∪ ↑(f b✝) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i)\nn : ℕ\nih :\n  ∀ {s : Finset ι} {a b : ι},\n    (∀ (i : ι), i ∈ s → IsPrime (f i)) →\n      Finset.card s = n →\n        ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i) → I ≤ f a ∨ I ≤ f b ∨ ∃ i, i ∈ s ∧ I ≤ f i\na b i j : ι\nhfji : f j ≤ f i\nu : Finset ι\nhju : ¬j ∈ u\nhit : ¬i ∈ insert j u\nhn : Finset.card (insert j u) = n\nhp : IsPrime (f i) ∧ ∀ (x : ι), x ∈ insert j u → IsPrime (f x)\nhjt : j ∈ insert j u\nhp' : ∀ (k : ι), k ∈ insert i u → IsPrime (f k)\nhiu : ¬i ∈ u\nhn' : Finset.card (insert i u) = n\nh : ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ (↑(f i) ∪ ⋃ (x : ι) (_ : x ∈ ↑u), ↑(f x))\n⊢ ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ (↑(f i) ∪ ⋃ (x : ι) (_ : x ∈ ↑u), ↑(f x))\n[PROOFSTEP]\nexact h\n[GOAL]\ncase pos.intro.intro.intro.intro\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns : Finset ι\nf : ι → Ideal R\na✝ b✝ : ι\nhp✝ : ∀ (i : ι), i ∈ s → IsPrime (f i)\nI : Ideal R\nn✝ : ℕ\nhn✝ : Finset.card s = n✝\nh✝ : ↑I ⊆ ↑(f a✝) ∪ ↑(f b✝) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i)\nn : ℕ\nih :\n  ∀ {s : Finset ι} {a b : ι},\n    (∀ (i : ι), i ∈ s → IsPrime (f i)) →\n      Finset.card s = n →\n        ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i) → I ≤ f a ∨ I ≤ f b ∨ ∃ i, i ∈ s ∧ I ≤ f i\na b i j : ι\nhfji : f j ≤ f i\nu : Finset ι\nhju : ¬j ∈ u\nhit : ¬i ∈ insert j u\nhn : Finset.card (insert j u) = n\nh : ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i_1 : ι) (_ : i_1 ∈ ↑(insert i (insert j u))), ↑(f i_1)\nhp : IsPrime (f i) ∧ ∀ (x : ι), x ∈ insert j u → IsPrime (f x)\nhjt : j ∈ insert j u\nhp' : ∀ (k : ι), k ∈ insert i u → IsPrime (f k)\nhiu : ¬i ∈ u\nhn' : Finset.card (insert i u) = n\nh' : ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (k : ι) (_ : k ∈ ↑(insert i u)), ↑(f k)\n⊢ I ≤ f a ∨ I ≤ f b ∨ ∃ i_1, i_1 ∈ insert i (insert j u) ∧ I ≤ f i_1\n[PROOFSTEP]\nspecialize ih hp' hn' h'\n[GOAL]\ncase pos.intro.intro.intro.intro\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns : Finset ι\nf : ι → Ideal R\na✝ b✝ : ι\nhp✝ : ∀ (i : ι), i ∈ s → IsPrime (f i)\nI : Ideal R\nn✝ : ℕ\nhn✝ : Finset.card s = n✝\nh✝ : ↑I ⊆ ↑(f a✝) ∪ ↑(f b✝) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i)\nn : ℕ\na b i j : ι\nhfji : f j ≤ f i\nu : Finset ι\nhju : ¬j ∈ u\nhit : ¬i ∈ insert j u\nhn : Finset.card (insert j u) = n\nh : ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i_1 : ι) (_ : i_1 ∈ ↑(insert i (insert j u))), ↑(f i_1)\nhp : IsPrime (f i) ∧ ∀ (x : ι), x ∈ insert j u → IsPrime (f x)\nhjt : j ∈ insert j u\nhp' : ∀ (k : ι), k ∈ insert i u → IsPrime (f k)\nhiu : ¬i ∈ u\nhn' : Finset.card (insert i u) = n\nh' : ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (k : ι) (_ : k ∈ ↑(insert i u)), ↑(f k)\nih : I ≤ f a ∨ I ≤ f b ∨ ∃ i_1, i_1 ∈ insert i u ∧ I ≤ f i_1\n⊢ I ≤ f a ∨ I ≤ f b ∨ ∃ i_1, i_1 ∈ insert i (insert j u) ∧ I ≤ f i_1\n[PROOFSTEP]\nrefine' ih.imp id (Or.imp id (Exists.imp fun k => _))\n[GOAL]\ncase pos.intro.intro.intro.intro\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns : Finset ι\nf : ι → Ideal R\na✝ b✝ : ι\nhp✝ : ∀ (i : ι), i ∈ s → IsPrime (f i)\nI : Ideal R\nn✝ : ℕ\nhn✝ : Finset.card s = n✝\nh✝ : ↑I ⊆ ↑(f a✝) ∪ ↑(f b✝) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i)\nn : ℕ\na b i j : ι\nhfji : f j ≤ f i\nu : Finset ι\nhju : ¬j ∈ u\nhit : ¬i ∈ insert j u\nhn : Finset.card (insert j u) = n\nh : ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i_1 : ι) (_ : i_1 ∈ ↑(insert i (insert j u))), ↑(f i_1)\nhp : IsPrime (f i) ∧ ∀ (x : ι), x ∈ insert j u → IsPrime (f x)\nhjt : j ∈ insert j u\nhp' : ∀ (k : ι), k ∈ insert i u → IsPrime (f k)\nhiu : ¬i ∈ u\nhn' : Finset.card (insert i u) = n\nh' : ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (k : ι) (_ : k ∈ ↑(insert i u)), ↑(f k)\nih : I ≤ f a ∨ I ≤ f b ∨ ∃ i_1, i_1 ∈ insert i u ∧ I ≤ f i_1\nk : ι\n⊢ k ∈ insert i u ∧ I ≤ f k → k ∈ insert i (insert j u) ∧ I ≤ f k\n[PROOFSTEP]\nexact And.imp (fun hk => Finset.insert_subset_insert i (Finset.subset_insert j u) hk) id\n[GOAL]\ncase neg\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns : Finset ι\nf : ι → Ideal R\na✝ b✝ : ι\nhp✝ : ∀ (i : ι), i ∈ s → IsPrime (f i)\nI : Ideal R\nn✝ : ℕ\nhn✝ : Finset.card s = n✝\nh✝ : ↑I ⊆ ↑(f a✝) ∪ ↑(f b✝) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i)\nn : ℕ\nih :\n  ∀ {s : Finset ι} {a b : ι},\n    (∀ (i : ι), i ∈ s → IsPrime (f i)) →\n      Finset.card s = n →\n        ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i) → I ≤ f a ∨ I ≤ f b ∨ ∃ i, i ∈ s ∧ I ≤ f i\na b i : ι\nt : Finset ι\nhit : ¬i ∈ t\nhn : Finset.card t = n\nh : ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i_1 : ι) (_ : i_1 ∈ ↑(insert i t)), ↑(f i_1)\nhp : IsPrime (f i) ∧ ∀ (x : ι), x ∈ t → IsPrime (f x)\nHt : ¬∃ j, j ∈ t ∧ f j ≤ f i\n⊢ I ≤ f a ∨ I ≤ f b ∨ ∃ i_1, i_1 ∈ insert i t ∧ I ≤ f i_1\n[PROOFSTEP]\nby_cases Ha : f a ≤ f i\n[GOAL]\ncase pos\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns : Finset ι\nf : ι → Ideal R\na✝ b✝ : ι\nhp✝ : ∀ (i : ι), i ∈ s → IsPrime (f i)\nI : Ideal R\nn✝ : ℕ\nhn✝ : Finset.card s = n✝\nh✝ : ↑I ⊆ ↑(f a✝) ∪ ↑(f b✝) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i)\nn : ℕ\nih :\n  ∀ {s : Finset ι} {a b : ι},\n    (∀ (i : ι), i ∈ s → IsPrime (f i)) →\n      Finset.card s = n →\n        ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i) → I ≤ f a ∨ I ≤ f b ∨ ∃ i, i ∈ s ∧ I ≤ f i\na b i : ι\nt : Finset ι\nhit : ¬i ∈ t\nhn : Finset.card t = n\nh : ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i_1 : ι) (_ : i_1 ∈ ↑(insert i t)), ↑(f i_1)\nhp : IsPrime (f i) ∧ ∀ (x : ι), x ∈ t → IsPrime (f x)\nHt : ¬∃ j, j ∈ t ∧ f j ≤ f i\nHa : f a ≤ f i\n⊢ I ≤ f a ∨ I ≤ f b ∨ ∃ i_1, i_1 ∈ insert i t ∧ I ≤ f i_1\n[PROOFSTEP]\nhave h' : (I : Set R) ⊆ f i ∪ f b ∪ ⋃ j ∈ (↑t : Set ι), f j :=\n  by\n  rw [Finset.coe_insert, Set.biUnion_insert, ← Set.union_assoc, Set.union_right_comm (f a : Set R)] at h \n  erw [Set.union_eq_self_of_subset_left Ha] at h \n  exact h\n[GOAL]\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns : Finset ι\nf : ι → Ideal R\na✝ b✝ : ι\nhp✝ : ∀ (i : ι), i ∈ s → IsPrime (f i)\nI : Ideal R\nn✝ : ℕ\nhn✝ : Finset.card s = n✝\nh✝ : ↑I ⊆ ↑(f a✝) ∪ ↑(f b✝) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i)\nn : ℕ\nih :\n  ∀ {s : Finset ι} {a b : ι},\n    (∀ (i : ι), i ∈ s → IsPrime (f i)) →\n      Finset.card s = n →\n        ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i) → I ≤ f a ∨ I ≤ f b ∨ ∃ i, i ∈ s ∧ I ≤ f i\na b i : ι\nt : Finset ι\nhit : ¬i ∈ t\nhn : Finset.card t = n\nh : ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i_1 : ι) (_ : i_1 ∈ ↑(insert i t)), ↑(f i_1)\nhp : IsPrime (f i) ∧ ∀ (x : ι), x ∈ t → IsPrime (f x)\nHt : ¬∃ j, j ∈ t ∧ f j ≤ f i\nHa : f a ≤ f i\n⊢ ↑I ⊆ ↑(f i) ∪ ↑(f b) ∪ ⋃ (j : ι) (_ : j ∈ ↑t), ↑(f j)\n[PROOFSTEP]\nrw [Finset.coe_insert, Set.biUnion_insert, ← Set.union_assoc, Set.union_right_comm (f a : Set R)] at h \n[GOAL]\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns : Finset ι\nf : ι → Ideal R\na✝ b✝ : ι\nhp✝ : ∀ (i : ι), i ∈ s → IsPrime (f i)\nI : Ideal R\nn✝ : ℕ\nhn✝ : Finset.card s = n✝\nh✝ : ↑I ⊆ ↑(f a✝) ∪ ↑(f b✝) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i)\nn : ℕ\nih :\n  ∀ {s : Finset ι} {a b : ι},\n    (∀ (i : ι), i ∈ s → IsPrime (f i)) →\n      Finset.card s = n →\n        ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i) → I ≤ f a ∨ I ≤ f b ∨ ∃ i, i ∈ s ∧ I ≤ f i\na b i : ι\nt : Finset ι\nhit : ¬i ∈ t\nhn : Finset.card t = n\nh : ↑I ⊆ ↑(f a) ∪ ↑(f i) ∪ ↑(f b) ∪ ⋃ (x : ι) (_ : x ∈ ↑t), ↑(f x)\nhp : IsPrime (f i) ∧ ∀ (x : ι), x ∈ t → IsPrime (f x)\nHt : ¬∃ j, j ∈ t ∧ f j ≤ f i\nHa : f a ≤ f i\n⊢ ↑I ⊆ ↑(f i) ∪ ↑(f b) ∪ ⋃ (j : ι) (_ : j ∈ ↑t), ↑(f j)\n[PROOFSTEP]\nerw [Set.union_eq_self_of_subset_left Ha] at h \n[GOAL]\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns : Finset ι\nf : ι → Ideal R\na✝ b✝ : ι\nhp✝ : ∀ (i : ι), i ∈ s → IsPrime (f i)\nI : Ideal R\nn✝ : ℕ\nhn✝ : Finset.card s = n✝\nh✝ : ↑I ⊆ ↑(f a✝) ∪ ↑(f b✝) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i)\nn : ℕ\nih :\n  ∀ {s : Finset ι} {a b : ι},\n    (∀ (i : ι), i ∈ s → IsPrime (f i)) →\n      Finset.card s = n →\n        ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i) → I ≤ f a ∨ I ≤ f b ∨ ∃ i, i ∈ s ∧ I ≤ f i\na b i : ι\nt : Finset ι\nhit : ¬i ∈ t\nhn : Finset.card t = n\nh : ↑I ⊆ ↑(f i) ∪ ↑(f b) ∪ ⋃ (x : ι) (_ : x ∈ ↑t), ↑(f x)\nhp : IsPrime (f i) ∧ ∀ (x : ι), x ∈ t → IsPrime (f x)\nHt : ¬∃ j, j ∈ t ∧ f j ≤ f i\nHa : f a ≤ f i\n⊢ ↑I ⊆ ↑(f i) ∪ ↑(f b) ∪ ⋃ (j : ι) (_ : j ∈ ↑t), ↑(f j)\n[PROOFSTEP]\nexact h\n[GOAL]\ncase pos\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns : Finset ι\nf : ι → Ideal R\na✝ b✝ : ι\nhp✝ : ∀ (i : ι), i ∈ s → IsPrime (f i)\nI : Ideal R\nn✝ : ℕ\nhn✝ : Finset.card s = n✝\nh✝ : ↑I ⊆ ↑(f a✝) ∪ ↑(f b✝) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i)\nn : ℕ\nih :\n  ∀ {s : Finset ι} {a b : ι},\n    (∀ (i : ι), i ∈ s → IsPrime (f i)) →\n      Finset.card s = n →\n        ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i) → I ≤ f a ∨ I ≤ f b ∨ ∃ i, i ∈ s ∧ I ≤ f i\na b i : ι\nt : Finset ι\nhit : ¬i ∈ t\nhn : Finset.card t = n\nh : ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i_1 : ι) (_ : i_1 ∈ ↑(insert i t)), ↑(f i_1)\nhp : IsPrime (f i) ∧ ∀ (x : ι), x ∈ t → IsPrime (f x)\nHt : ¬∃ j, j ∈ t ∧ f j ≤ f i\nHa : f a ≤ f i\nh' : ↑I ⊆ ↑(f i) ∪ ↑(f b) ∪ ⋃ (j : ι) (_ : j ∈ ↑t), ↑(f j)\n⊢ I ≤ f a ∨ I ≤ f b ∨ ∃ i_1, i_1 ∈ insert i t ∧ I ≤ f i_1\n[PROOFSTEP]\nspecialize ih hp.2 hn h'\n[GOAL]\ncase pos\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns : Finset ι\nf : ι → Ideal R\na✝ b✝ : ι\nhp✝ : ∀ (i : ι), i ∈ s → IsPrime (f i)\nI : Ideal R\nn✝ : ℕ\nhn✝ : Finset.card s = n✝\nh✝ : ↑I ⊆ ↑(f a✝) ∪ ↑(f b✝) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i)\nn : ℕ\na b i : ι\nt : Finset ι\nhit : ¬i ∈ t\nhn : Finset.card t = n\nh : ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i_1 : ι) (_ : i_1 ∈ ↑(insert i t)), ↑(f i_1)\nhp : IsPrime (f i) ∧ ∀ (x : ι), x ∈ t → IsPrime (f x)\nHt : ¬∃ j, j ∈ t ∧ f j ≤ f i\nHa : f a ≤ f i\nh' : ↑I ⊆ ↑(f i) ∪ ↑(f b) ∪ ⋃ (j : ι) (_ : j ∈ ↑t), ↑(f j)\nih : I ≤ f i ∨ I ≤ f b ∨ ∃ i, i ∈ t ∧ I ≤ f i\n⊢ I ≤ f a ∨ I ≤ f b ∨ ∃ i_1, i_1 ∈ insert i t ∧ I ≤ f i_1\n[PROOFSTEP]\nright\n[GOAL]\ncase pos.h\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns : Finset ι\nf : ι → Ideal R\na✝ b✝ : ι\nhp✝ : ∀ (i : ι), i ∈ s → IsPrime (f i)\nI : Ideal R\nn✝ : ℕ\nhn✝ : Finset.card s = n✝\nh✝ : ↑I ⊆ ↑(f a✝) ∪ ↑(f b✝) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i)\nn : ℕ\na b i : ι\nt : Finset ι\nhit : ¬i ∈ t\nhn : Finset.card t = n\nh : ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i_1 : ι) (_ : i_1 ∈ ↑(insert i t)), ↑(f i_1)\nhp : IsPrime (f i) ∧ ∀ (x : ι), x ∈ t → IsPrime (f x)\nHt : ¬∃ j, j ∈ t ∧ f j ≤ f i\nHa : f a ≤ f i\nh' : ↑I ⊆ ↑(f i) ∪ ↑(f b) ∪ ⋃ (j : ι) (_ : j ∈ ↑t), ↑(f j)\nih : I ≤ f i ∨ I ≤ f b ∨ ∃ i, i ∈ t ∧ I ≤ f i\n⊢ I ≤ f b ∨ ∃ i_1, i_1 ∈ insert i t ∧ I ≤ f i_1\n[PROOFSTEP]\nrcases ih with (ih | ih | ⟨k, hkt, ih⟩)\n[GOAL]\ncase pos.h.inl\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns : Finset ι\nf : ι → Ideal R\na✝ b✝ : ι\nhp✝ : ∀ (i : ι), i ∈ s → IsPrime (f i)\nI : Ideal R\nn✝ : ℕ\nhn✝ : Finset.card s = n✝\nh✝ : ↑I ⊆ ↑(f a✝) ∪ ↑(f b✝) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i)\nn : ℕ\na b i : ι\nt : Finset ι\nhit : ¬i ∈ t\nhn : Finset.card t = n\nh : ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i_1 : ι) (_ : i_1 ∈ ↑(insert i t)), ↑(f i_1)\nhp : IsPrime (f i) ∧ ∀ (x : ι), x ∈ t → IsPrime (f x)\nHt : ¬∃ j, j ∈ t ∧ f j ≤ f i\nHa : f a ≤ f i\nh' : ↑I ⊆ ↑(f i) ∪ ↑(f b) ∪ ⋃ (j : ι) (_ : j ∈ ↑t), ↑(f j)\nih : I ≤ f i\n⊢ I ≤ f b ∨ ∃ i_1, i_1 ∈ insert i t ∧ I ≤ f i_1\n[PROOFSTEP]\nexact Or.inr ⟨i, Finset.mem_insert_self i t, ih⟩\n[GOAL]\ncase pos.h.inr.inl\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns : Finset ι\nf : ι → Ideal R\na✝ b✝ : ι\nhp✝ : ∀ (i : ι), i ∈ s → IsPrime (f i)\nI : Ideal R\nn✝ : ℕ\nhn✝ : Finset.card s = n✝\nh✝ : ↑I ⊆ ↑(f a✝) ∪ ↑(f b✝) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i)\nn : ℕ\na b i : ι\nt : Finset ι\nhit : ¬i ∈ t\nhn : Finset.card t = n\nh : ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i_1 : ι) (_ : i_1 ∈ ↑(insert i t)), ↑(f i_1)\nhp : IsPrime (f i) ∧ ∀ (x : ι), x ∈ t → IsPrime (f x)\nHt : ¬∃ j, j ∈ t ∧ f j ≤ f i\nHa : f a ≤ f i\nh' : ↑I ⊆ ↑(f i) ∪ ↑(f b) ∪ ⋃ (j : ι) (_ : j ∈ ↑t), ↑(f j)\nih : I ≤ f b\n⊢ I ≤ f b ∨ ∃ i_1, i_1 ∈ insert i t ∧ I ≤ f i_1\n[PROOFSTEP]\nexact Or.inl ih\n[GOAL]\ncase pos.h.inr.inr.intro.intro\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns : Finset ι\nf : ι → Ideal R\na✝ b✝ : ι\nhp✝ : ∀ (i : ι), i ∈ s → IsPrime (f i)\nI : Ideal R\nn✝ : ℕ\nhn✝ : Finset.card s = n✝\nh✝ : ↑I ⊆ ↑(f a✝) ∪ ↑(f b✝) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i)\nn : ℕ\na b i : ι\nt : Finset ι\nhit : ¬i ∈ t\nhn : Finset.card t = n\nh : ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i_1 : ι) (_ : i_1 ∈ ↑(insert i t)), ↑(f i_1)\nhp : IsPrime (f i) ∧ ∀ (x : ι), x ∈ t → IsPrime (f x)\nHt : ¬∃ j, j ∈ t ∧ f j ≤ f i\nHa : f a ≤ f i\nh' : ↑I ⊆ ↑(f i) ∪ ↑(f b) ∪ ⋃ (j : ι) (_ : j ∈ ↑t), ↑(f j)\nk : ι\nhkt : k ∈ t\nih : I ≤ f k\n⊢ I ≤ f b ∨ ∃ i_1, i_1 ∈ insert i t ∧ I ≤ f i_1\n[PROOFSTEP]\nexact Or.inr ⟨k, Finset.mem_insert_of_mem hkt, ih⟩\n[GOAL]\ncase neg\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns : Finset ι\nf : ι → Ideal R\na✝ b✝ : ι\nhp✝ : ∀ (i : ι), i ∈ s → IsPrime (f i)\nI : Ideal R\nn✝ : ℕ\nhn✝ : Finset.card s = n✝\nh✝ : ↑I ⊆ ↑(f a✝) ∪ ↑(f b✝) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i)\nn : ℕ\nih :\n  ∀ {s : Finset ι} {a b : ι},\n    (∀ (i : ι), i ∈ s → IsPrime (f i)) →\n      Finset.card s = n →\n        ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i) → I ≤ f a ∨ I ≤ f b ∨ ∃ i, i ∈ s ∧ I ≤ f i\na b i : ι\nt : Finset ι\nhit : ¬i ∈ t\nhn : Finset.card t = n\nh : ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i_1 : ι) (_ : i_1 ∈ ↑(insert i t)), ↑(f i_1)\nhp : IsPrime (f i) ∧ ∀ (x : ι), x ∈ t → IsPrime (f x)\nHt : ¬∃ j, j ∈ t ∧ f j ≤ f i\nHa : ¬f a ≤ f i\n⊢ I ≤ f a ∨ I ≤ f b ∨ ∃ i_1, i_1 ∈ insert i t ∧ I ≤ f i_1\n[PROOFSTEP]\nby_cases Hb : f b ≤ f i\n[GOAL]\ncase pos\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns : Finset ι\nf : ι → Ideal R\na✝ b✝ : ι\nhp✝ : ∀ (i : ι), i ∈ s → IsPrime (f i)\nI : Ideal R\nn✝ : ℕ\nhn✝ : Finset.card s = n✝\nh✝ : ↑I ⊆ ↑(f a✝) ∪ ↑(f b✝) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i)\nn : ℕ\nih :\n  ∀ {s : Finset ι} {a b : ι},\n    (∀ (i : ι), i ∈ s → IsPrime (f i)) →\n      Finset.card s = n →\n        ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i) → I ≤ f a ∨ I ≤ f b ∨ ∃ i, i ∈ s ∧ I ≤ f i\na b i : ι\nt : Finset ι\nhit : ¬i ∈ t\nhn : Finset.card t = n\nh : ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i_1 : ι) (_ : i_1 ∈ ↑(insert i t)), ↑(f i_1)\nhp : IsPrime (f i) ∧ ∀ (x : ι), x ∈ t → IsPrime (f x)\nHt : ¬∃ j, j ∈ t ∧ f j ≤ f i\nHa : ¬f a ≤ f i\nHb : f b ≤ f i\n⊢ I ≤ f a ∨ I ≤ f b ∨ ∃ i_1, i_1 ∈ insert i t ∧ I ≤ f i_1\n[PROOFSTEP]\nhave h' : (I : Set R) ⊆ f a ∪ f i ∪ ⋃ j ∈ (↑t : Set ι), f j :=\n  by\n  rw [Finset.coe_insert, Set.biUnion_insert, ← Set.union_assoc, Set.union_assoc (f a : Set R)] at h \n  erw [Set.union_eq_self_of_subset_left Hb] at h \n  exact h\n[GOAL]\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns : Finset ι\nf : ι → Ideal R\na✝ b✝ : ι\nhp✝ : ∀ (i : ι), i ∈ s → IsPrime (f i)\nI : Ideal R\nn✝ : ℕ\nhn✝ : Finset.card s = n✝\nh✝ : ↑I ⊆ ↑(f a✝) ∪ ↑(f b✝) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i)\nn : ℕ\nih :\n  ∀ {s : Finset ι} {a b : ι},\n    (∀ (i : ι), i ∈ s → IsPrime (f i)) →\n      Finset.card s = n →\n        ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i) → I ≤ f a ∨ I ≤ f b ∨ ∃ i, i ∈ s ∧ I ≤ f i\na b i : ι\nt : Finset ι\nhit : ¬i ∈ t\nhn : Finset.card t = n\nh : ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i_1 : ι) (_ : i_1 ∈ ↑(insert i t)), ↑(f i_1)\nhp : IsPrime (f i) ∧ ∀ (x : ι), x ∈ t → IsPrime (f x)\nHt : ¬∃ j, j ∈ t ∧ f j ≤ f i\nHa : ¬f a ≤ f i\nHb : f b ≤ f i\n⊢ ↑I ⊆ ↑(f a) ∪ ↑(f i) ∪ ⋃ (j : ι) (_ : j ∈ ↑t), ↑(f j)\n[PROOFSTEP]\nrw [Finset.coe_insert, Set.biUnion_insert, ← Set.union_assoc, Set.union_assoc (f a : Set R)] at h \n[GOAL]\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns : Finset ι\nf : ι → Ideal R\na✝ b✝ : ι\nhp✝ : ∀ (i : ι), i ∈ s → IsPrime (f i)\nI : Ideal R\nn✝ : ℕ\nhn✝ : Finset.card s = n✝\nh✝ : ↑I ⊆ ↑(f a✝) ∪ ↑(f b✝) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i)\nn : ℕ\nih :\n  ∀ {s : Finset ι} {a b : ι},\n    (∀ (i : ι), i ∈ s → IsPrime (f i)) →\n      Finset.card s = n →\n        ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i) → I ≤ f a ∨ I ≤ f b ∨ ∃ i, i ∈ s ∧ I ≤ f i\na b i : ι\nt : Finset ι\nhit : ¬i ∈ t\nhn : Finset.card t = n\nh : ↑I ⊆ ↑(f a) ∪ (↑(f b) ∪ ↑(f i)) ∪ ⋃ (x : ι) (_ : x ∈ ↑t), ↑(f x)\nhp : IsPrime (f i) ∧ ∀ (x : ι), x ∈ t → IsPrime (f x)\nHt : ¬∃ j, j ∈ t ∧ f j ≤ f i\nHa : ¬f a ≤ f i\nHb : f b ≤ f i\n⊢ ↑I ⊆ ↑(f a) ∪ ↑(f i) ∪ ⋃ (j : ι) (_ : j ∈ ↑t), ↑(f j)\n[PROOFSTEP]\nerw [Set.union_eq_self_of_subset_left Hb] at h \n[GOAL]\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns : Finset ι\nf : ι → Ideal R\na✝ b✝ : ι\nhp✝ : ∀ (i : ι), i ∈ s → IsPrime (f i)\nI : Ideal R\nn✝ : ℕ\nhn✝ : Finset.card s = n✝\nh✝ : ↑I ⊆ ↑(f a✝) ∪ ↑(f b✝) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i)\nn : ℕ\nih :\n  ∀ {s : Finset ι} {a b : ι},\n    (∀ (i : ι), i ∈ s → IsPrime (f i)) →\n      Finset.card s = n →\n        ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i) → I ≤ f a ∨ I ≤ f b ∨ ∃ i, i ∈ s ∧ I ≤ f i\na b i : ι\nt : Finset ι\nhit : ¬i ∈ t\nhn : Finset.card t = n\nh : ↑I ⊆ ↑(f a) ∪ ↑(f i) ∪ ⋃ (x : ι) (_ : x ∈ ↑t), ↑(f x)\nhp : IsPrime (f i) ∧ ∀ (x : ι), x ∈ t → IsPrime (f x)\nHt : ¬∃ j, j ∈ t ∧ f j ≤ f i\nHa : ¬f a ≤ f i\nHb : f b ≤ f i\n⊢ ↑I ⊆ ↑(f a) ∪ ↑(f i) ∪ ⋃ (j : ι) (_ : j ∈ ↑t), ↑(f j)\n[PROOFSTEP]\nexact h\n[GOAL]\ncase pos\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns : Finset ι\nf : ι → Ideal R\na✝ b✝ : ι\nhp✝ : ∀ (i : ι), i ∈ s → IsPrime (f i)\nI : Ideal R\nn✝ : ℕ\nhn✝ : Finset.card s = n✝\nh✝ : ↑I ⊆ ↑(f a✝) ∪ ↑(f b✝) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i)\nn : ℕ\nih :\n  ∀ {s : Finset ι} {a b : ι},\n    (∀ (i : ι), i ∈ s → IsPrime (f i)) →\n      Finset.card s = n →\n        ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i) → I ≤ f a ∨ I ≤ f b ∨ ∃ i, i ∈ s ∧ I ≤ f i\na b i : ι\nt : Finset ι\nhit : ¬i ∈ t\nhn : Finset.card t = n\nh : ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i_1 : ι) (_ : i_1 ∈ ↑(insert i t)), ↑(f i_1)\nhp : IsPrime (f i) ∧ ∀ (x : ι), x ∈ t → IsPrime (f x)\nHt : ¬∃ j, j ∈ t ∧ f j ≤ f i\nHa : ¬f a ≤ f i\nHb : f b ≤ f i\nh' : ↑I ⊆ ↑(f a) ∪ ↑(f i) ∪ ⋃ (j : ι) (_ : j ∈ ↑t), ↑(f j)\n⊢ I ≤ f a ∨ I ≤ f b ∨ ∃ i_1, i_1 ∈ insert i t ∧ I ≤ f i_1\n[PROOFSTEP]\nspecialize ih hp.2 hn h'\n[GOAL]\ncase pos\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns : Finset ι\nf : ι → Ideal R\na✝ b✝ : ι\nhp✝ : ∀ (i : ι), i ∈ s → IsPrime (f i)\nI : Ideal R\nn✝ : ℕ\nhn✝ : Finset.card s = n✝\nh✝ : ↑I ⊆ ↑(f a✝) ∪ ↑(f b✝) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i)\nn : ℕ\na b i : ι\nt : Finset ι\nhit : ¬i ∈ t\nhn : Finset.card t = n\nh : ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i_1 : ι) (_ : i_1 ∈ ↑(insert i t)), ↑(f i_1)\nhp : IsPrime (f i) ∧ ∀ (x : ι), x ∈ t → IsPrime (f x)\nHt : ¬∃ j, j ∈ t ∧ f j ≤ f i\nHa : ¬f a ≤ f i\nHb : f b ≤ f i\nh' : ↑I ⊆ ↑(f a) ∪ ↑(f i) ∪ ⋃ (j : ι) (_ : j ∈ ↑t), ↑(f j)\nih : I ≤ f a ∨ I ≤ f i ∨ ∃ i, i ∈ t ∧ I ≤ f i\n⊢ I ≤ f a ∨ I ≤ f b ∨ ∃ i_1, i_1 ∈ insert i t ∧ I ≤ f i_1\n[PROOFSTEP]\nrcases ih with (ih | ih | ⟨k, hkt, ih⟩)\n[GOAL]\ncase pos.inl\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns : Finset ι\nf : ι → Ideal R\na✝ b✝ : ι\nhp✝ : ∀ (i : ι), i ∈ s → IsPrime (f i)\nI : Ideal R\nn✝ : ℕ\nhn✝ : Finset.card s = n✝\nh✝ : ↑I ⊆ ↑(f a✝) ∪ ↑(f b✝) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i)\nn : ℕ\na b i : ι\nt : Finset ι\nhit : ¬i ∈ t\nhn : Finset.card t = n\nh : ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i_1 : ι) (_ : i_1 ∈ ↑(insert i t)), ↑(f i_1)\nhp : IsPrime (f i) ∧ ∀ (x : ι), x ∈ t → IsPrime (f x)\nHt : ¬∃ j, j ∈ t ∧ f j ≤ f i\nHa : ¬f a ≤ f i\nHb : f b ≤ f i\nh' : ↑I ⊆ ↑(f a) ∪ ↑(f i) ∪ ⋃ (j : ι) (_ : j ∈ ↑t), ↑(f j)\nih : I ≤ f a\n⊢ I ≤ f a ∨ I ≤ f b ∨ ∃ i_1, i_1 ∈ insert i t ∧ I ≤ f i_1\n[PROOFSTEP]\nexact Or.inl ih\n[GOAL]\ncase pos.inr.inl\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns : Finset ι\nf : ι → Ideal R\na✝ b✝ : ι\nhp✝ : ∀ (i : ι), i ∈ s → IsPrime (f i)\nI : Ideal R\nn✝ : ℕ\nhn✝ : Finset.card s = n✝\nh✝ : ↑I ⊆ ↑(f a✝) ∪ ↑(f b✝) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i)\nn : ℕ\na b i : ι\nt : Finset ι\nhit : ¬i ∈ t\nhn : Finset.card t = n\nh : ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i_1 : ι) (_ : i_1 ∈ ↑(insert i t)), ↑(f i_1)\nhp : IsPrime (f i) ∧ ∀ (x : ι), x ∈ t → IsPrime (f x)\nHt : ¬∃ j, j ∈ t ∧ f j ≤ f i\nHa : ¬f a ≤ f i\nHb : f b ≤ f i\nh' : ↑I ⊆ ↑(f a) ∪ ↑(f i) ∪ ⋃ (j : ι) (_ : j ∈ ↑t), ↑(f j)\nih : I ≤ f i\n⊢ I ≤ f a ∨ I ≤ f b ∨ ∃ i_1, i_1 ∈ insert i t ∧ I ≤ f i_1\n[PROOFSTEP]\nexact Or.inr (Or.inr ⟨i, Finset.mem_insert_self i t, ih⟩)\n[GOAL]\ncase pos.inr.inr.intro.intro\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns : Finset ι\nf : ι → Ideal R\na✝ b✝ : ι\nhp✝ : ∀ (i : ι), i ∈ s → IsPrime (f i)\nI : Ideal R\nn✝ : ℕ\nhn✝ : Finset.card s = n✝\nh✝ : ↑I ⊆ ↑(f a✝) ∪ ↑(f b✝) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i)\nn : ℕ\na b i : ι\nt : Finset ι\nhit : ¬i ∈ t\nhn : Finset.card t = n\nh : ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i_1 : ι) (_ : i_1 ∈ ↑(insert i t)), ↑(f i_1)\nhp : IsPrime (f i) ∧ ∀ (x : ι), x ∈ t → IsPrime (f x)\nHt : ¬∃ j, j ∈ t ∧ f j ≤ f i\nHa : ¬f a ≤ f i\nHb : f b ≤ f i\nh' : ↑I ⊆ ↑(f a) ∪ ↑(f i) ∪ ⋃ (j : ι) (_ : j ∈ ↑t), ↑(f j)\nk : ι\nhkt : k ∈ t\nih : I ≤ f k\n⊢ I ≤ f a ∨ I ≤ f b ∨ ∃ i_1, i_1 ∈ insert i t ∧ I ≤ f i_1\n[PROOFSTEP]\nexact Or.inr (Or.inr ⟨k, Finset.mem_insert_of_mem hkt, ih⟩)\n[GOAL]\ncase neg\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns : Finset ι\nf : ι → Ideal R\na✝ b✝ : ι\nhp✝ : ∀ (i : ι), i ∈ s → IsPrime (f i)\nI : Ideal R\nn✝ : ℕ\nhn✝ : Finset.card s = n✝\nh✝ : ↑I ⊆ ↑(f a✝) ∪ ↑(f b✝) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i)\nn : ℕ\nih :\n  ∀ {s : Finset ι} {a b : ι},\n    (∀ (i : ι), i ∈ s → IsPrime (f i)) →\n      Finset.card s = n →\n        ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i) → I ≤ f a ∨ I ≤ f b ∨ ∃ i, i ∈ s ∧ I ≤ f i\na b i : ι\nt : Finset ι\nhit : ¬i ∈ t\nhn : Finset.card t = n\nh : ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i_1 : ι) (_ : i_1 ∈ ↑(insert i t)), ↑(f i_1)\nhp : IsPrime (f i) ∧ ∀ (x : ι), x ∈ t → IsPrime (f x)\nHt : ¬∃ j, j ∈ t ∧ f j ≤ f i\nHa : ¬f a ≤ f i\nHb : ¬f b ≤ f i\n⊢ I ≤ f a ∨ I ≤ f b ∨ ∃ i_1, i_1 ∈ insert i t ∧ I ≤ f i_1\n[PROOFSTEP]\nby_cases Hi : I ≤ f i\n[GOAL]\ncase pos\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns : Finset ι\nf : ι → Ideal R\na✝ b✝ : ι\nhp✝ : ∀ (i : ι), i ∈ s → IsPrime (f i)\nI : Ideal R\nn✝ : ℕ\nhn✝ : Finset.card s = n✝\nh✝ : ↑I ⊆ ↑(f a✝) ∪ ↑(f b✝) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i)\nn : ℕ\nih :\n  ∀ {s : Finset ι} {a b : ι},\n    (∀ (i : ι), i ∈ s → IsPrime (f i)) →\n      Finset.card s = n →\n        ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i) → I ≤ f a ∨ I ≤ f b ∨ ∃ i, i ∈ s ∧ I ≤ f i\na b i : ι\nt : Finset ι\nhit : ¬i ∈ t\nhn : Finset.card t = n\nh : ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i_1 : ι) (_ : i_1 ∈ ↑(insert i t)), ↑(f i_1)\nhp : IsPrime (f i) ∧ ∀ (x : ι), x ∈ t → IsPrime (f x)\nHt : ¬∃ j, j ∈ t ∧ f j ≤ f i\nHa : ¬f a ≤ f i\nHb : ¬f b ≤ f i\nHi : I ≤ f i\n⊢ I ≤ f a ∨ I ≤ f b ∨ ∃ i_1, i_1 ∈ insert i t ∧ I ≤ f i_1\n[PROOFSTEP]\nexact Or.inr (Or.inr ⟨i, Finset.mem_insert_self i t, Hi⟩)\n[GOAL]\ncase neg\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns : Finset ι\nf : ι → Ideal R\na✝ b✝ : ι\nhp✝ : ∀ (i : ι), i ∈ s → IsPrime (f i)\nI : Ideal R\nn✝ : ℕ\nhn✝ : Finset.card s = n✝\nh✝ : ↑I ⊆ ↑(f a✝) ∪ ↑(f b✝) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i)\nn : ℕ\nih :\n  ∀ {s : Finset ι} {a b : ι},\n    (∀ (i : ι), i ∈ s → IsPrime (f i)) →\n      Finset.card s = n →\n        ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i) → I ≤ f a ∨ I ≤ f b ∨ ∃ i, i ∈ s ∧ I ≤ f i\na b i : ι\nt : Finset ι\nhit : ¬i ∈ t\nhn : Finset.card t = n\nh : ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i_1 : ι) (_ : i_1 ∈ ↑(insert i t)), ↑(f i_1)\nhp : IsPrime (f i) ∧ ∀ (x : ι), x ∈ t → IsPrime (f x)\nHt : ¬∃ j, j ∈ t ∧ f j ≤ f i\nHa : ¬f a ≤ f i\nHb : ¬f b ≤ f i\nHi : ¬I ≤ f i\n⊢ I ≤ f a ∨ I ≤ f b ∨ ∃ i_1, i_1 ∈ insert i t ∧ I ≤ f i_1\n[PROOFSTEP]\nhave : ¬I ⊓ f a ⊓ f b ⊓ t.inf f ≤ f i :=\n  by\n  rcases t.eq_empty_or_nonempty with (rfl | hsne)\n  · rw [Finset.inf_empty, inf_top_eq, hp.1.inf_le, hp.1.inf_le, not_or, not_or]\n    exact ⟨⟨Hi, Ha⟩, Hb⟩\n  simp only [hp.1.inf_le, hp.1.inf_le' hsne, not_or]\n  exact ⟨⟨⟨Hi, Ha⟩, Hb⟩, Ht⟩\n[GOAL]\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns : Finset ι\nf : ι → Ideal R\na✝ b✝ : ι\nhp✝ : ∀ (i : ι), i ∈ s → IsPrime (f i)\nI : Ideal R\nn✝ : ℕ\nhn✝ : Finset.card s = n✝\nh✝ : ↑I ⊆ ↑(f a✝) ∪ ↑(f b✝) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i)\nn : ℕ\nih :\n  ∀ {s : Finset ι} {a b : ι},\n    (∀ (i : ι), i ∈ s → IsPrime (f i)) →\n      Finset.card s = n →\n        ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i) → I ≤ f a ∨ I ≤ f b ∨ ∃ i, i ∈ s ∧ I ≤ f i\na b i : ι\nt : Finset ι\nhit : ¬i ∈ t\nhn : Finset.card t = n\nh : ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i_1 : ι) (_ : i_1 ∈ ↑(insert i t)), ↑(f i_1)\nhp : IsPrime (f i) ∧ ∀ (x : ι), x ∈ t → IsPrime (f x)\nHt : ¬∃ j, j ∈ t ∧ f j ≤ f i\nHa : ¬f a ≤ f i\nHb : ¬f b ≤ f i\nHi : ¬I ≤ f i\n⊢ ¬I ⊓ f a ⊓ f b ⊓ Finset.inf t f ≤ f i\n[PROOFSTEP]\nrcases t.eq_empty_or_nonempty with (rfl | hsne)\n[GOAL]\ncase inl\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns : Finset ι\nf : ι → Ideal R\na✝ b✝ : ι\nhp✝ : ∀ (i : ι), i ∈ s → IsPrime (f i)\nI : Ideal R\nn✝ : ℕ\nhn✝ : Finset.card s = n✝\nh✝ : ↑I ⊆ ↑(f a✝) ∪ ↑(f b✝) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i)\nn : ℕ\nih :\n  ∀ {s : Finset ι} {a b : ι},\n    (∀ (i : ι), i ∈ s → IsPrime (f i)) →\n      Finset.card s = n →\n        ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i) → I ≤ f a ∨ I ≤ f b ∨ ∃ i, i ∈ s ∧ I ≤ f i\na b i : ι\nHa : ¬f a ≤ f i\nHb : ¬f b ≤ f i\nHi : ¬I ≤ f i\nhit : ¬i ∈ ∅\nhn : Finset.card ∅ = n\nh : ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i_1 : ι) (_ : i_1 ∈ ↑(insert i ∅)), ↑(f i_1)\nhp : IsPrime (f i) ∧ ∀ (x : ι), x ∈ ∅ → IsPrime (f x)\nHt : ¬∃ j, j ∈ ∅ ∧ f j ≤ f i\n⊢ ¬I ⊓ f a ⊓ f b ⊓ Finset.inf ∅ f ≤ f i\n[PROOFSTEP]\nrw [Finset.inf_empty, inf_top_eq, hp.1.inf_le, hp.1.inf_le, not_or, not_or]\n[GOAL]\ncase inl\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns : Finset ι\nf : ι → Ideal R\na✝ b✝ : ι\nhp✝ : ∀ (i : ι), i ∈ s → IsPrime (f i)\nI : Ideal R\nn✝ : ℕ\nhn✝ : Finset.card s = n✝\nh✝ : ↑I ⊆ ↑(f a✝) ∪ ↑(f b✝) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i)\nn : ℕ\nih :\n  ∀ {s : Finset ι} {a b : ι},\n    (∀ (i : ι), i ∈ s → IsPrime (f i)) →\n      Finset.card s = n →\n        ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i) → I ≤ f a ∨ I ≤ f b ∨ ∃ i, i ∈ s ∧ I ≤ f i\na b i : ι\nHa : ¬f a ≤ f i\nHb : ¬f b ≤ f i\nHi : ¬I ≤ f i\nhit : ¬i ∈ ∅\nhn : Finset.card ∅ = n\nh : ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i_1 : ι) (_ : i_1 ∈ ↑(insert i ∅)), ↑(f i_1)\nhp : IsPrime (f i) ∧ ∀ (x : ι), x ∈ ∅ → IsPrime (f x)\nHt : ¬∃ j, j ∈ ∅ ∧ f j ≤ f i\n⊢ (¬I ≤ f i ∧ ¬f a ≤ f i) ∧ ¬f b ≤ f i\n[PROOFSTEP]\nexact ⟨⟨Hi, Ha⟩, Hb⟩\n[GOAL]\ncase inr\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns : Finset ι\nf : ι → Ideal R\na✝ b✝ : ι\nhp✝ : ∀ (i : ι), i ∈ s → IsPrime (f i)\nI : Ideal R\nn✝ : ℕ\nhn✝ : Finset.card s = n✝\nh✝ : ↑I ⊆ ↑(f a✝) ∪ ↑(f b✝) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i)\nn : ℕ\nih :\n  ∀ {s : Finset ι} {a b : ι},\n    (∀ (i : ι), i ∈ s → IsPrime (f i)) →\n      Finset.card s = n →\n        ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i) → I ≤ f a ∨ I ≤ f b ∨ ∃ i, i ∈ s ∧ I ≤ f i\na b i : ι\nt : Finset ι\nhit : ¬i ∈ t\nhn : Finset.card t = n\nh : ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i_1 : ι) (_ : i_1 ∈ ↑(insert i t)), ↑(f i_1)\nhp : IsPrime (f i) ∧ ∀ (x : ι), x ∈ t → IsPrime (f x)\nHt : ¬∃ j, j ∈ t ∧ f j ≤ f i\nHa : ¬f a ≤ f i\nHb : ¬f b ≤ f i\nHi : ¬I ≤ f i\nhsne : Finset.Nonempty t\n⊢ ¬I ⊓ f a ⊓ f b ⊓ Finset.inf t f ≤ f i\n[PROOFSTEP]\nsimp only [hp.1.inf_le, hp.1.inf_le' hsne, not_or]\n[GOAL]\ncase inr\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns : Finset ι\nf : ι → Ideal R\na✝ b✝ : ι\nhp✝ : ∀ (i : ι), i ∈ s → IsPrime (f i)\nI : Ideal R\nn✝ : ℕ\nhn✝ : Finset.card s = n✝\nh✝ : ↑I ⊆ ↑(f a✝) ∪ ↑(f b✝) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i)\nn : ℕ\nih :\n  ∀ {s : Finset ι} {a b : ι},\n    (∀ (i : ι), i ∈ s → IsPrime (f i)) →\n      Finset.card s = n →\n        ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i) → I ≤ f a ∨ I ≤ f b ∨ ∃ i, i ∈ s ∧ I ≤ f i\na b i : ι\nt : Finset ι\nhit : ¬i ∈ t\nhn : Finset.card t = n\nh : ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i_1 : ι) (_ : i_1 ∈ ↑(insert i t)), ↑(f i_1)\nhp : IsPrime (f i) ∧ ∀ (x : ι), x ∈ t → IsPrime (f x)\nHt : ¬∃ j, j ∈ t ∧ f j ≤ f i\nHa : ¬f a ≤ f i\nHb : ¬f b ≤ f i\nHi : ¬I ≤ f i\nhsne : Finset.Nonempty t\n⊢ ((¬I ≤ f i ∧ ¬f a ≤ f i) ∧ ¬f b ≤ f i) ∧ ¬∃ i_1, i_1 ∈ t ∧ f i_1 ≤ f i\n[PROOFSTEP]\nexact ⟨⟨⟨Hi, Ha⟩, Hb⟩, Ht⟩\n[GOAL]\ncase neg\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns : Finset ι\nf : ι → Ideal R\na✝ b✝ : ι\nhp✝ : ∀ (i : ι), i ∈ s → IsPrime (f i)\nI : Ideal R\nn✝ : ℕ\nhn✝ : Finset.card s = n✝\nh✝ : ↑I ⊆ ↑(f a✝) ∪ ↑(f b✝) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i)\nn : ℕ\nih :\n  ∀ {s : Finset ι} {a b : ι},\n    (∀ (i : ι), i ∈ s → IsPrime (f i)) →\n      Finset.card s = n →\n        ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i) → I ≤ f a ∨ I ≤ f b ∨ ∃ i, i ∈ s ∧ I ≤ f i\na b i : ι\nt : Finset ι\nhit : ¬i ∈ t\nhn : Finset.card t = n\nh : ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i_1 : ι) (_ : i_1 ∈ ↑(insert i t)), ↑(f i_1)\nhp : IsPrime (f i) ∧ ∀ (x : ι), x ∈ t → IsPrime (f x)\nHt : ¬∃ j, j ∈ t ∧ f j ≤ f i\nHa : ¬f a ≤ f i\nHb : ¬f b ≤ f i\nHi : ¬I ≤ f i\nthis : ¬I ⊓ f a ⊓ f b ⊓ Finset.inf t f ≤ f i\n⊢ I ≤ f a ∨ I ≤ f b ∨ ∃ i_1, i_1 ∈ insert i t ∧ I ≤ f i_1\n[PROOFSTEP]\nrcases Set.not_subset.1 this with ⟨r, ⟨⟨⟨hrI, hra⟩, hrb⟩, hr⟩, hri⟩\n[GOAL]\ncase neg.intro.intro.intro.intro.intro\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns : Finset ι\nf : ι → Ideal R\na✝ b✝ : ι\nhp✝ : ∀ (i : ι), i ∈ s → IsPrime (f i)\nI : Ideal R\nn✝ : ℕ\nhn✝ : Finset.card s = n✝\nh✝ : ↑I ⊆ ↑(f a✝) ∪ ↑(f b✝) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i)\nn : ℕ\nih :\n  ∀ {s : Finset ι} {a b : ι},\n    (∀ (i : ι), i ∈ s → IsPrime (f i)) →\n      Finset.card s = n →\n        ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i) → I ≤ f a ∨ I ≤ f b ∨ ∃ i, i ∈ s ∧ I ≤ f i\na b i : ι\nt : Finset ι\nhit : ¬i ∈ t\nhn : Finset.card t = n\nh : ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i_1 : ι) (_ : i_1 ∈ ↑(insert i t)), ↑(f i_1)\nhp : IsPrime (f i) ∧ ∀ (x : ι), x ∈ t → IsPrime (f x)\nHt : ¬∃ j, j ∈ t ∧ f j ≤ f i\nHa : ¬f a ≤ f i\nHb : ¬f b ≤ f i\nHi : ¬I ≤ f i\nthis : ¬I ⊓ f a ⊓ f b ⊓ Finset.inf t f ≤ f i\nr : R\nhri : ¬r ∈ ↑(f i)\nhr : r ∈ ↑(Finset.inf t f)\nhrb : r ∈ ↑(f b)\nhrI : r ∈ ↑I\nhra : r ∈ ↑(f a)\n⊢ I ≤ f a ∨ I ≤ f b ∨ ∃ i_1, i_1 ∈ insert i t ∧ I ≤ f i_1\n[PROOFSTEP]\nby_cases HI : (I : Set R) ⊆ f a ∪ f b ∪ ⋃ j ∈ (↑t : Set ι), f j\n[GOAL]\ncase pos\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns : Finset ι\nf : ι → Ideal R\na✝ b✝ : ι\nhp✝ : ∀ (i : ι), i ∈ s → IsPrime (f i)\nI : Ideal R\nn✝ : ℕ\nhn✝ : Finset.card s = n✝\nh✝ : ↑I ⊆ ↑(f a✝) ∪ ↑(f b✝) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i)\nn : ℕ\nih :\n  ∀ {s : Finset ι} {a b : ι},\n    (∀ (i : ι), i ∈ s → IsPrime (f i)) →\n      Finset.card s = n →\n        ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i) → I ≤ f a ∨ I ≤ f b ∨ ∃ i, i ∈ s ∧ I ≤ f i\na b i : ι\nt : Finset ι\nhit : ¬i ∈ t\nhn : Finset.card t = n\nh : ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i_1 : ι) (_ : i_1 ∈ ↑(insert i t)), ↑(f i_1)\nhp : IsPrime (f i) ∧ ∀ (x : ι), x ∈ t → IsPrime (f x)\nHt : ¬∃ j, j ∈ t ∧ f j ≤ f i\nHa : ¬f a ≤ f i\nHb : ¬f b ≤ f i\nHi : ¬I ≤ f i\nthis : ¬I ⊓ f a ⊓ f b ⊓ Finset.inf t f ≤ f i\nr : R\nhri : ¬r ∈ ↑(f i)\nhr : r ∈ ↑(Finset.inf t f)\nhrb : r ∈ ↑(f b)\nhrI : r ∈ ↑I\nhra : r ∈ ↑(f a)\nHI : ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (j : ι) (_ : j ∈ ↑t), ↑(f j)\n⊢ I ≤ f a ∨ I ≤ f b ∨ ∃ i_1, i_1 ∈ insert i t ∧ I ≤ f i_1\n[PROOFSTEP]\nspecialize ih hp.2 hn HI\n[GOAL]\ncase pos\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns : Finset ι\nf : ι → Ideal R\na✝ b✝ : ι\nhp✝ : ∀ (i : ι), i ∈ s → IsPrime (f i)\nI : Ideal R\nn✝ : ℕ\nhn✝ : Finset.card s = n✝\nh✝ : ↑I ⊆ ↑(f a✝) ∪ ↑(f b✝) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i)\nn : ℕ\na b i : ι\nt : Finset ι\nhit : ¬i ∈ t\nhn : Finset.card t = n\nh : ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i_1 : ι) (_ : i_1 ∈ ↑(insert i t)), ↑(f i_1)\nhp : IsPrime (f i) ∧ ∀ (x : ι), x ∈ t → IsPrime (f x)\nHt : ¬∃ j, j ∈ t ∧ f j ≤ f i\nHa : ¬f a ≤ f i\nHb : ¬f b ≤ f i\nHi : ¬I ≤ f i\nthis : ¬I ⊓ f a ⊓ f b ⊓ Finset.inf t f ≤ f i\nr : R\nhri : ¬r ∈ ↑(f i)\nhr : r ∈ ↑(Finset.inf t f)\nhrb : r ∈ ↑(f b)\nhrI : r ∈ ↑I\nhra : r ∈ ↑(f a)\nHI : ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (j : ι) (_ : j ∈ ↑t), ↑(f j)\nih : I ≤ f a ∨ I ≤ f b ∨ ∃ i, i ∈ t ∧ I ≤ f i\n⊢ I ≤ f a ∨ I ≤ f b ∨ ∃ i_1, i_1 ∈ insert i t ∧ I ≤ f i_1\n[PROOFSTEP]\nrcases ih with (ih | ih | ⟨k, hkt, ih⟩)\n[GOAL]\ncase pos.inl\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns : Finset ι\nf : ι → Ideal R\na✝ b✝ : ι\nhp✝ : ∀ (i : ι), i ∈ s → IsPrime (f i)\nI : Ideal R\nn✝ : ℕ\nhn✝ : Finset.card s = n✝\nh✝ : ↑I ⊆ ↑(f a✝) ∪ ↑(f b✝) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i)\nn : ℕ\na b i : ι\nt : Finset ι\nhit : ¬i ∈ t\nhn : Finset.card t = n\nh : ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i_1 : ι) (_ : i_1 ∈ ↑(insert i t)), ↑(f i_1)\nhp : IsPrime (f i) ∧ ∀ (x : ι), x ∈ t → IsPrime (f x)\nHt : ¬∃ j, j ∈ t ∧ f j ≤ f i\nHa : ¬f a ≤ f i\nHb : ¬f b ≤ f i\nHi : ¬I ≤ f i\nthis : ¬I ⊓ f a ⊓ f b ⊓ Finset.inf t f ≤ f i\nr : R\nhri : ¬r ∈ ↑(f i)\nhr : r ∈ ↑(Finset.inf t f)\nhrb : r ∈ ↑(f b)\nhrI : r ∈ ↑I\nhra : r ∈ ↑(f a)\nHI : ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (j : ι) (_ : j ∈ ↑t), ↑(f j)\nih : I ≤ f a\n⊢ I ≤ f a ∨ I ≤ f b ∨ ∃ i_1, i_1 ∈ insert i t ∧ I ≤ f i_1\n[PROOFSTEP]\nleft\n[GOAL]\ncase pos.inl.h\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns : Finset ι\nf : ι → Ideal R\na✝ b✝ : ι\nhp✝ : ∀ (i : ι), i ∈ s → IsPrime (f i)\nI : Ideal R\nn✝ : ℕ\nhn✝ : Finset.card s = n✝\nh✝ : ↑I ⊆ ↑(f a✝) ∪ ↑(f b✝) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i)\nn : ℕ\na b i : ι\nt : Finset ι\nhit : ¬i ∈ t\nhn : Finset.card t = n\nh : ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i_1 : ι) (_ : i_1 ∈ ↑(insert i t)), ↑(f i_1)\nhp : IsPrime (f i) ∧ ∀ (x : ι), x ∈ t → IsPrime (f x)\nHt : ¬∃ j, j ∈ t ∧ f j ≤ f i\nHa : ¬f a ≤ f i\nHb : ¬f b ≤ f i\nHi : ¬I ≤ f i\nthis : ¬I ⊓ f a ⊓ f b ⊓ Finset.inf t f ≤ f i\nr : R\nhri : ¬r ∈ ↑(f i)\nhr : r ∈ ↑(Finset.inf t f)\nhrb : r ∈ ↑(f b)\nhrI : r ∈ ↑I\nhra : r ∈ ↑(f a)\nHI : ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (j : ι) (_ : j ∈ ↑t), ↑(f j)\nih : I ≤ f a\n⊢ I ≤ f a\n[PROOFSTEP]\nexact ih\n[GOAL]\ncase pos.inr.inl\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns : Finset ι\nf : ι → Ideal R\na✝ b✝ : ι\nhp✝ : ∀ (i : ι), i ∈ s → IsPrime (f i)\nI : Ideal R\nn✝ : ℕ\nhn✝ : Finset.card s = n✝\nh✝ : ↑I ⊆ ↑(f a✝) ∪ ↑(f b✝) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i)\nn : ℕ\na b i : ι\nt : Finset ι\nhit : ¬i ∈ t\nhn : Finset.card t = n\nh : ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i_1 : ι) (_ : i_1 ∈ ↑(insert i t)), ↑(f i_1)\nhp : IsPrime (f i) ∧ ∀ (x : ι), x ∈ t → IsPrime (f x)\nHt : ¬∃ j, j ∈ t ∧ f j ≤ f i\nHa : ¬f a ≤ f i\nHb : ¬f b ≤ f i\nHi : ¬I ≤ f i\nthis : ¬I ⊓ f a ⊓ f b ⊓ Finset.inf t f ≤ f i\nr : R\nhri : ¬r ∈ ↑(f i)\nhr : r ∈ ↑(Finset.inf t f)\nhrb : r ∈ ↑(f b)\nhrI : r ∈ ↑I\nhra : r ∈ ↑(f a)\nHI : ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (j : ι) (_ : j ∈ ↑t), ↑(f j)\nih : I ≤ f b\n⊢ I ≤ f a ∨ I ≤ f b ∨ ∃ i_1, i_1 ∈ insert i t ∧ I ≤ f i_1\n[PROOFSTEP]\nright\n[GOAL]\ncase pos.inr.inl.h\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns : Finset ι\nf : ι → Ideal R\na✝ b✝ : ι\nhp✝ : ∀ (i : ι), i ∈ s → IsPrime (f i)\nI : Ideal R\nn✝ : ℕ\nhn✝ : Finset.card s = n✝\nh✝ : ↑I ⊆ ↑(f a✝) ∪ ↑(f b✝) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i)\nn : ℕ\na b i : ι\nt : Finset ι\nhit : ¬i ∈ t\nhn : Finset.card t = n\nh : ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i_1 : ι) (_ : i_1 ∈ ↑(insert i t)), ↑(f i_1)\nhp : IsPrime (f i) ∧ ∀ (x : ι), x ∈ t → IsPrime (f x)\nHt : ¬∃ j, j ∈ t ∧ f j ≤ f i\nHa : ¬f a ≤ f i\nHb : ¬f b ≤ f i\nHi : ¬I ≤ f i\nthis : ¬I ⊓ f a ⊓ f b ⊓ Finset.inf t f ≤ f i\nr : R\nhri : ¬r ∈ ↑(f i)\nhr : r ∈ ↑(Finset.inf t f)\nhrb : r ∈ ↑(f b)\nhrI : r ∈ ↑I\nhra : r ∈ ↑(f a)\nHI : ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (j : ι) (_ : j ∈ ↑t), ↑(f j)\nih : I ≤ f b\n⊢ I ≤ f b ∨ ∃ i_1, i_1 ∈ insert i t ∧ I ≤ f i_1\n[PROOFSTEP]\nleft\n[GOAL]\ncase pos.inr.inl.h.h\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns : Finset ι\nf : ι → Ideal R\na✝ b✝ : ι\nhp✝ : ∀ (i : ι), i ∈ s → IsPrime (f i)\nI : Ideal R\nn✝ : ℕ\nhn✝ : Finset.card s = n✝\nh✝ : ↑I ⊆ ↑(f a✝) ∪ ↑(f b✝) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i)\nn : ℕ\na b i : ι\nt : Finset ι\nhit : ¬i ∈ t\nhn : Finset.card t = n\nh : ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i_1 : ι) (_ : i_1 ∈ ↑(insert i t)), ↑(f i_1)\nhp : IsPrime (f i) ∧ ∀ (x : ι), x ∈ t → IsPrime (f x)\nHt : ¬∃ j, j ∈ t ∧ f j ≤ f i\nHa : ¬f a ≤ f i\nHb : ¬f b ≤ f i\nHi : ¬I ≤ f i\nthis : ¬I ⊓ f a ⊓ f b ⊓ Finset.inf t f ≤ f i\nr : R\nhri : ¬r ∈ ↑(f i)\nhr : r ∈ ↑(Finset.inf t f)\nhrb : r ∈ ↑(f b)\nhrI : r ∈ ↑I\nhra : r ∈ ↑(f a)\nHI : ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (j : ι) (_ : j ∈ ↑t), ↑(f j)\nih : I ≤ f b\n⊢ I ≤ f b\n[PROOFSTEP]\nexact ih\n[GOAL]\ncase pos.inr.inr.intro.intro\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns : Finset ι\nf : ι → Ideal R\na✝ b✝ : ι\nhp✝ : ∀ (i : ι), i ∈ s → IsPrime (f i)\nI : Ideal R\nn✝ : ℕ\nhn✝ : Finset.card s = n✝\nh✝ : ↑I ⊆ ↑(f a✝) ∪ ↑(f b✝) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i)\nn : ℕ\na b i : ι\nt : Finset ι\nhit : ¬i ∈ t\nhn : Finset.card t = n\nh : ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i_1 : ι) (_ : i_1 ∈ ↑(insert i t)), ↑(f i_1)\nhp : IsPrime (f i) ∧ ∀ (x : ι), x ∈ t → IsPrime (f x)\nHt : ¬∃ j, j ∈ t ∧ f j ≤ f i\nHa : ¬f a ≤ f i\nHb : ¬f b ≤ f i\nHi : ¬I ≤ f i\nthis : ¬I ⊓ f a ⊓ f b ⊓ Finset.inf t f ≤ f i\nr : R\nhri : ¬r ∈ ↑(f i)\nhr : r ∈ ↑(Finset.inf t f)\nhrb : r ∈ ↑(f b)\nhrI : r ∈ ↑I\nhra : r ∈ ↑(f a)\nHI : ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (j : ι) (_ : j ∈ ↑t), ↑(f j)\nk : ι\nhkt : k ∈ t\nih : I ≤ f k\n⊢ I ≤ f a ∨ I ≤ f b ∨ ∃ i_1, i_1 ∈ insert i t ∧ I ≤ f i_1\n[PROOFSTEP]\nright\n[GOAL]\ncase pos.inr.inr.intro.intro.h\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns : Finset ι\nf : ι → Ideal R\na✝ b✝ : ι\nhp✝ : ∀ (i : ι), i ∈ s → IsPrime (f i)\nI : Ideal R\nn✝ : ℕ\nhn✝ : Finset.card s = n✝\nh✝ : ↑I ⊆ ↑(f a✝) ∪ ↑(f b✝) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i)\nn : ℕ\na b i : ι\nt : Finset ι\nhit : ¬i ∈ t\nhn : Finset.card t = n\nh : ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i_1 : ι) (_ : i_1 ∈ ↑(insert i t)), ↑(f i_1)\nhp : IsPrime (f i) ∧ ∀ (x : ι), x ∈ t → IsPrime (f x)\nHt : ¬∃ j, j ∈ t ∧ f j ≤ f i\nHa : ¬f a ≤ f i\nHb : ¬f b ≤ f i\nHi : ¬I ≤ f i\nthis : ¬I ⊓ f a ⊓ f b ⊓ Finset.inf t f ≤ f i\nr : R\nhri : ¬r ∈ ↑(f i)\nhr : r ∈ ↑(Finset.inf t f)\nhrb : r ∈ ↑(f b)\nhrI : r ∈ ↑I\nhra : r ∈ ↑(f a)\nHI : ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (j : ι) (_ : j ∈ ↑t), ↑(f j)\nk : ι\nhkt : k ∈ t\nih : I ≤ f k\n⊢ I ≤ f b ∨ ∃ i_1, i_1 ∈ insert i t ∧ I ≤ f i_1\n[PROOFSTEP]\nright\n[GOAL]\ncase pos.inr.inr.intro.intro.h.h\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns : Finset ι\nf : ι → Ideal R\na✝ b✝ : ι\nhp✝ : ∀ (i : ι), i ∈ s → IsPrime (f i)\nI : Ideal R\nn✝ : ℕ\nhn✝ : Finset.card s = n✝\nh✝ : ↑I ⊆ ↑(f a✝) ∪ ↑(f b✝) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i)\nn : ℕ\na b i : ι\nt : Finset ι\nhit : ¬i ∈ t\nhn : Finset.card t = n\nh : ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i_1 : ι) (_ : i_1 ∈ ↑(insert i t)), ↑(f i_1)\nhp : IsPrime (f i) ∧ ∀ (x : ι), x ∈ t → IsPrime (f x)\nHt : ¬∃ j, j ∈ t ∧ f j ≤ f i\nHa : ¬f a ≤ f i\nHb : ¬f b ≤ f i\nHi : ¬I ≤ f i\nthis : ¬I ⊓ f a ⊓ f b ⊓ Finset.inf t f ≤ f i\nr : R\nhri : ¬r ∈ ↑(f i)\nhr : r ∈ ↑(Finset.inf t f)\nhrb : r ∈ ↑(f b)\nhrI : r ∈ ↑I\nhra : r ∈ ↑(f a)\nHI : ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (j : ι) (_ : j ∈ ↑t), ↑(f j)\nk : ι\nhkt : k ∈ t\nih : I ≤ f k\n⊢ ∃ i_1, i_1 ∈ insert i t ∧ I ≤ f i_1\n[PROOFSTEP]\nexact ⟨k, Finset.mem_insert_of_mem hkt, ih⟩\n[GOAL]\ncase neg\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns : Finset ι\nf : ι → Ideal R\na✝ b✝ : ι\nhp✝ : ∀ (i : ι), i ∈ s → IsPrime (f i)\nI : Ideal R\nn✝ : ℕ\nhn✝ : Finset.card s = n✝\nh✝ : ↑I ⊆ ↑(f a✝) ∪ ↑(f b✝) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i)\nn : ℕ\nih :\n  ∀ {s : Finset ι} {a b : ι},\n    (∀ (i : ι), i ∈ s → IsPrime (f i)) →\n      Finset.card s = n →\n        ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i) → I ≤ f a ∨ I ≤ f b ∨ ∃ i, i ∈ s ∧ I ≤ f i\na b i : ι\nt : Finset ι\nhit : ¬i ∈ t\nhn : Finset.card t = n\nh : ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i_1 : ι) (_ : i_1 ∈ ↑(insert i t)), ↑(f i_1)\nhp : IsPrime (f i) ∧ ∀ (x : ι), x ∈ t → IsPrime (f x)\nHt : ¬∃ j, j ∈ t ∧ f j ≤ f i\nHa : ¬f a ≤ f i\nHb : ¬f b ≤ f i\nHi : ¬I ≤ f i\nthis : ¬I ⊓ f a ⊓ f b ⊓ Finset.inf t f ≤ f i\nr : R\nhri : ¬r ∈ ↑(f i)\nhr : r ∈ ↑(Finset.inf t f)\nhrb : r ∈ ↑(f b)\nhrI : r ∈ ↑I\nhra : r ∈ ↑(f a)\nHI : ¬↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (j : ι) (_ : j ∈ ↑t), ↑(f j)\n⊢ I ≤ f a ∨ I ≤ f b ∨ ∃ i_1, i_1 ∈ insert i t ∧ I ≤ f i_1\n[PROOFSTEP]\nexfalso\n[GOAL]\ncase neg.h\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns : Finset ι\nf : ι → Ideal R\na✝ b✝ : ι\nhp✝ : ∀ (i : ι), i ∈ s → IsPrime (f i)\nI : Ideal R\nn✝ : ℕ\nhn✝ : Finset.card s = n✝\nh✝ : ↑I ⊆ ↑(f a✝) ∪ ↑(f b✝) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i)\nn : ℕ\nih :\n  ∀ {s : Finset ι} {a b : ι},\n    (∀ (i : ι), i ∈ s → IsPrime (f i)) →\n      Finset.card s = n →\n        ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i) → I ≤ f a ∨ I ≤ f b ∨ ∃ i, i ∈ s ∧ I ≤ f i\na b i : ι\nt : Finset ι\nhit : ¬i ∈ t\nhn : Finset.card t = n\nh : ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i_1 : ι) (_ : i_1 ∈ ↑(insert i t)), ↑(f i_1)\nhp : IsPrime (f i) ∧ ∀ (x : ι), x ∈ t → IsPrime (f x)\nHt : ¬∃ j, j ∈ t ∧ f j ≤ f i\nHa : ¬f a ≤ f i\nHb : ¬f b ≤ f i\nHi : ¬I ≤ f i\nthis : ¬I ⊓ f a ⊓ f b ⊓ Finset.inf t f ≤ f i\nr : R\nhri : ¬r ∈ ↑(f i)\nhr : r ∈ ↑(Finset.inf t f)\nhrb : r ∈ ↑(f b)\nhrI : r ∈ ↑I\nhra : r ∈ ↑(f a)\nHI : ¬↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (j : ι) (_ : j ∈ ↑t), ↑(f j)\n⊢ False\n[PROOFSTEP]\nrcases Set.not_subset.1 HI with ⟨s, hsI, hs⟩\n[GOAL]\ncase neg.h.intro.intro\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns✝ : Finset ι\nf : ι → Ideal R\na✝ b✝ : ι\nhp✝ : ∀ (i : ι), i ∈ s✝ → IsPrime (f i)\nI : Ideal R\nn✝ : ℕ\nhn✝ : Finset.card s✝ = n✝\nh✝ : ↑I ⊆ ↑(f a✝) ∪ ↑(f b✝) ∪ ⋃ (i : ι) (_ : i ∈ ↑s✝), ↑(f i)\nn : ℕ\nih :\n  ∀ {s : Finset ι} {a b : ι},\n    (∀ (i : ι), i ∈ s → IsPrime (f i)) →\n      Finset.card s = n →\n        ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i) → I ≤ f a ∨ I ≤ f b ∨ ∃ i, i ∈ s ∧ I ≤ f i\na b i : ι\nt : Finset ι\nhit : ¬i ∈ t\nhn : Finset.card t = n\nh : ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i_1 : ι) (_ : i_1 ∈ ↑(insert i t)), ↑(f i_1)\nhp : IsPrime (f i) ∧ ∀ (x : ι), x ∈ t → IsPrime (f x)\nHt : ¬∃ j, j ∈ t ∧ f j ≤ f i\nHa : ¬f a ≤ f i\nHb : ¬f b ≤ f i\nHi : ¬I ≤ f i\nthis : ¬I ⊓ f a ⊓ f b ⊓ Finset.inf t f ≤ f i\nr : R\nhri : ¬r ∈ ↑(f i)\nhr : r ∈ ↑(Finset.inf t f)\nhrb : r ∈ ↑(f b)\nhrI : r ∈ ↑I\nhra : r ∈ ↑(f a)\nHI : ¬↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (j : ι) (_ : j ∈ ↑t), ↑(f j)\ns : R\nhsI : s ∈ ↑I\nhs : ¬s ∈ ↑(f a) ∪ ↑(f b) ∪ ⋃ (j : ι) (_ : j ∈ ↑t), ↑(f j)\n⊢ False\n[PROOFSTEP]\nrw [Finset.coe_insert, Set.biUnion_insert] at h \n[GOAL]\ncase neg.h.intro.intro\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns✝ : Finset ι\nf : ι → Ideal R\na✝ b✝ : ι\nhp✝ : ∀ (i : ι), i ∈ s✝ → IsPrime (f i)\nI : Ideal R\nn✝ : ℕ\nhn✝ : Finset.card s✝ = n✝\nh✝ : ↑I ⊆ ↑(f a✝) ∪ ↑(f b✝) ∪ ⋃ (i : ι) (_ : i ∈ ↑s✝), ↑(f i)\nn : ℕ\nih :\n  ∀ {s : Finset ι} {a b : ι},\n    (∀ (i : ι), i ∈ s → IsPrime (f i)) →\n      Finset.card s = n →\n        ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i) → I ≤ f a ∨ I ≤ f b ∨ ∃ i, i ∈ s ∧ I ≤ f i\na b i : ι\nt : Finset ι\nhit : ¬i ∈ t\nhn : Finset.card t = n\nh : ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ (↑(f i) ∪ ⋃ (x : ι) (_ : x ∈ ↑t), ↑(f x))\nhp : IsPrime (f i) ∧ ∀ (x : ι), x ∈ t → IsPrime (f x)\nHt : ¬∃ j, j ∈ t ∧ f j ≤ f i\nHa : ¬f a ≤ f i\nHb : ¬f b ≤ f i\nHi : ¬I ≤ f i\nthis : ¬I ⊓ f a ⊓ f b ⊓ Finset.inf t f ≤ f i\nr : R\nhri : ¬r ∈ ↑(f i)\nhr : r ∈ ↑(Finset.inf t f)\nhrb : r ∈ ↑(f b)\nhrI : r ∈ ↑I\nhra : r ∈ ↑(f a)\nHI : ¬↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (j : ι) (_ : j ∈ ↑t), ↑(f j)\ns : R\nhsI : s ∈ ↑I\nhs : ¬s ∈ ↑(f a) ∪ ↑(f b) ∪ ⋃ (j : ι) (_ : j ∈ ↑t), ↑(f j)\n⊢ False\n[PROOFSTEP]\nhave hsi : s ∈ f i := ((h hsI).resolve_left (mt Or.inl hs)).resolve_right (mt Or.inr hs)\n[GOAL]\ncase neg.h.intro.intro\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns✝ : Finset ι\nf : ι → Ideal R\na✝ b✝ : ι\nhp✝ : ∀ (i : ι), i ∈ s✝ → IsPrime (f i)\nI : Ideal R\nn✝ : ℕ\nhn✝ : Finset.card s✝ = n✝\nh✝ : ↑I ⊆ ↑(f a✝) ∪ ↑(f b✝) ∪ ⋃ (i : ι) (_ : i ∈ ↑s✝), ↑(f i)\nn : ℕ\nih :\n  ∀ {s : Finset ι} {a b : ι},\n    (∀ (i : ι), i ∈ s → IsPrime (f i)) →\n      Finset.card s = n →\n        ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i) → I ≤ f a ∨ I ≤ f b ∨ ∃ i, i ∈ s ∧ I ≤ f i\na b i : ι\nt : Finset ι\nhit : ¬i ∈ t\nhn : Finset.card t = n\nh : ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ (↑(f i) ∪ ⋃ (x : ι) (_ : x ∈ ↑t), ↑(f x))\nhp : IsPrime (f i) ∧ ∀ (x : ι), x ∈ t → IsPrime (f x)\nHt : ¬∃ j, j ∈ t ∧ f j ≤ f i\nHa : ¬f a ≤ f i\nHb : ¬f b ≤ f i\nHi : ¬I ≤ f i\nthis : ¬I ⊓ f a ⊓ f b ⊓ Finset.inf t f ≤ f i\nr : R\nhri : ¬r ∈ ↑(f i)\nhr : r ∈ ↑(Finset.inf t f)\nhrb : r ∈ ↑(f b)\nhrI : r ∈ ↑I\nhra : r ∈ ↑(f a)\nHI : ¬↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (j : ι) (_ : j ∈ ↑t), ↑(f j)\ns : R\nhsI : s ∈ ↑I\nhs : ¬s ∈ ↑(f a) ∪ ↑(f b) ∪ ⋃ (j : ι) (_ : j ∈ ↑t), ↑(f j)\nhsi : s ∈ f i\n⊢ False\n[PROOFSTEP]\nrcases h (I.add_mem hrI hsI) with (⟨ha | hb⟩ | hi | ht)\n[GOAL]\ncase neg.h.intro.intro.inl.inl\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns✝ : Finset ι\nf : ι → Ideal R\na✝ b✝ : ι\nhp✝ : ∀ (i : ι), i ∈ s✝ → IsPrime (f i)\nI : Ideal R\nn✝ : ℕ\nhn✝ : Finset.card s✝ = n✝\nh✝ : ↑I ⊆ ↑(f a✝) ∪ ↑(f b✝) ∪ ⋃ (i : ι) (_ : i ∈ ↑s✝), ↑(f i)\nn : ℕ\nih :\n  ∀ {s : Finset ι} {a b : ι},\n    (∀ (i : ι), i ∈ s → IsPrime (f i)) →\n      Finset.card s = n →\n        ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i) → I ≤ f a ∨ I ≤ f b ∨ ∃ i, i ∈ s ∧ I ≤ f i\na b i : ι\nt : Finset ι\nhit : ¬i ∈ t\nhn : Finset.card t = n\nh : ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ (↑(f i) ∪ ⋃ (x : ι) (_ : x ∈ ↑t), ↑(f x))\nhp : IsPrime (f i) ∧ ∀ (x : ι), x ∈ t → IsPrime (f x)\nHt : ¬∃ j, j ∈ t ∧ f j ≤ f i\nHa : ¬f a ≤ f i\nHb : ¬f b ≤ f i\nHi : ¬I ≤ f i\nthis : ¬I ⊓ f a ⊓ f b ⊓ Finset.inf t f ≤ f i\nr : R\nhri : ¬r ∈ ↑(f i)\nhr : r ∈ ↑(Finset.inf t f)\nhrb : r ∈ ↑(f b)\nhrI : r ∈ ↑I\nhra : r ∈ ↑(f a)\nHI : ¬↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (j : ι) (_ : j ∈ ↑t), ↑(f j)\ns : R\nhsI : s ∈ ↑I\nhs : ¬s ∈ ↑(f a) ∪ ↑(f b) ∪ ⋃ (j : ι) (_ : j ∈ ↑t), ↑(f j)\nhsi : s ∈ f i\nha : r + s ∈ ↑(f a)\n⊢ False\n[PROOFSTEP]\nexact hs (Or.inl <| Or.inl <| add_sub_cancel' r s ▸ (f a).sub_mem ha hra)\n[GOAL]\ncase neg.h.intro.intro.inl.inr\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns✝ : Finset ι\nf : ι → Ideal R\na✝ b✝ : ι\nhp✝ : ∀ (i : ι), i ∈ s✝ → IsPrime (f i)\nI : Ideal R\nn✝ : ℕ\nhn✝ : Finset.card s✝ = n✝\nh✝ : ↑I ⊆ ↑(f a✝) ∪ ↑(f b✝) ∪ ⋃ (i : ι) (_ : i ∈ ↑s✝), ↑(f i)\nn : ℕ\nih :\n  ∀ {s : Finset ι} {a b : ι},\n    (∀ (i : ι), i ∈ s → IsPrime (f i)) →\n      Finset.card s = n →\n        ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i) → I ≤ f a ∨ I ≤ f b ∨ ∃ i, i ∈ s ∧ I ≤ f i\na b i : ι\nt : Finset ι\nhit : ¬i ∈ t\nhn : Finset.card t = n\nh : ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ (↑(f i) ∪ ⋃ (x : ι) (_ : x ∈ ↑t), ↑(f x))\nhp : IsPrime (f i) ∧ ∀ (x : ι), x ∈ t → IsPrime (f x)\nHt : ¬∃ j, j ∈ t ∧ f j ≤ f i\nHa : ¬f a ≤ f i\nHb : ¬f b ≤ f i\nHi : ¬I ≤ f i\nthis : ¬I ⊓ f a ⊓ f b ⊓ Finset.inf t f ≤ f i\nr : R\nhri : ¬r ∈ ↑(f i)\nhr : r ∈ ↑(Finset.inf t f)\nhrb : r ∈ ↑(f b)\nhrI : r ∈ ↑I\nhra : r ∈ ↑(f a)\nHI : ¬↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (j : ι) (_ : j ∈ ↑t), ↑(f j)\ns : R\nhsI : s ∈ ↑I\nhs : ¬s ∈ ↑(f a) ∪ ↑(f b) ∪ ⋃ (j : ι) (_ : j ∈ ↑t), ↑(f j)\nhsi : s ∈ f i\nhb : r + s ∈ ↑(f b)\n⊢ False\n[PROOFSTEP]\nexact hs (Or.inl <| Or.inr <| add_sub_cancel' r s ▸ (f b).sub_mem hb hrb)\n[GOAL]\ncase neg.h.intro.intro.inr.inl\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns✝ : Finset ι\nf : ι → Ideal R\na✝ b✝ : ι\nhp✝ : ∀ (i : ι), i ∈ s✝ → IsPrime (f i)\nI : Ideal R\nn✝ : ℕ\nhn✝ : Finset.card s✝ = n✝\nh✝ : ↑I ⊆ ↑(f a✝) ∪ ↑(f b✝) ∪ ⋃ (i : ι) (_ : i ∈ ↑s✝), ↑(f i)\nn : ℕ\nih :\n  ∀ {s : Finset ι} {a b : ι},\n    (∀ (i : ι), i ∈ s → IsPrime (f i)) →\n      Finset.card s = n →\n        ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i) → I ≤ f a ∨ I ≤ f b ∨ ∃ i, i ∈ s ∧ I ≤ f i\na b i : ι\nt : Finset ι\nhit : ¬i ∈ t\nhn : Finset.card t = n\nh : ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ (↑(f i) ∪ ⋃ (x : ι) (_ : x ∈ ↑t), ↑(f x))\nhp : IsPrime (f i) ∧ ∀ (x : ι), x ∈ t → IsPrime (f x)\nHt : ¬∃ j, j ∈ t ∧ f j ≤ f i\nHa : ¬f a ≤ f i\nHb : ¬f b ≤ f i\nHi : ¬I ≤ f i\nthis : ¬I ⊓ f a ⊓ f b ⊓ Finset.inf t f ≤ f i\nr : R\nhri : ¬r ∈ ↑(f i)\nhr : r ∈ ↑(Finset.inf t f)\nhrb : r ∈ ↑(f b)\nhrI : r ∈ ↑I\nhra : r ∈ ↑(f a)\nHI : ¬↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (j : ι) (_ : j ∈ ↑t), ↑(f j)\ns : R\nhsI : s ∈ ↑I\nhs : ¬s ∈ ↑(f a) ∪ ↑(f b) ∪ ⋃ (j : ι) (_ : j ∈ ↑t), ↑(f j)\nhsi : s ∈ f i\nhi : r + s ∈ ↑(f i)\n⊢ False\n[PROOFSTEP]\nexact hri (add_sub_cancel r s ▸ (f i).sub_mem hi hsi)\n[GOAL]\ncase neg.h.intro.intro.inr.inr\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns✝ : Finset ι\nf : ι → Ideal R\na✝ b✝ : ι\nhp✝ : ∀ (i : ι), i ∈ s✝ → IsPrime (f i)\nI : Ideal R\nn✝ : ℕ\nhn✝ : Finset.card s✝ = n✝\nh✝ : ↑I ⊆ ↑(f a✝) ∪ ↑(f b✝) ∪ ⋃ (i : ι) (_ : i ∈ ↑s✝), ↑(f i)\nn : ℕ\nih :\n  ∀ {s : Finset ι} {a b : ι},\n    (∀ (i : ι), i ∈ s → IsPrime (f i)) →\n      Finset.card s = n →\n        ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i) → I ≤ f a ∨ I ≤ f b ∨ ∃ i, i ∈ s ∧ I ≤ f i\na b i : ι\nt : Finset ι\nhit : ¬i ∈ t\nhn : Finset.card t = n\nh : ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ (↑(f i) ∪ ⋃ (x : ι) (_ : x ∈ ↑t), ↑(f x))\nhp : IsPrime (f i) ∧ ∀ (x : ι), x ∈ t → IsPrime (f x)\nHt : ¬∃ j, j ∈ t ∧ f j ≤ f i\nHa : ¬f a ≤ f i\nHb : ¬f b ≤ f i\nHi : ¬I ≤ f i\nthis : ¬I ⊓ f a ⊓ f b ⊓ Finset.inf t f ≤ f i\nr : R\nhri : ¬r ∈ ↑(f i)\nhr : r ∈ ↑(Finset.inf t f)\nhrb : r ∈ ↑(f b)\nhrI : r ∈ ↑I\nhra : r ∈ ↑(f a)\nHI : ¬↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (j : ι) (_ : j ∈ ↑t), ↑(f j)\ns : R\nhsI : s ∈ ↑I\nhs : ¬s ∈ ↑(f a) ∪ ↑(f b) ∪ ⋃ (j : ι) (_ : j ∈ ↑t), ↑(f j)\nhsi : s ∈ f i\nht : r + s ∈ ⋃ (x : ι) (_ : x ∈ ↑t), ↑(f x)\n⊢ False\n[PROOFSTEP]\nrw [Set.mem_iUnion₂] at ht \n[GOAL]\ncase neg.h.intro.intro.inr.inr\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns✝ : Finset ι\nf : ι → Ideal R\na✝ b✝ : ι\nhp✝ : ∀ (i : ι), i ∈ s✝ → IsPrime (f i)\nI : Ideal R\nn✝ : ℕ\nhn✝ : Finset.card s✝ = n✝\nh✝ : ↑I ⊆ ↑(f a✝) ∪ ↑(f b✝) ∪ ⋃ (i : ι) (_ : i ∈ ↑s✝), ↑(f i)\nn : ℕ\nih :\n  ∀ {s : Finset ι} {a b : ι},\n    (∀ (i : ι), i ∈ s → IsPrime (f i)) →\n      Finset.card s = n →\n        ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i) → I ≤ f a ∨ I ≤ f b ∨ ∃ i, i ∈ s ∧ I ≤ f i\na b i : ι\nt : Finset ι\nhit : ¬i ∈ t\nhn : Finset.card t = n\nh : ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ (↑(f i) ∪ ⋃ (x : ι) (_ : x ∈ ↑t), ↑(f x))\nhp : IsPrime (f i) ∧ ∀ (x : ι), x ∈ t → IsPrime (f x)\nHt : ¬∃ j, j ∈ t ∧ f j ≤ f i\nHa : ¬f a ≤ f i\nHb : ¬f b ≤ f i\nHi : ¬I ≤ f i\nthis : ¬I ⊓ f a ⊓ f b ⊓ Finset.inf t f ≤ f i\nr : R\nhri : ¬r ∈ ↑(f i)\nhr : r ∈ ↑(Finset.inf t f)\nhrb : r ∈ ↑(f b)\nhrI : r ∈ ↑I\nhra : r ∈ ↑(f a)\nHI : ¬↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (j : ι) (_ : j ∈ ↑t), ↑(f j)\ns : R\nhsI : s ∈ ↑I\nhs : ¬s ∈ ↑(f a) ∪ ↑(f b) ∪ ⋃ (j : ι) (_ : j ∈ ↑t), ↑(f j)\nhsi : s ∈ f i\nht : ∃ i j, r + s ∈ ↑(f i)\n⊢ False\n[PROOFSTEP]\nrcases ht with ⟨j, hjt, hj⟩\n[GOAL]\ncase neg.h.intro.intro.inr.inr.intro.intro\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns✝ : Finset ι\nf : ι → Ideal R\na✝ b✝ : ι\nhp✝ : ∀ (i : ι), i ∈ s✝ → IsPrime (f i)\nI : Ideal R\nn✝ : ℕ\nhn✝ : Finset.card s✝ = n✝\nh✝ : ↑I ⊆ ↑(f a✝) ∪ ↑(f b✝) ∪ ⋃ (i : ι) (_ : i ∈ ↑s✝), ↑(f i)\nn : ℕ\nih :\n  ∀ {s : Finset ι} {a b : ι},\n    (∀ (i : ι), i ∈ s → IsPrime (f i)) →\n      Finset.card s = n →\n        ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i) → I ≤ f a ∨ I ≤ f b ∨ ∃ i, i ∈ s ∧ I ≤ f i\na b i : ι\nt : Finset ι\nhit : ¬i ∈ t\nhn : Finset.card t = n\nh : ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ (↑(f i) ∪ ⋃ (x : ι) (_ : x ∈ ↑t), ↑(f x))\nhp : IsPrime (f i) ∧ ∀ (x : ι), x ∈ t → IsPrime (f x)\nHt : ¬∃ j, j ∈ t ∧ f j ≤ f i\nHa : ¬f a ≤ f i\nHb : ¬f b ≤ f i\nHi : ¬I ≤ f i\nthis : ¬I ⊓ f a ⊓ f b ⊓ Finset.inf t f ≤ f i\nr : R\nhri : ¬r ∈ ↑(f i)\nhr : r ∈ ↑(Finset.inf t f)\nhrb : r ∈ ↑(f b)\nhrI : r ∈ ↑I\nhra : r ∈ ↑(f a)\nHI : ¬↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (j : ι) (_ : j ∈ ↑t), ↑(f j)\ns : R\nhsI : s ∈ ↑I\nhs : ¬s ∈ ↑(f a) ∪ ↑(f b) ∪ ⋃ (j : ι) (_ : j ∈ ↑t), ↑(f j)\nhsi : s ∈ f i\nj : ι\nhjt : j ∈ ↑t\nhj : r + s ∈ ↑(f j)\n⊢ False\n[PROOFSTEP]\nsimp only [Finset.inf_eq_iInf, SetLike.mem_coe, Submodule.mem_iInf] at hr \n[GOAL]\ncase neg.h.intro.intro.inr.inr.intro.intro\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns✝ : Finset ι\nf : ι → Ideal R\na✝ b✝ : ι\nhp✝ : ∀ (i : ι), i ∈ s✝ → IsPrime (f i)\nI : Ideal R\nn✝ : ℕ\nhn✝ : Finset.card s✝ = n✝\nh✝ : ↑I ⊆ ↑(f a✝) ∪ ↑(f b✝) ∪ ⋃ (i : ι) (_ : i ∈ ↑s✝), ↑(f i)\nn : ℕ\nih :\n  ∀ {s : Finset ι} {a b : ι},\n    (∀ (i : ι), i ∈ s → IsPrime (f i)) →\n      Finset.card s = n →\n        ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i) → I ≤ f a ∨ I ≤ f b ∨ ∃ i, i ∈ s ∧ I ≤ f i\na b i : ι\nt : Finset ι\nhit : ¬i ∈ t\nhn : Finset.card t = n\nh : ↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ (↑(f i) ∪ ⋃ (x : ι) (_ : x ∈ ↑t), ↑(f x))\nhp : IsPrime (f i) ∧ ∀ (x : ι), x ∈ t → IsPrime (f x)\nHt : ¬∃ j, j ∈ t ∧ f j ≤ f i\nHa : ¬f a ≤ f i\nHb : ¬f b ≤ f i\nHi : ¬I ≤ f i\nthis : ¬I ⊓ f a ⊓ f b ⊓ Finset.inf t f ≤ f i\nr : R\nhri : ¬r ∈ ↑(f i)\nhrb : r ∈ ↑(f b)\nhrI : r ∈ ↑I\nhra : r ∈ ↑(f a)\nHI : ¬↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ (j : ι) (_ : j ∈ ↑t), ↑(f j)\ns : R\nhsI : s ∈ ↑I\nhs : ¬s ∈ ↑(f a) ∪ ↑(f b) ∪ ⋃ (j : ι) (_ : j ∈ ↑t), ↑(f j)\nhsi : s ∈ f i\nj : ι\nhjt : j ∈ ↑t\nhj : r + s ∈ ↑(f j)\nhr : ∀ (i : ι), i ∈ t → r ∈ f i\n⊢ False\n[PROOFSTEP]\nexact hs (Or.inr <| Set.mem_biUnion hjt <| add_sub_cancel' r s ▸ (f j).sub_mem hj <| hr j hjt)\n[GOAL]\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns : Finset ι\nf : ι → Ideal R\na b : ι\nhp : ∀ (i : ι), i ∈ s → i ≠ a → i ≠ b → IsPrime (f i)\nI : Ideal R\nh : ↑I ⊆ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i)\n⊢ ∃ i, i ∈ s ∧ I ≤ f i\n[PROOFSTEP]\nclassical\nby_cases has : a ∈ s\n· obtain ⟨t, hat, rfl⟩ : ∃ t, a ∉ t ∧ insert a t = s := ⟨s.erase a, Finset.not_mem_erase a s, Finset.insert_erase has⟩\n  by_cases hbt : b ∈ t\n  · obtain ⟨u, hbu, rfl⟩ : ∃ u, b ∉ u ∧ insert b u = t := ⟨t.erase b, Finset.not_mem_erase b t, Finset.insert_erase hbt⟩\n    have hp' : ∀ i ∈ u, IsPrime (f i) := by\n      intro i hiu\n      refine' hp i (Finset.mem_insert_of_mem (Finset.mem_insert_of_mem hiu)) _ _ <;> rintro rfl <;>\n        solve_by_elim only [Finset.mem_insert_of_mem, *]\n    rw [Finset.coe_insert, Finset.coe_insert, Set.biUnion_insert, Set.biUnion_insert, ← Set.union_assoc,\n      subset_union_prime' hp'] at h \n    rwa [Finset.exists_mem_insert, Finset.exists_mem_insert]\n  · have hp' : ∀ j ∈ t, IsPrime (f j) := by\n      intro j hj\n      refine' hp j (Finset.mem_insert_of_mem hj) _ _ <;> rintro rfl <;> solve_by_elim only [Finset.mem_insert_of_mem, *]\n    rw [Finset.coe_insert, Set.biUnion_insert, ← Set.union_self (f a : Set R), subset_union_prime' hp', ← or_assoc,\n      or_self_iff] at h \n    rwa [Finset.exists_mem_insert]\n· by_cases hbs : b ∈ s\n  · obtain ⟨t, hbt, rfl⟩ : ∃ t, b ∉ t ∧ insert b t = s := ⟨s.erase b, Finset.not_mem_erase b s, Finset.insert_erase hbs⟩\n    have hp' : ∀ j ∈ t, IsPrime (f j) := by\n      intro j hj\n      refine' hp j (Finset.mem_insert_of_mem hj) _ _ <;> rintro rfl <;> solve_by_elim only [Finset.mem_insert_of_mem, *]\n    rw [Finset.coe_insert, Set.biUnion_insert, ← Set.union_self (f b : Set R), subset_union_prime' hp', ← or_assoc,\n      or_self_iff] at h \n    rwa [Finset.exists_mem_insert]\n  cases' s.eq_empty_or_nonempty with hse hsne\n  · subst hse\n    rw [Finset.coe_empty, Set.biUnion_empty, Set.subset_empty_iff] at h \n    have : (I : Set R) ≠ ∅ := Set.Nonempty.ne_empty (Set.nonempty_of_mem I.zero_mem)\n    exact absurd h this\n  · cases' hsne.bex with i his\n    obtain ⟨t, _, rfl⟩ : ∃ t, i ∉ t ∧ insert i t = s := ⟨s.erase i, Finset.not_mem_erase i s, Finset.insert_erase his⟩\n    have hp' : ∀ j ∈ t, IsPrime (f j) := by\n      intro j hj\n      refine' hp j (Finset.mem_insert_of_mem hj) _ _ <;> rintro rfl <;> solve_by_elim only [Finset.mem_insert_of_mem, *]\n    rw [Finset.coe_insert, Set.biUnion_insert, ← Set.union_self (f i : Set R), subset_union_prime' hp', ← or_assoc,\n      or_self_iff] at h \n    rwa [Finset.exists_mem_insert]\n[GOAL]\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns : Finset ι\nf : ι → Ideal R\na b : ι\nhp : ∀ (i : ι), i ∈ s → i ≠ a → i ≠ b → IsPrime (f i)\nI : Ideal R\nh : ↑I ⊆ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i)\n⊢ ∃ i, i ∈ s ∧ I ≤ f i\n[PROOFSTEP]\nby_cases has : a ∈ s\n[GOAL]\ncase pos\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns : Finset ι\nf : ι → Ideal R\na b : ι\nhp : ∀ (i : ι), i ∈ s → i ≠ a → i ≠ b → IsPrime (f i)\nI : Ideal R\nh : ↑I ⊆ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i)\nhas : a ∈ s\n⊢ ∃ i, i ∈ s ∧ I ≤ f i\n[PROOFSTEP]\nobtain ⟨t, hat, rfl⟩ : ∃ t, a ∉ t ∧ insert a t = s := ⟨s.erase a, Finset.not_mem_erase a s, Finset.insert_erase has⟩\n[GOAL]\ncase pos.intro.intro\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\nf : ι → Ideal R\na b : ι\nI : Ideal R\nt : Finset ι\nhat : ¬a ∈ t\nhp : ∀ (i : ι), i ∈ insert a t → i ≠ a → i ≠ b → IsPrime (f i)\nh : ↑I ⊆ ⋃ (i : ι) (_ : i ∈ ↑(insert a t)), ↑(f i)\nhas : a ∈ insert a t\n⊢ ∃ i, i ∈ insert a t ∧ I ≤ f i\n[PROOFSTEP]\nby_cases hbt : b ∈ t\n[GOAL]\ncase pos\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\nf : ι → Ideal R\na b : ι\nI : Ideal R\nt : Finset ι\nhat : ¬a ∈ t\nhp : ∀ (i : ι), i ∈ insert a t → i ≠ a → i ≠ b → IsPrime (f i)\nh : ↑I ⊆ ⋃ (i : ι) (_ : i ∈ ↑(insert a t)), ↑(f i)\nhas : a ∈ insert a t\nhbt : b ∈ t\n⊢ ∃ i, i ∈ insert a t ∧ I ≤ f i\n[PROOFSTEP]\nobtain ⟨u, hbu, rfl⟩ : ∃ u, b ∉ u ∧ insert b u = t := ⟨t.erase b, Finset.not_mem_erase b t, Finset.insert_erase hbt⟩\n[GOAL]\ncase pos.intro.intro\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\nf : ι → Ideal R\na b : ι\nI : Ideal R\nu : Finset ι\nhbu : ¬b ∈ u\nhat : ¬a ∈ insert b u\nhp : ∀ (i : ι), i ∈ insert a (insert b u) → i ≠ a → i ≠ b → IsPrime (f i)\nh : ↑I ⊆ ⋃ (i : ι) (_ : i ∈ ↑(insert a (insert b u))), ↑(f i)\nhas : a ∈ insert a (insert b u)\nhbt : b ∈ insert b u\n⊢ ∃ i, i ∈ insert a (insert b u) ∧ I ≤ f i\n[PROOFSTEP]\nhave hp' : ∀ i ∈ u, IsPrime (f i) := by\n  intro i hiu\n  refine' hp i (Finset.mem_insert_of_mem (Finset.mem_insert_of_mem hiu)) _ _ <;> rintro rfl <;>\n    solve_by_elim only [Finset.mem_insert_of_mem, *]\n[GOAL]\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\nf : ι → Ideal R\na b : ι\nI : Ideal R\nu : Finset ι\nhbu : ¬b ∈ u\nhat : ¬a ∈ insert b u\nhp : ∀ (i : ι), i ∈ insert a (insert b u) → i ≠ a → i ≠ b → IsPrime (f i)\nh : ↑I ⊆ ⋃ (i : ι) (_ : i ∈ ↑(insert a (insert b u))), ↑(f i)\nhas : a ∈ insert a (insert b u)\nhbt : b ∈ insert b u\n⊢ ∀ (i : ι), i ∈ u → IsPrime (f i)\n[PROOFSTEP]\nintro i hiu\n[GOAL]\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\nf : ι → Ideal R\na b : ι\nI : Ideal R\nu : Finset ι\nhbu : ¬b ∈ u\nhat : ¬a ∈ insert b u\nhp : ∀ (i : ι), i ∈ insert a (insert b u) → i ≠ a → i ≠ b → IsPrime (f i)\nh : ↑I ⊆ ⋃ (i : ι) (_ : i ∈ ↑(insert a (insert b u))), ↑(f i)\nhas : a ∈ insert a (insert b u)\nhbt : b ∈ insert b u\ni : ι\nhiu : i ∈ u\n⊢ IsPrime (f i)\n[PROOFSTEP]\nrefine' hp i (Finset.mem_insert_of_mem (Finset.mem_insert_of_mem hiu)) _ _\n[GOAL]\ncase refine'_1\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\nf : ι → Ideal R\na b : ι\nI : Ideal R\nu : Finset ι\nhbu : ¬b ∈ u\nhat : ¬a ∈ insert b u\nhp : ∀ (i : ι), i ∈ insert a (insert b u) → i ≠ a → i ≠ b → IsPrime (f i)\nh : ↑I ⊆ ⋃ (i : ι) (_ : i ∈ ↑(insert a (insert b u))), ↑(f i)\nhas : a ∈ insert a (insert b u)\nhbt : b ∈ insert b u\ni : ι\nhiu : i ∈ u\n⊢ i ≠ a\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase refine'_2\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\nf : ι → Ideal R\na b : ι\nI : Ideal R\nu : Finset ι\nhbu : ¬b ∈ u\nhat : ¬a ∈ insert b u\nhp : ∀ (i : ι), i ∈ insert a (insert b u) → i ≠ a → i ≠ b → IsPrime (f i)\nh : ↑I ⊆ ⋃ (i : ι) (_ : i ∈ ↑(insert a (insert b u))), ↑(f i)\nhas : a ∈ insert a (insert b u)\nhbt : b ∈ insert b u\ni : ι\nhiu : i ∈ u\n⊢ i ≠ b\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase refine'_1\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\nf : ι → Ideal R\nb : ι\nI : Ideal R\nu : Finset ι\nhbu : ¬b ∈ u\nhbt : b ∈ insert b u\ni : ι\nhiu : i ∈ u\nhat : ¬i ∈ insert b u\nhp : ∀ (i_1 : ι), i_1 ∈ insert i (insert b u) → i_1 ≠ i → i_1 ≠ b → IsPrime (f i_1)\nh : ↑I ⊆ ⋃ (i_1 : ι) (_ : i_1 ∈ ↑(insert i (insert b u))), ↑(f i_1)\nhas : i ∈ insert i (insert b u)\n⊢ False\n[PROOFSTEP]\nsolve_by_elim only [Finset.mem_insert_of_mem, *]\n[GOAL]\ncase refine'_2\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\nf : ι → Ideal R\na : ι\nI : Ideal R\nu : Finset ι\ni : ι\nhiu : i ∈ u\nhbu : ¬i ∈ u\nhat : ¬a ∈ insert i u\nhp : ∀ (i_1 : ι), i_1 ∈ insert a (insert i u) → i_1 ≠ a → i_1 ≠ i → IsPrime (f i_1)\nh : ↑I ⊆ ⋃ (i_1 : ι) (_ : i_1 ∈ ↑(insert a (insert i u))), ↑(f i_1)\nhas : a ∈ insert a (insert i u)\nhbt : i ∈ insert i u\n⊢ False\n[PROOFSTEP]\nsolve_by_elim only [Finset.mem_insert_of_mem, *]\n[GOAL]\ncase pos.intro.intro\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\nf : ι → Ideal R\na b : ι\nI : Ideal R\nu : Finset ι\nhbu : ¬b ∈ u\nhat : ¬a ∈ insert b u\nhp : ∀ (i : ι), i ∈ insert a (insert b u) → i ≠ a → i ≠ b → IsPrime (f i)\nh : ↑I ⊆ ⋃ (i : ι) (_ : i ∈ ↑(insert a (insert b u))), ↑(f i)\nhas : a ∈ insert a (insert b u)\nhbt : b ∈ insert b u\nhp' : ∀ (i : ι), i ∈ u → IsPrime (f i)\n⊢ ∃ i, i ∈ insert a (insert b u) ∧ I ≤ f i\n[PROOFSTEP]\nrw [Finset.coe_insert, Finset.coe_insert, Set.biUnion_insert, Set.biUnion_insert, ← Set.union_assoc,\n  subset_union_prime' hp'] at h \n[GOAL]\ncase pos.intro.intro\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\nf : ι → Ideal R\na b : ι\nI : Ideal R\nu : Finset ι\nhbu : ¬b ∈ u\nhat : ¬a ∈ insert b u\nhp : ∀ (i : ι), i ∈ insert a (insert b u) → i ≠ a → i ≠ b → IsPrime (f i)\nh : I ≤ f a ∨ I ≤ f b ∨ ∃ i, i ∈ u ∧ I ≤ f i\nhas : a ∈ insert a (insert b u)\nhbt : b ∈ insert b u\nhp' : ∀ (i : ι), i ∈ u → IsPrime (f i)\n⊢ ∃ i, i ∈ insert a (insert b u) ∧ I ≤ f i\n[PROOFSTEP]\nrwa [Finset.exists_mem_insert, Finset.exists_mem_insert]\n[GOAL]\ncase neg\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\nf : ι → Ideal R\na b : ι\nI : Ideal R\nt : Finset ι\nhat : ¬a ∈ t\nhp : ∀ (i : ι), i ∈ insert a t → i ≠ a → i ≠ b → IsPrime (f i)\nh : ↑I ⊆ ⋃ (i : ι) (_ : i ∈ ↑(insert a t)), ↑(f i)\nhas : a ∈ insert a t\nhbt : ¬b ∈ t\n⊢ ∃ i, i ∈ insert a t ∧ I ≤ f i\n[PROOFSTEP]\nhave hp' : ∀ j ∈ t, IsPrime (f j) := by\n  intro j hj\n  refine' hp j (Finset.mem_insert_of_mem hj) _ _ <;> rintro rfl <;> solve_by_elim only [Finset.mem_insert_of_mem, *]\n[GOAL]\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\nf : ι → Ideal R\na b : ι\nI : Ideal R\nt : Finset ι\nhat : ¬a ∈ t\nhp : ∀ (i : ι), i ∈ insert a t → i ≠ a → i ≠ b → IsPrime (f i)\nh : ↑I ⊆ ⋃ (i : ι) (_ : i ∈ ↑(insert a t)), ↑(f i)\nhas : a ∈ insert a t\nhbt : ¬b ∈ t\n⊢ ∀ (j : ι), j ∈ t → IsPrime (f j)\n[PROOFSTEP]\nintro j hj\n[GOAL]\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\nf : ι → Ideal R\na b : ι\nI : Ideal R\nt : Finset ι\nhat : ¬a ∈ t\nhp : ∀ (i : ι), i ∈ insert a t → i ≠ a → i ≠ b → IsPrime (f i)\nh : ↑I ⊆ ⋃ (i : ι) (_ : i ∈ ↑(insert a t)), ↑(f i)\nhas : a ∈ insert a t\nhbt : ¬b ∈ t\nj : ι\nhj : j ∈ t\n⊢ IsPrime (f j)\n[PROOFSTEP]\nrefine' hp j (Finset.mem_insert_of_mem hj) _ _\n[GOAL]\ncase refine'_1\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\nf : ι → Ideal R\na b : ι\nI : Ideal R\nt : Finset ι\nhat : ¬a ∈ t\nhp : ∀ (i : ι), i ∈ insert a t → i ≠ a → i ≠ b → IsPrime (f i)\nh : ↑I ⊆ ⋃ (i : ι) (_ : i ∈ ↑(insert a t)), ↑(f i)\nhas : a ∈ insert a t\nhbt : ¬b ∈ t\nj : ι\nhj : j ∈ t\n⊢ j ≠ a\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase refine'_2\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\nf : ι → Ideal R\na b : ι\nI : Ideal R\nt : Finset ι\nhat : ¬a ∈ t\nhp : ∀ (i : ι), i ∈ insert a t → i ≠ a → i ≠ b → IsPrime (f i)\nh : ↑I ⊆ ⋃ (i : ι) (_ : i ∈ ↑(insert a t)), ↑(f i)\nhas : a ∈ insert a t\nhbt : ¬b ∈ t\nj : ι\nhj : j ∈ t\n⊢ j ≠ b\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase refine'_1\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\nf : ι → Ideal R\nb : ι\nI : Ideal R\nt : Finset ι\nhbt : ¬b ∈ t\nj : ι\nhj : j ∈ t\nhat : ¬j ∈ t\nhp : ∀ (i : ι), i ∈ insert j t → i ≠ j → i ≠ b → IsPrime (f i)\nh : ↑I ⊆ ⋃ (i : ι) (_ : i ∈ ↑(insert j t)), ↑(f i)\nhas : j ∈ insert j t\n⊢ False\n[PROOFSTEP]\nsolve_by_elim only [Finset.mem_insert_of_mem, *]\n[GOAL]\ncase refine'_2\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\nf : ι → Ideal R\na : ι\nI : Ideal R\nt : Finset ι\nhat : ¬a ∈ t\nh : ↑I ⊆ ⋃ (i : ι) (_ : i ∈ ↑(insert a t)), ↑(f i)\nhas : a ∈ insert a t\nj : ι\nhj : j ∈ t\nhp : ∀ (i : ι), i ∈ insert a t → i ≠ a → i ≠ j → IsPrime (f i)\nhbt : ¬j ∈ t\n⊢ False\n[PROOFSTEP]\nsolve_by_elim only [Finset.mem_insert_of_mem, *]\n[GOAL]\ncase neg\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\nf : ι → Ideal R\na b : ι\nI : Ideal R\nt : Finset ι\nhat : ¬a ∈ t\nhp : ∀ (i : ι), i ∈ insert a t → i ≠ a → i ≠ b → IsPrime (f i)\nh : ↑I ⊆ ⋃ (i : ι) (_ : i ∈ ↑(insert a t)), ↑(f i)\nhas : a ∈ insert a t\nhbt : ¬b ∈ t\nhp' : ∀ (j : ι), j ∈ t → IsPrime (f j)\n⊢ ∃ i, i ∈ insert a t ∧ I ≤ f i\n[PROOFSTEP]\nrw [Finset.coe_insert, Set.biUnion_insert, ← Set.union_self (f a : Set R), subset_union_prime' hp', ← or_assoc,\n  or_self_iff] at h \n[GOAL]\ncase neg\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\nf : ι → Ideal R\na b : ι\nI : Ideal R\nt : Finset ι\nhat : ¬a ∈ t\nhp : ∀ (i : ι), i ∈ insert a t → i ≠ a → i ≠ b → IsPrime (f i)\nh : I ≤ f a ∨ ∃ i, i ∈ t ∧ I ≤ f i\nhas : a ∈ insert a t\nhbt : ¬b ∈ t\nhp' : ∀ (j : ι), j ∈ t → IsPrime (f j)\n⊢ ∃ i, i ∈ insert a t ∧ I ≤ f i\n[PROOFSTEP]\nrwa [Finset.exists_mem_insert]\n[GOAL]\ncase neg\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns : Finset ι\nf : ι → Ideal R\na b : ι\nhp : ∀ (i : ι), i ∈ s → i ≠ a → i ≠ b → IsPrime (f i)\nI : Ideal R\nh : ↑I ⊆ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i)\nhas : ¬a ∈ s\n⊢ ∃ i, i ∈ s ∧ I ≤ f i\n[PROOFSTEP]\nby_cases hbs : b ∈ s\n[GOAL]\ncase pos\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns : Finset ι\nf : ι → Ideal R\na b : ι\nhp : ∀ (i : ι), i ∈ s → i ≠ a → i ≠ b → IsPrime (f i)\nI : Ideal R\nh : ↑I ⊆ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i)\nhas : ¬a ∈ s\nhbs : b ∈ s\n⊢ ∃ i, i ∈ s ∧ I ≤ f i\n[PROOFSTEP]\nobtain ⟨t, hbt, rfl⟩ : ∃ t, b ∉ t ∧ insert b t = s := ⟨s.erase b, Finset.not_mem_erase b s, Finset.insert_erase hbs⟩\n[GOAL]\ncase pos.intro.intro\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\nf : ι → Ideal R\na b : ι\nI : Ideal R\nt : Finset ι\nhbt : ¬b ∈ t\nhp : ∀ (i : ι), i ∈ insert b t → i ≠ a → i ≠ b → IsPrime (f i)\nh : ↑I ⊆ ⋃ (i : ι) (_ : i ∈ ↑(insert b t)), ↑(f i)\nhas : ¬a ∈ insert b t\nhbs : b ∈ insert b t\n⊢ ∃ i, i ∈ insert b t ∧ I ≤ f i\n[PROOFSTEP]\nhave hp' : ∀ j ∈ t, IsPrime (f j) := by\n  intro j hj\n  refine' hp j (Finset.mem_insert_of_mem hj) _ _ <;> rintro rfl <;> solve_by_elim only [Finset.mem_insert_of_mem, *]\n[GOAL]\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\nf : ι → Ideal R\na b : ι\nI : Ideal R\nt : Finset ι\nhbt : ¬b ∈ t\nhp : ∀ (i : ι), i ∈ insert b t → i ≠ a → i ≠ b → IsPrime (f i)\nh : ↑I ⊆ ⋃ (i : ι) (_ : i ∈ ↑(insert b t)), ↑(f i)\nhas : ¬a ∈ insert b t\nhbs : b ∈ insert b t\n⊢ ∀ (j : ι), j ∈ t → IsPrime (f j)\n[PROOFSTEP]\nintro j hj\n[GOAL]\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\nf : ι → Ideal R\na b : ι\nI : Ideal R\nt : Finset ι\nhbt : ¬b ∈ t\nhp : ∀ (i : ι), i ∈ insert b t → i ≠ a → i ≠ b → IsPrime (f i)\nh : ↑I ⊆ ⋃ (i : ι) (_ : i ∈ ↑(insert b t)), ↑(f i)\nhas : ¬a ∈ insert b t\nhbs : b ∈ insert b t\nj : ι\nhj : j ∈ t\n⊢ IsPrime (f j)\n[PROOFSTEP]\nrefine' hp j (Finset.mem_insert_of_mem hj) _ _\n[GOAL]\ncase refine'_1\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\nf : ι → Ideal R\na b : ι\nI : Ideal R\nt : Finset ι\nhbt : ¬b ∈ t\nhp : ∀ (i : ι), i ∈ insert b t → i ≠ a → i ≠ b → IsPrime (f i)\nh : ↑I ⊆ ⋃ (i : ι) (_ : i ∈ ↑(insert b t)), ↑(f i)\nhas : ¬a ∈ insert b t\nhbs : b ∈ insert b t\nj : ι\nhj : j ∈ t\n⊢ j ≠ a\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase refine'_2\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\nf : ι → Ideal R\na b : ι\nI : Ideal R\nt : Finset ι\nhbt : ¬b ∈ t\nhp : ∀ (i : ι), i ∈ insert b t → i ≠ a → i ≠ b → IsPrime (f i)\nh : ↑I ⊆ ⋃ (i : ι) (_ : i ∈ ↑(insert b t)), ↑(f i)\nhas : ¬a ∈ insert b t\nhbs : b ∈ insert b t\nj : ι\nhj : j ∈ t\n⊢ j ≠ b\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase refine'_1\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\nf : ι → Ideal R\nb : ι\nI : Ideal R\nt : Finset ι\nhbt : ¬b ∈ t\nh : ↑I ⊆ ⋃ (i : ι) (_ : i ∈ ↑(insert b t)), ↑(f i)\nhbs : b ∈ insert b t\nj : ι\nhj : j ∈ t\nhp : ∀ (i : ι), i ∈ insert b t → i ≠ j → i ≠ b → IsPrime (f i)\nhas : ¬j ∈ insert b t\n⊢ False\n[PROOFSTEP]\nsolve_by_elim only [Finset.mem_insert_of_mem, *]\n[GOAL]\ncase refine'_2\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\nf : ι → Ideal R\na : ι\nI : Ideal R\nt : Finset ι\nj : ι\nhj : j ∈ t\nhbt : ¬j ∈ t\nhp : ∀ (i : ι), i ∈ insert j t → i ≠ a → i ≠ j → IsPrime (f i)\nh : ↑I ⊆ ⋃ (i : ι) (_ : i ∈ ↑(insert j t)), ↑(f i)\nhas : ¬a ∈ insert j t\nhbs : j ∈ insert j t\n⊢ False\n[PROOFSTEP]\nsolve_by_elim only [Finset.mem_insert_of_mem, *]\n[GOAL]\ncase pos.intro.intro\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\nf : ι → Ideal R\na b : ι\nI : Ideal R\nt : Finset ι\nhbt : ¬b ∈ t\nhp : ∀ (i : ι), i ∈ insert b t → i ≠ a → i ≠ b → IsPrime (f i)\nh : ↑I ⊆ ⋃ (i : ι) (_ : i ∈ ↑(insert b t)), ↑(f i)\nhas : ¬a ∈ insert b t\nhbs : b ∈ insert b t\nhp' : ∀ (j : ι), j ∈ t → IsPrime (f j)\n⊢ ∃ i, i ∈ insert b t ∧ I ≤ f i\n[PROOFSTEP]\nrw [Finset.coe_insert, Set.biUnion_insert, ← Set.union_self (f b : Set R), subset_union_prime' hp', ← or_assoc,\n  or_self_iff] at h \n[GOAL]\ncase pos.intro.intro\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\nf : ι → Ideal R\na b : ι\nI : Ideal R\nt : Finset ι\nhbt : ¬b ∈ t\nhp : ∀ (i : ι), i ∈ insert b t → i ≠ a → i ≠ b → IsPrime (f i)\nh : I ≤ f b ∨ ∃ i, i ∈ t ∧ I ≤ f i\nhas : ¬a ∈ insert b t\nhbs : b ∈ insert b t\nhp' : ∀ (j : ι), j ∈ t → IsPrime (f j)\n⊢ ∃ i, i ∈ insert b t ∧ I ≤ f i\n[PROOFSTEP]\nrwa [Finset.exists_mem_insert]\n[GOAL]\ncase neg\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns : Finset ι\nf : ι → Ideal R\na b : ι\nhp : ∀ (i : ι), i ∈ s → i ≠ a → i ≠ b → IsPrime (f i)\nI : Ideal R\nh : ↑I ⊆ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i)\nhas : ¬a ∈ s\nhbs : ¬b ∈ s\n⊢ ∃ i, i ∈ s ∧ I ≤ f i\n[PROOFSTEP]\ncases' s.eq_empty_or_nonempty with hse hsne\n[GOAL]\ncase neg.inl\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns : Finset ι\nf : ι → Ideal R\na b : ι\nhp : ∀ (i : ι), i ∈ s → i ≠ a → i ≠ b → IsPrime (f i)\nI : Ideal R\nh : ↑I ⊆ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i)\nhas : ¬a ∈ s\nhbs : ¬b ∈ s\nhse : s = ∅\n⊢ ∃ i, i ∈ s ∧ I ≤ f i\n[PROOFSTEP]\nsubst hse\n[GOAL]\ncase neg.inl\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\nf : ι → Ideal R\na b : ι\nI : Ideal R\nhp : ∀ (i : ι), i ∈ ∅ → i ≠ a → i ≠ b → IsPrime (f i)\nh : ↑I ⊆ ⋃ (i : ι) (_ : i ∈ ↑∅), ↑(f i)\nhas : ¬a ∈ ∅\nhbs : ¬b ∈ ∅\n⊢ ∃ i, i ∈ ∅ ∧ I ≤ f i\n[PROOFSTEP]\nrw [Finset.coe_empty, Set.biUnion_empty, Set.subset_empty_iff] at h \n[GOAL]\ncase neg.inl\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\nf : ι → Ideal R\na b : ι\nI : Ideal R\nhp : ∀ (i : ι), i ∈ ∅ → i ≠ a → i ≠ b → IsPrime (f i)\nh : ↑I = ∅\nhas : ¬a ∈ ∅\nhbs : ¬b ∈ ∅\n⊢ ∃ i, i ∈ ∅ ∧ I ≤ f i\n[PROOFSTEP]\nhave : (I : Set R) ≠ ∅ := Set.Nonempty.ne_empty (Set.nonempty_of_mem I.zero_mem)\n[GOAL]\ncase neg.inl\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\nf : ι → Ideal R\na b : ι\nI : Ideal R\nhp : ∀ (i : ι), i ∈ ∅ → i ≠ a → i ≠ b → IsPrime (f i)\nh : ↑I = ∅\nhas : ¬a ∈ ∅\nhbs : ¬b ∈ ∅\nthis : ↑I ≠ ∅\n⊢ ∃ i, i ∈ ∅ ∧ I ≤ f i\n[PROOFSTEP]\nexact absurd h this\n[GOAL]\ncase neg.inr\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns : Finset ι\nf : ι → Ideal R\na b : ι\nhp : ∀ (i : ι), i ∈ s → i ≠ a → i ≠ b → IsPrime (f i)\nI : Ideal R\nh : ↑I ⊆ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i)\nhas : ¬a ∈ s\nhbs : ¬b ∈ s\nhsne : Finset.Nonempty s\n⊢ ∃ i, i ∈ s ∧ I ≤ f i\n[PROOFSTEP]\ncases' hsne.bex with i his\n[GOAL]\ncase neg.inr.intro\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns : Finset ι\nf : ι → Ideal R\na b : ι\nhp : ∀ (i : ι), i ∈ s → i ≠ a → i ≠ b → IsPrime (f i)\nI : Ideal R\nh : ↑I ⊆ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i)\nhas : ¬a ∈ s\nhbs : ¬b ∈ s\nhsne : Finset.Nonempty s\ni : ι\nhis : i ∈ s\n⊢ ∃ i, i ∈ s ∧ I ≤ f i\n[PROOFSTEP]\nobtain ⟨t, _, rfl⟩ : ∃ t, i ∉ t ∧ insert i t = s := ⟨s.erase i, Finset.not_mem_erase i s, Finset.insert_erase his⟩\n[GOAL]\ncase neg.inr.intro.intro.intro\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\nf : ι → Ideal R\na b : ι\nI : Ideal R\ni : ι\nt : Finset ι\nleft✝ : ¬i ∈ t\nhp : ∀ (i_1 : ι), i_1 ∈ insert i t → i_1 ≠ a → i_1 ≠ b → IsPrime (f i_1)\nh : ↑I ⊆ ⋃ (i_1 : ι) (_ : i_1 ∈ ↑(insert i t)), ↑(f i_1)\nhas : ¬a ∈ insert i t\nhbs : ¬b ∈ insert i t\nhsne : Finset.Nonempty (insert i t)\nhis : i ∈ insert i t\n⊢ ∃ i_1, i_1 ∈ insert i t ∧ I ≤ f i_1\n[PROOFSTEP]\nhave hp' : ∀ j ∈ t, IsPrime (f j) := by\n  intro j hj\n  refine' hp j (Finset.mem_insert_of_mem hj) _ _ <;> rintro rfl <;> solve_by_elim only [Finset.mem_insert_of_mem, *]\n[GOAL]\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\nf : ι → Ideal R\na b : ι\nI : Ideal R\ni : ι\nt : Finset ι\nleft✝ : ¬i ∈ t\nhp : ∀ (i_1 : ι), i_1 ∈ insert i t → i_1 ≠ a → i_1 ≠ b → IsPrime (f i_1)\nh : ↑I ⊆ ⋃ (i_1 : ι) (_ : i_1 ∈ ↑(insert i t)), ↑(f i_1)\nhas : ¬a ∈ insert i t\nhbs : ¬b ∈ insert i t\nhsne : Finset.Nonempty (insert i t)\nhis : i ∈ insert i t\n⊢ ∀ (j : ι), j ∈ t → IsPrime (f j)\n[PROOFSTEP]\nintro j hj\n[GOAL]\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\nf : ι → Ideal R\na b : ι\nI : Ideal R\ni : ι\nt : Finset ι\nleft✝ : ¬i ∈ t\nhp : ∀ (i_1 : ι), i_1 ∈ insert i t → i_1 ≠ a → i_1 ≠ b → IsPrime (f i_1)\nh : ↑I ⊆ ⋃ (i_1 : ι) (_ : i_1 ∈ ↑(insert i t)), ↑(f i_1)\nhas : ¬a ∈ insert i t\nhbs : ¬b ∈ insert i t\nhsne : Finset.Nonempty (insert i t)\nhis : i ∈ insert i t\nj : ι\nhj : j ∈ t\n⊢ IsPrime (f j)\n[PROOFSTEP]\nrefine' hp j (Finset.mem_insert_of_mem hj) _ _\n[GOAL]\ncase refine'_1\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\nf : ι → Ideal R\na b : ι\nI : Ideal R\ni : ι\nt : Finset ι\nleft✝ : ¬i ∈ t\nhp : ∀ (i_1 : ι), i_1 ∈ insert i t → i_1 ≠ a → i_1 ≠ b → IsPrime (f i_1)\nh : ↑I ⊆ ⋃ (i_1 : ι) (_ : i_1 ∈ ↑(insert i t)), ↑(f i_1)\nhas : ¬a ∈ insert i t\nhbs : ¬b ∈ insert i t\nhsne : Finset.Nonempty (insert i t)\nhis : i ∈ insert i t\nj : ι\nhj : j ∈ t\n⊢ j ≠ a\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase refine'_2\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\nf : ι → Ideal R\na b : ι\nI : Ideal R\ni : ι\nt : Finset ι\nleft✝ : ¬i ∈ t\nhp : ∀ (i_1 : ι), i_1 ∈ insert i t → i_1 ≠ a → i_1 ≠ b → IsPrime (f i_1)\nh : ↑I ⊆ ⋃ (i_1 : ι) (_ : i_1 ∈ ↑(insert i t)), ↑(f i_1)\nhas : ¬a ∈ insert i t\nhbs : ¬b ∈ insert i t\nhsne : Finset.Nonempty (insert i t)\nhis : i ∈ insert i t\nj : ι\nhj : j ∈ t\n⊢ j ≠ b\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase refine'_1\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\nf : ι → Ideal R\nb : ι\nI : Ideal R\ni : ι\nt : Finset ι\nleft✝ : ¬i ∈ t\nh : ↑I ⊆ ⋃ (i_1 : ι) (_ : i_1 ∈ ↑(insert i t)), ↑(f i_1)\nhbs : ¬b ∈ insert i t\nhsne : Finset.Nonempty (insert i t)\nhis : i ∈ insert i t\nj : ι\nhj : j ∈ t\nhp : ∀ (i_1 : ι), i_1 ∈ insert i t → i_1 ≠ j → i_1 ≠ b → IsPrime (f i_1)\nhas : ¬j ∈ insert i t\n⊢ False\n[PROOFSTEP]\nsolve_by_elim only [Finset.mem_insert_of_mem, *]\n[GOAL]\ncase refine'_2\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\nf : ι → Ideal R\na : ι\nI : Ideal R\ni : ι\nt : Finset ι\nleft✝ : ¬i ∈ t\nh : ↑I ⊆ ⋃ (i_1 : ι) (_ : i_1 ∈ ↑(insert i t)), ↑(f i_1)\nhas : ¬a ∈ insert i t\nhsne : Finset.Nonempty (insert i t)\nhis : i ∈ insert i t\nj : ι\nhj : j ∈ t\nhp : ∀ (i_1 : ι), i_1 ∈ insert i t → i_1 ≠ a → i_1 ≠ j → IsPrime (f i_1)\nhbs : ¬j ∈ insert i t\n⊢ False\n[PROOFSTEP]\nsolve_by_elim only [Finset.mem_insert_of_mem, *]\n[GOAL]\ncase neg.inr.intro.intro.intro\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\nf : ι → Ideal R\na b : ι\nI : Ideal R\ni : ι\nt : Finset ι\nleft✝ : ¬i ∈ t\nhp : ∀ (i_1 : ι), i_1 ∈ insert i t → i_1 ≠ a → i_1 ≠ b → IsPrime (f i_1)\nh : ↑I ⊆ ⋃ (i_1 : ι) (_ : i_1 ∈ ↑(insert i t)), ↑(f i_1)\nhas : ¬a ∈ insert i t\nhbs : ¬b ∈ insert i t\nhsne : Finset.Nonempty (insert i t)\nhis : i ∈ insert i t\nhp' : ∀ (j : ι), j ∈ t → IsPrime (f j)\n⊢ ∃ i_1, i_1 ∈ insert i t ∧ I ≤ f i_1\n[PROOFSTEP]\nrw [Finset.coe_insert, Set.biUnion_insert, ← Set.union_self (f i : Set R), subset_union_prime' hp', ← or_assoc,\n  or_self_iff] at h \n[GOAL]\ncase neg.inr.intro.intro.intro\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\nf : ι → Ideal R\na b : ι\nI : Ideal R\ni : ι\nt : Finset ι\nleft✝ : ¬i ∈ t\nhp : ∀ (i_1 : ι), i_1 ∈ insert i t → i_1 ≠ a → i_1 ≠ b → IsPrime (f i_1)\nh : I ≤ f i ∨ ∃ i, i ∈ t ∧ I ≤ f i\nhas : ¬a ∈ insert i t\nhbs : ¬b ∈ insert i t\nhsne : Finset.Nonempty (insert i t)\nhis : i ∈ insert i t\nhp' : ∀ (j : ι), j ∈ t → IsPrime (f j)\n⊢ ∃ i_1, i_1 ∈ insert i t ∧ I ≤ f i_1\n[PROOFSTEP]\nrwa [Finset.exists_mem_insert]\n[GOAL]\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns : Finset ι\nf : ι → Ideal R\na b : ι\nhp : ∀ (i : ι), i ∈ s → i ≠ a → i ≠ b → IsPrime (f i)\nI : Ideal R\nthis : ↑I ⊆ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i) → ∃ i, i ∈ s ∧ I ≤ f i\n⊢ ↑I ⊆ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i) ↔ ∃ i, i ∈ s ∧ I ≤ f i\n[PROOFSTEP]\nhave aux := fun h => (bex_def.2 <| this h)\n[GOAL]\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns : Finset ι\nf : ι → Ideal R\na b : ι\nhp : ∀ (i : ι), i ∈ s → i ≠ a → i ≠ b → IsPrime (f i)\nI : Ideal R\nthis : ↑I ⊆ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i) → ∃ i, i ∈ s ∧ I ≤ f i\naux : ↑I ⊆ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i) → ∃ x x_1, I ≤ f x\n⊢ ↑I ⊆ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i) ↔ ∃ i, i ∈ s ∧ I ≤ f i\n[PROOFSTEP]\nsimp_rw [exists_prop] at aux \n[GOAL]\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns : Finset ι\nf : ι → Ideal R\na b : ι\nhp : ∀ (i : ι), i ∈ s → i ≠ a → i ≠ b → IsPrime (f i)\nI : Ideal R\nthis aux : ↑I ⊆ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i) → ∃ x, x ∈ s ∧ I ≤ f x\n⊢ ↑I ⊆ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i) ↔ ∃ i, i ∈ s ∧ I ≤ f i\n[PROOFSTEP]\nrefine ⟨aux, fun ⟨i, his, hi⟩ ↦ Set.Subset.trans hi ?_⟩\n[GOAL]\nR✝ : Type u\nι : Type u_1\ninst✝¹ : CommSemiring R✝\nI✝ J K L : Ideal R✝\nR : Type u\ninst✝ : CommRing R\ns : Finset ι\nf : ι → Ideal R\na b : ι\nhp : ∀ (i : ι), i ∈ s → i ≠ a → i ≠ b → IsPrime (f i)\nI : Ideal R\nthis aux : ↑I ⊆ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i) → ∃ x, x ∈ s ∧ I ≤ f x\nx✝ : ∃ i, i ∈ s ∧ I ≤ f i\ni : ι\nhis : i ∈ s\nhi : I ≤ f i\n⊢ ↑(f i) ⊆ ⋃ (i : ι) (_ : i ∈ ↑s), ↑(f i)\n[PROOFSTEP]\napply Set.subset_biUnion_of_mem (show i ∈ (↑s : Set ι) from his)\n[GOAL]\nR : Type u\nι : Type u_1\ninst✝ : CommSemiring R\nI✝ J K L I : Ideal R\nh : I = ⊤\n⊢ ⊤ = I * ⊤\n[PROOFSTEP]\nrw [mul_top, h]\n[GOAL]\nR : Type u\nι : Type u_1\ninst✝ : CommSemiring R\nI J K L : Ideal R\nu : (Ideal R)ˣ\n⊢ ↑u = 1\n[PROOFSTEP]\nrw [isUnit_iff.mp u.isUnit, one_eq_top]\n[GOAL]\nR : Type u\nS : Type v\nF : Type u_1\ninst✝¹ : Semiring R\ninst✝ : Semiring S\nrc : RingHomClass F R S\nf : F\nI✝ J : Ideal R\nK L I : Ideal S\nx y : R\nhx : x ∈ ↑f ⁻¹' ↑I\nhy : y ∈ ↑f ⁻¹' ↑I\n⊢ x + y ∈ ↑f ⁻¹' ↑I\n[PROOFSTEP]\nsimp only [Set.mem_preimage, SetLike.mem_coe, map_add] at hx hy ⊢\n[GOAL]\nR : Type u\nS : Type v\nF : Type u_1\ninst✝¹ : Semiring R\ninst✝ : Semiring S\nrc : RingHomClass F R S\nf : F\nI✝ J : Ideal R\nK L I : Ideal S\nx y : R\nhx : ↑f x ∈ I\nhy : ↑f y ∈ I\n⊢ ↑f x + ↑f y ∈ I\n[PROOFSTEP]\nexact add_mem hx hy\n[GOAL]\nR : Type u\nS : Type v\nF : Type u_1\ninst✝¹ : Semiring R\ninst✝ : Semiring S\nrc : RingHomClass F R S\nf : F\nI✝ J : Ideal R\nK L I : Ideal S\n⊢ 0 ∈ { carrier := ↑f ⁻¹' ↑I, add_mem' := (_ : ∀ {x y : R}, x ∈ ↑f ⁻¹' ↑I → y ∈ ↑f ⁻¹' ↑I → x + y ∈ ↑f ⁻¹' ↑I) }.carrier\n[PROOFSTEP]\nsimp only [Set.mem_preimage, map_zero, SetLike.mem_coe, Submodule.zero_mem]\n[GOAL]\nR : Type u\nS : Type v\nF : Type u_1\ninst✝¹ : Semiring R\ninst✝ : Semiring S\nrc : RingHomClass F R S\nf : F\nI✝ J : Ideal R\nK L I : Ideal S\nc x : R\nhx :\n  x ∈\n    {\n          toAddSubsemigroup :=\n            { carrier := ↑f ⁻¹' ↑I, add_mem' := (_ : ∀ {x y : R}, x ∈ ↑f ⁻¹' ↑I → y ∈ ↑f ⁻¹' ↑I → x + y ∈ ↑f ⁻¹' ↑I) },\n          zero_mem' := (_ : 0 ∈ ↑f ⁻¹' ↑I) }.toAddSubsemigroup.carrier\n⊢ c • x ∈\n    {\n          toAddSubsemigroup :=\n            { carrier := ↑f ⁻¹' ↑I, add_mem' := (_ : ∀ {x y : R}, x ∈ ↑f ⁻¹' ↑I → y ∈ ↑f ⁻¹' ↑I → x + y ∈ ↑f ⁻¹' ↑I) },\n          zero_mem' := (_ : 0 ∈ ↑f ⁻¹' ↑I) }.toAddSubsemigroup.carrier\n[PROOFSTEP]\nsimp only [smul_eq_mul, Set.mem_preimage, map_mul, SetLike.mem_coe] at *\n[GOAL]\nR : Type u\nS : Type v\nF : Type u_1\ninst✝¹ : Semiring R\ninst✝ : Semiring S\nrc : RingHomClass F R S\nf : F\nI✝ J : Ideal R\nK L I : Ideal S\nc x : R\nhx : ↑f x ∈ I\n⊢ ↑f c * ↑f x ∈ I\n[PROOFSTEP]\nexact mul_mem_left I _ hx\n[GOAL]\nR : Type u\nS : Type v\nF : Type u_1\ninst✝¹ : Semiring R\ninst✝ : Semiring S\nrc : RingHomClass F R S\nf : F\nI J : Ideal R\nK L : Ideal S\nhK : K ≠ ⊤\n⊢ ¬1 ∈ comap f K\n[PROOFSTEP]\nrw [mem_comap, map_one]\n[GOAL]\nR : Type u\nS : Type v\nF : Type u_1\ninst✝¹ : Semiring R\ninst✝ : Semiring S\nrc : RingHomClass F R S\nf : F\nI J : Ideal R\nK L : Ideal S\nhK : K ≠ ⊤\n⊢ ¬1 ∈ K\n[PROOFSTEP]\nexact (ne_top_iff_one _).1 hK\n[GOAL]\nR : Type u\nS : Type v\nF : Type u_1\ninst✝¹ : Semiring R\ninst✝ : Semiring S\nrc : RingHomClass F R S\nf : F\nI✝ J : Ideal R\nK L : Ideal S\nG : Type u_2\nrcg : RingHomClass G S R\ng : G\nI : Ideal R\nhf : Set.LeftInvOn ↑g ↑f ↑I\n⊢ map f I ≤ comap g I\n[PROOFSTEP]\nrefine' Ideal.span_le.2 _\n[GOAL]\nR : Type u\nS : Type v\nF : Type u_1\ninst✝¹ : Semiring R\ninst✝ : Semiring S\nrc : RingHomClass F R S\nf : F\nI✝ J : Ideal R\nK L : Ideal S\nG : Type u_2\nrcg : RingHomClass G S R\ng : G\nI : Ideal R\nhf : Set.LeftInvOn ↑g ↑f ↑I\n⊢ ↑f '' ↑I ⊆ ↑(comap g I)\n[PROOFSTEP]\nrintro x ⟨x, hx, rfl⟩\n[GOAL]\ncase intro.intro\nR : Type u\nS : Type v\nF : Type u_1\ninst✝¹ : Semiring R\ninst✝ : Semiring S\nrc : RingHomClass F R S\nf : F\nI✝ J : Ideal R\nK L : Ideal S\nG : Type u_2\nrcg : RingHomClass G S R\ng : G\nI : Ideal R\nhf : Set.LeftInvOn ↑g ↑f ↑I\nx : R\nhx : x ∈ ↑I\n⊢ ↑f x ∈ ↑(comap g I)\n[PROOFSTEP]\nrw [SetLike.mem_coe, mem_comap, hf hx]\n[GOAL]\ncase intro.intro\nR : Type u\nS : Type v\nF : Type u_1\ninst✝¹ : Semiring R\ninst✝ : Semiring S\nrc : RingHomClass F R S\nf : F\nI✝ J : Ideal R\nK L : Ideal S\nG : Type u_2\nrcg : RingHomClass G S R\ng : G\nI : Ideal R\nhf : Set.LeftInvOn ↑g ↑f ↑I\nx : R\nhx : x ∈ ↑I\n⊢ x ∈ I\n[PROOFSTEP]\nexact hx\n[GOAL]\nR : Type u\nS : Type v\nF : Type u_1\ninst✝¹ : Semiring R\ninst✝ : Semiring S\nrc : RingHomClass F R S\nf : F\nI J : Ideal R\nK L : Ideal S\nG : Type u_2\nrcg : RingHomClass G S R\nhK : IsPrime K\nx y : R\n⊢ x * y ∈ Ideal.comap f K → x ∈ Ideal.comap f K ∨ y ∈ Ideal.comap f K\n[PROOFSTEP]\nsimp only [mem_comap, map_mul]\n[GOAL]\nR : Type u\nS : Type v\nF : Type u_1\ninst✝¹ : Semiring R\ninst✝ : Semiring S\nrc : RingHomClass F R S\nf : F\nI J : Ideal R\nK L : Ideal S\nG : Type u_2\nrcg : RingHomClass G S R\nhK : IsPrime K\nx y : R\n⊢ ↑f x * ↑f y ∈ K → ↑f x ∈ K ∨ ↑f y ∈ K\n[PROOFSTEP]\napply hK.2\n[GOAL]\nR : Type u\nS : Type v\nF : Type u_1\ninst✝¹ : Semiring R\ninst✝ : Semiring S\nrc : RingHomClass F R S\nf✝ : F\nI J : Ideal R\nK L : Ideal S\nG : Type u_2\nrcg : RingHomClass G S R\nf : F\ns : Set R\n⊢ map f (span s) = span (↑f '' s)\n[PROOFSTEP]\nrefine (Submodule.span_eq_of_le _ ?_ ?_).symm\n[GOAL]\ncase refine_1\nR : Type u\nS : Type v\nF : Type u_1\ninst✝¹ : Semiring R\ninst✝ : Semiring S\nrc : RingHomClass F R S\nf✝ : F\nI J : Ideal R\nK L : Ideal S\nG : Type u_2\nrcg : RingHomClass G S R\nf : F\ns : Set R\n⊢ ↑f '' s ⊆ ↑(map f (span s))\n[PROOFSTEP]\nrintro _ ⟨x, hx, rfl⟩\n[GOAL]\ncase refine_1.intro.intro\nR : Type u\nS : Type v\nF : Type u_1\ninst✝¹ : Semiring R\ninst✝ : Semiring S\nrc : RingHomClass F R S\nf✝ : F\nI J : Ideal R\nK L : Ideal S\nG : Type u_2\nrcg : RingHomClass G S R\nf : F\ns : Set R\nx : R\nhx : x ∈ s\n⊢ ↑f x ∈ ↑(map f (span s))\n[PROOFSTEP]\nexact mem_map_of_mem f (subset_span hx)\n[GOAL]\ncase refine_2\nR : Type u\nS : Type v\nF : Type u_1\ninst✝¹ : Semiring R\ninst✝ : Semiring S\nrc : RingHomClass F R S\nf✝ : F\nI J : Ideal R\nK L : Ideal S\nG : Type u_2\nrcg : RingHomClass G S R\nf : F\ns : Set R\n⊢ map f (span s) ≤ Submodule.span S (↑f '' s)\n[PROOFSTEP]\nrw [map_le_iff_le_comap, span_le, coe_comap, ← Set.image_subset_iff]\n[GOAL]\ncase refine_2\nR : Type u\nS : Type v\nF : Type u_1\ninst✝¹ : Semiring R\ninst✝ : Semiring S\nrc : RingHomClass F R S\nf✝ : F\nI J : Ideal R\nK L : Ideal S\nG : Type u_2\nrcg : RingHomClass G S R\nf : F\ns : Set R\n⊢ ↑f '' s ⊆ ↑(Submodule.span S (↑f '' s))\n[PROOFSTEP]\nexact subset_span\n[GOAL]\nR : Type u\nS : Type v\nF : Type u_1\ninst✝¹ : Semiring R\ninst✝ : Semiring S\nrc : RingHomClass F R S\nf : F\nI✝ J : Ideal R\nK L : Ideal S\nG : Type u_2\nrcg : RingHomClass G S R\nI : Ideal S\nh : I = ⊤\n⊢ comap f I = ⊤\n[PROOFSTEP]\nrw [h, comap_top]\n[GOAL]\nR : Type u\nS : Type v\nF : Type u_1\ninst✝¹ : Semiring R\ninst✝ : Semiring S\nrc : RingHomClass F R S\nf : F\nI J : Ideal R\nK L : Ideal S\nG : Type u_2\nrcg : RingHomClass G S R\nι : Sort u_3\ns : Set (Ideal S)\n⊢ ⨅ (I : Ideal S) (_ : I ∈ s), comap f I = ⨅ (I : Ideal R) (_ : I ∈ comap f '' s), I\n[PROOFSTEP]\nrw [iInf_image]\n[GOAL]\nR : Type u\nS : Type v\nF : Type u_1\ninst✝¹ : Semiring R\ninst✝ : Semiring S\nrc : RingHomClass F R S\nf : F\nI J : Ideal R\nK L : Ideal S\nG : Type u_2\nrcg : RingHomClass G S R\nι : Sort u_3\nH : IsPrime K\nx y : R\nh : x * y ∈ comap f K\n⊢ ↑f x * ↑f y ∈ K\n[PROOFSTEP]\nrwa [mem_comap, map_mul] at h \n[GOAL]\nR✝ : Type u\nS✝ : Type v\nF : Type u_1\ninst✝⁴ : Semiring R✝\ninst✝³ : Semiring S✝\nrc : RingHomClass F R✝ S✝\nf : F\nI✝ J : Ideal R✝\nK L : Ideal S✝\nG : Type u_2\nrcg : RingHomClass G S✝ R✝\nι : Sort u_3\nR : Type u_4\nS : Type u_5\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring S\ninst✝ : Algebra R S\nI : Ideal R\n⊢ I • ⊤ = Submodule.restrictScalars R (map (algebraMap R S) I)\n[PROOFSTEP]\nrefine' le_antisymm (Submodule.smul_le.mpr fun r hr y _ => _) fun x hx => Submodule.span_induction hx _ _ _ _\n[GOAL]\ncase refine'_1\nR✝ : Type u\nS✝ : Type v\nF : Type u_1\ninst✝⁴ : Semiring R✝\ninst✝³ : Semiring S✝\nrc : RingHomClass F R✝ S✝\nf : F\nI✝ J : Ideal R✝\nK L : Ideal S✝\nG : Type u_2\nrcg : RingHomClass G S✝ R✝\nι : Sort u_3\nR : Type u_4\nS : Type u_5\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring S\ninst✝ : Algebra R S\nI : Ideal R\nr : R\nhr : r ∈ I\ny : S\nx✝ : y ∈ ⊤\n⊢ r • y ∈ Submodule.restrictScalars R (map (algebraMap R S) I)\n[PROOFSTEP]\nrw [Algebra.smul_def]\n[GOAL]\ncase refine'_1\nR✝ : Type u\nS✝ : Type v\nF : Type u_1\ninst✝⁴ : Semiring R✝\ninst✝³ : Semiring S✝\nrc : RingHomClass F R✝ S✝\nf : F\nI✝ J : Ideal R✝\nK L : Ideal S✝\nG : Type u_2\nrcg : RingHomClass G S✝ R✝\nι : Sort u_3\nR : Type u_4\nS : Type u_5\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring S\ninst✝ : Algebra R S\nI : Ideal R\nr : R\nhr : r ∈ I\ny : S\nx✝ : y ∈ ⊤\n⊢ ↑(algebraMap R S) r * y ∈ Submodule.restrictScalars R (map (algebraMap R S) I)\n[PROOFSTEP]\nexact mul_mem_right _ _ (mem_map_of_mem _ hr)\n[GOAL]\ncase refine'_2\nR✝ : Type u\nS✝ : Type v\nF : Type u_1\ninst✝⁴ : Semiring R✝\ninst✝³ : Semiring S✝\nrc : RingHomClass F R✝ S✝\nf : F\nI✝ J : Ideal R✝\nK L : Ideal S✝\nG : Type u_2\nrcg : RingHomClass G S✝ R✝\nι : Sort u_3\nR : Type u_4\nS : Type u_5\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring S\ninst✝ : Algebra R S\nI : Ideal R\nx : S\nhx : x ∈ Submodule.restrictScalars R (map (algebraMap R S) I)\n⊢ ∀ (x : S), x ∈ ↑(algebraMap R S) '' ↑I → x ∈ I • ⊤\n[PROOFSTEP]\nrintro _ ⟨x, hx, rfl⟩\n[GOAL]\ncase refine'_2.intro.intro\nR✝ : Type u\nS✝ : Type v\nF : Type u_1\ninst✝⁴ : Semiring R✝\ninst✝³ : Semiring S✝\nrc : RingHomClass F R✝ S✝\nf : F\nI✝ J : Ideal R✝\nK L : Ideal S✝\nG : Type u_2\nrcg : RingHomClass G S✝ R✝\nι : Sort u_3\nR : Type u_4\nS : Type u_5\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring S\ninst✝ : Algebra R S\nI : Ideal R\nx✝ : S\nhx✝ : x✝ ∈ Submodule.restrictScalars R (map (algebraMap R S) I)\nx : R\nhx : x ∈ ↑I\n⊢ ↑(algebraMap R S) x ∈ I • ⊤\n[PROOFSTEP]\nrw [← mul_one (algebraMap R S x), ← Algebra.smul_def]\n[GOAL]\ncase refine'_2.intro.intro\nR✝ : Type u\nS✝ : Type v\nF : Type u_1\ninst✝⁴ : Semiring R✝\ninst✝³ : Semiring S✝\nrc : RingHomClass F R✝ S✝\nf : F\nI✝ J : Ideal R✝\nK L : Ideal S✝\nG : Type u_2\nrcg : RingHomClass G S✝ R✝\nι : Sort u_3\nR : Type u_4\nS : Type u_5\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring S\ninst✝ : Algebra R S\nI : Ideal R\nx✝ : S\nhx✝ : x✝ ∈ Submodule.restrictScalars R (map (algebraMap R S) I)\nx : R\nhx : x ∈ ↑I\n⊢ x • 1 ∈ I • ⊤\n[PROOFSTEP]\nexact Submodule.smul_mem_smul hx Submodule.mem_top\n[GOAL]\ncase refine'_3\nR✝ : Type u\nS✝ : Type v\nF : Type u_1\ninst✝⁴ : Semiring R✝\ninst✝³ : Semiring S✝\nrc : RingHomClass F R✝ S✝\nf : F\nI✝ J : Ideal R✝\nK L : Ideal S✝\nG : Type u_2\nrcg : RingHomClass G S✝ R✝\nι : Sort u_3\nR : Type u_4\nS : Type u_5\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring S\ninst✝ : Algebra R S\nI : Ideal R\nx : S\nhx : x ∈ Submodule.restrictScalars R (map (algebraMap R S) I)\n⊢ 0 ∈ I • ⊤\n[PROOFSTEP]\nexact Submodule.zero_mem _\n[GOAL]\ncase refine'_4\nR✝ : Type u\nS✝ : Type v\nF : Type u_1\ninst✝⁴ : Semiring R✝\ninst✝³ : Semiring S✝\nrc : RingHomClass F R✝ S✝\nf : F\nI✝ J : Ideal R✝\nK L : Ideal S✝\nG : Type u_2\nrcg : RingHomClass G S✝ R✝\nι : Sort u_3\nR : Type u_4\nS : Type u_5\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring S\ninst✝ : Algebra R S\nI : Ideal R\nx : S\nhx : x ∈ Submodule.restrictScalars R (map (algebraMap R S) I)\n⊢ ∀ (x y : S), x ∈ I • ⊤ → y ∈ I • ⊤ → x + y ∈ I • ⊤\n[PROOFSTEP]\nintro x y\n[GOAL]\ncase refine'_4\nR✝ : Type u\nS✝ : Type v\nF : Type u_1\ninst✝⁴ : Semiring R✝\ninst✝³ : Semiring S✝\nrc : RingHomClass F R✝ S✝\nf : F\nI✝ J : Ideal R✝\nK L : Ideal S✝\nG : Type u_2\nrcg : RingHomClass G S✝ R✝\nι : Sort u_3\nR : Type u_4\nS : Type u_5\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring S\ninst✝ : Algebra R S\nI : Ideal R\nx✝ : S\nhx : x✝ ∈ Submodule.restrictScalars R (map (algebraMap R S) I)\nx y : S\n⊢ x ∈ I • ⊤ → y ∈ I • ⊤ → x + y ∈ I • ⊤\n[PROOFSTEP]\nexact Submodule.add_mem _\n[GOAL]\ncase refine'_5\nR✝ : Type u\nS✝ : Type v\nF : Type u_1\ninst✝⁴ : Semiring R✝\ninst✝³ : Semiring S✝\nrc : RingHomClass F R✝ S✝\nf : F\nI✝ J : Ideal R✝\nK L : Ideal S✝\nG : Type u_2\nrcg : RingHomClass G S✝ R✝\nι : Sort u_3\nR : Type u_4\nS : Type u_5\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring S\ninst✝ : Algebra R S\nI : Ideal R\nx : S\nhx : x ∈ Submodule.restrictScalars R (map (algebraMap R S) I)\n⊢ ∀ (a x : S), x ∈ I • ⊤ → a • x ∈ I • ⊤\n[PROOFSTEP]\nintro a x hx\n[GOAL]\ncase refine'_5\nR✝ : Type u\nS✝ : Type v\nF : Type u_1\ninst✝⁴ : Semiring R✝\ninst✝³ : Semiring S✝\nrc : RingHomClass F R✝ S✝\nf : F\nI✝ J : Ideal R✝\nK L : Ideal S✝\nG : Type u_2\nrcg : RingHomClass G S✝ R✝\nι : Sort u_3\nR : Type u_4\nS : Type u_5\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring S\ninst✝ : Algebra R S\nI : Ideal R\nx✝ : S\nhx✝ : x✝ ∈ Submodule.restrictScalars R (map (algebraMap R S) I)\na x : S\nhx : x ∈ I • ⊤\n⊢ a • x ∈ I • ⊤\n[PROOFSTEP]\nrefine' Submodule.smul_induction_on hx _ _\n[GOAL]\ncase refine'_5.refine'_1\nR✝ : Type u\nS✝ : Type v\nF : Type u_1\ninst✝⁴ : Semiring R✝\ninst✝³ : Semiring S✝\nrc : RingHomClass F R✝ S✝\nf : F\nI✝ J : Ideal R✝\nK L : Ideal S✝\nG : Type u_2\nrcg : RingHomClass G S✝ R✝\nι : Sort u_3\nR : Type u_4\nS : Type u_5\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring S\ninst✝ : Algebra R S\nI : Ideal R\nx✝ : S\nhx✝ : x✝ ∈ Submodule.restrictScalars R (map (algebraMap R S) I)\na x : S\nhx : x ∈ I • ⊤\n⊢ ∀ (r : R), r ∈ I → ∀ (n : S), n ∈ ⊤ → a • r • n ∈ I • ⊤\n[PROOFSTEP]\nintro r hr s _\n[GOAL]\ncase refine'_5.refine'_1\nR✝ : Type u\nS✝ : Type v\nF : Type u_1\ninst✝⁴ : Semiring R✝\ninst✝³ : Semiring S✝\nrc : RingHomClass F R✝ S✝\nf : F\nI✝ J : Ideal R✝\nK L : Ideal S✝\nG : Type u_2\nrcg : RingHomClass G S✝ R✝\nι : Sort u_3\nR : Type u_4\nS : Type u_5\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring S\ninst✝ : Algebra R S\nI : Ideal R\nx✝ : S\nhx✝ : x✝ ∈ Submodule.restrictScalars R (map (algebraMap R S) I)\na x : S\nhx : x ∈ I • ⊤\nr : R\nhr : r ∈ I\ns : S\na✝ : s ∈ ⊤\n⊢ a • r • s ∈ I • ⊤\n[PROOFSTEP]\nrw [smul_comm]\n[GOAL]\ncase refine'_5.refine'_1\nR✝ : Type u\nS✝ : Type v\nF : Type u_1\ninst✝⁴ : Semiring R✝\ninst✝³ : Semiring S✝\nrc : RingHomClass F R✝ S✝\nf : F\nI✝ J : Ideal R✝\nK L : Ideal S✝\nG : Type u_2\nrcg : RingHomClass G S✝ R✝\nι : Sort u_3\nR : Type u_4\nS : Type u_5\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring S\ninst✝ : Algebra R S\nI : Ideal R\nx✝ : S\nhx✝ : x✝ ∈ Submodule.restrictScalars R (map (algebraMap R S) I)\na x : S\nhx : x ∈ I • ⊤\nr : R\nhr : r ∈ I\ns : S\na✝ : s ∈ ⊤\n⊢ r • a • s ∈ I • ⊤\n[PROOFSTEP]\nexact Submodule.smul_mem_smul hr Submodule.mem_top\n[GOAL]\ncase refine'_5.refine'_2\nR✝ : Type u\nS✝ : Type v\nF : Type u_1\ninst✝⁴ : Semiring R✝\ninst✝³ : Semiring S✝\nrc : RingHomClass F R✝ S✝\nf : F\nI✝ J : Ideal R✝\nK L : Ideal S✝\nG : Type u_2\nrcg : RingHomClass G S✝ R✝\nι : Sort u_3\nR : Type u_4\nS : Type u_5\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring S\ninst✝ : Algebra R S\nI : Ideal R\nx✝ : S\nhx✝ : x✝ ∈ Submodule.restrictScalars R (map (algebraMap R S) I)\na x : S\nhx : x ∈ I • ⊤\n⊢ ∀ (x y : S), a • x ∈ I • ⊤ → a • y ∈ I • ⊤ → a • (x + y) ∈ I • ⊤\n[PROOFSTEP]\nintro x y hx hy\n[GOAL]\ncase refine'_5.refine'_2\nR✝ : Type u\nS✝ : Type v\nF : Type u_1\ninst✝⁴ : Semiring R✝\ninst✝³ : Semiring S✝\nrc : RingHomClass F R✝ S✝\nf : F\nI✝ J : Ideal R✝\nK L : Ideal S✝\nG : Type u_2\nrcg : RingHomClass G S✝ R✝\nι : Sort u_3\nR : Type u_4\nS : Type u_5\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring S\ninst✝ : Algebra R S\nI : Ideal R\nx✝¹ : S\nhx✝¹ : x✝¹ ∈ Submodule.restrictScalars R (map (algebraMap R S) I)\na x✝ : S\nhx✝ : x✝ ∈ I • ⊤\nx y : S\nhx : a • x ∈ I • ⊤\nhy : a • y ∈ I • ⊤\n⊢ a • (x + y) ∈ I • ⊤\n[PROOFSTEP]\nrw [smul_add]\n[GOAL]\ncase refine'_5.refine'_2\nR✝ : Type u\nS✝ : Type v\nF : Type u_1\ninst✝⁴ : Semiring R✝\ninst✝³ : Semiring S✝\nrc : RingHomClass F R✝ S✝\nf : F\nI✝ J : Ideal R✝\nK L : Ideal S✝\nG : Type u_2\nrcg : RingHomClass G S✝ R✝\nι : Sort u_3\nR : Type u_4\nS : Type u_5\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring S\ninst✝ : Algebra R S\nI : Ideal R\nx✝¹ : S\nhx✝¹ : x✝¹ ∈ Submodule.restrictScalars R (map (algebraMap R S) I)\na x✝ : S\nhx✝ : x✝ ∈ I • ⊤\nx y : S\nhx : a • x ∈ I • ⊤\nhy : a • y ∈ I • ⊤\n⊢ a • x + a • y ∈ I • ⊤\n[PROOFSTEP]\nexact Submodule.add_mem _ hx hy\n[GOAL]\nR : Type u\nS : Type v\nF : Type u_1\ninst✝¹ : Semiring R\ninst✝ : Semiring S\nrc : RingHomClass F R S\nf : F\nI J : Ideal R\nK L : Ideal S\nG : Type u_2\nrcg : RingHomClass G S R\nι : Sort u_3\nhf : Function.Injective ↑f\n⊢ comap f ⊥ ≤ I\n[PROOFSTEP]\nrefine' le_trans (fun x hx => _) bot_le\n[GOAL]\nR : Type u\nS : Type v\nF : Type u_1\ninst✝¹ : Semiring R\ninst✝ : Semiring S\nrc : RingHomClass F R S\nf : F\nI J : Ideal R\nK L : Ideal S\nG : Type u_2\nrcg : RingHomClass G S R\nι : Sort u_3\nhf : Function.Injective ↑f\nx : R\nhx : x ∈ comap f ⊥\n⊢ x ∈ ⊥\n[PROOFSTEP]\nrw [mem_comap, Submodule.mem_bot, ← map_zero f] at hx \n[GOAL]\nR : Type u\nS : Type v\nF : Type u_1\ninst✝¹ : Semiring R\ninst✝ : Semiring S\nrc : RingHomClass F R S\nf : F\nI J : Ideal R\nK L : Ideal S\nG : Type u_2\nrcg : RingHomClass G S R\nι : Sort u_3\nhf : Function.Injective ↑f\nx : R\nhx : ↑f x = ↑f 0\n⊢ x ∈ ⊥\n[PROOFSTEP]\nexact Eq.symm (hf hx) ▸ Submodule.zero_mem ⊥\n[GOAL]\nR : Type u\nS : Type v\nF : Type u_1\ninst✝² : Ring R\ninst✝¹ : Ring S\ninst✝ : RingHomClass F R S\nf : F\nI✝ : Ideal R\nhf : Function.Surjective ↑f\nI : Ideal R\nr : R\nh : ↑f r ∈ map f I\ns : R\nhsi : s ∈ ↑I\nhfsr : ↑f s = ↑f r\n⊢ ↑f (r - s) = 0\n[PROOFSTEP]\nrw [map_sub, hfsr, sub_self]\n[GOAL]\nR : Type u\nS : Type v\nF : Type u_1\ninst✝² : Ring R\ninst✝¹ : Ring S\ninst✝ : RingHomClass F R S\nf : F\nI✝ : Ideal R\nhf : Function.Surjective ↑f\nI : Ideal R\nH : IsMaximal I\n⊢ map f I = ⊤ ∨ IsMaximal (map f I)\n[PROOFSTEP]\nrefine' or_iff_not_imp_left.2 fun ne_top => ⟨⟨fun h => ne_top h, fun J hJ => _⟩⟩\n[GOAL]\nR : Type u\nS : Type v\nF : Type u_1\ninst✝² : Ring R\ninst✝¹ : Ring S\ninst✝ : RingHomClass F R S\nf : F\nI✝ : Ideal R\nhf : Function.Surjective ↑f\nI : Ideal R\nH : IsMaximal I\nne_top : ¬map f I = ⊤\nJ : Ideal S\nhJ : map f I < J\n⊢ J = ⊤\n[PROOFSTEP]\nrefine'\n  (relIsoOfSurjective f hf).injective\n    (Subtype.ext_iff.2 (Eq.trans (H.1.2 (comap f J) (lt_of_le_of_ne _ _)) comap_top.symm))\n[GOAL]\ncase refine'_1\nR : Type u\nS : Type v\nF : Type u_1\ninst✝² : Ring R\ninst✝¹ : Ring S\ninst✝ : RingHomClass F R S\nf : F\nI✝ : Ideal R\nhf : Function.Surjective ↑f\nI : Ideal R\nH : IsMaximal I\nne_top : ¬map f I = ⊤\nJ : Ideal S\nhJ : map f I < J\n⊢ I ≤ comap f J\n[PROOFSTEP]\nexact map_le_iff_le_comap.1 (le_of_lt hJ)\n[GOAL]\ncase refine'_2\nR : Type u\nS : Type v\nF : Type u_1\ninst✝² : Ring R\ninst✝¹ : Ring S\ninst✝ : RingHomClass F R S\nf : F\nI✝ : Ideal R\nhf : Function.Surjective ↑f\nI : Ideal R\nH : IsMaximal I\nne_top : ¬map f I = ⊤\nJ : Ideal S\nhJ : map f I < J\n⊢ I ≠ comap f J\n[PROOFSTEP]\nexact fun h => hJ.right (le_map_of_comap_le_of_surjective f hf (le_of_eq h.symm))\n[GOAL]\nR : Type u\nS : Type v\nF : Type u_1\ninst✝² : Ring R\ninst✝¹ : Ring S\ninst✝ : RingHomClass F R S\nf : F\nI : Ideal R\nhf : Function.Surjective ↑f\nK : Ideal S\nH : IsMaximal K\n⊢ IsMaximal (comap f K)\n[PROOFSTEP]\nrefine' ⟨⟨comap_ne_top _ H.1.1, fun J hJ => _⟩⟩\n[GOAL]\nR : Type u\nS : Type v\nF : Type u_1\ninst✝² : Ring R\ninst✝¹ : Ring S\ninst✝ : RingHomClass F R S\nf : F\nI : Ideal R\nhf : Function.Surjective ↑f\nK : Ideal S\nH : IsMaximal K\nJ : Ideal R\nhJ : comap f K < J\n⊢ J = ⊤\n[PROOFSTEP]\nsuffices map f J = ⊤ by\n  have := congr_arg (comap f) this\n  rw [comap_top, comap_map_of_surjective _ hf, eq_top_iff] at this \n  rw [eq_top_iff]\n  exact le_trans this (sup_le (le_of_eq rfl) (le_trans (comap_mono bot_le) (le_of_lt hJ)))\n[GOAL]\nR : Type u\nS : Type v\nF : Type u_1\ninst✝² : Ring R\ninst✝¹ : Ring S\ninst✝ : RingHomClass F R S\nf : F\nI : Ideal R\nhf : Function.Surjective ↑f\nK : Ideal S\nH : IsMaximal K\nJ : Ideal R\nhJ : comap f K < J\nthis : map f J = ⊤\n⊢ J = ⊤\n[PROOFSTEP]\nhave := congr_arg (comap f) this\n[GOAL]\nR : Type u\nS : Type v\nF : Type u_1\ninst✝² : Ring R\ninst✝¹ : Ring S\ninst✝ : RingHomClass F R S\nf : F\nI : Ideal R\nhf : Function.Surjective ↑f\nK : Ideal S\nH : IsMaximal K\nJ : Ideal R\nhJ : comap f K < J\nthis✝ : map f J = ⊤\nthis : comap f (map f J) = comap f ⊤\n⊢ J = ⊤\n[PROOFSTEP]\nrw [comap_top, comap_map_of_surjective _ hf, eq_top_iff] at this \n[GOAL]\nR : Type u\nS : Type v\nF : Type u_1\ninst✝² : Ring R\ninst✝¹ : Ring S\ninst✝ : RingHomClass F R S\nf : F\nI : Ideal R\nhf : Function.Surjective ↑f\nK : Ideal S\nH : IsMaximal K\nJ : Ideal R\nhJ : comap f K < J\nthis✝ : map f J = ⊤\nthis : ⊤ ≤ J ⊔ comap f ⊥\n⊢ J = ⊤\n[PROOFSTEP]\nrw [eq_top_iff]\n[GOAL]\nR : Type u\nS : Type v\nF : Type u_1\ninst✝² : Ring R\ninst✝¹ : Ring S\ninst✝ : RingHomClass F R S\nf : F\nI : Ideal R\nhf : Function.Surjective ↑f\nK : Ideal S\nH : IsMaximal K\nJ : Ideal R\nhJ : comap f K < J\nthis✝ : map f J = ⊤\nthis : ⊤ ≤ J ⊔ comap f ⊥\n⊢ ⊤ ≤ J\n[PROOFSTEP]\nexact le_trans this (sup_le (le_of_eq rfl) (le_trans (comap_mono bot_le) (le_of_lt hJ)))\n[GOAL]\nR : Type u\nS : Type v\nF : Type u_1\ninst✝² : Ring R\ninst✝¹ : Ring S\ninst✝ : RingHomClass F R S\nf : F\nI : Ideal R\nhf : Function.Surjective ↑f\nK : Ideal S\nH : IsMaximal K\nJ : Ideal R\nhJ : comap f K < J\n⊢ map f J = ⊤\n[PROOFSTEP]\nrefine'\n  H.1.2 (map f J)\n    (lt_of_le_of_ne (le_map_of_comap_le_of_surjective _ hf (le_of_lt hJ)) fun h =>\n      ne_of_lt hJ (_root_.trans (congr_arg (comap f) h) _))\n[GOAL]\nR : Type u\nS : Type v\nF : Type u_1\ninst✝² : Ring R\ninst✝¹ : Ring S\ninst✝ : RingHomClass F R S\nf : F\nI : Ideal R\nhf : Function.Surjective ↑f\nK : Ideal S\nH : IsMaximal K\nJ : Ideal R\nhJ : comap f K < J\nh : K = map f J\n⊢ comap f (map f J) = J\n[PROOFSTEP]\nrw [comap_map_of_surjective _ hf, sup_eq_left]\n[GOAL]\nR : Type u\nS : Type v\nF : Type u_1\ninst✝² : Ring R\ninst✝¹ : Ring S\ninst✝ : RingHomClass F R S\nf : F\nI : Ideal R\nhf : Function.Surjective ↑f\nK : Ideal S\nH : IsMaximal K\nJ : Ideal R\nhJ : comap f K < J\nh : K = map f J\n⊢ comap f ⊥ ≤ J\n[PROOFSTEP]\nexact le_trans (comap_mono bot_le) (le_of_lt hJ)\n[GOAL]\nR : Type u\nS : Type v\nF : Type u_1\ninst✝² : Ring R\ninst✝¹ : Ring S\ninst✝ : RingHomClass F R S\nf✝ : F\nI✝ I : Ideal R\nf : R ≃+* S\n⊢ map (↑(RingEquiv.symm f)) (map (↑f) I) = I\n[PROOFSTEP]\nrw [← RingEquiv.toRingHom_eq_coe, ← RingEquiv.toRingHom_eq_coe, map_map, RingEquiv.toRingHom_eq_coe,\n  RingEquiv.toRingHom_eq_coe, RingEquiv.symm_comp, map_id]\n[GOAL]\nR : Type u\nS : Type v\nF : Type u_1\ninst✝² : Ring R\ninst✝¹ : Ring S\ninst✝ : RingHomClass F R S\nf✝ : F\nI✝ I : Ideal R\nf : R ≃+* S\n⊢ comap (↑f) (comap (↑(RingEquiv.symm f)) I) = I\n[PROOFSTEP]\nrw [← RingEquiv.toRingHom_eq_coe, ← RingEquiv.toRingHom_eq_coe, comap_comap, RingEquiv.toRingHom_eq_coe,\n  RingEquiv.toRingHom_eq_coe, RingEquiv.symm_comp, comap_id]\n[GOAL]\nR : Type u\nS : Type v\nF : Type u_1\ninst✝² : Ring R\ninst✝¹ : Ring S\ninst✝ : RingHomClass F R S\nf : F\nI✝ : Ideal R\nhf : Function.Bijective ↑f\nI : Ideal R\nH : IsMaximal I\n⊢ IsMaximal (map f I)\n[PROOFSTEP]\nrefine' or_iff_not_imp_left.1 (map_eq_top_or_isMaximal_of_surjective f hf.right H) fun h => H.1.1 _\n[GOAL]\nR : Type u\nS : Type v\nF : Type u_1\ninst✝² : Ring R\ninst✝¹ : Ring S\ninst✝ : RingHomClass F R S\nf : F\nI✝ : Ideal R\nhf : Function.Bijective ↑f\nI : Ideal R\nH : IsMaximal I\nh : map f I = ⊤\n⊢ I = ⊤\n[PROOFSTEP]\ncalc\n  I = comap f (map f I) := ((relIsoOfBijective f hf).right_inv I).symm\n  _ = comap f ⊤ := by rw [h]\n  _ = ⊤ := by rw [comap_top]\n[GOAL]\nR : Type u\nS : Type v\nF : Type u_1\ninst✝² : Ring R\ninst✝¹ : Ring S\ninst✝ : RingHomClass F R S\nf : F\nI✝ : Ideal R\nhf : Function.Bijective ↑f\nI : Ideal R\nH : IsMaximal I\nh : map f I = ⊤\n⊢ comap f (map f I) = comap f ⊤\n[PROOFSTEP]\nrw [h]\n[GOAL]\nR : Type u\nS : Type v\nF : Type u_1\ninst✝² : Ring R\ninst✝¹ : Ring S\ninst✝ : RingHomClass F R S\nf : F\nI✝ : Ideal R\nhf : Function.Bijective ↑f\nI : Ideal R\nH : IsMaximal I\nh : map f I = ⊤\n⊢ comap f ⊤ = ⊤\n[PROOFSTEP]\nrw [comap_top]\n[GOAL]\nR : Type u\nS : Type v\nF : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nrc : RingHomClass F R S\nf : F\nI J : Ideal R\nK L : Ideal S\nr : R\nhri : r ∈ I\ns : R\nhsj : s ∈ J\n⊢ ↑f (r * s) ∈ map f I * map f J\n[PROOFSTEP]\nrw [_root_.map_mul]\n[GOAL]\nR : Type u\nS : Type v\nF : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nrc : RingHomClass F R S\nf : F\nI J : Ideal R\nK L : Ideal S\nr : R\nhri : r ∈ I\ns : R\nhsj : s ∈ J\n⊢ ↑f r * ↑f s ∈ map f I * map f J\n[PROOFSTEP]\nexact mul_mem_mul (mem_map_of_mem f hri) (mem_map_of_mem f hsj)\n[GOAL]\nR : Type u\nS : Type v\nF : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nrc : RingHomClass F R S\nf : F\nI J : Ideal R\nK L : Ideal S\ni : S\nx✝¹ : i ∈ ↑f '' ↑I\nr : R\nhri : r ∈ ↑I\nhfri : ↑f r = i\nj : S\nx✝ : j ∈ ↑f '' ↑J\ns : R\nhsj : s ∈ ↑J\nhfsj : ↑f s = j\n⊢ ↑f r * ↑f s ∈ ↑(map f (I * J))\n[PROOFSTEP]\nrw [← _root_.map_mul]\n[GOAL]\nR : Type u\nS : Type v\nF : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nrc : RingHomClass F R S\nf : F\nI J : Ideal R\nK L : Ideal S\ni : S\nx✝¹ : i ∈ ↑f '' ↑I\nr : R\nhri : r ∈ ↑I\nhfri : ↑f r = i\nj : S\nx✝ : j ∈ ↑f '' ↑J\ns : R\nhsj : s ∈ ↑J\nhfsj : ↑f s = j\n⊢ ↑f (r * s) ∈ ↑(map f (I * J))\n[PROOFSTEP]\nexact mem_map_of_mem f (mul_mem_mul hri hsj)\n[GOAL]\nR : Type u\nS : Type v\nF : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nrc : RingHomClass F R S\nf : F\nI J : Ideal R\nK L : Ideal S\n⊢ ZeroHom.toFun { toFun := map f, map_zero' := (_ : map f ⊥ = ⊥) } 1 = 1\n[PROOFSTEP]\nsimp only [one_eq_top]\n[GOAL]\nR : Type u\nS : Type v\nF : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nrc : RingHomClass F R S\nf : F\nI J : Ideal R\nK L : Ideal S\n⊢ map f ⊤ = ⊤\n[PROOFSTEP]\nexact Ideal.map_top f\n[GOAL]\nR : Type u\nS : Type v\nF : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nrc : RingHomClass F R S\nf : F\nI J : Ideal R\nK L : Ideal S\n⊢ comap f (radical K) = radical (comap f K)\n[PROOFSTEP]\next\n[GOAL]\ncase h\nR : Type u\nS : Type v\nF : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nrc : RingHomClass F R S\nf : F\nI J : Ideal R\nK L : Ideal S\nx✝ : R\n⊢ x✝ ∈ comap f (radical K) ↔ x✝ ∈ radical (comap f K)\n[PROOFSTEP]\nsimp [radical]\n[GOAL]\nR : Type u\nS : Type v\nF : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nrc : RingHomClass F R S\nf : F\nI J : Ideal R\nK L : Ideal S\nhK : IsRadical K\n⊢ IsRadical (Ideal.comap f K)\n[PROOFSTEP]\nrw [← hK.radical, comap_radical]\n[GOAL]\nR : Type u\nS : Type v\nF : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nrc : RingHomClass F R S\nf : F\nI J : Ideal R\nK L : Ideal S\nhK : IsRadical K\n⊢ IsRadical (Ideal.radical (Ideal.comap f K))\n[PROOFSTEP]\napply radical_isRadical\n[GOAL]\nR : Type u\nS : Type v\nF : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nrc : RingHomClass F R S\nf : F\nI J : Ideal R\nK L : Ideal S\nn : ℕ\n⊢ comap f K ^ n ≤ comap f (K ^ n)\n[PROOFSTEP]\ninduction' n with n n_ih\n[GOAL]\ncase zero\nR : Type u\nS : Type v\nF : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nrc : RingHomClass F R S\nf : F\nI J : Ideal R\nK L : Ideal S\n⊢ comap f K ^ Nat.zero ≤ comap f (K ^ Nat.zero)\n[PROOFSTEP]\nrw [pow_zero, pow_zero, Ideal.one_eq_top, Ideal.one_eq_top]\n[GOAL]\ncase zero\nR : Type u\nS : Type v\nF : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nrc : RingHomClass F R S\nf : F\nI J : Ideal R\nK L : Ideal S\n⊢ ⊤ ≤ comap f ⊤\n[PROOFSTEP]\nexact rfl.le\n[GOAL]\ncase succ\nR : Type u\nS : Type v\nF : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nrc : RingHomClass F R S\nf : F\nI J : Ideal R\nK L : Ideal S\nn : ℕ\nn_ih : comap f K ^ n ≤ comap f (K ^ n)\n⊢ comap f K ^ Nat.succ n ≤ comap f (K ^ Nat.succ n)\n[PROOFSTEP]\nrw [pow_succ, pow_succ]\n[GOAL]\ncase succ\nR : Type u\nS : Type v\nF : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nrc : RingHomClass F R S\nf : F\nI J : Ideal R\nK L : Ideal S\nn : ℕ\nn_ih : comap f K ^ n ≤ comap f (K ^ n)\n⊢ comap f K * comap f K ^ n ≤ comap f (K * K ^ n)\n[PROOFSTEP]\nexact (Ideal.mul_mono_right n_ih).trans (Ideal.le_comap_mul f)\n[GOAL]\nR : Type u\ninst✝ : CommSemiring R\nI : Ideal R\nhi : IsPrimary I\nx y : R\nx✝ : x * y ∈ radical I\nm : ℕ\nhxy : (x * y) ^ m ∈ I\n⊢ x ∈ radical I ∨ y ∈ radical I\n[PROOFSTEP]\nrw [mul_pow] at hxy \n[GOAL]\nR : Type u\ninst✝ : CommSemiring R\nI : Ideal R\nhi : IsPrimary I\nx y : R\nx✝ : x * y ∈ radical I\nm : ℕ\nhxy : x ^ m * y ^ m ∈ I\n⊢ x ∈ radical I ∨ y ∈ radical I\n[PROOFSTEP]\ncases' hi.2 hxy with h h\n[GOAL]\ncase inl\nR : Type u\ninst✝ : CommSemiring R\nI : Ideal R\nhi : IsPrimary I\nx y : R\nx✝ : x * y ∈ radical I\nm : ℕ\nhxy : x ^ m * y ^ m ∈ I\nh : x ^ m ∈ I\n⊢ x ∈ radical I ∨ y ∈ radical I\n[PROOFSTEP]\nexact Or.inl ⟨m, h⟩\n[GOAL]\ncase inr\nR : Type u\ninst✝ : CommSemiring R\nI : Ideal R\nhi : IsPrimary I\nx y : R\nx✝ : x * y ∈ radical I\nm : ℕ\nhxy : x ^ m * y ^ m ∈ I\nh : y ^ m ∈ radical I\n⊢ x ∈ radical I ∨ y ∈ radical I\n[PROOFSTEP]\nexact Or.inr (mem_radical_of_pow_mem h)\n[GOAL]\nR : Type u\ninst✝ : CommSemiring R\nI J : Ideal R\nhi : IsPrimary I\nhj : IsPrimary J\nhij : radical I = radical J\nx y : R\nx✝ : x * y ∈ I ⊓ J\nhxyi : x * y ∈ ↑I\nhxyj : x * y ∈ ↑J\n⊢ x ∈ I ⊓ J ∨ y ∈ radical (I ⊓ J)\n[PROOFSTEP]\nrw [radical_inf, hij, inf_idem]\n[GOAL]\nR : Type u\ninst✝ : CommSemiring R\nI J : Ideal R\nhi : IsPrimary I\nhj : IsPrimary J\nhij : radical I = radical J\nx y : R\nx✝ : x * y ∈ I ⊓ J\nhxyi : x * y ∈ ↑I\nhxyj : x * y ∈ ↑J\n⊢ x ∈ I ⊓ J ∨ y ∈ radical J\n[PROOFSTEP]\ncases' hi.2 hxyi with hxi hyi\n[GOAL]\ncase inl\nR : Type u\ninst✝ : CommSemiring R\nI J : Ideal R\nhi : IsPrimary I\nhj : IsPrimary J\nhij : radical I = radical J\nx y : R\nx✝ : x * y ∈ I ⊓ J\nhxyi : x * y ∈ ↑I\nhxyj : x * y ∈ ↑J\nhxi : x ∈ I\n⊢ x ∈ I ⊓ J ∨ y ∈ radical J\ncase inr\nR : Type u\ninst✝ : CommSemiring R\nI J : Ideal R\nhi : IsPrimary I\nhj : IsPrimary J\nhij : radical I = radical J\nx y : R\nx✝ : x * y ∈ I ⊓ J\nhxyi : x * y ∈ ↑I\nhxyj : x * y ∈ ↑J\nhyi : y ∈ radical I\n⊢ x ∈ I ⊓ J ∨ y ∈ radical J\n[PROOFSTEP]\ncases' hj.2 hxyj with hxj hyj\n[GOAL]\ncase inl.inl\nR : Type u\ninst✝ : CommSemiring R\nI J : Ideal R\nhi : IsPrimary I\nhj : IsPrimary J\nhij : radical I = radical J\nx y : R\nx✝ : x * y ∈ I ⊓ J\nhxyi : x * y ∈ ↑I\nhxyj : x * y ∈ ↑J\nhxi : x ∈ I\nhxj : x ∈ J\n⊢ x ∈ I ⊓ J ∨ y ∈ radical J\n[PROOFSTEP]\nexact Or.inl ⟨hxi, hxj⟩\n[GOAL]\ncase inl.inr\nR : Type u\ninst✝ : CommSemiring R\nI J : Ideal R\nhi : IsPrimary I\nhj : IsPrimary J\nhij : radical I = radical J\nx y : R\nx✝ : x * y ∈ I ⊓ J\nhxyi : x * y ∈ ↑I\nhxyj : x * y ∈ ↑J\nhxi : x ∈ I\nhyj : y ∈ radical J\n⊢ x ∈ I ⊓ J ∨ y ∈ radical J\n[PROOFSTEP]\nexact Or.inr hyj\n[GOAL]\ncase inr\nR : Type u\ninst✝ : CommSemiring R\nI J : Ideal R\nhi : IsPrimary I\nhj : IsPrimary J\nhij : radical I = radical J\nx y : R\nx✝ : x * y ∈ I ⊓ J\nhxyi : x * y ∈ ↑I\nhxyj : x * y ∈ ↑J\nhyi : y ∈ radical I\n⊢ x ∈ I ⊓ J ∨ y ∈ radical J\n[PROOFSTEP]\nrw [hij] at hyi \n[GOAL]\ncase inr\nR : Type u\ninst✝ : CommSemiring R\nI J : Ideal R\nhi : IsPrimary I\nhj : IsPrimary J\nhij : radical I = radical J\nx y : R\nx✝ : x * y ∈ I ⊓ J\nhxyi : x * y ∈ ↑I\nhxyj : x * y ∈ ↑J\nhyi : y ∈ radical J\n⊢ x ∈ I ⊓ J ∨ y ∈ radical J\n[PROOFSTEP]\nexact Or.inr hyi\n[GOAL]\nι : Type u_1\nM : Type u_2\ninst✝² : AddCommGroup M\nR : Type u_3\ninst✝¹ : CommRing R\ninst✝ : Module R M\nI : Ideal R\nv : ι → M\nhv : Submodule.span R (Set.range v) = ⊤\nf : ι →₀ { x // x ∈ I }\n⊢ ↑(finsuppTotal ι M I v) f = Finsupp.sum f fun i x => ↑x • v i\n[PROOFSTEP]\ndsimp [finsuppTotal]\n[GOAL]\nι : Type u_1\nM : Type u_2\ninst✝² : AddCommGroup M\nR : Type u_3\ninst✝¹ : CommRing R\ninst✝ : Module R M\nI : Ideal R\nv : ι → M\nhv : Submodule.span R (Set.range v) = ⊤\nf : ι →₀ { x // x ∈ I }\n⊢ ↑(Finsupp.total ι M R v) (Finsupp.mapRange Subtype.val (_ : ↑(Submodule.subtype I) 0 = 0) f) =\n    Finsupp.sum f fun i x => ↑x • v i\n[PROOFSTEP]\nrw [Finsupp.total_apply, Finsupp.sum_mapRange_index]\n[GOAL]\nι : Type u_1\nM : Type u_2\ninst✝² : AddCommGroup M\nR : Type u_3\ninst✝¹ : CommRing R\ninst✝ : Module R M\nI : Ideal R\nv : ι → M\nhv : Submodule.span R (Set.range v) = ⊤\nf : ι →₀ { x // x ∈ I }\n⊢ ∀ (a : ι), 0 • v a = 0\n[PROOFSTEP]\nexact fun _ => zero_smul _ _\n[GOAL]\nι : Type u_1\nM : Type u_2\ninst✝³ : AddCommGroup M\nR : Type u_3\ninst✝² : CommRing R\ninst✝¹ : Module R M\nI : Ideal R\nv : ι → M\nhv : Submodule.span R (Set.range v) = ⊤\ninst✝ : Fintype ι\nf : ι →₀ { x // x ∈ I }\n⊢ ↑(finsuppTotal ι M I v) f = ∑ i : ι, ↑(↑f i) • v i\n[PROOFSTEP]\nrw [finsuppTotal_apply, Finsupp.sum_fintype]\n[GOAL]\ncase h\nι : Type u_1\nM : Type u_2\ninst✝³ : AddCommGroup M\nR : Type u_3\ninst✝² : CommRing R\ninst✝¹ : Module R M\nI : Ideal R\nv : ι → M\nhv : Submodule.span R (Set.range v) = ⊤\ninst✝ : Fintype ι\nf : ι →₀ { x // x ∈ I }\n⊢ ∀ (i : ι), ↑0 • v i = 0\n[PROOFSTEP]\nexact fun _ => zero_smul _ _\n[GOAL]\nι : Type u_1\nM : Type u_2\ninst✝² : AddCommGroup M\nR : Type u_3\ninst✝¹ : CommRing R\ninst✝ : Module R M\nI : Ideal R\nv : ι → M\nhv : Submodule.span R (Set.range v) = ⊤\n⊢ LinearMap.range (finsuppTotal ι M I v) = I • Submodule.span R (Set.range v)\n[PROOFSTEP]\next\n[GOAL]\ncase h\nι : Type u_1\nM : Type u_2\ninst✝² : AddCommGroup M\nR : Type u_3\ninst✝¹ : CommRing R\ninst✝ : Module R M\nI : Ideal R\nv : ι → M\nhv : Submodule.span R (Set.range v) = ⊤\nx✝ : M\n⊢ x✝ ∈ LinearMap.range (finsuppTotal ι M I v) ↔ x✝ ∈ I • Submodule.span R (Set.range v)\n[PROOFSTEP]\nrw [Submodule.mem_ideal_smul_span_iff_exists_sum]\n[GOAL]\ncase h\nι : Type u_1\nM : Type u_2\ninst✝² : AddCommGroup M\nR : Type u_3\ninst✝¹ : CommRing R\ninst✝ : Module R M\nI : Ideal R\nv : ι → M\nhv : Submodule.span R (Set.range v) = ⊤\nx✝ : M\n⊢ x✝ ∈ LinearMap.range (finsuppTotal ι M I v) ↔ ∃ a x, (Finsupp.sum a fun i c => c • v i) = x✝\n[PROOFSTEP]\nrefine' ⟨fun ⟨f, h⟩ => ⟨Finsupp.mapRange.linearMap I.subtype f, fun i => (f i).2, h⟩, _⟩\n[GOAL]\ncase h\nι : Type u_1\nM : Type u_2\ninst✝² : AddCommGroup M\nR : Type u_3\ninst✝¹ : CommRing R\ninst✝ : Module R M\nI : Ideal R\nv : ι → M\nhv : Submodule.span R (Set.range v) = ⊤\nx✝ : M\n⊢ (∃ a x, (Finsupp.sum a fun i c => c • v i) = x✝) → x✝ ∈ LinearMap.range (finsuppTotal ι M I v)\n[PROOFSTEP]\nrintro ⟨a, ha, rfl⟩\n[GOAL]\ncase h.intro.intro\nι : Type u_1\nM : Type u_2\ninst✝² : AddCommGroup M\nR : Type u_3\ninst✝¹ : CommRing R\ninst✝ : Module R M\nI : Ideal R\nv : ι → M\nhv : Submodule.span R (Set.range v) = ⊤\na : ι →₀ R\nha : ∀ (i : ι), ↑a i ∈ I\n⊢ (Finsupp.sum a fun i c => c • v i) ∈ LinearMap.range (finsuppTotal ι M I v)\n[PROOFSTEP]\nclassical\nrefine' ⟨a.mapRange (fun r => if h : r ∈ I then ⟨r, h⟩ else 0) (by simp), _⟩\nrw [finsuppTotal_apply, Finsupp.sum_mapRange_index]\n· apply Finsupp.sum_congr\n  intro i _\n  rw [dif_pos (ha i)]\n· exact fun _ => zero_smul _ _\n[GOAL]\ncase h.intro.intro\nι : Type u_1\nM : Type u_2\ninst✝² : AddCommGroup M\nR : Type u_3\ninst✝¹ : CommRing R\ninst✝ : Module R M\nI : Ideal R\nv : ι → M\nhv : Submodule.span R (Set.range v) = ⊤\na : ι →₀ R\nha : ∀ (i : ι), ↑a i ∈ I\n⊢ (Finsupp.sum a fun i c => c • v i) ∈ LinearMap.range (finsuppTotal ι M I v)\n[PROOFSTEP]\nrefine' ⟨a.mapRange (fun r => if h : r ∈ I then ⟨r, h⟩ else 0) (by simp), _⟩\n[GOAL]\nι : Type u_1\nM : Type u_2\ninst✝² : AddCommGroup M\nR : Type u_3\ninst✝¹ : CommRing R\ninst✝ : Module R M\nI : Ideal R\nv : ι → M\nhv : Submodule.span R (Set.range v) = ⊤\na : ι →₀ R\nha : ∀ (i : ι), ↑a i ∈ I\n⊢ (fun r => if h : r ∈ I then { val := r, property := h } else 0) 0 = 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.intro.intro\nι : Type u_1\nM : Type u_2\ninst✝² : AddCommGroup M\nR : Type u_3\ninst✝¹ : CommRing R\ninst✝ : Module R M\nI : Ideal R\nv : ι → M\nhv : Submodule.span R (Set.range v) = ⊤\na : ι →₀ R\nha : ∀ (i : ι), ↑a i ∈ I\n⊢ ↑(finsuppTotal ι M I v)\n      (Finsupp.mapRange (fun r => if h : r ∈ I then { val := r, property := h } else 0)\n        (_ : (if h : 0 ∈ I then { val := 0, property := h } else 0) = 0) a) =\n    Finsupp.sum a fun i c => c • v i\n[PROOFSTEP]\nrw [finsuppTotal_apply, Finsupp.sum_mapRange_index]\n[GOAL]\ncase h.intro.intro\nι : Type u_1\nM : Type u_2\ninst✝² : AddCommGroup M\nR : Type u_3\ninst✝¹ : CommRing R\ninst✝ : Module R M\nI : Ideal R\nv : ι → M\nhv : Submodule.span R (Set.range v) = ⊤\na : ι →₀ R\nha : ∀ (i : ι), ↑a i ∈ I\n⊢ (Finsupp.sum a fun a b => ↑(if h : b ∈ I then { val := b, property := h } else 0) • v a) =\n    Finsupp.sum a fun i c => c • v i\n[PROOFSTEP]\napply Finsupp.sum_congr\n[GOAL]\ncase h.intro.intro.h\nι : Type u_1\nM : Type u_2\ninst✝² : AddCommGroup M\nR : Type u_3\ninst✝¹ : CommRing R\ninst✝ : Module R M\nI : Ideal R\nv : ι → M\nhv : Submodule.span R (Set.range v) = ⊤\na : ι →₀ R\nha : ∀ (i : ι), ↑a i ∈ I\n⊢ ∀ (x : ι), x ∈ a.support → ↑(if h : ↑a x ∈ I then { val := ↑a x, property := h } else 0) • v x = ↑a x • v x\n[PROOFSTEP]\nintro i _\n[GOAL]\ncase h.intro.intro.h\nι : Type u_1\nM : Type u_2\ninst✝² : AddCommGroup M\nR : Type u_3\ninst✝¹ : CommRing R\ninst✝ : Module R M\nI : Ideal R\nv : ι → M\nhv : Submodule.span R (Set.range v) = ⊤\na : ι →₀ R\nha : ∀ (i : ι), ↑a i ∈ I\ni : ι\na✝ : i ∈ a.support\n⊢ ↑(if h : ↑a i ∈ I then { val := ↑a i, property := h } else 0) • v i = ↑a i • v i\n[PROOFSTEP]\nrw [dif_pos (ha i)]\n[GOAL]\ncase h.intro.intro\nι : Type u_1\nM : Type u_2\ninst✝² : AddCommGroup M\nR : Type u_3\ninst✝¹ : CommRing R\ninst✝ : Module R M\nI : Ideal R\nv : ι → M\nhv : Submodule.span R (Set.range v) = ⊤\na : ι →₀ R\nha : ∀ (i : ι), ↑a i ∈ I\n⊢ ∀ (a : ι), ↑0 • v a = 0\n[PROOFSTEP]\nexact fun _ => zero_smul _ _\n[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\ninst✝³ : CommSemiring R\ninst✝² : CommRing S\ninst✝¹ : IsDomain S\ninst✝ : Algebra R S\nb : Basis ι R S\nx : S\nhx : x ≠ 0\n⊢ LinearMap.range (↑(Algebra.lmul R S) x) = Submodule.restrictScalars R (span {x})\n[PROOFSTEP]\next\n[GOAL]\ncase h\nι : Type u_1\nR : Type u_2\nS : Type u_3\ninst✝³ : CommSemiring R\ninst✝² : CommRing S\ninst✝¹ : IsDomain S\ninst✝ : Algebra R S\nb : Basis ι R S\nx : S\nhx : x ≠ 0\nx✝ : S\n⊢ x✝ ∈ LinearMap.range (↑(Algebra.lmul R S) x) ↔ x✝ ∈ Submodule.restrictScalars R (span {x})\n[PROOFSTEP]\nsimp [mem_span_singleton', mul_comm]\n[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\ninst✝³ : CommSemiring R\ninst✝² : CommRing S\ninst✝¹ : IsDomain S\ninst✝ : Algebra R S\nb : Basis ι R S\nx : S\nhx : x ≠ 0\ni : ι\n⊢ ↑(↑(basisSpanSingleton b hx) i) = x * ↑b i\n[PROOFSTEP]\nsimp only [basisSpanSingleton, Basis.map_apply, LinearEquiv.trans_apply, Submodule.restrictScalarsEquiv_apply,\n  LinearEquiv.ofInjective_apply, LinearEquiv.coe_ofEq_apply, LinearEquiv.restrictScalars_apply, Algebra.coe_lmul_eq_mul,\n  LinearMap.mul_apply']\n[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\ninst✝⁶ : CommSemiring R\ninst✝⁵ : CommRing S\ninst✝⁴ : IsDomain S\ninst✝³ : Algebra R S\nN : Type u_4\ninst✝² : Semiring N\ninst✝¹ : Module N S\ninst✝ : SMulCommClass R N S\nb : Basis ι R S\nx : S\nhx : x ≠ 0\ni : ι\n⊢ ↑(AddHom.toFun (↑(Basis.constr b N)).toAddHom (Subtype.val ∘ ↑(basisSpanSingleton b hx))) (↑b i) =\n    ↑(↑(Algebra.lmul R S) x) (↑b i)\n[PROOFSTEP]\nerw [Basis.constr_basis, Function.comp_apply, basisSpanSingleton_apply, LinearMap.mul_apply']\n[GOAL]\nR : Type u_1\ninst✝ : CommSemiring R\nr : R\n⊢ Associates.mk (Ideal.span {r}) ≠ 0 ↔ r ≠ 0\n[PROOFSTEP]\nrw [Associates.mk_ne_zero, Ideal.zero_eq_bot, Ne.def, Ideal.span_singleton_eq_bot]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nF : Type u_1\nG : Type u_2\ninst✝² : Semiring R\ninst✝¹ : Semiring S\ninst✝ : Semiring T\nrcf : RingHomClass F R S\nrcg : RingHomClass G T S\nf : F\ng : G\nr : R\n⊢ r ∈ ker f ↔ ↑f r = 0\n[PROOFSTEP]\nrw [ker, Ideal.mem_comap, Submodule.mem_bot]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nF : Type u_1\nG : Type u_2\ninst✝² : Semiring R\ninst✝¹ : Semiring S\ninst✝ : Semiring T\nrcf : RingHomClass F R S\nrcg : RingHomClass G T S\nf✝ : F\ng✝ : G\nf : S →+* R\ng : T →+* S\n⊢ Ideal.comap g (ker f) = ker (comp f g)\n[PROOFSTEP]\nrw [RingHom.ker_eq_comap_bot, Ideal.comap_comap, RingHom.ker_eq_comap_bot]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nF : Type u_1\nG : Type u_2\ninst✝³ : Semiring R\ninst✝² : Semiring S\ninst✝¹ : Semiring T\nrcf : RingHomClass F R S\nrcg : RingHomClass G T S\nf✝ : F\ng : G\ninst✝ : Nontrivial S\nf : F\n⊢ ¬1 ∈ ker f\n[PROOFSTEP]\nrw [mem_ker, map_one]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nF : Type u_1\nG : Type u_2\ninst✝³ : Semiring R\ninst✝² : Semiring S\ninst✝¹ : Semiring T\nrcf : RingHomClass F R S\nrcg : RingHomClass G T S\nf✝ : F\ng : G\ninst✝ : Nontrivial S\nf : F\n⊢ ¬1 = 0\n[PROOFSTEP]\nexact one_ne_zero\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nF : Type u_1\ninst✝¹ : Ring R\ninst✝ : Semiring S\nrc : RingHomClass F R S\nf : F\n⊢ Function.Injective ↑f ↔ ker f = ⊥\n[PROOFSTEP]\nrw [SetLike.ext'_iff, ker_eq, Set.ext_iff]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nF : Type u_1\ninst✝¹ : Ring R\ninst✝ : Semiring S\nrc : RingHomClass F R S\nf : F\n⊢ Function.Injective ↑f ↔ ∀ (x : R), x ∈ ↑f ⁻¹' {0} ↔ x ∈ ↑⊥\n[PROOFSTEP]\nexact injective_iff_map_eq_zero' f\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nF : Type u_1\ninst✝¹ : Ring R\ninst✝ : Semiring S\nrc : RingHomClass F R S\nf : F\n⊢ ker f = ⊥ ↔ ∀ (x : R), ↑f x = 0 → x = 0\n[PROOFSTEP]\nrw [← injective_iff_map_eq_zero f, injective_iff_ker_eq_bot]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nF : Type u_1\ninst✝¹ : Ring R\ninst✝ : Semiring S\nrc : RingHomClass F R S\nf✝ : F\nf : R ≃+* S\n⊢ ker ↑f = ⊥\n[PROOFSTEP]\nsimpa only [← injective_iff_ker_eq_bot] using EquivLike.injective f\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nF : Type u_1\ninst✝² : Ring R\ninst✝¹ : Semiring S\nrc : RingHomClass F R S\nf✝ : F\nF' : Type u_2\ninst✝ : RingEquivClass F' R S\nf : F'\n⊢ ker f = ⊥\n[PROOFSTEP]\nsimpa only [← injective_iff_ker_eq_bot] using EquivLike.injective f\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nF : Type u_1\ninst✝¹ : Ring R\ninst✝ : Ring S\nrc : RingHomClass F R S\nf : F\nx y : R\n⊢ x - y ∈ ker f ↔ ↑f x = ↑f y\n[PROOFSTEP]\nrw [mem_ker, map_sub, sub_eq_zero]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nF : Type u_1\ninst✝³ : Ring R\ninst✝² : Ring S\ninst✝¹ : IsDomain S\ninst✝ : RingHomClass F R S\nf : F\n⊢ ker f ≠ ⊤\n[PROOFSTEP]\nrw [Ne.def, Ideal.eq_top_iff_one]\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nF : Type u_1\ninst✝³ : Ring R\ninst✝² : Ring S\ninst✝¹ : IsDomain S\ninst✝ : RingHomClass F R S\nf : F\n⊢ ¬1 ∈ ker f\n[PROOFSTEP]\nexact not_one_mem_ker f\n[GOAL]\nR : Type u\nS : Type v\nT : Type w\nF : Type u_1\ninst✝³ : Ring R\ninst✝² : Ring S\ninst✝¹ : IsDomain S\ninst✝ : RingHomClass F R S\nf : F\nx y : R\n⊢ x * y ∈ ker f → x ∈ ker f ∨ y ∈ ker f\n[PROOFSTEP]\nsimpa only [mem_ker, map_mul] using @eq_zero_or_eq_zero_of_mul_eq_zero S _ _ _ _ _\n[GOAL]\nR✝ : Type u\nS : Type v\nT : Type w\nR : Type u_1\nK : Type u_2\nF : Type u_3\ninst✝² : Ring R\ninst✝¹ : Field K\ninst✝ : RingHomClass F R K\nf : F\nhf : Function.Surjective ↑f\n⊢ Ideal.IsMaximal (ker f)\n[PROOFSTEP]\nrefine' Ideal.isMaximal_iff.mpr ⟨fun h1 => one_ne_zero' K <| map_one f ▸ (mem_ker f).mp h1, fun J x hJ hxf hxJ => _⟩\n[GOAL]\nR✝ : Type u\nS : Type v\nT : Type w\nR : Type u_1\nK : Type u_2\nF : Type u_3\ninst✝² : Ring R\ninst✝¹ : Field K\ninst✝ : RingHomClass F R K\nf : F\nhf : Function.Surjective ↑f\nJ : Ideal R\nx : R\nhJ : ker f ≤ J\nhxf : ¬x ∈ ker f\nhxJ : x ∈ J\n⊢ 1 ∈ J\n[PROOFSTEP]\nobtain ⟨y, hy⟩ := hf (f x)⁻¹\n[GOAL]\ncase intro\nR✝ : Type u\nS : Type v\nT : Type w\nR : Type u_1\nK : Type u_2\nF : Type u_3\ninst✝² : Ring R\ninst✝¹ : Field K\ninst✝ : RingHomClass F R K\nf : F\nhf : Function.Surjective ↑f\nJ : Ideal R\nx : R\nhJ : ker f ≤ J\nhxf : ¬x ∈ ker f\nhxJ : x ∈ J\ny : R\nhy : ↑f y = (↑f x)⁻¹\n⊢ 1 ∈ J\n[PROOFSTEP]\nhave H : 1 = y * x - (y * x - 1) := (sub_sub_cancel _ _).symm\n[GOAL]\ncase intro\nR✝ : Type u\nS : Type v\nT : Type w\nR : Type u_1\nK : Type u_2\nF : Type u_3\ninst✝² : Ring R\ninst✝¹ : Field K\ninst✝ : RingHomClass F R K\nf : F\nhf : Function.Surjective ↑f\nJ : Ideal R\nx : R\nhJ : ker f ≤ J\nhxf : ¬x ∈ ker f\nhxJ : x ∈ J\ny : R\nhy : ↑f y = (↑f x)⁻¹\nH : 1 = y * x - (y * x - 1)\n⊢ 1 ∈ J\n[PROOFSTEP]\nrw [H]\n[GOAL]\ncase intro\nR✝ : Type u\nS : Type v\nT : Type w\nR : Type u_1\nK : Type u_2\nF : Type u_3\ninst✝² : Ring R\ninst✝¹ : Field K\ninst✝ : RingHomClass F R K\nf : F\nhf : Function.Surjective ↑f\nJ : Ideal R\nx : R\nhJ : ker f ≤ J\nhxf : ¬x ∈ ker f\nhxJ : x ∈ J\ny : R\nhy : ↑f y = (↑f x)⁻¹\nH : 1 = y * x - (y * x - 1)\n⊢ y * x - (y * x - 1) ∈ J\n[PROOFSTEP]\nrefine' J.sub_mem (J.mul_mem_left _ hxJ) (hJ _)\n[GOAL]\ncase intro\nR✝ : Type u\nS : Type v\nT : Type w\nR : Type u_1\nK : Type u_2\nF : Type u_3\ninst✝² : Ring R\ninst✝¹ : Field K\ninst✝ : RingHomClass F R K\nf : F\nhf : Function.Surjective ↑f\nJ : Ideal R\nx : R\nhJ : ker f ≤ J\nhxf : ¬x ∈ ker f\nhxJ : x ∈ J\ny : R\nhy : ↑f y = (↑f x)⁻¹\nH : 1 = y * x - (y * x - 1)\n⊢ y * x - 1 ∈ ker f\n[PROOFSTEP]\nrw [mem_ker]\n[GOAL]\ncase intro\nR✝ : Type u\nS : Type v\nT : Type w\nR : Type u_1\nK : Type u_2\nF : Type u_3\ninst✝² : Ring R\ninst✝¹ : Field K\ninst✝ : RingHomClass F R K\nf : F\nhf : Function.Surjective ↑f\nJ : Ideal R\nx : R\nhJ : ker f ≤ J\nhxf : ¬x ∈ ker f\nhxJ : x ∈ J\ny : R\nhy : ↑f y = (↑f x)⁻¹\nH : 1 = y * x - (y * x - 1)\n⊢ ↑f (y * x - 1) = 0\n[PROOFSTEP]\nsimp only [hy, map_sub, map_one, map_mul, inv_mul_cancel (mt (mem_ker f).mpr hxf), sub_self]\n[GOAL]\nR : Type u_1\nS : Type u_2\nF : Type u_3\ninst✝¹ : Semiring R\ninst✝ : Semiring S\nrc : RingHomClass F R S\nI : Ideal R\nf : F\n⊢ map f I = ⊥ ↔ I ≤ RingHom.ker f\n[PROOFSTEP]\nrw [RingHom.ker, eq_bot_iff, map_le_iff_le_comap]\n[GOAL]\nR : Type u_1\nS : Type u_2\nF : Type u_3\ninst✝¹ : Ring R\ninst✝ : Ring S\nrc : RingHomClass F R S\nA : Set (Ideal R)\nf : F\nhf : Function.Surjective ↑f\n⊢ (∀ (J : Ideal R), J ∈ A → RingHom.ker f ≤ J) → map f (sInf A) = sInf (map f '' A)\n[PROOFSTEP]\nrefine' fun h => le_antisymm (le_sInf _) _\n[GOAL]\ncase refine'_1\nR : Type u_1\nS : Type u_2\nF : Type u_3\ninst✝¹ : Ring R\ninst✝ : Ring S\nrc : RingHomClass F R S\nA : Set (Ideal R)\nf : F\nhf : Function.Surjective ↑f\nh : ∀ (J : Ideal R), J ∈ A → RingHom.ker f ≤ J\n⊢ ∀ (b : Ideal S), b ∈ map f '' A → map f (sInf A) ≤ b\n[PROOFSTEP]\nintro j hj y hy\n[GOAL]\ncase refine'_1\nR : Type u_1\nS : Type u_2\nF : Type u_3\ninst✝¹ : Ring R\ninst✝ : Ring S\nrc : RingHomClass F R S\nA : Set (Ideal R)\nf : F\nhf : Function.Surjective ↑f\nh : ∀ (J : Ideal R), J ∈ A → RingHom.ker f ≤ J\nj : Ideal S\nhj : j ∈ map f '' A\ny : S\nhy : y ∈ map f (sInf A)\n⊢ y ∈ j\n[PROOFSTEP]\ncases' (mem_map_iff_of_surjective f hf).1 hy with x hx\n[GOAL]\ncase refine'_1.intro\nR : Type u_1\nS : Type u_2\nF : Type u_3\ninst✝¹ : Ring R\ninst✝ : Ring S\nrc : RingHomClass F R S\nA : Set (Ideal R)\nf : F\nhf : Function.Surjective ↑f\nh : ∀ (J : Ideal R), J ∈ A → RingHom.ker f ≤ J\nj : Ideal S\nhj : j ∈ map f '' A\ny : S\nhy : y ∈ map f (sInf A)\nx : R\nhx : x ∈ sInf A ∧ ↑f x = y\n⊢ y ∈ j\n[PROOFSTEP]\ncases' (Set.mem_image _ _ _).mp hj with J hJ\n[GOAL]\ncase refine'_1.intro.intro\nR : Type u_1\nS : Type u_2\nF : Type u_3\ninst✝¹ : Ring R\ninst✝ : Ring S\nrc : RingHomClass F R S\nA : Set (Ideal R)\nf : F\nhf : Function.Surjective ↑f\nh : ∀ (J : Ideal R), J ∈ A → RingHom.ker f ≤ J\nj : Ideal S\nhj : j ∈ map f '' A\ny : S\nhy : y ∈ map f (sInf A)\nx : R\nhx : x ∈ sInf A ∧ ↑f x = y\nJ : Ideal R\nhJ : J ∈ A ∧ map f J = j\n⊢ y ∈ j\n[PROOFSTEP]\nrw [← hJ.right, ← hx.right]\n[GOAL]\ncase refine'_1.intro.intro\nR : Type u_1\nS : Type u_2\nF : Type u_3\ninst✝¹ : Ring R\ninst✝ : Ring S\nrc : RingHomClass F R S\nA : Set (Ideal R)\nf : F\nhf : Function.Surjective ↑f\nh : ∀ (J : Ideal R), J ∈ A → RingHom.ker f ≤ J\nj : Ideal S\nhj : j ∈ map f '' A\ny : S\nhy : y ∈ map f (sInf A)\nx : R\nhx : x ∈ sInf A ∧ ↑f x = y\nJ : Ideal R\nhJ : J ∈ A ∧ map f J = j\n⊢ ↑f x ∈ map f J\n[PROOFSTEP]\nexact mem_map_of_mem f (sInf_le_of_le hJ.left (le_of_eq rfl) hx.left)\n[GOAL]\ncase refine'_2\nR : Type u_1\nS : Type u_2\nF : Type u_3\ninst✝¹ : Ring R\ninst✝ : Ring S\nrc : RingHomClass F R S\nA : Set (Ideal R)\nf : F\nhf : Function.Surjective ↑f\nh : ∀ (J : Ideal R), J ∈ A → RingHom.ker f ≤ J\n⊢ sInf (map f '' A) ≤ map f (sInf A)\n[PROOFSTEP]\nintro y hy\n[GOAL]\ncase refine'_2\nR : Type u_1\nS : Type u_2\nF : Type u_3\ninst✝¹ : Ring R\ninst✝ : Ring S\nrc : RingHomClass F R S\nA : Set (Ideal R)\nf : F\nhf : Function.Surjective ↑f\nh : ∀ (J : Ideal R), J ∈ A → RingHom.ker f ≤ J\ny : S\nhy : y ∈ sInf (map f '' A)\n⊢ y ∈ map f (sInf A)\n[PROOFSTEP]\ncases' hf y with x hx\n[GOAL]\ncase refine'_2.intro\nR : Type u_1\nS : Type u_2\nF : Type u_3\ninst✝¹ : Ring R\ninst✝ : Ring S\nrc : RingHomClass F R S\nA : Set (Ideal R)\nf : F\nhf : Function.Surjective ↑f\nh : ∀ (J : Ideal R), J ∈ A → RingHom.ker f ≤ J\ny : S\nhy : y ∈ sInf (map f '' A)\nx : R\nhx : ↑f x = y\n⊢ y ∈ map f (sInf A)\n[PROOFSTEP]\nrefine' hx ▸ mem_map_of_mem f _\n[GOAL]\ncase refine'_2.intro\nR : Type u_1\nS : Type u_2\nF : Type u_3\ninst✝¹ : Ring R\ninst✝ : Ring S\nrc : RingHomClass F R S\nA : Set (Ideal R)\nf : F\nhf : Function.Surjective ↑f\nh : ∀ (J : Ideal R), J ∈ A → RingHom.ker f ≤ J\ny : S\nhy : y ∈ sInf (map f '' A)\nx : R\nhx : ↑f x = y\n⊢ x ∈ sInf A\n[PROOFSTEP]\nhave : ∀ I ∈ A, y ∈ map f I := by simpa using hy\n[GOAL]\nR : Type u_1\nS : Type u_2\nF : Type u_3\ninst✝¹ : Ring R\ninst✝ : Ring S\nrc : RingHomClass F R S\nA : Set (Ideal R)\nf : F\nhf : Function.Surjective ↑f\nh : ∀ (J : Ideal R), J ∈ A → RingHom.ker f ≤ J\ny : S\nhy : y ∈ sInf (map f '' A)\nx : R\nhx : ↑f x = y\n⊢ ∀ (I : Ideal R), I ∈ A → y ∈ map f I\n[PROOFSTEP]\nsimpa using hy\n[GOAL]\ncase refine'_2.intro\nR : Type u_1\nS : Type u_2\nF : Type u_3\ninst✝¹ : Ring R\ninst✝ : Ring S\nrc : RingHomClass F R S\nA : Set (Ideal R)\nf : F\nhf : Function.Surjective ↑f\nh : ∀ (J : Ideal R), J ∈ A → RingHom.ker f ≤ J\ny : S\nhy : y ∈ sInf (map f '' A)\nx : R\nhx : ↑f x = y\nthis : ∀ (I : Ideal R), I ∈ A → y ∈ map f I\n⊢ x ∈ sInf A\n[PROOFSTEP]\nrw [Submodule.mem_sInf]\n[GOAL]\ncase refine'_2.intro\nR : Type u_1\nS : Type u_2\nF : Type u_3\ninst✝¹ : Ring R\ninst✝ : Ring S\nrc : RingHomClass F R S\nA : Set (Ideal R)\nf : F\nhf : Function.Surjective ↑f\nh : ∀ (J : Ideal R), J ∈ A → RingHom.ker f ≤ J\ny : S\nhy : y ∈ sInf (map f '' A)\nx : R\nhx : ↑f x = y\nthis : ∀ (I : Ideal R), I ∈ A → y ∈ map f I\n⊢ ∀ (p : Submodule R R), p ∈ A → x ∈ p\n[PROOFSTEP]\nintro J hJ\n[GOAL]\ncase refine'_2.intro\nR : Type u_1\nS : Type u_2\nF : Type u_3\ninst✝¹ : Ring R\ninst✝ : Ring S\nrc : RingHomClass F R S\nA : Set (Ideal R)\nf : F\nhf : Function.Surjective ↑f\nh : ∀ (J : Ideal R), J ∈ A → RingHom.ker f ≤ J\ny : S\nhy : y ∈ sInf (map f '' A)\nx : R\nhx : ↑f x = y\nthis : ∀ (I : Ideal R), I ∈ A → y ∈ map f I\nJ : Submodule R R\nhJ : J ∈ A\n⊢ x ∈ J\n[PROOFSTEP]\nrcases(mem_map_iff_of_surjective f hf).1 (this J hJ) with ⟨x', hx', rfl⟩\n[GOAL]\ncase refine'_2.intro.intro.intro\nR : Type u_1\nS : Type u_2\nF : Type u_3\ninst✝¹ : Ring R\ninst✝ : Ring S\nrc : RingHomClass F R S\nA : Set (Ideal R)\nf : F\nhf : Function.Surjective ↑f\nh : ∀ (J : Ideal R), J ∈ A → RingHom.ker f ≤ J\nx : R\nJ : Submodule R R\nhJ : J ∈ A\nx' : R\nhx' : x' ∈ J\nhy : ↑f x' ∈ sInf (map f '' A)\nhx : ↑f x = ↑f x'\nthis : ∀ (I : Ideal R), I ∈ A → ↑f x' ∈ map f I\n⊢ x ∈ J\n[PROOFSTEP]\nhave : x - x' ∈ J := by\n  apply h J hJ\n  rw [RingHom.mem_ker, map_sub, hx, sub_self]\n[GOAL]\nR : Type u_1\nS : Type u_2\nF : Type u_3\ninst✝¹ : Ring R\ninst✝ : Ring S\nrc : RingHomClass F R S\nA : Set (Ideal R)\nf : F\nhf : Function.Surjective ↑f\nh : ∀ (J : Ideal R), J ∈ A → RingHom.ker f ≤ J\nx : R\nJ : Submodule R R\nhJ : J ∈ A\nx' : R\nhx' : x' ∈ J\nhy : ↑f x' ∈ sInf (map f '' A)\nhx : ↑f x = ↑f x'\nthis : ∀ (I : Ideal R), I ∈ A → ↑f x' ∈ map f I\n⊢ x - x' ∈ J\n[PROOFSTEP]\napply h J hJ\n[GOAL]\ncase a\nR : Type u_1\nS : Type u_2\nF : Type u_3\ninst✝¹ : Ring R\ninst✝ : Ring S\nrc : RingHomClass F R S\nA : Set (Ideal R)\nf : F\nhf : Function.Surjective ↑f\nh : ∀ (J : Ideal R), J ∈ A → RingHom.ker f ≤ J\nx : R\nJ : Submodule R R\nhJ : J ∈ A\nx' : R\nhx' : x' ∈ J\nhy : ↑f x' ∈ sInf (map f '' A)\nhx : ↑f x = ↑f x'\nthis : ∀ (I : Ideal R), I ∈ A → ↑f x' ∈ map f I\n⊢ x - x' ∈ RingHom.ker f\n[PROOFSTEP]\nrw [RingHom.mem_ker, map_sub, hx, sub_self]\n[GOAL]\ncase refine'_2.intro.intro.intro\nR : Type u_1\nS : Type u_2\nF : Type u_3\ninst✝¹ : Ring R\ninst✝ : Ring S\nrc : RingHomClass F R S\nA : Set (Ideal R)\nf : F\nhf : Function.Surjective ↑f\nh : ∀ (J : Ideal R), J ∈ A → RingHom.ker f ≤ J\nx : R\nJ : Submodule R R\nhJ : J ∈ A\nx' : R\nhx' : x' ∈ J\nhy : ↑f x' ∈ sInf (map f '' A)\nhx : ↑f x = ↑f x'\nthis✝ : ∀ (I : Ideal R), I ∈ A → ↑f x' ∈ map f I\nthis : x - x' ∈ J\n⊢ x ∈ J\n[PROOFSTEP]\nsimpa only [sub_add_cancel] using J.add_mem this hx'\n[GOAL]\nR : Type u_1\nS : Type u_2\nF : Type u_3\ninst✝¹ : Ring R\ninst✝ : Ring S\nrc : RingHomClass F R S\nf : F\nhf : Function.Surjective ↑f\nI : Ideal R\nH : IsPrime I\nhk : RingHom.ker f ≤ I\n⊢ IsPrime (map f I)\n[PROOFSTEP]\nrefine' ⟨fun h => H.ne_top (eq_top_iff.2 _), fun {x y} => _⟩\n[GOAL]\ncase refine'_1\nR : Type u_1\nS : Type u_2\nF : Type u_3\ninst✝¹ : Ring R\ninst✝ : Ring S\nrc : RingHomClass F R S\nf : F\nhf : Function.Surjective ↑f\nI : Ideal R\nH : IsPrime I\nhk : RingHom.ker f ≤ I\nh : map f I = ⊤\n⊢ ⊤ ≤ I\n[PROOFSTEP]\nreplace h := congr_arg (comap f) h\n[GOAL]\ncase refine'_1\nR : Type u_1\nS : Type u_2\nF : Type u_3\ninst✝¹ : Ring R\ninst✝ : Ring S\nrc : RingHomClass F R S\nf : F\nhf : Function.Surjective ↑f\nI : Ideal R\nH : IsPrime I\nhk : RingHom.ker f ≤ I\nh : comap f (map f I) = comap f ⊤\n⊢ ⊤ ≤ I\n[PROOFSTEP]\nrw [comap_map_of_surjective _ hf, comap_top] at h \n[GOAL]\ncase refine'_1\nR : Type u_1\nS : Type u_2\nF : Type u_3\ninst✝¹ : Ring R\ninst✝ : Ring S\nrc : RingHomClass F R S\nf : F\nhf : Function.Surjective ↑f\nI : Ideal R\nH : IsPrime I\nhk : RingHom.ker f ≤ I\nh : I ⊔ comap f ⊥ = ⊤\n⊢ ⊤ ≤ I\n[PROOFSTEP]\nexact h ▸ sup_le (le_of_eq rfl) hk\n[GOAL]\ncase refine'_2\nR : Type u_1\nS : Type u_2\nF : Type u_3\ninst✝¹ : Ring R\ninst✝ : Ring S\nrc : RingHomClass F R S\nf : F\nhf : Function.Surjective ↑f\nI : Ideal R\nH : IsPrime I\nhk : RingHom.ker f ≤ I\nx y : S\n⊢ x * y ∈ map f I → x ∈ map f I ∨ y ∈ map f I\n[PROOFSTEP]\nrefine' fun hxy => (hf x).recOn fun a ha => (hf y).recOn fun b hb => _\n[GOAL]\ncase refine'_2\nR : Type u_1\nS : Type u_2\nF : Type u_3\ninst✝¹ : Ring R\ninst✝ : Ring S\nrc : RingHomClass F R S\nf : F\nhf : Function.Surjective ↑f\nI : Ideal R\nH : IsPrime I\nhk : RingHom.ker f ≤ I\nx y : S\nhxy : x * y ∈ map f I\na : R\nha : ↑f a = x\nb : R\nhb : ↑f b = y\n⊢ x ∈ map f I ∨ y ∈ map f I\n[PROOFSTEP]\nrw [← ha, ← hb, ← _root_.map_mul f, mem_map_iff_of_surjective _ hf] at hxy \n[GOAL]\ncase refine'_2\nR : Type u_1\nS : Type u_2\nF : Type u_3\ninst✝¹ : Ring R\ninst✝ : Ring S\nrc : RingHomClass F R S\nf : F\nhf : Function.Surjective ↑f\nI : Ideal R\nH : IsPrime I\nhk : RingHom.ker f ≤ I\nx y : S\na : R\nha : ↑f a = x\nb : R\nhxy : ∃ x, x ∈ I ∧ ↑f x = ↑f (a * b)\nhb : ↑f b = y\n⊢ x ∈ map f I ∨ y ∈ map f I\n[PROOFSTEP]\nrcases hxy with ⟨c, hc, hc'⟩\n[GOAL]\ncase refine'_2.intro.intro\nR : Type u_1\nS : Type u_2\nF : Type u_3\ninst✝¹ : Ring R\ninst✝ : Ring S\nrc : RingHomClass F R S\nf : F\nhf : Function.Surjective ↑f\nI : Ideal R\nH : IsPrime I\nhk : RingHom.ker f ≤ I\nx y : S\na : R\nha : ↑f a = x\nb : R\nhb : ↑f b = y\nc : R\nhc : c ∈ I\nhc' : ↑f c = ↑f (a * b)\n⊢ x ∈ map f I ∨ y ∈ map f I\n[PROOFSTEP]\nrw [← sub_eq_zero, ← map_sub] at hc' \n[GOAL]\ncase refine'_2.intro.intro\nR : Type u_1\nS : Type u_2\nF : Type u_3\ninst✝¹ : Ring R\ninst✝ : Ring S\nrc : RingHomClass F R S\nf : F\nhf : Function.Surjective ↑f\nI : Ideal R\nH : IsPrime I\nhk : RingHom.ker f ≤ I\nx y : S\na : R\nha : ↑f a = x\nb : R\nhb : ↑f b = y\nc : R\nhc : c ∈ I\nhc'✝ : ↑f c = ↑f (a * b)\nhc' : ↑f (c - a * b) = 0\n⊢ x ∈ map f I ∨ y ∈ map f I\n[PROOFSTEP]\nhave : a * b ∈ I := by\n  convert I.sub_mem hc (hk (hc' : c - a * b ∈ RingHom.ker f)) using 1\n  abel\n[GOAL]\nR : Type u_1\nS : Type u_2\nF : Type u_3\ninst✝¹ : Ring R\ninst✝ : Ring S\nrc : RingHomClass F R S\nf : F\nhf : Function.Surjective ↑f\nI : Ideal R\nH : IsPrime I\nhk : RingHom.ker f ≤ I\nx y : S\na : R\nha : ↑f a = x\nb : R\nhb : ↑f b = y\nc : R\nhc : c ∈ I\nhc'✝ : ↑f c = ↑f (a * b)\nhc' : ↑f (c - a * b) = 0\n⊢ a * b ∈ I\n[PROOFSTEP]\nconvert I.sub_mem hc (hk (hc' : c - a * b ∈ RingHom.ker f)) using 1\n[GOAL]\ncase h.e'_4\nR : Type u_1\nS : Type u_2\nF : Type u_3\ninst✝¹ : Ring R\ninst✝ : Ring S\nrc : RingHomClass F R S\nf : F\nhf : Function.Surjective ↑f\nI : Ideal R\nH : IsPrime I\nhk : RingHom.ker f ≤ I\nx y : S\na : R\nha : ↑f a = x\nb : R\nhb : ↑f b = y\nc : R\nhc : c ∈ I\nhc'✝ : ↑f c = ↑f (a * b)\nhc' : ↑f (c - a * b) = 0\n⊢ a * b = c - (c - a * b)\n[PROOFSTEP]\nabel\n[GOAL]\ncase h.e'_4\nR : Type u_1\nS : Type u_2\nF : Type u_3\ninst✝¹ : Ring R\ninst✝ : Ring S\nrc : RingHomClass F R S\nf : F\nhf : Function.Surjective ↑f\nI : Ideal R\nH : IsPrime I\nhk : RingHom.ker f ≤ I\nx y : S\na : R\nha : ↑f a = x\nb : R\nhb : ↑f b = y\nc : R\nhc : c ∈ I\nhc'✝ : ↑f c = ↑f (a * b)\nhc' : ↑f (c - a * b) = 0\n⊢ a * b = c - (c - a * b)\n[PROOFSTEP]\nabel\n[GOAL]\ncase refine'_2.intro.intro\nR : Type u_1\nS : Type u_2\nF : Type u_3\ninst✝¹ : Ring R\ninst✝ : Ring S\nrc : RingHomClass F R S\nf : F\nhf : Function.Surjective ↑f\nI : Ideal R\nH : IsPrime I\nhk : RingHom.ker f ≤ I\nx y : S\na : R\nha : ↑f a = x\nb : R\nhb : ↑f b = y\nc : R\nhc : c ∈ I\nhc'✝ : ↑f c = ↑f (a * b)\nhc' : ↑f (c - a * b) = 0\nthis : a * b ∈ I\n⊢ x ∈ map f I ∨ y ∈ map f I\n[PROOFSTEP]\nexact (H.mem_or_mem this).imp (fun h => ha ▸ mem_map_of_mem f h) fun h => hb ▸ mem_map_of_mem f h\n[GOAL]\nR : Type u_1\nS : Type u_2\nF : Type u_3\ninst✝¹ : Ring R\ninst✝ : Ring S\nrc : RingHomClass F R S\nI : Ideal R\nf : F\nhf : Function.Injective ↑f\n⊢ map f I = ⊥ ↔ I = ⊥\n[PROOFSTEP]\nrw [map_eq_bot_iff_le_ker, (RingHom.injective_iff_ker_eq_bot f).mp hf, le_bot_iff]\n[GOAL]\nR : Type u_1\nS : Type u_2\nF : Type u_3\ninst✝³ : Ring R\ninst✝² : Ring S\nrc : RingHomClass F R S\nF' : Type u_4\ninst✝¹ : RingEquivClass F' R S\nf : F'\nI : Ideal R\ninst✝ : IsPrime I\n⊢ RingHom.ker f ≤ I\n[PROOFSTEP]\nsimp only [RingHom.ker_equiv, bot_le]\n[GOAL]\nR : Type u_1\nS : Type u_2\nF : Type u_3\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nI J : Ideal R\nf : R →+* S\nhf : Function.Surjective ↑f\n⊢ map f I = map f J ↔ I ⊔ RingHom.ker f = J ⊔ RingHom.ker f\n[PROOFSTEP]\nrw [← (comap_injective_of_surjective f hf).eq_iff, comap_map_of_surjective f hf, comap_map_of_surjective f hf,\n  RingHom.ker_eq_comap_bot]\n[GOAL]\nR : Type u_1\nS : Type u_2\nF : Type u_3\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nhf : Function.Surjective ↑f\nI : Ideal R\nh : RingHom.ker f ≤ I\n⊢ map f (radical I) = radical (map f I)\n[PROOFSTEP]\nrw [radical_eq_sInf, radical_eq_sInf]\n[GOAL]\nR : Type u_1\nS : Type u_2\nF : Type u_3\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nhf : Function.Surjective ↑f\nI : Ideal R\nh : RingHom.ker f ≤ I\n⊢ map f (sInf {J | I ≤ J ∧ IsPrime J}) = sInf {J | map f I ≤ J ∧ IsPrime J}\n[PROOFSTEP]\nhave : ∀ J ∈ {J : Ideal R | I ≤ J ∧ J.IsPrime}, RingHom.ker f ≤ J := fun J hJ => h.trans hJ.left\n[GOAL]\nR : Type u_1\nS : Type u_2\nF : Type u_3\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nhf : Function.Surjective ↑f\nI : Ideal R\nh : RingHom.ker f ≤ I\nthis : ∀ (J : Ideal R), J ∈ {J | I ≤ J ∧ IsPrime J} → RingHom.ker f ≤ J\n⊢ map f (sInf {J | I ≤ J ∧ IsPrime J}) = sInf {J | map f I ≤ J ∧ IsPrime J}\n[PROOFSTEP]\nconvert map_sInf hf this\n[GOAL]\ncase h.e'_3.h.e'_3\nR : Type u_1\nS : Type u_2\nF : Type u_3\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nhf : Function.Surjective ↑f\nI : Ideal R\nh : RingHom.ker f ≤ I\nthis : ∀ (J : Ideal R), J ∈ {J | I ≤ J ∧ IsPrime J} → RingHom.ker f ≤ J\n⊢ {J | map f I ≤ J ∧ IsPrime J} = map f '' {J | I ≤ J ∧ IsPrime J}\n[PROOFSTEP]\nrefine' funext fun j => propext ⟨_, _⟩\n[GOAL]\ncase h.e'_3.h.e'_3.refine'_1\nR : Type u_1\nS : Type u_2\nF : Type u_3\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nhf : Function.Surjective ↑f\nI : Ideal R\nh : RingHom.ker f ≤ I\nthis : ∀ (J : Ideal R), J ∈ {J | I ≤ J ∧ IsPrime J} → RingHom.ker f ≤ J\nj : Ideal S\n⊢ setOf (fun J => map f I ≤ J ∧ IsPrime J) j → (map f '' {J | I ≤ J ∧ IsPrime J}) j\n[PROOFSTEP]\nrintro ⟨hj, hj'⟩\n[GOAL]\ncase h.e'_3.h.e'_3.refine'_1.intro\nR : Type u_1\nS : Type u_2\nF : Type u_3\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nhf : Function.Surjective ↑f\nI : Ideal R\nh : RingHom.ker f ≤ I\nthis : ∀ (J : Ideal R), J ∈ {J | I ≤ J ∧ IsPrime J} → RingHom.ker f ≤ J\nj : Ideal S\nhj : map f I ≤ j\nhj' : IsPrime j\n⊢ (map f '' {J | I ≤ J ∧ IsPrime J}) j\n[PROOFSTEP]\nhaveI : j.IsPrime := hj'\n[GOAL]\ncase h.e'_3.h.e'_3.refine'_1.intro\nR : Type u_1\nS : Type u_2\nF : Type u_3\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nhf : Function.Surjective ↑f\nI : Ideal R\nh : RingHom.ker f ≤ I\nthis✝ : ∀ (J : Ideal R), J ∈ {J | I ≤ J ∧ IsPrime J} → RingHom.ker f ≤ J\nj : Ideal S\nhj : map f I ≤ j\nhj' this : IsPrime j\n⊢ (map f '' {J | I ≤ J ∧ IsPrime J}) j\n[PROOFSTEP]\nexact ⟨comap f j, ⟨⟨map_le_iff_le_comap.1 hj, comap_isPrime f j⟩, map_comap_of_surjective f hf j⟩⟩\n[GOAL]\ncase h.e'_3.h.e'_3.refine'_2\nR : Type u_1\nS : Type u_2\nF : Type u_3\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nhf : Function.Surjective ↑f\nI : Ideal R\nh : RingHom.ker f ≤ I\nthis : ∀ (J : Ideal R), J ∈ {J | I ≤ J ∧ IsPrime J} → RingHom.ker f ≤ J\nj : Ideal S\n⊢ (map f '' {J | I ≤ J ∧ IsPrime J}) j → setOf (fun J => map f I ≤ J ∧ IsPrime J) j\n[PROOFSTEP]\nrintro ⟨J, ⟨hJ, hJ'⟩⟩\n[GOAL]\ncase h.e'_3.h.e'_3.refine'_2.intro.intro\nR : Type u_1\nS : Type u_2\nF : Type u_3\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nhf : Function.Surjective ↑f\nI : Ideal R\nh : RingHom.ker f ≤ I\nthis : ∀ (J : Ideal R), J ∈ {J | I ≤ J ∧ IsPrime J} → RingHom.ker f ≤ J\nj : Ideal S\nJ : Ideal R\nhJ : J ∈ {J | I ≤ J ∧ IsPrime J}\nhJ' : map f J = j\n⊢ setOf (fun J => map f I ≤ J ∧ IsPrime J) j\n[PROOFSTEP]\nhaveI : J.IsPrime := hJ.right\n[GOAL]\ncase h.e'_3.h.e'_3.refine'_2.intro.intro\nR : Type u_1\nS : Type u_2\nF : Type u_3\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nhf : Function.Surjective ↑f\nI : Ideal R\nh : RingHom.ker f ≤ I\nthis✝ : ∀ (J : Ideal R), J ∈ {J | I ≤ J ∧ IsPrime J} → RingHom.ker f ≤ J\nj : Ideal S\nJ : Ideal R\nhJ : J ∈ {J | I ≤ J ∧ IsPrime J}\nhJ' : map f J = j\nthis : IsPrime J\n⊢ setOf (fun J => map f I ≤ J ∧ IsPrime J) j\n[PROOFSTEP]\nrefine' ⟨hJ' ▸ map_mono hJ.left, hJ' ▸ map_isPrime_of_surjective hf (le_trans h hJ.left)⟩\n[GOAL]\nR : Type u\nM : Type v\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\n⊢ ∀ (b : Submodule R M), 1 • b = b\n[PROOFSTEP]\nsimp\n[GOAL]\nA : Type u_1\nB : Type u_2\nC : Type u_3\ninst✝² : Ring A\ninst✝¹ : Ring B\ninst✝ : Ring C\nf : A →+* B\nf_inv : B → A\nhf : Function.RightInverse f_inv ↑f\ng : A →+* C\nhg : ker f ≤ ker g\nsrc✝ : (fun x => B →+ C) { val := toAddMonoidHom g, property := hg } :=\n  ↑(AddMonoidHom.liftOfRightInverse (toAddMonoidHom f) f_inv hf) { val := toAddMonoidHom g, property := hg }\n⊢ (fun b => ↑g (f_inv b)) 1 = 1\n[PROOFSTEP]\nrw [← map_one g, ← sub_eq_zero, ← map_sub g, ← mem_ker g]\n[GOAL]\nA : Type u_1\nB : Type u_2\nC : Type u_3\ninst✝² : Ring A\ninst✝¹ : Ring B\ninst✝ : Ring C\nf : A →+* B\nf_inv : B → A\nhf : Function.RightInverse f_inv ↑f\ng : A →+* C\nhg : ker f ≤ ker g\nsrc✝ : (fun x => B →+ C) { val := toAddMonoidHom g, property := hg } :=\n  ↑(AddMonoidHom.liftOfRightInverse (toAddMonoidHom f) f_inv hf) { val := toAddMonoidHom g, property := hg }\n⊢ f_inv 1 - 1 ∈ ker g\n[PROOFSTEP]\napply hg\n[GOAL]\ncase a\nA : Type u_1\nB : Type u_2\nC : Type u_3\ninst✝² : Ring A\ninst✝¹ : Ring B\ninst✝ : Ring C\nf : A →+* B\nf_inv : B → A\nhf : Function.RightInverse f_inv ↑f\ng : A →+* C\nhg : ker f ≤ ker g\nsrc✝ : (fun x => B →+ C) { val := toAddMonoidHom g, property := hg } :=\n  ↑(AddMonoidHom.liftOfRightInverse (toAddMonoidHom f) f_inv hf) { val := toAddMonoidHom g, property := hg }\n⊢ f_inv 1 - 1 ∈ ker f\n[PROOFSTEP]\nrw [mem_ker f, map_sub f, sub_eq_zero, map_one f]\n[GOAL]\ncase a\nA : Type u_1\nB : Type u_2\nC : Type u_3\ninst✝² : Ring A\ninst✝¹ : Ring B\ninst✝ : Ring C\nf : A →+* B\nf_inv : B → A\nhf : Function.RightInverse f_inv ↑f\ng : A →+* C\nhg : ker f ≤ ker g\nsrc✝ : (fun x => B →+ C) { val := toAddMonoidHom g, property := hg } :=\n  ↑(AddMonoidHom.liftOfRightInverse (toAddMonoidHom f) f_inv hf) { val := toAddMonoidHom g, property := hg }\n⊢ ↑f (f_inv 1) = 1\n[PROOFSTEP]\nexact hf 1\n[GOAL]\nA : Type u_1\nB : Type u_2\nC : Type u_3\ninst✝² : Ring A\ninst✝¹ : Ring B\ninst✝ : Ring C\nf : A →+* B\nf_inv : B → A\nhf : Function.RightInverse f_inv ↑f\ng : A →+* C\nhg : ker f ≤ ker g\nsrc✝ : (fun x => B →+ C) { val := toAddMonoidHom g, property := hg } :=\n  ↑(AddMonoidHom.liftOfRightInverse (toAddMonoidHom f) f_inv hf) { val := toAddMonoidHom g, property := hg }\n⊢ ∀ (x y : B),\n    OneHom.toFun { toFun := fun b => ↑g (f_inv b), map_one' := (_ : (fun b => ↑g (f_inv b)) 1 = 1) } (x * y) =\n      OneHom.toFun { toFun := fun b => ↑g (f_inv b), map_one' := (_ : (fun b => ↑g (f_inv b)) 1 = 1) } x *\n        OneHom.toFun { toFun := fun b => ↑g (f_inv b), map_one' := (_ : (fun b => ↑g (f_inv b)) 1 = 1) } y\n[PROOFSTEP]\nintro x y\n[GOAL]\nA : Type u_1\nB : Type u_2\nC : Type u_3\ninst✝² : Ring A\ninst✝¹ : Ring B\ninst✝ : Ring C\nf : A →+* B\nf_inv : B → A\nhf : Function.RightInverse f_inv ↑f\ng : A →+* C\nhg : ker f ≤ ker g\nsrc✝ : (fun x => B →+ C) { val := toAddMonoidHom g, property := hg } :=\n  ↑(AddMonoidHom.liftOfRightInverse (toAddMonoidHom f) f_inv hf) { val := toAddMonoidHom g, property := hg }\nx y : B\n⊢ OneHom.toFun { toFun := fun b => ↑g (f_inv b), map_one' := (_ : (fun b => ↑g (f_inv b)) 1 = 1) } (x * y) =\n    OneHom.toFun { toFun := fun b => ↑g (f_inv b), map_one' := (_ : (fun b => ↑g (f_inv b)) 1 = 1) } x *\n      OneHom.toFun { toFun := fun b => ↑g (f_inv b), map_one' := (_ : (fun b => ↑g (f_inv b)) 1 = 1) } y\n[PROOFSTEP]\nrw [← map_mul g, ← sub_eq_zero, ← map_sub g, ← mem_ker g]\n[GOAL]\nA : Type u_1\nB : Type u_2\nC : Type u_3\ninst✝² : Ring A\ninst✝¹ : Ring B\ninst✝ : Ring C\nf : A →+* B\nf_inv : B → A\nhf : Function.RightInverse f_inv ↑f\ng : A →+* C\nhg : ker f ≤ ker g\nsrc✝ : (fun x => B →+ C) { val := toAddMonoidHom g, property := hg } :=\n  ↑(AddMonoidHom.liftOfRightInverse (toAddMonoidHom f) f_inv hf) { val := toAddMonoidHom g, property := hg }\nx y : B\n⊢ f_inv (x * y) - f_inv x * f_inv y ∈ ker g\n[PROOFSTEP]\napply hg\n[GOAL]\ncase a\nA : Type u_1\nB : Type u_2\nC : Type u_3\ninst✝² : Ring A\ninst✝¹ : Ring B\ninst✝ : Ring C\nf : A →+* B\nf_inv : B → A\nhf : Function.RightInverse f_inv ↑f\ng : A →+* C\nhg : ker f ≤ ker g\nsrc✝ : (fun x => B →+ C) { val := toAddMonoidHom g, property := hg } :=\n  ↑(AddMonoidHom.liftOfRightInverse (toAddMonoidHom f) f_inv hf) { val := toAddMonoidHom g, property := hg }\nx y : B\n⊢ f_inv (x * y) - f_inv x * f_inv y ∈ ker f\n[PROOFSTEP]\nrw [mem_ker f, map_sub f, sub_eq_zero, map_mul f]\n[GOAL]\ncase a\nA : Type u_1\nB : Type u_2\nC : Type u_3\ninst✝² : Ring A\ninst✝¹ : Ring B\ninst✝ : Ring C\nf : A →+* B\nf_inv : B → A\nhf : Function.RightInverse f_inv ↑f\ng : A →+* C\nhg : ker f ≤ ker g\nsrc✝ : (fun x => B →+ C) { val := toAddMonoidHom g, property := hg } :=\n  ↑(AddMonoidHom.liftOfRightInverse (toAddMonoidHom f) f_inv hf) { val := toAddMonoidHom g, property := hg }\nx y : B\n⊢ ↑f (f_inv (x * y)) = ↑f (f_inv x) * ↑f (f_inv y)\n[PROOFSTEP]\nsimp only [hf _]\n[GOAL]\nA : Type u_1\nB : Type u_2\nC : Type u_3\ninst✝² : Ring A\ninst✝¹ : Ring B\ninst✝ : Ring C\nf : A →+* B\nf_inv : B → A\nhf : Function.RightInverse f_inv ↑f\nφ : B →+* C\nx : A\nhx : x ∈ ker f\n⊢ ↑(comp φ f) x = 0\n[PROOFSTEP]\nsimp [(mem_ker _).mp hx]\n[GOAL]\nA : Type u_1\nB : Type u_2\nC : Type u_3\ninst✝² : Ring A\ninst✝¹ : Ring B\ninst✝ : Ring C\nf : A →+* B\nf_inv : B → A\nhf : Function.RightInverse f_inv ↑f\ng : { g // ker f ≤ ker g }\n⊢ (fun φ => { val := comp φ f, property := (_ : ∀ (x : A), x ∈ ker f → x ∈ ker (comp φ f)) })\n      ((fun g => liftOfRightInverseAux f f_inv hf ↑g (_ : ker f ≤ ker ↑g)) g) =\n    g\n[PROOFSTEP]\next\n[GOAL]\ncase a.a\nA : Type u_1\nB : Type u_2\nC : Type u_3\ninst✝² : Ring A\ninst✝¹ : Ring B\ninst✝ : Ring C\nf : A →+* B\nf_inv : B → A\nhf : Function.RightInverse f_inv ↑f\ng : { g // ker f ≤ ker g }\nx✝ : A\n⊢ ↑↑((fun φ => { val := comp φ f, property := (_ : ∀ (x : A), x ∈ ker f → x ∈ ker (comp φ f)) })\n            ((fun g => liftOfRightInverseAux f f_inv hf ↑g (_ : ker f ≤ ker ↑g)) g))\n      x✝ =\n    ↑↑g x✝\n[PROOFSTEP]\nsimp only [comp_apply, liftOfRightInverseAux_comp_apply, Subtype.coe_mk]\n[GOAL]\nA : Type u_1\nB : Type u_2\nC : Type u_3\ninst✝² : Ring A\ninst✝¹ : Ring B\ninst✝ : Ring C\nf : A →+* B\nf_inv : B → A\nhf : Function.RightInverse f_inv ↑f\nφ : B →+* C\n⊢ (fun g => liftOfRightInverseAux f f_inv hf ↑g (_ : ker f ≤ ker ↑g))\n      ((fun φ => { val := comp φ f, property := (_ : ∀ (x : A), x ∈ ker f → x ∈ ker (comp φ f)) }) φ) =\n    φ\n[PROOFSTEP]\next b\n[GOAL]\ncase a\nA : Type u_1\nB : Type u_2\nC : Type u_3\ninst✝² : Ring A\ninst✝¹ : Ring B\ninst✝ : Ring C\nf : A →+* B\nf_inv : B → A\nhf : Function.RightInverse f_inv ↑f\nφ : B →+* C\nb : B\n⊢ ↑((fun g => liftOfRightInverseAux f f_inv hf ↑g (_ : ker f ≤ ker ↑g))\n          ((fun φ => { val := comp φ f, property := (_ : ∀ (x : A), x ∈ ker f → x ∈ ker (comp φ f)) }) φ))\n      b =\n    ↑φ b\n[PROOFSTEP]\nsimp [liftOfRightInverseAux, hf b]\n[GOAL]\nA : Type u_1\nB : Type u_2\nC : Type u_3\ninst✝² : Ring A\ninst✝¹ : Ring B\ninst✝ : Ring C\nf : A →+* B\nf_inv : B → A\nhf : Function.RightInverse f_inv ↑f\ng : A →+* C\nhg : ker f ≤ ker g\nh : B →+* C\nhh : comp h f = g\n⊢ h = ↑(liftOfRightInverse f f_inv hf) { val := g, property := hg }\n[PROOFSTEP]\nsimp_rw [← hh]\n[GOAL]\nA : Type u_1\nB : Type u_2\nC : Type u_3\ninst✝² : Ring A\ninst✝¹ : Ring B\ninst✝ : Ring C\nf : A →+* B\nf_inv : B → A\nhf : Function.RightInverse f_inv ↑f\ng : A →+* C\nhg : ker f ≤ ker g\nh : B →+* C\nhh : comp h f = g\n⊢ h = ↑(liftOfRightInverse f f_inv hf) { val := comp h f, property := (_ : (fun g => ker f ≤ ker g) (comp h f)) }\n[PROOFSTEP]\nexact ((f.liftOfRightInverse f_inv hf).apply_symm_apply _).symm\n", "meta": {"mathlib_filename": "Mathlib.RingTheory.Ideal.Operations", "llama_tokens": 141617, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8006919925839875, "lm_q2_score": 0.6825737279551494, "lm_q1q2_score": 0.5465313183218892}}
{"text": "[GOAL]\nk : Type u_1\ninst✝ : Field k\nσ : Type u_2\nV : Set (σ → k)\np q : MvPolynomial σ k\nhp : p ∈ {p | ∀ (x : σ → k), x ∈ V → ↑(eval x) p = 0}\nhq : q ∈ {p | ∀ (x : σ → k), x ∈ V → ↑(eval x) p = 0}\nx : σ → k\nhx : x ∈ V\n⊢ ↑(eval x) (p + q) = 0\n[PROOFSTEP]\nsimp only [hq x hx, hp x hx, add_zero, RingHom.map_add]\n[GOAL]\nk : Type u_1\ninst✝ : Field k\nσ : Type u_2\nV : Set (σ → k)\np q : MvPolynomial σ k\nhq :\n  q ∈\n    {\n          toAddSubsemigroup :=\n            { carrier := {p | ∀ (x : σ → k), x ∈ V → ↑(eval x) p = 0},\n              add_mem' :=\n                (_ :\n                  ∀ {p q : MvPolynomial σ k},\n                    p ∈ {p | ∀ (x : σ → k), x ∈ V → ↑(eval x) p = 0} →\n                      q ∈ {p | ∀ (x : σ → k), x ∈ V → ↑(eval x) p = 0} →\n                        ∀ (x : σ → k), x ∈ V → ↑(eval x) (p + q) = 0) },\n          zero_mem' := (_ : ∀ (x : σ → k), x ∈ V → ↑(eval x) 0 = 0) }.toAddSubsemigroup.carrier\nx : σ → k\nhx : x ∈ V\n⊢ ↑(eval x) (p • q) = 0\n[PROOFSTEP]\nsimp only [hq x hx, Algebra.id.smul_eq_mul, mul_zero, RingHom.map_mul]\n[GOAL]\nk : Type u_1\ninst✝ : Field k\nσ : Type u_2\nx : σ → k\n⊢ IsMaximal (vanishingIdeal {x})\n[PROOFSTEP]\nhave : MvPolynomial σ k ⧸ vanishingIdeal { x } ≃+* k :=\n  RingEquiv.ofBijective (Ideal.Quotient.lift _ (eval x) fun p h => (mem_vanishingIdeal_singleton_iff x p).mp h)\n    (by\n      refine'\n        ⟨(injective_iff_map_eq_zero _).mpr fun p hp => _, fun z =>\n          ⟨(Ideal.Quotient.mk (vanishingIdeal { x } : Ideal (MvPolynomial σ k))) (C z), by simp⟩⟩\n      obtain ⟨q, rfl⟩ := Quotient.mk_surjective p\n      rwa [Ideal.Quotient.lift_mk, ← mem_vanishingIdeal_singleton_iff, ← Quotient.eq_zero_iff_mem] at hp )\n[GOAL]\nk : Type u_1\ninst✝ : Field k\nσ : Type u_2\nx : σ → k\n⊢ Function.Bijective\n    ↑(Ideal.Quotient.lift (vanishingIdeal {x}) (eval x)\n        (_ : ∀ (p : MvPolynomial σ k), p ∈ vanishingIdeal {x} → ↑(eval x) p = 0))\n[PROOFSTEP]\nrefine'\n  ⟨(injective_iff_map_eq_zero _).mpr fun p hp => _, fun z =>\n    ⟨(Ideal.Quotient.mk (vanishingIdeal { x } : Ideal (MvPolynomial σ k))) (C z), by simp⟩⟩\n[GOAL]\nk : Type u_1\ninst✝ : Field k\nσ : Type u_2\nx : σ → k\nz : k\n⊢ ↑(Ideal.Quotient.lift (vanishingIdeal {x}) (eval x)\n          (_ : ∀ (p : MvPolynomial σ k), p ∈ vanishingIdeal {x} → ↑(eval x) p = 0))\n      (↑(Ideal.Quotient.mk (vanishingIdeal {x})) (↑C z)) =\n    z\n[PROOFSTEP]\nsimp\n[GOAL]\nk : Type u_1\ninst✝ : Field k\nσ : Type u_2\nx : σ → k\np : MvPolynomial σ k ⧸ vanishingIdeal {x}\nhp :\n  ↑(Ideal.Quotient.lift (vanishingIdeal {x}) (eval x)\n          (_ : ∀ (p : MvPolynomial σ k), p ∈ vanishingIdeal {x} → ↑(eval x) p = 0))\n      p =\n    0\n⊢ p = 0\n[PROOFSTEP]\nobtain ⟨q, rfl⟩ := Quotient.mk_surjective p\n[GOAL]\ncase intro\nk : Type u_1\ninst✝ : Field k\nσ : Type u_2\nx : σ → k\nq : MvPolynomial σ k\nhp :\n  ↑(Ideal.Quotient.lift (vanishingIdeal {x}) (eval x)\n          (_ : ∀ (p : MvPolynomial σ k), p ∈ vanishingIdeal {x} → ↑(eval x) p = 0))\n      (↑(Ideal.Quotient.mk (vanishingIdeal {x})) q) =\n    0\n⊢ ↑(Ideal.Quotient.mk (vanishingIdeal {x})) q = 0\n[PROOFSTEP]\nrwa [Ideal.Quotient.lift_mk, ← mem_vanishingIdeal_singleton_iff, ← Quotient.eq_zero_iff_mem] at hp \n[GOAL]\nk : Type u_1\ninst✝ : Field k\nσ : Type u_2\nx : σ → k\nthis : MvPolynomial σ k ⧸ vanishingIdeal {x} ≃+* k\n⊢ IsMaximal (vanishingIdeal {x})\n[PROOFSTEP]\nrw [← bot_quotient_isMaximal_iff, RingEquiv.bot_maximal_iff this]\n[GOAL]\nk : Type u_1\ninst✝ : Field k\nσ : Type u_2\nx : σ → k\nthis : MvPolynomial σ k ⧸ vanishingIdeal {x} ≃+* k\n⊢ IsMaximal ⊥\n[PROOFSTEP]\nexact bot_isMaximal\n[GOAL]\nk : Type u_1\ninst✝ : Field k\nσ : Type u_2\nI : Ideal (MvPolynomial σ k)\n⊢ radical I ≤ vanishingIdeal (zeroLocus I)\n[PROOFSTEP]\nintro p hp x hx\n[GOAL]\nk : Type u_1\ninst✝ : Field k\nσ : Type u_2\nI : Ideal (MvPolynomial σ k)\np : MvPolynomial σ k\nhp : p ∈ radical I\nx : σ → k\nhx : x ∈ zeroLocus I\n⊢ ↑(eval x) p = 0\n[PROOFSTEP]\nrw [← mem_vanishingIdeal_singleton_iff]\n[GOAL]\nk : Type u_1\ninst✝ : Field k\nσ : Type u_2\nI : Ideal (MvPolynomial σ k)\np : MvPolynomial σ k\nhp : p ∈ radical I\nx : σ → k\nhx : x ∈ zeroLocus I\n⊢ p ∈ vanishingIdeal {x}\n[PROOFSTEP]\nrw [radical_eq_sInf] at hp \n[GOAL]\nk : Type u_1\ninst✝ : Field k\nσ : Type u_2\nI : Ideal (MvPolynomial σ k)\np : MvPolynomial σ k\nhp : p ∈ sInf {J | I ≤ J ∧ IsPrime J}\nx : σ → k\nhx : x ∈ zeroLocus I\n⊢ p ∈ vanishingIdeal {x}\n[PROOFSTEP]\nrefine'\n  (mem_sInf.mp hp)\n    ⟨le_trans (le_vanishingIdeal_zeroLocus I) (vanishingIdeal_anti_mono fun y hy => hy.symm ▸ hx), IsMaximal.isPrime' _⟩\n[GOAL]\nk : Type u_1\ninst✝ : Field k\nσ : Type u_2\nx : σ → k\n⊢ IsPrime (vanishingIdeal {x})\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nk : Type u_1\ninst✝ : Field k\nσ : Type u_2\nV : Set (σ → k)\np : MvPolynomial σ k\nhp : p ∈ PrimeSpectrum.vanishingIdeal (pointToPoint '' V)\nx : σ → k\nhx : x ∈ V\n⊢ IsPrime (vanishingIdeal {x})\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nk : Type u_1\ninst✝ : Field k\nσ : Type u_2\nV : Set (σ → k)\np : MvPolynomial σ k\nhp : p ∈ PrimeSpectrum.vanishingIdeal (pointToPoint '' V)\nx : σ → k\nhx : x ∈ V\n⊢ { asIdeal := vanishingIdeal {x}, IsPrime := (_ : IsPrime (vanishingIdeal {x})) } ∈ pointToPoint '' V\n[PROOFSTEP]\nexact ⟨x, ⟨hx, rfl⟩⟩\n[GOAL]\nk : Type u_1\ninst✝² : Field k\nσ : Type u_2\ninst✝¹ : IsAlgClosed k\ninst✝ : Finite σ\nI : Ideal (MvPolynomial σ k)\n⊢ IsMaximal I ↔ ∃ x, I = vanishingIdeal {x}\n[PROOFSTEP]\ncases nonempty_fintype σ\n[GOAL]\ncase intro\nk : Type u_1\ninst✝² : Field k\nσ : Type u_2\ninst✝¹ : IsAlgClosed k\ninst✝ : Finite σ\nI : Ideal (MvPolynomial σ k)\nval✝ : Fintype σ\n⊢ IsMaximal I ↔ ∃ x, I = vanishingIdeal {x}\n[PROOFSTEP]\nrefine'\n  ⟨fun hI => _, fun h =>\n    let ⟨x, hx⟩ := h\n    hx.symm ▸ MvPolynomial.vanishingIdeal_singleton_isMaximal⟩\n[GOAL]\ncase intro\nk : Type u_1\ninst✝² : Field k\nσ : Type u_2\ninst✝¹ : IsAlgClosed k\ninst✝ : Finite σ\nI : Ideal (MvPolynomial σ k)\nval✝ : Fintype σ\nhI : IsMaximal I\n⊢ ∃ x, I = vanishingIdeal {x}\n[PROOFSTEP]\nletI : I.IsMaximal := hI\n[GOAL]\ncase intro\nk : Type u_1\ninst✝² : Field k\nσ : Type u_2\ninst✝¹ : IsAlgClosed k\ninst✝ : Finite σ\nI : Ideal (MvPolynomial σ k)\nval✝ : Fintype σ\nhI : IsMaximal I\nthis : IsMaximal I := hI\n⊢ ∃ x, I = vanishingIdeal {x}\n[PROOFSTEP]\nletI : Field (MvPolynomial σ k ⧸ I) := Quotient.field I\n[GOAL]\ncase intro\nk : Type u_1\ninst✝² : Field k\nσ : Type u_2\ninst✝¹ : IsAlgClosed k\ninst✝ : Finite σ\nI : Ideal (MvPolynomial σ k)\nval✝ : Fintype σ\nhI : IsMaximal I\nthis✝ : IsMaximal I := hI\nthis : Field (MvPolynomial σ k ⧸ I) := Quotient.field I\n⊢ ∃ x, I = vanishingIdeal {x}\n[PROOFSTEP]\nlet ϕ : k →+* MvPolynomial σ k ⧸ I := (Ideal.Quotient.mk I).comp C\n[GOAL]\ncase intro\nk : Type u_1\ninst✝² : Field k\nσ : Type u_2\ninst✝¹ : IsAlgClosed k\ninst✝ : Finite σ\nI : Ideal (MvPolynomial σ k)\nval✝ : Fintype σ\nhI : IsMaximal I\nthis✝ : IsMaximal I := hI\nthis : Field (MvPolynomial σ k ⧸ I) := Quotient.field I\nϕ : k →+* MvPolynomial σ k ⧸ I := RingHom.comp (Ideal.Quotient.mk I) C\n⊢ ∃ x, I = vanishingIdeal {x}\n[PROOFSTEP]\nhave hϕ : Function.Bijective ϕ :=\n  ⟨quotient_mk_comp_C_injective _ _ I hI.ne_top,\n    IsAlgClosed.algebraMap_surjective_of_isIntegral' ϕ\n      (MvPolynomial.comp_C_integral_of_surjective_of_jacobson _ Quotient.mk_surjective)⟩\n[GOAL]\ncase intro\nk : Type u_1\ninst✝² : Field k\nσ : Type u_2\ninst✝¹ : IsAlgClosed k\ninst✝ : Finite σ\nI : Ideal (MvPolynomial σ k)\nval✝ : Fintype σ\nhI : IsMaximal I\nthis✝ : IsMaximal I := hI\nthis : Field (MvPolynomial σ k ⧸ I) := Quotient.field I\nϕ : k →+* MvPolynomial σ k ⧸ I := RingHom.comp (Ideal.Quotient.mk I) C\nhϕ : Function.Bijective ↑ϕ\n⊢ ∃ x, I = vanishingIdeal {x}\n[PROOFSTEP]\nobtain ⟨φ, hφ⟩ := Function.Surjective.hasRightInverse hϕ.2\n[GOAL]\ncase intro.intro\nk : Type u_1\ninst✝² : Field k\nσ : Type u_2\ninst✝¹ : IsAlgClosed k\ninst✝ : Finite σ\nI : Ideal (MvPolynomial σ k)\nval✝ : Fintype σ\nhI : IsMaximal I\nthis✝ : IsMaximal I := hI\nthis : Field (MvPolynomial σ k ⧸ I) := Quotient.field I\nϕ : k →+* MvPolynomial σ k ⧸ I := RingHom.comp (Ideal.Quotient.mk I) C\nhϕ : Function.Bijective ↑ϕ\nφ : MvPolynomial σ k ⧸ I → k\nhφ : Function.RightInverse φ ↑ϕ\n⊢ ∃ x, I = vanishingIdeal {x}\n[PROOFSTEP]\nlet x : σ → k := fun s => φ ((Ideal.Quotient.mk I) (X s))\n[GOAL]\ncase intro.intro\nk : Type u_1\ninst✝² : Field k\nσ : Type u_2\ninst✝¹ : IsAlgClosed k\ninst✝ : Finite σ\nI : Ideal (MvPolynomial σ k)\nval✝ : Fintype σ\nhI : IsMaximal I\nthis✝ : IsMaximal I := hI\nthis : Field (MvPolynomial σ k ⧸ I) := Quotient.field I\nϕ : k →+* MvPolynomial σ k ⧸ I := RingHom.comp (Ideal.Quotient.mk I) C\nhϕ : Function.Bijective ↑ϕ\nφ : MvPolynomial σ k ⧸ I → k\nhφ : Function.RightInverse φ ↑ϕ\nx : σ → k := fun s => φ (↑(Ideal.Quotient.mk I) (X s))\n⊢ ∃ x, I = vanishingIdeal {x}\n[PROOFSTEP]\nhave hx : ∀ s : σ, ϕ (x s) = (Ideal.Quotient.mk I) (X s) := fun s => hφ ((Ideal.Quotient.mk I) (X s))\n[GOAL]\ncase intro.intro\nk : Type u_1\ninst✝² : Field k\nσ : Type u_2\ninst✝¹ : IsAlgClosed k\ninst✝ : Finite σ\nI : Ideal (MvPolynomial σ k)\nval✝ : Fintype σ\nhI : IsMaximal I\nthis✝ : IsMaximal I := hI\nthis : Field (MvPolynomial σ k ⧸ I) := Quotient.field I\nϕ : k →+* MvPolynomial σ k ⧸ I := RingHom.comp (Ideal.Quotient.mk I) C\nhϕ : Function.Bijective ↑ϕ\nφ : MvPolynomial σ k ⧸ I → k\nhφ : Function.RightInverse φ ↑ϕ\nx : σ → k := fun s => φ (↑(Ideal.Quotient.mk I) (X s))\nhx : ∀ (s : σ), ↑ϕ (x s) = ↑(Ideal.Quotient.mk I) (X s)\n⊢ ∃ x, I = vanishingIdeal {x}\n[PROOFSTEP]\nrefine' ⟨x, (IsMaximal.eq_of_le (by infer_instance) hI.ne_top _).symm⟩\n[GOAL]\nk : Type u_1\ninst✝² : Field k\nσ : Type u_2\ninst✝¹ : IsAlgClosed k\ninst✝ : Finite σ\nI : Ideal (MvPolynomial σ k)\nval✝ : Fintype σ\nhI : IsMaximal I\nthis✝ : IsMaximal I := hI\nthis : Field (MvPolynomial σ k ⧸ I) := Quotient.field I\nϕ : k →+* MvPolynomial σ k ⧸ I := RingHom.comp (Ideal.Quotient.mk I) C\nhϕ : Function.Bijective ↑ϕ\nφ : MvPolynomial σ k ⧸ I → k\nhφ : Function.RightInverse φ ↑ϕ\nx : σ → k := fun s => φ (↑(Ideal.Quotient.mk I) (X s))\nhx : ∀ (s : σ), ↑ϕ (x s) = ↑(Ideal.Quotient.mk I) (X s)\n⊢ IsMaximal (vanishingIdeal {x})\n[PROOFSTEP]\ninfer_instance\n[GOAL]\ncase intro.intro\nk : Type u_1\ninst✝² : Field k\nσ : Type u_2\ninst✝¹ : IsAlgClosed k\ninst✝ : Finite σ\nI : Ideal (MvPolynomial σ k)\nval✝ : Fintype σ\nhI : IsMaximal I\nthis✝ : IsMaximal I := hI\nthis : Field (MvPolynomial σ k ⧸ I) := Quotient.field I\nϕ : k →+* MvPolynomial σ k ⧸ I := RingHom.comp (Ideal.Quotient.mk I) C\nhϕ : Function.Bijective ↑ϕ\nφ : MvPolynomial σ k ⧸ I → k\nhφ : Function.RightInverse φ ↑ϕ\nx : σ → k := fun s => φ (↑(Ideal.Quotient.mk I) (X s))\nhx : ∀ (s : σ), ↑ϕ (x s) = ↑(Ideal.Quotient.mk I) (X s)\n⊢ vanishingIdeal {x} ≤ I\n[PROOFSTEP]\nintro p hp\n[GOAL]\ncase intro.intro\nk : Type u_1\ninst✝² : Field k\nσ : Type u_2\ninst✝¹ : IsAlgClosed k\ninst✝ : Finite σ\nI : Ideal (MvPolynomial σ k)\nval✝ : Fintype σ\nhI : IsMaximal I\nthis✝ : IsMaximal I := hI\nthis : Field (MvPolynomial σ k ⧸ I) := Quotient.field I\nϕ : k →+* MvPolynomial σ k ⧸ I := RingHom.comp (Ideal.Quotient.mk I) C\nhϕ : Function.Bijective ↑ϕ\nφ : MvPolynomial σ k ⧸ I → k\nhφ : Function.RightInverse φ ↑ϕ\nx : σ → k := fun s => φ (↑(Ideal.Quotient.mk I) (X s))\nhx : ∀ (s : σ), ↑ϕ (x s) = ↑(Ideal.Quotient.mk I) (X s)\np : MvPolynomial σ k\nhp : p ∈ vanishingIdeal {x}\n⊢ p ∈ I\n[PROOFSTEP]\nrw [← Quotient.eq_zero_iff_mem, map_mvPolynomial_eq_eval₂ (Ideal.Quotient.mk I) p, eval₂_eq']\n[GOAL]\ncase intro.intro\nk : Type u_1\ninst✝² : Field k\nσ : Type u_2\ninst✝¹ : IsAlgClosed k\ninst✝ : Finite σ\nI : Ideal (MvPolynomial σ k)\nval✝ : Fintype σ\nhI : IsMaximal I\nthis✝ : IsMaximal I := hI\nthis : Field (MvPolynomial σ k ⧸ I) := Quotient.field I\nϕ : k →+* MvPolynomial σ k ⧸ I := RingHom.comp (Ideal.Quotient.mk I) C\nhϕ : Function.Bijective ↑ϕ\nφ : MvPolynomial σ k ⧸ I → k\nhφ : Function.RightInverse φ ↑ϕ\nx : σ → k := fun s => φ (↑(Ideal.Quotient.mk I) (X s))\nhx : ∀ (s : σ), ↑ϕ (x s) = ↑(Ideal.Quotient.mk I) (X s)\np : MvPolynomial σ k\nhp : p ∈ vanishingIdeal {x}\n⊢ (Finset.sum (support p) fun d =>\n      ↑(RingHom.comp (Ideal.Quotient.mk I) C) (coeff d p) *\n        Finset.prod Finset.univ fun i => ↑(Ideal.Quotient.mk I) (X i) ^ ↑d i) =\n    0\n[PROOFSTEP]\nrw [mem_vanishingIdeal_singleton_iff, eval_eq'] at hp \n[GOAL]\ncase intro.intro\nk : Type u_1\ninst✝² : Field k\nσ : Type u_2\ninst✝¹ : IsAlgClosed k\ninst✝ : Finite σ\nI : Ideal (MvPolynomial σ k)\nval✝ : Fintype σ\nhI : IsMaximal I\nthis✝ : IsMaximal I := hI\nthis : Field (MvPolynomial σ k ⧸ I) := Quotient.field I\nϕ : k →+* MvPolynomial σ k ⧸ I := RingHom.comp (Ideal.Quotient.mk I) C\nhϕ : Function.Bijective ↑ϕ\nφ : MvPolynomial σ k ⧸ I → k\nhφ : Function.RightInverse φ ↑ϕ\nx : σ → k := fun s => φ (↑(Ideal.Quotient.mk I) (X s))\nhx : ∀ (s : σ), ↑ϕ (x s) = ↑(Ideal.Quotient.mk I) (X s)\np : MvPolynomial σ k\nhp✝ : ↑(eval x) p = 0\nhp : (Finset.sum (support p) fun d => coeff d p * Finset.prod Finset.univ fun i => x i ^ ↑d i) = 0\n⊢ (Finset.sum (support p) fun d =>\n      ↑(RingHom.comp (Ideal.Quotient.mk I) C) (coeff d p) *\n        Finset.prod Finset.univ fun i => ↑(Ideal.Quotient.mk I) (X i) ^ ↑d i) =\n    0\n[PROOFSTEP]\nsimpa only [ϕ.map_sum, ϕ.map_mul, ϕ.map_prod, ϕ.map_pow, ϕ.map_zero, hx] using congr_arg ϕ hp\n[GOAL]\nk : Type u_1\ninst✝² : Field k\nσ : Type u_2\ninst✝¹ : IsAlgClosed k\ninst✝ : Finite σ\nI : Ideal (MvPolynomial σ k)\n⊢ vanishingIdeal (zeroLocus I) = radical I\n[PROOFSTEP]\nrw [I.radical_eq_jacobson]\n[GOAL]\nk : Type u_1\ninst✝² : Field k\nσ : Type u_2\ninst✝¹ : IsAlgClosed k\ninst✝ : Finite σ\nI : Ideal (MvPolynomial σ k)\n⊢ vanishingIdeal (zeroLocus I) = jacobson I\n[PROOFSTEP]\nrefine' le_antisymm (le_sInf _) fun p hp x hx => _\n[GOAL]\ncase refine'_1\nk : Type u_1\ninst✝² : Field k\nσ : Type u_2\ninst✝¹ : IsAlgClosed k\ninst✝ : Finite σ\nI : Ideal (MvPolynomial σ k)\n⊢ ∀ (b : Ideal (MvPolynomial σ k)), b ∈ {J | I ≤ J ∧ IsMaximal J} → vanishingIdeal (zeroLocus I) ≤ b\n[PROOFSTEP]\nrintro J ⟨hJI, hJ⟩\n[GOAL]\ncase refine'_1.intro\nk : Type u_1\ninst✝² : Field k\nσ : Type u_2\ninst✝¹ : IsAlgClosed k\ninst✝ : Finite σ\nI J : Ideal (MvPolynomial σ k)\nhJI : I ≤ J\nhJ : IsMaximal J\n⊢ vanishingIdeal (zeroLocus I) ≤ J\n[PROOFSTEP]\nobtain ⟨x, hx⟩ := (isMaximal_iff_eq_vanishingIdeal_singleton J).1 hJ\n[GOAL]\ncase refine'_1.intro.intro\nk : Type u_1\ninst✝² : Field k\nσ : Type u_2\ninst✝¹ : IsAlgClosed k\ninst✝ : Finite σ\nI J : Ideal (MvPolynomial σ k)\nhJI : I ≤ J\nhJ : IsMaximal J\nx : σ → k\nhx : J = vanishingIdeal {x}\n⊢ vanishingIdeal (zeroLocus I) ≤ J\n[PROOFSTEP]\nrefine' hx.symm ▸ vanishingIdeal_anti_mono fun y hy p hp => _\n[GOAL]\ncase refine'_1.intro.intro\nk : Type u_1\ninst✝² : Field k\nσ : Type u_2\ninst✝¹ : IsAlgClosed k\ninst✝ : Finite σ\nI J : Ideal (MvPolynomial σ k)\nhJI : I ≤ J\nhJ : IsMaximal J\nx : σ → k\nhx : J = vanishingIdeal {x}\ny : σ → k\nhy : y ∈ {x}\np : MvPolynomial σ k\nhp : p ∈ I\n⊢ ↑(eval y) p = 0\n[PROOFSTEP]\nrw [← mem_vanishingIdeal_singleton_iff, Set.mem_singleton_iff.1 hy, ← hx]\n[GOAL]\ncase refine'_1.intro.intro\nk : Type u_1\ninst✝² : Field k\nσ : Type u_2\ninst✝¹ : IsAlgClosed k\ninst✝ : Finite σ\nI J : Ideal (MvPolynomial σ k)\nhJI : I ≤ J\nhJ : IsMaximal J\nx : σ → k\nhx : J = vanishingIdeal {x}\ny : σ → k\nhy : y ∈ {x}\np : MvPolynomial σ k\nhp : p ∈ I\n⊢ p ∈ J\n[PROOFSTEP]\nrefine' hJI hp\n[GOAL]\ncase refine'_2\nk : Type u_1\ninst✝² : Field k\nσ : Type u_2\ninst✝¹ : IsAlgClosed k\ninst✝ : Finite σ\nI : Ideal (MvPolynomial σ k)\np : MvPolynomial σ k\nhp : p ∈ jacobson I\nx : σ → k\nhx : x ∈ zeroLocus I\n⊢ ↑(eval x) p = 0\n[PROOFSTEP]\nrw [← mem_vanishingIdeal_singleton_iff x p]\n[GOAL]\ncase refine'_2\nk : Type u_1\ninst✝² : Field k\nσ : Type u_2\ninst✝¹ : IsAlgClosed k\ninst✝ : Finite σ\nI : Ideal (MvPolynomial σ k)\np : MvPolynomial σ k\nhp : p ∈ jacobson I\nx : σ → k\nhx : x ∈ zeroLocus I\n⊢ p ∈ vanishingIdeal {x}\n[PROOFSTEP]\nrefine'\n  (mem_sInf.mp hp)\n    ⟨le_trans (le_vanishingIdeal_zeroLocus I) (vanishingIdeal_anti_mono fun y hy => hy.symm ▸ hx),\n      MvPolynomial.vanishingIdeal_singleton_isMaximal⟩\n", "meta": {"mathlib_filename": "Mathlib.RingTheory.Nullstellensatz", "llama_tokens": 7895, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8128673269042767, "lm_q2_score": 0.6723317123102956, "lm_q1q2_score": 0.5465164817786452}}
{"text": "[GOAL]\nα : Type u_1\nS : Type u_2\nR : Type u_3\nM : Type u_4\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalSpace M\nx : tsze R M\n⊢ nhds x = Filter.prod (nhds (fst x)) (nhds (snd x))\n[PROOFSTEP]\ncases x\n[GOAL]\ncase mk\nα : Type u_1\nS : Type u_2\nR : Type u_3\nM : Type u_4\ninst✝¹ : TopologicalSpace R\ninst✝ : TopologicalSpace M\nfst✝ : R\nsnd✝ : M\n⊢ nhds (fst✝, snd✝) = Filter.prod (nhds (fst (fst✝, snd✝))) (nhds (snd (fst✝, snd✝)))\n[PROOFSTEP]\nexact nhds_prod_eq\n", "meta": {"mathlib_filename": "Mathlib.Topology.Instances.TrivSqZeroExt", "llama_tokens": 251, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES\n\n", "lm_q1_score": 0.8128673269042767, "lm_q2_score": 0.6723317057447908, "lm_q1q2_score": 0.5465164764417608}}
{"text": "[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝ : Zero α\nf✝ : ι →₀ α\ni✝ : ι\na : α\nf : ι →₀ α\ni : ι\n⊢ i ∈ f.support ↔ (fun i => {↑f i}) i ≠ 0\n[PROOFSTEP]\nrw [← not_iff_not, not_mem_support_iff, not_ne_iff]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝ : Zero α\nf✝ : ι →₀ α\ni✝ : ι\na : α\nf : ι →₀ α\ni : ι\n⊢ ↑f i = 0 ↔ (fun i => {↑f i}) i = 0\n[PROOFSTEP]\nexact singleton_injective.eq_iff.symm\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝² : Zero α\ninst✝¹ : PartialOrder α\ninst✝ : LocallyFiniteOrder α\nf✝ g✝ : ι →₀ α\ni✝ : ι\na : α\nf g : ι →₀ α\ni : ι\n⊢ i ∈ f.support ∪ g.support ↔ (fun i => Icc (↑f i) (↑g i)) i ≠ 0\n[PROOFSTEP]\nrw [mem_union, ← not_iff_not, not_or, not_mem_support_iff, not_mem_support_iff, not_ne_iff]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝² : Zero α\ninst✝¹ : PartialOrder α\ninst✝ : LocallyFiniteOrder α\nf✝ g✝ : ι →₀ α\ni✝ : ι\na : α\nf g : ι →₀ α\ni : ι\n⊢ ↑f i = 0 ∧ ↑g i = 0 ↔ (fun i => Icc (↑f i) (↑g i)) i = 0\n[PROOFSTEP]\nexact Icc_eq_singleton_iff.symm\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝² : PartialOrder α\ninst✝¹ : Zero α\ninst✝ : LocallyFiniteOrder α\nf✝ g✝ f g x : ι →₀ α\n⊢ x ∈ (fun f g => Finset.finsupp (f.support ∪ g.support) ↑(rangeIcc f g)) f g ↔ f ≤ x ∧ x ≤ g\n[PROOFSTEP]\nrefine' (mem_finsupp_iff_of_support_subset <| Finset.subset_of_eq <| rangeIcc_support _ _).trans _\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝² : PartialOrder α\ninst✝¹ : Zero α\ninst✝ : LocallyFiniteOrder α\nf✝ g✝ f g x : ι →₀ α\n⊢ (∀ (i : ι), ↑x i ∈ ↑(rangeIcc f g) i) ↔ f ≤ x ∧ x ≤ g\n[PROOFSTEP]\nsimp_rw [mem_rangeIcc_apply_iff]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝² : PartialOrder α\ninst✝¹ : Zero α\ninst✝ : LocallyFiniteOrder α\nf✝ g✝ f g x : ι →₀ α\n⊢ (∀ (i : ι), ↑f i ≤ ↑x i ∧ ↑x i ≤ ↑g i) ↔ f ≤ x ∧ x ≤ g\n[PROOFSTEP]\nexact forall_and\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝² : PartialOrder α\ninst✝¹ : Zero α\ninst✝ : LocallyFiniteOrder α\nf g : ι →₀ α\n⊢ card (Icc f g) = ∏ i in f.support ∪ g.support, card (Icc (↑f i) (↑g i))\n[PROOFSTEP]\nsimp_rw [Icc_eq, card_finsupp, coe_rangeIcc]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝² : PartialOrder α\ninst✝¹ : Zero α\ninst✝ : LocallyFiniteOrder α\nf g : ι →₀ α\n⊢ card (Ico f g) = ∏ i in f.support ∪ g.support, card (Icc (↑f i) (↑g i)) - 1\n[PROOFSTEP]\nrw [card_Ico_eq_card_Icc_sub_one, card_Icc]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝² : PartialOrder α\ninst✝¹ : Zero α\ninst✝ : LocallyFiniteOrder α\nf g : ι →₀ α\n⊢ card (Ioc f g) = ∏ i in f.support ∪ g.support, card (Icc (↑f i) (↑g i)) - 1\n[PROOFSTEP]\nrw [card_Ioc_eq_card_Icc_sub_one, card_Icc]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝² : PartialOrder α\ninst✝¹ : Zero α\ninst✝ : LocallyFiniteOrder α\nf g : ι →₀ α\n⊢ card (Ioo f g) = ∏ i in f.support ∪ g.support, card (Icc (↑f i) (↑g i)) - 2\n[PROOFSTEP]\nrw [card_Ioo_eq_card_Icc_sub_two, card_Icc]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝² : Lattice α\ninst✝¹ : Zero α\ninst✝ : LocallyFiniteOrder α\nf g : ι →₀ α\n⊢ card (uIcc f g) = ∏ i in f.support ∪ g.support, card (uIcc (↑f i) (↑g i))\n[PROOFSTEP]\nrw [← support_inf_union_support_sup]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝² : Lattice α\ninst✝¹ : Zero α\ninst✝ : LocallyFiniteOrder α\nf g : ι →₀ α\n⊢ card (uIcc f g) = ∏ i in (f ⊓ g).support ∪ (f ⊔ g).support, card (uIcc (↑f i) (↑g i))\n[PROOFSTEP]\nexact card_Icc (_ : ι →₀ α) _\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : CanonicallyOrderedAddMonoid α\ninst✝ : LocallyFiniteOrder α\nf : ι →₀ α\n⊢ card (Iic f) = ∏ i in f.support, card (Iic (↑f i))\n[PROOFSTEP]\nclassical simp_rw [Iic_eq_Icc, card_Icc, Finsupp.bot_eq_zero, support_zero, empty_union, zero_apply, bot_eq_zero]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : CanonicallyOrderedAddMonoid α\ninst✝ : LocallyFiniteOrder α\nf : ι →₀ α\n⊢ card (Iic f) = ∏ i in f.support, card (Iic (↑f i))\n[PROOFSTEP]\nsimp_rw [Iic_eq_Icc, card_Icc, Finsupp.bot_eq_zero, support_zero, empty_union, zero_apply, bot_eq_zero]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : CanonicallyOrderedAddMonoid α\ninst✝ : LocallyFiniteOrder α\nf : ι →₀ α\n⊢ card (Iio f) = ∏ i in f.support, card (Iic (↑f i)) - 1\n[PROOFSTEP]\nrw [card_Iio_eq_card_Iic_sub_one, card_Iic]\n", "meta": {"mathlib_filename": "Mathlib.Data.Finsupp.Interval", "llama_tokens": 2156, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8080672135527631, "lm_q2_score": 0.6757645944891559, "lm_q1q2_score": 0.5460632128864651}}
{"text": "[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : Algebra A B\ninst✝² : IsCyclotomicExtension {n} A B\ninst✝¹ : IsDomain B\ninst✝ : NeZero ↑↑n\n⊢ ↑(aeval (zeta n A B)) (cyclotomic (↑n) A) = 0\n[PROOFSTEP]\nrw [aeval_def, ← eval_map, ← IsRoot.def, map_cyclotomic, isRoot_cyclotomic_iff]\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : Algebra A B\ninst✝² : IsCyclotomicExtension {n} A B\ninst✝¹ : IsDomain B\ninst✝ : NeZero ↑↑n\n⊢ IsPrimitiveRoot (zeta n A B) ↑n\n[PROOFSTEP]\nexact zeta_spec n A B\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : Algebra A B\ninst✝² : IsCyclotomicExtension {n} A B\ninst✝¹ : IsDomain B\ninst✝ : NeZero ↑↑n\n⊢ IsRoot (cyclotomic (↑n) B) (zeta n A B)\n[PROOFSTEP]\nconvert aeval_zeta n A B using 0\n[GOAL]\ncase a\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : Algebra A B\ninst✝² : IsCyclotomicExtension {n} A B\ninst✝¹ : IsDomain B\ninst✝ : NeZero ↑↑n\n⊢ IsRoot (cyclotomic (↑n) B) (zeta n A B) ↔ ↑(aeval (zeta n A B)) (cyclotomic (↑n) A) = 0\n[PROOFSTEP]\nrw [IsRoot.def, aeval_def, eval₂_eq_eval_map, map_cyclotomic]\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁸ : CommRing A\ninst✝⁷ : CommRing B\ninst✝⁶ : Algebra A B\ninst✝⁵ : IsCyclotomicExtension {n} A B\ninst✝⁴ : Field K\ninst✝³ : CommRing L\ninst✝² : IsDomain L\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {n} K L\nζ : L\nhζ : IsPrimitiveRoot ζ ↑n\n⊢ (IsPrimitiveRoot.powerBasis K hζ).gen ∈ adjoin K {ζ - 1}\n[PROOFSTEP]\nrw [powerBasis_gen, adjoin_singleton_eq_range_aeval, AlgHom.mem_range]\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁸ : CommRing A\ninst✝⁷ : CommRing B\ninst✝⁶ : Algebra A B\ninst✝⁵ : IsCyclotomicExtension {n} A B\ninst✝⁴ : Field K\ninst✝³ : CommRing L\ninst✝² : IsDomain L\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {n} K L\nζ : L\nhζ : IsPrimitiveRoot ζ ↑n\n⊢ ∃ x, ↑(aeval (ζ - 1)) x = ζ\n[PROOFSTEP]\nexact ⟨X + 1, by simp⟩\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁸ : CommRing A\ninst✝⁷ : CommRing B\ninst✝⁶ : Algebra A B\ninst✝⁵ : IsCyclotomicExtension {n} A B\ninst✝⁴ : Field K\ninst✝³ : CommRing L\ninst✝² : IsDomain L\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {n} K L\nζ : L\nhζ : IsPrimitiveRoot ζ ↑n\n⊢ ↑(aeval (ζ - 1)) (X + 1) = ζ\n[PROOFSTEP]\nsimp\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC✝ : Type w\ninst✝¹¹ : CommRing A\ninst✝¹⁰ : CommRing B\ninst✝⁹ : Algebra A B\ninst✝⁸ : IsCyclotomicExtension {n} A B\ninst✝⁷ : Field K\ninst✝⁶ : CommRing L\ninst✝⁵ : IsDomain L\ninst✝⁴ : Algebra K L\ninst✝³ : IsCyclotomicExtension {n} K L\nζ : L\nhζ : IsPrimitiveRoot ζ ↑n\nC : Type u_1\ninst✝² : CommRing C\ninst✝¹ : IsDomain C\ninst✝ : Algebra K C\nhirr : Irreducible (cyclotomic (↑n) K)\nx : { y // ↑(aeval y) (minpoly K (IsPrimitiveRoot.powerBasis K hζ).gen) = 0 }\n⊢ { x // x ∈ primitiveRoots (↑n) C }\n[PROOFSTEP]\nhaveI := IsCyclotomicExtension.neZero' n K L\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC✝ : Type w\ninst✝¹¹ : CommRing A\ninst✝¹⁰ : CommRing B\ninst✝⁹ : Algebra A B\ninst✝⁸ : IsCyclotomicExtension {n} A B\ninst✝⁷ : Field K\ninst✝⁶ : CommRing L\ninst✝⁵ : IsDomain L\ninst✝⁴ : Algebra K L\ninst✝³ : IsCyclotomicExtension {n} K L\nζ : L\nhζ : IsPrimitiveRoot ζ ↑n\nC : Type u_1\ninst✝² : CommRing C\ninst✝¹ : IsDomain C\ninst✝ : Algebra K C\nhirr : Irreducible (cyclotomic (↑n) K)\nx : { y // ↑(aeval y) (minpoly K (IsPrimitiveRoot.powerBasis K hζ).gen) = 0 }\nthis : NeZero ↑↑n\n⊢ { x // x ∈ primitiveRoots (↑n) C }\n[PROOFSTEP]\nhaveI hn := NeZero.of_noZeroSMulDivisors K C n\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC✝ : Type w\ninst✝¹¹ : CommRing A\ninst✝¹⁰ : CommRing B\ninst✝⁹ : Algebra A B\ninst✝⁸ : IsCyclotomicExtension {n} A B\ninst✝⁷ : Field K\ninst✝⁶ : CommRing L\ninst✝⁵ : IsDomain L\ninst✝⁴ : Algebra K L\ninst✝³ : IsCyclotomicExtension {n} K L\nζ : L\nhζ : IsPrimitiveRoot ζ ↑n\nC : Type u_1\ninst✝² : CommRing C\ninst✝¹ : IsDomain C\ninst✝ : Algebra K C\nhirr : Irreducible (cyclotomic (↑n) K)\nx : { y // ↑(aeval y) (minpoly K (IsPrimitiveRoot.powerBasis K hζ).gen) = 0 }\nthis : NeZero ↑↑n\nhn : NeZero ↑↑n\n⊢ { x // x ∈ primitiveRoots (↑n) C }\n[PROOFSTEP]\nrefine' ⟨x.1, _⟩\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC✝ : Type w\ninst✝¹¹ : CommRing A\ninst✝¹⁰ : CommRing B\ninst✝⁹ : Algebra A B\ninst✝⁸ : IsCyclotomicExtension {n} A B\ninst✝⁷ : Field K\ninst✝⁶ : CommRing L\ninst✝⁵ : IsDomain L\ninst✝⁴ : Algebra K L\ninst✝³ : IsCyclotomicExtension {n} K L\nζ : L\nhζ : IsPrimitiveRoot ζ ↑n\nC : Type u_1\ninst✝² : CommRing C\ninst✝¹ : IsDomain C\ninst✝ : Algebra K C\nhirr : Irreducible (cyclotomic (↑n) K)\nx : { y // ↑(aeval y) (minpoly K (IsPrimitiveRoot.powerBasis K hζ).gen) = 0 }\nthis : NeZero ↑↑n\nhn : NeZero ↑↑n\n⊢ ↑x ∈ primitiveRoots (↑n) C\n[PROOFSTEP]\ncases x\n[GOAL]\ncase mk\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC✝ : Type w\ninst✝¹¹ : CommRing A\ninst✝¹⁰ : CommRing B\ninst✝⁹ : Algebra A B\ninst✝⁸ : IsCyclotomicExtension {n} A B\ninst✝⁷ : Field K\ninst✝⁶ : CommRing L\ninst✝⁵ : IsDomain L\ninst✝⁴ : Algebra K L\ninst✝³ : IsCyclotomicExtension {n} K L\nζ : L\nhζ : IsPrimitiveRoot ζ ↑n\nC : Type u_1\ninst✝² : CommRing C\ninst✝¹ : IsDomain C\ninst✝ : Algebra K C\nhirr : Irreducible (cyclotomic (↑n) K)\nthis : NeZero ↑↑n\nhn : NeZero ↑↑n\nval✝ : C\nproperty✝ : ↑(aeval val✝) (minpoly K (IsPrimitiveRoot.powerBasis K hζ).gen) = 0\n⊢ ↑{ val := val✝, property := property✝ } ∈ primitiveRoots (↑n) C\n[PROOFSTEP]\nrwa [mem_primitiveRoots n.pos, ← isRoot_cyclotomic_iff, IsRoot.def, ← map_cyclotomic _ (algebraMap K C),\n  hζ.minpoly_eq_cyclotomic_of_irreducible hirr, ← eval₂_eq_eval_map, ← aeval_def]\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC✝ : Type w\ninst✝¹¹ : CommRing A\ninst✝¹⁰ : CommRing B\ninst✝⁹ : Algebra A B\ninst✝⁸ : IsCyclotomicExtension {n} A B\ninst✝⁷ : Field K\ninst✝⁶ : CommRing L\ninst✝⁵ : IsDomain L\ninst✝⁴ : Algebra K L\ninst✝³ : IsCyclotomicExtension {n} K L\nζ : L\nhζ : IsPrimitiveRoot ζ ↑n\nC : Type u_1\ninst✝² : CommRing C\ninst✝¹ : IsDomain C\ninst✝ : Algebra K C\nhirr : Irreducible (cyclotomic (↑n) K)\nx : { x // x ∈ primitiveRoots (↑n) C }\n⊢ { y // ↑(aeval y) (minpoly K (IsPrimitiveRoot.powerBasis K hζ).gen) = 0 }\n[PROOFSTEP]\nhaveI := IsCyclotomicExtension.neZero' n K L\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC✝ : Type w\ninst✝¹¹ : CommRing A\ninst✝¹⁰ : CommRing B\ninst✝⁹ : Algebra A B\ninst✝⁸ : IsCyclotomicExtension {n} A B\ninst✝⁷ : Field K\ninst✝⁶ : CommRing L\ninst✝⁵ : IsDomain L\ninst✝⁴ : Algebra K L\ninst✝³ : IsCyclotomicExtension {n} K L\nζ : L\nhζ : IsPrimitiveRoot ζ ↑n\nC : Type u_1\ninst✝² : CommRing C\ninst✝¹ : IsDomain C\ninst✝ : Algebra K C\nhirr : Irreducible (cyclotomic (↑n) K)\nx : { x // x ∈ primitiveRoots (↑n) C }\nthis : NeZero ↑↑n\n⊢ { y // ↑(aeval y) (minpoly K (IsPrimitiveRoot.powerBasis K hζ).gen) = 0 }\n[PROOFSTEP]\nhaveI hn := NeZero.of_noZeroSMulDivisors K C n\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC✝ : Type w\ninst✝¹¹ : CommRing A\ninst✝¹⁰ : CommRing B\ninst✝⁹ : Algebra A B\ninst✝⁸ : IsCyclotomicExtension {n} A B\ninst✝⁷ : Field K\ninst✝⁶ : CommRing L\ninst✝⁵ : IsDomain L\ninst✝⁴ : Algebra K L\ninst✝³ : IsCyclotomicExtension {n} K L\nζ : L\nhζ : IsPrimitiveRoot ζ ↑n\nC : Type u_1\ninst✝² : CommRing C\ninst✝¹ : IsDomain C\ninst✝ : Algebra K C\nhirr : Irreducible (cyclotomic (↑n) K)\nx : { x // x ∈ primitiveRoots (↑n) C }\nthis : NeZero ↑↑n\nhn : NeZero ↑↑n\n⊢ { y // ↑(aeval y) (minpoly K (IsPrimitiveRoot.powerBasis K hζ).gen) = 0 }\n[PROOFSTEP]\nrefine' ⟨x.1, _⟩\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC✝ : Type w\ninst✝¹¹ : CommRing A\ninst✝¹⁰ : CommRing B\ninst✝⁹ : Algebra A B\ninst✝⁸ : IsCyclotomicExtension {n} A B\ninst✝⁷ : Field K\ninst✝⁶ : CommRing L\ninst✝⁵ : IsDomain L\ninst✝⁴ : Algebra K L\ninst✝³ : IsCyclotomicExtension {n} K L\nζ : L\nhζ : IsPrimitiveRoot ζ ↑n\nC : Type u_1\ninst✝² : CommRing C\ninst✝¹ : IsDomain C\ninst✝ : Algebra K C\nhirr : Irreducible (cyclotomic (↑n) K)\nx : { x // x ∈ primitiveRoots (↑n) C }\nthis : NeZero ↑↑n\nhn : NeZero ↑↑n\n⊢ ↑(aeval ↑x) (minpoly K (IsPrimitiveRoot.powerBasis K hζ).gen) = 0\n[PROOFSTEP]\ncases x\n[GOAL]\ncase mk\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC✝ : Type w\ninst✝¹¹ : CommRing A\ninst✝¹⁰ : CommRing B\ninst✝⁹ : Algebra A B\ninst✝⁸ : IsCyclotomicExtension {n} A B\ninst✝⁷ : Field K\ninst✝⁶ : CommRing L\ninst✝⁵ : IsDomain L\ninst✝⁴ : Algebra K L\ninst✝³ : IsCyclotomicExtension {n} K L\nζ : L\nhζ : IsPrimitiveRoot ζ ↑n\nC : Type u_1\ninst✝² : CommRing C\ninst✝¹ : IsDomain C\ninst✝ : Algebra K C\nhirr : Irreducible (cyclotomic (↑n) K)\nthis : NeZero ↑↑n\nhn : NeZero ↑↑n\nval✝ : C\nproperty✝ : val✝ ∈ primitiveRoots (↑n) C\n⊢ ↑(aeval ↑{ val := val✝, property := property✝ }) (minpoly K (IsPrimitiveRoot.powerBasis K hζ).gen) = 0\n[PROOFSTEP]\nrwa [aeval_def, eval₂_eq_eval_map, hζ.powerBasis_gen K, ← hζ.minpoly_eq_cyclotomic_of_irreducible hirr, map_cyclotomic,\n  ← IsRoot.def, isRoot_cyclotomic_iff, ← mem_primitiveRoots n.pos]\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁸ : CommRing A\ninst✝⁷ : CommRing B\ninst✝⁶ : Algebra A B\ninst✝⁵ : IsCyclotomicExtension {n} A B\ninst✝⁴ : Field K\ninst✝³ : CommRing L\ninst✝² : IsDomain L\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {n} K L\nζ : L\nhζ : IsPrimitiveRoot ζ ↑n\nhirr : Irreducible (cyclotomic (↑n) K)\n⊢ FiniteDimensional.finrank K L = φ ↑n\n[PROOFSTEP]\nhaveI := IsCyclotomicExtension.neZero' n K L\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁸ : CommRing A\ninst✝⁷ : CommRing B\ninst✝⁶ : Algebra A B\ninst✝⁵ : IsCyclotomicExtension {n} A B\ninst✝⁴ : Field K\ninst✝³ : CommRing L\ninst✝² : IsDomain L\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {n} K L\nζ : L\nhζ : IsPrimitiveRoot ζ ↑n\nhirr : Irreducible (cyclotomic (↑n) K)\nthis : NeZero ↑↑n\n⊢ FiniteDimensional.finrank K L = φ ↑n\n[PROOFSTEP]\nrw [((zeta_spec n K L).powerBasis K).finrank, IsPrimitiveRoot.powerBasis_dim, ←\n  (zeta_spec n K L).minpoly_eq_cyclotomic_of_irreducible hirr, natDegree_cyclotomic]\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : CommRing L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\nhζ : IsPrimitiveRoot ζ 2\ninst✝ : IsDomain L\n⊢ ↑(Algebra.norm K) ζ = (-1) ^ FiniteDimensional.finrank K L\n[PROOFSTEP]\nrw [hζ.eq_neg_one_of_two_right, show -1 = algebraMap K L (-1) by simp, Algebra.norm_algebraMap]\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : CommRing L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\nhζ : IsPrimitiveRoot ζ 2\ninst✝ : IsDomain L\n⊢ -1 = ↑(algebraMap K L) (-1)\n[PROOFSTEP]\nsimp\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁸ : CommRing A\ninst✝⁷ : CommRing B\ninst✝⁶ : Algebra A B\ninst✝⁵ : IsCyclotomicExtension {n} A B\ninst✝⁴ : CommRing L\nζ : L\nhζ : IsPrimitiveRoot ζ ↑n\ninst✝³ : Field K\ninst✝² : Algebra K L\ninst✝¹ : IsDomain L\ninst✝ : IsCyclotomicExtension {n} K L\nhn : n ≠ 2\nhirr : Irreducible (cyclotomic (↑n) K)\n⊢ ↑(Algebra.norm K) ζ = 1\n[PROOFSTEP]\nhaveI := IsCyclotomicExtension.neZero' n K L\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁸ : CommRing A\ninst✝⁷ : CommRing B\ninst✝⁶ : Algebra A B\ninst✝⁵ : IsCyclotomicExtension {n} A B\ninst✝⁴ : CommRing L\nζ : L\nhζ : IsPrimitiveRoot ζ ↑n\ninst✝³ : Field K\ninst✝² : Algebra K L\ninst✝¹ : IsDomain L\ninst✝ : IsCyclotomicExtension {n} K L\nhn : n ≠ 2\nhirr : Irreducible (cyclotomic (↑n) K)\nthis : NeZero ↑↑n\n⊢ ↑(Algebra.norm K) ζ = 1\n[PROOFSTEP]\nby_cases h1 : n = 1\n[GOAL]\ncase pos\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁸ : CommRing A\ninst✝⁷ : CommRing B\ninst✝⁶ : Algebra A B\ninst✝⁵ : IsCyclotomicExtension {n} A B\ninst✝⁴ : CommRing L\nζ : L\nhζ : IsPrimitiveRoot ζ ↑n\ninst✝³ : Field K\ninst✝² : Algebra K L\ninst✝¹ : IsDomain L\ninst✝ : IsCyclotomicExtension {n} K L\nhn : n ≠ 2\nhirr : Irreducible (cyclotomic (↑n) K)\nthis : NeZero ↑↑n\nh1 : n = 1\n⊢ ↑(Algebra.norm K) ζ = 1\n[PROOFSTEP]\nrw [h1, one_coe, one_right_iff] at hζ \n[GOAL]\ncase pos\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁸ : CommRing A\ninst✝⁷ : CommRing B\ninst✝⁶ : Algebra A B\ninst✝⁵ : IsCyclotomicExtension {n} A B\ninst✝⁴ : CommRing L\nζ : L\nhζ : ζ = 1\ninst✝³ : Field K\ninst✝² : Algebra K L\ninst✝¹ : IsDomain L\ninst✝ : IsCyclotomicExtension {n} K L\nhn : n ≠ 2\nhirr : Irreducible (cyclotomic (↑n) K)\nthis : NeZero ↑↑n\nh1 : n = 1\n⊢ ↑(Algebra.norm K) ζ = 1\n[PROOFSTEP]\nrw [hζ, show 1 = algebraMap K L 1 by simp, Algebra.norm_algebraMap, one_pow]\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁸ : CommRing A\ninst✝⁷ : CommRing B\ninst✝⁶ : Algebra A B\ninst✝⁵ : IsCyclotomicExtension {n} A B\ninst✝⁴ : CommRing L\nζ : L\nhζ : ζ = 1\ninst✝³ : Field K\ninst✝² : Algebra K L\ninst✝¹ : IsDomain L\ninst✝ : IsCyclotomicExtension {n} K L\nhn : n ≠ 2\nhirr : Irreducible (cyclotomic (↑n) K)\nthis : NeZero ↑↑n\nh1 : n = 1\n⊢ 1 = ↑(algebraMap K L) 1\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁸ : CommRing A\ninst✝⁷ : CommRing B\ninst✝⁶ : Algebra A B\ninst✝⁵ : IsCyclotomicExtension {n} A B\ninst✝⁴ : CommRing L\nζ : L\nhζ : IsPrimitiveRoot ζ ↑n\ninst✝³ : Field K\ninst✝² : Algebra K L\ninst✝¹ : IsDomain L\ninst✝ : IsCyclotomicExtension {n} K L\nhn : n ≠ 2\nhirr : Irreducible (cyclotomic (↑n) K)\nthis : NeZero ↑↑n\nh1 : ¬n = 1\n⊢ ↑(Algebra.norm K) ζ = 1\n[PROOFSTEP]\nreplace h1 : 2 ≤ n\n[GOAL]\ncase h1\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁸ : CommRing A\ninst✝⁷ : CommRing B\ninst✝⁶ : Algebra A B\ninst✝⁵ : IsCyclotomicExtension {n} A B\ninst✝⁴ : CommRing L\nζ : L\nhζ : IsPrimitiveRoot ζ ↑n\ninst✝³ : Field K\ninst✝² : Algebra K L\ninst✝¹ : IsDomain L\ninst✝ : IsCyclotomicExtension {n} K L\nhn : n ≠ 2\nhirr : Irreducible (cyclotomic (↑n) K)\nthis : NeZero ↑↑n\nh1 : ¬n = 1\n⊢ 2 ≤ n\n[PROOFSTEP]\nby_contra' h\n[GOAL]\ncase h1\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁸ : CommRing A\ninst✝⁷ : CommRing B\ninst✝⁶ : Algebra A B\ninst✝⁵ : IsCyclotomicExtension {n} A B\ninst✝⁴ : CommRing L\nζ : L\nhζ : IsPrimitiveRoot ζ ↑n\ninst✝³ : Field K\ninst✝² : Algebra K L\ninst✝¹ : IsDomain L\ninst✝ : IsCyclotomicExtension {n} K L\nhn : n ≠ 2\nhirr : Irreducible (cyclotomic (↑n) K)\nthis : NeZero ↑↑n\nh1 : ¬n = 1\nh : n < 2\n⊢ False\n[PROOFSTEP]\nexact\n  h1\n    (PNat.eq_one_of_lt_two h)\n      -- Porting note: specyfing the type of `cyclotomic_coeff_zero K h1` was not needed.\n[GOAL]\ncase neg\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁸ : CommRing A\ninst✝⁷ : CommRing B\ninst✝⁶ : Algebra A B\ninst✝⁵ : IsCyclotomicExtension {n} A B\ninst✝⁴ : CommRing L\nζ : L\nhζ : IsPrimitiveRoot ζ ↑n\ninst✝³ : Field K\ninst✝² : Algebra K L\ninst✝¹ : IsDomain L\ninst✝ : IsCyclotomicExtension {n} K L\nhn : n ≠ 2\nhirr : Irreducible (cyclotomic (↑n) K)\nthis : NeZero ↑↑n\nh1 : 2 ≤ n\n⊢ ↑(Algebra.norm K) ζ = 1\n[PROOFSTEP]\nrw [← hζ.powerBasis_gen K, PowerBasis.norm_gen_eq_coeff_zero_minpoly, hζ.powerBasis_gen K, ←\n  hζ.minpoly_eq_cyclotomic_of_irreducible hirr, (cyclotomic_coeff_zero K h1 : coeff (cyclotomic n K) 0 = 1), mul_one,\n  hζ.powerBasis_dim K, ← hζ.minpoly_eq_cyclotomic_of_irreducible hirr, natDegree_cyclotomic]\n[GOAL]\ncase neg\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁸ : CommRing A\ninst✝⁷ : CommRing B\ninst✝⁶ : Algebra A B\ninst✝⁵ : IsCyclotomicExtension {n} A B\ninst✝⁴ : CommRing L\nζ : L\nhζ : IsPrimitiveRoot ζ ↑n\ninst✝³ : Field K\ninst✝² : Algebra K L\ninst✝¹ : IsDomain L\ninst✝ : IsCyclotomicExtension {n} K L\nhn : n ≠ 2\nhirr : Irreducible (cyclotomic (↑n) K)\nthis : NeZero ↑↑n\nh1 : 2 ≤ n\n⊢ (-1) ^ φ ↑n = 1\n[PROOFSTEP]\nexact (totient_even <| h1.lt_of_ne hn.symm).neg_one_pow\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK✝ : Type u\nL : Type v\nC : Type w\ninst✝⁸ : CommRing A\ninst✝⁷ : CommRing B\ninst✝⁶ : Algebra A B\ninst✝⁵ : IsCyclotomicExtension {n} A B\ninst✝⁴ : CommRing L\nζ : L\nhζ : IsPrimitiveRoot ζ ↑n\ninst✝³ : Field K✝\ninst✝² : Algebra K✝ L\nK : Type u_1\ninst✝¹ : LinearOrderedField K\ninst✝ : Algebra K L\nhodd : Odd ↑n\n⊢ ↑(Algebra.norm K) ζ = 1\n[PROOFSTEP]\nhave hz := congr_arg (norm K) ((IsPrimitiveRoot.iff_def _ n).1 hζ).1\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK✝ : Type u\nL : Type v\nC : Type w\ninst✝⁸ : CommRing A\ninst✝⁷ : CommRing B\ninst✝⁶ : Algebra A B\ninst✝⁵ : IsCyclotomicExtension {n} A B\ninst✝⁴ : CommRing L\nζ : L\nhζ : IsPrimitiveRoot ζ ↑n\ninst✝³ : Field K✝\ninst✝² : Algebra K✝ L\nK : Type u_1\ninst✝¹ : LinearOrderedField K\ninst✝ : Algebra K L\nhodd : Odd ↑n\nhz : ↑(Algebra.norm K) (ζ ^ ↑n) = ↑(Algebra.norm K) 1\n⊢ ↑(Algebra.norm K) ζ = 1\n[PROOFSTEP]\nrw [← (algebraMap K L).map_one, Algebra.norm_algebraMap, one_pow, map_pow, ← one_pow ↑n] at hz \n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK✝ : Type u\nL : Type v\nC : Type w\ninst✝⁸ : CommRing A\ninst✝⁷ : CommRing B\ninst✝⁶ : Algebra A B\ninst✝⁵ : IsCyclotomicExtension {n} A B\ninst✝⁴ : CommRing L\nζ : L\nhζ : IsPrimitiveRoot ζ ↑n\ninst✝³ : Field K✝\ninst✝² : Algebra K✝ L\nK : Type u_1\ninst✝¹ : LinearOrderedField K\ninst✝ : Algebra K L\nhodd : Odd ↑n\nhz : ↑(Algebra.norm K) ζ ^ ↑n = 1 ^ ↑n\n⊢ ↑(Algebra.norm K) ζ = 1\n[PROOFSTEP]\nexact StrictMono.injective hodd.strictMono_pow hz\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁸ : CommRing A\ninst✝⁷ : CommRing B\ninst✝⁶ : Algebra A B\ninst✝⁵ : IsCyclotomicExtension {n} A B\ninst✝⁴ : CommRing L\nζ : L\nhζ : IsPrimitiveRoot ζ ↑n\ninst✝³ : Field K\ninst✝² : Algebra K L\ninst✝¹ : IsDomain L\ninst✝ : IsCyclotomicExtension {n} K L\nhirr : Irreducible (cyclotomic (↑n) K)\n⊢ ↑(Algebra.norm K) ζ = if n = 2 then -1 else 1\n[PROOFSTEP]\nsplit_ifs with hn\n[GOAL]\ncase pos\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁸ : CommRing A\ninst✝⁷ : CommRing B\ninst✝⁶ : Algebra A B\ninst✝⁵ : IsCyclotomicExtension {n} A B\ninst✝⁴ : CommRing L\nζ : L\nhζ : IsPrimitiveRoot ζ ↑n\ninst✝³ : Field K\ninst✝² : Algebra K L\ninst✝¹ : IsDomain L\ninst✝ : IsCyclotomicExtension {n} K L\nhirr : Irreducible (cyclotomic (↑n) K)\nhn : n = 2\n⊢ ↑(Algebra.norm K) ζ = -1\n[PROOFSTEP]\nsubst hn\n[GOAL]\ncase pos\np : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁸ : CommRing A\ninst✝⁷ : CommRing B\ninst✝⁶ : Algebra A B\ninst✝⁵ : CommRing L\nζ : L\ninst✝⁴ : Field K\ninst✝³ : Algebra K L\ninst✝² : IsDomain L\ninst✝¹ : IsCyclotomicExtension {2} A B\nhζ : IsPrimitiveRoot ζ ↑2\ninst✝ : IsCyclotomicExtension {2} K L\nhirr : Irreducible (cyclotomic (↑2) K)\n⊢ ↑(Algebra.norm K) ζ = -1\n[PROOFSTEP]\nconvert norm_eq_neg_one_pow (K := K) hζ\n[GOAL]\ncase h.e'_3\np : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁸ : CommRing A\ninst✝⁷ : CommRing B\ninst✝⁶ : Algebra A B\ninst✝⁵ : CommRing L\nζ : L\ninst✝⁴ : Field K\ninst✝³ : Algebra K L\ninst✝² : IsDomain L\ninst✝¹ : IsCyclotomicExtension {2} A B\nhζ : IsPrimitiveRoot ζ ↑2\ninst✝ : IsCyclotomicExtension {2} K L\nhirr : Irreducible (cyclotomic (↑2) K)\n⊢ -1 = (-1) ^ FiniteDimensional.finrank K L\n[PROOFSTEP]\nerw [IsCyclotomicExtension.finrank _ hirr, totient_two, pow_one]\n[GOAL]\ncase neg\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁸ : CommRing A\ninst✝⁷ : CommRing B\ninst✝⁶ : Algebra A B\ninst✝⁵ : IsCyclotomicExtension {n} A B\ninst✝⁴ : CommRing L\nζ : L\nhζ : IsPrimitiveRoot ζ ↑n\ninst✝³ : Field K\ninst✝² : Algebra K L\ninst✝¹ : IsDomain L\ninst✝ : IsCyclotomicExtension {n} K L\nhirr : Irreducible (cyclotomic (↑n) K)\nhn : ¬n = 2\n⊢ ↑(Algebra.norm K) ζ = 1\n[PROOFSTEP]\nexact hζ.norm_eq_one hn hirr\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : Field L\nζ : L\nhζ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {n} K L\nh : 2 < ↑n\nhirr : Irreducible (cyclotomic (↑n) K)\n⊢ ↑(Algebra.norm K) (ζ - 1) = ↑(eval 1 (cyclotomic ↑n ℤ))\n[PROOFSTEP]\nhaveI := IsCyclotomicExtension.neZero' n K L\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : Field L\nζ : L\nhζ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {n} K L\nh : 2 < ↑n\nhirr : Irreducible (cyclotomic (↑n) K)\nthis : NeZero ↑↑n\n⊢ ↑(Algebra.norm K) (ζ - 1) = ↑(eval 1 (cyclotomic ↑n ℤ))\n[PROOFSTEP]\nlet E := AlgebraicClosure L\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : Field L\nζ : L\nhζ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {n} K L\nh : 2 < ↑n\nhirr : Irreducible (cyclotomic (↑n) K)\nthis : NeZero ↑↑n\nE : Type v := AlgebraicClosure L\n⊢ ↑(Algebra.norm K) (ζ - 1) = ↑(eval 1 (cyclotomic ↑n ℤ))\n[PROOFSTEP]\nobtain ⟨z, hz⟩ := IsAlgClosed.exists_root _ (degree_cyclotomic_pos n E n.pos).ne.symm\n[GOAL]\ncase intro\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : Field L\nζ : L\nhζ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {n} K L\nh : 2 < ↑n\nhirr : Irreducible (cyclotomic (↑n) K)\nthis : NeZero ↑↑n\nE : Type v := AlgebraicClosure L\nz : E\nhz : IsRoot (cyclotomic (↑n) E) z\n⊢ ↑(Algebra.norm K) (ζ - 1) = ↑(eval 1 (cyclotomic ↑n ℤ))\n[PROOFSTEP]\napply (algebraMap K E).injective\n[GOAL]\ncase intro.a\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : Field L\nζ : L\nhζ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {n} K L\nh : 2 < ↑n\nhirr : Irreducible (cyclotomic (↑n) K)\nthis : NeZero ↑↑n\nE : Type v := AlgebraicClosure L\nz : E\nhz : IsRoot (cyclotomic (↑n) E) z\n⊢ ↑(algebraMap K E) (↑(Algebra.norm K) (ζ - 1)) = ↑(algebraMap K E) ↑(eval 1 (cyclotomic ↑n ℤ))\n[PROOFSTEP]\nletI := IsCyclotomicExtension.finiteDimensional { n } K L\n[GOAL]\ncase intro.a\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : Field L\nζ : L\nhζ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {n} K L\nh : 2 < ↑n\nhirr : Irreducible (cyclotomic (↑n) K)\nthis✝ : NeZero ↑↑n\nE : Type v := AlgebraicClosure L\nz : E\nhz : IsRoot (cyclotomic (↑n) E) z\nthis : FiniteDimensional K L := finiteDimensional {n} K L\n⊢ ↑(algebraMap K E) (↑(Algebra.norm K) (ζ - 1)) = ↑(algebraMap K E) ↑(eval 1 (cyclotomic ↑n ℤ))\n[PROOFSTEP]\nletI := IsCyclotomicExtension.isGalois n K L\n[GOAL]\ncase intro.a\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : Field L\nζ : L\nhζ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {n} K L\nh : 2 < ↑n\nhirr : Irreducible (cyclotomic (↑n) K)\nthis✝¹ : NeZero ↑↑n\nE : Type v := AlgebraicClosure L\nz : E\nhz : IsRoot (cyclotomic (↑n) E) z\nthis✝ : FiniteDimensional K L := finiteDimensional {n} K L\nthis : IsGalois K L := isGalois n K L\n⊢ ↑(algebraMap K E) (↑(Algebra.norm K) (ζ - 1)) = ↑(algebraMap K E) ↑(eval 1 (cyclotomic ↑n ℤ))\n[PROOFSTEP]\nrw [norm_eq_prod_embeddings]\n[GOAL]\ncase intro.a\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : Field L\nζ : L\nhζ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {n} K L\nh : 2 < ↑n\nhirr : Irreducible (cyclotomic (↑n) K)\nthis✝¹ : NeZero ↑↑n\nE : Type v := AlgebraicClosure L\nz : E\nhz : IsRoot (cyclotomic (↑n) E) z\nthis✝ : FiniteDimensional K L := finiteDimensional {n} K L\nthis : IsGalois K L := isGalois n K L\n⊢ (Finset.prod Finset.univ fun σ => ↑σ (ζ - 1)) = ↑(algebraMap K E) ↑(eval 1 (cyclotomic ↑n ℤ))\n[PROOFSTEP]\nconv_lhs =>\n  congr\n  rfl\n  ext\n  rw [← neg_sub, AlgHom.map_neg, AlgHom.map_sub, AlgHom.map_one, neg_eq_neg_one_mul]\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : Field L\nζ : L\nhζ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {n} K L\nh : 2 < ↑n\nhirr : Irreducible (cyclotomic (↑n) K)\nthis✝¹ : NeZero ↑↑n\nE : Type v := AlgebraicClosure L\nz : E\nhz : IsRoot (cyclotomic (↑n) E) z\nthis✝ : FiniteDimensional K L := finiteDimensional {n} K L\nthis : IsGalois K L := isGalois n K L\n| Finset.prod Finset.univ fun σ => ↑σ (ζ - 1)\n[PROOFSTEP]\n  congr\n  rfl\n  ext\n  rw [← neg_sub, AlgHom.map_neg, AlgHom.map_sub, AlgHom.map_one, neg_eq_neg_one_mul]\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : Field L\nζ : L\nhζ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {n} K L\nh : 2 < ↑n\nhirr : Irreducible (cyclotomic (↑n) K)\nthis✝¹ : NeZero ↑↑n\nE : Type v := AlgebraicClosure L\nz : E\nhz : IsRoot (cyclotomic (↑n) E) z\nthis✝ : FiniteDimensional K L := finiteDimensional {n} K L\nthis : IsGalois K L := isGalois n K L\n| Finset.prod Finset.univ fun σ => ↑σ (ζ - 1)\n[PROOFSTEP]\n  congr\n  rfl\n  ext\n  rw [← neg_sub, AlgHom.map_neg, AlgHom.map_sub, AlgHom.map_one, neg_eq_neg_one_mul]\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : Field L\nζ : L\nhζ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {n} K L\nh : 2 < ↑n\nhirr : Irreducible (cyclotomic (↑n) K)\nthis✝¹ : NeZero ↑↑n\nE : Type v := AlgebraicClosure L\nz : E\nhz : IsRoot (cyclotomic (↑n) E) z\nthis✝ : FiniteDimensional K L := finiteDimensional {n} K L\nthis : IsGalois K L := isGalois n K L\n| Finset.prod Finset.univ fun σ => ↑σ (ζ - 1)\n[PROOFSTEP]\ncongr\n[GOAL]\ncase s\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : Field L\nζ : L\nhζ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {n} K L\nh : 2 < ↑n\nhirr : Irreducible (cyclotomic (↑n) K)\nthis✝¹ : NeZero ↑↑n\nE : Type v := AlgebraicClosure L\nz : E\nhz : IsRoot (cyclotomic (↑n) E) z\nthis✝ : FiniteDimensional K L := finiteDimensional {n} K L\nthis : IsGalois K L := isGalois n K L\n| Finset.univ\ncase f\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : Field L\nζ : L\nhζ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {n} K L\nh : 2 < ↑n\nhirr : Irreducible (cyclotomic (↑n) K)\nthis✝¹ : NeZero ↑↑n\nE : Type v := AlgebraicClosure L\nz : E\nhz : IsRoot (cyclotomic (↑n) E) z\nthis✝ : FiniteDimensional K L := finiteDimensional {n} K L\nthis : IsGalois K L := isGalois n K L\n| fun σ => ↑σ (ζ - 1)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase f\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : Field L\nζ : L\nhζ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {n} K L\nh : 2 < ↑n\nhirr : Irreducible (cyclotomic (↑n) K)\nthis✝¹ : NeZero ↑↑n\nE : Type v := AlgebraicClosure L\nz : E\nhz : IsRoot (cyclotomic (↑n) E) z\nthis✝ : FiniteDimensional K L := finiteDimensional {n} K L\nthis : IsGalois K L := isGalois n K L\n| fun σ => ↑σ (ζ - 1)\n[PROOFSTEP]\next\n[GOAL]\ncase f.h\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : Field L\nζ : L\nhζ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {n} K L\nh : 2 < ↑n\nhirr : Irreducible (cyclotomic (↑n) K)\nthis✝¹ : NeZero ↑↑n\nE : Type v := AlgebraicClosure L\nz : E\nhz : IsRoot (cyclotomic (↑n) E) z\nthis✝ : FiniteDimensional K L := finiteDimensional {n} K L\nthis : IsGalois K L := isGalois n K L\nx✝ : L →ₐ[K] E\n| ↑x✝ (ζ - 1)\n[PROOFSTEP]\nrw [← neg_sub, AlgHom.map_neg, AlgHom.map_sub, AlgHom.map_one, neg_eq_neg_one_mul]\n[GOAL]\ncase intro.a\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : Field L\nζ : L\nhζ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {n} K L\nh : 2 < ↑n\nhirr : Irreducible (cyclotomic (↑n) K)\nthis✝¹ : NeZero ↑↑n\nE : Type v := AlgebraicClosure L\nz : E\nhz : IsRoot (cyclotomic (↑n) E) z\nthis✝ : FiniteDimensional K L := finiteDimensional {n} K L\nthis : IsGalois K L := isGalois n K L\n⊢ (Finset.prod Finset.univ fun x => -1 * (1 - ↑x ζ)) = ↑(algebraMap K E) ↑(eval 1 (cyclotomic ↑n ℤ))\n[PROOFSTEP]\nrw [prod_mul_distrib, prod_const, card_univ, AlgHom.card, IsCyclotomicExtension.finrank L hirr,\n  (totient_even h).neg_one_pow, one_mul]\n[GOAL]\ncase intro.a\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : Field L\nζ : L\nhζ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {n} K L\nh : 2 < ↑n\nhirr : Irreducible (cyclotomic (↑n) K)\nthis✝¹ : NeZero ↑↑n\nE : Type v := AlgebraicClosure L\nz : E\nhz : IsRoot (cyclotomic (↑n) E) z\nthis✝ : FiniteDimensional K L := finiteDimensional {n} K L\nthis : IsGalois K L := isGalois n K L\n⊢ (Finset.prod Finset.univ fun x => 1 - ↑x ζ) = ↑(algebraMap K E) ↑(eval 1 (cyclotomic ↑n ℤ))\n[PROOFSTEP]\nhave Hprod : (Finset.univ.prod fun σ : L →ₐ[K] E => 1 - σ ζ) = eval 1 (cyclotomic' n E) :=\n  by\n  rw [cyclotomic', eval_prod, ← @Finset.prod_attach E E, ← univ_eq_attach]\n  refine' Fintype.prod_equiv (hζ.embeddingsEquivPrimitiveRoots E hirr) _ _ fun σ => _\n  simp\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : Field L\nζ : L\nhζ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {n} K L\nh : 2 < ↑n\nhirr : Irreducible (cyclotomic (↑n) K)\nthis✝¹ : NeZero ↑↑n\nE : Type v := AlgebraicClosure L\nz : E\nhz : IsRoot (cyclotomic (↑n) E) z\nthis✝ : FiniteDimensional K L := finiteDimensional {n} K L\nthis : IsGalois K L := isGalois n K L\n⊢ (Finset.prod Finset.univ fun σ => 1 - ↑σ ζ) = eval 1 (cyclotomic' (↑n) E)\n[PROOFSTEP]\nrw [cyclotomic', eval_prod, ← @Finset.prod_attach E E, ← univ_eq_attach]\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : Field L\nζ : L\nhζ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {n} K L\nh : 2 < ↑n\nhirr : Irreducible (cyclotomic (↑n) K)\nthis✝¹ : NeZero ↑↑n\nE : Type v := AlgebraicClosure L\nz : E\nhz : IsRoot (cyclotomic (↑n) E) z\nthis✝ : FiniteDimensional K L := finiteDimensional {n} K L\nthis : IsGalois K L := isGalois n K L\n⊢ (Finset.prod Finset.univ fun σ => 1 - ↑σ ζ) = Finset.prod Finset.univ fun x => eval 1 (X - ↑Polynomial.C ↑x)\n[PROOFSTEP]\nrefine' Fintype.prod_equiv (hζ.embeddingsEquivPrimitiveRoots E hirr) _ _ fun σ => _\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : Field L\nζ : L\nhζ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {n} K L\nh : 2 < ↑n\nhirr : Irreducible (cyclotomic (↑n) K)\nthis✝¹ : NeZero ↑↑n\nE : Type v := AlgebraicClosure L\nz : E\nhz : IsRoot (cyclotomic (↑n) E) z\nthis✝ : FiniteDimensional K L := finiteDimensional {n} K L\nthis : IsGalois K L := isGalois n K L\nσ : L →ₐ[K] E\n⊢ 1 - ↑σ ζ = eval 1 (X - ↑Polynomial.C ↑(↑(embeddingsEquivPrimitiveRoots hζ E hirr) σ))\n[PROOFSTEP]\nsimp\n[GOAL]\ncase intro.a\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : Field L\nζ : L\nhζ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {n} K L\nh : 2 < ↑n\nhirr : Irreducible (cyclotomic (↑n) K)\nthis✝¹ : NeZero ↑↑n\nE : Type v := AlgebraicClosure L\nz : E\nhz : IsRoot (cyclotomic (↑n) E) z\nthis✝ : FiniteDimensional K L := finiteDimensional {n} K L\nthis : IsGalois K L := isGalois n K L\nHprod : (Finset.prod Finset.univ fun σ => 1 - ↑σ ζ) = eval 1 (cyclotomic' (↑n) E)\n⊢ (Finset.prod Finset.univ fun x => 1 - ↑x ζ) = ↑(algebraMap K E) ↑(eval 1 (cyclotomic ↑n ℤ))\n[PROOFSTEP]\nhaveI : NeZero ((n : ℕ) : E) := NeZero.of_noZeroSMulDivisors K _ (n : ℕ)\n[GOAL]\ncase intro.a\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : Field L\nζ : L\nhζ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {n} K L\nh : 2 < ↑n\nhirr : Irreducible (cyclotomic (↑n) K)\nthis✝² : NeZero ↑↑n\nE : Type v := AlgebraicClosure L\nz : E\nhz : IsRoot (cyclotomic (↑n) E) z\nthis✝¹ : FiniteDimensional K L := finiteDimensional {n} K L\nthis✝ : IsGalois K L := isGalois n K L\nHprod : (Finset.prod Finset.univ fun σ => 1 - ↑σ ζ) = eval 1 (cyclotomic' (↑n) E)\nthis : NeZero ↑↑n\n⊢ (Finset.prod Finset.univ fun x => 1 - ↑x ζ) = ↑(algebraMap K E) ↑(eval 1 (cyclotomic ↑n ℤ))\n[PROOFSTEP]\nrw [Hprod, cyclotomic', ← cyclotomic_eq_prod_X_sub_primitiveRoots (isRoot_cyclotomic_iff.1 hz), ← map_cyclotomic_int,\n  _root_.map_intCast, ← Int.cast_one, eval_int_cast_map, eq_intCast, Int.cast_id]\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : Field L\nζ : L\nhζ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\nhn : IsPrimePow ↑n\ninst✝ : IsCyclotomicExtension {n} K L\nhirr : Irreducible (cyclotomic (↑n) K)\nh : n ≠ 2\n⊢ ↑(Algebra.norm K) (ζ - 1) = ↑(minFac ↑n)\n[PROOFSTEP]\nhave :=\n  (coe_lt_coe 2 _).1\n    (lt_of_le_of_ne (succ_le_of_lt (IsPrimePow.one_lt hn)) (Function.Injective.ne PNat.coe_injective h).symm)\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : Field L\nζ : L\nhζ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\nhn : IsPrimePow ↑n\ninst✝ : IsCyclotomicExtension {n} K L\nhirr : Irreducible (cyclotomic (↑n) K)\nh : n ≠ 2\nthis : 2 < n\n⊢ ↑(Algebra.norm K) (ζ - 1) = ↑(minFac ↑n)\n[PROOFSTEP]\nletI hprime : Fact (n : ℕ).minFac.Prime := ⟨minFac_prime (IsPrimePow.ne_one hn)⟩\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : Field L\nζ : L\nhζ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\nhn : IsPrimePow ↑n\ninst✝ : IsCyclotomicExtension {n} K L\nhirr : Irreducible (cyclotomic (↑n) K)\nh : n ≠ 2\nthis : 2 < n\nhprime : Fact (Nat.Prime (minFac ↑n)) := { out := minFac_prime (IsPrimePow.ne_one hn) }\n⊢ ↑(Algebra.norm K) (ζ - 1) = ↑(minFac ↑n)\n[PROOFSTEP]\nrw [sub_one_norm_eq_eval_cyclotomic hζ this hirr]\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : Field L\nζ : L\nhζ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\nhn : IsPrimePow ↑n\ninst✝ : IsCyclotomicExtension {n} K L\nhirr : Irreducible (cyclotomic (↑n) K)\nh : n ≠ 2\nthis : 2 < n\nhprime : Fact (Nat.Prime (minFac ↑n)) := { out := minFac_prime (IsPrimePow.ne_one hn) }\n⊢ ↑(eval 1 (cyclotomic ↑n ℤ)) = ↑(minFac ↑n)\n[PROOFSTEP]\nnth_rw 1 [← IsPrimePow.minFac_pow_factorization_eq hn]\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : Field L\nζ : L\nhζ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\nhn : IsPrimePow ↑n\ninst✝ : IsCyclotomicExtension {n} K L\nhirr : Irreducible (cyclotomic (↑n) K)\nh : n ≠ 2\nthis : 2 < n\nhprime : Fact (Nat.Prime (minFac ↑n)) := { out := minFac_prime (IsPrimePow.ne_one hn) }\n⊢ ↑(eval 1 (cyclotomic (minFac ↑n ^ ↑(Nat.factorization ↑n) (minFac ↑n)) ℤ)) = ↑(minFac ↑n)\n[PROOFSTEP]\nobtain ⟨k, hk⟩ : ∃ k, (n : ℕ).factorization (n : ℕ).minFac = k + 1 :=\n  exists_eq_succ_of_ne_zero\n    (((n : ℕ).factorization.mem_support_toFun (n : ℕ).minFac).1 <|\n      factor_iff_mem_factorization.2 <| (mem_factors (IsPrimePow.ne_zero hn)).2 ⟨hprime.out, minFac_dvd _⟩)\n[GOAL]\ncase intro\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : Field L\nζ : L\nhζ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\nhn : IsPrimePow ↑n\ninst✝ : IsCyclotomicExtension {n} K L\nhirr : Irreducible (cyclotomic (↑n) K)\nh : n ≠ 2\nthis : 2 < n\nhprime : Fact (Nat.Prime (minFac ↑n)) := { out := minFac_prime (IsPrimePow.ne_one hn) }\nk : ℕ\nhk : ↑(Nat.factorization ↑n) (minFac ↑n) = k + 1\n⊢ ↑(eval 1 (cyclotomic (minFac ↑n ^ ↑(Nat.factorization ↑n) (minFac ↑n)) ℤ)) = ↑(minFac ↑n)\n[PROOFSTEP]\nsimp [hk, sub_one_norm_eq_eval_cyclotomic hζ this hirr]\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁹ : CommRing A\ninst✝⁸ : CommRing B\ninst✝⁷ : Algebra A B\ninst✝⁶ : IsCyclotomicExtension {n} A B\ninst✝⁵ : Field L\nζ✝ : L\nhζ✝ : IsPrimitiveRoot ζ✝ ↑n\ninst✝⁴ : Field K\ninst✝³ : Algebra K L\ninst✝² : Algebra K A\ninst✝¹ : IsDomain A\nζ : A\ninst✝ : IsCyclotomicExtension {n} K A\nhζ : IsPrimitiveRoot ζ ↑n\nh : Irreducible (cyclotomic (↑n) K)\n⊢ minpoly K (ζ - 1) = comp (cyclotomic (↑n) K) (X + 1)\n[PROOFSTEP]\nhaveI := IsCyclotomicExtension.neZero' n K A\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁹ : CommRing A\ninst✝⁸ : CommRing B\ninst✝⁷ : Algebra A B\ninst✝⁶ : IsCyclotomicExtension {n} A B\ninst✝⁵ : Field L\nζ✝ : L\nhζ✝ : IsPrimitiveRoot ζ✝ ↑n\ninst✝⁴ : Field K\ninst✝³ : Algebra K L\ninst✝² : Algebra K A\ninst✝¹ : IsDomain A\nζ : A\ninst✝ : IsCyclotomicExtension {n} K A\nhζ : IsPrimitiveRoot ζ ↑n\nh : Irreducible (cyclotomic (↑n) K)\nthis : NeZero ↑↑n\n⊢ minpoly K (ζ - 1) = comp (cyclotomic (↑n) K) (X + 1)\n[PROOFSTEP]\nrw [show ζ - 1 = ζ + algebraMap K A (-1) by simp [sub_eq_add_neg],\n  minpoly.add_algebraMap (IsCyclotomicExtension.integral { n } K A ζ), hζ.minpoly_eq_cyclotomic_of_irreducible h]\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁹ : CommRing A\ninst✝⁸ : CommRing B\ninst✝⁷ : Algebra A B\ninst✝⁶ : IsCyclotomicExtension {n} A B\ninst✝⁵ : Field L\nζ✝ : L\nhζ✝ : IsPrimitiveRoot ζ✝ ↑n\ninst✝⁴ : Field K\ninst✝³ : Algebra K L\ninst✝² : Algebra K A\ninst✝¹ : IsDomain A\nζ : A\ninst✝ : IsCyclotomicExtension {n} K A\nhζ : IsPrimitiveRoot ζ ↑n\nh : Irreducible (cyclotomic (↑n) K)\nthis : NeZero ↑↑n\n⊢ ζ - 1 = ζ + ↑(algebraMap K A) (-1)\n[PROOFSTEP]\nsimp [sub_eq_add_neg]\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁹ : CommRing A\ninst✝⁸ : CommRing B\ninst✝⁷ : Algebra A B\ninst✝⁶ : IsCyclotomicExtension {n} A B\ninst✝⁵ : Field L\nζ✝ : L\nhζ✝ : IsPrimitiveRoot ζ✝ ↑n\ninst✝⁴ : Field K\ninst✝³ : Algebra K L\ninst✝² : Algebra K A\ninst✝¹ : IsDomain A\nζ : A\ninst✝ : IsCyclotomicExtension {n} K A\nhζ : IsPrimitiveRoot ζ ↑n\nh : Irreducible (cyclotomic (↑n) K)\nthis : NeZero ↑↑n\n⊢ comp (minpoly K ζ) (X - ↑Polynomial.C (-1)) = comp (minpoly K ζ) (X + 1)\n[PROOFSTEP]\nsimp\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\nk s : ℕ\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhpri : Fact (Nat.Prime ↑p)\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhs : s ≤ k\nhtwo : p ^ (k - s + 1) ≠ 2\n⊢ ↑(Algebra.norm K) (ζ ^ ↑p ^ s - 1) = ↑↑p ^ ↑p ^ s\n[PROOFSTEP]\nhave hirr₁ : Irreducible (cyclotomic ((p : ℕ) ^ (k - s + 1)) K) :=\n  cyclotomic_irreducible_pow_of_irreducible_pow hpri.1 (by simp) hirr\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\nk s : ℕ\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhpri : Fact (Nat.Prime ↑p)\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhs : s ≤ k\nhtwo : p ^ (k - s + 1) ≠ 2\n⊢ k - s + 1 ≤ k + 1\n[PROOFSTEP]\nsimp\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\nk s : ℕ\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhpri : Fact (Nat.Prime ↑p)\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhs : s ≤ k\nhtwo : p ^ (k - s + 1) ≠ 2\nhirr₁ : Irreducible (cyclotomic (↑p ^ (k - s + 1)) K)\n⊢ ↑(Algebra.norm K) (ζ ^ ↑p ^ s - 1) = ↑↑p ^ ↑p ^ s\n[PROOFSTEP]\nrw [← PNat.pow_coe] at hirr₁ \n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\nk s : ℕ\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhpri : Fact (Nat.Prime ↑p)\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhs : s ≤ k\nhtwo : p ^ (k - s + 1) ≠ 2\nhirr₁ : Irreducible (cyclotomic (↑(p ^ (k - s + 1))) K)\n⊢ ↑(Algebra.norm K) (ζ ^ ↑p ^ s - 1) = ↑↑p ^ ↑p ^ s\n[PROOFSTEP]\nset η := ζ ^ (p : ℕ) ^ s - 1 with ηdef\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\nk s : ℕ\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhpri : Fact (Nat.Prime ↑p)\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhs : s ≤ k\nhtwo : p ^ (k - s + 1) ≠ 2\nhirr₁ : Irreducible (cyclotomic (↑(p ^ (k - s + 1))) K)\nη : L := ζ ^ ↑p ^ s - 1\nηdef : η = ζ ^ ↑p ^ s - 1\n⊢ ↑(Algebra.norm K) η = ↑↑p ^ ↑p ^ s\n[PROOFSTEP]\nlet η₁ : K⟮η⟯ := IntermediateField.AdjoinSimple.gen K η\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\nk s : ℕ\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhpri : Fact (Nat.Prime ↑p)\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhs : s ≤ k\nhtwo : p ^ (k - s + 1) ≠ 2\nhirr₁ : Irreducible (cyclotomic (↑(p ^ (k - s + 1))) K)\nη : L := ζ ^ ↑p ^ s - 1\nηdef : η = ζ ^ ↑p ^ s - 1\nη₁ : { x // x ∈ K⟮η⟯ } := IntermediateField.AdjoinSimple.gen K η\n⊢ ↑(Algebra.norm K) η = ↑↑p ^ ↑p ^ s\n[PROOFSTEP]\nhave hη : IsPrimitiveRoot (η + 1) ((p : ℕ) ^ (k + 1 - s)) :=\n  by\n  rw [sub_add_cancel]\n  refine' IsPrimitiveRoot.pow (p ^ (k + 1)).pos hζ _\n  rw [PNat.pow_coe, ← pow_add, add_comm s, Nat.sub_add_cancel (le_trans hs (Nat.le_succ k))]\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\nk s : ℕ\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhpri : Fact (Nat.Prime ↑p)\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhs : s ≤ k\nhtwo : p ^ (k - s + 1) ≠ 2\nhirr₁ : Irreducible (cyclotomic (↑(p ^ (k - s + 1))) K)\nη : L := ζ ^ ↑p ^ s - 1\nηdef : η = ζ ^ ↑p ^ s - 1\nη₁ : { x // x ∈ K⟮η⟯ } := IntermediateField.AdjoinSimple.gen K η\n⊢ IsPrimitiveRoot (η + 1) (↑p ^ (k + 1 - s))\n[PROOFSTEP]\nrw [sub_add_cancel]\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\nk s : ℕ\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhpri : Fact (Nat.Prime ↑p)\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhs : s ≤ k\nhtwo : p ^ (k - s + 1) ≠ 2\nhirr₁ : Irreducible (cyclotomic (↑(p ^ (k - s + 1))) K)\nη : L := ζ ^ ↑p ^ s - 1\nηdef : η = ζ ^ ↑p ^ s - 1\nη₁ : { x // x ∈ K⟮η⟯ } := IntermediateField.AdjoinSimple.gen K η\n⊢ IsPrimitiveRoot (ζ ^ ↑p ^ s) (↑p ^ (k + 1 - s))\n[PROOFSTEP]\nrefine' IsPrimitiveRoot.pow (p ^ (k + 1)).pos hζ _\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\nk s : ℕ\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhpri : Fact (Nat.Prime ↑p)\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhs : s ≤ k\nhtwo : p ^ (k - s + 1) ≠ 2\nhirr₁ : Irreducible (cyclotomic (↑(p ^ (k - s + 1))) K)\nη : L := ζ ^ ↑p ^ s - 1\nηdef : η = ζ ^ ↑p ^ s - 1\nη₁ : { x // x ∈ K⟮η⟯ } := IntermediateField.AdjoinSimple.gen K η\n⊢ ↑(p ^ (k + 1)) = ↑p ^ s * ↑p ^ (k + 1 - s)\n[PROOFSTEP]\nrw [PNat.pow_coe, ← pow_add, add_comm s, Nat.sub_add_cancel (le_trans hs (Nat.le_succ k))]\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\nk s : ℕ\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhpri : Fact (Nat.Prime ↑p)\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhs : s ≤ k\nhtwo : p ^ (k - s + 1) ≠ 2\nhirr₁ : Irreducible (cyclotomic (↑(p ^ (k - s + 1))) K)\nη : L := ζ ^ ↑p ^ s - 1\nηdef : η = ζ ^ ↑p ^ s - 1\nη₁ : { x // x ∈ K⟮η⟯ } := IntermediateField.AdjoinSimple.gen K η\nhη : IsPrimitiveRoot (η + 1) (↑p ^ (k + 1 - s))\n⊢ ↑(Algebra.norm K) η = ↑↑p ^ ↑p ^ s\n[PROOFSTEP]\nhave : IsCyclotomicExtension {p ^ (k - s + 1)} K K⟮η⟯ :=\n  by\n  suffices IsCyclotomicExtension {p ^ (k - s + 1)} K K⟮η + 1⟯.toSubalgebra\n    by\n    have H : K⟮η + 1⟯.toSubalgebra = K⟮η⟯.toSubalgebra :=\n      by\n      simp only [IntermediateField.adjoin_simple_toSubalgebra_of_integral\n          (IsCyclotomicExtension.integral {p ^ (k + 1)} K L _)]\n      refine' Subalgebra.ext fun x => ⟨fun hx => adjoin_le _ hx, fun hx => adjoin_le _ hx⟩\n      · simp only [Set.singleton_subset_iff, SetLike.mem_coe]\n        exact\n          Subalgebra.add_mem _ (subset_adjoin (mem_singleton η))\n            (Subalgebra.one_mem _)\n              -- Porting note `ηdef` was not needed.\n      · simp only [Set.singleton_subset_iff, SetLike.mem_coe, ← ηdef]\n        nth_rw 1 [← add_sub_cancel η 1]\n        refine'\n          Subalgebra.sub_mem _ (subset_adjoin (mem_singleton _))\n            (Subalgebra.one_mem _)\n              -- Porting note: the previous proof was `rw [H] at this; exact this` but it now fails.\n    exact\n      IsCyclotomicExtension.equiv _ _ _\n        (Subalgebra.equivOfEq _ _ H)\n          -- Porting note: the next `refine` was `rw [H]`, abusing defeq, and it now fails.\n  have H :=\n    IntermediateField.adjoin_simple_toSubalgebra_of_integral (IsCyclotomicExtension.integral {p ^ (k + 1)} K L (η + 1))\n  refine @IsCyclotomicExtension.equiv _ _ _ _ _ _ _ _ _ ?_ (Subalgebra.equivOfEq _ _ H).symm\n  have hη' : IsPrimitiveRoot (η + 1) ↑(p ^ (k + 1 - s)) := by simpa using hη\n  convert hη'.adjoin_isCyclotomicExtension K using 1\n  rw [Nat.sub_add_comm hs]\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\nk s : ℕ\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhpri : Fact (Nat.Prime ↑p)\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhs : s ≤ k\nhtwo : p ^ (k - s + 1) ≠ 2\nhirr₁ : Irreducible (cyclotomic (↑(p ^ (k - s + 1))) K)\nη : L := ζ ^ ↑p ^ s - 1\nηdef : η = ζ ^ ↑p ^ s - 1\nη₁ : { x // x ∈ K⟮η⟯ } := IntermediateField.AdjoinSimple.gen K η\nhη : IsPrimitiveRoot (η + 1) (↑p ^ (k + 1 - s))\n⊢ IsCyclotomicExtension {p ^ (k - s + 1)} K { x // x ∈ K⟮η⟯ }\n[PROOFSTEP]\nsuffices IsCyclotomicExtension {p ^ (k - s + 1)} K K⟮η + 1⟯.toSubalgebra\n  by\n  have H : K⟮η + 1⟯.toSubalgebra = K⟮η⟯.toSubalgebra :=\n    by\n    simp only [IntermediateField.adjoin_simple_toSubalgebra_of_integral\n        (IsCyclotomicExtension.integral {p ^ (k + 1)} K L _)]\n    refine' Subalgebra.ext fun x => ⟨fun hx => adjoin_le _ hx, fun hx => adjoin_le _ hx⟩\n    · simp only [Set.singleton_subset_iff, SetLike.mem_coe]\n      exact\n        Subalgebra.add_mem _ (subset_adjoin (mem_singleton η))\n          (Subalgebra.one_mem _)\n            -- Porting note `ηdef` was not needed.\n    · simp only [Set.singleton_subset_iff, SetLike.mem_coe, ← ηdef]\n      nth_rw 1 [← add_sub_cancel η 1]\n      refine'\n        Subalgebra.sub_mem _ (subset_adjoin (mem_singleton _))\n          (Subalgebra.one_mem _)\n            -- Porting note: the previous proof was `rw [H] at this; exact this` but it now fails.\n  exact\n    IsCyclotomicExtension.equiv _ _ _\n      (Subalgebra.equivOfEq _ _ H)\n        -- Porting note: the next `refine` was `rw [H]`, abusing defeq, and it now fails.\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\nk s : ℕ\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhpri : Fact (Nat.Prime ↑p)\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhs : s ≤ k\nhtwo : p ^ (k - s + 1) ≠ 2\nhirr₁ : Irreducible (cyclotomic (↑(p ^ (k - s + 1))) K)\nη : L := ζ ^ ↑p ^ s - 1\nηdef : η = ζ ^ ↑p ^ s - 1\nη₁ : { x // x ∈ K⟮η⟯ } := IntermediateField.AdjoinSimple.gen K η\nhη : IsPrimitiveRoot (η + 1) (↑p ^ (k + 1 - s))\nthis : IsCyclotomicExtension {p ^ (k - s + 1)} K { x // x ∈ K⟮η + 1⟯.toSubalgebra }\n⊢ IsCyclotomicExtension {p ^ (k - s + 1)} K { x // x ∈ K⟮η⟯ }\n[PROOFSTEP]\nhave H : K⟮η + 1⟯.toSubalgebra = K⟮η⟯.toSubalgebra :=\n  by\n  simp only [IntermediateField.adjoin_simple_toSubalgebra_of_integral\n      (IsCyclotomicExtension.integral {p ^ (k + 1)} K L _)]\n  refine' Subalgebra.ext fun x => ⟨fun hx => adjoin_le _ hx, fun hx => adjoin_le _ hx⟩\n  · simp only [Set.singleton_subset_iff, SetLike.mem_coe]\n    exact\n      Subalgebra.add_mem _ (subset_adjoin (mem_singleton η))\n        (Subalgebra.one_mem _)\n          -- Porting note `ηdef` was not needed.\n  · simp only [Set.singleton_subset_iff, SetLike.mem_coe, ← ηdef]\n    nth_rw 1 [← add_sub_cancel η 1]\n    refine'\n      Subalgebra.sub_mem _ (subset_adjoin (mem_singleton _))\n        (Subalgebra.one_mem _)\n          -- Porting note: the previous proof was `rw [H] at this; exact this` but it now fails.\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\nk s : ℕ\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhpri : Fact (Nat.Prime ↑p)\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhs : s ≤ k\nhtwo : p ^ (k - s + 1) ≠ 2\nhirr₁ : Irreducible (cyclotomic (↑(p ^ (k - s + 1))) K)\nη : L := ζ ^ ↑p ^ s - 1\nηdef : η = ζ ^ ↑p ^ s - 1\nη₁ : { x // x ∈ K⟮η⟯ } := IntermediateField.AdjoinSimple.gen K η\nhη : IsPrimitiveRoot (η + 1) (↑p ^ (k + 1 - s))\nthis : IsCyclotomicExtension {p ^ (k - s + 1)} K { x // x ∈ K⟮η + 1⟯.toSubalgebra }\n⊢ K⟮η + 1⟯.toSubalgebra = K⟮η⟯.toSubalgebra\n[PROOFSTEP]\nsimp only [IntermediateField.adjoin_simple_toSubalgebra_of_integral\n    (IsCyclotomicExtension.integral {p ^ (k + 1)} K L _)]\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\nk s : ℕ\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhpri : Fact (Nat.Prime ↑p)\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhs : s ≤ k\nhtwo : p ^ (k - s + 1) ≠ 2\nhirr₁ : Irreducible (cyclotomic (↑(p ^ (k - s + 1))) K)\nη : L := ζ ^ ↑p ^ s - 1\nηdef : η = ζ ^ ↑p ^ s - 1\nη₁ : { x // x ∈ K⟮η⟯ } := IntermediateField.AdjoinSimple.gen K η\nhη : IsPrimitiveRoot (η + 1) (↑p ^ (k + 1 - s))\nthis : IsCyclotomicExtension {p ^ (k - s + 1)} K { x // x ∈ K⟮η + 1⟯.toSubalgebra }\n⊢ adjoin K {ζ ^ ↑p ^ s - 1 + 1} = adjoin K {ζ ^ ↑p ^ s - 1}\n[PROOFSTEP]\nrefine' Subalgebra.ext fun x => ⟨fun hx => adjoin_le _ hx, fun hx => adjoin_le _ hx⟩\n[GOAL]\ncase refine'_1\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\nk s : ℕ\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhpri : Fact (Nat.Prime ↑p)\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhs : s ≤ k\nhtwo : p ^ (k - s + 1) ≠ 2\nhirr₁ : Irreducible (cyclotomic (↑(p ^ (k - s + 1))) K)\nη : L := ζ ^ ↑p ^ s - 1\nηdef : η = ζ ^ ↑p ^ s - 1\nη₁ : { x // x ∈ K⟮η⟯ } := IntermediateField.AdjoinSimple.gen K η\nhη : IsPrimitiveRoot (η + 1) (↑p ^ (k + 1 - s))\nthis : IsCyclotomicExtension {p ^ (k - s + 1)} K { x // x ∈ K⟮η + 1⟯.toSubalgebra }\nx : L\nhx : x ∈ adjoin K {ζ ^ ↑p ^ s - 1 + 1}\n⊢ {ζ ^ ↑p ^ s - 1 + 1} ⊆ ↑(adjoin K {ζ ^ ↑p ^ s - 1})\n[PROOFSTEP]\nsimp only [Set.singleton_subset_iff, SetLike.mem_coe]\n[GOAL]\ncase refine'_1\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\nk s : ℕ\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhpri : Fact (Nat.Prime ↑p)\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhs : s ≤ k\nhtwo : p ^ (k - s + 1) ≠ 2\nhirr₁ : Irreducible (cyclotomic (↑(p ^ (k - s + 1))) K)\nη : L := ζ ^ ↑p ^ s - 1\nηdef : η = ζ ^ ↑p ^ s - 1\nη₁ : { x // x ∈ K⟮η⟯ } := IntermediateField.AdjoinSimple.gen K η\nhη : IsPrimitiveRoot (η + 1) (↑p ^ (k + 1 - s))\nthis : IsCyclotomicExtension {p ^ (k - s + 1)} K { x // x ∈ K⟮η + 1⟯.toSubalgebra }\nx : L\nhx : x ∈ adjoin K {ζ ^ ↑p ^ s - 1 + 1}\n⊢ ζ ^ ↑p ^ s - 1 + 1 ∈ adjoin K {ζ ^ ↑p ^ s - 1}\n[PROOFSTEP]\nexact\n  Subalgebra.add_mem _ (subset_adjoin (mem_singleton η))\n    (Subalgebra.one_mem _)\n      -- Porting note `ηdef` was not needed.\n[GOAL]\ncase refine'_2\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\nk s : ℕ\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhpri : Fact (Nat.Prime ↑p)\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhs : s ≤ k\nhtwo : p ^ (k - s + 1) ≠ 2\nhirr₁ : Irreducible (cyclotomic (↑(p ^ (k - s + 1))) K)\nη : L := ζ ^ ↑p ^ s - 1\nηdef : η = ζ ^ ↑p ^ s - 1\nη₁ : { x // x ∈ K⟮η⟯ } := IntermediateField.AdjoinSimple.gen K η\nhη : IsPrimitiveRoot (η + 1) (↑p ^ (k + 1 - s))\nthis : IsCyclotomicExtension {p ^ (k - s + 1)} K { x // x ∈ K⟮η + 1⟯.toSubalgebra }\nx : L\nhx : x ∈ adjoin K {ζ ^ ↑p ^ s - 1}\n⊢ {ζ ^ ↑p ^ s - 1} ⊆ ↑(adjoin K {ζ ^ ↑p ^ s - 1 + 1})\n[PROOFSTEP]\nsimp only [Set.singleton_subset_iff, SetLike.mem_coe, ← ηdef]\n[GOAL]\ncase refine'_2\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\nk s : ℕ\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhpri : Fact (Nat.Prime ↑p)\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhs : s ≤ k\nhtwo : p ^ (k - s + 1) ≠ 2\nhirr₁ : Irreducible (cyclotomic (↑(p ^ (k - s + 1))) K)\nη : L := ζ ^ ↑p ^ s - 1\nηdef : η = ζ ^ ↑p ^ s - 1\nη₁ : { x // x ∈ K⟮η⟯ } := IntermediateField.AdjoinSimple.gen K η\nhη : IsPrimitiveRoot (η + 1) (↑p ^ (k + 1 - s))\nthis : IsCyclotomicExtension {p ^ (k - s + 1)} K { x // x ∈ K⟮η + 1⟯.toSubalgebra }\nx : L\nhx : x ∈ adjoin K {ζ ^ ↑p ^ s - 1}\n⊢ η ∈ adjoin K {η + 1}\n[PROOFSTEP]\nnth_rw 1 [← add_sub_cancel η 1]\n[GOAL]\ncase refine'_2\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\nk s : ℕ\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhpri : Fact (Nat.Prime ↑p)\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhs : s ≤ k\nhtwo : p ^ (k - s + 1) ≠ 2\nhirr₁ : Irreducible (cyclotomic (↑(p ^ (k - s + 1))) K)\nη : L := ζ ^ ↑p ^ s - 1\nηdef : η = ζ ^ ↑p ^ s - 1\nη₁ : { x // x ∈ K⟮η⟯ } := IntermediateField.AdjoinSimple.gen K η\nhη : IsPrimitiveRoot (η + 1) (↑p ^ (k + 1 - s))\nthis : IsCyclotomicExtension {p ^ (k - s + 1)} K { x // x ∈ K⟮η + 1⟯.toSubalgebra }\nx : L\nhx : x ∈ adjoin K {ζ ^ ↑p ^ s - 1}\n⊢ η + 1 - 1 ∈ adjoin K {η + 1}\n[PROOFSTEP]\nrefine'\n  Subalgebra.sub_mem _ (subset_adjoin (mem_singleton _))\n    (Subalgebra.one_mem _)\n      -- Porting note: the previous proof was `rw [H] at this; exact this` but it now fails.\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\nk s : ℕ\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhpri : Fact (Nat.Prime ↑p)\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhs : s ≤ k\nhtwo : p ^ (k - s + 1) ≠ 2\nhirr₁ : Irreducible (cyclotomic (↑(p ^ (k - s + 1))) K)\nη : L := ζ ^ ↑p ^ s - 1\nηdef : η = ζ ^ ↑p ^ s - 1\nη₁ : { x // x ∈ K⟮η⟯ } := IntermediateField.AdjoinSimple.gen K η\nhη : IsPrimitiveRoot (η + 1) (↑p ^ (k + 1 - s))\nthis : IsCyclotomicExtension {p ^ (k - s + 1)} K { x // x ∈ K⟮η + 1⟯.toSubalgebra }\nH : K⟮η + 1⟯.toSubalgebra = K⟮η⟯.toSubalgebra\n⊢ IsCyclotomicExtension {p ^ (k - s + 1)} K { x // x ∈ K⟮η⟯ }\n[PROOFSTEP]\nexact\n  IsCyclotomicExtension.equiv _ _ _\n    (Subalgebra.equivOfEq _ _ H)\n      -- Porting note: the next `refine` was `rw [H]`, abusing defeq, and it now fails.\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\nk s : ℕ\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhpri : Fact (Nat.Prime ↑p)\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhs : s ≤ k\nhtwo : p ^ (k - s + 1) ≠ 2\nhirr₁ : Irreducible (cyclotomic (↑(p ^ (k - s + 1))) K)\nη : L := ζ ^ ↑p ^ s - 1\nηdef : η = ζ ^ ↑p ^ s - 1\nη₁ : { x // x ∈ K⟮η⟯ } := IntermediateField.AdjoinSimple.gen K η\nhη : IsPrimitiveRoot (η + 1) (↑p ^ (k + 1 - s))\n⊢ IsCyclotomicExtension {p ^ (k - s + 1)} K { x // x ∈ K⟮η + 1⟯.toSubalgebra }\n[PROOFSTEP]\nhave H :=\n  IntermediateField.adjoin_simple_toSubalgebra_of_integral (IsCyclotomicExtension.integral {p ^ (k + 1)} K L (η + 1))\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\nk s : ℕ\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhpri : Fact (Nat.Prime ↑p)\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhs : s ≤ k\nhtwo : p ^ (k - s + 1) ≠ 2\nhirr₁ : Irreducible (cyclotomic (↑(p ^ (k - s + 1))) K)\nη : L := ζ ^ ↑p ^ s - 1\nηdef : η = ζ ^ ↑p ^ s - 1\nη₁ : { x // x ∈ K⟮η⟯ } := IntermediateField.AdjoinSimple.gen K η\nhη : IsPrimitiveRoot (η + 1) (↑p ^ (k + 1 - s))\nH : K⟮η + 1⟯.toSubalgebra = adjoin K {η + 1}\n⊢ IsCyclotomicExtension {p ^ (k - s + 1)} K { x // x ∈ K⟮η + 1⟯.toSubalgebra }\n[PROOFSTEP]\nrefine @IsCyclotomicExtension.equiv _ _ _ _ _ _ _ _ _ ?_ (Subalgebra.equivOfEq _ _ H).symm\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\nk s : ℕ\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhpri : Fact (Nat.Prime ↑p)\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhs : s ≤ k\nhtwo : p ^ (k - s + 1) ≠ 2\nhirr₁ : Irreducible (cyclotomic (↑(p ^ (k - s + 1))) K)\nη : L := ζ ^ ↑p ^ s - 1\nηdef : η = ζ ^ ↑p ^ s - 1\nη₁ : { x // x ∈ K⟮η⟯ } := IntermediateField.AdjoinSimple.gen K η\nhη : IsPrimitiveRoot (η + 1) (↑p ^ (k + 1 - s))\nH : K⟮η + 1⟯.toSubalgebra = adjoin K {η + 1}\n⊢ IsCyclotomicExtension {p ^ (k - s + 1)} K { x // x ∈ adjoin K {η + 1} }\n[PROOFSTEP]\nhave hη' : IsPrimitiveRoot (η + 1) ↑(p ^ (k + 1 - s)) := by simpa using hη\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\nk s : ℕ\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhpri : Fact (Nat.Prime ↑p)\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhs : s ≤ k\nhtwo : p ^ (k - s + 1) ≠ 2\nhirr₁ : Irreducible (cyclotomic (↑(p ^ (k - s + 1))) K)\nη : L := ζ ^ ↑p ^ s - 1\nηdef : η = ζ ^ ↑p ^ s - 1\nη₁ : { x // x ∈ K⟮η⟯ } := IntermediateField.AdjoinSimple.gen K η\nhη : IsPrimitiveRoot (η + 1) (↑p ^ (k + 1 - s))\nH : K⟮η + 1⟯.toSubalgebra = adjoin K {η + 1}\n⊢ IsPrimitiveRoot (η + 1) ↑(p ^ (k + 1 - s))\n[PROOFSTEP]\nsimpa using hη\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\nk s : ℕ\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhpri : Fact (Nat.Prime ↑p)\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhs : s ≤ k\nhtwo : p ^ (k - s + 1) ≠ 2\nhirr₁ : Irreducible (cyclotomic (↑(p ^ (k - s + 1))) K)\nη : L := ζ ^ ↑p ^ s - 1\nηdef : η = ζ ^ ↑p ^ s - 1\nη₁ : { x // x ∈ K⟮η⟯ } := IntermediateField.AdjoinSimple.gen K η\nhη : IsPrimitiveRoot (η + 1) (↑p ^ (k + 1 - s))\nH : K⟮η + 1⟯.toSubalgebra = adjoin K {η + 1}\nhη' : IsPrimitiveRoot (η + 1) ↑(p ^ (k + 1 - s))\n⊢ IsCyclotomicExtension {p ^ (k - s + 1)} K { x // x ∈ adjoin K {η + 1} }\n[PROOFSTEP]\nconvert hη'.adjoin_isCyclotomicExtension K using 1\n[GOAL]\ncase h.e'_1\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\nk s : ℕ\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhpri : Fact (Nat.Prime ↑p)\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhs : s ≤ k\nhtwo : p ^ (k - s + 1) ≠ 2\nhirr₁ : Irreducible (cyclotomic (↑(p ^ (k - s + 1))) K)\nη : L := ζ ^ ↑p ^ s - 1\nηdef : η = ζ ^ ↑p ^ s - 1\nη₁ : { x // x ∈ K⟮η⟯ } := IntermediateField.AdjoinSimple.gen K η\nhη : IsPrimitiveRoot (η + 1) (↑p ^ (k + 1 - s))\nH : K⟮η + 1⟯.toSubalgebra = adjoin K {η + 1}\nhη' : IsPrimitiveRoot (η + 1) ↑(p ^ (k + 1 - s))\n⊢ {p ^ (k - s + 1)} = {p ^ (k + 1 - s)}\n[PROOFSTEP]\nrw [Nat.sub_add_comm hs]\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\nk s : ℕ\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhpri : Fact (Nat.Prime ↑p)\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhs : s ≤ k\nhtwo : p ^ (k - s + 1) ≠ 2\nhirr₁ : Irreducible (cyclotomic (↑(p ^ (k - s + 1))) K)\nη : L := ζ ^ ↑p ^ s - 1\nηdef : η = ζ ^ ↑p ^ s - 1\nη₁ : { x // x ∈ K⟮η⟯ } := IntermediateField.AdjoinSimple.gen K η\nhη : IsPrimitiveRoot (η + 1) (↑p ^ (k + 1 - s))\nthis : IsCyclotomicExtension {p ^ (k - s + 1)} K { x // x ∈ K⟮η⟯ }\n⊢ ↑(Algebra.norm K) η = ↑↑p ^ ↑p ^ s\n[PROOFSTEP]\nreplace hη : IsPrimitiveRoot (η₁ + 1) ↑(p ^ (k - s + 1))\n[GOAL]\ncase hη\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\nk s : ℕ\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhpri : Fact (Nat.Prime ↑p)\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhs : s ≤ k\nhtwo : p ^ (k - s + 1) ≠ 2\nhirr₁ : Irreducible (cyclotomic (↑(p ^ (k - s + 1))) K)\nη : L := ζ ^ ↑p ^ s - 1\nηdef : η = ζ ^ ↑p ^ s - 1\nη₁ : { x // x ∈ K⟮η⟯ } := IntermediateField.AdjoinSimple.gen K η\nhη : IsPrimitiveRoot (η + 1) (↑p ^ (k + 1 - s))\nthis : IsCyclotomicExtension {p ^ (k - s + 1)} K { x // x ∈ K⟮η⟯ }\n⊢ IsPrimitiveRoot (η₁ + 1) ↑(p ^ (k - s + 1))\n[PROOFSTEP]\napply coe_submonoidClass_iff.1\n[GOAL]\ncase hη\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\nk s : ℕ\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhpri : Fact (Nat.Prime ↑p)\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhs : s ≤ k\nhtwo : p ^ (k - s + 1) ≠ 2\nhirr₁ : Irreducible (cyclotomic (↑(p ^ (k - s + 1))) K)\nη : L := ζ ^ ↑p ^ s - 1\nηdef : η = ζ ^ ↑p ^ s - 1\nη₁ : { x // x ∈ K⟮η⟯ } := IntermediateField.AdjoinSimple.gen K η\nhη : IsPrimitiveRoot (η + 1) (↑p ^ (k + 1 - s))\nthis : IsCyclotomicExtension {p ^ (k - s + 1)} K { x // x ∈ K⟮η⟯ }\n⊢ IsPrimitiveRoot ↑(η₁ + 1) ↑(p ^ (k - s + 1))\n[PROOFSTEP]\nconvert hη using 1\n[GOAL]\ncase h.e'_4\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\nk s : ℕ\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhpri : Fact (Nat.Prime ↑p)\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhs : s ≤ k\nhtwo : p ^ (k - s + 1) ≠ 2\nhirr₁ : Irreducible (cyclotomic (↑(p ^ (k - s + 1))) K)\nη : L := ζ ^ ↑p ^ s - 1\nηdef : η = ζ ^ ↑p ^ s - 1\nη₁ : { x // x ∈ K⟮η⟯ } := IntermediateField.AdjoinSimple.gen K η\nhη : IsPrimitiveRoot (η + 1) (↑p ^ (k + 1 - s))\nthis : IsCyclotomicExtension {p ^ (k - s + 1)} K { x // x ∈ K⟮η⟯ }\n⊢ ↑(p ^ (k - s + 1)) = ↑p ^ (k + 1 - s)\n[PROOFSTEP]\nrw [Nat.sub_add_comm hs, pow_coe]\n  -- Porting note: the following `haveI` were not needed because the locale `cyclotomic` set them\n  -- as instances.\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\nk s : ℕ\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhpri : Fact (Nat.Prime ↑p)\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhs : s ≤ k\nhtwo : p ^ (k - s + 1) ≠ 2\nhirr₁ : Irreducible (cyclotomic (↑(p ^ (k - s + 1))) K)\nη : L := ζ ^ ↑p ^ s - 1\nηdef : η = ζ ^ ↑p ^ s - 1\nη₁ : { x // x ∈ K⟮η⟯ } := IntermediateField.AdjoinSimple.gen K η\nthis : IsCyclotomicExtension {p ^ (k - s + 1)} K { x // x ∈ K⟮η⟯ }\nhη : IsPrimitiveRoot (η₁ + 1) ↑(p ^ (k - s + 1))\n⊢ ↑(Algebra.norm K) η = ↑↑p ^ ↑p ^ s\n[PROOFSTEP]\nhaveI := IsCyclotomicExtension.finiteDimensional {p ^ (k + 1)} K L\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\nk s : ℕ\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhpri : Fact (Nat.Prime ↑p)\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhs : s ≤ k\nhtwo : p ^ (k - s + 1) ≠ 2\nhirr₁ : Irreducible (cyclotomic (↑(p ^ (k - s + 1))) K)\nη : L := ζ ^ ↑p ^ s - 1\nηdef : η = ζ ^ ↑p ^ s - 1\nη₁ : { x // x ∈ K⟮η⟯ } := IntermediateField.AdjoinSimple.gen K η\nthis✝ : IsCyclotomicExtension {p ^ (k - s + 1)} K { x // x ∈ K⟮η⟯ }\nhη : IsPrimitiveRoot (η₁ + 1) ↑(p ^ (k - s + 1))\nthis : FiniteDimensional K L\n⊢ ↑(Algebra.norm K) η = ↑↑p ^ ↑p ^ s\n[PROOFSTEP]\nhaveI := IsCyclotomicExtension.isGalois (p ^ (k + 1)) K L\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\nk s : ℕ\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhpri : Fact (Nat.Prime ↑p)\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhs : s ≤ k\nhtwo : p ^ (k - s + 1) ≠ 2\nhirr₁ : Irreducible (cyclotomic (↑(p ^ (k - s + 1))) K)\nη : L := ζ ^ ↑p ^ s - 1\nηdef : η = ζ ^ ↑p ^ s - 1\nη₁ : { x // x ∈ K⟮η⟯ } := IntermediateField.AdjoinSimple.gen K η\nthis✝¹ : IsCyclotomicExtension {p ^ (k - s + 1)} K { x // x ∈ K⟮η⟯ }\nhη : IsPrimitiveRoot (η₁ + 1) ↑(p ^ (k - s + 1))\nthis✝ : FiniteDimensional K L\nthis : IsGalois K L\n⊢ ↑(Algebra.norm K) η = ↑↑p ^ ↑p ^ s\n[PROOFSTEP]\nrw [norm_eq_norm_adjoin K]\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\nk s : ℕ\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhpri : Fact (Nat.Prime ↑p)\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhs : s ≤ k\nhtwo : p ^ (k - s + 1) ≠ 2\nhirr₁ : Irreducible (cyclotomic (↑(p ^ (k - s + 1))) K)\nη : L := ζ ^ ↑p ^ s - 1\nηdef : η = ζ ^ ↑p ^ s - 1\nη₁ : { x // x ∈ K⟮η⟯ } := IntermediateField.AdjoinSimple.gen K η\nthis✝¹ : IsCyclotomicExtension {p ^ (k - s + 1)} K { x // x ∈ K⟮η⟯ }\nhη : IsPrimitiveRoot (η₁ + 1) ↑(p ^ (k - s + 1))\nthis✝ : FiniteDimensional K L\nthis : IsGalois K L\n⊢ ↑(Algebra.norm K) (IntermediateField.AdjoinSimple.gen K η) ^ FiniteDimensional.finrank { x // x ∈ K⟮η⟯ } L =\n    ↑↑p ^ ↑p ^ s\n[PROOFSTEP]\nhave H := hη.sub_one_norm_isPrimePow ?_ hirr₁ htwo\n[GOAL]\ncase refine_2\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\nk s : ℕ\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhpri : Fact (Nat.Prime ↑p)\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhs : s ≤ k\nhtwo : p ^ (k - s + 1) ≠ 2\nhirr₁ : Irreducible (cyclotomic (↑(p ^ (k - s + 1))) K)\nη : L := ζ ^ ↑p ^ s - 1\nηdef : η = ζ ^ ↑p ^ s - 1\nη₁ : { x // x ∈ K⟮η⟯ } := IntermediateField.AdjoinSimple.gen K η\nthis✝¹ : IsCyclotomicExtension {p ^ (k - s + 1)} K { x // x ∈ K⟮η⟯ }\nhη : IsPrimitiveRoot (η₁ + 1) ↑(p ^ (k - s + 1))\nthis✝ : FiniteDimensional K L\nthis : IsGalois K L\nH : ↑(Algebra.norm K) (η₁ + 1 - 1) = ↑(minFac ↑(p ^ (k - s + 1)))\n⊢ ↑(Algebra.norm K) (IntermediateField.AdjoinSimple.gen K η) ^ FiniteDimensional.finrank { x // x ∈ K⟮η⟯ } L =\n    ↑↑p ^ ↑p ^ s\ncase refine_1\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\nk s : ℕ\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhpri : Fact (Nat.Prime ↑p)\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhs : s ≤ k\nhtwo : p ^ (k - s + 1) ≠ 2\nhirr₁ : Irreducible (cyclotomic (↑(p ^ (k - s + 1))) K)\nη : L := ζ ^ ↑p ^ s - 1\nηdef : η = ζ ^ ↑p ^ s - 1\nη₁ : { x // x ∈ K⟮η⟯ } := IntermediateField.AdjoinSimple.gen K η\nthis✝¹ : IsCyclotomicExtension {p ^ (k - s + 1)} K { x // x ∈ K⟮η⟯ }\nhη : IsPrimitiveRoot (η₁ + 1) ↑(p ^ (k - s + 1))\nthis✝ : FiniteDimensional K L\nthis : IsGalois K L\n⊢ IsPrimePow ↑(p ^ (k - s + 1))\n[PROOFSTEP]\nswap\n[GOAL]\ncase refine_1\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\nk s : ℕ\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhpri : Fact (Nat.Prime ↑p)\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhs : s ≤ k\nhtwo : p ^ (k - s + 1) ≠ 2\nhirr₁ : Irreducible (cyclotomic (↑(p ^ (k - s + 1))) K)\nη : L := ζ ^ ↑p ^ s - 1\nηdef : η = ζ ^ ↑p ^ s - 1\nη₁ : { x // x ∈ K⟮η⟯ } := IntermediateField.AdjoinSimple.gen K η\nthis✝¹ : IsCyclotomicExtension {p ^ (k - s + 1)} K { x // x ∈ K⟮η⟯ }\nhη : IsPrimitiveRoot (η₁ + 1) ↑(p ^ (k - s + 1))\nthis✝ : FiniteDimensional K L\nthis : IsGalois K L\n⊢ IsPrimePow ↑(p ^ (k - s + 1))\n[PROOFSTEP]\nrw [PNat.pow_coe]\n[GOAL]\ncase refine_1\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\nk s : ℕ\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhpri : Fact (Nat.Prime ↑p)\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhs : s ≤ k\nhtwo : p ^ (k - s + 1) ≠ 2\nhirr₁ : Irreducible (cyclotomic (↑(p ^ (k - s + 1))) K)\nη : L := ζ ^ ↑p ^ s - 1\nηdef : η = ζ ^ ↑p ^ s - 1\nη₁ : { x // x ∈ K⟮η⟯ } := IntermediateField.AdjoinSimple.gen K η\nthis✝¹ : IsCyclotomicExtension {p ^ (k - s + 1)} K { x // x ∈ K⟮η⟯ }\nhη : IsPrimitiveRoot (η₁ + 1) ↑(p ^ (k - s + 1))\nthis✝ : FiniteDimensional K L\nthis : IsGalois K L\n⊢ IsPrimePow (↑p ^ (k - s + 1))\n[PROOFSTEP]\nexact hpri.1.isPrimePow.pow (Nat.succ_ne_zero _)\n[GOAL]\ncase refine_2\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\nk s : ℕ\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhpri : Fact (Nat.Prime ↑p)\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhs : s ≤ k\nhtwo : p ^ (k - s + 1) ≠ 2\nhirr₁ : Irreducible (cyclotomic (↑(p ^ (k - s + 1))) K)\nη : L := ζ ^ ↑p ^ s - 1\nηdef : η = ζ ^ ↑p ^ s - 1\nη₁ : { x // x ∈ K⟮η⟯ } := IntermediateField.AdjoinSimple.gen K η\nthis✝¹ : IsCyclotomicExtension {p ^ (k - s + 1)} K { x // x ∈ K⟮η⟯ }\nhη : IsPrimitiveRoot (η₁ + 1) ↑(p ^ (k - s + 1))\nthis✝ : FiniteDimensional K L\nthis : IsGalois K L\nH : ↑(Algebra.norm K) (η₁ + 1 - 1) = ↑(minFac ↑(p ^ (k - s + 1)))\n⊢ ↑(Algebra.norm K) (IntermediateField.AdjoinSimple.gen K η) ^ FiniteDimensional.finrank { x // x ∈ K⟮η⟯ } L =\n    ↑↑p ^ ↑p ^ s\n[PROOFSTEP]\nrw [add_sub_cancel] at H \n[GOAL]\ncase refine_2\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\nk s : ℕ\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhpri : Fact (Nat.Prime ↑p)\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhs : s ≤ k\nhtwo : p ^ (k - s + 1) ≠ 2\nhirr₁ : Irreducible (cyclotomic (↑(p ^ (k - s + 1))) K)\nη : L := ζ ^ ↑p ^ s - 1\nηdef : η = ζ ^ ↑p ^ s - 1\nη₁ : { x // x ∈ K⟮η⟯ } := IntermediateField.AdjoinSimple.gen K η\nthis✝¹ : IsCyclotomicExtension {p ^ (k - s + 1)} K { x // x ∈ K⟮η⟯ }\nhη : IsPrimitiveRoot (η₁ + 1) ↑(p ^ (k - s + 1))\nthis✝ : FiniteDimensional K L\nthis : IsGalois K L\nH : ↑(Algebra.norm K) η₁ = ↑(minFac ↑(p ^ (k - s + 1)))\n⊢ ↑(Algebra.norm K) (IntermediateField.AdjoinSimple.gen K η) ^ FiniteDimensional.finrank { x // x ∈ K⟮η⟯ } L =\n    ↑↑p ^ ↑p ^ s\n[PROOFSTEP]\nrw [H]\n[GOAL]\ncase refine_2\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\nk s : ℕ\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhpri : Fact (Nat.Prime ↑p)\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhs : s ≤ k\nhtwo : p ^ (k - s + 1) ≠ 2\nhirr₁ : Irreducible (cyclotomic (↑(p ^ (k - s + 1))) K)\nη : L := ζ ^ ↑p ^ s - 1\nηdef : η = ζ ^ ↑p ^ s - 1\nη₁ : { x // x ∈ K⟮η⟯ } := IntermediateField.AdjoinSimple.gen K η\nthis✝¹ : IsCyclotomicExtension {p ^ (k - s + 1)} K { x // x ∈ K⟮η⟯ }\nhη : IsPrimitiveRoot (η₁ + 1) ↑(p ^ (k - s + 1))\nthis✝ : FiniteDimensional K L\nthis : IsGalois K L\nH : ↑(Algebra.norm K) η₁ = ↑(minFac ↑(p ^ (k - s + 1)))\n⊢ ↑(minFac ↑(p ^ (k - s + 1))) ^ FiniteDimensional.finrank { x // x ∈ K⟮η⟯ } L = ↑↑p ^ ↑p ^ s\n[PROOFSTEP]\ncongr\n[GOAL]\ncase refine_2.e_a.e_a\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\nk s : ℕ\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhpri : Fact (Nat.Prime ↑p)\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhs : s ≤ k\nhtwo : p ^ (k - s + 1) ≠ 2\nhirr₁ : Irreducible (cyclotomic (↑(p ^ (k - s + 1))) K)\nη : L := ζ ^ ↑p ^ s - 1\nηdef : η = ζ ^ ↑p ^ s - 1\nη₁ : { x // x ∈ K⟮η⟯ } := IntermediateField.AdjoinSimple.gen K η\nthis✝¹ : IsCyclotomicExtension {p ^ (k - s + 1)} K { x // x ∈ K⟮η⟯ }\nhη : IsPrimitiveRoot (η₁ + 1) ↑(p ^ (k - s + 1))\nthis✝ : FiniteDimensional K L\nthis : IsGalois K L\nH : ↑(Algebra.norm K) η₁ = ↑(minFac ↑(p ^ (k - s + 1)))\n⊢ minFac ↑(p ^ (k - s + 1)) = ↑p\n[PROOFSTEP]\nrw [PNat.pow_coe, Nat.pow_minFac, hpri.1.minFac_eq]\n[GOAL]\ncase refine_2.e_a.e_a\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\nk s : ℕ\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhpri : Fact (Nat.Prime ↑p)\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhs : s ≤ k\nhtwo : p ^ (k - s + 1) ≠ 2\nhirr₁ : Irreducible (cyclotomic (↑(p ^ (k - s + 1))) K)\nη : L := ζ ^ ↑p ^ s - 1\nηdef : η = ζ ^ ↑p ^ s - 1\nη₁ : { x // x ∈ K⟮η⟯ } := IntermediateField.AdjoinSimple.gen K η\nthis✝¹ : IsCyclotomicExtension {p ^ (k - s + 1)} K { x // x ∈ K⟮η⟯ }\nhη : IsPrimitiveRoot (η₁ + 1) ↑(p ^ (k - s + 1))\nthis✝ : FiniteDimensional K L\nthis : IsGalois K L\nH : ↑(Algebra.norm K) η₁ = ↑(minFac ↑(p ^ (k - s + 1)))\n⊢ k - s + 1 ≠ 0\n[PROOFSTEP]\nexact Nat.succ_ne_zero _\n[GOAL]\ncase refine_2.e_a\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\nk s : ℕ\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhpri : Fact (Nat.Prime ↑p)\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhs : s ≤ k\nhtwo : p ^ (k - s + 1) ≠ 2\nhirr₁ : Irreducible (cyclotomic (↑(p ^ (k - s + 1))) K)\nη : L := ζ ^ ↑p ^ s - 1\nηdef : η = ζ ^ ↑p ^ s - 1\nη₁ : { x // x ∈ K⟮η⟯ } := IntermediateField.AdjoinSimple.gen K η\nthis✝¹ : IsCyclotomicExtension {p ^ (k - s + 1)} K { x // x ∈ K⟮η⟯ }\nhη : IsPrimitiveRoot (η₁ + 1) ↑(p ^ (k - s + 1))\nthis✝ : FiniteDimensional K L\nthis : IsGalois K L\nH : ↑(Algebra.norm K) η₁ = ↑(minFac ↑(p ^ (k - s + 1)))\n⊢ FiniteDimensional.finrank { x // x ∈ K⟮η⟯ } L = ↑p ^ s\n[PROOFSTEP]\nhave := FiniteDimensional.finrank_mul_finrank K K⟮η⟯ L\n[GOAL]\ncase refine_2.e_a\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\nk s : ℕ\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhpri : Fact (Nat.Prime ↑p)\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhs : s ≤ k\nhtwo : p ^ (k - s + 1) ≠ 2\nhirr₁ : Irreducible (cyclotomic (↑(p ^ (k - s + 1))) K)\nη : L := ζ ^ ↑p ^ s - 1\nηdef : η = ζ ^ ↑p ^ s - 1\nη₁ : { x // x ∈ K⟮η⟯ } := IntermediateField.AdjoinSimple.gen K η\nthis✝² : IsCyclotomicExtension {p ^ (k - s + 1)} K { x // x ∈ K⟮η⟯ }\nhη : IsPrimitiveRoot (η₁ + 1) ↑(p ^ (k - s + 1))\nthis✝¹ : FiniteDimensional K L\nthis✝ : IsGalois K L\nH : ↑(Algebra.norm K) η₁ = ↑(minFac ↑(p ^ (k - s + 1)))\nthis :\n  FiniteDimensional.finrank K { x // x ∈ K⟮η⟯ } * FiniteDimensional.finrank { x // x ∈ K⟮η⟯ } L =\n    FiniteDimensional.finrank K L\n⊢ FiniteDimensional.finrank { x // x ∈ K⟮η⟯ } L = ↑p ^ s\n[PROOFSTEP]\nrw [IsCyclotomicExtension.finrank L hirr, IsCyclotomicExtension.finrank K⟮η⟯ hirr₁, PNat.pow_coe, PNat.pow_coe,\n  Nat.totient_prime_pow hpri.out (k - s).succ_pos, Nat.totient_prime_pow hpri.out k.succ_pos, mul_comm _ ((p : ℕ) - 1),\n  mul_assoc, mul_comm ((p : ℕ) ^ (k.succ - 1))] at this \n[GOAL]\ncase refine_2.e_a\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\nk s : ℕ\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhpri : Fact (Nat.Prime ↑p)\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhs : s ≤ k\nhtwo : p ^ (k - s + 1) ≠ 2\nhirr₁ : Irreducible (cyclotomic (↑(p ^ (k - s + 1))) K)\nη : L := ζ ^ ↑p ^ s - 1\nηdef : η = ζ ^ ↑p ^ s - 1\nη₁ : { x // x ∈ K⟮η⟯ } := IntermediateField.AdjoinSimple.gen K η\nthis✝² : IsCyclotomicExtension {p ^ (k - s + 1)} K { x // x ∈ K⟮η⟯ }\nhη : IsPrimitiveRoot (η₁ + 1) ↑(p ^ (k - s + 1))\nthis✝¹ : FiniteDimensional K L\nthis✝ : IsGalois K L\nH : ↑(Algebra.norm K) η₁ = ↑(minFac ↑(p ^ (k - s + 1)))\nthis :\n  (↑p - 1) * (↑p ^ (succ (k - s) - 1) * FiniteDimensional.finrank { x // x ∈ K⟮η⟯ } L) = (↑p - 1) * ↑p ^ (succ k - 1)\n⊢ FiniteDimensional.finrank { x // x ∈ K⟮η⟯ } L = ↑p ^ s\n[PROOFSTEP]\nreplace this := mul_left_cancel₀ (tsub_pos_iff_lt.2 hpri.out.one_lt).ne' this\n[GOAL]\ncase refine_2.e_a\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\nk s : ℕ\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhpri : Fact (Nat.Prime ↑p)\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhs : s ≤ k\nhtwo : p ^ (k - s + 1) ≠ 2\nhirr₁ : Irreducible (cyclotomic (↑(p ^ (k - s + 1))) K)\nη : L := ζ ^ ↑p ^ s - 1\nηdef : η = ζ ^ ↑p ^ s - 1\nη₁ : { x // x ∈ K⟮η⟯ } := IntermediateField.AdjoinSimple.gen K η\nthis✝² : IsCyclotomicExtension {p ^ (k - s + 1)} K { x // x ∈ K⟮η⟯ }\nhη : IsPrimitiveRoot (η₁ + 1) ↑(p ^ (k - s + 1))\nthis✝¹ : FiniteDimensional K L\nthis✝ : IsGalois K L\nH : ↑(Algebra.norm K) η₁ = ↑(minFac ↑(p ^ (k - s + 1)))\nthis : ↑p ^ (succ (k - s) - 1) * FiniteDimensional.finrank { x // x ∈ K⟮η⟯ } L = ↑p ^ (succ k - 1)\n⊢ FiniteDimensional.finrank { x // x ∈ K⟮η⟯ } L = ↑p ^ s\n[PROOFSTEP]\nhave Hex : k.succ - 1 = (k - s).succ - 1 + s :=\n  by\n  simp only [Nat.succ_sub_succ_eq_sub, tsub_zero]\n  exact (Nat.sub_add_cancel hs).symm\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\nk s : ℕ\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhpri : Fact (Nat.Prime ↑p)\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhs : s ≤ k\nhtwo : p ^ (k - s + 1) ≠ 2\nhirr₁ : Irreducible (cyclotomic (↑(p ^ (k - s + 1))) K)\nη : L := ζ ^ ↑p ^ s - 1\nηdef : η = ζ ^ ↑p ^ s - 1\nη₁ : { x // x ∈ K⟮η⟯ } := IntermediateField.AdjoinSimple.gen K η\nthis✝² : IsCyclotomicExtension {p ^ (k - s + 1)} K { x // x ∈ K⟮η⟯ }\nhη : IsPrimitiveRoot (η₁ + 1) ↑(p ^ (k - s + 1))\nthis✝¹ : FiniteDimensional K L\nthis✝ : IsGalois K L\nH : ↑(Algebra.norm K) η₁ = ↑(minFac ↑(p ^ (k - s + 1)))\nthis : ↑p ^ (succ (k - s) - 1) * FiniteDimensional.finrank { x // x ∈ K⟮η⟯ } L = ↑p ^ (succ k - 1)\n⊢ succ k - 1 = succ (k - s) - 1 + s\n[PROOFSTEP]\nsimp only [Nat.succ_sub_succ_eq_sub, tsub_zero]\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\nk s : ℕ\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhpri : Fact (Nat.Prime ↑p)\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhs : s ≤ k\nhtwo : p ^ (k - s + 1) ≠ 2\nhirr₁ : Irreducible (cyclotomic (↑(p ^ (k - s + 1))) K)\nη : L := ζ ^ ↑p ^ s - 1\nηdef : η = ζ ^ ↑p ^ s - 1\nη₁ : { x // x ∈ K⟮η⟯ } := IntermediateField.AdjoinSimple.gen K η\nthis✝² : IsCyclotomicExtension {p ^ (k - s + 1)} K { x // x ∈ K⟮η⟯ }\nhη : IsPrimitiveRoot (η₁ + 1) ↑(p ^ (k - s + 1))\nthis✝¹ : FiniteDimensional K L\nthis✝ : IsGalois K L\nH : ↑(Algebra.norm K) η₁ = ↑(minFac ↑(p ^ (k - s + 1)))\nthis : ↑p ^ (succ (k - s) - 1) * FiniteDimensional.finrank { x // x ∈ K⟮η⟯ } L = ↑p ^ (succ k - 1)\n⊢ k = k - s + s\n[PROOFSTEP]\nexact (Nat.sub_add_cancel hs).symm\n[GOAL]\ncase refine_2.e_a\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\nk s : ℕ\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhpri : Fact (Nat.Prime ↑p)\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhs : s ≤ k\nhtwo : p ^ (k - s + 1) ≠ 2\nhirr₁ : Irreducible (cyclotomic (↑(p ^ (k - s + 1))) K)\nη : L := ζ ^ ↑p ^ s - 1\nηdef : η = ζ ^ ↑p ^ s - 1\nη₁ : { x // x ∈ K⟮η⟯ } := IntermediateField.AdjoinSimple.gen K η\nthis✝² : IsCyclotomicExtension {p ^ (k - s + 1)} K { x // x ∈ K⟮η⟯ }\nhη : IsPrimitiveRoot (η₁ + 1) ↑(p ^ (k - s + 1))\nthis✝¹ : FiniteDimensional K L\nthis✝ : IsGalois K L\nH : ↑(Algebra.norm K) η₁ = ↑(minFac ↑(p ^ (k - s + 1)))\nthis : ↑p ^ (succ (k - s) - 1) * FiniteDimensional.finrank { x // x ∈ K⟮η⟯ } L = ↑p ^ (succ k - 1)\nHex : succ k - 1 = succ (k - s) - 1 + s\n⊢ FiniteDimensional.finrank { x // x ∈ K⟮η⟯ } L = ↑p ^ s\n[PROOFSTEP]\nrw [Hex, pow_add] at this \n[GOAL]\ncase refine_2.e_a\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\nk s : ℕ\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhpri : Fact (Nat.Prime ↑p)\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhs : s ≤ k\nhtwo : p ^ (k - s + 1) ≠ 2\nhirr₁ : Irreducible (cyclotomic (↑(p ^ (k - s + 1))) K)\nη : L := ζ ^ ↑p ^ s - 1\nηdef : η = ζ ^ ↑p ^ s - 1\nη₁ : { x // x ∈ K⟮η⟯ } := IntermediateField.AdjoinSimple.gen K η\nthis✝² : IsCyclotomicExtension {p ^ (k - s + 1)} K { x // x ∈ K⟮η⟯ }\nhη : IsPrimitiveRoot (η₁ + 1) ↑(p ^ (k - s + 1))\nthis✝¹ : FiniteDimensional K L\nthis✝ : IsGalois K L\nH : ↑(Algebra.norm K) η₁ = ↑(minFac ↑(p ^ (k - s + 1)))\nthis : ↑p ^ (succ (k - s) - 1) * FiniteDimensional.finrank { x // x ∈ K⟮η⟯ } L = ↑p ^ (succ (k - s) - 1) * ↑p ^ s\nHex : succ k - 1 = succ (k - s) - 1 + s\n⊢ FiniteDimensional.finrank { x // x ∈ K⟮η⟯ } L = ↑p ^ s\n[PROOFSTEP]\nexact mul_left_cancel₀ (pow_ne_zero _ hpri.out.ne_zero) this\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\nk : ℕ\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhpri : Fact (Nat.Prime ↑p)\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\ns : ℕ\nhs : s ≤ k\nhodd : p ≠ 2\n⊢ ↑(Algebra.norm K) (ζ ^ ↑p ^ s - 1) = ↑↑p ^ ↑p ^ s\n[PROOFSTEP]\nrefine' hζ.pow_sub_one_norm_prime_pow_ne_two hirr hs fun h => _\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\nk : ℕ\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhpri : Fact (Nat.Prime ↑p)\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\ns : ℕ\nhs : s ≤ k\nhodd : p ≠ 2\nh : p ^ (k - s + 1) = 2\n⊢ False\n[PROOFSTEP]\nhave coe_two : ((2 : ℕ+) : ℕ) = 2 := by norm_cast\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\nk : ℕ\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhpri : Fact (Nat.Prime ↑p)\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\ns : ℕ\nhs : s ≤ k\nhodd : p ≠ 2\nh : p ^ (k - s + 1) = 2\n⊢ ↑2 = 2\n[PROOFSTEP]\nnorm_cast\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\nk : ℕ\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhpri : Fact (Nat.Prime ↑p)\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\ns : ℕ\nhs : s ≤ k\nhodd : p ≠ 2\nh : p ^ (k - s + 1) = 2\ncoe_two : ↑2 = 2\n⊢ False\n[PROOFSTEP]\nrw [← PNat.coe_inj, coe_two, PNat.pow_coe, ← pow_one 2] at h \n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\nk : ℕ\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhpri : Fact (Nat.Prime ↑p)\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\ns : ℕ\nhs : s ≤ k\nhodd : p ≠ 2\nh✝ : ↑p ^ (k - s + 1) = 2\nh : ↑p ^ (k - s + 1) = 2 ^ 1\ncoe_two : ↑2 = 2\n⊢ False\n[PROOFSTEP]\nreplace h := eq_of_prime_pow_eq (prime_iff.1 hpri.out) (prime_iff.1 Nat.prime_two) (k - s).succ_pos h\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\nk : ℕ\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhpri : Fact (Nat.Prime ↑p)\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\ns : ℕ\nhs : s ≤ k\nhodd : p ≠ 2\nh✝ : ↑p ^ (k - s + 1) = 2\ncoe_two : ↑2 = 2\nh : ↑p = 2\n⊢ False\n[PROOFSTEP]\nexact hodd (PNat.coe_injective h)\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\nk : ℕ\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhpri : Fact (Nat.Prime ↑p)\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nh : p ≠ 2\n⊢ ↑(Algebra.norm K) (ζ - 1) = ↑↑p\n[PROOFSTEP]\nsimpa using hζ.pow_sub_one_norm_prime_ne_two hirr k.zero_le h\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁶ : CommRing A\ninst✝⁵ : CommRing B\ninst✝⁴ : Algebra A B\ninst✝³ : IsCyclotomicExtension {n} A B\ninst✝² : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝¹ : Field K\ninst✝ : Algebra K L\nhpri : Fact (Nat.Prime ↑p)\nhcyc : IsCyclotomicExtension {p} K L\nhζ : IsPrimitiveRoot ζ ↑p\nhirr : Irreducible (cyclotomic (↑p) K)\nh : p ≠ 2\n⊢ ↑(Algebra.norm K) (ζ - 1) = ↑↑p\n[PROOFSTEP]\nreplace hirr : Irreducible (cyclotomic (↑(p ^ (0 + 1)) : ℕ) K) := by simp [hirr]\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁶ : CommRing A\ninst✝⁵ : CommRing B\ninst✝⁴ : Algebra A B\ninst✝³ : IsCyclotomicExtension {n} A B\ninst✝² : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝¹ : Field K\ninst✝ : Algebra K L\nhpri : Fact (Nat.Prime ↑p)\nhcyc : IsCyclotomicExtension {p} K L\nhζ : IsPrimitiveRoot ζ ↑p\nhirr : Irreducible (cyclotomic (↑p) K)\nh : p ≠ 2\n⊢ Irreducible (cyclotomic (↑(p ^ (0 + 1))) K)\n[PROOFSTEP]\nsimp [hirr]\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁶ : CommRing A\ninst✝⁵ : CommRing B\ninst✝⁴ : Algebra A B\ninst✝³ : IsCyclotomicExtension {n} A B\ninst✝² : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝¹ : Field K\ninst✝ : Algebra K L\nhpri : Fact (Nat.Prime ↑p)\nhcyc : IsCyclotomicExtension {p} K L\nhζ : IsPrimitiveRoot ζ ↑p\nh : p ≠ 2\nhirr : Irreducible (cyclotomic (↑(p ^ (0 + 1))) K)\n⊢ ↑(Algebra.norm K) (ζ - 1) = ↑↑p\n[PROOFSTEP]\nreplace hζ : IsPrimitiveRoot ζ (↑(p ^ (0 + 1)) : ℕ) := by simp [hζ]\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁶ : CommRing A\ninst✝⁵ : CommRing B\ninst✝⁴ : Algebra A B\ninst✝³ : IsCyclotomicExtension {n} A B\ninst✝² : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝¹ : Field K\ninst✝ : Algebra K L\nhpri : Fact (Nat.Prime ↑p)\nhcyc : IsCyclotomicExtension {p} K L\nhζ : IsPrimitiveRoot ζ ↑p\nh : p ≠ 2\nhirr : Irreducible (cyclotomic (↑(p ^ (0 + 1))) K)\n⊢ IsPrimitiveRoot ζ ↑(p ^ (0 + 1))\n[PROOFSTEP]\nsimp [hζ]\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁶ : CommRing A\ninst✝⁵ : CommRing B\ninst✝⁴ : Algebra A B\ninst✝³ : IsCyclotomicExtension {n} A B\ninst✝² : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝¹ : Field K\ninst✝ : Algebra K L\nhpri : Fact (Nat.Prime ↑p)\nhcyc : IsCyclotomicExtension {p} K L\nh : p ≠ 2\nhirr : Irreducible (cyclotomic (↑(p ^ (0 + 1))) K)\nhζ : IsPrimitiveRoot ζ ↑(p ^ (0 + 1))\n⊢ ↑(Algebra.norm K) (ζ - 1) = ↑↑p\n[PROOFSTEP]\nhaveI : IsCyclotomicExtension {p ^ (0 + 1)} K L := by simp [hcyc]\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁶ : CommRing A\ninst✝⁵ : CommRing B\ninst✝⁴ : Algebra A B\ninst✝³ : IsCyclotomicExtension {n} A B\ninst✝² : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝¹ : Field K\ninst✝ : Algebra K L\nhpri : Fact (Nat.Prime ↑p)\nhcyc : IsCyclotomicExtension {p} K L\nh : p ≠ 2\nhirr : Irreducible (cyclotomic (↑(p ^ (0 + 1))) K)\nhζ : IsPrimitiveRoot ζ ↑(p ^ (0 + 1))\n⊢ IsCyclotomicExtension {p ^ (0 + 1)} K L\n[PROOFSTEP]\nsimp [hcyc]\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁶ : CommRing A\ninst✝⁵ : CommRing B\ninst✝⁴ : Algebra A B\ninst✝³ : IsCyclotomicExtension {n} A B\ninst✝² : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝¹ : Field K\ninst✝ : Algebra K L\nhpri : Fact (Nat.Prime ↑p)\nhcyc : IsCyclotomicExtension {p} K L\nh : p ≠ 2\nhirr : Irreducible (cyclotomic (↑(p ^ (0 + 1))) K)\nhζ : IsPrimitiveRoot ζ ↑(p ^ (0 + 1))\nthis : IsCyclotomicExtension {p ^ (0 + 1)} K L\n⊢ ↑(Algebra.norm K) (ζ - 1) = ↑↑p\n[PROOFSTEP]\nsimpa using sub_one_norm_prime_ne_two hζ hirr h\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\nk : ℕ\nhζ : IsPrimitiveRoot ζ (2 ^ (k + 1))\ninst✝ : IsCyclotomicExtension {2 ^ (k + 1)} K L\nhirr : Irreducible (cyclotomic (2 ^ (k + 1)) K)\n⊢ ↑(Algebra.norm K) (ζ ^ 2 ^ k - 1) = (-2) ^ 2 ^ k\n[PROOFSTEP]\nhave := hζ.pow_of_dvd (fun h => two_ne_zero (pow_eq_zero h)) (pow_dvd_pow 2 (le_succ k))\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\nk : ℕ\nhζ : IsPrimitiveRoot ζ (2 ^ (k + 1))\ninst✝ : IsCyclotomicExtension {2 ^ (k + 1)} K L\nhirr : Irreducible (cyclotomic (2 ^ (k + 1)) K)\nthis : IsPrimitiveRoot (ζ ^ 2 ^ k) (2 ^ (k + 1) / 2 ^ k)\n⊢ ↑(Algebra.norm K) (ζ ^ 2 ^ k - 1) = (-2) ^ 2 ^ k\n[PROOFSTEP]\nrw [Nat.pow_div (le_succ k) zero_lt_two, Nat.succ_sub (le_refl k), Nat.sub_self, pow_one] at this \n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\nk : ℕ\nhζ : IsPrimitiveRoot ζ (2 ^ (k + 1))\ninst✝ : IsCyclotomicExtension {2 ^ (k + 1)} K L\nhirr : Irreducible (cyclotomic (2 ^ (k + 1)) K)\nthis : IsPrimitiveRoot (ζ ^ 2 ^ k) 2\n⊢ ↑(Algebra.norm K) (ζ ^ 2 ^ k - 1) = (-2) ^ 2 ^ k\n[PROOFSTEP]\nhave H : (-1 : L) - (1 : L) = algebraMap K L (-2) :=\n  by\n  simp only [map_neg, map_ofNat]\n  ring\n    -- Porting note: `simpa using hirr` was `simp [hirr]`.\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\nk : ℕ\nhζ : IsPrimitiveRoot ζ (2 ^ (k + 1))\ninst✝ : IsCyclotomicExtension {2 ^ (k + 1)} K L\nhirr : Irreducible (cyclotomic (2 ^ (k + 1)) K)\nthis : IsPrimitiveRoot (ζ ^ 2 ^ k) 2\n⊢ -1 - 1 = ↑(algebraMap K L) (-2)\n[PROOFSTEP]\nsimp only [map_neg, map_ofNat]\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\nk : ℕ\nhζ : IsPrimitiveRoot ζ (2 ^ (k + 1))\ninst✝ : IsCyclotomicExtension {2 ^ (k + 1)} K L\nhirr : Irreducible (cyclotomic (2 ^ (k + 1)) K)\nthis : IsPrimitiveRoot (ζ ^ 2 ^ k) 2\n⊢ -1 - 1 = -2\n[PROOFSTEP]\nring\n  -- Porting note: `simpa using hirr` was `simp [hirr]`.\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\nk : ℕ\nhζ : IsPrimitiveRoot ζ (2 ^ (k + 1))\ninst✝ : IsCyclotomicExtension {2 ^ (k + 1)} K L\nhirr : Irreducible (cyclotomic (2 ^ (k + 1)) K)\nthis : IsPrimitiveRoot (ζ ^ 2 ^ k) 2\nH : -1 - 1 = ↑(algebraMap K L) (-2)\n⊢ ↑(Algebra.norm K) (ζ ^ 2 ^ k - 1) = (-2) ^ 2 ^ k\n[PROOFSTEP]\nreplace hirr : Irreducible (cyclotomic ((2 : ℕ+) ^ (k + 1) : ℕ+) K) := by simpa using hirr\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\nk : ℕ\nhζ : IsPrimitiveRoot ζ (2 ^ (k + 1))\ninst✝ : IsCyclotomicExtension {2 ^ (k + 1)} K L\nhirr : Irreducible (cyclotomic (2 ^ (k + 1)) K)\nthis : IsPrimitiveRoot (ζ ^ 2 ^ k) 2\nH : -1 - 1 = ↑(algebraMap K L) (-2)\n⊢ Irreducible (cyclotomic (↑(2 ^ (k + 1))) K)\n[PROOFSTEP]\nsimpa using hirr\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\nk : ℕ\nhζ : IsPrimitiveRoot ζ (2 ^ (k + 1))\ninst✝ : IsCyclotomicExtension {2 ^ (k + 1)} K L\nthis : IsPrimitiveRoot (ζ ^ 2 ^ k) 2\nH : -1 - 1 = ↑(algebraMap K L) (-2)\nhirr : Irreducible (cyclotomic (↑(2 ^ (k + 1))) K)\n⊢ ↑(Algebra.norm K) (ζ ^ 2 ^ k - 1) = (-2) ^ 2 ^ k\n[PROOFSTEP]\nrw [this.eq_neg_one_of_two_right, H, Algebra.norm_algebraMap, IsCyclotomicExtension.finrank L hirr, pow_coe,\n  show ((2 : ℕ+) : ℕ) = 2 from rfl, totient_prime_pow Nat.prime_two (zero_lt_succ k), succ_sub_succ_eq_sub, tsub_zero]\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁷ : CommRing A\ninst✝⁶ : CommRing B\ninst✝⁵ : Algebra A B\ninst✝⁴ : IsCyclotomicExtension {n} A B\ninst✝³ : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝² : Field K\ninst✝¹ : Algebra K L\nk : ℕ\nhζ : IsPrimitiveRoot ζ (2 ^ (k + 1))\ninst✝ : IsCyclotomicExtension {2 ^ (k + 1)} K L\nthis : IsPrimitiveRoot (ζ ^ 2 ^ k) 2\nH : -1 - 1 = ↑(algebraMap K L) (-2)\nhirr : Irreducible (cyclotomic (↑(2 ^ (k + 1))) K)\n⊢ (-2) ^ (2 ^ k * (2 - 1)) = (-2) ^ 2 ^ k\n[PROOFSTEP]\nsimp\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁶ : CommRing A\ninst✝⁵ : CommRing B\ninst✝⁴ : Algebra A B\ninst✝³ : IsCyclotomicExtension {n} A B\ninst✝² : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝¹ : Field K\ninst✝ : Algebra K L\nk : ℕ\nhζ : IsPrimitiveRoot ζ (2 ^ k)\nhk : 2 ≤ k\nH : IsCyclotomicExtension {2 ^ k} K L\nhirr : Irreducible (cyclotomic (2 ^ k) K)\n⊢ ↑(Algebra.norm K) (ζ - 1) = 2\n[PROOFSTEP]\nhave : 2 < (2 : ℕ+) ^ k := by\n  simp only [← coe_lt_coe, one_coe, pow_coe]\n  nth_rw 1 [← pow_one 2]\n  exact\n    pow_lt_pow one_lt_two\n      (lt_of_lt_of_le one_lt_two hk)\n        -- Porting note: `simpa using hirr` was `simp [hirr]`_\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁶ : CommRing A\ninst✝⁵ : CommRing B\ninst✝⁴ : Algebra A B\ninst✝³ : IsCyclotomicExtension {n} A B\ninst✝² : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝¹ : Field K\ninst✝ : Algebra K L\nk : ℕ\nhζ : IsPrimitiveRoot ζ (2 ^ k)\nhk : 2 ≤ k\nH : IsCyclotomicExtension {2 ^ k} K L\nhirr : Irreducible (cyclotomic (2 ^ k) K)\n⊢ 2 < 2 ^ k\n[PROOFSTEP]\nsimp only [← coe_lt_coe, one_coe, pow_coe]\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁶ : CommRing A\ninst✝⁵ : CommRing B\ninst✝⁴ : Algebra A B\ninst✝³ : IsCyclotomicExtension {n} A B\ninst✝² : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝¹ : Field K\ninst✝ : Algebra K L\nk : ℕ\nhζ : IsPrimitiveRoot ζ (2 ^ k)\nhk : 2 ≤ k\nH : IsCyclotomicExtension {2 ^ k} K L\nhirr : Irreducible (cyclotomic (2 ^ k) K)\n⊢ ↑2 < ↑2 ^ k\n[PROOFSTEP]\nnth_rw 1 [← pow_one 2]\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁶ : CommRing A\ninst✝⁵ : CommRing B\ninst✝⁴ : Algebra A B\ninst✝³ : IsCyclotomicExtension {n} A B\ninst✝² : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝¹ : Field K\ninst✝ : Algebra K L\nk : ℕ\nhζ : IsPrimitiveRoot ζ (2 ^ k)\nhk : 2 ≤ k\nH : IsCyclotomicExtension {2 ^ k} K L\nhirr : Irreducible (cyclotomic (2 ^ k) K)\n⊢ ↑(2 ^ 1) < ↑2 ^ k\n[PROOFSTEP]\nexact\n  pow_lt_pow one_lt_two\n    (lt_of_lt_of_le one_lt_two hk)\n      -- Porting note: `simpa using hirr` was `simp [hirr]`_\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁶ : CommRing A\ninst✝⁵ : CommRing B\ninst✝⁴ : Algebra A B\ninst✝³ : IsCyclotomicExtension {n} A B\ninst✝² : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝¹ : Field K\ninst✝ : Algebra K L\nk : ℕ\nhζ : IsPrimitiveRoot ζ (2 ^ k)\nhk : 2 ≤ k\nH : IsCyclotomicExtension {2 ^ k} K L\nhirr : Irreducible (cyclotomic (2 ^ k) K)\nthis : 2 < 2 ^ k\n⊢ ↑(Algebra.norm K) (ζ - 1) = 2\n[PROOFSTEP]\nreplace hirr : Irreducible (cyclotomic ((2 : ℕ+) ^ k : ℕ+) K) := by simpa using hirr\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁶ : CommRing A\ninst✝⁵ : CommRing B\ninst✝⁴ : Algebra A B\ninst✝³ : IsCyclotomicExtension {n} A B\ninst✝² : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝¹ : Field K\ninst✝ : Algebra K L\nk : ℕ\nhζ : IsPrimitiveRoot ζ (2 ^ k)\nhk : 2 ≤ k\nH : IsCyclotomicExtension {2 ^ k} K L\nhirr : Irreducible (cyclotomic (2 ^ k) K)\nthis : 2 < 2 ^ k\n⊢ Irreducible (cyclotomic (↑(2 ^ k)) K)\n[PROOFSTEP]\nsimpa using hirr\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁶ : CommRing A\ninst✝⁵ : CommRing B\ninst✝⁴ : Algebra A B\ninst✝³ : IsCyclotomicExtension {n} A B\ninst✝² : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝¹ : Field K\ninst✝ : Algebra K L\nk : ℕ\nhζ : IsPrimitiveRoot ζ (2 ^ k)\nhk : 2 ≤ k\nH : IsCyclotomicExtension {2 ^ k} K L\nthis : 2 < 2 ^ k\nhirr : Irreducible (cyclotomic (↑(2 ^ k)) K)\n⊢ ↑(Algebra.norm K) (ζ - 1) = 2\n[PROOFSTEP]\nreplace hζ : IsPrimitiveRoot ζ ((2 : ℕ+) ^ k) := by simpa using hζ\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁶ : CommRing A\ninst✝⁵ : CommRing B\ninst✝⁴ : Algebra A B\ninst✝³ : IsCyclotomicExtension {n} A B\ninst✝² : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝¹ : Field K\ninst✝ : Algebra K L\nk : ℕ\nhζ : IsPrimitiveRoot ζ (2 ^ k)\nhk : 2 ≤ k\nH : IsCyclotomicExtension {2 ^ k} K L\nthis : 2 < 2 ^ k\nhirr : Irreducible (cyclotomic (↑(2 ^ k)) K)\n⊢ IsPrimitiveRoot ζ ↑(2 ^ k)\n[PROOFSTEP]\nsimpa using hζ\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁶ : CommRing A\ninst✝⁵ : CommRing B\ninst✝⁴ : Algebra A B\ninst✝³ : IsCyclotomicExtension {n} A B\ninst✝² : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝¹ : Field K\ninst✝ : Algebra K L\nk : ℕ\nhk : 2 ≤ k\nH : IsCyclotomicExtension {2 ^ k} K L\nthis : 2 < 2 ^ k\nhirr : Irreducible (cyclotomic (↑(2 ^ k)) K)\nhζ : IsPrimitiveRoot ζ ↑(2 ^ k)\n⊢ ↑(Algebra.norm K) (ζ - 1) = 2\n[PROOFSTEP]\nobtain ⟨k₁, hk₁⟩ := exists_eq_succ_of_ne_zero (lt_of_lt_of_le zero_lt_two hk).ne.symm\n[GOAL]\ncase intro\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁶ : CommRing A\ninst✝⁵ : CommRing B\ninst✝⁴ : Algebra A B\ninst✝³ : IsCyclotomicExtension {n} A B\ninst✝² : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝¹ : Field K\ninst✝ : Algebra K L\nk : ℕ\nhk : 2 ≤ k\nH : IsCyclotomicExtension {2 ^ k} K L\nthis : 2 < 2 ^ k\nhirr : Irreducible (cyclotomic (↑(2 ^ k)) K)\nhζ : IsPrimitiveRoot ζ ↑(2 ^ k)\nk₁ : ℕ\nhk₁ : k = succ k₁\n⊢ ↑(Algebra.norm K) (ζ - 1) = 2\n[PROOFSTEP]\nsimpa [hk₁, show ((2 : ℕ+) : ℕ) = 2 from rfl] using sub_one_norm_eq_eval_cyclotomic hζ this hirr\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁶ : CommRing A\ninst✝⁵ : CommRing B\ninst✝⁴ : Algebra A B\ninst✝³ : IsCyclotomicExtension {n} A B\ninst✝² : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝¹ : Field K\ninst✝ : Algebra K L\nk s : ℕ\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhpri : Fact (Nat.Prime ↑p)\nhcycl : IsCyclotomicExtension {p ^ (k + 1)} K L\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhs : s ≤ k\nhk : k ≠ 0\n⊢ ↑(Algebra.norm K) (ζ ^ ↑p ^ s - 1) = ↑↑p ^ ↑p ^ s\n[PROOFSTEP]\nby_cases htwo : p ^ (k - s + 1) = 2\n[GOAL]\ncase pos\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁶ : CommRing A\ninst✝⁵ : CommRing B\ninst✝⁴ : Algebra A B\ninst✝³ : IsCyclotomicExtension {n} A B\ninst✝² : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝¹ : Field K\ninst✝ : Algebra K L\nk s : ℕ\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhpri : Fact (Nat.Prime ↑p)\nhcycl : IsCyclotomicExtension {p ^ (k + 1)} K L\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhs : s ≤ k\nhk : k ≠ 0\nhtwo : p ^ (k - s + 1) = 2\n⊢ ↑(Algebra.norm K) (ζ ^ ↑p ^ s - 1) = ↑↑p ^ ↑p ^ s\n[PROOFSTEP]\nhave hp : p = 2 := by\n  rw [← PNat.coe_inj, PNat.pow_coe, ← pow_one 2] at htwo \n  replace htwo := eq_of_prime_pow_eq (prime_iff.1 hpri.out) (prime_iff.1 Nat.prime_two) (succ_pos _) htwo\n  rwa [show 2 = ((2 : ℕ+) : ℕ) by simp, PNat.coe_inj] at htwo \n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁶ : CommRing A\ninst✝⁵ : CommRing B\ninst✝⁴ : Algebra A B\ninst✝³ : IsCyclotomicExtension {n} A B\ninst✝² : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝¹ : Field K\ninst✝ : Algebra K L\nk s : ℕ\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhpri : Fact (Nat.Prime ↑p)\nhcycl : IsCyclotomicExtension {p ^ (k + 1)} K L\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhs : s ≤ k\nhk : k ≠ 0\nhtwo : p ^ (k - s + 1) = 2\n⊢ p = 2\n[PROOFSTEP]\nrw [← PNat.coe_inj, PNat.pow_coe, ← pow_one 2] at htwo \n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁶ : CommRing A\ninst✝⁵ : CommRing B\ninst✝⁴ : Algebra A B\ninst✝³ : IsCyclotomicExtension {n} A B\ninst✝² : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝¹ : Field K\ninst✝ : Algebra K L\nk s : ℕ\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhpri : Fact (Nat.Prime ↑p)\nhcycl : IsCyclotomicExtension {p ^ (k + 1)} K L\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhs : s ≤ k\nhk : k ≠ 0\nhtwo✝ : ↑p ^ (k - s + 1) = ↑2\nhtwo : ↑p ^ (k - s + 1) = ↑(2 ^ 1)\n⊢ p = 2\n[PROOFSTEP]\nreplace htwo := eq_of_prime_pow_eq (prime_iff.1 hpri.out) (prime_iff.1 Nat.prime_two) (succ_pos _) htwo\n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁶ : CommRing A\ninst✝⁵ : CommRing B\ninst✝⁴ : Algebra A B\ninst✝³ : IsCyclotomicExtension {n} A B\ninst✝² : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝¹ : Field K\ninst✝ : Algebra K L\nk s : ℕ\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhpri : Fact (Nat.Prime ↑p)\nhcycl : IsCyclotomicExtension {p ^ (k + 1)} K L\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhs : s ≤ k\nhk : k ≠ 0\nhtwo✝ : ↑p ^ (k - s + 1) = ↑2\nhtwo : ↑p = 2\n⊢ p = 2\n[PROOFSTEP]\nrwa [show 2 = ((2 : ℕ+) : ℕ) by simp, PNat.coe_inj] at htwo \n[GOAL]\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁶ : CommRing A\ninst✝⁵ : CommRing B\ninst✝⁴ : Algebra A B\ninst✝³ : IsCyclotomicExtension {n} A B\ninst✝² : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝¹ : Field K\ninst✝ : Algebra K L\nk s : ℕ\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhpri : Fact (Nat.Prime ↑p)\nhcycl : IsCyclotomicExtension {p ^ (k + 1)} K L\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhs : s ≤ k\nhk : k ≠ 0\nhtwo✝ : ↑p ^ (k - s + 1) = ↑2\nhtwo : ↑p = 2\n⊢ 2 = ↑2\n[PROOFSTEP]\nsimp\n[GOAL]\ncase pos\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁶ : CommRing A\ninst✝⁵ : CommRing B\ninst✝⁴ : Algebra A B\ninst✝³ : IsCyclotomicExtension {n} A B\ninst✝² : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝¹ : Field K\ninst✝ : Algebra K L\nk s : ℕ\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhpri : Fact (Nat.Prime ↑p)\nhcycl : IsCyclotomicExtension {p ^ (k + 1)} K L\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhs : s ≤ k\nhk : k ≠ 0\nhtwo : p ^ (k - s + 1) = 2\nhp : p = 2\n⊢ ↑(Algebra.norm K) (ζ ^ ↑p ^ s - 1) = ↑↑p ^ ↑p ^ s\n[PROOFSTEP]\nreplace hs : s = k\n[GOAL]\ncase hs\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁶ : CommRing A\ninst✝⁵ : CommRing B\ninst✝⁴ : Algebra A B\ninst✝³ : IsCyclotomicExtension {n} A B\ninst✝² : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝¹ : Field K\ninst✝ : Algebra K L\nk s : ℕ\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhpri : Fact (Nat.Prime ↑p)\nhcycl : IsCyclotomicExtension {p ^ (k + 1)} K L\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhs : s ≤ k\nhk : k ≠ 0\nhtwo : p ^ (k - s + 1) = 2\nhp : p = 2\n⊢ s = k\n[PROOFSTEP]\nrw [hp, ← PNat.coe_inj, PNat.pow_coe] at htwo \n[GOAL]\ncase hs\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁶ : CommRing A\ninst✝⁵ : CommRing B\ninst✝⁴ : Algebra A B\ninst✝³ : IsCyclotomicExtension {n} A B\ninst✝² : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝¹ : Field K\ninst✝ : Algebra K L\nk s : ℕ\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhpri : Fact (Nat.Prime ↑p)\nhcycl : IsCyclotomicExtension {p ^ (k + 1)} K L\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhs : s ≤ k\nhk : k ≠ 0\nhtwo : ↑2 ^ (k - s + 1) = ↑2\nhp : p = 2\n⊢ s = k\n[PROOFSTEP]\nnth_rw 2 [← pow_one 2] at htwo \n[GOAL]\ncase hs\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁶ : CommRing A\ninst✝⁵ : CommRing B\ninst✝⁴ : Algebra A B\ninst✝³ : IsCyclotomicExtension {n} A B\ninst✝² : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝¹ : Field K\ninst✝ : Algebra K L\nk s : ℕ\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhpri : Fact (Nat.Prime ↑p)\nhcycl : IsCyclotomicExtension {p ^ (k + 1)} K L\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhs : s ≤ k\nhk : k ≠ 0\nhtwo✝ : ↑2 ^ (k - s + 1) = ↑2\nhtwo : ↑2 ^ (k - s + 1) = ↑(2 ^ 1)\nhp : p = 2\n⊢ s = k\n[PROOFSTEP]\nreplace htwo := Nat.pow_right_injective rfl.le htwo\n[GOAL]\ncase hs\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁶ : CommRing A\ninst✝⁵ : CommRing B\ninst✝⁴ : Algebra A B\ninst✝³ : IsCyclotomicExtension {n} A B\ninst✝² : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝¹ : Field K\ninst✝ : Algebra K L\nk s : ℕ\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhpri : Fact (Nat.Prime ↑p)\nhcycl : IsCyclotomicExtension {p ^ (k + 1)} K L\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhs : s ≤ k\nhk : k ≠ 0\nhtwo✝ : ↑2 ^ (k - s + 1) = ↑2\nhp : p = 2\nhtwo : k - s + 1 = 1\n⊢ s = k\n[PROOFSTEP]\nrw [add_left_eq_self, Nat.sub_eq_zero_iff_le] at htwo \n[GOAL]\ncase hs\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁶ : CommRing A\ninst✝⁵ : CommRing B\ninst✝⁴ : Algebra A B\ninst✝³ : IsCyclotomicExtension {n} A B\ninst✝² : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝¹ : Field K\ninst✝ : Algebra K L\nk s : ℕ\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhpri : Fact (Nat.Prime ↑p)\nhcycl : IsCyclotomicExtension {p ^ (k + 1)} K L\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhs : s ≤ k\nhk : k ≠ 0\nhtwo✝ : ↑2 ^ (k - s + 1) = ↑2\nhp : p = 2\nhtwo : k ≤ s\n⊢ s = k\n[PROOFSTEP]\nrefine' le_antisymm hs htwo\n[GOAL]\ncase pos\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁶ : CommRing A\ninst✝⁵ : CommRing B\ninst✝⁴ : Algebra A B\ninst✝³ : IsCyclotomicExtension {n} A B\ninst✝² : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝¹ : Field K\ninst✝ : Algebra K L\nk s : ℕ\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhpri : Fact (Nat.Prime ↑p)\nhcycl : IsCyclotomicExtension {p ^ (k + 1)} K L\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhk : k ≠ 0\nhtwo : p ^ (k - s + 1) = 2\nhp : p = 2\nhs : s = k\n⊢ ↑(Algebra.norm K) (ζ ^ ↑p ^ s - 1) = ↑↑p ^ ↑p ^ s\n[PROOFSTEP]\nsimp only [hs, hp, one_coe, cast_one, pow_coe, show ((2 : ℕ+) : ℕ) = 2 from rfl] at hζ hirr hcycl ⊢\n[GOAL]\ncase pos\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁶ : CommRing A\ninst✝⁵ : CommRing B\ninst✝⁴ : Algebra A B\ninst✝³ : IsCyclotomicExtension {n} A B\ninst✝² : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝¹ : Field K\ninst✝ : Algebra K L\nk s : ℕ\nhpri : Fact (Nat.Prime ↑p)\nhk : k ≠ 0\nhtwo : p ^ (k - s + 1) = 2\nhp : p = 2\nhs : s = k\nhζ : IsPrimitiveRoot ζ (2 ^ (k + 1))\nhirr : Irreducible (cyclotomic (2 ^ (k + 1)) K)\nhcycl : IsCyclotomicExtension {2 ^ (k + 1)} K L\n⊢ ↑(Algebra.norm K) (ζ ^ 2 ^ k - 1) = ↑2 ^ 2 ^ k\n[PROOFSTEP]\nobtain ⟨k₁, hk₁⟩ := Nat.exists_eq_succ_of_ne_zero hk\n[GOAL]\ncase pos.intro\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁶ : CommRing A\ninst✝⁵ : CommRing B\ninst✝⁴ : Algebra A B\ninst✝³ : IsCyclotomicExtension {n} A B\ninst✝² : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝¹ : Field K\ninst✝ : Algebra K L\nk s : ℕ\nhpri : Fact (Nat.Prime ↑p)\nhk : k ≠ 0\nhtwo : p ^ (k - s + 1) = 2\nhp : p = 2\nhs : s = k\nhζ : IsPrimitiveRoot ζ (2 ^ (k + 1))\nhirr : Irreducible (cyclotomic (2 ^ (k + 1)) K)\nhcycl : IsCyclotomicExtension {2 ^ (k + 1)} K L\nk₁ : ℕ\nhk₁ : k = succ k₁\n⊢ ↑(Algebra.norm K) (ζ ^ 2 ^ k - 1) = ↑2 ^ 2 ^ k\n[PROOFSTEP]\nrw [hζ.pow_sub_one_norm_two hirr, hk₁, _root_.pow_succ, pow_mul, neg_eq_neg_one_mul, mul_pow, neg_one_sq, one_mul, ←\n  pow_mul, ← _root_.pow_succ]\n[GOAL]\ncase pos.intro\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁶ : CommRing A\ninst✝⁵ : CommRing B\ninst✝⁴ : Algebra A B\ninst✝³ : IsCyclotomicExtension {n} A B\ninst✝² : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝¹ : Field K\ninst✝ : Algebra K L\nk s : ℕ\nhpri : Fact (Nat.Prime ↑p)\nhk : k ≠ 0\nhtwo : p ^ (k - s + 1) = 2\nhp : p = 2\nhs : s = k\nhζ : IsPrimitiveRoot ζ (2 ^ (k + 1))\nhirr : Irreducible (cyclotomic (2 ^ (k + 1)) K)\nhcycl : IsCyclotomicExtension {2 ^ (k + 1)} K L\nk₁ : ℕ\nhk₁ : k = succ k₁\n⊢ 2 ^ 2 ^ (k₁ + 1) = ↑2 ^ 2 ^ (k₁ + 1)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg\np n : ℕ+\nA : Type w\nB : Type z\nK : Type u\nL : Type v\nC : Type w\ninst✝⁶ : CommRing A\ninst✝⁵ : CommRing B\ninst✝⁴ : Algebra A B\ninst✝³ : IsCyclotomicExtension {n} A B\ninst✝² : Field L\nζ : L\nhζ✝ : IsPrimitiveRoot ζ ↑n\ninst✝¹ : Field K\ninst✝ : Algebra K L\nk s : ℕ\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhpri : Fact (Nat.Prime ↑p)\nhcycl : IsCyclotomicExtension {p ^ (k + 1)} K L\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhs : s ≤ k\nhk : k ≠ 0\nhtwo : ¬p ^ (k - s + 1) = 2\n⊢ ↑(Algebra.norm K) (ζ ^ ↑p ^ s - 1) = ↑↑p ^ ↑p ^ s\n[PROOFSTEP]\nexact hζ.pow_sub_one_norm_prime_pow_ne_two hirr hs htwo\n", "meta": {"mathlib_filename": "Mathlib.NumberTheory.Cyclotomic.PrimitiveRoots", "llama_tokens": 62008, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8519528057272544, "lm_q2_score": 0.640635847978761, "lm_q1q2_score": 0.5457915081349644}}
{"text": "[GOAL]\np : ℕ\ninst✝ : Fact (Prime p)\nhp : p % 4 ≠ 3\n⊢ ∃ a b, a ^ 2 + b ^ 2 = p\n[PROOFSTEP]\napply sq_add_sq_of_nat_prime_of_not_irreducible p\n[GOAL]\np : ℕ\ninst✝ : Fact (Prime p)\nhp : p % 4 ≠ 3\n⊢ ¬Irreducible ↑p\n[PROOFSTEP]\nrwa [PrincipalIdealRing.irreducible_iff_prime, prime_iff_mod_four_eq_three_of_nat_prime p]\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\na b x y u v : R\nha : a = x ^ 2 + y ^ 2\nhb : b = u ^ 2 + v ^ 2\n⊢ a * b = (x * u - y * v) ^ 2 + (x * v + y * u) ^ 2\n[PROOFSTEP]\nrw [ha, hb]\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\na b x y u v : R\nha : a = x ^ 2 + y ^ 2\nhb : b = u ^ 2 + v ^ 2\n⊢ (x ^ 2 + y ^ 2) * (u ^ 2 + v ^ 2) = (x * u - y * v) ^ 2 + (x * v + y * u) ^ 2\n[PROOFSTEP]\nring\n[GOAL]\na b x y u v : ℕ\nha : a = x ^ 2 + y ^ 2\nhb : b = u ^ 2 + v ^ 2\n⊢ ∃ r s, a * b = r ^ 2 + s ^ 2\n[PROOFSTEP]\nzify at ha hb ⊢\n[GOAL]\na b x y u v : ℕ\nha : ↑a = ↑x ^ 2 + ↑y ^ 2\nhb : ↑b = ↑u ^ 2 + ↑v ^ 2\n⊢ ∃ r s, ↑a * ↑b = ↑r ^ 2 + ↑s ^ 2\n[PROOFSTEP]\nobtain ⟨r, s, h⟩ := _root_.sq_add_sq_mul ha hb\n[GOAL]\ncase intro.intro\na b x y u v : ℕ\nha : ↑a = ↑x ^ 2 + ↑y ^ 2\nhb : ↑b = ↑u ^ 2 + ↑v ^ 2\nr s : ℤ\nh : ↑a * ↑b = r ^ 2 + s ^ 2\n⊢ ∃ r s, ↑a * ↑b = ↑r ^ 2 + ↑s ^ 2\n[PROOFSTEP]\nrefine' ⟨r.natAbs, s.natAbs, _⟩\n[GOAL]\ncase intro.intro\na b x y u v : ℕ\nha : ↑a = ↑x ^ 2 + ↑y ^ 2\nhb : ↑b = ↑u ^ 2 + ↑v ^ 2\nr s : ℤ\nh : ↑a * ↑b = r ^ 2 + s ^ 2\n⊢ ↑a * ↑b = ↑(Int.natAbs r) ^ 2 + ↑(Int.natAbs s) ^ 2\n[PROOFSTEP]\nsimpa only [Int.coe_natAbs, sq_abs]\n[GOAL]\nm n : ℕ\nhd : m ∣ n\nhs : IsSquare (-1)\n⊢ IsSquare (-1)\n[PROOFSTEP]\nlet f : ZMod n →+* ZMod m := ZMod.castHom hd _\n[GOAL]\nm n : ℕ\nhd : m ∣ n\nhs : IsSquare (-1)\nf : ZMod n →+* ZMod m := castHom hd (ZMod m)\n⊢ IsSquare (-1)\n[PROOFSTEP]\nrw [← RingHom.map_one f, ← RingHom.map_neg]\n[GOAL]\nm n : ℕ\nhd : m ∣ n\nhs : IsSquare (-1)\nf : ZMod n →+* ZMod m := castHom hd (ZMod m)\n⊢ IsSquare (↑f (-1))\n[PROOFSTEP]\nexact hs.map f\n[GOAL]\nm n : ℕ\nhc : Nat.coprime m n\nhm : IsSquare (-1)\nhn : IsSquare (-1)\n⊢ IsSquare (-1)\n[PROOFSTEP]\nhave : IsSquare (-1 : ZMod m × ZMod n) :=\n  by\n  rw [show (-1 : ZMod m × ZMod n) = ((-1 : ZMod m), (-1 : ZMod n)) from rfl]\n  obtain ⟨x, hx⟩ := hm\n  obtain ⟨y, hy⟩ := hn\n  rw [hx, hy]\n  exact ⟨(x, y), rfl⟩\n[GOAL]\nm n : ℕ\nhc : Nat.coprime m n\nhm : IsSquare (-1)\nhn : IsSquare (-1)\n⊢ IsSquare (-1)\n[PROOFSTEP]\nrw [show (-1 : ZMod m × ZMod n) = ((-1 : ZMod m), (-1 : ZMod n)) from rfl]\n[GOAL]\nm n : ℕ\nhc : Nat.coprime m n\nhm : IsSquare (-1)\nhn : IsSquare (-1)\n⊢ IsSquare (-1, -1)\n[PROOFSTEP]\nobtain ⟨x, hx⟩ := hm\n[GOAL]\ncase intro\nm n : ℕ\nhc : Nat.coprime m n\nhn : IsSquare (-1)\nx : ZMod m\nhx : -1 = x * x\n⊢ IsSquare (-1, -1)\n[PROOFSTEP]\nobtain ⟨y, hy⟩ := hn\n[GOAL]\ncase intro.intro\nm n : ℕ\nhc : Nat.coprime m n\nx : ZMod m\nhx : -1 = x * x\ny : ZMod n\nhy : -1 = y * y\n⊢ IsSquare (-1, -1)\n[PROOFSTEP]\nrw [hx, hy]\n[GOAL]\ncase intro.intro\nm n : ℕ\nhc : Nat.coprime m n\nx : ZMod m\nhx : -1 = x * x\ny : ZMod n\nhy : -1 = y * y\n⊢ IsSquare (x * x, y * y)\n[PROOFSTEP]\nexact ⟨(x, y), rfl⟩\n[GOAL]\nm n : ℕ\nhc : Nat.coprime m n\nhm : IsSquare (-1)\nhn : IsSquare (-1)\nthis : IsSquare (-1)\n⊢ IsSquare (-1)\n[PROOFSTEP]\nsimpa only [RingEquiv.map_neg_one] using this.map (ZMod.chineseRemainder hc).symm\n[GOAL]\np n : ℕ\nhpp : Prime p\nhp : p ∣ n\nhs : IsSquare (-1)\n⊢ p % 4 ≠ 3\n[PROOFSTEP]\nobtain ⟨y, h⟩ := ZMod.isSquare_neg_one_of_dvd hp hs\n[GOAL]\ncase intro\np n : ℕ\nhpp : Prime p\nhp : p ∣ n\nhs : IsSquare (-1)\ny : ZMod p\nh : -1 = y * y\n⊢ p % 4 ≠ 3\n[PROOFSTEP]\nrw [← sq, eq_comm, show (-1 : ZMod p) = -1 ^ 2 by ring] at h \n[GOAL]\np n : ℕ\nhpp : Prime p\nhp : p ∣ n\nhs : IsSquare (-1)\ny : ZMod p\nh : y ^ 2 = -1\n⊢ -1 = -1 ^ 2\n[PROOFSTEP]\nring\n[GOAL]\ncase intro\np n : ℕ\nhpp : Prime p\nhp : p ∣ n\nhs : IsSquare (-1)\ny : ZMod p\nh : y ^ 2 = -1 ^ 2\n⊢ p % 4 ≠ 3\n[PROOFSTEP]\nhaveI : Fact p.Prime := ⟨hpp⟩\n[GOAL]\ncase intro\np n : ℕ\nhpp : Prime p\nhp : p ∣ n\nhs : IsSquare (-1)\ny : ZMod p\nh : y ^ 2 = -1 ^ 2\nthis : Fact (Prime p)\n⊢ p % 4 ≠ 3\n[PROOFSTEP]\nexact ZMod.mod_four_ne_three_of_sq_eq_neg_sq' one_ne_zero h\n[GOAL]\nn : ℕ\nhn : Squarefree n\n⊢ IsSquare (-1) ↔ ∀ {q : ℕ}, Nat.Prime q → q ∣ n → q % 4 ≠ 3\n[PROOFSTEP]\nrefine' ⟨fun H q hqp hqd => hqp.mod_four_ne_three_of_dvd_isSquare_neg_one hqd H, fun H => _⟩\n[GOAL]\nn : ℕ\nhn : Squarefree n\nH : ∀ {q : ℕ}, Nat.Prime q → q ∣ n → q % 4 ≠ 3\n⊢ IsSquare (-1)\n[PROOFSTEP]\ninduction' n using induction_on_primes with p n hpp ih\n[GOAL]\ncase h₀\nn : ℕ\nhn✝ : Squarefree n\nH✝ : ∀ {q : ℕ}, Nat.Prime q → q ∣ n → q % 4 ≠ 3\nhn : Squarefree 0\nH : ∀ {q : ℕ}, Nat.Prime q → q ∣ 0 → q % 4 ≠ 3\n⊢ IsSquare (-1)\n[PROOFSTEP]\nexact False.elim (hn.ne_zero rfl)\n[GOAL]\ncase h₁\nn : ℕ\nhn✝ : Squarefree n\nH✝ : ∀ {q : ℕ}, Nat.Prime q → q ∣ n → q % 4 ≠ 3\nhn : Squarefree 1\nH : ∀ {q : ℕ}, Nat.Prime q → q ∣ 1 → q % 4 ≠ 3\n⊢ IsSquare (-1)\n[PROOFSTEP]\nexact ⟨0, by simp only [Fin.zero_mul, neg_eq_zero, Fin.one_eq_zero_iff]⟩\n[GOAL]\nn : ℕ\nhn✝ : Squarefree n\nH✝ : ∀ {q : ℕ}, Nat.Prime q → q ∣ n → q % 4 ≠ 3\nhn : Squarefree 1\nH : ∀ {q : ℕ}, Nat.Prime q → q ∣ 1 → q % 4 ≠ 3\n⊢ -1 = 0 * 0\n[PROOFSTEP]\nsimp only [Fin.zero_mul, neg_eq_zero, Fin.one_eq_zero_iff]\n[GOAL]\ncase h\nn✝ : ℕ\nhn✝ : Squarefree n✝\nH✝ : ∀ {q : ℕ}, Nat.Prime q → q ∣ n✝ → q % 4 ≠ 3\np n : ℕ\nhpp : Nat.Prime p\nih : Squarefree n → (∀ {q : ℕ}, Nat.Prime q → q ∣ n → q % 4 ≠ 3) → IsSquare (-1)\nhn : Squarefree (p * n)\nH : ∀ {q : ℕ}, Nat.Prime q → q ∣ p * n → q % 4 ≠ 3\n⊢ IsSquare (-1)\n[PROOFSTEP]\nhaveI : Fact p.Prime := ⟨hpp⟩\n[GOAL]\ncase h\nn✝ : ℕ\nhn✝ : Squarefree n✝\nH✝ : ∀ {q : ℕ}, Nat.Prime q → q ∣ n✝ → q % 4 ≠ 3\np n : ℕ\nhpp : Nat.Prime p\nih : Squarefree n → (∀ {q : ℕ}, Nat.Prime q → q ∣ n → q % 4 ≠ 3) → IsSquare (-1)\nhn : Squarefree (p * n)\nH : ∀ {q : ℕ}, Nat.Prime q → q ∣ p * n → q % 4 ≠ 3\nthis : Fact (Nat.Prime p)\n⊢ IsSquare (-1)\n[PROOFSTEP]\nhave hcp : p.coprime n := by\n  by_contra hc\n  exact hpp.not_unit (hn p <| mul_dvd_mul_left p <| hpp.dvd_iff_not_coprime.mpr hc)\n[GOAL]\nn✝ : ℕ\nhn✝ : Squarefree n✝\nH✝ : ∀ {q : ℕ}, Nat.Prime q → q ∣ n✝ → q % 4 ≠ 3\np n : ℕ\nhpp : Nat.Prime p\nih : Squarefree n → (∀ {q : ℕ}, Nat.Prime q → q ∣ n → q % 4 ≠ 3) → IsSquare (-1)\nhn : Squarefree (p * n)\nH : ∀ {q : ℕ}, Nat.Prime q → q ∣ p * n → q % 4 ≠ 3\nthis : Fact (Nat.Prime p)\n⊢ Nat.coprime p n\n[PROOFSTEP]\nby_contra hc\n[GOAL]\nn✝ : ℕ\nhn✝ : Squarefree n✝\nH✝ : ∀ {q : ℕ}, Nat.Prime q → q ∣ n✝ → q % 4 ≠ 3\np n : ℕ\nhpp : Nat.Prime p\nih : Squarefree n → (∀ {q : ℕ}, Nat.Prime q → q ∣ n → q % 4 ≠ 3) → IsSquare (-1)\nhn : Squarefree (p * n)\nH : ∀ {q : ℕ}, Nat.Prime q → q ∣ p * n → q % 4 ≠ 3\nthis : Fact (Nat.Prime p)\nhc : ¬Nat.coprime p n\n⊢ False\n[PROOFSTEP]\nexact hpp.not_unit (hn p <| mul_dvd_mul_left p <| hpp.dvd_iff_not_coprime.mpr hc)\n[GOAL]\ncase h\nn✝ : ℕ\nhn✝ : Squarefree n✝\nH✝ : ∀ {q : ℕ}, Nat.Prime q → q ∣ n✝ → q % 4 ≠ 3\np n : ℕ\nhpp : Nat.Prime p\nih : Squarefree n → (∀ {q : ℕ}, Nat.Prime q → q ∣ n → q % 4 ≠ 3) → IsSquare (-1)\nhn : Squarefree (p * n)\nH : ∀ {q : ℕ}, Nat.Prime q → q ∣ p * n → q % 4 ≠ 3\nthis : Fact (Nat.Prime p)\nhcp : Nat.coprime p n\n⊢ IsSquare (-1)\n[PROOFSTEP]\nhave hp₁ := ZMod.exists_sq_eq_neg_one_iff.mpr (H hpp (dvd_mul_right p n))\n[GOAL]\ncase h\nn✝ : ℕ\nhn✝ : Squarefree n✝\nH✝ : ∀ {q : ℕ}, Nat.Prime q → q ∣ n✝ → q % 4 ≠ 3\np n : ℕ\nhpp : Nat.Prime p\nih : Squarefree n → (∀ {q : ℕ}, Nat.Prime q → q ∣ n → q % 4 ≠ 3) → IsSquare (-1)\nhn : Squarefree (p * n)\nH : ∀ {q : ℕ}, Nat.Prime q → q ∣ p * n → q % 4 ≠ 3\nthis : Fact (Nat.Prime p)\nhcp : Nat.coprime p n\nhp₁ : IsSquare (-1)\n⊢ IsSquare (-1)\n[PROOFSTEP]\nexact ZMod.isSquare_neg_one_mul hcp hp₁ (ih hn.of_mul_right fun hqp hqd => H hqp <| dvd_mul_of_dvd_right hqd _)\n[GOAL]\nn : ℕ\nhn : Squarefree n\n⊢ IsSquare (-1) ↔ ∀ {q : ℕ}, q ∣ n → q % 4 ≠ 3\n[PROOFSTEP]\nhave help : ∀ a b : ZMod 4, a ≠ 3 → b ≠ 3 → a * b ≠ 3 := by decide\n[GOAL]\nn : ℕ\nhn : Squarefree n\n⊢ ∀ (a b : ZMod 4), a ≠ 3 → b ≠ 3 → a * b ≠ 3\n[PROOFSTEP]\ndecide\n[GOAL]\nn : ℕ\nhn : Squarefree n\nhelp : ∀ (a b : ZMod 4), a ≠ 3 → b ≠ 3 → a * b ≠ 3\n⊢ IsSquare (-1) ↔ ∀ {q : ℕ}, q ∣ n → q % 4 ≠ 3\n[PROOFSTEP]\nrw [ZMod.isSquare_neg_one_iff hn]\n[GOAL]\nn : ℕ\nhn : Squarefree n\nhelp : ∀ (a b : ZMod 4), a ≠ 3 → b ≠ 3 → a * b ≠ 3\n⊢ (∀ {q : ℕ}, Nat.Prime q → q ∣ n → q % 4 ≠ 3) ↔ ∀ {q : ℕ}, q ∣ n → q % 4 ≠ 3\n[PROOFSTEP]\nrefine' ⟨_, fun H q _ => H⟩\n[GOAL]\nn : ℕ\nhn : Squarefree n\nhelp : ∀ (a b : ZMod 4), a ≠ 3 → b ≠ 3 → a * b ≠ 3\n⊢ (∀ {q : ℕ}, Nat.Prime q → q ∣ n → q % 4 ≠ 3) → ∀ {q : ℕ}, q ∣ n → q % 4 ≠ 3\n[PROOFSTEP]\nintro H\n[GOAL]\nn : ℕ\nhn : Squarefree n\nhelp : ∀ (a b : ZMod 4), a ≠ 3 → b ≠ 3 → a * b ≠ 3\nH : ∀ {q : ℕ}, Nat.Prime q → q ∣ n → q % 4 ≠ 3\n⊢ ∀ {q : ℕ}, q ∣ n → q % 4 ≠ 3\n[PROOFSTEP]\nrefine' @induction_on_primes _ _ _ (fun p q hp hq hpq => _)\n[GOAL]\ncase refine'_1\nn : ℕ\nhn : Squarefree n\nhelp : ∀ (a b : ZMod 4), a ≠ 3 → b ≠ 3 → a * b ≠ 3\nH : ∀ {q : ℕ}, Nat.Prime q → q ∣ n → q % 4 ≠ 3\n⊢ 0 ∣ n → 0 % 4 ≠ 3\n[PROOFSTEP]\nexact fun _ => by norm_num\n[GOAL]\nn : ℕ\nhn : Squarefree n\nhelp : ∀ (a b : ZMod 4), a ≠ 3 → b ≠ 3 → a * b ≠ 3\nH : ∀ {q : ℕ}, Nat.Prime q → q ∣ n → q % 4 ≠ 3\nx✝ : 0 ∣ n\n⊢ 0 % 4 ≠ 3\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase refine'_2\nn : ℕ\nhn : Squarefree n\nhelp : ∀ (a b : ZMod 4), a ≠ 3 → b ≠ 3 → a * b ≠ 3\nH : ∀ {q : ℕ}, Nat.Prime q → q ∣ n → q % 4 ≠ 3\n⊢ 1 ∣ n → 1 % 4 ≠ 3\n[PROOFSTEP]\nexact fun _ => by norm_num\n[GOAL]\nn : ℕ\nhn : Squarefree n\nhelp : ∀ (a b : ZMod 4), a ≠ 3 → b ≠ 3 → a * b ≠ 3\nH : ∀ {q : ℕ}, Nat.Prime q → q ∣ n → q % 4 ≠ 3\nx✝ : 1 ∣ n\n⊢ 1 % 4 ≠ 3\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase refine'_3\nn : ℕ\nhn : Squarefree n\nhelp : ∀ (a b : ZMod 4), a ≠ 3 → b ≠ 3 → a * b ≠ 3\nH : ∀ {q : ℕ}, Nat.Prime q → q ∣ n → q % 4 ≠ 3\np q : ℕ\nhp : Nat.Prime p\nhq : q ∣ n → q % 4 ≠ 3\nhpq : p * q ∣ n\n⊢ p * q % 4 ≠ 3\n[PROOFSTEP]\nreplace hp := H hp (dvd_of_mul_right_dvd hpq)\n[GOAL]\ncase refine'_3\nn : ℕ\nhn : Squarefree n\nhelp : ∀ (a b : ZMod 4), a ≠ 3 → b ≠ 3 → a * b ≠ 3\nH : ∀ {q : ℕ}, Nat.Prime q → q ∣ n → q % 4 ≠ 3\np q : ℕ\nhq : q ∣ n → q % 4 ≠ 3\nhpq : p * q ∣ n\nhp : p % 4 ≠ 3\n⊢ p * q % 4 ≠ 3\n[PROOFSTEP]\nreplace hq := hq (dvd_of_mul_left_dvd hpq)\n[GOAL]\ncase refine'_3\nn : ℕ\nhn : Squarefree n\nhelp : ∀ (a b : ZMod 4), a ≠ 3 → b ≠ 3 → a * b ≠ 3\nH : ∀ {q : ℕ}, Nat.Prime q → q ∣ n → q % 4 ≠ 3\np q : ℕ\nhpq : p * q ∣ n\nhp : p % 4 ≠ 3\nhq : q % 4 ≠ 3\n⊢ p * q % 4 ≠ 3\n[PROOFSTEP]\nrw [show 3 = 3 % 4 by norm_num, Ne.def, ← ZMod.nat_cast_eq_nat_cast_iff'] at hp hq ⊢\n[GOAL]\nn : ℕ\nhn : Squarefree n\nhelp : ∀ (a b : ZMod 4), a ≠ 3 → b ≠ 3 → a * b ≠ 3\nH : ∀ {q : ℕ}, Nat.Prime q → q ∣ n → q % 4 ≠ 3\np q : ℕ\nhpq : p * q ∣ n\nhp : p % 4 ≠ 3\nhq : q % 4 ≠ 3\n⊢ 3 = 3 % 4\n[PROOFSTEP]\nnorm_num\n[GOAL]\nn : ℕ\nhn : Squarefree n\nhelp : ∀ (a b : ZMod 4), a ≠ 3 → b ≠ 3 → a * b ≠ 3\nH : ∀ {q : ℕ}, Nat.Prime q → q ∣ n → q % 4 ≠ 3\np q : ℕ\nhpq : p * q ∣ n\nhp : p % 4 ≠ 3 % 4\nhq : q % 4 ≠ 3\n⊢ 3 = 3 % 4\n[PROOFSTEP]\nnorm_num\n[GOAL]\nn : ℕ\nhn : Squarefree n\nhelp : ∀ (a b : ZMod 4), a ≠ 3 → b ≠ 3 → a * b ≠ 3\nH : ∀ {q : ℕ}, Nat.Prime q → q ∣ n → q % 4 ≠ 3\np q : ℕ\nhpq : p * q ∣ n\nhp : p % 4 ≠ 3 % 4\nhq : q % 4 ≠ 3 % 4\n⊢ 3 = 3 % 4\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase refine'_3\nn : ℕ\nhn : Squarefree n\nhelp : ∀ (a b : ZMod 4), a ≠ 3 → b ≠ 3 → a * b ≠ 3\nH : ∀ {q : ℕ}, Nat.Prime q → q ∣ n → q % 4 ≠ 3\np q : ℕ\nhpq : p * q ∣ n\nhp : ¬↑p = ↑3\nhq : ¬↑q = ↑3\n⊢ ¬↑(p * q) = ↑3\n[PROOFSTEP]\nrw [Nat.cast_mul]\n[GOAL]\ncase refine'_3\nn : ℕ\nhn : Squarefree n\nhelp : ∀ (a b : ZMod 4), a ≠ 3 → b ≠ 3 → a * b ≠ 3\nH : ∀ {q : ℕ}, Nat.Prime q → q ∣ n → q % 4 ≠ 3\np q : ℕ\nhpq : p * q ∣ n\nhp : ¬↑p = ↑3\nhq : ¬↑q = ↑3\n⊢ ¬↑p * ↑q = ↑3\n[PROOFSTEP]\nexact help p q hp hq\n[GOAL]\nn : ℕ\nh : IsSquare (-1)\n⊢ ∃ x y, n = x ^ 2 + y ^ 2\n[PROOFSTEP]\ninduction' n using induction_on_primes with p n hpp ih\n[GOAL]\ncase h₀\nn : ℕ\nh✝ : IsSquare (-1)\nh : IsSquare (-1)\n⊢ ∃ x y, 0 = x ^ 2 + y ^ 2\n[PROOFSTEP]\nexact ⟨0, 0, rfl⟩\n[GOAL]\ncase h₁\nn : ℕ\nh✝ : IsSquare (-1)\nh : IsSquare (-1)\n⊢ ∃ x y, 1 = x ^ 2 + y ^ 2\n[PROOFSTEP]\nexact ⟨0, 1, rfl⟩\n[GOAL]\ncase h\nn✝ : ℕ\nh✝ : IsSquare (-1)\np n : ℕ\nhpp : Prime p\nih : IsSquare (-1) → ∃ x y, n = x ^ 2 + y ^ 2\nh : IsSquare (-1)\n⊢ ∃ x y, p * n = x ^ 2 + y ^ 2\n[PROOFSTEP]\nhaveI : Fact p.Prime := ⟨hpp⟩\n[GOAL]\ncase h\nn✝ : ℕ\nh✝ : IsSquare (-1)\np n : ℕ\nhpp : Prime p\nih : IsSquare (-1) → ∃ x y, n = x ^ 2 + y ^ 2\nh : IsSquare (-1)\nthis : Fact (Prime p)\n⊢ ∃ x y, p * n = x ^ 2 + y ^ 2\n[PROOFSTEP]\nhave hp : IsSquare (-1 : ZMod p) := ZMod.isSquare_neg_one_of_dvd ⟨n, rfl⟩ h\n[GOAL]\ncase h\nn✝ : ℕ\nh✝ : IsSquare (-1)\np n : ℕ\nhpp : Prime p\nih : IsSquare (-1) → ∃ x y, n = x ^ 2 + y ^ 2\nh : IsSquare (-1)\nthis : Fact (Prime p)\nhp : IsSquare (-1)\n⊢ ∃ x y, p * n = x ^ 2 + y ^ 2\n[PROOFSTEP]\nobtain ⟨u, v, huv⟩ := Nat.Prime.sq_add_sq (ZMod.exists_sq_eq_neg_one_iff.mp hp)\n[GOAL]\ncase h.intro.intro\nn✝ : ℕ\nh✝ : IsSquare (-1)\np n : ℕ\nhpp : Prime p\nih : IsSquare (-1) → ∃ x y, n = x ^ 2 + y ^ 2\nh : IsSquare (-1)\nthis : Fact (Prime p)\nhp : IsSquare (-1)\nu v : ℕ\nhuv : u ^ 2 + v ^ 2 = p\n⊢ ∃ x y, p * n = x ^ 2 + y ^ 2\n[PROOFSTEP]\nobtain ⟨x, y, hxy⟩ := ih (ZMod.isSquare_neg_one_of_dvd ⟨p, mul_comm _ _⟩ h)\n[GOAL]\ncase h.intro.intro.intro.intro\nn✝ : ℕ\nh✝ : IsSquare (-1)\np n : ℕ\nhpp : Prime p\nih : IsSquare (-1) → ∃ x y, n = x ^ 2 + y ^ 2\nh : IsSquare (-1)\nthis : Fact (Prime p)\nhp : IsSquare (-1)\nu v : ℕ\nhuv : u ^ 2 + v ^ 2 = p\nx y : ℕ\nhxy : n = x ^ 2 + y ^ 2\n⊢ ∃ x y, p * n = x ^ 2 + y ^ 2\n[PROOFSTEP]\nexact Nat.sq_add_sq_mul huv.symm hxy\n[GOAL]\nn x y : ℤ\nh : n = x ^ 2 + y ^ 2\nhc : IsCoprime x y\n⊢ IsSquare (-1)\n[PROOFSTEP]\nobtain ⟨u, v, huv⟩ : IsCoprime x n :=\n  by\n  have hc2 : IsCoprime (x ^ 2) (y ^ 2) := hc.pow\n  rw [show y ^ 2 = n + -1 * x ^ 2 by rw [h]; ring] at hc2 \n  exact (IsCoprime.pow_left_iff zero_lt_two).mp hc2.of_add_mul_right_right\n[GOAL]\nn x y : ℤ\nh : n = x ^ 2 + y ^ 2\nhc : IsCoprime x y\n⊢ IsCoprime x n\n[PROOFSTEP]\nhave hc2 : IsCoprime (x ^ 2) (y ^ 2) := hc.pow\n[GOAL]\nn x y : ℤ\nh : n = x ^ 2 + y ^ 2\nhc : IsCoprime x y\nhc2 : IsCoprime (x ^ 2) (y ^ 2)\n⊢ IsCoprime x n\n[PROOFSTEP]\nrw [show y ^ 2 = n + -1 * x ^ 2 by rw [h]; ring] at hc2 \n[GOAL]\nn x y : ℤ\nh : n = x ^ 2 + y ^ 2\nhc : IsCoprime x y\nhc2 : IsCoprime (x ^ 2) (y ^ 2)\n⊢ y ^ 2 = n + -1 * x ^ 2\n[PROOFSTEP]\nrw [h]\n[GOAL]\nn x y : ℤ\nh : n = x ^ 2 + y ^ 2\nhc : IsCoprime x y\nhc2 : IsCoprime (x ^ 2) (y ^ 2)\n⊢ y ^ 2 = x ^ 2 + y ^ 2 + -1 * x ^ 2\n[PROOFSTEP]\nring\n[GOAL]\nn x y : ℤ\nh : n = x ^ 2 + y ^ 2\nhc : IsCoprime x y\nhc2 : IsCoprime (x ^ 2) (n + -1 * x ^ 2)\n⊢ IsCoprime x n\n[PROOFSTEP]\nexact (IsCoprime.pow_left_iff zero_lt_two).mp hc2.of_add_mul_right_right\n[GOAL]\ncase intro.intro\nn x y : ℤ\nh : n = x ^ 2 + y ^ 2\nhc : IsCoprime x y\nu v : ℤ\nhuv : u * x + v * n = 1\n⊢ IsSquare (-1)\n[PROOFSTEP]\nhave H : u * y * (u * y) - -1 = n * (-v ^ 2 * n + u ^ 2 + 2 * v) := by\n  linear_combination -u ^ 2 * h + (n * v - u * x - 1) * huv\n[GOAL]\nn x y : ℤ\nh : n = x ^ 2 + y ^ 2\nhc : IsCoprime x y\nu v : ℤ\nhuv : u * x + v * n = 1\n⊢ u * y * (u * y) - -1 = n * (-v ^ 2 * n + u ^ 2 + 2 * v)\n[PROOFSTEP]\nlinear_combination -u ^ 2 * h + (n * v - u * x - 1) * huv\n[GOAL]\ncase intro.intro\nn x y : ℤ\nh : n = x ^ 2 + y ^ 2\nhc : IsCoprime x y\nu v : ℤ\nhuv : u * x + v * n = 1\nH : u * y * (u * y) - -1 = n * (-v ^ 2 * n + u ^ 2 + 2 * v)\n⊢ IsSquare (-1)\n[PROOFSTEP]\nrefine' ⟨u * y, _⟩\n[GOAL]\ncase intro.intro\nn x y : ℤ\nh : n = x ^ 2 + y ^ 2\nhc : IsCoprime x y\nu v : ℤ\nhuv : u * x + v * n = 1\nH : u * y * (u * y) - -1 = n * (-v ^ 2 * n + u ^ 2 + 2 * v)\n⊢ -1 = ↑u * ↑y * (↑u * ↑y)\n[PROOFSTEP]\nconv_rhs => tactic => norm_cast\n[GOAL]\nn x y : ℤ\nh : n = x ^ 2 + y ^ 2\nhc : IsCoprime x y\nu v : ℤ\nhuv : u * x + v * n = 1\nH : u * y * (u * y) - -1 = n * (-v ^ 2 * n + u ^ 2 + 2 * v)\n| ↑u * ↑y * (↑u * ↑y)\n[PROOFSTEP]\ntactic => norm_cast\n[GOAL]\nn x y : ℤ\nh : n = x ^ 2 + y ^ 2\nhc : IsCoprime x y\nu v : ℤ\nhuv : u * x + v * n = 1\nH : u * y * (u * y) - -1 = n * (-v ^ 2 * n + u ^ 2 + 2 * v)\n| ↑u * ↑y * (↑u * ↑y)\n[PROOFSTEP]\ntactic => norm_cast\n[GOAL]\nn x y : ℤ\nh : n = x ^ 2 + y ^ 2\nhc : IsCoprime x y\nu v : ℤ\nhuv : u * x + v * n = 1\nH : u * y * (u * y) - -1 = n * (-v ^ 2 * n + u ^ 2 + 2 * v)\n| ↑u * ↑y * (↑u * ↑y)\n[PROOFSTEP]\ntactic => norm_cast\n[GOAL]\nn x y : ℤ\nh : n = x ^ 2 + y ^ 2\nhc : IsCoprime x y\nu v : ℤ\nhuv : u * x + v * n = 1\nH : u * y * (u * y) - -1 = n * (-v ^ 2 * n + u ^ 2 + 2 * v)\n⊢ ↑u * ↑y * (↑u * ↑y) = ?m.37150\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase intro.intro\nn x y : ℤ\nh : n = x ^ 2 + y ^ 2\nhc : IsCoprime x y\nu v : ℤ\nhuv : u * x + v * n = 1\nH : u * y * (u * y) - -1 = n * (-v ^ 2 * n + u ^ 2 + 2 * v)\n⊢ -1 = ↑(u * y * (u * y))\n[PROOFSTEP]\nrw [(by norm_cast : (-1 : ZMod n.natAbs) = (-1 : ℤ))]\n[GOAL]\nn x y : ℤ\nh : n = x ^ 2 + y ^ 2\nhc : IsCoprime x y\nu v : ℤ\nhuv : u * x + v * n = 1\nH : u * y * (u * y) - -1 = n * (-v ^ 2 * n + u ^ 2 + 2 * v)\n⊢ -1 = ↑(-1)\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase intro.intro\nn x y : ℤ\nh : n = x ^ 2 + y ^ 2\nhc : IsCoprime x y\nu v : ℤ\nhuv : u * x + v * n = 1\nH : u * y * (u * y) - -1 = n * (-v ^ 2 * n + u ^ 2 + 2 * v)\n⊢ ↑(-1) = ↑(u * y * (u * y))\n[PROOFSTEP]\nexact (ZMod.int_cast_eq_int_cast_iff_dvd_sub _ _ _).mpr (Int.natAbs_dvd.mpr ⟨_, H⟩)\n[GOAL]\nn x y : ℕ\nh : n = x ^ 2 + y ^ 2\nhc : Nat.coprime x y\n⊢ IsSquare (-1)\n[PROOFSTEP]\nzify at h \n[GOAL]\nn x y : ℕ\nhc : Nat.coprime x y\nh : ↑n = ↑x ^ 2 + ↑y ^ 2\n⊢ IsSquare (-1)\n[PROOFSTEP]\nexact ZMod.isSquare_neg_one_of_eq_sq_add_sq_of_isCoprime h hc.isCoprime\n[GOAL]\nn : ℕ\n⊢ (∃ x y, n = x ^ 2 + y ^ 2) ↔ ∃ a b, n = a ^ 2 * b ∧ IsSquare (-1)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nn : ℕ\n⊢ (∃ x y, n = x ^ 2 + y ^ 2) → ∃ a b, n = a ^ 2 * b ∧ IsSquare (-1)\n[PROOFSTEP]\nrintro ⟨x, y, h⟩\n[GOAL]\ncase mp.intro.intro\nn x y : ℕ\nh : n = x ^ 2 + y ^ 2\n⊢ ∃ a b, n = a ^ 2 * b ∧ IsSquare (-1)\n[PROOFSTEP]\nby_cases hxy : x = 0 ∧ y = 0\n[GOAL]\ncase pos\nn x y : ℕ\nh : n = x ^ 2 + y ^ 2\nhxy : x = 0 ∧ y = 0\n⊢ ∃ a b, n = a ^ 2 * b ∧ IsSquare (-1)\n[PROOFSTEP]\nexact\n  ⟨0, 1, by rw [h, hxy.1, hxy.2, zero_pow zero_lt_two, add_zero, zero_mul],\n    ⟨0, by rw [zero_mul, neg_eq_zero, Fin.one_eq_zero_iff]⟩⟩\n[GOAL]\nn x y : ℕ\nh : n = x ^ 2 + y ^ 2\nhxy : x = 0 ∧ y = 0\n⊢ n = 0 ^ 2 * 1\n[PROOFSTEP]\nrw [h, hxy.1, hxy.2, zero_pow zero_lt_two, add_zero, zero_mul]\n[GOAL]\nn x y : ℕ\nh : n = x ^ 2 + y ^ 2\nhxy : x = 0 ∧ y = 0\n⊢ -1 = 0 * 0\n[PROOFSTEP]\nrw [zero_mul, neg_eq_zero, Fin.one_eq_zero_iff]\n[GOAL]\ncase neg\nn x y : ℕ\nh : n = x ^ 2 + y ^ 2\nhxy : ¬(x = 0 ∧ y = 0)\n⊢ ∃ a b, n = a ^ 2 * b ∧ IsSquare (-1)\n[PROOFSTEP]\nhave hg := Nat.pos_of_ne_zero (mt Nat.gcd_eq_zero_iff.mp hxy)\n[GOAL]\ncase neg\nn x y : ℕ\nh : n = x ^ 2 + y ^ 2\nhxy : ¬(x = 0 ∧ y = 0)\nhg : 0 < gcd x y\n⊢ ∃ a b, n = a ^ 2 * b ∧ IsSquare (-1)\n[PROOFSTEP]\nobtain ⟨g, x₁, y₁, _, h₂, h₃, h₄⟩ := Nat.exists_coprime' hg\n[GOAL]\ncase neg.intro.intro.intro.intro.intro.intro\nn x y : ℕ\nh : n = x ^ 2 + y ^ 2\nhxy : ¬(x = 0 ∧ y = 0)\nhg : 0 < gcd x y\ng : ℕ\nx₁ y₁ : ℕ\nleft✝ : 0 < g\nh₂ : coprime x₁ y₁\nh₃ : x = x₁ * g\nh₄ : y = y₁ * g\n⊢ ∃ a b, n = a ^ 2 * b ∧ IsSquare (-1)\n[PROOFSTEP]\nexact ⟨g, x₁ ^ 2 + y₁ ^ 2, by rw [h, h₃, h₄]; ring, ZMod.isSquare_neg_one_of_eq_sq_add_sq_of_coprime rfl h₂⟩\n[GOAL]\nn x y : ℕ\nh : n = x ^ 2 + y ^ 2\nhxy : ¬(x = 0 ∧ y = 0)\nhg : 0 < gcd x y\ng : ℕ\nx₁ y₁ : ℕ\nleft✝ : 0 < g\nh₂ : coprime x₁ y₁\nh₃ : x = x₁ * g\nh₄ : y = y₁ * g\n⊢ n = g ^ 2 * (x₁ ^ 2 + y₁ ^ 2)\n[PROOFSTEP]\nrw [h, h₃, h₄]\n[GOAL]\nn x y : ℕ\nh : n = x ^ 2 + y ^ 2\nhxy : ¬(x = 0 ∧ y = 0)\nhg : 0 < gcd x y\ng : ℕ\nx₁ y₁ : ℕ\nleft✝ : 0 < g\nh₂ : coprime x₁ y₁\nh₃ : x = x₁ * g\nh₄ : y = y₁ * g\n⊢ (x₁ * g) ^ 2 + (y₁ * g) ^ 2 = g ^ 2 * (x₁ ^ 2 + y₁ ^ 2)\n[PROOFSTEP]\nring\n[GOAL]\ncase mpr\nn : ℕ\n⊢ (∃ a b, n = a ^ 2 * b ∧ IsSquare (-1)) → ∃ x y, n = x ^ 2 + y ^ 2\n[PROOFSTEP]\nrintro ⟨a, b, h₁, h₂⟩\n[GOAL]\ncase mpr.intro.intro.intro\nn a b : ℕ\nh₁ : n = a ^ 2 * b\nh₂ : IsSquare (-1)\n⊢ ∃ x y, n = x ^ 2 + y ^ 2\n[PROOFSTEP]\nobtain ⟨x', y', h⟩ := Nat.eq_sq_add_sq_of_isSquare_mod_neg_one h₂\n[GOAL]\ncase mpr.intro.intro.intro.intro.intro\nn a b : ℕ\nh₁ : n = a ^ 2 * b\nh₂ : IsSquare (-1)\nx' y' : ℕ\nh : b = x' ^ 2 + y' ^ 2\n⊢ ∃ x y, n = x ^ 2 + y ^ 2\n[PROOFSTEP]\nexact ⟨a * x', a * y', by rw [h₁, h]; ring⟩\n[GOAL]\nn a b : ℕ\nh₁ : n = a ^ 2 * b\nh₂ : IsSquare (-1)\nx' y' : ℕ\nh : b = x' ^ 2 + y' ^ 2\n⊢ n = (a * x') ^ 2 + (a * y') ^ 2\n[PROOFSTEP]\nrw [h₁, h]\n[GOAL]\nn a b : ℕ\nh₁ : n = a ^ 2 * b\nh₂ : IsSquare (-1)\nx' y' : ℕ\nh : b = x' ^ 2 + y' ^ 2\n⊢ a ^ 2 * (x' ^ 2 + y' ^ 2) = (a * x') ^ 2 + (a * y') ^ 2\n[PROOFSTEP]\nring\n[GOAL]\nn : ℕ\n⊢ (∃ x y, n = x ^ 2 + y ^ 2) ↔ ∀ {q : ℕ}, Prime q → q % 4 = 3 → Even (padicValNat q n)\n[PROOFSTEP]\nrcases n.eq_zero_or_pos with (rfl | hn₀)\n[GOAL]\ncase inl\n⊢ (∃ x y, 0 = x ^ 2 + y ^ 2) ↔ ∀ {q : ℕ}, Prime q → q % 4 = 3 → Even (padicValNat q 0)\n[PROOFSTEP]\nexact\n  ⟨fun _ q _ _ => (@padicValNat.zero q).symm ▸ even_zero, fun _ => ⟨0, 0, rfl⟩⟩\n    -- now `0 < n`\n[GOAL]\ncase inr\nn : ℕ\nhn₀ : n > 0\n⊢ (∃ x y, n = x ^ 2 + y ^ 2) ↔ ∀ {q : ℕ}, Prime q → q % 4 = 3 → Even (padicValNat q n)\n[PROOFSTEP]\nrw [Nat.eq_sq_add_sq_iff_eq_sq_mul]\n[GOAL]\ncase inr\nn : ℕ\nhn₀ : n > 0\n⊢ (∃ a b, n = a ^ 2 * b ∧ IsSquare (-1)) ↔ ∀ {q : ℕ}, Prime q → q % 4 = 3 → Even (padicValNat q n)\n[PROOFSTEP]\nrefine' ⟨fun H q hq h => _, fun H => _⟩\n[GOAL]\ncase inr.refine'_1\nn : ℕ\nhn₀ : n > 0\nH : ∃ a b, n = a ^ 2 * b ∧ IsSquare (-1)\nq : ℕ\nhq : Prime q\nh : q % 4 = 3\n⊢ Even (padicValNat q n)\n[PROOFSTEP]\nobtain ⟨a, b, h₁, h₂⟩ := H\n[GOAL]\ncase inr.refine'_1.intro.intro.intro\nn : ℕ\nhn₀ : n > 0\nq : ℕ\nhq : Prime q\nh : q % 4 = 3\na b : ℕ\nh₁ : n = a ^ 2 * b\nh₂ : IsSquare (-1)\n⊢ Even (padicValNat q n)\n[PROOFSTEP]\nhave hqb := padicValNat.eq_zero_of_not_dvd fun hf => (hq.mod_four_ne_three_of_dvd_isSquare_neg_one hf h₂) h\n[GOAL]\ncase inr.refine'_1.intro.intro.intro\nn : ℕ\nhn₀ : n > 0\nq : ℕ\nhq : Prime q\nh : q % 4 = 3\na b : ℕ\nh₁ : n = a ^ 2 * b\nh₂ : IsSquare (-1)\nhqb : padicValNat q b = 0\n⊢ Even (padicValNat q n)\n[PROOFSTEP]\nhave hab : a ^ 2 * b ≠ 0 := h₁ ▸ hn₀.ne'\n[GOAL]\ncase inr.refine'_1.intro.intro.intro\nn : ℕ\nhn₀ : n > 0\nq : ℕ\nhq : Prime q\nh : q % 4 = 3\na b : ℕ\nh₁ : n = a ^ 2 * b\nh₂ : IsSquare (-1)\nhqb : padicValNat q b = 0\nhab : a ^ 2 * b ≠ 0\n⊢ Even (padicValNat q n)\n[PROOFSTEP]\nhave ha₂ := left_ne_zero_of_mul hab\n[GOAL]\ncase inr.refine'_1.intro.intro.intro\nn : ℕ\nhn₀ : n > 0\nq : ℕ\nhq : Prime q\nh : q % 4 = 3\na b : ℕ\nh₁ : n = a ^ 2 * b\nh₂ : IsSquare (-1)\nhqb : padicValNat q b = 0\nhab : a ^ 2 * b ≠ 0\nha₂ : a ^ 2 ≠ 0\n⊢ Even (padicValNat q n)\n[PROOFSTEP]\nhave ha := mt sq_eq_zero_iff.mpr ha₂\n[GOAL]\ncase inr.refine'_1.intro.intro.intro\nn : ℕ\nhn₀ : n > 0\nq : ℕ\nhq : Prime q\nh : q % 4 = 3\na b : ℕ\nh₁ : n = a ^ 2 * b\nh₂ : IsSquare (-1)\nhqb : padicValNat q b = 0\nhab : a ^ 2 * b ≠ 0\nha₂ : a ^ 2 ≠ 0\nha : ¬a = 0\n⊢ Even (padicValNat q n)\n[PROOFSTEP]\nhave hb := right_ne_zero_of_mul hab\n[GOAL]\ncase inr.refine'_1.intro.intro.intro\nn : ℕ\nhn₀ : n > 0\nq : ℕ\nhq : Prime q\nh : q % 4 = 3\na b : ℕ\nh₁ : n = a ^ 2 * b\nh₂ : IsSquare (-1)\nhqb : padicValNat q b = 0\nhab : a ^ 2 * b ≠ 0\nha₂ : a ^ 2 ≠ 0\nha : ¬a = 0\nhb : b ≠ 0\n⊢ Even (padicValNat q n)\n[PROOFSTEP]\nhaveI hqi : Fact q.Prime := ⟨hq⟩\n[GOAL]\ncase inr.refine'_1.intro.intro.intro\nn : ℕ\nhn₀ : n > 0\nq : ℕ\nhq : Prime q\nh : q % 4 = 3\na b : ℕ\nh₁ : n = a ^ 2 * b\nh₂ : IsSquare (-1)\nhqb : padicValNat q b = 0\nhab : a ^ 2 * b ≠ 0\nha₂ : a ^ 2 ≠ 0\nha : ¬a = 0\nhb : b ≠ 0\nhqi : Fact (Prime q)\n⊢ Even (padicValNat q n)\n[PROOFSTEP]\nsimp_rw [h₁, padicValNat.mul ha₂ hb, padicValNat.pow 2 ha, hqb, add_zero]\n[GOAL]\ncase inr.refine'_1.intro.intro.intro\nn : ℕ\nhn₀ : n > 0\nq : ℕ\nhq : Prime q\nh : q % 4 = 3\na b : ℕ\nh₁ : n = a ^ 2 * b\nh₂ : IsSquare (-1)\nhqb : padicValNat q b = 0\nhab : a ^ 2 * b ≠ 0\nha₂ : a ^ 2 ≠ 0\nha : ¬a = 0\nhb : b ≠ 0\nhqi : Fact (Prime q)\n⊢ Even (2 * padicValNat q a)\n[PROOFSTEP]\nexact even_two_mul _\n[GOAL]\ncase inr.refine'_2\nn : ℕ\nhn₀ : n > 0\nH : ∀ {q : ℕ}, Prime q → q % 4 = 3 → Even (padicValNat q n)\n⊢ ∃ a b, n = a ^ 2 * b ∧ IsSquare (-1)\n[PROOFSTEP]\nobtain ⟨b, a, hb₀, ha₀, hab, hb⟩ := Nat.sq_mul_squarefree_of_pos hn₀\n[GOAL]\ncase inr.refine'_2.intro.intro.intro.intro.intro\nn : ℕ\nhn₀ : n > 0\nH : ∀ {q : ℕ}, Prime q → q % 4 = 3 → Even (padicValNat q n)\nb a : ℕ\nhb₀ : 0 < b\nha₀ : 0 < a\nhab : a ^ 2 * b = n\nhb : Squarefree b\n⊢ ∃ a b, n = a ^ 2 * b ∧ IsSquare (-1)\n[PROOFSTEP]\nrefine' ⟨a, b, hab.symm, (ZMod.isSquare_neg_one_iff hb).mpr fun {q} hqp hqb hq4 => _⟩\n[GOAL]\ncase inr.refine'_2.intro.intro.intro.intro.intro\nn : ℕ\nhn₀ : n > 0\nH : ∀ {q : ℕ}, Prime q → q % 4 = 3 → Even (padicValNat q n)\nb a : ℕ\nhb₀ : 0 < b\nha₀ : 0 < a\nhab : a ^ 2 * b = n\nhb : Squarefree b\nq : ℕ\nhqp : Prime q\nhqb : q ∣ b\nhq4 : q % 4 = 3\n⊢ False\n[PROOFSTEP]\nrefine' Nat.odd_iff_not_even.mp _ (H hqp hq4)\n[GOAL]\ncase inr.refine'_2.intro.intro.intro.intro.intro\nn : ℕ\nhn₀ : n > 0\nH : ∀ {q : ℕ}, Prime q → q % 4 = 3 → Even (padicValNat q n)\nb a : ℕ\nhb₀ : 0 < b\nha₀ : 0 < a\nhab : a ^ 2 * b = n\nhb : Squarefree b\nq : ℕ\nhqp : Prime q\nhqb : q ∣ b\nhq4 : q % 4 = 3\n⊢ Odd (padicValNat q n)\n[PROOFSTEP]\nhave hqb' : padicValNat q b = 1 :=\n  b.factorization_def hqp ▸\n    le_antisymm (Nat.Squarefree.factorization_le_one _ hb) ((hqp.dvd_iff_one_le_factorization hb₀.ne').mp hqb)\n[GOAL]\ncase inr.refine'_2.intro.intro.intro.intro.intro\nn : ℕ\nhn₀ : n > 0\nH : ∀ {q : ℕ}, Prime q → q % 4 = 3 → Even (padicValNat q n)\nb a : ℕ\nhb₀ : 0 < b\nha₀ : 0 < a\nhab : a ^ 2 * b = n\nhb : Squarefree b\nq : ℕ\nhqp : Prime q\nhqb : q ∣ b\nhq4 : q % 4 = 3\nhqb' : padicValNat q b = 1\n⊢ Odd (padicValNat q n)\n[PROOFSTEP]\nhaveI hqi : Fact q.Prime := ⟨hqp⟩\n[GOAL]\ncase inr.refine'_2.intro.intro.intro.intro.intro\nn : ℕ\nhn₀ : n > 0\nH : ∀ {q : ℕ}, Prime q → q % 4 = 3 → Even (padicValNat q n)\nb a : ℕ\nhb₀ : 0 < b\nha₀ : 0 < a\nhab : a ^ 2 * b = n\nhb : Squarefree b\nq : ℕ\nhqp : Prime q\nhqb : q ∣ b\nhq4 : q % 4 = 3\nhqb' : padicValNat q b = 1\nhqi : Fact (Prime q)\n⊢ Odd (padicValNat q n)\n[PROOFSTEP]\nsimp_rw [← hab, padicValNat.mul (pow_ne_zero 2 ha₀.ne') hb₀.ne', hqb', padicValNat.pow 2 ha₀.ne']\n[GOAL]\ncase inr.refine'_2.intro.intro.intro.intro.intro\nn : ℕ\nhn₀ : n > 0\nH : ∀ {q : ℕ}, Prime q → q % 4 = 3 → Even (padicValNat q n)\nb a : ℕ\nhb₀ : 0 < b\nha₀ : 0 < a\nhab : a ^ 2 * b = n\nhb : Squarefree b\nq : ℕ\nhqp : Prime q\nhqb : q ∣ b\nhq4 : q % 4 = 3\nhqb' : padicValNat q b = 1\nhqi : Fact (Prime q)\n⊢ Odd (2 * padicValNat q a + 1)\n[PROOFSTEP]\nexact odd_two_mul_add_one _\n", "meta": {"mathlib_filename": "Mathlib.NumberTheory.SumTwoSquares", "llama_tokens": 14858, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8198933447152497, "lm_q2_score": 0.665410572017153, "lm_q1q2_score": 0.5455656995000311}}
{"text": "[GOAL]\nF : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝² : Mul M\ninst✝¹ : Mul N\na x y : M\ninst✝ : MulHomClass F M N\nh : SemiconjBy a x y\nf : F\n⊢ SemiconjBy (↑f a) (↑f x) (↑f y)\n[PROOFSTEP]\nsimpa only [SemiconjBy, map_mul] using congr_arg f h\n[GOAL]\nF : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝² : Mul M\ninst✝¹ : Mul N\na x y : M\ninst✝ : MulHomClass F M N\nf : F\nhf : Function.Injective ↑f\nh : SemiconjBy (↑f a) (↑f x) (↑f y)\n⊢ ↑f (a * x) = ↑f (y * a)\n[PROOFSTEP]\nsimpa only [SemiconjBy, map_mul] using h\n[GOAL]\nF : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝² : Mul M\ninst✝¹ : Mul N\na x y : M\ninst✝ : MulHomClass F M N\nf : F\nhf : Function.Injective ↑f\nh : Commute (↑f x) (↑f y)\n⊢ ↑f (x * y) = ↑f (y * x)\n[PROOFSTEP]\nsimpa only [map_mul] using h.eq\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Hom.Commute", "llama_tokens": 397, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8031737869342623, "lm_q2_score": 0.6791786861878392, "lm_q1q2_score": 0.5454985173905238}}
{"text": "[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nM : Type u_4\ninst✝¹¹ : CommSemiring R\ninst✝¹⁰ : AddCommMonoid M\ninst✝⁹ : Module R M\ninst✝⁸ : Semiring A\ninst✝⁷ : Semiring B\ninst✝⁶ : Module A M\ninst✝⁵ : Module B M\ninst✝⁴ : Algebra R A\ninst✝³ : Algebra R B\ninst✝² : IsScalarTower R A M\ninst✝¹ : IsScalarTower R B M\ninst✝ : SMulCommClass A B M\np : AddSubmonoid M\nhA : ∀ (a : A) {m : M}, m ∈ p → a • m ∈ p\nhB : ∀ (b : B) {m : M}, m ∈ p → b • m ∈ p\nab : A ⊗[R] B\nm : M\nx✝ :\n  m ∈\n    {\n          toAddSubsemigroup :=\n            { carrier := ↑p, add_mem' := (_ : ∀ {a b : M}, a ∈ p.carrier → b ∈ p.carrier → a + b ∈ p.carrier) },\n          zero_mem' := (_ : 0 ∈ p.carrier) }.toAddSubsemigroup.carrier\n⊢ 0 • m ∈\n    {\n          toAddSubsemigroup :=\n            { carrier := ↑p, add_mem' := (_ : ∀ {a b : M}, a ∈ p.carrier → b ∈ p.carrier → a + b ∈ p.carrier) },\n          zero_mem' := (_ : 0 ∈ p.carrier) }.toAddSubsemigroup.carrier\n[PROOFSTEP]\nsimpa only [zero_smul] using p.zero_mem\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nM : Type u_4\ninst✝¹¹ : CommSemiring R\ninst✝¹⁰ : AddCommMonoid M\ninst✝⁹ : Module R M\ninst✝⁸ : Semiring A\ninst✝⁷ : Semiring B\ninst✝⁶ : Module A M\ninst✝⁵ : Module B M\ninst✝⁴ : Algebra R A\ninst✝³ : Algebra R B\ninst✝² : IsScalarTower R A M\ninst✝¹ : IsScalarTower R B M\ninst✝ : SMulCommClass A B M\np : AddSubmonoid M\nhA : ∀ (a : A) {m : M}, m ∈ p → a • m ∈ p\nhB : ∀ (b : B) {m : M}, m ∈ p → b • m ∈ p\nab : A ⊗[R] B\nm : M\na : A\nb : B\nhm :\n  m ∈\n    {\n          toAddSubsemigroup :=\n            { carrier := ↑p, add_mem' := (_ : ∀ {a b : M}, a ∈ p.carrier → b ∈ p.carrier → a + b ∈ p.carrier) },\n          zero_mem' := (_ : 0 ∈ p.carrier) }.toAddSubsemigroup.carrier\n⊢ a ⊗ₜ[R] b • m ∈\n    {\n          toAddSubsemigroup :=\n            { carrier := ↑p, add_mem' := (_ : ∀ {a b : M}, a ∈ p.carrier → b ∈ p.carrier → a + b ∈ p.carrier) },\n          zero_mem' := (_ : 0 ∈ p.carrier) }.toAddSubsemigroup.carrier\n[PROOFSTEP]\nsimpa only [TensorProduct.Algebra.smul_def] using hA a (hB b hm)\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nM : Type u_4\ninst✝¹¹ : CommSemiring R\ninst✝¹⁰ : AddCommMonoid M\ninst✝⁹ : Module R M\ninst✝⁸ : Semiring A\ninst✝⁷ : Semiring B\ninst✝⁶ : Module A M\ninst✝⁵ : Module B M\ninst✝⁴ : Algebra R A\ninst✝³ : Algebra R B\ninst✝² : IsScalarTower R A M\ninst✝¹ : IsScalarTower R B M\ninst✝ : SMulCommClass A B M\np : AddSubmonoid M\nhA : ∀ (a : A) {m : M}, m ∈ p → a • m ∈ p\nhB : ∀ (b : B) {m : M}, m ∈ p → b • m ∈ p\nab : A ⊗[R] B\nm : M\nz w : A ⊗[R] B\nhz :\n  m ∈\n      {\n            toAddSubsemigroup :=\n              { carrier := ↑p, add_mem' := (_ : ∀ {a b : M}, a ∈ p.carrier → b ∈ p.carrier → a + b ∈ p.carrier) },\n            zero_mem' := (_ : 0 ∈ p.carrier) }.toAddSubsemigroup.carrier →\n    z • m ∈\n      {\n            toAddSubsemigroup :=\n              { carrier := ↑p, add_mem' := (_ : ∀ {a b : M}, a ∈ p.carrier → b ∈ p.carrier → a + b ∈ p.carrier) },\n            zero_mem' := (_ : 0 ∈ p.carrier) }.toAddSubsemigroup.carrier\nhw :\n  m ∈\n      {\n            toAddSubsemigroup :=\n              { carrier := ↑p, add_mem' := (_ : ∀ {a b : M}, a ∈ p.carrier → b ∈ p.carrier → a + b ∈ p.carrier) },\n            zero_mem' := (_ : 0 ∈ p.carrier) }.toAddSubsemigroup.carrier →\n    w • m ∈\n      {\n            toAddSubsemigroup :=\n              { carrier := ↑p, add_mem' := (_ : ∀ {a b : M}, a ∈ p.carrier → b ∈ p.carrier → a + b ∈ p.carrier) },\n            zero_mem' := (_ : 0 ∈ p.carrier) }.toAddSubsemigroup.carrier\nhm :\n  m ∈\n    {\n          toAddSubsemigroup :=\n            { carrier := ↑p, add_mem' := (_ : ∀ {a b : M}, a ∈ p.carrier → b ∈ p.carrier → a + b ∈ p.carrier) },\n          zero_mem' := (_ : 0 ∈ p.carrier) }.toAddSubsemigroup.carrier\n⊢ (z + w) • m ∈\n    {\n          toAddSubsemigroup :=\n            { carrier := ↑p, add_mem' := (_ : ∀ {a b : M}, a ∈ p.carrier → b ∈ p.carrier → a + b ∈ p.carrier) },\n          zero_mem' := (_ : 0 ∈ p.carrier) }.toAddSubsemigroup.carrier\n[PROOFSTEP]\nsimpa only [add_smul] using p.add_mem (hz hm) (hw hm)\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nM : Type u_4\ninst✝¹¹ : CommSemiring R\ninst✝¹⁰ : AddCommMonoid M\ninst✝⁹ : Module R M\ninst✝⁸ : Semiring A\ninst✝⁷ : Semiring B\ninst✝⁶ : Module A M\ninst✝⁵ : Module B M\ninst✝⁴ : Algebra R A\ninst✝³ : Algebra R B\ninst✝² : IsScalarTower R A M\ninst✝¹ : IsScalarTower R B M\ninst✝ : SMulCommClass A B M\np : Submodule (A ⊗[R] B) M\na : A\nm : M\nhm : m ∈ p\n⊢ a • m ∈ p\n[PROOFSTEP]\nsuffices a • m = a ⊗ₜ[R] (1 : B) • m by exact this.symm ▸ p.smul_mem _ hm\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nM : Type u_4\ninst✝¹¹ : CommSemiring R\ninst✝¹⁰ : AddCommMonoid M\ninst✝⁹ : Module R M\ninst✝⁸ : Semiring A\ninst✝⁷ : Semiring B\ninst✝⁶ : Module A M\ninst✝⁵ : Module B M\ninst✝⁴ : Algebra R A\ninst✝³ : Algebra R B\ninst✝² : IsScalarTower R A M\ninst✝¹ : IsScalarTower R B M\ninst✝ : SMulCommClass A B M\np : Submodule (A ⊗[R] B) M\na : A\nm : M\nhm : m ∈ p\nthis : a • m = a ⊗ₜ[R] 1 • m\n⊢ a • m ∈ p\n[PROOFSTEP]\nexact this.symm ▸ p.smul_mem _ hm\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nM : Type u_4\ninst✝¹¹ : CommSemiring R\ninst✝¹⁰ : AddCommMonoid M\ninst✝⁹ : Module R M\ninst✝⁸ : Semiring A\ninst✝⁷ : Semiring B\ninst✝⁶ : Module A M\ninst✝⁵ : Module B M\ninst✝⁴ : Algebra R A\ninst✝³ : Algebra R B\ninst✝² : IsScalarTower R A M\ninst✝¹ : IsScalarTower R B M\ninst✝ : SMulCommClass A B M\np : Submodule (A ⊗[R] B) M\na : A\nm : M\nhm : m ∈ p\n⊢ a • m = a ⊗ₜ[R] 1 • m\n[PROOFSTEP]\nsimp [TensorProduct.Algebra.smul_def]\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nM : Type u_4\ninst✝¹¹ : CommSemiring R\ninst✝¹⁰ : AddCommMonoid M\ninst✝⁹ : Module R M\ninst✝⁸ : Semiring A\ninst✝⁷ : Semiring B\ninst✝⁶ : Module A M\ninst✝⁵ : Module B M\ninst✝⁴ : Algebra R A\ninst✝³ : Algebra R B\ninst✝² : IsScalarTower R A M\ninst✝¹ : IsScalarTower R B M\ninst✝ : SMulCommClass A B M\np : Submodule (A ⊗[R] B) M\nb : B\nm : M\nhm : m ∈ p\n⊢ b • m ∈ p\n[PROOFSTEP]\nsuffices b • m = (1 : A) ⊗ₜ[R] b • m by exact this.symm ▸ p.smul_mem _ hm\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nM : Type u_4\ninst✝¹¹ : CommSemiring R\ninst✝¹⁰ : AddCommMonoid M\ninst✝⁹ : Module R M\ninst✝⁸ : Semiring A\ninst✝⁷ : Semiring B\ninst✝⁶ : Module A M\ninst✝⁵ : Module B M\ninst✝⁴ : Algebra R A\ninst✝³ : Algebra R B\ninst✝² : IsScalarTower R A M\ninst✝¹ : IsScalarTower R B M\ninst✝ : SMulCommClass A B M\np : Submodule (A ⊗[R] B) M\nb : B\nm : M\nhm : m ∈ p\nthis : b • m = 1 ⊗ₜ[R] b • m\n⊢ b • m ∈ p\n[PROOFSTEP]\nexact this.symm ▸ p.smul_mem _ hm\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\nM : Type u_4\ninst✝¹¹ : CommSemiring R\ninst✝¹⁰ : AddCommMonoid M\ninst✝⁹ : Module R M\ninst✝⁸ : Semiring A\ninst✝⁷ : Semiring B\ninst✝⁶ : Module A M\ninst✝⁵ : Module B M\ninst✝⁴ : Algebra R A\ninst✝³ : Algebra R B\ninst✝² : IsScalarTower R A M\ninst✝¹ : IsScalarTower R B M\ninst✝ : SMulCommClass A B M\np : Submodule (A ⊗[R] B) M\nb : B\nm : M\nhm : m ∈ p\n⊢ b • m = 1 ⊗ₜ[R] b • m\n[PROOFSTEP]\nsimp [TensorProduct.Algebra.smul_def]\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Module.Bimodule", "llama_tokens": 3413, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8418256393148981, "lm_q2_score": 0.6477982179521103, "lm_q1q2_score": 0.545333148974587}}
{"text": "[GOAL]\nα : Type u_1\ninst✝¹ : Preorder α\ns : Set α\ninst✝ : LocallyFiniteOrderTop α\nhs : Set.Finite s\n⊢ Set.Finite ↑(upperClosure s)\n[PROOFSTEP]\nrw [coe_upperClosure]\n[GOAL]\nα : Type u_1\ninst✝¹ : Preorder α\ns : Set α\ninst✝ : LocallyFiniteOrderTop α\nhs : Set.Finite s\n⊢ Set.Finite (⋃ (a : α) (_ : a ∈ s), Ici a)\n[PROOFSTEP]\nexact hs.biUnion fun _ _ => finite_Ici _\n[GOAL]\nα : Type u_1\ninst✝¹ : Preorder α\ns : Set α\ninst✝ : LocallyFiniteOrderBot α\nhs : Set.Finite s\n⊢ Set.Finite ↑(lowerClosure s)\n[PROOFSTEP]\nrw [coe_lowerClosure]\n[GOAL]\nα : Type u_1\ninst✝¹ : Preorder α\ns : Set α\ninst✝ : LocallyFiniteOrderBot α\nhs : Set.Finite s\n⊢ Set.Finite (⋃ (a : α) (_ : a ∈ s), Iic a)\n[PROOFSTEP]\nexact hs.biUnion fun _ _ => finite_Iic _\n", "meta": {"mathlib_filename": "Mathlib.Order.UpperLower.LocallyFinite", "llama_tokens": 360, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8152325073083131, "lm_q2_score": 0.6688802669716107, "lm_q1q2_score": 0.5452929371323201}}
{"text": "[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝⁴ : CommSemiring R\ninst✝³ : NonUnitalSemiring A\ninst✝² : Module R A\ninst✝¹ : SMulCommClass R A A\ninst✝ : IsScalarTower R A A\nsrc✝ : A →ₗ[R] A →ₗ[R] A := mul R A\n⊢ MulActionHom.toFun\n      { toFun := src✝.toFun,\n        map_smul' :=\n          (_ :\n            ∀ (r : R) (x : A), AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }\n      0 =\n    0\n[PROOFSTEP]\next a\n[GOAL]\ncase h\nR : Type u_1\nA : Type u_2\ninst✝⁴ : CommSemiring R\ninst✝³ : NonUnitalSemiring A\ninst✝² : Module R A\ninst✝¹ : SMulCommClass R A A\ninst✝ : IsScalarTower R A A\nsrc✝ : A →ₗ[R] A →ₗ[R] A := mul R A\na : A\n⊢ ↑(MulActionHom.toFun\n          { toFun := src✝.toFun,\n            map_smul' :=\n              (_ :\n                ∀ (r : R) (x : A),\n                  AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }\n          0)\n      a =\n    ↑0 a\n[PROOFSTEP]\nexact zero_mul a\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝⁴ : CommSemiring R\ninst✝³ : NonUnitalSemiring A\ninst✝² : Module R A\ninst✝¹ : SMulCommClass R A A\ninst✝ : IsScalarTower R A A\nsrc✝ : A →ₗ[R] A →ₗ[R] A := mul R A\n⊢ ∀ (x y : A),\n    MulActionHom.toFun\n        {\n            toMulActionHom :=\n              { toFun := src✝.toFun,\n                map_smul' :=\n                  (_ :\n                    ∀ (r : R) (x : A),\n                      AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) },\n            map_zero' :=\n              (_ :\n                MulActionHom.toFun\n                    { toFun := src✝.toFun,\n                      map_smul' :=\n                        (_ :\n                          ∀ (r : R) (x : A),\n                            AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }\n                    0 =\n                  0),\n            map_add' :=\n              (_ :\n                ∀ (x y : A),\n                  AddHom.toFun src✝.toAddHom (x + y) =\n                    AddHom.toFun src✝.toAddHom x + AddHom.toFun src✝.toAddHom y) }.toMulActionHom\n        (x * y) =\n      MulActionHom.toFun\n          {\n              toMulActionHom :=\n                { toFun := src✝.toFun,\n                  map_smul' :=\n                    (_ :\n                      ∀ (r : R) (x : A),\n                        AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) },\n              map_zero' :=\n                (_ :\n                  MulActionHom.toFun\n                      { toFun := src✝.toFun,\n                        map_smul' :=\n                          (_ :\n                            ∀ (r : R) (x : A),\n                              AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }\n                      0 =\n                    0),\n              map_add' :=\n                (_ :\n                  ∀ (x y : A),\n                    AddHom.toFun src✝.toAddHom (x + y) =\n                      AddHom.toFun src✝.toAddHom x + AddHom.toFun src✝.toAddHom y) }.toMulActionHom\n          x *\n        MulActionHom.toFun\n          {\n              toMulActionHom :=\n                { toFun := src✝.toFun,\n                  map_smul' :=\n                    (_ :\n                      ∀ (r : R) (x : A),\n                        AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) },\n              map_zero' :=\n                (_ :\n                  MulActionHom.toFun\n                      { toFun := src✝.toFun,\n                        map_smul' :=\n                          (_ :\n                            ∀ (r : R) (x : A),\n                              AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }\n                      0 =\n                    0),\n              map_add' :=\n                (_ :\n                  ∀ (x y : A),\n                    AddHom.toFun src✝.toAddHom (x + y) =\n                      AddHom.toFun src✝.toAddHom x + AddHom.toFun src✝.toAddHom y) }.toMulActionHom\n          y\n[PROOFSTEP]\nintro a b\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝⁴ : CommSemiring R\ninst✝³ : NonUnitalSemiring A\ninst✝² : Module R A\ninst✝¹ : SMulCommClass R A A\ninst✝ : IsScalarTower R A A\nsrc✝ : A →ₗ[R] A →ₗ[R] A := mul R A\na b : A\n⊢ MulActionHom.toFun\n      {\n          toMulActionHom :=\n            { toFun := src✝.toFun,\n              map_smul' :=\n                (_ :\n                  ∀ (r : R) (x : A),\n                    AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) },\n          map_zero' :=\n            (_ :\n              MulActionHom.toFun\n                  { toFun := src✝.toFun,\n                    map_smul' :=\n                      (_ :\n                        ∀ (r : R) (x : A),\n                          AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }\n                  0 =\n                0),\n          map_add' :=\n            (_ :\n              ∀ (x y : A),\n                AddHom.toFun src✝.toAddHom (x + y) =\n                  AddHom.toFun src✝.toAddHom x + AddHom.toFun src✝.toAddHom y) }.toMulActionHom\n      (a * b) =\n    MulActionHom.toFun\n        {\n            toMulActionHom :=\n              { toFun := src✝.toFun,\n                map_smul' :=\n                  (_ :\n                    ∀ (r : R) (x : A),\n                      AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) },\n            map_zero' :=\n              (_ :\n                MulActionHom.toFun\n                    { toFun := src✝.toFun,\n                      map_smul' :=\n                        (_ :\n                          ∀ (r : R) (x : A),\n                            AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }\n                    0 =\n                  0),\n            map_add' :=\n              (_ :\n                ∀ (x y : A),\n                  AddHom.toFun src✝.toAddHom (x + y) =\n                    AddHom.toFun src✝.toAddHom x + AddHom.toFun src✝.toAddHom y) }.toMulActionHom\n        a *\n      MulActionHom.toFun\n        {\n            toMulActionHom :=\n              { toFun := src✝.toFun,\n                map_smul' :=\n                  (_ :\n                    ∀ (r : R) (x : A),\n                      AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) },\n            map_zero' :=\n              (_ :\n                MulActionHom.toFun\n                    { toFun := src✝.toFun,\n                      map_smul' :=\n                        (_ :\n                          ∀ (r : R) (x : A),\n                            AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }\n                    0 =\n                  0),\n            map_add' :=\n              (_ :\n                ∀ (x y : A),\n                  AddHom.toFun src✝.toAddHom (x + y) =\n                    AddHom.toFun src✝.toAddHom x + AddHom.toFun src✝.toAddHom y) }.toMulActionHom\n        b\n[PROOFSTEP]\next c\n[GOAL]\ncase h\nR : Type u_1\nA : Type u_2\ninst✝⁴ : CommSemiring R\ninst✝³ : NonUnitalSemiring A\ninst✝² : Module R A\ninst✝¹ : SMulCommClass R A A\ninst✝ : IsScalarTower R A A\nsrc✝ : A →ₗ[R] A →ₗ[R] A := mul R A\na b c : A\n⊢ ↑(MulActionHom.toFun\n          {\n              toMulActionHom :=\n                { toFun := src✝.toFun,\n                  map_smul' :=\n                    (_ :\n                      ∀ (r : R) (x : A),\n                        AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) },\n              map_zero' :=\n                (_ :\n                  MulActionHom.toFun\n                      { toFun := src✝.toFun,\n                        map_smul' :=\n                          (_ :\n                            ∀ (r : R) (x : A),\n                              AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }\n                      0 =\n                    0),\n              map_add' :=\n                (_ :\n                  ∀ (x y : A),\n                    AddHom.toFun src✝.toAddHom (x + y) =\n                      AddHom.toFun src✝.toAddHom x + AddHom.toFun src✝.toAddHom y) }.toMulActionHom\n          (a * b))\n      c =\n    ↑(MulActionHom.toFun\n            {\n                toMulActionHom :=\n                  { toFun := src✝.toFun,\n                    map_smul' :=\n                      (_ :\n                        ∀ (r : R) (x : A),\n                          AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) },\n                map_zero' :=\n                  (_ :\n                    MulActionHom.toFun\n                        { toFun := src✝.toFun,\n                          map_smul' :=\n                            (_ :\n                              ∀ (r : R) (x : A),\n                                AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }\n                        0 =\n                      0),\n                map_add' :=\n                  (_ :\n                    ∀ (x y : A),\n                      AddHom.toFun src✝.toAddHom (x + y) =\n                        AddHom.toFun src✝.toAddHom x + AddHom.toFun src✝.toAddHom y) }.toMulActionHom\n            a *\n          MulActionHom.toFun\n            {\n                toMulActionHom :=\n                  { toFun := src✝.toFun,\n                    map_smul' :=\n                      (_ :\n                        ∀ (r : R) (x : A),\n                          AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) },\n                map_zero' :=\n                  (_ :\n                    MulActionHom.toFun\n                        { toFun := src✝.toFun,\n                          map_smul' :=\n                            (_ :\n                              ∀ (r : R) (x : A),\n                                AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }\n                        0 =\n                      0),\n                map_add' :=\n                  (_ :\n                    ∀ (x y : A),\n                      AddHom.toFun src✝.toAddHom (x + y) =\n                        AddHom.toFun src✝.toAddHom x + AddHom.toFun src✝.toAddHom y) }.toMulActionHom\n            b)\n      c\n[PROOFSTEP]\nexact mul_assoc a b c\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝⁴ : CommSemiring R\ninst✝³ : NonUnitalSemiring A\ninst✝² : Module R A\ninst✝¹ : SMulCommClass R A A\ninst✝ : IsScalarTower R A A\na b : A\n⊢ Commute (mulLeft R a) (mulRight R b)\n[PROOFSTEP]\next c\n[GOAL]\ncase h\nR : Type u_1\nA : Type u_2\ninst✝⁴ : CommSemiring R\ninst✝³ : NonUnitalSemiring A\ninst✝² : Module R A\ninst✝¹ : SMulCommClass R A A\ninst✝ : IsScalarTower R A A\na b c : A\n⊢ ↑(mulLeft R a * mulRight R b) c = ↑(mulRight R b * mulLeft R a) c\n[PROOFSTEP]\nexact (mul_assoc a c b).symm\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝⁴ : CommSemiring R\ninst✝³ : NonUnitalSemiring A\ninst✝² : Module R A\ninst✝¹ : SMulCommClass R A A\ninst✝ : IsScalarTower R A A\na b : A\n⊢ mulLeft R (a * b) = comp (mulLeft R a) (mulLeft R b)\n[PROOFSTEP]\next\n[GOAL]\ncase h\nR : Type u_1\nA : Type u_2\ninst✝⁴ : CommSemiring R\ninst✝³ : NonUnitalSemiring A\ninst✝² : Module R A\ninst✝¹ : SMulCommClass R A A\ninst✝ : IsScalarTower R A A\na b x✝ : A\n⊢ ↑(mulLeft R (a * b)) x✝ = ↑(comp (mulLeft R a) (mulLeft R b)) x✝\n[PROOFSTEP]\nsimp only [mulLeft_apply, comp_apply, mul_assoc]\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝⁴ : CommSemiring R\ninst✝³ : NonUnitalSemiring A\ninst✝² : Module R A\ninst✝¹ : SMulCommClass R A A\ninst✝ : IsScalarTower R A A\na b : A\n⊢ mulRight R (a * b) = comp (mulRight R b) (mulRight R a)\n[PROOFSTEP]\next\n[GOAL]\ncase h\nR : Type u_1\nA : Type u_2\ninst✝⁴ : CommSemiring R\ninst✝³ : NonUnitalSemiring A\ninst✝² : Module R A\ninst✝¹ : SMulCommClass R A A\ninst✝ : IsScalarTower R A A\na b x✝ : A\n⊢ ↑(mulRight R (a * b)) x✝ = ↑(comp (mulRight R b) (mulRight R a)) x✝\n[PROOFSTEP]\nsimp only [mulRight_apply, comp_apply, mul_assoc]\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nsrc✝ : A →ₗ[R] A →ₗ[R] A := mul R A\n⊢ AddHom.toFun src✝.toAddHom 1 = 1\n[PROOFSTEP]\next a\n[GOAL]\ncase h\nR : Type u_1\nA : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nsrc✝ : A →ₗ[R] A →ₗ[R] A := mul R A\na : A\n⊢ ↑(AddHom.toFun src✝.toAddHom 1) a = ↑1 a\n[PROOFSTEP]\nexact one_mul a\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nsrc✝ : A →ₗ[R] A →ₗ[R] A := mul R A\n⊢ ∀ (x y : A),\n    OneHom.toFun { toFun := src✝.toFun, map_one' := (_ : AddHom.toFun src✝.toAddHom 1 = 1) } (x * y) =\n      OneHom.toFun { toFun := src✝.toFun, map_one' := (_ : AddHom.toFun src✝.toAddHom 1 = 1) } x *\n        OneHom.toFun { toFun := src✝.toFun, map_one' := (_ : AddHom.toFun src✝.toAddHom 1 = 1) } y\n[PROOFSTEP]\nintro a b\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nsrc✝ : A →ₗ[R] A →ₗ[R] A := mul R A\na b : A\n⊢ OneHom.toFun { toFun := src✝.toFun, map_one' := (_ : AddHom.toFun src✝.toAddHom 1 = 1) } (a * b) =\n    OneHom.toFun { toFun := src✝.toFun, map_one' := (_ : AddHom.toFun src✝.toAddHom 1 = 1) } a *\n      OneHom.toFun { toFun := src✝.toFun, map_one' := (_ : AddHom.toFun src✝.toAddHom 1 = 1) } b\n[PROOFSTEP]\next c\n[GOAL]\ncase h\nR : Type u_1\nA : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nsrc✝ : A →ₗ[R] A →ₗ[R] A := mul R A\na b c : A\n⊢ ↑(OneHom.toFun { toFun := src✝.toFun, map_one' := (_ : AddHom.toFun src✝.toAddHom 1 = 1) } (a * b)) c =\n    ↑(OneHom.toFun { toFun := src✝.toFun, map_one' := (_ : AddHom.toFun src✝.toAddHom 1 = 1) } a *\n          OneHom.toFun { toFun := src✝.toFun, map_one' := (_ : AddHom.toFun src✝.toAddHom 1 = 1) } b)\n      c\n[PROOFSTEP]\nexact mul_assoc a b c\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nsrc✝ : A →ₗ[R] A →ₗ[R] A := mul R A\n⊢ OneHom.toFun\n      (↑{ toOneHom := { toFun := src✝.toFun, map_one' := (_ : AddHom.toFun src✝.toAddHom 1 = 1) },\n          map_mul' :=\n            (_ :\n              ∀ (a b : A),\n                OneHom.toFun { toFun := src✝.toFun, map_one' := (_ : AddHom.toFun src✝.toAddHom 1 = 1) } (a * b) =\n                  OneHom.toFun { toFun := src✝.toFun, map_one' := (_ : AddHom.toFun src✝.toAddHom 1 = 1) } a *\n                    OneHom.toFun { toFun := src✝.toFun, map_one' := (_ : AddHom.toFun src✝.toAddHom 1 = 1) } b) })\n      0 =\n    0\n[PROOFSTEP]\next a\n[GOAL]\ncase h\nR : Type u_1\nA : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nsrc✝ : A →ₗ[R] A →ₗ[R] A := mul R A\na : A\n⊢ ↑(OneHom.toFun\n          (↑{ toOneHom := { toFun := src✝.toFun, map_one' := (_ : AddHom.toFun src✝.toAddHom 1 = 1) },\n              map_mul' :=\n                (_ :\n                  ∀ (a b : A),\n                    OneHom.toFun { toFun := src✝.toFun, map_one' := (_ : AddHom.toFun src✝.toAddHom 1 = 1) } (a * b) =\n                      OneHom.toFun { toFun := src✝.toFun, map_one' := (_ : AddHom.toFun src✝.toAddHom 1 = 1) } a *\n                        OneHom.toFun { toFun := src✝.toFun, map_one' := (_ : AddHom.toFun src✝.toAddHom 1 = 1) } b) })\n          0)\n      a =\n    ↑0 a\n[PROOFSTEP]\nexact zero_mul a\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nsrc✝ : A →ₗ[R] A →ₗ[R] A := mul R A\n⊢ ∀ (r : R),\n    OneHom.toFun\n        (↑↑{\n              toMonoidHom :=\n                { toOneHom := { toFun := src✝.toFun, map_one' := (_ : AddHom.toFun src✝.toAddHom 1 = 1) },\n                  map_mul' :=\n                    (_ :\n                      ∀ (a b : A),\n                        OneHom.toFun { toFun := src✝.toFun, map_one' := (_ : AddHom.toFun src✝.toAddHom 1 = 1) }\n                            (a * b) =\n                          OneHom.toFun { toFun := src✝.toFun, map_one' := (_ : AddHom.toFun src✝.toAddHom 1 = 1) } a *\n                            OneHom.toFun { toFun := src✝.toFun, map_one' := (_ : AddHom.toFun src✝.toAddHom 1 = 1) }\n                              b) },\n              map_zero' :=\n                (_ :\n                  OneHom.toFun\n                      (↑{ toOneHom := { toFun := src✝.toFun, map_one' := (_ : AddHom.toFun src✝.toAddHom 1 = 1) },\n                          map_mul' :=\n                            (_ :\n                              ∀ (a b : A),\n                                OneHom.toFun { toFun := src✝.toFun, map_one' := (_ : AddHom.toFun src✝.toAddHom 1 = 1) }\n                                    (a * b) =\n                                  OneHom.toFun\n                                      { toFun := src✝.toFun, map_one' := (_ : AddHom.toFun src✝.toAddHom 1 = 1) } a *\n                                    OneHom.toFun\n                                      { toFun := src✝.toFun, map_one' := (_ : AddHom.toFun src✝.toAddHom 1 = 1) } b) })\n                      0 =\n                    0),\n              map_add' :=\n                (_ :\n                  ∀ (x y : A),\n                    AddHom.toFun src✝.toAddHom (x + y) = AddHom.toFun src✝.toAddHom x + AddHom.toFun src✝.toAddHom y) })\n        (↑(algebraMap R A) r) =\n      ↑(algebraMap R (End R A)) r\n[PROOFSTEP]\nintro r\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nsrc✝ : A →ₗ[R] A →ₗ[R] A := mul R A\nr : R\n⊢ OneHom.toFun\n      (↑↑{\n            toMonoidHom :=\n              { toOneHom := { toFun := src✝.toFun, map_one' := (_ : AddHom.toFun src✝.toAddHom 1 = 1) },\n                map_mul' :=\n                  (_ :\n                    ∀ (a b : A),\n                      OneHom.toFun { toFun := src✝.toFun, map_one' := (_ : AddHom.toFun src✝.toAddHom 1 = 1) } (a * b) =\n                        OneHom.toFun { toFun := src✝.toFun, map_one' := (_ : AddHom.toFun src✝.toAddHom 1 = 1) } a *\n                          OneHom.toFun { toFun := src✝.toFun, map_one' := (_ : AddHom.toFun src✝.toAddHom 1 = 1) } b) },\n            map_zero' :=\n              (_ :\n                OneHom.toFun\n                    (↑{ toOneHom := { toFun := src✝.toFun, map_one' := (_ : AddHom.toFun src✝.toAddHom 1 = 1) },\n                        map_mul' :=\n                          (_ :\n                            ∀ (a b : A),\n                              OneHom.toFun { toFun := src✝.toFun, map_one' := (_ : AddHom.toFun src✝.toAddHom 1 = 1) }\n                                  (a * b) =\n                                OneHom.toFun { toFun := src✝.toFun, map_one' := (_ : AddHom.toFun src✝.toAddHom 1 = 1) }\n                                    a *\n                                  OneHom.toFun\n                                    { toFun := src✝.toFun, map_one' := (_ : AddHom.toFun src✝.toAddHom 1 = 1) } b) })\n                    0 =\n                  0),\n            map_add' :=\n              (_ :\n                ∀ (x y : A),\n                  AddHom.toFun src✝.toAddHom (x + y) = AddHom.toFun src✝.toAddHom x + AddHom.toFun src✝.toAddHom y) })\n      (↑(algebraMap R A) r) =\n    ↑(algebraMap R (End R A)) r\n[PROOFSTEP]\next a\n[GOAL]\ncase h\nR : Type u_1\nA : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nsrc✝ : A →ₗ[R] A →ₗ[R] A := mul R A\nr : R\na : A\n⊢ ↑(OneHom.toFun\n          (↑↑{\n                toMonoidHom :=\n                  { toOneHom := { toFun := src✝.toFun, map_one' := (_ : AddHom.toFun src✝.toAddHom 1 = 1) },\n                    map_mul' :=\n                      (_ :\n                        ∀ (a b : A),\n                          OneHom.toFun { toFun := src✝.toFun, map_one' := (_ : AddHom.toFun src✝.toAddHom 1 = 1) }\n                              (a * b) =\n                            OneHom.toFun { toFun := src✝.toFun, map_one' := (_ : AddHom.toFun src✝.toAddHom 1 = 1) } a *\n                              OneHom.toFun { toFun := src✝.toFun, map_one' := (_ : AddHom.toFun src✝.toAddHom 1 = 1) }\n                                b) },\n                map_zero' :=\n                  (_ :\n                    OneHom.toFun\n                        (↑{ toOneHom := { toFun := src✝.toFun, map_one' := (_ : AddHom.toFun src✝.toAddHom 1 = 1) },\n                            map_mul' :=\n                              (_ :\n                                ∀ (a b : A),\n                                  OneHom.toFun\n                                      { toFun := src✝.toFun, map_one' := (_ : AddHom.toFun src✝.toAddHom 1 = 1) }\n                                      (a * b) =\n                                    OneHom.toFun\n                                        { toFun := src✝.toFun, map_one' := (_ : AddHom.toFun src✝.toAddHom 1 = 1) } a *\n                                      OneHom.toFun\n                                        { toFun := src✝.toFun, map_one' := (_ : AddHom.toFun src✝.toAddHom 1 = 1) }\n                                        b) })\n                        0 =\n                      0),\n                map_add' :=\n                  (_ :\n                    ∀ (x y : A),\n                      AddHom.toFun src✝.toAddHom (x + y) =\n                        AddHom.toFun src✝.toAddHom x + AddHom.toFun src✝.toAddHom y) })\n          (↑(algebraMap R A) r))\n      a =\n    ↑(↑(algebraMap R (End R A)) r) a\n[PROOFSTEP]\nexact (Algebra.smul_def r a).symm\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\na : A\n⊢ mulLeft R a = 0 ↔ a = 0\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nR : Type u_1\nA : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\na : A\n⊢ mulLeft R a = 0 → a = 0\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nR : Type u_1\nA : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\na : A\n⊢ a = 0 → mulLeft R a = 0\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nR : Type u_1\nA : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\na : A\nh : mulLeft R a = 0\n⊢ a = 0\n[PROOFSTEP]\nrw [← mul_one a, ← @mulLeft_apply R _ _ _ _ _ _ a 1, h, LinearMap.zero_apply]\n[GOAL]\ncase mpr\nR : Type u_1\nA : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\na : A\nh : a = 0\n⊢ mulLeft R a = 0\n[PROOFSTEP]\nrw [h]\n[GOAL]\ncase mpr\nR : Type u_1\nA : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\na : A\nh : a = 0\n⊢ mulLeft R 0 = 0\n[PROOFSTEP]\nexact mulLeft_zero_eq_zero\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\na : A\n⊢ mulRight R a = 0 ↔ a = 0\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nR : Type u_1\nA : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\na : A\n⊢ mulRight R a = 0 → a = 0\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nR : Type u_1\nA : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\na : A\n⊢ a = 0 → mulRight R a = 0\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nR : Type u_1\nA : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\na : A\nh : mulRight R a = 0\n⊢ a = 0\n[PROOFSTEP]\nrw [← one_mul a, ← @mulRight_apply R _ _ _ _ _ _ a 1, h, LinearMap.zero_apply]\n[GOAL]\ncase mpr\nR : Type u_1\nA : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\na : A\nh : a = 0\n⊢ mulRight R a = 0\n[PROOFSTEP]\nrw [h]\n[GOAL]\ncase mpr\nR : Type u_1\nA : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\na : A\nh : a = 0\n⊢ mulRight R 0 = 0\n[PROOFSTEP]\nexact mulRight_zero_eq_zero\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\n⊢ mulLeft R 1 = id\n[PROOFSTEP]\next\n[GOAL]\ncase h\nR : Type u_1\nA : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nx✝ : A\n⊢ ↑(mulLeft R 1) x✝ = ↑id x✝\n[PROOFSTEP]\nsimp only [LinearMap.id_coe, one_mul, id.def, mulLeft_apply]\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\n⊢ mulRight R 1 = id\n[PROOFSTEP]\next\n[GOAL]\ncase h\nR : Type u_1\nA : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nx✝ : A\n⊢ ↑(mulRight R 1) x✝ = ↑id x✝\n[PROOFSTEP]\nsimp only [LinearMap.id_coe, mul_one, id.def, mulRight_apply]\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\na : A\nn : ℕ\n⊢ mulLeft R a ^ n = mulLeft R (a ^ n)\n[PROOFSTEP]\nsimpa only [mulLeft, ← Algebra.coe_lmul_eq_mul] using ((Algebra.lmul R A).map_pow a n).symm\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\na : A\nn : ℕ\n⊢ mulRight R a ^ n = mulRight R (a ^ n)\n[PROOFSTEP]\nsimp only [mulRight, ← Algebra.coe_lmul_eq_mul]\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\na : A\nn : ℕ\n⊢ ↑(flip (mul R A)) a ^ n = ↑(flip (mul R A)) (a ^ n)\n[PROOFSTEP]\nexact LinearMap.coe_injective (((mulRight R a).coe_pow n).symm ▸ mul_right_iterate a n)\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : Ring A\ninst✝¹ : Algebra R A\ninst✝ : NoZeroDivisors A\nx : A\nhx : x ≠ 0\n⊢ Function.Injective ↑(mulLeft R x)\n[PROOFSTEP]\nletI : Nontrivial A := ⟨⟨x, 0, hx⟩⟩\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : Ring A\ninst✝¹ : Algebra R A\ninst✝ : NoZeroDivisors A\nx : A\nhx : x ≠ 0\nthis : Nontrivial A := { exists_pair_ne := Exists.intro x (Exists.intro 0 hx) }\n⊢ Function.Injective ↑(mulLeft R x)\n[PROOFSTEP]\nletI := NoZeroDivisors.to_isDomain A\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : Ring A\ninst✝¹ : Algebra R A\ninst✝ : NoZeroDivisors A\nx : A\nhx : x ≠ 0\nthis✝ : Nontrivial A := { exists_pair_ne := Exists.intro x (Exists.intro 0 hx) }\nthis : IsDomain A := NoZeroDivisors.to_isDomain A\n⊢ Function.Injective ↑(mulLeft R x)\n[PROOFSTEP]\nexact mul_right_injective₀ hx\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : Ring A\ninst✝¹ : Algebra R A\ninst✝ : NoZeroDivisors A\nx : A\nhx : x ≠ 0\n⊢ Function.Injective ↑(mulRight R x)\n[PROOFSTEP]\nletI : Nontrivial A := ⟨⟨x, 0, hx⟩⟩\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : Ring A\ninst✝¹ : Algebra R A\ninst✝ : NoZeroDivisors A\nx : A\nhx : x ≠ 0\nthis : Nontrivial A := { exists_pair_ne := Exists.intro x (Exists.intro 0 hx) }\n⊢ Function.Injective ↑(mulRight R x)\n[PROOFSTEP]\nletI := NoZeroDivisors.to_isDomain A\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : Ring A\ninst✝¹ : Algebra R A\ninst✝ : NoZeroDivisors A\nx : A\nhx : x ≠ 0\nthis✝ : Nontrivial A := { exists_pair_ne := Exists.intro x (Exists.intro 0 hx) }\nthis : IsDomain A := NoZeroDivisors.to_isDomain A\n⊢ Function.Injective ↑(mulRight R x)\n[PROOFSTEP]\nexact mul_left_injective₀ hx\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : Ring A\ninst✝¹ : Algebra R A\ninst✝ : NoZeroDivisors A\nx : A\nhx : x ≠ 0\n⊢ Function.Injective ↑(↑(mul R A) x)\n[PROOFSTEP]\nletI : Nontrivial A := ⟨⟨x, 0, hx⟩⟩\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : Ring A\ninst✝¹ : Algebra R A\ninst✝ : NoZeroDivisors A\nx : A\nhx : x ≠ 0\nthis : Nontrivial A := { exists_pair_ne := Exists.intro x (Exists.intro 0 hx) }\n⊢ Function.Injective ↑(↑(mul R A) x)\n[PROOFSTEP]\nletI := NoZeroDivisors.to_isDomain A\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : Ring A\ninst✝¹ : Algebra R A\ninst✝ : NoZeroDivisors A\nx : A\nhx : x ≠ 0\nthis✝ : Nontrivial A := { exists_pair_ne := Exists.intro x (Exists.intro 0 hx) }\nthis : IsDomain A := NoZeroDivisors.to_isDomain A\n⊢ Function.Injective ↑(↑(mul R A) x)\n[PROOFSTEP]\nexact mul_right_injective₀ hx\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Algebra.Bilinear", "llama_tokens": 11347, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8558511469672594, "lm_q2_score": 0.6370307806984443, "lm_q1q2_score": 0.5452035243142123}}
{"text": "[GOAL]\nR : Type u\nB : Type v\ninst✝² : CommRing R\ninst✝¹ : DecidableEq B\ninst✝ : Fintype B\nA : Matrix B B ℤ\ni : B\nh : A i i = 2\n⊢ adE R A (i, i) = 0\n[PROOFSTEP]\nhave h' : (-2 : ℤ).toNat = 0 := by rfl\n[GOAL]\nR : Type u\nB : Type v\ninst✝² : CommRing R\ninst✝¹ : DecidableEq B\ninst✝ : Fintype B\nA : Matrix B B ℤ\ni : B\nh : A i i = 2\n⊢ Int.toNat (-2) = 0\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\nB : Type v\ninst✝² : CommRing R\ninst✝¹ : DecidableEq B\ninst✝ : Fintype B\nA : Matrix B B ℤ\ni : B\nh : A i i = 2\nh' : Int.toNat (-2) = 0\n⊢ adE R A (i, i) = 0\n[PROOFSTEP]\nsimp [adE, h, h']\n[GOAL]\nR : Type u\nB : Type v\ninst✝² : CommRing R\ninst✝¹ : DecidableEq B\ninst✝ : Fintype B\nA : Matrix B B ℤ\ni : B\nh : A i i = 2\n⊢ adF R A (i, i) = 0\n[PROOFSTEP]\nhave h' : (-2 : ℤ).toNat = 0 := by rfl\n[GOAL]\nR : Type u\nB : Type v\ninst✝² : CommRing R\ninst✝¹ : DecidableEq B\ninst✝ : Fintype B\nA : Matrix B B ℤ\ni : B\nh : A i i = 2\n⊢ Int.toNat (-2) = 0\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\nB : Type v\ninst✝² : CommRing R\ninst✝¹ : DecidableEq B\ninst✝ : Fintype B\nA : Matrix B B ℤ\ni : B\nh : A i i = 2\nh' : Int.toNat (-2) = 0\n⊢ adF R A (i, i) = 0\n[PROOFSTEP]\nsimp [adF, h, h']\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Lie.CartanMatrix", "llama_tokens": 636, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7981867777396211, "lm_q2_score": 0.682573734412324, "lm_q1q2_score": 0.5448213296402729}}
{"text": "[GOAL]\n𝕜 : Type u_1\nR : Type u_2\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedCommRing R\ninst✝³ : NormedAlgebra 𝕜 R\ninst✝² : TopologicalRing R\ninst✝¹ : CompleteSpace R\ninst✝ : T2Space R\nr : R\n⊢ exp 𝕜 (r • ε) = ↑1 + r • ε\n[PROOFSTEP]\nrw [eps, ← inr_smul, exp_inr, Nat.cast_one]\n", "meta": {"mathlib_filename": "Mathlib.Analysis.NormedSpace.DualNumber", "llama_tokens": 146, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES\n\n", "lm_q1_score": 0.8354835289107309, "lm_q2_score": 0.6513548714339145, "lm_q1q2_score": 0.5441962665588023}}
{"text": "[GOAL]\nx y : ℝ\nhx : 0 < x\n⊢ log x = ↑(OrderIso.symm expOrderIso) { val := x, property := hx }\n[PROOFSTEP]\nrw [log_of_ne_zero hx.ne']\n[GOAL]\nx y : ℝ\nhx : 0 < x\n⊢ ↑(OrderIso.symm expOrderIso) { val := |x|, property := (_ : 0 < |x|) } =\n    ↑(OrderIso.symm expOrderIso) { val := x, property := hx }\n[PROOFSTEP]\ncongr\n[GOAL]\ncase h.e_6.h.e_val\nx y : ℝ\nhx : 0 < x\n⊢ |x| = x\n[PROOFSTEP]\nexact abs_of_pos hx\n[GOAL]\nx y : ℝ\nhx : x ≠ 0\n⊢ exp (log x) = |x|\n[PROOFSTEP]\nrw [log_of_ne_zero hx, ← coe_expOrderIso_apply, OrderIso.apply_symm_apply, Subtype.coe_mk]\n[GOAL]\nx y : ℝ\nhx : 0 < x\n⊢ exp (log x) = x\n[PROOFSTEP]\nrw [exp_log_eq_abs hx.ne']\n[GOAL]\nx y : ℝ\nhx : 0 < x\n⊢ |x| = x\n[PROOFSTEP]\nexact abs_of_pos hx\n[GOAL]\nx y : ℝ\nhx : x < 0\n⊢ exp (log x) = -x\n[PROOFSTEP]\nrw [exp_log_eq_abs (ne_of_lt hx)]\n[GOAL]\nx y : ℝ\nhx : x < 0\n⊢ |x| = -x\n[PROOFSTEP]\nexact abs_of_neg hx\n[GOAL]\nx✝ y x : ℝ\n⊢ x ≤ exp (log x)\n[PROOFSTEP]\nby_cases h_zero : x = 0\n[GOAL]\ncase pos\nx✝ y x : ℝ\nh_zero : x = 0\n⊢ x ≤ exp (log x)\n[PROOFSTEP]\nrw [h_zero, log, dif_pos rfl, exp_zero]\n[GOAL]\ncase pos\nx✝ y x : ℝ\nh_zero : x = 0\n⊢ 0 ≤ 1\n[PROOFSTEP]\nexact zero_le_one\n[GOAL]\ncase neg\nx✝ y x : ℝ\nh_zero : ¬x = 0\n⊢ x ≤ exp (log x)\n[PROOFSTEP]\nrw [exp_log_eq_abs h_zero]\n[GOAL]\ncase neg\nx✝ y x : ℝ\nh_zero : ¬x = 0\n⊢ x ≤ |x|\n[PROOFSTEP]\nexact le_abs_self _\n[GOAL]\nx y : ℝ\n⊢ exp (log 1) = exp 0\n[PROOFSTEP]\nrw [exp_log zero_lt_one, exp_zero]\n[GOAL]\nx✝ y x : ℝ\n⊢ log |x| = log x\n[PROOFSTEP]\nby_cases h : x = 0\n[GOAL]\ncase pos\nx✝ y x : ℝ\nh : x = 0\n⊢ log |x| = log x\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase neg\nx✝ y x : ℝ\nh : ¬x = 0\n⊢ log |x| = log x\n[PROOFSTEP]\nrw [← exp_eq_exp, exp_log_eq_abs h, exp_log_eq_abs (abs_pos.2 h).ne', abs_abs]\n[GOAL]\nx✝ y x : ℝ\n⊢ log (-x) = log x\n[PROOFSTEP]\nrw [← log_abs x, ← log_abs (-x), abs_neg]\n[GOAL]\nx✝ y x : ℝ\nhx : 0 < x\n⊢ sinh (log x) = (x - x⁻¹) / 2\n[PROOFSTEP]\nrw [sinh_eq, exp_neg, exp_log hx]\n[GOAL]\nx✝ y x : ℝ\nhx : 0 < x\n⊢ cosh (log x) = (x + x⁻¹) / 2\n[PROOFSTEP]\nrw [cosh_eq, exp_neg, exp_log hx]\n[GOAL]\nx✝¹ y x : ℝ\nx✝ : x ∈ univ\n⊢ log (-exp x) = x\n[PROOFSTEP]\nrw [log_neg_eq_log, log_exp]\n[GOAL]\nx y : ℝ\nhx : x ≠ 0\nhy : y ≠ 0\n⊢ exp (log (x * y)) = exp (log x + log y)\n[PROOFSTEP]\nrw [exp_log_eq_abs (mul_ne_zero hx hy), exp_add, exp_log_eq_abs hx, exp_log_eq_abs hy, abs_mul]\n[GOAL]\nx y : ℝ\nhx : x ≠ 0\nhy : y ≠ 0\n⊢ exp (log (x / y)) = exp (log x - log y)\n[PROOFSTEP]\nrw [exp_log_eq_abs (div_ne_zero hx hy), exp_sub, exp_log_eq_abs hx, exp_log_eq_abs hy, abs_div]\n[GOAL]\nx✝ y x : ℝ\n⊢ log x⁻¹ = -log x\n[PROOFSTEP]\nby_cases hx : x = 0\n[GOAL]\ncase pos\nx✝ y x : ℝ\nhx : x = 0\n⊢ log x⁻¹ = -log x\n[PROOFSTEP]\nsimp [hx]\n[GOAL]\ncase neg\nx✝ y x : ℝ\nhx : ¬x = 0\n⊢ log x⁻¹ = -log x\n[PROOFSTEP]\nrw [← exp_eq_exp, exp_log_eq_abs (inv_ne_zero hx), exp_neg, exp_log_eq_abs hx, abs_inv]\n[GOAL]\nx y : ℝ\nh : 0 < x\nh₁ : 0 < y\n⊢ log x ≤ log y ↔ x ≤ y\n[PROOFSTEP]\nrw [← exp_le_exp, exp_log h, exp_log h₁]\n[GOAL]\nx y : ℝ\nhx : 0 < x\n⊢ x < y → log x < log y\n[PROOFSTEP]\nintro h\n[GOAL]\nx y : ℝ\nhx : 0 < x\nh : x < y\n⊢ log x < log y\n[PROOFSTEP]\nrwa [← exp_lt_exp, exp_log hx, exp_log (lt_trans hx h)]\n[GOAL]\nx y : ℝ\nhx : 0 < x\n⊢ x ≤ y → log x ≤ log y\n[PROOFSTEP]\nintro hxy\n[GOAL]\nx y : ℝ\nhx : 0 < x\nhxy : x ≤ y\n⊢ log x ≤ log y\n[PROOFSTEP]\ncases hxy.eq_or_lt with\n| inl h_eq => simp [h_eq]\n| inr hlt => exact le_of_lt <| log_lt_log hx hlt\n[GOAL]\nx y : ℝ\nhx : 0 < x\nhxy : x ≤ y\nx✝ : x = y ∨ x < y\n⊢ log x ≤ log y\n[PROOFSTEP]\ncases hxy.eq_or_lt with\n| inl h_eq => simp [h_eq]\n| inr hlt => exact le_of_lt <| log_lt_log hx hlt\n[GOAL]\ncase inl\nx y : ℝ\nhx : 0 < x\nhxy : x ≤ y\nh_eq : x = y\n⊢ log x ≤ log y\n[PROOFSTEP]\n\n| inl h_eq => simp [h_eq]\n[GOAL]\ncase inl\nx y : ℝ\nhx : 0 < x\nhxy : x ≤ y\nh_eq : x = y\n⊢ log x ≤ log y\n[PROOFSTEP]\nsimp [h_eq]\n[GOAL]\ncase inr\nx y : ℝ\nhx : 0 < x\nhxy : x ≤ y\nhlt : x < y\n⊢ log x ≤ log y\n[PROOFSTEP]\n\n| inr hlt => exact le_of_lt <| log_lt_log hx hlt\n[GOAL]\ncase inr\nx y : ℝ\nhx : 0 < x\nhxy : x ≤ y\nhlt : x < y\n⊢ log x ≤ log y\n[PROOFSTEP]\nexact le_of_lt <| log_lt_log hx hlt\n[GOAL]\nx y : ℝ\nhx : 0 < x\nhy : 0 < y\n⊢ log x < log y ↔ x < y\n[PROOFSTEP]\nrw [← exp_lt_exp, exp_log hx, exp_log hy]\n[GOAL]\nx y : ℝ\nhx : 0 < x\n⊢ log x ≤ y ↔ x ≤ exp y\n[PROOFSTEP]\nrw [← exp_le_exp, exp_log hx]\n[GOAL]\nx y : ℝ\nhx : 0 < x\n⊢ log x < y ↔ x < exp y\n[PROOFSTEP]\nrw [← exp_lt_exp, exp_log hx]\n[GOAL]\nx y : ℝ\nhy : 0 < y\n⊢ x ≤ log y ↔ exp x ≤ y\n[PROOFSTEP]\nrw [← exp_le_exp, exp_log hy]\n[GOAL]\nx y : ℝ\nhy : 0 < y\n⊢ x < log y ↔ exp x < y\n[PROOFSTEP]\nrw [← exp_lt_exp, exp_log hy]\n[GOAL]\nx y : ℝ\nhx : 0 < x\n⊢ 0 < log x ↔ 1 < x\n[PROOFSTEP]\nrw [← log_one]\n[GOAL]\nx y : ℝ\nhx : 0 < x\n⊢ log 1 < log x ↔ 1 < x\n[PROOFSTEP]\nexact log_lt_log_iff zero_lt_one hx\n[GOAL]\nx y : ℝ\nhx : x < -1\n⊢ 0 < log x\n[PROOFSTEP]\nrw [← neg_neg x, log_neg_eq_log]\n[GOAL]\nx y : ℝ\nhx : x < -1\n⊢ 0 < log (-x)\n[PROOFSTEP]\nhave : 1 < -x := by linarith\n[GOAL]\nx y : ℝ\nhx : x < -1\n⊢ 1 < -x\n[PROOFSTEP]\nlinarith\n[GOAL]\nx y : ℝ\nhx : x < -1\nthis : 1 < -x\n⊢ 0 < log (-x)\n[PROOFSTEP]\nexact log_pos this\n[GOAL]\nx y : ℝ\nh : 0 < x\n⊢ log x < 0 ↔ x < 1\n[PROOFSTEP]\nrw [← log_one]\n[GOAL]\nx y : ℝ\nh : 0 < x\n⊢ log x < log 1 ↔ x < 1\n[PROOFSTEP]\nexact log_lt_log_iff h zero_lt_one\n[GOAL]\nx y : ℝ\nh0 : x < 0\nh1 : -1 < x\n⊢ log x < 0\n[PROOFSTEP]\nrw [← neg_neg x, log_neg_eq_log]\n[GOAL]\nx y : ℝ\nh0 : x < 0\nh1 : -1 < x\n⊢ log (-x) < 0\n[PROOFSTEP]\nhave h0' : 0 < -x := by linarith\n[GOAL]\nx y : ℝ\nh0 : x < 0\nh1 : -1 < x\n⊢ 0 < -x\n[PROOFSTEP]\nlinarith\n[GOAL]\nx y : ℝ\nh0 : x < 0\nh1 : -1 < x\nh0' : 0 < -x\n⊢ log (-x) < 0\n[PROOFSTEP]\nhave h1' : -x < 1 := by linarith\n[GOAL]\nx y : ℝ\nh0 : x < 0\nh1 : -1 < x\nh0' : 0 < -x\n⊢ -x < 1\n[PROOFSTEP]\nlinarith\n[GOAL]\nx y : ℝ\nh0 : x < 0\nh1 : -1 < x\nh0' : 0 < -x\nh1' : -x < 1\n⊢ log (-x) < 0\n[PROOFSTEP]\nexact log_neg h0' h1'\n[GOAL]\nx y : ℝ\nhx : 0 < x\n⊢ 0 ≤ log x ↔ 1 ≤ x\n[PROOFSTEP]\nrw [← not_lt, log_neg_iff hx, not_lt]\n[GOAL]\nx y : ℝ\nhx : 0 < x\n⊢ log x ≤ 0 ↔ x ≤ 1\n[PROOFSTEP]\nrw [← not_lt, log_pos_iff hx, not_lt]\n[GOAL]\nx y : ℝ\nhx : 0 ≤ x\n⊢ log x ≤ 0 ↔ x ≤ 1\n[PROOFSTEP]\nrcases hx.eq_or_lt with (rfl | hx)\n[GOAL]\ncase inl\ny : ℝ\nhx : 0 ≤ 0\n⊢ log 0 ≤ 0 ↔ 0 ≤ 1\n[PROOFSTEP]\nsimp [le_refl, zero_le_one]\n[GOAL]\ncase inr\nx y : ℝ\nhx✝ : 0 ≤ x\nhx : 0 < x\n⊢ log x ≤ 0 ↔ x ≤ 1\n[PROOFSTEP]\nexact log_nonpos_iff hx\n[GOAL]\nx y : ℝ\nn : ℕ\n⊢ 0 ≤ log ↑n\n[PROOFSTEP]\nby_cases hn : n = 0\n[GOAL]\ncase pos\nx y : ℝ\nn : ℕ\nhn : n = 0\n⊢ 0 ≤ log ↑n\ncase neg x y : ℝ n : ℕ hn : ¬n = 0 ⊢ 0 ≤ log ↑n\n[PROOFSTEP]\ncase pos => simp [hn]\n[GOAL]\nx y : ℝ\nn : ℕ\nhn : n = 0\n⊢ 0 ≤ log ↑n\n[PROOFSTEP]\ncase pos => simp [hn]\n[GOAL]\nx y : ℝ\nn : ℕ\nhn : n = 0\n⊢ 0 ≤ log ↑n\n[PROOFSTEP]\nsimp [hn]\n[GOAL]\ncase neg\nx y : ℝ\nn : ℕ\nhn : ¬n = 0\n⊢ 0 ≤ log ↑n\n[PROOFSTEP]\ncase neg =>\n  have : (1 : ℝ) ≤ n := by exact_mod_cast Nat.one_le_of_lt <| Nat.pos_of_ne_zero hn\n  exact log_nonneg this\n[GOAL]\nx y : ℝ\nn : ℕ\nhn : ¬n = 0\n⊢ 0 ≤ log ↑n\n[PROOFSTEP]\ncase neg =>\n  have : (1 : ℝ) ≤ n := by exact_mod_cast Nat.one_le_of_lt <| Nat.pos_of_ne_zero hn\n  exact log_nonneg this\n[GOAL]\nx y : ℝ\nn : ℕ\nhn : ¬n = 0\n⊢ 0 ≤ log ↑n\n[PROOFSTEP]\nhave : (1 : ℝ) ≤ n := by exact_mod_cast Nat.one_le_of_lt <| Nat.pos_of_ne_zero hn\n[GOAL]\nx y : ℝ\nn : ℕ\nhn : ¬n = 0\n⊢ 1 ≤ ↑n\n[PROOFSTEP]\nexact_mod_cast Nat.one_le_of_lt <| Nat.pos_of_ne_zero hn\n[GOAL]\nx y : ℝ\nn : ℕ\nhn : ¬n = 0\nthis : 1 ≤ ↑n\n⊢ 0 ≤ log ↑n\n[PROOFSTEP]\nexact log_nonneg this\n[GOAL]\nx y : ℝ\nn : ℕ\n⊢ 0 ≤ log (-↑n)\n[PROOFSTEP]\nrw [← log_neg_eq_log, neg_neg]\n[GOAL]\nx y : ℝ\nn : ℕ\n⊢ 0 ≤ log ↑n\n[PROOFSTEP]\nexact log_nat_cast_nonneg _\n[GOAL]\nx y : ℝ\nn : ℤ\n⊢ 0 ≤ log ↑n\n[PROOFSTEP]\ncases lt_trichotomy 0 n with\n| inl hn =>\n  have : (1 : ℝ) ≤ n := by exact_mod_cast hn\n  exact log_nonneg this\n| inr hn =>\n  cases hn with\n  | inl hn => simp [hn.symm]\n  | inr hn =>\n    have : (1 : ℝ) ≤ -n := by rw [← neg_zero, ← lt_neg] at hn ; exact_mod_cast hn\n    rw [← log_neg_eq_log]\n    exact log_nonneg this\n[GOAL]\nx y : ℝ\nn : ℤ\nx✝ : 0 < n ∨ 0 = n ∨ n < 0\n⊢ 0 ≤ log ↑n\n[PROOFSTEP]\ncases lt_trichotomy 0 n with\n| inl hn =>\n  have : (1 : ℝ) ≤ n := by exact_mod_cast hn\n  exact log_nonneg this\n| inr hn =>\n  cases hn with\n  | inl hn => simp [hn.symm]\n  | inr hn =>\n    have : (1 : ℝ) ≤ -n := by rw [← neg_zero, ← lt_neg] at hn ; exact_mod_cast hn\n    rw [← log_neg_eq_log]\n    exact log_nonneg this\n[GOAL]\ncase inl\nx y : ℝ\nn : ℤ\nhn : 0 < n\n⊢ 0 ≤ log ↑n\n[PROOFSTEP]\n\n| inl hn =>\n  have : (1 : ℝ) ≤ n := by exact_mod_cast hn\n  exact log_nonneg this\n[GOAL]\ncase inl\nx y : ℝ\nn : ℤ\nhn : 0 < n\n⊢ 0 ≤ log ↑n\n[PROOFSTEP]\nhave : (1 : ℝ) ≤ n := by exact_mod_cast hn\n[GOAL]\nx y : ℝ\nn : ℤ\nhn : 0 < n\n⊢ 1 ≤ ↑n\n[PROOFSTEP]\nexact_mod_cast hn\n[GOAL]\ncase inl\nx y : ℝ\nn : ℤ\nhn : 0 < n\nthis : 1 ≤ ↑n\n⊢ 0 ≤ log ↑n\n[PROOFSTEP]\nexact log_nonneg this\n[GOAL]\ncase inr\nx y : ℝ\nn : ℤ\nhn : 0 = n ∨ n < 0\n⊢ 0 ≤ log ↑n\n[PROOFSTEP]\n\n| inr hn =>\n  cases hn with\n  | inl hn => simp [hn.symm]\n  | inr hn =>\n    have : (1 : ℝ) ≤ -n := by rw [← neg_zero, ← lt_neg] at hn ; exact_mod_cast hn\n    rw [← log_neg_eq_log]\n    exact log_nonneg this\n[GOAL]\ncase inr\nx y : ℝ\nn : ℤ\nhn : 0 = n ∨ n < 0\n⊢ 0 ≤ log ↑n\n[PROOFSTEP]\ncases hn with\n| inl hn => simp [hn.symm]\n| inr hn =>\n  have : (1 : ℝ) ≤ -n := by rw [← neg_zero, ← lt_neg] at hn ; exact_mod_cast hn\n  rw [← log_neg_eq_log]\n  exact log_nonneg this\n[GOAL]\ncase inr\nx y : ℝ\nn : ℤ\nhn : 0 = n ∨ n < 0\n⊢ 0 ≤ log ↑n\n[PROOFSTEP]\ncases hn with\n| inl hn => simp [hn.symm]\n| inr hn =>\n  have : (1 : ℝ) ≤ -n := by rw [← neg_zero, ← lt_neg] at hn ; exact_mod_cast hn\n  rw [← log_neg_eq_log]\n  exact log_nonneg this\n[GOAL]\ncase inr.inl\nx y : ℝ\nn : ℤ\nhn : 0 = n\n⊢ 0 ≤ log ↑n\n[PROOFSTEP]\n\n| inl hn => simp [hn.symm]\n[GOAL]\ncase inr.inl\nx y : ℝ\nn : ℤ\nhn : 0 = n\n⊢ 0 ≤ log ↑n\n[PROOFSTEP]\nsimp [hn.symm]\n[GOAL]\ncase inr.inr\nx y : ℝ\nn : ℤ\nhn : n < 0\n⊢ 0 ≤ log ↑n\n[PROOFSTEP]\n\n| inr hn =>\n  have : (1 : ℝ) ≤ -n := by rw [← neg_zero, ← lt_neg] at hn ; exact_mod_cast hn\n  rw [← log_neg_eq_log]\n  exact log_nonneg this\n[GOAL]\ncase inr.inr\nx y : ℝ\nn : ℤ\nhn : n < 0\n⊢ 0 ≤ log ↑n\n[PROOFSTEP]\nhave : (1 : ℝ) ≤ -n := by rw [← neg_zero, ← lt_neg] at hn ; exact_mod_cast hn\n[GOAL]\nx y : ℝ\nn : ℤ\nhn : n < 0\n⊢ 1 ≤ -↑n\n[PROOFSTEP]\nrw [← neg_zero, ← lt_neg] at hn \n[GOAL]\nx y : ℝ\nn : ℤ\nhn : 0 < -n\n⊢ 1 ≤ -↑n\n[PROOFSTEP]\nexact_mod_cast hn\n[GOAL]\ncase inr.inr\nx y : ℝ\nn : ℤ\nhn : n < 0\nthis : 1 ≤ -↑n\n⊢ 0 ≤ log ↑n\n[PROOFSTEP]\nrw [← log_neg_eq_log]\n[GOAL]\ncase inr.inr\nx y : ℝ\nn : ℤ\nhn : n < 0\nthis : 1 ≤ -↑n\n⊢ 0 ≤ log (-↑n)\n[PROOFSTEP]\nexact log_nonneg this\n[GOAL]\nx y : ℝ\n⊢ StrictAntiOn log (Iio 0)\n[PROOFSTEP]\nrintro x (hx : x < 0) y (hy : y < 0) hxy\n[GOAL]\nx✝ y✝ x : ℝ\nhx : x < 0\ny : ℝ\nhy : y < 0\nhxy : x < y\n⊢ log y < log x\n[PROOFSTEP]\nrw [← log_abs y, ← log_abs x]\n[GOAL]\nx✝ y✝ x : ℝ\nhx : x < 0\ny : ℝ\nhy : y < 0\nhxy : x < y\n⊢ log |y| < log |x|\n[PROOFSTEP]\nrefine' log_lt_log (abs_pos.2 hy.ne) _\n[GOAL]\nx✝ y✝ x : ℝ\nhx : x < 0\ny : ℝ\nhy : y < 0\nhxy : x < y\n⊢ |y| < |x|\n[PROOFSTEP]\nrwa [abs_of_neg hy, abs_of_neg hx, neg_lt_neg_iff]\n[GOAL]\nx y : ℝ\nhx1 : 0 < x\nhx2 : x ≠ 1\n⊢ log x < x - 1\n[PROOFSTEP]\nhave h : log x ≠ 0\n[GOAL]\ncase h\nx y : ℝ\nhx1 : 0 < x\nhx2 : x ≠ 1\n⊢ log x ≠ 0\n[PROOFSTEP]\nrwa [← log_one, log_injOn_pos.ne_iff hx1]\n[GOAL]\ncase h\nx y : ℝ\nhx1 : 0 < x\nhx2 : x ≠ 1\n⊢ 1 ∈ Ioi 0\n[PROOFSTEP]\nexact mem_Ioi.mpr zero_lt_one\n[GOAL]\nx y : ℝ\nhx1 : 0 < x\nhx2 : x ≠ 1\nh : log x ≠ 0\n⊢ log x < x - 1\n[PROOFSTEP]\nlinarith [add_one_lt_exp_of_nonzero h, exp_log hx1]\n[GOAL]\nx✝ y x : ℝ\n⊢ log x = 0 ↔ x = 0 ∨ x = 1 ∨ x = -1\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nx✝ y x : ℝ\n⊢ log x = 0 → x = 0 ∨ x = 1 ∨ x = -1\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nx✝ y x : ℝ\nh : log x = 0\n⊢ x = 0 ∨ x = 1 ∨ x = -1\n[PROOFSTEP]\nrcases lt_trichotomy x 0 with (x_lt_zero | rfl | x_gt_zero)\n[GOAL]\ncase mp.inl\nx✝ y x : ℝ\nh : log x = 0\nx_lt_zero : x < 0\n⊢ x = 0 ∨ x = 1 ∨ x = -1\n[PROOFSTEP]\nrefine' Or.inr (Or.inr (neg_eq_iff_eq_neg.mp _))\n[GOAL]\ncase mp.inl\nx✝ y x : ℝ\nh : log x = 0\nx_lt_zero : x < 0\n⊢ -x = 1\n[PROOFSTEP]\nrw [← log_neg_eq_log x] at h \n[GOAL]\ncase mp.inl\nx✝ y x : ℝ\nh : log (-x) = 0\nx_lt_zero : x < 0\n⊢ -x = 1\n[PROOFSTEP]\nexact eq_one_of_pos_of_log_eq_zero (neg_pos.mpr x_lt_zero) h\n[GOAL]\ncase mp.inr.inl\nx y : ℝ\nh : log 0 = 0\n⊢ 0 = 0 ∨ 0 = 1 ∨ 0 = -1\n[PROOFSTEP]\nexact Or.inl rfl\n[GOAL]\ncase mp.inr.inr\nx✝ y x : ℝ\nh : log x = 0\nx_gt_zero : 0 < x\n⊢ x = 0 ∨ x = 1 ∨ x = -1\n[PROOFSTEP]\nexact Or.inr (Or.inl (eq_one_of_pos_of_log_eq_zero x_gt_zero h))\n[GOAL]\ncase mpr\nx✝ y x : ℝ\n⊢ x = 0 ∨ x = 1 ∨ x = -1 → log x = 0\n[PROOFSTEP]\nrintro (rfl | rfl | rfl)\n[GOAL]\ncase mpr.inl\nx y : ℝ\n⊢ log 0 = 0\n[PROOFSTEP]\nsimp only [log_one, log_zero, log_neg_eq_log]\n[GOAL]\ncase mpr.inr.inl\nx y : ℝ\n⊢ log 1 = 0\n[PROOFSTEP]\nsimp only [log_one, log_zero, log_neg_eq_log]\n[GOAL]\ncase mpr.inr.inr\nx y : ℝ\n⊢ log (-1) = 0\n[PROOFSTEP]\nsimp only [log_one, log_zero, log_neg_eq_log]\n[GOAL]\nx✝ y x : ℝ\n⊢ log x ≠ 0 ↔ x ≠ 0 ∧ x ≠ 1 ∧ x ≠ -1\n[PROOFSTEP]\nsimpa only [not_or] using log_eq_zero.not\n[GOAL]\nx✝ y x : ℝ\nn : ℕ\n⊢ log (x ^ n) = ↑n * log x\n[PROOFSTEP]\ninduction' n with n ih\n[GOAL]\ncase zero\nx✝ y x : ℝ\n⊢ log (x ^ Nat.zero) = ↑Nat.zero * log x\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\nx✝ y x : ℝ\nn : ℕ\nih : log (x ^ n) = ↑n * log x\n⊢ log (x ^ Nat.succ n) = ↑(Nat.succ n) * log x\n[PROOFSTEP]\nrcases eq_or_ne x 0 with (rfl | hx)\n[GOAL]\ncase succ.inl\nx y : ℝ\nn : ℕ\nih : log (0 ^ n) = ↑n * log 0\n⊢ log (0 ^ Nat.succ n) = ↑(Nat.succ n) * log 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ.inr\nx✝ y x : ℝ\nn : ℕ\nih : log (x ^ n) = ↑n * log x\nhx : x ≠ 0\n⊢ log (x ^ Nat.succ n) = ↑(Nat.succ n) * log x\n[PROOFSTEP]\nrw [pow_succ', log_mul (pow_ne_zero _ hx) hx, ih, Nat.cast_succ, add_mul, one_mul]\n[GOAL]\nx✝ y x : ℝ\nn : ℤ\n⊢ log (x ^ n) = ↑n * log x\n[PROOFSTEP]\ninduction n\n[GOAL]\ncase ofNat\nx✝ y x : ℝ\na✝ : ℕ\n⊢ log (x ^ Int.ofNat a✝) = ↑(Int.ofNat a✝) * log x\n[PROOFSTEP]\nrw [Int.ofNat_eq_coe, zpow_ofNat, log_pow, Int.cast_ofNat]\n[GOAL]\ncase negSucc\nx✝ y x : ℝ\na✝ : ℕ\n⊢ log (x ^ Int.negSucc a✝) = ↑(Int.negSucc a✝) * log x\n[PROOFSTEP]\nrw [zpow_negSucc, log_inv, log_pow, Int.cast_negSucc, Nat.cast_add_one, neg_mul_eq_neg_mul]\n[GOAL]\nx✝ y x : ℝ\nhx : 0 ≤ x\n⊢ log (sqrt x) = log x / 2\n[PROOFSTEP]\nrw [eq_div_iff, mul_comm, ← Nat.cast_two, ← log_pow, sq_sqrt hx]\n[GOAL]\nx✝ y x : ℝ\nhx : 0 ≤ x\n⊢ 2 ≠ 0\n[PROOFSTEP]\nexact two_ne_zero\n[GOAL]\nx✝ y x : ℝ\nhx : 0 < x\n⊢ log x ≤ x - 1\n[PROOFSTEP]\nrw [le_sub_iff_add_le]\n[GOAL]\nx✝ y x : ℝ\nhx : 0 < x\n⊢ log x + 1 ≤ x\n[PROOFSTEP]\nconvert add_one_le_exp (log x)\n[GOAL]\ncase h.e'_4\nx✝ y x : ℝ\nhx : 0 < x\n⊢ x = exp (log x)\n[PROOFSTEP]\nrw [exp_log hx]\n[GOAL]\nx✝ y x : ℝ\nh1 : 0 < x\nh2 : x ≤ 1\n⊢ |log x * x| < 1\n[PROOFSTEP]\nhave : 0 < 1 / x := by simpa only [one_div, inv_pos] using h1\n[GOAL]\nx✝ y x : ℝ\nh1 : 0 < x\nh2 : x ≤ 1\n⊢ 0 < 1 / x\n[PROOFSTEP]\nsimpa only [one_div, inv_pos] using h1\n[GOAL]\nx✝ y x : ℝ\nh1 : 0 < x\nh2 : x ≤ 1\nthis : 0 < 1 / x\n⊢ |log x * x| < 1\n[PROOFSTEP]\nreplace := log_le_sub_one_of_pos this\n[GOAL]\nx✝ y x : ℝ\nh1 : 0 < x\nh2 : x ≤ 1\nthis : log (1 / x) ≤ 1 / x - 1\n⊢ |log x * x| < 1\n[PROOFSTEP]\nreplace : log (1 / x) < 1 / x := by linarith\n[GOAL]\nx✝ y x : ℝ\nh1 : 0 < x\nh2 : x ≤ 1\nthis : log (1 / x) ≤ 1 / x - 1\n⊢ log (1 / x) < 1 / x\n[PROOFSTEP]\nlinarith\n[GOAL]\nx✝ y x : ℝ\nh1 : 0 < x\nh2 : x ≤ 1\nthis : log (1 / x) < 1 / x\n⊢ |log x * x| < 1\n[PROOFSTEP]\nrw [log_div one_ne_zero h1.ne', log_one, zero_sub, lt_div_iff h1] at this \n[GOAL]\nx✝ y x : ℝ\nh1 : 0 < x\nh2 : x ≤ 1\nthis : -log x * x < 1\n⊢ |log x * x| < 1\n[PROOFSTEP]\nhave aux : 0 ≤ -log x * x := by\n  refine' mul_nonneg _ h1.le\n  rw [← log_inv]\n  apply log_nonneg\n  rw [← le_inv h1 zero_lt_one, inv_one]\n  exact h2\n[GOAL]\nx✝ y x : ℝ\nh1 : 0 < x\nh2 : x ≤ 1\nthis : -log x * x < 1\n⊢ 0 ≤ -log x * x\n[PROOFSTEP]\nrefine' mul_nonneg _ h1.le\n[GOAL]\nx✝ y x : ℝ\nh1 : 0 < x\nh2 : x ≤ 1\nthis : -log x * x < 1\n⊢ 0 ≤ -log x\n[PROOFSTEP]\nrw [← log_inv]\n[GOAL]\nx✝ y x : ℝ\nh1 : 0 < x\nh2 : x ≤ 1\nthis : -log x * x < 1\n⊢ 0 ≤ log x⁻¹\n[PROOFSTEP]\napply log_nonneg\n[GOAL]\ncase hx\nx✝ y x : ℝ\nh1 : 0 < x\nh2 : x ≤ 1\nthis : -log x * x < 1\n⊢ 1 ≤ x⁻¹\n[PROOFSTEP]\nrw [← le_inv h1 zero_lt_one, inv_one]\n[GOAL]\ncase hx\nx✝ y x : ℝ\nh1 : 0 < x\nh2 : x ≤ 1\nthis : -log x * x < 1\n⊢ x ≤ 1\n[PROOFSTEP]\nexact h2\n[GOAL]\nx✝ y x : ℝ\nh1 : 0 < x\nh2 : x ≤ 1\nthis : -log x * x < 1\naux : 0 ≤ -log x * x\n⊢ |log x * x| < 1\n[PROOFSTEP]\nrw [← abs_of_nonneg aux, neg_mul, abs_neg] at this \n[GOAL]\nx✝ y x : ℝ\nh1 : 0 < x\nh2 : x ≤ 1\nthis : |log x * x| < 1\naux : 0 ≤ -log x * x\n⊢ |log x * x| < 1\n[PROOFSTEP]\nexact this\n[GOAL]\nx y : ℝ\n⊢ Tendsto (fun x => log (exp x)) atTop atTop\n[PROOFSTEP]\nsimpa only [log_exp] using tendsto_id\n[GOAL]\nx y : ℝ\n⊢ Tendsto log (𝓝[{0}ᶜ] 0) atBot\n[PROOFSTEP]\nrw [← show _ = log from funext log_abs]\n[GOAL]\nx y : ℝ\n⊢ Tendsto (fun x => log |x|) (𝓝[{0}ᶜ] 0) atBot\n[PROOFSTEP]\nrefine' Tendsto.comp (g := log) _ tendsto_abs_nhdsWithin_zero\n[GOAL]\nx y : ℝ\n⊢ Tendsto log (𝓝[Ioi 0] 0) atBot\n[PROOFSTEP]\nsimpa [← tendsto_comp_exp_atBot] using tendsto_id\n[GOAL]\nx y : ℝ\n⊢ ContinuousOn log {0}ᶜ\n[PROOFSTEP]\nsimp only [continuousOn_iff_continuous_restrict, restrict]\n[GOAL]\nx y : ℝ\n⊢ Continuous fun x => log ↑x\n[PROOFSTEP]\nconv in log _ => rw [log_of_ne_zero (show (x : ℝ) ≠ 0 from x.2)]\n[GOAL]\nx✝ y : ℝ\nx : ↑{0}ᶜ\n| log ↑x\n[PROOFSTEP]\nrw [log_of_ne_zero (show (x : ℝ) ≠ 0 from x.2)]\n[GOAL]\nx✝ y : ℝ\nx : ↑{0}ᶜ\n| log ↑x\n[PROOFSTEP]\nrw [log_of_ne_zero (show (x : ℝ) ≠ 0 from x.2)]\n[GOAL]\nx✝ y : ℝ\nx : ↑{0}ᶜ\n| log ↑x\n[PROOFSTEP]\nrw [log_of_ne_zero (show (x : ℝ) ≠ 0 from x.2)]\n[GOAL]\nx y : ℝ\n⊢ Continuous fun x => ↑(OrderIso.symm expOrderIso) { val := |↑x|, property := (_ : 0 < |↑x|) }\n[PROOFSTEP]\nexact expOrderIso.symm.continuous.comp (continuous_subtype_val.norm.subtype_mk _)\n[GOAL]\nx y : ℝ\n⊢ ContinuousAt log x ↔ x ≠ 0\n[PROOFSTEP]\nrefine' ⟨_, continuousAt_log⟩\n[GOAL]\nx y : ℝ\n⊢ ContinuousAt log x → x ≠ 0\n[PROOFSTEP]\nrintro h rfl\n[GOAL]\ny : ℝ\nh : ContinuousAt log 0\n⊢ False\n[PROOFSTEP]\nexact not_tendsto_nhds_of_tendsto_atBot tendsto_log_nhdsWithin_zero _ (h.tendsto.mono_left inf_le_left)\n[GOAL]\nx y : ℝ\nα : Type u_1\ns : Finset α\nf : α → ℝ\nhf : ∀ (x : α), x ∈ s → f x ≠ 0\n⊢ log (∏ i in s, f i) = ∑ i in s, log (f i)\n[PROOFSTEP]\ninduction' s using Finset.cons_induction_on with a s ha ih\n[GOAL]\ncase h₁\nx y : ℝ\nα : Type u_1\ns : Finset α\nf : α → ℝ\nhf✝ : ∀ (x : α), x ∈ s → f x ≠ 0\nhf : ∀ (x : α), x ∈ ∅ → f x ≠ 0\n⊢ log (∏ i in ∅, f i) = ∑ i in ∅, log (f i)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h₂\nx y : ℝ\nα : Type u_1\ns✝ : Finset α\nf : α → ℝ\nhf✝ : ∀ (x : α), x ∈ s✝ → f x ≠ 0\na : α\ns : Finset α\nha : ¬a ∈ s\nih : (∀ (x : α), x ∈ s → f x ≠ 0) → log (∏ i in s, f i) = ∑ i in s, log (f i)\nhf : ∀ (x : α), x ∈ Finset.cons a s ha → f x ≠ 0\n⊢ log (∏ i in Finset.cons a s ha, f i) = ∑ i in Finset.cons a s ha, log (f i)\n[PROOFSTEP]\nrw [Finset.forall_mem_cons] at hf \n[GOAL]\ncase h₂\nx y : ℝ\nα : Type u_1\ns✝ : Finset α\nf : α → ℝ\nhf✝ : ∀ (x : α), x ∈ s✝ → f x ≠ 0\na : α\ns : Finset α\nha : ¬a ∈ s\nih : (∀ (x : α), x ∈ s → f x ≠ 0) → log (∏ i in s, f i) = ∑ i in s, log (f i)\nhf : f a ≠ 0 ∧ ∀ (x : α), x ∈ s → f x ≠ 0\n⊢ log (∏ i in Finset.cons a s ha, f i) = ∑ i in Finset.cons a s ha, log (f i)\n[PROOFSTEP]\nsimp [ih hf.2, log_mul hf.1 (Finset.prod_ne_zero_iff.2 hf.2)]\n[GOAL]\nx y : ℝ\nn : ℕ\n⊢ log ↑n = Finsupp.sum (Nat.factorization n) fun p t => ↑t * log ↑p\n[PROOFSTEP]\nrcases eq_or_ne n 0 with (rfl | hn)\n[GOAL]\ncase inl\nx y : ℝ\n⊢ log ↑0 = Finsupp.sum (Nat.factorization 0) fun p t => ↑t * log ↑p\n[PROOFSTEP]\nsimp\n  -- relies on junk values of `log` and `Nat.factorization`\n[GOAL]\ncase inr\nx y : ℝ\nn : ℕ\nhn : n ≠ 0\n⊢ log ↑n = Finsupp.sum (Nat.factorization n) fun p t => ↑t * log ↑p\n[PROOFSTEP]\nsimp only [← log_pow, ← Nat.cast_pow]\n[GOAL]\ncase inr\nx y : ℝ\nn : ℕ\nhn : n ≠ 0\n⊢ log ↑n = Finsupp.sum (Nat.factorization n) fun p t => log ↑(p ^ t)\n[PROOFSTEP]\nrw [← Finsupp.log_prod, ← Nat.cast_finsupp_prod, Nat.factorization_prod_pow_eq_self hn]\n[GOAL]\ncase inr.hg\nx y : ℝ\nn : ℕ\nhn : n ≠ 0\n⊢ ∀ (a : ℕ), ↑(a ^ ↑(Nat.factorization n) a) = 0 → ↑(Nat.factorization n) a = 0\n[PROOFSTEP]\nintro p hp\n[GOAL]\ncase inr.hg\nx y : ℝ\nn : ℕ\nhn : n ≠ 0\np : ℕ\nhp : ↑(p ^ ↑(Nat.factorization n) p) = 0\n⊢ ↑(Nat.factorization n) p = 0\n[PROOFSTEP]\nrw [pow_eq_zero (Nat.cast_eq_zero.1 hp), Nat.factorization_zero_right]\n[GOAL]\nx y a b : ℝ\nn : ℕ\nha : a ≠ 0\n⊢ (fun x => x ^ n / (a * exp x + b)) ∘ log =ᶠ[atTop] fun x => log x ^ n / (a * x + b)\n[PROOFSTEP]\nfilter_upwards [eventually_gt_atTop (0 : ℝ)] with x hx using by simp [exp_log hx]\n[GOAL]\nx✝ y a b : ℝ\nn : ℕ\nha : a ≠ 0\nx : ℝ\nhx : 0 < x\n⊢ ((fun x => x ^ n / (a * exp x + b)) ∘ log) x = log x ^ n / (a * x + b)\n[PROOFSTEP]\nsimp [exp_log hx]\n[GOAL]\nx y : ℝ\nn : ℕ\n⊢ (fun x => log x ^ n) =o[atTop] id\n[PROOFSTEP]\nrw [Asymptotics.isLittleO_iff_tendsto']\n[GOAL]\nx y : ℝ\nn : ℕ\n⊢ Tendsto (fun x => log x ^ n / id x) atTop (𝓝 0)\n[PROOFSTEP]\nsimpa using tendsto_pow_log_div_mul_add_atTop 1 0 n one_ne_zero\n[GOAL]\nx y : ℝ\nn : ℕ\n⊢ ∀ᶠ (x : ℝ) in atTop, id x = 0 → log x ^ n = 0\n[PROOFSTEP]\nfilter_upwards [eventually_ne_atTop (0 : ℝ)] with x h₁ h₂ using (h₁ h₂).elim\n[GOAL]\nx y c : ℝ\n⊢ (fun x => c) =o[atTop] log\n[PROOFSTEP]\nrefine Asymptotics.isLittleO_of_tendsto' ?_ <| Tendsto.div_atTop (a := c) (by simp) tendsto_log_atTop\n[GOAL]\nx y c : ℝ\n⊢ Tendsto (fun x => c) atTop (𝓝 c)\n[PROOFSTEP]\nsimp\n[GOAL]\nx y c : ℝ\n⊢ ∀ᶠ (x : ℝ) in atTop, log x = 0 → c = 0\n[PROOFSTEP]\nfilter_upwards [eventually_gt_atTop 1] with x hx\n[GOAL]\ncase h\nx✝ y c x : ℝ\nhx : 1 < x\n⊢ log x = 0 → c = 0\n[PROOFSTEP]\naesop (add safe forward log_pos)\n[GOAL]\ny : ℝ\n⊢ Tendsto (fun x => log (x + y) - log x) atTop (𝓝 0)\n[PROOFSTEP]\nhave : Tendsto (fun x ↦ 1 + y / x) atTop (𝓝 (1 + 0))\n[GOAL]\ncase this\ny : ℝ\n⊢ Tendsto (fun x => 1 + y / x) atTop (𝓝 (1 + 0))\n[PROOFSTEP]\nexact tendsto_const_nhds.add (tendsto_const_nhds.div_atTop tendsto_id)\n[GOAL]\ny : ℝ\nthis : Tendsto (fun x => 1 + y / x) atTop (𝓝 (1 + 0))\n⊢ Tendsto (fun x => log (x + y) - log x) atTop (𝓝 0)\n[PROOFSTEP]\nrw [← comap_exp_nhds_exp, exp_zero, tendsto_comap_iff, ← add_zero (1 : ℝ)]\n[GOAL]\ny : ℝ\nthis : Tendsto (fun x => 1 + y / x) atTop (𝓝 (1 + 0))\n⊢ Tendsto (exp ∘ fun x => log (x + y) - log x) atTop (𝓝 (1 + 0))\n[PROOFSTEP]\nrefine' this.congr' _\n[GOAL]\ny : ℝ\nthis : Tendsto (fun x => 1 + y / x) atTop (𝓝 (1 + 0))\n⊢ (fun x => 1 + y / x) =ᶠ[atTop] exp ∘ fun x => log (x + y) - log x\n[PROOFSTEP]\nfilter_upwards [eventually_gt_atTop (0 : ℝ), eventually_gt_atTop (-y)] with x hx₀ hxy\n[GOAL]\ncase h\ny : ℝ\nthis : Tendsto (fun x => 1 + y / x) atTop (𝓝 (1 + 0))\nx : ℝ\nhx₀ : 0 < x\nhxy : -y < x\n⊢ 1 + y / x = (exp ∘ fun x => log (x + y) - log x) x\n[PROOFSTEP]\nrw [comp_apply, exp_sub, exp_log, exp_log, one_add_div]\n[GOAL]\ncase h\ny : ℝ\nthis : Tendsto (fun x => 1 + y / x) atTop (𝓝 (1 + 0))\nx : ℝ\nhx₀ : 0 < x\nhxy : -y < x\n⊢ x ≠ 0\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase h\ny : ℝ\nthis : Tendsto (fun x => 1 + y / x) atTop (𝓝 (1 + 0))\nx : ℝ\nhx₀ : 0 < x\nhxy : -y < x\n⊢ 0 < x\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase h\ny : ℝ\nthis : Tendsto (fun x => 1 + y / x) atTop (𝓝 (1 + 0))\nx : ℝ\nhx₀ : 0 < x\nhxy : -y < x\n⊢ 0 < x + y\n[PROOFSTEP]\nlinarith\n[GOAL]\ne : ℝ\nn : ℕ\nh : NormNum.IsNat e n\n⊢ 0 ≤ Real.log e\n[PROOFSTEP]\nrw [NormNum.IsNat.to_eq h rfl]\n[GOAL]\ne : ℝ\nn : ℕ\nh : NormNum.IsNat e n\n⊢ 0 ≤ Real.log ↑n\n[PROOFSTEP]\nexact Real.log_nat_cast_nonneg _\n[GOAL]\ne : ℝ\nn : ℕ\nh : NormNum.IsNat e n\nw : Nat.blt 1 n = true\n⊢ 0 < Real.log e\n[PROOFSTEP]\nrw [NormNum.IsNat.to_eq h rfl]\n[GOAL]\ne : ℝ\nn : ℕ\nh : NormNum.IsNat e n\nw : Nat.blt 1 n = true\n⊢ 0 < Real.log ↑n\n[PROOFSTEP]\napply Real.log_pos\n[GOAL]\ncase hx\ne : ℝ\nn : ℕ\nh : NormNum.IsNat e n\nw : Nat.blt 1 n = true\n⊢ 1 < ↑n\n[PROOFSTEP]\nsimpa using w\n[GOAL]\ne : ℝ\nn : ℕ\nh : NormNum.IsInt e (Int.negOfNat n)\n⊢ 0 ≤ Real.log e\n[PROOFSTEP]\nrw [NormNum.IsInt.neg_to_eq h rfl]\n[GOAL]\ne : ℝ\nn : ℕ\nh : NormNum.IsInt e (Int.negOfNat n)\n⊢ 0 ≤ Real.log (-↑n)\n[PROOFSTEP]\nexact Real.log_neg_nat_cast_nonneg _\n[GOAL]\ne : ℝ\nn : ℕ\nh : NormNum.IsInt e (Int.negOfNat n)\nw : Nat.blt 1 n = true\n⊢ 0 < Real.log e\n[PROOFSTEP]\nrw [NormNum.IsInt.neg_to_eq h rfl]\n[GOAL]\ne : ℝ\nn : ℕ\nh : NormNum.IsInt e (Int.negOfNat n)\nw : Nat.blt 1 n = true\n⊢ 0 < Real.log (-↑n)\n[PROOFSTEP]\nrw [Real.log_neg_eq_log]\n[GOAL]\ne : ℝ\nn : ℕ\nh : NormNum.IsInt e (Int.negOfNat n)\nw : Nat.blt 1 n = true\n⊢ 0 < Real.log ↑n\n[PROOFSTEP]\napply Real.log_pos\n[GOAL]\ncase hx\ne : ℝ\nn : ℕ\nh : NormNum.IsInt e (Int.negOfNat n)\nw : Nat.blt 1 n = true\n⊢ 1 < ↑n\n[PROOFSTEP]\nsimpa using w\n[GOAL]\ne : ℝ\nn : ℤ\nd : ℕ\ninv : Invertible ↑d\neq : e = ↑n * ⅟↑d\nh : decide (1 < ↑n / ↑d) = true\n⊢ 0 < Real.log e\n[PROOFSTEP]\nrw [eq, invOf_eq_inv, ← div_eq_mul_inv]\n[GOAL]\ne : ℝ\nn : ℤ\nd : ℕ\ninv : Invertible ↑d\neq : e = ↑n * ⅟↑d\nh : decide (1 < ↑n / ↑d) = true\n⊢ 0 < Real.log (↑n / ↑d)\n[PROOFSTEP]\nhave : 1 < (n : ℝ) / d := by exact_mod_cast of_decide_eq_true h\n[GOAL]\ne : ℝ\nn : ℤ\nd : ℕ\ninv : Invertible ↑d\neq : e = ↑n * ⅟↑d\nh : decide (1 < ↑n / ↑d) = true\n⊢ 1 < ↑n / ↑d\n[PROOFSTEP]\nexact_mod_cast of_decide_eq_true h\n[GOAL]\ne : ℝ\nn : ℤ\nd : ℕ\ninv : Invertible ↑d\neq : e = ↑n * ⅟↑d\nh : decide (1 < ↑n / ↑d) = true\nthis : 1 < ↑n / ↑d\n⊢ 0 < Real.log (↑n / ↑d)\n[PROOFSTEP]\nexact Real.log_pos this\n[GOAL]\ne : ℝ\nn : ℤ\nd : ℕ\ninv : Invertible ↑d\neq : e = ↑n * ⅟↑d\nh : decide (↑n / ↑d < -1) = true\n⊢ 0 < Real.log e\n[PROOFSTEP]\nrw [eq, invOf_eq_inv, ← div_eq_mul_inv]\n[GOAL]\ne : ℝ\nn : ℤ\nd : ℕ\ninv : Invertible ↑d\neq : e = ↑n * ⅟↑d\nh : decide (↑n / ↑d < -1) = true\n⊢ 0 < Real.log (↑n / ↑d)\n[PROOFSTEP]\nhave : (n : ℝ) / d < -1 := by exact_mod_cast of_decide_eq_true h\n[GOAL]\ne : ℝ\nn : ℤ\nd : ℕ\ninv : Invertible ↑d\neq : e = ↑n * ⅟↑d\nh : decide (↑n / ↑d < -1) = true\n⊢ ↑n / ↑d < -1\n[PROOFSTEP]\nexact_mod_cast of_decide_eq_true h\n[GOAL]\ne : ℝ\nn : ℤ\nd : ℕ\ninv : Invertible ↑d\neq : e = ↑n * ⅟↑d\nh : decide (↑n / ↑d < -1) = true\nthis : ↑n / ↑d < -1\n⊢ 0 < Real.log (↑n / ↑d)\n[PROOFSTEP]\nexact Real.log_pos_of_lt_neg_one this\n[GOAL]\ne : ℝ\nn : ℤ\nd : ℕ\ninv : Invertible ↑d\neq : e = ↑n * ⅟↑d\nh₁ : decide (0 < ↑n / ↑d) = true\nh₂ : decide (↑n / ↑d < 1) = true\n⊢ Real.log e ≠ 0\n[PROOFSTEP]\nrw [eq, invOf_eq_inv, ← div_eq_mul_inv]\n[GOAL]\ne : ℝ\nn : ℤ\nd : ℕ\ninv : Invertible ↑d\neq : e = ↑n * ⅟↑d\nh₁ : decide (0 < ↑n / ↑d) = true\nh₂ : decide (↑n / ↑d < 1) = true\n⊢ Real.log (↑n / ↑d) ≠ 0\n[PROOFSTEP]\nhave h₁' : 0 < (n : ℝ) / d := by exact_mod_cast of_decide_eq_true h₁\n[GOAL]\ne : ℝ\nn : ℤ\nd : ℕ\ninv : Invertible ↑d\neq : e = ↑n * ⅟↑d\nh₁ : decide (0 < ↑n / ↑d) = true\nh₂ : decide (↑n / ↑d < 1) = true\n⊢ 0 < ↑n / ↑d\n[PROOFSTEP]\nexact_mod_cast of_decide_eq_true h₁\n[GOAL]\ne : ℝ\nn : ℤ\nd : ℕ\ninv : Invertible ↑d\neq : e = ↑n * ⅟↑d\nh₁ : decide (0 < ↑n / ↑d) = true\nh₂ : decide (↑n / ↑d < 1) = true\nh₁' : 0 < ↑n / ↑d\n⊢ Real.log (↑n / ↑d) ≠ 0\n[PROOFSTEP]\nhave h₂' : (n : ℝ) / d < 1 := by exact_mod_cast of_decide_eq_true h₂\n[GOAL]\ne : ℝ\nn : ℤ\nd : ℕ\ninv : Invertible ↑d\neq : e = ↑n * ⅟↑d\nh₁ : decide (0 < ↑n / ↑d) = true\nh₂ : decide (↑n / ↑d < 1) = true\nh₁' : 0 < ↑n / ↑d\n⊢ ↑n / ↑d < 1\n[PROOFSTEP]\nexact_mod_cast of_decide_eq_true h₂\n[GOAL]\ne : ℝ\nn : ℤ\nd : ℕ\ninv : Invertible ↑d\neq : e = ↑n * ⅟↑d\nh₁ : decide (0 < ↑n / ↑d) = true\nh₂ : decide (↑n / ↑d < 1) = true\nh₁' : 0 < ↑n / ↑d\nh₂' : ↑n / ↑d < 1\n⊢ Real.log (↑n / ↑d) ≠ 0\n[PROOFSTEP]\nexact ne_of_lt <| Real.log_neg h₁' h₂'\n[GOAL]\ne : ℝ\nn : ℤ\nd : ℕ\ninv : Invertible ↑d\neq : e = ↑n * ⅟↑d\nh₁ : decide (↑n / ↑d < 0) = true\nh₂ : decide (-1 < ↑n / ↑d) = true\n⊢ Real.log e ≠ 0\n[PROOFSTEP]\nrw [eq, invOf_eq_inv, ← div_eq_mul_inv]\n[GOAL]\ne : ℝ\nn : ℤ\nd : ℕ\ninv : Invertible ↑d\neq : e = ↑n * ⅟↑d\nh₁ : decide (↑n / ↑d < 0) = true\nh₂ : decide (-1 < ↑n / ↑d) = true\n⊢ Real.log (↑n / ↑d) ≠ 0\n[PROOFSTEP]\nhave h₁' : (n : ℝ) / d < 0 := by exact_mod_cast of_decide_eq_true h₁\n[GOAL]\ne : ℝ\nn : ℤ\nd : ℕ\ninv : Invertible ↑d\neq : e = ↑n * ⅟↑d\nh₁ : decide (↑n / ↑d < 0) = true\nh₂ : decide (-1 < ↑n / ↑d) = true\n⊢ ↑n / ↑d < 0\n[PROOFSTEP]\nexact_mod_cast of_decide_eq_true h₁\n[GOAL]\ne : ℝ\nn : ℤ\nd : ℕ\ninv : Invertible ↑d\neq : e = ↑n * ⅟↑d\nh₁ : decide (↑n / ↑d < 0) = true\nh₂ : decide (-1 < ↑n / ↑d) = true\nh₁' : ↑n / ↑d < 0\n⊢ Real.log (↑n / ↑d) ≠ 0\n[PROOFSTEP]\nhave h₂' : -1 < (n : ℝ) / d := by exact_mod_cast of_decide_eq_true h₂\n[GOAL]\ne : ℝ\nn : ℤ\nd : ℕ\ninv : Invertible ↑d\neq : e = ↑n * ⅟↑d\nh₁ : decide (↑n / ↑d < 0) = true\nh₂ : decide (-1 < ↑n / ↑d) = true\nh₁' : ↑n / ↑d < 0\n⊢ -1 < ↑n / ↑d\n[PROOFSTEP]\nexact_mod_cast of_decide_eq_true h₂\n[GOAL]\ne : ℝ\nn : ℤ\nd : ℕ\ninv : Invertible ↑d\neq : e = ↑n * ⅟↑d\nh₁ : decide (↑n / ↑d < 0) = true\nh₂ : decide (-1 < ↑n / ↑d) = true\nh₁' : ↑n / ↑d < 0\nh₂' : -1 < ↑n / ↑d\n⊢ Real.log (↑n / ↑d) ≠ 0\n[PROOFSTEP]\nexact ne_of_lt <| Real.log_neg_of_lt_zero h₁' h₂'\n[GOAL]\n$x✝ : Type x✝\n«$_zα» : Zero $x✝\n«$_pα» : PartialOrder $x✝\n«$e» : $x✝\n«$f» : ℝ → ℝ\n«$a» : ℝ\n«$n» : ℤ\n«$d» : ℕ\n«$i» : DivisionRing ℝ := Real.instDivisionRingReal\n«$p» : NormNum.IsRat «$a» «$n» «$d»\n⊢ Sort ?u.471336\n[PROOFSTEP]\nclear! «$i»\n[GOAL]\n$x✝ : Type x✝\n«$_zα» : Zero $x✝\n«$_pα» : PartialOrder $x✝\n«$e» : $x✝\n«$f» : ℝ → ℝ\n«$a» : ℝ\n«$n» : ℤ\n«$d» : ℕ\n⊢ Sort ?u.471336\n[PROOFSTEP]\nexact NormNum.IsRat «$a» «$n» «$d»\n", "meta": {"mathlib_filename": "Mathlib.Analysis.SpecialFunctions.Log.Basic", "llama_tokens": 16598, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7745833945721304, "lm_q2_score": 0.7025300511670689, "lm_q1q2_score": 0.5441681118219207}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : BooleanRing α\na b : α\n⊢ a + a = 0\n[PROOFSTEP]\nhave : a + a = a + a + (a + a) :=\n  calc\n    a + a = (a + a) * (a + a) := by rw [mul_self]\n    _ = a * a + a * a + (a * a + a * a) := by rw [add_mul, mul_add]\n    _ = a + a + (a + a) := by rw [mul_self]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : BooleanRing α\na b : α\n⊢ a + a = (a + a) * (a + a)\n[PROOFSTEP]\nrw [mul_self]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : BooleanRing α\na b : α\n⊢ (a + a) * (a + a) = a * a + a * a + (a * a + a * a)\n[PROOFSTEP]\nrw [add_mul, mul_add]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : BooleanRing α\na b : α\n⊢ a * a + a * a + (a * a + a * a) = a + a + (a + a)\n[PROOFSTEP]\nrw [mul_self]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : BooleanRing α\na b : α\nthis : a + a = a + a + (a + a)\n⊢ a + a = 0\n[PROOFSTEP]\nrwa [self_eq_add_left] at this \n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : BooleanRing α\na b : α\n⊢ -a = -a + 0\n[PROOFSTEP]\nrw [add_zero]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : BooleanRing α\na b : α\n⊢ -a + 0 = -a + -a + a\n[PROOFSTEP]\nrw [← neg_add_self, add_assoc]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : BooleanRing α\na b : α\n⊢ -a + -a + a = a\n[PROOFSTEP]\nrw [add_self, zero_add]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : BooleanRing α\na b : α\n⊢ a = -b ↔ a = b\n[PROOFSTEP]\nrw [neg_eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : BooleanRing α\na b : α\n⊢ a * b + b * a = 0\n[PROOFSTEP]\nhave : a + b = a + b + (a * b + b * a) :=\n  calc\n    a + b = (a + b) * (a + b) := by rw [mul_self]\n    _ = a * a + a * b + (b * a + b * b) := by rw [add_mul, mul_add, mul_add]\n    _ = a + a * b + (b * a + b) := by simp only [mul_self]\n    _ = a + b + (a * b + b * a) := by abel\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : BooleanRing α\na b : α\n⊢ a + b = (a + b) * (a + b)\n[PROOFSTEP]\nrw [mul_self]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : BooleanRing α\na b : α\n⊢ (a + b) * (a + b) = a * a + a * b + (b * a + b * b)\n[PROOFSTEP]\nrw [add_mul, mul_add, mul_add]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : BooleanRing α\na b : α\n⊢ a * a + a * b + (b * a + b * b) = a + a * b + (b * a + b)\n[PROOFSTEP]\nsimp only [mul_self]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : BooleanRing α\na b : α\n⊢ a + a * b + (b * a + b) = a + b + (a * b + b * a)\n[PROOFSTEP]\nabel\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : BooleanRing α\na b : α\n⊢ a + a * b + (b * a + b) = a + b + (a * b + b * a)\n[PROOFSTEP]\nabel\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : BooleanRing α\na b : α\nthis : a + b = a + b + (a * b + b * a)\n⊢ a * b + b * a = 0\n[PROOFSTEP]\nrwa [self_eq_add_right] at this \n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : BooleanRing α\na b : α\n⊢ a - b = a + b\n[PROOFSTEP]\nrw [sub_eq_add_neg, add_right_inj, neg_eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : BooleanRing α\na b : α\n⊢ a * (1 + a) = 0\n[PROOFSTEP]\nrw [mul_add, mul_one, mul_self, add_self]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : BooleanRing α\na✝ b✝ : α\nsrc✝ : BooleanRing α := inferInstance\na b : α\n⊢ a * b = b * a\n[PROOFSTEP]\nrw [← add_eq_zero', mul_add_mul]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : BooleanRing α\ninst✝¹ : BooleanRing β\ninst✝ : BooleanRing γ\na b : α\n⊢ a ⊔ b = b ⊔ a\n[PROOFSTEP]\ndsimp only [(· ⊔ ·)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : BooleanRing α\ninst✝¹ : BooleanRing β\ninst✝ : BooleanRing γ\na b : α\n⊢ a + b + a * b = b + a + b * a\n[PROOFSTEP]\nring\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : BooleanRing α\ninst✝¹ : BooleanRing β\ninst✝ : BooleanRing γ\na b : α\n⊢ a ⊓ b = b ⊓ a\n[PROOFSTEP]\ndsimp only [(· ⊓ ·)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : BooleanRing α\ninst✝¹ : BooleanRing β\ninst✝ : BooleanRing γ\na b : α\n⊢ a * b = b * a\n[PROOFSTEP]\nring\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : BooleanRing α\ninst✝¹ : BooleanRing β\ninst✝ : BooleanRing γ\na b c : α\n⊢ a ⊔ b ⊔ c = a ⊔ (b ⊔ c)\n[PROOFSTEP]\ndsimp only [(· ⊔ ·)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : BooleanRing α\ninst✝¹ : BooleanRing β\ninst✝ : BooleanRing γ\na b c : α\n⊢ a + b + a * b + c + (a + b + a * b) * c = a + (b + c + b * c) + a * (b + c + b * c)\n[PROOFSTEP]\nring\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : BooleanRing α\ninst✝¹ : BooleanRing β\ninst✝ : BooleanRing γ\na b c : α\n⊢ a ⊓ b ⊓ c = a ⊓ (b ⊓ c)\n[PROOFSTEP]\ndsimp only [(· ⊓ ·)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : BooleanRing α\ninst✝¹ : BooleanRing β\ninst✝ : BooleanRing γ\na b c : α\n⊢ a * b * c = a * (b * c)\n[PROOFSTEP]\nring\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : BooleanRing α\ninst✝¹ : BooleanRing β\ninst✝ : BooleanRing γ\na b : α\n⊢ a ⊔ a ⊓ b = a\n[PROOFSTEP]\ndsimp only [(· ⊔ ·), (· ⊓ ·)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : BooleanRing α\ninst✝¹ : BooleanRing β\ninst✝ : BooleanRing γ\na b : α\n⊢ a + a * b + a * (a * b) = a\n[PROOFSTEP]\nrw [← mul_assoc, mul_self, add_assoc, add_self, add_zero]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : BooleanRing α\ninst✝¹ : BooleanRing β\ninst✝ : BooleanRing γ\na b : α\n⊢ a ⊓ (a ⊔ b) = a\n[PROOFSTEP]\ndsimp only [(· ⊔ ·), (· ⊓ ·)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : BooleanRing α\ninst✝¹ : BooleanRing β\ninst✝ : BooleanRing γ\na b : α\n⊢ a * (a + b + a * b) = a\n[PROOFSTEP]\nrw [mul_add, mul_add, mul_self, ← mul_assoc, mul_self, add_assoc, add_self, add_zero]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : BooleanRing α\ninst✝¹ : BooleanRing β\ninst✝ : BooleanRing γ\na b c : α\n⊢ (a + b + a * b) * (a + c + a * c) =\n    a * a + b * c + a * (b * c) + (a * b + a * a * b) + (a * c + a * a * c) + (a * b * c + a * a * b * c)\n[PROOFSTEP]\nring\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : BooleanRing α\ninst✝¹ : BooleanRing β\ninst✝ : BooleanRing γ\na b c : α\n⊢ a * a + b * c + a * (b * c) + (a * b + a * a * b) + (a * c + a * a * c) + (a * b * c + a * a * b * c) =\n    a + b * c + a * (b * c)\n[PROOFSTEP]\nsimp only [mul_self, add_self, add_zero]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : BooleanRing α\ninst✝¹ : BooleanRing β\ninst✝ : BooleanRing γ\na b c : α\n⊢ (a ⊔ b) ⊓ (a ⊔ c) ⊔ (a ⊔ b ⊓ c) = a ⊔ b ⊓ c\n[PROOFSTEP]\ndsimp only [(· ⊔ ·), (· ⊓ ·)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : BooleanRing α\ninst✝¹ : BooleanRing β\ninst✝ : BooleanRing γ\na b c : α\n⊢ (a + b + a * b) * (a + c + a * c) + (a + b * c + a * (b * c)) +\n      (a + b + a * b) * (a + c + a * c) * (a + b * c + a * (b * c)) =\n    a + b * c + a * (b * c)\n[PROOFSTEP]\nrw [le_sup_inf_aux, add_self, mul_self, zero_add]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : BooleanRing α\ninst✝¹ : BooleanRing β\ninst✝ : BooleanRing γ\nsrc✝ : Lattice α :=\n  Lattice.mk' (_ : ∀ (a b : α), a ⊔ b = b ⊔ a) (_ : ∀ (a b c : α), a ⊔ b ⊔ c = a ⊔ (b ⊔ c))\n    (_ : ∀ (a b : α), a ⊓ b = b ⊓ a) (_ : ∀ (a b c : α), a ⊓ b ⊓ c = a ⊓ (b ⊓ c)) (_ : ∀ (a b : α), a ⊔ a ⊓ b = a)\n    (_ : ∀ (a b : α), a ⊓ (a ⊔ b) = a)\na : α\n⊢ a * (1 + a) + 0 + a * (1 + a) * 0 = 0\n[PROOFSTEP]\nnorm_num [mul_add, mul_self, add_self]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : BooleanRing α\ninst✝¹ : BooleanRing β\ninst✝ : BooleanRing γ\nsrc✝ : Lattice α :=\n  Lattice.mk' (_ : ∀ (a b : α), a ⊔ b = b ⊔ a) (_ : ∀ (a b c : α), a ⊔ b ⊔ c = a ⊔ (b ⊔ c))\n    (_ : ∀ (a b : α), a ⊓ b = b ⊓ a) (_ : ∀ (a b c : α), a ⊓ b ⊓ c = a ⊓ (b ⊓ c)) (_ : ∀ (a b : α), a ⊔ a ⊓ b = a)\n    (_ : ∀ (a b : α), a ⊓ (a ⊔ b) = a)\na : α\n⊢ ⊤ ≤ a ⊔ aᶜ\n[PROOFSTEP]\nchange 1 + (a + (1 + a) + a * (1 + a)) + 1 * (a + (1 + a) + a * (1 + a)) = a + (1 + a) + a * (1 + a)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : BooleanRing α\ninst✝¹ : BooleanRing β\ninst✝ : BooleanRing γ\nsrc✝ : Lattice α :=\n  Lattice.mk' (_ : ∀ (a b : α), a ⊔ b = b ⊔ a) (_ : ∀ (a b c : α), a ⊔ b ⊔ c = a ⊔ (b ⊔ c))\n    (_ : ∀ (a b : α), a ⊓ b = b ⊓ a) (_ : ∀ (a b c : α), a ⊓ b ⊓ c = a ⊓ (b ⊓ c)) (_ : ∀ (a b : α), a ⊔ a ⊓ b = a)\n    (_ : ∀ (a b : α), a ⊓ (a ⊔ b) = a)\na : α\n⊢ 1 + (a + (1 + a) + a * (1 + a)) + 1 * (a + (1 + a) + a * (1 + a)) = a + (1 + a) + a * (1 + a)\n[PROOFSTEP]\nnorm_num [mul_add, mul_self]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : BooleanRing α\ninst✝¹ : BooleanRing β\ninst✝ : BooleanRing γ\nsrc✝ : Lattice α :=\n  Lattice.mk' (_ : ∀ (a b : α), a ⊔ b = b ⊔ a) (_ : ∀ (a b c : α), a ⊔ b ⊔ c = a ⊔ (b ⊔ c))\n    (_ : ∀ (a b : α), a ⊓ b = b ⊓ a) (_ : ∀ (a b c : α), a ⊓ b ⊓ c = a ⊓ (b ⊓ c)) (_ : ∀ (a b : α), a ⊔ a ⊓ b = a)\n    (_ : ∀ (a b : α), a ⊓ (a ⊔ b) = a)\na : α\n⊢ 1 + (a + (1 + a)) = 0\n[PROOFSTEP]\nrw [← add_assoc, add_self]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : BooleanRing α\ninst✝¹ : BooleanRing β\ninst✝ : BooleanRing γ\nsrc✝ : Lattice α :=\n  Lattice.mk' (_ : ∀ (a b : α), a ⊔ b = b ⊔ a) (_ : ∀ (a b c : α), a ⊔ b ⊔ c = a ⊔ (b ⊔ c))\n    (_ : ∀ (a b : α), a ⊓ b = b ⊓ a) (_ : ∀ (a b c : α), a ⊓ b ⊓ c = a ⊓ (b ⊓ c)) (_ : ∀ (a b : α), a ⊔ a ⊓ b = a)\n    (_ : ∀ (a b : α), a ⊓ (a ⊔ b) = a)\na : α\n⊢ a + 1 + a * 1 = 1\n[PROOFSTEP]\nrw [mul_one, (add_comm a 1), add_assoc, add_self, add_zero]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : BooleanRing α\ninst✝¹ : BooleanRing β\ninst✝ : BooleanRing γ\nsrc✝ : Lattice α :=\n  Lattice.mk' (_ : ∀ (a b : α), a ⊔ b = b ⊔ a) (_ : ∀ (a b c : α), a ⊔ b ⊔ c = a ⊔ (b ⊔ c))\n    (_ : ∀ (a b : α), a ⊓ b = b ⊓ a) (_ : ∀ (a b c : α), a ⊓ b ⊓ c = a ⊓ (b ⊓ c)) (_ : ∀ (a b : α), a ⊔ a ⊓ b = a)\n    (_ : ∀ (a b : α), a ⊓ (a ⊔ b) = a)\na : α\n⊢ 0 + a + 0 * a = a\n[PROOFSTEP]\nrw [zero_mul, zero_add, add_zero]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : BooleanRing α\ninst✝¹ : BooleanRing β\ninst✝ : BooleanRing γ\na b : α\n⊢ (a + b + a * b) * (1 + a * b) = a + b + (a * b + a * b * (a * b)) + (a * (b * b) + a * a * b)\n[PROOFSTEP]\nring\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : BooleanRing α\ninst✝¹ : BooleanRing β\ninst✝ : BooleanRing γ\na b : α\n⊢ a + b + (a * b + a * b * (a * b)) + (a * (b * b) + a * a * b) = a + b\n[PROOFSTEP]\nsimp only [mul_self, add_self, add_zero]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : BooleanRing α\ninst✝¹ : BooleanRing β\ninst✝ : BooleanRing γ\na b : AsBoolAlg α\n⊢ ↑ofBoolAlg (a ∆ b) = ↑ofBoolAlg a + ↑ofBoolAlg b\n[PROOFSTEP]\nrw [symmDiff_eq_sup_sdiff_inf]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : BooleanRing α\ninst✝¹ : BooleanRing β\ninst✝ : BooleanRing γ\na b : AsBoolAlg α\n⊢ ↑ofBoolAlg ((a ⊔ b) \\ (a ⊓ b)) = ↑ofBoolAlg a + ↑ofBoolAlg b\n[PROOFSTEP]\nexact of_boolalg_symmDiff_aux _ _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : BooleanRing α\ninst✝¹ : BooleanRing β\ninst✝ : BooleanRing γ\nf : α →+* β\na b : AsBoolAlg α\n⊢ (↑toBoolAlg ∘ ↑f ∘ ↑ofBoolAlg) (a ⊔ b) = (↑toBoolAlg ∘ ↑f ∘ ↑ofBoolAlg) a ⊔ (↑toBoolAlg ∘ ↑f ∘ ↑ofBoolAlg) b\n[PROOFSTEP]\ndsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : BooleanRing α\ninst✝¹ : BooleanRing β\ninst✝ : BooleanRing γ\nf : α →+* β\na b : AsBoolAlg α\n⊢ ↑toBoolAlg (↑f (↑ofBoolAlg a + ↑ofBoolAlg b + ↑ofBoolAlg a * ↑ofBoolAlg b)) =\n    ↑toBoolAlg (↑f (↑ofBoolAlg a)) ⊔ ↑toBoolAlg (↑f (↑ofBoolAlg b))\n[PROOFSTEP]\nsimp_rw [map_add f, map_mul f, toBoolAlg_add_add_mul]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\na : Bool\n⊢ a * 0 = 0\n[PROOFSTEP]\ncases a\n[GOAL]\ncase false\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\n⊢ false * 0 = 0\n[PROOFSTEP]\nrfl\n[GOAL]\ncase true\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\n⊢ true * 0 = 0\n[PROOFSTEP]\nrfl\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Ring.BooleanRing", "llama_tokens": 6475, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8175744584140004, "lm_q2_score": 0.6654105521116443, "lm_q1q2_score": 0.5440226717656387}}
{"text": "[GOAL]\nσ : Type u\nR : Type v\ninst✝¹ : CommRing R\np m : ℕ\ninst✝ : CharP R p\nn : ℕ\n⊢ ↑n = 0 ↔ p ∣ n\n[PROOFSTEP]\nrw [← C_eq_coe_nat, ← C_0, C_inj, CharP.cast_eq_zero_iff R p]\n[GOAL]\nσ : Type u\nR✝ : Type v\ninst✝² : CommRing R✝\np✝ m : ℕ\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\np : MvPolynomial σ R\nf : R →+* S\n⊢ Finsupp.mapRange ↑f (_ : ↑f 0 = 0) p = ↑(map f) p\n[PROOFSTEP]\nchange Finsupp.mapRange (f : R →+ S) (f : R →+ S).map_zero p = map f p\n[GOAL]\nσ : Type u\nR✝ : Type v\ninst✝² : CommRing R✝\np✝ m : ℕ\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\np : MvPolynomial σ R\nf : R →+* S\n⊢ Finsupp.mapRange ↑↑f (_ : ↑↑f 0 = 0) p = ↑(map f) p\n[PROOFSTEP]\nrw [p.as_sum, Finsupp.mapRange_finset_sum, (map f).map_sum]\n[GOAL]\nσ : Type u\nR✝ : Type v\ninst✝² : CommRing R✝\np✝ m : ℕ\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\np : MvPolynomial σ R\nf : R →+* S\n⊢ ∑ x in support p, Finsupp.mapRange ↑↑f (_ : ↑↑f 0 = 0) (↑(monomial x) (coeff x p)) =\n    ∑ x in support p, ↑(map f) (↑(monomial x) (coeff x p))\n[PROOFSTEP]\nrefine' Finset.sum_congr rfl fun n _ => _\n[GOAL]\nσ : Type u\nR✝ : Type v\ninst✝² : CommRing R✝\np✝ m : ℕ\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\np : MvPolynomial σ R\nf : R →+* S\nn : σ →₀ ℕ\nx✝ : n ∈ support p\n⊢ Finsupp.mapRange ↑↑f (_ : ↑↑f 0 = 0) (↑(monomial n) (coeff n p)) = ↑(map f) (↑(monomial n) (coeff n p))\n[PROOFSTEP]\nrw [map_monomial, ← single_eq_monomial, Finsupp.mapRange_single, single_eq_monomial]\n[GOAL]\nσ : Type u\nR✝ : Type v\ninst✝² : CommRing R✝\np✝ m : ℕ\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\np : MvPolynomial σ R\nf : R →+* S\nn : σ →₀ ℕ\nx✝ : n ∈ support p\n⊢ ↑(monomial n) (↑↑f (coeff n p)) = ↑(monomial n) (↑f (coeff n p))\n[PROOFSTEP]\nsimp_all only [AddMonoidHom.coe_coe]\n[GOAL]\nσ : Type u\nR : Type v\ninst✝ : CommRing R\np✝ m : ℕ\np : MvPolynomial σ R\n⊢ p ∈ restrictTotalDegree σ R m ↔ totalDegree p ≤ m\n[PROOFSTEP]\nrw [totalDegree, Finset.sup_le_iff]\n[GOAL]\nσ : Type u\nR : Type v\ninst✝ : CommRing R\np✝ m : ℕ\np : MvPolynomial σ R\n⊢ p ∈ restrictTotalDegree σ R m ↔ ∀ (b : σ →₀ ℕ), b ∈ support p → (Finsupp.sum b fun x e => e) ≤ m\n[PROOFSTEP]\nrfl\n[GOAL]\nσ : Type u\nR : Type v\ninst✝ : CommRing R\np✝ m : ℕ\np : MvPolynomial σ R\nn : ℕ\n⊢ p ∈ restrictDegree σ R n ↔ ∀ (s : σ →₀ ℕ), s ∈ support p → ∀ (i : σ), ↑s i ≤ n\n[PROOFSTEP]\nrw [restrictDegree, Finsupp.mem_supported]\n[GOAL]\nσ : Type u\nR : Type v\ninst✝ : CommRing R\np✝ m : ℕ\np : MvPolynomial σ R\nn : ℕ\n⊢ ↑p.support ⊆ {n_1 | ∀ (i : σ), ↑n_1 i ≤ n} ↔ ∀ (s : σ →₀ ℕ), s ∈ support p → ∀ (i : σ), ↑s i ≤ n\n[PROOFSTEP]\nrfl\n[GOAL]\nσ : Type u\nR : Type v\ninst✝¹ : CommRing R\np✝ m : ℕ\ninst✝ : DecidableEq σ\np : MvPolynomial σ R\nn : ℕ\n⊢ p ∈ restrictDegree σ R n ↔ ∀ (i : σ), Multiset.count i (degrees p) ≤ n\n[PROOFSTEP]\nsimp only [mem_restrictDegree, degrees_def, Multiset.count_finset_sup, Finsupp.count_toMultiset, Finset.sup_le_iff]\n[GOAL]\nσ : Type u\nR : Type v\ninst✝¹ : CommRing R\np✝ m : ℕ\ninst✝ : DecidableEq σ\np : MvPolynomial σ R\nn : ℕ\n⊢ (∀ (s : σ →₀ ℕ), s ∈ support p → ∀ (i : σ), ↑s i ≤ n) ↔ ∀ (i : σ) (b : σ →₀ ℕ), b ∈ support p → ↑b i ≤ n\n[PROOFSTEP]\nexact ⟨fun h n s hs => h s hs n, fun h s hs n => h n s hs⟩\n", "meta": {"mathlib_filename": "Mathlib.RingTheory.MvPolynomial.Basic", "llama_tokens": 1775, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7853085909370422, "lm_q2_score": 0.6926419894793248, "lm_q1q2_score": 0.5439377047818381}}
{"text": "[GOAL]\nr : ℝ\nhr : r < 0\n⊢ sign r = -1\n[PROOFSTEP]\nrw [sign, if_pos hr]\n[GOAL]\nr : ℝ\nhr : 0 < r\n⊢ sign r = 1\n[PROOFSTEP]\nrw [sign, if_pos hr, if_neg hr.not_lt]\n[GOAL]\n⊢ sign 0 = 0\n[PROOFSTEP]\nrw [sign, if_neg (lt_irrefl _), if_neg (lt_irrefl _)]\n[GOAL]\n⊢ 0 < 1\n[PROOFSTEP]\nnorm_num\n[GOAL]\nr : ℝ\n⊢ sign r = -1 ∨ sign r = 0 ∨ sign r = 1\n[PROOFSTEP]\nobtain hn | rfl | hp := lt_trichotomy r (0 : ℝ)\n[GOAL]\ncase inl\nr : ℝ\nhn : r < 0\n⊢ sign r = -1 ∨ sign r = 0 ∨ sign r = 1\n[PROOFSTEP]\nexact Or.inl <| sign_of_neg hn\n[GOAL]\ncase inr.inl\n⊢ sign 0 = -1 ∨ sign 0 = 0 ∨ sign 0 = 1\n[PROOFSTEP]\nexact Or.inr <| Or.inl <| sign_zero\n[GOAL]\ncase inr.inr\nr : ℝ\nhp : 0 < r\n⊢ sign r = -1 ∨ sign r = 0 ∨ sign r = 1\n[PROOFSTEP]\nexact Or.inr <| Or.inr <| sign_of_pos hp\n[GOAL]\nr : ℝ\n⊢ sign r = 0 ↔ r = 0\n[PROOFSTEP]\nrefine' ⟨fun h => _, fun h => h.symm ▸ sign_zero⟩\n[GOAL]\nr : ℝ\nh : sign r = 0\n⊢ r = 0\n[PROOFSTEP]\nobtain hn | rfl | hp := lt_trichotomy r (0 : ℝ)\n[GOAL]\ncase inl\nr : ℝ\nh : sign r = 0\nhn : r < 0\n⊢ r = 0\n[PROOFSTEP]\nrw [sign_of_neg hn, neg_eq_zero] at h \n[GOAL]\ncase inl\nr : ℝ\nh : 1 = 0\nhn : r < 0\n⊢ r = 0\n[PROOFSTEP]\nexact (one_ne_zero h).elim\n[GOAL]\ncase inr.inl\nh : sign 0 = 0\n⊢ 0 = 0\n[PROOFSTEP]\nrfl\n[GOAL]\ncase inr.inr\nr : ℝ\nh : sign r = 0\nhp : 0 < r\n⊢ r = 0\n[PROOFSTEP]\nrw [sign_of_pos hp] at h \n[GOAL]\ncase inr.inr\nr : ℝ\nh : 1 = 0\nhp : 0 < r\n⊢ r = 0\n[PROOFSTEP]\nexact (one_ne_zero h).elim\n[GOAL]\nz : ℤ\n⊢ sign ↑z = ↑(Int.sign z)\n[PROOFSTEP]\nobtain hn | rfl | hp := lt_trichotomy z (0 : ℤ)\n[GOAL]\ncase inl\nz : ℤ\nhn : z < 0\n⊢ sign ↑z = ↑(Int.sign z)\n[PROOFSTEP]\nrw [sign_of_neg (Int.cast_lt_zero.mpr hn), Int.sign_eq_neg_one_of_neg hn, Int.cast_neg, Int.cast_one]\n[GOAL]\ncase inr.inl\n⊢ sign ↑0 = ↑(Int.sign 0)\n[PROOFSTEP]\nrw [Int.cast_zero, sign_zero, Int.sign_zero, Int.cast_zero]\n[GOAL]\ncase inr.inr\nz : ℤ\nhp : 0 < z\n⊢ sign ↑z = ↑(Int.sign z)\n[PROOFSTEP]\nrw [sign_of_pos (Int.cast_pos.mpr hp), Int.sign_eq_one_of_pos hp, Int.cast_one]\n[GOAL]\nr : ℝ\n⊢ sign (-r) = -sign r\n[PROOFSTEP]\nobtain hn | rfl | hp := lt_trichotomy r (0 : ℝ)\n[GOAL]\ncase inl\nr : ℝ\nhn : r < 0\n⊢ sign (-r) = -sign r\n[PROOFSTEP]\nrw [sign_of_neg hn, sign_of_pos (neg_pos.mpr hn), neg_neg]\n[GOAL]\ncase inr.inl\n⊢ sign (-0) = -sign 0\n[PROOFSTEP]\nrw [sign_zero, neg_zero, sign_zero]\n[GOAL]\ncase inr.inr\nr : ℝ\nhp : 0 < r\n⊢ sign (-r) = -sign r\n[PROOFSTEP]\nrw [sign_of_pos hp, sign_of_neg (neg_lt_zero.mpr hp)]\n[GOAL]\nr : ℝ\n⊢ 0 ≤ sign r * r\n[PROOFSTEP]\nobtain hn | rfl | hp := lt_trichotomy r (0 : ℝ)\n[GOAL]\ncase inl\nr : ℝ\nhn : r < 0\n⊢ 0 ≤ sign r * r\n[PROOFSTEP]\nrw [sign_of_neg hn]\n[GOAL]\ncase inl\nr : ℝ\nhn : r < 0\n⊢ 0 ≤ -1 * r\n[PROOFSTEP]\nexact mul_nonneg_of_nonpos_of_nonpos (by norm_num) hn.le\n[GOAL]\nr : ℝ\nhn : r < 0\n⊢ -1 ≤ 0\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase inr.inl\n⊢ 0 ≤ sign 0 * 0\n[PROOFSTEP]\nrw [mul_zero]\n[GOAL]\ncase inr.inr\nr : ℝ\nhp : 0 < r\n⊢ 0 ≤ sign r * r\n[PROOFSTEP]\nrw [sign_of_pos hp, one_mul]\n[GOAL]\ncase inr.inr\nr : ℝ\nhp : 0 < r\n⊢ 0 ≤ r\n[PROOFSTEP]\nexact hp.le\n[GOAL]\nr : ℝ\nhr : r ≠ 0\n⊢ 0 < sign r * r\n[PROOFSTEP]\nrefine' lt_of_le_of_ne (sign_mul_nonneg r) fun h => hr _\n[GOAL]\nr : ℝ\nhr : r ≠ 0\nh : 0 = sign r * r\n⊢ r = 0\n[PROOFSTEP]\nhave hs0 := (zero_eq_mul.mp h).resolve_right hr\n[GOAL]\nr : ℝ\nhr : r ≠ 0\nh : 0 = sign r * r\nhs0 : sign r = 0\n⊢ r = 0\n[PROOFSTEP]\nexact sign_eq_zero_iff.mp hs0\n[GOAL]\nr : ℝ\n⊢ (sign r)⁻¹ = sign r\n[PROOFSTEP]\nobtain hn | hz | hp := sign_apply_eq r\n[GOAL]\ncase inl\nr : ℝ\nhn : sign r = -1\n⊢ (sign r)⁻¹ = sign r\n[PROOFSTEP]\nrw [hn]\n[GOAL]\ncase inl\nr : ℝ\nhn : sign r = -1\n⊢ (-1)⁻¹ = -1\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase inr.inl\nr : ℝ\nhz : sign r = 0\n⊢ (sign r)⁻¹ = sign r\n[PROOFSTEP]\nrw [hz]\n[GOAL]\ncase inr.inl\nr : ℝ\nhz : sign r = 0\n⊢ 0⁻¹ = 0\n[PROOFSTEP]\nexact inv_zero\n[GOAL]\ncase inr.inr\nr : ℝ\nhp : sign r = 1\n⊢ (sign r)⁻¹ = sign r\n[PROOFSTEP]\nrw [hp]\n[GOAL]\ncase inr.inr\nr : ℝ\nhp : sign r = 1\n⊢ 1⁻¹ = 1\n[PROOFSTEP]\nexact inv_one\n[GOAL]\nr : ℝ\n⊢ sign r⁻¹ = sign r\n[PROOFSTEP]\nobtain hn | rfl | hp := lt_trichotomy r (0 : ℝ)\n[GOAL]\ncase inl\nr : ℝ\nhn : r < 0\n⊢ sign r⁻¹ = sign r\n[PROOFSTEP]\nrw [sign_of_neg hn, sign_of_neg (inv_lt_zero.mpr hn)]\n[GOAL]\ncase inr.inl\n⊢ sign 0⁻¹ = sign 0\n[PROOFSTEP]\nrw [sign_zero, inv_zero, sign_zero]\n[GOAL]\ncase inr.inr\nr : ℝ\nhp : 0 < r\n⊢ sign r⁻¹ = sign r\n[PROOFSTEP]\nrw [sign_of_pos hp, sign_of_pos (inv_pos.mpr hp)]\n", "meta": {"mathlib_filename": "Mathlib.Data.Real.Sign", "llama_tokens": 2426, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8438951182587158, "lm_q2_score": 0.6442251064863697, "lm_q1q2_score": 0.5436584224235487}}
{"text": "[GOAL]\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Mul α\ns s₁ s₂ t t₁ t₂ : Finset α\n⊢ card s * card t ≤ multiplicativeEnergy s t\n[PROOFSTEP]\nrw [← card_product]\n[GOAL]\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Mul α\ns s₁ s₂ t t₁ t₂ : Finset α\n⊢ card (s ×ˢ t) ≤ multiplicativeEnergy s t\n[PROOFSTEP]\nrefine'\n  card_le_card_of_inj_on (@fun x => ((x.1, x.1), x.2, x.2))\n    (by\n      -- porting note: changed this from a `simp` proof without `only` because of a timeoutsimp only [← and_imp,\n        mem_product, and_imp, Prod.forall, mem_filter, and_self, and_true, imp_self, implies_true])\n    fun a _ b _ => _\n[GOAL]\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Mul α\ns s₁ s₂ t t₁ t₂ : Finset α\n⊢ ∀ (a : α × α),\n    a ∈ s ×ˢ t →\n      (fun x => ((x.fst, x.fst), x.snd, x.snd)) a ∈\n        filter (fun x => x.fst.fst * x.snd.fst = x.fst.snd * x.snd.snd) ((s ×ˢ s) ×ˢ t ×ˢ t)\n[PROOFSTEP]\nsimp only [← and_imp, mem_product, and_imp, Prod.forall, mem_filter, and_self, and_true, imp_self, implies_true]\n[GOAL]\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Mul α\ns s₁ s₂ t t₁ t₂ : Finset α\na : α × α\nx✝¹ : a ∈ s ×ˢ t\nb : α × α\nx✝ : b ∈ s ×ˢ t\n⊢ (fun x => ((x.fst, x.fst), x.snd, x.snd)) a = (fun x => ((x.fst, x.fst), x.snd, x.snd)) b → a = b\n[PROOFSTEP]\nsimp only [Prod.mk.inj_iff, and_self_iff, and_imp]\n[GOAL]\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Mul α\ns s₁ s₂ t t₁ t₂ : Finset α\na : α × α\nx✝¹ : a ∈ s ×ˢ t\nb : α × α\nx✝ : b ∈ s ×ˢ t\n⊢ a.fst = b.fst → a.snd = b.snd → a = b\n[PROOFSTEP]\nexact Prod.ext\n[GOAL]\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Mul α\ns s₁ s₂ t t₁ t₂ : Finset α\n⊢ multiplicativeEnergy ∅ t = 0\n[PROOFSTEP]\nsimp [multiplicativeEnergy]\n[GOAL]\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Mul α\ns s₁ s₂ t t₁ t₂ : Finset α\n⊢ multiplicativeEnergy s ∅ = 0\n[PROOFSTEP]\nsimp [multiplicativeEnergy]\n[GOAL]\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Mul α\ns s₁ s₂ t t₁ t₂ : Finset α\nh : 0 < multiplicativeEnergy s t\nH : ¬(Finset.Nonempty s ∧ Finset.Nonempty t)\n⊢ False\n[PROOFSTEP]\nsimp_rw [not_and_or, not_nonempty_iff_eq_empty] at H \n[GOAL]\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Mul α\ns s₁ s₂ t t₁ t₂ : Finset α\nh : 0 < multiplicativeEnergy s t\nH : s = ∅ ∨ t = ∅\n⊢ False\n[PROOFSTEP]\nobtain rfl | rfl := H\n[GOAL]\ncase inl\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Mul α\ns₁ s₂ t t₁ t₂ : Finset α\nh : 0 < multiplicativeEnergy ∅ t\n⊢ False\n[PROOFSTEP]\nsimp [Nat.not_lt_zero] at h \n[GOAL]\ncase inr\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Mul α\ns s₁ s₂ t₁ t₂ : Finset α\nh : 0 < multiplicativeEnergy s ∅\n⊢ False\n[PROOFSTEP]\nsimp [Nat.not_lt_zero] at h \n[GOAL]\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Mul α\ns s₁ s₂ t t₁ t₂ : Finset α\n⊢ multiplicativeEnergy s t = 0 ↔ s = ∅ ∨ t = ∅\n[PROOFSTEP]\nsimp [← (Nat.zero_le _).not_gt_iff_eq, not_and_or, imp_iff_or_not, or_comm]\n[GOAL]\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : CommMonoid α\ns t : Finset α\n⊢ multiplicativeEnergy s t = multiplicativeEnergy t s\n[PROOFSTEP]\nrw [multiplicativeEnergy, ← Finset.card_map (Equiv.prodComm _ _).toEmbedding, map_filter]\n[GOAL]\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : CommMonoid α\ns t : Finset α\n⊢ card\n      (filter ((fun x => x.fst.fst * x.snd.fst = x.fst.snd * x.snd.snd) ∘ ↑(Equiv.prodComm (α × α) (α × α)).symm)\n        (map (Equiv.toEmbedding (Equiv.prodComm (α × α) (α × α))) ((s ×ˢ s) ×ˢ t ×ˢ t))) =\n    multiplicativeEnergy t s\n[PROOFSTEP]\nsimp [-Finset.card_map, eq_comm, multiplicativeEnergy, mul_comm, map_eq_image, Function.comp]\n[GOAL]\nα : Type u_1\ninst✝² : DecidableEq α\ninst✝¹ : CommGroup α\ninst✝ : Fintype α\ns t : Finset α\n⊢ multiplicativeEnergy univ t = Fintype.card α * card t ^ 2\n[PROOFSTEP]\nsimp only [multiplicativeEnergy, univ_product_univ, Fintype.card, sq, ← card_product]\n[GOAL]\nα : Type u_1\ninst✝² : DecidableEq α\ninst✝¹ : CommGroup α\ninst✝ : Fintype α\ns t : Finset α\n⊢ card (filter (fun x => x.fst.fst * x.snd.fst = x.fst.snd * x.snd.snd) (univ ×ˢ t ×ˢ t)) = card (univ ×ˢ t ×ˢ t)\n[PROOFSTEP]\nlet f : α × α × α → (α × α) × α × α := fun x => ((x.1 * x.2.2, x.1 * x.2.1), x.2)\n[GOAL]\nα : Type u_1\ninst✝² : DecidableEq α\ninst✝¹ : CommGroup α\ninst✝ : Fintype α\ns t : Finset α\nf : α × α × α → (α × α) × α × α := fun x => ((x.fst * x.snd.snd, x.fst * x.snd.fst), x.snd)\n⊢ card (filter (fun x => x.fst.fst * x.snd.fst = x.fst.snd * x.snd.snd) (univ ×ˢ t ×ˢ t)) = card (univ ×ˢ t ×ˢ t)\n[PROOFSTEP]\nhave : (↑((univ : Finset α) ×ˢ t ×ˢ t) : Set (α × α × α)).InjOn f :=\n  by\n  rintro ⟨a₁, b₁, c₁⟩ _ ⟨a₂, b₂, c₂⟩ h₂ h\n  simp_rw [Prod.ext_iff] at h \n  obtain ⟨h, rfl, rfl⟩ := h\n  rw [mul_right_cancel h.1]\n[GOAL]\nα : Type u_1\ninst✝² : DecidableEq α\ninst✝¹ : CommGroup α\ninst✝ : Fintype α\ns t : Finset α\nf : α × α × α → (α × α) × α × α := fun x => ((x.fst * x.snd.snd, x.fst * x.snd.fst), x.snd)\n⊢ Set.InjOn f ↑(univ ×ˢ t ×ˢ t)\n[PROOFSTEP]\nrintro ⟨a₁, b₁, c₁⟩ _ ⟨a₂, b₂, c₂⟩ h₂ h\n[GOAL]\ncase mk.mk.mk.mk\nα : Type u_1\ninst✝² : DecidableEq α\ninst✝¹ : CommGroup α\ninst✝ : Fintype α\ns t : Finset α\nf : α × α × α → (α × α) × α × α := fun x => ((x.fst * x.snd.snd, x.fst * x.snd.fst), x.snd)\na₁ b₁ c₁ : α\na✝ : (a₁, b₁, c₁) ∈ ↑(univ ×ˢ t ×ˢ t)\na₂ b₂ c₂ : α\nh₂ : (a₂, b₂, c₂) ∈ ↑(univ ×ˢ t ×ˢ t)\nh : f (a₁, b₁, c₁) = f (a₂, b₂, c₂)\n⊢ (a₁, b₁, c₁) = (a₂, b₂, c₂)\n[PROOFSTEP]\nsimp_rw [Prod.ext_iff] at h \n[GOAL]\ncase mk.mk.mk.mk\nα : Type u_1\ninst✝² : DecidableEq α\ninst✝¹ : CommGroup α\ninst✝ : Fintype α\ns t : Finset α\nf : α × α × α → (α × α) × α × α := fun x => ((x.fst * x.snd.snd, x.fst * x.snd.fst), x.snd)\na₁ b₁ c₁ : α\na✝ : (a₁, b₁, c₁) ∈ ↑(univ ×ˢ t ×ˢ t)\na₂ b₂ c₂ : α\nh₂ : (a₂, b₂, c₂) ∈ ↑(univ ×ˢ t ×ˢ t)\nh : (a₁ * c₁ = a₂ * c₂ ∧ a₁ * b₁ = a₂ * b₂) ∧ b₁ = b₂ ∧ c₁ = c₂\n⊢ (a₁, b₁, c₁) = (a₂, b₂, c₂)\n[PROOFSTEP]\nobtain ⟨h, rfl, rfl⟩ := h\n[GOAL]\ncase mk.mk.mk.mk.intro.intro\nα : Type u_1\ninst✝² : DecidableEq α\ninst✝¹ : CommGroup α\ninst✝ : Fintype α\ns t : Finset α\nf : α × α × α → (α × α) × α × α := fun x => ((x.fst * x.snd.snd, x.fst * x.snd.fst), x.snd)\na₁ b₁ c₁ : α\na✝ : (a₁, b₁, c₁) ∈ ↑(univ ×ˢ t ×ˢ t)\na₂ : α\nh₂ : (a₂, b₁, c₁) ∈ ↑(univ ×ˢ t ×ˢ t)\nh : a₁ * c₁ = a₂ * c₁ ∧ a₁ * b₁ = a₂ * b₁\n⊢ (a₁, b₁, c₁) = (a₂, b₁, c₁)\n[PROOFSTEP]\nrw [mul_right_cancel h.1]\n[GOAL]\nα : Type u_1\ninst✝² : DecidableEq α\ninst✝¹ : CommGroup α\ninst✝ : Fintype α\ns t : Finset α\nf : α × α × α → (α × α) × α × α := fun x => ((x.fst * x.snd.snd, x.fst * x.snd.fst), x.snd)\nthis : Set.InjOn f ↑(univ ×ˢ t ×ˢ t)\n⊢ card (filter (fun x => x.fst.fst * x.snd.fst = x.fst.snd * x.snd.snd) (univ ×ˢ t ×ˢ t)) = card (univ ×ˢ t ×ˢ t)\n[PROOFSTEP]\nrw [← card_image_of_injOn this]\n[GOAL]\nα : Type u_1\ninst✝² : DecidableEq α\ninst✝¹ : CommGroup α\ninst✝ : Fintype α\ns t : Finset α\nf : α × α × α → (α × α) × α × α := fun x => ((x.fst * x.snd.snd, x.fst * x.snd.fst), x.snd)\nthis : Set.InjOn f ↑(univ ×ˢ t ×ˢ t)\n⊢ card (filter (fun x => x.fst.fst * x.snd.fst = x.fst.snd * x.snd.snd) (univ ×ˢ t ×ˢ t)) =\n    card (image f (univ ×ˢ t ×ˢ t))\n[PROOFSTEP]\ncongr with a\n[GOAL]\ncase e_s.a\nα : Type u_1\ninst✝² : DecidableEq α\ninst✝¹ : CommGroup α\ninst✝ : Fintype α\ns t : Finset α\nf : α × α × α → (α × α) × α × α := fun x => ((x.fst * x.snd.snd, x.fst * x.snd.fst), x.snd)\nthis : Set.InjOn f ↑(univ ×ˢ t ×ˢ t)\na : (α × α) × α × α\n⊢ a ∈ filter (fun x => x.fst.fst * x.snd.fst = x.fst.snd * x.snd.snd) (univ ×ˢ t ×ˢ t) ↔ a ∈ image f (univ ×ˢ t ×ˢ t)\n[PROOFSTEP]\nsimp only [mem_filter, mem_product, mem_univ, true_and_iff, mem_image, exists_prop, Prod.exists]\n[GOAL]\ncase e_s.a\nα : Type u_1\ninst✝² : DecidableEq α\ninst✝¹ : CommGroup α\ninst✝ : Fintype α\ns t : Finset α\nf : α × α × α → (α × α) × α × α := fun x => ((x.fst * x.snd.snd, x.fst * x.snd.fst), x.snd)\nthis : Set.InjOn f ↑(univ ×ˢ t ×ˢ t)\na : (α × α) × α × α\n⊢ (a.snd.fst ∈ t ∧ a.snd.snd ∈ t) ∧ a.fst.fst * a.snd.fst = a.fst.snd * a.snd.snd ↔\n    ∃ a_1 a_2 b, (a_2 ∈ t ∧ b ∈ t) ∧ ((a_1 * b, a_1 * a_2), a_2, b) = a\n[PROOFSTEP]\nrefine' ⟨fun h => ⟨a.1.1 * a.2.2⁻¹, _, _, h.1, by simp [mul_right_comm, h.2]⟩, _⟩\n[GOAL]\nα : Type u_1\ninst✝² : DecidableEq α\ninst✝¹ : CommGroup α\ninst✝ : Fintype α\ns t : Finset α\nf : α × α × α → (α × α) × α × α := fun x => ((x.fst * x.snd.snd, x.fst * x.snd.fst), x.snd)\nthis : Set.InjOn f ↑(univ ×ˢ t ×ˢ t)\na : (α × α) × α × α\nh : (a.snd.fst ∈ t ∧ a.snd.snd ∈ t) ∧ a.fst.fst * a.snd.fst = a.fst.snd * a.snd.snd\n⊢ ((a.fst.fst * a.snd.snd⁻¹ * a.snd.snd, a.fst.fst * a.snd.snd⁻¹ * a.snd.fst), a.snd.fst, a.snd.snd) = a\n[PROOFSTEP]\nsimp [mul_right_comm, h.2]\n[GOAL]\ncase e_s.a\nα : Type u_1\ninst✝² : DecidableEq α\ninst✝¹ : CommGroup α\ninst✝ : Fintype α\ns t : Finset α\nf : α × α × α → (α × α) × α × α := fun x => ((x.fst * x.snd.snd, x.fst * x.snd.fst), x.snd)\nthis : Set.InjOn f ↑(univ ×ˢ t ×ˢ t)\na : (α × α) × α × α\n⊢ (∃ a_1 a_2 b, (a_2 ∈ t ∧ b ∈ t) ∧ ((a_1 * b, a_1 * a_2), a_2, b) = a) →\n    (a.snd.fst ∈ t ∧ a.snd.snd ∈ t) ∧ a.fst.fst * a.snd.fst = a.fst.snd * a.snd.snd\n[PROOFSTEP]\nrintro ⟨b, c, d, hcd, rfl⟩\n[GOAL]\ncase e_s.a.intro.intro.intro.intro\nα : Type u_1\ninst✝² : DecidableEq α\ninst✝¹ : CommGroup α\ninst✝ : Fintype α\ns t : Finset α\nf : α × α × α → (α × α) × α × α := fun x => ((x.fst * x.snd.snd, x.fst * x.snd.fst), x.snd)\nthis : Set.InjOn f ↑(univ ×ˢ t ×ˢ t)\nb c d : α\nhcd : c ∈ t ∧ d ∈ t\n⊢ (((b * d, b * c), c, d).snd.fst ∈ t ∧ ((b * d, b * c), c, d).snd.snd ∈ t) ∧\n    ((b * d, b * c), c, d).fst.fst * ((b * d, b * c), c, d).snd.fst =\n      ((b * d, b * c), c, d).fst.snd * ((b * d, b * c), c, d).snd.snd\n[PROOFSTEP]\nsimpa [mul_right_comm]\n[GOAL]\nα : Type u_1\ninst✝² : DecidableEq α\ninst✝¹ : CommGroup α\ninst✝ : Fintype α\ns t : Finset α\n⊢ multiplicativeEnergy s univ = Fintype.card α * card s ^ 2\n[PROOFSTEP]\nrw [multiplicativeEnergy_comm, multiplicativeEnergy_univ_left]\n", "meta": {"mathlib_filename": "Mathlib.Combinatorics.Additive.Energy", "llama_tokens": 5303, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7662936430859597, "lm_q2_score": 0.7090191337850932, "lm_q1q2_score": 0.5433168550458305}}
{"text": "[GOAL]\nR : Type u_1\nl : Type u_2\nm : Type u_3\nn : Type u_4\nα : Type u_5\nβ : Type u_6\ninst✝⁴ : Fintype l\ninst✝³ : Fintype m\ninst✝² : Fintype n\ninst✝¹ : SeminormedAddCommGroup α\ninst✝ : SeminormedAddCommGroup β\nr : ℝ\nhr : 0 ≤ r\nA : Matrix m n α\n⊢ ‖A‖ ≤ r ↔ ∀ (i : m) (j : n), ‖A i j‖ ≤ r\n[PROOFSTEP]\nsimp_rw [norm_def, pi_norm_le_iff_of_nonneg hr]\n[GOAL]\nR : Type u_1\nl : Type u_2\nm : Type u_3\nn : Type u_4\nα : Type u_5\nβ : Type u_6\ninst✝⁴ : Fintype l\ninst✝³ : Fintype m\ninst✝² : Fintype n\ninst✝¹ : SeminormedAddCommGroup α\ninst✝ : SeminormedAddCommGroup β\nr : ℝ≥0\nA : Matrix m n α\n⊢ ‖A‖₊ ≤ r ↔ ∀ (i : m) (j : n), ‖A i j‖₊ ≤ r\n[PROOFSTEP]\nsimp_rw [nnnorm_def, pi_nnnorm_le_iff]\n[GOAL]\nR : Type u_1\nl : Type u_2\nm : Type u_3\nn : Type u_4\nα : Type u_5\nβ : Type u_6\ninst✝⁴ : Fintype l\ninst✝³ : Fintype m\ninst✝² : Fintype n\ninst✝¹ : SeminormedAddCommGroup α\ninst✝ : SeminormedAddCommGroup β\nr : ℝ\nhr : 0 < r\nA : Matrix m n α\n⊢ ‖A‖ < r ↔ ∀ (i : m) (j : n), ‖A i j‖ < r\n[PROOFSTEP]\nsimp_rw [norm_def, pi_norm_lt_iff hr]\n[GOAL]\nR : Type u_1\nl : Type u_2\nm : Type u_3\nn : Type u_4\nα : Type u_5\nβ : Type u_6\ninst✝⁴ : Fintype l\ninst✝³ : Fintype m\ninst✝² : Fintype n\ninst✝¹ : SeminormedAddCommGroup α\ninst✝ : SeminormedAddCommGroup β\nr : ℝ≥0\nhr : 0 < r\nA : Matrix m n α\n⊢ ‖A‖₊ < r ↔ ∀ (i : m) (j : n), ‖A i j‖₊ < r\n[PROOFSTEP]\nsimp_rw [nnnorm_def, pi_nnnorm_lt_iff hr]\n[GOAL]\nR : Type u_1\nl : Type u_2\nm : Type u_3\nn : Type u_4\nα : Type u_5\nβ : Type u_6\ninst✝⁴ : Fintype l\ninst✝³ : Fintype m\ninst✝² : Fintype n\ninst✝¹ : SeminormedAddCommGroup α\ninst✝ : SeminormedAddCommGroup β\nA : Matrix m n α\nf : α → β\nhf : ∀ (a : α), ‖f a‖₊ = ‖a‖₊\n⊢ ‖map A f‖₊ = ‖A‖₊\n[PROOFSTEP]\nsimp only [nnnorm_def, Pi.nnnorm_def, Matrix.map_apply, hf]\n[GOAL]\nR : Type u_1\nl : Type u_2\nm : Type u_3\nn : Type u_4\nα : Type u_5\nβ : Type u_6\ninst✝⁴ : Fintype l\ninst✝³ : Fintype m\ninst✝² : Fintype n\ninst✝¹ : SeminormedAddCommGroup α\ninst✝ : SeminormedAddCommGroup β\nv : m → α\n⊢ ‖col v‖₊ = ‖v‖₊\n[PROOFSTEP]\nsimp [nnnorm_def, Pi.nnnorm_def]\n[GOAL]\nR : Type u_1\nl : Type u_2\nm : Type u_3\nn : Type u_4\nα : Type u_5\nβ : Type u_6\ninst✝⁴ : Fintype l\ninst✝³ : Fintype m\ninst✝² : Fintype n\ninst✝¹ : SeminormedAddCommGroup α\ninst✝ : SeminormedAddCommGroup β\nv : n → α\n⊢ ‖row v‖₊ = ‖v‖₊\n[PROOFSTEP]\nsimp [nnnorm_def, Pi.nnnorm_def]\n[GOAL]\nR : Type u_1\nl : Type u_2\nm : Type u_3\nn : Type u_4\nα : Type u_5\nβ : Type u_6\ninst✝⁵ : Fintype l\ninst✝⁴ : Fintype m\ninst✝³ : Fintype n\ninst✝² : SeminormedAddCommGroup α\ninst✝¹ : SeminormedAddCommGroup β\ninst✝ : DecidableEq n\nv : n → α\n⊢ ‖diagonal v‖₊ = ‖v‖₊\n[PROOFSTEP]\nsimp_rw [nnnorm_def, Pi.nnnorm_def]\n[GOAL]\nR : Type u_1\nl : Type u_2\nm : Type u_3\nn : Type u_4\nα : Type u_5\nβ : Type u_6\ninst✝⁵ : Fintype l\ninst✝⁴ : Fintype m\ninst✝³ : Fintype n\ninst✝² : SeminormedAddCommGroup α\ninst✝¹ : SeminormedAddCommGroup β\ninst✝ : DecidableEq n\nv : n → α\n⊢ (Finset.sup Finset.univ fun b => Finset.sup Finset.univ fun b_1 => ‖diagonal v b b_1‖₊) =\n    Finset.sup Finset.univ fun b => ‖v b‖₊\n[PROOFSTEP]\ncongr 1 with i : 1\n[GOAL]\ncase e_f.h\nR : Type u_1\nl : Type u_2\nm : Type u_3\nn : Type u_4\nα : Type u_5\nβ : Type u_6\ninst✝⁵ : Fintype l\ninst✝⁴ : Fintype m\ninst✝³ : Fintype n\ninst✝² : SeminormedAddCommGroup α\ninst✝¹ : SeminormedAddCommGroup β\ninst✝ : DecidableEq n\nv : n → α\ni : n\n⊢ (Finset.sup Finset.univ fun b => ‖diagonal v i b‖₊) = ‖v i‖₊\n[PROOFSTEP]\nrefine' le_antisymm (Finset.sup_le fun j hj => _) _\n[GOAL]\ncase e_f.h.refine'_1\nR : Type u_1\nl : Type u_2\nm : Type u_3\nn : Type u_4\nα : Type u_5\nβ : Type u_6\ninst✝⁵ : Fintype l\ninst✝⁴ : Fintype m\ninst✝³ : Fintype n\ninst✝² : SeminormedAddCommGroup α\ninst✝¹ : SeminormedAddCommGroup β\ninst✝ : DecidableEq n\nv : n → α\ni j : n\nhj : j ∈ Finset.univ\n⊢ ‖diagonal v i j‖₊ ≤ ‖v i‖₊\n[PROOFSTEP]\nobtain rfl | hij := eq_or_ne i j\n[GOAL]\ncase e_f.h.refine'_1.inl\nR : Type u_1\nl : Type u_2\nm : Type u_3\nn : Type u_4\nα : Type u_5\nβ : Type u_6\ninst✝⁵ : Fintype l\ninst✝⁴ : Fintype m\ninst✝³ : Fintype n\ninst✝² : SeminormedAddCommGroup α\ninst✝¹ : SeminormedAddCommGroup β\ninst✝ : DecidableEq n\nv : n → α\ni : n\nhj : i ∈ Finset.univ\n⊢ ‖diagonal v i i‖₊ ≤ ‖v i‖₊\n[PROOFSTEP]\nrw [diagonal_apply_eq]\n[GOAL]\ncase e_f.h.refine'_1.inr\nR : Type u_1\nl : Type u_2\nm : Type u_3\nn : Type u_4\nα : Type u_5\nβ : Type u_6\ninst✝⁵ : Fintype l\ninst✝⁴ : Fintype m\ninst✝³ : Fintype n\ninst✝² : SeminormedAddCommGroup α\ninst✝¹ : SeminormedAddCommGroup β\ninst✝ : DecidableEq n\nv : n → α\ni j : n\nhj : j ∈ Finset.univ\nhij : i ≠ j\n⊢ ‖diagonal v i j‖₊ ≤ ‖v i‖₊\n[PROOFSTEP]\nrw [diagonal_apply_ne _ hij, nnnorm_zero]\n[GOAL]\ncase e_f.h.refine'_1.inr\nR : Type u_1\nl : Type u_2\nm : Type u_3\nn : Type u_4\nα : Type u_5\nβ : Type u_6\ninst✝⁵ : Fintype l\ninst✝⁴ : Fintype m\ninst✝³ : Fintype n\ninst✝² : SeminormedAddCommGroup α\ninst✝¹ : SeminormedAddCommGroup β\ninst✝ : DecidableEq n\nv : n → α\ni j : n\nhj : j ∈ Finset.univ\nhij : i ≠ j\n⊢ 0 ≤ ‖v i‖₊\n[PROOFSTEP]\nexact zero_le _\n[GOAL]\ncase e_f.h.refine'_2\nR : Type u_1\nl : Type u_2\nm : Type u_3\nn : Type u_4\nα : Type u_5\nβ : Type u_6\ninst✝⁵ : Fintype l\ninst✝⁴ : Fintype m\ninst✝³ : Fintype n\ninst✝² : SeminormedAddCommGroup α\ninst✝¹ : SeminormedAddCommGroup β\ninst✝ : DecidableEq n\nv : n → α\ni : n\n⊢ ‖v i‖₊ ≤ Finset.sup Finset.univ fun b => ‖diagonal v i b‖₊\n[PROOFSTEP]\nrefine' Eq.trans_le _ (Finset.le_sup (Finset.mem_univ i))\n[GOAL]\ncase e_f.h.refine'_2\nR : Type u_1\nl : Type u_2\nm : Type u_3\nn : Type u_4\nα : Type u_5\nβ : Type u_6\ninst✝⁵ : Fintype l\ninst✝⁴ : Fintype m\ninst✝³ : Fintype n\ninst✝² : SeminormedAddCommGroup α\ninst✝¹ : SeminormedAddCommGroup β\ninst✝ : DecidableEq n\nv : n → α\ni : n\n⊢ ‖v i‖₊ = ‖diagonal v i i‖₊\n[PROOFSTEP]\nrw [diagonal_apply_eq]\n[GOAL]\nR : Type u_1\nl : Type u_2\nm : Type u_3\nn : Type u_4\nα : Type u_5\nβ : Type u_6\ninst✝³ : Fintype l\ninst✝² : Fintype m\ninst✝¹ : Fintype n\ninst✝ : SeminormedAddCommGroup α\n⊢ SeminormedAddCommGroup (m → PiLp 1 fun j => α)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nR : Type u_1\nl : Type u_2\nm : Type u_3\nn : Type u_4\nα : Type u_5\nβ : Type u_6\ninst✝³ : Fintype l\ninst✝² : Fintype m\ninst✝¹ : Fintype n\ninst✝ : NormedAddCommGroup α\n⊢ NormedAddCommGroup (m → PiLp 1 fun j => α)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nR : Type u_1\nl : Type u_2\nm : Type u_3\nn : Type u_4\nα : Type u_5\nβ : Type u_6\ninst✝⁵ : Fintype l\ninst✝⁴ : Fintype m\ninst✝³ : Fintype n\ninst✝² : NormedField R\ninst✝¹ : SeminormedAddCommGroup α\ninst✝ : NormedSpace R α\n⊢ NormedSpace R (m → PiLp 1 fun j => α)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nR : Type u_1\nl : Type u_2\nm : Type u_3\nn : Type u_4\nα : Type u_5\nβ : Type u_6\ninst✝³ : Fintype l\ninst✝² : Fintype m\ninst✝¹ : Fintype n\ninst✝ : SeminormedAddCommGroup α\nA : Matrix m n α\n⊢ ‖A‖ = ↑(Finset.sup Finset.univ fun i => ∑ j : n, ‖A i j‖₊)\n[PROOFSTEP]\nchange ‖fun i => (PiLp.equiv 1 _).symm (A i)‖ = _\n[GOAL]\nR : Type u_1\nl : Type u_2\nm : Type u_3\nn : Type u_4\nα : Type u_5\nβ : Type u_6\ninst✝³ : Fintype l\ninst✝² : Fintype m\ninst✝¹ : Fintype n\ninst✝ : SeminormedAddCommGroup α\nA : Matrix m n α\n⊢ ‖fun i => ↑(PiLp.equiv 1 fun i => α).symm (A i)‖ = ↑(Finset.sup Finset.univ fun i => ∑ j : n, ‖A i j‖₊)\n[PROOFSTEP]\nsimp [Pi.norm_def, PiLp.nnnorm_eq_sum ENNReal.one_ne_top]\n[GOAL]\nR : Type u_1\nl : Type u_2\nm : Type u_3\nn : Type u_4\nα : Type u_5\nβ : Type u_6\ninst✝³ : Fintype l\ninst✝² : Fintype m\ninst✝¹ : Fintype n\ninst✝ : SeminormedAddCommGroup α\nv : m → α\n⊢ ‖col v‖₊ = ‖v‖₊\n[PROOFSTEP]\nrw [linfty_op_nnnorm_def, Pi.nnnorm_def]\n[GOAL]\nR : Type u_1\nl : Type u_2\nm : Type u_3\nn : Type u_4\nα : Type u_5\nβ : Type u_6\ninst✝³ : Fintype l\ninst✝² : Fintype m\ninst✝¹ : Fintype n\ninst✝ : SeminormedAddCommGroup α\nv : m → α\n⊢ (Finset.sup Finset.univ fun i => ∑ j : Unit, ‖col v i j‖₊) = Finset.sup Finset.univ fun b => ‖v b‖₊\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\nl : Type u_2\nm : Type u_3\nn : Type u_4\nα : Type u_5\nβ : Type u_6\ninst✝³ : Fintype l\ninst✝² : Fintype m\ninst✝¹ : Fintype n\ninst✝ : SeminormedAddCommGroup α\nv : n → α\n⊢ ‖row v‖₊ = ∑ i : n, ‖v i‖₊\n[PROOFSTEP]\nsimp [linfty_op_nnnorm_def]\n[GOAL]\nR : Type u_1\nl : Type u_2\nm : Type u_3\nn : Type u_4\nα : Type u_5\nβ : Type u_6\ninst✝³ : Fintype l\ninst✝² : Fintype m\ninst✝¹ : Fintype n\ninst✝ : SeminormedAddCommGroup α\nv : n → α\n⊢ ↑(∑ i : n, ‖v i‖₊) = ∑ i : n, ‖v i‖\n[PROOFSTEP]\nsimp [NNReal.coe_sum]\n[GOAL]\nR : Type u_1\nl : Type u_2\nm : Type u_3\nn : Type u_4\nα : Type u_5\nβ : Type u_6\ninst✝⁴ : Fintype l\ninst✝³ : Fintype m\ninst✝² : Fintype n\ninst✝¹ : SeminormedAddCommGroup α\ninst✝ : DecidableEq m\nv : m → α\n⊢ ‖diagonal v‖₊ = ‖v‖₊\n[PROOFSTEP]\nrw [linfty_op_nnnorm_def, Pi.nnnorm_def]\n[GOAL]\nR : Type u_1\nl : Type u_2\nm : Type u_3\nn : Type u_4\nα : Type u_5\nβ : Type u_6\ninst✝⁴ : Fintype l\ninst✝³ : Fintype m\ninst✝² : Fintype n\ninst✝¹ : SeminormedAddCommGroup α\ninst✝ : DecidableEq m\nv : m → α\n⊢ (Finset.sup Finset.univ fun i => ∑ j : m, ‖diagonal v i j‖₊) = Finset.sup Finset.univ fun b => ‖v b‖₊\n[PROOFSTEP]\ncongr 1 with i : 1\n[GOAL]\ncase e_f.h\nR : Type u_1\nl : Type u_2\nm : Type u_3\nn : Type u_4\nα : Type u_5\nβ : Type u_6\ninst✝⁴ : Fintype l\ninst✝³ : Fintype m\ninst✝² : Fintype n\ninst✝¹ : SeminormedAddCommGroup α\ninst✝ : DecidableEq m\nv : m → α\ni : m\n⊢ ∑ j : m, ‖diagonal v i j‖₊ = ‖v i‖₊\n[PROOFSTEP]\nrefine' (Finset.sum_eq_single_of_mem _ (Finset.mem_univ i) fun j _hj hij => _).trans _\n[GOAL]\ncase e_f.h.refine'_1\nR : Type u_1\nl : Type u_2\nm : Type u_3\nn : Type u_4\nα : Type u_5\nβ : Type u_6\ninst✝⁴ : Fintype l\ninst✝³ : Fintype m\ninst✝² : Fintype n\ninst✝¹ : SeminormedAddCommGroup α\ninst✝ : DecidableEq m\nv : m → α\ni j : m\n_hj : j ∈ Finset.univ\nhij : j ≠ i\n⊢ ‖diagonal v i j‖₊ = 0\n[PROOFSTEP]\nrw [diagonal_apply_ne' _ hij, nnnorm_zero]\n[GOAL]\ncase e_f.h.refine'_2\nR : Type u_1\nl : Type u_2\nm : Type u_3\nn : Type u_4\nα : Type u_5\nβ : Type u_6\ninst✝⁴ : Fintype l\ninst✝³ : Fintype m\ninst✝² : Fintype n\ninst✝¹ : SeminormedAddCommGroup α\ninst✝ : DecidableEq m\nv : m → α\ni : m\n⊢ ‖diagonal v i i‖₊ = ‖v i‖₊\n[PROOFSTEP]\nrw [diagonal_apply_eq]\n[GOAL]\nR : Type u_1\nl : Type u_2\nm : Type u_3\nn : Type u_4\nα : Type u_5\nβ : Type u_6\ninst✝³ : Fintype l\ninst✝² : Fintype m\ninst✝¹ : Fintype n\ninst✝ : NonUnitalSeminormedRing α\nA : Matrix l m α\nB : Matrix m n α\n⊢ ‖A * B‖₊ ≤ ‖A‖₊ * ‖B‖₊\n[PROOFSTEP]\nsimp_rw [linfty_op_nnnorm_def, Matrix.mul_apply]\n[GOAL]\nR : Type u_1\nl : Type u_2\nm : Type u_3\nn : Type u_4\nα : Type u_5\nβ : Type u_6\ninst✝³ : Fintype l\ninst✝² : Fintype m\ninst✝¹ : Fintype n\ninst✝ : NonUnitalSeminormedRing α\nA : Matrix l m α\nB : Matrix m n α\n⊢ (Finset.sup Finset.univ fun i => ∑ x : n, ‖∑ j : m, A i j * B j x‖₊) ≤\n    (Finset.sup Finset.univ fun i => ∑ j : m, ‖A i j‖₊) * Finset.sup Finset.univ fun i => ∑ j : n, ‖B i j‖₊\n[PROOFSTEP]\ncalc\n  (Finset.univ.sup fun i => ∑ k, ‖∑ j, A i j * B j k‖₊) ≤ Finset.univ.sup fun i => ∑ k, ∑ j, ‖A i j‖₊ * ‖B j k‖₊ :=\n    Finset.sup_mono_fun fun i _hi => Finset.sum_le_sum fun k _hk => nnnorm_sum_le_of_le _ fun j _hj => nnnorm_mul_le _ _\n  _ = Finset.univ.sup fun i => ∑ j, ‖A i j‖₊ * ∑ k, ‖B j k‖₊ := by simp_rw [@Finset.sum_comm _ m n, Finset.mul_sum]\n  _ ≤ Finset.univ.sup fun i => ∑ j, ‖A i j‖₊ * Finset.univ.sup fun i => ∑ j, ‖B i j‖₊ :=\n    by\n    refine Finset.sup_mono_fun fun i _hi => ?_\n    gcongr with j hj\n    exact Finset.le_sup (f := fun i ↦ ∑ k : n, ‖B i k‖₊) hj\n  _ ≤ (Finset.univ.sup fun i => ∑ j, ‖A i j‖₊) * Finset.univ.sup fun i => ∑ j, ‖B i j‖₊ :=\n    by\n    simp_rw [← Finset.sum_mul, ← NNReal.finset_sup_mul]\n    rfl\n[GOAL]\nR : Type u_1\nl : Type u_2\nm : Type u_3\nn : Type u_4\nα : Type u_5\nβ : Type u_6\ninst✝³ : Fintype l\ninst✝² : Fintype m\ninst✝¹ : Fintype n\ninst✝ : NonUnitalSeminormedRing α\nA : Matrix l m α\nB : Matrix m n α\n⊢ (Finset.sup Finset.univ fun i => ∑ k : n, ∑ j : m, ‖A i j‖₊ * ‖B j k‖₊) =\n    Finset.sup Finset.univ fun i => ∑ j : m, ‖A i j‖₊ * ∑ k : n, ‖B j k‖₊\n[PROOFSTEP]\nsimp_rw [@Finset.sum_comm _ m n, Finset.mul_sum]\n[GOAL]\nR : Type u_1\nl : Type u_2\nm : Type u_3\nn : Type u_4\nα : Type u_5\nβ : Type u_6\ninst✝³ : Fintype l\ninst✝² : Fintype m\ninst✝¹ : Fintype n\ninst✝ : NonUnitalSeminormedRing α\nA : Matrix l m α\nB : Matrix m n α\n⊢ (Finset.sup Finset.univ fun i => ∑ j : m, ‖A i j‖₊ * ∑ k : n, ‖B j k‖₊) ≤\n    Finset.sup Finset.univ fun i => ∑ j : m, ‖A i j‖₊ * Finset.sup Finset.univ fun i => ∑ j : n, ‖B i j‖₊\n[PROOFSTEP]\nrefine Finset.sup_mono_fun fun i _hi => ?_\n[GOAL]\nR : Type u_1\nl : Type u_2\nm : Type u_3\nn : Type u_4\nα : Type u_5\nβ : Type u_6\ninst✝³ : Fintype l\ninst✝² : Fintype m\ninst✝¹ : Fintype n\ninst✝ : NonUnitalSeminormedRing α\nA : Matrix l m α\nB : Matrix m n α\ni : l\n_hi : i ∈ Finset.univ\n⊢ ∑ j : m, ‖A i j‖₊ * ∑ k : n, ‖B j k‖₊ ≤ ∑ j : m, ‖A i j‖₊ * Finset.sup Finset.univ fun i => ∑ j : n, ‖B i j‖₊\n[PROOFSTEP]\ngcongr with j hj\n[GOAL]\ncase h.bc\nR : Type u_1\nl : Type u_2\nm : Type u_3\nn : Type u_4\nα : Type u_5\nβ : Type u_6\ninst✝³ : Fintype l\ninst✝² : Fintype m\ninst✝¹ : Fintype n\ninst✝ : NonUnitalSeminormedRing α\nA : Matrix l m α\nB : Matrix m n α\ni : l\n_hi : i ∈ Finset.univ\nj : m\nhj : j ∈ Finset.univ\n⊢ ∑ k : n, ‖B j k‖₊ ≤ Finset.sup Finset.univ fun i => ∑ j : n, ‖B i j‖₊\n[PROOFSTEP]\nexact Finset.le_sup (f := fun i ↦ ∑ k : n, ‖B i k‖₊) hj\n[GOAL]\nR : Type u_1\nl : Type u_2\nm : Type u_3\nn : Type u_4\nα : Type u_5\nβ : Type u_6\ninst✝³ : Fintype l\ninst✝² : Fintype m\ninst✝¹ : Fintype n\ninst✝ : NonUnitalSeminormedRing α\nA : Matrix l m α\nB : Matrix m n α\n⊢ (Finset.sup Finset.univ fun i => ∑ j : m, ‖A i j‖₊ * Finset.sup Finset.univ fun i => ∑ j : n, ‖B i j‖₊) ≤\n    (Finset.sup Finset.univ fun i => ∑ j : m, ‖A i j‖₊) * Finset.sup Finset.univ fun i => ∑ j : n, ‖B i j‖₊\n[PROOFSTEP]\nsimp_rw [← Finset.sum_mul, ← NNReal.finset_sup_mul]\n[GOAL]\nR : Type u_1\nl : Type u_2\nm : Type u_3\nn : Type u_4\nα : Type u_5\nβ : Type u_6\ninst✝³ : Fintype l\ninst✝² : Fintype m\ninst✝¹ : Fintype n\ninst✝ : NonUnitalSeminormedRing α\nA : Matrix l m α\nB : Matrix m n α\n⊢ ((Finset.sup Finset.univ fun a => ∑ x : m, ‖A a x‖₊) * Finset.sup Finset.univ fun i => ∑ j : n, ‖B i j‖₊) ≤\n    (Finset.sup Finset.univ fun i => ∑ j : m, ‖A i j‖₊) * Finset.sup Finset.univ fun i => ∑ j : n, ‖B i j‖₊\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u_1\nl : Type u_2\nm : Type u_3\nn : Type u_4\nα : Type u_5\nβ : Type u_6\ninst✝³ : Fintype l\ninst✝² : Fintype m\ninst✝¹ : Fintype n\ninst✝ : NonUnitalSeminormedRing α\nA : Matrix l m α\nv : m → α\n⊢ ‖mulVec A v‖₊ ≤ ‖A‖₊ * ‖v‖₊\n[PROOFSTEP]\nrw [← linfty_op_nnnorm_col (A.mulVec v), ← linfty_op_nnnorm_col v]\n[GOAL]\nR : Type u_1\nl : Type u_2\nm : Type u_3\nn : Type u_4\nα : Type u_5\nβ : Type u_6\ninst✝³ : Fintype l\ninst✝² : Fintype m\ninst✝¹ : Fintype n\ninst✝ : NonUnitalSeminormedRing α\nA : Matrix l m α\nv : m → α\n⊢ ‖col (mulVec A v)‖₊ ≤ ‖A‖₊ * ‖col v‖₊\n[PROOFSTEP]\nexact linfty_op_nnnorm_mul A (col v)\n[GOAL]\nR : Type u_1\nl : Type u_2\nm : Type u_3\nn : Type u_4\nα : Type u_5\nβ : Type u_6\ninst✝³ : Fintype l\ninst✝² : Fintype m\ninst✝¹ : Fintype n\ninst✝ : NormedAddCommGroup α\n⊢ NormedAddCommGroup (PiLp 2 fun i => PiLp 2 fun j => α)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nR : Type u_1\nl : Type u_2\nm : Type u_3\nn : Type u_4\nα : Type u_5\nβ : Type u_6\ninst✝⁵ : Fintype l\ninst✝⁴ : Fintype m\ninst✝³ : Fintype n\ninst✝² : NormedField R\ninst✝¹ : SeminormedAddCommGroup α\ninst✝ : NormedSpace R α\n⊢ NormedSpace R (PiLp 2 fun i => PiLp 2 fun j => α)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nR : Type u_1\nl : Type u_2\nm : Type u_3\nn : Type u_4\nα : Type u_5\nβ : Type u_6\ninst✝⁴ : Fintype l\ninst✝³ : Fintype m\ninst✝² : Fintype n\ninst✝¹ : SeminormedAddCommGroup α\ninst✝ : SeminormedAddCommGroup β\nA : Matrix m n α\n⊢ ‖A‖₊ = (∑ i : m, ∑ j : n, ‖A i j‖₊ ^ 2) ^ (1 / 2)\n[PROOFSTEP]\nchange ‖(PiLp.equiv 2 _).symm <| fun i => (PiLp.equiv 2 _).symm <| fun j => A i j‖₊ = _\n[GOAL]\nR : Type u_1\nl : Type u_2\nm : Type u_3\nn : Type u_4\nα : Type u_5\nβ : Type u_6\ninst✝⁴ : Fintype l\ninst✝³ : Fintype m\ninst✝² : Fintype n\ninst✝¹ : SeminormedAddCommGroup α\ninst✝ : SeminormedAddCommGroup β\nA : Matrix m n α\n⊢ ‖↑(PiLp.equiv 2 fun i => (fun x => PiLp 2 fun j => α) fun j => A i j).symm fun i =>\n        ↑(PiLp.equiv 2 fun j => α).symm fun j => A i j‖₊ =\n    (∑ i : m, ∑ j : n, ‖A i j‖₊ ^ 2) ^ (1 / 2)\n[PROOFSTEP]\nsimp_rw [PiLp.nnnorm_eq_of_L2, NNReal.sq_sqrt, NNReal.sqrt_eq_rpow, NNReal.rpow_two, PiLp.equiv_symm_apply]\n[GOAL]\nR : Type u_1\nl : Type u_2\nm : Type u_3\nn : Type u_4\nα : Type u_5\nβ : Type u_6\ninst✝⁴ : Fintype l\ninst✝³ : Fintype m\ninst✝² : Fintype n\ninst✝¹ : SeminormedAddCommGroup α\ninst✝ : SeminormedAddCommGroup β\nA : Matrix m n α\n⊢ ↑((∑ i : m, ∑ j : n, ‖A i j‖₊ ^ 2) ^ (1 / 2)) = (∑ i : m, ∑ j : n, ‖A i j‖ ^ 2) ^ (1 / 2)\n[PROOFSTEP]\nsimp [NNReal.coe_sum]\n[GOAL]\nR : Type u_1\nl : Type u_2\nm : Type u_3\nn : Type u_4\nα : Type u_5\nβ : Type u_6\ninst✝⁴ : Fintype l\ninst✝³ : Fintype m\ninst✝² : Fintype n\ninst✝¹ : SeminormedAddCommGroup α\ninst✝ : SeminormedAddCommGroup β\nA : Matrix m n α\nf : α → β\nhf : ∀ (a : α), ‖f a‖₊ = ‖a‖₊\n⊢ ‖map A f‖₊ = ‖A‖₊\n[PROOFSTEP]\nsimp_rw [frobenius_nnnorm_def, Matrix.map_apply, hf]\n[GOAL]\nR : Type u_1\nl : Type u_2\nm : Type u_3\nn : Type u_4\nα : Type u_5\nβ : Type u_6\ninst✝⁴ : Fintype l\ninst✝³ : Fintype m\ninst✝² : Fintype n\ninst✝¹ : SeminormedAddCommGroup α\ninst✝ : SeminormedAddCommGroup β\nA : Matrix m n α\n⊢ ‖Aᵀ‖₊ = ‖A‖₊\n[PROOFSTEP]\nrw [frobenius_nnnorm_def, frobenius_nnnorm_def, Finset.sum_comm]\n[GOAL]\nR : Type u_1\nl : Type u_2\nm : Type u_3\nn : Type u_4\nα : Type u_5\nβ : Type u_6\ninst✝⁴ : Fintype l\ninst✝³ : Fintype m\ninst✝² : Fintype n\ninst✝¹ : SeminormedAddCommGroup α\ninst✝ : SeminormedAddCommGroup β\nA : Matrix m n α\n⊢ (∑ y : m, ∑ x : n, ‖Aᵀ x y‖₊ ^ 2) ^ (1 / 2) = (∑ i : m, ∑ j : n, ‖A i j‖₊ ^ 2) ^ (1 / 2)\n[PROOFSTEP]\nsimp_rw [Matrix.transpose_apply]\n  -- porting note: added\n[GOAL]\nR : Type u_1\nl : Type u_2\nm : Type u_3\nn : Type u_4\nα : Type u_5\nβ : Type u_6\ninst✝⁴ : Fintype l\ninst✝³ : Fintype m\ninst✝² : Fintype n\ninst✝¹ : SeminormedAddCommGroup α\ninst✝ : SeminormedAddCommGroup β\nv : m → α\n⊢ ‖row v‖ = ‖↑(PiLp.equiv 2 fun i => α).symm v‖\n[PROOFSTEP]\nrw [frobenius_norm_def, Fintype.sum_unique, PiLp.norm_eq_of_L2, Real.sqrt_eq_rpow]\n[GOAL]\nR : Type u_1\nl : Type u_2\nm : Type u_3\nn : Type u_4\nα : Type u_5\nβ : Type u_6\ninst✝⁴ : Fintype l\ninst✝³ : Fintype m\ninst✝² : Fintype n\ninst✝¹ : SeminormedAddCommGroup α\ninst✝ : SeminormedAddCommGroup β\nv : m → α\n⊢ (∑ j : m, ‖row v default j‖ ^ 2) ^ (1 / 2) = (∑ i : m, ‖↑(PiLp.equiv 2 fun i => α).symm v i‖ ^ 2) ^ (1 / 2)\n[PROOFSTEP]\nsimp only [row_apply, Real.rpow_two, PiLp.equiv_symm_apply]\n[GOAL]\nR : Type u_1\nl : Type u_2\nm : Type u_3\nn : Type u_4\nα : Type u_5\nβ : Type u_6\ninst✝⁴ : Fintype l\ninst✝³ : Fintype m\ninst✝² : Fintype n\ninst✝¹ : SeminormedAddCommGroup α\ninst✝ : SeminormedAddCommGroup β\nv : n → α\n⊢ ‖col v‖ = ‖↑(PiLp.equiv 2 fun i => α).symm v‖\n[PROOFSTEP]\nsimp_rw [frobenius_norm_def, Fintype.sum_unique, PiLp.norm_eq_of_L2, Real.sqrt_eq_rpow]\n[GOAL]\nR : Type u_1\nl : Type u_2\nm : Type u_3\nn : Type u_4\nα : Type u_5\nβ : Type u_6\ninst✝⁴ : Fintype l\ninst✝³ : Fintype m\ninst✝² : Fintype n\ninst✝¹ : SeminormedAddCommGroup α\ninst✝ : SeminormedAddCommGroup β\nv : n → α\n⊢ (∑ x : n, ‖col v x default‖ ^ 2) ^ (1 / 2) = (∑ i : n, ‖↑(PiLp.equiv 2 fun i => α).symm v i‖ ^ 2) ^ (1 / 2)\n[PROOFSTEP]\nsimp only [col_apply, Real.rpow_two, PiLp.equiv_symm_apply]\n[GOAL]\nR : Type u_1\nl : Type u_2\nm : Type u_3\nn : Type u_4\nα : Type u_5\nβ : Type u_6\ninst✝⁵ : Fintype l\ninst✝⁴ : Fintype m\ninst✝³ : Fintype n\ninst✝² : SeminormedAddCommGroup α\ninst✝¹ : SeminormedAddCommGroup β\ninst✝ : DecidableEq n\nv : n → α\n⊢ ‖diagonal v‖₊ = ‖↑(PiLp.equiv 2 fun i => α).symm v‖₊\n[PROOFSTEP]\nsimp_rw [frobenius_nnnorm_def, ← Finset.sum_product', Finset.univ_product_univ, PiLp.nnnorm_eq_of_L2]\n[GOAL]\nR : Type u_1\nl : Type u_2\nm : Type u_3\nn : Type u_4\nα : Type u_5\nβ : Type u_6\ninst✝⁵ : Fintype l\ninst✝⁴ : Fintype m\ninst✝³ : Fintype n\ninst✝² : SeminormedAddCommGroup α\ninst✝¹ : SeminormedAddCommGroup β\ninst✝ : DecidableEq n\nv : n → α\n⊢ (∑ x : n × n, ‖diagonal v x.fst x.snd‖₊ ^ 2) ^ (1 / 2) =\n    ↑NNReal.sqrt (∑ i : n, ‖↑(PiLp.equiv 2 fun i => α).symm v i‖₊ ^ 2)\n[PROOFSTEP]\nlet s := (Finset.univ : Finset n).map ⟨fun i : n => (i, i), fun i j h => congr_arg Prod.fst h⟩\n[GOAL]\nR : Type u_1\nl : Type u_2\nm : Type u_3\nn : Type u_4\nα : Type u_5\nβ : Type u_6\ninst✝⁵ : Fintype l\ninst✝⁴ : Fintype m\ninst✝³ : Fintype n\ninst✝² : SeminormedAddCommGroup α\ninst✝¹ : SeminormedAddCommGroup β\ninst✝ : DecidableEq n\nv : n → α\ns : Finset (n × n) :=\n  Finset.map\n    { toFun := fun i => (i, i),\n      inj' :=\n        (_ :\n          ∀ (i j : n),\n            (fun i => (i, i)) i = (fun i => (i, i)) j → ((fun i => (i, i)) i).fst = ((fun i => (i, i)) j).fst) }\n    Finset.univ\n⊢ (∑ x : n × n, ‖diagonal v x.fst x.snd‖₊ ^ 2) ^ (1 / 2) =\n    ↑NNReal.sqrt (∑ i : n, ‖↑(PiLp.equiv 2 fun i => α).symm v i‖₊ ^ 2)\n[PROOFSTEP]\nrw [← Finset.sum_subset (Finset.subset_univ s) fun i _hi his => ?_]\n[GOAL]\nR : Type u_1\nl : Type u_2\nm : Type u_3\nn : Type u_4\nα : Type u_5\nβ : Type u_6\ninst✝⁵ : Fintype l\ninst✝⁴ : Fintype m\ninst✝³ : Fintype n\ninst✝² : SeminormedAddCommGroup α\ninst✝¹ : SeminormedAddCommGroup β\ninst✝ : DecidableEq n\nv : n → α\ns : Finset (n × n) :=\n  Finset.map\n    { toFun := fun i => (i, i),\n      inj' :=\n        (_ :\n          ∀ (i j : n),\n            (fun i => (i, i)) i = (fun i => (i, i)) j → ((fun i => (i, i)) i).fst = ((fun i => (i, i)) j).fst) }\n    Finset.univ\n⊢ (∑ x in s, ‖diagonal v x.fst x.snd‖₊ ^ 2) ^ (1 / 2) =\n    ↑NNReal.sqrt (∑ i : n, ‖↑(PiLp.equiv 2 fun i => α).symm v i‖₊ ^ 2)\n[PROOFSTEP]\nrw [Finset.sum_map, NNReal.sqrt_eq_rpow]\n[GOAL]\nR : Type u_1\nl : Type u_2\nm : Type u_3\nn : Type u_4\nα : Type u_5\nβ : Type u_6\ninst✝⁵ : Fintype l\ninst✝⁴ : Fintype m\ninst✝³ : Fintype n\ninst✝² : SeminormedAddCommGroup α\ninst✝¹ : SeminormedAddCommGroup β\ninst✝ : DecidableEq n\nv : n → α\ns : Finset (n × n) :=\n  Finset.map\n    { toFun := fun i => (i, i),\n      inj' :=\n        (_ :\n          ∀ (i j : n),\n            (fun i => (i, i)) i = (fun i => (i, i)) j → ((fun i => (i, i)) i).fst = ((fun i => (i, i)) j).fst) }\n    Finset.univ\n⊢ (∑ x : n,\n        ‖diagonal v\n              (↑{ toFun := fun i => (i, i),\n                      inj' :=\n                        (_ :\n                          ∀ (i j : n),\n                            (fun i => (i, i)) i = (fun i => (i, i)) j →\n                              ((fun i => (i, i)) i).fst = ((fun i => (i, i)) j).fst) }\n                  x).fst\n              (↑{ toFun := fun i => (i, i),\n                      inj' :=\n                        (_ :\n                          ∀ (i j : n),\n                            (fun i => (i, i)) i = (fun i => (i, i)) j →\n                              ((fun i => (i, i)) i).fst = ((fun i => (i, i)) j).fst) }\n                  x).snd‖₊ ^\n          2) ^\n      (1 / 2) =\n    (∑ i : n, ‖↑(PiLp.equiv 2 fun i => α).symm v i‖₊ ^ 2) ^ (1 / 2)\n[PROOFSTEP]\ndsimp\n[GOAL]\nR : Type u_1\nl : Type u_2\nm : Type u_3\nn : Type u_4\nα : Type u_5\nβ : Type u_6\ninst✝⁵ : Fintype l\ninst✝⁴ : Fintype m\ninst✝³ : Fintype n\ninst✝² : SeminormedAddCommGroup α\ninst✝¹ : SeminormedAddCommGroup β\ninst✝ : DecidableEq n\nv : n → α\ns : Finset (n × n) :=\n  Finset.map\n    { toFun := fun i => (i, i),\n      inj' :=\n        (_ :\n          ∀ (i j : n),\n            (fun i => (i, i)) i = (fun i => (i, i)) j → ((fun i => (i, i)) i).fst = ((fun i => (i, i)) j).fst) }\n    Finset.univ\n⊢ (∑ x : n, ‖diagonal v x x‖₊ ^ 2) ^ (1 / 2) = (∑ i : n, ‖v i‖₊ ^ 2) ^ (1 / 2)\n[PROOFSTEP]\nsimp_rw [diagonal_apply_eq, NNReal.rpow_two]\n[GOAL]\nR : Type u_1\nl : Type u_2\nm : Type u_3\nn : Type u_4\nα : Type u_5\nβ : Type u_6\ninst✝⁵ : Fintype l\ninst✝⁴ : Fintype m\ninst✝³ : Fintype n\ninst✝² : SeminormedAddCommGroup α\ninst✝¹ : SeminormedAddCommGroup β\ninst✝ : DecidableEq n\nv : n → α\ns : Finset (n × n) :=\n  Finset.map\n    { toFun := fun i => (i, i),\n      inj' :=\n        (_ :\n          ∀ (i j : n),\n            (fun i => (i, i)) i = (fun i => (i, i)) j → ((fun i => (i, i)) i).fst = ((fun i => (i, i)) j).fst) }\n    Finset.univ\ni : n × n\n_hi : i ∈ Finset.univ\nhis : ¬i ∈ s\n⊢ ‖diagonal v i.fst i.snd‖₊ ^ 2 = 0\n[PROOFSTEP]\nsuffices i.1 ≠ i.2 by rw [diagonal_apply_ne _ this, nnnorm_zero, NNReal.zero_rpow two_ne_zero]\n[GOAL]\nR : Type u_1\nl : Type u_2\nm : Type u_3\nn : Type u_4\nα : Type u_5\nβ : Type u_6\ninst✝⁵ : Fintype l\ninst✝⁴ : Fintype m\ninst✝³ : Fintype n\ninst✝² : SeminormedAddCommGroup α\ninst✝¹ : SeminormedAddCommGroup β\ninst✝ : DecidableEq n\nv : n → α\ns : Finset (n × n) :=\n  Finset.map\n    { toFun := fun i => (i, i),\n      inj' :=\n        (_ :\n          ∀ (i j : n),\n            (fun i => (i, i)) i = (fun i => (i, i)) j → ((fun i => (i, i)) i).fst = ((fun i => (i, i)) j).fst) }\n    Finset.univ\ni : n × n\n_hi : i ∈ Finset.univ\nhis : ¬i ∈ s\nthis : i.fst ≠ i.snd\n⊢ ‖diagonal v i.fst i.snd‖₊ ^ 2 = 0\n[PROOFSTEP]\nrw [diagonal_apply_ne _ this, nnnorm_zero, NNReal.zero_rpow two_ne_zero]\n[GOAL]\nR : Type u_1\nl : Type u_2\nm : Type u_3\nn : Type u_4\nα : Type u_5\nβ : Type u_6\ninst✝⁵ : Fintype l\ninst✝⁴ : Fintype m\ninst✝³ : Fintype n\ninst✝² : SeminormedAddCommGroup α\ninst✝¹ : SeminormedAddCommGroup β\ninst✝ : DecidableEq n\nv : n → α\ns : Finset (n × n) :=\n  Finset.map\n    { toFun := fun i => (i, i),\n      inj' :=\n        (_ :\n          ∀ (i j : n),\n            (fun i => (i, i)) i = (fun i => (i, i)) j → ((fun i => (i, i)) i).fst = ((fun i => (i, i)) j).fst) }\n    Finset.univ\ni : n × n\n_hi : i ∈ Finset.univ\nhis : ¬i ∈ s\n⊢ i.fst ≠ i.snd\n[PROOFSTEP]\nintro h\n[GOAL]\nR : Type u_1\nl : Type u_2\nm : Type u_3\nn : Type u_4\nα : Type u_5\nβ : Type u_6\ninst✝⁵ : Fintype l\ninst✝⁴ : Fintype m\ninst✝³ : Fintype n\ninst✝² : SeminormedAddCommGroup α\ninst✝¹ : SeminormedAddCommGroup β\ninst✝ : DecidableEq n\nv : n → α\ns : Finset (n × n) :=\n  Finset.map\n    { toFun := fun i => (i, i),\n      inj' :=\n        (_ :\n          ∀ (i j : n),\n            (fun i => (i, i)) i = (fun i => (i, i)) j → ((fun i => (i, i)) i).fst = ((fun i => (i, i)) j).fst) }\n    Finset.univ\ni : n × n\n_hi : i ∈ Finset.univ\nhis : ¬i ∈ s\nh : i.fst = i.snd\n⊢ False\n[PROOFSTEP]\nexact Finset.mem_map.not.mp his ⟨i.1, Finset.mem_univ _, Prod.ext rfl h⟩\n[GOAL]\nR : Type u_1\nl : Type u_2\nm : Type u_3\nn : Type u_4\nα : Type u_5\nβ : Type u_6\ninst✝⁵ : Fintype l\ninst✝⁴ : Fintype m\ninst✝³ : Fintype n\ninst✝² : DecidableEq n\ninst✝¹ : SeminormedAddCommGroup α\ninst✝ : One α\n⊢ ‖1‖₊ = ↑NNReal.sqrt ↑(Fintype.card n) * ‖1‖₊\n[PROOFSTEP]\nrefine'\n  (frobenius_nnnorm_diagonal _).trans\n    _\n      -- porting note: change to erw, since `fun x => 1` no longer matches `Function.const`\n[GOAL]\nR : Type u_1\nl : Type u_2\nm : Type u_3\nn : Type u_4\nα : Type u_5\nβ : Type u_6\ninst✝⁵ : Fintype l\ninst✝⁴ : Fintype m\ninst✝³ : Fintype n\ninst✝² : DecidableEq n\ninst✝¹ : SeminormedAddCommGroup α\ninst✝ : One α\n⊢ ‖↑(PiLp.equiv 2 fun i => α).symm fun x => 1‖₊ = ↑NNReal.sqrt ↑(Fintype.card n) * ‖1‖₊\n[PROOFSTEP]\nerw [PiLp.nnnorm_equiv_symm_const ENNReal.two_ne_top]\n[GOAL]\nR : Type u_1\nl : Type u_2\nm : Type u_3\nn : Type u_4\nα : Type u_5\nβ : Type u_6\ninst✝⁵ : Fintype l\ninst✝⁴ : Fintype m\ninst✝³ : Fintype n\ninst✝² : DecidableEq n\ninst✝¹ : SeminormedAddCommGroup α\ninst✝ : One α\n⊢ ↑(Fintype.card n) ^ ENNReal.toReal (1 / 2) * ‖1‖₊ = ↑NNReal.sqrt ↑(Fintype.card n) * ‖1‖₊\n[PROOFSTEP]\nsimp_rw [NNReal.sqrt_eq_rpow]\n  -- porting note: added `ENNReal.toReal_ofNat`\n[GOAL]\nR : Type u_1\nl : Type u_2\nm : Type u_3\nn : Type u_4\nα : Type u_5\nβ : Type u_6\ninst✝⁵ : Fintype l\ninst✝⁴ : Fintype m\ninst✝³ : Fintype n\ninst✝² : DecidableEq n\ninst✝¹ : SeminormedAddCommGroup α\ninst✝ : One α\n⊢ ↑(Fintype.card n) ^ ENNReal.toReal (1 / 2) * ‖1‖₊ = ↑(Fintype.card n) ^ (1 / 2) * ‖1‖₊\n[PROOFSTEP]\nsimp only [ENNReal.toReal_div, ENNReal.one_toReal, ENNReal.toReal_ofNat]\n[GOAL]\nR : Type u_1\nl : Type u_2\nm : Type u_3\nn : Type u_4\nα : Type u_5\nβ : Type u_6\ninst✝³ : Fintype l\ninst✝² : Fintype m\ninst✝¹ : Fintype n\ninst✝ : IsROrC α\nA : Matrix l m α\nB : Matrix m n α\n⊢ ‖A * B‖₊ ≤ ‖A‖₊ * ‖B‖₊\n[PROOFSTEP]\nsimp_rw [frobenius_nnnorm_def, Matrix.mul_apply]\n[GOAL]\nR : Type u_1\nl : Type u_2\nm : Type u_3\nn : Type u_4\nα : Type u_5\nβ : Type u_6\ninst✝³ : Fintype l\ninst✝² : Fintype m\ninst✝¹ : Fintype n\ninst✝ : IsROrC α\nA : Matrix l m α\nB : Matrix m n α\n⊢ (∑ x : l, ∑ x_1 : n, ‖∑ j : m, A x j * B j x_1‖₊ ^ 2) ^ (1 / 2) ≤\n    (∑ i : l, ∑ j : m, ‖A i j‖₊ ^ 2) ^ (1 / 2) * (∑ i : m, ∑ j : n, ‖B i j‖₊ ^ 2) ^ (1 / 2)\n[PROOFSTEP]\nrw [← NNReal.mul_rpow, @Finset.sum_comm _ n m, Finset.sum_mul_sum, Finset.sum_product]\n[GOAL]\nR : Type u_1\nl : Type u_2\nm : Type u_3\nn : Type u_4\nα : Type u_5\nβ : Type u_6\ninst✝³ : Fintype l\ninst✝² : Fintype m\ninst✝¹ : Fintype n\ninst✝ : IsROrC α\nA : Matrix l m α\nB : Matrix m n α\n⊢ (∑ x : l, ∑ x_1 : n, ‖∑ j : m, A x j * B j x_1‖₊ ^ 2) ^ (1 / 2) ≤\n    (∑ x : l, ∑ y : n, (∑ j : m, ‖A (x, y).fst j‖₊ ^ 2) * ∑ x_1 : m, ‖B x_1 (x, y).snd‖₊ ^ 2) ^ (1 / 2)\n[PROOFSTEP]\nrefine' NNReal.rpow_le_rpow _ one_half_pos.le\n[GOAL]\nR : Type u_1\nl : Type u_2\nm : Type u_3\nn : Type u_4\nα : Type u_5\nβ : Type u_6\ninst✝³ : Fintype l\ninst✝² : Fintype m\ninst✝¹ : Fintype n\ninst✝ : IsROrC α\nA : Matrix l m α\nB : Matrix m n α\n⊢ ∑ x : l, ∑ x_1 : n, ‖∑ j : m, A x j * B j x_1‖₊ ^ 2 ≤\n    ∑ x : l, ∑ y : n, (∑ j : m, ‖A (x, y).fst j‖₊ ^ 2) * ∑ x_1 : m, ‖B x_1 (x, y).snd‖₊ ^ 2\n[PROOFSTEP]\nrefine' Finset.sum_le_sum fun i _ => Finset.sum_le_sum fun j _ => _\n[GOAL]\nR : Type u_1\nl : Type u_2\nm : Type u_3\nn : Type u_4\nα : Type u_5\nβ : Type u_6\ninst✝³ : Fintype l\ninst✝² : Fintype m\ninst✝¹ : Fintype n\ninst✝ : IsROrC α\nA : Matrix l m α\nB : Matrix m n α\ni : l\nx✝¹ : i ∈ Finset.univ\nj : n\nx✝ : j ∈ Finset.univ\n⊢ ‖∑ j_1 : m, A i j_1 * B j_1 j‖₊ ^ 2 ≤ (∑ j_1 : m, ‖A (i, j).fst j_1‖₊ ^ 2) * ∑ x : m, ‖B x (i, j).snd‖₊ ^ 2\n[PROOFSTEP]\nrw [← NNReal.rpow_le_rpow_iff one_half_pos, ← NNReal.rpow_mul, mul_div_cancel' (1 : ℝ) two_ne_zero, NNReal.rpow_one,\n  NNReal.mul_rpow]\n[GOAL]\nR : Type u_1\nl : Type u_2\nm : Type u_3\nn : Type u_4\nα : Type u_5\nβ : Type u_6\ninst✝³ : Fintype l\ninst✝² : Fintype m\ninst✝¹ : Fintype n\ninst✝ : IsROrC α\nA : Matrix l m α\nB : Matrix m n α\ni : l\nx✝¹ : i ∈ Finset.univ\nj : n\nx✝ : j ∈ Finset.univ\n⊢ ‖∑ j_1 : m, A i j_1 * B j_1 j‖₊ ≤\n    (∑ j_1 : m, ‖A (i, j).fst j_1‖₊ ^ 2) ^ (1 / 2) * (∑ x : m, ‖B x (i, j).snd‖₊ ^ 2) ^ (1 / 2)\n[PROOFSTEP]\ndsimp only\n[GOAL]\nR : Type u_1\nl : Type u_2\nm : Type u_3\nn : Type u_4\nα : Type u_5\nβ : Type u_6\ninst✝³ : Fintype l\ninst✝² : Fintype m\ninst✝¹ : Fintype n\ninst✝ : IsROrC α\nA : Matrix l m α\nB : Matrix m n α\ni : l\nx✝¹ : i ∈ Finset.univ\nj : n\nx✝ : j ∈ Finset.univ\n⊢ ‖∑ j_1 : m, A i j_1 * B j_1 j‖₊ ≤ (∑ j : m, ‖A i j‖₊ ^ 2) ^ (1 / 2) * (∑ x : m, ‖B x j‖₊ ^ 2) ^ (1 / 2)\n[PROOFSTEP]\nhave :=\n  @nnnorm_inner_le_nnnorm α _ _ _ _ ((PiLp.equiv 2 fun _ => α).symm fun j => star (A i j))\n    ((PiLp.equiv 2 fun _ => α).symm fun k => B k j)\n[GOAL]\nR : Type u_1\nl : Type u_2\nm : Type u_3\nn : Type u_4\nα : Type u_5\nβ : Type u_6\ninst✝³ : Fintype l\ninst✝² : Fintype m\ninst✝¹ : Fintype n\ninst✝ : IsROrC α\nA : Matrix l m α\nB : Matrix m n α\ni : l\nx✝¹ : i ∈ Finset.univ\nj : n\nx✝ : j ∈ Finset.univ\nthis :\n  ‖inner (↑(PiLp.equiv 2 fun x => α).symm fun j => star (A i j)) (↑(PiLp.equiv 2 fun x => α).symm fun k => B k j)‖₊ ≤\n    ‖↑(PiLp.equiv 2 fun x => α).symm fun j => star (A i j)‖₊ * ‖↑(PiLp.equiv 2 fun x => α).symm fun k => B k j‖₊\n⊢ ‖∑ j_1 : m, A i j_1 * B j_1 j‖₊ ≤ (∑ j : m, ‖A i j‖₊ ^ 2) ^ (1 / 2) * (∑ x : m, ‖B x j‖₊ ^ 2) ^ (1 / 2)\n[PROOFSTEP]\nsimpa only [PiLp.equiv_symm_apply, PiLp.inner_apply, IsROrC.inner_apply, starRingEnd_apply, Pi.nnnorm_def,\n  PiLp.nnnorm_eq_of_L2, star_star, nnnorm_star, NNReal.sqrt_eq_rpow, NNReal.rpow_two] using this\n", "meta": {"mathlib_filename": "Mathlib.Analysis.Matrix", "llama_tokens": 16718, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7956581000631542, "lm_q2_score": 0.6825737279551493, "lm_q1q2_score": 0.5430953155378183}}
{"text": "[GOAL]\nα : Type u_1\nS : Set (Set α)\ncond : FiniteInter S\nF : Finset (Set α)\n⊢ ↑F ⊆ S → ⋂₀ ↑F ∈ S\n[PROOFSTEP]\nclassical\nrefine' Finset.induction_on F (fun _ => _) _\n· simp [cond.univ_mem]\n· intro a s _ h1 h2\n  suffices a ∩ ⋂₀ ↑s ∈ S by simpa\n  exact cond.inter_mem (h2 (Finset.mem_insert_self a s)) (h1 fun x hx => h2 <| Finset.mem_insert_of_mem hx)\n[GOAL]\nα : Type u_1\nS : Set (Set α)\ncond : FiniteInter S\nF : Finset (Set α)\n⊢ ↑F ⊆ S → ⋂₀ ↑F ∈ S\n[PROOFSTEP]\nrefine' Finset.induction_on F (fun _ => _) _\n[GOAL]\ncase refine'_1\nα : Type u_1\nS : Set (Set α)\ncond : FiniteInter S\nF : Finset (Set α)\nx✝ : ↑∅ ⊆ S\n⊢ ⋂₀ ↑∅ ∈ S\n[PROOFSTEP]\nsimp [cond.univ_mem]\n[GOAL]\ncase refine'_2\nα : Type u_1\nS : Set (Set α)\ncond : FiniteInter S\nF : Finset (Set α)\n⊢ ∀ ⦃a : Set α⦄ {s : Finset (Set α)}, ¬a ∈ s → (↑s ⊆ S → ⋂₀ ↑s ∈ S) → ↑(insert a s) ⊆ S → ⋂₀ ↑(insert a s) ∈ S\n[PROOFSTEP]\nintro a s _ h1 h2\n[GOAL]\ncase refine'_2\nα : Type u_1\nS : Set (Set α)\ncond : FiniteInter S\nF : Finset (Set α)\na : Set α\ns : Finset (Set α)\na✝ : ¬a ∈ s\nh1 : ↑s ⊆ S → ⋂₀ ↑s ∈ S\nh2 : ↑(insert a s) ⊆ S\n⊢ ⋂₀ ↑(insert a s) ∈ S\n[PROOFSTEP]\nsuffices a ∩ ⋂₀ ↑s ∈ S by simpa\n[GOAL]\nα : Type u_1\nS : Set (Set α)\ncond : FiniteInter S\nF : Finset (Set α)\na : Set α\ns : Finset (Set α)\na✝ : ¬a ∈ s\nh1 : ↑s ⊆ S → ⋂₀ ↑s ∈ S\nh2 : ↑(insert a s) ⊆ S\nthis : a ∩ ⋂₀ ↑s ∈ S\n⊢ ⋂₀ ↑(insert a s) ∈ S\n[PROOFSTEP]\nsimpa\n[GOAL]\ncase refine'_2\nα : Type u_1\nS : Set (Set α)\ncond : FiniteInter S\nF : Finset (Set α)\na : Set α\ns : Finset (Set α)\na✝ : ¬a ∈ s\nh1 : ↑s ⊆ S → ⋂₀ ↑s ∈ S\nh2 : ↑(insert a s) ⊆ S\n⊢ a ∩ ⋂₀ ↑s ∈ S\n[PROOFSTEP]\nexact cond.inter_mem (h2 (Finset.mem_insert_self a s)) (h1 fun x hx => h2 <| Finset.mem_insert_of_mem hx)\n[GOAL]\nα : Type u_1\nS : Set (Set α)\nA : Set α\ncond : FiniteInter S\nP : Set α\nH : P ∈ finiteInterClosure (insert A S)\n⊢ P ∈ S ∨ ∃ Q, Q ∈ S ∧ P = A ∩ Q\n[PROOFSTEP]\ninduction' H with S h T1 T2 _ _ h1 h2\n[GOAL]\ncase basic\nα : Type u_1\nS✝ : Set (Set α)\nA : Set α\ncond : FiniteInter S✝\nP S : Set α\nh : S ∈ insert A S✝\n⊢ S ∈ S✝ ∨ ∃ Q, Q ∈ S✝ ∧ S = A ∩ Q\n[PROOFSTEP]\ncases h\n[GOAL]\ncase basic.inl\nα : Type u_1\nS✝ : Set (Set α)\nA : Set α\ncond : FiniteInter S✝\nP S : Set α\nh✝ : S = A\n⊢ S ∈ S✝ ∨ ∃ Q, Q ∈ S✝ ∧ S = A ∩ Q\n[PROOFSTEP]\nexact Or.inr ⟨Set.univ, cond.univ_mem, by simpa⟩\n[GOAL]\nα : Type u_1\nS✝ : Set (Set α)\nA : Set α\ncond : FiniteInter S✝\nP S : Set α\nh✝ : S = A\n⊢ S = A ∩ Set.univ\n[PROOFSTEP]\nsimpa\n[GOAL]\ncase basic.inr\nα : Type u_1\nS✝ : Set (Set α)\nA : Set α\ncond : FiniteInter S✝\nP S : Set α\nh✝ : S ∈ S✝\n⊢ S ∈ S✝ ∨ ∃ Q, Q ∈ S✝ ∧ S = A ∩ Q\n[PROOFSTEP]\nexact Or.inl (by assumption)\n[GOAL]\nα : Type u_1\nS✝ : Set (Set α)\nA : Set α\ncond : FiniteInter S✝\nP S : Set α\nh✝ : S ∈ S✝\n⊢ S ∈ S✝\n[PROOFSTEP]\nassumption\n[GOAL]\ncase univ\nα : Type u_1\nS : Set (Set α)\nA : Set α\ncond : FiniteInter S\nP : Set α\n⊢ Set.univ ∈ S ∨ ∃ Q, Q ∈ S ∧ Set.univ = A ∩ Q\n[PROOFSTEP]\nexact Or.inl cond.univ_mem\n[GOAL]\ncase inter\nα : Type u_1\nS : Set (Set α)\nA : Set α\ncond : FiniteInter S\nP T1 T2 : Set α\na✝¹ : finiteInterClosure (insert A S) T1\na✝ : finiteInterClosure (insert A S) T2\nh1 : T1 ∈ S ∨ ∃ Q, Q ∈ S ∧ T1 = A ∩ Q\nh2 : T2 ∈ S ∨ ∃ Q, Q ∈ S ∧ T2 = A ∩ Q\n⊢ T1 ∩ T2 ∈ S ∨ ∃ Q, Q ∈ S ∧ T1 ∩ T2 = A ∩ Q\n[PROOFSTEP]\nrcases h1 with (h | ⟨Q, hQ, rfl⟩)\n[GOAL]\ncase inter.inl\nα : Type u_1\nS : Set (Set α)\nA : Set α\ncond : FiniteInter S\nP T1 T2 : Set α\na✝¹ : finiteInterClosure (insert A S) T1\na✝ : finiteInterClosure (insert A S) T2\nh2 : T2 ∈ S ∨ ∃ Q, Q ∈ S ∧ T2 = A ∩ Q\nh : T1 ∈ S\n⊢ T1 ∩ T2 ∈ S ∨ ∃ Q, Q ∈ S ∧ T1 ∩ T2 = A ∩ Q\n[PROOFSTEP]\nrcases h2 with (i | ⟨R, hR, rfl⟩)\n[GOAL]\ncase inter.inr.intro.intro\nα : Type u_1\nS : Set (Set α)\nA : Set α\ncond : FiniteInter S\nP T2 : Set α\na✝¹ : finiteInterClosure (insert A S) T2\nh2 : T2 ∈ S ∨ ∃ Q, Q ∈ S ∧ T2 = A ∩ Q\nQ : Set α\nhQ : Q ∈ S\na✝ : finiteInterClosure (insert A S) (A ∩ Q)\n⊢ A ∩ Q ∩ T2 ∈ S ∨ ∃ Q_1, Q_1 ∈ S ∧ A ∩ Q ∩ T2 = A ∩ Q_1\n[PROOFSTEP]\nrcases h2 with (i | ⟨R, hR, rfl⟩)\n[GOAL]\ncase inter.inl.inl\nα : Type u_1\nS : Set (Set α)\nA : Set α\ncond : FiniteInter S\nP T1 T2 : Set α\na✝¹ : finiteInterClosure (insert A S) T1\na✝ : finiteInterClosure (insert A S) T2\nh : T1 ∈ S\ni : T2 ∈ S\n⊢ T1 ∩ T2 ∈ S ∨ ∃ Q, Q ∈ S ∧ T1 ∩ T2 = A ∩ Q\n[PROOFSTEP]\nexact Or.inl (cond.inter_mem h i)\n[GOAL]\ncase inter.inl.inr.intro.intro\nα : Type u_1\nS : Set (Set α)\nA : Set α\ncond : FiniteInter S\nP T1 : Set α\na✝¹ : finiteInterClosure (insert A S) T1\nh : T1 ∈ S\nR : Set α\nhR : R ∈ S\na✝ : finiteInterClosure (insert A S) (A ∩ R)\n⊢ T1 ∩ (A ∩ R) ∈ S ∨ ∃ Q, Q ∈ S ∧ T1 ∩ (A ∩ R) = A ∩ Q\n[PROOFSTEP]\nexact Or.inr ⟨T1 ∩ R, cond.inter_mem h hR, by simp only [← Set.inter_assoc, Set.inter_comm _ A]⟩\n[GOAL]\nα : Type u_1\nS : Set (Set α)\nA : Set α\ncond : FiniteInter S\nP T1 : Set α\na✝¹ : finiteInterClosure (insert A S) T1\nh : T1 ∈ S\nR : Set α\nhR : R ∈ S\na✝ : finiteInterClosure (insert A S) (A ∩ R)\n⊢ T1 ∩ (A ∩ R) = A ∩ (T1 ∩ R)\n[PROOFSTEP]\nsimp only [← Set.inter_assoc, Set.inter_comm _ A]\n[GOAL]\ncase inter.inr.intro.intro.inl\nα : Type u_1\nS : Set (Set α)\nA : Set α\ncond : FiniteInter S\nP T2 : Set α\na✝¹ : finiteInterClosure (insert A S) T2\nQ : Set α\nhQ : Q ∈ S\na✝ : finiteInterClosure (insert A S) (A ∩ Q)\ni : T2 ∈ S\n⊢ A ∩ Q ∩ T2 ∈ S ∨ ∃ Q_1, Q_1 ∈ S ∧ A ∩ Q ∩ T2 = A ∩ Q_1\n[PROOFSTEP]\nexact Or.inr ⟨Q ∩ T2, cond.inter_mem hQ i, by simp only [Set.inter_assoc]⟩\n[GOAL]\nα : Type u_1\nS : Set (Set α)\nA : Set α\ncond : FiniteInter S\nP T2 : Set α\na✝¹ : finiteInterClosure (insert A S) T2\nQ : Set α\nhQ : Q ∈ S\na✝ : finiteInterClosure (insert A S) (A ∩ Q)\ni : T2 ∈ S\n⊢ A ∩ Q ∩ T2 = A ∩ (Q ∩ T2)\n[PROOFSTEP]\nsimp only [Set.inter_assoc]\n[GOAL]\ncase inter.inr.intro.intro.inr.intro.intro\nα : Type u_1\nS : Set (Set α)\nA : Set α\ncond : FiniteInter S\nP Q : Set α\nhQ : Q ∈ S\na✝¹ : finiteInterClosure (insert A S) (A ∩ Q)\nR : Set α\nhR : R ∈ S\na✝ : finiteInterClosure (insert A S) (A ∩ R)\n⊢ A ∩ Q ∩ (A ∩ R) ∈ S ∨ ∃ Q_1, Q_1 ∈ S ∧ A ∩ Q ∩ (A ∩ R) = A ∩ Q_1\n[PROOFSTEP]\nexact\n  Or.inr\n    ⟨Q ∩ R, cond.inter_mem hQ hR, by\n      ext x\n      constructor <;> simp (config := { contextual := true })⟩\n[GOAL]\nα : Type u_1\nS : Set (Set α)\nA : Set α\ncond : FiniteInter S\nP Q : Set α\nhQ : Q ∈ S\na✝¹ : finiteInterClosure (insert A S) (A ∩ Q)\nR : Set α\nhR : R ∈ S\na✝ : finiteInterClosure (insert A S) (A ∩ R)\n⊢ A ∩ Q ∩ (A ∩ R) = A ∩ (Q ∩ R)\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nα : Type u_1\nS : Set (Set α)\nA : Set α\ncond : FiniteInter S\nP Q : Set α\nhQ : Q ∈ S\na✝¹ : finiteInterClosure (insert A S) (A ∩ Q)\nR : Set α\nhR : R ∈ S\na✝ : finiteInterClosure (insert A S) (A ∩ R)\nx : α\n⊢ x ∈ A ∩ Q ∩ (A ∩ R) ↔ x ∈ A ∩ (Q ∩ R)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nα : Type u_1\nS : Set (Set α)\nA : Set α\ncond : FiniteInter S\nP Q : Set α\nhQ : Q ∈ S\na✝¹ : finiteInterClosure (insert A S) (A ∩ Q)\nR : Set α\nhR : R ∈ S\na✝ : finiteInterClosure (insert A S) (A ∩ R)\nx : α\n⊢ x ∈ A ∩ Q ∩ (A ∩ R) → x ∈ A ∩ (Q ∩ R)\n[PROOFSTEP]\nsimp (config := { contextual := true })\n[GOAL]\ncase h.mpr\nα : Type u_1\nS : Set (Set α)\nA : Set α\ncond : FiniteInter S\nP Q : Set α\nhQ : Q ∈ S\na✝¹ : finiteInterClosure (insert A S) (A ∩ Q)\nR : Set α\nhR : R ∈ S\na✝ : finiteInterClosure (insert A S) (A ∩ R)\nx : α\n⊢ x ∈ A ∩ (Q ∩ R) → x ∈ A ∩ Q ∩ (A ∩ R)\n[PROOFSTEP]\nsimp (config := { contextual := true })\n", "meta": {"mathlib_filename": "Mathlib.Data.Set.Constructions", "llama_tokens": 3892, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7956580903722561, "lm_q2_score": 0.6825737279551493, "lm_q1q2_score": 0.5430953089230659}}
{"text": "[GOAL]\nG : Type u_1\ninst✝ : CommGroup G\nn : ℤ\ns : Set G\nhs : (fun x => x ^ n) ⁻¹' s = s\ng : G\nj : ℕ\nhg : g ^ n ^ j = 1\n⊢ g • s = s\n[PROOFSTEP]\nsuffices ∀ {g' : G} (_ : g' ^ n ^ j = 1), g' • s ⊆ s\n  by\n  refine' le_antisymm (this hg) _\n  conv_lhs => rw [← smul_inv_smul g s]\n  replace hg : g⁻¹ ^ n ^ j = 1\n  · rw [inv_zpow, hg, inv_one]\n  simpa only [le_eq_subset, set_smul_subset_set_smul_iff] using this hg\n[GOAL]\nG : Type u_1\ninst✝ : CommGroup G\nn : ℤ\ns : Set G\nhs : (fun x => x ^ n) ⁻¹' s = s\ng : G\nj : ℕ\nhg : g ^ n ^ j = 1\nthis : ∀ {g' : G}, g' ^ n ^ j = 1 → g' • s ⊆ s\n⊢ g • s = s\n[PROOFSTEP]\nrefine' le_antisymm (this hg) _\n[GOAL]\nG : Type u_1\ninst✝ : CommGroup G\nn : ℤ\ns : Set G\nhs : (fun x => x ^ n) ⁻¹' s = s\ng : G\nj : ℕ\nhg : g ^ n ^ j = 1\nthis : ∀ {g' : G}, g' ^ n ^ j = 1 → g' • s ⊆ s\n⊢ s ≤ g • s\n[PROOFSTEP]\nconv_lhs => rw [← smul_inv_smul g s]\n[GOAL]\nG : Type u_1\ninst✝ : CommGroup G\nn : ℤ\ns : Set G\nhs : (fun x => x ^ n) ⁻¹' s = s\ng : G\nj : ℕ\nhg : g ^ n ^ j = 1\nthis : ∀ {g' : G}, g' ^ n ^ j = 1 → g' • s ⊆ s\n| s\n[PROOFSTEP]\nrw [← smul_inv_smul g s]\n[GOAL]\nG : Type u_1\ninst✝ : CommGroup G\nn : ℤ\ns : Set G\nhs : (fun x => x ^ n) ⁻¹' s = s\ng : G\nj : ℕ\nhg : g ^ n ^ j = 1\nthis : ∀ {g' : G}, g' ^ n ^ j = 1 → g' • s ⊆ s\n| s\n[PROOFSTEP]\nrw [← smul_inv_smul g s]\n[GOAL]\nG : Type u_1\ninst✝ : CommGroup G\nn : ℤ\ns : Set G\nhs : (fun x => x ^ n) ⁻¹' s = s\ng : G\nj : ℕ\nhg : g ^ n ^ j = 1\nthis : ∀ {g' : G}, g' ^ n ^ j = 1 → g' • s ⊆ s\n| s\n[PROOFSTEP]\nrw [← smul_inv_smul g s]\n[GOAL]\nG : Type u_1\ninst✝ : CommGroup G\nn : ℤ\ns : Set G\nhs : (fun x => x ^ n) ⁻¹' s = s\ng : G\nj : ℕ\nhg : g ^ n ^ j = 1\nthis : ∀ {g' : G}, g' ^ n ^ j = 1 → g' • s ⊆ s\n⊢ g • g⁻¹ • s ≤ g • s\n[PROOFSTEP]\nreplace hg : g⁻¹ ^ n ^ j = 1\n[GOAL]\ncase hg\nG : Type u_1\ninst✝ : CommGroup G\nn : ℤ\ns : Set G\nhs : (fun x => x ^ n) ⁻¹' s = s\ng : G\nj : ℕ\nhg : g ^ n ^ j = 1\nthis : ∀ {g' : G}, g' ^ n ^ j = 1 → g' • s ⊆ s\n⊢ g⁻¹ ^ n ^ j = 1\n[PROOFSTEP]\nrw [inv_zpow, hg, inv_one]\n[GOAL]\nG : Type u_1\ninst✝ : CommGroup G\nn : ℤ\ns : Set G\nhs : (fun x => x ^ n) ⁻¹' s = s\ng : G\nj : ℕ\nthis : ∀ {g' : G}, g' ^ n ^ j = 1 → g' • s ⊆ s\nhg : g⁻¹ ^ n ^ j = 1\n⊢ g • g⁻¹ • s ≤ g • s\n[PROOFSTEP]\nsimpa only [le_eq_subset, set_smul_subset_set_smul_iff] using this hg\n[GOAL]\nG : Type u_1\ninst✝ : CommGroup G\nn : ℤ\ns : Set G\nhs : (fun x => x ^ n) ⁻¹' s = s\ng : G\nj : ℕ\nhg : g ^ n ^ j = 1\n⊢ ∀ {g' : G}, g' ^ n ^ j = 1 → g' • s ⊆ s\n[PROOFSTEP]\nrw [(IsFixedPt.preimage_iterate hs j : (zpowGroupHom n)^[j] ⁻¹' s = s).symm]\n[GOAL]\nG : Type u_1\ninst✝ : CommGroup G\nn : ℤ\ns : Set G\nhs : (fun x => x ^ n) ⁻¹' s = s\ng : G\nj : ℕ\nhg : g ^ n ^ j = 1\n⊢ ∀ {g' : G}, g' ^ n ^ j = 1 → g' • (fun x => x ^ n)^[j] ⁻¹' s ⊆ (fun x => x ^ n)^[j] ⁻¹' s\n[PROOFSTEP]\nrintro g' hg' - ⟨y, hy, rfl⟩\n[GOAL]\ncase intro.intro\nG : Type u_1\ninst✝ : CommGroup G\nn : ℤ\ns : Set G\nhs : (fun x => x ^ n) ⁻¹' s = s\ng : G\nj : ℕ\nhg : g ^ n ^ j = 1\ng' : G\nhg' : g' ^ n ^ j = 1\ny : G\nhy : y ∈ (fun x => x ^ n)^[j] ⁻¹' s\n⊢ (fun x => g' • x) y ∈ (fun x => x ^ n)^[j] ⁻¹' s\n[PROOFSTEP]\nchange (zpowGroupHom n)^[j] (g' * y) ∈ s\n[GOAL]\ncase intro.intro\nG : Type u_1\ninst✝ : CommGroup G\nn : ℤ\ns : Set G\nhs : (fun x => x ^ n) ⁻¹' s = s\ng : G\nj : ℕ\nhg : g ^ n ^ j = 1\ng' : G\nhg' : g' ^ n ^ j = 1\ny : G\nhy : y ∈ (fun x => x ^ n)^[j] ⁻¹' s\n⊢ (↑(zpowGroupHom n))^[j] (g' * y) ∈ s\n[PROOFSTEP]\nreplace hg' : (zpowGroupHom n)^[j] g' = 1\n[GOAL]\ncase hg'\nG : Type u_1\ninst✝ : CommGroup G\nn : ℤ\ns : Set G\nhs : (fun x => x ^ n) ⁻¹' s = s\ng : G\nj : ℕ\nhg : g ^ n ^ j = 1\ng' : G\nhg' : g' ^ n ^ j = 1\ny : G\nhy : y ∈ (fun x => x ^ n)^[j] ⁻¹' s\n⊢ (↑(zpowGroupHom n))^[j] g' = 1\n[PROOFSTEP]\nsimpa [zpowGroupHom]\n[GOAL]\ncase intro.intro\nG : Type u_1\ninst✝ : CommGroup G\nn : ℤ\ns : Set G\nhs : (fun x => x ^ n) ⁻¹' s = s\ng : G\nj : ℕ\nhg : g ^ n ^ j = 1\ng' y : G\nhy : y ∈ (fun x => x ^ n)^[j] ⁻¹' s\nhg' : (↑(zpowGroupHom n))^[j] g' = 1\n⊢ (↑(zpowGroupHom n))^[j] (g' * y) ∈ s\n[PROOFSTEP]\nrwa [iterate_map_mul, hg', one_mul]\n", "meta": {"mathlib_filename": "Mathlib.Data.Set.Pointwise.Iterate", "llama_tokens": 2242, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7690802370707281, "lm_q2_score": 0.7057850340255387, "lm_q1q2_score": 0.5428053212893332}}
{"text": "[GOAL]\nb : ℕ\nh : 2 ≤ b\nn : ℕ\n⊢ (invImage (fun a => sizeOf a) instWellFoundedRelation).1 ((n + 1) / b) (succ n)\n[PROOFSTEP]\nexact Nat.div_lt_self (Nat.succ_pos _) h\n[GOAL]\nn b : ℕ\nh : 2 ≤ b\n⊢ digitsAux b h 0 = []\n[PROOFSTEP]\nrw [digitsAux]\n[GOAL]\nn✝ b : ℕ\nh : 2 ≤ b\nn : ℕ\nw : 0 < n\n⊢ digitsAux b h n = n % b :: digitsAux b h (n / b)\n[PROOFSTEP]\ncases n\n[GOAL]\ncase zero\nn b : ℕ\nh : 2 ≤ b\nw : 0 < zero\n⊢ digitsAux b h zero = zero % b :: digitsAux b h (zero / b)\n[PROOFSTEP]\ncases w\n[GOAL]\ncase succ\nn b : ℕ\nh : 2 ≤ b\nn✝ : ℕ\nw : 0 < succ n✝\n⊢ digitsAux b h (succ n✝) = succ n✝ % b :: digitsAux b h (succ n✝ / b)\n[PROOFSTEP]\nrw [digitsAux]\n[GOAL]\nn b : ℕ\n⊢ 2 ≤ b + 2\n[PROOFSTEP]\nnorm_num\n[GOAL]\nn b : ℕ\n⊢ digits b 0 = []\n[PROOFSTEP]\nrcases b with (_ | ⟨_ | ⟨_⟩⟩)\n[GOAL]\ncase zero\nn : ℕ\n⊢ digits zero 0 = []\n[PROOFSTEP]\nsimp [digits, digitsAux0, digitsAux1]\n[GOAL]\ncase succ.zero\nn : ℕ\n⊢ digits (succ zero) 0 = []\n[PROOFSTEP]\nsimp [digits, digitsAux0, digitsAux1]\n[GOAL]\ncase succ.succ\nn n✝ : ℕ\n⊢ digits (succ (succ n✝)) 0 = []\n[PROOFSTEP]\nsimp [digits, digitsAux0, digitsAux1]\n[GOAL]\nn✝ b n : ℕ\n⊢ digits (b + 2) (n + 1) = (n + 1) % (b + 2) :: digits (b + 2) ((n + 1) / (b + 2))\n[PROOFSTEP]\nsimp [digits, digitsAux_def]\n[GOAL]\nn n✝ : ℕ\nh : 1 < 0\n⊢ ¬1 < 0\n[PROOFSTEP]\ndecide\n[GOAL]\nn n✝ : ℕ\nh : 1 < 1\n⊢ ¬1 < 1\n[PROOFSTEP]\ndecide\n[GOAL]\nn n✝ b : ℕ\nx✝ : 1 < b + 2\n⊢ 2 ≤ Nat.add b 0 + 2\n[PROOFSTEP]\nsimp\n[GOAL]\nn b x : ℕ\nhx : x ≠ 0\nhxb : x < b\n⊢ digits b x = [x]\n[PROOFSTEP]\nrcases exists_eq_succ_of_ne_zero hx with ⟨x, rfl⟩\n[GOAL]\ncase intro\nn b x : ℕ\nhx : succ x ≠ 0\nhxb : succ x < b\n⊢ digits b (succ x) = [succ x]\n[PROOFSTEP]\nrcases exists_eq_add_of_le' ((Nat.le_add_left 1 x).trans_lt hxb) with ⟨b, rfl⟩\n[GOAL]\ncase intro.intro\nn x : ℕ\nhx : succ x ≠ 0\nb : ℕ\nhxb : succ x < b + succ 1\n⊢ digits (b + succ 1) (succ x) = [succ x]\n[PROOFSTEP]\nrw [digits_add_two_add_one, div_eq_of_lt hxb, digits_zero, mod_eq_of_lt hxb]\n[GOAL]\nn b : ℕ\nh : 1 < b\nx y : ℕ\nhxb : x < b\nhxy : x ≠ 0 ∨ y ≠ 0\n⊢ digits b (x + b * y) = x :: digits b y\n[PROOFSTEP]\nrcases exists_eq_add_of_le' h with ⟨b, rfl : _ = _ + 2⟩\n[GOAL]\ncase intro\nn x y : ℕ\nhxy : x ≠ 0 ∨ y ≠ 0\nb : ℕ\nh : 1 < b + 2\nhxb : x < b + 2\n⊢ digits (b + 2) (x + (b + 2) * y) = x :: digits (b + 2) y\n[PROOFSTEP]\ncases y\n[GOAL]\ncase intro.zero\nn x b : ℕ\nh : 1 < b + 2\nhxb : x < b + 2\nhxy : x ≠ 0 ∨ zero ≠ 0\n⊢ digits (b + 2) (x + (b + 2) * zero) = x :: digits (b + 2) zero\n[PROOFSTEP]\nsimp [hxb, hxy.resolve_right (absurd rfl)]\n[GOAL]\ncase intro.succ\nn x b : ℕ\nh : 1 < b + 2\nhxb : x < b + 2\nn✝ : ℕ\nhxy : x ≠ 0 ∨ succ n✝ ≠ 0\n⊢ digits (b + 2) (x + (b + 2) * succ n✝) = x :: digits (b + 2) (succ n✝)\n[PROOFSTEP]\ndsimp [digits]\n[GOAL]\ncase intro.succ\nn x b : ℕ\nh : 1 < b + 2\nhxb : x < b + 2\nn✝ : ℕ\nhxy : x ≠ 0 ∨ succ n✝ ≠ 0\n⊢ digitsAux (b + 2) (_ : 2 ≤ b + 2) (x + (b + 2) * succ n✝) = x :: digitsAux (b + 2) (_ : 2 ≤ b + 2) (succ n✝)\n[PROOFSTEP]\nrw [digitsAux_def]\n[GOAL]\ncase intro.succ\nn x b : ℕ\nh : 1 < b + 2\nhxb : x < b + 2\nn✝ : ℕ\nhxy : x ≠ 0 ∨ succ n✝ ≠ 0\n⊢ (x + (b + 2) * succ n✝) % (b + 2) :: digitsAux (b + 2) (_ : 2 ≤ b + 2) ((x + (b + 2) * succ n✝) / (b + 2)) =\n    x :: digitsAux (b + 2) (_ : 2 ≤ b + 2) (succ n✝)\n[PROOFSTEP]\ncongr\n[GOAL]\ncase intro.succ.e_head\nn x b : ℕ\nh : 1 < b + 2\nhxb : x < b + 2\nn✝ : ℕ\nhxy : x ≠ 0 ∨ succ n✝ ≠ 0\n⊢ (x + (b + 2) * succ n✝) % (b + 2) = x\n[PROOFSTEP]\nsimp [Nat.add_mod, mod_eq_of_lt hxb]\n[GOAL]\ncase intro.succ.e_tail.e_a\nn x b : ℕ\nh : 1 < b + 2\nhxb : x < b + 2\nn✝ : ℕ\nhxy : x ≠ 0 ∨ succ n✝ ≠ 0\n⊢ (x + (b + 2) * succ n✝) / (b + 2) = succ n✝\n[PROOFSTEP]\nsimp [add_mul_div_left, div_eq_of_lt hxb]\n[GOAL]\ncase intro.succ.w\nn x b : ℕ\nh : 1 < b + 2\nhxb : x < b + 2\nn✝ : ℕ\nhxy : x ≠ 0 ∨ succ n✝ ≠ 0\n⊢ 0 < x + (b + 2) * succ n✝\n[PROOFSTEP]\napply Nat.succ_pos\n[GOAL]\nn : ℕ\nα : Type u_1\ninst✝ : Semiring α\nb : α\nL : List ℕ\n⊢ ofDigits b L = List.foldr (fun x y => ↑x + b * y) 0 L\n[PROOFSTEP]\ninduction' L with d L ih\n[GOAL]\ncase nil\nn : ℕ\nα : Type u_1\ninst✝ : Semiring α\nb : α\n⊢ ofDigits b [] = List.foldr (fun x y => ↑x + b * y) 0 []\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\nn : ℕ\nα : Type u_1\ninst✝ : Semiring α\nb : α\nd : ℕ\nL : List ℕ\nih : ofDigits b L = List.foldr (fun x y => ↑x + b * y) 0 L\n⊢ ofDigits b (d :: L) = List.foldr (fun x y => ↑x + b * y) 0 (d :: L)\n[PROOFSTEP]\ndsimp [ofDigits]\n[GOAL]\ncase cons\nn : ℕ\nα : Type u_1\ninst✝ : Semiring α\nb : α\nd : ℕ\nL : List ℕ\nih : ofDigits b L = List.foldr (fun x y => ↑x + b * y) 0 L\n⊢ ↑d + b * ofDigits b L = ↑d + b * List.foldr (fun x y => ↑x + b * y) 0 L\n[PROOFSTEP]\nrw [ih]\n[GOAL]\nn b : ℕ\nl : List ℕ\n⊢ List.sum (List.zipWith ((fun i a => a * b ^ i) ∘ succ) (List.range (List.length l)) l) =\n    b * List.sum (List.zipWith (fun i a => a * b ^ i) (List.range (List.length l)) l)\n[PROOFSTEP]\nsuffices\n  (List.range l.length).zipWith ((fun i a : ℕ => a * b ^ i) ∘ succ) l =\n    (List.range l.length).zipWith (fun i a => b * (a * b ^ i)) l\n  by simp [this]\n[GOAL]\nn b : ℕ\nl : List ℕ\nthis :\n  List.zipWith ((fun i a => a * b ^ i) ∘ succ) (List.range (List.length l)) l =\n    List.zipWith (fun i a => b * (a * b ^ i)) (List.range (List.length l)) l\n⊢ List.sum (List.zipWith ((fun i a => a * b ^ i) ∘ succ) (List.range (List.length l)) l) =\n    b * List.sum (List.zipWith (fun i a => a * b ^ i) (List.range (List.length l)) l)\n[PROOFSTEP]\nsimp [this]\n[GOAL]\nn b : ℕ\nl : List ℕ\n⊢ List.zipWith ((fun i a => a * b ^ i) ∘ succ) (List.range (List.length l)) l =\n    List.zipWith (fun i a => b * (a * b ^ i)) (List.range (List.length l)) l\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_f\nn b : ℕ\nl : List ℕ\n⊢ (fun i a => a * b ^ i) ∘ succ = fun i a => b * (a * b ^ i)\n[PROOFSTEP]\next\n[GOAL]\ncase e_f.h.h\nn b : ℕ\nl : List ℕ\nx✝¹ x✝ : ℕ\n⊢ ((fun i a => a * b ^ i) ∘ succ) x✝¹ x✝ = b * (x✝ * b ^ x✝¹)\n[PROOFSTEP]\nsimp [pow_succ]\n[GOAL]\ncase e_f.h.h\nn b : ℕ\nl : List ℕ\nx✝¹ x✝ : ℕ\n⊢ x✝ * (b ^ x✝¹ * b) = b * (x✝ * b ^ x✝¹)\n[PROOFSTEP]\nring\n[GOAL]\nn b : ℕ\nL : List ℕ\n⊢ ofDigits b L = List.sum (List.mapIdx (fun i a => a * b ^ i) L)\n[PROOFSTEP]\nrw [List.mapIdx_eq_enum_map, List.enum_eq_zip_range, List.map_uncurry_zip_eq_zipWith, ofDigits_eq_foldr]\n[GOAL]\nn b : ℕ\nL : List ℕ\n⊢ List.foldr (fun x y => ↑x + b * y) 0 L = List.sum (List.zipWith (fun i a => a * b ^ i) (List.range (List.length L)) L)\n[PROOFSTEP]\ninduction' L with hd tl hl\n[GOAL]\ncase nil\nn b : ℕ\n⊢ List.foldr (fun x y => ↑x + b * y) 0 [] =\n    List.sum (List.zipWith (fun i a => a * b ^ i) (List.range (List.length [])) [])\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\nn b hd : ℕ\ntl : List ℕ\nhl :\n  List.foldr (fun x y => ↑x + b * y) 0 tl =\n    List.sum (List.zipWith (fun i a => a * b ^ i) (List.range (List.length tl)) tl)\n⊢ List.foldr (fun x y => ↑x + b * y) 0 (hd :: tl) =\n    List.sum (List.zipWith (fun i a => a * b ^ i) (List.range (List.length (hd :: tl))) (hd :: tl))\n[PROOFSTEP]\nsimpa [List.range_succ_eq_map, List.zipWith_map_left, ofDigits_eq_sum_map_with_index_aux] using Or.inl hl\n[GOAL]\nn✝ b n : ℕ\n⊢ ofDigits b [n] = n\n[PROOFSTEP]\nsimp [ofDigits]\n[GOAL]\nn : ℕ\nα : Type u_1\ninst✝ : Semiring α\nh : ℕ\nL : List ℕ\n⊢ ofDigits 1 (h :: L) = ↑h + ofDigits 1 L\n[PROOFSTEP]\nsimp [ofDigits]\n[GOAL]\nn b : ℕ\nl1 l2 : List ℕ\n⊢ ofDigits b (l1 ++ l2) = ofDigits b l1 + b ^ List.length l1 * ofDigits b l2\n[PROOFSTEP]\ninduction' l1 with hd tl IH\n[GOAL]\ncase nil\nn b : ℕ\nl2 : List ℕ\n⊢ ofDigits b ([] ++ l2) = ofDigits b [] + b ^ List.length [] * ofDigits b l2\n[PROOFSTEP]\nsimp [ofDigits]\n[GOAL]\ncase cons\nn b : ℕ\nl2 : List ℕ\nhd : ℕ\ntl : List ℕ\nIH : ofDigits b (tl ++ l2) = ofDigits b tl + b ^ List.length tl * ofDigits b l2\n⊢ ofDigits b (hd :: tl ++ l2) = ofDigits b (hd :: tl) + b ^ List.length (hd :: tl) * ofDigits b l2\n[PROOFSTEP]\nrw [ofDigits, List.cons_append, ofDigits, IH, List.length_cons, pow_succ']\n[GOAL]\ncase cons\nn b : ℕ\nl2 : List ℕ\nhd : ℕ\ntl : List ℕ\nIH : ofDigits b (tl ++ l2) = ofDigits b tl + b ^ List.length tl * ofDigits b l2\n⊢ ↑hd + b * (ofDigits b tl + b ^ List.length tl * ofDigits b l2) =\n    ↑hd + b * ofDigits b tl + b * b ^ List.length tl * ofDigits b l2\n[PROOFSTEP]\nring\n[GOAL]\nn : ℕ\nα : Type u_1\ninst✝ : Semiring α\nb : ℕ\nL : List ℕ\n⊢ ↑(ofDigits b L) = ofDigits (↑b) L\n[PROOFSTEP]\ninduction' L with d L ih\n[GOAL]\ncase nil\nn : ℕ\nα : Type u_1\ninst✝ : Semiring α\nb : ℕ\n⊢ ↑(ofDigits b []) = ofDigits ↑b []\n[PROOFSTEP]\nsimp [ofDigits]\n[GOAL]\ncase cons\nn : ℕ\nα : Type u_1\ninst✝ : Semiring α\nb d : ℕ\nL : List ℕ\nih : ↑(ofDigits b L) = ofDigits (↑b) L\n⊢ ↑(ofDigits b (d :: L)) = ofDigits (↑b) (d :: L)\n[PROOFSTEP]\ndsimp [ofDigits]\n[GOAL]\ncase cons\nn : ℕ\nα : Type u_1\ninst✝ : Semiring α\nb d : ℕ\nL : List ℕ\nih : ↑(ofDigits b L) = ofDigits (↑b) L\n⊢ ↑(d + b * ofDigits b L) = ↑d + ↑b * ofDigits (↑b) L\n[PROOFSTEP]\npush_cast\n[GOAL]\ncase cons\nn : ℕ\nα : Type u_1\ninst✝ : Semiring α\nb d : ℕ\nL : List ℕ\nih : ↑(ofDigits b L) = ofDigits (↑b) L\n⊢ ↑d + ↑b * ↑(ofDigits b L) = ↑d + ↑b * ofDigits (↑b) L\n[PROOFSTEP]\nrw [ih]\n[GOAL]\nn b : ℕ\nL : List ℕ\n⊢ ↑(ofDigits b L) = ofDigits (↑b) L\n[PROOFSTEP]\ninduction' L with d L _\n[GOAL]\ncase nil\nn b : ℕ\n⊢ ↑(ofDigits b []) = ofDigits ↑b []\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\nn b d : ℕ\nL : List ℕ\ntail_ih✝ : ↑(ofDigits b L) = ofDigits (↑b) L\n⊢ ↑(ofDigits b (d :: L)) = ofDigits (↑b) (d :: L)\n[PROOFSTEP]\ndsimp [ofDigits]\n[GOAL]\ncase cons\nn b d : ℕ\nL : List ℕ\ntail_ih✝ : ↑(ofDigits b L) = ofDigits (↑b) L\n⊢ ↑(d + b * ofDigits b L) = ↑d + ↑b * ofDigits (↑b) L\n[PROOFSTEP]\npush_cast\n[GOAL]\ncase cons\nn b d : ℕ\nL : List ℕ\ntail_ih✝ : ↑(ofDigits b L) = ofDigits (↑b) L\n⊢ ↑d + ↑b * ofDigits (↑b) L = ↑d + ↑b * ofDigits (↑b) L\n[PROOFSTEP]\nsimp only\n[GOAL]\nn b : ℕ\nh : 1 < b\nL : List ℕ\nw₁ : ∀ (l : ℕ), l ∈ L → l < b\nw₂ : ∀ (h : L ≠ []), List.getLast L h ≠ 0\n⊢ digits b (ofDigits b L) = L\n[PROOFSTEP]\ninduction' L with d L ih\n[GOAL]\ncase nil\nn b : ℕ\nh : 1 < b\nL : List ℕ\nw₁✝ : ∀ (l : ℕ), l ∈ L → l < b\nw₂✝ : ∀ (h : L ≠ []), List.getLast L h ≠ 0\nw₁ : ∀ (l : ℕ), l ∈ [] → l < b\nw₂ : ∀ (h : [] ≠ []), List.getLast [] h ≠ 0\n⊢ digits b (ofDigits b []) = []\n[PROOFSTEP]\ndsimp [ofDigits]\n[GOAL]\ncase nil\nn b : ℕ\nh : 1 < b\nL : List ℕ\nw₁✝ : ∀ (l : ℕ), l ∈ L → l < b\nw₂✝ : ∀ (h : L ≠ []), List.getLast L h ≠ 0\nw₁ : ∀ (l : ℕ), l ∈ [] → l < b\nw₂ : ∀ (h : [] ≠ []), List.getLast [] h ≠ 0\n⊢ digits b 0 = []\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\nn b : ℕ\nh : 1 < b\nL✝ : List ℕ\nw₁✝ : ∀ (l : ℕ), l ∈ L✝ → l < b\nw₂✝ : ∀ (h : L✝ ≠ []), List.getLast L✝ h ≠ 0\nd : ℕ\nL : List ℕ\nih : (∀ (l : ℕ), l ∈ L → l < b) → (∀ (h : L ≠ []), List.getLast L h ≠ 0) → digits b (ofDigits b L) = L\nw₁ : ∀ (l : ℕ), l ∈ d :: L → l < b\nw₂ : ∀ (h : d :: L ≠ []), List.getLast (d :: L) h ≠ 0\n⊢ digits b (ofDigits b (d :: L)) = d :: L\n[PROOFSTEP]\ndsimp [ofDigits]\n[GOAL]\ncase cons\nn b : ℕ\nh : 1 < b\nL✝ : List ℕ\nw₁✝ : ∀ (l : ℕ), l ∈ L✝ → l < b\nw₂✝ : ∀ (h : L✝ ≠ []), List.getLast L✝ h ≠ 0\nd : ℕ\nL : List ℕ\nih : (∀ (l : ℕ), l ∈ L → l < b) → (∀ (h : L ≠ []), List.getLast L h ≠ 0) → digits b (ofDigits b L) = L\nw₁ : ∀ (l : ℕ), l ∈ d :: L → l < b\nw₂ : ∀ (h : d :: L ≠ []), List.getLast (d :: L) h ≠ 0\n⊢ digits b (d + b * ofDigits b L) = d :: L\n[PROOFSTEP]\nreplace w₂ := w₂ (by simp)\n[GOAL]\nn b : ℕ\nh : 1 < b\nL✝ : List ℕ\nw₁✝ : ∀ (l : ℕ), l ∈ L✝ → l < b\nw₂✝ : ∀ (h : L✝ ≠ []), List.getLast L✝ h ≠ 0\nd : ℕ\nL : List ℕ\nih : (∀ (l : ℕ), l ∈ L → l < b) → (∀ (h : L ≠ []), List.getLast L h ≠ 0) → digits b (ofDigits b L) = L\nw₁ : ∀ (l : ℕ), l ∈ d :: L → l < b\nw₂ : ∀ (h : d :: L ≠ []), List.getLast (d :: L) h ≠ 0\n⊢ d :: L ≠ []\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\nn b : ℕ\nh : 1 < b\nL✝ : List ℕ\nw₁✝ : ∀ (l : ℕ), l ∈ L✝ → l < b\nw₂✝ : ∀ (h : L✝ ≠ []), List.getLast L✝ h ≠ 0\nd : ℕ\nL : List ℕ\nih : (∀ (l : ℕ), l ∈ L → l < b) → (∀ (h : L ≠ []), List.getLast L h ≠ 0) → digits b (ofDigits b L) = L\nw₁ : ∀ (l : ℕ), l ∈ d :: L → l < b\nw₂ : List.getLast (d :: L) (_ : ¬d :: L = []) ≠ 0\n⊢ digits b (d + b * ofDigits b L) = d :: L\n[PROOFSTEP]\nrw [digits_add b h]\n[GOAL]\ncase cons\nn b : ℕ\nh : 1 < b\nL✝ : List ℕ\nw₁✝ : ∀ (l : ℕ), l ∈ L✝ → l < b\nw₂✝ : ∀ (h : L✝ ≠ []), List.getLast L✝ h ≠ 0\nd : ℕ\nL : List ℕ\nih : (∀ (l : ℕ), l ∈ L → l < b) → (∀ (h : L ≠ []), List.getLast L h ≠ 0) → digits b (ofDigits b L) = L\nw₁ : ∀ (l : ℕ), l ∈ d :: L → l < b\nw₂ : List.getLast (d :: L) (_ : ¬d :: L = []) ≠ 0\n⊢ d :: digits b (ofDigits b L) = d :: L\n[PROOFSTEP]\nrw [ih]\n[GOAL]\ncase cons.w₁\nn b : ℕ\nh : 1 < b\nL✝ : List ℕ\nw₁✝ : ∀ (l : ℕ), l ∈ L✝ → l < b\nw₂✝ : ∀ (h : L✝ ≠ []), List.getLast L✝ h ≠ 0\nd : ℕ\nL : List ℕ\nih : (∀ (l : ℕ), l ∈ L → l < b) → (∀ (h : L ≠ []), List.getLast L h ≠ 0) → digits b (ofDigits b L) = L\nw₁ : ∀ (l : ℕ), l ∈ d :: L → l < b\nw₂ : List.getLast (d :: L) (_ : ¬d :: L = []) ≠ 0\n⊢ ∀ (l : ℕ), l ∈ L → l < b\n[PROOFSTEP]\nintro l m\n[GOAL]\ncase cons.w₁\nn b : ℕ\nh : 1 < b\nL✝ : List ℕ\nw₁✝ : ∀ (l : ℕ), l ∈ L✝ → l < b\nw₂✝ : ∀ (h : L✝ ≠ []), List.getLast L✝ h ≠ 0\nd : ℕ\nL : List ℕ\nih : (∀ (l : ℕ), l ∈ L → l < b) → (∀ (h : L ≠ []), List.getLast L h ≠ 0) → digits b (ofDigits b L) = L\nw₁ : ∀ (l : ℕ), l ∈ d :: L → l < b\nw₂ : List.getLast (d :: L) (_ : ¬d :: L = []) ≠ 0\nl : ℕ\nm : l ∈ L\n⊢ l < b\n[PROOFSTEP]\napply w₁\n[GOAL]\ncase cons.w₁.a\nn b : ℕ\nh : 1 < b\nL✝ : List ℕ\nw₁✝ : ∀ (l : ℕ), l ∈ L✝ → l < b\nw₂✝ : ∀ (h : L✝ ≠ []), List.getLast L✝ h ≠ 0\nd : ℕ\nL : List ℕ\nih : (∀ (l : ℕ), l ∈ L → l < b) → (∀ (h : L ≠ []), List.getLast L h ≠ 0) → digits b (ofDigits b L) = L\nw₁ : ∀ (l : ℕ), l ∈ d :: L → l < b\nw₂ : List.getLast (d :: L) (_ : ¬d :: L = []) ≠ 0\nl : ℕ\nm : l ∈ L\n⊢ l ∈ d :: L\n[PROOFSTEP]\nexact List.mem_cons_of_mem _ m\n[GOAL]\ncase cons.w₂\nn b : ℕ\nh : 1 < b\nL✝ : List ℕ\nw₁✝ : ∀ (l : ℕ), l ∈ L✝ → l < b\nw₂✝ : ∀ (h : L✝ ≠ []), List.getLast L✝ h ≠ 0\nd : ℕ\nL : List ℕ\nih : (∀ (l : ℕ), l ∈ L → l < b) → (∀ (h : L ≠ []), List.getLast L h ≠ 0) → digits b (ofDigits b L) = L\nw₁ : ∀ (l : ℕ), l ∈ d :: L → l < b\nw₂ : List.getLast (d :: L) (_ : ¬d :: L = []) ≠ 0\n⊢ ∀ (h : L ≠ []), List.getLast L h ≠ 0\n[PROOFSTEP]\nintro h\n[GOAL]\ncase cons.w₂\nn b : ℕ\nh✝ : 1 < b\nL✝ : List ℕ\nw₁✝ : ∀ (l : ℕ), l ∈ L✝ → l < b\nw₂✝ : ∀ (h : L✝ ≠ []), List.getLast L✝ h ≠ 0\nd : ℕ\nL : List ℕ\nih : (∀ (l : ℕ), l ∈ L → l < b) → (∀ (h : L ≠ []), List.getLast L h ≠ 0) → digits b (ofDigits b L) = L\nw₁ : ∀ (l : ℕ), l ∈ d :: L → l < b\nw₂ : List.getLast (d :: L) (_ : ¬d :: L = []) ≠ 0\nh : L ≠ []\n⊢ List.getLast L h ≠ 0\n[PROOFSTEP]\nrw [List.getLast_cons h] at w₂ \n[GOAL]\ncase cons.w₂\nn b : ℕ\nh✝ : 1 < b\nL✝ : List ℕ\nw₁✝ : ∀ (l : ℕ), l ∈ L✝ → l < b\nw₂✝ : ∀ (h : L✝ ≠ []), List.getLast L✝ h ≠ 0\nd : ℕ\nL : List ℕ\nih : (∀ (l : ℕ), l ∈ L → l < b) → (∀ (h : L ≠ []), List.getLast L h ≠ 0) → digits b (ofDigits b L) = L\nw₁ : ∀ (l : ℕ), l ∈ d :: L → l < b\nh : L ≠ []\nw₂ : List.getLast L h ≠ 0\n⊢ List.getLast L h ≠ 0\n[PROOFSTEP]\nconvert w₂\n[GOAL]\ncase cons.hxb\nn b : ℕ\nh : 1 < b\nL✝ : List ℕ\nw₁✝ : ∀ (l : ℕ), l ∈ L✝ → l < b\nw₂✝ : ∀ (h : L✝ ≠ []), List.getLast L✝ h ≠ 0\nd : ℕ\nL : List ℕ\nih : (∀ (l : ℕ), l ∈ L → l < b) → (∀ (h : L ≠ []), List.getLast L h ≠ 0) → digits b (ofDigits b L) = L\nw₁ : ∀ (l : ℕ), l ∈ d :: L → l < b\nw₂ : List.getLast (d :: L) (_ : ¬d :: L = []) ≠ 0\n⊢ d < b\n[PROOFSTEP]\nexact w₁ d (List.mem_cons_self _ _)\n[GOAL]\ncase cons.hxy\nn b : ℕ\nh : 1 < b\nL✝ : List ℕ\nw₁✝ : ∀ (l : ℕ), l ∈ L✝ → l < b\nw₂✝ : ∀ (h : L✝ ≠ []), List.getLast L✝ h ≠ 0\nd : ℕ\nL : List ℕ\nih : (∀ (l : ℕ), l ∈ L → l < b) → (∀ (h : L ≠ []), List.getLast L h ≠ 0) → digits b (ofDigits b L) = L\nw₁ : ∀ (l : ℕ), l ∈ d :: L → l < b\nw₂ : List.getLast (d :: L) (_ : ¬d :: L = []) ≠ 0\n⊢ d ≠ 0 ∨ ofDigits b L ≠ 0\n[PROOFSTEP]\nby_cases h' : L = []\n[GOAL]\ncase pos\nn b : ℕ\nh : 1 < b\nL✝ : List ℕ\nw₁✝ : ∀ (l : ℕ), l ∈ L✝ → l < b\nw₂✝ : ∀ (h : L✝ ≠ []), List.getLast L✝ h ≠ 0\nd : ℕ\nL : List ℕ\nih : (∀ (l : ℕ), l ∈ L → l < b) → (∀ (h : L ≠ []), List.getLast L h ≠ 0) → digits b (ofDigits b L) = L\nw₁ : ∀ (l : ℕ), l ∈ d :: L → l < b\nw₂ : List.getLast (d :: L) (_ : ¬d :: L = []) ≠ 0\nh' : L = []\n⊢ d ≠ 0 ∨ ofDigits b L ≠ 0\n[PROOFSTEP]\nrcases h' with rfl\n[GOAL]\ncase pos\nn b : ℕ\nh : 1 < b\nL : List ℕ\nw₁✝ : ∀ (l : ℕ), l ∈ L → l < b\nw₂✝ : ∀ (h : L ≠ []), List.getLast L h ≠ 0\nd : ℕ\nih : (∀ (l : ℕ), l ∈ [] → l < b) → (∀ (h : [] ≠ []), List.getLast [] h ≠ 0) → digits b (ofDigits b []) = []\nw₁ : ∀ (l : ℕ), l ∈ [d] → l < b\nw₂ : List.getLast [d] (_ : ¬[d] = []) ≠ 0\n⊢ d ≠ 0 ∨ ofDigits b [] ≠ 0\n[PROOFSTEP]\nleft\n[GOAL]\ncase pos.h\nn b : ℕ\nh : 1 < b\nL : List ℕ\nw₁✝ : ∀ (l : ℕ), l ∈ L → l < b\nw₂✝ : ∀ (h : L ≠ []), List.getLast L h ≠ 0\nd : ℕ\nih : (∀ (l : ℕ), l ∈ [] → l < b) → (∀ (h : [] ≠ []), List.getLast [] h ≠ 0) → digits b (ofDigits b []) = []\nw₁ : ∀ (l : ℕ), l ∈ [d] → l < b\nw₂ : List.getLast [d] (_ : ¬[d] = []) ≠ 0\n⊢ d ≠ 0\n[PROOFSTEP]\nsimpa using w₂\n[GOAL]\ncase neg\nn b : ℕ\nh : 1 < b\nL✝ : List ℕ\nw₁✝ : ∀ (l : ℕ), l ∈ L✝ → l < b\nw₂✝ : ∀ (h : L✝ ≠ []), List.getLast L✝ h ≠ 0\nd : ℕ\nL : List ℕ\nih : (∀ (l : ℕ), l ∈ L → l < b) → (∀ (h : L ≠ []), List.getLast L h ≠ 0) → digits b (ofDigits b L) = L\nw₁ : ∀ (l : ℕ), l ∈ d :: L → l < b\nw₂ : List.getLast (d :: L) (_ : ¬d :: L = []) ≠ 0\nh' : ¬L = []\n⊢ d ≠ 0 ∨ ofDigits b L ≠ 0\n[PROOFSTEP]\nright\n[GOAL]\ncase neg.h\nn b : ℕ\nh : 1 < b\nL✝ : List ℕ\nw₁✝ : ∀ (l : ℕ), l ∈ L✝ → l < b\nw₂✝ : ∀ (h : L✝ ≠ []), List.getLast L✝ h ≠ 0\nd : ℕ\nL : List ℕ\nih : (∀ (l : ℕ), l ∈ L → l < b) → (∀ (h : L ≠ []), List.getLast L h ≠ 0) → digits b (ofDigits b L) = L\nw₁ : ∀ (l : ℕ), l ∈ d :: L → l < b\nw₂ : List.getLast (d :: L) (_ : ¬d :: L = []) ≠ 0\nh' : ¬L = []\n⊢ ofDigits b L ≠ 0\n[PROOFSTEP]\ncontrapose! w₂\n[GOAL]\ncase neg.h\nn b : ℕ\nh : 1 < b\nL✝ : List ℕ\nw₁✝ : ∀ (l : ℕ), l ∈ L✝ → l < b\nw₂✝ : ∀ (h : L✝ ≠ []), List.getLast L✝ h ≠ 0\nd : ℕ\nL : List ℕ\nih : (∀ (l : ℕ), l ∈ L → l < b) → (∀ (h : L ≠ []), List.getLast L h ≠ 0) → digits b (ofDigits b L) = L\nw₁ : ∀ (l : ℕ), l ∈ d :: L → l < b\nh' : ¬L = []\nw₂ : ofDigits b L = 0\n⊢ List.getLast (d :: L) (_ : ¬d :: L = []) = 0\n[PROOFSTEP]\nrefine' digits_zero_of_eq_zero h.ne_bot w₂ _ _\n[GOAL]\ncase neg.h\nn b : ℕ\nh : 1 < b\nL✝ : List ℕ\nw₁✝ : ∀ (l : ℕ), l ∈ L✝ → l < b\nw₂✝ : ∀ (h : L✝ ≠ []), List.getLast L✝ h ≠ 0\nd : ℕ\nL : List ℕ\nih : (∀ (l : ℕ), l ∈ L → l < b) → (∀ (h : L ≠ []), List.getLast L h ≠ 0) → digits b (ofDigits b L) = L\nw₁ : ∀ (l : ℕ), l ∈ d :: L → l < b\nh' : ¬L = []\nw₂ : ofDigits b L = 0\n⊢ List.getLast (d :: L) (_ : ¬d :: L = []) ∈ L\n[PROOFSTEP]\nrw [List.getLast_cons h']\n[GOAL]\ncase neg.h\nn b : ℕ\nh : 1 < b\nL✝ : List ℕ\nw₁✝ : ∀ (l : ℕ), l ∈ L✝ → l < b\nw₂✝ : ∀ (h : L✝ ≠ []), List.getLast L✝ h ≠ 0\nd : ℕ\nL : List ℕ\nih : (∀ (l : ℕ), l ∈ L → l < b) → (∀ (h : L ≠ []), List.getLast L h ≠ 0) → digits b (ofDigits b L) = L\nw₁ : ∀ (l : ℕ), l ∈ d :: L → l < b\nh' : ¬L = []\nw₂ : ofDigits b L = 0\n⊢ List.getLast L h' ∈ L\n[PROOFSTEP]\nexact List.getLast_mem h'\n[GOAL]\nn✝ b n : ℕ\n⊢ ofDigits b (digits b n) = n\n[PROOFSTEP]\ncases' b with b\n[GOAL]\ncase zero\nn✝ n : ℕ\n⊢ ofDigits zero (digits zero n) = n\n[PROOFSTEP]\ncases' n with n\n[GOAL]\ncase zero.zero\nn : ℕ\n⊢ ofDigits zero (digits zero zero) = zero\n[PROOFSTEP]\nrfl\n[GOAL]\ncase zero.succ\nn✝ n : ℕ\n⊢ ofDigits zero (digits zero (succ n)) = succ n\n[PROOFSTEP]\nchange ofDigits 0 [n + 1] = n + 1\n[GOAL]\ncase zero.succ\nn✝ n : ℕ\n⊢ ofDigits 0 [n + 1] = n + 1\n[PROOFSTEP]\ndsimp [ofDigits]\n[GOAL]\ncase succ\nn✝ n b : ℕ\n⊢ ofDigits (succ b) (digits (succ b) n) = n\n[PROOFSTEP]\ncases' b with b\n[GOAL]\ncase succ.zero\nn✝ n : ℕ\n⊢ ofDigits (succ zero) (digits (succ zero) n) = n\n[PROOFSTEP]\ninduction' n with n ih\n[GOAL]\ncase succ.zero.zero\nn : ℕ\n⊢ ofDigits (succ zero) (digits (succ zero) zero) = zero\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ.zero.succ\nn✝ n : ℕ\nih : ofDigits (succ zero) (digits (succ zero) n) = n\n⊢ ofDigits (succ zero) (digits (succ zero) (succ n)) = succ n\n[PROOFSTEP]\nrw [show succ zero = 1 by rfl] at ih ⊢\n[GOAL]\nn✝ n : ℕ\nih : ofDigits (succ zero) (digits (succ zero) n) = n\n⊢ succ zero = 1\n[PROOFSTEP]\nrfl\n[GOAL]\nn✝ n : ℕ\nih : ofDigits 1 (digits 1 n) = n\n⊢ succ zero = 1\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ.zero.succ\nn✝ n : ℕ\nih : ofDigits 1 (digits 1 n) = n\n⊢ ofDigits 1 (digits 1 (succ n)) = succ n\n[PROOFSTEP]\nsimp only [ih, add_comm 1, ofDigits_one_cons, Nat.cast_id, digits_one_succ]\n[GOAL]\ncase succ.succ\nn✝ n b : ℕ\n⊢ ofDigits (succ (succ b)) (digits (succ (succ b)) n) = n\n[PROOFSTEP]\napply Nat.strongInductionOn n _\n[GOAL]\nn✝ n b : ℕ\n⊢ ∀ (n : ℕ),\n    (∀ (m : ℕ), m < n → ofDigits (succ (succ b)) (digits (succ (succ b)) m) = m) →\n      ofDigits (succ (succ b)) (digits (succ (succ b)) n) = n\n[PROOFSTEP]\nclear n\n[GOAL]\nn b : ℕ\n⊢ ∀ (n : ℕ),\n    (∀ (m : ℕ), m < n → ofDigits (succ (succ b)) (digits (succ (succ b)) m) = m) →\n      ofDigits (succ (succ b)) (digits (succ (succ b)) n) = n\n[PROOFSTEP]\nintro n h\n[GOAL]\nn✝ b n : ℕ\nh : ∀ (m : ℕ), m < n → ofDigits (succ (succ b)) (digits (succ (succ b)) m) = m\n⊢ ofDigits (succ (succ b)) (digits (succ (succ b)) n) = n\n[PROOFSTEP]\ncases n\n[GOAL]\ncase zero\nn b : ℕ\nh : ∀ (m : ℕ), m < zero → ofDigits (succ (succ b)) (digits (succ (succ b)) m) = m\n⊢ ofDigits (succ (succ b)) (digits (succ (succ b)) zero) = zero\n[PROOFSTEP]\nrw [digits_zero]\n[GOAL]\ncase zero\nn b : ℕ\nh : ∀ (m : ℕ), m < zero → ofDigits (succ (succ b)) (digits (succ (succ b)) m) = m\n⊢ ofDigits (succ (succ b)) [] = zero\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ\nn b n✝ : ℕ\nh : ∀ (m : ℕ), m < succ n✝ → ofDigits (succ (succ b)) (digits (succ (succ b)) m) = m\n⊢ ofDigits (succ (succ b)) (digits (succ (succ b)) (succ n✝)) = succ n✝\n[PROOFSTEP]\nsimp only [Nat.succ_eq_add_one, digits_add_two_add_one]\n[GOAL]\ncase succ\nn b n✝ : ℕ\nh : ∀ (m : ℕ), m < succ n✝ → ofDigits (succ (succ b)) (digits (succ (succ b)) m) = m\n⊢ ofDigits (b + 1 + 1) ((n✝ + 1) % (b + 2) :: digits (b + 2) ((n✝ + 1) / (b + 2))) = n✝ + 1\n[PROOFSTEP]\ndsimp [ofDigits]\n[GOAL]\ncase succ\nn b n✝ : ℕ\nh : ∀ (m : ℕ), m < succ n✝ → ofDigits (succ (succ b)) (digits (succ (succ b)) m) = m\n⊢ (n✝ + 1) % (b + 2) + (b + 1 + 1) * ofDigits (b + 1 + 1) (digits (b + 2) ((n✝ + 1) / (b + 2))) = n✝ + 1\n[PROOFSTEP]\nrw [h _ (Nat.div_lt_self' _ b)]\n[GOAL]\ncase succ\nn b n✝ : ℕ\nh : ∀ (m : ℕ), m < succ n✝ → ofDigits (succ (succ b)) (digits (succ (succ b)) m) = m\n⊢ (n✝ + 1) % (b + 2) + (b + 1 + 1) * ((n✝ + 1) / (b + 2)) = n✝ + 1\n[PROOFSTEP]\nrw [Nat.mod_add_div]\n[GOAL]\nn : ℕ\nL : List ℕ\n⊢ ofDigits 1 L = List.sum L\n[PROOFSTEP]\ninduction' L with _ _ ih\n[GOAL]\ncase nil\nn : ℕ\n⊢ ofDigits 1 [] = List.sum []\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\nn head✝ : ℕ\ntail✝ : List ℕ\nih : ofDigits 1 tail✝ = List.sum tail✝\n⊢ ofDigits 1 (head✝ :: tail✝) = List.sum (head✝ :: tail✝)\n[PROOFSTEP]\nsimp [ofDigits, List.sum_cons, ih]\n[GOAL]\nn✝ b n : ℕ\n⊢ digits b n = [] ↔ n = 0\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nn✝ b n : ℕ\n⊢ digits b n = [] → n = 0\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nn✝ b n : ℕ\nh : digits b n = []\n⊢ n = 0\n[PROOFSTEP]\nhave : ofDigits b (digits b n) = ofDigits b [] := by rw [h]\n[GOAL]\nn✝ b n : ℕ\nh : digits b n = []\n⊢ ofDigits b (digits b n) = ofDigits b []\n[PROOFSTEP]\nrw [h]\n[GOAL]\ncase mp\nn✝ b n : ℕ\nh : digits b n = []\nthis : ofDigits b (digits b n) = ofDigits b []\n⊢ n = 0\n[PROOFSTEP]\nconvert this\n[GOAL]\ncase h.e'_2\nn✝ b n : ℕ\nh : digits b n = []\nthis : ofDigits b (digits b n) = ofDigits b []\n⊢ n = ofDigits b (digits b n)\n[PROOFSTEP]\nrw [ofDigits_digits]\n[GOAL]\ncase mpr\nn✝ b n : ℕ\n⊢ n = 0 → digits b n = []\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase mpr\nn b : ℕ\n⊢ digits b 0 = []\n[PROOFSTEP]\nsimp\n[GOAL]\nn✝ b n : ℕ\nh : 1 < b\nw : n ≠ 0\n⊢ digits b n = n % b :: digits b (n / b)\n[PROOFSTEP]\nrcases b with (_ | _ | b)\n[GOAL]\ncase zero\nn✝ n : ℕ\nw : n ≠ 0\nh : 1 < zero\n⊢ digits zero n = n % zero :: digits zero (n / zero)\n[PROOFSTEP]\nrw [digits_zero_succ' w, Nat.mod_zero, Nat.div_zero, Nat.digits_zero_zero]\n[GOAL]\ncase succ.zero\nn✝ n : ℕ\nw : n ≠ 0\nh : 1 < succ zero\n⊢ digits (succ zero) n = n % succ zero :: digits (succ zero) (n / succ zero)\n[PROOFSTEP]\nnorm_num at h \n[GOAL]\ncase succ.succ\nn✝ n : ℕ\nw : n ≠ 0\nb : ℕ\nh : 1 < succ (succ b)\n⊢ digits (succ (succ b)) n = n % succ (succ b) :: digits (succ (succ b)) (n / succ (succ b))\n[PROOFSTEP]\nrcases n with (_ | n)\n[GOAL]\ncase succ.succ.zero\nn b : ℕ\nh : 1 < succ (succ b)\nw : zero ≠ 0\n⊢ digits (succ (succ b)) zero = zero % succ (succ b) :: digits (succ (succ b)) (zero / succ (succ b))\n[PROOFSTEP]\nnorm_num at w \n[GOAL]\ncase succ.succ.succ\nn✝ b : ℕ\nh : 1 < succ (succ b)\nn : ℕ\nw : succ n ≠ 0\n⊢ digits (succ (succ b)) (succ n) = succ n % succ (succ b) :: digits (succ (succ b)) (succ n / succ (succ b))\n[PROOFSTEP]\nsimp only [digits_add_two_add_one, ne_eq]\n[GOAL]\nn b m : ℕ\nh : 1 < b\np : digits b m ≠ []\nq : digits b (m / b) ≠ []\n⊢ List.getLast (digits b m) p = List.getLast (digits b (m / b)) q\n[PROOFSTEP]\nby_cases hm : m = 0\n[GOAL]\ncase pos\nn b m : ℕ\nh : 1 < b\np : digits b m ≠ []\nq : digits b (m / b) ≠ []\nhm : m = 0\n⊢ List.getLast (digits b m) p = List.getLast (digits b (m / b)) q\n[PROOFSTEP]\nsimp [hm]\n[GOAL]\ncase neg\nn b m : ℕ\nh : 1 < b\np : digits b m ≠ []\nq : digits b (m / b) ≠ []\nhm : ¬m = 0\n⊢ List.getLast (digits b m) p = List.getLast (digits b (m / b)) q\n[PROOFSTEP]\nsimp only [digits_eq_cons_digits_div h hm]\n[GOAL]\ncase neg\nn b m : ℕ\nh : 1 < b\np : digits b m ≠ []\nq : digits b (m / b) ≠ []\nhm : ¬m = 0\n⊢ List.getLast (m % b :: digits b (m / b)) (_ : m % b :: digits b (m / b) ≠ []) = List.getLast (digits b (m / b)) q\n[PROOFSTEP]\nrw [List.getLast_cons]\n[GOAL]\nn✝ b n : ℕ\nhb : 1 < b\nhn : n ≠ 0\n⊢ List.length (digits b n) = log b n + 1\n[PROOFSTEP]\ninduction' n using Nat.strong_induction_on with n IH\n[GOAL]\ncase h\nn✝¹ b n✝ : ℕ\nhb : 1 < b\nhn✝ : n✝ ≠ 0\nn : ℕ\nIH : ∀ (m : ℕ), m < n → m ≠ 0 → List.length (digits b m) = log b m + 1\nhn : n ≠ 0\n⊢ List.length (digits b n) = log b n + 1\n[PROOFSTEP]\nrw [digits_eq_cons_digits_div hb hn, List.length]\n[GOAL]\ncase h\nn✝¹ b n✝ : ℕ\nhb : 1 < b\nhn✝ : n✝ ≠ 0\nn : ℕ\nIH : ∀ (m : ℕ), m < n → m ≠ 0 → List.length (digits b m) = log b m + 1\nhn : n ≠ 0\n⊢ List.length (digits b (n / b)) + 1 = log b n + 1\n[PROOFSTEP]\nby_cases h : n / b = 0\n[GOAL]\ncase pos\nn✝¹ b n✝ : ℕ\nhb : 1 < b\nhn✝ : n✝ ≠ 0\nn : ℕ\nIH : ∀ (m : ℕ), m < n → m ≠ 0 → List.length (digits b m) = log b m + 1\nhn : n ≠ 0\nh : n / b = 0\n⊢ List.length (digits b (n / b)) + 1 = log b n + 1\n[PROOFSTEP]\nhave hb0 : b ≠ 0 := (Nat.succ_le_iff.1 hb).ne_bot\n[GOAL]\ncase pos\nn✝¹ b n✝ : ℕ\nhb : 1 < b\nhn✝ : n✝ ≠ 0\nn : ℕ\nIH : ∀ (m : ℕ), m < n → m ≠ 0 → List.length (digits b m) = log b m + 1\nhn : n ≠ 0\nh : n / b = 0\nhb0 : b ≠ 0\n⊢ List.length (digits b (n / b)) + 1 = log b n + 1\n[PROOFSTEP]\nsimp [h, log_eq_zero_iff, ← Nat.div_eq_zero_iff hb0.bot_lt]\n[GOAL]\ncase neg\nn✝¹ b n✝ : ℕ\nhb : 1 < b\nhn✝ : n✝ ≠ 0\nn : ℕ\nIH : ∀ (m : ℕ), m < n → m ≠ 0 → List.length (digits b m) = log b m + 1\nhn : n ≠ 0\nh : ¬n / b = 0\n⊢ List.length (digits b (n / b)) + 1 = log b n + 1\n[PROOFSTEP]\nhave : n / b < n := div_lt_self (Nat.pos_of_ne_zero hn) hb\n[GOAL]\ncase neg\nn✝¹ b n✝ : ℕ\nhb : 1 < b\nhn✝ : n✝ ≠ 0\nn : ℕ\nIH : ∀ (m : ℕ), m < n → m ≠ 0 → List.length (digits b m) = log b m + 1\nhn : n ≠ 0\nh : ¬n / b = 0\nthis : n / b < n\n⊢ List.length (digits b (n / b)) + 1 = log b n + 1\n[PROOFSTEP]\nrw [IH _ this h, log_div_base, tsub_add_cancel_of_le]\n[GOAL]\ncase neg\nn✝¹ b n✝ : ℕ\nhb : 1 < b\nhn✝ : n✝ ≠ 0\nn : ℕ\nIH : ∀ (m : ℕ), m < n → m ≠ 0 → List.length (digits b m) = log b m + 1\nhn : n ≠ 0\nh : ¬n / b = 0\nthis : n / b < n\n⊢ 1 ≤ log b n\n[PROOFSTEP]\nrefine' Nat.succ_le_of_lt (log_pos hb _)\n[GOAL]\ncase neg\nn✝¹ b n✝ : ℕ\nhb : 1 < b\nhn✝ : n✝ ≠ 0\nn : ℕ\nIH : ∀ (m : ℕ), m < n → m ≠ 0 → List.length (digits b m) = log b m + 1\nhn : n ≠ 0\nh : ¬n / b = 0\nthis : n / b < n\n⊢ b ≤ n\n[PROOFSTEP]\ncontrapose! h\n[GOAL]\ncase neg\nn✝¹ b n✝ : ℕ\nhb : 1 < b\nhn✝ : n✝ ≠ 0\nn : ℕ\nIH : ∀ (m : ℕ), m < n → m ≠ 0 → List.length (digits b m) = log b m + 1\nhn : n ≠ 0\nthis : n / b < n\nh : n < b\n⊢ n / b = 0\n[PROOFSTEP]\nexact div_eq_of_lt h\n[GOAL]\nn b m : ℕ\nhm : m ≠ 0\n⊢ List.getLast (digits b m) (_ : digits b m ≠ []) ≠ 0\n[PROOFSTEP]\nrcases b with (_ | _ | b)\n[GOAL]\ncase zero\nn m : ℕ\nhm : m ≠ 0\n⊢ List.getLast (digits zero m) (_ : digits zero m ≠ []) ≠ 0\n[PROOFSTEP]\ncases m\n[GOAL]\ncase zero.zero\nn : ℕ\nhm : zero ≠ 0\n⊢ List.getLast (digits zero zero) (_ : digits zero zero ≠ []) ≠ 0\n[PROOFSTEP]\ncases hm rfl\n[GOAL]\ncase zero.succ\nn n✝ : ℕ\nhm : succ n✝ ≠ 0\n⊢ List.getLast (digits zero (succ n✝)) (_ : digits zero (succ n✝) ≠ []) ≠ 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ.zero\nn m : ℕ\nhm : m ≠ 0\n⊢ List.getLast (digits (succ zero) m) (_ : digits (succ zero) m ≠ []) ≠ 0\n[PROOFSTEP]\ncases m\n[GOAL]\ncase succ.zero.zero\nn : ℕ\nhm : zero ≠ 0\n⊢ List.getLast (digits (succ zero) zero) (_ : digits (succ zero) zero ≠ []) ≠ 0\n[PROOFSTEP]\ncases hm rfl\n[GOAL]\ncase succ.zero.succ\nn n✝ : ℕ\nhm : succ n✝ ≠ 0\n⊢ List.getLast (digits (succ zero) (succ n✝)) (_ : digits (succ zero) (succ n✝) ≠ []) ≠ 0\n[PROOFSTEP]\nrename ℕ => m\n[GOAL]\ncase succ.zero.succ\nn m : ℕ\nhm : succ m ≠ 0\n⊢ List.getLast (digits (succ zero) (succ m)) (_ : digits (succ zero) (succ m) ≠ []) ≠ 0\n[PROOFSTEP]\nsimp only [digits_one, List.getLast_replicate_succ m 1]\n[GOAL]\ncase succ.succ\nn m : ℕ\nhm : m ≠ 0\nb : ℕ\n⊢ List.getLast (digits (succ (succ b)) m) (_ : digits (succ (succ b)) m ≠ []) ≠ 0\n[PROOFSTEP]\nrevert hm\n[GOAL]\ncase succ.succ\nn m b : ℕ\n⊢ ∀ (hm : m ≠ 0), List.getLast (digits (succ (succ b)) m) (_ : digits (succ (succ b)) m ≠ []) ≠ 0\n[PROOFSTEP]\napply Nat.strongInductionOn m\n[GOAL]\ncase succ.succ\nn m b : ℕ\n⊢ ∀ (n : ℕ),\n    (∀ (m : ℕ),\n        m < n → ∀ (hm : m ≠ 0), List.getLast (digits (succ (succ b)) m) (_ : digits (succ (succ b)) m ≠ []) ≠ 0) →\n      ∀ (hm : n ≠ 0), List.getLast (digits (succ (succ b)) n) (_ : digits (succ (succ b)) n ≠ []) ≠ 0\n[PROOFSTEP]\nintro n IH hn\n[GOAL]\ncase succ.succ\nn✝ m b n : ℕ\nIH : ∀ (m : ℕ), m < n → ∀ (hm : m ≠ 0), List.getLast (digits (succ (succ b)) m) (_ : digits (succ (succ b)) m ≠ []) ≠ 0\nhn : n ≠ 0\n⊢ List.getLast (digits (succ (succ b)) n) (_ : digits (succ (succ b)) n ≠ []) ≠ 0\n[PROOFSTEP]\nby_cases hnb : n < b + 2\n[GOAL]\ncase pos\nn✝ m b n : ℕ\nIH : ∀ (m : ℕ), m < n → ∀ (hm : m ≠ 0), List.getLast (digits (succ (succ b)) m) (_ : digits (succ (succ b)) m ≠ []) ≠ 0\nhn : n ≠ 0\nhnb : n < b + 2\n⊢ List.getLast (digits (succ (succ b)) n) (_ : digits (succ (succ b)) n ≠ []) ≠ 0\n[PROOFSTEP]\nsimpa only [digits_of_lt (b + 2) n hn hnb]\n[GOAL]\ncase neg\nn✝ m b n : ℕ\nIH : ∀ (m : ℕ), m < n → ∀ (hm : m ≠ 0), List.getLast (digits (succ (succ b)) m) (_ : digits (succ (succ b)) m ≠ []) ≠ 0\nhn : n ≠ 0\nhnb : ¬n < b + 2\n⊢ List.getLast (digits (succ (succ b)) n) (_ : digits (succ (succ b)) n ≠ []) ≠ 0\n[PROOFSTEP]\nrw [digits_getLast n (le_add_left 2 b)]\n[GOAL]\ncase neg\nn✝ m b n : ℕ\nIH : ∀ (m : ℕ), m < n → ∀ (hm : m ≠ 0), List.getLast (digits (succ (succ b)) m) (_ : digits (succ (succ b)) m ≠ []) ≠ 0\nhn : n ≠ 0\nhnb : ¬n < b + 2\n⊢ List.getLast (digits (b + 2) (n / (b + 2))) ?neg.q✝ ≠ 0\ncase neg.q\nn✝ m b n : ℕ\nIH : ∀ (m : ℕ), m < n → ∀ (hm : m ≠ 0), List.getLast (digits (succ (succ b)) m) (_ : digits (succ (succ b)) m ≠ []) ≠ 0\nhn : n ≠ 0\nhnb : ¬n < b + 2\n⊢ digits (b + 2) (n / (b + 2)) ≠ []\n[PROOFSTEP]\nrefine' IH _ (Nat.div_lt_self hn.bot_lt (one_lt_succ_succ b)) _\n[GOAL]\ncase neg\nn✝ m b n : ℕ\nIH : ∀ (m : ℕ), m < n → ∀ (hm : m ≠ 0), List.getLast (digits (succ (succ b)) m) (_ : digits (succ (succ b)) m ≠ []) ≠ 0\nhn : n ≠ 0\nhnb : ¬n < b + 2\n⊢ n / succ (succ b) ≠ 0\n[PROOFSTEP]\nrw [← pos_iff_ne_zero]\n[GOAL]\ncase neg\nn✝ m b n : ℕ\nIH : ∀ (m : ℕ), m < n → ∀ (hm : m ≠ 0), List.getLast (digits (succ (succ b)) m) (_ : digits (succ (succ b)) m ≠ []) ≠ 0\nhn : n ≠ 0\nhnb : ¬n < b + 2\n⊢ 0 < n / succ (succ b)\n[PROOFSTEP]\nexact Nat.div_pos (le_of_not_lt hnb) (zero_lt_succ (succ b))\n[GOAL]\nn b m : ℕ\n⊢ ∀ {d : ℕ}, d ∈ digits (b + 2) m → d < b + 2\n[PROOFSTEP]\napply Nat.strongInductionOn m\n[GOAL]\nn b m : ℕ\n⊢ ∀ (n : ℕ),\n    (∀ (m : ℕ), m < n → ∀ {d : ℕ}, d ∈ digits (b + 2) m → d < b + 2) → ∀ {d : ℕ}, d ∈ digits (b + 2) n → d < b + 2\n[PROOFSTEP]\nintro n IH d hd\n[GOAL]\nn✝ b m n : ℕ\nIH : ∀ (m : ℕ), m < n → ∀ {d : ℕ}, d ∈ digits (b + 2) m → d < b + 2\nd : ℕ\nhd : d ∈ digits (b + 2) n\n⊢ d < b + 2\n[PROOFSTEP]\ncases' n with n\n[GOAL]\ncase zero\nn b m d : ℕ\nIH : ∀ (m : ℕ), m < zero → ∀ {d : ℕ}, d ∈ digits (b + 2) m → d < b + 2\nhd : d ∈ digits (b + 2) zero\n⊢ d < b + 2\n[PROOFSTEP]\nrw [digits_zero] at hd \n[GOAL]\ncase zero\nn b m d : ℕ\nIH : ∀ (m : ℕ), m < zero → ∀ {d : ℕ}, d ∈ digits (b + 2) m → d < b + 2\nhd : d ∈ []\n⊢ d < b + 2\n[PROOFSTEP]\ncases hd\n[GOAL]\ncase succ\nn✝ b m d n : ℕ\nIH : ∀ (m : ℕ), m < succ n → ∀ {d : ℕ}, d ∈ digits (b + 2) m → d < b + 2\nhd : d ∈ digits (b + 2) (succ n)\n⊢ d < b + 2\n[PROOFSTEP]\nrw [digits_add_two_add_one] at hd \n[GOAL]\ncase succ\nn✝ b m d n : ℕ\nIH : ∀ (m : ℕ), m < succ n → ∀ {d : ℕ}, d ∈ digits (b + 2) m → d < b + 2\nhd : d ∈ (n + 1) % (b + 2) :: digits (b + 2) ((n + 1) / (b + 2))\n⊢ d < b + 2\n[PROOFSTEP]\ncases hd\n[GOAL]\ncase succ.head\nn✝ b m n : ℕ\nIH : ∀ (m : ℕ), m < succ n → ∀ {d : ℕ}, d ∈ digits (b + 2) m → d < b + 2\n⊢ (n + 1) % (b + 2) < b + 2\n[PROOFSTEP]\nexact\n  n.succ.mod_lt\n    (by simp)\n      -- Porting note: Previous code (single line) contained linarith.\n        -- . exact IH _ (Nat.div_lt_self (Nat.succ_pos _) (by linarith)) hd\n[GOAL]\nn✝ b m n : ℕ\nIH : ∀ (m : ℕ), m < succ n → ∀ {d : ℕ}, d ∈ digits (b + 2) m → d < b + 2\n⊢ b + 2 > 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ.tail\nn✝ b m d n : ℕ\nIH : ∀ (m : ℕ), m < succ n → ∀ {d : ℕ}, d ∈ digits (b + 2) m → d < b + 2\na✝ : List.Mem d (digits (b + 2) ((n + 1) / (b + 2)))\n⊢ d < b + 2\n[PROOFSTEP]\napply IH ((n + 1) / (b + 2))\n[GOAL]\ncase succ.tail.a\nn✝ b m d n : ℕ\nIH : ∀ (m : ℕ), m < succ n → ∀ {d : ℕ}, d ∈ digits (b + 2) m → d < b + 2\na✝ : List.Mem d (digits (b + 2) ((n + 1) / (b + 2)))\n⊢ (n + 1) / (b + 2) < succ n\n[PROOFSTEP]\napply Nat.div_lt_self\n[GOAL]\ncase succ.tail.a.hLtN\nn✝ b m d n : ℕ\nIH : ∀ (m : ℕ), m < succ n → ∀ {d : ℕ}, d ∈ digits (b + 2) m → d < b + 2\na✝ : List.Mem d (digits (b + 2) ((n + 1) / (b + 2)))\n⊢ 0 < n + 1\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ.tail.a.hLtK\nn✝ b m d n : ℕ\nIH : ∀ (m : ℕ), m < succ n → ∀ {d : ℕ}, d ∈ digits (b + 2) m → d < b + 2\na✝ : List.Mem d (digits (b + 2) ((n + 1) / (b + 2)))\n⊢ 1 < b + 2\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ.tail.a\nn✝ b m d n : ℕ\nIH : ∀ (m : ℕ), m < succ n → ∀ {d : ℕ}, d ∈ digits (b + 2) m → d < b + 2\na✝ : List.Mem d (digits (b + 2) ((n + 1) / (b + 2)))\n⊢ d ∈ digits (b + 2) ((n + 1) / (b + 2))\n[PROOFSTEP]\nassumption\n[GOAL]\nn b m d : ℕ\nhb : 1 < b\nhd : d ∈ digits b m\n⊢ d < b\n[PROOFSTEP]\nrcases b with (_ | _ | b)\n[GOAL]\ncase zero\nn m d : ℕ\nhb : 1 < zero\nhd : d ∈ digits zero m\n⊢ d < zero\n[PROOFSTEP]\ntry simp_all\n[GOAL]\ncase zero\nn m d : ℕ\nhb : 1 < zero\nhd : d ∈ digits zero m\n⊢ d < zero\n[PROOFSTEP]\nsimp_all\n[GOAL]\ncase succ.zero\nn m d : ℕ\nhb : 1 < succ zero\nhd : d ∈ digits (succ zero) m\n⊢ d < succ zero\n[PROOFSTEP]\ntry simp_all\n[GOAL]\ncase succ.zero\nn m d : ℕ\nhb : 1 < succ zero\nhd : d ∈ digits (succ zero) m\n⊢ d < succ zero\n[PROOFSTEP]\nsimp_all\n[GOAL]\ncase succ.succ\nn m d b : ℕ\nhb : 1 < succ (succ b)\nhd : d ∈ digits (succ (succ b)) m\n⊢ d < succ (succ b)\n[PROOFSTEP]\ntry simp_all\n[GOAL]\ncase succ.succ\nn m d b : ℕ\nhb : 1 < succ (succ b)\nhd : d ∈ digits (succ (succ b)) m\n⊢ d < succ (succ b)\n[PROOFSTEP]\nsimp_all\n[GOAL]\ncase succ.succ\nn m d b : ℕ\nhd : d ∈ digits (succ (succ b)) m\n⊢ d < succ (succ b)\n[PROOFSTEP]\nexact digits_lt_base' hd\n[GOAL]\nn b : ℕ\nl : List ℕ\nhl : ∀ (x : ℕ), x ∈ l → x < b + 2\n⊢ ofDigits (b + 2) l < (b + 2) ^ List.length l\n[PROOFSTEP]\ninduction' l with hd tl IH\n[GOAL]\ncase nil\nn b : ℕ\nl : List ℕ\nhl✝ : ∀ (x : ℕ), x ∈ l → x < b + 2\nhl : ∀ (x : ℕ), x ∈ [] → x < b + 2\n⊢ ofDigits (b + 2) [] < (b + 2) ^ List.length []\n[PROOFSTEP]\nsimp [ofDigits]\n[GOAL]\ncase cons\nn b : ℕ\nl : List ℕ\nhl✝ : ∀ (x : ℕ), x ∈ l → x < b + 2\nhd : ℕ\ntl : List ℕ\nIH : (∀ (x : ℕ), x ∈ tl → x < b + 2) → ofDigits (b + 2) tl < (b + 2) ^ List.length tl\nhl : ∀ (x : ℕ), x ∈ hd :: tl → x < b + 2\n⊢ ofDigits (b + 2) (hd :: tl) < (b + 2) ^ List.length (hd :: tl)\n[PROOFSTEP]\nrw [ofDigits, List.length_cons, pow_succ]\n[GOAL]\ncase cons\nn b : ℕ\nl : List ℕ\nhl✝ : ∀ (x : ℕ), x ∈ l → x < b + 2\nhd : ℕ\ntl : List ℕ\nIH : (∀ (x : ℕ), x ∈ tl → x < b + 2) → ofDigits (b + 2) tl < (b + 2) ^ List.length tl\nhl : ∀ (x : ℕ), x ∈ hd :: tl → x < b + 2\n⊢ ↑hd + (b + 2) * ofDigits (b + 2) tl < (b + 2) ^ List.length tl * (b + 2)\n[PROOFSTEP]\nhave : (ofDigits (b + 2) tl + 1) * (b + 2) ≤ (b + 2) ^ tl.length * (b + 2) :=\n  mul_le_mul (IH fun x hx => hl _ (List.mem_cons_of_mem _ hx)) (by rfl) (by simp only [zero_le]) (Nat.zero_le _)\n[GOAL]\nn b : ℕ\nl : List ℕ\nhl✝ : ∀ (x : ℕ), x ∈ l → x < b + 2\nhd : ℕ\ntl : List ℕ\nIH : (∀ (x : ℕ), x ∈ tl → x < b + 2) → ofDigits (b + 2) tl < (b + 2) ^ List.length tl\nhl : ∀ (x : ℕ), x ∈ hd :: tl → x < b + 2\n⊢ b + 2 ≤ b + 2\n[PROOFSTEP]\nrfl\n[GOAL]\nn b : ℕ\nl : List ℕ\nhl✝ : ∀ (x : ℕ), x ∈ l → x < b + 2\nhd : ℕ\ntl : List ℕ\nIH : (∀ (x : ℕ), x ∈ tl → x < b + 2) → ofDigits (b + 2) tl < (b + 2) ^ List.length tl\nhl : ∀ (x : ℕ), x ∈ hd :: tl → x < b + 2\n⊢ 0 ≤ b + 2\n[PROOFSTEP]\nsimp only [zero_le]\n[GOAL]\ncase cons\nn b : ℕ\nl : List ℕ\nhl✝ : ∀ (x : ℕ), x ∈ l → x < b + 2\nhd : ℕ\ntl : List ℕ\nIH : (∀ (x : ℕ), x ∈ tl → x < b + 2) → ofDigits (b + 2) tl < (b + 2) ^ List.length tl\nhl : ∀ (x : ℕ), x ∈ hd :: tl → x < b + 2\nthis : (ofDigits (b + 2) tl + 1) * (b + 2) ≤ (b + 2) ^ List.length tl * (b + 2)\n⊢ ↑hd + (b + 2) * ofDigits (b + 2) tl < (b + 2) ^ List.length tl * (b + 2)\n[PROOFSTEP]\nsuffices ↑hd < b + 2 by linarith\n[GOAL]\nn b : ℕ\nl : List ℕ\nhl✝ : ∀ (x : ℕ), x ∈ l → x < b + 2\nhd : ℕ\ntl : List ℕ\nIH : (∀ (x : ℕ), x ∈ tl → x < b + 2) → ofDigits (b + 2) tl < (b + 2) ^ List.length tl\nhl : ∀ (x : ℕ), x ∈ hd :: tl → x < b + 2\nthis✝ : (ofDigits (b + 2) tl + 1) * (b + 2) ≤ (b + 2) ^ List.length tl * (b + 2)\nthis : hd < b + 2\n⊢ ↑hd + (b + 2) * ofDigits (b + 2) tl < (b + 2) ^ List.length tl * (b + 2)\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase cons\nn b : ℕ\nl : List ℕ\nhl✝ : ∀ (x : ℕ), x ∈ l → x < b + 2\nhd : ℕ\ntl : List ℕ\nIH : (∀ (x : ℕ), x ∈ tl → x < b + 2) → ofDigits (b + 2) tl < (b + 2) ^ List.length tl\nhl : ∀ (x : ℕ), x ∈ hd :: tl → x < b + 2\nthis : (ofDigits (b + 2) tl + 1) * (b + 2) ≤ (b + 2) ^ List.length tl * (b + 2)\n⊢ hd < b + 2\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase cons\nn b : ℕ\nl : List ℕ\nhl✝ : ∀ (x : ℕ), x ∈ l → x < b + 2\nhd : ℕ\ntl : List ℕ\nIH : (∀ (x : ℕ), x ∈ tl → x < b + 2) → ofDigits (b + 2) tl < (b + 2) ^ List.length tl\nhl : ∀ (x : ℕ), x ∈ hd :: tl → x < b + 2\nthis : (ofDigits (b + 2) tl + 1) * (b + 2) ≤ (b + 2) ^ List.length tl * (b + 2)\n⊢ hd < b + 2\n[PROOFSTEP]\nexact hl hd (List.mem_cons_self _ _)\n[GOAL]\nn b : ℕ\nl : List ℕ\nhb : 1 < b\nhl : ∀ (x : ℕ), x ∈ l → x < b\n⊢ ofDigits b l < b ^ List.length l\n[PROOFSTEP]\nrcases b with (_ | _ | b)\n[GOAL]\ncase zero\nn : ℕ\nl : List ℕ\nhb : 1 < zero\nhl : ∀ (x : ℕ), x ∈ l → x < zero\n⊢ ofDigits zero l < zero ^ List.length l\n[PROOFSTEP]\ntry simp_all\n[GOAL]\ncase zero\nn : ℕ\nl : List ℕ\nhb : 1 < zero\nhl : ∀ (x : ℕ), x ∈ l → x < zero\n⊢ ofDigits zero l < zero ^ List.length l\n[PROOFSTEP]\nsimp_all\n[GOAL]\ncase succ.zero\nn : ℕ\nl : List ℕ\nhb : 1 < succ zero\nhl : ∀ (x : ℕ), x ∈ l → x < succ zero\n⊢ ofDigits (succ zero) l < succ zero ^ List.length l\n[PROOFSTEP]\ntry simp_all\n[GOAL]\ncase succ.zero\nn : ℕ\nl : List ℕ\nhb : 1 < succ zero\nhl : ∀ (x : ℕ), x ∈ l → x < succ zero\n⊢ ofDigits (succ zero) l < succ zero ^ List.length l\n[PROOFSTEP]\nsimp_all\n[GOAL]\ncase succ.succ\nn : ℕ\nl : List ℕ\nb : ℕ\nhb : 1 < succ (succ b)\nhl : ∀ (x : ℕ), x ∈ l → x < succ (succ b)\n⊢ ofDigits (succ (succ b)) l < succ (succ b) ^ List.length l\n[PROOFSTEP]\ntry simp_all\n[GOAL]\ncase succ.succ\nn : ℕ\nl : List ℕ\nb : ℕ\nhb : 1 < succ (succ b)\nhl : ∀ (x : ℕ), x ∈ l → x < succ (succ b)\n⊢ ofDigits (succ (succ b)) l < succ (succ b) ^ List.length l\n[PROOFSTEP]\nsimp_all\n[GOAL]\ncase succ.succ\nn : ℕ\nl : List ℕ\nb : ℕ\nhl : ∀ (x : ℕ), x ∈ l → x < succ (succ b)\n⊢ ofDigits (succ (succ b)) l < succ (succ b) ^ List.length l\n[PROOFSTEP]\nexact ofDigits_lt_base_pow_length' hl\n[GOAL]\nn b m : ℕ\n⊢ m < (b + 2) ^ List.length (digits (b + 2) m)\n[PROOFSTEP]\nconvert @ofDigits_lt_base_pow_length' b (digits (b + 2) m) fun _ => digits_lt_base'\n[GOAL]\ncase h.e'_3\nn b m : ℕ\n⊢ m = ofDigits (b + 2) (digits (b + 2) m)\n[PROOFSTEP]\nrw [ofDigits_digits (b + 2) m]\n[GOAL]\nn b m : ℕ\nhb : 1 < b\n⊢ m < b ^ List.length (digits b m)\n[PROOFSTEP]\nrcases b with (_ | _ | b)\n[GOAL]\ncase zero\nn m : ℕ\nhb : 1 < zero\n⊢ m < zero ^ List.length (digits zero m)\n[PROOFSTEP]\ntry simp_all\n[GOAL]\ncase zero\nn m : ℕ\nhb : 1 < zero\n⊢ m < zero ^ List.length (digits zero m)\n[PROOFSTEP]\nsimp_all\n[GOAL]\ncase succ.zero\nn m : ℕ\nhb : 1 < succ zero\n⊢ m < succ zero ^ List.length (digits (succ zero) m)\n[PROOFSTEP]\ntry simp_all\n[GOAL]\ncase succ.zero\nn m : ℕ\nhb : 1 < succ zero\n⊢ m < succ zero ^ List.length (digits (succ zero) m)\n[PROOFSTEP]\nsimp_all\n[GOAL]\ncase succ.succ\nn m b : ℕ\nhb : 1 < succ (succ b)\n⊢ m < succ (succ b) ^ List.length (digits (succ (succ b)) m)\n[PROOFSTEP]\ntry simp_all\n[GOAL]\ncase succ.succ\nn m b : ℕ\nhb : 1 < succ (succ b)\n⊢ m < succ (succ b) ^ List.length (digits (succ (succ b)) m)\n[PROOFSTEP]\nsimp_all\n[GOAL]\ncase succ.succ\nn m b : ℕ\n⊢ m < succ (succ b) ^ List.length (digits (succ (succ b)) m)\n[PROOFSTEP]\nexact lt_base_pow_length_digits'\n[GOAL]\nn✝ b m n : ℕ\n⊢ ofDigits b (digits b n ++ digits b m) = n + b ^ List.length (digits b n) * m\n[PROOFSTEP]\nrw [ofDigits_append, ofDigits_digits, ofDigits_digits]\n[GOAL]\nn✝ b n : ℕ\n⊢ List.length (digits b n) ≤ List.length (digits b (n + 1))\n[PROOFSTEP]\nrcases Decidable.eq_or_ne n 0 with (rfl | hn)\n[GOAL]\ncase inl\nn b : ℕ\n⊢ List.length (digits b 0) ≤ List.length (digits b (0 + 1))\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\nn✝ b n : ℕ\nhn : n ≠ 0\n⊢ List.length (digits b n) ≤ List.length (digits b (n + 1))\n[PROOFSTEP]\ncases' le_or_lt b 1 with hb hb\n[GOAL]\ncase inr.inl\nn✝ b n : ℕ\nhn : n ≠ 0\nhb : b ≤ 1\n⊢ List.length (digits b n) ≤ List.length (digits b (n + 1))\n[PROOFSTEP]\ninterval_cases b\n[GOAL]\ncase inr.inl.«0»\nn✝ b n : ℕ\nhn : n ≠ 0\nhb : 0 ≤ 1\n⊢ List.length (digits 0 n) ≤ List.length (digits 0 (n + 1))\n[PROOFSTEP]\nsimp_arith [digits_zero_succ', hn]\n[GOAL]\ncase inr.inl.«1»\nn✝ b n : ℕ\nhn : n ≠ 0\nhb : 1 ≤ 1\n⊢ List.length (digits 1 n) ≤ List.length (digits 1 (n + 1))\n[PROOFSTEP]\nsimp_arith [digits_zero_succ', hn]\n[GOAL]\ncase inr.inr\nn✝ b n : ℕ\nhn : n ≠ 0\nhb : 1 < b\n⊢ List.length (digits b n) ≤ List.length (digits b (n + 1))\n[PROOFSTEP]\nsimpa [digits_len, hb, hn] using log_mono_right (le_succ _)\n[GOAL]\nn p q : ℕ\nL : List ℕ\nh : p ≤ q\n⊢ ofDigits p L ≤ ofDigits q L\n[PROOFSTEP]\ninduction' L with _ _ hi\n[GOAL]\ncase nil\nn p q : ℕ\nh : p ≤ q\n⊢ ofDigits p [] ≤ ofDigits q []\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\nn p q : ℕ\nh : p ≤ q\nhead✝ : ℕ\ntail✝ : List ℕ\nhi : ofDigits p tail✝ ≤ ofDigits q tail✝\n⊢ ofDigits p (head✝ :: tail✝) ≤ ofDigits q (head✝ :: tail✝)\n[PROOFSTEP]\nsimp only [ofDigits, cast_id, add_le_add_iff_left]\n[GOAL]\ncase cons\nn p q : ℕ\nh : p ≤ q\nhead✝ : ℕ\ntail✝ : List ℕ\nhi : ofDigits p tail✝ ≤ ofDigits q tail✝\n⊢ p * ofDigits p tail✝ ≤ q * ofDigits q tail✝\n[PROOFSTEP]\nexact Nat.mul_le_mul h hi\n[GOAL]\nn✝ p n : ℕ\n⊢ List.sum (digits p n) ≤ n\n[PROOFSTEP]\ninduction' n with n\n[GOAL]\ncase zero\nn p : ℕ\n⊢ List.sum (digits p zero) ≤ zero\n[PROOFSTEP]\nexact digits_zero _ ▸ Nat.le_refl (List.sum [])\n[GOAL]\ncase succ\nn✝ p n : ℕ\nn_ih✝ : List.sum (digits p n) ≤ n\n⊢ List.sum (digits p (succ n)) ≤ succ n\n[PROOFSTEP]\ninduction' p with p\n[GOAL]\ncase succ.zero\nn✝ p n : ℕ\nn_ih✝¹ : List.sum (digits p n) ≤ n\nn_ih✝ : List.sum (digits zero n) ≤ n\n⊢ List.sum (digits zero (succ n)) ≤ succ n\n[PROOFSTEP]\nrw [digits_zero_succ, List.sum_cons, List.sum_nil, add_zero]\n[GOAL]\ncase succ.succ\nn✝ p✝ n : ℕ\nn_ih✝² : List.sum (digits p✝ n) ≤ n\np : ℕ\nn_ih✝¹ : List.sum (digits p n) ≤ n → List.sum (digits p (succ n)) ≤ succ n\nn_ih✝ : List.sum (digits (succ p) n) ≤ n\n⊢ List.sum (digits (succ p) (succ n)) ≤ succ n\n[PROOFSTEP]\nnth_rw 2 [← ofDigits_digits p.succ n.succ]\n[GOAL]\ncase succ.succ\nn✝ p✝ n : ℕ\nn_ih✝² : List.sum (digits p✝ n) ≤ n\np : ℕ\nn_ih✝¹ : List.sum (digits p n) ≤ n → List.sum (digits p (succ n)) ≤ succ n\nn_ih✝ : List.sum (digits (succ p) n) ≤ n\n⊢ List.sum (digits (succ p) (succ n)) ≤ ofDigits (succ p) (digits (succ p) (succ n))\n[PROOFSTEP]\nrw [← ofDigits_one <| digits p.succ n.succ]\n[GOAL]\ncase succ.succ\nn✝ p✝ n : ℕ\nn_ih✝² : List.sum (digits p✝ n) ≤ n\np : ℕ\nn_ih✝¹ : List.sum (digits p n) ≤ n → List.sum (digits p (succ n)) ≤ succ n\nn_ih✝ : List.sum (digits (succ p) n) ≤ n\n⊢ ofDigits 1 (digits (succ p) (succ n)) ≤ ofDigits (succ p) (digits (succ p) (succ n))\n[PROOFSTEP]\nexact ofDigits_monotone (digits p.succ n.succ) <| Nat.succ_pos p\n[GOAL]\nn b : ℕ\nl : List ℕ\nhl : l ≠ []\nhl2 : List.getLast l hl ≠ 0\n⊢ (b + 2) ^ List.length l ≤ (b + 2) * ofDigits (b + 2) l\n[PROOFSTEP]\nrw [← List.dropLast_append_getLast hl]\n[GOAL]\nn b : ℕ\nl : List ℕ\nhl : l ≠ []\nhl2 : List.getLast l hl ≠ 0\n⊢ (b + 2) ^ List.length (List.dropLast l ++ [List.getLast l hl]) ≤\n    (b + 2) * ofDigits (b + 2) (List.dropLast l ++ [List.getLast l hl])\n[PROOFSTEP]\nsimp only [List.length_append, List.length, zero_add, List.length_dropLast, ofDigits_append, List.length_dropLast,\n  ofDigits_singleton, add_comm (l.length - 1), pow_add, pow_one]\n[GOAL]\nn b : ℕ\nl : List ℕ\nhl : l ≠ []\nhl2 : List.getLast l hl ≠ 0\n⊢ (b + 2) * (b + 2) ^ (List.length l - 1) ≤\n    (b + 2) * (ofDigits (b + 2) (List.dropLast l) + (b + 2) ^ (List.length l - 1) * List.getLast l hl)\n[PROOFSTEP]\napply Nat.mul_le_mul_left\n[GOAL]\ncase h\nn b : ℕ\nl : List ℕ\nhl : l ≠ []\nhl2 : List.getLast l hl ≠ 0\n⊢ (b + 2) ^ (List.length l - 1) ≤ ofDigits (b + 2) (List.dropLast l) + (b + 2) ^ (List.length l - 1) * List.getLast l hl\n[PROOFSTEP]\nrefine' le_trans _ (Nat.le_add_left _ _)\n[GOAL]\ncase h\nn b : ℕ\nl : List ℕ\nhl : l ≠ []\nhl2 : List.getLast l hl ≠ 0\n⊢ (b + 2) ^ (List.length l - 1) ≤ (b + 2) ^ (List.length l - 1) * List.getLast l hl\n[PROOFSTEP]\nhave : 0 < l.getLast hl := by rwa [pos_iff_ne_zero]\n[GOAL]\nn b : ℕ\nl : List ℕ\nhl : l ≠ []\nhl2 : List.getLast l hl ≠ 0\n⊢ 0 < List.getLast l hl\n[PROOFSTEP]\nrwa [pos_iff_ne_zero]\n[GOAL]\ncase h\nn b : ℕ\nl : List ℕ\nhl : l ≠ []\nhl2 : List.getLast l hl ≠ 0\nthis : 0 < List.getLast l hl\n⊢ (b + 2) ^ (List.length l - 1) ≤ (b + 2) ^ (List.length l - 1) * List.getLast l hl\n[PROOFSTEP]\nconvert Nat.mul_le_mul_left ((b + 2) ^ (l.length - 1)) this using 1\n[GOAL]\ncase h.e'_3\nn b : ℕ\nl : List ℕ\nhl : l ≠ []\nhl2 : List.getLast l hl ≠ 0\nthis : 0 < List.getLast l hl\n⊢ (b + 2) ^ (List.length l - 1) = (b + 2) ^ (List.length l - 1) * succ 0\n[PROOFSTEP]\nrw [Nat.mul_one]\n[GOAL]\nn b m : ℕ\nhm : m ≠ 0\n⊢ (b + 2) ^ List.length (digits (b + 2) m) ≤ (b + 2) * m\n[PROOFSTEP]\nhave : digits (b + 2) m ≠ [] := digits_ne_nil_iff_ne_zero.mpr hm\n[GOAL]\nn b m : ℕ\nhm : m ≠ 0\nthis : digits (b + 2) m ≠ []\n⊢ (b + 2) ^ List.length (digits (b + 2) m) ≤ (b + 2) * m\n[PROOFSTEP]\nconvert @pow_length_le_mul_ofDigits b (digits (b + 2) m) this (getLast_digit_ne_zero _ hm)\n[GOAL]\ncase h.e'_4.h.e'_6\nn b m : ℕ\nhm : m ≠ 0\nthis : digits (b + 2) m ≠ []\n⊢ m = ofDigits (b + 2) (digits (b + 2) m)\n[PROOFSTEP]\nrw [ofDigits_digits]\n[GOAL]\nn b m : ℕ\nhb : 1 < b\n⊢ m ≠ 0 → b ^ List.length (digits b m) ≤ b * m\n[PROOFSTEP]\nrcases b with (_ | _ | b)\n[GOAL]\ncase zero\nn m : ℕ\nhb : 1 < zero\n⊢ m ≠ 0 → zero ^ List.length (digits zero m) ≤ zero * m\n[PROOFSTEP]\ntry simp_all\n[GOAL]\ncase zero\nn m : ℕ\nhb : 1 < zero\n⊢ m ≠ 0 → zero ^ List.length (digits zero m) ≤ zero * m\n[PROOFSTEP]\nsimp_all\n[GOAL]\ncase succ.zero\nn m : ℕ\nhb : 1 < succ zero\n⊢ m ≠ 0 → succ zero ^ List.length (digits (succ zero) m) ≤ succ zero * m\n[PROOFSTEP]\ntry simp_all\n[GOAL]\ncase succ.zero\nn m : ℕ\nhb : 1 < succ zero\n⊢ m ≠ 0 → succ zero ^ List.length (digits (succ zero) m) ≤ succ zero * m\n[PROOFSTEP]\nsimp_all\n[GOAL]\ncase succ.succ\nn m b : ℕ\nhb : 1 < succ (succ b)\n⊢ m ≠ 0 → succ (succ b) ^ List.length (digits (succ (succ b)) m) ≤ succ (succ b) * m\n[PROOFSTEP]\ntry simp_all\n[GOAL]\ncase succ.succ\nn m b : ℕ\nhb : 1 < succ (succ b)\n⊢ m ≠ 0 → succ (succ b) ^ List.length (digits (succ (succ b)) m) ≤ succ (succ b) * m\n[PROOFSTEP]\nsimp_all\n[GOAL]\ncase succ.succ\nn m b : ℕ\n⊢ ¬m = 0 → succ (succ b) ^ List.length (digits (succ (succ b)) m) ≤ succ (succ b) * m\n[PROOFSTEP]\nexact base_pow_length_digits_le' b m\n[GOAL]\nn p : ℕ\nhpos : 0 < p\ndigits : List ℕ\nw₁ : ∀ (l : ℕ), l ∈ digits → l < p\n⊢ ofDigits p digits / p = ofDigits p (List.tail digits)\n[PROOFSTEP]\ninduction' digits with hd tl\n[GOAL]\ncase nil\nn p : ℕ\nhpos : 0 < p\ndigits : List ℕ\nw₁✝ : ∀ (l : ℕ), l ∈ digits → l < p\nw₁ : ∀ (l : ℕ), l ∈ [] → l < p\n⊢ ofDigits p [] / p = ofDigits p (List.tail [])\n[PROOFSTEP]\nsimp [ofDigits]\n[GOAL]\ncase cons\nn p : ℕ\nhpos : 0 < p\ndigits : List ℕ\nw₁✝ : ∀ (l : ℕ), l ∈ digits → l < p\nhd : ℕ\ntl : List ℕ\ntail_ih✝ : (∀ (l : ℕ), l ∈ tl → l < p) → ofDigits p tl / p = ofDigits p (List.tail tl)\nw₁ : ∀ (l : ℕ), l ∈ hd :: tl → l < p\n⊢ ofDigits p (hd :: tl) / p = ofDigits p (List.tail (hd :: tl))\n[PROOFSTEP]\nrefine' Eq.trans (add_mul_div_left hd _ hpos) _\n[GOAL]\ncase cons\nn p : ℕ\nhpos : 0 < p\ndigits : List ℕ\nw₁✝ : ∀ (l : ℕ), l ∈ digits → l < p\nhd : ℕ\ntl : List ℕ\ntail_ih✝ : (∀ (l : ℕ), l ∈ tl → l < p) → ofDigits p tl / p = ofDigits p (List.tail tl)\nw₁ : ∀ (l : ℕ), l ∈ hd :: tl → l < p\n⊢ hd / p + ofDigits p tl = ofDigits p (List.tail (hd :: tl))\n[PROOFSTEP]\nrw [Nat.div_eq_zero <| w₁ _ <| List.mem_cons_self _ _, zero_add]\n[GOAL]\ncase cons\nn p : ℕ\nhpos : 0 < p\ndigits : List ℕ\nw₁✝ : ∀ (l : ℕ), l ∈ digits → l < p\nhd : ℕ\ntl : List ℕ\ntail_ih✝ : (∀ (l : ℕ), l ∈ tl → l < p) → ofDigits p tl / p = ofDigits p (List.tail tl)\nw₁ : ∀ (l : ℕ), l ∈ hd :: tl → l < p\n⊢ ofDigits p tl = ofDigits p (List.tail (hd :: tl))\n[PROOFSTEP]\nrfl\n[GOAL]\nn p i : ℕ\nhpos : 0 < p\ndigits : List ℕ\nw₁ : ∀ (l : ℕ), l ∈ digits → l < p\n⊢ ofDigits p digits / p ^ i = ofDigits p (List.drop i digits)\n[PROOFSTEP]\ninduction' i with i hi\n[GOAL]\ncase zero\nn p : ℕ\nhpos : 0 < p\ndigits : List ℕ\nw₁ : ∀ (l : ℕ), l ∈ digits → l < p\n⊢ ofDigits p digits / p ^ zero = ofDigits p (List.drop zero digits)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\nn p : ℕ\nhpos : 0 < p\ndigits : List ℕ\nw₁ : ∀ (l : ℕ), l ∈ digits → l < p\ni : ℕ\nhi : ofDigits p digits / p ^ i = ofDigits p (List.drop i digits)\n⊢ ofDigits p digits / p ^ succ i = ofDigits p (List.drop (succ i) digits)\n[PROOFSTEP]\nrw [Nat.pow_succ, ← Nat.div_div_eq_div_mul, hi,\n  ofDigits_div_eq_ofDigits_tail hpos (List.drop i digits) <| fun x hx ↦ w₁ x <| List.mem_of_mem_drop hx, ←\n  List.drop_one, List.drop_drop, add_comm]\n[GOAL]\nn✝ p i n : ℕ\nh : 2 ≤ p\n⊢ n / p ^ i = ofDigits p (List.drop i (digits p n))\n[PROOFSTEP]\nconvert ofDigits_div_pow_eq_ofDigits_drop i (zero_lt_of_lt h) (p.digits n) (fun l hl ↦ digits_lt_base h hl)\n[GOAL]\ncase h.e'_2.h.e'_5\nn✝ p i n : ℕ\nh : 2 ≤ p\n⊢ n = ofDigits p (digits p n)\n[PROOFSTEP]\nexact (ofDigits_digits p n).symm\n[GOAL]\nn p : ℕ\nL : List ℕ\nh_nonempty : L ≠ []\nh_ne_zero : List.getLast L h_nonempty ≠ 0\nh_lt : ∀ (l : ℕ), l ∈ L → l < p\n⊢ (p - 1) * ∑ i in range (List.length L), ofDigits p L / p ^ succ i = ofDigits p L - List.sum L\n[PROOFSTEP]\nobtain h | rfl | h : 1 < p ∨ 1 = p ∨ p < 1 := trichotomous 1 p\n[GOAL]\ncase inl\nn p : ℕ\nL : List ℕ\nh_nonempty : L ≠ []\nh_ne_zero : List.getLast L h_nonempty ≠ 0\nh_lt : ∀ (l : ℕ), l ∈ L → l < p\nh : 1 < p\n⊢ (p - 1) * ∑ i in range (List.length L), ofDigits p L / p ^ succ i = ofDigits p L - List.sum L\n[PROOFSTEP]\ninduction' L with hd tl ih\n[GOAL]\ncase inl.nil\nn p : ℕ\nL : List ℕ\nh_nonempty✝ : L ≠ []\nh_ne_zero✝ : List.getLast L h_nonempty✝ ≠ 0\nh_lt✝ : ∀ (l : ℕ), l ∈ L → l < p\nh : 1 < p\nh_nonempty : [] ≠ []\nh_ne_zero : List.getLast [] h_nonempty ≠ 0\nh_lt : ∀ (l : ℕ), l ∈ [] → l < p\n⊢ (p - 1) * ∑ i in range (List.length []), ofDigits p [] / p ^ succ i = ofDigits p [] - List.sum []\n[PROOFSTEP]\nsimp [ofDigits]\n[GOAL]\ncase inl.cons\nn p : ℕ\nL : List ℕ\nh_nonempty✝ : L ≠ []\nh_ne_zero✝ : List.getLast L h_nonempty✝ ≠ 0\nh_lt✝ : ∀ (l : ℕ), l ∈ L → l < p\nh : 1 < p\nhd : ℕ\ntl : List ℕ\nih :\n  ∀ {h_nonempty : tl ≠ []},\n    List.getLast tl h_nonempty ≠ 0 →\n      (∀ (l : ℕ), l ∈ tl → l < p) →\n        (p - 1) * ∑ i in range (List.length tl), ofDigits p tl / p ^ succ i = ofDigits p tl - List.sum tl\nh_nonempty : hd :: tl ≠ []\nh_ne_zero : List.getLast (hd :: tl) h_nonempty ≠ 0\nh_lt : ∀ (l : ℕ), l ∈ hd :: tl → l < p\n⊢ (p - 1) * ∑ i in range (List.length (hd :: tl)), ofDigits p (hd :: tl) / p ^ succ i =\n    ofDigits p (hd :: tl) - List.sum (hd :: tl)\n[PROOFSTEP]\nsimp only [List.length_cons, List.sum_cons, self_div_pow_eq_ofDigits_drop _ _ h,\n  digits_ofDigits p h (hd :: tl) h_lt (fun _ => h_ne_zero)]\n[GOAL]\ncase inl.cons\nn p : ℕ\nL : List ℕ\nh_nonempty✝ : L ≠ []\nh_ne_zero✝ : List.getLast L h_nonempty✝ ≠ 0\nh_lt✝ : ∀ (l : ℕ), l ∈ L → l < p\nh : 1 < p\nhd : ℕ\ntl : List ℕ\nih :\n  ∀ {h_nonempty : tl ≠ []},\n    List.getLast tl h_nonempty ≠ 0 →\n      (∀ (l : ℕ), l ∈ tl → l < p) →\n        (p - 1) * ∑ i in range (List.length tl), ofDigits p tl / p ^ succ i = ofDigits p tl - List.sum tl\nh_nonempty : hd :: tl ≠ []\nh_ne_zero : List.getLast (hd :: tl) h_nonempty ≠ 0\nh_lt : ∀ (l : ℕ), l ∈ hd :: tl → l < p\n⊢ (p - 1) * ∑ x in range (succ (List.length tl)), ofDigits p (List.drop (succ x) (hd :: tl)) =\n    ofDigits p (hd :: tl) - (hd + List.sum tl)\n[PROOFSTEP]\nsimp only [ofDigits]\n[GOAL]\ncase inl.cons\nn p : ℕ\nL : List ℕ\nh_nonempty✝ : L ≠ []\nh_ne_zero✝ : List.getLast L h_nonempty✝ ≠ 0\nh_lt✝ : ∀ (l : ℕ), l ∈ L → l < p\nh : 1 < p\nhd : ℕ\ntl : List ℕ\nih :\n  ∀ {h_nonempty : tl ≠ []},\n    List.getLast tl h_nonempty ≠ 0 →\n      (∀ (l : ℕ), l ∈ tl → l < p) →\n        (p - 1) * ∑ i in range (List.length tl), ofDigits p tl / p ^ succ i = ofDigits p tl - List.sum tl\nh_nonempty : hd :: tl ≠ []\nh_ne_zero : List.getLast (hd :: tl) h_nonempty ≠ 0\nh_lt : ∀ (l : ℕ), l ∈ hd :: tl → l < p\n⊢ (p - 1) * ∑ x in range (succ (List.length tl)), ofDigits p (List.drop (succ x) (hd :: tl)) =\n    ↑hd + p * ofDigits p tl - (hd + List.sum tl)\n[PROOFSTEP]\nrw [sum_range_succ, Nat.cast_id]\n[GOAL]\ncase inl.cons\nn p : ℕ\nL : List ℕ\nh_nonempty✝ : L ≠ []\nh_ne_zero✝ : List.getLast L h_nonempty✝ ≠ 0\nh_lt✝ : ∀ (l : ℕ), l ∈ L → l < p\nh : 1 < p\nhd : ℕ\ntl : List ℕ\nih :\n  ∀ {h_nonempty : tl ≠ []},\n    List.getLast tl h_nonempty ≠ 0 →\n      (∀ (l : ℕ), l ∈ tl → l < p) →\n        (p - 1) * ∑ i in range (List.length tl), ofDigits p tl / p ^ succ i = ofDigits p tl - List.sum tl\nh_nonempty : hd :: tl ≠ []\nh_ne_zero : List.getLast (hd :: tl) h_nonempty ≠ 0\nh_lt : ∀ (l : ℕ), l ∈ hd :: tl → l < p\n⊢ (p - 1) *\n      (∑ x in range (List.length tl), ofDigits p (List.drop (succ x) (hd :: tl)) +\n        ofDigits p (List.drop (succ (List.length tl)) (hd :: tl))) =\n    hd + p * ofDigits p tl - (hd + List.sum tl)\n[PROOFSTEP]\nsimp only [List.drop, List.drop_length]\n[GOAL]\ncase inl.cons\nn p : ℕ\nL : List ℕ\nh_nonempty✝ : L ≠ []\nh_ne_zero✝ : List.getLast L h_nonempty✝ ≠ 0\nh_lt✝ : ∀ (l : ℕ), l ∈ L → l < p\nh : 1 < p\nhd : ℕ\ntl : List ℕ\nih :\n  ∀ {h_nonempty : tl ≠ []},\n    List.getLast tl h_nonempty ≠ 0 →\n      (∀ (l : ℕ), l ∈ tl → l < p) →\n        (p - 1) * ∑ i in range (List.length tl), ofDigits p tl / p ^ succ i = ofDigits p tl - List.sum tl\nh_nonempty : hd :: tl ≠ []\nh_ne_zero : List.getLast (hd :: tl) h_nonempty ≠ 0\nh_lt : ∀ (l : ℕ), l ∈ hd :: tl → l < p\n⊢ (p - 1) * (∑ x in range (List.length tl), ofDigits p (List.drop x tl) + ofDigits p []) =\n    hd + p * ofDigits p tl - (hd + List.sum tl)\n[PROOFSTEP]\nobtain rfl | h' := em <| tl = []\n[GOAL]\ncase inl.cons.inl\nn p : ℕ\nL : List ℕ\nh_nonempty✝ : L ≠ []\nh_ne_zero✝ : List.getLast L h_nonempty✝ ≠ 0\nh_lt✝ : ∀ (l : ℕ), l ∈ L → l < p\nh : 1 < p\nhd : ℕ\nih :\n  ∀ {h_nonempty : [] ≠ []},\n    List.getLast [] h_nonempty ≠ 0 →\n      (∀ (l : ℕ), l ∈ [] → l < p) →\n        (p - 1) * ∑ i in range (List.length []), ofDigits p [] / p ^ succ i = ofDigits p [] - List.sum []\nh_nonempty : [hd] ≠ []\nh_ne_zero : List.getLast [hd] h_nonempty ≠ 0\nh_lt : ∀ (l : ℕ), l ∈ [hd] → l < p\n⊢ (p - 1) * (∑ x in range (List.length []), ofDigits p (List.drop x []) + ofDigits p []) =\n    hd + p * ofDigits p [] - (hd + List.sum [])\n[PROOFSTEP]\nsimp [ofDigits]\n[GOAL]\ncase inl.cons.inr\nn p : ℕ\nL : List ℕ\nh_nonempty✝ : L ≠ []\nh_ne_zero✝ : List.getLast L h_nonempty✝ ≠ 0\nh_lt✝ : ∀ (l : ℕ), l ∈ L → l < p\nh : 1 < p\nhd : ℕ\ntl : List ℕ\nih :\n  ∀ {h_nonempty : tl ≠ []},\n    List.getLast tl h_nonempty ≠ 0 →\n      (∀ (l : ℕ), l ∈ tl → l < p) →\n        (p - 1) * ∑ i in range (List.length tl), ofDigits p tl / p ^ succ i = ofDigits p tl - List.sum tl\nh_nonempty : hd :: tl ≠ []\nh_ne_zero : List.getLast (hd :: tl) h_nonempty ≠ 0\nh_lt : ∀ (l : ℕ), l ∈ hd :: tl → l < p\nh' : ¬tl = []\n⊢ (p - 1) * (∑ x in range (List.length tl), ofDigits p (List.drop x tl) + ofDigits p []) =\n    hd + p * ofDigits p tl - (hd + List.sum tl)\n[PROOFSTEP]\nhave w₁' := fun l hl ↦ h_lt l <| List.mem_cons_of_mem hd hl\n[GOAL]\ncase inl.cons.inr\nn p : ℕ\nL : List ℕ\nh_nonempty✝ : L ≠ []\nh_ne_zero✝ : List.getLast L h_nonempty✝ ≠ 0\nh_lt✝ : ∀ (l : ℕ), l ∈ L → l < p\nh : 1 < p\nhd : ℕ\ntl : List ℕ\nih :\n  ∀ {h_nonempty : tl ≠ []},\n    List.getLast tl h_nonempty ≠ 0 →\n      (∀ (l : ℕ), l ∈ tl → l < p) →\n        (p - 1) * ∑ i in range (List.length tl), ofDigits p tl / p ^ succ i = ofDigits p tl - List.sum tl\nh_nonempty : hd :: tl ≠ []\nh_ne_zero : List.getLast (hd :: tl) h_nonempty ≠ 0\nh_lt : ∀ (l : ℕ), l ∈ hd :: tl → l < p\nh' : ¬tl = []\nw₁' : ∀ (l : ℕ), l ∈ tl → l < p\n⊢ (p - 1) * (∑ x in range (List.length tl), ofDigits p (List.drop x tl) + ofDigits p []) =\n    hd + p * ofDigits p tl - (hd + List.sum tl)\n[PROOFSTEP]\nhave w₂' := fun (h : tl ≠ []) ↦ (List.getLast_cons h) ▸ h_ne_zero\n[GOAL]\ncase inl.cons.inr\nn p : ℕ\nL : List ℕ\nh_nonempty✝ : L ≠ []\nh_ne_zero✝ : List.getLast L h_nonempty✝ ≠ 0\nh_lt✝ : ∀ (l : ℕ), l ∈ L → l < p\nh : 1 < p\nhd : ℕ\ntl : List ℕ\nih :\n  ∀ {h_nonempty : tl ≠ []},\n    List.getLast tl h_nonempty ≠ 0 →\n      (∀ (l : ℕ), l ∈ tl → l < p) →\n        (p - 1) * ∑ i in range (List.length tl), ofDigits p tl / p ^ succ i = ofDigits p tl - List.sum tl\nh_nonempty : hd :: tl ≠ []\nh_ne_zero : List.getLast (hd :: tl) h_nonempty ≠ 0\nh_lt : ∀ (l : ℕ), l ∈ hd :: tl → l < p\nh' : ¬tl = []\nw₁' : ∀ (l : ℕ), l ∈ tl → l < p\nw₂' : ∀ (h : tl ≠ []), List.getLast tl h ≠ 0\n⊢ (p - 1) * (∑ x in range (List.length tl), ofDigits p (List.drop x tl) + ofDigits p []) =\n    hd + p * ofDigits p tl - (hd + List.sum tl)\n[PROOFSTEP]\nhave ih := ih (w₂' h') w₁'\n[GOAL]\ncase inl.cons.inr\nn p : ℕ\nL : List ℕ\nh_nonempty✝ : L ≠ []\nh_ne_zero✝ : List.getLast L h_nonempty✝ ≠ 0\nh_lt✝ : ∀ (l : ℕ), l ∈ L → l < p\nh : 1 < p\nhd : ℕ\ntl : List ℕ\nih✝ :\n  ∀ {h_nonempty : tl ≠ []},\n    List.getLast tl h_nonempty ≠ 0 →\n      (∀ (l : ℕ), l ∈ tl → l < p) →\n        (p - 1) * ∑ i in range (List.length tl), ofDigits p tl / p ^ succ i = ofDigits p tl - List.sum tl\nh_nonempty : hd :: tl ≠ []\nh_ne_zero : List.getLast (hd :: tl) h_nonempty ≠ 0\nh_lt : ∀ (l : ℕ), l ∈ hd :: tl → l < p\nh' : ¬tl = []\nw₁' : ∀ (l : ℕ), l ∈ tl → l < p\nw₂' : ∀ (h : tl ≠ []), List.getLast tl h ≠ 0\nih : (p - 1) * ∑ i in range (List.length tl), ofDigits p tl / p ^ succ i = ofDigits p tl - List.sum tl\n⊢ (p - 1) * (∑ x in range (List.length tl), ofDigits p (List.drop x tl) + ofDigits p []) =\n    hd + p * ofDigits p tl - (hd + List.sum tl)\n[PROOFSTEP]\nsimp only [self_div_pow_eq_ofDigits_drop _ _ h, digits_ofDigits p h tl w₁' w₂', succ_eq_one_add] at ih \n[GOAL]\ncase inl.cons.inr\nn p : ℕ\nL : List ℕ\nh_nonempty✝ : L ≠ []\nh_ne_zero✝ : List.getLast L h_nonempty✝ ≠ 0\nh_lt✝ : ∀ (l : ℕ), l ∈ L → l < p\nh : 1 < p\nhd : ℕ\ntl : List ℕ\nih✝ :\n  ∀ {h_nonempty : tl ≠ []},\n    List.getLast tl h_nonempty ≠ 0 →\n      (∀ (l : ℕ), l ∈ tl → l < p) →\n        (p - 1) * ∑ i in range (List.length tl), ofDigits p tl / p ^ succ i = ofDigits p tl - List.sum tl\nh_nonempty : hd :: tl ≠ []\nh_ne_zero : List.getLast (hd :: tl) h_nonempty ≠ 0\nh_lt : ∀ (l : ℕ), l ∈ hd :: tl → l < p\nh' : ¬tl = []\nw₁' : ∀ (l : ℕ), l ∈ tl → l < p\nw₂' : ∀ (h : tl ≠ []), List.getLast tl h ≠ 0\nih : (p - 1) * ∑ x in range (List.length tl), ofDigits p (List.drop (1 + x) tl) = ofDigits p tl - List.sum tl\n⊢ (p - 1) * (∑ x in range (List.length tl), ofDigits p (List.drop x tl) + ofDigits p []) =\n    hd + p * ofDigits p tl - (hd + List.sum tl)\n[PROOFSTEP]\nhave := @sum_singleton _ _ tl.length (fun x => ofDigits p <| tl.drop x) _\n[GOAL]\ncase inl.cons.inr\nn p : ℕ\nL : List ℕ\nh_nonempty✝ : L ≠ []\nh_ne_zero✝ : List.getLast L h_nonempty✝ ≠ 0\nh_lt✝ : ∀ (l : ℕ), l ∈ L → l < p\nh : 1 < p\nhd : ℕ\ntl : List ℕ\nih✝ :\n  ∀ {h_nonempty : tl ≠ []},\n    List.getLast tl h_nonempty ≠ 0 →\n      (∀ (l : ℕ), l ∈ tl → l < p) →\n        (p - 1) * ∑ i in range (List.length tl), ofDigits p tl / p ^ succ i = ofDigits p tl - List.sum tl\nh_nonempty : hd :: tl ≠ []\nh_ne_zero : List.getLast (hd :: tl) h_nonempty ≠ 0\nh_lt : ∀ (l : ℕ), l ∈ hd :: tl → l < p\nh' : ¬tl = []\nw₁' : ∀ (l : ℕ), l ∈ tl → l < p\nw₂' : ∀ (h : tl ≠ []), List.getLast tl h ≠ 0\nih : (p - 1) * ∑ x in range (List.length tl), ofDigits p (List.drop (1 + x) tl) = ofDigits p tl - List.sum tl\nthis : ∑ x in {List.length tl}, ofDigits p (List.drop x tl) = ofDigits p (List.drop (List.length tl) tl)\n⊢ (p - 1) * (∑ x in range (List.length tl), ofDigits p (List.drop x tl) + ofDigits p []) =\n    hd + p * ofDigits p tl - (hd + List.sum tl)\n[PROOFSTEP]\nrw [← Ico_succ_singleton, List.drop_length, ofDigits] at this \n[GOAL]\ncase inl.cons.inr\nn p : ℕ\nL : List ℕ\nh_nonempty✝ : L ≠ []\nh_ne_zero✝ : List.getLast L h_nonempty✝ ≠ 0\nh_lt✝ : ∀ (l : ℕ), l ∈ L → l < p\nh : 1 < p\nhd : ℕ\ntl : List ℕ\nih✝ :\n  ∀ {h_nonempty : tl ≠ []},\n    List.getLast tl h_nonempty ≠ 0 →\n      (∀ (l : ℕ), l ∈ tl → l < p) →\n        (p - 1) * ∑ i in range (List.length tl), ofDigits p tl / p ^ succ i = ofDigits p tl - List.sum tl\nh_nonempty : hd :: tl ≠ []\nh_ne_zero : List.getLast (hd :: tl) h_nonempty ≠ 0\nh_lt : ∀ (l : ℕ), l ∈ hd :: tl → l < p\nh' : ¬tl = []\nw₁' : ∀ (l : ℕ), l ∈ tl → l < p\nw₂' : ∀ (h : tl ≠ []), List.getLast tl h ≠ 0\nih : (p - 1) * ∑ x in range (List.length tl), ofDigits p (List.drop (1 + x) tl) = ofDigits p tl - List.sum tl\nthis : ∑ x in Ico (List.length tl) (List.length tl + 1), ofDigits p (List.drop x tl) = 0\n⊢ (p - 1) * (∑ x in range (List.length tl), ofDigits p (List.drop x tl) + ofDigits p []) =\n    hd + p * ofDigits p tl - (hd + List.sum tl)\n[PROOFSTEP]\nhave h₁ : 1 ≤ tl.length := List.length_pos.mpr h'\n[GOAL]\ncase inl.cons.inr\nn p : ℕ\nL : List ℕ\nh_nonempty✝ : L ≠ []\nh_ne_zero✝ : List.getLast L h_nonempty✝ ≠ 0\nh_lt✝ : ∀ (l : ℕ), l ∈ L → l < p\nh : 1 < p\nhd : ℕ\ntl : List ℕ\nih✝ :\n  ∀ {h_nonempty : tl ≠ []},\n    List.getLast tl h_nonempty ≠ 0 →\n      (∀ (l : ℕ), l ∈ tl → l < p) →\n        (p - 1) * ∑ i in range (List.length tl), ofDigits p tl / p ^ succ i = ofDigits p tl - List.sum tl\nh_nonempty : hd :: tl ≠ []\nh_ne_zero : List.getLast (hd :: tl) h_nonempty ≠ 0\nh_lt : ∀ (l : ℕ), l ∈ hd :: tl → l < p\nh' : ¬tl = []\nw₁' : ∀ (l : ℕ), l ∈ tl → l < p\nw₂' : ∀ (h : tl ≠ []), List.getLast tl h ≠ 0\nih : (p - 1) * ∑ x in range (List.length tl), ofDigits p (List.drop (1 + x) tl) = ofDigits p tl - List.sum tl\nthis : ∑ x in Ico (List.length tl) (List.length tl + 1), ofDigits p (List.drop x tl) = 0\nh₁ : 1 ≤ List.length tl\n⊢ (p - 1) * (∑ x in range (List.length tl), ofDigits p (List.drop x tl) + ofDigits p []) =\n    hd + p * ofDigits p tl - (hd + List.sum tl)\n[PROOFSTEP]\nrw [← sum_range_add_sum_Ico _ <| h₁, ← add_zero (∑ x in Ico _ _, ofDigits p (tl.drop x)), ← this,\n  sum_Ico_consecutive _ h₁ <| le_succ tl.length, ← sum_Ico_add _ 0 tl.length 1, Ico_zero_eq_range, mul_add, mul_add, ih,\n  range_one, sum_singleton, List.drop, ofDigits, mul_zero, add_zero, ←\n  Nat.add_sub_assoc <| sum_le_ofDigits _ <| Nat.le_of_lt h]\n[GOAL]\ncase inl.cons.inr\nn p : ℕ\nL : List ℕ\nh_nonempty✝ : L ≠ []\nh_ne_zero✝ : List.getLast L h_nonempty✝ ≠ 0\nh_lt✝ : ∀ (l : ℕ), l ∈ L → l < p\nh : 1 < p\nhd : ℕ\ntl : List ℕ\nih✝ :\n  ∀ {h_nonempty : tl ≠ []},\n    List.getLast tl h_nonempty ≠ 0 →\n      (∀ (l : ℕ), l ∈ tl → l < p) →\n        (p - 1) * ∑ i in range (List.length tl), ofDigits p tl / p ^ succ i = ofDigits p tl - List.sum tl\nh_nonempty : hd :: tl ≠ []\nh_ne_zero : List.getLast (hd :: tl) h_nonempty ≠ 0\nh_lt : ∀ (l : ℕ), l ∈ hd :: tl → l < p\nh' : ¬tl = []\nw₁' : ∀ (l : ℕ), l ∈ tl → l < p\nw₂' : ∀ (h : tl ≠ []), List.getLast tl h ≠ 0\nih : (p - 1) * ∑ x in range (List.length tl), ofDigits p (List.drop (1 + x) tl) = ofDigits p tl - List.sum tl\nthis : ∑ x in Ico (List.length tl) (List.length tl + 1), ofDigits p (List.drop x tl) = 0\nh₁ : 1 ≤ List.length tl\n⊢ (p - 1) * ofDigits p tl + ofDigits p tl - List.sum tl = hd + p * ofDigits p tl - (hd + List.sum tl)\n[PROOFSTEP]\nnth_rw 2 [← one_mul <| ofDigits p tl]\n[GOAL]\ncase inl.cons.inr\nn p : ℕ\nL : List ℕ\nh_nonempty✝ : L ≠ []\nh_ne_zero✝ : List.getLast L h_nonempty✝ ≠ 0\nh_lt✝ : ∀ (l : ℕ), l ∈ L → l < p\nh : 1 < p\nhd : ℕ\ntl : List ℕ\nih✝ :\n  ∀ {h_nonempty : tl ≠ []},\n    List.getLast tl h_nonempty ≠ 0 →\n      (∀ (l : ℕ), l ∈ tl → l < p) →\n        (p - 1) * ∑ i in range (List.length tl), ofDigits p tl / p ^ succ i = ofDigits p tl - List.sum tl\nh_nonempty : hd :: tl ≠ []\nh_ne_zero : List.getLast (hd :: tl) h_nonempty ≠ 0\nh_lt : ∀ (l : ℕ), l ∈ hd :: tl → l < p\nh' : ¬tl = []\nw₁' : ∀ (l : ℕ), l ∈ tl → l < p\nw₂' : ∀ (h : tl ≠ []), List.getLast tl h ≠ 0\nih : (p - 1) * ∑ x in range (List.length tl), ofDigits p (List.drop (1 + x) tl) = ofDigits p tl - List.sum tl\nthis : ∑ x in Ico (List.length tl) (List.length tl + 1), ofDigits p (List.drop x tl) = 0\nh₁ : 1 ≤ List.length tl\n⊢ (p - 1) * ofDigits p tl + 1 * ofDigits p tl - List.sum tl = hd + p * ofDigits p tl - (hd + List.sum tl)\n[PROOFSTEP]\nrw [← add_mul, one_eq_succ_zero, Nat.sub_add_cancel <| zero_lt_of_lt h, Nat.add_sub_add_left]\n[GOAL]\ncase inr.inl\nn : ℕ\nL : List ℕ\nh_nonempty : L ≠ []\nh_ne_zero : List.getLast L h_nonempty ≠ 0\nh_lt : ∀ (l : ℕ), l ∈ L → l < 1\n⊢ (1 - 1) * ∑ i in range (List.length L), ofDigits 1 L / 1 ^ succ i = ofDigits 1 L - List.sum L\n[PROOFSTEP]\nsimp [ofDigits_one]\n[GOAL]\ncase inr.inr\nn p : ℕ\nL : List ℕ\nh_nonempty : L ≠ []\nh_ne_zero : List.getLast L h_nonempty ≠ 0\nh_lt : ∀ (l : ℕ), l ∈ L → l < p\nh : p < 1\n⊢ (p - 1) * ∑ i in range (List.length L), ofDigits p L / p ^ succ i = ofDigits p L - List.sum L\n[PROOFSTEP]\nsimp [lt_one_iff.mp h]\n[GOAL]\ncase inr.inr\nn p : ℕ\nL : List ℕ\nh_nonempty : L ≠ []\nh_ne_zero : List.getLast L h_nonempty ≠ 0\nh_lt : ∀ (l : ℕ), l ∈ L → l < p\nh : p < 1\n⊢ 0 = ofDigits 0 L - List.sum L\n[PROOFSTEP]\ncases L\n[GOAL]\ncase inr.inr.nil\nn p : ℕ\nh : p < 1\nh_nonempty : [] ≠ []\nh_ne_zero : List.getLast [] h_nonempty ≠ 0\nh_lt : ∀ (l : ℕ), l ∈ [] → l < p\n⊢ 0 = ofDigits 0 [] - List.sum []\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr.inr.cons\nn p : ℕ\nh : p < 1\nhead✝ : ℕ\ntail✝ : List ℕ\nh_nonempty : head✝ :: tail✝ ≠ []\nh_ne_zero : List.getLast (head✝ :: tail✝) h_nonempty ≠ 0\nh_lt : ∀ (l : ℕ), l ∈ head✝ :: tail✝ → l < p\n⊢ 0 = ofDigits 0 (head✝ :: tail✝) - List.sum (head✝ :: tail✝)\n[PROOFSTEP]\nsimp [ofDigits]\n[GOAL]\nn✝ p n : ℕ\n⊢ (p - 1) * ∑ i in range (succ (log p n)), n / p ^ succ i = n - List.sum (digits p n)\n[PROOFSTEP]\nobtain h | rfl | h : 1 < p ∨ 1 = p ∨ p < 1 := trichotomous 1 p\n[GOAL]\ncase inl\nn✝ p n : ℕ\nh : 1 < p\n⊢ (p - 1) * ∑ i in range (succ (log p n)), n / p ^ succ i = n - List.sum (digits p n)\n[PROOFSTEP]\nrcases eq_or_ne n 0 with rfl | hn\n[GOAL]\ncase inl.inl\nn p : ℕ\nh : 1 < p\n⊢ (p - 1) * ∑ i in range (succ (log p 0)), 0 / p ^ succ i = 0 - List.sum (digits p 0)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inl.inr\nn✝ p n : ℕ\nh : 1 < p\nhn : n ≠ 0\n⊢ (p - 1) * ∑ i in range (succ (log p n)), n / p ^ succ i = n - List.sum (digits p n)\n[PROOFSTEP]\nconvert\n  sub_one_mul_sum_div_pow_eq_sub_sum_digits (p.digits n) (getLast_digit_ne_zero p hn) <| (fun l a ↦ digits_lt_base h a)\n[GOAL]\ncase h.e'_2.h.e'_6.h.h.e'_1\nn✝ p n : ℕ\nh : 1 < p\nhn : n ≠ 0\n⊢ succ (log p n) = List.length (digits p n)\n[PROOFSTEP]\nrefine' (digits_len p n h hn).symm\n[GOAL]\ncase h.e'_2.h.e'_6.a.h.e'_5\nn✝ p n : ℕ\nh : 1 < p\nhn : n ≠ 0\nx✝ : ℕ\na✝ : x✝ ∈ range (List.length (digits p n))\n⊢ n = ofDigits p (digits p n)\ncase h.e'_3.h.e'_5 n✝ p n : ℕ h : 1 < p hn : n ≠ 0 ⊢ n = ofDigits p (digits p n)\n[PROOFSTEP]\nall_goals exact (ofDigits_digits p n).symm\n[GOAL]\ncase h.e'_2.h.e'_6.a.h.e'_5\nn✝ p n : ℕ\nh : 1 < p\nhn : n ≠ 0\nx✝ : ℕ\na✝ : x✝ ∈ range (List.length (digits p n))\n⊢ n = ofDigits p (digits p n)\n[PROOFSTEP]\nexact (ofDigits_digits p n).symm\n[GOAL]\ncase h.e'_3.h.e'_5\nn✝ p n : ℕ\nh : 1 < p\nhn : n ≠ 0\n⊢ n = ofDigits p (digits p n)\n[PROOFSTEP]\nexact (ofDigits_digits p n).symm\n[GOAL]\ncase inr.inl\nn✝ n : ℕ\n⊢ (1 - 1) * ∑ i in range (succ (log 1 n)), n / 1 ^ succ i = n - List.sum (digits 1 n)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr.inr\nn✝ p n : ℕ\nh : p < 1\n⊢ (p - 1) * ∑ i in range (succ (log p n)), n / p ^ succ i = n - List.sum (digits p n)\n[PROOFSTEP]\nsimp [lt_one_iff.mp h]\n[GOAL]\ncase inr.inr\nn✝ p n : ℕ\nh : p < 1\n⊢ 0 = n - List.sum (digits 0 n)\n[PROOFSTEP]\ncases n\n[GOAL]\ncase inr.inr.zero\nn p : ℕ\nh : p < 1\n⊢ 0 = zero - List.sum (digits 0 zero)\ncase inr.inr.succ n p : ℕ h : p < 1 n✝ : ℕ ⊢ 0 = succ n✝ - List.sum (digits 0 (succ n✝))\n[PROOFSTEP]\nall_goals simp\n[GOAL]\ncase inr.inr.zero\nn p : ℕ\nh : p < 1\n⊢ 0 = zero - List.sum (digits 0 zero)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr.inr.succ\nn p : ℕ\nh : p < 1\nn✝ : ℕ\n⊢ 0 = succ n✝ - List.sum (digits 0 (succ n✝))\n[PROOFSTEP]\nsimp\n[GOAL]\nn✝ n : ℕ\n⊢ digits 2 n = List.map (fun b => bif b then 1 else 0) (bits n)\n[PROOFSTEP]\ninduction' n using Nat.binaryRecFromOne with b n h ih\n[GOAL]\ncase z₀\nn : ℕ\n⊢ digits 2 0 = List.map (fun b => bif b then 1 else 0) (bits 0)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase z₁\nn : ℕ\n⊢ digits 2 1 = List.map (fun b => bif b then 1 else 0) (bits 1)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase f\nn✝ : ℕ\nb : Bool\nn : ℕ\nh : n ≠ 0\nih : digits 2 n = List.map (fun b => bif b then 1 else 0) (bits n)\n⊢ digits 2 (bit b n) = List.map (fun b => bif b then 1 else 0) (bits (bit b n))\n[PROOFSTEP]\nrw [bits_append_bit _ _ fun hn => absurd hn h]\n[GOAL]\ncase f\nn✝ : ℕ\nb : Bool\nn : ℕ\nh : n ≠ 0\nih : digits 2 n = List.map (fun b => bif b then 1 else 0) (bits n)\n⊢ digits 2 (bit b n) = List.map (fun b => bif b then 1 else 0) (b :: bits n)\n[PROOFSTEP]\ncases b\n[GOAL]\ncase f.false\nn✝ n : ℕ\nh : n ≠ 0\nih : digits 2 n = List.map (fun b => bif b then 1 else 0) (bits n)\n⊢ digits 2 (bit false n) = List.map (fun b => bif b then 1 else 0) (false :: bits n)\n[PROOFSTEP]\nrw [digits_def' one_lt_two]\n[GOAL]\ncase f.false\nn✝ n : ℕ\nh : n ≠ 0\nih : digits 2 n = List.map (fun b => bif b then 1 else 0) (bits n)\n⊢ bit false n % 2 :: digits 2 (bit false n / 2) = List.map (fun b => bif b then 1 else 0) (false :: bits n)\n[PROOFSTEP]\nsimpa [Nat.bit, Nat.bit0_val n]\n[GOAL]\ncase f.false\nn✝ n : ℕ\nh : n ≠ 0\nih : digits 2 n = List.map (fun b => bif b then 1 else 0) (bits n)\n⊢ 0 < bit false n\n[PROOFSTEP]\nsimpa [pos_iff_ne_zero, bit_eq_zero_iff]\n[GOAL]\ncase f.true\nn✝ n : ℕ\nh : n ≠ 0\nih : digits 2 n = List.map (fun b => bif b then 1 else 0) (bits n)\n⊢ digits 2 (bit true n) = List.map (fun b => bif b then 1 else 0) (true :: bits n)\n[PROOFSTEP]\nsimpa [Nat.bit, Nat.bit1_val n, add_comm, digits_add 2 one_lt_two 1 n]\n[GOAL]\nn : ℕ\nα : Type u_1\ninst✝ : CommRing α\na b k : α\nh : k ∣ a - b\nL : List ℕ\n⊢ k ∣ ofDigits a L - ofDigits b L\n[PROOFSTEP]\ninduction' L with d L ih\n[GOAL]\ncase nil\nn : ℕ\nα : Type u_1\ninst✝ : CommRing α\na b k : α\nh : k ∣ a - b\n⊢ k ∣ ofDigits a [] - ofDigits b []\n[PROOFSTEP]\nchange k ∣ 0 - 0\n[GOAL]\ncase nil\nn : ℕ\nα : Type u_1\ninst✝ : CommRing α\na b k : α\nh : k ∣ a - b\n⊢ k ∣ 0 - 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\nn : ℕ\nα : Type u_1\ninst✝ : CommRing α\na b k : α\nh : k ∣ a - b\nd : ℕ\nL : List ℕ\nih : k ∣ ofDigits a L - ofDigits b L\n⊢ k ∣ ofDigits a (d :: L) - ofDigits b (d :: L)\n[PROOFSTEP]\nsimp only [ofDigits, add_sub_add_left_eq_sub]\n[GOAL]\ncase cons\nn : ℕ\nα : Type u_1\ninst✝ : CommRing α\na b k : α\nh : k ∣ a - b\nd : ℕ\nL : List ℕ\nih : k ∣ ofDigits a L - ofDigits b L\n⊢ k ∣ a * ofDigits a L - b * ofDigits b L\n[PROOFSTEP]\nexact dvd_mul_sub_mul h ih\n[GOAL]\nn b b' k : ℕ\nh : b ≡ b' [MOD k]\nL : List ℕ\n⊢ ofDigits b L ≡ ofDigits b' L [MOD k]\n[PROOFSTEP]\ninduction' L with d L ih\n[GOAL]\ncase nil\nn b b' k : ℕ\nh : b ≡ b' [MOD k]\n⊢ ofDigits b [] ≡ ofDigits b' [] [MOD k]\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\nn b b' k : ℕ\nh : b ≡ b' [MOD k]\nd : ℕ\nL : List ℕ\nih : ofDigits b L ≡ ofDigits b' L [MOD k]\n⊢ ofDigits b (d :: L) ≡ ofDigits b' (d :: L) [MOD k]\n[PROOFSTEP]\ndsimp [ofDigits]\n[GOAL]\ncase cons\nn b b' k : ℕ\nh : b ≡ b' [MOD k]\nd : ℕ\nL : List ℕ\nih : ofDigits b L ≡ ofDigits b' L [MOD k]\n⊢ d + b * ofDigits b L ≡ d + b' * ofDigits b' L [MOD k]\n[PROOFSTEP]\ndsimp [Nat.ModEq] at *\n[GOAL]\ncase cons\nn b b' k : ℕ\nh : b % k = b' % k\nd : ℕ\nL : List ℕ\nih : ofDigits b L % k = ofDigits b' L % k\n⊢ (d + b * ofDigits b L) % k = (d + b' * ofDigits b' L) % k\n[PROOFSTEP]\nconv_lhs => rw [Nat.add_mod, Nat.mul_mod, h, ih]\n[GOAL]\nn b b' k : ℕ\nh : b % k = b' % k\nd : ℕ\nL : List ℕ\nih : ofDigits b L % k = ofDigits b' L % k\n| (d + b * ofDigits b L) % k\n[PROOFSTEP]\nrw [Nat.add_mod, Nat.mul_mod, h, ih]\n[GOAL]\nn b b' k : ℕ\nh : b % k = b' % k\nd : ℕ\nL : List ℕ\nih : ofDigits b L % k = ofDigits b' L % k\n| (d + b * ofDigits b L) % k\n[PROOFSTEP]\nrw [Nat.add_mod, Nat.mul_mod, h, ih]\n[GOAL]\nn b b' k : ℕ\nh : b % k = b' % k\nd : ℕ\nL : List ℕ\nih : ofDigits b L % k = ofDigits b' L % k\n| (d + b * ofDigits b L) % k\n[PROOFSTEP]\nrw [Nat.add_mod, Nat.mul_mod, h, ih]\n[GOAL]\ncase cons\nn b b' k : ℕ\nh : b % k = b' % k\nd : ℕ\nL : List ℕ\nih : ofDigits b L % k = ofDigits b' L % k\n⊢ (d % k + b' % k * (ofDigits b' L % k) % k) % k = (d + b' * ofDigits b' L) % k\n[PROOFSTEP]\nconv_rhs => rw [Nat.add_mod, Nat.mul_mod]\n[GOAL]\nn b b' k : ℕ\nh : b % k = b' % k\nd : ℕ\nL : List ℕ\nih : ofDigits b L % k = ofDigits b' L % k\n| (d + b' * ofDigits b' L) % k\n[PROOFSTEP]\nrw [Nat.add_mod, Nat.mul_mod]\n[GOAL]\nn b b' k : ℕ\nh : b % k = b' % k\nd : ℕ\nL : List ℕ\nih : ofDigits b L % k = ofDigits b' L % k\n| (d + b' * ofDigits b' L) % k\n[PROOFSTEP]\nrw [Nat.add_mod, Nat.mul_mod]\n[GOAL]\nn b b' k : ℕ\nh : b % k = b' % k\nd : ℕ\nL : List ℕ\nih : ofDigits b L % k = ofDigits b' L % k\n| (d + b' * ofDigits b' L) % k\n[PROOFSTEP]\nrw [Nat.add_mod, Nat.mul_mod]\n[GOAL]\nn : ℕ\nb b' : ℤ\nk : ℕ\nh : b ≡ b' [ZMOD ↑k]\nL : List ℕ\n⊢ ofDigits b L ≡ ofDigits b' L [ZMOD ↑k]\n[PROOFSTEP]\ninduction' L with d L ih\n[GOAL]\ncase nil\nn : ℕ\nb b' : ℤ\nk : ℕ\nh : b ≡ b' [ZMOD ↑k]\n⊢ ofDigits b [] ≡ ofDigits b' [] [ZMOD ↑k]\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\nn : ℕ\nb b' : ℤ\nk : ℕ\nh : b ≡ b' [ZMOD ↑k]\nd : ℕ\nL : List ℕ\nih : ofDigits b L ≡ ofDigits b' L [ZMOD ↑k]\n⊢ ofDigits b (d :: L) ≡ ofDigits b' (d :: L) [ZMOD ↑k]\n[PROOFSTEP]\ndsimp [ofDigits]\n[GOAL]\ncase cons\nn : ℕ\nb b' : ℤ\nk : ℕ\nh : b ≡ b' [ZMOD ↑k]\nd : ℕ\nL : List ℕ\nih : ofDigits b L ≡ ofDigits b' L [ZMOD ↑k]\n⊢ ↑d + b * ofDigits b L ≡ ↑d + b' * ofDigits b' L [ZMOD ↑k]\n[PROOFSTEP]\ndsimp [Int.ModEq] at *\n[GOAL]\ncase cons\nn : ℕ\nb b' : ℤ\nk : ℕ\nh : b % ↑k = b' % ↑k\nd : ℕ\nL : List ℕ\nih : ofDigits b L % ↑k = ofDigits b' L % ↑k\n⊢ (↑d + b * ofDigits b L) % ↑k = (↑d + b' * ofDigits b' L) % ↑k\n[PROOFSTEP]\nconv_lhs => rw [Int.add_emod, Int.mul_emod, h, ih]\n[GOAL]\nn : ℕ\nb b' : ℤ\nk : ℕ\nh : b % ↑k = b' % ↑k\nd : ℕ\nL : List ℕ\nih : ofDigits b L % ↑k = ofDigits b' L % ↑k\n| (↑d + b * ofDigits b L) % ↑k\n[PROOFSTEP]\nrw [Int.add_emod, Int.mul_emod, h, ih]\n[GOAL]\nn : ℕ\nb b' : ℤ\nk : ℕ\nh : b % ↑k = b' % ↑k\nd : ℕ\nL : List ℕ\nih : ofDigits b L % ↑k = ofDigits b' L % ↑k\n| (↑d + b * ofDigits b L) % ↑k\n[PROOFSTEP]\nrw [Int.add_emod, Int.mul_emod, h, ih]\n[GOAL]\nn : ℕ\nb b' : ℤ\nk : ℕ\nh : b % ↑k = b' % ↑k\nd : ℕ\nL : List ℕ\nih : ofDigits b L % ↑k = ofDigits b' L % ↑k\n| (↑d + b * ofDigits b L) % ↑k\n[PROOFSTEP]\nrw [Int.add_emod, Int.mul_emod, h, ih]\n[GOAL]\ncase cons\nn : ℕ\nb b' : ℤ\nk : ℕ\nh : b % ↑k = b' % ↑k\nd : ℕ\nL : List ℕ\nih : ofDigits b L % ↑k = ofDigits b' L % ↑k\n⊢ (↑d % ↑k + b' % ↑k * (ofDigits b' L % ↑k) % ↑k) % ↑k = (↑d + b' * ofDigits b' L) % ↑k\n[PROOFSTEP]\nconv_rhs => rw [Int.add_emod, Int.mul_emod]\n[GOAL]\nn : ℕ\nb b' : ℤ\nk : ℕ\nh : b % ↑k = b' % ↑k\nd : ℕ\nL : List ℕ\nih : ofDigits b L % ↑k = ofDigits b' L % ↑k\n| (↑d + b' * ofDigits b' L) % ↑k\n[PROOFSTEP]\nrw [Int.add_emod, Int.mul_emod]\n[GOAL]\nn : ℕ\nb b' : ℤ\nk : ℕ\nh : b % ↑k = b' % ↑k\nd : ℕ\nL : List ℕ\nih : ofDigits b L % ↑k = ofDigits b' L % ↑k\n| (↑d + b' * ofDigits b' L) % ↑k\n[PROOFSTEP]\nrw [Int.add_emod, Int.mul_emod]\n[GOAL]\nn : ℕ\nb b' : ℤ\nk : ℕ\nh : b % ↑k = b' % ↑k\nd : ℕ\nL : List ℕ\nih : ofDigits b L % ↑k = ofDigits b' L % ↑k\n| (↑d + b' * ofDigits b' L) % ↑k\n[PROOFSTEP]\nrw [Int.add_emod, Int.mul_emod]\n[GOAL]\nn✝ b b' : ℕ\nh : b' % b = 1\nn : ℕ\n⊢ n ≡ List.sum (digits b' n) [MOD b]\n[PROOFSTEP]\nrw [← ofDigits_one]\n[GOAL]\nn✝ b b' : ℕ\nh : b' % b = 1\nn : ℕ\n⊢ n ≡ ofDigits 1 (digits b' n) [MOD b]\n[PROOFSTEP]\nconv =>\n  congr\n  ·skip\n  ·rw [← ofDigits_digits b' n]\n[GOAL]\nn✝ b b' : ℕ\nh : b' % b = 1\nn : ℕ\n| n ≡ ofDigits 1 (digits b' n) [MOD b]\n[PROOFSTEP]\n  congr\n  ·skip\n  ·rw [← ofDigits_digits b' n]\n[GOAL]\nn✝ b b' : ℕ\nh : b' % b = 1\nn : ℕ\n| n ≡ ofDigits 1 (digits b' n) [MOD b]\n[PROOFSTEP]\n  congr\n  ·skip\n  ·rw [← ofDigits_digits b' n]\n[GOAL]\nn✝ b b' : ℕ\nh : b' % b = 1\nn : ℕ\n| n ≡ ofDigits 1 (digits b' n) [MOD b]\n[PROOFSTEP]\ncongr\n[GOAL]\ncase n\nn✝ b b' : ℕ\nh : b' % b = 1\nn : ℕ\n| b\ncase a\nn✝ b b' : ℕ\nh : b' % b = 1\nn : ℕ\n| n\ncase b n✝ b b' : ℕ h : b' % b = 1 n : ℕ | ofDigits 1 (digits b' n)\n[PROOFSTEP]\n·skip\n[GOAL]\ncase n\nn✝ b b' : ℕ\nh : b' % b = 1\nn : ℕ\n| b\n[PROOFSTEP]\nskip\n[GOAL]\ncase n\nn✝ b b' : ℕ\nh : b' % b = 1\nn : ℕ\n| b\n[PROOFSTEP]\nskip\n[GOAL]\ncase n\nn✝ b b' : ℕ\nh : b' % b = 1\nn : ℕ\n| b\n[PROOFSTEP]\nskip\n[GOAL]\ncase a\nn✝ b b' : ℕ\nh : b' % b = 1\nn : ℕ\n| n\ncase b n✝ b b' : ℕ h : b' % b = 1 n : ℕ | ofDigits 1 (digits b' n)\n[PROOFSTEP]\n·rw [← ofDigits_digits b' n]\n[GOAL]\ncase a\nn✝ b b' : ℕ\nh : b' % b = 1\nn : ℕ\n| n\n[PROOFSTEP]\nrw [← ofDigits_digits b' n]\n[GOAL]\ncase a\nn✝ b b' : ℕ\nh : b' % b = 1\nn : ℕ\n| n\n[PROOFSTEP]\nrw [← ofDigits_digits b' n]\n[GOAL]\ncase a\nn✝ b b' : ℕ\nh : b' % b = 1\nn : ℕ\n| n\n[PROOFSTEP]\nrw [← ofDigits_digits b' n]\n[GOAL]\nn✝ b b' : ℕ\nh : b' % b = 1\nn : ℕ\n⊢ ofDigits b' (digits b' n) ≡ ofDigits 1 (digits b' n) [MOD b]\n[PROOFSTEP]\nconvert ofDigits_modEq b' b (digits b' n)\n[GOAL]\ncase h.e'_3.h.e'_3\nn✝ b b' : ℕ\nh : b' % b = 1\nn : ℕ\n⊢ 1 = b' % b\n[PROOFSTEP]\nexact h.symm\n[GOAL]\nn✝ n : ℕ\n⊢ 10 % 3 = 1\n[PROOFSTEP]\nnorm_num\n[GOAL]\nn✝ n : ℕ\n⊢ 10 % 9 = 1\n[PROOFSTEP]\nnorm_num\n[GOAL]\nn✝ b b' : ℕ\nc : ℤ\nh : ↑b' ≡ c [ZMOD ↑b]\nn : ℕ\n⊢ ↑n ≡ ofDigits c (digits b' n) [ZMOD ↑b]\n[PROOFSTEP]\nconv =>\n  congr\n  ·skip\n  ·rw [← ofDigits_digits b' n]\n[GOAL]\nn✝ b b' : ℕ\nc : ℤ\nh : ↑b' ≡ c [ZMOD ↑b]\nn : ℕ\n| ↑n ≡ ofDigits c (digits b' n) [ZMOD ↑b]\n[PROOFSTEP]\n  congr\n  ·skip\n  ·rw [← ofDigits_digits b' n]\n[GOAL]\nn✝ b b' : ℕ\nc : ℤ\nh : ↑b' ≡ c [ZMOD ↑b]\nn : ℕ\n| ↑n ≡ ofDigits c (digits b' n) [ZMOD ↑b]\n[PROOFSTEP]\n  congr\n  ·skip\n  ·rw [← ofDigits_digits b' n]\n[GOAL]\nn✝ b b' : ℕ\nc : ℤ\nh : ↑b' ≡ c [ZMOD ↑b]\nn : ℕ\n| ↑n ≡ ofDigits c (digits b' n) [ZMOD ↑b]\n[PROOFSTEP]\ncongr\n[GOAL]\ncase n\nn✝ b b' : ℕ\nc : ℤ\nh : ↑b' ≡ c [ZMOD ↑b]\nn : ℕ\n| ↑b\ncase a\nn✝ b b' : ℕ\nc : ℤ\nh : ↑b' ≡ c [ZMOD ↑b]\nn : ℕ\n| ↑n\ncase b n✝ b b' : ℕ c : ℤ h : ↑b' ≡ c [ZMOD ↑b] n : ℕ | ofDigits c (digits b' n)\n[PROOFSTEP]\n·skip\n[GOAL]\ncase n\nn✝ b b' : ℕ\nc : ℤ\nh : ↑b' ≡ c [ZMOD ↑b]\nn : ℕ\n| ↑b\n[PROOFSTEP]\nskip\n[GOAL]\ncase n\nn✝ b b' : ℕ\nc : ℤ\nh : ↑b' ≡ c [ZMOD ↑b]\nn : ℕ\n| ↑b\n[PROOFSTEP]\nskip\n[GOAL]\ncase n\nn✝ b b' : ℕ\nc : ℤ\nh : ↑b' ≡ c [ZMOD ↑b]\nn : ℕ\n| ↑b\n[PROOFSTEP]\nskip\n[GOAL]\ncase a\nn✝ b b' : ℕ\nc : ℤ\nh : ↑b' ≡ c [ZMOD ↑b]\nn : ℕ\n| ↑n\ncase b n✝ b b' : ℕ c : ℤ h : ↑b' ≡ c [ZMOD ↑b] n : ℕ | ofDigits c (digits b' n)\n[PROOFSTEP]\n·rw [← ofDigits_digits b' n]\n[GOAL]\ncase a\nn✝ b b' : ℕ\nc : ℤ\nh : ↑b' ≡ c [ZMOD ↑b]\nn : ℕ\n| ↑n\n[PROOFSTEP]\nrw [← ofDigits_digits b' n]\n[GOAL]\ncase a\nn✝ b b' : ℕ\nc : ℤ\nh : ↑b' ≡ c [ZMOD ↑b]\nn : ℕ\n| ↑n\n[PROOFSTEP]\nrw [← ofDigits_digits b' n]\n[GOAL]\ncase a\nn✝ b b' : ℕ\nc : ℤ\nh : ↑b' ≡ c [ZMOD ↑b]\nn : ℕ\n| ↑n\n[PROOFSTEP]\nrw [← ofDigits_digits b' n]\n[GOAL]\nn✝ b b' : ℕ\nc : ℤ\nh : ↑b' ≡ c [ZMOD ↑b]\nn : ℕ\n⊢ ↑(ofDigits b' (digits b' n)) ≡ ofDigits c (digits b' n) [ZMOD ↑b]\n[PROOFSTEP]\nrw [coe_int_ofDigits]\n[GOAL]\nn✝ b b' : ℕ\nc : ℤ\nh : ↑b' ≡ c [ZMOD ↑b]\nn : ℕ\n⊢ ofDigits (↑b') (digits b' n) ≡ ofDigits c (digits b' n) [ZMOD ↑b]\n[PROOFSTEP]\napply ofDigits_zmodeq' _ _ _ h\n[GOAL]\nn✝ n : ℕ\n⊢ ofDigits (-1) [n] = List.alternatingSum (List.map (fun n => ↑n) [n])\n[PROOFSTEP]\nsimp [ofDigits, List.alternatingSum]\n[GOAL]\nn a b : ℕ\nt : List ℕ\n⊢ ofDigits (-1) (a :: b :: t) = List.alternatingSum (List.map (fun n => ↑n) (a :: b :: t))\n[PROOFSTEP]\nsimp only [ofDigits, List.alternatingSum, List.map_cons, ofDigits_neg_one t]\n[GOAL]\nn a b : ℕ\nt : List ℕ\n⊢ ↑a + -1 * (↑b + -1 * List.alternatingSum (List.map (fun n => ↑n) t)) =\n    ↑a + -↑b + List.alternatingSum (List.map (fun n => ↑n) t)\n[PROOFSTEP]\nring\n[GOAL]\nn✝ n : ℕ\n⊢ ↑n ≡ List.alternatingSum (List.map (fun n => ↑n) (digits 10 n)) [ZMOD 11]\n[PROOFSTEP]\nhave t := zmodeq_ofDigits_digits 11 10 (-1 : ℤ) (by unfold Int.ModEq; norm_num) n\n[GOAL]\nn✝ n : ℕ\n⊢ ↑10 ≡ -1 [ZMOD ↑11]\n[PROOFSTEP]\nunfold Int.ModEq\n[GOAL]\nn✝ n : ℕ\n⊢ ↑10 % ↑11 = -1 % ↑11\n[PROOFSTEP]\nnorm_num\n[GOAL]\nn✝ n : ℕ\nt : ↑n ≡ ofDigits (-1) (digits 10 n) [ZMOD ↑11]\n⊢ ↑n ≡ List.alternatingSum (List.map (fun n => ↑n) (digits 10 n)) [ZMOD 11]\n[PROOFSTEP]\nrwa [ofDigits_neg_one] at t \n[GOAL]\nn✝ b b' : ℕ\nh : b' % b = 1\nn : ℕ\n⊢ b ∣ n ↔ b ∣ List.sum (digits b' n)\n[PROOFSTEP]\nrw [← ofDigits_one]\n[GOAL]\nn✝ b b' : ℕ\nh : b' % b = 1\nn : ℕ\n⊢ b ∣ n ↔ b ∣ ofDigits 1 (digits b' n)\n[PROOFSTEP]\nconv_lhs => rw [← ofDigits_digits b' n]\n[GOAL]\nn✝ b b' : ℕ\nh : b' % b = 1\nn : ℕ\n| b ∣ n\n[PROOFSTEP]\nrw [← ofDigits_digits b' n]\n[GOAL]\nn✝ b b' : ℕ\nh : b' % b = 1\nn : ℕ\n| b ∣ n\n[PROOFSTEP]\nrw [← ofDigits_digits b' n]\n[GOAL]\nn✝ b b' : ℕ\nh : b' % b = 1\nn : ℕ\n| b ∣ n\n[PROOFSTEP]\nrw [← ofDigits_digits b' n]\n[GOAL]\nn✝ b b' : ℕ\nh : b' % b = 1\nn : ℕ\n⊢ b ∣ ofDigits b' (digits b' n) ↔ b ∣ ofDigits 1 (digits b' n)\n[PROOFSTEP]\nrw [Nat.dvd_iff_mod_eq_zero, Nat.dvd_iff_mod_eq_zero, ofDigits_mod, h]\n[GOAL]\nn✝ n : ℕ\n⊢ 10 % 3 = 1\n[PROOFSTEP]\nnorm_num\n[GOAL]\nn✝ n : ℕ\n⊢ 10 % 9 = 1\n[PROOFSTEP]\nnorm_num\n[GOAL]\nn✝ b b' : ℕ\nc : ℤ\nh : ↑b ∣ ↑b' - c\nn : ℕ\n⊢ b ∣ n ↔ ↑b ∣ ofDigits c (digits b' n)\n[PROOFSTEP]\nrw [← Int.coe_nat_dvd]\n[GOAL]\nn✝ b b' : ℕ\nc : ℤ\nh : ↑b ∣ ↑b' - c\nn : ℕ\n⊢ ↑b ∣ ↑n ↔ ↑b ∣ ofDigits c (digits b' n)\n[PROOFSTEP]\nexact dvd_iff_dvd_of_dvd_sub (zmodeq_ofDigits_digits b b' c (Int.modEq_iff_dvd.2 h).symm _).symm.dvd\n[GOAL]\nn : ℕ\n⊢ 11 ∣ n ↔ 11 ∣ List.alternatingSum (List.map (fun n => ↑n) (digits 10 n))\n[PROOFSTEP]\nhave t := dvd_iff_dvd_ofDigits 11 10 (-1 : ℤ) (by norm_num) n\n[GOAL]\nn : ℕ\n⊢ ↑11 ∣ ↑10 - -1\n[PROOFSTEP]\nnorm_num\n[GOAL]\nn : ℕ\nt : 11 ∣ n ↔ ↑11 ∣ ofDigits (-1) (digits 10 n)\n⊢ 11 ∣ n ↔ 11 ∣ List.alternatingSum (List.map (fun n => ↑n) (digits 10 n))\n[PROOFSTEP]\nrw [ofDigits_neg_one] at t \n[GOAL]\nn : ℕ\nt : 11 ∣ n ↔ ↑11 ∣ List.alternatingSum (List.map (fun n => ↑n) (digits 10 n))\n⊢ 11 ∣ n ↔ 11 ∣ List.alternatingSum (List.map (fun n => ↑n) (digits 10 n))\n[PROOFSTEP]\nexact t\n[GOAL]\nn : ℕ\np : List.Palindrome (digits 10 n)\nh : Even (List.length (digits 10 n))\n⊢ 11 ∣ n\n[PROOFSTEP]\nlet dig := (digits 10 n).map (Coe.coe : ℕ → ℤ)\n[GOAL]\nn : ℕ\np : List.Palindrome (digits 10 n)\nh : Even (List.length (digits 10 n))\ndig : List ℤ := List.map Coe.coe (digits 10 n)\n⊢ 11 ∣ n\n[PROOFSTEP]\nreplace h : Even dig.length := by rwa [List.length_map]\n[GOAL]\nn : ℕ\np : List.Palindrome (digits 10 n)\nh : Even (List.length (digits 10 n))\ndig : List ℤ := List.map Coe.coe (digits 10 n)\n⊢ Even (List.length dig)\n[PROOFSTEP]\nrwa [List.length_map]\n[GOAL]\nn : ℕ\np : List.Palindrome (digits 10 n)\ndig : List ℤ := List.map Coe.coe (digits 10 n)\nh : Even (List.length dig)\n⊢ 11 ∣ n\n[PROOFSTEP]\nrefine' eleven_dvd_iff.2 ⟨0, (_ : dig.alternatingSum = 0)⟩\n[GOAL]\nn : ℕ\np : List.Palindrome (digits 10 n)\ndig : List ℤ := List.map Coe.coe (digits 10 n)\nh : Even (List.length dig)\n⊢ List.alternatingSum dig = 0\n[PROOFSTEP]\nhave := dig.alternatingSum_reverse\n[GOAL]\nn : ℕ\np : List.Palindrome (digits 10 n)\ndig : List ℤ := List.map Coe.coe (digits 10 n)\nh : Even (List.length dig)\nthis : List.alternatingSum (List.reverse dig) = (-1) ^ (List.length dig + 1) • List.alternatingSum dig\n⊢ List.alternatingSum dig = 0\n[PROOFSTEP]\nrw [(p.map _).reverse_eq, _root_.pow_succ, h.neg_one_pow, mul_one, neg_one_zsmul] at this \n[GOAL]\nn : ℕ\np : List.Palindrome (digits 10 n)\ndig : List ℤ := List.map Coe.coe (digits 10 n)\nh : Even (List.length dig)\nthis : List.alternatingSum (List.map Coe.coe (digits 10 n)) = -List.alternatingSum dig\n⊢ List.alternatingSum dig = 0\n[PROOFSTEP]\nexact eq_zero_of_neg_eq this.symm\n[GOAL]\nn✝ b n m r : ℕ\nl : List ℕ\ne : r + b * m = n\nhr : r < b\nh : digits b m = l ∧ 1 < b ∧ 0 < m\n⊢ digits b n = r :: l ∧ 1 < b ∧ 0 < n\n[PROOFSTEP]\nrcases h with ⟨h, b2, m0⟩\n[GOAL]\ncase intro.intro\nn✝ b n m r : ℕ\nl : List ℕ\ne : r + b * m = n\nhr : r < b\nh : digits b m = l\nb2 : 1 < b\nm0 : 0 < m\n⊢ digits b n = r :: l ∧ 1 < b ∧ 0 < n\n[PROOFSTEP]\nhave b0 : 0 < b := by linarith\n[GOAL]\nn✝ b n m r : ℕ\nl : List ℕ\ne : r + b * m = n\nhr : r < b\nh : digits b m = l\nb2 : 1 < b\nm0 : 0 < m\n⊢ 0 < b\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase intro.intro\nn✝ b n m r : ℕ\nl : List ℕ\ne : r + b * m = n\nhr : r < b\nh : digits b m = l\nb2 : 1 < b\nm0 : 0 < m\nb0 : 0 < b\n⊢ digits b n = r :: l ∧ 1 < b ∧ 0 < n\n[PROOFSTEP]\nhave n0 : 0 < n := by linarith [mul_pos b0 m0]\n[GOAL]\nn✝ b n m r : ℕ\nl : List ℕ\ne : r + b * m = n\nhr : r < b\nh : digits b m = l\nb2 : 1 < b\nm0 : 0 < m\nb0 : 0 < b\n⊢ 0 < n\n[PROOFSTEP]\nlinarith [mul_pos b0 m0]\n[GOAL]\ncase intro.intro\nn✝ b n m r : ℕ\nl : List ℕ\ne : r + b * m = n\nhr : r < b\nh : digits b m = l\nb2 : 1 < b\nm0 : 0 < m\nb0 : 0 < b\nn0 : 0 < n\n⊢ digits b n = r :: l ∧ 1 < b ∧ 0 < n\n[PROOFSTEP]\nrefine' ⟨_, b2, n0⟩\n[GOAL]\ncase intro.intro\nn✝ b n m r : ℕ\nl : List ℕ\ne : r + b * m = n\nhr : r < b\nh : digits b m = l\nb2 : 1 < b\nm0 : 0 < m\nb0 : 0 < b\nn0 : 0 < n\n⊢ digits b n = r :: l\n[PROOFSTEP]\nobtain ⟨rfl, rfl⟩ := (Nat.div_mod_unique b0).2 ⟨e, hr⟩\n[GOAL]\ncase intro.intro.intro\nn✝ b n : ℕ\nl : List ℕ\nb2 : 1 < b\nb0 : 0 < b\nn0 : 0 < n\nh : digits b (n / b) = l\nm0 : 0 < n / b\nhr : n % b < b\ne : n % b + b * (n / b) = n\n⊢ digits b n = n % b :: l\n[PROOFSTEP]\nsubst h\n[GOAL]\ncase intro.intro.intro\nn✝ b n : ℕ\nb2 : 1 < b\nb0 : 0 < b\nn0 : 0 < n\nm0 : 0 < n / b\nhr : n % b < b\ne : n % b + b * (n / b) = n\n⊢ digits b n = n % b :: digits b (n / b)\n[PROOFSTEP]\nexact Nat.digits_def' b2 n0\n[GOAL]\nn✝ b n : ℕ\nn0 : 0 < n\nnb : n < b\n⊢ digits b n = [n] ∧ 1 < b ∧ 0 < n\n[PROOFSTEP]\nhave b2 : 1 < b := lt_iff_add_one_le.mpr (le_trans (add_le_add_right (lt_iff_add_one_le.mp n0) 1) nb)\n[GOAL]\nn✝ b n : ℕ\nn0 : 0 < n\nnb : n < b\nb2 : 1 < b\n⊢ digits b n = [n] ∧ 1 < b ∧ 0 < n\n[PROOFSTEP]\nrefine' ⟨_, b2, n0⟩\n[GOAL]\nn✝ b n : ℕ\nn0 : 0 < n\nnb : n < b\nb2 : 1 < b\n⊢ digits b n = [n]\n[PROOFSTEP]\nrw [Nat.digits_def' b2 n0, Nat.mod_eq_of_lt nb, (Nat.div_eq_zero_iff ((zero_le n).trans_lt nb)).2 nb, Nat.digits_zero]\n", "meta": {"mathlib_filename": "Mathlib.Data.Nat.Digits", "llama_tokens": 46969, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8333245870332531, "lm_q2_score": 0.6513548714339145, "lm_q1q2_score": 0.5427900292497644}}
{"text": "[GOAL]\nn : ℕ\ni : Fin2 n\n⊢ ∀ {α : TypeVec n} (x : Prj i α), abs i (repr i x) = x\n[PROOFSTEP]\nintros\n[GOAL]\nn : ℕ\ni : Fin2 n\nα✝ : TypeVec n\nx✝ : Prj i α✝\n⊢ abs i (repr i x✝) = x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nn : ℕ\ni : Fin2 n\n⊢ ∀ {α β : TypeVec n} (f : α ⟹ β) (p : MvPFunctor.Obj (P i) α), abs i (f <$$> p) = f <$$> abs i p\n[PROOFSTEP]\nintros α β f P\n[GOAL]\nn : ℕ\ni : Fin2 n\nα β : TypeVec n\nf : α ⟹ β\nP : MvPFunctor.Obj (MvQPF.Prj.P i) α\n⊢ abs i (f <$$> P) = f <$$> abs i P\n[PROOFSTEP]\ncases P\n[GOAL]\ncase mk\nn : ℕ\ni : Fin2 n\nα β : TypeVec n\nf : α ⟹ β\nfst✝ : (P i).A\nsnd✝ : MvPFunctor.B (P i) fst✝ ⟹ α\n⊢ abs i (f <$$> { fst := fst✝, snd := snd✝ }) = f <$$> abs i { fst := fst✝, snd := snd✝ }\n[PROOFSTEP]\nrfl\n", "meta": {"mathlib_filename": "Mathlib.Data.QPF.Multivariate.Constructions.Prj", "llama_tokens": 436, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.833324587033253, "lm_q2_score": 0.651354857898194, "lm_q1q2_score": 0.5427900179701157}}
{"text": "[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : CauSeq ℚ (padicNorm p)\nhf : ¬f ≈ 0\nthis : ∃ ε, ε > 0 ∧ ∃ N1, ∀ (j : ℕ), j ≥ N1 → ε ≤ padicNorm p (↑f j)\nε : ℚ\nhε : ε > 0\nN1 : ℕ\nhN1 : ∀ (j : ℕ), j ≥ N1 → ε ≤ padicNorm p (↑f j)\nN2 : ℕ\nhN2 : ∀ (j : ℕ), j ≥ N2 → ∀ (k : ℕ), k ≥ N2 → padicNorm p (↑f j - ↑f k) < ε\nn m : ℕ\nhn : max N1 N2 ≤ n\nhm : max N1 N2 ≤ m\n⊢ padicNorm p (↑f m) = padicNorm p (↑f n)\n[PROOFSTEP]\nhave : padicNorm p (f n - f m) < ε := hN2 _ (max_le_iff.1 hn).2 _ (max_le_iff.1 hm).2\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : CauSeq ℚ (padicNorm p)\nhf : ¬f ≈ 0\nthis✝ : ∃ ε, ε > 0 ∧ ∃ N1, ∀ (j : ℕ), j ≥ N1 → ε ≤ padicNorm p (↑f j)\nε : ℚ\nhε : ε > 0\nN1 : ℕ\nhN1 : ∀ (j : ℕ), j ≥ N1 → ε ≤ padicNorm p (↑f j)\nN2 : ℕ\nhN2 : ∀ (j : ℕ), j ≥ N2 → ∀ (k : ℕ), k ≥ N2 → padicNorm p (↑f j - ↑f k) < ε\nn m : ℕ\nhn : max N1 N2 ≤ n\nhm : max N1 N2 ≤ m\nthis : padicNorm p (↑f n - ↑f m) < ε\n⊢ padicNorm p (↑f m) = padicNorm p (↑f n)\n[PROOFSTEP]\nhave : padicNorm p (f n - f m) < padicNorm p (f n) := lt_of_lt_of_le this <| hN1 _ (max_le_iff.1 hn).1\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : CauSeq ℚ (padicNorm p)\nhf : ¬f ≈ 0\nthis✝¹ : ∃ ε, ε > 0 ∧ ∃ N1, ∀ (j : ℕ), j ≥ N1 → ε ≤ padicNorm p (↑f j)\nε : ℚ\nhε : ε > 0\nN1 : ℕ\nhN1 : ∀ (j : ℕ), j ≥ N1 → ε ≤ padicNorm p (↑f j)\nN2 : ℕ\nhN2 : ∀ (j : ℕ), j ≥ N2 → ∀ (k : ℕ), k ≥ N2 → padicNorm p (↑f j - ↑f k) < ε\nn m : ℕ\nhn : max N1 N2 ≤ n\nhm : max N1 N2 ≤ m\nthis✝ : padicNorm p (↑f n - ↑f m) < ε\nthis : padicNorm p (↑f n - ↑f m) < padicNorm p (↑f n)\n⊢ padicNorm p (↑f m) = padicNorm p (↑f n)\n[PROOFSTEP]\nhave : padicNorm p (f n - f m) < max (padicNorm p (f n)) (padicNorm p (f m)) := lt_max_iff.2 (Or.inl this)\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : CauSeq ℚ (padicNorm p)\nhf : ¬f ≈ 0\nthis✝² : ∃ ε, ε > 0 ∧ ∃ N1, ∀ (j : ℕ), j ≥ N1 → ε ≤ padicNorm p (↑f j)\nε : ℚ\nhε : ε > 0\nN1 : ℕ\nhN1 : ∀ (j : ℕ), j ≥ N1 → ε ≤ padicNorm p (↑f j)\nN2 : ℕ\nhN2 : ∀ (j : ℕ), j ≥ N2 → ∀ (k : ℕ), k ≥ N2 → padicNorm p (↑f j - ↑f k) < ε\nn m : ℕ\nhn : max N1 N2 ≤ n\nhm : max N1 N2 ≤ m\nthis✝¹ : padicNorm p (↑f n - ↑f m) < ε\nthis✝ : padicNorm p (↑f n - ↑f m) < padicNorm p (↑f n)\nthis : padicNorm p (↑f n - ↑f m) < max (padicNorm p (↑f n)) (padicNorm p (↑f m))\n⊢ padicNorm p (↑f m) = padicNorm p (↑f n)\n[PROOFSTEP]\nby_contra hne\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : CauSeq ℚ (padicNorm p)\nhf : ¬f ≈ 0\nthis✝² : ∃ ε, ε > 0 ∧ ∃ N1, ∀ (j : ℕ), j ≥ N1 → ε ≤ padicNorm p (↑f j)\nε : ℚ\nhε : ε > 0\nN1 : ℕ\nhN1 : ∀ (j : ℕ), j ≥ N1 → ε ≤ padicNorm p (↑f j)\nN2 : ℕ\nhN2 : ∀ (j : ℕ), j ≥ N2 → ∀ (k : ℕ), k ≥ N2 → padicNorm p (↑f j - ↑f k) < ε\nn m : ℕ\nhn : max N1 N2 ≤ n\nhm : max N1 N2 ≤ m\nthis✝¹ : padicNorm p (↑f n - ↑f m) < ε\nthis✝ : padicNorm p (↑f n - ↑f m) < padicNorm p (↑f n)\nthis : padicNorm p (↑f n - ↑f m) < max (padicNorm p (↑f n)) (padicNorm p (↑f m))\nhne : ¬padicNorm p (↑f m) = padicNorm p (↑f n)\n⊢ False\n[PROOFSTEP]\nrw [← padicNorm.neg (f m)] at hne \n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : CauSeq ℚ (padicNorm p)\nhf : ¬f ≈ 0\nthis✝² : ∃ ε, ε > 0 ∧ ∃ N1, ∀ (j : ℕ), j ≥ N1 → ε ≤ padicNorm p (↑f j)\nε : ℚ\nhε : ε > 0\nN1 : ℕ\nhN1 : ∀ (j : ℕ), j ≥ N1 → ε ≤ padicNorm p (↑f j)\nN2 : ℕ\nhN2 : ∀ (j : ℕ), j ≥ N2 → ∀ (k : ℕ), k ≥ N2 → padicNorm p (↑f j - ↑f k) < ε\nn m : ℕ\nhn : max N1 N2 ≤ n\nhm : max N1 N2 ≤ m\nthis✝¹ : padicNorm p (↑f n - ↑f m) < ε\nthis✝ : padicNorm p (↑f n - ↑f m) < padicNorm p (↑f n)\nthis : padicNorm p (↑f n - ↑f m) < max (padicNorm p (↑f n)) (padicNorm p (↑f m))\nhne : ¬padicNorm p (-↑f m) = padicNorm p (↑f n)\n⊢ False\n[PROOFSTEP]\nhave hnam := add_eq_max_of_ne hne\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : CauSeq ℚ (padicNorm p)\nhf : ¬f ≈ 0\nthis✝² : ∃ ε, ε > 0 ∧ ∃ N1, ∀ (j : ℕ), j ≥ N1 → ε ≤ padicNorm p (↑f j)\nε : ℚ\nhε : ε > 0\nN1 : ℕ\nhN1 : ∀ (j : ℕ), j ≥ N1 → ε ≤ padicNorm p (↑f j)\nN2 : ℕ\nhN2 : ∀ (j : ℕ), j ≥ N2 → ∀ (k : ℕ), k ≥ N2 → padicNorm p (↑f j - ↑f k) < ε\nn m : ℕ\nhn : max N1 N2 ≤ n\nhm : max N1 N2 ≤ m\nthis✝¹ : padicNorm p (↑f n - ↑f m) < ε\nthis✝ : padicNorm p (↑f n - ↑f m) < padicNorm p (↑f n)\nthis : padicNorm p (↑f n - ↑f m) < max (padicNorm p (↑f n)) (padicNorm p (↑f m))\nhne : ¬padicNorm p (-↑f m) = padicNorm p (↑f n)\nhnam : padicNorm p (-↑f m + ↑f n) = max (padicNorm p (-↑f m)) (padicNorm p (↑f n))\n⊢ False\n[PROOFSTEP]\nrw [padicNorm.neg, max_comm] at hnam \n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : CauSeq ℚ (padicNorm p)\nhf : ¬f ≈ 0\nthis✝² : ∃ ε, ε > 0 ∧ ∃ N1, ∀ (j : ℕ), j ≥ N1 → ε ≤ padicNorm p (↑f j)\nε : ℚ\nhε : ε > 0\nN1 : ℕ\nhN1 : ∀ (j : ℕ), j ≥ N1 → ε ≤ padicNorm p (↑f j)\nN2 : ℕ\nhN2 : ∀ (j : ℕ), j ≥ N2 → ∀ (k : ℕ), k ≥ N2 → padicNorm p (↑f j - ↑f k) < ε\nn m : ℕ\nhn : max N1 N2 ≤ n\nhm : max N1 N2 ≤ m\nthis✝¹ : padicNorm p (↑f n - ↑f m) < ε\nthis✝ : padicNorm p (↑f n - ↑f m) < padicNorm p (↑f n)\nthis : padicNorm p (↑f n - ↑f m) < max (padicNorm p (↑f n)) (padicNorm p (↑f m))\nhne : ¬padicNorm p (-↑f m) = padicNorm p (↑f n)\nhnam : padicNorm p (-↑f m + ↑f n) = max (padicNorm p (↑f n)) (padicNorm p (↑f m))\n⊢ False\n[PROOFSTEP]\nrw [← hnam, sub_eq_add_neg, add_comm] at this \n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : CauSeq ℚ (padicNorm p)\nhf : ¬f ≈ 0\nthis✝² : ∃ ε, ε > 0 ∧ ∃ N1, ∀ (j : ℕ), j ≥ N1 → ε ≤ padicNorm p (↑f j)\nε : ℚ\nhε : ε > 0\nN1 : ℕ\nhN1 : ∀ (j : ℕ), j ≥ N1 → ε ≤ padicNorm p (↑f j)\nN2 : ℕ\nhN2 : ∀ (j : ℕ), j ≥ N2 → ∀ (k : ℕ), k ≥ N2 → padicNorm p (↑f j - ↑f k) < ε\nn m : ℕ\nhn : max N1 N2 ≤ n\nhm : max N1 N2 ≤ m\nthis✝¹ : padicNorm p (↑f n - ↑f m) < ε\nthis✝ : padicNorm p (↑f n - ↑f m) < padicNorm p (↑f n)\nthis : padicNorm p (-↑f m + ↑f n) < padicNorm p (-↑f m + ↑f n)\nhne : ¬padicNorm p (-↑f m) = padicNorm p (↑f n)\nhnam : padicNorm p (-↑f m + ↑f n) = max (padicNorm p (↑f n)) (padicNorm p (↑f m))\n⊢ False\n[PROOFSTEP]\napply _root_.lt_irrefl _ this\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : PadicSeq p\n⊢ norm f = 0 ↔ f ≈ 0\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : PadicSeq p\n⊢ norm f = 0 → f ≈ 0\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : PadicSeq p\nh : norm f = 0\n⊢ f ≈ 0\n[PROOFSTEP]\nby_contra hf\n[GOAL]\ncase mp\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : PadicSeq p\nh : norm f = 0\nhf : ¬f ≈ 0\n⊢ False\n[PROOFSTEP]\nunfold norm at h \n[GOAL]\ncase mp\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : PadicSeq p\nh : (if hf : f ≈ 0 then 0 else padicNorm p (↑f (stationaryPoint hf))) = 0\nhf : ¬f ≈ 0\n⊢ False\n[PROOFSTEP]\nsplit_ifs at h \n[GOAL]\ncase pos\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : PadicSeq p\nhf : ¬f ≈ 0\nh✝ : f ≈ 0\nh : 0 = 0\n⊢ False\ncase neg\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : PadicSeq p\nhf h✝ : ¬f ≈ 0\nh : padicNorm p (↑f (stationaryPoint h✝)) = 0\n⊢ False\n[PROOFSTEP]\ncontradiction\n[GOAL]\ncase neg\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : PadicSeq p\nhf h✝ : ¬f ≈ 0\nh : padicNorm p (↑f (stationaryPoint h✝)) = 0\n⊢ False\n[PROOFSTEP]\napply hf\n[GOAL]\ncase neg\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : PadicSeq p\nhf h✝ : ¬f ≈ 0\nh : padicNorm p (↑f (stationaryPoint h✝)) = 0\n⊢ f ≈ 0\n[PROOFSTEP]\nintro ε hε\n[GOAL]\ncase neg\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : PadicSeq p\nhf h✝ : ¬f ≈ 0\nh : padicNorm p (↑f (stationaryPoint h✝)) = 0\nε : ℚ\nhε : ε > 0\n⊢ ∃ i, ∀ (j : ℕ), j ≥ i → padicNorm p (↑(f - 0) j) < ε\n[PROOFSTEP]\nexists stationaryPoint hf\n[GOAL]\ncase neg\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : PadicSeq p\nhf h✝ : ¬f ≈ 0\nh : padicNorm p (↑f (stationaryPoint h✝)) = 0\nε : ℚ\nhε : ε > 0\n⊢ ∀ (j : ℕ), j ≥ stationaryPoint hf → padicNorm p (↑(f - 0) j) < ε\n[PROOFSTEP]\nintro j hj\n[GOAL]\ncase neg\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : PadicSeq p\nhf h✝ : ¬f ≈ 0\nh : padicNorm p (↑f (stationaryPoint h✝)) = 0\nε : ℚ\nhε : ε > 0\nj : ℕ\nhj : j ≥ stationaryPoint hf\n⊢ padicNorm p (↑(f - 0) j) < ε\n[PROOFSTEP]\nhave heq := stationaryPoint_spec hf le_rfl hj\n[GOAL]\ncase neg\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : PadicSeq p\nhf h✝ : ¬f ≈ 0\nh : padicNorm p (↑f (stationaryPoint h✝)) = 0\nε : ℚ\nhε : ε > 0\nj : ℕ\nhj : j ≥ stationaryPoint hf\nheq : padicNorm p (↑f j) = padicNorm p (↑f (stationaryPoint hf))\n⊢ padicNorm p (↑(f - 0) j) < ε\n[PROOFSTEP]\nsimpa [h, heq]\n[GOAL]\ncase mpr\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : PadicSeq p\n⊢ f ≈ 0 → norm f = 0\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : PadicSeq p\nh : f ≈ 0\n⊢ norm f = 0\n[PROOFSTEP]\nsimp [norm, h]\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf g : PadicSeq p\nh : ∀ (k : ℕ), padicNorm p (↑f k) = padicNorm p (↑g k)\nhf : f ≈ 0\nε : ℚ\nhε : ε > 0\ni : ℕ\nhi : ∀ (j : ℕ), j ≥ i → padicNorm p (↑(f - 0) j) < ε\nj : ℕ\nhj : j ≥ i\n⊢ padicNorm p (↑(g - 0) j) < ε\n[PROOFSTEP]\nsimpa [h] using hi _ hj\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : PadicSeq p\nhf : ¬f ≈ 0\n⊢ norm f = padicNorm p (↑f (stationaryPoint hf))\n[PROOFSTEP]\nsimp [norm, hf]\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : PadicSeq p\nhf : ¬f ≈ 0\nheq : norm f = padicNorm p (↑f (stationaryPoint hf))\nh : ↑f (stationaryPoint hf) = 0\n⊢ norm f = 0\n[PROOFSTEP]\nsimpa [h] using heq\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nq : ℚ\nhq : q ≠ 0\nh : LimZero (const (padicNorm p) q - 0)\n⊢ LimZero (const (padicNorm (?m.10166 hq h)) q)\n[PROOFSTEP]\nsimpa using h\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : PadicSeq p\nhf : f ≈ 0\n⊢ 0 ≤ norm f\n[PROOFSTEP]\nsimp [hf, norm]\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : PadicSeq p\nhf : ¬f ≈ 0\n⊢ 0 ≤ norm f\n[PROOFSTEP]\nsimp [norm, hf, padicNorm.nonneg]\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : PadicSeq p\nhf : ¬f ≈ 0\nv2 v3 : ℕ\n⊢ padicNorm p (↑f (stationaryPoint hf)) = padicNorm p (↑f (max (stationaryPoint hf) (max v2 v3)))\n[PROOFSTEP]\napply stationaryPoint_spec hf\n[GOAL]\ncase a\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : PadicSeq p\nhf : ¬f ≈ 0\nv2 v3 : ℕ\n⊢ stationaryPoint hf ≤ max (stationaryPoint hf) (max v2 v3)\n[PROOFSTEP]\napply le_max_left\n[GOAL]\ncase a\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : PadicSeq p\nhf : ¬f ≈ 0\nv2 v3 : ℕ\n⊢ stationaryPoint hf ≤ stationaryPoint hf\n[PROOFSTEP]\nexact le_rfl\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : PadicSeq p\nhf : ¬f ≈ 0\nv1 v3 : ℕ\n⊢ padicNorm p (↑f (stationaryPoint hf)) = padicNorm p (↑f (max v1 (max (stationaryPoint hf) v3)))\n[PROOFSTEP]\napply stationaryPoint_spec hf\n[GOAL]\ncase a\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : PadicSeq p\nhf : ¬f ≈ 0\nv1 v3 : ℕ\n⊢ stationaryPoint hf ≤ max v1 (max (stationaryPoint hf) v3)\n[PROOFSTEP]\napply le_trans\n[GOAL]\ncase a.a\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : PadicSeq p\nhf : ¬f ≈ 0\nv1 v3 : ℕ\n⊢ stationaryPoint hf ≤ ?a.b✝\n[PROOFSTEP]\napply le_max_left _ v3\n[GOAL]\ncase a.a\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : PadicSeq p\nhf : ¬f ≈ 0\nv1 v3 : ℕ\n⊢ max (stationaryPoint hf) v3 ≤ max v1 (max (stationaryPoint hf) v3)\n[PROOFSTEP]\napply le_max_right\n[GOAL]\ncase a\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : PadicSeq p\nhf : ¬f ≈ 0\nv1 v3 : ℕ\n⊢ stationaryPoint hf ≤ stationaryPoint hf\n[PROOFSTEP]\nexact le_rfl\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : PadicSeq p\nhf : ¬f ≈ 0\nv1 v2 : ℕ\n⊢ padicNorm p (↑f (stationaryPoint hf)) = padicNorm p (↑f (max v1 (max v2 (stationaryPoint hf))))\n[PROOFSTEP]\napply stationaryPoint_spec hf\n[GOAL]\ncase a\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : PadicSeq p\nhf : ¬f ≈ 0\nv1 v2 : ℕ\n⊢ stationaryPoint hf ≤ max v1 (max v2 (stationaryPoint hf))\n[PROOFSTEP]\napply le_trans\n[GOAL]\ncase a.a\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : PadicSeq p\nhf : ¬f ≈ 0\nv1 v2 : ℕ\n⊢ stationaryPoint hf ≤ ?a.b✝\n[PROOFSTEP]\napply le_max_right v2\n[GOAL]\ncase a.a\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : PadicSeq p\nhf : ¬f ≈ 0\nv1 v2 : ℕ\n⊢ max v2 (stationaryPoint hf) ≤ max v1 (max v2 (stationaryPoint hf))\n[PROOFSTEP]\napply le_max_right\n[GOAL]\ncase a\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : PadicSeq p\nhf : ¬f ≈ 0\nv1 v2 : ℕ\n⊢ stationaryPoint hf ≤ stationaryPoint hf\n[PROOFSTEP]\nexact le_rfl\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : PadicSeq p\nhf : ¬f ≈ 0\n⊢ norm f = ↑p ^ (-valuation f)\n[PROOFSTEP]\nrw [norm, valuation, dif_neg hf, dif_neg hf, padicNorm, if_neg]\n[GOAL]\ncase hnc\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : PadicSeq p\nhf : ¬f ≈ 0\n⊢ ¬↑f (stationaryPoint hf) = 0\n[PROOFSTEP]\nintro H\n[GOAL]\ncase hnc\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : PadicSeq p\nhf : ¬f ≈ 0\nH : ↑f (stationaryPoint hf) = 0\n⊢ False\n[PROOFSTEP]\napply CauSeq.not_limZero_of_not_congr_zero hf\n[GOAL]\ncase hnc\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : PadicSeq p\nhf : ¬f ≈ 0\nH : ↑f (stationaryPoint hf) = 0\n⊢ LimZero f\n[PROOFSTEP]\nintro ε hε\n[GOAL]\ncase hnc\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : PadicSeq p\nhf : ¬f ≈ 0\nH : ↑f (stationaryPoint hf) = 0\nε : ℚ\nhε : ε > 0\n⊢ ∃ i, ∀ (j : ℕ), j ≥ i → padicNorm p (↑f j) < ε\n[PROOFSTEP]\nuse stationaryPoint hf\n[GOAL]\ncase h\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : PadicSeq p\nhf : ¬f ≈ 0\nH : ↑f (stationaryPoint hf) = 0\nε : ℚ\nhε : ε > 0\n⊢ ∀ (j : ℕ), j ≥ stationaryPoint hf → padicNorm p (↑f j) < ε\n[PROOFSTEP]\nintro n hn\n[GOAL]\ncase h\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : PadicSeq p\nhf : ¬f ≈ 0\nH : ↑f (stationaryPoint hf) = 0\nε : ℚ\nhε : ε > 0\nn : ℕ\nhn : n ≥ stationaryPoint hf\n⊢ padicNorm p (↑f n) < ε\n[PROOFSTEP]\nrw [stationaryPoint_spec hf le_rfl hn]\n[GOAL]\ncase h\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : PadicSeq p\nhf : ¬f ≈ 0\nH : ↑f (stationaryPoint hf) = 0\nε : ℚ\nhε : ε > 0\nn : ℕ\nhn : n ≥ stationaryPoint hf\n⊢ padicNorm p (↑f (stationaryPoint hf)) < ε\n[PROOFSTEP]\nsimpa [H] using hε\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf g : PadicSeq p\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\n⊢ valuation f = valuation g ↔ norm f = norm g\n[PROOFSTEP]\nrw [norm_eq_pow_val hf, norm_eq_pow_val hg, ← neg_inj, zpow_inj]\n[GOAL]\ncase h₀\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf g : PadicSeq p\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\n⊢ 0 < ↑p\n[PROOFSTEP]\nexact_mod_cast (Fact.out : p.Prime).pos\n[GOAL]\ncase h₁\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf g : PadicSeq p\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\n⊢ ↑p ≠ 1\n[PROOFSTEP]\nexact_mod_cast (Fact.out : p.Prime).ne_one\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhf : f ≈ 0\n⊢ norm (f * g) = norm f * norm g\n[PROOFSTEP]\nhave hg : f * g ≈ 0 := mul_equiv_zero' _ hf\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhf : f ≈ 0\nhg : f * g ≈ 0\n⊢ norm (f * g) = norm f * norm g\n[PROOFSTEP]\nsimp only [hf, hg, norm, dif_pos, zero_mul]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhf : ¬f ≈ 0\nhg : g ≈ 0\n⊢ norm (f * g) = norm f * norm g\n[PROOFSTEP]\nhave hf : f * g ≈ 0 := mul_equiv_zero _ hg\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhf✝ : ¬f ≈ 0\nhg : g ≈ 0\nhf : f * g ≈ 0\n⊢ norm (f * g) = norm f * norm g\n[PROOFSTEP]\nsimp only [hf, hg, norm, dif_pos, mul_zero]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\n⊢ norm (f * g) = norm f * norm g\n[PROOFSTEP]\nunfold norm\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\n⊢ (if hf : f * g ≈ 0 then 0 else padicNorm p (↑(f * g) (stationaryPoint hf))) =\n    (if hf : f ≈ 0 then 0 else padicNorm p (↑f (stationaryPoint hf))) *\n      if hf : g ≈ 0 then 0 else padicNorm p (↑g (stationaryPoint hf))\n[PROOFSTEP]\nsplit_ifs with hfg\n[GOAL]\ncase pos\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\nhfg : f * g ≈ 0\n⊢ 0 = padicNorm p (↑f (stationaryPoint hf)) * padicNorm p (↑g (stationaryPoint hg))\ncase neg\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\nhfg : ¬f * g ≈ 0\n⊢ padicNorm p (↑(f * g) (stationaryPoint hfg)) =\n    padicNorm p (↑f (stationaryPoint hf)) * padicNorm p (↑g (stationaryPoint hg))\n[PROOFSTEP]\nexact (mul_not_equiv_zero hf hg hfg).elim\n[GOAL]\ncase neg\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\nhfg : ¬f * g ≈ 0\n⊢ padicNorm p (↑(f * g) (stationaryPoint hfg)) =\n    padicNorm p (↑f (stationaryPoint hf)) * padicNorm p (↑g (stationaryPoint hg))\n[PROOFSTEP]\nrw [lift_index_left_left hfg, lift_index_left hf, lift_index_right hg]\n[GOAL]\ncase neg\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\nhfg : ¬f * g ≈ 0\n⊢ padicNorm p (↑(f * g) (max (stationaryPoint hfg) (max ?neg.v2✝ ?neg.v3✝))) =\n    padicNorm p (↑f (max ?neg.v1✝ (max (stationaryPoint hf) ?neg.v3✝))) *\n      padicNorm p (↑g (max ?neg.v1✝ (max ?neg.v2✝ (stationaryPoint hg))))\ncase neg.v1\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\nhfg : ¬f * g ≈ 0\n⊢ ℕ\ncase neg.v2\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\nhfg : ¬f * g ≈ 0\n⊢ ℕ\ncase neg.v2\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\nhfg : ¬f * g ≈ 0\n⊢ ℕ\ncase neg.v3\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\nhfg : ¬f * g ≈ 0\n⊢ ℕ\ncase neg.v1\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\nhfg : ¬f * g ≈ 0\n⊢ ℕ\ncase neg.v3\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\nhfg : ¬f * g ≈ 0\n⊢ ℕ\ncase neg.v1\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\nhfg : ¬f * g ≈ 0\n⊢ ℕ\ncase neg.v3\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\nhfg : ¬f * g ≈ 0\n⊢ ℕ\ncase neg.v2\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\nhfg : ¬f * g ≈ 0\n⊢ ℕ\ncase neg.v3\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\nhfg : ¬f * g ≈ 0\n⊢ ℕ\ncase neg.v2\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\nhfg : ¬f * g ≈ 0\n⊢ ℕ\ncase neg.v3 p : ℕ hp : Fact (Nat.Prime p) f g : PadicSeq p hf : ¬f ≈ 0 hg : ¬g ≈ 0 hfg : ¬f * g ≈ 0 ⊢ ℕ\n[PROOFSTEP]\napply padicNorm.mul\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nq : ℚ\nhq : q = 0\n⊢ norm (const (padicNorm p) q) = padicNorm p q\n[PROOFSTEP]\nhave : const (padicNorm p) q ≈ 0 := by simp [hq]; apply Setoid.refl (const (padicNorm p) 0)\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nq : ℚ\nhq : q = 0\n⊢ const (padicNorm p) q ≈ 0\n[PROOFSTEP]\nsimp [hq]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nq : ℚ\nhq : q = 0\n⊢ 0 ≈ 0\n[PROOFSTEP]\napply Setoid.refl (const (padicNorm p) 0)\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nq : ℚ\nhq : q = 0\nthis : const (padicNorm p) q ≈ 0\n⊢ norm (const (padicNorm p) q) = padicNorm p q\n[PROOFSTEP]\nsubst hq\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nthis : const (padicNorm p) 0 ≈ 0\n⊢ norm (const (padicNorm p) 0) = padicNorm p 0\n[PROOFSTEP]\nsimp [norm, this]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nq : ℚ\nhq : ¬q = 0\n⊢ norm (const (padicNorm p) q) = padicNorm p q\n[PROOFSTEP]\nhave : ¬const (padicNorm p) q ≈ 0 := not_equiv_zero_const_of_nonzero hq\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nq : ℚ\nhq : ¬q = 0\nthis : ¬const (padicNorm p) q ≈ 0\n⊢ norm (const (padicNorm p) q) = padicNorm p q\n[PROOFSTEP]\nsimp [norm, this]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\na : PadicSeq p\nha : ¬a ≈ 0\n⊢ ∃ z, norm a = ↑p ^ (-z)\n[PROOFSTEP]\nlet ⟨k, hk, hk'⟩ := norm_eq_norm_app_of_nonzero ha\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\na : PadicSeq p\nha : ¬a ≈ 0\nk : ℚ\nhk : norm a = padicNorm p k\nhk' : k ≠ 0\n⊢ ∃ z, norm a = ↑p ^ (-z)\n[PROOFSTEP]\nsimpa [hk] using padicNorm.values_discrete hk'\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\n⊢ norm 1 = 1\n[PROOFSTEP]\nhave h1 : ¬(1 : PadicSeq p) ≈ 0 := one_not_equiv_zero _\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nh1 : ¬1 ≈ 0\n⊢ norm 1 = 1\n[PROOFSTEP]\nsimp [h1, norm, hp.1.one_lt]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\nhfg : f ≈ g\nh : padicNorm p (↑f (stationaryPoint hf)) ≠ padicNorm p (↑g (stationaryPoint hg))\nhlt : padicNorm p (↑g (stationaryPoint hg)) < padicNorm p (↑f (stationaryPoint hf))\n⊢ False\n[PROOFSTEP]\nhave hpn : 0 < padicNorm p (f (stationaryPoint hf)) - padicNorm p (g (stationaryPoint hg)) := sub_pos_of_lt hlt\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\nhfg : f ≈ g\nh : padicNorm p (↑f (stationaryPoint hf)) ≠ padicNorm p (↑g (stationaryPoint hg))\nhlt : padicNorm p (↑g (stationaryPoint hg)) < padicNorm p (↑f (stationaryPoint hf))\nhpn : 0 < padicNorm p (↑f (stationaryPoint hf)) - padicNorm p (↑g (stationaryPoint hg))\n⊢ False\n[PROOFSTEP]\ncases' hfg _ hpn with N hN\n[GOAL]\ncase intro\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\nhfg : f ≈ g\nh : padicNorm p (↑f (stationaryPoint hf)) ≠ padicNorm p (↑g (stationaryPoint hg))\nhlt : padicNorm p (↑g (stationaryPoint hg)) < padicNorm p (↑f (stationaryPoint hf))\nhpn : 0 < padicNorm p (↑f (stationaryPoint hf)) - padicNorm p (↑g (stationaryPoint hg))\nN : ℕ\nhN :\n  ∀ (j : ℕ),\n    j ≥ N → padicNorm p (↑(f - g) j) < padicNorm p (↑f (stationaryPoint hf)) - padicNorm p (↑g (stationaryPoint hg))\n⊢ False\n[PROOFSTEP]\nlet i := max N (max (stationaryPoint hf) (stationaryPoint hg))\n[GOAL]\ncase intro\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\nhfg : f ≈ g\nh : padicNorm p (↑f (stationaryPoint hf)) ≠ padicNorm p (↑g (stationaryPoint hg))\nhlt : padicNorm p (↑g (stationaryPoint hg)) < padicNorm p (↑f (stationaryPoint hf))\nhpn : 0 < padicNorm p (↑f (stationaryPoint hf)) - padicNorm p (↑g (stationaryPoint hg))\nN : ℕ\nhN :\n  ∀ (j : ℕ),\n    j ≥ N → padicNorm p (↑(f - g) j) < padicNorm p (↑f (stationaryPoint hf)) - padicNorm p (↑g (stationaryPoint hg))\ni : ℕ := max N (max (stationaryPoint hf) (stationaryPoint hg))\n⊢ False\n[PROOFSTEP]\nhave hi : N ≤ i := le_max_left _ _\n[GOAL]\ncase intro\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\nhfg : f ≈ g\nh : padicNorm p (↑f (stationaryPoint hf)) ≠ padicNorm p (↑g (stationaryPoint hg))\nhlt : padicNorm p (↑g (stationaryPoint hg)) < padicNorm p (↑f (stationaryPoint hf))\nhpn : 0 < padicNorm p (↑f (stationaryPoint hf)) - padicNorm p (↑g (stationaryPoint hg))\nN : ℕ\nhN :\n  ∀ (j : ℕ),\n    j ≥ N → padicNorm p (↑(f - g) j) < padicNorm p (↑f (stationaryPoint hf)) - padicNorm p (↑g (stationaryPoint hg))\ni : ℕ := max N (max (stationaryPoint hf) (stationaryPoint hg))\nhi : N ≤ i\n⊢ False\n[PROOFSTEP]\nhave hN' := hN _ hi\n[GOAL]\ncase intro\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\nhfg : f ≈ g\nh : padicNorm p (↑f (stationaryPoint hf)) ≠ padicNorm p (↑g (stationaryPoint hg))\nhlt : padicNorm p (↑g (stationaryPoint hg)) < padicNorm p (↑f (stationaryPoint hf))\nhpn : 0 < padicNorm p (↑f (stationaryPoint hf)) - padicNorm p (↑g (stationaryPoint hg))\nN : ℕ\nhN :\n  ∀ (j : ℕ),\n    j ≥ N → padicNorm p (↑(f - g) j) < padicNorm p (↑f (stationaryPoint hf)) - padicNorm p (↑g (stationaryPoint hg))\ni : ℕ := max N (max (stationaryPoint hf) (stationaryPoint hg))\nhi : N ≤ i\nhN' : padicNorm p (↑(f - g) i) < padicNorm p (↑f (stationaryPoint hf)) - padicNorm p (↑g (stationaryPoint hg))\n⊢ False\n[PROOFSTEP]\nrw [lift_index_left hf N (stationaryPoint hg), lift_index_right hg N (stationaryPoint hf)] at hN' h hlt \n[GOAL]\ncase intro\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\nhfg : f ≈ g\nhpn : 0 < padicNorm p (↑f (stationaryPoint hf)) - padicNorm p (↑g (stationaryPoint hg))\nN : ℕ\nhlt :\n  padicNorm p (↑g (max N (max (stationaryPoint hf) (stationaryPoint hg)))) <\n    padicNorm p (↑f (max N (max (stationaryPoint hf) (stationaryPoint hg))))\nh :\n  padicNorm p (↑f (max N (max (stationaryPoint hf) (stationaryPoint hg)))) ≠\n    padicNorm p (↑g (max N (max (stationaryPoint hf) (stationaryPoint hg))))\nhN :\n  ∀ (j : ℕ),\n    j ≥ N → padicNorm p (↑(f - g) j) < padicNorm p (↑f (stationaryPoint hf)) - padicNorm p (↑g (stationaryPoint hg))\ni : ℕ := max N (max (stationaryPoint hf) (stationaryPoint hg))\nhi : N ≤ i\nhN' :\n  padicNorm p (↑(f - g) i) <\n    padicNorm p (↑f (max N (max (stationaryPoint hf) (stationaryPoint hg)))) -\n      padicNorm p (↑g (max N (max (stationaryPoint hf) (stationaryPoint hg))))\n⊢ False\n[PROOFSTEP]\nhave hpne : padicNorm p (f i) ≠ padicNorm p (-g i) := by rwa [← padicNorm.neg (g i)] at h \n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\nhfg : f ≈ g\nhpn : 0 < padicNorm p (↑f (stationaryPoint hf)) - padicNorm p (↑g (stationaryPoint hg))\nN : ℕ\nhlt :\n  padicNorm p (↑g (max N (max (stationaryPoint hf) (stationaryPoint hg)))) <\n    padicNorm p (↑f (max N (max (stationaryPoint hf) (stationaryPoint hg))))\nh :\n  padicNorm p (↑f (max N (max (stationaryPoint hf) (stationaryPoint hg)))) ≠\n    padicNorm p (↑g (max N (max (stationaryPoint hf) (stationaryPoint hg))))\nhN :\n  ∀ (j : ℕ),\n    j ≥ N → padicNorm p (↑(f - g) j) < padicNorm p (↑f (stationaryPoint hf)) - padicNorm p (↑g (stationaryPoint hg))\ni : ℕ := max N (max (stationaryPoint hf) (stationaryPoint hg))\nhi : N ≤ i\nhN' :\n  padicNorm p (↑(f - g) i) <\n    padicNorm p (↑f (max N (max (stationaryPoint hf) (stationaryPoint hg)))) -\n      padicNorm p (↑g (max N (max (stationaryPoint hf) (stationaryPoint hg))))\n⊢ padicNorm p (↑f i) ≠ padicNorm p (-↑g i)\n[PROOFSTEP]\nrwa [← padicNorm.neg (g i)] at h \n[GOAL]\ncase intro\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\nhfg : f ≈ g\nhpn : 0 < padicNorm p (↑f (stationaryPoint hf)) - padicNorm p (↑g (stationaryPoint hg))\nN : ℕ\nhlt :\n  padicNorm p (↑g (max N (max (stationaryPoint hf) (stationaryPoint hg)))) <\n    padicNorm p (↑f (max N (max (stationaryPoint hf) (stationaryPoint hg))))\nh :\n  padicNorm p (↑f (max N (max (stationaryPoint hf) (stationaryPoint hg)))) ≠\n    padicNorm p (↑g (max N (max (stationaryPoint hf) (stationaryPoint hg))))\nhN :\n  ∀ (j : ℕ),\n    j ≥ N → padicNorm p (↑(f - g) j) < padicNorm p (↑f (stationaryPoint hf)) - padicNorm p (↑g (stationaryPoint hg))\ni : ℕ := max N (max (stationaryPoint hf) (stationaryPoint hg))\nhi : N ≤ i\nhN' :\n  padicNorm p (↑(f - g) i) <\n    padicNorm p (↑f (max N (max (stationaryPoint hf) (stationaryPoint hg)))) -\n      padicNorm p (↑g (max N (max (stationaryPoint hf) (stationaryPoint hg))))\nhpne : padicNorm p (↑f i) ≠ padicNorm p (-↑g i)\n⊢ False\n[PROOFSTEP]\nrw [CauSeq.sub_apply, sub_eq_add_neg, add_eq_max_of_ne hpne, padicNorm.neg, max_eq_left_of_lt hlt] at hN' \n[GOAL]\ncase intro\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\nhfg : f ≈ g\nhpn : 0 < padicNorm p (↑f (stationaryPoint hf)) - padicNorm p (↑g (stationaryPoint hg))\nN : ℕ\nhlt :\n  padicNorm p (↑g (max N (max (stationaryPoint hf) (stationaryPoint hg)))) <\n    padicNorm p (↑f (max N (max (stationaryPoint hf) (stationaryPoint hg))))\nh :\n  padicNorm p (↑f (max N (max (stationaryPoint hf) (stationaryPoint hg)))) ≠\n    padicNorm p (↑g (max N (max (stationaryPoint hf) (stationaryPoint hg))))\nhN :\n  ∀ (j : ℕ),\n    j ≥ N → padicNorm p (↑(f - g) j) < padicNorm p (↑f (stationaryPoint hf)) - padicNorm p (↑g (stationaryPoint hg))\ni : ℕ := max N (max (stationaryPoint hf) (stationaryPoint hg))\nhi : N ≤ i\nhN' :\n  padicNorm p (↑f (max N (max (stationaryPoint hf) (stationaryPoint hg)))) <\n    padicNorm p (↑f (max N (max (stationaryPoint hf) (stationaryPoint hg)))) -\n      padicNorm p (↑g (max N (max (stationaryPoint hf) (stationaryPoint hg))))\nhpne : padicNorm p (↑f i) ≠ padicNorm p (-↑g i)\n⊢ False\n[PROOFSTEP]\nhave : padicNorm p (f i) < padicNorm p (f i) :=\n  by\n  apply lt_of_lt_of_le hN'\n  apply sub_le_self\n  apply padicNorm.nonneg\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\nhfg : f ≈ g\nhpn : 0 < padicNorm p (↑f (stationaryPoint hf)) - padicNorm p (↑g (stationaryPoint hg))\nN : ℕ\nhlt :\n  padicNorm p (↑g (max N (max (stationaryPoint hf) (stationaryPoint hg)))) <\n    padicNorm p (↑f (max N (max (stationaryPoint hf) (stationaryPoint hg))))\nh :\n  padicNorm p (↑f (max N (max (stationaryPoint hf) (stationaryPoint hg)))) ≠\n    padicNorm p (↑g (max N (max (stationaryPoint hf) (stationaryPoint hg))))\nhN :\n  ∀ (j : ℕ),\n    j ≥ N → padicNorm p (↑(f - g) j) < padicNorm p (↑f (stationaryPoint hf)) - padicNorm p (↑g (stationaryPoint hg))\ni : ℕ := max N (max (stationaryPoint hf) (stationaryPoint hg))\nhi : N ≤ i\nhN' :\n  padicNorm p (↑f (max N (max (stationaryPoint hf) (stationaryPoint hg)))) <\n    padicNorm p (↑f (max N (max (stationaryPoint hf) (stationaryPoint hg)))) -\n      padicNorm p (↑g (max N (max (stationaryPoint hf) (stationaryPoint hg))))\nhpne : padicNorm p (↑f i) ≠ padicNorm p (-↑g i)\n⊢ padicNorm p (↑f i) < padicNorm p (↑f i)\n[PROOFSTEP]\napply lt_of_lt_of_le hN'\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\nhfg : f ≈ g\nhpn : 0 < padicNorm p (↑f (stationaryPoint hf)) - padicNorm p (↑g (stationaryPoint hg))\nN : ℕ\nhlt :\n  padicNorm p (↑g (max N (max (stationaryPoint hf) (stationaryPoint hg)))) <\n    padicNorm p (↑f (max N (max (stationaryPoint hf) (stationaryPoint hg))))\nh :\n  padicNorm p (↑f (max N (max (stationaryPoint hf) (stationaryPoint hg)))) ≠\n    padicNorm p (↑g (max N (max (stationaryPoint hf) (stationaryPoint hg))))\nhN :\n  ∀ (j : ℕ),\n    j ≥ N → padicNorm p (↑(f - g) j) < padicNorm p (↑f (stationaryPoint hf)) - padicNorm p (↑g (stationaryPoint hg))\ni : ℕ := max N (max (stationaryPoint hf) (stationaryPoint hg))\nhi : N ≤ i\nhN' :\n  padicNorm p (↑f (max N (max (stationaryPoint hf) (stationaryPoint hg)))) <\n    padicNorm p (↑f (max N (max (stationaryPoint hf) (stationaryPoint hg)))) -\n      padicNorm p (↑g (max N (max (stationaryPoint hf) (stationaryPoint hg))))\nhpne : padicNorm p (↑f i) ≠ padicNorm p (-↑g i)\n⊢ padicNorm p (↑f (max N (max (stationaryPoint hf) (stationaryPoint hg)))) -\n      padicNorm p (↑g (max N (max (stationaryPoint hf) (stationaryPoint hg)))) ≤\n    padicNorm p (↑f i)\n[PROOFSTEP]\napply sub_le_self\n[GOAL]\ncase a\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\nhfg : f ≈ g\nhpn : 0 < padicNorm p (↑f (stationaryPoint hf)) - padicNorm p (↑g (stationaryPoint hg))\nN : ℕ\nhlt :\n  padicNorm p (↑g (max N (max (stationaryPoint hf) (stationaryPoint hg)))) <\n    padicNorm p (↑f (max N (max (stationaryPoint hf) (stationaryPoint hg))))\nh :\n  padicNorm p (↑f (max N (max (stationaryPoint hf) (stationaryPoint hg)))) ≠\n    padicNorm p (↑g (max N (max (stationaryPoint hf) (stationaryPoint hg))))\nhN :\n  ∀ (j : ℕ),\n    j ≥ N → padicNorm p (↑(f - g) j) < padicNorm p (↑f (stationaryPoint hf)) - padicNorm p (↑g (stationaryPoint hg))\ni : ℕ := max N (max (stationaryPoint hf) (stationaryPoint hg))\nhi : N ≤ i\nhN' :\n  padicNorm p (↑f (max N (max (stationaryPoint hf) (stationaryPoint hg)))) <\n    padicNorm p (↑f (max N (max (stationaryPoint hf) (stationaryPoint hg)))) -\n      padicNorm p (↑g (max N (max (stationaryPoint hf) (stationaryPoint hg))))\nhpne : padicNorm p (↑f i) ≠ padicNorm p (-↑g i)\n⊢ 0 ≤ padicNorm p (↑g (max N (max (stationaryPoint hf) (stationaryPoint hg))))\n[PROOFSTEP]\napply padicNorm.nonneg\n[GOAL]\ncase intro\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\nhfg : f ≈ g\nhpn : 0 < padicNorm p (↑f (stationaryPoint hf)) - padicNorm p (↑g (stationaryPoint hg))\nN : ℕ\nhlt :\n  padicNorm p (↑g (max N (max (stationaryPoint hf) (stationaryPoint hg)))) <\n    padicNorm p (↑f (max N (max (stationaryPoint hf) (stationaryPoint hg))))\nh :\n  padicNorm p (↑f (max N (max (stationaryPoint hf) (stationaryPoint hg)))) ≠\n    padicNorm p (↑g (max N (max (stationaryPoint hf) (stationaryPoint hg))))\nhN :\n  ∀ (j : ℕ),\n    j ≥ N → padicNorm p (↑(f - g) j) < padicNorm p (↑f (stationaryPoint hf)) - padicNorm p (↑g (stationaryPoint hg))\ni : ℕ := max N (max (stationaryPoint hf) (stationaryPoint hg))\nhi : N ≤ i\nhN' :\n  padicNorm p (↑f (max N (max (stationaryPoint hf) (stationaryPoint hg)))) <\n    padicNorm p (↑f (max N (max (stationaryPoint hf) (stationaryPoint hg)))) -\n      padicNorm p (↑g (max N (max (stationaryPoint hf) (stationaryPoint hg))))\nhpne : padicNorm p (↑f i) ≠ padicNorm p (-↑g i)\nthis : padicNorm p (↑f i) < padicNorm p (↑f i)\n⊢ False\n[PROOFSTEP]\nexact lt_irrefl _ this\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\nhfg : f ≈ g\n⊢ padicNorm p (↑f (stationaryPoint hf)) = padicNorm p (↑g (stationaryPoint hg))\n[PROOFSTEP]\nby_contra h\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\nhfg : f ≈ g\nh : ¬padicNorm p (↑f (stationaryPoint hf)) = padicNorm p (↑g (stationaryPoint hg))\n⊢ False\n[PROOFSTEP]\ncases' Decidable.em (padicNorm p (g (stationaryPoint hg)) < padicNorm p (f (stationaryPoint hf))) with hlt hnlt\n[GOAL]\ncase inl\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\nhfg : f ≈ g\nh : ¬padicNorm p (↑f (stationaryPoint hf)) = padicNorm p (↑g (stationaryPoint hg))\nhlt : padicNorm p (↑g (stationaryPoint hg)) < padicNorm p (↑f (stationaryPoint hf))\n⊢ False\n[PROOFSTEP]\nexact norm_eq_of_equiv_aux hf hg hfg h hlt\n[GOAL]\ncase inr\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\nhfg : f ≈ g\nh : ¬padicNorm p (↑f (stationaryPoint hf)) = padicNorm p (↑g (stationaryPoint hg))\nhnlt : ¬padicNorm p (↑g (stationaryPoint hg)) < padicNorm p (↑f (stationaryPoint hf))\n⊢ False\n[PROOFSTEP]\napply norm_eq_of_equiv_aux hg hf (Setoid.symm hfg) (Ne.symm h)\n[GOAL]\ncase inr\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\nhfg : f ≈ g\nh : ¬padicNorm p (↑f (stationaryPoint hf)) = padicNorm p (↑g (stationaryPoint hg))\nhnlt : ¬padicNorm p (↑g (stationaryPoint hg)) < padicNorm p (↑f (stationaryPoint hf))\n⊢ padicNorm p (↑f (stationaryPoint hf)) < padicNorm p (↑g (stationaryPoint hg))\n[PROOFSTEP]\napply lt_of_le_of_ne\n[GOAL]\ncase inr.a\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\nhfg : f ≈ g\nh : ¬padicNorm p (↑f (stationaryPoint hf)) = padicNorm p (↑g (stationaryPoint hg))\nhnlt : ¬padicNorm p (↑g (stationaryPoint hg)) < padicNorm p (↑f (stationaryPoint hf))\n⊢ padicNorm p (↑f (stationaryPoint hf)) ≤ padicNorm p (↑g (stationaryPoint hg))\ncase inr.a\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\nhfg : f ≈ g\nh : ¬padicNorm p (↑f (stationaryPoint hf)) = padicNorm p (↑g (stationaryPoint hg))\nhnlt : ¬padicNorm p (↑g (stationaryPoint hg)) < padicNorm p (↑f (stationaryPoint hf))\n⊢ padicNorm p (↑f (stationaryPoint hf)) ≠ padicNorm p (↑g (stationaryPoint hg))\n[PROOFSTEP]\napply le_of_not_gt hnlt\n[GOAL]\ncase inr.a\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\nhfg : f ≈ g\nh : ¬padicNorm p (↑f (stationaryPoint hf)) = padicNorm p (↑g (stationaryPoint hg))\nhnlt : ¬padicNorm p (↑g (stationaryPoint hg)) < padicNorm p (↑f (stationaryPoint hf))\n⊢ padicNorm p (↑f (stationaryPoint hf)) ≠ padicNorm p (↑g (stationaryPoint hg))\n[PROOFSTEP]\napply h\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhfg : f ≈ g\nhf : f ≈ 0\n⊢ norm f = norm g\n[PROOFSTEP]\nhave hg : g ≈ 0 := Setoid.trans (Setoid.symm hfg) hf\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhfg : f ≈ g\nhf : f ≈ 0\nhg : g ≈ 0\n⊢ norm f = norm g\n[PROOFSTEP]\nsimp [norm, hf, hg]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhfg : f ≈ g\nhf : ¬f ≈ 0\n⊢ norm f = norm g\n[PROOFSTEP]\nhave hg : ¬g ≈ 0 := hf ∘ Setoid.trans hfg\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhfg : f ≈ g\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\n⊢ norm f = norm g\n[PROOFSTEP]\nunfold norm\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhfg : f ≈ g\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\n⊢ (if hf : f ≈ 0 then 0 else padicNorm p (↑f (stationaryPoint hf))) =\n    if hf : g ≈ 0 then 0 else padicNorm p (↑g (stationaryPoint hf))\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhfg : f ≈ g\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\n⊢ padicNorm p (↑f (stationaryPoint hf)) = padicNorm p (↑g (stationaryPoint hg))\n[PROOFSTEP]\nexact norm_eq_of_equiv hf hg hfg\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhfg : ¬f + g ≈ 0\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\n⊢ norm (f + g) ≤ max (norm f) (norm g)\n[PROOFSTEP]\nunfold norm\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhfg : ¬f + g ≈ 0\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\n⊢ (if hf : f + g ≈ 0 then 0 else padicNorm p (↑(f + g) (stationaryPoint hf))) ≤\n    max (if hf : f ≈ 0 then 0 else padicNorm p (↑f (stationaryPoint hf)))\n      (if hf : g ≈ 0 then 0 else padicNorm p (↑g (stationaryPoint hf)))\n[PROOFSTEP]\nsplit_ifs\n  -- Porting note: originally `padic_index_simp [hfg, hf, hg]`\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhfg : ¬f + g ≈ 0\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\n⊢ padicNorm p (↑(f + g) (stationaryPoint hfg)) ≤\n    max (padicNorm p (↑f (stationaryPoint hf))) (padicNorm p (↑g (stationaryPoint hg)))\n[PROOFSTEP]\nrw [lift_index_left_left hfg, lift_index_left hf, lift_index_right hg]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhfg : ¬f + g ≈ 0\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\n⊢ padicNorm p (↑(f + g) (max (stationaryPoint hfg) (max ?v2 ?v3))) ≤\n    max (padicNorm p (↑f (max ?v1 (max (stationaryPoint hf) ?v3))))\n      (padicNorm p (↑g (max ?v1 (max ?v2 (stationaryPoint hg)))))\ncase v1\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhfg : ¬f + g ≈ 0\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\n⊢ ℕ\ncase v2\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhfg : ¬f + g ≈ 0\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\n⊢ ℕ\ncase v2\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhfg : ¬f + g ≈ 0\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\n⊢ ℕ\ncase v3\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhfg : ¬f + g ≈ 0\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\n⊢ ℕ\ncase v1\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhfg : ¬f + g ≈ 0\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\n⊢ ℕ\ncase v3\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhfg : ¬f + g ≈ 0\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\n⊢ ℕ\ncase v1\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhfg : ¬f + g ≈ 0\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\n⊢ ℕ\ncase v3\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhfg : ¬f + g ≈ 0\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\n⊢ ℕ\ncase v2\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhfg : ¬f + g ≈ 0\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\n⊢ ℕ\ncase v3\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhfg : ¬f + g ≈ 0\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\n⊢ ℕ\ncase v2\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhfg : ¬f + g ≈ 0\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\n⊢ ℕ\ncase v3 p : ℕ hp : Fact (Nat.Prime p) f g : PadicSeq p hfg : ¬f + g ≈ 0 hf : ¬f ≈ 0 hg : ¬g ≈ 0 ⊢ ℕ\n[PROOFSTEP]\napply padicNorm.nonarchimedean\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhfg : f + g ≈ 0\n⊢ norm (f + g) ≤ max (norm f) (norm g)\n[PROOFSTEP]\nhave : 0 ≤ max f.norm g.norm := le_max_of_le_left (norm_nonneg _)\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhfg : f + g ≈ 0\nthis : 0 ≤ max (norm f) (norm g)\n⊢ norm (f + g) ≤ max (norm f) (norm g)\n[PROOFSTEP]\nsimpa only [hfg, norm]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhfg : ¬f + g ≈ 0\nhf : f ≈ 0\n⊢ norm (f + g) ≤ max (norm f) (norm g)\n[PROOFSTEP]\nhave hfg' : f + g ≈ g := by\n  change LimZero (f - 0) at hf \n  show LimZero (f + g - g); · simpa only [sub_zero, add_sub_cancel] using hf\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhfg : ¬f + g ≈ 0\nhf : f ≈ 0\n⊢ f + g ≈ g\n[PROOFSTEP]\nchange LimZero (f - 0) at hf \n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhfg : ¬f + g ≈ 0\nhf : LimZero (f - 0)\n⊢ f + g ≈ g\n[PROOFSTEP]\nshow LimZero (f + g - g)\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhfg : ¬f + g ≈ 0\nhf : LimZero (f - 0)\n⊢ LimZero (f + g - g)\n[PROOFSTEP]\nsimpa only [sub_zero, add_sub_cancel] using hf\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhfg : ¬f + g ≈ 0\nhf : f ≈ 0\nhfg' : f + g ≈ g\n⊢ norm (f + g) ≤ max (norm f) (norm g)\n[PROOFSTEP]\nhave hcfg : (f + g).norm = g.norm := norm_equiv hfg'\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhfg : ¬f + g ≈ 0\nhf : f ≈ 0\nhfg' : f + g ≈ g\nhcfg : norm (f + g) = norm g\n⊢ norm (f + g) ≤ max (norm f) (norm g)\n[PROOFSTEP]\nhave hcl : f.norm = 0 := (norm_zero_iff f).2 hf\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhfg : ¬f + g ≈ 0\nhf : f ≈ 0\nhfg' : f + g ≈ g\nhcfg : norm (f + g) = norm g\nhcl : norm f = 0\n⊢ norm (f + g) ≤ max (norm f) (norm g)\n[PROOFSTEP]\nhave : max f.norm g.norm = g.norm := by rw [hcl]; exact max_eq_right (norm_nonneg _)\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhfg : ¬f + g ≈ 0\nhf : f ≈ 0\nhfg' : f + g ≈ g\nhcfg : norm (f + g) = norm g\nhcl : norm f = 0\n⊢ max (norm f) (norm g) = norm g\n[PROOFSTEP]\nrw [hcl]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhfg : ¬f + g ≈ 0\nhf : f ≈ 0\nhfg' : f + g ≈ g\nhcfg : norm (f + g) = norm g\nhcl : norm f = 0\n⊢ max 0 (norm g) = norm g\n[PROOFSTEP]\nexact max_eq_right (norm_nonneg _)\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhfg : ¬f + g ≈ 0\nhf : f ≈ 0\nhfg' : f + g ≈ g\nhcfg : norm (f + g) = norm g\nhcl : norm f = 0\nthis : max (norm f) (norm g) = norm g\n⊢ norm (f + g) ≤ max (norm f) (norm g)\n[PROOFSTEP]\nrw [this, hcfg]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhfg : ¬f + g ≈ 0\nhf : ¬f ≈ 0\nhg : g ≈ 0\n⊢ norm (f + g) ≤ max (norm f) (norm g)\n[PROOFSTEP]\nhave hfg' : f + g ≈ f := by\n  change LimZero (g - 0) at hg \n  show LimZero (f + g - f); · simpa only [add_sub_cancel', sub_zero] using hg\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhfg : ¬f + g ≈ 0\nhf : ¬f ≈ 0\nhg : g ≈ 0\n⊢ f + g ≈ f\n[PROOFSTEP]\nchange LimZero (g - 0) at hg \n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhfg : ¬f + g ≈ 0\nhf : ¬f ≈ 0\nhg : LimZero (g - 0)\n⊢ f + g ≈ f\n[PROOFSTEP]\nshow LimZero (f + g - f)\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhfg : ¬f + g ≈ 0\nhf : ¬f ≈ 0\nhg : LimZero (g - 0)\n⊢ LimZero (f + g - f)\n[PROOFSTEP]\nsimpa only [add_sub_cancel', sub_zero] using hg\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhfg : ¬f + g ≈ 0\nhf : ¬f ≈ 0\nhg : g ≈ 0\nhfg' : f + g ≈ f\n⊢ norm (f + g) ≤ max (norm f) (norm g)\n[PROOFSTEP]\nhave hcfg : (f + g).norm = f.norm := norm_equiv hfg'\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhfg : ¬f + g ≈ 0\nhf : ¬f ≈ 0\nhg : g ≈ 0\nhfg' : f + g ≈ f\nhcfg : norm (f + g) = norm f\n⊢ norm (f + g) ≤ max (norm f) (norm g)\n[PROOFSTEP]\nhave hcl : g.norm = 0 := (norm_zero_iff g).2 hg\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhfg : ¬f + g ≈ 0\nhf : ¬f ≈ 0\nhg : g ≈ 0\nhfg' : f + g ≈ f\nhcfg : norm (f + g) = norm f\nhcl : norm g = 0\n⊢ norm (f + g) ≤ max (norm f) (norm g)\n[PROOFSTEP]\nhave : max f.norm g.norm = f.norm := by rw [hcl]; exact max_eq_left (norm_nonneg _)\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhfg : ¬f + g ≈ 0\nhf : ¬f ≈ 0\nhg : g ≈ 0\nhfg' : f + g ≈ f\nhcfg : norm (f + g) = norm f\nhcl : norm g = 0\n⊢ max (norm f) (norm g) = norm f\n[PROOFSTEP]\nrw [hcl]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhfg : ¬f + g ≈ 0\nhf : ¬f ≈ 0\nhg : g ≈ 0\nhfg' : f + g ≈ f\nhcfg : norm (f + g) = norm f\nhcl : norm g = 0\n⊢ max (norm f) 0 = norm f\n[PROOFSTEP]\nexact max_eq_left (norm_nonneg _)\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhfg : ¬f + g ≈ 0\nhf : ¬f ≈ 0\nhg : g ≈ 0\nhfg' : f + g ≈ f\nhcfg : norm (f + g) = norm f\nhcl : norm g = 0\nthis : max (norm f) (norm g) = norm f\n⊢ norm (f + g) ≤ max (norm f) (norm g)\n[PROOFSTEP]\nrw [this, hcfg]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nh : ∀ (k : ℕ), padicNorm p (↑f k) = padicNorm p (↑g k)\nhf : f ≈ 0\n⊢ norm f = norm g\n[PROOFSTEP]\nhave hg : g ≈ 0 := equiv_zero_of_val_eq_of_equiv_zero h hf\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nh : ∀ (k : ℕ), padicNorm p (↑f k) = padicNorm p (↑g k)\nhf : f ≈ 0\nhg : g ≈ 0\n⊢ norm f = norm g\n[PROOFSTEP]\nsimp only [hf, hg, norm, dif_pos]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nh : ∀ (k : ℕ), padicNorm p (↑f k) = padicNorm p (↑g k)\nhf : ¬f ≈ 0\n⊢ norm f = norm g\n[PROOFSTEP]\nhave hg : ¬g ≈ 0 := fun hg ↦\n  hf <| equiv_zero_of_val_eq_of_equiv_zero (by simp only [h, forall_const, eq_self_iff_true]) hg\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nh : ∀ (k : ℕ), padicNorm p (↑f k) = padicNorm p (↑g k)\nhf : ¬f ≈ 0\nhg : g ≈ 0\n⊢ ∀ (k : ℕ), padicNorm p (↑g k) = padicNorm p (↑f k)\n[PROOFSTEP]\nsimp only [h, forall_const, eq_self_iff_true]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nh : ∀ (k : ℕ), padicNorm p (↑f k) = padicNorm p (↑g k)\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\n⊢ norm f = norm g\n[PROOFSTEP]\nsimp only [hg, hf, norm, dif_neg, not_false_iff]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nh : ∀ (k : ℕ), padicNorm p (↑f k) = padicNorm p (↑g k)\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\n⊢ padicNorm p (↑f (stationaryPoint (_ : ¬f ≈ 0))) = padicNorm p (↑g (stationaryPoint (_ : ¬g ≈ 0)))\n[PROOFSTEP]\nlet i := max (stationaryPoint hf) (stationaryPoint hg)\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nh : ∀ (k : ℕ), padicNorm p (↑f k) = padicNorm p (↑g k)\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\ni : ℕ := max (stationaryPoint hf) (stationaryPoint hg)\n⊢ padicNorm p (↑f (stationaryPoint (_ : ¬f ≈ 0))) = padicNorm p (↑g (stationaryPoint (_ : ¬g ≈ 0)))\n[PROOFSTEP]\nhave hpf : padicNorm p (f (stationaryPoint hf)) = padicNorm p (f i) :=\n  by\n  apply stationaryPoint_spec\n  apply le_max_left\n  exact le_rfl\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nh : ∀ (k : ℕ), padicNorm p (↑f k) = padicNorm p (↑g k)\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\ni : ℕ := max (stationaryPoint hf) (stationaryPoint hg)\n⊢ padicNorm p (↑f (stationaryPoint hf)) = padicNorm p (↑f i)\n[PROOFSTEP]\napply stationaryPoint_spec\n[GOAL]\ncase a\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nh : ∀ (k : ℕ), padicNorm p (↑f k) = padicNorm p (↑g k)\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\ni : ℕ := max (stationaryPoint hf) (stationaryPoint hg)\n⊢ stationaryPoint ?hf ≤ i\ncase a\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nh : ∀ (k : ℕ), padicNorm p (↑f k) = padicNorm p (↑g k)\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\ni : ℕ := max (stationaryPoint hf) (stationaryPoint hg)\n⊢ stationaryPoint ?hf ≤ stationaryPoint hf\ncase hf\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nh : ∀ (k : ℕ), padicNorm p (↑f k) = padicNorm p (↑g k)\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\ni : ℕ := max (stationaryPoint hf) (stationaryPoint hg)\n⊢ ¬f ≈ 0\n[PROOFSTEP]\napply le_max_left\n[GOAL]\ncase a\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nh : ∀ (k : ℕ), padicNorm p (↑f k) = padicNorm p (↑g k)\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\ni : ℕ := max (stationaryPoint hf) (stationaryPoint hg)\n⊢ stationaryPoint hf ≤ stationaryPoint hf\n[PROOFSTEP]\nexact le_rfl\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nh : ∀ (k : ℕ), padicNorm p (↑f k) = padicNorm p (↑g k)\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\ni : ℕ := max (stationaryPoint hf) (stationaryPoint hg)\nhpf : padicNorm p (↑f (stationaryPoint hf)) = padicNorm p (↑f i)\n⊢ padicNorm p (↑f (stationaryPoint (_ : ¬f ≈ 0))) = padicNorm p (↑g (stationaryPoint (_ : ¬g ≈ 0)))\n[PROOFSTEP]\nhave hpg : padicNorm p (g (stationaryPoint hg)) = padicNorm p (g i) :=\n  by\n  apply stationaryPoint_spec\n  apply le_max_right\n  exact le_rfl\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nh : ∀ (k : ℕ), padicNorm p (↑f k) = padicNorm p (↑g k)\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\ni : ℕ := max (stationaryPoint hf) (stationaryPoint hg)\nhpf : padicNorm p (↑f (stationaryPoint hf)) = padicNorm p (↑f i)\n⊢ padicNorm p (↑g (stationaryPoint hg)) = padicNorm p (↑g i)\n[PROOFSTEP]\napply stationaryPoint_spec\n[GOAL]\ncase a\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nh : ∀ (k : ℕ), padicNorm p (↑f k) = padicNorm p (↑g k)\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\ni : ℕ := max (stationaryPoint hf) (stationaryPoint hg)\nhpf : padicNorm p (↑f (stationaryPoint hf)) = padicNorm p (↑f i)\n⊢ stationaryPoint ?hf ≤ i\ncase a\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nh : ∀ (k : ℕ), padicNorm p (↑f k) = padicNorm p (↑g k)\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\ni : ℕ := max (stationaryPoint hf) (stationaryPoint hg)\nhpf : padicNorm p (↑f (stationaryPoint hf)) = padicNorm p (↑f i)\n⊢ stationaryPoint ?hf ≤ stationaryPoint hg\ncase hf\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nh : ∀ (k : ℕ), padicNorm p (↑f k) = padicNorm p (↑g k)\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\ni : ℕ := max (stationaryPoint hf) (stationaryPoint hg)\nhpf : padicNorm p (↑f (stationaryPoint hf)) = padicNorm p (↑f i)\n⊢ ¬g ≈ 0\n[PROOFSTEP]\napply le_max_right\n[GOAL]\ncase a\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nh : ∀ (k : ℕ), padicNorm p (↑f k) = padicNorm p (↑g k)\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\ni : ℕ := max (stationaryPoint hf) (stationaryPoint hg)\nhpf : padicNorm p (↑f (stationaryPoint hf)) = padicNorm p (↑f i)\n⊢ stationaryPoint hg ≤ stationaryPoint hg\n[PROOFSTEP]\nexact le_rfl\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nh : ∀ (k : ℕ), padicNorm p (↑f k) = padicNorm p (↑g k)\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\ni : ℕ := max (stationaryPoint hf) (stationaryPoint hg)\nhpf : padicNorm p (↑f (stationaryPoint hf)) = padicNorm p (↑f i)\nhpg : padicNorm p (↑g (stationaryPoint hg)) = padicNorm p (↑g i)\n⊢ padicNorm p (↑f (stationaryPoint (_ : ¬f ≈ 0))) = padicNorm p (↑g (stationaryPoint (_ : ¬g ≈ 0)))\n[PROOFSTEP]\nrw [hpf, hpg, h]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\na : PadicSeq p\n⊢ ∀ (k : ℕ), padicNorm p (↑(-a) k) = padicNorm p (↑a k)\n[PROOFSTEP]\nsimp\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nh : f + g ≈ 0\n⊢ norm f = norm g\n[PROOFSTEP]\nhave : LimZero (f + g - 0) := h\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nh : f + g ≈ 0\nthis : LimZero (f + g - 0)\n⊢ norm f = norm g\n[PROOFSTEP]\nhave : f ≈ -g := show LimZero (f - -g) by simpa only [sub_zero, sub_neg_eq_add]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nh : f + g ≈ 0\nthis : LimZero (f + g - 0)\n⊢ LimZero (f - -g)\n[PROOFSTEP]\nsimpa only [sub_zero, sub_neg_eq_add]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nh : f + g ≈ 0\nthis✝ : LimZero (f + g - 0)\nthis : f ≈ -g\n⊢ norm f = norm g\n[PROOFSTEP]\nhave : f.norm = (-g).norm := norm_equiv this\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nh : f + g ≈ 0\nthis✝¹ : LimZero (f + g - 0)\nthis✝ : f ≈ -g\nthis : norm f = norm (-g)\n⊢ norm f = norm g\n[PROOFSTEP]\nsimpa only [norm_neg] using this\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhfgne : norm f ≠ norm g\nhfg : ¬f + g ≈ 0\nhf : f ≈ 0\n⊢ norm (f + g) = max (norm f) (norm g)\n[PROOFSTEP]\nhave : LimZero (f - 0) := hf\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhfgne : norm f ≠ norm g\nhfg : ¬f + g ≈ 0\nhf : f ≈ 0\nthis : LimZero (f - 0)\n⊢ norm (f + g) = max (norm f) (norm g)\n[PROOFSTEP]\nhave : f + g ≈ g := show LimZero (f + g - g) by simpa only [sub_zero, add_sub_cancel]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhfgne : norm f ≠ norm g\nhfg : ¬f + g ≈ 0\nhf : f ≈ 0\nthis : LimZero (f - 0)\n⊢ LimZero (f + g - g)\n[PROOFSTEP]\nsimpa only [sub_zero, add_sub_cancel]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhfgne : norm f ≠ norm g\nhfg : ¬f + g ≈ 0\nhf : f ≈ 0\nthis✝ : LimZero (f - 0)\nthis : f + g ≈ g\n⊢ norm (f + g) = max (norm f) (norm g)\n[PROOFSTEP]\nhave h1 : (f + g).norm = g.norm := norm_equiv this\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhfgne : norm f ≠ norm g\nhfg : ¬f + g ≈ 0\nhf : f ≈ 0\nthis✝ : LimZero (f - 0)\nthis : f + g ≈ g\nh1 : norm (f + g) = norm g\n⊢ norm (f + g) = max (norm f) (norm g)\n[PROOFSTEP]\nhave h2 : f.norm = 0 := (norm_zero_iff _).2 hf\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhfgne : norm f ≠ norm g\nhfg : ¬f + g ≈ 0\nhf : f ≈ 0\nthis✝ : LimZero (f - 0)\nthis : f + g ≈ g\nh1 : norm (f + g) = norm g\nh2 : norm f = 0\n⊢ norm (f + g) = max (norm f) (norm g)\n[PROOFSTEP]\nrw [h1, h2, max_eq_right (norm_nonneg _)]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhfgne : norm f ≠ norm g\nhfg : ¬f + g ≈ 0\nhf : ¬f ≈ 0\nhg : g ≈ 0\n⊢ norm (f + g) = max (norm f) (norm g)\n[PROOFSTEP]\nhave : LimZero (g - 0) := hg\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhfgne : norm f ≠ norm g\nhfg : ¬f + g ≈ 0\nhf : ¬f ≈ 0\nhg : g ≈ 0\nthis : LimZero (g - 0)\n⊢ norm (f + g) = max (norm f) (norm g)\n[PROOFSTEP]\nhave : f + g ≈ f := show LimZero (f + g - f) by rw [add_sub_cancel']; simpa only [sub_zero]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhfgne : norm f ≠ norm g\nhfg : ¬f + g ≈ 0\nhf : ¬f ≈ 0\nhg : g ≈ 0\nthis : LimZero (g - 0)\n⊢ LimZero (f + g - f)\n[PROOFSTEP]\nrw [add_sub_cancel']\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhfgne : norm f ≠ norm g\nhfg : ¬f + g ≈ 0\nhf : ¬f ≈ 0\nhg : g ≈ 0\nthis : LimZero (g - 0)\n⊢ LimZero g\n[PROOFSTEP]\nsimpa only [sub_zero]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhfgne : norm f ≠ norm g\nhfg : ¬f + g ≈ 0\nhf : ¬f ≈ 0\nhg : g ≈ 0\nthis✝ : LimZero (g - 0)\nthis : f + g ≈ f\n⊢ norm (f + g) = max (norm f) (norm g)\n[PROOFSTEP]\nhave h1 : (f + g).norm = f.norm := norm_equiv this\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhfgne : norm f ≠ norm g\nhfg : ¬f + g ≈ 0\nhf : ¬f ≈ 0\nhg : g ≈ 0\nthis✝ : LimZero (g - 0)\nthis : f + g ≈ f\nh1 : norm (f + g) = norm f\n⊢ norm (f + g) = max (norm f) (norm g)\n[PROOFSTEP]\nhave h2 : g.norm = 0 := (norm_zero_iff _).2 hg\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhfgne : norm f ≠ norm g\nhfg : ¬f + g ≈ 0\nhf : ¬f ≈ 0\nhg : g ≈ 0\nthis✝ : LimZero (g - 0)\nthis : f + g ≈ f\nh1 : norm (f + g) = norm f\nh2 : norm g = 0\n⊢ norm (f + g) = max (norm f) (norm g)\n[PROOFSTEP]\nrw [h1, h2, max_eq_left (norm_nonneg _)]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhfgne : norm f ≠ norm g\nhfg : ¬f + g ≈ 0\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\n⊢ norm (f + g) = max (norm f) (norm g)\n[PROOFSTEP]\nunfold norm at hfgne ⊢\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhfgne :\n  (if hf : f ≈ 0 then 0 else padicNorm p (↑f (stationaryPoint hf))) ≠\n    if hf : g ≈ 0 then 0 else padicNorm p (↑g (stationaryPoint hf))\nhfg : ¬f + g ≈ 0\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\n⊢ (if hf : f + g ≈ 0 then 0 else padicNorm p (↑(f + g) (stationaryPoint hf))) =\n    max (if hf : f ≈ 0 then 0 else padicNorm p (↑f (stationaryPoint hf)))\n      (if hf : g ≈ 0 then 0 else padicNorm p (↑g (stationaryPoint hf)))\n[PROOFSTEP]\nsplit_ifs at hfgne ⊢\n  -- Porting note: originally `padic_index_simp [hfg, hf, hg] at hfgne ⊢`\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhfg : ¬f + g ≈ 0\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\nhfgne : padicNorm p (↑f (stationaryPoint hf)) ≠ padicNorm p (↑g (stationaryPoint hg))\n⊢ padicNorm p (↑(f + g) (stationaryPoint hfg)) =\n    max (padicNorm p (↑f (stationaryPoint hf))) (padicNorm p (↑g (stationaryPoint hg)))\n[PROOFSTEP]\nrw [lift_index_left hf, lift_index_right hg] at hfgne \n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhfg : ¬f + g ≈ 0\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\nhfgne✝¹ : padicNorm p (↑f (stationaryPoint hf)) ≠ padicNorm p (↑g (stationaryPoint hg))\nhfgne✝ : padicNorm p (↑f (max ?v1 (max (stationaryPoint hf) ?v3))) ≠ padicNorm p (↑g (stationaryPoint hg))\nhfgne :\n  padicNorm p (↑f (max ?v1 (max (stationaryPoint hf) ?v3))) ≠ padicNorm p (↑g (max ?v1 (max ?v2 (stationaryPoint hg))))\n⊢ padicNorm p (↑(f + g) (stationaryPoint hfg)) =\n    max (padicNorm p (↑f (stationaryPoint hf))) (padicNorm p (↑g (stationaryPoint hg)))\ncase v1\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhfg : ¬f + g ≈ 0\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\nhfgne✝ : padicNorm p (↑f (stationaryPoint hf)) ≠ padicNorm p (↑g (stationaryPoint hg))\nhfgne : padicNorm p (↑f (max ?v1 (max (stationaryPoint hf) ?v3))) ≠ padicNorm p (↑g (stationaryPoint hg))\n⊢ ℕ\ncase v2\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhfg : ¬f + g ≈ 0\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\nhfgne✝ : padicNorm p (↑f (stationaryPoint hf)) ≠ padicNorm p (↑g (stationaryPoint hg))\nhfgne : padicNorm p (↑f (max ?v1 (max (stationaryPoint hf) ?v3))) ≠ padicNorm p (↑g (stationaryPoint hg))\n⊢ ℕ\ncase v1\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhfg : ¬f + g ≈ 0\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\nhfgne : padicNorm p (↑f (stationaryPoint hf)) ≠ padicNorm p (↑g (stationaryPoint hg))\n⊢ ℕ\ncase v3\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhfg : ¬f + g ≈ 0\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\nhfgne : padicNorm p (↑f (stationaryPoint hf)) ≠ padicNorm p (↑g (stationaryPoint hg))\n⊢ ℕ\ncase v1\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhfg : ¬f + g ≈ 0\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\nhfgne : padicNorm p (↑f (stationaryPoint hf)) ≠ padicNorm p (↑g (stationaryPoint hg))\n⊢ ℕ\ncase v3\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhfg : ¬f + g ≈ 0\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\nhfgne : padicNorm p (↑f (stationaryPoint hf)) ≠ padicNorm p (↑g (stationaryPoint hg))\n⊢ ℕ\n[PROOFSTEP]\nrw [lift_index_left_left hfg, lift_index_left hf, lift_index_right hg]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhfg : ¬f + g ≈ 0\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\nhfgne✝¹ : padicNorm p (↑f (stationaryPoint hf)) ≠ padicNorm p (↑g (stationaryPoint hg))\nhfgne✝ : padicNorm p (↑f (max ?v1 (max (stationaryPoint hf) ?v3))) ≠ padicNorm p (↑g (stationaryPoint hg))\nhfgne :\n  padicNorm p (↑f (max ?v1 (max (stationaryPoint hf) ?v3))) ≠ padicNorm p (↑g (max ?v1 (max ?v2 (stationaryPoint hg))))\n⊢ padicNorm p (↑(f + g) (max (stationaryPoint hfg) (max ?v2 ?v3))) =\n    max (padicNorm p (↑f (max ?v1 (max (stationaryPoint hf) ?v3))))\n      (padicNorm p (↑g (max ?v1 (max ?v2 (stationaryPoint hg)))))\ncase v1\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhfg : ¬f + g ≈ 0\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\nhfgne✝¹ : padicNorm p (↑f (stationaryPoint hf)) ≠ padicNorm p (↑g (stationaryPoint hg))\nhfgne✝ : padicNorm p (↑f (max ?v1 (max (stationaryPoint hf) ?v3))) ≠ padicNorm p (↑g (stationaryPoint hg))\nhfgne :\n  padicNorm p (↑f (max ?v1 (max (stationaryPoint hf) ?v3))) ≠ padicNorm p (↑g (max ?v1 (max ?v2 (stationaryPoint hg))))\n⊢ ℕ\ncase v2\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhfg : ¬f + g ≈ 0\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\nhfgne✝¹ : padicNorm p (↑f (stationaryPoint hf)) ≠ padicNorm p (↑g (stationaryPoint hg))\nhfgne✝ : padicNorm p (↑f (max ?v1 (max (stationaryPoint hf) ?v3))) ≠ padicNorm p (↑g (stationaryPoint hg))\nhfgne :\n  padicNorm p (↑f (max ?v1 (max (stationaryPoint hf) ?v3))) ≠ padicNorm p (↑g (max ?v1 (max ?v2 (stationaryPoint hg))))\n⊢ ℕ\ncase v2\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhfg : ¬f + g ≈ 0\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\nhfgne✝¹ : padicNorm p (↑f (stationaryPoint hf)) ≠ padicNorm p (↑g (stationaryPoint hg))\nhfgne✝ : padicNorm p (↑f (max ?v1 (max (stationaryPoint hf) ?v3))) ≠ padicNorm p (↑g (stationaryPoint hg))\nhfgne :\n  padicNorm p (↑f (max ?v1 (max (stationaryPoint hf) ?v3))) ≠ padicNorm p (↑g (max ?v1 (max ?v2 (stationaryPoint hg))))\n⊢ ℕ\ncase v3\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhfg : ¬f + g ≈ 0\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\nhfgne✝¹ : padicNorm p (↑f (stationaryPoint hf)) ≠ padicNorm p (↑g (stationaryPoint hg))\nhfgne✝ : padicNorm p (↑f (max ?v1 (max (stationaryPoint hf) ?v3))) ≠ padicNorm p (↑g (stationaryPoint hg))\nhfgne :\n  padicNorm p (↑f (max ?v1 (max (stationaryPoint hf) ?v3))) ≠ padicNorm p (↑g (max ?v1 (max ?v2 (stationaryPoint hg))))\n⊢ ℕ\ncase v1\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhfg : ¬f + g ≈ 0\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\nhfgne✝¹ : padicNorm p (↑f (stationaryPoint hf)) ≠ padicNorm p (↑g (stationaryPoint hg))\nhfgne✝ : padicNorm p (↑f (max ?v1 (max (stationaryPoint hf) ?v3))) ≠ padicNorm p (↑g (stationaryPoint hg))\nhfgne :\n  padicNorm p (↑f (max ?v1 (max (stationaryPoint hf) ?v3))) ≠ padicNorm p (↑g (max ?v1 (max ?v2 (stationaryPoint hg))))\n⊢ ℕ\ncase v3\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhfg : ¬f + g ≈ 0\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\nhfgne✝¹ : padicNorm p (↑f (stationaryPoint hf)) ≠ padicNorm p (↑g (stationaryPoint hg))\nhfgne✝ : padicNorm p (↑f (max ?v1 (max (stationaryPoint hf) ?v3))) ≠ padicNorm p (↑g (stationaryPoint hg))\nhfgne :\n  padicNorm p (↑f (max ?v1 (max (stationaryPoint hf) ?v3))) ≠ padicNorm p (↑g (max ?v1 (max ?v2 (stationaryPoint hg))))\n⊢ ℕ\ncase v1\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhfg : ¬f + g ≈ 0\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\nhfgne✝¹ : padicNorm p (↑f (stationaryPoint hf)) ≠ padicNorm p (↑g (stationaryPoint hg))\nhfgne✝ : padicNorm p (↑f (max ?v1 (max (stationaryPoint hf) ?v3))) ≠ padicNorm p (↑g (stationaryPoint hg))\nhfgne :\n  padicNorm p (↑f (max ?v1 (max (stationaryPoint hf) ?v3))) ≠ padicNorm p (↑g (max ?v1 (max ?v2 (stationaryPoint hg))))\n⊢ ℕ\ncase v3\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhfg : ¬f + g ≈ 0\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\nhfgne✝¹ : padicNorm p (↑f (stationaryPoint hf)) ≠ padicNorm p (↑g (stationaryPoint hg))\nhfgne✝ : padicNorm p (↑f (max ?v1 (max (stationaryPoint hf) ?v3))) ≠ padicNorm p (↑g (stationaryPoint hg))\nhfgne :\n  padicNorm p (↑f (max ?v1 (max (stationaryPoint hf) ?v3))) ≠ padicNorm p (↑g (max ?v1 (max ?v2 (stationaryPoint hg))))\n⊢ ℕ\ncase v2\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhfg : ¬f + g ≈ 0\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\nhfgne✝¹ : padicNorm p (↑f (stationaryPoint hf)) ≠ padicNorm p (↑g (stationaryPoint hg))\nhfgne✝ : padicNorm p (↑f (max ?v1 (max (stationaryPoint hf) ?v3))) ≠ padicNorm p (↑g (stationaryPoint hg))\nhfgne :\n  padicNorm p (↑f (max ?v1 (max (stationaryPoint hf) ?v3))) ≠ padicNorm p (↑g (max ?v1 (max ?v2 (stationaryPoint hg))))\n⊢ ℕ\ncase v3\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhfg : ¬f + g ≈ 0\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\nhfgne✝¹ : padicNorm p (↑f (stationaryPoint hf)) ≠ padicNorm p (↑g (stationaryPoint hg))\nhfgne✝ : padicNorm p (↑f (max ?v1 (max (stationaryPoint hf) ?v3))) ≠ padicNorm p (↑g (stationaryPoint hg))\nhfgne :\n  padicNorm p (↑f (max ?v1 (max (stationaryPoint hf) ?v3))) ≠ padicNorm p (↑g (max ?v1 (max ?v2 (stationaryPoint hg))))\n⊢ ℕ\ncase v2\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhfg : ¬f + g ≈ 0\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\nhfgne✝¹ : padicNorm p (↑f (stationaryPoint hf)) ≠ padicNorm p (↑g (stationaryPoint hg))\nhfgne✝ : padicNorm p (↑f (max ?v1 (max (stationaryPoint hf) ?v3))) ≠ padicNorm p (↑g (stationaryPoint hg))\nhfgne :\n  padicNorm p (↑f (max ?v1 (max (stationaryPoint hf) ?v3))) ≠ padicNorm p (↑g (max ?v1 (max ?v2 (stationaryPoint hg))))\n⊢ ℕ\ncase v3\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhfg : ¬f + g ≈ 0\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\nhfgne✝¹ : padicNorm p (↑f (stationaryPoint hf)) ≠ padicNorm p (↑g (stationaryPoint hg))\nhfgne✝ : padicNorm p (↑f (max ?v1 (max (stationaryPoint hf) ?v3))) ≠ padicNorm p (↑g (stationaryPoint hg))\nhfgne :\n  padicNorm p (↑f (max ?v1 (max (stationaryPoint hf) ?v3))) ≠ padicNorm p (↑g (max ?v1 (max ?v2 (stationaryPoint hg))))\n⊢ ℕ\ncase v1\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhfg : ¬f + g ≈ 0\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\nhfgne✝ : padicNorm p (↑f (stationaryPoint hf)) ≠ padicNorm p (↑g (stationaryPoint hg))\nhfgne : padicNorm p (↑f (max ?v1 (max (stationaryPoint hf) ?v3))) ≠ padicNorm p (↑g (stationaryPoint hg))\n⊢ ℕ\ncase v2\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhfg : ¬f + g ≈ 0\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\nhfgne✝ : padicNorm p (↑f (stationaryPoint hf)) ≠ padicNorm p (↑g (stationaryPoint hg))\nhfgne : padicNorm p (↑f (max ?v1 (max (stationaryPoint hf) ?v3))) ≠ padicNorm p (↑g (stationaryPoint hg))\n⊢ ℕ\ncase v1\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhfg : ¬f + g ≈ 0\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\nhfgne : padicNorm p (↑f (stationaryPoint hf)) ≠ padicNorm p (↑g (stationaryPoint hg))\n⊢ ℕ\ncase v3\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhfg : ¬f + g ≈ 0\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\nhfgne : padicNorm p (↑f (stationaryPoint hf)) ≠ padicNorm p (↑g (stationaryPoint hg))\n⊢ ℕ\ncase v1\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhfg : ¬f + g ≈ 0\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\nhfgne : padicNorm p (↑f (stationaryPoint hf)) ≠ padicNorm p (↑g (stationaryPoint hg))\n⊢ ℕ\ncase v3\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : PadicSeq p\nhfg : ¬f + g ≈ 0\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\nhfgne : padicNorm p (↑f (stationaryPoint hf)) ≠ padicNorm p (↑g (stationaryPoint hg))\n⊢ ℕ\n[PROOFSTEP]\nexact padicNorm.add_eq_max_of_ne hfgne\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\n⊢ Zero ℚ_[p]\n[PROOFSTEP]\ninfer_instance\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\n⊢ One ℚ_[p]\n[PROOFSTEP]\ninfer_instance\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\n⊢ Add ℚ_[p]\n[PROOFSTEP]\ninfer_instance\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\n⊢ Mul ℚ_[p]\n[PROOFSTEP]\ninfer_instance\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\n⊢ Sub ℚ_[p]\n[PROOFSTEP]\ninfer_instance\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\n⊢ Neg ℚ_[p]\n[PROOFSTEP]\ninfer_instance\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\n⊢ Div ℚ_[p]\n[PROOFSTEP]\ninfer_instance\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\n⊢ AddCommGroup ℚ_[p]\n[PROOFSTEP]\ninfer_instance\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nq r : ℚ\nheq : q = r\n⊢ const (padicNorm p) q ≈ const (padicNorm p) r\n[PROOFSTEP]\nrw [heq]\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nq r : ℚ\nh : q = r\n⊢ ↑q = ↑r\n[PROOFSTEP]\nrw [h]\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nm n : ℕ\n⊢ ↑m = ↑n → m = n\n[PROOFSTEP]\nrw [← Rat.cast_coe_nat]\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nm n : ℕ\n⊢ ↑↑m = ↑n → m = n\n[PROOFSTEP]\nnorm_cast\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nm n : ℕ\n⊢ m = n → m = n\n[PROOFSTEP]\nexact id\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nq : ℚ_[p]\nr : CauSeq ℚ (padicNorm p)\n⊢ MulHom.toFun\n        { toFun := Quotient.lift PadicSeq.norm (_ : ∀ {f g : PadicSeq p}, f ≈ g → PadicSeq.norm f = PadicSeq.norm g),\n          map_mul' :=\n            (_ :\n              ∀ (q r : ℚ_[p]),\n                Quotient.lift PadicSeq.norm (_ : ∀ {f g : PadicSeq p}, f ≈ g → PadicSeq.norm f = PadicSeq.norm g)\n                    (q * r) =\n                  Quotient.lift PadicSeq.norm (_ : ∀ {f g : PadicSeq p}, f ≈ g → PadicSeq.norm f = PadicSeq.norm g) q *\n                    Quotient.lift PadicSeq.norm (_ : ∀ {f g : PadicSeq p}, f ≈ g → PadicSeq.norm f = PadicSeq.norm g)\n                      r) }\n        (Quotient.mk equiv r) =\n      0 ↔\n    Quotient.mk equiv r = 0\n[PROOFSTEP]\nrw [Padic.zero_def, Quotient.eq]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nq : ℚ_[p]\nr : CauSeq ℚ (padicNorm p)\n⊢ MulHom.toFun\n        { toFun := Quotient.lift PadicSeq.norm (_ : ∀ {f g : PadicSeq p}, f ≈ g → PadicSeq.norm f = PadicSeq.norm g),\n          map_mul' :=\n            (_ :\n              ∀ (q r : ℚ_[p]),\n                Quotient.lift PadicSeq.norm (_ : ∀ {f g : PadicSeq p}, f ≈ g → PadicSeq.norm f = PadicSeq.norm g)\n                    (q * r) =\n                  Quotient.lift PadicSeq.norm (_ : ∀ {f g : PadicSeq p}, f ≈ g → PadicSeq.norm f = PadicSeq.norm g) q *\n                    Quotient.lift PadicSeq.norm (_ : ∀ {f g : PadicSeq p}, f ≈ g → PadicSeq.norm f = PadicSeq.norm g)\n                      r) }\n        (Quotient.mk equiv r) =\n      0 ↔\n    r ≈ 0\n[PROOFSTEP]\nexact PadicSeq.norm_zero_iff r\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nq r : ℚ_[p]\n⊢ MulHom.toFun\n      { toFun := Quotient.lift PadicSeq.norm (_ : ∀ {f g : PadicSeq p}, f ≈ g → PadicSeq.norm f = PadicSeq.norm g),\n        map_mul' :=\n          (_ :\n            ∀ (q r : ℚ_[p]),\n              Quotient.lift PadicSeq.norm (_ : ∀ {f g : PadicSeq p}, f ≈ g → PadicSeq.norm f = PadicSeq.norm g)\n                  (q * r) =\n                Quotient.lift PadicSeq.norm (_ : ∀ {f g : PadicSeq p}, f ≈ g → PadicSeq.norm f = PadicSeq.norm g) q *\n                  Quotient.lift PadicSeq.norm (_ : ∀ {f g : PadicSeq p}, f ≈ g → PadicSeq.norm f = PadicSeq.norm g) r) }\n      (q + r) ≤\n    MulHom.toFun\n        { toFun := Quotient.lift PadicSeq.norm (_ : ∀ {f g : PadicSeq p}, f ≈ g → PadicSeq.norm f = PadicSeq.norm g),\n          map_mul' :=\n            (_ :\n              ∀ (q r : ℚ_[p]),\n                Quotient.lift PadicSeq.norm (_ : ∀ {f g : PadicSeq p}, f ≈ g → PadicSeq.norm f = PadicSeq.norm g)\n                    (q * r) =\n                  Quotient.lift PadicSeq.norm (_ : ∀ {f g : PadicSeq p}, f ≈ g → PadicSeq.norm f = PadicSeq.norm g) q *\n                    Quotient.lift PadicSeq.norm (_ : ∀ {f g : PadicSeq p}, f ≈ g → PadicSeq.norm f = PadicSeq.norm g)\n                      r) }\n        q +\n      MulHom.toFun\n        { toFun := Quotient.lift PadicSeq.norm (_ : ∀ {f g : PadicSeq p}, f ≈ g → PadicSeq.norm f = PadicSeq.norm g),\n          map_mul' :=\n            (_ :\n              ∀ (q r : ℚ_[p]),\n                Quotient.lift PadicSeq.norm (_ : ∀ {f g : PadicSeq p}, f ≈ g → PadicSeq.norm f = PadicSeq.norm g)\n                    (q * r) =\n                  Quotient.lift PadicSeq.norm (_ : ∀ {f g : PadicSeq p}, f ≈ g → PadicSeq.norm f = PadicSeq.norm g) q *\n                    Quotient.lift PadicSeq.norm (_ : ∀ {f g : PadicSeq p}, f ≈ g → PadicSeq.norm f = PadicSeq.norm g)\n                      r) }\n        r\n[PROOFSTEP]\ntrans\n  max ((Quotient.lift PadicSeq.norm <| @PadicSeq.norm_equiv _ _) q)\n    ((Quotient.lift PadicSeq.norm <| @PadicSeq.norm_equiv _ _) r)\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nq r : ℚ_[p]\n⊢ MulHom.toFun\n      { toFun := Quotient.lift PadicSeq.norm (_ : ∀ {f g : PadicSeq p}, f ≈ g → PadicSeq.norm f = PadicSeq.norm g),\n        map_mul' :=\n          (_ :\n            ∀ (q r : ℚ_[p]),\n              Quotient.lift PadicSeq.norm (_ : ∀ {f g : PadicSeq p}, f ≈ g → PadicSeq.norm f = PadicSeq.norm g)\n                  (q * r) =\n                Quotient.lift PadicSeq.norm (_ : ∀ {f g : PadicSeq p}, f ≈ g → PadicSeq.norm f = PadicSeq.norm g) q *\n                  Quotient.lift PadicSeq.norm (_ : ∀ {f g : PadicSeq p}, f ≈ g → PadicSeq.norm f = PadicSeq.norm g) r) }\n      (q + r) ≤\n    max (Quotient.lift PadicSeq.norm (_ : ∀ {f g : PadicSeq p}, f ≈ g → PadicSeq.norm f = PadicSeq.norm g) q)\n      (Quotient.lift PadicSeq.norm (_ : ∀ {f g : PadicSeq p}, f ≈ g → PadicSeq.norm f = PadicSeq.norm g) r)\np : ℕ\nhp : Fact (Nat.Prime p)\nq r : ℚ_[p]\n⊢ max (Quotient.lift PadicSeq.norm (_ : ∀ {f g : PadicSeq p}, f ≈ g → PadicSeq.norm f = PadicSeq.norm g) q)\n      (Quotient.lift PadicSeq.norm (_ : ∀ {f g : PadicSeq p}, f ≈ g → PadicSeq.norm f = PadicSeq.norm g) r) ≤\n    MulHom.toFun\n        { toFun := Quotient.lift PadicSeq.norm (_ : ∀ {f g : PadicSeq p}, f ≈ g → PadicSeq.norm f = PadicSeq.norm g),\n          map_mul' :=\n            (_ :\n              ∀ (q r : ℚ_[p]),\n                Quotient.lift PadicSeq.norm (_ : ∀ {f g : PadicSeq p}, f ≈ g → PadicSeq.norm f = PadicSeq.norm g)\n                    (q * r) =\n                  Quotient.lift PadicSeq.norm (_ : ∀ {f g : PadicSeq p}, f ≈ g → PadicSeq.norm f = PadicSeq.norm g) q *\n                    Quotient.lift PadicSeq.norm (_ : ∀ {f g : PadicSeq p}, f ≈ g → PadicSeq.norm f = PadicSeq.norm g)\n                      r) }\n        q +\n      MulHom.toFun\n        { toFun := Quotient.lift PadicSeq.norm (_ : ∀ {f g : PadicSeq p}, f ≈ g → PadicSeq.norm f = PadicSeq.norm g),\n          map_mul' :=\n            (_ :\n              ∀ (q r : ℚ_[p]),\n                Quotient.lift PadicSeq.norm (_ : ∀ {f g : PadicSeq p}, f ≈ g → PadicSeq.norm f = PadicSeq.norm g)\n                    (q * r) =\n                  Quotient.lift PadicSeq.norm (_ : ∀ {f g : PadicSeq p}, f ≈ g → PadicSeq.norm f = PadicSeq.norm g) q *\n                    Quotient.lift PadicSeq.norm (_ : ∀ {f g : PadicSeq p}, f ≈ g → PadicSeq.norm f = PadicSeq.norm g)\n                      r) }\n        r\n[PROOFSTEP]\nexact Quotient.inductionOn₂ q r <| PadicSeq.norm_nonarchimedean\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nq r : ℚ_[p]\n⊢ max (Quotient.lift PadicSeq.norm (_ : ∀ {f g : PadicSeq p}, f ≈ g → PadicSeq.norm f = PadicSeq.norm g) q)\n      (Quotient.lift PadicSeq.norm (_ : ∀ {f g : PadicSeq p}, f ≈ g → PadicSeq.norm f = PadicSeq.norm g) r) ≤\n    MulHom.toFun\n        { toFun := Quotient.lift PadicSeq.norm (_ : ∀ {f g : PadicSeq p}, f ≈ g → PadicSeq.norm f = PadicSeq.norm g),\n          map_mul' :=\n            (_ :\n              ∀ (q r : ℚ_[p]),\n                Quotient.lift PadicSeq.norm (_ : ∀ {f g : PadicSeq p}, f ≈ g → PadicSeq.norm f = PadicSeq.norm g)\n                    (q * r) =\n                  Quotient.lift PadicSeq.norm (_ : ∀ {f g : PadicSeq p}, f ≈ g → PadicSeq.norm f = PadicSeq.norm g) q *\n                    Quotient.lift PadicSeq.norm (_ : ∀ {f g : PadicSeq p}, f ≈ g → PadicSeq.norm f = PadicSeq.norm g)\n                      r) }\n        q +\n      MulHom.toFun\n        { toFun := Quotient.lift PadicSeq.norm (_ : ∀ {f g : PadicSeq p}, f ≈ g → PadicSeq.norm f = PadicSeq.norm g),\n          map_mul' :=\n            (_ :\n              ∀ (q r : ℚ_[p]),\n                Quotient.lift PadicSeq.norm (_ : ∀ {f g : PadicSeq p}, f ≈ g → PadicSeq.norm f = PadicSeq.norm g)\n                    (q * r) =\n                  Quotient.lift PadicSeq.norm (_ : ∀ {f g : PadicSeq p}, f ≈ g → PadicSeq.norm f = PadicSeq.norm g) q *\n                    Quotient.lift PadicSeq.norm (_ : ∀ {f g : PadicSeq p}, f ≈ g → PadicSeq.norm f = PadicSeq.norm g)\n                      r) }\n        r\n[PROOFSTEP]\nrefine' max_le_add_of_nonneg (Quotient.inductionOn q <| PadicSeq.norm_nonneg) _\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nq r : ℚ_[p]\n⊢ 0 ≤ Quotient.lift PadicSeq.norm (_ : ∀ {f g : PadicSeq p}, f ≈ g → PadicSeq.norm f = PadicSeq.norm g) r\n[PROOFSTEP]\nexact Quotient.inductionOn r <| PadicSeq.norm_nonneg\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : PadicSeq p\nε : ℚ\nhε : 0 < ε\n⊢ ∃ N, ∀ (i : ℕ), i ≥ N → ↑padicNormE (Padic.mk f - ↑(↑f i)) < ε\n[PROOFSTEP]\ndsimp [padicNormE]\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : PadicSeq p\nε : ℚ\nhε : 0 < ε\n⊢ ∃ N,\n    ∀ (i : ℕ),\n      i ≥ N →\n        Quotient.lift PadicSeq.norm (_ : ∀ {f g : PadicSeq p}, f ≈ g → PadicSeq.norm f = PadicSeq.norm g)\n            (Padic.mk f - ↑(↑f i)) <\n          ε\n[PROOFSTEP]\nchange ∃ N, ∀ i ≥ N, (f - const _ (f i)).norm < ε\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : PadicSeq p\nε : ℚ\nhε : 0 < ε\n⊢ ∃ N, ∀ (i : ℕ), i ≥ N → PadicSeq.norm (f - const (padicNorm p) (↑f i)) < ε\n[PROOFSTEP]\nby_contra' h\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : PadicSeq p\nε : ℚ\nhε : 0 < ε\nh : ∀ (N : ℕ), ∃ i, i ≥ N ∧ ε ≤ PadicSeq.norm (f - const (padicNorm p) (↑f i))\n⊢ False\n[PROOFSTEP]\ncases' cauchy₂ f hε with N hN\n[GOAL]\ncase intro\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : PadicSeq p\nε : ℚ\nhε : 0 < ε\nh : ∀ (N : ℕ), ∃ i, i ≥ N ∧ ε ≤ PadicSeq.norm (f - const (padicNorm p) (↑f i))\nN : ℕ\nhN : ∀ (j : ℕ), j ≥ N → ∀ (k : ℕ), k ≥ N → padicNorm p (↑f j - ↑f k) < ε\n⊢ False\n[PROOFSTEP]\nrcases h N with ⟨i, hi, hge⟩\n[GOAL]\ncase intro.intro.intro\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : PadicSeq p\nε : ℚ\nhε : 0 < ε\nh : ∀ (N : ℕ), ∃ i, i ≥ N ∧ ε ≤ PadicSeq.norm (f - const (padicNorm p) (↑f i))\nN : ℕ\nhN : ∀ (j : ℕ), j ≥ N → ∀ (k : ℕ), k ≥ N → padicNorm p (↑f j - ↑f k) < ε\ni : ℕ\nhi : i ≥ N\nhge : ε ≤ PadicSeq.norm (f - const (padicNorm p) (↑f i))\n⊢ False\n[PROOFSTEP]\nhave hne : ¬f - const (padicNorm p) (f i) ≈ 0 := by\n  intro h\n  unfold PadicSeq.norm at hge ; split_ifs at hge \n  exact not_lt_of_ge hge hε\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : PadicSeq p\nε : ℚ\nhε : 0 < ε\nh : ∀ (N : ℕ), ∃ i, i ≥ N ∧ ε ≤ PadicSeq.norm (f - const (padicNorm p) (↑f i))\nN : ℕ\nhN : ∀ (j : ℕ), j ≥ N → ∀ (k : ℕ), k ≥ N → padicNorm p (↑f j - ↑f k) < ε\ni : ℕ\nhi : i ≥ N\nhge : ε ≤ PadicSeq.norm (f - const (padicNorm p) (↑f i))\n⊢ ¬f - const (padicNorm p) (↑f i) ≈ 0\n[PROOFSTEP]\nintro h\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : PadicSeq p\nε : ℚ\nhε : 0 < ε\nh✝ : ∀ (N : ℕ), ∃ i, i ≥ N ∧ ε ≤ PadicSeq.norm (f - const (padicNorm p) (↑f i))\nN : ℕ\nhN : ∀ (j : ℕ), j ≥ N → ∀ (k : ℕ), k ≥ N → padicNorm p (↑f j - ↑f k) < ε\ni : ℕ\nhi : i ≥ N\nhge : ε ≤ PadicSeq.norm (f - const (padicNorm p) (↑f i))\nh : f - const (padicNorm p) (↑f i) ≈ 0\n⊢ False\n[PROOFSTEP]\nunfold PadicSeq.norm at hge \n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : PadicSeq p\nε : ℚ\nhε : 0 < ε\nh✝ : ∀ (N : ℕ), ∃ i, i ≥ N ∧ ε ≤ PadicSeq.norm (f - const (padicNorm p) (↑f i))\nN : ℕ\nhN : ∀ (j : ℕ), j ≥ N → ∀ (k : ℕ), k ≥ N → padicNorm p (↑f j - ↑f k) < ε\ni : ℕ\nhi : i ≥ N\nhge :\n  ε ≤\n    if hf : f - const (padicNorm p) (↑f i) ≈ 0 then 0\n    else padicNorm p (↑(f - const (padicNorm p) (↑f i)) (stationaryPoint hf))\nh : f - const (padicNorm p) (↑f i) ≈ 0\n⊢ False\n[PROOFSTEP]\nsplit_ifs at hge \n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : PadicSeq p\nε : ℚ\nhε : 0 < ε\nh✝ : ∀ (N : ℕ), ∃ i, i ≥ N ∧ ε ≤ PadicSeq.norm (f - const (padicNorm p) (↑f i))\nN : ℕ\nhN : ∀ (j : ℕ), j ≥ N → ∀ (k : ℕ), k ≥ N → padicNorm p (↑f j - ↑f k) < ε\ni : ℕ\nhi : i ≥ N\nh : f - const (padicNorm p) (↑f i) ≈ 0\nhge : ε ≤ 0\n⊢ False\n[PROOFSTEP]\nexact not_lt_of_ge hge hε\n[GOAL]\ncase intro.intro.intro\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : PadicSeq p\nε : ℚ\nhε : 0 < ε\nh : ∀ (N : ℕ), ∃ i, i ≥ N ∧ ε ≤ PadicSeq.norm (f - const (padicNorm p) (↑f i))\nN : ℕ\nhN : ∀ (j : ℕ), j ≥ N → ∀ (k : ℕ), k ≥ N → padicNorm p (↑f j - ↑f k) < ε\ni : ℕ\nhi : i ≥ N\nhge : ε ≤ PadicSeq.norm (f - const (padicNorm p) (↑f i))\nhne : ¬f - const (padicNorm p) (↑f i) ≈ 0\n⊢ False\n[PROOFSTEP]\nunfold PadicSeq.norm at hge \n[GOAL]\ncase intro.intro.intro\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : PadicSeq p\nε : ℚ\nhε : 0 < ε\nh : ∀ (N : ℕ), ∃ i, i ≥ N ∧ ε ≤ PadicSeq.norm (f - const (padicNorm p) (↑f i))\nN : ℕ\nhN : ∀ (j : ℕ), j ≥ N → ∀ (k : ℕ), k ≥ N → padicNorm p (↑f j - ↑f k) < ε\ni : ℕ\nhi : i ≥ N\nhge :\n  ε ≤\n    if hf : f - const (padicNorm p) (↑f i) ≈ 0 then 0\n    else padicNorm p (↑(f - const (padicNorm p) (↑f i)) (stationaryPoint hf))\nhne : ¬f - const (padicNorm p) (↑f i) ≈ 0\n⊢ False\n[PROOFSTEP]\nsplit_ifs at hge \n[GOAL]\ncase pos\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : PadicSeq p\nε : ℚ\nhε : 0 < ε\nh : ∀ (N : ℕ), ∃ i, i ≥ N ∧ ε ≤ PadicSeq.norm (f - const (padicNorm p) (↑f i))\nN : ℕ\nhN : ∀ (j : ℕ), j ≥ N → ∀ (k : ℕ), k ≥ N → padicNorm p (↑f j - ↑f k) < ε\ni : ℕ\nhi : i ≥ N\nhne : ¬f - const (padicNorm p) (↑f i) ≈ 0\nh✝ : f - const (padicNorm p) (↑f i) ≈ 0\nhge : ε ≤ 0\n⊢ False\ncase neg\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : PadicSeq p\nε : ℚ\nhε : 0 < ε\nh : ∀ (N : ℕ), ∃ i, i ≥ N ∧ ε ≤ PadicSeq.norm (f - const (padicNorm p) (↑f i))\nN : ℕ\nhN : ∀ (j : ℕ), j ≥ N → ∀ (k : ℕ), k ≥ N → padicNorm p (↑f j - ↑f k) < ε\ni : ℕ\nhi : i ≥ N\nhne h✝ : ¬f - const (padicNorm p) (↑f i) ≈ 0\nhge : ε ≤ padicNorm p (↑(f - const (padicNorm p) (↑f i)) (stationaryPoint h✝))\n⊢ False\n[PROOFSTEP]\nexact not_le_of_gt hε hge\n[GOAL]\ncase neg\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : PadicSeq p\nε : ℚ\nhε : 0 < ε\nh : ∀ (N : ℕ), ∃ i, i ≥ N ∧ ε ≤ PadicSeq.norm (f - const (padicNorm p) (↑f i))\nN : ℕ\nhN : ∀ (j : ℕ), j ≥ N → ∀ (k : ℕ), k ≥ N → padicNorm p (↑f j - ↑f k) < ε\ni : ℕ\nhi : i ≥ N\nhne h✝ : ¬f - const (padicNorm p) (↑f i) ≈ 0\nhge : ε ≤ padicNorm p (↑(f - const (padicNorm p) (↑f i)) (stationaryPoint h✝))\n⊢ False\n[PROOFSTEP]\napply not_le_of_gt _ hge\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : PadicSeq p\nε : ℚ\nhε : 0 < ε\nh : ∀ (N : ℕ), ∃ i, i ≥ N ∧ ε ≤ PadicSeq.norm (f - const (padicNorm p) (↑f i))\nN : ℕ\nhN : ∀ (j : ℕ), j ≥ N → ∀ (k : ℕ), k ≥ N → padicNorm p (↑f j - ↑f k) < ε\ni : ℕ\nhi : i ≥ N\nhne h✝ : ¬f - const (padicNorm p) (↑f i) ≈ 0\nhge : ε ≤ padicNorm p (↑(f - const (padicNorm p) (↑f i)) (stationaryPoint h✝))\n⊢ ε > padicNorm p (↑(f - const (padicNorm p) (↑f i)) (stationaryPoint h✝))\n[PROOFSTEP]\ncases' _root_.em (N ≤ stationaryPoint hne) with hgen hngen\n[GOAL]\ncase inl\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : PadicSeq p\nε : ℚ\nhε : 0 < ε\nh : ∀ (N : ℕ), ∃ i, i ≥ N ∧ ε ≤ PadicSeq.norm (f - const (padicNorm p) (↑f i))\nN : ℕ\nhN : ∀ (j : ℕ), j ≥ N → ∀ (k : ℕ), k ≥ N → padicNorm p (↑f j - ↑f k) < ε\ni : ℕ\nhi : i ≥ N\nhne h✝ : ¬f - const (padicNorm p) (↑f i) ≈ 0\nhge : ε ≤ padicNorm p (↑(f - const (padicNorm p) (↑f i)) (stationaryPoint h✝))\nhgen : N ≤ stationaryPoint hne\n⊢ ε > padicNorm p (↑(f - const (padicNorm p) (↑f i)) (stationaryPoint h✝))\n[PROOFSTEP]\napply hN _ hgen _ hi\n[GOAL]\ncase inr\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : PadicSeq p\nε : ℚ\nhε : 0 < ε\nh : ∀ (N : ℕ), ∃ i, i ≥ N ∧ ε ≤ PadicSeq.norm (f - const (padicNorm p) (↑f i))\nN : ℕ\nhN : ∀ (j : ℕ), j ≥ N → ∀ (k : ℕ), k ≥ N → padicNorm p (↑f j - ↑f k) < ε\ni : ℕ\nhi : i ≥ N\nhne h✝ : ¬f - const (padicNorm p) (↑f i) ≈ 0\nhge : ε ≤ padicNorm p (↑(f - const (padicNorm p) (↑f i)) (stationaryPoint h✝))\nhngen : ¬N ≤ stationaryPoint hne\n⊢ ε > padicNorm p (↑(f - const (padicNorm p) (↑f i)) (stationaryPoint h✝))\n[PROOFSTEP]\nhave := stationaryPoint_spec hne le_rfl (le_of_not_le hngen)\n[GOAL]\ncase inr\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : PadicSeq p\nε : ℚ\nhε : 0 < ε\nh : ∀ (N : ℕ), ∃ i, i ≥ N ∧ ε ≤ PadicSeq.norm (f - const (padicNorm p) (↑f i))\nN : ℕ\nhN : ∀ (j : ℕ), j ≥ N → ∀ (k : ℕ), k ≥ N → padicNorm p (↑f j - ↑f k) < ε\ni : ℕ\nhi : i ≥ N\nhne h✝ : ¬f - const (padicNorm p) (↑f i) ≈ 0\nhge : ε ≤ padicNorm p (↑(f - const (padicNorm p) (↑f i)) (stationaryPoint h✝))\nhngen : ¬N ≤ stationaryPoint hne\nthis :\n  padicNorm p (↑(f - const (padicNorm p) (↑f i)) N) =\n    padicNorm p (↑(f - const (padicNorm p) (↑f i)) (stationaryPoint hne))\n⊢ ε > padicNorm p (↑(f - const (padicNorm p) (↑f i)) (stationaryPoint h✝))\n[PROOFSTEP]\nrw [← this]\n[GOAL]\ncase inr\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : PadicSeq p\nε : ℚ\nhε : 0 < ε\nh : ∀ (N : ℕ), ∃ i, i ≥ N ∧ ε ≤ PadicSeq.norm (f - const (padicNorm p) (↑f i))\nN : ℕ\nhN : ∀ (j : ℕ), j ≥ N → ∀ (k : ℕ), k ≥ N → padicNorm p (↑f j - ↑f k) < ε\ni : ℕ\nhi : i ≥ N\nhne h✝ : ¬f - const (padicNorm p) (↑f i) ≈ 0\nhge : ε ≤ padicNorm p (↑(f - const (padicNorm p) (↑f i)) (stationaryPoint h✝))\nhngen : ¬N ≤ stationaryPoint hne\nthis :\n  padicNorm p (↑(f - const (padicNorm p) (↑f i)) N) =\n    padicNorm p (↑(f - const (padicNorm p) (↑f i)) (stationaryPoint hne))\n⊢ ε > padicNorm p (↑(f - const (padicNorm p) (↑f i)) N)\n[PROOFSTEP]\nexact hN _ le_rfl _ hi\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : CauSeq ℚ_[p] ↑padicNormE\nq : ℚ_[p]\nε : ℚ\nhε : 0 < ε\nq' : CauSeq ℚ (padicNorm p)\nthis : ∃ N, ∀ (m : ℕ), m ≥ N → ∀ (n : ℕ), n ≥ N → padicNorm p (↑q' m - ↑q' n) < ε\nN : ℕ\nhN : ∀ (m : ℕ), m ≥ N → ∀ (n : ℕ), n ≥ N → padicNorm p (↑q' m - ↑q' n) < ε\n⊢ ↑padicNormE (Quotient.mk equiv q' - ↑(↑q' N)) < ε\n[PROOFSTEP]\ndsimp [padicNormE]\n  -- Porting note: `change` → `convert_to` (`change` times out!)\n        -- and add `PadicSeq p` type annotation\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : CauSeq ℚ_[p] ↑padicNormE\nq : ℚ_[p]\nε : ℚ\nhε : 0 < ε\nq' : CauSeq ℚ (padicNorm p)\nthis : ∃ N, ∀ (m : ℕ), m ≥ N → ∀ (n : ℕ), n ≥ N → padicNorm p (↑q' m - ↑q' n) < ε\nN : ℕ\nhN : ∀ (m : ℕ), m ≥ N → ∀ (n : ℕ), n ≥ N → padicNorm p (↑q' m - ↑q' n) < ε\n⊢ Quotient.lift PadicSeq.norm (_ : ∀ {f g : PadicSeq p}, f ≈ g → PadicSeq.norm f = PadicSeq.norm g)\n      (Completion.mk q' - ↑(↑q' N)) <\n    ε\n[PROOFSTEP]\nconvert_to PadicSeq.norm (q' - const _ (q' N) : PadicSeq p) < ε\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : CauSeq ℚ_[p] ↑padicNormE\nq : ℚ_[p]\nε : ℚ\nhε : 0 < ε\nq' : CauSeq ℚ (padicNorm p)\nthis : ∃ N, ∀ (m : ℕ), m ≥ N → ∀ (n : ℕ), n ≥ N → padicNorm p (↑q' m - ↑q' n) < ε\nN : ℕ\nhN : ∀ (m : ℕ), m ≥ N → ∀ (n : ℕ), n ≥ N → padicNorm p (↑q' m - ↑q' n) < ε\n⊢ PadicSeq.norm (q' - const (padicNorm p) (↑q' N)) < ε\n[PROOFSTEP]\ncases' Decidable.em (q' - const (padicNorm p) (q' N) ≈ 0) with heq hne'\n[GOAL]\ncase inl\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : CauSeq ℚ_[p] ↑padicNormE\nq : ℚ_[p]\nε : ℚ\nhε : 0 < ε\nq' : CauSeq ℚ (padicNorm p)\nthis : ∃ N, ∀ (m : ℕ), m ≥ N → ∀ (n : ℕ), n ≥ N → padicNorm p (↑q' m - ↑q' n) < ε\nN : ℕ\nhN : ∀ (m : ℕ), m ≥ N → ∀ (n : ℕ), n ≥ N → padicNorm p (↑q' m - ↑q' n) < ε\nheq : q' - const (padicNorm p) (↑q' N) ≈ 0\n⊢ PadicSeq.norm (q' - const (padicNorm p) (↑q' N)) < ε\n[PROOFSTEP]\nsimpa only [heq, PadicSeq.norm, dif_pos]\n[GOAL]\ncase inr\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : CauSeq ℚ_[p] ↑padicNormE\nq : ℚ_[p]\nε : ℚ\nhε : 0 < ε\nq' : CauSeq ℚ (padicNorm p)\nthis : ∃ N, ∀ (m : ℕ), m ≥ N → ∀ (n : ℕ), n ≥ N → padicNorm p (↑q' m - ↑q' n) < ε\nN : ℕ\nhN : ∀ (m : ℕ), m ≥ N → ∀ (n : ℕ), n ≥ N → padicNorm p (↑q' m - ↑q' n) < ε\nhne' : ¬q' - const (padicNorm p) (↑q' N) ≈ 0\n⊢ PadicSeq.norm (q' - const (padicNorm p) (↑q' N)) < ε\n[PROOFSTEP]\nsimp only [PadicSeq.norm, dif_neg hne']\n[GOAL]\ncase inr\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : CauSeq ℚ_[p] ↑padicNormE\nq : ℚ_[p]\nε : ℚ\nhε : 0 < ε\nq' : CauSeq ℚ (padicNorm p)\nthis : ∃ N, ∀ (m : ℕ), m ≥ N → ∀ (n : ℕ), n ≥ N → padicNorm p (↑q' m - ↑q' n) < ε\nN : ℕ\nhN : ∀ (m : ℕ), m ≥ N → ∀ (n : ℕ), n ≥ N → padicNorm p (↑q' m - ↑q' n) < ε\nhne' : ¬q' - const (padicNorm p) (↑q' N) ≈ 0\n⊢ padicNorm p (↑(q' - const (padicNorm p) (↑q' N)) (stationaryPoint hne')) < ε\n[PROOFSTEP]\nchange padicNorm p (q' _ - q' _) < ε\n[GOAL]\ncase inr\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : CauSeq ℚ_[p] ↑padicNormE\nq : ℚ_[p]\nε : ℚ\nhε : 0 < ε\nq' : CauSeq ℚ (padicNorm p)\nthis : ∃ N, ∀ (m : ℕ), m ≥ N → ∀ (n : ℕ), n ≥ N → padicNorm p (↑q' m - ↑q' n) < ε\nN : ℕ\nhN : ∀ (m : ℕ), m ≥ N → ∀ (n : ℕ), n ≥ N → padicNorm p (↑q' m - ↑q' n) < ε\nhne' : ¬q' - const (padicNorm p) (↑q' N) ≈ 0\n⊢ padicNorm p (↑q' (stationaryPoint hne') - ↑q' N) < ε\n[PROOFSTEP]\ncases' Decidable.em (stationaryPoint hne' ≤ N) with hle hle\n[GOAL]\ncase inr.inl\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : CauSeq ℚ_[p] ↑padicNormE\nq : ℚ_[p]\nε : ℚ\nhε : 0 < ε\nq' : CauSeq ℚ (padicNorm p)\nthis : ∃ N, ∀ (m : ℕ), m ≥ N → ∀ (n : ℕ), n ≥ N → padicNorm p (↑q' m - ↑q' n) < ε\nN : ℕ\nhN : ∀ (m : ℕ), m ≥ N → ∀ (n : ℕ), n ≥ N → padicNorm p (↑q' m - ↑q' n) < ε\nhne' : ¬q' - const (padicNorm p) (↑q' N) ≈ 0\nhle : stationaryPoint hne' ≤ N\n⊢ padicNorm p (↑q' (stationaryPoint hne') - ↑q' N) < ε\n[PROOFSTEP]\nhave := (stationaryPoint_spec hne' le_rfl hle).symm\n[GOAL]\ncase inr.inl\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : CauSeq ℚ_[p] ↑padicNormE\nq : ℚ_[p]\nε : ℚ\nhε : 0 < ε\nq' : CauSeq ℚ (padicNorm p)\nthis✝ : ∃ N, ∀ (m : ℕ), m ≥ N → ∀ (n : ℕ), n ≥ N → padicNorm p (↑q' m - ↑q' n) < ε\nN : ℕ\nhN : ∀ (m : ℕ), m ≥ N → ∀ (n : ℕ), n ≥ N → padicNorm p (↑q' m - ↑q' n) < ε\nhne' : ¬q' - const (padicNorm p) (↑q' N) ≈ 0\nhle : stationaryPoint hne' ≤ N\nthis :\n  padicNorm p (↑(q' - const (padicNorm p) (↑q' N)) (stationaryPoint hne')) =\n    padicNorm p (↑(q' - const (padicNorm p) (↑q' N)) N)\n⊢ padicNorm p (↑q' (stationaryPoint hne') - ↑q' N) < ε\n[PROOFSTEP]\nsimp only [const_apply, sub_apply, padicNorm.zero, sub_self] at this \n[GOAL]\ncase inr.inl\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : CauSeq ℚ_[p] ↑padicNormE\nq : ℚ_[p]\nε : ℚ\nhε : 0 < ε\nq' : CauSeq ℚ (padicNorm p)\nthis✝ : ∃ N, ∀ (m : ℕ), m ≥ N → ∀ (n : ℕ), n ≥ N → padicNorm p (↑q' m - ↑q' n) < ε\nN : ℕ\nhN : ∀ (m : ℕ), m ≥ N → ∀ (n : ℕ), n ≥ N → padicNorm p (↑q' m - ↑q' n) < ε\nhne' : ¬q' - const (padicNorm p) (↑q' N) ≈ 0\nhle : stationaryPoint hne' ≤ N\nthis : padicNorm p (↑q' (stationaryPoint hne') - ↑q' N) = 0\n⊢ padicNorm p (↑q' (stationaryPoint hne') - ↑q' N) < ε\n[PROOFSTEP]\nsimpa only [this]\n[GOAL]\ncase inr.inr\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : CauSeq ℚ_[p] ↑padicNormE\nq : ℚ_[p]\nε : ℚ\nhε : 0 < ε\nq' : CauSeq ℚ (padicNorm p)\nthis : ∃ N, ∀ (m : ℕ), m ≥ N → ∀ (n : ℕ), n ≥ N → padicNorm p (↑q' m - ↑q' n) < ε\nN : ℕ\nhN : ∀ (m : ℕ), m ≥ N → ∀ (n : ℕ), n ≥ N → padicNorm p (↑q' m - ↑q' n) < ε\nhne' : ¬q' - const (padicNorm p) (↑q' N) ≈ 0\nhle : ¬stationaryPoint hne' ≤ N\n⊢ padicNorm p (↑q' (stationaryPoint hne') - ↑q' N) < ε\n[PROOFSTEP]\nexact hN _ (lt_of_not_ge hle).le _ le_rfl\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : CauSeq ℚ_[p] ↑padicNormE\nn : ℕ\n⊢ 0 < ↑n + 1\n[PROOFSTEP]\nexact_mod_cast succ_pos _\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : CauSeq ℚ_[p] ↑padicNormE\nε : ℚ\nhε : 0 < ε\n⊢ ∃ N, ∀ (i : ℕ), i ≥ N → ↑padicNormE (↑f i - ↑(limSeq f i)) < ε\n[PROOFSTEP]\nrefine' (exists_nat_gt (1 / ε)).imp fun N hN i hi ↦ _\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : CauSeq ℚ_[p] ↑padicNormE\nε : ℚ\nhε : 0 < ε\nN : ℕ\nhN : 1 / ε < ↑N\ni : ℕ\nhi : i ≥ N\n⊢ ↑padicNormE (↑f i - ↑(limSeq f i)) < ε\n[PROOFSTEP]\nhave h := Classical.choose_spec (rat_dense' (f i) (div_nat_pos i))\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : CauSeq ℚ_[p] ↑padicNormE\nε : ℚ\nhε : 0 < ε\nN : ℕ\nhN : 1 / ε < ↑N\ni : ℕ\nhi : i ≥ N\nh : ↑padicNormE (↑f i - ↑(Classical.choose (_ : ∃ r, ↑padicNormE (↑f i - ↑r) < 1 / (↑i + 1)))) < 1 / (↑i + 1)\n⊢ ↑padicNormE (↑f i - ↑(limSeq f i)) < ε\n[PROOFSTEP]\nrefine' lt_of_lt_of_le h ((div_le_iff' <| by exact_mod_cast succ_pos _).mpr _)\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : CauSeq ℚ_[p] ↑padicNormE\nε : ℚ\nhε : 0 < ε\nN : ℕ\nhN : 1 / ε < ↑N\ni : ℕ\nhi : i ≥ N\nh : ↑padicNormE (↑f i - ↑(Classical.choose (_ : ∃ r, ↑padicNormE (↑f i - ↑r) < 1 / (↑i + 1)))) < 1 / (↑i + 1)\n⊢ 0 < ↑i + 1\n[PROOFSTEP]\nexact_mod_cast succ_pos _\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : CauSeq ℚ_[p] ↑padicNormE\nε : ℚ\nhε : 0 < ε\nN : ℕ\nhN : 1 / ε < ↑N\ni : ℕ\nhi : i ≥ N\nh : ↑padicNormE (↑f i - ↑(Classical.choose (_ : ∃ r, ↑padicNormE (↑f i - ↑r) < 1 / (↑i + 1)))) < 1 / (↑i + 1)\n⊢ 1 ≤ (↑i + 1) * ε\n[PROOFSTEP]\nrw [right_distrib]\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : CauSeq ℚ_[p] ↑padicNormE\nε : ℚ\nhε : 0 < ε\nN : ℕ\nhN : 1 / ε < ↑N\ni : ℕ\nhi : i ≥ N\nh : ↑padicNormE (↑f i - ↑(Classical.choose (_ : ∃ r, ↑padicNormE (↑f i - ↑r) < 1 / (↑i + 1)))) < 1 / (↑i + 1)\n⊢ 1 ≤ ↑i * ε + 1 * ε\n[PROOFSTEP]\napply le_add_of_le_of_nonneg\n[GOAL]\ncase hbc\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : CauSeq ℚ_[p] ↑padicNormE\nε : ℚ\nhε : 0 < ε\nN : ℕ\nhN : 1 / ε < ↑N\ni : ℕ\nhi : i ≥ N\nh : ↑padicNormE (↑f i - ↑(Classical.choose (_ : ∃ r, ↑padicNormE (↑f i - ↑r) < 1 / (↑i + 1)))) < 1 / (↑i + 1)\n⊢ 1 ≤ ↑i * ε\n[PROOFSTEP]\nexact (div_le_iff hε).mp (le_trans (le_of_lt hN) (by exact_mod_cast hi))\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : CauSeq ℚ_[p] ↑padicNormE\nε : ℚ\nhε : 0 < ε\nN : ℕ\nhN : 1 / ε < ↑N\ni : ℕ\nhi : i ≥ N\nh : ↑padicNormE (↑f i - ↑(Classical.choose (_ : ∃ r, ↑padicNormE (↑f i - ↑r) < 1 / (↑i + 1)))) < 1 / (↑i + 1)\n⊢ ↑N ≤ ↑i\n[PROOFSTEP]\nexact_mod_cast hi\n[GOAL]\ncase ha\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : CauSeq ℚ_[p] ↑padicNormE\nε : ℚ\nhε : 0 < ε\nN : ℕ\nhN : 1 / ε < ↑N\ni : ℕ\nhi : i ≥ N\nh : ↑padicNormE (↑f i - ↑(Classical.choose (_ : ∃ r, ↑padicNormE (↑f i - ↑r) < 1 / (↑i + 1)))) < 1 / (↑i + 1)\n⊢ 0 ≤ 1 * ε\n[PROOFSTEP]\napply le_of_lt\n[GOAL]\ncase ha.a\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : CauSeq ℚ_[p] ↑padicNormE\nε : ℚ\nhε : 0 < ε\nN : ℕ\nhN : 1 / ε < ↑N\ni : ℕ\nhi : i ≥ N\nh : ↑padicNormE (↑f i - ↑(Classical.choose (_ : ∃ r, ↑padicNormE (↑f i - ↑r) < 1 / (↑i + 1)))) < 1 / (↑i + 1)\n⊢ 0 < 1 * ε\n[PROOFSTEP]\nsimpa\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : CauSeq ℚ_[p] ↑padicNormE\nε : ℚ\nhε : ε > 0\n⊢ ∃ i, ∀ (j : ℕ), j ≥ i → padicNorm p (limSeq f j - limSeq f i) < ε\n[PROOFSTEP]\nhave hε3 : 0 < ε / 3 := div_pos hε (by norm_num)\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : CauSeq ℚ_[p] ↑padicNormE\nε : ℚ\nhε : ε > 0\n⊢ 0 < 3\n[PROOFSTEP]\nnorm_num\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : CauSeq ℚ_[p] ↑padicNormE\nε : ℚ\nhε : ε > 0\nhε3 : 0 < ε / 3\n⊢ ∃ i, ∀ (j : ℕ), j ≥ i → padicNorm p (limSeq f j - limSeq f i) < ε\n[PROOFSTEP]\nlet ⟨N, hN⟩ := exi_rat_seq_conv f hε3\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : CauSeq ℚ_[p] ↑padicNormE\nε : ℚ\nhε : ε > 0\nhε3 : 0 < ε / 3\nN : ℕ\nhN : ∀ (i : ℕ), i ≥ N → ↑padicNormE (↑f i - ↑(limSeq f i)) < ε / 3\n⊢ ∃ i, ∀ (j : ℕ), j ≥ i → padicNorm p (limSeq f j - limSeq f i) < ε\n[PROOFSTEP]\nlet ⟨N2, hN2⟩ := f.cauchy₂ hε3\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : CauSeq ℚ_[p] ↑padicNormE\nε : ℚ\nhε : ε > 0\nhε3 : 0 < ε / 3\nN : ℕ\nhN : ∀ (i : ℕ), i ≥ N → ↑padicNormE (↑f i - ↑(limSeq f i)) < ε / 3\nN2 : ℕ\nhN2 : ∀ (j : ℕ), j ≥ N2 → ∀ (k : ℕ), k ≥ N2 → ↑padicNormE (↑f j - ↑f k) < ε / 3\n⊢ ∃ i, ∀ (j : ℕ), j ≥ i → padicNorm p (limSeq f j - limSeq f i) < ε\n[PROOFSTEP]\nexists max N N2\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : CauSeq ℚ_[p] ↑padicNormE\nε : ℚ\nhε : ε > 0\nhε3 : 0 < ε / 3\nN : ℕ\nhN : ∀ (i : ℕ), i ≥ N → ↑padicNormE (↑f i - ↑(limSeq f i)) < ε / 3\nN2 : ℕ\nhN2 : ∀ (j : ℕ), j ≥ N2 → ∀ (k : ℕ), k ≥ N2 → ↑padicNormE (↑f j - ↑f k) < ε / 3\n⊢ ∀ (j : ℕ), j ≥ max N N2 → padicNorm p (limSeq f j - limSeq f (max N N2)) < ε\n[PROOFSTEP]\nintro j hj\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : CauSeq ℚ_[p] ↑padicNormE\nε : ℚ\nhε : ε > 0\nhε3 : 0 < ε / 3\nN : ℕ\nhN : ∀ (i : ℕ), i ≥ N → ↑padicNormE (↑f i - ↑(limSeq f i)) < ε / 3\nN2 : ℕ\nhN2 : ∀ (j : ℕ), j ≥ N2 → ∀ (k : ℕ), k ≥ N2 → ↑padicNormE (↑f j - ↑f k) < ε / 3\nj : ℕ\nhj : j ≥ max N N2\n⊢ padicNorm p (limSeq f j - limSeq f (max N N2)) < ε\n[PROOFSTEP]\nsuffices padicNormE (limSeq f j - f (max N N2) + (f (max N N2) - limSeq f (max N N2)) : ℚ_[p]) < ε\n  by\n  ring_nf at this ⊢\n  rw [← padicNormE.eq_padic_norm']\n  exact_mod_cast this\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : CauSeq ℚ_[p] ↑padicNormE\nε : ℚ\nhε : ε > 0\nhε3 : 0 < ε / 3\nN : ℕ\nhN : ∀ (i : ℕ), i ≥ N → ↑padicNormE (↑f i - ↑(limSeq f i)) < ε / 3\nN2 : ℕ\nhN2 : ∀ (j : ℕ), j ≥ N2 → ∀ (k : ℕ), k ≥ N2 → ↑padicNormE (↑f j - ↑f k) < ε / 3\nj : ℕ\nhj : j ≥ max N N2\nthis : ↑padicNormE (↑(limSeq f j) - ↑f (max N N2) + (↑f (max N N2) - ↑(limSeq f (max N N2)))) < ε\n⊢ padicNorm p (limSeq f j - limSeq f (max N N2)) < ε\n[PROOFSTEP]\nring_nf at this ⊢\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : CauSeq ℚ_[p] ↑padicNormE\nε : ℚ\nhε : ε > 0\nhε3 : 0 < ε / 3\nN : ℕ\nhN : ∀ (i : ℕ), i ≥ N → ↑padicNormE (↑f i - ↑(limSeq f i)) < ε / 3\nN2 : ℕ\nhN2 : ∀ (j : ℕ), j ≥ N2 → ∀ (k : ℕ), k ≥ N2 → ↑padicNormE (↑f j - ↑f k) < ε / 3\nj : ℕ\nhj : j ≥ max N N2\nthis : ↑padicNormE (↑(limSeq f j) - ↑(limSeq f (max N N2))) < ε\n⊢ padicNorm p (limSeq f j - limSeq f (max N N2)) < ε\n[PROOFSTEP]\nrw [← padicNormE.eq_padic_norm']\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : CauSeq ℚ_[p] ↑padicNormE\nε : ℚ\nhε : ε > 0\nhε3 : 0 < ε / 3\nN : ℕ\nhN : ∀ (i : ℕ), i ≥ N → ↑padicNormE (↑f i - ↑(limSeq f i)) < ε / 3\nN2 : ℕ\nhN2 : ∀ (j : ℕ), j ≥ N2 → ∀ (k : ℕ), k ≥ N2 → ↑padicNormE (↑f j - ↑f k) < ε / 3\nj : ℕ\nhj : j ≥ max N N2\nthis : ↑padicNormE (↑(limSeq f j) - ↑(limSeq f (max N N2))) < ε\n⊢ ↑padicNormE ↑(limSeq f j - limSeq f (max N N2)) < ε\n[PROOFSTEP]\nexact_mod_cast this\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : CauSeq ℚ_[p] ↑padicNormE\nε : ℚ\nhε : ε > 0\nhε3 : 0 < ε / 3\nN : ℕ\nhN : ∀ (i : ℕ), i ≥ N → ↑padicNormE (↑f i - ↑(limSeq f i)) < ε / 3\nN2 : ℕ\nhN2 : ∀ (j : ℕ), j ≥ N2 → ∀ (k : ℕ), k ≥ N2 → ↑padicNormE (↑f j - ↑f k) < ε / 3\nj : ℕ\nhj : j ≥ max N N2\n⊢ ↑padicNormE (↑(limSeq f j) - ↑f (max N N2) + (↑f (max N N2) - ↑(limSeq f (max N N2)))) < ε\n[PROOFSTEP]\napply lt_of_le_of_lt\n[GOAL]\ncase a\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : CauSeq ℚ_[p] ↑padicNormE\nε : ℚ\nhε : ε > 0\nhε3 : 0 < ε / 3\nN : ℕ\nhN : ∀ (i : ℕ), i ≥ N → ↑padicNormE (↑f i - ↑(limSeq f i)) < ε / 3\nN2 : ℕ\nhN2 : ∀ (j : ℕ), j ≥ N2 → ∀ (k : ℕ), k ≥ N2 → ↑padicNormE (↑f j - ↑f k) < ε / 3\nj : ℕ\nhj : j ≥ max N N2\n⊢ ↑padicNormE (↑(limSeq f j) - ↑f (max N N2) + (↑f (max N N2) - ↑(limSeq f (max N N2)))) ≤ ?b\n[PROOFSTEP]\napply padicNormE.add_le\n[GOAL]\ncase a\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : CauSeq ℚ_[p] ↑padicNormE\nε : ℚ\nhε : ε > 0\nhε3 : 0 < ε / 3\nN : ℕ\nhN : ∀ (i : ℕ), i ≥ N → ↑padicNormE (↑f i - ↑(limSeq f i)) < ε / 3\nN2 : ℕ\nhN2 : ∀ (j : ℕ), j ≥ N2 → ∀ (k : ℕ), k ≥ N2 → ↑padicNormE (↑f j - ↑f k) < ε / 3\nj : ℕ\nhj : j ≥ max N N2\n⊢ ↑padicNormE (↑(limSeq f j) - ↑f (max N N2)) + ↑padicNormE (↑f (max N N2) - ↑(limSeq f (max N N2))) < ε\n[PROOFSTEP]\nrw [← add_thirds ε]\n[GOAL]\ncase a\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : CauSeq ℚ_[p] ↑padicNormE\nε : ℚ\nhε : ε > 0\nhε3 : 0 < ε / 3\nN : ℕ\nhN : ∀ (i : ℕ), i ≥ N → ↑padicNormE (↑f i - ↑(limSeq f i)) < ε / 3\nN2 : ℕ\nhN2 : ∀ (j : ℕ), j ≥ N2 → ∀ (k : ℕ), k ≥ N2 → ↑padicNormE (↑f j - ↑f k) < ε / 3\nj : ℕ\nhj : j ≥ max N N2\n⊢ ↑padicNormE (↑(limSeq f j) - ↑f (max N N2)) + ↑padicNormE (↑f (max N N2) - ↑(limSeq f (max N N2))) <\n    ε / 3 + ε / 3 + ε / 3\n[PROOFSTEP]\napply _root_.add_lt_add\n[GOAL]\ncase a.h₁\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : CauSeq ℚ_[p] ↑padicNormE\nε : ℚ\nhε : ε > 0\nhε3 : 0 < ε / 3\nN : ℕ\nhN : ∀ (i : ℕ), i ≥ N → ↑padicNormE (↑f i - ↑(limSeq f i)) < ε / 3\nN2 : ℕ\nhN2 : ∀ (j : ℕ), j ≥ N2 → ∀ (k : ℕ), k ≥ N2 → ↑padicNormE (↑f j - ↑f k) < ε / 3\nj : ℕ\nhj : j ≥ max N N2\n⊢ ↑padicNormE (↑(limSeq f j) - ↑f (max N N2)) < ε / 3 + ε / 3\n[PROOFSTEP]\nsuffices padicNormE (limSeq f j - f j + (f j - f (max N N2)) : ℚ_[p]) < ε / 3 + ε / 3 by simpa only [sub_add_sub_cancel]\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : CauSeq ℚ_[p] ↑padicNormE\nε : ℚ\nhε : ε > 0\nhε3 : 0 < ε / 3\nN : ℕ\nhN : ∀ (i : ℕ), i ≥ N → ↑padicNormE (↑f i - ↑(limSeq f i)) < ε / 3\nN2 : ℕ\nhN2 : ∀ (j : ℕ), j ≥ N2 → ∀ (k : ℕ), k ≥ N2 → ↑padicNormE (↑f j - ↑f k) < ε / 3\nj : ℕ\nhj : j ≥ max N N2\nthis : ↑padicNormE (↑(limSeq f j) - ↑f j + (↑f j - ↑f (max N N2))) < ε / 3 + ε / 3\n⊢ ↑padicNormE (↑(limSeq f j) - ↑f (max N N2)) < ε / 3 + ε / 3\n[PROOFSTEP]\nsimpa only [sub_add_sub_cancel]\n[GOAL]\ncase a.h₁\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : CauSeq ℚ_[p] ↑padicNormE\nε : ℚ\nhε : ε > 0\nhε3 : 0 < ε / 3\nN : ℕ\nhN : ∀ (i : ℕ), i ≥ N → ↑padicNormE (↑f i - ↑(limSeq f i)) < ε / 3\nN2 : ℕ\nhN2 : ∀ (j : ℕ), j ≥ N2 → ∀ (k : ℕ), k ≥ N2 → ↑padicNormE (↑f j - ↑f k) < ε / 3\nj : ℕ\nhj : j ≥ max N N2\n⊢ ↑padicNormE (↑(limSeq f j) - ↑f j + (↑f j - ↑f (max N N2))) < ε / 3 + ε / 3\n[PROOFSTEP]\napply lt_of_le_of_lt\n[GOAL]\ncase a.h₁.a\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : CauSeq ℚ_[p] ↑padicNormE\nε : ℚ\nhε : ε > 0\nhε3 : 0 < ε / 3\nN : ℕ\nhN : ∀ (i : ℕ), i ≥ N → ↑padicNormE (↑f i - ↑(limSeq f i)) < ε / 3\nN2 : ℕ\nhN2 : ∀ (j : ℕ), j ≥ N2 → ∀ (k : ℕ), k ≥ N2 → ↑padicNormE (↑f j - ↑f k) < ε / 3\nj : ℕ\nhj : j ≥ max N N2\n⊢ ↑padicNormE (↑(limSeq f j) - ↑f j + (↑f j - ↑f (max N N2))) ≤ ?a.h₁.b✝\n[PROOFSTEP]\napply padicNormE.add_le\n[GOAL]\ncase a.h₁.a\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : CauSeq ℚ_[p] ↑padicNormE\nε : ℚ\nhε : ε > 0\nhε3 : 0 < ε / 3\nN : ℕ\nhN : ∀ (i : ℕ), i ≥ N → ↑padicNormE (↑f i - ↑(limSeq f i)) < ε / 3\nN2 : ℕ\nhN2 : ∀ (j : ℕ), j ≥ N2 → ∀ (k : ℕ), k ≥ N2 → ↑padicNormE (↑f j - ↑f k) < ε / 3\nj : ℕ\nhj : j ≥ max N N2\n⊢ ↑padicNormE (↑(limSeq f j) - ↑f j) + ↑padicNormE (↑f j - ↑f (max N N2)) < ε / 3 + ε / 3\n[PROOFSTEP]\napply _root_.add_lt_add\n[GOAL]\ncase a.h₁.a.h₁\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : CauSeq ℚ_[p] ↑padicNormE\nε : ℚ\nhε : ε > 0\nhε3 : 0 < ε / 3\nN : ℕ\nhN : ∀ (i : ℕ), i ≥ N → ↑padicNormE (↑f i - ↑(limSeq f i)) < ε / 3\nN2 : ℕ\nhN2 : ∀ (j : ℕ), j ≥ N2 → ∀ (k : ℕ), k ≥ N2 → ↑padicNormE (↑f j - ↑f k) < ε / 3\nj : ℕ\nhj : j ≥ max N N2\n⊢ ↑padicNormE (↑(limSeq f j) - ↑f j) < ε / 3\n[PROOFSTEP]\nrw [padicNormE.map_sub]\n[GOAL]\ncase a.h₁.a.h₁\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : CauSeq ℚ_[p] ↑padicNormE\nε : ℚ\nhε : ε > 0\nhε3 : 0 < ε / 3\nN : ℕ\nhN : ∀ (i : ℕ), i ≥ N → ↑padicNormE (↑f i - ↑(limSeq f i)) < ε / 3\nN2 : ℕ\nhN2 : ∀ (j : ℕ), j ≥ N2 → ∀ (k : ℕ), k ≥ N2 → ↑padicNormE (↑f j - ↑f k) < ε / 3\nj : ℕ\nhj : j ≥ max N N2\n⊢ ↑padicNormE (↑f j - ↑(limSeq f j)) < ε / 3\n[PROOFSTEP]\napply_mod_cast hN j\n[GOAL]\ncase a.h₁.a.h₁\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : CauSeq ℚ_[p] ↑padicNormE\nε : ℚ\nhε : ε > 0\nhε3 : 0 < ε / 3\nN : ℕ\nhN : ∀ (i : ℕ), i ≥ N → ↑padicNormE (↑f i - ↑(limSeq f i)) < ε / 3\nN2 : ℕ\nhN2 : ∀ (j : ℕ), j ≥ N2 → ∀ (k : ℕ), k ≥ N2 → ↑padicNormE (↑f j - ↑f k) < ε / 3\nj : ℕ\nhj : j ≥ max N N2\n⊢ j ≥ N\n[PROOFSTEP]\nexact le_of_max_le_left hj\n[GOAL]\ncase a.h₁.a.h₂\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : CauSeq ℚ_[p] ↑padicNormE\nε : ℚ\nhε : ε > 0\nhε3 : 0 < ε / 3\nN : ℕ\nhN : ∀ (i : ℕ), i ≥ N → ↑padicNormE (↑f i - ↑(limSeq f i)) < ε / 3\nN2 : ℕ\nhN2 : ∀ (j : ℕ), j ≥ N2 → ∀ (k : ℕ), k ≥ N2 → ↑padicNormE (↑f j - ↑f k) < ε / 3\nj : ℕ\nhj : j ≥ max N N2\n⊢ ↑padicNormE (↑f j - ↑f (max N N2)) < ε / 3\n[PROOFSTEP]\nexact hN2 _ (le_of_max_le_right hj) _ (le_max_right _ _)\n[GOAL]\ncase a.h₂\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : CauSeq ℚ_[p] ↑padicNormE\nε : ℚ\nhε : ε > 0\nhε3 : 0 < ε / 3\nN : ℕ\nhN : ∀ (i : ℕ), i ≥ N → ↑padicNormE (↑f i - ↑(limSeq f i)) < ε / 3\nN2 : ℕ\nhN2 : ∀ (j : ℕ), j ≥ N2 → ∀ (k : ℕ), k ≥ N2 → ↑padicNormE (↑f j - ↑f k) < ε / 3\nj : ℕ\nhj : j ≥ max N N2\n⊢ ↑padicNormE (↑f (max N N2) - ↑(limSeq f (max N N2))) < ε / 3\n[PROOFSTEP]\napply_mod_cast hN (max N N2)\n[GOAL]\ncase a.h₂\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : CauSeq ℚ_[p] ↑padicNormE\nε : ℚ\nhε : ε > 0\nhε3 : 0 < ε / 3\nN : ℕ\nhN : ∀ (i : ℕ), i ≥ N → ↑padicNormE (↑f i - ↑(limSeq f i)) < ε / 3\nN2 : ℕ\nhN2 : ∀ (j : ℕ), j ≥ N2 → ∀ (k : ℕ), k ≥ N2 → ↑padicNormE (↑f j - ↑f k) < ε / 3\nj : ℕ\nhj : j ≥ max N N2\n⊢ max N N2 ≥ N\n[PROOFSTEP]\napply le_max_left\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : CauSeq ℚ_[p] ↑padicNormE\nε : ℚ\nhε : ε > 0\n⊢ ∃ N, ∀ (i : ℕ), i ≥ N → ↑padicNormE (Padic.lim f - ↑f i) < ε\n[PROOFSTEP]\nobtain ⟨N, hN⟩ := exi_rat_seq_conv f (half_pos hε)\n[GOAL]\ncase intro\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : CauSeq ℚ_[p] ↑padicNormE\nε : ℚ\nhε : ε > 0\nN : ℕ\nhN : ∀ (i : ℕ), i ≥ N → ↑padicNormE (↑f i - ↑(limSeq f i)) < ε / 2\n⊢ ∃ N, ∀ (i : ℕ), i ≥ N → ↑padicNormE (Padic.lim f - ↑f i) < ε\n[PROOFSTEP]\nobtain ⟨N2, hN2⟩ := padicNormE.defn (lim' f) (half_pos hε)\n[GOAL]\ncase intro.intro\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : CauSeq ℚ_[p] ↑padicNormE\nε : ℚ\nhε : ε > 0\nN : ℕ\nhN : ∀ (i : ℕ), i ≥ N → ↑padicNormE (↑f i - ↑(limSeq f i)) < ε / 2\nN2 : ℕ\nhN2 : ∀ (i : ℕ), i ≥ N2 → ↑padicNormE (mk (Padic.lim' f) - ↑(↑(Padic.lim' f) i)) < ε / 2\n⊢ ∃ N, ∀ (i : ℕ), i ≥ N → ↑padicNormE (Padic.lim f - ↑f i) < ε\n[PROOFSTEP]\nrefine' ⟨max N N2, fun i hi ↦ _⟩\n[GOAL]\ncase intro.intro\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : CauSeq ℚ_[p] ↑padicNormE\nε : ℚ\nhε : ε > 0\nN : ℕ\nhN : ∀ (i : ℕ), i ≥ N → ↑padicNormE (↑f i - ↑(limSeq f i)) < ε / 2\nN2 : ℕ\nhN2 : ∀ (i : ℕ), i ≥ N2 → ↑padicNormE (mk (Padic.lim' f) - ↑(↑(Padic.lim' f) i)) < ε / 2\ni : ℕ\nhi : i ≥ max N N2\n⊢ ↑padicNormE (Padic.lim f - ↑f i) < ε\n[PROOFSTEP]\nrw [← sub_add_sub_cancel _ (lim' f i : ℚ_[p]) _]\n[GOAL]\ncase intro.intro\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : CauSeq ℚ_[p] ↑padicNormE\nε : ℚ\nhε : ε > 0\nN : ℕ\nhN : ∀ (i : ℕ), i ≥ N → ↑padicNormE (↑f i - ↑(limSeq f i)) < ε / 2\nN2 : ℕ\nhN2 : ∀ (i : ℕ), i ≥ N2 → ↑padicNormE (mk (Padic.lim' f) - ↑(↑(Padic.lim' f) i)) < ε / 2\ni : ℕ\nhi : i ≥ max N N2\n⊢ ↑padicNormE (Padic.lim f - ↑(↑(Padic.lim' f) i) + (↑(↑(Padic.lim' f) i) - ↑f i)) < ε\n[PROOFSTEP]\nrefine' (padicNormE.add_le _ _).trans_lt _\n[GOAL]\ncase intro.intro\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : CauSeq ℚ_[p] ↑padicNormE\nε : ℚ\nhε : ε > 0\nN : ℕ\nhN : ∀ (i : ℕ), i ≥ N → ↑padicNormE (↑f i - ↑(limSeq f i)) < ε / 2\nN2 : ℕ\nhN2 : ∀ (i : ℕ), i ≥ N2 → ↑padicNormE (mk (Padic.lim' f) - ↑(↑(Padic.lim' f) i)) < ε / 2\ni : ℕ\nhi : i ≥ max N N2\n⊢ ↑padicNormE (Padic.lim f - ↑(↑(Padic.lim' f) i)) + ↑padicNormE (↑(↑(Padic.lim' f) i) - ↑f i) < ε\n[PROOFSTEP]\nrw [← add_halves ε]\n[GOAL]\ncase intro.intro\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : CauSeq ℚ_[p] ↑padicNormE\nε : ℚ\nhε : ε > 0\nN : ℕ\nhN : ∀ (i : ℕ), i ≥ N → ↑padicNormE (↑f i - ↑(limSeq f i)) < ε / 2\nN2 : ℕ\nhN2 : ∀ (i : ℕ), i ≥ N2 → ↑padicNormE (mk (Padic.lim' f) - ↑(↑(Padic.lim' f) i)) < ε / 2\ni : ℕ\nhi : i ≥ max N N2\n⊢ ↑padicNormE (Padic.lim f - ↑(↑(Padic.lim' f) i)) + ↑padicNormE (↑(↑(Padic.lim' f) i) - ↑f i) < ε / 2 + ε / 2\n[PROOFSTEP]\napply _root_.add_lt_add\n[GOAL]\ncase intro.intro.h₁\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : CauSeq ℚ_[p] ↑padicNormE\nε : ℚ\nhε : ε > 0\nN : ℕ\nhN : ∀ (i : ℕ), i ≥ N → ↑padicNormE (↑f i - ↑(limSeq f i)) < ε / 2\nN2 : ℕ\nhN2 : ∀ (i : ℕ), i ≥ N2 → ↑padicNormE (mk (Padic.lim' f) - ↑(↑(Padic.lim' f) i)) < ε / 2\ni : ℕ\nhi : i ≥ max N N2\n⊢ ↑padicNormE (Padic.lim f - ↑(↑(Padic.lim' f) i)) < ε / 2\n[PROOFSTEP]\napply hN2 _ (le_of_max_le_right hi)\n[GOAL]\ncase intro.intro.h₂\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : CauSeq ℚ_[p] ↑padicNormE\nε : ℚ\nhε : ε > 0\nN : ℕ\nhN : ∀ (i : ℕ), i ≥ N → ↑padicNormE (↑f i - ↑(limSeq f i)) < ε / 2\nN2 : ℕ\nhN2 : ∀ (i : ℕ), i ≥ N2 → ↑padicNormE (mk (Padic.lim' f) - ↑(↑(Padic.lim' f) i)) < ε / 2\ni : ℕ\nhi : i ≥ max N N2\n⊢ ↑padicNormE (↑(↑(Padic.lim' f) i) - ↑f i) < ε / 2\n[PROOFSTEP]\nrw [padicNormE.map_sub]\n[GOAL]\ncase intro.intro.h₂\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : CauSeq ℚ_[p] ↑padicNormE\nε : ℚ\nhε : ε > 0\nN : ℕ\nhN : ∀ (i : ℕ), i ≥ N → ↑padicNormE (↑f i - ↑(limSeq f i)) < ε / 2\nN2 : ℕ\nhN2 : ∀ (i : ℕ), i ≥ N2 → ↑padicNormE (mk (Padic.lim' f) - ↑(↑(Padic.lim' f) i)) < ε / 2\ni : ℕ\nhi : i ≥ max N N2\n⊢ ↑padicNormE (↑f i - ↑(↑(Padic.lim' f) i)) < ε / 2\n[PROOFSTEP]\nexact hN _ (le_of_max_le_left hi)\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : CauSeq ℚ_[p] ↑padicNormE\n⊢ ∃ q, ∀ (ε : ℚ), ε > 0 → ∃ N, ∀ (i : ℕ), i ≥ N → ↑padicNormE (↑f i - q) < ε\n[PROOFSTEP]\nobtain ⟨x, hx⟩ := complete' f\n[GOAL]\ncase intro\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : CauSeq ℚ_[p] ↑padicNormE\nx : ℚ_[p]\nhx : ∀ (ε : ℚ), ε > 0 → ∃ N, ∀ (i : ℕ), i ≥ N → ↑padicNormE (x - ↑f i) < ε\n⊢ ∃ q, ∀ (ε : ℚ), ε > 0 → ∃ N, ∀ (i : ℕ), i ≥ N → ↑padicNormE (↑f i - q) < ε\n[PROOFSTEP]\nrefine ⟨x, fun ε hε => ?_⟩\n[GOAL]\ncase intro\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : CauSeq ℚ_[p] ↑padicNormE\nx : ℚ_[p]\nhx : ∀ (ε : ℚ), ε > 0 → ∃ N, ∀ (i : ℕ), i ≥ N → ↑padicNormE (x - ↑f i) < ε\nε : ℚ\nhε : ε > 0\n⊢ ∃ N, ∀ (i : ℕ), i ≥ N → ↑padicNormE (↑f i - x) < ε\n[PROOFSTEP]\nobtain ⟨N, hN⟩ := hx ε hε\n[GOAL]\ncase intro.intro\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : CauSeq ℚ_[p] ↑padicNormE\nx : ℚ_[p]\nhx : ∀ (ε : ℚ), ε > 0 → ∃ N, ∀ (i : ℕ), i ≥ N → ↑padicNormE (x - ↑f i) < ε\nε : ℚ\nhε : ε > 0\nN : ℕ\nhN : ∀ (i : ℕ), i ≥ N → ↑padicNormE (x - ↑f i) < ε\n⊢ ∃ N, ∀ (i : ℕ), i ≥ N → ↑padicNormE (↑f i - x) < ε\n[PROOFSTEP]\nrefine ⟨N, fun i hi => ?_⟩\n[GOAL]\ncase intro.intro\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : CauSeq ℚ_[p] ↑padicNormE\nx : ℚ_[p]\nhx : ∀ (ε : ℚ), ε > 0 → ∃ N, ∀ (i : ℕ), i ≥ N → ↑padicNormE (x - ↑f i) < ε\nε : ℚ\nhε : ε > 0\nN : ℕ\nhN : ∀ (i : ℕ), i ≥ N → ↑padicNormE (x - ↑f i) < ε\ni : ℕ\nhi : i ≥ N\n⊢ ↑padicNormE (↑f i - x) < ε\n[PROOFSTEP]\nrw [padicNormE.map_sub]\n[GOAL]\ncase intro.intro\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : CauSeq ℚ_[p] ↑padicNormE\nx : ℚ_[p]\nhx : ∀ (ε : ℚ), ε > 0 → ∃ N, ∀ (i : ℕ), i ≥ N → ↑padicNormE (x - ↑f i) < ε\nε : ℚ\nhε : ε > 0\nN : ℕ\nhN : ∀ (i : ℕ), i ≥ N → ↑padicNormE (x - ↑f i) < ε\ni : ℕ\nhi : i ≥ N\n⊢ ↑padicNormE (x - ↑f i) < ε\n[PROOFSTEP]\nexact hN i hi\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\n⊢ ∀ (x : ℚ_[p]), dist x x = 0\n[PROOFSTEP]\nsimp [dist]\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nx y : ℚ_[p]\n⊢ dist x y = dist y x\n[PROOFSTEP]\nsimp [dist, ← padicNormE.map_neg (x - y : ℚ_[p])]\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nx y z : ℚ_[p]\n⊢ dist x z ≤ dist x y + dist y z\n[PROOFSTEP]\ndsimp [dist]\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nx y z : ℚ_[p]\n⊢ ↑(↑padicNormE (x - z)) ≤ ↑(↑padicNormE (x - y)) + ↑(↑padicNormE (y - z))\n[PROOFSTEP]\nexact_mod_cast padicNormE.sub_le x y z\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\n⊢ ∀ (x y : ℚ_[p]),\n    (fun x y => ↑{ val := ↑(↑padicNormE (x - y)), property := (_ : 0 ≤ ↑(↑padicNormE (x - y))) }) x y =\n      ENNReal.ofReal (dist x y)\n[PROOFSTEP]\nintros\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nx✝ y✝ : ℚ_[p]\n⊢ (fun x y => ↑{ val := ↑(↑padicNormE (x - y)), property := (_ : 0 ≤ ↑(↑padicNormE (x - y))) }) x✝ y✝ =\n    ENNReal.ofReal (dist x✝ y✝)\n[PROOFSTEP]\nexact (ENNReal.ofReal_eq_coe_nnreal _).symm\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\n⊢ ∀ {x y : ℚ_[p]}, dist x y = 0 → x = y\n[PROOFSTEP]\ndsimp [dist]\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\n⊢ ∀ {x y : ℚ_[p]}, ↑(↑padicNormE (x - y)) = 0 → x = y\n[PROOFSTEP]\nintro _ _ h\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nx✝ y✝ : ℚ_[p]\nh : ↑(↑padicNormE (x✝ - y✝)) = 0\n⊢ x✝ = y✝\n[PROOFSTEP]\napply eq_of_sub_eq_zero\n[GOAL]\ncase h\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nx✝ y✝ : ℚ_[p]\nh : ↑(↑padicNormE (x✝ - y✝)) = 0\n⊢ x✝ - y✝ = 0\n[PROOFSTEP]\napply padicNormE.eq_zero.1\n[GOAL]\ncase h\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nx✝ y✝ : ℚ_[p]\nh : ↑(↑padicNormE (x✝ - y✝)) = 0\n⊢ ↑padicNormE (x✝ - y✝) = 0\n[PROOFSTEP]\nexact_mod_cast h\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nsrc✝¹ : Field ℚ_[p] := field\nsrc✝ : MetricSpace ℚ_[p] := metricSpace p\n⊢ ∀ (a b : ℚ_[p]), ‖a * b‖ = ‖a‖ * ‖b‖\n[PROOFSTEP]\nsimp [Norm.norm, map_mul]\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\n⊢ ∀ (x y : ℚ_[p]), ‖x * y‖ = ‖x‖ * ‖y‖\n[PROOFSTEP]\nsimp [Norm.norm, map_mul]\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nq : ℚ_[p]\nε : ℝ\nhε : 0 < ε\nε' : ℚ\nhε'l : 0 < ↑ε'\nhε'r : ↑ε' < ε\n⊢ 0 < ε'\n[PROOFSTEP]\nsimpa using hε'l\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nq : ℚ_[p]\nε : ℝ\nhε : 0 < ε\nε' : ℚ\nhε'l : 0 < ↑ε'\nhε'r : ↑ε' < ε\nr : ℚ\nhr : ↑padicNormE (q - ↑r) < ε'\n⊢ ‖q - ↑r‖ < ↑ε'\n[PROOFSTEP]\nsimpa [Norm.norm] using hr\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nq r : ℚ_[p]\n⊢ ‖q * r‖ = ‖q‖ * ‖r‖\n[PROOFSTEP]\nsimp [Norm.norm, map_mul]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nq r : ℚ_[p]\n⊢ ‖q + r‖ ≤ max ‖q‖ ‖r‖\n[PROOFSTEP]\ndsimp [norm]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nq r : ℚ_[p]\n⊢ ↑(↑padicNormE (q + r)) ≤ max ↑(↑padicNormE q) ↑(↑padicNormE r)\n[PROOFSTEP]\nexact_mod_cast nonarchimedean' _ _\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nq r : ℚ_[p]\nh : ‖q‖ ≠ ‖r‖\n⊢ ‖q + r‖ = max ‖q‖ ‖r‖\n[PROOFSTEP]\ndsimp [norm] at h ⊢\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nq r : ℚ_[p]\nh : ¬↑(↑padicNormE q) = ↑(↑padicNormE r)\n⊢ ↑(↑padicNormE (q + r)) = max ↑(↑padicNormE q) ↑(↑padicNormE r)\n[PROOFSTEP]\nhave : padicNormE q ≠ padicNormE r := by exact_mod_cast h\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nq r : ℚ_[p]\nh : ¬↑(↑padicNormE q) = ↑(↑padicNormE r)\n⊢ ↑padicNormE q ≠ ↑padicNormE r\n[PROOFSTEP]\nexact_mod_cast h\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nq r : ℚ_[p]\nh : ¬↑(↑padicNormE q) = ↑(↑padicNormE r)\nthis : ↑padicNormE q ≠ ↑padicNormE r\n⊢ ↑(↑padicNormE (q + r)) = max ↑(↑padicNormE q) ↑(↑padicNormE r)\n[PROOFSTEP]\nexact_mod_cast add_eq_max_of_ne' this\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nq : ℚ\n⊢ ‖↑q‖ = ↑(padicNorm p q)\n[PROOFSTEP]\ndsimp [norm]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nq : ℚ\n⊢ ↑(↑padicNormE ↑q) = ↑(padicNorm p q)\n[PROOFSTEP]\nrw [← padicNormE.eq_padic_norm']\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\n⊢ ‖↑p‖ = (↑p)⁻¹\n[PROOFSTEP]\nrw [← @Rat.cast_coe_nat ℝ _ p]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\n⊢ ‖↑p‖ = (↑↑p)⁻¹\n[PROOFSTEP]\nrw [← @Rat.cast_coe_nat ℚ_[p] _ p]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\n⊢ ‖↑↑p‖ = (↑↑p)⁻¹\n[PROOFSTEP]\nsimp [hp.1.ne_zero, hp.1.ne_one, norm, padicNorm, padicValRat, padicValInt, zpow_neg, -Rat.cast_coe_nat]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\n⊢ ‖↑p‖ < 1\n[PROOFSTEP]\nrw [norm_p]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\n⊢ (↑p)⁻¹ < 1\n[PROOFSTEP]\napply inv_lt_one\n[GOAL]\ncase ha\np : ℕ\nhp : Fact (Nat.Prime p)\n⊢ 1 < ↑p\n[PROOFSTEP]\nexact_mod_cast hp.1.one_lt\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nn : ℤ\n⊢ ‖↑p ^ n‖ = ↑p ^ (-n)\n[PROOFSTEP]\nrw [norm_zpow, norm_p, zpow_neg, inv_zpow]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nn : ℕ\n⊢ ‖↑p ^ n‖ = ↑p ^ (-↑n)\n[PROOFSTEP]\nrw [← norm_p_zpow, zpow_ofNat]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nsrc✝ : NormedField ℚ_[p] := Padic.normedField p\n⊢ 1 < ‖(↑p)⁻¹‖\n[PROOFSTEP]\nrw [norm_inv, norm_p, inv_inv]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nsrc✝ : NormedField ℚ_[p] := Padic.normedField p\n⊢ 1 < ↑p\n[PROOFSTEP]\nexact_mod_cast hp.1.one_lt\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nq : ℚ_[p]\nf : CauSeq ℚ (padicNorm p)\nhf : Quotient.mk equiv f ≠ 0\nthis : ¬f ≈ 0\nn : ℤ\nhn : PadicSeq.norm f = ↑p ^ (-n)\n⊢ ‖Quotient.mk equiv f‖ = ↑(↑p ^ (-n))\n[PROOFSTEP]\nrw [← hn]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nq : ℚ_[p]\nf : CauSeq ℚ (padicNorm p)\nhf : Quotient.mk equiv f ≠ 0\nthis : ¬f ≈ 0\nn : ℤ\nhn : PadicSeq.norm f = ↑p ^ (-n)\n⊢ ‖Quotient.mk equiv f‖ = ↑(PadicSeq.norm f)\n[PROOFSTEP]\nrfl\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nq : ℚ_[p]\nh : q = 0\n⊢ ‖q‖ = ↑0\n[PROOFSTEP]\nsimp [h]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nn : ℤ\nd : ℕ\nhn : d ≠ 0\nhd : coprime (Int.natAbs n) d\nhq : ¬p ∣ d\nhnz : n = 0\n⊢ ‖↑(Rat.mk' n d)‖ ≤ 1\n[PROOFSTEP]\nhave : (⟨n, d, hn, hd⟩ : ℚ) = 0 := Rat.zero_iff_num_zero.mpr hnz\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nn : ℤ\nd : ℕ\nhn : d ≠ 0\nhd : coprime (Int.natAbs n) d\nhq : ¬p ∣ d\nhnz : n = 0\nthis : Rat.mk' n d = 0\n⊢ ‖↑(Rat.mk' n d)‖ ≤ 1\n[PROOFSTEP]\nrw [this]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nn : ℤ\nd : ℕ\nhn : d ≠ 0\nhd : coprime (Int.natAbs n) d\nhq : ¬p ∣ d\nhnz : n = 0\nthis : Rat.mk' n d = 0\n⊢ ‖↑0‖ ≤ 1\n[PROOFSTEP]\nnorm_num\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nn : ℤ\nd : ℕ\nhn : d ≠ 0\nhd : coprime (Int.natAbs n) d\nhq : ¬p ∣ d\nhnz : ¬n = 0\n⊢ ‖↑(Rat.mk' n d)‖ ≤ 1\n[PROOFSTEP]\nhave hnz' : (⟨n, d, hn, hd⟩ : ℚ) ≠ 0 := mt Rat.zero_iff_num_zero.1 hnz\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nn : ℤ\nd : ℕ\nhn : d ≠ 0\nhd : coprime (Int.natAbs n) d\nhq : ¬p ∣ d\nhnz : ¬n = 0\nhnz' : Rat.mk' n d ≠ 0\n⊢ ‖↑(Rat.mk' n d)‖ ≤ 1\n[PROOFSTEP]\nrw [padicNormE.eq_padicNorm]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nn : ℤ\nd : ℕ\nhn : d ≠ 0\nhd : coprime (Int.natAbs n) d\nhq : ¬p ∣ d\nhnz : ¬n = 0\nhnz' : Rat.mk' n d ≠ 0\n⊢ ↑(padicNorm p (Rat.mk' n d)) ≤ 1\n[PROOFSTEP]\nnorm_cast\n  -- Porting note: `Nat.cast_zero` instead of another `norm_cast` call\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nn : ℤ\nd : ℕ\nhn : d ≠ 0\nhd : coprime (Int.natAbs n) d\nhq : ¬p ∣ d\nhnz : ¬n = 0\nhnz' : Rat.mk' n d ≠ 0\n⊢ padicNorm p (Rat.mk' n d) ≤ 1\n[PROOFSTEP]\nrw [padicNorm.eq_zpow_of_nonzero hnz', padicValRat, neg_sub, padicValNat.eq_zero_of_not_dvd hq, Nat.cast_zero, zero_sub,\n  zpow_neg, zpow_ofNat]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nn : ℤ\nd : ℕ\nhn : d ≠ 0\nhd : coprime (Int.natAbs n) d\nhq : ¬p ∣ d\nhnz : ¬n = 0\nhnz' : Rat.mk' n d ≠ 0\n⊢ (↑p ^ padicValInt p (Rat.mk' n d).num)⁻¹ ≤ 1\n[PROOFSTEP]\napply inv_le_one\n[GOAL]\ncase ha\np : ℕ\nhp : Fact (Nat.Prime p)\nn : ℤ\nd : ℕ\nhn : d ≠ 0\nhd : coprime (Int.natAbs n) d\nhq : ¬p ∣ d\nhnz : ¬n = 0\nhnz' : Rat.mk' n d ≠ 0\n⊢ 1 ≤ ↑p ^ padicValInt p (Rat.mk' n d).num\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase ha\np : ℕ\nhp : Fact (Nat.Prime p)\nn : ℤ\nd : ℕ\nhn : d ≠ 0\nhd : coprime (Int.natAbs n) d\nhq : ¬p ∣ d\nhnz : ¬n = 0\nhnz' : Rat.mk' n d ≠ 0\n⊢ 1 ≤ p ^ padicValInt p (Rat.mk' n d).num\n[PROOFSTEP]\napply one_le_pow\n[GOAL]\ncase ha.h\np : ℕ\nhp : Fact (Nat.Prime p)\nn : ℤ\nd : ℕ\nhn : d ≠ 0\nhd : coprime (Int.natAbs n) d\nhq : ¬p ∣ d\nhnz : ¬n = 0\nhnz' : Rat.mk' n d ≠ 0\n⊢ 0 < p\n[PROOFSTEP]\nexact hp.1.pos\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nz : ℤ\n⊢ ¬p ∣ (↑z).den\n[PROOFSTEP]\nsimp [hp.1.ne_one]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nz : ℤ\nthis : ‖↑↑z‖ ≤ 1\n⊢ ‖↑z‖ ≤ 1\n[PROOFSTEP]\nsimpa\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : ℤ\n⊢ ‖↑k‖ < 1 ↔ ↑p ∣ k\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\np : ℕ\nhp : Fact (Nat.Prime p)\nk : ℤ\n⊢ ‖↑k‖ < 1 → ↑p ∣ k\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\np : ℕ\nhp : Fact (Nat.Prime p)\nk : ℤ\nh : ‖↑k‖ < 1\n⊢ ↑p ∣ k\n[PROOFSTEP]\ncontrapose! h\n[GOAL]\ncase mp\np : ℕ\nhp : Fact (Nat.Prime p)\nk : ℤ\nh : ¬↑p ∣ k\n⊢ 1 ≤ ‖↑k‖\n[PROOFSTEP]\napply le_of_eq\n[GOAL]\ncase mp.a\np : ℕ\nhp : Fact (Nat.Prime p)\nk : ℤ\nh : ¬↑p ∣ k\n⊢ 1 = ‖↑k‖\n[PROOFSTEP]\nrw [eq_comm]\n[GOAL]\ncase mp.a\np : ℕ\nhp : Fact (Nat.Prime p)\nk : ℤ\nh : ¬↑p ∣ k\n⊢ ‖↑k‖ = 1\n[PROOFSTEP]\ncalc\n  ‖(k : ℚ_[p])‖ = ‖((k : ℚ) : ℚ_[p])‖ := by norm_cast\n  _ = padicNorm p k := (padicNormE.eq_padicNorm _)\n  _ = 1 := by exact_mod_cast (int_eq_one_iff k).mpr h\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : ℤ\nh : ¬↑p ∣ k\n⊢ ‖↑k‖ = ‖↑↑k‖\n[PROOFSTEP]\nnorm_cast\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : ℤ\nh : ¬↑p ∣ k\n⊢ ↑(padicNorm p ↑k) = 1\n[PROOFSTEP]\nexact_mod_cast (int_eq_one_iff k).mpr h\n[GOAL]\ncase mpr\np : ℕ\nhp : Fact (Nat.Prime p)\nk : ℤ\n⊢ ↑p ∣ k → ‖↑k‖ < 1\n[PROOFSTEP]\nrintro ⟨x, rfl⟩\n[GOAL]\ncase mpr.intro\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℤ\n⊢ ‖↑(↑p * x)‖ < 1\n[PROOFSTEP]\npush_cast\n[GOAL]\ncase mpr.intro\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℤ\n⊢ ‖↑p * ↑x‖ < 1\n[PROOFSTEP]\nrw [padicNormE.mul]\n[GOAL]\ncase mpr.intro\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℤ\n⊢ ‖↑p‖ * ‖↑x‖ < 1\n[PROOFSTEP]\ncalc\n  _ ≤ ‖(p : ℚ_[p])‖ * 1 := mul_le_mul le_rfl (by simpa using norm_int_le_one _) (norm_nonneg _) (norm_nonneg _)\n  _ < 1 := by\n    rw [mul_one, padicNormE.norm_p]\n    apply inv_lt_one\n    exact_mod_cast hp.1.one_lt\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℤ\n⊢ ‖↑x‖ ≤ 1\n[PROOFSTEP]\nsimpa using norm_int_le_one _\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℤ\n⊢ ‖↑p‖ * 1 < 1\n[PROOFSTEP]\nrw [mul_one, padicNormE.norm_p]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℤ\n⊢ (↑p)⁻¹ < 1\n[PROOFSTEP]\napply inv_lt_one\n[GOAL]\ncase ha\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℤ\n⊢ 1 < ↑p\n[PROOFSTEP]\nexact_mod_cast hp.1.one_lt\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : ℤ\nn : ℕ\n⊢ ‖↑k‖ ≤ ↑p ^ (-↑n) ↔ ↑(p ^ n) ∣ k\n[PROOFSTEP]\nhave : (p : ℝ) ^ (-n : ℤ) = (p : ℚ) ^ (-n : ℤ) := by simp\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : ℤ\nn : ℕ\n⊢ ↑p ^ (-↑n) = ↑(↑p ^ (-↑n))\n[PROOFSTEP]\nsimp\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : ℤ\nn : ℕ\nthis : ↑p ^ (-↑n) = ↑(↑p ^ (-↑n))\n⊢ ‖↑k‖ ≤ ↑p ^ (-↑n) ↔ ↑(p ^ n) ∣ k\n[PROOFSTEP]\nrw [show (k : ℚ_[p]) = ((k : ℚ) : ℚ_[p]) by norm_cast, eq_padicNorm, this]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : ℤ\nn : ℕ\nthis : ↑p ^ (-↑n) = ↑(↑p ^ (-↑n))\n⊢ ↑k = ↑↑k\n[PROOFSTEP]\nnorm_cast\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : ℤ\nn : ℕ\nthis : ↑p ^ (-↑n) = ↑(↑p ^ (-↑n))\n⊢ ↑(padicNorm p ↑k) ≤ ↑(↑p ^ (-↑n)) ↔ ↑(p ^ n) ∣ k\n[PROOFSTEP]\nnorm_cast\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : ℤ\nn : ℕ\nthis : ↑p ^ (-↑n) = ↑(↑p ^ (-↑n))\n⊢ padicNorm p ↑k ≤ ↑p ^ (-↑n) ↔ ↑(p ^ n) ∣ k\n[PROOFSTEP]\nrw [← padicNorm.dvd_iff_norm_le]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nz1 z2 : ℚ_[p]\nh : ‖z1 + z2‖ < ‖z2‖\nhne : ¬‖z1‖ = ‖z2‖\n⊢ ‖z1 + z2‖ ≥ ‖z2‖\n[PROOFSTEP]\nrw [padicNormE.add_eq_max_of_ne hne]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nz1 z2 : ℚ_[p]\nh : ‖z1 + z2‖ < ‖z2‖\nhne : ¬‖z1‖ = ‖z2‖\n⊢ max ‖z1‖ ‖z2‖ ≥ ‖z2‖\n[PROOFSTEP]\napply le_max_right\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nz1 z2 : ℚ_[p]\nh : ‖z1 + z2‖ < ‖z1‖\nhne : ¬‖z1‖ = ‖z2‖\n⊢ ‖z1 + z2‖ ≥ ‖z1‖\n[PROOFSTEP]\nrw [padicNormE.add_eq_max_of_ne hne]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nz1 z2 : ℚ_[p]\nh : ‖z1 + z2‖ < ‖z1‖\nhne : ¬‖z1‖ = ‖z2‖\n⊢ max ‖z1‖ ‖z2‖ ≥ ‖z1‖\n[PROOFSTEP]\napply le_max_left\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nf : CauSeq ℚ_[p] norm\n⊢ ∃ b, f ≈ const norm b\n[PROOFSTEP]\nhave cau_seq_norm_e : IsCauSeq padicNormE f := fun ε hε =>\n  by\n  have h := isCauSeq f ε (by exact_mod_cast hε)\n  dsimp [norm] at h \n  exact_mod_cast h\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nf : CauSeq ℚ_[p] norm\nε : ℚ\nhε : ε > 0\n⊢ ∃ i, ∀ (j : ℕ), j ≥ i → ↑padicNormE (↑f j - ↑f i) < ε\n[PROOFSTEP]\nhave h := isCauSeq f ε (by exact_mod_cast hε)\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nf : CauSeq ℚ_[p] norm\nε : ℚ\nhε : ε > 0\n⊢ ↑ε > 0\n[PROOFSTEP]\nexact_mod_cast hε\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nf : CauSeq ℚ_[p] norm\nε : ℚ\nhε : ε > 0\nh : ∃ i, ∀ (j : ℕ), j ≥ i → ‖↑f j - ↑f i‖ < ↑ε\n⊢ ∃ i, ∀ (j : ℕ), j ≥ i → ↑padicNormE (↑f j - ↑f i) < ε\n[PROOFSTEP]\ndsimp [norm] at h \n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nf : CauSeq ℚ_[p] norm\nε : ℚ\nhε : ε > 0\nh : ∃ i, ∀ (j : ℕ), j ≥ i → ↑(↑padicNormE (↑f j - ↑f i)) < ↑ε\n⊢ ∃ i, ∀ (j : ℕ), j ≥ i → ↑padicNormE (↑f j - ↑f i) < ε\n[PROOFSTEP]\nexact_mod_cast h\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nf : CauSeq ℚ_[p] norm\ncau_seq_norm_e : IsCauSeq ↑padicNormE ↑f\n⊢ ∃ b, f ≈ const norm b\n[PROOFSTEP]\ncases' Padic.complete'' ⟨f, cau_seq_norm_e⟩ with q hq\n[GOAL]\ncase intro\np : ℕ\nhp : Fact (Nat.Prime p)\nf : CauSeq ℚ_[p] norm\ncau_seq_norm_e : IsCauSeq ↑padicNormE ↑f\nq : ℚ_[p]\nhq : ∀ (ε : ℚ), ε > 0 → ∃ N, ∀ (i : ℕ), i ≥ N → ↑padicNormE (↑{ val := ↑f, property := cau_seq_norm_e } i - q) < ε\n⊢ ∃ b, f ≈ const norm b\n[PROOFSTEP]\nexists q\n[GOAL]\ncase intro\np : ℕ\nhp : Fact (Nat.Prime p)\nf : CauSeq ℚ_[p] norm\ncau_seq_norm_e : IsCauSeq ↑padicNormE ↑f\nq : ℚ_[p]\nhq : ∀ (ε : ℚ), ε > 0 → ∃ N, ∀ (i : ℕ), i ≥ N → ↑padicNormE (↑{ val := ↑f, property := cau_seq_norm_e } i - q) < ε\n⊢ f ≈ const norm q\n[PROOFSTEP]\nintro ε hε\n[GOAL]\ncase intro\np : ℕ\nhp : Fact (Nat.Prime p)\nf : CauSeq ℚ_[p] norm\ncau_seq_norm_e : IsCauSeq ↑padicNormE ↑f\nq : ℚ_[p]\nhq : ∀ (ε : ℚ), ε > 0 → ∃ N, ∀ (i : ℕ), i ≥ N → ↑padicNormE (↑{ val := ↑f, property := cau_seq_norm_e } i - q) < ε\nε : ℝ\nhε : ε > 0\n⊢ ∃ i, ∀ (j : ℕ), j ≥ i → ‖↑(f - const norm q) j‖ < ε\n[PROOFSTEP]\ncases' exists_rat_btwn hε with ε' hε'\n[GOAL]\ncase intro.intro\np : ℕ\nhp : Fact (Nat.Prime p)\nf : CauSeq ℚ_[p] norm\ncau_seq_norm_e : IsCauSeq ↑padicNormE ↑f\nq : ℚ_[p]\nhq : ∀ (ε : ℚ), ε > 0 → ∃ N, ∀ (i : ℕ), i ≥ N → ↑padicNormE (↑{ val := ↑f, property := cau_seq_norm_e } i - q) < ε\nε : ℝ\nhε : ε > 0\nε' : ℚ\nhε' : 0 < ↑ε' ∧ ↑ε' < ε\n⊢ ∃ i, ∀ (j : ℕ), j ≥ i → ‖↑(f - const norm q) j‖ < ε\n[PROOFSTEP]\nnorm_cast at hε' \n[GOAL]\ncase intro.intro\np : ℕ\nhp : Fact (Nat.Prime p)\nf : CauSeq ℚ_[p] norm\ncau_seq_norm_e : IsCauSeq ↑padicNormE ↑f\nq : ℚ_[p]\nhq : ∀ (ε : ℚ), ε > 0 → ∃ N, ∀ (i : ℕ), i ≥ N → ↑padicNormE (↑{ val := ↑f, property := cau_seq_norm_e } i - q) < ε\nε : ℝ\nhε : ε > 0\nε' : ℚ\nhε' : 0 < ε' ∧ ↑ε' < ε\n⊢ ∃ i, ∀ (j : ℕ), j ≥ i → ‖↑(f - const norm q) j‖ < ε\n[PROOFSTEP]\ncases' hq ε' hε'.1 with N hN\n[GOAL]\ncase intro.intro.intro\np : ℕ\nhp : Fact (Nat.Prime p)\nf : CauSeq ℚ_[p] norm\ncau_seq_norm_e : IsCauSeq ↑padicNormE ↑f\nq : ℚ_[p]\nhq : ∀ (ε : ℚ), ε > 0 → ∃ N, ∀ (i : ℕ), i ≥ N → ↑padicNormE (↑{ val := ↑f, property := cau_seq_norm_e } i - q) < ε\nε : ℝ\nhε : ε > 0\nε' : ℚ\nhε' : 0 < ε' ∧ ↑ε' < ε\nN : ℕ\nhN : ∀ (i : ℕ), i ≥ N → ↑padicNormE (↑{ val := ↑f, property := cau_seq_norm_e } i - q) < ε'\n⊢ ∃ i, ∀ (j : ℕ), j ≥ i → ‖↑(f - const norm q) j‖ < ε\n[PROOFSTEP]\nexists N\n[GOAL]\ncase intro.intro.intro\np : ℕ\nhp : Fact (Nat.Prime p)\nf : CauSeq ℚ_[p] norm\ncau_seq_norm_e : IsCauSeq ↑padicNormE ↑f\nq : ℚ_[p]\nhq : ∀ (ε : ℚ), ε > 0 → ∃ N, ∀ (i : ℕ), i ≥ N → ↑padicNormE (↑{ val := ↑f, property := cau_seq_norm_e } i - q) < ε\nε : ℝ\nhε : ε > 0\nε' : ℚ\nhε' : 0 < ε' ∧ ↑ε' < ε\nN : ℕ\nhN : ∀ (i : ℕ), i ≥ N → ↑padicNormE (↑{ val := ↑f, property := cau_seq_norm_e } i - q) < ε'\n⊢ ∀ (j : ℕ), j ≥ N → ‖↑(f - const norm q) j‖ < ε\n[PROOFSTEP]\nintro i hi\n[GOAL]\ncase intro.intro.intro\np : ℕ\nhp : Fact (Nat.Prime p)\nf : CauSeq ℚ_[p] norm\ncau_seq_norm_e : IsCauSeq ↑padicNormE ↑f\nq : ℚ_[p]\nhq : ∀ (ε : ℚ), ε > 0 → ∃ N, ∀ (i : ℕ), i ≥ N → ↑padicNormE (↑{ val := ↑f, property := cau_seq_norm_e } i - q) < ε\nε : ℝ\nhε : ε > 0\nε' : ℚ\nhε' : 0 < ε' ∧ ↑ε' < ε\nN : ℕ\nhN : ∀ (i : ℕ), i ≥ N → ↑padicNormE (↑{ val := ↑f, property := cau_seq_norm_e } i - q) < ε'\ni : ℕ\nhi : i ≥ N\n⊢ ‖↑(f - const norm q) i‖ < ε\n[PROOFSTEP]\nhave h := hN i hi\n[GOAL]\ncase intro.intro.intro\np : ℕ\nhp : Fact (Nat.Prime p)\nf : CauSeq ℚ_[p] norm\ncau_seq_norm_e : IsCauSeq ↑padicNormE ↑f\nq : ℚ_[p]\nhq : ∀ (ε : ℚ), ε > 0 → ∃ N, ∀ (i : ℕ), i ≥ N → ↑padicNormE (↑{ val := ↑f, property := cau_seq_norm_e } i - q) < ε\nε : ℝ\nhε : ε > 0\nε' : ℚ\nhε' : 0 < ε' ∧ ↑ε' < ε\nN : ℕ\nhN : ∀ (i : ℕ), i ≥ N → ↑padicNormE (↑{ val := ↑f, property := cau_seq_norm_e } i - q) < ε'\ni : ℕ\nhi : i ≥ N\nh : ↑padicNormE (↑{ val := ↑f, property := cau_seq_norm_e } i - q) < ε'\n⊢ ‖↑(f - const norm q) i‖ < ε\n[PROOFSTEP]\nchange norm (f i - q) < ε\n[GOAL]\ncase intro.intro.intro\np : ℕ\nhp : Fact (Nat.Prime p)\nf : CauSeq ℚ_[p] norm\ncau_seq_norm_e : IsCauSeq ↑padicNormE ↑f\nq : ℚ_[p]\nhq : ∀ (ε : ℚ), ε > 0 → ∃ N, ∀ (i : ℕ), i ≥ N → ↑padicNormE (↑{ val := ↑f, property := cau_seq_norm_e } i - q) < ε\nε : ℝ\nhε : ε > 0\nε' : ℚ\nhε' : 0 < ε' ∧ ↑ε' < ε\nN : ℕ\nhN : ∀ (i : ℕ), i ≥ N → ↑padicNormE (↑{ val := ↑f, property := cau_seq_norm_e } i - q) < ε'\ni : ℕ\nhi : i ≥ N\nh : ↑padicNormE (↑{ val := ↑f, property := cau_seq_norm_e } i - q) < ε'\n⊢ ‖↑f i - q‖ < ε\n[PROOFSTEP]\nrefine lt_trans ?_ hε'.2\n[GOAL]\ncase intro.intro.intro\np : ℕ\nhp : Fact (Nat.Prime p)\nf : CauSeq ℚ_[p] norm\ncau_seq_norm_e : IsCauSeq ↑padicNormE ↑f\nq : ℚ_[p]\nhq : ∀ (ε : ℚ), ε > 0 → ∃ N, ∀ (i : ℕ), i ≥ N → ↑padicNormE (↑{ val := ↑f, property := cau_seq_norm_e } i - q) < ε\nε : ℝ\nhε : ε > 0\nε' : ℚ\nhε' : 0 < ε' ∧ ↑ε' < ε\nN : ℕ\nhN : ∀ (i : ℕ), i ≥ N → ↑padicNormE (↑{ val := ↑f, property := cau_seq_norm_e } i - q) < ε'\ni : ℕ\nhi : i ≥ N\nh : ↑padicNormE (↑{ val := ↑f, property := cau_seq_norm_e } i - q) < ε'\n⊢ ‖↑f i - q‖ < ↑ε'\n[PROOFSTEP]\ndsimp [norm]\n[GOAL]\ncase intro.intro.intro\np : ℕ\nhp : Fact (Nat.Prime p)\nf : CauSeq ℚ_[p] norm\ncau_seq_norm_e : IsCauSeq ↑padicNormE ↑f\nq : ℚ_[p]\nhq : ∀ (ε : ℚ), ε > 0 → ∃ N, ∀ (i : ℕ), i ≥ N → ↑padicNormE (↑{ val := ↑f, property := cau_seq_norm_e } i - q) < ε\nε : ℝ\nhε : ε > 0\nε' : ℚ\nhε' : 0 < ε' ∧ ↑ε' < ε\nN : ℕ\nhN : ∀ (i : ℕ), i ≥ N → ↑padicNormE (↑{ val := ↑f, property := cau_seq_norm_e } i - q) < ε'\ni : ℕ\nhi : i ≥ N\nh : ↑padicNormE (↑{ val := ↑f, property := cau_seq_norm_e } i - q) < ε'\n⊢ ↑(↑padicNormE (↑f i - q)) < ↑ε'\n[PROOFSTEP]\nexact_mod_cast h\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nf : CauSeq ℚ_[p] norm\na : ℝ\nha : 0 < a\nhf : ∀ (i : ℕ), ‖↑f i‖ ≤ a\n⊢ ‖CauSeq.lim f‖ ≤ a\n[PROOFSTEP]\nobtain ⟨N, hN⟩ := (CauSeq.equiv_lim f) _ ha\n[GOAL]\ncase intro\np : ℕ\nhp : Fact (Nat.Prime p)\nf : CauSeq ℚ_[p] norm\na : ℝ\nha : 0 < a\nhf : ∀ (i : ℕ), ‖↑f i‖ ≤ a\nN : ℕ\nhN : ∀ (j : ℕ), j ≥ N → ‖↑(f - const norm (CauSeq.lim f)) j‖ < a\n⊢ ‖CauSeq.lim f‖ ≤ a\n[PROOFSTEP]\nrw [← sub_add_cancel f.lim (f N)]\n[GOAL]\ncase intro\np : ℕ\nhp : Fact (Nat.Prime p)\nf : CauSeq ℚ_[p] norm\na : ℝ\nha : 0 < a\nhf : ∀ (i : ℕ), ‖↑f i‖ ≤ a\nN : ℕ\nhN : ∀ (j : ℕ), j ≥ N → ‖↑(f - const norm (CauSeq.lim f)) j‖ < a\n⊢ ‖CauSeq.lim f - ↑f N + ↑f N‖ ≤ a\n[PROOFSTEP]\nrefine le_trans (padicNormE.nonarchimedean _ _) ?_\n[GOAL]\ncase intro\np : ℕ\nhp : Fact (Nat.Prime p)\nf : CauSeq ℚ_[p] norm\na : ℝ\nha : 0 < a\nhf : ∀ (i : ℕ), ‖↑f i‖ ≤ a\nN : ℕ\nhN : ∀ (j : ℕ), j ≥ N → ‖↑(f - const norm (CauSeq.lim f)) j‖ < a\n⊢ max ‖CauSeq.lim f - ↑f N‖ ‖↑f N‖ ≤ a\n[PROOFSTEP]\nrw [norm_sub_rev]\n[GOAL]\ncase intro\np : ℕ\nhp : Fact (Nat.Prime p)\nf : CauSeq ℚ_[p] norm\na : ℝ\nha : 0 < a\nhf : ∀ (i : ℕ), ‖↑f i‖ ≤ a\nN : ℕ\nhN : ∀ (j : ℕ), j ≥ N → ‖↑(f - const norm (CauSeq.lim f)) j‖ < a\n⊢ max ‖↑f N - CauSeq.lim f‖ ‖↑f N‖ ≤ a\n[PROOFSTEP]\nexact\n  max_le (le_of_lt (hN _ le_rfl))\n    (hf _)\n      -- Porting note: the following nice `calc` block does not work\n        -- exact calc\n        --   ‖f.lim‖ = ‖f.lim - f N + f N‖ := sorry\n        --   ‖f.lim - f N + f N‖ ≤ max ‖f.lim - f N‖ ‖f N‖ := sorry -- (padicNormE.nonarchimedean _ _)\n        --   max ‖f.lim - f N‖ ‖f N‖ = max ‖f N - f.lim‖ ‖f N‖ := sorry -- by congr; rw [norm_sub_rev]\n        --   max ‖f N - f.lim‖ ‖f N‖ ≤ a := sorry -- max_le (le_of_lt (hN _ le_rfl)) (hf _)\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\n⊢ CompleteSpace ℚ_[p]\n[PROOFSTEP]\napply complete_of_cauchySeq_tendsto\n[GOAL]\ncase a\np : ℕ\nhp : Fact (Nat.Prime p)\n⊢ ∀ (u : ℕ → ℚ_[p]), CauchySeq u → ∃ a, Tendsto u atTop (nhds a)\n[PROOFSTEP]\nintro u hu\n[GOAL]\ncase a\np : ℕ\nhp : Fact (Nat.Prime p)\nu : ℕ → ℚ_[p]\nhu : CauchySeq u\n⊢ ∃ a, Tendsto u atTop (nhds a)\n[PROOFSTEP]\nlet c : CauSeq ℚ_[p] norm := ⟨u, Metric.cauchySeq_iff'.mp hu⟩\n[GOAL]\ncase a\np : ℕ\nhp : Fact (Nat.Prime p)\nu : ℕ → ℚ_[p]\nhu : CauchySeq u\nc : CauSeq ℚ_[p] norm := { val := u, property := (_ : ∀ (ε : ℝ), ε > 0 → ∃ N, ∀ (n : ℕ), n ≥ N → dist (u n) (u N) < ε) }\n⊢ ∃ a, Tendsto u atTop (nhds a)\n[PROOFSTEP]\nrefine' ⟨c.lim, fun s h ↦ _⟩\n[GOAL]\ncase a\np : ℕ\nhp : Fact (Nat.Prime p)\nu : ℕ → ℚ_[p]\nhu : CauchySeq u\nc : CauSeq ℚ_[p] norm := { val := u, property := (_ : ∀ (ε : ℝ), ε > 0 → ∃ N, ∀ (n : ℕ), n ≥ N → dist (u n) (u N) < ε) }\ns : Set ℚ_[p]\nh : s ∈ nhds (CauSeq.lim c)\n⊢ s ∈ map u atTop\n[PROOFSTEP]\nrcases Metric.mem_nhds_iff.1 h with ⟨ε, ε0, hε⟩\n[GOAL]\ncase a.intro.intro\np : ℕ\nhp : Fact (Nat.Prime p)\nu : ℕ → ℚ_[p]\nhu : CauchySeq u\nc : CauSeq ℚ_[p] norm := { val := u, property := (_ : ∀ (ε : ℝ), ε > 0 → ∃ N, ∀ (n : ℕ), n ≥ N → dist (u n) (u N) < ε) }\ns : Set ℚ_[p]\nh : s ∈ nhds (CauSeq.lim c)\nε : ℝ\nε0 : ε > 0\nhε : ball (CauSeq.lim c) ε ⊆ s\n⊢ s ∈ map u atTop\n[PROOFSTEP]\nhave := c.equiv_lim ε ε0\n[GOAL]\ncase a.intro.intro\np : ℕ\nhp : Fact (Nat.Prime p)\nu : ℕ → ℚ_[p]\nhu : CauchySeq u\nc : CauSeq ℚ_[p] norm := { val := u, property := (_ : ∀ (ε : ℝ), ε > 0 → ∃ N, ∀ (n : ℕ), n ≥ N → dist (u n) (u N) < ε) }\ns : Set ℚ_[p]\nh : s ∈ nhds (CauSeq.lim c)\nε : ℝ\nε0 : ε > 0\nhε : ball (CauSeq.lim c) ε ⊆ s\nthis : ∃ i, ∀ (j : ℕ), j ≥ i → ‖↑(c - const norm (CauSeq.lim c)) j‖ < ε\n⊢ s ∈ map u atTop\n[PROOFSTEP]\nsimp only [mem_map, mem_atTop_sets, mem_setOf_eq]\n[GOAL]\ncase a.intro.intro\np : ℕ\nhp : Fact (Nat.Prime p)\nu : ℕ → ℚ_[p]\nhu : CauchySeq u\nc : CauSeq ℚ_[p] norm := { val := u, property := (_ : ∀ (ε : ℝ), ε > 0 → ∃ N, ∀ (n : ℕ), n ≥ N → dist (u n) (u N) < ε) }\ns : Set ℚ_[p]\nh : s ∈ nhds (CauSeq.lim c)\nε : ℝ\nε0 : ε > 0\nhε : ball (CauSeq.lim c) ε ⊆ s\nthis : ∃ i, ∀ (j : ℕ), j ≥ i → ‖↑(c - const norm (CauSeq.lim c)) j‖ < ε\n⊢ ∃ a, ∀ (b : ℕ), b ≥ a → b ∈ u ⁻¹' s\n[PROOFSTEP]\nexact this.imp fun N hN n hn ↦ hε (hN n hn)\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : CauSeq ℚ (padicNorm p)\nh : f ≈ g\n⊢ PadicSeq.valuation f = PadicSeq.valuation g\n[PROOFSTEP]\nby_cases hf : f ≈ 0\n[GOAL]\ncase pos\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : CauSeq ℚ (padicNorm p)\nh : f ≈ g\nhf : f ≈ 0\n⊢ PadicSeq.valuation f = PadicSeq.valuation g\n[PROOFSTEP]\nhave hg : g ≈ 0 := Setoid.trans (Setoid.symm h) hf\n[GOAL]\ncase pos\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : CauSeq ℚ (padicNorm p)\nh : f ≈ g\nhf : f ≈ 0\nhg : g ≈ 0\n⊢ PadicSeq.valuation f = PadicSeq.valuation g\n[PROOFSTEP]\nsimp [hf, hg, PadicSeq.valuation]\n[GOAL]\ncase neg\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : CauSeq ℚ (padicNorm p)\nh : f ≈ g\nhf : ¬f ≈ 0\n⊢ PadicSeq.valuation f = PadicSeq.valuation g\n[PROOFSTEP]\nhave hg : ¬g ≈ 0 := fun hg ↦ hf (Setoid.trans h hg)\n[GOAL]\ncase neg\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : CauSeq ℚ (padicNorm p)\nh : f ≈ g\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\n⊢ PadicSeq.valuation f = PadicSeq.valuation g\n[PROOFSTEP]\nrw [PadicSeq.val_eq_iff_norm_eq hf hg]\n[GOAL]\ncase neg\np : ℕ\nhp : Fact (Nat.Prime p)\nf g : CauSeq ℚ (padicNorm p)\nh : f ≈ g\nhf : ¬f ≈ 0\nhg : ¬g ≈ 0\n⊢ PadicSeq.norm f = PadicSeq.norm g\n[PROOFSTEP]\nexact PadicSeq.norm_equiv h\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\n⊢ valuation 1 = 0\n[PROOFSTEP]\nchange dite (CauSeq.const (padicNorm p) 1 ≈ _) _ _ = _\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\n⊢ (if h : const (padicNorm p) 1 ≈ 0 then (fun hf => 0) h\n    else (fun hf => padicValRat p (↑(const (padicNorm p) 1) (PadicSeq.stationaryPoint hf))) h) =\n    0\n[PROOFSTEP]\nhave h : ¬CauSeq.const (padicNorm p) 1 ≈ 0 := by\n  intro H\n  erw [const_equiv p] at H \n  exact one_ne_zero H\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\n⊢ ¬const (padicNorm p) 1 ≈ 0\n[PROOFSTEP]\nintro H\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nH : const (padicNorm p) 1 ≈ 0\n⊢ False\n[PROOFSTEP]\nerw [const_equiv p] at H \n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nH : 1 = 0\n⊢ False\n[PROOFSTEP]\nexact one_ne_zero H\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nh : ¬const (padicNorm p) 1 ≈ 0\n⊢ (if h : const (padicNorm p) 1 ≈ 0 then (fun hf => 0) h\n    else (fun hf => padicValRat p (↑(const (padicNorm p) 1) (PadicSeq.stationaryPoint hf))) h) =\n    0\n[PROOFSTEP]\nrw [dif_neg h]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nh : ¬const (padicNorm p) 1 ≈ 0\n⊢ (fun hf => padicValRat p (↑(const (padicNorm p) 1) (PadicSeq.stationaryPoint hf))) h = 0\n[PROOFSTEP]\nsimp\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℚ_[p]\n⊢ x ≠ 0 → ‖x‖ = ↑p ^ (-valuation x)\n[PROOFSTEP]\nrefine Quotient.inductionOn' x fun f hf => ?_\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℚ_[p]\nf : CauSeq ℚ (padicNorm p)\nhf : Quotient.mk'' f ≠ 0\n⊢ ‖Quotient.mk'' f‖ = ↑p ^ (-valuation (Quotient.mk'' f))\n[PROOFSTEP]\nchange (PadicSeq.norm _ : ℝ) = (p : ℝ) ^ (-PadicSeq.valuation _)\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℚ_[p]\nf : CauSeq ℚ (padicNorm p)\nhf : Quotient.mk'' f ≠ 0\n⊢ ↑(PadicSeq.norm f) = ↑p ^ (-PadicSeq.valuation f)\n[PROOFSTEP]\nrw [PadicSeq.norm_eq_pow_val]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℚ_[p]\nf : CauSeq ℚ (padicNorm p)\nhf : Quotient.mk'' f ≠ 0\n⊢ ↑(↑p ^ (-PadicSeq.valuation f)) = ↑p ^ (-PadicSeq.valuation f)\np : ℕ hp : Fact (Nat.Prime p) x : ℚ_[p] f : CauSeq ℚ (padicNorm p) hf : Quotient.mk'' f ≠ 0 ⊢ ¬f ≈ 0\n[PROOFSTEP]\nchange ↑((p : ℚ) ^ (-PadicSeq.valuation f)) = (p : ℝ) ^ (-PadicSeq.valuation f)\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℚ_[p]\nf : CauSeq ℚ (padicNorm p)\nhf : Quotient.mk'' f ≠ 0\n⊢ ↑(↑p ^ (-PadicSeq.valuation f)) = ↑p ^ (-PadicSeq.valuation f)\n[PROOFSTEP]\nrw [Rat.cast_zpow, Rat.cast_coe_nat]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℚ_[p]\nf : CauSeq ℚ (padicNorm p)\nhf : Quotient.mk'' f ≠ 0\n⊢ ¬f ≈ 0\n[PROOFSTEP]\napply CauSeq.not_limZero_of_not_congr_zero\n[GOAL]\ncase hf\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℚ_[p]\nf : CauSeq ℚ (padicNorm p)\nhf : Quotient.mk'' f ≠ 0\n⊢ ¬f - 0 ≈ 0\n[PROOFSTEP]\nintro hf'\n[GOAL]\ncase hf\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℚ_[p]\nf : CauSeq ℚ (padicNorm p)\nhf : Quotient.mk'' f ≠ 0\nhf' : f - 0 ≈ 0\n⊢ False\n[PROOFSTEP]\napply hf\n[GOAL]\ncase hf\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℚ_[p]\nf : CauSeq ℚ (padicNorm p)\nhf : Quotient.mk'' f ≠ 0\nhf' : f - 0 ≈ 0\n⊢ Quotient.mk'' f = 0\n[PROOFSTEP]\napply Quotient.sound\n[GOAL]\ncase hf.a\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℚ_[p]\nf : CauSeq ℚ (padicNorm p)\nhf : Quotient.mk'' f ≠ 0\nhf' : f - 0 ≈ 0\n⊢ f ≈ const (padicNorm p) 0\n[PROOFSTEP]\nsimpa using hf'\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\n⊢ valuation ↑p = 1\n[PROOFSTEP]\nhave h : (1 : ℝ) < p := by exact_mod_cast (Fact.out : p.Prime).one_lt\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\n⊢ 1 < ↑p\n[PROOFSTEP]\nexact_mod_cast (Fact.out : p.Prime).one_lt\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nh : 1 < ↑p\n⊢ valuation ↑p = 1\n[PROOFSTEP]\nrefine' neg_injective ((zpow_strictMono h).injective <| (norm_eq_pow_val _).symm.trans _)\n[GOAL]\ncase refine'_1\np : ℕ\nhp : Fact (Nat.Prime p)\nh : 1 < ↑p\n⊢ ↑p ≠ 0\n[PROOFSTEP]\nexact_mod_cast (Fact.out : p.Prime).ne_zero\n[GOAL]\ncase refine'_2\np : ℕ\nhp : Fact (Nat.Prime p)\nh : 1 < ↑p\n⊢ ‖↑p‖ = (fun x x_1 => x ^ x_1) (↑p) (-1)\n[PROOFSTEP]\nsimp\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nx y : ℚ_[p]\nhxy : x + y ≠ 0\n⊢ min (valuation x) (valuation y) ≤ valuation (x + y)\n[PROOFSTEP]\nby_cases hx : x = 0\n[GOAL]\ncase pos\np : ℕ\nhp : Fact (Nat.Prime p)\nx y : ℚ_[p]\nhxy : x + y ≠ 0\nhx : x = 0\n⊢ min (valuation x) (valuation y) ≤ valuation (x + y)\n[PROOFSTEP]\nrw [hx, zero_add]\n[GOAL]\ncase pos\np : ℕ\nhp : Fact (Nat.Prime p)\nx y : ℚ_[p]\nhxy : x + y ≠ 0\nhx : x = 0\n⊢ min (valuation 0) (valuation y) ≤ valuation y\n[PROOFSTEP]\nexact min_le_right _ _\n[GOAL]\ncase neg\np : ℕ\nhp : Fact (Nat.Prime p)\nx y : ℚ_[p]\nhxy : x + y ≠ 0\nhx : ¬x = 0\n⊢ min (valuation x) (valuation y) ≤ valuation (x + y)\n[PROOFSTEP]\nby_cases hy : y = 0\n[GOAL]\ncase pos\np : ℕ\nhp : Fact (Nat.Prime p)\nx y : ℚ_[p]\nhxy : x + y ≠ 0\nhx : ¬x = 0\nhy : y = 0\n⊢ min (valuation x) (valuation y) ≤ valuation (x + y)\n[PROOFSTEP]\nrw [hy, add_zero]\n[GOAL]\ncase pos\np : ℕ\nhp : Fact (Nat.Prime p)\nx y : ℚ_[p]\nhxy : x + y ≠ 0\nhx : ¬x = 0\nhy : y = 0\n⊢ min (valuation x) (valuation 0) ≤ valuation x\n[PROOFSTEP]\nexact min_le_left _ _\n[GOAL]\ncase neg\np : ℕ\nhp : Fact (Nat.Prime p)\nx y : ℚ_[p]\nhxy : x + y ≠ 0\nhx : ¬x = 0\nhy : ¬y = 0\n⊢ min (valuation x) (valuation y) ≤ valuation (x + y)\n[PROOFSTEP]\nhave h_norm : ‖x + y‖ ≤ max ‖x‖ ‖y‖ := padicNormE.nonarchimedean x y\n[GOAL]\ncase neg\np : ℕ\nhp : Fact (Nat.Prime p)\nx y : ℚ_[p]\nhxy : x + y ≠ 0\nhx : ¬x = 0\nhy : ¬y = 0\nh_norm : ‖x + y‖ ≤ max ‖x‖ ‖y‖\n⊢ min (valuation x) (valuation y) ≤ valuation (x + y)\n[PROOFSTEP]\nhave hp_one : (1 : ℝ) < p := by\n  rw [← Nat.cast_one, Nat.cast_lt]\n  exact Nat.Prime.one_lt hp.elim\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nx y : ℚ_[p]\nhxy : x + y ≠ 0\nhx : ¬x = 0\nhy : ¬y = 0\nh_norm : ‖x + y‖ ≤ max ‖x‖ ‖y‖\n⊢ 1 < ↑p\n[PROOFSTEP]\nrw [← Nat.cast_one, Nat.cast_lt]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nx y : ℚ_[p]\nhxy : x + y ≠ 0\nhx : ¬x = 0\nhy : ¬y = 0\nh_norm : ‖x + y‖ ≤ max ‖x‖ ‖y‖\n⊢ 1 < p\n[PROOFSTEP]\nexact Nat.Prime.one_lt hp.elim\n[GOAL]\ncase neg\np : ℕ\nhp : Fact (Nat.Prime p)\nx y : ℚ_[p]\nhxy : x + y ≠ 0\nhx : ¬x = 0\nhy : ¬y = 0\nh_norm : ‖x + y‖ ≤ max ‖x‖ ‖y‖\nhp_one : 1 < ↑p\n⊢ min (valuation x) (valuation y) ≤ valuation (x + y)\n[PROOFSTEP]\nrwa [norm_eq_pow_val hx, norm_eq_pow_val hy, norm_eq_pow_val hxy, zpow_le_max_iff_min_le hp_one] at h_norm \n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nx y : ℚ_[p]\nhx : x ≠ 0\nhy : y ≠ 0\n⊢ valuation (x * y) = valuation x + valuation y\n[PROOFSTEP]\nhave h_norm : ‖x * y‖ = ‖x‖ * ‖y‖ := norm_mul x y\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nx y : ℚ_[p]\nhx : x ≠ 0\nhy : y ≠ 0\nh_norm : ‖x * y‖ = ‖x‖ * ‖y‖\n⊢ valuation (x * y) = valuation x + valuation y\n[PROOFSTEP]\nhave hp_ne_one : (p : ℝ) ≠ 1 := by\n  rw [← Nat.cast_one, Ne.def, Nat.cast_inj]\n  exact Nat.Prime.ne_one hp.elim\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nx y : ℚ_[p]\nhx : x ≠ 0\nhy : y ≠ 0\nh_norm : ‖x * y‖ = ‖x‖ * ‖y‖\n⊢ ↑p ≠ 1\n[PROOFSTEP]\nrw [← Nat.cast_one, Ne.def, Nat.cast_inj]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nx y : ℚ_[p]\nhx : x ≠ 0\nhy : y ≠ 0\nh_norm : ‖x * y‖ = ‖x‖ * ‖y‖\n⊢ ¬p = 1\n[PROOFSTEP]\nexact Nat.Prime.ne_one hp.elim\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nx y : ℚ_[p]\nhx : x ≠ 0\nhy : y ≠ 0\nh_norm : ‖x * y‖ = ‖x‖ * ‖y‖\nhp_ne_one : ↑p ≠ 1\n⊢ valuation (x * y) = valuation x + valuation y\n[PROOFSTEP]\nhave hp_pos : (0 : ℝ) < p := by\n  rw [← Nat.cast_zero, Nat.cast_lt]\n  exact Nat.Prime.pos hp.elim\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nx y : ℚ_[p]\nhx : x ≠ 0\nhy : y ≠ 0\nh_norm : ‖x * y‖ = ‖x‖ * ‖y‖\nhp_ne_one : ↑p ≠ 1\n⊢ 0 < ↑p\n[PROOFSTEP]\nrw [← Nat.cast_zero, Nat.cast_lt]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nx y : ℚ_[p]\nhx : x ≠ 0\nhy : y ≠ 0\nh_norm : ‖x * y‖ = ‖x‖ * ‖y‖\nhp_ne_one : ↑p ≠ 1\n⊢ 0 < p\n[PROOFSTEP]\nexact Nat.Prime.pos hp.elim\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nx y : ℚ_[p]\nhx : x ≠ 0\nhy : y ≠ 0\nh_norm : ‖x * y‖ = ‖x‖ * ‖y‖\nhp_ne_one : ↑p ≠ 1\nhp_pos : 0 < ↑p\n⊢ valuation (x * y) = valuation x + valuation y\n[PROOFSTEP]\nrw [norm_eq_pow_val hx, norm_eq_pow_val hy, norm_eq_pow_val (mul_ne_zero hx hy), ← zpow_add₀ (ne_of_gt hp_pos),\n  zpow_inj hp_pos hp_ne_one, ← neg_add, neg_inj] at h_norm \n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nx y : ℚ_[p]\nhx : x ≠ 0\nhy : y ≠ 0\nh_norm : valuation (x * y) = valuation x + valuation y\nhp_ne_one : ↑p ≠ 1\nhp_pos : 0 < ↑p\n⊢ valuation (x * y) = valuation x + valuation y\n[PROOFSTEP]\nexact h_norm\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\n⊢ addValuationDef 0 = ⊤\n[PROOFSTEP]\nrw [addValuationDef, if_pos (Eq.refl _)]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\n⊢ addValuationDef 1 = 0\n[PROOFSTEP]\nrw [addValuationDef, if_neg one_ne_zero, valuation_one, WithTop.coe_zero]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nx y : ℚ_[p]\n⊢ addValuationDef (x * y) = addValuationDef x + addValuationDef y\n[PROOFSTEP]\nsimp only [addValuationDef]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nx y : ℚ_[p]\n⊢ (if x * y = 0 then ⊤ else ↑(valuation (x * y))) =\n    (if x = 0 then ⊤ else ↑(valuation x)) + if y = 0 then ⊤ else ↑(valuation y)\n[PROOFSTEP]\nby_cases hx : x = 0\n[GOAL]\ncase pos\np : ℕ\nhp : Fact (Nat.Prime p)\nx y : ℚ_[p]\nhx : x = 0\n⊢ (if x * y = 0 then ⊤ else ↑(valuation (x * y))) =\n    (if x = 0 then ⊤ else ↑(valuation x)) + if y = 0 then ⊤ else ↑(valuation y)\n[PROOFSTEP]\nrw [hx, if_pos (Eq.refl _), zero_mul, if_pos (Eq.refl _), WithTop.top_add]\n[GOAL]\ncase neg\np : ℕ\nhp : Fact (Nat.Prime p)\nx y : ℚ_[p]\nhx : ¬x = 0\n⊢ (if x * y = 0 then ⊤ else ↑(valuation (x * y))) =\n    (if x = 0 then ⊤ else ↑(valuation x)) + if y = 0 then ⊤ else ↑(valuation y)\n[PROOFSTEP]\nby_cases hy : y = 0\n[GOAL]\ncase pos\np : ℕ\nhp : Fact (Nat.Prime p)\nx y : ℚ_[p]\nhx : ¬x = 0\nhy : y = 0\n⊢ (if x * y = 0 then ⊤ else ↑(valuation (x * y))) =\n    (if x = 0 then ⊤ else ↑(valuation x)) + if y = 0 then ⊤ else ↑(valuation y)\n[PROOFSTEP]\nrw [hy, if_pos (Eq.refl _), mul_zero, if_pos (Eq.refl _), WithTop.add_top]\n[GOAL]\ncase neg\np : ℕ\nhp : Fact (Nat.Prime p)\nx y : ℚ_[p]\nhx : ¬x = 0\nhy : ¬y = 0\n⊢ (if x * y = 0 then ⊤ else ↑(valuation (x * y))) =\n    (if x = 0 then ⊤ else ↑(valuation x)) + if y = 0 then ⊤ else ↑(valuation y)\n[PROOFSTEP]\nrw [if_neg hx, if_neg hy, if_neg (mul_ne_zero hx hy), ← WithTop.coe_add, WithTop.coe_eq_coe, valuation_map_mul hx hy]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nx y : ℚ_[p]\n⊢ min (addValuationDef x) (addValuationDef y) ≤ addValuationDef (x + y)\n[PROOFSTEP]\nsimp only [addValuationDef]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nx y : ℚ_[p]\n⊢ min (if x = 0 then ⊤ else ↑(valuation x)) (if y = 0 then ⊤ else ↑(valuation y)) ≤\n    if x + y = 0 then ⊤ else ↑(valuation (x + y))\n[PROOFSTEP]\nby_cases hxy : x + y = 0\n[GOAL]\ncase pos\np : ℕ\nhp : Fact (Nat.Prime p)\nx y : ℚ_[p]\nhxy : x + y = 0\n⊢ min (if x = 0 then ⊤ else ↑(valuation x)) (if y = 0 then ⊤ else ↑(valuation y)) ≤\n    if x + y = 0 then ⊤ else ↑(valuation (x + y))\n[PROOFSTEP]\nrw [hxy, if_pos (Eq.refl _)]\n[GOAL]\ncase pos\np : ℕ\nhp : Fact (Nat.Prime p)\nx y : ℚ_[p]\nhxy : x + y = 0\n⊢ min (if x = 0 then ⊤ else ↑(valuation x)) (if y = 0 then ⊤ else ↑(valuation y)) ≤ ⊤\n[PROOFSTEP]\nexact le_top\n[GOAL]\ncase neg\np : ℕ\nhp : Fact (Nat.Prime p)\nx y : ℚ_[p]\nhxy : ¬x + y = 0\n⊢ min (if x = 0 then ⊤ else ↑(valuation x)) (if y = 0 then ⊤ else ↑(valuation y)) ≤\n    if x + y = 0 then ⊤ else ↑(valuation (x + y))\n[PROOFSTEP]\nby_cases hx : x = 0\n[GOAL]\ncase pos\np : ℕ\nhp : Fact (Nat.Prime p)\nx y : ℚ_[p]\nhxy : ¬x + y = 0\nhx : x = 0\n⊢ min (if x = 0 then ⊤ else ↑(valuation x)) (if y = 0 then ⊤ else ↑(valuation y)) ≤\n    if x + y = 0 then ⊤ else ↑(valuation (x + y))\n[PROOFSTEP]\nrw [hx, if_pos (Eq.refl _), min_eq_right, zero_add]\n[GOAL]\ncase pos\np : ℕ\nhp : Fact (Nat.Prime p)\nx y : ℚ_[p]\nhxy : ¬x + y = 0\nhx : x = 0\n⊢ (if y = 0 then ⊤ else ↑(valuation y)) ≤ ⊤\n[PROOFSTEP]\nexact le_top\n[GOAL]\ncase neg\np : ℕ\nhp : Fact (Nat.Prime p)\nx y : ℚ_[p]\nhxy : ¬x + y = 0\nhx : ¬x = 0\n⊢ min (if x = 0 then ⊤ else ↑(valuation x)) (if y = 0 then ⊤ else ↑(valuation y)) ≤\n    if x + y = 0 then ⊤ else ↑(valuation (x + y))\n[PROOFSTEP]\nby_cases hy : y = 0\n[GOAL]\ncase pos\np : ℕ\nhp : Fact (Nat.Prime p)\nx y : ℚ_[p]\nhxy : ¬x + y = 0\nhx : ¬x = 0\nhy : y = 0\n⊢ min (if x = 0 then ⊤ else ↑(valuation x)) (if y = 0 then ⊤ else ↑(valuation y)) ≤\n    if x + y = 0 then ⊤ else ↑(valuation (x + y))\n[PROOFSTEP]\nrw [hy, if_pos (Eq.refl _), min_eq_left, add_zero]\n[GOAL]\ncase pos\np : ℕ\nhp : Fact (Nat.Prime p)\nx y : ℚ_[p]\nhxy : ¬x + y = 0\nhx : ¬x = 0\nhy : y = 0\n⊢ (if x = 0 then ⊤ else ↑(valuation x)) ≤ ⊤\n[PROOFSTEP]\nexact le_top\n[GOAL]\ncase neg\np : ℕ\nhp : Fact (Nat.Prime p)\nx y : ℚ_[p]\nhxy : ¬x + y = 0\nhx : ¬x = 0\nhy : ¬y = 0\n⊢ min (if x = 0 then ⊤ else ↑(valuation x)) (if y = 0 then ⊤ else ↑(valuation y)) ≤\n    if x + y = 0 then ⊤ else ↑(valuation (x + y))\n[PROOFSTEP]\nrw [if_neg hx, if_neg hy, if_neg hxy, ← WithTop.coe_min, WithTop.coe_le_coe]\n[GOAL]\ncase neg\np : ℕ\nhp : Fact (Nat.Prime p)\nx y : ℚ_[p]\nhxy : ¬x + y = 0\nhx : ¬x = 0\nhy : ¬y = 0\n⊢ min (valuation x) (valuation y) ≤ valuation (x + y)\n[PROOFSTEP]\nexact valuation_map_add hxy\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℚ_[p]\nhx : x ≠ 0\n⊢ ↑addValuation x = ↑(valuation x)\n[PROOFSTEP]\nsimp only [Padic.addValuation, AddValuation.of_apply, addValuationDef, if_neg hx]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℚ_[p]\nn : ℤ\n⊢ ‖x‖ ≤ ↑p ^ n ↔ ‖x‖ < ↑p ^ (n + 1)\n[PROOFSTEP]\nhave aux : ∀ n : ℤ, 0 < ((p : ℝ) ^ n) := by\n  apply Nat.zpow_pos_of_pos\n  exact hp.1.pos\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℚ_[p]\nn : ℤ\n⊢ ∀ (n : ℤ), 0 < ↑p ^ n\n[PROOFSTEP]\napply Nat.zpow_pos_of_pos\n[GOAL]\ncase h\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℚ_[p]\nn : ℤ\n⊢ 0 < p\n[PROOFSTEP]\nexact hp.1.pos\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℚ_[p]\nn : ℤ\naux : ∀ (n : ℤ), 0 < ↑p ^ n\n⊢ ‖x‖ ≤ ↑p ^ n ↔ ‖x‖ < ↑p ^ (n + 1)\n[PROOFSTEP]\nby_cases hx0 : x = 0\n[GOAL]\ncase pos\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℚ_[p]\nn : ℤ\naux : ∀ (n : ℤ), 0 < ↑p ^ n\nhx0 : x = 0\n⊢ ‖x‖ ≤ ↑p ^ n ↔ ‖x‖ < ↑p ^ (n + 1)\n[PROOFSTEP]\nsimp [hx0, norm_zero, aux, le_of_lt (aux _)]\n[GOAL]\ncase neg\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℚ_[p]\nn : ℤ\naux : ∀ (n : ℤ), 0 < ↑p ^ n\nhx0 : ¬x = 0\n⊢ ‖x‖ ≤ ↑p ^ n ↔ ‖x‖ < ↑p ^ (n + 1)\n[PROOFSTEP]\nrw [norm_eq_pow_val hx0]\n[GOAL]\ncase neg\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℚ_[p]\nn : ℤ\naux : ∀ (n : ℤ), 0 < ↑p ^ n\nhx0 : ¬x = 0\n⊢ ↑p ^ (-valuation x) ≤ ↑p ^ n ↔ ↑p ^ (-valuation x) < ↑p ^ (n + 1)\n[PROOFSTEP]\nhave h1p : 1 < (p : ℝ) := by exact_mod_cast hp.1.one_lt\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℚ_[p]\nn : ℤ\naux : ∀ (n : ℤ), 0 < ↑p ^ n\nhx0 : ¬x = 0\n⊢ 1 < ↑p\n[PROOFSTEP]\nexact_mod_cast hp.1.one_lt\n[GOAL]\ncase neg\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℚ_[p]\nn : ℤ\naux : ∀ (n : ℤ), 0 < ↑p ^ n\nhx0 : ¬x = 0\nh1p : 1 < ↑p\n⊢ ↑p ^ (-valuation x) ≤ ↑p ^ n ↔ ↑p ^ (-valuation x) < ↑p ^ (n + 1)\n[PROOFSTEP]\nhave H := zpow_strictMono h1p\n[GOAL]\ncase neg\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℚ_[p]\nn : ℤ\naux : ∀ (n : ℤ), 0 < ↑p ^ n\nhx0 : ¬x = 0\nh1p : 1 < ↑p\nH : StrictMono ((fun x x_1 => x ^ x_1) ↑p)\n⊢ ↑p ^ (-valuation x) ≤ ↑p ^ n ↔ ↑p ^ (-valuation x) < ↑p ^ (n + 1)\n[PROOFSTEP]\nrw [H.le_iff_le, H.lt_iff_lt, Int.lt_add_one_iff]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℚ_[p]\nn : ℤ\n⊢ ‖x‖ < ↑p ^ n ↔ ‖x‖ ≤ ↑p ^ (n - 1)\n[PROOFSTEP]\nrw [norm_le_pow_iff_norm_lt_pow_add_one, sub_add_cancel]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℚ_[p]\n⊢ ‖x‖ ≤ 1 ↔ 0 ≤ valuation x\n[PROOFSTEP]\nby_cases hx : x = 0\n[GOAL]\ncase pos\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℚ_[p]\nhx : x = 0\n⊢ ‖x‖ ≤ 1 ↔ 0 ≤ valuation x\n[PROOFSTEP]\nsimp only [hx, norm_zero, valuation_zero, zero_le_one, le_refl]\n[GOAL]\ncase neg\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℚ_[p]\nhx : ¬x = 0\n⊢ ‖x‖ ≤ 1 ↔ 0 ≤ valuation x\n[PROOFSTEP]\nrw [norm_eq_pow_val hx, ← zpow_zero (p : ℝ), zpow_le_iff_le, Right.neg_nonpos_iff]\n[GOAL]\ncase neg\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℚ_[p]\nhx : ¬x = 0\n⊢ 1 < ↑p\n[PROOFSTEP]\nexact Nat.one_lt_cast.2 (Nat.Prime.one_lt' p).1\n", "meta": {"mathlib_filename": "Mathlib.NumberTheory.Padics.PadicNumbers", "llama_tokens": 78742, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8824278540866547, "lm_q2_score": 0.6150878555160665, "lm_q1q2_score": 0.5427706564178049}}
{"text": "[GOAL]\nι : Type u_1\nα : ι → Type u\nU : (i : ι) → UniformSpace (α i)\nβ : Type u_2\ninst✝ : UniformSpace β\nf : β → (i : ι) → α i\n⊢ UniformContinuous f ↔ ∀ (i : ι), UniformContinuous fun x => f x i\n[PROOFSTEP]\nsimp only [UniformContinuous, Pi.uniformity, tendsto_iInf, tendsto_comap_iff, Function.comp]\n[GOAL]\nι : Type u_1\nα : ι → Type u\nU : (i : ι) → UniformSpace (α i)\ninst✝ : ∀ (i : ι), CompleteSpace (α i)\n⊢ ∀ {f : Filter ((i : ι) → α i)}, Cauchy f → ∃ x, f ≤ 𝓝 x\n[PROOFSTEP]\nintro f hf\n[GOAL]\nι : Type u_1\nα : ι → Type u\nU : (i : ι) → UniformSpace (α i)\ninst✝ : ∀ (i : ι), CompleteSpace (α i)\nf : Filter ((i : ι) → α i)\nhf : Cauchy f\n⊢ ∃ x, f ≤ 𝓝 x\n[PROOFSTEP]\nhaveI := hf.1\n[GOAL]\nι : Type u_1\nα : ι → Type u\nU : (i : ι) → UniformSpace (α i)\ninst✝ : ∀ (i : ι), CompleteSpace (α i)\nf : Filter ((i : ι) → α i)\nhf : Cauchy f\nthis : NeBot f\n⊢ ∃ x, f ≤ 𝓝 x\n[PROOFSTEP]\nhave : ∀ i, ∃ x : α i, Filter.map (fun a : ∀ i, α i => a i) f ≤ 𝓝 x :=\n  by\n  intro i\n  have key : Cauchy (map (fun a : ∀ i : ι, α i => a i) f) := hf.map (Pi.uniformContinuous_proj α i)\n  exact cauchy_iff_exists_le_nhds.1 key\n[GOAL]\nι : Type u_1\nα : ι → Type u\nU : (i : ι) → UniformSpace (α i)\ninst✝ : ∀ (i : ι), CompleteSpace (α i)\nf : Filter ((i : ι) → α i)\nhf : Cauchy f\nthis : NeBot f\n⊢ ∀ (i : ι), ∃ x, map (fun a => a i) f ≤ 𝓝 x\n[PROOFSTEP]\nintro i\n[GOAL]\nι : Type u_1\nα : ι → Type u\nU : (i : ι) → UniformSpace (α i)\ninst✝ : ∀ (i : ι), CompleteSpace (α i)\nf : Filter ((i : ι) → α i)\nhf : Cauchy f\nthis : NeBot f\ni : ι\n⊢ ∃ x, map (fun a => a i) f ≤ 𝓝 x\n[PROOFSTEP]\nhave key : Cauchy (map (fun a : ∀ i : ι, α i => a i) f) := hf.map (Pi.uniformContinuous_proj α i)\n[GOAL]\nι : Type u_1\nα : ι → Type u\nU : (i : ι) → UniformSpace (α i)\ninst✝ : ∀ (i : ι), CompleteSpace (α i)\nf : Filter ((i : ι) → α i)\nhf : Cauchy f\nthis : NeBot f\ni : ι\nkey : Cauchy (map (fun a => a i) f)\n⊢ ∃ x, map (fun a => a i) f ≤ 𝓝 x\n[PROOFSTEP]\nexact cauchy_iff_exists_le_nhds.1 key\n[GOAL]\nι : Type u_1\nα : ι → Type u\nU : (i : ι) → UniformSpace (α i)\ninst✝ : ∀ (i : ι), CompleteSpace (α i)\nf : Filter ((i : ι) → α i)\nhf : Cauchy f\nthis✝ : NeBot f\nthis : ∀ (i : ι), ∃ x, map (fun a => a i) f ≤ 𝓝 x\n⊢ ∃ x, f ≤ 𝓝 x\n[PROOFSTEP]\nchoose x hx using this\n[GOAL]\nι : Type u_1\nα : ι → Type u\nU : (i : ι) → UniformSpace (α i)\ninst✝ : ∀ (i : ι), CompleteSpace (α i)\nf : Filter ((i : ι) → α i)\nhf : Cauchy f\nthis : NeBot f\nx : (i : ι) → α i\nhx : ∀ (i : ι), map (fun a => a i) f ≤ 𝓝 (x i)\n⊢ ∃ x, f ≤ 𝓝 x\n[PROOFSTEP]\nuse x\n[GOAL]\ncase h\nι : Type u_1\nα : ι → Type u\nU : (i : ι) → UniformSpace (α i)\ninst✝ : ∀ (i : ι), CompleteSpace (α i)\nf : Filter ((i : ι) → α i)\nhf : Cauchy f\nthis : NeBot f\nx : (i : ι) → α i\nhx : ∀ (i : ι), map (fun a => a i) f ≤ 𝓝 (x i)\n⊢ f ≤ 𝓝 x\n[PROOFSTEP]\nrwa [nhds_pi, le_pi]\n[GOAL]\nι : Type u_1\nα : ι → Type u\nU : (i : ι) → UniformSpace (α i)\ninst✝ : ∀ (i : ι), SeparatedSpace (α i)\nx y : (i : ι) → α i\nH : ∀ (r : Set (((i : ι) → α i) × ((i : ι) → α i))), r ∈ 𝓤 ((i : ι) → α i) → (x, y) ∈ r\n⊢ x = y\n[PROOFSTEP]\next i\n[GOAL]\ncase h\nι : Type u_1\nα : ι → Type u\nU : (i : ι) → UniformSpace (α i)\ninst✝ : ∀ (i : ι), SeparatedSpace (α i)\nx y : (i : ι) → α i\nH : ∀ (r : Set (((i : ι) → α i) × ((i : ι) → α i))), r ∈ 𝓤 ((i : ι) → α i) → (x, y) ∈ r\ni : ι\n⊢ x i = y i\n[PROOFSTEP]\napply eq_of_separated_of_uniformContinuous (Pi.uniformContinuous_proj α i)\n[GOAL]\ncase h\nι : Type u_1\nα : ι → Type u\nU : (i : ι) → UniformSpace (α i)\ninst✝ : ∀ (i : ι), SeparatedSpace (α i)\nx y : (i : ι) → α i\nH : ∀ (r : Set (((i : ι) → α i) × ((i : ι) → α i))), r ∈ 𝓤 ((i : ι) → α i) → (x, y) ∈ r\ni : ι\n⊢ (fun i => x i) ≈ fun i => y i\n[PROOFSTEP]\napply H\n", "meta": {"mathlib_filename": "Mathlib.Topology.UniformSpace.Pi", "llama_tokens": 1946, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8198933315126792, "lm_q2_score": 0.6619228691808012, "lm_q1q2_score": 0.5427061464170785}}
{"text": "[GOAL]\nF : Type u\nK : Type v\nA : Type w\ninst✝¹⁰ : CommRing F\ninst✝⁹ : Ring K\ninst✝⁸ : AddCommGroup A\ninst✝⁷ : Algebra F K\ninst✝⁶ : Module K A\ninst✝⁵ : Module F A\ninst✝⁴ : IsScalarTower F K A\ninst✝³ : StrongRankCondition F\ninst✝² : StrongRankCondition K\ninst✝¹ : Module.Free F K\ninst✝ : Module.Free K A\n⊢ lift (Module.rank F K) * lift (Module.rank K A) = lift (Module.rank F A)\n[PROOFSTEP]\nobtain ⟨_, b⟩ := Module.Free.exists_basis (R := F) (M := K)\n[GOAL]\ncase intro.mk\nF : Type u\nK : Type v\nA : Type w\ninst✝¹⁰ : CommRing F\ninst✝⁹ : Ring K\ninst✝⁸ : AddCommGroup A\ninst✝⁷ : Algebra F K\ninst✝⁶ : Module K A\ninst✝⁵ : Module F A\ninst✝⁴ : IsScalarTower F K A\ninst✝³ : StrongRankCondition F\ninst✝² : StrongRankCondition K\ninst✝¹ : Module.Free F K\ninst✝ : Module.Free K A\nfst✝ : Type v\nb : Basis fst✝ F K\n⊢ lift (Module.rank F K) * lift (Module.rank K A) = lift (Module.rank F A)\n[PROOFSTEP]\nobtain ⟨_, c⟩ := Module.Free.exists_basis (R := K) (M := A)\n[GOAL]\ncase intro.mk.intro.mk\nF : Type u\nK : Type v\nA : Type w\ninst✝¹⁰ : CommRing F\ninst✝⁹ : Ring K\ninst✝⁸ : AddCommGroup A\ninst✝⁷ : Algebra F K\ninst✝⁶ : Module K A\ninst✝⁵ : Module F A\ninst✝⁴ : IsScalarTower F K A\ninst✝³ : StrongRankCondition F\ninst✝² : StrongRankCondition K\ninst✝¹ : Module.Free F K\ninst✝ : Module.Free K A\nfst✝¹ : Type v\nb : Basis fst✝¹ F K\nfst✝ : Type w\nc : Basis fst✝ K A\n⊢ lift (Module.rank F K) * lift (Module.rank K A) = lift (Module.rank F A)\n[PROOFSTEP]\nrw [← (Module.rank F K).lift_id, ← b.mk_eq_rank, ← (Module.rank K A).lift_id, ← c.mk_eq_rank, ← lift_umax.{w, v}, ←\n  (b.smul c).mk_eq_rank, mk_prod, lift_mul, lift_lift, lift_lift, lift_lift, lift_lift, lift_umax.{v, w}]\n[GOAL]\nF✝ : Type u\nK✝ : Type v\nA✝ : Type w\ninst✝²¹ : CommRing F✝\ninst✝²⁰ : Ring K✝\ninst✝¹⁹ : AddCommGroup A✝\ninst✝¹⁸ : Algebra F✝ K✝\ninst✝¹⁷ : Module K✝ A✝\ninst✝¹⁶ : Module F✝ A✝\ninst✝¹⁵ : IsScalarTower F✝ K✝ A✝\ninst✝¹⁴ : StrongRankCondition F✝\ninst✝¹³ : StrongRankCondition K✝\ninst✝¹² : Module.Free F✝ K✝\ninst✝¹¹ : Module.Free K✝ A✝\nF : Type u\nK A : Type v\ninst✝¹⁰ : CommRing F\ninst✝⁹ : Ring K\ninst✝⁸ : AddCommGroup A\ninst✝⁷ : Algebra F K\ninst✝⁶ : Module K A\ninst✝⁵ : Module F A\ninst✝⁴ : IsScalarTower F K A\ninst✝³ : StrongRankCondition F\ninst✝² : StrongRankCondition K\ninst✝¹ : Module.Free F K\ninst✝ : Module.Free K A\n⊢ Module.rank F K * Module.rank K A = Module.rank F A\n[PROOFSTEP]\nconvert lift_rank_mul_lift_rank F K A\n[GOAL]\ncase h.e'_2.h.e'_5\nF✝ : Type u\nK✝ : Type v\nA✝ : Type w\ninst✝²¹ : CommRing F✝\ninst✝²⁰ : Ring K✝\ninst✝¹⁹ : AddCommGroup A✝\ninst✝¹⁸ : Algebra F✝ K✝\ninst✝¹⁷ : Module K✝ A✝\ninst✝¹⁶ : Module F✝ A✝\ninst✝¹⁵ : IsScalarTower F✝ K✝ A✝\ninst✝¹⁴ : StrongRankCondition F✝\ninst✝¹³ : StrongRankCondition K✝\ninst✝¹² : Module.Free F✝ K✝\ninst✝¹¹ : Module.Free K✝ A✝\nF : Type u\nK A : Type v\ninst✝¹⁰ : CommRing F\ninst✝⁹ : Ring K\ninst✝⁸ : AddCommGroup A\ninst✝⁷ : Algebra F K\ninst✝⁶ : Module K A\ninst✝⁵ : Module F A\ninst✝⁴ : IsScalarTower F K A\ninst✝³ : StrongRankCondition F\ninst✝² : StrongRankCondition K\ninst✝¹ : Module.Free F K\ninst✝ : Module.Free K A\n⊢ Module.rank F K = lift (Module.rank F K)\n[PROOFSTEP]\nrw [lift_id]\n[GOAL]\ncase h.e'_2.h.e'_6\nF✝ : Type u\nK✝ : Type v\nA✝ : Type w\ninst✝²¹ : CommRing F✝\ninst✝²⁰ : Ring K✝\ninst✝¹⁹ : AddCommGroup A✝\ninst✝¹⁸ : Algebra F✝ K✝\ninst✝¹⁷ : Module K✝ A✝\ninst✝¹⁶ : Module F✝ A✝\ninst✝¹⁵ : IsScalarTower F✝ K✝ A✝\ninst✝¹⁴ : StrongRankCondition F✝\ninst✝¹³ : StrongRankCondition K✝\ninst✝¹² : Module.Free F✝ K✝\ninst✝¹¹ : Module.Free K✝ A✝\nF : Type u\nK A : Type v\ninst✝¹⁰ : CommRing F\ninst✝⁹ : Ring K\ninst✝⁸ : AddCommGroup A\ninst✝⁷ : Algebra F K\ninst✝⁶ : Module K A\ninst✝⁵ : Module F A\ninst✝⁴ : IsScalarTower F K A\ninst✝³ : StrongRankCondition F\ninst✝² : StrongRankCondition K\ninst✝¹ : Module.Free F K\ninst✝ : Module.Free K A\n⊢ Module.rank K A = lift (Module.rank K A)\n[PROOFSTEP]\nrw [lift_id]\n[GOAL]\ncase h.e'_3\nF✝ : Type u\nK✝ : Type v\nA✝ : Type w\ninst✝²¹ : CommRing F✝\ninst✝²⁰ : Ring K✝\ninst✝¹⁹ : AddCommGroup A✝\ninst✝¹⁸ : Algebra F✝ K✝\ninst✝¹⁷ : Module K✝ A✝\ninst✝¹⁶ : Module F✝ A✝\ninst✝¹⁵ : IsScalarTower F✝ K✝ A✝\ninst✝¹⁴ : StrongRankCondition F✝\ninst✝¹³ : StrongRankCondition K✝\ninst✝¹² : Module.Free F✝ K✝\ninst✝¹¹ : Module.Free K✝ A✝\nF : Type u\nK A : Type v\ninst✝¹⁰ : CommRing F\ninst✝⁹ : Ring K\ninst✝⁸ : AddCommGroup A\ninst✝⁷ : Algebra F K\ninst✝⁶ : Module K A\ninst✝⁵ : Module F A\ninst✝⁴ : IsScalarTower F K A\ninst✝³ : StrongRankCondition F\ninst✝² : StrongRankCondition K\ninst✝¹ : Module.Free F K\ninst✝ : Module.Free K A\n⊢ Module.rank F A = lift (Module.rank F A)\n[PROOFSTEP]\nrw [lift_id]\n[GOAL]\nF : Type u\nK : Type v\nA : Type w\ninst✝¹² : CommRing F\ninst✝¹¹ : Ring K\ninst✝¹⁰ : AddCommGroup A\ninst✝⁹ : Algebra F K\ninst✝⁸ : Module K A\ninst✝⁷ : Module F A\ninst✝⁶ : IsScalarTower F K A\ninst✝⁵ : StrongRankCondition F\ninst✝⁴ : StrongRankCondition K\ninst✝³ : Module.Free F K\ninst✝² : Module.Free K A\ninst✝¹ : Module.Finite F K\ninst✝ : Module.Finite K A\n⊢ finrank F K * finrank K A = finrank F A\n[PROOFSTEP]\nletI := nontrivial_of_invariantBasisNumber F\n[GOAL]\nF : Type u\nK : Type v\nA : Type w\ninst✝¹² : CommRing F\ninst✝¹¹ : Ring K\ninst✝¹⁰ : AddCommGroup A\ninst✝⁹ : Algebra F K\ninst✝⁸ : Module K A\ninst✝⁷ : Module F A\ninst✝⁶ : IsScalarTower F K A\ninst✝⁵ : StrongRankCondition F\ninst✝⁴ : StrongRankCondition K\ninst✝³ : Module.Free F K\ninst✝² : Module.Free K A\ninst✝¹ : Module.Finite F K\ninst✝ : Module.Finite K A\nthis : Nontrivial F := nontrivial_of_invariantBasisNumber F\n⊢ finrank F K * finrank K A = finrank F A\n[PROOFSTEP]\nlet b := Module.Free.chooseBasis F K\n[GOAL]\nF : Type u\nK : Type v\nA : Type w\ninst✝¹² : CommRing F\ninst✝¹¹ : Ring K\ninst✝¹⁰ : AddCommGroup A\ninst✝⁹ : Algebra F K\ninst✝⁸ : Module K A\ninst✝⁷ : Module F A\ninst✝⁶ : IsScalarTower F K A\ninst✝⁵ : StrongRankCondition F\ninst✝⁴ : StrongRankCondition K\ninst✝³ : Module.Free F K\ninst✝² : Module.Free K A\ninst✝¹ : Module.Finite F K\ninst✝ : Module.Finite K A\nthis : Nontrivial F := nontrivial_of_invariantBasisNumber F\nb : Basis (Module.Free.ChooseBasisIndex F K) F K := Module.Free.chooseBasis F K\n⊢ finrank F K * finrank K A = finrank F A\n[PROOFSTEP]\nlet c := Module.Free.chooseBasis K A\n[GOAL]\nF : Type u\nK : Type v\nA : Type w\ninst✝¹² : CommRing F\ninst✝¹¹ : Ring K\ninst✝¹⁰ : AddCommGroup A\ninst✝⁹ : Algebra F K\ninst✝⁸ : Module K A\ninst✝⁷ : Module F A\ninst✝⁶ : IsScalarTower F K A\ninst✝⁵ : StrongRankCondition F\ninst✝⁴ : StrongRankCondition K\ninst✝³ : Module.Free F K\ninst✝² : Module.Free K A\ninst✝¹ : Module.Finite F K\ninst✝ : Module.Finite K A\nthis : Nontrivial F := nontrivial_of_invariantBasisNumber F\nb : Basis (Module.Free.ChooseBasisIndex F K) F K := Module.Free.chooseBasis F K\nc : Basis (Module.Free.ChooseBasisIndex K A) K A := Module.Free.chooseBasis K A\n⊢ finrank F K * finrank K A = finrank F A\n[PROOFSTEP]\nrw [finrank_eq_card_basis b, finrank_eq_card_basis c, finrank_eq_card_basis (b.smul c), Fintype.card_prod]\n[GOAL]\nF : Type u\nK : Type v\nA : Type w\ninst✝⁶ : Field F\ninst✝⁵ : DivisionRing K\ninst✝⁴ : AddCommGroup A\ninst✝³ : Algebra F K\ninst✝² : Module K A\ninst✝¹ : Module F A\ninst✝ : IsScalarTower F K A\nhf : FiniteDimensional F A\nb : Finset A\nhb : span F ↑b = ⊤\n⊢ restrictScalars F (span K ↑b) = restrictScalars F ⊤\n[PROOFSTEP]\nrw [Submodule.restrictScalars_top, eq_top_iff, ← hb, Submodule.span_le]\n[GOAL]\nF : Type u\nK : Type v\nA : Type w\ninst✝⁶ : Field F\ninst✝⁵ : DivisionRing K\ninst✝⁴ : AddCommGroup A\ninst✝³ : Algebra F K\ninst✝² : Module K A\ninst✝¹ : Module F A\ninst✝ : IsScalarTower F K A\nhf : FiniteDimensional F A\nb : Finset A\nhb : span F ↑b = ⊤\n⊢ ↑b ⊆ ↑(restrictScalars F (span K ↑b))\n[PROOFSTEP]\nexact Submodule.subset_span\n[GOAL]\nF : Type u\nK : Type v\nA : Type w\ninst✝⁷ : Field F\ninst✝⁶ : DivisionRing K\ninst✝⁵ : AddCommGroup A\ninst✝⁴ : Algebra F K\ninst✝³ : Module K A\ninst✝² : Module F A\ninst✝¹ : IsScalarTower F K A\ninst✝ : FiniteDimensional F K\n⊢ finrank F K * finrank K A = finrank F A\n[PROOFSTEP]\nby_cases hA : FiniteDimensional K A\n[GOAL]\ncase pos\nF : Type u\nK : Type v\nA : Type w\ninst✝⁷ : Field F\ninst✝⁶ : DivisionRing K\ninst✝⁵ : AddCommGroup A\ninst✝⁴ : Algebra F K\ninst✝³ : Module K A\ninst✝² : Module F A\ninst✝¹ : IsScalarTower F K A\ninst✝ : FiniteDimensional F K\nhA : FiniteDimensional K A\n⊢ finrank F K * finrank K A = finrank F A\n[PROOFSTEP]\nreplace hA : FiniteDimensional K A := hA\n[GOAL]\ncase pos\nF : Type u\nK : Type v\nA : Type w\ninst✝⁷ : Field F\ninst✝⁶ : DivisionRing K\ninst✝⁵ : AddCommGroup A\ninst✝⁴ : Algebra F K\ninst✝³ : Module K A\ninst✝² : Module F A\ninst✝¹ : IsScalarTower F K A\ninst✝ : FiniteDimensional F K\nhA : FiniteDimensional K A\n⊢ finrank F K * finrank K A = finrank F A\n[PROOFSTEP]\nrw [finrank_mul_finrank']\n[GOAL]\ncase neg\nF : Type u\nK : Type v\nA : Type w\ninst✝⁷ : Field F\ninst✝⁶ : DivisionRing K\ninst✝⁵ : AddCommGroup A\ninst✝⁴ : Algebra F K\ninst✝³ : Module K A\ninst✝² : Module F A\ninst✝¹ : IsScalarTower F K A\ninst✝ : FiniteDimensional F K\nhA : ¬FiniteDimensional K A\n⊢ finrank F K * finrank K A = finrank F A\n[PROOFSTEP]\nrw [finrank_of_infinite_dimensional hA, mul_zero, finrank_of_infinite_dimensional]\n[GOAL]\ncase neg\nF : Type u\nK : Type v\nA : Type w\ninst✝⁷ : Field F\ninst✝⁶ : DivisionRing K\ninst✝⁵ : AddCommGroup A\ninst✝⁴ : Algebra F K\ninst✝³ : Module K A\ninst✝² : Module F A\ninst✝¹ : IsScalarTower F K A\ninst✝ : FiniteDimensional F K\nhA : ¬FiniteDimensional K A\n⊢ ¬FiniteDimensional F A\n[PROOFSTEP]\nexact mt (@right F K A _ _ _ _ _ _ _) hA\n[GOAL]\nF : Type u\nK✝ : Type v\nA✝ : Type w\ninst✝⁹ : Field F\ninst✝⁸ : DivisionRing K✝\ninst✝⁷ : AddCommGroup A✝\ninst✝⁶ : Algebra F K✝\ninst✝⁵ : Module K✝ A✝\ninst✝⁴ : Module F A✝\ninst✝³ : IsScalarTower F K✝ A✝\nA : Type u_1\ninst✝² : Ring A\ninst✝¹ : IsDomain A\ninst✝ : Algebra F A\nhp : Nat.Prime (finrank F A)\nK : Subalgebra F A\n⊢ K = ⊥ ∨ K = ⊤\n[PROOFSTEP]\nhaveI : FiniteDimensional _ _ := finiteDimensional_of_finrank hp.pos\n[GOAL]\nF : Type u\nK✝ : Type v\nA✝ : Type w\ninst✝⁹ : Field F\ninst✝⁸ : DivisionRing K✝\ninst✝⁷ : AddCommGroup A✝\ninst✝⁶ : Algebra F K✝\ninst✝⁵ : Module K✝ A✝\ninst✝⁴ : Module F A✝\ninst✝³ : IsScalarTower F K✝ A✝\nA : Type u_1\ninst✝² : Ring A\ninst✝¹ : IsDomain A\ninst✝ : Algebra F A\nhp : Nat.Prime (finrank F A)\nK : Subalgebra F A\nthis : FiniteDimensional F A\n⊢ K = ⊥ ∨ K = ⊤\n[PROOFSTEP]\nletI := divisionRingOfFiniteDimensional F K\n[GOAL]\nF : Type u\nK✝ : Type v\nA✝ : Type w\ninst✝⁹ : Field F\ninst✝⁸ : DivisionRing K✝\ninst✝⁷ : AddCommGroup A✝\ninst✝⁶ : Algebra F K✝\ninst✝⁵ : Module K✝ A✝\ninst✝⁴ : Module F A✝\ninst✝³ : IsScalarTower F K✝ A✝\nA : Type u_1\ninst✝² : Ring A\ninst✝¹ : IsDomain A\ninst✝ : Algebra F A\nhp : Nat.Prime (finrank F A)\nK : Subalgebra F A\nthis✝ : FiniteDimensional F A\nthis : DivisionRing { x // x ∈ K } := divisionRingOfFiniteDimensional F { x // x ∈ K }\n⊢ K = ⊥ ∨ K = ⊤\n[PROOFSTEP]\nrefine' (hp.eq_one_or_self_of_dvd _ ⟨_, (finrank_mul_finrank F K A).symm⟩).imp _ fun h => _\n[GOAL]\ncase refine'_1\nF : Type u\nK✝ : Type v\nA✝ : Type w\ninst✝⁹ : Field F\ninst✝⁸ : DivisionRing K✝\ninst✝⁷ : AddCommGroup A✝\ninst✝⁶ : Algebra F K✝\ninst✝⁵ : Module K✝ A✝\ninst✝⁴ : Module F A✝\ninst✝³ : IsScalarTower F K✝ A✝\nA : Type u_1\ninst✝² : Ring A\ninst✝¹ : IsDomain A\ninst✝ : Algebra F A\nhp : Nat.Prime (finrank F A)\nK : Subalgebra F A\nthis✝ : FiniteDimensional F A\nthis : DivisionRing { x // x ∈ K } := divisionRingOfFiniteDimensional F { x // x ∈ K }\n⊢ finrank F { x // x ∈ K } = 1 → K = ⊥\n[PROOFSTEP]\nexact Subalgebra.eq_bot_of_finrank_one\n[GOAL]\ncase refine'_2\nF : Type u\nK✝ : Type v\nA✝ : Type w\ninst✝⁹ : Field F\ninst✝⁸ : DivisionRing K✝\ninst✝⁷ : AddCommGroup A✝\ninst✝⁶ : Algebra F K✝\ninst✝⁵ : Module K✝ A✝\ninst✝⁴ : Module F A✝\ninst✝³ : IsScalarTower F K✝ A✝\nA : Type u_1\ninst✝² : Ring A\ninst✝¹ : IsDomain A\ninst✝ : Algebra F A\nhp : Nat.Prime (finrank F A)\nK : Subalgebra F A\nthis✝ : FiniteDimensional F A\nthis : DivisionRing { x // x ∈ K } := divisionRingOfFiniteDimensional F { x // x ∈ K }\nh : finrank F { x // x ∈ K } = finrank F A\n⊢ K = ⊤\n[PROOFSTEP]\nexact Algebra.toSubmodule_eq_top.1 (eq_top_of_finrank_eq <| K.finrank_toSubmodule.trans h)\n", "meta": {"mathlib_filename": "Mathlib.FieldTheory.Tower", "llama_tokens": 5895, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.815232489352, "lm_q2_score": 0.665410572017153, "lm_q1q2_score": 0.542464317066682}}
{"text": "[GOAL]\nr n : ℕ\n⊢ choose (2 * n) (2 * n / 2) = choose (2 * n) n\n[PROOFSTEP]\nrw [Nat.mul_div_cancel_left n zero_lt_two]\n[GOAL]\nn : ℕ\n⊢ choose (2 * n + 2) (n + 1) * (n + 1) = choose (2 * n + 1) n * (2 * n + 2)\n[PROOFSTEP]\nrw [choose_succ_right_eq, choose_mul_succ_eq]\n[GOAL]\nn : ℕ\n⊢ choose (2 * n + 1) n * (2 * n + 2) = 2 * (choose (2 * n + 1) n * (n + 1))\n[PROOFSTEP]\nring\n[GOAL]\nn : ℕ\n⊢ 2 * (choose (2 * n + 1) n * (n + 1)) = 2 * (choose (2 * n + 1) n * (2 * n + 1 - n))\n[PROOFSTEP]\nrw [two_mul n, add_assoc, Nat.add_sub_cancel_left]\n[GOAL]\nn : ℕ\n⊢ 2 * (choose (2 * n + 1) n * (2 * n + 1 - n)) = 2 * (choose (2 * n) n * (2 * n + 1))\n[PROOFSTEP]\nrw [choose_mul_succ_eq]\n[GOAL]\nn : ℕ\n⊢ 2 * (choose (2 * n) n * (2 * n + 1)) = 2 * (2 * n + 1) * choose (2 * n) n\n[PROOFSTEP]\nrw [mul_assoc, mul_comm (2 * n + 1)]\n[GOAL]\nn : ℕ\nn_big : 4 ≤ n\n⊢ 4 ^ n < n * centralBinom n\n[PROOFSTEP]\ninduction' n using Nat.strong_induction_on with n IH\n[GOAL]\ncase h\nn✝ : ℕ\nn_big✝ : 4 ≤ n✝\nn : ℕ\nIH : ∀ (m : ℕ), m < n → 4 ≤ m → 4 ^ m < m * centralBinom m\nn_big : 4 ≤ n\n⊢ 4 ^ n < n * centralBinom n\n[PROOFSTEP]\nrcases lt_trichotomy n 4 with (hn | rfl | hn)\n[GOAL]\ncase h.inl\nn✝ : ℕ\nn_big✝ : 4 ≤ n✝\nn : ℕ\nIH : ∀ (m : ℕ), m < n → 4 ≤ m → 4 ^ m < m * centralBinom m\nn_big : 4 ≤ n\nhn : n < 4\n⊢ 4 ^ n < n * centralBinom n\n[PROOFSTEP]\nclear IH\n[GOAL]\ncase h.inl\nn✝ : ℕ\nn_big✝ : 4 ≤ n✝\nn : ℕ\nn_big : 4 ≤ n\nhn : n < 4\n⊢ 4 ^ n < n * centralBinom n\n[PROOFSTEP]\nexact False.elim ((not_lt.2 n_big) hn)\n[GOAL]\ncase h.inr.inl\nn : ℕ\nn_big✝ : 4 ≤ n\nIH : ∀ (m : ℕ), m < 4 → 4 ≤ m → 4 ^ m < m * centralBinom m\nn_big : 4 ≤ 4\n⊢ 4 ^ 4 < 4 * centralBinom 4\n[PROOFSTEP]\nnorm_num [centralBinom, choose]\n[GOAL]\ncase h.inr.inr\nn✝ : ℕ\nn_big✝ : 4 ≤ n✝\nn : ℕ\nIH : ∀ (m : ℕ), m < n → 4 ≤ m → 4 ^ m < m * centralBinom m\nn_big : 4 ≤ n\nhn : 4 < n\n⊢ 4 ^ n < n * centralBinom n\n[PROOFSTEP]\nobtain ⟨n, rfl⟩ : ∃ m, n = m + 1 := Nat.exists_eq_succ_of_ne_zero (Nat.not_eq_zero_of_lt hn)\n[GOAL]\ncase h.inr.inr.intro\nn✝ : ℕ\nn_big✝ : 4 ≤ n✝\nn : ℕ\nIH : ∀ (m : ℕ), m < n + 1 → 4 ≤ m → 4 ^ m < m * centralBinom m\nn_big : 4 ≤ n + 1\nhn : 4 < n + 1\n⊢ 4 ^ (n + 1) < (n + 1) * centralBinom (n + 1)\n[PROOFSTEP]\ncalc\n  4 ^ (n + 1) < 4 * (n * centralBinom n) :=\n    lt_of_eq_of_lt (pow_succ'' n 4) $\n      (mul_lt_mul_left <| zero_lt_four' ℕ).mpr (IH n n.lt_succ_self (Nat.le_of_lt_succ hn))\n  _ ≤ 2 * (2 * n + 1) * centralBinom n := by rw [← mul_assoc]; linarith\n  _ = (n + 1) * centralBinom (n + 1) := (succ_mul_centralBinom_succ n).symm\n[GOAL]\nn✝ : ℕ\nn_big✝ : 4 ≤ n✝\nn : ℕ\nIH : ∀ (m : ℕ), m < n + 1 → 4 ≤ m → 4 ^ m < m * centralBinom m\nn_big : 4 ≤ n + 1\nhn : 4 < n + 1\n⊢ 4 * (n * centralBinom n) ≤ 2 * (2 * n + 1) * centralBinom n\n[PROOFSTEP]\nrw [← mul_assoc]\n[GOAL]\nn✝ : ℕ\nn_big✝ : 4 ≤ n✝\nn : ℕ\nIH : ∀ (m : ℕ), m < n + 1 → 4 ≤ m → 4 ^ m < m * centralBinom m\nn_big : 4 ≤ n + 1\nhn : 4 < n + 1\n⊢ 4 * n * centralBinom n ≤ 2 * (2 * n + 1) * centralBinom n\n[PROOFSTEP]\nlinarith\n[GOAL]\nx✝ : 0 < 1\n⊢ 4 ^ 1 ≤ 2 * 1 * centralBinom 1\n[PROOFSTEP]\nnorm_num [centralBinom, choose]\n[GOAL]\nx✝ : 0 < 2\n⊢ 4 ^ 2 ≤ 2 * 2 * centralBinom 2\n[PROOFSTEP]\nnorm_num [centralBinom, choose]\n[GOAL]\nx✝ : 0 < 3\n⊢ 4 ^ 3 ≤ 2 * 3 * centralBinom 3\n[PROOFSTEP]\nnorm_num [centralBinom, choose]\n[GOAL]\nn : ℕ\nx✝ : 0 < n + 4\n⊢ (n + 4) * centralBinom (n + 4) ≤ 2 * (n + 4) * centralBinom (n + 4)\n[PROOFSTEP]\nrw [mul_assoc]\n[GOAL]\nn : ℕ\nx✝ : 0 < n + 4\n⊢ (n + 4) * centralBinom (n + 4) ≤ 2 * ((n + 4) * centralBinom (n + 4))\n[PROOFSTEP]\nrefine' le_mul_of_pos_left zero_lt_two\n[GOAL]\nn : ℕ\n⊢ 2 ∣ centralBinom (n + 1)\n[PROOFSTEP]\nuse(n + 1 + n).choose n\n[GOAL]\ncase h\nn : ℕ\n⊢ centralBinom (n + 1) = 2 * choose (n + 1 + n) n\n[PROOFSTEP]\nrw [centralBinom_eq_two_mul_choose, two_mul, ← add_assoc, choose_succ_succ' (n + 1 + n) n, choose_symm_add, ← two_mul]\n[GOAL]\nn : ℕ\nh : 0 < n\n⊢ 2 ∣ centralBinom n\n[PROOFSTEP]\nrw [← Nat.succ_pred_eq_of_pos h]\n[GOAL]\nn : ℕ\nh : 0 < n\n⊢ 2 ∣ centralBinom (succ (pred n))\n[PROOFSTEP]\nexact two_dvd_centralBinom_succ n.pred\n[GOAL]\nn : ℕ\n⊢ n + 1 ∣ centralBinom n\n[PROOFSTEP]\nhave h_s : (n + 1).coprime (2 * n + 1) :=\n  by\n  rw [two_mul, add_assoc, coprime_add_self_right, coprime_self_add_left]\n  exact coprime_one_left n\n[GOAL]\nn : ℕ\n⊢ coprime (n + 1) (2 * n + 1)\n[PROOFSTEP]\nrw [two_mul, add_assoc, coprime_add_self_right, coprime_self_add_left]\n[GOAL]\nn : ℕ\n⊢ coprime 1 n\n[PROOFSTEP]\nexact coprime_one_left n\n[GOAL]\nn : ℕ\nh_s : coprime (n + 1) (2 * n + 1)\n⊢ n + 1 ∣ centralBinom n\n[PROOFSTEP]\napply h_s.dvd_of_dvd_mul_left\n[GOAL]\nn : ℕ\nh_s : coprime (n + 1) (2 * n + 1)\n⊢ n + 1 ∣ (2 * n + 1) * centralBinom n\n[PROOFSTEP]\napply Nat.dvd_of_mul_dvd_mul_left zero_lt_two\n[GOAL]\nn : ℕ\nh_s : coprime (n + 1) (2 * n + 1)\n⊢ 2 * (n + 1) ∣ 2 * ((2 * n + 1) * centralBinom n)\n[PROOFSTEP]\nrw [← mul_assoc, ← succ_mul_centralBinom_succ, mul_comm]\n[GOAL]\nn : ℕ\nh_s : coprime (n + 1) (2 * n + 1)\n⊢ (n + 1) * 2 ∣ (n + 1) * centralBinom (n + 1)\n[PROOFSTEP]\nexact mul_dvd_mul_left _ (two_dvd_centralBinom_succ n)\n", "meta": {"mathlib_filename": "Mathlib.Data.Nat.Choose.Central", "llama_tokens": 2860, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7981867681382279, "lm_q2_score": 0.679178699175393, "lm_q1q2_score": 0.5421114508831326}}
{"text": "[GOAL]\nm n a b c d : ℕ\n⊢ a ≡ 0 [MOD n] ↔ n ∣ a\n[PROOFSTEP]\nrw [ModEq, zero_mod, dvd_iff_mod_eq_zero]\n[GOAL]\nm n a b c d : ℕ\n⊢ a ≡ b [MOD n] ↔ ↑n ∣ ↑b - ↑a\n[PROOFSTEP]\nrw [ModEq, eq_comm, ← Int.coe_nat_inj', Int.coe_nat_mod, Int.coe_nat_mod, Int.emod_eq_emod_iff_emod_sub_eq_zero,\n  Int.dvd_iff_emod_eq_zero]\n[GOAL]\nm n a b c d : ℕ\nh : a ≤ b\n⊢ a ≡ b [MOD n] ↔ n ∣ b - a\n[PROOFSTEP]\nrw [modEq_iff_dvd, ← Int.coe_nat_dvd, Int.ofNat_sub h]\n[GOAL]\nm n a b c✝ d c : ℕ\nh : a ≡ b [MOD n]\n⊢ c * a ≡ c * b [MOD c * n]\n[PROOFSTEP]\nunfold ModEq at *\n[GOAL]\nm n a b c✝ d c : ℕ\nh : a % n = b % n\n⊢ c * a % (c * n) = c * b % (c * n)\n[PROOFSTEP]\nrw [mul_mod_mul_left, mul_mod_mul_left, h]\n[GOAL]\nm n a b c✝ d c : ℕ\nh : a ≡ b [MOD n]\n⊢ a * c ≡ b * c [MOD n * c]\n[PROOFSTEP]\nrw [mul_comm a, mul_comm b, mul_comm n]\n[GOAL]\nm n a b c✝ d c : ℕ\nh : a ≡ b [MOD n]\n⊢ c * a ≡ c * b [MOD c * n]\n[PROOFSTEP]\nexact h.mul_left' c\n[GOAL]\nm n a b c✝ d c : ℕ\nh : a ≡ b [MOD n]\n⊢ a * c ≡ b * c [MOD n]\n[PROOFSTEP]\nrw [mul_comm a, mul_comm b]\n[GOAL]\nm n a b c✝ d c : ℕ\nh : a ≡ b [MOD n]\n⊢ c * a ≡ c * b [MOD n]\n[PROOFSTEP]\nexact h.mul_left c\n[GOAL]\nm✝ n a b c d m : ℕ\nh : a ≡ b [MOD n]\n⊢ a ^ m ≡ b ^ m [MOD n]\n[PROOFSTEP]\ninduction m with\n| zero => rfl\n| succ d hd =>\n  rw [pow_succ, pow_succ]\n  exact hd.mul h\n[GOAL]\nm✝ n a b c d m : ℕ\nh : a ≡ b [MOD n]\n⊢ a ^ m ≡ b ^ m [MOD n]\n[PROOFSTEP]\ninduction m with\n| zero => rfl\n| succ d hd =>\n  rw [pow_succ, pow_succ]\n  exact hd.mul h\n[GOAL]\ncase zero\nm n a b c d : ℕ\nh : a ≡ b [MOD n]\n⊢ a ^ zero ≡ b ^ zero [MOD n]\n[PROOFSTEP]\n\n| zero => rfl\n[GOAL]\ncase zero\nm n a b c d : ℕ\nh : a ≡ b [MOD n]\n⊢ a ^ zero ≡ b ^ zero [MOD n]\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ\nm n a b c d✝ : ℕ\nh : a ≡ b [MOD n]\nd : ℕ\nhd : a ^ d ≡ b ^ d [MOD n]\n⊢ a ^ succ d ≡ b ^ succ d [MOD n]\n[PROOFSTEP]\n\n| succ d hd =>\n  rw [pow_succ, pow_succ]\n  exact hd.mul h\n[GOAL]\ncase succ\nm n a b c d✝ : ℕ\nh : a ≡ b [MOD n]\nd : ℕ\nhd : a ^ d ≡ b ^ d [MOD n]\n⊢ a ^ succ d ≡ b ^ succ d [MOD n]\n[PROOFSTEP]\nrw [pow_succ, pow_succ]\n[GOAL]\ncase succ\nm n a b c d✝ : ℕ\nh : a ≡ b [MOD n]\nd : ℕ\nhd : a ^ d ≡ b ^ d [MOD n]\n⊢ a ^ d * a ≡ b ^ d * b [MOD n]\n[PROOFSTEP]\nexact hd.mul h\n[GOAL]\nm n a b c d : ℕ\nh₁ : a ≡ b [MOD n]\nh₂ : c ≡ d [MOD n]\n⊢ a + c ≡ b + d [MOD n]\n[PROOFSTEP]\nrw [modEq_iff_dvd, Int.ofNat_add, Int.ofNat_add, add_sub_add_comm]\n[GOAL]\nm n a b c d : ℕ\nh₁ : a ≡ b [MOD n]\nh₂ : c ≡ d [MOD n]\n⊢ ↑n ∣ ↑b - ↑a + (↑d - ↑c)\n[PROOFSTEP]\nexact dvd_add h₁.dvd h₂.dvd\n[GOAL]\nm n a b c d : ℕ\nh₁ : a ≡ b [MOD n]\nh₂ : a + c ≡ b + d [MOD n]\n⊢ c ≡ d [MOD n]\n[PROOFSTEP]\nsimp only [modEq_iff_dvd, Int.ofNat_add] at *\n[GOAL]\nm n a b c d : ℕ\nh₁ : ↑n ∣ ↑b - ↑a\nh₂ : ↑n ∣ ↑b + ↑d - (↑a + ↑c)\n⊢ ↑n ∣ ↑d - ↑c\n[PROOFSTEP]\nrw [add_sub_add_comm] at h₂ \n[GOAL]\nm n a b c d : ℕ\nh₁ : ↑n ∣ ↑b - ↑a\nh₂ : ↑n ∣ ↑b - ↑a + (↑d - ↑c)\n⊢ ↑n ∣ ↑d - ↑c\n[PROOFSTEP]\nconvert _root_.dvd_sub h₂ h₁ using 1\n[GOAL]\ncase h.e'_4\nm n a b c d : ℕ\nh₁ : ↑n ∣ ↑b - ↑a\nh₂ : ↑n ∣ ↑b - ↑a + (↑d - ↑c)\n⊢ ↑d - ↑c = ↑b - ↑a + (↑d - ↑c) - (↑b - ↑a)\n[PROOFSTEP]\nrw [add_sub_cancel']\n[GOAL]\nm n a b c d : ℕ\nh₁ : c ≡ d [MOD n]\nh₂ : a + c ≡ b + d [MOD n]\n⊢ a ≡ b [MOD n]\n[PROOFSTEP]\nrw [add_comm a, add_comm b] at h₂ \n[GOAL]\nm n a b c d : ℕ\nh₁ : c ≡ d [MOD n]\nh₂ : c + a ≡ d + b [MOD n]\n⊢ a ≡ b [MOD n]\n[PROOFSTEP]\nexact h₁.add_left_cancel h₂\n[GOAL]\nm✝ n a✝ b✝ c✝ d a b c m : ℕ\nhc : c ≠ 0\n⊢ c * a ≡ c * b [MOD c * m] → a ≡ b [MOD m]\n[PROOFSTEP]\nsimp [modEq_iff_dvd, ← mul_sub, mul_dvd_mul_iff_left (by simp [hc] : (c : ℤ) ≠ 0)]\n[GOAL]\nm✝ n a✝ b✝ c✝ d a b c m : ℕ\nhc : c ≠ 0\n⊢ ↑c ≠ 0\n[PROOFSTEP]\nsimp [hc]\n[GOAL]\nm✝ n a✝ b✝ c✝ d a b c m : ℕ\nhc : c ≠ 0\n⊢ a * c ≡ b * c [MOD m * c] → a ≡ b [MOD m]\n[PROOFSTEP]\nsimp [modEq_iff_dvd, ← sub_mul, mul_dvd_mul_iff_right (by simp [hc] : (c : ℤ) ≠ 0)]\n[GOAL]\nm✝ n a✝ b✝ c✝ d a b c m : ℕ\nhc : c ≠ 0\n⊢ ↑c ≠ 0\n[PROOFSTEP]\nsimp [hc]\n[GOAL]\nm✝ n a b c d m : ℕ\nh : a ≡ b [MOD m * n]\n⊢ a ≡ b [MOD n]\n[PROOFSTEP]\nrw [modEq_iff_dvd] at *\n[GOAL]\nm✝ n a b c d m : ℕ\nh : ↑(m * n) ∣ ↑b - ↑a\n⊢ ↑n ∣ ↑b - ↑a\n[PROOFSTEP]\nexact (dvd_mul_left (n : ℤ) (m : ℤ)).trans h\n[GOAL]\nm n a b c d : ℕ\nh : a / c ≡ b / c [MOD m / c]\nha✝¹ : c ∣ a\nha✝ : c ∣ b\nha : c ∣ m\n⊢ a ≡ b [MOD m]\n[PROOFSTEP]\nconvert h.mul_left' c\n[GOAL]\ncase h.e'_1\nm n a b c d : ℕ\nh : a / c ≡ b / c [MOD m / c]\nha✝¹ : c ∣ a\nha✝ : c ∣ b\nha : c ∣ m\n⊢ m = c * (m / c)\n[PROOFSTEP]\nrwa [Nat.mul_div_cancel']\n[GOAL]\ncase h.e'_2\nm n a b c d : ℕ\nh : a / c ≡ b / c [MOD m / c]\nha✝¹ : c ∣ a\nha✝ : c ∣ b\nha : c ∣ m\n⊢ a = c * (a / c)\n[PROOFSTEP]\nrwa [Nat.mul_div_cancel']\n[GOAL]\ncase h.e'_3\nm n a b c d : ℕ\nh : a / c ≡ b / c [MOD m / c]\nha✝¹ : c ∣ a\nha✝ : c ∣ b\nha : c ∣ m\n⊢ b = c * (b / c)\n[PROOFSTEP]\nrwa [Nat.mul_div_cancel']\n[GOAL]\nm n a b c d : ℕ\nh : b ≤ a\n⊢ ↑(a - b) ∣ ↑a - ↑b\n[PROOFSTEP]\nrw [Int.ofNat_sub h]\n[GOAL]\nm n a b c d : ℕ\n⊢ a ≡ b [MOD 0] ↔ a = b\n[PROOFSTEP]\nrw [ModEq, mod_zero, mod_zero]\n[GOAL]\nm n a b c d : ℕ\n⊢ n + a ≡ a [MOD n]\n[PROOFSTEP]\nrw [ModEq, add_mod_left]\n[GOAL]\nm n a b c d : ℕ\n⊢ a + n ≡ a [MOD n]\n[PROOFSTEP]\nrw [ModEq, add_mod_right]\n[GOAL]\nm n a b c d : ℕ\nh : a ≡ b [MOD m]\nhdm : d ∣ m\n⊢ d ∣ a ↔ d ∣ b\n[PROOFSTEP]\nsimp only [← modEq_zero_iff_dvd]\n[GOAL]\nm n a b c d : ℕ\nh : a ≡ b [MOD m]\nhdm : d ∣ m\n⊢ a ≡ 0 [MOD d] ↔ b ≡ 0 [MOD d]\n[PROOFSTEP]\nreplace h := h.of_dvd hdm\n[GOAL]\nm n a b c d : ℕ\nhdm : d ∣ m\nh : a ≡ b [MOD d]\n⊢ a ≡ 0 [MOD d] ↔ b ≡ 0 [MOD d]\n[PROOFSTEP]\nexact ⟨h.symm.trans, h.trans⟩\n[GOAL]\nm n a b c d : ℕ\nh : a ≡ b [MOD m]\n⊢ gcd a m = gcd b m\n[PROOFSTEP]\nhave h1 := gcd_dvd_right a m\n[GOAL]\nm n a b c d : ℕ\nh : a ≡ b [MOD m]\nh1 : gcd a m ∣ m\n⊢ gcd a m = gcd b m\n[PROOFSTEP]\nhave h2 := gcd_dvd_right b m\n[GOAL]\nm n a b c d : ℕ\nh : a ≡ b [MOD m]\nh1 : gcd a m ∣ m\nh2 : gcd b m ∣ m\n⊢ gcd a m = gcd b m\n[PROOFSTEP]\nexact\n  dvd_antisymm (dvd_gcd ((h.dvd_iff h1).mp (gcd_dvd_left a m)) h1) (dvd_gcd ((h.dvd_iff h2).mpr (gcd_dvd_left b m)) h2)\n[GOAL]\nm n a b c d : ℕ\nh : a ≡ b [MOD m]\nh2 : |↑b - ↑a| < ↑m\n⊢ a = b\n[PROOFSTEP]\napply Int.ofNat.inj\n[GOAL]\ncase x\nm n a b c d : ℕ\nh : a ≡ b [MOD m]\nh2 : |↑b - ↑a| < ↑m\n⊢ Int.ofNat a = Int.ofNat b\n[PROOFSTEP]\nrw [eq_comm, ← sub_eq_zero]\n[GOAL]\ncase x\nm n a b c d : ℕ\nh : a ≡ b [MOD m]\nh2 : |↑b - ↑a| < ↑m\n⊢ Int.ofNat b - Int.ofNat a = 0\n[PROOFSTEP]\nexact Int.eq_zero_of_abs_lt_dvd h.dvd h2\n[GOAL]\nm n a b c d : ℕ\nhm : 0 < m\nh : c * a ≡ c * b [MOD m]\n⊢ a ≡ b [MOD m / gcd m c]\n[PROOFSTEP]\nlet d := gcd m c\n[GOAL]\nm n a b c d✝ : ℕ\nhm : 0 < m\nh : c * a ≡ c * b [MOD m]\nd : ℕ := gcd m c\n⊢ a ≡ b [MOD m / gcd m c]\n[PROOFSTEP]\nhave hmd := gcd_dvd_left m c\n[GOAL]\nm n a b c d✝ : ℕ\nhm : 0 < m\nh : c * a ≡ c * b [MOD m]\nd : ℕ := gcd m c\nhmd : gcd m c ∣ m\n⊢ a ≡ b [MOD m / gcd m c]\n[PROOFSTEP]\nhave hcd := gcd_dvd_right m c\n[GOAL]\nm n a b c d✝ : ℕ\nhm : 0 < m\nh : c * a ≡ c * b [MOD m]\nd : ℕ := gcd m c\nhmd : gcd m c ∣ m\nhcd : gcd m c ∣ c\n⊢ a ≡ b [MOD m / gcd m c]\n[PROOFSTEP]\nrw [modEq_iff_dvd]\n[GOAL]\nm n a b c d✝ : ℕ\nhm : 0 < m\nh : c * a ≡ c * b [MOD m]\nd : ℕ := gcd m c\nhmd : gcd m c ∣ m\nhcd : gcd m c ∣ c\n⊢ ↑(m / gcd m c) ∣ ↑b - ↑a\n[PROOFSTEP]\nrefine' @Int.dvd_of_dvd_mul_right_of_gcd_one (m / d) (c / d) (b - a) _ _\n[GOAL]\ncase refine'_1\nm n a b c d✝ : ℕ\nhm : 0 < m\nh : c * a ≡ c * b [MOD m]\nd : ℕ := gcd m c\nhmd : gcd m c ∣ m\nhcd : gcd m c ∣ c\n⊢ ↑m / ↑d ∣ ↑c / ↑d * (↑b - ↑a)\ncase refine'_2\nm n a b c d✝ : ℕ\nhm : 0 < m\nh : c * a ≡ c * b [MOD m]\nd : ℕ := gcd m c\nhmd : gcd m c ∣ m\nhcd : gcd m c ∣ c\n⊢ Int.gcd (↑m / ↑d) (↑c / ↑d) = 1\n[PROOFSTEP]\nshow (m / d : ℤ) ∣ c / d * (b - a)\n[GOAL]\ncase refine'_1\nm n a b c d✝ : ℕ\nhm : 0 < m\nh : c * a ≡ c * b [MOD m]\nd : ℕ := gcd m c\nhmd : gcd m c ∣ m\nhcd : gcd m c ∣ c\n⊢ ↑m / ↑d ∣ ↑c / ↑d * (↑b - ↑a)\n[PROOFSTEP]\nrw [mul_comm, ← Int.mul_ediv_assoc (b - a) (Int.coe_nat_dvd.mpr hcd), mul_comm]\n[GOAL]\ncase refine'_1\nm n a b c d✝ : ℕ\nhm : 0 < m\nh : c * a ≡ c * b [MOD m]\nd : ℕ := gcd m c\nhmd : gcd m c ∣ m\nhcd : gcd m c ∣ c\n⊢ ↑m / ↑d ∣ ↑c * (↑b - ↑a) / ↑(gcd m c)\n[PROOFSTEP]\napply Int.ediv_dvd_ediv (Int.coe_nat_dvd.mpr hmd)\n[GOAL]\ncase refine'_1\nm n a b c d✝ : ℕ\nhm : 0 < m\nh : c * a ≡ c * b [MOD m]\nd : ℕ := gcd m c\nhmd : gcd m c ∣ m\nhcd : gcd m c ∣ c\n⊢ ↑m ∣ ↑c * (↑b - ↑a)\n[PROOFSTEP]\nrw [mul_sub]\n[GOAL]\ncase refine'_1\nm n a b c d✝ : ℕ\nhm : 0 < m\nh : c * a ≡ c * b [MOD m]\nd : ℕ := gcd m c\nhmd : gcd m c ∣ m\nhcd : gcd m c ∣ c\n⊢ ↑m ∣ ↑c * ↑b - ↑c * ↑a\n[PROOFSTEP]\nexact modEq_iff_dvd.mp h\n[GOAL]\ncase refine'_2\nm n a b c d✝ : ℕ\nhm : 0 < m\nh : c * a ≡ c * b [MOD m]\nd : ℕ := gcd m c\nhmd : gcd m c ∣ m\nhcd : gcd m c ∣ c\n⊢ Int.gcd (↑m / ↑d) (↑c / ↑d) = 1\n[PROOFSTEP]\nshow Int.gcd (m / d) (c / d) = 1\n[GOAL]\ncase refine'_2\nm n a b c d✝ : ℕ\nhm : 0 < m\nh : c * a ≡ c * b [MOD m]\nd : ℕ := gcd m c\nhmd : gcd m c ∣ m\nhcd : gcd m c ∣ c\n⊢ Int.gcd (↑m / ↑d) (↑c / ↑d) = 1\n[PROOFSTEP]\nsimp only [← Int.coe_nat_div, Int.coe_nat_gcd (m / d) (c / d), gcd_div hmd hcd, Nat.div_self (gcd_pos_of_pos_left c hm)]\n[GOAL]\nm n a b c d : ℕ\nhm : 0 < m\nh : a * c ≡ b * c [MOD m]\n⊢ a ≡ b [MOD m / gcd m c]\n[PROOFSTEP]\napply cancel_left_div_gcd hm\n[GOAL]\nm n a b c d : ℕ\nhm : 0 < m\nh : a * c ≡ b * c [MOD m]\n⊢ c * a ≡ c * b [MOD m]\n[PROOFSTEP]\nsimpa [mul_comm] using h\n[GOAL]\nm n a b c d : ℕ\nhmc : gcd m c = 1\nh : c * a ≡ c * b [MOD m]\n⊢ a ≡ b [MOD m]\n[PROOFSTEP]\nrcases m.eq_zero_or_pos with (rfl | hm)\n[GOAL]\ncase inl\nn a b c d : ℕ\nhmc : gcd 0 c = 1\nh : c * a ≡ c * b [MOD 0]\n⊢ a ≡ b [MOD 0]\n[PROOFSTEP]\nsimp only [gcd_zero_left] at hmc \n[GOAL]\ncase inl\nn a b c d : ℕ\nhmc : c = 1\nh : c * a ≡ c * b [MOD 0]\n⊢ a ≡ b [MOD 0]\n[PROOFSTEP]\nsimp only [gcd_zero_left, hmc, one_mul, modEq_zero_iff] at h \n[GOAL]\ncase inl\nn a b c d : ℕ\nhmc : c = 1\nh : a = b\n⊢ a ≡ b [MOD 0]\n[PROOFSTEP]\nsubst h\n[GOAL]\ncase inl\nn a c d : ℕ\nhmc : c = 1\n⊢ a ≡ a [MOD 0]\n[PROOFSTEP]\nrfl\n[GOAL]\ncase inr\nm n a b c d : ℕ\nhmc : gcd m c = 1\nh : c * a ≡ c * b [MOD m]\nhm : m > 0\n⊢ a ≡ b [MOD m]\n[PROOFSTEP]\nsimpa [hmc] using h.cancel_left_div_gcd hm\n[GOAL]\nm n a b c d : ℕ\nhmc : gcd m c = 1\nh : a * c ≡ b * c [MOD m]\n⊢ c * a ≡ c * b [MOD m]\n[PROOFSTEP]\nsimpa [mul_comm] using h\n[GOAL]\nm n a b c d : ℕ\nh : a ≡ b [MOD gcd n m]\nhn : n = 0\n⊢ a ≡ a [MOD n] ∧ a ≡ b [MOD m]\n[PROOFSTEP]\nrw [hn, gcd_zero_left] at h \n[GOAL]\nm n a b c d : ℕ\nh : a ≡ b [MOD m]\nhn : n = 0\n⊢ a ≡ a [MOD n] ∧ a ≡ b [MOD m]\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase left\nm n a b c d : ℕ\nh : a ≡ b [MOD m]\nhn : n = 0\n⊢ a ≡ a [MOD n]\ncase right m n a b c d : ℕ h : a ≡ b [MOD m] hn : n = 0 ⊢ a ≡ b [MOD m]\n[PROOFSTEP]\nrfl\n[GOAL]\ncase right\nm n a b c d : ℕ\nh : a ≡ b [MOD m]\nhn : n = 0\n⊢ a ≡ b [MOD m]\n[PROOFSTEP]\nexact h\n[GOAL]\nm n a b c d : ℕ\nh : a ≡ b [MOD gcd n m]\nhn : ¬n = 0\nhm : m = 0\n⊢ b ≡ a [MOD n] ∧ b ≡ b [MOD m]\n[PROOFSTEP]\nrw [hm, gcd_zero_right] at h \n[GOAL]\nm n a b c d : ℕ\nh : a ≡ b [MOD n]\nhn : ¬n = 0\nhm : m = 0\n⊢ b ≡ a [MOD n] ∧ b ≡ b [MOD m]\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase left\nm n a b c d : ℕ\nh : a ≡ b [MOD n]\nhn : ¬n = 0\nhm : m = 0\n⊢ b ≡ a [MOD n]\ncase right m n a b c d : ℕ h : a ≡ b [MOD n] hn : ¬n = 0 hm : m = 0 ⊢ b ≡ b [MOD m]\n[PROOFSTEP]\nexact h.symm\n[GOAL]\ncase right\nm n a b c d : ℕ\nh : a ≡ b [MOD n]\nhn : ¬n = 0\nhm : m = 0\n⊢ b ≡ b [MOD m]\n[PROOFSTEP]\nrfl\n[GOAL]\nm n a b c d : ℕ\nh : a ≡ b [MOD gcd n m]\nhn : ¬n = 0\nhm : ¬m = 0\n⊢ (match xgcd n m with\n      | (c, d) => Int.toNat ((↑n * c * ↑b + ↑m * d * ↑a) / ↑(gcd n m) % ↑(lcm n m))) ≡\n      a [MOD n] ∧\n    (match xgcd n m with\n      | (c, d) => Int.toNat ((↑n * c * ↑b + ↑m * d * ↑a) / ↑(gcd n m) % ↑(lcm n m))) ≡\n      b [MOD m]\n[PROOFSTEP]\nrw [xgcd_val]\n[GOAL]\nm n a b c d : ℕ\nh : a ≡ b [MOD gcd n m]\nhn : ¬n = 0\nhm : ¬m = 0\n⊢ (match (gcdA n m, gcdB n m) with\n      | (c, d) => Int.toNat ((↑n * c * ↑b + ↑m * d * ↑a) / ↑(gcd n m) % ↑(lcm n m))) ≡\n      a [MOD n] ∧\n    (match (gcdA n m, gcdB n m) with\n      | (c, d) => Int.toNat ((↑n * c * ↑b + ↑m * d * ↑a) / ↑(gcd n m) % ↑(lcm n m))) ≡\n      b [MOD m]\n[PROOFSTEP]\ndsimp\n[GOAL]\nm n a b c d : ℕ\nh : a ≡ b [MOD gcd n m]\nhn : ¬n = 0\nhm : ¬m = 0\n⊢ Int.toNat ((↑n * gcdA n m * ↑b + ↑m * gcdB n m * ↑a) / ↑(gcd n m) % ↑(lcm n m)) ≡ a [MOD n] ∧\n    Int.toNat ((↑n * gcdA n m * ↑b + ↑m * gcdB n m * ↑a) / ↑(gcd n m) % ↑(lcm n m)) ≡ b [MOD m]\n[PROOFSTEP]\nrw [modEq_iff_dvd, modEq_iff_dvd, Int.toNat_of_nonneg (Int.emod_nonneg _ (Int.coe_nat_ne_zero.2 (lcm_ne_zero hn hm)))]\n[GOAL]\nm n a b c d : ℕ\nh : a ≡ b [MOD gcd n m]\nhn : ¬n = 0\nhm : ¬m = 0\n⊢ ↑n ∣ ↑a - (↑n * gcdA n m * ↑b + ↑m * gcdB n m * ↑a) / ↑(gcd n m) % ↑(lcm n m) ∧\n    ↑m ∣ ↑b - (↑n * gcdA n m * ↑b + ↑m * gcdB n m * ↑a) / ↑(gcd n m) % ↑(lcm n m)\n[PROOFSTEP]\nhave hnonzero : (gcd n m : ℤ) ≠ 0 := by\n  norm_cast\n  rw [Nat.gcd_eq_zero_iff, not_and]\n  exact fun _ => hm\n[GOAL]\nm n a b c d : ℕ\nh : a ≡ b [MOD gcd n m]\nhn : ¬n = 0\nhm : ¬m = 0\n⊢ ↑(gcd n m) ≠ 0\n[PROOFSTEP]\nnorm_cast\n[GOAL]\nm n a b c d : ℕ\nh : a ≡ b [MOD gcd n m]\nhn : ¬n = 0\nhm : ¬m = 0\n⊢ ¬gcd n m = 0\n[PROOFSTEP]\nrw [Nat.gcd_eq_zero_iff, not_and]\n[GOAL]\nm n a b c d : ℕ\nh : a ≡ b [MOD gcd n m]\nhn : ¬n = 0\nhm : ¬m = 0\n⊢ n = 0 → ¬m = 0\n[PROOFSTEP]\nexact fun _ => hm\n[GOAL]\nm n a b c d : ℕ\nh : a ≡ b [MOD gcd n m]\nhn : ¬n = 0\nhm : ¬m = 0\nhnonzero : ↑(gcd n m) ≠ 0\n⊢ ↑n ∣ ↑a - (↑n * gcdA n m * ↑b + ↑m * gcdB n m * ↑a) / ↑(gcd n m) % ↑(lcm n m) ∧\n    ↑m ∣ ↑b - (↑n * gcdA n m * ↑b + ↑m * gcdB n m * ↑a) / ↑(gcd n m) % ↑(lcm n m)\n[PROOFSTEP]\nhave hcoedvd : ∀ t, (gcd n m : ℤ) ∣ t * (b - a) := fun t => h.dvd.mul_left _\n[GOAL]\nm n a b c d : ℕ\nh : a ≡ b [MOD gcd n m]\nhn : ¬n = 0\nhm : ¬m = 0\nhnonzero : ↑(gcd n m) ≠ 0\nhcoedvd : ∀ (t : ℤ), ↑(gcd n m) ∣ t * (↑b - ↑a)\n⊢ ↑n ∣ ↑a - (↑n * gcdA n m * ↑b + ↑m * gcdB n m * ↑a) / ↑(gcd n m) % ↑(lcm n m) ∧\n    ↑m ∣ ↑b - (↑n * gcdA n m * ↑b + ↑m * gcdB n m * ↑a) / ↑(gcd n m) % ↑(lcm n m)\n[PROOFSTEP]\nhave := gcd_eq_gcd_ab n m\n[GOAL]\nm n a b c d : ℕ\nh : a ≡ b [MOD gcd n m]\nhn : ¬n = 0\nhm : ¬m = 0\nhnonzero : ↑(gcd n m) ≠ 0\nhcoedvd : ∀ (t : ℤ), ↑(gcd n m) ∣ t * (↑b - ↑a)\nthis : ↑(gcd n m) = ↑n * gcdA n m + ↑m * gcdB n m\n⊢ ↑n ∣ ↑a - (↑n * gcdA n m * ↑b + ↑m * gcdB n m * ↑a) / ↑(gcd n m) % ↑(lcm n m) ∧\n    ↑m ∣ ↑b - (↑n * gcdA n m * ↑b + ↑m * gcdB n m * ↑a) / ↑(gcd n m) % ↑(lcm n m)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase left\nm n a b c d : ℕ\nh : a ≡ b [MOD gcd n m]\nhn : ¬n = 0\nhm : ¬m = 0\nhnonzero : ↑(gcd n m) ≠ 0\nhcoedvd : ∀ (t : ℤ), ↑(gcd n m) ∣ t * (↑b - ↑a)\nthis : ↑(gcd n m) = ↑n * gcdA n m + ↑m * gcdB n m\n⊢ ↑n ∣ ↑a - (↑n * gcdA n m * ↑b + ↑m * gcdB n m * ↑a) / ↑(gcd n m) % ↑(lcm n m)\n[PROOFSTEP]\nrw [Int.emod_def, ← sub_add]\n[GOAL]\ncase right\nm n a b c d : ℕ\nh : a ≡ b [MOD gcd n m]\nhn : ¬n = 0\nhm : ¬m = 0\nhnonzero : ↑(gcd n m) ≠ 0\nhcoedvd : ∀ (t : ℤ), ↑(gcd n m) ∣ t * (↑b - ↑a)\nthis : ↑(gcd n m) = ↑n * gcdA n m + ↑m * gcdB n m\n⊢ ↑m ∣ ↑b - (↑n * gcdA n m * ↑b + ↑m * gcdB n m * ↑a) / ↑(gcd n m) % ↑(lcm n m)\n[PROOFSTEP]\nrw [Int.emod_def, ← sub_add]\n[GOAL]\ncase left\nm n a b c d : ℕ\nh : a ≡ b [MOD gcd n m]\nhn : ¬n = 0\nhm : ¬m = 0\nhnonzero : ↑(gcd n m) ≠ 0\nhcoedvd : ∀ (t : ℤ), ↑(gcd n m) ∣ t * (↑b - ↑a)\nthis : ↑(gcd n m) = ↑n * gcdA n m + ↑m * gcdB n m\n⊢ ↑n ∣\n    ↑a - (↑n * gcdA n m * ↑b + ↑m * gcdB n m * ↑a) / ↑(gcd n m) +\n      ↑(lcm n m) * ((↑n * gcdA n m * ↑b + ↑m * gcdB n m * ↑a) / ↑(gcd n m) / ↑(lcm n m))\n[PROOFSTEP]\nrefine' dvd_add _ (dvd_mul_of_dvd_left _ _)\n[GOAL]\ncase right\nm n a b c d : ℕ\nh : a ≡ b [MOD gcd n m]\nhn : ¬n = 0\nhm : ¬m = 0\nhnonzero : ↑(gcd n m) ≠ 0\nhcoedvd : ∀ (t : ℤ), ↑(gcd n m) ∣ t * (↑b - ↑a)\nthis : ↑(gcd n m) = ↑n * gcdA n m + ↑m * gcdB n m\n⊢ ↑m ∣\n    ↑b - (↑n * gcdA n m * ↑b + ↑m * gcdB n m * ↑a) / ↑(gcd n m) +\n      ↑(lcm n m) * ((↑n * gcdA n m * ↑b + ↑m * gcdB n m * ↑a) / ↑(gcd n m) / ↑(lcm n m))\n[PROOFSTEP]\nrefine' dvd_add _ (dvd_mul_of_dvd_left _ _)\n[GOAL]\ncase left.refine'_1\nm n a b c d : ℕ\nh : a ≡ b [MOD gcd n m]\nhn : ¬n = 0\nhm : ¬m = 0\nhnonzero : ↑(gcd n m) ≠ 0\nhcoedvd : ∀ (t : ℤ), ↑(gcd n m) ∣ t * (↑b - ↑a)\nthis : ↑(gcd n m) = ↑n * gcdA n m + ↑m * gcdB n m\n⊢ ↑n ∣ ↑a - (↑n * gcdA n m * ↑b + ↑m * gcdB n m * ↑a) / ↑(gcd n m)\n[PROOFSTEP]\ntry norm_cast\n[GOAL]\ncase left.refine'_1\nm n a b c d : ℕ\nh : a ≡ b [MOD gcd n m]\nhn : ¬n = 0\nhm : ¬m = 0\nhnonzero : ↑(gcd n m) ≠ 0\nhcoedvd : ∀ (t : ℤ), ↑(gcd n m) ∣ t * (↑b - ↑a)\nthis : ↑(gcd n m) = ↑n * gcdA n m + ↑m * gcdB n m\n⊢ ↑n ∣ ↑a - (↑n * gcdA n m * ↑b + ↑m * gcdB n m * ↑a) / ↑(gcd n m)\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase left.refine'_2\nm n a b c d : ℕ\nh : a ≡ b [MOD gcd n m]\nhn : ¬n = 0\nhm : ¬m = 0\nhnonzero : ↑(gcd n m) ≠ 0\nhcoedvd : ∀ (t : ℤ), ↑(gcd n m) ∣ t * (↑b - ↑a)\nthis : ↑(gcd n m) = ↑n * gcdA n m + ↑m * gcdB n m\n⊢ ↑n ∣ ↑(lcm n m)\n[PROOFSTEP]\ntry norm_cast\n[GOAL]\ncase left.refine'_2\nm n a b c d : ℕ\nh : a ≡ b [MOD gcd n m]\nhn : ¬n = 0\nhm : ¬m = 0\nhnonzero : ↑(gcd n m) ≠ 0\nhcoedvd : ∀ (t : ℤ), ↑(gcd n m) ∣ t * (↑b - ↑a)\nthis : ↑(gcd n m) = ↑n * gcdA n m + ↑m * gcdB n m\n⊢ ↑n ∣ ↑(lcm n m)\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase right.refine'_1\nm n a b c d : ℕ\nh : a ≡ b [MOD gcd n m]\nhn : ¬n = 0\nhm : ¬m = 0\nhnonzero : ↑(gcd n m) ≠ 0\nhcoedvd : ∀ (t : ℤ), ↑(gcd n m) ∣ t * (↑b - ↑a)\nthis : ↑(gcd n m) = ↑n * gcdA n m + ↑m * gcdB n m\n⊢ ↑m ∣ ↑b - (↑n * gcdA n m * ↑b + ↑m * gcdB n m * ↑a) / ↑(gcd n m)\n[PROOFSTEP]\ntry norm_cast\n[GOAL]\ncase right.refine'_1\nm n a b c d : ℕ\nh : a ≡ b [MOD gcd n m]\nhn : ¬n = 0\nhm : ¬m = 0\nhnonzero : ↑(gcd n m) ≠ 0\nhcoedvd : ∀ (t : ℤ), ↑(gcd n m) ∣ t * (↑b - ↑a)\nthis : ↑(gcd n m) = ↑n * gcdA n m + ↑m * gcdB n m\n⊢ ↑m ∣ ↑b - (↑n * gcdA n m * ↑b + ↑m * gcdB n m * ↑a) / ↑(gcd n m)\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase right.refine'_2\nm n a b c d : ℕ\nh : a ≡ b [MOD gcd n m]\nhn : ¬n = 0\nhm : ¬m = 0\nhnonzero : ↑(gcd n m) ≠ 0\nhcoedvd : ∀ (t : ℤ), ↑(gcd n m) ∣ t * (↑b - ↑a)\nthis : ↑(gcd n m) = ↑n * gcdA n m + ↑m * gcdB n m\n⊢ ↑m ∣ ↑(lcm n m)\n[PROOFSTEP]\ntry norm_cast\n[GOAL]\ncase right.refine'_2\nm n a b c d : ℕ\nh : a ≡ b [MOD gcd n m]\nhn : ¬n = 0\nhm : ¬m = 0\nhnonzero : ↑(gcd n m) ≠ 0\nhcoedvd : ∀ (t : ℤ), ↑(gcd n m) ∣ t * (↑b - ↑a)\nthis : ↑(gcd n m) = ↑n * gcdA n m + ↑m * gcdB n m\n⊢ ↑m ∣ ↑(lcm n m)\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase left.refine'_1\nm n a b c d : ℕ\nh : a ≡ b [MOD gcd n m]\nhn : ¬n = 0\nhm : ¬m = 0\nhnonzero : ↑(gcd n m) ≠ 0\nhcoedvd : ∀ (t : ℤ), ↑(gcd n m) ∣ t * (↑b - ↑a)\nthis : ↑(gcd n m) = ↑n * gcdA n m + ↑m * gcdB n m\n⊢ ↑n ∣ ↑a - (↑n * gcdA n m * ↑b + ↑m * gcdB n m * ↑a) / ↑(gcd n m)\n[PROOFSTEP]\nrw [← sub_eq_iff_eq_add'] at this \n[GOAL]\ncase left.refine'_1\nm n a b c d : ℕ\nh : a ≡ b [MOD gcd n m]\nhn : ¬n = 0\nhm : ¬m = 0\nhnonzero : ↑(gcd n m) ≠ 0\nhcoedvd : ∀ (t : ℤ), ↑(gcd n m) ∣ t * (↑b - ↑a)\nthis : ↑(gcd n m) - ↑n * gcdA n m = ↑m * gcdB n m\n⊢ ↑n ∣ ↑a - (↑n * gcdA n m * ↑b + ↑m * gcdB n m * ↑a) / ↑(gcd n m)\n[PROOFSTEP]\nrw [← this, sub_mul, ← add_sub_assoc, add_comm, add_sub_assoc, ← mul_sub, Int.add_ediv_of_dvd_left,\n  Int.mul_ediv_cancel_left _ hnonzero, Int.mul_ediv_assoc _ h.dvd, ← sub_sub, sub_self, zero_sub, dvd_neg, mul_assoc]\n[GOAL]\ncase left.refine'_1\nm n a b c d : ℕ\nh : a ≡ b [MOD gcd n m]\nhn : ¬n = 0\nhm : ¬m = 0\nhnonzero : ↑(gcd n m) ≠ 0\nhcoedvd : ∀ (t : ℤ), ↑(gcd n m) ∣ t * (↑b - ↑a)\nthis : ↑(gcd n m) - ↑n * gcdA n m = ↑m * gcdB n m\n⊢ ↑n ∣ ↑n * (gcdA n m * ((↑b - ↑a) / ↑(gcd n m)))\ncase left.refine'_1\nm n a b c d : ℕ\nh : a ≡ b [MOD gcd n m]\nhn : ¬n = 0\nhm : ¬m = 0\nhnonzero : ↑(gcd n m) ≠ 0\nhcoedvd : ∀ (t : ℤ), ↑(gcd n m) ∣ t * (↑b - ↑a)\nthis : ↑(gcd n m) - ↑n * gcdA n m = ↑m * gcdB n m\n⊢ ↑(gcd n m) ∣ ↑(gcd n m) * ↑a\n[PROOFSTEP]\nexact dvd_mul_right _ _\n[GOAL]\ncase left.refine'_1\nm n a b c d : ℕ\nh : a ≡ b [MOD gcd n m]\nhn : ¬n = 0\nhm : ¬m = 0\nhnonzero : ↑(gcd n m) ≠ 0\nhcoedvd : ∀ (t : ℤ), ↑(gcd n m) ∣ t * (↑b - ↑a)\nthis : ↑(gcd n m) - ↑n * gcdA n m = ↑m * gcdB n m\n⊢ ↑(gcd n m) ∣ ↑(gcd n m) * ↑a\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase left.refine'_1\nm n a b c d : ℕ\nh : a ≡ b [MOD gcd n m]\nhn : ¬n = 0\nhm : ¬m = 0\nhnonzero : ↑(gcd n m) ≠ 0\nhcoedvd : ∀ (t : ℤ), ↑(gcd n m) ∣ t * (↑b - ↑a)\nthis : ↑(gcd n m) - ↑n * gcdA n m = ↑m * gcdB n m\n⊢ gcd n m ∣ gcd n m * a\n[PROOFSTEP]\nexact dvd_mul_right _ _\n[GOAL]\ncase left.refine'_2\nm n a b c d : ℕ\nh : a ≡ b [MOD gcd n m]\nhn : ¬n = 0\nhm : ¬m = 0\nhnonzero : ↑(gcd n m) ≠ 0\nhcoedvd : ∀ (t : ℤ), ↑(gcd n m) ∣ t * (↑b - ↑a)\nthis : ↑(gcd n m) = ↑n * gcdA n m + ↑m * gcdB n m\n⊢ n ∣ lcm n m\n[PROOFSTEP]\nexact dvd_lcm_left n m\n[GOAL]\ncase right.refine'_1\nm n a b c d : ℕ\nh : a ≡ b [MOD gcd n m]\nhn : ¬n = 0\nhm : ¬m = 0\nhnonzero : ↑(gcd n m) ≠ 0\nhcoedvd : ∀ (t : ℤ), ↑(gcd n m) ∣ t * (↑b - ↑a)\nthis : ↑(gcd n m) = ↑n * gcdA n m + ↑m * gcdB n m\n⊢ ↑m ∣ ↑b - (↑n * gcdA n m * ↑b + ↑m * gcdB n m * ↑a) / ↑(gcd n m)\n[PROOFSTEP]\nrw [← sub_eq_iff_eq_add] at this \n[GOAL]\ncase right.refine'_1\nm n a b c d : ℕ\nh : a ≡ b [MOD gcd n m]\nhn : ¬n = 0\nhm : ¬m = 0\nhnonzero : ↑(gcd n m) ≠ 0\nhcoedvd : ∀ (t : ℤ), ↑(gcd n m) ∣ t * (↑b - ↑a)\nthis : ↑(gcd n m) - ↑m * gcdB n m = ↑n * gcdA n m\n⊢ ↑m ∣ ↑b - (↑n * gcdA n m * ↑b + ↑m * gcdB n m * ↑a) / ↑(gcd n m)\n[PROOFSTEP]\nrw [← this, sub_mul, sub_add, ← mul_sub, Int.sub_ediv_of_dvd, Int.mul_ediv_cancel_left _ hnonzero,\n  Int.mul_ediv_assoc _ h.dvd, ← sub_add, sub_self, zero_add, mul_assoc]\n[GOAL]\ncase right.refine'_1\nm n a b c d : ℕ\nh : a ≡ b [MOD gcd n m]\nhn : ¬n = 0\nhm : ¬m = 0\nhnonzero : ↑(gcd n m) ≠ 0\nhcoedvd : ∀ (t : ℤ), ↑(gcd n m) ∣ t * (↑b - ↑a)\nthis : ↑(gcd n m) - ↑m * gcdB n m = ↑n * gcdA n m\n⊢ ↑m ∣ ↑m * (gcdB n m * ((↑b - ↑a) / ↑(gcd n m)))\ncase right.refine'_1.hcb\nm n a b c d : ℕ\nh : a ≡ b [MOD gcd n m]\nhn : ¬n = 0\nhm : ¬m = 0\nhnonzero : ↑(gcd n m) ≠ 0\nhcoedvd : ∀ (t : ℤ), ↑(gcd n m) ∣ t * (↑b - ↑a)\nthis : ↑(gcd n m) - ↑m * gcdB n m = ↑n * gcdA n m\n⊢ ↑(gcd n m) ∣ ↑m * gcdB n m * (↑b - ↑a)\n[PROOFSTEP]\nexact dvd_mul_right _ _\n[GOAL]\ncase right.refine'_1.hcb\nm n a b c d : ℕ\nh : a ≡ b [MOD gcd n m]\nhn : ¬n = 0\nhm : ¬m = 0\nhnonzero : ↑(gcd n m) ≠ 0\nhcoedvd : ∀ (t : ℤ), ↑(gcd n m) ∣ t * (↑b - ↑a)\nthis : ↑(gcd n m) - ↑m * gcdB n m = ↑n * gcdA n m\n⊢ ↑(gcd n m) ∣ ↑m * gcdB n m * (↑b - ↑a)\n[PROOFSTEP]\nexact hcoedvd _\n[GOAL]\ncase right.refine'_2\nm n a b c d : ℕ\nh : a ≡ b [MOD gcd n m]\nhn : ¬n = 0\nhm : ¬m = 0\nhnonzero : ↑(gcd n m) ≠ 0\nhcoedvd : ∀ (t : ℤ), ↑(gcd n m) ∣ t * (↑b - ↑a)\nthis : ↑(gcd n m) = ↑n * gcdA n m + ↑m * gcdB n m\n⊢ m ∣ lcm n m\n[PROOFSTEP]\nexact dvd_lcm_right n m\n[GOAL]\nm n a✝ b✝ c d : ℕ\nco : coprime n m\na b : ℕ\n⊢ a ≡ b [MOD gcd n m]\n[PROOFSTEP]\nconvert @modEq_one a b\n[GOAL]\nm n a b c d : ℕ\nh : a ≡ b [MOD gcd n m]\nhn : n ≠ 0\nhm : m ≠ 0\n⊢ ↑(chineseRemainder' h) < lcm n m\n[PROOFSTEP]\ndsimp only [chineseRemainder']\n[GOAL]\nm n a b c d : ℕ\nh : a ≡ b [MOD gcd n m]\nhn : n ≠ 0\nhm : m ≠ 0\n⊢ ↑(if hn : n = 0 then { val := a, property := (_ : a ≡ a [MOD n] ∧ a ≡ b [MOD m]) }\n      else\n        if hm : m = 0 then { val := b, property := (_ : b ≡ a [MOD n] ∧ b ≡ b [MOD m]) }\n        else\n          { val := Int.toNat ((↑n * (xgcd n m).fst * ↑b + ↑m * (xgcd n m).snd * ↑a) / ↑(gcd n m) % ↑(lcm n m)),\n            property :=\n              (_ :\n                (match xgcd n m with\n                    | (c, d) => Int.toNat ((↑n * c * ↑b + ↑m * d * ↑a) / ↑(gcd n m) % ↑(lcm n m))) ≡\n                    a [MOD n] ∧\n                  (match xgcd n m with\n                    | (c, d) => Int.toNat ((↑n * c * ↑b + ↑m * d * ↑a) / ↑(gcd n m) % ↑(lcm n m))) ≡\n                    b [MOD m]) }) <\n    lcm n m\n[PROOFSTEP]\nrw [dif_neg hn, dif_neg hm, Subtype.coe_mk, xgcd_val, ← Int.toNat_coe_nat (lcm n m)]\n[GOAL]\nm n a b c d : ℕ\nh : a ≡ b [MOD gcd n m]\nhn : n ≠ 0\nhm : m ≠ 0\n⊢ Int.toNat\n      ((↑n * (gcdA n m, gcdB n m).fst * ↑b + ↑m * (gcdA n m, gcdB n m).snd * ↑a) / ↑(gcd n m) %\n        ↑(Int.toNat ↑(lcm n m))) <\n    Int.toNat ↑(lcm n m)\n[PROOFSTEP]\nhave lcm_pos := Int.coe_nat_pos.mpr (Nat.pos_of_ne_zero (lcm_ne_zero hn hm))\n[GOAL]\nm n a b c d : ℕ\nh : a ≡ b [MOD gcd n m]\nhn : n ≠ 0\nhm : m ≠ 0\nlcm_pos : 0 < ↑(lcm n m)\n⊢ Int.toNat\n      ((↑n * (gcdA n m, gcdB n m).fst * ↑b + ↑m * (gcdA n m, gcdB n m).snd * ↑a) / ↑(gcd n m) %\n        ↑(Int.toNat ↑(lcm n m))) <\n    Int.toNat ↑(lcm n m)\n[PROOFSTEP]\nexact (Int.toNat_lt_toNat lcm_pos).mpr (Int.emod_lt_of_pos _ lcm_pos)\n[GOAL]\nm✝ n✝ a✝ b✝ c d a b m n : ℕ\nhmn : coprime m n\nh : a ≡ b [MOD m] ∧ a ≡ b [MOD n]\n⊢ a ≡ b [MOD m * n]\n[PROOFSTEP]\nrw [Nat.modEq_iff_dvd, Nat.modEq_iff_dvd, ← Int.dvd_natAbs, Int.coe_nat_dvd, ← Int.dvd_natAbs, Int.coe_nat_dvd] at h \n[GOAL]\nm✝ n✝ a✝ b✝ c d a b m n : ℕ\nhmn : coprime m n\nh : m ∣ Int.natAbs (↑b - ↑a) ∧ n ∣ Int.natAbs (↑b - ↑a)\n⊢ a ≡ b [MOD m * n]\n[PROOFSTEP]\nrw [Nat.modEq_iff_dvd, ← Int.dvd_natAbs, Int.coe_nat_dvd]\n[GOAL]\nm✝ n✝ a✝ b✝ c d a b m n : ℕ\nhmn : coprime m n\nh : m ∣ Int.natAbs (↑b - ↑a) ∧ n ∣ Int.natAbs (↑b - ↑a)\n⊢ m * n ∣ Int.natAbs (↑b - ↑a)\n[PROOFSTEP]\nexact hmn.mul_dvd_of_dvd_of_dvd h.1 h.2\n[GOAL]\nm n✝ a✝ b✝ c d b a n : ℕ\nh : a * b ≡ 1 [MOD n]\n⊢ coprime a n\n[PROOFSTEP]\nobtain ⟨g, hh⟩ := Nat.gcd_dvd_right a n\n[GOAL]\ncase intro\nm n✝ a✝ b✝ c d b a n : ℕ\nh : a * b ≡ 1 [MOD n]\ng : ℕ\nhh : n = gcd a n * g\n⊢ coprime a n\n[PROOFSTEP]\nrw [Nat.coprime_iff_gcd_eq_one, ← Nat.dvd_one, ← Nat.modEq_zero_iff_dvd]\n[GOAL]\ncase intro\nm n✝ a✝ b✝ c d b a n : ℕ\nh : a * b ≡ 1 [MOD n]\ng : ℕ\nhh : n = gcd a n * g\n⊢ 1 ≡ 0 [MOD gcd a n]\n[PROOFSTEP]\ncalc\n  1 ≡ a * b [MOD a.gcd n] := (hh ▸ h).symm.of_mul_right g\n  _ ≡ 0 * b [MOD a.gcd n] := ((Nat.modEq_zero_iff_dvd.mpr (Nat.gcd_dvd_left _ _)).mul_right b)\n  _ = 0 := by rw [zero_mul]\n[GOAL]\nm n✝ a✝ b✝ c d b a n : ℕ\nh : a * b ≡ 1 [MOD n]\ng : ℕ\nhh : n = gcd a n * g\n⊢ 0 * b = 0\n[PROOFSTEP]\nrw [zero_mul]\n[GOAL]\nm n a✝ b✝ c✝ d a b c : ℕ\nhb0 : b = 0\n⊢ a / b % c = a % (b * c) / b\n[PROOFSTEP]\nsimp [hb0]\n[GOAL]\nm n a✝ b✝ c✝ d a b c : ℕ\nhb0 : ¬b = 0\n⊢ a / b % c = a % (b * c) / b\n[PROOFSTEP]\nrw [← @add_right_cancel_iff _ _ _ (c * (a / b / c)), mod_add_div, Nat.div_div_eq_div_mul, ← mul_right_inj' hb0, ←\n  @add_left_cancel_iff _ _ _ (a % b), mod_add_div, mul_add, ← @add_left_cancel_iff _ _ _ (a % (b * c) % b),\n  add_left_comm, ← add_assoc (a % (b * c) % b), mod_add_div, ← mul_assoc, mod_add_div, mod_mul_right_mod]\n[GOAL]\nm n a✝ b✝ c✝ d a b c : ℕ\nthis : (a + b) % c = (a % c + b % c) % c\nhc0 : c = 0\n⊢ ((a + b) % c + if c ≤ a % c + b % c then c else 0) = a % c + b % c\n[PROOFSTEP]\nsimp [hc0, Nat.mod_zero]\n[GOAL]\nm n a✝ b✝ c✝ d a b c : ℕ\nthis : (a + b) % c = (a % c + b % c) % c\nhc0 : ¬c = 0\n⊢ ((a + b) % c + if c ≤ a % c + b % c then c else 0) = a % c + b % c\n[PROOFSTEP]\nrw [this]\n[GOAL]\nm n a✝ b✝ c✝ d a b c : ℕ\nthis : (a + b) % c = (a % c + b % c) % c\nhc0 : ¬c = 0\n⊢ ((a % c + b % c) % c + if c ≤ a % c + b % c then c else 0) = a % c + b % c\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nm n a✝ b✝ c✝ d a b c : ℕ\nthis : (a + b) % c = (a % c + b % c) % c\nhc0 : ¬c = 0\nh : c ≤ a % c + b % c\n⊢ (a % c + b % c) % c + c = a % c + b % c\n[PROOFSTEP]\nhave h2 : (a % c + b % c) / c < 2 :=\n  Nat.div_lt_of_lt_mul\n    (by\n      rw [mul_two]\n      exact add_lt_add (Nat.mod_lt _ (Nat.pos_of_ne_zero hc0)) (Nat.mod_lt _ (Nat.pos_of_ne_zero hc0)))\n[GOAL]\nm n a✝ b✝ c✝ d a b c : ℕ\nthis : (a + b) % c = (a % c + b % c) % c\nhc0 : ¬c = 0\nh : c ≤ a % c + b % c\n⊢ a % c + b % c < c * 2\n[PROOFSTEP]\nrw [mul_two]\n[GOAL]\nm n a✝ b✝ c✝ d a b c : ℕ\nthis : (a + b) % c = (a % c + b % c) % c\nhc0 : ¬c = 0\nh : c ≤ a % c + b % c\n⊢ a % c + b % c < c + c\n[PROOFSTEP]\nexact add_lt_add (Nat.mod_lt _ (Nat.pos_of_ne_zero hc0)) (Nat.mod_lt _ (Nat.pos_of_ne_zero hc0))\n[GOAL]\ncase pos\nm n a✝ b✝ c✝ d a b c : ℕ\nthis : (a + b) % c = (a % c + b % c) % c\nhc0 : ¬c = 0\nh : c ≤ a % c + b % c\nh2 : (a % c + b % c) / c < 2\n⊢ (a % c + b % c) % c + c = a % c + b % c\n[PROOFSTEP]\nhave h0 : 0 < (a % c + b % c) / c := Nat.div_pos h (Nat.pos_of_ne_zero hc0)\n[GOAL]\ncase pos\nm n a✝ b✝ c✝ d a b c : ℕ\nthis : (a + b) % c = (a % c + b % c) % c\nhc0 : ¬c = 0\nh : c ≤ a % c + b % c\nh2 : (a % c + b % c) / c < 2\nh0 : 0 < (a % c + b % c) / c\n⊢ (a % c + b % c) % c + c = a % c + b % c\n[PROOFSTEP]\nrw [← @add_right_cancel_iff _ _ _ (c * ((a % c + b % c) / c)), add_comm _ c, add_assoc, mod_add_div,\n  le_antisymm (le_of_lt_succ h2) h0, mul_one, add_comm]\n[GOAL]\ncase neg\nm n a✝ b✝ c✝ d a b c : ℕ\nthis : (a + b) % c = (a % c + b % c) % c\nhc0 : ¬c = 0\nh : ¬c ≤ a % c + b % c\n⊢ (a % c + b % c) % c + 0 = a % c + b % c\n[PROOFSTEP]\nrw [Nat.mod_eq_of_lt (lt_of_not_ge h), add_zero]\n[GOAL]\nm n a✝ b✝ c✝ d a b c : ℕ\nhc : a % c + b % c < c\n⊢ (a + b) % c = a % c + b % c\n[PROOFSTEP]\nrw [← add_mod_add_ite, if_neg (not_le_of_lt hc), add_zero]\n[GOAL]\nm n a✝ b✝ c✝ d a b c : ℕ\nhc : c ≤ a % c + b % c\n⊢ (a + b) % c + c = a % c + b % c\n[PROOFSTEP]\nrw [← add_mod_add_ite, if_pos hc]\n[GOAL]\nm n a✝ b✝ c✝ d a b c : ℕ\nhc0 : 0 < c\n⊢ (a + b) / c = a / c + b / c + if c ≤ a % c + b % c then 1 else 0\n[PROOFSTEP]\nrw [← mul_right_inj' hc0.ne', ← @add_left_cancel_iff _ _ _ ((a + b) % c + a % c + b % c)]\n[GOAL]\nm n a✝ b✝ c✝ d a b c : ℕ\nhc0 : 0 < c\n⊢ (a + b) % c + a % c + b % c + c * ((a + b) / c) =\n    (a + b) % c + a % c + b % c + c * (a / c + b / c + if c ≤ a % c + b % c then 1 else 0)\n[PROOFSTEP]\nsuffices\n  (a + b) % c + c * ((a + b) / c) + a % c + b % c =\n    (a % c + c * (a / c) + (b % c + c * (b / c)) + c * if c ≤ a % c + b % c then 1 else 0) + (a + b) % c\n  by simpa only [mul_add, add_comm, add_left_comm, add_assoc]\n[GOAL]\nm n a✝ b✝ c✝ d a b c : ℕ\nhc0 : 0 < c\nthis :\n  (a + b) % c + c * ((a + b) / c) + a % c + b % c =\n    (a % c + c * (a / c) + (b % c + c * (b / c)) + c * if c ≤ a % c + b % c then 1 else 0) + (a + b) % c\n⊢ (a + b) % c + a % c + b % c + c * ((a + b) / c) =\n    (a + b) % c + a % c + b % c + c * (a / c + b / c + if c ≤ a % c + b % c then 1 else 0)\n[PROOFSTEP]\nsimpa only [mul_add, add_comm, add_left_comm, add_assoc]\n[GOAL]\nm n a✝ b✝ c✝ d a b c : ℕ\nhc0 : 0 < c\n⊢ (a + b) % c + c * ((a + b) / c) + a % c + b % c =\n    (a % c + c * (a / c) + (b % c + c * (b / c)) + c * if c ≤ a % c + b % c then 1 else 0) + (a + b) % c\n[PROOFSTEP]\nrw [mod_add_div, mod_add_div, mod_add_div, mul_ite, add_assoc, add_assoc]\n[GOAL]\nm n a✝ b✝ c✝ d a b c : ℕ\nhc0 : 0 < c\n⊢ a + (b + (a % c + b % c)) = (a + b + if c ≤ a % c + b % c then c * 1 else c * 0) + (a + b) % c\n[PROOFSTEP]\nconv_lhs => rw [← add_mod_add_ite]\n[GOAL]\nm n a✝ b✝ c✝ d a b c : ℕ\nhc0 : 0 < c\n| a + (b + (a % c + b % c))\n[PROOFSTEP]\nrw [← add_mod_add_ite]\n[GOAL]\nm n a✝ b✝ c✝ d a b c : ℕ\nhc0 : 0 < c\n| a + (b + (a % c + b % c))\n[PROOFSTEP]\nrw [← add_mod_add_ite]\n[GOAL]\nm n a✝ b✝ c✝ d a b c : ℕ\nhc0 : 0 < c\n| a + (b + (a % c + b % c))\n[PROOFSTEP]\nrw [← add_mod_add_ite]\n[GOAL]\nm n a✝ b✝ c✝ d a b c : ℕ\nhc0 : 0 < c\n⊢ a + (b + ((a + b) % c + if c ≤ a % c + b % c then c else 0)) =\n    (a + b + if c ≤ a % c + b % c then c * 1 else c * 0) + (a + b) % c\n[PROOFSTEP]\nsimp\n[GOAL]\nm n a✝ b✝ c✝ d a b c : ℕ\nhc0 : 0 < c\n⊢ a + (b + ((a + b) % c + if c ≤ a % c + b % c then c else 0)) =\n    (a + b + if c ≤ a % c + b % c then c else 0) + (a + b) % c\n[PROOFSTEP]\nac_rfl\n[GOAL]\nm n a✝ b✝ c✝ d a b c : ℕ\nhc : a % c + b % c < c\nhc0 : c = 0\n⊢ (a + b) / c = a / c + b / c\n[PROOFSTEP]\nsimp [hc0]\n[GOAL]\nm n a✝ b✝ c✝ d a b c : ℕ\nhc : a % c + b % c < c\nhc0 : ¬c = 0\n⊢ (a + b) / c = a / c + b / c\n[PROOFSTEP]\nrw [add_div (Nat.pos_of_ne_zero hc0), if_neg (not_le_of_lt hc), add_zero]\n[GOAL]\nm n a✝ b✝ c✝ d a b c : ℕ\nhca : c ∣ a\nh : c = 0\n⊢ (a + b) / c = a / c + b / c\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nm n a✝ b✝ c✝ d a b c : ℕ\nhca : c ∣ a\nh : ¬c = 0\n⊢ a % c + b % c < c\n[PROOFSTEP]\nrw [Nat.mod_eq_zero_of_dvd hca, zero_add]\n[GOAL]\nm n a✝ b✝ c✝ d a b c : ℕ\nhca : c ∣ a\nh : ¬c = 0\n⊢ b % c < c\n[PROOFSTEP]\nexact Nat.mod_lt _ (pos_iff_ne_zero.mpr h)\n[GOAL]\nm n a✝ b✝ c✝ d a b c : ℕ\nhca : c ∣ b\n⊢ (a + b) / c = a / c + b / c\n[PROOFSTEP]\nrwa [add_comm, Nat.add_div_of_dvd_right, add_comm]\n[GOAL]\nm n a✝ b✝ c✝ d a b c : ℕ\nhc : c ≤ a % c + b % c\nhc0 : 0 < c\n⊢ (a + b) / c = a / c + b / c + 1\n[PROOFSTEP]\nrw [add_div hc0, if_pos hc]\n[GOAL]\nm n a✝ b✝ c✝ d a b c : ℕ\nhc0 : c = 0\n⊢ a / c + b / c ≤ (a + b) / c\n[PROOFSTEP]\nsimp [hc0]\n[GOAL]\nm n a✝ b✝ c✝ d a b c : ℕ\nhc0 : ¬c = 0\n⊢ a / c + b / c ≤ (a + b) / c\n[PROOFSTEP]\nrw [Nat.add_div (Nat.pos_of_ne_zero hc0)]\n[GOAL]\nm n a✝ b✝ c✝ d a b c : ℕ\nhc0 : ¬c = 0\n⊢ a / c + b / c ≤ a / c + b / c + if c ≤ a % c + b % c then 1 else 0\n[PROOFSTEP]\nexact Nat.le_add_right _ _\n[GOAL]\nm n a✝ b✝ c✝ d a b c : ℕ\nh : c ∣ a + b\nha : ¬c ∣ a\nhc : ¬c ≤ a % c + b % c\n⊢ False\n[PROOFSTEP]\nhave : (a + b) % c = a % c + b % c := add_mod_of_add_mod_lt (lt_of_not_ge hc)\n[GOAL]\nm n a✝ b✝ c✝ d a b c : ℕ\nh : c ∣ a + b\nha : ¬c ∣ a\nhc : ¬c ≤ a % c + b % c\nthis : (a + b) % c = a % c + b % c\n⊢ False\n[PROOFSTEP]\nsimp_all [dvd_iff_mod_eq_zero]\n[GOAL]\nm✝ n✝ a b c d n m : ℕ\n⊢ n % 2 = 1 → m % 2 = 1 → n * m % 2 = 1\n[PROOFSTEP]\nsimpa [Nat.ModEq] using @ModEq.mul 2 n 1 m 1\n[GOAL]\nm✝ n✝ a b c d m n : ℕ\nhm1 : m % 2 = 1\nhn1 : n % 2 = 1\nh : m = 0\n⊢ False\n[PROOFSTEP]\nsimp_all\n[GOAL]\nm✝ n✝ a b c d m n : ℕ\nhm1 : m % 2 = 1\nhn1 : n % 2 = 1\nhm0 : 0 < m\nh : n = 0\n⊢ False\n[PROOFSTEP]\nsimp_all\n[GOAL]\nm✝ n✝ a b c d m n : ℕ\nhm1 : m % 2 = 1\nhn1 : n % 2 = 1\nhm0 : 0 < m\nhn0 : 0 < n\n⊢ (fun x x_1 => x * x_1) 2 (m * n / 2) = (fun x x_1 => x * x_1) 2 (m * (n / 2) + m / 2)\n[PROOFSTEP]\ndsimp\n[GOAL]\nm✝ n✝ a b c d m n : ℕ\nhm1 : m % 2 = 1\nhn1 : n % 2 = 1\nhm0 : 0 < m\nhn0 : 0 < n\n⊢ 2 * (m * n / 2) = 2 * (m * (n / 2) + m / 2)\n[PROOFSTEP]\nrw [mul_add, two_mul_odd_div_two hm1, mul_left_comm, two_mul_odd_div_two hn1,\n  two_mul_odd_div_two (Nat.odd_mul_odd hm1 hn1), mul_tsub, mul_one, ← add_tsub_assoc_of_le (succ_le_of_lt hm0),\n  tsub_add_cancel_of_le (le_mul_of_one_le_right (Nat.zero_le _) hn0)]\n[GOAL]\nm n✝ a b c d n : ℕ\n⊢ n % 4 = 1 → n % 2 = 1\n[PROOFSTEP]\nsimpa [ModEq, show 2 * 2 = 4 by norm_num] using @ModEq.of_mul_left 2 n 1 2\n[GOAL]\nm n✝ a b c d n : ℕ\n⊢ 2 * 2 = 4\n[PROOFSTEP]\nnorm_num\n[GOAL]\nm n✝ a b c d n : ℕ\n⊢ n % 4 = 3 → n % 2 = 1\n[PROOFSTEP]\nsimpa [ModEq, show 2 * 2 = 4 by norm_num, show 3 % 4 = 3 by norm_num] using @ModEq.of_mul_left 2 n 3 2\n[GOAL]\nm n✝ a b c d n : ℕ\n⊢ 2 * 2 = 4\n[PROOFSTEP]\nnorm_num\n[GOAL]\nm n✝ a b c d n : ℕ\n⊢ 3 % 4 = 3\n[PROOFSTEP]\nnorm_num\n[GOAL]\nm n✝ a b c d n : ℕ\n⊢ ∀ (m : ℕ), m < 4 → m % 2 = 1 → m = 1 ∨ m = 3\n[PROOFSTEP]\ndecide\n[GOAL]\nm n✝ a b c d n : ℕ\nhelp : ∀ (m : ℕ), m < 4 → m % 2 = 1 → m = 1 ∨ m = 3\nhn : n % 2 = 1\n⊢ 4 > 0\n[PROOFSTEP]\nnorm_num\n[GOAL]\nm n✝ a b c d n : ℕ\nhelp : ∀ (m : ℕ), m < 4 → m % 2 = 1 → m = 1 ∨ m = 3\nhn : n % 2 = 1\n⊢ 2 ∣ 4\n[PROOFSTEP]\nnorm_num\n", "meta": {"mathlib_filename": "Mathlib.Data.Nat.ModEq", "llama_tokens": 20646, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8459424373085145, "lm_q2_score": 0.640635868562172, "lm_q1q2_score": 0.541941068078741}}
{"text": "[GOAL]\nα : Type u_1\ninst✝ : Fintype α\n⊢ ↑(powerset univ) = ↑univ\n[PROOFSTEP]\nsimp [-coe_eq_univ]\n[GOAL]\nα : Type u_1\ninst✝ : Fintype α\ns : Finset α\n⊢ powerset s = univ ↔ s = univ\n[PROOFSTEP]\nrw [← Finset.powerset_univ, powerset_inj]\n[GOAL]\nα✝ : Type u_1\nα : Type u_2\ninst✝ : Fintype α\nk : ℕ\n⊢ filter (fun s => card s = k) univ = powersetLen k univ\n[PROOFSTEP]\next\n[GOAL]\ncase a\nα✝ : Type u_1\nα : Type u_2\ninst✝ : Fintype α\nk : ℕ\na✝ : Finset α\n⊢ a✝ ∈ filter (fun s => card s = k) univ ↔ a✝ ∈ powersetLen k univ\n[PROOFSTEP]\nsimp [Finset.mem_powersetLen]\n[GOAL]\nα : Type u_1\ninst✝ : Fintype α\nk : ℕ\n⊢ card { s // Finset.card s = k } = Nat.choose (card α) k\n[PROOFSTEP]\nsimp [Fintype.subtype_card, Finset.card_univ]\n[GOAL]\nα : Type u_1\ninst✝ : Fintype α\ns : Set α\n⊢ s ∈ map { toFun := toSet, inj' := (_ : Function.Injective toSet) } (Finset.powerset Finset.univ)\n[PROOFSTEP]\nclassical\nrefine' mem_map.2 ⟨Finset.univ.filter s, Finset.mem_powerset.2 (Finset.subset_univ _), _⟩\napply (coe_filter _ _).trans\nsimp\nrfl\n[GOAL]\nα : Type u_1\ninst✝ : Fintype α\ns : Set α\n⊢ s ∈ map { toFun := toSet, inj' := (_ : Function.Injective toSet) } (Finset.powerset Finset.univ)\n[PROOFSTEP]\nrefine' mem_map.2 ⟨Finset.univ.filter s, Finset.mem_powerset.2 (Finset.subset_univ _), _⟩\n[GOAL]\nα : Type u_1\ninst✝ : Fintype α\ns : Set α\n⊢ ↑{ toFun := toSet, inj' := (_ : Function.Injective toSet) } (filter s Finset.univ) = s\n[PROOFSTEP]\napply (coe_filter _ _).trans\n[GOAL]\nα : Type u_1\ninst✝ : Fintype α\ns : Set α\n⊢ {x | x ∈ Finset.univ ∧ s x} = s\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\ninst✝ : Fintype α\ns : Set α\n⊢ {x | s x} = s\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\ninst✝ : Finite α\n⊢ Finite (Set α)\n[PROOFSTEP]\ncases nonempty_fintype α\n[GOAL]\ncase intro\nα : Type u_1\ninst✝ : Finite α\nval✝ : Fintype α\n⊢ Finite (Set α)\n[PROOFSTEP]\ninfer_instance\n", "meta": {"mathlib_filename": "Mathlib.Data.Fintype.Powerset", "llama_tokens": 896, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7606506418255928, "lm_q2_score": 0.7122321781307374, "lm_q1q2_score": 0.5417598634239853}}
{"text": "[GOAL]\nL : Language\nM : Type w\ninst✝¹ : Nonempty M\ninst✝ : Structure L M\n⊢ #((n : ℕ) × Functions (Language.sum L (skolem₁ L)) n) = #((n : ℕ) × BoundedFormula L Empty (n + 1))\n[PROOFSTEP]\nsimp only [card_functions_sum, skolem₁_Functions, mk_sigma, sum_add_distrib']\n[GOAL]\nL : Language\nM : Type w\ninst✝¹ : Nonempty M\ninst✝ : Structure L M\n⊢ ((sum fun i => lift #(Functions L i)) + sum fun i => lift #(BoundedFormula L Empty (i + 1))) =\n    sum fun i => #(BoundedFormula L Empty (i + 1))\n[PROOFSTEP]\nconv_lhs => enter [2, 1, i]; rw [lift_id'.{u, v}]\n[GOAL]\nL : Language\nM : Type w\ninst✝¹ : Nonempty M\ninst✝ : Structure L M\n| (sum fun i => lift #(Functions L i)) + sum fun i => lift #(BoundedFormula L Empty (i + 1))\n[PROOFSTEP]\nenter [2, 1, i]; rw [lift_id'.{u, v}]\n[GOAL]\nL : Language\nM : Type w\ninst✝¹ : Nonempty M\ninst✝ : Structure L M\n| (sum fun i => lift #(Functions L i)) + sum fun i => lift #(BoundedFormula L Empty (i + 1))\n[PROOFSTEP]\nenter [2, 1, i]; rw [lift_id'.{u, v}]\n[GOAL]\nL : Language\nM : Type w\ninst✝¹ : Nonempty M\ninst✝ : Structure L M\n| (sum fun i => lift #(Functions L i)) + sum fun i => lift #(BoundedFormula L Empty (i + 1))\n[PROOFSTEP]\nenter [2, 1, i]\n[GOAL]\ncase h\nL : Language\nM : Type w\ninst✝¹ : Nonempty M\ninst✝ : Structure L M\ni : ℕ\n| lift #(BoundedFormula L Empty (i + 1))\n[PROOFSTEP]\nrw [lift_id'.{u, v}]\n[GOAL]\nL : Language\nM : Type w\ninst✝¹ : Nonempty M\ninst✝ : Structure L M\n⊢ ((sum fun i => lift #(Functions L i)) + sum fun i => #(BoundedFormula L Empty (i + 1))) =\n    sum fun i => #(BoundedFormula L Empty (i + 1))\n[PROOFSTEP]\nrw [add_comm, add_eq_max, max_eq_left]\n[GOAL]\nL : Language\nM : Type w\ninst✝¹ : Nonempty M\ninst✝ : Structure L M\n⊢ (sum fun i => lift #(Functions L i)) ≤ sum fun i => #(BoundedFormula L Empty (i + 1))\n[PROOFSTEP]\nrefine' sum_le_sum _ _ fun n => _\n[GOAL]\nL : Language\nM : Type w\ninst✝¹ : Nonempty M\ninst✝ : Structure L M\nn : ℕ\n⊢ lift #(Functions L n) ≤ #(BoundedFormula L Empty (n + 1))\n[PROOFSTEP]\nrw [← lift_le.{_, max u v}, lift_lift, lift_mk_le.{v}]\n[GOAL]\nL : Language\nM : Type w\ninst✝¹ : Nonempty M\ninst✝ : Structure L M\nn : ℕ\n⊢ Nonempty (Functions L n ↪ BoundedFormula L Empty (n + 1))\n[PROOFSTEP]\nrefine' ⟨⟨fun f => (func f default).bdEqual (func f default), fun f g h => _⟩⟩\n[GOAL]\nL : Language\nM : Type w\ninst✝¹ : Nonempty M\ninst✝ : Structure L M\nn : ℕ\nf g : Functions L n\nh : (fun f => func f default =' func f default) f = (fun f => func f default =' func f default) g\n⊢ f = g\n[PROOFSTEP]\nrcases h with ⟨rfl, ⟨rfl⟩⟩\n[GOAL]\ncase refl\nL : Language\nM : Type w\ninst✝¹ : Nonempty M\ninst✝ : Structure L M\nn : ℕ\nf : Functions L n\n⊢ f = f\n[PROOFSTEP]\nrfl\n[GOAL]\nL : Language\nM : Type w\ninst✝¹ : Nonempty M\ninst✝ : Structure L M\n⊢ ℵ₀ ≤ sum fun i => #(BoundedFormula L Empty (i + 1))\n[PROOFSTEP]\nrw [← mk_sigma]\n[GOAL]\nL : Language\nM : Type w\ninst✝¹ : Nonempty M\ninst✝ : Structure L M\n⊢ ℵ₀ ≤ #((i : ℕ) × BoundedFormula L Empty (i + 1))\n[PROOFSTEP]\nexact infinite_iff.1 (Infinite.of_injective (fun n => ⟨n, ⊥⟩) fun x y xy => (Sigma.mk.inj_iff.1 xy).1)\n[GOAL]\nL : Language\nM : Type w\ninst✝¹ : Nonempty M\ninst✝ : Structure L M\n⊢ #((n : ℕ) × Functions (Language.sum L (skolem₁ L)) n) ≤ max ℵ₀ (card L)\n[PROOFSTEP]\nrw [card_functions_sum_skolem₁]\n[GOAL]\nL : Language\nM : Type w\ninst✝¹ : Nonempty M\ninst✝ : Structure L M\n⊢ #((n : ℕ) × BoundedFormula L Empty (n + 1)) ≤ max ℵ₀ (card L)\n[PROOFSTEP]\ntrans #(Σ n, L.BoundedFormula Empty n)\n[GOAL]\nL : Language\nM : Type w\ninst✝¹ : Nonempty M\ninst✝ : Structure L M\n⊢ #((n : ℕ) × BoundedFormula L Empty (n + 1)) ≤ #((n : ℕ) × BoundedFormula L Empty n)\n[PROOFSTEP]\nexact ⟨⟨Sigma.map Nat.succ fun _ => id, Nat.succ_injective.sigma_map fun _ => Function.injective_id⟩⟩\n[GOAL]\nL : Language\nM : Type w\ninst✝¹ : Nonempty M\ninst✝ : Structure L M\n⊢ #((n : ℕ) × BoundedFormula L Empty n) ≤ max ℵ₀ (card L)\n[PROOFSTEP]\nrefine' _root_.trans BoundedFormula.card_le (lift_le.{max u v}.1 _)\n[GOAL]\nL : Language\nM : Type w\ninst✝¹ : Nonempty M\ninst✝ : Structure L M\n⊢ lift (max ℵ₀ (lift #Empty + lift (card L))) ≤ lift (max ℵ₀ (card L))\n[PROOFSTEP]\nsimp only [mk_empty, lift_zero, lift_uzero, zero_add]\n[GOAL]\nL : Language\nM : Type w\ninst✝¹ : Nonempty M\ninst✝ : Structure L M\n⊢ lift (max ℵ₀ (card L)) ≤ lift (max ℵ₀ (card L))\n[PROOFSTEP]\nrfl\n[GOAL]\nL : Language\nM : Type w\ninst✝¹ : Nonempty M\ninst✝ : Structure L M\nS : Substructure (Language.sum L (skolem₁ L)) M\n⊢ IsElementary (↑(LHom.substructureReduct LHom.sumInl) S)\n[PROOFSTEP]\napply (LHom.sumInl.substructureReduct S).isElementary_of_exists\n[GOAL]\nL : Language\nM : Type w\ninst✝¹ : Nonempty M\ninst✝ : Structure L M\nS : Substructure (Language.sum L (skolem₁ L)) M\n⊢ ∀ (n : ℕ) (φ : BoundedFormula L Empty (n + 1)) (x : Fin n → { x // x ∈ ↑(LHom.substructureReduct LHom.sumInl) S })\n    (a : M),\n    BoundedFormula.Realize φ default (Fin.snoc (Subtype.val ∘ x) a) →\n      ∃ b, BoundedFormula.Realize φ default (Fin.snoc (Subtype.val ∘ x) ↑b)\n[PROOFSTEP]\nintro n φ x a h\n[GOAL]\nL : Language\nM : Type w\ninst✝¹ : Nonempty M\ninst✝ : Structure L M\nS : Substructure (Language.sum L (skolem₁ L)) M\nn : ℕ\nφ : BoundedFormula L Empty (n + 1)\nx : Fin n → { x // x ∈ ↑(LHom.substructureReduct LHom.sumInl) S }\na : M\nh : BoundedFormula.Realize φ default (Fin.snoc (Subtype.val ∘ x) a)\n⊢ ∃ b, BoundedFormula.Realize φ default (Fin.snoc (Subtype.val ∘ x) ↑b)\n[PROOFSTEP]\nlet φ' : (L.sum L.skolem₁).Functions n := LHom.sumInr.onFunction φ\n[GOAL]\nL : Language\nM : Type w\ninst✝¹ : Nonempty M\ninst✝ : Structure L M\nS : Substructure (Language.sum L (skolem₁ L)) M\nn : ℕ\nφ : BoundedFormula L Empty (n + 1)\nx : Fin n → { x // x ∈ ↑(LHom.substructureReduct LHom.sumInl) S }\na : M\nh : BoundedFormula.Realize φ default (Fin.snoc (Subtype.val ∘ x) a)\nφ' : Functions (Language.sum L (skolem₁ L)) n := LHom.onFunction LHom.sumInr φ\n⊢ ∃ b, BoundedFormula.Realize φ default (Fin.snoc (Subtype.val ∘ x) ↑b)\n[PROOFSTEP]\nexact\n  ⟨⟨funMap φ' ((↑) ∘ x), S.fun_mem (LHom.sumInr.onFunction φ) ((↑) ∘ x) (by exact fun i => (x i).2)⟩, by\n    exact Classical.epsilon_spec (p := fun a => BoundedFormula.Realize φ default (Fin.snoc (Subtype.val ∘ x) a)) ⟨a, h⟩⟩\n[GOAL]\nL : Language\nM : Type w\ninst✝¹ : Nonempty M\ninst✝ : Structure L M\nS : Substructure (Language.sum L (skolem₁ L)) M\nn : ℕ\nφ : BoundedFormula L Empty (n + 1)\nx : Fin n → { x // x ∈ ↑(LHom.substructureReduct LHom.sumInl) S }\na : M\nh : BoundedFormula.Realize φ default (Fin.snoc (Subtype.val ∘ x) a)\nφ' : Functions (Language.sum L (skolem₁ L)) n := LHom.onFunction LHom.sumInr φ\n⊢ ∀ (i : Fin n), (Subtype.val ∘ x) i ∈ ↑S\n[PROOFSTEP]\nexact fun i => (x i).2\n[GOAL]\nL : Language\nM : Type w\ninst✝¹ : Nonempty M\ninst✝ : Structure L M\nS : Substructure (Language.sum L (skolem₁ L)) M\nn : ℕ\nφ : BoundedFormula L Empty (n + 1)\nx : Fin n → { x // x ∈ ↑(LHom.substructureReduct LHom.sumInl) S }\na : M\nh : BoundedFormula.Realize φ default (Fin.snoc (Subtype.val ∘ x) a)\nφ' : Functions (Language.sum L (skolem₁ L)) n := LHom.onFunction LHom.sumInr φ\n⊢ BoundedFormula.Realize φ default\n    (Fin.snoc (Subtype.val ∘ x)\n      ↑{ val := funMap φ' (Subtype.val ∘ x),\n          property := (_ : funMap (LHom.onFunction LHom.sumInr φ) (Subtype.val ∘ x) ∈ ↑S) })\n[PROOFSTEP]\nexact Classical.epsilon_spec (p := fun a => BoundedFormula.Realize φ default (Fin.snoc (Subtype.val ∘ x) a)) ⟨a, h⟩\n[GOAL]\nL : Language\nM : Type w\ninst✝¹ : Nonempty M\ninst✝ : Structure L M\n⊢ Small.{?u.38330, w} { x // x ∈ elementarySkolem₁Reduct ⊥ }\n[PROOFSTEP]\nrw [coeSort_elementarySkolem₁Reduct]\n[GOAL]\nL : Language\nM : Type w\ninst✝¹ : Nonempty M\ninst✝ : Structure L M\n⊢ Small.{?u.38330, w} { x // x ∈ ⊥ }\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nL : Language\nM : Type w\ninst✝¹ : Nonempty M\ninst✝ : Structure L M\ns : Set M\nκ : Cardinal.{w'}\nh1 : ℵ₀ ≤ κ\nh2 : lift #↑s ≤ lift κ\nh3 : lift (card L) ≤ lift κ\nh4 : lift κ ≤ lift #M\n⊢ ∃ S, s ⊆ ↑S ∧ lift #{ x // x ∈ S } = lift κ\n[PROOFSTEP]\nobtain ⟨s', hs'⟩ := Cardinal.le_mk_iff_exists_set.1 h4\n[GOAL]\ncase intro\nL : Language\nM : Type w\ninst✝¹ : Nonempty M\ninst✝ : Structure L M\ns : Set M\nκ : Cardinal.{w'}\nh1 : ℵ₀ ≤ κ\nh2 : lift #↑s ≤ lift κ\nh3 : lift (card L) ≤ lift κ\nh4 : lift κ ≤ lift #M\ns' : Set (ULift M)\nhs' : #↑s' = lift κ\n⊢ ∃ S, s ⊆ ↑S ∧ lift #{ x // x ∈ S } = lift κ\n[PROOFSTEP]\nrw [← aleph0_le_lift.{_, w}] at h1 \n[GOAL]\ncase intro\nL : Language\nM : Type w\ninst✝¹ : Nonempty M\ninst✝ : Structure L M\ns : Set M\nκ : Cardinal.{w'}\nh1 : ℵ₀ ≤ lift κ\nh2 : lift #↑s ≤ lift κ\nh3 : lift (card L) ≤ lift κ\nh4 : lift κ ≤ lift #M\ns' : Set (ULift M)\nhs' : #↑s' = lift κ\n⊢ ∃ S, s ⊆ ↑S ∧ lift #{ x // x ∈ S } = lift κ\n[PROOFSTEP]\nrw [← hs'] at h1 h2 ⊢\n[GOAL]\ncase intro\nL : Language\nM : Type w\ninst✝¹ : Nonempty M\ninst✝ : Structure L M\ns : Set M\nκ : Cardinal.{w'}\nh3 : lift (card L) ≤ lift κ\nh4 : lift κ ≤ lift #M\ns' : Set (ULift M)\nh2 : lift #↑s ≤ #↑s'\nh1 : ℵ₀ ≤ #↑s'\nhs' : #↑s' = lift κ\n⊢ ∃ S, s ⊆ ↑S ∧ lift #{ x // x ∈ S } = #↑s'\n[PROOFSTEP]\nrefine'\n  ⟨elementarySkolem₁Reduct (closure (L.sum L.skolem₁) (s ∪ Equiv.ulift '' s')),\n    (s.subset_union_left _).trans subset_closure, _⟩\n[GOAL]\ncase intro\nL : Language\nM : Type w\ninst✝¹ : Nonempty M\ninst✝ : Structure L M\ns : Set M\nκ : Cardinal.{w'}\nh3 : lift (card L) ≤ lift κ\nh4 : lift κ ≤ lift #M\ns' : Set (ULift M)\nh2 : lift #↑s ≤ #↑s'\nh1 : ℵ₀ ≤ #↑s'\nhs' : #↑s' = lift κ\n⊢ lift\n      #{ x //\n          x ∈\n            elementarySkolem₁Reduct\n              (LowerAdjoint.toFun (closure (Language.sum L (skolem₁ L))) (s ∪ ↑Equiv.ulift '' s')) } =\n    #↑s'\n[PROOFSTEP]\nhave h := mk_image_eq_lift _ s' Equiv.ulift.injective\n[GOAL]\ncase intro\nL : Language\nM : Type w\ninst✝¹ : Nonempty M\ninst✝ : Structure L M\ns : Set M\nκ : Cardinal.{w'}\nh3 : lift (card L) ≤ lift κ\nh4 : lift κ ≤ lift #M\ns' : Set (ULift M)\nh2 : lift #↑s ≤ #↑s'\nh1 : ℵ₀ ≤ #↑s'\nhs' : #↑s' = lift κ\nh : lift #↑(↑Equiv.ulift '' s') = lift #↑s'\n⊢ lift\n      #{ x //\n          x ∈\n            elementarySkolem₁Reduct\n              (LowerAdjoint.toFun (closure (Language.sum L (skolem₁ L))) (s ∪ ↑Equiv.ulift '' s')) } =\n    #↑s'\n[PROOFSTEP]\nrw [lift_umax.{w, w'}, lift_id'.{w, w'}] at h \n[GOAL]\ncase intro\nL : Language\nM : Type w\ninst✝¹ : Nonempty M\ninst✝ : Structure L M\ns : Set M\nκ : Cardinal.{w'}\nh3 : lift (card L) ≤ lift κ\nh4 : lift κ ≤ lift #M\ns' : Set (ULift M)\nh2 : lift #↑s ≤ #↑s'\nh1 : ℵ₀ ≤ #↑s'\nhs' : #↑s' = lift κ\nh : lift #↑(↑Equiv.ulift '' s') = #↑s'\n⊢ lift\n      #{ x //\n          x ∈\n            elementarySkolem₁Reduct\n              (LowerAdjoint.toFun (closure (Language.sum L (skolem₁ L))) (s ∪ ↑Equiv.ulift '' s')) } =\n    #↑s'\n[PROOFSTEP]\nrw [coeSort_elementarySkolem₁Reduct, ← h, lift_inj]\n[GOAL]\ncase intro\nL : Language\nM : Type w\ninst✝¹ : Nonempty M\ninst✝ : Structure L M\ns : Set M\nκ : Cardinal.{w'}\nh3 : lift (card L) ≤ lift κ\nh4 : lift κ ≤ lift #M\ns' : Set (ULift M)\nh2 : lift #↑s ≤ #↑s'\nh1 : ℵ₀ ≤ #↑s'\nhs' : #↑s' = lift κ\nh : lift #↑(↑Equiv.ulift '' s') = #↑s'\n⊢ #{ x // x ∈ LowerAdjoint.toFun (closure (Language.sum L (skolem₁ L))) (s ∪ ↑Equiv.ulift '' s') } =\n    #↑(↑Equiv.ulift '' s')\n[PROOFSTEP]\nrefine'\n  le_antisymm (lift_le.1 (lift_card_closure_le.trans _))\n    (mk_le_mk_of_subset ((Set.subset_union_right _ _).trans subset_closure))\n[GOAL]\ncase intro\nL : Language\nM : Type w\ninst✝¹ : Nonempty M\ninst✝ : Structure L M\ns : Set M\nκ : Cardinal.{w'}\nh3 : lift (card L) ≤ lift κ\nh4 : lift κ ≤ lift #M\ns' : Set (ULift M)\nh2 : lift #↑s ≤ #↑s'\nh1 : ℵ₀ ≤ #↑s'\nhs' : #↑s' = lift κ\nh : lift #↑(↑Equiv.ulift '' s') = #↑s'\n⊢ max ℵ₀ (lift #↑(s ∪ ↑Equiv.ulift '' s') + lift #((i : ℕ) × Functions (Language.sum L (skolem₁ L)) i)) ≤\n    lift #↑(↑Equiv.ulift '' s')\n[PROOFSTEP]\nrw [max_le_iff, aleph0_le_lift, ← aleph0_le_lift.{_, w'}, h, add_eq_max, max_le_iff, lift_le]\n[GOAL]\ncase intro\nL : Language\nM : Type w\ninst✝¹ : Nonempty M\ninst✝ : Structure L M\ns : Set M\nκ : Cardinal.{w'}\nh3 : lift (card L) ≤ lift κ\nh4 : lift κ ≤ lift #M\ns' : Set (ULift M)\nh2 : lift #↑s ≤ #↑s'\nh1 : ℵ₀ ≤ #↑s'\nhs' : #↑s' = lift κ\nh : lift #↑(↑Equiv.ulift '' s') = #↑s'\n⊢ ℵ₀ ≤ #↑s' ∧\n    #↑(s ∪ ↑Equiv.ulift '' s') ≤ #↑(↑Equiv.ulift '' s') ∧\n      lift #((i : ℕ) × Functions (Language.sum L (skolem₁ L)) i) ≤ lift #↑(↑Equiv.ulift '' s')\ncase intro\nL : Language\nM : Type w\ninst✝¹ : Nonempty M\ninst✝ : Structure L M\ns : Set M\nκ : Cardinal.{w'}\nh3 : lift (card L) ≤ lift κ\nh4 : lift κ ≤ lift #M\ns' : Set (ULift M)\nh2 : lift #↑s ≤ #↑s'\nh1 : ℵ₀ ≤ #↑s'\nhs' : #↑s' = lift κ\nh : lift #↑(↑Equiv.ulift '' s') = #↑s'\n⊢ ℵ₀ ≤ lift #↑(s ∪ ↑Equiv.ulift '' s')\n[PROOFSTEP]\nrefine' ⟨h1, (mk_union_le _ _).trans _, (lift_le.2 card_functions_sum_skolem₁_le).trans _⟩\n[GOAL]\ncase intro.refine'_1\nL : Language\nM : Type w\ninst✝¹ : Nonempty M\ninst✝ : Structure L M\ns : Set M\nκ : Cardinal.{w'}\nh3 : lift (card L) ≤ lift κ\nh4 : lift κ ≤ lift #M\ns' : Set (ULift M)\nh2 : lift #↑s ≤ #↑s'\nh1 : ℵ₀ ≤ #↑s'\nhs' : #↑s' = lift κ\nh : lift #↑(↑Equiv.ulift '' s') = #↑s'\n⊢ #↑s + #↑(↑Equiv.ulift '' s') ≤ #↑(↑Equiv.ulift '' s')\n[PROOFSTEP]\nrw [← lift_le, lift_add, h, add_comm, add_eq_max h1]\n[GOAL]\ncase intro.refine'_1\nL : Language\nM : Type w\ninst✝¹ : Nonempty M\ninst✝ : Structure L M\ns : Set M\nκ : Cardinal.{w'}\nh3 : lift (card L) ≤ lift κ\nh4 : lift κ ≤ lift #M\ns' : Set (ULift M)\nh2 : lift #↑s ≤ #↑s'\nh1 : ℵ₀ ≤ #↑s'\nhs' : #↑s' = lift κ\nh : lift #↑(↑Equiv.ulift '' s') = #↑s'\n⊢ max (#↑s') (lift #↑s) ≤ #↑s'\n[PROOFSTEP]\nexact max_le le_rfl h2\n[GOAL]\ncase intro.refine'_2\nL : Language\nM : Type w\ninst✝¹ : Nonempty M\ninst✝ : Structure L M\ns : Set M\nκ : Cardinal.{w'}\nh3 : lift (card L) ≤ lift κ\nh4 : lift κ ≤ lift #M\ns' : Set (ULift M)\nh2 : lift #↑s ≤ #↑s'\nh1 : ℵ₀ ≤ #↑s'\nhs' : #↑s' = lift κ\nh : lift #↑(↑Equiv.ulift '' s') = #↑s'\n⊢ lift (max ℵ₀ (card L)) ≤ lift #↑(↑Equiv.ulift '' s')\n[PROOFSTEP]\nrw [lift_max, lift_aleph0, max_le_iff, aleph0_le_lift, and_comm, ← lift_le.{w'}, lift_lift, lift_lift, ← aleph0_le_lift,\n  h]\n[GOAL]\ncase intro.refine'_2\nL : Language\nM : Type w\ninst✝¹ : Nonempty M\ninst✝ : Structure L M\ns : Set M\nκ : Cardinal.{w'}\nh3 : lift (card L) ≤ lift κ\nh4 : lift κ ≤ lift #M\ns' : Set (ULift M)\nh2 : lift #↑s ≤ #↑s'\nh1 : ℵ₀ ≤ #↑s'\nhs' : #↑s' = lift κ\nh : lift #↑(↑Equiv.ulift '' s') = #↑s'\n⊢ lift (card L) ≤ lift #↑(↑Equiv.ulift '' s') ∧ ℵ₀ ≤ #↑s'\n[PROOFSTEP]\nrefine' ⟨_, h1⟩\n[GOAL]\ncase intro.refine'_2\nL : Language\nM : Type w\ninst✝¹ : Nonempty M\ninst✝ : Structure L M\ns : Set M\nκ : Cardinal.{w'}\nh3 : lift (card L) ≤ lift κ\nh4 : lift κ ≤ lift #M\ns' : Set (ULift M)\nh2 : lift #↑s ≤ #↑s'\nh1 : ℵ₀ ≤ #↑s'\nhs' : #↑s' = lift κ\nh : lift #↑(↑Equiv.ulift '' s') = #↑s'\n⊢ lift (card L) ≤ lift #↑(↑Equiv.ulift '' s')\n[PROOFSTEP]\nrw [← lift_lift.{w', w}]\n[GOAL]\ncase intro.refine'_2\nL : Language\nM : Type w\ninst✝¹ : Nonempty M\ninst✝ : Structure L M\ns : Set M\nκ : Cardinal.{w'}\nh3 : lift (card L) ≤ lift κ\nh4 : lift κ ≤ lift #M\ns' : Set (ULift M)\nh2 : lift #↑s ≤ #↑s'\nh1 : ℵ₀ ≤ #↑s'\nhs' : #↑s' = lift κ\nh : lift #↑(↑Equiv.ulift '' s') = #↑s'\n⊢ lift (lift (card L)) ≤ lift #↑(↑Equiv.ulift '' s')\n[PROOFSTEP]\nrefine' _root_.trans (lift_le.{w}.2 h3) _\n[GOAL]\ncase intro.refine'_2\nL : Language\nM : Type w\ninst✝¹ : Nonempty M\ninst✝ : Structure L M\ns : Set M\nκ : Cardinal.{w'}\nh3 : lift (card L) ≤ lift κ\nh4 : lift κ ≤ lift #M\ns' : Set (ULift M)\nh2 : lift #↑s ≤ #↑s'\nh1 : ℵ₀ ≤ #↑s'\nhs' : #↑s' = lift κ\nh : lift #↑(↑Equiv.ulift '' s') = #↑s'\n⊢ lift (lift κ) ≤ lift #↑(↑Equiv.ulift '' s')\n[PROOFSTEP]\nrw [lift_lift, ← lift_lift.{w, max u v}, ← hs', ← h, lift_lift]\n[GOAL]\ncase intro\nL : Language\nM : Type w\ninst✝¹ : Nonempty M\ninst✝ : Structure L M\ns : Set M\nκ : Cardinal.{w'}\nh3 : lift (card L) ≤ lift κ\nh4 : lift κ ≤ lift #M\ns' : Set (ULift M)\nh2 : lift #↑s ≤ #↑s'\nh1 : ℵ₀ ≤ #↑s'\nhs' : #↑s' = lift κ\nh : lift #↑(↑Equiv.ulift '' s') = #↑s'\n⊢ ℵ₀ ≤ lift #↑(s ∪ ↑Equiv.ulift '' s')\n[PROOFSTEP]\nrefine' _root_.trans _ (lift_le.2 (mk_le_mk_of_subset (Set.subset_union_right _ _)))\n[GOAL]\ncase intro\nL : Language\nM : Type w\ninst✝¹ : Nonempty M\ninst✝ : Structure L M\ns : Set M\nκ : Cardinal.{w'}\nh3 : lift (card L) ≤ lift κ\nh4 : lift κ ≤ lift #M\ns' : Set (ULift M)\nh2 : lift #↑s ≤ #↑s'\nh1 : ℵ₀ ≤ #↑s'\nhs' : #↑s' = lift κ\nh : lift #↑(↑Equiv.ulift '' s') = #↑s'\n⊢ ℵ₀ ≤ lift #↑(↑Equiv.ulift '' s')\n[PROOFSTEP]\nrw [aleph0_le_lift, ← aleph0_le_lift, h]\n[GOAL]\ncase intro\nL : Language\nM : Type w\ninst✝¹ : Nonempty M\ninst✝ : Structure L M\ns : Set M\nκ : Cardinal.{w'}\nh3 : lift (card L) ≤ lift κ\nh4 : lift κ ≤ lift #M\ns' : Set (ULift M)\nh2 : lift #↑s ≤ #↑s'\nh1 : ℵ₀ ≤ #↑s'\nhs' : #↑s' = lift κ\nh : lift #↑(↑Equiv.ulift '' s') = #↑s'\n⊢ ℵ₀ ≤ #↑s'\n[PROOFSTEP]\nexact h1\n", "meta": {"mathlib_filename": "Mathlib.ModelTheory.Skolem", "llama_tokens": 8038, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.835483553488848, "lm_q2_score": 0.6477982247516797, "lm_q1q2_score": 0.5412247627593008}}
{"text": "[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\n⊢ ∃ v, v ∈ K ∧ ‖u - v‖ = ⨅ (w : ↑K), ‖u - ↑w‖\n[PROOFSTEP]\nlet δ := ⨅ w : K, ‖u - w‖\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\n⊢ ∃ v, v ∈ K ∧ ‖u - v‖ = ⨅ (w : ↑K), ‖u - ↑w‖\n[PROOFSTEP]\nletI : Nonempty K := ne.to_subtype\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis : Nonempty ↑K := Set.Nonempty.to_subtype ne\n⊢ ∃ v, v ∈ K ∧ ‖u - v‖ = ⨅ (w : ↑K), ‖u - ↑w‖\n[PROOFSTEP]\nhave zero_le_δ : 0 ≤ δ := le_ciInf fun _ => norm_nonneg _\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\n⊢ ∃ v, v ∈ K ∧ ‖u - v‖ = ⨅ (w : ↑K), ‖u - ↑w‖\n[PROOFSTEP]\nhave δ_le : ∀ w : K, δ ≤ ‖u - w‖ := ciInf_le ⟨0, Set.forall_range_iff.2 fun _ => norm_nonneg _⟩\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\n⊢ ∃ v, v ∈ K ∧ ‖u - v‖ = ⨅ (w : ↑K), ‖u - ↑w‖\n[PROOFSTEP]\nhave δ_le' : ∀ w ∈ K, δ ≤ ‖u - w‖ := fun w hw =>\n  δ_le\n    ⟨w, hw⟩\n      -- Step 1: since `δ` is the infimum, can find a sequence `w : ℕ → K` in `K`\n        -- such that `‖u - w n‖ < δ + 1 / (n + 1)` (which implies `‖u - w n‖ --> δ`);\n        -- maybe this should be a separate lemma\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\n⊢ ∃ v, v ∈ K ∧ ‖u - v‖ = ⨅ (w : ↑K), ‖u - ↑w‖\n[PROOFSTEP]\nhave exists_seq : ∃ w : ℕ → K, ∀ n, ‖u - w n‖ < δ + 1 / (n + 1) :=\n  by\n  have hδ : ∀ n : ℕ, δ < δ + 1 / (n + 1) := fun n => lt_add_of_le_of_pos le_rfl Nat.one_div_pos_of_nat\n  have h := fun n => exists_lt_of_ciInf_lt (hδ n)\n  let w : ℕ → K := fun n => Classical.choose (h n)\n  exact ⟨w, fun n => Classical.choose_spec (h n)⟩\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\n⊢ ∃ w, ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\n[PROOFSTEP]\nhave hδ : ∀ n : ℕ, δ < δ + 1 / (n + 1) := fun n => lt_add_of_le_of_pos le_rfl Nat.one_div_pos_of_nat\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nhδ : ∀ (n : ℕ), δ < δ + 1 / (↑n + 1)\n⊢ ∃ w, ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\n[PROOFSTEP]\nhave h := fun n => exists_lt_of_ciInf_lt (hδ n)\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nhδ : ∀ (n : ℕ), δ < δ + 1 / (↑n + 1)\nh : ∀ (n : ℕ), ∃ i, ‖u - ↑i‖ < δ + 1 / (↑n + 1)\n⊢ ∃ w, ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\n[PROOFSTEP]\nlet w : ℕ → K := fun n => Classical.choose (h n)\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nhδ : ∀ (n : ℕ), δ < δ + 1 / (↑n + 1)\nh : ∀ (n : ℕ), ∃ i, ‖u - ↑i‖ < δ + 1 / (↑n + 1)\nw : ℕ → ↑K := fun n => Classical.choose (_ : ∃ i, ‖u - ↑i‖ < δ + 1 / (↑n + 1))\n⊢ ∃ w, ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\n[PROOFSTEP]\nexact ⟨w, fun n => Classical.choose_spec (h n)⟩\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nexists_seq : ∃ w, ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\n⊢ ∃ v, v ∈ K ∧ ‖u - v‖ = ⨅ (w : ↑K), ‖u - ↑w‖\n[PROOFSTEP]\nrcases exists_seq with ⟨w, hw⟩\n[GOAL]\ncase intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\n⊢ ∃ v, v ∈ K ∧ ‖u - v‖ = ⨅ (w : ↑K), ‖u - ↑w‖\n[PROOFSTEP]\nhave norm_tendsto : Tendsto (fun n => ‖u - w n‖) atTop (nhds δ) :=\n  by\n  have h : Tendsto (fun _ : ℕ => δ) atTop (nhds δ) := tendsto_const_nhds\n  have h' : Tendsto (fun n : ℕ => δ + 1 / (n + 1)) atTop (nhds δ) :=\n    by\n    convert h.add tendsto_one_div_add_atTop_nhds_0_nat\n    simp only [add_zero]\n  exact\n    tendsto_of_tendsto_of_tendsto_of_le_of_le h h' (fun x => δ_le _) fun x =>\n      le_of_lt\n        (hw _)\n          -- Step 2: Prove that the sequence `w : ℕ → K` is a Cauchy sequence\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\n⊢ Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\n[PROOFSTEP]\nhave h : Tendsto (fun _ : ℕ => δ) atTop (nhds δ) := tendsto_const_nhds\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nh : Tendsto (fun x => δ) atTop (𝓝 δ)\n⊢ Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\n[PROOFSTEP]\nhave h' : Tendsto (fun n : ℕ => δ + 1 / (n + 1)) atTop (nhds δ) :=\n  by\n  convert h.add tendsto_one_div_add_atTop_nhds_0_nat\n  simp only [add_zero]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nh : Tendsto (fun x => δ) atTop (𝓝 δ)\n⊢ Tendsto (fun n => δ + 1 / (↑n + 1)) atTop (𝓝 δ)\n[PROOFSTEP]\nconvert h.add tendsto_one_div_add_atTop_nhds_0_nat\n[GOAL]\ncase h.e'_5.h.e'_3\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nh : Tendsto (fun x => δ) atTop (𝓝 δ)\n⊢ δ = δ + 0\n[PROOFSTEP]\nsimp only [add_zero]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nh : Tendsto (fun x => δ) atTop (𝓝 δ)\nh' : Tendsto (fun n => δ + 1 / (↑n + 1)) atTop (𝓝 δ)\n⊢ Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\n[PROOFSTEP]\nexact\n  tendsto_of_tendsto_of_tendsto_of_le_of_le h h' (fun x => δ_le _) fun x =>\n    le_of_lt\n      (hw _)\n        -- Step 2: Prove that the sequence `w : ℕ → K` is a Cauchy sequence\n[GOAL]\ncase intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\n⊢ ∃ v, v ∈ K ∧ ‖u - v‖ = ⨅ (w : ↑K), ‖u - ↑w‖\n[PROOFSTEP]\nhave seq_is_cauchy : CauchySeq fun n => (w n : F) :=\n  by\n  rw [cauchySeq_iff_le_tendsto_0]\n    -- splits into three goals\n  let b := fun n : ℕ => 8 * δ * (1 / (n + 1)) + 4 * (1 / (n + 1)) * (1 / (n + 1))\n  use fun n => sqrt (b n)\n  constructor\n    -- first goal :  `∀ (n : ℕ), 0 ≤ sqrt (b n)`\n  intro n\n  exact sqrt_nonneg _\n  constructor\n    -- second goal : `∀ (n m N : ℕ), N ≤ n → N ≤ m → dist ↑(w n) ↑(w m) ≤ sqrt (b N)`\n  intro p q N hp hq\n  let wp := (w p : F)\n  let wq := (w q : F)\n  let a := u - wq\n  let b := u - wp\n  let half := 1 / (2 : ℝ)\n  let div := 1 / ((N : ℝ) + 1)\n  have : 4 * ‖u - half • (wq + wp)‖ * ‖u - half • (wq + wp)‖ + ‖wp - wq‖ * ‖wp - wq‖ = 2 * (‖a‖ * ‖a‖ + ‖b‖ * ‖b‖) :=\n    calc\n      4 * ‖u - half • (wq + wp)‖ * ‖u - half • (wq + wp)‖ + ‖wp - wq‖ * ‖wp - wq‖ =\n          2 * ‖u - half • (wq + wp)‖ * (2 * ‖u - half • (wq + wp)‖) + ‖wp - wq‖ * ‖wp - wq‖ :=\n        by ring\n      _ = absR (2 : ℝ) * ‖u - half • (wq + wp)‖ * (absR (2 : ℝ) * ‖u - half • (wq + wp)‖) + ‖wp - wq‖ * ‖wp - wq‖ :=\n        by\n        rw [_root_.abs_of_nonneg]\n        exact zero_le_two\n      _ = ‖(2 : ℝ) • (u - half • (wq + wp))‖ * ‖(2 : ℝ) • (u - half • (wq + wp))‖ + ‖wp - wq‖ * ‖wp - wq‖ := by\n        simp [norm_smul]\n      _ = ‖a + b‖ * ‖a + b‖ + ‖a - b‖ * ‖a - b‖ :=\n        by\n        rw [smul_sub, smul_smul, mul_one_div_cancel (_root_.two_ne_zero : (2 : ℝ) ≠ 0), ← one_add_one_eq_two, add_smul]\n        simp only [one_smul]\n        have eq₁ : wp - wq = a - b := (sub_sub_sub_cancel_left _ _ _).symm\n        have eq₂ : u + u - (wq + wp) = a + b\n        show u + u - (wq + wp) = u - wq + (u - wp)\n        abel\n        rw [eq₁, eq₂]\n      _ = 2 * (‖a‖ * ‖a‖ + ‖b‖ * ‖b‖) := parallelogram_law_with_norm ℝ _ _\n  have eq : δ ≤ ‖u - half • (wq + wp)‖ := by\n    rw [smul_add]\n    apply δ_le'\n    apply h₂\n    repeat' exact Subtype.mem _\n    repeat' exact le_of_lt one_half_pos\n    exact add_halves 1\n  have eq₁ : 4 * δ * δ ≤ 4 * ‖u - half • (wq + wp)‖ * ‖u - half • (wq + wp)‖ :=\n    by\n    simp_rw [mul_assoc]\n    gcongr\n  have eq₂ : ‖a‖ ≤ δ + div := le_trans (le_of_lt <| hw q) (add_le_add_left (Nat.one_div_le_one_div hq) _)\n  have eq₂' : ‖b‖ ≤ δ + div := le_trans (le_of_lt <| hw p) (add_le_add_left (Nat.one_div_le_one_div hp) _)\n  rw [dist_eq_norm]\n  apply nonneg_le_nonneg_of_sq_le_sq\n  · exact sqrt_nonneg _\n  rw [mul_self_sqrt]\n  calc\n    ‖wp - wq‖ * ‖wp - wq‖ = 2 * (‖a‖ * ‖a‖ + ‖b‖ * ‖b‖) - 4 * ‖u - half • (wq + wp)‖ * ‖u - half • (wq + wp)‖ := by\n      simp [← this]\n    _ ≤ 2 * (‖a‖ * ‖a‖ + ‖b‖ * ‖b‖) - 4 * δ * δ := by gcongr\n    _ ≤ 2 * ((δ + div) * (δ + div) + (δ + div) * (δ + div)) - 4 * δ * δ := by gcongr\n    _ = 8 * δ * div + 4 * div * div := by ring\n  positivity\n    -- third goal : `Tendsto (fun (n : ℕ) => sqrt (b n)) atTop (𝓝 0)`\n  apply Tendsto.comp (f := b) (g := sqrt)\n  · have : Tendsto sqrt (nhds 0) (nhds (sqrt 0)) := continuous_sqrt.continuousAt\n    convert this\n    exact sqrt_zero.symm\n  have eq₁ : Tendsto (fun n : ℕ => 8 * δ * (1 / (n + 1))) atTop (nhds (0 : ℝ)) :=\n    by\n    convert (@tendsto_const_nhds _ _ _ (8 * δ) _).mul tendsto_one_div_add_atTop_nhds_0_nat\n    simp only [mul_zero]\n  have : Tendsto (fun n : ℕ => (4 : ℝ) * (1 / (n + 1))) atTop (nhds (0 : ℝ)) :=\n    by\n    convert (@tendsto_const_nhds _ _ _ (4 : ℝ) _).mul tendsto_one_div_add_atTop_nhds_0_nat\n    simp only [mul_zero]\n  have eq₂ : Tendsto (fun n : ℕ => (4 : ℝ) * (1 / (n + 1)) * (1 / (n + 1))) atTop (nhds (0 : ℝ)) :=\n    by\n    convert this.mul tendsto_one_div_add_atTop_nhds_0_nat\n    simp only [mul_zero]\n  convert eq₁.add eq₂\n  simp only [add_zero]\n    -- Step 3: By completeness of `K`, let `w : ℕ → K` converge to some `v : K`.\n      -- Prove that it satisfies all requirements.\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\n⊢ CauchySeq fun n => ↑(w n)\n[PROOFSTEP]\nrw [cauchySeq_iff_le_tendsto_0]\n  -- splits into three goals\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\n⊢ ∃ b, (∀ (n : ℕ), 0 ≤ b n) ∧ (∀ (n m N : ℕ), N ≤ n → N ≤ m → dist ↑(w n) ↑(w m) ≤ b N) ∧ Tendsto b atTop (𝓝 0)\n[PROOFSTEP]\nlet b := fun n : ℕ => 8 * δ * (1 / (n + 1)) + 4 * (1 / (n + 1)) * (1 / (n + 1))\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\n⊢ ∃ b, (∀ (n : ℕ), 0 ≤ b n) ∧ (∀ (n m N : ℕ), N ≤ n → N ≤ m → dist ↑(w n) ↑(w m) ≤ b N) ∧ Tendsto b atTop (𝓝 0)\n[PROOFSTEP]\nuse fun n => sqrt (b n)\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\n⊢ (∀ (n : ℕ), 0 ≤ sqrt (b n)) ∧\n    (∀ (n m N : ℕ), N ≤ n → N ≤ m → dist ↑(w n) ↑(w m) ≤ sqrt (b N)) ∧ Tendsto (fun n => sqrt (b n)) atTop (𝓝 0)\n[PROOFSTEP]\nconstructor\n  -- first goal :  `∀ (n : ℕ), 0 ≤ sqrt (b n)`\n[GOAL]\ncase h.left\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\n⊢ ∀ (n : ℕ), 0 ≤ sqrt (b n)\ncase h.right\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\n⊢ (∀ (n m N : ℕ), N ≤ n → N ≤ m → dist ↑(w n) ↑(w m) ≤ sqrt (b N)) ∧ Tendsto (fun n => sqrt (b n)) atTop (𝓝 0)\n[PROOFSTEP]\nintro n\n[GOAL]\ncase h.left\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\nn : ℕ\n⊢ 0 ≤ sqrt (b n)\ncase h.right\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\n⊢ (∀ (n m N : ℕ), N ≤ n → N ≤ m → dist ↑(w n) ↑(w m) ≤ sqrt (b N)) ∧ Tendsto (fun n => sqrt (b n)) atTop (𝓝 0)\n[PROOFSTEP]\nexact sqrt_nonneg _\n[GOAL]\ncase h.right\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\n⊢ (∀ (n m N : ℕ), N ≤ n → N ≤ m → dist ↑(w n) ↑(w m) ≤ sqrt (b N)) ∧ Tendsto (fun n => sqrt (b n)) atTop (𝓝 0)\n[PROOFSTEP]\nconstructor\n  -- second goal : `∀ (n m N : ℕ), N ≤ n → N ≤ m → dist ↑(w n) ↑(w m) ≤ sqrt (b N)`\n[GOAL]\ncase h.right.left\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\n⊢ ∀ (n m N : ℕ), N ≤ n → N ≤ m → dist ↑(w n) ↑(w m) ≤ sqrt (b N)\ncase h.right.right\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\n⊢ Tendsto (fun n => sqrt (b n)) atTop (𝓝 0)\n[PROOFSTEP]\nintro p q N hp hq\n[GOAL]\ncase h.right.left\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\np q N : ℕ\nhp : N ≤ p\nhq : N ≤ q\n⊢ dist ↑(w p) ↑(w q) ≤ sqrt (b N)\ncase h.right.right\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\n⊢ Tendsto (fun n => sqrt (b n)) atTop (𝓝 0)\n[PROOFSTEP]\nlet wp := (w p : F)\n[GOAL]\ncase h.right.left\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\np q N : ℕ\nhp : N ≤ p\nhq : N ≤ q\nwp : F := ↑(w p)\n⊢ dist ↑(w p) ↑(w q) ≤ sqrt (b N)\ncase h.right.right\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\n⊢ Tendsto (fun n => sqrt (b n)) atTop (𝓝 0)\n[PROOFSTEP]\nlet wq := (w q : F)\n[GOAL]\ncase h.right.left\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\np q N : ℕ\nhp : N ≤ p\nhq : N ≤ q\nwp : F := ↑(w p)\nwq : F := ↑(w q)\n⊢ dist ↑(w p) ↑(w q) ≤ sqrt (b N)\ncase h.right.right\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\n⊢ Tendsto (fun n => sqrt (b n)) atTop (𝓝 0)\n[PROOFSTEP]\nlet a := u - wq\n[GOAL]\ncase h.right.left\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\np q N : ℕ\nhp : N ≤ p\nhq : N ≤ q\nwp : F := ↑(w p)\nwq : F := ↑(w q)\na : F := u - wq\n⊢ dist ↑(w p) ↑(w q) ≤ sqrt (b N)\ncase h.right.right\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\n⊢ Tendsto (fun n => sqrt (b n)) atTop (𝓝 0)\n[PROOFSTEP]\nlet b := u - wp\n[GOAL]\ncase h.right.left\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb✝ : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\np q N : ℕ\nhp : N ≤ p\nhq : N ≤ q\nwp : F := ↑(w p)\nwq : F := ↑(w q)\na : F := u - wq\nb : F := u - wp\n⊢ dist ↑(w p) ↑(w q) ≤ sqrt (b✝ N)\ncase h.right.right\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\n⊢ Tendsto (fun n => sqrt (b n)) atTop (𝓝 0)\n[PROOFSTEP]\nlet half := 1 / (2 : ℝ)\n[GOAL]\ncase h.right.left\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb✝ : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\np q N : ℕ\nhp : N ≤ p\nhq : N ≤ q\nwp : F := ↑(w p)\nwq : F := ↑(w q)\na : F := u - wq\nb : F := u - wp\nhalf : ℝ := 1 / 2\n⊢ dist ↑(w p) ↑(w q) ≤ sqrt (b✝ N)\ncase h.right.right\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\n⊢ Tendsto (fun n => sqrt (b n)) atTop (𝓝 0)\n[PROOFSTEP]\nlet div := 1 / ((N : ℝ) + 1)\n[GOAL]\ncase h.right.left\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb✝ : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\np q N : ℕ\nhp : N ≤ p\nhq : N ≤ q\nwp : F := ↑(w p)\nwq : F := ↑(w q)\na : F := u - wq\nb : F := u - wp\nhalf : ℝ := 1 / 2\ndiv : ℝ := 1 / (↑N + 1)\n⊢ dist ↑(w p) ↑(w q) ≤ sqrt (b✝ N)\ncase h.right.right\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\n⊢ Tendsto (fun n => sqrt (b n)) atTop (𝓝 0)\n[PROOFSTEP]\nhave : 4 * ‖u - half • (wq + wp)‖ * ‖u - half • (wq + wp)‖ + ‖wp - wq‖ * ‖wp - wq‖ = 2 * (‖a‖ * ‖a‖ + ‖b‖ * ‖b‖) :=\n  calc\n    4 * ‖u - half • (wq + wp)‖ * ‖u - half • (wq + wp)‖ + ‖wp - wq‖ * ‖wp - wq‖ =\n        2 * ‖u - half • (wq + wp)‖ * (2 * ‖u - half • (wq + wp)‖) + ‖wp - wq‖ * ‖wp - wq‖ :=\n      by ring\n    _ = absR (2 : ℝ) * ‖u - half • (wq + wp)‖ * (absR (2 : ℝ) * ‖u - half • (wq + wp)‖) + ‖wp - wq‖ * ‖wp - wq‖ :=\n      by\n      rw [_root_.abs_of_nonneg]\n      exact zero_le_two\n    _ = ‖(2 : ℝ) • (u - half • (wq + wp))‖ * ‖(2 : ℝ) • (u - half • (wq + wp))‖ + ‖wp - wq‖ * ‖wp - wq‖ := by\n      simp [norm_smul]\n    _ = ‖a + b‖ * ‖a + b‖ + ‖a - b‖ * ‖a - b‖ :=\n      by\n      rw [smul_sub, smul_smul, mul_one_div_cancel (_root_.two_ne_zero : (2 : ℝ) ≠ 0), ← one_add_one_eq_two, add_smul]\n      simp only [one_smul]\n      have eq₁ : wp - wq = a - b := (sub_sub_sub_cancel_left _ _ _).symm\n      have eq₂ : u + u - (wq + wp) = a + b\n      show u + u - (wq + wp) = u - wq + (u - wp)\n      abel\n      rw [eq₁, eq₂]\n    _ = 2 * (‖a‖ * ‖a‖ + ‖b‖ * ‖b‖) := parallelogram_law_with_norm ℝ _ _\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb✝ : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\np q N : ℕ\nhp : N ≤ p\nhq : N ≤ q\nwp : F := ↑(w p)\nwq : F := ↑(w q)\na : F := u - wq\nb : F := u - wp\nhalf : ℝ := 1 / 2\ndiv : ℝ := 1 / (↑N + 1)\n⊢ 4 * ‖u - half • (wq + wp)‖ * ‖u - half • (wq + wp)‖ + ‖wp - wq‖ * ‖wp - wq‖ =\n    2 * ‖u - half • (wq + wp)‖ * (2 * ‖u - half • (wq + wp)‖) + ‖wp - wq‖ * ‖wp - wq‖\n[PROOFSTEP]\nring\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb✝ : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\np q N : ℕ\nhp : N ≤ p\nhq : N ≤ q\nwp : F := ↑(w p)\nwq : F := ↑(w q)\na : F := u - wq\nb : F := u - wp\nhalf : ℝ := 1 / 2\ndiv : ℝ := 1 / (↑N + 1)\n⊢ 2 * ‖u - half • (wq + wp)‖ * (2 * ‖u - half • (wq + wp)‖) + ‖wp - wq‖ * ‖wp - wq‖ =\n    absR 2 * ‖u - half • (wq + wp)‖ * (absR 2 * ‖u - half • (wq + wp)‖) + ‖wp - wq‖ * ‖wp - wq‖\n[PROOFSTEP]\nrw [_root_.abs_of_nonneg]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb✝ : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\np q N : ℕ\nhp : N ≤ p\nhq : N ≤ q\nwp : F := ↑(w p)\nwq : F := ↑(w q)\na : F := u - wq\nb : F := u - wp\nhalf : ℝ := 1 / 2\ndiv : ℝ := 1 / (↑N + 1)\n⊢ 0 ≤ 2\n[PROOFSTEP]\nexact zero_le_two\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb✝ : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\np q N : ℕ\nhp : N ≤ p\nhq : N ≤ q\nwp : F := ↑(w p)\nwq : F := ↑(w q)\na : F := u - wq\nb : F := u - wp\nhalf : ℝ := 1 / 2\ndiv : ℝ := 1 / (↑N + 1)\n⊢ absR 2 * ‖u - half • (wq + wp)‖ * (absR 2 * ‖u - half • (wq + wp)‖) + ‖wp - wq‖ * ‖wp - wq‖ =\n    ‖2 • (u - half • (wq + wp))‖ * ‖2 • (u - half • (wq + wp))‖ + ‖wp - wq‖ * ‖wp - wq‖\n[PROOFSTEP]\nsimp [norm_smul]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb✝ : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\np q N : ℕ\nhp : N ≤ p\nhq : N ≤ q\nwp : F := ↑(w p)\nwq : F := ↑(w q)\na : F := u - wq\nb : F := u - wp\nhalf : ℝ := 1 / 2\ndiv : ℝ := 1 / (↑N + 1)\n⊢ ‖2 • (u - half • (wq + wp))‖ * ‖2 • (u - half • (wq + wp))‖ + ‖wp - wq‖ * ‖wp - wq‖ =\n    ‖a + b‖ * ‖a + b‖ + ‖a - b‖ * ‖a - b‖\n[PROOFSTEP]\nrw [smul_sub, smul_smul, mul_one_div_cancel (_root_.two_ne_zero : (2 : ℝ) ≠ 0), ← one_add_one_eq_two, add_smul]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb✝ : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\np q N : ℕ\nhp : N ≤ p\nhq : N ≤ q\nwp : F := ↑(w p)\nwq : F := ↑(w q)\na : F := u - wq\nb : F := u - wp\nhalf : ℝ := 1 / 2\ndiv : ℝ := 1 / (↑N + 1)\n⊢ ‖1 • u + 1 • u - 1 • (wq + wp)‖ * ‖1 • u + 1 • u - 1 • (wq + wp)‖ + ‖wp - wq‖ * ‖wp - wq‖ =\n    ‖a + b‖ * ‖a + b‖ + ‖a - b‖ * ‖a - b‖\n[PROOFSTEP]\nsimp only [one_smul]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb✝ : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\np q N : ℕ\nhp : N ≤ p\nhq : N ≤ q\nwp : F := ↑(w p)\nwq : F := ↑(w q)\na : F := u - wq\nb : F := u - wp\nhalf : ℝ := 1 / 2\ndiv : ℝ := 1 / (↑N + 1)\n⊢ ‖u + u - (↑(w q) + ↑(w p))‖ * ‖u + u - (↑(w q) + ↑(w p))‖ + ‖↑(w p) - ↑(w q)‖ * ‖↑(w p) - ↑(w q)‖ =\n    ‖u - ↑(w q) + (u - ↑(w p))‖ * ‖u - ↑(w q) + (u - ↑(w p))‖ +\n      ‖u - ↑(w q) - (u - ↑(w p))‖ * ‖u - ↑(w q) - (u - ↑(w p))‖\n[PROOFSTEP]\nhave eq₁ : wp - wq = a - b := (sub_sub_sub_cancel_left _ _ _).symm\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb✝ : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\np q N : ℕ\nhp : N ≤ p\nhq : N ≤ q\nwp : F := ↑(w p)\nwq : F := ↑(w q)\na : F := u - wq\nb : F := u - wp\nhalf : ℝ := 1 / 2\ndiv : ℝ := 1 / (↑N + 1)\neq₁ : wp - wq = a - b\n⊢ ‖u + u - (↑(w q) + ↑(w p))‖ * ‖u + u - (↑(w q) + ↑(w p))‖ + ‖↑(w p) - ↑(w q)‖ * ‖↑(w p) - ↑(w q)‖ =\n    ‖u - ↑(w q) + (u - ↑(w p))‖ * ‖u - ↑(w q) + (u - ↑(w p))‖ +\n      ‖u - ↑(w q) - (u - ↑(w p))‖ * ‖u - ↑(w q) - (u - ↑(w p))‖\n[PROOFSTEP]\nhave eq₂ : u + u - (wq + wp) = a + b\n[GOAL]\ncase eq₂\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb✝ : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\np q N : ℕ\nhp : N ≤ p\nhq : N ≤ q\nwp : F := ↑(w p)\nwq : F := ↑(w q)\na : F := u - wq\nb : F := u - wp\nhalf : ℝ := 1 / 2\ndiv : ℝ := 1 / (↑N + 1)\neq₁ : wp - wq = a - b\n⊢ u + u - (wq + wp) = a + b\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb✝ : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\np q N : ℕ\nhp : N ≤ p\nhq : N ≤ q\nwp : F := ↑(w p)\nwq : F := ↑(w q)\na : F := u - wq\nb : F := u - wp\nhalf : ℝ := 1 / 2\ndiv : ℝ := 1 / (↑N + 1)\neq₁ : wp - wq = a - b\neq₂ : u + u - (wq + wp) = a + b\n⊢ ‖u + u - (↑(w q) + ↑(w p))‖ * ‖u + u - (↑(w q) + ↑(w p))‖ + ‖↑(w p) - ↑(w q)‖ * ‖↑(w p) - ↑(w q)‖ =\n    ‖u - ↑(w q) + (u - ↑(w p))‖ * ‖u - ↑(w q) + (u - ↑(w p))‖ +\n      ‖u - ↑(w q) - (u - ↑(w p))‖ * ‖u - ↑(w q) - (u - ↑(w p))‖\n[PROOFSTEP]\nshow u + u - (wq + wp) = u - wq + (u - wp)\n[GOAL]\ncase eq₂\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb✝ : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\np q N : ℕ\nhp : N ≤ p\nhq : N ≤ q\nwp : F := ↑(w p)\nwq : F := ↑(w q)\na : F := u - wq\nb : F := u - wp\nhalf : ℝ := 1 / 2\ndiv : ℝ := 1 / (↑N + 1)\neq₁ : wp - wq = a - b\n⊢ u + u - (wq + wp) = u - wq + (u - wp)\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb✝ : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\np q N : ℕ\nhp : N ≤ p\nhq : N ≤ q\nwp : F := ↑(w p)\nwq : F := ↑(w q)\na : F := u - wq\nb : F := u - wp\nhalf : ℝ := 1 / 2\ndiv : ℝ := 1 / (↑N + 1)\neq₁ : wp - wq = a - b\neq₂ : u + u - (wq + wp) = a + b\n⊢ ‖u + u - (↑(w q) + ↑(w p))‖ * ‖u + u - (↑(w q) + ↑(w p))‖ + ‖↑(w p) - ↑(w q)‖ * ‖↑(w p) - ↑(w q)‖ =\n    ‖u - ↑(w q) + (u - ↑(w p))‖ * ‖u - ↑(w q) + (u - ↑(w p))‖ +\n      ‖u - ↑(w q) - (u - ↑(w p))‖ * ‖u - ↑(w q) - (u - ↑(w p))‖\n[PROOFSTEP]\nabel\n[GOAL]\ncase eq₂\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb✝ : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\np q N : ℕ\nhp : N ≤ p\nhq : N ≤ q\nwp : F := ↑(w p)\nwq : F := ↑(w q)\na : F := u - wq\nb : F := u - wp\nhalf : ℝ := 1 / 2\ndiv : ℝ := 1 / (↑N + 1)\neq₁ : wp - wq = a - b\n⊢ u + u - (wq + wp) = u - wq + (u - wp)\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb✝ : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\np q N : ℕ\nhp : N ≤ p\nhq : N ≤ q\nwp : F := ↑(w p)\nwq : F := ↑(w q)\na : F := u - wq\nb : F := u - wp\nhalf : ℝ := 1 / 2\ndiv : ℝ := 1 / (↑N + 1)\neq₁ : wp - wq = a - b\neq₂ : u + u - (wq + wp) = a + b\n⊢ ‖u + u - (↑(w q) + ↑(w p))‖ * ‖u + u - (↑(w q) + ↑(w p))‖ + ‖↑(w p) - ↑(w q)‖ * ‖↑(w p) - ↑(w q)‖ =\n    ‖u - ↑(w q) + (u - ↑(w p))‖ * ‖u - ↑(w q) + (u - ↑(w p))‖ +\n      ‖u - ↑(w q) - (u - ↑(w p))‖ * ‖u - ↑(w q) - (u - ↑(w p))‖\n[PROOFSTEP]\nabel\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb✝ : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\np q N : ℕ\nhp : N ≤ p\nhq : N ≤ q\nwp : F := ↑(w p)\nwq : F := ↑(w q)\na : F := u - wq\nb : F := u - wp\nhalf : ℝ := 1 / 2\ndiv : ℝ := 1 / (↑N + 1)\neq₁ : wp - wq = a - b\neq₂ : u + u - (wq + wp) = a + b\n⊢ ‖u + u - (↑(w q) + ↑(w p))‖ * ‖u + u - (↑(w q) + ↑(w p))‖ + ‖↑(w p) - ↑(w q)‖ * ‖↑(w p) - ↑(w q)‖ =\n    ‖u - ↑(w q) + (u - ↑(w p))‖ * ‖u - ↑(w q) + (u - ↑(w p))‖ +\n      ‖u - ↑(w q) - (u - ↑(w p))‖ * ‖u - ↑(w q) - (u - ↑(w p))‖\n[PROOFSTEP]\nrw [eq₁, eq₂]\n[GOAL]\ncase h.right.left\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis✝ : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb✝ : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\np q N : ℕ\nhp : N ≤ p\nhq : N ≤ q\nwp : F := ↑(w p)\nwq : F := ↑(w q)\na : F := u - wq\nb : F := u - wp\nhalf : ℝ := 1 / 2\ndiv : ℝ := 1 / (↑N + 1)\nthis : 4 * ‖u - half • (wq + wp)‖ * ‖u - half • (wq + wp)‖ + ‖wp - wq‖ * ‖wp - wq‖ = 2 * (‖a‖ * ‖a‖ + ‖b‖ * ‖b‖)\n⊢ dist ↑(w p) ↑(w q) ≤ sqrt (b✝ N)\ncase h.right.right\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\n⊢ Tendsto (fun n => sqrt (b n)) atTop (𝓝 0)\n[PROOFSTEP]\nhave eq : δ ≤ ‖u - half • (wq + wp)‖ := by\n  rw [smul_add]\n  apply δ_le'\n  apply h₂\n  repeat' exact Subtype.mem _\n  repeat' exact le_of_lt one_half_pos\n  exact add_halves 1\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis✝ : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb✝ : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\np q N : ℕ\nhp : N ≤ p\nhq : N ≤ q\nwp : F := ↑(w p)\nwq : F := ↑(w q)\na : F := u - wq\nb : F := u - wp\nhalf : ℝ := 1 / 2\ndiv : ℝ := 1 / (↑N + 1)\nthis : 4 * ‖u - half • (wq + wp)‖ * ‖u - half • (wq + wp)‖ + ‖wp - wq‖ * ‖wp - wq‖ = 2 * (‖a‖ * ‖a‖ + ‖b‖ * ‖b‖)\n⊢ δ ≤ ‖u - half • (wq + wp)‖\n[PROOFSTEP]\nrw [smul_add]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis✝ : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb✝ : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\np q N : ℕ\nhp : N ≤ p\nhq : N ≤ q\nwp : F := ↑(w p)\nwq : F := ↑(w q)\na : F := u - wq\nb : F := u - wp\nhalf : ℝ := 1 / 2\ndiv : ℝ := 1 / (↑N + 1)\nthis : 4 * ‖u - half • (wq + wp)‖ * ‖u - half • (wq + wp)‖ + ‖wp - wq‖ * ‖wp - wq‖ = 2 * (‖a‖ * ‖a‖ + ‖b‖ * ‖b‖)\n⊢ δ ≤ ‖u - (half • wq + half • wp)‖\n[PROOFSTEP]\napply δ_le'\n[GOAL]\ncase a\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis✝ : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb✝ : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\np q N : ℕ\nhp : N ≤ p\nhq : N ≤ q\nwp : F := ↑(w p)\nwq : F := ↑(w q)\na : F := u - wq\nb : F := u - wp\nhalf : ℝ := 1 / 2\ndiv : ℝ := 1 / (↑N + 1)\nthis : 4 * ‖u - half • (wq + wp)‖ * ‖u - half • (wq + wp)‖ + ‖wp - wq‖ * ‖wp - wq‖ = 2 * (‖a‖ * ‖a‖ + ‖b‖ * ‖b‖)\n⊢ half • wq + half • wp ∈ K\n[PROOFSTEP]\napply h₂\n[GOAL]\ncase a.a\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis✝ : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb✝ : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\np q N : ℕ\nhp : N ≤ p\nhq : N ≤ q\nwp : F := ↑(w p)\nwq : F := ↑(w q)\na : F := u - wq\nb : F := u - wp\nhalf : ℝ := 1 / 2\ndiv : ℝ := 1 / (↑N + 1)\nthis : 4 * ‖u - half • (wq + wp)‖ * ‖u - half • (wq + wp)‖ + ‖wp - wq‖ * ‖wp - wq‖ = 2 * (‖a‖ * ‖a‖ + ‖b‖ * ‖b‖)\n⊢ wq ∈ K\ncase a.a\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis✝ : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb✝ : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\np q N : ℕ\nhp : N ≤ p\nhq : N ≤ q\nwp : F := ↑(w p)\nwq : F := ↑(w q)\na : F := u - wq\nb : F := u - wp\nhalf : ℝ := 1 / 2\ndiv : ℝ := 1 / (↑N + 1)\nthis : 4 * ‖u - half • (wq + wp)‖ * ‖u - half • (wq + wp)‖ + ‖wp - wq‖ * ‖wp - wq‖ = 2 * (‖a‖ * ‖a‖ + ‖b‖ * ‖b‖)\n⊢ wp ∈ K\ncase a.a\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis✝ : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb✝ : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\np q N : ℕ\nhp : N ≤ p\nhq : N ≤ q\nwp : F := ↑(w p)\nwq : F := ↑(w q)\na : F := u - wq\nb : F := u - wp\nhalf : ℝ := 1 / 2\ndiv : ℝ := 1 / (↑N + 1)\nthis : 4 * ‖u - half • (wq + wp)‖ * ‖u - half • (wq + wp)‖ + ‖wp - wq‖ * ‖wp - wq‖ = 2 * (‖a‖ * ‖a‖ + ‖b‖ * ‖b‖)\n⊢ 0 ≤ half\ncase a.a\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis✝ : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb✝ : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\np q N : ℕ\nhp : N ≤ p\nhq : N ≤ q\nwp : F := ↑(w p)\nwq : F := ↑(w q)\na : F := u - wq\nb : F := u - wp\nhalf : ℝ := 1 / 2\ndiv : ℝ := 1 / (↑N + 1)\nthis : 4 * ‖u - half • (wq + wp)‖ * ‖u - half • (wq + wp)‖ + ‖wp - wq‖ * ‖wp - wq‖ = 2 * (‖a‖ * ‖a‖ + ‖b‖ * ‖b‖)\n⊢ 0 ≤ half\ncase a.a\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis✝ : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb✝ : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\np q N : ℕ\nhp : N ≤ p\nhq : N ≤ q\nwp : F := ↑(w p)\nwq : F := ↑(w q)\na : F := u - wq\nb : F := u - wp\nhalf : ℝ := 1 / 2\ndiv : ℝ := 1 / (↑N + 1)\nthis : 4 * ‖u - half • (wq + wp)‖ * ‖u - half • (wq + wp)‖ + ‖wp - wq‖ * ‖wp - wq‖ = 2 * (‖a‖ * ‖a‖ + ‖b‖ * ‖b‖)\n⊢ half + half = 1\n[PROOFSTEP]\nrepeat' exact Subtype.mem _\n[GOAL]\ncase a.a\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis✝ : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb✝ : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\np q N : ℕ\nhp : N ≤ p\nhq : N ≤ q\nwp : F := ↑(w p)\nwq : F := ↑(w q)\na : F := u - wq\nb : F := u - wp\nhalf : ℝ := 1 / 2\ndiv : ℝ := 1 / (↑N + 1)\nthis : 4 * ‖u - half • (wq + wp)‖ * ‖u - half • (wq + wp)‖ + ‖wp - wq‖ * ‖wp - wq‖ = 2 * (‖a‖ * ‖a‖ + ‖b‖ * ‖b‖)\n⊢ wq ∈ K\n[PROOFSTEP]\nexact Subtype.mem _\n[GOAL]\ncase a.a\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis✝ : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb✝ : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\np q N : ℕ\nhp : N ≤ p\nhq : N ≤ q\nwp : F := ↑(w p)\nwq : F := ↑(w q)\na : F := u - wq\nb : F := u - wp\nhalf : ℝ := 1 / 2\ndiv : ℝ := 1 / (↑N + 1)\nthis : 4 * ‖u - half • (wq + wp)‖ * ‖u - half • (wq + wp)‖ + ‖wp - wq‖ * ‖wp - wq‖ = 2 * (‖a‖ * ‖a‖ + ‖b‖ * ‖b‖)\n⊢ wp ∈ K\n[PROOFSTEP]\nexact Subtype.mem _\n[GOAL]\ncase a.a\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis✝ : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb✝ : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\np q N : ℕ\nhp : N ≤ p\nhq : N ≤ q\nwp : F := ↑(w p)\nwq : F := ↑(w q)\na : F := u - wq\nb : F := u - wp\nhalf : ℝ := 1 / 2\ndiv : ℝ := 1 / (↑N + 1)\nthis : 4 * ‖u - half • (wq + wp)‖ * ‖u - half • (wq + wp)‖ + ‖wp - wq‖ * ‖wp - wq‖ = 2 * (‖a‖ * ‖a‖ + ‖b‖ * ‖b‖)\n⊢ 0 ≤ half\n[PROOFSTEP]\nexact Subtype.mem _\n[GOAL]\ncase a.a\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis✝ : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb✝ : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\np q N : ℕ\nhp : N ≤ p\nhq : N ≤ q\nwp : F := ↑(w p)\nwq : F := ↑(w q)\na : F := u - wq\nb : F := u - wp\nhalf : ℝ := 1 / 2\ndiv : ℝ := 1 / (↑N + 1)\nthis : 4 * ‖u - half • (wq + wp)‖ * ‖u - half • (wq + wp)‖ + ‖wp - wq‖ * ‖wp - wq‖ = 2 * (‖a‖ * ‖a‖ + ‖b‖ * ‖b‖)\n⊢ 0 ≤ half\n[PROOFSTEP]\nexact Subtype.mem _\n[GOAL]\ncase a.a\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis✝ : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb✝ : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\np q N : ℕ\nhp : N ≤ p\nhq : N ≤ q\nwp : F := ↑(w p)\nwq : F := ↑(w q)\na : F := u - wq\nb : F := u - wp\nhalf : ℝ := 1 / 2\ndiv : ℝ := 1 / (↑N + 1)\nthis : 4 * ‖u - half • (wq + wp)‖ * ‖u - half • (wq + wp)‖ + ‖wp - wq‖ * ‖wp - wq‖ = 2 * (‖a‖ * ‖a‖ + ‖b‖ * ‖b‖)\n⊢ half + half = 1\n[PROOFSTEP]\nexact Subtype.mem _\n[GOAL]\ncase a.a\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis✝ : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb✝ : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\np q N : ℕ\nhp : N ≤ p\nhq : N ≤ q\nwp : F := ↑(w p)\nwq : F := ↑(w q)\na : F := u - wq\nb : F := u - wp\nhalf : ℝ := 1 / 2\ndiv : ℝ := 1 / (↑N + 1)\nthis : 4 * ‖u - half • (wq + wp)‖ * ‖u - half • (wq + wp)‖ + ‖wp - wq‖ * ‖wp - wq‖ = 2 * (‖a‖ * ‖a‖ + ‖b‖ * ‖b‖)\n⊢ 0 ≤ half\ncase a.a\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis✝ : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb✝ : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\np q N : ℕ\nhp : N ≤ p\nhq : N ≤ q\nwp : F := ↑(w p)\nwq : F := ↑(w q)\na : F := u - wq\nb : F := u - wp\nhalf : ℝ := 1 / 2\ndiv : ℝ := 1 / (↑N + 1)\nthis : 4 * ‖u - half • (wq + wp)‖ * ‖u - half • (wq + wp)‖ + ‖wp - wq‖ * ‖wp - wq‖ = 2 * (‖a‖ * ‖a‖ + ‖b‖ * ‖b‖)\n⊢ 0 ≤ half\ncase a.a\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis✝ : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb✝ : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\np q N : ℕ\nhp : N ≤ p\nhq : N ≤ q\nwp : F := ↑(w p)\nwq : F := ↑(w q)\na : F := u - wq\nb : F := u - wp\nhalf : ℝ := 1 / 2\ndiv : ℝ := 1 / (↑N + 1)\nthis : 4 * ‖u - half • (wq + wp)‖ * ‖u - half • (wq + wp)‖ + ‖wp - wq‖ * ‖wp - wq‖ = 2 * (‖a‖ * ‖a‖ + ‖b‖ * ‖b‖)\n⊢ half + half = 1\n[PROOFSTEP]\nrepeat' exact le_of_lt one_half_pos\n[GOAL]\ncase a.a\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis✝ : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb✝ : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\np q N : ℕ\nhp : N ≤ p\nhq : N ≤ q\nwp : F := ↑(w p)\nwq : F := ↑(w q)\na : F := u - wq\nb : F := u - wp\nhalf : ℝ := 1 / 2\ndiv : ℝ := 1 / (↑N + 1)\nthis : 4 * ‖u - half • (wq + wp)‖ * ‖u - half • (wq + wp)‖ + ‖wp - wq‖ * ‖wp - wq‖ = 2 * (‖a‖ * ‖a‖ + ‖b‖ * ‖b‖)\n⊢ 0 ≤ half\n[PROOFSTEP]\nexact le_of_lt one_half_pos\n[GOAL]\ncase a.a\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis✝ : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb✝ : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\np q N : ℕ\nhp : N ≤ p\nhq : N ≤ q\nwp : F := ↑(w p)\nwq : F := ↑(w q)\na : F := u - wq\nb : F := u - wp\nhalf : ℝ := 1 / 2\ndiv : ℝ := 1 / (↑N + 1)\nthis : 4 * ‖u - half • (wq + wp)‖ * ‖u - half • (wq + wp)‖ + ‖wp - wq‖ * ‖wp - wq‖ = 2 * (‖a‖ * ‖a‖ + ‖b‖ * ‖b‖)\n⊢ 0 ≤ half\n[PROOFSTEP]\nexact le_of_lt one_half_pos\n[GOAL]\ncase a.a\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis✝ : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb✝ : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\np q N : ℕ\nhp : N ≤ p\nhq : N ≤ q\nwp : F := ↑(w p)\nwq : F := ↑(w q)\na : F := u - wq\nb : F := u - wp\nhalf : ℝ := 1 / 2\ndiv : ℝ := 1 / (↑N + 1)\nthis : 4 * ‖u - half • (wq + wp)‖ * ‖u - half • (wq + wp)‖ + ‖wp - wq‖ * ‖wp - wq‖ = 2 * (‖a‖ * ‖a‖ + ‖b‖ * ‖b‖)\n⊢ half + half = 1\n[PROOFSTEP]\nexact le_of_lt one_half_pos\n[GOAL]\ncase a.a\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis✝ : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb✝ : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\np q N : ℕ\nhp : N ≤ p\nhq : N ≤ q\nwp : F := ↑(w p)\nwq : F := ↑(w q)\na : F := u - wq\nb : F := u - wp\nhalf : ℝ := 1 / 2\ndiv : ℝ := 1 / (↑N + 1)\nthis : 4 * ‖u - half • (wq + wp)‖ * ‖u - half • (wq + wp)‖ + ‖wp - wq‖ * ‖wp - wq‖ = 2 * (‖a‖ * ‖a‖ + ‖b‖ * ‖b‖)\n⊢ half + half = 1\n[PROOFSTEP]\nexact add_halves 1\n[GOAL]\ncase h.right.left\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis✝ : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb✝ : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\np q N : ℕ\nhp : N ≤ p\nhq : N ≤ q\nwp : F := ↑(w p)\nwq : F := ↑(w q)\na : F := u - wq\nb : F := u - wp\nhalf : ℝ := 1 / 2\ndiv : ℝ := 1 / (↑N + 1)\nthis : 4 * ‖u - half • (wq + wp)‖ * ‖u - half • (wq + wp)‖ + ‖wp - wq‖ * ‖wp - wq‖ = 2 * (‖a‖ * ‖a‖ + ‖b‖ * ‖b‖)\neq : δ ≤ ‖u - half • (wq + wp)‖\n⊢ dist ↑(w p) ↑(w q) ≤ sqrt (b✝ N)\ncase h.right.right\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\n⊢ Tendsto (fun n => sqrt (b n)) atTop (𝓝 0)\n[PROOFSTEP]\nhave eq₁ : 4 * δ * δ ≤ 4 * ‖u - half • (wq + wp)‖ * ‖u - half • (wq + wp)‖ :=\n  by\n  simp_rw [mul_assoc]\n  gcongr\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis✝ : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb✝ : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\np q N : ℕ\nhp : N ≤ p\nhq : N ≤ q\nwp : F := ↑(w p)\nwq : F := ↑(w q)\na : F := u - wq\nb : F := u - wp\nhalf : ℝ := 1 / 2\ndiv : ℝ := 1 / (↑N + 1)\nthis : 4 * ‖u - half • (wq + wp)‖ * ‖u - half • (wq + wp)‖ + ‖wp - wq‖ * ‖wp - wq‖ = 2 * (‖a‖ * ‖a‖ + ‖b‖ * ‖b‖)\neq : δ ≤ ‖u - half • (wq + wp)‖\n⊢ 4 * δ * δ ≤ 4 * ‖u - half • (wq + wp)‖ * ‖u - half • (wq + wp)‖\n[PROOFSTEP]\nsimp_rw [mul_assoc]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis✝ : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb✝ : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\np q N : ℕ\nhp : N ≤ p\nhq : N ≤ q\nwp : F := ↑(w p)\nwq : F := ↑(w q)\na : F := u - wq\nb : F := u - wp\nhalf : ℝ := 1 / 2\ndiv : ℝ := 1 / (↑N + 1)\nthis : 4 * ‖u - half • (wq + wp)‖ * ‖u - half • (wq + wp)‖ + ‖wp - wq‖ * ‖wp - wq‖ = 2 * (‖a‖ * ‖a‖ + ‖b‖ * ‖b‖)\neq : δ ≤ ‖u - half • (wq + wp)‖\n⊢ 4 * ((⨅ (w : ↑K), ‖u - ↑w‖) * ⨅ (w : ↑K), ‖u - ↑w‖) ≤\n    4 * (‖u - (1 / 2) • (↑(w q) + ↑(w p))‖ * ‖u - (1 / 2) • (↑(w q) + ↑(w p))‖)\n[PROOFSTEP]\ngcongr\n[GOAL]\ncase h.right.left\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis✝ : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb✝ : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\np q N : ℕ\nhp : N ≤ p\nhq : N ≤ q\nwp : F := ↑(w p)\nwq : F := ↑(w q)\na : F := u - wq\nb : F := u - wp\nhalf : ℝ := 1 / 2\ndiv : ℝ := 1 / (↑N + 1)\nthis : 4 * ‖u - half • (wq + wp)‖ * ‖u - half • (wq + wp)‖ + ‖wp - wq‖ * ‖wp - wq‖ = 2 * (‖a‖ * ‖a‖ + ‖b‖ * ‖b‖)\neq : δ ≤ ‖u - half • (wq + wp)‖\neq₁ : 4 * δ * δ ≤ 4 * ‖u - half • (wq + wp)‖ * ‖u - half • (wq + wp)‖\n⊢ dist ↑(w p) ↑(w q) ≤ sqrt (b✝ N)\ncase h.right.right\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\n⊢ Tendsto (fun n => sqrt (b n)) atTop (𝓝 0)\n[PROOFSTEP]\nhave eq₂ : ‖a‖ ≤ δ + div := le_trans (le_of_lt <| hw q) (add_le_add_left (Nat.one_div_le_one_div hq) _)\n[GOAL]\ncase h.right.left\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis✝ : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb✝ : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\np q N : ℕ\nhp : N ≤ p\nhq : N ≤ q\nwp : F := ↑(w p)\nwq : F := ↑(w q)\na : F := u - wq\nb : F := u - wp\nhalf : ℝ := 1 / 2\ndiv : ℝ := 1 / (↑N + 1)\nthis : 4 * ‖u - half • (wq + wp)‖ * ‖u - half • (wq + wp)‖ + ‖wp - wq‖ * ‖wp - wq‖ = 2 * (‖a‖ * ‖a‖ + ‖b‖ * ‖b‖)\neq : δ ≤ ‖u - half • (wq + wp)‖\neq₁ : 4 * δ * δ ≤ 4 * ‖u - half • (wq + wp)‖ * ‖u - half • (wq + wp)‖\neq₂ : ‖a‖ ≤ δ + div\n⊢ dist ↑(w p) ↑(w q) ≤ sqrt (b✝ N)\ncase h.right.right\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\n⊢ Tendsto (fun n => sqrt (b n)) atTop (𝓝 0)\n[PROOFSTEP]\nhave eq₂' : ‖b‖ ≤ δ + div := le_trans (le_of_lt <| hw p) (add_le_add_left (Nat.one_div_le_one_div hp) _)\n[GOAL]\ncase h.right.left\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis✝ : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb✝ : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\np q N : ℕ\nhp : N ≤ p\nhq : N ≤ q\nwp : F := ↑(w p)\nwq : F := ↑(w q)\na : F := u - wq\nb : F := u - wp\nhalf : ℝ := 1 / 2\ndiv : ℝ := 1 / (↑N + 1)\nthis : 4 * ‖u - half • (wq + wp)‖ * ‖u - half • (wq + wp)‖ + ‖wp - wq‖ * ‖wp - wq‖ = 2 * (‖a‖ * ‖a‖ + ‖b‖ * ‖b‖)\neq : δ ≤ ‖u - half • (wq + wp)‖\neq₁ : 4 * δ * δ ≤ 4 * ‖u - half • (wq + wp)‖ * ‖u - half • (wq + wp)‖\neq₂ : ‖a‖ ≤ δ + div\neq₂' : ‖b‖ ≤ δ + div\n⊢ dist ↑(w p) ↑(w q) ≤ sqrt (b✝ N)\ncase h.right.right\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\n⊢ Tendsto (fun n => sqrt (b n)) atTop (𝓝 0)\n[PROOFSTEP]\nrw [dist_eq_norm]\n[GOAL]\ncase h.right.left\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis✝ : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb✝ : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\np q N : ℕ\nhp : N ≤ p\nhq : N ≤ q\nwp : F := ↑(w p)\nwq : F := ↑(w q)\na : F := u - wq\nb : F := u - wp\nhalf : ℝ := 1 / 2\ndiv : ℝ := 1 / (↑N + 1)\nthis : 4 * ‖u - half • (wq + wp)‖ * ‖u - half • (wq + wp)‖ + ‖wp - wq‖ * ‖wp - wq‖ = 2 * (‖a‖ * ‖a‖ + ‖b‖ * ‖b‖)\neq : δ ≤ ‖u - half • (wq + wp)‖\neq₁ : 4 * δ * δ ≤ 4 * ‖u - half • (wq + wp)‖ * ‖u - half • (wq + wp)‖\neq₂ : ‖a‖ ≤ δ + div\neq₂' : ‖b‖ ≤ δ + div\n⊢ ‖↑(w p) - ↑(w q)‖ ≤ sqrt (b✝ N)\ncase h.right.right\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\n⊢ Tendsto (fun n => sqrt (b n)) atTop (𝓝 0)\n[PROOFSTEP]\napply nonneg_le_nonneg_of_sq_le_sq\n[GOAL]\ncase h.right.left.hb\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis✝ : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb✝ : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\np q N : ℕ\nhp : N ≤ p\nhq : N ≤ q\nwp : F := ↑(w p)\nwq : F := ↑(w q)\na : F := u - wq\nb : F := u - wp\nhalf : ℝ := 1 / 2\ndiv : ℝ := 1 / (↑N + 1)\nthis : 4 * ‖u - half • (wq + wp)‖ * ‖u - half • (wq + wp)‖ + ‖wp - wq‖ * ‖wp - wq‖ = 2 * (‖a‖ * ‖a‖ + ‖b‖ * ‖b‖)\neq : δ ≤ ‖u - half • (wq + wp)‖\neq₁ : 4 * δ * δ ≤ 4 * ‖u - half • (wq + wp)‖ * ‖u - half • (wq + wp)‖\neq₂ : ‖a‖ ≤ δ + div\neq₂' : ‖b‖ ≤ δ + div\n⊢ 0 ≤ sqrt (b✝ N)\n[PROOFSTEP]\nexact sqrt_nonneg _\n[GOAL]\ncase h.right.left.h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis✝ : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb✝ : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\np q N : ℕ\nhp : N ≤ p\nhq : N ≤ q\nwp : F := ↑(w p)\nwq : F := ↑(w q)\na : F := u - wq\nb : F := u - wp\nhalf : ℝ := 1 / 2\ndiv : ℝ := 1 / (↑N + 1)\nthis : 4 * ‖u - half • (wq + wp)‖ * ‖u - half • (wq + wp)‖ + ‖wp - wq‖ * ‖wp - wq‖ = 2 * (‖a‖ * ‖a‖ + ‖b‖ * ‖b‖)\neq : δ ≤ ‖u - half • (wq + wp)‖\neq₁ : 4 * δ * δ ≤ 4 * ‖u - half • (wq + wp)‖ * ‖u - half • (wq + wp)‖\neq₂ : ‖a‖ ≤ δ + div\neq₂' : ‖b‖ ≤ δ + div\n⊢ ‖↑(w p) - ↑(w q)‖ * ‖↑(w p) - ↑(w q)‖ ≤ sqrt (b✝ N) * sqrt (b✝ N)\ncase h.right.right\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\n⊢ Tendsto (fun n => sqrt (b n)) atTop (𝓝 0)\n[PROOFSTEP]\nrw [mul_self_sqrt]\n[GOAL]\ncase h.right.left.h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis✝ : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb✝ : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\np q N : ℕ\nhp : N ≤ p\nhq : N ≤ q\nwp : F := ↑(w p)\nwq : F := ↑(w q)\na : F := u - wq\nb : F := u - wp\nhalf : ℝ := 1 / 2\ndiv : ℝ := 1 / (↑N + 1)\nthis : 4 * ‖u - half • (wq + wp)‖ * ‖u - half • (wq + wp)‖ + ‖wp - wq‖ * ‖wp - wq‖ = 2 * (‖a‖ * ‖a‖ + ‖b‖ * ‖b‖)\neq : δ ≤ ‖u - half • (wq + wp)‖\neq₁ : 4 * δ * δ ≤ 4 * ‖u - half • (wq + wp)‖ * ‖u - half • (wq + wp)‖\neq₂ : ‖a‖ ≤ δ + div\neq₂' : ‖b‖ ≤ δ + div\n⊢ ‖↑(w p) - ↑(w q)‖ * ‖↑(w p) - ↑(w q)‖ ≤ b✝ N\ncase h.right.left.h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis✝ : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb✝ : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\np q N : ℕ\nhp : N ≤ p\nhq : N ≤ q\nwp : F := ↑(w p)\nwq : F := ↑(w q)\na : F := u - wq\nb : F := u - wp\nhalf : ℝ := 1 / 2\ndiv : ℝ := 1 / (↑N + 1)\nthis : 4 * ‖u - half • (wq + wp)‖ * ‖u - half • (wq + wp)‖ + ‖wp - wq‖ * ‖wp - wq‖ = 2 * (‖a‖ * ‖a‖ + ‖b‖ * ‖b‖)\neq : δ ≤ ‖u - half • (wq + wp)‖\neq₁ : 4 * δ * δ ≤ 4 * ‖u - half • (wq + wp)‖ * ‖u - half • (wq + wp)‖\neq₂ : ‖a‖ ≤ δ + div\neq₂' : ‖b‖ ≤ δ + div\n⊢ 0 ≤ b✝ N\ncase h.right.right\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\n⊢ Tendsto (fun n => sqrt (b n)) atTop (𝓝 0)\n[PROOFSTEP]\ncalc\n  ‖wp - wq‖ * ‖wp - wq‖ = 2 * (‖a‖ * ‖a‖ + ‖b‖ * ‖b‖) - 4 * ‖u - half • (wq + wp)‖ * ‖u - half • (wq + wp)‖ := by\n    simp [← this]\n  _ ≤ 2 * (‖a‖ * ‖a‖ + ‖b‖ * ‖b‖) - 4 * δ * δ := by gcongr\n  _ ≤ 2 * ((δ + div) * (δ + div) + (δ + div) * (δ + div)) - 4 * δ * δ := by gcongr\n  _ = 8 * δ * div + 4 * div * div := by ring\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis✝ : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb✝ : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\np q N : ℕ\nhp : N ≤ p\nhq : N ≤ q\nwp : F := ↑(w p)\nwq : F := ↑(w q)\na : F := u - wq\nb : F := u - wp\nhalf : ℝ := 1 / 2\ndiv : ℝ := 1 / (↑N + 1)\nthis : 4 * ‖u - half • (wq + wp)‖ * ‖u - half • (wq + wp)‖ + ‖wp - wq‖ * ‖wp - wq‖ = 2 * (‖a‖ * ‖a‖ + ‖b‖ * ‖b‖)\neq : δ ≤ ‖u - half • (wq + wp)‖\neq₁ : 4 * δ * δ ≤ 4 * ‖u - half • (wq + wp)‖ * ‖u - half • (wq + wp)‖\neq₂ : ‖a‖ ≤ δ + div\neq₂' : ‖b‖ ≤ δ + div\n⊢ ‖wp - wq‖ * ‖wp - wq‖ = 2 * (‖a‖ * ‖a‖ + ‖b‖ * ‖b‖) - 4 * ‖u - half • (wq + wp)‖ * ‖u - half • (wq + wp)‖\n[PROOFSTEP]\nsimp [← this]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis✝ : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb✝ : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\np q N : ℕ\nhp : N ≤ p\nhq : N ≤ q\nwp : F := ↑(w p)\nwq : F := ↑(w q)\na : F := u - wq\nb : F := u - wp\nhalf : ℝ := 1 / 2\ndiv : ℝ := 1 / (↑N + 1)\nthis : 4 * ‖u - half • (wq + wp)‖ * ‖u - half • (wq + wp)‖ + ‖wp - wq‖ * ‖wp - wq‖ = 2 * (‖a‖ * ‖a‖ + ‖b‖ * ‖b‖)\neq : δ ≤ ‖u - half • (wq + wp)‖\neq₁ : 4 * δ * δ ≤ 4 * ‖u - half • (wq + wp)‖ * ‖u - half • (wq + wp)‖\neq₂ : ‖a‖ ≤ δ + div\neq₂' : ‖b‖ ≤ δ + div\n⊢ 2 * (‖a‖ * ‖a‖ + ‖b‖ * ‖b‖) - 4 * ‖u - half • (wq + wp)‖ * ‖u - half • (wq + wp)‖ ≤\n    2 * (‖a‖ * ‖a‖ + ‖b‖ * ‖b‖) - 4 * δ * δ\n[PROOFSTEP]\ngcongr\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis✝ : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb✝ : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\np q N : ℕ\nhp : N ≤ p\nhq : N ≤ q\nwp : F := ↑(w p)\nwq : F := ↑(w q)\na : F := u - wq\nb : F := u - wp\nhalf : ℝ := 1 / 2\ndiv : ℝ := 1 / (↑N + 1)\nthis : 4 * ‖u - half • (wq + wp)‖ * ‖u - half • (wq + wp)‖ + ‖wp - wq‖ * ‖wp - wq‖ = 2 * (‖a‖ * ‖a‖ + ‖b‖ * ‖b‖)\neq : δ ≤ ‖u - half • (wq + wp)‖\neq₁ : 4 * δ * δ ≤ 4 * ‖u - half • (wq + wp)‖ * ‖u - half • (wq + wp)‖\neq₂ : ‖a‖ ≤ δ + div\neq₂' : ‖b‖ ≤ δ + div\n⊢ 2 * (‖a‖ * ‖a‖ + ‖b‖ * ‖b‖) - 4 * δ * δ ≤ 2 * ((δ + div) * (δ + div) + (δ + div) * (δ + div)) - 4 * δ * δ\n[PROOFSTEP]\ngcongr\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis✝ : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb✝ : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\np q N : ℕ\nhp : N ≤ p\nhq : N ≤ q\nwp : F := ↑(w p)\nwq : F := ↑(w q)\na : F := u - wq\nb : F := u - wp\nhalf : ℝ := 1 / 2\ndiv : ℝ := 1 / (↑N + 1)\nthis : 4 * ‖u - half • (wq + wp)‖ * ‖u - half • (wq + wp)‖ + ‖wp - wq‖ * ‖wp - wq‖ = 2 * (‖a‖ * ‖a‖ + ‖b‖ * ‖b‖)\neq : δ ≤ ‖u - half • (wq + wp)‖\neq₁ : 4 * δ * δ ≤ 4 * ‖u - half • (wq + wp)‖ * ‖u - half • (wq + wp)‖\neq₂ : ‖a‖ ≤ δ + div\neq₂' : ‖b‖ ≤ δ + div\n⊢ 2 * ((δ + div) * (δ + div) + (δ + div) * (δ + div)) - 4 * δ * δ = 8 * δ * div + 4 * div * div\n[PROOFSTEP]\nring\n[GOAL]\ncase h.right.left.h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis✝ : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb✝ : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\np q N : ℕ\nhp : N ≤ p\nhq : N ≤ q\nwp : F := ↑(w p)\nwq : F := ↑(w q)\na : F := u - wq\nb : F := u - wp\nhalf : ℝ := 1 / 2\ndiv : ℝ := 1 / (↑N + 1)\nthis : 4 * ‖u - half • (wq + wp)‖ * ‖u - half • (wq + wp)‖ + ‖wp - wq‖ * ‖wp - wq‖ = 2 * (‖a‖ * ‖a‖ + ‖b‖ * ‖b‖)\neq : δ ≤ ‖u - half • (wq + wp)‖\neq₁ : 4 * δ * δ ≤ 4 * ‖u - half • (wq + wp)‖ * ‖u - half • (wq + wp)‖\neq₂ : ‖a‖ ≤ δ + div\neq₂' : ‖b‖ ≤ δ + div\n⊢ 0 ≤ b✝ N\ncase h.right.right\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\n⊢ Tendsto (fun n => sqrt (b n)) atTop (𝓝 0)\n[PROOFSTEP]\npositivity\n  -- third goal : `Tendsto (fun (n : ℕ) => sqrt (b n)) atTop (𝓝 0)`\n[GOAL]\ncase h.right.right\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\n⊢ Tendsto (fun n => sqrt (b n)) atTop (𝓝 0)\n[PROOFSTEP]\napply Tendsto.comp (f := b) (g := sqrt)\n[GOAL]\ncase h.right.right.hg\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\n⊢ Tendsto sqrt ?m.169624 (𝓝 0)\n[PROOFSTEP]\nhave : Tendsto sqrt (nhds 0) (nhds (sqrt 0)) := continuous_sqrt.continuousAt\n[GOAL]\ncase h.right.right.hg\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis✝ : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\nthis : Tendsto sqrt (𝓝 0) (𝓝 (sqrt 0))\n⊢ Tendsto sqrt ?m.169624 (𝓝 0)\n[PROOFSTEP]\nconvert this\n[GOAL]\ncase h.e'_5.h.e'_3\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis✝ : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\nthis : Tendsto sqrt (𝓝 0) (𝓝 (sqrt 0))\n⊢ 0 = sqrt 0\n[PROOFSTEP]\nexact sqrt_zero.symm\n[GOAL]\ncase h.right.right.hf\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\n⊢ Tendsto b atTop (𝓝 0)\n[PROOFSTEP]\nhave eq₁ : Tendsto (fun n : ℕ => 8 * δ * (1 / (n + 1))) atTop (nhds (0 : ℝ)) :=\n  by\n  convert (@tendsto_const_nhds _ _ _ (8 * δ) _).mul tendsto_one_div_add_atTop_nhds_0_nat\n  simp only [mul_zero]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\n⊢ Tendsto (fun n => 8 * δ * (1 / (↑n + 1))) atTop (𝓝 0)\n[PROOFSTEP]\nconvert (@tendsto_const_nhds _ _ _ (8 * δ) _).mul tendsto_one_div_add_atTop_nhds_0_nat\n[GOAL]\ncase h.e'_5.h.e'_3\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\n⊢ 0 = 8 * δ * 0\n[PROOFSTEP]\nsimp only [mul_zero]\n[GOAL]\ncase h.right.right.hf\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\neq₁ : Tendsto (fun n => 8 * δ * (1 / (↑n + 1))) atTop (𝓝 0)\n⊢ Tendsto b atTop (𝓝 0)\n[PROOFSTEP]\nhave : Tendsto (fun n : ℕ => (4 : ℝ) * (1 / (n + 1))) atTop (nhds (0 : ℝ)) :=\n  by\n  convert (@tendsto_const_nhds _ _ _ (4 : ℝ) _).mul tendsto_one_div_add_atTop_nhds_0_nat\n  simp only [mul_zero]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\neq₁ : Tendsto (fun n => 8 * δ * (1 / (↑n + 1))) atTop (𝓝 0)\n⊢ Tendsto (fun n => 4 * (1 / (↑n + 1))) atTop (𝓝 0)\n[PROOFSTEP]\nconvert (@tendsto_const_nhds _ _ _ (4 : ℝ) _).mul tendsto_one_div_add_atTop_nhds_0_nat\n[GOAL]\ncase h.e'_5.h.e'_3\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\neq₁ : Tendsto (fun n => 8 * δ * (1 / (↑n + 1))) atTop (𝓝 0)\n⊢ 0 = 4 * 0\n[PROOFSTEP]\nsimp only [mul_zero]\n[GOAL]\ncase h.right.right.hf\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis✝ : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\neq₁ : Tendsto (fun n => 8 * δ * (1 / (↑n + 1))) atTop (𝓝 0)\nthis : Tendsto (fun n => 4 * (1 / (↑n + 1))) atTop (𝓝 0)\n⊢ Tendsto b atTop (𝓝 0)\n[PROOFSTEP]\nhave eq₂ : Tendsto (fun n : ℕ => (4 : ℝ) * (1 / (n + 1)) * (1 / (n + 1))) atTop (nhds (0 : ℝ)) :=\n  by\n  convert this.mul tendsto_one_div_add_atTop_nhds_0_nat\n  simp only [mul_zero]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis✝ : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\neq₁ : Tendsto (fun n => 8 * δ * (1 / (↑n + 1))) atTop (𝓝 0)\nthis : Tendsto (fun n => 4 * (1 / (↑n + 1))) atTop (𝓝 0)\n⊢ Tendsto (fun n => 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))) atTop (𝓝 0)\n[PROOFSTEP]\nconvert this.mul tendsto_one_div_add_atTop_nhds_0_nat\n[GOAL]\ncase h.e'_5.h.e'_3\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis✝ : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\neq₁ : Tendsto (fun n => 8 * δ * (1 / (↑n + 1))) atTop (𝓝 0)\nthis : Tendsto (fun n => 4 * (1 / (↑n + 1))) atTop (𝓝 0)\n⊢ 0 = 0 * 0\n[PROOFSTEP]\nsimp only [mul_zero]\n[GOAL]\ncase h.right.right.hf\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis✝ : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\neq₁ : Tendsto (fun n => 8 * δ * (1 / (↑n + 1))) atTop (𝓝 0)\nthis : Tendsto (fun n => 4 * (1 / (↑n + 1))) atTop (𝓝 0)\neq₂ : Tendsto (fun n => 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))) atTop (𝓝 0)\n⊢ Tendsto b atTop (𝓝 0)\n[PROOFSTEP]\nconvert eq₁.add eq₂\n[GOAL]\ncase h.e'_5.h.e'_3\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis✝ : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nb : ℕ → ℝ := fun n => 8 * δ * (1 / (↑n + 1)) + 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))\neq₁ : Tendsto (fun n => 8 * δ * (1 / (↑n + 1))) atTop (𝓝 0)\nthis : Tendsto (fun n => 4 * (1 / (↑n + 1))) atTop (𝓝 0)\neq₂ : Tendsto (fun n => 4 * (1 / (↑n + 1)) * (1 / (↑n + 1))) atTop (𝓝 0)\n⊢ 0 = 0 + 0\n[PROOFSTEP]\nsimp only [add_zero]\n  -- Step 3: By completeness of `K`, let `w : ℕ → K` converge to some `v : K`.\n    -- Prove that it satisfies all requirements.\n[GOAL]\ncase intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nseq_is_cauchy : CauchySeq fun n => ↑(w n)\n⊢ ∃ v, v ∈ K ∧ ‖u - v‖ = ⨅ (w : ↑K), ‖u - ↑w‖\n[PROOFSTEP]\nrcases cauchySeq_tendsto_of_isComplete h₁ (fun n => Subtype.mem _) seq_is_cauchy with ⟨v, hv, w_tendsto⟩\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nseq_is_cauchy : CauchySeq fun n => ↑(w n)\nv : F\nhv : v ∈ K\nw_tendsto : Tendsto (fun n => ↑(w n)) atTop (𝓝 v)\n⊢ ∃ v, v ∈ K ∧ ‖u - v‖ = ⨅ (w : ↑K), ‖u - ↑w‖\n[PROOFSTEP]\nuse v\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nseq_is_cauchy : CauchySeq fun n => ↑(w n)\nv : F\nhv : v ∈ K\nw_tendsto : Tendsto (fun n => ↑(w n)) atTop (𝓝 v)\n⊢ v ∈ K ∧ ‖u - v‖ = ⨅ (w : ↑K), ‖u - ↑w‖\n[PROOFSTEP]\nuse hv\n[GOAL]\ncase right\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nseq_is_cauchy : CauchySeq fun n => ↑(w n)\nv : F\nhv : v ∈ K\nw_tendsto : Tendsto (fun n => ↑(w n)) atTop (𝓝 v)\n⊢ ‖u - v‖ = ⨅ (w : ↑K), ‖u - ↑w‖\n[PROOFSTEP]\nhave h_cont : Continuous fun v => ‖u - v‖ :=\n  Continuous.comp continuous_norm (Continuous.sub continuous_const continuous_id)\n[GOAL]\ncase right\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nseq_is_cauchy : CauchySeq fun n => ↑(w n)\nv : F\nhv : v ∈ K\nw_tendsto : Tendsto (fun n => ↑(w n)) atTop (𝓝 v)\nh_cont : Continuous fun v => ‖u - v‖\n⊢ ‖u - v‖ = ⨅ (w : ↑K), ‖u - ↑w‖\n[PROOFSTEP]\nhave : Tendsto (fun n => ‖u - w n‖) atTop (nhds ‖u - v‖)\n[GOAL]\ncase this\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nseq_is_cauchy : CauchySeq fun n => ↑(w n)\nv : F\nhv : v ∈ K\nw_tendsto : Tendsto (fun n => ↑(w n)) atTop (𝓝 v)\nh_cont : Continuous fun v => ‖u - v‖\n⊢ Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 ‖u - v‖)\ncase right\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis✝ : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nseq_is_cauchy : CauchySeq fun n => ↑(w n)\nv : F\nhv : v ∈ K\nw_tendsto : Tendsto (fun n => ↑(w n)) atTop (𝓝 v)\nh_cont : Continuous fun v => ‖u - v‖\nthis : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 ‖u - v‖)\n⊢ ‖u - v‖ = ⨅ (w : ↑K), ‖u - ↑w‖\n[PROOFSTEP]\nconvert Tendsto.comp h_cont.continuousAt w_tendsto\n[GOAL]\ncase right\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nne : Set.Nonempty K\nh₁ : IsComplete K\nh₂ : Convex ℝ K\nu : F\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\nthis✝ : Nonempty ↑K := Set.Nonempty.to_subtype ne\nzero_le_δ : 0 ≤ δ\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nw : ℕ → ↑K\nhw : ∀ (n : ℕ), ‖u - ↑(w n)‖ < δ + 1 / (↑n + 1)\nnorm_tendsto : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 δ)\nseq_is_cauchy : CauchySeq fun n => ↑(w n)\nv : F\nhv : v ∈ K\nw_tendsto : Tendsto (fun n => ↑(w n)) atTop (𝓝 v)\nh_cont : Continuous fun v => ‖u - v‖\nthis : Tendsto (fun n => ‖u - ↑(w n)‖) atTop (𝓝 ‖u - v‖)\n⊢ ‖u - v‖ = ⨅ (w : ↑K), ‖u - ↑w‖\n[PROOFSTEP]\nexact tendsto_nhds_unique this norm_tendsto\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nh : Convex ℝ K\nu v : F\nhv : v ∈ K\n⊢ ‖u - v‖ = ⨅ (w : ↑K), ‖u - ↑w‖ ↔ ∀ (w : F), w ∈ K → inner (u - v) (w - v) ≤ 0\n[PROOFSTEP]\nletI : Nonempty K := ⟨⟨v, hv⟩⟩\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nh : Convex ℝ K\nu v : F\nhv : v ∈ K\nthis : Nonempty ↑K := Nonempty.intro { val := v, property := hv }\n⊢ ‖u - v‖ = ⨅ (w : ↑K), ‖u - ↑w‖ ↔ ∀ (w : F), w ∈ K → inner (u - v) (w - v) ≤ 0\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nh : Convex ℝ K\nu v : F\nhv : v ∈ K\nthis : Nonempty ↑K := Nonempty.intro { val := v, property := hv }\n⊢ ‖u - v‖ = ⨅ (w : ↑K), ‖u - ↑w‖ → ∀ (w : F), w ∈ K → inner (u - v) (w - v) ≤ 0\n[PROOFSTEP]\nintro eq w hw\n[GOAL]\ncase mp\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nh : Convex ℝ K\nu v : F\nhv : v ∈ K\nthis : Nonempty ↑K := Nonempty.intro { val := v, property := hv }\neq : ‖u - v‖ = ⨅ (w : ↑K), ‖u - ↑w‖\nw : F\nhw : w ∈ K\n⊢ inner (u - v) (w - v) ≤ 0\n[PROOFSTEP]\nlet δ := ⨅ w : K, ‖u - w‖\n[GOAL]\ncase mp\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nh : Convex ℝ K\nu v : F\nhv : v ∈ K\nthis : Nonempty ↑K := Nonempty.intro { val := v, property := hv }\neq : ‖u - v‖ = ⨅ (w : ↑K), ‖u - ↑w‖\nw : F\nhw : w ∈ K\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\n⊢ inner (u - v) (w - v) ≤ 0\n[PROOFSTEP]\nlet p := ⟪u - v, w - v⟫_ℝ\n[GOAL]\ncase mp\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nh : Convex ℝ K\nu v : F\nhv : v ∈ K\nthis : Nonempty ↑K := Nonempty.intro { val := v, property := hv }\neq : ‖u - v‖ = ⨅ (w : ↑K), ‖u - ↑w‖\nw : F\nhw : w ∈ K\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\np : ℝ := inner (u - v) (w - v)\n⊢ inner (u - v) (w - v) ≤ 0\n[PROOFSTEP]\nlet q := ‖w - v‖ ^ 2\n[GOAL]\ncase mp\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nh : Convex ℝ K\nu v : F\nhv : v ∈ K\nthis : Nonempty ↑K := Nonempty.intro { val := v, property := hv }\neq : ‖u - v‖ = ⨅ (w : ↑K), ‖u - ↑w‖\nw : F\nhw : w ∈ K\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\np : ℝ := inner (u - v) (w - v)\nq : ℝ := ‖w - v‖ ^ 2\n⊢ inner (u - v) (w - v) ≤ 0\n[PROOFSTEP]\nhave δ_le (w : K) : δ ≤ ‖u - w‖ := ciInf_le ⟨0, fun _ ⟨_, h⟩ => h ▸ norm_nonneg _⟩ _\n[GOAL]\ncase mp\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nh : Convex ℝ K\nu v : F\nhv : v ∈ K\nthis : Nonempty ↑K := Nonempty.intro { val := v, property := hv }\neq : ‖u - v‖ = ⨅ (w : ↑K), ‖u - ↑w‖\nw : F\nhw : w ∈ K\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\np : ℝ := inner (u - v) (w - v)\nq : ℝ := ‖w - v‖ ^ 2\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\n⊢ inner (u - v) (w - v) ≤ 0\n[PROOFSTEP]\nhave δ_le' (w) (hw : w ∈ K) : δ ≤ ‖u - w‖ := δ_le ⟨w, hw⟩\n[GOAL]\ncase mp\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nh : Convex ℝ K\nu v : F\nhv : v ∈ K\nthis : Nonempty ↑K := Nonempty.intro { val := v, property := hv }\neq : ‖u - v‖ = ⨅ (w : ↑K), ‖u - ↑w‖\nw : F\nhw : w ∈ K\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\np : ℝ := inner (u - v) (w - v)\nq : ℝ := ‖w - v‖ ^ 2\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\n⊢ inner (u - v) (w - v) ≤ 0\n[PROOFSTEP]\nhave (θ : ℝ) (hθ₁ : 0 < θ) (hθ₂ : θ ≤ 1) : 2 * p ≤ θ * q :=\n  by\n  have : ‖u - v‖ ^ 2 ≤ ‖u - v‖ ^ 2 - 2 * θ * ⟪u - v, w - v⟫_ℝ + θ * θ * ‖w - v‖ ^ 2 :=\n    calc\n      ‖u - v‖ ^ 2\n      _ ≤ ‖u - (θ • w + (1 - θ) • v)‖ ^ 2 := by\n        simp only [sq]; apply mul_self_le_mul_self (norm_nonneg _)\n        rw [eq]; apply δ_le'\n        apply h hw hv\n        exacts [le_of_lt hθ₁, sub_nonneg.2 hθ₂, add_sub_cancel'_right _ _]\n      _ = ‖u - v - θ • (w - v)‖ ^ 2 :=\n        by\n        have : u - (θ • w + (1 - θ) • v) = u - v - θ • (w - v) :=\n          by\n          rw [smul_sub, sub_smul, one_smul]\n          simp only [sub_eq_add_neg, add_comm, add_left_comm, add_assoc, neg_add_rev]\n        rw [this]\n      _ = ‖u - v‖ ^ 2 - 2 * θ * inner (u - v) (w - v) + θ * θ * ‖w - v‖ ^ 2 :=\n        by\n        rw [@norm_sub_sq ℝ, inner_smul_right, norm_smul]\n        simp only [sq]\n        show\n          ‖u - v‖ * ‖u - v‖ - 2 * (θ * inner (u - v) (w - v)) + absR θ * ‖w - v‖ * (absR θ * ‖w - v‖) =\n            ‖u - v‖ * ‖u - v‖ - 2 * θ * inner (u - v) (w - v) + θ * θ * (‖w - v‖ * ‖w - v‖)\n        rw [abs_of_pos hθ₁]; ring\n  have eq₁ :\n    ‖u - v‖ ^ 2 - 2 * θ * inner (u - v) (w - v) + θ * θ * ‖w - v‖ ^ 2 =\n      ‖u - v‖ ^ 2 + (θ * θ * ‖w - v‖ ^ 2 - 2 * θ * inner (u - v) (w - v)) :=\n    by abel\n  rw [eq₁, le_add_iff_nonneg_right] at this \n  have eq₂ : θ * θ * ‖w - v‖ ^ 2 - 2 * θ * inner (u - v) (w - v) = θ * (θ * ‖w - v‖ ^ 2 - 2 * inner (u - v) (w - v))\n  ring\n  rw [eq₂] at this \n  have := le_of_sub_nonneg (nonneg_of_mul_nonneg_right this hθ₁)\n  exact this\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nh : Convex ℝ K\nu v : F\nhv : v ∈ K\nthis : Nonempty ↑K := Nonempty.intro { val := v, property := hv }\neq : ‖u - v‖ = ⨅ (w : ↑K), ‖u - ↑w‖\nw : F\nhw : w ∈ K\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\np : ℝ := inner (u - v) (w - v)\nq : ℝ := ‖w - v‖ ^ 2\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nθ : ℝ\nhθ₁ : 0 < θ\nhθ₂ : θ ≤ 1\n⊢ 2 * p ≤ θ * q\n[PROOFSTEP]\nhave : ‖u - v‖ ^ 2 ≤ ‖u - v‖ ^ 2 - 2 * θ * ⟪u - v, w - v⟫_ℝ + θ * θ * ‖w - v‖ ^ 2 :=\n  calc\n    ‖u - v‖ ^ 2\n    _ ≤ ‖u - (θ • w + (1 - θ) • v)‖ ^ 2 := by\n      simp only [sq]; apply mul_self_le_mul_self (norm_nonneg _)\n      rw [eq]; apply δ_le'\n      apply h hw hv\n      exacts [le_of_lt hθ₁, sub_nonneg.2 hθ₂, add_sub_cancel'_right _ _]\n    _ = ‖u - v - θ • (w - v)‖ ^ 2 :=\n      by\n      have : u - (θ • w + (1 - θ) • v) = u - v - θ • (w - v) :=\n        by\n        rw [smul_sub, sub_smul, one_smul]\n        simp only [sub_eq_add_neg, add_comm, add_left_comm, add_assoc, neg_add_rev]\n      rw [this]\n    _ = ‖u - v‖ ^ 2 - 2 * θ * inner (u - v) (w - v) + θ * θ * ‖w - v‖ ^ 2 :=\n      by\n      rw [@norm_sub_sq ℝ, inner_smul_right, norm_smul]\n      simp only [sq]\n      show\n        ‖u - v‖ * ‖u - v‖ - 2 * (θ * inner (u - v) (w - v)) + absR θ * ‖w - v‖ * (absR θ * ‖w - v‖) =\n          ‖u - v‖ * ‖u - v‖ - 2 * θ * inner (u - v) (w - v) + θ * θ * (‖w - v‖ * ‖w - v‖)\n      rw [abs_of_pos hθ₁]; ring\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nh : Convex ℝ K\nu v : F\nhv : v ∈ K\nthis : Nonempty ↑K := Nonempty.intro { val := v, property := hv }\neq : ‖u - v‖ = ⨅ (w : ↑K), ‖u - ↑w‖\nw : F\nhw : w ∈ K\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\np : ℝ := inner (u - v) (w - v)\nq : ℝ := ‖w - v‖ ^ 2\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nθ : ℝ\nhθ₁ : 0 < θ\nhθ₂ : θ ≤ 1\n⊢ ‖u - v‖ ^ 2 ≤ ‖u - (θ • w + (1 - θ) • v)‖ ^ 2\n[PROOFSTEP]\nsimp only [sq]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nh : Convex ℝ K\nu v : F\nhv : v ∈ K\nthis : Nonempty ↑K := Nonempty.intro { val := v, property := hv }\neq : ‖u - v‖ = ⨅ (w : ↑K), ‖u - ↑w‖\nw : F\nhw : w ∈ K\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\np : ℝ := inner (u - v) (w - v)\nq : ℝ := ‖w - v‖ ^ 2\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nθ : ℝ\nhθ₁ : 0 < θ\nhθ₂ : θ ≤ 1\n⊢ ‖u - v‖ * ‖u - v‖ ≤ ‖u - (θ • w + (1 - θ) • v)‖ * ‖u - (θ • w + (1 - θ) • v)‖\n[PROOFSTEP]\napply mul_self_le_mul_self (norm_nonneg _)\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nh : Convex ℝ K\nu v : F\nhv : v ∈ K\nthis : Nonempty ↑K := Nonempty.intro { val := v, property := hv }\neq : ‖u - v‖ = ⨅ (w : ↑K), ‖u - ↑w‖\nw : F\nhw : w ∈ K\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\np : ℝ := inner (u - v) (w - v)\nq : ℝ := ‖w - v‖ ^ 2\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nθ : ℝ\nhθ₁ : 0 < θ\nhθ₂ : θ ≤ 1\n⊢ ‖u - v‖ ≤ ‖u - (θ • w + (1 - θ) • v)‖\n[PROOFSTEP]\nrw [eq]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nh : Convex ℝ K\nu v : F\nhv : v ∈ K\nthis : Nonempty ↑K := Nonempty.intro { val := v, property := hv }\neq : ‖u - v‖ = ⨅ (w : ↑K), ‖u - ↑w‖\nw : F\nhw : w ∈ K\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\np : ℝ := inner (u - v) (w - v)\nq : ℝ := ‖w - v‖ ^ 2\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nθ : ℝ\nhθ₁ : 0 < θ\nhθ₂ : θ ≤ 1\n⊢ ⨅ (w : ↑K), ‖u - ↑w‖ ≤ ‖u - (θ • w + (1 - θ) • v)‖\n[PROOFSTEP]\napply δ_le'\n[GOAL]\ncase hw\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nh : Convex ℝ K\nu v : F\nhv : v ∈ K\nthis : Nonempty ↑K := Nonempty.intro { val := v, property := hv }\neq : ‖u - v‖ = ⨅ (w : ↑K), ‖u - ↑w‖\nw : F\nhw : w ∈ K\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\np : ℝ := inner (u - v) (w - v)\nq : ℝ := ‖w - v‖ ^ 2\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nθ : ℝ\nhθ₁ : 0 < θ\nhθ₂ : θ ≤ 1\n⊢ θ • w + (1 - θ) • v ∈ K\n[PROOFSTEP]\napply h hw hv\n[GOAL]\ncase hw.a\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nh : Convex ℝ K\nu v : F\nhv : v ∈ K\nthis : Nonempty ↑K := Nonempty.intro { val := v, property := hv }\neq : ‖u - v‖ = ⨅ (w : ↑K), ‖u - ↑w‖\nw : F\nhw : w ∈ K\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\np : ℝ := inner (u - v) (w - v)\nq : ℝ := ‖w - v‖ ^ 2\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nθ : ℝ\nhθ₁ : 0 < θ\nhθ₂ : θ ≤ 1\n⊢ 0 ≤ θ\ncase hw.a\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nh : Convex ℝ K\nu v : F\nhv : v ∈ K\nthis : Nonempty ↑K := Nonempty.intro { val := v, property := hv }\neq : ‖u - v‖ = ⨅ (w : ↑K), ‖u - ↑w‖\nw : F\nhw : w ∈ K\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\np : ℝ := inner (u - v) (w - v)\nq : ℝ := ‖w - v‖ ^ 2\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nθ : ℝ\nhθ₁ : 0 < θ\nhθ₂ : θ ≤ 1\n⊢ 0 ≤ 1 - θ\ncase hw.a\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nh : Convex ℝ K\nu v : F\nhv : v ∈ K\nthis : Nonempty ↑K := Nonempty.intro { val := v, property := hv }\neq : ‖u - v‖ = ⨅ (w : ↑K), ‖u - ↑w‖\nw : F\nhw : w ∈ K\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\np : ℝ := inner (u - v) (w - v)\nq : ℝ := ‖w - v‖ ^ 2\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nθ : ℝ\nhθ₁ : 0 < θ\nhθ₂ : θ ≤ 1\n⊢ θ + (1 - θ) = 1\n[PROOFSTEP]\nexacts [le_of_lt hθ₁, sub_nonneg.2 hθ₂, add_sub_cancel'_right _ _]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nh : Convex ℝ K\nu v : F\nhv : v ∈ K\nthis : Nonempty ↑K := Nonempty.intro { val := v, property := hv }\neq : ‖u - v‖ = ⨅ (w : ↑K), ‖u - ↑w‖\nw : F\nhw : w ∈ K\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\np : ℝ := inner (u - v) (w - v)\nq : ℝ := ‖w - v‖ ^ 2\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nθ : ℝ\nhθ₁ : 0 < θ\nhθ₂ : θ ≤ 1\n⊢ ‖u - (θ • w + (1 - θ) • v)‖ ^ 2 = ‖u - v - θ • (w - v)‖ ^ 2\n[PROOFSTEP]\nhave : u - (θ • w + (1 - θ) • v) = u - v - θ • (w - v) :=\n  by\n  rw [smul_sub, sub_smul, one_smul]\n  simp only [sub_eq_add_neg, add_comm, add_left_comm, add_assoc, neg_add_rev]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nh : Convex ℝ K\nu v : F\nhv : v ∈ K\nthis : Nonempty ↑K := Nonempty.intro { val := v, property := hv }\neq : ‖u - v‖ = ⨅ (w : ↑K), ‖u - ↑w‖\nw : F\nhw : w ∈ K\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\np : ℝ := inner (u - v) (w - v)\nq : ℝ := ‖w - v‖ ^ 2\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nθ : ℝ\nhθ₁ : 0 < θ\nhθ₂ : θ ≤ 1\n⊢ u - (θ • w + (1 - θ) • v) = u - v - θ • (w - v)\n[PROOFSTEP]\nrw [smul_sub, sub_smul, one_smul]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nh : Convex ℝ K\nu v : F\nhv : v ∈ K\nthis : Nonempty ↑K := Nonempty.intro { val := v, property := hv }\neq : ‖u - v‖ = ⨅ (w : ↑K), ‖u - ↑w‖\nw : F\nhw : w ∈ K\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\np : ℝ := inner (u - v) (w - v)\nq : ℝ := ‖w - v‖ ^ 2\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nθ : ℝ\nhθ₁ : 0 < θ\nhθ₂ : θ ≤ 1\n⊢ u - (θ • w + (v - θ • v)) = u - v - (θ • w - θ • v)\n[PROOFSTEP]\nsimp only [sub_eq_add_neg, add_comm, add_left_comm, add_assoc, neg_add_rev]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nh : Convex ℝ K\nu v : F\nhv : v ∈ K\nthis✝ : Nonempty ↑K := Nonempty.intro { val := v, property := hv }\neq : ‖u - v‖ = ⨅ (w : ↑K), ‖u - ↑w‖\nw : F\nhw : w ∈ K\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\np : ℝ := inner (u - v) (w - v)\nq : ℝ := ‖w - v‖ ^ 2\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nθ : ℝ\nhθ₁ : 0 < θ\nhθ₂ : θ ≤ 1\nthis : u - (θ • w + (1 - θ) • v) = u - v - θ • (w - v)\n⊢ ‖u - (θ • w + (1 - θ) • v)‖ ^ 2 = ‖u - v - θ • (w - v)‖ ^ 2\n[PROOFSTEP]\nrw [this]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nh : Convex ℝ K\nu v : F\nhv : v ∈ K\nthis : Nonempty ↑K := Nonempty.intro { val := v, property := hv }\neq : ‖u - v‖ = ⨅ (w : ↑K), ‖u - ↑w‖\nw : F\nhw : w ∈ K\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\np : ℝ := inner (u - v) (w - v)\nq : ℝ := ‖w - v‖ ^ 2\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nθ : ℝ\nhθ₁ : 0 < θ\nhθ₂ : θ ≤ 1\n⊢ ‖u - v - θ • (w - v)‖ ^ 2 = ‖u - v‖ ^ 2 - 2 * θ * inner (u - v) (w - v) + θ * θ * ‖w - v‖ ^ 2\n[PROOFSTEP]\nrw [@norm_sub_sq ℝ, inner_smul_right, norm_smul]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nh : Convex ℝ K\nu v : F\nhv : v ∈ K\nthis : Nonempty ↑K := Nonempty.intro { val := v, property := hv }\neq : ‖u - v‖ = ⨅ (w : ↑K), ‖u - ↑w‖\nw : F\nhw : w ∈ K\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\np : ℝ := inner (u - v) (w - v)\nq : ℝ := ‖w - v‖ ^ 2\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nθ : ℝ\nhθ₁ : 0 < θ\nhθ₂ : θ ≤ 1\n⊢ ‖u - v‖ ^ 2 - 2 * ↑re (θ * inner (u - v) (w - v)) + (‖θ‖ * ‖w - v‖) ^ 2 =\n    ‖u - v‖ ^ 2 - 2 * θ * inner (u - v) (w - v) + θ * θ * ‖w - v‖ ^ 2\n[PROOFSTEP]\nsimp only [sq]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nh : Convex ℝ K\nu v : F\nhv : v ∈ K\nthis : Nonempty ↑K := Nonempty.intro { val := v, property := hv }\neq : ‖u - v‖ = ⨅ (w : ↑K), ‖u - ↑w‖\nw : F\nhw : w ∈ K\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\np : ℝ := inner (u - v) (w - v)\nq : ℝ := ‖w - v‖ ^ 2\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nθ : ℝ\nhθ₁ : 0 < θ\nhθ₂ : θ ≤ 1\n⊢ ‖u - v‖ * ‖u - v‖ - 2 * ↑re (θ * inner (u - v) (w - v)) + ‖θ‖ * ‖w - v‖ * (‖θ‖ * ‖w - v‖) =\n    ‖u - v‖ * ‖u - v‖ - 2 * θ * inner (u - v) (w - v) + θ * θ * (‖w - v‖ * ‖w - v‖)\n[PROOFSTEP]\nshow\n  ‖u - v‖ * ‖u - v‖ - 2 * (θ * inner (u - v) (w - v)) + absR θ * ‖w - v‖ * (absR θ * ‖w - v‖) =\n    ‖u - v‖ * ‖u - v‖ - 2 * θ * inner (u - v) (w - v) + θ * θ * (‖w - v‖ * ‖w - v‖)\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nh : Convex ℝ K\nu v : F\nhv : v ∈ K\nthis : Nonempty ↑K := Nonempty.intro { val := v, property := hv }\neq : ‖u - v‖ = ⨅ (w : ↑K), ‖u - ↑w‖\nw : F\nhw : w ∈ K\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\np : ℝ := inner (u - v) (w - v)\nq : ℝ := ‖w - v‖ ^ 2\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nθ : ℝ\nhθ₁ : 0 < θ\nhθ₂ : θ ≤ 1\n⊢ ‖u - v‖ * ‖u - v‖ - 2 * (θ * inner (u - v) (w - v)) + absR θ * ‖w - v‖ * (absR θ * ‖w - v‖) =\n    ‖u - v‖ * ‖u - v‖ - 2 * θ * inner (u - v) (w - v) + θ * θ * (‖w - v‖ * ‖w - v‖)\n[PROOFSTEP]\nrw [abs_of_pos hθ₁]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nh : Convex ℝ K\nu v : F\nhv : v ∈ K\nthis : Nonempty ↑K := Nonempty.intro { val := v, property := hv }\neq : ‖u - v‖ = ⨅ (w : ↑K), ‖u - ↑w‖\nw : F\nhw : w ∈ K\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\np : ℝ := inner (u - v) (w - v)\nq : ℝ := ‖w - v‖ ^ 2\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nθ : ℝ\nhθ₁ : 0 < θ\nhθ₂ : θ ≤ 1\n⊢ ‖u - v‖ * ‖u - v‖ - 2 * (θ * inner (u - v) (w - v)) + θ * ‖w - v‖ * (θ * ‖w - v‖) =\n    ‖u - v‖ * ‖u - v‖ - 2 * θ * inner (u - v) (w - v) + θ * θ * (‖w - v‖ * ‖w - v‖)\n[PROOFSTEP]\nring\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nh : Convex ℝ K\nu v : F\nhv : v ∈ K\nthis✝ : Nonempty ↑K := Nonempty.intro { val := v, property := hv }\neq : ‖u - v‖ = ⨅ (w : ↑K), ‖u - ↑w‖\nw : F\nhw : w ∈ K\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\np : ℝ := inner (u - v) (w - v)\nq : ℝ := ‖w - v‖ ^ 2\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nθ : ℝ\nhθ₁ : 0 < θ\nhθ₂ : θ ≤ 1\nthis : ‖u - v‖ ^ 2 ≤ ‖u - v‖ ^ 2 - 2 * θ * inner (u - v) (w - v) + θ * θ * ‖w - v‖ ^ 2\n⊢ 2 * p ≤ θ * q\n[PROOFSTEP]\nhave eq₁ :\n  ‖u - v‖ ^ 2 - 2 * θ * inner (u - v) (w - v) + θ * θ * ‖w - v‖ ^ 2 =\n    ‖u - v‖ ^ 2 + (θ * θ * ‖w - v‖ ^ 2 - 2 * θ * inner (u - v) (w - v)) :=\n  by abel\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nh : Convex ℝ K\nu v : F\nhv : v ∈ K\nthis✝ : Nonempty ↑K := Nonempty.intro { val := v, property := hv }\neq : ‖u - v‖ = ⨅ (w : ↑K), ‖u - ↑w‖\nw : F\nhw : w ∈ K\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\np : ℝ := inner (u - v) (w - v)\nq : ℝ := ‖w - v‖ ^ 2\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nθ : ℝ\nhθ₁ : 0 < θ\nhθ₂ : θ ≤ 1\nthis : ‖u - v‖ ^ 2 ≤ ‖u - v‖ ^ 2 - 2 * θ * inner (u - v) (w - v) + θ * θ * ‖w - v‖ ^ 2\n⊢ ‖u - v‖ ^ 2 - 2 * θ * inner (u - v) (w - v) + θ * θ * ‖w - v‖ ^ 2 =\n    ‖u - v‖ ^ 2 + (θ * θ * ‖w - v‖ ^ 2 - 2 * θ * inner (u - v) (w - v))\n[PROOFSTEP]\nabel\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nh : Convex ℝ K\nu v : F\nhv : v ∈ K\nthis✝ : Nonempty ↑K := Nonempty.intro { val := v, property := hv }\neq : ‖u - v‖ = ⨅ (w : ↑K), ‖u - ↑w‖\nw : F\nhw : w ∈ K\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\np : ℝ := inner (u - v) (w - v)\nq : ℝ := ‖w - v‖ ^ 2\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nθ : ℝ\nhθ₁ : 0 < θ\nhθ₂ : θ ≤ 1\nthis : ‖u - v‖ ^ 2 ≤ ‖u - v‖ ^ 2 - 2 * θ * inner (u - v) (w - v) + θ * θ * ‖w - v‖ ^ 2\n⊢ ‖u - v‖ ^ 2 - 2 * θ * inner (u - v) (w - v) + θ * θ * ‖w - v‖ ^ 2 =\n    ‖u - v‖ ^ 2 + (θ * θ * ‖w - v‖ ^ 2 - 2 * θ * inner (u - v) (w - v))\n[PROOFSTEP]\nabel\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nh : Convex ℝ K\nu v : F\nhv : v ∈ K\nthis✝ : Nonempty ↑K := Nonempty.intro { val := v, property := hv }\neq : ‖u - v‖ = ⨅ (w : ↑K), ‖u - ↑w‖\nw : F\nhw : w ∈ K\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\np : ℝ := inner (u - v) (w - v)\nq : ℝ := ‖w - v‖ ^ 2\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nθ : ℝ\nhθ₁ : 0 < θ\nhθ₂ : θ ≤ 1\nthis : ‖u - v‖ ^ 2 ≤ ‖u - v‖ ^ 2 - 2 * θ * inner (u - v) (w - v) + θ * θ * ‖w - v‖ ^ 2\neq₁ :\n  ‖u - v‖ ^ 2 - 2 * θ * inner (u - v) (w - v) + θ * θ * ‖w - v‖ ^ 2 =\n    ‖u - v‖ ^ 2 + (θ * θ * ‖w - v‖ ^ 2 - 2 * θ * inner (u - v) (w - v))\n⊢ 2 * p ≤ θ * q\n[PROOFSTEP]\nrw [eq₁, le_add_iff_nonneg_right] at this \n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nh : Convex ℝ K\nu v : F\nhv : v ∈ K\nthis✝ : Nonempty ↑K := Nonempty.intro { val := v, property := hv }\neq : ‖u - v‖ = ⨅ (w : ↑K), ‖u - ↑w‖\nw : F\nhw : w ∈ K\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\np : ℝ := inner (u - v) (w - v)\nq : ℝ := ‖w - v‖ ^ 2\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nθ : ℝ\nhθ₁ : 0 < θ\nhθ₂ : θ ≤ 1\nthis : 0 ≤ θ * θ * ‖w - v‖ ^ 2 - 2 * θ * inner (u - v) (w - v)\neq₁ :\n  ‖u - v‖ ^ 2 - 2 * θ * inner (u - v) (w - v) + θ * θ * ‖w - v‖ ^ 2 =\n    ‖u - v‖ ^ 2 + (θ * θ * ‖w - v‖ ^ 2 - 2 * θ * inner (u - v) (w - v))\n⊢ 2 * p ≤ θ * q\n[PROOFSTEP]\nhave eq₂ : θ * θ * ‖w - v‖ ^ 2 - 2 * θ * inner (u - v) (w - v) = θ * (θ * ‖w - v‖ ^ 2 - 2 * inner (u - v) (w - v))\n[GOAL]\ncase eq₂\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nh : Convex ℝ K\nu v : F\nhv : v ∈ K\nthis✝ : Nonempty ↑K := Nonempty.intro { val := v, property := hv }\neq : ‖u - v‖ = ⨅ (w : ↑K), ‖u - ↑w‖\nw : F\nhw : w ∈ K\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\np : ℝ := inner (u - v) (w - v)\nq : ℝ := ‖w - v‖ ^ 2\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nθ : ℝ\nhθ₁ : 0 < θ\nhθ₂ : θ ≤ 1\nthis : 0 ≤ θ * θ * ‖w - v‖ ^ 2 - 2 * θ * inner (u - v) (w - v)\neq₁ :\n  ‖u - v‖ ^ 2 - 2 * θ * inner (u - v) (w - v) + θ * θ * ‖w - v‖ ^ 2 =\n    ‖u - v‖ ^ 2 + (θ * θ * ‖w - v‖ ^ 2 - 2 * θ * inner (u - v) (w - v))\n⊢ θ * θ * ‖w - v‖ ^ 2 - 2 * θ * inner (u - v) (w - v) = θ * (θ * ‖w - v‖ ^ 2 - 2 * inner (u - v) (w - v))\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nh : Convex ℝ K\nu v : F\nhv : v ∈ K\nthis✝ : Nonempty ↑K := Nonempty.intro { val := v, property := hv }\neq : ‖u - v‖ = ⨅ (w : ↑K), ‖u - ↑w‖\nw : F\nhw : w ∈ K\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\np : ℝ := inner (u - v) (w - v)\nq : ℝ := ‖w - v‖ ^ 2\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nθ : ℝ\nhθ₁ : 0 < θ\nhθ₂ : θ ≤ 1\nthis : 0 ≤ θ * θ * ‖w - v‖ ^ 2 - 2 * θ * inner (u - v) (w - v)\neq₁ :\n  ‖u - v‖ ^ 2 - 2 * θ * inner (u - v) (w - v) + θ * θ * ‖w - v‖ ^ 2 =\n    ‖u - v‖ ^ 2 + (θ * θ * ‖w - v‖ ^ 2 - 2 * θ * inner (u - v) (w - v))\neq₂ : θ * θ * ‖w - v‖ ^ 2 - 2 * θ * inner (u - v) (w - v) = θ * (θ * ‖w - v‖ ^ 2 - 2 * inner (u - v) (w - v))\n⊢ 2 * p ≤ θ * q\n[PROOFSTEP]\nring\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nh : Convex ℝ K\nu v : F\nhv : v ∈ K\nthis✝ : Nonempty ↑K := Nonempty.intro { val := v, property := hv }\neq : ‖u - v‖ = ⨅ (w : ↑K), ‖u - ↑w‖\nw : F\nhw : w ∈ K\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\np : ℝ := inner (u - v) (w - v)\nq : ℝ := ‖w - v‖ ^ 2\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nθ : ℝ\nhθ₁ : 0 < θ\nhθ₂ : θ ≤ 1\nthis : 0 ≤ θ * θ * ‖w - v‖ ^ 2 - 2 * θ * inner (u - v) (w - v)\neq₁ :\n  ‖u - v‖ ^ 2 - 2 * θ * inner (u - v) (w - v) + θ * θ * ‖w - v‖ ^ 2 =\n    ‖u - v‖ ^ 2 + (θ * θ * ‖w - v‖ ^ 2 - 2 * θ * inner (u - v) (w - v))\neq₂ : θ * θ * ‖w - v‖ ^ 2 - 2 * θ * inner (u - v) (w - v) = θ * (θ * ‖w - v‖ ^ 2 - 2 * inner (u - v) (w - v))\n⊢ 2 * p ≤ θ * q\n[PROOFSTEP]\nrw [eq₂] at this \n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nh : Convex ℝ K\nu v : F\nhv : v ∈ K\nthis✝ : Nonempty ↑K := Nonempty.intro { val := v, property := hv }\neq : ‖u - v‖ = ⨅ (w : ↑K), ‖u - ↑w‖\nw : F\nhw : w ∈ K\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\np : ℝ := inner (u - v) (w - v)\nq : ℝ := ‖w - v‖ ^ 2\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nθ : ℝ\nhθ₁ : 0 < θ\nhθ₂ : θ ≤ 1\nthis : 0 ≤ θ * (θ * ‖w - v‖ ^ 2 - 2 * inner (u - v) (w - v))\neq₁ :\n  ‖u - v‖ ^ 2 - 2 * θ * inner (u - v) (w - v) + θ * θ * ‖w - v‖ ^ 2 =\n    ‖u - v‖ ^ 2 + (θ * θ * ‖w - v‖ ^ 2 - 2 * θ * inner (u - v) (w - v))\neq₂ : θ * θ * ‖w - v‖ ^ 2 - 2 * θ * inner (u - v) (w - v) = θ * (θ * ‖w - v‖ ^ 2 - 2 * inner (u - v) (w - v))\n⊢ 2 * p ≤ θ * q\n[PROOFSTEP]\nhave := le_of_sub_nonneg (nonneg_of_mul_nonneg_right this hθ₁)\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nh : Convex ℝ K\nu v : F\nhv : v ∈ K\nthis✝¹ : Nonempty ↑K := Nonempty.intro { val := v, property := hv }\neq : ‖u - v‖ = ⨅ (w : ↑K), ‖u - ↑w‖\nw : F\nhw : w ∈ K\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\np : ℝ := inner (u - v) (w - v)\nq : ℝ := ‖w - v‖ ^ 2\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nθ : ℝ\nhθ₁ : 0 < θ\nhθ₂ : θ ≤ 1\nthis✝ : 0 ≤ θ * (θ * ‖w - v‖ ^ 2 - 2 * inner (u - v) (w - v))\neq₁ :\n  ‖u - v‖ ^ 2 - 2 * θ * inner (u - v) (w - v) + θ * θ * ‖w - v‖ ^ 2 =\n    ‖u - v‖ ^ 2 + (θ * θ * ‖w - v‖ ^ 2 - 2 * θ * inner (u - v) (w - v))\neq₂ : θ * θ * ‖w - v‖ ^ 2 - 2 * θ * inner (u - v) (w - v) = θ * (θ * ‖w - v‖ ^ 2 - 2 * inner (u - v) (w - v))\nthis : 2 * inner (u - v) (w - v) ≤ θ * ‖w - v‖ ^ 2\n⊢ 2 * p ≤ θ * q\n[PROOFSTEP]\nexact this\n[GOAL]\ncase mp\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nh : Convex ℝ K\nu v : F\nhv : v ∈ K\nthis✝ : Nonempty ↑K := Nonempty.intro { val := v, property := hv }\neq : ‖u - v‖ = ⨅ (w : ↑K), ‖u - ↑w‖\nw : F\nhw : w ∈ K\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\np : ℝ := inner (u - v) (w - v)\nq : ℝ := ‖w - v‖ ^ 2\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nthis : ∀ (θ : ℝ), 0 < θ → θ ≤ 1 → 2 * p ≤ θ * q\n⊢ inner (u - v) (w - v) ≤ 0\n[PROOFSTEP]\nby_cases hq : q = 0\n[GOAL]\ncase pos\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nh : Convex ℝ K\nu v : F\nhv : v ∈ K\nthis✝ : Nonempty ↑K := Nonempty.intro { val := v, property := hv }\neq : ‖u - v‖ = ⨅ (w : ↑K), ‖u - ↑w‖\nw : F\nhw : w ∈ K\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\np : ℝ := inner (u - v) (w - v)\nq : ℝ := ‖w - v‖ ^ 2\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nthis : ∀ (θ : ℝ), 0 < θ → θ ≤ 1 → 2 * p ≤ θ * q\nhq : q = 0\n⊢ inner (u - v) (w - v) ≤ 0\n[PROOFSTEP]\nrw [hq] at this \n[GOAL]\ncase pos\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nh : Convex ℝ K\nu v : F\nhv : v ∈ K\nthis✝ : Nonempty ↑K := Nonempty.intro { val := v, property := hv }\neq : ‖u - v‖ = ⨅ (w : ↑K), ‖u - ↑w‖\nw : F\nhw : w ∈ K\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\np : ℝ := inner (u - v) (w - v)\nq : ℝ := ‖w - v‖ ^ 2\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nthis : ∀ (θ : ℝ), 0 < θ → θ ≤ 1 → 2 * p ≤ θ * 0\nhq : q = 0\n⊢ inner (u - v) (w - v) ≤ 0\n[PROOFSTEP]\nhave : p ≤ 0 := by\n  have := this (1 : ℝ) (by norm_num) (by norm_num)\n  linarith\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nh : Convex ℝ K\nu v : F\nhv : v ∈ K\nthis✝ : Nonempty ↑K := Nonempty.intro { val := v, property := hv }\neq : ‖u - v‖ = ⨅ (w : ↑K), ‖u - ↑w‖\nw : F\nhw : w ∈ K\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\np : ℝ := inner (u - v) (w - v)\nq : ℝ := ‖w - v‖ ^ 2\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nthis : ∀ (θ : ℝ), 0 < θ → θ ≤ 1 → 2 * p ≤ θ * 0\nhq : q = 0\n⊢ p ≤ 0\n[PROOFSTEP]\nhave := this (1 : ℝ) (by norm_num) (by norm_num)\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nh : Convex ℝ K\nu v : F\nhv : v ∈ K\nthis✝ : Nonempty ↑K := Nonempty.intro { val := v, property := hv }\neq : ‖u - v‖ = ⨅ (w : ↑K), ‖u - ↑w‖\nw : F\nhw : w ∈ K\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\np : ℝ := inner (u - v) (w - v)\nq : ℝ := ‖w - v‖ ^ 2\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nthis : ∀ (θ : ℝ), 0 < θ → θ ≤ 1 → 2 * p ≤ θ * 0\nhq : q = 0\n⊢ 0 < 1\n[PROOFSTEP]\nnorm_num\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nh : Convex ℝ K\nu v : F\nhv : v ∈ K\nthis✝ : Nonempty ↑K := Nonempty.intro { val := v, property := hv }\neq : ‖u - v‖ = ⨅ (w : ↑K), ‖u - ↑w‖\nw : F\nhw : w ∈ K\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\np : ℝ := inner (u - v) (w - v)\nq : ℝ := ‖w - v‖ ^ 2\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nthis : ∀ (θ : ℝ), 0 < θ → θ ≤ 1 → 2 * p ≤ θ * 0\nhq : q = 0\n⊢ 1 ≤ 1\n[PROOFSTEP]\nnorm_num\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nh : Convex ℝ K\nu v : F\nhv : v ∈ K\nthis✝¹ : Nonempty ↑K := Nonempty.intro { val := v, property := hv }\neq : ‖u - v‖ = ⨅ (w : ↑K), ‖u - ↑w‖\nw : F\nhw : w ∈ K\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\np : ℝ := inner (u - v) (w - v)\nq : ℝ := ‖w - v‖ ^ 2\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nthis✝ : ∀ (θ : ℝ), 0 < θ → θ ≤ 1 → 2 * p ≤ θ * 0\nhq : q = 0\nthis : 2 * p ≤ 1 * 0\n⊢ p ≤ 0\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase pos\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nh : Convex ℝ K\nu v : F\nhv : v ∈ K\nthis✝¹ : Nonempty ↑K := Nonempty.intro { val := v, property := hv }\neq : ‖u - v‖ = ⨅ (w : ↑K), ‖u - ↑w‖\nw : F\nhw : w ∈ K\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\np : ℝ := inner (u - v) (w - v)\nq : ℝ := ‖w - v‖ ^ 2\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nthis✝ : ∀ (θ : ℝ), 0 < θ → θ ≤ 1 → 2 * p ≤ θ * 0\nhq : q = 0\nthis : p ≤ 0\n⊢ inner (u - v) (w - v) ≤ 0\n[PROOFSTEP]\nexact this\n[GOAL]\ncase neg\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nh : Convex ℝ K\nu v : F\nhv : v ∈ K\nthis✝ : Nonempty ↑K := Nonempty.intro { val := v, property := hv }\neq : ‖u - v‖ = ⨅ (w : ↑K), ‖u - ↑w‖\nw : F\nhw : w ∈ K\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\np : ℝ := inner (u - v) (w - v)\nq : ℝ := ‖w - v‖ ^ 2\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nthis : ∀ (θ : ℝ), 0 < θ → θ ≤ 1 → 2 * p ≤ θ * q\nhq : ¬q = 0\n⊢ inner (u - v) (w - v) ≤ 0\n[PROOFSTEP]\nhave q_pos : 0 < q := lt_of_le_of_ne (sq_nonneg _) fun h ↦ hq h.symm\n[GOAL]\ncase neg\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nh : Convex ℝ K\nu v : F\nhv : v ∈ K\nthis✝ : Nonempty ↑K := Nonempty.intro { val := v, property := hv }\neq : ‖u - v‖ = ⨅ (w : ↑K), ‖u - ↑w‖\nw : F\nhw : w ∈ K\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\np : ℝ := inner (u - v) (w - v)\nq : ℝ := ‖w - v‖ ^ 2\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nthis : ∀ (θ : ℝ), 0 < θ → θ ≤ 1 → 2 * p ≤ θ * q\nhq : ¬q = 0\nq_pos : 0 < q\n⊢ inner (u - v) (w - v) ≤ 0\n[PROOFSTEP]\nby_contra hp\n[GOAL]\ncase neg\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nh : Convex ℝ K\nu v : F\nhv : v ∈ K\nthis✝ : Nonempty ↑K := Nonempty.intro { val := v, property := hv }\neq : ‖u - v‖ = ⨅ (w : ↑K), ‖u - ↑w‖\nw : F\nhw : w ∈ K\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\np : ℝ := inner (u - v) (w - v)\nq : ℝ := ‖w - v‖ ^ 2\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nthis : ∀ (θ : ℝ), 0 < θ → θ ≤ 1 → 2 * p ≤ θ * q\nhq : ¬q = 0\nq_pos : 0 < q\nhp : ¬inner (u - v) (w - v) ≤ 0\n⊢ False\n[PROOFSTEP]\nrw [not_le] at hp \n[GOAL]\ncase neg\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nh : Convex ℝ K\nu v : F\nhv : v ∈ K\nthis✝ : Nonempty ↑K := Nonempty.intro { val := v, property := hv }\neq : ‖u - v‖ = ⨅ (w : ↑K), ‖u - ↑w‖\nw : F\nhw : w ∈ K\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\np : ℝ := inner (u - v) (w - v)\nq : ℝ := ‖w - v‖ ^ 2\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nthis : ∀ (θ : ℝ), 0 < θ → θ ≤ 1 → 2 * p ≤ θ * q\nhq : ¬q = 0\nq_pos : 0 < q\nhp : 0 < inner (u - v) (w - v)\n⊢ False\n[PROOFSTEP]\nlet θ := min (1 : ℝ) (p / q)\n[GOAL]\ncase neg\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nh : Convex ℝ K\nu v : F\nhv : v ∈ K\nthis✝ : Nonempty ↑K := Nonempty.intro { val := v, property := hv }\neq : ‖u - v‖ = ⨅ (w : ↑K), ‖u - ↑w‖\nw : F\nhw : w ∈ K\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\np : ℝ := inner (u - v) (w - v)\nq : ℝ := ‖w - v‖ ^ 2\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nthis : ∀ (θ : ℝ), 0 < θ → θ ≤ 1 → 2 * p ≤ θ * q\nhq : ¬q = 0\nq_pos : 0 < q\nhp : 0 < inner (u - v) (w - v)\nθ : ℝ := min 1 (p / q)\n⊢ False\n[PROOFSTEP]\nhave eq₁ : θ * q ≤ p :=\n  calc\n    θ * q ≤ p / q * q := mul_le_mul_of_nonneg_right (min_le_right _ _) (sq_nonneg _)\n    _ = p := div_mul_cancel _ hq\n[GOAL]\ncase neg\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nh : Convex ℝ K\nu v : F\nhv : v ∈ K\nthis✝ : Nonempty ↑K := Nonempty.intro { val := v, property := hv }\neq : ‖u - v‖ = ⨅ (w : ↑K), ‖u - ↑w‖\nw : F\nhw : w ∈ K\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\np : ℝ := inner (u - v) (w - v)\nq : ℝ := ‖w - v‖ ^ 2\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nthis : ∀ (θ : ℝ), 0 < θ → θ ≤ 1 → 2 * p ≤ θ * q\nhq : ¬q = 0\nq_pos : 0 < q\nhp : 0 < inner (u - v) (w - v)\nθ : ℝ := min 1 (p / q)\neq₁ : θ * q ≤ p\n⊢ False\n[PROOFSTEP]\nhave : 2 * p ≤ p :=\n  calc\n    2 * p ≤ θ * q := by refine' this θ (lt_min (by norm_num) (div_pos hp q_pos)) (by norm_num)\n    _ ≤ p := eq₁\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nh : Convex ℝ K\nu v : F\nhv : v ∈ K\nthis✝ : Nonempty ↑K := Nonempty.intro { val := v, property := hv }\neq : ‖u - v‖ = ⨅ (w : ↑K), ‖u - ↑w‖\nw : F\nhw : w ∈ K\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\np : ℝ := inner (u - v) (w - v)\nq : ℝ := ‖w - v‖ ^ 2\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nthis : ∀ (θ : ℝ), 0 < θ → θ ≤ 1 → 2 * p ≤ θ * q\nhq : ¬q = 0\nq_pos : 0 < q\nhp : 0 < inner (u - v) (w - v)\nθ : ℝ := min 1 (p / q)\neq₁ : θ * q ≤ p\n⊢ 2 * p ≤ θ * q\n[PROOFSTEP]\nrefine' this θ (lt_min (by norm_num) (div_pos hp q_pos)) (by norm_num)\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nh : Convex ℝ K\nu v : F\nhv : v ∈ K\nthis✝ : Nonempty ↑K := Nonempty.intro { val := v, property := hv }\neq : ‖u - v‖ = ⨅ (w : ↑K), ‖u - ↑w‖\nw : F\nhw : w ∈ K\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\np : ℝ := inner (u - v) (w - v)\nq : ℝ := ‖w - v‖ ^ 2\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nthis : ∀ (θ : ℝ), 0 < θ → θ ≤ 1 → 2 * p ≤ θ * q\nhq : ¬q = 0\nq_pos : 0 < q\nhp : 0 < inner (u - v) (w - v)\nθ : ℝ := min 1 (p / q)\neq₁ : θ * q ≤ p\n⊢ 0 < 1\n[PROOFSTEP]\nnorm_num\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nh : Convex ℝ K\nu v : F\nhv : v ∈ K\nthis✝ : Nonempty ↑K := Nonempty.intro { val := v, property := hv }\neq : ‖u - v‖ = ⨅ (w : ↑K), ‖u - ↑w‖\nw : F\nhw : w ∈ K\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\np : ℝ := inner (u - v) (w - v)\nq : ℝ := ‖w - v‖ ^ 2\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nthis : ∀ (θ : ℝ), 0 < θ → θ ≤ 1 → 2 * p ≤ θ * q\nhq : ¬q = 0\nq_pos : 0 < q\nhp : 0 < inner (u - v) (w - v)\nθ : ℝ := min 1 (p / q)\neq₁ : θ * q ≤ p\n⊢ θ ≤ 1\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase neg\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nh : Convex ℝ K\nu v : F\nhv : v ∈ K\nthis✝¹ : Nonempty ↑K := Nonempty.intro { val := v, property := hv }\neq : ‖u - v‖ = ⨅ (w : ↑K), ‖u - ↑w‖\nw : F\nhw : w ∈ K\nδ : ℝ := ⨅ (w : ↑K), ‖u - ↑w‖\np : ℝ := inner (u - v) (w - v)\nq : ℝ := ‖w - v‖ ^ 2\nδ_le : ∀ (w : ↑K), δ ≤ ‖u - ↑w‖\nδ_le' : ∀ (w : F), w ∈ K → δ ≤ ‖u - w‖\nthis✝ : ∀ (θ : ℝ), 0 < θ → θ ≤ 1 → 2 * p ≤ θ * q\nhq : ¬q = 0\nq_pos : 0 < q\nhp : 0 < inner (u - v) (w - v)\nθ : ℝ := min 1 (p / q)\neq₁ : θ * q ≤ p\nthis : 2 * p ≤ p\n⊢ False\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase mpr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nh : Convex ℝ K\nu v : F\nhv : v ∈ K\nthis : Nonempty ↑K := Nonempty.intro { val := v, property := hv }\n⊢ (∀ (w : F), w ∈ K → inner (u - v) (w - v) ≤ 0) → ‖u - v‖ = ⨅ (w : ↑K), ‖u - ↑w‖\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nh✝ : Convex ℝ K\nu v : F\nhv : v ∈ K\nthis : Nonempty ↑K := Nonempty.intro { val := v, property := hv }\nh : ∀ (w : F), w ∈ K → inner (u - v) (w - v) ≤ 0\n⊢ ‖u - v‖ = ⨅ (w : ↑K), ‖u - ↑w‖\n[PROOFSTEP]\napply le_antisymm\n[GOAL]\ncase mpr.a\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nh✝ : Convex ℝ K\nu v : F\nhv : v ∈ K\nthis : Nonempty ↑K := Nonempty.intro { val := v, property := hv }\nh : ∀ (w : F), w ∈ K → inner (u - v) (w - v) ≤ 0\n⊢ ‖u - v‖ ≤ ⨅ (w : ↑K), ‖u - ↑w‖\n[PROOFSTEP]\napply le_ciInf\n[GOAL]\ncase mpr.a.H\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nh✝ : Convex ℝ K\nu v : F\nhv : v ∈ K\nthis : Nonempty ↑K := Nonempty.intro { val := v, property := hv }\nh : ∀ (w : F), w ∈ K → inner (u - v) (w - v) ≤ 0\n⊢ ∀ (x : ↑K), ‖u - v‖ ≤ ‖u - ↑x‖\n[PROOFSTEP]\nintro w\n[GOAL]\ncase mpr.a.H\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nh✝ : Convex ℝ K\nu v : F\nhv : v ∈ K\nthis : Nonempty ↑K := Nonempty.intro { val := v, property := hv }\nh : ∀ (w : F), w ∈ K → inner (u - v) (w - v) ≤ 0\nw : ↑K\n⊢ ‖u - v‖ ≤ ‖u - ↑w‖\n[PROOFSTEP]\napply nonneg_le_nonneg_of_sq_le_sq (norm_nonneg _)\n[GOAL]\ncase mpr.a.H\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nh✝ : Convex ℝ K\nu v : F\nhv : v ∈ K\nthis : Nonempty ↑K := Nonempty.intro { val := v, property := hv }\nh : ∀ (w : F), w ∈ K → inner (u - v) (w - v) ≤ 0\nw : ↑K\n⊢ ‖u - v‖ * ‖u - v‖ ≤ ‖u - ↑w‖ * ‖u - ↑w‖\n[PROOFSTEP]\nhave := h w w.2\n[GOAL]\ncase mpr.a.H\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nh✝ : Convex ℝ K\nu v : F\nhv : v ∈ K\nthis✝ : Nonempty ↑K := Nonempty.intro { val := v, property := hv }\nh : ∀ (w : F), w ∈ K → inner (u - v) (w - v) ≤ 0\nw : ↑K\nthis : inner (u - v) (↑w - v) ≤ 0\n⊢ ‖u - v‖ * ‖u - v‖ ≤ ‖u - ↑w‖ * ‖u - ↑w‖\n[PROOFSTEP]\ncalc\n  ‖u - v‖ * ‖u - v‖ ≤ ‖u - v‖ * ‖u - v‖ - 2 * inner (u - v) ((w : F) - v) := by linarith\n  _ ≤ ‖u - v‖ ^ 2 - 2 * inner (u - v) ((w : F) - v) + ‖(w : F) - v‖ ^ 2 :=\n    by\n    rw [sq]\n    refine' le_add_of_nonneg_right _\n    exact sq_nonneg _\n  _ = ‖u - v - (w - v)‖ ^ 2 := (@norm_sub_sq ℝ _ _ _ _ _ _).symm\n  _ = ‖u - w‖ * ‖u - w‖ := by\n    have : u - v - (w - v) = u - w := by abel\n    rw [this, sq]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nh✝ : Convex ℝ K\nu v : F\nhv : v ∈ K\nthis✝ : Nonempty ↑K := Nonempty.intro { val := v, property := hv }\nh : ∀ (w : F), w ∈ K → inner (u - v) (w - v) ≤ 0\nw : ↑K\nthis : inner (u - v) (↑w - v) ≤ 0\n⊢ ‖u - v‖ * ‖u - v‖ ≤ ‖u - v‖ * ‖u - v‖ - 2 * inner (u - v) (↑w - v)\n[PROOFSTEP]\nlinarith\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nh✝ : Convex ℝ K\nu v : F\nhv : v ∈ K\nthis✝ : Nonempty ↑K := Nonempty.intro { val := v, property := hv }\nh : ∀ (w : F), w ∈ K → inner (u - v) (w - v) ≤ 0\nw : ↑K\nthis : inner (u - v) (↑w - v) ≤ 0\n⊢ ‖u - v‖ * ‖u - v‖ - 2 * inner (u - v) (↑w - v) ≤ ‖u - v‖ ^ 2 - 2 * inner (u - v) (↑w - v) + ‖↑w - v‖ ^ 2\n[PROOFSTEP]\nrw [sq]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nh✝ : Convex ℝ K\nu v : F\nhv : v ∈ K\nthis✝ : Nonempty ↑K := Nonempty.intro { val := v, property := hv }\nh : ∀ (w : F), w ∈ K → inner (u - v) (w - v) ≤ 0\nw : ↑K\nthis : inner (u - v) (↑w - v) ≤ 0\n⊢ ‖u - v‖ * ‖u - v‖ - 2 * inner (u - v) (↑w - v) ≤ ‖u - v‖ * ‖u - v‖ - 2 * inner (u - v) (↑w - v) + ‖↑w - v‖ ^ 2\n[PROOFSTEP]\nrefine' le_add_of_nonneg_right _\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nh✝ : Convex ℝ K\nu v : F\nhv : v ∈ K\nthis✝ : Nonempty ↑K := Nonempty.intro { val := v, property := hv }\nh : ∀ (w : F), w ∈ K → inner (u - v) (w - v) ≤ 0\nw : ↑K\nthis : inner (u - v) (↑w - v) ≤ 0\n⊢ 0 ≤ ‖↑w - v‖ ^ 2\n[PROOFSTEP]\nexact sq_nonneg _\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nh✝ : Convex ℝ K\nu v : F\nhv : v ∈ K\nthis✝ : Nonempty ↑K := Nonempty.intro { val := v, property := hv }\nh : ∀ (w : F), w ∈ K → inner (u - v) (w - v) ≤ 0\nw : ↑K\nthis : inner (u - v) (↑w - v) ≤ 0\n⊢ ‖u - v - (↑w - v)‖ ^ 2 = ‖u - ↑w‖ * ‖u - ↑w‖\n[PROOFSTEP]\nhave : u - v - (w - v) = u - w := by abel\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nh✝ : Convex ℝ K\nu v : F\nhv : v ∈ K\nthis✝ : Nonempty ↑K := Nonempty.intro { val := v, property := hv }\nh : ∀ (w : F), w ∈ K → inner (u - v) (w - v) ≤ 0\nw : ↑K\nthis : inner (u - v) (↑w - v) ≤ 0\n⊢ u - v - (↑w - v) = u - ↑w\n[PROOFSTEP]\nabel\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nh✝ : Convex ℝ K\nu v : F\nhv : v ∈ K\nthis✝ : Nonempty ↑K := Nonempty.intro { val := v, property := hv }\nh : ∀ (w : F), w ∈ K → inner (u - v) (w - v) ≤ 0\nw : ↑K\nthis : inner (u - v) (↑w - v) ≤ 0\n⊢ u - v - (↑w - v) = u - ↑w\n[PROOFSTEP]\nabel\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nh✝ : Convex ℝ K\nu v : F\nhv : v ∈ K\nthis✝¹ : Nonempty ↑K := Nonempty.intro { val := v, property := hv }\nh : ∀ (w : F), w ∈ K → inner (u - v) (w - v) ≤ 0\nw : ↑K\nthis✝ : inner (u - v) (↑w - v) ≤ 0\nthis : u - v - (↑w - v) = u - ↑w\n⊢ ‖u - v - (↑w - v)‖ ^ 2 = ‖u - ↑w‖ * ‖u - ↑w‖\n[PROOFSTEP]\nrw [this, sq]\n[GOAL]\ncase mpr.a\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nh✝ : Convex ℝ K\nu v : F\nhv : v ∈ K\nthis : Nonempty ↑K := Nonempty.intro { val := v, property := hv }\nh : ∀ (w : F), w ∈ K → inner (u - v) (w - v) ≤ 0\n⊢ ⨅ (w : ↑K), ‖u - ↑w‖ ≤ ‖u - v‖\n[PROOFSTEP]\nshow ⨅ w : K, ‖u - w‖ ≤ (fun w : K => ‖u - w‖) ⟨v, hv⟩\n[GOAL]\ncase mpr.a\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nh✝ : Convex ℝ K\nu v : F\nhv : v ∈ K\nthis : Nonempty ↑K := Nonempty.intro { val := v, property := hv }\nh : ∀ (w : F), w ∈ K → inner (u - v) (w - v) ≤ 0\n⊢ ⨅ (w : ↑K), ‖u - ↑w‖ ≤ (fun w => ‖u - ↑w‖) { val := v, property := hv }\n[PROOFSTEP]\napply ciInf_le\n[GOAL]\ncase mpr.a.H\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nh✝ : Convex ℝ K\nu v : F\nhv : v ∈ K\nthis : Nonempty ↑K := Nonempty.intro { val := v, property := hv }\nh : ∀ (w : F), w ∈ K → inner (u - v) (w - v) ≤ 0\n⊢ BddBelow (Set.range fun w => ‖u - ↑w‖)\n[PROOFSTEP]\nuse 0\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nh✝ : Convex ℝ K\nu v : F\nhv : v ∈ K\nthis : Nonempty ↑K := Nonempty.intro { val := v, property := hv }\nh : ∀ (w : F), w ∈ K → inner (u - v) (w - v) ≤ 0\n⊢ 0 ∈ lowerBounds (Set.range fun w => ‖u - ↑w‖)\n[PROOFSTEP]\nrintro y ⟨z, rfl⟩\n[GOAL]\ncase h.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Set F\nh✝ : Convex ℝ K\nu v : F\nhv : v ∈ K\nthis : Nonempty ↑K := Nonempty.intro { val := v, property := hv }\nh : ∀ (w : F), w ∈ K → inner (u - v) (w - v) ≤ 0\nz : ↑K\n⊢ 0 ≤ (fun w => ‖u - ↑w‖) z\n[PROOFSTEP]\nexact norm_nonneg _\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nh : IsComplete ↑K\n⊢ ∀ (u : E), ∃ v, v ∈ K ∧ ‖u - v‖ = ⨅ (w : ↑↑K), ‖u - ↑w‖\n[PROOFSTEP]\nletI : InnerProductSpace ℝ E := InnerProductSpace.isROrCToReal 𝕜 E\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nh : IsComplete ↑K\nthis : InnerProductSpace ℝ E := InnerProductSpace.isROrCToReal 𝕜 E\n⊢ ∀ (u : E), ∃ v, v ∈ K ∧ ‖u - v‖ = ⨅ (w : ↑↑K), ‖u - ↑w‖\n[PROOFSTEP]\nletI : Module ℝ E := RestrictScalars.module ℝ 𝕜 E\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nh : IsComplete ↑K\nthis✝ : InnerProductSpace ℝ E := InnerProductSpace.isROrCToReal 𝕜 E\nthis : Module ℝ E := RestrictScalars.module ℝ 𝕜 E\n⊢ ∀ (u : E), ∃ v, v ∈ K ∧ ‖u - v‖ = ⨅ (w : ↑↑K), ‖u - ↑w‖\n[PROOFSTEP]\nlet K' : Submodule ℝ E := Submodule.restrictScalars ℝ K\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nh : IsComplete ↑K\nthis✝ : InnerProductSpace ℝ E := InnerProductSpace.isROrCToReal 𝕜 E\nthis : Module ℝ E := RestrictScalars.module ℝ 𝕜 E\nK' : Submodule ℝ E := Submodule.restrictScalars ℝ K\n⊢ ∀ (u : E), ∃ v, v ∈ K ∧ ‖u - v‖ = ⨅ (w : ↑↑K), ‖u - ↑w‖\n[PROOFSTEP]\nexact exists_norm_eq_iInf_of_complete_convex ⟨0, K'.zero_mem⟩ h K'.convex\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK✝ : Submodule 𝕜 E\nK : Submodule ℝ F\nu v : F\nhv : v ∈ K\n⊢ ‖u - v‖ = ⨅ (w : ↑↑K), ‖u - ↑w‖ → ∀ (w : F), w ∈ K → inner (u - v) w = 0\n[PROOFSTEP]\nintro h\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK✝ : Submodule 𝕜 E\nK : Submodule ℝ F\nu v : F\nhv : v ∈ K\nh : ‖u - v‖ = ⨅ (w : ↑↑K), ‖u - ↑w‖\n⊢ ∀ (w : F), w ∈ K → inner (u - v) w = 0\n[PROOFSTEP]\nhave h : ∀ w ∈ K, ⟪u - v, w - v⟫_ℝ ≤ 0 :=\n  by\n  rwa [norm_eq_iInf_iff_real_inner_le_zero] at h \n  exacts [K.convex, hv]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK✝ : Submodule 𝕜 E\nK : Submodule ℝ F\nu v : F\nhv : v ∈ K\nh : ‖u - v‖ = ⨅ (w : ↑↑K), ‖u - ↑w‖\n⊢ ∀ (w : F), w ∈ K → inner (u - v) (w - v) ≤ 0\n[PROOFSTEP]\nrwa [norm_eq_iInf_iff_real_inner_le_zero] at h \n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK✝ : Submodule 𝕜 E\nK : Submodule ℝ F\nu v : F\nhv : v ∈ K\nh : ‖u - v‖ = ⨅ (w : ↑↑K), ‖u - ↑w‖\n⊢ Convex ℝ ↑K\ncase hv\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK✝ : Submodule 𝕜 E\nK : Submodule ℝ F\nu v : F\nhv : v ∈ K\nh : ‖u - v‖ = ⨅ (w : ↑↑K), ‖u - ↑w‖\n⊢ v ∈ ↑K\n[PROOFSTEP]\nexacts [K.convex, hv]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK✝ : Submodule 𝕜 E\nK : Submodule ℝ F\nu v : F\nhv : v ∈ K\nh✝ : ‖u - v‖ = ⨅ (w : ↑↑K), ‖u - ↑w‖\nh : ∀ (w : F), w ∈ K → inner (u - v) (w - v) ≤ 0\n⊢ ∀ (w : F), w ∈ K → inner (u - v) w = 0\n[PROOFSTEP]\nintro w hw\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK✝ : Submodule 𝕜 E\nK : Submodule ℝ F\nu v : F\nhv : v ∈ K\nh✝ : ‖u - v‖ = ⨅ (w : ↑↑K), ‖u - ↑w‖\nh : ∀ (w : F), w ∈ K → inner (u - v) (w - v) ≤ 0\nw : F\nhw : w ∈ K\n⊢ inner (u - v) w = 0\n[PROOFSTEP]\nhave le : ⟪u - v, w⟫_ℝ ≤ 0\n[GOAL]\ncase le\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK✝ : Submodule 𝕜 E\nK : Submodule ℝ F\nu v : F\nhv : v ∈ K\nh✝ : ‖u - v‖ = ⨅ (w : ↑↑K), ‖u - ↑w‖\nh : ∀ (w : F), w ∈ K → inner (u - v) (w - v) ≤ 0\nw : F\nhw : w ∈ K\n⊢ inner (u - v) w ≤ 0\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK✝ : Submodule 𝕜 E\nK : Submodule ℝ F\nu v : F\nhv : v ∈ K\nh✝ : ‖u - v‖ = ⨅ (w : ↑↑K), ‖u - ↑w‖\nh : ∀ (w : F), w ∈ K → inner (u - v) (w - v) ≤ 0\nw : F\nhw : w ∈ K\nle : inner (u - v) w ≤ 0\n⊢ inner (u - v) w = 0\n[PROOFSTEP]\nlet w' := w + v\n[GOAL]\ncase le\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK✝ : Submodule 𝕜 E\nK : Submodule ℝ F\nu v : F\nhv : v ∈ K\nh✝ : ‖u - v‖ = ⨅ (w : ↑↑K), ‖u - ↑w‖\nh : ∀ (w : F), w ∈ K → inner (u - v) (w - v) ≤ 0\nw : F\nhw : w ∈ K\nw' : F := w + v\n⊢ inner (u - v) w ≤ 0\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK✝ : Submodule 𝕜 E\nK : Submodule ℝ F\nu v : F\nhv : v ∈ K\nh✝ : ‖u - v‖ = ⨅ (w : ↑↑K), ‖u - ↑w‖\nh : ∀ (w : F), w ∈ K → inner (u - v) (w - v) ≤ 0\nw : F\nhw : w ∈ K\nle : inner (u - v) w ≤ 0\n⊢ inner (u - v) w = 0\n[PROOFSTEP]\nhave : w' ∈ K := Submodule.add_mem _ hw hv\n[GOAL]\ncase le\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK✝ : Submodule 𝕜 E\nK : Submodule ℝ F\nu v : F\nhv : v ∈ K\nh✝ : ‖u - v‖ = ⨅ (w : ↑↑K), ‖u - ↑w‖\nh : ∀ (w : F), w ∈ K → inner (u - v) (w - v) ≤ 0\nw : F\nhw : w ∈ K\nw' : F := w + v\nthis : w' ∈ K\n⊢ inner (u - v) w ≤ 0\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK✝ : Submodule 𝕜 E\nK : Submodule ℝ F\nu v : F\nhv : v ∈ K\nh✝ : ‖u - v‖ = ⨅ (w : ↑↑K), ‖u - ↑w‖\nh : ∀ (w : F), w ∈ K → inner (u - v) (w - v) ≤ 0\nw : F\nhw : w ∈ K\nle : inner (u - v) w ≤ 0\n⊢ inner (u - v) w = 0\n[PROOFSTEP]\nhave h₁ := h w' this\n[GOAL]\ncase le\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK✝ : Submodule 𝕜 E\nK : Submodule ℝ F\nu v : F\nhv : v ∈ K\nh✝ : ‖u - v‖ = ⨅ (w : ↑↑K), ‖u - ↑w‖\nh : ∀ (w : F), w ∈ K → inner (u - v) (w - v) ≤ 0\nw : F\nhw : w ∈ K\nw' : F := w + v\nthis : w' ∈ K\nh₁ : inner (u - v) (w' - v) ≤ 0\n⊢ inner (u - v) w ≤ 0\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK✝ : Submodule 𝕜 E\nK : Submodule ℝ F\nu v : F\nhv : v ∈ K\nh✝ : ‖u - v‖ = ⨅ (w : ↑↑K), ‖u - ↑w‖\nh : ∀ (w : F), w ∈ K → inner (u - v) (w - v) ≤ 0\nw : F\nhw : w ∈ K\nle : inner (u - v) w ≤ 0\n⊢ inner (u - v) w = 0\n[PROOFSTEP]\nhave h₂ : w' - v = w\n[GOAL]\ncase h₂\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK✝ : Submodule 𝕜 E\nK : Submodule ℝ F\nu v : F\nhv : v ∈ K\nh✝ : ‖u - v‖ = ⨅ (w : ↑↑K), ‖u - ↑w‖\nh : ∀ (w : F), w ∈ K → inner (u - v) (w - v) ≤ 0\nw : F\nhw : w ∈ K\nw' : F := w + v\nthis : w' ∈ K\nh₁ : inner (u - v) (w' - v) ≤ 0\n⊢ w' - v = w\ncase le\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK✝ : Submodule 𝕜 E\nK : Submodule ℝ F\nu v : F\nhv : v ∈ K\nh✝ : ‖u - v‖ = ⨅ (w : ↑↑K), ‖u - ↑w‖\nh : ∀ (w : F), w ∈ K → inner (u - v) (w - v) ≤ 0\nw : F\nhw : w ∈ K\nw' : F := w + v\nthis : w' ∈ K\nh₁ : inner (u - v) (w' - v) ≤ 0\nh₂ : w' - v = w\n⊢ inner (u - v) w ≤ 0\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK✝ : Submodule 𝕜 E\nK : Submodule ℝ F\nu v : F\nhv : v ∈ K\nh✝ : ‖u - v‖ = ⨅ (w : ↑↑K), ‖u - ↑w‖\nh : ∀ (w : F), w ∈ K → inner (u - v) (w - v) ≤ 0\nw : F\nhw : w ∈ K\nle : inner (u - v) w ≤ 0\n⊢ inner (u - v) w = 0\n[PROOFSTEP]\nsimp only [add_neg_cancel_right, sub_eq_add_neg]\n[GOAL]\ncase le\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK✝ : Submodule 𝕜 E\nK : Submodule ℝ F\nu v : F\nhv : v ∈ K\nh✝ : ‖u - v‖ = ⨅ (w : ↑↑K), ‖u - ↑w‖\nh : ∀ (w : F), w ∈ K → inner (u - v) (w - v) ≤ 0\nw : F\nhw : w ∈ K\nw' : F := w + v\nthis : w' ∈ K\nh₁ : inner (u - v) (w' - v) ≤ 0\nh₂ : w' - v = w\n⊢ inner (u - v) w ≤ 0\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK✝ : Submodule 𝕜 E\nK : Submodule ℝ F\nu v : F\nhv : v ∈ K\nh✝ : ‖u - v‖ = ⨅ (w : ↑↑K), ‖u - ↑w‖\nh : ∀ (w : F), w ∈ K → inner (u - v) (w - v) ≤ 0\nw : F\nhw : w ∈ K\nle : inner (u - v) w ≤ 0\n⊢ inner (u - v) w = 0\n[PROOFSTEP]\nrw [h₂] at h₁ \n[GOAL]\ncase le\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK✝ : Submodule 𝕜 E\nK : Submodule ℝ F\nu v : F\nhv : v ∈ K\nh✝ : ‖u - v‖ = ⨅ (w : ↑↑K), ‖u - ↑w‖\nh : ∀ (w : F), w ∈ K → inner (u - v) (w - v) ≤ 0\nw : F\nhw : w ∈ K\nw' : F := w + v\nthis : w' ∈ K\nh₁ : inner (u - v) w ≤ 0\nh₂ : w' - v = w\n⊢ inner (u - v) w ≤ 0\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK✝ : Submodule 𝕜 E\nK : Submodule ℝ F\nu v : F\nhv : v ∈ K\nh✝ : ‖u - v‖ = ⨅ (w : ↑↑K), ‖u - ↑w‖\nh : ∀ (w : F), w ∈ K → inner (u - v) (w - v) ≤ 0\nw : F\nhw : w ∈ K\nle : inner (u - v) w ≤ 0\n⊢ inner (u - v) w = 0\n[PROOFSTEP]\nexact h₁\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK✝ : Submodule 𝕜 E\nK : Submodule ℝ F\nu v : F\nhv : v ∈ K\nh✝ : ‖u - v‖ = ⨅ (w : ↑↑K), ‖u - ↑w‖\nh : ∀ (w : F), w ∈ K → inner (u - v) (w - v) ≤ 0\nw : F\nhw : w ∈ K\nle : inner (u - v) w ≤ 0\n⊢ inner (u - v) w = 0\n[PROOFSTEP]\nhave ge : ⟪u - v, w⟫_ℝ ≥ 0\n[GOAL]\ncase ge\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK✝ : Submodule 𝕜 E\nK : Submodule ℝ F\nu v : F\nhv : v ∈ K\nh✝ : ‖u - v‖ = ⨅ (w : ↑↑K), ‖u - ↑w‖\nh : ∀ (w : F), w ∈ K → inner (u - v) (w - v) ≤ 0\nw : F\nhw : w ∈ K\nle : inner (u - v) w ≤ 0\n⊢ inner (u - v) w ≥ 0\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK✝ : Submodule 𝕜 E\nK : Submodule ℝ F\nu v : F\nhv : v ∈ K\nh✝ : ‖u - v‖ = ⨅ (w : ↑↑K), ‖u - ↑w‖\nh : ∀ (w : F), w ∈ K → inner (u - v) (w - v) ≤ 0\nw : F\nhw : w ∈ K\nle : inner (u - v) w ≤ 0\nge : inner (u - v) w ≥ 0\n⊢ inner (u - v) w = 0\n[PROOFSTEP]\nlet w'' := -w + v\n[GOAL]\ncase ge\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK✝ : Submodule 𝕜 E\nK : Submodule ℝ F\nu v : F\nhv : v ∈ K\nh✝ : ‖u - v‖ = ⨅ (w : ↑↑K), ‖u - ↑w‖\nh : ∀ (w : F), w ∈ K → inner (u - v) (w - v) ≤ 0\nw : F\nhw : w ∈ K\nle : inner (u - v) w ≤ 0\nw'' : F := -w + v\n⊢ inner (u - v) w ≥ 0\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK✝ : Submodule 𝕜 E\nK : Submodule ℝ F\nu v : F\nhv : v ∈ K\nh✝ : ‖u - v‖ = ⨅ (w : ↑↑K), ‖u - ↑w‖\nh : ∀ (w : F), w ∈ K → inner (u - v) (w - v) ≤ 0\nw : F\nhw : w ∈ K\nle : inner (u - v) w ≤ 0\nge : inner (u - v) w ≥ 0\n⊢ inner (u - v) w = 0\n[PROOFSTEP]\nhave : w'' ∈ K := Submodule.add_mem _ (Submodule.neg_mem _ hw) hv\n[GOAL]\ncase ge\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK✝ : Submodule 𝕜 E\nK : Submodule ℝ F\nu v : F\nhv : v ∈ K\nh✝ : ‖u - v‖ = ⨅ (w : ↑↑K), ‖u - ↑w‖\nh : ∀ (w : F), w ∈ K → inner (u - v) (w - v) ≤ 0\nw : F\nhw : w ∈ K\nle : inner (u - v) w ≤ 0\nw'' : F := -w + v\nthis : w'' ∈ K\n⊢ inner (u - v) w ≥ 0\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK✝ : Submodule 𝕜 E\nK : Submodule ℝ F\nu v : F\nhv : v ∈ K\nh✝ : ‖u - v‖ = ⨅ (w : ↑↑K), ‖u - ↑w‖\nh : ∀ (w : F), w ∈ K → inner (u - v) (w - v) ≤ 0\nw : F\nhw : w ∈ K\nle : inner (u - v) w ≤ 0\nge : inner (u - v) w ≥ 0\n⊢ inner (u - v) w = 0\n[PROOFSTEP]\nhave h₁ := h w'' this\n[GOAL]\ncase ge\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK✝ : Submodule 𝕜 E\nK : Submodule ℝ F\nu v : F\nhv : v ∈ K\nh✝ : ‖u - v‖ = ⨅ (w : ↑↑K), ‖u - ↑w‖\nh : ∀ (w : F), w ∈ K → inner (u - v) (w - v) ≤ 0\nw : F\nhw : w ∈ K\nle : inner (u - v) w ≤ 0\nw'' : F := -w + v\nthis : w'' ∈ K\nh₁ : inner (u - v) (w'' - v) ≤ 0\n⊢ inner (u - v) w ≥ 0\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK✝ : Submodule 𝕜 E\nK : Submodule ℝ F\nu v : F\nhv : v ∈ K\nh✝ : ‖u - v‖ = ⨅ (w : ↑↑K), ‖u - ↑w‖\nh : ∀ (w : F), w ∈ K → inner (u - v) (w - v) ≤ 0\nw : F\nhw : w ∈ K\nle : inner (u - v) w ≤ 0\nge : inner (u - v) w ≥ 0\n⊢ inner (u - v) w = 0\n[PROOFSTEP]\nhave h₂ : w'' - v = -w\n[GOAL]\ncase h₂\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK✝ : Submodule 𝕜 E\nK : Submodule ℝ F\nu v : F\nhv : v ∈ K\nh✝ : ‖u - v‖ = ⨅ (w : ↑↑K), ‖u - ↑w‖\nh : ∀ (w : F), w ∈ K → inner (u - v) (w - v) ≤ 0\nw : F\nhw : w ∈ K\nle : inner (u - v) w ≤ 0\nw'' : F := -w + v\nthis : w'' ∈ K\nh₁ : inner (u - v) (w'' - v) ≤ 0\n⊢ w'' - v = -w\ncase ge\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK✝ : Submodule 𝕜 E\nK : Submodule ℝ F\nu v : F\nhv : v ∈ K\nh✝ : ‖u - v‖ = ⨅ (w : ↑↑K), ‖u - ↑w‖\nh : ∀ (w : F), w ∈ K → inner (u - v) (w - v) ≤ 0\nw : F\nhw : w ∈ K\nle : inner (u - v) w ≤ 0\nw'' : F := -w + v\nthis : w'' ∈ K\nh₁ : inner (u - v) (w'' - v) ≤ 0\nh₂ : w'' - v = -w\n⊢ inner (u - v) w ≥ 0\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK✝ : Submodule 𝕜 E\nK : Submodule ℝ F\nu v : F\nhv : v ∈ K\nh✝ : ‖u - v‖ = ⨅ (w : ↑↑K), ‖u - ↑w‖\nh : ∀ (w : F), w ∈ K → inner (u - v) (w - v) ≤ 0\nw : F\nhw : w ∈ K\nle : inner (u - v) w ≤ 0\nge : inner (u - v) w ≥ 0\n⊢ inner (u - v) w = 0\n[PROOFSTEP]\nsimp only [neg_inj, add_neg_cancel_right, sub_eq_add_neg]\n[GOAL]\ncase ge\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK✝ : Submodule 𝕜 E\nK : Submodule ℝ F\nu v : F\nhv : v ∈ K\nh✝ : ‖u - v‖ = ⨅ (w : ↑↑K), ‖u - ↑w‖\nh : ∀ (w : F), w ∈ K → inner (u - v) (w - v) ≤ 0\nw : F\nhw : w ∈ K\nle : inner (u - v) w ≤ 0\nw'' : F := -w + v\nthis : w'' ∈ K\nh₁ : inner (u - v) (w'' - v) ≤ 0\nh₂ : w'' - v = -w\n⊢ inner (u - v) w ≥ 0\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK✝ : Submodule 𝕜 E\nK : Submodule ℝ F\nu v : F\nhv : v ∈ K\nh✝ : ‖u - v‖ = ⨅ (w : ↑↑K), ‖u - ↑w‖\nh : ∀ (w : F), w ∈ K → inner (u - v) (w - v) ≤ 0\nw : F\nhw : w ∈ K\nle : inner (u - v) w ≤ 0\nge : inner (u - v) w ≥ 0\n⊢ inner (u - v) w = 0\n[PROOFSTEP]\nrw [h₂, inner_neg_right] at h₁ \n[GOAL]\ncase ge\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK✝ : Submodule 𝕜 E\nK : Submodule ℝ F\nu v : F\nhv : v ∈ K\nh✝ : ‖u - v‖ = ⨅ (w : ↑↑K), ‖u - ↑w‖\nh : ∀ (w : F), w ∈ K → inner (u - v) (w - v) ≤ 0\nw : F\nhw : w ∈ K\nle : inner (u - v) w ≤ 0\nw'' : F := -w + v\nthis : w'' ∈ K\nh₁ : -inner (u - v) w ≤ 0\nh₂ : w'' - v = -w\n⊢ inner (u - v) w ≥ 0\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK✝ : Submodule 𝕜 E\nK : Submodule ℝ F\nu v : F\nhv : v ∈ K\nh✝ : ‖u - v‖ = ⨅ (w : ↑↑K), ‖u - ↑w‖\nh : ∀ (w : F), w ∈ K → inner (u - v) (w - v) ≤ 0\nw : F\nhw : w ∈ K\nle : inner (u - v) w ≤ 0\nge : inner (u - v) w ≥ 0\n⊢ inner (u - v) w = 0\n[PROOFSTEP]\nlinarith\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK✝ : Submodule 𝕜 E\nK : Submodule ℝ F\nu v : F\nhv : v ∈ K\nh✝ : ‖u - v‖ = ⨅ (w : ↑↑K), ‖u - ↑w‖\nh : ∀ (w : F), w ∈ K → inner (u - v) (w - v) ≤ 0\nw : F\nhw : w ∈ K\nle : inner (u - v) w ≤ 0\nge : inner (u - v) w ≥ 0\n⊢ inner (u - v) w = 0\n[PROOFSTEP]\nexact le_antisymm le ge\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK✝ : Submodule 𝕜 E\nK : Submodule ℝ F\nu v : F\nhv : v ∈ K\n⊢ (∀ (w : F), w ∈ K → inner (u - v) w = 0) → ‖u - v‖ = ⨅ (w : ↑↑K), ‖u - ↑w‖\n[PROOFSTEP]\nintro h\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK✝ : Submodule 𝕜 E\nK : Submodule ℝ F\nu v : F\nhv : v ∈ K\nh : ∀ (w : F), w ∈ K → inner (u - v) w = 0\n⊢ ‖u - v‖ = ⨅ (w : ↑↑K), ‖u - ↑w‖\n[PROOFSTEP]\nhave : ∀ w ∈ K, ⟪u - v, w - v⟫_ℝ ≤ 0\n[GOAL]\ncase this\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK✝ : Submodule 𝕜 E\nK : Submodule ℝ F\nu v : F\nhv : v ∈ K\nh : ∀ (w : F), w ∈ K → inner (u - v) w = 0\n⊢ ∀ (w : F), w ∈ K → inner (u - v) (w - v) ≤ 0\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK✝ : Submodule 𝕜 E\nK : Submodule ℝ F\nu v : F\nhv : v ∈ K\nh : ∀ (w : F), w ∈ K → inner (u - v) w = 0\nthis : ∀ (w : F), w ∈ K → inner (u - v) (w - v) ≤ 0\n⊢ ‖u - v‖ = ⨅ (w : ↑↑K), ‖u - ↑w‖\n[PROOFSTEP]\nintro w hw\n[GOAL]\ncase this\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK✝ : Submodule 𝕜 E\nK : Submodule ℝ F\nu v : F\nhv : v ∈ K\nh : ∀ (w : F), w ∈ K → inner (u - v) w = 0\nw : F\nhw : w ∈ K\n⊢ inner (u - v) (w - v) ≤ 0\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK✝ : Submodule 𝕜 E\nK : Submodule ℝ F\nu v : F\nhv : v ∈ K\nh : ∀ (w : F), w ∈ K → inner (u - v) w = 0\nthis : ∀ (w : F), w ∈ K → inner (u - v) (w - v) ≤ 0\n⊢ ‖u - v‖ = ⨅ (w : ↑↑K), ‖u - ↑w‖\n[PROOFSTEP]\nlet w' := w - v\n[GOAL]\ncase this\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK✝ : Submodule 𝕜 E\nK : Submodule ℝ F\nu v : F\nhv : v ∈ K\nh : ∀ (w : F), w ∈ K → inner (u - v) w = 0\nw : F\nhw : w ∈ K\nw' : F := w - v\n⊢ inner (u - v) (w - v) ≤ 0\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK✝ : Submodule 𝕜 E\nK : Submodule ℝ F\nu v : F\nhv : v ∈ K\nh : ∀ (w : F), w ∈ K → inner (u - v) w = 0\nthis : ∀ (w : F), w ∈ K → inner (u - v) (w - v) ≤ 0\n⊢ ‖u - v‖ = ⨅ (w : ↑↑K), ‖u - ↑w‖\n[PROOFSTEP]\nhave : w' ∈ K := Submodule.sub_mem _ hw hv\n[GOAL]\ncase this\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK✝ : Submodule 𝕜 E\nK : Submodule ℝ F\nu v : F\nhv : v ∈ K\nh : ∀ (w : F), w ∈ K → inner (u - v) w = 0\nw : F\nhw : w ∈ K\nw' : F := w - v\nthis : w' ∈ K\n⊢ inner (u - v) (w - v) ≤ 0\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK✝ : Submodule 𝕜 E\nK : Submodule ℝ F\nu v : F\nhv : v ∈ K\nh : ∀ (w : F), w ∈ K → inner (u - v) w = 0\nthis : ∀ (w : F), w ∈ K → inner (u - v) (w - v) ≤ 0\n⊢ ‖u - v‖ = ⨅ (w : ↑↑K), ‖u - ↑w‖\n[PROOFSTEP]\nhave h₁ := h w' this\n[GOAL]\ncase this\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK✝ : Submodule 𝕜 E\nK : Submodule ℝ F\nu v : F\nhv : v ∈ K\nh : ∀ (w : F), w ∈ K → inner (u - v) w = 0\nw : F\nhw : w ∈ K\nw' : F := w - v\nthis : w' ∈ K\nh₁ : inner (u - v) w' = 0\n⊢ inner (u - v) (w - v) ≤ 0\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK✝ : Submodule 𝕜 E\nK : Submodule ℝ F\nu v : F\nhv : v ∈ K\nh : ∀ (w : F), w ∈ K → inner (u - v) w = 0\nthis : ∀ (w : F), w ∈ K → inner (u - v) (w - v) ≤ 0\n⊢ ‖u - v‖ = ⨅ (w : ↑↑K), ‖u - ↑w‖\n[PROOFSTEP]\nexact le_of_eq h₁\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK✝ : Submodule 𝕜 E\nK : Submodule ℝ F\nu v : F\nhv : v ∈ K\nh : ∀ (w : F), w ∈ K → inner (u - v) w = 0\nthis : ∀ (w : F), w ∈ K → inner (u - v) (w - v) ≤ 0\n⊢ ‖u - v‖ = ⨅ (w : ↑↑K), ‖u - ↑w‖\n[PROOFSTEP]\nrwa [norm_eq_iInf_iff_real_inner_le_zero]\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK✝ : Submodule 𝕜 E\nK : Submodule ℝ F\nu v : F\nhv : v ∈ K\nh : ∀ (w : F), w ∈ K → inner (u - v) w = 0\nthis : ∀ (w : F), w ∈ K → inner (u - v) (w - v) ≤ 0\n⊢ Convex ℝ ↑K\ncase hv\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK✝ : Submodule 𝕜 E\nK : Submodule ℝ F\nu v : F\nhv : v ∈ K\nh : ∀ (w : F), w ∈ K → inner (u - v) w = 0\nthis : ∀ (w : F), w ∈ K → inner (u - v) (w - v) ≤ 0\n⊢ v ∈ ↑K\n[PROOFSTEP]\nexacts [Submodule.convex _, hv]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nu v : E\nhv : v ∈ K\n⊢ ‖u - v‖ = ⨅ (w : { x // x ∈ K }), ‖u - ↑w‖ ↔ ∀ (w : E), w ∈ K → inner (u - v) w = 0\n[PROOFSTEP]\nletI : InnerProductSpace ℝ E := InnerProductSpace.isROrCToReal 𝕜 E\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nu v : E\nhv : v ∈ K\nthis : InnerProductSpace ℝ E := InnerProductSpace.isROrCToReal 𝕜 E\n⊢ ‖u - v‖ = ⨅ (w : { x // x ∈ K }), ‖u - ↑w‖ ↔ ∀ (w : E), w ∈ K → inner (u - v) w = 0\n[PROOFSTEP]\nletI : Module ℝ E := RestrictScalars.module ℝ 𝕜 E\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nu v : E\nhv : v ∈ K\nthis✝ : InnerProductSpace ℝ E := InnerProductSpace.isROrCToReal 𝕜 E\nthis : Module ℝ E := RestrictScalars.module ℝ 𝕜 E\n⊢ ‖u - v‖ = ⨅ (w : { x // x ∈ K }), ‖u - ↑w‖ ↔ ∀ (w : E), w ∈ K → inner (u - v) w = 0\n[PROOFSTEP]\nlet K' : Submodule ℝ E := K.restrictScalars ℝ\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nu v : E\nhv : v ∈ K\nthis✝ : InnerProductSpace ℝ E := InnerProductSpace.isROrCToReal 𝕜 E\nthis : Module ℝ E := RestrictScalars.module ℝ 𝕜 E\nK' : Submodule ℝ E := Submodule.restrictScalars ℝ K\n⊢ ‖u - v‖ = ⨅ (w : { x // x ∈ K }), ‖u - ↑w‖ ↔ ∀ (w : E), w ∈ K → inner (u - v) w = 0\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nu v : E\nhv : v ∈ K\nthis✝ : InnerProductSpace ℝ E := InnerProductSpace.isROrCToReal 𝕜 E\nthis : Module ℝ E := RestrictScalars.module ℝ 𝕜 E\nK' : Submodule ℝ E := Submodule.restrictScalars ℝ K\n⊢ ‖u - v‖ = ⨅ (w : { x // x ∈ K }), ‖u - ↑w‖ → ∀ (w : E), w ∈ K → inner (u - v) w = 0\n[PROOFSTEP]\nintro H\n[GOAL]\ncase mp\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nu v : E\nhv : v ∈ K\nthis✝ : InnerProductSpace ℝ E := InnerProductSpace.isROrCToReal 𝕜 E\nthis : Module ℝ E := RestrictScalars.module ℝ 𝕜 E\nK' : Submodule ℝ E := Submodule.restrictScalars ℝ K\nH : ‖u - v‖ = ⨅ (w : { x // x ∈ K }), ‖u - ↑w‖\n⊢ ∀ (w : E), w ∈ K → inner (u - v) w = 0\n[PROOFSTEP]\nhave A : ∀ w ∈ K, re ⟪u - v, w⟫ = 0 := (norm_eq_iInf_iff_real_inner_eq_zero K' hv).1 H\n[GOAL]\ncase mp\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nu v : E\nhv : v ∈ K\nthis✝ : InnerProductSpace ℝ E := InnerProductSpace.isROrCToReal 𝕜 E\nthis : Module ℝ E := RestrictScalars.module ℝ 𝕜 E\nK' : Submodule ℝ E := Submodule.restrictScalars ℝ K\nH : ‖u - v‖ = ⨅ (w : { x // x ∈ K }), ‖u - ↑w‖\nA : ∀ (w : E), w ∈ K → ↑re (inner (u - v) w) = 0\n⊢ ∀ (w : E), w ∈ K → inner (u - v) w = 0\n[PROOFSTEP]\nintro w hw\n[GOAL]\ncase mp\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nu v : E\nhv : v ∈ K\nthis✝ : InnerProductSpace ℝ E := InnerProductSpace.isROrCToReal 𝕜 E\nthis : Module ℝ E := RestrictScalars.module ℝ 𝕜 E\nK' : Submodule ℝ E := Submodule.restrictScalars ℝ K\nH : ‖u - v‖ = ⨅ (w : { x // x ∈ K }), ‖u - ↑w‖\nA : ∀ (w : E), w ∈ K → ↑re (inner (u - v) w) = 0\nw : E\nhw : w ∈ K\n⊢ inner (u - v) w = 0\n[PROOFSTEP]\napply ext\n[GOAL]\ncase mp.hre\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nu v : E\nhv : v ∈ K\nthis✝ : InnerProductSpace ℝ E := InnerProductSpace.isROrCToReal 𝕜 E\nthis : Module ℝ E := RestrictScalars.module ℝ 𝕜 E\nK' : Submodule ℝ E := Submodule.restrictScalars ℝ K\nH : ‖u - v‖ = ⨅ (w : { x // x ∈ K }), ‖u - ↑w‖\nA : ∀ (w : E), w ∈ K → ↑re (inner (u - v) w) = 0\nw : E\nhw : w ∈ K\n⊢ ↑re (inner (u - v) w) = ↑re 0\n[PROOFSTEP]\nsimp [A w hw]\n[GOAL]\ncase mp.him\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nu v : E\nhv : v ∈ K\nthis✝ : InnerProductSpace ℝ E := InnerProductSpace.isROrCToReal 𝕜 E\nthis : Module ℝ E := RestrictScalars.module ℝ 𝕜 E\nK' : Submodule ℝ E := Submodule.restrictScalars ℝ K\nH : ‖u - v‖ = ⨅ (w : { x // x ∈ K }), ‖u - ↑w‖\nA : ∀ (w : E), w ∈ K → ↑re (inner (u - v) w) = 0\nw : E\nhw : w ∈ K\n⊢ ↑im (inner (u - v) w) = ↑im 0\n[PROOFSTEP]\nsymm\n[GOAL]\ncase mp.him\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nu v : E\nhv : v ∈ K\nthis✝ : InnerProductSpace ℝ E := InnerProductSpace.isROrCToReal 𝕜 E\nthis : Module ℝ E := RestrictScalars.module ℝ 𝕜 E\nK' : Submodule ℝ E := Submodule.restrictScalars ℝ K\nH : ‖u - v‖ = ⨅ (w : { x // x ∈ K }), ‖u - ↑w‖\nA : ∀ (w : E), w ∈ K → ↑re (inner (u - v) w) = 0\nw : E\nhw : w ∈ K\n⊢ ↑im 0 = ↑im (inner (u - v) w)\n[PROOFSTEP]\ncalc\n  im (0 : 𝕜) = 0 := im.map_zero\n  _ = re ⟪u - v, (-I : 𝕜) • w⟫ := (A _ (K.smul_mem (-I) hw)).symm\n  _ = re (-I * ⟪u - v, w⟫) := by rw [inner_smul_right]\n  _ = im ⟪u - v, w⟫ := by simp\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nu v : E\nhv : v ∈ K\nthis✝ : InnerProductSpace ℝ E := InnerProductSpace.isROrCToReal 𝕜 E\nthis : Module ℝ E := RestrictScalars.module ℝ 𝕜 E\nK' : Submodule ℝ E := Submodule.restrictScalars ℝ K\nH : ‖u - v‖ = ⨅ (w : { x // x ∈ K }), ‖u - ↑w‖\nA : ∀ (w : E), w ∈ K → ↑re (inner (u - v) w) = 0\nw : E\nhw : w ∈ K\n⊢ ↑re (inner (u - v) (-I • w)) = ↑re (-I * inner (u - v) w)\n[PROOFSTEP]\nrw [inner_smul_right]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nu v : E\nhv : v ∈ K\nthis✝ : InnerProductSpace ℝ E := InnerProductSpace.isROrCToReal 𝕜 E\nthis : Module ℝ E := RestrictScalars.module ℝ 𝕜 E\nK' : Submodule ℝ E := Submodule.restrictScalars ℝ K\nH : ‖u - v‖ = ⨅ (w : { x // x ∈ K }), ‖u - ↑w‖\nA : ∀ (w : E), w ∈ K → ↑re (inner (u - v) w) = 0\nw : E\nhw : w ∈ K\n⊢ ↑re (-I * inner (u - v) w) = ↑im (inner (u - v) w)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mpr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nu v : E\nhv : v ∈ K\nthis✝ : InnerProductSpace ℝ E := InnerProductSpace.isROrCToReal 𝕜 E\nthis : Module ℝ E := RestrictScalars.module ℝ 𝕜 E\nK' : Submodule ℝ E := Submodule.restrictScalars ℝ K\n⊢ (∀ (w : E), w ∈ K → inner (u - v) w = 0) → ‖u - v‖ = ⨅ (w : { x // x ∈ K }), ‖u - ↑w‖\n[PROOFSTEP]\nintro H\n[GOAL]\ncase mpr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nu v : E\nhv : v ∈ K\nthis✝ : InnerProductSpace ℝ E := InnerProductSpace.isROrCToReal 𝕜 E\nthis : Module ℝ E := RestrictScalars.module ℝ 𝕜 E\nK' : Submodule ℝ E := Submodule.restrictScalars ℝ K\nH : ∀ (w : E), w ∈ K → inner (u - v) w = 0\n⊢ ‖u - v‖ = ⨅ (w : { x // x ∈ K }), ‖u - ↑w‖\n[PROOFSTEP]\nhave : ∀ w ∈ K', ⟪u - v, w⟫_ℝ = 0 := by\n  intro w hw\n  rw [real_inner_eq_re_inner, H w hw]\n  exact zero_re'\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nu v : E\nhv : v ∈ K\nthis✝ : InnerProductSpace ℝ E := InnerProductSpace.isROrCToReal 𝕜 E\nthis : Module ℝ E := RestrictScalars.module ℝ 𝕜 E\nK' : Submodule ℝ E := Submodule.restrictScalars ℝ K\nH : ∀ (w : E), w ∈ K → inner (u - v) w = 0\n⊢ ∀ (w : E), w ∈ K' → inner (u - v) w = 0\n[PROOFSTEP]\nintro w hw\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nu v : E\nhv : v ∈ K\nthis✝ : InnerProductSpace ℝ E := InnerProductSpace.isROrCToReal 𝕜 E\nthis : Module ℝ E := RestrictScalars.module ℝ 𝕜 E\nK' : Submodule ℝ E := Submodule.restrictScalars ℝ K\nH : ∀ (w : E), w ∈ K → inner (u - v) w = 0\nw : E\nhw : w ∈ K'\n⊢ inner (u - v) w = 0\n[PROOFSTEP]\nrw [real_inner_eq_re_inner, H w hw]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nu v : E\nhv : v ∈ K\nthis✝ : InnerProductSpace ℝ E := InnerProductSpace.isROrCToReal 𝕜 E\nthis : Module ℝ E := RestrictScalars.module ℝ 𝕜 E\nK' : Submodule ℝ E := Submodule.restrictScalars ℝ K\nH : ∀ (w : E), w ∈ K → inner (u - v) w = 0\nw : E\nhw : w ∈ K'\n⊢ ↑re 0 = 0\n[PROOFSTEP]\nexact zero_re'\n[GOAL]\ncase mpr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nu v : E\nhv : v ∈ K\nthis✝¹ : InnerProductSpace ℝ E := InnerProductSpace.isROrCToReal 𝕜 E\nthis✝ : Module ℝ E := RestrictScalars.module ℝ 𝕜 E\nK' : Submodule ℝ E := Submodule.restrictScalars ℝ K\nH : ∀ (w : E), w ∈ K → inner (u - v) w = 0\nthis : ∀ (w : E), w ∈ K' → inner (u - v) w = 0\n⊢ ‖u - v‖ = ⨅ (w : { x // x ∈ K }), ‖u - ↑w‖\n[PROOFSTEP]\nexact (norm_eq_iInf_iff_real_inner_eq_zero K' hv).2 this\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : CompleteSpace { x // x ∈ K }\nv : E\n⊢ ∃ w, w ∈ K ∧ v - w ∈ Kᗮ\n[PROOFSTEP]\nrcases exists_norm_eq_iInf_of_complete_subspace K (completeSpace_coe_iff_isComplete.mp ‹_›) v with ⟨w, hwK, hw⟩\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : CompleteSpace { x // x ∈ K }\nv w : E\nhwK : w ∈ K\nhw : ‖v - w‖ = ⨅ (w : ↑↑K), ‖v - ↑w‖\n⊢ ∃ w, w ∈ K ∧ v - w ∈ Kᗮ\n[PROOFSTEP]\nrefine ⟨w, hwK, (K.mem_orthogonal' _).2 ?_⟩\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : CompleteSpace { x // x ∈ K }\nv w : E\nhwK : w ∈ K\nhw : ‖v - w‖ = ⨅ (w : ↑↑K), ‖v - ↑w‖\n⊢ ∀ (u : E), u ∈ K → inner (v - w) u = 0\n[PROOFSTEP]\nrwa [← norm_eq_iInf_iff_inner_eq_zero K hwK]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nv : E\n⊢ ∃ w, w ∈ Kᗮ ∧ v - w ∈ Kᗮᗮ\n[PROOFSTEP]\nrcases HasOrthogonalProjection.exists_orthogonal (K := K) v with ⟨w, hwK, hw⟩\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nv w : E\nhwK : w ∈ K\nhw : v - w ∈ Kᗮ\n⊢ ∃ w, w ∈ Kᗮ ∧ v - w ∈ Kᗮᗮ\n[PROOFSTEP]\nrefine ⟨_, hw, ?_⟩\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nv w : E\nhwK : w ∈ K\nhw : v - w ∈ Kᗮ\n⊢ v - (v - w) ∈ Kᗮᗮ\n[PROOFSTEP]\nrw [sub_sub_cancel]\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nv w : E\nhwK : w ∈ K\nhw : v - w ∈ Kᗮ\n⊢ w ∈ Kᗮᗮ\n[PROOFSTEP]\nexact K.le_orthogonal_orthogonal hwK\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝² : HasOrthogonalProjection K\nE' : Type u_4\ninst✝¹ : NormedAddCommGroup E'\ninst✝ : InnerProductSpace 𝕜 E'\nf : E ≃ₗᵢ[𝕜] E'\nv : E'\n⊢ ∃ w, w ∈ Submodule.map (↑f.toLinearEquiv) K ∧ v - w ∈ (Submodule.map (↑f.toLinearEquiv) K)ᗮ\n[PROOFSTEP]\nrcases HasOrthogonalProjection.exists_orthogonal (K := K) (f.symm v) with ⟨w, hwK, hw⟩\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝² : HasOrthogonalProjection K\nE' : Type u_4\ninst✝¹ : NormedAddCommGroup E'\ninst✝ : InnerProductSpace 𝕜 E'\nf : E ≃ₗᵢ[𝕜] E'\nv : E'\nw : E\nhwK : w ∈ K\nhw : ↑(LinearIsometryEquiv.symm f) v - w ∈ Kᗮ\n⊢ ∃ w, w ∈ Submodule.map (↑f.toLinearEquiv) K ∧ v - w ∈ (Submodule.map (↑f.toLinearEquiv) K)ᗮ\n[PROOFSTEP]\nrefine ⟨f w, Submodule.mem_map_of_mem hwK, Set.ball_image_iff.2 fun u hu ↦ ?_⟩\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝² : HasOrthogonalProjection K\nE' : Type u_4\ninst✝¹ : NormedAddCommGroup E'\ninst✝ : InnerProductSpace 𝕜 E'\nf : E ≃ₗᵢ[𝕜] E'\nv : E'\nw : E\nhwK : w ∈ K\nhw : ↑(LinearIsometryEquiv.symm f) v - w ∈ Kᗮ\nu : E\nhu : u ∈ ↑K\n⊢ inner (↑↑f.toLinearEquiv u) (v - ↑f w) = 0\n[PROOFSTEP]\nerw [← f.symm.inner_map_map, f.symm_apply_apply, map_sub, f.symm_apply_apply, hw u hu]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nv : E\n⊢ v - v ∈ ⊤ᗮ\n[PROOFSTEP]\nsimp\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nu v : E\nhvm : v ∈ K\nhvo : ∀ (w : E), w ∈ K → inner (u - v) w = 0\n⊢ orthogonalProjectionFn K u = v\n[PROOFSTEP]\nrw [← sub_eq_zero, ← @inner_self_eq_zero 𝕜]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nu v : E\nhvm : v ∈ K\nhvo : ∀ (w : E), w ∈ K → inner (u - v) w = 0\n⊢ inner (orthogonalProjectionFn K u - v) (orthogonalProjectionFn K u - v) = 0\n[PROOFSTEP]\nhave hvs : orthogonalProjectionFn K u - v ∈ K := Submodule.sub_mem K (orthogonalProjectionFn_mem u) hvm\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nu v : E\nhvm : v ∈ K\nhvo : ∀ (w : E), w ∈ K → inner (u - v) w = 0\nhvs : orthogonalProjectionFn K u - v ∈ K\n⊢ inner (orthogonalProjectionFn K u - v) (orthogonalProjectionFn K u - v) = 0\n[PROOFSTEP]\nhave huo : ⟪u - orthogonalProjectionFn K u, orthogonalProjectionFn K u - v⟫ = 0 :=\n  orthogonalProjectionFn_inner_eq_zero u _ hvs\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nu v : E\nhvm : v ∈ K\nhvo : ∀ (w : E), w ∈ K → inner (u - v) w = 0\nhvs : orthogonalProjectionFn K u - v ∈ K\nhuo : inner (u - orthogonalProjectionFn K u) (orthogonalProjectionFn K u - v) = 0\n⊢ inner (orthogonalProjectionFn K u - v) (orthogonalProjectionFn K u - v) = 0\n[PROOFSTEP]\nhave huv : ⟪u - v, orthogonalProjectionFn K u - v⟫ = 0 := hvo _ hvs\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nu v : E\nhvm : v ∈ K\nhvo : ∀ (w : E), w ∈ K → inner (u - v) w = 0\nhvs : orthogonalProjectionFn K u - v ∈ K\nhuo : inner (u - orthogonalProjectionFn K u) (orthogonalProjectionFn K u - v) = 0\nhuv : inner (u - v) (orthogonalProjectionFn K u - v) = 0\n⊢ inner (orthogonalProjectionFn K u - v) (orthogonalProjectionFn K u - v) = 0\n[PROOFSTEP]\nhave houv : ⟪u - v - (u - orthogonalProjectionFn K u), orthogonalProjectionFn K u - v⟫ = 0 := by\n  rw [inner_sub_left, huo, huv, sub_zero]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nu v : E\nhvm : v ∈ K\nhvo : ∀ (w : E), w ∈ K → inner (u - v) w = 0\nhvs : orthogonalProjectionFn K u - v ∈ K\nhuo : inner (u - orthogonalProjectionFn K u) (orthogonalProjectionFn K u - v) = 0\nhuv : inner (u - v) (orthogonalProjectionFn K u - v) = 0\n⊢ inner (u - v - (u - orthogonalProjectionFn K u)) (orthogonalProjectionFn K u - v) = 0\n[PROOFSTEP]\nrw [inner_sub_left, huo, huv, sub_zero]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nu v : E\nhvm : v ∈ K\nhvo : ∀ (w : E), w ∈ K → inner (u - v) w = 0\nhvs : orthogonalProjectionFn K u - v ∈ K\nhuo : inner (u - orthogonalProjectionFn K u) (orthogonalProjectionFn K u - v) = 0\nhuv : inner (u - v) (orthogonalProjectionFn K u - v) = 0\nhouv : inner (u - v - (u - orthogonalProjectionFn K u)) (orthogonalProjectionFn K u - v) = 0\n⊢ inner (orthogonalProjectionFn K u - v) (orthogonalProjectionFn K u - v) = 0\n[PROOFSTEP]\nrwa [sub_sub_sub_cancel_left] at houv \n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nv : E\n⊢ ‖v‖ * ‖v‖ =\n    ‖v - orthogonalProjectionFn K v‖ * ‖v - orthogonalProjectionFn K v‖ +\n      ‖orthogonalProjectionFn K v‖ * ‖orthogonalProjectionFn K v‖\n[PROOFSTEP]\nset p := orthogonalProjectionFn K v\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nv : E\np : E := orthogonalProjectionFn K v\n⊢ ‖v‖ * ‖v‖ = ‖v - p‖ * ‖v - p‖ + ‖p‖ * ‖p‖\n[PROOFSTEP]\nhave h' : ⟪v - p, p⟫ = 0 := orthogonalProjectionFn_inner_eq_zero _ _ (orthogonalProjectionFn_mem v)\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nv : E\np : E := orthogonalProjectionFn K v\nh' : inner (v - p) p = 0\n⊢ ‖v‖ * ‖v‖ = ‖v - p‖ * ‖v - p‖ + ‖p‖ * ‖p‖\n[PROOFSTEP]\nconvert norm_add_sq_eq_norm_sq_add_norm_sq_of_inner_eq_zero (v - p) p h' using 2\n[GOAL]\ncase h.e'_2.h.e'_5\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nv : E\np : E := orthogonalProjectionFn K v\nh' : inner (v - p) p = 0\n⊢ ‖v‖ = ‖v - p + p‖\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.e'_2.h.e'_6\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nv : E\np : E := orthogonalProjectionFn K v\nh' : inner (v - p) p = 0\n⊢ ‖v‖ = ‖v - p + p‖\n[PROOFSTEP]\nsimp\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nx y : E\n⊢ (fun v => { val := orthogonalProjectionFn K v, property := (_ : orthogonalProjectionFn K v ∈ K) }) (x + y) =\n    (fun v => { val := orthogonalProjectionFn K v, property := (_ : orthogonalProjectionFn K v ∈ K) }) x +\n      (fun v => { val := orthogonalProjectionFn K v, property := (_ : orthogonalProjectionFn K v ∈ K) }) y\n[PROOFSTEP]\nhave hm : orthogonalProjectionFn K x + orthogonalProjectionFn K y ∈ K :=\n  Submodule.add_mem K (orthogonalProjectionFn_mem x) (orthogonalProjectionFn_mem y)\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nx y : E\nhm : orthogonalProjectionFn K x + orthogonalProjectionFn K y ∈ K\n⊢ (fun v => { val := orthogonalProjectionFn K v, property := (_ : orthogonalProjectionFn K v ∈ K) }) (x + y) =\n    (fun v => { val := orthogonalProjectionFn K v, property := (_ : orthogonalProjectionFn K v ∈ K) }) x +\n      (fun v => { val := orthogonalProjectionFn K v, property := (_ : orthogonalProjectionFn K v ∈ K) }) y\n[PROOFSTEP]\nhave ho : ∀ w ∈ K, ⟪x + y - (orthogonalProjectionFn K x + orthogonalProjectionFn K y), w⟫ = 0 :=\n  by\n  intro w hw\n  rw [add_sub_add_comm, inner_add_left, orthogonalProjectionFn_inner_eq_zero _ w hw,\n    orthogonalProjectionFn_inner_eq_zero _ w hw, add_zero]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nx y : E\nhm : orthogonalProjectionFn K x + orthogonalProjectionFn K y ∈ K\n⊢ ∀ (w : E), w ∈ K → inner (x + y - (orthogonalProjectionFn K x + orthogonalProjectionFn K y)) w = 0\n[PROOFSTEP]\nintro w hw\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nx y : E\nhm : orthogonalProjectionFn K x + orthogonalProjectionFn K y ∈ K\nw : E\nhw : w ∈ K\n⊢ inner (x + y - (orthogonalProjectionFn K x + orthogonalProjectionFn K y)) w = 0\n[PROOFSTEP]\nrw [add_sub_add_comm, inner_add_left, orthogonalProjectionFn_inner_eq_zero _ w hw,\n  orthogonalProjectionFn_inner_eq_zero _ w hw, add_zero]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nx y : E\nhm : orthogonalProjectionFn K x + orthogonalProjectionFn K y ∈ K\nho : ∀ (w : E), w ∈ K → inner (x + y - (orthogonalProjectionFn K x + orthogonalProjectionFn K y)) w = 0\n⊢ (fun v => { val := orthogonalProjectionFn K v, property := (_ : orthogonalProjectionFn K v ∈ K) }) (x + y) =\n    (fun v => { val := orthogonalProjectionFn K v, property := (_ : orthogonalProjectionFn K v ∈ K) }) x +\n      (fun v => { val := orthogonalProjectionFn K v, property := (_ : orthogonalProjectionFn K v ∈ K) }) y\n[PROOFSTEP]\next\n[GOAL]\ncase a\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nx y : E\nhm : orthogonalProjectionFn K x + orthogonalProjectionFn K y ∈ K\nho : ∀ (w : E), w ∈ K → inner (x + y - (orthogonalProjectionFn K x + orthogonalProjectionFn K y)) w = 0\n⊢ ↑((fun v => { val := orthogonalProjectionFn K v, property := (_ : orthogonalProjectionFn K v ∈ K) }) (x + y)) =\n    ↑((fun v => { val := orthogonalProjectionFn K v, property := (_ : orthogonalProjectionFn K v ∈ K) }) x +\n        (fun v => { val := orthogonalProjectionFn K v, property := (_ : orthogonalProjectionFn K v ∈ K) }) y)\n[PROOFSTEP]\nsimp [eq_orthogonalProjectionFn_of_mem_of_inner_eq_zero hm ho]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nc : 𝕜\nx : E\n⊢ AddHom.toFun\n      { toFun := fun v => { val := orthogonalProjectionFn K v, property := (_ : orthogonalProjectionFn K v ∈ K) },\n        map_add' :=\n          (_ :\n            ∀ (x y : E),\n              (fun v => { val := orthogonalProjectionFn K v, property := (_ : orthogonalProjectionFn K v ∈ K) })\n                  (x + y) =\n                (fun v => { val := orthogonalProjectionFn K v, property := (_ : orthogonalProjectionFn K v ∈ K) }) x +\n                  (fun v => { val := orthogonalProjectionFn K v, property := (_ : orthogonalProjectionFn K v ∈ K) })\n                    y) }\n      (c • x) =\n    ↑(RingHom.id 𝕜) c •\n      AddHom.toFun\n        { toFun := fun v => { val := orthogonalProjectionFn K v, property := (_ : orthogonalProjectionFn K v ∈ K) },\n          map_add' :=\n            (_ :\n              ∀ (x y : E),\n                (fun v => { val := orthogonalProjectionFn K v, property := (_ : orthogonalProjectionFn K v ∈ K) })\n                    (x + y) =\n                  (fun v => { val := orthogonalProjectionFn K v, property := (_ : orthogonalProjectionFn K v ∈ K) }) x +\n                    (fun v => { val := orthogonalProjectionFn K v, property := (_ : orthogonalProjectionFn K v ∈ K) })\n                      y) }\n        x\n[PROOFSTEP]\nhave hm : c • orthogonalProjectionFn K x ∈ K := Submodule.smul_mem K _ (orthogonalProjectionFn_mem x)\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nc : 𝕜\nx : E\nhm : c • orthogonalProjectionFn K x ∈ K\n⊢ AddHom.toFun\n      { toFun := fun v => { val := orthogonalProjectionFn K v, property := (_ : orthogonalProjectionFn K v ∈ K) },\n        map_add' :=\n          (_ :\n            ∀ (x y : E),\n              (fun v => { val := orthogonalProjectionFn K v, property := (_ : orthogonalProjectionFn K v ∈ K) })\n                  (x + y) =\n                (fun v => { val := orthogonalProjectionFn K v, property := (_ : orthogonalProjectionFn K v ∈ K) }) x +\n                  (fun v => { val := orthogonalProjectionFn K v, property := (_ : orthogonalProjectionFn K v ∈ K) })\n                    y) }\n      (c • x) =\n    ↑(RingHom.id 𝕜) c •\n      AddHom.toFun\n        { toFun := fun v => { val := orthogonalProjectionFn K v, property := (_ : orthogonalProjectionFn K v ∈ K) },\n          map_add' :=\n            (_ :\n              ∀ (x y : E),\n                (fun v => { val := orthogonalProjectionFn K v, property := (_ : orthogonalProjectionFn K v ∈ K) })\n                    (x + y) =\n                  (fun v => { val := orthogonalProjectionFn K v, property := (_ : orthogonalProjectionFn K v ∈ K) }) x +\n                    (fun v => { val := orthogonalProjectionFn K v, property := (_ : orthogonalProjectionFn K v ∈ K) })\n                      y) }\n        x\n[PROOFSTEP]\nhave ho : ∀ w ∈ K, ⟪c • x - c • orthogonalProjectionFn K x, w⟫ = 0 :=\n  by\n  intro w hw\n  rw [← smul_sub, inner_smul_left, orthogonalProjectionFn_inner_eq_zero _ w hw, mul_zero]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nc : 𝕜\nx : E\nhm : c • orthogonalProjectionFn K x ∈ K\n⊢ ∀ (w : E), w ∈ K → inner (c • x - c • orthogonalProjectionFn K x) w = 0\n[PROOFSTEP]\nintro w hw\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nc : 𝕜\nx : E\nhm : c • orthogonalProjectionFn K x ∈ K\nw : E\nhw : w ∈ K\n⊢ inner (c • x - c • orthogonalProjectionFn K x) w = 0\n[PROOFSTEP]\nrw [← smul_sub, inner_smul_left, orthogonalProjectionFn_inner_eq_zero _ w hw, mul_zero]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nc : 𝕜\nx : E\nhm : c • orthogonalProjectionFn K x ∈ K\nho : ∀ (w : E), w ∈ K → inner (c • x - c • orthogonalProjectionFn K x) w = 0\n⊢ AddHom.toFun\n      { toFun := fun v => { val := orthogonalProjectionFn K v, property := (_ : orthogonalProjectionFn K v ∈ K) },\n        map_add' :=\n          (_ :\n            ∀ (x y : E),\n              (fun v => { val := orthogonalProjectionFn K v, property := (_ : orthogonalProjectionFn K v ∈ K) })\n                  (x + y) =\n                (fun v => { val := orthogonalProjectionFn K v, property := (_ : orthogonalProjectionFn K v ∈ K) }) x +\n                  (fun v => { val := orthogonalProjectionFn K v, property := (_ : orthogonalProjectionFn K v ∈ K) })\n                    y) }\n      (c • x) =\n    ↑(RingHom.id 𝕜) c •\n      AddHom.toFun\n        { toFun := fun v => { val := orthogonalProjectionFn K v, property := (_ : orthogonalProjectionFn K v ∈ K) },\n          map_add' :=\n            (_ :\n              ∀ (x y : E),\n                (fun v => { val := orthogonalProjectionFn K v, property := (_ : orthogonalProjectionFn K v ∈ K) })\n                    (x + y) =\n                  (fun v => { val := orthogonalProjectionFn K v, property := (_ : orthogonalProjectionFn K v ∈ K) }) x +\n                    (fun v => { val := orthogonalProjectionFn K v, property := (_ : orthogonalProjectionFn K v ∈ K) })\n                      y) }\n        x\n[PROOFSTEP]\next\n[GOAL]\ncase a\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nc : 𝕜\nx : E\nhm : c • orthogonalProjectionFn K x ∈ K\nho : ∀ (w : E), w ∈ K → inner (c • x - c • orthogonalProjectionFn K x) w = 0\n⊢ ↑(AddHom.toFun\n        { toFun := fun v => { val := orthogonalProjectionFn K v, property := (_ : orthogonalProjectionFn K v ∈ K) },\n          map_add' :=\n            (_ :\n              ∀ (x y : E),\n                (fun v => { val := orthogonalProjectionFn K v, property := (_ : orthogonalProjectionFn K v ∈ K) })\n                    (x + y) =\n                  (fun v => { val := orthogonalProjectionFn K v, property := (_ : orthogonalProjectionFn K v ∈ K) }) x +\n                    (fun v => { val := orthogonalProjectionFn K v, property := (_ : orthogonalProjectionFn K v ∈ K) })\n                      y) }\n        (c • x)) =\n    ↑(↑(RingHom.id 𝕜) c •\n        AddHom.toFun\n          { toFun := fun v => { val := orthogonalProjectionFn K v, property := (_ : orthogonalProjectionFn K v ∈ K) },\n            map_add' :=\n              (_ :\n                ∀ (x y : E),\n                  (fun v => { val := orthogonalProjectionFn K v, property := (_ : orthogonalProjectionFn K v ∈ K) })\n                      (x + y) =\n                    (fun v => { val := orthogonalProjectionFn K v, property := (_ : orthogonalProjectionFn K v ∈ K) })\n                        x +\n                      (fun v => { val := orthogonalProjectionFn K v, property := (_ : orthogonalProjectionFn K v ∈ K) })\n                        y) }\n          x)\n[PROOFSTEP]\nsimp [eq_orthogonalProjectionFn_of_mem_of_inner_eq_zero hm ho]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nx : E\n⊢ ‖↑{\n            toAddHom :=\n              {\n                toFun := fun v =>\n                  { val := orthogonalProjectionFn K v, property := (_ : orthogonalProjectionFn K v ∈ K) },\n                map_add' :=\n                  (_ :\n                    ∀ (x y : E),\n                      (fun v => { val := orthogonalProjectionFn K v, property := (_ : orthogonalProjectionFn K v ∈ K) })\n                          (x + y) =\n                        (fun v =>\n                              { val := orthogonalProjectionFn K v, property := (_ : orthogonalProjectionFn K v ∈ K) })\n                            x +\n                          (fun v =>\n                              { val := orthogonalProjectionFn K v, property := (_ : orthogonalProjectionFn K v ∈ K) })\n                            y) },\n            map_smul' :=\n              (_ :\n                ∀ (c : 𝕜) (x : E),\n                  AddHom.toFun\n                      {\n                        toFun := fun v =>\n                          { val := orthogonalProjectionFn K v, property := (_ : orthogonalProjectionFn K v ∈ K) },\n                        map_add' :=\n                          (_ :\n                            ∀ (x y : E),\n                              (fun v =>\n                                    { val := orthogonalProjectionFn K v,\n                                      property := (_ : orthogonalProjectionFn K v ∈ K) })\n                                  (x + y) =\n                                (fun v =>\n                                      { val := orthogonalProjectionFn K v,\n                                        property := (_ : orthogonalProjectionFn K v ∈ K) })\n                                    x +\n                                  (fun v =>\n                                      { val := orthogonalProjectionFn K v,\n                                        property := (_ : orthogonalProjectionFn K v ∈ K) })\n                                    y) }\n                      (c • x) =\n                    ↑(RingHom.id 𝕜) c •\n                      AddHom.toFun\n                        {\n                          toFun := fun v =>\n                            { val := orthogonalProjectionFn K v, property := (_ : orthogonalProjectionFn K v ∈ K) },\n                          map_add' :=\n                            (_ :\n                              ∀ (x y : E),\n                                (fun v =>\n                                      { val := orthogonalProjectionFn K v,\n                                        property := (_ : orthogonalProjectionFn K v ∈ K) })\n                                    (x + y) =\n                                  (fun v =>\n                                        { val := orthogonalProjectionFn K v,\n                                          property := (_ : orthogonalProjectionFn K v ∈ K) })\n                                      x +\n                                    (fun v =>\n                                        { val := orthogonalProjectionFn K v,\n                                          property := (_ : orthogonalProjectionFn K v ∈ K) })\n                                      y) }\n                        x) }\n        x‖ ≤\n    1 * ‖x‖\n[PROOFSTEP]\nsimp only [one_mul, LinearMap.coe_mk]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nx : E\n⊢ ‖↑{ toFun := fun v => { val := orthogonalProjectionFn K v, property := (_ : orthogonalProjectionFn K v ∈ K) },\n            map_add' :=\n              (_ :\n                ∀ (x y : E),\n                  (fun v => { val := orthogonalProjectionFn K v, property := (_ : orthogonalProjectionFn K v ∈ K) })\n                      (x + y) =\n                    (fun v => { val := orthogonalProjectionFn K v, property := (_ : orthogonalProjectionFn K v ∈ K) })\n                        x +\n                      (fun v => { val := orthogonalProjectionFn K v, property := (_ : orthogonalProjectionFn K v ∈ K) })\n                        y) }\n        x‖ ≤\n    ‖x‖\n[PROOFSTEP]\nrefine' le_of_pow_le_pow 2 (norm_nonneg _) (by norm_num) _\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nx : E\n⊢ 0 < 2\n[PROOFSTEP]\nnorm_num\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nx : E\n⊢ ‖↑{ toFun := fun v => { val := orthogonalProjectionFn K v, property := (_ : orthogonalProjectionFn K v ∈ K) },\n              map_add' :=\n                (_ :\n                  ∀ (x y : E),\n                    (fun v => { val := orthogonalProjectionFn K v, property := (_ : orthogonalProjectionFn K v ∈ K) })\n                        (x + y) =\n                      (fun v => { val := orthogonalProjectionFn K v, property := (_ : orthogonalProjectionFn K v ∈ K) })\n                          x +\n                        (fun v =>\n                            { val := orthogonalProjectionFn K v, property := (_ : orthogonalProjectionFn K v ∈ K) })\n                          y) }\n          x‖ ^\n      2 ≤\n    ‖x‖ ^ 2\n[PROOFSTEP]\nchange ‖orthogonalProjectionFn K x‖ ^ 2 ≤ ‖x‖ ^ 2\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nx : E\n⊢ ‖orthogonalProjectionFn K x‖ ^ 2 ≤ ‖x‖ ^ 2\n[PROOFSTEP]\nnlinarith [orthogonalProjectionFn_norm_sq K x]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nv : E\n⊢ v - ↑(↑(orthogonalProjection K) v) ∈ Kᗮ\n[PROOFSTEP]\nintro w hw\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nv w : E\nhw : w ∈ K\n⊢ inner w (v - ↑(↑(orthogonalProjection K) v)) = 0\n[PROOFSTEP]\nrw [inner_eq_zero_symm]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nv w : E\nhw : w ∈ K\n⊢ inner (v - ↑(↑(orthogonalProjection K) v)) w = 0\n[PROOFSTEP]\nexact orthogonalProjection_inner_eq_zero _ _ hw\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace 𝕜 E\ninst✝² : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝¹ inst✝ : HasOrthogonalProjection K\nu v z : E\nhv : v ∈ K\nhz : z ∈ Kᗮ\nhu : u = v + z\n⊢ u - v ∈ Kᗮ\n[PROOFSTEP]\nsimpa [hu]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace 𝕜 E\ninst✝² : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝¹ inst✝ : HasOrthogonalProjection K\nu : E\n⊢ u = u - ↑(↑(orthogonalProjection K) u) + ↑(↑(orthogonalProjection K) u)\n[PROOFSTEP]\nsimp\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace 𝕜 E\ninst✝² : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝¹ : HasOrthogonalProjection K\nU : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection U\ny : E\n⊢ ‖y - ↑(↑(orthogonalProjection U) y)‖ = ⨅ (x : { x // x ∈ U }), ‖y - ↑x‖\n[PROOFSTEP]\nrw [norm_eq_iInf_iff_inner_eq_zero _ (Submodule.coe_mem _)]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace 𝕜 E\ninst✝² : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝¹ : HasOrthogonalProjection K\nU : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection U\ny : E\n⊢ ∀ (w : E), w ∈ U → inner (y - ↑(↑(orthogonalProjection U) y)) w = 0\n[PROOFSTEP]\nexact orthogonalProjection_inner_eq_zero _\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace 𝕜 E\ninst✝² : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝¹ : HasOrthogonalProjection K\nK' : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K'\nh : K = K'\nu : E\n⊢ ↑(↑(orthogonalProjection K) u) = ↑(↑(orthogonalProjection K') u)\n[PROOFSTEP]\nsubst h\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace 𝕜 E\ninst✝² : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝¹ : HasOrthogonalProjection K\nu : E\ninst✝ : HasOrthogonalProjection K\n⊢ ↑(↑(orthogonalProjection K) u) = ↑(↑(orthogonalProjection K) u)\n[PROOFSTEP]\nrfl\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nv : { x // x ∈ K }\n⊢ ↑(orthogonalProjection K) ↑v = v\n[PROOFSTEP]\next\n[GOAL]\ncase a\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nv : { x // x ∈ K }\n⊢ ↑(↑(orthogonalProjection K) ↑v) = ↑v\n[PROOFSTEP]\napply eq_orthogonalProjection_of_mem_of_inner_eq_zero\n[GOAL]\ncase a.hvm\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nv : { x // x ∈ K }\n⊢ ↑v ∈ K\n[PROOFSTEP]\nsimp\n[GOAL]\ncase a.hvo\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nv : { x // x ∈ K }\n⊢ ∀ (w : E), w ∈ K → inner (↑v - ↑v) w = 0\n[PROOFSTEP]\nsimp\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nv : E\n⊢ ↑(↑(orthogonalProjection K) v) = v ↔ v ∈ K\n[PROOFSTEP]\nrefine' ⟨fun h => _, fun h => eq_orthogonalProjection_of_mem_of_inner_eq_zero h _⟩\n[GOAL]\ncase refine'_1\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nv : E\nh : ↑(↑(orthogonalProjection K) v) = v\n⊢ v ∈ K\n[PROOFSTEP]\nrw [← h]\n[GOAL]\ncase refine'_1\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nv : E\nh : ↑(↑(orthogonalProjection K) v) = v\n⊢ ↑(↑(orthogonalProjection K) v) ∈ K\n[PROOFSTEP]\nsimp\n[GOAL]\ncase refine'_2\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nv : E\nh : v ∈ K\n⊢ ∀ (w : E), w ∈ K → inner (v - v) w = 0\n[PROOFSTEP]\nsimp\n[GOAL]\n𝕜 : Type u_1\nE✝ : Type u_2\nF : Type u_3\ninst✝¹¹ : IsROrC 𝕜\ninst✝¹⁰ : NormedAddCommGroup E✝\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : InnerProductSpace 𝕜 E✝\ninst✝⁷ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E✝\ninst✝⁶ : HasOrthogonalProjection K\nE : Type u_4\nE' : Type u_5\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedAddCommGroup E'\ninst✝³ : InnerProductSpace 𝕜 E\ninst✝² : InnerProductSpace 𝕜 E'\nf : E →ₗᵢ[𝕜] E'\np : Submodule 𝕜 E\ninst✝¹ : HasOrthogonalProjection p\ninst✝ : HasOrthogonalProjection (Submodule.map f.toLinearMap p)\nx : E\n⊢ ↑f ↑(↑(orthogonalProjection p) x) = ↑(↑(orthogonalProjection (Submodule.map f.toLinearMap p)) (↑f x))\n[PROOFSTEP]\nrefine' (eq_orthogonalProjection_of_mem_of_inner_eq_zero _ fun y hy => _).symm\n[GOAL]\ncase refine'_1\n𝕜 : Type u_1\nE✝ : Type u_2\nF : Type u_3\ninst✝¹¹ : IsROrC 𝕜\ninst✝¹⁰ : NormedAddCommGroup E✝\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : InnerProductSpace 𝕜 E✝\ninst✝⁷ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E✝\ninst✝⁶ : HasOrthogonalProjection K\nE : Type u_4\nE' : Type u_5\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedAddCommGroup E'\ninst✝³ : InnerProductSpace 𝕜 E\ninst✝² : InnerProductSpace 𝕜 E'\nf : E →ₗᵢ[𝕜] E'\np : Submodule 𝕜 E\ninst✝¹ : HasOrthogonalProjection p\ninst✝ : HasOrthogonalProjection (Submodule.map f.toLinearMap p)\nx : E\n⊢ ↑f ↑(↑(orthogonalProjection p) x) ∈ Submodule.map f.toLinearMap p\ncase refine'_2\n𝕜 : Type u_1\nE✝ : Type u_2\nF : Type u_3\ninst✝¹¹ : IsROrC 𝕜\ninst✝¹⁰ : NormedAddCommGroup E✝\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : InnerProductSpace 𝕜 E✝\ninst✝⁷ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E✝\ninst✝⁶ : HasOrthogonalProjection K\nE : Type u_4\nE' : Type u_5\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedAddCommGroup E'\ninst✝³ : InnerProductSpace 𝕜 E\ninst✝² : InnerProductSpace 𝕜 E'\nf : E →ₗᵢ[𝕜] E'\np : Submodule 𝕜 E\ninst✝¹ : HasOrthogonalProjection p\ninst✝ : HasOrthogonalProjection (Submodule.map f.toLinearMap p)\nx : E\ny : (fun x => E') ↑(↑(orthogonalProjection p) x)\nhy : y ∈ Submodule.map f.toLinearMap p\n⊢ inner (↑f x - ↑f ↑(↑(orthogonalProjection p) x)) y = 0\n[PROOFSTEP]\nrefine' Submodule.apply_coe_mem_map _ _\n[GOAL]\ncase refine'_2\n𝕜 : Type u_1\nE✝ : Type u_2\nF : Type u_3\ninst✝¹¹ : IsROrC 𝕜\ninst✝¹⁰ : NormedAddCommGroup E✝\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : InnerProductSpace 𝕜 E✝\ninst✝⁷ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E✝\ninst✝⁶ : HasOrthogonalProjection K\nE : Type u_4\nE' : Type u_5\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedAddCommGroup E'\ninst✝³ : InnerProductSpace 𝕜 E\ninst✝² : InnerProductSpace 𝕜 E'\nf : E →ₗᵢ[𝕜] E'\np : Submodule 𝕜 E\ninst✝¹ : HasOrthogonalProjection p\ninst✝ : HasOrthogonalProjection (Submodule.map f.toLinearMap p)\nx : E\ny : (fun x => E') ↑(↑(orthogonalProjection p) x)\nhy : y ∈ Submodule.map f.toLinearMap p\n⊢ inner (↑f x - ↑f ↑(↑(orthogonalProjection p) x)) y = 0\n[PROOFSTEP]\nrcases hy with ⟨x', hx', rfl : f x' = y⟩\n[GOAL]\ncase refine'_2.intro.intro\n𝕜 : Type u_1\nE✝ : Type u_2\nF : Type u_3\ninst✝¹¹ : IsROrC 𝕜\ninst✝¹⁰ : NormedAddCommGroup E✝\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : InnerProductSpace 𝕜 E✝\ninst✝⁷ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E✝\ninst✝⁶ : HasOrthogonalProjection K\nE : Type u_4\nE' : Type u_5\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedAddCommGroup E'\ninst✝³ : InnerProductSpace 𝕜 E\ninst✝² : InnerProductSpace 𝕜 E'\nf : E →ₗᵢ[𝕜] E'\np : Submodule 𝕜 E\ninst✝¹ : HasOrthogonalProjection p\ninst✝ : HasOrthogonalProjection (Submodule.map f.toLinearMap p)\nx x' : E\nhx' : x' ∈ ↑p\n⊢ inner (↑f x - ↑f ↑(↑(orthogonalProjection p) x)) (↑f x') = 0\n[PROOFSTEP]\nrw [← f.map_sub, f.inner_map_map, orthogonalProjection_inner_eq_zero x x' hx']\n[GOAL]\n𝕜 : Type u_1\nE✝ : Type u_2\nF : Type u_3\ninst✝¹⁰ : IsROrC 𝕜\ninst✝⁹ : NormedAddCommGroup E✝\ninst✝⁸ : NormedAddCommGroup F\ninst✝⁷ : InnerProductSpace 𝕜 E✝\ninst✝⁶ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E✝\ninst✝⁵ : HasOrthogonalProjection K\nE : Type u_4\nE' : Type u_5\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup E'\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace 𝕜 E'\nf : E ≃ₗᵢ[𝕜] E'\np : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection p\nx : E'\n⊢ ↑(↑(orthogonalProjection (Submodule.map (↑f.toLinearEquiv) p)) x) =\n    ↑f ↑(↑(orthogonalProjection p) (↑(LinearIsometryEquiv.symm f) x))\n[PROOFSTEP]\nsimpa only [f.coe_toLinearIsometry, f.apply_symm_apply] using\n  (f.toLinearIsometry.map_orthogonalProjection' p (f.symm x)).symm\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\n⊢ orthogonalProjection ⊥ = 0\n[PROOFSTEP]\next\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\n⊢ 0 ≤ 1\n[PROOFSTEP]\nnorm_num\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nv w : E\n⊢ ↑(‖v‖ ^ 2) • ↑(↑(orthogonalProjection (Submodule.span 𝕜 {v})) w) = inner v w • v\n[PROOFSTEP]\nsuffices ((orthogonalProjection (𝕜 ∙ v) (((‖v‖ : 𝕜) ^ 2) • w)) : E) = ⟪v, w⟫ • v by simpa using this\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nv w : E\nthis : ↑(↑(orthogonalProjection (Submodule.span 𝕜 {v})) (↑‖v‖ ^ 2 • w)) = inner v w • v\n⊢ ↑(‖v‖ ^ 2) • ↑(↑(orthogonalProjection (Submodule.span 𝕜 {v})) w) = inner v w • v\n[PROOFSTEP]\nsimpa using this\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nv w : E\n⊢ ↑(↑(orthogonalProjection (Submodule.span 𝕜 {v})) (↑‖v‖ ^ 2 • w)) = inner v w • v\n[PROOFSTEP]\napply eq_orthogonalProjection_of_mem_of_inner_eq_zero\n[GOAL]\ncase hvm\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nv w : E\n⊢ inner v w • v ∈ Submodule.span 𝕜 {v}\n[PROOFSTEP]\nrw [Submodule.mem_span_singleton]\n[GOAL]\ncase hvm\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nv w : E\n⊢ ∃ a, a • v = inner v w • v\n[PROOFSTEP]\nuse⟪v, w⟫\n[GOAL]\ncase hvo\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nv w : E\n⊢ ∀ (w_1 : E), w_1 ∈ Submodule.span 𝕜 {v} → inner (↑‖v‖ ^ 2 • w - inner v w • v) w_1 = 0\n[PROOFSTEP]\nrw [← Submodule.mem_orthogonal', Submodule.mem_orthogonal_singleton_iff_inner_left]\n[GOAL]\ncase hvo\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nv w : E\n⊢ inner (↑‖v‖ ^ 2 • w - inner v w • v) v = 0\n[PROOFSTEP]\nsimp [inner_sub_left, inner_smul_left, inner_self_eq_norm_sq_to_K, mul_comm]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nv w : E\n⊢ ↑(↑(orthogonalProjection (Submodule.span 𝕜 {v})) w) = (inner v w / ↑(‖v‖ ^ 2)) • v\n[PROOFSTEP]\nby_cases hv : v = 0\n[GOAL]\ncase pos\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nv w : E\nhv : v = 0\n⊢ ↑(↑(orthogonalProjection (Submodule.span 𝕜 {v})) w) = (inner v w / ↑(‖v‖ ^ 2)) • v\n[PROOFSTEP]\nrw [hv, eq_orthogonalProjection_of_eq_submodule (Submodule.span_zero_singleton 𝕜)]\n[GOAL]\ncase pos\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nv w : E\nhv : v = 0\n⊢ ↑(↑(orthogonalProjection ⊥) w) = (inner 0 w / ↑(‖0‖ ^ 2)) • 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nv w : E\nhv : ¬v = 0\n⊢ ↑(↑(orthogonalProjection (Submodule.span 𝕜 {v})) w) = (inner v w / ↑(‖v‖ ^ 2)) • v\n[PROOFSTEP]\nhave hv' : ‖v‖ ≠ 0 := ne_of_gt (norm_pos_iff.mpr hv)\n[GOAL]\ncase neg\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nv w : E\nhv : ¬v = 0\nhv' : ‖v‖ ≠ 0\n⊢ ↑(↑(orthogonalProjection (Submodule.span 𝕜 {v})) w) = (inner v w / ↑(‖v‖ ^ 2)) • v\n[PROOFSTEP]\nhave key :\n  (((‖v‖ ^ 2 : ℝ) : 𝕜)⁻¹ * ((‖v‖ ^ 2 : ℝ) : 𝕜)) • ((orthogonalProjection (𝕜 ∙ v) w) : E) =\n    (((‖v‖ ^ 2 : ℝ) : 𝕜)⁻¹ * ⟪v, w⟫) • v :=\n  by simp [mul_smul, smul_orthogonalProjection_singleton 𝕜 w, -ofReal_pow]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nv w : E\nhv : ¬v = 0\nhv' : ‖v‖ ≠ 0\n⊢ ((↑(‖v‖ ^ 2))⁻¹ * ↑(‖v‖ ^ 2)) • ↑(↑(orthogonalProjection (Submodule.span 𝕜 {v})) w) = ((↑(‖v‖ ^ 2))⁻¹ * inner v w) • v\n[PROOFSTEP]\nsimp [mul_smul, smul_orthogonalProjection_singleton 𝕜 w, -ofReal_pow]\n[GOAL]\ncase neg\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nv w : E\nhv : ¬v = 0\nhv' : ‖v‖ ≠ 0\nkey :\n  ((↑(‖v‖ ^ 2))⁻¹ * ↑(‖v‖ ^ 2)) • ↑(↑(orthogonalProjection (Submodule.span 𝕜 {v})) w) = ((↑(‖v‖ ^ 2))⁻¹ * inner v w) • v\n⊢ ↑(↑(orthogonalProjection (Submodule.span 𝕜 {v})) w) = (inner v w / ↑(‖v‖ ^ 2)) • v\n[PROOFSTEP]\nconvert key using 1\n[GOAL]\ncase h.e'_2\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nv w : E\nhv : ¬v = 0\nhv' : ‖v‖ ≠ 0\nkey :\n  ((↑(‖v‖ ^ 2))⁻¹ * ↑(‖v‖ ^ 2)) • ↑(↑(orthogonalProjection (Submodule.span 𝕜 {v})) w) = ((↑(‖v‖ ^ 2))⁻¹ * inner v w) • v\n⊢ ↑(↑(orthogonalProjection (Submodule.span 𝕜 {v})) w) =\n    ((↑(‖v‖ ^ 2))⁻¹ * ↑(‖v‖ ^ 2)) • ↑(↑(orthogonalProjection (Submodule.span 𝕜 {v})) w)\n[PROOFSTEP]\nfield_simp [hv']\n[GOAL]\ncase h.e'_3\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nv w : E\nhv : ¬v = 0\nhv' : ‖v‖ ≠ 0\nkey :\n  ((↑(‖v‖ ^ 2))⁻¹ * ↑(‖v‖ ^ 2)) • ↑(↑(orthogonalProjection (Submodule.span 𝕜 {v})) w) = ((↑(‖v‖ ^ 2))⁻¹ * inner v w) • v\n⊢ (inner v w / ↑(‖v‖ ^ 2)) • v = ((↑(‖v‖ ^ 2))⁻¹ * inner v w) • v\n[PROOFSTEP]\nfield_simp [hv']\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nv : E\nhv : ‖v‖ = 1\nw : E\n⊢ ↑(↑(orthogonalProjection (Submodule.span 𝕜 {v})) w) = inner v w • v\n[PROOFSTEP]\nrw [← smul_orthogonalProjection_singleton 𝕜 w]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nv : E\nhv : ‖v‖ = 1\nw : E\n⊢ ↑(↑(orthogonalProjection (Submodule.span 𝕜 {v})) w) = ↑(‖v‖ ^ 2) • ↑(↑(orthogonalProjection (Submodule.span 𝕜 {v})) w)\n[PROOFSTEP]\nsimp [hv]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nx : E\n⊢ ↑(2 • LinearMap.comp (Submodule.subtype K) ↑(orthogonalProjection K) - LinearMap.id)\n      (↑(2 • LinearMap.comp (Submodule.subtype K) ↑(orthogonalProjection K) - LinearMap.id) x) =\n    x\n[PROOFSTEP]\nsimp [two_smul]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nsrc✝ : E ≃ₗ[𝕜] E := reflectionLinearEquiv K\n⊢ ∀ (x : E),\n    ‖↑{ toLinearMap := ↑src✝, invFun := src✝.invFun, left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),\n              right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }\n          x‖ =\n      ‖x‖\n[PROOFSTEP]\nintro x\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nsrc✝ : E ≃ₗ[𝕜] E := reflectionLinearEquiv K\nx : E\n⊢ ‖↑{ toLinearMap := ↑src✝, invFun := src✝.invFun, left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),\n            right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }\n        x‖ =\n    ‖x‖\n[PROOFSTEP]\ndsimp only\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nsrc✝ : E ≃ₗ[𝕜] E := reflectionLinearEquiv K\nx : E\n⊢ ‖↑{ toLinearMap := ↑(reflectionLinearEquiv K), invFun := (reflectionLinearEquiv K).invFun,\n            left_inv :=\n              (_ : Function.LeftInverse (reflectionLinearEquiv K).invFun (↑(reflectionLinearEquiv K)).toAddHom.toFun),\n            right_inv :=\n              (_ : Function.RightInverse (reflectionLinearEquiv K).invFun (↑(reflectionLinearEquiv K)).toAddHom.toFun) }\n        x‖ =\n    ‖x‖\n[PROOFSTEP]\nlet w : K := orthogonalProjection K x\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nsrc✝ : E ≃ₗ[𝕜] E := reflectionLinearEquiv K\nx : E\nw : { x // x ∈ K } := ↑(orthogonalProjection K) x\n⊢ ‖↑{ toLinearMap := ↑(reflectionLinearEquiv K), invFun := (reflectionLinearEquiv K).invFun,\n            left_inv :=\n              (_ : Function.LeftInverse (reflectionLinearEquiv K).invFun (↑(reflectionLinearEquiv K)).toAddHom.toFun),\n            right_inv :=\n              (_ : Function.RightInverse (reflectionLinearEquiv K).invFun (↑(reflectionLinearEquiv K)).toAddHom.toFun) }\n        x‖ =\n    ‖x‖\n[PROOFSTEP]\nlet v := x - w\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nsrc✝ : E ≃ₗ[𝕜] E := reflectionLinearEquiv K\nx : E\nw : { x // x ∈ K } := ↑(orthogonalProjection K) x\nv : E := x - ↑w\n⊢ ‖↑{ toLinearMap := ↑(reflectionLinearEquiv K), invFun := (reflectionLinearEquiv K).invFun,\n            left_inv :=\n              (_ : Function.LeftInverse (reflectionLinearEquiv K).invFun (↑(reflectionLinearEquiv K)).toAddHom.toFun),\n            right_inv :=\n              (_ : Function.RightInverse (reflectionLinearEquiv K).invFun (↑(reflectionLinearEquiv K)).toAddHom.toFun) }\n        x‖ =\n    ‖x‖\n[PROOFSTEP]\nhave : ⟪v, w⟫ = 0 := orthogonalProjection_inner_eq_zero x w w.2\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nsrc✝ : E ≃ₗ[𝕜] E := reflectionLinearEquiv K\nx : E\nw : { x // x ∈ K } := ↑(orthogonalProjection K) x\nv : E := x - ↑w\nthis : inner v ↑w = 0\n⊢ ‖↑{ toLinearMap := ↑(reflectionLinearEquiv K), invFun := (reflectionLinearEquiv K).invFun,\n            left_inv :=\n              (_ : Function.LeftInverse (reflectionLinearEquiv K).invFun (↑(reflectionLinearEquiv K)).toAddHom.toFun),\n            right_inv :=\n              (_ : Function.RightInverse (reflectionLinearEquiv K).invFun (↑(reflectionLinearEquiv K)).toAddHom.toFun) }\n        x‖ =\n    ‖x‖\n[PROOFSTEP]\nconvert norm_sub_eq_norm_add this using 2\n[GOAL]\ncase h.e'_2.h.e'_3\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nsrc✝ : E ≃ₗ[𝕜] E := reflectionLinearEquiv K\nx : E\nw : { x // x ∈ K } := ↑(orthogonalProjection K) x\nv : E := x - ↑w\nthis : inner v ↑w = 0\n⊢ ↑{ toLinearMap := ↑(reflectionLinearEquiv K), invFun := (reflectionLinearEquiv K).invFun,\n          left_inv :=\n            (_ : Function.LeftInverse (reflectionLinearEquiv K).invFun (↑(reflectionLinearEquiv K)).toAddHom.toFun),\n          right_inv :=\n            (_ : Function.RightInverse (reflectionLinearEquiv K).invFun (↑(reflectionLinearEquiv K)).toAddHom.toFun) }\n      x =\n    ↑w - v\n[PROOFSTEP]\nrw [LinearEquiv.coe_mk, reflectionLinearEquiv, LinearEquiv.toFun_eq_coe, LinearEquiv.coe_ofInvolutive,\n  LinearMap.sub_apply, LinearMap.id_apply, two_smul, LinearMap.add_apply, LinearMap.comp_apply, Submodule.subtype_apply,\n  ContinuousLinearMap.coe_coe]\n[GOAL]\ncase h.e'_2.h.e'_3\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nsrc✝ : E ≃ₗ[𝕜] E := reflectionLinearEquiv K\nx : E\nw : { x // x ∈ K } := ↑(orthogonalProjection K) x\nv : E := x - ↑w\nthis : inner v ↑w = 0\n⊢ ↑(↑(orthogonalProjection K) x) + ↑(↑(orthogonalProjection K) x) - x = ↑w - v\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h.e'_2.h.e'_3\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nsrc✝ : E ≃ₗ[𝕜] E := reflectionLinearEquiv K\nx : E\nw : { x // x ∈ K } := ↑(orthogonalProjection K) x\nv : E := x - ↑w\nthis : inner v ↑w = 0\n⊢ ↑(↑(orthogonalProjection K) x) + ↑(↑(orthogonalProjection K) x) - x =\n    ↑(↑(orthogonalProjection K) x) - (x - ↑(↑(orthogonalProjection K) x))\n[PROOFSTEP]\nabel\n[GOAL]\ncase h.e'_2.h.e'_3\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nsrc✝ : E ≃ₗ[𝕜] E := reflectionLinearEquiv K\nx : E\nw : { x // x ∈ K } := ↑(orthogonalProjection K) x\nv : E := x - ↑w\nthis : inner v ↑w = 0\n⊢ ↑(↑(orthogonalProjection K) x) + ↑(↑(orthogonalProjection K) x) - x =\n    ↑(↑(orthogonalProjection K) x) - (x - ↑(↑(orthogonalProjection K) x))\n[PROOFSTEP]\nabel\n[GOAL]\ncase h.e'_3.h.e'_3\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nsrc✝ : E ≃ₗ[𝕜] E := reflectionLinearEquiv K\nx : E\nw : { x // x ∈ K } := ↑(orthogonalProjection K) x\nv : E := x - ↑w\nthis : inner v ↑w = 0\n⊢ x = ↑w + v\n[PROOFSTEP]\nsimp only [add_sub_cancel'_right, eq_self_iff_true]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nv : E\n⊢ ↑(reflection Kᗮ) v = -↑(reflection K) v\n[PROOFSTEP]\nsimp [reflection_apply]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nv : E\n⊢ 2 • v - 2 • ↑(↑(orthogonalProjection K) v) - v = v - 2 • ↑(↑(orthogonalProjection K) v)\n[PROOFSTEP]\nabel\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nv : E\n⊢ 2 • v - 2 • ↑(↑(orthogonalProjection K) v) - v = v - 2 • ↑(↑(orthogonalProjection K) v)\n[PROOFSTEP]\nabel\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\n⊢ reflection Kᗮ = LinearIsometryEquiv.trans (reflection K) (LinearIsometryEquiv.neg 𝕜)\n[PROOFSTEP]\next\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nx✝ : E\n⊢ ↑(reflection Kᗮ) x✝ = ↑(LinearIsometryEquiv.trans (reflection K) (LinearIsometryEquiv.neg 𝕜)) x✝\n[PROOFSTEP]\napply reflection_orthogonal_apply\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nu v : E\n⊢ ↑(reflection (Submodule.span 𝕜 {u})) v = 2 • (inner u v / ↑‖u‖ ^ 2) • u - v\n[PROOFSTEP]\nrw [reflection_apply, orthogonalProjection_singleton, ofReal_pow]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nx : E\n⊢ ↑(reflection K) x = x ↔ x ∈ K\n[PROOFSTEP]\nrw [← orthogonalProjection_eq_self_iff, reflection_apply, sub_eq_iff_eq_add', ← two_smul 𝕜, two_smul ℕ, ← two_smul 𝕜]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nx : E\n⊢ 2 • ↑(↑(orthogonalProjection K) x) = 2 • x ↔ ↑(↑(orthogonalProjection K) x) = x\n[PROOFSTEP]\nrefine' (smul_right_injective E _).eq_iff\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nx : E\n⊢ 2 ≠ 0\n[PROOFSTEP]\nexact two_ne_zero\n[GOAL]\n𝕜 : Type u_1\nE✝ : Type u_2\nF : Type u_3\ninst✝¹⁰ : IsROrC 𝕜\ninst✝⁹ : NormedAddCommGroup E✝\ninst✝⁸ : NormedAddCommGroup F\ninst✝⁷ : InnerProductSpace 𝕜 E✝\ninst✝⁶ : InnerProductSpace ℝ F\nK✝ : Submodule 𝕜 E✝\ninst✝⁵ : HasOrthogonalProjection K✝\nE : Type u_4\nE' : Type u_5\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup E'\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace 𝕜 E'\nf : E ≃ₗᵢ[𝕜] E'\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nx : E'\n⊢ ↑(reflection (Submodule.map (↑f.toLinearEquiv) K)) x = ↑f (↑(reflection K) (↑(LinearIsometryEquiv.symm f) x))\n[PROOFSTEP]\nsimp [two_smul, reflection_apply, orthogonalProjection_map_apply f K x]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\n⊢ reflection ⊥ = LinearIsometryEquiv.neg 𝕜\n[PROOFSTEP]\next\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nx✝ : E\n⊢ ↑(reflection ⊥) x✝ = ↑(LinearIsometryEquiv.neg 𝕜) x✝\n[PROOFSTEP]\nsimp [reflection_apply]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK K₁ K₂ : Submodule 𝕜 E\nh : K₁ ≤ K₂\ninst✝ : HasOrthogonalProjection K₁\n⊢ K₁ ⊔ K₁ᗮ ⊓ K₂ = K₂\n[PROOFSTEP]\next x\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK K₁ K₂ : Submodule 𝕜 E\nh : K₁ ≤ K₂\ninst✝ : HasOrthogonalProjection K₁\nx : E\n⊢ x ∈ K₁ ⊔ K₁ᗮ ⊓ K₂ ↔ x ∈ K₂\n[PROOFSTEP]\nrw [Submodule.mem_sup]\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK K₁ K₂ : Submodule 𝕜 E\nh : K₁ ≤ K₂\ninst✝ : HasOrthogonalProjection K₁\nx : E\n⊢ (∃ y, y ∈ K₁ ∧ ∃ z, z ∈ K₁ᗮ ⊓ K₂ ∧ y + z = x) ↔ x ∈ K₂\n[PROOFSTEP]\nlet v : K₁ := orthogonalProjection K₁ x\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK K₁ K₂ : Submodule 𝕜 E\nh : K₁ ≤ K₂\ninst✝ : HasOrthogonalProjection K₁\nx : E\nv : { x // x ∈ K₁ } := ↑(orthogonalProjection K₁) x\n⊢ (∃ y, y ∈ K₁ ∧ ∃ z, z ∈ K₁ᗮ ⊓ K₂ ∧ y + z = x) ↔ x ∈ K₂\n[PROOFSTEP]\nhave hvm : x - v ∈ K₁ᗮ := sub_orthogonalProjection_mem_orthogonal x\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK K₁ K₂ : Submodule 𝕜 E\nh : K₁ ≤ K₂\ninst✝ : HasOrthogonalProjection K₁\nx : E\nv : { x // x ∈ K₁ } := ↑(orthogonalProjection K₁) x\nhvm : x - ↑v ∈ K₁ᗮ\n⊢ (∃ y, y ∈ K₁ ∧ ∃ z, z ∈ K₁ᗮ ⊓ K₂ ∧ y + z = x) ↔ x ∈ K₂\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK K₁ K₂ : Submodule 𝕜 E\nh : K₁ ≤ K₂\ninst✝ : HasOrthogonalProjection K₁\nx : E\nv : { x // x ∈ K₁ } := ↑(orthogonalProjection K₁) x\nhvm : x - ↑v ∈ K₁ᗮ\n⊢ (∃ y, y ∈ K₁ ∧ ∃ z, z ∈ K₁ᗮ ⊓ K₂ ∧ y + z = x) → x ∈ K₂\n[PROOFSTEP]\nrintro ⟨y, hy, z, hz, rfl⟩\n[GOAL]\ncase h.mp.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK K₁ K₂ : Submodule 𝕜 E\nh : K₁ ≤ K₂\ninst✝ : HasOrthogonalProjection K₁\ny : E\nhy : y ∈ K₁\nz : E\nhz : z ∈ K₁ᗮ ⊓ K₂\nv : { x // x ∈ K₁ } := ↑(orthogonalProjection K₁) (y + z)\nhvm : y + z - ↑v ∈ K₁ᗮ\n⊢ y + z ∈ K₂\n[PROOFSTEP]\nexact K₂.add_mem (h hy) hz.2\n[GOAL]\ncase h.mpr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK K₁ K₂ : Submodule 𝕜 E\nh : K₁ ≤ K₂\ninst✝ : HasOrthogonalProjection K₁\nx : E\nv : { x // x ∈ K₁ } := ↑(orthogonalProjection K₁) x\nhvm : x - ↑v ∈ K₁ᗮ\n⊢ x ∈ K₂ → ∃ y, y ∈ K₁ ∧ ∃ z, z ∈ K₁ᗮ ⊓ K₂ ∧ y + z = x\n[PROOFSTEP]\nexact fun hx => ⟨v, v.prop, x - v, ⟨hvm, K₂.sub_mem hx (h v.prop)⟩, add_sub_cancel'_right _ _⟩\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\n⊢ K ⊔ Kᗮ = ⊤\n[PROOFSTEP]\nconvert Submodule.sup_orthogonal_inf_of_completeSpace (le_top : K ≤ ⊤) using 2\n[GOAL]\ncase h.e'_2.h.e'_4\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\n⊢ Kᗮ = Kᗮ ⊓ ⊤\n[PROOFSTEP]\nsimp\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nv : E\n⊢ v = ↑(↑(orthogonalProjection K) v) + (v - ↑(↑(orthogonalProjection K) v))\n[PROOFSTEP]\nsimp\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\n⊢ Kᗮᗮ = K\n[PROOFSTEP]\next v\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nv : E\n⊢ v ∈ Kᗮᗮ ↔ v ∈ K\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nv : E\n⊢ v ∈ Kᗮᗮ → v ∈ K\n[PROOFSTEP]\nobtain ⟨y, hy, z, hz, rfl⟩ := K.exists_add_mem_mem_orthogonal v\n[GOAL]\ncase h.mp.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\ny : E\nhy : y ∈ K\nz : E\nhz : z ∈ Kᗮ\n⊢ y + z ∈ Kᗮᗮ → y + z ∈ K\n[PROOFSTEP]\nintro hv\n[GOAL]\ncase h.mp.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\ny : E\nhy : y ∈ K\nz : E\nhz : z ∈ Kᗮ\nhv : y + z ∈ Kᗮᗮ\n⊢ y + z ∈ K\n[PROOFSTEP]\nhave hz' : z = 0 := by\n  have hyz : ⟪z, y⟫ = 0 := by simp [hz y hy, inner_eq_zero_symm]\n  simpa [inner_add_right, hyz] using hv z hz\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\ny : E\nhy : y ∈ K\nz : E\nhz : z ∈ Kᗮ\nhv : y + z ∈ Kᗮᗮ\n⊢ z = 0\n[PROOFSTEP]\nhave hyz : ⟪z, y⟫ = 0 := by simp [hz y hy, inner_eq_zero_symm]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\ny : E\nhy : y ∈ K\nz : E\nhz : z ∈ Kᗮ\nhv : y + z ∈ Kᗮᗮ\n⊢ inner z y = 0\n[PROOFSTEP]\nsimp [hz y hy, inner_eq_zero_symm]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\ny : E\nhy : y ∈ K\nz : E\nhz : z ∈ Kᗮ\nhv : y + z ∈ Kᗮᗮ\nhyz : inner z y = 0\n⊢ z = 0\n[PROOFSTEP]\nsimpa [inner_add_right, hyz] using hv z hz\n[GOAL]\ncase h.mp.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\ny : E\nhy : y ∈ K\nz : E\nhz : z ∈ Kᗮ\nhv : y + z ∈ Kᗮᗮ\nhz' : z = 0\n⊢ y + z ∈ K\n[PROOFSTEP]\nsimp [hy, hz']\n[GOAL]\ncase h.mpr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nv : E\n⊢ v ∈ K → v ∈ Kᗮᗮ\n[PROOFSTEP]\nintro hv w hw\n[GOAL]\ncase h.mpr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nv : E\nhv : v ∈ K\nw : E\nhw : w ∈ Kᗮ\n⊢ inner w v = 0\n[PROOFSTEP]\nrw [inner_eq_zero_symm]\n[GOAL]\ncase h.mpr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nv : E\nhv : v ∈ K\nw : E\nhw : w ∈ Kᗮ\n⊢ inner v w = 0\n[PROOFSTEP]\nexact hw v hv\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : CompleteSpace E\n⊢ Kᗮᗮ = topologicalClosure K\n[PROOFSTEP]\nrefine' le_antisymm _ _\n[GOAL]\ncase refine'_1\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : CompleteSpace E\n⊢ Kᗮᗮ ≤ topologicalClosure K\n[PROOFSTEP]\nconvert Submodule.orthogonal_orthogonal_monotone K.le_topologicalClosure using 1\n[GOAL]\ncase h.e'_4\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : CompleteSpace E\n⊢ topologicalClosure K = (topologicalClosure K)ᗮᗮ\n[PROOFSTEP]\nrw [K.topologicalClosure.orthogonal_orthogonal]\n[GOAL]\ncase refine'_2\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : CompleteSpace E\n⊢ topologicalClosure K ≤ Kᗮᗮ\n[PROOFSTEP]\nexact K.topologicalClosure_minimal K.le_orthogonal_orthogonal Kᗮ.isClosed_orthogonal\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\n⊢ Kᗮ = ⊥ ↔ K = ⊤\n[PROOFSTEP]\nrefine' ⟨_, fun h => by rw [h, Submodule.top_orthogonal_eq_bot]⟩\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nh : K = ⊤\n⊢ Kᗮ = ⊥\n[PROOFSTEP]\nrw [h, Submodule.top_orthogonal_eq_bot]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\n⊢ Kᗮ = ⊥ → K = ⊤\n[PROOFSTEP]\nintro h\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nh : Kᗮ = ⊥\n⊢ K = ⊤\n[PROOFSTEP]\nhave : K ⊔ Kᗮ = ⊤ := Submodule.sup_orthogonal_of_completeSpace\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nh : Kᗮ = ⊥\nthis : K ⊔ Kᗮ = ⊤\n⊢ K = ⊤\n[PROOFSTEP]\nrwa [h, sup_comm, bot_sup_eq] at this \n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nv : E\nhv : v ∈ Kᗮ\n⊢ ↑(orthogonalProjection K) v = 0\n[PROOFSTEP]\next\n[GOAL]\ncase a\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nv : E\nhv : v ∈ Kᗮ\n⊢ ↑(↑(orthogonalProjection K) v) = ↑0\n[PROOFSTEP]\nconvert eq_orthogonalProjection_of_mem_orthogonal (K := K) _ _\n[GOAL]\ncase a.convert_3\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nv : E\nhv : v ∈ Kᗮ\n⊢ ↑0 ∈ K\n[PROOFSTEP]\nsimp [hv]\n[GOAL]\ncase a.convert_4\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nv : E\nhv : v ∈ Kᗮ\n⊢ v - ↑0 ∈ Kᗮ\n[PROOFSTEP]\nsimp [hv]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK U V : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection U\nh : ContinuousLinearMap.comp (orthogonalProjection U) (Submodule.subtypeL V) = 0\nu : E\nhu : u ∈ U\nv : E\nhv : v ∈ V\n⊢ inner v u = 0\n[PROOFSTEP]\nconvert orthogonalProjection_inner_eq_zero v u hu using 2\n[GOAL]\ncase h.e'_2.h.e'_4\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK U V : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection U\nh : ContinuousLinearMap.comp (orthogonalProjection U) (Submodule.subtypeL V) = 0\nu : E\nhu : u ∈ U\nv : E\nhv : v ∈ V\n⊢ v = v - ↑(↑(orthogonalProjection U) v)\n[PROOFSTEP]\nhave : orthogonalProjection U v = 0 := FunLike.congr_fun h (⟨_, hv⟩ : V)\n[GOAL]\ncase h.e'_2.h.e'_4\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK U V : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection U\nh : ContinuousLinearMap.comp (orthogonalProjection U) (Submodule.subtypeL V) = 0\nu : E\nhu : u ∈ U\nv : E\nhv : v ∈ V\nthis : ↑(orthogonalProjection U) v = 0\n⊢ v = v - ↑(↑(orthogonalProjection U) v)\n[PROOFSTEP]\nrw [this, Submodule.coe_zero, sub_zero]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nx : E\n⊢ ↑(orthogonalProjection K) x = ↑(Submodule.linearProjOfIsCompl K Kᗮ (_ : IsCompl K Kᗮ)) x\n[PROOFSTEP]\nhave : IsCompl K Kᗮ := Submodule.isCompl_orthogonal_of_completeSpace\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nx : E\nthis : IsCompl K Kᗮ\n⊢ ↑(orthogonalProjection K) x = ↑(Submodule.linearProjOfIsCompl K Kᗮ (_ : IsCompl K Kᗮ)) x\n[PROOFSTEP]\nconv_lhs => rw [← Submodule.linear_proj_add_linearProjOfIsCompl_eq_self this x]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nx : E\nthis : IsCompl K Kᗮ\n| ↑(orthogonalProjection K) x\n[PROOFSTEP]\nrw [← Submodule.linear_proj_add_linearProjOfIsCompl_eq_self this x]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nx : E\nthis : IsCompl K Kᗮ\n| ↑(orthogonalProjection K) x\n[PROOFSTEP]\nrw [← Submodule.linear_proj_add_linearProjOfIsCompl_eq_self this x]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nx : E\nthis : IsCompl K Kᗮ\n| ↑(orthogonalProjection K) x\n[PROOFSTEP]\nrw [← Submodule.linear_proj_add_linearProjOfIsCompl_eq_self this x]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nx : E\nthis : IsCompl K Kᗮ\n⊢ ↑(orthogonalProjection K)\n      (↑(↑(Submodule.linearProjOfIsCompl K Kᗮ this) x) +\n        ↑(↑(Submodule.linearProjOfIsCompl Kᗮ K (_ : IsCompl Kᗮ K)) x)) =\n    ↑(Submodule.linearProjOfIsCompl K Kᗮ (_ : IsCompl K Kᗮ)) x\n[PROOFSTEP]\nrw [map_add, orthogonalProjection_mem_subspace_eq_self,\n  orthogonalProjection_mem_subspace_orthogonalComplement_eq_zero (Submodule.coe_mem _), add_zero]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nv : E\nhv : v ∈ Kᗮ\n⊢ ↑(reflection K) v = -v\n[PROOFSTEP]\nsimp [reflection_apply, orthogonalProjection_mem_subspace_orthogonalComplement_eq_zero hv]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace 𝕜 E\ninst✝² : InnerProductSpace ℝ F\nK U V : Submodule 𝕜 E\ninst✝¹ : HasOrthogonalProjection U\ninst✝ : HasOrthogonalProjection V\nh : U ≤ V\nx : E\n⊢ ↑(orthogonalProjection U) x = ↑(orthogonalProjection U) ↑(↑(orthogonalProjection V) x)\n[PROOFSTEP]\nsimpa only [sub_eq_zero, map_sub] using\n  orthogonalProjection_mem_subspace_orthogonalComplement_eq_zero\n    (Submodule.orthogonal_le h (sub_orthogonalProjection_mem_orthogonal x))\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝² : CompleteSpace E\nι : Type u_4\ninst✝¹ : SemilatticeSup ι\nU : ι → Submodule 𝕜 E\ninst✝ : ∀ (i : ι), CompleteSpace { x // x ∈ U i }\nhU : Monotone U\nx : E\n⊢ Tendsto (fun i => ↑(↑(orthogonalProjection (U i)) x)) atTop\n    (𝓝 ↑(↑(orthogonalProjection (Submodule.topologicalClosure (⨆ (i : ι), U i))) x))\n[PROOFSTEP]\ncases isEmpty_or_nonempty ι\n[GOAL]\ncase inl\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝² : CompleteSpace E\nι : Type u_4\ninst✝¹ : SemilatticeSup ι\nU : ι → Submodule 𝕜 E\ninst✝ : ∀ (i : ι), CompleteSpace { x // x ∈ U i }\nhU : Monotone U\nx : E\nh✝ : IsEmpty ι\n⊢ Tendsto (fun i => ↑(↑(orthogonalProjection (U i)) x)) atTop\n    (𝓝 ↑(↑(orthogonalProjection (Submodule.topologicalClosure (⨆ (i : ι), U i))) x))\n[PROOFSTEP]\nexact tendsto_of_isEmpty\n[GOAL]\ncase inr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝² : CompleteSpace E\nι : Type u_4\ninst✝¹ : SemilatticeSup ι\nU : ι → Submodule 𝕜 E\ninst✝ : ∀ (i : ι), CompleteSpace { x // x ∈ U i }\nhU : Monotone U\nx : E\nh✝ : Nonempty ι\n⊢ Tendsto (fun i => ↑(↑(orthogonalProjection (U i)) x)) atTop\n    (𝓝 ↑(↑(orthogonalProjection (Submodule.topologicalClosure (⨆ (i : ι), U i))) x))\n[PROOFSTEP]\nlet y := (orthogonalProjection (⨆ i, U i).topologicalClosure x : E)\n[GOAL]\ncase inr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝² : CompleteSpace E\nι : Type u_4\ninst✝¹ : SemilatticeSup ι\nU : ι → Submodule 𝕜 E\ninst✝ : ∀ (i : ι), CompleteSpace { x // x ∈ U i }\nhU : Monotone U\nx : E\nh✝ : Nonempty ι\ny : E := ↑(↑(orthogonalProjection (Submodule.topologicalClosure (⨆ (i : ι), U i))) x)\n⊢ Tendsto (fun i => ↑(↑(orthogonalProjection (U i)) x)) atTop\n    (𝓝 ↑(↑(orthogonalProjection (Submodule.topologicalClosure (⨆ (i : ι), U i))) x))\n[PROOFSTEP]\nhave proj_x : ∀ i, orthogonalProjection (U i) x = orthogonalProjection (U i) y := fun i =>\n  (orthogonalProjection_orthogonalProjection_of_le ((le_iSup U i).trans (iSup U).le_topologicalClosure) _).symm\n[GOAL]\ncase inr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝² : CompleteSpace E\nι : Type u_4\ninst✝¹ : SemilatticeSup ι\nU : ι → Submodule 𝕜 E\ninst✝ : ∀ (i : ι), CompleteSpace { x // x ∈ U i }\nhU : Monotone U\nx : E\nh✝ : Nonempty ι\ny : E := ↑(↑(orthogonalProjection (Submodule.topologicalClosure (⨆ (i : ι), U i))) x)\nproj_x : ∀ (i : ι), ↑(orthogonalProjection (U i)) x = ↑(orthogonalProjection (U i)) y\n⊢ Tendsto (fun i => ↑(↑(orthogonalProjection (U i)) x)) atTop\n    (𝓝 ↑(↑(orthogonalProjection (Submodule.topologicalClosure (⨆ (i : ι), U i))) x))\n[PROOFSTEP]\nsuffices ∀ ε > 0, ∃ I, ∀ i ≥ I, ‖(orthogonalProjection (U i) y : E) - y‖ < ε by\n  simpa only [proj_x, NormedAddCommGroup.tendsto_atTop] using this\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝² : CompleteSpace E\nι : Type u_4\ninst✝¹ : SemilatticeSup ι\nU : ι → Submodule 𝕜 E\ninst✝ : ∀ (i : ι), CompleteSpace { x // x ∈ U i }\nhU : Monotone U\nx : E\nh✝ : Nonempty ι\ny : E := ↑(↑(orthogonalProjection (Submodule.topologicalClosure (⨆ (i : ι), U i))) x)\nproj_x : ∀ (i : ι), ↑(orthogonalProjection (U i)) x = ↑(orthogonalProjection (U i)) y\nthis : ∀ (ε : ℝ), ε > 0 → ∃ I, ∀ (i : ι), i ≥ I → ‖↑(↑(orthogonalProjection (U i)) y) - y‖ < ε\n⊢ Tendsto (fun i => ↑(↑(orthogonalProjection (U i)) x)) atTop\n    (𝓝 ↑(↑(orthogonalProjection (Submodule.topologicalClosure (⨆ (i : ι), U i))) x))\n[PROOFSTEP]\nsimpa only [proj_x, NormedAddCommGroup.tendsto_atTop] using this\n[GOAL]\ncase inr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝² : CompleteSpace E\nι : Type u_4\ninst✝¹ : SemilatticeSup ι\nU : ι → Submodule 𝕜 E\ninst✝ : ∀ (i : ι), CompleteSpace { x // x ∈ U i }\nhU : Monotone U\nx : E\nh✝ : Nonempty ι\ny : E := ↑(↑(orthogonalProjection (Submodule.topologicalClosure (⨆ (i : ι), U i))) x)\nproj_x : ∀ (i : ι), ↑(orthogonalProjection (U i)) x = ↑(orthogonalProjection (U i)) y\n⊢ ∀ (ε : ℝ), ε > 0 → ∃ I, ∀ (i : ι), i ≥ I → ‖↑(↑(orthogonalProjection (U i)) y) - y‖ < ε\n[PROOFSTEP]\nintro ε hε\n[GOAL]\ncase inr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝² : CompleteSpace E\nι : Type u_4\ninst✝¹ : SemilatticeSup ι\nU : ι → Submodule 𝕜 E\ninst✝ : ∀ (i : ι), CompleteSpace { x // x ∈ U i }\nhU : Monotone U\nx : E\nh✝ : Nonempty ι\ny : E := ↑(↑(orthogonalProjection (Submodule.topologicalClosure (⨆ (i : ι), U i))) x)\nproj_x : ∀ (i : ι), ↑(orthogonalProjection (U i)) x = ↑(orthogonalProjection (U i)) y\nε : ℝ\nhε : ε > 0\n⊢ ∃ I, ∀ (i : ι), i ≥ I → ‖↑(↑(orthogonalProjection (U i)) y) - y‖ < ε\n[PROOFSTEP]\nobtain ⟨a, ha, hay⟩ : ∃ a ∈ ⨆ i, U i, dist y a < ε :=\n  by\n  have y_mem : y ∈ (⨆ i, U i).topologicalClosure := Submodule.coe_mem _\n  rw [← SetLike.mem_coe, Submodule.topologicalClosure_coe, Metric.mem_closure_iff] at y_mem \n  exact y_mem ε hε\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝² : CompleteSpace E\nι : Type u_4\ninst✝¹ : SemilatticeSup ι\nU : ι → Submodule 𝕜 E\ninst✝ : ∀ (i : ι), CompleteSpace { x // x ∈ U i }\nhU : Monotone U\nx : E\nh✝ : Nonempty ι\ny : E := ↑(↑(orthogonalProjection (Submodule.topologicalClosure (⨆ (i : ι), U i))) x)\nproj_x : ∀ (i : ι), ↑(orthogonalProjection (U i)) x = ↑(orthogonalProjection (U i)) y\nε : ℝ\nhε : ε > 0\n⊢ ∃ a, a ∈ ⨆ (i : ι), U i ∧ dist y a < ε\n[PROOFSTEP]\nhave y_mem : y ∈ (⨆ i, U i).topologicalClosure := Submodule.coe_mem _\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝² : CompleteSpace E\nι : Type u_4\ninst✝¹ : SemilatticeSup ι\nU : ι → Submodule 𝕜 E\ninst✝ : ∀ (i : ι), CompleteSpace { x // x ∈ U i }\nhU : Monotone U\nx : E\nh✝ : Nonempty ι\ny : E := ↑(↑(orthogonalProjection (Submodule.topologicalClosure (⨆ (i : ι), U i))) x)\nproj_x : ∀ (i : ι), ↑(orthogonalProjection (U i)) x = ↑(orthogonalProjection (U i)) y\nε : ℝ\nhε : ε > 0\ny_mem : y ∈ Submodule.topologicalClosure (⨆ (i : ι), U i)\n⊢ ∃ a, a ∈ ⨆ (i : ι), U i ∧ dist y a < ε\n[PROOFSTEP]\nrw [← SetLike.mem_coe, Submodule.topologicalClosure_coe, Metric.mem_closure_iff] at y_mem \n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝² : CompleteSpace E\nι : Type u_4\ninst✝¹ : SemilatticeSup ι\nU : ι → Submodule 𝕜 E\ninst✝ : ∀ (i : ι), CompleteSpace { x // x ∈ U i }\nhU : Monotone U\nx : E\nh✝ : Nonempty ι\ny : E := ↑(↑(orthogonalProjection (Submodule.topologicalClosure (⨆ (i : ι), U i))) x)\nproj_x : ∀ (i : ι), ↑(orthogonalProjection (U i)) x = ↑(orthogonalProjection (U i)) y\nε : ℝ\nhε : ε > 0\ny_mem : ∀ (ε : ℝ), ε > 0 → ∃ b, b ∈ ↑(⨆ (i : ι), U i) ∧ dist y b < ε\n⊢ ∃ a, a ∈ ⨆ (i : ι), U i ∧ dist y a < ε\n[PROOFSTEP]\nexact y_mem ε hε\n[GOAL]\ncase inr.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝² : CompleteSpace E\nι : Type u_4\ninst✝¹ : SemilatticeSup ι\nU : ι → Submodule 𝕜 E\ninst✝ : ∀ (i : ι), CompleteSpace { x // x ∈ U i }\nhU : Monotone U\nx : E\nh✝ : Nonempty ι\ny : E := ↑(↑(orthogonalProjection (Submodule.topologicalClosure (⨆ (i : ι), U i))) x)\nproj_x : ∀ (i : ι), ↑(orthogonalProjection (U i)) x = ↑(orthogonalProjection (U i)) y\nε : ℝ\nhε : ε > 0\na : E\nha : a ∈ ⨆ (i : ι), U i\nhay : dist y a < ε\n⊢ ∃ I, ∀ (i : ι), i ≥ I → ‖↑(↑(orthogonalProjection (U i)) y) - y‖ < ε\n[PROOFSTEP]\nrw [dist_eq_norm] at hay \n[GOAL]\ncase inr.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝² : CompleteSpace E\nι : Type u_4\ninst✝¹ : SemilatticeSup ι\nU : ι → Submodule 𝕜 E\ninst✝ : ∀ (i : ι), CompleteSpace { x // x ∈ U i }\nhU : Monotone U\nx : E\nh✝ : Nonempty ι\ny : E := ↑(↑(orthogonalProjection (Submodule.topologicalClosure (⨆ (i : ι), U i))) x)\nproj_x : ∀ (i : ι), ↑(orthogonalProjection (U i)) x = ↑(orthogonalProjection (U i)) y\nε : ℝ\nhε : ε > 0\na : E\nha : a ∈ ⨆ (i : ι), U i\nhay : ‖y - a‖ < ε\n⊢ ∃ I, ∀ (i : ι), i ≥ I → ‖↑(↑(orthogonalProjection (U i)) y) - y‖ < ε\n[PROOFSTEP]\nobtain ⟨I, hI⟩ : ∃ I, a ∈ U I := by rwa [Submodule.mem_iSup_of_directed _ hU.directed_le] at ha \n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝² : CompleteSpace E\nι : Type u_4\ninst✝¹ : SemilatticeSup ι\nU : ι → Submodule 𝕜 E\ninst✝ : ∀ (i : ι), CompleteSpace { x // x ∈ U i }\nhU : Monotone U\nx : E\nh✝ : Nonempty ι\ny : E := ↑(↑(orthogonalProjection (Submodule.topologicalClosure (⨆ (i : ι), U i))) x)\nproj_x : ∀ (i : ι), ↑(orthogonalProjection (U i)) x = ↑(orthogonalProjection (U i)) y\nε : ℝ\nhε : ε > 0\na : E\nha : a ∈ ⨆ (i : ι), U i\nhay : ‖y - a‖ < ε\n⊢ ∃ I, a ∈ U I\n[PROOFSTEP]\nrwa [Submodule.mem_iSup_of_directed _ hU.directed_le] at ha \n[GOAL]\ncase inr.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝² : CompleteSpace E\nι : Type u_4\ninst✝¹ : SemilatticeSup ι\nU : ι → Submodule 𝕜 E\ninst✝ : ∀ (i : ι), CompleteSpace { x // x ∈ U i }\nhU : Monotone U\nx : E\nh✝ : Nonempty ι\ny : E := ↑(↑(orthogonalProjection (Submodule.topologicalClosure (⨆ (i : ι), U i))) x)\nproj_x : ∀ (i : ι), ↑(orthogonalProjection (U i)) x = ↑(orthogonalProjection (U i)) y\nε : ℝ\nhε : ε > 0\na : E\nha : a ∈ ⨆ (i : ι), U i\nhay : ‖y - a‖ < ε\nI : ι\nhI : a ∈ U I\n⊢ ∃ I, ∀ (i : ι), i ≥ I → ‖↑(↑(orthogonalProjection (U i)) y) - y‖ < ε\n[PROOFSTEP]\nrefine' ⟨I, fun i (hi : I ≤ i) => _⟩\n[GOAL]\ncase inr.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝² : CompleteSpace E\nι : Type u_4\ninst✝¹ : SemilatticeSup ι\nU : ι → Submodule 𝕜 E\ninst✝ : ∀ (i : ι), CompleteSpace { x // x ∈ U i }\nhU : Monotone U\nx : E\nh✝ : Nonempty ι\ny : E := ↑(↑(orthogonalProjection (Submodule.topologicalClosure (⨆ (i : ι), U i))) x)\nproj_x : ∀ (i : ι), ↑(orthogonalProjection (U i)) x = ↑(orthogonalProjection (U i)) y\nε : ℝ\nhε : ε > 0\na : E\nha : a ∈ ⨆ (i : ι), U i\nhay : ‖y - a‖ < ε\nI : ι\nhI : a ∈ U I\ni : ι\nhi : I ≤ i\n⊢ ‖↑(↑(orthogonalProjection (U i)) y) - y‖ < ε\n[PROOFSTEP]\nrw [norm_sub_rev, orthogonalProjection_minimal]\n[GOAL]\ncase inr.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝² : CompleteSpace E\nι : Type u_4\ninst✝¹ : SemilatticeSup ι\nU : ι → Submodule 𝕜 E\ninst✝ : ∀ (i : ι), CompleteSpace { x // x ∈ U i }\nhU : Monotone U\nx : E\nh✝ : Nonempty ι\ny : E := ↑(↑(orthogonalProjection (Submodule.topologicalClosure (⨆ (i : ι), U i))) x)\nproj_x : ∀ (i : ι), ↑(orthogonalProjection (U i)) x = ↑(orthogonalProjection (U i)) y\nε : ℝ\nhε : ε > 0\na : E\nha : a ∈ ⨆ (i : ι), U i\nhay : ‖y - a‖ < ε\nI : ι\nhI : a ∈ U I\ni : ι\nhi : I ≤ i\n⊢ ⨅ (x : { x // x ∈ U i }), ‖y - ↑x‖ < ε\n[PROOFSTEP]\nrefine' lt_of_le_of_lt _ hay\n[GOAL]\ncase inr.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝² : CompleteSpace E\nι : Type u_4\ninst✝¹ : SemilatticeSup ι\nU : ι → Submodule 𝕜 E\ninst✝ : ∀ (i : ι), CompleteSpace { x // x ∈ U i }\nhU : Monotone U\nx : E\nh✝ : Nonempty ι\ny : E := ↑(↑(orthogonalProjection (Submodule.topologicalClosure (⨆ (i : ι), U i))) x)\nproj_x : ∀ (i : ι), ↑(orthogonalProjection (U i)) x = ↑(orthogonalProjection (U i)) y\nε : ℝ\nhε : ε > 0\na : E\nha : a ∈ ⨆ (i : ι), U i\nhay : ‖y - a‖ < ε\nI : ι\nhI : a ∈ U I\ni : ι\nhi : I ≤ i\n⊢ ⨅ (x : { x // x ∈ U i }), ‖y - ↑x‖ ≤ ‖y - a‖\n[PROOFSTEP]\nchange _ ≤ ‖y - (⟨a, hU hi hI⟩ : U i)‖\n[GOAL]\ncase inr.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝² : CompleteSpace E\nι : Type u_4\ninst✝¹ : SemilatticeSup ι\nU : ι → Submodule 𝕜 E\ninst✝ : ∀ (i : ι), CompleteSpace { x // x ∈ U i }\nhU : Monotone U\nx : E\nh✝ : Nonempty ι\ny : E := ↑(↑(orthogonalProjection (Submodule.topologicalClosure (⨆ (i : ι), U i))) x)\nproj_x : ∀ (i : ι), ↑(orthogonalProjection (U i)) x = ↑(orthogonalProjection (U i)) y\nε : ℝ\nhε : ε > 0\na : E\nha : a ∈ ⨆ (i : ι), U i\nhay : ‖y - a‖ < ε\nI : ι\nhI : a ∈ U I\ni : ι\nhi : I ≤ i\n⊢ ⨅ (x : { x // x ∈ U i }), ‖y - ↑x‖ ≤ ‖y - ↑{ val := a, property := (_ : a ∈ U i) }‖\n[PROOFSTEP]\nexact ciInf_le ⟨0, Set.forall_range_iff.mpr fun _ => norm_nonneg _⟩ _\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝² : CompleteSpace E\nι : Type u_4\ninst✝¹ : SemilatticeSup ι\nU : ι → Submodule 𝕜 E\ninst✝ : ∀ (t : ι), CompleteSpace { x // x ∈ U t }\nhU : Monotone U\nx : E\nhU' : ⊤ ≤ Submodule.topologicalClosure (⨆ (t : ι), U t)\n⊢ Tendsto (fun t => ↑(↑(orthogonalProjection (U t)) x)) atTop (𝓝 x)\n[PROOFSTEP]\nrw [← eq_top_iff] at hU' \n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝² : CompleteSpace E\nι : Type u_4\ninst✝¹ : SemilatticeSup ι\nU : ι → Submodule 𝕜 E\ninst✝ : ∀ (t : ι), CompleteSpace { x // x ∈ U t }\nhU : Monotone U\nx : E\nhU' : Submodule.topologicalClosure (⨆ (t : ι), U t) = ⊤\n⊢ Tendsto (fun t => ↑(↑(orthogonalProjection (U t)) x)) atTop (𝓝 x)\n[PROOFSTEP]\nconvert orthogonalProjection_tendsto_closure_iSup U hU x\n[GOAL]\ncase h.e'_5.h.e'_3\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝² : CompleteSpace E\nι : Type u_4\ninst✝¹ : SemilatticeSup ι\nU : ι → Submodule 𝕜 E\ninst✝ : ∀ (t : ι), CompleteSpace { x // x ∈ U t }\nhU : Monotone U\nx : E\nhU' : Submodule.topologicalClosure (⨆ (t : ι), U t) = ⊤\n⊢ x = ↑(↑(orthogonalProjection (Submodule.topologicalClosure (⨆ (i : ι), U i))) x)\n[PROOFSTEP]\nrw [orthogonalProjection_eq_self_iff.mpr _]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝² : CompleteSpace E\nι : Type u_4\ninst✝¹ : SemilatticeSup ι\nU : ι → Submodule 𝕜 E\ninst✝ : ∀ (t : ι), CompleteSpace { x // x ∈ U t }\nhU : Monotone U\nx : E\nhU' : Submodule.topologicalClosure (⨆ (t : ι), U t) = ⊤\n⊢ x ∈ Submodule.topologicalClosure (⨆ (i : ι), U i)\n[PROOFSTEP]\nrw [hU']\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝² : CompleteSpace E\nι : Type u_4\ninst✝¹ : SemilatticeSup ι\nU : ι → Submodule 𝕜 E\ninst✝ : ∀ (t : ι), CompleteSpace { x // x ∈ U t }\nhU : Monotone U\nx : E\nhU' : Submodule.topologicalClosure (⨆ (t : ι), U t) = ⊤\n⊢ x ∈ ⊤\n[PROOFSTEP]\ntrivial\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : CompleteSpace E\n⊢ Kᗮᗮᗮ = Kᗮ\n[PROOFSTEP]\nrw [Kᗮ.orthogonal_orthogonal_eq_closure]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : CompleteSpace E\n⊢ topologicalClosure Kᗮ = Kᗮ\n[PROOFSTEP]\nexact K.isClosed_orthogonal.submodule_topologicalClosure_eq\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : CompleteSpace E\n⊢ topologicalClosure K = ⊤ ↔ Kᗮ = ⊥\n[PROOFSTEP]\nrw [← Submodule.orthogonal_orthogonal_eq_closure]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : CompleteSpace E\n⊢ Kᗮᗮ = ⊤ ↔ Kᗮ = ⊥\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : CompleteSpace E\n⊢ Kᗮᗮ = ⊤ → Kᗮ = ⊥\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : CompleteSpace E\n⊢ Kᗮ = ⊥ → Kᗮᗮ = ⊤\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : CompleteSpace E\nh : Kᗮᗮ = ⊤\n⊢ Kᗮ = ⊥\n[PROOFSTEP]\nrw [← Submodule.triorthogonal_eq_orthogonal, h, Submodule.top_orthogonal_eq_bot]\n[GOAL]\ncase mpr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : CompleteSpace E\nh : Kᗮ = ⊥\n⊢ Kᗮᗮ = ⊤\n[PROOFSTEP]\nrw [h, Submodule.bot_orthogonal_eq_top]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nx y : E\nhK : Dense ↑K\nh : ∀ (v : { x // x ∈ K }), inner x ↑v = 0\n⊢ x = 0\n[PROOFSTEP]\nhave : (⟪x, ·⟫) = 0 := (continuous_const.inner continuous_id).ext_on hK continuous_const (Subtype.forall.1 h)\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nx y : E\nhK : Dense ↑K\nh : ∀ (v : { x // x ∈ K }), inner x ↑v = 0\nthis : (fun x_1 => inner x x_1) = 0\n⊢ x = 0\n[PROOFSTEP]\nsimpa using congr_fun this x\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nx y : E\nhK : Dense ↑K\nh : ∀ (v : { x // x ∈ K }), inner (↑v) x = 0\nv : { x // x ∈ K }\n⊢ inner (↑v) x = inner (↑v) 0\n[PROOFSTEP]\nrw [inner_zero_right, h v]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nv w : F\nh : ‖v‖ = ‖w‖\n⊢ ↑(reflection (Submodule.span ℝ {v - w})ᗮ) v = w\n[PROOFSTEP]\nset R : F ≃ₗᵢ[ℝ] F := reflection (ℝ ∙ v - w)ᗮ\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nv w : F\nh : ‖v‖ = ‖w‖\nR : F ≃ₗᵢ[ℝ] F := reflection (Submodule.span ℝ {v - w})ᗮ\n⊢ ↑R v = w\n[PROOFSTEP]\nsuffices R v + R v = w + w by\n  apply smul_right_injective F (by norm_num : (2 : ℝ) ≠ 0)\n  simpa [two_smul] using this\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nv w : F\nh : ‖v‖ = ‖w‖\nR : F ≃ₗᵢ[ℝ] F := reflection (Submodule.span ℝ {v - w})ᗮ\nthis : ↑R v + ↑R v = w + w\n⊢ ↑R v = w\n[PROOFSTEP]\napply smul_right_injective F (by norm_num : (2 : ℝ) ≠ 0)\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nv w : F\nh : ‖v‖ = ‖w‖\nR : F ≃ₗᵢ[ℝ] F := reflection (Submodule.span ℝ {v - w})ᗮ\nthis : ↑R v + ↑R v = w + w\n⊢ 2 ≠ 0\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase a\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nv w : F\nh : ‖v‖ = ‖w‖\nR : F ≃ₗᵢ[ℝ] F := reflection (Submodule.span ℝ {v - w})ᗮ\nthis : ↑R v + ↑R v = w + w\n⊢ (fun x x_1 => x • x_1) 2 (↑R v) = (fun x x_1 => x • x_1) 2 w\n[PROOFSTEP]\nsimpa [two_smul] using this\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nv w : F\nh : ‖v‖ = ‖w‖\nR : F ≃ₗᵢ[ℝ] F := reflection (Submodule.span ℝ {v - w})ᗮ\n⊢ ↑R v + ↑R v = w + w\n[PROOFSTEP]\nhave h₁ : R (v - w) = -(v - w) := reflection_orthogonalComplement_singleton_eq_neg (v - w)\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nv w : F\nh : ‖v‖ = ‖w‖\nR : F ≃ₗᵢ[ℝ] F := reflection (Submodule.span ℝ {v - w})ᗮ\nh₁ : ↑R (v - w) = -(v - w)\n⊢ ↑R v + ↑R v = w + w\n[PROOFSTEP]\nhave h₂ : R (v + w) = v + w := by\n  apply reflection_mem_subspace_eq_self\n  rw [Submodule.mem_orthogonal_singleton_iff_inner_left]\n  rw [real_inner_add_sub_eq_zero_iff]\n  exact h\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nv w : F\nh : ‖v‖ = ‖w‖\nR : F ≃ₗᵢ[ℝ] F := reflection (Submodule.span ℝ {v - w})ᗮ\nh₁ : ↑R (v - w) = -(v - w)\n⊢ ↑R (v + w) = v + w\n[PROOFSTEP]\napply reflection_mem_subspace_eq_self\n[GOAL]\ncase hx\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nv w : F\nh : ‖v‖ = ‖w‖\nR : F ≃ₗᵢ[ℝ] F := reflection (Submodule.span ℝ {v - w})ᗮ\nh₁ : ↑R (v - w) = -(v - w)\n⊢ v + w ∈ (Submodule.span ℝ {v - w})ᗮ\n[PROOFSTEP]\nrw [Submodule.mem_orthogonal_singleton_iff_inner_left]\n[GOAL]\ncase hx\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nv w : F\nh : ‖v‖ = ‖w‖\nR : F ≃ₗᵢ[ℝ] F := reflection (Submodule.span ℝ {v - w})ᗮ\nh₁ : ↑R (v - w) = -(v - w)\n⊢ inner (v + w) (v - w) = 0\n[PROOFSTEP]\nrw [real_inner_add_sub_eq_zero_iff]\n[GOAL]\ncase hx\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nv w : F\nh : ‖v‖ = ‖w‖\nR : F ≃ₗᵢ[ℝ] F := reflection (Submodule.span ℝ {v - w})ᗮ\nh₁ : ↑R (v - w) = -(v - w)\n⊢ ‖v‖ = ‖w‖\n[PROOFSTEP]\nexact h\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nv w : F\nh : ‖v‖ = ‖w‖\nR : F ≃ₗᵢ[ℝ] F := reflection (Submodule.span ℝ {v - w})ᗮ\nh₁ : ↑R (v - w) = -(v - w)\nh₂ : ↑R (v + w) = v + w\n⊢ ↑R v + ↑R v = w + w\n[PROOFSTEP]\nconvert congr_arg₂ (· + ·) h₂ h₁ using 1\n[GOAL]\ncase h.e'_2\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nv w : F\nh : ‖v‖ = ‖w‖\nR : F ≃ₗᵢ[ℝ] F := reflection (Submodule.span ℝ {v - w})ᗮ\nh₁ : ↑R (v - w) = -(v - w)\nh₂ : ↑R (v + w) = v + w\n⊢ ↑R v + ↑R v = ↑R (v + w) + ↑R (v - w)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.e'_3\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nv w : F\nh : ‖v‖ = ‖w‖\nR : F ≃ₗᵢ[ℝ] F := reflection (Submodule.span ℝ {v - w})ᗮ\nh₁ : ↑R (v - w) = -(v - w)\nh₂ : ↑R (v + w) = v + w\n⊢ w + w = v + w + -(v - w)\n[PROOFSTEP]\nabel\n[GOAL]\ncase h.e'_3\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nv w : F\nh : ‖v‖ = ‖w‖\nR : F ≃ₗᵢ[ℝ] F := reflection (Submodule.span ℝ {v - w})ᗮ\nh₁ : ↑R (v - w) = -(v - w)\nh₂ : ↑R (v + w) = v + w\n⊢ w + w = v + w + -(v - w)\n[PROOFSTEP]\nabel\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nw : E\n⊢ ↑(↑(orthogonalProjection K) w) + ↑(↑(orthogonalProjection Kᗮ) w) = w\n[PROOFSTEP]\nsimp\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nx : E\nS : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection S\n⊢ ‖x‖ ^ 2 = ‖↑(↑(orthogonalProjection S) x) + ↑(↑(orthogonalProjection Sᗮ) x)‖ ^ 2\n[PROOFSTEP]\nrw [orthogonalProjection_add_orthogonalProjection_orthogonal]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nx : E\nS : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection S\n⊢ ‖↑(↑(orthogonalProjection S) x) + ↑(↑(orthogonalProjection Sᗮ) x)‖ ^ 2 =\n    ‖↑(orthogonalProjection S) x‖ ^ 2 + ‖↑(orthogonalProjection Sᗮ) x‖ ^ 2\n[PROOFSTEP]\nsimp only [sq]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nx : E\nS : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection S\n⊢ ‖↑(↑(orthogonalProjection S) x) + ↑(↑(orthogonalProjection Sᗮ) x)‖ *\n      ‖↑(↑(orthogonalProjection S) x) + ↑(↑(orthogonalProjection Sᗮ) x)‖ =\n    ‖↑(orthogonalProjection S) x‖ * ‖↑(orthogonalProjection S) x‖ +\n      ‖↑(orthogonalProjection Sᗮ) x‖ * ‖↑(orthogonalProjection Sᗮ) x‖\n[PROOFSTEP]\nexact\n  norm_add_sq_eq_norm_sq_add_norm_sq_of_inner_eq_zero _ _ <|\n    (S.mem_orthogonal _).1 (orthogonalProjection Sᗮ x).2 _ (orthogonalProjection S x).2\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\n⊢ ContinuousLinearMap.id 𝕜 E =\n    ContinuousLinearMap.comp (Submodule.subtypeL K) (orthogonalProjection K) +\n      ContinuousLinearMap.comp (Submodule.subtypeL Kᗮ) (orthogonalProjection Kᗮ)\n[PROOFSTEP]\next w\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nw : E\n⊢ ↑(ContinuousLinearMap.id 𝕜 E) w =\n    ↑(ContinuousLinearMap.comp (Submodule.subtypeL K) (orthogonalProjection K) +\n          ContinuousLinearMap.comp (Submodule.subtypeL Kᗮ) (orthogonalProjection Kᗮ))\n      w\n[PROOFSTEP]\nexact (orthogonalProjection_add_orthogonalProjection_orthogonal K w).symm\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nu : { x // x ∈ K }\nv : E\n⊢ inner ↑(↑(orthogonalProjection K) v) ↑u =\n    inner ↑(↑(orthogonalProjection K) v) ↑u + inner (v - ↑(↑(orthogonalProjection K) v)) ↑u\n[PROOFSTEP]\nrw [orthogonalProjection_inner_eq_zero _ _ (Submodule.coe_mem _), add_zero]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nu : { x // x ∈ K }\nv : E\n⊢ inner ↑(↑(orthogonalProjection K) v) ↑u + inner (v - ↑(↑(orthogonalProjection K) v)) ↑u = inner v ↑u\n[PROOFSTEP]\nrw [← inner_add_left, add_sub_cancel'_right]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nu : { x // x ∈ K }\nv : E\n⊢ inner u (↑(orthogonalProjection K) v) = inner (↑u) v\n[PROOFSTEP]\nrw [← inner_conj_symm, ← inner_conj_symm (u : E), inner_orthogonalProjection_eq_of_mem_right]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : HasOrthogonalProjection K\nu v : E\n⊢ inner (↑(↑(orthogonalProjection K) u)) v = inner u ↑(↑(orthogonalProjection K) v)\n[PROOFSTEP]\nrw [← inner_orthogonalProjection_eq_of_mem_left, inner_orthogonalProjection_eq_of_mem_right]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK K₁ K₂ : Submodule 𝕜 E\ninst✝ : FiniteDimensional 𝕜 { x // x ∈ K₂ }\nh : K₁ ≤ K₂\n⊢ finrank 𝕜 { x // x ∈ K₁ } + finrank 𝕜 { x // x ∈ K₁ᗮ ⊓ K₂ } = finrank 𝕜 { x // x ∈ K₂ }\n[PROOFSTEP]\nhaveI : FiniteDimensional 𝕜 K₁ := Submodule.finiteDimensional_of_le h\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK K₁ K₂ : Submodule 𝕜 E\ninst✝ : FiniteDimensional 𝕜 { x // x ∈ K₂ }\nh : K₁ ≤ K₂\nthis : FiniteDimensional 𝕜 { x // x ∈ K₁ }\n⊢ finrank 𝕜 { x // x ∈ K₁ } + finrank 𝕜 { x // x ∈ K₁ᗮ ⊓ K₂ } = finrank 𝕜 { x // x ∈ K₂ }\n[PROOFSTEP]\nhaveI := proper_isROrC 𝕜 K₁\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK K₁ K₂ : Submodule 𝕜 E\ninst✝ : FiniteDimensional 𝕜 { x // x ∈ K₂ }\nh : K₁ ≤ K₂\nthis✝ : FiniteDimensional 𝕜 { x // x ∈ K₁ }\nthis : ProperSpace { x // x ∈ K₁ }\n⊢ finrank 𝕜 { x // x ∈ K₁ } + finrank 𝕜 { x // x ∈ K₁ᗮ ⊓ K₂ } = finrank 𝕜 { x // x ∈ K₂ }\n[PROOFSTEP]\nhave hd := Submodule.finrank_sup_add_finrank_inf_eq K₁ (K₁ᗮ ⊓ K₂)\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK K₁ K₂ : Submodule 𝕜 E\ninst✝ : FiniteDimensional 𝕜 { x // x ∈ K₂ }\nh : K₁ ≤ K₂\nthis✝ : FiniteDimensional 𝕜 { x // x ∈ K₁ }\nthis : ProperSpace { x // x ∈ K₁ }\nhd :\n  finrank 𝕜 { x // x ∈ K₁ ⊔ K₁ᗮ ⊓ K₂ } + finrank 𝕜 { x // x ∈ K₁ ⊓ (K₁ᗮ ⊓ K₂) } =\n    finrank 𝕜 { x // x ∈ K₁ } + finrank 𝕜 { x // x ∈ K₁ᗮ ⊓ K₂ }\n⊢ finrank 𝕜 { x // x ∈ K₁ } + finrank 𝕜 { x // x ∈ K₁ᗮ ⊓ K₂ } = finrank 𝕜 { x // x ∈ K₂ }\n[PROOFSTEP]\nrw [← inf_assoc, (Submodule.orthogonal_disjoint K₁).eq_bot, bot_inf_eq, finrank_bot,\n  Submodule.sup_orthogonal_inf_of_completeSpace h] at hd \n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK K₁ K₂ : Submodule 𝕜 E\ninst✝ : FiniteDimensional 𝕜 { x // x ∈ K₂ }\nh : K₁ ≤ K₂\nthis✝ : FiniteDimensional 𝕜 { x // x ∈ K₁ }\nthis : ProperSpace { x // x ∈ K₁ }\nhd : finrank 𝕜 { x // x ∈ K₂ } + 0 = finrank 𝕜 { x // x ∈ K₁ } + finrank 𝕜 { x // x ∈ K₁ᗮ ⊓ K₂ }\n⊢ finrank 𝕜 { x // x ∈ K₁ } + finrank 𝕜 { x // x ∈ K₁ᗮ ⊓ K₂ } = finrank 𝕜 { x // x ∈ K₂ }\n[PROOFSTEP]\nrw [add_zero] at hd \n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK K₁ K₂ : Submodule 𝕜 E\ninst✝ : FiniteDimensional 𝕜 { x // x ∈ K₂ }\nh : K₁ ≤ K₂\nthis✝ : FiniteDimensional 𝕜 { x // x ∈ K₁ }\nthis : ProperSpace { x // x ∈ K₁ }\nhd : finrank 𝕜 { x // x ∈ K₂ } = finrank 𝕜 { x // x ∈ K₁ } + finrank 𝕜 { x // x ∈ K₁ᗮ ⊓ K₂ }\n⊢ finrank 𝕜 { x // x ∈ K₁ } + finrank 𝕜 { x // x ∈ K₁ᗮ ⊓ K₂ } = finrank 𝕜 { x // x ∈ K₂ }\n[PROOFSTEP]\nexact hd.symm\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK K₁ K₂ : Submodule 𝕜 E\ninst✝ : FiniteDimensional 𝕜 { x // x ∈ K₂ }\nh : K₁ ≤ K₂\nn : ℕ\nh_dim : finrank 𝕜 { x // x ∈ K₁ } + n = finrank 𝕜 { x // x ∈ K₂ }\n⊢ finrank 𝕜 { x // x ∈ K₁ᗮ ⊓ K₂ } = n\n[PROOFSTEP]\nrw [← add_right_inj (finrank 𝕜 K₁)]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK K₁ K₂ : Submodule 𝕜 E\ninst✝ : FiniteDimensional 𝕜 { x // x ∈ K₂ }\nh : K₁ ≤ K₂\nn : ℕ\nh_dim : finrank 𝕜 { x // x ∈ K₁ } + n = finrank 𝕜 { x // x ∈ K₂ }\n⊢ finrank 𝕜 { x // x ∈ K₁ } + finrank 𝕜 { x // x ∈ K₁ᗮ ⊓ K₂ } = finrank 𝕜 { x // x ∈ K₁ } + n\n[PROOFSTEP]\nsimp [Submodule.finrank_add_inf_finrank_orthogonal h, h_dim]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK✝ : Submodule 𝕜 E\ninst✝ : FiniteDimensional 𝕜 E\nK : Submodule 𝕜 E\n⊢ finrank 𝕜 { x // x ∈ K } + finrank 𝕜 { x // x ∈ Kᗮ } = finrank 𝕜 E\n[PROOFSTEP]\nconvert Submodule.finrank_add_inf_finrank_orthogonal (le_top : K ≤ ⊤) using 1\n[GOAL]\ncase h.e'_2\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK✝ : Submodule 𝕜 E\ninst✝ : FiniteDimensional 𝕜 E\nK : Submodule 𝕜 E\n⊢ finrank 𝕜 { x // x ∈ K } + finrank 𝕜 { x // x ∈ Kᗮ } = finrank 𝕜 { x // x ∈ K } + finrank 𝕜 { x // x ∈ Kᗮ ⊓ ⊤ }\n[PROOFSTEP]\nrw [inf_top_eq]\n[GOAL]\ncase h.e'_3\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK✝ : Submodule 𝕜 E\ninst✝ : FiniteDimensional 𝕜 E\nK : Submodule 𝕜 E\n⊢ finrank 𝕜 E = finrank 𝕜 { x // x ∈ ⊤ }\n[PROOFSTEP]\nsimp\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK✝ : Submodule 𝕜 E\ninst✝ : FiniteDimensional 𝕜 E\nK : Submodule 𝕜 E\nn : ℕ\nh_dim : finrank 𝕜 { x // x ∈ K } + n = finrank 𝕜 E\n⊢ finrank 𝕜 { x // x ∈ Kᗮ } = n\n[PROOFSTEP]\nrw [← add_right_inj (finrank 𝕜 K)]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK✝ : Submodule 𝕜 E\ninst✝ : FiniteDimensional 𝕜 E\nK : Submodule 𝕜 E\nn : ℕ\nh_dim : finrank 𝕜 { x // x ∈ K } + n = finrank 𝕜 E\n⊢ finrank 𝕜 { x // x ∈ K } + finrank 𝕜 { x // x ∈ Kᗮ } = finrank 𝕜 { x // x ∈ K } + n\n[PROOFSTEP]\nsimp [Submodule.finrank_add_finrank_orthogonal, h_dim]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nn : ℕ\n_i : Fact (finrank 𝕜 E = n + 1)\nv : E\nhv : v ≠ 0\n⊢ finrank 𝕜 { x // x ∈ (Submodule.span 𝕜 {v})ᗮ } = n\n[PROOFSTEP]\nhaveI : FiniteDimensional 𝕜 E := fact_finiteDimensional_of_finrank_eq_succ n\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nn : ℕ\n_i : Fact (finrank 𝕜 E = n + 1)\nv : E\nhv : v ≠ 0\nthis : FiniteDimensional 𝕜 E\n⊢ finrank 𝕜 { x // x ∈ (Submodule.span 𝕜 {v})ᗮ } = n\n[PROOFSTEP]\nexact Submodule.finrank_add_finrank_orthogonal' <| by simp [finrank_span_singleton hv, _i.elim, add_comm]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nn : ℕ\n_i : Fact (finrank 𝕜 E = n + 1)\nv : E\nhv : v ≠ 0\nthis : FiniteDimensional 𝕜 E\n⊢ finrank 𝕜 { x // x ∈ Submodule.span 𝕜 {v} } + n = finrank 𝕜 E\n[PROOFSTEP]\nsimp [finrank_span_singleton hv, _i.elim, add_comm]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : FiniteDimensional ℝ F\nn : ℕ\nφ : F ≃ₗᵢ[ℝ] F\nhn : finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)))ᗮ } ≤ n\n⊢ ∃ l, List.length l ≤ n ∧ φ = List.prod (List.map (fun v => reflection (Submodule.span ℝ {v})ᗮ) l)\n[PROOFSTEP]\ninduction' n with n IH generalizing φ\n[GOAL]\ncase zero\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : FiniteDimensional ℝ F\nn : ℕ\nφ✝ : F ≃ₗᵢ[ℝ] F\nhn✝ : finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ✝.toLinearEquiv)))ᗮ } ≤ n\nφ : F ≃ₗᵢ[ℝ] F\nhn : finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)))ᗮ } ≤ Nat.zero\n⊢ ∃ l, List.length l ≤ Nat.zero ∧ φ = List.prod (List.map (fun v => reflection (Submodule.span ℝ {v})ᗮ) l)\n[PROOFSTEP]\nrefine' ⟨[], rfl.le, show φ = 1 from _⟩\n[GOAL]\ncase zero\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : FiniteDimensional ℝ F\nn : ℕ\nφ✝ : F ≃ₗᵢ[ℝ] F\nhn✝ : finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ✝.toLinearEquiv)))ᗮ } ≤ n\nφ : F ≃ₗᵢ[ℝ] F\nhn : finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)))ᗮ } ≤ Nat.zero\n⊢ φ = 1\n[PROOFSTEP]\nhave : ker (ContinuousLinearMap.id ℝ F - φ) = ⊤ := by\n  rwa [Nat.zero_eq, le_zero_iff, finrank_eq_zero, Submodule.orthogonal_eq_bot_iff] at hn \n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : FiniteDimensional ℝ F\nn : ℕ\nφ✝ : F ≃ₗᵢ[ℝ] F\nhn✝ : finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ✝.toLinearEquiv)))ᗮ } ≤ n\nφ : F ≃ₗᵢ[ℝ] F\nhn : finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)))ᗮ } ≤ Nat.zero\n⊢ ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)) = ⊤\n[PROOFSTEP]\nrwa [Nat.zero_eq, le_zero_iff, finrank_eq_zero, Submodule.orthogonal_eq_bot_iff] at hn \n[GOAL]\ncase zero\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : FiniteDimensional ℝ F\nn : ℕ\nφ✝ : F ≃ₗᵢ[ℝ] F\nhn✝ : finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ✝.toLinearEquiv)))ᗮ } ≤ n\nφ : F ≃ₗᵢ[ℝ] F\nhn : finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)))ᗮ } ≤ Nat.zero\nthis : ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)) = ⊤\n⊢ φ = 1\n[PROOFSTEP]\nsymm\n[GOAL]\ncase zero\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : FiniteDimensional ℝ F\nn : ℕ\nφ✝ : F ≃ₗᵢ[ℝ] F\nhn✝ : finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ✝.toLinearEquiv)))ᗮ } ≤ n\nφ : F ≃ₗᵢ[ℝ] F\nhn : finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)))ᗮ } ≤ Nat.zero\nthis : ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)) = ⊤\n⊢ 1 = φ\n[PROOFSTEP]\next x\n[GOAL]\ncase zero.h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : FiniteDimensional ℝ F\nn : ℕ\nφ✝ : F ≃ₗᵢ[ℝ] F\nhn✝ : finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ✝.toLinearEquiv)))ᗮ } ≤ n\nφ : F ≃ₗᵢ[ℝ] F\nhn : finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)))ᗮ } ≤ Nat.zero\nthis : ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)) = ⊤\nx : F\n⊢ ↑1 x = ↑φ x\n[PROOFSTEP]\nhave := LinearMap.congr_fun (LinearMap.ker_eq_top.mp this) x\n[GOAL]\ncase zero.h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : FiniteDimensional ℝ F\nn : ℕ\nφ✝ : F ≃ₗᵢ[ℝ] F\nhn✝ : finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ✝.toLinearEquiv)))ᗮ } ≤ n\nφ : F ≃ₗᵢ[ℝ] F\nhn : finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)))ᗮ } ≤ Nat.zero\nthis✝ : ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)) = ⊤\nx : F\nthis : ↑↑(ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)) x = ↑0 x\n⊢ ↑1 x = ↑φ x\n[PROOFSTEP]\nsimpa only [sub_eq_zero, ContinuousLinearMap.coe_sub, LinearMap.sub_apply, LinearMap.zero_apply] using this\n[GOAL]\ncase succ\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : FiniteDimensional ℝ F\nn✝ : ℕ\nφ✝ : F ≃ₗᵢ[ℝ] F\nhn✝ : finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ✝.toLinearEquiv)))ᗮ } ≤ n✝\nn : ℕ\nIH :\n  ∀ (φ : F ≃ₗᵢ[ℝ] F),\n    finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)))ᗮ } ≤ n →\n      ∃ l, List.length l ≤ n ∧ φ = List.prod (List.map (fun v => reflection (Submodule.span ℝ {v})ᗮ) l)\nφ : F ≃ₗᵢ[ℝ] F\nhn :\n  finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)))ᗮ } ≤ Nat.succ n\n⊢ ∃ l, List.length l ≤ Nat.succ n ∧ φ = List.prod (List.map (fun v => reflection (Submodule.span ℝ {v})ᗮ) l)\n[PROOFSTEP]\nlet W := ker (ContinuousLinearMap.id ℝ F - φ)\n[GOAL]\ncase succ\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : FiniteDimensional ℝ F\nn✝ : ℕ\nφ✝ : F ≃ₗᵢ[ℝ] F\nhn✝ : finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ✝.toLinearEquiv)))ᗮ } ≤ n✝\nn : ℕ\nIH :\n  ∀ (φ : F ≃ₗᵢ[ℝ] F),\n    finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)))ᗮ } ≤ n →\n      ∃ l, List.length l ≤ n ∧ φ = List.prod (List.map (fun v => reflection (Submodule.span ℝ {v})ᗮ) l)\nφ : F ≃ₗᵢ[ℝ] F\nhn :\n  finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)))ᗮ } ≤ Nat.succ n\nW : Submodule ℝ F := ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv))\n⊢ ∃ l, List.length l ≤ Nat.succ n ∧ φ = List.prod (List.map (fun v => reflection (Submodule.span ℝ {v})ᗮ) l)\n[PROOFSTEP]\nhave hW : ∀ w ∈ W, φ w = w := fun w hw => (sub_eq_zero.mp hw).symm\n[GOAL]\ncase succ\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : FiniteDimensional ℝ F\nn✝ : ℕ\nφ✝ : F ≃ₗᵢ[ℝ] F\nhn✝ : finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ✝.toLinearEquiv)))ᗮ } ≤ n✝\nn : ℕ\nIH :\n  ∀ (φ : F ≃ₗᵢ[ℝ] F),\n    finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)))ᗮ } ≤ n →\n      ∃ l, List.length l ≤ n ∧ φ = List.prod (List.map (fun v => reflection (Submodule.span ℝ {v})ᗮ) l)\nφ : F ≃ₗᵢ[ℝ] F\nhn :\n  finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)))ᗮ } ≤ Nat.succ n\nW : Submodule ℝ F := ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv))\nhW : ∀ (w : F), w ∈ W → ↑φ w = w\n⊢ ∃ l, List.length l ≤ Nat.succ n ∧ φ = List.prod (List.map (fun v => reflection (Submodule.span ℝ {v})ᗮ) l)\n[PROOFSTEP]\nby_cases hn' : finrank ℝ Wᗮ ≤ n\n[GOAL]\ncase pos\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : FiniteDimensional ℝ F\nn✝ : ℕ\nφ✝ : F ≃ₗᵢ[ℝ] F\nhn✝ : finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ✝.toLinearEquiv)))ᗮ } ≤ n✝\nn : ℕ\nIH :\n  ∀ (φ : F ≃ₗᵢ[ℝ] F),\n    finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)))ᗮ } ≤ n →\n      ∃ l, List.length l ≤ n ∧ φ = List.prod (List.map (fun v => reflection (Submodule.span ℝ {v})ᗮ) l)\nφ : F ≃ₗᵢ[ℝ] F\nhn :\n  finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)))ᗮ } ≤ Nat.succ n\nW : Submodule ℝ F := ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv))\nhW : ∀ (w : F), w ∈ W → ↑φ w = w\nhn' : finrank ℝ { x // x ∈ Wᗮ } ≤ n\n⊢ ∃ l, List.length l ≤ Nat.succ n ∧ φ = List.prod (List.map (fun v => reflection (Submodule.span ℝ {v})ᗮ) l)\n[PROOFSTEP]\nobtain ⟨V, hV₁, hV₂⟩ := IH φ hn'\n[GOAL]\ncase pos.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : FiniteDimensional ℝ F\nn✝ : ℕ\nφ✝ : F ≃ₗᵢ[ℝ] F\nhn✝ : finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ✝.toLinearEquiv)))ᗮ } ≤ n✝\nn : ℕ\nIH :\n  ∀ (φ : F ≃ₗᵢ[ℝ] F),\n    finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)))ᗮ } ≤ n →\n      ∃ l, List.length l ≤ n ∧ φ = List.prod (List.map (fun v => reflection (Submodule.span ℝ {v})ᗮ) l)\nφ : F ≃ₗᵢ[ℝ] F\nhn :\n  finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)))ᗮ } ≤ Nat.succ n\nW : Submodule ℝ F := ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv))\nhW : ∀ (w : F), w ∈ W → ↑φ w = w\nhn' : finrank ℝ { x // x ∈ Wᗮ } ≤ n\nV : List F\nhV₁ : List.length V ≤ n\nhV₂ : φ = List.prod (List.map (fun v => reflection (Submodule.span ℝ {v})ᗮ) V)\n⊢ ∃ l, List.length l ≤ Nat.succ n ∧ φ = List.prod (List.map (fun v => reflection (Submodule.span ℝ {v})ᗮ) l)\n[PROOFSTEP]\nexact\n  ⟨V, hV₁.trans n.le_succ, hV₂⟩\n    -- Take a nonzero element `v` of the orthogonal complement of `W`.\n[GOAL]\ncase neg\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : FiniteDimensional ℝ F\nn✝ : ℕ\nφ✝ : F ≃ₗᵢ[ℝ] F\nhn✝ : finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ✝.toLinearEquiv)))ᗮ } ≤ n✝\nn : ℕ\nIH :\n  ∀ (φ : F ≃ₗᵢ[ℝ] F),\n    finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)))ᗮ } ≤ n →\n      ∃ l, List.length l ≤ n ∧ φ = List.prod (List.map (fun v => reflection (Submodule.span ℝ {v})ᗮ) l)\nφ : F ≃ₗᵢ[ℝ] F\nhn :\n  finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)))ᗮ } ≤ Nat.succ n\nW : Submodule ℝ F := ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv))\nhW : ∀ (w : F), w ∈ W → ↑φ w = w\nhn' : ¬finrank ℝ { x // x ∈ Wᗮ } ≤ n\n⊢ ∃ l, List.length l ≤ Nat.succ n ∧ φ = List.prod (List.map (fun v => reflection (Submodule.span ℝ {v})ᗮ) l)\n[PROOFSTEP]\nhaveI : Nontrivial Wᗮ := nontrivial_of_finrank_pos (by linarith [zero_le n] : 0 < finrank ℝ Wᗮ)\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : FiniteDimensional ℝ F\nn✝ : ℕ\nφ✝ : F ≃ₗᵢ[ℝ] F\nhn✝ : finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ✝.toLinearEquiv)))ᗮ } ≤ n✝\nn : ℕ\nIH :\n  ∀ (φ : F ≃ₗᵢ[ℝ] F),\n    finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)))ᗮ } ≤ n →\n      ∃ l, List.length l ≤ n ∧ φ = List.prod (List.map (fun v => reflection (Submodule.span ℝ {v})ᗮ) l)\nφ : F ≃ₗᵢ[ℝ] F\nhn :\n  finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)))ᗮ } ≤ Nat.succ n\nW : Submodule ℝ F := ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv))\nhW : ∀ (w : F), w ∈ W → ↑φ w = w\nhn' : ¬finrank ℝ { x // x ∈ Wᗮ } ≤ n\n⊢ 0 < finrank ℝ { x // x ∈ Wᗮ }\n[PROOFSTEP]\nlinarith [zero_le n]\n[GOAL]\ncase neg\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : FiniteDimensional ℝ F\nn✝ : ℕ\nφ✝ : F ≃ₗᵢ[ℝ] F\nhn✝ : finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ✝.toLinearEquiv)))ᗮ } ≤ n✝\nn : ℕ\nIH :\n  ∀ (φ : F ≃ₗᵢ[ℝ] F),\n    finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)))ᗮ } ≤ n →\n      ∃ l, List.length l ≤ n ∧ φ = List.prod (List.map (fun v => reflection (Submodule.span ℝ {v})ᗮ) l)\nφ : F ≃ₗᵢ[ℝ] F\nhn :\n  finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)))ᗮ } ≤ Nat.succ n\nW : Submodule ℝ F := ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv))\nhW : ∀ (w : F), w ∈ W → ↑φ w = w\nhn' : ¬finrank ℝ { x // x ∈ Wᗮ } ≤ n\nthis : Nontrivial { x // x ∈ Wᗮ }\n⊢ ∃ l, List.length l ≤ Nat.succ n ∧ φ = List.prod (List.map (fun v => reflection (Submodule.span ℝ {v})ᗮ) l)\n[PROOFSTEP]\nobtain ⟨v, hv⟩ := exists_ne (0 : Wᗮ)\n[GOAL]\ncase neg.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : FiniteDimensional ℝ F\nn✝ : ℕ\nφ✝ : F ≃ₗᵢ[ℝ] F\nhn✝ : finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ✝.toLinearEquiv)))ᗮ } ≤ n✝\nn : ℕ\nIH :\n  ∀ (φ : F ≃ₗᵢ[ℝ] F),\n    finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)))ᗮ } ≤ n →\n      ∃ l, List.length l ≤ n ∧ φ = List.prod (List.map (fun v => reflection (Submodule.span ℝ {v})ᗮ) l)\nφ : F ≃ₗᵢ[ℝ] F\nhn :\n  finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)))ᗮ } ≤ Nat.succ n\nW : Submodule ℝ F := ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv))\nhW : ∀ (w : F), w ∈ W → ↑φ w = w\nhn' : ¬finrank ℝ { x // x ∈ Wᗮ } ≤ n\nthis : Nontrivial { x // x ∈ Wᗮ }\nv : { x // x ∈ Wᗮ }\nhv : v ≠ 0\n⊢ ∃ l, List.length l ≤ Nat.succ n ∧ φ = List.prod (List.map (fun v => reflection (Submodule.span ℝ {v})ᗮ) l)\n[PROOFSTEP]\nhave hφv : φ v ∈ Wᗮ := by\n  intro w hw\n  rw [← hW w hw, LinearIsometryEquiv.inner_map_map]\n  exact v.prop w hw\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : FiniteDimensional ℝ F\nn✝ : ℕ\nφ✝ : F ≃ₗᵢ[ℝ] F\nhn✝ : finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ✝.toLinearEquiv)))ᗮ } ≤ n✝\nn : ℕ\nIH :\n  ∀ (φ : F ≃ₗᵢ[ℝ] F),\n    finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)))ᗮ } ≤ n →\n      ∃ l, List.length l ≤ n ∧ φ = List.prod (List.map (fun v => reflection (Submodule.span ℝ {v})ᗮ) l)\nφ : F ≃ₗᵢ[ℝ] F\nhn :\n  finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)))ᗮ } ≤ Nat.succ n\nW : Submodule ℝ F := ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv))\nhW : ∀ (w : F), w ∈ W → ↑φ w = w\nhn' : ¬finrank ℝ { x // x ∈ Wᗮ } ≤ n\nthis : Nontrivial { x // x ∈ Wᗮ }\nv : { x // x ∈ Wᗮ }\nhv : v ≠ 0\n⊢ ↑φ ↑v ∈ Wᗮ\n[PROOFSTEP]\nintro w hw\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : FiniteDimensional ℝ F\nn✝ : ℕ\nφ✝ : F ≃ₗᵢ[ℝ] F\nhn✝ : finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ✝.toLinearEquiv)))ᗮ } ≤ n✝\nn : ℕ\nIH :\n  ∀ (φ : F ≃ₗᵢ[ℝ] F),\n    finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)))ᗮ } ≤ n →\n      ∃ l, List.length l ≤ n ∧ φ = List.prod (List.map (fun v => reflection (Submodule.span ℝ {v})ᗮ) l)\nφ : F ≃ₗᵢ[ℝ] F\nhn :\n  finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)))ᗮ } ≤ Nat.succ n\nW : Submodule ℝ F := ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv))\nhW : ∀ (w : F), w ∈ W → ↑φ w = w\nhn' : ¬finrank ℝ { x // x ∈ Wᗮ } ≤ n\nthis : Nontrivial { x // x ∈ Wᗮ }\nv : { x // x ∈ Wᗮ }\nhv : v ≠ 0\nw : F\nhw : w ∈ W\n⊢ inner w (↑φ ↑v) = 0\n[PROOFSTEP]\nrw [← hW w hw, LinearIsometryEquiv.inner_map_map]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : FiniteDimensional ℝ F\nn✝ : ℕ\nφ✝ : F ≃ₗᵢ[ℝ] F\nhn✝ : finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ✝.toLinearEquiv)))ᗮ } ≤ n✝\nn : ℕ\nIH :\n  ∀ (φ : F ≃ₗᵢ[ℝ] F),\n    finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)))ᗮ } ≤ n →\n      ∃ l, List.length l ≤ n ∧ φ = List.prod (List.map (fun v => reflection (Submodule.span ℝ {v})ᗮ) l)\nφ : F ≃ₗᵢ[ℝ] F\nhn :\n  finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)))ᗮ } ≤ Nat.succ n\nW : Submodule ℝ F := ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv))\nhW : ∀ (w : F), w ∈ W → ↑φ w = w\nhn' : ¬finrank ℝ { x // x ∈ Wᗮ } ≤ n\nthis : Nontrivial { x // x ∈ Wᗮ }\nv : { x // x ∈ Wᗮ }\nhv : v ≠ 0\nw : F\nhw : w ∈ W\n⊢ inner w ↑v = 0\n[PROOFSTEP]\nexact v.prop w hw\n[GOAL]\ncase neg.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : FiniteDimensional ℝ F\nn✝ : ℕ\nφ✝ : F ≃ₗᵢ[ℝ] F\nhn✝ : finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ✝.toLinearEquiv)))ᗮ } ≤ n✝\nn : ℕ\nIH :\n  ∀ (φ : F ≃ₗᵢ[ℝ] F),\n    finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)))ᗮ } ≤ n →\n      ∃ l, List.length l ≤ n ∧ φ = List.prod (List.map (fun v => reflection (Submodule.span ℝ {v})ᗮ) l)\nφ : F ≃ₗᵢ[ℝ] F\nhn :\n  finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)))ᗮ } ≤ Nat.succ n\nW : Submodule ℝ F := ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv))\nhW : ∀ (w : F), w ∈ W → ↑φ w = w\nhn' : ¬finrank ℝ { x // x ∈ Wᗮ } ≤ n\nthis : Nontrivial { x // x ∈ Wᗮ }\nv : { x // x ∈ Wᗮ }\nhv : v ≠ 0\nhφv : ↑φ ↑v ∈ Wᗮ\n⊢ ∃ l, List.length l ≤ Nat.succ n ∧ φ = List.prod (List.map (fun v => reflection (Submodule.span ℝ {v})ᗮ) l)\n[PROOFSTEP]\nhave hv' : (v : F) ∉ W := by\n  intro h\n  exact\n    hv\n      ((Submodule.mem_left_iff_eq_zero_of_disjoint W.orthogonal_disjoint).mp h)\n        -- Let `ρ` be the reflection in `v - φ v`; this is designed to swap `v` and `φ v`\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : FiniteDimensional ℝ F\nn✝ : ℕ\nφ✝ : F ≃ₗᵢ[ℝ] F\nhn✝ : finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ✝.toLinearEquiv)))ᗮ } ≤ n✝\nn : ℕ\nIH :\n  ∀ (φ : F ≃ₗᵢ[ℝ] F),\n    finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)))ᗮ } ≤ n →\n      ∃ l, List.length l ≤ n ∧ φ = List.prod (List.map (fun v => reflection (Submodule.span ℝ {v})ᗮ) l)\nφ : F ≃ₗᵢ[ℝ] F\nhn :\n  finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)))ᗮ } ≤ Nat.succ n\nW : Submodule ℝ F := ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv))\nhW : ∀ (w : F), w ∈ W → ↑φ w = w\nhn' : ¬finrank ℝ { x // x ∈ Wᗮ } ≤ n\nthis : Nontrivial { x // x ∈ Wᗮ }\nv : { x // x ∈ Wᗮ }\nhv : v ≠ 0\nhφv : ↑φ ↑v ∈ Wᗮ\n⊢ ¬↑v ∈ W\n[PROOFSTEP]\nintro h\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : FiniteDimensional ℝ F\nn✝ : ℕ\nφ✝ : F ≃ₗᵢ[ℝ] F\nhn✝ : finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ✝.toLinearEquiv)))ᗮ } ≤ n✝\nn : ℕ\nIH :\n  ∀ (φ : F ≃ₗᵢ[ℝ] F),\n    finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)))ᗮ } ≤ n →\n      ∃ l, List.length l ≤ n ∧ φ = List.prod (List.map (fun v => reflection (Submodule.span ℝ {v})ᗮ) l)\nφ : F ≃ₗᵢ[ℝ] F\nhn :\n  finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)))ᗮ } ≤ Nat.succ n\nW : Submodule ℝ F := ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv))\nhW : ∀ (w : F), w ∈ W → ↑φ w = w\nhn' : ¬finrank ℝ { x // x ∈ Wᗮ } ≤ n\nthis : Nontrivial { x // x ∈ Wᗮ }\nv : { x // x ∈ Wᗮ }\nhv : v ≠ 0\nhφv : ↑φ ↑v ∈ Wᗮ\nh : ↑v ∈ W\n⊢ False\n[PROOFSTEP]\nexact\n  hv\n    ((Submodule.mem_left_iff_eq_zero_of_disjoint W.orthogonal_disjoint).mp h)\n      -- Let `ρ` be the reflection in `v - φ v`; this is designed to swap `v` and `φ v`\n[GOAL]\ncase neg.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : FiniteDimensional ℝ F\nn✝ : ℕ\nφ✝ : F ≃ₗᵢ[ℝ] F\nhn✝ : finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ✝.toLinearEquiv)))ᗮ } ≤ n✝\nn : ℕ\nIH :\n  ∀ (φ : F ≃ₗᵢ[ℝ] F),\n    finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)))ᗮ } ≤ n →\n      ∃ l, List.length l ≤ n ∧ φ = List.prod (List.map (fun v => reflection (Submodule.span ℝ {v})ᗮ) l)\nφ : F ≃ₗᵢ[ℝ] F\nhn :\n  finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)))ᗮ } ≤ Nat.succ n\nW : Submodule ℝ F := ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv))\nhW : ∀ (w : F), w ∈ W → ↑φ w = w\nhn' : ¬finrank ℝ { x // x ∈ Wᗮ } ≤ n\nthis : Nontrivial { x // x ∈ Wᗮ }\nv : { x // x ∈ Wᗮ }\nhv : v ≠ 0\nhφv : ↑φ ↑v ∈ Wᗮ\nhv' : ¬↑v ∈ W\n⊢ ∃ l, List.length l ≤ Nat.succ n ∧ φ = List.prod (List.map (fun v => reflection (Submodule.span ℝ {v})ᗮ) l)\n[PROOFSTEP]\nlet x : F := v - φ v\n[GOAL]\ncase neg.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : FiniteDimensional ℝ F\nn✝ : ℕ\nφ✝ : F ≃ₗᵢ[ℝ] F\nhn✝ : finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ✝.toLinearEquiv)))ᗮ } ≤ n✝\nn : ℕ\nIH :\n  ∀ (φ : F ≃ₗᵢ[ℝ] F),\n    finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)))ᗮ } ≤ n →\n      ∃ l, List.length l ≤ n ∧ φ = List.prod (List.map (fun v => reflection (Submodule.span ℝ {v})ᗮ) l)\nφ : F ≃ₗᵢ[ℝ] F\nhn :\n  finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)))ᗮ } ≤ Nat.succ n\nW : Submodule ℝ F := ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv))\nhW : ∀ (w : F), w ∈ W → ↑φ w = w\nhn' : ¬finrank ℝ { x // x ∈ Wᗮ } ≤ n\nthis : Nontrivial { x // x ∈ Wᗮ }\nv : { x // x ∈ Wᗮ }\nhv : v ≠ 0\nhφv : ↑φ ↑v ∈ Wᗮ\nhv' : ¬↑v ∈ W\nx : F := ↑v - ↑φ ↑v\n⊢ ∃ l, List.length l ≤ Nat.succ n ∧ φ = List.prod (List.map (fun v => reflection (Submodule.span ℝ {v})ᗮ) l)\n[PROOFSTEP]\nlet ρ :=\n  reflection\n    (ℝ ∙ x)ᗮ\n      -- Notation: Let `V` be the fixed subspace of `φ.trans ρ`\n[GOAL]\ncase neg.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : FiniteDimensional ℝ F\nn✝ : ℕ\nφ✝ : F ≃ₗᵢ[ℝ] F\nhn✝ : finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ✝.toLinearEquiv)))ᗮ } ≤ n✝\nn : ℕ\nIH :\n  ∀ (φ : F ≃ₗᵢ[ℝ] F),\n    finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)))ᗮ } ≤ n →\n      ∃ l, List.length l ≤ n ∧ φ = List.prod (List.map (fun v => reflection (Submodule.span ℝ {v})ᗮ) l)\nφ : F ≃ₗᵢ[ℝ] F\nhn :\n  finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)))ᗮ } ≤ Nat.succ n\nW : Submodule ℝ F := ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv))\nhW : ∀ (w : F), w ∈ W → ↑φ w = w\nhn' : ¬finrank ℝ { x // x ∈ Wᗮ } ≤ n\nthis : Nontrivial { x // x ∈ Wᗮ }\nv : { x // x ∈ Wᗮ }\nhv : v ≠ 0\nhφv : ↑φ ↑v ∈ Wᗮ\nhv' : ¬↑v ∈ W\nx : F := ↑v - ↑φ ↑v\nρ : F ≃ₗᵢ[ℝ] F := reflection (Submodule.span ℝ {x})ᗮ\n⊢ ∃ l, List.length l ≤ Nat.succ n ∧ φ = List.prod (List.map (fun v => reflection (Submodule.span ℝ {v})ᗮ) l)\n[PROOFSTEP]\nlet V := ker (ContinuousLinearMap.id ℝ F - φ.trans ρ)\n[GOAL]\ncase neg.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : FiniteDimensional ℝ F\nn✝ : ℕ\nφ✝ : F ≃ₗᵢ[ℝ] F\nhn✝ : finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ✝.toLinearEquiv)))ᗮ } ≤ n✝\nn : ℕ\nIH :\n  ∀ (φ : F ≃ₗᵢ[ℝ] F),\n    finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)))ᗮ } ≤ n →\n      ∃ l, List.length l ≤ n ∧ φ = List.prod (List.map (fun v => reflection (Submodule.span ℝ {v})ᗮ) l)\nφ : F ≃ₗᵢ[ℝ] F\nhn :\n  finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)))ᗮ } ≤ Nat.succ n\nW : Submodule ℝ F := ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv))\nhW : ∀ (w : F), w ∈ W → ↑φ w = w\nhn' : ¬finrank ℝ { x // x ∈ Wᗮ } ≤ n\nthis : Nontrivial { x // x ∈ Wᗮ }\nv : { x // x ∈ Wᗮ }\nhv : v ≠ 0\nhφv : ↑φ ↑v ∈ Wᗮ\nhv' : ¬↑v ∈ W\nx : F := ↑v - ↑φ ↑v\nρ : F ≃ₗᵢ[ℝ] F := reflection (Submodule.span ℝ {x})ᗮ\nV : Submodule ℝ F := ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk (trans φ ρ).toLinearEquiv))\n⊢ ∃ l, List.length l ≤ Nat.succ n ∧ φ = List.prod (List.map (fun v => reflection (Submodule.span ℝ {v})ᗮ) l)\n[PROOFSTEP]\nhave hV : ∀ w, ρ (φ w) = w → w ∈ V := by\n  intro w hw\n  change w - ρ (φ w) = 0\n  rw [sub_eq_zero, hw]\n    -- Everything fixed by `φ` is fixed by `φ.trans ρ`\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : FiniteDimensional ℝ F\nn✝ : ℕ\nφ✝ : F ≃ₗᵢ[ℝ] F\nhn✝ : finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ✝.toLinearEquiv)))ᗮ } ≤ n✝\nn : ℕ\nIH :\n  ∀ (φ : F ≃ₗᵢ[ℝ] F),\n    finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)))ᗮ } ≤ n →\n      ∃ l, List.length l ≤ n ∧ φ = List.prod (List.map (fun v => reflection (Submodule.span ℝ {v})ᗮ) l)\nφ : F ≃ₗᵢ[ℝ] F\nhn :\n  finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)))ᗮ } ≤ Nat.succ n\nW : Submodule ℝ F := ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv))\nhW : ∀ (w : F), w ∈ W → ↑φ w = w\nhn' : ¬finrank ℝ { x // x ∈ Wᗮ } ≤ n\nthis : Nontrivial { x // x ∈ Wᗮ }\nv : { x // x ∈ Wᗮ }\nhv : v ≠ 0\nhφv : ↑φ ↑v ∈ Wᗮ\nhv' : ¬↑v ∈ W\nx : F := ↑v - ↑φ ↑v\nρ : F ≃ₗᵢ[ℝ] F := reflection (Submodule.span ℝ {x})ᗮ\nV : Submodule ℝ F := ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk (trans φ ρ).toLinearEquiv))\n⊢ ∀ (w : F), ↑ρ (↑φ w) = w → w ∈ V\n[PROOFSTEP]\nintro w hw\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : FiniteDimensional ℝ F\nn✝ : ℕ\nφ✝ : F ≃ₗᵢ[ℝ] F\nhn✝ : finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ✝.toLinearEquiv)))ᗮ } ≤ n✝\nn : ℕ\nIH :\n  ∀ (φ : F ≃ₗᵢ[ℝ] F),\n    finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)))ᗮ } ≤ n →\n      ∃ l, List.length l ≤ n ∧ φ = List.prod (List.map (fun v => reflection (Submodule.span ℝ {v})ᗮ) l)\nφ : F ≃ₗᵢ[ℝ] F\nhn :\n  finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)))ᗮ } ≤ Nat.succ n\nW : Submodule ℝ F := ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv))\nhW : ∀ (w : F), w ∈ W → ↑φ w = w\nhn' : ¬finrank ℝ { x // x ∈ Wᗮ } ≤ n\nthis : Nontrivial { x // x ∈ Wᗮ }\nv : { x // x ∈ Wᗮ }\nhv : v ≠ 0\nhφv : ↑φ ↑v ∈ Wᗮ\nhv' : ¬↑v ∈ W\nx : F := ↑v - ↑φ ↑v\nρ : F ≃ₗᵢ[ℝ] F := reflection (Submodule.span ℝ {x})ᗮ\nV : Submodule ℝ F := ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk (trans φ ρ).toLinearEquiv))\nw : F\nhw : ↑ρ (↑φ w) = w\n⊢ w ∈ V\n[PROOFSTEP]\nchange w - ρ (φ w) = 0\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : FiniteDimensional ℝ F\nn✝ : ℕ\nφ✝ : F ≃ₗᵢ[ℝ] F\nhn✝ : finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ✝.toLinearEquiv)))ᗮ } ≤ n✝\nn : ℕ\nIH :\n  ∀ (φ : F ≃ₗᵢ[ℝ] F),\n    finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)))ᗮ } ≤ n →\n      ∃ l, List.length l ≤ n ∧ φ = List.prod (List.map (fun v => reflection (Submodule.span ℝ {v})ᗮ) l)\nφ : F ≃ₗᵢ[ℝ] F\nhn :\n  finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)))ᗮ } ≤ Nat.succ n\nW : Submodule ℝ F := ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv))\nhW : ∀ (w : F), w ∈ W → ↑φ w = w\nhn' : ¬finrank ℝ { x // x ∈ Wᗮ } ≤ n\nthis : Nontrivial { x // x ∈ Wᗮ }\nv : { x // x ∈ Wᗮ }\nhv : v ≠ 0\nhφv : ↑φ ↑v ∈ Wᗮ\nhv' : ¬↑v ∈ W\nx : F := ↑v - ↑φ ↑v\nρ : F ≃ₗᵢ[ℝ] F := reflection (Submodule.span ℝ {x})ᗮ\nV : Submodule ℝ F := ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk (trans φ ρ).toLinearEquiv))\nw : F\nhw : ↑ρ (↑φ w) = w\n⊢ w - ↑ρ (↑φ w) = 0\n[PROOFSTEP]\nrw [sub_eq_zero, hw]\n  -- Everything fixed by `φ` is fixed by `φ.trans ρ`\n[GOAL]\ncase neg.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : FiniteDimensional ℝ F\nn✝ : ℕ\nφ✝ : F ≃ₗᵢ[ℝ] F\nhn✝ : finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ✝.toLinearEquiv)))ᗮ } ≤ n✝\nn : ℕ\nIH :\n  ∀ (φ : F ≃ₗᵢ[ℝ] F),\n    finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)))ᗮ } ≤ n →\n      ∃ l, List.length l ≤ n ∧ φ = List.prod (List.map (fun v => reflection (Submodule.span ℝ {v})ᗮ) l)\nφ : F ≃ₗᵢ[ℝ] F\nhn :\n  finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)))ᗮ } ≤ Nat.succ n\nW : Submodule ℝ F := ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv))\nhW : ∀ (w : F), w ∈ W → ↑φ w = w\nhn' : ¬finrank ℝ { x // x ∈ Wᗮ } ≤ n\nthis : Nontrivial { x // x ∈ Wᗮ }\nv : { x // x ∈ Wᗮ }\nhv : v ≠ 0\nhφv : ↑φ ↑v ∈ Wᗮ\nhv' : ¬↑v ∈ W\nx : F := ↑v - ↑φ ↑v\nρ : F ≃ₗᵢ[ℝ] F := reflection (Submodule.span ℝ {x})ᗮ\nV : Submodule ℝ F := ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk (trans φ ρ).toLinearEquiv))\nhV : ∀ (w : F), ↑ρ (↑φ w) = w → w ∈ V\n⊢ ∃ l, List.length l ≤ Nat.succ n ∧ φ = List.prod (List.map (fun v => reflection (Submodule.span ℝ {v})ᗮ) l)\n[PROOFSTEP]\nhave H₂V : W ≤ V := by\n  intro w hw\n  apply hV\n  rw [hW w hw]\n  refine' reflection_mem_subspace_eq_self _\n  rw [Submodule.mem_orthogonal_singleton_iff_inner_left]\n  exact Submodule.sub_mem _ v.prop hφv _ hw\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : FiniteDimensional ℝ F\nn✝ : ℕ\nφ✝ : F ≃ₗᵢ[ℝ] F\nhn✝ : finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ✝.toLinearEquiv)))ᗮ } ≤ n✝\nn : ℕ\nIH :\n  ∀ (φ : F ≃ₗᵢ[ℝ] F),\n    finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)))ᗮ } ≤ n →\n      ∃ l, List.length l ≤ n ∧ φ = List.prod (List.map (fun v => reflection (Submodule.span ℝ {v})ᗮ) l)\nφ : F ≃ₗᵢ[ℝ] F\nhn :\n  finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)))ᗮ } ≤ Nat.succ n\nW : Submodule ℝ F := ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv))\nhW : ∀ (w : F), w ∈ W → ↑φ w = w\nhn' : ¬finrank ℝ { x // x ∈ Wᗮ } ≤ n\nthis : Nontrivial { x // x ∈ Wᗮ }\nv : { x // x ∈ Wᗮ }\nhv : v ≠ 0\nhφv : ↑φ ↑v ∈ Wᗮ\nhv' : ¬↑v ∈ W\nx : F := ↑v - ↑φ ↑v\nρ : F ≃ₗᵢ[ℝ] F := reflection (Submodule.span ℝ {x})ᗮ\nV : Submodule ℝ F := ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk (trans φ ρ).toLinearEquiv))\nhV : ∀ (w : F), ↑ρ (↑φ w) = w → w ∈ V\n⊢ W ≤ V\n[PROOFSTEP]\nintro w hw\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : FiniteDimensional ℝ F\nn✝ : ℕ\nφ✝ : F ≃ₗᵢ[ℝ] F\nhn✝ : finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ✝.toLinearEquiv)))ᗮ } ≤ n✝\nn : ℕ\nIH :\n  ∀ (φ : F ≃ₗᵢ[ℝ] F),\n    finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)))ᗮ } ≤ n →\n      ∃ l, List.length l ≤ n ∧ φ = List.prod (List.map (fun v => reflection (Submodule.span ℝ {v})ᗮ) l)\nφ : F ≃ₗᵢ[ℝ] F\nhn :\n  finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)))ᗮ } ≤ Nat.succ n\nW : Submodule ℝ F := ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv))\nhW : ∀ (w : F), w ∈ W → ↑φ w = w\nhn' : ¬finrank ℝ { x // x ∈ Wᗮ } ≤ n\nthis : Nontrivial { x // x ∈ Wᗮ }\nv : { x // x ∈ Wᗮ }\nhv : v ≠ 0\nhφv : ↑φ ↑v ∈ Wᗮ\nhv' : ¬↑v ∈ W\nx : F := ↑v - ↑φ ↑v\nρ : F ≃ₗᵢ[ℝ] F := reflection (Submodule.span ℝ {x})ᗮ\nV : Submodule ℝ F := ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk (trans φ ρ).toLinearEquiv))\nhV : ∀ (w : F), ↑ρ (↑φ w) = w → w ∈ V\nw : F\nhw : w ∈ W\n⊢ w ∈ V\n[PROOFSTEP]\napply hV\n[GOAL]\ncase a\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : FiniteDimensional ℝ F\nn✝ : ℕ\nφ✝ : F ≃ₗᵢ[ℝ] F\nhn✝ : finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ✝.toLinearEquiv)))ᗮ } ≤ n✝\nn : ℕ\nIH :\n  ∀ (φ : F ≃ₗᵢ[ℝ] F),\n    finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)))ᗮ } ≤ n →\n      ∃ l, List.length l ≤ n ∧ φ = List.prod (List.map (fun v => reflection (Submodule.span ℝ {v})ᗮ) l)\nφ : F ≃ₗᵢ[ℝ] F\nhn :\n  finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)))ᗮ } ≤ Nat.succ n\nW : Submodule ℝ F := ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv))\nhW : ∀ (w : F), w ∈ W → ↑φ w = w\nhn' : ¬finrank ℝ { x // x ∈ Wᗮ } ≤ n\nthis : Nontrivial { x // x ∈ Wᗮ }\nv : { x // x ∈ Wᗮ }\nhv : v ≠ 0\nhφv : ↑φ ↑v ∈ Wᗮ\nhv' : ¬↑v ∈ W\nx : F := ↑v - ↑φ ↑v\nρ : F ≃ₗᵢ[ℝ] F := reflection (Submodule.span ℝ {x})ᗮ\nV : Submodule ℝ F := ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk (trans φ ρ).toLinearEquiv))\nhV : ∀ (w : F), ↑ρ (↑φ w) = w → w ∈ V\nw : F\nhw : w ∈ W\n⊢ ↑ρ (↑φ w) = w\n[PROOFSTEP]\nrw [hW w hw]\n[GOAL]\ncase a\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : FiniteDimensional ℝ F\nn✝ : ℕ\nφ✝ : F ≃ₗᵢ[ℝ] F\nhn✝ : finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ✝.toLinearEquiv)))ᗮ } ≤ n✝\nn : ℕ\nIH :\n  ∀ (φ : F ≃ₗᵢ[ℝ] F),\n    finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)))ᗮ } ≤ n →\n      ∃ l, List.length l ≤ n ∧ φ = List.prod (List.map (fun v => reflection (Submodule.span ℝ {v})ᗮ) l)\nφ : F ≃ₗᵢ[ℝ] F\nhn :\n  finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)))ᗮ } ≤ Nat.succ n\nW : Submodule ℝ F := ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv))\nhW : ∀ (w : F), w ∈ W → ↑φ w = w\nhn' : ¬finrank ℝ { x // x ∈ Wᗮ } ≤ n\nthis : Nontrivial { x // x ∈ Wᗮ }\nv : { x // x ∈ Wᗮ }\nhv : v ≠ 0\nhφv : ↑φ ↑v ∈ Wᗮ\nhv' : ¬↑v ∈ W\nx : F := ↑v - ↑φ ↑v\nρ : F ≃ₗᵢ[ℝ] F := reflection (Submodule.span ℝ {x})ᗮ\nV : Submodule ℝ F := ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk (trans φ ρ).toLinearEquiv))\nhV : ∀ (w : F), ↑ρ (↑φ w) = w → w ∈ V\nw : F\nhw : w ∈ W\n⊢ ↑ρ w = w\n[PROOFSTEP]\nrefine' reflection_mem_subspace_eq_self _\n[GOAL]\ncase a\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : FiniteDimensional ℝ F\nn✝ : ℕ\nφ✝ : F ≃ₗᵢ[ℝ] F\nhn✝ : finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ✝.toLinearEquiv)))ᗮ } ≤ n✝\nn : ℕ\nIH :\n  ∀ (φ : F ≃ₗᵢ[ℝ] F),\n    finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)))ᗮ } ≤ n →\n      ∃ l, List.length l ≤ n ∧ φ = List.prod (List.map (fun v => reflection (Submodule.span ℝ {v})ᗮ) l)\nφ : F ≃ₗᵢ[ℝ] F\nhn :\n  finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)))ᗮ } ≤ Nat.succ n\nW : Submodule ℝ F := ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv))\nhW : ∀ (w : F), w ∈ W → ↑φ w = w\nhn' : ¬finrank ℝ { x // x ∈ Wᗮ } ≤ n\nthis : Nontrivial { x // x ∈ Wᗮ }\nv : { x // x ∈ Wᗮ }\nhv : v ≠ 0\nhφv : ↑φ ↑v ∈ Wᗮ\nhv' : ¬↑v ∈ W\nx : F := ↑v - ↑φ ↑v\nρ : F ≃ₗᵢ[ℝ] F := reflection (Submodule.span ℝ {x})ᗮ\nV : Submodule ℝ F := ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk (trans φ ρ).toLinearEquiv))\nhV : ∀ (w : F), ↑ρ (↑φ w) = w → w ∈ V\nw : F\nhw : w ∈ W\n⊢ w ∈ (Submodule.span ℝ {x})ᗮ\n[PROOFSTEP]\nrw [Submodule.mem_orthogonal_singleton_iff_inner_left]\n[GOAL]\ncase a\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : FiniteDimensional ℝ F\nn✝ : ℕ\nφ✝ : F ≃ₗᵢ[ℝ] F\nhn✝ : finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ✝.toLinearEquiv)))ᗮ } ≤ n✝\nn : ℕ\nIH :\n  ∀ (φ : F ≃ₗᵢ[ℝ] F),\n    finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)))ᗮ } ≤ n →\n      ∃ l, List.length l ≤ n ∧ φ = List.prod (List.map (fun v => reflection (Submodule.span ℝ {v})ᗮ) l)\nφ : F ≃ₗᵢ[ℝ] F\nhn :\n  finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)))ᗮ } ≤ Nat.succ n\nW : Submodule ℝ F := ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv))\nhW : ∀ (w : F), w ∈ W → ↑φ w = w\nhn' : ¬finrank ℝ { x // x ∈ Wᗮ } ≤ n\nthis : Nontrivial { x // x ∈ Wᗮ }\nv : { x // x ∈ Wᗮ }\nhv : v ≠ 0\nhφv : ↑φ ↑v ∈ Wᗮ\nhv' : ¬↑v ∈ W\nx : F := ↑v - ↑φ ↑v\nρ : F ≃ₗᵢ[ℝ] F := reflection (Submodule.span ℝ {x})ᗮ\nV : Submodule ℝ F := ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk (trans φ ρ).toLinearEquiv))\nhV : ∀ (w : F), ↑ρ (↑φ w) = w → w ∈ V\nw : F\nhw : w ∈ W\n⊢ inner w x = 0\n[PROOFSTEP]\nexact Submodule.sub_mem _ v.prop hφv _ hw\n[GOAL]\ncase neg.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : FiniteDimensional ℝ F\nn✝ : ℕ\nφ✝ : F ≃ₗᵢ[ℝ] F\nhn✝ : finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ✝.toLinearEquiv)))ᗮ } ≤ n✝\nn : ℕ\nIH :\n  ∀ (φ : F ≃ₗᵢ[ℝ] F),\n    finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)))ᗮ } ≤ n →\n      ∃ l, List.length l ≤ n ∧ φ = List.prod (List.map (fun v => reflection (Submodule.span ℝ {v})ᗮ) l)\nφ : F ≃ₗᵢ[ℝ] F\nhn :\n  finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)))ᗮ } ≤ Nat.succ n\nW : Submodule ℝ F := ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv))\nhW : ∀ (w : F), w ∈ W → ↑φ w = w\nhn' : ¬finrank ℝ { x // x ∈ Wᗮ } ≤ n\nthis : Nontrivial { x // x ∈ Wᗮ }\nv : { x // x ∈ Wᗮ }\nhv : v ≠ 0\nhφv : ↑φ ↑v ∈ Wᗮ\nhv' : ¬↑v ∈ W\nx : F := ↑v - ↑φ ↑v\nρ : F ≃ₗᵢ[ℝ] F := reflection (Submodule.span ℝ {x})ᗮ\nV : Submodule ℝ F := ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk (trans φ ρ).toLinearEquiv))\nhV : ∀ (w : F), ↑ρ (↑φ w) = w → w ∈ V\nH₂V : W ≤ V\n⊢ ∃ l, List.length l ≤ Nat.succ n ∧ φ = List.prod (List.map (fun v => reflection (Submodule.span ℝ {v})ᗮ) l)\n[PROOFSTEP]\nhave H₁V : (v : F) ∈ V := by\n  apply hV\n  have : ρ v = φ v := reflection_sub (φ.norm_map v).symm\n  rw [← this]\n  exact\n    reflection_reflection _\n      _\n        -- By dimension-counting, the complement of the fixed subspace of `φ.trans ρ` has dimension at\n            -- most `n`\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : FiniteDimensional ℝ F\nn✝ : ℕ\nφ✝ : F ≃ₗᵢ[ℝ] F\nhn✝ : finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ✝.toLinearEquiv)))ᗮ } ≤ n✝\nn : ℕ\nIH :\n  ∀ (φ : F ≃ₗᵢ[ℝ] F),\n    finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)))ᗮ } ≤ n →\n      ∃ l, List.length l ≤ n ∧ φ = List.prod (List.map (fun v => reflection (Submodule.span ℝ {v})ᗮ) l)\nφ : F ≃ₗᵢ[ℝ] F\nhn :\n  finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)))ᗮ } ≤ Nat.succ n\nW : Submodule ℝ F := ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv))\nhW : ∀ (w : F), w ∈ W → ↑φ w = w\nhn' : ¬finrank ℝ { x // x ∈ Wᗮ } ≤ n\nthis : Nontrivial { x // x ∈ Wᗮ }\nv : { x // x ∈ Wᗮ }\nhv : v ≠ 0\nhφv : ↑φ ↑v ∈ Wᗮ\nhv' : ¬↑v ∈ W\nx : F := ↑v - ↑φ ↑v\nρ : F ≃ₗᵢ[ℝ] F := reflection (Submodule.span ℝ {x})ᗮ\nV : Submodule ℝ F := ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk (trans φ ρ).toLinearEquiv))\nhV : ∀ (w : F), ↑ρ (↑φ w) = w → w ∈ V\nH₂V : W ≤ V\n⊢ ↑v ∈ V\n[PROOFSTEP]\napply hV\n[GOAL]\ncase a\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : FiniteDimensional ℝ F\nn✝ : ℕ\nφ✝ : F ≃ₗᵢ[ℝ] F\nhn✝ : finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ✝.toLinearEquiv)))ᗮ } ≤ n✝\nn : ℕ\nIH :\n  ∀ (φ : F ≃ₗᵢ[ℝ] F),\n    finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)))ᗮ } ≤ n →\n      ∃ l, List.length l ≤ n ∧ φ = List.prod (List.map (fun v => reflection (Submodule.span ℝ {v})ᗮ) l)\nφ : F ≃ₗᵢ[ℝ] F\nhn :\n  finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)))ᗮ } ≤ Nat.succ n\nW : Submodule ℝ F := ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv))\nhW : ∀ (w : F), w ∈ W → ↑φ w = w\nhn' : ¬finrank ℝ { x // x ∈ Wᗮ } ≤ n\nthis : Nontrivial { x // x ∈ Wᗮ }\nv : { x // x ∈ Wᗮ }\nhv : v ≠ 0\nhφv : ↑φ ↑v ∈ Wᗮ\nhv' : ¬↑v ∈ W\nx : F := ↑v - ↑φ ↑v\nρ : F ≃ₗᵢ[ℝ] F := reflection (Submodule.span ℝ {x})ᗮ\nV : Submodule ℝ F := ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk (trans φ ρ).toLinearEquiv))\nhV : ∀ (w : F), ↑ρ (↑φ w) = w → w ∈ V\nH₂V : W ≤ V\n⊢ ↑ρ (↑φ ↑v) = ↑v\n[PROOFSTEP]\nhave : ρ v = φ v := reflection_sub (φ.norm_map v).symm\n[GOAL]\ncase a\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : FiniteDimensional ℝ F\nn✝ : ℕ\nφ✝ : F ≃ₗᵢ[ℝ] F\nhn✝ : finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ✝.toLinearEquiv)))ᗮ } ≤ n✝\nn : ℕ\nIH :\n  ∀ (φ : F ≃ₗᵢ[ℝ] F),\n    finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)))ᗮ } ≤ n →\n      ∃ l, List.length l ≤ n ∧ φ = List.prod (List.map (fun v => reflection (Submodule.span ℝ {v})ᗮ) l)\nφ : F ≃ₗᵢ[ℝ] F\nhn :\n  finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)))ᗮ } ≤ Nat.succ n\nW : Submodule ℝ F := ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv))\nhW : ∀ (w : F), w ∈ W → ↑φ w = w\nhn' : ¬finrank ℝ { x // x ∈ Wᗮ } ≤ n\nthis✝ : Nontrivial { x // x ∈ Wᗮ }\nv : { x // x ∈ Wᗮ }\nhv : v ≠ 0\nhφv : ↑φ ↑v ∈ Wᗮ\nhv' : ¬↑v ∈ W\nx : F := ↑v - ↑φ ↑v\nρ : F ≃ₗᵢ[ℝ] F := reflection (Submodule.span ℝ {x})ᗮ\nV : Submodule ℝ F := ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk (trans φ ρ).toLinearEquiv))\nhV : ∀ (w : F), ↑ρ (↑φ w) = w → w ∈ V\nH₂V : W ≤ V\nthis : ↑ρ ↑v = ↑φ ↑v\n⊢ ↑ρ (↑φ ↑v) = ↑v\n[PROOFSTEP]\nrw [← this]\n[GOAL]\ncase a\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : FiniteDimensional ℝ F\nn✝ : ℕ\nφ✝ : F ≃ₗᵢ[ℝ] F\nhn✝ : finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ✝.toLinearEquiv)))ᗮ } ≤ n✝\nn : ℕ\nIH :\n  ∀ (φ : F ≃ₗᵢ[ℝ] F),\n    finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)))ᗮ } ≤ n →\n      ∃ l, List.length l ≤ n ∧ φ = List.prod (List.map (fun v => reflection (Submodule.span ℝ {v})ᗮ) l)\nφ : F ≃ₗᵢ[ℝ] F\nhn :\n  finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)))ᗮ } ≤ Nat.succ n\nW : Submodule ℝ F := ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv))\nhW : ∀ (w : F), w ∈ W → ↑φ w = w\nhn' : ¬finrank ℝ { x // x ∈ Wᗮ } ≤ n\nthis✝ : Nontrivial { x // x ∈ Wᗮ }\nv : { x // x ∈ Wᗮ }\nhv : v ≠ 0\nhφv : ↑φ ↑v ∈ Wᗮ\nhv' : ¬↑v ∈ W\nx : F := ↑v - ↑φ ↑v\nρ : F ≃ₗᵢ[ℝ] F := reflection (Submodule.span ℝ {x})ᗮ\nV : Submodule ℝ F := ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk (trans φ ρ).toLinearEquiv))\nhV : ∀ (w : F), ↑ρ (↑φ w) = w → w ∈ V\nH₂V : W ≤ V\nthis : ↑ρ ↑v = ↑φ ↑v\n⊢ ↑ρ (↑ρ ↑v) = ↑v\n[PROOFSTEP]\nexact\n  reflection_reflection _\n    _\n      -- By dimension-counting, the complement of the fixed subspace of `φ.trans ρ` has dimension at\n          -- most `n`\n[GOAL]\ncase neg.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : FiniteDimensional ℝ F\nn✝ : ℕ\nφ✝ : F ≃ₗᵢ[ℝ] F\nhn✝ : finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ✝.toLinearEquiv)))ᗮ } ≤ n✝\nn : ℕ\nIH :\n  ∀ (φ : F ≃ₗᵢ[ℝ] F),\n    finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)))ᗮ } ≤ n →\n      ∃ l, List.length l ≤ n ∧ φ = List.prod (List.map (fun v => reflection (Submodule.span ℝ {v})ᗮ) l)\nφ : F ≃ₗᵢ[ℝ] F\nhn :\n  finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)))ᗮ } ≤ Nat.succ n\nW : Submodule ℝ F := ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv))\nhW : ∀ (w : F), w ∈ W → ↑φ w = w\nhn' : ¬finrank ℝ { x // x ∈ Wᗮ } ≤ n\nthis : Nontrivial { x // x ∈ Wᗮ }\nv : { x // x ∈ Wᗮ }\nhv : v ≠ 0\nhφv : ↑φ ↑v ∈ Wᗮ\nhv' : ¬↑v ∈ W\nx : F := ↑v - ↑φ ↑v\nρ : F ≃ₗᵢ[ℝ] F := reflection (Submodule.span ℝ {x})ᗮ\nV : Submodule ℝ F := ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk (trans φ ρ).toLinearEquiv))\nhV : ∀ (w : F), ↑ρ (↑φ w) = w → w ∈ V\nH₂V : W ≤ V\nH₁V : ↑v ∈ V\n⊢ ∃ l, List.length l ≤ Nat.succ n ∧ φ = List.prod (List.map (fun v => reflection (Submodule.span ℝ {v})ᗮ) l)\n[PROOFSTEP]\nhave : finrank ℝ Vᗮ ≤ n := by\n  change finrank ℝ Wᗮ ≤ n + 1 at hn \n  have : finrank ℝ W + 1 ≤ finrank ℝ V :=\n    Submodule.finrank_lt_finrank_of_lt (SetLike.lt_iff_le_and_exists.2 ⟨H₂V, v, H₁V, hv'⟩)\n  have : finrank ℝ V + finrank ℝ Vᗮ = finrank ℝ F := V.finrank_add_finrank_orthogonal\n  have : finrank ℝ W + finrank ℝ Wᗮ = finrank ℝ F := W.finrank_add_finrank_orthogonal\n  linarith\n    -- So apply the inductive hypothesis to `φ.trans ρ`\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : FiniteDimensional ℝ F\nn✝ : ℕ\nφ✝ : F ≃ₗᵢ[ℝ] F\nhn✝ : finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ✝.toLinearEquiv)))ᗮ } ≤ n✝\nn : ℕ\nIH :\n  ∀ (φ : F ≃ₗᵢ[ℝ] F),\n    finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)))ᗮ } ≤ n →\n      ∃ l, List.length l ≤ n ∧ φ = List.prod (List.map (fun v => reflection (Submodule.span ℝ {v})ᗮ) l)\nφ : F ≃ₗᵢ[ℝ] F\nhn :\n  finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)))ᗮ } ≤ Nat.succ n\nW : Submodule ℝ F := ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv))\nhW : ∀ (w : F), w ∈ W → ↑φ w = w\nhn' : ¬finrank ℝ { x // x ∈ Wᗮ } ≤ n\nthis : Nontrivial { x // x ∈ Wᗮ }\nv : { x // x ∈ Wᗮ }\nhv : v ≠ 0\nhφv : ↑φ ↑v ∈ Wᗮ\nhv' : ¬↑v ∈ W\nx : F := ↑v - ↑φ ↑v\nρ : F ≃ₗᵢ[ℝ] F := reflection (Submodule.span ℝ {x})ᗮ\nV : Submodule ℝ F := ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk (trans φ ρ).toLinearEquiv))\nhV : ∀ (w : F), ↑ρ (↑φ w) = w → w ∈ V\nH₂V : W ≤ V\nH₁V : ↑v ∈ V\n⊢ finrank ℝ { x // x ∈ Vᗮ } ≤ n\n[PROOFSTEP]\nchange finrank ℝ Wᗮ ≤ n + 1 at hn \n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : FiniteDimensional ℝ F\nn✝ : ℕ\nφ✝ : F ≃ₗᵢ[ℝ] F\nhn✝ : finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ✝.toLinearEquiv)))ᗮ } ≤ n✝\nn : ℕ\nIH :\n  ∀ (φ : F ≃ₗᵢ[ℝ] F),\n    finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)))ᗮ } ≤ n →\n      ∃ l, List.length l ≤ n ∧ φ = List.prod (List.map (fun v => reflection (Submodule.span ℝ {v})ᗮ) l)\nφ : F ≃ₗᵢ[ℝ] F\nW : Submodule ℝ F := ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv))\nhW : ∀ (w : F), w ∈ W → ↑φ w = w\nhn' : ¬finrank ℝ { x // x ∈ Wᗮ } ≤ n\nthis : Nontrivial { x // x ∈ Wᗮ }\nv : { x // x ∈ Wᗮ }\nhv : v ≠ 0\nhφv : ↑φ ↑v ∈ Wᗮ\nhv' : ¬↑v ∈ W\nx : F := ↑v - ↑φ ↑v\nρ : F ≃ₗᵢ[ℝ] F := reflection (Submodule.span ℝ {x})ᗮ\nV : Submodule ℝ F := ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk (trans φ ρ).toLinearEquiv))\nhV : ∀ (w : F), ↑ρ (↑φ w) = w → w ∈ V\nH₂V : W ≤ V\nH₁V : ↑v ∈ V\nhn : finrank ℝ { x // x ∈ Wᗮ } ≤ n + 1\n⊢ finrank ℝ { x // x ∈ Vᗮ } ≤ n\n[PROOFSTEP]\nhave : finrank ℝ W + 1 ≤ finrank ℝ V :=\n  Submodule.finrank_lt_finrank_of_lt (SetLike.lt_iff_le_and_exists.2 ⟨H₂V, v, H₁V, hv'⟩)\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : FiniteDimensional ℝ F\nn✝ : ℕ\nφ✝ : F ≃ₗᵢ[ℝ] F\nhn✝ : finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ✝.toLinearEquiv)))ᗮ } ≤ n✝\nn : ℕ\nIH :\n  ∀ (φ : F ≃ₗᵢ[ℝ] F),\n    finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)))ᗮ } ≤ n →\n      ∃ l, List.length l ≤ n ∧ φ = List.prod (List.map (fun v => reflection (Submodule.span ℝ {v})ᗮ) l)\nφ : F ≃ₗᵢ[ℝ] F\nW : Submodule ℝ F := ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv))\nhW : ∀ (w : F), w ∈ W → ↑φ w = w\nhn' : ¬finrank ℝ { x // x ∈ Wᗮ } ≤ n\nthis✝ : Nontrivial { x // x ∈ Wᗮ }\nv : { x // x ∈ Wᗮ }\nhv : v ≠ 0\nhφv : ↑φ ↑v ∈ Wᗮ\nhv' : ¬↑v ∈ W\nx : F := ↑v - ↑φ ↑v\nρ : F ≃ₗᵢ[ℝ] F := reflection (Submodule.span ℝ {x})ᗮ\nV : Submodule ℝ F := ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk (trans φ ρ).toLinearEquiv))\nhV : ∀ (w : F), ↑ρ (↑φ w) = w → w ∈ V\nH₂V : W ≤ V\nH₁V : ↑v ∈ V\nhn : finrank ℝ { x // x ∈ Wᗮ } ≤ n + 1\nthis : finrank ℝ { x // x ∈ W } + 1 ≤ finrank ℝ { x // x ∈ V }\n⊢ finrank ℝ { x // x ∈ Vᗮ } ≤ n\n[PROOFSTEP]\nhave : finrank ℝ V + finrank ℝ Vᗮ = finrank ℝ F := V.finrank_add_finrank_orthogonal\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : FiniteDimensional ℝ F\nn✝ : ℕ\nφ✝ : F ≃ₗᵢ[ℝ] F\nhn✝ : finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ✝.toLinearEquiv)))ᗮ } ≤ n✝\nn : ℕ\nIH :\n  ∀ (φ : F ≃ₗᵢ[ℝ] F),\n    finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)))ᗮ } ≤ n →\n      ∃ l, List.length l ≤ n ∧ φ = List.prod (List.map (fun v => reflection (Submodule.span ℝ {v})ᗮ) l)\nφ : F ≃ₗᵢ[ℝ] F\nW : Submodule ℝ F := ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv))\nhW : ∀ (w : F), w ∈ W → ↑φ w = w\nhn' : ¬finrank ℝ { x // x ∈ Wᗮ } ≤ n\nthis✝¹ : Nontrivial { x // x ∈ Wᗮ }\nv : { x // x ∈ Wᗮ }\nhv : v ≠ 0\nhφv : ↑φ ↑v ∈ Wᗮ\nhv' : ¬↑v ∈ W\nx : F := ↑v - ↑φ ↑v\nρ : F ≃ₗᵢ[ℝ] F := reflection (Submodule.span ℝ {x})ᗮ\nV : Submodule ℝ F := ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk (trans φ ρ).toLinearEquiv))\nhV : ∀ (w : F), ↑ρ (↑φ w) = w → w ∈ V\nH₂V : W ≤ V\nH₁V : ↑v ∈ V\nhn : finrank ℝ { x // x ∈ Wᗮ } ≤ n + 1\nthis✝ : finrank ℝ { x // x ∈ W } + 1 ≤ finrank ℝ { x // x ∈ V }\nthis : finrank ℝ { x // x ∈ V } + finrank ℝ { x // x ∈ Vᗮ } = finrank ℝ F\n⊢ finrank ℝ { x // x ∈ Vᗮ } ≤ n\n[PROOFSTEP]\nhave : finrank ℝ W + finrank ℝ Wᗮ = finrank ℝ F := W.finrank_add_finrank_orthogonal\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : FiniteDimensional ℝ F\nn✝ : ℕ\nφ✝ : F ≃ₗᵢ[ℝ] F\nhn✝ : finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ✝.toLinearEquiv)))ᗮ } ≤ n✝\nn : ℕ\nIH :\n  ∀ (φ : F ≃ₗᵢ[ℝ] F),\n    finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)))ᗮ } ≤ n →\n      ∃ l, List.length l ≤ n ∧ φ = List.prod (List.map (fun v => reflection (Submodule.span ℝ {v})ᗮ) l)\nφ : F ≃ₗᵢ[ℝ] F\nW : Submodule ℝ F := ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv))\nhW : ∀ (w : F), w ∈ W → ↑φ w = w\nhn' : ¬finrank ℝ { x // x ∈ Wᗮ } ≤ n\nthis✝² : Nontrivial { x // x ∈ Wᗮ }\nv : { x // x ∈ Wᗮ }\nhv : v ≠ 0\nhφv : ↑φ ↑v ∈ Wᗮ\nhv' : ¬↑v ∈ W\nx : F := ↑v - ↑φ ↑v\nρ : F ≃ₗᵢ[ℝ] F := reflection (Submodule.span ℝ {x})ᗮ\nV : Submodule ℝ F := ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk (trans φ ρ).toLinearEquiv))\nhV : ∀ (w : F), ↑ρ (↑φ w) = w → w ∈ V\nH₂V : W ≤ V\nH₁V : ↑v ∈ V\nhn : finrank ℝ { x // x ∈ Wᗮ } ≤ n + 1\nthis✝¹ : finrank ℝ { x // x ∈ W } + 1 ≤ finrank ℝ { x // x ∈ V }\nthis✝ : finrank ℝ { x // x ∈ V } + finrank ℝ { x // x ∈ Vᗮ } = finrank ℝ F\nthis : finrank ℝ { x // x ∈ W } + finrank ℝ { x // x ∈ Wᗮ } = finrank ℝ F\n⊢ finrank ℝ { x // x ∈ Vᗮ } ≤ n\n[PROOFSTEP]\nlinarith\n  -- So apply the inductive hypothesis to `φ.trans ρ`\n[GOAL]\ncase neg.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : FiniteDimensional ℝ F\nn✝ : ℕ\nφ✝ : F ≃ₗᵢ[ℝ] F\nhn✝ : finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ✝.toLinearEquiv)))ᗮ } ≤ n✝\nn : ℕ\nIH :\n  ∀ (φ : F ≃ₗᵢ[ℝ] F),\n    finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)))ᗮ } ≤ n →\n      ∃ l, List.length l ≤ n ∧ φ = List.prod (List.map (fun v => reflection (Submodule.span ℝ {v})ᗮ) l)\nφ : F ≃ₗᵢ[ℝ] F\nhn :\n  finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)))ᗮ } ≤ Nat.succ n\nW : Submodule ℝ F := ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv))\nhW : ∀ (w : F), w ∈ W → ↑φ w = w\nhn' : ¬finrank ℝ { x // x ∈ Wᗮ } ≤ n\nthis✝ : Nontrivial { x // x ∈ Wᗮ }\nv : { x // x ∈ Wᗮ }\nhv : v ≠ 0\nhφv : ↑φ ↑v ∈ Wᗮ\nhv' : ¬↑v ∈ W\nx : F := ↑v - ↑φ ↑v\nρ : F ≃ₗᵢ[ℝ] F := reflection (Submodule.span ℝ {x})ᗮ\nV : Submodule ℝ F := ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk (trans φ ρ).toLinearEquiv))\nhV : ∀ (w : F), ↑ρ (↑φ w) = w → w ∈ V\nH₂V : W ≤ V\nH₁V : ↑v ∈ V\nthis : finrank ℝ { x // x ∈ Vᗮ } ≤ n\n⊢ ∃ l, List.length l ≤ Nat.succ n ∧ φ = List.prod (List.map (fun v => reflection (Submodule.span ℝ {v})ᗮ) l)\n[PROOFSTEP]\nobtain ⟨l, hl, hφl⟩ := IH (ρ * φ) this\n[GOAL]\ncase neg.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : FiniteDimensional ℝ F\nn✝ : ℕ\nφ✝ : F ≃ₗᵢ[ℝ] F\nhn✝ : finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ✝.toLinearEquiv)))ᗮ } ≤ n✝\nn : ℕ\nIH :\n  ∀ (φ : F ≃ₗᵢ[ℝ] F),\n    finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)))ᗮ } ≤ n →\n      ∃ l, List.length l ≤ n ∧ φ = List.prod (List.map (fun v => reflection (Submodule.span ℝ {v})ᗮ) l)\nφ : F ≃ₗᵢ[ℝ] F\nhn :\n  finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)))ᗮ } ≤ Nat.succ n\nW : Submodule ℝ F := ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv))\nhW : ∀ (w : F), w ∈ W → ↑φ w = w\nhn' : ¬finrank ℝ { x // x ∈ Wᗮ } ≤ n\nthis✝ : Nontrivial { x // x ∈ Wᗮ }\nv : { x // x ∈ Wᗮ }\nhv : v ≠ 0\nhφv : ↑φ ↑v ∈ Wᗮ\nhv' : ¬↑v ∈ W\nx : F := ↑v - ↑φ ↑v\nρ : F ≃ₗᵢ[ℝ] F := reflection (Submodule.span ℝ {x})ᗮ\nV : Submodule ℝ F := ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk (trans φ ρ).toLinearEquiv))\nhV : ∀ (w : F), ↑ρ (↑φ w) = w → w ∈ V\nH₂V : W ≤ V\nH₁V : ↑v ∈ V\nthis : finrank ℝ { x // x ∈ Vᗮ } ≤ n\nl : List F\nhl : List.length l ≤ n\nhφl : ρ * φ = List.prod (List.map (fun v => reflection (Submodule.span ℝ {v})ᗮ) l)\n⊢ ∃ l, List.length l ≤ Nat.succ n ∧ φ = List.prod (List.map (fun v => reflection (Submodule.span ℝ {v})ᗮ) l)\n[PROOFSTEP]\nrefine' ⟨x :: l, Nat.succ_le_succ hl, _⟩\n[GOAL]\ncase neg.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : FiniteDimensional ℝ F\nn✝ : ℕ\nφ✝ : F ≃ₗᵢ[ℝ] F\nhn✝ : finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ✝.toLinearEquiv)))ᗮ } ≤ n✝\nn : ℕ\nIH :\n  ∀ (φ : F ≃ₗᵢ[ℝ] F),\n    finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)))ᗮ } ≤ n →\n      ∃ l, List.length l ≤ n ∧ φ = List.prod (List.map (fun v => reflection (Submodule.span ℝ {v})ᗮ) l)\nφ : F ≃ₗᵢ[ℝ] F\nhn :\n  finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)))ᗮ } ≤ Nat.succ n\nW : Submodule ℝ F := ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv))\nhW : ∀ (w : F), w ∈ W → ↑φ w = w\nhn' : ¬finrank ℝ { x // x ∈ Wᗮ } ≤ n\nthis✝ : Nontrivial { x // x ∈ Wᗮ }\nv : { x // x ∈ Wᗮ }\nhv : v ≠ 0\nhφv : ↑φ ↑v ∈ Wᗮ\nhv' : ¬↑v ∈ W\nx : F := ↑v - ↑φ ↑v\nρ : F ≃ₗᵢ[ℝ] F := reflection (Submodule.span ℝ {x})ᗮ\nV : Submodule ℝ F := ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk (trans φ ρ).toLinearEquiv))\nhV : ∀ (w : F), ↑ρ (↑φ w) = w → w ∈ V\nH₂V : W ≤ V\nH₁V : ↑v ∈ V\nthis : finrank ℝ { x // x ∈ Vᗮ } ≤ n\nl : List F\nhl : List.length l ≤ n\nhφl : ρ * φ = List.prod (List.map (fun v => reflection (Submodule.span ℝ {v})ᗮ) l)\n⊢ φ = List.prod (List.map (fun v => reflection (Submodule.span ℝ {v})ᗮ) (x :: l))\n[PROOFSTEP]\nrw [List.map_cons, List.prod_cons]\n[GOAL]\ncase neg.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : FiniteDimensional ℝ F\nn✝ : ℕ\nφ✝ : F ≃ₗᵢ[ℝ] F\nhn✝ : finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ✝.toLinearEquiv)))ᗮ } ≤ n✝\nn : ℕ\nIH :\n  ∀ (φ : F ≃ₗᵢ[ℝ] F),\n    finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)))ᗮ } ≤ n →\n      ∃ l, List.length l ≤ n ∧ φ = List.prod (List.map (fun v => reflection (Submodule.span ℝ {v})ᗮ) l)\nφ : F ≃ₗᵢ[ℝ] F\nhn :\n  finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)))ᗮ } ≤ Nat.succ n\nW : Submodule ℝ F := ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv))\nhW : ∀ (w : F), w ∈ W → ↑φ w = w\nhn' : ¬finrank ℝ { x // x ∈ Wᗮ } ≤ n\nthis✝ : Nontrivial { x // x ∈ Wᗮ }\nv : { x // x ∈ Wᗮ }\nhv : v ≠ 0\nhφv : ↑φ ↑v ∈ Wᗮ\nhv' : ¬↑v ∈ W\nx : F := ↑v - ↑φ ↑v\nρ : F ≃ₗᵢ[ℝ] F := reflection (Submodule.span ℝ {x})ᗮ\nV : Submodule ℝ F := ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk (trans φ ρ).toLinearEquiv))\nhV : ∀ (w : F), ↑ρ (↑φ w) = w → w ∈ V\nH₂V : W ≤ V\nH₁V : ↑v ∈ V\nthis : finrank ℝ { x // x ∈ Vᗮ } ≤ n\nl : List F\nhl : List.length l ≤ n\nhφl : ρ * φ = List.prod (List.map (fun v => reflection (Submodule.span ℝ {v})ᗮ) l)\n⊢ φ = reflection (Submodule.span ℝ {x})ᗮ * List.prod (List.map (fun v => reflection (Submodule.span ℝ {v})ᗮ) l)\n[PROOFSTEP]\nhave := congr_arg ((· * ·) ρ) hφl\n[GOAL]\ncase neg.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : FiniteDimensional ℝ F\nn✝ : ℕ\nφ✝ : F ≃ₗᵢ[ℝ] F\nhn✝ : finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ✝.toLinearEquiv)))ᗮ } ≤ n✝\nn : ℕ\nIH :\n  ∀ (φ : F ≃ₗᵢ[ℝ] F),\n    finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)))ᗮ } ≤ n →\n      ∃ l, List.length l ≤ n ∧ φ = List.prod (List.map (fun v => reflection (Submodule.span ℝ {v})ᗮ) l)\nφ : F ≃ₗᵢ[ℝ] F\nhn :\n  finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)))ᗮ } ≤ Nat.succ n\nW : Submodule ℝ F := ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv))\nhW : ∀ (w : F), w ∈ W → ↑φ w = w\nhn' : ¬finrank ℝ { x // x ∈ Wᗮ } ≤ n\nthis✝¹ : Nontrivial { x // x ∈ Wᗮ }\nv : { x // x ∈ Wᗮ }\nhv : v ≠ 0\nhφv : ↑φ ↑v ∈ Wᗮ\nhv' : ¬↑v ∈ W\nx : F := ↑v - ↑φ ↑v\nρ : F ≃ₗᵢ[ℝ] F := reflection (Submodule.span ℝ {x})ᗮ\nV : Submodule ℝ F := ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk (trans φ ρ).toLinearEquiv))\nhV : ∀ (w : F), ↑ρ (↑φ w) = w → w ∈ V\nH₂V : W ≤ V\nH₁V : ↑v ∈ V\nthis✝ : finrank ℝ { x // x ∈ Vᗮ } ≤ n\nl : List F\nhl : List.length l ≤ n\nhφl : ρ * φ = List.prod (List.map (fun v => reflection (Submodule.span ℝ {v})ᗮ) l)\nthis :\n  (fun x x_1 => x * x_1) ρ (ρ * φ) =\n    (fun x x_1 => x * x_1) ρ (List.prod (List.map (fun v => reflection (Submodule.span ℝ {v})ᗮ) l))\n⊢ φ = reflection (Submodule.span ℝ {x})ᗮ * List.prod (List.map (fun v => reflection (Submodule.span ℝ {v})ᗮ) l)\n[PROOFSTEP]\ndsimp only at this \n[GOAL]\ncase neg.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : FiniteDimensional ℝ F\nn✝ : ℕ\nφ✝ : F ≃ₗᵢ[ℝ] F\nhn✝ : finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ✝.toLinearEquiv)))ᗮ } ≤ n✝\nn : ℕ\nIH :\n  ∀ (φ : F ≃ₗᵢ[ℝ] F),\n    finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)))ᗮ } ≤ n →\n      ∃ l, List.length l ≤ n ∧ φ = List.prod (List.map (fun v => reflection (Submodule.span ℝ {v})ᗮ) l)\nφ : F ≃ₗᵢ[ℝ] F\nhn :\n  finrank ℝ { x // x ∈ (ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv)))ᗮ } ≤ Nat.succ n\nW : Submodule ℝ F := ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk φ.toLinearEquiv))\nhW : ∀ (w : F), w ∈ W → ↑φ w = w\nhn' : ¬finrank ℝ { x // x ∈ Wᗮ } ≤ n\nthis✝¹ : Nontrivial { x // x ∈ Wᗮ }\nv : { x // x ∈ Wᗮ }\nhv : v ≠ 0\nhφv : ↑φ ↑v ∈ Wᗮ\nhv' : ¬↑v ∈ W\nx : F := ↑v - ↑φ ↑v\nρ : F ≃ₗᵢ[ℝ] F := reflection (Submodule.span ℝ {x})ᗮ\nV : Submodule ℝ F := ker (ContinuousLinearMap.id ℝ F - ↑(ContinuousLinearEquiv.mk (trans φ ρ).toLinearEquiv))\nhV : ∀ (w : F), ↑ρ (↑φ w) = w → w ∈ V\nH₂V : W ≤ V\nH₁V : ↑v ∈ V\nthis✝ : finrank ℝ { x // x ∈ Vᗮ } ≤ n\nl : List F\nhl : List.length l ≤ n\nhφl : ρ * φ = List.prod (List.map (fun v => reflection (Submodule.span ℝ {v})ᗮ) l)\nthis :\n  reflection (Submodule.span ℝ {↑v - ↑φ ↑v})ᗮ * (reflection (Submodule.span ℝ {↑v - ↑φ ↑v})ᗮ * φ) =\n    reflection (Submodule.span ℝ {↑v - ↑φ ↑v})ᗮ * List.prod (List.map (fun v => reflection (Submodule.span ℝ {v})ᗮ) l)\n⊢ φ = reflection (Submodule.span ℝ {x})ᗮ * List.prod (List.map (fun v => reflection (Submodule.span ℝ {v})ᗮ) l)\n[PROOFSTEP]\nrwa [← mul_assoc, reflection_mul_reflection, one_mul] at this \n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : FiniteDimensional ℝ F\n⊢ Subgroup.closure (Set.range fun v => reflection (Submodule.span ℝ {v})ᗮ) = ⊤\n[PROOFSTEP]\nrw [Subgroup.eq_top_iff']\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : FiniteDimensional ℝ F\n⊢ ∀ (x : F ≃ₗᵢ[ℝ] F), x ∈ Subgroup.closure (Set.range fun v => reflection (Submodule.span ℝ {v})ᗮ)\n[PROOFSTEP]\nintro φ\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : FiniteDimensional ℝ F\nφ : F ≃ₗᵢ[ℝ] F\n⊢ φ ∈ Subgroup.closure (Set.range fun v => reflection (Submodule.span ℝ {v})ᗮ)\n[PROOFSTEP]\nrcases φ.reflections_generate_dim with ⟨l, _, rfl⟩\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : FiniteDimensional ℝ F\nl : List F\nleft✝ : List.length l ≤ finrank ℝ F\n⊢ List.prod (List.map (fun v => reflection (Submodule.span ℝ {v})ᗮ) l) ∈\n    Subgroup.closure (Set.range fun v => reflection (Submodule.span ℝ {v})ᗮ)\n[PROOFSTEP]\napply (Subgroup.closure _).list_prod_mem\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : FiniteDimensional ℝ F\nl : List F\nleft✝ : List.length l ≤ finrank ℝ F\n⊢ ∀ (x : F ≃ₗᵢ[ℝ] F),\n    x ∈ List.map (fun v => reflection (Submodule.span ℝ {v})ᗮ) l →\n      x ∈ Subgroup.closure (Set.range fun v => reflection (Submodule.span ℝ {v})ᗮ)\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : FiniteDimensional ℝ F\nl : List F\nleft✝ : List.length l ≤ finrank ℝ F\nx : F ≃ₗᵢ[ℝ] F\nhx : x ∈ List.map (fun v => reflection (Submodule.span ℝ {v})ᗮ) l\n⊢ x ∈ Subgroup.closure (Set.range fun v => reflection (Submodule.span ℝ {v})ᗮ)\n[PROOFSTEP]\nrcases List.mem_map.mp hx with ⟨a, _, hax⟩\n[GOAL]\ncase intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\ninst✝ : FiniteDimensional ℝ F\nl : List F\nleft✝¹ : List.length l ≤ finrank ℝ F\nx : F ≃ₗᵢ[ℝ] F\nhx : x ∈ List.map (fun v => reflection (Submodule.span ℝ {v})ᗮ) l\na : F\nleft✝ : a ∈ l\nhax : reflection (Submodule.span ℝ {a})ᗮ = x\n⊢ x ∈ Subgroup.closure (Set.range fun v => reflection (Submodule.span ℝ {v})ᗮ)\n[PROOFSTEP]\nexact Subgroup.subset_closure ⟨a, hax⟩\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nι : Type u_4\ninst✝ : DecidableEq ι\nV : ι → Submodule 𝕜 E\nhV : OrthogonalFamily 𝕜 (fun i => { x // x ∈ V i }) fun i => Submodule.subtypeₗᵢ (V i)\nhc : IsComplete ↑(iSup V)\n⊢ DirectSum.IsInternal V ↔ (iSup V)ᗮ = ⊥\n[PROOFSTEP]\nhaveI : CompleteSpace (↥(iSup V)) := hc.completeSpace_coe\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nι : Type u_4\ninst✝ : DecidableEq ι\nV : ι → Submodule 𝕜 E\nhV : OrthogonalFamily 𝕜 (fun i => { x // x ∈ V i }) fun i => Submodule.subtypeₗᵢ (V i)\nhc : IsComplete ↑(iSup V)\nthis : CompleteSpace { x // x ∈ iSup V }\n⊢ DirectSum.IsInternal V ↔ (iSup V)ᗮ = ⊥\n[PROOFSTEP]\nsimp only [DirectSum.isInternal_submodule_iff_independent_and_iSup_eq_top, hV.independent, true_and_iff,\n  Submodule.orthogonal_eq_bot_iff]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace 𝕜 E\ninst✝² : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nι : Type u_4\ninst✝¹ : Fintype ι\nV : ι → Submodule 𝕜 E\ninst✝ : ∀ (i : ι), CompleteSpace { x // x ∈ V i }\nhV : OrthogonalFamily 𝕜 (fun i => { x // x ∈ V i }) fun i => Submodule.subtypeₗᵢ (V i)\nx : E\nhx : x ∈ iSup V\n⊢ ∑ i : ι, ↑(↑(orthogonalProjection (V i)) x) = x\n[PROOFSTEP]\ninduction hx using Submodule.iSup_induction' with\n|\n  hp i x hx =>\n  refine'\n    (Finset.sum_eq_single_of_mem i (Finset.mem_univ _) fun j _ hij => _).trans (orthogonalProjection_eq_self_iff.mpr hx)\n  rw [orthogonalProjection_mem_subspace_orthogonalComplement_eq_zero, Submodule.coe_zero]\n  exact hV.isOrtho hij.symm hx\n| h0 => simp_rw [map_zero, Submodule.coe_zero, Finset.sum_const_zero]\n| hadd x y _ _ hx hy =>\n  simp_rw [map_add, Submodule.coe_add, Finset.sum_add_distrib]\n  exact congr_arg₂ (· + ·) hx hy\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace 𝕜 E\ninst✝² : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nι : Type u_4\ninst✝¹ : Fintype ι\nV : ι → Submodule 𝕜 E\ninst✝ : ∀ (i : ι), CompleteSpace { x // x ∈ V i }\nhV : OrthogonalFamily 𝕜 (fun i => { x // x ∈ V i }) fun i => Submodule.subtypeₗᵢ (V i)\nx : E\nhx : x ∈ iSup V\n⊢ ∑ i : ι, ↑(↑(orthogonalProjection (V i)) x) = x\n[PROOFSTEP]\ninduction hx using Submodule.iSup_induction' with\n|\n  hp i x hx =>\n  refine'\n    (Finset.sum_eq_single_of_mem i (Finset.mem_univ _) fun j _ hij => _).trans (orthogonalProjection_eq_self_iff.mpr hx)\n  rw [orthogonalProjection_mem_subspace_orthogonalComplement_eq_zero, Submodule.coe_zero]\n  exact hV.isOrtho hij.symm hx\n| h0 => simp_rw [map_zero, Submodule.coe_zero, Finset.sum_const_zero]\n| hadd x y _ _ hx hy =>\n  simp_rw [map_add, Submodule.coe_add, Finset.sum_add_distrib]\n  exact congr_arg₂ (· + ·) hx hy\n[GOAL]\ncase hp\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace 𝕜 E\ninst✝² : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nι : Type u_4\ninst✝¹ : Fintype ι\nV : ι → Submodule 𝕜 E\ninst✝ : ∀ (i : ι), CompleteSpace { x // x ∈ V i }\nhV : OrthogonalFamily 𝕜 (fun i => { x // x ∈ V i }) fun i => Submodule.subtypeₗᵢ (V i)\nx✝ : E\ni : ι\nx : E\nhx : x ∈ V i\n⊢ ∑ i : ι, ↑(↑(orthogonalProjection (V i)) x) = x\n[PROOFSTEP]\n\n|\n  hp i x hx =>\n  refine'\n    (Finset.sum_eq_single_of_mem i (Finset.mem_univ _) fun j _ hij => _).trans (orthogonalProjection_eq_self_iff.mpr hx)\n  rw [orthogonalProjection_mem_subspace_orthogonalComplement_eq_zero, Submodule.coe_zero]\n  exact hV.isOrtho hij.symm hx\n[GOAL]\ncase hp\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace 𝕜 E\ninst✝² : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nι : Type u_4\ninst✝¹ : Fintype ι\nV : ι → Submodule 𝕜 E\ninst✝ : ∀ (i : ι), CompleteSpace { x // x ∈ V i }\nhV : OrthogonalFamily 𝕜 (fun i => { x // x ∈ V i }) fun i => Submodule.subtypeₗᵢ (V i)\nx✝ : E\ni : ι\nx : E\nhx : x ∈ V i\n⊢ ∑ i : ι, ↑(↑(orthogonalProjection (V i)) x) = x\n[PROOFSTEP]\nrefine'\n  (Finset.sum_eq_single_of_mem i (Finset.mem_univ _) fun j _ hij => _).trans (orthogonalProjection_eq_self_iff.mpr hx)\n[GOAL]\ncase hp\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace 𝕜 E\ninst✝² : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nι : Type u_4\ninst✝¹ : Fintype ι\nV : ι → Submodule 𝕜 E\ninst✝ : ∀ (i : ι), CompleteSpace { x // x ∈ V i }\nhV : OrthogonalFamily 𝕜 (fun i => { x // x ∈ V i }) fun i => Submodule.subtypeₗᵢ (V i)\nx✝¹ : E\ni : ι\nx : E\nhx : x ∈ V i\nj : ι\nx✝ : j ∈ Finset.univ\nhij : j ≠ i\n⊢ ↑(↑(orthogonalProjection (V j)) x) = 0\n[PROOFSTEP]\nrw [orthogonalProjection_mem_subspace_orthogonalComplement_eq_zero, Submodule.coe_zero]\n[GOAL]\ncase hp\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace 𝕜 E\ninst✝² : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nι : Type u_4\ninst✝¹ : Fintype ι\nV : ι → Submodule 𝕜 E\ninst✝ : ∀ (i : ι), CompleteSpace { x // x ∈ V i }\nhV : OrthogonalFamily 𝕜 (fun i => { x // x ∈ V i }) fun i => Submodule.subtypeₗᵢ (V i)\nx✝¹ : E\ni : ι\nx : E\nhx : x ∈ V i\nj : ι\nx✝ : j ∈ Finset.univ\nhij : j ≠ i\n⊢ x ∈ (V j)ᗮ\n[PROOFSTEP]\nexact hV.isOrtho hij.symm hx\n[GOAL]\ncase h0\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace 𝕜 E\ninst✝² : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nι : Type u_4\ninst✝¹ : Fintype ι\nV : ι → Submodule 𝕜 E\ninst✝ : ∀ (i : ι), CompleteSpace { x // x ∈ V i }\nhV : OrthogonalFamily 𝕜 (fun i => { x // x ∈ V i }) fun i => Submodule.subtypeₗᵢ (V i)\nx : E\n⊢ ∑ i : ι, ↑(↑(orthogonalProjection (V i)) 0) = 0\n[PROOFSTEP]\n\n| h0 => simp_rw [map_zero, Submodule.coe_zero, Finset.sum_const_zero]\n[GOAL]\ncase h0\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace 𝕜 E\ninst✝² : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nι : Type u_4\ninst✝¹ : Fintype ι\nV : ι → Submodule 𝕜 E\ninst✝ : ∀ (i : ι), CompleteSpace { x // x ∈ V i }\nhV : OrthogonalFamily 𝕜 (fun i => { x // x ∈ V i }) fun i => Submodule.subtypeₗᵢ (V i)\nx : E\n⊢ ∑ i : ι, ↑(↑(orthogonalProjection (V i)) 0) = 0\n[PROOFSTEP]\nsimp_rw [map_zero, Submodule.coe_zero, Finset.sum_const_zero]\n[GOAL]\ncase hadd\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace 𝕜 E\ninst✝² : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nι : Type u_4\ninst✝¹ : Fintype ι\nV : ι → Submodule 𝕜 E\ninst✝ : ∀ (i : ι), CompleteSpace { x // x ∈ V i }\nhV : OrthogonalFamily 𝕜 (fun i => { x // x ∈ V i }) fun i => Submodule.subtypeₗᵢ (V i)\nx✝ x y : E\nhx✝ : x ∈ ⨆ (i : ι), V i\nhy✝ : y ∈ ⨆ (i : ι), V i\nhx : ∑ i : ι, ↑(↑(orthogonalProjection (V i)) x) = x\nhy : ∑ i : ι, ↑(↑(orthogonalProjection (V i)) y) = y\n⊢ ∑ i : ι, ↑(↑(orthogonalProjection (V i)) (x + y)) = x + y\n[PROOFSTEP]\n\n| hadd x y _ _ hx hy =>\n  simp_rw [map_add, Submodule.coe_add, Finset.sum_add_distrib]\n  exact congr_arg₂ (· + ·) hx hy\n[GOAL]\ncase hadd\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace 𝕜 E\ninst✝² : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nι : Type u_4\ninst✝¹ : Fintype ι\nV : ι → Submodule 𝕜 E\ninst✝ : ∀ (i : ι), CompleteSpace { x // x ∈ V i }\nhV : OrthogonalFamily 𝕜 (fun i => { x // x ∈ V i }) fun i => Submodule.subtypeₗᵢ (V i)\nx✝ x y : E\nhx✝ : x ∈ ⨆ (i : ι), V i\nhy✝ : y ∈ ⨆ (i : ι), V i\nhx : ∑ i : ι, ↑(↑(orthogonalProjection (V i)) x) = x\nhy : ∑ i : ι, ↑(↑(orthogonalProjection (V i)) y) = y\n⊢ ∑ i : ι, ↑(↑(orthogonalProjection (V i)) (x + y)) = x + y\n[PROOFSTEP]\nsimp_rw [map_add, Submodule.coe_add, Finset.sum_add_distrib]\n[GOAL]\ncase hadd\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace 𝕜 E\ninst✝² : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nι : Type u_4\ninst✝¹ : Fintype ι\nV : ι → Submodule 𝕜 E\ninst✝ : ∀ (i : ι), CompleteSpace { x // x ∈ V i }\nhV : OrthogonalFamily 𝕜 (fun i => { x // x ∈ V i }) fun i => Submodule.subtypeₗᵢ (V i)\nx✝ x y : E\nhx✝ : x ∈ ⨆ (i : ι), V i\nhy✝ : y ∈ ⨆ (i : ι), V i\nhx : ∑ i : ι, ↑(↑(orthogonalProjection (V i)) x) = x\nhy : ∑ i : ι, ↑(↑(orthogonalProjection (V i)) y) = y\n⊢ ∑ x_1 : ι, ↑(↑(orthogonalProjection (V x_1)) x) + ∑ x : ι, ↑(↑(orthogonalProjection (V x)) y) = x + y\n[PROOFSTEP]\nexact congr_arg₂ (· + ·) hx hy\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace 𝕜 E\ninst✝² : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nι : Type u_4\ninst✝¹ : DecidableEq ι\nV : ι → Submodule 𝕜 E\nhV : OrthogonalFamily 𝕜 (fun i => { x // x ∈ V i }) fun i => Submodule.subtypeₗᵢ (V i)\nx : ⨁ (i : ι), { x // x ∈ V i }\ni : ι\ninst✝ : CompleteSpace { x // x ∈ V i }\n⊢ ↑(orthogonalProjection (V i)) (↑(DirectSum.coeAddMonoidHom V) x) = ↑x i\n[PROOFSTEP]\ninduction' x using DirectSum.induction_on with j x x y hx hy\n[GOAL]\ncase H_zero\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace 𝕜 E\ninst✝² : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nι : Type u_4\ninst✝¹ : DecidableEq ι\nV : ι → Submodule 𝕜 E\nhV : OrthogonalFamily 𝕜 (fun i => { x // x ∈ V i }) fun i => Submodule.subtypeₗᵢ (V i)\ni : ι\ninst✝ : CompleteSpace { x // x ∈ V i }\n⊢ ↑(orthogonalProjection (V i)) (↑(DirectSum.coeAddMonoidHom V) 0) = ↑0 i\n[PROOFSTEP]\nsimp\n[GOAL]\ncase H_basic\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace 𝕜 E\ninst✝² : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nι : Type u_4\ninst✝¹ : DecidableEq ι\nV : ι → Submodule 𝕜 E\nhV : OrthogonalFamily 𝕜 (fun i => { x // x ∈ V i }) fun i => Submodule.subtypeₗᵢ (V i)\ni : ι\ninst✝ : CompleteSpace { x // x ∈ V i }\nj : ι\nx : { x // x ∈ V j }\n⊢ ↑(orthogonalProjection (V i)) (↑(DirectSum.coeAddMonoidHom V) (↑(of (fun i => { x // x ∈ V i }) j) x)) =\n    ↑(↑(of (fun i => { x // x ∈ V i }) j) x) i\n[PROOFSTEP]\nsimp_rw [DirectSum.coeAddMonoidHom_of, DirectSum.of]\n  -- porting note: was in the previous `simp_rw`, no longer works\n[GOAL]\ncase H_basic\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace 𝕜 E\ninst✝² : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nι : Type u_4\ninst✝¹ : DecidableEq ι\nV : ι → Submodule 𝕜 E\nhV : OrthogonalFamily 𝕜 (fun i => { x // x ∈ V i }) fun i => Submodule.subtypeₗᵢ (V i)\ni : ι\ninst✝ : CompleteSpace { x // x ∈ V i }\nj : ι\nx : { x // x ∈ V j }\n⊢ ↑(orthogonalProjection (V i)) ↑x = ↑(↑(DFinsupp.singleAddHom (fun i => { x // x ∈ V i }) j) x) i\n[PROOFSTEP]\nrw [DFinsupp.singleAddHom_apply]\n[GOAL]\ncase H_basic\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace 𝕜 E\ninst✝² : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nι : Type u_4\ninst✝¹ : DecidableEq ι\nV : ι → Submodule 𝕜 E\nhV : OrthogonalFamily 𝕜 (fun i => { x // x ∈ V i }) fun i => Submodule.subtypeₗᵢ (V i)\ni : ι\ninst✝ : CompleteSpace { x // x ∈ V i }\nj : ι\nx : { x // x ∈ V j }\n⊢ ↑(orthogonalProjection (V i)) ↑x = ↑(DFinsupp.single j x) i\n[PROOFSTEP]\nobtain rfl | hij := Decidable.eq_or_ne i j\n[GOAL]\ncase H_basic.inl\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace 𝕜 E\ninst✝² : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nι : Type u_4\ninst✝¹ : DecidableEq ι\nV : ι → Submodule 𝕜 E\nhV : OrthogonalFamily 𝕜 (fun i => { x // x ∈ V i }) fun i => Submodule.subtypeₗᵢ (V i)\ni : ι\ninst✝ : CompleteSpace { x // x ∈ V i }\nx : { x // x ∈ V i }\n⊢ ↑(orthogonalProjection (V i)) ↑x = ↑(DFinsupp.single i x) i\n[PROOFSTEP]\nrw [orthogonalProjection_mem_subspace_eq_self, DFinsupp.single_eq_same]\n[GOAL]\ncase H_basic.inr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace 𝕜 E\ninst✝² : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nι : Type u_4\ninst✝¹ : DecidableEq ι\nV : ι → Submodule 𝕜 E\nhV : OrthogonalFamily 𝕜 (fun i => { x // x ∈ V i }) fun i => Submodule.subtypeₗᵢ (V i)\ni : ι\ninst✝ : CompleteSpace { x // x ∈ V i }\nj : ι\nx : { x // x ∈ V j }\nhij : i ≠ j\n⊢ ↑(orthogonalProjection (V i)) ↑x = ↑(DFinsupp.single j x) i\n[PROOFSTEP]\nrw [orthogonalProjection_mem_subspace_orthogonalComplement_eq_zero, DFinsupp.single_eq_of_ne hij.symm]\n[GOAL]\ncase H_basic.inr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace 𝕜 E\ninst✝² : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nι : Type u_4\ninst✝¹ : DecidableEq ι\nV : ι → Submodule 𝕜 E\nhV : OrthogonalFamily 𝕜 (fun i => { x // x ∈ V i }) fun i => Submodule.subtypeₗᵢ (V i)\ni : ι\ninst✝ : CompleteSpace { x // x ∈ V i }\nj : ι\nx : { x // x ∈ V j }\nhij : i ≠ j\n⊢ ↑x ∈ (V i)ᗮ\n[PROOFSTEP]\nexact hV.isOrtho hij.symm x.prop\n[GOAL]\ncase H_plus\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace 𝕜 E\ninst✝² : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nι : Type u_4\ninst✝¹ : DecidableEq ι\nV : ι → Submodule 𝕜 E\nhV : OrthogonalFamily 𝕜 (fun i => { x // x ∈ V i }) fun i => Submodule.subtypeₗᵢ (V i)\ni : ι\ninst✝ : CompleteSpace { x // x ∈ V i }\nx y : ⨁ (i : ι), { x // x ∈ V i }\nhx : ↑(orthogonalProjection (V i)) (↑(DirectSum.coeAddMonoidHom V) x) = ↑x i\nhy : ↑(orthogonalProjection (V i)) (↑(DirectSum.coeAddMonoidHom V) y) = ↑y i\n⊢ ↑(orthogonalProjection (V i)) (↑(DirectSum.coeAddMonoidHom V) (x + y)) = ↑(x + y) i\n[PROOFSTEP]\nsimp_rw [map_add]\n[GOAL]\ncase H_plus\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace 𝕜 E\ninst✝² : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nι : Type u_4\ninst✝¹ : DecidableEq ι\nV : ι → Submodule 𝕜 E\nhV : OrthogonalFamily 𝕜 (fun i => { x // x ∈ V i }) fun i => Submodule.subtypeₗᵢ (V i)\ni : ι\ninst✝ : CompleteSpace { x // x ∈ V i }\nx y : ⨁ (i : ι), { x // x ∈ V i }\nhx : ↑(orthogonalProjection (V i)) (↑(DirectSum.coeAddMonoidHom V) x) = ↑x i\nhy : ↑(orthogonalProjection (V i)) (↑(DirectSum.coeAddMonoidHom V) y) = ↑y i\n⊢ ↑(orthogonalProjection (V i)) (↑(DirectSum.coeAddMonoidHom V) x) +\n      ↑(orthogonalProjection (V i)) (↑(DirectSum.coeAddMonoidHom V) y) =\n    ↑(x + y) i\n[PROOFSTEP]\nexact congr_arg₂ (· + ·) hx hy\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nι : Type u_4\ninst✝² : DecidableEq ι\ninst✝¹ : Fintype ι\nV : ι → Submodule 𝕜 E\ninst✝ : ∀ (i : ι), CompleteSpace { x // x ∈ V i }\nhV : OrthogonalFamily 𝕜 (fun i => { x // x ∈ V i }) fun i => Submodule.subtypeₗᵢ (V i)\nh : iSup V = ⊤\nx : E\n⊢ ↑(DirectSum.coeAddMonoidHom V)\n      ((fun x => ↑DFinsupp.equivFunOnFintype.symm fun i => ↑(orthogonalProjection (V i)) x) x) =\n    x\n[PROOFSTEP]\ndsimp only\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nι : Type u_4\ninst✝² : DecidableEq ι\ninst✝¹ : Fintype ι\nV : ι → Submodule 𝕜 E\ninst✝ : ∀ (i : ι), CompleteSpace { x // x ∈ V i }\nhV : OrthogonalFamily 𝕜 (fun i => { x // x ∈ V i }) fun i => Submodule.subtypeₗᵢ (V i)\nh : iSup V = ⊤\nx : E\n⊢ ↑(DirectSum.coeAddMonoidHom V) (↑DFinsupp.equivFunOnFintype.symm fun i => ↑(orthogonalProjection (V i)) x) = x\n[PROOFSTEP]\nletI := fun i => Classical.decEq (V i)\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nι : Type u_4\ninst✝² : DecidableEq ι\ninst✝¹ : Fintype ι\nV : ι → Submodule 𝕜 E\ninst✝ : ∀ (i : ι), CompleteSpace { x // x ∈ V i }\nhV : OrthogonalFamily 𝕜 (fun i => { x // x ∈ V i }) fun i => Submodule.subtypeₗᵢ (V i)\nh : iSup V = ⊤\nx : E\nthis : (i : ι) → DecidableEq { x // x ∈ V i } := fun i => Classical.decEq { x // x ∈ V i }\n⊢ ↑(DirectSum.coeAddMonoidHom V) (↑DFinsupp.equivFunOnFintype.symm fun i => ↑(orthogonalProjection (V i)) x) = x\n[PROOFSTEP]\nrw [DirectSum.coeAddMonoidHom, DirectSum.toAddMonoid, DFinsupp.liftAddHom_apply, DFinsupp.sumAddHom_apply,\n  DFinsupp.sum_eq_sum_fintype]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nι : Type u_4\ninst✝² : DecidableEq ι\ninst✝¹ : Fintype ι\nV : ι → Submodule 𝕜 E\ninst✝ : ∀ (i : ι), CompleteSpace { x // x ∈ V i }\nhV : OrthogonalFamily 𝕜 (fun i => { x // x ∈ V i }) fun i => Submodule.subtypeₗᵢ (V i)\nh : iSup V = ⊤\nx : E\nthis : (i : ι) → DecidableEq { x // x ∈ V i } := fun i => Classical.decEq { x // x ∈ V i }\n⊢ ∑ i : ι,\n      ↑(AddSubmonoidClass.subtype (V i))\n        (↑DFinsupp.equivFunOnFintype (↑DFinsupp.equivFunOnFintype.symm fun i => ↑(orthogonalProjection (V i)) x) i) =\n    x\n[PROOFSTEP]\nsimp_rw [Equiv.apply_symm_apply, AddSubmonoidClass.coe_subtype]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nι : Type u_4\ninst✝² : DecidableEq ι\ninst✝¹ : Fintype ι\nV : ι → Submodule 𝕜 E\ninst✝ : ∀ (i : ι), CompleteSpace { x // x ∈ V i }\nhV : OrthogonalFamily 𝕜 (fun i => { x // x ∈ V i }) fun i => Submodule.subtypeₗᵢ (V i)\nh : iSup V = ⊤\nx : E\nthis : (i : ι) → DecidableEq { x // x ∈ V i } := fun i => Classical.decEq { x // x ∈ V i }\n⊢ ∑ x_1 : ι, ↑(↑(orthogonalProjection (V x_1)) x) = x\n[PROOFSTEP]\nexact hV.sum_projection_of_mem_iSup _ ((h.ge : _) Submodule.mem_top)\n[GOAL]\ncase hf\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nι : Type u_4\ninst✝² : DecidableEq ι\ninst✝¹ : Fintype ι\nV : ι → Submodule 𝕜 E\ninst✝ : ∀ (i : ι), CompleteSpace { x // x ∈ V i }\nhV : OrthogonalFamily 𝕜 (fun i => { x // x ∈ V i }) fun i => Submodule.subtypeₗᵢ (V i)\nh : iSup V = ⊤\nx : E\nthis : (i : ι) → DecidableEq { x // x ∈ V i } := fun i => Classical.decEq { x // x ∈ V i }\n⊢ ∀ (i : ι), ↑(AddSubmonoidClass.subtype (V i)) 0 = 0\n[PROOFSTEP]\nintro i\n[GOAL]\ncase hf\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nι : Type u_4\ninst✝² : DecidableEq ι\ninst✝¹ : Fintype ι\nV : ι → Submodule 𝕜 E\ninst✝ : ∀ (i : ι), CompleteSpace { x // x ∈ V i }\nhV : OrthogonalFamily 𝕜 (fun i => { x // x ∈ V i }) fun i => Submodule.subtypeₗᵢ (V i)\nh : iSup V = ⊤\nx : E\nthis : (i : ι) → DecidableEq { x // x ∈ V i } := fun i => Classical.decEq { x // x ∈ V i }\ni : ι\n⊢ ↑(AddSubmonoidClass.subtype (V i)) 0 = 0\n[PROOFSTEP]\nexact map_zero _\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nι : Type u_4\ninst✝² : DecidableEq ι\ninst✝¹ : Fintype ι\nV : ι → Submodule 𝕜 E\ninst✝ : ∀ (i : ι), CompleteSpace { x // x ∈ V i }\nhV : OrthogonalFamily 𝕜 (fun i => { x // x ∈ V i }) fun i => Submodule.subtypeₗᵢ (V i)\nh : iSup V = ⊤\nx : ⨁ (i : ι), { x // x ∈ V i }\n⊢ (fun x => ↑DFinsupp.equivFunOnFintype.symm fun i => ↑(orthogonalProjection (V i)) x)\n      (↑(DirectSum.coeAddMonoidHom V) x) =\n    x\n[PROOFSTEP]\ndsimp only\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nι : Type u_4\ninst✝² : DecidableEq ι\ninst✝¹ : Fintype ι\nV : ι → Submodule 𝕜 E\ninst✝ : ∀ (i : ι), CompleteSpace { x // x ∈ V i }\nhV : OrthogonalFamily 𝕜 (fun i => { x // x ∈ V i }) fun i => Submodule.subtypeₗᵢ (V i)\nh : iSup V = ⊤\nx : ⨁ (i : ι), { x // x ∈ V i }\n⊢ (↑DFinsupp.equivFunOnFintype.symm fun i => ↑(orthogonalProjection (V i)) (↑(DirectSum.coeAddMonoidHom V) x)) = x\n[PROOFSTEP]\nsimp_rw [hV.projection_directSum_coeAddHom, DFinsupp.equivFunOnFintype_symm_coe]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nv : Set E\nhv : Orthonormal 𝕜 Subtype.val\n⊢ (∀ (u : Set E), u ⊇ v → Orthonormal 𝕜 Subtype.val → u = v) ↔ (span 𝕜 v)ᗮ = ⊥\n[PROOFSTEP]\nrw [Submodule.eq_bot_iff]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nv : Set E\nhv : Orthonormal 𝕜 Subtype.val\n⊢ (∀ (u : Set E), u ⊇ v → Orthonormal 𝕜 Subtype.val → u = v) ↔ ∀ (x : E), x ∈ (span 𝕜 v)ᗮ → x = 0\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nv : Set E\nhv : Orthonormal 𝕜 Subtype.val\n⊢ (∀ (u : Set E), u ⊇ v → Orthonormal 𝕜 Subtype.val → u = v) → ∀ (x : E), x ∈ (span 𝕜 v)ᗮ → x = 0\n[PROOFSTEP]\ncontrapose!\n  -- ** direction 1: nonempty orthogonal complement implies nonmaximal\n[GOAL]\ncase mp\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nv : Set E\nhv : Orthonormal 𝕜 Subtype.val\n⊢ (∃ x, x ∈ (span 𝕜 v)ᗮ ∧ x ≠ 0) → ∃ u, u ⊇ v ∧ Orthonormal 𝕜 Subtype.val ∧ u ≠ v\n[PROOFSTEP]\nrintro\n  ⟨x, hx', hx⟩\n      -- take a nonzero vector and normalize it\n[GOAL]\ncase mp.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nv : Set E\nhv : Orthonormal 𝕜 Subtype.val\nx : E\nhx' : x ∈ (span 𝕜 v)ᗮ\nhx : x ≠ 0\n⊢ ∃ u, u ⊇ v ∧ Orthonormal 𝕜 Subtype.val ∧ u ≠ v\n[PROOFSTEP]\nlet e := (‖x‖⁻¹ : 𝕜) • x\n[GOAL]\ncase mp.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nv : Set E\nhv : Orthonormal 𝕜 Subtype.val\nx : E\nhx' : x ∈ (span 𝕜 v)ᗮ\nhx : x ≠ 0\ne : E := (↑‖x‖)⁻¹ • x\n⊢ ∃ u, u ⊇ v ∧ Orthonormal 𝕜 Subtype.val ∧ u ≠ v\n[PROOFSTEP]\nhave he : ‖e‖ = 1 := by simp [norm_smul_inv_norm hx]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nv : Set E\nhv : Orthonormal 𝕜 Subtype.val\nx : E\nhx' : x ∈ (span 𝕜 v)ᗮ\nhx : x ≠ 0\ne : E := (↑‖x‖)⁻¹ • x\n⊢ ‖e‖ = 1\n[PROOFSTEP]\nsimp [norm_smul_inv_norm hx]\n[GOAL]\ncase mp.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nv : Set E\nhv : Orthonormal 𝕜 Subtype.val\nx : E\nhx' : x ∈ (span 𝕜 v)ᗮ\nhx : x ≠ 0\ne : E := (↑‖x‖)⁻¹ • x\nhe : ‖e‖ = 1\n⊢ ∃ u, u ⊇ v ∧ Orthonormal 𝕜 Subtype.val ∧ u ≠ v\n[PROOFSTEP]\nhave he' : e ∈ (span 𝕜 v)ᗮ := smul_mem' _ _ hx'\n[GOAL]\ncase mp.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nv : Set E\nhv : Orthonormal 𝕜 Subtype.val\nx : E\nhx' : x ∈ (span 𝕜 v)ᗮ\nhx : x ≠ 0\ne : E := (↑‖x‖)⁻¹ • x\nhe : ‖e‖ = 1\nhe' : e ∈ (span 𝕜 v)ᗮ\n⊢ ∃ u, u ⊇ v ∧ Orthonormal 𝕜 Subtype.val ∧ u ≠ v\n[PROOFSTEP]\nhave he'' : e ∉ v := by\n  intro hev\n  have : e = 0 := by\n    have : e ∈ span 𝕜 v ⊓ (span 𝕜 v)ᗮ := ⟨subset_span hev, he'⟩\n    simpa [(span 𝕜 v).inf_orthogonal_eq_bot] using this\n  have : e ≠ 0 := hv.ne_zero ⟨e, hev⟩\n  contradiction\n    -- put this together with `v` to provide a candidate orthonormal basis for the whole space\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nv : Set E\nhv : Orthonormal 𝕜 Subtype.val\nx : E\nhx' : x ∈ (span 𝕜 v)ᗮ\nhx : x ≠ 0\ne : E := (↑‖x‖)⁻¹ • x\nhe : ‖e‖ = 1\nhe' : e ∈ (span 𝕜 v)ᗮ\n⊢ ¬e ∈ v\n[PROOFSTEP]\nintro hev\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nv : Set E\nhv : Orthonormal 𝕜 Subtype.val\nx : E\nhx' : x ∈ (span 𝕜 v)ᗮ\nhx : x ≠ 0\ne : E := (↑‖x‖)⁻¹ • x\nhe : ‖e‖ = 1\nhe' : e ∈ (span 𝕜 v)ᗮ\nhev : e ∈ v\n⊢ False\n[PROOFSTEP]\nhave : e = 0 := by\n  have : e ∈ span 𝕜 v ⊓ (span 𝕜 v)ᗮ := ⟨subset_span hev, he'⟩\n  simpa [(span 𝕜 v).inf_orthogonal_eq_bot] using this\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nv : Set E\nhv : Orthonormal 𝕜 Subtype.val\nx : E\nhx' : x ∈ (span 𝕜 v)ᗮ\nhx : x ≠ 0\ne : E := (↑‖x‖)⁻¹ • x\nhe : ‖e‖ = 1\nhe' : e ∈ (span 𝕜 v)ᗮ\nhev : e ∈ v\n⊢ e = 0\n[PROOFSTEP]\nhave : e ∈ span 𝕜 v ⊓ (span 𝕜 v)ᗮ := ⟨subset_span hev, he'⟩\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nv : Set E\nhv : Orthonormal 𝕜 Subtype.val\nx : E\nhx' : x ∈ (span 𝕜 v)ᗮ\nhx : x ≠ 0\ne : E := (↑‖x‖)⁻¹ • x\nhe : ‖e‖ = 1\nhe' : e ∈ (span 𝕜 v)ᗮ\nhev : e ∈ v\nthis : e ∈ span 𝕜 v ⊓ (span 𝕜 v)ᗮ\n⊢ e = 0\n[PROOFSTEP]\nsimpa [(span 𝕜 v).inf_orthogonal_eq_bot] using this\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nv : Set E\nhv : Orthonormal 𝕜 Subtype.val\nx : E\nhx' : x ∈ (span 𝕜 v)ᗮ\nhx : x ≠ 0\ne : E := (↑‖x‖)⁻¹ • x\nhe : ‖e‖ = 1\nhe' : e ∈ (span 𝕜 v)ᗮ\nhev : e ∈ v\nthis : e = 0\n⊢ False\n[PROOFSTEP]\nhave : e ≠ 0 := hv.ne_zero ⟨e, hev⟩\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nv : Set E\nhv : Orthonormal 𝕜 Subtype.val\nx : E\nhx' : x ∈ (span 𝕜 v)ᗮ\nhx : x ≠ 0\ne : E := (↑‖x‖)⁻¹ • x\nhe : ‖e‖ = 1\nhe' : e ∈ (span 𝕜 v)ᗮ\nhev : e ∈ v\nthis✝ : e = 0\nthis : e ≠ 0\n⊢ False\n[PROOFSTEP]\ncontradiction\n  -- put this together with `v` to provide a candidate orthonormal basis for the whole space\n[GOAL]\ncase mp.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nv : Set E\nhv : Orthonormal 𝕜 Subtype.val\nx : E\nhx' : x ∈ (span 𝕜 v)ᗮ\nhx : x ≠ 0\ne : E := (↑‖x‖)⁻¹ • x\nhe : ‖e‖ = 1\nhe' : e ∈ (span 𝕜 v)ᗮ\nhe'' : ¬e ∈ v\n⊢ ∃ u, u ⊇ v ∧ Orthonormal 𝕜 Subtype.val ∧ u ≠ v\n[PROOFSTEP]\nrefine' ⟨insert e v, v.subset_insert e, ⟨_, _⟩, (ne_insert_of_not_mem v he'').symm⟩\n[GOAL]\ncase mp.intro.intro.refine'_1\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nv : Set E\nhv : Orthonormal 𝕜 Subtype.val\nx : E\nhx' : x ∈ (span 𝕜 v)ᗮ\nhx : x ≠ 0\ne : E := (↑‖x‖)⁻¹ • x\nhe : ‖e‖ = 1\nhe' : e ∈ (span 𝕜 v)ᗮ\nhe'' : ¬e ∈ v\n⊢ ∀ (i : { x // x ∈ insert e v }), ‖↑i‖ = 1\n[PROOFSTEP]\nrintro ⟨a, ha'⟩\n[GOAL]\ncase mp.intro.intro.refine'_1.mk\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nv : Set E\nhv : Orthonormal 𝕜 Subtype.val\nx : E\nhx' : x ∈ (span 𝕜 v)ᗮ\nhx : x ≠ 0\ne : E := (↑‖x‖)⁻¹ • x\nhe : ‖e‖ = 1\nhe' : e ∈ (span 𝕜 v)ᗮ\nhe'' : ¬e ∈ v\na : E\nha' : a ∈ insert e v\n⊢ ‖↑{ val := a, property := ha' }‖ = 1\n[PROOFSTEP]\ncases' eq_or_mem_of_mem_insert ha' with ha ha\n[GOAL]\ncase mp.intro.intro.refine'_1.mk.inl\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nv : Set E\nhv : Orthonormal 𝕜 Subtype.val\nx : E\nhx' : x ∈ (span 𝕜 v)ᗮ\nhx : x ≠ 0\ne : E := (↑‖x‖)⁻¹ • x\nhe : ‖e‖ = 1\nhe' : e ∈ (span 𝕜 v)ᗮ\nhe'' : ¬e ∈ v\na : E\nha' : a ∈ insert e v\nha : a = e\n⊢ ‖↑{ val := a, property := ha' }‖ = 1\n[PROOFSTEP]\nsimp [ha, he]\n[GOAL]\ncase mp.intro.intro.refine'_1.mk.inr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nv : Set E\nhv : Orthonormal 𝕜 Subtype.val\nx : E\nhx' : x ∈ (span 𝕜 v)ᗮ\nhx : x ≠ 0\ne : E := (↑‖x‖)⁻¹ • x\nhe : ‖e‖ = 1\nhe' : e ∈ (span 𝕜 v)ᗮ\nhe'' : ¬e ∈ v\na : E\nha' : a ∈ insert e v\nha : a ∈ v\n⊢ ‖↑{ val := a, property := ha' }‖ = 1\n[PROOFSTEP]\nexact hv.1 ⟨a, ha⟩\n[GOAL]\ncase mp.intro.intro.refine'_2\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nv : Set E\nhv : Orthonormal 𝕜 Subtype.val\nx : E\nhx' : x ∈ (span 𝕜 v)ᗮ\nhx : x ≠ 0\ne : E := (↑‖x‖)⁻¹ • x\nhe : ‖e‖ = 1\nhe' : e ∈ (span 𝕜 v)ᗮ\nhe'' : ¬e ∈ v\n⊢ ∀ {i j : { x // x ∈ insert e v }}, i ≠ j → inner ↑i ↑j = 0\n[PROOFSTEP]\nhave h_end : ∀ a ∈ v, ⟪a, e⟫ = 0 := by\n  intro a ha\n  exact he' a (Submodule.subset_span ha)\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nv : Set E\nhv : Orthonormal 𝕜 Subtype.val\nx : E\nhx' : x ∈ (span 𝕜 v)ᗮ\nhx : x ≠ 0\ne : E := (↑‖x‖)⁻¹ • x\nhe : ‖e‖ = 1\nhe' : e ∈ (span 𝕜 v)ᗮ\nhe'' : ¬e ∈ v\n⊢ ∀ (a : E), a ∈ v → inner a e = 0\n[PROOFSTEP]\nintro a ha\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nv : Set E\nhv : Orthonormal 𝕜 Subtype.val\nx : E\nhx' : x ∈ (span 𝕜 v)ᗮ\nhx : x ≠ 0\ne : E := (↑‖x‖)⁻¹ • x\nhe : ‖e‖ = 1\nhe' : e ∈ (span 𝕜 v)ᗮ\nhe'' : ¬e ∈ v\na : E\nha : a ∈ v\n⊢ inner a e = 0\n[PROOFSTEP]\nexact he' a (Submodule.subset_span ha)\n[GOAL]\ncase mp.intro.intro.refine'_2\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nv : Set E\nhv : Orthonormal 𝕜 Subtype.val\nx : E\nhx' : x ∈ (span 𝕜 v)ᗮ\nhx : x ≠ 0\ne : E := (↑‖x‖)⁻¹ • x\nhe : ‖e‖ = 1\nhe' : e ∈ (span 𝕜 v)ᗮ\nhe'' : ¬e ∈ v\nh_end : ∀ (a : E), a ∈ v → inner a e = 0\n⊢ ∀ {i j : { x // x ∈ insert e v }}, i ≠ j → inner ↑i ↑j = 0\n[PROOFSTEP]\nrintro ⟨a, ha'⟩\n[GOAL]\ncase mp.intro.intro.refine'_2.mk\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nv : Set E\nhv : Orthonormal 𝕜 Subtype.val\nx : E\nhx' : x ∈ (span 𝕜 v)ᗮ\nhx : x ≠ 0\ne : E := (↑‖x‖)⁻¹ • x\nhe : ‖e‖ = 1\nhe' : e ∈ (span 𝕜 v)ᗮ\nhe'' : ¬e ∈ v\nh_end : ∀ (a : E), a ∈ v → inner a e = 0\na : E\nha' : a ∈ insert e v\n⊢ ∀ {j : { x // x ∈ insert e v }}, { val := a, property := ha' } ≠ j → inner ↑{ val := a, property := ha' } ↑j = 0\n[PROOFSTEP]\ncases' eq_or_mem_of_mem_insert ha' with ha ha\n[GOAL]\ncase mp.intro.intro.refine'_2.mk.inl\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nv : Set E\nhv : Orthonormal 𝕜 Subtype.val\nx : E\nhx' : x ∈ (span 𝕜 v)ᗮ\nhx : x ≠ 0\ne : E := (↑‖x‖)⁻¹ • x\nhe : ‖e‖ = 1\nhe' : e ∈ (span 𝕜 v)ᗮ\nhe'' : ¬e ∈ v\nh_end : ∀ (a : E), a ∈ v → inner a e = 0\na : E\nha' : a ∈ insert e v\nha : a = e\n⊢ ∀ {j : { x // x ∈ insert e v }}, { val := a, property := ha' } ≠ j → inner ↑{ val := a, property := ha' } ↑j = 0\n[PROOFSTEP]\nrintro ⟨b, hb'⟩ hab'\n[GOAL]\ncase mp.intro.intro.refine'_2.mk.inl.mk\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nv : Set E\nhv : Orthonormal 𝕜 Subtype.val\nx : E\nhx' : x ∈ (span 𝕜 v)ᗮ\nhx : x ≠ 0\ne : E := (↑‖x‖)⁻¹ • x\nhe : ‖e‖ = 1\nhe' : e ∈ (span 𝕜 v)ᗮ\nhe'' : ¬e ∈ v\nh_end : ∀ (a : E), a ∈ v → inner a e = 0\na : E\nha' : a ∈ insert e v\nha : a = e\nb : E\nhb' : b ∈ insert e v\nhab' : { val := a, property := ha' } ≠ { val := b, property := hb' }\n⊢ inner ↑{ val := a, property := ha' } ↑{ val := b, property := hb' } = 0\n[PROOFSTEP]\nhave hb : b ∈ v := by\n  refine' mem_of_mem_insert_of_ne hb' _\n  intro hbe'\n  apply hab'\n  simp [ha, hbe']\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nv : Set E\nhv : Orthonormal 𝕜 Subtype.val\nx : E\nhx' : x ∈ (span 𝕜 v)ᗮ\nhx : x ≠ 0\ne : E := (↑‖x‖)⁻¹ • x\nhe : ‖e‖ = 1\nhe' : e ∈ (span 𝕜 v)ᗮ\nhe'' : ¬e ∈ v\nh_end : ∀ (a : E), a ∈ v → inner a e = 0\na : E\nha' : a ∈ insert e v\nha : a = e\nb : E\nhb' : b ∈ insert e v\nhab' : { val := a, property := ha' } ≠ { val := b, property := hb' }\n⊢ b ∈ v\n[PROOFSTEP]\nrefine' mem_of_mem_insert_of_ne hb' _\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nv : Set E\nhv : Orthonormal 𝕜 Subtype.val\nx : E\nhx' : x ∈ (span 𝕜 v)ᗮ\nhx : x ≠ 0\ne : E := (↑‖x‖)⁻¹ • x\nhe : ‖e‖ = 1\nhe' : e ∈ (span 𝕜 v)ᗮ\nhe'' : ¬e ∈ v\nh_end : ∀ (a : E), a ∈ v → inner a e = 0\na : E\nha' : a ∈ insert e v\nha : a = e\nb : E\nhb' : b ∈ insert e v\nhab' : { val := a, property := ha' } ≠ { val := b, property := hb' }\n⊢ b ≠ e\n[PROOFSTEP]\nintro hbe'\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nv : Set E\nhv : Orthonormal 𝕜 Subtype.val\nx : E\nhx' : x ∈ (span 𝕜 v)ᗮ\nhx : x ≠ 0\ne : E := (↑‖x‖)⁻¹ • x\nhe : ‖e‖ = 1\nhe' : e ∈ (span 𝕜 v)ᗮ\nhe'' : ¬e ∈ v\nh_end : ∀ (a : E), a ∈ v → inner a e = 0\na : E\nha' : a ∈ insert e v\nha : a = e\nb : E\nhb' : b ∈ insert e v\nhab' : { val := a, property := ha' } ≠ { val := b, property := hb' }\nhbe' : b = e\n⊢ False\n[PROOFSTEP]\napply hab'\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nv : Set E\nhv : Orthonormal 𝕜 Subtype.val\nx : E\nhx' : x ∈ (span 𝕜 v)ᗮ\nhx : x ≠ 0\ne : E := (↑‖x‖)⁻¹ • x\nhe : ‖e‖ = 1\nhe' : e ∈ (span 𝕜 v)ᗮ\nhe'' : ¬e ∈ v\nh_end : ∀ (a : E), a ∈ v → inner a e = 0\na : E\nha' : a ∈ insert e v\nha : a = e\nb : E\nhb' : b ∈ insert e v\nhab' : { val := a, property := ha' } ≠ { val := b, property := hb' }\nhbe' : b = e\n⊢ { val := a, property := ha' } = { val := b, property := hb' }\n[PROOFSTEP]\nsimp [ha, hbe']\n[GOAL]\ncase mp.intro.intro.refine'_2.mk.inl.mk\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nv : Set E\nhv : Orthonormal 𝕜 Subtype.val\nx : E\nhx' : x ∈ (span 𝕜 v)ᗮ\nhx : x ≠ 0\ne : E := (↑‖x‖)⁻¹ • x\nhe : ‖e‖ = 1\nhe' : e ∈ (span 𝕜 v)ᗮ\nhe'' : ¬e ∈ v\nh_end : ∀ (a : E), a ∈ v → inner a e = 0\na : E\nha' : a ∈ insert e v\nha : a = e\nb : E\nhb' : b ∈ insert e v\nhab' : { val := a, property := ha' } ≠ { val := b, property := hb' }\nhb : b ∈ v\n⊢ inner ↑{ val := a, property := ha' } ↑{ val := b, property := hb' } = 0\n[PROOFSTEP]\nrw [inner_eq_zero_symm]\n[GOAL]\ncase mp.intro.intro.refine'_2.mk.inl.mk\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nv : Set E\nhv : Orthonormal 𝕜 Subtype.val\nx : E\nhx' : x ∈ (span 𝕜 v)ᗮ\nhx : x ≠ 0\ne : E := (↑‖x‖)⁻¹ • x\nhe : ‖e‖ = 1\nhe' : e ∈ (span 𝕜 v)ᗮ\nhe'' : ¬e ∈ v\nh_end : ∀ (a : E), a ∈ v → inner a e = 0\na : E\nha' : a ∈ insert e v\nha : a = e\nb : E\nhb' : b ∈ insert e v\nhab' : { val := a, property := ha' } ≠ { val := b, property := hb' }\nhb : b ∈ v\n⊢ inner ↑{ val := b, property := hb' } ↑{ val := a, property := ha' } = 0\n[PROOFSTEP]\nsimpa [ha] using h_end b hb\n[GOAL]\ncase mp.intro.intro.refine'_2.mk.inr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nv : Set E\nhv : Orthonormal 𝕜 Subtype.val\nx : E\nhx' : x ∈ (span 𝕜 v)ᗮ\nhx : x ≠ 0\ne : E := (↑‖x‖)⁻¹ • x\nhe : ‖e‖ = 1\nhe' : e ∈ (span 𝕜 v)ᗮ\nhe'' : ¬e ∈ v\nh_end : ∀ (a : E), a ∈ v → inner a e = 0\na : E\nha' : a ∈ insert e v\nha : a ∈ v\n⊢ ∀ {j : { x // x ∈ insert e v }}, { val := a, property := ha' } ≠ j → inner ↑{ val := a, property := ha' } ↑j = 0\n[PROOFSTEP]\nrintro ⟨b, hb'⟩ hab'\n[GOAL]\ncase mp.intro.intro.refine'_2.mk.inr.mk\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nv : Set E\nhv : Orthonormal 𝕜 Subtype.val\nx : E\nhx' : x ∈ (span 𝕜 v)ᗮ\nhx : x ≠ 0\ne : E := (↑‖x‖)⁻¹ • x\nhe : ‖e‖ = 1\nhe' : e ∈ (span 𝕜 v)ᗮ\nhe'' : ¬e ∈ v\nh_end : ∀ (a : E), a ∈ v → inner a e = 0\na : E\nha' : a ∈ insert e v\nha : a ∈ v\nb : E\nhb' : b ∈ insert e v\nhab' : { val := a, property := ha' } ≠ { val := b, property := hb' }\n⊢ inner ↑{ val := a, property := ha' } ↑{ val := b, property := hb' } = 0\n[PROOFSTEP]\ncases' eq_or_mem_of_mem_insert hb' with hb hb\n[GOAL]\ncase mp.intro.intro.refine'_2.mk.inr.mk.inl\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nv : Set E\nhv : Orthonormal 𝕜 Subtype.val\nx : E\nhx' : x ∈ (span 𝕜 v)ᗮ\nhx : x ≠ 0\ne : E := (↑‖x‖)⁻¹ • x\nhe : ‖e‖ = 1\nhe' : e ∈ (span 𝕜 v)ᗮ\nhe'' : ¬e ∈ v\nh_end : ∀ (a : E), a ∈ v → inner a e = 0\na : E\nha' : a ∈ insert e v\nha : a ∈ v\nb : E\nhb' : b ∈ insert e v\nhab' : { val := a, property := ha' } ≠ { val := b, property := hb' }\nhb : b = e\n⊢ inner ↑{ val := a, property := ha' } ↑{ val := b, property := hb' } = 0\n[PROOFSTEP]\nsimpa [hb] using h_end a ha\n[GOAL]\ncase mp.intro.intro.refine'_2.mk.inr.mk.inr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nv : Set E\nhv : Orthonormal 𝕜 Subtype.val\nx : E\nhx' : x ∈ (span 𝕜 v)ᗮ\nhx : x ≠ 0\ne : E := (↑‖x‖)⁻¹ • x\nhe : ‖e‖ = 1\nhe' : e ∈ (span 𝕜 v)ᗮ\nhe'' : ¬e ∈ v\nh_end : ∀ (a : E), a ∈ v → inner a e = 0\na : E\nha' : a ∈ insert e v\nha : a ∈ v\nb : E\nhb' : b ∈ insert e v\nhab' : { val := a, property := ha' } ≠ { val := b, property := hb' }\nhb : b ∈ v\n⊢ inner ↑{ val := a, property := ha' } ↑{ val := b, property := hb' } = 0\n[PROOFSTEP]\nhave : (⟨a, ha⟩ : v) ≠ ⟨b, hb⟩ := by\n  intro hab''\n  apply hab'\n  simpa using hab''\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nv : Set E\nhv : Orthonormal 𝕜 Subtype.val\nx : E\nhx' : x ∈ (span 𝕜 v)ᗮ\nhx : x ≠ 0\ne : E := (↑‖x‖)⁻¹ • x\nhe : ‖e‖ = 1\nhe' : e ∈ (span 𝕜 v)ᗮ\nhe'' : ¬e ∈ v\nh_end : ∀ (a : E), a ∈ v → inner a e = 0\na : E\nha' : a ∈ insert e v\nha : a ∈ v\nb : E\nhb' : b ∈ insert e v\nhab' : { val := a, property := ha' } ≠ { val := b, property := hb' }\nhb : b ∈ v\n⊢ { val := a, property := ha } ≠ { val := b, property := hb }\n[PROOFSTEP]\nintro hab''\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nv : Set E\nhv : Orthonormal 𝕜 Subtype.val\nx : E\nhx' : x ∈ (span 𝕜 v)ᗮ\nhx : x ≠ 0\ne : E := (↑‖x‖)⁻¹ • x\nhe : ‖e‖ = 1\nhe' : e ∈ (span 𝕜 v)ᗮ\nhe'' : ¬e ∈ v\nh_end : ∀ (a : E), a ∈ v → inner a e = 0\na : E\nha' : a ∈ insert e v\nha : a ∈ v\nb : E\nhb' : b ∈ insert e v\nhab' : { val := a, property := ha' } ≠ { val := b, property := hb' }\nhb : b ∈ v\nhab'' : { val := a, property := ha } = { val := b, property := hb }\n⊢ False\n[PROOFSTEP]\napply hab'\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nv : Set E\nhv : Orthonormal 𝕜 Subtype.val\nx : E\nhx' : x ∈ (span 𝕜 v)ᗮ\nhx : x ≠ 0\ne : E := (↑‖x‖)⁻¹ • x\nhe : ‖e‖ = 1\nhe' : e ∈ (span 𝕜 v)ᗮ\nhe'' : ¬e ∈ v\nh_end : ∀ (a : E), a ∈ v → inner a e = 0\na : E\nha' : a ∈ insert e v\nha : a ∈ v\nb : E\nhb' : b ∈ insert e v\nhab' : { val := a, property := ha' } ≠ { val := b, property := hb' }\nhb : b ∈ v\nhab'' : { val := a, property := ha } = { val := b, property := hb }\n⊢ { val := a, property := ha' } = { val := b, property := hb' }\n[PROOFSTEP]\nsimpa using hab''\n[GOAL]\ncase mp.intro.intro.refine'_2.mk.inr.mk.inr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nv : Set E\nhv : Orthonormal 𝕜 Subtype.val\nx : E\nhx' : x ∈ (span 𝕜 v)ᗮ\nhx : x ≠ 0\ne : E := (↑‖x‖)⁻¹ • x\nhe : ‖e‖ = 1\nhe' : e ∈ (span 𝕜 v)ᗮ\nhe'' : ¬e ∈ v\nh_end : ∀ (a : E), a ∈ v → inner a e = 0\na : E\nha' : a ∈ insert e v\nha : a ∈ v\nb : E\nhb' : b ∈ insert e v\nhab' : { val := a, property := ha' } ≠ { val := b, property := hb' }\nhb : b ∈ v\nthis : { val := a, property := ha } ≠ { val := b, property := hb }\n⊢ inner ↑{ val := a, property := ha' } ↑{ val := b, property := hb' } = 0\n[PROOFSTEP]\nexact hv.2 this\n[GOAL]\ncase mpr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nv : Set E\nhv : Orthonormal 𝕜 Subtype.val\n⊢ (∀ (x : E), x ∈ (span 𝕜 v)ᗮ → x = 0) → ∀ (u : Set E), u ⊇ v → Orthonormal 𝕜 Subtype.val → u = v\n[PROOFSTEP]\nsimp only [Subset.antisymm_iff]\n[GOAL]\ncase mpr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nv : Set E\nhv : Orthonormal 𝕜 Subtype.val\n⊢ (∀ (x : E), x ∈ (span 𝕜 v)ᗮ → x = 0) → ∀ (u : Set E), u ⊇ v → Orthonormal 𝕜 Subtype.val → u ⊆ v ∧ v ⊆ u\n[PROOFSTEP]\nrintro h u (huv : v ⊆ u) hu\n[GOAL]\ncase mpr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nv : Set E\nhv : Orthonormal 𝕜 Subtype.val\nh : ∀ (x : E), x ∈ (span 𝕜 v)ᗮ → x = 0\nu : Set E\nhuv : v ⊆ u\nhu : Orthonormal 𝕜 Subtype.val\n⊢ u ⊆ v ∧ v ⊆ u\n[PROOFSTEP]\nrefine' ⟨_, huv⟩\n[GOAL]\ncase mpr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nv : Set E\nhv : Orthonormal 𝕜 Subtype.val\nh : ∀ (x : E), x ∈ (span 𝕜 v)ᗮ → x = 0\nu : Set E\nhuv : v ⊆ u\nhu : Orthonormal 𝕜 Subtype.val\n⊢ u ⊆ v\n[PROOFSTEP]\nintro x hxu\n[GOAL]\ncase mpr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nv : Set E\nhv : Orthonormal 𝕜 Subtype.val\nh : ∀ (x : E), x ∈ (span 𝕜 v)ᗮ → x = 0\nu : Set E\nhuv : v ⊆ u\nhu : Orthonormal 𝕜 Subtype.val\nx : E\nhxu : x ∈ u\n⊢ x ∈ v\n[PROOFSTEP]\nrefine' ((mt (h x)) (hu.ne_zero ⟨x, hxu⟩)).imp_symm _\n[GOAL]\ncase mpr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nv : Set E\nhv : Orthonormal 𝕜 Subtype.val\nh : ∀ (x : E), x ∈ (span 𝕜 v)ᗮ → x = 0\nu : Set E\nhuv : v ⊆ u\nhu : Orthonormal 𝕜 Subtype.val\nx : E\nhxu : x ∈ u\n⊢ ¬x ∈ v → x ∈ (span 𝕜 v)ᗮ\n[PROOFSTEP]\nintro hxv y hy\n[GOAL]\ncase mpr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nv : Set E\nhv : Orthonormal 𝕜 Subtype.val\nh : ∀ (x : E), x ∈ (span 𝕜 v)ᗮ → x = 0\nu : Set E\nhuv : v ⊆ u\nhu : Orthonormal 𝕜 Subtype.val\nx : E\nhxu : x ∈ u\nhxv : ¬x ∈ v\ny : E\nhy : y ∈ span 𝕜 v\n⊢ inner y x = 0\n[PROOFSTEP]\nhave hxv' : (⟨x, hxu⟩ : u) ∉ ((↑) ⁻¹' v : Set u) := by simp [huv, hxv]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nv : Set E\nhv : Orthonormal 𝕜 Subtype.val\nh : ∀ (x : E), x ∈ (span 𝕜 v)ᗮ → x = 0\nu : Set E\nhuv : v ⊆ u\nhu : Orthonormal 𝕜 Subtype.val\nx : E\nhxu : x ∈ u\nhxv : ¬x ∈ v\ny : E\nhy : y ∈ span 𝕜 v\n⊢ ¬{ val := x, property := hxu } ∈ Subtype.val ⁻¹' v\n[PROOFSTEP]\nsimp [huv, hxv]\n[GOAL]\ncase mpr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nv : Set E\nhv : Orthonormal 𝕜 Subtype.val\nh : ∀ (x : E), x ∈ (span 𝕜 v)ᗮ → x = 0\nu : Set E\nhuv : v ⊆ u\nhu : Orthonormal 𝕜 Subtype.val\nx : E\nhxu : x ∈ u\nhxv : ¬x ∈ v\ny : E\nhy : y ∈ span 𝕜 v\nhxv' : ¬{ val := x, property := hxu } ∈ Subtype.val ⁻¹' v\n⊢ inner y x = 0\n[PROOFSTEP]\nobtain ⟨l, hl, rfl⟩ : ∃ l ∈ Finsupp.supported 𝕜 𝕜 ((↑) ⁻¹' v : Set u), (Finsupp.total (↥u) E 𝕜 (↑)) l = y :=\n  by\n  rw [← Finsupp.mem_span_image_iff_total]\n  simp [huv, inter_eq_self_of_subset_left, hy]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nv : Set E\nhv : Orthonormal 𝕜 Subtype.val\nh : ∀ (x : E), x ∈ (span 𝕜 v)ᗮ → x = 0\nu : Set E\nhuv : v ⊆ u\nhu : Orthonormal 𝕜 Subtype.val\nx : E\nhxu : x ∈ u\nhxv : ¬x ∈ v\ny : E\nhy : y ∈ span 𝕜 v\nhxv' : ¬{ val := x, property := hxu } ∈ Subtype.val ⁻¹' v\n⊢ ∃ l, l ∈ Finsupp.supported 𝕜 𝕜 (Subtype.val ⁻¹' v) ∧ ↑(Finsupp.total (↑u) E 𝕜 Subtype.val) l = y\n[PROOFSTEP]\nrw [← Finsupp.mem_span_image_iff_total]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nv : Set E\nhv : Orthonormal 𝕜 Subtype.val\nh : ∀ (x : E), x ∈ (span 𝕜 v)ᗮ → x = 0\nu : Set E\nhuv : v ⊆ u\nhu : Orthonormal 𝕜 Subtype.val\nx : E\nhxu : x ∈ u\nhxv : ¬x ∈ v\ny : E\nhy : y ∈ span 𝕜 v\nhxv' : ¬{ val := x, property := hxu } ∈ Subtype.val ⁻¹' v\n⊢ y ∈ span 𝕜 (Subtype.val '' (Subtype.val ⁻¹' v))\n[PROOFSTEP]\nsimp [huv, inter_eq_self_of_subset_left, hy]\n[GOAL]\ncase mpr.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace 𝕜 E\ninst✝ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nv : Set E\nhv : Orthonormal 𝕜 Subtype.val\nh : ∀ (x : E), x ∈ (span 𝕜 v)ᗮ → x = 0\nu : Set E\nhuv : v ⊆ u\nhu : Orthonormal 𝕜 Subtype.val\nx : E\nhxu : x ∈ u\nhxv : ¬x ∈ v\nhxv' : ¬{ val := x, property := hxu } ∈ Subtype.val ⁻¹' v\nl : ↑u →₀ 𝕜\nhl : l ∈ Finsupp.supported 𝕜 𝕜 (Subtype.val ⁻¹' v)\nhy : ↑(Finsupp.total (↑u) E 𝕜 Subtype.val) l ∈ span 𝕜 v\n⊢ inner (↑(Finsupp.total (↑u) E 𝕜 Subtype.val) l) x = 0\n[PROOFSTEP]\nexact hu.inner_finsupp_eq_zero hxv' hl\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nv : Set E\ninst✝ : FiniteDimensional 𝕜 E\nhv : Orthonormal 𝕜 Subtype.val\n⊢ (∀ (u : Set E), u ⊇ v → Orthonormal 𝕜 Subtype.val → u = v) ↔ ∃ b, ↑b = Subtype.val\n[PROOFSTEP]\nhaveI := proper_isROrC 𝕜 (span 𝕜 v)\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nv : Set E\ninst✝ : FiniteDimensional 𝕜 E\nhv : Orthonormal 𝕜 Subtype.val\nthis : ProperSpace { x // x ∈ span 𝕜 v }\n⊢ (∀ (u : Set E), u ⊇ v → Orthonormal 𝕜 Subtype.val → u = v) ↔ ∃ b, ↑b = Subtype.val\n[PROOFSTEP]\nrw [maximal_orthonormal_iff_orthogonalComplement_eq_bot hv]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nv : Set E\ninst✝ : FiniteDimensional 𝕜 E\nhv : Orthonormal 𝕜 Subtype.val\nthis : ProperSpace { x // x ∈ span 𝕜 v }\n⊢ (span 𝕜 v)ᗮ = ⊥ ↔ ∃ b, ↑b = Subtype.val\n[PROOFSTEP]\nrw [Submodule.orthogonal_eq_bot_iff]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nv : Set E\ninst✝ : FiniteDimensional 𝕜 E\nhv : Orthonormal 𝕜 Subtype.val\nthis : ProperSpace { x // x ∈ span 𝕜 v }\n⊢ span 𝕜 v = ⊤ ↔ ∃ b, ↑b = Subtype.val\n[PROOFSTEP]\nhave hv_coe : range ((↑) : v → E) = v := by simp\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nv : Set E\ninst✝ : FiniteDimensional 𝕜 E\nhv : Orthonormal 𝕜 Subtype.val\nthis : ProperSpace { x // x ∈ span 𝕜 v }\n⊢ Set.range Subtype.val = v\n[PROOFSTEP]\nsimp\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nv : Set E\ninst✝ : FiniteDimensional 𝕜 E\nhv : Orthonormal 𝕜 Subtype.val\nthis : ProperSpace { x // x ∈ span 𝕜 v }\nhv_coe : Set.range Subtype.val = v\n⊢ span 𝕜 v = ⊤ ↔ ∃ b, ↑b = Subtype.val\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nv : Set E\ninst✝ : FiniteDimensional 𝕜 E\nhv : Orthonormal 𝕜 Subtype.val\nthis : ProperSpace { x // x ∈ span 𝕜 v }\nhv_coe : Set.range Subtype.val = v\n⊢ span 𝕜 v = ⊤ → ∃ b, ↑b = Subtype.val\n[PROOFSTEP]\nrefine' fun h => ⟨Basis.mk hv.linearIndependent _, Basis.coe_mk _ _⟩\n[GOAL]\ncase mp\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nv : Set E\ninst✝ : FiniteDimensional 𝕜 E\nhv : Orthonormal 𝕜 Subtype.val\nthis : ProperSpace { x // x ∈ span 𝕜 v }\nhv_coe : Set.range Subtype.val = v\nh : span 𝕜 v = ⊤\n⊢ ⊤ ≤ span 𝕜 (Set.range Subtype.val)\n[PROOFSTEP]\nconvert h.ge\n[GOAL]\ncase mpr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nv : Set E\ninst✝ : FiniteDimensional 𝕜 E\nhv : Orthonormal 𝕜 Subtype.val\nthis : ProperSpace { x // x ∈ span 𝕜 v }\nhv_coe : Set.range Subtype.val = v\n⊢ (∃ b, ↑b = Subtype.val) → span 𝕜 v = ⊤\n[PROOFSTEP]\nrintro ⟨h, coe_h⟩\n[GOAL]\ncase mpr.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : InnerProductSpace ℝ F\nK : Submodule 𝕜 E\nv : Set E\ninst✝ : FiniteDimensional 𝕜 E\nhv : Orthonormal 𝕜 Subtype.val\nthis : ProperSpace { x // x ∈ span 𝕜 v }\nhv_coe : Set.range Subtype.val = v\nh : Basis (↑v) 𝕜 E\ncoe_h : ↑h = Subtype.val\n⊢ span 𝕜 v = ⊤\n[PROOFSTEP]\nrw [← h.span_eq, coe_h, hv_coe]\n", "meta": {"mathlib_filename": "Mathlib.Analysis.InnerProductSpace.Projection", "llama_tokens": 229258, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8397339556397749, "lm_q2_score": 0.6442250928250376, "lm_q1q2_score": 0.54097768552037}}
{"text": "[GOAL]\nFq : Type u_1\ninst✝¹ : Field Fq\ninst✝ : Fintype Fq\ncard_pos : 0 < Fintype.card Fq\npow_pos : ∀ (n : ℕ), 0 < ↑(Fintype.card Fq) ^ n\np q : Fq[X]\n⊢ (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) (p * q) =\n    (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) p *\n      (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) q\n[PROOFSTEP]\nby_cases hp : p = 0\n[GOAL]\ncase pos\nFq : Type u_1\ninst✝¹ : Field Fq\ninst✝ : Fintype Fq\ncard_pos : 0 < Fintype.card Fq\npow_pos : ∀ (n : ℕ), 0 < ↑(Fintype.card Fq) ^ n\np q : Fq[X]\nhp : p = 0\n⊢ (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) (p * q) =\n    (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) p *\n      (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) q\n[PROOFSTEP]\nsimp [hp]\n[GOAL]\ncase neg\nFq : Type u_1\ninst✝¹ : Field Fq\ninst✝ : Fintype Fq\ncard_pos : 0 < Fintype.card Fq\npow_pos : ∀ (n : ℕ), 0 < ↑(Fintype.card Fq) ^ n\np q : Fq[X]\nhp : ¬p = 0\n⊢ (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) (p * q) =\n    (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) p *\n      (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) q\n[PROOFSTEP]\nby_cases hq : q = 0\n[GOAL]\ncase pos\nFq : Type u_1\ninst✝¹ : Field Fq\ninst✝ : Fintype Fq\ncard_pos : 0 < Fintype.card Fq\npow_pos : ∀ (n : ℕ), 0 < ↑(Fintype.card Fq) ^ n\np q : Fq[X]\nhp : ¬p = 0\nhq : q = 0\n⊢ (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) (p * q) =\n    (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) p *\n      (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) q\n[PROOFSTEP]\nsimp [hq]\n[GOAL]\ncase neg\nFq : Type u_1\ninst✝¹ : Field Fq\ninst✝ : Fintype Fq\ncard_pos : 0 < Fintype.card Fq\npow_pos : ∀ (n : ℕ), 0 < ↑(Fintype.card Fq) ^ n\np q : Fq[X]\nhp : ¬p = 0\nhq : ¬q = 0\n⊢ (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) (p * q) =\n    (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) p *\n      (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) q\n[PROOFSTEP]\nhave hpq : p * q ≠ 0 := mul_ne_zero hp hq\n[GOAL]\ncase neg\nFq : Type u_1\ninst✝¹ : Field Fq\ninst✝ : Fintype Fq\ncard_pos : 0 < Fintype.card Fq\npow_pos : ∀ (n : ℕ), 0 < ↑(Fintype.card Fq) ^ n\np q : Fq[X]\nhp : ¬p = 0\nhq : ¬q = 0\nhpq : p * q ≠ 0\n⊢ (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) (p * q) =\n    (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) p *\n      (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) q\n[PROOFSTEP]\nsimp only [hpq, hp, hq, eq_self_iff_true, if_true, if_false, Polynomial.natDegree_mul hp hq, pow_add]\n[GOAL]\nFq : Type u_1\ninst✝¹ : Field Fq\ninst✝ : Fintype Fq\ncard_pos : 0 < Fintype.card Fq\npow_pos : ∀ (n : ℕ), 0 < ↑(Fintype.card Fq) ^ n\np : Fq[X]\n⊢ 0 ≤\n    MulHom.toFun\n      { toFun := fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p,\n        map_mul' :=\n          (_ :\n            ∀ (p q : Fq[X]),\n              (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) (p * q) =\n                (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) p *\n                  (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) q) }\n      p\n[PROOFSTEP]\ndsimp\n[GOAL]\nFq : Type u_1\ninst✝¹ : Field Fq\ninst✝ : Fintype Fq\ncard_pos : 0 < Fintype.card Fq\npow_pos : ∀ (n : ℕ), 0 < ↑(Fintype.card Fq) ^ n\np : Fq[X]\n⊢ 0 ≤ if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nFq : Type u_1\ninst✝¹ : Field Fq\ninst✝ : Fintype Fq\ncard_pos : 0 < Fintype.card Fq\npow_pos : ∀ (n : ℕ), 0 < ↑(Fintype.card Fq) ^ n\np : Fq[X]\nh✝ : p = 0\n⊢ 0 ≤ 0\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg\nFq : Type u_1\ninst✝¹ : Field Fq\ninst✝ : Fintype Fq\ncard_pos : 0 < Fintype.card Fq\npow_pos : ∀ (n : ℕ), 0 < ↑(Fintype.card Fq) ^ n\np : Fq[X]\nh✝ : ¬p = 0\n⊢ 0 ≤ ↑(Fintype.card Fq) ^ natDegree p\n[PROOFSTEP]\nexact pow_nonneg (Int.ofNat_zero_le _) _\n[GOAL]\nFq : Type u_1\ninst✝¹ : Field Fq\ninst✝ : Fintype Fq\ncard_pos : 0 < Fintype.card Fq\npow_pos : ∀ (n : ℕ), 0 < ↑(Fintype.card Fq) ^ n\np : Fq[X]\nh : ¬p = 0 → ↑(Fintype.card Fq) ^ natDegree p = 0\n⊢ p = 0\n[PROOFSTEP]\ncontrapose! h\n[GOAL]\nFq : Type u_1\ninst✝¹ : Field Fq\ninst✝ : Fintype Fq\ncard_pos : 0 < Fintype.card Fq\npow_pos : ∀ (n : ℕ), 0 < ↑(Fintype.card Fq) ^ n\np : Fq[X]\nh : p ≠ 0\n⊢ p ≠ 0 ∧ ↑(Fintype.card Fq) ^ natDegree p ≠ 0\n[PROOFSTEP]\nexact ⟨h, (pow_pos _).ne'⟩\n[GOAL]\nFq : Type u_1\ninst✝¹ : Field Fq\ninst✝ : Fintype Fq\ncard_pos : 0 < Fintype.card Fq\npow_pos : ∀ (n : ℕ), 0 < ↑(Fintype.card Fq) ^ n\np q : Fq[X]\n⊢ MulHom.toFun\n      { toFun := fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p,\n        map_mul' :=\n          (_ :\n            ∀ (p q : Fq[X]),\n              (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) (p * q) =\n                (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) p *\n                  (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) q) }\n      (p + q) ≤\n    MulHom.toFun\n        { toFun := fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p,\n          map_mul' :=\n            (_ :\n              ∀ (p q : Fq[X]),\n                (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) (p * q) =\n                  (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) p *\n                    (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) q) }\n        p +\n      MulHom.toFun\n        { toFun := fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p,\n          map_mul' :=\n            (_ :\n              ∀ (p q : Fq[X]),\n                (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) (p * q) =\n                  (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) p *\n                    (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) q) }\n        q\n[PROOFSTEP]\nby_cases hp : p = 0\n[GOAL]\ncase pos\nFq : Type u_1\ninst✝¹ : Field Fq\ninst✝ : Fintype Fq\ncard_pos : 0 < Fintype.card Fq\npow_pos : ∀ (n : ℕ), 0 < ↑(Fintype.card Fq) ^ n\np q : Fq[X]\nhp : p = 0\n⊢ MulHom.toFun\n      { toFun := fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p,\n        map_mul' :=\n          (_ :\n            ∀ (p q : Fq[X]),\n              (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) (p * q) =\n                (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) p *\n                  (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) q) }\n      (p + q) ≤\n    MulHom.toFun\n        { toFun := fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p,\n          map_mul' :=\n            (_ :\n              ∀ (p q : Fq[X]),\n                (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) (p * q) =\n                  (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) p *\n                    (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) q) }\n        p +\n      MulHom.toFun\n        { toFun := fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p,\n          map_mul' :=\n            (_ :\n              ∀ (p q : Fq[X]),\n                (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) (p * q) =\n                  (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) p *\n                    (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) q) }\n        q\n[PROOFSTEP]\nsimp [hp]\n[GOAL]\ncase neg\nFq : Type u_1\ninst✝¹ : Field Fq\ninst✝ : Fintype Fq\ncard_pos : 0 < Fintype.card Fq\npow_pos : ∀ (n : ℕ), 0 < ↑(Fintype.card Fq) ^ n\np q : Fq[X]\nhp : ¬p = 0\n⊢ MulHom.toFun\n      { toFun := fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p,\n        map_mul' :=\n          (_ :\n            ∀ (p q : Fq[X]),\n              (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) (p * q) =\n                (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) p *\n                  (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) q) }\n      (p + q) ≤\n    MulHom.toFun\n        { toFun := fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p,\n          map_mul' :=\n            (_ :\n              ∀ (p q : Fq[X]),\n                (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) (p * q) =\n                  (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) p *\n                    (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) q) }\n        p +\n      MulHom.toFun\n        { toFun := fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p,\n          map_mul' :=\n            (_ :\n              ∀ (p q : Fq[X]),\n                (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) (p * q) =\n                  (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) p *\n                    (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) q) }\n        q\n[PROOFSTEP]\nby_cases hq : q = 0\n[GOAL]\ncase pos\nFq : Type u_1\ninst✝¹ : Field Fq\ninst✝ : Fintype Fq\ncard_pos : 0 < Fintype.card Fq\npow_pos : ∀ (n : ℕ), 0 < ↑(Fintype.card Fq) ^ n\np q : Fq[X]\nhp : ¬p = 0\nhq : q = 0\n⊢ MulHom.toFun\n      { toFun := fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p,\n        map_mul' :=\n          (_ :\n            ∀ (p q : Fq[X]),\n              (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) (p * q) =\n                (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) p *\n                  (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) q) }\n      (p + q) ≤\n    MulHom.toFun\n        { toFun := fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p,\n          map_mul' :=\n            (_ :\n              ∀ (p q : Fq[X]),\n                (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) (p * q) =\n                  (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) p *\n                    (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) q) }\n        p +\n      MulHom.toFun\n        { toFun := fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p,\n          map_mul' :=\n            (_ :\n              ∀ (p q : Fq[X]),\n                (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) (p * q) =\n                  (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) p *\n                    (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) q) }\n        q\n[PROOFSTEP]\nsimp [hq]\n[GOAL]\ncase neg\nFq : Type u_1\ninst✝¹ : Field Fq\ninst✝ : Fintype Fq\ncard_pos : 0 < Fintype.card Fq\npow_pos : ∀ (n : ℕ), 0 < ↑(Fintype.card Fq) ^ n\np q : Fq[X]\nhp : ¬p = 0\nhq : ¬q = 0\n⊢ MulHom.toFun\n      { toFun := fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p,\n        map_mul' :=\n          (_ :\n            ∀ (p q : Fq[X]),\n              (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) (p * q) =\n                (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) p *\n                  (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) q) }\n      (p + q) ≤\n    MulHom.toFun\n        { toFun := fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p,\n          map_mul' :=\n            (_ :\n              ∀ (p q : Fq[X]),\n                (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) (p * q) =\n                  (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) p *\n                    (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) q) }\n        p +\n      MulHom.toFun\n        { toFun := fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p,\n          map_mul' :=\n            (_ :\n              ∀ (p q : Fq[X]),\n                (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) (p * q) =\n                  (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) p *\n                    (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) q) }\n        q\n[PROOFSTEP]\nby_cases hpq : p + q = 0\n[GOAL]\ncase pos\nFq : Type u_1\ninst✝¹ : Field Fq\ninst✝ : Fintype Fq\ncard_pos : 0 < Fintype.card Fq\npow_pos : ∀ (n : ℕ), 0 < ↑(Fintype.card Fq) ^ n\np q : Fq[X]\nhp : ¬p = 0\nhq : ¬q = 0\nhpq : p + q = 0\n⊢ MulHom.toFun\n      { toFun := fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p,\n        map_mul' :=\n          (_ :\n            ∀ (p q : Fq[X]),\n              (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) (p * q) =\n                (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) p *\n                  (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) q) }\n      (p + q) ≤\n    MulHom.toFun\n        { toFun := fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p,\n          map_mul' :=\n            (_ :\n              ∀ (p q : Fq[X]),\n                (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) (p * q) =\n                  (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) p *\n                    (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) q) }\n        p +\n      MulHom.toFun\n        { toFun := fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p,\n          map_mul' :=\n            (_ :\n              ∀ (p q : Fq[X]),\n                (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) (p * q) =\n                  (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) p *\n                    (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) q) }\n        q\n[PROOFSTEP]\nsimp only [hpq, hp, hq, eq_self_iff_true, if_true, if_false]\n[GOAL]\ncase pos\nFq : Type u_1\ninst✝¹ : Field Fq\ninst✝ : Fintype Fq\ncard_pos : 0 < Fintype.card Fq\npow_pos : ∀ (n : ℕ), 0 < ↑(Fintype.card Fq) ^ n\np q : Fq[X]\nhp : ¬p = 0\nhq : ¬q = 0\nhpq : p + q = 0\n⊢ 0 ≤ ↑(Fintype.card Fq) ^ natDegree p + ↑(Fintype.card Fq) ^ natDegree q\n[PROOFSTEP]\nexact add_nonneg (pow_pos _).le (pow_pos _).le\n[GOAL]\ncase neg\nFq : Type u_1\ninst✝¹ : Field Fq\ninst✝ : Fintype Fq\ncard_pos : 0 < Fintype.card Fq\npow_pos : ∀ (n : ℕ), 0 < ↑(Fintype.card Fq) ^ n\np q : Fq[X]\nhp : ¬p = 0\nhq : ¬q = 0\nhpq : ¬p + q = 0\n⊢ MulHom.toFun\n      { toFun := fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p,\n        map_mul' :=\n          (_ :\n            ∀ (p q : Fq[X]),\n              (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) (p * q) =\n                (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) p *\n                  (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) q) }\n      (p + q) ≤\n    MulHom.toFun\n        { toFun := fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p,\n          map_mul' :=\n            (_ :\n              ∀ (p q : Fq[X]),\n                (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) (p * q) =\n                  (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) p *\n                    (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) q) }\n        p +\n      MulHom.toFun\n        { toFun := fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p,\n          map_mul' :=\n            (_ :\n              ∀ (p q : Fq[X]),\n                (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) (p * q) =\n                  (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) p *\n                    (fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) q) }\n        q\n[PROOFSTEP]\nsimp only [hpq, hp, hq, if_false]\n[GOAL]\ncase neg\nFq : Type u_1\ninst✝¹ : Field Fq\ninst✝ : Fintype Fq\ncard_pos : 0 < Fintype.card Fq\npow_pos : ∀ (n : ℕ), 0 < ↑(Fintype.card Fq) ^ n\np q : Fq[X]\nhp : ¬p = 0\nhq : ¬q = 0\nhpq : ¬p + q = 0\n⊢ ↑(Fintype.card Fq) ^ natDegree (p + q) ≤ ↑(Fintype.card Fq) ^ natDegree p + ↑(Fintype.card Fq) ^ natDegree q\n[PROOFSTEP]\nrefine' le_trans (pow_le_pow (by linarith) (Polynomial.natDegree_add_le _ _)) _\n[GOAL]\nFq : Type u_1\ninst✝¹ : Field Fq\ninst✝ : Fintype Fq\ncard_pos : 0 < Fintype.card Fq\npow_pos : ∀ (n : ℕ), 0 < ↑(Fintype.card Fq) ^ n\np q : Fq[X]\nhp : ¬p = 0\nhq : ¬q = 0\nhpq : ¬p + q = 0\n⊢ 1 ≤ ↑(Fintype.card Fq)\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase neg\nFq : Type u_1\ninst✝¹ : Field Fq\ninst✝ : Fintype Fq\ncard_pos : 0 < Fintype.card Fq\npow_pos : ∀ (n : ℕ), 0 < ↑(Fintype.card Fq) ^ n\np q : Fq[X]\nhp : ¬p = 0\nhq : ¬q = 0\nhpq : ¬p + q = 0\n⊢ ↑(Fintype.card Fq) ^ max (natDegree p) (natDegree q) ≤\n    ↑(Fintype.card Fq) ^ natDegree p + ↑(Fintype.card Fq) ^ natDegree q\n[PROOFSTEP]\nrefine' le_trans (le_max_iff.mpr _) (max_le_add_of_nonneg (pow_nonneg (by linarith) _) (pow_nonneg (by linarith) _))\n[GOAL]\nFq : Type u_1\ninst✝¹ : Field Fq\ninst✝ : Fintype Fq\ncard_pos : 0 < Fintype.card Fq\npow_pos : ∀ (n : ℕ), 0 < ↑(Fintype.card Fq) ^ n\np q : Fq[X]\nhp : ¬p = 0\nhq : ¬q = 0\nhpq : ¬p + q = 0\n⊢ 0 ≤ ↑(Fintype.card Fq)\n[PROOFSTEP]\nlinarith\n[GOAL]\nFq : Type u_1\ninst✝¹ : Field Fq\ninst✝ : Fintype Fq\ncard_pos : 0 < Fintype.card Fq\npow_pos : ∀ (n : ℕ), 0 < ↑(Fintype.card Fq) ^ n\np q : Fq[X]\nhp : ¬p = 0\nhq : ¬q = 0\nhpq : ¬p + q = 0\n⊢ 0 ≤ ↑(Fintype.card Fq)\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase neg\nFq : Type u_1\ninst✝¹ : Field Fq\ninst✝ : Fintype Fq\ncard_pos : 0 < Fintype.card Fq\npow_pos : ∀ (n : ℕ), 0 < ↑(Fintype.card Fq) ^ n\np q : Fq[X]\nhp : ¬p = 0\nhq : ¬q = 0\nhpq : ¬p + q = 0\n⊢ ↑(Fintype.card Fq) ^ max (natDegree p) (natDegree q) ≤ ↑(Fintype.card Fq) ^ natDegree p ∨\n    ↑(Fintype.card Fq) ^ max (natDegree p) (natDegree q) ≤ ↑(Fintype.card Fq) ^ natDegree q\n[PROOFSTEP]\nexact (max_choice p.natDegree q.natDegree).imp (fun h => by rw [h]) fun h => by rw [h]\n[GOAL]\nFq : Type u_1\ninst✝¹ : Field Fq\ninst✝ : Fintype Fq\ncard_pos : 0 < Fintype.card Fq\npow_pos : ∀ (n : ℕ), 0 < ↑(Fintype.card Fq) ^ n\np q : Fq[X]\nhp : ¬p = 0\nhq : ¬q = 0\nhpq : ¬p + q = 0\nh : max (natDegree p) (natDegree q) = natDegree p\n⊢ ↑(Fintype.card Fq) ^ max (natDegree p) (natDegree q) ≤ ↑(Fintype.card Fq) ^ natDegree p\n[PROOFSTEP]\nrw [h]\n[GOAL]\nFq : Type u_1\ninst✝¹ : Field Fq\ninst✝ : Fintype Fq\ncard_pos : 0 < Fintype.card Fq\npow_pos : ∀ (n : ℕ), 0 < ↑(Fintype.card Fq) ^ n\np q : Fq[X]\nhp : ¬p = 0\nhq : ¬q = 0\nhpq : ¬p + q = 0\nh : max (natDegree p) (natDegree q) = natDegree q\n⊢ ↑(Fintype.card Fq) ^ max (natDegree p) (natDegree q) ≤ ↑(Fintype.card Fq) ^ natDegree q\n[PROOFSTEP]\nrw [h]\n[GOAL]\nFq : Type u_1\ninst✝¹ : Field Fq\ninst✝ : Fintype Fq\ncard_pos : 0 < Fintype.card Fq\npow_pos : ∀ (n : ℕ), 0 < ↑(Fintype.card Fq) ^ n\np q : Fq[X]\n⊢ ↑cardPowDegree p < ↑cardPowDegree q ↔ EuclideanDomain.r p q\n[PROOFSTEP]\nshow cardPowDegree p < cardPowDegree q ↔ degree p < degree q\n[GOAL]\nFq : Type u_1\ninst✝¹ : Field Fq\ninst✝ : Fintype Fq\ncard_pos : 0 < Fintype.card Fq\npow_pos : ∀ (n : ℕ), 0 < ↑(Fintype.card Fq) ^ n\np q : Fq[X]\n⊢ ↑cardPowDegree p < ↑cardPowDegree q ↔ degree p < degree q\n[PROOFSTEP]\nsimp only [cardPowDegree_apply]\n[GOAL]\nFq : Type u_1\ninst✝¹ : Field Fq\ninst✝ : Fintype Fq\ncard_pos : 0 < Fintype.card Fq\npow_pos : ∀ (n : ℕ), 0 < ↑(Fintype.card Fq) ^ n\np q : Fq[X]\n⊢ ((if p = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree p) < if q = 0 then 0 else ↑(Fintype.card Fq) ^ natDegree q) ↔\n    degree p < degree q\n[PROOFSTEP]\nsplit_ifs with hp hq hq\n[GOAL]\ncase pos\nFq : Type u_1\ninst✝¹ : Field Fq\ninst✝ : Fintype Fq\ncard_pos : 0 < Fintype.card Fq\npow_pos : ∀ (n : ℕ), 0 < ↑(Fintype.card Fq) ^ n\np q : Fq[X]\nhp : p = 0\nhq : q = 0\n⊢ 0 < 0 ↔ degree p < degree q\n[PROOFSTEP]\nsimp only [hp, hq, lt_self_iff_false]\n[GOAL]\ncase neg\nFq : Type u_1\ninst✝¹ : Field Fq\ninst✝ : Fintype Fq\ncard_pos : 0 < Fintype.card Fq\npow_pos : ∀ (n : ℕ), 0 < ↑(Fintype.card Fq) ^ n\np q : Fq[X]\nhp : p = 0\nhq : ¬q = 0\n⊢ 0 < ↑(Fintype.card Fq) ^ natDegree q ↔ degree p < degree q\n[PROOFSTEP]\nsimp only [hp, hq, degree_zero, Ne.def, bot_lt_iff_ne_bot, degree_eq_bot, pow_pos, not_false_iff]\n[GOAL]\ncase pos\nFq : Type u_1\ninst✝¹ : Field Fq\ninst✝ : Fintype Fq\ncard_pos : 0 < Fintype.card Fq\npow_pos : ∀ (n : ℕ), 0 < ↑(Fintype.card Fq) ^ n\np q : Fq[X]\nhp : ¬p = 0\nhq : q = 0\n⊢ ↑(Fintype.card Fq) ^ natDegree p < 0 ↔ degree p < degree q\n[PROOFSTEP]\nsimp only [hp, hq, degree_zero, not_lt_bot, (pow_pos _).not_lt]\n[GOAL]\ncase neg\nFq : Type u_1\ninst✝¹ : Field Fq\ninst✝ : Fintype Fq\ncard_pos : 0 < Fintype.card Fq\npow_pos : ∀ (n : ℕ), 0 < ↑(Fintype.card Fq) ^ n\np q : Fq[X]\nhp : ¬p = 0\nhq : ¬q = 0\n⊢ ↑(Fintype.card Fq) ^ natDegree p < ↑(Fintype.card Fq) ^ natDegree q ↔ degree p < degree q\n[PROOFSTEP]\nrw [degree_eq_natDegree hp, degree_eq_natDegree hq, Nat.cast_withBot, Nat.cast_withBot, WithBot.coe_lt_coe,\n  pow_lt_pow_iff]\n[GOAL]\ncase neg\nFq : Type u_1\ninst✝¹ : Field Fq\ninst✝ : Fintype Fq\ncard_pos : 0 < Fintype.card Fq\npow_pos : ∀ (n : ℕ), 0 < ↑(Fintype.card Fq) ^ n\np q : Fq[X]\nhp : ¬p = 0\nhq : ¬q = 0\n⊢ 1 < ↑(Fintype.card Fq)\n[PROOFSTEP]\nexact_mod_cast @Fintype.one_lt_card Fq _ _\n", "meta": {"mathlib_filename": "Mathlib.Data.Polynomial.Degree.CardPowDegree", "llama_tokens": 10195, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8128673178375735, "lm_q2_score": 0.6654105454764747, "lm_q1q2_score": 0.5408904853622987}}
{"text": "[GOAL]\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni j : I\ninst✝ : (i : I) → Semigroup (f i)\n⊢ ∀ (a b c : (i : I) → f i), a * b * c = a * (b * c)\n[PROOFSTEP]\nintros\n[GOAL]\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni j : I\ninst✝ : (i : I) → Semigroup (f i)\na✝ b✝ c✝ : (i : I) → f i\n⊢ a✝ * b✝ * c✝ = a✝ * (b✝ * c✝)\n[PROOFSTEP]\next\n[GOAL]\ncase h\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni j : I\ninst✝ : (i : I) → Semigroup (f i)\na✝ b✝ c✝ : (i : I) → f i\nx✝ : I\n⊢ (a✝ * b✝ * c✝) x✝ = (a✝ * (b✝ * c✝)) x✝\n[PROOFSTEP]\nexact mul_assoc _ _ _\n[GOAL]\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni j : I\ninst✝ : (i : I) → CommSemigroup (f i)\nsrc✝ : Semigroup ((i : I) → f i) := semigroup\n⊢ ∀ (a b : (i : I) → f i), a * b = b * a\n[PROOFSTEP]\nintros\n[GOAL]\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni j : I\ninst✝ : (i : I) → CommSemigroup (f i)\nsrc✝ : Semigroup ((i : I) → f i) := semigroup\na✝ b✝ : (i : I) → f i\n⊢ a✝ * b✝ = b✝ * a✝\n[PROOFSTEP]\next\n[GOAL]\ncase h\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni j : I\ninst✝ : (i : I) → CommSemigroup (f i)\nsrc✝ : Semigroup ((i : I) → f i) := semigroup\na✝ b✝ : (i : I) → f i\nx✝ : I\n⊢ (a✝ * b✝) x✝ = (b✝ * a✝) x✝\n[PROOFSTEP]\nexact mul_comm _ _\n[GOAL]\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni j : I\ninst✝ : (i : I) → MulOneClass (f i)\n⊢ ∀ (a : (i : I) → f i), 1 * a = a\n[PROOFSTEP]\nintros\n[GOAL]\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni j : I\ninst✝ : (i : I) → MulOneClass (f i)\na✝ : (i : I) → f i\n⊢ 1 * a✝ = a✝\n[PROOFSTEP]\next\n[GOAL]\ncase h\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni j : I\ninst✝ : (i : I) → MulOneClass (f i)\na✝ : (i : I) → f i\nx✝ : I\n⊢ (1 * a✝) x✝ = a✝ x✝\n[PROOFSTEP]\nexact one_mul _\n[GOAL]\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni j : I\ninst✝ : (i : I) → MulOneClass (f i)\n⊢ ∀ (a : (i : I) → f i), a * 1 = a\n[PROOFSTEP]\nintros\n[GOAL]\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni j : I\ninst✝ : (i : I) → MulOneClass (f i)\na✝ : (i : I) → f i\n⊢ a✝ * 1 = a✝\n[PROOFSTEP]\next\n[GOAL]\ncase h\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni j : I\ninst✝ : (i : I) → MulOneClass (f i)\na✝ : (i : I) → f i\nx✝ : I\n⊢ (a✝ * 1) x✝ = a✝ x✝\n[PROOFSTEP]\nexact mul_one _\n[GOAL]\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni j : I\ninst✝ : (i : I) → InvOneClass (f i)\n⊢ 1⁻¹ = 1\n[PROOFSTEP]\nintros\n[GOAL]\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni j : I\ninst✝ : (i : I) → InvOneClass (f i)\n⊢ 1⁻¹ = 1\n[PROOFSTEP]\next\n[GOAL]\ncase h\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni j : I\ninst✝ : (i : I) → InvOneClass (f i)\nx✝ : I\n⊢ 1⁻¹ x✝ = OfNat.ofNat 1 x✝\n[PROOFSTEP]\nexact inv_one\n[GOAL]\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni j : I\ninst✝ : (i : I) → Monoid (f i)\nsrc✝¹ : Semigroup ((i : I) → f i) := semigroup\nsrc✝ : MulOneClass ((i : I) → f i) := mulOneClass\n⊢ ∀ (x : (i : I) → f i), (fun n x i => x i ^ n) 0 x = 1\n[PROOFSTEP]\nintros\n[GOAL]\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni j : I\ninst✝ : (i : I) → Monoid (f i)\nsrc✝¹ : Semigroup ((i : I) → f i) := semigroup\nsrc✝ : MulOneClass ((i : I) → f i) := mulOneClass\nx✝ : (i : I) → f i\n⊢ (fun n x i => x i ^ n) 0 x✝ = 1\n[PROOFSTEP]\next\n[GOAL]\ncase h\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni j : I\ninst✝ : (i : I) → Monoid (f i)\nsrc✝¹ : Semigroup ((i : I) → f i) := semigroup\nsrc✝ : MulOneClass ((i : I) → f i) := mulOneClass\nx✝¹ : (i : I) → f i\nx✝ : I\n⊢ (fun n x i => x i ^ n) 0 x✝¹ x✝ = OfNat.ofNat 1 x✝\n[PROOFSTEP]\nexact Monoid.npow_zero _\n[GOAL]\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni j : I\ninst✝ : (i : I) → Monoid (f i)\nsrc✝¹ : Semigroup ((i : I) → f i) := semigroup\nsrc✝ : MulOneClass ((i : I) → f i) := mulOneClass\n⊢ ∀ (n : ℕ) (x : (i : I) → f i), (fun n x i => x i ^ n) (n + 1) x = x * (fun n x i => x i ^ n) n x\n[PROOFSTEP]\nintros\n[GOAL]\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni j : I\ninst✝ : (i : I) → Monoid (f i)\nsrc✝¹ : Semigroup ((i : I) → f i) := semigroup\nsrc✝ : MulOneClass ((i : I) → f i) := mulOneClass\nn✝ : ℕ\nx✝ : (i : I) → f i\n⊢ (fun n x i => x i ^ n) (n✝ + 1) x✝ = x✝ * (fun n x i => x i ^ n) n✝ x✝\n[PROOFSTEP]\next\n[GOAL]\ncase h\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni j : I\ninst✝ : (i : I) → Monoid (f i)\nsrc✝¹ : Semigroup ((i : I) → f i) := semigroup\nsrc✝ : MulOneClass ((i : I) → f i) := mulOneClass\nn✝ : ℕ\nx✝¹ : (i : I) → f i\nx✝ : I\n⊢ (fun n x i => x i ^ n) (n✝ + 1) x✝¹ x✝ = (x✝¹ * (fun n x i => x i ^ n) n✝ x✝¹) x✝\n[PROOFSTEP]\nexact Monoid.npow_succ _ _\n[GOAL]\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni j : I\ninst✝ : (i : I) → DivInvMonoid (f i)\nsrc✝ : Monoid ((i : I) → f i) := monoid\n⊢ ∀ (a b : (i : I) → f i), a / b = a * b⁻¹\n[PROOFSTEP]\nintros\n[GOAL]\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni j : I\ninst✝ : (i : I) → DivInvMonoid (f i)\nsrc✝ : Monoid ((i : I) → f i) := monoid\na✝ b✝ : (i : I) → f i\n⊢ a✝ / b✝ = a✝ * b✝⁻¹\n[PROOFSTEP]\next\n[GOAL]\ncase h\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni j : I\ninst✝ : (i : I) → DivInvMonoid (f i)\nsrc✝ : Monoid ((i : I) → f i) := monoid\na✝ b✝ : (i : I) → f i\nx✝ : I\n⊢ (a✝ / b✝) x✝ = (a✝ * b✝⁻¹) x✝\n[PROOFSTEP]\nexact div_eq_mul_inv _ _\n[GOAL]\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni j : I\ninst✝ : (i : I) → DivInvMonoid (f i)\nsrc✝ : Monoid ((i : I) → f i) := monoid\n⊢ ∀ (a : (i : I) → f i), (fun z x i => x i ^ z) 0 a = 1\n[PROOFSTEP]\nintros\n[GOAL]\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni j : I\ninst✝ : (i : I) → DivInvMonoid (f i)\nsrc✝ : Monoid ((i : I) → f i) := monoid\na✝ : (i : I) → f i\n⊢ (fun z x i => x i ^ z) 0 a✝ = 1\n[PROOFSTEP]\next\n[GOAL]\ncase h\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni j : I\ninst✝ : (i : I) → DivInvMonoid (f i)\nsrc✝ : Monoid ((i : I) → f i) := monoid\na✝ : (i : I) → f i\nx✝ : I\n⊢ (fun z x i => x i ^ z) 0 a✝ x✝ = OfNat.ofNat 1 x✝\n[PROOFSTEP]\nexact DivInvMonoid.zpow_zero' _\n[GOAL]\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni j : I\ninst✝ : (i : I) → DivInvMonoid (f i)\nsrc✝ : Monoid ((i : I) → f i) := monoid\n⊢ ∀ (n : ℕ) (a : (i : I) → f i),\n    (fun z x i => x i ^ z) (Int.ofNat (Nat.succ n)) a = a * (fun z x i => x i ^ z) (Int.ofNat n) a\n[PROOFSTEP]\nintros\n[GOAL]\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni j : I\ninst✝ : (i : I) → DivInvMonoid (f i)\nsrc✝ : Monoid ((i : I) → f i) := monoid\nn✝ : ℕ\na✝ : (i : I) → f i\n⊢ (fun z x i => x i ^ z) (Int.ofNat (Nat.succ n✝)) a✝ = a✝ * (fun z x i => x i ^ z) (Int.ofNat n✝) a✝\n[PROOFSTEP]\next\n[GOAL]\ncase h\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni j : I\ninst✝ : (i : I) → DivInvMonoid (f i)\nsrc✝ : Monoid ((i : I) → f i) := monoid\nn✝ : ℕ\na✝ : (i : I) → f i\nx✝ : I\n⊢ (fun z x i => x i ^ z) (Int.ofNat (Nat.succ n✝)) a✝ x✝ = (a✝ * (fun z x i => x i ^ z) (Int.ofNat n✝) a✝) x✝\n[PROOFSTEP]\nexact DivInvMonoid.zpow_succ' _ _\n[GOAL]\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni j : I\ninst✝ : (i : I) → DivInvMonoid (f i)\nsrc✝ : Monoid ((i : I) → f i) := monoid\n⊢ ∀ (n : ℕ) (a : (i : I) → f i), (fun z x i => x i ^ z) (Int.negSucc n) a = ((fun z x i => x i ^ z) (↑(Nat.succ n)) a)⁻¹\n[PROOFSTEP]\nintros\n[GOAL]\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni j : I\ninst✝ : (i : I) → DivInvMonoid (f i)\nsrc✝ : Monoid ((i : I) → f i) := monoid\nn✝ : ℕ\na✝ : (i : I) → f i\n⊢ (fun z x i => x i ^ z) (Int.negSucc n✝) a✝ = ((fun z x i => x i ^ z) (↑(Nat.succ n✝)) a✝)⁻¹\n[PROOFSTEP]\next\n[GOAL]\ncase h\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni j : I\ninst✝ : (i : I) → DivInvMonoid (f i)\nsrc✝ : Monoid ((i : I) → f i) := monoid\nn✝ : ℕ\na✝ : (i : I) → f i\nx✝ : I\n⊢ (fun z x i => x i ^ z) (Int.negSucc n✝) a✝ x✝ = ((fun z x i => x i ^ z) (↑(Nat.succ n✝)) a✝)⁻¹ x✝\n[PROOFSTEP]\nexact DivInvMonoid.zpow_neg' _ _\n[GOAL]\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni j : I\ninst✝ : (i : I) → DivInvOneMonoid (f i)\nsrc✝ : DivInvMonoid ((i : I) → f i) := divInvMonoid\n⊢ 1⁻¹ = 1\n[PROOFSTEP]\next\n[GOAL]\ncase h\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni j : I\ninst✝ : (i : I) → DivInvOneMonoid (f i)\nsrc✝ : DivInvMonoid ((i : I) → f i) := divInvMonoid\nx✝ : I\n⊢ 1⁻¹ x✝ = OfNat.ofNat 1 x✝\n[PROOFSTEP]\nexact inv_one\n[GOAL]\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni j : I\ninst✝ : (i : I) → InvolutiveInv (f i)\n⊢ ∀ (x : (i : I) → f i), x⁻¹⁻¹ = x\n[PROOFSTEP]\nintros\n[GOAL]\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni j : I\ninst✝ : (i : I) → InvolutiveInv (f i)\nx✝ : (i : I) → f i\n⊢ x✝⁻¹⁻¹ = x✝\n[PROOFSTEP]\next\n[GOAL]\ncase h\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni j : I\ninst✝ : (i : I) → InvolutiveInv (f i)\nx✝¹ : (i : I) → f i\nx✝ : I\n⊢ x✝¹⁻¹⁻¹ x✝ = x✝¹ x✝\n[PROOFSTEP]\nexact inv_inv _\n[GOAL]\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni j : I\ninst✝ : (i : I) → DivisionMonoid (f i)\nsrc✝¹ : DivInvMonoid ((i : I) → f i) := divInvMonoid\nsrc✝ : InvolutiveInv ((i : I) → f i) := involutiveInv\n⊢ ∀ (a b : (i : I) → f i), (a * b)⁻¹ = b⁻¹ * a⁻¹\n[PROOFSTEP]\nintros\n[GOAL]\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni j : I\ninst✝ : (i : I) → DivisionMonoid (f i)\nsrc✝¹ : DivInvMonoid ((i : I) → f i) := divInvMonoid\nsrc✝ : InvolutiveInv ((i : I) → f i) := involutiveInv\na✝ b✝ : (i : I) → f i\n⊢ (a✝ * b✝)⁻¹ = b✝⁻¹ * a✝⁻¹\n[PROOFSTEP]\next\n[GOAL]\ncase h\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni j : I\ninst✝ : (i : I) → DivisionMonoid (f i)\nsrc✝¹ : DivInvMonoid ((i : I) → f i) := divInvMonoid\nsrc✝ : InvolutiveInv ((i : I) → f i) := involutiveInv\na✝ b✝ : (i : I) → f i\nx✝ : I\n⊢ (a✝ * b✝)⁻¹ x✝ = (b✝⁻¹ * a✝⁻¹) x✝\n[PROOFSTEP]\nexact mul_inv_rev _ _\n[GOAL]\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni j : I\ninst✝ : (i : I) → DivisionMonoid (f i)\nsrc✝¹ : DivInvMonoid ((i : I) → f i) := divInvMonoid\nsrc✝ : InvolutiveInv ((i : I) → f i) := involutiveInv\n⊢ ∀ (a b : (i : I) → f i), a * b = 1 → a⁻¹ = b\n[PROOFSTEP]\nintros _ _ h\n[GOAL]\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni j : I\ninst✝ : (i : I) → DivisionMonoid (f i)\nsrc✝¹ : DivInvMonoid ((i : I) → f i) := divInvMonoid\nsrc✝ : InvolutiveInv ((i : I) → f i) := involutiveInv\na✝ b✝ : (i : I) → f i\nh : a✝ * b✝ = 1\n⊢ a✝⁻¹ = b✝\n[PROOFSTEP]\next\n[GOAL]\ncase h\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni j : I\ninst✝ : (i : I) → DivisionMonoid (f i)\nsrc✝¹ : DivInvMonoid ((i : I) → f i) := divInvMonoid\nsrc✝ : InvolutiveInv ((i : I) → f i) := involutiveInv\na✝ b✝ : (i : I) → f i\nh : a✝ * b✝ = 1\nx✝ : I\n⊢ a✝⁻¹ x✝ = b✝ x✝\n[PROOFSTEP]\nexact DivisionMonoid.inv_eq_of_mul _ _ (congrFun h _)\n[GOAL]\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni j : I\ninst✝ : (i : I) → Group (f i)\nsrc✝ : DivInvMonoid ((i : I) → f i) := divInvMonoid\n⊢ ∀ (a : (i : I) → f i), a⁻¹ * a = 1\n[PROOFSTEP]\nintros\n[GOAL]\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni j : I\ninst✝ : (i : I) → Group (f i)\nsrc✝ : DivInvMonoid ((i : I) → f i) := divInvMonoid\na✝ : (i : I) → f i\n⊢ a✝⁻¹ * a✝ = 1\n[PROOFSTEP]\next\n[GOAL]\ncase h\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni j : I\ninst✝ : (i : I) → Group (f i)\nsrc✝ : DivInvMonoid ((i : I) → f i) := divInvMonoid\na✝ : (i : I) → f i\nx✝ : I\n⊢ (a✝⁻¹ * a✝) x✝ = OfNat.ofNat 1 x✝\n[PROOFSTEP]\nexact mul_left_inv _\n[GOAL]\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni j : I\ninst✝ : (i : I) → LeftCancelSemigroup (f i)\nsrc✝ : Semigroup ((i : I) → f i) := semigroup\n⊢ ∀ (a b c : (i : I) → f i), a * b = a * c → b = c\n[PROOFSTEP]\nintros _ _ _ h\n[GOAL]\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni j : I\ninst✝ : (i : I) → LeftCancelSemigroup (f i)\nsrc✝ : Semigroup ((i : I) → f i) := semigroup\na✝ b✝ c✝ : (i : I) → f i\nh : a✝ * b✝ = a✝ * c✝\n⊢ b✝ = c✝\n[PROOFSTEP]\next\n[GOAL]\ncase h\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni j : I\ninst✝ : (i : I) → LeftCancelSemigroup (f i)\nsrc✝ : Semigroup ((i : I) → f i) := semigroup\na✝ b✝ c✝ : (i : I) → f i\nh : a✝ * b✝ = a✝ * c✝\nx✝ : I\n⊢ b✝ x✝ = c✝ x✝\n[PROOFSTEP]\nexact LeftCancelSemigroup.mul_left_cancel _ _ _ (congr_fun h _)\n[GOAL]\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni j : I\ninst✝ : (i : I) → RightCancelSemigroup (f i)\nsrc✝ : Semigroup ((i : I) → f i) := semigroup\n⊢ ∀ (a b c : (i : I) → f i), a * b = c * b → a = c\n[PROOFSTEP]\nintros _ _ _ h\n[GOAL]\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni j : I\ninst✝ : (i : I) → RightCancelSemigroup (f i)\nsrc✝ : Semigroup ((i : I) → f i) := semigroup\na✝ b✝ c✝ : (i : I) → f i\nh : a✝ * b✝ = c✝ * b✝\n⊢ a✝ = c✝\n[PROOFSTEP]\next\n[GOAL]\ncase h\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni j : I\ninst✝ : (i : I) → RightCancelSemigroup (f i)\nsrc✝ : Semigroup ((i : I) → f i) := semigroup\na✝ b✝ c✝ : (i : I) → f i\nh : a✝ * b✝ = c✝ * b✝\nx✝ : I\n⊢ a✝ x✝ = c✝ x✝\n[PROOFSTEP]\nexact RightCancelSemigroup.mul_right_cancel _ _ _ (congr_fun h _)\n[GOAL]\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni j : I\ninst✝ : (i : I) → MulZeroClass (f i)\n⊢ ∀ (a : (i : I) → f i), 0 * a = 0\n[PROOFSTEP]\nintros\n[GOAL]\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni j : I\ninst✝ : (i : I) → MulZeroClass (f i)\na✝ : (i : I) → f i\n⊢ 0 * a✝ = 0\n[PROOFSTEP]\next\n[GOAL]\ncase h\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni j : I\ninst✝ : (i : I) → MulZeroClass (f i)\na✝ : (i : I) → f i\nx✝ : I\n⊢ (0 * a✝) x✝ = OfNat.ofNat 0 x✝\n[PROOFSTEP]\nexact zero_mul _\n[GOAL]\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni j : I\ninst✝ : (i : I) → MulZeroClass (f i)\n⊢ ∀ (a : (i : I) → f i), a * 0 = 0\n[PROOFSTEP]\nintros\n[GOAL]\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni j : I\ninst✝ : (i : I) → MulZeroClass (f i)\na✝ : (i : I) → f i\n⊢ a✝ * 0 = 0\n[PROOFSTEP]\next\n[GOAL]\ncase h\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni j : I\ninst✝ : (i : I) → MulZeroClass (f i)\na✝ : (i : I) → f i\nx✝ : I\n⊢ (a✝ * 0) x✝ = OfNat.ofNat 0 x✝\n[PROOFSTEP]\nexact mul_zero _\n[GOAL]\nι : Type u_1\nα✝ : Type u_2\nI✝ : Type u\nf✝ : I✝ → Type v\nx y : (i : I✝) → f✝ i\ni j : I✝\ninst✝² : (i : I✝) → Mul (f✝ i)\nα : Type u_3\nβ : Type u_4\ninst✝¹ : Mul α\ninst✝ : Mul β\nf : α →ₙ* β\nI : Type u_5\nx✝¹ x✝ : I → α\n⊢ (fun h => ↑f ∘ h) (x✝¹ * x✝) = (fun h => ↑f ∘ h) x✝¹ * (fun h => ↑f ∘ h) x✝\n[PROOFSTEP]\next\n[GOAL]\ncase h\nι : Type u_1\nα✝ : Type u_2\nI✝ : Type u\nf✝ : I✝ → Type v\nx y : (i : I✝) → f✝ i\ni j : I✝\ninst✝² : (i : I✝) → Mul (f✝ i)\nα : Type u_3\nβ : Type u_4\ninst✝¹ : Mul α\ninst✝ : Mul β\nf : α →ₙ* β\nI : Type u_5\nx✝² x✝¹ : I → α\nx✝ : I\n⊢ (fun h => ↑f ∘ h) (x✝² * x✝¹) x✝ = ((fun h => ↑f ∘ h) x✝² * (fun h => ↑f ∘ h) x✝¹) x✝\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nα✝ : Type u_2\nI✝ : Type u\nf✝ : I✝ → Type v\nx y : (i : I✝) → f✝ i\ni j : I✝\ninst✝² : (i : I✝) → MulOneClass (f✝ i)\nα : Type u_3\nβ : Type u_4\ninst✝¹ : MulOneClass α\ninst✝ : MulOneClass β\nf : α →* β\nI : Type u_5\n⊢ (fun h => ↑f ∘ h) 1 = 1\n[PROOFSTEP]\next\n[GOAL]\ncase h\nι : Type u_1\nα✝ : Type u_2\nI✝ : Type u\nf✝ : I✝ → Type v\nx y : (i : I✝) → f✝ i\ni j : I✝\ninst✝² : (i : I✝) → MulOneClass (f✝ i)\nα : Type u_3\nβ : Type u_4\ninst✝¹ : MulOneClass α\ninst✝ : MulOneClass β\nf : α →* β\nI : Type u_5\nx✝ : I\n⊢ (fun h => ↑f ∘ h) 1 x✝ = OfNat.ofNat 1 x✝\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h\nι : Type u_1\nα✝ : Type u_2\nI✝ : Type u\nf✝ : I✝ → Type v\nx y : (i : I✝) → f✝ i\ni j : I✝\ninst✝² : (i : I✝) → MulOneClass (f✝ i)\nα : Type u_3\nβ : Type u_4\ninst✝¹ : MulOneClass α\ninst✝ : MulOneClass β\nf : α →* β\nI : Type u_5\nx✝ : I\n⊢ ↑f 1 = 1\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nα✝ : Type u_2\nI✝ : Type u\nf✝ : I✝ → Type v\nx y : (i : I✝) → f✝ i\ni j : I✝\ninst✝² : (i : I✝) → MulOneClass (f✝ i)\nα : Type u_3\nβ : Type u_4\ninst✝¹ : MulOneClass α\ninst✝ : MulOneClass β\nf : α →* β\nI : Type u_5\nx✝¹ x✝ : I → α\n⊢ OneHom.toFun { toFun := fun h => ↑f ∘ h, map_one' := (_ : (fun h => ↑f ∘ h) 1 = 1) } (x✝¹ * x✝) =\n    OneHom.toFun { toFun := fun h => ↑f ∘ h, map_one' := (_ : (fun h => ↑f ∘ h) 1 = 1) } x✝¹ *\n      OneHom.toFun { toFun := fun h => ↑f ∘ h, map_one' := (_ : (fun h => ↑f ∘ h) 1 = 1) } x✝\n[PROOFSTEP]\next\n[GOAL]\ncase h\nι : Type u_1\nα✝ : Type u_2\nI✝ : Type u\nf✝ : I✝ → Type v\nx y : (i : I✝) → f✝ i\ni j : I✝\ninst✝² : (i : I✝) → MulOneClass (f✝ i)\nα : Type u_3\nβ : Type u_4\ninst✝¹ : MulOneClass α\ninst✝ : MulOneClass β\nf : α →* β\nI : Type u_5\nx✝² x✝¹ : I → α\nx✝ : I\n⊢ OneHom.toFun { toFun := fun h => ↑f ∘ h, map_one' := (_ : (fun h => ↑f ∘ h) 1 = 1) } (x✝² * x✝¹) x✝ =\n    (OneHom.toFun { toFun := fun h => ↑f ∘ h, map_one' := (_ : (fun h => ↑f ∘ h) 1 = 1) } x✝² *\n        OneHom.toFun { toFun := fun h => ↑f ∘ h, map_one' := (_ : (fun h => ↑f ∘ h) 1 = 1) } x✝¹)\n      x✝\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni j : I\ninst✝¹ : DecidableEq I\ninst✝ : (i : I) → MulOneClass (f i)\n⊢ Pairwise fun i j => ∀ (x : f i) (y : f j), Commute (mulSingle i x) (mulSingle j y)\n[PROOFSTEP]\nintro i j hij x y\n[GOAL]\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx✝ y✝ : (i : I) → f i\ni✝ j✝ : I\ninst✝¹ : DecidableEq I\ninst✝ : (i : I) → MulOneClass (f i)\ni j : I\nhij : i ≠ j\nx : f i\ny : f j\n⊢ Commute (mulSingle i x) (mulSingle j y)\n[PROOFSTEP]\next k\n[GOAL]\ncase h\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx✝ y✝ : (i : I) → f i\ni✝ j✝ : I\ninst✝¹ : DecidableEq I\ninst✝ : (i : I) → MulOneClass (f i)\ni j : I\nhij : i ≠ j\nx : f i\ny : f j\nk : I\n⊢ (mulSingle i x * mulSingle j y) k = (mulSingle j y * mulSingle i x) k\n[PROOFSTEP]\nby_cases h1 : i = k\n[GOAL]\ncase pos\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx✝ y✝ : (i : I) → f i\ni✝ j✝ : I\ninst✝¹ : DecidableEq I\ninst✝ : (i : I) → MulOneClass (f i)\ni j : I\nhij : i ≠ j\nx : f i\ny : f j\nk : I\nh1 : i = k\n⊢ (mulSingle i x * mulSingle j y) k = (mulSingle j y * mulSingle i x) k\n[PROOFSTEP]\nsubst h1\n[GOAL]\ncase pos\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx✝ y✝ : (i : I) → f i\ni✝ j✝ : I\ninst✝¹ : DecidableEq I\ninst✝ : (i : I) → MulOneClass (f i)\ni j : I\nhij : i ≠ j\nx : f i\ny : f j\n⊢ (mulSingle i x * mulSingle j y) i = (mulSingle j y * mulSingle i x) i\n[PROOFSTEP]\nsimp [hij]\n[GOAL]\ncase neg\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx✝ y✝ : (i : I) → f i\ni✝ j✝ : I\ninst✝¹ : DecidableEq I\ninst✝ : (i : I) → MulOneClass (f i)\ni j : I\nhij : i ≠ j\nx : f i\ny : f j\nk : I\nh1 : ¬i = k\n⊢ (mulSingle i x * mulSingle j y) k = (mulSingle j y * mulSingle i x) k\n[PROOFSTEP]\nby_cases h2 : j = k\n[GOAL]\ncase pos\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx✝ y✝ : (i : I) → f i\ni✝ j✝ : I\ninst✝¹ : DecidableEq I\ninst✝ : (i : I) → MulOneClass (f i)\ni j : I\nhij : i ≠ j\nx : f i\ny : f j\nk : I\nh1 : ¬i = k\nh2 : j = k\n⊢ (mulSingle i x * mulSingle j y) k = (mulSingle j y * mulSingle i x) k\n[PROOFSTEP]\nsubst h2\n[GOAL]\ncase pos\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx✝ y✝ : (i : I) → f i\ni✝ j✝ : I\ninst✝¹ : DecidableEq I\ninst✝ : (i : I) → MulOneClass (f i)\ni j : I\nhij : i ≠ j\nx : f i\ny : f j\nh1 : ¬i = j\n⊢ (mulSingle i x * mulSingle j y) j = (mulSingle j y * mulSingle i x) j\n[PROOFSTEP]\nsimp [hij]\n[GOAL]\ncase neg\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx✝ y✝ : (i : I) → f i\ni✝ j✝ : I\ninst✝¹ : DecidableEq I\ninst✝ : (i : I) → MulOneClass (f i)\ni j : I\nhij : i ≠ j\nx : f i\ny : f j\nk : I\nh1 : ¬i = k\nh2 : ¬j = k\n⊢ (mulSingle i x * mulSingle j y) k = (mulSingle j y * mulSingle i x) k\n[PROOFSTEP]\nsimp [h1, h2]\n[GOAL]\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx✝ y : (i : I) → f i\ni✝ j✝ : I\ninst✝¹ : DecidableEq I\ninst✝ : (i : I) → MulOneClass (f i)\nx : (i : I) → f i\ni j : I\n⊢ Commute (mulSingle i (x i)) (mulSingle j (x j))\n[PROOFSTEP]\nobtain rfl | hij := Decidable.eq_or_ne i j\n[GOAL]\ncase inl\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx✝ y : (i : I) → f i\ni✝ j : I\ninst✝¹ : DecidableEq I\ninst✝ : (i : I) → MulOneClass (f i)\nx : (i : I) → f i\ni : I\n⊢ Commute (mulSingle i (x i)) (mulSingle i (x i))\n[PROOFSTEP]\nrfl\n[GOAL]\ncase inr\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx✝ y : (i : I) → f i\ni✝ j✝ : I\ninst✝¹ : DecidableEq I\ninst✝ : (i : I) → MulOneClass (f i)\nx : (i : I) → f i\ni j : I\nhij : i ≠ j\n⊢ Commute (mulSingle i (x i)) (mulSingle j (x j))\n[PROOFSTEP]\nexact Pi.mulSingle_commute hij _ _\n[GOAL]\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx✝ y : (i : I) → f i\ni j : I\ninst✝¹ : DecidableEq I\ninst✝ : (i : I) → Group (f i)\ng : (i : I) → f i\nx : f i\n⊢ Function.update g i x = g / mulSingle i (g i) * mulSingle i x\n[PROOFSTEP]\next j\n[GOAL]\ncase h\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx✝ y : (i : I) → f i\ni j✝ : I\ninst✝¹ : DecidableEq I\ninst✝ : (i : I) → Group (f i)\ng : (i : I) → f i\nx : f i\nj : I\n⊢ Function.update g i x j = (g / mulSingle i (g i) * mulSingle i x) j\n[PROOFSTEP]\nrcases eq_or_ne i j with (rfl | h)\n[GOAL]\ncase h.inl\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx✝ y : (i : I) → f i\ni j : I\ninst✝¹ : DecidableEq I\ninst✝ : (i : I) → Group (f i)\ng : (i : I) → f i\nx : f i\n⊢ Function.update g i x i = (g / mulSingle i (g i) * mulSingle i x) i\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.inr\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx✝ y : (i : I) → f i\ni j✝ : I\ninst✝¹ : DecidableEq I\ninst✝ : (i : I) → Group (f i)\ng : (i : I) → f i\nx : f i\nj : I\nh : i ≠ j\n⊢ Function.update g i x j = (g / mulSingle i (g i) * mulSingle i x) j\n[PROOFSTEP]\nsimp [Function.update_noteq h.symm, h]\n[GOAL]\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni j : I\ninst✝¹ : DecidableEq I\nM : Type u_3\ninst✝ : CommMonoid M\nk l m n : I\nu v : M\nhu : u ≠ 1\nhv : v ≠ 1\n⊢ mulSingle k u * mulSingle l v = mulSingle m u * mulSingle n v ↔\n    k = m ∧ l = n ∨ u = v ∧ k = n ∧ l = m ∨ u * v = 1 ∧ k = l ∧ m = n\n[PROOFSTEP]\nrefine' ⟨fun h => _, _⟩\n[GOAL]\ncase refine'_1\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni j : I\ninst✝¹ : DecidableEq I\nM : Type u_3\ninst✝ : CommMonoid M\nk l m n : I\nu v : M\nhu : u ≠ 1\nhv : v ≠ 1\nh : mulSingle k u * mulSingle l v = mulSingle m u * mulSingle n v\n⊢ k = m ∧ l = n ∨ u = v ∧ k = n ∧ l = m ∨ u * v = 1 ∧ k = l ∧ m = n\n[PROOFSTEP]\nhave hk := congr_fun h k\n[GOAL]\ncase refine'_1\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni j : I\ninst✝¹ : DecidableEq I\nM : Type u_3\ninst✝ : CommMonoid M\nk l m n : I\nu v : M\nhu : u ≠ 1\nhv : v ≠ 1\nh : mulSingle k u * mulSingle l v = mulSingle m u * mulSingle n v\nhk : (mulSingle k u * mulSingle l v) k = (mulSingle m u * mulSingle n v) k\n⊢ k = m ∧ l = n ∨ u = v ∧ k = n ∧ l = m ∨ u * v = 1 ∧ k = l ∧ m = n\n[PROOFSTEP]\nhave hl := congr_fun h l\n[GOAL]\ncase refine'_1\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni j : I\ninst✝¹ : DecidableEq I\nM : Type u_3\ninst✝ : CommMonoid M\nk l m n : I\nu v : M\nhu : u ≠ 1\nhv : v ≠ 1\nh : mulSingle k u * mulSingle l v = mulSingle m u * mulSingle n v\nhk : (mulSingle k u * mulSingle l v) k = (mulSingle m u * mulSingle n v) k\nhl : (mulSingle k u * mulSingle l v) l = (mulSingle m u * mulSingle n v) l\n⊢ k = m ∧ l = n ∨ u = v ∧ k = n ∧ l = m ∨ u * v = 1 ∧ k = l ∧ m = n\n[PROOFSTEP]\nhave hm := (congr_fun h m).symm\n[GOAL]\ncase refine'_1\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni j : I\ninst✝¹ : DecidableEq I\nM : Type u_3\ninst✝ : CommMonoid M\nk l m n : I\nu v : M\nhu : u ≠ 1\nhv : v ≠ 1\nh : mulSingle k u * mulSingle l v = mulSingle m u * mulSingle n v\nhk : (mulSingle k u * mulSingle l v) k = (mulSingle m u * mulSingle n v) k\nhl : (mulSingle k u * mulSingle l v) l = (mulSingle m u * mulSingle n v) l\nhm : (mulSingle m u * mulSingle n v) m = (mulSingle k u * mulSingle l v) m\n⊢ k = m ∧ l = n ∨ u = v ∧ k = n ∧ l = m ∨ u * v = 1 ∧ k = l ∧ m = n\n[PROOFSTEP]\nhave hn := (congr_fun h n).symm\n[GOAL]\ncase refine'_1\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni j : I\ninst✝¹ : DecidableEq I\nM : Type u_3\ninst✝ : CommMonoid M\nk l m n : I\nu v : M\nhu : u ≠ 1\nhv : v ≠ 1\nh : mulSingle k u * mulSingle l v = mulSingle m u * mulSingle n v\nhk : (mulSingle k u * mulSingle l v) k = (mulSingle m u * mulSingle n v) k\nhl : (mulSingle k u * mulSingle l v) l = (mulSingle m u * mulSingle n v) l\nhm : (mulSingle m u * mulSingle n v) m = (mulSingle k u * mulSingle l v) m\nhn : (mulSingle m u * mulSingle n v) n = (mulSingle k u * mulSingle l v) n\n⊢ k = m ∧ l = n ∨ u = v ∧ k = n ∧ l = m ∨ u * v = 1 ∧ k = l ∧ m = n\n[PROOFSTEP]\nsimp only [mul_apply, mulSingle_apply, if_pos rfl] at hk hl hm hn \n[GOAL]\ncase refine'_1\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni j : I\ninst✝¹ : DecidableEq I\nM : Type u_3\ninst✝ : CommMonoid M\nk l m n : I\nu v : M\nhu : u ≠ 1\nhv : v ≠ 1\nh : mulSingle k u * mulSingle l v = mulSingle m u * mulSingle n v\nhk : ((if True then u else 1) * if k = l then v else 1) = (if k = m then u else 1) * if k = n then v else 1\nhl : ((if l = k then u else 1) * if True then v else 1) = (if l = m then u else 1) * if l = n then v else 1\nhm : ((if True then u else 1) * if m = n then v else 1) = (if m = k then u else 1) * if m = l then v else 1\nhn : ((if n = m then u else 1) * if True then v else 1) = (if n = k then u else 1) * if n = l then v else 1\n⊢ k = m ∧ l = n ∨ u = v ∧ k = n ∧ l = m ∨ u * v = 1 ∧ k = l ∧ m = n\n[PROOFSTEP]\nrcases eq_or_ne k m with (rfl | hkm)\n[GOAL]\ncase refine'_1.inl\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni j : I\ninst✝¹ : DecidableEq I\nM : Type u_3\ninst✝ : CommMonoid M\nk l n : I\nu v : M\nhu : u ≠ 1\nhv : v ≠ 1\nh : mulSingle k u * mulSingle l v = mulSingle k u * mulSingle n v\nhk : ((if True then u else 1) * if k = l then v else 1) = (if k = k then u else 1) * if k = n then v else 1\nhl : ((if l = k then u else 1) * if True then v else 1) = (if l = k then u else 1) * if l = n then v else 1\nhm : ((if True then u else 1) * if k = n then v else 1) = (if k = k then u else 1) * if k = l then v else 1\nhn : ((if n = k then u else 1) * if True then v else 1) = (if n = k then u else 1) * if n = l then v else 1\n⊢ k = k ∧ l = n ∨ u = v ∧ k = n ∧ l = k ∨ u * v = 1 ∧ k = l ∧ k = n\n[PROOFSTEP]\nrefine' Or.inl ⟨rfl, not_ne_iff.mp fun hln => (hv _).elim⟩\n[GOAL]\ncase refine'_1.inl\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni j : I\ninst✝¹ : DecidableEq I\nM : Type u_3\ninst✝ : CommMonoid M\nk l n : I\nu v : M\nhu : u ≠ 1\nhv : v ≠ 1\nh : mulSingle k u * mulSingle l v = mulSingle k u * mulSingle n v\nhk : ((if True then u else 1) * if k = l then v else 1) = (if k = k then u else 1) * if k = n then v else 1\nhl : ((if l = k then u else 1) * if True then v else 1) = (if l = k then u else 1) * if l = n then v else 1\nhm : ((if True then u else 1) * if k = n then v else 1) = (if k = k then u else 1) * if k = l then v else 1\nhn : ((if n = k then u else 1) * if True then v else 1) = (if n = k then u else 1) * if n = l then v else 1\nhln : l ≠ n\n⊢ v = 1\n[PROOFSTEP]\nrcases eq_or_ne k l with (rfl | hkl)\n[GOAL]\ncase refine'_1.inl.inl\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni j : I\ninst✝¹ : DecidableEq I\nM : Type u_3\ninst✝ : CommMonoid M\nk n : I\nu v : M\nhu : u ≠ 1\nhv : v ≠ 1\nh : mulSingle k u * mulSingle k v = mulSingle k u * mulSingle n v\nhk : ((if True then u else 1) * if k = k then v else 1) = (if k = k then u else 1) * if k = n then v else 1\nhl : ((if k = k then u else 1) * if True then v else 1) = (if k = k then u else 1) * if k = n then v else 1\nhm : ((if True then u else 1) * if k = n then v else 1) = (if k = k then u else 1) * if k = k then v else 1\nhn : ((if n = k then u else 1) * if True then v else 1) = (if n = k then u else 1) * if n = k then v else 1\nhln : k ≠ n\n⊢ v = 1\n[PROOFSTEP]\nrwa [if_neg hln.symm, if_neg hln.symm, one_mul, one_mul] at hn \n[GOAL]\ncase refine'_1.inl.inr\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni j : I\ninst✝¹ : DecidableEq I\nM : Type u_3\ninst✝ : CommMonoid M\nk l n : I\nu v : M\nhu : u ≠ 1\nhv : v ≠ 1\nh : mulSingle k u * mulSingle l v = mulSingle k u * mulSingle n v\nhk : ((if True then u else 1) * if k = l then v else 1) = (if k = k then u else 1) * if k = n then v else 1\nhl : ((if l = k then u else 1) * if True then v else 1) = (if l = k then u else 1) * if l = n then v else 1\nhm : ((if True then u else 1) * if k = n then v else 1) = (if k = k then u else 1) * if k = l then v else 1\nhn : ((if n = k then u else 1) * if True then v else 1) = (if n = k then u else 1) * if n = l then v else 1\nhln : l ≠ n\nhkl : k ≠ l\n⊢ v = 1\n[PROOFSTEP]\nrwa [if_neg hkl.symm, if_neg hln, one_mul, one_mul] at hl \n[GOAL]\ncase refine'_1.inr\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni j : I\ninst✝¹ : DecidableEq I\nM : Type u_3\ninst✝ : CommMonoid M\nk l m n : I\nu v : M\nhu : u ≠ 1\nhv : v ≠ 1\nh : mulSingle k u * mulSingle l v = mulSingle m u * mulSingle n v\nhk : ((if True then u else 1) * if k = l then v else 1) = (if k = m then u else 1) * if k = n then v else 1\nhl : ((if l = k then u else 1) * if True then v else 1) = (if l = m then u else 1) * if l = n then v else 1\nhm : ((if True then u else 1) * if m = n then v else 1) = (if m = k then u else 1) * if m = l then v else 1\nhn : ((if n = m then u else 1) * if True then v else 1) = (if n = k then u else 1) * if n = l then v else 1\nhkm : k ≠ m\n⊢ k = m ∧ l = n ∨ u = v ∧ k = n ∧ l = m ∨ u * v = 1 ∧ k = l ∧ m = n\n[PROOFSTEP]\nrcases eq_or_ne m n with (rfl | hmn)\n[GOAL]\ncase refine'_1.inr.inl\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni j : I\ninst✝¹ : DecidableEq I\nM : Type u_3\ninst✝ : CommMonoid M\nk l m : I\nu v : M\nhu : u ≠ 1\nhv : v ≠ 1\nhkm : k ≠ m\nh : mulSingle k u * mulSingle l v = mulSingle m u * mulSingle m v\nhk : ((if True then u else 1) * if k = l then v else 1) = (if k = m then u else 1) * if k = m then v else 1\nhl : ((if l = k then u else 1) * if True then v else 1) = (if l = m then u else 1) * if l = m then v else 1\nhm : ((if True then u else 1) * if m = m then v else 1) = (if m = k then u else 1) * if m = l then v else 1\nhn : ((if m = m then u else 1) * if True then v else 1) = (if m = k then u else 1) * if m = l then v else 1\n⊢ k = m ∧ l = m ∨ u = v ∧ k = m ∧ l = m ∨ u * v = 1 ∧ k = l ∧ m = m\n[PROOFSTEP]\nrcases eq_or_ne k l with (rfl | hkl)\n[GOAL]\ncase refine'_1.inr.inl.inl\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni j : I\ninst✝¹ : DecidableEq I\nM : Type u_3\ninst✝ : CommMonoid M\nk m : I\nu v : M\nhu : u ≠ 1\nhv : v ≠ 1\nhkm : k ≠ m\nh : mulSingle k u * mulSingle k v = mulSingle m u * mulSingle m v\nhk : ((if True then u else 1) * if k = k then v else 1) = (if k = m then u else 1) * if k = m then v else 1\nhl : ((if k = k then u else 1) * if True then v else 1) = (if k = m then u else 1) * if k = m then v else 1\nhm : ((if True then u else 1) * if m = m then v else 1) = (if m = k then u else 1) * if m = k then v else 1\nhn : ((if m = m then u else 1) * if True then v else 1) = (if m = k then u else 1) * if m = k then v else 1\n⊢ k = m ∧ k = m ∨ u = v ∧ k = m ∧ k = m ∨ u * v = 1 ∧ k = k ∧ m = m\n[PROOFSTEP]\nrw [if_neg hkm.symm, if_neg hkm.symm, one_mul, if_pos rfl] at hm \n[GOAL]\ncase refine'_1.inr.inl.inl\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni j : I\ninst✝¹ : DecidableEq I\nM : Type u_3\ninst✝ : CommMonoid M\nk m : I\nu v : M\nhu : u ≠ 1\nhv : v ≠ 1\nhkm : k ≠ m\nh : mulSingle k u * mulSingle k v = mulSingle m u * mulSingle m v\nhk : ((if True then u else 1) * if k = k then v else 1) = (if k = m then u else 1) * if k = m then v else 1\nhl : ((if k = k then u else 1) * if True then v else 1) = (if k = m then u else 1) * if k = m then v else 1\nhm : (if True then u else 1) * v = 1\nhn : ((if m = m then u else 1) * if True then v else 1) = (if m = k then u else 1) * if m = k then v else 1\n⊢ k = m ∧ k = m ∨ u = v ∧ k = m ∧ k = m ∨ u * v = 1 ∧ k = k ∧ m = m\n[PROOFSTEP]\nexact Or.inr (Or.inr ⟨hm, rfl, rfl⟩)\n[GOAL]\ncase refine'_1.inr.inl.inr\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni j : I\ninst✝¹ : DecidableEq I\nM : Type u_3\ninst✝ : CommMonoid M\nk l m : I\nu v : M\nhu : u ≠ 1\nhv : v ≠ 1\nhkm : k ≠ m\nh : mulSingle k u * mulSingle l v = mulSingle m u * mulSingle m v\nhk : ((if True then u else 1) * if k = l then v else 1) = (if k = m then u else 1) * if k = m then v else 1\nhl : ((if l = k then u else 1) * if True then v else 1) = (if l = m then u else 1) * if l = m then v else 1\nhm : ((if True then u else 1) * if m = m then v else 1) = (if m = k then u else 1) * if m = l then v else 1\nhn : ((if m = m then u else 1) * if True then v else 1) = (if m = k then u else 1) * if m = l then v else 1\nhkl : k ≠ l\n⊢ k = m ∧ l = m ∨ u = v ∧ k = m ∧ l = m ∨ u * v = 1 ∧ k = l ∧ m = m\n[PROOFSTEP]\nsimp only [if_neg hkm, if_neg hkl, mul_one] at hk \n[GOAL]\ncase refine'_1.inr.inl.inr\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni j : I\ninst✝¹ : DecidableEq I\nM : Type u_3\ninst✝ : CommMonoid M\nk l m : I\nu v : M\nhu : u ≠ 1\nhv : v ≠ 1\nhkm : k ≠ m\nh : mulSingle k u * mulSingle l v = mulSingle m u * mulSingle m v\nhl : ((if l = k then u else 1) * if True then v else 1) = (if l = m then u else 1) * if l = m then v else 1\nhm : ((if True then u else 1) * if m = m then v else 1) = (if m = k then u else 1) * if m = l then v else 1\nhn : ((if m = m then u else 1) * if True then v else 1) = (if m = k then u else 1) * if m = l then v else 1\nhkl : k ≠ l\nhk : (if True then u else 1) = 1\n⊢ k = m ∧ l = m ∨ u = v ∧ k = m ∧ l = m ∨ u * v = 1 ∧ k = l ∧ m = m\n[PROOFSTEP]\ndsimp at hk \n[GOAL]\ncase refine'_1.inr.inl.inr\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni j : I\ninst✝¹ : DecidableEq I\nM : Type u_3\ninst✝ : CommMonoid M\nk l m : I\nu v : M\nhu : u ≠ 1\nhv : v ≠ 1\nhkm : k ≠ m\nh : mulSingle k u * mulSingle l v = mulSingle m u * mulSingle m v\nhl : ((if l = k then u else 1) * if True then v else 1) = (if l = m then u else 1) * if l = m then v else 1\nhm : ((if True then u else 1) * if m = m then v else 1) = (if m = k then u else 1) * if m = l then v else 1\nhn : ((if m = m then u else 1) * if True then v else 1) = (if m = k then u else 1) * if m = l then v else 1\nhkl : k ≠ l\nhk : u = 1\n⊢ k = m ∧ l = m ∨ u = v ∧ k = m ∧ l = m ∨ u * v = 1 ∧ k = l ∧ m = m\n[PROOFSTEP]\ncontradiction\n[GOAL]\ncase refine'_1.inr.inr\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni j : I\ninst✝¹ : DecidableEq I\nM : Type u_3\ninst✝ : CommMonoid M\nk l m n : I\nu v : M\nhu : u ≠ 1\nhv : v ≠ 1\nh : mulSingle k u * mulSingle l v = mulSingle m u * mulSingle n v\nhk : ((if True then u else 1) * if k = l then v else 1) = (if k = m then u else 1) * if k = n then v else 1\nhl : ((if l = k then u else 1) * if True then v else 1) = (if l = m then u else 1) * if l = n then v else 1\nhm : ((if True then u else 1) * if m = n then v else 1) = (if m = k then u else 1) * if m = l then v else 1\nhn : ((if n = m then u else 1) * if True then v else 1) = (if n = k then u else 1) * if n = l then v else 1\nhkm : k ≠ m\nhmn : m ≠ n\n⊢ k = m ∧ l = n ∨ u = v ∧ k = n ∧ l = m ∨ u * v = 1 ∧ k = l ∧ m = n\n[PROOFSTEP]\nrw [if_neg hkm.symm, if_neg hmn, one_mul, mul_one] at hm \n[GOAL]\ncase refine'_1.inr.inr\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni j : I\ninst✝¹ : DecidableEq I\nM : Type u_3\ninst✝ : CommMonoid M\nk l m n : I\nu v : M\nhu : u ≠ 1\nhv : v ≠ 1\nh : mulSingle k u * mulSingle l v = mulSingle m u * mulSingle n v\nhk : ((if True then u else 1) * if k = l then v else 1) = (if k = m then u else 1) * if k = n then v else 1\nhl : ((if l = k then u else 1) * if True then v else 1) = (if l = m then u else 1) * if l = n then v else 1\nhm : (if True then u else 1) = if m = l then v else 1\nhn : ((if n = m then u else 1) * if True then v else 1) = (if n = k then u else 1) * if n = l then v else 1\nhkm : k ≠ m\nhmn : m ≠ n\n⊢ k = m ∧ l = n ∨ u = v ∧ k = n ∧ l = m ∨ u * v = 1 ∧ k = l ∧ m = n\n[PROOFSTEP]\nobtain rfl := (ite_ne_right_iff.mp (ne_of_eq_of_ne hm.symm hu)).1\n[GOAL]\ncase refine'_1.inr.inr\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni j : I\ninst✝¹ : DecidableEq I\nM : Type u_3\ninst✝ : CommMonoid M\nk m n : I\nu v : M\nhu : u ≠ 1\nhv : v ≠ 1\nhkm : k ≠ m\nhmn : m ≠ n\nh : mulSingle k u * mulSingle m v = mulSingle m u * mulSingle n v\nhk : ((if True then u else 1) * if k = m then v else 1) = (if k = m then u else 1) * if k = n then v else 1\nhl : ((if m = k then u else 1) * if True then v else 1) = (if m = m then u else 1) * if m = n then v else 1\nhm : (if True then u else 1) = if m = m then v else 1\nhn : ((if n = m then u else 1) * if True then v else 1) = (if n = k then u else 1) * if n = m then v else 1\n⊢ k = m ∧ m = n ∨ u = v ∧ k = n ∧ m = m ∨ u * v = 1 ∧ k = m ∧ m = n\n[PROOFSTEP]\nrw [if_neg hkm, if_neg hkm, one_mul, mul_one] at hk \n[GOAL]\ncase refine'_1.inr.inr\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni j : I\ninst✝¹ : DecidableEq I\nM : Type u_3\ninst✝ : CommMonoid M\nk m n : I\nu v : M\nhu : u ≠ 1\nhv : v ≠ 1\nhkm : k ≠ m\nhmn : m ≠ n\nh : mulSingle k u * mulSingle m v = mulSingle m u * mulSingle n v\nhk : (if True then u else 1) = if k = n then v else 1\nhl : ((if m = k then u else 1) * if True then v else 1) = (if m = m then u else 1) * if m = n then v else 1\nhm : (if True then u else 1) = if m = m then v else 1\nhn : ((if n = m then u else 1) * if True then v else 1) = (if n = k then u else 1) * if n = m then v else 1\n⊢ k = m ∧ m = n ∨ u = v ∧ k = n ∧ m = m ∨ u * v = 1 ∧ k = m ∧ m = n\n[PROOFSTEP]\nobtain rfl := (ite_ne_right_iff.mp (ne_of_eq_of_ne hk.symm hu)).1\n[GOAL]\ncase refine'_1.inr.inr\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni j : I\ninst✝¹ : DecidableEq I\nM : Type u_3\ninst✝ : CommMonoid M\nk m : I\nu v : M\nhu : u ≠ 1\nhv : v ≠ 1\nhkm : k ≠ m\nhm : (if True then u else 1) = if m = m then v else 1\nhmn : m ≠ k\nh : mulSingle k u * mulSingle m v = mulSingle m u * mulSingle k v\nhk : (if True then u else 1) = if k = k then v else 1\nhl : ((if m = k then u else 1) * if True then v else 1) = (if m = m then u else 1) * if m = k then v else 1\nhn : ((if k = m then u else 1) * if True then v else 1) = (if k = k then u else 1) * if k = m then v else 1\n⊢ k = m ∧ m = k ∨ u = v ∧ k = k ∧ m = m ∨ u * v = 1 ∧ k = m ∧ m = k\n[PROOFSTEP]\nexact Or.inr (Or.inl ⟨hk.trans (if_pos rfl), rfl, rfl⟩)\n[GOAL]\ncase refine'_2\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni j : I\ninst✝¹ : DecidableEq I\nM : Type u_3\ninst✝ : CommMonoid M\nk l m n : I\nu v : M\nhu : u ≠ 1\nhv : v ≠ 1\n⊢ k = m ∧ l = n ∨ u = v ∧ k = n ∧ l = m ∨ u * v = 1 ∧ k = l ∧ m = n →\n    mulSingle k u * mulSingle l v = mulSingle m u * mulSingle n v\n[PROOFSTEP]\nrintro (⟨rfl, rfl⟩ | ⟨rfl, rfl, rfl⟩ | ⟨h, rfl, rfl⟩)\n[GOAL]\ncase refine'_2.inl.intro\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni j : I\ninst✝¹ : DecidableEq I\nM : Type u_3\ninst✝ : CommMonoid M\nk l : I\nu v : M\nhu : u ≠ 1\nhv : v ≠ 1\n⊢ mulSingle k u * mulSingle l v = mulSingle k u * mulSingle l v\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_2.inr.inl.intro.intro\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni j : I\ninst✝¹ : DecidableEq I\nM : Type u_3\ninst✝ : CommMonoid M\nk l : I\nu : M\nhu hv : u ≠ 1\n⊢ mulSingle k u * mulSingle l u = mulSingle l u * mulSingle k u\n[PROOFSTEP]\napply mul_comm\n[GOAL]\ncase refine'_2.inr.inr.intro.intro\nι : Type u_1\nα : Type u_2\nI : Type u\nf : I → Type v\nx y : (i : I) → f i\ni j : I\ninst✝¹ : DecidableEq I\nM : Type u_3\ninst✝ : CommMonoid M\nk m : I\nu v : M\nhu : u ≠ 1\nhv : v ≠ 1\nh : u * v = 1\n⊢ mulSingle k u * mulSingle k v = mulSingle m u * mulSingle m v\n[PROOFSTEP]\nsimp_rw [← Pi.mulSingle_mul, h, mulSingle_one]\n[GOAL]\nι : Type u_1\nα : Type u_2\nI : Type u\nf✝ : I → Type v\nx y : (i : I) → f✝ i\ni j : I\nη : Type v\nR : Type w\ns : ι → η\ninst✝ : MulOneClass R\nf g : ι → R\n⊢ OneHom.toFun { toFun := fun f => extend s f 1, map_one' := (_ : extend s 1 1 = 1) } (f * g) =\n    OneHom.toFun { toFun := fun f => extend s f 1, map_one' := (_ : extend s 1 1 = 1) } f *\n      OneHom.toFun { toFun := fun f => extend s f 1, map_one' := (_ : extend s 1 1 = 1) } g\n[PROOFSTEP]\nsimpa using Function.extend_mul s f g 1 1\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Group.Pi", "llama_tokens": 21789, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8128673087708699, "lm_q2_score": 0.6654105454764747, "lm_q1q2_score": 0.5408904793292185}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : ConditionallyCompleteLinearOrder β\nf : α → β\ns : Set α\na b : α\nh : MonotoneOn f s\nhl : BddBelow (f '' s)\nhu : BddAbove (f '' s)\n⊢ ∃ g, Monotone g ∧ EqOn f g s\n[PROOFSTEP]\nclassical\n  /- The extension is defined by `f x = f a` for `x ≤ a`, and `f x` is the supremum of the values\n        of `f` to the left of `x` for `x ≥ a`. -/\nrcases hl with ⟨a, ha⟩\nhave hu' : ∀ x, BddAbove (f '' (Iic x ∩ s)) := fun x => hu.mono (image_subset _ (inter_subset_right _ _))\nlet g : α → β := fun x => if Disjoint (Iic x) s then a else sSup (f '' (Iic x ∩ s))\nhave hgs : EqOn f g s := by\n  intro x hx\n  simp only []\n  have : IsGreatest (Iic x ∩ s) x := ⟨⟨right_mem_Iic, hx⟩, fun y hy => hy.1⟩\n  rw [if_neg this.nonempty.not_disjoint, ((h.mono <| inter_subset_right _ _).map_isGreatest this).csSup_eq]\nrefine' ⟨g, fun x y hxy => _, hgs⟩\nby_cases hx : Disjoint (Iic x) s <;> by_cases hy : Disjoint (Iic y) s <;>\n  simp only [if_pos, if_neg, not_false_iff, *, refl]\n· rcases not_disjoint_iff_nonempty_inter.1 hy with ⟨z, hz⟩\n  exact le_csSup_of_le (hu' _) (mem_image_of_mem _ hz) (ha <| mem_image_of_mem _ hz.2)\n· exact (hx <| hy.mono_left <| Iic_subset_Iic.2 hxy).elim\n· rw [not_disjoint_iff_nonempty_inter] at hx hy \n  refine' csSup_le_csSup (hu' _) (hx.image _) (image_subset _ _)\n  exact inter_subset_inter_left _ (Iic_subset_Iic.2 hxy)\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : ConditionallyCompleteLinearOrder β\nf : α → β\ns : Set α\na b : α\nh : MonotoneOn f s\nhl : BddBelow (f '' s)\nhu : BddAbove (f '' s)\n⊢ ∃ g, Monotone g ∧ EqOn f g s\n[PROOFSTEP]\nrcases hl with ⟨a, ha⟩\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : ConditionallyCompleteLinearOrder β\nf : α → β\ns : Set α\na✝ b : α\nh : MonotoneOn f s\nhu : BddAbove (f '' s)\na : β\nha : a ∈ lowerBounds (f '' s)\n⊢ ∃ g, Monotone g ∧ EqOn f g s\n[PROOFSTEP]\nhave hu' : ∀ x, BddAbove (f '' (Iic x ∩ s)) := fun x => hu.mono (image_subset _ (inter_subset_right _ _))\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : ConditionallyCompleteLinearOrder β\nf : α → β\ns : Set α\na✝ b : α\nh : MonotoneOn f s\nhu : BddAbove (f '' s)\na : β\nha : a ∈ lowerBounds (f '' s)\nhu' : ∀ (x : α), BddAbove (f '' (Iic x ∩ s))\n⊢ ∃ g, Monotone g ∧ EqOn f g s\n[PROOFSTEP]\nlet g : α → β := fun x => if Disjoint (Iic x) s then a else sSup (f '' (Iic x ∩ s))\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : ConditionallyCompleteLinearOrder β\nf : α → β\ns : Set α\na✝ b : α\nh : MonotoneOn f s\nhu : BddAbove (f '' s)\na : β\nha : a ∈ lowerBounds (f '' s)\nhu' : ∀ (x : α), BddAbove (f '' (Iic x ∩ s))\ng : α → β := fun x => if Disjoint (Iic x) s then a else sSup (f '' (Iic x ∩ s))\n⊢ ∃ g, Monotone g ∧ EqOn f g s\n[PROOFSTEP]\nhave hgs : EqOn f g s := by\n  intro x hx\n  simp only []\n  have : IsGreatest (Iic x ∩ s) x := ⟨⟨right_mem_Iic, hx⟩, fun y hy => hy.1⟩\n  rw [if_neg this.nonempty.not_disjoint, ((h.mono <| inter_subset_right _ _).map_isGreatest this).csSup_eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : ConditionallyCompleteLinearOrder β\nf : α → β\ns : Set α\na✝ b : α\nh : MonotoneOn f s\nhu : BddAbove (f '' s)\na : β\nha : a ∈ lowerBounds (f '' s)\nhu' : ∀ (x : α), BddAbove (f '' (Iic x ∩ s))\ng : α → β := fun x => if Disjoint (Iic x) s then a else sSup (f '' (Iic x ∩ s))\n⊢ EqOn f g s\n[PROOFSTEP]\nintro x hx\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : ConditionallyCompleteLinearOrder β\nf : α → β\ns : Set α\na✝ b : α\nh : MonotoneOn f s\nhu : BddAbove (f '' s)\na : β\nha : a ∈ lowerBounds (f '' s)\nhu' : ∀ (x : α), BddAbove (f '' (Iic x ∩ s))\ng : α → β := fun x => if Disjoint (Iic x) s then a else sSup (f '' (Iic x ∩ s))\nx : α\nhx : x ∈ s\n⊢ f x = g x\n[PROOFSTEP]\nsimp only []\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : ConditionallyCompleteLinearOrder β\nf : α → β\ns : Set α\na✝ b : α\nh : MonotoneOn f s\nhu : BddAbove (f '' s)\na : β\nha : a ∈ lowerBounds (f '' s)\nhu' : ∀ (x : α), BddAbove (f '' (Iic x ∩ s))\ng : α → β := fun x => if Disjoint (Iic x) s then a else sSup (f '' (Iic x ∩ s))\nx : α\nhx : x ∈ s\n⊢ f x = if Disjoint (Iic x) s then a else sSup (f '' (Iic x ∩ s))\n[PROOFSTEP]\nhave : IsGreatest (Iic x ∩ s) x := ⟨⟨right_mem_Iic, hx⟩, fun y hy => hy.1⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : ConditionallyCompleteLinearOrder β\nf : α → β\ns : Set α\na✝ b : α\nh : MonotoneOn f s\nhu : BddAbove (f '' s)\na : β\nha : a ∈ lowerBounds (f '' s)\nhu' : ∀ (x : α), BddAbove (f '' (Iic x ∩ s))\ng : α → β := fun x => if Disjoint (Iic x) s then a else sSup (f '' (Iic x ∩ s))\nx : α\nhx : x ∈ s\nthis : IsGreatest (Iic x ∩ s) x\n⊢ f x = if Disjoint (Iic x) s then a else sSup (f '' (Iic x ∩ s))\n[PROOFSTEP]\nrw [if_neg this.nonempty.not_disjoint, ((h.mono <| inter_subset_right _ _).map_isGreatest this).csSup_eq]\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : ConditionallyCompleteLinearOrder β\nf : α → β\ns : Set α\na✝ b : α\nh : MonotoneOn f s\nhu : BddAbove (f '' s)\na : β\nha : a ∈ lowerBounds (f '' s)\nhu' : ∀ (x : α), BddAbove (f '' (Iic x ∩ s))\ng : α → β := fun x => if Disjoint (Iic x) s then a else sSup (f '' (Iic x ∩ s))\nhgs : EqOn f g s\n⊢ ∃ g, Monotone g ∧ EqOn f g s\n[PROOFSTEP]\nrefine' ⟨g, fun x y hxy => _, hgs⟩\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : ConditionallyCompleteLinearOrder β\nf : α → β\ns : Set α\na✝ b : α\nh : MonotoneOn f s\nhu : BddAbove (f '' s)\na : β\nha : a ∈ lowerBounds (f '' s)\nhu' : ∀ (x : α), BddAbove (f '' (Iic x ∩ s))\ng : α → β := fun x => if Disjoint (Iic x) s then a else sSup (f '' (Iic x ∩ s))\nhgs : EqOn f g s\nx y : α\nhxy : x ≤ y\n⊢ g x ≤ g y\n[PROOFSTEP]\nby_cases hx : Disjoint (Iic x) s\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : ConditionallyCompleteLinearOrder β\nf : α → β\ns : Set α\na✝ b : α\nh : MonotoneOn f s\nhu : BddAbove (f '' s)\na : β\nha : a ∈ lowerBounds (f '' s)\nhu' : ∀ (x : α), BddAbove (f '' (Iic x ∩ s))\ng : α → β := fun x => if Disjoint (Iic x) s then a else sSup (f '' (Iic x ∩ s))\nhgs : EqOn f g s\nx y : α\nhxy : x ≤ y\nhx : Disjoint (Iic x) s\n⊢ g x ≤ g y\n[PROOFSTEP]\nby_cases hy : Disjoint (Iic y) s\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : ConditionallyCompleteLinearOrder β\nf : α → β\ns : Set α\na✝ b : α\nh : MonotoneOn f s\nhu : BddAbove (f '' s)\na : β\nha : a ∈ lowerBounds (f '' s)\nhu' : ∀ (x : α), BddAbove (f '' (Iic x ∩ s))\ng : α → β := fun x => if Disjoint (Iic x) s then a else sSup (f '' (Iic x ∩ s))\nhgs : EqOn f g s\nx y : α\nhxy : x ≤ y\nhx : ¬Disjoint (Iic x) s\n⊢ g x ≤ g y\n[PROOFSTEP]\nby_cases hy : Disjoint (Iic y) s\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : ConditionallyCompleteLinearOrder β\nf : α → β\ns : Set α\na✝ b : α\nh : MonotoneOn f s\nhu : BddAbove (f '' s)\na : β\nha : a ∈ lowerBounds (f '' s)\nhu' : ∀ (x : α), BddAbove (f '' (Iic x ∩ s))\ng : α → β := fun x => if Disjoint (Iic x) s then a else sSup (f '' (Iic x ∩ s))\nhgs : EqOn f g s\nx y : α\nhxy : x ≤ y\nhx : Disjoint (Iic x) s\nhy : Disjoint (Iic y) s\n⊢ g x ≤ g y\n[PROOFSTEP]\nsimp only [if_pos, if_neg, not_false_iff, *, refl]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : ConditionallyCompleteLinearOrder β\nf : α → β\ns : Set α\na✝ b : α\nh : MonotoneOn f s\nhu : BddAbove (f '' s)\na : β\nha : a ∈ lowerBounds (f '' s)\nhu' : ∀ (x : α), BddAbove (f '' (Iic x ∩ s))\ng : α → β := fun x => if Disjoint (Iic x) s then a else sSup (f '' (Iic x ∩ s))\nhgs : EqOn f g s\nx y : α\nhxy : x ≤ y\nhx : Disjoint (Iic x) s\nhy : ¬Disjoint (Iic y) s\n⊢ g x ≤ g y\n[PROOFSTEP]\nsimp only [if_pos, if_neg, not_false_iff, *, refl]\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : ConditionallyCompleteLinearOrder β\nf : α → β\ns : Set α\na✝ b : α\nh : MonotoneOn f s\nhu : BddAbove (f '' s)\na : β\nha : a ∈ lowerBounds (f '' s)\nhu' : ∀ (x : α), BddAbove (f '' (Iic x ∩ s))\ng : α → β := fun x => if Disjoint (Iic x) s then a else sSup (f '' (Iic x ∩ s))\nhgs : EqOn f g s\nx y : α\nhxy : x ≤ y\nhx : ¬Disjoint (Iic x) s\nhy : Disjoint (Iic y) s\n⊢ g x ≤ g y\n[PROOFSTEP]\nsimp only [if_pos, if_neg, not_false_iff, *, refl]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : ConditionallyCompleteLinearOrder β\nf : α → β\ns : Set α\na✝ b : α\nh : MonotoneOn f s\nhu : BddAbove (f '' s)\na : β\nha : a ∈ lowerBounds (f '' s)\nhu' : ∀ (x : α), BddAbove (f '' (Iic x ∩ s))\ng : α → β := fun x => if Disjoint (Iic x) s then a else sSup (f '' (Iic x ∩ s))\nhgs : EqOn f g s\nx y : α\nhxy : x ≤ y\nhx : ¬Disjoint (Iic x) s\nhy : ¬Disjoint (Iic y) s\n⊢ g x ≤ g y\n[PROOFSTEP]\nsimp only [if_pos, if_neg, not_false_iff, *, refl]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : ConditionallyCompleteLinearOrder β\nf : α → β\ns : Set α\na✝ b : α\nh : MonotoneOn f s\nhu : BddAbove (f '' s)\na : β\nha : a ∈ lowerBounds (f '' s)\nhu' : ∀ (x : α), BddAbove (f '' (Iic x ∩ s))\ng : α → β := fun x => if Disjoint (Iic x) s then a else sSup (f '' (Iic x ∩ s))\nhgs : EqOn f g s\nx y : α\nhxy : x ≤ y\nhx : Disjoint (Iic x) s\nhy : ¬Disjoint (Iic y) s\n⊢ a ≤ sSup (f '' (Iic y ∩ s))\n[PROOFSTEP]\nrcases not_disjoint_iff_nonempty_inter.1 hy with ⟨z, hz⟩\n[GOAL]\ncase neg.intro\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : ConditionallyCompleteLinearOrder β\nf : α → β\ns : Set α\na✝ b : α\nh : MonotoneOn f s\nhu : BddAbove (f '' s)\na : β\nha : a ∈ lowerBounds (f '' s)\nhu' : ∀ (x : α), BddAbove (f '' (Iic x ∩ s))\ng : α → β := fun x => if Disjoint (Iic x) s then a else sSup (f '' (Iic x ∩ s))\nhgs : EqOn f g s\nx y : α\nhxy : x ≤ y\nhx : Disjoint (Iic x) s\nhy : ¬Disjoint (Iic y) s\nz : α\nhz : z ∈ Iic y ∩ s\n⊢ a ≤ sSup (f '' (Iic y ∩ s))\n[PROOFSTEP]\nexact le_csSup_of_le (hu' _) (mem_image_of_mem _ hz) (ha <| mem_image_of_mem _ hz.2)\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : ConditionallyCompleteLinearOrder β\nf : α → β\ns : Set α\na✝ b : α\nh : MonotoneOn f s\nhu : BddAbove (f '' s)\na : β\nha : a ∈ lowerBounds (f '' s)\nhu' : ∀ (x : α), BddAbove (f '' (Iic x ∩ s))\ng : α → β := fun x => if Disjoint (Iic x) s then a else sSup (f '' (Iic x ∩ s))\nhgs : EqOn f g s\nx y : α\nhxy : x ≤ y\nhx : ¬Disjoint (Iic x) s\nhy : Disjoint (Iic y) s\n⊢ sSup (f '' (Iic x ∩ s)) ≤ a\n[PROOFSTEP]\nexact (hx <| hy.mono_left <| Iic_subset_Iic.2 hxy).elim\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : ConditionallyCompleteLinearOrder β\nf : α → β\ns : Set α\na✝ b : α\nh : MonotoneOn f s\nhu : BddAbove (f '' s)\na : β\nha : a ∈ lowerBounds (f '' s)\nhu' : ∀ (x : α), BddAbove (f '' (Iic x ∩ s))\ng : α → β := fun x => if Disjoint (Iic x) s then a else sSup (f '' (Iic x ∩ s))\nhgs : EqOn f g s\nx y : α\nhxy : x ≤ y\nhx : ¬Disjoint (Iic x) s\nhy : ¬Disjoint (Iic y) s\n⊢ sSup (f '' (Iic x ∩ s)) ≤ sSup (f '' (Iic y ∩ s))\n[PROOFSTEP]\nrw [not_disjoint_iff_nonempty_inter] at hx hy \n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : ConditionallyCompleteLinearOrder β\nf : α → β\ns : Set α\na✝ b : α\nh : MonotoneOn f s\nhu : BddAbove (f '' s)\na : β\nha : a ∈ lowerBounds (f '' s)\nhu' : ∀ (x : α), BddAbove (f '' (Iic x ∩ s))\ng : α → β := fun x => if Disjoint (Iic x) s then a else sSup (f '' (Iic x ∩ s))\nhgs : EqOn f g s\nx y : α\nhxy : x ≤ y\nhx : Set.Nonempty (Iic x ∩ s)\nhy : Set.Nonempty (Iic y ∩ s)\n⊢ sSup (f '' (Iic x ∩ s)) ≤ sSup (f '' (Iic y ∩ s))\n[PROOFSTEP]\nrefine' csSup_le_csSup (hu' _) (hx.image _) (image_subset _ _)\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : ConditionallyCompleteLinearOrder β\nf : α → β\ns : Set α\na✝ b : α\nh : MonotoneOn f s\nhu : BddAbove (f '' s)\na : β\nha : a ∈ lowerBounds (f '' s)\nhu' : ∀ (x : α), BddAbove (f '' (Iic x ∩ s))\ng : α → β := fun x => if Disjoint (Iic x) s then a else sSup (f '' (Iic x ∩ s))\nhgs : EqOn f g s\nx y : α\nhxy : x ≤ y\nhx : Set.Nonempty (Iic x ∩ s)\nhy : Set.Nonempty (Iic y ∩ s)\n⊢ Iic x ∩ s ⊆ Iic y ∩ s\n[PROOFSTEP]\nexact inter_subset_inter_left _ (Iic_subset_Iic.2 hxy)\n", "meta": {"mathlib_filename": "Mathlib.Order.Monotone.Extension", "llama_tokens": 5912, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8080672135527631, "lm_q2_score": 0.6688802537704063, "lm_q1q2_score": 0.5405002028647172}}
{"text": "[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝² : SMul R ℝ\ninst✝¹ : SMul S ℝ\ninst✝ : SMulCommClass R S ℝ\nr : R\ns : S\nx : ℂ\n⊢ r • s • x = s • r • x\n[PROOFSTEP]\next\n[GOAL]\ncase a\nR : Type u_1\nS : Type u_2\ninst✝² : SMul R ℝ\ninst✝¹ : SMul S ℝ\ninst✝ : SMulCommClass R S ℝ\nr : R\ns : S\nx : ℂ\n⊢ (r • s • x).re = (s • r • x).re\n[PROOFSTEP]\nsimp [smul_re, smul_im, smul_comm]\n[GOAL]\ncase a\nR : Type u_1\nS : Type u_2\ninst✝² : SMul R ℝ\ninst✝¹ : SMul S ℝ\ninst✝ : SMulCommClass R S ℝ\nr : R\ns : S\nx : ℂ\n⊢ (r • s • x).im = (s • r • x).im\n[PROOFSTEP]\nsimp [smul_re, smul_im, smul_comm]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝³ : SMul R S\ninst✝² : SMul R ℝ\ninst✝¹ : SMul S ℝ\ninst✝ : IsScalarTower R S ℝ\nr : R\ns : S\nx : ℂ\n⊢ (r • s) • x = r • s • x\n[PROOFSTEP]\next\n[GOAL]\ncase a\nR : Type u_1\nS : Type u_2\ninst✝³ : SMul R S\ninst✝² : SMul R ℝ\ninst✝¹ : SMul S ℝ\ninst✝ : IsScalarTower R S ℝ\nr : R\ns : S\nx : ℂ\n⊢ ((r • s) • x).re = (r • s • x).re\n[PROOFSTEP]\nsimp [smul_re, smul_im, smul_assoc]\n[GOAL]\ncase a\nR : Type u_1\nS : Type u_2\ninst✝³ : SMul R S\ninst✝² : SMul R ℝ\ninst✝¹ : SMul S ℝ\ninst✝ : IsScalarTower R S ℝ\nr : R\ns : S\nx : ℂ\n⊢ ((r • s) • x).im = (r • s • x).im\n[PROOFSTEP]\nsimp [smul_re, smul_im, smul_assoc]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝² : SMul R ℝ\ninst✝¹ : SMul Rᵐᵒᵖ ℝ\ninst✝ : IsCentralScalar R ℝ\nr : R\nx : ℂ\n⊢ MulOpposite.op r • x = r • x\n[PROOFSTEP]\next\n[GOAL]\ncase a\nR : Type u_1\nS : Type u_2\ninst✝² : SMul R ℝ\ninst✝¹ : SMul Rᵐᵒᵖ ℝ\ninst✝ : IsCentralScalar R ℝ\nr : R\nx : ℂ\n⊢ (MulOpposite.op r • x).re = (r • x).re\n[PROOFSTEP]\nsimp [smul_re, smul_im, op_smul_eq_smul]\n[GOAL]\ncase a\nR : Type u_1\nS : Type u_2\ninst✝² : SMul R ℝ\ninst✝¹ : SMul Rᵐᵒᵖ ℝ\ninst✝ : IsCentralScalar R ℝ\nr : R\nx : ℂ\n⊢ (MulOpposite.op r • x).im = (r • x).im\n[PROOFSTEP]\nsimp [smul_re, smul_im, op_smul_eq_smul]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : Monoid R\ninst✝ : MulAction R ℝ\nx : ℂ\n⊢ 1 • x = x\n[PROOFSTEP]\next\n[GOAL]\ncase a\nR : Type u_1\nS : Type u_2\ninst✝¹ : Monoid R\ninst✝ : MulAction R ℝ\nx : ℂ\n⊢ (1 • x).re = x.re\n[PROOFSTEP]\nsimp [smul_re, smul_im, one_smul]\n[GOAL]\ncase a\nR : Type u_1\nS : Type u_2\ninst✝¹ : Monoid R\ninst✝ : MulAction R ℝ\nx : ℂ\n⊢ (1 • x).im = x.im\n[PROOFSTEP]\nsimp [smul_re, smul_im, one_smul]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : Monoid R\ninst✝ : MulAction R ℝ\nr s : R\nx : ℂ\n⊢ (r * s) • x = r • s • x\n[PROOFSTEP]\next\n[GOAL]\ncase a\nR : Type u_1\nS : Type u_2\ninst✝¹ : Monoid R\ninst✝ : MulAction R ℝ\nr s : R\nx : ℂ\n⊢ ((r * s) • x).re = (r • s • x).re\n[PROOFSTEP]\nsimp [smul_re, smul_im, mul_smul]\n[GOAL]\ncase a\nR : Type u_1\nS : Type u_2\ninst✝¹ : Monoid R\ninst✝ : MulAction R ℝ\nr s : R\nx : ℂ\n⊢ ((r * s) • x).im = (r • s • x).im\n[PROOFSTEP]\nsimp [smul_re, smul_im, mul_smul]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝ : DistribSMul R ℝ\nr : R\n⊢ r • 0 = 0\n[PROOFSTEP]\next\n[GOAL]\ncase a\nR : Type u_1\nS : Type u_2\ninst✝ : DistribSMul R ℝ\nr : R\n⊢ (r • 0).re = 0.re\n[PROOFSTEP]\nsimp [smul_re, smul_im, smul_zero]\n[GOAL]\ncase a\nR : Type u_1\nS : Type u_2\ninst✝ : DistribSMul R ℝ\nr : R\n⊢ (r • 0).im = 0.im\n[PROOFSTEP]\nsimp [smul_re, smul_im, smul_zero]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝ : DistribSMul R ℝ\nr : R\nx y : ℂ\n⊢ r • (x + y) = r • x + r • y\n[PROOFSTEP]\next\n[GOAL]\ncase a\nR : Type u_1\nS : Type u_2\ninst✝ : DistribSMul R ℝ\nr : R\nx y : ℂ\n⊢ (r • (x + y)).re = (r • x + r • y).re\n[PROOFSTEP]\nsimp [smul_re, smul_im, smul_add]\n[GOAL]\ncase a\nR : Type u_1\nS : Type u_2\ninst✝ : DistribSMul R ℝ\nr : R\nx y : ℂ\n⊢ (r • (x + y)).im = (r • x + r • y).im\n[PROOFSTEP]\nsimp [smul_re, smul_im, smul_add]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : Semiring R\ninst✝ : Module R ℝ\nr s : R\nx : ℂ\n⊢ (r + s) • x = r • x + s • x\n[PROOFSTEP]\next\n[GOAL]\ncase a\nR : Type u_1\nS : Type u_2\ninst✝¹ : Semiring R\ninst✝ : Module R ℝ\nr s : R\nx : ℂ\n⊢ ((r + s) • x).re = (r • x + s • x).re\n[PROOFSTEP]\nsimp [smul_re, smul_im, add_smul]\n[GOAL]\ncase a\nR : Type u_1\nS : Type u_2\ninst✝¹ : Semiring R\ninst✝ : Module R ℝ\nr s : R\nx : ℂ\n⊢ ((r + s) • x).im = (r • x + s • x).im\n[PROOFSTEP]\nsimp [smul_re, smul_im, add_smul]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : Semiring R\ninst✝ : Module R ℝ\nr : ℂ\n⊢ 0 • r = 0\n[PROOFSTEP]\next\n[GOAL]\ncase a\nR : Type u_1\nS : Type u_2\ninst✝¹ : Semiring R\ninst✝ : Module R ℝ\nr : ℂ\n⊢ (0 • r).re = 0.re\n[PROOFSTEP]\nsimp [smul_re, smul_im, zero_smul]\n[GOAL]\ncase a\nR : Type u_1\nS : Type u_2\ninst✝¹ : Semiring R\ninst✝ : Module R ℝ\nr : ℂ\n⊢ (0 • r).im = 0.im\n[PROOFSTEP]\nsimp [smul_re, smul_im, zero_smul]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommSemiring R\ninst✝ : Algebra R ℝ\nsrc✝ : R →+* ℂ := RingHom.comp ofReal (algebraMap R ℝ)\nr : R\nx✝ : (fun x => ℂ) r\nxr xi : ℝ\n⊢ ↑{ toMonoidHom := ↑src✝, map_zero' := (_ : OneHom.toFun (↑↑src✝) 0 = 0),\n            map_add' :=\n              (_ : ∀ (x y : R), OneHom.toFun (↑↑src✝) (x + y) = OneHom.toFun (↑↑src✝) x + OneHom.toFun (↑↑src✝) y) }\n        r *\n      { re := xr, im := xi } =\n    { re := xr, im := xi } *\n      ↑{ toMonoidHom := ↑src✝, map_zero' := (_ : OneHom.toFun (↑↑src✝) 0 = 0),\n            map_add' :=\n              (_ : ∀ (x y : R), OneHom.toFun (↑↑src✝) (x + y) = OneHom.toFun (↑↑src✝) x + OneHom.toFun (↑↑src✝) y) }\n        r\n[PROOFSTEP]\next\n[GOAL]\ncase a\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommSemiring R\ninst✝ : Algebra R ℝ\nsrc✝ : R →+* ℂ := RingHom.comp ofReal (algebraMap R ℝ)\nr : R\nx✝ : (fun x => ℂ) r\nxr xi : ℝ\n⊢ (↑{ toMonoidHom := ↑src✝, map_zero' := (_ : OneHom.toFun (↑↑src✝) 0 = 0),\n              map_add' :=\n                (_ : ∀ (x y : R), OneHom.toFun (↑↑src✝) (x + y) = OneHom.toFun (↑↑src✝) x + OneHom.toFun (↑↑src✝) y) }\n          r *\n        { re := xr, im := xi }).re =\n    ({ re := xr, im := xi } *\n        ↑{ toMonoidHom := ↑src✝, map_zero' := (_ : OneHom.toFun (↑↑src✝) 0 = 0),\n              map_add' :=\n                (_ : ∀ (x y : R), OneHom.toFun (↑↑src✝) (x + y) = OneHom.toFun (↑↑src✝) x + OneHom.toFun (↑↑src✝) y) }\n          r).re\n[PROOFSTEP]\nsimp [smul_re, smul_im, Algebra.commutes]\n[GOAL]\ncase a\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommSemiring R\ninst✝ : Algebra R ℝ\nsrc✝ : R →+* ℂ := RingHom.comp ofReal (algebraMap R ℝ)\nr : R\nx✝ : (fun x => ℂ) r\nxr xi : ℝ\n⊢ (↑{ toMonoidHom := ↑src✝, map_zero' := (_ : OneHom.toFun (↑↑src✝) 0 = 0),\n              map_add' :=\n                (_ : ∀ (x y : R), OneHom.toFun (↑↑src✝) (x + y) = OneHom.toFun (↑↑src✝) x + OneHom.toFun (↑↑src✝) y) }\n          r *\n        { re := xr, im := xi }).im =\n    ({ re := xr, im := xi } *\n        ↑{ toMonoidHom := ↑src✝, map_zero' := (_ : OneHom.toFun (↑↑src✝) 0 = 0),\n              map_add' :=\n                (_ : ∀ (x y : R), OneHom.toFun (↑↑src✝) (x + y) = OneHom.toFun (↑↑src✝) x + OneHom.toFun (↑↑src✝) y) }\n          r).im\n[PROOFSTEP]\nsimp [smul_re, smul_im, Algebra.commutes]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommSemiring R\ninst✝ : Algebra R ℝ\nsrc✝ : R →+* ℂ := RingHom.comp ofReal (algebraMap R ℝ)\nr : R\nx : (fun x => ℂ) r\n⊢ r • x =\n    ↑{ toMonoidHom := ↑src✝, map_zero' := (_ : OneHom.toFun (↑↑src✝) 0 = 0),\n            map_add' :=\n              (_ : ∀ (x y : R), OneHom.toFun (↑↑src✝) (x + y) = OneHom.toFun (↑↑src✝) x + OneHom.toFun (↑↑src✝) y) }\n        r *\n      x\n[PROOFSTEP]\next\n[GOAL]\ncase a\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommSemiring R\ninst✝ : Algebra R ℝ\nsrc✝ : R →+* ℂ := RingHom.comp ofReal (algebraMap R ℝ)\nr : R\nx : (fun x => ℂ) r\n⊢ (r • x).re =\n    (↑{ toMonoidHom := ↑src✝, map_zero' := (_ : OneHom.toFun (↑↑src✝) 0 = 0),\n              map_add' :=\n                (_ : ∀ (x y : R), OneHom.toFun (↑↑src✝) (x + y) = OneHom.toFun (↑↑src✝) x + OneHom.toFun (↑↑src✝) y) }\n          r *\n        x).re\n[PROOFSTEP]\nsimp [smul_re, smul_im, Algebra.smul_def]\n[GOAL]\ncase a\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommSemiring R\ninst✝ : Algebra R ℝ\nsrc✝ : R →+* ℂ := RingHom.comp ofReal (algebraMap R ℝ)\nr : R\nx : (fun x => ℂ) r\n⊢ (r • x).im =\n    (↑{ toMonoidHom := ↑src✝, map_zero' := (_ : OneHom.toFun (↑↑src✝) 0 = 0),\n              map_add' :=\n                (_ : ∀ (x y : R), OneHom.toFun (↑↑src✝) (x + y) = OneHom.toFun (↑↑src✝) x + OneHom.toFun (↑↑src✝) y) }\n          r *\n        x).im\n[PROOFSTEP]\nsimp [smul_re, smul_im, Algebra.smul_def]\n[GOAL]\nR : Type u_1\nS : Type u_2\nr : ℝ\nx : ℂ\n⊢ star (r • x) = star r • star x\n[PROOFSTEP]\nsimp only [star_def, star_trivial, real_smul, map_mul, conj_ofReal]\n[GOAL]\nR : Type u_1\nS : Type u_2\nA : Type u_3\ninst✝¹ : Semiring A\ninst✝ : Algebra ℝ A\nf g : ℂ →ₐ[ℝ] A\nh : ↑f I = ↑g I\n⊢ f = g\n[PROOFSTEP]\next ⟨x, y⟩\n[GOAL]\ncase H.mk\nR : Type u_1\nS : Type u_2\nA : Type u_3\ninst✝¹ : Semiring A\ninst✝ : Algebra ℝ A\nf g : ℂ →ₐ[ℝ] A\nh : ↑f I = ↑g I\nx y : ℝ\n⊢ ↑f { re := x, im := y } = ↑g { re := x, im := y }\n[PROOFSTEP]\nsimp only [mk_eq_add_mul_I, AlgHom.map_add, AlgHom.map_coe_real_complex, AlgHom.map_mul, h]\n[GOAL]\nR : Type u_1\nS : Type u_2\nz z' : ℂ\n⊢ (fun z => ![z.re, z.im]) (z + z') = (fun z => ![z.re, z.im]) z + (fun z => ![z.re, z.im]) z'\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\nS : Type u_2\nc : ℝ\nz : ℂ\n⊢ AddHom.toFun\n      { toFun := fun z => ![z.re, z.im],\n        map_add' := (_ : ∀ (z z' : ℂ), ![z.re + z'.re, z.im + z'.im] = ![z.re, z.im] + ![z'.re, z'.im]) }\n      (c • z) =\n    ↑(RingHom.id ℝ) c •\n      AddHom.toFun\n        { toFun := fun z => ![z.re, z.im],\n          map_add' := (_ : ∀ (z z' : ℂ), ![z.re + z'.re, z.im + z'.im] = ![z.re, z.im] + ![z'.re, z'.im]) }\n        z\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\nS : Type u_2\nz : ℂ\n⊢ (fun c => ↑(c 0) + c 1 • I)\n      (AddHom.toFun\n        {\n            toAddHom :=\n              { toFun := fun z => ![z.re, z.im],\n                map_add' := (_ : ∀ (z z' : ℂ), ![z.re + z'.re, z.im + z'.im] = ![z.re, z.im] + ![z'.re, z'.im]) },\n            map_smul' :=\n              (_ : ∀ (c : ℝ) (z : ℂ), ![c * z.re - 0 * z.im, c * z.im + 0 * z.re] = c • ![z.re, z.im]) }.toAddHom\n        z) =\n    z\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\nS : Type u_2\nc : Fin 2 → ℝ\n⊢ AddHom.toFun\n      {\n          toAddHom :=\n            { toFun := fun z => ![z.re, z.im],\n              map_add' := (_ : ∀ (z z' : ℂ), ![z.re + z'.re, z.im + z'.im] = ![z.re, z.im] + ![z'.re, z'.im]) },\n          map_smul' :=\n            (_ : ∀ (c : ℝ) (z : ℂ), ![c * z.re - 0 * z.im, c * z.im + 0 * z.re] = c • ![z.re, z.im]) }.toAddHom\n      ((fun c => ↑(c 0) + c 1 • I) c) =\n    c\n[PROOFSTEP]\next i\n[GOAL]\ncase h\nR : Type u_1\nS : Type u_2\nc : Fin 2 → ℝ\ni : Fin 2\n⊢ AddHom.toFun\n      {\n          toAddHom :=\n            { toFun := fun z => ![z.re, z.im],\n              map_add' := (_ : ∀ (z z' : ℂ), ![z.re + z'.re, z.im + z'.im] = ![z.re, z.im] + ![z'.re, z'.im]) },\n          map_smul' :=\n            (_ : ∀ (c : ℝ) (z : ℂ), ![c * z.re - 0 * z.im, c * z.im + 0 * z.re] = c • ![z.re, z.im]) }.toAddHom\n      ((fun c => ↑(c 0) + c 1 • I) c) i =\n    c i\n[PROOFSTEP]\nfin_cases i\n[GOAL]\ncase h.head\nR : Type u_1\nS : Type u_2\nc : Fin 2 → ℝ\n⊢ AddHom.toFun\n      {\n          toAddHom :=\n            { toFun := fun z => ![z.re, z.im],\n              map_add' := (_ : ∀ (z z' : ℂ), ![z.re + z'.re, z.im + z'.im] = ![z.re, z.im] + ![z'.re, z'.im]) },\n          map_smul' :=\n            (_ : ∀ (c : ℝ) (z : ℂ), ![c * z.re - 0 * z.im, c * z.im + 0 * z.re] = c • ![z.re, z.im]) }.toAddHom\n      ((fun c => ↑(c 0) + c 1 • I) c) { val := 0, isLt := (_ : 0 < 2) } =\n    c { val := 0, isLt := (_ : 0 < 2) }\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.tail.head\nR : Type u_1\nS : Type u_2\nc : Fin 2 → ℝ\n⊢ AddHom.toFun\n      {\n          toAddHom :=\n            { toFun := fun z => ![z.re, z.im],\n              map_add' := (_ : ∀ (z z' : ℂ), ![z.re + z'.re, z.im + z'.im] = ![z.re, z.im] + ![z'.re, z'.im]) },\n          map_smul' :=\n            (_ : ∀ (c : ℝ) (z : ℂ), ![c * z.re - 0 * z.im, c * z.im + 0 * z.re] = c • ![z.re, z.im]) }.toAddHom\n      ((fun c => ↑(c 0) + c 1 • I) c) { val := 1, isLt := (_ : (fun a => a < 2) 1) } =\n    c { val := 1, isLt := (_ : (fun a => a < 2) 1) }\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\nS : Type u_2\ni j : Fin 2\n⊢ ↑(↑basisOneI.repr (Matrix.vecCons 1 ![I] i)) j = ↑(Finsupp.single i 1) j\n[PROOFSTEP]\nfin_cases i\n[GOAL]\ncase head\nR : Type u_1\nS : Type u_2\nj : Fin 2\n⊢ ↑(↑basisOneI.repr (Matrix.vecCons 1 ![I] { val := 0, isLt := (_ : 0 < 2) })) j =\n    ↑(Finsupp.single { val := 0, isLt := (_ : 0 < 2) } 1) j\n[PROOFSTEP]\nfin_cases j\n[GOAL]\ncase tail.head\nR : Type u_1\nS : Type u_2\nj : Fin 2\n⊢ ↑(↑basisOneI.repr (Matrix.vecCons 1 ![I] { val := 1, isLt := (_ : (fun a => a < 2) 1) })) j =\n    ↑(Finsupp.single { val := 1, isLt := (_ : (fun a => a < 2) 1) } 1) j\n[PROOFSTEP]\nfin_cases j\n[GOAL]\ncase head.head\nR : Type u_1\nS : Type u_2\n⊢ ↑(↑basisOneI.repr (Matrix.vecCons 1 ![I] { val := 0, isLt := (_ : 0 < 2) })) { val := 0, isLt := (_ : 0 < 2) } =\n    ↑(Finsupp.single { val := 0, isLt := (_ : 0 < 2) } 1) { val := 0, isLt := (_ : 0 < 2) }\n[PROOFSTEP]\nsimp [coe_basisOneI_repr, Finsupp.single_eq_of_ne, Matrix.cons_val_zero, Matrix.cons_val_one, Matrix.head_cons,\n  Fin.one_eq_zero_iff, Ne.def, not_false_iff, I_re, Nat.succ_succ_ne_one, one_im, I_im, one_re, Finsupp.single_eq_same,\n  Fin.zero_eq_one_iff]\n[GOAL]\ncase head.tail.head\nR : Type u_1\nS : Type u_2\n⊢ ↑(↑basisOneI.repr (Matrix.vecCons 1 ![I] { val := 0, isLt := (_ : 0 < 2) }))\n      { val := 1, isLt := (_ : (fun a => a < 2) 1) } =\n    ↑(Finsupp.single { val := 0, isLt := (_ : 0 < 2) } 1) { val := 1, isLt := (_ : (fun a => a < 2) 1) }\n[PROOFSTEP]\nsimp [coe_basisOneI_repr, Finsupp.single_eq_of_ne, Matrix.cons_val_zero, Matrix.cons_val_one, Matrix.head_cons,\n  Fin.one_eq_zero_iff, Ne.def, not_false_iff, I_re, Nat.succ_succ_ne_one, one_im, I_im, one_re, Finsupp.single_eq_same,\n  Fin.zero_eq_one_iff]\n[GOAL]\ncase tail.head.head\nR : Type u_1\nS : Type u_2\n⊢ ↑(↑basisOneI.repr (Matrix.vecCons 1 ![I] { val := 1, isLt := (_ : (fun a => a < 2) 1) }))\n      { val := 0, isLt := (_ : 0 < 2) } =\n    ↑(Finsupp.single { val := 1, isLt := (_ : (fun a => a < 2) 1) } 1) { val := 0, isLt := (_ : 0 < 2) }\n[PROOFSTEP]\nsimp [coe_basisOneI_repr, Finsupp.single_eq_of_ne, Matrix.cons_val_zero, Matrix.cons_val_one, Matrix.head_cons,\n  Fin.one_eq_zero_iff, Ne.def, not_false_iff, I_re, Nat.succ_succ_ne_one, one_im, I_im, one_re, Finsupp.single_eq_same,\n  Fin.zero_eq_one_iff]\n[GOAL]\ncase tail.head.tail.head\nR : Type u_1\nS : Type u_2\n⊢ ↑(↑basisOneI.repr (Matrix.vecCons 1 ![I] { val := 1, isLt := (_ : (fun a => a < 2) 1) }))\n      { val := 1, isLt := (_ : (fun a => a < 2) 1) } =\n    ↑(Finsupp.single { val := 1, isLt := (_ : (fun a => a < 2) 1) } 1) { val := 1, isLt := (_ : (fun a => a < 2) 1) }\n[PROOFSTEP]\nsimp [coe_basisOneI_repr, Finsupp.single_eq_of_ne, Matrix.cons_val_zero, Matrix.cons_val_one, Matrix.head_cons,\n  Fin.one_eq_zero_iff, Ne.def, not_false_iff, I_re, Nat.succ_succ_ne_one, one_im, I_im, one_re, Finsupp.single_eq_same,\n  Fin.zero_eq_one_iff]\n[GOAL]\nR : Type u_1\nS : Type u_2\n⊢ finrank ℝ ℂ = 2\n[PROOFSTEP]\nrw [finrank_eq_card_basis basisOneI, Fintype.card_fin]\n[GOAL]\nR : Type u_1\nS : Type u_2\n⊢ Module.rank ℝ ℂ = 2\n[PROOFSTEP]\nsimp [← finrank_eq_rank, finrank_real_complex]\n[GOAL]\nR : Type u_1\nS : Type u_2\n⊢ Cardinal.lift (Module.rank ℝ ℂ) = 2\n[PROOFSTEP]\nrw [← finrank_eq_rank, finrank_real_complex, Cardinal.lift_natCast, Nat.cast_ofNat]\n[GOAL]\nE : Type u_1\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℂ E\n⊢ Cardinal.lift (Module.rank ℝ E) = Cardinal.lift (2 * Module.rank ℂ E)\n[PROOFSTEP]\nrw [← lift_rank_mul_lift_rank ℝ ℂ E, Complex.rank_real_complex']\n[GOAL]\nE : Type u_1\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℂ E\n⊢ 2 * Cardinal.lift (Module.rank ℂ E) = Cardinal.lift (2 * Module.rank ℂ E)\n[PROOFSTEP]\nsimp only [Cardinal.lift_id']\n[GOAL]\nE : Type u_1\ninst✝¹ : AddCommGroup E\ninst✝ : Module ℂ E\n⊢ FiniteDimensional.finrank ℝ E = 2 * FiniteDimensional.finrank ℂ E\n[PROOFSTEP]\nrw [← FiniteDimensional.finrank_mul_finrank ℝ ℂ E, Complex.finrank_real_complex]\n[GOAL]\nE : Type u_1\ninst✝³ : AddCommGroup E\ninst✝² : Star E\ninst✝¹ : Module ℂ E\ninst✝ : StarModule ℂ E\nr : ℝ\na : E\n⊢ star (r • a) = star r • star a\n[PROOFSTEP]\nrw [← smul_one_smul ℂ r a, star_smul, star_smul, star_one, smul_one_smul]\n[GOAL]\n⊢ ∀ (r : ℝ) (x : ℂ),\n    AddHom.toFun { toFun := fun x => x.re, map_add' := add_re } (r • x) =\n      ↑(RingHom.id ℝ) r • AddHom.toFun { toFun := fun x => x.re, map_add' := add_re } x\n[PROOFSTEP]\nsimp\n[GOAL]\n⊢ ∀ (r : ℝ) (x : ℂ),\n    AddHom.toFun { toFun := fun x => x.im, map_add' := add_im } (r • x) =\n      ↑(RingHom.id ℝ) r • AddHom.toFun { toFun := fun x => x.im, map_add' := add_im } x\n[PROOFSTEP]\nsimp\n[GOAL]\n⊢ ↑(LinearMap.toMatrix basisOneI basisOneI) (AlgEquiv.toLinearMap conjAe) = ↑Matrix.of ![![1, 0], ![0, -1]]\n[PROOFSTEP]\next i j\n[GOAL]\ncase a.h\ni j : Fin 2\n⊢ ↑(LinearMap.toMatrix basisOneI basisOneI) (AlgEquiv.toLinearMap conjAe) i j = ↑Matrix.of ![![1, 0], ![0, -1]] i j\n[PROOFSTEP]\nfin_cases i\n[GOAL]\ncase a.h.head\nj : Fin 2\n⊢ ↑(LinearMap.toMatrix basisOneI basisOneI) (AlgEquiv.toLinearMap conjAe) { val := 0, isLt := (_ : 0 < 2) } j =\n    ↑Matrix.of ![![1, 0], ![0, -1]] { val := 0, isLt := (_ : 0 < 2) } j\n[PROOFSTEP]\nfin_cases j\n[GOAL]\ncase a.h.tail.head\nj : Fin 2\n⊢ ↑(LinearMap.toMatrix basisOneI basisOneI) (AlgEquiv.toLinearMap conjAe) { val := 1, isLt := (_ : (fun a => a < 2) 1) }\n      j =\n    ↑Matrix.of ![![1, 0], ![0, -1]] { val := 1, isLt := (_ : (fun a => a < 2) 1) } j\n[PROOFSTEP]\nfin_cases j\n[GOAL]\ncase a.h.head.head\n⊢ ↑(LinearMap.toMatrix basisOneI basisOneI) (AlgEquiv.toLinearMap conjAe) { val := 0, isLt := (_ : 0 < 2) }\n      { val := 0, isLt := (_ : 0 < 2) } =\n    ↑Matrix.of ![![1, 0], ![0, -1]] { val := 0, isLt := (_ : 0 < 2) } { val := 0, isLt := (_ : 0 < 2) }\n[PROOFSTEP]\nsimp [LinearMap.toMatrix_apply]\n[GOAL]\ncase a.h.head.tail.head\n⊢ ↑(LinearMap.toMatrix basisOneI basisOneI) (AlgEquiv.toLinearMap conjAe) { val := 0, isLt := (_ : 0 < 2) }\n      { val := 1, isLt := (_ : (fun a => a < 2) 1) } =\n    ↑Matrix.of ![![1, 0], ![0, -1]] { val := 0, isLt := (_ : 0 < 2) } { val := 1, isLt := (_ : (fun a => a < 2) 1) }\n[PROOFSTEP]\nsimp [LinearMap.toMatrix_apply]\n[GOAL]\ncase a.h.tail.head.head\n⊢ ↑(LinearMap.toMatrix basisOneI basisOneI) (AlgEquiv.toLinearMap conjAe) { val := 1, isLt := (_ : (fun a => a < 2) 1) }\n      { val := 0, isLt := (_ : 0 < 2) } =\n    ↑Matrix.of ![![1, 0], ![0, -1]] { val := 1, isLt := (_ : (fun a => a < 2) 1) } { val := 0, isLt := (_ : 0 < 2) }\n[PROOFSTEP]\nsimp [LinearMap.toMatrix_apply]\n[GOAL]\ncase a.h.tail.head.tail.head\n⊢ ↑(LinearMap.toMatrix basisOneI basisOneI) (AlgEquiv.toLinearMap conjAe) { val := 1, isLt := (_ : (fun a => a < 2) 1) }\n      { val := 1, isLt := (_ : (fun a => a < 2) 1) } =\n    ↑Matrix.of ![![1, 0], ![0, -1]] { val := 1, isLt := (_ : (fun a => a < 2) 1) }\n      { val := 1, isLt := (_ : (fun a => a < 2) 1) }\n[PROOFSTEP]\nsimp [LinearMap.toMatrix_apply]\n[GOAL]\nf : ℂ →ₐ[ℝ] ℂ\n⊢ f = AlgHom.id ℝ ℂ ∨ f = ↑conjAe\n[PROOFSTEP]\nrefine' (eq_or_eq_neg_of_sq_eq_sq (f I) I <| by rw [← map_pow, I_sq, map_neg, map_one]).imp _ _\n[GOAL]\nf : ℂ →ₐ[ℝ] ℂ\n⊢ ↑f I ^ 2 = I ^ 2\n[PROOFSTEP]\nrw [← map_pow, I_sq, map_neg, map_one]\n[GOAL]\ncase refine'_1\nf : ℂ →ₐ[ℝ] ℂ\n⊢ ↑f I = I → f = AlgHom.id ℝ ℂ\n[PROOFSTEP]\nrefine' fun h => algHom_ext _\n[GOAL]\ncase refine'_2\nf : ℂ →ₐ[ℝ] ℂ\n⊢ ↑f I = -I → f = ↑conjAe\n[PROOFSTEP]\nrefine' fun h => algHom_ext _\n[GOAL]\ncase refine'_1\nf : ℂ →ₐ[ℝ] ℂ\nh : ↑f I = I\n⊢ ↑f I = ↑(AlgHom.id ℝ ℂ) I\ncase refine'_2 f : ℂ →ₐ[ℝ] ℂ h : ↑f I = -I ⊢ ↑f I = ↑↑conjAe I\n[PROOFSTEP]\nexacts [h, conj_I.symm ▸ h]\n[GOAL]\nsrc✝ : ℂ ≃ ℝ × ℝ := equivRealProd\n⊢ ∀ (x y : ℂ),\n    Equiv.toFun\n        { toFun := src✝.toFun, invFun := src✝.invFun, left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),\n          right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }\n        (x + y) =\n      Equiv.toFun\n          { toFun := src✝.toFun, invFun := src✝.invFun, left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),\n            right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }\n          x +\n        Equiv.toFun\n          { toFun := src✝.toFun, invFun := src✝.invFun, left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),\n            right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }\n          y\n[PROOFSTEP]\nsimp\n[GOAL]\nsrc✝ : ℂ ≃+ ℝ × ℝ := equivRealProdAddHom\nr : ℝ\nc : ℂ\n⊢ AddHom.toFun\n      { toFun := src✝.toFun,\n        map_add' :=\n          (_ :\n            ∀ (x y : ℂ), Equiv.toFun src✝.toEquiv (x + y) = Equiv.toFun src✝.toEquiv x + Equiv.toFun src✝.toEquiv y) }\n      (r • c) =\n    ↑(RingHom.id ℝ) r •\n      AddHom.toFun\n        { toFun := src✝.toFun,\n          map_add' :=\n            (_ :\n              ∀ (x y : ℂ), Equiv.toFun src✝.toEquiv (x + y) = Equiv.toFun src✝.toEquiv x + Equiv.toFun src✝.toEquiv y) }\n        c\n[PROOFSTEP]\nsimp [equivRealProdAddHom, (Prod.smul_def), smul_eq_mul]\n[GOAL]\nA : Type u_1\ninst✝¹ : Ring A\ninst✝ : Algebra ℝ A\nI' : A\nhf : I' * I' = -1\n⊢ ↑(algebraMap ℝ A) 1 + 0 • I' = 1\n[PROOFSTEP]\nrw [RingHom.map_one, zero_smul, add_zero]\n[GOAL]\nA : Type u_1\ninst✝¹ : Ring A\ninst✝ : Algebra ℝ A\nI' : A\nhf : I' * I' = -1\nx✝¹ x✝ : ℂ\nx₁ y₁ x₂ y₂ : ℝ\n⊢ ↑(algebraMap ℝ A) (x₁ * x₂ - y₁ * y₂) + (x₁ * y₂ + y₁ * x₂) • I' =\n    (↑(algebraMap ℝ A) x₁ + y₁ • I') * (↑(algebraMap ℝ A) x₂ + y₂ • I')\n[PROOFSTEP]\nrw [add_mul, mul_add, mul_add, add_comm _ (y₁ • I' * y₂ • I'), add_add_add_comm]\n[GOAL]\nA : Type u_1\ninst✝¹ : Ring A\ninst✝ : Algebra ℝ A\nI' : A\nhf : I' * I' = -1\nx✝¹ x✝ : ℂ\nx₁ y₁ x₂ y₂ : ℝ\n⊢ ↑(algebraMap ℝ A) (x₁ * x₂ - y₁ * y₂) + (x₁ * y₂ + y₁ * x₂) • I' =\n    ↑(algebraMap ℝ A) x₁ * ↑(algebraMap ℝ A) x₂ + y₁ • I' * y₂ • I' +\n      (↑(algebraMap ℝ A) x₁ * y₂ • I' + y₁ • I' * ↑(algebraMap ℝ A) x₂)\n[PROOFSTEP]\ncongr 1\n  -- equate \"real\" and \"imaginary\" parts\n[GOAL]\ncase e_a\nA : Type u_1\ninst✝¹ : Ring A\ninst✝ : Algebra ℝ A\nI' : A\nhf : I' * I' = -1\nx✝¹ x✝ : ℂ\nx₁ y₁ x₂ y₂ : ℝ\n⊢ ↑(algebraMap ℝ A) (x₁ * x₂ - y₁ * y₂) = ↑(algebraMap ℝ A) x₁ * ↑(algebraMap ℝ A) x₂ + y₁ • I' * y₂ • I'\n[PROOFSTEP]\nlet inst : SMulCommClass ℝ A A := by\n  infer_instance\n    -- porting note: added\n[GOAL]\nA : Type u_1\ninst✝¹ : Ring A\ninst✝ : Algebra ℝ A\nI' : A\nhf : I' * I' = -1\nx✝¹ x✝ : ℂ\nx₁ y₁ x₂ y₂ : ℝ\n⊢ SMulCommClass ℝ A A\n[PROOFSTEP]\ninfer_instance\n  -- porting note: added\n[GOAL]\ncase e_a\nA : Type u_1\ninst✝¹ : Ring A\ninst✝ : Algebra ℝ A\nI' : A\nhf : I' * I' = -1\nx✝¹ x✝ : ℂ\nx₁ y₁ x₂ y₂ : ℝ\ninst : SMulCommClass ℝ A A := inferInstance\n⊢ ↑(algebraMap ℝ A) (x₁ * x₂ - y₁ * y₂) = ↑(algebraMap ℝ A) x₁ * ↑(algebraMap ℝ A) x₂ + y₁ • I' * y₂ • I'\n[PROOFSTEP]\nrw [smul_mul_smul, hf, smul_neg, ← Algebra.algebraMap_eq_smul_one, ← sub_eq_add_neg, ← RingHom.map_mul, ←\n  RingHom.map_sub]\n[GOAL]\ncase e_a\nA : Type u_1\ninst✝¹ : Ring A\ninst✝ : Algebra ℝ A\nI' : A\nhf : I' * I' = -1\nx✝¹ x✝ : ℂ\nx₁ y₁ x₂ y₂ : ℝ\n⊢ (x₁ * y₂ + y₁ * x₂) • I' = ↑(algebraMap ℝ A) x₁ * y₂ • I' + y₁ • I' * ↑(algebraMap ℝ A) x₂\n[PROOFSTEP]\nrw [Algebra.smul_def, Algebra.smul_def, Algebra.smul_def, ← Algebra.right_comm _ x₂, ← mul_assoc, ← add_mul, ←\n  RingHom.map_mul, ← RingHom.map_mul, ← RingHom.map_add]\n[GOAL]\nA : Type u_1\ninst✝¹ : Ring A\ninst✝ : Algebra ℝ A\nI' : A\nhI' : I' * I' = -1\n⊢ ↑(liftAux I' hI') I = I'\n[PROOFSTEP]\nsimp\n[GOAL]\nA : Type u_1\ninst✝¹ : Ring A\ninst✝ : Algebra ℝ A\nF : ℂ →ₐ[ℝ] A\n⊢ ↑F I * ↑F I = -1\n[PROOFSTEP]\nrw [← F.map_mul, I_mul_I, AlgHom.map_neg, AlgHom.map_one]\n[GOAL]\nA : Type u_1\ninst✝³ : AddCommGroup A\ninst✝² : Module ℂ A\ninst✝¹ : StarAddMonoid A\ninst✝ : StarModule ℂ A\na : { x // x ∈ skewAdjoint A }\n⊢ -I • ↑a ∈ selfAdjoint A\n[PROOFSTEP]\nsimp only [neg_smul, neg_mem_iff, selfAdjoint.mem_iff, star_smul, star_def, conj_I, star_val_eq, smul_neg, neg_neg]\n[GOAL]\nA : Type u_1\ninst✝³ : AddCommGroup A\ninst✝² : Module ℂ A\ninst✝¹ : StarAddMonoid A\ninst✝ : StarModule ℂ A\na b : { x // x ∈ skewAdjoint A }\n⊢ (fun a => { val := -I • ↑a, property := (_ : -I • ↑a ∈ selfAdjoint A) }) (a + b) =\n    (fun a => { val := -I • ↑a, property := (_ : -I • ↑a ∈ selfAdjoint A) }) a +\n      (fun a => { val := -I • ↑a, property := (_ : -I • ↑a ∈ selfAdjoint A) }) b\n[PROOFSTEP]\next\n[GOAL]\ncase a\nA : Type u_1\ninst✝³ : AddCommGroup A\ninst✝² : Module ℂ A\ninst✝¹ : StarAddMonoid A\ninst✝ : StarModule ℂ A\na b : { x // x ∈ skewAdjoint A }\n⊢ ↑((fun a => { val := -I • ↑a, property := (_ : -I • ↑a ∈ selfAdjoint A) }) (a + b)) =\n    ↑((fun a => { val := -I • ↑a, property := (_ : -I • ↑a ∈ selfAdjoint A) }) a +\n        (fun a => { val := -I • ↑a, property := (_ : -I • ↑a ∈ selfAdjoint A) }) b)\n[PROOFSTEP]\nsimp only [AddSubgroup.coe_add, smul_add, AddMemClass.mk_add_mk]\n[GOAL]\nA : Type u_1\ninst✝³ : AddCommGroup A\ninst✝² : Module ℂ A\ninst✝¹ : StarAddMonoid A\ninst✝ : StarModule ℂ A\na : ℝ\nb : { x // x ∈ skewAdjoint A }\n⊢ AddHom.toFun\n      { toFun := fun a => { val := -I • ↑a, property := (_ : -I • ↑a ∈ selfAdjoint A) },\n        map_add' :=\n          (_ :\n            ∀ (a b : { x // x ∈ skewAdjoint A }),\n              (fun a => { val := -I • ↑a, property := (_ : -I • ↑a ∈ selfAdjoint A) }) (a + b) =\n                (fun a => { val := -I • ↑a, property := (_ : -I • ↑a ∈ selfAdjoint A) }) a +\n                  (fun a => { val := -I • ↑a, property := (_ : -I • ↑a ∈ selfAdjoint A) }) b) }\n      (a • b) =\n    ↑(RingHom.id ℝ) a •\n      AddHom.toFun\n        { toFun := fun a => { val := -I • ↑a, property := (_ : -I • ↑a ∈ selfAdjoint A) },\n          map_add' :=\n            (_ :\n              ∀ (a b : { x // x ∈ skewAdjoint A }),\n                (fun a => { val := -I • ↑a, property := (_ : -I • ↑a ∈ selfAdjoint A) }) (a + b) =\n                  (fun a => { val := -I • ↑a, property := (_ : -I • ↑a ∈ selfAdjoint A) }) a +\n                    (fun a => { val := -I • ↑a, property := (_ : -I • ↑a ∈ selfAdjoint A) }) b) }\n        b\n[PROOFSTEP]\next\n[GOAL]\ncase a\nA : Type u_1\ninst✝³ : AddCommGroup A\ninst✝² : Module ℂ A\ninst✝¹ : StarAddMonoid A\ninst✝ : StarModule ℂ A\na : ℝ\nb : { x // x ∈ skewAdjoint A }\n⊢ ↑(AddHom.toFun\n        { toFun := fun a => { val := -I • ↑a, property := (_ : -I • ↑a ∈ selfAdjoint A) },\n          map_add' :=\n            (_ :\n              ∀ (a b : { x // x ∈ skewAdjoint A }),\n                (fun a => { val := -I • ↑a, property := (_ : -I • ↑a ∈ selfAdjoint A) }) (a + b) =\n                  (fun a => { val := -I • ↑a, property := (_ : -I • ↑a ∈ selfAdjoint A) }) a +\n                    (fun a => { val := -I • ↑a, property := (_ : -I • ↑a ∈ selfAdjoint A) }) b) }\n        (a • b)) =\n    ↑(↑(RingHom.id ℝ) a •\n        AddHom.toFun\n          { toFun := fun a => { val := -I • ↑a, property := (_ : -I • ↑a ∈ selfAdjoint A) },\n            map_add' :=\n              (_ :\n                ∀ (a b : { x // x ∈ skewAdjoint A }),\n                  (fun a => { val := -I • ↑a, property := (_ : -I • ↑a ∈ selfAdjoint A) }) (a + b) =\n                    (fun a => { val := -I • ↑a, property := (_ : -I • ↑a ∈ selfAdjoint A) }) a +\n                      (fun a => { val := -I • ↑a, property := (_ : -I • ↑a ∈ selfAdjoint A) }) b) }\n          b)\n[PROOFSTEP]\nsimp only [neg_smul, skewAdjoint.val_smul, AddSubgroup.coe_mk, RingHom.id_apply, selfAdjoint.val_smul, smul_neg,\n  neg_inj]\n[GOAL]\ncase a\nA : Type u_1\ninst✝³ : AddCommGroup A\ninst✝² : Module ℂ A\ninst✝¹ : StarAddMonoid A\ninst✝ : StarModule ℂ A\na : ℝ\nb : { x // x ∈ skewAdjoint A }\n⊢ I • a • ↑b = a • I • ↑b\n[PROOFSTEP]\nrw [smul_comm]\n[GOAL]\nA : Type u_1\ninst✝³ : AddCommGroup A\ninst✝² : Module ℂ A\ninst✝¹ : StarAddMonoid A\ninst✝ : StarModule ℂ A\na : { x // x ∈ skewAdjoint A }\n⊢ I • ↑(↑negISMul a) = ↑a\n[PROOFSTEP]\nsimp only [smul_smul, skewAdjoint.negISMul_apply_coe, neg_smul, smul_neg, I_mul_I, one_smul, neg_neg]\n[GOAL]\nA : Type u_1\ninst✝³ : AddCommGroup A\ninst✝² : Module ℂ A\ninst✝¹ : StarAddMonoid A\ninst✝ : StarModule ℂ A\na : A\n⊢ ↑(↑ℜ a) = 2⁻¹ • (a + star a)\n[PROOFSTEP]\nunfold realPart\n[GOAL]\nA : Type u_1\ninst✝³ : AddCommGroup A\ninst✝² : Module ℂ A\ninst✝¹ : StarAddMonoid A\ninst✝ : StarModule ℂ A\na : A\n⊢ ↑(↑(selfAdjointPart ℝ) a) = 2⁻¹ • (a + star a)\n[PROOFSTEP]\nsimp only [selfAdjointPart_apply_coe, invOf_eq_inv]\n[GOAL]\nA : Type u_1\ninst✝³ : AddCommGroup A\ninst✝² : Module ℂ A\ninst✝¹ : StarAddMonoid A\ninst✝ : StarModule ℂ A\na : A\n⊢ ↑(↑ℑ a) = -I • 2⁻¹ • (a - star a)\n[PROOFSTEP]\nunfold imaginaryPart\n[GOAL]\nA : Type u_1\ninst✝³ : AddCommGroup A\ninst✝² : Module ℂ A\ninst✝¹ : StarAddMonoid A\ninst✝ : StarModule ℂ A\na : A\n⊢ ↑(↑(LinearMap.comp skewAdjoint.negISMul (skewAdjointPart ℝ)) a) = -I • 2⁻¹ • (a - star a)\n[PROOFSTEP]\nsimp only [LinearMap.coe_comp, Function.comp_apply, skewAdjoint.negISMul_apply_coe, skewAdjointPart_apply_coe,\n  invOf_eq_inv, neg_smul]\n[GOAL]\nA : Type u_1\ninst✝³ : AddCommGroup A\ninst✝² : Module ℂ A\ninst✝¹ : StarAddMonoid A\ninst✝ : StarModule ℂ A\na : A\n⊢ ↑(↑ℜ a) + I • ↑(↑ℑ a) = a\n[PROOFSTEP]\nsimpa only [smul_smul, realPart_apply_coe, imaginaryPart_apply_coe, neg_smul, I_mul_I, one_smul, neg_sub,\n  add_add_sub_cancel, smul_sub, smul_add, neg_sub_neg, invOf_eq_inv] using invOf_two_smul_add_invOf_two_smul ℝ a\n[GOAL]\nA : Type u_1\ninst✝³ : AddCommGroup A\ninst✝² : Module ℂ A\ninst✝¹ : StarAddMonoid A\ninst✝ : StarModule ℂ A\na : A\n⊢ ↑ℜ (I • a) = -↑ℑ a\n[PROOFSTEP]\next\n  -- Porting note: was\n    -- simp [smul_comm I, smul_sub, sub_eq_add_neg, add_comm]\n[GOAL]\ncase a\nA : Type u_1\ninst✝³ : AddCommGroup A\ninst✝² : Module ℂ A\ninst✝¹ : StarAddMonoid A\ninst✝ : StarModule ℂ A\na : A\n⊢ ↑(↑ℜ (I • a)) = ↑(-↑ℑ a)\n[PROOFSTEP]\nrw [realPart_apply_coe, AddSubgroupClass.coe_neg, imaginaryPart_apply_coe, neg_smul, neg_neg, smul_comm I, star_smul,\n  star_def, conj_I, smul_sub, neg_smul, sub_eq_add_neg]\n[GOAL]\nA : Type u_1\ninst✝³ : AddCommGroup A\ninst✝² : Module ℂ A\ninst✝¹ : StarAddMonoid A\ninst✝ : StarModule ℂ A\na : A\n⊢ ↑ℑ (I • a) = ↑ℜ a\n[PROOFSTEP]\next\n  -- Porting note: was\n    -- simp [smul_comm I, smul_smul I]\n[GOAL]\ncase a\nA : Type u_1\ninst✝³ : AddCommGroup A\ninst✝² : Module ℂ A\ninst✝¹ : StarAddMonoid A\ninst✝ : StarModule ℂ A\na : A\n⊢ ↑(↑ℑ (I • a)) = ↑(↑ℜ a)\n[PROOFSTEP]\nrw [realPart_apply_coe, imaginaryPart_apply_coe, smul_comm]\n[GOAL]\ncase a\nA : Type u_1\ninst✝³ : AddCommGroup A\ninst✝² : Module ℂ A\ninst✝¹ : StarAddMonoid A\ninst✝ : StarModule ℂ A\na : A\n⊢ 2⁻¹ • -I • (I • a - star (I • a)) = 2⁻¹ • (a + star a)\n[PROOFSTEP]\nsimp [← smul_assoc]\n[GOAL]\nA : Type u_1\ninst✝³ : AddCommGroup A\ninst✝² : Module ℂ A\ninst✝¹ : StarAddMonoid A\ninst✝ : StarModule ℂ A\nz : ℂ\na : A\n⊢ ↑ℜ (z • a) = z.re • ↑ℜ a - z.im • ↑ℑ a\n[PROOFSTEP]\nconv_lhs => rw [← re_add_im z]\n[GOAL]\nA : Type u_1\ninst✝³ : AddCommGroup A\ninst✝² : Module ℂ A\ninst✝¹ : StarAddMonoid A\ninst✝ : StarModule ℂ A\nz : ℂ\na : A\n| ↑ℜ (z • a)\n[PROOFSTEP]\nrw [← re_add_im z]\n[GOAL]\nA : Type u_1\ninst✝³ : AddCommGroup A\ninst✝² : Module ℂ A\ninst✝¹ : StarAddMonoid A\ninst✝ : StarModule ℂ A\nz : ℂ\na : A\n| ↑ℜ (z • a)\n[PROOFSTEP]\nrw [← re_add_im z]\n[GOAL]\nA : Type u_1\ninst✝³ : AddCommGroup A\ninst✝² : Module ℂ A\ninst✝¹ : StarAddMonoid A\ninst✝ : StarModule ℂ A\nz : ℂ\na : A\n| ↑ℜ (z • a)\n[PROOFSTEP]\nrw [← re_add_im z]\n[GOAL]\nA : Type u_1\ninst✝³ : AddCommGroup A\ninst✝² : Module ℂ A\ninst✝¹ : StarAddMonoid A\ninst✝ : StarModule ℂ A\nz : ℂ\na : A\n⊢ ↑ℜ ((↑z.re + ↑z.im * I) • a) = z.re • ↑ℜ a - z.im • ↑ℑ a\n[PROOFSTEP]\nsimp [-re_add_im, add_smul, ← smul_smul, sub_eq_add_neg]\n[GOAL]\nA : Type u_1\ninst✝³ : AddCommGroup A\ninst✝² : Module ℂ A\ninst✝¹ : StarAddMonoid A\ninst✝ : StarModule ℂ A\nz : ℂ\na : A\n⊢ ↑ℑ (z • a) = z.re • ↑ℑ a + z.im • ↑ℜ a\n[PROOFSTEP]\nconv_lhs => rw [← re_add_im z]\n[GOAL]\nA : Type u_1\ninst✝³ : AddCommGroup A\ninst✝² : Module ℂ A\ninst✝¹ : StarAddMonoid A\ninst✝ : StarModule ℂ A\nz : ℂ\na : A\n| ↑ℑ (z • a)\n[PROOFSTEP]\nrw [← re_add_im z]\n[GOAL]\nA : Type u_1\ninst✝³ : AddCommGroup A\ninst✝² : Module ℂ A\ninst✝¹ : StarAddMonoid A\ninst✝ : StarModule ℂ A\nz : ℂ\na : A\n| ↑ℑ (z • a)\n[PROOFSTEP]\nrw [← re_add_im z]\n[GOAL]\nA : Type u_1\ninst✝³ : AddCommGroup A\ninst✝² : Module ℂ A\ninst✝¹ : StarAddMonoid A\ninst✝ : StarModule ℂ A\nz : ℂ\na : A\n| ↑ℑ (z • a)\n[PROOFSTEP]\nrw [← re_add_im z]\n[GOAL]\nA : Type u_1\ninst✝³ : AddCommGroup A\ninst✝² : Module ℂ A\ninst✝¹ : StarAddMonoid A\ninst✝ : StarModule ℂ A\nz : ℂ\na : A\n⊢ ↑ℑ ((↑z.re + ↑z.im * I) • a) = z.re • ↑ℑ a + z.im • ↑ℜ a\n[PROOFSTEP]\nsimp [-re_add_im, add_smul, ← smul_smul]\n", "meta": {"mathlib_filename": "Mathlib.Data.Complex.Module", "llama_tokens": 16395, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7956581000631541, "lm_q2_score": 0.6791787121629466, "lm_q1q2_score": 0.5403940437229099}}
{"text": "[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u v s : Set α\nx : α\nH : ∀ (y : α), y ∈ s → ∃ t, t ⊆ s ∧ x ∈ t ∧ y ∈ t ∧ IsPreconnected t\n⊢ IsPreconnected s\n[PROOFSTEP]\nrintro u v hu hv hs ⟨z, zs, zu⟩ ⟨y, ys, yv⟩\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u✝ v✝ s : Set α\nx : α\nH : ∀ (y : α), y ∈ s → ∃ t, t ⊆ s ∧ x ∈ t ∧ y ∈ t ∧ IsPreconnected t\nu v : Set α\nhu : IsOpen u\nhv : IsOpen v\nhs : s ⊆ u ∪ v\nz : α\nzs : z ∈ s\nzu : z ∈ u\ny : α\nys : y ∈ s\nyv : y ∈ v\n⊢ Set.Nonempty (s ∩ (u ∩ v))\n[PROOFSTEP]\nhave xs : x ∈ s := by\n  rcases H y ys with ⟨t, ts, xt, -, -⟩\n  exact ts xt\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u✝ v✝ s : Set α\nx : α\nH : ∀ (y : α), y ∈ s → ∃ t, t ⊆ s ∧ x ∈ t ∧ y ∈ t ∧ IsPreconnected t\nu v : Set α\nhu : IsOpen u\nhv : IsOpen v\nhs : s ⊆ u ∪ v\nz : α\nzs : z ∈ s\nzu : z ∈ u\ny : α\nys : y ∈ s\nyv : y ∈ v\n⊢ x ∈ s\n[PROOFSTEP]\nrcases H y ys with ⟨t, ts, xt, -, -⟩\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t✝ u✝ v✝ s : Set α\nx : α\nH : ∀ (y : α), y ∈ s → ∃ t, t ⊆ s ∧ x ∈ t ∧ y ∈ t ∧ IsPreconnected t\nu v : Set α\nhu : IsOpen u\nhv : IsOpen v\nhs : s ⊆ u ∪ v\nz : α\nzs : z ∈ s\nzu : z ∈ u\ny : α\nys : y ∈ s\nyv : y ∈ v\nt : Set α\nts : t ⊆ s\nxt : x ∈ t\n⊢ x ∈ s\n[PROOFSTEP]\nexact ts xt\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u✝ v✝ s : Set α\nx : α\nH : ∀ (y : α), y ∈ s → ∃ t, t ⊆ s ∧ x ∈ t ∧ y ∈ t ∧ IsPreconnected t\nu v : Set α\nhu : IsOpen u\nhv : IsOpen v\nhs : s ⊆ u ∪ v\nz : α\nzs : z ∈ s\nzu : z ∈ u\ny : α\nys : y ∈ s\nyv : y ∈ v\nxs : x ∈ s\n⊢ Set.Nonempty (s ∩ (u ∩ v))\n[PROOFSTEP]\ncases hs xs\n[GOAL]\ncase intro.intro.intro.intro.inl\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u✝ v✝ s : Set α\nx : α\nH : ∀ (y : α), y ∈ s → ∃ t, t ⊆ s ∧ x ∈ t ∧ y ∈ t ∧ IsPreconnected t\nu v : Set α\nhu : IsOpen u\nhv : IsOpen v\nhs : s ⊆ u ∪ v\nz : α\nzs : z ∈ s\nzu : z ∈ u\ny : α\nys : y ∈ s\nyv : y ∈ v\nxs : x ∈ s\nh✝ : x ∈ u\n⊢ Set.Nonempty (s ∩ (u ∩ v))\ncase intro.intro.intro.intro.inr\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u✝ v✝ s : Set α\nx : α\nH : ∀ (y : α), y ∈ s → ∃ t, t ⊆ s ∧ x ∈ t ∧ y ∈ t ∧ IsPreconnected t\nu v : Set α\nhu : IsOpen u\nhv : IsOpen v\nhs : s ⊆ u ∪ v\nz : α\nzs : z ∈ s\nzu : z ∈ u\ny : α\nys : y ∈ s\nyv : y ∈ v\nxs : x ∈ s\nh✝ : x ∈ v\n⊢ Set.Nonempty (s ∩ (u ∩ v))\n[PROOFSTEP]\ncase inl xu =>\n  rcases H y ys with ⟨t, ts, xt, yt, ht⟩\n  have := ht u v hu hv (ts.trans hs) ⟨x, xt, xu⟩ ⟨y, yt, yv⟩\n  exact this.imp fun z hz => ⟨ts hz.1, hz.2⟩\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u✝ v✝ s : Set α\nx : α\nH : ∀ (y : α), y ∈ s → ∃ t, t ⊆ s ∧ x ∈ t ∧ y ∈ t ∧ IsPreconnected t\nu v : Set α\nhu : IsOpen u\nhv : IsOpen v\nhs : s ⊆ u ∪ v\nz : α\nzs : z ∈ s\nzu : z ∈ u\ny : α\nys : y ∈ s\nyv : y ∈ v\nxs : x ∈ s\nxu : x ∈ u\n⊢ Set.Nonempty (s ∩ (u ∩ v))\n[PROOFSTEP]\ncase inl xu =>\n  rcases H y ys with ⟨t, ts, xt, yt, ht⟩\n  have := ht u v hu hv (ts.trans hs) ⟨x, xt, xu⟩ ⟨y, yt, yv⟩\n  exact this.imp fun z hz => ⟨ts hz.1, hz.2⟩\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u✝ v✝ s : Set α\nx : α\nH : ∀ (y : α), y ∈ s → ∃ t, t ⊆ s ∧ x ∈ t ∧ y ∈ t ∧ IsPreconnected t\nu v : Set α\nhu : IsOpen u\nhv : IsOpen v\nhs : s ⊆ u ∪ v\nz : α\nzs : z ∈ s\nzu : z ∈ u\ny : α\nys : y ∈ s\nyv : y ∈ v\nxs : x ∈ s\nxu : x ∈ u\n⊢ Set.Nonempty (s ∩ (u ∩ v))\n[PROOFSTEP]\nrcases H y ys with ⟨t, ts, xt, yt, ht⟩\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t✝ u✝ v✝ s : Set α\nx : α\nH : ∀ (y : α), y ∈ s → ∃ t, t ⊆ s ∧ x ∈ t ∧ y ∈ t ∧ IsPreconnected t\nu v : Set α\nhu : IsOpen u\nhv : IsOpen v\nhs : s ⊆ u ∪ v\nz : α\nzs : z ∈ s\nzu : z ∈ u\ny : α\nys : y ∈ s\nyv : y ∈ v\nxs : x ∈ s\nxu : x ∈ u\nt : Set α\nts : t ⊆ s\nxt : x ∈ t\nyt : y ∈ t\nht : IsPreconnected t\n⊢ Set.Nonempty (s ∩ (u ∩ v))\n[PROOFSTEP]\nhave := ht u v hu hv (ts.trans hs) ⟨x, xt, xu⟩ ⟨y, yt, yv⟩\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t✝ u✝ v✝ s : Set α\nx : α\nH : ∀ (y : α), y ∈ s → ∃ t, t ⊆ s ∧ x ∈ t ∧ y ∈ t ∧ IsPreconnected t\nu v : Set α\nhu : IsOpen u\nhv : IsOpen v\nhs : s ⊆ u ∪ v\nz : α\nzs : z ∈ s\nzu : z ∈ u\ny : α\nys : y ∈ s\nyv : y ∈ v\nxs : x ∈ s\nxu : x ∈ u\nt : Set α\nts : t ⊆ s\nxt : x ∈ t\nyt : y ∈ t\nht : IsPreconnected t\nthis : Set.Nonempty (t ∩ (u ∩ v))\n⊢ Set.Nonempty (s ∩ (u ∩ v))\n[PROOFSTEP]\nexact this.imp fun z hz => ⟨ts hz.1, hz.2⟩\n[GOAL]\ncase intro.intro.intro.intro.inr\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u✝ v✝ s : Set α\nx : α\nH : ∀ (y : α), y ∈ s → ∃ t, t ⊆ s ∧ x ∈ t ∧ y ∈ t ∧ IsPreconnected t\nu v : Set α\nhu : IsOpen u\nhv : IsOpen v\nhs : s ⊆ u ∪ v\nz : α\nzs : z ∈ s\nzu : z ∈ u\ny : α\nys : y ∈ s\nyv : y ∈ v\nxs : x ∈ s\nh✝ : x ∈ v\n⊢ Set.Nonempty (s ∩ (u ∩ v))\n[PROOFSTEP]\ncase inr xv =>\n  rcases H z zs with ⟨t, ts, xt, zt, ht⟩\n  have := ht v u hv hu (ts.trans <| by rwa [union_comm]) ⟨x, xt, xv⟩ ⟨z, zt, zu⟩\n  exact this.imp fun _ h => ⟨ts h.1, h.2.2, h.2.1⟩\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u✝ v✝ s : Set α\nx : α\nH : ∀ (y : α), y ∈ s → ∃ t, t ⊆ s ∧ x ∈ t ∧ y ∈ t ∧ IsPreconnected t\nu v : Set α\nhu : IsOpen u\nhv : IsOpen v\nhs : s ⊆ u ∪ v\nz : α\nzs : z ∈ s\nzu : z ∈ u\ny : α\nys : y ∈ s\nyv : y ∈ v\nxs : x ∈ s\nxv : x ∈ v\n⊢ Set.Nonempty (s ∩ (u ∩ v))\n[PROOFSTEP]\ncase inr xv =>\n  rcases H z zs with ⟨t, ts, xt, zt, ht⟩\n  have := ht v u hv hu (ts.trans <| by rwa [union_comm]) ⟨x, xt, xv⟩ ⟨z, zt, zu⟩\n  exact this.imp fun _ h => ⟨ts h.1, h.2.2, h.2.1⟩\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u✝ v✝ s : Set α\nx : α\nH : ∀ (y : α), y ∈ s → ∃ t, t ⊆ s ∧ x ∈ t ∧ y ∈ t ∧ IsPreconnected t\nu v : Set α\nhu : IsOpen u\nhv : IsOpen v\nhs : s ⊆ u ∪ v\nz : α\nzs : z ∈ s\nzu : z ∈ u\ny : α\nys : y ∈ s\nyv : y ∈ v\nxs : x ∈ s\nxv : x ∈ v\n⊢ Set.Nonempty (s ∩ (u ∩ v))\n[PROOFSTEP]\nrcases H z zs with ⟨t, ts, xt, zt, ht⟩\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t✝ u✝ v✝ s : Set α\nx : α\nH : ∀ (y : α), y ∈ s → ∃ t, t ⊆ s ∧ x ∈ t ∧ y ∈ t ∧ IsPreconnected t\nu v : Set α\nhu : IsOpen u\nhv : IsOpen v\nhs : s ⊆ u ∪ v\nz : α\nzs : z ∈ s\nzu : z ∈ u\ny : α\nys : y ∈ s\nyv : y ∈ v\nxs : x ∈ s\nxv : x ∈ v\nt : Set α\nts : t ⊆ s\nxt : x ∈ t\nzt : z ∈ t\nht : IsPreconnected t\n⊢ Set.Nonempty (s ∩ (u ∩ v))\n[PROOFSTEP]\nhave := ht v u hv hu (ts.trans <| by rwa [union_comm]) ⟨x, xt, xv⟩ ⟨z, zt, zu⟩\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t✝ u✝ v✝ s : Set α\nx : α\nH : ∀ (y : α), y ∈ s → ∃ t, t ⊆ s ∧ x ∈ t ∧ y ∈ t ∧ IsPreconnected t\nu v : Set α\nhu : IsOpen u\nhv : IsOpen v\nhs : s ⊆ u ∪ v\nz : α\nzs : z ∈ s\nzu : z ∈ u\ny : α\nys : y ∈ s\nyv : y ∈ v\nxs : x ∈ s\nxv : x ∈ v\nt : Set α\nts : t ⊆ s\nxt : x ∈ t\nzt : z ∈ t\nht : IsPreconnected t\n⊢ s ⊆ v ∪ u\n[PROOFSTEP]\nrwa [union_comm]\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t✝ u✝ v✝ s : Set α\nx : α\nH : ∀ (y : α), y ∈ s → ∃ t, t ⊆ s ∧ x ∈ t ∧ y ∈ t ∧ IsPreconnected t\nu v : Set α\nhu : IsOpen u\nhv : IsOpen v\nhs : s ⊆ u ∪ v\nz : α\nzs : z ∈ s\nzu : z ∈ u\ny : α\nys : y ∈ s\nyv : y ∈ v\nxs : x ∈ s\nxv : x ∈ v\nt : Set α\nts : t ⊆ s\nxt : x ∈ t\nzt : z ∈ t\nht : IsPreconnected t\nthis : Set.Nonempty (t ∩ (v ∩ u))\n⊢ Set.Nonempty (s ∩ (u ∩ v))\n[PROOFSTEP]\nexact this.imp fun _ h => ⟨ts h.1, h.2.2, h.2.1⟩\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u v s : Set α\nH : ∀ (x : α), x ∈ s → ∀ (y : α), y ∈ s → ∃ t, t ⊆ s ∧ x ∈ t ∧ y ∈ t ∧ IsPreconnected t\n⊢ IsPreconnected s\n[PROOFSTEP]\nrcases eq_empty_or_nonempty s with (rfl | ⟨x, hx⟩)\n[GOAL]\ncase inl\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\nH : ∀ (x : α), x ∈ ∅ → ∀ (y : α), y ∈ ∅ → ∃ t, t ⊆ ∅ ∧ x ∈ t ∧ y ∈ t ∧ IsPreconnected t\n⊢ IsPreconnected ∅\ncase inr.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u v s : Set α\nH : ∀ (x : α), x ∈ s → ∀ (y : α), y ∈ s → ∃ t, t ⊆ s ∧ x ∈ t ∧ y ∈ t ∧ IsPreconnected t\nx : α\nhx : x ∈ s\n⊢ IsPreconnected s\n[PROOFSTEP]\nexacts [isPreconnected_empty, isPreconnected_of_forall x fun y => H x hx y]\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\nx : α\nc : Set (Set α)\nH1 : ∀ (s : Set α), s ∈ c → x ∈ s\nH2 : ∀ (s : Set α), s ∈ c → IsPreconnected s\n⊢ IsPreconnected (⋃₀ c)\n[PROOFSTEP]\napply isPreconnected_of_forall x\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\nx : α\nc : Set (Set α)\nH1 : ∀ (s : Set α), s ∈ c → x ∈ s\nH2 : ∀ (s : Set α), s ∈ c → IsPreconnected s\n⊢ ∀ (y : α), y ∈ ⋃₀ c → ∃ t, t ⊆ ⋃₀ c ∧ x ∈ t ∧ y ∈ t ∧ IsPreconnected t\n[PROOFSTEP]\nrintro y ⟨s, sc, ys⟩\n[GOAL]\ncase intro.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u v : Set α\nx : α\nc : Set (Set α)\nH1 : ∀ (s : Set α), s ∈ c → x ∈ s\nH2 : ∀ (s : Set α), s ∈ c → IsPreconnected s\ny : α\ns : Set α\nsc : s ∈ c\nys : y ∈ s\n⊢ ∃ t, t ⊆ ⋃₀ c ∧ x ∈ t ∧ y ∈ t ∧ IsPreconnected t\n[PROOFSTEP]\nexact ⟨s, subset_sUnion_of_mem sc, H1 s sc, ys, H2 s sc⟩\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t✝ u v : Set α\nx : α\ns t : Set α\nH1 : x ∈ s\nH2 : x ∈ t\nH3 : IsPreconnected s\nH4 : IsPreconnected t\n⊢ ∀ (s_1 : Set α), s_1 ∈ {s, t} → x ∈ s_1\n[PROOFSTEP]\nrintro r (rfl | rfl | h)\n[GOAL]\ncase inl\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t✝ u v : Set α\nx : α\nt : Set α\nH2 : x ∈ t\nH4 : IsPreconnected t\nr : Set α\nH1 : x ∈ r\nH3 : IsPreconnected r\n⊢ x ∈ r\n[PROOFSTEP]\nassumption\n[GOAL]\ncase inr.refl\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t✝ u v : Set α\nx : α\ns t : Set α\nH1 : x ∈ s\nH2 : x ∈ t\nH3 : IsPreconnected s\nH4 : IsPreconnected t\n⊢ x ∈ t\n[PROOFSTEP]\nassumption\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t✝ u v : Set α\nx : α\ns t : Set α\nH1 : x ∈ s\nH2 : x ∈ t\nH3 : IsPreconnected s\nH4 : IsPreconnected t\n⊢ ∀ (s_1 : Set α), s_1 ∈ {s, t} → IsPreconnected s_1\n[PROOFSTEP]\nrintro r (rfl | rfl | h)\n[GOAL]\ncase inl\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t✝ u v : Set α\nx : α\nt : Set α\nH2 : x ∈ t\nH4 : IsPreconnected t\nr : Set α\nH1 : x ∈ r\nH3 : IsPreconnected r\n⊢ IsPreconnected r\n[PROOFSTEP]\nassumption\n[GOAL]\ncase inr.refl\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t✝ u v : Set α\nx : α\ns t : Set α\nH1 : x ∈ s\nH2 : x ∈ t\nH3 : IsPreconnected s\nH4 : IsPreconnected t\n⊢ IsPreconnected t\n[PROOFSTEP]\nassumption\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t✝ u v s t : Set α\nH : Set.Nonempty (s ∩ t)\nhs : IsPreconnected s\nht : IsPreconnected t\n⊢ IsPreconnected (s ∪ t)\n[PROOFSTEP]\nrcases H with ⟨x, hxs, hxt⟩\n[GOAL]\ncase intro.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t✝ u v s t : Set α\nhs : IsPreconnected s\nht : IsPreconnected t\nx : α\nhxs : x ∈ s\nhxt : x ∈ t\n⊢ IsPreconnected (s ∪ t)\n[PROOFSTEP]\nexact hs.union x hxs hxt ht\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t✝ u v s t : Set α\nH : Set.Nonempty (s ∩ t)\nHs : IsConnected s\nHt : IsConnected t\n⊢ IsConnected (s ∪ t)\n[PROOFSTEP]\nrcases H with ⟨x, hx⟩\n[GOAL]\ncase intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t✝ u v s t : Set α\nHs : IsConnected s\nHt : IsConnected t\nx : α\nhx : x ∈ s ∩ t\n⊢ IsConnected (s ∪ t)\n[PROOFSTEP]\nrefine' ⟨⟨x, mem_union_left t (mem_of_mem_inter_left hx)⟩, _⟩\n[GOAL]\ncase intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t✝ u v s t : Set α\nHs : IsConnected s\nHt : IsConnected t\nx : α\nhx : x ∈ s ∩ t\n⊢ IsPreconnected (s ∪ t)\n[PROOFSTEP]\nexact Hs.isPreconnected.union x (mem_of_mem_inter_left hx) (mem_of_mem_inter_right hx) Ht.isPreconnected\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\nS : Set (Set α)\nK : DirectedOn (fun x x_1 => x ⊆ x_1) S\nH : ∀ (s : Set α), s ∈ S → IsPreconnected s\n⊢ IsPreconnected (⋃₀ S)\n[PROOFSTEP]\nrintro u v hu hv Huv ⟨a, ⟨s, hsS, has⟩, hau⟩ ⟨b, ⟨t, htS, hbt⟩, hbv⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t✝ u✝ v✝ : Set α\nS : Set (Set α)\nK : DirectedOn (fun x x_1 => x ⊆ x_1) S\nH : ∀ (s : Set α), s ∈ S → IsPreconnected s\nu v : Set α\nhu : IsOpen u\nhv : IsOpen v\nHuv : ⋃₀ S ⊆ u ∪ v\na : α\nhau : a ∈ u\ns : Set α\nhsS : s ∈ S\nhas : a ∈ s\nb : α\nhbv : b ∈ v\nt : Set α\nhtS : t ∈ S\nhbt : b ∈ t\n⊢ Set.Nonempty (⋃₀ S ∩ (u ∩ v))\n[PROOFSTEP]\nobtain ⟨r, hrS, hsr, htr⟩ : ∃ r ∈ S, s ⊆ r ∧ t ⊆ r := K s hsS t htS\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t✝ u✝ v✝ : Set α\nS : Set (Set α)\nK : DirectedOn (fun x x_1 => x ⊆ x_1) S\nH : ∀ (s : Set α), s ∈ S → IsPreconnected s\nu v : Set α\nhu : IsOpen u\nhv : IsOpen v\nHuv : ⋃₀ S ⊆ u ∪ v\na : α\nhau : a ∈ u\ns : Set α\nhsS : s ∈ S\nhas : a ∈ s\nb : α\nhbv : b ∈ v\nt : Set α\nhtS : t ∈ S\nhbt : b ∈ t\nr : Set α\nhrS : r ∈ S\nhsr : s ⊆ r\nhtr : t ⊆ r\n⊢ Set.Nonempty (⋃₀ S ∩ (u ∩ v))\n[PROOFSTEP]\nhave Hnuv : (r ∩ (u ∩ v)).Nonempty :=\n  H _ hrS u v hu hv ((subset_sUnion_of_mem hrS).trans Huv) ⟨a, hsr has, hau⟩ ⟨b, htr hbt, hbv⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t✝ u✝ v✝ : Set α\nS : Set (Set α)\nK : DirectedOn (fun x x_1 => x ⊆ x_1) S\nH : ∀ (s : Set α), s ∈ S → IsPreconnected s\nu v : Set α\nhu : IsOpen u\nhv : IsOpen v\nHuv : ⋃₀ S ⊆ u ∪ v\na : α\nhau : a ∈ u\ns : Set α\nhsS : s ∈ S\nhas : a ∈ s\nb : α\nhbv : b ∈ v\nt : Set α\nhtS : t ∈ S\nhbt : b ∈ t\nr : Set α\nhrS : r ∈ S\nhsr : s ⊆ r\nhtr : t ⊆ r\nHnuv : Set.Nonempty (r ∩ (u ∩ v))\n⊢ Set.Nonempty (⋃₀ S ∩ (u ∩ v))\n[PROOFSTEP]\nhave Kruv : r ∩ (u ∩ v) ⊆ ⋃₀ S ∩ (u ∩ v) := inter_subset_inter_left _ (subset_sUnion_of_mem hrS)\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t✝ u✝ v✝ : Set α\nS : Set (Set α)\nK : DirectedOn (fun x x_1 => x ⊆ x_1) S\nH : ∀ (s : Set α), s ∈ S → IsPreconnected s\nu v : Set α\nhu : IsOpen u\nhv : IsOpen v\nHuv : ⋃₀ S ⊆ u ∪ v\na : α\nhau : a ∈ u\ns : Set α\nhsS : s ∈ S\nhas : a ∈ s\nb : α\nhbv : b ∈ v\nt : Set α\nhtS : t ∈ S\nhbt : b ∈ t\nr : Set α\nhrS : r ∈ S\nhsr : s ⊆ r\nhtr : t ⊆ r\nHnuv : Set.Nonempty (r ∩ (u ∩ v))\nKruv : r ∩ (u ∩ v) ⊆ ⋃₀ S ∩ (u ∩ v)\n⊢ Set.Nonempty (⋃₀ S ∩ (u ∩ v))\n[PROOFSTEP]\nexact Hnuv.mono Kruv\n[GOAL]\nα : Type u\nβ : Type v\nι✝ : Type u_1\nπ : ι✝ → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t✝ u v : Set α\nι : Type u_3\nt : Set ι\ns : ι → Set α\nH : ∀ (i : ι), i ∈ t → IsPreconnected (s i)\nK : ∀ (i : ι), i ∈ t → ∀ (j : ι), j ∈ t → ReflTransGen (fun i j => Set.Nonempty (s i ∩ s j) ∧ i ∈ t) i j\n⊢ IsPreconnected (⋃ (n : ι) (_ : n ∈ t), s n)\n[PROOFSTEP]\nlet R := fun i j : ι => (s i ∩ s j).Nonempty ∧ i ∈ t\n[GOAL]\nα : Type u\nβ : Type v\nι✝ : Type u_1\nπ : ι✝ → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t✝ u v : Set α\nι : Type u_3\nt : Set ι\ns : ι → Set α\nH : ∀ (i : ι), i ∈ t → IsPreconnected (s i)\nK : ∀ (i : ι), i ∈ t → ∀ (j : ι), j ∈ t → ReflTransGen (fun i j => Set.Nonempty (s i ∩ s j) ∧ i ∈ t) i j\nR : ι → ι → Prop := fun i j => Set.Nonempty (s i ∩ s j) ∧ i ∈ t\n⊢ IsPreconnected (⋃ (n : ι) (_ : n ∈ t), s n)\n[PROOFSTEP]\nhave P : ∀ i, i ∈ t → ∀ j, j ∈ t → ReflTransGen R i j → ∃ p, p ⊆ t ∧ i ∈ p ∧ j ∈ p ∧ IsPreconnected (⋃ j ∈ p, s j) :=\n  fun i hi j hj h => by\n  induction h\n  case refl =>\n    refine ⟨{ i }, singleton_subset_iff.mpr hi, mem_singleton i, mem_singleton i, ?_⟩\n    rw [biUnion_singleton]\n    exact H i hi\n  case tail j k _ hjk ih =>\n    obtain ⟨p, hpt, hip, hjp, hp⟩ := ih hjk.2\n    refine ⟨insert k p, insert_subset_iff.mpr ⟨hj, hpt⟩, mem_insert_of_mem k hip, mem_insert k p, ?_⟩\n    rw [biUnion_insert]\n    refine (H k hj).union' (hjk.1.mono ?_) hp\n    rw [inter_comm]\n    exact inter_subset_inter_right _ (subset_biUnion_of_mem hjp)\n[GOAL]\nα : Type u\nβ : Type v\nι✝ : Type u_1\nπ : ι✝ → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t✝ u v : Set α\nι : Type u_3\nt : Set ι\ns : ι → Set α\nH : ∀ (i : ι), i ∈ t → IsPreconnected (s i)\nK : ∀ (i : ι), i ∈ t → ∀ (j : ι), j ∈ t → ReflTransGen (fun i j => Set.Nonempty (s i ∩ s j) ∧ i ∈ t) i j\nR : ι → ι → Prop := fun i j => Set.Nonempty (s i ∩ s j) ∧ i ∈ t\ni : ι\nhi : i ∈ t\nj : ι\nhj : j ∈ t\nh : ReflTransGen R i j\n⊢ ∃ p, p ⊆ t ∧ i ∈ p ∧ j ∈ p ∧ IsPreconnected (⋃ (j : ι) (_ : j ∈ p), s j)\n[PROOFSTEP]\ninduction h\n[GOAL]\ncase refl\nα : Type u\nβ : Type v\nι✝ : Type u_1\nπ : ι✝ → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t✝ u v : Set α\nι : Type u_3\nt : Set ι\ns : ι → Set α\nH : ∀ (i : ι), i ∈ t → IsPreconnected (s i)\nK : ∀ (i : ι), i ∈ t → ∀ (j : ι), j ∈ t → ReflTransGen (fun i j => Set.Nonempty (s i ∩ s j) ∧ i ∈ t) i j\nR : ι → ι → Prop := fun i j => Set.Nonempty (s i ∩ s j) ∧ i ∈ t\ni : ι\nhi : i ∈ t\nj : ι\nhj : i ∈ t\n⊢ ∃ p, p ⊆ t ∧ i ∈ p ∧ i ∈ p ∧ IsPreconnected (⋃ (j : ι) (_ : j ∈ p), s j)\ncase tail\nα : Type u\nβ : Type v\nι✝ : Type u_1\nπ : ι✝ → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t✝ u v : Set α\nι : Type u_3\nt : Set ι\ns : ι → Set α\nH : ∀ (i : ι), i ∈ t → IsPreconnected (s i)\nK : ∀ (i : ι), i ∈ t → ∀ (j : ι), j ∈ t → ReflTransGen (fun i j => Set.Nonempty (s i ∩ s j) ∧ i ∈ t) i j\nR : ι → ι → Prop := fun i j => Set.Nonempty (s i ∩ s j) ∧ i ∈ t\ni : ι\nhi : i ∈ t\nj b✝ c✝ : ι\na✝¹ : ReflTransGen R i b✝\na✝ : R b✝ c✝\na_ih✝ : b✝ ∈ t → ∃ p, p ⊆ t ∧ i ∈ p ∧ b✝ ∈ p ∧ IsPreconnected (⋃ (j : ι) (_ : j ∈ p), s j)\nhj : c✝ ∈ t\n⊢ ∃ p, p ⊆ t ∧ i ∈ p ∧ c✝ ∈ p ∧ IsPreconnected (⋃ (j : ι) (_ : j ∈ p), s j)\n[PROOFSTEP]\ncase refl =>\n  refine ⟨{ i }, singleton_subset_iff.mpr hi, mem_singleton i, mem_singleton i, ?_⟩\n  rw [biUnion_singleton]\n  exact H i hi\n[GOAL]\nα : Type u\nβ : Type v\nι✝ : Type u_1\nπ : ι✝ → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t✝ u v : Set α\nι : Type u_3\nt : Set ι\ns : ι → Set α\nH : ∀ (i : ι), i ∈ t → IsPreconnected (s i)\nK : ∀ (i : ι), i ∈ t → ∀ (j : ι), j ∈ t → ReflTransGen (fun i j => Set.Nonempty (s i ∩ s j) ∧ i ∈ t) i j\nR : ι → ι → Prop := fun i j => Set.Nonempty (s i ∩ s j) ∧ i ∈ t\ni : ι\nhi : i ∈ t\nj : ι\nhj : i ∈ t\n⊢ ∃ p, p ⊆ t ∧ i ∈ p ∧ i ∈ p ∧ IsPreconnected (⋃ (j : ι) (_ : j ∈ p), s j)\n[PROOFSTEP]\ncase refl =>\n  refine ⟨{ i }, singleton_subset_iff.mpr hi, mem_singleton i, mem_singleton i, ?_⟩\n  rw [biUnion_singleton]\n  exact H i hi\n[GOAL]\nα : Type u\nβ : Type v\nι✝ : Type u_1\nπ : ι✝ → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t✝ u v : Set α\nι : Type u_3\nt : Set ι\ns : ι → Set α\nH : ∀ (i : ι), i ∈ t → IsPreconnected (s i)\nK : ∀ (i : ι), i ∈ t → ∀ (j : ι), j ∈ t → ReflTransGen (fun i j => Set.Nonempty (s i ∩ s j) ∧ i ∈ t) i j\nR : ι → ι → Prop := fun i j => Set.Nonempty (s i ∩ s j) ∧ i ∈ t\ni : ι\nhi : i ∈ t\nj : ι\nhj : i ∈ t\n⊢ ∃ p, p ⊆ t ∧ i ∈ p ∧ i ∈ p ∧ IsPreconnected (⋃ (j : ι) (_ : j ∈ p), s j)\n[PROOFSTEP]\nrefine ⟨{ i }, singleton_subset_iff.mpr hi, mem_singleton i, mem_singleton i, ?_⟩\n[GOAL]\nα : Type u\nβ : Type v\nι✝ : Type u_1\nπ : ι✝ → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t✝ u v : Set α\nι : Type u_3\nt : Set ι\ns : ι → Set α\nH : ∀ (i : ι), i ∈ t → IsPreconnected (s i)\nK : ∀ (i : ι), i ∈ t → ∀ (j : ι), j ∈ t → ReflTransGen (fun i j => Set.Nonempty (s i ∩ s j) ∧ i ∈ t) i j\nR : ι → ι → Prop := fun i j => Set.Nonempty (s i ∩ s j) ∧ i ∈ t\ni : ι\nhi : i ∈ t\nj : ι\nhj : i ∈ t\n⊢ IsPreconnected (⋃ (j : ι) (_ : j ∈ {i}), s j)\n[PROOFSTEP]\nrw [biUnion_singleton]\n[GOAL]\nα : Type u\nβ : Type v\nι✝ : Type u_1\nπ : ι✝ → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t✝ u v : Set α\nι : Type u_3\nt : Set ι\ns : ι → Set α\nH : ∀ (i : ι), i ∈ t → IsPreconnected (s i)\nK : ∀ (i : ι), i ∈ t → ∀ (j : ι), j ∈ t → ReflTransGen (fun i j => Set.Nonempty (s i ∩ s j) ∧ i ∈ t) i j\nR : ι → ι → Prop := fun i j => Set.Nonempty (s i ∩ s j) ∧ i ∈ t\ni : ι\nhi : i ∈ t\nj : ι\nhj : i ∈ t\n⊢ IsPreconnected (s i)\n[PROOFSTEP]\nexact H i hi\n[GOAL]\ncase tail\nα : Type u\nβ : Type v\nι✝ : Type u_1\nπ : ι✝ → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t✝ u v : Set α\nι : Type u_3\nt : Set ι\ns : ι → Set α\nH : ∀ (i : ι), i ∈ t → IsPreconnected (s i)\nK : ∀ (i : ι), i ∈ t → ∀ (j : ι), j ∈ t → ReflTransGen (fun i j => Set.Nonempty (s i ∩ s j) ∧ i ∈ t) i j\nR : ι → ι → Prop := fun i j => Set.Nonempty (s i ∩ s j) ∧ i ∈ t\ni : ι\nhi : i ∈ t\nj b✝ c✝ : ι\na✝¹ : ReflTransGen R i b✝\na✝ : R b✝ c✝\na_ih✝ : b✝ ∈ t → ∃ p, p ⊆ t ∧ i ∈ p ∧ b✝ ∈ p ∧ IsPreconnected (⋃ (j : ι) (_ : j ∈ p), s j)\nhj : c✝ ∈ t\n⊢ ∃ p, p ⊆ t ∧ i ∈ p ∧ c✝ ∈ p ∧ IsPreconnected (⋃ (j : ι) (_ : j ∈ p), s j)\n[PROOFSTEP]\ncase tail j k _ hjk ih =>\n  obtain ⟨p, hpt, hip, hjp, hp⟩ := ih hjk.2\n  refine ⟨insert k p, insert_subset_iff.mpr ⟨hj, hpt⟩, mem_insert_of_mem k hip, mem_insert k p, ?_⟩\n  rw [biUnion_insert]\n  refine (H k hj).union' (hjk.1.mono ?_) hp\n  rw [inter_comm]\n  exact inter_subset_inter_right _ (subset_biUnion_of_mem hjp)\n[GOAL]\nα : Type u\nβ : Type v\nι✝ : Type u_1\nπ : ι✝ → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t✝ u v : Set α\nι : Type u_3\nt : Set ι\ns : ι → Set α\nH : ∀ (i : ι), i ∈ t → IsPreconnected (s i)\nK : ∀ (i : ι), i ∈ t → ∀ (j : ι), j ∈ t → ReflTransGen (fun i j => Set.Nonempty (s i ∩ s j) ∧ i ∈ t) i j\nR : ι → ι → Prop := fun i j => Set.Nonempty (s i ∩ s j) ∧ i ∈ t\ni : ι\nhi : i ∈ t\nj✝ j k : ι\na✝ : ReflTransGen R i j\nhjk : R j k\nih : j ∈ t → ∃ p, p ⊆ t ∧ i ∈ p ∧ j ∈ p ∧ IsPreconnected (⋃ (j : ι) (_ : j ∈ p), s j)\nhj : k ∈ t\n⊢ ∃ p, p ⊆ t ∧ i ∈ p ∧ k ∈ p ∧ IsPreconnected (⋃ (j : ι) (_ : j ∈ p), s j)\n[PROOFSTEP]\ncase tail j k _ hjk ih =>\n  obtain ⟨p, hpt, hip, hjp, hp⟩ := ih hjk.2\n  refine ⟨insert k p, insert_subset_iff.mpr ⟨hj, hpt⟩, mem_insert_of_mem k hip, mem_insert k p, ?_⟩\n  rw [biUnion_insert]\n  refine (H k hj).union' (hjk.1.mono ?_) hp\n  rw [inter_comm]\n  exact inter_subset_inter_right _ (subset_biUnion_of_mem hjp)\n[GOAL]\nα : Type u\nβ : Type v\nι✝ : Type u_1\nπ : ι✝ → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t✝ u v : Set α\nι : Type u_3\nt : Set ι\ns : ι → Set α\nH : ∀ (i : ι), i ∈ t → IsPreconnected (s i)\nK : ∀ (i : ι), i ∈ t → ∀ (j : ι), j ∈ t → ReflTransGen (fun i j => Set.Nonempty (s i ∩ s j) ∧ i ∈ t) i j\nR : ι → ι → Prop := fun i j => Set.Nonempty (s i ∩ s j) ∧ i ∈ t\ni : ι\nhi : i ∈ t\nj✝ j k : ι\na✝ : ReflTransGen R i j\nhjk : R j k\nih : j ∈ t → ∃ p, p ⊆ t ∧ i ∈ p ∧ j ∈ p ∧ IsPreconnected (⋃ (j : ι) (_ : j ∈ p), s j)\nhj : k ∈ t\n⊢ ∃ p, p ⊆ t ∧ i ∈ p ∧ k ∈ p ∧ IsPreconnected (⋃ (j : ι) (_ : j ∈ p), s j)\n[PROOFSTEP]\nobtain ⟨p, hpt, hip, hjp, hp⟩ := ih hjk.2\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u\nβ : Type v\nι✝ : Type u_1\nπ : ι✝ → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t✝ u v : Set α\nι : Type u_3\nt : Set ι\ns : ι → Set α\nH : ∀ (i : ι), i ∈ t → IsPreconnected (s i)\nK : ∀ (i : ι), i ∈ t → ∀ (j : ι), j ∈ t → ReflTransGen (fun i j => Set.Nonempty (s i ∩ s j) ∧ i ∈ t) i j\nR : ι → ι → Prop := fun i j => Set.Nonempty (s i ∩ s j) ∧ i ∈ t\ni : ι\nhi : i ∈ t\nj✝ j k : ι\na✝ : ReflTransGen R i j\nhjk : R j k\nih : j ∈ t → ∃ p, p ⊆ t ∧ i ∈ p ∧ j ∈ p ∧ IsPreconnected (⋃ (j : ι) (_ : j ∈ p), s j)\nhj : k ∈ t\np : Set ι\nhpt : p ⊆ t\nhip : i ∈ p\nhjp : j ∈ p\nhp : IsPreconnected (⋃ (j : ι) (_ : j ∈ p), s j)\n⊢ ∃ p, p ⊆ t ∧ i ∈ p ∧ k ∈ p ∧ IsPreconnected (⋃ (j : ι) (_ : j ∈ p), s j)\n[PROOFSTEP]\nrefine ⟨insert k p, insert_subset_iff.mpr ⟨hj, hpt⟩, mem_insert_of_mem k hip, mem_insert k p, ?_⟩\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u\nβ : Type v\nι✝ : Type u_1\nπ : ι✝ → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t✝ u v : Set α\nι : Type u_3\nt : Set ι\ns : ι → Set α\nH : ∀ (i : ι), i ∈ t → IsPreconnected (s i)\nK : ∀ (i : ι), i ∈ t → ∀ (j : ι), j ∈ t → ReflTransGen (fun i j => Set.Nonempty (s i ∩ s j) ∧ i ∈ t) i j\nR : ι → ι → Prop := fun i j => Set.Nonempty (s i ∩ s j) ∧ i ∈ t\ni : ι\nhi : i ∈ t\nj✝ j k : ι\na✝ : ReflTransGen R i j\nhjk : R j k\nih : j ∈ t → ∃ p, p ⊆ t ∧ i ∈ p ∧ j ∈ p ∧ IsPreconnected (⋃ (j : ι) (_ : j ∈ p), s j)\nhj : k ∈ t\np : Set ι\nhpt : p ⊆ t\nhip : i ∈ p\nhjp : j ∈ p\nhp : IsPreconnected (⋃ (j : ι) (_ : j ∈ p), s j)\n⊢ IsPreconnected (⋃ (j : ι) (_ : j ∈ insert k p), s j)\n[PROOFSTEP]\nrw [biUnion_insert]\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u\nβ : Type v\nι✝ : Type u_1\nπ : ι✝ → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t✝ u v : Set α\nι : Type u_3\nt : Set ι\ns : ι → Set α\nH : ∀ (i : ι), i ∈ t → IsPreconnected (s i)\nK : ∀ (i : ι), i ∈ t → ∀ (j : ι), j ∈ t → ReflTransGen (fun i j => Set.Nonempty (s i ∩ s j) ∧ i ∈ t) i j\nR : ι → ι → Prop := fun i j => Set.Nonempty (s i ∩ s j) ∧ i ∈ t\ni : ι\nhi : i ∈ t\nj✝ j k : ι\na✝ : ReflTransGen R i j\nhjk : R j k\nih : j ∈ t → ∃ p, p ⊆ t ∧ i ∈ p ∧ j ∈ p ∧ IsPreconnected (⋃ (j : ι) (_ : j ∈ p), s j)\nhj : k ∈ t\np : Set ι\nhpt : p ⊆ t\nhip : i ∈ p\nhjp : j ∈ p\nhp : IsPreconnected (⋃ (j : ι) (_ : j ∈ p), s j)\n⊢ IsPreconnected (s k ∪ ⋃ (x : ι) (_ : x ∈ p), s x)\n[PROOFSTEP]\nrefine (H k hj).union' (hjk.1.mono ?_) hp\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u\nβ : Type v\nι✝ : Type u_1\nπ : ι✝ → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t✝ u v : Set α\nι : Type u_3\nt : Set ι\ns : ι → Set α\nH : ∀ (i : ι), i ∈ t → IsPreconnected (s i)\nK : ∀ (i : ι), i ∈ t → ∀ (j : ι), j ∈ t → ReflTransGen (fun i j => Set.Nonempty (s i ∩ s j) ∧ i ∈ t) i j\nR : ι → ι → Prop := fun i j => Set.Nonempty (s i ∩ s j) ∧ i ∈ t\ni : ι\nhi : i ∈ t\nj✝ j k : ι\na✝ : ReflTransGen R i j\nhjk : R j k\nih : j ∈ t → ∃ p, p ⊆ t ∧ i ∈ p ∧ j ∈ p ∧ IsPreconnected (⋃ (j : ι) (_ : j ∈ p), s j)\nhj : k ∈ t\np : Set ι\nhpt : p ⊆ t\nhip : i ∈ p\nhjp : j ∈ p\nhp : IsPreconnected (⋃ (j : ι) (_ : j ∈ p), s j)\n⊢ s j ∩ s k ⊆ s k ∩ ⋃ (x : ι) (_ : x ∈ p), s x\n[PROOFSTEP]\nrw [inter_comm]\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u\nβ : Type v\nι✝ : Type u_1\nπ : ι✝ → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t✝ u v : Set α\nι : Type u_3\nt : Set ι\ns : ι → Set α\nH : ∀ (i : ι), i ∈ t → IsPreconnected (s i)\nK : ∀ (i : ι), i ∈ t → ∀ (j : ι), j ∈ t → ReflTransGen (fun i j => Set.Nonempty (s i ∩ s j) ∧ i ∈ t) i j\nR : ι → ι → Prop := fun i j => Set.Nonempty (s i ∩ s j) ∧ i ∈ t\ni : ι\nhi : i ∈ t\nj✝ j k : ι\na✝ : ReflTransGen R i j\nhjk : R j k\nih : j ∈ t → ∃ p, p ⊆ t ∧ i ∈ p ∧ j ∈ p ∧ IsPreconnected (⋃ (j : ι) (_ : j ∈ p), s j)\nhj : k ∈ t\np : Set ι\nhpt : p ⊆ t\nhip : i ∈ p\nhjp : j ∈ p\nhp : IsPreconnected (⋃ (j : ι) (_ : j ∈ p), s j)\n⊢ s k ∩ s j ⊆ s k ∩ ⋃ (x : ι) (_ : x ∈ p), s x\n[PROOFSTEP]\nexact inter_subset_inter_right _ (subset_biUnion_of_mem hjp)\n[GOAL]\nα : Type u\nβ : Type v\nι✝ : Type u_1\nπ : ι✝ → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t✝ u v : Set α\nι : Type u_3\nt : Set ι\ns : ι → Set α\nH : ∀ (i : ι), i ∈ t → IsPreconnected (s i)\nK : ∀ (i : ι), i ∈ t → ∀ (j : ι), j ∈ t → ReflTransGen (fun i j => Set.Nonempty (s i ∩ s j) ∧ i ∈ t) i j\nR : ι → ι → Prop := fun i j => Set.Nonempty (s i ∩ s j) ∧ i ∈ t\nP :\n  ∀ (i : ι),\n    i ∈ t →\n      ∀ (j : ι), j ∈ t → ReflTransGen R i j → ∃ p, p ⊆ t ∧ i ∈ p ∧ j ∈ p ∧ IsPreconnected (⋃ (j : ι) (_ : j ∈ p), s j)\n⊢ IsPreconnected (⋃ (n : ι) (_ : n ∈ t), s n)\n[PROOFSTEP]\nrefine' isPreconnected_of_forall_pair _\n[GOAL]\nα : Type u\nβ : Type v\nι✝ : Type u_1\nπ : ι✝ → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t✝ u v : Set α\nι : Type u_3\nt : Set ι\ns : ι → Set α\nH : ∀ (i : ι), i ∈ t → IsPreconnected (s i)\nK : ∀ (i : ι), i ∈ t → ∀ (j : ι), j ∈ t → ReflTransGen (fun i j => Set.Nonempty (s i ∩ s j) ∧ i ∈ t) i j\nR : ι → ι → Prop := fun i j => Set.Nonempty (s i ∩ s j) ∧ i ∈ t\nP :\n  ∀ (i : ι),\n    i ∈ t →\n      ∀ (j : ι), j ∈ t → ReflTransGen R i j → ∃ p, p ⊆ t ∧ i ∈ p ∧ j ∈ p ∧ IsPreconnected (⋃ (j : ι) (_ : j ∈ p), s j)\n⊢ ∀ (x : α),\n    x ∈ ⋃ (n : ι) (_ : n ∈ t), s n →\n      ∀ (y : α),\n        y ∈ ⋃ (n : ι) (_ : n ∈ t), s n →\n          ∃ t_1, t_1 ⊆ ⋃ (n : ι) (_ : n ∈ t), s n ∧ x ∈ t_1 ∧ y ∈ t_1 ∧ IsPreconnected t_1\n[PROOFSTEP]\nintro x hx y hy\n[GOAL]\nα : Type u\nβ : Type v\nι✝ : Type u_1\nπ : ι✝ → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t✝ u v : Set α\nι : Type u_3\nt : Set ι\ns : ι → Set α\nH : ∀ (i : ι), i ∈ t → IsPreconnected (s i)\nK : ∀ (i : ι), i ∈ t → ∀ (j : ι), j ∈ t → ReflTransGen (fun i j => Set.Nonempty (s i ∩ s j) ∧ i ∈ t) i j\nR : ι → ι → Prop := fun i j => Set.Nonempty (s i ∩ s j) ∧ i ∈ t\nP :\n  ∀ (i : ι),\n    i ∈ t →\n      ∀ (j : ι), j ∈ t → ReflTransGen R i j → ∃ p, p ⊆ t ∧ i ∈ p ∧ j ∈ p ∧ IsPreconnected (⋃ (j : ι) (_ : j ∈ p), s j)\nx : α\nhx : x ∈ ⋃ (n : ι) (_ : n ∈ t), s n\ny : α\nhy : y ∈ ⋃ (n : ι) (_ : n ∈ t), s n\n⊢ ∃ t_1, t_1 ⊆ ⋃ (n : ι) (_ : n ∈ t), s n ∧ x ∈ t_1 ∧ y ∈ t_1 ∧ IsPreconnected t_1\n[PROOFSTEP]\nobtain ⟨i : ι, hi : i ∈ t, hxi : x ∈ s i⟩ := mem_iUnion₂.1 hx\n[GOAL]\ncase intro.intro\nα : Type u\nβ : Type v\nι✝ : Type u_1\nπ : ι✝ → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t✝ u v : Set α\nι : Type u_3\nt : Set ι\ns : ι → Set α\nH : ∀ (i : ι), i ∈ t → IsPreconnected (s i)\nK : ∀ (i : ι), i ∈ t → ∀ (j : ι), j ∈ t → ReflTransGen (fun i j => Set.Nonempty (s i ∩ s j) ∧ i ∈ t) i j\nR : ι → ι → Prop := fun i j => Set.Nonempty (s i ∩ s j) ∧ i ∈ t\nP :\n  ∀ (i : ι),\n    i ∈ t →\n      ∀ (j : ι), j ∈ t → ReflTransGen R i j → ∃ p, p ⊆ t ∧ i ∈ p ∧ j ∈ p ∧ IsPreconnected (⋃ (j : ι) (_ : j ∈ p), s j)\nx : α\nhx : x ∈ ⋃ (n : ι) (_ : n ∈ t), s n\ny : α\nhy : y ∈ ⋃ (n : ι) (_ : n ∈ t), s n\ni : ι\nhi : i ∈ t\nhxi : x ∈ s i\n⊢ ∃ t_1, t_1 ⊆ ⋃ (n : ι) (_ : n ∈ t), s n ∧ x ∈ t_1 ∧ y ∈ t_1 ∧ IsPreconnected t_1\n[PROOFSTEP]\nobtain ⟨j : ι, hj : j ∈ t, hyj : y ∈ s j⟩ := mem_iUnion₂.1 hy\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u\nβ : Type v\nι✝ : Type u_1\nπ : ι✝ → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t✝ u v : Set α\nι : Type u_3\nt : Set ι\ns : ι → Set α\nH : ∀ (i : ι), i ∈ t → IsPreconnected (s i)\nK : ∀ (i : ι), i ∈ t → ∀ (j : ι), j ∈ t → ReflTransGen (fun i j => Set.Nonempty (s i ∩ s j) ∧ i ∈ t) i j\nR : ι → ι → Prop := fun i j => Set.Nonempty (s i ∩ s j) ∧ i ∈ t\nP :\n  ∀ (i : ι),\n    i ∈ t →\n      ∀ (j : ι), j ∈ t → ReflTransGen R i j → ∃ p, p ⊆ t ∧ i ∈ p ∧ j ∈ p ∧ IsPreconnected (⋃ (j : ι) (_ : j ∈ p), s j)\nx : α\nhx : x ∈ ⋃ (n : ι) (_ : n ∈ t), s n\ny : α\nhy : y ∈ ⋃ (n : ι) (_ : n ∈ t), s n\ni : ι\nhi : i ∈ t\nhxi : x ∈ s i\nj : ι\nhj : j ∈ t\nhyj : y ∈ s j\n⊢ ∃ t_1, t_1 ⊆ ⋃ (n : ι) (_ : n ∈ t), s n ∧ x ∈ t_1 ∧ y ∈ t_1 ∧ IsPreconnected t_1\n[PROOFSTEP]\nobtain ⟨p, hpt, hip, hjp, hp⟩ := P i hi j hj (K i hi j hj)\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u\nβ : Type v\nι✝ : Type u_1\nπ : ι✝ → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t✝ u v : Set α\nι : Type u_3\nt : Set ι\ns : ι → Set α\nH : ∀ (i : ι), i ∈ t → IsPreconnected (s i)\nK : ∀ (i : ι), i ∈ t → ∀ (j : ι), j ∈ t → ReflTransGen (fun i j => Set.Nonempty (s i ∩ s j) ∧ i ∈ t) i j\nR : ι → ι → Prop := fun i j => Set.Nonempty (s i ∩ s j) ∧ i ∈ t\nP :\n  ∀ (i : ι),\n    i ∈ t →\n      ∀ (j : ι), j ∈ t → ReflTransGen R i j → ∃ p, p ⊆ t ∧ i ∈ p ∧ j ∈ p ∧ IsPreconnected (⋃ (j : ι) (_ : j ∈ p), s j)\nx : α\nhx : x ∈ ⋃ (n : ι) (_ : n ∈ t), s n\ny : α\nhy : y ∈ ⋃ (n : ι) (_ : n ∈ t), s n\ni : ι\nhi : i ∈ t\nhxi : x ∈ s i\nj : ι\nhj : j ∈ t\nhyj : y ∈ s j\np : Set ι\nhpt : p ⊆ t\nhip : i ∈ p\nhjp : j ∈ p\nhp : IsPreconnected (⋃ (j : ι) (_ : j ∈ p), s j)\n⊢ ∃ t_1, t_1 ⊆ ⋃ (n : ι) (_ : n ∈ t), s n ∧ x ∈ t_1 ∧ y ∈ t_1 ∧ IsPreconnected t_1\n[PROOFSTEP]\nexact ⟨⋃ j ∈ p, s j, biUnion_subset_biUnion_left hpt, mem_biUnion hip hxi, mem_biUnion hjp hyj, hp⟩\n[GOAL]\nα : Type u\nβ : Type v\nι✝ : Type u_1\nπ : ι✝ → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u v : Set α\nι : Type u_3\ns : ι → Set α\nH : ∀ (i : ι), IsPreconnected (s i)\nK : ∀ (i j : ι), ReflTransGen (fun i j => Set.Nonempty (s i ∩ s j)) i j\n⊢ IsPreconnected (⋃ (n : ι), s n)\n[PROOFSTEP]\nrw [← biUnion_univ]\n[GOAL]\nα : Type u\nβ : Type v\nι✝ : Type u_1\nπ : ι✝ → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u v : Set α\nι : Type u_3\ns : ι → Set α\nH : ∀ (i : ι), IsPreconnected (s i)\nK : ∀ (i j : ι), ReflTransGen (fun i j => Set.Nonempty (s i ∩ s j)) i j\n⊢ IsPreconnected (⋃ (x : ι) (_ : x ∈ univ), s x)\n[PROOFSTEP]\nexact IsPreconnected.biUnion_of_reflTransGen (fun i _ => H i) fun i _ j _ => by simpa [mem_univ] using K i j\n[GOAL]\nα : Type u\nβ : Type v\nι✝ : Type u_1\nπ : ι✝ → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u v : Set α\nι : Type u_3\ns : ι → Set α\nH : ∀ (i : ι), IsPreconnected (s i)\nK : ∀ (i j : ι), ReflTransGen (fun i j => Set.Nonempty (s i ∩ s j)) i j\ni : ι\nx✝¹ : i ∈ univ\nj : ι\nx✝ : j ∈ univ\n⊢ ReflTransGen (fun i j => Set.Nonempty (s i ∩ s j) ∧ i ∈ univ) i j\n[PROOFSTEP]\nsimpa [mem_univ] using K i j\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝³ : TopologicalSpace α\ns✝ t u v : Set α\ninst✝² : LinearOrder β\ninst✝¹ : SuccOrder β\ninst✝ : IsSuccArchimedean β\ns : β → Set α\nH : ∀ (n : β), IsPreconnected (s n)\nK : ∀ (n : β), Set.Nonempty (s n ∩ s (succ n))\ni✝ j i : β\nx✝ : i ∈ Ico j i✝\n⊢ Set.Nonempty (s (succ i) ∩ s i)\n[PROOFSTEP]\nrw [inter_comm]\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝³ : TopologicalSpace α\ns✝ t u v : Set α\ninst✝² : LinearOrder β\ninst✝¹ : SuccOrder β\ninst✝ : IsSuccArchimedean β\ns : β → Set α\nH : ∀ (n : β), IsPreconnected (s n)\nK : ∀ (n : β), Set.Nonempty (s n ∩ s (succ n))\ni✝ j i : β\nx✝ : i ∈ Ico j i✝\n⊢ Set.Nonempty (s i ∩ s (succ i))\n[PROOFSTEP]\nexact K i\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝⁴ : TopologicalSpace α\ns✝ t u v : Set α\ninst✝³ : LinearOrder β\ninst✝² : SuccOrder β\ninst✝¹ : IsSuccArchimedean β\ninst✝ : Nonempty β\ns : β → Set α\nH : ∀ (n : β), IsConnected (s n)\nK : ∀ (n : β), Set.Nonempty (s n ∩ s (succ n))\ni✝ j i : β\nx✝ : i ∈ Ico j i✝\n⊢ Set.Nonempty (s (succ i) ∩ s i)\n[PROOFSTEP]\nrw [inter_comm]\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝⁴ : TopologicalSpace α\ns✝ t u v : Set α\ninst✝³ : LinearOrder β\ninst✝² : SuccOrder β\ninst✝¹ : IsSuccArchimedean β\ninst✝ : Nonempty β\ns : β → Set α\nH : ∀ (n : β), IsConnected (s n)\nK : ∀ (n : β), Set.Nonempty (s n ∩ s (succ n))\ni✝ j i : β\nx✝ : i ∈ Ico j i✝\n⊢ Set.Nonempty (s i ∩ s (succ i))\n[PROOFSTEP]\nexact K i\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝³ : TopologicalSpace α\ns✝ t✝ u v : Set α\ninst✝² : LinearOrder β\ninst✝¹ : SuccOrder β\ninst✝ : IsSuccArchimedean β\ns : β → Set α\nt : Set β\nht : OrdConnected t\nH : ∀ (n : β), n ∈ t → IsPreconnected (s n)\nK : ∀ (n : β), n ∈ t → succ n ∈ t → Set.Nonempty (s n ∩ s (succ n))\n⊢ IsPreconnected (⋃ (n : β) (_ : n ∈ t), s n)\n[PROOFSTEP]\nhave h1 : ∀ {i j k : β}, i ∈ t → j ∈ t → k ∈ Ico i j → k ∈ t := fun hi hj hk => ht.out hi hj (Ico_subset_Icc_self hk)\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝³ : TopologicalSpace α\ns✝ t✝ u v : Set α\ninst✝² : LinearOrder β\ninst✝¹ : SuccOrder β\ninst✝ : IsSuccArchimedean β\ns : β → Set α\nt : Set β\nht : OrdConnected t\nH : ∀ (n : β), n ∈ t → IsPreconnected (s n)\nK : ∀ (n : β), n ∈ t → succ n ∈ t → Set.Nonempty (s n ∩ s (succ n))\nh1 : ∀ {i j k : β}, i ∈ t → j ∈ t → k ∈ Ico i j → k ∈ t\n⊢ IsPreconnected (⋃ (n : β) (_ : n ∈ t), s n)\n[PROOFSTEP]\nhave h2 : ∀ {i j k : β}, i ∈ t → j ∈ t → k ∈ Ico i j → succ k ∈ t := fun hi hj hk =>\n  ht.out hi hj ⟨hk.1.trans <| le_succ _, succ_le_of_lt hk.2⟩\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝³ : TopologicalSpace α\ns✝ t✝ u v : Set α\ninst✝² : LinearOrder β\ninst✝¹ : SuccOrder β\ninst✝ : IsSuccArchimedean β\ns : β → Set α\nt : Set β\nht : OrdConnected t\nH : ∀ (n : β), n ∈ t → IsPreconnected (s n)\nK : ∀ (n : β), n ∈ t → succ n ∈ t → Set.Nonempty (s n ∩ s (succ n))\nh1 : ∀ {i j k : β}, i ∈ t → j ∈ t → k ∈ Ico i j → k ∈ t\nh2 : ∀ {i j k : β}, i ∈ t → j ∈ t → k ∈ Ico i j → succ k ∈ t\n⊢ IsPreconnected (⋃ (n : β) (_ : n ∈ t), s n)\n[PROOFSTEP]\nhave h3 : ∀ {i j k : β}, i ∈ t → j ∈ t → k ∈ Ico i j → (s k ∩ s (succ k)).Nonempty := fun hi hj hk =>\n  K _ (h1 hi hj hk) (h2 hi hj hk)\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝³ : TopologicalSpace α\ns✝ t✝ u v : Set α\ninst✝² : LinearOrder β\ninst✝¹ : SuccOrder β\ninst✝ : IsSuccArchimedean β\ns : β → Set α\nt : Set β\nht : OrdConnected t\nH : ∀ (n : β), n ∈ t → IsPreconnected (s n)\nK : ∀ (n : β), n ∈ t → succ n ∈ t → Set.Nonempty (s n ∩ s (succ n))\nh1 : ∀ {i j k : β}, i ∈ t → j ∈ t → k ∈ Ico i j → k ∈ t\nh2 : ∀ {i j k : β}, i ∈ t → j ∈ t → k ∈ Ico i j → succ k ∈ t\nh3 : ∀ {i j k : β}, i ∈ t → j ∈ t → k ∈ Ico i j → Set.Nonempty (s k ∩ s (succ k))\n⊢ IsPreconnected (⋃ (n : β) (_ : n ∈ t), s n)\n[PROOFSTEP]\nrefine' IsPreconnected.biUnion_of_reflTransGen H fun i hi j hj => _\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝³ : TopologicalSpace α\ns✝ t✝ u v : Set α\ninst✝² : LinearOrder β\ninst✝¹ : SuccOrder β\ninst✝ : IsSuccArchimedean β\ns : β → Set α\nt : Set β\nht : OrdConnected t\nH : ∀ (n : β), n ∈ t → IsPreconnected (s n)\nK : ∀ (n : β), n ∈ t → succ n ∈ t → Set.Nonempty (s n ∩ s (succ n))\nh1 : ∀ {i j k : β}, i ∈ t → j ∈ t → k ∈ Ico i j → k ∈ t\nh2 : ∀ {i j k : β}, i ∈ t → j ∈ t → k ∈ Ico i j → succ k ∈ t\nh3 : ∀ {i j k : β}, i ∈ t → j ∈ t → k ∈ Ico i j → Set.Nonempty (s k ∩ s (succ k))\ni : β\nhi : i ∈ t\nj : β\nhj : j ∈ t\n⊢ ReflTransGen (fun i j => Set.Nonempty (s i ∩ s j) ∧ i ∈ t) i j\n[PROOFSTEP]\nexact\n  reflTransGen_of_succ _ (fun k hk => ⟨h3 hi hj hk, h1 hi hj hk⟩) fun k hk =>\n    ⟨by rw [inter_comm]; exact h3 hj hi hk, h2 hj hi hk⟩\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝³ : TopologicalSpace α\ns✝ t✝ u v : Set α\ninst✝² : LinearOrder β\ninst✝¹ : SuccOrder β\ninst✝ : IsSuccArchimedean β\ns : β → Set α\nt : Set β\nht : OrdConnected t\nH : ∀ (n : β), n ∈ t → IsPreconnected (s n)\nK : ∀ (n : β), n ∈ t → succ n ∈ t → Set.Nonempty (s n ∩ s (succ n))\nh1 : ∀ {i j k : β}, i ∈ t → j ∈ t → k ∈ Ico i j → k ∈ t\nh2 : ∀ {i j k : β}, i ∈ t → j ∈ t → k ∈ Ico i j → succ k ∈ t\nh3 : ∀ {i j k : β}, i ∈ t → j ∈ t → k ∈ Ico i j → Set.Nonempty (s k ∩ s (succ k))\ni : β\nhi : i ∈ t\nj : β\nhj : j ∈ t\nk : β\nhk : k ∈ Ico j i\n⊢ Set.Nonempty (s (succ k) ∩ s k)\n[PROOFSTEP]\nrw [inter_comm]\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝³ : TopologicalSpace α\ns✝ t✝ u v : Set α\ninst✝² : LinearOrder β\ninst✝¹ : SuccOrder β\ninst✝ : IsSuccArchimedean β\ns : β → Set α\nt : Set β\nht : OrdConnected t\nH : ∀ (n : β), n ∈ t → IsPreconnected (s n)\nK : ∀ (n : β), n ∈ t → succ n ∈ t → Set.Nonempty (s n ∩ s (succ n))\nh1 : ∀ {i j k : β}, i ∈ t → j ∈ t → k ∈ Ico i j → k ∈ t\nh2 : ∀ {i j k : β}, i ∈ t → j ∈ t → k ∈ Ico i j → succ k ∈ t\nh3 : ∀ {i j k : β}, i ∈ t → j ∈ t → k ∈ Ico i j → Set.Nonempty (s k ∩ s (succ k))\ni : β\nhi : i ∈ t\nj : β\nhj : j ∈ t\nk : β\nhk : k ∈ Ico j i\n⊢ Set.Nonempty (s k ∩ s (succ k))\n[PROOFSTEP]\nexact h3 hj hi hk\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u v : Set α\ninst✝ : TopologicalSpace β\ns : Set α\nH : IsPreconnected s\nf : α → β\nhf : ContinuousOn f s\n⊢ IsPreconnected (f '' s)\n[PROOFSTEP]\nrintro u v hu hv huv ⟨_, ⟨x, xs, rfl⟩, xu⟩ ⟨_, ⟨y, ys, rfl⟩, yv⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u✝ v✝ : Set α\ninst✝ : TopologicalSpace β\ns : Set α\nH : IsPreconnected s\nf : α → β\nhf : ContinuousOn f s\nu v : Set β\nhu : IsOpen u\nhv : IsOpen v\nhuv : f '' s ⊆ u ∪ v\nx : α\nxs : x ∈ s\nxu : f x ∈ u\ny : α\nys : y ∈ s\nyv : f y ∈ v\n⊢ Set.Nonempty (f '' s ∩ (u ∩ v))\n[PROOFSTEP]\nrcases continuousOn_iff'.1 hf u hu with ⟨u', hu', u'_eq⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u✝ v✝ : Set α\ninst✝ : TopologicalSpace β\ns : Set α\nH : IsPreconnected s\nf : α → β\nhf : ContinuousOn f s\nu v : Set β\nhu : IsOpen u\nhv : IsOpen v\nhuv : f '' s ⊆ u ∪ v\nx : α\nxs : x ∈ s\nxu : f x ∈ u\ny : α\nys : y ∈ s\nyv : f y ∈ v\nu' : Set α\nhu' : IsOpen u'\nu'_eq : f ⁻¹' u ∩ s = u' ∩ s\n⊢ Set.Nonempty (f '' s ∩ (u ∩ v))\n[PROOFSTEP]\nrcases continuousOn_iff'.1 hf v hv with\n  ⟨v', hv', v'_eq⟩\n    -- Reformulate `huv : f '' s ⊆ u ∪ v` in terms of `u'` and `v'`\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u✝ v✝ : Set α\ninst✝ : TopologicalSpace β\ns : Set α\nH : IsPreconnected s\nf : α → β\nhf : ContinuousOn f s\nu v : Set β\nhu : IsOpen u\nhv : IsOpen v\nhuv : f '' s ⊆ u ∪ v\nx : α\nxs : x ∈ s\nxu : f x ∈ u\ny : α\nys : y ∈ s\nyv : f y ∈ v\nu' : Set α\nhu' : IsOpen u'\nu'_eq : f ⁻¹' u ∩ s = u' ∩ s\nv' : Set α\nhv' : IsOpen v'\nv'_eq : f ⁻¹' v ∩ s = v' ∩ s\n⊢ Set.Nonempty (f '' s ∩ (u ∩ v))\n[PROOFSTEP]\nreplace huv : s ⊆ u' ∪ v'\n[GOAL]\ncase huv\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u✝ v✝ : Set α\ninst✝ : TopologicalSpace β\ns : Set α\nH : IsPreconnected s\nf : α → β\nhf : ContinuousOn f s\nu v : Set β\nhu : IsOpen u\nhv : IsOpen v\nhuv : f '' s ⊆ u ∪ v\nx : α\nxs : x ∈ s\nxu : f x ∈ u\ny : α\nys : y ∈ s\nyv : f y ∈ v\nu' : Set α\nhu' : IsOpen u'\nu'_eq : f ⁻¹' u ∩ s = u' ∩ s\nv' : Set α\nhv' : IsOpen v'\nv'_eq : f ⁻¹' v ∩ s = v' ∩ s\n⊢ s ⊆ u' ∪ v'\n[PROOFSTEP]\nrw [image_subset_iff, preimage_union] at huv \n[GOAL]\ncase huv\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u✝ v✝ : Set α\ninst✝ : TopologicalSpace β\ns : Set α\nH : IsPreconnected s\nf : α → β\nhf : ContinuousOn f s\nu v : Set β\nhu : IsOpen u\nhv : IsOpen v\nhuv : s ⊆ f ⁻¹' u ∪ f ⁻¹' v\nx : α\nxs : x ∈ s\nxu : f x ∈ u\ny : α\nys : y ∈ s\nyv : f y ∈ v\nu' : Set α\nhu' : IsOpen u'\nu'_eq : f ⁻¹' u ∩ s = u' ∩ s\nv' : Set α\nhv' : IsOpen v'\nv'_eq : f ⁻¹' v ∩ s = v' ∩ s\n⊢ s ⊆ u' ∪ v'\n[PROOFSTEP]\nreplace huv := subset_inter huv Subset.rfl\n[GOAL]\ncase huv\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u✝ v✝ : Set α\ninst✝ : TopologicalSpace β\ns : Set α\nH : IsPreconnected s\nf : α → β\nhf : ContinuousOn f s\nu v : Set β\nhu : IsOpen u\nhv : IsOpen v\nx : α\nxs : x ∈ s\nxu : f x ∈ u\ny : α\nys : y ∈ s\nyv : f y ∈ v\nu' : Set α\nhu' : IsOpen u'\nu'_eq : f ⁻¹' u ∩ s = u' ∩ s\nv' : Set α\nhv' : IsOpen v'\nv'_eq : f ⁻¹' v ∩ s = v' ∩ s\nhuv : s ⊆ (f ⁻¹' u ∪ f ⁻¹' v) ∩ s\n⊢ s ⊆ u' ∪ v'\n[PROOFSTEP]\nrw [inter_distrib_right, u'_eq, v'_eq, ← inter_distrib_right] at huv \n[GOAL]\ncase huv\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u✝ v✝ : Set α\ninst✝ : TopologicalSpace β\ns : Set α\nH : IsPreconnected s\nf : α → β\nhf : ContinuousOn f s\nu v : Set β\nhu : IsOpen u\nhv : IsOpen v\nx : α\nxs : x ∈ s\nxu : f x ∈ u\ny : α\nys : y ∈ s\nyv : f y ∈ v\nu' : Set α\nhu' : IsOpen u'\nu'_eq : f ⁻¹' u ∩ s = u' ∩ s\nv' : Set α\nhv' : IsOpen v'\nv'_eq : f ⁻¹' v ∩ s = v' ∩ s\nhuv : s ⊆ (u' ∪ v') ∩ s\n⊢ s ⊆ u' ∪ v'\n[PROOFSTEP]\nexact\n  (subset_inter_iff.1 huv).1\n    -- Now `s ⊆ u' ∪ v'`, so we can apply `‹IsPreconnected s›`\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u✝ v✝ : Set α\ninst✝ : TopologicalSpace β\ns : Set α\nH : IsPreconnected s\nf : α → β\nhf : ContinuousOn f s\nu v : Set β\nhu : IsOpen u\nhv : IsOpen v\nx : α\nxs : x ∈ s\nxu : f x ∈ u\ny : α\nys : y ∈ s\nyv : f y ∈ v\nu' : Set α\nhu' : IsOpen u'\nu'_eq : f ⁻¹' u ∩ s = u' ∩ s\nv' : Set α\nhv' : IsOpen v'\nv'_eq : f ⁻¹' v ∩ s = v' ∩ s\nhuv : s ⊆ u' ∪ v'\n⊢ Set.Nonempty (f '' s ∩ (u ∩ v))\n[PROOFSTEP]\nobtain ⟨z, hz⟩ : (s ∩ (u' ∩ v')).Nonempty :=\n  by\n  refine H u' v' hu' hv' huv ⟨x, ?_⟩ ⟨y, ?_⟩ <;> rw [inter_comm]\n  exacts [u'_eq ▸ ⟨xu, xs⟩, v'_eq ▸ ⟨yv, ys⟩]\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u✝ v✝ : Set α\ninst✝ : TopologicalSpace β\ns : Set α\nH : IsPreconnected s\nf : α → β\nhf : ContinuousOn f s\nu v : Set β\nhu : IsOpen u\nhv : IsOpen v\nx : α\nxs : x ∈ s\nxu : f x ∈ u\ny : α\nys : y ∈ s\nyv : f y ∈ v\nu' : Set α\nhu' : IsOpen u'\nu'_eq : f ⁻¹' u ∩ s = u' ∩ s\nv' : Set α\nhv' : IsOpen v'\nv'_eq : f ⁻¹' v ∩ s = v' ∩ s\nhuv : s ⊆ u' ∪ v'\n⊢ Set.Nonempty (s ∩ (u' ∩ v'))\n[PROOFSTEP]\nrefine H u' v' hu' hv' huv ⟨x, ?_⟩ ⟨y, ?_⟩\n[GOAL]\ncase refine_1\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u✝ v✝ : Set α\ninst✝ : TopologicalSpace β\ns : Set α\nH : IsPreconnected s\nf : α → β\nhf : ContinuousOn f s\nu v : Set β\nhu : IsOpen u\nhv : IsOpen v\nx : α\nxs : x ∈ s\nxu : f x ∈ u\ny : α\nys : y ∈ s\nyv : f y ∈ v\nu' : Set α\nhu' : IsOpen u'\nu'_eq : f ⁻¹' u ∩ s = u' ∩ s\nv' : Set α\nhv' : IsOpen v'\nv'_eq : f ⁻¹' v ∩ s = v' ∩ s\nhuv : s ⊆ u' ∪ v'\n⊢ x ∈ s ∩ u'\n[PROOFSTEP]\nrw [inter_comm]\n[GOAL]\ncase refine_2\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u✝ v✝ : Set α\ninst✝ : TopologicalSpace β\ns : Set α\nH : IsPreconnected s\nf : α → β\nhf : ContinuousOn f s\nu v : Set β\nhu : IsOpen u\nhv : IsOpen v\nx : α\nxs : x ∈ s\nxu : f x ∈ u\ny : α\nys : y ∈ s\nyv : f y ∈ v\nu' : Set α\nhu' : IsOpen u'\nu'_eq : f ⁻¹' u ∩ s = u' ∩ s\nv' : Set α\nhv' : IsOpen v'\nv'_eq : f ⁻¹' v ∩ s = v' ∩ s\nhuv : s ⊆ u' ∪ v'\n⊢ y ∈ s ∩ v'\n[PROOFSTEP]\nrw [inter_comm]\n[GOAL]\ncase refine_1\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u✝ v✝ : Set α\ninst✝ : TopologicalSpace β\ns : Set α\nH : IsPreconnected s\nf : α → β\nhf : ContinuousOn f s\nu v : Set β\nhu : IsOpen u\nhv : IsOpen v\nx : α\nxs : x ∈ s\nxu : f x ∈ u\ny : α\nys : y ∈ s\nyv : f y ∈ v\nu' : Set α\nhu' : IsOpen u'\nu'_eq : f ⁻¹' u ∩ s = u' ∩ s\nv' : Set α\nhv' : IsOpen v'\nv'_eq : f ⁻¹' v ∩ s = v' ∩ s\nhuv : s ⊆ u' ∪ v'\n⊢ x ∈ u' ∩ s\ncase refine_2\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u✝ v✝ : Set α\ninst✝ : TopologicalSpace β\ns : Set α\nH : IsPreconnected s\nf : α → β\nhf : ContinuousOn f s\nu v : Set β\nhu : IsOpen u\nhv : IsOpen v\nx : α\nxs : x ∈ s\nxu : f x ∈ u\ny : α\nys : y ∈ s\nyv : f y ∈ v\nu' : Set α\nhu' : IsOpen u'\nu'_eq : f ⁻¹' u ∩ s = u' ∩ s\nv' : Set α\nhv' : IsOpen v'\nv'_eq : f ⁻¹' v ∩ s = v' ∩ s\nhuv : s ⊆ u' ∪ v'\n⊢ y ∈ v' ∩ s\n[PROOFSTEP]\nexacts [u'_eq ▸ ⟨xu, xs⟩, v'_eq ▸ ⟨yv, ys⟩]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u✝ v✝ : Set α\ninst✝ : TopologicalSpace β\ns : Set α\nH : IsPreconnected s\nf : α → β\nhf : ContinuousOn f s\nu v : Set β\nhu : IsOpen u\nhv : IsOpen v\nx : α\nxs : x ∈ s\nxu : f x ∈ u\ny : α\nys : y ∈ s\nyv : f y ∈ v\nu' : Set α\nhu' : IsOpen u'\nu'_eq : f ⁻¹' u ∩ s = u' ∩ s\nv' : Set α\nhv' : IsOpen v'\nv'_eq : f ⁻¹' v ∩ s = v' ∩ s\nhuv : s ⊆ u' ∪ v'\nz : α\nhz : z ∈ s ∩ (u' ∩ v')\n⊢ Set.Nonempty (f '' s ∩ (u ∩ v))\n[PROOFSTEP]\nrw [← inter_self s, inter_assoc, inter_left_comm s u', ← inter_assoc, inter_comm s, inter_comm s, ← u'_eq, ← v'_eq] at\n  hz \n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u✝ v✝ : Set α\ninst✝ : TopologicalSpace β\ns : Set α\nH : IsPreconnected s\nf : α → β\nhf : ContinuousOn f s\nu v : Set β\nhu : IsOpen u\nhv : IsOpen v\nx : α\nxs : x ∈ s\nxu : f x ∈ u\ny : α\nys : y ∈ s\nyv : f y ∈ v\nu' : Set α\nhu' : IsOpen u'\nu'_eq : f ⁻¹' u ∩ s = u' ∩ s\nv' : Set α\nhv' : IsOpen v'\nv'_eq : f ⁻¹' v ∩ s = v' ∩ s\nhuv : s ⊆ u' ∪ v'\nz : α\nhz : z ∈ f ⁻¹' u ∩ s ∩ (f ⁻¹' v ∩ s)\n⊢ Set.Nonempty (f '' s ∩ (u ∩ v))\n[PROOFSTEP]\nexact ⟨f z, ⟨z, hz.1.2, rfl⟩, hz.1.1, hz.2.1⟩\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u v s : Set α\n⊢ IsPreconnected s →\n    ∀ (t t' : Set α),\n      IsClosed t → IsClosed t' → s ⊆ t ∪ t' → Set.Nonempty (s ∩ t) → Set.Nonempty (s ∩ t') → Set.Nonempty (s ∩ (t ∩ t'))\n[PROOFSTEP]\nrintro h t t' ht ht' htt' ⟨x, xs, xt⟩ ⟨y, ys, yt'⟩\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t✝ u v s : Set α\nh : IsPreconnected s\nt t' : Set α\nht : IsClosed t\nht' : IsClosed t'\nhtt' : s ⊆ t ∪ t'\nx : α\nxs : x ∈ s\nxt : x ∈ t\ny : α\nys : y ∈ s\nyt' : y ∈ t'\n⊢ Set.Nonempty (s ∩ (t ∩ t'))\n[PROOFSTEP]\nrw [← not_disjoint_iff_nonempty_inter, ← subset_compl_iff_disjoint_right, compl_inter]\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t✝ u v s : Set α\nh : IsPreconnected s\nt t' : Set α\nht : IsClosed t\nht' : IsClosed t'\nhtt' : s ⊆ t ∪ t'\nx : α\nxs : x ∈ s\nxt : x ∈ t\ny : α\nys : y ∈ s\nyt' : y ∈ t'\n⊢ ¬s ⊆ tᶜ ∪ t'ᶜ\n[PROOFSTEP]\nintro h'\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t✝ u v s : Set α\nh : IsPreconnected s\nt t' : Set α\nht : IsClosed t\nht' : IsClosed t'\nhtt' : s ⊆ t ∪ t'\nx : α\nxs : x ∈ s\nxt : x ∈ t\ny : α\nys : y ∈ s\nyt' : y ∈ t'\nh' : s ⊆ tᶜ ∪ t'ᶜ\n⊢ False\n[PROOFSTEP]\nhave xt' : x ∉ t' := (h' xs).resolve_left (absurd xt)\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t✝ u v s : Set α\nh : IsPreconnected s\nt t' : Set α\nht : IsClosed t\nht' : IsClosed t'\nhtt' : s ⊆ t ∪ t'\nx : α\nxs : x ∈ s\nxt : x ∈ t\ny : α\nys : y ∈ s\nyt' : y ∈ t'\nh' : s ⊆ tᶜ ∪ t'ᶜ\nxt' : ¬x ∈ t'\n⊢ False\n[PROOFSTEP]\nhave yt : y ∉ t := (h' ys).resolve_right (absurd yt')\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t✝ u v s : Set α\nh : IsPreconnected s\nt t' : Set α\nht : IsClosed t\nht' : IsClosed t'\nhtt' : s ⊆ t ∪ t'\nx : α\nxs : x ∈ s\nxt : x ∈ t\ny : α\nys : y ∈ s\nyt' : y ∈ t'\nh' : s ⊆ tᶜ ∪ t'ᶜ\nxt' : ¬x ∈ t'\nyt : ¬y ∈ t\n⊢ False\n[PROOFSTEP]\nhave := h _ _ ht.isOpen_compl ht'.isOpen_compl h' ⟨y, ys, yt⟩ ⟨x, xs, xt'⟩\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t✝ u v s : Set α\nh : IsPreconnected s\nt t' : Set α\nht : IsClosed t\nht' : IsClosed t'\nhtt' : s ⊆ t ∪ t'\nx : α\nxs : x ∈ s\nxt : x ∈ t\ny : α\nys : y ∈ s\nyt' : y ∈ t'\nh' : s ⊆ tᶜ ∪ t'ᶜ\nxt' : ¬x ∈ t'\nyt : ¬y ∈ t\nthis : Set.Nonempty (s ∩ (tᶜ ∩ t'ᶜ))\n⊢ False\n[PROOFSTEP]\nrw [← compl_union] at this \n[GOAL]\ncase intro.intro.intro.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t✝ u v s : Set α\nh : IsPreconnected s\nt t' : Set α\nht : IsClosed t\nht' : IsClosed t'\nhtt' : s ⊆ t ∪ t'\nx : α\nxs : x ∈ s\nxt : x ∈ t\ny : α\nys : y ∈ s\nyt' : y ∈ t'\nh' : s ⊆ tᶜ ∪ t'ᶜ\nxt' : ¬x ∈ t'\nyt : ¬y ∈ t\nthis : Set.Nonempty (s ∩ (t ∪ t')ᶜ)\n⊢ False\n[PROOFSTEP]\nexact this.ne_empty htt'.disjoint_compl_right.inter_eq\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u v s : Set α\n⊢ (∀ (t t' : Set α),\n      IsClosed t →\n        IsClosed t' → s ⊆ t ∪ t' → Set.Nonempty (s ∩ t) → Set.Nonempty (s ∩ t') → Set.Nonempty (s ∩ (t ∩ t'))) →\n    IsPreconnected s\n[PROOFSTEP]\nrintro h u v hu hv huv ⟨x, xs, xu⟩ ⟨y, ys, yv⟩\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u✝ v✝ s : Set α\nh :\n  ∀ (t t' : Set α),\n    IsClosed t → IsClosed t' → s ⊆ t ∪ t' → Set.Nonempty (s ∩ t) → Set.Nonempty (s ∩ t') → Set.Nonempty (s ∩ (t ∩ t'))\nu v : Set α\nhu : IsOpen u\nhv : IsOpen v\nhuv : s ⊆ u ∪ v\nx : α\nxs : x ∈ s\nxu : x ∈ u\ny : α\nys : y ∈ s\nyv : y ∈ v\n⊢ Set.Nonempty (s ∩ (u ∩ v))\n[PROOFSTEP]\nrw [← not_disjoint_iff_nonempty_inter, ← subset_compl_iff_disjoint_right, compl_inter]\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u✝ v✝ s : Set α\nh :\n  ∀ (t t' : Set α),\n    IsClosed t → IsClosed t' → s ⊆ t ∪ t' → Set.Nonempty (s ∩ t) → Set.Nonempty (s ∩ t') → Set.Nonempty (s ∩ (t ∩ t'))\nu v : Set α\nhu : IsOpen u\nhv : IsOpen v\nhuv : s ⊆ u ∪ v\nx : α\nxs : x ∈ s\nxu : x ∈ u\ny : α\nys : y ∈ s\nyv : y ∈ v\n⊢ ¬s ⊆ uᶜ ∪ vᶜ\n[PROOFSTEP]\nintro h'\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u✝ v✝ s : Set α\nh :\n  ∀ (t t' : Set α),\n    IsClosed t → IsClosed t' → s ⊆ t ∪ t' → Set.Nonempty (s ∩ t) → Set.Nonempty (s ∩ t') → Set.Nonempty (s ∩ (t ∩ t'))\nu v : Set α\nhu : IsOpen u\nhv : IsOpen v\nhuv : s ⊆ u ∪ v\nx : α\nxs : x ∈ s\nxu : x ∈ u\ny : α\nys : y ∈ s\nyv : y ∈ v\nh' : s ⊆ uᶜ ∪ vᶜ\n⊢ False\n[PROOFSTEP]\nhave xv : x ∉ v := (h' xs).elim (absurd xu) id\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u✝ v✝ s : Set α\nh :\n  ∀ (t t' : Set α),\n    IsClosed t → IsClosed t' → s ⊆ t ∪ t' → Set.Nonempty (s ∩ t) → Set.Nonempty (s ∩ t') → Set.Nonempty (s ∩ (t ∩ t'))\nu v : Set α\nhu : IsOpen u\nhv : IsOpen v\nhuv : s ⊆ u ∪ v\nx : α\nxs : x ∈ s\nxu : x ∈ u\ny : α\nys : y ∈ s\nyv : y ∈ v\nh' : s ⊆ uᶜ ∪ vᶜ\nxv : ¬x ∈ v\n⊢ False\n[PROOFSTEP]\nhave yu : y ∉ u := (h' ys).elim id (absurd yv)\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u✝ v✝ s : Set α\nh :\n  ∀ (t t' : Set α),\n    IsClosed t → IsClosed t' → s ⊆ t ∪ t' → Set.Nonempty (s ∩ t) → Set.Nonempty (s ∩ t') → Set.Nonempty (s ∩ (t ∩ t'))\nu v : Set α\nhu : IsOpen u\nhv : IsOpen v\nhuv : s ⊆ u ∪ v\nx : α\nxs : x ∈ s\nxu : x ∈ u\ny : α\nys : y ∈ s\nyv : y ∈ v\nh' : s ⊆ uᶜ ∪ vᶜ\nxv : ¬x ∈ v\nyu : ¬y ∈ u\n⊢ False\n[PROOFSTEP]\nhave := h _ _ hu.isClosed_compl hv.isClosed_compl h' ⟨y, ys, yu⟩ ⟨x, xs, xv⟩\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u✝ v✝ s : Set α\nh :\n  ∀ (t t' : Set α),\n    IsClosed t → IsClosed t' → s ⊆ t ∪ t' → Set.Nonempty (s ∩ t) → Set.Nonempty (s ∩ t') → Set.Nonempty (s ∩ (t ∩ t'))\nu v : Set α\nhu : IsOpen u\nhv : IsOpen v\nhuv : s ⊆ u ∪ v\nx : α\nxs : x ∈ s\nxu : x ∈ u\ny : α\nys : y ∈ s\nyv : y ∈ v\nh' : s ⊆ uᶜ ∪ vᶜ\nxv : ¬x ∈ v\nyu : ¬y ∈ u\nthis : Set.Nonempty (s ∩ (uᶜ ∩ vᶜ))\n⊢ False\n[PROOFSTEP]\nrw [← compl_union] at this \n[GOAL]\ncase intro.intro.intro.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u✝ v✝ s : Set α\nh :\n  ∀ (t t' : Set α),\n    IsClosed t → IsClosed t' → s ⊆ t ∪ t' → Set.Nonempty (s ∩ t) → Set.Nonempty (s ∩ t') → Set.Nonempty (s ∩ (t ∩ t'))\nu v : Set α\nhu : IsOpen u\nhv : IsOpen v\nhuv : s ⊆ u ∪ v\nx : α\nxs : x ∈ s\nxu : x ∈ u\ny : α\nys : y ∈ s\nyv : y ∈ v\nh' : s ⊆ uᶜ ∪ vᶜ\nxv : ¬x ∈ v\nyu : ¬y ∈ u\nthis : Set.Nonempty (s ∩ (u ∪ v)ᶜ)\n⊢ False\n[PROOFSTEP]\nexact this.ne_empty huv.disjoint_compl_right.inter_eq\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u v : Set α\ninst✝ : TopologicalSpace β\ns : Set α\nf : α → β\nhf : Inducing f\n⊢ IsPreconnected (f '' s) ↔ IsPreconnected s\n[PROOFSTEP]\nrefine' ⟨fun h => _, fun h => h.image _ hf.continuous.continuousOn⟩\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u v : Set α\ninst✝ : TopologicalSpace β\ns : Set α\nf : α → β\nhf : Inducing f\nh : IsPreconnected (f '' s)\n⊢ IsPreconnected s\n[PROOFSTEP]\nrintro u v hu' hv' huv ⟨x, hxs, hxu⟩ ⟨y, hys, hyv⟩\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u✝ v✝ : Set α\ninst✝ : TopologicalSpace β\ns : Set α\nf : α → β\nhf : Inducing f\nh : IsPreconnected (f '' s)\nu v : Set α\nhu' : IsOpen u\nhv' : IsOpen v\nhuv : s ⊆ u ∪ v\nx : α\nhxs : x ∈ s\nhxu : x ∈ u\ny : α\nhys : y ∈ s\nhyv : y ∈ v\n⊢ Set.Nonempty (s ∩ (u ∩ v))\n[PROOFSTEP]\nrcases hf.isOpen_iff.1 hu' with ⟨u, hu, rfl⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u✝ v✝ : Set α\ninst✝ : TopologicalSpace β\ns : Set α\nf : α → β\nhf : Inducing f\nh : IsPreconnected (f '' s)\nv : Set α\nhv' : IsOpen v\nx : α\nhxs : x ∈ s\ny : α\nhys : y ∈ s\nhyv : y ∈ v\nu : Set β\nhu : IsOpen u\nhu' : IsOpen (f ⁻¹' u)\nhuv : s ⊆ f ⁻¹' u ∪ v\nhxu : x ∈ f ⁻¹' u\n⊢ Set.Nonempty (s ∩ (f ⁻¹' u ∩ v))\n[PROOFSTEP]\nrcases hf.isOpen_iff.1 hv' with ⟨v, hv, rfl⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u✝ v✝ : Set α\ninst✝ : TopologicalSpace β\ns : Set α\nf : α → β\nhf : Inducing f\nh : IsPreconnected (f '' s)\nx : α\nhxs : x ∈ s\ny : α\nhys : y ∈ s\nu : Set β\nhu : IsOpen u\nhu' : IsOpen (f ⁻¹' u)\nhxu : x ∈ f ⁻¹' u\nv : Set β\nhv : IsOpen v\nhv' : IsOpen (f ⁻¹' v)\nhyv : y ∈ f ⁻¹' v\nhuv : s ⊆ f ⁻¹' u ∪ f ⁻¹' v\n⊢ Set.Nonempty (s ∩ (f ⁻¹' u ∩ f ⁻¹' v))\n[PROOFSTEP]\nreplace huv : f '' s ⊆ u ∪ v\n[GOAL]\ncase huv\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u✝ v✝ : Set α\ninst✝ : TopologicalSpace β\ns : Set α\nf : α → β\nhf : Inducing f\nh : IsPreconnected (f '' s)\nx : α\nhxs : x ∈ s\ny : α\nhys : y ∈ s\nu : Set β\nhu : IsOpen u\nhu' : IsOpen (f ⁻¹' u)\nhxu : x ∈ f ⁻¹' u\nv : Set β\nhv : IsOpen v\nhv' : IsOpen (f ⁻¹' v)\nhyv : y ∈ f ⁻¹' v\nhuv : s ⊆ f ⁻¹' u ∪ f ⁻¹' v\n⊢ f '' s ⊆ u ∪ v\n[PROOFSTEP]\nrwa [image_subset_iff]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u✝ v✝ : Set α\ninst✝ : TopologicalSpace β\ns : Set α\nf : α → β\nhf : Inducing f\nh : IsPreconnected (f '' s)\nx : α\nhxs : x ∈ s\ny : α\nhys : y ∈ s\nu : Set β\nhu : IsOpen u\nhu' : IsOpen (f ⁻¹' u)\nhxu : x ∈ f ⁻¹' u\nv : Set β\nhv : IsOpen v\nhv' : IsOpen (f ⁻¹' v)\nhyv : y ∈ f ⁻¹' v\nhuv : f '' s ⊆ u ∪ v\n⊢ Set.Nonempty (s ∩ (f ⁻¹' u ∩ f ⁻¹' v))\n[PROOFSTEP]\nrcases h u v hu hv huv ⟨f x, mem_image_of_mem _ hxs, hxu⟩ ⟨f y, mem_image_of_mem _ hys, hyv⟩ with\n  ⟨_, ⟨z, hzs, rfl⟩, hzuv⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u✝ v✝ : Set α\ninst✝ : TopologicalSpace β\ns : Set α\nf : α → β\nhf : Inducing f\nh : IsPreconnected (f '' s)\nx : α\nhxs : x ∈ s\ny : α\nhys : y ∈ s\nu : Set β\nhu : IsOpen u\nhu' : IsOpen (f ⁻¹' u)\nhxu : x ∈ f ⁻¹' u\nv : Set β\nhv : IsOpen v\nhv' : IsOpen (f ⁻¹' v)\nhyv : y ∈ f ⁻¹' v\nhuv : f '' s ⊆ u ∪ v\nz : α\nhzs : z ∈ s\nhzuv : f z ∈ u ∩ v\n⊢ Set.Nonempty (s ∩ (f ⁻¹' u ∩ f ⁻¹' v))\n[PROOFSTEP]\nexact ⟨z, hzs, hzuv⟩\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u✝ v✝ : Set α\ninst✝ : TopologicalSpace β\ns : Set β\nhs : IsPreconnected s\nf : α → β\nhinj : Injective f\nhf : IsOpenMap f\nhsf : s ⊆ range f\nu v : Set α\nhu : IsOpen u\nhv : IsOpen v\nhsuv : f ⁻¹' s ⊆ u ∪ v\nhsu : Set.Nonempty (f ⁻¹' s ∩ u)\nhsv : Set.Nonempty (f ⁻¹' s ∩ v)\n⊢ Set.Nonempty (f ⁻¹' s ∩ (u ∩ v))\n[PROOFSTEP]\nreplace hsf : f '' (f ⁻¹' s) = s := image_preimage_eq_of_subset hsf\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u✝ v✝ : Set α\ninst✝ : TopologicalSpace β\ns : Set β\nhs : IsPreconnected s\nf : α → β\nhinj : Injective f\nhf : IsOpenMap f\nu v : Set α\nhu : IsOpen u\nhv : IsOpen v\nhsuv : f ⁻¹' s ⊆ u ∪ v\nhsu : Set.Nonempty (f ⁻¹' s ∩ u)\nhsv : Set.Nonempty (f ⁻¹' s ∩ v)\nhsf : f '' (f ⁻¹' s) = s\n⊢ Set.Nonempty (f ⁻¹' s ∩ (u ∩ v))\n[PROOFSTEP]\nobtain ⟨_, has, ⟨a, hau, rfl⟩, hav⟩ : (s ∩ (f '' u ∩ f '' v)).Nonempty\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u✝ v✝ : Set α\ninst✝ : TopologicalSpace β\ns : Set β\nhs : IsPreconnected s\nf : α → β\nhinj : Injective f\nhf : IsOpenMap f\nu v : Set α\nhu : IsOpen u\nhv : IsOpen v\nhsuv : f ⁻¹' s ⊆ u ∪ v\nhsu : Set.Nonempty (f ⁻¹' s ∩ u)\nhsv : Set.Nonempty (f ⁻¹' s ∩ v)\nhsf : f '' (f ⁻¹' s) = s\n⊢ Set.Nonempty (s ∩ (f '' u ∩ f '' v))\n[PROOFSTEP]\nrefine hs (f '' u) (f '' v) (hf u hu) (hf v hv) ?_ ?_ ?_\n[GOAL]\ncase refine_1\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u✝ v✝ : Set α\ninst✝ : TopologicalSpace β\ns : Set β\nhs : IsPreconnected s\nf : α → β\nhinj : Injective f\nhf : IsOpenMap f\nu v : Set α\nhu : IsOpen u\nhv : IsOpen v\nhsuv : f ⁻¹' s ⊆ u ∪ v\nhsu : Set.Nonempty (f ⁻¹' s ∩ u)\nhsv : Set.Nonempty (f ⁻¹' s ∩ v)\nhsf : f '' (f ⁻¹' s) = s\n⊢ s ⊆ f '' u ∪ f '' v\n[PROOFSTEP]\nsimpa only [hsf, image_union] using image_subset f hsuv\n[GOAL]\ncase refine_2\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u✝ v✝ : Set α\ninst✝ : TopologicalSpace β\ns : Set β\nhs : IsPreconnected s\nf : α → β\nhinj : Injective f\nhf : IsOpenMap f\nu v : Set α\nhu : IsOpen u\nhv : IsOpen v\nhsuv : f ⁻¹' s ⊆ u ∪ v\nhsu : Set.Nonempty (f ⁻¹' s ∩ u)\nhsv : Set.Nonempty (f ⁻¹' s ∩ v)\nhsf : f '' (f ⁻¹' s) = s\n⊢ Set.Nonempty (s ∩ f '' u)\n[PROOFSTEP]\nsimpa only [image_preimage_inter] using hsu.image f\n[GOAL]\ncase refine_3\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u✝ v✝ : Set α\ninst✝ : TopologicalSpace β\ns : Set β\nhs : IsPreconnected s\nf : α → β\nhinj : Injective f\nhf : IsOpenMap f\nu v : Set α\nhu : IsOpen u\nhv : IsOpen v\nhsuv : f ⁻¹' s ⊆ u ∪ v\nhsu : Set.Nonempty (f ⁻¹' s ∩ u)\nhsv : Set.Nonempty (f ⁻¹' s ∩ v)\nhsf : f '' (f ⁻¹' s) = s\n⊢ Set.Nonempty (s ∩ f '' v)\n[PROOFSTEP]\nsimpa only [image_preimage_inter] using hsv.image f\n[GOAL]\ncase intro.intro.intro.intro.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u✝ v✝ : Set α\ninst✝ : TopologicalSpace β\ns : Set β\nhs : IsPreconnected s\nf : α → β\nhinj : Injective f\nhf : IsOpenMap f\nu v : Set α\nhu : IsOpen u\nhv : IsOpen v\nhsuv : f ⁻¹' s ⊆ u ∪ v\nhsu : Set.Nonempty (f ⁻¹' s ∩ u)\nhsv : Set.Nonempty (f ⁻¹' s ∩ v)\nhsf : f '' (f ⁻¹' s) = s\na : α\nhau : a ∈ u\nhas : f a ∈ s\nhav : f a ∈ f '' v\n⊢ Set.Nonempty (f ⁻¹' s ∩ (u ∩ v))\n[PROOFSTEP]\nexact ⟨a, has, hau, hinj.mem_set_image.1 hav⟩\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u✝ v✝ : Set α\ninst✝ : TopologicalSpace β\ns : Set β\nhs : IsPreconnected s\nf : α → β\nhinj : Injective f\nhf : IsClosedMap f\nhsf : s ⊆ range f\nu v : Set α\nhu : IsClosed u\nhv : IsClosed v\nhsuv : f ⁻¹' s ⊆ u ∪ v\nhsu : Set.Nonempty (f ⁻¹' s ∩ u)\nhsv : Set.Nonempty (f ⁻¹' s ∩ v)\n⊢ Set.Nonempty (f ⁻¹' s ∩ (u ∩ v))\n[PROOFSTEP]\nreplace hsf : f '' (f ⁻¹' s) = s := image_preimage_eq_of_subset hsf\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u✝ v✝ : Set α\ninst✝ : TopologicalSpace β\ns : Set β\nhs : IsPreconnected s\nf : α → β\nhinj : Injective f\nhf : IsClosedMap f\nu v : Set α\nhu : IsClosed u\nhv : IsClosed v\nhsuv : f ⁻¹' s ⊆ u ∪ v\nhsu : Set.Nonempty (f ⁻¹' s ∩ u)\nhsv : Set.Nonempty (f ⁻¹' s ∩ v)\nhsf : f '' (f ⁻¹' s) = s\n⊢ Set.Nonempty (f ⁻¹' s ∩ (u ∩ v))\n[PROOFSTEP]\nobtain ⟨_, has, ⟨a, hau, rfl⟩, hav⟩ : (s ∩ (f '' u ∩ f '' v)).Nonempty\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u✝ v✝ : Set α\ninst✝ : TopologicalSpace β\ns : Set β\nhs : IsPreconnected s\nf : α → β\nhinj : Injective f\nhf : IsClosedMap f\nu v : Set α\nhu : IsClosed u\nhv : IsClosed v\nhsuv : f ⁻¹' s ⊆ u ∪ v\nhsu : Set.Nonempty (f ⁻¹' s ∩ u)\nhsv : Set.Nonempty (f ⁻¹' s ∩ v)\nhsf : f '' (f ⁻¹' s) = s\n⊢ Set.Nonempty (s ∩ (f '' u ∩ f '' v))\n[PROOFSTEP]\nrefine isPreconnected_closed_iff.1 hs (f '' u) (f '' v) (hf u hu) (hf v hv) ?_ ?_ ?_\n[GOAL]\ncase refine_1\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u✝ v✝ : Set α\ninst✝ : TopologicalSpace β\ns : Set β\nhs : IsPreconnected s\nf : α → β\nhinj : Injective f\nhf : IsClosedMap f\nu v : Set α\nhu : IsClosed u\nhv : IsClosed v\nhsuv : f ⁻¹' s ⊆ u ∪ v\nhsu : Set.Nonempty (f ⁻¹' s ∩ u)\nhsv : Set.Nonempty (f ⁻¹' s ∩ v)\nhsf : f '' (f ⁻¹' s) = s\n⊢ s ⊆ f '' u ∪ f '' v\n[PROOFSTEP]\nsimpa only [hsf, image_union] using image_subset f hsuv\n[GOAL]\ncase refine_2\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u✝ v✝ : Set α\ninst✝ : TopologicalSpace β\ns : Set β\nhs : IsPreconnected s\nf : α → β\nhinj : Injective f\nhf : IsClosedMap f\nu v : Set α\nhu : IsClosed u\nhv : IsClosed v\nhsuv : f ⁻¹' s ⊆ u ∪ v\nhsu : Set.Nonempty (f ⁻¹' s ∩ u)\nhsv : Set.Nonempty (f ⁻¹' s ∩ v)\nhsf : f '' (f ⁻¹' s) = s\n⊢ Set.Nonempty (s ∩ f '' u)\n[PROOFSTEP]\nsimpa only [image_preimage_inter] using hsu.image f\n[GOAL]\ncase refine_3\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u✝ v✝ : Set α\ninst✝ : TopologicalSpace β\ns : Set β\nhs : IsPreconnected s\nf : α → β\nhinj : Injective f\nhf : IsClosedMap f\nu v : Set α\nhu : IsClosed u\nhv : IsClosed v\nhsuv : f ⁻¹' s ⊆ u ∪ v\nhsu : Set.Nonempty (f ⁻¹' s ∩ u)\nhsv : Set.Nonempty (f ⁻¹' s ∩ v)\nhsf : f '' (f ⁻¹' s) = s\n⊢ Set.Nonempty (s ∩ f '' v)\n[PROOFSTEP]\nsimpa only [image_preimage_inter] using hsv.image f\n[GOAL]\ncase intro.intro.intro.intro.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u✝ v✝ : Set α\ninst✝ : TopologicalSpace β\ns : Set β\nhs : IsPreconnected s\nf : α → β\nhinj : Injective f\nhf : IsClosedMap f\nu v : Set α\nhu : IsClosed u\nhv : IsClosed v\nhsuv : f ⁻¹' s ⊆ u ∪ v\nhsu : Set.Nonempty (f ⁻¹' s ∩ u)\nhsv : Set.Nonempty (f ⁻¹' s ∩ v)\nhsf : f '' (f ⁻¹' s) = s\na : α\nhau : a ∈ u\nhas : f a ∈ s\nhav : f a ∈ f '' v\n⊢ Set.Nonempty (f ⁻¹' s ∩ (u ∩ v))\n[PROOFSTEP]\nexact ⟨a, has, hau, hinj.mem_set_image.1 hav⟩\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\nhu : IsOpen u\nhv : IsOpen v\nhuv : Disjoint u v\nhsuv : s ⊆ u ∪ v\nhs : IsPreconnected s\n⊢ s ⊆ u ∨ s ⊆ v\n[PROOFSTEP]\nspecialize hs u v hu hv hsuv\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\nhu : IsOpen u\nhv : IsOpen v\nhuv : Disjoint u v\nhsuv : s ⊆ u ∪ v\nhs : Set.Nonempty (s ∩ u) → Set.Nonempty (s ∩ v) → Set.Nonempty (s ∩ (u ∩ v))\n⊢ s ⊆ u ∨ s ⊆ v\n[PROOFSTEP]\nobtain hsu | hsu := (s ∩ u).eq_empty_or_nonempty\n[GOAL]\ncase inl\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\nhu : IsOpen u\nhv : IsOpen v\nhuv : Disjoint u v\nhsuv : s ⊆ u ∪ v\nhs : Set.Nonempty (s ∩ u) → Set.Nonempty (s ∩ v) → Set.Nonempty (s ∩ (u ∩ v))\nhsu : s ∩ u = ∅\n⊢ s ⊆ u ∨ s ⊆ v\n[PROOFSTEP]\nexact Or.inr ((Set.disjoint_iff_inter_eq_empty.2 hsu).subset_right_of_subset_union hsuv)\n[GOAL]\ncase inr\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\nhu : IsOpen u\nhv : IsOpen v\nhuv : Disjoint u v\nhsuv : s ⊆ u ∪ v\nhs : Set.Nonempty (s ∩ u) → Set.Nonempty (s ∩ v) → Set.Nonempty (s ∩ (u ∩ v))\nhsu : Set.Nonempty (s ∩ u)\n⊢ s ⊆ u ∨ s ⊆ v\n[PROOFSTEP]\nreplace hs := mt (hs hsu)\n[GOAL]\ncase inr\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\nhu : IsOpen u\nhv : IsOpen v\nhuv : Disjoint u v\nhsuv : s ⊆ u ∪ v\nhsu : Set.Nonempty (s ∩ u)\nhs : ¬Set.Nonempty (s ∩ (u ∩ v)) → ¬Set.Nonempty (s ∩ v)\n⊢ s ⊆ u ∨ s ⊆ v\n[PROOFSTEP]\nsimp_rw [Set.not_nonempty_iff_eq_empty, ← Set.disjoint_iff_inter_eq_empty, disjoint_iff_inter_eq_empty.1 huv] at hs \n[GOAL]\ncase inr\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\nhu : IsOpen u\nhv : IsOpen v\nhuv : Disjoint u v\nhsuv : s ⊆ u ∪ v\nhsu : Set.Nonempty (s ∩ u)\nhs : Disjoint s ∅ → Disjoint s v\n⊢ s ⊆ u ∨ s ⊆ v\n[PROOFSTEP]\nexact Or.inl ((hs s.disjoint_empty).subset_left_of_subset_union hsuv)\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\nhu : IsOpen u\nhv : IsOpen v\nhuv : Disjoint u v\nhsuv : s ⊆ u ∪ v\nhsu : Set.Nonempty (s ∩ u)\nhs : IsPreconnected s\n⊢ Disjoint s v\n[PROOFSTEP]\nby_contra hsv\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\nhu : IsOpen u\nhv : IsOpen v\nhuv : Disjoint u v\nhsuv : s ⊆ u ∪ v\nhsu : Set.Nonempty (s ∩ u)\nhs : IsPreconnected s\nhsv : ¬Disjoint s v\n⊢ False\n[PROOFSTEP]\nrw [not_disjoint_iff_nonempty_inter] at hsv \n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\nhu : IsOpen u\nhv : IsOpen v\nhuv : Disjoint u v\nhsuv : s ⊆ u ∪ v\nhsu : Set.Nonempty (s ∩ u)\nhs : IsPreconnected s\nhsv : Set.Nonempty (s ∩ v)\n⊢ False\n[PROOFSTEP]\nobtain ⟨x, _, hx⟩ := hs u v hu hv hsuv hsu hsv\n[GOAL]\ncase intro.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\nhu : IsOpen u\nhv : IsOpen v\nhuv : Disjoint u v\nhsuv : s ⊆ u ∪ v\nhsu : Set.Nonempty (s ∩ u)\nhs : IsPreconnected s\nhsv : Set.Nonempty (s ∩ v)\nx : α\nleft✝ : x ∈ s\nhx : x ∈ u ∩ v\n⊢ False\n[PROOFSTEP]\nexact Set.disjoint_iff.1 huv hx\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t✝ u v s t : Set α\nhs : IsPreconnected s\nht : IsClopen t\nhne : Set.Nonempty (s ∩ t)\n⊢ s ⊆ t ∪ tᶜ\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\nhs : IsPreconnected s\nhu : IsOpen u\nh'u : Set.Nonempty (s ∩ u)\nh : closure u ∩ s ⊆ u\n⊢ s ⊆ u\n[PROOFSTEP]\nhave A : s ⊆ u ∪ (closure u)ᶜ := by\n  intro x hx\n  by_cases xu : x ∈ u\n  · exact Or.inl xu\n  · right\n    intro h'x\n    exact xu (h (mem_inter h'x hx))\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\nhs : IsPreconnected s\nhu : IsOpen u\nh'u : Set.Nonempty (s ∩ u)\nh : closure u ∩ s ⊆ u\n⊢ s ⊆ u ∪ (closure u)ᶜ\n[PROOFSTEP]\nintro x hx\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\nhs : IsPreconnected s\nhu : IsOpen u\nh'u : Set.Nonempty (s ∩ u)\nh : closure u ∩ s ⊆ u\nx : α\nhx : x ∈ s\n⊢ x ∈ u ∪ (closure u)ᶜ\n[PROOFSTEP]\nby_cases xu : x ∈ u\n[GOAL]\ncase pos\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\nhs : IsPreconnected s\nhu : IsOpen u\nh'u : Set.Nonempty (s ∩ u)\nh : closure u ∩ s ⊆ u\nx : α\nhx : x ∈ s\nxu : x ∈ u\n⊢ x ∈ u ∪ (closure u)ᶜ\n[PROOFSTEP]\nexact Or.inl xu\n[GOAL]\ncase neg\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\nhs : IsPreconnected s\nhu : IsOpen u\nh'u : Set.Nonempty (s ∩ u)\nh : closure u ∩ s ⊆ u\nx : α\nhx : x ∈ s\nxu : ¬x ∈ u\n⊢ x ∈ u ∪ (closure u)ᶜ\n[PROOFSTEP]\nright\n[GOAL]\ncase neg.h\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\nhs : IsPreconnected s\nhu : IsOpen u\nh'u : Set.Nonempty (s ∩ u)\nh : closure u ∩ s ⊆ u\nx : α\nhx : x ∈ s\nxu : ¬x ∈ u\n⊢ x ∈ (closure u)ᶜ\n[PROOFSTEP]\nintro h'x\n[GOAL]\ncase neg.h\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\nhs : IsPreconnected s\nhu : IsOpen u\nh'u : Set.Nonempty (s ∩ u)\nh : closure u ∩ s ⊆ u\nx : α\nhx : x ∈ s\nxu : ¬x ∈ u\nh'x : x ∈ closure u\n⊢ False\n[PROOFSTEP]\nexact xu (h (mem_inter h'x hx))\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\nhs : IsPreconnected s\nhu : IsOpen u\nh'u : Set.Nonempty (s ∩ u)\nh : closure u ∩ s ⊆ u\nA : s ⊆ u ∪ (closure u)ᶜ\n⊢ s ⊆ u\n[PROOFSTEP]\napply hs.subset_left_of_subset_union hu isClosed_closure.isOpen_compl _ A h'u\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\nhs : IsPreconnected s\nhu : IsOpen u\nh'u : Set.Nonempty (s ∩ u)\nh : closure u ∩ s ⊆ u\nA : s ⊆ u ∪ (closure u)ᶜ\n⊢ Disjoint u (closure u)ᶜ\n[PROOFSTEP]\nexact disjoint_compl_right.mono_right (compl_subset_compl.2 subset_closure)\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t✝ u v : Set α\ninst✝ : TopologicalSpace β\ns : Set α\nt : Set β\nhs : IsPreconnected s\nht : IsPreconnected t\n⊢ IsPreconnected (s ×ˢ t)\n[PROOFSTEP]\napply isPreconnected_of_forall_pair\n[GOAL]\ncase H\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t✝ u v : Set α\ninst✝ : TopologicalSpace β\ns : Set α\nt : Set β\nhs : IsPreconnected s\nht : IsPreconnected t\n⊢ ∀ (x : α × β), x ∈ s ×ˢ t → ∀ (y : α × β), y ∈ s ×ˢ t → ∃ t_1, t_1 ⊆ s ×ˢ t ∧ x ∈ t_1 ∧ y ∈ t_1 ∧ IsPreconnected t_1\n[PROOFSTEP]\nrintro ⟨a₁, b₁⟩ ⟨ha₁, hb₁⟩ ⟨a₂, b₂⟩ ⟨ha₂, hb₂⟩\n[GOAL]\ncase H.mk.intro.mk.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t✝ u v : Set α\ninst✝ : TopologicalSpace β\ns : Set α\nt : Set β\nhs : IsPreconnected s\nht : IsPreconnected t\na₁ : α\nb₁ : β\nha₁ : (a₁, b₁).fst ∈ s\nhb₁ : (a₁, b₁).snd ∈ t\na₂ : α\nb₂ : β\nha₂ : (a₂, b₂).fst ∈ s\nhb₂ : (a₂, b₂).snd ∈ t\n⊢ ∃ t_1, t_1 ⊆ s ×ˢ t ∧ (a₁, b₁) ∈ t_1 ∧ (a₂, b₂) ∈ t_1 ∧ IsPreconnected t_1\n[PROOFSTEP]\nrefine' ⟨Prod.mk a₁ '' t ∪ flip Prod.mk b₂ '' s, _, .inl ⟨b₁, hb₁, rfl⟩, .inr ⟨a₂, ha₂, rfl⟩, _⟩\n[GOAL]\ncase H.mk.intro.mk.intro.refine'_1\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t✝ u v : Set α\ninst✝ : TopologicalSpace β\ns : Set α\nt : Set β\nhs : IsPreconnected s\nht : IsPreconnected t\na₁ : α\nb₁ : β\nha₁ : (a₁, b₁).fst ∈ s\nhb₁ : (a₁, b₁).snd ∈ t\na₂ : α\nb₂ : β\nha₂ : (a₂, b₂).fst ∈ s\nhb₂ : (a₂, b₂).snd ∈ t\n⊢ Prod.mk a₁ '' t ∪ flip Prod.mk b₂ '' s ⊆ s ×ˢ t\n[PROOFSTEP]\nrintro _ (⟨y, hy, rfl⟩ | ⟨x, hx, rfl⟩)\n[GOAL]\ncase H.mk.intro.mk.intro.refine'_1.inl.intro.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t✝ u v : Set α\ninst✝ : TopologicalSpace β\ns : Set α\nt : Set β\nhs : IsPreconnected s\nht : IsPreconnected t\na₁ : α\nb₁ : β\nha₁ : (a₁, b₁).fst ∈ s\nhb₁ : (a₁, b₁).snd ∈ t\na₂ : α\nb₂ : β\nha₂ : (a₂, b₂).fst ∈ s\nhb₂ : (a₂, b₂).snd ∈ t\ny : β\nhy : y ∈ t\n⊢ (a₁, y) ∈ s ×ˢ t\ncase H.mk.intro.mk.intro.refine'_1.inr.intro.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t✝ u v : Set α\ninst✝ : TopologicalSpace β\ns : Set α\nt : Set β\nhs : IsPreconnected s\nht : IsPreconnected t\na₁ : α\nb₁ : β\nha₁ : (a₁, b₁).fst ∈ s\nhb₁ : (a₁, b₁).snd ∈ t\na₂ : α\nb₂ : β\nha₂ : (a₂, b₂).fst ∈ s\nhb₂ : (a₂, b₂).snd ∈ t\nx : α\nhx : x ∈ s\n⊢ flip Prod.mk b₂ x ∈ s ×ˢ t\n[PROOFSTEP]\nexacts [⟨ha₁, hy⟩, ⟨hx, hb₂⟩]\n[GOAL]\ncase H.mk.intro.mk.intro.refine'_2\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t✝ u v : Set α\ninst✝ : TopologicalSpace β\ns : Set α\nt : Set β\nhs : IsPreconnected s\nht : IsPreconnected t\na₁ : α\nb₁ : β\nha₁ : (a₁, b₁).fst ∈ s\nhb₁ : (a₁, b₁).snd ∈ t\na₂ : α\nb₂ : β\nha₂ : (a₂, b₂).fst ∈ s\nhb₂ : (a₂, b₂).snd ∈ t\n⊢ IsPreconnected (Prod.mk a₁ '' t ∪ flip Prod.mk b₂ '' s)\n[PROOFSTEP]\nexact\n  (ht.image _ (Continuous.Prod.mk _).continuousOn).union (a₁, b₂) ⟨b₂, hb₂, rfl⟩ ⟨a₁, ha₁, rfl⟩\n    (hs.image _ (continuous_id.prod_mk continuous_const).continuousOn)\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u v : Set α\ninst✝ : (i : ι) → TopologicalSpace (π i)\ns : (i : ι) → Set (π i)\nhs : ∀ (i : ι), IsPreconnected (s i)\n⊢ IsPreconnected (pi univ s)\n[PROOFSTEP]\nrintro u v uo vo hsuv ⟨f, hfs, hfu⟩ ⟨g, hgs, hgv⟩\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u✝ v✝ : Set α\ninst✝ : (i : ι) → TopologicalSpace (π i)\ns : (i : ι) → Set (π i)\nhs : ∀ (i : ι), IsPreconnected (s i)\nu v : Set ((i : ι) → π i)\nuo : IsOpen u\nvo : IsOpen v\nhsuv : pi univ s ⊆ u ∪ v\nf : (i : ι) → π i\nhfs : f ∈ pi univ s\nhfu : f ∈ u\ng : (i : ι) → π i\nhgs : g ∈ pi univ s\nhgv : g ∈ v\n⊢ Set.Nonempty (pi univ s ∩ (u ∩ v))\n[PROOFSTEP]\nrcases exists_finset_piecewise_mem_of_mem_nhds (uo.mem_nhds hfu) g with ⟨I, hI⟩\n[GOAL]\ncase intro.intro.intro.intro.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u✝ v✝ : Set α\ninst✝ : (i : ι) → TopologicalSpace (π i)\ns : (i : ι) → Set (π i)\nhs : ∀ (i : ι), IsPreconnected (s i)\nu v : Set ((i : ι) → π i)\nuo : IsOpen u\nvo : IsOpen v\nhsuv : pi univ s ⊆ u ∪ v\nf : (i : ι) → π i\nhfs : f ∈ pi univ s\nhfu : f ∈ u\ng : (i : ι) → π i\nhgs : g ∈ pi univ s\nhgv : g ∈ v\nI : Finset ι\nhI : Finset.piecewise I f g ∈ u\n⊢ Set.Nonempty (pi univ s ∩ (u ∩ v))\n[PROOFSTEP]\ninduction' I using Finset.induction_on with i I _ ihI\n[GOAL]\ncase intro.intro.intro.intro.intro.empty\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u✝ v✝ : Set α\ninst✝ : (i : ι) → TopologicalSpace (π i)\ns : (i : ι) → Set (π i)\nhs : ∀ (i : ι), IsPreconnected (s i)\nu v : Set ((i : ι) → π i)\nuo : IsOpen u\nvo : IsOpen v\nhsuv : pi univ s ⊆ u ∪ v\nf : (i : ι) → π i\nhfs : f ∈ pi univ s\nhfu : f ∈ u\ng : (i : ι) → π i\nhgs : g ∈ pi univ s\nhgv : g ∈ v\nI : Finset ι\nhI✝ : Finset.piecewise I f g ∈ u\nhI : Finset.piecewise ∅ f g ∈ u\n⊢ Set.Nonempty (pi univ s ∩ (u ∩ v))\n[PROOFSTEP]\nrefine' ⟨g, hgs, ⟨_, hgv⟩⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.empty\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u✝ v✝ : Set α\ninst✝ : (i : ι) → TopologicalSpace (π i)\ns : (i : ι) → Set (π i)\nhs : ∀ (i : ι), IsPreconnected (s i)\nu v : Set ((i : ι) → π i)\nuo : IsOpen u\nvo : IsOpen v\nhsuv : pi univ s ⊆ u ∪ v\nf : (i : ι) → π i\nhfs : f ∈ pi univ s\nhfu : f ∈ u\ng : (i : ι) → π i\nhgs : g ∈ pi univ s\nhgv : g ∈ v\nI : Finset ι\nhI✝ : Finset.piecewise I f g ∈ u\nhI : Finset.piecewise ∅ f g ∈ u\n⊢ g ∈ u\n[PROOFSTEP]\nsimpa using hI\n[GOAL]\ncase intro.intro.intro.intro.intro.insert\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u✝ v✝ : Set α\ninst✝ : (i : ι) → TopologicalSpace (π i)\ns : (i : ι) → Set (π i)\nhs : ∀ (i : ι), IsPreconnected (s i)\nu v : Set ((i : ι) → π i)\nuo : IsOpen u\nvo : IsOpen v\nhsuv : pi univ s ⊆ u ∪ v\nf : (i : ι) → π i\nhfs : f ∈ pi univ s\nhfu : f ∈ u\ng : (i : ι) → π i\nhgs : g ∈ pi univ s\nhgv : g ∈ v\nI✝ : Finset ι\nhI✝ : Finset.piecewise I✝ f g ∈ u\ni : ι\nI : Finset ι\na✝ : ¬i ∈ I\nihI : Finset.piecewise I f g ∈ u → Set.Nonempty (pi univ s ∩ (u ∩ v))\nhI : Finset.piecewise (insert i I) f g ∈ u\n⊢ Set.Nonempty (pi univ s ∩ (u ∩ v))\n[PROOFSTEP]\nrw [Finset.piecewise_insert] at hI \n[GOAL]\ncase intro.intro.intro.intro.intro.insert\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u✝ v✝ : Set α\ninst✝ : (i : ι) → TopologicalSpace (π i)\ns : (i : ι) → Set (π i)\nhs : ∀ (i : ι), IsPreconnected (s i)\nu v : Set ((i : ι) → π i)\nuo : IsOpen u\nvo : IsOpen v\nhsuv : pi univ s ⊆ u ∪ v\nf : (i : ι) → π i\nhfs : f ∈ pi univ s\nhfu : f ∈ u\ng : (i : ι) → π i\nhgs : g ∈ pi univ s\nhgv : g ∈ v\nI✝ : Finset ι\nhI✝ : Finset.piecewise I✝ f g ∈ u\ni : ι\nI : Finset ι\na✝ : ¬i ∈ I\nihI : Finset.piecewise I f g ∈ u → Set.Nonempty (pi univ s ∩ (u ∩ v))\nhI : update (Finset.piecewise I f g) i (f i) ∈ u\n⊢ Set.Nonempty (pi univ s ∩ (u ∩ v))\n[PROOFSTEP]\nhave := I.piecewise_mem_set_pi hfs hgs\n[GOAL]\ncase intro.intro.intro.intro.intro.insert\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u✝ v✝ : Set α\ninst✝ : (i : ι) → TopologicalSpace (π i)\ns : (i : ι) → Set (π i)\nhs : ∀ (i : ι), IsPreconnected (s i)\nu v : Set ((i : ι) → π i)\nuo : IsOpen u\nvo : IsOpen v\nhsuv : pi univ s ⊆ u ∪ v\nf : (i : ι) → π i\nhfs : f ∈ pi univ s\nhfu : f ∈ u\ng : (i : ι) → π i\nhgs : g ∈ pi univ s\nhgv : g ∈ v\nI✝ : Finset ι\nhI✝ : Finset.piecewise I✝ f g ∈ u\ni : ι\nI : Finset ι\na✝ : ¬i ∈ I\nihI : Finset.piecewise I f g ∈ u → Set.Nonempty (pi univ s ∩ (u ∩ v))\nhI : update (Finset.piecewise I f g) i (f i) ∈ u\nthis : Finset.piecewise I f g ∈ pi univ s\n⊢ Set.Nonempty (pi univ s ∩ (u ∩ v))\n[PROOFSTEP]\nrefine' (hsuv this).elim ihI fun h => _\n[GOAL]\ncase intro.intro.intro.intro.intro.insert\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u✝ v✝ : Set α\ninst✝ : (i : ι) → TopologicalSpace (π i)\ns : (i : ι) → Set (π i)\nhs : ∀ (i : ι), IsPreconnected (s i)\nu v : Set ((i : ι) → π i)\nuo : IsOpen u\nvo : IsOpen v\nhsuv : pi univ s ⊆ u ∪ v\nf : (i : ι) → π i\nhfs : f ∈ pi univ s\nhfu : f ∈ u\ng : (i : ι) → π i\nhgs : g ∈ pi univ s\nhgv : g ∈ v\nI✝ : Finset ι\nhI✝ : Finset.piecewise I✝ f g ∈ u\ni : ι\nI : Finset ι\na✝ : ¬i ∈ I\nihI : Finset.piecewise I f g ∈ u → Set.Nonempty (pi univ s ∩ (u ∩ v))\nhI : update (Finset.piecewise I f g) i (f i) ∈ u\nthis : Finset.piecewise I f g ∈ pi univ s\nh : Finset.piecewise I f g ∈ v\n⊢ Set.Nonempty (pi univ s ∩ (u ∩ v))\n[PROOFSTEP]\nset S := update (I.piecewise f g) i '' s i\n[GOAL]\ncase intro.intro.intro.intro.intro.insert\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u✝ v✝ : Set α\ninst✝ : (i : ι) → TopologicalSpace (π i)\ns : (i : ι) → Set (π i)\nhs : ∀ (i : ι), IsPreconnected (s i)\nu v : Set ((i : ι) → π i)\nuo : IsOpen u\nvo : IsOpen v\nhsuv : pi univ s ⊆ u ∪ v\nf : (i : ι) → π i\nhfs : f ∈ pi univ s\nhfu : f ∈ u\ng : (i : ι) → π i\nhgs : g ∈ pi univ s\nhgv : g ∈ v\nI✝ : Finset ι\nhI✝ : Finset.piecewise I✝ f g ∈ u\ni : ι\nI : Finset ι\na✝ : ¬i ∈ I\nihI : Finset.piecewise I f g ∈ u → Set.Nonempty (pi univ s ∩ (u ∩ v))\nhI : update (Finset.piecewise I f g) i (f i) ∈ u\nthis : Finset.piecewise I f g ∈ pi univ s\nh : Finset.piecewise I f g ∈ v\nS : Set ((a : ι) → π a) := update (Finset.piecewise I f g) i '' s i\n⊢ Set.Nonempty (pi univ s ∩ (u ∩ v))\n[PROOFSTEP]\nhave hsub : S ⊆ pi univ s := by\n  refine' image_subset_iff.2 fun z hz => _\n  rwa [update_preimage_univ_pi]\n  exact fun j _ => this j trivial\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u✝ v✝ : Set α\ninst✝ : (i : ι) → TopologicalSpace (π i)\ns : (i : ι) → Set (π i)\nhs : ∀ (i : ι), IsPreconnected (s i)\nu v : Set ((i : ι) → π i)\nuo : IsOpen u\nvo : IsOpen v\nhsuv : pi univ s ⊆ u ∪ v\nf : (i : ι) → π i\nhfs : f ∈ pi univ s\nhfu : f ∈ u\ng : (i : ι) → π i\nhgs : g ∈ pi univ s\nhgv : g ∈ v\nI✝ : Finset ι\nhI✝ : Finset.piecewise I✝ f g ∈ u\ni : ι\nI : Finset ι\na✝ : ¬i ∈ I\nihI : Finset.piecewise I f g ∈ u → Set.Nonempty (pi univ s ∩ (u ∩ v))\nhI : update (Finset.piecewise I f g) i (f i) ∈ u\nthis : Finset.piecewise I f g ∈ pi univ s\nh : Finset.piecewise I f g ∈ v\nS : Set ((a : ι) → π a) := update (Finset.piecewise I f g) i '' s i\n⊢ S ⊆ pi univ s\n[PROOFSTEP]\nrefine' image_subset_iff.2 fun z hz => _\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u✝ v✝ : Set α\ninst✝ : (i : ι) → TopologicalSpace (π i)\ns : (i : ι) → Set (π i)\nhs : ∀ (i : ι), IsPreconnected (s i)\nu v : Set ((i : ι) → π i)\nuo : IsOpen u\nvo : IsOpen v\nhsuv : pi univ s ⊆ u ∪ v\nf : (i : ι) → π i\nhfs : f ∈ pi univ s\nhfu : f ∈ u\ng : (i : ι) → π i\nhgs : g ∈ pi univ s\nhgv : g ∈ v\nI✝ : Finset ι\nhI✝ : Finset.piecewise I✝ f g ∈ u\ni : ι\nI : Finset ι\na✝ : ¬i ∈ I\nihI : Finset.piecewise I f g ∈ u → Set.Nonempty (pi univ s ∩ (u ∩ v))\nhI : update (Finset.piecewise I f g) i (f i) ∈ u\nthis : Finset.piecewise I f g ∈ pi univ s\nh : Finset.piecewise I f g ∈ v\nS : Set ((a : ι) → π a) := update (Finset.piecewise I f g) i '' s i\nz : π i\nhz : z ∈ s i\n⊢ z ∈ update (Finset.piecewise I f g) i ⁻¹' pi univ s\n[PROOFSTEP]\nrwa [update_preimage_univ_pi]\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u✝ v✝ : Set α\ninst✝ : (i : ι) → TopologicalSpace (π i)\ns : (i : ι) → Set (π i)\nhs : ∀ (i : ι), IsPreconnected (s i)\nu v : Set ((i : ι) → π i)\nuo : IsOpen u\nvo : IsOpen v\nhsuv : pi univ s ⊆ u ∪ v\nf : (i : ι) → π i\nhfs : f ∈ pi univ s\nhfu : f ∈ u\ng : (i : ι) → π i\nhgs : g ∈ pi univ s\nhgv : g ∈ v\nI✝ : Finset ι\nhI✝ : Finset.piecewise I✝ f g ∈ u\ni : ι\nI : Finset ι\na✝ : ¬i ∈ I\nihI : Finset.piecewise I f g ∈ u → Set.Nonempty (pi univ s ∩ (u ∩ v))\nhI : update (Finset.piecewise I f g) i (f i) ∈ u\nthis : Finset.piecewise I f g ∈ pi univ s\nh : Finset.piecewise I f g ∈ v\nS : Set ((a : ι) → π a) := update (Finset.piecewise I f g) i '' s i\nz : π i\nhz : z ∈ s i\n⊢ ∀ (j : ι), j ≠ i → Finset.piecewise I f g j ∈ s j\n[PROOFSTEP]\nexact fun j _ => this j trivial\n[GOAL]\ncase intro.intro.intro.intro.intro.insert\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u✝ v✝ : Set α\ninst✝ : (i : ι) → TopologicalSpace (π i)\ns : (i : ι) → Set (π i)\nhs : ∀ (i : ι), IsPreconnected (s i)\nu v : Set ((i : ι) → π i)\nuo : IsOpen u\nvo : IsOpen v\nhsuv : pi univ s ⊆ u ∪ v\nf : (i : ι) → π i\nhfs : f ∈ pi univ s\nhfu : f ∈ u\ng : (i : ι) → π i\nhgs : g ∈ pi univ s\nhgv : g ∈ v\nI✝ : Finset ι\nhI✝ : Finset.piecewise I✝ f g ∈ u\ni : ι\nI : Finset ι\na✝ : ¬i ∈ I\nihI : Finset.piecewise I f g ∈ u → Set.Nonempty (pi univ s ∩ (u ∩ v))\nhI : update (Finset.piecewise I f g) i (f i) ∈ u\nthis : Finset.piecewise I f g ∈ pi univ s\nh : Finset.piecewise I f g ∈ v\nS : Set ((a : ι) → π a) := update (Finset.piecewise I f g) i '' s i\nhsub : S ⊆ pi univ s\n⊢ Set.Nonempty (pi univ s ∩ (u ∩ v))\n[PROOFSTEP]\nhave hconn : IsPreconnected S := (hs i).image _ (continuous_const.update i continuous_id).continuousOn\n[GOAL]\ncase intro.intro.intro.intro.intro.insert\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u✝ v✝ : Set α\ninst✝ : (i : ι) → TopologicalSpace (π i)\ns : (i : ι) → Set (π i)\nhs : ∀ (i : ι), IsPreconnected (s i)\nu v : Set ((i : ι) → π i)\nuo : IsOpen u\nvo : IsOpen v\nhsuv : pi univ s ⊆ u ∪ v\nf : (i : ι) → π i\nhfs : f ∈ pi univ s\nhfu : f ∈ u\ng : (i : ι) → π i\nhgs : g ∈ pi univ s\nhgv : g ∈ v\nI✝ : Finset ι\nhI✝ : Finset.piecewise I✝ f g ∈ u\ni : ι\nI : Finset ι\na✝ : ¬i ∈ I\nihI : Finset.piecewise I f g ∈ u → Set.Nonempty (pi univ s ∩ (u ∩ v))\nhI : update (Finset.piecewise I f g) i (f i) ∈ u\nthis : Finset.piecewise I f g ∈ pi univ s\nh : Finset.piecewise I f g ∈ v\nS : Set ((a : ι) → π a) := update (Finset.piecewise I f g) i '' s i\nhsub : S ⊆ pi univ s\nhconn : IsPreconnected S\n⊢ Set.Nonempty (pi univ s ∩ (u ∩ v))\n[PROOFSTEP]\nhave hSu : (S ∩ u).Nonempty := ⟨_, mem_image_of_mem _ (hfs _ trivial), hI⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.insert\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u✝ v✝ : Set α\ninst✝ : (i : ι) → TopologicalSpace (π i)\ns : (i : ι) → Set (π i)\nhs : ∀ (i : ι), IsPreconnected (s i)\nu v : Set ((i : ι) → π i)\nuo : IsOpen u\nvo : IsOpen v\nhsuv : pi univ s ⊆ u ∪ v\nf : (i : ι) → π i\nhfs : f ∈ pi univ s\nhfu : f ∈ u\ng : (i : ι) → π i\nhgs : g ∈ pi univ s\nhgv : g ∈ v\nI✝ : Finset ι\nhI✝ : Finset.piecewise I✝ f g ∈ u\ni : ι\nI : Finset ι\na✝ : ¬i ∈ I\nihI : Finset.piecewise I f g ∈ u → Set.Nonempty (pi univ s ∩ (u ∩ v))\nhI : update (Finset.piecewise I f g) i (f i) ∈ u\nthis : Finset.piecewise I f g ∈ pi univ s\nh : Finset.piecewise I f g ∈ v\nS : Set ((a : ι) → π a) := update (Finset.piecewise I f g) i '' s i\nhsub : S ⊆ pi univ s\nhconn : IsPreconnected S\nhSu : Set.Nonempty (S ∩ u)\n⊢ Set.Nonempty (pi univ s ∩ (u ∩ v))\n[PROOFSTEP]\nhave hSv : (S ∩ v).Nonempty := ⟨_, ⟨_, this _ trivial, update_eq_self _ _⟩, h⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.insert\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u✝ v✝ : Set α\ninst✝ : (i : ι) → TopologicalSpace (π i)\ns : (i : ι) → Set (π i)\nhs : ∀ (i : ι), IsPreconnected (s i)\nu v : Set ((i : ι) → π i)\nuo : IsOpen u\nvo : IsOpen v\nhsuv : pi univ s ⊆ u ∪ v\nf : (i : ι) → π i\nhfs : f ∈ pi univ s\nhfu : f ∈ u\ng : (i : ι) → π i\nhgs : g ∈ pi univ s\nhgv : g ∈ v\nI✝ : Finset ι\nhI✝ : Finset.piecewise I✝ f g ∈ u\ni : ι\nI : Finset ι\na✝ : ¬i ∈ I\nihI : Finset.piecewise I f g ∈ u → Set.Nonempty (pi univ s ∩ (u ∩ v))\nhI : update (Finset.piecewise I f g) i (f i) ∈ u\nthis : Finset.piecewise I f g ∈ pi univ s\nh : Finset.piecewise I f g ∈ v\nS : Set ((a : ι) → π a) := update (Finset.piecewise I f g) i '' s i\nhsub : S ⊆ pi univ s\nhconn : IsPreconnected S\nhSu : Set.Nonempty (S ∩ u)\nhSv : Set.Nonempty (S ∩ v)\n⊢ Set.Nonempty (pi univ s ∩ (u ∩ v))\n[PROOFSTEP]\nrefine' (hconn u v uo vo (hsub.trans hsuv) hSu hSv).mono _\n[GOAL]\ncase intro.intro.intro.intro.intro.insert\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u✝ v✝ : Set α\ninst✝ : (i : ι) → TopologicalSpace (π i)\ns : (i : ι) → Set (π i)\nhs : ∀ (i : ι), IsPreconnected (s i)\nu v : Set ((i : ι) → π i)\nuo : IsOpen u\nvo : IsOpen v\nhsuv : pi univ s ⊆ u ∪ v\nf : (i : ι) → π i\nhfs : f ∈ pi univ s\nhfu : f ∈ u\ng : (i : ι) → π i\nhgs : g ∈ pi univ s\nhgv : g ∈ v\nI✝ : Finset ι\nhI✝ : Finset.piecewise I✝ f g ∈ u\ni : ι\nI : Finset ι\na✝ : ¬i ∈ I\nihI : Finset.piecewise I f g ∈ u → Set.Nonempty (pi univ s ∩ (u ∩ v))\nhI : update (Finset.piecewise I f g) i (f i) ∈ u\nthis : Finset.piecewise I f g ∈ pi univ s\nh : Finset.piecewise I f g ∈ v\nS : Set ((a : ι) → π a) := update (Finset.piecewise I f g) i '' s i\nhsub : S ⊆ pi univ s\nhconn : IsPreconnected S\nhSu : Set.Nonempty (S ∩ u)\nhSv : Set.Nonempty (S ∩ v)\n⊢ S ∩ (u ∩ v) ⊆ pi univ s ∩ (u ∩ v)\n[PROOFSTEP]\nexact inter_subset_inter_left _ hsub\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u v : Set α\ninst✝ : (i : ι) → TopologicalSpace (π i)\ns : (i : ι) → Set (π i)\n⊢ IsConnected (pi univ s) ↔ ∀ (i : ι), IsConnected (s i)\n[PROOFSTEP]\nsimp only [IsConnected, ← univ_pi_nonempty_iff, forall_and, and_congr_right_iff]\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u v : Set α\ninst✝ : (i : ι) → TopologicalSpace (π i)\ns : (i : ι) → Set (π i)\n⊢ Set.Nonempty (pi univ s) → (IsPreconnected (pi univ s) ↔ ∀ (x : ι), IsPreconnected (s x))\n[PROOFSTEP]\nrefine' fun hne => ⟨fun hc i => _, isPreconnected_univ_pi⟩\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u v : Set α\ninst✝ : (i : ι) → TopologicalSpace (π i)\ns : (i : ι) → Set (π i)\nhne : Set.Nonempty (pi univ s)\nhc : IsPreconnected (pi univ s)\ni : ι\n⊢ IsPreconnected (s i)\n[PROOFSTEP]\nrw [← eval_image_univ_pi hne]\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u v : Set α\ninst✝ : (i : ι) → TopologicalSpace (π i)\ns : (i : ι) → Set (π i)\nhne : Set.Nonempty (pi univ s)\nhc : IsPreconnected (pi univ s)\ni : ι\n⊢ IsPreconnected ((fun f => f i) '' pi univ s)\n[PROOFSTEP]\nexact hc.image _ (continuous_apply _).continuousOn\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u v : Set α\ninst✝ : (i : ι) → TopologicalSpace (π i)\ns : Set ((i : ι) × π i)\n⊢ IsConnected s ↔ ∃ i t, IsConnected t ∧ s = mk i '' t\n[PROOFSTEP]\nrefine' ⟨fun hs => _, _⟩\n[GOAL]\ncase refine'_1\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u v : Set α\ninst✝ : (i : ι) → TopologicalSpace (π i)\ns : Set ((i : ι) × π i)\nhs : IsConnected s\n⊢ ∃ i t, IsConnected t ∧ s = mk i '' t\n[PROOFSTEP]\nobtain ⟨⟨i, x⟩, hx⟩ := hs.nonempty\n[GOAL]\ncase refine'_1.intro.mk\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u v : Set α\ninst✝ : (i : ι) → TopologicalSpace (π i)\ns : Set ((i : ι) × π i)\nhs : IsConnected s\ni : ι\nx : π i\nhx : { fst := i, snd := x } ∈ s\n⊢ ∃ i t, IsConnected t ∧ s = mk i '' t\n[PROOFSTEP]\nhave : s ⊆ range (Sigma.mk i) := hs.isPreconnected.subset_clopen isClopen_range_sigmaMk ⟨⟨i, x⟩, hx, x, rfl⟩\n[GOAL]\ncase refine'_1.intro.mk\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u v : Set α\ninst✝ : (i : ι) → TopologicalSpace (π i)\ns : Set ((i : ι) × π i)\nhs : IsConnected s\ni : ι\nx : π i\nhx : { fst := i, snd := x } ∈ s\nthis : s ⊆ range (mk i)\n⊢ ∃ i t, IsConnected t ∧ s = mk i '' t\n[PROOFSTEP]\nexact\n  ⟨i, Sigma.mk i ⁻¹' s, hs.preimage_of_openMap sigma_mk_injective isOpenMap_sigmaMk this,\n    (Set.image_preimage_eq_of_subset this).symm⟩\n[GOAL]\ncase refine'_2\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u v : Set α\ninst✝ : (i : ι) → TopologicalSpace (π i)\ns : Set ((i : ι) × π i)\n⊢ (∃ i t, IsConnected t ∧ s = mk i '' t) → IsConnected s\n[PROOFSTEP]\nrintro ⟨i, t, ht, rfl⟩\n[GOAL]\ncase refine'_2.intro.intro.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t✝ u v : Set α\ninst✝ : (i : ι) → TopologicalSpace (π i)\ni : ι\nt : Set (π i)\nht : IsConnected t\n⊢ IsConnected (mk i '' t)\n[PROOFSTEP]\nexact ht.image _ continuous_sigmaMk.continuousOn\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u v : Set α\nhι : Nonempty ι\ninst✝ : (i : ι) → TopologicalSpace (π i)\ns : Set ((i : ι) × π i)\n⊢ IsPreconnected s ↔ ∃ i t, IsPreconnected t ∧ s = mk i '' t\n[PROOFSTEP]\nrefine' ⟨fun hs => _, _⟩\n[GOAL]\ncase refine'_1\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u v : Set α\nhι : Nonempty ι\ninst✝ : (i : ι) → TopologicalSpace (π i)\ns : Set ((i : ι) × π i)\nhs : IsPreconnected s\n⊢ ∃ i t, IsPreconnected t ∧ s = mk i '' t\n[PROOFSTEP]\nobtain rfl | h := s.eq_empty_or_nonempty\n[GOAL]\ncase refine'_1.inl\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t u v : Set α\nhι : Nonempty ι\ninst✝ : (i : ι) → TopologicalSpace (π i)\nhs : IsPreconnected ∅\n⊢ ∃ i t, IsPreconnected t ∧ ∅ = mk i '' t\n[PROOFSTEP]\nexact ⟨Classical.choice hι, ∅, isPreconnected_empty, (Set.image_empty _).symm⟩\n[GOAL]\ncase refine'_1.inr\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u v : Set α\nhι : Nonempty ι\ninst✝ : (i : ι) → TopologicalSpace (π i)\ns : Set ((i : ι) × π i)\nhs : IsPreconnected s\nh : Set.Nonempty s\n⊢ ∃ i t, IsPreconnected t ∧ s = mk i '' t\n[PROOFSTEP]\nobtain ⟨a, t, ht, rfl⟩ := Sigma.isConnected_iff.1 ⟨h, hs⟩\n[GOAL]\ncase refine'_1.inr.intro.intro.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t✝ u v : Set α\nhι : Nonempty ι\ninst✝ : (i : ι) → TopologicalSpace (π i)\na : ι\nt : Set (π a)\nht : IsConnected t\nhs : IsPreconnected (mk a '' t)\nh : Set.Nonempty (mk a '' t)\n⊢ ∃ i t_1, IsPreconnected t_1 ∧ mk a '' t = mk i '' t_1\n[PROOFSTEP]\nrefine' ⟨a, t, ht.isPreconnected, rfl⟩\n[GOAL]\ncase refine'_2\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u v : Set α\nhι : Nonempty ι\ninst✝ : (i : ι) → TopologicalSpace (π i)\ns : Set ((i : ι) × π i)\n⊢ (∃ i t, IsPreconnected t ∧ s = mk i '' t) → IsPreconnected s\n[PROOFSTEP]\nrintro ⟨a, t, ht, rfl⟩\n[GOAL]\ncase refine'_2.intro.intro.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t✝ u v : Set α\nhι : Nonempty ι\ninst✝ : (i : ι) → TopologicalSpace (π i)\na : ι\nt : Set (π a)\nht : IsPreconnected t\n⊢ IsPreconnected (mk a '' t)\n[PROOFSTEP]\nexact ht.image _ continuous_sigmaMk.continuousOn\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u v : Set α\ninst✝ : TopologicalSpace β\ns : Set (α ⊕ β)\n⊢ IsConnected s ↔ (∃ t, IsConnected t ∧ s = inl '' t) ∨ ∃ t, IsConnected t ∧ s = inr '' t\n[PROOFSTEP]\nrefine' ⟨fun hs => _, _⟩\n[GOAL]\ncase refine'_1\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u v : Set α\ninst✝ : TopologicalSpace β\ns : Set (α ⊕ β)\nhs : IsConnected s\n⊢ (∃ t, IsConnected t ∧ s = inl '' t) ∨ ∃ t, IsConnected t ∧ s = inr '' t\n[PROOFSTEP]\nobtain ⟨x | x, hx⟩ := hs.nonempty\n[GOAL]\ncase refine'_1.intro.inl\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u v : Set α\ninst✝ : TopologicalSpace β\ns : Set (α ⊕ β)\nhs : IsConnected s\nx : α\nhx : inl x ∈ s\n⊢ (∃ t, IsConnected t ∧ s = inl '' t) ∨ ∃ t, IsConnected t ∧ s = inr '' t\n[PROOFSTEP]\nhave h : s ⊆ range Sum.inl := hs.isPreconnected.subset_clopen isClopen_range_inl ⟨.inl x, hx, x, rfl⟩\n[GOAL]\ncase refine'_1.intro.inl\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u v : Set α\ninst✝ : TopologicalSpace β\ns : Set (α ⊕ β)\nhs : IsConnected s\nx : α\nhx : inl x ∈ s\nh : s ⊆ range inl\n⊢ (∃ t, IsConnected t ∧ s = inl '' t) ∨ ∃ t, IsConnected t ∧ s = inr '' t\n[PROOFSTEP]\nrefine' Or.inl ⟨Sum.inl ⁻¹' s, _, _⟩\n[GOAL]\ncase refine'_1.intro.inl.refine'_1\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u v : Set α\ninst✝ : TopologicalSpace β\ns : Set (α ⊕ β)\nhs : IsConnected s\nx : α\nhx : inl x ∈ s\nh : s ⊆ range inl\n⊢ IsConnected (inl ⁻¹' s)\n[PROOFSTEP]\nexact hs.preimage_of_openMap Sum.inl_injective isOpenMap_inl h\n[GOAL]\ncase refine'_1.intro.inl.refine'_2\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u v : Set α\ninst✝ : TopologicalSpace β\ns : Set (α ⊕ β)\nhs : IsConnected s\nx : α\nhx : inl x ∈ s\nh : s ⊆ range inl\n⊢ s = inl '' (inl ⁻¹' s)\n[PROOFSTEP]\nexact (image_preimage_eq_of_subset h).symm\n[GOAL]\ncase refine'_1.intro.inr\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u v : Set α\ninst✝ : TopologicalSpace β\ns : Set (α ⊕ β)\nhs : IsConnected s\nx : β\nhx : inr x ∈ s\n⊢ (∃ t, IsConnected t ∧ s = inl '' t) ∨ ∃ t, IsConnected t ∧ s = inr '' t\n[PROOFSTEP]\nhave h : s ⊆ range Sum.inr := hs.isPreconnected.subset_clopen isClopen_range_inr ⟨.inr x, hx, x, rfl⟩\n[GOAL]\ncase refine'_1.intro.inr\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u v : Set α\ninst✝ : TopologicalSpace β\ns : Set (α ⊕ β)\nhs : IsConnected s\nx : β\nhx : inr x ∈ s\nh : s ⊆ range inr\n⊢ (∃ t, IsConnected t ∧ s = inl '' t) ∨ ∃ t, IsConnected t ∧ s = inr '' t\n[PROOFSTEP]\nrefine' Or.inr ⟨Sum.inr ⁻¹' s, _, _⟩\n[GOAL]\ncase refine'_1.intro.inr.refine'_1\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u v : Set α\ninst✝ : TopologicalSpace β\ns : Set (α ⊕ β)\nhs : IsConnected s\nx : β\nhx : inr x ∈ s\nh : s ⊆ range inr\n⊢ IsConnected (inr ⁻¹' s)\n[PROOFSTEP]\nexact hs.preimage_of_openMap Sum.inr_injective isOpenMap_inr h\n[GOAL]\ncase refine'_1.intro.inr.refine'_2\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u v : Set α\ninst✝ : TopologicalSpace β\ns : Set (α ⊕ β)\nhs : IsConnected s\nx : β\nhx : inr x ∈ s\nh : s ⊆ range inr\n⊢ s = inr '' (inr ⁻¹' s)\n[PROOFSTEP]\nexact (image_preimage_eq_of_subset h).symm\n[GOAL]\ncase refine'_2\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u v : Set α\ninst✝ : TopologicalSpace β\ns : Set (α ⊕ β)\n⊢ ((∃ t, IsConnected t ∧ s = inl '' t) ∨ ∃ t, IsConnected t ∧ s = inr '' t) → IsConnected s\n[PROOFSTEP]\nrintro (⟨t, ht, rfl⟩ | ⟨t, ht, rfl⟩)\n[GOAL]\ncase refine'_2.inl.intro.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t✝ u v : Set α\ninst✝ : TopologicalSpace β\nt : Set α\nht : IsConnected t\n⊢ IsConnected (inl '' t)\n[PROOFSTEP]\nexact ht.image _ continuous_inl.continuousOn\n[GOAL]\ncase refine'_2.inr.intro.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t✝ u v : Set α\ninst✝ : TopologicalSpace β\nt : Set β\nht : IsConnected t\n⊢ IsConnected (inr '' t)\n[PROOFSTEP]\nexact ht.image _ continuous_inr.continuousOn\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u v : Set α\ninst✝ : TopologicalSpace β\ns : Set (α ⊕ β)\n⊢ IsPreconnected s ↔ (∃ t, IsPreconnected t ∧ s = inl '' t) ∨ ∃ t, IsPreconnected t ∧ s = inr '' t\n[PROOFSTEP]\nrefine' ⟨fun hs => _, _⟩\n[GOAL]\ncase refine'_1\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u v : Set α\ninst✝ : TopologicalSpace β\ns : Set (α ⊕ β)\nhs : IsPreconnected s\n⊢ (∃ t, IsPreconnected t ∧ s = inl '' t) ∨ ∃ t, IsPreconnected t ∧ s = inr '' t\n[PROOFSTEP]\nobtain rfl | h := s.eq_empty_or_nonempty\n[GOAL]\ncase refine'_1.inl\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t u v : Set α\ninst✝ : TopologicalSpace β\nhs : IsPreconnected ∅\n⊢ (∃ t, IsPreconnected t ∧ ∅ = inl '' t) ∨ ∃ t, IsPreconnected t ∧ ∅ = inr '' t\n[PROOFSTEP]\nexact Or.inl ⟨∅, isPreconnected_empty, (Set.image_empty _).symm⟩\n[GOAL]\ncase refine'_1.inr\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u v : Set α\ninst✝ : TopologicalSpace β\ns : Set (α ⊕ β)\nhs : IsPreconnected s\nh : Set.Nonempty s\n⊢ (∃ t, IsPreconnected t ∧ s = inl '' t) ∨ ∃ t, IsPreconnected t ∧ s = inr '' t\n[PROOFSTEP]\nobtain ⟨t, ht, rfl⟩ | ⟨t, ht, rfl⟩ := Sum.isConnected_iff.1 ⟨h, hs⟩\n[GOAL]\ncase refine'_1.inr.inl.intro.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t✝ u v : Set α\ninst✝ : TopologicalSpace β\nt : Set α\nht : IsConnected t\nhs : IsPreconnected (inl '' t)\nh : Set.Nonempty (inl '' t)\n⊢ (∃ t_1, IsPreconnected t_1 ∧ inl '' t = inl '' t_1) ∨ ∃ t_1, IsPreconnected t_1 ∧ inl '' t = inr '' t_1\n[PROOFSTEP]\nexact Or.inl ⟨t, ht.isPreconnected, rfl⟩\n[GOAL]\ncase refine'_1.inr.inr.intro.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t✝ u v : Set α\ninst✝ : TopologicalSpace β\nt : Set β\nht : IsConnected t\nhs : IsPreconnected (inr '' t)\nh : Set.Nonempty (inr '' t)\n⊢ (∃ t_1, IsPreconnected t_1 ∧ inr '' t = inl '' t_1) ∨ ∃ t_1, IsPreconnected t_1 ∧ inr '' t = inr '' t_1\n[PROOFSTEP]\nexact Or.inr ⟨t, ht.isPreconnected, rfl⟩\n[GOAL]\ncase refine'_2\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u v : Set α\ninst✝ : TopologicalSpace β\ns : Set (α ⊕ β)\n⊢ ((∃ t, IsPreconnected t ∧ s = inl '' t) ∨ ∃ t, IsPreconnected t ∧ s = inr '' t) → IsPreconnected s\n[PROOFSTEP]\nrintro (⟨t, ht, rfl⟩ | ⟨t, ht, rfl⟩)\n[GOAL]\ncase refine'_2.inl.intro.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t✝ u v : Set α\ninst✝ : TopologicalSpace β\nt : Set α\nht : IsPreconnected t\n⊢ IsPreconnected (inl '' t)\n[PROOFSTEP]\nexact ht.image _ continuous_inl.continuousOn\n[GOAL]\ncase refine'_2.inr.intro.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t✝ u v : Set α\ninst✝ : TopologicalSpace β\nt : Set β\nht : IsPreconnected t\n⊢ IsPreconnected (inr '' t)\n[PROOFSTEP]\nexact ht.image _ continuous_inr.continuousOn\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\nx : α\nF : Set α\nhx : x ∈ F\n⊢ x ∈ connectedComponentIn F x\n[PROOFSTEP]\nsimp [connectedComponentIn_eq_image hx, mem_connectedComponent, hx]\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\nx : α\nF : Set α\n⊢ Set.Nonempty (connectedComponentIn F x) ↔ x ∈ F\n[PROOFSTEP]\nrw [connectedComponentIn]\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\nx : α\nF : Set α\n⊢ Set.Nonempty (if h : x ∈ F then Subtype.val '' connectedComponent { val := x, property := h } else ∅) ↔ x ∈ F\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\nx : α\nF : Set α\nh✝ : x ∈ F\n⊢ Set.Nonempty (Subtype.val '' connectedComponent { val := x, property := h✝ }) ↔ x ∈ F\n[PROOFSTEP]\nsimp [connectedComponent_nonempty, *]\n[GOAL]\ncase neg\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\nx : α\nF : Set α\nh✝ : ¬x ∈ F\n⊢ Set.Nonempty ∅ ↔ x ∈ F\n[PROOFSTEP]\nsimp [connectedComponent_nonempty, *]\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v F : Set α\nx : α\n⊢ connectedComponentIn F x ⊆ F\n[PROOFSTEP]\nrw [connectedComponentIn]\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v F : Set α\nx : α\n⊢ (if h : x ∈ F then Subtype.val '' connectedComponent { val := x, property := h } else ∅) ⊆ F\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v F : Set α\nx : α\nh✝ : x ∈ F\n⊢ Subtype.val '' connectedComponent { val := x, property := h✝ } ⊆ F\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v F : Set α\nx : α\nh✝ : ¬x ∈ F\n⊢ ∅ ⊆ F\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\nx : α\nF : Set α\n⊢ IsPreconnected (connectedComponentIn F x)\n[PROOFSTEP]\nrw [connectedComponentIn]\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\nx : α\nF : Set α\n⊢ IsPreconnected (if h : x ∈ F then Subtype.val '' connectedComponent { val := x, property := h } else ∅)\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\nx : α\nF : Set α\nh✝ : x ∈ F\n⊢ IsPreconnected (Subtype.val '' connectedComponent { val := x, property := h✝ })\n[PROOFSTEP]\nexact inducing_subtype_val.isPreconnected_image.mpr isPreconnected_connectedComponent\n[GOAL]\ncase neg\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\nx : α\nF : Set α\nh✝ : ¬x ∈ F\n⊢ IsPreconnected ∅\n[PROOFSTEP]\nexact isPreconnected_empty\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\nx : α\nF : Set α\n⊢ IsConnected (connectedComponentIn F x) ↔ x ∈ F\n[PROOFSTEP]\nsimp_rw [← connectedComponentIn_nonempty_iff, IsConnected, isPreconnected_connectedComponentIn, and_true_iff]\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\nx : α\nF : Set α\nhs : IsPreconnected s\nhxs : x ∈ s\nhsF : s ⊆ F\n⊢ s ⊆ connectedComponentIn F x\n[PROOFSTEP]\nhave : IsPreconnected (((↑) : F → α) ⁻¹' s) :=\n  by\n  refine' inducing_subtype_val.isPreconnected_image.mp _\n  rwa [Subtype.image_preimage_coe, inter_eq_left_iff_subset.mpr hsF]\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\nx : α\nF : Set α\nhs : IsPreconnected s\nhxs : x ∈ s\nhsF : s ⊆ F\n⊢ IsPreconnected (Subtype.val ⁻¹' s)\n[PROOFSTEP]\nrefine' inducing_subtype_val.isPreconnected_image.mp _\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\nx : α\nF : Set α\nhs : IsPreconnected s\nhxs : x ∈ s\nhsF : s ⊆ F\n⊢ IsPreconnected (Subtype.val '' (Subtype.val ⁻¹' s))\n[PROOFSTEP]\nrwa [Subtype.image_preimage_coe, inter_eq_left_iff_subset.mpr hsF]\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\nx : α\nF : Set α\nhs : IsPreconnected s\nhxs : x ∈ s\nhsF : s ⊆ F\nthis : IsPreconnected (Subtype.val ⁻¹' s)\n⊢ s ⊆ connectedComponentIn F x\n[PROOFSTEP]\nhave h2xs : (⟨x, hsF hxs⟩ : F) ∈ (↑) ⁻¹' s := by\n  rw [mem_preimage]\n  exact hxs\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\nx : α\nF : Set α\nhs : IsPreconnected s\nhxs : x ∈ s\nhsF : s ⊆ F\nthis : IsPreconnected (Subtype.val ⁻¹' s)\n⊢ { val := x, property := (_ : x ∈ F) } ∈ Subtype.val ⁻¹' s\n[PROOFSTEP]\nrw [mem_preimage]\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\nx : α\nF : Set α\nhs : IsPreconnected s\nhxs : x ∈ s\nhsF : s ⊆ F\nthis : IsPreconnected (Subtype.val ⁻¹' s)\n⊢ ↑{ val := x, property := (_ : x ∈ F) } ∈ s\n[PROOFSTEP]\nexact hxs\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\nx : α\nF : Set α\nhs : IsPreconnected s\nhxs : x ∈ s\nhsF : s ⊆ F\nthis : IsPreconnected (Subtype.val ⁻¹' s)\nh2xs : { val := x, property := (_ : x ∈ F) } ∈ Subtype.val ⁻¹' s\n⊢ s ⊆ connectedComponentIn F x\n[PROOFSTEP]\nhave := this.subset_connectedComponent h2xs\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\nx : α\nF : Set α\nhs : IsPreconnected s\nhxs : x ∈ s\nhsF : s ⊆ F\nthis✝ : IsPreconnected (Subtype.val ⁻¹' s)\nh2xs : { val := x, property := (_ : x ∈ F) } ∈ Subtype.val ⁻¹' s\nthis : Subtype.val ⁻¹' s ⊆ connectedComponent { val := x, property := (_ : x ∈ F) }\n⊢ s ⊆ connectedComponentIn F x\n[PROOFSTEP]\nrw [connectedComponentIn_eq_image (hsF hxs)]\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\nx : α\nF : Set α\nhs : IsPreconnected s\nhxs : x ∈ s\nhsF : s ⊆ F\nthis✝ : IsPreconnected (Subtype.val ⁻¹' s)\nh2xs : { val := x, property := (_ : x ∈ F) } ∈ Subtype.val ⁻¹' s\nthis : Subtype.val ⁻¹' s ⊆ connectedComponent { val := x, property := (_ : x ∈ F) }\n⊢ s ⊆ Subtype.val '' connectedComponent { val := x, property := (_ : x ∈ F) }\n[PROOFSTEP]\nrefine' Subset.trans _ (image_subset _ this)\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\nx : α\nF : Set α\nhs : IsPreconnected s\nhxs : x ∈ s\nhsF : s ⊆ F\nthis✝ : IsPreconnected (Subtype.val ⁻¹' s)\nh2xs : { val := x, property := (_ : x ∈ F) } ∈ Subtype.val ⁻¹' s\nthis : Subtype.val ⁻¹' s ⊆ connectedComponent { val := x, property := (_ : x ∈ F) }\n⊢ s ⊆ Subtype.val '' (Subtype.val ⁻¹' s)\n[PROOFSTEP]\nrw [Subtype.image_preimage_coe, inter_eq_left_iff_subset.mpr hsF]\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\nx y : α\nF : Set α\nh : y ∈ connectedComponentIn F x\n⊢ connectedComponentIn F x = connectedComponentIn F y\n[PROOFSTEP]\nhave hx : x ∈ F := connectedComponentIn_nonempty_iff.mp ⟨y, h⟩\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\nx y : α\nF : Set α\nh : y ∈ connectedComponentIn F x\nhx : x ∈ F\n⊢ connectedComponentIn F x = connectedComponentIn F y\n[PROOFSTEP]\nsimp_rw [connectedComponentIn_eq_image hx] at h ⊢\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\nx y : α\nF : Set α\nhx : x ∈ F\nh : y ∈ Subtype.val '' connectedComponent { val := x, property := hx }\n⊢ Subtype.val '' connectedComponent { val := x, property := hx } = connectedComponentIn F y\n[PROOFSTEP]\nobtain ⟨⟨y, hy⟩, h2y, rfl⟩ := h\n[GOAL]\ncase intro.mk.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\nx : α\nF : Set α\nhx : x ∈ F\ny : α\nhy : y ∈ F\nh2y : { val := y, property := hy } ∈ connectedComponent { val := x, property := hx }\n⊢ Subtype.val '' connectedComponent { val := x, property := hx } = connectedComponentIn F ↑{ val := y, property := hy }\n[PROOFSTEP]\nsimp_rw [connectedComponentIn_eq_image hy, connectedComponent_eq h2y]\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\nx : α\nF G : Set α\nh : F ⊆ G\n⊢ connectedComponentIn F x ⊆ connectedComponentIn G x\n[PROOFSTEP]\nby_cases hx : x ∈ F\n[GOAL]\ncase pos\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\nx : α\nF G : Set α\nh : F ⊆ G\nhx : x ∈ F\n⊢ connectedComponentIn F x ⊆ connectedComponentIn G x\n[PROOFSTEP]\nrw [connectedComponentIn_eq_image hx, connectedComponentIn_eq_image (h hx), ←\n  show ((↑) : G → α) ∘ inclusion h = (↑) from rfl, image_comp]\n[GOAL]\ncase pos\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\nx : α\nF G : Set α\nh : F ⊆ G\nhx : x ∈ F\n⊢ Subtype.val '' (inclusion h '' connectedComponent { val := x, property := hx }) ⊆\n    Subtype.val '' connectedComponent { val := x, property := (_ : x ∈ G) }\n[PROOFSTEP]\nexact image_subset _ ((continuous_inclusion h).image_connectedComponent_subset ⟨x, hx⟩)\n[GOAL]\ncase neg\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\nx : α\nF G : Set α\nh : F ⊆ G\nhx : ¬x ∈ F\n⊢ connectedComponentIn F x ⊆ connectedComponentIn G x\n[PROOFSTEP]\nrw [connectedComponentIn_eq_empty hx]\n[GOAL]\ncase neg\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\nx : α\nF G : Set α\nh : F ⊆ G\nhx : ¬x ∈ F\n⊢ ∅ ⊆ connectedComponentIn G x\n[PROOFSTEP]\nexact Set.empty_subset _\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝² : TopologicalSpace α\ns t u v : Set α\ninst✝¹ : ConnectedSpace α\ninst✝ : TopologicalSpace β\nf : α → β\nhf : Surjective f\nhf' : Continuous f\n⊢ ConnectedSpace β\n[PROOFSTEP]\nrw [connectedSpace_iff_univ, ← hf.range_eq]\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝² : TopologicalSpace α\ns t u v : Set α\ninst✝¹ : ConnectedSpace α\ninst✝ : TopologicalSpace β\nf : α → β\nhf : Surjective f\nhf' : Continuous f\n⊢ IsConnected (range f)\n[PROOFSTEP]\nexact isConnected_range hf'\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\n⊢ ConnectedSpace α ↔ ∃ x, connectedComponent x = univ\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\n⊢ ConnectedSpace α → ∃ x, connectedComponent x = univ\n[PROOFSTEP]\nrintro ⟨⟨x⟩⟩\n[GOAL]\ncase mp.mk.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\ntoPreconnectedSpace✝ : PreconnectedSpace α\nx : α\n⊢ ∃ x, connectedComponent x = univ\n[PROOFSTEP]\nexact ⟨x, eq_univ_of_univ_subset <| isPreconnected_univ.subset_connectedComponent (mem_univ x)⟩\n[GOAL]\ncase mpr\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\n⊢ (∃ x, connectedComponent x = univ) → ConnectedSpace α\n[PROOFSTEP]\nrintro ⟨x, h⟩\n[GOAL]\ncase mpr.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\nx : α\nh : connectedComponent x = univ\n⊢ ConnectedSpace α\n[PROOFSTEP]\nhaveI : PreconnectedSpace α := ⟨by rw [← h]; exact isPreconnected_connectedComponent⟩\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\nx : α\nh : connectedComponent x = univ\n⊢ IsPreconnected univ\n[PROOFSTEP]\nrw [← h]\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\nx : α\nh : connectedComponent x = univ\n⊢ IsPreconnected (connectedComponent x)\n[PROOFSTEP]\nexact isPreconnected_connectedComponent\n[GOAL]\ncase mpr.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\nx : α\nh : connectedComponent x = univ\nthis : PreconnectedSpace α\n⊢ ConnectedSpace α\n[PROOFSTEP]\nexact ⟨⟨x⟩⟩\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\n⊢ PreconnectedSpace α ↔ ∀ (x : α), connectedComponent x = univ\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\n⊢ PreconnectedSpace α → ∀ (x : α), connectedComponent x = univ\n[PROOFSTEP]\nintro h x\n[GOAL]\ncase mp\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\nh : PreconnectedSpace α\nx : α\n⊢ connectedComponent x = univ\n[PROOFSTEP]\nexact eq_univ_of_univ_subset <| isPreconnected_univ.subset_connectedComponent (mem_univ x)\n[GOAL]\ncase mpr\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\n⊢ (∀ (x : α), connectedComponent x = univ) → PreconnectedSpace α\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\nh : ∀ (x : α), connectedComponent x = univ\n⊢ PreconnectedSpace α\n[PROOFSTEP]\ncases' isEmpty_or_nonempty α with hα hα\n[GOAL]\ncase mpr.inl\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\nh : ∀ (x : α), connectedComponent x = univ\nhα : IsEmpty α\n⊢ PreconnectedSpace α\n[PROOFSTEP]\nexact ⟨by rw [univ_eq_empty_iff.mpr hα]; exact isPreconnected_empty⟩\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\nh : ∀ (x : α), connectedComponent x = univ\nhα : IsEmpty α\n⊢ IsPreconnected univ\n[PROOFSTEP]\nrw [univ_eq_empty_iff.mpr hα]\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\nh : ∀ (x : α), connectedComponent x = univ\nhα : IsEmpty α\n⊢ IsPreconnected ∅\n[PROOFSTEP]\nexact isPreconnected_empty\n[GOAL]\ncase mpr.inr\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\nh : ∀ (x : α), connectedComponent x = univ\nhα : Nonempty α\n⊢ PreconnectedSpace α\n[PROOFSTEP]\nexact ⟨by rw [← h (Classical.choice hα)]; exact isPreconnected_connectedComponent⟩\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\nh : ∀ (x : α), connectedComponent x = univ\nhα : Nonempty α\n⊢ IsPreconnected univ\n[PROOFSTEP]\nrw [← h (Classical.choice hα)]\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\nh : ∀ (x : α), connectedComponent x = univ\nhα : Nonempty α\n⊢ IsPreconnected (connectedComponent (Classical.choice hα))\n[PROOFSTEP]\nexact isPreconnected_connectedComponent\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝³ : TopologicalSpace α\ns t u v : Set α\ninst✝² : TopologicalSpace β\ninst✝¹ : PreconnectedSpace α\ninst✝ : PreconnectedSpace β\n⊢ IsPreconnected univ\n[PROOFSTEP]\nrw [← univ_prod_univ]\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝³ : TopologicalSpace α\ns t u v : Set α\ninst✝² : TopologicalSpace β\ninst✝¹ : PreconnectedSpace α\ninst✝ : PreconnectedSpace β\n⊢ IsPreconnected (univ ×ˢ univ)\n[PROOFSTEP]\nexact isPreconnected_univ.prod isPreconnected_univ\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝² : TopologicalSpace α\ns t u v : Set α\ninst✝¹ : (i : ι) → TopologicalSpace (π i)\ninst✝ : ∀ (i : ι), PreconnectedSpace (π i)\n⊢ IsPreconnected univ\n[PROOFSTEP]\nrw [← pi_univ univ]\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝² : TopologicalSpace α\ns t u v : Set α\ninst✝¹ : (i : ι) → TopologicalSpace (π i)\ninst✝ : ∀ (i : ι), PreconnectedSpace (π i)\n⊢ IsPreconnected (pi univ fun i => univ)\n[PROOFSTEP]\nexact isPreconnected_univ_pi fun i => isPreconnected_univ\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝² : TopologicalSpace α\ns t u v : Set α\ninst✝¹ : ConnectedSpace α\ninst✝ : (i : ι) → TopologicalSpace (π i)\nf : α → (i : ι) × π i\nhf : Continuous f\n⊢ ∃ i g, Continuous g ∧ f = Sigma.mk i ∘ g\n[PROOFSTEP]\nobtain ⟨i, hi⟩ : ∃ i, range f ⊆ range (.mk i)\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝² : TopologicalSpace α\ns t u v : Set α\ninst✝¹ : ConnectedSpace α\ninst✝ : (i : ι) → TopologicalSpace (π i)\nf : α → (i : ι) × π i\nhf : Continuous f\n⊢ ∃ i, range f ⊆ range (Sigma.mk i)\n[PROOFSTEP]\nrcases Sigma.isConnected_iff.1 (isConnected_range hf) with ⟨i, s, -, hs⟩\n[GOAL]\ncase intro.intro.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝² : TopologicalSpace α\ns✝ t u v : Set α\ninst✝¹ : ConnectedSpace α\ninst✝ : (i : ι) → TopologicalSpace (π i)\nf : α → (i : ι) × π i\nhf : Continuous f\ni : ι\ns : Set (π i)\nhs : range f = Sigma.mk i '' s\n⊢ ∃ i, range f ⊆ range (Sigma.mk i)\n[PROOFSTEP]\nexact ⟨i, hs.trans_subset (image_subset_range _ _)⟩\n[GOAL]\ncase intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝² : TopologicalSpace α\ns t u v : Set α\ninst✝¹ : ConnectedSpace α\ninst✝ : (i : ι) → TopologicalSpace (π i)\nf : α → (i : ι) × π i\nhf : Continuous f\ni : ι\nhi : range f ⊆ range (Sigma.mk i)\n⊢ ∃ i g, Continuous g ∧ f = Sigma.mk i ∘ g\n[PROOFSTEP]\nrcases range_subset_range_iff_exists_comp.1 hi with ⟨g, rfl⟩\n[GOAL]\ncase intro.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝² : TopologicalSpace α\ns t u v : Set α\ninst✝¹ : ConnectedSpace α\ninst✝ : (i : ι) → TopologicalSpace (π i)\ni : ι\ng : α → π i\nhf : Continuous (Sigma.mk i ∘ g)\nhi : range (Sigma.mk i ∘ g) ⊆ range (Sigma.mk i)\n⊢ ∃ i_1 g_1, Continuous g_1 ∧ Sigma.mk i ∘ g = Sigma.mk i_1 ∘ g_1\n[PROOFSTEP]\nrefine ⟨i, g, ?_, rfl⟩\n[GOAL]\ncase intro.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝² : TopologicalSpace α\ns t u v : Set α\ninst✝¹ : ConnectedSpace α\ninst✝ : (i : ι) → TopologicalSpace (π i)\ni : ι\ng : α → π i\nhf : Continuous (Sigma.mk i ∘ g)\nhi : range (Sigma.mk i ∘ g) ⊆ range (Sigma.mk i)\n⊢ Continuous g\n[PROOFSTEP]\nrwa [← embedding_sigmaMk.continuous_iff] at hf \n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t✝ u v : Set α\ninst✝ : PreconnectedSpace α\ns t : Set α\n⊢ IsOpen s → IsOpen t → s ∪ t = univ → Set.Nonempty s → Set.Nonempty t → Set.Nonempty (s ∩ t)\n[PROOFSTEP]\nsimpa only [univ_inter, univ_subset_iff] using @PreconnectedSpace.isPreconnected_univ α _ _ s t\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u v : Set α\ninst✝ : PreconnectedSpace α\ns : Set α\nhs : IsClopen s\nh : ¬(s = ∅ ∨ s = univ)\nh2 : sᶜ = ∅\n⊢ s = univ\n[PROOFSTEP]\nrw [← compl_compl s, h2, compl_empty]\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u v : Set α\ninst✝ : PreconnectedSpace α\ns : Set α\n⊢ s = ∅ ∨ s = univ → IsClopen s\n[PROOFSTEP]\nrintro (rfl | rfl) <;> [exact isClopen_empty; exact isClopen_univ]\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u v : Set α\ninst✝ : PreconnectedSpace α\ns : Set α\n⊢ s = ∅ ∨ s = univ → IsClopen s\n[PROOFSTEP]\nrintro (rfl | rfl)\n[GOAL]\ncase inl\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t u v : Set α\ninst✝ : PreconnectedSpace α\n⊢ IsClopen ∅\n[PROOFSTEP]\nexact isClopen_empty\n[GOAL]\ncase inr\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t u v : Set α\ninst✝ : PreconnectedSpace α\n⊢ IsClopen univ\n[PROOFSTEP]\nexact isClopen_univ\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u v : Set α\ninst✝ : PreconnectedSpace α\ns : ι → Set α\nh_nonempty : ∀ (i : ι), Set.Nonempty (s i)\nh_disj : Pairwise (Disjoint on s)\nh_clopen : ∀ (i : ι), IsClopen (s i)\n⊢ Subsingleton ι\n[PROOFSTEP]\nreplace h_nonempty : ∀ i, s i ≠ ∅ := by intro i; rw [← nonempty_iff_ne_empty]; exact h_nonempty i\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u v : Set α\ninst✝ : PreconnectedSpace α\ns : ι → Set α\nh_nonempty : ∀ (i : ι), Set.Nonempty (s i)\nh_disj : Pairwise (Disjoint on s)\nh_clopen : ∀ (i : ι), IsClopen (s i)\n⊢ ∀ (i : ι), s i ≠ ∅\n[PROOFSTEP]\nintro i\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u v : Set α\ninst✝ : PreconnectedSpace α\ns : ι → Set α\nh_nonempty : ∀ (i : ι), Set.Nonempty (s i)\nh_disj : Pairwise (Disjoint on s)\nh_clopen : ∀ (i : ι), IsClopen (s i)\ni : ι\n⊢ s i ≠ ∅\n[PROOFSTEP]\nrw [← nonempty_iff_ne_empty]\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u v : Set α\ninst✝ : PreconnectedSpace α\ns : ι → Set α\nh_nonempty : ∀ (i : ι), Set.Nonempty (s i)\nh_disj : Pairwise (Disjoint on s)\nh_clopen : ∀ (i : ι), IsClopen (s i)\ni : ι\n⊢ Set.Nonempty (s i)\n[PROOFSTEP]\nexact h_nonempty i\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u v : Set α\ninst✝ : PreconnectedSpace α\ns : ι → Set α\nh_disj : Pairwise (Disjoint on s)\nh_clopen : ∀ (i : ι), IsClopen (s i)\nh_nonempty : ∀ (i : ι), s i ≠ ∅\n⊢ Subsingleton ι\n[PROOFSTEP]\nrw [← not_nontrivial_iff_subsingleton]\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u v : Set α\ninst✝ : PreconnectedSpace α\ns : ι → Set α\nh_disj : Pairwise (Disjoint on s)\nh_clopen : ∀ (i : ι), IsClopen (s i)\nh_nonempty : ∀ (i : ι), s i ≠ ∅\n⊢ ¬Nontrivial ι\n[PROOFSTEP]\nby_contra contra\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u v : Set α\ninst✝ : PreconnectedSpace α\ns : ι → Set α\nh_disj : Pairwise (Disjoint on s)\nh_clopen : ∀ (i : ι), IsClopen (s i)\nh_nonempty : ∀ (i : ι), s i ≠ ∅\ncontra : Nontrivial ι\n⊢ False\n[PROOFSTEP]\nobtain ⟨i, j, h_ne⟩ := contra\n[GOAL]\ncase mk.intro.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u v : Set α\ninst✝ : PreconnectedSpace α\ns : ι → Set α\nh_disj : Pairwise (Disjoint on s)\nh_clopen : ∀ (i : ι), IsClopen (s i)\nh_nonempty : ∀ (i : ι), s i ≠ ∅\ni j : ι\nh_ne : i ≠ j\n⊢ False\n[PROOFSTEP]\nreplace h_ne : s i ∩ s j = ∅ := by\n  simpa only [← bot_eq_empty, eq_bot_iff, ← inf_eq_inter, ← disjoint_iff_inf_le] using h_disj h_ne\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u v : Set α\ninst✝ : PreconnectedSpace α\ns : ι → Set α\nh_disj : Pairwise (Disjoint on s)\nh_clopen : ∀ (i : ι), IsClopen (s i)\nh_nonempty : ∀ (i : ι), s i ≠ ∅\ni j : ι\nh_ne : i ≠ j\n⊢ s i ∩ s j = ∅\n[PROOFSTEP]\nsimpa only [← bot_eq_empty, eq_bot_iff, ← inf_eq_inter, ← disjoint_iff_inf_le] using h_disj h_ne\n[GOAL]\ncase mk.intro.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u v : Set α\ninst✝ : PreconnectedSpace α\ns : ι → Set α\nh_disj : Pairwise (Disjoint on s)\nh_clopen : ∀ (i : ι), IsClopen (s i)\nh_nonempty : ∀ (i : ι), s i ≠ ∅\ni j : ι\nh_ne : s i ∩ s j = ∅\n⊢ False\n[PROOFSTEP]\ncases' isClopen_iff.mp (h_clopen i) with hi hi\n[GOAL]\ncase mk.intro.intro.inl\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u v : Set α\ninst✝ : PreconnectedSpace α\ns : ι → Set α\nh_disj : Pairwise (Disjoint on s)\nh_clopen : ∀ (i : ι), IsClopen (s i)\nh_nonempty : ∀ (i : ι), s i ≠ ∅\ni j : ι\nh_ne : s i ∩ s j = ∅\nhi : s i = ∅\n⊢ False\n[PROOFSTEP]\nexact h_nonempty i hi\n[GOAL]\ncase mk.intro.intro.inr\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u v : Set α\ninst✝ : PreconnectedSpace α\ns : ι → Set α\nh_disj : Pairwise (Disjoint on s)\nh_clopen : ∀ (i : ι), IsClopen (s i)\nh_nonempty : ∀ (i : ι), s i ≠ ∅\ni j : ι\nh_ne : s i ∩ s j = ∅\nhi : s i = univ\n⊢ False\n[PROOFSTEP]\nrw [hi, univ_inter] at h_ne \n[GOAL]\ncase mk.intro.intro.inr\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u v : Set α\ninst✝ : PreconnectedSpace α\ns : ι → Set α\nh_disj : Pairwise (Disjoint on s)\nh_clopen : ∀ (i : ι), IsClopen (s i)\nh_nonempty : ∀ (i : ι), s i ≠ ∅\ni j : ι\nh_ne : s j = ∅\nhi : s i = univ\n⊢ False\n[PROOFSTEP]\nexact h_nonempty j h_ne\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u v : Set α\ninst✝ : PreconnectedSpace α\ns : ι → Set α\nh_nonempty : ∀ (i : ι), Set.Nonempty (s i)\nh_disj : Pairwise (Disjoint on s)\nh_open : ∀ (i : ι), IsOpen (s i)\nh_Union : ⋃ (i : ι), s i = univ\n⊢ Subsingleton ι\n[PROOFSTEP]\nrefine' subsingleton_of_disjoint_isClopen h_nonempty h_disj (fun i ↦ ⟨h_open i, _⟩)\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u v : Set α\ninst✝ : PreconnectedSpace α\ns : ι → Set α\nh_nonempty : ∀ (i : ι), Set.Nonempty (s i)\nh_disj : Pairwise (Disjoint on s)\nh_open : ∀ (i : ι), IsOpen (s i)\nh_Union : ⋃ (i : ι), s i = univ\ni : ι\n⊢ IsClosed (s i)\n[PROOFSTEP]\nrw [← isOpen_compl_iff, compl_eq_univ_diff, ← h_Union, iUnion_diff]\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u v : Set α\ninst✝ : PreconnectedSpace α\ns : ι → Set α\nh_nonempty : ∀ (i : ι), Set.Nonempty (s i)\nh_disj : Pairwise (Disjoint on s)\nh_open : ∀ (i : ι), IsOpen (s i)\nh_Union : ⋃ (i : ι), s i = univ\ni : ι\n⊢ IsOpen (⋃ (i_1 : ι), s i_1 \\ s i)\n[PROOFSTEP]\nrefine' isOpen_iUnion (fun j ↦ _)\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u v : Set α\ninst✝ : PreconnectedSpace α\ns : ι → Set α\nh_nonempty : ∀ (i : ι), Set.Nonempty (s i)\nh_disj : Pairwise (Disjoint on s)\nh_open : ∀ (i : ι), IsOpen (s i)\nh_Union : ⋃ (i : ι), s i = univ\ni j : ι\n⊢ IsOpen (s j \\ s i)\n[PROOFSTEP]\nrcases eq_or_ne i j with rfl | h_ne\n[GOAL]\ncase inl\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u v : Set α\ninst✝ : PreconnectedSpace α\ns : ι → Set α\nh_nonempty : ∀ (i : ι), Set.Nonempty (s i)\nh_disj : Pairwise (Disjoint on s)\nh_open : ∀ (i : ι), IsOpen (s i)\nh_Union : ⋃ (i : ι), s i = univ\ni : ι\n⊢ IsOpen (s i \\ s i)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u v : Set α\ninst✝ : PreconnectedSpace α\ns : ι → Set α\nh_nonempty : ∀ (i : ι), Set.Nonempty (s i)\nh_disj : Pairwise (Disjoint on s)\nh_open : ∀ (i : ι), IsOpen (s i)\nh_Union : ⋃ (i : ι), s i = univ\ni j : ι\nh_ne : i ≠ j\n⊢ IsOpen (s j \\ s i)\n[PROOFSTEP]\nsimpa only [(h_disj h_ne.symm).sdiff_eq_left] using h_open j\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝² : TopologicalSpace α\ns✝ t u v : Set α\ninst✝¹ : PreconnectedSpace α\ns : ι → Set α\nh_nonempty : ∀ (i : ι), Set.Nonempty (s i)\nh_disj : Pairwise (Disjoint on s)\ninst✝ : Finite ι\nh_closed : ∀ (i : ι), IsClosed (s i)\nh_Union : ⋃ (i : ι), s i = univ\n⊢ Subsingleton ι\n[PROOFSTEP]\nrefine' subsingleton_of_disjoint_isClopen h_nonempty h_disj (fun i ↦ ⟨_, h_closed i⟩)\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝² : TopologicalSpace α\ns✝ t u v : Set α\ninst✝¹ : PreconnectedSpace α\ns : ι → Set α\nh_nonempty : ∀ (i : ι), Set.Nonempty (s i)\nh_disj : Pairwise (Disjoint on s)\ninst✝ : Finite ι\nh_closed : ∀ (i : ι), IsClosed (s i)\nh_Union : ⋃ (i : ι), s i = univ\ni : ι\n⊢ IsOpen (s i)\n[PROOFSTEP]\nrw [← isClosed_compl_iff, compl_eq_univ_diff, ← h_Union, iUnion_diff]\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝² : TopologicalSpace α\ns✝ t u v : Set α\ninst✝¹ : PreconnectedSpace α\ns : ι → Set α\nh_nonempty : ∀ (i : ι), Set.Nonempty (s i)\nh_disj : Pairwise (Disjoint on s)\ninst✝ : Finite ι\nh_closed : ∀ (i : ι), IsClosed (s i)\nh_Union : ⋃ (i : ι), s i = univ\ni : ι\n⊢ IsClosed (⋃ (i_1 : ι), s i_1 \\ s i)\n[PROOFSTEP]\nrefine' isClosed_iUnion (fun j ↦ _)\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝² : TopologicalSpace α\ns✝ t u v : Set α\ninst✝¹ : PreconnectedSpace α\ns : ι → Set α\nh_nonempty : ∀ (i : ι), Set.Nonempty (s i)\nh_disj : Pairwise (Disjoint on s)\ninst✝ : Finite ι\nh_closed : ∀ (i : ι), IsClosed (s i)\nh_Union : ⋃ (i : ι), s i = univ\ni j : ι\n⊢ IsClosed (s j \\ s i)\n[PROOFSTEP]\nrcases eq_or_ne i j with rfl | h_ne\n[GOAL]\ncase inl\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝² : TopologicalSpace α\ns✝ t u v : Set α\ninst✝¹ : PreconnectedSpace α\ns : ι → Set α\nh_nonempty : ∀ (i : ι), Set.Nonempty (s i)\nh_disj : Pairwise (Disjoint on s)\ninst✝ : Finite ι\nh_closed : ∀ (i : ι), IsClosed (s i)\nh_Union : ⋃ (i : ι), s i = univ\ni : ι\n⊢ IsClosed (s i \\ s i)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝² : TopologicalSpace α\ns✝ t u v : Set α\ninst✝¹ : PreconnectedSpace α\ns : ι → Set α\nh_nonempty : ∀ (i : ι), Set.Nonempty (s i)\nh_disj : Pairwise (Disjoint on s)\ninst✝ : Finite ι\nh_closed : ∀ (i : ι), IsClosed (s i)\nh_Union : ⋃ (i : ι), s i = univ\ni j : ι\nh_ne : i ≠ j\n⊢ IsClosed (s j \\ s i)\n[PROOFSTEP]\nsimpa only [(h_disj h_ne.symm).sdiff_eq_left] using h_closed j\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u v : Set α\ninst✝ : PreconnectedSpace α\ns : Set α\n⊢ Set.Nonempty (frontier s) ↔ Set.Nonempty s ∧ s ≠ univ\n[PROOFSTEP]\nsimp only [nonempty_iff_ne_empty, Ne.def, frontier_eq_empty_iff, not_or]\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u v s : Set α\nh : IsPreconnected s\n⊢ IsPreconnected univ\n[PROOFSTEP]\nrwa [← inducing_subtype_val.isPreconnected_image, image_univ, Subtype.range_val]\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u v s : Set α\nh : PreconnectedSpace ↑s\n⊢ IsPreconnected s\n[PROOFSTEP]\nsimpa using isPreconnected_univ.image ((↑) : s → α) continuous_subtype_val.continuousOn\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t u v : Set α\ninst✝ : PreconnectedSpace α\nP : α → α → Prop\nh : ∀ (x : α), ∀ᶠ (y : α) in 𝓝 x, P x y ∧ P y x\nh' : Transitive P\nx y : α\n⊢ P x y\n[PROOFSTEP]\nlet u := {z | P x z}\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t u✝ v : Set α\ninst✝ : PreconnectedSpace α\nP : α → α → Prop\nh : ∀ (x : α), ∀ᶠ (y : α) in 𝓝 x, P x y ∧ P y x\nh' : Transitive P\nx y : α\nu : Set α := {z | P x z}\n⊢ P x y\n[PROOFSTEP]\nhave A : IsOpen u := by\n  apply isOpen_iff_mem_nhds.2 (fun z hz ↦ ?_)\n  filter_upwards [h z] with t ht\n  exact h' hz ht.1\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t u✝ v : Set α\ninst✝ : PreconnectedSpace α\nP : α → α → Prop\nh : ∀ (x : α), ∀ᶠ (y : α) in 𝓝 x, P x y ∧ P y x\nh' : Transitive P\nx y : α\nu : Set α := {z | P x z}\n⊢ IsOpen u\n[PROOFSTEP]\napply isOpen_iff_mem_nhds.2 (fun z hz ↦ ?_)\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t u✝ v : Set α\ninst✝ : PreconnectedSpace α\nP : α → α → Prop\nh : ∀ (x : α), ∀ᶠ (y : α) in 𝓝 x, P x y ∧ P y x\nh' : Transitive P\nx y : α\nu : Set α := {z | P x z}\nz : α\nhz : z ∈ u\n⊢ u ∈ 𝓝 z\n[PROOFSTEP]\nfilter_upwards [h z] with t ht\n[GOAL]\ncase h\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t✝ u✝ v : Set α\ninst✝ : PreconnectedSpace α\nP : α → α → Prop\nh : ∀ (x : α), ∀ᶠ (y : α) in 𝓝 x, P x y ∧ P y x\nh' : Transitive P\nx y : α\nu : Set α := {z | P x z}\nz : α\nhz : z ∈ u\nt : α\nht : P z t ∧ P t z\n⊢ P x t\n[PROOFSTEP]\nexact h' hz ht.1\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t u✝ v : Set α\ninst✝ : PreconnectedSpace α\nP : α → α → Prop\nh : ∀ (x : α), ∀ᶠ (y : α) in 𝓝 x, P x y ∧ P y x\nh' : Transitive P\nx y : α\nu : Set α := {z | P x z}\nA : IsOpen u\n⊢ P x y\n[PROOFSTEP]\nhave B : IsClosed u := by\n  apply isClosed_iff_nhds.2 (fun z hz ↦ ?_)\n  rcases hz _ (h z) with ⟨t, ht, h't⟩\n  exact h' h't ht.2\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t u✝ v : Set α\ninst✝ : PreconnectedSpace α\nP : α → α → Prop\nh : ∀ (x : α), ∀ᶠ (y : α) in 𝓝 x, P x y ∧ P y x\nh' : Transitive P\nx y : α\nu : Set α := {z | P x z}\nA : IsOpen u\n⊢ IsClosed u\n[PROOFSTEP]\napply isClosed_iff_nhds.2 (fun z hz ↦ ?_)\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t u✝ v : Set α\ninst✝ : PreconnectedSpace α\nP : α → α → Prop\nh : ∀ (x : α), ∀ᶠ (y : α) in 𝓝 x, P x y ∧ P y x\nh' : Transitive P\nx y : α\nu : Set α := {z | P x z}\nA : IsOpen u\nz : α\nhz : ∀ (U : Set α), U ∈ 𝓝 z → Set.Nonempty (U ∩ u)\n⊢ z ∈ u\n[PROOFSTEP]\nrcases hz _ (h z) with ⟨t, ht, h't⟩\n[GOAL]\ncase intro.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t✝ u✝ v : Set α\ninst✝ : PreconnectedSpace α\nP : α → α → Prop\nh : ∀ (x : α), ∀ᶠ (y : α) in 𝓝 x, P x y ∧ P y x\nh' : Transitive P\nx y : α\nu : Set α := {z | P x z}\nA : IsOpen u\nz : α\nhz : ∀ (U : Set α), U ∈ 𝓝 z → Set.Nonempty (U ∩ u)\nt : α\nht : t ∈ {x | (fun y => P z y ∧ P y z) x}\nh't : t ∈ u\n⊢ z ∈ u\n[PROOFSTEP]\nexact h' h't ht.2\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t u✝ v : Set α\ninst✝ : PreconnectedSpace α\nP : α → α → Prop\nh : ∀ (x : α), ∀ᶠ (y : α) in 𝓝 x, P x y ∧ P y x\nh' : Transitive P\nx y : α\nu : Set α := {z | P x z}\nA : IsOpen u\nB : IsClosed u\n⊢ P x y\n[PROOFSTEP]\nhave C : u.Nonempty := ⟨x, (mem_of_mem_nhds (h x)).1⟩\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t u✝ v : Set α\ninst✝ : PreconnectedSpace α\nP : α → α → Prop\nh : ∀ (x : α), ∀ᶠ (y : α) in 𝓝 x, P x y ∧ P y x\nh' : Transitive P\nx y : α\nu : Set α := {z | P x z}\nA : IsOpen u\nB : IsClosed u\nC : Set.Nonempty u\n⊢ P x y\n[PROOFSTEP]\nhave D : u = Set.univ := IsClopen.eq_univ ⟨A, B⟩ C\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t u✝ v : Set α\ninst✝ : PreconnectedSpace α\nP : α → α → Prop\nh : ∀ (x : α), ∀ᶠ (y : α) in 𝓝 x, P x y ∧ P y x\nh' : Transitive P\nx y : α\nu : Set α := {z | P x z}\nA : IsOpen u\nB : IsClosed u\nC : Set.Nonempty u\nD : u = univ\n⊢ P x y\n[PROOFSTEP]\nshow y ∈ u\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t u✝ v : Set α\ninst✝ : PreconnectedSpace α\nP : α → α → Prop\nh : ∀ (x : α), ∀ᶠ (y : α) in 𝓝 x, P x y ∧ P y x\nh' : Transitive P\nx y : α\nu : Set α := {z | P x z}\nA : IsOpen u\nB : IsClosed u\nC : Set.Nonempty u\nD : u = univ\n⊢ y ∈ u\n[PROOFSTEP]\nsimp [D]\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t u v : Set α\ninst✝ : PreconnectedSpace α\nP : α → α → Prop\nh : ∀ (x : α), ∀ᶠ (y : α) in 𝓝 x, P x y\nh' : Transitive P\nh'' : Symmetric P\nx y : α\n⊢ P x y\n[PROOFSTEP]\nrefine PreconnectedSpace.induction₂' P (fun z ↦ ?_) h' x y\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t u v : Set α\ninst✝ : PreconnectedSpace α\nP : α → α → Prop\nh : ∀ (x : α), ∀ᶠ (y : α) in 𝓝 x, P x y\nh' : Transitive P\nh'' : Symmetric P\nx y z : α\n⊢ ∀ᶠ (y : α) in 𝓝 z, P z y ∧ P y z\n[PROOFSTEP]\nfilter_upwards [h z] with a ha\n[GOAL]\ncase h\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t u v : Set α\ninst✝ : PreconnectedSpace α\nP : α → α → Prop\nh : ∀ (x : α), ∀ᶠ (y : α) in 𝓝 x, P x y\nh' : Transitive P\nh'' : Symmetric P\nx y z a : α\nha : P z a\n⊢ P z a ∧ P a z\n[PROOFSTEP]\nrefine ⟨ha, h'' ha⟩\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u v s : Set α\nhs : IsPreconnected s\nP : α → α → Prop\nh : ∀ (x : α), x ∈ s → ∀ᶠ (y : α) in 𝓝[s] x, P x y ∧ P y x\nh' : ∀ (x y z : α), x ∈ s → y ∈ s → z ∈ s → P x y → P y z → P x z\nx y : α\nhx : x ∈ s\nhy : y ∈ s\n⊢ P x y\n[PROOFSTEP]\nlet Q : s → s → Prop := fun a b ↦ P a b\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u v s : Set α\nhs : IsPreconnected s\nP : α → α → Prop\nh : ∀ (x : α), x ∈ s → ∀ᶠ (y : α) in 𝓝[s] x, P x y ∧ P y x\nh' : ∀ (x y z : α), x ∈ s → y ∈ s → z ∈ s → P x y → P y z → P x z\nx y : α\nhx : x ∈ s\nhy : y ∈ s\nQ : ↑s → ↑s → Prop := fun a b => P ↑a ↑b\n⊢ P x y\n[PROOFSTEP]\nshow Q ⟨x, hx⟩ ⟨y, hy⟩\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u v s : Set α\nhs : IsPreconnected s\nP : α → α → Prop\nh : ∀ (x : α), x ∈ s → ∀ᶠ (y : α) in 𝓝[s] x, P x y ∧ P y x\nh' : ∀ (x y z : α), x ∈ s → y ∈ s → z ∈ s → P x y → P y z → P x z\nx y : α\nhx : x ∈ s\nhy : y ∈ s\nQ : ↑s → ↑s → Prop := fun a b => P ↑a ↑b\n⊢ Q { val := x, property := hx } { val := y, property := hy }\n[PROOFSTEP]\nhave : PreconnectedSpace s := Subtype.preconnectedSpace hs\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u v s : Set α\nhs : IsPreconnected s\nP : α → α → Prop\nh : ∀ (x : α), x ∈ s → ∀ᶠ (y : α) in 𝓝[s] x, P x y ∧ P y x\nh' : ∀ (x y z : α), x ∈ s → y ∈ s → z ∈ s → P x y → P y z → P x z\nx y : α\nhx : x ∈ s\nhy : y ∈ s\nQ : ↑s → ↑s → Prop := fun a b => P ↑a ↑b\nthis : PreconnectedSpace ↑s\n⊢ Q { val := x, property := hx } { val := y, property := hy }\n[PROOFSTEP]\napply PreconnectedSpace.induction₂'\n[GOAL]\ncase h\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u v s : Set α\nhs : IsPreconnected s\nP : α → α → Prop\nh : ∀ (x : α), x ∈ s → ∀ᶠ (y : α) in 𝓝[s] x, P x y ∧ P y x\nh' : ∀ (x y z : α), x ∈ s → y ∈ s → z ∈ s → P x y → P y z → P x z\nx y : α\nhx : x ∈ s\nhy : y ∈ s\nQ : ↑s → ↑s → Prop := fun a b => P ↑a ↑b\nthis : PreconnectedSpace ↑s\n⊢ ∀ (x : { x // x ∈ s }), ∀ᶠ (y : { x // x ∈ s }) in 𝓝 x, Q x y ∧ Q y x\n[PROOFSTEP]\nrintro ⟨x, hx⟩\n[GOAL]\ncase h.mk\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u v s : Set α\nhs : IsPreconnected s\nP : α → α → Prop\nh : ∀ (x : α), x ∈ s → ∀ᶠ (y : α) in 𝓝[s] x, P x y ∧ P y x\nh' : ∀ (x y z : α), x ∈ s → y ∈ s → z ∈ s → P x y → P y z → P x z\nx✝ y : α\nhx✝ : x✝ ∈ s\nhy : y ∈ s\nQ : ↑s → ↑s → Prop := fun a b => P ↑a ↑b\nthis : PreconnectedSpace ↑s\nx : α\nhx : x ∈ s\n⊢ ∀ᶠ (y : { x // x ∈ s }) in 𝓝 { val := x, property := hx },\n    Q { val := x, property := hx } y ∧ Q y { val := x, property := hx }\n[PROOFSTEP]\nhave Z := h x hx\n[GOAL]\ncase h.mk\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u v s : Set α\nhs : IsPreconnected s\nP : α → α → Prop\nh : ∀ (x : α), x ∈ s → ∀ᶠ (y : α) in 𝓝[s] x, P x y ∧ P y x\nh' : ∀ (x y z : α), x ∈ s → y ∈ s → z ∈ s → P x y → P y z → P x z\nx✝ y : α\nhx✝ : x✝ ∈ s\nhy : y ∈ s\nQ : ↑s → ↑s → Prop := fun a b => P ↑a ↑b\nthis : PreconnectedSpace ↑s\nx : α\nhx : x ∈ s\nZ : ∀ᶠ (y : α) in 𝓝[s] x, P x y ∧ P y x\n⊢ ∀ᶠ (y : { x // x ∈ s }) in 𝓝 { val := x, property := hx },\n    Q { val := x, property := hx } y ∧ Q y { val := x, property := hx }\n[PROOFSTEP]\nrwa [nhdsWithin_eq_map_subtype_coe] at Z \n[GOAL]\ncase h'\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u v s : Set α\nhs : IsPreconnected s\nP : α → α → Prop\nh : ∀ (x : α), x ∈ s → ∀ᶠ (y : α) in 𝓝[s] x, P x y ∧ P y x\nh' : ∀ (x y z : α), x ∈ s → y ∈ s → z ∈ s → P x y → P y z → P x z\nx y : α\nhx : x ∈ s\nhy : y ∈ s\nQ : ↑s → ↑s → Prop := fun a b => P ↑a ↑b\nthis : PreconnectedSpace ↑s\n⊢ Transitive Q\n[PROOFSTEP]\nrintro ⟨a, ha⟩ ⟨b, hb⟩ ⟨c, hc⟩ hab hbc\n[GOAL]\ncase h'.mk.mk.mk\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u v s : Set α\nhs : IsPreconnected s\nP : α → α → Prop\nh : ∀ (x : α), x ∈ s → ∀ᶠ (y : α) in 𝓝[s] x, P x y ∧ P y x\nh' : ∀ (x y z : α), x ∈ s → y ∈ s → z ∈ s → P x y → P y z → P x z\nx y : α\nhx : x ∈ s\nhy : y ∈ s\nQ : ↑s → ↑s → Prop := fun a b => P ↑a ↑b\nthis : PreconnectedSpace ↑s\na : α\nha : a ∈ s\nb : α\nhb : b ∈ s\nc : α\nhc : c ∈ s\nhab : Q { val := a, property := ha } { val := b, property := hb }\nhbc : Q { val := b, property := hb } { val := c, property := hc }\n⊢ Q { val := a, property := ha } { val := c, property := hc }\n[PROOFSTEP]\nexact h' a b c ha hb hc hab hbc\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u v s : Set α\nhs : IsPreconnected s\nP : α → α → Prop\nh : ∀ (x : α), x ∈ s → ∀ᶠ (y : α) in 𝓝[s] x, P x y\nh' : ∀ (x y z : α), x ∈ s → y ∈ s → z ∈ s → P x y → P y z → P x z\nh'' : ∀ (x y : α), x ∈ s → y ∈ s → P x y → P y x\nx y : α\nhx : x ∈ s\nhy : y ∈ s\n⊢ P x y\n[PROOFSTEP]\napply hs.induction₂' P (fun z hz ↦ ?_) h' hx hy\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u v s : Set α\nhs : IsPreconnected s\nP : α → α → Prop\nh : ∀ (x : α), x ∈ s → ∀ᶠ (y : α) in 𝓝[s] x, P x y\nh' : ∀ (x y z : α), x ∈ s → y ∈ s → z ∈ s → P x y → P y z → P x z\nh'' : ∀ (x y : α), x ∈ s → y ∈ s → P x y → P y x\nx y : α\nhx : x ∈ s\nhy : y ∈ s\nz : α\nhz : z ∈ s\n⊢ ∀ᶠ (y : α) in 𝓝[s] z, P z y ∧ P y z\n[PROOFSTEP]\nfilter_upwards [h z hz, self_mem_nhdsWithin] with a ha h'a\n[GOAL]\ncase h\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u v s : Set α\nhs : IsPreconnected s\nP : α → α → Prop\nh : ∀ (x : α), x ∈ s → ∀ᶠ (y : α) in 𝓝[s] x, P x y\nh' : ∀ (x y z : α), x ∈ s → y ∈ s → z ∈ s → P x y → P y z → P x z\nh'' : ∀ (x y : α), x ∈ s → y ∈ s → P x y → P y x\nx y : α\nhx : x ∈ s\nhy : y ∈ s\nz : α\nhz : z ∈ s\na : α\nha : P z a\nh'a : a ∈ s\n⊢ P z a ∧ P a z\n[PROOFSTEP]\nexact ⟨ha, h'' z a hz h'a ha⟩\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u v s : Set α\n⊢ IsPreconnected s ↔ ∀ (u v : Set α), IsOpen u → IsOpen v → s ⊆ u ∪ v → s ∩ (u ∩ v) = ∅ → s ⊆ u ∨ s ⊆ v\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u v s : Set α\n⊢ IsPreconnected s → ∀ (u v : Set α), IsOpen u → IsOpen v → s ⊆ u ∪ v → s ∩ (u ∩ v) = ∅ → s ⊆ u ∨ s ⊆ v\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u v s : Set α\n⊢ (∀ (u v : Set α), IsOpen u → IsOpen v → s ⊆ u ∪ v → s ∩ (u ∩ v) = ∅ → s ⊆ u ∨ s ⊆ v) → IsPreconnected s\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u v s : Set α\nh : IsPreconnected s\n⊢ ∀ (u v : Set α), IsOpen u → IsOpen v → s ⊆ u ∪ v → s ∩ (u ∩ v) = ∅ → s ⊆ u ∨ s ⊆ v\n[PROOFSTEP]\nintro u v hu hv hs huv\n[GOAL]\ncase mp\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u✝ v✝ s : Set α\nh : IsPreconnected s\nu v : Set α\nhu : IsOpen u\nhv : IsOpen v\nhs : s ⊆ u ∪ v\nhuv : s ∩ (u ∩ v) = ∅\n⊢ s ⊆ u ∨ s ⊆ v\n[PROOFSTEP]\nspecialize h u v hu hv hs\n[GOAL]\ncase mp\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u✝ v✝ s u v : Set α\nhu : IsOpen u\nhv : IsOpen v\nhs : s ⊆ u ∪ v\nhuv : s ∩ (u ∩ v) = ∅\nh : Set.Nonempty (s ∩ u) → Set.Nonempty (s ∩ v) → Set.Nonempty (s ∩ (u ∩ v))\n⊢ s ⊆ u ∨ s ⊆ v\n[PROOFSTEP]\ncontrapose! huv\n[GOAL]\ncase mp\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u✝ v✝ s u v : Set α\nhu : IsOpen u\nhv : IsOpen v\nhs : s ⊆ u ∪ v\nh : Set.Nonempty (s ∩ u) → Set.Nonempty (s ∩ v) → Set.Nonempty (s ∩ (u ∩ v))\nhuv : ¬s ⊆ u ∧ ¬s ⊆ v\n⊢ s ∩ (u ∩ v) ≠ ∅\n[PROOFSTEP]\nrw [← nonempty_iff_ne_empty]\n[GOAL]\ncase mp\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u✝ v✝ s u v : Set α\nhu : IsOpen u\nhv : IsOpen v\nhs : s ⊆ u ∪ v\nh : Set.Nonempty (s ∩ u) → Set.Nonempty (s ∩ v) → Set.Nonempty (s ∩ (u ∩ v))\nhuv : ¬s ⊆ u ∧ ¬s ⊆ v\n⊢ Set.Nonempty (s ∩ (u ∩ v))\n[PROOFSTEP]\nsimp [not_subset] at huv \n[GOAL]\ncase mp\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u✝ v✝ s u v : Set α\nhu : IsOpen u\nhv : IsOpen v\nhs : s ⊆ u ∪ v\nh : Set.Nonempty (s ∩ u) → Set.Nonempty (s ∩ v) → Set.Nonempty (s ∩ (u ∩ v))\nhuv : (∃ a, a ∈ s ∧ ¬a ∈ u) ∧ ∃ a, a ∈ s ∧ ¬a ∈ v\n⊢ Set.Nonempty (s ∩ (u ∩ v))\n[PROOFSTEP]\nrcases huv with ⟨⟨x, hxs, hxu⟩, ⟨y, hys, hyv⟩⟩\n[GOAL]\ncase mp.intro.intro.intro.intro.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u✝ v✝ s u v : Set α\nhu : IsOpen u\nhv : IsOpen v\nhs : s ⊆ u ∪ v\nh : Set.Nonempty (s ∩ u) → Set.Nonempty (s ∩ v) → Set.Nonempty (s ∩ (u ∩ v))\nx : α\nhxs : x ∈ s\nhxu : ¬x ∈ u\ny : α\nhys : y ∈ s\nhyv : ¬y ∈ v\n⊢ Set.Nonempty (s ∩ (u ∩ v))\n[PROOFSTEP]\nhave hxv : x ∈ v := or_iff_not_imp_left.mp (hs hxs) hxu\n[GOAL]\ncase mp.intro.intro.intro.intro.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u✝ v✝ s u v : Set α\nhu : IsOpen u\nhv : IsOpen v\nhs : s ⊆ u ∪ v\nh : Set.Nonempty (s ∩ u) → Set.Nonempty (s ∩ v) → Set.Nonempty (s ∩ (u ∩ v))\nx : α\nhxs : x ∈ s\nhxu : ¬x ∈ u\ny : α\nhys : y ∈ s\nhyv : ¬y ∈ v\nhxv : x ∈ v\n⊢ Set.Nonempty (s ∩ (u ∩ v))\n[PROOFSTEP]\nhave hyu : y ∈ u := or_iff_not_imp_right.mp (hs hys) hyv\n[GOAL]\ncase mp.intro.intro.intro.intro.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u✝ v✝ s u v : Set α\nhu : IsOpen u\nhv : IsOpen v\nhs : s ⊆ u ∪ v\nh : Set.Nonempty (s ∩ u) → Set.Nonempty (s ∩ v) → Set.Nonempty (s ∩ (u ∩ v))\nx : α\nhxs : x ∈ s\nhxu : ¬x ∈ u\ny : α\nhys : y ∈ s\nhyv : ¬y ∈ v\nhxv : x ∈ v\nhyu : y ∈ u\n⊢ Set.Nonempty (s ∩ (u ∩ v))\n[PROOFSTEP]\nexact h ⟨y, hys, hyu⟩ ⟨x, hxs, hxv⟩\n[GOAL]\ncase mpr\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u v s : Set α\nh : ∀ (u v : Set α), IsOpen u → IsOpen v → s ⊆ u ∪ v → s ∩ (u ∩ v) = ∅ → s ⊆ u ∨ s ⊆ v\n⊢ IsPreconnected s\n[PROOFSTEP]\nintro u v hu hv hs hsu hsv\n[GOAL]\ncase mpr\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u✝ v✝ s : Set α\nh : ∀ (u v : Set α), IsOpen u → IsOpen v → s ⊆ u ∪ v → s ∩ (u ∩ v) = ∅ → s ⊆ u ∨ s ⊆ v\nu v : Set α\nhu : IsOpen u\nhv : IsOpen v\nhs : s ⊆ u ∪ v\nhsu : Set.Nonempty (s ∩ u)\nhsv : Set.Nonempty (s ∩ v)\n⊢ Set.Nonempty (s ∩ (u ∩ v))\n[PROOFSTEP]\nrw [nonempty_iff_ne_empty]\n[GOAL]\ncase mpr\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u✝ v✝ s : Set α\nh : ∀ (u v : Set α), IsOpen u → IsOpen v → s ⊆ u ∪ v → s ∩ (u ∩ v) = ∅ → s ⊆ u ∨ s ⊆ v\nu v : Set α\nhu : IsOpen u\nhv : IsOpen v\nhs : s ⊆ u ∪ v\nhsu : Set.Nonempty (s ∩ u)\nhsv : Set.Nonempty (s ∩ v)\n⊢ s ∩ (u ∩ v) ≠ ∅\n[PROOFSTEP]\nintro H\n[GOAL]\ncase mpr\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u✝ v✝ s : Set α\nh : ∀ (u v : Set α), IsOpen u → IsOpen v → s ⊆ u ∪ v → s ∩ (u ∩ v) = ∅ → s ⊆ u ∨ s ⊆ v\nu v : Set α\nhu : IsOpen u\nhv : IsOpen v\nhs : s ⊆ u ∪ v\nhsu : Set.Nonempty (s ∩ u)\nhsv : Set.Nonempty (s ∩ v)\nH : s ∩ (u ∩ v) = ∅\n⊢ False\n[PROOFSTEP]\nspecialize h u v hu hv hs H\n[GOAL]\ncase mpr\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u✝ v✝ s u v : Set α\nhu : IsOpen u\nhv : IsOpen v\nhs : s ⊆ u ∪ v\nhsu : Set.Nonempty (s ∩ u)\nhsv : Set.Nonempty (s ∩ v)\nH : s ∩ (u ∩ v) = ∅\nh : s ⊆ u ∨ s ⊆ v\n⊢ False\n[PROOFSTEP]\ncontrapose H\n[GOAL]\ncase mpr\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u✝ v✝ s u v : Set α\nhu : IsOpen u\nhv : IsOpen v\nhs : s ⊆ u ∪ v\nhsu : Set.Nonempty (s ∩ u)\nhsv : Set.Nonempty (s ∩ v)\nh : s ⊆ u ∨ s ⊆ v\nH : ¬False\n⊢ ¬s ∩ (u ∩ v) = ∅\n[PROOFSTEP]\napply Nonempty.ne_empty\n[GOAL]\ncase mpr.a\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u✝ v✝ s u v : Set α\nhu : IsOpen u\nhv : IsOpen v\nhs : s ⊆ u ∪ v\nhsu : Set.Nonempty (s ∩ u)\nhsv : Set.Nonempty (s ∩ v)\nh : s ⊆ u ∨ s ⊆ v\nH : ¬False\n⊢ Set.Nonempty (s ∩ (u ∩ v))\n[PROOFSTEP]\ncases' h with h h\n[GOAL]\ncase mpr.a.inl\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u✝ v✝ s u v : Set α\nhu : IsOpen u\nhv : IsOpen v\nhs : s ⊆ u ∪ v\nhsu : Set.Nonempty (s ∩ u)\nhsv : Set.Nonempty (s ∩ v)\nH : ¬False\nh : s ⊆ u\n⊢ Set.Nonempty (s ∩ (u ∩ v))\n[PROOFSTEP]\nrcases hsv with ⟨x, hxs, hxv⟩\n[GOAL]\ncase mpr.a.inl.intro.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u✝ v✝ s u v : Set α\nhu : IsOpen u\nhv : IsOpen v\nhs : s ⊆ u ∪ v\nhsu : Set.Nonempty (s ∩ u)\nH : ¬False\nh : s ⊆ u\nx : α\nhxs : x ∈ s\nhxv : x ∈ v\n⊢ Set.Nonempty (s ∩ (u ∩ v))\n[PROOFSTEP]\nexact ⟨x, hxs, ⟨h hxs, hxv⟩⟩\n[GOAL]\ncase mpr.a.inr\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u✝ v✝ s u v : Set α\nhu : IsOpen u\nhv : IsOpen v\nhs : s ⊆ u ∪ v\nhsu : Set.Nonempty (s ∩ u)\nhsv : Set.Nonempty (s ∩ v)\nH : ¬False\nh : s ⊆ v\n⊢ Set.Nonempty (s ∩ (u ∩ v))\n[PROOFSTEP]\nrcases hsu with ⟨x, hxs, hxu⟩\n[GOAL]\ncase mpr.a.inr.intro.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u✝ v✝ s u v : Set α\nhu : IsOpen u\nhv : IsOpen v\nhs : s ⊆ u ∪ v\nhsv : Set.Nonempty (s ∩ v)\nH : ¬False\nh : s ⊆ v\nx : α\nhxs : x ∈ s\nhxu : x ∈ u\n⊢ Set.Nonempty (s ∩ (u ∩ v))\n[PROOFSTEP]\nexact ⟨x, hxs, ⟨hxu, h hxs⟩⟩\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u v s : Set α\n⊢ IsConnected s ↔\n    ∀ (U : Finset (Set α)),\n      (∀ (u v : Set α), u ∈ U → v ∈ U → Set.Nonempty (s ∩ (u ∩ v)) → u = v) →\n        (∀ (u : Set α), u ∈ U → IsOpen u) → s ⊆ ⋃₀ ↑U → ∃ u, u ∈ U ∧ s ⊆ u\n[PROOFSTEP]\nrw [IsConnected, isPreconnected_iff_subset_of_disjoint]\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u v s : Set α\n⊢ (Set.Nonempty s ∧ ∀ (u v : Set α), IsOpen u → IsOpen v → s ⊆ u ∪ v → s ∩ (u ∩ v) = ∅ → s ⊆ u ∨ s ⊆ v) ↔\n    ∀ (U : Finset (Set α)),\n      (∀ (u v : Set α), u ∈ U → v ∈ U → Set.Nonempty (s ∩ (u ∩ v)) → u = v) →\n        (∀ (u : Set α), u ∈ U → IsOpen u) → s ⊆ ⋃₀ ↑U → ∃ u, u ∈ U ∧ s ⊆ u\n[PROOFSTEP]\nrefine ⟨fun ⟨hne, h⟩ U hU hUo hsU => ?_, fun h => ⟨?_, fun u v hu hv hs hsuv => ?_⟩⟩\n[GOAL]\ncase refine_1\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u v s : Set α\nx✝ : Set.Nonempty s ∧ ∀ (u v : Set α), IsOpen u → IsOpen v → s ⊆ u ∪ v → s ∩ (u ∩ v) = ∅ → s ⊆ u ∨ s ⊆ v\nU : Finset (Set α)\nhU : ∀ (u v : Set α), u ∈ U → v ∈ U → Set.Nonempty (s ∩ (u ∩ v)) → u = v\nhUo : ∀ (u : Set α), u ∈ U → IsOpen u\nhsU : s ⊆ ⋃₀ ↑U\nhne : Set.Nonempty s\nh : ∀ (u v : Set α), IsOpen u → IsOpen v → s ⊆ u ∪ v → s ∩ (u ∩ v) = ∅ → s ⊆ u ∨ s ⊆ v\n⊢ ∃ u, u ∈ U ∧ s ⊆ u\n[PROOFSTEP]\ninduction U using Finset.induction_on\n[GOAL]\ncase refine_1.empty\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u v s : Set α\nx✝ : Set.Nonempty s ∧ ∀ (u v : Set α), IsOpen u → IsOpen v → s ⊆ u ∪ v → s ∩ (u ∩ v) = ∅ → s ⊆ u ∨ s ⊆ v\nhne : Set.Nonempty s\nh : ∀ (u v : Set α), IsOpen u → IsOpen v → s ⊆ u ∪ v → s ∩ (u ∩ v) = ∅ → s ⊆ u ∨ s ⊆ v\nhU : ∀ (u v : Set α), u ∈ ∅ → v ∈ ∅ → Set.Nonempty (s ∩ (u ∩ v)) → u = v\nhUo : ∀ (u : Set α), u ∈ ∅ → IsOpen u\nhsU : s ⊆ ⋃₀ ↑∅\n⊢ ∃ u, u ∈ ∅ ∧ s ⊆ u\ncase refine_1.insert\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝¹ t u v s : Set α\nx✝ : Set.Nonempty s ∧ ∀ (u v : Set α), IsOpen u → IsOpen v → s ⊆ u ∪ v → s ∩ (u ∩ v) = ∅ → s ⊆ u ∨ s ⊆ v\nhne : Set.Nonempty s\nh : ∀ (u v : Set α), IsOpen u → IsOpen v → s ⊆ u ∪ v → s ∩ (u ∩ v) = ∅ → s ⊆ u ∨ s ⊆ v\na✝² : Set α\ns✝ : Finset (Set α)\na✝¹ : ¬a✝² ∈ s✝\na✝ :\n  (∀ (u v : Set α), u ∈ s✝ → v ∈ s✝ → Set.Nonempty (s ∩ (u ∩ v)) → u = v) →\n    (∀ (u : Set α), u ∈ s✝ → IsOpen u) → s ⊆ ⋃₀ ↑s✝ → ∃ u, u ∈ s✝ ∧ s ⊆ u\nhU : ∀ (u v : Set α), u ∈ insert a✝² s✝ → v ∈ insert a✝² s✝ → Set.Nonempty (s ∩ (u ∩ v)) → u = v\nhUo : ∀ (u : Set α), u ∈ insert a✝² s✝ → IsOpen u\nhsU : s ⊆ ⋃₀ ↑(insert a✝² s✝)\n⊢ ∃ u, u ∈ insert a✝² s✝ ∧ s ⊆ u\n[PROOFSTEP]\ncase empty => exact absurd (by simpa using hsU) hne.not_subset_empty\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u v s : Set α\nx✝ : Set.Nonempty s ∧ ∀ (u v : Set α), IsOpen u → IsOpen v → s ⊆ u ∪ v → s ∩ (u ∩ v) = ∅ → s ⊆ u ∨ s ⊆ v\nhne : Set.Nonempty s\nh : ∀ (u v : Set α), IsOpen u → IsOpen v → s ⊆ u ∪ v → s ∩ (u ∩ v) = ∅ → s ⊆ u ∨ s ⊆ v\nhU : ∀ (u v : Set α), u ∈ ∅ → v ∈ ∅ → Set.Nonempty (s ∩ (u ∩ v)) → u = v\nhUo : ∀ (u : Set α), u ∈ ∅ → IsOpen u\nhsU : s ⊆ ⋃₀ ↑∅\n⊢ ∃ u, u ∈ ∅ ∧ s ⊆ u\n[PROOFSTEP]\ncase empty => exact absurd (by simpa using hsU) hne.not_subset_empty\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u v s : Set α\nx✝ : Set.Nonempty s ∧ ∀ (u v : Set α), IsOpen u → IsOpen v → s ⊆ u ∪ v → s ∩ (u ∩ v) = ∅ → s ⊆ u ∨ s ⊆ v\nhne : Set.Nonempty s\nh : ∀ (u v : Set α), IsOpen u → IsOpen v → s ⊆ u ∪ v → s ∩ (u ∩ v) = ∅ → s ⊆ u ∨ s ⊆ v\nhU : ∀ (u v : Set α), u ∈ ∅ → v ∈ ∅ → Set.Nonempty (s ∩ (u ∩ v)) → u = v\nhUo : ∀ (u : Set α), u ∈ ∅ → IsOpen u\nhsU : s ⊆ ⋃₀ ↑∅\n⊢ ∃ u, u ∈ ∅ ∧ s ⊆ u\n[PROOFSTEP]\nexact absurd (by simpa using hsU) hne.not_subset_empty\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u v s : Set α\nx✝ : Set.Nonempty s ∧ ∀ (u v : Set α), IsOpen u → IsOpen v → s ⊆ u ∪ v → s ∩ (u ∩ v) = ∅ → s ⊆ u ∨ s ⊆ v\nhne : Set.Nonempty s\nh : ∀ (u v : Set α), IsOpen u → IsOpen v → s ⊆ u ∪ v → s ∩ (u ∩ v) = ∅ → s ⊆ u ∨ s ⊆ v\nhU : ∀ (u v : Set α), u ∈ ∅ → v ∈ ∅ → Set.Nonempty (s ∩ (u ∩ v)) → u = v\nhUo : ∀ (u : Set α), u ∈ ∅ → IsOpen u\nhsU : s ⊆ ⋃₀ ↑∅\n⊢ s ⊆ ∅\n[PROOFSTEP]\nsimpa using hsU\n[GOAL]\ncase refine_1.insert\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝¹ t u v s : Set α\nx✝ : Set.Nonempty s ∧ ∀ (u v : Set α), IsOpen u → IsOpen v → s ⊆ u ∪ v → s ∩ (u ∩ v) = ∅ → s ⊆ u ∨ s ⊆ v\nhne : Set.Nonempty s\nh : ∀ (u v : Set α), IsOpen u → IsOpen v → s ⊆ u ∪ v → s ∩ (u ∩ v) = ∅ → s ⊆ u ∨ s ⊆ v\na✝² : Set α\ns✝ : Finset (Set α)\na✝¹ : ¬a✝² ∈ s✝\na✝ :\n  (∀ (u v : Set α), u ∈ s✝ → v ∈ s✝ → Set.Nonempty (s ∩ (u ∩ v)) → u = v) →\n    (∀ (u : Set α), u ∈ s✝ → IsOpen u) → s ⊆ ⋃₀ ↑s✝ → ∃ u, u ∈ s✝ ∧ s ⊆ u\nhU : ∀ (u v : Set α), u ∈ insert a✝² s✝ → v ∈ insert a✝² s✝ → Set.Nonempty (s ∩ (u ∩ v)) → u = v\nhUo : ∀ (u : Set α), u ∈ insert a✝² s✝ → IsOpen u\nhsU : s ⊆ ⋃₀ ↑(insert a✝² s✝)\n⊢ ∃ u, u ∈ insert a✝² s✝ ∧ s ⊆ u\n[PROOFSTEP]\ncase insert u U uU\n  IH =>\n  simp only [← ball_cond_comm, Finset.forall_mem_insert, Finset.exists_mem_insert, Finset.coe_insert, sUnion_insert,\n    implies_true, true_and] at *\n  refine (h _ hUo.1 (⋃₀ ↑U) (isOpen_sUnion hUo.2) hsU ?_).imp_right ?_\n  · refine subset_empty_iff.1 fun x ⟨hxs, hxu, v, hvU, hxv⟩ => ?_\n    exact ne_of_mem_of_not_mem hvU uU (hU.1 v hvU ⟨x, hxs, hxu, hxv⟩).symm\n  · exact IH (fun u hu => (hU.2 u hu).2) hUo.2\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u✝ v s : Set α\nx✝ : Set.Nonempty s ∧ ∀ (u v : Set α), IsOpen u → IsOpen v → s ⊆ u ∪ v → s ∩ (u ∩ v) = ∅ → s ⊆ u ∨ s ⊆ v\nhne : Set.Nonempty s\nh : ∀ (u v : Set α), IsOpen u → IsOpen v → s ⊆ u ∪ v → s ∩ (u ∩ v) = ∅ → s ⊆ u ∨ s ⊆ v\nu : Set α\nU : Finset (Set α)\nuU : ¬u ∈ U\nIH :\n  (∀ (u v : Set α), u ∈ U → v ∈ U → Set.Nonempty (s ∩ (u ∩ v)) → u = v) →\n    (∀ (u : Set α), u ∈ U → IsOpen u) → s ⊆ ⋃₀ ↑U → ∃ u, u ∈ U ∧ s ⊆ u\nhU : ∀ (u_1 v : Set α), u_1 ∈ insert u U → v ∈ insert u U → Set.Nonempty (s ∩ (u_1 ∩ v)) → u_1 = v\nhUo : ∀ (u_1 : Set α), u_1 ∈ insert u U → IsOpen u_1\nhsU : s ⊆ ⋃₀ ↑(insert u U)\n⊢ ∃ u_1, u_1 ∈ insert u U ∧ s ⊆ u_1\n[PROOFSTEP]\ncase insert u U uU\n  IH =>\n  simp only [← ball_cond_comm, Finset.forall_mem_insert, Finset.exists_mem_insert, Finset.coe_insert, sUnion_insert,\n    implies_true, true_and] at *\n  refine (h _ hUo.1 (⋃₀ ↑U) (isOpen_sUnion hUo.2) hsU ?_).imp_right ?_\n  · refine subset_empty_iff.1 fun x ⟨hxs, hxu, v, hvU, hxv⟩ => ?_\n    exact ne_of_mem_of_not_mem hvU uU (hU.1 v hvU ⟨x, hxs, hxu, hxv⟩).symm\n  · exact IH (fun u hu => (hU.2 u hu).2) hUo.2\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u✝ v s : Set α\nx✝ : Set.Nonempty s ∧ ∀ (u v : Set α), IsOpen u → IsOpen v → s ⊆ u ∪ v → s ∩ (u ∩ v) = ∅ → s ⊆ u ∨ s ⊆ v\nhne : Set.Nonempty s\nh : ∀ (u v : Set α), IsOpen u → IsOpen v → s ⊆ u ∪ v → s ∩ (u ∩ v) = ∅ → s ⊆ u ∨ s ⊆ v\nu : Set α\nU : Finset (Set α)\nuU : ¬u ∈ U\nIH :\n  (∀ (u v : Set α), u ∈ U → v ∈ U → Set.Nonempty (s ∩ (u ∩ v)) → u = v) →\n    (∀ (u : Set α), u ∈ U → IsOpen u) → s ⊆ ⋃₀ ↑U → ∃ u, u ∈ U ∧ s ⊆ u\nhU : ∀ (u_1 v : Set α), u_1 ∈ insert u U → v ∈ insert u U → Set.Nonempty (s ∩ (u_1 ∩ v)) → u_1 = v\nhUo : ∀ (u_1 : Set α), u_1 ∈ insert u U → IsOpen u_1\nhsU : s ⊆ ⋃₀ ↑(insert u U)\n⊢ ∃ u_1, u_1 ∈ insert u U ∧ s ⊆ u_1\n[PROOFSTEP]\nsimp only [← ball_cond_comm, Finset.forall_mem_insert, Finset.exists_mem_insert, Finset.coe_insert, sUnion_insert,\n  implies_true, true_and] at *\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u✝ v s : Set α\nhne : Set.Nonempty s\nu : Set α\nU : Finset (Set α)\nuU : ¬u ∈ U\nx✝ : Set.Nonempty s ∧ ∀ (a : Set α), IsOpen a → ∀ (b : Set α), IsOpen b → s ⊆ a ∪ b → s ∩ (a ∩ b) = ∅ → s ⊆ a ∨ s ⊆ b\nh : ∀ (a : Set α), IsOpen a → ∀ (b : Set α), IsOpen b → s ⊆ a ∪ b → s ∩ (a ∩ b) = ∅ → s ⊆ a ∨ s ⊆ b\nIH :\n  (∀ (a : Set α), a ∈ U → ∀ (b : Set α), b ∈ U → Set.Nonempty (s ∩ (a ∩ b)) → a = b) →\n    (∀ (u : Set α), u ∈ U → IsOpen u) → s ⊆ ⋃₀ ↑U → ∃ u, u ∈ U ∧ s ⊆ u\nhU :\n  (∀ (x : Set α), x ∈ U → Set.Nonempty (s ∩ (u ∩ x)) → u = x) ∧\n    ∀ (x : Set α),\n      x ∈ U → (Set.Nonempty (s ∩ (x ∩ u)) → x = u) ∧ ∀ (x_1 : Set α), x_1 ∈ U → Set.Nonempty (s ∩ (x ∩ x_1)) → x = x_1\nhUo : IsOpen u ∧ ∀ (x : Set α), x ∈ U → IsOpen x\nhsU : s ⊆ u ∪ ⋃₀ ↑U\n⊢ s ⊆ u ∨ ∃ x, x ∈ U ∧ s ⊆ x\n[PROOFSTEP]\nrefine (h _ hUo.1 (⋃₀ ↑U) (isOpen_sUnion hUo.2) hsU ?_).imp_right ?_\n[GOAL]\ncase refine_1\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u✝ v s : Set α\nhne : Set.Nonempty s\nu : Set α\nU : Finset (Set α)\nuU : ¬u ∈ U\nx✝ : Set.Nonempty s ∧ ∀ (a : Set α), IsOpen a → ∀ (b : Set α), IsOpen b → s ⊆ a ∪ b → s ∩ (a ∩ b) = ∅ → s ⊆ a ∨ s ⊆ b\nh : ∀ (a : Set α), IsOpen a → ∀ (b : Set α), IsOpen b → s ⊆ a ∪ b → s ∩ (a ∩ b) = ∅ → s ⊆ a ∨ s ⊆ b\nIH :\n  (∀ (a : Set α), a ∈ U → ∀ (b : Set α), b ∈ U → Set.Nonempty (s ∩ (a ∩ b)) → a = b) →\n    (∀ (u : Set α), u ∈ U → IsOpen u) → s ⊆ ⋃₀ ↑U → ∃ u, u ∈ U ∧ s ⊆ u\nhU :\n  (∀ (x : Set α), x ∈ U → Set.Nonempty (s ∩ (u ∩ x)) → u = x) ∧\n    ∀ (x : Set α),\n      x ∈ U → (Set.Nonempty (s ∩ (x ∩ u)) → x = u) ∧ ∀ (x_1 : Set α), x_1 ∈ U → Set.Nonempty (s ∩ (x ∩ x_1)) → x = x_1\nhUo : IsOpen u ∧ ∀ (x : Set α), x ∈ U → IsOpen x\nhsU : s ⊆ u ∪ ⋃₀ ↑U\n⊢ s ∩ (u ∩ ⋃₀ ↑U) = ∅\n[PROOFSTEP]\nrefine subset_empty_iff.1 fun x ⟨hxs, hxu, v, hvU, hxv⟩ => ?_\n[GOAL]\ncase refine_1\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u✝ v✝ s : Set α\nhne : Set.Nonempty s\nu : Set α\nU : Finset (Set α)\nuU : ¬u ∈ U\nx✝¹ : Set.Nonempty s ∧ ∀ (a : Set α), IsOpen a → ∀ (b : Set α), IsOpen b → s ⊆ a ∪ b → s ∩ (a ∩ b) = ∅ → s ⊆ a ∨ s ⊆ b\nh : ∀ (a : Set α), IsOpen a → ∀ (b : Set α), IsOpen b → s ⊆ a ∪ b → s ∩ (a ∩ b) = ∅ → s ⊆ a ∨ s ⊆ b\nIH :\n  (∀ (a : Set α), a ∈ U → ∀ (b : Set α), b ∈ U → Set.Nonempty (s ∩ (a ∩ b)) → a = b) →\n    (∀ (u : Set α), u ∈ U → IsOpen u) → s ⊆ ⋃₀ ↑U → ∃ u, u ∈ U ∧ s ⊆ u\nhU :\n  (∀ (x : Set α), x ∈ U → Set.Nonempty (s ∩ (u ∩ x)) → u = x) ∧\n    ∀ (x : Set α),\n      x ∈ U → (Set.Nonempty (s ∩ (x ∩ u)) → x = u) ∧ ∀ (x_1 : Set α), x_1 ∈ U → Set.Nonempty (s ∩ (x ∩ x_1)) → x = x_1\nhUo : IsOpen u ∧ ∀ (x : Set α), x ∈ U → IsOpen x\nhsU : s ⊆ u ∪ ⋃₀ ↑U\nx : α\nx✝ : x ∈ s ∩ (u ∩ ⋃₀ ↑U)\nhxs : x ∈ s\nhxu : x ∈ u\nv : Set α\nhvU : v ∈ ↑U\nhxv : x ∈ v\n⊢ x ∈ ∅\n[PROOFSTEP]\nexact ne_of_mem_of_not_mem hvU uU (hU.1 v hvU ⟨x, hxs, hxu, hxv⟩).symm\n[GOAL]\ncase refine_2\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u✝ v s : Set α\nhne : Set.Nonempty s\nu : Set α\nU : Finset (Set α)\nuU : ¬u ∈ U\nx✝ : Set.Nonempty s ∧ ∀ (a : Set α), IsOpen a → ∀ (b : Set α), IsOpen b → s ⊆ a ∪ b → s ∩ (a ∩ b) = ∅ → s ⊆ a ∨ s ⊆ b\nh : ∀ (a : Set α), IsOpen a → ∀ (b : Set α), IsOpen b → s ⊆ a ∪ b → s ∩ (a ∩ b) = ∅ → s ⊆ a ∨ s ⊆ b\nIH :\n  (∀ (a : Set α), a ∈ U → ∀ (b : Set α), b ∈ U → Set.Nonempty (s ∩ (a ∩ b)) → a = b) →\n    (∀ (u : Set α), u ∈ U → IsOpen u) → s ⊆ ⋃₀ ↑U → ∃ u, u ∈ U ∧ s ⊆ u\nhU :\n  (∀ (x : Set α), x ∈ U → Set.Nonempty (s ∩ (u ∩ x)) → u = x) ∧\n    ∀ (x : Set α),\n      x ∈ U → (Set.Nonempty (s ∩ (x ∩ u)) → x = u) ∧ ∀ (x_1 : Set α), x_1 ∈ U → Set.Nonempty (s ∩ (x ∩ x_1)) → x = x_1\nhUo : IsOpen u ∧ ∀ (x : Set α), x ∈ U → IsOpen x\nhsU : s ⊆ u ∪ ⋃₀ ↑U\n⊢ s ⊆ ⋃₀ ↑U → ∃ x, x ∈ U ∧ s ⊆ x\n[PROOFSTEP]\nexact IH (fun u hu => (hU.2 u hu).2) hUo.2\n[GOAL]\ncase refine_2\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u v s : Set α\nh :\n  ∀ (U : Finset (Set α)),\n    (∀ (u v : Set α), u ∈ U → v ∈ U → Set.Nonempty (s ∩ (u ∩ v)) → u = v) →\n      (∀ (u : Set α), u ∈ U → IsOpen u) → s ⊆ ⋃₀ ↑U → ∃ u, u ∈ U ∧ s ⊆ u\n⊢ Set.Nonempty s\n[PROOFSTEP]\nsimpa [subset_empty_iff, nonempty_iff_ne_empty] using h ∅\n[GOAL]\ncase refine_3\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u✝ v✝ s : Set α\nh :\n  ∀ (U : Finset (Set α)),\n    (∀ (u v : Set α), u ∈ U → v ∈ U → Set.Nonempty (s ∩ (u ∩ v)) → u = v) →\n      (∀ (u : Set α), u ∈ U → IsOpen u) → s ⊆ ⋃₀ ↑U → ∃ u, u ∈ U ∧ s ⊆ u\nu v : Set α\nhu : IsOpen u\nhv : IsOpen v\nhs : s ⊆ u ∪ v\nhsuv : s ∩ (u ∩ v) = ∅\n⊢ s ⊆ u ∨ s ⊆ v\n[PROOFSTEP]\nrw [← not_nonempty_iff_eq_empty] at hsuv \n[GOAL]\ncase refine_3\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u✝ v✝ s : Set α\nh :\n  ∀ (U : Finset (Set α)),\n    (∀ (u v : Set α), u ∈ U → v ∈ U → Set.Nonempty (s ∩ (u ∩ v)) → u = v) →\n      (∀ (u : Set α), u ∈ U → IsOpen u) → s ⊆ ⋃₀ ↑U → ∃ u, u ∈ U ∧ s ⊆ u\nu v : Set α\nhu : IsOpen u\nhv : IsOpen v\nhs : s ⊆ u ∪ v\nhsuv : ¬Set.Nonempty (s ∩ (u ∩ v))\n⊢ s ⊆ u ∨ s ⊆ v\n[PROOFSTEP]\nhave := hsuv\n[GOAL]\ncase refine_3\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u✝ v✝ s : Set α\nh :\n  ∀ (U : Finset (Set α)),\n    (∀ (u v : Set α), u ∈ U → v ∈ U → Set.Nonempty (s ∩ (u ∩ v)) → u = v) →\n      (∀ (u : Set α), u ∈ U → IsOpen u) → s ⊆ ⋃₀ ↑U → ∃ u, u ∈ U ∧ s ⊆ u\nu v : Set α\nhu : IsOpen u\nhv : IsOpen v\nhs : s ⊆ u ∪ v\nhsuv this : ¬Set.Nonempty (s ∩ (u ∩ v))\n⊢ s ⊆ u ∨ s ⊆ v\n[PROOFSTEP]\nrw [inter_comm u] at this \n[GOAL]\ncase refine_3\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u✝ v✝ s : Set α\nh :\n  ∀ (U : Finset (Set α)),\n    (∀ (u v : Set α), u ∈ U → v ∈ U → Set.Nonempty (s ∩ (u ∩ v)) → u = v) →\n      (∀ (u : Set α), u ∈ U → IsOpen u) → s ⊆ ⋃₀ ↑U → ∃ u, u ∈ U ∧ s ⊆ u\nu v : Set α\nhu : IsOpen u\nhv : IsOpen v\nhs : s ⊆ u ∪ v\nhsuv : ¬Set.Nonempty (s ∩ (u ∩ v))\nthis : ¬Set.Nonempty (s ∩ (v ∩ u))\n⊢ s ⊆ u ∨ s ⊆ v\n[PROOFSTEP]\nsimpa [*, or_imp, forall_and] using h { u, v }\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\n⊢ IsPreconnected s ↔ ∀ (u v : Set α), IsClosed u → IsClosed v → s ⊆ u ∪ v → s ∩ (u ∩ v) = ∅ → s ⊆ u ∨ s ⊆ v\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\n⊢ IsPreconnected s → ∀ (u v : Set α), IsClosed u → IsClosed v → s ⊆ u ∪ v → s ∩ (u ∩ v) = ∅ → s ⊆ u ∨ s ⊆ v\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\n⊢ (∀ (u v : Set α), IsClosed u → IsClosed v → s ⊆ u ∪ v → s ∩ (u ∩ v) = ∅ → s ⊆ u ∨ s ⊆ v) → IsPreconnected s\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\nh : IsPreconnected s\n⊢ ∀ (u v : Set α), IsClosed u → IsClosed v → s ⊆ u ∪ v → s ∩ (u ∩ v) = ∅ → s ⊆ u ∨ s ⊆ v\n[PROOFSTEP]\nintro u v hu hv hs huv\n[GOAL]\ncase mp\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u✝ v✝ : Set α\nh : IsPreconnected s\nu v : Set α\nhu : IsClosed u\nhv : IsClosed v\nhs : s ⊆ u ∪ v\nhuv : s ∩ (u ∩ v) = ∅\n⊢ s ⊆ u ∨ s ⊆ v\n[PROOFSTEP]\nrw [isPreconnected_closed_iff] at h \n[GOAL]\ncase mp\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u✝ v✝ : Set α\nh :\n  ∀ (t t' : Set α),\n    IsClosed t → IsClosed t' → s ⊆ t ∪ t' → Set.Nonempty (s ∩ t) → Set.Nonempty (s ∩ t') → Set.Nonempty (s ∩ (t ∩ t'))\nu v : Set α\nhu : IsClosed u\nhv : IsClosed v\nhs : s ⊆ u ∪ v\nhuv : s ∩ (u ∩ v) = ∅\n⊢ s ⊆ u ∨ s ⊆ v\n[PROOFSTEP]\nspecialize h u v hu hv hs\n[GOAL]\ncase mp\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u✝ v✝ u v : Set α\nhu : IsClosed u\nhv : IsClosed v\nhs : s ⊆ u ∪ v\nhuv : s ∩ (u ∩ v) = ∅\nh : Set.Nonempty (s ∩ u) → Set.Nonempty (s ∩ v) → Set.Nonempty (s ∩ (u ∩ v))\n⊢ s ⊆ u ∨ s ⊆ v\n[PROOFSTEP]\ncontrapose! huv\n[GOAL]\ncase mp\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u✝ v✝ u v : Set α\nhu : IsClosed u\nhv : IsClosed v\nhs : s ⊆ u ∪ v\nh : Set.Nonempty (s ∩ u) → Set.Nonempty (s ∩ v) → Set.Nonempty (s ∩ (u ∩ v))\nhuv : ¬s ⊆ u ∧ ¬s ⊆ v\n⊢ s ∩ (u ∩ v) ≠ ∅\n[PROOFSTEP]\nrw [← nonempty_iff_ne_empty]\n[GOAL]\ncase mp\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u✝ v✝ u v : Set α\nhu : IsClosed u\nhv : IsClosed v\nhs : s ⊆ u ∪ v\nh : Set.Nonempty (s ∩ u) → Set.Nonempty (s ∩ v) → Set.Nonempty (s ∩ (u ∩ v))\nhuv : ¬s ⊆ u ∧ ¬s ⊆ v\n⊢ Set.Nonempty (s ∩ (u ∩ v))\n[PROOFSTEP]\nsimp [not_subset] at huv \n[GOAL]\ncase mp\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u✝ v✝ u v : Set α\nhu : IsClosed u\nhv : IsClosed v\nhs : s ⊆ u ∪ v\nh : Set.Nonempty (s ∩ u) → Set.Nonempty (s ∩ v) → Set.Nonempty (s ∩ (u ∩ v))\nhuv : (∃ a, a ∈ s ∧ ¬a ∈ u) ∧ ∃ a, a ∈ s ∧ ¬a ∈ v\n⊢ Set.Nonempty (s ∩ (u ∩ v))\n[PROOFSTEP]\nrcases huv with ⟨⟨x, hxs, hxu⟩, ⟨y, hys, hyv⟩⟩\n[GOAL]\ncase mp.intro.intro.intro.intro.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u✝ v✝ u v : Set α\nhu : IsClosed u\nhv : IsClosed v\nhs : s ⊆ u ∪ v\nh : Set.Nonempty (s ∩ u) → Set.Nonempty (s ∩ v) → Set.Nonempty (s ∩ (u ∩ v))\nx : α\nhxs : x ∈ s\nhxu : ¬x ∈ u\ny : α\nhys : y ∈ s\nhyv : ¬y ∈ v\n⊢ Set.Nonempty (s ∩ (u ∩ v))\n[PROOFSTEP]\nhave hxv : x ∈ v := or_iff_not_imp_left.mp (hs hxs) hxu\n[GOAL]\ncase mp.intro.intro.intro.intro.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u✝ v✝ u v : Set α\nhu : IsClosed u\nhv : IsClosed v\nhs : s ⊆ u ∪ v\nh : Set.Nonempty (s ∩ u) → Set.Nonempty (s ∩ v) → Set.Nonempty (s ∩ (u ∩ v))\nx : α\nhxs : x ∈ s\nhxu : ¬x ∈ u\ny : α\nhys : y ∈ s\nhyv : ¬y ∈ v\nhxv : x ∈ v\n⊢ Set.Nonempty (s ∩ (u ∩ v))\n[PROOFSTEP]\nhave hyu : y ∈ u := or_iff_not_imp_right.mp (hs hys) hyv\n[GOAL]\ncase mp.intro.intro.intro.intro.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u✝ v✝ u v : Set α\nhu : IsClosed u\nhv : IsClosed v\nhs : s ⊆ u ∪ v\nh : Set.Nonempty (s ∩ u) → Set.Nonempty (s ∩ v) → Set.Nonempty (s ∩ (u ∩ v))\nx : α\nhxs : x ∈ s\nhxu : ¬x ∈ u\ny : α\nhys : y ∈ s\nhyv : ¬y ∈ v\nhxv : x ∈ v\nhyu : y ∈ u\n⊢ Set.Nonempty (s ∩ (u ∩ v))\n[PROOFSTEP]\nexact h ⟨y, hys, hyu⟩ ⟨x, hxs, hxv⟩\n[GOAL]\ncase mpr\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\nh : ∀ (u v : Set α), IsClosed u → IsClosed v → s ⊆ u ∪ v → s ∩ (u ∩ v) = ∅ → s ⊆ u ∨ s ⊆ v\n⊢ IsPreconnected s\n[PROOFSTEP]\nrw [isPreconnected_closed_iff]\n[GOAL]\ncase mpr\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\nh : ∀ (u v : Set α), IsClosed u → IsClosed v → s ⊆ u ∪ v → s ∩ (u ∩ v) = ∅ → s ⊆ u ∨ s ⊆ v\n⊢ ∀ (t t' : Set α),\n    IsClosed t → IsClosed t' → s ⊆ t ∪ t' → Set.Nonempty (s ∩ t) → Set.Nonempty (s ∩ t') → Set.Nonempty (s ∩ (t ∩ t'))\n[PROOFSTEP]\nintro u v hu hv hs hsu hsv\n[GOAL]\ncase mpr\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u✝ v✝ : Set α\nh : ∀ (u v : Set α), IsClosed u → IsClosed v → s ⊆ u ∪ v → s ∩ (u ∩ v) = ∅ → s ⊆ u ∨ s ⊆ v\nu v : Set α\nhu : IsClosed u\nhv : IsClosed v\nhs : s ⊆ u ∪ v\nhsu : Set.Nonempty (s ∩ u)\nhsv : Set.Nonempty (s ∩ v)\n⊢ Set.Nonempty (s ∩ (u ∩ v))\n[PROOFSTEP]\nrw [nonempty_iff_ne_empty]\n[GOAL]\ncase mpr\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u✝ v✝ : Set α\nh : ∀ (u v : Set α), IsClosed u → IsClosed v → s ⊆ u ∪ v → s ∩ (u ∩ v) = ∅ → s ⊆ u ∨ s ⊆ v\nu v : Set α\nhu : IsClosed u\nhv : IsClosed v\nhs : s ⊆ u ∪ v\nhsu : Set.Nonempty (s ∩ u)\nhsv : Set.Nonempty (s ∩ v)\n⊢ s ∩ (u ∩ v) ≠ ∅\n[PROOFSTEP]\nintro H\n[GOAL]\ncase mpr\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u✝ v✝ : Set α\nh : ∀ (u v : Set α), IsClosed u → IsClosed v → s ⊆ u ∪ v → s ∩ (u ∩ v) = ∅ → s ⊆ u ∨ s ⊆ v\nu v : Set α\nhu : IsClosed u\nhv : IsClosed v\nhs : s ⊆ u ∪ v\nhsu : Set.Nonempty (s ∩ u)\nhsv : Set.Nonempty (s ∩ v)\nH : s ∩ (u ∩ v) = ∅\n⊢ False\n[PROOFSTEP]\nspecialize h u v hu hv hs H\n[GOAL]\ncase mpr\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u✝ v✝ u v : Set α\nhu : IsClosed u\nhv : IsClosed v\nhs : s ⊆ u ∪ v\nhsu : Set.Nonempty (s ∩ u)\nhsv : Set.Nonempty (s ∩ v)\nH : s ∩ (u ∩ v) = ∅\nh : s ⊆ u ∨ s ⊆ v\n⊢ False\n[PROOFSTEP]\ncontrapose H\n[GOAL]\ncase mpr\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u✝ v✝ u v : Set α\nhu : IsClosed u\nhv : IsClosed v\nhs : s ⊆ u ∪ v\nhsu : Set.Nonempty (s ∩ u)\nhsv : Set.Nonempty (s ∩ v)\nh : s ⊆ u ∨ s ⊆ v\nH : ¬False\n⊢ ¬s ∩ (u ∩ v) = ∅\n[PROOFSTEP]\napply Nonempty.ne_empty\n[GOAL]\ncase mpr.a\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u✝ v✝ u v : Set α\nhu : IsClosed u\nhv : IsClosed v\nhs : s ⊆ u ∪ v\nhsu : Set.Nonempty (s ∩ u)\nhsv : Set.Nonempty (s ∩ v)\nh : s ⊆ u ∨ s ⊆ v\nH : ¬False\n⊢ Set.Nonempty (s ∩ (u ∩ v))\n[PROOFSTEP]\ncases' h with h h\n[GOAL]\ncase mpr.a.inl\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u✝ v✝ u v : Set α\nhu : IsClosed u\nhv : IsClosed v\nhs : s ⊆ u ∪ v\nhsu : Set.Nonempty (s ∩ u)\nhsv : Set.Nonempty (s ∩ v)\nH : ¬False\nh : s ⊆ u\n⊢ Set.Nonempty (s ∩ (u ∩ v))\n[PROOFSTEP]\nrcases hsv with ⟨x, hxs, hxv⟩\n[GOAL]\ncase mpr.a.inl.intro.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u✝ v✝ u v : Set α\nhu : IsClosed u\nhv : IsClosed v\nhs : s ⊆ u ∪ v\nhsu : Set.Nonempty (s ∩ u)\nH : ¬False\nh : s ⊆ u\nx : α\nhxs : x ∈ s\nhxv : x ∈ v\n⊢ Set.Nonempty (s ∩ (u ∩ v))\n[PROOFSTEP]\nexact ⟨x, hxs, ⟨h hxs, hxv⟩⟩\n[GOAL]\ncase mpr.a.inr\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u✝ v✝ u v : Set α\nhu : IsClosed u\nhv : IsClosed v\nhs : s ⊆ u ∪ v\nhsu : Set.Nonempty (s ∩ u)\nhsv : Set.Nonempty (s ∩ v)\nH : ¬False\nh : s ⊆ v\n⊢ Set.Nonempty (s ∩ (u ∩ v))\n[PROOFSTEP]\nrcases hsu with ⟨x, hxs, hxu⟩\n[GOAL]\ncase mpr.a.inr.intro.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u✝ v✝ u v : Set α\nhu : IsClosed u\nhv : IsClosed v\nhs : s ⊆ u ∪ v\nhsv : Set.Nonempty (s ∩ v)\nH : ¬False\nh : s ⊆ v\nx : α\nhxs : x ∈ s\nhxu : x ∈ u\n⊢ Set.Nonempty (s ∩ (u ∩ v))\n[PROOFSTEP]\nexact ⟨x, hxs, ⟨hxu, h hxs⟩⟩\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u v s : Set α\nhs : IsClosed s\n⊢ IsPreconnected s ↔ ∀ (u v : Set α), IsClosed u → IsClosed v → s ⊆ u ∪ v → Disjoint u v → s ⊆ u ∨ s ⊆ v\n[PROOFSTEP]\nrefine isPreconnected_iff_subset_of_disjoint_closed.trans ⟨?_, ?_⟩\n[GOAL]\ncase refine_1\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u v s : Set α\nhs : IsClosed s\n⊢ (∀ (u v : Set α), IsClosed u → IsClosed v → s ⊆ u ∪ v → s ∩ (u ∩ v) = ∅ → s ⊆ u ∨ s ⊆ v) →\n    ∀ (u v : Set α), IsClosed u → IsClosed v → s ⊆ u ∪ v → Disjoint u v → s ⊆ u ∨ s ⊆ v\n[PROOFSTEP]\nintro H u v hu hv hss huv\n[GOAL]\ncase refine_2\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u v s : Set α\nhs : IsClosed s\n⊢ (∀ (u v : Set α), IsClosed u → IsClosed v → s ⊆ u ∪ v → Disjoint u v → s ⊆ u ∨ s ⊆ v) →\n    ∀ (u v : Set α), IsClosed u → IsClosed v → s ⊆ u ∪ v → s ∩ (u ∩ v) = ∅ → s ⊆ u ∨ s ⊆ v\n[PROOFSTEP]\nintro H u v hu hv hss huv\n[GOAL]\ncase refine_1\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u✝ v✝ s : Set α\nhs : IsClosed s\nH : ∀ (u v : Set α), IsClosed u → IsClosed v → s ⊆ u ∪ v → s ∩ (u ∩ v) = ∅ → s ⊆ u ∨ s ⊆ v\nu v : Set α\nhu : IsClosed u\nhv : IsClosed v\nhss : s ⊆ u ∪ v\nhuv : Disjoint u v\n⊢ s ⊆ u ∨ s ⊆ v\n[PROOFSTEP]\napply H u v hu hv hss\n[GOAL]\ncase refine_1\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u✝ v✝ s : Set α\nhs : IsClosed s\nH : ∀ (u v : Set α), IsClosed u → IsClosed v → s ⊆ u ∪ v → s ∩ (u ∩ v) = ∅ → s ⊆ u ∨ s ⊆ v\nu v : Set α\nhu : IsClosed u\nhv : IsClosed v\nhss : s ⊆ u ∪ v\nhuv : Disjoint u v\n⊢ s ∩ (u ∩ v) = ∅\n[PROOFSTEP]\nrw [huv.inter_eq, inter_empty]\n[GOAL]\ncase refine_2\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u✝ v✝ s : Set α\nhs : IsClosed s\nH : ∀ (u v : Set α), IsClosed u → IsClosed v → s ⊆ u ∪ v → Disjoint u v → s ⊆ u ∨ s ⊆ v\nu v : Set α\nhu : IsClosed u\nhv : IsClosed v\nhss : s ⊆ u ∪ v\nhuv : s ∩ (u ∩ v) = ∅\n⊢ s ⊆ u ∨ s ⊆ v\n[PROOFSTEP]\nhave H1 := H (u ∩ s) (v ∩ s)\n[GOAL]\ncase refine_2\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u✝ v✝ s : Set α\nhs : IsClosed s\nH : ∀ (u v : Set α), IsClosed u → IsClosed v → s ⊆ u ∪ v → Disjoint u v → s ⊆ u ∨ s ⊆ v\nu v : Set α\nhu : IsClosed u\nhv : IsClosed v\nhss : s ⊆ u ∪ v\nhuv : s ∩ (u ∩ v) = ∅\nH1 : IsClosed (u ∩ s) → IsClosed (v ∩ s) → s ⊆ u ∩ s ∪ v ∩ s → Disjoint (u ∩ s) (v ∩ s) → s ⊆ u ∩ s ∨ s ⊆ v ∩ s\n⊢ s ⊆ u ∨ s ⊆ v\n[PROOFSTEP]\nrw [subset_inter_iff, subset_inter_iff] at H1 \n[GOAL]\ncase refine_2\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u✝ v✝ s : Set α\nhs : IsClosed s\nH : ∀ (u v : Set α), IsClosed u → IsClosed v → s ⊆ u ∪ v → Disjoint u v → s ⊆ u ∨ s ⊆ v\nu v : Set α\nhu : IsClosed u\nhv : IsClosed v\nhss : s ⊆ u ∪ v\nhuv : s ∩ (u ∩ v) = ∅\nH1 : IsClosed (u ∩ s) → IsClosed (v ∩ s) → s ⊆ u ∩ s ∪ v ∩ s → Disjoint (u ∩ s) (v ∩ s) → s ⊆ u ∧ s ⊆ s ∨ s ⊆ v ∧ s ⊆ s\n⊢ s ⊆ u ∨ s ⊆ v\n[PROOFSTEP]\nsimp only [Subset.refl, and_true] at H1 \n[GOAL]\ncase refine_2\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u✝ v✝ s : Set α\nhs : IsClosed s\nH : ∀ (u v : Set α), IsClosed u → IsClosed v → s ⊆ u ∪ v → Disjoint u v → s ⊆ u ∨ s ⊆ v\nu v : Set α\nhu : IsClosed u\nhv : IsClosed v\nhss : s ⊆ u ∪ v\nhuv : s ∩ (u ∩ v) = ∅\nH1 : IsClosed (u ∩ s) → IsClosed (v ∩ s) → s ⊆ u ∩ s ∪ v ∩ s → Disjoint (u ∩ s) (v ∩ s) → s ⊆ u ∨ s ⊆ v\n⊢ s ⊆ u ∨ s ⊆ v\n[PROOFSTEP]\napply H1 (hu.inter hs) (hv.inter hs)\n[GOAL]\ncase refine_2.a\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u✝ v✝ s : Set α\nhs : IsClosed s\nH : ∀ (u v : Set α), IsClosed u → IsClosed v → s ⊆ u ∪ v → Disjoint u v → s ⊆ u ∨ s ⊆ v\nu v : Set α\nhu : IsClosed u\nhv : IsClosed v\nhss : s ⊆ u ∪ v\nhuv : s ∩ (u ∩ v) = ∅\nH1 : IsClosed (u ∩ s) → IsClosed (v ∩ s) → s ⊆ u ∩ s ∪ v ∩ s → Disjoint (u ∩ s) (v ∩ s) → s ⊆ u ∨ s ⊆ v\n⊢ s ⊆ u ∩ s ∪ v ∩ s\n[PROOFSTEP]\nrw [← inter_distrib_right]\n[GOAL]\ncase refine_2.a\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u✝ v✝ s : Set α\nhs : IsClosed s\nH : ∀ (u v : Set α), IsClosed u → IsClosed v → s ⊆ u ∪ v → Disjoint u v → s ⊆ u ∨ s ⊆ v\nu v : Set α\nhu : IsClosed u\nhv : IsClosed v\nhss : s ⊆ u ∪ v\nhuv : s ∩ (u ∩ v) = ∅\nH1 : IsClosed (u ∩ s) → IsClosed (v ∩ s) → s ⊆ u ∩ s ∪ v ∩ s → Disjoint (u ∩ s) (v ∩ s) → s ⊆ u ∨ s ⊆ v\n⊢ s ⊆ (u ∪ v) ∩ s\n[PROOFSTEP]\nexact subset_inter hss Subset.rfl\n[GOAL]\ncase refine_2.a\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u✝ v✝ s : Set α\nhs : IsClosed s\nH : ∀ (u v : Set α), IsClosed u → IsClosed v → s ⊆ u ∪ v → Disjoint u v → s ⊆ u ∨ s ⊆ v\nu v : Set α\nhu : IsClosed u\nhv : IsClosed v\nhss : s ⊆ u ∪ v\nhuv : s ∩ (u ∩ v) = ∅\nH1 : IsClosed (u ∩ s) → IsClosed (v ∩ s) → s ⊆ u ∩ s ∪ v ∩ s → Disjoint (u ∩ s) (v ∩ s) → s ⊆ u ∨ s ⊆ v\n⊢ Disjoint (u ∩ s) (v ∩ s)\n[PROOFSTEP]\nrwa [disjoint_iff_inter_eq_empty, ← inter_inter_distrib_right, inter_comm]\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t✝ u v : Set α\ninst✝ : TopologicalSpace β\nf : α → β\nconnected_fibers : ∀ (t : β), IsConnected (f ⁻¹' {t})\nhcl : ∀ (T : Set β), IsClosed T ↔ IsClosed (f ⁻¹' T)\nt : β\n⊢ IsConnected (f ⁻¹' connectedComponent t)\n[PROOFSTEP]\nhave hf : Surjective f := Surjective.of_comp fun t : β => (connected_fibers t).1\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t✝ u v : Set α\ninst✝ : TopologicalSpace β\nf : α → β\nconnected_fibers : ∀ (t : β), IsConnected (f ⁻¹' {t})\nhcl : ∀ (T : Set β), IsClosed T ↔ IsClosed (f ⁻¹' T)\nt : β\nhf : Surjective f\n⊢ IsConnected (f ⁻¹' connectedComponent t)\n[PROOFSTEP]\nrefine ⟨Nonempty.preimage connectedComponent_nonempty hf, ?_⟩\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t✝ u v : Set α\ninst✝ : TopologicalSpace β\nf : α → β\nconnected_fibers : ∀ (t : β), IsConnected (f ⁻¹' {t})\nhcl : ∀ (T : Set β), IsClosed T ↔ IsClosed (f ⁻¹' T)\nt : β\nhf : Surjective f\n⊢ IsPreconnected (f ⁻¹' connectedComponent t)\n[PROOFSTEP]\nhave hT : IsClosed (f ⁻¹' connectedComponent t) := (hcl (connectedComponent t)).1 isClosed_connectedComponent\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t✝ u v : Set α\ninst✝ : TopologicalSpace β\nf : α → β\nconnected_fibers : ∀ (t : β), IsConnected (f ⁻¹' {t})\nhcl : ∀ (T : Set β), IsClosed T ↔ IsClosed (f ⁻¹' T)\nt : β\nhf : Surjective f\nhT : IsClosed (f ⁻¹' connectedComponent t)\n⊢ IsPreconnected (f ⁻¹' connectedComponent t)\n[PROOFSTEP]\nrw [isPreconnected_iff_subset_of_fully_disjoint_closed hT]\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t✝ u v : Set α\ninst✝ : TopologicalSpace β\nf : α → β\nconnected_fibers : ∀ (t : β), IsConnected (f ⁻¹' {t})\nhcl : ∀ (T : Set β), IsClosed T ↔ IsClosed (f ⁻¹' T)\nt : β\nhf : Surjective f\nhT : IsClosed (f ⁻¹' connectedComponent t)\n⊢ ∀ (u v : Set α),\n    IsClosed u →\n      IsClosed v →\n        f ⁻¹' connectedComponent t ⊆ u ∪ v →\n          Disjoint u v → f ⁻¹' connectedComponent t ⊆ u ∨ f ⁻¹' connectedComponent t ⊆ v\n[PROOFSTEP]\nintro u v hu hv huv uv_disj\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t✝ u✝ v✝ : Set α\ninst✝ : TopologicalSpace β\nf : α → β\nconnected_fibers : ∀ (t : β), IsConnected (f ⁻¹' {t})\nhcl : ∀ (T : Set β), IsClosed T ↔ IsClosed (f ⁻¹' T)\nt : β\nhf : Surjective f\nhT : IsClosed (f ⁻¹' connectedComponent t)\nu v : Set α\nhu : IsClosed u\nhv : IsClosed v\nhuv : f ⁻¹' connectedComponent t ⊆ u ∪ v\nuv_disj : Disjoint u v\n⊢ f ⁻¹' connectedComponent t ⊆ u ∨ f ⁻¹' connectedComponent t ⊆ v\n[PROOFSTEP]\nlet T₁ := {t' ∈ connectedComponent t | f ⁻¹' { t' } ⊆ u}\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t✝ u✝ v✝ : Set α\ninst✝ : TopologicalSpace β\nf : α → β\nconnected_fibers : ∀ (t : β), IsConnected (f ⁻¹' {t})\nhcl : ∀ (T : Set β), IsClosed T ↔ IsClosed (f ⁻¹' T)\nt : β\nhf : Surjective f\nhT : IsClosed (f ⁻¹' connectedComponent t)\nu v : Set α\nhu : IsClosed u\nhv : IsClosed v\nhuv : f ⁻¹' connectedComponent t ⊆ u ∪ v\nuv_disj : Disjoint u v\nT₁ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ u}\n⊢ f ⁻¹' connectedComponent t ⊆ u ∨ f ⁻¹' connectedComponent t ⊆ v\n[PROOFSTEP]\nlet T₂ := {t' ∈ connectedComponent t | f ⁻¹' { t' } ⊆ v}\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t✝ u✝ v✝ : Set α\ninst✝ : TopologicalSpace β\nf : α → β\nconnected_fibers : ∀ (t : β), IsConnected (f ⁻¹' {t})\nhcl : ∀ (T : Set β), IsClosed T ↔ IsClosed (f ⁻¹' T)\nt : β\nhf : Surjective f\nhT : IsClosed (f ⁻¹' connectedComponent t)\nu v : Set α\nhu : IsClosed u\nhv : IsClosed v\nhuv : f ⁻¹' connectedComponent t ⊆ u ∪ v\nuv_disj : Disjoint u v\nT₁ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ u}\nT₂ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ v}\n⊢ f ⁻¹' connectedComponent t ⊆ u ∨ f ⁻¹' connectedComponent t ⊆ v\n[PROOFSTEP]\nhave fiber_decomp : ∀ t' ∈ connectedComponent t, f ⁻¹' { t' } ⊆ u ∨ f ⁻¹' { t' } ⊆ v :=\n  by\n  intro t' ht'\n  apply isPreconnected_iff_subset_of_disjoint_closed.1 (connected_fibers t').2 u v hu hv\n  · exact Subset.trans (preimage_mono (singleton_subset_iff.2 ht')) huv\n  rw [uv_disj.inter_eq, inter_empty]\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t✝ u✝ v✝ : Set α\ninst✝ : TopologicalSpace β\nf : α → β\nconnected_fibers : ∀ (t : β), IsConnected (f ⁻¹' {t})\nhcl : ∀ (T : Set β), IsClosed T ↔ IsClosed (f ⁻¹' T)\nt : β\nhf : Surjective f\nhT : IsClosed (f ⁻¹' connectedComponent t)\nu v : Set α\nhu : IsClosed u\nhv : IsClosed v\nhuv : f ⁻¹' connectedComponent t ⊆ u ∪ v\nuv_disj : Disjoint u v\nT₁ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ u}\nT₂ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ v}\n⊢ ∀ (t' : β), t' ∈ connectedComponent t → f ⁻¹' {t'} ⊆ u ∨ f ⁻¹' {t'} ⊆ v\n[PROOFSTEP]\nintro t' ht'\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t✝ u✝ v✝ : Set α\ninst✝ : TopologicalSpace β\nf : α → β\nconnected_fibers : ∀ (t : β), IsConnected (f ⁻¹' {t})\nhcl : ∀ (T : Set β), IsClosed T ↔ IsClosed (f ⁻¹' T)\nt : β\nhf : Surjective f\nhT : IsClosed (f ⁻¹' connectedComponent t)\nu v : Set α\nhu : IsClosed u\nhv : IsClosed v\nhuv : f ⁻¹' connectedComponent t ⊆ u ∪ v\nuv_disj : Disjoint u v\nT₁ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ u}\nT₂ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ v}\nt' : β\nht' : t' ∈ connectedComponent t\n⊢ f ⁻¹' {t'} ⊆ u ∨ f ⁻¹' {t'} ⊆ v\n[PROOFSTEP]\napply isPreconnected_iff_subset_of_disjoint_closed.1 (connected_fibers t').2 u v hu hv\n[GOAL]\ncase a\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t✝ u✝ v✝ : Set α\ninst✝ : TopologicalSpace β\nf : α → β\nconnected_fibers : ∀ (t : β), IsConnected (f ⁻¹' {t})\nhcl : ∀ (T : Set β), IsClosed T ↔ IsClosed (f ⁻¹' T)\nt : β\nhf : Surjective f\nhT : IsClosed (f ⁻¹' connectedComponent t)\nu v : Set α\nhu : IsClosed u\nhv : IsClosed v\nhuv : f ⁻¹' connectedComponent t ⊆ u ∪ v\nuv_disj : Disjoint u v\nT₁ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ u}\nT₂ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ v}\nt' : β\nht' : t' ∈ connectedComponent t\n⊢ f ⁻¹' {t'} ⊆ u ∪ v\n[PROOFSTEP]\nexact Subset.trans (preimage_mono (singleton_subset_iff.2 ht')) huv\n[GOAL]\ncase a\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t✝ u✝ v✝ : Set α\ninst✝ : TopologicalSpace β\nf : α → β\nconnected_fibers : ∀ (t : β), IsConnected (f ⁻¹' {t})\nhcl : ∀ (T : Set β), IsClosed T ↔ IsClosed (f ⁻¹' T)\nt : β\nhf : Surjective f\nhT : IsClosed (f ⁻¹' connectedComponent t)\nu v : Set α\nhu : IsClosed u\nhv : IsClosed v\nhuv : f ⁻¹' connectedComponent t ⊆ u ∪ v\nuv_disj : Disjoint u v\nT₁ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ u}\nT₂ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ v}\nt' : β\nht' : t' ∈ connectedComponent t\n⊢ f ⁻¹' {t'} ∩ (u ∩ v) = ∅\n[PROOFSTEP]\nrw [uv_disj.inter_eq, inter_empty]\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t✝ u✝ v✝ : Set α\ninst✝ : TopologicalSpace β\nf : α → β\nconnected_fibers : ∀ (t : β), IsConnected (f ⁻¹' {t})\nhcl : ∀ (T : Set β), IsClosed T ↔ IsClosed (f ⁻¹' T)\nt : β\nhf : Surjective f\nhT : IsClosed (f ⁻¹' connectedComponent t)\nu v : Set α\nhu : IsClosed u\nhv : IsClosed v\nhuv : f ⁻¹' connectedComponent t ⊆ u ∪ v\nuv_disj : Disjoint u v\nT₁ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ u}\nT₂ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ v}\nfiber_decomp : ∀ (t' : β), t' ∈ connectedComponent t → f ⁻¹' {t'} ⊆ u ∨ f ⁻¹' {t'} ⊆ v\n⊢ f ⁻¹' connectedComponent t ⊆ u ∨ f ⁻¹' connectedComponent t ⊆ v\n[PROOFSTEP]\nhave T₁_u : f ⁻¹' T₁ = f ⁻¹' connectedComponent t ∩ u :=\n  by\n  apply eq_of_subset_of_subset\n  · rw [← biUnion_preimage_singleton]\n    refine' iUnion₂_subset fun t' ht' => subset_inter _ ht'.2\n    rw [hf.preimage_subset_preimage_iff, singleton_subset_iff]\n    exact ht'.1\n  rintro a ⟨hat, hau⟩\n  constructor\n  · exact mem_preimage.1 hat\n  refine (fiber_decomp (f a) (mem_preimage.1 hat)).resolve_right fun h => ?_\n  exact\n    uv_disj.subset_compl_right hau\n      (h rfl)\n        -- This proof is exactly the same as the above (modulo some symmetry)\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t✝ u✝ v✝ : Set α\ninst✝ : TopologicalSpace β\nf : α → β\nconnected_fibers : ∀ (t : β), IsConnected (f ⁻¹' {t})\nhcl : ∀ (T : Set β), IsClosed T ↔ IsClosed (f ⁻¹' T)\nt : β\nhf : Surjective f\nhT : IsClosed (f ⁻¹' connectedComponent t)\nu v : Set α\nhu : IsClosed u\nhv : IsClosed v\nhuv : f ⁻¹' connectedComponent t ⊆ u ∪ v\nuv_disj : Disjoint u v\nT₁ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ u}\nT₂ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ v}\nfiber_decomp : ∀ (t' : β), t' ∈ connectedComponent t → f ⁻¹' {t'} ⊆ u ∨ f ⁻¹' {t'} ⊆ v\n⊢ f ⁻¹' T₁ = f ⁻¹' connectedComponent t ∩ u\n[PROOFSTEP]\napply eq_of_subset_of_subset\n[GOAL]\ncase a\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t✝ u✝ v✝ : Set α\ninst✝ : TopologicalSpace β\nf : α → β\nconnected_fibers : ∀ (t : β), IsConnected (f ⁻¹' {t})\nhcl : ∀ (T : Set β), IsClosed T ↔ IsClosed (f ⁻¹' T)\nt : β\nhf : Surjective f\nhT : IsClosed (f ⁻¹' connectedComponent t)\nu v : Set α\nhu : IsClosed u\nhv : IsClosed v\nhuv : f ⁻¹' connectedComponent t ⊆ u ∪ v\nuv_disj : Disjoint u v\nT₁ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ u}\nT₂ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ v}\nfiber_decomp : ∀ (t' : β), t' ∈ connectedComponent t → f ⁻¹' {t'} ⊆ u ∨ f ⁻¹' {t'} ⊆ v\n⊢ f ⁻¹' T₁ ⊆ f ⁻¹' connectedComponent t ∩ u\n[PROOFSTEP]\nrw [← biUnion_preimage_singleton]\n[GOAL]\ncase a\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t✝ u✝ v✝ : Set α\ninst✝ : TopologicalSpace β\nf : α → β\nconnected_fibers : ∀ (t : β), IsConnected (f ⁻¹' {t})\nhcl : ∀ (T : Set β), IsClosed T ↔ IsClosed (f ⁻¹' T)\nt : β\nhf : Surjective f\nhT : IsClosed (f ⁻¹' connectedComponent t)\nu v : Set α\nhu : IsClosed u\nhv : IsClosed v\nhuv : f ⁻¹' connectedComponent t ⊆ u ∪ v\nuv_disj : Disjoint u v\nT₁ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ u}\nT₂ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ v}\nfiber_decomp : ∀ (t' : β), t' ∈ connectedComponent t → f ⁻¹' {t'} ⊆ u ∨ f ⁻¹' {t'} ⊆ v\n⊢ ⋃ (y : β) (_ : y ∈ T₁), f ⁻¹' {y} ⊆ f ⁻¹' connectedComponent t ∩ u\n[PROOFSTEP]\nrefine' iUnion₂_subset fun t' ht' => subset_inter _ ht'.2\n[GOAL]\ncase a\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t✝ u✝ v✝ : Set α\ninst✝ : TopologicalSpace β\nf : α → β\nconnected_fibers : ∀ (t : β), IsConnected (f ⁻¹' {t})\nhcl : ∀ (T : Set β), IsClosed T ↔ IsClosed (f ⁻¹' T)\nt : β\nhf : Surjective f\nhT : IsClosed (f ⁻¹' connectedComponent t)\nu v : Set α\nhu : IsClosed u\nhv : IsClosed v\nhuv : f ⁻¹' connectedComponent t ⊆ u ∪ v\nuv_disj : Disjoint u v\nT₁ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ u}\nT₂ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ v}\nfiber_decomp : ∀ (t' : β), t' ∈ connectedComponent t → f ⁻¹' {t'} ⊆ u ∨ f ⁻¹' {t'} ⊆ v\nt' : β\nht' : t' ∈ T₁\n⊢ f ⁻¹' {t'} ⊆ f ⁻¹' connectedComponent t\n[PROOFSTEP]\nrw [hf.preimage_subset_preimage_iff, singleton_subset_iff]\n[GOAL]\ncase a\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t✝ u✝ v✝ : Set α\ninst✝ : TopologicalSpace β\nf : α → β\nconnected_fibers : ∀ (t : β), IsConnected (f ⁻¹' {t})\nhcl : ∀ (T : Set β), IsClosed T ↔ IsClosed (f ⁻¹' T)\nt : β\nhf : Surjective f\nhT : IsClosed (f ⁻¹' connectedComponent t)\nu v : Set α\nhu : IsClosed u\nhv : IsClosed v\nhuv : f ⁻¹' connectedComponent t ⊆ u ∪ v\nuv_disj : Disjoint u v\nT₁ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ u}\nT₂ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ v}\nfiber_decomp : ∀ (t' : β), t' ∈ connectedComponent t → f ⁻¹' {t'} ⊆ u ∨ f ⁻¹' {t'} ⊆ v\nt' : β\nht' : t' ∈ T₁\n⊢ t' ∈ connectedComponent t\n[PROOFSTEP]\nexact ht'.1\n[GOAL]\ncase a\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t✝ u✝ v✝ : Set α\ninst✝ : TopologicalSpace β\nf : α → β\nconnected_fibers : ∀ (t : β), IsConnected (f ⁻¹' {t})\nhcl : ∀ (T : Set β), IsClosed T ↔ IsClosed (f ⁻¹' T)\nt : β\nhf : Surjective f\nhT : IsClosed (f ⁻¹' connectedComponent t)\nu v : Set α\nhu : IsClosed u\nhv : IsClosed v\nhuv : f ⁻¹' connectedComponent t ⊆ u ∪ v\nuv_disj : Disjoint u v\nT₁ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ u}\nT₂ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ v}\nfiber_decomp : ∀ (t' : β), t' ∈ connectedComponent t → f ⁻¹' {t'} ⊆ u ∨ f ⁻¹' {t'} ⊆ v\n⊢ f ⁻¹' connectedComponent t ∩ u ⊆ f ⁻¹' T₁\n[PROOFSTEP]\nrintro a ⟨hat, hau⟩\n[GOAL]\ncase a.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t✝ u✝ v✝ : Set α\ninst✝ : TopologicalSpace β\nf : α → β\nconnected_fibers : ∀ (t : β), IsConnected (f ⁻¹' {t})\nhcl : ∀ (T : Set β), IsClosed T ↔ IsClosed (f ⁻¹' T)\nt : β\nhf : Surjective f\nhT : IsClosed (f ⁻¹' connectedComponent t)\nu v : Set α\nhu : IsClosed u\nhv : IsClosed v\nhuv : f ⁻¹' connectedComponent t ⊆ u ∪ v\nuv_disj : Disjoint u v\nT₁ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ u}\nT₂ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ v}\nfiber_decomp : ∀ (t' : β), t' ∈ connectedComponent t → f ⁻¹' {t'} ⊆ u ∨ f ⁻¹' {t'} ⊆ v\na : α\nhat : a ∈ f ⁻¹' connectedComponent t\nhau : a ∈ u\n⊢ a ∈ f ⁻¹' T₁\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase a.intro.left\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t✝ u✝ v✝ : Set α\ninst✝ : TopologicalSpace β\nf : α → β\nconnected_fibers : ∀ (t : β), IsConnected (f ⁻¹' {t})\nhcl : ∀ (T : Set β), IsClosed T ↔ IsClosed (f ⁻¹' T)\nt : β\nhf : Surjective f\nhT : IsClosed (f ⁻¹' connectedComponent t)\nu v : Set α\nhu : IsClosed u\nhv : IsClosed v\nhuv : f ⁻¹' connectedComponent t ⊆ u ∪ v\nuv_disj : Disjoint u v\nT₁ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ u}\nT₂ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ v}\nfiber_decomp : ∀ (t' : β), t' ∈ connectedComponent t → f ⁻¹' {t'} ⊆ u ∨ f ⁻¹' {t'} ⊆ v\na : α\nhat : a ∈ f ⁻¹' connectedComponent t\nhau : a ∈ u\n⊢ f a ∈ connectedComponent t\n[PROOFSTEP]\nexact mem_preimage.1 hat\n[GOAL]\ncase a.intro.right\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t✝ u✝ v✝ : Set α\ninst✝ : TopologicalSpace β\nf : α → β\nconnected_fibers : ∀ (t : β), IsConnected (f ⁻¹' {t})\nhcl : ∀ (T : Set β), IsClosed T ↔ IsClosed (f ⁻¹' T)\nt : β\nhf : Surjective f\nhT : IsClosed (f ⁻¹' connectedComponent t)\nu v : Set α\nhu : IsClosed u\nhv : IsClosed v\nhuv : f ⁻¹' connectedComponent t ⊆ u ∪ v\nuv_disj : Disjoint u v\nT₁ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ u}\nT₂ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ v}\nfiber_decomp : ∀ (t' : β), t' ∈ connectedComponent t → f ⁻¹' {t'} ⊆ u ∨ f ⁻¹' {t'} ⊆ v\na : α\nhat : a ∈ f ⁻¹' connectedComponent t\nhau : a ∈ u\n⊢ f ⁻¹' {f a} ⊆ u\n[PROOFSTEP]\nrefine (fiber_decomp (f a) (mem_preimage.1 hat)).resolve_right fun h => ?_\n[GOAL]\ncase a.intro.right\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t✝ u✝ v✝ : Set α\ninst✝ : TopologicalSpace β\nf : α → β\nconnected_fibers : ∀ (t : β), IsConnected (f ⁻¹' {t})\nhcl : ∀ (T : Set β), IsClosed T ↔ IsClosed (f ⁻¹' T)\nt : β\nhf : Surjective f\nhT : IsClosed (f ⁻¹' connectedComponent t)\nu v : Set α\nhu : IsClosed u\nhv : IsClosed v\nhuv : f ⁻¹' connectedComponent t ⊆ u ∪ v\nuv_disj : Disjoint u v\nT₁ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ u}\nT₂ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ v}\nfiber_decomp : ∀ (t' : β), t' ∈ connectedComponent t → f ⁻¹' {t'} ⊆ u ∨ f ⁻¹' {t'} ⊆ v\na : α\nhat : a ∈ f ⁻¹' connectedComponent t\nhau : a ∈ u\nh : f ⁻¹' {f a} ⊆ v\n⊢ False\n[PROOFSTEP]\nexact\n  uv_disj.subset_compl_right hau\n    (h rfl)\n      -- This proof is exactly the same as the above (modulo some symmetry)\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t✝ u✝ v✝ : Set α\ninst✝ : TopologicalSpace β\nf : α → β\nconnected_fibers : ∀ (t : β), IsConnected (f ⁻¹' {t})\nhcl : ∀ (T : Set β), IsClosed T ↔ IsClosed (f ⁻¹' T)\nt : β\nhf : Surjective f\nhT : IsClosed (f ⁻¹' connectedComponent t)\nu v : Set α\nhu : IsClosed u\nhv : IsClosed v\nhuv : f ⁻¹' connectedComponent t ⊆ u ∪ v\nuv_disj : Disjoint u v\nT₁ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ u}\nT₂ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ v}\nfiber_decomp : ∀ (t' : β), t' ∈ connectedComponent t → f ⁻¹' {t'} ⊆ u ∨ f ⁻¹' {t'} ⊆ v\nT₁_u : f ⁻¹' T₁ = f ⁻¹' connectedComponent t ∩ u\n⊢ f ⁻¹' connectedComponent t ⊆ u ∨ f ⁻¹' connectedComponent t ⊆ v\n[PROOFSTEP]\nhave T₂_v : f ⁻¹' T₂ = f ⁻¹' connectedComponent t ∩ v :=\n  by\n  apply eq_of_subset_of_subset\n  · rw [← biUnion_preimage_singleton]\n    refine' iUnion₂_subset fun t' ht' => subset_inter _ ht'.2\n    rw [hf.preimage_subset_preimage_iff, singleton_subset_iff]\n    exact ht'.1\n  rintro a ⟨hat, hav⟩\n  constructor\n  · exact mem_preimage.1 hat\n  · refine (fiber_decomp (f a) (mem_preimage.1 hat)).resolve_left fun h => ?_\n    exact\n      uv_disj.subset_compl_left hav\n        (h rfl)\n          -- Now we show T₁, T₂ are closed, cover connectedComponent t and are disjoint.\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t✝ u✝ v✝ : Set α\ninst✝ : TopologicalSpace β\nf : α → β\nconnected_fibers : ∀ (t : β), IsConnected (f ⁻¹' {t})\nhcl : ∀ (T : Set β), IsClosed T ↔ IsClosed (f ⁻¹' T)\nt : β\nhf : Surjective f\nhT : IsClosed (f ⁻¹' connectedComponent t)\nu v : Set α\nhu : IsClosed u\nhv : IsClosed v\nhuv : f ⁻¹' connectedComponent t ⊆ u ∪ v\nuv_disj : Disjoint u v\nT₁ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ u}\nT₂ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ v}\nfiber_decomp : ∀ (t' : β), t' ∈ connectedComponent t → f ⁻¹' {t'} ⊆ u ∨ f ⁻¹' {t'} ⊆ v\nT₁_u : f ⁻¹' T₁ = f ⁻¹' connectedComponent t ∩ u\n⊢ f ⁻¹' T₂ = f ⁻¹' connectedComponent t ∩ v\n[PROOFSTEP]\napply eq_of_subset_of_subset\n[GOAL]\ncase a\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t✝ u✝ v✝ : Set α\ninst✝ : TopologicalSpace β\nf : α → β\nconnected_fibers : ∀ (t : β), IsConnected (f ⁻¹' {t})\nhcl : ∀ (T : Set β), IsClosed T ↔ IsClosed (f ⁻¹' T)\nt : β\nhf : Surjective f\nhT : IsClosed (f ⁻¹' connectedComponent t)\nu v : Set α\nhu : IsClosed u\nhv : IsClosed v\nhuv : f ⁻¹' connectedComponent t ⊆ u ∪ v\nuv_disj : Disjoint u v\nT₁ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ u}\nT₂ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ v}\nfiber_decomp : ∀ (t' : β), t' ∈ connectedComponent t → f ⁻¹' {t'} ⊆ u ∨ f ⁻¹' {t'} ⊆ v\nT₁_u : f ⁻¹' T₁ = f ⁻¹' connectedComponent t ∩ u\n⊢ f ⁻¹' T₂ ⊆ f ⁻¹' connectedComponent t ∩ v\n[PROOFSTEP]\nrw [← biUnion_preimage_singleton]\n[GOAL]\ncase a\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t✝ u✝ v✝ : Set α\ninst✝ : TopologicalSpace β\nf : α → β\nconnected_fibers : ∀ (t : β), IsConnected (f ⁻¹' {t})\nhcl : ∀ (T : Set β), IsClosed T ↔ IsClosed (f ⁻¹' T)\nt : β\nhf : Surjective f\nhT : IsClosed (f ⁻¹' connectedComponent t)\nu v : Set α\nhu : IsClosed u\nhv : IsClosed v\nhuv : f ⁻¹' connectedComponent t ⊆ u ∪ v\nuv_disj : Disjoint u v\nT₁ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ u}\nT₂ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ v}\nfiber_decomp : ∀ (t' : β), t' ∈ connectedComponent t → f ⁻¹' {t'} ⊆ u ∨ f ⁻¹' {t'} ⊆ v\nT₁_u : f ⁻¹' T₁ = f ⁻¹' connectedComponent t ∩ u\n⊢ ⋃ (y : β) (_ : y ∈ T₂), f ⁻¹' {y} ⊆ f ⁻¹' connectedComponent t ∩ v\n[PROOFSTEP]\nrefine' iUnion₂_subset fun t' ht' => subset_inter _ ht'.2\n[GOAL]\ncase a\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t✝ u✝ v✝ : Set α\ninst✝ : TopologicalSpace β\nf : α → β\nconnected_fibers : ∀ (t : β), IsConnected (f ⁻¹' {t})\nhcl : ∀ (T : Set β), IsClosed T ↔ IsClosed (f ⁻¹' T)\nt : β\nhf : Surjective f\nhT : IsClosed (f ⁻¹' connectedComponent t)\nu v : Set α\nhu : IsClosed u\nhv : IsClosed v\nhuv : f ⁻¹' connectedComponent t ⊆ u ∪ v\nuv_disj : Disjoint u v\nT₁ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ u}\nT₂ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ v}\nfiber_decomp : ∀ (t' : β), t' ∈ connectedComponent t → f ⁻¹' {t'} ⊆ u ∨ f ⁻¹' {t'} ⊆ v\nT₁_u : f ⁻¹' T₁ = f ⁻¹' connectedComponent t ∩ u\nt' : β\nht' : t' ∈ T₂\n⊢ f ⁻¹' {t'} ⊆ f ⁻¹' connectedComponent t\n[PROOFSTEP]\nrw [hf.preimage_subset_preimage_iff, singleton_subset_iff]\n[GOAL]\ncase a\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t✝ u✝ v✝ : Set α\ninst✝ : TopologicalSpace β\nf : α → β\nconnected_fibers : ∀ (t : β), IsConnected (f ⁻¹' {t})\nhcl : ∀ (T : Set β), IsClosed T ↔ IsClosed (f ⁻¹' T)\nt : β\nhf : Surjective f\nhT : IsClosed (f ⁻¹' connectedComponent t)\nu v : Set α\nhu : IsClosed u\nhv : IsClosed v\nhuv : f ⁻¹' connectedComponent t ⊆ u ∪ v\nuv_disj : Disjoint u v\nT₁ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ u}\nT₂ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ v}\nfiber_decomp : ∀ (t' : β), t' ∈ connectedComponent t → f ⁻¹' {t'} ⊆ u ∨ f ⁻¹' {t'} ⊆ v\nT₁_u : f ⁻¹' T₁ = f ⁻¹' connectedComponent t ∩ u\nt' : β\nht' : t' ∈ T₂\n⊢ t' ∈ connectedComponent t\n[PROOFSTEP]\nexact ht'.1\n[GOAL]\ncase a\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t✝ u✝ v✝ : Set α\ninst✝ : TopologicalSpace β\nf : α → β\nconnected_fibers : ∀ (t : β), IsConnected (f ⁻¹' {t})\nhcl : ∀ (T : Set β), IsClosed T ↔ IsClosed (f ⁻¹' T)\nt : β\nhf : Surjective f\nhT : IsClosed (f ⁻¹' connectedComponent t)\nu v : Set α\nhu : IsClosed u\nhv : IsClosed v\nhuv : f ⁻¹' connectedComponent t ⊆ u ∪ v\nuv_disj : Disjoint u v\nT₁ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ u}\nT₂ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ v}\nfiber_decomp : ∀ (t' : β), t' ∈ connectedComponent t → f ⁻¹' {t'} ⊆ u ∨ f ⁻¹' {t'} ⊆ v\nT₁_u : f ⁻¹' T₁ = f ⁻¹' connectedComponent t ∩ u\n⊢ f ⁻¹' connectedComponent t ∩ v ⊆ f ⁻¹' T₂\n[PROOFSTEP]\nrintro a ⟨hat, hav⟩\n[GOAL]\ncase a.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t✝ u✝ v✝ : Set α\ninst✝ : TopologicalSpace β\nf : α → β\nconnected_fibers : ∀ (t : β), IsConnected (f ⁻¹' {t})\nhcl : ∀ (T : Set β), IsClosed T ↔ IsClosed (f ⁻¹' T)\nt : β\nhf : Surjective f\nhT : IsClosed (f ⁻¹' connectedComponent t)\nu v : Set α\nhu : IsClosed u\nhv : IsClosed v\nhuv : f ⁻¹' connectedComponent t ⊆ u ∪ v\nuv_disj : Disjoint u v\nT₁ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ u}\nT₂ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ v}\nfiber_decomp : ∀ (t' : β), t' ∈ connectedComponent t → f ⁻¹' {t'} ⊆ u ∨ f ⁻¹' {t'} ⊆ v\nT₁_u : f ⁻¹' T₁ = f ⁻¹' connectedComponent t ∩ u\na : α\nhat : a ∈ f ⁻¹' connectedComponent t\nhav : a ∈ v\n⊢ a ∈ f ⁻¹' T₂\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase a.intro.left\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t✝ u✝ v✝ : Set α\ninst✝ : TopologicalSpace β\nf : α → β\nconnected_fibers : ∀ (t : β), IsConnected (f ⁻¹' {t})\nhcl : ∀ (T : Set β), IsClosed T ↔ IsClosed (f ⁻¹' T)\nt : β\nhf : Surjective f\nhT : IsClosed (f ⁻¹' connectedComponent t)\nu v : Set α\nhu : IsClosed u\nhv : IsClosed v\nhuv : f ⁻¹' connectedComponent t ⊆ u ∪ v\nuv_disj : Disjoint u v\nT₁ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ u}\nT₂ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ v}\nfiber_decomp : ∀ (t' : β), t' ∈ connectedComponent t → f ⁻¹' {t'} ⊆ u ∨ f ⁻¹' {t'} ⊆ v\nT₁_u : f ⁻¹' T₁ = f ⁻¹' connectedComponent t ∩ u\na : α\nhat : a ∈ f ⁻¹' connectedComponent t\nhav : a ∈ v\n⊢ f a ∈ connectedComponent t\n[PROOFSTEP]\nexact mem_preimage.1 hat\n[GOAL]\ncase a.intro.right\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t✝ u✝ v✝ : Set α\ninst✝ : TopologicalSpace β\nf : α → β\nconnected_fibers : ∀ (t : β), IsConnected (f ⁻¹' {t})\nhcl : ∀ (T : Set β), IsClosed T ↔ IsClosed (f ⁻¹' T)\nt : β\nhf : Surjective f\nhT : IsClosed (f ⁻¹' connectedComponent t)\nu v : Set α\nhu : IsClosed u\nhv : IsClosed v\nhuv : f ⁻¹' connectedComponent t ⊆ u ∪ v\nuv_disj : Disjoint u v\nT₁ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ u}\nT₂ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ v}\nfiber_decomp : ∀ (t' : β), t' ∈ connectedComponent t → f ⁻¹' {t'} ⊆ u ∨ f ⁻¹' {t'} ⊆ v\nT₁_u : f ⁻¹' T₁ = f ⁻¹' connectedComponent t ∩ u\na : α\nhat : a ∈ f ⁻¹' connectedComponent t\nhav : a ∈ v\n⊢ f ⁻¹' {f a} ⊆ v\n[PROOFSTEP]\nrefine (fiber_decomp (f a) (mem_preimage.1 hat)).resolve_left fun h => ?_\n[GOAL]\ncase a.intro.right\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t✝ u✝ v✝ : Set α\ninst✝ : TopologicalSpace β\nf : α → β\nconnected_fibers : ∀ (t : β), IsConnected (f ⁻¹' {t})\nhcl : ∀ (T : Set β), IsClosed T ↔ IsClosed (f ⁻¹' T)\nt : β\nhf : Surjective f\nhT : IsClosed (f ⁻¹' connectedComponent t)\nu v : Set α\nhu : IsClosed u\nhv : IsClosed v\nhuv : f ⁻¹' connectedComponent t ⊆ u ∪ v\nuv_disj : Disjoint u v\nT₁ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ u}\nT₂ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ v}\nfiber_decomp : ∀ (t' : β), t' ∈ connectedComponent t → f ⁻¹' {t'} ⊆ u ∨ f ⁻¹' {t'} ⊆ v\nT₁_u : f ⁻¹' T₁ = f ⁻¹' connectedComponent t ∩ u\na : α\nhat : a ∈ f ⁻¹' connectedComponent t\nhav : a ∈ v\nh : f ⁻¹' {f a} ⊆ u\n⊢ False\n[PROOFSTEP]\nexact\n  uv_disj.subset_compl_left hav\n    (h rfl)\n      -- Now we show T₁, T₂ are closed, cover connectedComponent t and are disjoint.\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t✝ u✝ v✝ : Set α\ninst✝ : TopologicalSpace β\nf : α → β\nconnected_fibers : ∀ (t : β), IsConnected (f ⁻¹' {t})\nhcl : ∀ (T : Set β), IsClosed T ↔ IsClosed (f ⁻¹' T)\nt : β\nhf : Surjective f\nhT : IsClosed (f ⁻¹' connectedComponent t)\nu v : Set α\nhu : IsClosed u\nhv : IsClosed v\nhuv : f ⁻¹' connectedComponent t ⊆ u ∪ v\nuv_disj : Disjoint u v\nT₁ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ u}\nT₂ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ v}\nfiber_decomp : ∀ (t' : β), t' ∈ connectedComponent t → f ⁻¹' {t'} ⊆ u ∨ f ⁻¹' {t'} ⊆ v\nT₁_u : f ⁻¹' T₁ = f ⁻¹' connectedComponent t ∩ u\nT₂_v : f ⁻¹' T₂ = f ⁻¹' connectedComponent t ∩ v\n⊢ f ⁻¹' connectedComponent t ⊆ u ∨ f ⁻¹' connectedComponent t ⊆ v\n[PROOFSTEP]\nhave hT₁ : IsClosed T₁ := (hcl T₁).2 (T₁_u.symm ▸ IsClosed.inter hT hu)\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t✝ u✝ v✝ : Set α\ninst✝ : TopologicalSpace β\nf : α → β\nconnected_fibers : ∀ (t : β), IsConnected (f ⁻¹' {t})\nhcl : ∀ (T : Set β), IsClosed T ↔ IsClosed (f ⁻¹' T)\nt : β\nhf : Surjective f\nhT : IsClosed (f ⁻¹' connectedComponent t)\nu v : Set α\nhu : IsClosed u\nhv : IsClosed v\nhuv : f ⁻¹' connectedComponent t ⊆ u ∪ v\nuv_disj : Disjoint u v\nT₁ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ u}\nT₂ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ v}\nfiber_decomp : ∀ (t' : β), t' ∈ connectedComponent t → f ⁻¹' {t'} ⊆ u ∨ f ⁻¹' {t'} ⊆ v\nT₁_u : f ⁻¹' T₁ = f ⁻¹' connectedComponent t ∩ u\nT₂_v : f ⁻¹' T₂ = f ⁻¹' connectedComponent t ∩ v\nhT₁ : IsClosed T₁\n⊢ f ⁻¹' connectedComponent t ⊆ u ∨ f ⁻¹' connectedComponent t ⊆ v\n[PROOFSTEP]\nhave hT₂ : IsClosed T₂ := (hcl T₂).2 (T₂_v.symm ▸ IsClosed.inter hT hv)\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t✝ u✝ v✝ : Set α\ninst✝ : TopologicalSpace β\nf : α → β\nconnected_fibers : ∀ (t : β), IsConnected (f ⁻¹' {t})\nhcl : ∀ (T : Set β), IsClosed T ↔ IsClosed (f ⁻¹' T)\nt : β\nhf : Surjective f\nhT : IsClosed (f ⁻¹' connectedComponent t)\nu v : Set α\nhu : IsClosed u\nhv : IsClosed v\nhuv : f ⁻¹' connectedComponent t ⊆ u ∪ v\nuv_disj : Disjoint u v\nT₁ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ u}\nT₂ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ v}\nfiber_decomp : ∀ (t' : β), t' ∈ connectedComponent t → f ⁻¹' {t'} ⊆ u ∨ f ⁻¹' {t'} ⊆ v\nT₁_u : f ⁻¹' T₁ = f ⁻¹' connectedComponent t ∩ u\nT₂_v : f ⁻¹' T₂ = f ⁻¹' connectedComponent t ∩ v\nhT₁ : IsClosed T₁\nhT₂ : IsClosed T₂\n⊢ f ⁻¹' connectedComponent t ⊆ u ∨ f ⁻¹' connectedComponent t ⊆ v\n[PROOFSTEP]\nhave T_decomp : connectedComponent t ⊆ T₁ ∪ T₂ := fun t' ht' =>\n  by\n  rw [mem_union t' T₁ T₂]\n  cases' fiber_decomp t' ht' with htu htv\n  · left\n    exact ⟨ht', htu⟩\n  right\n  exact ⟨ht', htv⟩\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t✝ u✝ v✝ : Set α\ninst✝ : TopologicalSpace β\nf : α → β\nconnected_fibers : ∀ (t : β), IsConnected (f ⁻¹' {t})\nhcl : ∀ (T : Set β), IsClosed T ↔ IsClosed (f ⁻¹' T)\nt : β\nhf : Surjective f\nhT : IsClosed (f ⁻¹' connectedComponent t)\nu v : Set α\nhu : IsClosed u\nhv : IsClosed v\nhuv : f ⁻¹' connectedComponent t ⊆ u ∪ v\nuv_disj : Disjoint u v\nT₁ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ u}\nT₂ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ v}\nfiber_decomp : ∀ (t' : β), t' ∈ connectedComponent t → f ⁻¹' {t'} ⊆ u ∨ f ⁻¹' {t'} ⊆ v\nT₁_u : f ⁻¹' T₁ = f ⁻¹' connectedComponent t ∩ u\nT₂_v : f ⁻¹' T₂ = f ⁻¹' connectedComponent t ∩ v\nhT₁ : IsClosed T₁\nhT₂ : IsClosed T₂\nt' : β\nht' : t' ∈ connectedComponent t\n⊢ t' ∈ T₁ ∪ T₂\n[PROOFSTEP]\nrw [mem_union t' T₁ T₂]\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t✝ u✝ v✝ : Set α\ninst✝ : TopologicalSpace β\nf : α → β\nconnected_fibers : ∀ (t : β), IsConnected (f ⁻¹' {t})\nhcl : ∀ (T : Set β), IsClosed T ↔ IsClosed (f ⁻¹' T)\nt : β\nhf : Surjective f\nhT : IsClosed (f ⁻¹' connectedComponent t)\nu v : Set α\nhu : IsClosed u\nhv : IsClosed v\nhuv : f ⁻¹' connectedComponent t ⊆ u ∪ v\nuv_disj : Disjoint u v\nT₁ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ u}\nT₂ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ v}\nfiber_decomp : ∀ (t' : β), t' ∈ connectedComponent t → f ⁻¹' {t'} ⊆ u ∨ f ⁻¹' {t'} ⊆ v\nT₁_u : f ⁻¹' T₁ = f ⁻¹' connectedComponent t ∩ u\nT₂_v : f ⁻¹' T₂ = f ⁻¹' connectedComponent t ∩ v\nhT₁ : IsClosed T₁\nhT₂ : IsClosed T₂\nt' : β\nht' : t' ∈ connectedComponent t\n⊢ t' ∈ T₁ ∨ t' ∈ T₂\n[PROOFSTEP]\ncases' fiber_decomp t' ht' with htu htv\n[GOAL]\ncase inl\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t✝ u✝ v✝ : Set α\ninst✝ : TopologicalSpace β\nf : α → β\nconnected_fibers : ∀ (t : β), IsConnected (f ⁻¹' {t})\nhcl : ∀ (T : Set β), IsClosed T ↔ IsClosed (f ⁻¹' T)\nt : β\nhf : Surjective f\nhT : IsClosed (f ⁻¹' connectedComponent t)\nu v : Set α\nhu : IsClosed u\nhv : IsClosed v\nhuv : f ⁻¹' connectedComponent t ⊆ u ∪ v\nuv_disj : Disjoint u v\nT₁ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ u}\nT₂ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ v}\nfiber_decomp : ∀ (t' : β), t' ∈ connectedComponent t → f ⁻¹' {t'} ⊆ u ∨ f ⁻¹' {t'} ⊆ v\nT₁_u : f ⁻¹' T₁ = f ⁻¹' connectedComponent t ∩ u\nT₂_v : f ⁻¹' T₂ = f ⁻¹' connectedComponent t ∩ v\nhT₁ : IsClosed T₁\nhT₂ : IsClosed T₂\nt' : β\nht' : t' ∈ connectedComponent t\nhtu : f ⁻¹' {t'} ⊆ u\n⊢ t' ∈ T₁ ∨ t' ∈ T₂\n[PROOFSTEP]\nleft\n[GOAL]\ncase inl.h\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t✝ u✝ v✝ : Set α\ninst✝ : TopologicalSpace β\nf : α → β\nconnected_fibers : ∀ (t : β), IsConnected (f ⁻¹' {t})\nhcl : ∀ (T : Set β), IsClosed T ↔ IsClosed (f ⁻¹' T)\nt : β\nhf : Surjective f\nhT : IsClosed (f ⁻¹' connectedComponent t)\nu v : Set α\nhu : IsClosed u\nhv : IsClosed v\nhuv : f ⁻¹' connectedComponent t ⊆ u ∪ v\nuv_disj : Disjoint u v\nT₁ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ u}\nT₂ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ v}\nfiber_decomp : ∀ (t' : β), t' ∈ connectedComponent t → f ⁻¹' {t'} ⊆ u ∨ f ⁻¹' {t'} ⊆ v\nT₁_u : f ⁻¹' T₁ = f ⁻¹' connectedComponent t ∩ u\nT₂_v : f ⁻¹' T₂ = f ⁻¹' connectedComponent t ∩ v\nhT₁ : IsClosed T₁\nhT₂ : IsClosed T₂\nt' : β\nht' : t' ∈ connectedComponent t\nhtu : f ⁻¹' {t'} ⊆ u\n⊢ t' ∈ T₁\n[PROOFSTEP]\nexact ⟨ht', htu⟩\n[GOAL]\ncase inr\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t✝ u✝ v✝ : Set α\ninst✝ : TopologicalSpace β\nf : α → β\nconnected_fibers : ∀ (t : β), IsConnected (f ⁻¹' {t})\nhcl : ∀ (T : Set β), IsClosed T ↔ IsClosed (f ⁻¹' T)\nt : β\nhf : Surjective f\nhT : IsClosed (f ⁻¹' connectedComponent t)\nu v : Set α\nhu : IsClosed u\nhv : IsClosed v\nhuv : f ⁻¹' connectedComponent t ⊆ u ∪ v\nuv_disj : Disjoint u v\nT₁ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ u}\nT₂ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ v}\nfiber_decomp : ∀ (t' : β), t' ∈ connectedComponent t → f ⁻¹' {t'} ⊆ u ∨ f ⁻¹' {t'} ⊆ v\nT₁_u : f ⁻¹' T₁ = f ⁻¹' connectedComponent t ∩ u\nT₂_v : f ⁻¹' T₂ = f ⁻¹' connectedComponent t ∩ v\nhT₁ : IsClosed T₁\nhT₂ : IsClosed T₂\nt' : β\nht' : t' ∈ connectedComponent t\nhtv : f ⁻¹' {t'} ⊆ v\n⊢ t' ∈ T₁ ∨ t' ∈ T₂\n[PROOFSTEP]\nright\n[GOAL]\ncase inr.h\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t✝ u✝ v✝ : Set α\ninst✝ : TopologicalSpace β\nf : α → β\nconnected_fibers : ∀ (t : β), IsConnected (f ⁻¹' {t})\nhcl : ∀ (T : Set β), IsClosed T ↔ IsClosed (f ⁻¹' T)\nt : β\nhf : Surjective f\nhT : IsClosed (f ⁻¹' connectedComponent t)\nu v : Set α\nhu : IsClosed u\nhv : IsClosed v\nhuv : f ⁻¹' connectedComponent t ⊆ u ∪ v\nuv_disj : Disjoint u v\nT₁ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ u}\nT₂ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ v}\nfiber_decomp : ∀ (t' : β), t' ∈ connectedComponent t → f ⁻¹' {t'} ⊆ u ∨ f ⁻¹' {t'} ⊆ v\nT₁_u : f ⁻¹' T₁ = f ⁻¹' connectedComponent t ∩ u\nT₂_v : f ⁻¹' T₂ = f ⁻¹' connectedComponent t ∩ v\nhT₁ : IsClosed T₁\nhT₂ : IsClosed T₂\nt' : β\nht' : t' ∈ connectedComponent t\nhtv : f ⁻¹' {t'} ⊆ v\n⊢ t' ∈ T₂\n[PROOFSTEP]\nexact ⟨ht', htv⟩\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t✝ u✝ v✝ : Set α\ninst✝ : TopologicalSpace β\nf : α → β\nconnected_fibers : ∀ (t : β), IsConnected (f ⁻¹' {t})\nhcl : ∀ (T : Set β), IsClosed T ↔ IsClosed (f ⁻¹' T)\nt : β\nhf : Surjective f\nhT : IsClosed (f ⁻¹' connectedComponent t)\nu v : Set α\nhu : IsClosed u\nhv : IsClosed v\nhuv : f ⁻¹' connectedComponent t ⊆ u ∪ v\nuv_disj : Disjoint u v\nT₁ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ u}\nT₂ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ v}\nfiber_decomp : ∀ (t' : β), t' ∈ connectedComponent t → f ⁻¹' {t'} ⊆ u ∨ f ⁻¹' {t'} ⊆ v\nT₁_u : f ⁻¹' T₁ = f ⁻¹' connectedComponent t ∩ u\nT₂_v : f ⁻¹' T₂ = f ⁻¹' connectedComponent t ∩ v\nhT₁ : IsClosed T₁\nhT₂ : IsClosed T₂\nT_decomp : connectedComponent t ⊆ T₁ ∪ T₂\n⊢ f ⁻¹' connectedComponent t ⊆ u ∨ f ⁻¹' connectedComponent t ⊆ v\n[PROOFSTEP]\nhave T_disjoint : Disjoint T₁ T₂ := by\n  refine' Disjoint.of_preimage hf _\n  rw [T₁_u, T₂_v, disjoint_iff_inter_eq_empty, ← inter_inter_distrib_left, uv_disj.inter_eq, inter_empty]\n    -- Now we do cases on whether (connectedComponent t) is a subset of T₁ or T₂ to show\n      -- that the preimage is a subset of u or v.\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t✝ u✝ v✝ : Set α\ninst✝ : TopologicalSpace β\nf : α → β\nconnected_fibers : ∀ (t : β), IsConnected (f ⁻¹' {t})\nhcl : ∀ (T : Set β), IsClosed T ↔ IsClosed (f ⁻¹' T)\nt : β\nhf : Surjective f\nhT : IsClosed (f ⁻¹' connectedComponent t)\nu v : Set α\nhu : IsClosed u\nhv : IsClosed v\nhuv : f ⁻¹' connectedComponent t ⊆ u ∪ v\nuv_disj : Disjoint u v\nT₁ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ u}\nT₂ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ v}\nfiber_decomp : ∀ (t' : β), t' ∈ connectedComponent t → f ⁻¹' {t'} ⊆ u ∨ f ⁻¹' {t'} ⊆ v\nT₁_u : f ⁻¹' T₁ = f ⁻¹' connectedComponent t ∩ u\nT₂_v : f ⁻¹' T₂ = f ⁻¹' connectedComponent t ∩ v\nhT₁ : IsClosed T₁\nhT₂ : IsClosed T₂\nT_decomp : connectedComponent t ⊆ T₁ ∪ T₂\n⊢ Disjoint T₁ T₂\n[PROOFSTEP]\nrefine' Disjoint.of_preimage hf _\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t✝ u✝ v✝ : Set α\ninst✝ : TopologicalSpace β\nf : α → β\nconnected_fibers : ∀ (t : β), IsConnected (f ⁻¹' {t})\nhcl : ∀ (T : Set β), IsClosed T ↔ IsClosed (f ⁻¹' T)\nt : β\nhf : Surjective f\nhT : IsClosed (f ⁻¹' connectedComponent t)\nu v : Set α\nhu : IsClosed u\nhv : IsClosed v\nhuv : f ⁻¹' connectedComponent t ⊆ u ∪ v\nuv_disj : Disjoint u v\nT₁ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ u}\nT₂ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ v}\nfiber_decomp : ∀ (t' : β), t' ∈ connectedComponent t → f ⁻¹' {t'} ⊆ u ∨ f ⁻¹' {t'} ⊆ v\nT₁_u : f ⁻¹' T₁ = f ⁻¹' connectedComponent t ∩ u\nT₂_v : f ⁻¹' T₂ = f ⁻¹' connectedComponent t ∩ v\nhT₁ : IsClosed T₁\nhT₂ : IsClosed T₂\nT_decomp : connectedComponent t ⊆ T₁ ∪ T₂\n⊢ Disjoint (f ⁻¹' T₁) (f ⁻¹' T₂)\n[PROOFSTEP]\nrw [T₁_u, T₂_v, disjoint_iff_inter_eq_empty, ← inter_inter_distrib_left, uv_disj.inter_eq, inter_empty]\n  -- Now we do cases on whether (connectedComponent t) is a subset of T₁ or T₂ to show\n    -- that the preimage is a subset of u or v.\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t✝ u✝ v✝ : Set α\ninst✝ : TopologicalSpace β\nf : α → β\nconnected_fibers : ∀ (t : β), IsConnected (f ⁻¹' {t})\nhcl : ∀ (T : Set β), IsClosed T ↔ IsClosed (f ⁻¹' T)\nt : β\nhf : Surjective f\nhT : IsClosed (f ⁻¹' connectedComponent t)\nu v : Set α\nhu : IsClosed u\nhv : IsClosed v\nhuv : f ⁻¹' connectedComponent t ⊆ u ∪ v\nuv_disj : Disjoint u v\nT₁ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ u}\nT₂ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ v}\nfiber_decomp : ∀ (t' : β), t' ∈ connectedComponent t → f ⁻¹' {t'} ⊆ u ∨ f ⁻¹' {t'} ⊆ v\nT₁_u : f ⁻¹' T₁ = f ⁻¹' connectedComponent t ∩ u\nT₂_v : f ⁻¹' T₂ = f ⁻¹' connectedComponent t ∩ v\nhT₁ : IsClosed T₁\nhT₂ : IsClosed T₂\nT_decomp : connectedComponent t ⊆ T₁ ∪ T₂\nT_disjoint : Disjoint T₁ T₂\n⊢ f ⁻¹' connectedComponent t ⊆ u ∨ f ⁻¹' connectedComponent t ⊆ v\n[PROOFSTEP]\ncases'\n  (isPreconnected_iff_subset_of_fully_disjoint_closed isClosed_connectedComponent).1 isPreconnected_connectedComponent\n    T₁ T₂ hT₁ hT₂ T_decomp T_disjoint with\n  h h\n[GOAL]\ncase inl\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t✝ u✝ v✝ : Set α\ninst✝ : TopologicalSpace β\nf : α → β\nconnected_fibers : ∀ (t : β), IsConnected (f ⁻¹' {t})\nhcl : ∀ (T : Set β), IsClosed T ↔ IsClosed (f ⁻¹' T)\nt : β\nhf : Surjective f\nhT : IsClosed (f ⁻¹' connectedComponent t)\nu v : Set α\nhu : IsClosed u\nhv : IsClosed v\nhuv : f ⁻¹' connectedComponent t ⊆ u ∪ v\nuv_disj : Disjoint u v\nT₁ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ u}\nT₂ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ v}\nfiber_decomp : ∀ (t' : β), t' ∈ connectedComponent t → f ⁻¹' {t'} ⊆ u ∨ f ⁻¹' {t'} ⊆ v\nT₁_u : f ⁻¹' T₁ = f ⁻¹' connectedComponent t ∩ u\nT₂_v : f ⁻¹' T₂ = f ⁻¹' connectedComponent t ∩ v\nhT₁ : IsClosed T₁\nhT₂ : IsClosed T₂\nT_decomp : connectedComponent t ⊆ T₁ ∪ T₂\nT_disjoint : Disjoint T₁ T₂\nh : connectedComponent t ⊆ T₁\n⊢ f ⁻¹' connectedComponent t ⊆ u ∨ f ⁻¹' connectedComponent t ⊆ v\n[PROOFSTEP]\nleft\n[GOAL]\ncase inl.h\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t✝ u✝ v✝ : Set α\ninst✝ : TopologicalSpace β\nf : α → β\nconnected_fibers : ∀ (t : β), IsConnected (f ⁻¹' {t})\nhcl : ∀ (T : Set β), IsClosed T ↔ IsClosed (f ⁻¹' T)\nt : β\nhf : Surjective f\nhT : IsClosed (f ⁻¹' connectedComponent t)\nu v : Set α\nhu : IsClosed u\nhv : IsClosed v\nhuv : f ⁻¹' connectedComponent t ⊆ u ∪ v\nuv_disj : Disjoint u v\nT₁ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ u}\nT₂ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ v}\nfiber_decomp : ∀ (t' : β), t' ∈ connectedComponent t → f ⁻¹' {t'} ⊆ u ∨ f ⁻¹' {t'} ⊆ v\nT₁_u : f ⁻¹' T₁ = f ⁻¹' connectedComponent t ∩ u\nT₂_v : f ⁻¹' T₂ = f ⁻¹' connectedComponent t ∩ v\nhT₁ : IsClosed T₁\nhT₂ : IsClosed T₂\nT_decomp : connectedComponent t ⊆ T₁ ∪ T₂\nT_disjoint : Disjoint T₁ T₂\nh : connectedComponent t ⊆ T₁\n⊢ f ⁻¹' connectedComponent t ⊆ u\n[PROOFSTEP]\nrw [Subset.antisymm_iff] at T₁_u \n[GOAL]\ncase inl.h\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t✝ u✝ v✝ : Set α\ninst✝ : TopologicalSpace β\nf : α → β\nconnected_fibers : ∀ (t : β), IsConnected (f ⁻¹' {t})\nhcl : ∀ (T : Set β), IsClosed T ↔ IsClosed (f ⁻¹' T)\nt : β\nhf : Surjective f\nhT : IsClosed (f ⁻¹' connectedComponent t)\nu v : Set α\nhu : IsClosed u\nhv : IsClosed v\nhuv : f ⁻¹' connectedComponent t ⊆ u ∪ v\nuv_disj : Disjoint u v\nT₁ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ u}\nT₂ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ v}\nfiber_decomp : ∀ (t' : β), t' ∈ connectedComponent t → f ⁻¹' {t'} ⊆ u ∨ f ⁻¹' {t'} ⊆ v\nT₁_u : f ⁻¹' T₁ ⊆ f ⁻¹' connectedComponent t ∩ u ∧ f ⁻¹' connectedComponent t ∩ u ⊆ f ⁻¹' T₁\nT₂_v : f ⁻¹' T₂ = f ⁻¹' connectedComponent t ∩ v\nhT₁ : IsClosed T₁\nhT₂ : IsClosed T₂\nT_decomp : connectedComponent t ⊆ T₁ ∪ T₂\nT_disjoint : Disjoint T₁ T₂\nh : connectedComponent t ⊆ T₁\n⊢ f ⁻¹' connectedComponent t ⊆ u\n[PROOFSTEP]\nsuffices f ⁻¹' connectedComponent t ⊆ f ⁻¹' T₁ from (this.trans T₁_u.1).trans (inter_subset_right _ _)\n[GOAL]\ncase inl.h\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t✝ u✝ v✝ : Set α\ninst✝ : TopologicalSpace β\nf : α → β\nconnected_fibers : ∀ (t : β), IsConnected (f ⁻¹' {t})\nhcl : ∀ (T : Set β), IsClosed T ↔ IsClosed (f ⁻¹' T)\nt : β\nhf : Surjective f\nhT : IsClosed (f ⁻¹' connectedComponent t)\nu v : Set α\nhu : IsClosed u\nhv : IsClosed v\nhuv : f ⁻¹' connectedComponent t ⊆ u ∪ v\nuv_disj : Disjoint u v\nT₁ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ u}\nT₂ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ v}\nfiber_decomp : ∀ (t' : β), t' ∈ connectedComponent t → f ⁻¹' {t'} ⊆ u ∨ f ⁻¹' {t'} ⊆ v\nT₁_u : f ⁻¹' T₁ ⊆ f ⁻¹' connectedComponent t ∩ u ∧ f ⁻¹' connectedComponent t ∩ u ⊆ f ⁻¹' T₁\nT₂_v : f ⁻¹' T₂ = f ⁻¹' connectedComponent t ∩ v\nhT₁ : IsClosed T₁\nhT₂ : IsClosed T₂\nT_decomp : connectedComponent t ⊆ T₁ ∪ T₂\nT_disjoint : Disjoint T₁ T₂\nh : connectedComponent t ⊆ T₁\n⊢ f ⁻¹' connectedComponent t ⊆ f ⁻¹' T₁\n[PROOFSTEP]\nexact preimage_mono h\n[GOAL]\ncase inr\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t✝ u✝ v✝ : Set α\ninst✝ : TopologicalSpace β\nf : α → β\nconnected_fibers : ∀ (t : β), IsConnected (f ⁻¹' {t})\nhcl : ∀ (T : Set β), IsClosed T ↔ IsClosed (f ⁻¹' T)\nt : β\nhf : Surjective f\nhT : IsClosed (f ⁻¹' connectedComponent t)\nu v : Set α\nhu : IsClosed u\nhv : IsClosed v\nhuv : f ⁻¹' connectedComponent t ⊆ u ∪ v\nuv_disj : Disjoint u v\nT₁ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ u}\nT₂ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ v}\nfiber_decomp : ∀ (t' : β), t' ∈ connectedComponent t → f ⁻¹' {t'} ⊆ u ∨ f ⁻¹' {t'} ⊆ v\nT₁_u : f ⁻¹' T₁ = f ⁻¹' connectedComponent t ∩ u\nT₂_v : f ⁻¹' T₂ = f ⁻¹' connectedComponent t ∩ v\nhT₁ : IsClosed T₁\nhT₂ : IsClosed T₂\nT_decomp : connectedComponent t ⊆ T₁ ∪ T₂\nT_disjoint : Disjoint T₁ T₂\nh : connectedComponent t ⊆ T₂\n⊢ f ⁻¹' connectedComponent t ⊆ u ∨ f ⁻¹' connectedComponent t ⊆ v\n[PROOFSTEP]\nright\n[GOAL]\ncase inr.h\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t✝ u✝ v✝ : Set α\ninst✝ : TopologicalSpace β\nf : α → β\nconnected_fibers : ∀ (t : β), IsConnected (f ⁻¹' {t})\nhcl : ∀ (T : Set β), IsClosed T ↔ IsClosed (f ⁻¹' T)\nt : β\nhf : Surjective f\nhT : IsClosed (f ⁻¹' connectedComponent t)\nu v : Set α\nhu : IsClosed u\nhv : IsClosed v\nhuv : f ⁻¹' connectedComponent t ⊆ u ∪ v\nuv_disj : Disjoint u v\nT₁ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ u}\nT₂ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ v}\nfiber_decomp : ∀ (t' : β), t' ∈ connectedComponent t → f ⁻¹' {t'} ⊆ u ∨ f ⁻¹' {t'} ⊆ v\nT₁_u : f ⁻¹' T₁ = f ⁻¹' connectedComponent t ∩ u\nT₂_v : f ⁻¹' T₂ = f ⁻¹' connectedComponent t ∩ v\nhT₁ : IsClosed T₁\nhT₂ : IsClosed T₂\nT_decomp : connectedComponent t ⊆ T₁ ∪ T₂\nT_disjoint : Disjoint T₁ T₂\nh : connectedComponent t ⊆ T₂\n⊢ f ⁻¹' connectedComponent t ⊆ v\n[PROOFSTEP]\nrw [Subset.antisymm_iff] at T₂_v \n[GOAL]\ncase inr.h\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t✝ u✝ v✝ : Set α\ninst✝ : TopologicalSpace β\nf : α → β\nconnected_fibers : ∀ (t : β), IsConnected (f ⁻¹' {t})\nhcl : ∀ (T : Set β), IsClosed T ↔ IsClosed (f ⁻¹' T)\nt : β\nhf : Surjective f\nhT : IsClosed (f ⁻¹' connectedComponent t)\nu v : Set α\nhu : IsClosed u\nhv : IsClosed v\nhuv : f ⁻¹' connectedComponent t ⊆ u ∪ v\nuv_disj : Disjoint u v\nT₁ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ u}\nT₂ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ v}\nfiber_decomp : ∀ (t' : β), t' ∈ connectedComponent t → f ⁻¹' {t'} ⊆ u ∨ f ⁻¹' {t'} ⊆ v\nT₁_u : f ⁻¹' T₁ = f ⁻¹' connectedComponent t ∩ u\nT₂_v : f ⁻¹' T₂ ⊆ f ⁻¹' connectedComponent t ∩ v ∧ f ⁻¹' connectedComponent t ∩ v ⊆ f ⁻¹' T₂\nhT₁ : IsClosed T₁\nhT₂ : IsClosed T₂\nT_decomp : connectedComponent t ⊆ T₁ ∪ T₂\nT_disjoint : Disjoint T₁ T₂\nh : connectedComponent t ⊆ T₂\n⊢ f ⁻¹' connectedComponent t ⊆ v\n[PROOFSTEP]\nsuffices f ⁻¹' connectedComponent t ⊆ f ⁻¹' T₂ from (this.trans T₂_v.1).trans (inter_subset_right _ _)\n[GOAL]\ncase inr.h\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t✝ u✝ v✝ : Set α\ninst✝ : TopologicalSpace β\nf : α → β\nconnected_fibers : ∀ (t : β), IsConnected (f ⁻¹' {t})\nhcl : ∀ (T : Set β), IsClosed T ↔ IsClosed (f ⁻¹' T)\nt : β\nhf : Surjective f\nhT : IsClosed (f ⁻¹' connectedComponent t)\nu v : Set α\nhu : IsClosed u\nhv : IsClosed v\nhuv : f ⁻¹' connectedComponent t ⊆ u ∪ v\nuv_disj : Disjoint u v\nT₁ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ u}\nT₂ : Set β := {t' | t' ∈ connectedComponent t ∧ f ⁻¹' {t'} ⊆ v}\nfiber_decomp : ∀ (t' : β), t' ∈ connectedComponent t → f ⁻¹' {t'} ⊆ u ∨ f ⁻¹' {t'} ⊆ v\nT₁_u : f ⁻¹' T₁ = f ⁻¹' connectedComponent t ∩ u\nT₂_v : f ⁻¹' T₂ ⊆ f ⁻¹' connectedComponent t ∩ v ∧ f ⁻¹' connectedComponent t ∩ v ⊆ f ⁻¹' T₂\nhT₁ : IsClosed T₁\nhT₂ : IsClosed T₂\nT_decomp : connectedComponent t ⊆ T₁ ∪ T₂\nT_disjoint : Disjoint T₁ T₂\nh : connectedComponent t ⊆ T₂\n⊢ f ⁻¹' connectedComponent t ⊆ f ⁻¹' T₂\n[PROOFSTEP]\nexact preimage_mono h\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t u v : Set α\ninst✝ : TopologicalSpace β\nf : α → β\nhf : QuotientMap f\nh_fibers : ∀ (y : β), IsConnected (f ⁻¹' {y})\na : α\n⊢ f '' connectedComponent a = connectedComponent (f a)\n[PROOFSTEP]\nrw [← hf.preimage_connectedComponent h_fibers, image_preimage_eq _ hf.surjective]\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\n⊢ LocallyConnectedSpace α ↔ ∀ (x : α) (U : Set α), U ∈ 𝓝 x → ∃ V, V ⊆ U ∧ IsOpen V ∧ x ∈ V ∧ IsConnected V\n[PROOFSTEP]\nsimp_rw [locallyConnectedSpace_iff_open_connected_basis]\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\n⊢ (∀ (x : α), Filter.HasBasis (𝓝 x) (fun s => IsOpen s ∧ x ∈ s ∧ IsConnected s) id) ↔\n    ∀ (x : α) (U : Set α), U ∈ 𝓝 x → ∃ V, V ⊆ U ∧ IsOpen V ∧ x ∈ V ∧ IsConnected V\n[PROOFSTEP]\nrefine forall_congr' fun _ => ?_\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\nx✝ : α\n⊢ Filter.HasBasis (𝓝 x✝) (fun s => IsOpen s ∧ x✝ ∈ s ∧ IsConnected s) id ↔\n    ∀ (U : Set α), U ∈ 𝓝 x✝ → ∃ V, V ⊆ U ∧ IsOpen V ∧ x✝ ∈ V ∧ IsConnected V\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\nx✝ : α\n⊢ Filter.HasBasis (𝓝 x✝) (fun s => IsOpen s ∧ x✝ ∈ s ∧ IsConnected s) id →\n    ∀ (U : Set α), U ∈ 𝓝 x✝ → ∃ V, V ⊆ U ∧ IsOpen V ∧ x✝ ∈ V ∧ IsConnected V\n[PROOFSTEP]\nintro h U hU\n[GOAL]\ncase mp\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\nx✝ : α\nh : Filter.HasBasis (𝓝 x✝) (fun s => IsOpen s ∧ x✝ ∈ s ∧ IsConnected s) id\nU : Set α\nhU : U ∈ 𝓝 x✝\n⊢ ∃ V, V ⊆ U ∧ IsOpen V ∧ x✝ ∈ V ∧ IsConnected V\n[PROOFSTEP]\nrcases h.mem_iff.mp hU with ⟨V, hV, hVU⟩\n[GOAL]\ncase mp.intro.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\nx✝ : α\nh : Filter.HasBasis (𝓝 x✝) (fun s => IsOpen s ∧ x✝ ∈ s ∧ IsConnected s) id\nU : Set α\nhU : U ∈ 𝓝 x✝\nV : Set α\nhV : IsOpen V ∧ x✝ ∈ V ∧ IsConnected V\nhVU : id V ⊆ U\n⊢ ∃ V, V ⊆ U ∧ IsOpen V ∧ x✝ ∈ V ∧ IsConnected V\n[PROOFSTEP]\nexact ⟨V, hVU, hV⟩\n[GOAL]\ncase mpr\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\nx✝ : α\n⊢ (∀ (U : Set α), U ∈ 𝓝 x✝ → ∃ V, V ⊆ U ∧ IsOpen V ∧ x✝ ∈ V ∧ IsConnected V) →\n    Filter.HasBasis (𝓝 x✝) (fun s => IsOpen s ∧ x✝ ∈ s ∧ IsConnected s) id\n[PROOFSTEP]\nexact fun h =>\n  ⟨fun U =>\n    ⟨fun hU =>\n      let ⟨V, hVU, hV⟩ := h U hU\n      ⟨V, hV, hVU⟩,\n      fun ⟨V, ⟨hV, hxV, _⟩, hVU⟩ => mem_nhds_iff.mpr ⟨V, hVU, hV, hxV⟩⟩⟩\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t u v : Set α\ninst✝ : LocallyConnectedSpace α\nF : Set α\nx : α\nh : F ∈ 𝓝 x\n⊢ connectedComponentIn F x ∈ 𝓝 x\n[PROOFSTEP]\nrw [(LocallyConnectedSpace.open_connected_basis x).mem_iff] at h \n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t u v : Set α\ninst✝ : LocallyConnectedSpace α\nF : Set α\nx : α\nh : ∃ i, (IsOpen i ∧ x ∈ i ∧ IsConnected i) ∧ id i ⊆ F\n⊢ connectedComponentIn F x ∈ 𝓝 x\n[PROOFSTEP]\nrcases h with ⟨s, ⟨h1s, hxs, h2s⟩, hsF⟩\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns✝ t u v : Set α\ninst✝ : LocallyConnectedSpace α\nF : Set α\nx : α\ns : Set α\nhsF : id s ⊆ F\nh1s : IsOpen s\nhxs : x ∈ s\nh2s : IsConnected s\n⊢ connectedComponentIn F x ∈ 𝓝 x\n[PROOFSTEP]\nexact mem_nhds_iff.mpr ⟨s, h2s.isPreconnected.subset_connectedComponentIn hxs hsF, h1s, hxs⟩\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t u v : Set α\ninst✝ : LocallyConnectedSpace α\nF : Set α\nx : α\nhF : IsOpen F\n⊢ IsOpen (connectedComponentIn F x)\n[PROOFSTEP]\nrw [isOpen_iff_mem_nhds]\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t u v : Set α\ninst✝ : LocallyConnectedSpace α\nF : Set α\nx : α\nhF : IsOpen F\n⊢ ∀ (a : α), a ∈ connectedComponentIn F x → connectedComponentIn F x ∈ 𝓝 a\n[PROOFSTEP]\nintro y hy\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t u v : Set α\ninst✝ : LocallyConnectedSpace α\nF : Set α\nx : α\nhF : IsOpen F\ny : α\nhy : y ∈ connectedComponentIn F x\n⊢ connectedComponentIn F x ∈ 𝓝 y\n[PROOFSTEP]\nrw [connectedComponentIn_eq hy]\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t u v : Set α\ninst✝ : LocallyConnectedSpace α\nF : Set α\nx : α\nhF : IsOpen F\ny : α\nhy : y ∈ connectedComponentIn F x\n⊢ connectedComponentIn F y ∈ 𝓝 y\n[PROOFSTEP]\nexact connectedComponentIn_mem_nhds (hF.mem_nhds <| connectedComponentIn_subset F x hy)\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t u v : Set α\ninst✝ : LocallyConnectedSpace α\nx : α\n⊢ IsOpen (connectedComponent x)\n[PROOFSTEP]\nrw [← connectedComponentIn_univ]\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t u v : Set α\ninst✝ : LocallyConnectedSpace α\nx : α\n⊢ IsOpen (connectedComponentIn univ x)\n[PROOFSTEP]\nexact isOpen_univ.connectedComponentIn\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\n⊢ LocallyConnectedSpace α ↔ ∀ (F : Set α), IsOpen F → ∀ (x : α), x ∈ F → IsOpen (connectedComponentIn F x)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\n⊢ LocallyConnectedSpace α → ∀ (F : Set α), IsOpen F → ∀ (x : α), x ∈ F → IsOpen (connectedComponentIn F x)\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\nh : LocallyConnectedSpace α\n⊢ ∀ (F : Set α), IsOpen F → ∀ (x : α), x ∈ F → IsOpen (connectedComponentIn F x)\n[PROOFSTEP]\nexact fun F hF x _ => hF.connectedComponentIn\n[GOAL]\ncase mpr\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\n⊢ (∀ (F : Set α), IsOpen F → ∀ (x : α), x ∈ F → IsOpen (connectedComponentIn F x)) → LocallyConnectedSpace α\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\nh : ∀ (F : Set α), IsOpen F → ∀ (x : α), x ∈ F → IsOpen (connectedComponentIn F x)\n⊢ LocallyConnectedSpace α\n[PROOFSTEP]\nrw [locallyConnectedSpace_iff_open_connected_subsets]\n[GOAL]\ncase mpr\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\nh : ∀ (F : Set α), IsOpen F → ∀ (x : α), x ∈ F → IsOpen (connectedComponentIn F x)\n⊢ ∀ (x : α) (U : Set α), U ∈ 𝓝 x → ∃ V, V ⊆ U ∧ IsOpen V ∧ x ∈ V ∧ IsConnected V\n[PROOFSTEP]\nrefine' fun x U hU =>\n  ⟨connectedComponentIn (interior U) x, (connectedComponentIn_subset _ _).trans interior_subset,\n    h _ isOpen_interior x _, mem_connectedComponentIn _, isConnected_connectedComponentIn_iff.mpr _⟩\n[GOAL]\ncase mpr.refine'_1\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\nh : ∀ (F : Set α), IsOpen F → ∀ (x : α), x ∈ F → IsOpen (connectedComponentIn F x)\nx : α\nU : Set α\nhU : U ∈ 𝓝 x\n⊢ x ∈ interior U\n[PROOFSTEP]\nexact mem_interior_iff_mem_nhds.mpr hU\n[GOAL]\ncase mpr.refine'_2\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\nh : ∀ (F : Set α), IsOpen F → ∀ (x : α), x ∈ F → IsOpen (connectedComponentIn F x)\nx : α\nU : Set α\nhU : U ∈ 𝓝 x\n⊢ x ∈ interior U\n[PROOFSTEP]\nexact mem_interior_iff_mem_nhds.mpr hU\n[GOAL]\ncase mpr.refine'_3\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\nh : ∀ (F : Set α), IsOpen F → ∀ (x : α), x ∈ F → IsOpen (connectedComponentIn F x)\nx : α\nU : Set α\nhU : U ∈ 𝓝 x\n⊢ x ∈ interior U\n[PROOFSTEP]\nexact mem_interior_iff_mem_nhds.mpr hU\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\n⊢ LocallyConnectedSpace α ↔ ∀ (x : α) (U : Set α), U ∈ 𝓝 x → ∃ V, V ∈ 𝓝 x ∧ IsPreconnected V ∧ V ⊆ U\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\n⊢ LocallyConnectedSpace α → ∀ (x : α) (U : Set α), U ∈ 𝓝 x → ∃ V, V ∈ 𝓝 x ∧ IsPreconnected V ∧ V ⊆ U\n[PROOFSTEP]\nrw [locallyConnectedSpace_iff_open_connected_subsets]\n[GOAL]\ncase mp\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\n⊢ (∀ (x : α) (U : Set α), U ∈ 𝓝 x → ∃ V, V ⊆ U ∧ IsOpen V ∧ x ∈ V ∧ IsConnected V) →\n    ∀ (x : α) (U : Set α), U ∈ 𝓝 x → ∃ V, V ∈ 𝓝 x ∧ IsPreconnected V ∧ V ⊆ U\n[PROOFSTEP]\nintro h x U hxU\n[GOAL]\ncase mp\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\nh : ∀ (x : α) (U : Set α), U ∈ 𝓝 x → ∃ V, V ⊆ U ∧ IsOpen V ∧ x ∈ V ∧ IsConnected V\nx : α\nU : Set α\nhxU : U ∈ 𝓝 x\n⊢ ∃ V, V ∈ 𝓝 x ∧ IsPreconnected V ∧ V ⊆ U\n[PROOFSTEP]\nrcases h x U hxU with ⟨V, hVU, hV₁, hxV, hV₂⟩\n[GOAL]\ncase mp.intro.intro.intro.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\nh : ∀ (x : α) (U : Set α), U ∈ 𝓝 x → ∃ V, V ⊆ U ∧ IsOpen V ∧ x ∈ V ∧ IsConnected V\nx : α\nU : Set α\nhxU : U ∈ 𝓝 x\nV : Set α\nhVU : V ⊆ U\nhV₁ : IsOpen V\nhxV : x ∈ V\nhV₂ : IsConnected V\n⊢ ∃ V, V ∈ 𝓝 x ∧ IsPreconnected V ∧ V ⊆ U\n[PROOFSTEP]\nexact ⟨V, hV₁.mem_nhds hxV, hV₂.isPreconnected, hVU⟩\n[GOAL]\ncase mpr\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\n⊢ (∀ (x : α) (U : Set α), U ∈ 𝓝 x → ∃ V, V ∈ 𝓝 x ∧ IsPreconnected V ∧ V ⊆ U) → LocallyConnectedSpace α\n[PROOFSTEP]\nrw [locallyConnectedSpace_iff_connectedComponentIn_open]\n[GOAL]\ncase mpr\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\n⊢ (∀ (x : α) (U : Set α), U ∈ 𝓝 x → ∃ V, V ∈ 𝓝 x ∧ IsPreconnected V ∧ V ⊆ U) →\n    ∀ (F : Set α), IsOpen F → ∀ (x : α), x ∈ F → IsOpen (connectedComponentIn F x)\n[PROOFSTEP]\nrefine' fun h U hU x _ => isOpen_iff_mem_nhds.mpr fun y hy => _\n[GOAL]\ncase mpr\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\nh : ∀ (x : α) (U : Set α), U ∈ 𝓝 x → ∃ V, V ∈ 𝓝 x ∧ IsPreconnected V ∧ V ⊆ U\nU : Set α\nhU : IsOpen U\nx : α\nx✝ : x ∈ U\ny : α\nhy : y ∈ connectedComponentIn U x\n⊢ connectedComponentIn U x ∈ 𝓝 y\n[PROOFSTEP]\nrw [connectedComponentIn_eq hy]\n[GOAL]\ncase mpr\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\nh : ∀ (x : α) (U : Set α), U ∈ 𝓝 x → ∃ V, V ∈ 𝓝 x ∧ IsPreconnected V ∧ V ⊆ U\nU : Set α\nhU : IsOpen U\nx : α\nx✝ : x ∈ U\ny : α\nhy : y ∈ connectedComponentIn U x\n⊢ connectedComponentIn U y ∈ 𝓝 y\n[PROOFSTEP]\nrcases h y U (hU.mem_nhds <| (connectedComponentIn_subset _ _) hy) with ⟨V, hVy, hV, hVU⟩\n[GOAL]\ncase mpr.intro.intro.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\nh : ∀ (x : α) (U : Set α), U ∈ 𝓝 x → ∃ V, V ∈ 𝓝 x ∧ IsPreconnected V ∧ V ⊆ U\nU : Set α\nhU : IsOpen U\nx : α\nx✝ : x ∈ U\ny : α\nhy : y ∈ connectedComponentIn U x\nV : Set α\nhVy : V ∈ 𝓝 y\nhV : IsPreconnected V\nhVU : V ⊆ U\n⊢ connectedComponentIn U y ∈ 𝓝 y\n[PROOFSTEP]\nexact Filter.mem_of_superset hVy (hV.subset_connectedComponentIn (mem_of_mem_nhds hVy) hVU)\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\n⊢ LocallyConnectedSpace α ↔ ∀ (x : α), Filter.HasBasis (𝓝 x) (fun s => s ∈ 𝓝 x ∧ IsPreconnected s) id\n[PROOFSTEP]\nrw [locallyConnectedSpace_iff_connected_subsets]\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\n⊢ (∀ (x : α) (U : Set α), U ∈ 𝓝 x → ∃ V, V ∈ 𝓝 x ∧ IsPreconnected V ∧ V ⊆ U) ↔\n    ∀ (x : α), Filter.HasBasis (𝓝 x) (fun s => s ∈ 𝓝 x ∧ IsPreconnected s) id\n[PROOFSTEP]\nexact forall_congr' <| fun x => Filter.hasBasis_self.symm\n[GOAL]\nα : Type u\nβ : Type v\nι✝ : Type u_1\nπ : ι✝ → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\nι : Type u_3\nb : α → ι → Set α\np : α → ι → Prop\nhbasis : ∀ (x : α), Filter.HasBasis (𝓝 x) (p x) (b x)\nhconnected : ∀ (x : α) (i : ι), p x i → IsPreconnected (b x i)\n⊢ LocallyConnectedSpace α\n[PROOFSTEP]\nrw [locallyConnectedSpace_iff_connected_basis]\n[GOAL]\nα : Type u\nβ : Type v\nι✝ : Type u_1\nπ : ι✝ → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\nι : Type u_3\nb : α → ι → Set α\np : α → ι → Prop\nhbasis : ∀ (x : α), Filter.HasBasis (𝓝 x) (p x) (b x)\nhconnected : ∀ (x : α) (i : ι), p x i → IsPreconnected (b x i)\n⊢ ∀ (x : α), Filter.HasBasis (𝓝 x) (fun s => s ∈ 𝓝 x ∧ IsPreconnected s) id\n[PROOFSTEP]\nexact fun x =>\n  (hbasis x).to_hasBasis (fun i hi => ⟨b x i, ⟨(hbasis x).mem_of_mem hi, hconnected x i hi⟩, subset_rfl⟩) fun s hs =>\n    ⟨(hbasis x).index s hs.1, ⟨(hbasis x).property_index hs.1, (hbasis x).set_index_subset hs.1⟩⟩\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝³ : TopologicalSpace α\ns t u v : Set α\ninst✝² : TopologicalSpace β\ninst✝¹ : TotallyDisconnectedSpace α\ninst✝ : TotallyDisconnectedSpace β\n⊢ TotallyDisconnectedSpace (α ⊕ β)\n[PROOFSTEP]\nrefine' ⟨fun s _ hs => _⟩\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝³ : TopologicalSpace α\ns✝ t u v : Set α\ninst✝² : TopologicalSpace β\ninst✝¹ : TotallyDisconnectedSpace α\ninst✝ : TotallyDisconnectedSpace β\ns : Set (α ⊕ β)\nx✝ : s ⊆ univ\nhs : IsPreconnected s\n⊢ Set.Subsingleton s\n[PROOFSTEP]\nobtain ⟨t, ht, rfl⟩ | ⟨t, ht, rfl⟩ := Sum.isPreconnected_iff.1 hs\n[GOAL]\ncase inl.intro.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝³ : TopologicalSpace α\ns t✝ u v : Set α\ninst✝² : TopologicalSpace β\ninst✝¹ : TotallyDisconnectedSpace α\ninst✝ : TotallyDisconnectedSpace β\nt : Set α\nht : IsPreconnected t\nx✝ : Sum.inl '' t ⊆ univ\nhs : IsPreconnected (Sum.inl '' t)\n⊢ Set.Subsingleton (Sum.inl '' t)\n[PROOFSTEP]\nexact ht.subsingleton.image _\n[GOAL]\ncase inr.intro.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝³ : TopologicalSpace α\ns t✝ u v : Set α\ninst✝² : TopologicalSpace β\ninst✝¹ : TotallyDisconnectedSpace α\ninst✝ : TotallyDisconnectedSpace β\nt : Set β\nht : IsPreconnected t\nx✝ : Sum.inr '' t ⊆ univ\nhs : IsPreconnected (Sum.inr '' t)\n⊢ Set.Subsingleton (Sum.inr '' t)\n[PROOFSTEP]\nexact ht.subsingleton.image _\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝² : TopologicalSpace α\ns t u v : Set α\ninst✝¹ : (i : ι) → TopologicalSpace (π i)\ninst✝ : ∀ (i : ι), TotallyDisconnectedSpace (π i)\n⊢ TotallyDisconnectedSpace ((i : ι) × π i)\n[PROOFSTEP]\nrefine' ⟨fun s _ hs => _⟩\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝² : TopologicalSpace α\ns✝ t u v : Set α\ninst✝¹ : (i : ι) → TopologicalSpace (π i)\ninst✝ : ∀ (i : ι), TotallyDisconnectedSpace (π i)\ns : Set ((i : ι) × π i)\nx✝ : s ⊆ univ\nhs : IsPreconnected s\n⊢ Set.Subsingleton s\n[PROOFSTEP]\nobtain rfl | h := s.eq_empty_or_nonempty\n[GOAL]\ncase inl\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝² : TopologicalSpace α\ns t u v : Set α\ninst✝¹ : (i : ι) → TopologicalSpace (π i)\ninst✝ : ∀ (i : ι), TotallyDisconnectedSpace (π i)\nx✝ : ∅ ⊆ univ\nhs : IsPreconnected ∅\n⊢ Set.Subsingleton ∅\n[PROOFSTEP]\nexact subsingleton_empty\n[GOAL]\ncase inr\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝² : TopologicalSpace α\ns✝ t u v : Set α\ninst✝¹ : (i : ι) → TopologicalSpace (π i)\ninst✝ : ∀ (i : ι), TotallyDisconnectedSpace (π i)\ns : Set ((i : ι) × π i)\nx✝ : s ⊆ univ\nhs : IsPreconnected s\nh : Set.Nonempty s\n⊢ Set.Subsingleton s\n[PROOFSTEP]\nobtain ⟨a, t, ht, rfl⟩ := Sigma.isConnected_iff.1 ⟨h, hs⟩\n[GOAL]\ncase inr.intro.intro.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝² : TopologicalSpace α\ns t✝ u v : Set α\ninst✝¹ : (i : ι) → TopologicalSpace (π i)\ninst✝ : ∀ (i : ι), TotallyDisconnectedSpace (π i)\na : ι\nt : Set (π a)\nht : IsConnected t\nx✝ : Sigma.mk a '' t ⊆ univ\nhs : IsPreconnected (Sigma.mk a '' t)\nh : Set.Nonempty (Sigma.mk a '' t)\n⊢ Set.Subsingleton (Sigma.mk a '' t)\n[PROOFSTEP]\nexact\n  ht.isPreconnected.subsingleton.image\n    _\n      -- porting note: reformulated using `Pairwise`\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t u v : Set α\nX : Type u_3\ninst✝ : TopologicalSpace X\nhX : Pairwise fun x y => ∃ U, IsClopen U ∧ x ∈ U ∧ ¬y ∈ U\n⊢ IsTotallyDisconnected univ\n[PROOFSTEP]\nrintro S - hS\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t u v : Set α\nX : Type u_3\ninst✝ : TopologicalSpace X\nhX : Pairwise fun x y => ∃ U, IsClopen U ∧ x ∈ U ∧ ¬y ∈ U\nS : Set X\nhS : IsPreconnected S\n⊢ Set.Subsingleton S\n[PROOFSTEP]\nunfold Set.Subsingleton\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t u v : Set α\nX : Type u_3\ninst✝ : TopologicalSpace X\nhX : Pairwise fun x y => ∃ U, IsClopen U ∧ x ∈ U ∧ ¬y ∈ U\nS : Set X\nhS : IsPreconnected S\n⊢ ∀ ⦃x : X⦄, x ∈ S → ∀ ⦃y : X⦄, y ∈ S → x = y\n[PROOFSTEP]\nby_contra' h_contra\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t u v : Set α\nX : Type u_3\ninst✝ : TopologicalSpace X\nhX : Pairwise fun x y => ∃ U, IsClopen U ∧ x ∈ U ∧ ¬y ∈ U\nS : Set X\nhS : IsPreconnected S\nh_contra : Exists fun ⦃x⦄ => x ∈ S ∧ Exists fun ⦃y⦄ => y ∈ S ∧ x ≠ y\n⊢ False\n[PROOFSTEP]\nrcases h_contra with ⟨x, hx, y, hy, hxy⟩\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t u v : Set α\nX : Type u_3\ninst✝ : TopologicalSpace X\nhX : Pairwise fun x y => ∃ U, IsClopen U ∧ x ∈ U ∧ ¬y ∈ U\nS : Set X\nhS : IsPreconnected S\nx : X\nhx : x ∈ S\ny : X\nhy : y ∈ S\nhxy : x ≠ y\n⊢ False\n[PROOFSTEP]\nobtain ⟨U, h_clopen, hxU, hyU⟩ := hX hxy\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t u v : Set α\nX : Type u_3\ninst✝ : TopologicalSpace X\nhX : Pairwise fun x y => ∃ U, IsClopen U ∧ x ∈ U ∧ ¬y ∈ U\nS : Set X\nhS : IsPreconnected S\nx : X\nhx : x ∈ S\ny : X\nhy : y ∈ S\nhxy : x ≠ y\nU : Set X\nh_clopen : IsClopen U\nhxU : x ∈ U\nhyU : ¬y ∈ U\n⊢ False\n[PROOFSTEP]\nspecialize hS U Uᶜ h_clopen.1 h_clopen.compl.1 (fun a _ => em (a ∈ U)) ⟨x, hx, hxU⟩ ⟨y, hy, hyU⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t u v : Set α\nX : Type u_3\ninst✝ : TopologicalSpace X\nhX : Pairwise fun x y => ∃ U, IsClopen U ∧ x ∈ U ∧ ¬y ∈ U\nS : Set X\nx : X\nhx : x ∈ S\ny : X\nhy : y ∈ S\nhxy : x ≠ y\nU : Set X\nh_clopen : IsClopen U\nhxU : x ∈ U\nhyU : ¬y ∈ U\nhS : Set.Nonempty (S ∩ (U ∩ Uᶜ))\n⊢ False\n[PROOFSTEP]\nrw [inter_compl_self, Set.inter_empty] at hS \n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α\ns t u v : Set α\nX : Type u_3\ninst✝ : TopologicalSpace X\nhX : Pairwise fun x y => ∃ U, IsClopen U ∧ x ∈ U ∧ ¬y ∈ U\nS : Set X\nx : X\nhx : x ∈ S\ny : X\nhy : y ∈ S\nhxy : x ≠ y\nU : Set X\nh_clopen : IsClopen U\nhxU : x ∈ U\nhyU : ¬y ∈ U\nhS : Set.Nonempty ∅\n⊢ False\n[PROOFSTEP]\nexact Set.not_nonempty_empty hS\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\n⊢ TotallyDisconnectedSpace α ↔ ∀ (x : α), Set.Subsingleton (connectedComponent x)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\n⊢ TotallyDisconnectedSpace α → ∀ (x : α), Set.Subsingleton (connectedComponent x)\n[PROOFSTEP]\nintro h x\n[GOAL]\ncase mp\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\nh : TotallyDisconnectedSpace α\nx : α\n⊢ Set.Subsingleton (connectedComponent x)\n[PROOFSTEP]\napply h.1\n[GOAL]\ncase mp.a\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\nh : TotallyDisconnectedSpace α\nx : α\n⊢ connectedComponent x ⊆ univ\n[PROOFSTEP]\nexact subset_univ _\n[GOAL]\ncase mp.a\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\nh : TotallyDisconnectedSpace α\nx : α\n⊢ IsPreconnected (connectedComponent x)\n[PROOFSTEP]\nexact isPreconnected_connectedComponent\n[GOAL]\ncase mpr\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\n⊢ (∀ (x : α), Set.Subsingleton (connectedComponent x)) → TotallyDisconnectedSpace α\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\nh : ∀ (x : α), Set.Subsingleton (connectedComponent x)\n⊢ TotallyDisconnectedSpace α\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mpr.isTotallyDisconnected_univ\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\nh : ∀ (x : α), Set.Subsingleton (connectedComponent x)\n⊢ IsTotallyDisconnected univ\n[PROOFSTEP]\nintro s s_sub hs\n[GOAL]\ncase mpr.isTotallyDisconnected_univ\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u v : Set α\nh : ∀ (x : α), Set.Subsingleton (connectedComponent x)\ns : Set α\ns_sub : s ⊆ univ\nhs : IsPreconnected s\n⊢ Set.Subsingleton s\n[PROOFSTEP]\nrcases eq_empty_or_nonempty s with (rfl | ⟨x, x_in⟩)\n[GOAL]\ncase mpr.isTotallyDisconnected_univ.inl\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\nh : ∀ (x : α), Set.Subsingleton (connectedComponent x)\ns_sub : ∅ ⊆ univ\nhs : IsPreconnected ∅\n⊢ Set.Subsingleton ∅\n[PROOFSTEP]\nexact subsingleton_empty\n[GOAL]\ncase mpr.isTotallyDisconnected_univ.inr.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u v : Set α\nh : ∀ (x : α), Set.Subsingleton (connectedComponent x)\ns : Set α\ns_sub : s ⊆ univ\nhs : IsPreconnected s\nx : α\nx_in : x ∈ s\n⊢ Set.Subsingleton s\n[PROOFSTEP]\nexact (h x).anti (hs.subset_connectedComponent x_in)\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\n⊢ TotallyDisconnectedSpace α ↔ ∀ (x : α), connectedComponent x = {x}\n[PROOFSTEP]\nrw [totallyDisconnectedSpace_iff_connectedComponent_subsingleton]\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\n⊢ (∀ (x : α), Set.Subsingleton (connectedComponent x)) ↔ ∀ (x : α), connectedComponent x = {x}\n[PROOFSTEP]\nrefine forall_congr' fun x => ?_\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\nx : α\n⊢ Set.Subsingleton (connectedComponent x) ↔ connectedComponent x = {x}\n[PROOFSTEP]\nrw [subsingleton_iff_singleton]\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns t u v : Set α\nx : α\n⊢ x ∈ connectedComponent x\n[PROOFSTEP]\nexact mem_connectedComponent\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u v s : Set α\nH : IsTotallySeparated s\n⊢ IsTotallyDisconnected s\n[PROOFSTEP]\nintro t hts ht x x_in y y_in\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t✝ u v s : Set α\nH : IsTotallySeparated s\nt : Set α\nhts : t ⊆ s\nht : IsPreconnected t\nx : α\nx_in : x ∈ t\ny : α\ny_in : y ∈ t\n⊢ x = y\n[PROOFSTEP]\nby_contra h\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t✝ u v s : Set α\nH : IsTotallySeparated s\nt : Set α\nhts : t ⊆ s\nht : IsPreconnected t\nx : α\nx_in : x ∈ t\ny : α\ny_in : y ∈ t\nh : ¬x = y\n⊢ False\n[PROOFSTEP]\nobtain ⟨u : Set α, v : Set α, hu : IsOpen u, hv : IsOpen v, hxu : x ∈ u, hyv : y ∈ v, hs : s ⊆ u ∪ v, huv⟩ :=\n  H x (hts x_in) y (hts y_in) h\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t✝ u✝ v✝ s : Set α\nH : IsTotallySeparated s\nt : Set α\nhts : t ⊆ s\nht : IsPreconnected t\nx : α\nx_in : x ∈ t\ny : α\ny_in : y ∈ t\nh : ¬x = y\nu v : Set α\nhu : IsOpen u\nhv : IsOpen v\nhxu : x ∈ u\nhyv : y ∈ v\nhs : s ⊆ u ∪ v\nhuv : Disjoint u v\n⊢ False\n[PROOFSTEP]\nrefine' (ht _ _ hu hv (hts.trans hs) ⟨x, x_in, hxu⟩ ⟨y, y_in, hyv⟩).ne_empty _\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t✝ u✝ v✝ s : Set α\nH : IsTotallySeparated s\nt : Set α\nhts : t ⊆ s\nht : IsPreconnected t\nx : α\nx_in : x ∈ t\ny : α\ny_in : y ∈ t\nh : ¬x = y\nu v : Set α\nhu : IsOpen u\nhv : IsOpen v\nhxu : x ∈ u\nhyv : y ∈ v\nhs : s ⊆ u ∪ v\nhuv : Disjoint u v\n⊢ t ∩ (u ∩ v) = ∅\n[PROOFSTEP]\nrw [huv.inter_eq, inter_empty]\n[GOAL]\nα✝ : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝² : TopologicalSpace α✝\ns t u v : Set α✝\nα : Type u_3\ninst✝¹ : TopologicalSpace α\ninst✝ : TotallySeparatedSpace α\nx y : α\nhxy : x ≠ y\n⊢ ∃ U, IsClopen U ∧ x ∈ U ∧ y ∈ Uᶜ\n[PROOFSTEP]\nobtain ⟨U, V, hU, hV, Ux, Vy, f, disj⟩ :=\n  TotallySeparatedSpace.isTotallySeparated_univ x (Set.mem_univ x) y (Set.mem_univ y) hxy\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro\nα✝ : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝² : TopologicalSpace α✝\ns t u v : Set α✝\nα : Type u_3\ninst✝¹ : TopologicalSpace α\ninst✝ : TotallySeparatedSpace α\nx y : α\nhxy : x ≠ y\nU V : Set α\nhU : IsOpen U\nhV : IsOpen V\nUx : x ∈ U\nVy : y ∈ V\nf : univ ⊆ U ∪ V\ndisj : Disjoint U V\n⊢ ∃ U, IsClopen U ∧ x ∈ U ∧ y ∈ Uᶜ\n[PROOFSTEP]\nhave clopen_U := isClopen_inter_of_disjoint_cover_clopen isClopen_univ f hU hV disj\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro\nα✝ : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝² : TopologicalSpace α✝\ns t u v : Set α✝\nα : Type u_3\ninst✝¹ : TopologicalSpace α\ninst✝ : TotallySeparatedSpace α\nx y : α\nhxy : x ≠ y\nU V : Set α\nhU : IsOpen U\nhV : IsOpen V\nUx : x ∈ U\nVy : y ∈ V\nf : univ ⊆ U ∪ V\ndisj : Disjoint U V\nclopen_U : IsClopen (univ ∩ U)\n⊢ ∃ U, IsClopen U ∧ x ∈ U ∧ y ∈ Uᶜ\n[PROOFSTEP]\nrw [univ_inter _] at clopen_U \n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro\nα✝ : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝² : TopologicalSpace α✝\ns t u v : Set α✝\nα : Type u_3\ninst✝¹ : TopologicalSpace α\ninst✝ : TotallySeparatedSpace α\nx y : α\nhxy : x ≠ y\nU V : Set α\nhU : IsOpen U\nhV : IsOpen V\nUx : x ∈ U\nVy : y ∈ V\nf : univ ⊆ U ∪ V\ndisj : Disjoint U V\nclopen_U : IsClopen U\n⊢ ∃ U, IsClopen U ∧ x ∈ U ∧ y ∈ Uᶜ\n[PROOFSTEP]\nrw [← Set.subset_compl_iff_disjoint_right, subset_compl_comm] at disj \n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro\nα✝ : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝² : TopologicalSpace α✝\ns t u v : Set α✝\nα : Type u_3\ninst✝¹ : TopologicalSpace α\ninst✝ : TotallySeparatedSpace α\nx y : α\nhxy : x ≠ y\nU V : Set α\nhU : IsOpen U\nhV : IsOpen V\nUx : x ∈ U\nVy : y ∈ V\nf : univ ⊆ U ∪ V\ndisj : V ⊆ Uᶜ\nclopen_U : IsClopen U\n⊢ ∃ U, IsClopen U ∧ x ∈ U ∧ y ∈ Uᶜ\n[PROOFSTEP]\nexact ⟨U, clopen_U, Ux, disj Vy⟩\n[GOAL]\nα✝ : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : TopologicalSpace α✝\ns t u v : Set α✝\nα : Type u_3\ninst✝ : TopologicalSpace α\nx : α\n⊢ connectedComponent x = connectedComponent x\n[PROOFSTEP]\ntrivial\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝² : TopologicalSpace α\ns t u v : Set α\ninst✝¹ : TopologicalSpace β\ninst✝ : TotallyDisconnectedSpace β\nf : α → β\nh : Continuous f\n⊢ ∀ (a b : α), Setoid.r a b → f a = f b\n[PROOFSTEP]\nconvert h.image_eq_of_connectedComponent_eq\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝² : TopologicalSpace α\ns t u v : Set α\ninst✝¹ : TopologicalSpace β\ninst✝ : TotallyDisconnectedSpace β\nf : α → β\nx : α\n⊢ ConnectedComponents.mk ⁻¹' {ConnectedComponents.mk x} = connectedComponent x\n[PROOFSTEP]\next y\n[GOAL]\ncase h\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝² : TopologicalSpace α\ns t u v : Set α\ninst✝¹ : TopologicalSpace β\ninst✝ : TotallyDisconnectedSpace β\nf : α → β\nx y : α\n⊢ y ∈ ConnectedComponents.mk ⁻¹' {ConnectedComponents.mk x} ↔ y ∈ connectedComponent x\n[PROOFSTEP]\nrw [mem_preimage, mem_singleton_iff, ConnectedComponents.coe_eq_coe']\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝² : TopologicalSpace α\ns t u v : Set α\ninst✝¹ : TopologicalSpace β\ninst✝ : TotallyDisconnectedSpace β\nf : α → β\nU : Set α\n⊢ ConnectedComponents.mk ⁻¹' (ConnectedComponents.mk '' U) = ⋃ (x : α) (_ : x ∈ U), connectedComponent x\n[PROOFSTEP]\nsimp only [connectedComponents_preimage_singleton, preimage_iUnion₂, image_eq_iUnion]\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝² : TopologicalSpace α\ns t u v : Set α\ninst✝¹ : TopologicalSpace β\ninst✝ : TotallyDisconnectedSpace β\nf : α → β\n⊢ TotallyDisconnectedSpace (ConnectedComponents α)\n[PROOFSTEP]\nrw [totallyDisconnectedSpace_iff_connectedComponent_singleton]\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝² : TopologicalSpace α\ns t u v : Set α\ninst✝¹ : TopologicalSpace β\ninst✝ : TotallyDisconnectedSpace β\nf : α → β\n⊢ ∀ (x : ConnectedComponents α), connectedComponent x = {x}\n[PROOFSTEP]\nrefine' ConnectedComponents.surjective_coe.forall.2 fun x => _\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝² : TopologicalSpace α\ns t u v : Set α\ninst✝¹ : TopologicalSpace β\ninst✝ : TotallyDisconnectedSpace β\nf : α → β\nx : α\n⊢ connectedComponent (mk x) = {mk x}\n[PROOFSTEP]\nrw [← ConnectedComponents.quotientMap_coe.image_connectedComponent, ← connectedComponents_preimage_singleton,\n  image_preimage_eq _ ConnectedComponents.surjective_coe]\n[GOAL]\ncase h_fibers\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝² : TopologicalSpace α\ns t u v : Set α\ninst✝¹ : TopologicalSpace β\ninst✝ : TotallyDisconnectedSpace β\nf : α → β\nx : α\n⊢ ∀ (y : ConnectedComponents α), IsConnected (mk ⁻¹' {y})\n[PROOFSTEP]\nrefine' ConnectedComponents.surjective_coe.forall.2 fun y => _\n[GOAL]\ncase h_fibers\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝² : TopologicalSpace α\ns t u v : Set α\ninst✝¹ : TopologicalSpace β\ninst✝ : TotallyDisconnectedSpace β\nf : α → β\nx y : α\n⊢ IsConnected (mk ⁻¹' {mk y})\n[PROOFSTEP]\nrw [connectedComponents_preimage_singleton]\n[GOAL]\ncase h_fibers\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝² : TopologicalSpace α\ns t u v : Set α\ninst✝¹ : TopologicalSpace β\ninst✝ : TotallyDisconnectedSpace β\nf : α → β\nx y : α\n⊢ IsConnected (connectedComponent y)\n[PROOFSTEP]\nexact isConnected_connectedComponent\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u v s : Set α\nhs : ∀ (f : α → Bool), ContinuousOn f s → ∀ (x : α), x ∈ s → ∀ (y : α), y ∈ s → f x = f y\n⊢ IsPreconnected s\n[PROOFSTEP]\nunfold IsPreconnected\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u v s : Set α\nhs : ∀ (f : α → Bool), ContinuousOn f s → ∀ (x : α), x ∈ s → ∀ (y : α), y ∈ s → f x = f y\n⊢ ∀ (u v : Set α),\n    IsOpen u → IsOpen v → s ⊆ u ∪ v → Set.Nonempty (s ∩ u) → Set.Nonempty (s ∩ v) → Set.Nonempty (s ∩ (u ∩ v))\n[PROOFSTEP]\nby_contra'\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u v s : Set α\nhs : ∀ (f : α → Bool), ContinuousOn f s → ∀ (x : α), x ∈ s → ∀ (y : α), y ∈ s → f x = f y\nthis :\n  ∃ u v, IsOpen u ∧ IsOpen v ∧ s ⊆ u ∪ v ∧ Set.Nonempty (s ∩ u) ∧ Set.Nonempty (s ∩ v) ∧ ¬Set.Nonempty (s ∩ (u ∩ v))\n⊢ False\n[PROOFSTEP]\nrcases this with ⟨u, v, u_op, v_op, hsuv, ⟨x, x_in_s, x_in_u⟩, ⟨y, y_in_s, y_in_v⟩, H⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u✝ v✝ s : Set α\nhs : ∀ (f : α → Bool), ContinuousOn f s → ∀ (x : α), x ∈ s → ∀ (y : α), y ∈ s → f x = f y\nu v : Set α\nu_op : IsOpen u\nv_op : IsOpen v\nhsuv : s ⊆ u ∪ v\nx : α\nx_in_s : x ∈ s\nx_in_u : x ∈ u\nH : ¬Set.Nonempty (s ∩ (u ∩ v))\ny : α\ny_in_s : y ∈ s\ny_in_v : y ∈ v\n⊢ False\n[PROOFSTEP]\nrw [not_nonempty_iff_eq_empty] at H \n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u✝ v✝ s : Set α\nhs : ∀ (f : α → Bool), ContinuousOn f s → ∀ (x : α), x ∈ s → ∀ (y : α), y ∈ s → f x = f y\nu v : Set α\nu_op : IsOpen u\nv_op : IsOpen v\nhsuv : s ⊆ u ∪ v\nx : α\nx_in_s : x ∈ s\nx_in_u : x ∈ u\nH : s ∩ (u ∩ v) = ∅\ny : α\ny_in_s : y ∈ s\ny_in_v : y ∈ v\n⊢ False\n[PROOFSTEP]\nhave hy : y ∉ u := fun y_in_u => eq_empty_iff_forall_not_mem.mp H y ⟨y_in_s, ⟨y_in_u, y_in_v⟩⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u✝ v✝ s : Set α\nhs : ∀ (f : α → Bool), ContinuousOn f s → ∀ (x : α), x ∈ s → ∀ (y : α), y ∈ s → f x = f y\nu v : Set α\nu_op : IsOpen u\nv_op : IsOpen v\nhsuv : s ⊆ u ∪ v\nx : α\nx_in_s : x ∈ s\nx_in_u : x ∈ u\nH : s ∩ (u ∩ v) = ∅\ny : α\ny_in_s : y ∈ s\ny_in_v : y ∈ v\nhy : ¬y ∈ u\n⊢ False\n[PROOFSTEP]\nhave : ContinuousOn u.boolIndicator s :=\n  by\n  apply (continuousOn_boolIndicator_iff_clopen _ _).mpr ⟨_, _⟩\n  · exact u_op.preimage continuous_subtype_val\n  · rw [preimage_subtype_coe_eq_compl hsuv H]\n    exact (v_op.preimage continuous_subtype_val).isClosed_compl\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u✝ v✝ s : Set α\nhs : ∀ (f : α → Bool), ContinuousOn f s → ∀ (x : α), x ∈ s → ∀ (y : α), y ∈ s → f x = f y\nu v : Set α\nu_op : IsOpen u\nv_op : IsOpen v\nhsuv : s ⊆ u ∪ v\nx : α\nx_in_s : x ∈ s\nx_in_u : x ∈ u\nH : s ∩ (u ∩ v) = ∅\ny : α\ny_in_s : y ∈ s\ny_in_v : y ∈ v\nhy : ¬y ∈ u\n⊢ ContinuousOn (boolIndicator u) s\n[PROOFSTEP]\napply (continuousOn_boolIndicator_iff_clopen _ _).mpr ⟨_, _⟩\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u✝ v✝ s : Set α\nhs : ∀ (f : α → Bool), ContinuousOn f s → ∀ (x : α), x ∈ s → ∀ (y : α), y ∈ s → f x = f y\nu v : Set α\nu_op : IsOpen u\nv_op : IsOpen v\nhsuv : s ⊆ u ∪ v\nx : α\nx_in_s : x ∈ s\nx_in_u : x ∈ u\nH : s ∩ (u ∩ v) = ∅\ny : α\ny_in_s : y ∈ s\ny_in_v : y ∈ v\nhy : ¬y ∈ u\n⊢ IsOpen (Subtype.val ⁻¹' u)\n[PROOFSTEP]\nexact u_op.preimage continuous_subtype_val\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u✝ v✝ s : Set α\nhs : ∀ (f : α → Bool), ContinuousOn f s → ∀ (x : α), x ∈ s → ∀ (y : α), y ∈ s → f x = f y\nu v : Set α\nu_op : IsOpen u\nv_op : IsOpen v\nhsuv : s ⊆ u ∪ v\nx : α\nx_in_s : x ∈ s\nx_in_u : x ∈ u\nH : s ∩ (u ∩ v) = ∅\ny : α\ny_in_s : y ∈ s\ny_in_v : y ∈ v\nhy : ¬y ∈ u\n⊢ IsClosed (Subtype.val ⁻¹' u)\n[PROOFSTEP]\nrw [preimage_subtype_coe_eq_compl hsuv H]\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u✝ v✝ s : Set α\nhs : ∀ (f : α → Bool), ContinuousOn f s → ∀ (x : α), x ∈ s → ∀ (y : α), y ∈ s → f x = f y\nu v : Set α\nu_op : IsOpen u\nv_op : IsOpen v\nhsuv : s ⊆ u ∪ v\nx : α\nx_in_s : x ∈ s\nx_in_u : x ∈ u\nH : s ∩ (u ∩ v) = ∅\ny : α\ny_in_s : y ∈ s\ny_in_v : y ∈ v\nhy : ¬y ∈ u\n⊢ IsClosed (Subtype.val ⁻¹' v)ᶜ\n[PROOFSTEP]\nexact (v_op.preimage continuous_subtype_val).isClosed_compl\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝ : TopologicalSpace α\ns✝ t u✝ v✝ s : Set α\nhs : ∀ (f : α → Bool), ContinuousOn f s → ∀ (x : α), x ∈ s → ∀ (y : α), y ∈ s → f x = f y\nu v : Set α\nu_op : IsOpen u\nv_op : IsOpen v\nhsuv : s ⊆ u ∪ v\nx : α\nx_in_s : x ∈ s\nx_in_u : x ∈ u\nH : s ∩ (u ∩ v) = ∅\ny : α\ny_in_s : y ∈ s\ny_in_v : y ∈ v\nhy : ¬y ∈ u\nthis : ContinuousOn (boolIndicator u) s\n⊢ False\n[PROOFSTEP]\nsimpa [(u.mem_iff_boolIndicator _).mp x_in_u, (u.not_mem_iff_boolIndicator _).mp hy] using hs _ this x x_in_s y y_in_s\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝² : TopologicalSpace α\ns t u v : Set α\ninst✝¹ : TopologicalSpace β\nS : Set α\nhS : IsPreconnected S\nT : Set β\ninst✝ : DiscreteTopology ↑T\nf : α → β\nhc : ContinuousOn f S\nhTm : MapsTo f S T\nx y : α\nhx : x ∈ S\nhy : y ∈ S\n⊢ f x = f y\n[PROOFSTEP]\nlet F : S → T := hTm.restrict f S T\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝² : TopologicalSpace α\ns t u v : Set α\ninst✝¹ : TopologicalSpace β\nS : Set α\nhS : IsPreconnected S\nT : Set β\ninst✝ : DiscreteTopology ↑T\nf : α → β\nhc : ContinuousOn f S\nhTm : MapsTo f S T\nx y : α\nhx : x ∈ S\nhy : y ∈ S\nF : ↑S → ↑T := MapsTo.restrict f S T hTm\n⊢ f x = f y\n[PROOFSTEP]\nsuffices F ⟨x, hx⟩ = F ⟨y, hy⟩ by rwa [← Subtype.coe_inj] at this \n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝² : TopologicalSpace α\ns t u v : Set α\ninst✝¹ : TopologicalSpace β\nS : Set α\nhS : IsPreconnected S\nT : Set β\ninst✝ : DiscreteTopology ↑T\nf : α → β\nhc : ContinuousOn f S\nhTm : MapsTo f S T\nx y : α\nhx : x ∈ S\nhy : y ∈ S\nF : ↑S → ↑T := MapsTo.restrict f S T hTm\nthis : F { val := x, property := hx } = F { val := y, property := hy }\n⊢ f x = f y\n[PROOFSTEP]\nrwa [← Subtype.coe_inj] at this \n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝² : TopologicalSpace α\ns t u v : Set α\ninst✝¹ : TopologicalSpace β\nS : Set α\nhS : IsPreconnected S\nT : Set β\ninst✝ : DiscreteTopology ↑T\nf : α → β\nhc : ContinuousOn f S\nhTm : MapsTo f S T\nx y : α\nhx : x ∈ S\nhy : y ∈ S\nF : ↑S → ↑T := MapsTo.restrict f S T hTm\n⊢ F { val := x, property := hx } = F { val := y, property := hy }\n[PROOFSTEP]\nexact (isPreconnected_iff_preconnectedSpace.mp hS).constant (hc.restrict_mapsTo _)\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝² : TopologicalSpace α\ns t u v : Set α\ninst✝¹ : TopologicalSpace β\nS : Set α\nhS : IsPreconnected S\nT : Set β\ninst✝ : DiscreteTopology ↑T\nf : α → β\nhc : ContinuousOn f S\nhTm : MapsTo f S T\nhne : Set.Nonempty T\n⊢ ∃ y, y ∈ T ∧ EqOn f (const α y) S\n[PROOFSTEP]\nrcases S.eq_empty_or_nonempty with (rfl | ⟨x, hx⟩)\n[GOAL]\ncase inl\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝² : TopologicalSpace α\ns t u v : Set α\ninst✝¹ : TopologicalSpace β\nT : Set β\ninst✝ : DiscreteTopology ↑T\nf : α → β\nhne : Set.Nonempty T\nhS : IsPreconnected ∅\nhc : ContinuousOn f ∅\nhTm : MapsTo f ∅ T\n⊢ ∃ y, y ∈ T ∧ EqOn f (const α y) ∅\n[PROOFSTEP]\nexact hne.imp fun _ hy => ⟨hy, eqOn_empty _ _⟩\n[GOAL]\ncase inr.intro\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝² : TopologicalSpace α\ns t u v : Set α\ninst✝¹ : TopologicalSpace β\nS : Set α\nhS : IsPreconnected S\nT : Set β\ninst✝ : DiscreteTopology ↑T\nf : α → β\nhc : ContinuousOn f S\nhTm : MapsTo f S T\nhne : Set.Nonempty T\nx : α\nhx : x ∈ S\n⊢ ∃ y, y ∈ T ∧ EqOn f (const α y) S\n[PROOFSTEP]\nexact ⟨f x, hTm hx, fun x' hx' => hS.constant_of_mapsTo hc hTm hx' hx⟩\n", "meta": {"mathlib_filename": "Mathlib.Topology.Connected", "llama_tokens": 134115, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8333246118695629, "lm_q2_score": 0.6477982247516797, "lm_q1q2_score": 0.5398262042109854}}
{"text": "[GOAL]\np : ℝ[X]\n⊢ Tendsto (fun x => eval x p / exp x) atTop (𝓝 0)\n[PROOFSTEP]\ninduction p using Polynomial.induction_on' with\n| h_monomial n c =>\n  simpa [exp_neg, div_eq_mul_inv, mul_assoc] using tendsto_const_nhds.mul (tendsto_pow_mul_exp_neg_atTop_nhds_0 n)\n| h_add p q hp hq => simpa [add_div] using hp.add hq\n[GOAL]\np : ℝ[X]\n⊢ Tendsto (fun x => eval x p / exp x) atTop (𝓝 0)\n[PROOFSTEP]\ninduction p using Polynomial.induction_on' with\n| h_monomial n c =>\n  simpa [exp_neg, div_eq_mul_inv, mul_assoc] using tendsto_const_nhds.mul (tendsto_pow_mul_exp_neg_atTop_nhds_0 n)\n| h_add p q hp hq => simpa [add_div] using hp.add hq\n[GOAL]\ncase h_monomial\nn : ℕ\nc : ℝ\n⊢ Tendsto (fun x => eval x (↑(monomial n) c) / exp x) atTop (𝓝 0)\n[PROOFSTEP]\n\n| h_monomial n c =>\n  simpa [exp_neg, div_eq_mul_inv, mul_assoc] using tendsto_const_nhds.mul (tendsto_pow_mul_exp_neg_atTop_nhds_0 n)\n[GOAL]\ncase h_monomial\nn : ℕ\nc : ℝ\n⊢ Tendsto (fun x => eval x (↑(monomial n) c) / exp x) atTop (𝓝 0)\n[PROOFSTEP]\nsimpa [exp_neg, div_eq_mul_inv, mul_assoc] using tendsto_const_nhds.mul (tendsto_pow_mul_exp_neg_atTop_nhds_0 n)\n[GOAL]\ncase h_add\np q : ℝ[X]\nhp : Tendsto (fun x => eval x p / exp x) atTop (𝓝 0)\nhq : Tendsto (fun x => eval x q / exp x) atTop (𝓝 0)\n⊢ Tendsto (fun x => eval x (p + q) / exp x) atTop (𝓝 0)\n[PROOFSTEP]\n\n| h_add p q hp hq => simpa [add_div] using hp.add hq\n[GOAL]\ncase h_add\np q : ℝ[X]\nhp : Tendsto (fun x => eval x p / exp x) atTop (𝓝 0)\nhq : Tendsto (fun x => eval x q / exp x) atTop (𝓝 0)\n⊢ Tendsto (fun x => eval x (p + q) / exp x) atTop (𝓝 0)\n[PROOFSTEP]\nsimpa [add_div] using hp.add hq\n", "meta": {"mathlib_filename": "Mathlib.Analysis.SpecialFunctions.PolynomialExp", "llama_tokens": 777, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7981867873410141, "lm_q2_score": 0.6757646140788307, "lm_q1q2_score": 0.5393863863103221}}
{"text": "[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : Mul α\ns t u : Set α\na : α\n⊢ op '' s • t = t * s\n[PROOFSTEP]\nrw [← image2_smul, ← image2_mul, image2_image_left, image2_swap]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝ : Mul α\ns t u : Set α\na : α\n⊢ image2 (fun a b => SMul.smul (op b) a) t s = image2 (fun x x_1 => x * x_1) t s\n[PROOFSTEP]\nrfl\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ns s₁ s₂ : Set α\nt t₁ t₂ : Set β\na✝ : α\nb✝ : β\ninst✝³ : SMul α β\ninst✝² : SMul α γ\ninst✝¹ : SMul β γ\ninst✝ : IsScalarTower α β γ\na : α\nb : β\nT : Set γ\n⊢ (a • b) • T = a • b • T\n[PROOFSTEP]\nsimp only [← image_smul, image_image, smul_assoc]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ns✝ s₁ s₂ : Set α\nt t₁ t₂ : Set β\na : α\nb : β\ninst✝¹ : Monoid α\ninst✝ : MulAction α β\ns : Set β\n⊢ (fun x => 1 • x) '' s = s\n[PROOFSTEP]\nsimp_rw [one_smul, image_id']\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ns s₁ s₂ : Set α\nt t₁ t₂ : Set β\na : α\nb : β\ninst✝¹ : Monoid α\ninst✝ : MulAction α β\n⊢ ∀ (b : Set β), 1 • b = b\n[PROOFSTEP]\nintros\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ns s₁ s₂ : Set α\nt t₁ t₂ : Set β\na : α\nb : β\ninst✝¹ : Monoid α\ninst✝ : MulAction α β\nb✝ : Set β\n⊢ 1 • b✝ = b✝\n[PROOFSTEP]\nsimp only [← image_smul, one_smul, image_id']\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ns s₁ s₂ : Set α\nt t₁ t₂ : Set β\na : α\nb : β\ninst✝¹ : Monoid α\ninst✝ : MulAction α β\n⊢ ∀ (x y : α) (b : Set β), (x * y) • b = x • y • b\n[PROOFSTEP]\nintros\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ns s₁ s₂ : Set α\nt t₁ t₂ : Set β\na : α\nb : β\ninst✝¹ : Monoid α\ninst✝ : MulAction α β\nx✝ y✝ : α\nb✝ : Set β\n⊢ (x✝ * y✝) • b✝ = x✝ • y✝ • b✝\n[PROOFSTEP]\nsimp only [← image_smul, image_image, ← mul_smul]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ns s₁ s₂ : Set α\nt t₁ t₂ : Set β\na : α\nb : β\ninst✝² : Monoid α\ninst✝¹ : AddMonoid β\ninst✝ : DistribMulAction α β\nx✝ : α\n⊢ {x✝ • 0} = 0\n[PROOFSTEP]\nrw [smul_zero, singleton_zero]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ns s₁ s₂ : Set α\nt t₁ t₂ : Set β\na : α\nb : β\ninst✝² : Monoid α\ninst✝¹ : Monoid β\ninst✝ : MulDistribMulAction α β\nx✝ : α\n⊢ {x✝ • 1} = 1\n[PROOFSTEP]\nrw [smul_one, singleton_one]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ns✝ s₁ s₂ : Set α\nt✝ t₁ t₂ : Set β\na : α\nb : β\ninst✝³ : Zero α\ninst✝² : Zero β\ninst✝¹ : SMul α β\ninst✝ : NoZeroSMulDivisors α β\ns : Set α\nt : Set β\nh : s • t = 0\n⊢ s = 0 ∨ t = 0\n[PROOFSTEP]\nby_contra' H\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ns✝ s₁ s₂ : Set α\nt✝ t₁ t₂ : Set β\na : α\nb : β\ninst✝³ : Zero α\ninst✝² : Zero β\ninst✝¹ : SMul α β\ninst✝ : NoZeroSMulDivisors α β\ns : Set α\nt : Set β\nh : s • t = 0\nH : s ≠ 0 ∧ t ≠ 0\n⊢ False\n[PROOFSTEP]\nhave hst : (s • t).Nonempty := h.symm.subst zero_nonempty\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ns✝ s₁ s₂ : Set α\nt✝ t₁ t₂ : Set β\na : α\nb : β\ninst✝³ : Zero α\ninst✝² : Zero β\ninst✝¹ : SMul α β\ninst✝ : NoZeroSMulDivisors α β\ns : Set α\nt : Set β\nh : s • t = 0\nH : s ≠ 0 ∧ t ≠ 0\nhst : Set.Nonempty (s • t)\n⊢ False\n[PROOFSTEP]\nrw [Ne.def, ← hst.of_smul_left.subset_zero_iff, Ne.def, ← hst.of_smul_right.subset_zero_iff] at H \n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ns✝ s₁ s₂ : Set α\nt✝ t₁ t₂ : Set β\na : α\nb : β\ninst✝³ : Zero α\ninst✝² : Zero β\ninst✝¹ : SMul α β\ninst✝ : NoZeroSMulDivisors α β\ns : Set α\nt : Set β\nh : s • t = 0\nH : ¬s ⊆ 0 ∧ ¬t ⊆ 0\nhst : Set.Nonempty (s • t)\n⊢ False\n[PROOFSTEP]\nsimp only [not_subset, mem_zero] at H \n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ns✝ s₁ s₂ : Set α\nt✝ t₁ t₂ : Set β\na : α\nb : β\ninst✝³ : Zero α\ninst✝² : Zero β\ninst✝¹ : SMul α β\ninst✝ : NoZeroSMulDivisors α β\ns : Set α\nt : Set β\nh : s • t = 0\nhst : Set.Nonempty (s • t)\nH : (∃ a, a ∈ s ∧ ¬a = 0) ∧ ∃ a, a ∈ t ∧ ¬a = 0\n⊢ False\n[PROOFSTEP]\nobtain ⟨⟨a, hs, ha⟩, b, ht, hb⟩ := H\n[GOAL]\ncase intro.intro.intro.intro.intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ns✝ s₁ s₂ : Set α\nt✝ t₁ t₂ : Set β\na✝ : α\nb✝ : β\ninst✝³ : Zero α\ninst✝² : Zero β\ninst✝¹ : SMul α β\ninst✝ : NoZeroSMulDivisors α β\ns : Set α\nt : Set β\nh : s • t = 0\nhst : Set.Nonempty (s • t)\na : α\nhs : a ∈ s\nha : ¬a = 0\nb : β\nht : b ∈ t\nhb : ¬b = 0\n⊢ False\n[PROOFSTEP]\nexact (eq_zero_or_eq_zero_of_smul_eq_zero <| h.subset <| smul_mem_smul hs ht).elim ha hb\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ns✝ s₁ s₂ : Set α\nt t₁ t₂ : Set β\na✝ : α\nb : β\ninst✝³ : Zero α\ninst✝² : Zero β\ninst✝¹ : SMul α β\ninst✝ : NoZeroSMulDivisors α β\na : α\ns : Set β\nh : a • s = 0\n⊢ a = 0 ∨ s = 0\n[PROOFSTEP]\nby_contra' H\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ns✝ s₁ s₂ : Set α\nt t₁ t₂ : Set β\na✝ : α\nb : β\ninst✝³ : Zero α\ninst✝² : Zero β\ninst✝¹ : SMul α β\ninst✝ : NoZeroSMulDivisors α β\na : α\ns : Set β\nh : a • s = 0\nH : a ≠ 0 ∧ s ≠ 0\n⊢ False\n[PROOFSTEP]\nhave hst : (a • s).Nonempty := h.symm.subst zero_nonempty\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ns✝ s₁ s₂ : Set α\nt t₁ t₂ : Set β\na✝ : α\nb : β\ninst✝³ : Zero α\ninst✝² : Zero β\ninst✝¹ : SMul α β\ninst✝ : NoZeroSMulDivisors α β\na : α\ns : Set β\nh : a • s = 0\nH : a ≠ 0 ∧ s ≠ 0\nhst : Set.Nonempty (a • s)\n⊢ False\n[PROOFSTEP]\nrw [Ne.def, Ne.def, ← hst.of_image.subset_zero_iff, not_subset] at H \n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ns✝ s₁ s₂ : Set α\nt t₁ t₂ : Set β\na✝ : α\nb : β\ninst✝³ : Zero α\ninst✝² : Zero β\ninst✝¹ : SMul α β\ninst✝ : NoZeroSMulDivisors α β\na : α\ns : Set β\nh : a • s = 0\nH : ¬a = 0 ∧ ∃ a, a ∈ s ∧ ¬a ∈ 0\nhst : Set.Nonempty (a • s)\n⊢ False\n[PROOFSTEP]\nobtain ⟨ha, b, ht, hb⟩ := H\n[GOAL]\ncase intro.intro.intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ns✝ s₁ s₂ : Set α\nt t₁ t₂ : Set β\na✝ : α\nb✝ : β\ninst✝³ : Zero α\ninst✝² : Zero β\ninst✝¹ : SMul α β\ninst✝ : NoZeroSMulDivisors α β\na : α\ns : Set β\nh : a • s = 0\nhst : Set.Nonempty (a • s)\nha : ¬a = 0\nb : β\nht : b ∈ s\nhb : ¬b ∈ 0\n⊢ False\n[PROOFSTEP]\nexact (eq_zero_or_eq_zero_of_smul_eq_zero <| h.subset <| smul_mem_smul_set ht).elim ha hb\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝² : SMul αᵐᵒᵖ β\ninst✝¹ : SMul β γ\ninst✝ : SMul α γ\na : α\ns : Set β\nt : Set γ\nh : ∀ (a : α) (b : β) (c : γ), (op a • b) • c = b • a • c\n⊢ (op a • s) • t = s • a • t\n[PROOFSTEP]\next\n[GOAL]\ncase h\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝² : SMul αᵐᵒᵖ β\ninst✝¹ : SMul β γ\ninst✝ : SMul α γ\na : α\ns : Set β\nt : Set γ\nh : ∀ (a : α) (b : β) (c : γ), (op a • b) • c = b • a • c\nx✝ : γ\n⊢ x✝ ∈ (op a • s) • t ↔ x✝ ∈ s • a • t\n[PROOFSTEP]\nsimp [mem_smul, mem_smul_set, h]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝² : Zero α\ninst✝¹ : Zero β\ninst✝ : SMulWithZero α β\ns✝ : Set α\nt : Set β\ns : Set α\n⊢ s • 0 ⊆ 0\n[PROOFSTEP]\nsimp [subset_def, mem_smul]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝² : Zero α\ninst✝¹ : Zero β\ninst✝ : SMulWithZero α β\ns : Set α\nt✝ t : Set β\n⊢ 0 • t ⊆ 0\n[PROOFSTEP]\nsimp [subset_def, mem_smul]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝² : Zero α\ninst✝¹ : Zero β\ninst✝ : SMulWithZero α β\ns : Set α\nt : Set β\nhs : Set.Nonempty s\n⊢ 0 ⊆ s • 0\n[PROOFSTEP]\nsimpa [mem_smul] using hs\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝² : Zero α\ninst✝¹ : Zero β\ninst✝ : SMulWithZero α β\ns : Set α\nt : Set β\nht : Set.Nonempty t\n⊢ 0 ⊆ 0 • t\n[PROOFSTEP]\nsimpa [mem_smul] using ht\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝² : Zero α\ninst✝¹ : Zero β\ninst✝ : SMulWithZero α β\ns✝ : Set α\nt s : Set β\nh : Set.Nonempty s\n⊢ 0 • s = 0\n[PROOFSTEP]\nsimp only [← image_smul, image_eta, zero_smul, h.image_const, singleton_zero]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝³ : Zero α\ninst✝² : Zero β\ninst✝¹ : SMulWithZero α β\ns : Set α\nt : Set β\ninst✝ : NoZeroSMulDivisors α β\na : α\n⊢ 0 ∈ s • t ↔ 0 ∈ s ∧ Set.Nonempty t ∨ 0 ∈ t ∧ Set.Nonempty s\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝³ : Zero α\ninst✝² : Zero β\ninst✝¹ : SMulWithZero α β\ns : Set α\nt : Set β\ninst✝ : NoZeroSMulDivisors α β\na : α\n⊢ 0 ∈ s • t → 0 ∈ s ∧ Set.Nonempty t ∨ 0 ∈ t ∧ Set.Nonempty s\n[PROOFSTEP]\nrintro ⟨a, b, ha, hb, h⟩\n[GOAL]\ncase mp.intro.intro.intro.intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝³ : Zero α\ninst✝² : Zero β\ninst✝¹ : SMulWithZero α β\ns : Set α\nt : Set β\ninst✝ : NoZeroSMulDivisors α β\na✝ a : α\nb : β\nha : a ∈ s\nhb : b ∈ t\nh : (fun x x_1 => x • x_1) a b = 0\n⊢ 0 ∈ s ∧ Set.Nonempty t ∨ 0 ∈ t ∧ Set.Nonempty s\n[PROOFSTEP]\nobtain rfl | rfl := eq_zero_or_eq_zero_of_smul_eq_zero h\n[GOAL]\ncase mp.intro.intro.intro.intro.inl\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝³ : Zero α\ninst✝² : Zero β\ninst✝¹ : SMulWithZero α β\ns : Set α\nt : Set β\ninst✝ : NoZeroSMulDivisors α β\na : α\nb : β\nhb : b ∈ t\nha : 0 ∈ s\nh : (fun x x_1 => x • x_1) 0 b = 0\n⊢ 0 ∈ s ∧ Set.Nonempty t ∨ 0 ∈ t ∧ Set.Nonempty s\n[PROOFSTEP]\nexact Or.inl ⟨ha, b, hb⟩\n[GOAL]\ncase mp.intro.intro.intro.intro.inr\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝³ : Zero α\ninst✝² : Zero β\ninst✝¹ : SMulWithZero α β\ns : Set α\nt : Set β\ninst✝ : NoZeroSMulDivisors α β\na✝ a : α\nha : a ∈ s\nhb : 0 ∈ t\nh : (fun x x_1 => x • x_1) a 0 = 0\n⊢ 0 ∈ s ∧ Set.Nonempty t ∨ 0 ∈ t ∧ Set.Nonempty s\n[PROOFSTEP]\nexact Or.inr ⟨hb, a, ha⟩\n[GOAL]\ncase mpr\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝³ : Zero α\ninst✝² : Zero β\ninst✝¹ : SMulWithZero α β\ns : Set α\nt : Set β\ninst✝ : NoZeroSMulDivisors α β\na : α\n⊢ 0 ∈ s ∧ Set.Nonempty t ∨ 0 ∈ t ∧ Set.Nonempty s → 0 ∈ s • t\n[PROOFSTEP]\nrintro (⟨hs, b, hb⟩ | ⟨ht, a, ha⟩)\n[GOAL]\ncase mpr.inl.intro.intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝³ : Zero α\ninst✝² : Zero β\ninst✝¹ : SMulWithZero α β\ns : Set α\nt : Set β\ninst✝ : NoZeroSMulDivisors α β\na : α\nhs : 0 ∈ s\nb : β\nhb : b ∈ t\n⊢ 0 ∈ s • t\n[PROOFSTEP]\nexact ⟨0, b, hs, hb, zero_smul _ _⟩\n[GOAL]\ncase mpr.inr.intro.intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝³ : Zero α\ninst✝² : Zero β\ninst✝¹ : SMulWithZero α β\ns : Set α\nt : Set β\ninst✝ : NoZeroSMulDivisors α β\na✝ : α\nht : 0 ∈ t\na : α\nha : a ∈ s\n⊢ 0 ∈ s • t\n[PROOFSTEP]\nexact ⟨a, 0, ha, ht, smul_zero _⟩\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝³ : Zero α\ninst✝² : Zero β\ninst✝¹ : SMulWithZero α β\ns : Set α\nt : Set β\ninst✝ : NoZeroSMulDivisors α β\na : α\nha : a ≠ 0\n⊢ 0 ∈ a • t ↔ 0 ∈ t\n[PROOFSTEP]\nrefine' ⟨_, zero_mem_smul_set⟩\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝³ : Zero α\ninst✝² : Zero β\ninst✝¹ : SMulWithZero α β\ns : Set α\nt : Set β\ninst✝ : NoZeroSMulDivisors α β\na : α\nha : a ≠ 0\n⊢ 0 ∈ a • t → 0 ∈ t\n[PROOFSTEP]\nrintro ⟨b, hb, h⟩\n[GOAL]\ncase intro.intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝³ : Zero α\ninst✝² : Zero β\ninst✝¹ : SMulWithZero α β\ns : Set α\nt : Set β\ninst✝ : NoZeroSMulDivisors α β\na : α\nha : a ≠ 0\nb : β\nhb : b ∈ t\nh : (fun x => a • x) b = 0\n⊢ 0 ∈ t\n[PROOFSTEP]\nrwa [(eq_zero_or_eq_zero_of_smul_eq_zero h).resolve_left ha] at hb \n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝¹ : Group α\ninst✝ : MulAction α β\ns t A B : Set β\na : α\nx : β\n⊢ x ∈ a⁻¹ • A ↔ a • x ∈ A\n[PROOFSTEP]\nsimp only [← image_smul, mem_image, inv_smul_eq_iff, exists_eq_right]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝¹ : Group α\ninst✝ : MulAction α β\ns✝ t✝ A B : Set β\na : α\nx✝ : β\ns t : Set α\nx : α\n⊢ x • s ∩ t ≠ ∅ ↔ ∃ a b, (a ∈ t ∧ b ∈ s) ∧ a * b⁻¹ = x\n[PROOFSTEP]\nrw [← nonempty_iff_ne_empty]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝¹ : Group α\ninst✝ : MulAction α β\ns✝ t✝ A B : Set β\na : α\nx✝ : β\ns t : Set α\nx : α\n⊢ Set.Nonempty (x • s ∩ t) ↔ ∃ a b, (a ∈ t ∧ b ∈ s) ∧ a * b⁻¹ = x\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝¹ : Group α\ninst✝ : MulAction α β\ns✝ t✝ A B : Set β\na : α\nx✝ : β\ns t : Set α\nx : α\n⊢ Set.Nonempty (x • s ∩ t) → ∃ a b, (a ∈ t ∧ b ∈ s) ∧ a * b⁻¹ = x\n[PROOFSTEP]\nrintro ⟨a, h, ha⟩\n[GOAL]\ncase mp.intro.intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝¹ : Group α\ninst✝ : MulAction α β\ns✝ t✝ A B : Set β\na✝ : α\nx✝ : β\ns t : Set α\nx a : α\nh : a ∈ x • s\nha : a ∈ t\n⊢ ∃ a b, (a ∈ t ∧ b ∈ s) ∧ a * b⁻¹ = x\n[PROOFSTEP]\nobtain ⟨b, hb, rfl⟩ := mem_smul_set.mp h\n[GOAL]\ncase mp.intro.intro.intro.intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝¹ : Group α\ninst✝ : MulAction α β\ns✝ t✝ A B : Set β\na : α\nx✝ : β\ns t : Set α\nx b : α\nhb : b ∈ s\nh : x • b ∈ x • s\nha : x • b ∈ t\n⊢ ∃ a b, (a ∈ t ∧ b ∈ s) ∧ a * b⁻¹ = x\n[PROOFSTEP]\nexact ⟨x • b, b, ⟨ha, hb⟩, by simp⟩\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝¹ : Group α\ninst✝ : MulAction α β\ns✝ t✝ A B : Set β\na : α\nx✝ : β\ns t : Set α\nx b : α\nhb : b ∈ s\nh : x • b ∈ x • s\nha : x • b ∈ t\n⊢ x • b * b⁻¹ = x\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mpr\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝¹ : Group α\ninst✝ : MulAction α β\ns✝ t✝ A B : Set β\na : α\nx✝ : β\ns t : Set α\nx : α\n⊢ (∃ a b, (a ∈ t ∧ b ∈ s) ∧ a * b⁻¹ = x) → Set.Nonempty (x • s ∩ t)\n[PROOFSTEP]\nrintro ⟨a, b, ⟨ha, hb⟩, rfl⟩\n[GOAL]\ncase mpr.intro.intro.intro.intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝¹ : Group α\ninst✝ : MulAction α β\ns✝ t✝ A B : Set β\na✝ : α\nx : β\ns t : Set α\na b : α\nha : a ∈ t\nhb : b ∈ s\n⊢ Set.Nonempty ((a * b⁻¹) • s ∩ t)\n[PROOFSTEP]\nexact ⟨a, mem_inter (mem_smul_set.mpr ⟨b, hb, by simp⟩) ha⟩\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝¹ : Group α\ninst✝ : MulAction α β\ns✝ t✝ A B : Set β\na✝ : α\nx : β\ns t : Set α\na b : α\nha : a ∈ t\nhb : b ∈ s\n⊢ (a * b⁻¹) • b = a\n[PROOFSTEP]\nsimp\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝¹ : Group α\ninst✝ : MulAction α β\ns✝ t✝ A B : Set β\na : α\nx✝ : β\ns t : Set α\nx : α\n⊢ x • s ∩ t ≠ ∅ ↔ ∃ a b, (a ∈ t ∧ b ∈ s) ∧ a / b = x\n[PROOFSTEP]\nsimp_rw [smul_inter_ne_empty_iff, div_eq_mul_inv]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝¹ : Group α\ninst✝ : MulAction α β\ns✝ t✝ A B : Set β\na : α\nx✝ : β\ns t : Set α\nx : αᵐᵒᵖ\n⊢ x • s ∩ t ≠ ∅ ↔ ∃ a b, (a ∈ s ∧ b ∈ t) ∧ a⁻¹ * b = unop x\n[PROOFSTEP]\nrw [← nonempty_iff_ne_empty]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝¹ : Group α\ninst✝ : MulAction α β\ns✝ t✝ A B : Set β\na : α\nx✝ : β\ns t : Set α\nx : αᵐᵒᵖ\n⊢ Set.Nonempty (x • s ∩ t) ↔ ∃ a b, (a ∈ s ∧ b ∈ t) ∧ a⁻¹ * b = unop x\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝¹ : Group α\ninst✝ : MulAction α β\ns✝ t✝ A B : Set β\na : α\nx✝ : β\ns t : Set α\nx : αᵐᵒᵖ\n⊢ Set.Nonempty (x • s ∩ t) → ∃ a b, (a ∈ s ∧ b ∈ t) ∧ a⁻¹ * b = unop x\n[PROOFSTEP]\nrintro ⟨a, h, ha⟩\n[GOAL]\ncase mp.intro.intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝¹ : Group α\ninst✝ : MulAction α β\ns✝ t✝ A B : Set β\na✝ : α\nx✝ : β\ns t : Set α\nx : αᵐᵒᵖ\na : α\nh : a ∈ x • s\nha : a ∈ t\n⊢ ∃ a b, (a ∈ s ∧ b ∈ t) ∧ a⁻¹ * b = unop x\n[PROOFSTEP]\nobtain ⟨b, hb, rfl⟩ := mem_smul_set.mp h\n[GOAL]\ncase mp.intro.intro.intro.intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝¹ : Group α\ninst✝ : MulAction α β\ns✝ t✝ A B : Set β\na : α\nx✝ : β\ns t : Set α\nx : αᵐᵒᵖ\nb : α\nhb : b ∈ s\nh : x • b ∈ x • s\nha : x • b ∈ t\n⊢ ∃ a b, (a ∈ s ∧ b ∈ t) ∧ a⁻¹ * b = unop x\n[PROOFSTEP]\nexact ⟨b, x • b, ⟨hb, ha⟩, by simp⟩\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝¹ : Group α\ninst✝ : MulAction α β\ns✝ t✝ A B : Set β\na : α\nx✝ : β\ns t : Set α\nx : αᵐᵒᵖ\nb : α\nhb : b ∈ s\nh : x • b ∈ x • s\nha : x • b ∈ t\n⊢ b⁻¹ * x • b = unop x\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mpr\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝¹ : Group α\ninst✝ : MulAction α β\ns✝ t✝ A B : Set β\na : α\nx✝ : β\ns t : Set α\nx : αᵐᵒᵖ\n⊢ (∃ a b, (a ∈ s ∧ b ∈ t) ∧ a⁻¹ * b = unop x) → Set.Nonempty (x • s ∩ t)\n[PROOFSTEP]\nrintro ⟨a, b, ⟨ha, hb⟩, H⟩\n[GOAL]\ncase mpr.intro.intro.intro.intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝¹ : Group α\ninst✝ : MulAction α β\ns✝ t✝ A B : Set β\na✝ : α\nx✝ : β\ns t : Set α\nx : αᵐᵒᵖ\na b : α\nH : a⁻¹ * b = unop x\nha : a ∈ s\nhb : b ∈ t\n⊢ Set.Nonempty (x • s ∩ t)\n[PROOFSTEP]\nhave : MulOpposite.op (a⁻¹ * b) = x := congr_arg MulOpposite.op H\n[GOAL]\ncase mpr.intro.intro.intro.intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝¹ : Group α\ninst✝ : MulAction α β\ns✝ t✝ A B : Set β\na✝ : α\nx✝ : β\ns t : Set α\nx : αᵐᵒᵖ\na b : α\nH : a⁻¹ * b = unop x\nha : a ∈ s\nhb : b ∈ t\nthis : op (a⁻¹ * b) = x\n⊢ Set.Nonempty (x • s ∩ t)\n[PROOFSTEP]\nexact ⟨b, mem_inter (mem_smul_set.mpr ⟨a, ha, by simp [← this]⟩) hb⟩\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝¹ : Group α\ninst✝ : MulAction α β\ns✝ t✝ A B : Set β\na✝ : α\nx✝ : β\ns t : Set α\nx : αᵐᵒᵖ\na b : α\nH : a⁻¹ * b = unop x\nha : a ∈ s\nhb : b ∈ t\nthis : op (a⁻¹ * b) = x\n⊢ x • a = b\n[PROOFSTEP]\nsimp [← this]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝¹ : Group α\ninst✝ : MulAction α β\ns✝ t A B : Set β\na : α\nx : β\ns : Set β\n⊢ ⋃ (g : α), g • s = {a | ∃ g, g • a ∈ s}\n[PROOFSTEP]\nsimp_rw [← iUnion_setOf, ← iUnion_inv_smul, ← preimage_smul, preimage]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝² : Monoid α\ninst✝¹ : AddGroup β\ninst✝ : DistribMulAction α β\na : α\ns : Set α\nt : Set β\n⊢ a • -t = -(a • t)\n[PROOFSTEP]\nsimp_rw [← image_smul, ← image_neg, image_image, smul_neg]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝² : Monoid α\ninst✝¹ : AddGroup β\ninst✝ : DistribMulAction α β\na : α\ns : Set α\nt : Set β\n⊢ s • -t = -(s • t)\n[PROOFSTEP]\nsimp_rw [← image_neg]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝² : Monoid α\ninst✝¹ : AddGroup β\ninst✝ : DistribMulAction α β\na : α\ns : Set α\nt : Set β\n⊢ s • Neg.neg '' t = Neg.neg '' (s • t)\n[PROOFSTEP]\nexact image_image2_right_comm smul_neg\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝² : Semiring α\ninst✝¹ : AddCommMonoid β\ninst✝ : Module α β\na b : α\ns : Set β\n⊢ (a + b) • s ⊆ a • s + b • s\n[PROOFSTEP]\nrintro _ ⟨x, hx, rfl⟩\n[GOAL]\ncase intro.intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝² : Semiring α\ninst✝¹ : AddCommMonoid β\ninst✝ : Module α β\na b : α\ns : Set β\nx : β\nhx : x ∈ s\n⊢ (fun x => (a + b) • x) x ∈ a • s + b • s\n[PROOFSTEP]\nsimpa only [add_smul] using add_mem_add (smul_mem_smul_set hx) (smul_mem_smul_set hx)\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝² : Ring α\ninst✝¹ : AddCommGroup β\ninst✝ : Module α β\na : α\ns : Set α\nt : Set β\n⊢ -a • t = -(a • t)\n[PROOFSTEP]\nsimp_rw [← image_smul, ← image_neg, image_image, neg_smul]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝² : Ring α\ninst✝¹ : AddCommGroup β\ninst✝ : Module α β\na : α\ns : Set α\nt : Set β\n⊢ -s • t = -(s • t)\n[PROOFSTEP]\nsimp_rw [← image_neg]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝² : Ring α\ninst✝¹ : AddCommGroup β\ninst✝ : Module α β\na : α\ns : Set α\nt : Set β\n⊢ Neg.neg '' s • t = Neg.neg '' (s • t)\n[PROOFSTEP]\nexact image2_image_left_comm neg_smul\n", "meta": {"mathlib_filename": "Mathlib.Data.Set.Pointwise.SMul", "llama_tokens": 10974, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7981867729389246, "lm_q2_score": 0.6757646010190476, "lm_q1q2_score": 0.5393863661537535}}
{"text": "[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nG : C ⥤ D\nX Y : C\nf g : X ⟶ Y\nZ : C\nπ : Y ⟶ Z\nq : IsSplitCoequalizer f g π\nF : C ⥤ D\n⊢ F.map f ≫ F.map π = F.map g ≫ F.map π\n[PROOFSTEP]\nrw [← F.map_comp, q.condition, F.map_comp]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nG : C ⥤ D\nX Y : C\nf g : X ⟶ Y\nZ : C\nπ : Y ⟶ Z\nq : IsSplitCoequalizer f g π\nF : C ⥤ D\n⊢ F.map q.rightSection ≫ F.map π = 𝟙 (F.obj Z)\n[PROOFSTEP]\nrw [← F.map_comp, q.rightSection_π, F.map_id]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nG : C ⥤ D\nX Y : C\nf g : X ⟶ Y\nZ : C\nπ : Y ⟶ Z\nq : IsSplitCoequalizer f g π\nF : C ⥤ D\n⊢ F.map q.leftSection ≫ F.map g = 𝟙 (F.obj Y)\n[PROOFSTEP]\nrw [← F.map_comp, q.leftSection_bottom, F.map_id]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nG : C ⥤ D\nX Y : C\nf g : X ⟶ Y\nZ : C\nπ : Y ⟶ Z\nq : IsSplitCoequalizer f g π\nF : C ⥤ D\n⊢ F.map q.leftSection ≫ F.map f = F.map π ≫ F.map q.rightSection\n[PROOFSTEP]\nrw [← F.map_comp, q.leftSection_top, F.map_comp]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nG : C ⥤ D\nX Y : C\nf g : X ⟶ Y\nZ : C\nh : Y ⟶ Z\nt : IsSplitCoequalizer f g h\ns : Cofork f g\n⊢ Cofork.π (asCofork t) ≫ t.rightSection ≫ Cofork.π s = Cofork.π s\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nG : C ⥤ D\nX Y : C\nf g : X ⟶ Y\nZ : C\nh : Y ⟶ Z\nt : IsSplitCoequalizer f g h\ns : Cofork f g\n⊢ h ≫ t.rightSection ≫ Cofork.π s = Cofork.π s\n[PROOFSTEP]\nrw [← t.leftSection_top_assoc, s.condition, t.leftSection_bottom_assoc]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nG : C ⥤ D\nX Y : C\nf g : X ⟶ Y\nZ : C\nh : Y ⟶ Z\nt : IsSplitCoequalizer f g h\ns : Cofork f g\nm✝ :\n  ((Functor.const WalkingParallelPair).obj (asCofork t).pt).obj WalkingParallelPair.one ⟶\n    ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.one\nhm : Cofork.π (asCofork t) ≫ m✝ = Cofork.π s\n⊢ m✝ = t.rightSection ≫ Cofork.π s\n[PROOFSTEP]\nsimp [← hm]\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Limits.Shapes.SplitCoequalizer", "llama_tokens": 1134, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7981867777396212, "lm_q2_score": 0.6757645879592641, "lm_q1q2_score": 0.5393863589737479}}
{"text": "[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : Preorder α\ninst✝ : LocallyFiniteOrder α\na a₁ a₂ b b₁ b₂ c x : α\n⊢ Finset.Nonempty (Icc a b) ↔ a ≤ b\n[PROOFSTEP]\nrw [← coe_nonempty, coe_Icc, Set.nonempty_Icc]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : Preorder α\ninst✝ : LocallyFiniteOrder α\na a₁ a₂ b b₁ b₂ c x : α\n⊢ Finset.Nonempty (Ico a b) ↔ a < b\n[PROOFSTEP]\nrw [← coe_nonempty, coe_Ico, Set.nonempty_Ico]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : Preorder α\ninst✝ : LocallyFiniteOrder α\na a₁ a₂ b b₁ b₂ c x : α\n⊢ Finset.Nonempty (Ioc a b) ↔ a < b\n[PROOFSTEP]\nrw [← coe_nonempty, coe_Ioc, Set.nonempty_Ioc]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝² : Preorder α\ninst✝¹ : LocallyFiniteOrder α\na a₁ a₂ b b₁ b₂ c x : α\ninst✝ : DenselyOrdered α\n⊢ Finset.Nonempty (Ioo a b) ↔ a < b\n[PROOFSTEP]\nrw [← coe_nonempty, coe_Ioo, Set.nonempty_Ioo]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : Preorder α\ninst✝ : LocallyFiniteOrder α\na a₁ a₂ b b₁ b₂ c x : α\n⊢ Icc a b = ∅ ↔ ¬a ≤ b\n[PROOFSTEP]\nrw [← coe_eq_empty, coe_Icc, Set.Icc_eq_empty_iff]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : Preorder α\ninst✝ : LocallyFiniteOrder α\na a₁ a₂ b b₁ b₂ c x : α\n⊢ Ico a b = ∅ ↔ ¬a < b\n[PROOFSTEP]\nrw [← coe_eq_empty, coe_Ico, Set.Ico_eq_empty_iff]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : Preorder α\ninst✝ : LocallyFiniteOrder α\na a₁ a₂ b b₁ b₂ c x : α\n⊢ Ioc a b = ∅ ↔ ¬a < b\n[PROOFSTEP]\nrw [← coe_eq_empty, coe_Ioc, Set.Ioc_eq_empty_iff]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝² : Preorder α\ninst✝¹ : LocallyFiniteOrder α\na a₁ a₂ b b₁ b₂ c x : α\ninst✝ : DenselyOrdered α\n⊢ Ioo a b = ∅ ↔ ¬a < b\n[PROOFSTEP]\nrw [← coe_eq_empty, coe_Ioo, Set.Ioo_eq_empty_iff]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : Preorder α\ninst✝ : LocallyFiniteOrder α\na a₁ a₂ b b₁ b₂ c x : α\n⊢ a ∈ Icc a b ↔ a ≤ b\n[PROOFSTEP]\nsimp only [mem_Icc, true_and_iff, le_rfl]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : Preorder α\ninst✝ : LocallyFiniteOrder α\na a₁ a₂ b b₁ b₂ c x : α\n⊢ a ∈ Ico a b ↔ a < b\n[PROOFSTEP]\nsimp only [mem_Ico, true_and_iff, le_refl]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : Preorder α\ninst✝ : LocallyFiniteOrder α\na a₁ a₂ b b₁ b₂ c x : α\n⊢ b ∈ Icc a b ↔ a ≤ b\n[PROOFSTEP]\nsimp only [mem_Icc, and_true_iff, le_rfl]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : Preorder α\ninst✝ : LocallyFiniteOrder α\na a₁ a₂ b b₁ b₂ c x : α\n⊢ b ∈ Ioc a b ↔ a < b\n[PROOFSTEP]\nsimp only [mem_Ioc, and_true_iff, le_rfl]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : Preorder α\ninst✝ : LocallyFiniteOrder α\na a₁ a₂ b b₁ b₂ c x : α\nha : a₂ ≤ a₁\nhb : b₁ ≤ b₂\n⊢ Icc a₁ b₁ ⊆ Icc a₂ b₂\n[PROOFSTEP]\nsimpa [← coe_subset] using Set.Icc_subset_Icc ha hb\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : Preorder α\ninst✝ : LocallyFiniteOrder α\na a₁ a₂ b b₁ b₂ c x : α\nha : a₂ ≤ a₁\nhb : b₁ ≤ b₂\n⊢ Ico a₁ b₁ ⊆ Ico a₂ b₂\n[PROOFSTEP]\nsimpa [← coe_subset] using Set.Ico_subset_Ico ha hb\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : Preorder α\ninst✝ : LocallyFiniteOrder α\na a₁ a₂ b b₁ b₂ c x : α\nha : a₂ ≤ a₁\nhb : b₁ ≤ b₂\n⊢ Ioc a₁ b₁ ⊆ Ioc a₂ b₂\n[PROOFSTEP]\nsimpa [← coe_subset] using Set.Ioc_subset_Ioc ha hb\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : Preorder α\ninst✝ : LocallyFiniteOrder α\na a₁ a₂ b b₁ b₂ c x : α\nha : a₂ ≤ a₁\nhb : b₁ ≤ b₂\n⊢ Ioo a₁ b₁ ⊆ Ioo a₂ b₂\n[PROOFSTEP]\nsimpa [← coe_subset] using Set.Ioo_subset_Ioo ha hb\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : Preorder α\ninst✝ : LocallyFiniteOrder α\na a₁ a₂ b b₁ b₂ c x : α\nh : a₁ < a₂\n⊢ Ico a₂ b ⊆ Ioo a₁ b\n[PROOFSTEP]\nrw [← coe_subset, coe_Ico, coe_Ioo]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : Preorder α\ninst✝ : LocallyFiniteOrder α\na a₁ a₂ b b₁ b₂ c x : α\nh : a₁ < a₂\n⊢ Set.Ico a₂ b ⊆ Set.Ioo a₁ b\n[PROOFSTEP]\nexact Set.Ico_subset_Ioo_left h\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : Preorder α\ninst✝ : LocallyFiniteOrder α\na a₁ a₂ b b₁ b₂ c x : α\nh : b₁ < b₂\n⊢ Ioc a b₁ ⊆ Ioo a b₂\n[PROOFSTEP]\nrw [← coe_subset, coe_Ioc, coe_Ioo]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : Preorder α\ninst✝ : LocallyFiniteOrder α\na a₁ a₂ b b₁ b₂ c x : α\nh : b₁ < b₂\n⊢ Set.Ioc a b₁ ⊆ Set.Ioo a b₂\n[PROOFSTEP]\nexact Set.Ioc_subset_Ioo_right h\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : Preorder α\ninst✝ : LocallyFiniteOrder α\na a₁ a₂ b b₁ b₂ c x : α\nh : b₁ < b₂\n⊢ Icc a b₁ ⊆ Ico a b₂\n[PROOFSTEP]\nrw [← coe_subset, coe_Icc, coe_Ico]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : Preorder α\ninst✝ : LocallyFiniteOrder α\na a₁ a₂ b b₁ b₂ c x : α\nh : b₁ < b₂\n⊢ Set.Icc a b₁ ⊆ Set.Ico a b₂\n[PROOFSTEP]\nexact Set.Icc_subset_Ico_right h\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : Preorder α\ninst✝ : LocallyFiniteOrder α\na a₁ a₂ b b₁ b₂ c x : α\n⊢ Ioo a b ⊆ Ico a b\n[PROOFSTEP]\nrw [← coe_subset, coe_Ioo, coe_Ico]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : Preorder α\ninst✝ : LocallyFiniteOrder α\na a₁ a₂ b b₁ b₂ c x : α\n⊢ Set.Ioo a b ⊆ Set.Ico a b\n[PROOFSTEP]\nexact Set.Ioo_subset_Ico_self\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : Preorder α\ninst✝ : LocallyFiniteOrder α\na a₁ a₂ b b₁ b₂ c x : α\n⊢ Ioo a b ⊆ Ioc a b\n[PROOFSTEP]\nrw [← coe_subset, coe_Ioo, coe_Ioc]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : Preorder α\ninst✝ : LocallyFiniteOrder α\na a₁ a₂ b b₁ b₂ c x : α\n⊢ Set.Ioo a b ⊆ Set.Ioc a b\n[PROOFSTEP]\nexact Set.Ioo_subset_Ioc_self\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : Preorder α\ninst✝ : LocallyFiniteOrder α\na a₁ a₂ b b₁ b₂ c x : α\n⊢ Ico a b ⊆ Icc a b\n[PROOFSTEP]\nrw [← coe_subset, coe_Ico, coe_Icc]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : Preorder α\ninst✝ : LocallyFiniteOrder α\na a₁ a₂ b b₁ b₂ c x : α\n⊢ Set.Ico a b ⊆ Set.Icc a b\n[PROOFSTEP]\nexact Set.Ico_subset_Icc_self\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : Preorder α\ninst✝ : LocallyFiniteOrder α\na a₁ a₂ b b₁ b₂ c x : α\n⊢ Ioc a b ⊆ Icc a b\n[PROOFSTEP]\nrw [← coe_subset, coe_Ioc, coe_Icc]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : Preorder α\ninst✝ : LocallyFiniteOrder α\na a₁ a₂ b b₁ b₂ c x : α\n⊢ Set.Ioc a b ⊆ Set.Icc a b\n[PROOFSTEP]\nexact Set.Ioc_subset_Icc_self\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : Preorder α\ninst✝ : LocallyFiniteOrder α\na a₁ a₂ b b₁ b₂ c x : α\nh₁ : a₁ ≤ b₁\n⊢ Icc a₁ b₁ ⊆ Icc a₂ b₂ ↔ a₂ ≤ a₁ ∧ b₁ ≤ b₂\n[PROOFSTEP]\nrw [← coe_subset, coe_Icc, coe_Icc, Set.Icc_subset_Icc_iff h₁]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : Preorder α\ninst✝ : LocallyFiniteOrder α\na a₁ a₂ b b₁ b₂ c x : α\nh₁ : a₁ ≤ b₁\n⊢ Icc a₁ b₁ ⊆ Ioo a₂ b₂ ↔ a₂ < a₁ ∧ b₁ < b₂\n[PROOFSTEP]\nrw [← coe_subset, coe_Icc, coe_Ioo, Set.Icc_subset_Ioo_iff h₁]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : Preorder α\ninst✝ : LocallyFiniteOrder α\na a₁ a₂ b b₁ b₂ c x : α\nh₁ : a₁ ≤ b₁\n⊢ Icc a₁ b₁ ⊆ Ico a₂ b₂ ↔ a₂ ≤ a₁ ∧ b₁ < b₂\n[PROOFSTEP]\nrw [← coe_subset, coe_Icc, coe_Ico, Set.Icc_subset_Ico_iff h₁]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : Preorder α\ninst✝ : LocallyFiniteOrder α\na a₁ a₂ b b₁ b₂ c x : α\nhI : a₂ ≤ b₂\nha : a₂ < a₁\nhb : b₁ ≤ b₂\n⊢ Icc a₁ b₁ ⊂ Icc a₂ b₂\n[PROOFSTEP]\nrw [← coe_ssubset, coe_Icc, coe_Icc]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : Preorder α\ninst✝ : LocallyFiniteOrder α\na a₁ a₂ b b₁ b₂ c x : α\nhI : a₂ ≤ b₂\nha : a₂ < a₁\nhb : b₁ ≤ b₂\n⊢ Set.Icc a₁ b₁ ⊂ Set.Icc a₂ b₂\n[PROOFSTEP]\nexact Set.Icc_ssubset_Icc_left hI ha hb\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : Preorder α\ninst✝ : LocallyFiniteOrder α\na a₁ a₂ b b₁ b₂ c x : α\nhI : a₂ ≤ b₂\nha : a₂ ≤ a₁\nhb : b₁ < b₂\n⊢ Icc a₁ b₁ ⊂ Icc a₂ b₂\n[PROOFSTEP]\nrw [← coe_ssubset, coe_Icc, coe_Icc]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : Preorder α\ninst✝ : LocallyFiniteOrder α\na a₁ a₂ b b₁ b₂ c x : α\nhI : a₂ ≤ b₂\nha : a₂ ≤ a₁\nhb : b₁ < b₂\n⊢ Set.Icc a₁ b₁ ⊂ Set.Icc a₂ b₂\n[PROOFSTEP]\nexact Set.Icc_ssubset_Icc_right hI ha hb\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : Preorder α\ninst✝ : LocallyFiniteOrder α\na a₁ a₂ b b₁ b₂ c x : α\ns : Set α\nh₀ : BddBelow s\nh₁ : BddAbove s\n⊢ Set.Finite s\n[PROOFSTEP]\nlet ⟨a, ha⟩ := h₀\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : Preorder α\ninst✝ : LocallyFiniteOrder α\na✝ a₁ a₂ b b₁ b₂ c x : α\ns : Set α\nh₀ : BddBelow s\nh₁ : BddAbove s\na : α\nha : a ∈ lowerBounds s\n⊢ Set.Finite s\n[PROOFSTEP]\nlet ⟨b, hb⟩ := h₁\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : Preorder α\ninst✝ : LocallyFiniteOrder α\na✝ a₁ a₂ b✝ b₁ b₂ c x : α\ns : Set α\nh₀ : BddBelow s\nh₁ : BddAbove s\na : α\nha : a ∈ lowerBounds s\nb : α\nhb : b ∈ upperBounds s\n⊢ Set.Finite s\n[PROOFSTEP]\nclassical exact ⟨Set.fintypeOfMemBounds ha hb⟩\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : Preorder α\ninst✝ : LocallyFiniteOrder α\na✝ a₁ a₂ b✝ b₁ b₂ c x : α\ns : Set α\nh₀ : BddBelow s\nh₁ : BddAbove s\na : α\nha : a ∈ lowerBounds s\nb : α\nhb : b ∈ upperBounds s\n⊢ Set.Finite s\n[PROOFSTEP]\nexact ⟨Set.fintypeOfMemBounds ha hb⟩\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝² : Preorder α\ninst✝¹ : LocallyFiniteOrder α\na a₁ a₂ b b₁ b₂ c x : α\ninst✝ : DecidablePred fun x => x < c\nhcb : c ≤ b\n⊢ filter (fun x => x < c) (Ico a b) = Ico a c\n[PROOFSTEP]\next x\n[GOAL]\ncase a\nι : Type u_1\nα : Type u_2\ninst✝² : Preorder α\ninst✝¹ : LocallyFiniteOrder α\na a₁ a₂ b b₁ b₂ c x✝ : α\ninst✝ : DecidablePred fun x => x < c\nhcb : c ≤ b\nx : α\n⊢ x ∈ filter (fun x => x < c) (Ico a b) ↔ x ∈ Ico a c\n[PROOFSTEP]\nrw [mem_filter, mem_Ico, mem_Ico, and_right_comm]\n[GOAL]\ncase a\nι : Type u_1\nα : Type u_2\ninst✝² : Preorder α\ninst✝¹ : LocallyFiniteOrder α\na a₁ a₂ b b₁ b₂ c x✝ : α\ninst✝ : DecidablePred fun x => x < c\nhcb : c ≤ b\nx : α\n⊢ (a ≤ x ∧ x < c) ∧ x < b ↔ a ≤ x ∧ x < c\n[PROOFSTEP]\nexact and_iff_left_of_imp fun h => h.2.trans_le hcb\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝² : Preorder α\ninst✝¹ : LocallyFiniteOrder α\na✝ a₁ a₂ b✝ b₁ b₂ c✝ x a b c : α\ninst✝ : DecidablePred ((fun x x_1 => x ≤ x_1) c)\nhac : a ≤ c\n⊢ filter ((fun x x_1 => x ≤ x_1) c) (Ico a b) = Ico c b\n[PROOFSTEP]\next x\n[GOAL]\ncase a\nι : Type u_1\nα : Type u_2\ninst✝² : Preorder α\ninst✝¹ : LocallyFiniteOrder α\na✝ a₁ a₂ b✝ b₁ b₂ c✝ x✝ a b c : α\ninst✝ : DecidablePred ((fun x x_1 => x ≤ x_1) c)\nhac : a ≤ c\nx : α\n⊢ x ∈ filter ((fun x x_1 => x ≤ x_1) c) (Ico a b) ↔ x ∈ Ico c b\n[PROOFSTEP]\nrw [mem_filter, mem_Ico, mem_Ico, and_comm, and_left_comm]\n[GOAL]\ncase a\nι : Type u_1\nα : Type u_2\ninst✝² : Preorder α\ninst✝¹ : LocallyFiniteOrder α\na✝ a₁ a₂ b✝ b₁ b₂ c✝ x✝ a b c : α\ninst✝ : DecidablePred ((fun x x_1 => x ≤ x_1) c)\nhac : a ≤ c\nx : α\n⊢ a ≤ x ∧ (fun x x_1 => x ≤ x_1) c x ∧ x < b ↔ c ≤ x ∧ x < b\n[PROOFSTEP]\nexact and_iff_right_of_imp fun h => hac.trans h.1\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝³ : Preorder α\ninst✝² : LocallyFiniteOrder α\na a₁ a₂ b b₁ b₂ c x : α\ninst✝¹ : Fintype α\ninst✝ : DecidablePred fun j => a < j ∧ j < b\n⊢ filter (fun j => a < j ∧ j < b) univ = Ioo a b\n[PROOFSTEP]\next\n[GOAL]\ncase a\nι : Type u_1\nα : Type u_2\ninst✝³ : Preorder α\ninst✝² : LocallyFiniteOrder α\na a₁ a₂ b b₁ b₂ c x : α\ninst✝¹ : Fintype α\ninst✝ : DecidablePred fun j => a < j ∧ j < b\na✝ : α\n⊢ a✝ ∈ filter (fun j => a < j ∧ j < b) univ ↔ a✝ ∈ Ioo a b\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝³ : Preorder α\ninst✝² : LocallyFiniteOrder α\na a₁ a₂ b b₁ b₂ c x : α\ninst✝¹ : Fintype α\ninst✝ : DecidablePred fun j => a < j ∧ j ≤ b\n⊢ filter (fun j => a < j ∧ j ≤ b) univ = Ioc a b\n[PROOFSTEP]\next\n[GOAL]\ncase a\nι : Type u_1\nα : Type u_2\ninst✝³ : Preorder α\ninst✝² : LocallyFiniteOrder α\na a₁ a₂ b b₁ b₂ c x : α\ninst✝¹ : Fintype α\ninst✝ : DecidablePred fun j => a < j ∧ j ≤ b\na✝ : α\n⊢ a✝ ∈ filter (fun j => a < j ∧ j ≤ b) univ ↔ a✝ ∈ Ioc a b\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝³ : Preorder α\ninst✝² : LocallyFiniteOrder α\na a₁ a₂ b b₁ b₂ c x : α\ninst✝¹ : Fintype α\ninst✝ : DecidablePred fun j => a ≤ j ∧ j < b\n⊢ filter (fun j => a ≤ j ∧ j < b) univ = Ico a b\n[PROOFSTEP]\next\n[GOAL]\ncase a\nι : Type u_1\nα : Type u_2\ninst✝³ : Preorder α\ninst✝² : LocallyFiniteOrder α\na a₁ a₂ b b₁ b₂ c x : α\ninst✝¹ : Fintype α\ninst✝ : DecidablePred fun j => a ≤ j ∧ j < b\na✝ : α\n⊢ a✝ ∈ filter (fun j => a ≤ j ∧ j < b) univ ↔ a✝ ∈ Ico a b\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝³ : Preorder α\ninst✝² : LocallyFiniteOrder α\na a₁ a₂ b b₁ b₂ c x : α\ninst✝¹ : Fintype α\ninst✝ : DecidablePred fun j => a ≤ j ∧ j ≤ b\n⊢ filter (fun j => a ≤ j ∧ j ≤ b) univ = Icc a b\n[PROOFSTEP]\next\n[GOAL]\ncase a\nι : Type u_1\nα : Type u_2\ninst✝³ : Preorder α\ninst✝² : LocallyFiniteOrder α\na a₁ a₂ b b₁ b₂ c x : α\ninst✝¹ : Fintype α\ninst✝ : DecidablePred fun j => a ≤ j ∧ j ≤ b\na✝ : α\n⊢ a✝ ∈ filter (fun j => a ≤ j ∧ j ≤ b) univ ↔ a✝ ∈ Icc a b\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝² : Preorder α\ninst✝¹ : LocallyFiniteOrder α\na a₁ a₂ b b₁ b₂ c x : α\ninst✝ : LocallyFiniteOrderTop α\n⊢ Icc a b ⊆ Ici a\n[PROOFSTEP]\nsimpa [← coe_subset] using Set.Icc_subset_Ici_self\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝² : Preorder α\ninst✝¹ : LocallyFiniteOrder α\na a₁ a₂ b b₁ b₂ c x : α\ninst✝ : LocallyFiniteOrderTop α\n⊢ Ico a b ⊆ Ici a\n[PROOFSTEP]\nsimpa [← coe_subset] using Set.Ico_subset_Ici_self\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝² : Preorder α\ninst✝¹ : LocallyFiniteOrder α\na a₁ a₂ b b₁ b₂ c x : α\ninst✝ : LocallyFiniteOrderTop α\n⊢ Ioc a b ⊆ Ioi a\n[PROOFSTEP]\nsimpa [← coe_subset] using Set.Ioc_subset_Ioi_self\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝² : Preorder α\ninst✝¹ : LocallyFiniteOrder α\na a₁ a₂ b b₁ b₂ c x : α\ninst✝ : LocallyFiniteOrderTop α\n⊢ Ioo a b ⊆ Ioi a\n[PROOFSTEP]\nsimpa [← coe_subset] using Set.Ioo_subset_Ioi_self\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝² : Preorder α\ninst✝¹ : LocallyFiniteOrder α\na a₁ a₂ b b₁ b₂ c x : α\ninst✝ : LocallyFiniteOrderBot α\n⊢ Icc a b ⊆ Iic b\n[PROOFSTEP]\nsimpa [← coe_subset] using Set.Icc_subset_Iic_self\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝² : Preorder α\ninst✝¹ : LocallyFiniteOrder α\na a₁ a₂ b b₁ b₂ c x : α\ninst✝ : LocallyFiniteOrderBot α\n⊢ Ioc a b ⊆ Iic b\n[PROOFSTEP]\nsimpa [← coe_subset] using Set.Ioc_subset_Iic_self\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝² : Preorder α\ninst✝¹ : LocallyFiniteOrder α\na a₁ a₂ b b₁ b₂ c x : α\ninst✝ : LocallyFiniteOrderBot α\n⊢ Ico a b ⊆ Iio b\n[PROOFSTEP]\nsimpa [← coe_subset] using Set.Ico_subset_Iio_self\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝² : Preorder α\ninst✝¹ : LocallyFiniteOrder α\na a₁ a₂ b b₁ b₂ c x : α\ninst✝ : LocallyFiniteOrderBot α\n⊢ Ioo a b ⊆ Iio b\n[PROOFSTEP]\nsimpa [← coe_subset] using Set.Ioo_subset_Iio_self\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : Preorder α\ninst✝ : LocallyFiniteOrderTop α\na : α\n⊢ Ioi a ⊆ Ici a\n[PROOFSTEP]\nsimpa [← coe_subset] using Set.Ioi_subset_Ici_self\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝³ : Preorder α\ninst✝² : LocallyFiniteOrderTop α\na : α\ninst✝¹ : Fintype α\ninst✝ : DecidablePred ((fun x x_1 => x < x_1) a)\n⊢ filter ((fun x x_1 => x < x_1) a) univ = Ioi a\n[PROOFSTEP]\next\n[GOAL]\ncase a\nι : Type u_1\nα : Type u_2\ninst✝³ : Preorder α\ninst✝² : LocallyFiniteOrderTop α\na : α\ninst✝¹ : Fintype α\ninst✝ : DecidablePred ((fun x x_1 => x < x_1) a)\na✝ : α\n⊢ a✝ ∈ filter ((fun x x_1 => x < x_1) a) univ ↔ a✝ ∈ Ioi a\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝³ : Preorder α\ninst✝² : LocallyFiniteOrderTop α\na : α\ninst✝¹ : Fintype α\ninst✝ : DecidablePred ((fun x x_1 => x ≤ x_1) a)\n⊢ filter ((fun x x_1 => x ≤ x_1) a) univ = Ici a\n[PROOFSTEP]\next\n[GOAL]\ncase a\nι : Type u_1\nα : Type u_2\ninst✝³ : Preorder α\ninst✝² : LocallyFiniteOrderTop α\na : α\ninst✝¹ : Fintype α\ninst✝ : DecidablePred ((fun x x_1 => x ≤ x_1) a)\na✝ : α\n⊢ a✝ ∈ filter ((fun x x_1 => x ≤ x_1) a) univ ↔ a✝ ∈ Ici a\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : Preorder α\ninst✝ : LocallyFiniteOrderBot α\na : α\n⊢ Iio a ⊆ Iic a\n[PROOFSTEP]\nsimpa [← coe_subset] using Set.Iio_subset_Iic_self\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝³ : Preorder α\ninst✝² : LocallyFiniteOrderBot α\na : α\ninst✝¹ : Fintype α\ninst✝ : DecidablePred fun x => x < a\n⊢ filter (fun x => x < a) univ = Iio a\n[PROOFSTEP]\next\n[GOAL]\ncase a\nι : Type u_1\nα : Type u_2\ninst✝³ : Preorder α\ninst✝² : LocallyFiniteOrderBot α\na : α\ninst✝¹ : Fintype α\ninst✝ : DecidablePred fun x => x < a\na✝ : α\n⊢ a✝ ∈ filter (fun x => x < a) univ ↔ a✝ ∈ Iio a\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝³ : Preorder α\ninst✝² : LocallyFiniteOrderBot α\na : α\ninst✝¹ : Fintype α\ninst✝ : DecidablePred fun x => x ≤ a\n⊢ filter (fun x => x ≤ a) univ = Iic a\n[PROOFSTEP]\next\n[GOAL]\ncase a\nι : Type u_1\nα : Type u_2\ninst✝³ : Preorder α\ninst✝² : LocallyFiniteOrderBot α\na : α\ninst✝¹ : Fintype α\ninst✝ : DecidablePred fun x => x ≤ a\na✝ : α\n⊢ a✝ ∈ filter (fun x => x ≤ a) univ ↔ a✝ ∈ Iic a\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : PartialOrder α\ninst✝ : LocallyFiniteOrder α\na✝ b c a : α\n⊢ Icc a a = {a}\n[PROOFSTEP]\nrw [← coe_eq_singleton, coe_Icc, Set.Icc_self]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : PartialOrder α\ninst✝ : LocallyFiniteOrder α\na b c : α\n⊢ Icc a b = {c} ↔ a = c ∧ b = c\n[PROOFSTEP]\nrw [← coe_eq_singleton, coe_Icc, Set.Icc_eq_singleton_iff]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝² : PartialOrder α\ninst✝¹ : LocallyFiniteOrder α\na✝ b✝ c : α\ninst✝ : DecidableEq α\na b : α\n⊢ erase (Icc a b) a = Ioc a b\n[PROOFSTEP]\nsimp [← coe_inj]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝² : PartialOrder α\ninst✝¹ : LocallyFiniteOrder α\na✝ b✝ c : α\ninst✝ : DecidableEq α\na b : α\n⊢ erase (Icc a b) b = Ico a b\n[PROOFSTEP]\nsimp [← coe_inj]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝² : PartialOrder α\ninst✝¹ : LocallyFiniteOrder α\na✝ b✝ c : α\ninst✝ : DecidableEq α\na b : α\n⊢ erase (Ico a b) a = Ioo a b\n[PROOFSTEP]\nsimp [← coe_inj]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝² : PartialOrder α\ninst✝¹ : LocallyFiniteOrder α\na✝ b✝ c : α\ninst✝ : DecidableEq α\na b : α\n⊢ erase (Ioc a b) b = Ioo a b\n[PROOFSTEP]\nsimp [← coe_inj]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝² : PartialOrder α\ninst✝¹ : LocallyFiniteOrder α\na✝ b✝ c : α\ninst✝ : DecidableEq α\na b : α\n⊢ Icc a b \\ {a, b} = Ioo a b\n[PROOFSTEP]\nsimp [← coe_inj]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝² : PartialOrder α\ninst✝¹ : LocallyFiniteOrder α\na b c : α\ninst✝ : DecidableEq α\nh : a ≤ b\n⊢ insert b (Ico a b) = Icc a b\n[PROOFSTEP]\nrw [← coe_inj, coe_insert, coe_Icc, coe_Ico, Set.insert_eq, Set.union_comm, Set.Ico_union_right h]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝² : PartialOrder α\ninst✝¹ : LocallyFiniteOrder α\na b c : α\ninst✝ : DecidableEq α\nh : a ≤ b\n⊢ insert a (Ioc a b) = Icc a b\n[PROOFSTEP]\nrw [← coe_inj, coe_insert, coe_Ioc, coe_Icc, Set.insert_eq, Set.union_comm, Set.Ioc_union_left h]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝² : PartialOrder α\ninst✝¹ : LocallyFiniteOrder α\na b c : α\ninst✝ : DecidableEq α\nh : a < b\n⊢ insert a (Ioo a b) = Ico a b\n[PROOFSTEP]\nrw [← coe_inj, coe_insert, coe_Ioo, coe_Ico, Set.insert_eq, Set.union_comm, Set.Ioo_union_left h]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝² : PartialOrder α\ninst✝¹ : LocallyFiniteOrder α\na b c : α\ninst✝ : DecidableEq α\nh : a < b\n⊢ insert b (Ioo a b) = Ioc a b\n[PROOFSTEP]\nrw [← coe_inj, coe_insert, coe_Ioo, coe_Ioc, Set.insert_eq, Set.union_comm, Set.Ioo_union_right h]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝² : PartialOrder α\ninst✝¹ : LocallyFiniteOrder α\na b c : α\ninst✝ : DecidableEq α\nh : a ≤ b\n⊢ Icc a b \\ Ico a b = {b}\n[PROOFSTEP]\nsimp [← coe_inj, h]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝² : PartialOrder α\ninst✝¹ : LocallyFiniteOrder α\na b c : α\ninst✝ : DecidableEq α\nh : a ≤ b\n⊢ Icc a b \\ Ioc a b = {a}\n[PROOFSTEP]\nsimp [← coe_inj, h]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝² : PartialOrder α\ninst✝¹ : LocallyFiniteOrder α\na b c : α\ninst✝ : DecidableEq α\nh : a ≤ b\n⊢ Icc a b \\ Ioo a b = {a, b}\n[PROOFSTEP]\nsimp [← coe_inj, h]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝² : PartialOrder α\ninst✝¹ : LocallyFiniteOrder α\na b c : α\ninst✝ : DecidableEq α\nh : a < b\n⊢ Ico a b \\ Ioo a b = {a}\n[PROOFSTEP]\nsimp [← coe_inj, h]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝² : PartialOrder α\ninst✝¹ : LocallyFiniteOrder α\na b c : α\ninst✝ : DecidableEq α\nh : a < b\n⊢ Ioc a b \\ Ioo a b = {b}\n[PROOFSTEP]\nsimp [← coe_inj, h]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : PartialOrder α\ninst✝ : LocallyFiniteOrder α\na b c : α\nh : a ≤ b\n⊢ Icc a b = cons b (Ico a b) (_ : ¬b ∈ Ico a b)\n[PROOFSTEP]\nclassical rw [cons_eq_insert, Ico_insert_right h]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : PartialOrder α\ninst✝ : LocallyFiniteOrder α\na b c : α\nh : a ≤ b\n⊢ Icc a b = cons b (Ico a b) (_ : ¬b ∈ Ico a b)\n[PROOFSTEP]\nrw [cons_eq_insert, Ico_insert_right h]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : PartialOrder α\ninst✝ : LocallyFiniteOrder α\na b c : α\nh : a ≤ b\n⊢ Icc a b = cons a (Ioc a b) (_ : ¬a ∈ Ioc a b)\n[PROOFSTEP]\nclassical rw [cons_eq_insert, Ioc_insert_left h]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : PartialOrder α\ninst✝ : LocallyFiniteOrder α\na b c : α\nh : a ≤ b\n⊢ Icc a b = cons a (Ioc a b) (_ : ¬a ∈ Ioc a b)\n[PROOFSTEP]\nrw [cons_eq_insert, Ioc_insert_left h]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : PartialOrder α\ninst✝ : LocallyFiniteOrder α\na b c : α\nh : a < b\n⊢ Ioc a b = cons b (Ioo a b) (_ : ¬b ∈ Ioo a b)\n[PROOFSTEP]\nclassical rw [cons_eq_insert, Ioo_insert_right h]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : PartialOrder α\ninst✝ : LocallyFiniteOrder α\na b c : α\nh : a < b\n⊢ Ioc a b = cons b (Ioo a b) (_ : ¬b ∈ Ioo a b)\n[PROOFSTEP]\nrw [cons_eq_insert, Ioo_insert_right h]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : PartialOrder α\ninst✝ : LocallyFiniteOrder α\na b c : α\nh : a < b\n⊢ Ico a b = cons a (Ioo a b) (_ : ¬a ∈ Ioo a b)\n[PROOFSTEP]\nclassical rw [cons_eq_insert, Ioo_insert_left h]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : PartialOrder α\ninst✝ : LocallyFiniteOrder α\na b c : α\nh : a < b\n⊢ Ico a b = cons a (Ioo a b) (_ : ¬a ∈ Ioo a b)\n[PROOFSTEP]\nrw [cons_eq_insert, Ioo_insert_left h]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝² : PartialOrder α\ninst✝¹ : LocallyFiniteOrder α\na✝ b✝ c a b : α\ninst✝ : DecidablePred fun x => x ≤ a\nhab : a < b\n⊢ filter (fun x => x ≤ a) (Ico a b) = {a}\n[PROOFSTEP]\next x\n[GOAL]\ncase a\nι : Type u_1\nα : Type u_2\ninst✝² : PartialOrder α\ninst✝¹ : LocallyFiniteOrder α\na✝ b✝ c a b : α\ninst✝ : DecidablePred fun x => x ≤ a\nhab : a < b\nx : α\n⊢ x ∈ filter (fun x => x ≤ a) (Ico a b) ↔ x ∈ {a}\n[PROOFSTEP]\nrw [mem_filter, mem_Ico, mem_singleton, and_right_comm, ← le_antisymm_iff, eq_comm]\n[GOAL]\ncase a\nι : Type u_1\nα : Type u_2\ninst✝² : PartialOrder α\ninst✝¹ : LocallyFiniteOrder α\na✝ b✝ c a b : α\ninst✝ : DecidablePred fun x => x ≤ a\nhab : a < b\nx : α\n⊢ x = a ∧ x < b ↔ x = a\n[PROOFSTEP]\nexact and_iff_left_of_imp fun h => h.le.trans_lt hab\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : PartialOrder α\ninst✝ : LocallyFiniteOrder α\na✝ b✝ c a b : α\n⊢ card (Ico a b) = card (Icc a b) - 1\n[PROOFSTEP]\nclassical\nby_cases h : a ≤ b\n· rw [Icc_eq_cons_Ico h, card_cons]\n  exact (Nat.add_sub_cancel _ _).symm\n· rw [Ico_eq_empty fun h' => h h'.le, Icc_eq_empty h, card_empty, zero_tsub]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : PartialOrder α\ninst✝ : LocallyFiniteOrder α\na✝ b✝ c a b : α\n⊢ card (Ico a b) = card (Icc a b) - 1\n[PROOFSTEP]\nby_cases h : a ≤ b\n[GOAL]\ncase pos\nι : Type u_1\nα : Type u_2\ninst✝¹ : PartialOrder α\ninst✝ : LocallyFiniteOrder α\na✝ b✝ c a b : α\nh : a ≤ b\n⊢ card (Ico a b) = card (Icc a b) - 1\n[PROOFSTEP]\nrw [Icc_eq_cons_Ico h, card_cons]\n[GOAL]\ncase pos\nι : Type u_1\nα : Type u_2\ninst✝¹ : PartialOrder α\ninst✝ : LocallyFiniteOrder α\na✝ b✝ c a b : α\nh : a ≤ b\n⊢ card (Ico a b) = card (Ico a b) + 1 - 1\n[PROOFSTEP]\nexact (Nat.add_sub_cancel _ _).symm\n[GOAL]\ncase neg\nι : Type u_1\nα : Type u_2\ninst✝¹ : PartialOrder α\ninst✝ : LocallyFiniteOrder α\na✝ b✝ c a b : α\nh : ¬a ≤ b\n⊢ card (Ico a b) = card (Icc a b) - 1\n[PROOFSTEP]\nrw [Ico_eq_empty fun h' => h h'.le, Icc_eq_empty h, card_empty, zero_tsub]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : PartialOrder α\ninst✝ : LocallyFiniteOrder α\na✝ b✝ c a b : α\n⊢ card (Ioo a b) = card (Ico a b) - 1\n[PROOFSTEP]\nclassical\nby_cases h : a < b\n· rw [Ico_eq_cons_Ioo h, card_cons]\n  exact (Nat.add_sub_cancel _ _).symm\n· rw [Ioo_eq_empty h, Ico_eq_empty h, card_empty, zero_tsub]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : PartialOrder α\ninst✝ : LocallyFiniteOrder α\na✝ b✝ c a b : α\n⊢ card (Ioo a b) = card (Ico a b) - 1\n[PROOFSTEP]\nby_cases h : a < b\n[GOAL]\ncase pos\nι : Type u_1\nα : Type u_2\ninst✝¹ : PartialOrder α\ninst✝ : LocallyFiniteOrder α\na✝ b✝ c a b : α\nh : a < b\n⊢ card (Ioo a b) = card (Ico a b) - 1\n[PROOFSTEP]\nrw [Ico_eq_cons_Ioo h, card_cons]\n[GOAL]\ncase pos\nι : Type u_1\nα : Type u_2\ninst✝¹ : PartialOrder α\ninst✝ : LocallyFiniteOrder α\na✝ b✝ c a b : α\nh : a < b\n⊢ card (Ioo a b) = card (Ioo a b) + 1 - 1\n[PROOFSTEP]\nexact (Nat.add_sub_cancel _ _).symm\n[GOAL]\ncase neg\nι : Type u_1\nα : Type u_2\ninst✝¹ : PartialOrder α\ninst✝ : LocallyFiniteOrder α\na✝ b✝ c a b : α\nh : ¬a < b\n⊢ card (Ioo a b) = card (Ico a b) - 1\n[PROOFSTEP]\nrw [Ioo_eq_empty h, Ico_eq_empty h, card_empty, zero_tsub]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : PartialOrder α\ninst✝ : LocallyFiniteOrder α\na✝ b✝ c a b : α\n⊢ card (Ioo a b) = card (Icc a b) - 2\n[PROOFSTEP]\nrw [card_Ioo_eq_card_Ico_sub_one, card_Ico_eq_card_Icc_sub_one]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : PartialOrder α\ninst✝ : LocallyFiniteOrder α\na✝ b✝ c a b : α\n⊢ card (Icc a b) - 1 - 1 = card (Icc a b) - 2\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝² : PartialOrder α\ninst✝¹ : LocallyFiniteOrderTop α\ninst✝ : DecidableEq α\na : α\n⊢ erase (Ici a) a = Ioi a\n[PROOFSTEP]\next\n[GOAL]\ncase a\nι : Type u_1\nα : Type u_2\ninst✝² : PartialOrder α\ninst✝¹ : LocallyFiniteOrderTop α\ninst✝ : DecidableEq α\na a✝ : α\n⊢ a✝ ∈ erase (Ici a) a ↔ a✝ ∈ Ioi a\n[PROOFSTEP]\nsimp_rw [Finset.mem_erase, mem_Ici, mem_Ioi, lt_iff_le_and_ne, and_comm, ne_comm]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝² : PartialOrder α\ninst✝¹ : LocallyFiniteOrderTop α\ninst✝ : DecidableEq α\na : α\n⊢ insert a (Ioi a) = Ici a\n[PROOFSTEP]\next\n[GOAL]\ncase a\nι : Type u_1\nα : Type u_2\ninst✝² : PartialOrder α\ninst✝¹ : LocallyFiniteOrderTop α\ninst✝ : DecidableEq α\na a✝ : α\n⊢ a✝ ∈ insert a (Ioi a) ↔ a✝ ∈ Ici a\n[PROOFSTEP]\nsimp_rw [Finset.mem_insert, mem_Ici, mem_Ioi, le_iff_lt_or_eq, or_comm, eq_comm]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : PartialOrder α\ninst✝ : LocallyFiniteOrderTop α\na : α\n⊢ Ici a = cons a (Ioi a) (_ : ¬a ∈ Ioi a)\n[PROOFSTEP]\nclassical rw [cons_eq_insert, Ioi_insert]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : PartialOrder α\ninst✝ : LocallyFiniteOrderTop α\na : α\n⊢ Ici a = cons a (Ioi a) (_ : ¬a ∈ Ioi a)\n[PROOFSTEP]\nrw [cons_eq_insert, Ioi_insert]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : PartialOrder α\ninst✝ : LocallyFiniteOrderTop α\na : α\n⊢ card (Ioi a) = card (Ici a) - 1\n[PROOFSTEP]\nrw [Ici_eq_cons_Ioi, card_cons, add_tsub_cancel_right]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝² : PartialOrder α\ninst✝¹ : LocallyFiniteOrderBot α\ninst✝ : DecidableEq α\nb : α\n⊢ erase (Iic b) b = Iio b\n[PROOFSTEP]\next\n[GOAL]\ncase a\nι : Type u_1\nα : Type u_2\ninst✝² : PartialOrder α\ninst✝¹ : LocallyFiniteOrderBot α\ninst✝ : DecidableEq α\nb a✝ : α\n⊢ a✝ ∈ erase (Iic b) b ↔ a✝ ∈ Iio b\n[PROOFSTEP]\nsimp_rw [Finset.mem_erase, mem_Iic, mem_Iio, lt_iff_le_and_ne, and_comm]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝² : PartialOrder α\ninst✝¹ : LocallyFiniteOrderBot α\ninst✝ : DecidableEq α\nb : α\n⊢ insert b (Iio b) = Iic b\n[PROOFSTEP]\next\n[GOAL]\ncase a\nι : Type u_1\nα : Type u_2\ninst✝² : PartialOrder α\ninst✝¹ : LocallyFiniteOrderBot α\ninst✝ : DecidableEq α\nb a✝ : α\n⊢ a✝ ∈ insert b (Iio b) ↔ a✝ ∈ Iic b\n[PROOFSTEP]\nsimp_rw [Finset.mem_insert, mem_Iic, mem_Iio, le_iff_lt_or_eq, or_comm]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : PartialOrder α\ninst✝ : LocallyFiniteOrderBot α\nb : α\n⊢ Iic b = cons b (Iio b) (_ : ¬b ∈ Iio b)\n[PROOFSTEP]\nclassical rw [cons_eq_insert, Iio_insert]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : PartialOrder α\ninst✝ : LocallyFiniteOrderBot α\nb : α\n⊢ Iic b = cons b (Iio b) (_ : ¬b ∈ Iio b)\n[PROOFSTEP]\nrw [cons_eq_insert, Iio_insert]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : PartialOrder α\ninst✝ : LocallyFiniteOrderBot α\na : α\n⊢ card (Iio a) = card (Iic a) - 1\n[PROOFSTEP]\nrw [Iic_eq_cons_Iio, card_cons, add_tsub_cancel_right]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : LocallyFiniteOrder α\na b a₁ b₁ a₂ b₂ : α\nh : a₁ < b₁\n⊢ Ico a₁ b₁ ⊆ Ico a₂ b₂ ↔ a₂ ≤ a₁ ∧ b₁ ≤ b₂\n[PROOFSTEP]\nrw [← coe_subset, coe_Ico, coe_Ico, Set.Ico_subset_Ico_iff h]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : LocallyFiniteOrder α\na✝ b✝ a b c : α\nhab : a ≤ b\nhbc : b ≤ c\n⊢ Ico a b ∪ Ico b c = Ico a c\n[PROOFSTEP]\nrw [← coe_inj, coe_union, coe_Ico, coe_Ico, coe_Ico, Set.Ico_union_Ico_eq_Ico hab hbc]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : LocallyFiniteOrder α\na✝ b✝ a b c : α\nh₁ : a ≤ b\nh₂ : b ≤ c\n⊢ Ioc a b ∪ Ioc b c = Ioc a c\n[PROOFSTEP]\nrw [← coe_inj, coe_union, coe_Ioc, coe_Ioc, coe_Ioc, Set.Ioc_union_Ioc_eq_Ioc h₁ h₂]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : LocallyFiniteOrder α\na✝ b✝ a b c : α\n⊢ Ico a c ⊆ Ico a b ∪ Ico b c\n[PROOFSTEP]\nrw [← coe_subset, coe_union, coe_Ico, coe_Ico, coe_Ico]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : LocallyFiniteOrder α\na✝ b✝ a b c : α\n⊢ Set.Ico a c ⊆ Set.Ico a b ∪ Set.Ico b c\n[PROOFSTEP]\nexact Set.Ico_subset_Ico_union_Ico\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : LocallyFiniteOrder α\na✝ b✝ a b c d : α\nhcb : c ≤ b\nhad : a ≤ d\n⊢ Ico a b ∪ Ico c d = Ico (min a c) (max b d)\n[PROOFSTEP]\nrw [← coe_inj, coe_union, coe_Ico, coe_Ico, coe_Ico, Set.Ico_union_Ico' hcb had]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : LocallyFiniteOrder α\na✝ b✝ a b c d : α\nh₁ : min a b ≤ max c d\nh₂ : min c d ≤ max a b\n⊢ Ico a b ∪ Ico c d = Ico (min a c) (max b d)\n[PROOFSTEP]\nrw [← coe_inj, coe_union, coe_Ico, coe_Ico, coe_Ico, Set.Ico_union_Ico h₁ h₂]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : LocallyFiniteOrder α\na✝ b✝ a b c d : α\n⊢ Ico a b ∩ Ico c d = Ico (max a c) (min b d)\n[PROOFSTEP]\nrw [← coe_inj, coe_inter, coe_Ico, coe_Ico, coe_Ico, ← inf_eq_min, ← sup_eq_max, Set.Ico_inter_Ico]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : LocallyFiniteOrder α\na✝ b✝ a b c : α\n⊢ filter (fun x => x < c) (Ico a b) = Ico a (min b c)\n[PROOFSTEP]\ncases le_total b c with\n| inl h => rw [Ico_filter_lt_of_right_le h, min_eq_left h]\n| inr h => rw [Ico_filter_lt_of_le_right h, min_eq_right h]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : LocallyFiniteOrder α\na✝ b✝ a b c : α\nx✝ : b ≤ c ∨ c ≤ b\n⊢ filter (fun x => x < c) (Ico a b) = Ico a (min b c)\n[PROOFSTEP]\ncases le_total b c with\n| inl h => rw [Ico_filter_lt_of_right_le h, min_eq_left h]\n| inr h => rw [Ico_filter_lt_of_le_right h, min_eq_right h]\n[GOAL]\ncase inl\nι : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : LocallyFiniteOrder α\na✝ b✝ a b c : α\nh : b ≤ c\n⊢ filter (fun x => x < c) (Ico a b) = Ico a (min b c)\n[PROOFSTEP]\n\n| inl h => rw [Ico_filter_lt_of_right_le h, min_eq_left h]\n[GOAL]\ncase inl\nι : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : LocallyFiniteOrder α\na✝ b✝ a b c : α\nh : b ≤ c\n⊢ filter (fun x => x < c) (Ico a b) = Ico a (min b c)\n[PROOFSTEP]\nrw [Ico_filter_lt_of_right_le h, min_eq_left h]\n[GOAL]\ncase inr\nι : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : LocallyFiniteOrder α\na✝ b✝ a b c : α\nh : c ≤ b\n⊢ filter (fun x => x < c) (Ico a b) = Ico a (min b c)\n[PROOFSTEP]\n\n| inr h => rw [Ico_filter_lt_of_le_right h, min_eq_right h]\n[GOAL]\ncase inr\nι : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : LocallyFiniteOrder α\na✝ b✝ a b c : α\nh : c ≤ b\n⊢ filter (fun x => x < c) (Ico a b) = Ico a (min b c)\n[PROOFSTEP]\nrw [Ico_filter_lt_of_le_right h, min_eq_right h]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : LocallyFiniteOrder α\na✝ b✝ a b c : α\n⊢ filter (fun x => c ≤ x) (Ico a b) = Ico (max a c) b\n[PROOFSTEP]\ncases le_total a c with\n| inl h => rw [Ico_filter_le_of_left_le h, max_eq_right h]\n| inr h => rw [Ico_filter_le_of_le_left h, max_eq_left h]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : LocallyFiniteOrder α\na✝ b✝ a b c : α\nx✝ : a ≤ c ∨ c ≤ a\n⊢ filter (fun x => c ≤ x) (Ico a b) = Ico (max a c) b\n[PROOFSTEP]\ncases le_total a c with\n| inl h => rw [Ico_filter_le_of_left_le h, max_eq_right h]\n| inr h => rw [Ico_filter_le_of_le_left h, max_eq_left h]\n[GOAL]\ncase inl\nι : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : LocallyFiniteOrder α\na✝ b✝ a b c : α\nh : a ≤ c\n⊢ filter (fun x => c ≤ x) (Ico a b) = Ico (max a c) b\n[PROOFSTEP]\n\n| inl h => rw [Ico_filter_le_of_left_le h, max_eq_right h]\n[GOAL]\ncase inl\nι : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : LocallyFiniteOrder α\na✝ b✝ a b c : α\nh : a ≤ c\n⊢ filter (fun x => c ≤ x) (Ico a b) = Ico (max a c) b\n[PROOFSTEP]\nrw [Ico_filter_le_of_left_le h, max_eq_right h]\n[GOAL]\ncase inr\nι : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : LocallyFiniteOrder α\na✝ b✝ a b c : α\nh : c ≤ a\n⊢ filter (fun x => c ≤ x) (Ico a b) = Ico (max a c) b\n[PROOFSTEP]\n\n| inr h => rw [Ico_filter_le_of_le_left h, max_eq_left h]\n[GOAL]\ncase inr\nι : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : LocallyFiniteOrder α\na✝ b✝ a b c : α\nh : c ≤ a\n⊢ filter (fun x => c ≤ x) (Ico a b) = Ico (max a c) b\n[PROOFSTEP]\nrw [Ico_filter_le_of_le_left h, max_eq_left h]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : LocallyFiniteOrder α\na✝ b✝ a b c : α\n⊢ filter (fun x => x < c) (Ioo a b) = Ioo a (min b c)\n[PROOFSTEP]\next\n[GOAL]\ncase a\nι : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : LocallyFiniteOrder α\na✝¹ b✝ a b c a✝ : α\n⊢ a✝ ∈ filter (fun x => x < c) (Ioo a b) ↔ a✝ ∈ Ioo a (min b c)\n[PROOFSTEP]\nsimp [and_assoc]\n[GOAL]\nι : Type u_1\nα✝ : Type u_2\ninst✝³ : LinearOrder α✝\ninst✝² : LocallyFiniteOrder α✝\na✝ b✝ : α✝\nα : Type u_3\ninst✝¹ : LinearOrder α\ninst✝ : LocallyFiniteOrderBot α\na b : α\n⊢ filter (fun x => x < b) (Iio a) = Iio (min a b)\n[PROOFSTEP]\next\n[GOAL]\ncase a\nι : Type u_1\nα✝ : Type u_2\ninst✝³ : LinearOrder α✝\ninst✝² : LocallyFiniteOrder α✝\na✝¹ b✝ : α✝\nα : Type u_3\ninst✝¹ : LinearOrder α\ninst✝ : LocallyFiniteOrderBot α\na b a✝ : α\n⊢ a✝ ∈ filter (fun x => x < b) (Iio a) ↔ a✝ ∈ Iio (min a b)\n[PROOFSTEP]\nsimp [and_assoc]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : LocallyFiniteOrder α\na✝ b✝ a b c : α\n⊢ Ico a b \\ Ico a c = Ico (max a c) b\n[PROOFSTEP]\ncases le_total a c with\n| inl h =>\n  ext x\n  rw [mem_sdiff, mem_Ico, mem_Ico, mem_Ico, max_eq_right h, and_right_comm, not_and, not_lt]\n  exact and_congr_left' ⟨fun hx => hx.2 hx.1, fun hx => ⟨h.trans hx, fun _ => hx⟩⟩\n| inr h => rw [Ico_eq_empty_of_le h, sdiff_empty, max_eq_left h]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : LocallyFiniteOrder α\na✝ b✝ a b c : α\nx✝ : a ≤ c ∨ c ≤ a\n⊢ Ico a b \\ Ico a c = Ico (max a c) b\n[PROOFSTEP]\ncases le_total a c with\n| inl h =>\n  ext x\n  rw [mem_sdiff, mem_Ico, mem_Ico, mem_Ico, max_eq_right h, and_right_comm, not_and, not_lt]\n  exact and_congr_left' ⟨fun hx => hx.2 hx.1, fun hx => ⟨h.trans hx, fun _ => hx⟩⟩\n| inr h => rw [Ico_eq_empty_of_le h, sdiff_empty, max_eq_left h]\n[GOAL]\ncase inl\nι : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : LocallyFiniteOrder α\na✝ b✝ a b c : α\nh : a ≤ c\n⊢ Ico a b \\ Ico a c = Ico (max a c) b\n[PROOFSTEP]\n\n| inl h =>\n  ext x\n  rw [mem_sdiff, mem_Ico, mem_Ico, mem_Ico, max_eq_right h, and_right_comm, not_and, not_lt]\n  exact and_congr_left' ⟨fun hx => hx.2 hx.1, fun hx => ⟨h.trans hx, fun _ => hx⟩⟩\n[GOAL]\ncase inl\nι : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : LocallyFiniteOrder α\na✝ b✝ a b c : α\nh : a ≤ c\n⊢ Ico a b \\ Ico a c = Ico (max a c) b\n[PROOFSTEP]\next x\n[GOAL]\ncase inl.a\nι : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : LocallyFiniteOrder α\na✝ b✝ a b c : α\nh : a ≤ c\nx : α\n⊢ x ∈ Ico a b \\ Ico a c ↔ x ∈ Ico (max a c) b\n[PROOFSTEP]\nrw [mem_sdiff, mem_Ico, mem_Ico, mem_Ico, max_eq_right h, and_right_comm, not_and, not_lt]\n[GOAL]\ncase inl.a\nι : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : LocallyFiniteOrder α\na✝ b✝ a b c : α\nh : a ≤ c\nx : α\n⊢ (a ≤ x ∧ (a ≤ x → c ≤ x)) ∧ x < b ↔ c ≤ x ∧ x < b\n[PROOFSTEP]\nexact and_congr_left' ⟨fun hx => hx.2 hx.1, fun hx => ⟨h.trans hx, fun _ => hx⟩⟩\n[GOAL]\ncase inr\nι : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : LocallyFiniteOrder α\na✝ b✝ a b c : α\nh : c ≤ a\n⊢ Ico a b \\ Ico a c = Ico (max a c) b\n[PROOFSTEP]\n\n| inr h => rw [Ico_eq_empty_of_le h, sdiff_empty, max_eq_left h]\n[GOAL]\ncase inr\nι : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : LocallyFiniteOrder α\na✝ b✝ a b c : α\nh : c ≤ a\n⊢ Ico a b \\ Ico a c = Ico (max a c) b\n[PROOFSTEP]\nrw [Ico_eq_empty_of_le h, sdiff_empty, max_eq_left h]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : LocallyFiniteOrder α\na✝ b✝ a b c : α\n⊢ Ico a b \\ Ico c b = Ico a (min b c)\n[PROOFSTEP]\ncases le_total b c with\n| inl h => rw [Ico_eq_empty_of_le h, sdiff_empty, min_eq_left h]\n| inr h =>\n  ext x\n  rw [mem_sdiff, mem_Ico, mem_Ico, mem_Ico, min_eq_right h, and_assoc, not_and', not_le]\n  exact and_congr_right' ⟨fun hx => hx.2 hx.1, fun hx => ⟨hx.trans_le h, fun _ => hx⟩⟩\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : LocallyFiniteOrder α\na✝ b✝ a b c : α\nx✝ : b ≤ c ∨ c ≤ b\n⊢ Ico a b \\ Ico c b = Ico a (min b c)\n[PROOFSTEP]\ncases le_total b c with\n| inl h => rw [Ico_eq_empty_of_le h, sdiff_empty, min_eq_left h]\n| inr h =>\n  ext x\n  rw [mem_sdiff, mem_Ico, mem_Ico, mem_Ico, min_eq_right h, and_assoc, not_and', not_le]\n  exact and_congr_right' ⟨fun hx => hx.2 hx.1, fun hx => ⟨hx.trans_le h, fun _ => hx⟩⟩\n[GOAL]\ncase inl\nι : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : LocallyFiniteOrder α\na✝ b✝ a b c : α\nh : b ≤ c\n⊢ Ico a b \\ Ico c b = Ico a (min b c)\n[PROOFSTEP]\n\n| inl h => rw [Ico_eq_empty_of_le h, sdiff_empty, min_eq_left h]\n[GOAL]\ncase inl\nι : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : LocallyFiniteOrder α\na✝ b✝ a b c : α\nh : b ≤ c\n⊢ Ico a b \\ Ico c b = Ico a (min b c)\n[PROOFSTEP]\nrw [Ico_eq_empty_of_le h, sdiff_empty, min_eq_left h]\n[GOAL]\ncase inr\nι : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : LocallyFiniteOrder α\na✝ b✝ a b c : α\nh : c ≤ b\n⊢ Ico a b \\ Ico c b = Ico a (min b c)\n[PROOFSTEP]\n\n| inr h =>\n  ext x\n  rw [mem_sdiff, mem_Ico, mem_Ico, mem_Ico, min_eq_right h, and_assoc, not_and', not_le]\n  exact and_congr_right' ⟨fun hx => hx.2 hx.1, fun hx => ⟨hx.trans_le h, fun _ => hx⟩⟩\n[GOAL]\ncase inr\nι : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : LocallyFiniteOrder α\na✝ b✝ a b c : α\nh : c ≤ b\n⊢ Ico a b \\ Ico c b = Ico a (min b c)\n[PROOFSTEP]\next x\n[GOAL]\ncase inr.a\nι : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : LocallyFiniteOrder α\na✝ b✝ a b c : α\nh : c ≤ b\nx : α\n⊢ x ∈ Ico a b \\ Ico c b ↔ x ∈ Ico a (min b c)\n[PROOFSTEP]\nrw [mem_sdiff, mem_Ico, mem_Ico, mem_Ico, min_eq_right h, and_assoc, not_and', not_le]\n[GOAL]\ncase inr.a\nι : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : LocallyFiniteOrder α\na✝ b✝ a b c : α\nh : c ≤ b\nx : α\n⊢ a ≤ x ∧ x < b ∧ (x < b → x < c) ↔ a ≤ x ∧ x < c\n[PROOFSTEP]\nexact and_congr_right' ⟨fun hx => hx.2 hx.1, fun hx => ⟨hx.trans_le h, fun _ => hx⟩⟩\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝³ : LinearOrder α\ninst✝² : Fintype α\ninst✝¹ : LocallyFiniteOrderTop α\ninst✝ : LocallyFiniteOrderBot α\na : α\n⊢ disjUnion (Ioi a) (Iio a) (_ : Disjoint (Ioi a) (Iio a)) = {a}ᶜ\n[PROOFSTEP]\next\n[GOAL]\ncase a\nι : Type u_1\nα : Type u_2\ninst✝³ : LinearOrder α\ninst✝² : Fintype α\ninst✝¹ : LocallyFiniteOrderTop α\ninst✝ : LocallyFiniteOrderBot α\na a✝ : α\n⊢ a✝ ∈ disjUnion (Ioi a) (Iio a) (_ : Disjoint (Ioi a) (Iio a)) ↔ a✝ ∈ {a}ᶜ\n[PROOFSTEP]\nsimp [eq_comm]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : Lattice α\ninst✝ : LocallyFiniteOrder α\na a₁ a₂ b b₁ b₂ c x : α\nh : a ≤ b\n⊢ [[a, b]] = Icc a b\n[PROOFSTEP]\nrw [uIcc, inf_eq_left.2 h, sup_eq_right.2 h]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : Lattice α\ninst✝ : LocallyFiniteOrder α\na a₁ a₂ b b₁ b₂ c x : α\nh : b ≤ a\n⊢ [[a, b]] = Icc b a\n[PROOFSTEP]\nrw [uIcc, inf_eq_right.2 h, sup_eq_left.2 h]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : Lattice α\ninst✝ : LocallyFiniteOrder α\na✝ a₁ a₂ b✝ b₁ b₂ c x a b : α\n⊢ [[a, b]] = [[b, a]]\n[PROOFSTEP]\nrw [uIcc, uIcc, inf_comm, sup_comm]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : Lattice α\ninst✝ : LocallyFiniteOrder α\na a₁ a₂ b b₁ b₂ c x : α\n⊢ [[a, a]] = {a}\n[PROOFSTEP]\nsimp [uIcc]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : Lattice α\ninst✝ : LocallyFiniteOrder α\na a₁ a₂ b b₁ b₂ c x : α\nh₁ : a₁ ∈ [[a₂, b₂]]\nh₂ : b₁ ∈ [[a₂, b₂]]\n⊢ [[a₁, b₁]] ⊆ [[a₂, b₂]]\n[PROOFSTEP]\nrw [mem_uIcc] at h₁ h₂ \n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : Lattice α\ninst✝ : LocallyFiniteOrder α\na a₁ a₂ b b₁ b₂ c x : α\nh₁ : a₂ ⊓ b₂ ≤ a₁ ∧ a₁ ≤ a₂ ⊔ b₂\nh₂ : a₂ ⊓ b₂ ≤ b₁ ∧ b₁ ≤ a₂ ⊔ b₂\n⊢ [[a₁, b₁]] ⊆ [[a₂, b₂]]\n[PROOFSTEP]\nexact Icc_subset_Icc (_root_.le_inf h₁.1 h₂.1) (_root_.sup_le h₁.2 h₂.2)\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : Lattice α\ninst✝ : LocallyFiniteOrder α\na a₁ a₂ b b₁ b₂ c x : α\nha : a₁ ∈ Icc a₂ b₂\nhb : b₁ ∈ Icc a₂ b₂\n⊢ [[a₁, b₁]] ⊆ Icc a₂ b₂\n[PROOFSTEP]\nrw [mem_Icc] at ha hb \n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : Lattice α\ninst✝ : LocallyFiniteOrder α\na a₁ a₂ b b₁ b₂ c x : α\nha : a₂ ≤ a₁ ∧ a₁ ≤ b₂\nhb : a₂ ≤ b₁ ∧ b₁ ≤ b₂\n⊢ [[a₁, b₁]] ⊆ Icc a₂ b₂\n[PROOFSTEP]\nexact Icc_subset_Icc (_root_.le_inf ha.1 hb.1) (_root_.sup_le ha.2 hb.2)\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : DistribLattice α\ninst✝ : LocallyFiniteOrder α\na a₁ a₂ b b₁ b₂ c x : α\n⊢ a ∈ [[b, c]] → b ∈ [[a, c]] → a = b\n[PROOFSTEP]\nsimp_rw [mem_uIcc]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : DistribLattice α\ninst✝ : LocallyFiniteOrder α\na a₁ a₂ b b₁ b₂ c x : α\n⊢ b ⊓ c ≤ a ∧ a ≤ b ⊔ c → a ⊓ c ≤ b ∧ b ≤ a ⊔ c → a = b\n[PROOFSTEP]\nexact Set.eq_of_mem_uIcc_of_mem_uIcc\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : DistribLattice α\ninst✝ : LocallyFiniteOrder α\na a₁ a₂ b b₁ b₂ c x : α\n⊢ b ∈ [[a, c]] → c ∈ [[a, b]] → b = c\n[PROOFSTEP]\nsimp_rw [mem_uIcc]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : DistribLattice α\ninst✝ : LocallyFiniteOrder α\na a₁ a₂ b b₁ b₂ c x : α\n⊢ a ⊓ c ≤ b ∧ b ≤ a ⊔ c → a ⊓ b ≤ c ∧ c ≤ a ⊔ b → b = c\n[PROOFSTEP]\nexact Set.eq_of_mem_uIcc_of_mem_uIcc'\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : DistribLattice α\ninst✝ : LocallyFiniteOrder α\na✝ a₁ a₂ b✝ b₁ b₂ c✝ x a b c : α\nh : (fun b => [[b, a]]) b = (fun b => [[b, a]]) c\n⊢ b = c\n[PROOFSTEP]\nrw [ext_iff] at h \n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : DistribLattice α\ninst✝ : LocallyFiniteOrder α\na✝ a₁ a₂ b✝ b₁ b₂ c✝ x a b c : α\nh : ∀ (a_1 : α), a_1 ∈ (fun b => [[b, a]]) b ↔ a_1 ∈ (fun b => [[b, a]]) c\n⊢ b = c\n[PROOFSTEP]\nexact eq_of_mem_uIcc_of_mem_uIcc ((h _).1 left_mem_uIcc) ((h _).2 left_mem_uIcc)\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : DistribLattice α\ninst✝ : LocallyFiniteOrder α\na✝ a₁ a₂ b b₁ b₂ c x a : α\n⊢ Injective (uIcc a)\n[PROOFSTEP]\nsimpa only [uIcc_comm] using uIcc_injective_right a\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : LocallyFiniteOrder α\na a₁ a₂ b b₁ b₂ c x : α\n⊢ ↑[[a, b]] = ↑(Icc a b ∪ Icc b a)\n[PROOFSTEP]\npush_cast\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : LocallyFiniteOrder α\na a₁ a₂ b b₁ b₂ c x : α\n⊢ Set.uIcc a b = Set.Icc a b ∪ Set.Icc b a\n[PROOFSTEP]\nexact Set.uIcc_eq_union\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : LocallyFiniteOrder α\na a₁ a₂ b b₁ b₂ c x : α\n⊢ a ∈ [[b, c]] ↔ b ≤ a ∧ a ≤ c ∨ c ≤ a ∧ a ≤ b\n[PROOFSTEP]\nsimp [uIcc_eq_union]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : LocallyFiniteOrder α\na a₁ a₂ b b₁ b₂ c x : α\n⊢ c < a → c < b → ¬c ∈ [[a, b]]\n[PROOFSTEP]\nrw [mem_uIcc]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : LocallyFiniteOrder α\na a₁ a₂ b b₁ b₂ c x : α\n⊢ c < a → c < b → ¬(a ⊓ b ≤ c ∧ c ≤ a ⊔ b)\n[PROOFSTEP]\nexact Set.not_mem_uIcc_of_lt\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : LocallyFiniteOrder α\na a₁ a₂ b b₁ b₂ c x : α\n⊢ a < c → b < c → ¬c ∈ [[a, b]]\n[PROOFSTEP]\nrw [mem_uIcc]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : LocallyFiniteOrder α\na a₁ a₂ b b₁ b₂ c x : α\n⊢ a < c → b < c → ¬(a ⊓ b ≤ c ∧ c ≤ a ⊔ b)\n[PROOFSTEP]\nexact Set.not_mem_uIcc_of_gt\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : LocallyFiniteOrder α\na a₁ a₂ b b₁ b₂ c x : α\n⊢ ↑[[a, c]] ⊆ ↑([[a, b]] ∪ [[b, c]])\n[PROOFSTEP]\npush_cast\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : LocallyFiniteOrder α\na a₁ a₂ b b₁ b₂ c x : α\n⊢ Set.uIcc a c ⊆ Set.uIcc a b ∪ Set.uIcc b c\n[PROOFSTEP]\nexact Set.uIcc_subset_uIcc_union_uIcc\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝² : OrderedCancelAddCommMonoid α\ninst✝¹ : ExistsAddOfLE α\ninst✝ : LocallyFiniteOrder α\na b c : α\n⊢ map (addLeftEmbedding c) (Icc a b) = Icc (c + a) (c + b)\n[PROOFSTEP]\nrw [← coe_inj, coe_map, coe_Icc, coe_Icc]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝² : OrderedCancelAddCommMonoid α\ninst✝¹ : ExistsAddOfLE α\ninst✝ : LocallyFiniteOrder α\na b c : α\n⊢ ↑(addLeftEmbedding c) '' Set.Icc a b = Set.Icc (c + a) (c + b)\n[PROOFSTEP]\nexact Set.image_const_add_Icc _ _ _\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝² : OrderedCancelAddCommMonoid α\ninst✝¹ : ExistsAddOfLE α\ninst✝ : LocallyFiniteOrder α\na b c : α\n⊢ map (addRightEmbedding c) (Icc a b) = Icc (a + c) (b + c)\n[PROOFSTEP]\nrw [← coe_inj, coe_map, coe_Icc, coe_Icc]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝² : OrderedCancelAddCommMonoid α\ninst✝¹ : ExistsAddOfLE α\ninst✝ : LocallyFiniteOrder α\na b c : α\n⊢ ↑(addRightEmbedding c) '' Set.Icc a b = Set.Icc (a + c) (b + c)\n[PROOFSTEP]\nexact Set.image_add_const_Icc _ _ _\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝² : OrderedCancelAddCommMonoid α\ninst✝¹ : ExistsAddOfLE α\ninst✝ : LocallyFiniteOrder α\na b c : α\n⊢ map (addLeftEmbedding c) (Ico a b) = Ico (c + a) (c + b)\n[PROOFSTEP]\nrw [← coe_inj, coe_map, coe_Ico, coe_Ico]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝² : OrderedCancelAddCommMonoid α\ninst✝¹ : ExistsAddOfLE α\ninst✝ : LocallyFiniteOrder α\na b c : α\n⊢ ↑(addLeftEmbedding c) '' Set.Ico a b = Set.Ico (c + a) (c + b)\n[PROOFSTEP]\nexact Set.image_const_add_Ico _ _ _\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝² : OrderedCancelAddCommMonoid α\ninst✝¹ : ExistsAddOfLE α\ninst✝ : LocallyFiniteOrder α\na b c : α\n⊢ map (addRightEmbedding c) (Ico a b) = Ico (a + c) (b + c)\n[PROOFSTEP]\nrw [← coe_inj, coe_map, coe_Ico, coe_Ico]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝² : OrderedCancelAddCommMonoid α\ninst✝¹ : ExistsAddOfLE α\ninst✝ : LocallyFiniteOrder α\na b c : α\n⊢ ↑(addRightEmbedding c) '' Set.Ico a b = Set.Ico (a + c) (b + c)\n[PROOFSTEP]\nexact Set.image_add_const_Ico _ _ _\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝² : OrderedCancelAddCommMonoid α\ninst✝¹ : ExistsAddOfLE α\ninst✝ : LocallyFiniteOrder α\na b c : α\n⊢ map (addLeftEmbedding c) (Ioc a b) = Ioc (c + a) (c + b)\n[PROOFSTEP]\nrw [← coe_inj, coe_map, coe_Ioc, coe_Ioc]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝² : OrderedCancelAddCommMonoid α\ninst✝¹ : ExistsAddOfLE α\ninst✝ : LocallyFiniteOrder α\na b c : α\n⊢ ↑(addLeftEmbedding c) '' Set.Ioc a b = Set.Ioc (c + a) (c + b)\n[PROOFSTEP]\nexact Set.image_const_add_Ioc _ _ _\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝² : OrderedCancelAddCommMonoid α\ninst✝¹ : ExistsAddOfLE α\ninst✝ : LocallyFiniteOrder α\na b c : α\n⊢ map (addRightEmbedding c) (Ioc a b) = Ioc (a + c) (b + c)\n[PROOFSTEP]\nrw [← coe_inj, coe_map, coe_Ioc, coe_Ioc]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝² : OrderedCancelAddCommMonoid α\ninst✝¹ : ExistsAddOfLE α\ninst✝ : LocallyFiniteOrder α\na b c : α\n⊢ ↑(addRightEmbedding c) '' Set.Ioc a b = Set.Ioc (a + c) (b + c)\n[PROOFSTEP]\nexact Set.image_add_const_Ioc _ _ _\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝² : OrderedCancelAddCommMonoid α\ninst✝¹ : ExistsAddOfLE α\ninst✝ : LocallyFiniteOrder α\na b c : α\n⊢ map (addLeftEmbedding c) (Ioo a b) = Ioo (c + a) (c + b)\n[PROOFSTEP]\nrw [← coe_inj, coe_map, coe_Ioo, coe_Ioo]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝² : OrderedCancelAddCommMonoid α\ninst✝¹ : ExistsAddOfLE α\ninst✝ : LocallyFiniteOrder α\na b c : α\n⊢ ↑(addLeftEmbedding c) '' Set.Ioo a b = Set.Ioo (c + a) (c + b)\n[PROOFSTEP]\nexact Set.image_const_add_Ioo _ _ _\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝² : OrderedCancelAddCommMonoid α\ninst✝¹ : ExistsAddOfLE α\ninst✝ : LocallyFiniteOrder α\na b c : α\n⊢ map (addRightEmbedding c) (Ioo a b) = Ioo (a + c) (b + c)\n[PROOFSTEP]\nrw [← coe_inj, coe_map, coe_Ioo, coe_Ioo]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝² : OrderedCancelAddCommMonoid α\ninst✝¹ : ExistsAddOfLE α\ninst✝ : LocallyFiniteOrder α\na b c : α\n⊢ ↑(addRightEmbedding c) '' Set.Ioo a b = Set.Ioo (a + c) (b + c)\n[PROOFSTEP]\nexact Set.image_add_const_Ioo _ _ _\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝³ : OrderedCancelAddCommMonoid α\ninst✝² : ExistsAddOfLE α\ninst✝¹ : LocallyFiniteOrder α\ninst✝ : DecidableEq α\na b c : α\n⊢ image ((fun x x_1 => x + x_1) c) (Icc a b) = Icc (c + a) (c + b)\n[PROOFSTEP]\nrw [← map_add_left_Icc, map_eq_image]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝³ : OrderedCancelAddCommMonoid α\ninst✝² : ExistsAddOfLE α\ninst✝¹ : LocallyFiniteOrder α\ninst✝ : DecidableEq α\na b c : α\n⊢ image ((fun x x_1 => x + x_1) c) (Icc a b) = image (↑(addLeftEmbedding c)) (Icc a b)\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝³ : OrderedCancelAddCommMonoid α\ninst✝² : ExistsAddOfLE α\ninst✝¹ : LocallyFiniteOrder α\ninst✝ : DecidableEq α\na b c : α\n⊢ image ((fun x x_1 => x + x_1) c) (Ico a b) = Ico (c + a) (c + b)\n[PROOFSTEP]\nrw [← map_add_left_Ico, map_eq_image]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝³ : OrderedCancelAddCommMonoid α\ninst✝² : ExistsAddOfLE α\ninst✝¹ : LocallyFiniteOrder α\ninst✝ : DecidableEq α\na b c : α\n⊢ image ((fun x x_1 => x + x_1) c) (Ico a b) = image (↑(addLeftEmbedding c)) (Ico a b)\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝³ : OrderedCancelAddCommMonoid α\ninst✝² : ExistsAddOfLE α\ninst✝¹ : LocallyFiniteOrder α\ninst✝ : DecidableEq α\na b c : α\n⊢ image ((fun x x_1 => x + x_1) c) (Ioc a b) = Ioc (c + a) (c + b)\n[PROOFSTEP]\nrw [← map_add_left_Ioc, map_eq_image]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝³ : OrderedCancelAddCommMonoid α\ninst✝² : ExistsAddOfLE α\ninst✝¹ : LocallyFiniteOrder α\ninst✝ : DecidableEq α\na b c : α\n⊢ image ((fun x x_1 => x + x_1) c) (Ioc a b) = image (↑(addLeftEmbedding c)) (Ioc a b)\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝³ : OrderedCancelAddCommMonoid α\ninst✝² : ExistsAddOfLE α\ninst✝¹ : LocallyFiniteOrder α\ninst✝ : DecidableEq α\na b c : α\n⊢ image ((fun x x_1 => x + x_1) c) (Ioo a b) = Ioo (c + a) (c + b)\n[PROOFSTEP]\nrw [← map_add_left_Ioo, map_eq_image]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝³ : OrderedCancelAddCommMonoid α\ninst✝² : ExistsAddOfLE α\ninst✝¹ : LocallyFiniteOrder α\ninst✝ : DecidableEq α\na b c : α\n⊢ image ((fun x x_1 => x + x_1) c) (Ioo a b) = image (↑(addLeftEmbedding c)) (Ioo a b)\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝³ : OrderedCancelAddCommMonoid α\ninst✝² : ExistsAddOfLE α\ninst✝¹ : LocallyFiniteOrder α\ninst✝ : DecidableEq α\na b c : α\n⊢ image (fun x => x + c) (Icc a b) = Icc (a + c) (b + c)\n[PROOFSTEP]\nrw [← map_add_right_Icc, map_eq_image]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝³ : OrderedCancelAddCommMonoid α\ninst✝² : ExistsAddOfLE α\ninst✝¹ : LocallyFiniteOrder α\ninst✝ : DecidableEq α\na b c : α\n⊢ image (fun x => x + c) (Icc a b) = image (↑(addRightEmbedding c)) (Icc a b)\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝³ : OrderedCancelAddCommMonoid α\ninst✝² : ExistsAddOfLE α\ninst✝¹ : LocallyFiniteOrder α\ninst✝ : DecidableEq α\na b c : α\n⊢ image (fun x => x + c) (Ico a b) = Ico (a + c) (b + c)\n[PROOFSTEP]\nrw [← map_add_right_Ico, map_eq_image]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝³ : OrderedCancelAddCommMonoid α\ninst✝² : ExistsAddOfLE α\ninst✝¹ : LocallyFiniteOrder α\ninst✝ : DecidableEq α\na b c : α\n⊢ image (fun x => x + c) (Ico a b) = image (↑(addRightEmbedding c)) (Ico a b)\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝³ : OrderedCancelAddCommMonoid α\ninst✝² : ExistsAddOfLE α\ninst✝¹ : LocallyFiniteOrder α\ninst✝ : DecidableEq α\na b c : α\n⊢ image (fun x => x + c) (Ioc a b) = Ioc (a + c) (b + c)\n[PROOFSTEP]\nrw [← map_add_right_Ioc, map_eq_image]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝³ : OrderedCancelAddCommMonoid α\ninst✝² : ExistsAddOfLE α\ninst✝¹ : LocallyFiniteOrder α\ninst✝ : DecidableEq α\na b c : α\n⊢ image (fun x => x + c) (Ioc a b) = image (↑(addRightEmbedding c)) (Ioc a b)\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝³ : OrderedCancelAddCommMonoid α\ninst✝² : ExistsAddOfLE α\ninst✝¹ : LocallyFiniteOrder α\ninst✝ : DecidableEq α\na b c : α\n⊢ image (fun x => x + c) (Ioo a b) = Ioo (a + c) (b + c)\n[PROOFSTEP]\nrw [← map_add_right_Ioo, map_eq_image]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝³ : OrderedCancelAddCommMonoid α\ninst✝² : ExistsAddOfLE α\ninst✝¹ : LocallyFiniteOrder α\ninst✝ : DecidableEq α\na b c : α\n⊢ image (fun x => x + c) (Ioo a b) = image (↑(addRightEmbedding c)) (Ioo a b)\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝⁴ : Fintype ι\ninst✝³ : LinearOrder ι\ninst✝² : LocallyFiniteOrderTop ι\ninst✝¹ : LocallyFiniteOrderBot ι\ninst✝ : CommMonoid α\nf : ι → ι → α\n⊢ ∏ i : ι, ∏ j in Ioi i, f j i * f i j = ∏ i : ι, ∏ j in {i}ᶜ, f j i\n[PROOFSTEP]\nsimp_rw [← Ioi_disjUnion_Iio, prod_disjUnion, prod_mul_distrib]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝⁴ : Fintype ι\ninst✝³ : LinearOrder ι\ninst✝² : LocallyFiniteOrderTop ι\ninst✝¹ : LocallyFiniteOrderBot ι\ninst✝ : CommMonoid α\nf : ι → ι → α\n⊢ (∏ x : ι, ∏ x_1 in Ioi x, f x_1 x) * ∏ x : ι, ∏ x_1 in Ioi x, f x x_1 =\n    (∏ x : ι, ∏ x_1 in Ioi x, f x_1 x) * ∏ x : ι, ∏ x_1 in Iio x, f x_1 x\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_a\nι : Type u_1\nα : Type u_2\ninst✝⁴ : Fintype ι\ninst✝³ : LinearOrder ι\ninst✝² : LocallyFiniteOrderTop ι\ninst✝¹ : LocallyFiniteOrderBot ι\ninst✝ : CommMonoid α\nf : ι → ι → α\n⊢ ∏ x : ι, ∏ x_1 in Ioi x, f x x_1 = ∏ x : ι, ∏ x_1 in Iio x, f x_1 x\n[PROOFSTEP]\nrw [prod_sigma', prod_sigma']\n[GOAL]\ncase e_a\nι : Type u_1\nα : Type u_2\ninst✝⁴ : Fintype ι\ninst✝³ : LinearOrder ι\ninst✝² : LocallyFiniteOrderTop ι\ninst✝¹ : LocallyFiniteOrderBot ι\ninst✝ : CommMonoid α\nf : ι → ι → α\n⊢ ∏ x in Finset.sigma univ fun x => Ioi x, f x.fst x.snd = ∏ x in Finset.sigma univ fun x => Iio x, f x.snd x.fst\n[PROOFSTEP]\nrefine' prod_bij' (fun i _ => ⟨i.2, i.1⟩) _ _ (fun i _ => ⟨i.2, i.1⟩) _ _ _\n[GOAL]\ncase e_a.refine'_1\nι : Type u_1\nα : Type u_2\ninst✝⁴ : Fintype ι\ninst✝³ : LinearOrder ι\ninst✝² : LocallyFiniteOrderTop ι\ninst✝¹ : LocallyFiniteOrderBot ι\ninst✝ : CommMonoid α\nf : ι → ι → α\n⊢ ∀ (a : (_ : ι) × ι) (ha : a ∈ Finset.sigma univ fun x => Ioi x),\n    (fun i x => { fst := i.snd, snd := i.fst }) a ha ∈ Finset.sigma univ fun x => Iio x\n[PROOFSTEP]\nsimp\n[GOAL]\ncase e_a.refine'_2\nι : Type u_1\nα : Type u_2\ninst✝⁴ : Fintype ι\ninst✝³ : LinearOrder ι\ninst✝² : LocallyFiniteOrderTop ι\ninst✝¹ : LocallyFiniteOrderBot ι\ninst✝ : CommMonoid α\nf : ι → ι → α\n⊢ ∀ (a : (_ : ι) × ι) (ha : a ∈ Finset.sigma univ fun x => Ioi x),\n    f a.fst a.snd =\n      f ((fun i x => { fst := i.snd, snd := i.fst }) a ha).snd ((fun i x => { fst := i.snd, snd := i.fst }) a ha).fst\n[PROOFSTEP]\nsimp\n[GOAL]\ncase e_a.refine'_3\nι : Type u_1\nα : Type u_2\ninst✝⁴ : Fintype ι\ninst✝³ : LinearOrder ι\ninst✝² : LocallyFiniteOrderTop ι\ninst✝¹ : LocallyFiniteOrderBot ι\ninst✝ : CommMonoid α\nf : ι → ι → α\n⊢ ∀ (a : (_ : ι) × ι) (ha : a ∈ Finset.sigma univ fun x => Iio x),\n    (fun i x => { fst := i.snd, snd := i.fst }) a ha ∈ Finset.sigma univ fun x => Ioi x\n[PROOFSTEP]\nsimp\n[GOAL]\ncase e_a.refine'_4\nι : Type u_1\nα : Type u_2\ninst✝⁴ : Fintype ι\ninst✝³ : LinearOrder ι\ninst✝² : LocallyFiniteOrderTop ι\ninst✝¹ : LocallyFiniteOrderBot ι\ninst✝ : CommMonoid α\nf : ι → ι → α\n⊢ ∀ (a : (_ : ι) × ι) (ha : a ∈ Finset.sigma univ fun x => Ioi x),\n    (fun i x => { fst := i.snd, snd := i.fst }) ((fun i x => { fst := i.snd, snd := i.fst }) a ha)\n        (_ : { fst := a.snd, snd := a.fst } ∈ Finset.sigma univ fun x => Iio x) =\n      a\n[PROOFSTEP]\nsimp\n[GOAL]\ncase e_a.refine'_5\nι : Type u_1\nα : Type u_2\ninst✝⁴ : Fintype ι\ninst✝³ : LinearOrder ι\ninst✝² : LocallyFiniteOrderTop ι\ninst✝¹ : LocallyFiniteOrderBot ι\ninst✝ : CommMonoid α\nf : ι → ι → α\n⊢ ∀ (a : (_ : ι) × ι) (ha : a ∈ Finset.sigma univ fun x => Iio x),\n    (fun i x => { fst := i.snd, snd := i.fst }) ((fun i x => { fst := i.snd, snd := i.fst }) a ha)\n        (_ : { fst := a.snd, snd := a.fst } ∈ Finset.sigma univ fun x => Ioi x) =\n      a\n[PROOFSTEP]\nsimp\n", "meta": {"mathlib_filename": "Mathlib.Data.Finset.LocallyFinite", "llama_tokens": 29405, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7606506635289836, "lm_q2_score": 0.7090191276365463, "lm_q1q2_score": 0.5393158698914801}}
{"text": "[GOAL]\nm n : ℕ\ncop : coprime m n\nhm : 1 < m\nhn : 1 < n\n⊢ FrobeniusNumber (m * n - m - n) {m, n}\n[PROOFSTEP]\nsimp_rw [FrobeniusNumber, AddSubmonoid.mem_closure_pair]\n[GOAL]\nm n : ℕ\ncop : coprime m n\nhm : 1 < m\nhn : 1 < n\n⊢ IsGreatest {k | ¬∃ m_1 n_1, m_1 • m + n_1 • n = k} (m * n - m - n)\n[PROOFSTEP]\nhave hmn : m + n ≤ m * n := add_le_mul hm hn\n[GOAL]\nm n : ℕ\ncop : coprime m n\nhm : 1 < m\nhn : 1 < n\nhmn : m + n ≤ m * n\n⊢ IsGreatest {k | ¬∃ m_1 n_1, m_1 • m + n_1 • n = k} (m * n - m - n)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase left\nm n : ℕ\ncop : coprime m n\nhm : 1 < m\nhn : 1 < n\nhmn : m + n ≤ m * n\n⊢ m * n - m - n ∈ {k | ¬∃ m_1 n_1, m_1 • m + n_1 • n = k}\n[PROOFSTEP]\npush_neg\n[GOAL]\ncase left\nm n : ℕ\ncop : coprime m n\nhm : 1 < m\nhn : 1 < n\nhmn : m + n ≤ m * n\n⊢ m * n - m - n ∈ {k | ∀ (m_1 n_1 : ℕ), m_1 • m + n_1 • n ≠ k}\n[PROOFSTEP]\nintro a b h\n[GOAL]\ncase left\nm n : ℕ\ncop : coprime m n\nhm : 1 < m\nhn : 1 < n\nhmn : m + n ≤ m * n\na b : ℕ\nh : a • m + b • n = m * n - m - n\n⊢ False\n[PROOFSTEP]\napply cop.mul_add_mul_ne_mul (add_one_ne_zero a) (add_one_ne_zero b)\n[GOAL]\ncase left\nm n : ℕ\ncop : coprime m n\nhm : 1 < m\nhn : 1 < n\nhmn : m + n ≤ m * n\na b : ℕ\nh : a • m + b • n = m * n - m - n\n⊢ (a + 1) * m + (b + 1) * n = m * n\n[PROOFSTEP]\nsimp only [Nat.sub_sub, smul_eq_mul] at h \n[GOAL]\ncase left\nm n : ℕ\ncop : coprime m n\nhm : 1 < m\nhn : 1 < n\nhmn : m + n ≤ m * n\na b : ℕ\nh : a * m + b * n = m * n - (m + n)\n⊢ (a + 1) * m + (b + 1) * n = m * n\n[PROOFSTEP]\nzify [hmn] at h ⊢\n[GOAL]\ncase left\nm n : ℕ\ncop : coprime m n\nhm : 1 < m\nhn : 1 < n\nhmn : m + n ≤ m * n\na b : ℕ\nh : ↑a * ↑m + ↑b * ↑n = ↑m * ↑n - (↑m + ↑n)\n⊢ (↑a + 1) * ↑m + (↑b + 1) * ↑n = ↑m * ↑n\n[PROOFSTEP]\nrw [← sub_eq_zero] at h ⊢\n[GOAL]\ncase left\nm n : ℕ\ncop : coprime m n\nhm : 1 < m\nhn : 1 < n\nhmn : m + n ≤ m * n\na b : ℕ\nh✝ : ↑a * ↑m + ↑b * ↑n = ↑m * ↑n - (↑m + ↑n)\nh : ↑a * ↑m + ↑b * ↑n - (↑m * ↑n - (↑m + ↑n)) = 0\n⊢ (↑a + 1) * ↑m + (↑b + 1) * ↑n - ↑m * ↑n = 0\n[PROOFSTEP]\nrw [← h]\n[GOAL]\ncase left\nm n : ℕ\ncop : coprime m n\nhm : 1 < m\nhn : 1 < n\nhmn : m + n ≤ m * n\na b : ℕ\nh✝ : ↑a * ↑m + ↑b * ↑n = ↑m * ↑n - (↑m + ↑n)\nh : ↑a * ↑m + ↑b * ↑n - (↑m * ↑n - (↑m + ↑n)) = 0\n⊢ (↑a + 1) * ↑m + (↑b + 1) * ↑n - ↑m * ↑n = ↑a * ↑m + ↑b * ↑n - (↑m * ↑n - (↑m + ↑n))\n[PROOFSTEP]\nring\n[GOAL]\ncase right\nm n : ℕ\ncop : coprime m n\nhm : 1 < m\nhn : 1 < n\nhmn : m + n ≤ m * n\n⊢ m * n - m - n ∈ upperBounds {k | ¬∃ m_1 n_1, m_1 • m + n_1 • n = k}\n[PROOFSTEP]\nintro k hk\n[GOAL]\ncase right\nm n : ℕ\ncop : coprime m n\nhm : 1 < m\nhn : 1 < n\nhmn : m + n ≤ m * n\nk : ℕ\nhk : k ∈ {k | ¬∃ m_1 n_1, m_1 • m + n_1 • n = k}\n⊢ k ≤ m * n - m - n\n[PROOFSTEP]\ndsimp at hk \n[GOAL]\ncase right\nm n : ℕ\ncop : coprime m n\nhm : 1 < m\nhn : 1 < n\nhmn : m + n ≤ m * n\nk : ℕ\nhk : ¬∃ m_1 n_1, m_1 * m + n_1 * n = k\n⊢ k ≤ m * n - m - n\n[PROOFSTEP]\ncontrapose! hk\n[GOAL]\ncase right\nm n : ℕ\ncop : coprime m n\nhm : 1 < m\nhn : 1 < n\nhmn : m + n ≤ m * n\nk : ℕ\nhk : m * n - m - n < k\n⊢ ∃ m_1 n_1, m_1 * m + n_1 * n = k\n[PROOFSTEP]\nlet x := chineseRemainder cop 0 k\n[GOAL]\ncase right\nm n : ℕ\ncop : coprime m n\nhm : 1 < m\nhn : 1 < n\nhmn : m + n ≤ m * n\nk : ℕ\nhk : m * n - m - n < k\nx : { k_1 // k_1 ≡ 0 [MOD m] ∧ k_1 ≡ k [MOD n] } := chineseRemainder cop 0 k\n⊢ ∃ m_1 n_1, m_1 * m + n_1 * n = k\n[PROOFSTEP]\nhave hx : x.val < m * n := chineseRemainder_lt_mul cop 0 k (ne_bot_of_gt hm) (ne_bot_of_gt hn)\n[GOAL]\ncase right\nm n : ℕ\ncop : coprime m n\nhm : 1 < m\nhn : 1 < n\nhmn : m + n ≤ m * n\nk : ℕ\nhk : m * n - m - n < k\nx : { k_1 // k_1 ≡ 0 [MOD m] ∧ k_1 ≡ k [MOD n] } := chineseRemainder cop 0 k\nhx : ↑x < m * n\n⊢ ∃ m_1 n_1, m_1 * m + n_1 * n = k\n[PROOFSTEP]\nsuffices key : x.1 ≤ k\n[GOAL]\ncase right\nm n : ℕ\ncop : coprime m n\nhm : 1 < m\nhn : 1 < n\nhmn : m + n ≤ m * n\nk : ℕ\nhk : m * n - m - n < k\nx : { k_1 // k_1 ≡ 0 [MOD m] ∧ k_1 ≡ k [MOD n] } := chineseRemainder cop 0 k\nhx : ↑x < m * n\nkey : ↑x ≤ k\n⊢ ∃ m_1 n_1, m_1 * m + n_1 * n = k\n[PROOFSTEP]\nobtain ⟨a, ha⟩ := modEq_zero_iff_dvd.mp x.2.1\n[GOAL]\ncase right.intro\nm n : ℕ\ncop : coprime m n\nhm : 1 < m\nhn : 1 < n\nhmn : m + n ≤ m * n\nk : ℕ\nhk : m * n - m - n < k\nx : { k_1 // k_1 ≡ 0 [MOD m] ∧ k_1 ≡ k [MOD n] } := chineseRemainder cop 0 k\nhx : ↑x < m * n\nkey : ↑x ≤ k\na : ℕ\nha : ↑x = m * a\n⊢ ∃ m_1 n_1, m_1 * m + n_1 * n = k\n[PROOFSTEP]\nobtain ⟨b, hb⟩ := (modEq_iff_dvd' key).mp x.2.2\n[GOAL]\ncase right.intro.intro\nm n : ℕ\ncop : coprime m n\nhm : 1 < m\nhn : 1 < n\nhmn : m + n ≤ m * n\nk : ℕ\nhk : m * n - m - n < k\nx : { k_1 // k_1 ≡ 0 [MOD m] ∧ k_1 ≡ k [MOD n] } := chineseRemainder cop 0 k\nhx : ↑x < m * n\nkey : ↑x ≤ k\na : ℕ\nha : ↑x = m * a\nb : ℕ\nhb : k - ↑x = n * b\n⊢ ∃ m_1 n_1, m_1 * m + n_1 * n = k\n[PROOFSTEP]\nexact ⟨a, b, by rw [mul_comm, ← ha, mul_comm, ← hb, Nat.add_sub_of_le key]⟩\n[GOAL]\nm n : ℕ\ncop : coprime m n\nhm : 1 < m\nhn : 1 < n\nhmn : m + n ≤ m * n\nk : ℕ\nhk : m * n - m - n < k\nx : { k_1 // k_1 ≡ 0 [MOD m] ∧ k_1 ≡ k [MOD n] } := chineseRemainder cop 0 k\nhx : ↑x < m * n\nkey : ↑x ≤ k\na : ℕ\nha : ↑x = m * a\nb : ℕ\nhb : k - ↑x = n * b\n⊢ a * m + b * n = k\n[PROOFSTEP]\nrw [mul_comm, ← ha, mul_comm, ← hb, Nat.add_sub_of_le key]\n[GOAL]\ncase key\nm n : ℕ\ncop : coprime m n\nhm : 1 < m\nhn : 1 < n\nhmn : m + n ≤ m * n\nk : ℕ\nhk : m * n - m - n < k\nx : { k_1 // k_1 ≡ 0 [MOD m] ∧ k_1 ≡ k [MOD n] } := chineseRemainder cop 0 k\nhx : ↑x < m * n\n⊢ ↑x ≤ k\n[PROOFSTEP]\nrefine' ModEq.le_of_lt_add x.2.2 (lt_of_le_of_lt _ (add_lt_add_right hk n))\n[GOAL]\ncase key\nm n : ℕ\ncop : coprime m n\nhm : 1 < m\nhn : 1 < n\nhmn : m + n ≤ m * n\nk : ℕ\nhk : m * n - m - n < k\nx : { k_1 // k_1 ≡ 0 [MOD m] ∧ k_1 ≡ k [MOD n] } := chineseRemainder cop 0 k\nhx : ↑x < m * n\n⊢ ↑x ≤ m * n - m - n + n\n[PROOFSTEP]\nrw [Nat.sub_add_cancel (le_tsub_of_add_le_left hmn)]\n[GOAL]\ncase key\nm n : ℕ\ncop : coprime m n\nhm : 1 < m\nhn : 1 < n\nhmn : m + n ≤ m * n\nk : ℕ\nhk : m * n - m - n < k\nx : { k_1 // k_1 ≡ 0 [MOD m] ∧ k_1 ≡ k [MOD n] } := chineseRemainder cop 0 k\nhx : ↑x < m * n\n⊢ ↑x ≤ m * n - m\n[PROOFSTEP]\nexact\n  ModEq.le_of_lt_add (x.2.1.trans (modEq_zero_iff_dvd.mpr (Nat.dvd_sub' (dvd_mul_right m n) dvd_rfl)).symm)\n    (lt_of_lt_of_le hx le_tsub_add)\n", "meta": {"mathlib_filename": "Mathlib.NumberTheory.FrobeniusNumber", "llama_tokens": 3561, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8705972717658209, "lm_q2_score": 0.6187804337438501, "lm_q1q2_score": 0.5387085574394672}}
{"text": "[GOAL]\nα : Type u_1\ninst✝ : TopologicalSpace α\nι : Type u_2\n⊢ AnalyticSet ∅\n[PROOFSTEP]\nrw [AnalyticSet]\n[GOAL]\nα : Type u_1\ninst✝ : TopologicalSpace α\nι : Type u_2\n⊢ ∅ = ∅ ∨ ∃ f, Continuous f ∧ range f = ∅\n[PROOFSTEP]\nexact Or.inl rfl\n[GOAL]\nα : Type u_1\ninst✝² : TopologicalSpace α\nι : Type u_2\nβ : Type u_3\ninst✝¹ : TopologicalSpace β\ninst✝ : PolishSpace β\nf : β → α\nf_cont : Continuous f\n⊢ AnalyticSet (range f)\n[PROOFSTEP]\ncases isEmpty_or_nonempty β\n[GOAL]\ncase inl\nα : Type u_1\ninst✝² : TopologicalSpace α\nι : Type u_2\nβ : Type u_3\ninst✝¹ : TopologicalSpace β\ninst✝ : PolishSpace β\nf : β → α\nf_cont : Continuous f\nh✝ : IsEmpty β\n⊢ AnalyticSet (range f)\n[PROOFSTEP]\nrw [range_eq_empty]\n[GOAL]\ncase inl\nα : Type u_1\ninst✝² : TopologicalSpace α\nι : Type u_2\nβ : Type u_3\ninst✝¹ : TopologicalSpace β\ninst✝ : PolishSpace β\nf : β → α\nf_cont : Continuous f\nh✝ : IsEmpty β\n⊢ AnalyticSet ∅\n[PROOFSTEP]\nexact analyticSet_empty\n[GOAL]\ncase inr\nα : Type u_1\ninst✝² : TopologicalSpace α\nι : Type u_2\nβ : Type u_3\ninst✝¹ : TopologicalSpace β\ninst✝ : PolishSpace β\nf : β → α\nf_cont : Continuous f\nh✝ : Nonempty β\n⊢ AnalyticSet (range f)\n[PROOFSTEP]\nrw [AnalyticSet]\n[GOAL]\ncase inr\nα : Type u_1\ninst✝² : TopologicalSpace α\nι : Type u_2\nβ : Type u_3\ninst✝¹ : TopologicalSpace β\ninst✝ : PolishSpace β\nf : β → α\nf_cont : Continuous f\nh✝ : Nonempty β\n⊢ range f = ∅ ∨ ∃ f_1, Continuous f_1 ∧ range f_1 = range f\n[PROOFSTEP]\nobtain ⟨g, g_cont, hg⟩ : ∃ g : (ℕ → ℕ) → β, Continuous g ∧ Surjective g := exists_nat_nat_continuous_surjective β\n[GOAL]\ncase inr.intro.intro\nα : Type u_1\ninst✝² : TopologicalSpace α\nι : Type u_2\nβ : Type u_3\ninst✝¹ : TopologicalSpace β\ninst✝ : PolishSpace β\nf : β → α\nf_cont : Continuous f\nh✝ : Nonempty β\ng : (ℕ → ℕ) → β\ng_cont : Continuous g\nhg : Surjective g\n⊢ range f = ∅ ∨ ∃ f_1, Continuous f_1 ∧ range f_1 = range f\n[PROOFSTEP]\nrefine' Or.inr ⟨f ∘ g, f_cont.comp g_cont, _⟩\n[GOAL]\ncase inr.intro.intro\nα : Type u_1\ninst✝² : TopologicalSpace α\nι : Type u_2\nβ : Type u_3\ninst✝¹ : TopologicalSpace β\ninst✝ : PolishSpace β\nf : β → α\nf_cont : Continuous f\nh✝ : Nonempty β\ng : (ℕ → ℕ) → β\ng_cont : Continuous g\nhg : Surjective g\n⊢ range (f ∘ g) = range f\n[PROOFSTEP]\nrw [hg.range_comp]\n[GOAL]\nα : Type u_1\ninst✝² : TopologicalSpace α\nι : Type u_2\nβ : Type u_3\ninst✝¹ : TopologicalSpace β\ninst✝ : PolishSpace β\ns : Set β\nhs : IsOpen s\nf : β → α\nf_cont : Continuous f\n⊢ AnalyticSet (f '' s)\n[PROOFSTEP]\nrw [image_eq_range]\n[GOAL]\nα : Type u_1\ninst✝² : TopologicalSpace α\nι : Type u_2\nβ : Type u_3\ninst✝¹ : TopologicalSpace β\ninst✝ : PolishSpace β\ns : Set β\nhs : IsOpen s\nf : β → α\nf_cont : Continuous f\n⊢ AnalyticSet (range fun x => f ↑x)\n[PROOFSTEP]\nhaveI : PolishSpace s := hs.polishSpace\n[GOAL]\nα : Type u_1\ninst✝² : TopologicalSpace α\nι : Type u_2\nβ : Type u_3\ninst✝¹ : TopologicalSpace β\ninst✝ : PolishSpace β\ns : Set β\nhs : IsOpen s\nf : β → α\nf_cont : Continuous f\nthis : PolishSpace ↑s\n⊢ AnalyticSet (range fun x => f ↑x)\n[PROOFSTEP]\nexact analyticSet_range_of_polishSpace (f_cont.comp continuous_subtype_val)\n[GOAL]\nα : Type u_1\ninst✝ : TopologicalSpace α\nι : Type u_2\ns : Set α\n⊢ AnalyticSet s ↔ ∃ β h x f, Continuous f ∧ range f = s\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type u_1\ninst✝ : TopologicalSpace α\nι : Type u_2\ns : Set α\n⊢ AnalyticSet s → ∃ β h x f, Continuous f ∧ range f = s\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nα : Type u_1\ninst✝ : TopologicalSpace α\nι : Type u_2\ns : Set α\nh : AnalyticSet s\n⊢ ∃ β h x f, Continuous f ∧ range f = s\n[PROOFSTEP]\nrw [AnalyticSet] at h \n[GOAL]\ncase mp\nα : Type u_1\ninst✝ : TopologicalSpace α\nι : Type u_2\ns : Set α\nh : s = ∅ ∨ ∃ f, Continuous f ∧ range f = s\n⊢ ∃ β h x f, Continuous f ∧ range f = s\n[PROOFSTEP]\ncases' h with h h\n[GOAL]\ncase mp.inl\nα : Type u_1\ninst✝ : TopologicalSpace α\nι : Type u_2\ns : Set α\nh : s = ∅\n⊢ ∃ β h x f, Continuous f ∧ range f = s\n[PROOFSTEP]\nrefine' ⟨Empty, inferInstance, inferInstance, Empty.elim, continuous_bot, _⟩\n[GOAL]\ncase mp.inl\nα : Type u_1\ninst✝ : TopologicalSpace α\nι : Type u_2\ns : Set α\nh : s = ∅\n⊢ range Empty.elim = s\n[PROOFSTEP]\nrw [h]\n[GOAL]\ncase mp.inl\nα : Type u_1\ninst✝ : TopologicalSpace α\nι : Type u_2\ns : Set α\nh : s = ∅\n⊢ range Empty.elim = ∅\n[PROOFSTEP]\nexact range_eq_empty _\n[GOAL]\ncase mp.inr\nα : Type u_1\ninst✝ : TopologicalSpace α\nι : Type u_2\ns : Set α\nh : ∃ f, Continuous f ∧ range f = s\n⊢ ∃ β h x f, Continuous f ∧ range f = s\n[PROOFSTEP]\nexact ⟨ℕ → ℕ, inferInstance, inferInstance, h⟩\n[GOAL]\ncase mpr\nα : Type u_1\ninst✝ : TopologicalSpace α\nι : Type u_2\ns : Set α\n⊢ (∃ β h x f, Continuous f ∧ range f = s) → AnalyticSet s\n[PROOFSTEP]\nrintro ⟨β, h, h', f, f_cont, f_range⟩\n[GOAL]\ncase mpr.intro.intro.intro.intro.intro\nα : Type u_1\ninst✝ : TopologicalSpace α\nι : Type u_2\ns : Set α\nβ : Type\nh : TopologicalSpace β\nh' : PolishSpace β\nf : β → α\nf_cont : Continuous f\nf_range : range f = s\n⊢ AnalyticSet s\n[PROOFSTEP]\nskip\n[GOAL]\ncase mpr.intro.intro.intro.intro.intro\nα : Type u_1\ninst✝ : TopologicalSpace α\nι : Type u_2\ns : Set α\nβ : Type\nh : TopologicalSpace β\nh' : PolishSpace β\nf : β → α\nf_cont : Continuous f\nf_range : range f = s\n⊢ AnalyticSet s\n[PROOFSTEP]\nrw [← f_range]\n[GOAL]\ncase mpr.intro.intro.intro.intro.intro\nα : Type u_1\ninst✝ : TopologicalSpace α\nι : Type u_2\ns : Set α\nβ : Type\nh : TopologicalSpace β\nh' : PolishSpace β\nf : β → α\nf_cont : Continuous f\nf_range : range f = s\n⊢ AnalyticSet (range f)\n[PROOFSTEP]\nexact analyticSet_range_of_polishSpace f_cont\n[GOAL]\nα : Type u_1\ninst✝¹ : TopologicalSpace α\nι : Type u_2\nβ : Type u_3\ninst✝ : TopologicalSpace β\ns : Set α\nhs : AnalyticSet s\nf : α → β\nhf : ContinuousOn f s\n⊢ AnalyticSet (f '' s)\n[PROOFSTEP]\nrcases analyticSet_iff_exists_polishSpace_range.1 hs with ⟨γ, γtop, γpolish, g, g_cont, gs⟩\n[GOAL]\ncase intro.intro.intro.intro.intro\nα : Type u_1\ninst✝¹ : TopologicalSpace α\nι : Type u_2\nβ : Type u_3\ninst✝ : TopologicalSpace β\ns : Set α\nhs : AnalyticSet s\nf : α → β\nhf : ContinuousOn f s\nγ : Type\nγtop : TopologicalSpace γ\nγpolish : PolishSpace γ\ng : γ → α\ng_cont : Continuous g\ngs : range g = s\n⊢ AnalyticSet (f '' s)\n[PROOFSTEP]\nskip\n[GOAL]\ncase intro.intro.intro.intro.intro\nα : Type u_1\ninst✝¹ : TopologicalSpace α\nι : Type u_2\nβ : Type u_3\ninst✝ : TopologicalSpace β\ns : Set α\nhs : AnalyticSet s\nf : α → β\nhf : ContinuousOn f s\nγ : Type\nγtop : TopologicalSpace γ\nγpolish : PolishSpace γ\ng : γ → α\ng_cont : Continuous g\ngs : range g = s\n⊢ AnalyticSet (f '' s)\n[PROOFSTEP]\nhave : f '' s = range (f ∘ g) := by rw [range_comp, gs]\n[GOAL]\nα : Type u_1\ninst✝¹ : TopologicalSpace α\nι : Type u_2\nβ : Type u_3\ninst✝ : TopologicalSpace β\ns : Set α\nhs : AnalyticSet s\nf : α → β\nhf : ContinuousOn f s\nγ : Type\nγtop : TopologicalSpace γ\nγpolish : PolishSpace γ\ng : γ → α\ng_cont : Continuous g\ngs : range g = s\n⊢ f '' s = range (f ∘ g)\n[PROOFSTEP]\nrw [range_comp, gs]\n[GOAL]\ncase intro.intro.intro.intro.intro\nα : Type u_1\ninst✝¹ : TopologicalSpace α\nι : Type u_2\nβ : Type u_3\ninst✝ : TopologicalSpace β\ns : Set α\nhs : AnalyticSet s\nf : α → β\nhf : ContinuousOn f s\nγ : Type\nγtop : TopologicalSpace γ\nγpolish : PolishSpace γ\ng : γ → α\ng_cont : Continuous g\ngs : range g = s\nthis : f '' s = range (f ∘ g)\n⊢ AnalyticSet (f '' s)\n[PROOFSTEP]\nrw [this]\n[GOAL]\ncase intro.intro.intro.intro.intro\nα : Type u_1\ninst✝¹ : TopologicalSpace α\nι : Type u_2\nβ : Type u_3\ninst✝ : TopologicalSpace β\ns : Set α\nhs : AnalyticSet s\nf : α → β\nhf : ContinuousOn f s\nγ : Type\nγtop : TopologicalSpace γ\nγpolish : PolishSpace γ\ng : γ → α\ng_cont : Continuous g\ngs : range g = s\nthis : f '' s = range (f ∘ g)\n⊢ AnalyticSet (range (f ∘ g))\n[PROOFSTEP]\napply analyticSet_range_of_polishSpace\n[GOAL]\ncase intro.intro.intro.intro.intro.f_cont\nα : Type u_1\ninst✝¹ : TopologicalSpace α\nι : Type u_2\nβ : Type u_3\ninst✝ : TopologicalSpace β\ns : Set α\nhs : AnalyticSet s\nf : α → β\nhf : ContinuousOn f s\nγ : Type\nγtop : TopologicalSpace γ\nγpolish : PolishSpace γ\ng : γ → α\ng_cont : Continuous g\ngs : range g = s\nthis : f '' s = range (f ∘ g)\n⊢ Continuous (f ∘ g)\n[PROOFSTEP]\napply hf.comp_continuous g_cont fun x => _\n[GOAL]\nα : Type u_1\ninst✝¹ : TopologicalSpace α\nι : Type u_2\nβ : Type u_3\ninst✝ : TopologicalSpace β\ns : Set α\nhs : AnalyticSet s\nf : α → β\nhf : ContinuousOn f s\nγ : Type\nγtop : TopologicalSpace γ\nγpolish : PolishSpace γ\ng : γ → α\ng_cont : Continuous g\ngs : range g = s\nthis : f '' s = range (f ∘ g)\n⊢ ∀ (x : γ), g x ∈ s\n[PROOFSTEP]\nrw [← gs]\n[GOAL]\nα : Type u_1\ninst✝¹ : TopologicalSpace α\nι : Type u_2\nβ : Type u_3\ninst✝ : TopologicalSpace β\ns : Set α\nhs : AnalyticSet s\nf : α → β\nhf : ContinuousOn f s\nγ : Type\nγtop : TopologicalSpace γ\nγpolish : PolishSpace γ\ng : γ → α\ng_cont : Continuous g\ngs : range g = s\nthis : f '' s = range (f ∘ g)\n⊢ ∀ (x : γ), g x ∈ range g\n[PROOFSTEP]\nexact mem_range_self\n[GOAL]\nα : Type u_1\ninst✝² : TopologicalSpace α\nι : Type u_2\nhι : Nonempty ι\ninst✝¹ : Countable ι\ninst✝ : T2Space α\ns : ι → Set α\nhs : ∀ (n : ι), AnalyticSet (s n)\n⊢ AnalyticSet (⋂ (n : ι), s n)\n[PROOFSTEP]\nrcases hι with\n  ⟨i₀⟩\n    /- For the proof, write each `s n` as the continuous image under a map `f n` of a\n        Polish space `β n`. The product space `γ = Π n, β n` is also Polish, and so is the subset\n        `t` of sequences `x n` for which `f n (x n)` is independent of `n`. The set `t` is Polish, and\n        the range of `x ↦ f 0 (x 0)` on `t` is exactly `⋂ n, s n`, so this set is analytic. -/\n[GOAL]\ncase intro\nα : Type u_1\ninst✝² : TopologicalSpace α\nι : Type u_2\ninst✝¹ : Countable ι\ninst✝ : T2Space α\ns : ι → Set α\nhs : ∀ (n : ι), AnalyticSet (s n)\ni₀ : ι\n⊢ AnalyticSet (⋂ (n : ι), s n)\n[PROOFSTEP]\nchoose β hβ h'β f f_cont f_range using fun n => analyticSet_iff_exists_polishSpace_range.1 (hs n)\n[GOAL]\ncase intro\nα : Type u_1\ninst✝² : TopologicalSpace α\nι : Type u_2\ninst✝¹ : Countable ι\ninst✝ : T2Space α\ns : ι → Set α\nhs : ∀ (n : ι), AnalyticSet (s n)\ni₀ : ι\nβ : ι → Type\nhβ : (n : ι) → TopologicalSpace (β n)\nh'β : ∀ (n : ι), PolishSpace (β n)\nf : (n : ι) → β n → α\nf_cont : ∀ (n : ι), Continuous (f n)\nf_range : ∀ (n : ι), range (f n) = s n\n⊢ AnalyticSet (⋂ (n : ι), s n)\n[PROOFSTEP]\nskip\n[GOAL]\ncase intro\nα : Type u_1\ninst✝² : TopologicalSpace α\nι : Type u_2\ninst✝¹ : Countable ι\ninst✝ : T2Space α\ns : ι → Set α\nhs : ∀ (n : ι), AnalyticSet (s n)\ni₀ : ι\nβ : ι → Type\nhβ : (n : ι) → TopologicalSpace (β n)\nh'β : ∀ (n : ι), PolishSpace (β n)\nf : (n : ι) → β n → α\nf_cont : ∀ (n : ι), Continuous (f n)\nf_range : ∀ (n : ι), range (f n) = s n\n⊢ AnalyticSet (⋂ (n : ι), s n)\n[PROOFSTEP]\nlet γ := ∀ n, β n\n[GOAL]\ncase intro\nα : Type u_1\ninst✝² : TopologicalSpace α\nι : Type u_2\ninst✝¹ : Countable ι\ninst✝ : T2Space α\ns : ι → Set α\nhs : ∀ (n : ι), AnalyticSet (s n)\ni₀ : ι\nβ : ι → Type\nhβ : (n : ι) → TopologicalSpace (β n)\nh'β : ∀ (n : ι), PolishSpace (β n)\nf : (n : ι) → β n → α\nf_cont : ∀ (n : ι), Continuous (f n)\nf_range : ∀ (n : ι), range (f n) = s n\nγ : Type u_2 := (n : ι) → β n\n⊢ AnalyticSet (⋂ (n : ι), s n)\n[PROOFSTEP]\nlet t : Set γ := ⋂ n, {x | f n (x n) = f i₀ (x i₀)}\n[GOAL]\ncase intro\nα : Type u_1\ninst✝² : TopologicalSpace α\nι : Type u_2\ninst✝¹ : Countable ι\ninst✝ : T2Space α\ns : ι → Set α\nhs : ∀ (n : ι), AnalyticSet (s n)\ni₀ : ι\nβ : ι → Type\nhβ : (n : ι) → TopologicalSpace (β n)\nh'β : ∀ (n : ι), PolishSpace (β n)\nf : (n : ι) → β n → α\nf_cont : ∀ (n : ι), Continuous (f n)\nf_range : ∀ (n : ι), range (f n) = s n\nγ : Type u_2 := (n : ι) → β n\nt : Set γ := ⋂ (n : ι), {x | f n (x n) = f i₀ (x i₀)}\n⊢ AnalyticSet (⋂ (n : ι), s n)\n[PROOFSTEP]\nhave t_closed : IsClosed t := by\n  apply isClosed_iInter\n  intro n\n  exact isClosed_eq ((f_cont n).comp (continuous_apply n)) ((f_cont i₀).comp (continuous_apply i₀))\n[GOAL]\nα : Type u_1\ninst✝² : TopologicalSpace α\nι : Type u_2\ninst✝¹ : Countable ι\ninst✝ : T2Space α\ns : ι → Set α\nhs : ∀ (n : ι), AnalyticSet (s n)\ni₀ : ι\nβ : ι → Type\nhβ : (n : ι) → TopologicalSpace (β n)\nh'β : ∀ (n : ι), PolishSpace (β n)\nf : (n : ι) → β n → α\nf_cont : ∀ (n : ι), Continuous (f n)\nf_range : ∀ (n : ι), range (f n) = s n\nγ : Type u_2 := (n : ι) → β n\nt : Set γ := ⋂ (n : ι), {x | f n (x n) = f i₀ (x i₀)}\n⊢ IsClosed t\n[PROOFSTEP]\napply isClosed_iInter\n[GOAL]\ncase h\nα : Type u_1\ninst✝² : TopologicalSpace α\nι : Type u_2\ninst✝¹ : Countable ι\ninst✝ : T2Space α\ns : ι → Set α\nhs : ∀ (n : ι), AnalyticSet (s n)\ni₀ : ι\nβ : ι → Type\nhβ : (n : ι) → TopologicalSpace (β n)\nh'β : ∀ (n : ι), PolishSpace (β n)\nf : (n : ι) → β n → α\nf_cont : ∀ (n : ι), Continuous (f n)\nf_range : ∀ (n : ι), range (f n) = s n\nγ : Type u_2 := (n : ι) → β n\nt : Set γ := ⋂ (n : ι), {x | f n (x n) = f i₀ (x i₀)}\n⊢ ∀ (i : ι), IsClosed {x | f i (x i) = f i₀ (x i₀)}\n[PROOFSTEP]\nintro n\n[GOAL]\ncase h\nα : Type u_1\ninst✝² : TopologicalSpace α\nι : Type u_2\ninst✝¹ : Countable ι\ninst✝ : T2Space α\ns : ι → Set α\nhs : ∀ (n : ι), AnalyticSet (s n)\ni₀ : ι\nβ : ι → Type\nhβ : (n : ι) → TopologicalSpace (β n)\nh'β : ∀ (n : ι), PolishSpace (β n)\nf : (n : ι) → β n → α\nf_cont : ∀ (n : ι), Continuous (f n)\nf_range : ∀ (n : ι), range (f n) = s n\nγ : Type u_2 := (n : ι) → β n\nt : Set γ := ⋂ (n : ι), {x | f n (x n) = f i₀ (x i₀)}\nn : ι\n⊢ IsClosed {x | f n (x n) = f i₀ (x i₀)}\n[PROOFSTEP]\nexact isClosed_eq ((f_cont n).comp (continuous_apply n)) ((f_cont i₀).comp (continuous_apply i₀))\n[GOAL]\ncase intro\nα : Type u_1\ninst✝² : TopologicalSpace α\nι : Type u_2\ninst✝¹ : Countable ι\ninst✝ : T2Space α\ns : ι → Set α\nhs : ∀ (n : ι), AnalyticSet (s n)\ni₀ : ι\nβ : ι → Type\nhβ : (n : ι) → TopologicalSpace (β n)\nh'β : ∀ (n : ι), PolishSpace (β n)\nf : (n : ι) → β n → α\nf_cont : ∀ (n : ι), Continuous (f n)\nf_range : ∀ (n : ι), range (f n) = s n\nγ : Type u_2 := (n : ι) → β n\nt : Set γ := ⋂ (n : ι), {x | f n (x n) = f i₀ (x i₀)}\nt_closed : IsClosed t\n⊢ AnalyticSet (⋂ (n : ι), s n)\n[PROOFSTEP]\nhaveI : PolishSpace t := t_closed.polishSpace\n[GOAL]\ncase intro\nα : Type u_1\ninst✝² : TopologicalSpace α\nι : Type u_2\ninst✝¹ : Countable ι\ninst✝ : T2Space α\ns : ι → Set α\nhs : ∀ (n : ι), AnalyticSet (s n)\ni₀ : ι\nβ : ι → Type\nhβ : (n : ι) → TopologicalSpace (β n)\nh'β : ∀ (n : ι), PolishSpace (β n)\nf : (n : ι) → β n → α\nf_cont : ∀ (n : ι), Continuous (f n)\nf_range : ∀ (n : ι), range (f n) = s n\nγ : Type u_2 := (n : ι) → β n\nt : Set γ := ⋂ (n : ι), {x | f n (x n) = f i₀ (x i₀)}\nt_closed : IsClosed t\nthis : PolishSpace ↑t\n⊢ AnalyticSet (⋂ (n : ι), s n)\n[PROOFSTEP]\nlet F : t → α := fun x => f i₀ ((x : γ) i₀)\n[GOAL]\ncase intro\nα : Type u_1\ninst✝² : TopologicalSpace α\nι : Type u_2\ninst✝¹ : Countable ι\ninst✝ : T2Space α\ns : ι → Set α\nhs : ∀ (n : ι), AnalyticSet (s n)\ni₀ : ι\nβ : ι → Type\nhβ : (n : ι) → TopologicalSpace (β n)\nh'β : ∀ (n : ι), PolishSpace (β n)\nf : (n : ι) → β n → α\nf_cont : ∀ (n : ι), Continuous (f n)\nf_range : ∀ (n : ι), range (f n) = s n\nγ : Type u_2 := (n : ι) → β n\nt : Set γ := ⋂ (n : ι), {x | f n (x n) = f i₀ (x i₀)}\nt_closed : IsClosed t\nthis : PolishSpace ↑t\nF : ↑t → α := fun x => f i₀ (↑x i₀)\n⊢ AnalyticSet (⋂ (n : ι), s n)\n[PROOFSTEP]\nhave F_cont : Continuous F := (f_cont i₀).comp ((continuous_apply i₀).comp continuous_subtype_val)\n[GOAL]\ncase intro\nα : Type u_1\ninst✝² : TopologicalSpace α\nι : Type u_2\ninst✝¹ : Countable ι\ninst✝ : T2Space α\ns : ι → Set α\nhs : ∀ (n : ι), AnalyticSet (s n)\ni₀ : ι\nβ : ι → Type\nhβ : (n : ι) → TopologicalSpace (β n)\nh'β : ∀ (n : ι), PolishSpace (β n)\nf : (n : ι) → β n → α\nf_cont : ∀ (n : ι), Continuous (f n)\nf_range : ∀ (n : ι), range (f n) = s n\nγ : Type u_2 := (n : ι) → β n\nt : Set γ := ⋂ (n : ι), {x | f n (x n) = f i₀ (x i₀)}\nt_closed : IsClosed t\nthis : PolishSpace ↑t\nF : ↑t → α := fun x => f i₀ (↑x i₀)\nF_cont : Continuous F\n⊢ AnalyticSet (⋂ (n : ι), s n)\n[PROOFSTEP]\nhave F_range : range F = ⋂ n : ι, s n := by\n  apply Subset.antisymm\n  · rintro y ⟨x, rfl⟩\n    refine mem_iInter.2 fun n => ?_\n    have : f n ((x : γ) n) = F x := (mem_iInter.1 x.2 n : _)\n    rw [← this, ← f_range n]\n    exact mem_range_self _\n  · intro y hy\n    have A : ∀ n, ∃ x : β n, f n x = y := by\n      intro n\n      rw [← mem_range, f_range n]\n      exact mem_iInter.1 hy n\n    choose x hx using A\n    have xt : x ∈ t := by\n      refine mem_iInter.2 fun n => ?_\n      simp [hx]\n    refine' ⟨⟨x, xt⟩, _⟩\n    exact hx i₀\n[GOAL]\nα : Type u_1\ninst✝² : TopologicalSpace α\nι : Type u_2\ninst✝¹ : Countable ι\ninst✝ : T2Space α\ns : ι → Set α\nhs : ∀ (n : ι), AnalyticSet (s n)\ni₀ : ι\nβ : ι → Type\nhβ : (n : ι) → TopologicalSpace (β n)\nh'β : ∀ (n : ι), PolishSpace (β n)\nf : (n : ι) → β n → α\nf_cont : ∀ (n : ι), Continuous (f n)\nf_range : ∀ (n : ι), range (f n) = s n\nγ : Type u_2 := (n : ι) → β n\nt : Set γ := ⋂ (n : ι), {x | f n (x n) = f i₀ (x i₀)}\nt_closed : IsClosed t\nthis : PolishSpace ↑t\nF : ↑t → α := fun x => f i₀ (↑x i₀)\nF_cont : Continuous F\n⊢ range F = ⋂ (n : ι), s n\n[PROOFSTEP]\napply Subset.antisymm\n[GOAL]\ncase h₁\nα : Type u_1\ninst✝² : TopologicalSpace α\nι : Type u_2\ninst✝¹ : Countable ι\ninst✝ : T2Space α\ns : ι → Set α\nhs : ∀ (n : ι), AnalyticSet (s n)\ni₀ : ι\nβ : ι → Type\nhβ : (n : ι) → TopologicalSpace (β n)\nh'β : ∀ (n : ι), PolishSpace (β n)\nf : (n : ι) → β n → α\nf_cont : ∀ (n : ι), Continuous (f n)\nf_range : ∀ (n : ι), range (f n) = s n\nγ : Type u_2 := (n : ι) → β n\nt : Set γ := ⋂ (n : ι), {x | f n (x n) = f i₀ (x i₀)}\nt_closed : IsClosed t\nthis : PolishSpace ↑t\nF : ↑t → α := fun x => f i₀ (↑x i₀)\nF_cont : Continuous F\n⊢ range F ⊆ ⋂ (n : ι), s n\n[PROOFSTEP]\nrintro y ⟨x, rfl⟩\n[GOAL]\ncase h₁.intro\nα : Type u_1\ninst✝² : TopologicalSpace α\nι : Type u_2\ninst✝¹ : Countable ι\ninst✝ : T2Space α\ns : ι → Set α\nhs : ∀ (n : ι), AnalyticSet (s n)\ni₀ : ι\nβ : ι → Type\nhβ : (n : ι) → TopologicalSpace (β n)\nh'β : ∀ (n : ι), PolishSpace (β n)\nf : (n : ι) → β n → α\nf_cont : ∀ (n : ι), Continuous (f n)\nf_range : ∀ (n : ι), range (f n) = s n\nγ : Type u_2 := (n : ι) → β n\nt : Set γ := ⋂ (n : ι), {x | f n (x n) = f i₀ (x i₀)}\nt_closed : IsClosed t\nthis : PolishSpace ↑t\nF : ↑t → α := fun x => f i₀ (↑x i₀)\nF_cont : Continuous F\nx : ↑t\n⊢ F x ∈ ⋂ (n : ι), s n\n[PROOFSTEP]\nrefine mem_iInter.2 fun n => ?_\n[GOAL]\ncase h₁.intro\nα : Type u_1\ninst✝² : TopologicalSpace α\nι : Type u_2\ninst✝¹ : Countable ι\ninst✝ : T2Space α\ns : ι → Set α\nhs : ∀ (n : ι), AnalyticSet (s n)\ni₀ : ι\nβ : ι → Type\nhβ : (n : ι) → TopologicalSpace (β n)\nh'β : ∀ (n : ι), PolishSpace (β n)\nf : (n : ι) → β n → α\nf_cont : ∀ (n : ι), Continuous (f n)\nf_range : ∀ (n : ι), range (f n) = s n\nγ : Type u_2 := (n : ι) → β n\nt : Set γ := ⋂ (n : ι), {x | f n (x n) = f i₀ (x i₀)}\nt_closed : IsClosed t\nthis : PolishSpace ↑t\nF : ↑t → α := fun x => f i₀ (↑x i₀)\nF_cont : Continuous F\nx : ↑t\nn : ι\n⊢ F x ∈ s n\n[PROOFSTEP]\nhave : f n ((x : γ) n) = F x := (mem_iInter.1 x.2 n : _)\n[GOAL]\ncase h₁.intro\nα : Type u_1\ninst✝² : TopologicalSpace α\nι : Type u_2\ninst✝¹ : Countable ι\ninst✝ : T2Space α\ns : ι → Set α\nhs : ∀ (n : ι), AnalyticSet (s n)\ni₀ : ι\nβ : ι → Type\nhβ : (n : ι) → TopologicalSpace (β n)\nh'β : ∀ (n : ι), PolishSpace (β n)\nf : (n : ι) → β n → α\nf_cont : ∀ (n : ι), Continuous (f n)\nf_range : ∀ (n : ι), range (f n) = s n\nγ : Type u_2 := (n : ι) → β n\nt : Set γ := ⋂ (n : ι), {x | f n (x n) = f i₀ (x i₀)}\nt_closed : IsClosed t\nthis✝ : PolishSpace ↑t\nF : ↑t → α := fun x => f i₀ (↑x i₀)\nF_cont : Continuous F\nx : ↑t\nn : ι\nthis : f n (↑x n) = F x\n⊢ F x ∈ s n\n[PROOFSTEP]\nrw [← this, ← f_range n]\n[GOAL]\ncase h₁.intro\nα : Type u_1\ninst✝² : TopologicalSpace α\nι : Type u_2\ninst✝¹ : Countable ι\ninst✝ : T2Space α\ns : ι → Set α\nhs : ∀ (n : ι), AnalyticSet (s n)\ni₀ : ι\nβ : ι → Type\nhβ : (n : ι) → TopologicalSpace (β n)\nh'β : ∀ (n : ι), PolishSpace (β n)\nf : (n : ι) → β n → α\nf_cont : ∀ (n : ι), Continuous (f n)\nf_range : ∀ (n : ι), range (f n) = s n\nγ : Type u_2 := (n : ι) → β n\nt : Set γ := ⋂ (n : ι), {x | f n (x n) = f i₀ (x i₀)}\nt_closed : IsClosed t\nthis✝ : PolishSpace ↑t\nF : ↑t → α := fun x => f i₀ (↑x i₀)\nF_cont : Continuous F\nx : ↑t\nn : ι\nthis : f n (↑x n) = F x\n⊢ f n (↑x n) ∈ range (f n)\n[PROOFSTEP]\nexact mem_range_self _\n[GOAL]\ncase h₂\nα : Type u_1\ninst✝² : TopologicalSpace α\nι : Type u_2\ninst✝¹ : Countable ι\ninst✝ : T2Space α\ns : ι → Set α\nhs : ∀ (n : ι), AnalyticSet (s n)\ni₀ : ι\nβ : ι → Type\nhβ : (n : ι) → TopologicalSpace (β n)\nh'β : ∀ (n : ι), PolishSpace (β n)\nf : (n : ι) → β n → α\nf_cont : ∀ (n : ι), Continuous (f n)\nf_range : ∀ (n : ι), range (f n) = s n\nγ : Type u_2 := (n : ι) → β n\nt : Set γ := ⋂ (n : ι), {x | f n (x n) = f i₀ (x i₀)}\nt_closed : IsClosed t\nthis : PolishSpace ↑t\nF : ↑t → α := fun x => f i₀ (↑x i₀)\nF_cont : Continuous F\n⊢ ⋂ (n : ι), s n ⊆ range F\n[PROOFSTEP]\nintro y hy\n[GOAL]\ncase h₂\nα : Type u_1\ninst✝² : TopologicalSpace α\nι : Type u_2\ninst✝¹ : Countable ι\ninst✝ : T2Space α\ns : ι → Set α\nhs : ∀ (n : ι), AnalyticSet (s n)\ni₀ : ι\nβ : ι → Type\nhβ : (n : ι) → TopologicalSpace (β n)\nh'β : ∀ (n : ι), PolishSpace (β n)\nf : (n : ι) → β n → α\nf_cont : ∀ (n : ι), Continuous (f n)\nf_range : ∀ (n : ι), range (f n) = s n\nγ : Type u_2 := (n : ι) → β n\nt : Set γ := ⋂ (n : ι), {x | f n (x n) = f i₀ (x i₀)}\nt_closed : IsClosed t\nthis : PolishSpace ↑t\nF : ↑t → α := fun x => f i₀ (↑x i₀)\nF_cont : Continuous F\ny : α\nhy : y ∈ ⋂ (n : ι), s n\n⊢ y ∈ range F\n[PROOFSTEP]\nhave A : ∀ n, ∃ x : β n, f n x = y := by\n  intro n\n  rw [← mem_range, f_range n]\n  exact mem_iInter.1 hy n\n[GOAL]\nα : Type u_1\ninst✝² : TopologicalSpace α\nι : Type u_2\ninst✝¹ : Countable ι\ninst✝ : T2Space α\ns : ι → Set α\nhs : ∀ (n : ι), AnalyticSet (s n)\ni₀ : ι\nβ : ι → Type\nhβ : (n : ι) → TopologicalSpace (β n)\nh'β : ∀ (n : ι), PolishSpace (β n)\nf : (n : ι) → β n → α\nf_cont : ∀ (n : ι), Continuous (f n)\nf_range : ∀ (n : ι), range (f n) = s n\nγ : Type u_2 := (n : ι) → β n\nt : Set γ := ⋂ (n : ι), {x | f n (x n) = f i₀ (x i₀)}\nt_closed : IsClosed t\nthis : PolishSpace ↑t\nF : ↑t → α := fun x => f i₀ (↑x i₀)\nF_cont : Continuous F\ny : α\nhy : y ∈ ⋂ (n : ι), s n\n⊢ ∀ (n : ι), ∃ x, f n x = y\n[PROOFSTEP]\nintro n\n[GOAL]\nα : Type u_1\ninst✝² : TopologicalSpace α\nι : Type u_2\ninst✝¹ : Countable ι\ninst✝ : T2Space α\ns : ι → Set α\nhs : ∀ (n : ι), AnalyticSet (s n)\ni₀ : ι\nβ : ι → Type\nhβ : (n : ι) → TopologicalSpace (β n)\nh'β : ∀ (n : ι), PolishSpace (β n)\nf : (n : ι) → β n → α\nf_cont : ∀ (n : ι), Continuous (f n)\nf_range : ∀ (n : ι), range (f n) = s n\nγ : Type u_2 := (n : ι) → β n\nt : Set γ := ⋂ (n : ι), {x | f n (x n) = f i₀ (x i₀)}\nt_closed : IsClosed t\nthis : PolishSpace ↑t\nF : ↑t → α := fun x => f i₀ (↑x i₀)\nF_cont : Continuous F\ny : α\nhy : y ∈ ⋂ (n : ι), s n\nn : ι\n⊢ ∃ x, f n x = y\n[PROOFSTEP]\nrw [← mem_range, f_range n]\n[GOAL]\nα : Type u_1\ninst✝² : TopologicalSpace α\nι : Type u_2\ninst✝¹ : Countable ι\ninst✝ : T2Space α\ns : ι → Set α\nhs : ∀ (n : ι), AnalyticSet (s n)\ni₀ : ι\nβ : ι → Type\nhβ : (n : ι) → TopologicalSpace (β n)\nh'β : ∀ (n : ι), PolishSpace (β n)\nf : (n : ι) → β n → α\nf_cont : ∀ (n : ι), Continuous (f n)\nf_range : ∀ (n : ι), range (f n) = s n\nγ : Type u_2 := (n : ι) → β n\nt : Set γ := ⋂ (n : ι), {x | f n (x n) = f i₀ (x i₀)}\nt_closed : IsClosed t\nthis : PolishSpace ↑t\nF : ↑t → α := fun x => f i₀ (↑x i₀)\nF_cont : Continuous F\ny : α\nhy : y ∈ ⋂ (n : ι), s n\nn : ι\n⊢ y ∈ s n\n[PROOFSTEP]\nexact mem_iInter.1 hy n\n[GOAL]\ncase h₂\nα : Type u_1\ninst✝² : TopologicalSpace α\nι : Type u_2\ninst✝¹ : Countable ι\ninst✝ : T2Space α\ns : ι → Set α\nhs : ∀ (n : ι), AnalyticSet (s n)\ni₀ : ι\nβ : ι → Type\nhβ : (n : ι) → TopologicalSpace (β n)\nh'β : ∀ (n : ι), PolishSpace (β n)\nf : (n : ι) → β n → α\nf_cont : ∀ (n : ι), Continuous (f n)\nf_range : ∀ (n : ι), range (f n) = s n\nγ : Type u_2 := (n : ι) → β n\nt : Set γ := ⋂ (n : ι), {x | f n (x n) = f i₀ (x i₀)}\nt_closed : IsClosed t\nthis : PolishSpace ↑t\nF : ↑t → α := fun x => f i₀ (↑x i₀)\nF_cont : Continuous F\ny : α\nhy : y ∈ ⋂ (n : ι), s n\nA : ∀ (n : ι), ∃ x, f n x = y\n⊢ y ∈ range F\n[PROOFSTEP]\nchoose x hx using A\n[GOAL]\ncase h₂\nα : Type u_1\ninst✝² : TopologicalSpace α\nι : Type u_2\ninst✝¹ : Countable ι\ninst✝ : T2Space α\ns : ι → Set α\nhs : ∀ (n : ι), AnalyticSet (s n)\ni₀ : ι\nβ : ι → Type\nhβ : (n : ι) → TopologicalSpace (β n)\nh'β : ∀ (n : ι), PolishSpace (β n)\nf : (n : ι) → β n → α\nf_cont : ∀ (n : ι), Continuous (f n)\nf_range : ∀ (n : ι), range (f n) = s n\nγ : Type u_2 := (n : ι) → β n\nt : Set γ := ⋂ (n : ι), {x | f n (x n) = f i₀ (x i₀)}\nt_closed : IsClosed t\nthis : PolishSpace ↑t\nF : ↑t → α := fun x => f i₀ (↑x i₀)\nF_cont : Continuous F\ny : α\nhy : y ∈ ⋂ (n : ι), s n\nx : (n : ι) → β n\nhx : ∀ (n : ι), f n (x n) = y\n⊢ y ∈ range F\n[PROOFSTEP]\nhave xt : x ∈ t := by\n  refine mem_iInter.2 fun n => ?_\n  simp [hx]\n[GOAL]\nα : Type u_1\ninst✝² : TopologicalSpace α\nι : Type u_2\ninst✝¹ : Countable ι\ninst✝ : T2Space α\ns : ι → Set α\nhs : ∀ (n : ι), AnalyticSet (s n)\ni₀ : ι\nβ : ι → Type\nhβ : (n : ι) → TopologicalSpace (β n)\nh'β : ∀ (n : ι), PolishSpace (β n)\nf : (n : ι) → β n → α\nf_cont : ∀ (n : ι), Continuous (f n)\nf_range : ∀ (n : ι), range (f n) = s n\nγ : Type u_2 := (n : ι) → β n\nt : Set γ := ⋂ (n : ι), {x | f n (x n) = f i₀ (x i₀)}\nt_closed : IsClosed t\nthis : PolishSpace ↑t\nF : ↑t → α := fun x => f i₀ (↑x i₀)\nF_cont : Continuous F\ny : α\nhy : y ∈ ⋂ (n : ι), s n\nx : (n : ι) → β n\nhx : ∀ (n : ι), f n (x n) = y\n⊢ x ∈ t\n[PROOFSTEP]\nrefine mem_iInter.2 fun n => ?_\n[GOAL]\nα : Type u_1\ninst✝² : TopologicalSpace α\nι : Type u_2\ninst✝¹ : Countable ι\ninst✝ : T2Space α\ns : ι → Set α\nhs : ∀ (n : ι), AnalyticSet (s n)\ni₀ : ι\nβ : ι → Type\nhβ : (n : ι) → TopologicalSpace (β n)\nh'β : ∀ (n : ι), PolishSpace (β n)\nf : (n : ι) → β n → α\nf_cont : ∀ (n : ι), Continuous (f n)\nf_range : ∀ (n : ι), range (f n) = s n\nγ : Type u_2 := (n : ι) → β n\nt : Set γ := ⋂ (n : ι), {x | f n (x n) = f i₀ (x i₀)}\nt_closed : IsClosed t\nthis : PolishSpace ↑t\nF : ↑t → α := fun x => f i₀ (↑x i₀)\nF_cont : Continuous F\ny : α\nhy : y ∈ ⋂ (n : ι), s n\nx : (n : ι) → β n\nhx : ∀ (n : ι), f n (x n) = y\nn : ι\n⊢ x ∈ {x | f n (x n) = f i₀ (x i₀)}\n[PROOFSTEP]\nsimp [hx]\n[GOAL]\ncase h₂\nα : Type u_1\ninst✝² : TopologicalSpace α\nι : Type u_2\ninst✝¹ : Countable ι\ninst✝ : T2Space α\ns : ι → Set α\nhs : ∀ (n : ι), AnalyticSet (s n)\ni₀ : ι\nβ : ι → Type\nhβ : (n : ι) → TopologicalSpace (β n)\nh'β : ∀ (n : ι), PolishSpace (β n)\nf : (n : ι) → β n → α\nf_cont : ∀ (n : ι), Continuous (f n)\nf_range : ∀ (n : ι), range (f n) = s n\nγ : Type u_2 := (n : ι) → β n\nt : Set γ := ⋂ (n : ι), {x | f n (x n) = f i₀ (x i₀)}\nt_closed : IsClosed t\nthis : PolishSpace ↑t\nF : ↑t → α := fun x => f i₀ (↑x i₀)\nF_cont : Continuous F\ny : α\nhy : y ∈ ⋂ (n : ι), s n\nx : (n : ι) → β n\nhx : ∀ (n : ι), f n (x n) = y\nxt : x ∈ t\n⊢ y ∈ range F\n[PROOFSTEP]\nrefine' ⟨⟨x, xt⟩, _⟩\n[GOAL]\ncase h₂\nα : Type u_1\ninst✝² : TopologicalSpace α\nι : Type u_2\ninst✝¹ : Countable ι\ninst✝ : T2Space α\ns : ι → Set α\nhs : ∀ (n : ι), AnalyticSet (s n)\ni₀ : ι\nβ : ι → Type\nhβ : (n : ι) → TopologicalSpace (β n)\nh'β : ∀ (n : ι), PolishSpace (β n)\nf : (n : ι) → β n → α\nf_cont : ∀ (n : ι), Continuous (f n)\nf_range : ∀ (n : ι), range (f n) = s n\nγ : Type u_2 := (n : ι) → β n\nt : Set γ := ⋂ (n : ι), {x | f n (x n) = f i₀ (x i₀)}\nt_closed : IsClosed t\nthis : PolishSpace ↑t\nF : ↑t → α := fun x => f i₀ (↑x i₀)\nF_cont : Continuous F\ny : α\nhy : y ∈ ⋂ (n : ι), s n\nx : (n : ι) → β n\nhx : ∀ (n : ι), f n (x n) = y\nxt : x ∈ t\n⊢ F { val := x, property := xt } = y\n[PROOFSTEP]\nexact hx i₀\n[GOAL]\ncase intro\nα : Type u_1\ninst✝² : TopologicalSpace α\nι : Type u_2\ninst✝¹ : Countable ι\ninst✝ : T2Space α\ns : ι → Set α\nhs : ∀ (n : ι), AnalyticSet (s n)\ni₀ : ι\nβ : ι → Type\nhβ : (n : ι) → TopologicalSpace (β n)\nh'β : ∀ (n : ι), PolishSpace (β n)\nf : (n : ι) → β n → α\nf_cont : ∀ (n : ι), Continuous (f n)\nf_range : ∀ (n : ι), range (f n) = s n\nγ : Type u_2 := (n : ι) → β n\nt : Set γ := ⋂ (n : ι), {x | f n (x n) = f i₀ (x i₀)}\nt_closed : IsClosed t\nthis : PolishSpace ↑t\nF : ↑t → α := fun x => f i₀ (↑x i₀)\nF_cont : Continuous F\nF_range : range F = ⋂ (n : ι), s n\n⊢ AnalyticSet (⋂ (n : ι), s n)\n[PROOFSTEP]\nrw [← F_range]\n[GOAL]\ncase intro\nα : Type u_1\ninst✝² : TopologicalSpace α\nι : Type u_2\ninst✝¹ : Countable ι\ninst✝ : T2Space α\ns : ι → Set α\nhs : ∀ (n : ι), AnalyticSet (s n)\ni₀ : ι\nβ : ι → Type\nhβ : (n : ι) → TopologicalSpace (β n)\nh'β : ∀ (n : ι), PolishSpace (β n)\nf : (n : ι) → β n → α\nf_cont : ∀ (n : ι), Continuous (f n)\nf_range : ∀ (n : ι), range (f n) = s n\nγ : Type u_2 := (n : ι) → β n\nt : Set γ := ⋂ (n : ι), {x | f n (x n) = f i₀ (x i₀)}\nt_closed : IsClosed t\nthis : PolishSpace ↑t\nF : ↑t → α := fun x => f i₀ (↑x i₀)\nF_cont : Continuous F\nF_range : range F = ⋂ (n : ι), s n\n⊢ AnalyticSet (range F)\n[PROOFSTEP]\nexact analyticSet_range_of_polishSpace F_cont\n[GOAL]\nα : Type u_1\ninst✝¹ : TopologicalSpace α\nι : Type u_2\ninst✝ : Countable ι\ns : ι → Set α\nhs : ∀ (n : ι), AnalyticSet (s n)\n⊢ AnalyticSet (⋃ (n : ι), s n)\n[PROOFSTEP]\nchoose β hβ h'β f f_cont f_range using fun n => analyticSet_iff_exists_polishSpace_range.1 (hs n)\n[GOAL]\nα : Type u_1\ninst✝¹ : TopologicalSpace α\nι : Type u_2\ninst✝ : Countable ι\ns : ι → Set α\nhs : ∀ (n : ι), AnalyticSet (s n)\nβ : ι → Type\nhβ : (n : ι) → TopologicalSpace (β n)\nh'β : ∀ (n : ι), PolishSpace (β n)\nf : (n : ι) → β n → α\nf_cont : ∀ (n : ι), Continuous (f n)\nf_range : ∀ (n : ι), range (f n) = s n\n⊢ AnalyticSet (⋃ (n : ι), s n)\n[PROOFSTEP]\nskip\n[GOAL]\nα : Type u_1\ninst✝¹ : TopologicalSpace α\nι : Type u_2\ninst✝ : Countable ι\ns : ι → Set α\nhs : ∀ (n : ι), AnalyticSet (s n)\nβ : ι → Type\nhβ : (n : ι) → TopologicalSpace (β n)\nh'β : ∀ (n : ι), PolishSpace (β n)\nf : (n : ι) → β n → α\nf_cont : ∀ (n : ι), Continuous (f n)\nf_range : ∀ (n : ι), range (f n) = s n\n⊢ AnalyticSet (⋃ (n : ι), s n)\n[PROOFSTEP]\nlet γ := Σ n, β n\n[GOAL]\nα : Type u_1\ninst✝¹ : TopologicalSpace α\nι : Type u_2\ninst✝ : Countable ι\ns : ι → Set α\nhs : ∀ (n : ι), AnalyticSet (s n)\nβ : ι → Type\nhβ : (n : ι) → TopologicalSpace (β n)\nh'β : ∀ (n : ι), PolishSpace (β n)\nf : (n : ι) → β n → α\nf_cont : ∀ (n : ι), Continuous (f n)\nf_range : ∀ (n : ι), range (f n) = s n\nγ : Type u_2 := (n : ι) × β n\n⊢ AnalyticSet (⋃ (n : ι), s n)\n[PROOFSTEP]\nlet F : γ → α := by\n  rintro ⟨n, x⟩\n  exact f n x\n[GOAL]\nα : Type u_1\ninst✝¹ : TopologicalSpace α\nι : Type u_2\ninst✝ : Countable ι\ns : ι → Set α\nhs : ∀ (n : ι), AnalyticSet (s n)\nβ : ι → Type\nhβ : (n : ι) → TopologicalSpace (β n)\nh'β : ∀ (n : ι), PolishSpace (β n)\nf : (n : ι) → β n → α\nf_cont : ∀ (n : ι), Continuous (f n)\nf_range : ∀ (n : ι), range (f n) = s n\nγ : Type u_2 := (n : ι) × β n\n⊢ γ → α\n[PROOFSTEP]\nrintro ⟨n, x⟩\n[GOAL]\ncase mk\nα : Type u_1\ninst✝¹ : TopologicalSpace α\nι : Type u_2\ninst✝ : Countable ι\ns : ι → Set α\nhs : ∀ (n : ι), AnalyticSet (s n)\nβ : ι → Type\nhβ : (n : ι) → TopologicalSpace (β n)\nh'β : ∀ (n : ι), PolishSpace (β n)\nf : (n : ι) → β n → α\nf_cont : ∀ (n : ι), Continuous (f n)\nf_range : ∀ (n : ι), range (f n) = s n\nγ : Type u_2 := (n : ι) × β n\nn : ι\nx : β n\n⊢ α\n[PROOFSTEP]\nexact f n x\n[GOAL]\nα : Type u_1\ninst✝¹ : TopologicalSpace α\nι : Type u_2\ninst✝ : Countable ι\ns : ι → Set α\nhs : ∀ (n : ι), AnalyticSet (s n)\nβ : ι → Type\nhβ : (n : ι) → TopologicalSpace (β n)\nh'β : ∀ (n : ι), PolishSpace (β n)\nf : (n : ι) → β n → α\nf_cont : ∀ (n : ι), Continuous (f n)\nf_range : ∀ (n : ι), range (f n) = s n\nγ : Type u_2 := (n : ι) × β n\nF : γ → α := fun a => Sigma.casesOn a fun n x => f n x\n⊢ AnalyticSet (⋃ (n : ι), s n)\n[PROOFSTEP]\nhave F_cont : Continuous F := continuous_sigma f_cont\n[GOAL]\nα : Type u_1\ninst✝¹ : TopologicalSpace α\nι : Type u_2\ninst✝ : Countable ι\ns : ι → Set α\nhs : ∀ (n : ι), AnalyticSet (s n)\nβ : ι → Type\nhβ : (n : ι) → TopologicalSpace (β n)\nh'β : ∀ (n : ι), PolishSpace (β n)\nf : (n : ι) → β n → α\nf_cont : ∀ (n : ι), Continuous (f n)\nf_range : ∀ (n : ι), range (f n) = s n\nγ : Type u_2 := (n : ι) × β n\nF : γ → α := fun a => Sigma.casesOn a fun n x => f n x\nF_cont : Continuous F\n⊢ AnalyticSet (⋃ (n : ι), s n)\n[PROOFSTEP]\nhave F_range : range F = ⋃ n, s n := by\n  rw [range_sigma_eq_iUnion_range]\n  apply congr_arg\n  ext1 n\n  rw [← f_range n]\n[GOAL]\nα : Type u_1\ninst✝¹ : TopologicalSpace α\nι : Type u_2\ninst✝ : Countable ι\ns : ι → Set α\nhs : ∀ (n : ι), AnalyticSet (s n)\nβ : ι → Type\nhβ : (n : ι) → TopologicalSpace (β n)\nh'β : ∀ (n : ι), PolishSpace (β n)\nf : (n : ι) → β n → α\nf_cont : ∀ (n : ι), Continuous (f n)\nf_range : ∀ (n : ι), range (f n) = s n\nγ : Type u_2 := (n : ι) × β n\nF : γ → α := fun a => Sigma.casesOn a fun n x => f n x\nF_cont : Continuous F\n⊢ range F = ⋃ (n : ι), s n\n[PROOFSTEP]\nrw [range_sigma_eq_iUnion_range]\n[GOAL]\nα : Type u_1\ninst✝¹ : TopologicalSpace α\nι : Type u_2\ninst✝ : Countable ι\ns : ι → Set α\nhs : ∀ (n : ι), AnalyticSet (s n)\nβ : ι → Type\nhβ : (n : ι) → TopologicalSpace (β n)\nh'β : ∀ (n : ι), PolishSpace (β n)\nf : (n : ι) → β n → α\nf_cont : ∀ (n : ι), Continuous (f n)\nf_range : ∀ (n : ι), range (f n) = s n\nγ : Type u_2 := (n : ι) × β n\nF : γ → α := fun a => Sigma.casesOn a fun n x => f n x\nF_cont : Continuous F\n⊢ (⋃ (a : ι), range fun b => F { fst := a, snd := b }) = ⋃ (n : ι), s n\n[PROOFSTEP]\napply congr_arg\n[GOAL]\ncase h\nα : Type u_1\ninst✝¹ : TopologicalSpace α\nι : Type u_2\ninst✝ : Countable ι\ns : ι → Set α\nhs : ∀ (n : ι), AnalyticSet (s n)\nβ : ι → Type\nhβ : (n : ι) → TopologicalSpace (β n)\nh'β : ∀ (n : ι), PolishSpace (β n)\nf : (n : ι) → β n → α\nf_cont : ∀ (n : ι), Continuous (f n)\nf_range : ∀ (n : ι), range (f n) = s n\nγ : Type u_2 := (n : ι) × β n\nF : γ → α := fun a => Sigma.casesOn a fun n x => f n x\nF_cont : Continuous F\n⊢ (fun a => range fun b => F { fst := a, snd := b }) = fun n => s n\n[PROOFSTEP]\next1 n\n[GOAL]\ncase h.h\nα : Type u_1\ninst✝¹ : TopologicalSpace α\nι : Type u_2\ninst✝ : Countable ι\ns : ι → Set α\nhs : ∀ (n : ι), AnalyticSet (s n)\nβ : ι → Type\nhβ : (n : ι) → TopologicalSpace (β n)\nh'β : ∀ (n : ι), PolishSpace (β n)\nf : (n : ι) → β n → α\nf_cont : ∀ (n : ι), Continuous (f n)\nf_range : ∀ (n : ι), range (f n) = s n\nγ : Type u_2 := (n : ι) × β n\nF : γ → α := fun a => Sigma.casesOn a fun n x => f n x\nF_cont : Continuous F\nn : ι\n⊢ (range fun b => F { fst := n, snd := b }) = s n\n[PROOFSTEP]\nrw [← f_range n]\n[GOAL]\nα : Type u_1\ninst✝¹ : TopologicalSpace α\nι : Type u_2\ninst✝ : Countable ι\ns : ι → Set α\nhs : ∀ (n : ι), AnalyticSet (s n)\nβ : ι → Type\nhβ : (n : ι) → TopologicalSpace (β n)\nh'β : ∀ (n : ι), PolishSpace (β n)\nf : (n : ι) → β n → α\nf_cont : ∀ (n : ι), Continuous (f n)\nf_range : ∀ (n : ι), range (f n) = s n\nγ : Type u_2 := (n : ι) × β n\nF : γ → α := fun a => Sigma.casesOn a fun n x => f n x\nF_cont : Continuous F\nF_range : range F = ⋃ (n : ι), s n\n⊢ AnalyticSet (⋃ (n : ι), s n)\n[PROOFSTEP]\nrw [← F_range]\n[GOAL]\nα : Type u_1\ninst✝¹ : TopologicalSpace α\nι : Type u_2\ninst✝ : Countable ι\ns : ι → Set α\nhs : ∀ (n : ι), AnalyticSet (s n)\nβ : ι → Type\nhβ : (n : ι) → TopologicalSpace (β n)\nh'β : ∀ (n : ι), PolishSpace (β n)\nf : (n : ι) → β n → α\nf_cont : ∀ (n : ι), Continuous (f n)\nf_range : ∀ (n : ι), range (f n) = s n\nγ : Type u_2 := (n : ι) × β n\nF : γ → α := fun a => Sigma.casesOn a fun n x => f n x\nF_cont : Continuous F\nF_range : range F = ⋃ (n : ι), s n\n⊢ AnalyticSet (range F)\n[PROOFSTEP]\nexact analyticSet_range_of_polishSpace F_cont\n[GOAL]\nα : Type u_1\ninst✝¹ : TopologicalSpace α\nι : Type u_2\ninst✝ : PolishSpace α\ns : Set α\nhs : IsClosed s\n⊢ AnalyticSet s\n[PROOFSTEP]\nhaveI : PolishSpace s := hs.polishSpace\n[GOAL]\nα : Type u_1\ninst✝¹ : TopologicalSpace α\nι : Type u_2\ninst✝ : PolishSpace α\ns : Set α\nhs : IsClosed s\nthis : PolishSpace ↑s\n⊢ AnalyticSet s\n[PROOFSTEP]\nrw [← @Subtype.range_val α s]\n[GOAL]\nα : Type u_1\ninst✝¹ : TopologicalSpace α\nι : Type u_2\ninst✝ : PolishSpace α\ns : Set α\nhs : IsClosed s\nthis : PolishSpace ↑s\n⊢ AnalyticSet (range Subtype.val)\n[PROOFSTEP]\nexact analyticSet_range_of_polishSpace continuous_subtype_val\n[GOAL]\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : PolishSpace α\ninst✝¹ : MeasurableSpace α\ninst✝ : BorelSpace α\ns : Set α\nhs : MeasurableSet s\n⊢ IsClopenable s\n[PROOFSTEP]\nrevert s\n[GOAL]\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : PolishSpace α\ninst✝¹ : MeasurableSpace α\ninst✝ : BorelSpace α\n⊢ ∀ {s : Set α}, MeasurableSet s → IsClopenable s\n[PROOFSTEP]\napply MeasurableSet.induction_on_open\n[GOAL]\ncase h_open\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : PolishSpace α\ninst✝¹ : MeasurableSpace α\ninst✝ : BorelSpace α\n⊢ ∀ (U : Set α), IsOpen U → IsClopenable U\n[PROOFSTEP]\nexact fun u hu => hu.isClopenable\n[GOAL]\ncase h_compl\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : PolishSpace α\ninst✝¹ : MeasurableSpace α\ninst✝ : BorelSpace α\n⊢ ∀ (t : Set α), MeasurableSet t → IsClopenable t → IsClopenable tᶜ\n[PROOFSTEP]\nexact fun u _ h'u => h'u.compl\n[GOAL]\ncase h_union\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : PolishSpace α\ninst✝¹ : MeasurableSpace α\ninst✝ : BorelSpace α\n⊢ ∀ (f : ℕ → Set α),\n    Pairwise (Disjoint on f) →\n      (∀ (i : ℕ), MeasurableSet (f i)) → (∀ (i : ℕ), IsClopenable (f i)) → IsClopenable (⋃ (i : ℕ), f i)\n[PROOFSTEP]\nexact fun f _ _ hf => IsClopenable.iUnion hf\n[GOAL]\nα✝ : Type u_1\ninst✝³ : TopologicalSpace α✝\nι : Type u_2\nα : Type u_3\nt : TopologicalSpace α\ninst✝² : PolishSpace α\ninst✝¹ : MeasurableSpace α\ninst✝ : BorelSpace α\ns : Set α\nhs : MeasurableSet s\n⊢ AnalyticSet s\n[PROOFSTEP]\nobtain ⟨t', t't, t'_polish, s_closed, _⟩ :\n  ∃ t' : TopologicalSpace α, t' ≤ t ∧ @PolishSpace α t' ∧ IsClosed[t'] s ∧ IsOpen[t'] s := hs.isClopenable\n[GOAL]\ncase intro.intro.intro.intro\nα✝ : Type u_1\ninst✝³ : TopologicalSpace α✝\nι : Type u_2\nα : Type u_3\nt : TopologicalSpace α\ninst✝² : PolishSpace α\ninst✝¹ : MeasurableSpace α\ninst✝ : BorelSpace α\ns : Set α\nhs : MeasurableSet s\nt' : TopologicalSpace α\nt't : t' ≤ t\nt'_polish : PolishSpace α\ns_closed : IsClosed s\nright✝ : IsOpen s\n⊢ AnalyticSet s\n[PROOFSTEP]\nhave A := @IsClosed.analyticSet α t' t'_polish s s_closed\n[GOAL]\ncase intro.intro.intro.intro\nα✝ : Type u_1\ninst✝³ : TopologicalSpace α✝\nι : Type u_2\nα : Type u_3\nt : TopologicalSpace α\ninst✝² : PolishSpace α\ninst✝¹ : MeasurableSpace α\ninst✝ : BorelSpace α\ns : Set α\nhs : MeasurableSet s\nt' : TopologicalSpace α\nt't : t' ≤ t\nt'_polish : PolishSpace α\ns_closed : IsClosed s\nright✝ : IsOpen s\nA : AnalyticSet s\n⊢ AnalyticSet s\n[PROOFSTEP]\nconvert @AnalyticSet.image_of_continuous α t' α t s A id (continuous_id_of_le t't)\n[GOAL]\ncase h.e'_3\nα✝ : Type u_1\ninst✝³ : TopologicalSpace α✝\nι : Type u_2\nα : Type u_3\nt : TopologicalSpace α\ninst✝² : PolishSpace α\ninst✝¹ : MeasurableSpace α\ninst✝ : BorelSpace α\ns : Set α\nhs : MeasurableSet s\nt' : TopologicalSpace α\nt't : t' ≤ t\nt'_polish : PolishSpace α\ns_closed : IsClosed s\nright✝ : IsOpen s\nA : AnalyticSet s\n⊢ s = id '' s\n[PROOFSTEP]\nsimp only [id.def, image_id']\n[GOAL]\nα✝ : Type u_1\ninst✝⁶ : TopologicalSpace α✝\nι : Type u_2\nα : Type u_3\nβ : Type u_4\nt : TopologicalSpace α\ninst✝⁵ : PolishSpace α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : BorelSpace α\ntβ : TopologicalSpace β\ninst✝² : MeasurableSpace β\ninst✝¹ : OpensMeasurableSpace β\nf : α → β\ninst✝ : SecondCountableTopology ↑(range f)\nhf : Measurable f\n⊢ ∃ t', t' ≤ t ∧ Continuous f ∧ PolishSpace α\n[PROOFSTEP]\nobtain ⟨b, b_count, -, hb⟩ : ∃ b : Set (Set (range f)), b.Countable ∧ ∅ ∉ b ∧ IsTopologicalBasis b :=\n  exists_countable_basis (range f)\n[GOAL]\ncase intro.intro.intro\nα✝ : Type u_1\ninst✝⁶ : TopologicalSpace α✝\nι : Type u_2\nα : Type u_3\nβ : Type u_4\nt : TopologicalSpace α\ninst✝⁵ : PolishSpace α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : BorelSpace α\ntβ : TopologicalSpace β\ninst✝² : MeasurableSpace β\ninst✝¹ : OpensMeasurableSpace β\nf : α → β\ninst✝ : SecondCountableTopology ↑(range f)\nhf : Measurable f\nb : Set (Set ↑(range f))\nb_count : Set.Countable b\nhb : IsTopologicalBasis b\n⊢ ∃ t', t' ≤ t ∧ Continuous f ∧ PolishSpace α\n[PROOFSTEP]\nhaveI : Countable b := b_count.to_subtype\n[GOAL]\ncase intro.intro.intro\nα✝ : Type u_1\ninst✝⁶ : TopologicalSpace α✝\nι : Type u_2\nα : Type u_3\nβ : Type u_4\nt : TopologicalSpace α\ninst✝⁵ : PolishSpace α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : BorelSpace α\ntβ : TopologicalSpace β\ninst✝² : MeasurableSpace β\ninst✝¹ : OpensMeasurableSpace β\nf : α → β\ninst✝ : SecondCountableTopology ↑(range f)\nhf : Measurable f\nb : Set (Set ↑(range f))\nb_count : Set.Countable b\nhb : IsTopologicalBasis b\nthis : Countable ↑b\n⊢ ∃ t', t' ≤ t ∧ Continuous f ∧ PolishSpace α\n[PROOFSTEP]\nhave : ∀ s : b, IsClopenable (rangeFactorization f ⁻¹' s) := fun s ↦\n  by\n  apply MeasurableSet.isClopenable\n  exact hf.subtype_mk (hb.isOpen s.2).measurableSet\n[GOAL]\nα✝ : Type u_1\ninst✝⁶ : TopologicalSpace α✝\nι : Type u_2\nα : Type u_3\nβ : Type u_4\nt : TopologicalSpace α\ninst✝⁵ : PolishSpace α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : BorelSpace α\ntβ : TopologicalSpace β\ninst✝² : MeasurableSpace β\ninst✝¹ : OpensMeasurableSpace β\nf : α → β\ninst✝ : SecondCountableTopology ↑(range f)\nhf : Measurable f\nb : Set (Set ↑(range f))\nb_count : Set.Countable b\nhb : IsTopologicalBasis b\nthis : Countable ↑b\ns : ↑b\n⊢ IsClopenable (rangeFactorization f ⁻¹' ↑s)\n[PROOFSTEP]\napply MeasurableSet.isClopenable\n[GOAL]\ncase hs\nα✝ : Type u_1\ninst✝⁶ : TopologicalSpace α✝\nι : Type u_2\nα : Type u_3\nβ : Type u_4\nt : TopologicalSpace α\ninst✝⁵ : PolishSpace α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : BorelSpace α\ntβ : TopologicalSpace β\ninst✝² : MeasurableSpace β\ninst✝¹ : OpensMeasurableSpace β\nf : α → β\ninst✝ : SecondCountableTopology ↑(range f)\nhf : Measurable f\nb : Set (Set ↑(range f))\nb_count : Set.Countable b\nhb : IsTopologicalBasis b\nthis : Countable ↑b\ns : ↑b\n⊢ MeasurableSet (rangeFactorization f ⁻¹' ↑s)\n[PROOFSTEP]\nexact hf.subtype_mk (hb.isOpen s.2).measurableSet\n[GOAL]\ncase intro.intro.intro\nα✝ : Type u_1\ninst✝⁶ : TopologicalSpace α✝\nι : Type u_2\nα : Type u_3\nβ : Type u_4\nt : TopologicalSpace α\ninst✝⁵ : PolishSpace α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : BorelSpace α\ntβ : TopologicalSpace β\ninst✝² : MeasurableSpace β\ninst✝¹ : OpensMeasurableSpace β\nf : α → β\ninst✝ : SecondCountableTopology ↑(range f)\nhf : Measurable f\nb : Set (Set ↑(range f))\nb_count : Set.Countable b\nhb : IsTopologicalBasis b\nthis✝ : Countable ↑b\nthis : ∀ (s : ↑b), IsClopenable (rangeFactorization f ⁻¹' ↑s)\n⊢ ∃ t', t' ≤ t ∧ Continuous f ∧ PolishSpace α\n[PROOFSTEP]\nchoose T Tt Tpolish _ Topen using this\n[GOAL]\ncase intro.intro.intro\nα✝ : Type u_1\ninst✝⁶ : TopologicalSpace α✝\nι : Type u_2\nα : Type u_3\nβ : Type u_4\nt : TopologicalSpace α\ninst✝⁵ : PolishSpace α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : BorelSpace α\ntβ : TopologicalSpace β\ninst✝² : MeasurableSpace β\ninst✝¹ : OpensMeasurableSpace β\nf : α → β\ninst✝ : SecondCountableTopology ↑(range f)\nhf : Measurable f\nb : Set (Set ↑(range f))\nb_count : Set.Countable b\nhb : IsTopologicalBasis b\nthis : Countable ↑b\nT : ↑b → TopologicalSpace α\nTt : ∀ (s : ↑b), T s ≤ t\nTpolish : ∀ (s : ↑b), PolishSpace α\nh✝ : ∀ (s : ↑b), IsClosed (rangeFactorization f ⁻¹' ↑s)\nTopen : ∀ (s : ↑b), IsOpen (rangeFactorization f ⁻¹' ↑s)\n⊢ ∃ t', t' ≤ t ∧ Continuous f ∧ PolishSpace α\n[PROOFSTEP]\nobtain ⟨t', t'T, t't, t'_polish⟩ : ∃ t' : TopologicalSpace α, (∀ i, t' ≤ T i) ∧ t' ≤ t ∧ @PolishSpace α t' :=\n  exists_polishSpace_forall_le T Tt Tpolish\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nα✝ : Type u_1\ninst✝⁶ : TopologicalSpace α✝\nι : Type u_2\nα : Type u_3\nβ : Type u_4\nt : TopologicalSpace α\ninst✝⁵ : PolishSpace α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : BorelSpace α\ntβ : TopologicalSpace β\ninst✝² : MeasurableSpace β\ninst✝¹ : OpensMeasurableSpace β\nf : α → β\ninst✝ : SecondCountableTopology ↑(range f)\nhf : Measurable f\nb : Set (Set ↑(range f))\nb_count : Set.Countable b\nhb : IsTopologicalBasis b\nthis : Countable ↑b\nT : ↑b → TopologicalSpace α\nTt : ∀ (s : ↑b), T s ≤ t\nTpolish : ∀ (s : ↑b), PolishSpace α\nh✝ : ∀ (s : ↑b), IsClosed (rangeFactorization f ⁻¹' ↑s)\nTopen : ∀ (s : ↑b), IsOpen (rangeFactorization f ⁻¹' ↑s)\nt' : TopologicalSpace α\nt'T : ∀ (i : ↑b), t' ≤ T i\nt't : t' ≤ t\nt'_polish : PolishSpace α\n⊢ ∃ t', t' ≤ t ∧ Continuous f ∧ PolishSpace α\n[PROOFSTEP]\nrefine' ⟨t', t't, _, t'_polish⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nα✝ : Type u_1\ninst✝⁶ : TopologicalSpace α✝\nι : Type u_2\nα : Type u_3\nβ : Type u_4\nt : TopologicalSpace α\ninst✝⁵ : PolishSpace α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : BorelSpace α\ntβ : TopologicalSpace β\ninst✝² : MeasurableSpace β\ninst✝¹ : OpensMeasurableSpace β\nf : α → β\ninst✝ : SecondCountableTopology ↑(range f)\nhf : Measurable f\nb : Set (Set ↑(range f))\nb_count : Set.Countable b\nhb : IsTopologicalBasis b\nthis : Countable ↑b\nT : ↑b → TopologicalSpace α\nTt : ∀ (s : ↑b), T s ≤ t\nTpolish : ∀ (s : ↑b), PolishSpace α\nh✝ : ∀ (s : ↑b), IsClosed (rangeFactorization f ⁻¹' ↑s)\nTopen : ∀ (s : ↑b), IsOpen (rangeFactorization f ⁻¹' ↑s)\nt' : TopologicalSpace α\nt'T : ∀ (i : ↑b), t' ≤ T i\nt't : t' ≤ t\nt'_polish : PolishSpace α\n⊢ Continuous f\n[PROOFSTEP]\nhave : Continuous[t', _] (rangeFactorization f) := hb.continuous _ fun s hs => t'T ⟨s, hs⟩ _ (Topen ⟨s, hs⟩)\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nα✝ : Type u_1\ninst✝⁶ : TopologicalSpace α✝\nι : Type u_2\nα : Type u_3\nβ : Type u_4\nt : TopologicalSpace α\ninst✝⁵ : PolishSpace α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : BorelSpace α\ntβ : TopologicalSpace β\ninst✝² : MeasurableSpace β\ninst✝¹ : OpensMeasurableSpace β\nf : α → β\ninst✝ : SecondCountableTopology ↑(range f)\nhf : Measurable f\nb : Set (Set ↑(range f))\nb_count : Set.Countable b\nhb : IsTopologicalBasis b\nthis✝ : Countable ↑b\nT : ↑b → TopologicalSpace α\nTt : ∀ (s : ↑b), T s ≤ t\nTpolish : ∀ (s : ↑b), PolishSpace α\nh✝ : ∀ (s : ↑b), IsClosed (rangeFactorization f ⁻¹' ↑s)\nTopen : ∀ (s : ↑b), IsOpen (rangeFactorization f ⁻¹' ↑s)\nt' : TopologicalSpace α\nt'T : ∀ (i : ↑b), t' ≤ T i\nt't : t' ≤ t\nt'_polish : PolishSpace α\nthis : Continuous (rangeFactorization f)\n⊢ Continuous f\n[PROOFSTEP]\nexact continuous_subtype_val.comp this\n[GOAL]\nα : Type u_1\ninst✝⁸ : TopologicalSpace α\nι : Type u_2\nX : Type u_3\nY : Type u_4\ninst✝⁷ : TopologicalSpace X\ninst✝⁶ : PolishSpace X\ninst✝⁵ : MeasurableSpace X\ninst✝⁴ : BorelSpace X\ninst✝³ : TopologicalSpace Y\ninst✝² : MeasurableSpace Y\ninst✝¹ : OpensMeasurableSpace Y\nf : X → Y\ninst✝ : SecondCountableTopology ↑(range f)\ns : Set X\nhs : MeasurableSet s\nhf : Measurable f\n⊢ AnalyticSet (f '' s)\n[PROOFSTEP]\nborelize X\n[GOAL]\nα : Type u_1\ninst✝⁷ : TopologicalSpace α\nι : Type u_2\nX : Type u_3\nY : Type u_4\ninst✝⁶ : TopologicalSpace X\ninst✝⁵ : PolishSpace X\ninst✝⁴ : TopologicalSpace Y\ninst✝³ : MeasurableSpace Y\ninst✝² : OpensMeasurableSpace Y\nf : X → Y\ninst✝¹ : SecondCountableTopology ↑(range f)\ns : Set X\ninst✝ : BorelSpace X\nhs : MeasurableSet s\nhf : Measurable f\nthis✝ : MeasurableSpace X := borel X\n⊢ AnalyticSet (f '' s)\n[PROOFSTEP]\nrcases hf.exists_continuous with ⟨τ', hle, hfc, hτ'⟩\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\ninst✝⁷ : TopologicalSpace α\nι : Type u_2\nX : Type u_3\nY : Type u_4\ninst✝⁶ : TopologicalSpace X\ninst✝⁵ : PolishSpace X\ninst✝⁴ : TopologicalSpace Y\ninst✝³ : MeasurableSpace Y\ninst✝² : OpensMeasurableSpace Y\nf : X → Y\ninst✝¹ : SecondCountableTopology ↑(range f)\ns : Set X\ninst✝ : BorelSpace X\nhs : MeasurableSet s\nhf : Measurable f\nthis✝ : MeasurableSpace X := borel X\nτ' : TopologicalSpace X\nhle : τ' ≤ inst✝⁶\nhfc : Continuous f\nhτ' : PolishSpace X\n⊢ AnalyticSet (f '' s)\n[PROOFSTEP]\nletI m' : MeasurableSpace X := @borel _ τ'\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\ninst✝⁷ : TopologicalSpace α\nι : Type u_2\nX : Type u_3\nY : Type u_4\ninst✝⁶ : TopologicalSpace X\ninst✝⁵ : PolishSpace X\ninst✝⁴ : TopologicalSpace Y\ninst✝³ : MeasurableSpace Y\ninst✝² : OpensMeasurableSpace Y\nf : X → Y\ninst✝¹ : SecondCountableTopology ↑(range f)\ns : Set X\ninst✝ : BorelSpace X\nhs : MeasurableSet s\nhf : Measurable f\nthis✝ : MeasurableSpace X := borel X\nτ' : TopologicalSpace X\nhle : τ' ≤ inst✝⁶\nhfc : Continuous f\nhτ' : PolishSpace X\nm' : MeasurableSpace X := borel X\n⊢ AnalyticSet (f '' s)\n[PROOFSTEP]\nhaveI b' : BorelSpace X := ⟨rfl⟩\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\ninst✝⁷ : TopologicalSpace α\nι : Type u_2\nX : Type u_3\nY : Type u_4\ninst✝⁶ : TopologicalSpace X\ninst✝⁵ : PolishSpace X\ninst✝⁴ : TopologicalSpace Y\ninst✝³ : MeasurableSpace Y\ninst✝² : OpensMeasurableSpace Y\nf : X → Y\ninst✝¹ : SecondCountableTopology ↑(range f)\ns : Set X\ninst✝ : BorelSpace X\nhs : MeasurableSet s\nhf : Measurable f\nthis✝ : MeasurableSpace X := borel X\nτ' : TopologicalSpace X\nhle : τ' ≤ inst✝⁶\nhfc : Continuous f\nhτ' : PolishSpace X\nm' : MeasurableSpace X := borel X\nb' : BorelSpace X\n⊢ AnalyticSet (f '' s)\n[PROOFSTEP]\nhave hle := borel_anti hle\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\ninst✝⁷ : TopologicalSpace α\nι : Type u_2\nX : Type u_3\nY : Type u_4\ninst✝⁶ : TopologicalSpace X\ninst✝⁵ : PolishSpace X\ninst✝⁴ : TopologicalSpace Y\ninst✝³ : MeasurableSpace Y\ninst✝² : OpensMeasurableSpace Y\nf : X → Y\ninst✝¹ : SecondCountableTopology ↑(range f)\ns : Set X\ninst✝ : BorelSpace X\nhs : MeasurableSet s\nhf : Measurable f\nthis✝ : MeasurableSpace X := borel X\nτ' : TopologicalSpace X\nhle✝ : τ' ≤ inst✝⁶\nhfc : Continuous f\nhτ' : PolishSpace X\nm' : MeasurableSpace X := borel X\nb' : BorelSpace X\nhle : borel X ≤ borel X\n⊢ AnalyticSet (f '' s)\n[PROOFSTEP]\nexact (hle _ hs).analyticSet.image_of_continuous hfc\n[GOAL]\nα✝ : Type u_1\ninst✝² : TopologicalSpace α✝\nι : Type u_2\ninst✝¹ : Countable ι\nα : Type u_3\ninst✝ : MeasurableSpace α\ns t : ι → Set α\nh : ∀ (m n : ι), MeasurablySeparable (s m) (t n)\n⊢ MeasurablySeparable (⋃ (n : ι), s n) (⋃ (m : ι), t m)\n[PROOFSTEP]\nchoose u hsu htu hu using h\n[GOAL]\nα✝ : Type u_1\ninst✝² : TopologicalSpace α✝\nι : Type u_2\ninst✝¹ : Countable ι\nα : Type u_3\ninst✝ : MeasurableSpace α\ns t : ι → Set α\nu : ι → ι → Set α\nhsu : ∀ (m n : ι), s m ⊆ u m n\nhtu : ∀ (m n : ι), Disjoint (t n) (u m n)\nhu : ∀ (m n : ι), MeasurableSet (u m n)\n⊢ MeasurablySeparable (⋃ (n : ι), s n) (⋃ (m : ι), t m)\n[PROOFSTEP]\nrefine' ⟨⋃ m, ⋂ n, u m n, _, _, _⟩\n[GOAL]\ncase refine'_1\nα✝ : Type u_1\ninst✝² : TopologicalSpace α✝\nι : Type u_2\ninst✝¹ : Countable ι\nα : Type u_3\ninst✝ : MeasurableSpace α\ns t : ι → Set α\nu : ι → ι → Set α\nhsu : ∀ (m n : ι), s m ⊆ u m n\nhtu : ∀ (m n : ι), Disjoint (t n) (u m n)\nhu : ∀ (m n : ι), MeasurableSet (u m n)\n⊢ ⋃ (n : ι), s n ⊆ ⋃ (m : ι), ⋂ (n : ι), u m n\n[PROOFSTEP]\nrefine' iUnion_subset fun m => subset_iUnion_of_subset m _\n[GOAL]\ncase refine'_1\nα✝ : Type u_1\ninst✝² : TopologicalSpace α✝\nι : Type u_2\ninst✝¹ : Countable ι\nα : Type u_3\ninst✝ : MeasurableSpace α\ns t : ι → Set α\nu : ι → ι → Set α\nhsu : ∀ (m n : ι), s m ⊆ u m n\nhtu : ∀ (m n : ι), Disjoint (t n) (u m n)\nhu : ∀ (m n : ι), MeasurableSet (u m n)\nm : ι\n⊢ s m ⊆ ⋂ (n : ι), u m n\n[PROOFSTEP]\nexact subset_iInter fun n => hsu m n\n[GOAL]\ncase refine'_2\nα✝ : Type u_1\ninst✝² : TopologicalSpace α✝\nι : Type u_2\ninst✝¹ : Countable ι\nα : Type u_3\ninst✝ : MeasurableSpace α\ns t : ι → Set α\nu : ι → ι → Set α\nhsu : ∀ (m n : ι), s m ⊆ u m n\nhtu : ∀ (m n : ι), Disjoint (t n) (u m n)\nhu : ∀ (m n : ι), MeasurableSet (u m n)\n⊢ Disjoint (⋃ (m : ι), t m) (⋃ (m : ι), ⋂ (n : ι), u m n)\n[PROOFSTEP]\nsimp_rw [disjoint_iUnion_left, disjoint_iUnion_right]\n[GOAL]\ncase refine'_2\nα✝ : Type u_1\ninst✝² : TopologicalSpace α✝\nι : Type u_2\ninst✝¹ : Countable ι\nα : Type u_3\ninst✝ : MeasurableSpace α\ns t : ι → Set α\nu : ι → ι → Set α\nhsu : ∀ (m n : ι), s m ⊆ u m n\nhtu : ∀ (m n : ι), Disjoint (t n) (u m n)\nhu : ∀ (m n : ι), MeasurableSet (u m n)\n⊢ ∀ (i i_1 : ι), Disjoint (t i) (⋂ (n : ι), u i_1 n)\n[PROOFSTEP]\nintro n m\n[GOAL]\ncase refine'_2\nα✝ : Type u_1\ninst✝² : TopologicalSpace α✝\nι : Type u_2\ninst✝¹ : Countable ι\nα : Type u_3\ninst✝ : MeasurableSpace α\ns t : ι → Set α\nu : ι → ι → Set α\nhsu : ∀ (m n : ι), s m ⊆ u m n\nhtu : ∀ (m n : ι), Disjoint (t n) (u m n)\nhu : ∀ (m n : ι), MeasurableSet (u m n)\nn m : ι\n⊢ Disjoint (t n) (⋂ (n : ι), u m n)\n[PROOFSTEP]\napply Disjoint.mono_right _ (htu m n)\n[GOAL]\nα✝ : Type u_1\ninst✝² : TopologicalSpace α✝\nι : Type u_2\ninst✝¹ : Countable ι\nα : Type u_3\ninst✝ : MeasurableSpace α\ns t : ι → Set α\nu : ι → ι → Set α\nhsu : ∀ (m n : ι), s m ⊆ u m n\nhtu : ∀ (m n : ι), Disjoint (t n) (u m n)\nhu : ∀ (m n : ι), MeasurableSet (u m n)\nn m : ι\n⊢ ⋂ (n : ι), u m n ≤ u m n\n[PROOFSTEP]\napply iInter_subset\n[GOAL]\ncase refine'_3\nα✝ : Type u_1\ninst✝² : TopologicalSpace α✝\nι : Type u_2\ninst✝¹ : Countable ι\nα : Type u_3\ninst✝ : MeasurableSpace α\ns t : ι → Set α\nu : ι → ι → Set α\nhsu : ∀ (m n : ι), s m ⊆ u m n\nhtu : ∀ (m n : ι), Disjoint (t n) (u m n)\nhu : ∀ (m n : ι), MeasurableSet (u m n)\n⊢ MeasurableSet (⋃ (m : ι), ⋂ (n : ι), u m n)\n[PROOFSTEP]\nrefine' MeasurableSet.iUnion fun m => _\n[GOAL]\ncase refine'_3\nα✝ : Type u_1\ninst✝² : TopologicalSpace α✝\nι : Type u_2\ninst✝¹ : Countable ι\nα : Type u_3\ninst✝ : MeasurableSpace α\ns t : ι → Set α\nu : ι → ι → Set α\nhsu : ∀ (m n : ι), s m ⊆ u m n\nhtu : ∀ (m n : ι), Disjoint (t n) (u m n)\nhu : ∀ (m n : ι), MeasurableSet (u m n)\nm : ι\n⊢ MeasurableSet (⋂ (n : ι), u m n)\n[PROOFSTEP]\nexact MeasurableSet.iInter fun n => hu m n\n[GOAL]\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : T2Space α\ninst✝¹ : MeasurableSpace α\ninst✝ : OpensMeasurableSpace α\nf g : (ℕ → ℕ) → α\nhf : Continuous f\nhg : Continuous g\nh : Disjoint (range f) (range g)\n⊢ MeasurablySeparable (range f) (range g)\n[PROOFSTEP]\nby_contra hfg\n[GOAL]\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : T2Space α\ninst✝¹ : MeasurableSpace α\ninst✝ : OpensMeasurableSpace α\nf g : (ℕ → ℕ) → α\nhf : Continuous f\nhg : Continuous g\nh : Disjoint (range f) (range g)\nhfg : ¬MeasurablySeparable (range f) (range g)\n⊢ False\n[PROOFSTEP]\nhave I :\n  ∀ n x y,\n    ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n) →\n      ∃ x' y',\n        x' ∈ cylinder x n ∧\n          y' ∈ cylinder y n ∧ ¬MeasurablySeparable (f '' cylinder x' (n + 1)) (g '' cylinder y' (n + 1)) :=\n  by\n  intro n x y\n  contrapose!\n  intro H\n  rw [← iUnion_cylinder_update x n, ← iUnion_cylinder_update y n, image_iUnion, image_iUnion]\n  refine' MeasurablySeparable.iUnion fun i j => _\n  exact\n    H _ _ (update_mem_cylinder _ _ _)\n      (update_mem_cylinder _ _ _)\n        -- consider the set of pairs of cylinders of some length whose images are not Borel-separated\n[GOAL]\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : T2Space α\ninst✝¹ : MeasurableSpace α\ninst✝ : OpensMeasurableSpace α\nf g : (ℕ → ℕ) → α\nhf : Continuous f\nhg : Continuous g\nh : Disjoint (range f) (range g)\nhfg : ¬MeasurablySeparable (range f) (range g)\n⊢ ∀ (n : ℕ) (x y : ℕ → ℕ),\n    ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n) →\n      ∃ x' y',\n        x' ∈ cylinder x n ∧\n          y' ∈ cylinder y n ∧ ¬MeasurablySeparable (f '' cylinder x' (n + 1)) (g '' cylinder y' (n + 1))\n[PROOFSTEP]\nintro n x y\n[GOAL]\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : T2Space α\ninst✝¹ : MeasurableSpace α\ninst✝ : OpensMeasurableSpace α\nf g : (ℕ → ℕ) → α\nhf : Continuous f\nhg : Continuous g\nh : Disjoint (range f) (range g)\nhfg : ¬MeasurablySeparable (range f) (range g)\nn : ℕ\nx y : ℕ → ℕ\n⊢ ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n) →\n    ∃ x' y',\n      x' ∈ cylinder x n ∧ y' ∈ cylinder y n ∧ ¬MeasurablySeparable (f '' cylinder x' (n + 1)) (g '' cylinder y' (n + 1))\n[PROOFSTEP]\ncontrapose!\n[GOAL]\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : T2Space α\ninst✝¹ : MeasurableSpace α\ninst✝ : OpensMeasurableSpace α\nf g : (ℕ → ℕ) → α\nhf : Continuous f\nhg : Continuous g\nh : Disjoint (range f) (range g)\nhfg : ¬MeasurablySeparable (range f) (range g)\nn : ℕ\nx y : ℕ → ℕ\n⊢ (∀ (x' y' : ℕ → ℕ),\n      x' ∈ cylinder x n →\n        y' ∈ cylinder y n → MeasurablySeparable (f '' cylinder x' (n + 1)) (g '' cylinder y' (n + 1))) →\n    MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n)\n[PROOFSTEP]\nintro H\n[GOAL]\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : T2Space α\ninst✝¹ : MeasurableSpace α\ninst✝ : OpensMeasurableSpace α\nf g : (ℕ → ℕ) → α\nhf : Continuous f\nhg : Continuous g\nh : Disjoint (range f) (range g)\nhfg : ¬MeasurablySeparable (range f) (range g)\nn : ℕ\nx y : ℕ → ℕ\nH :\n  ∀ (x' y' : ℕ → ℕ),\n    x' ∈ cylinder x n → y' ∈ cylinder y n → MeasurablySeparable (f '' cylinder x' (n + 1)) (g '' cylinder y' (n + 1))\n⊢ MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n)\n[PROOFSTEP]\nrw [← iUnion_cylinder_update x n, ← iUnion_cylinder_update y n, image_iUnion, image_iUnion]\n[GOAL]\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : T2Space α\ninst✝¹ : MeasurableSpace α\ninst✝ : OpensMeasurableSpace α\nf g : (ℕ → ℕ) → α\nhf : Continuous f\nhg : Continuous g\nh : Disjoint (range f) (range g)\nhfg : ¬MeasurablySeparable (range f) (range g)\nn : ℕ\nx y : ℕ → ℕ\nH :\n  ∀ (x' y' : ℕ → ℕ),\n    x' ∈ cylinder x n → y' ∈ cylinder y n → MeasurablySeparable (f '' cylinder x' (n + 1)) (g '' cylinder y' (n + 1))\n⊢ MeasurablySeparable (⋃ (i : ℕ), f '' cylinder (update x n i) (n + 1))\n    (⋃ (i : ℕ), g '' cylinder (update y n i) (n + 1))\n[PROOFSTEP]\nrefine' MeasurablySeparable.iUnion fun i j => _\n[GOAL]\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : T2Space α\ninst✝¹ : MeasurableSpace α\ninst✝ : OpensMeasurableSpace α\nf g : (ℕ → ℕ) → α\nhf : Continuous f\nhg : Continuous g\nh : Disjoint (range f) (range g)\nhfg : ¬MeasurablySeparable (range f) (range g)\nn : ℕ\nx y : ℕ → ℕ\nH :\n  ∀ (x' y' : ℕ → ℕ),\n    x' ∈ cylinder x n → y' ∈ cylinder y n → MeasurablySeparable (f '' cylinder x' (n + 1)) (g '' cylinder y' (n + 1))\ni j : ℕ\n⊢ MeasurablySeparable (f '' cylinder (update x n i) (n + 1)) (g '' cylinder (update y n j) (n + 1))\n[PROOFSTEP]\nexact\n  H _ _ (update_mem_cylinder _ _ _)\n    (update_mem_cylinder _ _ _)\n      -- consider the set of pairs of cylinders of some length whose images are not Borel-separated\n[GOAL]\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : T2Space α\ninst✝¹ : MeasurableSpace α\ninst✝ : OpensMeasurableSpace α\nf g : (ℕ → ℕ) → α\nhf : Continuous f\nhg : Continuous g\nh : Disjoint (range f) (range g)\nhfg : ¬MeasurablySeparable (range f) (range g)\nI :\n  ∀ (n : ℕ) (x y : ℕ → ℕ),\n    ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n) →\n      ∃ x' y',\n        x' ∈ cylinder x n ∧\n          y' ∈ cylinder y n ∧ ¬MeasurablySeparable (f '' cylinder x' (n + 1)) (g '' cylinder y' (n + 1))\n⊢ False\n[PROOFSTEP]\nlet A :=\n  { p : ℕ × (ℕ → ℕ) × (ℕ → ℕ) // ¬MeasurablySeparable (f '' cylinder p.2.1 p.1) (g '' cylinder p.2.2 p.1) }\n    -- for each such pair, one can find longer cylinders whose images are not Borel-separated either\n[GOAL]\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : T2Space α\ninst✝¹ : MeasurableSpace α\ninst✝ : OpensMeasurableSpace α\nf g : (ℕ → ℕ) → α\nhf : Continuous f\nhg : Continuous g\nh : Disjoint (range f) (range g)\nhfg : ¬MeasurablySeparable (range f) (range g)\nI :\n  ∀ (n : ℕ) (x y : ℕ → ℕ),\n    ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n) →\n      ∃ x' y',\n        x' ∈ cylinder x n ∧\n          y' ∈ cylinder y n ∧ ¬MeasurablySeparable (f '' cylinder x' (n + 1)) (g '' cylinder y' (n + 1))\nA : Type := { p // ¬MeasurablySeparable (f '' cylinder p.snd.fst p.fst) (g '' cylinder p.snd.snd p.fst) }\n⊢ False\n[PROOFSTEP]\nhave : ∀ p : A, ∃ q : A, q.1.1 = p.1.1 + 1 ∧ q.1.2.1 ∈ cylinder p.1.2.1 p.1.1 ∧ q.1.2.2 ∈ cylinder p.1.2.2 p.1.1 :=\n  by\n  rintro ⟨⟨n, x, y⟩, hp⟩\n  rcases I n x y hp with ⟨x', y', hx', hy', h'⟩\n  exact ⟨⟨⟨n + 1, x', y'⟩, h'⟩, rfl, hx', hy'⟩\n[GOAL]\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : T2Space α\ninst✝¹ : MeasurableSpace α\ninst✝ : OpensMeasurableSpace α\nf g : (ℕ → ℕ) → α\nhf : Continuous f\nhg : Continuous g\nh : Disjoint (range f) (range g)\nhfg : ¬MeasurablySeparable (range f) (range g)\nI :\n  ∀ (n : ℕ) (x y : ℕ → ℕ),\n    ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n) →\n      ∃ x' y',\n        x' ∈ cylinder x n ∧\n          y' ∈ cylinder y n ∧ ¬MeasurablySeparable (f '' cylinder x' (n + 1)) (g '' cylinder y' (n + 1))\nA : Type := { p // ¬MeasurablySeparable (f '' cylinder p.snd.fst p.fst) (g '' cylinder p.snd.snd p.fst) }\n⊢ ∀ (p : A),\n    ∃ q,\n      (↑q).fst = (↑p).fst + 1 ∧\n        (↑q).snd.fst ∈ cylinder (↑p).snd.fst (↑p).fst ∧ (↑q).snd.snd ∈ cylinder (↑p).snd.snd (↑p).fst\n[PROOFSTEP]\nrintro ⟨⟨n, x, y⟩, hp⟩\n[GOAL]\ncase mk.mk.mk\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : T2Space α\ninst✝¹ : MeasurableSpace α\ninst✝ : OpensMeasurableSpace α\nf g : (ℕ → ℕ) → α\nhf : Continuous f\nhg : Continuous g\nh : Disjoint (range f) (range g)\nhfg : ¬MeasurablySeparable (range f) (range g)\nI :\n  ∀ (n : ℕ) (x y : ℕ → ℕ),\n    ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n) →\n      ∃ x' y',\n        x' ∈ cylinder x n ∧\n          y' ∈ cylinder y n ∧ ¬MeasurablySeparable (f '' cylinder x' (n + 1)) (g '' cylinder y' (n + 1))\nA : Type := { p // ¬MeasurablySeparable (f '' cylinder p.snd.fst p.fst) (g '' cylinder p.snd.snd p.fst) }\nn : ℕ\nx y : ℕ → ℕ\nhp :\n  ¬MeasurablySeparable (f '' cylinder (n, x, y).snd.fst (n, x, y).fst) (g '' cylinder (n, x, y).snd.snd (n, x, y).fst)\n⊢ ∃ q,\n    (↑q).fst = (↑{ val := (n, x, y), property := hp }).fst + 1 ∧\n      (↑q).snd.fst ∈\n          cylinder (↑{ val := (n, x, y), property := hp }).snd.fst (↑{ val := (n, x, y), property := hp }).fst ∧\n        (↑q).snd.snd ∈\n          cylinder (↑{ val := (n, x, y), property := hp }).snd.snd (↑{ val := (n, x, y), property := hp }).fst\n[PROOFSTEP]\nrcases I n x y hp with ⟨x', y', hx', hy', h'⟩\n[GOAL]\ncase mk.mk.mk.intro.intro.intro.intro\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : T2Space α\ninst✝¹ : MeasurableSpace α\ninst✝ : OpensMeasurableSpace α\nf g : (ℕ → ℕ) → α\nhf : Continuous f\nhg : Continuous g\nh : Disjoint (range f) (range g)\nhfg : ¬MeasurablySeparable (range f) (range g)\nI :\n  ∀ (n : ℕ) (x y : ℕ → ℕ),\n    ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n) →\n      ∃ x' y',\n        x' ∈ cylinder x n ∧\n          y' ∈ cylinder y n ∧ ¬MeasurablySeparable (f '' cylinder x' (n + 1)) (g '' cylinder y' (n + 1))\nA : Type := { p // ¬MeasurablySeparable (f '' cylinder p.snd.fst p.fst) (g '' cylinder p.snd.snd p.fst) }\nn : ℕ\nx y : ℕ → ℕ\nhp :\n  ¬MeasurablySeparable (f '' cylinder (n, x, y).snd.fst (n, x, y).fst) (g '' cylinder (n, x, y).snd.snd (n, x, y).fst)\nx' y' : ℕ → ℕ\nhx' : x' ∈ cylinder x n\nhy' : y' ∈ cylinder y n\nh' : ¬MeasurablySeparable (f '' cylinder x' (n + 1)) (g '' cylinder y' (n + 1))\n⊢ ∃ q,\n    (↑q).fst = (↑{ val := (n, x, y), property := hp }).fst + 1 ∧\n      (↑q).snd.fst ∈\n          cylinder (↑{ val := (n, x, y), property := hp }).snd.fst (↑{ val := (n, x, y), property := hp }).fst ∧\n        (↑q).snd.snd ∈\n          cylinder (↑{ val := (n, x, y), property := hp }).snd.snd (↑{ val := (n, x, y), property := hp }).fst\n[PROOFSTEP]\nexact ⟨⟨⟨n + 1, x', y'⟩, h'⟩, rfl, hx', hy'⟩\n[GOAL]\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : T2Space α\ninst✝¹ : MeasurableSpace α\ninst✝ : OpensMeasurableSpace α\nf g : (ℕ → ℕ) → α\nhf : Continuous f\nhg : Continuous g\nh : Disjoint (range f) (range g)\nhfg : ¬MeasurablySeparable (range f) (range g)\nI :\n  ∀ (n : ℕ) (x y : ℕ → ℕ),\n    ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n) →\n      ∃ x' y',\n        x' ∈ cylinder x n ∧\n          y' ∈ cylinder y n ∧ ¬MeasurablySeparable (f '' cylinder x' (n + 1)) (g '' cylinder y' (n + 1))\nA : Type := { p // ¬MeasurablySeparable (f '' cylinder p.snd.fst p.fst) (g '' cylinder p.snd.snd p.fst) }\nthis :\n  ∀ (p : A),\n    ∃ q,\n      (↑q).fst = (↑p).fst + 1 ∧\n        (↑q).snd.fst ∈ cylinder (↑p).snd.fst (↑p).fst ∧ (↑q).snd.snd ∈ cylinder (↑p).snd.snd (↑p).fst\n⊢ False\n[PROOFSTEP]\nchoose F hFn hFx hFy using this\n[GOAL]\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : T2Space α\ninst✝¹ : MeasurableSpace α\ninst✝ : OpensMeasurableSpace α\nf g : (ℕ → ℕ) → α\nhf : Continuous f\nhg : Continuous g\nh : Disjoint (range f) (range g)\nhfg : ¬MeasurablySeparable (range f) (range g)\nI :\n  ∀ (n : ℕ) (x y : ℕ → ℕ),\n    ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n) →\n      ∃ x' y',\n        x' ∈ cylinder x n ∧\n          y' ∈ cylinder y n ∧ ¬MeasurablySeparable (f '' cylinder x' (n + 1)) (g '' cylinder y' (n + 1))\nA : Type := { p // ¬MeasurablySeparable (f '' cylinder p.snd.fst p.fst) (g '' cylinder p.snd.snd p.fst) }\nF : A → A\nhFn : ∀ (p : A), (↑(F p)).fst = (↑p).fst + 1\nhFx : ∀ (p : A), (↑(F p)).snd.fst ∈ cylinder (↑p).snd.fst (↑p).fst\nhFy : ∀ (p : A), (↑(F p)).snd.snd ∈ cylinder (↑p).snd.snd (↑p).fst\n⊢ False\n[PROOFSTEP]\nlet p0 : A :=\n  ⟨⟨0, fun _ => 0, fun _ => 0⟩, by simp [hfg]⟩\n    -- construct inductively decreasing sequences of cylinders whose images are not separated\n[GOAL]\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : T2Space α\ninst✝¹ : MeasurableSpace α\ninst✝ : OpensMeasurableSpace α\nf g : (ℕ → ℕ) → α\nhf : Continuous f\nhg : Continuous g\nh : Disjoint (range f) (range g)\nhfg : ¬MeasurablySeparable (range f) (range g)\nI :\n  ∀ (n : ℕ) (x y : ℕ → ℕ),\n    ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n) →\n      ∃ x' y',\n        x' ∈ cylinder x n ∧\n          y' ∈ cylinder y n ∧ ¬MeasurablySeparable (f '' cylinder x' (n + 1)) (g '' cylinder y' (n + 1))\nA : Type := { p // ¬MeasurablySeparable (f '' cylinder p.snd.fst p.fst) (g '' cylinder p.snd.snd p.fst) }\nF : A → A\nhFn : ∀ (p : A), (↑(F p)).fst = (↑p).fst + 1\nhFx : ∀ (p : A), (↑(F p)).snd.fst ∈ cylinder (↑p).snd.fst (↑p).fst\nhFy : ∀ (p : A), (↑(F p)).snd.snd ∈ cylinder (↑p).snd.snd (↑p).fst\n⊢ ¬MeasurablySeparable (f '' cylinder (0, fun x => 0, fun x => 0).snd.fst (0, fun x => 0, fun x => 0).fst)\n      (g '' cylinder (0, fun x => 0, fun x => 0).snd.snd (0, fun x => 0, fun x => 0).fst)\n[PROOFSTEP]\nsimp [hfg]\n[GOAL]\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : T2Space α\ninst✝¹ : MeasurableSpace α\ninst✝ : OpensMeasurableSpace α\nf g : (ℕ → ℕ) → α\nhf : Continuous f\nhg : Continuous g\nh : Disjoint (range f) (range g)\nhfg : ¬MeasurablySeparable (range f) (range g)\nI :\n  ∀ (n : ℕ) (x y : ℕ → ℕ),\n    ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n) →\n      ∃ x' y',\n        x' ∈ cylinder x n ∧\n          y' ∈ cylinder y n ∧ ¬MeasurablySeparable (f '' cylinder x' (n + 1)) (g '' cylinder y' (n + 1))\nA : Type := { p // ¬MeasurablySeparable (f '' cylinder p.snd.fst p.fst) (g '' cylinder p.snd.snd p.fst) }\nF : A → A\nhFn : ∀ (p : A), (↑(F p)).fst = (↑p).fst + 1\nhFx : ∀ (p : A), (↑(F p)).snd.fst ∈ cylinder (↑p).snd.fst (↑p).fst\nhFy : ∀ (p : A), (↑(F p)).snd.snd ∈ cylinder (↑p).snd.snd (↑p).fst\np0 : A :=\n  { val := (0, fun x => 0, fun x => 0),\n    property := (_ : ¬MeasurablySeparable (f '' cylinder (fun x => 0) 0) (g '' cylinder (fun x => 0) 0)) }\n⊢ False\n[PROOFSTEP]\nlet p : ℕ → A := fun n => F^[n] p0\n[GOAL]\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : T2Space α\ninst✝¹ : MeasurableSpace α\ninst✝ : OpensMeasurableSpace α\nf g : (ℕ → ℕ) → α\nhf : Continuous f\nhg : Continuous g\nh : Disjoint (range f) (range g)\nhfg : ¬MeasurablySeparable (range f) (range g)\nI :\n  ∀ (n : ℕ) (x y : ℕ → ℕ),\n    ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n) →\n      ∃ x' y',\n        x' ∈ cylinder x n ∧\n          y' ∈ cylinder y n ∧ ¬MeasurablySeparable (f '' cylinder x' (n + 1)) (g '' cylinder y' (n + 1))\nA : Type := { p // ¬MeasurablySeparable (f '' cylinder p.snd.fst p.fst) (g '' cylinder p.snd.snd p.fst) }\nF : A → A\nhFn : ∀ (p : A), (↑(F p)).fst = (↑p).fst + 1\nhFx : ∀ (p : A), (↑(F p)).snd.fst ∈ cylinder (↑p).snd.fst (↑p).fst\nhFy : ∀ (p : A), (↑(F p)).snd.snd ∈ cylinder (↑p).snd.snd (↑p).fst\np0 : A :=\n  { val := (0, fun x => 0, fun x => 0),\n    property := (_ : ¬MeasurablySeparable (f '' cylinder (fun x => 0) 0) (g '' cylinder (fun x => 0) 0)) }\np : ℕ → A := fun n => F^[n] p0\n⊢ False\n[PROOFSTEP]\nhave prec : ∀ n, p (n + 1) = F (p n) := fun n => by\n  simp only [iterate_succ', Function.comp]\n    -- check that at the `n`-th step we deal with cylinders of length `n`\n[GOAL]\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : T2Space α\ninst✝¹ : MeasurableSpace α\ninst✝ : OpensMeasurableSpace α\nf g : (ℕ → ℕ) → α\nhf : Continuous f\nhg : Continuous g\nh : Disjoint (range f) (range g)\nhfg : ¬MeasurablySeparable (range f) (range g)\nI :\n  ∀ (n : ℕ) (x y : ℕ → ℕ),\n    ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n) →\n      ∃ x' y',\n        x' ∈ cylinder x n ∧\n          y' ∈ cylinder y n ∧ ¬MeasurablySeparable (f '' cylinder x' (n + 1)) (g '' cylinder y' (n + 1))\nA : Type := { p // ¬MeasurablySeparable (f '' cylinder p.snd.fst p.fst) (g '' cylinder p.snd.snd p.fst) }\nF : A → A\nhFn : ∀ (p : A), (↑(F p)).fst = (↑p).fst + 1\nhFx : ∀ (p : A), (↑(F p)).snd.fst ∈ cylinder (↑p).snd.fst (↑p).fst\nhFy : ∀ (p : A), (↑(F p)).snd.snd ∈ cylinder (↑p).snd.snd (↑p).fst\np0 : A :=\n  { val := (0, fun x => 0, fun x => 0),\n    property := (_ : ¬MeasurablySeparable (f '' cylinder (fun x => 0) 0) (g '' cylinder (fun x => 0) 0)) }\np : ℕ → A := fun n => F^[n] p0\nn : ℕ\n⊢ p (n + 1) = F (p n)\n[PROOFSTEP]\nsimp only [iterate_succ', Function.comp]\n  -- check that at the `n`-th step we deal with cylinders of length `n`\n[GOAL]\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : T2Space α\ninst✝¹ : MeasurableSpace α\ninst✝ : OpensMeasurableSpace α\nf g : (ℕ → ℕ) → α\nhf : Continuous f\nhg : Continuous g\nh : Disjoint (range f) (range g)\nhfg : ¬MeasurablySeparable (range f) (range g)\nI :\n  ∀ (n : ℕ) (x y : ℕ → ℕ),\n    ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n) →\n      ∃ x' y',\n        x' ∈ cylinder x n ∧\n          y' ∈ cylinder y n ∧ ¬MeasurablySeparable (f '' cylinder x' (n + 1)) (g '' cylinder y' (n + 1))\nA : Type := { p // ¬MeasurablySeparable (f '' cylinder p.snd.fst p.fst) (g '' cylinder p.snd.snd p.fst) }\nF : A → A\nhFn : ∀ (p : A), (↑(F p)).fst = (↑p).fst + 1\nhFx : ∀ (p : A), (↑(F p)).snd.fst ∈ cylinder (↑p).snd.fst (↑p).fst\nhFy : ∀ (p : A), (↑(F p)).snd.snd ∈ cylinder (↑p).snd.snd (↑p).fst\np0 : A :=\n  { val := (0, fun x => 0, fun x => 0),\n    property := (_ : ¬MeasurablySeparable (f '' cylinder (fun x => 0) 0) (g '' cylinder (fun x => 0) 0)) }\np : ℕ → A := fun n => F^[n] p0\nprec : ∀ (n : ℕ), p (n + 1) = F (p n)\n⊢ False\n[PROOFSTEP]\nhave pn_fst : ∀ n, (p n).1.1 = n := by\n  intro n\n  induction' n with n IH\n  · rfl\n  ·\n    simp only [prec, hFn, IH]\n      -- check that the cylinders we construct are indeed decreasing, by checking that the coordinates\n        -- are stationary.\n[GOAL]\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : T2Space α\ninst✝¹ : MeasurableSpace α\ninst✝ : OpensMeasurableSpace α\nf g : (ℕ → ℕ) → α\nhf : Continuous f\nhg : Continuous g\nh : Disjoint (range f) (range g)\nhfg : ¬MeasurablySeparable (range f) (range g)\nI :\n  ∀ (n : ℕ) (x y : ℕ → ℕ),\n    ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n) →\n      ∃ x' y',\n        x' ∈ cylinder x n ∧\n          y' ∈ cylinder y n ∧ ¬MeasurablySeparable (f '' cylinder x' (n + 1)) (g '' cylinder y' (n + 1))\nA : Type := { p // ¬MeasurablySeparable (f '' cylinder p.snd.fst p.fst) (g '' cylinder p.snd.snd p.fst) }\nF : A → A\nhFn : ∀ (p : A), (↑(F p)).fst = (↑p).fst + 1\nhFx : ∀ (p : A), (↑(F p)).snd.fst ∈ cylinder (↑p).snd.fst (↑p).fst\nhFy : ∀ (p : A), (↑(F p)).snd.snd ∈ cylinder (↑p).snd.snd (↑p).fst\np0 : A :=\n  { val := (0, fun x => 0, fun x => 0),\n    property := (_ : ¬MeasurablySeparable (f '' cylinder (fun x => 0) 0) (g '' cylinder (fun x => 0) 0)) }\np : ℕ → A := fun n => F^[n] p0\nprec : ∀ (n : ℕ), p (n + 1) = F (p n)\n⊢ ∀ (n : ℕ), (↑(p n)).fst = n\n[PROOFSTEP]\nintro n\n[GOAL]\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : T2Space α\ninst✝¹ : MeasurableSpace α\ninst✝ : OpensMeasurableSpace α\nf g : (ℕ → ℕ) → α\nhf : Continuous f\nhg : Continuous g\nh : Disjoint (range f) (range g)\nhfg : ¬MeasurablySeparable (range f) (range g)\nI :\n  ∀ (n : ℕ) (x y : ℕ → ℕ),\n    ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n) →\n      ∃ x' y',\n        x' ∈ cylinder x n ∧\n          y' ∈ cylinder y n ∧ ¬MeasurablySeparable (f '' cylinder x' (n + 1)) (g '' cylinder y' (n + 1))\nA : Type := { p // ¬MeasurablySeparable (f '' cylinder p.snd.fst p.fst) (g '' cylinder p.snd.snd p.fst) }\nF : A → A\nhFn : ∀ (p : A), (↑(F p)).fst = (↑p).fst + 1\nhFx : ∀ (p : A), (↑(F p)).snd.fst ∈ cylinder (↑p).snd.fst (↑p).fst\nhFy : ∀ (p : A), (↑(F p)).snd.snd ∈ cylinder (↑p).snd.snd (↑p).fst\np0 : A :=\n  { val := (0, fun x => 0, fun x => 0),\n    property := (_ : ¬MeasurablySeparable (f '' cylinder (fun x => 0) 0) (g '' cylinder (fun x => 0) 0)) }\np : ℕ → A := fun n => F^[n] p0\nprec : ∀ (n : ℕ), p (n + 1) = F (p n)\nn : ℕ\n⊢ (↑(p n)).fst = n\n[PROOFSTEP]\ninduction' n with n IH\n[GOAL]\ncase zero\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : T2Space α\ninst✝¹ : MeasurableSpace α\ninst✝ : OpensMeasurableSpace α\nf g : (ℕ → ℕ) → α\nhf : Continuous f\nhg : Continuous g\nh : Disjoint (range f) (range g)\nhfg : ¬MeasurablySeparable (range f) (range g)\nI :\n  ∀ (n : ℕ) (x y : ℕ → ℕ),\n    ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n) →\n      ∃ x' y',\n        x' ∈ cylinder x n ∧\n          y' ∈ cylinder y n ∧ ¬MeasurablySeparable (f '' cylinder x' (n + 1)) (g '' cylinder y' (n + 1))\nA : Type := { p // ¬MeasurablySeparable (f '' cylinder p.snd.fst p.fst) (g '' cylinder p.snd.snd p.fst) }\nF : A → A\nhFn : ∀ (p : A), (↑(F p)).fst = (↑p).fst + 1\nhFx : ∀ (p : A), (↑(F p)).snd.fst ∈ cylinder (↑p).snd.fst (↑p).fst\nhFy : ∀ (p : A), (↑(F p)).snd.snd ∈ cylinder (↑p).snd.snd (↑p).fst\np0 : A :=\n  { val := (0, fun x => 0, fun x => 0),\n    property := (_ : ¬MeasurablySeparable (f '' cylinder (fun x => 0) 0) (g '' cylinder (fun x => 0) 0)) }\np : ℕ → A := fun n => F^[n] p0\nprec : ∀ (n : ℕ), p (n + 1) = F (p n)\n⊢ (↑(p Nat.zero)).fst = Nat.zero\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : T2Space α\ninst✝¹ : MeasurableSpace α\ninst✝ : OpensMeasurableSpace α\nf g : (ℕ → ℕ) → α\nhf : Continuous f\nhg : Continuous g\nh : Disjoint (range f) (range g)\nhfg : ¬MeasurablySeparable (range f) (range g)\nI :\n  ∀ (n : ℕ) (x y : ℕ → ℕ),\n    ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n) →\n      ∃ x' y',\n        x' ∈ cylinder x n ∧\n          y' ∈ cylinder y n ∧ ¬MeasurablySeparable (f '' cylinder x' (n + 1)) (g '' cylinder y' (n + 1))\nA : Type := { p // ¬MeasurablySeparable (f '' cylinder p.snd.fst p.fst) (g '' cylinder p.snd.snd p.fst) }\nF : A → A\nhFn : ∀ (p : A), (↑(F p)).fst = (↑p).fst + 1\nhFx : ∀ (p : A), (↑(F p)).snd.fst ∈ cylinder (↑p).snd.fst (↑p).fst\nhFy : ∀ (p : A), (↑(F p)).snd.snd ∈ cylinder (↑p).snd.snd (↑p).fst\np0 : A :=\n  { val := (0, fun x => 0, fun x => 0),\n    property := (_ : ¬MeasurablySeparable (f '' cylinder (fun x => 0) 0) (g '' cylinder (fun x => 0) 0)) }\np : ℕ → A := fun n => F^[n] p0\nprec : ∀ (n : ℕ), p (n + 1) = F (p n)\nn : ℕ\nIH : (↑(p n)).fst = n\n⊢ (↑(p (Nat.succ n))).fst = Nat.succ n\n[PROOFSTEP]\nsimp only [prec, hFn, IH]\n  -- check that the cylinders we construct are indeed decreasing, by checking that the coordinates\n    -- are stationary.\n[GOAL]\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : T2Space α\ninst✝¹ : MeasurableSpace α\ninst✝ : OpensMeasurableSpace α\nf g : (ℕ → ℕ) → α\nhf : Continuous f\nhg : Continuous g\nh : Disjoint (range f) (range g)\nhfg : ¬MeasurablySeparable (range f) (range g)\nI :\n  ∀ (n : ℕ) (x y : ℕ → ℕ),\n    ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n) →\n      ∃ x' y',\n        x' ∈ cylinder x n ∧\n          y' ∈ cylinder y n ∧ ¬MeasurablySeparable (f '' cylinder x' (n + 1)) (g '' cylinder y' (n + 1))\nA : Type := { p // ¬MeasurablySeparable (f '' cylinder p.snd.fst p.fst) (g '' cylinder p.snd.snd p.fst) }\nF : A → A\nhFn : ∀ (p : A), (↑(F p)).fst = (↑p).fst + 1\nhFx : ∀ (p : A), (↑(F p)).snd.fst ∈ cylinder (↑p).snd.fst (↑p).fst\nhFy : ∀ (p : A), (↑(F p)).snd.snd ∈ cylinder (↑p).snd.snd (↑p).fst\np0 : A :=\n  { val := (0, fun x => 0, fun x => 0),\n    property := (_ : ¬MeasurablySeparable (f '' cylinder (fun x => 0) 0) (g '' cylinder (fun x => 0) 0)) }\np : ℕ → A := fun n => F^[n] p0\nprec : ∀ (n : ℕ), p (n + 1) = F (p n)\npn_fst : ∀ (n : ℕ), (↑(p n)).fst = n\n⊢ False\n[PROOFSTEP]\nhave Ix : ∀ m n, m + 1 ≤ n → (p n).1.2.1 m = (p (m + 1)).1.2.1 m :=\n  by\n  intro m\n  apply Nat.le_induction\n  · rfl\n  intro n hmn IH\n  have I : (F (p n)).val.snd.fst m = (p n).val.snd.fst m :=\n    by\n    apply hFx (p n) m\n    rw [pn_fst]\n    exact hmn\n  rw [prec, I, IH]\n[GOAL]\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : T2Space α\ninst✝¹ : MeasurableSpace α\ninst✝ : OpensMeasurableSpace α\nf g : (ℕ → ℕ) → α\nhf : Continuous f\nhg : Continuous g\nh : Disjoint (range f) (range g)\nhfg : ¬MeasurablySeparable (range f) (range g)\nI :\n  ∀ (n : ℕ) (x y : ℕ → ℕ),\n    ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n) →\n      ∃ x' y',\n        x' ∈ cylinder x n ∧\n          y' ∈ cylinder y n ∧ ¬MeasurablySeparable (f '' cylinder x' (n + 1)) (g '' cylinder y' (n + 1))\nA : Type := { p // ¬MeasurablySeparable (f '' cylinder p.snd.fst p.fst) (g '' cylinder p.snd.snd p.fst) }\nF : A → A\nhFn : ∀ (p : A), (↑(F p)).fst = (↑p).fst + 1\nhFx : ∀ (p : A), (↑(F p)).snd.fst ∈ cylinder (↑p).snd.fst (↑p).fst\nhFy : ∀ (p : A), (↑(F p)).snd.snd ∈ cylinder (↑p).snd.snd (↑p).fst\np0 : A :=\n  { val := (0, fun x => 0, fun x => 0),\n    property := (_ : ¬MeasurablySeparable (f '' cylinder (fun x => 0) 0) (g '' cylinder (fun x => 0) 0)) }\np : ℕ → A := fun n => F^[n] p0\nprec : ∀ (n : ℕ), p (n + 1) = F (p n)\npn_fst : ∀ (n : ℕ), (↑(p n)).fst = n\n⊢ ∀ (m n : ℕ), m + 1 ≤ n → Prod.fst (↑(p n)).snd m = Prod.fst (↑(p (m + 1))).snd m\n[PROOFSTEP]\nintro m\n[GOAL]\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : T2Space α\ninst✝¹ : MeasurableSpace α\ninst✝ : OpensMeasurableSpace α\nf g : (ℕ → ℕ) → α\nhf : Continuous f\nhg : Continuous g\nh : Disjoint (range f) (range g)\nhfg : ¬MeasurablySeparable (range f) (range g)\nI :\n  ∀ (n : ℕ) (x y : ℕ → ℕ),\n    ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n) →\n      ∃ x' y',\n        x' ∈ cylinder x n ∧\n          y' ∈ cylinder y n ∧ ¬MeasurablySeparable (f '' cylinder x' (n + 1)) (g '' cylinder y' (n + 1))\nA : Type := { p // ¬MeasurablySeparable (f '' cylinder p.snd.fst p.fst) (g '' cylinder p.snd.snd p.fst) }\nF : A → A\nhFn : ∀ (p : A), (↑(F p)).fst = (↑p).fst + 1\nhFx : ∀ (p : A), (↑(F p)).snd.fst ∈ cylinder (↑p).snd.fst (↑p).fst\nhFy : ∀ (p : A), (↑(F p)).snd.snd ∈ cylinder (↑p).snd.snd (↑p).fst\np0 : A :=\n  { val := (0, fun x => 0, fun x => 0),\n    property := (_ : ¬MeasurablySeparable (f '' cylinder (fun x => 0) 0) (g '' cylinder (fun x => 0) 0)) }\np : ℕ → A := fun n => F^[n] p0\nprec : ∀ (n : ℕ), p (n + 1) = F (p n)\npn_fst : ∀ (n : ℕ), (↑(p n)).fst = n\nm : ℕ\n⊢ ∀ (n : ℕ), m + 1 ≤ n → Prod.fst (↑(p n)).snd m = Prod.fst (↑(p (m + 1))).snd m\n[PROOFSTEP]\napply Nat.le_induction\n[GOAL]\ncase base\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : T2Space α\ninst✝¹ : MeasurableSpace α\ninst✝ : OpensMeasurableSpace α\nf g : (ℕ → ℕ) → α\nhf : Continuous f\nhg : Continuous g\nh : Disjoint (range f) (range g)\nhfg : ¬MeasurablySeparable (range f) (range g)\nI :\n  ∀ (n : ℕ) (x y : ℕ → ℕ),\n    ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n) →\n      ∃ x' y',\n        x' ∈ cylinder x n ∧\n          y' ∈ cylinder y n ∧ ¬MeasurablySeparable (f '' cylinder x' (n + 1)) (g '' cylinder y' (n + 1))\nA : Type := { p // ¬MeasurablySeparable (f '' cylinder p.snd.fst p.fst) (g '' cylinder p.snd.snd p.fst) }\nF : A → A\nhFn : ∀ (p : A), (↑(F p)).fst = (↑p).fst + 1\nhFx : ∀ (p : A), (↑(F p)).snd.fst ∈ cylinder (↑p).snd.fst (↑p).fst\nhFy : ∀ (p : A), (↑(F p)).snd.snd ∈ cylinder (↑p).snd.snd (↑p).fst\np0 : A :=\n  { val := (0, fun x => 0, fun x => 0),\n    property := (_ : ¬MeasurablySeparable (f '' cylinder (fun x => 0) 0) (g '' cylinder (fun x => 0) 0)) }\np : ℕ → A := fun n => F^[n] p0\nprec : ∀ (n : ℕ), p (n + 1) = F (p n)\npn_fst : ∀ (n : ℕ), (↑(p n)).fst = n\nm : ℕ\n⊢ Prod.fst (↑(p (m + 1))).snd m = Prod.fst (↑(p (m + 1))).snd m\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : T2Space α\ninst✝¹ : MeasurableSpace α\ninst✝ : OpensMeasurableSpace α\nf g : (ℕ → ℕ) → α\nhf : Continuous f\nhg : Continuous g\nh : Disjoint (range f) (range g)\nhfg : ¬MeasurablySeparable (range f) (range g)\nI :\n  ∀ (n : ℕ) (x y : ℕ → ℕ),\n    ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n) →\n      ∃ x' y',\n        x' ∈ cylinder x n ∧\n          y' ∈ cylinder y n ∧ ¬MeasurablySeparable (f '' cylinder x' (n + 1)) (g '' cylinder y' (n + 1))\nA : Type := { p // ¬MeasurablySeparable (f '' cylinder p.snd.fst p.fst) (g '' cylinder p.snd.snd p.fst) }\nF : A → A\nhFn : ∀ (p : A), (↑(F p)).fst = (↑p).fst + 1\nhFx : ∀ (p : A), (↑(F p)).snd.fst ∈ cylinder (↑p).snd.fst (↑p).fst\nhFy : ∀ (p : A), (↑(F p)).snd.snd ∈ cylinder (↑p).snd.snd (↑p).fst\np0 : A :=\n  { val := (0, fun x => 0, fun x => 0),\n    property := (_ : ¬MeasurablySeparable (f '' cylinder (fun x => 0) 0) (g '' cylinder (fun x => 0) 0)) }\np : ℕ → A := fun n => F^[n] p0\nprec : ∀ (n : ℕ), p (n + 1) = F (p n)\npn_fst : ∀ (n : ℕ), (↑(p n)).fst = n\nm : ℕ\n⊢ ∀ (n : ℕ),\n    m + 1 ≤ n →\n      Prod.fst (↑(p n)).snd m = Prod.fst (↑(p (m + 1))).snd m →\n        Prod.fst (↑(p (n + 1))).snd m = Prod.fst (↑(p (m + 1))).snd m\n[PROOFSTEP]\nintro n hmn IH\n[GOAL]\ncase succ\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : T2Space α\ninst✝¹ : MeasurableSpace α\ninst✝ : OpensMeasurableSpace α\nf g : (ℕ → ℕ) → α\nhf : Continuous f\nhg : Continuous g\nh : Disjoint (range f) (range g)\nhfg : ¬MeasurablySeparable (range f) (range g)\nI :\n  ∀ (n : ℕ) (x y : ℕ → ℕ),\n    ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n) →\n      ∃ x' y',\n        x' ∈ cylinder x n ∧\n          y' ∈ cylinder y n ∧ ¬MeasurablySeparable (f '' cylinder x' (n + 1)) (g '' cylinder y' (n + 1))\nA : Type := { p // ¬MeasurablySeparable (f '' cylinder p.snd.fst p.fst) (g '' cylinder p.snd.snd p.fst) }\nF : A → A\nhFn : ∀ (p : A), (↑(F p)).fst = (↑p).fst + 1\nhFx : ∀ (p : A), (↑(F p)).snd.fst ∈ cylinder (↑p).snd.fst (↑p).fst\nhFy : ∀ (p : A), (↑(F p)).snd.snd ∈ cylinder (↑p).snd.snd (↑p).fst\np0 : A :=\n  { val := (0, fun x => 0, fun x => 0),\n    property := (_ : ¬MeasurablySeparable (f '' cylinder (fun x => 0) 0) (g '' cylinder (fun x => 0) 0)) }\np : ℕ → A := fun n => F^[n] p0\nprec : ∀ (n : ℕ), p (n + 1) = F (p n)\npn_fst : ∀ (n : ℕ), (↑(p n)).fst = n\nm n : ℕ\nhmn : m + 1 ≤ n\nIH : Prod.fst (↑(p n)).snd m = Prod.fst (↑(p (m + 1))).snd m\n⊢ Prod.fst (↑(p (n + 1))).snd m = Prod.fst (↑(p (m + 1))).snd m\n[PROOFSTEP]\nhave I : (F (p n)).val.snd.fst m = (p n).val.snd.fst m :=\n  by\n  apply hFx (p n) m\n  rw [pn_fst]\n  exact hmn\n[GOAL]\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : T2Space α\ninst✝¹ : MeasurableSpace α\ninst✝ : OpensMeasurableSpace α\nf g : (ℕ → ℕ) → α\nhf : Continuous f\nhg : Continuous g\nh : Disjoint (range f) (range g)\nhfg : ¬MeasurablySeparable (range f) (range g)\nI :\n  ∀ (n : ℕ) (x y : ℕ → ℕ),\n    ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n) →\n      ∃ x' y',\n        x' ∈ cylinder x n ∧\n          y' ∈ cylinder y n ∧ ¬MeasurablySeparable (f '' cylinder x' (n + 1)) (g '' cylinder y' (n + 1))\nA : Type := { p // ¬MeasurablySeparable (f '' cylinder p.snd.fst p.fst) (g '' cylinder p.snd.snd p.fst) }\nF : A → A\nhFn : ∀ (p : A), (↑(F p)).fst = (↑p).fst + 1\nhFx : ∀ (p : A), (↑(F p)).snd.fst ∈ cylinder (↑p).snd.fst (↑p).fst\nhFy : ∀ (p : A), (↑(F p)).snd.snd ∈ cylinder (↑p).snd.snd (↑p).fst\np0 : A :=\n  { val := (0, fun x => 0, fun x => 0),\n    property := (_ : ¬MeasurablySeparable (f '' cylinder (fun x => 0) 0) (g '' cylinder (fun x => 0) 0)) }\np : ℕ → A := fun n => F^[n] p0\nprec : ∀ (n : ℕ), p (n + 1) = F (p n)\npn_fst : ∀ (n : ℕ), (↑(p n)).fst = n\nm n : ℕ\nhmn : m + 1 ≤ n\nIH : Prod.fst (↑(p n)).snd m = Prod.fst (↑(p (m + 1))).snd m\n⊢ Prod.fst (↑(F (p n))).snd m = Prod.fst (↑(p n)).snd m\n[PROOFSTEP]\napply hFx (p n) m\n[GOAL]\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : T2Space α\ninst✝¹ : MeasurableSpace α\ninst✝ : OpensMeasurableSpace α\nf g : (ℕ → ℕ) → α\nhf : Continuous f\nhg : Continuous g\nh : Disjoint (range f) (range g)\nhfg : ¬MeasurablySeparable (range f) (range g)\nI :\n  ∀ (n : ℕ) (x y : ℕ → ℕ),\n    ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n) →\n      ∃ x' y',\n        x' ∈ cylinder x n ∧\n          y' ∈ cylinder y n ∧ ¬MeasurablySeparable (f '' cylinder x' (n + 1)) (g '' cylinder y' (n + 1))\nA : Type := { p // ¬MeasurablySeparable (f '' cylinder p.snd.fst p.fst) (g '' cylinder p.snd.snd p.fst) }\nF : A → A\nhFn : ∀ (p : A), (↑(F p)).fst = (↑p).fst + 1\nhFx : ∀ (p : A), (↑(F p)).snd.fst ∈ cylinder (↑p).snd.fst (↑p).fst\nhFy : ∀ (p : A), (↑(F p)).snd.snd ∈ cylinder (↑p).snd.snd (↑p).fst\np0 : A :=\n  { val := (0, fun x => 0, fun x => 0),\n    property := (_ : ¬MeasurablySeparable (f '' cylinder (fun x => 0) 0) (g '' cylinder (fun x => 0) 0)) }\np : ℕ → A := fun n => F^[n] p0\nprec : ∀ (n : ℕ), p (n + 1) = F (p n)\npn_fst : ∀ (n : ℕ), (↑(p n)).fst = n\nm n : ℕ\nhmn : m + 1 ≤ n\nIH : Prod.fst (↑(p n)).snd m = Prod.fst (↑(p (m + 1))).snd m\n⊢ m < (↑(p n)).fst\n[PROOFSTEP]\nrw [pn_fst]\n[GOAL]\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : T2Space α\ninst✝¹ : MeasurableSpace α\ninst✝ : OpensMeasurableSpace α\nf g : (ℕ → ℕ) → α\nhf : Continuous f\nhg : Continuous g\nh : Disjoint (range f) (range g)\nhfg : ¬MeasurablySeparable (range f) (range g)\nI :\n  ∀ (n : ℕ) (x y : ℕ → ℕ),\n    ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n) →\n      ∃ x' y',\n        x' ∈ cylinder x n ∧\n          y' ∈ cylinder y n ∧ ¬MeasurablySeparable (f '' cylinder x' (n + 1)) (g '' cylinder y' (n + 1))\nA : Type := { p // ¬MeasurablySeparable (f '' cylinder p.snd.fst p.fst) (g '' cylinder p.snd.snd p.fst) }\nF : A → A\nhFn : ∀ (p : A), (↑(F p)).fst = (↑p).fst + 1\nhFx : ∀ (p : A), (↑(F p)).snd.fst ∈ cylinder (↑p).snd.fst (↑p).fst\nhFy : ∀ (p : A), (↑(F p)).snd.snd ∈ cylinder (↑p).snd.snd (↑p).fst\np0 : A :=\n  { val := (0, fun x => 0, fun x => 0),\n    property := (_ : ¬MeasurablySeparable (f '' cylinder (fun x => 0) 0) (g '' cylinder (fun x => 0) 0)) }\np : ℕ → A := fun n => F^[n] p0\nprec : ∀ (n : ℕ), p (n + 1) = F (p n)\npn_fst : ∀ (n : ℕ), (↑(p n)).fst = n\nm n : ℕ\nhmn : m + 1 ≤ n\nIH : Prod.fst (↑(p n)).snd m = Prod.fst (↑(p (m + 1))).snd m\n⊢ m < n\n[PROOFSTEP]\nexact hmn\n[GOAL]\ncase succ\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : T2Space α\ninst✝¹ : MeasurableSpace α\ninst✝ : OpensMeasurableSpace α\nf g : (ℕ → ℕ) → α\nhf : Continuous f\nhg : Continuous g\nh : Disjoint (range f) (range g)\nhfg : ¬MeasurablySeparable (range f) (range g)\nI✝ :\n  ∀ (n : ℕ) (x y : ℕ → ℕ),\n    ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n) →\n      ∃ x' y',\n        x' ∈ cylinder x n ∧\n          y' ∈ cylinder y n ∧ ¬MeasurablySeparable (f '' cylinder x' (n + 1)) (g '' cylinder y' (n + 1))\nA : Type := { p // ¬MeasurablySeparable (f '' cylinder p.snd.fst p.fst) (g '' cylinder p.snd.snd p.fst) }\nF : A → A\nhFn : ∀ (p : A), (↑(F p)).fst = (↑p).fst + 1\nhFx : ∀ (p : A), (↑(F p)).snd.fst ∈ cylinder (↑p).snd.fst (↑p).fst\nhFy : ∀ (p : A), (↑(F p)).snd.snd ∈ cylinder (↑p).snd.snd (↑p).fst\np0 : A :=\n  { val := (0, fun x => 0, fun x => 0),\n    property := (_ : ¬MeasurablySeparable (f '' cylinder (fun x => 0) 0) (g '' cylinder (fun x => 0) 0)) }\np : ℕ → A := fun n => F^[n] p0\nprec : ∀ (n : ℕ), p (n + 1) = F (p n)\npn_fst : ∀ (n : ℕ), (↑(p n)).fst = n\nm n : ℕ\nhmn : m + 1 ≤ n\nIH : Prod.fst (↑(p n)).snd m = Prod.fst (↑(p (m + 1))).snd m\nI : Prod.fst (↑(F (p n))).snd m = Prod.fst (↑(p n)).snd m\n⊢ Prod.fst (↑(p (n + 1))).snd m = Prod.fst (↑(p (m + 1))).snd m\n[PROOFSTEP]\nrw [prec, I, IH]\n[GOAL]\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : T2Space α\ninst✝¹ : MeasurableSpace α\ninst✝ : OpensMeasurableSpace α\nf g : (ℕ → ℕ) → α\nhf : Continuous f\nhg : Continuous g\nh : Disjoint (range f) (range g)\nhfg : ¬MeasurablySeparable (range f) (range g)\nI :\n  ∀ (n : ℕ) (x y : ℕ → ℕ),\n    ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n) →\n      ∃ x' y',\n        x' ∈ cylinder x n ∧\n          y' ∈ cylinder y n ∧ ¬MeasurablySeparable (f '' cylinder x' (n + 1)) (g '' cylinder y' (n + 1))\nA : Type := { p // ¬MeasurablySeparable (f '' cylinder p.snd.fst p.fst) (g '' cylinder p.snd.snd p.fst) }\nF : A → A\nhFn : ∀ (p : A), (↑(F p)).fst = (↑p).fst + 1\nhFx : ∀ (p : A), (↑(F p)).snd.fst ∈ cylinder (↑p).snd.fst (↑p).fst\nhFy : ∀ (p : A), (↑(F p)).snd.snd ∈ cylinder (↑p).snd.snd (↑p).fst\np0 : A :=\n  { val := (0, fun x => 0, fun x => 0),\n    property := (_ : ¬MeasurablySeparable (f '' cylinder (fun x => 0) 0) (g '' cylinder (fun x => 0) 0)) }\np : ℕ → A := fun n => F^[n] p0\nprec : ∀ (n : ℕ), p (n + 1) = F (p n)\npn_fst : ∀ (n : ℕ), (↑(p n)).fst = n\nIx : ∀ (m n : ℕ), m + 1 ≤ n → Prod.fst (↑(p n)).snd m = Prod.fst (↑(p (m + 1))).snd m\n⊢ False\n[PROOFSTEP]\nhave Iy : ∀ m n, m + 1 ≤ n → (p n).1.2.2 m = (p (m + 1)).1.2.2 m :=\n  by\n  intro m\n  apply Nat.le_induction\n  · rfl\n  intro n hmn IH\n  have I : (F (p n)).val.snd.snd m = (p n).val.snd.snd m :=\n    by\n    apply hFy (p n) m\n    rw [pn_fst]\n    exact hmn\n  rw [prec, I, IH]\n    -- denote by `x` and `y` the limit points of these two sequences of cylinders.\n[GOAL]\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : T2Space α\ninst✝¹ : MeasurableSpace α\ninst✝ : OpensMeasurableSpace α\nf g : (ℕ → ℕ) → α\nhf : Continuous f\nhg : Continuous g\nh : Disjoint (range f) (range g)\nhfg : ¬MeasurablySeparable (range f) (range g)\nI :\n  ∀ (n : ℕ) (x y : ℕ → ℕ),\n    ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n) →\n      ∃ x' y',\n        x' ∈ cylinder x n ∧\n          y' ∈ cylinder y n ∧ ¬MeasurablySeparable (f '' cylinder x' (n + 1)) (g '' cylinder y' (n + 1))\nA : Type := { p // ¬MeasurablySeparable (f '' cylinder p.snd.fst p.fst) (g '' cylinder p.snd.snd p.fst) }\nF : A → A\nhFn : ∀ (p : A), (↑(F p)).fst = (↑p).fst + 1\nhFx : ∀ (p : A), (↑(F p)).snd.fst ∈ cylinder (↑p).snd.fst (↑p).fst\nhFy : ∀ (p : A), (↑(F p)).snd.snd ∈ cylinder (↑p).snd.snd (↑p).fst\np0 : A :=\n  { val := (0, fun x => 0, fun x => 0),\n    property := (_ : ¬MeasurablySeparable (f '' cylinder (fun x => 0) 0) (g '' cylinder (fun x => 0) 0)) }\np : ℕ → A := fun n => F^[n] p0\nprec : ∀ (n : ℕ), p (n + 1) = F (p n)\npn_fst : ∀ (n : ℕ), (↑(p n)).fst = n\nIx : ∀ (m n : ℕ), m + 1 ≤ n → Prod.fst (↑(p n)).snd m = Prod.fst (↑(p (m + 1))).snd m\n⊢ ∀ (m n : ℕ), m + 1 ≤ n → Prod.snd (↑(p n)).snd m = Prod.snd (↑(p (m + 1))).snd m\n[PROOFSTEP]\nintro m\n[GOAL]\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : T2Space α\ninst✝¹ : MeasurableSpace α\ninst✝ : OpensMeasurableSpace α\nf g : (ℕ → ℕ) → α\nhf : Continuous f\nhg : Continuous g\nh : Disjoint (range f) (range g)\nhfg : ¬MeasurablySeparable (range f) (range g)\nI :\n  ∀ (n : ℕ) (x y : ℕ → ℕ),\n    ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n) →\n      ∃ x' y',\n        x' ∈ cylinder x n ∧\n          y' ∈ cylinder y n ∧ ¬MeasurablySeparable (f '' cylinder x' (n + 1)) (g '' cylinder y' (n + 1))\nA : Type := { p // ¬MeasurablySeparable (f '' cylinder p.snd.fst p.fst) (g '' cylinder p.snd.snd p.fst) }\nF : A → A\nhFn : ∀ (p : A), (↑(F p)).fst = (↑p).fst + 1\nhFx : ∀ (p : A), (↑(F p)).snd.fst ∈ cylinder (↑p).snd.fst (↑p).fst\nhFy : ∀ (p : A), (↑(F p)).snd.snd ∈ cylinder (↑p).snd.snd (↑p).fst\np0 : A :=\n  { val := (0, fun x => 0, fun x => 0),\n    property := (_ : ¬MeasurablySeparable (f '' cylinder (fun x => 0) 0) (g '' cylinder (fun x => 0) 0)) }\np : ℕ → A := fun n => F^[n] p0\nprec : ∀ (n : ℕ), p (n + 1) = F (p n)\npn_fst : ∀ (n : ℕ), (↑(p n)).fst = n\nIx : ∀ (m n : ℕ), m + 1 ≤ n → Prod.fst (↑(p n)).snd m = Prod.fst (↑(p (m + 1))).snd m\nm : ℕ\n⊢ ∀ (n : ℕ), m + 1 ≤ n → Prod.snd (↑(p n)).snd m = Prod.snd (↑(p (m + 1))).snd m\n[PROOFSTEP]\napply Nat.le_induction\n[GOAL]\ncase base\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : T2Space α\ninst✝¹ : MeasurableSpace α\ninst✝ : OpensMeasurableSpace α\nf g : (ℕ → ℕ) → α\nhf : Continuous f\nhg : Continuous g\nh : Disjoint (range f) (range g)\nhfg : ¬MeasurablySeparable (range f) (range g)\nI :\n  ∀ (n : ℕ) (x y : ℕ → ℕ),\n    ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n) →\n      ∃ x' y',\n        x' ∈ cylinder x n ∧\n          y' ∈ cylinder y n ∧ ¬MeasurablySeparable (f '' cylinder x' (n + 1)) (g '' cylinder y' (n + 1))\nA : Type := { p // ¬MeasurablySeparable (f '' cylinder p.snd.fst p.fst) (g '' cylinder p.snd.snd p.fst) }\nF : A → A\nhFn : ∀ (p : A), (↑(F p)).fst = (↑p).fst + 1\nhFx : ∀ (p : A), (↑(F p)).snd.fst ∈ cylinder (↑p).snd.fst (↑p).fst\nhFy : ∀ (p : A), (↑(F p)).snd.snd ∈ cylinder (↑p).snd.snd (↑p).fst\np0 : A :=\n  { val := (0, fun x => 0, fun x => 0),\n    property := (_ : ¬MeasurablySeparable (f '' cylinder (fun x => 0) 0) (g '' cylinder (fun x => 0) 0)) }\np : ℕ → A := fun n => F^[n] p0\nprec : ∀ (n : ℕ), p (n + 1) = F (p n)\npn_fst : ∀ (n : ℕ), (↑(p n)).fst = n\nIx : ∀ (m n : ℕ), m + 1 ≤ n → Prod.fst (↑(p n)).snd m = Prod.fst (↑(p (m + 1))).snd m\nm : ℕ\n⊢ Prod.snd (↑(p (m + 1))).snd m = Prod.snd (↑(p (m + 1))).snd m\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : T2Space α\ninst✝¹ : MeasurableSpace α\ninst✝ : OpensMeasurableSpace α\nf g : (ℕ → ℕ) → α\nhf : Continuous f\nhg : Continuous g\nh : Disjoint (range f) (range g)\nhfg : ¬MeasurablySeparable (range f) (range g)\nI :\n  ∀ (n : ℕ) (x y : ℕ → ℕ),\n    ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n) →\n      ∃ x' y',\n        x' ∈ cylinder x n ∧\n          y' ∈ cylinder y n ∧ ¬MeasurablySeparable (f '' cylinder x' (n + 1)) (g '' cylinder y' (n + 1))\nA : Type := { p // ¬MeasurablySeparable (f '' cylinder p.snd.fst p.fst) (g '' cylinder p.snd.snd p.fst) }\nF : A → A\nhFn : ∀ (p : A), (↑(F p)).fst = (↑p).fst + 1\nhFx : ∀ (p : A), (↑(F p)).snd.fst ∈ cylinder (↑p).snd.fst (↑p).fst\nhFy : ∀ (p : A), (↑(F p)).snd.snd ∈ cylinder (↑p).snd.snd (↑p).fst\np0 : A :=\n  { val := (0, fun x => 0, fun x => 0),\n    property := (_ : ¬MeasurablySeparable (f '' cylinder (fun x => 0) 0) (g '' cylinder (fun x => 0) 0)) }\np : ℕ → A := fun n => F^[n] p0\nprec : ∀ (n : ℕ), p (n + 1) = F (p n)\npn_fst : ∀ (n : ℕ), (↑(p n)).fst = n\nIx : ∀ (m n : ℕ), m + 1 ≤ n → Prod.fst (↑(p n)).snd m = Prod.fst (↑(p (m + 1))).snd m\nm : ℕ\n⊢ ∀ (n : ℕ),\n    m + 1 ≤ n →\n      Prod.snd (↑(p n)).snd m = Prod.snd (↑(p (m + 1))).snd m →\n        Prod.snd (↑(p (n + 1))).snd m = Prod.snd (↑(p (m + 1))).snd m\n[PROOFSTEP]\nintro n hmn IH\n[GOAL]\ncase succ\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : T2Space α\ninst✝¹ : MeasurableSpace α\ninst✝ : OpensMeasurableSpace α\nf g : (ℕ → ℕ) → α\nhf : Continuous f\nhg : Continuous g\nh : Disjoint (range f) (range g)\nhfg : ¬MeasurablySeparable (range f) (range g)\nI :\n  ∀ (n : ℕ) (x y : ℕ → ℕ),\n    ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n) →\n      ∃ x' y',\n        x' ∈ cylinder x n ∧\n          y' ∈ cylinder y n ∧ ¬MeasurablySeparable (f '' cylinder x' (n + 1)) (g '' cylinder y' (n + 1))\nA : Type := { p // ¬MeasurablySeparable (f '' cylinder p.snd.fst p.fst) (g '' cylinder p.snd.snd p.fst) }\nF : A → A\nhFn : ∀ (p : A), (↑(F p)).fst = (↑p).fst + 1\nhFx : ∀ (p : A), (↑(F p)).snd.fst ∈ cylinder (↑p).snd.fst (↑p).fst\nhFy : ∀ (p : A), (↑(F p)).snd.snd ∈ cylinder (↑p).snd.snd (↑p).fst\np0 : A :=\n  { val := (0, fun x => 0, fun x => 0),\n    property := (_ : ¬MeasurablySeparable (f '' cylinder (fun x => 0) 0) (g '' cylinder (fun x => 0) 0)) }\np : ℕ → A := fun n => F^[n] p0\nprec : ∀ (n : ℕ), p (n + 1) = F (p n)\npn_fst : ∀ (n : ℕ), (↑(p n)).fst = n\nIx : ∀ (m n : ℕ), m + 1 ≤ n → Prod.fst (↑(p n)).snd m = Prod.fst (↑(p (m + 1))).snd m\nm n : ℕ\nhmn : m + 1 ≤ n\nIH : Prod.snd (↑(p n)).snd m = Prod.snd (↑(p (m + 1))).snd m\n⊢ Prod.snd (↑(p (n + 1))).snd m = Prod.snd (↑(p (m + 1))).snd m\n[PROOFSTEP]\nhave I : (F (p n)).val.snd.snd m = (p n).val.snd.snd m :=\n  by\n  apply hFy (p n) m\n  rw [pn_fst]\n  exact hmn\n[GOAL]\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : T2Space α\ninst✝¹ : MeasurableSpace α\ninst✝ : OpensMeasurableSpace α\nf g : (ℕ → ℕ) → α\nhf : Continuous f\nhg : Continuous g\nh : Disjoint (range f) (range g)\nhfg : ¬MeasurablySeparable (range f) (range g)\nI :\n  ∀ (n : ℕ) (x y : ℕ → ℕ),\n    ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n) →\n      ∃ x' y',\n        x' ∈ cylinder x n ∧\n          y' ∈ cylinder y n ∧ ¬MeasurablySeparable (f '' cylinder x' (n + 1)) (g '' cylinder y' (n + 1))\nA : Type := { p // ¬MeasurablySeparable (f '' cylinder p.snd.fst p.fst) (g '' cylinder p.snd.snd p.fst) }\nF : A → A\nhFn : ∀ (p : A), (↑(F p)).fst = (↑p).fst + 1\nhFx : ∀ (p : A), (↑(F p)).snd.fst ∈ cylinder (↑p).snd.fst (↑p).fst\nhFy : ∀ (p : A), (↑(F p)).snd.snd ∈ cylinder (↑p).snd.snd (↑p).fst\np0 : A :=\n  { val := (0, fun x => 0, fun x => 0),\n    property := (_ : ¬MeasurablySeparable (f '' cylinder (fun x => 0) 0) (g '' cylinder (fun x => 0) 0)) }\np : ℕ → A := fun n => F^[n] p0\nprec : ∀ (n : ℕ), p (n + 1) = F (p n)\npn_fst : ∀ (n : ℕ), (↑(p n)).fst = n\nIx : ∀ (m n : ℕ), m + 1 ≤ n → Prod.fst (↑(p n)).snd m = Prod.fst (↑(p (m + 1))).snd m\nm n : ℕ\nhmn : m + 1 ≤ n\nIH : Prod.snd (↑(p n)).snd m = Prod.snd (↑(p (m + 1))).snd m\n⊢ Prod.snd (↑(F (p n))).snd m = Prod.snd (↑(p n)).snd m\n[PROOFSTEP]\napply hFy (p n) m\n[GOAL]\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : T2Space α\ninst✝¹ : MeasurableSpace α\ninst✝ : OpensMeasurableSpace α\nf g : (ℕ → ℕ) → α\nhf : Continuous f\nhg : Continuous g\nh : Disjoint (range f) (range g)\nhfg : ¬MeasurablySeparable (range f) (range g)\nI :\n  ∀ (n : ℕ) (x y : ℕ → ℕ),\n    ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n) →\n      ∃ x' y',\n        x' ∈ cylinder x n ∧\n          y' ∈ cylinder y n ∧ ¬MeasurablySeparable (f '' cylinder x' (n + 1)) (g '' cylinder y' (n + 1))\nA : Type := { p // ¬MeasurablySeparable (f '' cylinder p.snd.fst p.fst) (g '' cylinder p.snd.snd p.fst) }\nF : A → A\nhFn : ∀ (p : A), (↑(F p)).fst = (↑p).fst + 1\nhFx : ∀ (p : A), (↑(F p)).snd.fst ∈ cylinder (↑p).snd.fst (↑p).fst\nhFy : ∀ (p : A), (↑(F p)).snd.snd ∈ cylinder (↑p).snd.snd (↑p).fst\np0 : A :=\n  { val := (0, fun x => 0, fun x => 0),\n    property := (_ : ¬MeasurablySeparable (f '' cylinder (fun x => 0) 0) (g '' cylinder (fun x => 0) 0)) }\np : ℕ → A := fun n => F^[n] p0\nprec : ∀ (n : ℕ), p (n + 1) = F (p n)\npn_fst : ∀ (n : ℕ), (↑(p n)).fst = n\nIx : ∀ (m n : ℕ), m + 1 ≤ n → Prod.fst (↑(p n)).snd m = Prod.fst (↑(p (m + 1))).snd m\nm n : ℕ\nhmn : m + 1 ≤ n\nIH : Prod.snd (↑(p n)).snd m = Prod.snd (↑(p (m + 1))).snd m\n⊢ m < (↑(p n)).fst\n[PROOFSTEP]\nrw [pn_fst]\n[GOAL]\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : T2Space α\ninst✝¹ : MeasurableSpace α\ninst✝ : OpensMeasurableSpace α\nf g : (ℕ → ℕ) → α\nhf : Continuous f\nhg : Continuous g\nh : Disjoint (range f) (range g)\nhfg : ¬MeasurablySeparable (range f) (range g)\nI :\n  ∀ (n : ℕ) (x y : ℕ → ℕ),\n    ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n) →\n      ∃ x' y',\n        x' ∈ cylinder x n ∧\n          y' ∈ cylinder y n ∧ ¬MeasurablySeparable (f '' cylinder x' (n + 1)) (g '' cylinder y' (n + 1))\nA : Type := { p // ¬MeasurablySeparable (f '' cylinder p.snd.fst p.fst) (g '' cylinder p.snd.snd p.fst) }\nF : A → A\nhFn : ∀ (p : A), (↑(F p)).fst = (↑p).fst + 1\nhFx : ∀ (p : A), (↑(F p)).snd.fst ∈ cylinder (↑p).snd.fst (↑p).fst\nhFy : ∀ (p : A), (↑(F p)).snd.snd ∈ cylinder (↑p).snd.snd (↑p).fst\np0 : A :=\n  { val := (0, fun x => 0, fun x => 0),\n    property := (_ : ¬MeasurablySeparable (f '' cylinder (fun x => 0) 0) (g '' cylinder (fun x => 0) 0)) }\np : ℕ → A := fun n => F^[n] p0\nprec : ∀ (n : ℕ), p (n + 1) = F (p n)\npn_fst : ∀ (n : ℕ), (↑(p n)).fst = n\nIx : ∀ (m n : ℕ), m + 1 ≤ n → Prod.fst (↑(p n)).snd m = Prod.fst (↑(p (m + 1))).snd m\nm n : ℕ\nhmn : m + 1 ≤ n\nIH : Prod.snd (↑(p n)).snd m = Prod.snd (↑(p (m + 1))).snd m\n⊢ m < n\n[PROOFSTEP]\nexact hmn\n[GOAL]\ncase succ\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : T2Space α\ninst✝¹ : MeasurableSpace α\ninst✝ : OpensMeasurableSpace α\nf g : (ℕ → ℕ) → α\nhf : Continuous f\nhg : Continuous g\nh : Disjoint (range f) (range g)\nhfg : ¬MeasurablySeparable (range f) (range g)\nI✝ :\n  ∀ (n : ℕ) (x y : ℕ → ℕ),\n    ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n) →\n      ∃ x' y',\n        x' ∈ cylinder x n ∧\n          y' ∈ cylinder y n ∧ ¬MeasurablySeparable (f '' cylinder x' (n + 1)) (g '' cylinder y' (n + 1))\nA : Type := { p // ¬MeasurablySeparable (f '' cylinder p.snd.fst p.fst) (g '' cylinder p.snd.snd p.fst) }\nF : A → A\nhFn : ∀ (p : A), (↑(F p)).fst = (↑p).fst + 1\nhFx : ∀ (p : A), (↑(F p)).snd.fst ∈ cylinder (↑p).snd.fst (↑p).fst\nhFy : ∀ (p : A), (↑(F p)).snd.snd ∈ cylinder (↑p).snd.snd (↑p).fst\np0 : A :=\n  { val := (0, fun x => 0, fun x => 0),\n    property := (_ : ¬MeasurablySeparable (f '' cylinder (fun x => 0) 0) (g '' cylinder (fun x => 0) 0)) }\np : ℕ → A := fun n => F^[n] p0\nprec : ∀ (n : ℕ), p (n + 1) = F (p n)\npn_fst : ∀ (n : ℕ), (↑(p n)).fst = n\nIx : ∀ (m n : ℕ), m + 1 ≤ n → Prod.fst (↑(p n)).snd m = Prod.fst (↑(p (m + 1))).snd m\nm n : ℕ\nhmn : m + 1 ≤ n\nIH : Prod.snd (↑(p n)).snd m = Prod.snd (↑(p (m + 1))).snd m\nI : Prod.snd (↑(F (p n))).snd m = Prod.snd (↑(p n)).snd m\n⊢ Prod.snd (↑(p (n + 1))).snd m = Prod.snd (↑(p (m + 1))).snd m\n[PROOFSTEP]\nrw [prec, I, IH]\n  -- denote by `x` and `y` the limit points of these two sequences of cylinders.\n[GOAL]\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : T2Space α\ninst✝¹ : MeasurableSpace α\ninst✝ : OpensMeasurableSpace α\nf g : (ℕ → ℕ) → α\nhf : Continuous f\nhg : Continuous g\nh : Disjoint (range f) (range g)\nhfg : ¬MeasurablySeparable (range f) (range g)\nI :\n  ∀ (n : ℕ) (x y : ℕ → ℕ),\n    ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n) →\n      ∃ x' y',\n        x' ∈ cylinder x n ∧\n          y' ∈ cylinder y n ∧ ¬MeasurablySeparable (f '' cylinder x' (n + 1)) (g '' cylinder y' (n + 1))\nA : Type := { p // ¬MeasurablySeparable (f '' cylinder p.snd.fst p.fst) (g '' cylinder p.snd.snd p.fst) }\nF : A → A\nhFn : ∀ (p : A), (↑(F p)).fst = (↑p).fst + 1\nhFx : ∀ (p : A), (↑(F p)).snd.fst ∈ cylinder (↑p).snd.fst (↑p).fst\nhFy : ∀ (p : A), (↑(F p)).snd.snd ∈ cylinder (↑p).snd.snd (↑p).fst\np0 : A :=\n  { val := (0, fun x => 0, fun x => 0),\n    property := (_ : ¬MeasurablySeparable (f '' cylinder (fun x => 0) 0) (g '' cylinder (fun x => 0) 0)) }\np : ℕ → A := fun n => F^[n] p0\nprec : ∀ (n : ℕ), p (n + 1) = F (p n)\npn_fst : ∀ (n : ℕ), (↑(p n)).fst = n\nIx : ∀ (m n : ℕ), m + 1 ≤ n → Prod.fst (↑(p n)).snd m = Prod.fst (↑(p (m + 1))).snd m\nIy : ∀ (m n : ℕ), m + 1 ≤ n → Prod.snd (↑(p n)).snd m = Prod.snd (↑(p (m + 1))).snd m\n⊢ False\n[PROOFSTEP]\nset x : ℕ → ℕ := fun n => (p (n + 1)).1.2.1 n with hx\n[GOAL]\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : T2Space α\ninst✝¹ : MeasurableSpace α\ninst✝ : OpensMeasurableSpace α\nf g : (ℕ → ℕ) → α\nhf : Continuous f\nhg : Continuous g\nh : Disjoint (range f) (range g)\nhfg : ¬MeasurablySeparable (range f) (range g)\nI :\n  ∀ (n : ℕ) (x y : ℕ → ℕ),\n    ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n) →\n      ∃ x' y',\n        x' ∈ cylinder x n ∧\n          y' ∈ cylinder y n ∧ ¬MeasurablySeparable (f '' cylinder x' (n + 1)) (g '' cylinder y' (n + 1))\nA : Type := { p // ¬MeasurablySeparable (f '' cylinder p.snd.fst p.fst) (g '' cylinder p.snd.snd p.fst) }\nF : A → A\nhFn : ∀ (p : A), (↑(F p)).fst = (↑p).fst + 1\nhFx : ∀ (p : A), (↑(F p)).snd.fst ∈ cylinder (↑p).snd.fst (↑p).fst\nhFy : ∀ (p : A), (↑(F p)).snd.snd ∈ cylinder (↑p).snd.snd (↑p).fst\np0 : A :=\n  { val := (0, fun x => 0, fun x => 0),\n    property := (_ : ¬MeasurablySeparable (f '' cylinder (fun x => 0) 0) (g '' cylinder (fun x => 0) 0)) }\np : ℕ → A := fun n => F^[n] p0\nprec : ∀ (n : ℕ), p (n + 1) = F (p n)\npn_fst : ∀ (n : ℕ), (↑(p n)).fst = n\nIx : ∀ (m n : ℕ), m + 1 ≤ n → Prod.fst (↑(p n)).snd m = Prod.fst (↑(p (m + 1))).snd m\nIy : ∀ (m n : ℕ), m + 1 ≤ n → Prod.snd (↑(p n)).snd m = Prod.snd (↑(p (m + 1))).snd m\nx : ℕ → ℕ := fun n => Prod.fst (↑(p (n + 1))).snd n\nhx : x = fun n => Prod.fst (↑(p (n + 1))).snd n\n⊢ False\n[PROOFSTEP]\nset y : ℕ → ℕ := fun n => (p (n + 1)).1.2.2 n with hy\n[GOAL]\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : T2Space α\ninst✝¹ : MeasurableSpace α\ninst✝ : OpensMeasurableSpace α\nf g : (ℕ → ℕ) → α\nhf : Continuous f\nhg : Continuous g\nh : Disjoint (range f) (range g)\nhfg : ¬MeasurablySeparable (range f) (range g)\nI :\n  ∀ (n : ℕ) (x y : ℕ → ℕ),\n    ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n) →\n      ∃ x' y',\n        x' ∈ cylinder x n ∧\n          y' ∈ cylinder y n ∧ ¬MeasurablySeparable (f '' cylinder x' (n + 1)) (g '' cylinder y' (n + 1))\nA : Type := { p // ¬MeasurablySeparable (f '' cylinder p.snd.fst p.fst) (g '' cylinder p.snd.snd p.fst) }\nF : A → A\nhFn : ∀ (p : A), (↑(F p)).fst = (↑p).fst + 1\nhFx : ∀ (p : A), (↑(F p)).snd.fst ∈ cylinder (↑p).snd.fst (↑p).fst\nhFy : ∀ (p : A), (↑(F p)).snd.snd ∈ cylinder (↑p).snd.snd (↑p).fst\np0 : A :=\n  { val := (0, fun x => 0, fun x => 0),\n    property := (_ : ¬MeasurablySeparable (f '' cylinder (fun x => 0) 0) (g '' cylinder (fun x => 0) 0)) }\np : ℕ → A := fun n => F^[n] p0\nprec : ∀ (n : ℕ), p (n + 1) = F (p n)\npn_fst : ∀ (n : ℕ), (↑(p n)).fst = n\nIx : ∀ (m n : ℕ), m + 1 ≤ n → Prod.fst (↑(p n)).snd m = Prod.fst (↑(p (m + 1))).snd m\nIy : ∀ (m n : ℕ), m + 1 ≤ n → Prod.snd (↑(p n)).snd m = Prod.snd (↑(p (m + 1))).snd m\nx : ℕ → ℕ := fun n => Prod.fst (↑(p (n + 1))).snd n\nhx : x = fun n => Prod.fst (↑(p (n + 1))).snd n\ny : ℕ → ℕ := fun n => Prod.snd (↑(p (n + 1))).snd n\nhy : y = fun n => Prod.snd (↑(p (n + 1))).snd n\n⊢ False\n[PROOFSTEP]\nhave M : ∀ n, ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n) :=\n  by\n  intro n\n  convert (p n).2 using 3\n  · rw [pn_fst, ← mem_cylinder_iff_eq, mem_cylinder_iff]\n    intro i hi\n    rw [hx]\n    exact (Ix i n hi).symm\n  · rw [pn_fst, ← mem_cylinder_iff_eq, mem_cylinder_iff]\n    intro i hi\n    rw [hy]\n    exact (Iy i n hi).symm\n[GOAL]\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : T2Space α\ninst✝¹ : MeasurableSpace α\ninst✝ : OpensMeasurableSpace α\nf g : (ℕ → ℕ) → α\nhf : Continuous f\nhg : Continuous g\nh : Disjoint (range f) (range g)\nhfg : ¬MeasurablySeparable (range f) (range g)\nI :\n  ∀ (n : ℕ) (x y : ℕ → ℕ),\n    ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n) →\n      ∃ x' y',\n        x' ∈ cylinder x n ∧\n          y' ∈ cylinder y n ∧ ¬MeasurablySeparable (f '' cylinder x' (n + 1)) (g '' cylinder y' (n + 1))\nA : Type := { p // ¬MeasurablySeparable (f '' cylinder p.snd.fst p.fst) (g '' cylinder p.snd.snd p.fst) }\nF : A → A\nhFn : ∀ (p : A), (↑(F p)).fst = (↑p).fst + 1\nhFx : ∀ (p : A), (↑(F p)).snd.fst ∈ cylinder (↑p).snd.fst (↑p).fst\nhFy : ∀ (p : A), (↑(F p)).snd.snd ∈ cylinder (↑p).snd.snd (↑p).fst\np0 : A :=\n  { val := (0, fun x => 0, fun x => 0),\n    property := (_ : ¬MeasurablySeparable (f '' cylinder (fun x => 0) 0) (g '' cylinder (fun x => 0) 0)) }\np : ℕ → A := fun n => F^[n] p0\nprec : ∀ (n : ℕ), p (n + 1) = F (p n)\npn_fst : ∀ (n : ℕ), (↑(p n)).fst = n\nIx : ∀ (m n : ℕ), m + 1 ≤ n → Prod.fst (↑(p n)).snd m = Prod.fst (↑(p (m + 1))).snd m\nIy : ∀ (m n : ℕ), m + 1 ≤ n → Prod.snd (↑(p n)).snd m = Prod.snd (↑(p (m + 1))).snd m\nx : ℕ → ℕ := fun n => Prod.fst (↑(p (n + 1))).snd n\nhx : x = fun n => Prod.fst (↑(p (n + 1))).snd n\ny : ℕ → ℕ := fun n => Prod.snd (↑(p (n + 1))).snd n\nhy : y = fun n => Prod.snd (↑(p (n + 1))).snd n\n⊢ ∀ (n : ℕ), ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n)\n[PROOFSTEP]\nintro n\n[GOAL]\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : T2Space α\ninst✝¹ : MeasurableSpace α\ninst✝ : OpensMeasurableSpace α\nf g : (ℕ → ℕ) → α\nhf : Continuous f\nhg : Continuous g\nh : Disjoint (range f) (range g)\nhfg : ¬MeasurablySeparable (range f) (range g)\nI :\n  ∀ (n : ℕ) (x y : ℕ → ℕ),\n    ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n) →\n      ∃ x' y',\n        x' ∈ cylinder x n ∧\n          y' ∈ cylinder y n ∧ ¬MeasurablySeparable (f '' cylinder x' (n + 1)) (g '' cylinder y' (n + 1))\nA : Type := { p // ¬MeasurablySeparable (f '' cylinder p.snd.fst p.fst) (g '' cylinder p.snd.snd p.fst) }\nF : A → A\nhFn : ∀ (p : A), (↑(F p)).fst = (↑p).fst + 1\nhFx : ∀ (p : A), (↑(F p)).snd.fst ∈ cylinder (↑p).snd.fst (↑p).fst\nhFy : ∀ (p : A), (↑(F p)).snd.snd ∈ cylinder (↑p).snd.snd (↑p).fst\np0 : A :=\n  { val := (0, fun x => 0, fun x => 0),\n    property := (_ : ¬MeasurablySeparable (f '' cylinder (fun x => 0) 0) (g '' cylinder (fun x => 0) 0)) }\np : ℕ → A := fun n => F^[n] p0\nprec : ∀ (n : ℕ), p (n + 1) = F (p n)\npn_fst : ∀ (n : ℕ), (↑(p n)).fst = n\nIx : ∀ (m n : ℕ), m + 1 ≤ n → Prod.fst (↑(p n)).snd m = Prod.fst (↑(p (m + 1))).snd m\nIy : ∀ (m n : ℕ), m + 1 ≤ n → Prod.snd (↑(p n)).snd m = Prod.snd (↑(p (m + 1))).snd m\nx : ℕ → ℕ := fun n => Prod.fst (↑(p (n + 1))).snd n\nhx : x = fun n => Prod.fst (↑(p (n + 1))).snd n\ny : ℕ → ℕ := fun n => Prod.snd (↑(p (n + 1))).snd n\nhy : y = fun n => Prod.snd (↑(p (n + 1))).snd n\nn : ℕ\n⊢ ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n)\n[PROOFSTEP]\nconvert (p n).2 using 3\n[GOAL]\ncase h.e'_1.h.e'_3.h.e'_4\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : T2Space α\ninst✝¹ : MeasurableSpace α\ninst✝ : OpensMeasurableSpace α\nf g : (ℕ → ℕ) → α\nhf : Continuous f\nhg : Continuous g\nh : Disjoint (range f) (range g)\nhfg : ¬MeasurablySeparable (range f) (range g)\nI :\n  ∀ (n : ℕ) (x y : ℕ → ℕ),\n    ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n) →\n      ∃ x' y',\n        x' ∈ cylinder x n ∧\n          y' ∈ cylinder y n ∧ ¬MeasurablySeparable (f '' cylinder x' (n + 1)) (g '' cylinder y' (n + 1))\nA : Type := { p // ¬MeasurablySeparable (f '' cylinder p.snd.fst p.fst) (g '' cylinder p.snd.snd p.fst) }\nF : A → A\nhFn : ∀ (p : A), (↑(F p)).fst = (↑p).fst + 1\nhFx : ∀ (p : A), (↑(F p)).snd.fst ∈ cylinder (↑p).snd.fst (↑p).fst\nhFy : ∀ (p : A), (↑(F p)).snd.snd ∈ cylinder (↑p).snd.snd (↑p).fst\np0 : A :=\n  { val := (0, fun x => 0, fun x => 0),\n    property := (_ : ¬MeasurablySeparable (f '' cylinder (fun x => 0) 0) (g '' cylinder (fun x => 0) 0)) }\np : ℕ → A := fun n => F^[n] p0\nprec : ∀ (n : ℕ), p (n + 1) = F (p n)\npn_fst : ∀ (n : ℕ), (↑(p n)).fst = n\nIx : ∀ (m n : ℕ), m + 1 ≤ n → Prod.fst (↑(p n)).snd m = Prod.fst (↑(p (m + 1))).snd m\nIy : ∀ (m n : ℕ), m + 1 ≤ n → Prod.snd (↑(p n)).snd m = Prod.snd (↑(p (m + 1))).snd m\nx : ℕ → ℕ := fun n => Prod.fst (↑(p (n + 1))).snd n\nhx : x = fun n => Prod.fst (↑(p (n + 1))).snd n\ny : ℕ → ℕ := fun n => Prod.snd (↑(p (n + 1))).snd n\nhy : y = fun n => Prod.snd (↑(p (n + 1))).snd n\nn : ℕ\n⊢ cylinder x n = cylinder (↑(p n)).snd.fst (↑(p n)).fst\n[PROOFSTEP]\nrw [pn_fst, ← mem_cylinder_iff_eq, mem_cylinder_iff]\n[GOAL]\ncase h.e'_1.h.e'_3.h.e'_4\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : T2Space α\ninst✝¹ : MeasurableSpace α\ninst✝ : OpensMeasurableSpace α\nf g : (ℕ → ℕ) → α\nhf : Continuous f\nhg : Continuous g\nh : Disjoint (range f) (range g)\nhfg : ¬MeasurablySeparable (range f) (range g)\nI :\n  ∀ (n : ℕ) (x y : ℕ → ℕ),\n    ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n) →\n      ∃ x' y',\n        x' ∈ cylinder x n ∧\n          y' ∈ cylinder y n ∧ ¬MeasurablySeparable (f '' cylinder x' (n + 1)) (g '' cylinder y' (n + 1))\nA : Type := { p // ¬MeasurablySeparable (f '' cylinder p.snd.fst p.fst) (g '' cylinder p.snd.snd p.fst) }\nF : A → A\nhFn : ∀ (p : A), (↑(F p)).fst = (↑p).fst + 1\nhFx : ∀ (p : A), (↑(F p)).snd.fst ∈ cylinder (↑p).snd.fst (↑p).fst\nhFy : ∀ (p : A), (↑(F p)).snd.snd ∈ cylinder (↑p).snd.snd (↑p).fst\np0 : A :=\n  { val := (0, fun x => 0, fun x => 0),\n    property := (_ : ¬MeasurablySeparable (f '' cylinder (fun x => 0) 0) (g '' cylinder (fun x => 0) 0)) }\np : ℕ → A := fun n => F^[n] p0\nprec : ∀ (n : ℕ), p (n + 1) = F (p n)\npn_fst : ∀ (n : ℕ), (↑(p n)).fst = n\nIx : ∀ (m n : ℕ), m + 1 ≤ n → Prod.fst (↑(p n)).snd m = Prod.fst (↑(p (m + 1))).snd m\nIy : ∀ (m n : ℕ), m + 1 ≤ n → Prod.snd (↑(p n)).snd m = Prod.snd (↑(p (m + 1))).snd m\nx : ℕ → ℕ := fun n => Prod.fst (↑(p (n + 1))).snd n\nhx : x = fun n => Prod.fst (↑(p (n + 1))).snd n\ny : ℕ → ℕ := fun n => Prod.snd (↑(p (n + 1))).snd n\nhy : y = fun n => Prod.snd (↑(p (n + 1))).snd n\nn : ℕ\n⊢ ∀ (i : ℕ), i < n → x i = Prod.fst (↑(p n)).snd i\n[PROOFSTEP]\nintro i hi\n[GOAL]\ncase h.e'_1.h.e'_3.h.e'_4\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : T2Space α\ninst✝¹ : MeasurableSpace α\ninst✝ : OpensMeasurableSpace α\nf g : (ℕ → ℕ) → α\nhf : Continuous f\nhg : Continuous g\nh : Disjoint (range f) (range g)\nhfg : ¬MeasurablySeparable (range f) (range g)\nI :\n  ∀ (n : ℕ) (x y : ℕ → ℕ),\n    ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n) →\n      ∃ x' y',\n        x' ∈ cylinder x n ∧\n          y' ∈ cylinder y n ∧ ¬MeasurablySeparable (f '' cylinder x' (n + 1)) (g '' cylinder y' (n + 1))\nA : Type := { p // ¬MeasurablySeparable (f '' cylinder p.snd.fst p.fst) (g '' cylinder p.snd.snd p.fst) }\nF : A → A\nhFn : ∀ (p : A), (↑(F p)).fst = (↑p).fst + 1\nhFx : ∀ (p : A), (↑(F p)).snd.fst ∈ cylinder (↑p).snd.fst (↑p).fst\nhFy : ∀ (p : A), (↑(F p)).snd.snd ∈ cylinder (↑p).snd.snd (↑p).fst\np0 : A :=\n  { val := (0, fun x => 0, fun x => 0),\n    property := (_ : ¬MeasurablySeparable (f '' cylinder (fun x => 0) 0) (g '' cylinder (fun x => 0) 0)) }\np : ℕ → A := fun n => F^[n] p0\nprec : ∀ (n : ℕ), p (n + 1) = F (p n)\npn_fst : ∀ (n : ℕ), (↑(p n)).fst = n\nIx : ∀ (m n : ℕ), m + 1 ≤ n → Prod.fst (↑(p n)).snd m = Prod.fst (↑(p (m + 1))).snd m\nIy : ∀ (m n : ℕ), m + 1 ≤ n → Prod.snd (↑(p n)).snd m = Prod.snd (↑(p (m + 1))).snd m\nx : ℕ → ℕ := fun n => Prod.fst (↑(p (n + 1))).snd n\nhx : x = fun n => Prod.fst (↑(p (n + 1))).snd n\ny : ℕ → ℕ := fun n => Prod.snd (↑(p (n + 1))).snd n\nhy : y = fun n => Prod.snd (↑(p (n + 1))).snd n\nn i : ℕ\nhi : i < n\n⊢ x i = Prod.fst (↑(p n)).snd i\n[PROOFSTEP]\nrw [hx]\n[GOAL]\ncase h.e'_1.h.e'_3.h.e'_4\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : T2Space α\ninst✝¹ : MeasurableSpace α\ninst✝ : OpensMeasurableSpace α\nf g : (ℕ → ℕ) → α\nhf : Continuous f\nhg : Continuous g\nh : Disjoint (range f) (range g)\nhfg : ¬MeasurablySeparable (range f) (range g)\nI :\n  ∀ (n : ℕ) (x y : ℕ → ℕ),\n    ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n) →\n      ∃ x' y',\n        x' ∈ cylinder x n ∧\n          y' ∈ cylinder y n ∧ ¬MeasurablySeparable (f '' cylinder x' (n + 1)) (g '' cylinder y' (n + 1))\nA : Type := { p // ¬MeasurablySeparable (f '' cylinder p.snd.fst p.fst) (g '' cylinder p.snd.snd p.fst) }\nF : A → A\nhFn : ∀ (p : A), (↑(F p)).fst = (↑p).fst + 1\nhFx : ∀ (p : A), (↑(F p)).snd.fst ∈ cylinder (↑p).snd.fst (↑p).fst\nhFy : ∀ (p : A), (↑(F p)).snd.snd ∈ cylinder (↑p).snd.snd (↑p).fst\np0 : A :=\n  { val := (0, fun x => 0, fun x => 0),\n    property := (_ : ¬MeasurablySeparable (f '' cylinder (fun x => 0) 0) (g '' cylinder (fun x => 0) 0)) }\np : ℕ → A := fun n => F^[n] p0\nprec : ∀ (n : ℕ), p (n + 1) = F (p n)\npn_fst : ∀ (n : ℕ), (↑(p n)).fst = n\nIx : ∀ (m n : ℕ), m + 1 ≤ n → Prod.fst (↑(p n)).snd m = Prod.fst (↑(p (m + 1))).snd m\nIy : ∀ (m n : ℕ), m + 1 ≤ n → Prod.snd (↑(p n)).snd m = Prod.snd (↑(p (m + 1))).snd m\nx : ℕ → ℕ := fun n => Prod.fst (↑(p (n + 1))).snd n\nhx : x = fun n => Prod.fst (↑(p (n + 1))).snd n\ny : ℕ → ℕ := fun n => Prod.snd (↑(p (n + 1))).snd n\nhy : y = fun n => Prod.snd (↑(p (n + 1))).snd n\nn i : ℕ\nhi : i < n\n⊢ (fun n => Prod.fst (↑(p (n + 1))).snd n) i = Prod.fst (↑(p n)).snd i\n[PROOFSTEP]\nexact (Ix i n hi).symm\n[GOAL]\ncase h.e'_1.h.e'_4.h.e'_4\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : T2Space α\ninst✝¹ : MeasurableSpace α\ninst✝ : OpensMeasurableSpace α\nf g : (ℕ → ℕ) → α\nhf : Continuous f\nhg : Continuous g\nh : Disjoint (range f) (range g)\nhfg : ¬MeasurablySeparable (range f) (range g)\nI :\n  ∀ (n : ℕ) (x y : ℕ → ℕ),\n    ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n) →\n      ∃ x' y',\n        x' ∈ cylinder x n ∧\n          y' ∈ cylinder y n ∧ ¬MeasurablySeparable (f '' cylinder x' (n + 1)) (g '' cylinder y' (n + 1))\nA : Type := { p // ¬MeasurablySeparable (f '' cylinder p.snd.fst p.fst) (g '' cylinder p.snd.snd p.fst) }\nF : A → A\nhFn : ∀ (p : A), (↑(F p)).fst = (↑p).fst + 1\nhFx : ∀ (p : A), (↑(F p)).snd.fst ∈ cylinder (↑p).snd.fst (↑p).fst\nhFy : ∀ (p : A), (↑(F p)).snd.snd ∈ cylinder (↑p).snd.snd (↑p).fst\np0 : A :=\n  { val := (0, fun x => 0, fun x => 0),\n    property := (_ : ¬MeasurablySeparable (f '' cylinder (fun x => 0) 0) (g '' cylinder (fun x => 0) 0)) }\np : ℕ → A := fun n => F^[n] p0\nprec : ∀ (n : ℕ), p (n + 1) = F (p n)\npn_fst : ∀ (n : ℕ), (↑(p n)).fst = n\nIx : ∀ (m n : ℕ), m + 1 ≤ n → Prod.fst (↑(p n)).snd m = Prod.fst (↑(p (m + 1))).snd m\nIy : ∀ (m n : ℕ), m + 1 ≤ n → Prod.snd (↑(p n)).snd m = Prod.snd (↑(p (m + 1))).snd m\nx : ℕ → ℕ := fun n => Prod.fst (↑(p (n + 1))).snd n\nhx : x = fun n => Prod.fst (↑(p (n + 1))).snd n\ny : ℕ → ℕ := fun n => Prod.snd (↑(p (n + 1))).snd n\nhy : y = fun n => Prod.snd (↑(p (n + 1))).snd n\nn : ℕ\n⊢ cylinder y n = cylinder (↑(p n)).snd.snd (↑(p n)).fst\n[PROOFSTEP]\nrw [pn_fst, ← mem_cylinder_iff_eq, mem_cylinder_iff]\n[GOAL]\ncase h.e'_1.h.e'_4.h.e'_4\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : T2Space α\ninst✝¹ : MeasurableSpace α\ninst✝ : OpensMeasurableSpace α\nf g : (ℕ → ℕ) → α\nhf : Continuous f\nhg : Continuous g\nh : Disjoint (range f) (range g)\nhfg : ¬MeasurablySeparable (range f) (range g)\nI :\n  ∀ (n : ℕ) (x y : ℕ → ℕ),\n    ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n) →\n      ∃ x' y',\n        x' ∈ cylinder x n ∧\n          y' ∈ cylinder y n ∧ ¬MeasurablySeparable (f '' cylinder x' (n + 1)) (g '' cylinder y' (n + 1))\nA : Type := { p // ¬MeasurablySeparable (f '' cylinder p.snd.fst p.fst) (g '' cylinder p.snd.snd p.fst) }\nF : A → A\nhFn : ∀ (p : A), (↑(F p)).fst = (↑p).fst + 1\nhFx : ∀ (p : A), (↑(F p)).snd.fst ∈ cylinder (↑p).snd.fst (↑p).fst\nhFy : ∀ (p : A), (↑(F p)).snd.snd ∈ cylinder (↑p).snd.snd (↑p).fst\np0 : A :=\n  { val := (0, fun x => 0, fun x => 0),\n    property := (_ : ¬MeasurablySeparable (f '' cylinder (fun x => 0) 0) (g '' cylinder (fun x => 0) 0)) }\np : ℕ → A := fun n => F^[n] p0\nprec : ∀ (n : ℕ), p (n + 1) = F (p n)\npn_fst : ∀ (n : ℕ), (↑(p n)).fst = n\nIx : ∀ (m n : ℕ), m + 1 ≤ n → Prod.fst (↑(p n)).snd m = Prod.fst (↑(p (m + 1))).snd m\nIy : ∀ (m n : ℕ), m + 1 ≤ n → Prod.snd (↑(p n)).snd m = Prod.snd (↑(p (m + 1))).snd m\nx : ℕ → ℕ := fun n => Prod.fst (↑(p (n + 1))).snd n\nhx : x = fun n => Prod.fst (↑(p (n + 1))).snd n\ny : ℕ → ℕ := fun n => Prod.snd (↑(p (n + 1))).snd n\nhy : y = fun n => Prod.snd (↑(p (n + 1))).snd n\nn : ℕ\n⊢ ∀ (i : ℕ), i < n → y i = Prod.snd (↑(p n)).snd i\n[PROOFSTEP]\nintro i hi\n[GOAL]\ncase h.e'_1.h.e'_4.h.e'_4\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : T2Space α\ninst✝¹ : MeasurableSpace α\ninst✝ : OpensMeasurableSpace α\nf g : (ℕ → ℕ) → α\nhf : Continuous f\nhg : Continuous g\nh : Disjoint (range f) (range g)\nhfg : ¬MeasurablySeparable (range f) (range g)\nI :\n  ∀ (n : ℕ) (x y : ℕ → ℕ),\n    ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n) →\n      ∃ x' y',\n        x' ∈ cylinder x n ∧\n          y' ∈ cylinder y n ∧ ¬MeasurablySeparable (f '' cylinder x' (n + 1)) (g '' cylinder y' (n + 1))\nA : Type := { p // ¬MeasurablySeparable (f '' cylinder p.snd.fst p.fst) (g '' cylinder p.snd.snd p.fst) }\nF : A → A\nhFn : ∀ (p : A), (↑(F p)).fst = (↑p).fst + 1\nhFx : ∀ (p : A), (↑(F p)).snd.fst ∈ cylinder (↑p).snd.fst (↑p).fst\nhFy : ∀ (p : A), (↑(F p)).snd.snd ∈ cylinder (↑p).snd.snd (↑p).fst\np0 : A :=\n  { val := (0, fun x => 0, fun x => 0),\n    property := (_ : ¬MeasurablySeparable (f '' cylinder (fun x => 0) 0) (g '' cylinder (fun x => 0) 0)) }\np : ℕ → A := fun n => F^[n] p0\nprec : ∀ (n : ℕ), p (n + 1) = F (p n)\npn_fst : ∀ (n : ℕ), (↑(p n)).fst = n\nIx : ∀ (m n : ℕ), m + 1 ≤ n → Prod.fst (↑(p n)).snd m = Prod.fst (↑(p (m + 1))).snd m\nIy : ∀ (m n : ℕ), m + 1 ≤ n → Prod.snd (↑(p n)).snd m = Prod.snd (↑(p (m + 1))).snd m\nx : ℕ → ℕ := fun n => Prod.fst (↑(p (n + 1))).snd n\nhx : x = fun n => Prod.fst (↑(p (n + 1))).snd n\ny : ℕ → ℕ := fun n => Prod.snd (↑(p (n + 1))).snd n\nhy : y = fun n => Prod.snd (↑(p (n + 1))).snd n\nn i : ℕ\nhi : i < n\n⊢ y i = Prod.snd (↑(p n)).snd i\n[PROOFSTEP]\nrw [hy]\n[GOAL]\ncase h.e'_1.h.e'_4.h.e'_4\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : T2Space α\ninst✝¹ : MeasurableSpace α\ninst✝ : OpensMeasurableSpace α\nf g : (ℕ → ℕ) → α\nhf : Continuous f\nhg : Continuous g\nh : Disjoint (range f) (range g)\nhfg : ¬MeasurablySeparable (range f) (range g)\nI :\n  ∀ (n : ℕ) (x y : ℕ → ℕ),\n    ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n) →\n      ∃ x' y',\n        x' ∈ cylinder x n ∧\n          y' ∈ cylinder y n ∧ ¬MeasurablySeparable (f '' cylinder x' (n + 1)) (g '' cylinder y' (n + 1))\nA : Type := { p // ¬MeasurablySeparable (f '' cylinder p.snd.fst p.fst) (g '' cylinder p.snd.snd p.fst) }\nF : A → A\nhFn : ∀ (p : A), (↑(F p)).fst = (↑p).fst + 1\nhFx : ∀ (p : A), (↑(F p)).snd.fst ∈ cylinder (↑p).snd.fst (↑p).fst\nhFy : ∀ (p : A), (↑(F p)).snd.snd ∈ cylinder (↑p).snd.snd (↑p).fst\np0 : A :=\n  { val := (0, fun x => 0, fun x => 0),\n    property := (_ : ¬MeasurablySeparable (f '' cylinder (fun x => 0) 0) (g '' cylinder (fun x => 0) 0)) }\np : ℕ → A := fun n => F^[n] p0\nprec : ∀ (n : ℕ), p (n + 1) = F (p n)\npn_fst : ∀ (n : ℕ), (↑(p n)).fst = n\nIx : ∀ (m n : ℕ), m + 1 ≤ n → Prod.fst (↑(p n)).snd m = Prod.fst (↑(p (m + 1))).snd m\nIy : ∀ (m n : ℕ), m + 1 ≤ n → Prod.snd (↑(p n)).snd m = Prod.snd (↑(p (m + 1))).snd m\nx : ℕ → ℕ := fun n => Prod.fst (↑(p (n + 1))).snd n\nhx : x = fun n => Prod.fst (↑(p (n + 1))).snd n\ny : ℕ → ℕ := fun n => Prod.snd (↑(p (n + 1))).snd n\nhy : y = fun n => Prod.snd (↑(p (n + 1))).snd n\nn i : ℕ\nhi : i < n\n⊢ (fun n => Prod.snd (↑(p (n + 1))).snd n) i = Prod.snd (↑(p n)).snd i\n[PROOFSTEP]\nexact (Iy i n hi).symm\n[GOAL]\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : T2Space α\ninst✝¹ : MeasurableSpace α\ninst✝ : OpensMeasurableSpace α\nf g : (ℕ → ℕ) → α\nhf : Continuous f\nhg : Continuous g\nh : Disjoint (range f) (range g)\nhfg : ¬MeasurablySeparable (range f) (range g)\nI :\n  ∀ (n : ℕ) (x y : ℕ → ℕ),\n    ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n) →\n      ∃ x' y',\n        x' ∈ cylinder x n ∧\n          y' ∈ cylinder y n ∧ ¬MeasurablySeparable (f '' cylinder x' (n + 1)) (g '' cylinder y' (n + 1))\nA : Type := { p // ¬MeasurablySeparable (f '' cylinder p.snd.fst p.fst) (g '' cylinder p.snd.snd p.fst) }\nF : A → A\nhFn : ∀ (p : A), (↑(F p)).fst = (↑p).fst + 1\nhFx : ∀ (p : A), (↑(F p)).snd.fst ∈ cylinder (↑p).snd.fst (↑p).fst\nhFy : ∀ (p : A), (↑(F p)).snd.snd ∈ cylinder (↑p).snd.snd (↑p).fst\np0 : A :=\n  { val := (0, fun x => 0, fun x => 0),\n    property := (_ : ¬MeasurablySeparable (f '' cylinder (fun x => 0) 0) (g '' cylinder (fun x => 0) 0)) }\np : ℕ → A := fun n => F^[n] p0\nprec : ∀ (n : ℕ), p (n + 1) = F (p n)\npn_fst : ∀ (n : ℕ), (↑(p n)).fst = n\nIx : ∀ (m n : ℕ), m + 1 ≤ n → Prod.fst (↑(p n)).snd m = Prod.fst (↑(p (m + 1))).snd m\nIy : ∀ (m n : ℕ), m + 1 ≤ n → Prod.snd (↑(p n)).snd m = Prod.snd (↑(p (m + 1))).snd m\nx : ℕ → ℕ := fun n => Prod.fst (↑(p (n + 1))).snd n\nhx : x = fun n => Prod.fst (↑(p (n + 1))).snd n\ny : ℕ → ℕ := fun n => Prod.snd (↑(p (n + 1))).snd n\nhy : y = fun n => Prod.snd (↑(p (n + 1))).snd n\nM : ∀ (n : ℕ), ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n)\n⊢ False\n[PROOFSTEP]\nobtain ⟨u, v, u_open, v_open, xu, yv, huv⟩ : ∃ u v : Set α, IsOpen u ∧ IsOpen v ∧ f x ∈ u ∧ g y ∈ v ∧ Disjoint u v :=\n  by\n  apply t2_separation\n  exact disjoint_iff_forall_ne.1 h (mem_range_self _) (mem_range_self _)\n[GOAL]\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : T2Space α\ninst✝¹ : MeasurableSpace α\ninst✝ : OpensMeasurableSpace α\nf g : (ℕ → ℕ) → α\nhf : Continuous f\nhg : Continuous g\nh : Disjoint (range f) (range g)\nhfg : ¬MeasurablySeparable (range f) (range g)\nI :\n  ∀ (n : ℕ) (x y : ℕ → ℕ),\n    ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n) →\n      ∃ x' y',\n        x' ∈ cylinder x n ∧\n          y' ∈ cylinder y n ∧ ¬MeasurablySeparable (f '' cylinder x' (n + 1)) (g '' cylinder y' (n + 1))\nA : Type := { p // ¬MeasurablySeparable (f '' cylinder p.snd.fst p.fst) (g '' cylinder p.snd.snd p.fst) }\nF : A → A\nhFn : ∀ (p : A), (↑(F p)).fst = (↑p).fst + 1\nhFx : ∀ (p : A), (↑(F p)).snd.fst ∈ cylinder (↑p).snd.fst (↑p).fst\nhFy : ∀ (p : A), (↑(F p)).snd.snd ∈ cylinder (↑p).snd.snd (↑p).fst\np0 : A :=\n  { val := (0, fun x => 0, fun x => 0),\n    property := (_ : ¬MeasurablySeparable (f '' cylinder (fun x => 0) 0) (g '' cylinder (fun x => 0) 0)) }\np : ℕ → A := fun n => F^[n] p0\nprec : ∀ (n : ℕ), p (n + 1) = F (p n)\npn_fst : ∀ (n : ℕ), (↑(p n)).fst = n\nIx : ∀ (m n : ℕ), m + 1 ≤ n → Prod.fst (↑(p n)).snd m = Prod.fst (↑(p (m + 1))).snd m\nIy : ∀ (m n : ℕ), m + 1 ≤ n → Prod.snd (↑(p n)).snd m = Prod.snd (↑(p (m + 1))).snd m\nx : ℕ → ℕ := fun n => Prod.fst (↑(p (n + 1))).snd n\nhx : x = fun n => Prod.fst (↑(p (n + 1))).snd n\ny : ℕ → ℕ := fun n => Prod.snd (↑(p (n + 1))).snd n\nhy : y = fun n => Prod.snd (↑(p (n + 1))).snd n\nM : ∀ (n : ℕ), ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n)\n⊢ ∃ u v, IsOpen u ∧ IsOpen v ∧ f x ∈ u ∧ g y ∈ v ∧ Disjoint u v\n[PROOFSTEP]\napply t2_separation\n[GOAL]\ncase h\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : T2Space α\ninst✝¹ : MeasurableSpace α\ninst✝ : OpensMeasurableSpace α\nf g : (ℕ → ℕ) → α\nhf : Continuous f\nhg : Continuous g\nh : Disjoint (range f) (range g)\nhfg : ¬MeasurablySeparable (range f) (range g)\nI :\n  ∀ (n : ℕ) (x y : ℕ → ℕ),\n    ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n) →\n      ∃ x' y',\n        x' ∈ cylinder x n ∧\n          y' ∈ cylinder y n ∧ ¬MeasurablySeparable (f '' cylinder x' (n + 1)) (g '' cylinder y' (n + 1))\nA : Type := { p // ¬MeasurablySeparable (f '' cylinder p.snd.fst p.fst) (g '' cylinder p.snd.snd p.fst) }\nF : A → A\nhFn : ∀ (p : A), (↑(F p)).fst = (↑p).fst + 1\nhFx : ∀ (p : A), (↑(F p)).snd.fst ∈ cylinder (↑p).snd.fst (↑p).fst\nhFy : ∀ (p : A), (↑(F p)).snd.snd ∈ cylinder (↑p).snd.snd (↑p).fst\np0 : A :=\n  { val := (0, fun x => 0, fun x => 0),\n    property := (_ : ¬MeasurablySeparable (f '' cylinder (fun x => 0) 0) (g '' cylinder (fun x => 0) 0)) }\np : ℕ → A := fun n => F^[n] p0\nprec : ∀ (n : ℕ), p (n + 1) = F (p n)\npn_fst : ∀ (n : ℕ), (↑(p n)).fst = n\nIx : ∀ (m n : ℕ), m + 1 ≤ n → Prod.fst (↑(p n)).snd m = Prod.fst (↑(p (m + 1))).snd m\nIy : ∀ (m n : ℕ), m + 1 ≤ n → Prod.snd (↑(p n)).snd m = Prod.snd (↑(p (m + 1))).snd m\nx : ℕ → ℕ := fun n => Prod.fst (↑(p (n + 1))).snd n\nhx : x = fun n => Prod.fst (↑(p (n + 1))).snd n\ny : ℕ → ℕ := fun n => Prod.snd (↑(p (n + 1))).snd n\nhy : y = fun n => Prod.snd (↑(p (n + 1))).snd n\nM : ∀ (n : ℕ), ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n)\n⊢ f x ≠ g y\n[PROOFSTEP]\nexact disjoint_iff_forall_ne.1 h (mem_range_self _) (mem_range_self _)\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : T2Space α\ninst✝¹ : MeasurableSpace α\ninst✝ : OpensMeasurableSpace α\nf g : (ℕ → ℕ) → α\nhf : Continuous f\nhg : Continuous g\nh : Disjoint (range f) (range g)\nhfg : ¬MeasurablySeparable (range f) (range g)\nI :\n  ∀ (n : ℕ) (x y : ℕ → ℕ),\n    ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n) →\n      ∃ x' y',\n        x' ∈ cylinder x n ∧\n          y' ∈ cylinder y n ∧ ¬MeasurablySeparable (f '' cylinder x' (n + 1)) (g '' cylinder y' (n + 1))\nA : Type := { p // ¬MeasurablySeparable (f '' cylinder p.snd.fst p.fst) (g '' cylinder p.snd.snd p.fst) }\nF : A → A\nhFn : ∀ (p : A), (↑(F p)).fst = (↑p).fst + 1\nhFx : ∀ (p : A), (↑(F p)).snd.fst ∈ cylinder (↑p).snd.fst (↑p).fst\nhFy : ∀ (p : A), (↑(F p)).snd.snd ∈ cylinder (↑p).snd.snd (↑p).fst\np0 : A :=\n  { val := (0, fun x => 0, fun x => 0),\n    property := (_ : ¬MeasurablySeparable (f '' cylinder (fun x => 0) 0) (g '' cylinder (fun x => 0) 0)) }\np : ℕ → A := fun n => F^[n] p0\nprec : ∀ (n : ℕ), p (n + 1) = F (p n)\npn_fst : ∀ (n : ℕ), (↑(p n)).fst = n\nIx : ∀ (m n : ℕ), m + 1 ≤ n → Prod.fst (↑(p n)).snd m = Prod.fst (↑(p (m + 1))).snd m\nIy : ∀ (m n : ℕ), m + 1 ≤ n → Prod.snd (↑(p n)).snd m = Prod.snd (↑(p (m + 1))).snd m\nx : ℕ → ℕ := fun n => Prod.fst (↑(p (n + 1))).snd n\nhx : x = fun n => Prod.fst (↑(p (n + 1))).snd n\ny : ℕ → ℕ := fun n => Prod.snd (↑(p (n + 1))).snd n\nhy : y = fun n => Prod.snd (↑(p (n + 1))).snd n\nM : ∀ (n : ℕ), ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n)\nu v : Set α\nu_open : IsOpen u\nv_open : IsOpen v\nxu : f x ∈ u\nyv : g y ∈ v\nhuv : Disjoint u v\n⊢ False\n[PROOFSTEP]\nletI : MetricSpace (ℕ → ℕ) := metricSpaceNatNat\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : T2Space α\ninst✝¹ : MeasurableSpace α\ninst✝ : OpensMeasurableSpace α\nf g : (ℕ → ℕ) → α\nhf : Continuous f\nhg : Continuous g\nh : Disjoint (range f) (range g)\nhfg : ¬MeasurablySeparable (range f) (range g)\nI :\n  ∀ (n : ℕ) (x y : ℕ → ℕ),\n    ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n) →\n      ∃ x' y',\n        x' ∈ cylinder x n ∧\n          y' ∈ cylinder y n ∧ ¬MeasurablySeparable (f '' cylinder x' (n + 1)) (g '' cylinder y' (n + 1))\nA : Type := { p // ¬MeasurablySeparable (f '' cylinder p.snd.fst p.fst) (g '' cylinder p.snd.snd p.fst) }\nF : A → A\nhFn : ∀ (p : A), (↑(F p)).fst = (↑p).fst + 1\nhFx : ∀ (p : A), (↑(F p)).snd.fst ∈ cylinder (↑p).snd.fst (↑p).fst\nhFy : ∀ (p : A), (↑(F p)).snd.snd ∈ cylinder (↑p).snd.snd (↑p).fst\np0 : A :=\n  { val := (0, fun x => 0, fun x => 0),\n    property := (_ : ¬MeasurablySeparable (f '' cylinder (fun x => 0) 0) (g '' cylinder (fun x => 0) 0)) }\np : ℕ → A := fun n => F^[n] p0\nprec : ∀ (n : ℕ), p (n + 1) = F (p n)\npn_fst : ∀ (n : ℕ), (↑(p n)).fst = n\nIx : ∀ (m n : ℕ), m + 1 ≤ n → Prod.fst (↑(p n)).snd m = Prod.fst (↑(p (m + 1))).snd m\nIy : ∀ (m n : ℕ), m + 1 ≤ n → Prod.snd (↑(p n)).snd m = Prod.snd (↑(p (m + 1))).snd m\nx : ℕ → ℕ := fun n => Prod.fst (↑(p (n + 1))).snd n\nhx : x = fun n => Prod.fst (↑(p (n + 1))).snd n\ny : ℕ → ℕ := fun n => Prod.snd (↑(p (n + 1))).snd n\nhy : y = fun n => Prod.snd (↑(p (n + 1))).snd n\nM : ∀ (n : ℕ), ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n)\nu v : Set α\nu_open : IsOpen u\nv_open : IsOpen v\nxu : f x ∈ u\nyv : g y ∈ v\nhuv : Disjoint u v\nthis : MetricSpace (ℕ → ℕ) := metricSpaceNatNat\n⊢ False\n[PROOFSTEP]\nobtain ⟨εx, εxpos, hεx⟩ : ∃ (εx : ℝ), εx > 0 ∧ Metric.ball x εx ⊆ f ⁻¹' u :=\n  by\n  apply Metric.mem_nhds_iff.1\n  exact hf.continuousAt.preimage_mem_nhds (u_open.mem_nhds xu)\n[GOAL]\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : T2Space α\ninst✝¹ : MeasurableSpace α\ninst✝ : OpensMeasurableSpace α\nf g : (ℕ → ℕ) → α\nhf : Continuous f\nhg : Continuous g\nh : Disjoint (range f) (range g)\nhfg : ¬MeasurablySeparable (range f) (range g)\nI :\n  ∀ (n : ℕ) (x y : ℕ → ℕ),\n    ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n) →\n      ∃ x' y',\n        x' ∈ cylinder x n ∧\n          y' ∈ cylinder y n ∧ ¬MeasurablySeparable (f '' cylinder x' (n + 1)) (g '' cylinder y' (n + 1))\nA : Type := { p // ¬MeasurablySeparable (f '' cylinder p.snd.fst p.fst) (g '' cylinder p.snd.snd p.fst) }\nF : A → A\nhFn : ∀ (p : A), (↑(F p)).fst = (↑p).fst + 1\nhFx : ∀ (p : A), (↑(F p)).snd.fst ∈ cylinder (↑p).snd.fst (↑p).fst\nhFy : ∀ (p : A), (↑(F p)).snd.snd ∈ cylinder (↑p).snd.snd (↑p).fst\np0 : A :=\n  { val := (0, fun x => 0, fun x => 0),\n    property := (_ : ¬MeasurablySeparable (f '' cylinder (fun x => 0) 0) (g '' cylinder (fun x => 0) 0)) }\np : ℕ → A := fun n => F^[n] p0\nprec : ∀ (n : ℕ), p (n + 1) = F (p n)\npn_fst : ∀ (n : ℕ), (↑(p n)).fst = n\nIx : ∀ (m n : ℕ), m + 1 ≤ n → Prod.fst (↑(p n)).snd m = Prod.fst (↑(p (m + 1))).snd m\nIy : ∀ (m n : ℕ), m + 1 ≤ n → Prod.snd (↑(p n)).snd m = Prod.snd (↑(p (m + 1))).snd m\nx : ℕ → ℕ := fun n => Prod.fst (↑(p (n + 1))).snd n\nhx : x = fun n => Prod.fst (↑(p (n + 1))).snd n\ny : ℕ → ℕ := fun n => Prod.snd (↑(p (n + 1))).snd n\nhy : y = fun n => Prod.snd (↑(p (n + 1))).snd n\nM : ∀ (n : ℕ), ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n)\nu v : Set α\nu_open : IsOpen u\nv_open : IsOpen v\nxu : f x ∈ u\nyv : g y ∈ v\nhuv : Disjoint u v\nthis : MetricSpace (ℕ → ℕ) := metricSpaceNatNat\n⊢ ∃ εx, εx > 0 ∧ ball x εx ⊆ f ⁻¹' u\n[PROOFSTEP]\napply Metric.mem_nhds_iff.1\n[GOAL]\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : T2Space α\ninst✝¹ : MeasurableSpace α\ninst✝ : OpensMeasurableSpace α\nf g : (ℕ → ℕ) → α\nhf : Continuous f\nhg : Continuous g\nh : Disjoint (range f) (range g)\nhfg : ¬MeasurablySeparable (range f) (range g)\nI :\n  ∀ (n : ℕ) (x y : ℕ → ℕ),\n    ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n) →\n      ∃ x' y',\n        x' ∈ cylinder x n ∧\n          y' ∈ cylinder y n ∧ ¬MeasurablySeparable (f '' cylinder x' (n + 1)) (g '' cylinder y' (n + 1))\nA : Type := { p // ¬MeasurablySeparable (f '' cylinder p.snd.fst p.fst) (g '' cylinder p.snd.snd p.fst) }\nF : A → A\nhFn : ∀ (p : A), (↑(F p)).fst = (↑p).fst + 1\nhFx : ∀ (p : A), (↑(F p)).snd.fst ∈ cylinder (↑p).snd.fst (↑p).fst\nhFy : ∀ (p : A), (↑(F p)).snd.snd ∈ cylinder (↑p).snd.snd (↑p).fst\np0 : A :=\n  { val := (0, fun x => 0, fun x => 0),\n    property := (_ : ¬MeasurablySeparable (f '' cylinder (fun x => 0) 0) (g '' cylinder (fun x => 0) 0)) }\np : ℕ → A := fun n => F^[n] p0\nprec : ∀ (n : ℕ), p (n + 1) = F (p n)\npn_fst : ∀ (n : ℕ), (↑(p n)).fst = n\nIx : ∀ (m n : ℕ), m + 1 ≤ n → Prod.fst (↑(p n)).snd m = Prod.fst (↑(p (m + 1))).snd m\nIy : ∀ (m n : ℕ), m + 1 ≤ n → Prod.snd (↑(p n)).snd m = Prod.snd (↑(p (m + 1))).snd m\nx : ℕ → ℕ := fun n => Prod.fst (↑(p (n + 1))).snd n\nhx : x = fun n => Prod.fst (↑(p (n + 1))).snd n\ny : ℕ → ℕ := fun n => Prod.snd (↑(p (n + 1))).snd n\nhy : y = fun n => Prod.snd (↑(p (n + 1))).snd n\nM : ∀ (n : ℕ), ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n)\nu v : Set α\nu_open : IsOpen u\nv_open : IsOpen v\nxu : f x ∈ u\nyv : g y ∈ v\nhuv : Disjoint u v\nthis : MetricSpace (ℕ → ℕ) := metricSpaceNatNat\n⊢ f ⁻¹' u ∈ 𝓝 x\n[PROOFSTEP]\nexact hf.continuousAt.preimage_mem_nhds (u_open.mem_nhds xu)\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : T2Space α\ninst✝¹ : MeasurableSpace α\ninst✝ : OpensMeasurableSpace α\nf g : (ℕ → ℕ) → α\nhf : Continuous f\nhg : Continuous g\nh : Disjoint (range f) (range g)\nhfg : ¬MeasurablySeparable (range f) (range g)\nI :\n  ∀ (n : ℕ) (x y : ℕ → ℕ),\n    ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n) →\n      ∃ x' y',\n        x' ∈ cylinder x n ∧\n          y' ∈ cylinder y n ∧ ¬MeasurablySeparable (f '' cylinder x' (n + 1)) (g '' cylinder y' (n + 1))\nA : Type := { p // ¬MeasurablySeparable (f '' cylinder p.snd.fst p.fst) (g '' cylinder p.snd.snd p.fst) }\nF : A → A\nhFn : ∀ (p : A), (↑(F p)).fst = (↑p).fst + 1\nhFx : ∀ (p : A), (↑(F p)).snd.fst ∈ cylinder (↑p).snd.fst (↑p).fst\nhFy : ∀ (p : A), (↑(F p)).snd.snd ∈ cylinder (↑p).snd.snd (↑p).fst\np0 : A :=\n  { val := (0, fun x => 0, fun x => 0),\n    property := (_ : ¬MeasurablySeparable (f '' cylinder (fun x => 0) 0) (g '' cylinder (fun x => 0) 0)) }\np : ℕ → A := fun n => F^[n] p0\nprec : ∀ (n : ℕ), p (n + 1) = F (p n)\npn_fst : ∀ (n : ℕ), (↑(p n)).fst = n\nIx : ∀ (m n : ℕ), m + 1 ≤ n → Prod.fst (↑(p n)).snd m = Prod.fst (↑(p (m + 1))).snd m\nIy : ∀ (m n : ℕ), m + 1 ≤ n → Prod.snd (↑(p n)).snd m = Prod.snd (↑(p (m + 1))).snd m\nx : ℕ → ℕ := fun n => Prod.fst (↑(p (n + 1))).snd n\nhx : x = fun n => Prod.fst (↑(p (n + 1))).snd n\ny : ℕ → ℕ := fun n => Prod.snd (↑(p (n + 1))).snd n\nhy : y = fun n => Prod.snd (↑(p (n + 1))).snd n\nM : ∀ (n : ℕ), ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n)\nu v : Set α\nu_open : IsOpen u\nv_open : IsOpen v\nxu : f x ∈ u\nyv : g y ∈ v\nhuv : Disjoint u v\nthis : MetricSpace (ℕ → ℕ) := metricSpaceNatNat\nεx : ℝ\nεxpos : εx > 0\nhεx : ball x εx ⊆ f ⁻¹' u\n⊢ False\n[PROOFSTEP]\nobtain ⟨εy, εypos, hεy⟩ : ∃ (εy : ℝ), εy > 0 ∧ Metric.ball y εy ⊆ g ⁻¹' v :=\n  by\n  apply Metric.mem_nhds_iff.1\n  exact hg.continuousAt.preimage_mem_nhds (v_open.mem_nhds yv)\n[GOAL]\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : T2Space α\ninst✝¹ : MeasurableSpace α\ninst✝ : OpensMeasurableSpace α\nf g : (ℕ → ℕ) → α\nhf : Continuous f\nhg : Continuous g\nh : Disjoint (range f) (range g)\nhfg : ¬MeasurablySeparable (range f) (range g)\nI :\n  ∀ (n : ℕ) (x y : ℕ → ℕ),\n    ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n) →\n      ∃ x' y',\n        x' ∈ cylinder x n ∧\n          y' ∈ cylinder y n ∧ ¬MeasurablySeparable (f '' cylinder x' (n + 1)) (g '' cylinder y' (n + 1))\nA : Type := { p // ¬MeasurablySeparable (f '' cylinder p.snd.fst p.fst) (g '' cylinder p.snd.snd p.fst) }\nF : A → A\nhFn : ∀ (p : A), (↑(F p)).fst = (↑p).fst + 1\nhFx : ∀ (p : A), (↑(F p)).snd.fst ∈ cylinder (↑p).snd.fst (↑p).fst\nhFy : ∀ (p : A), (↑(F p)).snd.snd ∈ cylinder (↑p).snd.snd (↑p).fst\np0 : A :=\n  { val := (0, fun x => 0, fun x => 0),\n    property := (_ : ¬MeasurablySeparable (f '' cylinder (fun x => 0) 0) (g '' cylinder (fun x => 0) 0)) }\np : ℕ → A := fun n => F^[n] p0\nprec : ∀ (n : ℕ), p (n + 1) = F (p n)\npn_fst : ∀ (n : ℕ), (↑(p n)).fst = n\nIx : ∀ (m n : ℕ), m + 1 ≤ n → Prod.fst (↑(p n)).snd m = Prod.fst (↑(p (m + 1))).snd m\nIy : ∀ (m n : ℕ), m + 1 ≤ n → Prod.snd (↑(p n)).snd m = Prod.snd (↑(p (m + 1))).snd m\nx : ℕ → ℕ := fun n => Prod.fst (↑(p (n + 1))).snd n\nhx : x = fun n => Prod.fst (↑(p (n + 1))).snd n\ny : ℕ → ℕ := fun n => Prod.snd (↑(p (n + 1))).snd n\nhy : y = fun n => Prod.snd (↑(p (n + 1))).snd n\nM : ∀ (n : ℕ), ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n)\nu v : Set α\nu_open : IsOpen u\nv_open : IsOpen v\nxu : f x ∈ u\nyv : g y ∈ v\nhuv : Disjoint u v\nthis : MetricSpace (ℕ → ℕ) := metricSpaceNatNat\nεx : ℝ\nεxpos : εx > 0\nhεx : ball x εx ⊆ f ⁻¹' u\n⊢ ∃ εy, εy > 0 ∧ ball y εy ⊆ g ⁻¹' v\n[PROOFSTEP]\napply Metric.mem_nhds_iff.1\n[GOAL]\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : T2Space α\ninst✝¹ : MeasurableSpace α\ninst✝ : OpensMeasurableSpace α\nf g : (ℕ → ℕ) → α\nhf : Continuous f\nhg : Continuous g\nh : Disjoint (range f) (range g)\nhfg : ¬MeasurablySeparable (range f) (range g)\nI :\n  ∀ (n : ℕ) (x y : ℕ → ℕ),\n    ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n) →\n      ∃ x' y',\n        x' ∈ cylinder x n ∧\n          y' ∈ cylinder y n ∧ ¬MeasurablySeparable (f '' cylinder x' (n + 1)) (g '' cylinder y' (n + 1))\nA : Type := { p // ¬MeasurablySeparable (f '' cylinder p.snd.fst p.fst) (g '' cylinder p.snd.snd p.fst) }\nF : A → A\nhFn : ∀ (p : A), (↑(F p)).fst = (↑p).fst + 1\nhFx : ∀ (p : A), (↑(F p)).snd.fst ∈ cylinder (↑p).snd.fst (↑p).fst\nhFy : ∀ (p : A), (↑(F p)).snd.snd ∈ cylinder (↑p).snd.snd (↑p).fst\np0 : A :=\n  { val := (0, fun x => 0, fun x => 0),\n    property := (_ : ¬MeasurablySeparable (f '' cylinder (fun x => 0) 0) (g '' cylinder (fun x => 0) 0)) }\np : ℕ → A := fun n => F^[n] p0\nprec : ∀ (n : ℕ), p (n + 1) = F (p n)\npn_fst : ∀ (n : ℕ), (↑(p n)).fst = n\nIx : ∀ (m n : ℕ), m + 1 ≤ n → Prod.fst (↑(p n)).snd m = Prod.fst (↑(p (m + 1))).snd m\nIy : ∀ (m n : ℕ), m + 1 ≤ n → Prod.snd (↑(p n)).snd m = Prod.snd (↑(p (m + 1))).snd m\nx : ℕ → ℕ := fun n => Prod.fst (↑(p (n + 1))).snd n\nhx : x = fun n => Prod.fst (↑(p (n + 1))).snd n\ny : ℕ → ℕ := fun n => Prod.snd (↑(p (n + 1))).snd n\nhy : y = fun n => Prod.snd (↑(p (n + 1))).snd n\nM : ∀ (n : ℕ), ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n)\nu v : Set α\nu_open : IsOpen u\nv_open : IsOpen v\nxu : f x ∈ u\nyv : g y ∈ v\nhuv : Disjoint u v\nthis : MetricSpace (ℕ → ℕ) := metricSpaceNatNat\nεx : ℝ\nεxpos : εx > 0\nhεx : ball x εx ⊆ f ⁻¹' u\n⊢ g ⁻¹' v ∈ 𝓝 y\n[PROOFSTEP]\nexact hg.continuousAt.preimage_mem_nhds (v_open.mem_nhds yv)\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : T2Space α\ninst✝¹ : MeasurableSpace α\ninst✝ : OpensMeasurableSpace α\nf g : (ℕ → ℕ) → α\nhf : Continuous f\nhg : Continuous g\nh : Disjoint (range f) (range g)\nhfg : ¬MeasurablySeparable (range f) (range g)\nI :\n  ∀ (n : ℕ) (x y : ℕ → ℕ),\n    ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n) →\n      ∃ x' y',\n        x' ∈ cylinder x n ∧\n          y' ∈ cylinder y n ∧ ¬MeasurablySeparable (f '' cylinder x' (n + 1)) (g '' cylinder y' (n + 1))\nA : Type := { p // ¬MeasurablySeparable (f '' cylinder p.snd.fst p.fst) (g '' cylinder p.snd.snd p.fst) }\nF : A → A\nhFn : ∀ (p : A), (↑(F p)).fst = (↑p).fst + 1\nhFx : ∀ (p : A), (↑(F p)).snd.fst ∈ cylinder (↑p).snd.fst (↑p).fst\nhFy : ∀ (p : A), (↑(F p)).snd.snd ∈ cylinder (↑p).snd.snd (↑p).fst\np0 : A :=\n  { val := (0, fun x => 0, fun x => 0),\n    property := (_ : ¬MeasurablySeparable (f '' cylinder (fun x => 0) 0) (g '' cylinder (fun x => 0) 0)) }\np : ℕ → A := fun n => F^[n] p0\nprec : ∀ (n : ℕ), p (n + 1) = F (p n)\npn_fst : ∀ (n : ℕ), (↑(p n)).fst = n\nIx : ∀ (m n : ℕ), m + 1 ≤ n → Prod.fst (↑(p n)).snd m = Prod.fst (↑(p (m + 1))).snd m\nIy : ∀ (m n : ℕ), m + 1 ≤ n → Prod.snd (↑(p n)).snd m = Prod.snd (↑(p (m + 1))).snd m\nx : ℕ → ℕ := fun n => Prod.fst (↑(p (n + 1))).snd n\nhx : x = fun n => Prod.fst (↑(p (n + 1))).snd n\ny : ℕ → ℕ := fun n => Prod.snd (↑(p (n + 1))).snd n\nhy : y = fun n => Prod.snd (↑(p (n + 1))).snd n\nM : ∀ (n : ℕ), ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n)\nu v : Set α\nu_open : IsOpen u\nv_open : IsOpen v\nxu : f x ∈ u\nyv : g y ∈ v\nhuv : Disjoint u v\nthis : MetricSpace (ℕ → ℕ) := metricSpaceNatNat\nεx : ℝ\nεxpos : εx > 0\nhεx : ball x εx ⊆ f ⁻¹' u\nεy : ℝ\nεypos : εy > 0\nhεy : ball y εy ⊆ g ⁻¹' v\n⊢ False\n[PROOFSTEP]\nobtain ⟨n, hn⟩ : ∃ n : ℕ, (1 / 2 : ℝ) ^ n < min εx εy :=\n  exists_pow_lt_of_lt_one (lt_min εxpos εypos)\n    (by norm_num)\n      -- for large enough `n`, these open sets separate the images of long cylinders around `x` and `y`\n[GOAL]\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : T2Space α\ninst✝¹ : MeasurableSpace α\ninst✝ : OpensMeasurableSpace α\nf g : (ℕ → ℕ) → α\nhf : Continuous f\nhg : Continuous g\nh : Disjoint (range f) (range g)\nhfg : ¬MeasurablySeparable (range f) (range g)\nI :\n  ∀ (n : ℕ) (x y : ℕ → ℕ),\n    ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n) →\n      ∃ x' y',\n        x' ∈ cylinder x n ∧\n          y' ∈ cylinder y n ∧ ¬MeasurablySeparable (f '' cylinder x' (n + 1)) (g '' cylinder y' (n + 1))\nA : Type := { p // ¬MeasurablySeparable (f '' cylinder p.snd.fst p.fst) (g '' cylinder p.snd.snd p.fst) }\nF : A → A\nhFn : ∀ (p : A), (↑(F p)).fst = (↑p).fst + 1\nhFx : ∀ (p : A), (↑(F p)).snd.fst ∈ cylinder (↑p).snd.fst (↑p).fst\nhFy : ∀ (p : A), (↑(F p)).snd.snd ∈ cylinder (↑p).snd.snd (↑p).fst\np0 : A :=\n  { val := (0, fun x => 0, fun x => 0),\n    property := (_ : ¬MeasurablySeparable (f '' cylinder (fun x => 0) 0) (g '' cylinder (fun x => 0) 0)) }\np : ℕ → A := fun n => F^[n] p0\nprec : ∀ (n : ℕ), p (n + 1) = F (p n)\npn_fst : ∀ (n : ℕ), (↑(p n)).fst = n\nIx : ∀ (m n : ℕ), m + 1 ≤ n → Prod.fst (↑(p n)).snd m = Prod.fst (↑(p (m + 1))).snd m\nIy : ∀ (m n : ℕ), m + 1 ≤ n → Prod.snd (↑(p n)).snd m = Prod.snd (↑(p (m + 1))).snd m\nx : ℕ → ℕ := fun n => Prod.fst (↑(p (n + 1))).snd n\nhx : x = fun n => Prod.fst (↑(p (n + 1))).snd n\ny : ℕ → ℕ := fun n => Prod.snd (↑(p (n + 1))).snd n\nhy : y = fun n => Prod.snd (↑(p (n + 1))).snd n\nM : ∀ (n : ℕ), ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n)\nu v : Set α\nu_open : IsOpen u\nv_open : IsOpen v\nxu : f x ∈ u\nyv : g y ∈ v\nhuv : Disjoint u v\nthis : MetricSpace (ℕ → ℕ) := metricSpaceNatNat\nεx : ℝ\nεxpos : εx > 0\nhεx : ball x εx ⊆ f ⁻¹' u\nεy : ℝ\nεypos : εy > 0\nhεy : ball y εy ⊆ g ⁻¹' v\n⊢ 1 / 2 < 1\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : T2Space α\ninst✝¹ : MeasurableSpace α\ninst✝ : OpensMeasurableSpace α\nf g : (ℕ → ℕ) → α\nhf : Continuous f\nhg : Continuous g\nh : Disjoint (range f) (range g)\nhfg : ¬MeasurablySeparable (range f) (range g)\nI :\n  ∀ (n : ℕ) (x y : ℕ → ℕ),\n    ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n) →\n      ∃ x' y',\n        x' ∈ cylinder x n ∧\n          y' ∈ cylinder y n ∧ ¬MeasurablySeparable (f '' cylinder x' (n + 1)) (g '' cylinder y' (n + 1))\nA : Type := { p // ¬MeasurablySeparable (f '' cylinder p.snd.fst p.fst) (g '' cylinder p.snd.snd p.fst) }\nF : A → A\nhFn : ∀ (p : A), (↑(F p)).fst = (↑p).fst + 1\nhFx : ∀ (p : A), (↑(F p)).snd.fst ∈ cylinder (↑p).snd.fst (↑p).fst\nhFy : ∀ (p : A), (↑(F p)).snd.snd ∈ cylinder (↑p).snd.snd (↑p).fst\np0 : A :=\n  { val := (0, fun x => 0, fun x => 0),\n    property := (_ : ¬MeasurablySeparable (f '' cylinder (fun x => 0) 0) (g '' cylinder (fun x => 0) 0)) }\np : ℕ → A := fun n => F^[n] p0\nprec : ∀ (n : ℕ), p (n + 1) = F (p n)\npn_fst : ∀ (n : ℕ), (↑(p n)).fst = n\nIx : ∀ (m n : ℕ), m + 1 ≤ n → Prod.fst (↑(p n)).snd m = Prod.fst (↑(p (m + 1))).snd m\nIy : ∀ (m n : ℕ), m + 1 ≤ n → Prod.snd (↑(p n)).snd m = Prod.snd (↑(p (m + 1))).snd m\nx : ℕ → ℕ := fun n => Prod.fst (↑(p (n + 1))).snd n\nhx : x = fun n => Prod.fst (↑(p (n + 1))).snd n\ny : ℕ → ℕ := fun n => Prod.snd (↑(p (n + 1))).snd n\nhy : y = fun n => Prod.snd (↑(p (n + 1))).snd n\nM : ∀ (n : ℕ), ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n)\nu v : Set α\nu_open : IsOpen u\nv_open : IsOpen v\nxu : f x ∈ u\nyv : g y ∈ v\nhuv : Disjoint u v\nthis : MetricSpace (ℕ → ℕ) := metricSpaceNatNat\nεx : ℝ\nεxpos : εx > 0\nhεx : ball x εx ⊆ f ⁻¹' u\nεy : ℝ\nεypos : εy > 0\nhεy : ball y εy ⊆ g ⁻¹' v\nn : ℕ\nhn : (1 / 2) ^ n < min εx εy\n⊢ False\n[PROOFSTEP]\nhave B : MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n) :=\n  by\n  refine' ⟨u, _, _, u_open.measurableSet⟩\n  · rw [image_subset_iff]\n    apply Subset.trans _ hεx\n    intro z hz\n    rw [mem_cylinder_iff_dist_le] at hz \n    exact hz.trans_lt (hn.trans_le (min_le_left _ _))\n  · refine' Disjoint.mono_left _ huv.symm\n    change g '' cylinder y n ⊆ v\n    rw [image_subset_iff]\n    apply Subset.trans _ hεy\n    intro z hz\n    rw [mem_cylinder_iff_dist_le] at hz \n    exact\n      hz.trans_lt\n        (hn.trans_le (min_le_right _ _))\n          -- this is a contradiction.\n[GOAL]\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : T2Space α\ninst✝¹ : MeasurableSpace α\ninst✝ : OpensMeasurableSpace α\nf g : (ℕ → ℕ) → α\nhf : Continuous f\nhg : Continuous g\nh : Disjoint (range f) (range g)\nhfg : ¬MeasurablySeparable (range f) (range g)\nI :\n  ∀ (n : ℕ) (x y : ℕ → ℕ),\n    ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n) →\n      ∃ x' y',\n        x' ∈ cylinder x n ∧\n          y' ∈ cylinder y n ∧ ¬MeasurablySeparable (f '' cylinder x' (n + 1)) (g '' cylinder y' (n + 1))\nA : Type := { p // ¬MeasurablySeparable (f '' cylinder p.snd.fst p.fst) (g '' cylinder p.snd.snd p.fst) }\nF : A → A\nhFn : ∀ (p : A), (↑(F p)).fst = (↑p).fst + 1\nhFx : ∀ (p : A), (↑(F p)).snd.fst ∈ cylinder (↑p).snd.fst (↑p).fst\nhFy : ∀ (p : A), (↑(F p)).snd.snd ∈ cylinder (↑p).snd.snd (↑p).fst\np0 : A :=\n  { val := (0, fun x => 0, fun x => 0),\n    property := (_ : ¬MeasurablySeparable (f '' cylinder (fun x => 0) 0) (g '' cylinder (fun x => 0) 0)) }\np : ℕ → A := fun n => F^[n] p0\nprec : ∀ (n : ℕ), p (n + 1) = F (p n)\npn_fst : ∀ (n : ℕ), (↑(p n)).fst = n\nIx : ∀ (m n : ℕ), m + 1 ≤ n → Prod.fst (↑(p n)).snd m = Prod.fst (↑(p (m + 1))).snd m\nIy : ∀ (m n : ℕ), m + 1 ≤ n → Prod.snd (↑(p n)).snd m = Prod.snd (↑(p (m + 1))).snd m\nx : ℕ → ℕ := fun n => Prod.fst (↑(p (n + 1))).snd n\nhx : x = fun n => Prod.fst (↑(p (n + 1))).snd n\ny : ℕ → ℕ := fun n => Prod.snd (↑(p (n + 1))).snd n\nhy : y = fun n => Prod.snd (↑(p (n + 1))).snd n\nM : ∀ (n : ℕ), ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n)\nu v : Set α\nu_open : IsOpen u\nv_open : IsOpen v\nxu : f x ∈ u\nyv : g y ∈ v\nhuv : Disjoint u v\nthis : MetricSpace (ℕ → ℕ) := metricSpaceNatNat\nεx : ℝ\nεxpos : εx > 0\nhεx : ball x εx ⊆ f ⁻¹' u\nεy : ℝ\nεypos : εy > 0\nhεy : ball y εy ⊆ g ⁻¹' v\nn : ℕ\nhn : (1 / 2) ^ n < min εx εy\n⊢ MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n)\n[PROOFSTEP]\nrefine' ⟨u, _, _, u_open.measurableSet⟩\n[GOAL]\ncase refine'_1\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : T2Space α\ninst✝¹ : MeasurableSpace α\ninst✝ : OpensMeasurableSpace α\nf g : (ℕ → ℕ) → α\nhf : Continuous f\nhg : Continuous g\nh : Disjoint (range f) (range g)\nhfg : ¬MeasurablySeparable (range f) (range g)\nI :\n  ∀ (n : ℕ) (x y : ℕ → ℕ),\n    ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n) →\n      ∃ x' y',\n        x' ∈ cylinder x n ∧\n          y' ∈ cylinder y n ∧ ¬MeasurablySeparable (f '' cylinder x' (n + 1)) (g '' cylinder y' (n + 1))\nA : Type := { p // ¬MeasurablySeparable (f '' cylinder p.snd.fst p.fst) (g '' cylinder p.snd.snd p.fst) }\nF : A → A\nhFn : ∀ (p : A), (↑(F p)).fst = (↑p).fst + 1\nhFx : ∀ (p : A), (↑(F p)).snd.fst ∈ cylinder (↑p).snd.fst (↑p).fst\nhFy : ∀ (p : A), (↑(F p)).snd.snd ∈ cylinder (↑p).snd.snd (↑p).fst\np0 : A :=\n  { val := (0, fun x => 0, fun x => 0),\n    property := (_ : ¬MeasurablySeparable (f '' cylinder (fun x => 0) 0) (g '' cylinder (fun x => 0) 0)) }\np : ℕ → A := fun n => F^[n] p0\nprec : ∀ (n : ℕ), p (n + 1) = F (p n)\npn_fst : ∀ (n : ℕ), (↑(p n)).fst = n\nIx : ∀ (m n : ℕ), m + 1 ≤ n → Prod.fst (↑(p n)).snd m = Prod.fst (↑(p (m + 1))).snd m\nIy : ∀ (m n : ℕ), m + 1 ≤ n → Prod.snd (↑(p n)).snd m = Prod.snd (↑(p (m + 1))).snd m\nx : ℕ → ℕ := fun n => Prod.fst (↑(p (n + 1))).snd n\nhx : x = fun n => Prod.fst (↑(p (n + 1))).snd n\ny : ℕ → ℕ := fun n => Prod.snd (↑(p (n + 1))).snd n\nhy : y = fun n => Prod.snd (↑(p (n + 1))).snd n\nM : ∀ (n : ℕ), ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n)\nu v : Set α\nu_open : IsOpen u\nv_open : IsOpen v\nxu : f x ∈ u\nyv : g y ∈ v\nhuv : Disjoint u v\nthis : MetricSpace (ℕ → ℕ) := metricSpaceNatNat\nεx : ℝ\nεxpos : εx > 0\nhεx : ball x εx ⊆ f ⁻¹' u\nεy : ℝ\nεypos : εy > 0\nhεy : ball y εy ⊆ g ⁻¹' v\nn : ℕ\nhn : (1 / 2) ^ n < min εx εy\n⊢ f '' cylinder x n ⊆ u\n[PROOFSTEP]\nrw [image_subset_iff]\n[GOAL]\ncase refine'_1\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : T2Space α\ninst✝¹ : MeasurableSpace α\ninst✝ : OpensMeasurableSpace α\nf g : (ℕ → ℕ) → α\nhf : Continuous f\nhg : Continuous g\nh : Disjoint (range f) (range g)\nhfg : ¬MeasurablySeparable (range f) (range g)\nI :\n  ∀ (n : ℕ) (x y : ℕ → ℕ),\n    ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n) →\n      ∃ x' y',\n        x' ∈ cylinder x n ∧\n          y' ∈ cylinder y n ∧ ¬MeasurablySeparable (f '' cylinder x' (n + 1)) (g '' cylinder y' (n + 1))\nA : Type := { p // ¬MeasurablySeparable (f '' cylinder p.snd.fst p.fst) (g '' cylinder p.snd.snd p.fst) }\nF : A → A\nhFn : ∀ (p : A), (↑(F p)).fst = (↑p).fst + 1\nhFx : ∀ (p : A), (↑(F p)).snd.fst ∈ cylinder (↑p).snd.fst (↑p).fst\nhFy : ∀ (p : A), (↑(F p)).snd.snd ∈ cylinder (↑p).snd.snd (↑p).fst\np0 : A :=\n  { val := (0, fun x => 0, fun x => 0),\n    property := (_ : ¬MeasurablySeparable (f '' cylinder (fun x => 0) 0) (g '' cylinder (fun x => 0) 0)) }\np : ℕ → A := fun n => F^[n] p0\nprec : ∀ (n : ℕ), p (n + 1) = F (p n)\npn_fst : ∀ (n : ℕ), (↑(p n)).fst = n\nIx : ∀ (m n : ℕ), m + 1 ≤ n → Prod.fst (↑(p n)).snd m = Prod.fst (↑(p (m + 1))).snd m\nIy : ∀ (m n : ℕ), m + 1 ≤ n → Prod.snd (↑(p n)).snd m = Prod.snd (↑(p (m + 1))).snd m\nx : ℕ → ℕ := fun n => Prod.fst (↑(p (n + 1))).snd n\nhx : x = fun n => Prod.fst (↑(p (n + 1))).snd n\ny : ℕ → ℕ := fun n => Prod.snd (↑(p (n + 1))).snd n\nhy : y = fun n => Prod.snd (↑(p (n + 1))).snd n\nM : ∀ (n : ℕ), ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n)\nu v : Set α\nu_open : IsOpen u\nv_open : IsOpen v\nxu : f x ∈ u\nyv : g y ∈ v\nhuv : Disjoint u v\nthis : MetricSpace (ℕ → ℕ) := metricSpaceNatNat\nεx : ℝ\nεxpos : εx > 0\nhεx : ball x εx ⊆ f ⁻¹' u\nεy : ℝ\nεypos : εy > 0\nhεy : ball y εy ⊆ g ⁻¹' v\nn : ℕ\nhn : (1 / 2) ^ n < min εx εy\n⊢ cylinder x n ⊆ f ⁻¹' u\n[PROOFSTEP]\napply Subset.trans _ hεx\n[GOAL]\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : T2Space α\ninst✝¹ : MeasurableSpace α\ninst✝ : OpensMeasurableSpace α\nf g : (ℕ → ℕ) → α\nhf : Continuous f\nhg : Continuous g\nh : Disjoint (range f) (range g)\nhfg : ¬MeasurablySeparable (range f) (range g)\nI :\n  ∀ (n : ℕ) (x y : ℕ → ℕ),\n    ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n) →\n      ∃ x' y',\n        x' ∈ cylinder x n ∧\n          y' ∈ cylinder y n ∧ ¬MeasurablySeparable (f '' cylinder x' (n + 1)) (g '' cylinder y' (n + 1))\nA : Type := { p // ¬MeasurablySeparable (f '' cylinder p.snd.fst p.fst) (g '' cylinder p.snd.snd p.fst) }\nF : A → A\nhFn : ∀ (p : A), (↑(F p)).fst = (↑p).fst + 1\nhFx : ∀ (p : A), (↑(F p)).snd.fst ∈ cylinder (↑p).snd.fst (↑p).fst\nhFy : ∀ (p : A), (↑(F p)).snd.snd ∈ cylinder (↑p).snd.snd (↑p).fst\np0 : A :=\n  { val := (0, fun x => 0, fun x => 0),\n    property := (_ : ¬MeasurablySeparable (f '' cylinder (fun x => 0) 0) (g '' cylinder (fun x => 0) 0)) }\np : ℕ → A := fun n => F^[n] p0\nprec : ∀ (n : ℕ), p (n + 1) = F (p n)\npn_fst : ∀ (n : ℕ), (↑(p n)).fst = n\nIx : ∀ (m n : ℕ), m + 1 ≤ n → Prod.fst (↑(p n)).snd m = Prod.fst (↑(p (m + 1))).snd m\nIy : ∀ (m n : ℕ), m + 1 ≤ n → Prod.snd (↑(p n)).snd m = Prod.snd (↑(p (m + 1))).snd m\nx : ℕ → ℕ := fun n => Prod.fst (↑(p (n + 1))).snd n\nhx : x = fun n => Prod.fst (↑(p (n + 1))).snd n\ny : ℕ → ℕ := fun n => Prod.snd (↑(p (n + 1))).snd n\nhy : y = fun n => Prod.snd (↑(p (n + 1))).snd n\nM : ∀ (n : ℕ), ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n)\nu v : Set α\nu_open : IsOpen u\nv_open : IsOpen v\nxu : f x ∈ u\nyv : g y ∈ v\nhuv : Disjoint u v\nthis : MetricSpace (ℕ → ℕ) := metricSpaceNatNat\nεx : ℝ\nεxpos : εx > 0\nhεx : ball x εx ⊆ f ⁻¹' u\nεy : ℝ\nεypos : εy > 0\nhεy : ball y εy ⊆ g ⁻¹' v\nn : ℕ\nhn : (1 / 2) ^ n < min εx εy\n⊢ cylinder x n ⊆ ball x εx\n[PROOFSTEP]\nintro z hz\n[GOAL]\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : T2Space α\ninst✝¹ : MeasurableSpace α\ninst✝ : OpensMeasurableSpace α\nf g : (ℕ → ℕ) → α\nhf : Continuous f\nhg : Continuous g\nh : Disjoint (range f) (range g)\nhfg : ¬MeasurablySeparable (range f) (range g)\nI :\n  ∀ (n : ℕ) (x y : ℕ → ℕ),\n    ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n) →\n      ∃ x' y',\n        x' ∈ cylinder x n ∧\n          y' ∈ cylinder y n ∧ ¬MeasurablySeparable (f '' cylinder x' (n + 1)) (g '' cylinder y' (n + 1))\nA : Type := { p // ¬MeasurablySeparable (f '' cylinder p.snd.fst p.fst) (g '' cylinder p.snd.snd p.fst) }\nF : A → A\nhFn : ∀ (p : A), (↑(F p)).fst = (↑p).fst + 1\nhFx : ∀ (p : A), (↑(F p)).snd.fst ∈ cylinder (↑p).snd.fst (↑p).fst\nhFy : ∀ (p : A), (↑(F p)).snd.snd ∈ cylinder (↑p).snd.snd (↑p).fst\np0 : A :=\n  { val := (0, fun x => 0, fun x => 0),\n    property := (_ : ¬MeasurablySeparable (f '' cylinder (fun x => 0) 0) (g '' cylinder (fun x => 0) 0)) }\np : ℕ → A := fun n => F^[n] p0\nprec : ∀ (n : ℕ), p (n + 1) = F (p n)\npn_fst : ∀ (n : ℕ), (↑(p n)).fst = n\nIx : ∀ (m n : ℕ), m + 1 ≤ n → Prod.fst (↑(p n)).snd m = Prod.fst (↑(p (m + 1))).snd m\nIy : ∀ (m n : ℕ), m + 1 ≤ n → Prod.snd (↑(p n)).snd m = Prod.snd (↑(p (m + 1))).snd m\nx : ℕ → ℕ := fun n => Prod.fst (↑(p (n + 1))).snd n\nhx : x = fun n => Prod.fst (↑(p (n + 1))).snd n\ny : ℕ → ℕ := fun n => Prod.snd (↑(p (n + 1))).snd n\nhy : y = fun n => Prod.snd (↑(p (n + 1))).snd n\nM : ∀ (n : ℕ), ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n)\nu v : Set α\nu_open : IsOpen u\nv_open : IsOpen v\nxu : f x ∈ u\nyv : g y ∈ v\nhuv : Disjoint u v\nthis : MetricSpace (ℕ → ℕ) := metricSpaceNatNat\nεx : ℝ\nεxpos : εx > 0\nhεx : ball x εx ⊆ f ⁻¹' u\nεy : ℝ\nεypos : εy > 0\nhεy : ball y εy ⊆ g ⁻¹' v\nn : ℕ\nhn : (1 / 2) ^ n < min εx εy\nz : ℕ → ℕ\nhz : z ∈ cylinder x n\n⊢ z ∈ ball x εx\n[PROOFSTEP]\nrw [mem_cylinder_iff_dist_le] at hz \n[GOAL]\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : T2Space α\ninst✝¹ : MeasurableSpace α\ninst✝ : OpensMeasurableSpace α\nf g : (ℕ → ℕ) → α\nhf : Continuous f\nhg : Continuous g\nh : Disjoint (range f) (range g)\nhfg : ¬MeasurablySeparable (range f) (range g)\nI :\n  ∀ (n : ℕ) (x y : ℕ → ℕ),\n    ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n) →\n      ∃ x' y',\n        x' ∈ cylinder x n ∧\n          y' ∈ cylinder y n ∧ ¬MeasurablySeparable (f '' cylinder x' (n + 1)) (g '' cylinder y' (n + 1))\nA : Type := { p // ¬MeasurablySeparable (f '' cylinder p.snd.fst p.fst) (g '' cylinder p.snd.snd p.fst) }\nF : A → A\nhFn : ∀ (p : A), (↑(F p)).fst = (↑p).fst + 1\nhFx : ∀ (p : A), (↑(F p)).snd.fst ∈ cylinder (↑p).snd.fst (↑p).fst\nhFy : ∀ (p : A), (↑(F p)).snd.snd ∈ cylinder (↑p).snd.snd (↑p).fst\np0 : A :=\n  { val := (0, fun x => 0, fun x => 0),\n    property := (_ : ¬MeasurablySeparable (f '' cylinder (fun x => 0) 0) (g '' cylinder (fun x => 0) 0)) }\np : ℕ → A := fun n => F^[n] p0\nprec : ∀ (n : ℕ), p (n + 1) = F (p n)\npn_fst : ∀ (n : ℕ), (↑(p n)).fst = n\nIx : ∀ (m n : ℕ), m + 1 ≤ n → Prod.fst (↑(p n)).snd m = Prod.fst (↑(p (m + 1))).snd m\nIy : ∀ (m n : ℕ), m + 1 ≤ n → Prod.snd (↑(p n)).snd m = Prod.snd (↑(p (m + 1))).snd m\nx : ℕ → ℕ := fun n => Prod.fst (↑(p (n + 1))).snd n\nhx : x = fun n => Prod.fst (↑(p (n + 1))).snd n\ny : ℕ → ℕ := fun n => Prod.snd (↑(p (n + 1))).snd n\nhy : y = fun n => Prod.snd (↑(p (n + 1))).snd n\nM : ∀ (n : ℕ), ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n)\nu v : Set α\nu_open : IsOpen u\nv_open : IsOpen v\nxu : f x ∈ u\nyv : g y ∈ v\nhuv : Disjoint u v\nthis : MetricSpace (ℕ → ℕ) := metricSpaceNatNat\nεx : ℝ\nεxpos : εx > 0\nhεx : ball x εx ⊆ f ⁻¹' u\nεy : ℝ\nεypos : εy > 0\nhεy : ball y εy ⊆ g ⁻¹' v\nn : ℕ\nhn : (1 / 2) ^ n < min εx εy\nz : ℕ → ℕ\nhz : dist z x ≤ (1 / 2) ^ n\n⊢ z ∈ ball x εx\n[PROOFSTEP]\nexact hz.trans_lt (hn.trans_le (min_le_left _ _))\n[GOAL]\ncase refine'_2\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : T2Space α\ninst✝¹ : MeasurableSpace α\ninst✝ : OpensMeasurableSpace α\nf g : (ℕ → ℕ) → α\nhf : Continuous f\nhg : Continuous g\nh : Disjoint (range f) (range g)\nhfg : ¬MeasurablySeparable (range f) (range g)\nI :\n  ∀ (n : ℕ) (x y : ℕ → ℕ),\n    ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n) →\n      ∃ x' y',\n        x' ∈ cylinder x n ∧\n          y' ∈ cylinder y n ∧ ¬MeasurablySeparable (f '' cylinder x' (n + 1)) (g '' cylinder y' (n + 1))\nA : Type := { p // ¬MeasurablySeparable (f '' cylinder p.snd.fst p.fst) (g '' cylinder p.snd.snd p.fst) }\nF : A → A\nhFn : ∀ (p : A), (↑(F p)).fst = (↑p).fst + 1\nhFx : ∀ (p : A), (↑(F p)).snd.fst ∈ cylinder (↑p).snd.fst (↑p).fst\nhFy : ∀ (p : A), (↑(F p)).snd.snd ∈ cylinder (↑p).snd.snd (↑p).fst\np0 : A :=\n  { val := (0, fun x => 0, fun x => 0),\n    property := (_ : ¬MeasurablySeparable (f '' cylinder (fun x => 0) 0) (g '' cylinder (fun x => 0) 0)) }\np : ℕ → A := fun n => F^[n] p0\nprec : ∀ (n : ℕ), p (n + 1) = F (p n)\npn_fst : ∀ (n : ℕ), (↑(p n)).fst = n\nIx : ∀ (m n : ℕ), m + 1 ≤ n → Prod.fst (↑(p n)).snd m = Prod.fst (↑(p (m + 1))).snd m\nIy : ∀ (m n : ℕ), m + 1 ≤ n → Prod.snd (↑(p n)).snd m = Prod.snd (↑(p (m + 1))).snd m\nx : ℕ → ℕ := fun n => Prod.fst (↑(p (n + 1))).snd n\nhx : x = fun n => Prod.fst (↑(p (n + 1))).snd n\ny : ℕ → ℕ := fun n => Prod.snd (↑(p (n + 1))).snd n\nhy : y = fun n => Prod.snd (↑(p (n + 1))).snd n\nM : ∀ (n : ℕ), ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n)\nu v : Set α\nu_open : IsOpen u\nv_open : IsOpen v\nxu : f x ∈ u\nyv : g y ∈ v\nhuv : Disjoint u v\nthis : MetricSpace (ℕ → ℕ) := metricSpaceNatNat\nεx : ℝ\nεxpos : εx > 0\nhεx : ball x εx ⊆ f ⁻¹' u\nεy : ℝ\nεypos : εy > 0\nhεy : ball y εy ⊆ g ⁻¹' v\nn : ℕ\nhn : (1 / 2) ^ n < min εx εy\n⊢ Disjoint (g '' cylinder y n) u\n[PROOFSTEP]\nrefine' Disjoint.mono_left _ huv.symm\n[GOAL]\ncase refine'_2\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : T2Space α\ninst✝¹ : MeasurableSpace α\ninst✝ : OpensMeasurableSpace α\nf g : (ℕ → ℕ) → α\nhf : Continuous f\nhg : Continuous g\nh : Disjoint (range f) (range g)\nhfg : ¬MeasurablySeparable (range f) (range g)\nI :\n  ∀ (n : ℕ) (x y : ℕ → ℕ),\n    ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n) →\n      ∃ x' y',\n        x' ∈ cylinder x n ∧\n          y' ∈ cylinder y n ∧ ¬MeasurablySeparable (f '' cylinder x' (n + 1)) (g '' cylinder y' (n + 1))\nA : Type := { p // ¬MeasurablySeparable (f '' cylinder p.snd.fst p.fst) (g '' cylinder p.snd.snd p.fst) }\nF : A → A\nhFn : ∀ (p : A), (↑(F p)).fst = (↑p).fst + 1\nhFx : ∀ (p : A), (↑(F p)).snd.fst ∈ cylinder (↑p).snd.fst (↑p).fst\nhFy : ∀ (p : A), (↑(F p)).snd.snd ∈ cylinder (↑p).snd.snd (↑p).fst\np0 : A :=\n  { val := (0, fun x => 0, fun x => 0),\n    property := (_ : ¬MeasurablySeparable (f '' cylinder (fun x => 0) 0) (g '' cylinder (fun x => 0) 0)) }\np : ℕ → A := fun n => F^[n] p0\nprec : ∀ (n : ℕ), p (n + 1) = F (p n)\npn_fst : ∀ (n : ℕ), (↑(p n)).fst = n\nIx : ∀ (m n : ℕ), m + 1 ≤ n → Prod.fst (↑(p n)).snd m = Prod.fst (↑(p (m + 1))).snd m\nIy : ∀ (m n : ℕ), m + 1 ≤ n → Prod.snd (↑(p n)).snd m = Prod.snd (↑(p (m + 1))).snd m\nx : ℕ → ℕ := fun n => Prod.fst (↑(p (n + 1))).snd n\nhx : x = fun n => Prod.fst (↑(p (n + 1))).snd n\ny : ℕ → ℕ := fun n => Prod.snd (↑(p (n + 1))).snd n\nhy : y = fun n => Prod.snd (↑(p (n + 1))).snd n\nM : ∀ (n : ℕ), ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n)\nu v : Set α\nu_open : IsOpen u\nv_open : IsOpen v\nxu : f x ∈ u\nyv : g y ∈ v\nhuv : Disjoint u v\nthis : MetricSpace (ℕ → ℕ) := metricSpaceNatNat\nεx : ℝ\nεxpos : εx > 0\nhεx : ball x εx ⊆ f ⁻¹' u\nεy : ℝ\nεypos : εy > 0\nhεy : ball y εy ⊆ g ⁻¹' v\nn : ℕ\nhn : (1 / 2) ^ n < min εx εy\n⊢ g '' cylinder y n ≤ v\n[PROOFSTEP]\nchange g '' cylinder y n ⊆ v\n[GOAL]\ncase refine'_2\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : T2Space α\ninst✝¹ : MeasurableSpace α\ninst✝ : OpensMeasurableSpace α\nf g : (ℕ → ℕ) → α\nhf : Continuous f\nhg : Continuous g\nh : Disjoint (range f) (range g)\nhfg : ¬MeasurablySeparable (range f) (range g)\nI :\n  ∀ (n : ℕ) (x y : ℕ → ℕ),\n    ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n) →\n      ∃ x' y',\n        x' ∈ cylinder x n ∧\n          y' ∈ cylinder y n ∧ ¬MeasurablySeparable (f '' cylinder x' (n + 1)) (g '' cylinder y' (n + 1))\nA : Type := { p // ¬MeasurablySeparable (f '' cylinder p.snd.fst p.fst) (g '' cylinder p.snd.snd p.fst) }\nF : A → A\nhFn : ∀ (p : A), (↑(F p)).fst = (↑p).fst + 1\nhFx : ∀ (p : A), (↑(F p)).snd.fst ∈ cylinder (↑p).snd.fst (↑p).fst\nhFy : ∀ (p : A), (↑(F p)).snd.snd ∈ cylinder (↑p).snd.snd (↑p).fst\np0 : A :=\n  { val := (0, fun x => 0, fun x => 0),\n    property := (_ : ¬MeasurablySeparable (f '' cylinder (fun x => 0) 0) (g '' cylinder (fun x => 0) 0)) }\np : ℕ → A := fun n => F^[n] p0\nprec : ∀ (n : ℕ), p (n + 1) = F (p n)\npn_fst : ∀ (n : ℕ), (↑(p n)).fst = n\nIx : ∀ (m n : ℕ), m + 1 ≤ n → Prod.fst (↑(p n)).snd m = Prod.fst (↑(p (m + 1))).snd m\nIy : ∀ (m n : ℕ), m + 1 ≤ n → Prod.snd (↑(p n)).snd m = Prod.snd (↑(p (m + 1))).snd m\nx : ℕ → ℕ := fun n => Prod.fst (↑(p (n + 1))).snd n\nhx : x = fun n => Prod.fst (↑(p (n + 1))).snd n\ny : ℕ → ℕ := fun n => Prod.snd (↑(p (n + 1))).snd n\nhy : y = fun n => Prod.snd (↑(p (n + 1))).snd n\nM : ∀ (n : ℕ), ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n)\nu v : Set α\nu_open : IsOpen u\nv_open : IsOpen v\nxu : f x ∈ u\nyv : g y ∈ v\nhuv : Disjoint u v\nthis : MetricSpace (ℕ → ℕ) := metricSpaceNatNat\nεx : ℝ\nεxpos : εx > 0\nhεx : ball x εx ⊆ f ⁻¹' u\nεy : ℝ\nεypos : εy > 0\nhεy : ball y εy ⊆ g ⁻¹' v\nn : ℕ\nhn : (1 / 2) ^ n < min εx εy\n⊢ g '' cylinder y n ⊆ v\n[PROOFSTEP]\nrw [image_subset_iff]\n[GOAL]\ncase refine'_2\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : T2Space α\ninst✝¹ : MeasurableSpace α\ninst✝ : OpensMeasurableSpace α\nf g : (ℕ → ℕ) → α\nhf : Continuous f\nhg : Continuous g\nh : Disjoint (range f) (range g)\nhfg : ¬MeasurablySeparable (range f) (range g)\nI :\n  ∀ (n : ℕ) (x y : ℕ → ℕ),\n    ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n) →\n      ∃ x' y',\n        x' ∈ cylinder x n ∧\n          y' ∈ cylinder y n ∧ ¬MeasurablySeparable (f '' cylinder x' (n + 1)) (g '' cylinder y' (n + 1))\nA : Type := { p // ¬MeasurablySeparable (f '' cylinder p.snd.fst p.fst) (g '' cylinder p.snd.snd p.fst) }\nF : A → A\nhFn : ∀ (p : A), (↑(F p)).fst = (↑p).fst + 1\nhFx : ∀ (p : A), (↑(F p)).snd.fst ∈ cylinder (↑p).snd.fst (↑p).fst\nhFy : ∀ (p : A), (↑(F p)).snd.snd ∈ cylinder (↑p).snd.snd (↑p).fst\np0 : A :=\n  { val := (0, fun x => 0, fun x => 0),\n    property := (_ : ¬MeasurablySeparable (f '' cylinder (fun x => 0) 0) (g '' cylinder (fun x => 0) 0)) }\np : ℕ → A := fun n => F^[n] p0\nprec : ∀ (n : ℕ), p (n + 1) = F (p n)\npn_fst : ∀ (n : ℕ), (↑(p n)).fst = n\nIx : ∀ (m n : ℕ), m + 1 ≤ n → Prod.fst (↑(p n)).snd m = Prod.fst (↑(p (m + 1))).snd m\nIy : ∀ (m n : ℕ), m + 1 ≤ n → Prod.snd (↑(p n)).snd m = Prod.snd (↑(p (m + 1))).snd m\nx : ℕ → ℕ := fun n => Prod.fst (↑(p (n + 1))).snd n\nhx : x = fun n => Prod.fst (↑(p (n + 1))).snd n\ny : ℕ → ℕ := fun n => Prod.snd (↑(p (n + 1))).snd n\nhy : y = fun n => Prod.snd (↑(p (n + 1))).snd n\nM : ∀ (n : ℕ), ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n)\nu v : Set α\nu_open : IsOpen u\nv_open : IsOpen v\nxu : f x ∈ u\nyv : g y ∈ v\nhuv : Disjoint u v\nthis : MetricSpace (ℕ → ℕ) := metricSpaceNatNat\nεx : ℝ\nεxpos : εx > 0\nhεx : ball x εx ⊆ f ⁻¹' u\nεy : ℝ\nεypos : εy > 0\nhεy : ball y εy ⊆ g ⁻¹' v\nn : ℕ\nhn : (1 / 2) ^ n < min εx εy\n⊢ cylinder y n ⊆ g ⁻¹' v\n[PROOFSTEP]\napply Subset.trans _ hεy\n[GOAL]\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : T2Space α\ninst✝¹ : MeasurableSpace α\ninst✝ : OpensMeasurableSpace α\nf g : (ℕ → ℕ) → α\nhf : Continuous f\nhg : Continuous g\nh : Disjoint (range f) (range g)\nhfg : ¬MeasurablySeparable (range f) (range g)\nI :\n  ∀ (n : ℕ) (x y : ℕ → ℕ),\n    ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n) →\n      ∃ x' y',\n        x' ∈ cylinder x n ∧\n          y' ∈ cylinder y n ∧ ¬MeasurablySeparable (f '' cylinder x' (n + 1)) (g '' cylinder y' (n + 1))\nA : Type := { p // ¬MeasurablySeparable (f '' cylinder p.snd.fst p.fst) (g '' cylinder p.snd.snd p.fst) }\nF : A → A\nhFn : ∀ (p : A), (↑(F p)).fst = (↑p).fst + 1\nhFx : ∀ (p : A), (↑(F p)).snd.fst ∈ cylinder (↑p).snd.fst (↑p).fst\nhFy : ∀ (p : A), (↑(F p)).snd.snd ∈ cylinder (↑p).snd.snd (↑p).fst\np0 : A :=\n  { val := (0, fun x => 0, fun x => 0),\n    property := (_ : ¬MeasurablySeparable (f '' cylinder (fun x => 0) 0) (g '' cylinder (fun x => 0) 0)) }\np : ℕ → A := fun n => F^[n] p0\nprec : ∀ (n : ℕ), p (n + 1) = F (p n)\npn_fst : ∀ (n : ℕ), (↑(p n)).fst = n\nIx : ∀ (m n : ℕ), m + 1 ≤ n → Prod.fst (↑(p n)).snd m = Prod.fst (↑(p (m + 1))).snd m\nIy : ∀ (m n : ℕ), m + 1 ≤ n → Prod.snd (↑(p n)).snd m = Prod.snd (↑(p (m + 1))).snd m\nx : ℕ → ℕ := fun n => Prod.fst (↑(p (n + 1))).snd n\nhx : x = fun n => Prod.fst (↑(p (n + 1))).snd n\ny : ℕ → ℕ := fun n => Prod.snd (↑(p (n + 1))).snd n\nhy : y = fun n => Prod.snd (↑(p (n + 1))).snd n\nM : ∀ (n : ℕ), ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n)\nu v : Set α\nu_open : IsOpen u\nv_open : IsOpen v\nxu : f x ∈ u\nyv : g y ∈ v\nhuv : Disjoint u v\nthis : MetricSpace (ℕ → ℕ) := metricSpaceNatNat\nεx : ℝ\nεxpos : εx > 0\nhεx : ball x εx ⊆ f ⁻¹' u\nεy : ℝ\nεypos : εy > 0\nhεy : ball y εy ⊆ g ⁻¹' v\nn : ℕ\nhn : (1 / 2) ^ n < min εx εy\n⊢ cylinder y n ⊆ ball y εy\n[PROOFSTEP]\nintro z hz\n[GOAL]\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : T2Space α\ninst✝¹ : MeasurableSpace α\ninst✝ : OpensMeasurableSpace α\nf g : (ℕ → ℕ) → α\nhf : Continuous f\nhg : Continuous g\nh : Disjoint (range f) (range g)\nhfg : ¬MeasurablySeparable (range f) (range g)\nI :\n  ∀ (n : ℕ) (x y : ℕ → ℕ),\n    ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n) →\n      ∃ x' y',\n        x' ∈ cylinder x n ∧\n          y' ∈ cylinder y n ∧ ¬MeasurablySeparable (f '' cylinder x' (n + 1)) (g '' cylinder y' (n + 1))\nA : Type := { p // ¬MeasurablySeparable (f '' cylinder p.snd.fst p.fst) (g '' cylinder p.snd.snd p.fst) }\nF : A → A\nhFn : ∀ (p : A), (↑(F p)).fst = (↑p).fst + 1\nhFx : ∀ (p : A), (↑(F p)).snd.fst ∈ cylinder (↑p).snd.fst (↑p).fst\nhFy : ∀ (p : A), (↑(F p)).snd.snd ∈ cylinder (↑p).snd.snd (↑p).fst\np0 : A :=\n  { val := (0, fun x => 0, fun x => 0),\n    property := (_ : ¬MeasurablySeparable (f '' cylinder (fun x => 0) 0) (g '' cylinder (fun x => 0) 0)) }\np : ℕ → A := fun n => F^[n] p0\nprec : ∀ (n : ℕ), p (n + 1) = F (p n)\npn_fst : ∀ (n : ℕ), (↑(p n)).fst = n\nIx : ∀ (m n : ℕ), m + 1 ≤ n → Prod.fst (↑(p n)).snd m = Prod.fst (↑(p (m + 1))).snd m\nIy : ∀ (m n : ℕ), m + 1 ≤ n → Prod.snd (↑(p n)).snd m = Prod.snd (↑(p (m + 1))).snd m\nx : ℕ → ℕ := fun n => Prod.fst (↑(p (n + 1))).snd n\nhx : x = fun n => Prod.fst (↑(p (n + 1))).snd n\ny : ℕ → ℕ := fun n => Prod.snd (↑(p (n + 1))).snd n\nhy : y = fun n => Prod.snd (↑(p (n + 1))).snd n\nM : ∀ (n : ℕ), ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n)\nu v : Set α\nu_open : IsOpen u\nv_open : IsOpen v\nxu : f x ∈ u\nyv : g y ∈ v\nhuv : Disjoint u v\nthis : MetricSpace (ℕ → ℕ) := metricSpaceNatNat\nεx : ℝ\nεxpos : εx > 0\nhεx : ball x εx ⊆ f ⁻¹' u\nεy : ℝ\nεypos : εy > 0\nhεy : ball y εy ⊆ g ⁻¹' v\nn : ℕ\nhn : (1 / 2) ^ n < min εx εy\nz : ℕ → ℕ\nhz : z ∈ cylinder y n\n⊢ z ∈ ball y εy\n[PROOFSTEP]\nrw [mem_cylinder_iff_dist_le] at hz \n[GOAL]\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : T2Space α\ninst✝¹ : MeasurableSpace α\ninst✝ : OpensMeasurableSpace α\nf g : (ℕ → ℕ) → α\nhf : Continuous f\nhg : Continuous g\nh : Disjoint (range f) (range g)\nhfg : ¬MeasurablySeparable (range f) (range g)\nI :\n  ∀ (n : ℕ) (x y : ℕ → ℕ),\n    ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n) →\n      ∃ x' y',\n        x' ∈ cylinder x n ∧\n          y' ∈ cylinder y n ∧ ¬MeasurablySeparable (f '' cylinder x' (n + 1)) (g '' cylinder y' (n + 1))\nA : Type := { p // ¬MeasurablySeparable (f '' cylinder p.snd.fst p.fst) (g '' cylinder p.snd.snd p.fst) }\nF : A → A\nhFn : ∀ (p : A), (↑(F p)).fst = (↑p).fst + 1\nhFx : ∀ (p : A), (↑(F p)).snd.fst ∈ cylinder (↑p).snd.fst (↑p).fst\nhFy : ∀ (p : A), (↑(F p)).snd.snd ∈ cylinder (↑p).snd.snd (↑p).fst\np0 : A :=\n  { val := (0, fun x => 0, fun x => 0),\n    property := (_ : ¬MeasurablySeparable (f '' cylinder (fun x => 0) 0) (g '' cylinder (fun x => 0) 0)) }\np : ℕ → A := fun n => F^[n] p0\nprec : ∀ (n : ℕ), p (n + 1) = F (p n)\npn_fst : ∀ (n : ℕ), (↑(p n)).fst = n\nIx : ∀ (m n : ℕ), m + 1 ≤ n → Prod.fst (↑(p n)).snd m = Prod.fst (↑(p (m + 1))).snd m\nIy : ∀ (m n : ℕ), m + 1 ≤ n → Prod.snd (↑(p n)).snd m = Prod.snd (↑(p (m + 1))).snd m\nx : ℕ → ℕ := fun n => Prod.fst (↑(p (n + 1))).snd n\nhx : x = fun n => Prod.fst (↑(p (n + 1))).snd n\ny : ℕ → ℕ := fun n => Prod.snd (↑(p (n + 1))).snd n\nhy : y = fun n => Prod.snd (↑(p (n + 1))).snd n\nM : ∀ (n : ℕ), ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n)\nu v : Set α\nu_open : IsOpen u\nv_open : IsOpen v\nxu : f x ∈ u\nyv : g y ∈ v\nhuv : Disjoint u v\nthis : MetricSpace (ℕ → ℕ) := metricSpaceNatNat\nεx : ℝ\nεxpos : εx > 0\nhεx : ball x εx ⊆ f ⁻¹' u\nεy : ℝ\nεypos : εy > 0\nhεy : ball y εy ⊆ g ⁻¹' v\nn : ℕ\nhn : (1 / 2) ^ n < min εx εy\nz : ℕ → ℕ\nhz : dist z y ≤ (1 / 2) ^ n\n⊢ z ∈ ball y εy\n[PROOFSTEP]\nexact\n  hz.trans_lt\n    (hn.trans_le (min_le_right _ _))\n      -- this is a contradiction.\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : T2Space α\ninst✝¹ : MeasurableSpace α\ninst✝ : OpensMeasurableSpace α\nf g : (ℕ → ℕ) → α\nhf : Continuous f\nhg : Continuous g\nh : Disjoint (range f) (range g)\nhfg : ¬MeasurablySeparable (range f) (range g)\nI :\n  ∀ (n : ℕ) (x y : ℕ → ℕ),\n    ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n) →\n      ∃ x' y',\n        x' ∈ cylinder x n ∧\n          y' ∈ cylinder y n ∧ ¬MeasurablySeparable (f '' cylinder x' (n + 1)) (g '' cylinder y' (n + 1))\nA : Type := { p // ¬MeasurablySeparable (f '' cylinder p.snd.fst p.fst) (g '' cylinder p.snd.snd p.fst) }\nF : A → A\nhFn : ∀ (p : A), (↑(F p)).fst = (↑p).fst + 1\nhFx : ∀ (p : A), (↑(F p)).snd.fst ∈ cylinder (↑p).snd.fst (↑p).fst\nhFy : ∀ (p : A), (↑(F p)).snd.snd ∈ cylinder (↑p).snd.snd (↑p).fst\np0 : A :=\n  { val := (0, fun x => 0, fun x => 0),\n    property := (_ : ¬MeasurablySeparable (f '' cylinder (fun x => 0) 0) (g '' cylinder (fun x => 0) 0)) }\np : ℕ → A := fun n => F^[n] p0\nprec : ∀ (n : ℕ), p (n + 1) = F (p n)\npn_fst : ∀ (n : ℕ), (↑(p n)).fst = n\nIx : ∀ (m n : ℕ), m + 1 ≤ n → Prod.fst (↑(p n)).snd m = Prod.fst (↑(p (m + 1))).snd m\nIy : ∀ (m n : ℕ), m + 1 ≤ n → Prod.snd (↑(p n)).snd m = Prod.snd (↑(p (m + 1))).snd m\nx : ℕ → ℕ := fun n => Prod.fst (↑(p (n + 1))).snd n\nhx : x = fun n => Prod.fst (↑(p (n + 1))).snd n\ny : ℕ → ℕ := fun n => Prod.snd (↑(p (n + 1))).snd n\nhy : y = fun n => Prod.snd (↑(p (n + 1))).snd n\nM : ∀ (n : ℕ), ¬MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n)\nu v : Set α\nu_open : IsOpen u\nv_open : IsOpen v\nxu : f x ∈ u\nyv : g y ∈ v\nhuv : Disjoint u v\nthis : MetricSpace (ℕ → ℕ) := metricSpaceNatNat\nεx : ℝ\nεxpos : εx > 0\nhεx : ball x εx ⊆ f ⁻¹' u\nεy : ℝ\nεypos : εy > 0\nhεy : ball y εy ⊆ g ⁻¹' v\nn : ℕ\nhn : (1 / 2) ^ n < min εx εy\nB : MeasurablySeparable (f '' cylinder x n) (g '' cylinder y n)\n⊢ False\n[PROOFSTEP]\nexact M n B\n[GOAL]\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : T2Space α\ninst✝¹ : MeasurableSpace α\ninst✝ : OpensMeasurableSpace α\ns t : Set α\nhs : AnalyticSet s\nht : AnalyticSet t\nh : Disjoint s t\n⊢ MeasurablySeparable s t\n[PROOFSTEP]\nrw [AnalyticSet] at hs ht \n[GOAL]\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : T2Space α\ninst✝¹ : MeasurableSpace α\ninst✝ : OpensMeasurableSpace α\ns t : Set α\nhs : s = ∅ ∨ ∃ f, Continuous f ∧ range f = s\nht : t = ∅ ∨ ∃ f, Continuous f ∧ range f = t\nh : Disjoint s t\n⊢ MeasurablySeparable s t\n[PROOFSTEP]\nrcases hs with (rfl | ⟨f, f_cont, rfl⟩)\n[GOAL]\ncase inl\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : T2Space α\ninst✝¹ : MeasurableSpace α\ninst✝ : OpensMeasurableSpace α\nt : Set α\nht : t = ∅ ∨ ∃ f, Continuous f ∧ range f = t\nh : Disjoint ∅ t\n⊢ MeasurablySeparable ∅ t\n[PROOFSTEP]\nrefine' ⟨∅, Subset.refl _, by simp, MeasurableSet.empty⟩\n[GOAL]\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : T2Space α\ninst✝¹ : MeasurableSpace α\ninst✝ : OpensMeasurableSpace α\nt : Set α\nht : t = ∅ ∨ ∃ f, Continuous f ∧ range f = t\nh : Disjoint ∅ t\n⊢ Disjoint t ∅\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr.intro.intro\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : T2Space α\ninst✝¹ : MeasurableSpace α\ninst✝ : OpensMeasurableSpace α\nt : Set α\nht : t = ∅ ∨ ∃ f, Continuous f ∧ range f = t\nf : (ℕ → ℕ) → α\nf_cont : Continuous f\nh : Disjoint (range f) t\n⊢ MeasurablySeparable (range f) t\n[PROOFSTEP]\nrcases ht with (rfl | ⟨g, g_cont, rfl⟩)\n[GOAL]\ncase inr.intro.intro.inl\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : T2Space α\ninst✝¹ : MeasurableSpace α\ninst✝ : OpensMeasurableSpace α\nf : (ℕ → ℕ) → α\nf_cont : Continuous f\nh : Disjoint (range f) ∅\n⊢ MeasurablySeparable (range f) ∅\n[PROOFSTEP]\nexact ⟨univ, subset_univ _, by simp, MeasurableSet.univ⟩\n[GOAL]\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : T2Space α\ninst✝¹ : MeasurableSpace α\ninst✝ : OpensMeasurableSpace α\nf : (ℕ → ℕ) → α\nf_cont : Continuous f\nh : Disjoint (range f) ∅\n⊢ Disjoint ∅ univ\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr.intro.intro.inr.intro.intro\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : T2Space α\ninst✝¹ : MeasurableSpace α\ninst✝ : OpensMeasurableSpace α\nf : (ℕ → ℕ) → α\nf_cont : Continuous f\ng : (ℕ → ℕ) → α\ng_cont : Continuous g\nh : Disjoint (range f) (range g)\n⊢ MeasurablySeparable (range f) (range g)\n[PROOFSTEP]\nexact measurablySeparable_range_of_disjoint f_cont g_cont h\n[GOAL]\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : T2Space α\ninst✝¹ : MeasurableSpace α\ninst✝ : OpensMeasurableSpace α\ns : Set α\nhs : AnalyticSet s\nhsc : AnalyticSet sᶜ\n⊢ MeasurableSet s\n[PROOFSTEP]\nrcases hs.measurablySeparable hsc disjoint_compl_right with ⟨u, hsu, hdu, hmu⟩\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : T2Space α\ninst✝¹ : MeasurableSpace α\ninst✝ : OpensMeasurableSpace α\ns : Set α\nhs : AnalyticSet s\nhsc : AnalyticSet sᶜ\nu : Set α\nhsu : s ⊆ u\nhdu : Disjoint sᶜ u\nhmu : MeasurableSet u\n⊢ MeasurableSet s\n[PROOFSTEP]\nobtain rfl : s = u := hsu.antisymm (disjoint_compl_left_iff_subset.1 hdu)\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : T2Space α\ninst✝¹ : MeasurableSpace α\ninst✝ : OpensMeasurableSpace α\ns : Set α\nhs : AnalyticSet s\nhsc : AnalyticSet sᶜ\nhsu : s ⊆ s\nhdu : Disjoint sᶜ s\nhmu : MeasurableSet s\n⊢ MeasurableSet s\n[PROOFSTEP]\nexact hmu\n[GOAL]\nα : Type u_1\ninst✝¹⁰ : TopologicalSpace α\nι : Type u_2\nX : Type u_3\nY : Type u_4\nβ : Type u_5\ninst✝⁹ : TopologicalSpace X\ninst✝⁸ : PolishSpace X\ninst✝⁷ : MeasurableSpace X\ninst✝⁶ : BorelSpace X\ninst✝⁵ : TopologicalSpace Y\ninst✝⁴ : T2Space Y\ninst✝³ : MeasurableSpace Y\ninst✝² : OpensMeasurableSpace Y\ninst✝¹ : MeasurableSpace β\ninst✝ : SecondCountableTopology Y\nf : X → Y\nhf : Measurable f\nhsurj : Surjective f\ns : Set Y\n⊢ MeasurableSet (f ⁻¹' s) ↔ MeasurableSet s\n[PROOFSTEP]\nrefine ⟨fun h => ?_, fun h => hf h⟩\n[GOAL]\nα : Type u_1\ninst✝¹⁰ : TopologicalSpace α\nι : Type u_2\nX : Type u_3\nY : Type u_4\nβ : Type u_5\ninst✝⁹ : TopologicalSpace X\ninst✝⁸ : PolishSpace X\ninst✝⁷ : MeasurableSpace X\ninst✝⁶ : BorelSpace X\ninst✝⁵ : TopologicalSpace Y\ninst✝⁴ : T2Space Y\ninst✝³ : MeasurableSpace Y\ninst✝² : OpensMeasurableSpace Y\ninst✝¹ : MeasurableSpace β\ninst✝ : SecondCountableTopology Y\nf : X → Y\nhf : Measurable f\nhsurj : Surjective f\ns : Set Y\nh : MeasurableSet (f ⁻¹' s)\n⊢ MeasurableSet s\n[PROOFSTEP]\napply AnalyticSet.measurableSet_of_compl\n[GOAL]\ncase hs\nα : Type u_1\ninst✝¹⁰ : TopologicalSpace α\nι : Type u_2\nX : Type u_3\nY : Type u_4\nβ : Type u_5\ninst✝⁹ : TopologicalSpace X\ninst✝⁸ : PolishSpace X\ninst✝⁷ : MeasurableSpace X\ninst✝⁶ : BorelSpace X\ninst✝⁵ : TopologicalSpace Y\ninst✝⁴ : T2Space Y\ninst✝³ : MeasurableSpace Y\ninst✝² : OpensMeasurableSpace Y\ninst✝¹ : MeasurableSpace β\ninst✝ : SecondCountableTopology Y\nf : X → Y\nhf : Measurable f\nhsurj : Surjective f\ns : Set Y\nh : MeasurableSet (f ⁻¹' s)\n⊢ AnalyticSet s\n[PROOFSTEP]\nrw [← image_preimage_eq s hsurj]\n[GOAL]\ncase hs\nα : Type u_1\ninst✝¹⁰ : TopologicalSpace α\nι : Type u_2\nX : Type u_3\nY : Type u_4\nβ : Type u_5\ninst✝⁹ : TopologicalSpace X\ninst✝⁸ : PolishSpace X\ninst✝⁷ : MeasurableSpace X\ninst✝⁶ : BorelSpace X\ninst✝⁵ : TopologicalSpace Y\ninst✝⁴ : T2Space Y\ninst✝³ : MeasurableSpace Y\ninst✝² : OpensMeasurableSpace Y\ninst✝¹ : MeasurableSpace β\ninst✝ : SecondCountableTopology Y\nf : X → Y\nhf : Measurable f\nhsurj : Surjective f\ns : Set Y\nh : MeasurableSet (f ⁻¹' s)\n⊢ AnalyticSet (f '' (f ⁻¹' s))\n[PROOFSTEP]\nexact h.analyticSet_image hf\n[GOAL]\ncase hsc\nα : Type u_1\ninst✝¹⁰ : TopologicalSpace α\nι : Type u_2\nX : Type u_3\nY : Type u_4\nβ : Type u_5\ninst✝⁹ : TopologicalSpace X\ninst✝⁸ : PolishSpace X\ninst✝⁷ : MeasurableSpace X\ninst✝⁶ : BorelSpace X\ninst✝⁵ : TopologicalSpace Y\ninst✝⁴ : T2Space Y\ninst✝³ : MeasurableSpace Y\ninst✝² : OpensMeasurableSpace Y\ninst✝¹ : MeasurableSpace β\ninst✝ : SecondCountableTopology Y\nf : X → Y\nhf : Measurable f\nhsurj : Surjective f\ns : Set Y\nh : MeasurableSet (f ⁻¹' s)\n⊢ AnalyticSet sᶜ\n[PROOFSTEP]\nrw [← image_preimage_eq sᶜ hsurj]\n[GOAL]\ncase hsc\nα : Type u_1\ninst✝¹⁰ : TopologicalSpace α\nι : Type u_2\nX : Type u_3\nY : Type u_4\nβ : Type u_5\ninst✝⁹ : TopologicalSpace X\ninst✝⁸ : PolishSpace X\ninst✝⁷ : MeasurableSpace X\ninst✝⁶ : BorelSpace X\ninst✝⁵ : TopologicalSpace Y\ninst✝⁴ : T2Space Y\ninst✝³ : MeasurableSpace Y\ninst✝² : OpensMeasurableSpace Y\ninst✝¹ : MeasurableSpace β\ninst✝ : SecondCountableTopology Y\nf : X → Y\nhf : Measurable f\nhsurj : Surjective f\ns : Set Y\nh : MeasurableSet (f ⁻¹' s)\n⊢ AnalyticSet (f '' (f ⁻¹' sᶜ))\n[PROOFSTEP]\nexact h.compl.analyticSet_image hf\n[GOAL]\nα : Type u_1\ninst✝¹⁰ : TopologicalSpace α\nι : Type u_2\nX : Type u_3\nY : Type u_4\nβ : Type u_5\ninst✝⁹ : TopologicalSpace X\ninst✝⁸ : PolishSpace X\ninst✝⁷ : MeasurableSpace X\ninst✝⁶ : BorelSpace X\ninst✝⁵ : TopologicalSpace Y\ninst✝⁴ : T2Space Y\ninst✝³ : MeasurableSpace Y\ninst✝² : OpensMeasurableSpace Y\ninst✝¹ : MeasurableSpace β\ninst✝ : SecondCountableTopology Y\nf : X → Y\nhf : Measurable f\nhsurj : Surjective f\n⊢ MeasurableSpace.map f inst✝⁷ = borel Y\n[PROOFSTEP]\nhave d := hf.mono le_rfl OpensMeasurableSpace.borel_le\n[GOAL]\nα : Type u_1\ninst✝¹⁰ : TopologicalSpace α\nι : Type u_2\nX : Type u_3\nY : Type u_4\nβ : Type u_5\ninst✝⁹ : TopologicalSpace X\ninst✝⁸ : PolishSpace X\ninst✝⁷ : MeasurableSpace X\ninst✝⁶ : BorelSpace X\ninst✝⁵ : TopologicalSpace Y\ninst✝⁴ : T2Space Y\ninst✝³ : MeasurableSpace Y\ninst✝² : OpensMeasurableSpace Y\ninst✝¹ : MeasurableSpace β\ninst✝ : SecondCountableTopology Y\nf : X → Y\nhf : Measurable f\nhsurj : Surjective f\nd : Measurable f\n⊢ MeasurableSpace.map f inst✝⁷ = borel Y\n[PROOFSTEP]\nletI := borel Y\n[GOAL]\nα : Type u_1\ninst✝¹⁰ : TopologicalSpace α\nι : Type u_2\nX : Type u_3\nY : Type u_4\nβ : Type u_5\ninst✝⁹ : TopologicalSpace X\ninst✝⁸ : PolishSpace X\ninst✝⁷ : MeasurableSpace X\ninst✝⁶ : BorelSpace X\ninst✝⁵ : TopologicalSpace Y\ninst✝⁴ : T2Space Y\ninst✝³ : MeasurableSpace Y\ninst✝² : OpensMeasurableSpace Y\ninst✝¹ : MeasurableSpace β\ninst✝ : SecondCountableTopology Y\nf : X → Y\nhf : Measurable f\nhsurj : Surjective f\nd : Measurable f\nthis : MeasurableSpace Y := borel Y\n⊢ MeasurableSpace.map f inst✝⁷ = borel Y\n[PROOFSTEP]\nhaveI : BorelSpace Y := ⟨rfl⟩\n[GOAL]\nα : Type u_1\ninst✝¹⁰ : TopologicalSpace α\nι : Type u_2\nX : Type u_3\nY : Type u_4\nβ : Type u_5\ninst✝⁹ : TopologicalSpace X\ninst✝⁸ : PolishSpace X\ninst✝⁷ : MeasurableSpace X\ninst✝⁶ : BorelSpace X\ninst✝⁵ : TopologicalSpace Y\ninst✝⁴ : T2Space Y\ninst✝³ : MeasurableSpace Y\ninst✝² : OpensMeasurableSpace Y\ninst✝¹ : MeasurableSpace β\ninst✝ : SecondCountableTopology Y\nf : X → Y\nhf : Measurable f\nhsurj : Surjective f\nd : Measurable f\nthis✝ : MeasurableSpace Y := borel Y\nthis : BorelSpace Y\n⊢ MeasurableSpace.map f inst✝⁷ = borel Y\n[PROOFSTEP]\nexact d.map_measurableSpace_eq hsurj\n[GOAL]\nα : Type u_1\ninst✝¹⁰ : TopologicalSpace α\nι : Type u_2\nX : Type u_3\nY : Type u_4\nβ : Type u_5\ninst✝⁹ : TopologicalSpace X\ninst✝⁸ : PolishSpace X\ninst✝⁷ : MeasurableSpace X\ninst✝⁶ : BorelSpace X\ninst✝⁵ : TopologicalSpace Y\ninst✝⁴ : T2Space Y\ninst✝³ : MeasurableSpace Y\ninst✝² : OpensMeasurableSpace Y\ninst✝¹ : MeasurableSpace β\nf : X → Y\ninst✝ : SecondCountableTopology ↑(range f)\nhf : Measurable f\nhr : MeasurableSet (range f)\ns : Set Y\n⊢ MeasurableSet (f ⁻¹' s) ↔ MeasurableSet (s ∩ range f)\n[PROOFSTEP]\nrw [hf.measurableSet_preimage_iff_preimage_val, ← (MeasurableEmbedding.subtype_coe hr).measurableSet_image,\n  Subtype.image_preimage_coe]\n[GOAL]\nα : Type u_1\ninst✝⁷ : TopologicalSpace α\nι : Type u_2\nX : Type u_3\nY : Type u_4\ninst✝⁶ : TopologicalSpace X\ninst✝⁵ : PolishSpace X\ninst✝⁴ : MeasurableSpace X\ninst✝³ : BorelSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : T2Space Y\ninst✝ : SecondCountableTopology Y\nf : X → Y\nhf : Continuous f\nhsurj : Surjective f\n⊢ MeasurableSpace.map f inst✝⁴ = borel Y\n[PROOFSTEP]\nborelize Y\n[GOAL]\nα : Type u_1\ninst✝⁷ : TopologicalSpace α\nι : Type u_2\nX : Type u_3\nY : Type u_4\ninst✝⁶ : TopologicalSpace X\ninst✝⁵ : PolishSpace X\ninst✝⁴ : MeasurableSpace X\ninst✝³ : BorelSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : T2Space Y\ninst✝ : SecondCountableTopology Y\nf : X → Y\nhf : Continuous f\nhsurj : Surjective f\nthis✝¹ : MeasurableSpace Y := borel Y\nthis✝ : BorelSpace Y\n⊢ MeasurableSpace.map f inst✝⁴ = borel Y\n[PROOFSTEP]\nexact hf.measurable.map_measurableSpace_eq hsurj\n[GOAL]\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nX : Type u_3\nY : Type u_4\ninst✝⁴ : TopologicalSpace X\ninst✝³ : PolishSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : T2Space Y\ninst✝ : SecondCountableTopology Y\nf : X → Y\nhf : Continuous f\nhsurj : Surjective f\n⊢ MeasurableSpace.map f (borel X) = borel Y\n[PROOFSTEP]\nborelize X\n[GOAL]\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nX : Type u_3\nY : Type u_4\ninst✝⁴ : TopologicalSpace X\ninst✝³ : PolishSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : T2Space Y\ninst✝ : SecondCountableTopology Y\nf : X → Y\nhf : Continuous f\nhsurj : Surjective f\nthis✝¹ : MeasurableSpace X := borel X\nthis✝ : BorelSpace X\n⊢ MeasurableSpace.map f (borel X) = borel Y\n[PROOFSTEP]\nexact hf.map_eq_borel hsurj\n[GOAL]\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\nβ : Type u_4\ninst✝³ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nf : γ → β\nf_cont : Continuous f\nf_inj : Injective f\n⊢ MeasurableSet (range f)\n[PROOFSTEP]\nletI := upgradePolishSpace γ\n[GOAL]\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\nβ : Type u_4\ninst✝³ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nf : γ → β\nf_cont : Continuous f\nf_inj : Injective f\nthis : UpgradedPolishSpace γ := upgradePolishSpace γ\n⊢ MeasurableSet (range f)\n[PROOFSTEP]\nobtain ⟨b, b_count, b_nonempty, hb⟩ : ∃ b : Set (Set γ), b.Countable ∧ ∅ ∉ b ∧ IsTopologicalBasis b :=\n  exists_countable_basis γ\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\nβ : Type u_4\ninst✝³ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nf : γ → β\nf_cont : Continuous f\nf_inj : Injective f\nthis : UpgradedPolishSpace γ := upgradePolishSpace γ\nb : Set (Set γ)\nb_count : Set.Countable b\nb_nonempty : ¬∅ ∈ b\nhb : IsTopologicalBasis b\n⊢ MeasurableSet (range f)\n[PROOFSTEP]\nhaveI : Encodable b := b_count.toEncodable\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\nβ : Type u_4\ninst✝³ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nf : γ → β\nf_cont : Continuous f\nf_inj : Injective f\nthis✝ : UpgradedPolishSpace γ := upgradePolishSpace γ\nb : Set (Set γ)\nb_count : Set.Countable b\nb_nonempty : ¬∅ ∈ b\nhb : IsTopologicalBasis b\nthis : Encodable ↑b\n⊢ MeasurableSet (range f)\n[PROOFSTEP]\nlet A :=\n  { p : b × b // Disjoint (p.1 : Set γ) p.2 }\n    -- for each pair of disjoint sets in the topological basis `b`, consider Borel sets separating\n      -- their images, by injectivity of `f` and the Lusin separation theorem.\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\nβ : Type u_4\ninst✝³ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nf : γ → β\nf_cont : Continuous f\nf_inj : Injective f\nthis✝ : UpgradedPolishSpace γ := upgradePolishSpace γ\nb : Set (Set γ)\nb_count : Set.Countable b\nb_nonempty : ¬∅ ∈ b\nhb : IsTopologicalBasis b\nthis : Encodable ↑b\nA : Type u_3 := { p // Disjoint ↑p.fst ↑p.snd }\n⊢ MeasurableSet (range f)\n[PROOFSTEP]\nhave : ∀ p : A, ∃ q : Set β, f '' (p.1.1 : Set γ) ⊆ q ∧ Disjoint (f '' (p.1.2 : Set γ)) q ∧ MeasurableSet q :=\n  by\n  intro p\n  apply\n    AnalyticSet.measurablySeparable ((hb.isOpen p.1.1.2).analyticSet_image f_cont)\n      ((hb.isOpen p.1.2.2).analyticSet_image f_cont)\n  exact Disjoint.image p.2 (f_inj.injOn univ) (subset_univ _) (subset_univ _)\n[GOAL]\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\nβ : Type u_4\ninst✝³ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nf : γ → β\nf_cont : Continuous f\nf_inj : Injective f\nthis✝ : UpgradedPolishSpace γ := upgradePolishSpace γ\nb : Set (Set γ)\nb_count : Set.Countable b\nb_nonempty : ¬∅ ∈ b\nhb : IsTopologicalBasis b\nthis : Encodable ↑b\nA : Type u_3 := { p // Disjoint ↑p.fst ↑p.snd }\n⊢ ∀ (p : A), ∃ q, f '' ↑(↑p).fst ⊆ q ∧ Disjoint (f '' ↑(↑p).snd) q ∧ MeasurableSet q\n[PROOFSTEP]\nintro p\n[GOAL]\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\nβ : Type u_4\ninst✝³ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nf : γ → β\nf_cont : Continuous f\nf_inj : Injective f\nthis✝ : UpgradedPolishSpace γ := upgradePolishSpace γ\nb : Set (Set γ)\nb_count : Set.Countable b\nb_nonempty : ¬∅ ∈ b\nhb : IsTopologicalBasis b\nthis : Encodable ↑b\nA : Type u_3 := { p // Disjoint ↑p.fst ↑p.snd }\np : A\n⊢ ∃ q, f '' ↑(↑p).fst ⊆ q ∧ Disjoint (f '' ↑(↑p).snd) q ∧ MeasurableSet q\n[PROOFSTEP]\napply\n  AnalyticSet.measurablySeparable ((hb.isOpen p.1.1.2).analyticSet_image f_cont)\n    ((hb.isOpen p.1.2.2).analyticSet_image f_cont)\n[GOAL]\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\nβ : Type u_4\ninst✝³ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nf : γ → β\nf_cont : Continuous f\nf_inj : Injective f\nthis✝ : UpgradedPolishSpace γ := upgradePolishSpace γ\nb : Set (Set γ)\nb_count : Set.Countable b\nb_nonempty : ¬∅ ∈ b\nhb : IsTopologicalBasis b\nthis : Encodable ↑b\nA : Type u_3 := { p // Disjoint ↑p.fst ↑p.snd }\np : A\n⊢ Disjoint (f '' ↑(↑p).fst) (f '' ↑(↑p).snd)\n[PROOFSTEP]\nexact Disjoint.image p.2 (f_inj.injOn univ) (subset_univ _) (subset_univ _)\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\nβ : Type u_4\ninst✝³ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nf : γ → β\nf_cont : Continuous f\nf_inj : Injective f\nthis✝¹ : UpgradedPolishSpace γ := upgradePolishSpace γ\nb : Set (Set γ)\nb_count : Set.Countable b\nb_nonempty : ¬∅ ∈ b\nhb : IsTopologicalBasis b\nthis✝ : Encodable ↑b\nA : Type u_3 := { p // Disjoint ↑p.fst ↑p.snd }\nthis : ∀ (p : A), ∃ q, f '' ↑(↑p).fst ⊆ q ∧ Disjoint (f '' ↑(↑p).snd) q ∧ MeasurableSet q\n⊢ MeasurableSet (range f)\n[PROOFSTEP]\nchoose q hq1 hq2 q_meas using this\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\nβ : Type u_4\ninst✝³ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nf : γ → β\nf_cont : Continuous f\nf_inj : Injective f\nthis✝ : UpgradedPolishSpace γ := upgradePolishSpace γ\nb : Set (Set γ)\nb_count : Set.Countable b\nb_nonempty : ¬∅ ∈ b\nhb : IsTopologicalBasis b\nthis : Encodable ↑b\nA : Type u_3 := { p // Disjoint ↑p.fst ↑p.snd }\nq : A → Set β\nhq1 : ∀ (p : A), f '' ↑(↑p).fst ⊆ q p\nhq2 : ∀ (p : A), Disjoint (f '' ↑(↑p).snd) (q p)\nq_meas : ∀ (p : A), MeasurableSet (q p)\n⊢ MeasurableSet (range f)\n[PROOFSTEP]\nlet E : b → Set β := fun s => closure (f '' s) ∩ ⋂ (t : b) (ht : Disjoint s.1 t.1), q ⟨(s, t), ht⟩ \\ q ⟨(t, s), ht.symm⟩\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\nβ : Type u_4\ninst✝³ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nf : γ → β\nf_cont : Continuous f\nf_inj : Injective f\nthis✝ : UpgradedPolishSpace γ := upgradePolishSpace γ\nb : Set (Set γ)\nb_count : Set.Countable b\nb_nonempty : ¬∅ ∈ b\nhb : IsTopologicalBasis b\nthis : Encodable ↑b\nA : Type u_3 := { p // Disjoint ↑p.fst ↑p.snd }\nq : A → Set β\nhq1 : ∀ (p : A), f '' ↑(↑p).fst ⊆ q p\nhq2 : ∀ (p : A), Disjoint (f '' ↑(↑p).snd) (q p)\nq_meas : ∀ (p : A), MeasurableSet (q p)\nE : ↑b → Set β :=\n  fun s =>\n    closure (f '' ↑s) ∩\n      ⋂ (t : ↑b) (ht : Disjoint ↑s ↑t),\n        q { val := (s, t), property := ht } \\ q { val := (t, s), property := (_ : Disjoint ↑t ↑s) }\n⊢ MeasurableSet (range f)\n[PROOFSTEP]\nobtain ⟨u, u_anti, u_pos, u_lim⟩ : ∃ u : ℕ → ℝ, StrictAnti u ∧ (∀ n : ℕ, 0 < u n) ∧ Tendsto u atTop (𝓝 0) :=\n  exists_seq_strictAnti_tendsto (0 : ℝ)\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\nβ : Type u_4\ninst✝³ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nf : γ → β\nf_cont : Continuous f\nf_inj : Injective f\nthis✝ : UpgradedPolishSpace γ := upgradePolishSpace γ\nb : Set (Set γ)\nb_count : Set.Countable b\nb_nonempty : ¬∅ ∈ b\nhb : IsTopologicalBasis b\nthis : Encodable ↑b\nA : Type u_3 := { p // Disjoint ↑p.fst ↑p.snd }\nq : A → Set β\nhq1 : ∀ (p : A), f '' ↑(↑p).fst ⊆ q p\nhq2 : ∀ (p : A), Disjoint (f '' ↑(↑p).snd) (q p)\nq_meas : ∀ (p : A), MeasurableSet (q p)\nE : ↑b → Set β :=\n  fun s =>\n    closure (f '' ↑s) ∩\n      ⋂ (t : ↑b) (ht : Disjoint ↑s ↑t),\n        q { val := (s, t), property := ht } \\ q { val := (t, s), property := (_ : Disjoint ↑t ↑s) }\nu : ℕ → ℝ\nu_anti : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\n⊢ MeasurableSet (range f)\n[PROOFSTEP]\nlet F : ℕ → Set β := fun n => ⋃ (s : b) (_ : Bounded s.1 ∧ diam s.1 ≤ u n), E s\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\nβ : Type u_4\ninst✝³ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nf : γ → β\nf_cont : Continuous f\nf_inj : Injective f\nthis✝ : UpgradedPolishSpace γ := upgradePolishSpace γ\nb : Set (Set γ)\nb_count : Set.Countable b\nb_nonempty : ¬∅ ∈ b\nhb : IsTopologicalBasis b\nthis : Encodable ↑b\nA : Type u_3 := { p // Disjoint ↑p.fst ↑p.snd }\nq : A → Set β\nhq1 : ∀ (p : A), f '' ↑(↑p).fst ⊆ q p\nhq2 : ∀ (p : A), Disjoint (f '' ↑(↑p).snd) (q p)\nq_meas : ∀ (p : A), MeasurableSet (q p)\nE : ↑b → Set β :=\n  fun s =>\n    closure (f '' ↑s) ∩\n      ⋂ (t : ↑b) (ht : Disjoint ↑s ↑t),\n        q { val := (s, t), property := ht } \\ q { val := (t, s), property := (_ : Disjoint ↑t ↑s) }\nu : ℕ → ℝ\nu_anti : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nF : ℕ → Set β := fun n => ⋃ (s : ↑b) (_ : Metric.Bounded ↑s ∧ diam ↑s ≤ u n), E s\n⊢ MeasurableSet (range f)\n[PROOFSTEP]\nsuffices range f = ⋂ n, F n\n  by\n  have E_meas : ∀ s : b, MeasurableSet (E s) := by\n    intro b\n    refine' isClosed_closure.measurableSet.inter _\n    refine' MeasurableSet.iInter fun s => _\n    exact MeasurableSet.iInter fun hs => (q_meas _).diff (q_meas _)\n  have F_meas : ∀ n, MeasurableSet (F n) := by\n    intro n\n    refine' MeasurableSet.iUnion fun s => _\n    exact MeasurableSet.iUnion fun _ => E_meas _\n  rw [this]\n  exact MeasurableSet.iInter fun n => F_meas n\n[GOAL]\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\nβ : Type u_4\ninst✝³ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nf : γ → β\nf_cont : Continuous f\nf_inj : Injective f\nthis✝¹ : UpgradedPolishSpace γ := upgradePolishSpace γ\nb : Set (Set γ)\nb_count : Set.Countable b\nb_nonempty : ¬∅ ∈ b\nhb : IsTopologicalBasis b\nthis✝ : Encodable ↑b\nA : Type u_3 := { p // Disjoint ↑p.fst ↑p.snd }\nq : A → Set β\nhq1 : ∀ (p : A), f '' ↑(↑p).fst ⊆ q p\nhq2 : ∀ (p : A), Disjoint (f '' ↑(↑p).snd) (q p)\nq_meas : ∀ (p : A), MeasurableSet (q p)\nE : ↑b → Set β :=\n  fun s =>\n    closure (f '' ↑s) ∩\n      ⋂ (t : ↑b) (ht : Disjoint ↑s ↑t),\n        q { val := (s, t), property := ht } \\ q { val := (t, s), property := (_ : Disjoint ↑t ↑s) }\nu : ℕ → ℝ\nu_anti : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nF : ℕ → Set β := fun n => ⋃ (s : ↑b) (_ : Metric.Bounded ↑s ∧ diam ↑s ≤ u n), E s\nthis : range f = ⋂ (n : ℕ), F n\n⊢ MeasurableSet (range f)\n[PROOFSTEP]\nhave E_meas : ∀ s : b, MeasurableSet (E s) := by\n  intro b\n  refine' isClosed_closure.measurableSet.inter _\n  refine' MeasurableSet.iInter fun s => _\n  exact MeasurableSet.iInter fun hs => (q_meas _).diff (q_meas _)\n[GOAL]\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\nβ : Type u_4\ninst✝³ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nf : γ → β\nf_cont : Continuous f\nf_inj : Injective f\nthis✝¹ : UpgradedPolishSpace γ := upgradePolishSpace γ\nb : Set (Set γ)\nb_count : Set.Countable b\nb_nonempty : ¬∅ ∈ b\nhb : IsTopologicalBasis b\nthis✝ : Encodable ↑b\nA : Type u_3 := { p // Disjoint ↑p.fst ↑p.snd }\nq : A → Set β\nhq1 : ∀ (p : A), f '' ↑(↑p).fst ⊆ q p\nhq2 : ∀ (p : A), Disjoint (f '' ↑(↑p).snd) (q p)\nq_meas : ∀ (p : A), MeasurableSet (q p)\nE : ↑b → Set β :=\n  fun s =>\n    closure (f '' ↑s) ∩\n      ⋂ (t : ↑b) (ht : Disjoint ↑s ↑t),\n        q { val := (s, t), property := ht } \\ q { val := (t, s), property := (_ : Disjoint ↑t ↑s) }\nu : ℕ → ℝ\nu_anti : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nF : ℕ → Set β := fun n => ⋃ (s : ↑b) (_ : Metric.Bounded ↑s ∧ diam ↑s ≤ u n), E s\nthis : range f = ⋂ (n : ℕ), F n\n⊢ ∀ (s : ↑b), MeasurableSet (E s)\n[PROOFSTEP]\nintro b\n[GOAL]\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\nβ : Type u_4\ninst✝³ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nf : γ → β\nf_cont : Continuous f\nf_inj : Injective f\nthis✝¹ : UpgradedPolishSpace γ := upgradePolishSpace γ\nb✝ : Set (Set γ)\nb_count : Set.Countable b✝\nb_nonempty : ¬∅ ∈ b✝\nhb : IsTopologicalBasis b✝\nthis✝ : Encodable ↑b✝\nA : Type u_3 := { p // Disjoint ↑p.fst ↑p.snd }\nq : A → Set β\nhq1 : ∀ (p : A), f '' ↑(↑p).fst ⊆ q p\nhq2 : ∀ (p : A), Disjoint (f '' ↑(↑p).snd) (q p)\nq_meas : ∀ (p : A), MeasurableSet (q p)\nE : ↑b✝ → Set β :=\n  fun s =>\n    closure (f '' ↑s) ∩\n      ⋂ (t : ↑b✝) (ht : Disjoint ↑s ↑t),\n        q { val := (s, t), property := ht } \\ q { val := (t, s), property := (_ : Disjoint ↑t ↑s) }\nu : ℕ → ℝ\nu_anti : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nF : ℕ → Set β := fun n => ⋃ (s : ↑b✝) (_ : Metric.Bounded ↑s ∧ diam ↑s ≤ u n), E s\nthis : range f = ⋂ (n : ℕ), F n\nb : ↑b✝\n⊢ MeasurableSet (E b)\n[PROOFSTEP]\nrefine' isClosed_closure.measurableSet.inter _\n[GOAL]\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\nβ : Type u_4\ninst✝³ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nf : γ → β\nf_cont : Continuous f\nf_inj : Injective f\nthis✝¹ : UpgradedPolishSpace γ := upgradePolishSpace γ\nb✝ : Set (Set γ)\nb_count : Set.Countable b✝\nb_nonempty : ¬∅ ∈ b✝\nhb : IsTopologicalBasis b✝\nthis✝ : Encodable ↑b✝\nA : Type u_3 := { p // Disjoint ↑p.fst ↑p.snd }\nq : A → Set β\nhq1 : ∀ (p : A), f '' ↑(↑p).fst ⊆ q p\nhq2 : ∀ (p : A), Disjoint (f '' ↑(↑p).snd) (q p)\nq_meas : ∀ (p : A), MeasurableSet (q p)\nE : ↑b✝ → Set β :=\n  fun s =>\n    closure (f '' ↑s) ∩\n      ⋂ (t : ↑b✝) (ht : Disjoint ↑s ↑t),\n        q { val := (s, t), property := ht } \\ q { val := (t, s), property := (_ : Disjoint ↑t ↑s) }\nu : ℕ → ℝ\nu_anti : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nF : ℕ → Set β := fun n => ⋃ (s : ↑b✝) (_ : Metric.Bounded ↑s ∧ diam ↑s ≤ u n), E s\nthis : range f = ⋂ (n : ℕ), F n\nb : ↑b✝\n⊢ MeasurableSet\n    (⋂ (t : ↑b✝) (ht : Disjoint ↑b ↑t),\n      q { val := (b, t), property := ht } \\ q { val := (t, b), property := (_ : Disjoint ↑t ↑b) })\n[PROOFSTEP]\nrefine' MeasurableSet.iInter fun s => _\n[GOAL]\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\nβ : Type u_4\ninst✝³ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nf : γ → β\nf_cont : Continuous f\nf_inj : Injective f\nthis✝¹ : UpgradedPolishSpace γ := upgradePolishSpace γ\nb✝ : Set (Set γ)\nb_count : Set.Countable b✝\nb_nonempty : ¬∅ ∈ b✝\nhb : IsTopologicalBasis b✝\nthis✝ : Encodable ↑b✝\nA : Type u_3 := { p // Disjoint ↑p.fst ↑p.snd }\nq : A → Set β\nhq1 : ∀ (p : A), f '' ↑(↑p).fst ⊆ q p\nhq2 : ∀ (p : A), Disjoint (f '' ↑(↑p).snd) (q p)\nq_meas : ∀ (p : A), MeasurableSet (q p)\nE : ↑b✝ → Set β :=\n  fun s =>\n    closure (f '' ↑s) ∩\n      ⋂ (t : ↑b✝) (ht : Disjoint ↑s ↑t),\n        q { val := (s, t), property := ht } \\ q { val := (t, s), property := (_ : Disjoint ↑t ↑s) }\nu : ℕ → ℝ\nu_anti : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nF : ℕ → Set β := fun n => ⋃ (s : ↑b✝) (_ : Metric.Bounded ↑s ∧ diam ↑s ≤ u n), E s\nthis : range f = ⋂ (n : ℕ), F n\nb s : ↑b✝\n⊢ MeasurableSet\n    (⋂ (ht : Disjoint ↑b ↑s),\n      q { val := (b, s), property := ht } \\ q { val := (s, b), property := (_ : Disjoint ↑s ↑b) })\n[PROOFSTEP]\nexact MeasurableSet.iInter fun hs => (q_meas _).diff (q_meas _)\n[GOAL]\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\nβ : Type u_4\ninst✝³ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nf : γ → β\nf_cont : Continuous f\nf_inj : Injective f\nthis✝¹ : UpgradedPolishSpace γ := upgradePolishSpace γ\nb : Set (Set γ)\nb_count : Set.Countable b\nb_nonempty : ¬∅ ∈ b\nhb : IsTopologicalBasis b\nthis✝ : Encodable ↑b\nA : Type u_3 := { p // Disjoint ↑p.fst ↑p.snd }\nq : A → Set β\nhq1 : ∀ (p : A), f '' ↑(↑p).fst ⊆ q p\nhq2 : ∀ (p : A), Disjoint (f '' ↑(↑p).snd) (q p)\nq_meas : ∀ (p : A), MeasurableSet (q p)\nE : ↑b → Set β :=\n  fun s =>\n    closure (f '' ↑s) ∩\n      ⋂ (t : ↑b) (ht : Disjoint ↑s ↑t),\n        q { val := (s, t), property := ht } \\ q { val := (t, s), property := (_ : Disjoint ↑t ↑s) }\nu : ℕ → ℝ\nu_anti : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nF : ℕ → Set β := fun n => ⋃ (s : ↑b) (_ : Metric.Bounded ↑s ∧ diam ↑s ≤ u n), E s\nthis : range f = ⋂ (n : ℕ), F n\nE_meas : ∀ (s : ↑b), MeasurableSet (E s)\n⊢ MeasurableSet (range f)\n[PROOFSTEP]\nhave F_meas : ∀ n, MeasurableSet (F n) := by\n  intro n\n  refine' MeasurableSet.iUnion fun s => _\n  exact MeasurableSet.iUnion fun _ => E_meas _\n[GOAL]\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\nβ : Type u_4\ninst✝³ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nf : γ → β\nf_cont : Continuous f\nf_inj : Injective f\nthis✝¹ : UpgradedPolishSpace γ := upgradePolishSpace γ\nb : Set (Set γ)\nb_count : Set.Countable b\nb_nonempty : ¬∅ ∈ b\nhb : IsTopologicalBasis b\nthis✝ : Encodable ↑b\nA : Type u_3 := { p // Disjoint ↑p.fst ↑p.snd }\nq : A → Set β\nhq1 : ∀ (p : A), f '' ↑(↑p).fst ⊆ q p\nhq2 : ∀ (p : A), Disjoint (f '' ↑(↑p).snd) (q p)\nq_meas : ∀ (p : A), MeasurableSet (q p)\nE : ↑b → Set β :=\n  fun s =>\n    closure (f '' ↑s) ∩\n      ⋂ (t : ↑b) (ht : Disjoint ↑s ↑t),\n        q { val := (s, t), property := ht } \\ q { val := (t, s), property := (_ : Disjoint ↑t ↑s) }\nu : ℕ → ℝ\nu_anti : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nF : ℕ → Set β := fun n => ⋃ (s : ↑b) (_ : Metric.Bounded ↑s ∧ diam ↑s ≤ u n), E s\nthis : range f = ⋂ (n : ℕ), F n\nE_meas : ∀ (s : ↑b), MeasurableSet (E s)\n⊢ ∀ (n : ℕ), MeasurableSet (F n)\n[PROOFSTEP]\nintro n\n[GOAL]\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\nβ : Type u_4\ninst✝³ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nf : γ → β\nf_cont : Continuous f\nf_inj : Injective f\nthis✝¹ : UpgradedPolishSpace γ := upgradePolishSpace γ\nb : Set (Set γ)\nb_count : Set.Countable b\nb_nonempty : ¬∅ ∈ b\nhb : IsTopologicalBasis b\nthis✝ : Encodable ↑b\nA : Type u_3 := { p // Disjoint ↑p.fst ↑p.snd }\nq : A → Set β\nhq1 : ∀ (p : A), f '' ↑(↑p).fst ⊆ q p\nhq2 : ∀ (p : A), Disjoint (f '' ↑(↑p).snd) (q p)\nq_meas : ∀ (p : A), MeasurableSet (q p)\nE : ↑b → Set β :=\n  fun s =>\n    closure (f '' ↑s) ∩\n      ⋂ (t : ↑b) (ht : Disjoint ↑s ↑t),\n        q { val := (s, t), property := ht } \\ q { val := (t, s), property := (_ : Disjoint ↑t ↑s) }\nu : ℕ → ℝ\nu_anti : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nF : ℕ → Set β := fun n => ⋃ (s : ↑b) (_ : Metric.Bounded ↑s ∧ diam ↑s ≤ u n), E s\nthis : range f = ⋂ (n : ℕ), F n\nE_meas : ∀ (s : ↑b), MeasurableSet (E s)\nn : ℕ\n⊢ MeasurableSet (F n)\n[PROOFSTEP]\nrefine' MeasurableSet.iUnion fun s => _\n[GOAL]\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\nβ : Type u_4\ninst✝³ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nf : γ → β\nf_cont : Continuous f\nf_inj : Injective f\nthis✝¹ : UpgradedPolishSpace γ := upgradePolishSpace γ\nb : Set (Set γ)\nb_count : Set.Countable b\nb_nonempty : ¬∅ ∈ b\nhb : IsTopologicalBasis b\nthis✝ : Encodable ↑b\nA : Type u_3 := { p // Disjoint ↑p.fst ↑p.snd }\nq : A → Set β\nhq1 : ∀ (p : A), f '' ↑(↑p).fst ⊆ q p\nhq2 : ∀ (p : A), Disjoint (f '' ↑(↑p).snd) (q p)\nq_meas : ∀ (p : A), MeasurableSet (q p)\nE : ↑b → Set β :=\n  fun s =>\n    closure (f '' ↑s) ∩\n      ⋂ (t : ↑b) (ht : Disjoint ↑s ↑t),\n        q { val := (s, t), property := ht } \\ q { val := (t, s), property := (_ : Disjoint ↑t ↑s) }\nu : ℕ → ℝ\nu_anti : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nF : ℕ → Set β := fun n => ⋃ (s : ↑b) (_ : Metric.Bounded ↑s ∧ diam ↑s ≤ u n), E s\nthis : range f = ⋂ (n : ℕ), F n\nE_meas : ∀ (s : ↑b), MeasurableSet (E s)\nn : ℕ\ns : ↑b\n⊢ MeasurableSet (⋃ (_ : Metric.Bounded ↑s ∧ diam ↑s ≤ u n), E s)\n[PROOFSTEP]\nexact MeasurableSet.iUnion fun _ => E_meas _\n[GOAL]\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\nβ : Type u_4\ninst✝³ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nf : γ → β\nf_cont : Continuous f\nf_inj : Injective f\nthis✝¹ : UpgradedPolishSpace γ := upgradePolishSpace γ\nb : Set (Set γ)\nb_count : Set.Countable b\nb_nonempty : ¬∅ ∈ b\nhb : IsTopologicalBasis b\nthis✝ : Encodable ↑b\nA : Type u_3 := { p // Disjoint ↑p.fst ↑p.snd }\nq : A → Set β\nhq1 : ∀ (p : A), f '' ↑(↑p).fst ⊆ q p\nhq2 : ∀ (p : A), Disjoint (f '' ↑(↑p).snd) (q p)\nq_meas : ∀ (p : A), MeasurableSet (q p)\nE : ↑b → Set β :=\n  fun s =>\n    closure (f '' ↑s) ∩\n      ⋂ (t : ↑b) (ht : Disjoint ↑s ↑t),\n        q { val := (s, t), property := ht } \\ q { val := (t, s), property := (_ : Disjoint ↑t ↑s) }\nu : ℕ → ℝ\nu_anti : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nF : ℕ → Set β := fun n => ⋃ (s : ↑b) (_ : Metric.Bounded ↑s ∧ diam ↑s ≤ u n), E s\nthis : range f = ⋂ (n : ℕ), F n\nE_meas : ∀ (s : ↑b), MeasurableSet (E s)\nF_meas : ∀ (n : ℕ), MeasurableSet (F n)\n⊢ MeasurableSet (range f)\n[PROOFSTEP]\nrw [this]\n[GOAL]\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\nβ : Type u_4\ninst✝³ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nf : γ → β\nf_cont : Continuous f\nf_inj : Injective f\nthis✝¹ : UpgradedPolishSpace γ := upgradePolishSpace γ\nb : Set (Set γ)\nb_count : Set.Countable b\nb_nonempty : ¬∅ ∈ b\nhb : IsTopologicalBasis b\nthis✝ : Encodable ↑b\nA : Type u_3 := { p // Disjoint ↑p.fst ↑p.snd }\nq : A → Set β\nhq1 : ∀ (p : A), f '' ↑(↑p).fst ⊆ q p\nhq2 : ∀ (p : A), Disjoint (f '' ↑(↑p).snd) (q p)\nq_meas : ∀ (p : A), MeasurableSet (q p)\nE : ↑b → Set β :=\n  fun s =>\n    closure (f '' ↑s) ∩\n      ⋂ (t : ↑b) (ht : Disjoint ↑s ↑t),\n        q { val := (s, t), property := ht } \\ q { val := (t, s), property := (_ : Disjoint ↑t ↑s) }\nu : ℕ → ℝ\nu_anti : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nF : ℕ → Set β := fun n => ⋃ (s : ↑b) (_ : Metric.Bounded ↑s ∧ diam ↑s ≤ u n), E s\nthis : range f = ⋂ (n : ℕ), F n\nE_meas : ∀ (s : ↑b), MeasurableSet (E s)\nF_meas : ∀ (n : ℕ), MeasurableSet (F n)\n⊢ MeasurableSet (⋂ (n : ℕ), F n)\n[PROOFSTEP]\nexact MeasurableSet.iInter fun n => F_meas n\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\nβ : Type u_4\ninst✝³ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nf : γ → β\nf_cont : Continuous f\nf_inj : Injective f\nthis✝ : UpgradedPolishSpace γ := upgradePolishSpace γ\nb : Set (Set γ)\nb_count : Set.Countable b\nb_nonempty : ¬∅ ∈ b\nhb : IsTopologicalBasis b\nthis : Encodable ↑b\nA : Type u_3 := { p // Disjoint ↑p.fst ↑p.snd }\nq : A → Set β\nhq1 : ∀ (p : A), f '' ↑(↑p).fst ⊆ q p\nhq2 : ∀ (p : A), Disjoint (f '' ↑(↑p).snd) (q p)\nq_meas : ∀ (p : A), MeasurableSet (q p)\nE : ↑b → Set β :=\n  fun s =>\n    closure (f '' ↑s) ∩\n      ⋂ (t : ↑b) (ht : Disjoint ↑s ↑t),\n        q { val := (s, t), property := ht } \\ q { val := (t, s), property := (_ : Disjoint ↑t ↑s) }\nu : ℕ → ℝ\nu_anti : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nF : ℕ → Set β := fun n => ⋃ (s : ↑b) (_ : Metric.Bounded ↑s ∧ diam ↑s ≤ u n), E s\n⊢ range f = ⋂ (n : ℕ), F n\n[PROOFSTEP]\napply Subset.antisymm\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.h₁\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\nβ : Type u_4\ninst✝³ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nf : γ → β\nf_cont : Continuous f\nf_inj : Injective f\nthis✝ : UpgradedPolishSpace γ := upgradePolishSpace γ\nb : Set (Set γ)\nb_count : Set.Countable b\nb_nonempty : ¬∅ ∈ b\nhb : IsTopologicalBasis b\nthis : Encodable ↑b\nA : Type u_3 := { p // Disjoint ↑p.fst ↑p.snd }\nq : A → Set β\nhq1 : ∀ (p : A), f '' ↑(↑p).fst ⊆ q p\nhq2 : ∀ (p : A), Disjoint (f '' ↑(↑p).snd) (q p)\nq_meas : ∀ (p : A), MeasurableSet (q p)\nE : ↑b → Set β :=\n  fun s =>\n    closure (f '' ↑s) ∩\n      ⋂ (t : ↑b) (ht : Disjoint ↑s ↑t),\n        q { val := (s, t), property := ht } \\ q { val := (t, s), property := (_ : Disjoint ↑t ↑s) }\nu : ℕ → ℝ\nu_anti : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nF : ℕ → Set β := fun n => ⋃ (s : ↑b) (_ : Metric.Bounded ↑s ∧ diam ↑s ≤ u n), E s\n⊢ range f ⊆ ⋂ (n : ℕ), F n\n[PROOFSTEP]\nrintro x ⟨y, rfl⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.h₁.intro\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\nβ : Type u_4\ninst✝³ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nf : γ → β\nf_cont : Continuous f\nf_inj : Injective f\nthis✝ : UpgradedPolishSpace γ := upgradePolishSpace γ\nb : Set (Set γ)\nb_count : Set.Countable b\nb_nonempty : ¬∅ ∈ b\nhb : IsTopologicalBasis b\nthis : Encodable ↑b\nA : Type u_3 := { p // Disjoint ↑p.fst ↑p.snd }\nq : A → Set β\nhq1 : ∀ (p : A), f '' ↑(↑p).fst ⊆ q p\nhq2 : ∀ (p : A), Disjoint (f '' ↑(↑p).snd) (q p)\nq_meas : ∀ (p : A), MeasurableSet (q p)\nE : ↑b → Set β :=\n  fun s =>\n    closure (f '' ↑s) ∩\n      ⋂ (t : ↑b) (ht : Disjoint ↑s ↑t),\n        q { val := (s, t), property := ht } \\ q { val := (t, s), property := (_ : Disjoint ↑t ↑s) }\nu : ℕ → ℝ\nu_anti : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nF : ℕ → Set β := fun n => ⋃ (s : ↑b) (_ : Metric.Bounded ↑s ∧ diam ↑s ≤ u n), E s\ny : γ\n⊢ f y ∈ ⋂ (n : ℕ), F n\n[PROOFSTEP]\nrefine mem_iInter.2 fun n => ?_\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.h₁.intro\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\nβ : Type u_4\ninst✝³ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nf : γ → β\nf_cont : Continuous f\nf_inj : Injective f\nthis✝ : UpgradedPolishSpace γ := upgradePolishSpace γ\nb : Set (Set γ)\nb_count : Set.Countable b\nb_nonempty : ¬∅ ∈ b\nhb : IsTopologicalBasis b\nthis : Encodable ↑b\nA : Type u_3 := { p // Disjoint ↑p.fst ↑p.snd }\nq : A → Set β\nhq1 : ∀ (p : A), f '' ↑(↑p).fst ⊆ q p\nhq2 : ∀ (p : A), Disjoint (f '' ↑(↑p).snd) (q p)\nq_meas : ∀ (p : A), MeasurableSet (q p)\nE : ↑b → Set β :=\n  fun s =>\n    closure (f '' ↑s) ∩\n      ⋂ (t : ↑b) (ht : Disjoint ↑s ↑t),\n        q { val := (s, t), property := ht } \\ q { val := (t, s), property := (_ : Disjoint ↑t ↑s) }\nu : ℕ → ℝ\nu_anti : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nF : ℕ → Set β := fun n => ⋃ (s : ↑b) (_ : Metric.Bounded ↑s ∧ diam ↑s ≤ u n), E s\ny : γ\nn : ℕ\n⊢ f y ∈ F n\n[PROOFSTEP]\nobtain ⟨s, sb, ys, hs⟩ : ∃ (s : Set γ), s ∈ b ∧ y ∈ s ∧ s ⊆ ball y (u n / 2) :=\n  by\n  apply hb.mem_nhds_iff.1\n  exact ball_mem_nhds _ (half_pos (u_pos n))\n[GOAL]\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\nβ : Type u_4\ninst✝³ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nf : γ → β\nf_cont : Continuous f\nf_inj : Injective f\nthis✝ : UpgradedPolishSpace γ := upgradePolishSpace γ\nb : Set (Set γ)\nb_count : Set.Countable b\nb_nonempty : ¬∅ ∈ b\nhb : IsTopologicalBasis b\nthis : Encodable ↑b\nA : Type u_3 := { p // Disjoint ↑p.fst ↑p.snd }\nq : A → Set β\nhq1 : ∀ (p : A), f '' ↑(↑p).fst ⊆ q p\nhq2 : ∀ (p : A), Disjoint (f '' ↑(↑p).snd) (q p)\nq_meas : ∀ (p : A), MeasurableSet (q p)\nE : ↑b → Set β :=\n  fun s =>\n    closure (f '' ↑s) ∩\n      ⋂ (t : ↑b) (ht : Disjoint ↑s ↑t),\n        q { val := (s, t), property := ht } \\ q { val := (t, s), property := (_ : Disjoint ↑t ↑s) }\nu : ℕ → ℝ\nu_anti : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nF : ℕ → Set β := fun n => ⋃ (s : ↑b) (_ : Metric.Bounded ↑s ∧ diam ↑s ≤ u n), E s\ny : γ\nn : ℕ\n⊢ ∃ s, s ∈ b ∧ y ∈ s ∧ s ⊆ ball y (u n / 2)\n[PROOFSTEP]\napply hb.mem_nhds_iff.1\n[GOAL]\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\nβ : Type u_4\ninst✝³ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nf : γ → β\nf_cont : Continuous f\nf_inj : Injective f\nthis✝ : UpgradedPolishSpace γ := upgradePolishSpace γ\nb : Set (Set γ)\nb_count : Set.Countable b\nb_nonempty : ¬∅ ∈ b\nhb : IsTopologicalBasis b\nthis : Encodable ↑b\nA : Type u_3 := { p // Disjoint ↑p.fst ↑p.snd }\nq : A → Set β\nhq1 : ∀ (p : A), f '' ↑(↑p).fst ⊆ q p\nhq2 : ∀ (p : A), Disjoint (f '' ↑(↑p).snd) (q p)\nq_meas : ∀ (p : A), MeasurableSet (q p)\nE : ↑b → Set β :=\n  fun s =>\n    closure (f '' ↑s) ∩\n      ⋂ (t : ↑b) (ht : Disjoint ↑s ↑t),\n        q { val := (s, t), property := ht } \\ q { val := (t, s), property := (_ : Disjoint ↑t ↑s) }\nu : ℕ → ℝ\nu_anti : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nF : ℕ → Set β := fun n => ⋃ (s : ↑b) (_ : Metric.Bounded ↑s ∧ diam ↑s ≤ u n), E s\ny : γ\nn : ℕ\n⊢ ball y (u n / 2) ∈ 𝓝 y\n[PROOFSTEP]\nexact ball_mem_nhds _ (half_pos (u_pos n))\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.h₁.intro.intro.intro.intro\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\nβ : Type u_4\ninst✝³ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nf : γ → β\nf_cont : Continuous f\nf_inj : Injective f\nthis✝ : UpgradedPolishSpace γ := upgradePolishSpace γ\nb : Set (Set γ)\nb_count : Set.Countable b\nb_nonempty : ¬∅ ∈ b\nhb : IsTopologicalBasis b\nthis : Encodable ↑b\nA : Type u_3 := { p // Disjoint ↑p.fst ↑p.snd }\nq : A → Set β\nhq1 : ∀ (p : A), f '' ↑(↑p).fst ⊆ q p\nhq2 : ∀ (p : A), Disjoint (f '' ↑(↑p).snd) (q p)\nq_meas : ∀ (p : A), MeasurableSet (q p)\nE : ↑b → Set β :=\n  fun s =>\n    closure (f '' ↑s) ∩\n      ⋂ (t : ↑b) (ht : Disjoint ↑s ↑t),\n        q { val := (s, t), property := ht } \\ q { val := (t, s), property := (_ : Disjoint ↑t ↑s) }\nu : ℕ → ℝ\nu_anti : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nF : ℕ → Set β := fun n => ⋃ (s : ↑b) (_ : Metric.Bounded ↑s ∧ diam ↑s ≤ u n), E s\ny : γ\nn : ℕ\ns : Set γ\nsb : s ∈ b\nys : y ∈ s\nhs : s ⊆ ball y (u n / 2)\n⊢ f y ∈ F n\n[PROOFSTEP]\nhave diam_s : diam s ≤ u n := by\n  apply (diam_mono hs bounded_ball).trans\n  convert diam_ball (x := y) (half_pos (u_pos n)).le\n  ring\n[GOAL]\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\nβ : Type u_4\ninst✝³ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nf : γ → β\nf_cont : Continuous f\nf_inj : Injective f\nthis✝ : UpgradedPolishSpace γ := upgradePolishSpace γ\nb : Set (Set γ)\nb_count : Set.Countable b\nb_nonempty : ¬∅ ∈ b\nhb : IsTopologicalBasis b\nthis : Encodable ↑b\nA : Type u_3 := { p // Disjoint ↑p.fst ↑p.snd }\nq : A → Set β\nhq1 : ∀ (p : A), f '' ↑(↑p).fst ⊆ q p\nhq2 : ∀ (p : A), Disjoint (f '' ↑(↑p).snd) (q p)\nq_meas : ∀ (p : A), MeasurableSet (q p)\nE : ↑b → Set β :=\n  fun s =>\n    closure (f '' ↑s) ∩\n      ⋂ (t : ↑b) (ht : Disjoint ↑s ↑t),\n        q { val := (s, t), property := ht } \\ q { val := (t, s), property := (_ : Disjoint ↑t ↑s) }\nu : ℕ → ℝ\nu_anti : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nF : ℕ → Set β := fun n => ⋃ (s : ↑b) (_ : Metric.Bounded ↑s ∧ diam ↑s ≤ u n), E s\ny : γ\nn : ℕ\ns : Set γ\nsb : s ∈ b\nys : y ∈ s\nhs : s ⊆ ball y (u n / 2)\n⊢ diam s ≤ u n\n[PROOFSTEP]\napply (diam_mono hs bounded_ball).trans\n[GOAL]\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\nβ : Type u_4\ninst✝³ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nf : γ → β\nf_cont : Continuous f\nf_inj : Injective f\nthis✝ : UpgradedPolishSpace γ := upgradePolishSpace γ\nb : Set (Set γ)\nb_count : Set.Countable b\nb_nonempty : ¬∅ ∈ b\nhb : IsTopologicalBasis b\nthis : Encodable ↑b\nA : Type u_3 := { p // Disjoint ↑p.fst ↑p.snd }\nq : A → Set β\nhq1 : ∀ (p : A), f '' ↑(↑p).fst ⊆ q p\nhq2 : ∀ (p : A), Disjoint (f '' ↑(↑p).snd) (q p)\nq_meas : ∀ (p : A), MeasurableSet (q p)\nE : ↑b → Set β :=\n  fun s =>\n    closure (f '' ↑s) ∩\n      ⋂ (t : ↑b) (ht : Disjoint ↑s ↑t),\n        q { val := (s, t), property := ht } \\ q { val := (t, s), property := (_ : Disjoint ↑t ↑s) }\nu : ℕ → ℝ\nu_anti : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nF : ℕ → Set β := fun n => ⋃ (s : ↑b) (_ : Metric.Bounded ↑s ∧ diam ↑s ≤ u n), E s\ny : γ\nn : ℕ\ns : Set γ\nsb : s ∈ b\nys : y ∈ s\nhs : s ⊆ ball y (u n / 2)\n⊢ diam (ball y (u n / 2)) ≤ u n\n[PROOFSTEP]\nconvert diam_ball (x := y) (half_pos (u_pos n)).le\n[GOAL]\ncase h.e'_4\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\nβ : Type u_4\ninst✝³ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nf : γ → β\nf_cont : Continuous f\nf_inj : Injective f\nthis✝ : UpgradedPolishSpace γ := upgradePolishSpace γ\nb : Set (Set γ)\nb_count : Set.Countable b\nb_nonempty : ¬∅ ∈ b\nhb : IsTopologicalBasis b\nthis : Encodable ↑b\nA : Type u_3 := { p // Disjoint ↑p.fst ↑p.snd }\nq : A → Set β\nhq1 : ∀ (p : A), f '' ↑(↑p).fst ⊆ q p\nhq2 : ∀ (p : A), Disjoint (f '' ↑(↑p).snd) (q p)\nq_meas : ∀ (p : A), MeasurableSet (q p)\nE : ↑b → Set β :=\n  fun s =>\n    closure (f '' ↑s) ∩\n      ⋂ (t : ↑b) (ht : Disjoint ↑s ↑t),\n        q { val := (s, t), property := ht } \\ q { val := (t, s), property := (_ : Disjoint ↑t ↑s) }\nu : ℕ → ℝ\nu_anti : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nF : ℕ → Set β := fun n => ⋃ (s : ↑b) (_ : Metric.Bounded ↑s ∧ diam ↑s ≤ u n), E s\ny : γ\nn : ℕ\ns : Set γ\nsb : s ∈ b\nys : y ∈ s\nhs : s ⊆ ball y (u n / 2)\n⊢ u n = 2 * (u n / 2)\n[PROOFSTEP]\nring\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.h₁.intro.intro.intro.intro\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\nβ : Type u_4\ninst✝³ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nf : γ → β\nf_cont : Continuous f\nf_inj : Injective f\nthis✝ : UpgradedPolishSpace γ := upgradePolishSpace γ\nb : Set (Set γ)\nb_count : Set.Countable b\nb_nonempty : ¬∅ ∈ b\nhb : IsTopologicalBasis b\nthis : Encodable ↑b\nA : Type u_3 := { p // Disjoint ↑p.fst ↑p.snd }\nq : A → Set β\nhq1 : ∀ (p : A), f '' ↑(↑p).fst ⊆ q p\nhq2 : ∀ (p : A), Disjoint (f '' ↑(↑p).snd) (q p)\nq_meas : ∀ (p : A), MeasurableSet (q p)\nE : ↑b → Set β :=\n  fun s =>\n    closure (f '' ↑s) ∩\n      ⋂ (t : ↑b) (ht : Disjoint ↑s ↑t),\n        q { val := (s, t), property := ht } \\ q { val := (t, s), property := (_ : Disjoint ↑t ↑s) }\nu : ℕ → ℝ\nu_anti : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nF : ℕ → Set β := fun n => ⋃ (s : ↑b) (_ : Metric.Bounded ↑s ∧ diam ↑s ≤ u n), E s\ny : γ\nn : ℕ\ns : Set γ\nsb : s ∈ b\nys : y ∈ s\nhs : s ⊆ ball y (u n / 2)\ndiam_s : diam s ≤ u n\n⊢ f y ∈ F n\n[PROOFSTEP]\nrefine' mem_iUnion.2 ⟨⟨s, sb⟩, _⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.h₁.intro.intro.intro.intro\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\nβ : Type u_4\ninst✝³ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nf : γ → β\nf_cont : Continuous f\nf_inj : Injective f\nthis✝ : UpgradedPolishSpace γ := upgradePolishSpace γ\nb : Set (Set γ)\nb_count : Set.Countable b\nb_nonempty : ¬∅ ∈ b\nhb : IsTopologicalBasis b\nthis : Encodable ↑b\nA : Type u_3 := { p // Disjoint ↑p.fst ↑p.snd }\nq : A → Set β\nhq1 : ∀ (p : A), f '' ↑(↑p).fst ⊆ q p\nhq2 : ∀ (p : A), Disjoint (f '' ↑(↑p).snd) (q p)\nq_meas : ∀ (p : A), MeasurableSet (q p)\nE : ↑b → Set β :=\n  fun s =>\n    closure (f '' ↑s) ∩\n      ⋂ (t : ↑b) (ht : Disjoint ↑s ↑t),\n        q { val := (s, t), property := ht } \\ q { val := (t, s), property := (_ : Disjoint ↑t ↑s) }\nu : ℕ → ℝ\nu_anti : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nF : ℕ → Set β := fun n => ⋃ (s : ↑b) (_ : Metric.Bounded ↑s ∧ diam ↑s ≤ u n), E s\ny : γ\nn : ℕ\ns : Set γ\nsb : s ∈ b\nys : y ∈ s\nhs : s ⊆ ball y (u n / 2)\ndiam_s : diam s ≤ u n\n⊢ f y ∈\n    ⋃ (_ : Metric.Bounded ↑{ val := s, property := sb } ∧ diam ↑{ val := s, property := sb } ≤ u n),\n      E { val := s, property := sb }\n[PROOFSTEP]\nrefine' mem_iUnion.2 ⟨⟨Metric.Bounded.mono hs bounded_ball, diam_s⟩, _⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.h₁.intro.intro.intro.intro\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\nβ : Type u_4\ninst✝³ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nf : γ → β\nf_cont : Continuous f\nf_inj : Injective f\nthis✝ : UpgradedPolishSpace γ := upgradePolishSpace γ\nb : Set (Set γ)\nb_count : Set.Countable b\nb_nonempty : ¬∅ ∈ b\nhb : IsTopologicalBasis b\nthis : Encodable ↑b\nA : Type u_3 := { p // Disjoint ↑p.fst ↑p.snd }\nq : A → Set β\nhq1 : ∀ (p : A), f '' ↑(↑p).fst ⊆ q p\nhq2 : ∀ (p : A), Disjoint (f '' ↑(↑p).snd) (q p)\nq_meas : ∀ (p : A), MeasurableSet (q p)\nE : ↑b → Set β :=\n  fun s =>\n    closure (f '' ↑s) ∩\n      ⋂ (t : ↑b) (ht : Disjoint ↑s ↑t),\n        q { val := (s, t), property := ht } \\ q { val := (t, s), property := (_ : Disjoint ↑t ↑s) }\nu : ℕ → ℝ\nu_anti : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nF : ℕ → Set β := fun n => ⋃ (s : ↑b) (_ : Metric.Bounded ↑s ∧ diam ↑s ≤ u n), E s\ny : γ\nn : ℕ\ns : Set γ\nsb : s ∈ b\nys : y ∈ s\nhs : s ⊆ ball y (u n / 2)\ndiam_s : diam s ≤ u n\n⊢ f y ∈ E { val := s, property := sb }\n[PROOFSTEP]\napply mem_inter (subset_closure (mem_image_of_mem _ ys))\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.h₁.intro.intro.intro.intro\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\nβ : Type u_4\ninst✝³ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nf : γ → β\nf_cont : Continuous f\nf_inj : Injective f\nthis✝ : UpgradedPolishSpace γ := upgradePolishSpace γ\nb : Set (Set γ)\nb_count : Set.Countable b\nb_nonempty : ¬∅ ∈ b\nhb : IsTopologicalBasis b\nthis : Encodable ↑b\nA : Type u_3 := { p // Disjoint ↑p.fst ↑p.snd }\nq : A → Set β\nhq1 : ∀ (p : A), f '' ↑(↑p).fst ⊆ q p\nhq2 : ∀ (p : A), Disjoint (f '' ↑(↑p).snd) (q p)\nq_meas : ∀ (p : A), MeasurableSet (q p)\nE : ↑b → Set β :=\n  fun s =>\n    closure (f '' ↑s) ∩\n      ⋂ (t : ↑b) (ht : Disjoint ↑s ↑t),\n        q { val := (s, t), property := ht } \\ q { val := (t, s), property := (_ : Disjoint ↑t ↑s) }\nu : ℕ → ℝ\nu_anti : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nF : ℕ → Set β := fun n => ⋃ (s : ↑b) (_ : Metric.Bounded ↑s ∧ diam ↑s ≤ u n), E s\ny : γ\nn : ℕ\ns : Set γ\nsb : s ∈ b\nys : y ∈ s\nhs : s ⊆ ball y (u n / 2)\ndiam_s : diam s ≤ u n\n⊢ f y ∈\n    ⋂ (t : ↑b) (ht : Disjoint ↑{ val := s, property := sb } ↑t),\n      q { val := ({ val := s, property := sb }, t), property := ht } \\\n        q { val := (t, { val := s, property := sb }), property := (_ : Disjoint ↑t ↑{ val := s, property := sb }) }\n[PROOFSTEP]\nrefine' mem_iInter.2 fun t => mem_iInter.2 fun ht => ⟨_, _⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.h₁.intro.intro.intro.intro.refine'_1\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\nβ : Type u_4\ninst✝³ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nf : γ → β\nf_cont : Continuous f\nf_inj : Injective f\nthis✝ : UpgradedPolishSpace γ := upgradePolishSpace γ\nb : Set (Set γ)\nb_count : Set.Countable b\nb_nonempty : ¬∅ ∈ b\nhb : IsTopologicalBasis b\nthis : Encodable ↑b\nA : Type u_3 := { p // Disjoint ↑p.fst ↑p.snd }\nq : A → Set β\nhq1 : ∀ (p : A), f '' ↑(↑p).fst ⊆ q p\nhq2 : ∀ (p : A), Disjoint (f '' ↑(↑p).snd) (q p)\nq_meas : ∀ (p : A), MeasurableSet (q p)\nE : ↑b → Set β :=\n  fun s =>\n    closure (f '' ↑s) ∩\n      ⋂ (t : ↑b) (ht : Disjoint ↑s ↑t),\n        q { val := (s, t), property := ht } \\ q { val := (t, s), property := (_ : Disjoint ↑t ↑s) }\nu : ℕ → ℝ\nu_anti : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nF : ℕ → Set β := fun n => ⋃ (s : ↑b) (_ : Metric.Bounded ↑s ∧ diam ↑s ≤ u n), E s\ny : γ\nn : ℕ\ns : Set γ\nsb : s ∈ b\nys : y ∈ s\nhs : s ⊆ ball y (u n / 2)\ndiam_s : diam s ≤ u n\nt : ↑b\nht : Disjoint ↑{ val := s, property := sb } ↑t\n⊢ f y ∈ q { val := ({ val := s, property := sb }, t), property := ht }\n[PROOFSTEP]\napply hq1\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.h₁.intro.intro.intro.intro.refine'_1.a\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\nβ : Type u_4\ninst✝³ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nf : γ → β\nf_cont : Continuous f\nf_inj : Injective f\nthis✝ : UpgradedPolishSpace γ := upgradePolishSpace γ\nb : Set (Set γ)\nb_count : Set.Countable b\nb_nonempty : ¬∅ ∈ b\nhb : IsTopologicalBasis b\nthis : Encodable ↑b\nA : Type u_3 := { p // Disjoint ↑p.fst ↑p.snd }\nq : A → Set β\nhq1 : ∀ (p : A), f '' ↑(↑p).fst ⊆ q p\nhq2 : ∀ (p : A), Disjoint (f '' ↑(↑p).snd) (q p)\nq_meas : ∀ (p : A), MeasurableSet (q p)\nE : ↑b → Set β :=\n  fun s =>\n    closure (f '' ↑s) ∩\n      ⋂ (t : ↑b) (ht : Disjoint ↑s ↑t),\n        q { val := (s, t), property := ht } \\ q { val := (t, s), property := (_ : Disjoint ↑t ↑s) }\nu : ℕ → ℝ\nu_anti : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nF : ℕ → Set β := fun n => ⋃ (s : ↑b) (_ : Metric.Bounded ↑s ∧ diam ↑s ≤ u n), E s\ny : γ\nn : ℕ\ns : Set γ\nsb : s ∈ b\nys : y ∈ s\nhs : s ⊆ ball y (u n / 2)\ndiam_s : diam s ≤ u n\nt : ↑b\nht : Disjoint ↑{ val := s, property := sb } ↑t\n⊢ f y ∈ f '' ↑(↑{ val := ({ val := s, property := sb }, t), property := ht }).fst\n[PROOFSTEP]\nexact mem_image_of_mem _ ys\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.h₁.intro.intro.intro.intro.refine'_2\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\nβ : Type u_4\ninst✝³ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nf : γ → β\nf_cont : Continuous f\nf_inj : Injective f\nthis✝ : UpgradedPolishSpace γ := upgradePolishSpace γ\nb : Set (Set γ)\nb_count : Set.Countable b\nb_nonempty : ¬∅ ∈ b\nhb : IsTopologicalBasis b\nthis : Encodable ↑b\nA : Type u_3 := { p // Disjoint ↑p.fst ↑p.snd }\nq : A → Set β\nhq1 : ∀ (p : A), f '' ↑(↑p).fst ⊆ q p\nhq2 : ∀ (p : A), Disjoint (f '' ↑(↑p).snd) (q p)\nq_meas : ∀ (p : A), MeasurableSet (q p)\nE : ↑b → Set β :=\n  fun s =>\n    closure (f '' ↑s) ∩\n      ⋂ (t : ↑b) (ht : Disjoint ↑s ↑t),\n        q { val := (s, t), property := ht } \\ q { val := (t, s), property := (_ : Disjoint ↑t ↑s) }\nu : ℕ → ℝ\nu_anti : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nF : ℕ → Set β := fun n => ⋃ (s : ↑b) (_ : Metric.Bounded ↑s ∧ diam ↑s ≤ u n), E s\ny : γ\nn : ℕ\ns : Set γ\nsb : s ∈ b\nys : y ∈ s\nhs : s ⊆ ball y (u n / 2)\ndiam_s : diam s ≤ u n\nt : ↑b\nht : Disjoint ↑{ val := s, property := sb } ↑t\n⊢ ¬f y ∈ q { val := (t, { val := s, property := sb }), property := (_ : Disjoint ↑t ↑{ val := s, property := sb }) }\n[PROOFSTEP]\napply disjoint_left.1 (hq2 ⟨(t, ⟨s, sb⟩), ht.symm⟩)\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.h₁.intro.intro.intro.intro.refine'_2.a\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\nβ : Type u_4\ninst✝³ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nf : γ → β\nf_cont : Continuous f\nf_inj : Injective f\nthis✝ : UpgradedPolishSpace γ := upgradePolishSpace γ\nb : Set (Set γ)\nb_count : Set.Countable b\nb_nonempty : ¬∅ ∈ b\nhb : IsTopologicalBasis b\nthis : Encodable ↑b\nA : Type u_3 := { p // Disjoint ↑p.fst ↑p.snd }\nq : A → Set β\nhq1 : ∀ (p : A), f '' ↑(↑p).fst ⊆ q p\nhq2 : ∀ (p : A), Disjoint (f '' ↑(↑p).snd) (q p)\nq_meas : ∀ (p : A), MeasurableSet (q p)\nE : ↑b → Set β :=\n  fun s =>\n    closure (f '' ↑s) ∩\n      ⋂ (t : ↑b) (ht : Disjoint ↑s ↑t),\n        q { val := (s, t), property := ht } \\ q { val := (t, s), property := (_ : Disjoint ↑t ↑s) }\nu : ℕ → ℝ\nu_anti : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nF : ℕ → Set β := fun n => ⋃ (s : ↑b) (_ : Metric.Bounded ↑s ∧ diam ↑s ≤ u n), E s\ny : γ\nn : ℕ\ns : Set γ\nsb : s ∈ b\nys : y ∈ s\nhs : s ⊆ ball y (u n / 2)\ndiam_s : diam s ≤ u n\nt : ↑b\nht : Disjoint ↑{ val := s, property := sb } ↑t\n⊢ f y ∈\n    f ''\n      ↑(↑{ val := (t, { val := s, property := sb }), property := (_ : Disjoint ↑t ↑{ val := s, property := sb }) }).snd\n[PROOFSTEP]\nexact mem_image_of_mem _ ys\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.h₂\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\nβ : Type u_4\ninst✝³ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nf : γ → β\nf_cont : Continuous f\nf_inj : Injective f\nthis✝ : UpgradedPolishSpace γ := upgradePolishSpace γ\nb : Set (Set γ)\nb_count : Set.Countable b\nb_nonempty : ¬∅ ∈ b\nhb : IsTopologicalBasis b\nthis : Encodable ↑b\nA : Type u_3 := { p // Disjoint ↑p.fst ↑p.snd }\nq : A → Set β\nhq1 : ∀ (p : A), f '' ↑(↑p).fst ⊆ q p\nhq2 : ∀ (p : A), Disjoint (f '' ↑(↑p).snd) (q p)\nq_meas : ∀ (p : A), MeasurableSet (q p)\nE : ↑b → Set β :=\n  fun s =>\n    closure (f '' ↑s) ∩\n      ⋂ (t : ↑b) (ht : Disjoint ↑s ↑t),\n        q { val := (s, t), property := ht } \\ q { val := (t, s), property := (_ : Disjoint ↑t ↑s) }\nu : ℕ → ℝ\nu_anti : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nF : ℕ → Set β := fun n => ⋃ (s : ↑b) (_ : Metric.Bounded ↑s ∧ diam ↑s ≤ u n), E s\n⊢ ⋂ (n : ℕ), F n ⊆ range f\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.h₂\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\nβ : Type u_4\ninst✝³ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nf : γ → β\nf_cont : Continuous f\nf_inj : Injective f\nthis✝ : UpgradedPolishSpace γ := upgradePolishSpace γ\nb : Set (Set γ)\nb_count : Set.Countable b\nb_nonempty : ¬∅ ∈ b\nhb : IsTopologicalBasis b\nthis : Encodable ↑b\nA : Type u_3 := { p // Disjoint ↑p.fst ↑p.snd }\nq : A → Set β\nhq1 : ∀ (p : A), f '' ↑(↑p).fst ⊆ q p\nhq2 : ∀ (p : A), Disjoint (f '' ↑(↑p).snd) (q p)\nq_meas : ∀ (p : A), MeasurableSet (q p)\nE : ↑b → Set β :=\n  fun s =>\n    closure (f '' ↑s) ∩\n      ⋂ (t : ↑b) (ht : Disjoint ↑s ↑t),\n        q { val := (s, t), property := ht } \\ q { val := (t, s), property := (_ : Disjoint ↑t ↑s) }\nu : ℕ → ℝ\nu_anti : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nF : ℕ → Set β := fun n => ⋃ (s : ↑b) (_ : Metric.Bounded ↑s ∧ diam ↑s ≤ u n), E s\nx : β\nhx : x ∈ ⋂ (n : ℕ), F n\n⊢ x ∈ range f\n[PROOFSTEP]\nhave C1 : ∀ n, ∃ (s : b) (_ : Bounded s.1 ∧ diam s.1 ≤ u n), x ∈ E s := fun n => by\n  simpa only [mem_iUnion] using mem_iInter.1 hx n\n[GOAL]\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\nβ : Type u_4\ninst✝³ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nf : γ → β\nf_cont : Continuous f\nf_inj : Injective f\nthis✝ : UpgradedPolishSpace γ := upgradePolishSpace γ\nb : Set (Set γ)\nb_count : Set.Countable b\nb_nonempty : ¬∅ ∈ b\nhb : IsTopologicalBasis b\nthis : Encodable ↑b\nA : Type u_3 := { p // Disjoint ↑p.fst ↑p.snd }\nq : A → Set β\nhq1 : ∀ (p : A), f '' ↑(↑p).fst ⊆ q p\nhq2 : ∀ (p : A), Disjoint (f '' ↑(↑p).snd) (q p)\nq_meas : ∀ (p : A), MeasurableSet (q p)\nE : ↑b → Set β :=\n  fun s =>\n    closure (f '' ↑s) ∩\n      ⋂ (t : ↑b) (ht : Disjoint ↑s ↑t),\n        q { val := (s, t), property := ht } \\ q { val := (t, s), property := (_ : Disjoint ↑t ↑s) }\nu : ℕ → ℝ\nu_anti : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nF : ℕ → Set β := fun n => ⋃ (s : ↑b) (_ : Metric.Bounded ↑s ∧ diam ↑s ≤ u n), E s\nx : β\nhx : x ∈ ⋂ (n : ℕ), F n\nn : ℕ\n⊢ ∃ s x_1, x ∈ E s\n[PROOFSTEP]\nsimpa only [mem_iUnion] using mem_iInter.1 hx n\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.h₂\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\nβ : Type u_4\ninst✝³ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nf : γ → β\nf_cont : Continuous f\nf_inj : Injective f\nthis✝ : UpgradedPolishSpace γ := upgradePolishSpace γ\nb : Set (Set γ)\nb_count : Set.Countable b\nb_nonempty : ¬∅ ∈ b\nhb : IsTopologicalBasis b\nthis : Encodable ↑b\nA : Type u_3 := { p // Disjoint ↑p.fst ↑p.snd }\nq : A → Set β\nhq1 : ∀ (p : A), f '' ↑(↑p).fst ⊆ q p\nhq2 : ∀ (p : A), Disjoint (f '' ↑(↑p).snd) (q p)\nq_meas : ∀ (p : A), MeasurableSet (q p)\nE : ↑b → Set β :=\n  fun s =>\n    closure (f '' ↑s) ∩\n      ⋂ (t : ↑b) (ht : Disjoint ↑s ↑t),\n        q { val := (s, t), property := ht } \\ q { val := (t, s), property := (_ : Disjoint ↑t ↑s) }\nu : ℕ → ℝ\nu_anti : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nF : ℕ → Set β := fun n => ⋃ (s : ↑b) (_ : Metric.Bounded ↑s ∧ diam ↑s ≤ u n), E s\nx : β\nhx : x ∈ ⋂ (n : ℕ), F n\nC1 : ∀ (n : ℕ), ∃ s x_1, x ∈ E s\n⊢ x ∈ range f\n[PROOFSTEP]\nchoose s hs hxs using C1\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.h₂\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\nβ : Type u_4\ninst✝³ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nf : γ → β\nf_cont : Continuous f\nf_inj : Injective f\nthis✝ : UpgradedPolishSpace γ := upgradePolishSpace γ\nb : Set (Set γ)\nb_count : Set.Countable b\nb_nonempty : ¬∅ ∈ b\nhb : IsTopologicalBasis b\nthis : Encodable ↑b\nA : Type u_3 := { p // Disjoint ↑p.fst ↑p.snd }\nq : A → Set β\nhq1 : ∀ (p : A), f '' ↑(↑p).fst ⊆ q p\nhq2 : ∀ (p : A), Disjoint (f '' ↑(↑p).snd) (q p)\nq_meas : ∀ (p : A), MeasurableSet (q p)\nE : ↑b → Set β :=\n  fun s =>\n    closure (f '' ↑s) ∩\n      ⋂ (t : ↑b) (ht : Disjoint ↑s ↑t),\n        q { val := (s, t), property := ht } \\ q { val := (t, s), property := (_ : Disjoint ↑t ↑s) }\nu : ℕ → ℝ\nu_anti : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nF : ℕ → Set β := fun n => ⋃ (s : ↑b) (_ : Metric.Bounded ↑s ∧ diam ↑s ≤ u n), E s\nx : β\nhx : x ∈ ⋂ (n : ℕ), F n\ns : ℕ → ↑b\nhs : ∀ (n : ℕ), Metric.Bounded ↑(s n) ∧ diam ↑(s n) ≤ u n\nhxs : ∀ (n : ℕ), x ∈ E (s n)\n⊢ x ∈ range f\n[PROOFSTEP]\nhave C2 : ∀ n, (s n).1.Nonempty := by\n  intro n\n  rw [nonempty_iff_ne_empty]\n  intro hn\n  have := (s n).2\n  rw [hn] at this \n  exact b_nonempty this\n[GOAL]\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\nβ : Type u_4\ninst✝³ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nf : γ → β\nf_cont : Continuous f\nf_inj : Injective f\nthis✝ : UpgradedPolishSpace γ := upgradePolishSpace γ\nb : Set (Set γ)\nb_count : Set.Countable b\nb_nonempty : ¬∅ ∈ b\nhb : IsTopologicalBasis b\nthis : Encodable ↑b\nA : Type u_3 := { p // Disjoint ↑p.fst ↑p.snd }\nq : A → Set β\nhq1 : ∀ (p : A), f '' ↑(↑p).fst ⊆ q p\nhq2 : ∀ (p : A), Disjoint (f '' ↑(↑p).snd) (q p)\nq_meas : ∀ (p : A), MeasurableSet (q p)\nE : ↑b → Set β :=\n  fun s =>\n    closure (f '' ↑s) ∩\n      ⋂ (t : ↑b) (ht : Disjoint ↑s ↑t),\n        q { val := (s, t), property := ht } \\ q { val := (t, s), property := (_ : Disjoint ↑t ↑s) }\nu : ℕ → ℝ\nu_anti : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nF : ℕ → Set β := fun n => ⋃ (s : ↑b) (_ : Metric.Bounded ↑s ∧ diam ↑s ≤ u n), E s\nx : β\nhx : x ∈ ⋂ (n : ℕ), F n\ns : ℕ → ↑b\nhs : ∀ (n : ℕ), Metric.Bounded ↑(s n) ∧ diam ↑(s n) ≤ u n\nhxs : ∀ (n : ℕ), x ∈ E (s n)\n⊢ ∀ (n : ℕ), Set.Nonempty ↑(s n)\n[PROOFSTEP]\nintro n\n[GOAL]\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\nβ : Type u_4\ninst✝³ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nf : γ → β\nf_cont : Continuous f\nf_inj : Injective f\nthis✝ : UpgradedPolishSpace γ := upgradePolishSpace γ\nb : Set (Set γ)\nb_count : Set.Countable b\nb_nonempty : ¬∅ ∈ b\nhb : IsTopologicalBasis b\nthis : Encodable ↑b\nA : Type u_3 := { p // Disjoint ↑p.fst ↑p.snd }\nq : A → Set β\nhq1 : ∀ (p : A), f '' ↑(↑p).fst ⊆ q p\nhq2 : ∀ (p : A), Disjoint (f '' ↑(↑p).snd) (q p)\nq_meas : ∀ (p : A), MeasurableSet (q p)\nE : ↑b → Set β :=\n  fun s =>\n    closure (f '' ↑s) ∩\n      ⋂ (t : ↑b) (ht : Disjoint ↑s ↑t),\n        q { val := (s, t), property := ht } \\ q { val := (t, s), property := (_ : Disjoint ↑t ↑s) }\nu : ℕ → ℝ\nu_anti : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nF : ℕ → Set β := fun n => ⋃ (s : ↑b) (_ : Metric.Bounded ↑s ∧ diam ↑s ≤ u n), E s\nx : β\nhx : x ∈ ⋂ (n : ℕ), F n\ns : ℕ → ↑b\nhs : ∀ (n : ℕ), Metric.Bounded ↑(s n) ∧ diam ↑(s n) ≤ u n\nhxs : ∀ (n : ℕ), x ∈ E (s n)\nn : ℕ\n⊢ Set.Nonempty ↑(s n)\n[PROOFSTEP]\nrw [nonempty_iff_ne_empty]\n[GOAL]\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\nβ : Type u_4\ninst✝³ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nf : γ → β\nf_cont : Continuous f\nf_inj : Injective f\nthis✝ : UpgradedPolishSpace γ := upgradePolishSpace γ\nb : Set (Set γ)\nb_count : Set.Countable b\nb_nonempty : ¬∅ ∈ b\nhb : IsTopologicalBasis b\nthis : Encodable ↑b\nA : Type u_3 := { p // Disjoint ↑p.fst ↑p.snd }\nq : A → Set β\nhq1 : ∀ (p : A), f '' ↑(↑p).fst ⊆ q p\nhq2 : ∀ (p : A), Disjoint (f '' ↑(↑p).snd) (q p)\nq_meas : ∀ (p : A), MeasurableSet (q p)\nE : ↑b → Set β :=\n  fun s =>\n    closure (f '' ↑s) ∩\n      ⋂ (t : ↑b) (ht : Disjoint ↑s ↑t),\n        q { val := (s, t), property := ht } \\ q { val := (t, s), property := (_ : Disjoint ↑t ↑s) }\nu : ℕ → ℝ\nu_anti : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nF : ℕ → Set β := fun n => ⋃ (s : ↑b) (_ : Metric.Bounded ↑s ∧ diam ↑s ≤ u n), E s\nx : β\nhx : x ∈ ⋂ (n : ℕ), F n\ns : ℕ → ↑b\nhs : ∀ (n : ℕ), Metric.Bounded ↑(s n) ∧ diam ↑(s n) ≤ u n\nhxs : ∀ (n : ℕ), x ∈ E (s n)\nn : ℕ\n⊢ ↑(s n) ≠ ∅\n[PROOFSTEP]\nintro hn\n[GOAL]\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\nβ : Type u_4\ninst✝³ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nf : γ → β\nf_cont : Continuous f\nf_inj : Injective f\nthis✝ : UpgradedPolishSpace γ := upgradePolishSpace γ\nb : Set (Set γ)\nb_count : Set.Countable b\nb_nonempty : ¬∅ ∈ b\nhb : IsTopologicalBasis b\nthis : Encodable ↑b\nA : Type u_3 := { p // Disjoint ↑p.fst ↑p.snd }\nq : A → Set β\nhq1 : ∀ (p : A), f '' ↑(↑p).fst ⊆ q p\nhq2 : ∀ (p : A), Disjoint (f '' ↑(↑p).snd) (q p)\nq_meas : ∀ (p : A), MeasurableSet (q p)\nE : ↑b → Set β :=\n  fun s =>\n    closure (f '' ↑s) ∩\n      ⋂ (t : ↑b) (ht : Disjoint ↑s ↑t),\n        q { val := (s, t), property := ht } \\ q { val := (t, s), property := (_ : Disjoint ↑t ↑s) }\nu : ℕ → ℝ\nu_anti : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nF : ℕ → Set β := fun n => ⋃ (s : ↑b) (_ : Metric.Bounded ↑s ∧ diam ↑s ≤ u n), E s\nx : β\nhx : x ∈ ⋂ (n : ℕ), F n\ns : ℕ → ↑b\nhs : ∀ (n : ℕ), Metric.Bounded ↑(s n) ∧ diam ↑(s n) ≤ u n\nhxs : ∀ (n : ℕ), x ∈ E (s n)\nn : ℕ\nhn : ↑(s n) = ∅\n⊢ False\n[PROOFSTEP]\nhave := (s n).2\n[GOAL]\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\nβ : Type u_4\ninst✝³ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nf : γ → β\nf_cont : Continuous f\nf_inj : Injective f\nthis✝¹ : UpgradedPolishSpace γ := upgradePolishSpace γ\nb : Set (Set γ)\nb_count : Set.Countable b\nb_nonempty : ¬∅ ∈ b\nhb : IsTopologicalBasis b\nthis✝ : Encodable ↑b\nA : Type u_3 := { p // Disjoint ↑p.fst ↑p.snd }\nq : A → Set β\nhq1 : ∀ (p : A), f '' ↑(↑p).fst ⊆ q p\nhq2 : ∀ (p : A), Disjoint (f '' ↑(↑p).snd) (q p)\nq_meas : ∀ (p : A), MeasurableSet (q p)\nE : ↑b → Set β :=\n  fun s =>\n    closure (f '' ↑s) ∩\n      ⋂ (t : ↑b) (ht : Disjoint ↑s ↑t),\n        q { val := (s, t), property := ht } \\ q { val := (t, s), property := (_ : Disjoint ↑t ↑s) }\nu : ℕ → ℝ\nu_anti : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nF : ℕ → Set β := fun n => ⋃ (s : ↑b) (_ : Metric.Bounded ↑s ∧ diam ↑s ≤ u n), E s\nx : β\nhx : x ∈ ⋂ (n : ℕ), F n\ns : ℕ → ↑b\nhs : ∀ (n : ℕ), Metric.Bounded ↑(s n) ∧ diam ↑(s n) ≤ u n\nhxs : ∀ (n : ℕ), x ∈ E (s n)\nn : ℕ\nhn : ↑(s n) = ∅\nthis : ↑(s n) ∈ b\n⊢ False\n[PROOFSTEP]\nrw [hn] at this \n[GOAL]\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\nβ : Type u_4\ninst✝³ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nf : γ → β\nf_cont : Continuous f\nf_inj : Injective f\nthis✝¹ : UpgradedPolishSpace γ := upgradePolishSpace γ\nb : Set (Set γ)\nb_count : Set.Countable b\nb_nonempty : ¬∅ ∈ b\nhb : IsTopologicalBasis b\nthis✝ : Encodable ↑b\nA : Type u_3 := { p // Disjoint ↑p.fst ↑p.snd }\nq : A → Set β\nhq1 : ∀ (p : A), f '' ↑(↑p).fst ⊆ q p\nhq2 : ∀ (p : A), Disjoint (f '' ↑(↑p).snd) (q p)\nq_meas : ∀ (p : A), MeasurableSet (q p)\nE : ↑b → Set β :=\n  fun s =>\n    closure (f '' ↑s) ∩\n      ⋂ (t : ↑b) (ht : Disjoint ↑s ↑t),\n        q { val := (s, t), property := ht } \\ q { val := (t, s), property := (_ : Disjoint ↑t ↑s) }\nu : ℕ → ℝ\nu_anti : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nF : ℕ → Set β := fun n => ⋃ (s : ↑b) (_ : Metric.Bounded ↑s ∧ diam ↑s ≤ u n), E s\nx : β\nhx : x ∈ ⋂ (n : ℕ), F n\ns : ℕ → ↑b\nhs : ∀ (n : ℕ), Metric.Bounded ↑(s n) ∧ diam ↑(s n) ≤ u n\nhxs : ∀ (n : ℕ), x ∈ E (s n)\nn : ℕ\nhn : ↑(s n) = ∅\nthis : ∅ ∈ b\n⊢ False\n[PROOFSTEP]\nexact b_nonempty this\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.h₂\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\nβ : Type u_4\ninst✝³ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nf : γ → β\nf_cont : Continuous f\nf_inj : Injective f\nthis✝ : UpgradedPolishSpace γ := upgradePolishSpace γ\nb : Set (Set γ)\nb_count : Set.Countable b\nb_nonempty : ¬∅ ∈ b\nhb : IsTopologicalBasis b\nthis : Encodable ↑b\nA : Type u_3 := { p // Disjoint ↑p.fst ↑p.snd }\nq : A → Set β\nhq1 : ∀ (p : A), f '' ↑(↑p).fst ⊆ q p\nhq2 : ∀ (p : A), Disjoint (f '' ↑(↑p).snd) (q p)\nq_meas : ∀ (p : A), MeasurableSet (q p)\nE : ↑b → Set β :=\n  fun s =>\n    closure (f '' ↑s) ∩\n      ⋂ (t : ↑b) (ht : Disjoint ↑s ↑t),\n        q { val := (s, t), property := ht } \\ q { val := (t, s), property := (_ : Disjoint ↑t ↑s) }\nu : ℕ → ℝ\nu_anti : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nF : ℕ → Set β := fun n => ⋃ (s : ↑b) (_ : Metric.Bounded ↑s ∧ diam ↑s ≤ u n), E s\nx : β\nhx : x ∈ ⋂ (n : ℕ), F n\ns : ℕ → ↑b\nhs : ∀ (n : ℕ), Metric.Bounded ↑(s n) ∧ diam ↑(s n) ≤ u n\nhxs : ∀ (n : ℕ), x ∈ E (s n)\nC2 : ∀ (n : ℕ), Set.Nonempty ↑(s n)\n⊢ x ∈ range f\n[PROOFSTEP]\nchoose y hy using C2\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.h₂\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\nβ : Type u_4\ninst✝³ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nf : γ → β\nf_cont : Continuous f\nf_inj : Injective f\nthis✝ : UpgradedPolishSpace γ := upgradePolishSpace γ\nb : Set (Set γ)\nb_count : Set.Countable b\nb_nonempty : ¬∅ ∈ b\nhb : IsTopologicalBasis b\nthis : Encodable ↑b\nA : Type u_3 := { p // Disjoint ↑p.fst ↑p.snd }\nq : A → Set β\nhq1 : ∀ (p : A), f '' ↑(↑p).fst ⊆ q p\nhq2 : ∀ (p : A), Disjoint (f '' ↑(↑p).snd) (q p)\nq_meas : ∀ (p : A), MeasurableSet (q p)\nE : ↑b → Set β :=\n  fun s =>\n    closure (f '' ↑s) ∩\n      ⋂ (t : ↑b) (ht : Disjoint ↑s ↑t),\n        q { val := (s, t), property := ht } \\ q { val := (t, s), property := (_ : Disjoint ↑t ↑s) }\nu : ℕ → ℝ\nu_anti : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nF : ℕ → Set β := fun n => ⋃ (s : ↑b) (_ : Metric.Bounded ↑s ∧ diam ↑s ≤ u n), E s\nx : β\nhx : x ∈ ⋂ (n : ℕ), F n\ns : ℕ → ↑b\nhs : ∀ (n : ℕ), Metric.Bounded ↑(s n) ∧ diam ↑(s n) ≤ u n\nhxs : ∀ (n : ℕ), x ∈ E (s n)\ny : ℕ → γ\nhy : ∀ (n : ℕ), y n ∈ ↑(s n)\n⊢ x ∈ range f\n[PROOFSTEP]\nhave I : ∀ m n, ((s m).1 ∩ (s n).1).Nonempty := by\n  intro m n\n  rw [← not_disjoint_iff_nonempty_inter]\n  by_contra' h\n  have A : x ∈ q ⟨(s m, s n), h⟩ \\ q ⟨(s n, s m), h.symm⟩ :=\n    haveI := mem_iInter.1 (hxs m).2 (s n)\n    (mem_iInter.1 this h : _)\n  have B : x ∈ q ⟨(s n, s m), h.symm⟩ \\ q ⟨(s m, s n), h⟩ :=\n    haveI := mem_iInter.1 (hxs n).2 (s m)\n    (mem_iInter.1 this h.symm : _)\n  exact\n    A.2\n      B.1\n        -- the points `y n` are nearby, and therefore they form a Cauchy sequence.\n[GOAL]\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\nβ : Type u_4\ninst✝³ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nf : γ → β\nf_cont : Continuous f\nf_inj : Injective f\nthis✝ : UpgradedPolishSpace γ := upgradePolishSpace γ\nb : Set (Set γ)\nb_count : Set.Countable b\nb_nonempty : ¬∅ ∈ b\nhb : IsTopologicalBasis b\nthis : Encodable ↑b\nA : Type u_3 := { p // Disjoint ↑p.fst ↑p.snd }\nq : A → Set β\nhq1 : ∀ (p : A), f '' ↑(↑p).fst ⊆ q p\nhq2 : ∀ (p : A), Disjoint (f '' ↑(↑p).snd) (q p)\nq_meas : ∀ (p : A), MeasurableSet (q p)\nE : ↑b → Set β :=\n  fun s =>\n    closure (f '' ↑s) ∩\n      ⋂ (t : ↑b) (ht : Disjoint ↑s ↑t),\n        q { val := (s, t), property := ht } \\ q { val := (t, s), property := (_ : Disjoint ↑t ↑s) }\nu : ℕ → ℝ\nu_anti : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nF : ℕ → Set β := fun n => ⋃ (s : ↑b) (_ : Metric.Bounded ↑s ∧ diam ↑s ≤ u n), E s\nx : β\nhx : x ∈ ⋂ (n : ℕ), F n\ns : ℕ → ↑b\nhs : ∀ (n : ℕ), Metric.Bounded ↑(s n) ∧ diam ↑(s n) ≤ u n\nhxs : ∀ (n : ℕ), x ∈ E (s n)\ny : ℕ → γ\nhy : ∀ (n : ℕ), y n ∈ ↑(s n)\n⊢ ∀ (m n : ℕ), Set.Nonempty (↑(s m) ∩ ↑(s n))\n[PROOFSTEP]\nintro m n\n[GOAL]\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\nβ : Type u_4\ninst✝³ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nf : γ → β\nf_cont : Continuous f\nf_inj : Injective f\nthis✝ : UpgradedPolishSpace γ := upgradePolishSpace γ\nb : Set (Set γ)\nb_count : Set.Countable b\nb_nonempty : ¬∅ ∈ b\nhb : IsTopologicalBasis b\nthis : Encodable ↑b\nA : Type u_3 := { p // Disjoint ↑p.fst ↑p.snd }\nq : A → Set β\nhq1 : ∀ (p : A), f '' ↑(↑p).fst ⊆ q p\nhq2 : ∀ (p : A), Disjoint (f '' ↑(↑p).snd) (q p)\nq_meas : ∀ (p : A), MeasurableSet (q p)\nE : ↑b → Set β :=\n  fun s =>\n    closure (f '' ↑s) ∩\n      ⋂ (t : ↑b) (ht : Disjoint ↑s ↑t),\n        q { val := (s, t), property := ht } \\ q { val := (t, s), property := (_ : Disjoint ↑t ↑s) }\nu : ℕ → ℝ\nu_anti : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nF : ℕ → Set β := fun n => ⋃ (s : ↑b) (_ : Metric.Bounded ↑s ∧ diam ↑s ≤ u n), E s\nx : β\nhx : x ∈ ⋂ (n : ℕ), F n\ns : ℕ → ↑b\nhs : ∀ (n : ℕ), Metric.Bounded ↑(s n) ∧ diam ↑(s n) ≤ u n\nhxs : ∀ (n : ℕ), x ∈ E (s n)\ny : ℕ → γ\nhy : ∀ (n : ℕ), y n ∈ ↑(s n)\nm n : ℕ\n⊢ Set.Nonempty (↑(s m) ∩ ↑(s n))\n[PROOFSTEP]\nrw [← not_disjoint_iff_nonempty_inter]\n[GOAL]\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\nβ : Type u_4\ninst✝³ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nf : γ → β\nf_cont : Continuous f\nf_inj : Injective f\nthis✝ : UpgradedPolishSpace γ := upgradePolishSpace γ\nb : Set (Set γ)\nb_count : Set.Countable b\nb_nonempty : ¬∅ ∈ b\nhb : IsTopologicalBasis b\nthis : Encodable ↑b\nA : Type u_3 := { p // Disjoint ↑p.fst ↑p.snd }\nq : A → Set β\nhq1 : ∀ (p : A), f '' ↑(↑p).fst ⊆ q p\nhq2 : ∀ (p : A), Disjoint (f '' ↑(↑p).snd) (q p)\nq_meas : ∀ (p : A), MeasurableSet (q p)\nE : ↑b → Set β :=\n  fun s =>\n    closure (f '' ↑s) ∩\n      ⋂ (t : ↑b) (ht : Disjoint ↑s ↑t),\n        q { val := (s, t), property := ht } \\ q { val := (t, s), property := (_ : Disjoint ↑t ↑s) }\nu : ℕ → ℝ\nu_anti : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nF : ℕ → Set β := fun n => ⋃ (s : ↑b) (_ : Metric.Bounded ↑s ∧ diam ↑s ≤ u n), E s\nx : β\nhx : x ∈ ⋂ (n : ℕ), F n\ns : ℕ → ↑b\nhs : ∀ (n : ℕ), Metric.Bounded ↑(s n) ∧ diam ↑(s n) ≤ u n\nhxs : ∀ (n : ℕ), x ∈ E (s n)\ny : ℕ → γ\nhy : ∀ (n : ℕ), y n ∈ ↑(s n)\nm n : ℕ\n⊢ ¬Disjoint ↑(s m) ↑(s n)\n[PROOFSTEP]\nby_contra' h\n[GOAL]\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\nβ : Type u_4\ninst✝³ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nf : γ → β\nf_cont : Continuous f\nf_inj : Injective f\nthis✝ : UpgradedPolishSpace γ := upgradePolishSpace γ\nb : Set (Set γ)\nb_count : Set.Countable b\nb_nonempty : ¬∅ ∈ b\nhb : IsTopologicalBasis b\nthis : Encodable ↑b\nA : Type u_3 := { p // Disjoint ↑p.fst ↑p.snd }\nq : A → Set β\nhq1 : ∀ (p : A), f '' ↑(↑p).fst ⊆ q p\nhq2 : ∀ (p : A), Disjoint (f '' ↑(↑p).snd) (q p)\nq_meas : ∀ (p : A), MeasurableSet (q p)\nE : ↑b → Set β :=\n  fun s =>\n    closure (f '' ↑s) ∩\n      ⋂ (t : ↑b) (ht : Disjoint ↑s ↑t),\n        q { val := (s, t), property := ht } \\ q { val := (t, s), property := (_ : Disjoint ↑t ↑s) }\nu : ℕ → ℝ\nu_anti : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nF : ℕ → Set β := fun n => ⋃ (s : ↑b) (_ : Metric.Bounded ↑s ∧ diam ↑s ≤ u n), E s\nx : β\nhx : x ∈ ⋂ (n : ℕ), F n\ns : ℕ → ↑b\nhs : ∀ (n : ℕ), Metric.Bounded ↑(s n) ∧ diam ↑(s n) ≤ u n\nhxs : ∀ (n : ℕ), x ∈ E (s n)\ny : ℕ → γ\nhy : ∀ (n : ℕ), y n ∈ ↑(s n)\nm n : ℕ\nh : Disjoint ↑(s m) ↑(s n)\n⊢ False\n[PROOFSTEP]\nhave A : x ∈ q ⟨(s m, s n), h⟩ \\ q ⟨(s n, s m), h.symm⟩ :=\n  haveI := mem_iInter.1 (hxs m).2 (s n)\n  (mem_iInter.1 this h : _)\n[GOAL]\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\nβ : Type u_4\ninst✝³ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nf : γ → β\nf_cont : Continuous f\nf_inj : Injective f\nthis✝ : UpgradedPolishSpace γ := upgradePolishSpace γ\nb : Set (Set γ)\nb_count : Set.Countable b\nb_nonempty : ¬∅ ∈ b\nhb : IsTopologicalBasis b\nthis : Encodable ↑b\nA✝ : Type u_3 := { p // Disjoint ↑p.fst ↑p.snd }\nq : A✝ → Set β\nhq1 : ∀ (p : A✝), f '' ↑(↑p).fst ⊆ q p\nhq2 : ∀ (p : A✝), Disjoint (f '' ↑(↑p).snd) (q p)\nq_meas : ∀ (p : A✝), MeasurableSet (q p)\nE : ↑b → Set β :=\n  fun s =>\n    closure (f '' ↑s) ∩\n      ⋂ (t : ↑b) (ht : Disjoint ↑s ↑t),\n        q { val := (s, t), property := ht } \\ q { val := (t, s), property := (_ : Disjoint ↑t ↑s) }\nu : ℕ → ℝ\nu_anti : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nF : ℕ → Set β := fun n => ⋃ (s : ↑b) (_ : Metric.Bounded ↑s ∧ diam ↑s ≤ u n), E s\nx : β\nhx : x ∈ ⋂ (n : ℕ), F n\ns : ℕ → ↑b\nhs : ∀ (n : ℕ), Metric.Bounded ↑(s n) ∧ diam ↑(s n) ≤ u n\nhxs : ∀ (n : ℕ), x ∈ E (s n)\ny : ℕ → γ\nhy : ∀ (n : ℕ), y n ∈ ↑(s n)\nm n : ℕ\nh : Disjoint ↑(s m) ↑(s n)\nA : x ∈ q { val := (s m, s n), property := h } \\ q { val := (s n, s m), property := (_ : Disjoint ↑(s n) ↑(s m)) }\n⊢ False\n[PROOFSTEP]\nhave B : x ∈ q ⟨(s n, s m), h.symm⟩ \\ q ⟨(s m, s n), h⟩ :=\n  haveI := mem_iInter.1 (hxs n).2 (s m)\n  (mem_iInter.1 this h.symm : _)\n[GOAL]\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\nβ : Type u_4\ninst✝³ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nf : γ → β\nf_cont : Continuous f\nf_inj : Injective f\nthis✝ : UpgradedPolishSpace γ := upgradePolishSpace γ\nb : Set (Set γ)\nb_count : Set.Countable b\nb_nonempty : ¬∅ ∈ b\nhb : IsTopologicalBasis b\nthis : Encodable ↑b\nA✝ : Type u_3 := { p // Disjoint ↑p.fst ↑p.snd }\nq : A✝ → Set β\nhq1 : ∀ (p : A✝), f '' ↑(↑p).fst ⊆ q p\nhq2 : ∀ (p : A✝), Disjoint (f '' ↑(↑p).snd) (q p)\nq_meas : ∀ (p : A✝), MeasurableSet (q p)\nE : ↑b → Set β :=\n  fun s =>\n    closure (f '' ↑s) ∩\n      ⋂ (t : ↑b) (ht : Disjoint ↑s ↑t),\n        q { val := (s, t), property := ht } \\ q { val := (t, s), property := (_ : Disjoint ↑t ↑s) }\nu : ℕ → ℝ\nu_anti : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nF : ℕ → Set β := fun n => ⋃ (s : ↑b) (_ : Metric.Bounded ↑s ∧ diam ↑s ≤ u n), E s\nx : β\nhx : x ∈ ⋂ (n : ℕ), F n\ns : ℕ → ↑b\nhs : ∀ (n : ℕ), Metric.Bounded ↑(s n) ∧ diam ↑(s n) ≤ u n\nhxs : ∀ (n : ℕ), x ∈ E (s n)\ny : ℕ → γ\nhy : ∀ (n : ℕ), y n ∈ ↑(s n)\nm n : ℕ\nh : Disjoint ↑(s m) ↑(s n)\nA : x ∈ q { val := (s m, s n), property := h } \\ q { val := (s n, s m), property := (_ : Disjoint ↑(s n) ↑(s m)) }\nB : x ∈ q { val := (s n, s m), property := (_ : Disjoint ↑(s n) ↑(s m)) } \\ q { val := (s m, s n), property := h }\n⊢ False\n[PROOFSTEP]\nexact\n  A.2\n    B.1\n      -- the points `y n` are nearby, and therefore they form a Cauchy sequence.\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.h₂\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\nβ : Type u_4\ninst✝³ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nf : γ → β\nf_cont : Continuous f\nf_inj : Injective f\nthis✝ : UpgradedPolishSpace γ := upgradePolishSpace γ\nb : Set (Set γ)\nb_count : Set.Countable b\nb_nonempty : ¬∅ ∈ b\nhb : IsTopologicalBasis b\nthis : Encodable ↑b\nA : Type u_3 := { p // Disjoint ↑p.fst ↑p.snd }\nq : A → Set β\nhq1 : ∀ (p : A), f '' ↑(↑p).fst ⊆ q p\nhq2 : ∀ (p : A), Disjoint (f '' ↑(↑p).snd) (q p)\nq_meas : ∀ (p : A), MeasurableSet (q p)\nE : ↑b → Set β :=\n  fun s =>\n    closure (f '' ↑s) ∩\n      ⋂ (t : ↑b) (ht : Disjoint ↑s ↑t),\n        q { val := (s, t), property := ht } \\ q { val := (t, s), property := (_ : Disjoint ↑t ↑s) }\nu : ℕ → ℝ\nu_anti : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nF : ℕ → Set β := fun n => ⋃ (s : ↑b) (_ : Metric.Bounded ↑s ∧ diam ↑s ≤ u n), E s\nx : β\nhx : x ∈ ⋂ (n : ℕ), F n\ns : ℕ → ↑b\nhs : ∀ (n : ℕ), Metric.Bounded ↑(s n) ∧ diam ↑(s n) ≤ u n\nhxs : ∀ (n : ℕ), x ∈ E (s n)\ny : ℕ → γ\nhy : ∀ (n : ℕ), y n ∈ ↑(s n)\nI : ∀ (m n : ℕ), Set.Nonempty (↑(s m) ∩ ↑(s n))\n⊢ x ∈ range f\n[PROOFSTEP]\nhave cauchy_y : CauchySeq y :=\n  by\n  have : Tendsto (fun n => 2 * u n) atTop (𝓝 0) := by simpa only [mul_zero] using u_lim.const_mul 2\n  refine cauchySeq_of_le_tendsto_0' (fun n => 2 * u n) (fun m n hmn => ?_) this\n  rcases I m n with ⟨z, zsm, zsn⟩\n  calc\n    dist (y m) (y n) ≤ dist (y m) z + dist z (y n) := dist_triangle _ _ _\n    _ ≤ u m + u n :=\n      (add_le_add ((dist_le_diam_of_mem (hs m).1 (hy m) zsm).trans (hs m).2)\n        ((dist_le_diam_of_mem (hs n).1 zsn (hy n)).trans (hs n).2))\n    _ ≤ 2 * u m := by linarith [u_anti.antitone hmn]\n[GOAL]\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\nβ : Type u_4\ninst✝³ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nf : γ → β\nf_cont : Continuous f\nf_inj : Injective f\nthis✝ : UpgradedPolishSpace γ := upgradePolishSpace γ\nb : Set (Set γ)\nb_count : Set.Countable b\nb_nonempty : ¬∅ ∈ b\nhb : IsTopologicalBasis b\nthis : Encodable ↑b\nA : Type u_3 := { p // Disjoint ↑p.fst ↑p.snd }\nq : A → Set β\nhq1 : ∀ (p : A), f '' ↑(↑p).fst ⊆ q p\nhq2 : ∀ (p : A), Disjoint (f '' ↑(↑p).snd) (q p)\nq_meas : ∀ (p : A), MeasurableSet (q p)\nE : ↑b → Set β :=\n  fun s =>\n    closure (f '' ↑s) ∩\n      ⋂ (t : ↑b) (ht : Disjoint ↑s ↑t),\n        q { val := (s, t), property := ht } \\ q { val := (t, s), property := (_ : Disjoint ↑t ↑s) }\nu : ℕ → ℝ\nu_anti : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nF : ℕ → Set β := fun n => ⋃ (s : ↑b) (_ : Metric.Bounded ↑s ∧ diam ↑s ≤ u n), E s\nx : β\nhx : x ∈ ⋂ (n : ℕ), F n\ns : ℕ → ↑b\nhs : ∀ (n : ℕ), Metric.Bounded ↑(s n) ∧ diam ↑(s n) ≤ u n\nhxs : ∀ (n : ℕ), x ∈ E (s n)\ny : ℕ → γ\nhy : ∀ (n : ℕ), y n ∈ ↑(s n)\nI : ∀ (m n : ℕ), Set.Nonempty (↑(s m) ∩ ↑(s n))\n⊢ CauchySeq y\n[PROOFSTEP]\nhave : Tendsto (fun n => 2 * u n) atTop (𝓝 0) := by simpa only [mul_zero] using u_lim.const_mul 2\n[GOAL]\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\nβ : Type u_4\ninst✝³ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nf : γ → β\nf_cont : Continuous f\nf_inj : Injective f\nthis✝ : UpgradedPolishSpace γ := upgradePolishSpace γ\nb : Set (Set γ)\nb_count : Set.Countable b\nb_nonempty : ¬∅ ∈ b\nhb : IsTopologicalBasis b\nthis : Encodable ↑b\nA : Type u_3 := { p // Disjoint ↑p.fst ↑p.snd }\nq : A → Set β\nhq1 : ∀ (p : A), f '' ↑(↑p).fst ⊆ q p\nhq2 : ∀ (p : A), Disjoint (f '' ↑(↑p).snd) (q p)\nq_meas : ∀ (p : A), MeasurableSet (q p)\nE : ↑b → Set β :=\n  fun s =>\n    closure (f '' ↑s) ∩\n      ⋂ (t : ↑b) (ht : Disjoint ↑s ↑t),\n        q { val := (s, t), property := ht } \\ q { val := (t, s), property := (_ : Disjoint ↑t ↑s) }\nu : ℕ → ℝ\nu_anti : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nF : ℕ → Set β := fun n => ⋃ (s : ↑b) (_ : Metric.Bounded ↑s ∧ diam ↑s ≤ u n), E s\nx : β\nhx : x ∈ ⋂ (n : ℕ), F n\ns : ℕ → ↑b\nhs : ∀ (n : ℕ), Metric.Bounded ↑(s n) ∧ diam ↑(s n) ≤ u n\nhxs : ∀ (n : ℕ), x ∈ E (s n)\ny : ℕ → γ\nhy : ∀ (n : ℕ), y n ∈ ↑(s n)\nI : ∀ (m n : ℕ), Set.Nonempty (↑(s m) ∩ ↑(s n))\n⊢ Tendsto (fun n => 2 * u n) atTop (𝓝 0)\n[PROOFSTEP]\nsimpa only [mul_zero] using u_lim.const_mul 2\n[GOAL]\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\nβ : Type u_4\ninst✝³ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nf : γ → β\nf_cont : Continuous f\nf_inj : Injective f\nthis✝¹ : UpgradedPolishSpace γ := upgradePolishSpace γ\nb : Set (Set γ)\nb_count : Set.Countable b\nb_nonempty : ¬∅ ∈ b\nhb : IsTopologicalBasis b\nthis✝ : Encodable ↑b\nA : Type u_3 := { p // Disjoint ↑p.fst ↑p.snd }\nq : A → Set β\nhq1 : ∀ (p : A), f '' ↑(↑p).fst ⊆ q p\nhq2 : ∀ (p : A), Disjoint (f '' ↑(↑p).snd) (q p)\nq_meas : ∀ (p : A), MeasurableSet (q p)\nE : ↑b → Set β :=\n  fun s =>\n    closure (f '' ↑s) ∩\n      ⋂ (t : ↑b) (ht : Disjoint ↑s ↑t),\n        q { val := (s, t), property := ht } \\ q { val := (t, s), property := (_ : Disjoint ↑t ↑s) }\nu : ℕ → ℝ\nu_anti : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nF : ℕ → Set β := fun n => ⋃ (s : ↑b) (_ : Metric.Bounded ↑s ∧ diam ↑s ≤ u n), E s\nx : β\nhx : x ∈ ⋂ (n : ℕ), F n\ns : ℕ → ↑b\nhs : ∀ (n : ℕ), Metric.Bounded ↑(s n) ∧ diam ↑(s n) ≤ u n\nhxs : ∀ (n : ℕ), x ∈ E (s n)\ny : ℕ → γ\nhy : ∀ (n : ℕ), y n ∈ ↑(s n)\nI : ∀ (m n : ℕ), Set.Nonempty (↑(s m) ∩ ↑(s n))\nthis : Tendsto (fun n => 2 * u n) atTop (𝓝 0)\n⊢ CauchySeq y\n[PROOFSTEP]\nrefine cauchySeq_of_le_tendsto_0' (fun n => 2 * u n) (fun m n hmn => ?_) this\n[GOAL]\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\nβ : Type u_4\ninst✝³ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nf : γ → β\nf_cont : Continuous f\nf_inj : Injective f\nthis✝¹ : UpgradedPolishSpace γ := upgradePolishSpace γ\nb : Set (Set γ)\nb_count : Set.Countable b\nb_nonempty : ¬∅ ∈ b\nhb : IsTopologicalBasis b\nthis✝ : Encodable ↑b\nA : Type u_3 := { p // Disjoint ↑p.fst ↑p.snd }\nq : A → Set β\nhq1 : ∀ (p : A), f '' ↑(↑p).fst ⊆ q p\nhq2 : ∀ (p : A), Disjoint (f '' ↑(↑p).snd) (q p)\nq_meas : ∀ (p : A), MeasurableSet (q p)\nE : ↑b → Set β :=\n  fun s =>\n    closure (f '' ↑s) ∩\n      ⋂ (t : ↑b) (ht : Disjoint ↑s ↑t),\n        q { val := (s, t), property := ht } \\ q { val := (t, s), property := (_ : Disjoint ↑t ↑s) }\nu : ℕ → ℝ\nu_anti : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nF : ℕ → Set β := fun n => ⋃ (s : ↑b) (_ : Metric.Bounded ↑s ∧ diam ↑s ≤ u n), E s\nx : β\nhx : x ∈ ⋂ (n : ℕ), F n\ns : ℕ → ↑b\nhs : ∀ (n : ℕ), Metric.Bounded ↑(s n) ∧ diam ↑(s n) ≤ u n\nhxs : ∀ (n : ℕ), x ∈ E (s n)\ny : ℕ → γ\nhy : ∀ (n : ℕ), y n ∈ ↑(s n)\nI : ∀ (m n : ℕ), Set.Nonempty (↑(s m) ∩ ↑(s n))\nthis : Tendsto (fun n => 2 * u n) atTop (𝓝 0)\nm n : ℕ\nhmn : m ≤ n\n⊢ dist (y m) (y n) ≤ (fun n => 2 * u n) m\n[PROOFSTEP]\nrcases I m n with ⟨z, zsm, zsn⟩\n[GOAL]\ncase intro.intro\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\nβ : Type u_4\ninst✝³ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nf : γ → β\nf_cont : Continuous f\nf_inj : Injective f\nthis✝¹ : UpgradedPolishSpace γ := upgradePolishSpace γ\nb : Set (Set γ)\nb_count : Set.Countable b\nb_nonempty : ¬∅ ∈ b\nhb : IsTopologicalBasis b\nthis✝ : Encodable ↑b\nA : Type u_3 := { p // Disjoint ↑p.fst ↑p.snd }\nq : A → Set β\nhq1 : ∀ (p : A), f '' ↑(↑p).fst ⊆ q p\nhq2 : ∀ (p : A), Disjoint (f '' ↑(↑p).snd) (q p)\nq_meas : ∀ (p : A), MeasurableSet (q p)\nE : ↑b → Set β :=\n  fun s =>\n    closure (f '' ↑s) ∩\n      ⋂ (t : ↑b) (ht : Disjoint ↑s ↑t),\n        q { val := (s, t), property := ht } \\ q { val := (t, s), property := (_ : Disjoint ↑t ↑s) }\nu : ℕ → ℝ\nu_anti : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nF : ℕ → Set β := fun n => ⋃ (s : ↑b) (_ : Metric.Bounded ↑s ∧ diam ↑s ≤ u n), E s\nx : β\nhx : x ∈ ⋂ (n : ℕ), F n\ns : ℕ → ↑b\nhs : ∀ (n : ℕ), Metric.Bounded ↑(s n) ∧ diam ↑(s n) ≤ u n\nhxs : ∀ (n : ℕ), x ∈ E (s n)\ny : ℕ → γ\nhy : ∀ (n : ℕ), y n ∈ ↑(s n)\nI : ∀ (m n : ℕ), Set.Nonempty (↑(s m) ∩ ↑(s n))\nthis : Tendsto (fun n => 2 * u n) atTop (𝓝 0)\nm n : ℕ\nhmn : m ≤ n\nz : γ\nzsm : z ∈ ↑(s m)\nzsn : z ∈ ↑(s n)\n⊢ dist (y m) (y n) ≤ (fun n => 2 * u n) m\n[PROOFSTEP]\ncalc\n  dist (y m) (y n) ≤ dist (y m) z + dist z (y n) := dist_triangle _ _ _\n  _ ≤ u m + u n :=\n    (add_le_add ((dist_le_diam_of_mem (hs m).1 (hy m) zsm).trans (hs m).2)\n      ((dist_le_diam_of_mem (hs n).1 zsn (hy n)).trans (hs n).2))\n  _ ≤ 2 * u m := by linarith [u_anti.antitone hmn]\n[GOAL]\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\nβ : Type u_4\ninst✝³ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nf : γ → β\nf_cont : Continuous f\nf_inj : Injective f\nthis✝¹ : UpgradedPolishSpace γ := upgradePolishSpace γ\nb : Set (Set γ)\nb_count : Set.Countable b\nb_nonempty : ¬∅ ∈ b\nhb : IsTopologicalBasis b\nthis✝ : Encodable ↑b\nA : Type u_3 := { p // Disjoint ↑p.fst ↑p.snd }\nq : A → Set β\nhq1 : ∀ (p : A), f '' ↑(↑p).fst ⊆ q p\nhq2 : ∀ (p : A), Disjoint (f '' ↑(↑p).snd) (q p)\nq_meas : ∀ (p : A), MeasurableSet (q p)\nE : ↑b → Set β :=\n  fun s =>\n    closure (f '' ↑s) ∩\n      ⋂ (t : ↑b) (ht : Disjoint ↑s ↑t),\n        q { val := (s, t), property := ht } \\ q { val := (t, s), property := (_ : Disjoint ↑t ↑s) }\nu : ℕ → ℝ\nu_anti : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nF : ℕ → Set β := fun n => ⋃ (s : ↑b) (_ : Metric.Bounded ↑s ∧ diam ↑s ≤ u n), E s\nx : β\nhx : x ∈ ⋂ (n : ℕ), F n\ns : ℕ → ↑b\nhs : ∀ (n : ℕ), Metric.Bounded ↑(s n) ∧ diam ↑(s n) ≤ u n\nhxs : ∀ (n : ℕ), x ∈ E (s n)\ny : ℕ → γ\nhy : ∀ (n : ℕ), y n ∈ ↑(s n)\nI : ∀ (m n : ℕ), Set.Nonempty (↑(s m) ∩ ↑(s n))\nthis : Tendsto (fun n => 2 * u n) atTop (𝓝 0)\nm n : ℕ\nhmn : m ≤ n\nz : γ\nzsm : z ∈ ↑(s m)\nzsn : z ∈ ↑(s n)\n⊢ u m + u n ≤ 2 * u m\n[PROOFSTEP]\nlinarith [u_anti.antitone hmn]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.h₂\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\nβ : Type u_4\ninst✝³ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nf : γ → β\nf_cont : Continuous f\nf_inj : Injective f\nthis✝ : UpgradedPolishSpace γ := upgradePolishSpace γ\nb : Set (Set γ)\nb_count : Set.Countable b\nb_nonempty : ¬∅ ∈ b\nhb : IsTopologicalBasis b\nthis : Encodable ↑b\nA : Type u_3 := { p // Disjoint ↑p.fst ↑p.snd }\nq : A → Set β\nhq1 : ∀ (p : A), f '' ↑(↑p).fst ⊆ q p\nhq2 : ∀ (p : A), Disjoint (f '' ↑(↑p).snd) (q p)\nq_meas : ∀ (p : A), MeasurableSet (q p)\nE : ↑b → Set β :=\n  fun s =>\n    closure (f '' ↑s) ∩\n      ⋂ (t : ↑b) (ht : Disjoint ↑s ↑t),\n        q { val := (s, t), property := ht } \\ q { val := (t, s), property := (_ : Disjoint ↑t ↑s) }\nu : ℕ → ℝ\nu_anti : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nF : ℕ → Set β := fun n => ⋃ (s : ↑b) (_ : Metric.Bounded ↑s ∧ diam ↑s ≤ u n), E s\nx : β\nhx : x ∈ ⋂ (n : ℕ), F n\ns : ℕ → ↑b\nhs : ∀ (n : ℕ), Metric.Bounded ↑(s n) ∧ diam ↑(s n) ≤ u n\nhxs : ∀ (n : ℕ), x ∈ E (s n)\ny : ℕ → γ\nhy : ∀ (n : ℕ), y n ∈ ↑(s n)\nI : ∀ (m n : ℕ), Set.Nonempty (↑(s m) ∩ ↑(s n))\ncauchy_y : CauchySeq y\n⊢ x ∈ range f\n[PROOFSTEP]\nhaveI : Nonempty γ :=\n  ⟨y 0⟩\n    -- let `z` be its limit.\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.h₂\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\nβ : Type u_4\ninst✝³ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nf : γ → β\nf_cont : Continuous f\nf_inj : Injective f\nthis✝¹ : UpgradedPolishSpace γ := upgradePolishSpace γ\nb : Set (Set γ)\nb_count : Set.Countable b\nb_nonempty : ¬∅ ∈ b\nhb : IsTopologicalBasis b\nthis✝ : Encodable ↑b\nA : Type u_3 := { p // Disjoint ↑p.fst ↑p.snd }\nq : A → Set β\nhq1 : ∀ (p : A), f '' ↑(↑p).fst ⊆ q p\nhq2 : ∀ (p : A), Disjoint (f '' ↑(↑p).snd) (q p)\nq_meas : ∀ (p : A), MeasurableSet (q p)\nE : ↑b → Set β :=\n  fun s =>\n    closure (f '' ↑s) ∩\n      ⋂ (t : ↑b) (ht : Disjoint ↑s ↑t),\n        q { val := (s, t), property := ht } \\ q { val := (t, s), property := (_ : Disjoint ↑t ↑s) }\nu : ℕ → ℝ\nu_anti : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nF : ℕ → Set β := fun n => ⋃ (s : ↑b) (_ : Metric.Bounded ↑s ∧ diam ↑s ≤ u n), E s\nx : β\nhx : x ∈ ⋂ (n : ℕ), F n\ns : ℕ → ↑b\nhs : ∀ (n : ℕ), Metric.Bounded ↑(s n) ∧ diam ↑(s n) ≤ u n\nhxs : ∀ (n : ℕ), x ∈ E (s n)\ny : ℕ → γ\nhy : ∀ (n : ℕ), y n ∈ ↑(s n)\nI : ∀ (m n : ℕ), Set.Nonempty (↑(s m) ∩ ↑(s n))\ncauchy_y : CauchySeq y\nthis : Nonempty γ\n⊢ x ∈ range f\n[PROOFSTEP]\nlet z := limUnder atTop y\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.h₂\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\nβ : Type u_4\ninst✝³ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nf : γ → β\nf_cont : Continuous f\nf_inj : Injective f\nthis✝¹ : UpgradedPolishSpace γ := upgradePolishSpace γ\nb : Set (Set γ)\nb_count : Set.Countable b\nb_nonempty : ¬∅ ∈ b\nhb : IsTopologicalBasis b\nthis✝ : Encodable ↑b\nA : Type u_3 := { p // Disjoint ↑p.fst ↑p.snd }\nq : A → Set β\nhq1 : ∀ (p : A), f '' ↑(↑p).fst ⊆ q p\nhq2 : ∀ (p : A), Disjoint (f '' ↑(↑p).snd) (q p)\nq_meas : ∀ (p : A), MeasurableSet (q p)\nE : ↑b → Set β :=\n  fun s =>\n    closure (f '' ↑s) ∩\n      ⋂ (t : ↑b) (ht : Disjoint ↑s ↑t),\n        q { val := (s, t), property := ht } \\ q { val := (t, s), property := (_ : Disjoint ↑t ↑s) }\nu : ℕ → ℝ\nu_anti : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nF : ℕ → Set β := fun n => ⋃ (s : ↑b) (_ : Metric.Bounded ↑s ∧ diam ↑s ≤ u n), E s\nx : β\nhx : x ∈ ⋂ (n : ℕ), F n\ns : ℕ → ↑b\nhs : ∀ (n : ℕ), Metric.Bounded ↑(s n) ∧ diam ↑(s n) ≤ u n\nhxs : ∀ (n : ℕ), x ∈ E (s n)\ny : ℕ → γ\nhy : ∀ (n : ℕ), y n ∈ ↑(s n)\nI : ∀ (m n : ℕ), Set.Nonempty (↑(s m) ∩ ↑(s n))\ncauchy_y : CauchySeq y\nthis : Nonempty γ\nz : γ := limUnder atTop y\n⊢ x ∈ range f\n[PROOFSTEP]\nhave y_lim : Tendsto y atTop (𝓝 z) := cauchy_y.tendsto_limUnder\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.h₂\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\nβ : Type u_4\ninst✝³ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nf : γ → β\nf_cont : Continuous f\nf_inj : Injective f\nthis✝¹ : UpgradedPolishSpace γ := upgradePolishSpace γ\nb : Set (Set γ)\nb_count : Set.Countable b\nb_nonempty : ¬∅ ∈ b\nhb : IsTopologicalBasis b\nthis✝ : Encodable ↑b\nA : Type u_3 := { p // Disjoint ↑p.fst ↑p.snd }\nq : A → Set β\nhq1 : ∀ (p : A), f '' ↑(↑p).fst ⊆ q p\nhq2 : ∀ (p : A), Disjoint (f '' ↑(↑p).snd) (q p)\nq_meas : ∀ (p : A), MeasurableSet (q p)\nE : ↑b → Set β :=\n  fun s =>\n    closure (f '' ↑s) ∩\n      ⋂ (t : ↑b) (ht : Disjoint ↑s ↑t),\n        q { val := (s, t), property := ht } \\ q { val := (t, s), property := (_ : Disjoint ↑t ↑s) }\nu : ℕ → ℝ\nu_anti : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nF : ℕ → Set β := fun n => ⋃ (s : ↑b) (_ : Metric.Bounded ↑s ∧ diam ↑s ≤ u n), E s\nx : β\nhx : x ∈ ⋂ (n : ℕ), F n\ns : ℕ → ↑b\nhs : ∀ (n : ℕ), Metric.Bounded ↑(s n) ∧ diam ↑(s n) ≤ u n\nhxs : ∀ (n : ℕ), x ∈ E (s n)\ny : ℕ → γ\nhy : ∀ (n : ℕ), y n ∈ ↑(s n)\nI : ∀ (m n : ℕ), Set.Nonempty (↑(s m) ∩ ↑(s n))\ncauchy_y : CauchySeq y\nthis : Nonempty γ\nz : γ := limUnder atTop y\ny_lim : Tendsto y atTop (𝓝 z)\n⊢ x ∈ range f\n[PROOFSTEP]\nsuffices f z = x by\n  rw [← this]\n  exact\n    mem_range_self\n      _\n        -- assume for a contradiction that `f z ≠ x`.\n[GOAL]\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\nβ : Type u_4\ninst✝³ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nf : γ → β\nf_cont : Continuous f\nf_inj : Injective f\nthis✝² : UpgradedPolishSpace γ := upgradePolishSpace γ\nb : Set (Set γ)\nb_count : Set.Countable b\nb_nonempty : ¬∅ ∈ b\nhb : IsTopologicalBasis b\nthis✝¹ : Encodable ↑b\nA : Type u_3 := { p // Disjoint ↑p.fst ↑p.snd }\nq : A → Set β\nhq1 : ∀ (p : A), f '' ↑(↑p).fst ⊆ q p\nhq2 : ∀ (p : A), Disjoint (f '' ↑(↑p).snd) (q p)\nq_meas : ∀ (p : A), MeasurableSet (q p)\nE : ↑b → Set β :=\n  fun s =>\n    closure (f '' ↑s) ∩\n      ⋂ (t : ↑b) (ht : Disjoint ↑s ↑t),\n        q { val := (s, t), property := ht } \\ q { val := (t, s), property := (_ : Disjoint ↑t ↑s) }\nu : ℕ → ℝ\nu_anti : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nF : ℕ → Set β := fun n => ⋃ (s : ↑b) (_ : Metric.Bounded ↑s ∧ diam ↑s ≤ u n), E s\nx : β\nhx : x ∈ ⋂ (n : ℕ), F n\ns : ℕ → ↑b\nhs : ∀ (n : ℕ), Metric.Bounded ↑(s n) ∧ diam ↑(s n) ≤ u n\nhxs : ∀ (n : ℕ), x ∈ E (s n)\ny : ℕ → γ\nhy : ∀ (n : ℕ), y n ∈ ↑(s n)\nI : ∀ (m n : ℕ), Set.Nonempty (↑(s m) ∩ ↑(s n))\ncauchy_y : CauchySeq y\nthis✝ : Nonempty γ\nz : γ := limUnder atTop y\ny_lim : Tendsto y atTop (𝓝 z)\nthis : f z = x\n⊢ x ∈ range f\n[PROOFSTEP]\nrw [← this]\n[GOAL]\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\nβ : Type u_4\ninst✝³ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nf : γ → β\nf_cont : Continuous f\nf_inj : Injective f\nthis✝² : UpgradedPolishSpace γ := upgradePolishSpace γ\nb : Set (Set γ)\nb_count : Set.Countable b\nb_nonempty : ¬∅ ∈ b\nhb : IsTopologicalBasis b\nthis✝¹ : Encodable ↑b\nA : Type u_3 := { p // Disjoint ↑p.fst ↑p.snd }\nq : A → Set β\nhq1 : ∀ (p : A), f '' ↑(↑p).fst ⊆ q p\nhq2 : ∀ (p : A), Disjoint (f '' ↑(↑p).snd) (q p)\nq_meas : ∀ (p : A), MeasurableSet (q p)\nE : ↑b → Set β :=\n  fun s =>\n    closure (f '' ↑s) ∩\n      ⋂ (t : ↑b) (ht : Disjoint ↑s ↑t),\n        q { val := (s, t), property := ht } \\ q { val := (t, s), property := (_ : Disjoint ↑t ↑s) }\nu : ℕ → ℝ\nu_anti : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nF : ℕ → Set β := fun n => ⋃ (s : ↑b) (_ : Metric.Bounded ↑s ∧ diam ↑s ≤ u n), E s\nx : β\nhx : x ∈ ⋂ (n : ℕ), F n\ns : ℕ → ↑b\nhs : ∀ (n : ℕ), Metric.Bounded ↑(s n) ∧ diam ↑(s n) ≤ u n\nhxs : ∀ (n : ℕ), x ∈ E (s n)\ny : ℕ → γ\nhy : ∀ (n : ℕ), y n ∈ ↑(s n)\nI : ∀ (m n : ℕ), Set.Nonempty (↑(s m) ∩ ↑(s n))\ncauchy_y : CauchySeq y\nthis✝ : Nonempty γ\nz : γ := limUnder atTop y\ny_lim : Tendsto y atTop (𝓝 z)\nthis : f z = x\n⊢ f z ∈ range f\n[PROOFSTEP]\nexact\n  mem_range_self\n    _\n      -- assume for a contradiction that `f z ≠ x`.\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.h₂\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\nβ : Type u_4\ninst✝³ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nf : γ → β\nf_cont : Continuous f\nf_inj : Injective f\nthis✝¹ : UpgradedPolishSpace γ := upgradePolishSpace γ\nb : Set (Set γ)\nb_count : Set.Countable b\nb_nonempty : ¬∅ ∈ b\nhb : IsTopologicalBasis b\nthis✝ : Encodable ↑b\nA : Type u_3 := { p // Disjoint ↑p.fst ↑p.snd }\nq : A → Set β\nhq1 : ∀ (p : A), f '' ↑(↑p).fst ⊆ q p\nhq2 : ∀ (p : A), Disjoint (f '' ↑(↑p).snd) (q p)\nq_meas : ∀ (p : A), MeasurableSet (q p)\nE : ↑b → Set β :=\n  fun s =>\n    closure (f '' ↑s) ∩\n      ⋂ (t : ↑b) (ht : Disjoint ↑s ↑t),\n        q { val := (s, t), property := ht } \\ q { val := (t, s), property := (_ : Disjoint ↑t ↑s) }\nu : ℕ → ℝ\nu_anti : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nF : ℕ → Set β := fun n => ⋃ (s : ↑b) (_ : Metric.Bounded ↑s ∧ diam ↑s ≤ u n), E s\nx : β\nhx : x ∈ ⋂ (n : ℕ), F n\ns : ℕ → ↑b\nhs : ∀ (n : ℕ), Metric.Bounded ↑(s n) ∧ diam ↑(s n) ≤ u n\nhxs : ∀ (n : ℕ), x ∈ E (s n)\ny : ℕ → γ\nhy : ∀ (n : ℕ), y n ∈ ↑(s n)\nI : ∀ (m n : ℕ), Set.Nonempty (↑(s m) ∩ ↑(s n))\ncauchy_y : CauchySeq y\nthis : Nonempty γ\nz : γ := limUnder atTop y\ny_lim : Tendsto y atTop (𝓝 z)\n⊢ f z = x\n[PROOFSTEP]\nby_contra' hne\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.h₂\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\nβ : Type u_4\ninst✝³ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nf : γ → β\nf_cont : Continuous f\nf_inj : Injective f\nthis✝¹ : UpgradedPolishSpace γ := upgradePolishSpace γ\nb : Set (Set γ)\nb_count : Set.Countable b\nb_nonempty : ¬∅ ∈ b\nhb : IsTopologicalBasis b\nthis✝ : Encodable ↑b\nA : Type u_3 := { p // Disjoint ↑p.fst ↑p.snd }\nq : A → Set β\nhq1 : ∀ (p : A), f '' ↑(↑p).fst ⊆ q p\nhq2 : ∀ (p : A), Disjoint (f '' ↑(↑p).snd) (q p)\nq_meas : ∀ (p : A), MeasurableSet (q p)\nE : ↑b → Set β :=\n  fun s =>\n    closure (f '' ↑s) ∩\n      ⋂ (t : ↑b) (ht : Disjoint ↑s ↑t),\n        q { val := (s, t), property := ht } \\ q { val := (t, s), property := (_ : Disjoint ↑t ↑s) }\nu : ℕ → ℝ\nu_anti : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nF : ℕ → Set β := fun n => ⋃ (s : ↑b) (_ : Metric.Bounded ↑s ∧ diam ↑s ≤ u n), E s\nx : β\nhx : x ∈ ⋂ (n : ℕ), F n\ns : ℕ → ↑b\nhs : ∀ (n : ℕ), Metric.Bounded ↑(s n) ∧ diam ↑(s n) ≤ u n\nhxs : ∀ (n : ℕ), x ∈ E (s n)\ny : ℕ → γ\nhy : ∀ (n : ℕ), y n ∈ ↑(s n)\nI : ∀ (m n : ℕ), Set.Nonempty (↑(s m) ∩ ↑(s n))\ncauchy_y : CauchySeq y\nthis : Nonempty γ\nz : γ := limUnder atTop y\ny_lim : Tendsto y atTop (𝓝 z)\nhne : f (limUnder atTop y) ≠ x\n⊢ False\n[PROOFSTEP]\nobtain ⟨v, w, v_open, w_open, fzv, xw, hvw⟩ := t2_separation hne\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.h₂.intro.intro.intro.intro.intro.intro\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\nβ : Type u_4\ninst✝³ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nf : γ → β\nf_cont : Continuous f\nf_inj : Injective f\nthis✝¹ : UpgradedPolishSpace γ := upgradePolishSpace γ\nb : Set (Set γ)\nb_count : Set.Countable b\nb_nonempty : ¬∅ ∈ b\nhb : IsTopologicalBasis b\nthis✝ : Encodable ↑b\nA : Type u_3 := { p // Disjoint ↑p.fst ↑p.snd }\nq : A → Set β\nhq1 : ∀ (p : A), f '' ↑(↑p).fst ⊆ q p\nhq2 : ∀ (p : A), Disjoint (f '' ↑(↑p).snd) (q p)\nq_meas : ∀ (p : A), MeasurableSet (q p)\nE : ↑b → Set β :=\n  fun s =>\n    closure (f '' ↑s) ∩\n      ⋂ (t : ↑b) (ht : Disjoint ↑s ↑t),\n        q { val := (s, t), property := ht } \\ q { val := (t, s), property := (_ : Disjoint ↑t ↑s) }\nu : ℕ → ℝ\nu_anti : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nF : ℕ → Set β := fun n => ⋃ (s : ↑b) (_ : Metric.Bounded ↑s ∧ diam ↑s ≤ u n), E s\nx : β\nhx : x ∈ ⋂ (n : ℕ), F n\ns : ℕ → ↑b\nhs : ∀ (n : ℕ), Metric.Bounded ↑(s n) ∧ diam ↑(s n) ≤ u n\nhxs : ∀ (n : ℕ), x ∈ E (s n)\ny : ℕ → γ\nhy : ∀ (n : ℕ), y n ∈ ↑(s n)\nI : ∀ (m n : ℕ), Set.Nonempty (↑(s m) ∩ ↑(s n))\ncauchy_y : CauchySeq y\nthis : Nonempty γ\nz : γ := limUnder atTop y\ny_lim : Tendsto y atTop (𝓝 z)\nhne : f (limUnder atTop y) ≠ x\nv w : Set β\nv_open : IsOpen v\nw_open : IsOpen w\nfzv : f (limUnder atTop y) ∈ v\nxw : x ∈ w\nhvw : Disjoint v w\n⊢ False\n[PROOFSTEP]\nobtain ⟨δ, δpos, hδ⟩ : ∃ δ > (0 : ℝ), ball z δ ⊆ f ⁻¹' v :=\n  by\n  apply Metric.mem_nhds_iff.1\n  exact f_cont.continuousAt.preimage_mem_nhds (v_open.mem_nhds fzv)\n[GOAL]\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\nβ : Type u_4\ninst✝³ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nf : γ → β\nf_cont : Continuous f\nf_inj : Injective f\nthis✝¹ : UpgradedPolishSpace γ := upgradePolishSpace γ\nb : Set (Set γ)\nb_count : Set.Countable b\nb_nonempty : ¬∅ ∈ b\nhb : IsTopologicalBasis b\nthis✝ : Encodable ↑b\nA : Type u_3 := { p // Disjoint ↑p.fst ↑p.snd }\nq : A → Set β\nhq1 : ∀ (p : A), f '' ↑(↑p).fst ⊆ q p\nhq2 : ∀ (p : A), Disjoint (f '' ↑(↑p).snd) (q p)\nq_meas : ∀ (p : A), MeasurableSet (q p)\nE : ↑b → Set β :=\n  fun s =>\n    closure (f '' ↑s) ∩\n      ⋂ (t : ↑b) (ht : Disjoint ↑s ↑t),\n        q { val := (s, t), property := ht } \\ q { val := (t, s), property := (_ : Disjoint ↑t ↑s) }\nu : ℕ → ℝ\nu_anti : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nF : ℕ → Set β := fun n => ⋃ (s : ↑b) (_ : Metric.Bounded ↑s ∧ diam ↑s ≤ u n), E s\nx : β\nhx : x ∈ ⋂ (n : ℕ), F n\ns : ℕ → ↑b\nhs : ∀ (n : ℕ), Metric.Bounded ↑(s n) ∧ diam ↑(s n) ≤ u n\nhxs : ∀ (n : ℕ), x ∈ E (s n)\ny : ℕ → γ\nhy : ∀ (n : ℕ), y n ∈ ↑(s n)\nI : ∀ (m n : ℕ), Set.Nonempty (↑(s m) ∩ ↑(s n))\ncauchy_y : CauchySeq y\nthis : Nonempty γ\nz : γ := limUnder atTop y\ny_lim : Tendsto y atTop (𝓝 z)\nhne : f (limUnder atTop y) ≠ x\nv w : Set β\nv_open : IsOpen v\nw_open : IsOpen w\nfzv : f (limUnder atTop y) ∈ v\nxw : x ∈ w\nhvw : Disjoint v w\n⊢ ∃ δ, δ > 0 ∧ ball z δ ⊆ f ⁻¹' v\n[PROOFSTEP]\napply Metric.mem_nhds_iff.1\n[GOAL]\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\nβ : Type u_4\ninst✝³ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nf : γ → β\nf_cont : Continuous f\nf_inj : Injective f\nthis✝¹ : UpgradedPolishSpace γ := upgradePolishSpace γ\nb : Set (Set γ)\nb_count : Set.Countable b\nb_nonempty : ¬∅ ∈ b\nhb : IsTopologicalBasis b\nthis✝ : Encodable ↑b\nA : Type u_3 := { p // Disjoint ↑p.fst ↑p.snd }\nq : A → Set β\nhq1 : ∀ (p : A), f '' ↑(↑p).fst ⊆ q p\nhq2 : ∀ (p : A), Disjoint (f '' ↑(↑p).snd) (q p)\nq_meas : ∀ (p : A), MeasurableSet (q p)\nE : ↑b → Set β :=\n  fun s =>\n    closure (f '' ↑s) ∩\n      ⋂ (t : ↑b) (ht : Disjoint ↑s ↑t),\n        q { val := (s, t), property := ht } \\ q { val := (t, s), property := (_ : Disjoint ↑t ↑s) }\nu : ℕ → ℝ\nu_anti : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nF : ℕ → Set β := fun n => ⋃ (s : ↑b) (_ : Metric.Bounded ↑s ∧ diam ↑s ≤ u n), E s\nx : β\nhx : x ∈ ⋂ (n : ℕ), F n\ns : ℕ → ↑b\nhs : ∀ (n : ℕ), Metric.Bounded ↑(s n) ∧ diam ↑(s n) ≤ u n\nhxs : ∀ (n : ℕ), x ∈ E (s n)\ny : ℕ → γ\nhy : ∀ (n : ℕ), y n ∈ ↑(s n)\nI : ∀ (m n : ℕ), Set.Nonempty (↑(s m) ∩ ↑(s n))\ncauchy_y : CauchySeq y\nthis : Nonempty γ\nz : γ := limUnder atTop y\ny_lim : Tendsto y atTop (𝓝 z)\nhne : f (limUnder atTop y) ≠ x\nv w : Set β\nv_open : IsOpen v\nw_open : IsOpen w\nfzv : f (limUnder atTop y) ∈ v\nxw : x ∈ w\nhvw : Disjoint v w\n⊢ f ⁻¹' v ∈ 𝓝 z\n[PROOFSTEP]\nexact f_cont.continuousAt.preimage_mem_nhds (v_open.mem_nhds fzv)\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.h₂.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\nβ : Type u_4\ninst✝³ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nf : γ → β\nf_cont : Continuous f\nf_inj : Injective f\nthis✝¹ : UpgradedPolishSpace γ := upgradePolishSpace γ\nb : Set (Set γ)\nb_count : Set.Countable b\nb_nonempty : ¬∅ ∈ b\nhb : IsTopologicalBasis b\nthis✝ : Encodable ↑b\nA : Type u_3 := { p // Disjoint ↑p.fst ↑p.snd }\nq : A → Set β\nhq1 : ∀ (p : A), f '' ↑(↑p).fst ⊆ q p\nhq2 : ∀ (p : A), Disjoint (f '' ↑(↑p).snd) (q p)\nq_meas : ∀ (p : A), MeasurableSet (q p)\nE : ↑b → Set β :=\n  fun s =>\n    closure (f '' ↑s) ∩\n      ⋂ (t : ↑b) (ht : Disjoint ↑s ↑t),\n        q { val := (s, t), property := ht } \\ q { val := (t, s), property := (_ : Disjoint ↑t ↑s) }\nu : ℕ → ℝ\nu_anti : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nF : ℕ → Set β := fun n => ⋃ (s : ↑b) (_ : Metric.Bounded ↑s ∧ diam ↑s ≤ u n), E s\nx : β\nhx : x ∈ ⋂ (n : ℕ), F n\ns : ℕ → ↑b\nhs : ∀ (n : ℕ), Metric.Bounded ↑(s n) ∧ diam ↑(s n) ≤ u n\nhxs : ∀ (n : ℕ), x ∈ E (s n)\ny : ℕ → γ\nhy : ∀ (n : ℕ), y n ∈ ↑(s n)\nI : ∀ (m n : ℕ), Set.Nonempty (↑(s m) ∩ ↑(s n))\ncauchy_y : CauchySeq y\nthis : Nonempty γ\nz : γ := limUnder atTop y\ny_lim : Tendsto y atTop (𝓝 z)\nhne : f (limUnder atTop y) ≠ x\nv w : Set β\nv_open : IsOpen v\nw_open : IsOpen w\nfzv : f (limUnder atTop y) ∈ v\nxw : x ∈ w\nhvw : Disjoint v w\nδ : ℝ\nδpos : δ > 0\nhδ : ball z δ ⊆ f ⁻¹' v\n⊢ False\n[PROOFSTEP]\nobtain ⟨n, hn⟩ : ∃ n, u n + dist (y n) z < δ :=\n  haveI : Tendsto (fun n => u n + dist (y n) z) atTop (𝓝 0) := by\n    simpa only [add_zero] using u_lim.add (tendsto_iff_dist_tendsto_zero.1 y_lim)\n  ((tendsto_order.1 this).2 _ δpos).exists\n[GOAL]\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\nβ : Type u_4\ninst✝³ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nf : γ → β\nf_cont : Continuous f\nf_inj : Injective f\nthis✝¹ : UpgradedPolishSpace γ := upgradePolishSpace γ\nb : Set (Set γ)\nb_count : Set.Countable b\nb_nonempty : ¬∅ ∈ b\nhb : IsTopologicalBasis b\nthis✝ : Encodable ↑b\nA : Type u_3 := { p // Disjoint ↑p.fst ↑p.snd }\nq : A → Set β\nhq1 : ∀ (p : A), f '' ↑(↑p).fst ⊆ q p\nhq2 : ∀ (p : A), Disjoint (f '' ↑(↑p).snd) (q p)\nq_meas : ∀ (p : A), MeasurableSet (q p)\nE : ↑b → Set β :=\n  fun s =>\n    closure (f '' ↑s) ∩\n      ⋂ (t : ↑b) (ht : Disjoint ↑s ↑t),\n        q { val := (s, t), property := ht } \\ q { val := (t, s), property := (_ : Disjoint ↑t ↑s) }\nu : ℕ → ℝ\nu_anti : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nF : ℕ → Set β := fun n => ⋃ (s : ↑b) (_ : Metric.Bounded ↑s ∧ diam ↑s ≤ u n), E s\nx : β\nhx : x ∈ ⋂ (n : ℕ), F n\ns : ℕ → ↑b\nhs : ∀ (n : ℕ), Metric.Bounded ↑(s n) ∧ diam ↑(s n) ≤ u n\nhxs : ∀ (n : ℕ), x ∈ E (s n)\ny : ℕ → γ\nhy : ∀ (n : ℕ), y n ∈ ↑(s n)\nI : ∀ (m n : ℕ), Set.Nonempty (↑(s m) ∩ ↑(s n))\ncauchy_y : CauchySeq y\nthis : Nonempty γ\nz : γ := limUnder atTop y\ny_lim : Tendsto y atTop (𝓝 z)\nhne : f (limUnder atTop y) ≠ x\nv w : Set β\nv_open : IsOpen v\nw_open : IsOpen w\nfzv : f (limUnder atTop y) ∈ v\nxw : x ∈ w\nhvw : Disjoint v w\nδ : ℝ\nδpos : δ > 0\nhδ : ball z δ ⊆ f ⁻¹' v\n⊢ Tendsto (fun n => u n + dist (y n) z) atTop (𝓝 0)\n[PROOFSTEP]\nsimpa only [add_zero] using u_lim.add (tendsto_iff_dist_tendsto_zero.1 y_lim)\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.h₂.intro.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\nβ : Type u_4\ninst✝³ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nf : γ → β\nf_cont : Continuous f\nf_inj : Injective f\nthis✝¹ : UpgradedPolishSpace γ := upgradePolishSpace γ\nb : Set (Set γ)\nb_count : Set.Countable b\nb_nonempty : ¬∅ ∈ b\nhb : IsTopologicalBasis b\nthis✝ : Encodable ↑b\nA : Type u_3 := { p // Disjoint ↑p.fst ↑p.snd }\nq : A → Set β\nhq1 : ∀ (p : A), f '' ↑(↑p).fst ⊆ q p\nhq2 : ∀ (p : A), Disjoint (f '' ↑(↑p).snd) (q p)\nq_meas : ∀ (p : A), MeasurableSet (q p)\nE : ↑b → Set β :=\n  fun s =>\n    closure (f '' ↑s) ∩\n      ⋂ (t : ↑b) (ht : Disjoint ↑s ↑t),\n        q { val := (s, t), property := ht } \\ q { val := (t, s), property := (_ : Disjoint ↑t ↑s) }\nu : ℕ → ℝ\nu_anti : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nF : ℕ → Set β := fun n => ⋃ (s : ↑b) (_ : Metric.Bounded ↑s ∧ diam ↑s ≤ u n), E s\nx : β\nhx : x ∈ ⋂ (n : ℕ), F n\ns : ℕ → ↑b\nhs : ∀ (n : ℕ), Metric.Bounded ↑(s n) ∧ diam ↑(s n) ≤ u n\nhxs : ∀ (n : ℕ), x ∈ E (s n)\ny : ℕ → γ\nhy : ∀ (n : ℕ), y n ∈ ↑(s n)\nI : ∀ (m n : ℕ), Set.Nonempty (↑(s m) ∩ ↑(s n))\ncauchy_y : CauchySeq y\nthis : Nonempty γ\nz : γ := limUnder atTop y\ny_lim : Tendsto y atTop (𝓝 z)\nhne : f (limUnder atTop y) ≠ x\nv w : Set β\nv_open : IsOpen v\nw_open : IsOpen w\nfzv : f (limUnder atTop y) ∈ v\nxw : x ∈ w\nhvw : Disjoint v w\nδ : ℝ\nδpos : δ > 0\nhδ : ball z δ ⊆ f ⁻¹' v\nn : ℕ\nhn : u n + dist (y n) z < δ\n⊢ False\n[PROOFSTEP]\nhave fsnv : f '' s n ⊆ v := by\n  rw [image_subset_iff]\n  apply Subset.trans _ hδ\n  intro a ha\n  calc\n    dist a z ≤ dist a (y n) + dist (y n) z := dist_triangle _ _ _\n    _ ≤ u n + dist (y n) z := (add_le_add_right ((dist_le_diam_of_mem (hs n).1 ha (hy n)).trans (hs n).2) _)\n    _ < δ := hn\n[GOAL]\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\nβ : Type u_4\ninst✝³ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nf : γ → β\nf_cont : Continuous f\nf_inj : Injective f\nthis✝¹ : UpgradedPolishSpace γ := upgradePolishSpace γ\nb : Set (Set γ)\nb_count : Set.Countable b\nb_nonempty : ¬∅ ∈ b\nhb : IsTopologicalBasis b\nthis✝ : Encodable ↑b\nA : Type u_3 := { p // Disjoint ↑p.fst ↑p.snd }\nq : A → Set β\nhq1 : ∀ (p : A), f '' ↑(↑p).fst ⊆ q p\nhq2 : ∀ (p : A), Disjoint (f '' ↑(↑p).snd) (q p)\nq_meas : ∀ (p : A), MeasurableSet (q p)\nE : ↑b → Set β :=\n  fun s =>\n    closure (f '' ↑s) ∩\n      ⋂ (t : ↑b) (ht : Disjoint ↑s ↑t),\n        q { val := (s, t), property := ht } \\ q { val := (t, s), property := (_ : Disjoint ↑t ↑s) }\nu : ℕ → ℝ\nu_anti : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nF : ℕ → Set β := fun n => ⋃ (s : ↑b) (_ : Metric.Bounded ↑s ∧ diam ↑s ≤ u n), E s\nx : β\nhx : x ∈ ⋂ (n : ℕ), F n\ns : ℕ → ↑b\nhs : ∀ (n : ℕ), Metric.Bounded ↑(s n) ∧ diam ↑(s n) ≤ u n\nhxs : ∀ (n : ℕ), x ∈ E (s n)\ny : ℕ → γ\nhy : ∀ (n : ℕ), y n ∈ ↑(s n)\nI : ∀ (m n : ℕ), Set.Nonempty (↑(s m) ∩ ↑(s n))\ncauchy_y : CauchySeq y\nthis : Nonempty γ\nz : γ := limUnder atTop y\ny_lim : Tendsto y atTop (𝓝 z)\nhne : f (limUnder atTop y) ≠ x\nv w : Set β\nv_open : IsOpen v\nw_open : IsOpen w\nfzv : f (limUnder atTop y) ∈ v\nxw : x ∈ w\nhvw : Disjoint v w\nδ : ℝ\nδpos : δ > 0\nhδ : ball z δ ⊆ f ⁻¹' v\nn : ℕ\nhn : u n + dist (y n) z < δ\n⊢ f '' ↑(s n) ⊆ v\n[PROOFSTEP]\nrw [image_subset_iff]\n[GOAL]\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\nβ : Type u_4\ninst✝³ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nf : γ → β\nf_cont : Continuous f\nf_inj : Injective f\nthis✝¹ : UpgradedPolishSpace γ := upgradePolishSpace γ\nb : Set (Set γ)\nb_count : Set.Countable b\nb_nonempty : ¬∅ ∈ b\nhb : IsTopologicalBasis b\nthis✝ : Encodable ↑b\nA : Type u_3 := { p // Disjoint ↑p.fst ↑p.snd }\nq : A → Set β\nhq1 : ∀ (p : A), f '' ↑(↑p).fst ⊆ q p\nhq2 : ∀ (p : A), Disjoint (f '' ↑(↑p).snd) (q p)\nq_meas : ∀ (p : A), MeasurableSet (q p)\nE : ↑b → Set β :=\n  fun s =>\n    closure (f '' ↑s) ∩\n      ⋂ (t : ↑b) (ht : Disjoint ↑s ↑t),\n        q { val := (s, t), property := ht } \\ q { val := (t, s), property := (_ : Disjoint ↑t ↑s) }\nu : ℕ → ℝ\nu_anti : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nF : ℕ → Set β := fun n => ⋃ (s : ↑b) (_ : Metric.Bounded ↑s ∧ diam ↑s ≤ u n), E s\nx : β\nhx : x ∈ ⋂ (n : ℕ), F n\ns : ℕ → ↑b\nhs : ∀ (n : ℕ), Metric.Bounded ↑(s n) ∧ diam ↑(s n) ≤ u n\nhxs : ∀ (n : ℕ), x ∈ E (s n)\ny : ℕ → γ\nhy : ∀ (n : ℕ), y n ∈ ↑(s n)\nI : ∀ (m n : ℕ), Set.Nonempty (↑(s m) ∩ ↑(s n))\ncauchy_y : CauchySeq y\nthis : Nonempty γ\nz : γ := limUnder atTop y\ny_lim : Tendsto y atTop (𝓝 z)\nhne : f (limUnder atTop y) ≠ x\nv w : Set β\nv_open : IsOpen v\nw_open : IsOpen w\nfzv : f (limUnder atTop y) ∈ v\nxw : x ∈ w\nhvw : Disjoint v w\nδ : ℝ\nδpos : δ > 0\nhδ : ball z δ ⊆ f ⁻¹' v\nn : ℕ\nhn : u n + dist (y n) z < δ\n⊢ ↑(s n) ⊆ f ⁻¹' v\n[PROOFSTEP]\napply Subset.trans _ hδ\n[GOAL]\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\nβ : Type u_4\ninst✝³ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nf : γ → β\nf_cont : Continuous f\nf_inj : Injective f\nthis✝¹ : UpgradedPolishSpace γ := upgradePolishSpace γ\nb : Set (Set γ)\nb_count : Set.Countable b\nb_nonempty : ¬∅ ∈ b\nhb : IsTopologicalBasis b\nthis✝ : Encodable ↑b\nA : Type u_3 := { p // Disjoint ↑p.fst ↑p.snd }\nq : A → Set β\nhq1 : ∀ (p : A), f '' ↑(↑p).fst ⊆ q p\nhq2 : ∀ (p : A), Disjoint (f '' ↑(↑p).snd) (q p)\nq_meas : ∀ (p : A), MeasurableSet (q p)\nE : ↑b → Set β :=\n  fun s =>\n    closure (f '' ↑s) ∩\n      ⋂ (t : ↑b) (ht : Disjoint ↑s ↑t),\n        q { val := (s, t), property := ht } \\ q { val := (t, s), property := (_ : Disjoint ↑t ↑s) }\nu : ℕ → ℝ\nu_anti : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nF : ℕ → Set β := fun n => ⋃ (s : ↑b) (_ : Metric.Bounded ↑s ∧ diam ↑s ≤ u n), E s\nx : β\nhx : x ∈ ⋂ (n : ℕ), F n\ns : ℕ → ↑b\nhs : ∀ (n : ℕ), Metric.Bounded ↑(s n) ∧ diam ↑(s n) ≤ u n\nhxs : ∀ (n : ℕ), x ∈ E (s n)\ny : ℕ → γ\nhy : ∀ (n : ℕ), y n ∈ ↑(s n)\nI : ∀ (m n : ℕ), Set.Nonempty (↑(s m) ∩ ↑(s n))\ncauchy_y : CauchySeq y\nthis : Nonempty γ\nz : γ := limUnder atTop y\ny_lim : Tendsto y atTop (𝓝 z)\nhne : f (limUnder atTop y) ≠ x\nv w : Set β\nv_open : IsOpen v\nw_open : IsOpen w\nfzv : f (limUnder atTop y) ∈ v\nxw : x ∈ w\nhvw : Disjoint v w\nδ : ℝ\nδpos : δ > 0\nhδ : ball z δ ⊆ f ⁻¹' v\nn : ℕ\nhn : u n + dist (y n) z < δ\n⊢ ↑(s n) ⊆ ball z δ\n[PROOFSTEP]\nintro a ha\n[GOAL]\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\nβ : Type u_4\ninst✝³ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nf : γ → β\nf_cont : Continuous f\nf_inj : Injective f\nthis✝¹ : UpgradedPolishSpace γ := upgradePolishSpace γ\nb : Set (Set γ)\nb_count : Set.Countable b\nb_nonempty : ¬∅ ∈ b\nhb : IsTopologicalBasis b\nthis✝ : Encodable ↑b\nA : Type u_3 := { p // Disjoint ↑p.fst ↑p.snd }\nq : A → Set β\nhq1 : ∀ (p : A), f '' ↑(↑p).fst ⊆ q p\nhq2 : ∀ (p : A), Disjoint (f '' ↑(↑p).snd) (q p)\nq_meas : ∀ (p : A), MeasurableSet (q p)\nE : ↑b → Set β :=\n  fun s =>\n    closure (f '' ↑s) ∩\n      ⋂ (t : ↑b) (ht : Disjoint ↑s ↑t),\n        q { val := (s, t), property := ht } \\ q { val := (t, s), property := (_ : Disjoint ↑t ↑s) }\nu : ℕ → ℝ\nu_anti : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nF : ℕ → Set β := fun n => ⋃ (s : ↑b) (_ : Metric.Bounded ↑s ∧ diam ↑s ≤ u n), E s\nx : β\nhx : x ∈ ⋂ (n : ℕ), F n\ns : ℕ → ↑b\nhs : ∀ (n : ℕ), Metric.Bounded ↑(s n) ∧ diam ↑(s n) ≤ u n\nhxs : ∀ (n : ℕ), x ∈ E (s n)\ny : ℕ → γ\nhy : ∀ (n : ℕ), y n ∈ ↑(s n)\nI : ∀ (m n : ℕ), Set.Nonempty (↑(s m) ∩ ↑(s n))\ncauchy_y : CauchySeq y\nthis : Nonempty γ\nz : γ := limUnder atTop y\ny_lim : Tendsto y atTop (𝓝 z)\nhne : f (limUnder atTop y) ≠ x\nv w : Set β\nv_open : IsOpen v\nw_open : IsOpen w\nfzv : f (limUnder atTop y) ∈ v\nxw : x ∈ w\nhvw : Disjoint v w\nδ : ℝ\nδpos : δ > 0\nhδ : ball z δ ⊆ f ⁻¹' v\nn : ℕ\nhn : u n + dist (y n) z < δ\na : γ\nha : a ∈ ↑(s n)\n⊢ a ∈ ball z δ\n[PROOFSTEP]\ncalc\n  dist a z ≤ dist a (y n) + dist (y n) z := dist_triangle _ _ _\n  _ ≤ u n + dist (y n) z := (add_le_add_right ((dist_le_diam_of_mem (hs n).1 ha (hy n)).trans (hs n).2) _)\n  _ < δ := hn\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.h₂.intro.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\nβ : Type u_4\ninst✝³ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nf : γ → β\nf_cont : Continuous f\nf_inj : Injective f\nthis✝¹ : UpgradedPolishSpace γ := upgradePolishSpace γ\nb : Set (Set γ)\nb_count : Set.Countable b\nb_nonempty : ¬∅ ∈ b\nhb : IsTopologicalBasis b\nthis✝ : Encodable ↑b\nA : Type u_3 := { p // Disjoint ↑p.fst ↑p.snd }\nq : A → Set β\nhq1 : ∀ (p : A), f '' ↑(↑p).fst ⊆ q p\nhq2 : ∀ (p : A), Disjoint (f '' ↑(↑p).snd) (q p)\nq_meas : ∀ (p : A), MeasurableSet (q p)\nE : ↑b → Set β :=\n  fun s =>\n    closure (f '' ↑s) ∩\n      ⋂ (t : ↑b) (ht : Disjoint ↑s ↑t),\n        q { val := (s, t), property := ht } \\ q { val := (t, s), property := (_ : Disjoint ↑t ↑s) }\nu : ℕ → ℝ\nu_anti : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nF : ℕ → Set β := fun n => ⋃ (s : ↑b) (_ : Metric.Bounded ↑s ∧ diam ↑s ≤ u n), E s\nx : β\nhx : x ∈ ⋂ (n : ℕ), F n\ns : ℕ → ↑b\nhs : ∀ (n : ℕ), Metric.Bounded ↑(s n) ∧ diam ↑(s n) ≤ u n\nhxs : ∀ (n : ℕ), x ∈ E (s n)\ny : ℕ → γ\nhy : ∀ (n : ℕ), y n ∈ ↑(s n)\nI : ∀ (m n : ℕ), Set.Nonempty (↑(s m) ∩ ↑(s n))\ncauchy_y : CauchySeq y\nthis : Nonempty γ\nz : γ := limUnder atTop y\ny_lim : Tendsto y atTop (𝓝 z)\nhne : f (limUnder atTop y) ≠ x\nv w : Set β\nv_open : IsOpen v\nw_open : IsOpen w\nfzv : f (limUnder atTop y) ∈ v\nxw : x ∈ w\nhvw : Disjoint v w\nδ : ℝ\nδpos : δ > 0\nhδ : ball z δ ⊆ f ⁻¹' v\nn : ℕ\nhn : u n + dist (y n) z < δ\nfsnv : f '' ↑(s n) ⊆ v\n⊢ False\n[PROOFSTEP]\nhave : x ∈ closure v :=\n  closure_mono fsnv\n    (hxs n).1\n      -- this is a contradiction, as `x` is supposed to belong to `w`, which is disjoint from\n          -- the closure of `v`.\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.h₂.intro.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\nβ : Type u_4\ninst✝³ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\nf : γ → β\nf_cont : Continuous f\nf_inj : Injective f\nthis✝² : UpgradedPolishSpace γ := upgradePolishSpace γ\nb : Set (Set γ)\nb_count : Set.Countable b\nb_nonempty : ¬∅ ∈ b\nhb : IsTopologicalBasis b\nthis✝¹ : Encodable ↑b\nA : Type u_3 := { p // Disjoint ↑p.fst ↑p.snd }\nq : A → Set β\nhq1 : ∀ (p : A), f '' ↑(↑p).fst ⊆ q p\nhq2 : ∀ (p : A), Disjoint (f '' ↑(↑p).snd) (q p)\nq_meas : ∀ (p : A), MeasurableSet (q p)\nE : ↑b → Set β :=\n  fun s =>\n    closure (f '' ↑s) ∩\n      ⋂ (t : ↑b) (ht : Disjoint ↑s ↑t),\n        q { val := (s, t), property := ht } \\ q { val := (t, s), property := (_ : Disjoint ↑t ↑s) }\nu : ℕ → ℝ\nu_anti : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nF : ℕ → Set β := fun n => ⋃ (s : ↑b) (_ : Metric.Bounded ↑s ∧ diam ↑s ≤ u n), E s\nx : β\nhx : x ∈ ⋂ (n : ℕ), F n\ns : ℕ → ↑b\nhs : ∀ (n : ℕ), Metric.Bounded ↑(s n) ∧ diam ↑(s n) ≤ u n\nhxs : ∀ (n : ℕ), x ∈ E (s n)\ny : ℕ → γ\nhy : ∀ (n : ℕ), y n ∈ ↑(s n)\nI : ∀ (m n : ℕ), Set.Nonempty (↑(s m) ∩ ↑(s n))\ncauchy_y : CauchySeq y\nthis✝ : Nonempty γ\nz : γ := limUnder atTop y\ny_lim : Tendsto y atTop (𝓝 z)\nhne : f (limUnder atTop y) ≠ x\nv w : Set β\nv_open : IsOpen v\nw_open : IsOpen w\nfzv : f (limUnder atTop y) ∈ v\nxw : x ∈ w\nhvw : Disjoint v w\nδ : ℝ\nδpos : δ > 0\nhδ : ball z δ ⊆ f ⁻¹' v\nn : ℕ\nhn : u n + dist (y n) z < δ\nfsnv : f '' ↑(s n) ⊆ v\nthis : x ∈ closure v\n⊢ False\n[PROOFSTEP]\nexact disjoint_left.1 (hvw.closure_left w_open) this xw\n[GOAL]\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\nβ : Type u_4\ninst✝³ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\ns : Set γ\nhs : IsClosed s\nf : γ → β\nf_cont : ContinuousOn f s\nf_inj : InjOn f s\n⊢ MeasurableSet (f '' s)\n[PROOFSTEP]\nrw [image_eq_range]\n[GOAL]\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\nβ : Type u_4\ninst✝³ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\ns : Set γ\nhs : IsClosed s\nf : γ → β\nf_cont : ContinuousOn f s\nf_inj : InjOn f s\n⊢ MeasurableSet (range fun x => f ↑x)\n[PROOFSTEP]\nhaveI : PolishSpace s := IsClosed.polishSpace hs\n[GOAL]\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\nβ : Type u_4\ninst✝³ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\ns : Set γ\nhs : IsClosed s\nf : γ → β\nf_cont : ContinuousOn f s\nf_inj : InjOn f s\nthis : PolishSpace ↑s\n⊢ MeasurableSet (range fun x => f ↑x)\n[PROOFSTEP]\napply measurableSet_range_of_continuous_injective\n[GOAL]\ncase f_cont\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\nβ : Type u_4\ninst✝³ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\ns : Set γ\nhs : IsClosed s\nf : γ → β\nf_cont : ContinuousOn f s\nf_inj : InjOn f s\nthis : PolishSpace ↑s\n⊢ Continuous fun x => f ↑x\n[PROOFSTEP]\nrwa [continuousOn_iff_continuous_restrict] at f_cont \n[GOAL]\ncase f_inj\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\nβ : Type u_4\ninst✝³ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\ns : Set γ\nhs : IsClosed s\nf : γ → β\nf_cont : ContinuousOn f s\nf_inj : InjOn f s\nthis : PolishSpace ↑s\n⊢ Injective fun x => f ↑x\n[PROOFSTEP]\nrwa [injOn_iff_injective] at f_inj \n[GOAL]\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\ninst✝³ : MeasurableSpace γ\nhγb : BorelSpace γ\nβ : Type u_4\ntβ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\ns : Set γ\nf : γ → β\nhs : MeasurableSet s\nf_cont : ContinuousOn f s\nf_inj : InjOn f s\n⊢ MeasurableSet (f '' s)\n[PROOFSTEP]\nobtain ⟨t', t't, t'_polish, s_closed, _⟩ :\n  ∃ t' : TopologicalSpace γ, t' ≤ tγ ∧ @PolishSpace γ t' ∧ IsClosed[t'] s ∧ IsOpen[t'] s := hs.isClopenable\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\ninst✝³ : MeasurableSpace γ\nhγb : BorelSpace γ\nβ : Type u_4\ntβ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\ns : Set γ\nf : γ → β\nhs : MeasurableSet s\nf_cont : ContinuousOn f s\nf_inj : InjOn f s\nt' : TopologicalSpace γ\nt't : t' ≤ tγ\nt'_polish : PolishSpace γ\ns_closed : IsClosed s\nright✝ : IsOpen s\n⊢ MeasurableSet (f '' s)\n[PROOFSTEP]\nexact\n  @IsClosed.measurableSet_image_of_continuousOn_injOn γ t' t'_polish β _ _ _ _ s s_closed f (f_cont.mono_dom t't) f_inj\n[GOAL]\nα : Type u_1\ninst✝⁶ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁵ : PolishSpace γ\ninst✝⁴ : MeasurableSpace γ\nhγb : BorelSpace γ\nβ : Type u_4\ntβ : TopologicalSpace β\ninst✝³ : T2Space β\ninst✝² : MeasurableSpace β\ninst✝¹ : BorelSpace β\ns : Set γ\nf : γ → β\ninst✝ : SecondCountableTopology β\nhs : MeasurableSet s\nf_meas : Measurable f\nf_inj : InjOn f s\n⊢ MeasurableSet (f '' s)\n[PROOFSTEP]\nobtain ⟨t', t't, f_cont, t'_polish⟩ :\n  ∃ t' : TopologicalSpace γ, t' ≤ tγ ∧ @Continuous γ β t' tβ f ∧ @PolishSpace γ t' := f_meas.exists_continuous\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\ninst✝⁶ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁵ : PolishSpace γ\ninst✝⁴ : MeasurableSpace γ\nhγb : BorelSpace γ\nβ : Type u_4\ntβ : TopologicalSpace β\ninst✝³ : T2Space β\ninst✝² : MeasurableSpace β\ninst✝¹ : BorelSpace β\ns : Set γ\nf : γ → β\ninst✝ : SecondCountableTopology β\nhs : MeasurableSet s\nf_meas : Measurable f\nf_inj : InjOn f s\nt' : TopologicalSpace γ\nt't : t' ≤ tγ\nf_cont : Continuous f\nt'_polish : PolishSpace γ\n⊢ MeasurableSet (f '' s)\n[PROOFSTEP]\nhave M : MeasurableSet[@borel γ t'] s :=\n  @Continuous.measurable γ γ t' (@borel γ t')\n    (@BorelSpace.opensMeasurable γ t' (@borel γ t') (@BorelSpace.mk _ _ (borel γ) rfl)) tγ _ _ _\n    (continuous_id_of_le t't) s hs\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\ninst✝⁶ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁵ : PolishSpace γ\ninst✝⁴ : MeasurableSpace γ\nhγb : BorelSpace γ\nβ : Type u_4\ntβ : TopologicalSpace β\ninst✝³ : T2Space β\ninst✝² : MeasurableSpace β\ninst✝¹ : BorelSpace β\ns : Set γ\nf : γ → β\ninst✝ : SecondCountableTopology β\nhs : MeasurableSet s\nf_meas : Measurable f\nf_inj : InjOn f s\nt' : TopologicalSpace γ\nt't : t' ≤ tγ\nf_cont : Continuous f\nt'_polish : PolishSpace γ\nM : MeasurableSet s\n⊢ MeasurableSet (f '' s)\n[PROOFSTEP]\nexact\n  @MeasurableSet.image_of_continuousOn_injOn γ t' t'_polish (@borel γ t') (@BorelSpace.mk _ _ (borel γ) rfl) β _ _ _ _ s\n    f M (@Continuous.continuousOn γ β t' tβ f s f_cont) f_inj\n[GOAL]\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\ninst✝³ : MeasurableSpace γ\nhγb : BorelSpace γ\nβ : Type u_4\ntβ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\ns : Set γ\nf : γ → β\nhs : MeasurableSet s\nf_cont : ContinuousOn f s\nf_inj : InjOn f s\n⊢ ∀ ⦃s_1 : Set ↑s⦄, MeasurableSet s_1 → MeasurableSet (restrict s f '' s_1)\n[PROOFSTEP]\nintro u hu\n[GOAL]\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\ninst✝³ : MeasurableSpace γ\nhγb : BorelSpace γ\nβ : Type u_4\ntβ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\ns : Set γ\nf : γ → β\nhs : MeasurableSet s\nf_cont : ContinuousOn f s\nf_inj : InjOn f s\nu : Set ↑s\nhu : MeasurableSet u\n⊢ MeasurableSet (restrict s f '' u)\n[PROOFSTEP]\nhave A : MeasurableSet (((↑) : s → γ) '' u) := (MeasurableEmbedding.subtype_coe hs).measurableSet_image.2 hu\n[GOAL]\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\ninst✝³ : MeasurableSpace γ\nhγb : BorelSpace γ\nβ : Type u_4\ntβ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\ns : Set γ\nf : γ → β\nhs : MeasurableSet s\nf_cont : ContinuousOn f s\nf_inj : InjOn f s\nu : Set ↑s\nhu : MeasurableSet u\nA : MeasurableSet (Subtype.val '' u)\n⊢ MeasurableSet (restrict s f '' u)\n[PROOFSTEP]\nhave B : MeasurableSet (f '' (((↑) : s → γ) '' u)) :=\n  A.image_of_continuousOn_injOn (f_cont.mono (Subtype.coe_image_subset s u)) (f_inj.mono (Subtype.coe_image_subset s u))\n[GOAL]\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\ninst✝³ : MeasurableSpace γ\nhγb : BorelSpace γ\nβ : Type u_4\ntβ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\ns : Set γ\nf : γ → β\nhs : MeasurableSet s\nf_cont : ContinuousOn f s\nf_inj : InjOn f s\nu : Set ↑s\nhu : MeasurableSet u\nA : MeasurableSet (Subtype.val '' u)\nB : MeasurableSet (f '' (Subtype.val '' u))\n⊢ MeasurableSet (restrict s f '' u)\n[PROOFSTEP]\nrwa [← image_comp] at B \n[GOAL]\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\ninst✝³ : MeasurableSpace γ\nhγb : BorelSpace γ\nβ : Type u_4\ntβ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\ns : Set γ\nf : γ → β\n⊢ IsClopenable s ↔ MeasurableSet s\n[PROOFSTEP]\nrefine'\n  ⟨fun hs => _, fun hs => hs.isClopenable⟩\n    -- consider a finer topology `t'` in which `s` is open and closed.\n[GOAL]\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\ninst✝³ : MeasurableSpace γ\nhγb : BorelSpace γ\nβ : Type u_4\ntβ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\ns : Set γ\nf : γ → β\nhs : IsClopenable s\n⊢ MeasurableSet s\n[PROOFSTEP]\nobtain ⟨t', t't, t'_polish, s_closed, _⟩ :\n  ∃ t' : TopologicalSpace γ, t' ≤ tγ ∧ @PolishSpace γ t' ∧ IsClosed[t'] s ∧ IsOpen[t'] s := hs\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\ninst✝³ : MeasurableSpace γ\nhγb : BorelSpace γ\nβ : Type u_4\ntβ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\ns : Set γ\nf : γ → β\nt' : TopologicalSpace γ\nt't : t' ≤ tγ\nt'_polish : PolishSpace γ\ns_closed : IsClosed s\nright✝ : IsOpen s\n⊢ MeasurableSet s\n[PROOFSTEP]\nhave C : @Continuous γ γ t' tγ id := continuous_id_of_le t't\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\ninst✝³ : MeasurableSpace γ\nhγb : BorelSpace γ\nβ : Type u_4\ntβ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\ns : Set γ\nf : γ → β\nt' : TopologicalSpace γ\nt't : t' ≤ tγ\nt'_polish : PolishSpace γ\ns_closed : IsClosed s\nright✝ : IsOpen s\nC : Continuous id\n⊢ MeasurableSet s\n[PROOFSTEP]\nhave E :=\n  @Continuous.measurableEmbedding γ t' t'_polish (@borel γ t') (@BorelSpace.mk _ _ (borel γ) rfl) γ tγ\n    (@PolishSpace.t2Space γ tγ _) _ _ id C injective_id\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\ninst✝³ : MeasurableSpace γ\nhγb : BorelSpace γ\nβ : Type u_4\ntβ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\ns : Set γ\nf : γ → β\nt' : TopologicalSpace γ\nt't : t' ≤ tγ\nt'_polish : PolishSpace γ\ns_closed : IsClosed s\nright✝ : IsOpen s\nC : Continuous id\nE : MeasurableEmbedding id\n⊢ MeasurableSet s\n[PROOFSTEP]\nhave M : @MeasurableSet γ (@borel γ t') s :=\n  @IsClosed.measurableSet γ s t' (@borel γ t')\n    (@BorelSpace.opensMeasurable γ t' (@borel γ t') (@BorelSpace.mk _ _ (borel γ) rfl)) s_closed\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\ninst✝³ : MeasurableSpace γ\nhγb : BorelSpace γ\nβ : Type u_4\ntβ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\ns : Set γ\nf : γ → β\nt' : TopologicalSpace γ\nt't : t' ≤ tγ\nt'_polish : PolishSpace γ\ns_closed : IsClosed s\nright✝ : IsOpen s\nC : Continuous id\nE : MeasurableEmbedding id\nM : MeasurableSet s\n⊢ MeasurableSet s\n[PROOFSTEP]\nconvert E.measurableSet_image.2 M\n[GOAL]\ncase h.e'_3\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁴ : PolishSpace γ\ninst✝³ : MeasurableSpace γ\nhγb : BorelSpace γ\nβ : Type u_4\ntβ : TopologicalSpace β\ninst✝² : T2Space β\ninst✝¹ : MeasurableSpace β\ninst✝ : BorelSpace β\ns : Set γ\nf : γ → β\nt' : TopologicalSpace γ\nt't : t' ≤ tγ\nt'_polish : PolishSpace γ\ns_closed : IsClosed s\nright✝ : IsOpen s\nC : Continuous id\nE : MeasurableEmbedding id\nM : MeasurableSet s\n⊢ s = id '' s\n[PROOFSTEP]\nsimp only [id.def, image_id']\n[GOAL]\nα : Type u_1\ninst✝⁷ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁶ : PolishSpace γ\ninst✝⁵ : MeasurableSpace γ\nhγb : BorelSpace γ\nβ : Type u_4\ntβ : TopologicalSpace β\ninst✝⁴ : T2Space β\ninst✝³ : MeasurableSpace β\ninst✝² : BorelSpace β\ns : Set γ\nf✝ : γ → β\nhγ : OpensMeasurableSpace γ\ninst✝¹ : Countable ι\nl : Filter ι\ninst✝ : IsCountablyGenerated l\nf : ι → β → γ\nhf : ∀ (i : ι), Measurable (f i)\n⊢ MeasurableSet {x | ∃ c, Tendsto (fun n => f n x) l (𝓝 c)}\n[PROOFSTEP]\nrcases l.eq_or_neBot with rfl | hl\n[GOAL]\ncase inl\nα : Type u_1\ninst✝⁷ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁶ : PolishSpace γ\ninst✝⁵ : MeasurableSpace γ\nhγb : BorelSpace γ\nβ : Type u_4\ntβ : TopologicalSpace β\ninst✝⁴ : T2Space β\ninst✝³ : MeasurableSpace β\ninst✝² : BorelSpace β\ns : Set γ\nf✝ : γ → β\nhγ : OpensMeasurableSpace γ\ninst✝¹ : Countable ι\nf : ι → β → γ\nhf : ∀ (i : ι), Measurable (f i)\ninst✝ : IsCountablyGenerated ⊥\n⊢ MeasurableSet {x | ∃ c, Tendsto (fun n => f n x) ⊥ (𝓝 c)}\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\nα : Type u_1\ninst✝⁷ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁶ : PolishSpace γ\ninst✝⁵ : MeasurableSpace γ\nhγb : BorelSpace γ\nβ : Type u_4\ntβ : TopologicalSpace β\ninst✝⁴ : T2Space β\ninst✝³ : MeasurableSpace β\ninst✝² : BorelSpace β\ns : Set γ\nf✝ : γ → β\nhγ : OpensMeasurableSpace γ\ninst✝¹ : Countable ι\nl : Filter ι\ninst✝ : IsCountablyGenerated l\nf : ι → β → γ\nhf : ∀ (i : ι), Measurable (f i)\nhl : NeBot l\n⊢ MeasurableSet {x | ∃ c, Tendsto (fun n => f n x) l (𝓝 c)}\n[PROOFSTEP]\nletI := upgradePolishSpace γ\n[GOAL]\ncase inr\nα : Type u_1\ninst✝⁷ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁶ : PolishSpace γ\ninst✝⁵ : MeasurableSpace γ\nhγb : BorelSpace γ\nβ : Type u_4\ntβ : TopologicalSpace β\ninst✝⁴ : T2Space β\ninst✝³ : MeasurableSpace β\ninst✝² : BorelSpace β\ns : Set γ\nf✝ : γ → β\nhγ : OpensMeasurableSpace γ\ninst✝¹ : Countable ι\nl : Filter ι\ninst✝ : IsCountablyGenerated l\nf : ι → β → γ\nhf : ∀ (i : ι), Measurable (f i)\nhl : NeBot l\nthis : UpgradedPolishSpace γ := upgradePolishSpace γ\n⊢ MeasurableSet {x | ∃ c, Tendsto (fun n => f n x) l (𝓝 c)}\n[PROOFSTEP]\nrcases l.exists_antitone_basis with ⟨u, hu⟩\n[GOAL]\ncase inr.intro\nα : Type u_1\ninst✝⁷ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁶ : PolishSpace γ\ninst✝⁵ : MeasurableSpace γ\nhγb : BorelSpace γ\nβ : Type u_4\ntβ : TopologicalSpace β\ninst✝⁴ : T2Space β\ninst✝³ : MeasurableSpace β\ninst✝² : BorelSpace β\ns : Set γ\nf✝ : γ → β\nhγ : OpensMeasurableSpace γ\ninst✝¹ : Countable ι\nl : Filter ι\ninst✝ : IsCountablyGenerated l\nf : ι → β → γ\nhf : ∀ (i : ι), Measurable (f i)\nhl : NeBot l\nthis : UpgradedPolishSpace γ := upgradePolishSpace γ\nu : ℕ → Set ι\nhu : HasAntitoneBasis l u\n⊢ MeasurableSet {x | ∃ c, Tendsto (fun n => f n x) l (𝓝 c)}\n[PROOFSTEP]\nsimp_rw [← cauchy_map_iff_exists_tendsto]\n[GOAL]\ncase inr.intro\nα : Type u_1\ninst✝⁷ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁶ : PolishSpace γ\ninst✝⁵ : MeasurableSpace γ\nhγb : BorelSpace γ\nβ : Type u_4\ntβ : TopologicalSpace β\ninst✝⁴ : T2Space β\ninst✝³ : MeasurableSpace β\ninst✝² : BorelSpace β\ns : Set γ\nf✝ : γ → β\nhγ : OpensMeasurableSpace γ\ninst✝¹ : Countable ι\nl : Filter ι\ninst✝ : IsCountablyGenerated l\nf : ι → β → γ\nhf : ∀ (i : ι), Measurable (f i)\nhl : NeBot l\nthis : UpgradedPolishSpace γ := upgradePolishSpace γ\nu : ℕ → Set ι\nhu : HasAntitoneBasis l u\n⊢ MeasurableSet {x | Cauchy (map (fun n => f n x) l)}\n[PROOFSTEP]\nchange MeasurableSet {x | _ ∧ _}\n[GOAL]\ncase inr.intro\nα : Type u_1\ninst✝⁷ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁶ : PolishSpace γ\ninst✝⁵ : MeasurableSpace γ\nhγb : BorelSpace γ\nβ : Type u_4\ntβ : TopologicalSpace β\ninst✝⁴ : T2Space β\ninst✝³ : MeasurableSpace β\ninst✝² : BorelSpace β\ns : Set γ\nf✝ : γ → β\nhγ : OpensMeasurableSpace γ\ninst✝¹ : Countable ι\nl : Filter ι\ninst✝ : IsCountablyGenerated l\nf : ι → β → γ\nhf : ∀ (i : ι), Measurable (f i)\nhl : NeBot l\nthis : UpgradedPolishSpace γ := upgradePolishSpace γ\nu : ℕ → Set ι\nhu : HasAntitoneBasis l u\n⊢ MeasurableSet {x | NeBot (map (fun n => f n x) l) ∧ map (fun n => f n x) l ×ˢ map (fun n => f n x) l ≤ uniformity γ}\n[PROOFSTEP]\nhave :\n  ∀ x,\n    (map (fun i => f i x) l ×ˢ map (fun i => f i x) l).HasAntitoneBasis fun n =>\n      ((fun i => f i x) '' u n) ×ˢ ((fun i => f i x) '' u n) :=\n  fun x => hu.map.prod hu.map\n[GOAL]\ncase inr.intro\nα : Type u_1\ninst✝⁷ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁶ : PolishSpace γ\ninst✝⁵ : MeasurableSpace γ\nhγb : BorelSpace γ\nβ : Type u_4\ntβ : TopologicalSpace β\ninst✝⁴ : T2Space β\ninst✝³ : MeasurableSpace β\ninst✝² : BorelSpace β\ns : Set γ\nf✝ : γ → β\nhγ : OpensMeasurableSpace γ\ninst✝¹ : Countable ι\nl : Filter ι\ninst✝ : IsCountablyGenerated l\nf : ι → β → γ\nhf : ∀ (i : ι), Measurable (f i)\nhl : NeBot l\nthis✝ : UpgradedPolishSpace γ := upgradePolishSpace γ\nu : ℕ → Set ι\nhu : HasAntitoneBasis l u\nthis :\n  ∀ (x : β),\n    HasAntitoneBasis (map (fun i => f i x) l ×ˢ map (fun i => f i x) l) fun n =>\n      ((fun i => f i x) '' u n) ×ˢ ((fun i => f i x) '' u n)\n⊢ MeasurableSet {x | NeBot (map (fun n => f n x) l) ∧ map (fun n => f n x) l ×ˢ map (fun n => f n x) l ≤ uniformity γ}\n[PROOFSTEP]\nsimp_rw [and_iff_right (hl.map _),\n  Filter.HasBasis.le_basis_iff (this _).toHasBasis Metric.uniformity_basis_dist_inv_nat_succ, Set.setOf_forall]\n[GOAL]\ncase inr.intro\nα : Type u_1\ninst✝⁷ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁶ : PolishSpace γ\ninst✝⁵ : MeasurableSpace γ\nhγb : BorelSpace γ\nβ : Type u_4\ntβ : TopologicalSpace β\ninst✝⁴ : T2Space β\ninst✝³ : MeasurableSpace β\ninst✝² : BorelSpace β\ns : Set γ\nf✝ : γ → β\nhγ : OpensMeasurableSpace γ\ninst✝¹ : Countable ι\nl : Filter ι\ninst✝ : IsCountablyGenerated l\nf : ι → β → γ\nhf : ∀ (i : ι), Measurable (f i)\nhl : NeBot l\nthis✝ : UpgradedPolishSpace γ := upgradePolishSpace γ\nu : ℕ → Set ι\nhu : HasAntitoneBasis l u\nthis :\n  ∀ (x : β),\n    HasAntitoneBasis (map (fun i => f i x) l ×ˢ map (fun i => f i x) l) fun n =>\n      ((fun i => f i x) '' u n) ×ˢ ((fun i => f i x) '' u n)\n⊢ MeasurableSet\n    (⋂ (i : ℕ) (_ : True),\n      {x |\n        ∃ i_2,\n          True ∧ ((fun n => f n x) '' u i_2) ×ˢ ((fun n => f n x) '' u i_2) ⊆ {p | dist p.fst p.snd < 1 / (↑i + 1)}})\n[PROOFSTEP]\nrefine' MeasurableSet.biInter Set.countable_univ fun K _ => _\n[GOAL]\ncase inr.intro\nα : Type u_1\ninst✝⁷ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁶ : PolishSpace γ\ninst✝⁵ : MeasurableSpace γ\nhγb : BorelSpace γ\nβ : Type u_4\ntβ : TopologicalSpace β\ninst✝⁴ : T2Space β\ninst✝³ : MeasurableSpace β\ninst✝² : BorelSpace β\ns : Set γ\nf✝ : γ → β\nhγ : OpensMeasurableSpace γ\ninst✝¹ : Countable ι\nl : Filter ι\ninst✝ : IsCountablyGenerated l\nf : ι → β → γ\nhf : ∀ (i : ι), Measurable (f i)\nhl : NeBot l\nthis✝ : UpgradedPolishSpace γ := upgradePolishSpace γ\nu : ℕ → Set ι\nhu : HasAntitoneBasis l u\nthis :\n  ∀ (x : β),\n    HasAntitoneBasis (map (fun i => f i x) l ×ˢ map (fun i => f i x) l) fun n =>\n      ((fun i => f i x) '' u n) ×ˢ ((fun i => f i x) '' u n)\nK : ℕ\nx✝ : K ∈ fun i => True\n⊢ MeasurableSet\n    {x | ∃ i, True ∧ ((fun n => f n x) '' u i) ×ˢ ((fun n => f n x) '' u i) ⊆ {p | dist p.fst p.snd < 1 / (↑K + 1)}}\n[PROOFSTEP]\nsimp_rw [Set.setOf_exists, true_and]\n[GOAL]\ncase inr.intro\nα : Type u_1\ninst✝⁷ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁶ : PolishSpace γ\ninst✝⁵ : MeasurableSpace γ\nhγb : BorelSpace γ\nβ : Type u_4\ntβ : TopologicalSpace β\ninst✝⁴ : T2Space β\ninst✝³ : MeasurableSpace β\ninst✝² : BorelSpace β\ns : Set γ\nf✝ : γ → β\nhγ : OpensMeasurableSpace γ\ninst✝¹ : Countable ι\nl : Filter ι\ninst✝ : IsCountablyGenerated l\nf : ι → β → γ\nhf : ∀ (i : ι), Measurable (f i)\nhl : NeBot l\nthis✝ : UpgradedPolishSpace γ := upgradePolishSpace γ\nu : ℕ → Set ι\nhu : HasAntitoneBasis l u\nthis :\n  ∀ (x : β),\n    HasAntitoneBasis (map (fun i => f i x) l ×ˢ map (fun i => f i x) l) fun n =>\n      ((fun i => f i x) '' u n) ×ˢ ((fun i => f i x) '' u n)\nK : ℕ\nx✝ : K ∈ fun i => True\n⊢ MeasurableSet\n    (⋃ (i : ℕ), {x | ((fun n => f n x) '' u i) ×ˢ ((fun n => f n x) '' u i) ⊆ {p | dist p.fst p.snd < 1 / (↑K + 1)}})\n[PROOFSTEP]\nrefine' MeasurableSet.iUnion fun N => _\n[GOAL]\ncase inr.intro\nα : Type u_1\ninst✝⁷ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁶ : PolishSpace γ\ninst✝⁵ : MeasurableSpace γ\nhγb : BorelSpace γ\nβ : Type u_4\ntβ : TopologicalSpace β\ninst✝⁴ : T2Space β\ninst✝³ : MeasurableSpace β\ninst✝² : BorelSpace β\ns : Set γ\nf✝ : γ → β\nhγ : OpensMeasurableSpace γ\ninst✝¹ : Countable ι\nl : Filter ι\ninst✝ : IsCountablyGenerated l\nf : ι → β → γ\nhf : ∀ (i : ι), Measurable (f i)\nhl : NeBot l\nthis✝ : UpgradedPolishSpace γ := upgradePolishSpace γ\nu : ℕ → Set ι\nhu : HasAntitoneBasis l u\nthis :\n  ∀ (x : β),\n    HasAntitoneBasis (map (fun i => f i x) l ×ˢ map (fun i => f i x) l) fun n =>\n      ((fun i => f i x) '' u n) ×ˢ ((fun i => f i x) '' u n)\nK : ℕ\nx✝ : K ∈ fun i => True\nN : ℕ\n⊢ MeasurableSet {x | ((fun n => f n x) '' u N) ×ˢ ((fun n => f n x) '' u N) ⊆ {p | dist p.fst p.snd < 1 / (↑K + 1)}}\n[PROOFSTEP]\nsimp_rw [prod_image_image_eq, image_subset_iff, prod_subset_iff, Set.setOf_forall]\n[GOAL]\ncase inr.intro\nα : Type u_1\ninst✝⁷ : TopologicalSpace α\nι : Type u_2\nγ : Type u_3\ntγ : TopologicalSpace γ\ninst✝⁶ : PolishSpace γ\ninst✝⁵ : MeasurableSpace γ\nhγb : BorelSpace γ\nβ : Type u_4\ntβ : TopologicalSpace β\ninst✝⁴ : T2Space β\ninst✝³ : MeasurableSpace β\ninst✝² : BorelSpace β\ns : Set γ\nf✝ : γ → β\nhγ : OpensMeasurableSpace γ\ninst✝¹ : Countable ι\nl : Filter ι\ninst✝ : IsCountablyGenerated l\nf : ι → β → γ\nhf : ∀ (i : ι), Measurable (f i)\nhl : NeBot l\nthis✝ : UpgradedPolishSpace γ := upgradePolishSpace γ\nu : ℕ → Set ι\nhu : HasAntitoneBasis l u\nthis :\n  ∀ (x : β),\n    HasAntitoneBasis (map (fun i => f i x) l ×ˢ map (fun i => f i x) l) fun n =>\n      ((fun i => f i x) '' u n) ×ˢ ((fun i => f i x) '' u n)\nK : ℕ\nx✝ : K ∈ fun i => True\nN : ℕ\n⊢ MeasurableSet\n    (⋂ (i : ι) (_ : i ∈ u N) (i_1 : ι) (_ : i_1 ∈ u N),\n      {x | (i, i_1) ∈ (fun p => (f p.fst x, f p.snd x)) ⁻¹' {p | dist p.fst p.snd < 1 / (↑K + 1)}})\n[PROOFSTEP]\nexact\n  MeasurableSet.biInter (to_countable (u N)) fun i _ =>\n    MeasurableSet.biInter (to_countable (u N)) fun j _ =>\n      measurableSet_lt (Measurable.dist (hf i) (hf j)) measurable_const\n[GOAL]\nα : Type u_1\ninst✝¹ : TopologicalSpace α\nι : Type u_2\nh : Countable α\ninst✝ : DiscreteTopology α\n⊢ PolishSpace α\n[PROOFSTEP]\nobtain ⟨f, hf⟩ := h.exists_injective_nat\n[GOAL]\ncase intro\nα : Type u_1\ninst✝¹ : TopologicalSpace α\nι : Type u_2\nh : Countable α\ninst✝ : DiscreteTopology α\nf : α → ℕ\nhf : Injective f\n⊢ PolishSpace α\n[PROOFSTEP]\nhave : ClosedEmbedding f :=\n  by\n  apply closedEmbedding_of_continuous_injective_closed continuous_of_discreteTopology hf\n  exact fun t _ => isClosed_discrete _\n[GOAL]\nα : Type u_1\ninst✝¹ : TopologicalSpace α\nι : Type u_2\nh : Countable α\ninst✝ : DiscreteTopology α\nf : α → ℕ\nhf : Injective f\n⊢ ClosedEmbedding f\n[PROOFSTEP]\napply closedEmbedding_of_continuous_injective_closed continuous_of_discreteTopology hf\n[GOAL]\nα : Type u_1\ninst✝¹ : TopologicalSpace α\nι : Type u_2\nh : Countable α\ninst✝ : DiscreteTopology α\nf : α → ℕ\nhf : Injective f\n⊢ IsClosedMap f\n[PROOFSTEP]\nexact fun t _ => isClosed_discrete _\n[GOAL]\ncase intro\nα : Type u_1\ninst✝¹ : TopologicalSpace α\nι : Type u_2\nh : Countable α\ninst✝ : DiscreteTopology α\nf : α → ℕ\nhf : Injective f\nthis : ClosedEmbedding f\n⊢ PolishSpace α\n[PROOFSTEP]\nexact this.polishSpace\n[GOAL]\nα : Type u_1\ninst✝⁷ : TopologicalSpace α\nι : Type u_2\nβ : Type u_3\ninst✝⁶ : TopologicalSpace β\ninst✝⁵ : PolishSpace α\ninst✝⁴ : PolishSpace β\ninst✝³ : MeasurableSpace α\ninst✝² : MeasurableSpace β\ninst✝¹ : BorelSpace α\ninst✝ : BorelSpace β\nh : ¬Countable α\n⊢ α ≃ᵐ (ℕ → Bool)\n[PROOFSTEP]\napply Nonempty.some\n[GOAL]\ncase h\nα : Type u_1\ninst✝⁷ : TopologicalSpace α\nι : Type u_2\nβ : Type u_3\ninst✝⁶ : TopologicalSpace β\ninst✝⁵ : PolishSpace α\ninst✝⁴ : PolishSpace β\ninst✝³ : MeasurableSpace α\ninst✝² : MeasurableSpace β\ninst✝¹ : BorelSpace α\ninst✝ : BorelSpace β\nh : ¬Countable α\n⊢ Nonempty (α ≃ᵐ (ℕ → Bool))\n[PROOFSTEP]\nobtain ⟨f, -, fcts, finj⟩ :=\n  isClosed_univ.exists_nat_bool_injection_of_not_countable\n    (by rwa [← countable_coe_iff, (Equiv.Set.univ _).countable_iff])\n[GOAL]\nα : Type u_1\ninst✝⁷ : TopologicalSpace α\nι : Type u_2\nβ : Type u_3\ninst✝⁶ : TopologicalSpace β\ninst✝⁵ : PolishSpace α\ninst✝⁴ : PolishSpace β\ninst✝³ : MeasurableSpace α\ninst✝² : MeasurableSpace β\ninst✝¹ : BorelSpace α\ninst✝ : BorelSpace β\nh : ¬Countable α\n⊢ ¬Set.Countable univ\n[PROOFSTEP]\nrwa [← countable_coe_iff, (Equiv.Set.univ _).countable_iff]\n[GOAL]\ncase h.intro.intro.intro\nα : Type u_1\ninst✝⁷ : TopologicalSpace α\nι : Type u_2\nβ : Type u_3\ninst✝⁶ : TopologicalSpace β\ninst✝⁵ : PolishSpace α\ninst✝⁴ : PolishSpace β\ninst✝³ : MeasurableSpace α\ninst✝² : MeasurableSpace β\ninst✝¹ : BorelSpace α\ninst✝ : BorelSpace β\nh : ¬Countable α\nf : (ℕ → Bool) → α\nfcts : Continuous f\nfinj : Injective f\n⊢ Nonempty (α ≃ᵐ (ℕ → Bool))\n[PROOFSTEP]\nobtain ⟨g, gmeas, ginj⟩ := MeasurableSpace.measurable_injection_nat_bool_of_countablyGenerated α\n[GOAL]\ncase h.intro.intro.intro.intro.intro\nα : Type u_1\ninst✝⁷ : TopologicalSpace α\nι : Type u_2\nβ : Type u_3\ninst✝⁶ : TopologicalSpace β\ninst✝⁵ : PolishSpace α\ninst✝⁴ : PolishSpace β\ninst✝³ : MeasurableSpace α\ninst✝² : MeasurableSpace β\ninst✝¹ : BorelSpace α\ninst✝ : BorelSpace β\nh : ¬Countable α\nf : (ℕ → Bool) → α\nfcts : Continuous f\nfinj : Injective f\ng : α → ℕ → Bool\ngmeas : Measurable g\nginj : Injective g\n⊢ Nonempty (α ≃ᵐ (ℕ → Bool))\n[PROOFSTEP]\nexact ⟨borelSchroederBernstein gmeas ginj fcts.measurable finj⟩\n[GOAL]\nα : Type u_1\ninst✝⁷ : TopologicalSpace α\nι : Type u_2\nβ : Type u_3\ninst✝⁶ : TopologicalSpace β\ninst✝⁵ : PolishSpace α\ninst✝⁴ : PolishSpace β\ninst✝³ : MeasurableSpace α\ninst✝² : MeasurableSpace β\ninst✝¹ : BorelSpace α\ninst✝ : BorelSpace β\ne : α ≃ β\n⊢ α ≃ᵐ β\n[PROOFSTEP]\nby_cases h : Countable α\n[GOAL]\ncase pos\nα : Type u_1\ninst✝⁷ : TopologicalSpace α\nι : Type u_2\nβ : Type u_3\ninst✝⁶ : TopologicalSpace β\ninst✝⁵ : PolishSpace α\ninst✝⁴ : PolishSpace β\ninst✝³ : MeasurableSpace α\ninst✝² : MeasurableSpace β\ninst✝¹ : BorelSpace α\ninst✝ : BorelSpace β\ne : α ≃ β\nh : Countable α\n⊢ α ≃ᵐ β\n[PROOFSTEP]\nletI := Countable.of_equiv α e\n[GOAL]\ncase pos\nα : Type u_1\ninst✝⁷ : TopologicalSpace α\nι : Type u_2\nβ : Type u_3\ninst✝⁶ : TopologicalSpace β\ninst✝⁵ : PolishSpace α\ninst✝⁴ : PolishSpace β\ninst✝³ : MeasurableSpace α\ninst✝² : MeasurableSpace β\ninst✝¹ : BorelSpace α\ninst✝ : BorelSpace β\ne : α ≃ β\nh : Countable α\nthis : Countable β := Countable.of_equiv α e\n⊢ α ≃ᵐ β\n[PROOFSTEP]\nrefine ⟨e, ?_, ?_⟩\n[GOAL]\ncase pos.refine_1\nα : Type u_1\ninst✝⁷ : TopologicalSpace α\nι : Type u_2\nβ : Type u_3\ninst✝⁶ : TopologicalSpace β\ninst✝⁵ : PolishSpace α\ninst✝⁴ : PolishSpace β\ninst✝³ : MeasurableSpace α\ninst✝² : MeasurableSpace β\ninst✝¹ : BorelSpace α\ninst✝ : BorelSpace β\ne : α ≃ β\nh : Countable α\nthis : Countable β := Countable.of_equiv α e\n⊢ Measurable ↑e\n[PROOFSTEP]\napply measurable_of_countable\n[GOAL]\ncase pos.refine_2\nα : Type u_1\ninst✝⁷ : TopologicalSpace α\nι : Type u_2\nβ : Type u_3\ninst✝⁶ : TopologicalSpace β\ninst✝⁵ : PolishSpace α\ninst✝⁴ : PolishSpace β\ninst✝³ : MeasurableSpace α\ninst✝² : MeasurableSpace β\ninst✝¹ : BorelSpace α\ninst✝ : BorelSpace β\ne : α ≃ β\nh : Countable α\nthis : Countable β := Countable.of_equiv α e\n⊢ Measurable ↑e.symm\n[PROOFSTEP]\napply measurable_of_countable\n[GOAL]\ncase neg\nα : Type u_1\ninst✝⁷ : TopologicalSpace α\nι : Type u_2\nβ : Type u_3\ninst✝⁶ : TopologicalSpace β\ninst✝⁵ : PolishSpace α\ninst✝⁴ : PolishSpace β\ninst✝³ : MeasurableSpace α\ninst✝² : MeasurableSpace β\ninst✝¹ : BorelSpace α\ninst✝ : BorelSpace β\ne : α ≃ β\nh : ¬Countable α\n⊢ α ≃ᵐ β\n[PROOFSTEP]\nrefine' measurableEquivOfNotCountable h _\n[GOAL]\ncase neg\nα : Type u_1\ninst✝⁷ : TopologicalSpace α\nι : Type u_2\nβ : Type u_3\ninst✝⁶ : TopologicalSpace β\ninst✝⁵ : PolishSpace α\ninst✝⁴ : PolishSpace β\ninst✝³ : MeasurableSpace α\ninst✝² : MeasurableSpace β\ninst✝¹ : BorelSpace α\ninst✝ : BorelSpace β\ne : α ≃ β\nh : ¬Countable α\n⊢ ¬Countable β\n[PROOFSTEP]\nrwa [e.countable_iff] at h \n[GOAL]\nα : Type u_1\ninst✝⁴ : TopologicalSpace α\nι : Type u_2\ninst✝³ : MeasurableSpace α\ninst✝² : PolishSpace α\ninst✝¹ : BorelSpace α\ninst✝ : Finite α\n⊢ ∃ n, Nonempty (α ≃ᵐ ↑(range fun x => ↑↑x))\n[PROOFSTEP]\nobtain ⟨n, ⟨n_equiv⟩⟩ := Finite.exists_equiv_fin α\n[GOAL]\ncase intro.intro\nα : Type u_1\ninst✝⁴ : TopologicalSpace α\nι : Type u_2\ninst✝³ : MeasurableSpace α\ninst✝² : PolishSpace α\ninst✝¹ : BorelSpace α\ninst✝ : Finite α\nn : ℕ\nn_equiv : α ≃ Fin n\n⊢ ∃ n, Nonempty (α ≃ᵐ ↑(range fun x => ↑↑x))\n[PROOFSTEP]\nrefine' ⟨n, ⟨PolishSpace.Equiv.measurableEquiv (n_equiv.trans _)⟩⟩\n[GOAL]\ncase intro.intro\nα : Type u_1\ninst✝⁴ : TopologicalSpace α\nι : Type u_2\ninst✝³ : MeasurableSpace α\ninst✝² : PolishSpace α\ninst✝¹ : BorelSpace α\ninst✝ : Finite α\nn : ℕ\nn_equiv : α ≃ Fin n\n⊢ Fin n ≃ ↑(range fun x => ↑↑x)\n[PROOFSTEP]\nexact Equiv.ofInjective _ (Nat.cast_injective.comp Fin.val_injective)\n[GOAL]\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\ninst✝⁴ : MeasurableSpace α\ninst✝³ : PolishSpace α\ninst✝² : BorelSpace α\ninst✝¹ : Infinite α\ninst✝ : Countable α\n⊢ Nonempty (α ≃ᵐ ↑(range Nat.cast))\n[PROOFSTEP]\nhave : PolishSpace (range ((↑) : ℕ → ℝ)) := Nat.closedEmbedding_coe_real.isClosedMap.closed_range.polishSpace\n[GOAL]\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\ninst✝⁴ : MeasurableSpace α\ninst✝³ : PolishSpace α\ninst✝² : BorelSpace α\ninst✝¹ : Infinite α\ninst✝ : Countable α\nthis : PolishSpace ↑(range Nat.cast)\n⊢ Nonempty (α ≃ᵐ ↑(range Nat.cast))\n[PROOFSTEP]\nrefine' ⟨PolishSpace.Equiv.measurableEquiv _⟩\n[GOAL]\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\ninst✝⁴ : MeasurableSpace α\ninst✝³ : PolishSpace α\ninst✝² : BorelSpace α\ninst✝¹ : Infinite α\ninst✝ : Countable α\nthis : PolishSpace ↑(range Nat.cast)\n⊢ α ≃ ↑(range Nat.cast)\n[PROOFSTEP]\nrefine' (nonempty_equiv_of_countable.some : α ≃ ℕ).trans _\n[GOAL]\nα : Type u_1\ninst✝⁵ : TopologicalSpace α\nι : Type u_2\ninst✝⁴ : MeasurableSpace α\ninst✝³ : PolishSpace α\ninst✝² : BorelSpace α\ninst✝¹ : Infinite α\ninst✝ : Countable α\nthis : PolishSpace ↑(range Nat.cast)\n⊢ ℕ ≃ ↑(range Nat.cast)\n[PROOFSTEP]\nexact Equiv.ofInjective ((↑) : ℕ → ℝ) Nat.cast_injective\n[GOAL]\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : MeasurableSpace α\ninst✝¹ : PolishSpace α\ninst✝ : BorelSpace α\n⊢ ∃ s, MeasurableSet s ∧ Nonempty (α ≃ᵐ ↑s)\n[PROOFSTEP]\nby_cases hα : Countable α\n[GOAL]\ncase pos\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : MeasurableSpace α\ninst✝¹ : PolishSpace α\ninst✝ : BorelSpace α\nhα : Countable α\n⊢ ∃ s, MeasurableSet s ∧ Nonempty (α ≃ᵐ ↑s)\n[PROOFSTEP]\ncases finite_or_infinite α\n[GOAL]\ncase pos.inl\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : MeasurableSpace α\ninst✝¹ : PolishSpace α\ninst✝ : BorelSpace α\nhα : Countable α\nh✝ : Finite α\n⊢ ∃ s, MeasurableSet s ∧ Nonempty (α ≃ᵐ ↑s)\n[PROOFSTEP]\nobtain ⟨n, h_nonempty_equiv⟩ := exists_nat_measurableEquiv_range_coe_fin_of_finite α\n[GOAL]\ncase pos.inl.intro\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : MeasurableSpace α\ninst✝¹ : PolishSpace α\ninst✝ : BorelSpace α\nhα : Countable α\nh✝ : Finite α\nn : ℕ\nh_nonempty_equiv : Nonempty (α ≃ᵐ ↑(range fun x => ↑↑x))\n⊢ ∃ s, MeasurableSet s ∧ Nonempty (α ≃ᵐ ↑s)\n[PROOFSTEP]\nrefine' ⟨_, _, h_nonempty_equiv⟩\n[GOAL]\ncase pos.inl.intro\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : MeasurableSpace α\ninst✝¹ : PolishSpace α\ninst✝ : BorelSpace α\nhα : Countable α\nh✝ : Finite α\nn : ℕ\nh_nonempty_equiv : Nonempty (α ≃ᵐ ↑(range fun x => ↑↑x))\n⊢ MeasurableSet (range fun x => ↑↑x)\n[PROOFSTEP]\nletI : MeasurableSpace (Fin n) := borel (Fin n)\n[GOAL]\ncase pos.inl.intro\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : MeasurableSpace α\ninst✝¹ : PolishSpace α\ninst✝ : BorelSpace α\nhα : Countable α\nh✝ : Finite α\nn : ℕ\nh_nonempty_equiv : Nonempty (α ≃ᵐ ↑(range fun x => ↑↑x))\nthis : MeasurableSpace (Fin n) := borel (Fin n)\n⊢ MeasurableSet (range fun x => ↑↑x)\n[PROOFSTEP]\nhaveI : BorelSpace (Fin n) := ⟨rfl⟩\n[GOAL]\ncase pos.inl.intro\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : MeasurableSpace α\ninst✝¹ : PolishSpace α\ninst✝ : BorelSpace α\nhα : Countable α\nh✝ : Finite α\nn : ℕ\nh_nonempty_equiv : Nonempty (α ≃ᵐ ↑(range fun x => ↑↑x))\nthis✝ : MeasurableSpace (Fin n) := borel (Fin n)\nthis : BorelSpace (Fin n)\n⊢ MeasurableSet (range fun x => ↑↑x)\n[PROOFSTEP]\nrefine' MeasurableEmbedding.measurableSet_range _\n[GOAL]\ncase pos.inl.intro.refine'_1\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : MeasurableSpace α\ninst✝¹ : PolishSpace α\ninst✝ : BorelSpace α\nhα : Countable α\nh✝ : Finite α\nn : ℕ\nh_nonempty_equiv : Nonempty (α ≃ᵐ ↑(range fun x => ↑↑x))\nthis✝ : MeasurableSpace (Fin n) := borel (Fin n)\nthis : BorelSpace (Fin n)\n⊢ MeasurableSpace (Fin n)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\ncase pos.inl.intro.refine'_2\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : MeasurableSpace α\ninst✝¹ : PolishSpace α\ninst✝ : BorelSpace α\nhα : Countable α\nh✝ : Finite α\nn : ℕ\nh_nonempty_equiv : Nonempty (α ≃ᵐ ↑(range fun x => ↑↑x))\nthis✝ : MeasurableSpace (Fin n) := borel (Fin n)\nthis : BorelSpace (Fin n)\n⊢ MeasurableEmbedding fun x => ↑↑x\n[PROOFSTEP]\nexact continuous_of_discreteTopology.measurableEmbedding (Nat.cast_injective.comp Fin.val_injective)\n[GOAL]\ncase pos.inr\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : MeasurableSpace α\ninst✝¹ : PolishSpace α\ninst✝ : BorelSpace α\nhα : Countable α\nh✝ : Infinite α\n⊢ ∃ s, MeasurableSet s ∧ Nonempty (α ≃ᵐ ↑s)\n[PROOFSTEP]\nrefine' ⟨_, _, measurableEquiv_range_coe_nat_of_infinite_of_countable α⟩\n[GOAL]\ncase pos.inr\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : MeasurableSpace α\ninst✝¹ : PolishSpace α\ninst✝ : BorelSpace α\nhα : Countable α\nh✝ : Infinite α\n⊢ MeasurableSet (range Nat.cast)\n[PROOFSTEP]\nrefine' MeasurableEmbedding.measurableSet_range _\n[GOAL]\ncase pos.inr.refine'_1\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : MeasurableSpace α\ninst✝¹ : PolishSpace α\ninst✝ : BorelSpace α\nhα : Countable α\nh✝ : Infinite α\n⊢ MeasurableSpace ℕ\n[PROOFSTEP]\ninfer_instance\n[GOAL]\ncase pos.inr.refine'_2\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : MeasurableSpace α\ninst✝¹ : PolishSpace α\ninst✝ : BorelSpace α\nhα : Countable α\nh✝ : Infinite α\n⊢ MeasurableEmbedding Nat.cast\n[PROOFSTEP]\nexact continuous_of_discreteTopology.measurableEmbedding Nat.cast_injective\n[GOAL]\ncase neg\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : MeasurableSpace α\ninst✝¹ : PolishSpace α\ninst✝ : BorelSpace α\nhα : ¬Countable α\n⊢ ∃ s, MeasurableSet s ∧ Nonempty (α ≃ᵐ ↑s)\n[PROOFSTEP]\nrefine' ⟨univ, MeasurableSet.univ, ⟨(PolishSpace.measurableEquivOfNotCountable hα _ : α ≃ᵐ (univ : Set ℝ))⟩⟩\n[GOAL]\ncase neg\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : MeasurableSpace α\ninst✝¹ : PolishSpace α\ninst✝ : BorelSpace α\nhα : ¬Countable α\n⊢ ¬Countable ↑univ\n[PROOFSTEP]\nrw [countable_coe_iff]\n[GOAL]\ncase neg\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : MeasurableSpace α\ninst✝¹ : PolishSpace α\ninst✝ : BorelSpace α\nhα : ¬Countable α\n⊢ ¬Set.Countable univ\n[PROOFSTEP]\nexact Cardinal.not_countable_real\n[GOAL]\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : MeasurableSpace α\ninst✝¹ : PolishSpace α\ninst✝ : BorelSpace α\n⊢ ∃ f, MeasurableEmbedding f\n[PROOFSTEP]\nobtain ⟨s, hs, ⟨e⟩⟩ := exists_subset_real_measurableEquiv α\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\ninst✝³ : TopologicalSpace α\nι : Type u_2\ninst✝² : MeasurableSpace α\ninst✝¹ : PolishSpace α\ninst✝ : BorelSpace α\ns : Set ℝ\nhs : MeasurableSet s\ne : α ≃ᵐ ↑s\n⊢ ∃ f, MeasurableEmbedding f\n[PROOFSTEP]\nexact ⟨(↑) ∘ e, (MeasurableEmbedding.subtype_coe hs).comp e.measurableEmbedding⟩\n", "meta": {"mathlib_filename": "Mathlib.MeasureTheory.Constructions.Polish", "llama_tokens": 168583, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7853085909370422, "lm_q2_score": 0.6859494614282923, "lm_q1q2_score": 0.5386820050082752}}
{"text": "[GOAL]\nm : ℕ\nxs : Bitvec m\nb : Bool\n⊢ Bitvec.toNat (xs++ₜb ::ᵥ Vector.nil) = Bitvec.toNat xs * 2 + Bitvec.toNat (b ::ᵥ Vector.nil)\n[PROOFSTEP]\ncases' xs with xs P\n[GOAL]\ncase mk\nm : ℕ\nb : Bool\nxs : List Bool\nP : List.length xs = m\n⊢ Bitvec.toNat ({ val := xs, property := P }++ₜb ::ᵥ Vector.nil) =\n    Bitvec.toNat { val := xs, property := P } * 2 + Bitvec.toNat (b ::ᵥ Vector.nil)\n[PROOFSTEP]\nsimp [bitsToNat_toList]\n[GOAL]\ncase mk\nm : ℕ\nb : Bool\nxs : List Bool\nP : List.length xs = m\n⊢ bitsToNat (xs ++ [b]) = bitsToNat [b] + bitsToNat xs * 2\n[PROOFSTEP]\nclear P\n[GOAL]\ncase mk\nm : ℕ\nb : Bool\nxs : List Bool\n⊢ bitsToNat (xs ++ [b]) = bitsToNat [b] + bitsToNat xs * 2\n[PROOFSTEP]\nunfold bitsToNat\n[GOAL]\ncase mk\nm : ℕ\nb : Bool\nxs : List Bool\n⊢ List.foldl addLsb 0 (xs ++ [b]) = List.foldl addLsb 0 [b] + List.foldl addLsb 0 xs * 2\n[PROOFSTEP]\nrw [List.foldl, List.foldl]\n  -- generalize the accumulator of foldl\n[GOAL]\ncase mk\nm : ℕ\nb : Bool\nxs : List Bool\n⊢ List.foldl addLsb 0 (xs ++ [b]) = addLsb 0 b + List.foldl addLsb 0 xs * 2\n[PROOFSTEP]\ngeneralize h : 0 = x\n[GOAL]\ncase mk\nm : ℕ\nb : Bool\nxs : List Bool\nx : ℕ\nh : 0 = x\n⊢ List.foldl addLsb x (xs ++ [b]) = addLsb x b + List.foldl addLsb x xs * 2\n[PROOFSTEP]\nconv in addLsb x b => rw [← h]\n[GOAL]\nm : ℕ\nb : Bool\nxs : List Bool\nx : ℕ\nh : 0 = x\n| addLsb x b\n[PROOFSTEP]\nrw [← h]\n[GOAL]\nm : ℕ\nb : Bool\nxs : List Bool\nx : ℕ\nh : 0 = x\n| addLsb x b\n[PROOFSTEP]\nrw [← h]\n[GOAL]\nm : ℕ\nb : Bool\nxs : List Bool\nx : ℕ\nh : 0 = x\n| addLsb x b\n[PROOFSTEP]\nrw [← h]\n[GOAL]\ncase mk\nm : ℕ\nb : Bool\nxs : List Bool\nx : ℕ\nh : 0 = x\n⊢ List.foldl addLsb x (xs ++ [b]) = addLsb 0 b + List.foldl addLsb x xs * 2\n[PROOFSTEP]\nclear h\n[GOAL]\ncase mk\nm : ℕ\nb : Bool\nxs : List Bool\nx : ℕ\n⊢ List.foldl addLsb x (xs ++ [b]) = addLsb 0 b + List.foldl addLsb x xs * 2\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mk\nm : ℕ\nb : Bool\nxs : List Bool\nx : ℕ\n⊢ addLsb (List.foldl addLsb x xs) b = addLsb 0 b + List.foldl addLsb x xs * 2\n[PROOFSTEP]\ninduction' xs with x xs xs_ih generalizing x\n[GOAL]\ncase mk.nil\nm : ℕ\nb : Bool\nx✝ x : ℕ\n⊢ addLsb (List.foldl addLsb x []) b = addLsb 0 b + List.foldl addLsb x [] * 2\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mk.nil\nm : ℕ\nb : Bool\nx✝ x : ℕ\n⊢ addLsb x b = addLsb 0 b + x * 2\n[PROOFSTEP]\nunfold addLsb\n[GOAL]\ncase mk.nil\nm : ℕ\nb : Bool\nx✝ x : ℕ\n⊢ (x + x + bif b then 1 else 0) = (0 + 0 + bif b then 1 else 0) + x * 2\n[PROOFSTEP]\nsimp [Nat.mul_succ]\n[GOAL]\ncase mk.cons\nm : ℕ\nb : Bool\nx✝¹ : ℕ\nx✝ : Bool\nxs : List Bool\nxs_ih : ∀ (x : ℕ), addLsb (List.foldl addLsb x xs) b = addLsb 0 b + List.foldl addLsb x xs * 2\nx : ℕ\n⊢ addLsb (List.foldl addLsb x (x✝ :: xs)) b = addLsb 0 b + List.foldl addLsb x (x✝ :: xs) * 2\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mk.cons\nm : ℕ\nb : Bool\nx✝¹ : ℕ\nx✝ : Bool\nxs : List Bool\nxs_ih : ∀ (x : ℕ), addLsb (List.foldl addLsb x xs) b = addLsb 0 b + List.foldl addLsb x xs * 2\nx : ℕ\n⊢ addLsb (List.foldl addLsb (addLsb x x✝) xs) b = addLsb 0 b + List.foldl addLsb (addLsb x x✝) xs * 2\n[PROOFSTEP]\napply xs_ih\n[GOAL]\nn : ℕ\n⊢ Bitvec.toNat (decide (n % 2 = 1) ::ᵥ Vector.nil) = n % 2\n[PROOFSTEP]\nsimp [bitsToNat_toList]\n[GOAL]\nn : ℕ\n⊢ bitsToNat [decide (n % 2 = 1)] = n % 2\n[PROOFSTEP]\nunfold bitsToNat addLsb List.foldl\n[GOAL]\nn : ℕ\n⊢ List.foldl (fun r b => r + r + bif b then 1 else 0) (0 + 0 + bif decide (n % 2 = 1) then 1 else 0) [] = n % 2\n[PROOFSTEP]\nsimp [Nat.cond_decide_mod_two, -Bool.cond_decide]\n[GOAL]\nk n : ℕ\n⊢ Bitvec.toNat (Bitvec.ofNat k n) = n % 2 ^ k\n[PROOFSTEP]\ninduction' k with k ih generalizing n\n[GOAL]\ncase zero\nn✝ n : ℕ\n⊢ Bitvec.toNat (Bitvec.ofNat zero n) = n % 2 ^ zero\n[PROOFSTEP]\nsimp [Nat.mod_one]\n[GOAL]\ncase zero\nn✝ n : ℕ\n⊢ Bitvec.toNat (Bitvec.ofNat 0 n) = 0\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ\nn✝ k : ℕ\nih : ∀ {n : ℕ}, Bitvec.toNat (Bitvec.ofNat k n) = n % 2 ^ k\nn : ℕ\n⊢ Bitvec.toNat (Bitvec.ofNat (succ k) n) = n % 2 ^ succ k\n[PROOFSTEP]\nrw [ofNat_succ, toNat_append, ih, bits_toNat_decide, mod_pow_succ, Nat.mul_comm]\n[GOAL]\nn : ℕ\ni : Fin (2 ^ n)\n⊢ Bitvec.toNat (ofFin i) = ↑i\n[PROOFSTEP]\nrw [ofFin, toNat_ofNat, Nat.mod_eq_of_lt]\n[GOAL]\nn : ℕ\ni : Fin (2 ^ n)\n⊢ ↑i < 2 ^ n\n[PROOFSTEP]\napply i.is_lt\n[GOAL]\nx : ℕ\nb : Bool\n⊢ addLsb x b = 2 * x + bif b then 1 else 0\n[PROOFSTEP]\nsimp [addLsb, two_mul]\n[GOAL]\nn : ℕ\nv : Bitvec n\n⊢ Bitvec.toNat v = List.foldr (flip addLsb) 0 (List.reverse (Vector.toList v))\n[PROOFSTEP]\nrw [List.foldr_reverse]\n[GOAL]\nn : ℕ\nv : Bitvec n\n⊢ Bitvec.toNat v = List.foldl (fun x y => flip addLsb y x) 0 (Vector.toList v)\n[PROOFSTEP]\nrfl\n[GOAL]\nn : ℕ\nv : Bitvec n\n⊢ Bitvec.toNat v < 2 ^ n\n[PROOFSTEP]\nsuffices : v.toNat + 1 ≤ 2 ^ n\n[GOAL]\nn : ℕ\nv : Bitvec n\nthis : Bitvec.toNat v + 1 ≤ 2 ^ n\n⊢ Bitvec.toNat v < 2 ^ n\ncase this n : ℕ v : Bitvec n ⊢ Bitvec.toNat v + 1 ≤ 2 ^ n\n[PROOFSTEP]\nsimpa\n[GOAL]\ncase this\nn : ℕ\nv : Bitvec n\n⊢ Bitvec.toNat v + 1 ≤ 2 ^ n\n[PROOFSTEP]\nrw [toNat_eq_foldr_reverse]\n[GOAL]\ncase this\nn : ℕ\nv : Bitvec n\n⊢ List.foldr (flip addLsb) 0 (List.reverse (Vector.toList v)) + 1 ≤ 2 ^ n\n[PROOFSTEP]\ncases' v with xs h\n[GOAL]\ncase this.mk\nn : ℕ\nxs : List Bool\nh : List.length xs = n\n⊢ List.foldr (flip addLsb) 0 (List.reverse (Vector.toList { val := xs, property := h })) + 1 ≤ 2 ^ n\n[PROOFSTEP]\ndsimp [Bitvec.toNat, bitsToNat]\n[GOAL]\ncase this.mk\nn : ℕ\nxs : List Bool\nh : List.length xs = n\n⊢ List.foldr (flip addLsb) 0 (List.reverse xs) + 1 ≤ 2 ^ n\n[PROOFSTEP]\nrw [← List.length_reverse] at h \n[GOAL]\ncase this.mk\nn : ℕ\nxs : List Bool\nh : List.length (List.reverse xs) = n\n⊢ List.foldr (flip addLsb) 0 (List.reverse xs) + 1 ≤ 2 ^ n\n[PROOFSTEP]\ngeneralize xs.reverse = ys at h \n[GOAL]\ncase this.mk\nn : ℕ\nxs ys : List Bool\nh : List.length ys = n\n⊢ List.foldr (flip addLsb) 0 ys + 1 ≤ 2 ^ n\n[PROOFSTEP]\ninduction' ys with head tail ih generalizing n\n[GOAL]\ncase this.mk.nil\nn✝ : ℕ\nxs ys : List Bool\nh✝ : List.length ys = n✝\nn : ℕ\nh : List.length [] = n\n⊢ List.foldr (flip addLsb) 0 [] + 1 ≤ 2 ^ n\n[PROOFSTEP]\nsimp [← h]\n[GOAL]\ncase this.mk.cons\nn✝ : ℕ\nxs ys : List Bool\nh✝ : List.length ys = n✝\nhead : Bool\ntail : List Bool\nih : ∀ {n : ℕ}, List.length tail = n → List.foldr (flip addLsb) 0 tail + 1 ≤ 2 ^ n\nn : ℕ\nh : List.length (head :: tail) = n\n⊢ List.foldr (flip addLsb) 0 (head :: tail) + 1 ≤ 2 ^ n\n[PROOFSTEP]\nsimp only [← h, pow_add, flip, List.length, List.foldr, pow_one]\n[GOAL]\ncase this.mk.cons\nn✝ : ℕ\nxs ys : List Bool\nh✝ : List.length ys = n✝\nhead : Bool\ntail : List Bool\nih : ∀ {n : ℕ}, List.length tail = n → List.foldr (flip addLsb) 0 tail + 1 ≤ 2 ^ n\nn : ℕ\nh : List.length (head :: tail) = n\n⊢ addLsb (List.foldr (fun b a => addLsb a b) 0 tail) head + 1 ≤ 2 ^ List.length tail * 2\n[PROOFSTEP]\nrw [addLsb_eq_twice_add_one]\n[GOAL]\ncase this.mk.cons\nn✝ : ℕ\nxs ys : List Bool\nh✝ : List.length ys = n✝\nhead : Bool\ntail : List Bool\nih : ∀ {n : ℕ}, List.length tail = n → List.foldr (flip addLsb) 0 tail + 1 ≤ 2 ^ n\nn : ℕ\nh : List.length (head :: tail) = n\n⊢ (2 * List.foldr (fun b a => addLsb a b) 0 tail + bif head then 1 else 0) + 1 ≤ 2 ^ List.length tail * 2\n[PROOFSTEP]\ntrans\n  2 * List.foldr (fun (x : Bool) (y : ℕ) => addLsb y x) 0 tail +\n    2 *\n      1\n        -- Porting note: removed `ac_mono`, `mono` calls\n[GOAL]\nn✝ : ℕ\nxs ys : List Bool\nh✝ : List.length ys = n✝\nhead : Bool\ntail : List Bool\nih : ∀ {n : ℕ}, List.length tail = n → List.foldr (flip addLsb) 0 tail + 1 ≤ 2 ^ n\nn : ℕ\nh : List.length (head :: tail) = n\n⊢ (2 * List.foldr (fun b a => addLsb a b) 0 tail + bif head then 1 else 0) + 1 ≤\n    2 * List.foldr (fun x y => addLsb y x) 0 tail + 2 * 1\n[PROOFSTEP]\nrw [add_assoc]\n[GOAL]\nn✝ : ℕ\nxs ys : List Bool\nh✝ : List.length ys = n✝\nhead : Bool\ntail : List Bool\nih : ∀ {n : ℕ}, List.length tail = n → List.foldr (flip addLsb) 0 tail + 1 ≤ 2 ^ n\nn : ℕ\nh : List.length (head :: tail) = n\n⊢ 2 * List.foldr (fun b a => addLsb a b) 0 tail + ((bif head then 1 else 0) + 1) ≤\n    2 * List.foldr (fun x y => addLsb y x) 0 tail + 2 * 1\n[PROOFSTEP]\napply Nat.add_le_add_left\n[GOAL]\ncase h\nn✝ : ℕ\nxs ys : List Bool\nh✝ : List.length ys = n✝\nhead : Bool\ntail : List Bool\nih : ∀ {n : ℕ}, List.length tail = n → List.foldr (flip addLsb) 0 tail + 1 ≤ 2 ^ n\nn : ℕ\nh : List.length (head :: tail) = n\n⊢ (bif head then 1 else 0) + 1 ≤ 2 * 1\n[PROOFSTEP]\ncases head\n[GOAL]\ncase h.false\nn✝ : ℕ\nxs ys : List Bool\nh✝ : List.length ys = n✝\ntail : List Bool\nih : ∀ {n : ℕ}, List.length tail = n → List.foldr (flip addLsb) 0 tail + 1 ≤ 2 ^ n\nn : ℕ\nh : List.length (false :: tail) = n\n⊢ (bif false then 1 else 0) + 1 ≤ 2 * 1\n[PROOFSTEP]\nsimp only\n[GOAL]\ncase h.true\nn✝ : ℕ\nxs ys : List Bool\nh✝ : List.length ys = n✝\ntail : List Bool\nih : ∀ {n : ℕ}, List.length tail = n → List.foldr (flip addLsb) 0 tail + 1 ≤ 2 ^ n\nn : ℕ\nh : List.length (true :: tail) = n\n⊢ (bif true then 1 else 0) + 1 ≤ 2 * 1\n[PROOFSTEP]\nsimp only\n[GOAL]\nn✝ : ℕ\nxs ys : List Bool\nh✝ : List.length ys = n✝\nhead : Bool\ntail : List Bool\nih : ∀ {n : ℕ}, List.length tail = n → List.foldr (flip addLsb) 0 tail + 1 ≤ 2 ^ n\nn : ℕ\nh : List.length (head :: tail) = n\n⊢ 2 * List.foldr (fun x y => addLsb y x) 0 tail + 2 * 1 ≤ 2 ^ List.length tail * 2\n[PROOFSTEP]\nrw [← left_distrib]\n[GOAL]\nn✝ : ℕ\nxs ys : List Bool\nh✝ : List.length ys = n✝\nhead : Bool\ntail : List Bool\nih : ∀ {n : ℕ}, List.length tail = n → List.foldr (flip addLsb) 0 tail + 1 ≤ 2 ^ n\nn : ℕ\nh : List.length (head :: tail) = n\n⊢ 2 * (List.foldr (fun x y => addLsb y x) 0 tail + 1) ≤ 2 ^ List.length tail * 2\n[PROOFSTEP]\nrw [mul_comm _ 2]\n[GOAL]\nn✝ : ℕ\nxs ys : List Bool\nh✝ : List.length ys = n✝\nhead : Bool\ntail : List Bool\nih : ∀ {n : ℕ}, List.length tail = n → List.foldr (flip addLsb) 0 tail + 1 ≤ 2 ^ n\nn : ℕ\nh : List.length (head :: tail) = n\n⊢ 2 * (List.foldr (fun x y => addLsb y x) 0 tail + 1) ≤ 2 * 2 ^ List.length tail\n[PROOFSTEP]\napply Nat.mul_le_mul_left\n[GOAL]\ncase h\nn✝ : ℕ\nxs ys : List Bool\nh✝ : List.length ys = n✝\nhead : Bool\ntail : List Bool\nih : ∀ {n : ℕ}, List.length tail = n → List.foldr (flip addLsb) 0 tail + 1 ≤ 2 ^ n\nn : ℕ\nh : List.length (head :: tail) = n\n⊢ List.foldr (fun x y => addLsb y x) 0 tail + 1 ≤ 2 ^ List.length tail\n[PROOFSTEP]\nexact ih rfl\n[GOAL]\nx : ℕ\nb : Bool\n⊢ addLsb x b / 2 = x\n[PROOFSTEP]\ncases b\n[GOAL]\ncase false\nx : ℕ\n⊢ addLsb x false / 2 = x\n[PROOFSTEP]\nsimp only [Nat.add_mul_div_left, addLsb, ← two_mul, add_comm, Nat.succ_pos', Nat.mul_div_right, gt_iff_lt, zero_add,\n  cond]\n[GOAL]\ncase true\nx : ℕ\n⊢ addLsb x true / 2 = x\n[PROOFSTEP]\nsimp only [Nat.add_mul_div_left, addLsb, ← two_mul, add_comm, Nat.succ_pos', Nat.mul_div_right, gt_iff_lt, zero_add,\n  cond]\n[GOAL]\ncase true\nx : ℕ\n⊢ x + 1 / 2 = x\n[PROOFSTEP]\nnorm_num\n[GOAL]\nx : ℕ\nb : Bool\n⊢ decide (addLsb x b % 2 = 1) = b\n[PROOFSTEP]\ncases b\n[GOAL]\ncase false\nx : ℕ\n⊢ decide (addLsb x false % 2 = 1) = false\n[PROOFSTEP]\nsimp only [Bool.decide_iff, Nat.add_mul_mod_self_left, addLsb, ← two_mul, add_comm, Bool.decide_False,\n  Nat.mul_mod_right, zero_add, cond, zero_ne_one]\n[GOAL]\ncase true\nx : ℕ\n⊢ decide (addLsb x true % 2 = 1) = true\n[PROOFSTEP]\nsimp only [Bool.decide_iff, Nat.add_mul_mod_self_left, addLsb, ← two_mul, add_comm, Bool.decide_False,\n  Nat.mul_mod_right, zero_add, cond, zero_ne_one]\n[GOAL]\nn : ℕ\nv : Bitvec n\n⊢ Bitvec.ofNat n (Bitvec.toNat v) = v\n[PROOFSTEP]\ncases' v with xs h\n[GOAL]\ncase mk\nn : ℕ\nxs : List Bool\nh : List.length xs = n\n⊢ Bitvec.ofNat n (Bitvec.toNat { val := xs, property := h }) = { val := xs, property := h }\n[PROOFSTEP]\napply Subtype.ext\n[GOAL]\ncase mk.a\nn : ℕ\nxs : List Bool\nh : List.length xs = n\n⊢ ↑(Bitvec.ofNat n (Bitvec.toNat { val := xs, property := h })) = ↑{ val := xs, property := h }\n[PROOFSTEP]\nchange Vector.toList _ = xs\n[GOAL]\ncase mk.a\nn : ℕ\nxs : List Bool\nh : List.length xs = n\n⊢ Vector.toList (Bitvec.ofNat n (Bitvec.toNat { val := xs, property := h })) = xs\n[PROOFSTEP]\ndsimp [Bitvec.toNat, bitsToNat]\n[GOAL]\ncase mk.a\nn : ℕ\nxs : List Bool\nh : List.length xs = n\n⊢ Vector.toList (Bitvec.ofNat n (List.foldl addLsb 0 xs)) = xs\n[PROOFSTEP]\nrw [← List.length_reverse] at h \n[GOAL]\ncase mk.a\nn : ℕ\nxs : List Bool\nh : List.length (List.reverse xs) = n\n⊢ Vector.toList (Bitvec.ofNat n (List.foldl addLsb 0 xs)) = xs\n[PROOFSTEP]\nrw [← List.reverse_reverse xs, List.foldl_reverse]\n[GOAL]\ncase mk.a\nn : ℕ\nxs : List Bool\nh : List.length (List.reverse xs) = n\n⊢ Vector.toList (Bitvec.ofNat n (List.foldr (fun x y => addLsb y x) 0 (List.reverse xs))) =\n    List.reverse (List.reverse xs)\n[PROOFSTEP]\ngeneralize xs.reverse = ys at h ⊢\n[GOAL]\ncase mk.a\nn : ℕ\nxs ys : List Bool\nh : List.length ys = n\n⊢ Vector.toList (Bitvec.ofNat n (List.foldr (fun x y => addLsb y x) 0 ys)) = List.reverse ys\n[PROOFSTEP]\nclear xs\n[GOAL]\ncase mk.a\nn : ℕ\nys : List Bool\nh : List.length ys = n\n⊢ Vector.toList (Bitvec.ofNat n (List.foldr (fun x y => addLsb y x) 0 ys)) = List.reverse ys\n[PROOFSTEP]\ninduction' ys with ys_head ys_tail ys_ih generalizing n\n[GOAL]\ncase mk.a.nil\nn✝ : ℕ\nys : List Bool\nh✝ : List.length ys = n✝\nn : ℕ\nh : List.length [] = n\n⊢ Vector.toList (Bitvec.ofNat n (List.foldr (fun x y => addLsb y x) 0 [])) = List.reverse []\n[PROOFSTEP]\ncases h\n[GOAL]\ncase mk.a.nil.refl\nn : ℕ\nys : List Bool\nh : List.length ys = n\n⊢ Vector.toList (Bitvec.ofNat (List.length []) (List.foldr (fun x y => addLsb y x) 0 [])) = List.reverse []\n[PROOFSTEP]\nsimp [Bitvec.ofNat]\n[GOAL]\ncase mk.a.cons\nn✝ : ℕ\nys : List Bool\nh✝ : List.length ys = n✝\nys_head : Bool\nys_tail : List Bool\nys_ih :\n  ∀ {n : ℕ},\n    List.length ys_tail = n →\n      Vector.toList (Bitvec.ofNat n (List.foldr (fun x y => addLsb y x) 0 ys_tail)) = List.reverse ys_tail\nn : ℕ\nh : List.length (ys_head :: ys_tail) = n\n⊢ Vector.toList (Bitvec.ofNat n (List.foldr (fun x y => addLsb y x) 0 (ys_head :: ys_tail))) =\n    List.reverse (ys_head :: ys_tail)\n[PROOFSTEP]\nsimp only [← Nat.succ_eq_add_one, List.length] at h \n[GOAL]\ncase mk.a.cons\nn✝ : ℕ\nys : List Bool\nh✝ : List.length ys = n✝\nys_head : Bool\nys_tail : List Bool\nys_ih :\n  ∀ {n : ℕ},\n    List.length ys_tail = n →\n      Vector.toList (Bitvec.ofNat n (List.foldr (fun x y => addLsb y x) 0 ys_tail)) = List.reverse ys_tail\nn : ℕ\nh : succ (List.length ys_tail) = n\n⊢ Vector.toList (Bitvec.ofNat n (List.foldr (fun x y => addLsb y x) 0 (ys_head :: ys_tail))) =\n    List.reverse (ys_head :: ys_tail)\n[PROOFSTEP]\nsubst n\n[GOAL]\ncase mk.a.cons\nn : ℕ\nys : List Bool\nh : List.length ys = n\nys_head : Bool\nys_tail : List Bool\nys_ih :\n  ∀ {n : ℕ},\n    List.length ys_tail = n →\n      Vector.toList (Bitvec.ofNat n (List.foldr (fun x y => addLsb y x) 0 ys_tail)) = List.reverse ys_tail\n⊢ Vector.toList\n      (Bitvec.ofNat (succ (List.length ys_tail)) (List.foldr (fun x y => addLsb y x) 0 (ys_head :: ys_tail))) =\n    List.reverse (ys_head :: ys_tail)\n[PROOFSTEP]\nsimp only [Bitvec.ofNat, Vector.toList_cons, Vector.toList_nil, List.reverse_cons, Vector.toList_append, List.foldr]\n[GOAL]\ncase mk.a.cons\nn : ℕ\nys : List Bool\nh : List.length ys = n\nys_head : Bool\nys_tail : List Bool\nys_ih :\n  ∀ {n : ℕ},\n    List.length ys_tail = n →\n      Vector.toList (Bitvec.ofNat n (List.foldr (fun x y => addLsb y x) 0 ys_tail)) = List.reverse ys_tail\n⊢ Vector.toList\n        (Bitvec.ofNat (List.length ys_tail) (addLsb (List.foldr (fun x y => addLsb y x) 0 ys_tail) ys_head / 2)) ++\n      [decide (addLsb (List.foldr (fun x y => addLsb y x) 0 ys_tail) ys_head % 2 = 1)] =\n    List.reverse ys_tail ++ [ys_head]\n[PROOFSTEP]\nerw [addLsb_div_two, decide_addLsb_mod_two]\n[GOAL]\ncase mk.a.cons\nn : ℕ\nys : List Bool\nh : List.length ys = n\nys_head : Bool\nys_tail : List Bool\nys_ih :\n  ∀ {n : ℕ},\n    List.length ys_tail = n →\n      Vector.toList (Bitvec.ofNat n (List.foldr (fun x y => addLsb y x) 0 ys_tail)) = List.reverse ys_tail\n⊢ Vector.toList (Bitvec.ofNat (List.length ys_tail) (List.foldr (fun x y => addLsb y x) 0 ys_tail)) ++ [ys_head] =\n    List.reverse ys_tail ++ [ys_head]\n[PROOFSTEP]\ncongr\n[GOAL]\ncase mk.a.cons.e_a\nn : ℕ\nys : List Bool\nh : List.length ys = n\nys_head : Bool\nys_tail : List Bool\nys_ih :\n  ∀ {n : ℕ},\n    List.length ys_tail = n →\n      Vector.toList (Bitvec.ofNat n (List.foldr (fun x y => addLsb y x) 0 ys_tail)) = List.reverse ys_tail\n⊢ Vector.toList (Bitvec.ofNat (List.length ys_tail) (List.foldr (fun x y => addLsb y x) 0 ys_tail)) =\n    List.reverse ys_tail\n[PROOFSTEP]\napply ys_ih\n[GOAL]\ncase mk.a.cons.e_a.h\nn : ℕ\nys : List Bool\nh : List.length ys = n\nys_head : Bool\nys_tail : List Bool\nys_ih :\n  ∀ {n : ℕ},\n    List.length ys_tail = n →\n      Vector.toList (Bitvec.ofNat n (List.foldr (fun x y => addLsb y x) 0 ys_tail)) = List.reverse ys_tail\n⊢ List.length ys_tail = List.length ys_tail\n[PROOFSTEP]\nrfl\n[GOAL]\nn : ℕ\nv : Bitvec n\n⊢ ↑(toFin v) = Bitvec.toNat v\n[PROOFSTEP]\nrw [toFin, Fin.coe_ofNat_eq_mod, Nat.mod_eq_of_lt]\n[GOAL]\nn : ℕ\nv : Bitvec n\n⊢ Bitvec.toNat v < 2 ^ n\n[PROOFSTEP]\napply toNat_lt\n[GOAL]\nn : ℕ\nv₀ v₁ : Bitvec n\nh : v₀ ≤ v₁\n⊢ ↑(toFin v₀) ≤ ↑(toFin v₁)\n[PROOFSTEP]\nrw [toFin_val, toFin_val]\n[GOAL]\nn : ℕ\nv₀ v₁ : Bitvec n\nh : v₀ ≤ v₁\n⊢ Bitvec.toNat v₀ ≤ Bitvec.toNat v₁\n[PROOFSTEP]\nexact h\n[GOAL]\nn : ℕ\ni j : Fin (2 ^ n)\nh : i ≤ j\n⊢ Bitvec.toNat (Bitvec.ofNat n ↑i) ≤ Bitvec.toNat (Bitvec.ofNat n ↑j)\n[PROOFSTEP]\nsimp only [toNat_ofNat, Nat.mod_eq_of_lt, Fin.is_lt]\n[GOAL]\nn : ℕ\ni j : Fin (2 ^ n)\nh : i ≤ j\n⊢ ↑i ≤ ↑j\n[PROOFSTEP]\nexact h\n[GOAL]\nn : ℕ\ni : Fin (2 ^ n)\n⊢ ↑(toFin (ofFin i)) = ↑i\n[PROOFSTEP]\nsimp [toFin_val, ofFin, toNat_ofNat, Nat.mod_eq_of_lt, i.is_lt]\n[GOAL]\nn : ℕ\nv : Bitvec n\n⊢ ofFin (toFin v) = v\n[PROOFSTEP]\ndsimp [ofFin]\n[GOAL]\nn : ℕ\nv : Bitvec n\n⊢ Bitvec.ofNat n ↑(toFin v) = v\n[PROOFSTEP]\nrw [toFin_val, ofNat_toNat]\n", "meta": {"mathlib_filename": "Mathlib.Data.Bitvec.Lemmas", "llama_tokens": 8521, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7853085808877581, "lm_q2_score": 0.6859494614282923, "lm_q1q2_score": 0.5386819981149742}}
{"text": "[GOAL]\nι : Type u_1\ninst✝ : Fintype ι\n⊢ volume = StieltjesFunction.measure StieltjesFunction.id\n[PROOFSTEP]\nhaveI : IsAddLeftInvariant StieltjesFunction.id.measure :=\n  ⟨fun a =>\n    Eq.symm <|\n      Real.measure_ext_Ioo_rat fun p q => by\n        simp only [Measure.map_apply (measurable_const_add a) measurableSet_Ioo, sub_sub_sub_cancel_right,\n          StieltjesFunction.measure_Ioo, StieltjesFunction.id_leftLim, StieltjesFunction.id_apply, id.def,\n          preimage_const_add_Ioo]⟩\n[GOAL]\nι : Type u_1\ninst✝ : Fintype ι\na : ℝ\np q : ℚ\n⊢ ↑↑(StieltjesFunction.measure StieltjesFunction.id) (Ioo ↑p ↑q) =\n    ↑↑(Measure.map (fun x => a + x) (StieltjesFunction.measure StieltjesFunction.id)) (Ioo ↑p ↑q)\n[PROOFSTEP]\nsimp only [Measure.map_apply (measurable_const_add a) measurableSet_Ioo, sub_sub_sub_cancel_right,\n  StieltjesFunction.measure_Ioo, StieltjesFunction.id_leftLim, StieltjesFunction.id_apply, id.def,\n  preimage_const_add_Ioo]\n[GOAL]\nι : Type u_1\ninst✝ : Fintype ι\nthis : IsAddLeftInvariant (StieltjesFunction.measure StieltjesFunction.id)\n⊢ volume = StieltjesFunction.measure StieltjesFunction.id\n[PROOFSTEP]\nhave A : StieltjesFunction.id.measure (stdOrthonormalBasis ℝ ℝ).toBasis.parallelepiped = 1 :=\n  by\n  change StieltjesFunction.id.measure (parallelepiped (stdOrthonormalBasis ℝ ℝ)) = 1\n  rcases parallelepiped_orthonormalBasis_one_dim (stdOrthonormalBasis ℝ ℝ) with (H | H) <;>\n    simp only [H, StieltjesFunction.measure_Icc, StieltjesFunction.id_apply, id.def, tsub_zero,\n      StieltjesFunction.id_leftLim, sub_neg_eq_add, zero_add, ENNReal.ofReal_one]\n[GOAL]\nι : Type u_1\ninst✝ : Fintype ι\nthis : IsAddLeftInvariant (StieltjesFunction.measure StieltjesFunction.id)\n⊢ ↑↑(StieltjesFunction.measure StieltjesFunction.id)\n      ↑(Basis.parallelepiped (OrthonormalBasis.toBasis (stdOrthonormalBasis ℝ ℝ))) =\n    1\n[PROOFSTEP]\nchange StieltjesFunction.id.measure (parallelepiped (stdOrthonormalBasis ℝ ℝ)) = 1\n[GOAL]\nι : Type u_1\ninst✝ : Fintype ι\nthis : IsAddLeftInvariant (StieltjesFunction.measure StieltjesFunction.id)\n⊢ ↑↑(StieltjesFunction.measure StieltjesFunction.id) (parallelepiped ↑(stdOrthonormalBasis ℝ ℝ)) = 1\n[PROOFSTEP]\nrcases parallelepiped_orthonormalBasis_one_dim (stdOrthonormalBasis ℝ ℝ) with (H | H)\n[GOAL]\ncase inl\nι : Type u_1\ninst✝ : Fintype ι\nthis : IsAddLeftInvariant (StieltjesFunction.measure StieltjesFunction.id)\nH : parallelepiped ↑(stdOrthonormalBasis ℝ ℝ) = Icc 0 1\n⊢ ↑↑(StieltjesFunction.measure StieltjesFunction.id) (parallelepiped ↑(stdOrthonormalBasis ℝ ℝ)) = 1\n[PROOFSTEP]\nsimp only [H, StieltjesFunction.measure_Icc, StieltjesFunction.id_apply, id.def, tsub_zero,\n  StieltjesFunction.id_leftLim, sub_neg_eq_add, zero_add, ENNReal.ofReal_one]\n[GOAL]\ncase inr\nι : Type u_1\ninst✝ : Fintype ι\nthis : IsAddLeftInvariant (StieltjesFunction.measure StieltjesFunction.id)\nH : parallelepiped ↑(stdOrthonormalBasis ℝ ℝ) = Icc (-1) 0\n⊢ ↑↑(StieltjesFunction.measure StieltjesFunction.id) (parallelepiped ↑(stdOrthonormalBasis ℝ ℝ)) = 1\n[PROOFSTEP]\nsimp only [H, StieltjesFunction.measure_Icc, StieltjesFunction.id_apply, id.def, tsub_zero,\n  StieltjesFunction.id_leftLim, sub_neg_eq_add, zero_add, ENNReal.ofReal_one]\n[GOAL]\nι : Type u_1\ninst✝ : Fintype ι\nthis : IsAddLeftInvariant (StieltjesFunction.measure StieltjesFunction.id)\nA :\n  ↑↑(StieltjesFunction.measure StieltjesFunction.id)\n      ↑(Basis.parallelepiped (OrthonormalBasis.toBasis (stdOrthonormalBasis ℝ ℝ))) =\n    1\n⊢ volume = StieltjesFunction.measure StieltjesFunction.id\n[PROOFSTEP]\nconv_rhs => rw [addHaarMeasure_unique StieltjesFunction.id.measure (stdOrthonormalBasis ℝ ℝ).toBasis.parallelepiped, A]\n[GOAL]\nι : Type u_1\ninst✝ : Fintype ι\nthis : IsAddLeftInvariant (StieltjesFunction.measure StieltjesFunction.id)\nA :\n  ↑↑(StieltjesFunction.measure StieltjesFunction.id)\n      ↑(Basis.parallelepiped (OrthonormalBasis.toBasis (stdOrthonormalBasis ℝ ℝ))) =\n    1\n| StieltjesFunction.measure StieltjesFunction.id\n[PROOFSTEP]\nrw [addHaarMeasure_unique StieltjesFunction.id.measure (stdOrthonormalBasis ℝ ℝ).toBasis.parallelepiped, A]\n[GOAL]\nι : Type u_1\ninst✝ : Fintype ι\nthis : IsAddLeftInvariant (StieltjesFunction.measure StieltjesFunction.id)\nA :\n  ↑↑(StieltjesFunction.measure StieltjesFunction.id)\n      ↑(Basis.parallelepiped (OrthonormalBasis.toBasis (stdOrthonormalBasis ℝ ℝ))) =\n    1\n| StieltjesFunction.measure StieltjesFunction.id\n[PROOFSTEP]\nrw [addHaarMeasure_unique StieltjesFunction.id.measure (stdOrthonormalBasis ℝ ℝ).toBasis.parallelepiped, A]\n[GOAL]\nι : Type u_1\ninst✝ : Fintype ι\nthis : IsAddLeftInvariant (StieltjesFunction.measure StieltjesFunction.id)\nA :\n  ↑↑(StieltjesFunction.measure StieltjesFunction.id)\n      ↑(Basis.parallelepiped (OrthonormalBasis.toBasis (stdOrthonormalBasis ℝ ℝ))) =\n    1\n| StieltjesFunction.measure StieltjesFunction.id\n[PROOFSTEP]\nrw [addHaarMeasure_unique StieltjesFunction.id.measure (stdOrthonormalBasis ℝ ℝ).toBasis.parallelepiped, A]\n[GOAL]\nι : Type u_1\ninst✝ : Fintype ι\nthis : IsAddLeftInvariant (StieltjesFunction.measure StieltjesFunction.id)\nA :\n  ↑↑(StieltjesFunction.measure StieltjesFunction.id)\n      ↑(Basis.parallelepiped (OrthonormalBasis.toBasis (stdOrthonormalBasis ℝ ℝ))) =\n    1\n⊢ volume = 1 • addHaarMeasure (Basis.parallelepiped (OrthonormalBasis.toBasis (stdOrthonormalBasis ℝ ℝ)))\n[PROOFSTEP]\nsimp only [volume, Basis.addHaar, one_smul]\n[GOAL]\nι : Type u_1\ninst✝ : Fintype ι\ns : Set ℝ\n⊢ ↑↑volume s = ↑↑(StieltjesFunction.measure StieltjesFunction.id) s\n[PROOFSTEP]\nsimp [volume_eq_stieltjes_id]\n[GOAL]\nι : Type u_1\ninst✝ : Fintype ι\na b : ℝ\n⊢ ↑↑volume (Ico a b) = ofReal (b - a)\n[PROOFSTEP]\nsimp [volume_val]\n[GOAL]\nι : Type u_1\ninst✝ : Fintype ι\na b : ℝ\n⊢ ↑↑volume (Icc a b) = ofReal (b - a)\n[PROOFSTEP]\nsimp [volume_val]\n[GOAL]\nι : Type u_1\ninst✝ : Fintype ι\na b : ℝ\n⊢ ↑↑volume (Ioo a b) = ofReal (b - a)\n[PROOFSTEP]\nsimp [volume_val]\n[GOAL]\nι : Type u_1\ninst✝ : Fintype ι\na b : ℝ\n⊢ ↑↑volume (Ioc a b) = ofReal (b - a)\n[PROOFSTEP]\nsimp [volume_val]\n[GOAL]\nι : Type u_1\ninst✝ : Fintype ι\na : ℝ\n⊢ ↑↑volume {a} = 0\n[PROOFSTEP]\nsimp [volume_val]\n[GOAL]\nι : Type u_1\ninst✝ : Fintype ι\nr : ℝ≥0\n⊢ ↑r = ↑↑volume (Icc 0 ↑r)\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\ninst✝ : Fintype ι\na r : ℝ\n⊢ ↑↑volume (Metric.ball a r) = ofReal (2 * r)\n[PROOFSTEP]\nrw [ball_eq_Ioo, volume_Ioo, ← sub_add, add_sub_cancel', two_mul]\n[GOAL]\nι : Type u_1\ninst✝ : Fintype ι\na r : ℝ\n⊢ ↑↑volume (Metric.closedBall a r) = ofReal (2 * r)\n[PROOFSTEP]\nrw [closedBall_eq_Icc, volume_Icc, ← sub_add, add_sub_cancel', two_mul]\n[GOAL]\nι : Type u_1\ninst✝ : Fintype ι\na : ℝ\nr : ℝ≥0∞\n⊢ ↑↑volume (EMetric.ball a r) = 2 * r\n[PROOFSTEP]\nrcases eq_or_ne r ∞ with (rfl | hr)\n[GOAL]\ncase inl\nι : Type u_1\ninst✝ : Fintype ι\na : ℝ\n⊢ ↑↑volume (EMetric.ball a ⊤) = 2 * ⊤\n[PROOFSTEP]\nrw [Metric.emetric_ball_top, volume_univ, two_mul, _root_.top_add]\n[GOAL]\ncase inr\nι : Type u_1\ninst✝ : Fintype ι\na : ℝ\nr : ℝ≥0∞\nhr : r ≠ ⊤\n⊢ ↑↑volume (EMetric.ball a r) = 2 * r\n[PROOFSTEP]\nlift r to ℝ≥0 using hr\n[GOAL]\ncase inr.intro\nι : Type u_1\ninst✝ : Fintype ι\na : ℝ\nr : ℝ≥0\n⊢ ↑↑volume (EMetric.ball a ↑r) = 2 * ↑r\n[PROOFSTEP]\nrw [Metric.emetric_ball_nnreal, volume_ball, two_mul, ← NNReal.coe_add, ENNReal.ofReal_coe_nnreal, ENNReal.coe_add,\n  two_mul]\n[GOAL]\nι : Type u_1\ninst✝ : Fintype ι\na : ℝ\nr : ℝ≥0∞\n⊢ ↑↑volume (EMetric.closedBall a r) = 2 * r\n[PROOFSTEP]\nrcases eq_or_ne r ∞ with (rfl | hr)\n[GOAL]\ncase inl\nι : Type u_1\ninst✝ : Fintype ι\na : ℝ\n⊢ ↑↑volume (EMetric.closedBall a ⊤) = 2 * ⊤\n[PROOFSTEP]\nrw [EMetric.closedBall_top, volume_univ, two_mul, _root_.top_add]\n[GOAL]\ncase inr\nι : Type u_1\ninst✝ : Fintype ι\na : ℝ\nr : ℝ≥0∞\nhr : r ≠ ⊤\n⊢ ↑↑volume (EMetric.closedBall a r) = 2 * r\n[PROOFSTEP]\nlift r to ℝ≥0 using hr\n[GOAL]\ncase inr.intro\nι : Type u_1\ninst✝ : Fintype ι\na : ℝ\nr : ℝ≥0\n⊢ ↑↑volume (EMetric.closedBall a ↑r) = 2 * ↑r\n[PROOFSTEP]\nrw [Metric.emetric_closedBall_nnreal, volume_closedBall, two_mul, ← NNReal.coe_add, ENNReal.ofReal_coe_nnreal,\n  ENNReal.coe_add, two_mul]\n[GOAL]\nι : Type u_1\ninst✝ : Fintype ι\na b : ℝ\n⊢ ↑↑volume (uIcc a b) = ofReal |b - a|\n[PROOFSTEP]\nrw [← Icc_min_max, volume_Icc, max_sub_min_eq_abs]\n[GOAL]\nι : Type u_1\ninst✝ : Fintype ι\na : ℝ\nn : ℕ\n⊢ ↑n = ↑↑volume (Ioo a (a + ↑n))\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\ninst✝ : Fintype ι\na : ℝ\n⊢ ↑↑volume (Ici a) = ⊤\n[PROOFSTEP]\nrw [← measure_congr Ioi_ae_eq_Ici]\n[GOAL]\nι : Type u_1\ninst✝ : Fintype ι\na : ℝ\n⊢ ↑↑volume (Ioi a) = ⊤\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\ninst✝ : Fintype ι\na : ℝ\nn : ℕ\n⊢ ↑n = ↑↑volume (Ioo (a - ↑n) a)\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\ninst✝ : Fintype ι\na : ℝ\n⊢ ↑↑volume (Iic a) = ⊤\n[PROOFSTEP]\nrw [← measure_congr Iio_ae_eq_Iic]\n[GOAL]\nι : Type u_1\ninst✝ : Fintype ι\na : ℝ\n⊢ ↑↑volume (Iio a) = ⊤\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\ninst✝ : Fintype ι\nx : ℝ\n⊢ ↑↑volume (Ioo (x - 1) (x + 1)) < ⊤\n[PROOFSTEP]\nsimp only [Real.volume_Ioo, ENNReal.ofReal_lt_top]\n[GOAL]\nι : Type u_1\ninst✝ : Fintype ι\nx y : ℝ\n⊢ ↑↑(Measure.restrict volume (Icc x y)) univ < ⊤\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\ninst✝ : Fintype ι\nx y : ℝ\n⊢ ↑↑(Measure.restrict volume (Ico x y)) univ < ⊤\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\ninst✝ : Fintype ι\nx y : ℝ\n⊢ ↑↑(Measure.restrict volume (Ioc x y)) univ < ⊤\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\ninst✝ : Fintype ι\nx y : ℝ\n⊢ ↑↑(Measure.restrict volume (Ioo x y)) univ < ⊤\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\ninst✝ : Fintype ι\ns : Set ℝ\n⊢ ↑↑volume s ≤ EMetric.diam s\n[PROOFSTEP]\nby_cases hs : Metric.Bounded s\n[GOAL]\ncase pos\nι : Type u_1\ninst✝ : Fintype ι\ns : Set ℝ\nhs : Metric.Bounded s\n⊢ ↑↑volume s ≤ EMetric.diam s\n[PROOFSTEP]\nrw [Real.ediam_eq hs, ← volume_Icc]\n[GOAL]\ncase pos\nι : Type u_1\ninst✝ : Fintype ι\ns : Set ℝ\nhs : Metric.Bounded s\n⊢ ↑↑volume s ≤ ↑↑volume (Icc (sInf s) (sSup s))\n[PROOFSTEP]\nexact volume.mono (Real.subset_Icc_sInf_sSup_of_bounded hs)\n[GOAL]\ncase neg\nι : Type u_1\ninst✝ : Fintype ι\ns : Set ℝ\nhs : ¬Metric.Bounded s\n⊢ ↑↑volume s ≤ EMetric.diam s\n[PROOFSTEP]\nrw [Metric.ediam_of_unbounded hs]\n[GOAL]\ncase neg\nι : Type u_1\ninst✝ : Fintype ι\ns : Set ℝ\nhs : ¬Metric.Bounded s\n⊢ ↑↑volume s ≤ ⊤\n[PROOFSTEP]\nexact le_top\n[GOAL]\nι : Type u_1\ninst✝ : Fintype ι\np : ℝ → Prop\na : ℝ\nh : ∀ᶠ (x : ℝ) in 𝓝 a, p x\n⊢ 0 < ↑↑volume {x | p x}\n[PROOFSTEP]\nrcases h.exists_Ioo_subset with ⟨l, u, hx, hs⟩\n[GOAL]\ncase intro.intro.intro\nι : Type u_1\ninst✝ : Fintype ι\np : ℝ → Prop\na : ℝ\nh : ∀ᶠ (x : ℝ) in 𝓝 a, p x\nl u : ℝ\nhx : a ∈ Ioo l u\nhs : Ioo l u ⊆ {x | p x}\n⊢ 0 < ↑↑volume {x | p x}\n[PROOFSTEP]\nrefine' lt_of_lt_of_le _ (measure_mono hs)\n[GOAL]\ncase intro.intro.intro\nι : Type u_1\ninst✝ : Fintype ι\np : ℝ → Prop\na : ℝ\nh : ∀ᶠ (x : ℝ) in 𝓝 a, p x\nl u : ℝ\nhx : a ∈ Ioo l u\nhs : Ioo l u ⊆ {x | p x}\n⊢ 0 < ↑↑volume (Ioo l u)\n[PROOFSTEP]\nsimpa [-mem_Ioo] using hx.1.trans hx.2\n[GOAL]\nι : Type u_1\ninst✝ : Fintype ι\na b : ι → ℝ\n⊢ ↑↑volume (Icc a b) = ∏ i : ι, ofReal (b i - a i)\n[PROOFSTEP]\nrw [← pi_univ_Icc, volume_pi_pi]\n[GOAL]\nι : Type u_1\ninst✝ : Fintype ι\na b : ι → ℝ\n⊢ ∏ i : ι, ↑↑volume (Icc (a i) (b i)) = ∏ i : ι, ofReal (b i - a i)\n[PROOFSTEP]\nsimp only [Real.volume_Icc]\n[GOAL]\nι : Type u_1\ninst✝ : Fintype ι\na b : ι → ℝ\nh : a ≤ b\n⊢ ENNReal.toReal (↑↑volume (Icc a b)) = ∏ i : ι, (b i - a i)\n[PROOFSTEP]\nsimp only [volume_Icc_pi, ENNReal.toReal_prod, ENNReal.toReal_ofReal (sub_nonneg.2 (h _))]\n[GOAL]\nι : Type u_1\ninst✝ : Fintype ι\na b : ι → ℝ\nh : a ≤ b\n⊢ ENNReal.toReal (↑↑volume (Set.pi univ fun i => Ioo (a i) (b i))) = ∏ i : ι, (b i - a i)\n[PROOFSTEP]\nsimp only [volume_pi_Ioo, ENNReal.toReal_prod, ENNReal.toReal_ofReal (sub_nonneg.2 (h _))]\n[GOAL]\nι : Type u_1\ninst✝ : Fintype ι\na b : ι → ℝ\nh : a ≤ b\n⊢ ENNReal.toReal (↑↑volume (Set.pi univ fun i => Ioc (a i) (b i))) = ∏ i : ι, (b i - a i)\n[PROOFSTEP]\nsimp only [volume_pi_Ioc, ENNReal.toReal_prod, ENNReal.toReal_ofReal (sub_nonneg.2 (h _))]\n[GOAL]\nι : Type u_1\ninst✝ : Fintype ι\na b : ι → ℝ\nh : a ≤ b\n⊢ ENNReal.toReal (↑↑volume (Set.pi univ fun i => Ico (a i) (b i))) = ∏ i : ι, (b i - a i)\n[PROOFSTEP]\nsimp only [volume_pi_Ico, ENNReal.toReal_prod, ENNReal.toReal_ofReal (sub_nonneg.2 (h _))]\n[GOAL]\nι : Type u_1\ninst✝ : Fintype ι\na : ι → ℝ\nr : ℝ\nhr : 0 < r\n⊢ ↑↑volume (Metric.ball a r) = ofReal ((2 * r) ^ Fintype.card ι)\n[PROOFSTEP]\nsimp only [MeasureTheory.volume_pi_ball a hr, volume_ball, Finset.prod_const]\n[GOAL]\nι : Type u_1\ninst✝ : Fintype ι\na : ι → ℝ\nr : ℝ\nhr : 0 < r\n⊢ ofReal (2 * r) ^ Finset.card Finset.univ = ofReal ((2 * r) ^ Fintype.card ι)\n[PROOFSTEP]\nexact (ENNReal.ofReal_pow (mul_nonneg zero_le_two hr.le) _).symm\n[GOAL]\nι : Type u_1\ninst✝ : Fintype ι\na : ι → ℝ\nr : ℝ\nhr : 0 ≤ r\n⊢ ↑↑volume (Metric.closedBall a r) = ofReal ((2 * r) ^ Fintype.card ι)\n[PROOFSTEP]\nsimp only [MeasureTheory.volume_pi_closedBall a hr, volume_closedBall, Finset.prod_const]\n[GOAL]\nι : Type u_1\ninst✝ : Fintype ι\na : ι → ℝ\nr : ℝ\nhr : 0 ≤ r\n⊢ ofReal (2 * r) ^ Finset.card Finset.univ = ofReal ((2 * r) ^ Fintype.card ι)\n[PROOFSTEP]\nexact (ENNReal.ofReal_pow (mul_nonneg zero_le_two hr) _).symm\n[GOAL]\nι : Type u_1\ninst✝ : Fintype ι\ns : Set (ι → ℝ)\n⊢ ∏ _i : ι, ↑1 * EMetric.diam s = EMetric.diam s ^ Fintype.card ι\n[PROOFSTEP]\nsimp only [ENNReal.coe_one, one_mul, Finset.prod_const, Fintype.card]\n[GOAL]\nι : Type u_1\ninst✝ : Fintype ι\na : ℝ\nh : a ≠ 0\n⊢ ofReal |a| • Measure.map (fun x => a * x) volume = volume\n[PROOFSTEP]\nrefine' (Real.measure_ext_Ioo_rat fun p q => _).symm\n[GOAL]\nι : Type u_1\ninst✝ : Fintype ι\na : ℝ\nh : a ≠ 0\np q : ℚ\n⊢ ↑↑volume (Ioo ↑p ↑q) = ↑↑(ofReal |a| • Measure.map (fun x => a * x) volume) (Ioo ↑p ↑q)\n[PROOFSTEP]\ncases' lt_or_gt_of_ne h with h h\n[GOAL]\ncase inl\nι : Type u_1\ninst✝ : Fintype ι\na : ℝ\nh✝ : a ≠ 0\np q : ℚ\nh : a < 0\n⊢ ↑↑volume (Ioo ↑p ↑q) = ↑↑(ofReal |a| • Measure.map (fun x => a * x) volume) (Ioo ↑p ↑q)\n[PROOFSTEP]\nsimp only [Real.volume_Ioo, Measure.smul_apply, ← ENNReal.ofReal_mul (le_of_lt <| neg_pos.2 h),\n  Measure.map_apply (measurable_const_mul a) measurableSet_Ioo, neg_sub_neg, neg_mul,\n  preimage_const_mul_Ioo_of_neg _ _ h, abs_of_neg h, mul_sub, smul_eq_mul, mul_div_cancel' _ (ne_of_lt h)]\n[GOAL]\ncase inr\nι : Type u_1\ninst✝ : Fintype ι\na : ℝ\nh✝ : a ≠ 0\np q : ℚ\nh : a > 0\n⊢ ↑↑volume (Ioo ↑p ↑q) = ↑↑(ofReal |a| • Measure.map (fun x => a * x) volume) (Ioo ↑p ↑q)\n[PROOFSTEP]\nsimp only [Real.volume_Ioo, Measure.smul_apply, ← ENNReal.ofReal_mul (le_of_lt h),\n  Measure.map_apply (measurable_const_mul a) measurableSet_Ioo, preimage_const_mul_Ioo _ _ h, abs_of_pos h, mul_sub,\n  mul_div_cancel' _ (ne_of_gt h), smul_eq_mul]\n[GOAL]\nι : Type u_1\ninst✝ : Fintype ι\na : ℝ\nh : a ≠ 0\n⊢ Measure.map (fun x => a * x) volume = ofReal |a⁻¹| • volume\n[PROOFSTEP]\nconv_rhs =>\n  rw [← Real.smul_map_volume_mul_left h, smul_smul, ← ENNReal.ofReal_mul (abs_nonneg _), ← abs_mul, inv_mul_cancel h,\n    abs_one, ENNReal.ofReal_one, one_smul]\n[GOAL]\nι : Type u_1\ninst✝ : Fintype ι\na : ℝ\nh : a ≠ 0\n| ofReal |a⁻¹| • volume\n[PROOFSTEP]\nrw [← Real.smul_map_volume_mul_left h, smul_smul, ← ENNReal.ofReal_mul (abs_nonneg _), ← abs_mul, inv_mul_cancel h,\n    abs_one, ENNReal.ofReal_one, one_smul]\n[GOAL]\nι : Type u_1\ninst✝ : Fintype ι\na : ℝ\nh : a ≠ 0\n| ofReal |a⁻¹| • volume\n[PROOFSTEP]\nrw [← Real.smul_map_volume_mul_left h, smul_smul, ← ENNReal.ofReal_mul (abs_nonneg _), ← abs_mul, inv_mul_cancel h,\n    abs_one, ENNReal.ofReal_one, one_smul]\n[GOAL]\nι : Type u_1\ninst✝ : Fintype ι\na : ℝ\nh : a ≠ 0\n| ofReal |a⁻¹| • volume\n[PROOFSTEP]\nrw [← Real.smul_map_volume_mul_left h, smul_smul, ← ENNReal.ofReal_mul (abs_nonneg _), ← abs_mul, inv_mul_cancel h,\n  abs_one, ENNReal.ofReal_one, one_smul]\n[GOAL]\nι : Type u_1\ninst✝ : Fintype ι\na : ℝ\nh : a ≠ 0\ns : Set ℝ\n⊢ ↑↑(Measure.map (fun x => a * x) volume) s = ofReal |a⁻¹| * ↑↑volume s\n[PROOFSTEP]\nrw [map_volume_mul_left h]\n[GOAL]\nι : Type u_1\ninst✝ : Fintype ι\na : ℝ\nh : a ≠ 0\ns : Set ℝ\n⊢ ↑↑(ofReal |a⁻¹| • volume) s = ofReal |a⁻¹| * ↑↑volume s\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\ninst✝ : Fintype ι\na : ℝ\nh : a ≠ 0\n⊢ ofReal |a| • Measure.map (fun x => x * a) volume = volume\n[PROOFSTEP]\nsimpa only [mul_comm] using Real.smul_map_volume_mul_left h\n[GOAL]\nι : Type u_1\ninst✝ : Fintype ι\na : ℝ\nh : a ≠ 0\n⊢ Measure.map (fun x => x * a) volume = ofReal |a⁻¹| • volume\n[PROOFSTEP]\nsimpa only [mul_comm] using Real.map_volume_mul_left h\n[GOAL]\nι : Type u_1\ninst✝ : Fintype ι\na : ℝ\nh : a ≠ 0\ns : Set ℝ\n⊢ ↑↑(Measure.map (fun x => x * a) volume) s = ofReal |a⁻¹| * ↑↑volume s\n[PROOFSTEP]\nrw [map_volume_mul_right h]\n[GOAL]\nι : Type u_1\ninst✝ : Fintype ι\na : ℝ\nh : a ≠ 0\ns : Set ℝ\n⊢ ↑↑(ofReal |a⁻¹| • volume) s = ofReal |a⁻¹| * ↑↑volume s\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nD : ι → ℝ\nh : det (Matrix.diagonal D) ≠ 0\n⊢ ofReal |det (Matrix.diagonal D)| • Measure.map (↑(↑toLin' (Matrix.diagonal D))) volume = volume\n[PROOFSTEP]\nrefine' (Measure.pi_eq fun s hs => _).symm\n[GOAL]\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nD : ι → ℝ\nh : det (Matrix.diagonal D) ≠ 0\ns : ι → Set ℝ\nhs : ∀ (i : ι), MeasurableSet (s i)\n⊢ ↑↑(ofReal |det (Matrix.diagonal D)| • Measure.map (↑(↑toLin' (Matrix.diagonal D))) volume) (Set.pi univ s) =\n    ∏ i : ι, ↑↑volume (s i)\n[PROOFSTEP]\nsimp only [det_diagonal, Measure.coe_smul, Algebra.id.smul_eq_mul, Pi.smul_apply]\n[GOAL]\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nD : ι → ℝ\nh : det (Matrix.diagonal D) ≠ 0\ns : ι → Set ℝ\nhs : ∀ (i : ι), MeasurableSet (s i)\n⊢ ofReal |∏ i : ι, D i| * ↑↑(Measure.map (↑(↑toLin' (Matrix.diagonal D))) volume) (Set.pi univ s) =\n    ∏ x : ι, ↑↑volume (s x)\n[PROOFSTEP]\nrw [Measure.map_apply _ (MeasurableSet.univ_pi hs)]\n[GOAL]\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nD : ι → ℝ\nh : det (Matrix.diagonal D) ≠ 0\ns : ι → Set ℝ\nhs : ∀ (i : ι), MeasurableSet (s i)\n⊢ ofReal |∏ i : ι, D i| * ↑↑volume (↑(↑toLin' (Matrix.diagonal D)) ⁻¹' Set.pi univ fun i => s i) =\n    ∏ x : ι, ↑↑volume (s x)\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nD : ι → ℝ\nh : det (Matrix.diagonal D) ≠ 0\ns : ι → Set ℝ\nhs : ∀ (i : ι), MeasurableSet (s i)\n⊢ Measurable ↑(↑toLin' (Matrix.diagonal D))\n[PROOFSTEP]\nswap\n[GOAL]\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nD : ι → ℝ\nh : det (Matrix.diagonal D) ≠ 0\ns : ι → Set ℝ\nhs : ∀ (i : ι), MeasurableSet (s i)\n⊢ Measurable ↑(↑toLin' (Matrix.diagonal D))\n[PROOFSTEP]\nexact Continuous.measurable (LinearMap.continuous_on_pi _)\n[GOAL]\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nD : ι → ℝ\nh : det (Matrix.diagonal D) ≠ 0\ns : ι → Set ℝ\nhs : ∀ (i : ι), MeasurableSet (s i)\n⊢ ofReal |∏ i : ι, D i| * ↑↑volume (↑(↑toLin' (Matrix.diagonal D)) ⁻¹' Set.pi univ fun i => s i) =\n    ∏ x : ι, ↑↑volume (s x)\n[PROOFSTEP]\nhave :\n  (Matrix.toLin' (diagonal D) ⁻¹' Set.pi Set.univ fun i : ι => s i) = Set.pi Set.univ fun i : ι => (D i * ·) ⁻¹' s i :=\n  by\n  ext f\n  simp only [LinearMap.coe_proj, Algebra.id.smul_eq_mul, LinearMap.smul_apply, mem_univ_pi, mem_preimage,\n    LinearMap.pi_apply, diagonal_toLin']\n[GOAL]\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nD : ι → ℝ\nh : det (Matrix.diagonal D) ≠ 0\ns : ι → Set ℝ\nhs : ∀ (i : ι), MeasurableSet (s i)\n⊢ (↑(↑toLin' (Matrix.diagonal D)) ⁻¹' Set.pi univ fun i => s i) = Set.pi univ fun i => (fun x => D i * x) ⁻¹' s i\n[PROOFSTEP]\next f\n[GOAL]\ncase h\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nD : ι → ℝ\nh : det (Matrix.diagonal D) ≠ 0\ns : ι → Set ℝ\nhs : ∀ (i : ι), MeasurableSet (s i)\nf : ι → ℝ\n⊢ (f ∈ ↑(↑toLin' (Matrix.diagonal D)) ⁻¹' Set.pi univ fun i => s i) ↔\n    f ∈ Set.pi univ fun i => (fun x => D i * x) ⁻¹' s i\n[PROOFSTEP]\nsimp only [LinearMap.coe_proj, Algebra.id.smul_eq_mul, LinearMap.smul_apply, mem_univ_pi, mem_preimage,\n  LinearMap.pi_apply, diagonal_toLin']\n[GOAL]\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nD : ι → ℝ\nh : det (Matrix.diagonal D) ≠ 0\ns : ι → Set ℝ\nhs : ∀ (i : ι), MeasurableSet (s i)\nthis : (↑(↑toLin' (Matrix.diagonal D)) ⁻¹' Set.pi univ fun i => s i) = Set.pi univ fun i => (fun x => D i * x) ⁻¹' s i\n⊢ ofReal |∏ i : ι, D i| * ↑↑volume (↑(↑toLin' (Matrix.diagonal D)) ⁻¹' Set.pi univ fun i => s i) =\n    ∏ x : ι, ↑↑volume (s x)\n[PROOFSTEP]\nhave B : ∀ i, ofReal (abs (D i)) * volume ((D i * ·) ⁻¹' s i) = volume (s i) :=\n  by\n  intro i\n  have A : D i ≠ 0 := by\n    simp only [det_diagonal, Ne.def] at h \n    exact Finset.prod_ne_zero_iff.1 h i (Finset.mem_univ i)\n  rw [volume_preimage_mul_left A, ← mul_assoc, ← ENNReal.ofReal_mul (abs_nonneg _), ← abs_mul, mul_inv_cancel A,\n    abs_one, ENNReal.ofReal_one, one_mul]\n[GOAL]\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nD : ι → ℝ\nh : det (Matrix.diagonal D) ≠ 0\ns : ι → Set ℝ\nhs : ∀ (i : ι), MeasurableSet (s i)\nthis : (↑(↑toLin' (Matrix.diagonal D)) ⁻¹' Set.pi univ fun i => s i) = Set.pi univ fun i => (fun x => D i * x) ⁻¹' s i\n⊢ ∀ (i : ι), ofReal |D i| * ↑↑volume ((fun x => D i * x) ⁻¹' s i) = ↑↑volume (s i)\n[PROOFSTEP]\nintro i\n[GOAL]\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nD : ι → ℝ\nh : det (Matrix.diagonal D) ≠ 0\ns : ι → Set ℝ\nhs : ∀ (i : ι), MeasurableSet (s i)\nthis : (↑(↑toLin' (Matrix.diagonal D)) ⁻¹' Set.pi univ fun i => s i) = Set.pi univ fun i => (fun x => D i * x) ⁻¹' s i\ni : ι\n⊢ ofReal |D i| * ↑↑volume ((fun x => D i * x) ⁻¹' s i) = ↑↑volume (s i)\n[PROOFSTEP]\nhave A : D i ≠ 0 := by\n  simp only [det_diagonal, Ne.def] at h \n  exact Finset.prod_ne_zero_iff.1 h i (Finset.mem_univ i)\n[GOAL]\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nD : ι → ℝ\nh : det (Matrix.diagonal D) ≠ 0\ns : ι → Set ℝ\nhs : ∀ (i : ι), MeasurableSet (s i)\nthis : (↑(↑toLin' (Matrix.diagonal D)) ⁻¹' Set.pi univ fun i => s i) = Set.pi univ fun i => (fun x => D i * x) ⁻¹' s i\ni : ι\n⊢ D i ≠ 0\n[PROOFSTEP]\nsimp only [det_diagonal, Ne.def] at h \n[GOAL]\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nD : ι → ℝ\ns : ι → Set ℝ\nhs : ∀ (i : ι), MeasurableSet (s i)\nthis : (↑(↑toLin' (Matrix.diagonal D)) ⁻¹' Set.pi univ fun i => s i) = Set.pi univ fun i => (fun x => D i * x) ⁻¹' s i\ni : ι\nh : ¬∏ i : ι, D i = 0\n⊢ D i ≠ 0\n[PROOFSTEP]\nexact Finset.prod_ne_zero_iff.1 h i (Finset.mem_univ i)\n[GOAL]\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nD : ι → ℝ\nh : det (Matrix.diagonal D) ≠ 0\ns : ι → Set ℝ\nhs : ∀ (i : ι), MeasurableSet (s i)\nthis : (↑(↑toLin' (Matrix.diagonal D)) ⁻¹' Set.pi univ fun i => s i) = Set.pi univ fun i => (fun x => D i * x) ⁻¹' s i\ni : ι\nA : D i ≠ 0\n⊢ ofReal |D i| * ↑↑volume ((fun x => D i * x) ⁻¹' s i) = ↑↑volume (s i)\n[PROOFSTEP]\nrw [volume_preimage_mul_left A, ← mul_assoc, ← ENNReal.ofReal_mul (abs_nonneg _), ← abs_mul, mul_inv_cancel A, abs_one,\n  ENNReal.ofReal_one, one_mul]\n[GOAL]\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nD : ι → ℝ\nh : det (Matrix.diagonal D) ≠ 0\ns : ι → Set ℝ\nhs : ∀ (i : ι), MeasurableSet (s i)\nthis : (↑(↑toLin' (Matrix.diagonal D)) ⁻¹' Set.pi univ fun i => s i) = Set.pi univ fun i => (fun x => D i * x) ⁻¹' s i\nB : ∀ (i : ι), ofReal |D i| * ↑↑volume ((fun x => D i * x) ⁻¹' s i) = ↑↑volume (s i)\n⊢ ofReal |∏ i : ι, D i| * ↑↑volume (↑(↑toLin' (Matrix.diagonal D)) ⁻¹' Set.pi univ fun i => s i) =\n    ∏ x : ι, ↑↑volume (s x)\n[PROOFSTEP]\nrw [this, volume_pi_pi, Finset.abs_prod, ENNReal.ofReal_prod_of_nonneg fun i _ => abs_nonneg (D i), ←\n  Finset.prod_mul_distrib]\n[GOAL]\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nD : ι → ℝ\nh : det (Matrix.diagonal D) ≠ 0\ns : ι → Set ℝ\nhs : ∀ (i : ι), MeasurableSet (s i)\nthis : (↑(↑toLin' (Matrix.diagonal D)) ⁻¹' Set.pi univ fun i => s i) = Set.pi univ fun i => (fun x => D i * x) ⁻¹' s i\nB : ∀ (i : ι), ofReal |D i| * ↑↑volume ((fun x => D i * x) ⁻¹' s i) = ↑↑volume (s i)\n⊢ ∏ x : ι, ofReal |D x| * ↑↑volume ((fun x_1 => D x * x_1) ⁻¹' s x) = ∏ x : ι, ↑↑volume (s x)\n[PROOFSTEP]\nsimp only [B]\n[GOAL]\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nt : TransvectionStruct ι ℝ\n⊢ MeasurePreserving ↑(↑toLin' (TransvectionStruct.toMatrix t))\n[PROOFSTEP]\nlet p : ι → Prop := fun i => i ≠ t.i\n[GOAL]\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nt : TransvectionStruct ι ℝ\np : ι → Prop := fun i => i ≠ t.i\n⊢ MeasurePreserving ↑(↑toLin' (TransvectionStruct.toMatrix t))\n[PROOFSTEP]\nlet α : Type _ := { x // p x }\n[GOAL]\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nt : TransvectionStruct ι ℝ\np : ι → Prop := fun i => i ≠ t.i\nα : Type u_1 := { x // p x }\n⊢ MeasurePreserving ↑(↑toLin' (TransvectionStruct.toMatrix t))\n[PROOFSTEP]\nlet β : Type _ := { x // ¬p x }\n[GOAL]\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nt : TransvectionStruct ι ℝ\np : ι → Prop := fun i => i ≠ t.i\nα : Type u_1 := { x // p x }\nβ : Type u_1 := { x // ¬p x }\n⊢ MeasurePreserving ↑(↑toLin' (TransvectionStruct.toMatrix t))\n[PROOFSTEP]\nlet g : (α → ℝ) → (β → ℝ) → β → ℝ := fun a b => (fun _ => t.c * a ⟨t.j, t.hij.symm⟩) + b\n[GOAL]\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nt : TransvectionStruct ι ℝ\np : ι → Prop := fun i => i ≠ t.i\nα : Type u_1 := { x // p x }\nβ : Type u_1 := { x // ¬p x }\ng : (α → ℝ) → (β → ℝ) → β → ℝ := fun a b => (fun x => t.c * a { val := t.j, property := (_ : t.j ≠ t.i) }) + b\n⊢ MeasurePreserving ↑(↑toLin' (TransvectionStruct.toMatrix t))\n[PROOFSTEP]\nlet F : (α → ℝ) × (β → ℝ) → (α → ℝ) × (β → ℝ) := fun p => (id p.1, g p.1 p.2)\n[GOAL]\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nt : TransvectionStruct ι ℝ\np : ι → Prop := fun i => i ≠ t.i\nα : Type u_1 := { x // p x }\nβ : Type u_1 := { x // ¬p x }\ng : (α → ℝ) → (β → ℝ) → β → ℝ := fun a b => (fun x => t.c * a { val := t.j, property := (_ : t.j ≠ t.i) }) + b\nF : (α → ℝ) × (β → ℝ) → (α → ℝ) × (β → ℝ) := fun p => (id p.fst, g p.fst p.snd)\n⊢ MeasurePreserving ↑(↑toLin' (TransvectionStruct.toMatrix t))\n[PROOFSTEP]\nlet e : (ι → ℝ) ≃ᵐ (α → ℝ) × (β → ℝ) := MeasurableEquiv.piEquivPiSubtypeProd (fun _ : ι => ℝ) p\n[GOAL]\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nt : TransvectionStruct ι ℝ\np : ι → Prop := fun i => i ≠ t.i\nα : Type u_1 := { x // p x }\nβ : Type u_1 := { x // ¬p x }\ng : (α → ℝ) → (β → ℝ) → β → ℝ := fun a b => (fun x => t.c * a { val := t.j, property := (_ : t.j ≠ t.i) }) + b\nF : (α → ℝ) × (β → ℝ) → (α → ℝ) × (β → ℝ) := fun p => (id p.fst, g p.fst p.snd)\ne : (ι → ℝ) ≃ᵐ (α → ℝ) × (β → ℝ) := MeasurableEquiv.piEquivPiSubtypeProd (fun x => ℝ) p\n⊢ MeasurePreserving ↑(↑toLin' (TransvectionStruct.toMatrix t))\n[PROOFSTEP]\nhave : (toLin' t.toMatrix : (ι → ℝ) → ι → ℝ) = e.symm ∘ F ∘ e := by\n  cases t with\n  | mk t_i t_j t_hij t_c =>\n    ext f k\n    simp only [LinearEquiv.map_smul, dite_eq_ite, LinearMap.id_coe, ite_not, Algebra.id.smul_eq_mul, one_mul,\n      dotProduct, stdBasisMatrix, MeasurableEquiv.piEquivPiSubtypeProd_symm_apply, id.def, transvection, Pi.add_apply,\n      zero_mul, LinearMap.smul_apply, Function.comp_apply, MeasurableEquiv.piEquivPiSubtypeProd_apply,\n      Matrix.TransvectionStruct.toMatrix_mk, Matrix.mulVec, LinearEquiv.map_add, ite_mul, Matrix.toLin'_apply,\n      Pi.smul_apply, Subtype.coe_mk, LinearMap.add_apply, Finset.sum_congr, Matrix.toLin'_one]\n    by_cases h : t_i = k\n    ·\n      simp only [h, true_and_iff, Finset.mem_univ, if_true, eq_self_iff_true, Finset.sum_ite_eq, one_apply, boole_mul,\n        add_comm]\n    · simp only [h, Ne.symm h, add_zero, if_false, Finset.sum_const_zero, false_and_iff, mul_zero]\n[GOAL]\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nt : TransvectionStruct ι ℝ\np : ι → Prop := fun i => i ≠ t.i\nα : Type u_1 := { x // p x }\nβ : Type u_1 := { x // ¬p x }\ng : (α → ℝ) → (β → ℝ) → β → ℝ := fun a b => (fun x => t.c * a { val := t.j, property := (_ : t.j ≠ t.i) }) + b\nF : (α → ℝ) × (β → ℝ) → (α → ℝ) × (β → ℝ) := fun p => (id p.fst, g p.fst p.snd)\ne : (ι → ℝ) ≃ᵐ (α → ℝ) × (β → ℝ) := MeasurableEquiv.piEquivPiSubtypeProd (fun x => ℝ) p\n⊢ ↑(↑toLin' (TransvectionStruct.toMatrix t)) = ↑(MeasurableEquiv.symm e) ∘ F ∘ ↑e\n[PROOFSTEP]\ncases t with\n| mk t_i t_j t_hij t_c =>\n  ext f k\n  simp only [LinearEquiv.map_smul, dite_eq_ite, LinearMap.id_coe, ite_not, Algebra.id.smul_eq_mul, one_mul, dotProduct,\n    stdBasisMatrix, MeasurableEquiv.piEquivPiSubtypeProd_symm_apply, id.def, transvection, Pi.add_apply, zero_mul,\n    LinearMap.smul_apply, Function.comp_apply, MeasurableEquiv.piEquivPiSubtypeProd_apply,\n    Matrix.TransvectionStruct.toMatrix_mk, Matrix.mulVec, LinearEquiv.map_add, ite_mul, Matrix.toLin'_apply,\n    Pi.smul_apply, Subtype.coe_mk, LinearMap.add_apply, Finset.sum_congr, Matrix.toLin'_one]\n  by_cases h : t_i = k\n  ·\n    simp only [h, true_and_iff, Finset.mem_univ, if_true, eq_self_iff_true, Finset.sum_ite_eq, one_apply, boole_mul,\n      add_comm]\n  · simp only [h, Ne.symm h, add_zero, if_false, Finset.sum_const_zero, false_and_iff, mul_zero]\n[GOAL]\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nt : TransvectionStruct ι ℝ\np : ι → Prop := fun i => i ≠ t.i\nα : Type u_1 := { x // p x }\nβ : Type u_1 := { x // ¬p x }\ng : (α → ℝ) → (β → ℝ) → β → ℝ := fun a b => (fun x => t.c * a { val := t.j, property := (_ : t.j ≠ t.i) }) + b\nF : (α → ℝ) × (β → ℝ) → (α → ℝ) × (β → ℝ) := fun p => (id p.fst, g p.fst p.snd)\ne : (ι → ℝ) ≃ᵐ (α → ℝ) × (β → ℝ) := MeasurableEquiv.piEquivPiSubtypeProd (fun x => ℝ) p\n⊢ ↑(↑toLin' (TransvectionStruct.toMatrix t)) = ↑(MeasurableEquiv.symm e) ∘ F ∘ ↑e\n[PROOFSTEP]\ncases t with\n| mk t_i t_j t_hij t_c =>\n  ext f k\n  simp only [LinearEquiv.map_smul, dite_eq_ite, LinearMap.id_coe, ite_not, Algebra.id.smul_eq_mul, one_mul, dotProduct,\n    stdBasisMatrix, MeasurableEquiv.piEquivPiSubtypeProd_symm_apply, id.def, transvection, Pi.add_apply, zero_mul,\n    LinearMap.smul_apply, Function.comp_apply, MeasurableEquiv.piEquivPiSubtypeProd_apply,\n    Matrix.TransvectionStruct.toMatrix_mk, Matrix.mulVec, LinearEquiv.map_add, ite_mul, Matrix.toLin'_apply,\n    Pi.smul_apply, Subtype.coe_mk, LinearMap.add_apply, Finset.sum_congr, Matrix.toLin'_one]\n  by_cases h : t_i = k\n  ·\n    simp only [h, true_and_iff, Finset.mem_univ, if_true, eq_self_iff_true, Finset.sum_ite_eq, one_apply, boole_mul,\n      add_comm]\n  · simp only [h, Ne.symm h, add_zero, if_false, Finset.sum_const_zero, false_and_iff, mul_zero]\n[GOAL]\ncase mk\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nt_i t_j : ι\nt_hij : t_i ≠ t_j\nt_c : ℝ\np : ι → Prop := fun i => i ≠ { i := t_i, j := t_j, hij := t_hij, c := t_c }.i\nα : Type u_1 := { x // p x }\nβ : Type u_1 := { x // ¬p x }\ng : (α → ℝ) → (β → ℝ) → β → ℝ :=\n  fun a b =>\n    (fun x =>\n        { i := t_i, j := t_j, hij := t_hij, c := t_c }.c *\n          a\n            { val := { i := t_i, j := t_j, hij := t_hij, c := t_c }.j,\n              property :=\n                (_ :\n                  { i := t_i, j := t_j, hij := t_hij, c := t_c }.j ≠\n                    { i := t_i, j := t_j, hij := t_hij, c := t_c }.i) }) +\n      b\nF : (α → ℝ) × (β → ℝ) → (α → ℝ) × (β → ℝ) := fun p => (id p.fst, g p.fst p.snd)\ne : (ι → ℝ) ≃ᵐ (α → ℝ) × (β → ℝ) := MeasurableEquiv.piEquivPiSubtypeProd (fun x => ℝ) p\n⊢ ↑(↑toLin' (TransvectionStruct.toMatrix { i := t_i, j := t_j, hij := t_hij, c := t_c })) =\n    ↑(MeasurableEquiv.symm e) ∘ F ∘ ↑e\n[PROOFSTEP]\n\n| mk t_i t_j t_hij t_c =>\n  ext f k\n  simp only [LinearEquiv.map_smul, dite_eq_ite, LinearMap.id_coe, ite_not, Algebra.id.smul_eq_mul, one_mul, dotProduct,\n    stdBasisMatrix, MeasurableEquiv.piEquivPiSubtypeProd_symm_apply, id.def, transvection, Pi.add_apply, zero_mul,\n    LinearMap.smul_apply, Function.comp_apply, MeasurableEquiv.piEquivPiSubtypeProd_apply,\n    Matrix.TransvectionStruct.toMatrix_mk, Matrix.mulVec, LinearEquiv.map_add, ite_mul, Matrix.toLin'_apply,\n    Pi.smul_apply, Subtype.coe_mk, LinearMap.add_apply, Finset.sum_congr, Matrix.toLin'_one]\n  by_cases h : t_i = k\n  ·\n    simp only [h, true_and_iff, Finset.mem_univ, if_true, eq_self_iff_true, Finset.sum_ite_eq, one_apply, boole_mul,\n      add_comm]\n  · simp only [h, Ne.symm h, add_zero, if_false, Finset.sum_const_zero, false_and_iff, mul_zero]\n[GOAL]\ncase mk\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nt_i t_j : ι\nt_hij : t_i ≠ t_j\nt_c : ℝ\np : ι → Prop := fun i => i ≠ { i := t_i, j := t_j, hij := t_hij, c := t_c }.i\nα : Type u_1 := { x // p x }\nβ : Type u_1 := { x // ¬p x }\ng : (α → ℝ) → (β → ℝ) → β → ℝ :=\n  fun a b =>\n    (fun x =>\n        { i := t_i, j := t_j, hij := t_hij, c := t_c }.c *\n          a\n            { val := { i := t_i, j := t_j, hij := t_hij, c := t_c }.j,\n              property :=\n                (_ :\n                  { i := t_i, j := t_j, hij := t_hij, c := t_c }.j ≠\n                    { i := t_i, j := t_j, hij := t_hij, c := t_c }.i) }) +\n      b\nF : (α → ℝ) × (β → ℝ) → (α → ℝ) × (β → ℝ) := fun p => (id p.fst, g p.fst p.snd)\ne : (ι → ℝ) ≃ᵐ (α → ℝ) × (β → ℝ) := MeasurableEquiv.piEquivPiSubtypeProd (fun x => ℝ) p\n⊢ ↑(↑toLin' (TransvectionStruct.toMatrix { i := t_i, j := t_j, hij := t_hij, c := t_c })) =\n    ↑(MeasurableEquiv.symm e) ∘ F ∘ ↑e\n[PROOFSTEP]\next f k\n[GOAL]\ncase mk.h.h\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nt_i t_j : ι\nt_hij : t_i ≠ t_j\nt_c : ℝ\np : ι → Prop := fun i => i ≠ { i := t_i, j := t_j, hij := t_hij, c := t_c }.i\nα : Type u_1 := { x // p x }\nβ : Type u_1 := { x // ¬p x }\ng : (α → ℝ) → (β → ℝ) → β → ℝ :=\n  fun a b =>\n    (fun x =>\n        { i := t_i, j := t_j, hij := t_hij, c := t_c }.c *\n          a\n            { val := { i := t_i, j := t_j, hij := t_hij, c := t_c }.j,\n              property :=\n                (_ :\n                  { i := t_i, j := t_j, hij := t_hij, c := t_c }.j ≠\n                    { i := t_i, j := t_j, hij := t_hij, c := t_c }.i) }) +\n      b\nF : (α → ℝ) × (β → ℝ) → (α → ℝ) × (β → ℝ) := fun p => (id p.fst, g p.fst p.snd)\ne : (ι → ℝ) ≃ᵐ (α → ℝ) × (β → ℝ) := MeasurableEquiv.piEquivPiSubtypeProd (fun x => ℝ) p\nf : ι → ℝ\nk : ι\n⊢ ↑(↑toLin' (TransvectionStruct.toMatrix { i := t_i, j := t_j, hij := t_hij, c := t_c })) f k =\n    (↑(MeasurableEquiv.symm e) ∘ F ∘ ↑e) f k\n[PROOFSTEP]\nsimp only [LinearEquiv.map_smul, dite_eq_ite, LinearMap.id_coe, ite_not, Algebra.id.smul_eq_mul, one_mul, dotProduct,\n  stdBasisMatrix, MeasurableEquiv.piEquivPiSubtypeProd_symm_apply, id.def, transvection, Pi.add_apply, zero_mul,\n  LinearMap.smul_apply, Function.comp_apply, MeasurableEquiv.piEquivPiSubtypeProd_apply,\n  Matrix.TransvectionStruct.toMatrix_mk, Matrix.mulVec, LinearEquiv.map_add, ite_mul, Matrix.toLin'_apply,\n  Pi.smul_apply, Subtype.coe_mk, LinearMap.add_apply, Finset.sum_congr, Matrix.toLin'_one]\n[GOAL]\ncase mk.h.h\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nt_i t_j : ι\nt_hij : t_i ≠ t_j\nt_c : ℝ\np : ι → Prop := fun i => i ≠ { i := t_i, j := t_j, hij := t_hij, c := t_c }.i\nα : Type u_1 := { x // p x }\nβ : Type u_1 := { x // ¬p x }\ng : (α → ℝ) → (β → ℝ) → β → ℝ :=\n  fun a b =>\n    (fun x =>\n        { i := t_i, j := t_j, hij := t_hij, c := t_c }.c *\n          a\n            { val := { i := t_i, j := t_j, hij := t_hij, c := t_c }.j,\n              property :=\n                (_ :\n                  { i := t_i, j := t_j, hij := t_hij, c := t_c }.j ≠\n                    { i := t_i, j := t_j, hij := t_hij, c := t_c }.i) }) +\n      b\nF : (α → ℝ) × (β → ℝ) → (α → ℝ) × (β → ℝ) := fun p => (id p.fst, g p.fst p.snd)\ne : (ι → ℝ) ≃ᵐ (α → ℝ) × (β → ℝ) := MeasurableEquiv.piEquivPiSubtypeProd (fun x => ℝ) p\nf : ι → ℝ\nk : ι\n⊢ (f k + ∑ x : ι, if t_i = k ∧ t_j = x then t_c * f x else 0) = if k = t_i then t_c * f t_j + f k else f k\n[PROOFSTEP]\nby_cases h : t_i = k\n[GOAL]\ncase pos\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nt_i t_j : ι\nt_hij : t_i ≠ t_j\nt_c : ℝ\np : ι → Prop := fun i => i ≠ { i := t_i, j := t_j, hij := t_hij, c := t_c }.i\nα : Type u_1 := { x // p x }\nβ : Type u_1 := { x // ¬p x }\ng : (α → ℝ) → (β → ℝ) → β → ℝ :=\n  fun a b =>\n    (fun x =>\n        { i := t_i, j := t_j, hij := t_hij, c := t_c }.c *\n          a\n            { val := { i := t_i, j := t_j, hij := t_hij, c := t_c }.j,\n              property :=\n                (_ :\n                  { i := t_i, j := t_j, hij := t_hij, c := t_c }.j ≠\n                    { i := t_i, j := t_j, hij := t_hij, c := t_c }.i) }) +\n      b\nF : (α → ℝ) × (β → ℝ) → (α → ℝ) × (β → ℝ) := fun p => (id p.fst, g p.fst p.snd)\ne : (ι → ℝ) ≃ᵐ (α → ℝ) × (β → ℝ) := MeasurableEquiv.piEquivPiSubtypeProd (fun x => ℝ) p\nf : ι → ℝ\nk : ι\nh : t_i = k\n⊢ (f k + ∑ x : ι, if t_i = k ∧ t_j = x then t_c * f x else 0) = if k = t_i then t_c * f t_j + f k else f k\n[PROOFSTEP]\nsimp only [h, true_and_iff, Finset.mem_univ, if_true, eq_self_iff_true, Finset.sum_ite_eq, one_apply, boole_mul,\n  add_comm]\n[GOAL]\ncase neg\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nt_i t_j : ι\nt_hij : t_i ≠ t_j\nt_c : ℝ\np : ι → Prop := fun i => i ≠ { i := t_i, j := t_j, hij := t_hij, c := t_c }.i\nα : Type u_1 := { x // p x }\nβ : Type u_1 := { x // ¬p x }\ng : (α → ℝ) → (β → ℝ) → β → ℝ :=\n  fun a b =>\n    (fun x =>\n        { i := t_i, j := t_j, hij := t_hij, c := t_c }.c *\n          a\n            { val := { i := t_i, j := t_j, hij := t_hij, c := t_c }.j,\n              property :=\n                (_ :\n                  { i := t_i, j := t_j, hij := t_hij, c := t_c }.j ≠\n                    { i := t_i, j := t_j, hij := t_hij, c := t_c }.i) }) +\n      b\nF : (α → ℝ) × (β → ℝ) → (α → ℝ) × (β → ℝ) := fun p => (id p.fst, g p.fst p.snd)\ne : (ι → ℝ) ≃ᵐ (α → ℝ) × (β → ℝ) := MeasurableEquiv.piEquivPiSubtypeProd (fun x => ℝ) p\nf : ι → ℝ\nk : ι\nh : ¬t_i = k\n⊢ (f k + ∑ x : ι, if t_i = k ∧ t_j = x then t_c * f x else 0) = if k = t_i then t_c * f t_j + f k else f k\n[PROOFSTEP]\nsimp only [h, Ne.symm h, add_zero, if_false, Finset.sum_const_zero, false_and_iff, mul_zero]\n[GOAL]\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nt : TransvectionStruct ι ℝ\np : ι → Prop := fun i => i ≠ t.i\nα : Type u_1 := { x // p x }\nβ : Type u_1 := { x // ¬p x }\ng : (α → ℝ) → (β → ℝ) → β → ℝ := fun a b => (fun x => t.c * a { val := t.j, property := (_ : t.j ≠ t.i) }) + b\nF : (α → ℝ) × (β → ℝ) → (α → ℝ) × (β → ℝ) := fun p => (id p.fst, g p.fst p.snd)\ne : (ι → ℝ) ≃ᵐ (α → ℝ) × (β → ℝ) := MeasurableEquiv.piEquivPiSubtypeProd (fun x => ℝ) p\nthis : ↑(↑toLin' (TransvectionStruct.toMatrix t)) = ↑(MeasurableEquiv.symm e) ∘ F ∘ ↑e\n⊢ MeasurePreserving ↑(↑toLin' (TransvectionStruct.toMatrix t))\n[PROOFSTEP]\nrw [this]\n[GOAL]\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nt : TransvectionStruct ι ℝ\np : ι → Prop := fun i => i ≠ t.i\nα : Type u_1 := { x // p x }\nβ : Type u_1 := { x // ¬p x }\ng : (α → ℝ) → (β → ℝ) → β → ℝ := fun a b => (fun x => t.c * a { val := t.j, property := (_ : t.j ≠ t.i) }) + b\nF : (α → ℝ) × (β → ℝ) → (α → ℝ) × (β → ℝ) := fun p => (id p.fst, g p.fst p.snd)\ne : (ι → ℝ) ≃ᵐ (α → ℝ) × (β → ℝ) := MeasurableEquiv.piEquivPiSubtypeProd (fun x => ℝ) p\nthis : ↑(↑toLin' (TransvectionStruct.toMatrix t)) = ↑(MeasurableEquiv.symm e) ∘ F ∘ ↑e\n⊢ MeasurePreserving (↑(MeasurableEquiv.symm e) ∘ F ∘ ↑e)\n[PROOFSTEP]\nhave A : MeasurePreserving e := by convert volume_preserving_piEquivPiSubtypeProd (fun _ : ι => ℝ) p\n[GOAL]\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nt : TransvectionStruct ι ℝ\np : ι → Prop := fun i => i ≠ t.i\nα : Type u_1 := { x // p x }\nβ : Type u_1 := { x // ¬p x }\ng : (α → ℝ) → (β → ℝ) → β → ℝ := fun a b => (fun x => t.c * a { val := t.j, property := (_ : t.j ≠ t.i) }) + b\nF : (α → ℝ) × (β → ℝ) → (α → ℝ) × (β → ℝ) := fun p => (id p.fst, g p.fst p.snd)\ne : (ι → ℝ) ≃ᵐ (α → ℝ) × (β → ℝ) := MeasurableEquiv.piEquivPiSubtypeProd (fun x => ℝ) p\nthis : ↑(↑toLin' (TransvectionStruct.toMatrix t)) = ↑(MeasurableEquiv.symm e) ∘ F ∘ ↑e\n⊢ MeasurePreserving ↑e\n[PROOFSTEP]\nconvert volume_preserving_piEquivPiSubtypeProd (fun _ : ι => ℝ) p\n[GOAL]\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nt : TransvectionStruct ι ℝ\np : ι → Prop := fun i => i ≠ t.i\nα : Type u_1 := { x // p x }\nβ : Type u_1 := { x // ¬p x }\ng : (α → ℝ) → (β → ℝ) → β → ℝ := fun a b => (fun x => t.c * a { val := t.j, property := (_ : t.j ≠ t.i) }) + b\nF : (α → ℝ) × (β → ℝ) → (α → ℝ) × (β → ℝ) := fun p => (id p.fst, g p.fst p.snd)\ne : (ι → ℝ) ≃ᵐ (α → ℝ) × (β → ℝ) := MeasurableEquiv.piEquivPiSubtypeProd (fun x => ℝ) p\nthis : ↑(↑toLin' (TransvectionStruct.toMatrix t)) = ↑(MeasurableEquiv.symm e) ∘ F ∘ ↑e\nA : MeasurePreserving ↑e\n⊢ MeasurePreserving (↑(MeasurableEquiv.symm e) ∘ F ∘ ↑e)\n[PROOFSTEP]\nhave B : MeasurePreserving F :=\n  haveI g_meas : Measurable (Function.uncurry g) :=\n    by\n    have : Measurable fun c : α → ℝ => c ⟨t.j, t.hij.symm⟩ := measurable_pi_apply ⟨t.j, t.hij.symm⟩\n    refine Measurable.add ?_ measurable_snd\n    refine measurable_pi_lambda _ fun _ => Measurable.const_mul ?_ _\n    exact this.comp measurable_fst\n  (MeasurePreserving.id _).skew_product g_meas\n    (eventually_of_forall fun a =>\n      map_add_left_eq_self (Measure.pi fun _ => (stdOrthonormalBasis ℝ ℝ).toBasis.addHaar) _)\n[GOAL]\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nt : TransvectionStruct ι ℝ\np : ι → Prop := fun i => i ≠ t.i\nα : Type u_1 := { x // p x }\nβ : Type u_1 := { x // ¬p x }\ng : (α → ℝ) → (β → ℝ) → β → ℝ := fun a b => (fun x => t.c * a { val := t.j, property := (_ : t.j ≠ t.i) }) + b\nF : (α → ℝ) × (β → ℝ) → (α → ℝ) × (β → ℝ) := fun p => (id p.fst, g p.fst p.snd)\ne : (ι → ℝ) ≃ᵐ (α → ℝ) × (β → ℝ) := MeasurableEquiv.piEquivPiSubtypeProd (fun x => ℝ) p\nthis : ↑(↑toLin' (TransvectionStruct.toMatrix t)) = ↑(MeasurableEquiv.symm e) ∘ F ∘ ↑e\nA : MeasurePreserving ↑e\n⊢ Measurable (Function.uncurry g)\n[PROOFSTEP]\nhave : Measurable fun c : α → ℝ => c ⟨t.j, t.hij.symm⟩ := measurable_pi_apply ⟨t.j, t.hij.symm⟩\n[GOAL]\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nt : TransvectionStruct ι ℝ\np : ι → Prop := fun i => i ≠ t.i\nα : Type u_1 := { x // p x }\nβ : Type u_1 := { x // ¬p x }\ng : (α → ℝ) → (β → ℝ) → β → ℝ := fun a b => (fun x => t.c * a { val := t.j, property := (_ : t.j ≠ t.i) }) + b\nF : (α → ℝ) × (β → ℝ) → (α → ℝ) × (β → ℝ) := fun p => (id p.fst, g p.fst p.snd)\ne : (ι → ℝ) ≃ᵐ (α → ℝ) × (β → ℝ) := MeasurableEquiv.piEquivPiSubtypeProd (fun x => ℝ) p\nthis✝ : ↑(↑toLin' (TransvectionStruct.toMatrix t)) = ↑(MeasurableEquiv.symm e) ∘ F ∘ ↑e\nA : MeasurePreserving ↑e\nthis : Measurable fun c => c { val := t.j, property := (_ : t.j ≠ t.i) }\n⊢ Measurable (Function.uncurry g)\n[PROOFSTEP]\nrefine Measurable.add ?_ measurable_snd\n[GOAL]\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nt : TransvectionStruct ι ℝ\np : ι → Prop := fun i => i ≠ t.i\nα : Type u_1 := { x // p x }\nβ : Type u_1 := { x // ¬p x }\ng : (α → ℝ) → (β → ℝ) → β → ℝ := fun a b => (fun x => t.c * a { val := t.j, property := (_ : t.j ≠ t.i) }) + b\nF : (α → ℝ) × (β → ℝ) → (α → ℝ) × (β → ℝ) := fun p => (id p.fst, g p.fst p.snd)\ne : (ι → ℝ) ≃ᵐ (α → ℝ) × (β → ℝ) := MeasurableEquiv.piEquivPiSubtypeProd (fun x => ℝ) p\nthis✝ : ↑(↑toLin' (TransvectionStruct.toMatrix t)) = ↑(MeasurableEquiv.symm e) ∘ F ∘ ↑e\nA : MeasurePreserving ↑e\nthis : Measurable fun c => c { val := t.j, property := (_ : t.j ≠ t.i) }\n⊢ Measurable fun a x => t.c * Prod.fst a { val := t.j, property := (_ : t.j ≠ t.i) }\n[PROOFSTEP]\nrefine measurable_pi_lambda _ fun _ => Measurable.const_mul ?_ _\n[GOAL]\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nt : TransvectionStruct ι ℝ\np : ι → Prop := fun i => i ≠ t.i\nα : Type u_1 := { x // p x }\nβ : Type u_1 := { x // ¬p x }\ng : (α → ℝ) → (β → ℝ) → β → ℝ := fun a b => (fun x => t.c * a { val := t.j, property := (_ : t.j ≠ t.i) }) + b\nF : (α → ℝ) × (β → ℝ) → (α → ℝ) × (β → ℝ) := fun p => (id p.fst, g p.fst p.snd)\ne : (ι → ℝ) ≃ᵐ (α → ℝ) × (β → ℝ) := MeasurableEquiv.piEquivPiSubtypeProd (fun x => ℝ) p\nthis✝ : ↑(↑toLin' (TransvectionStruct.toMatrix t)) = ↑(MeasurableEquiv.symm e) ∘ F ∘ ↑e\nA : MeasurePreserving ↑e\nthis : Measurable fun c => c { val := t.j, property := (_ : t.j ≠ t.i) }\nx✝ : β\n⊢ Measurable fun c => Prod.fst c { val := t.j, property := (_ : t.j ≠ t.i) }\n[PROOFSTEP]\nexact this.comp measurable_fst\n[GOAL]\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nt : TransvectionStruct ι ℝ\np : ι → Prop := fun i => i ≠ t.i\nα : Type u_1 := { x // p x }\nβ : Type u_1 := { x // ¬p x }\ng : (α → ℝ) → (β → ℝ) → β → ℝ := fun a b => (fun x => t.c * a { val := t.j, property := (_ : t.j ≠ t.i) }) + b\nF : (α → ℝ) × (β → ℝ) → (α → ℝ) × (β → ℝ) := fun p => (id p.fst, g p.fst p.snd)\ne : (ι → ℝ) ≃ᵐ (α → ℝ) × (β → ℝ) := MeasurableEquiv.piEquivPiSubtypeProd (fun x => ℝ) p\nthis : ↑(↑toLin' (TransvectionStruct.toMatrix t)) = ↑(MeasurableEquiv.symm e) ∘ F ∘ ↑e\nA : MeasurePreserving ↑e\nB : MeasurePreserving F\n⊢ MeasurePreserving (↑(MeasurableEquiv.symm e) ∘ F ∘ ↑e)\n[PROOFSTEP]\nexact ((A.symm e).comp B).comp A\n[GOAL]\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nM : Matrix ι ι ℝ\nhM : det M ≠ 0\n⊢ Measure.map (↑(↑toLin' M)) volume = ofReal |(det M)⁻¹| • volume\n[PROOFSTEP]\napply diagonal_transvection_induction_of_det_ne_zero _ M hM\n[GOAL]\ncase hdiag\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nM : Matrix ι ι ℝ\nhM : det M ≠ 0\n⊢ ∀ (D : ι → ℝ),\n    det (Matrix.diagonal D) ≠ 0 →\n      Measure.map (↑(↑toLin' (Matrix.diagonal D))) volume = ofReal |(det (Matrix.diagonal D))⁻¹| • volume\n[PROOFSTEP]\nintro D hD\n[GOAL]\ncase hdiag\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nM : Matrix ι ι ℝ\nhM : det M ≠ 0\nD : ι → ℝ\nhD : det (Matrix.diagonal D) ≠ 0\n⊢ Measure.map (↑(↑toLin' (Matrix.diagonal D))) volume = ofReal |(det (Matrix.diagonal D))⁻¹| • volume\n[PROOFSTEP]\nconv_rhs => rw [← smul_map_diagonal_volume_pi hD]\n[GOAL]\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nM : Matrix ι ι ℝ\nhM : det M ≠ 0\nD : ι → ℝ\nhD : det (Matrix.diagonal D) ≠ 0\n| ofReal |(det (Matrix.diagonal D))⁻¹| • volume\n[PROOFSTEP]\nrw [← smul_map_diagonal_volume_pi hD]\n[GOAL]\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nM : Matrix ι ι ℝ\nhM : det M ≠ 0\nD : ι → ℝ\nhD : det (Matrix.diagonal D) ≠ 0\n| ofReal |(det (Matrix.diagonal D))⁻¹| • volume\n[PROOFSTEP]\nrw [← smul_map_diagonal_volume_pi hD]\n[GOAL]\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nM : Matrix ι ι ℝ\nhM : det M ≠ 0\nD : ι → ℝ\nhD : det (Matrix.diagonal D) ≠ 0\n| ofReal |(det (Matrix.diagonal D))⁻¹| • volume\n[PROOFSTEP]\nrw [← smul_map_diagonal_volume_pi hD]\n[GOAL]\ncase hdiag\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nM : Matrix ι ι ℝ\nhM : det M ≠ 0\nD : ι → ℝ\nhD : det (Matrix.diagonal D) ≠ 0\n⊢ Measure.map (↑(↑toLin' (Matrix.diagonal D))) volume =\n    ofReal |(det (Matrix.diagonal D))⁻¹| •\n      ofReal |det (Matrix.diagonal D)| • Measure.map (↑(↑toLin' (Matrix.diagonal D))) volume\n[PROOFSTEP]\nrw [smul_smul, ← ENNReal.ofReal_mul (abs_nonneg _), ← abs_mul, inv_mul_cancel hD, abs_one, ENNReal.ofReal_one, one_smul]\n[GOAL]\ncase htransvec\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nM : Matrix ι ι ℝ\nhM : det M ≠ 0\n⊢ ∀ (t : TransvectionStruct ι ℝ),\n    Measure.map (↑(↑toLin' (TransvectionStruct.toMatrix t))) volume =\n      ofReal |(det (TransvectionStruct.toMatrix t))⁻¹| • volume\n[PROOFSTEP]\nintro t\n[GOAL]\ncase htransvec\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nM : Matrix ι ι ℝ\nhM : det M ≠ 0\nt : TransvectionStruct ι ℝ\n⊢ Measure.map (↑(↑toLin' (TransvectionStruct.toMatrix t))) volume =\n    ofReal |(det (TransvectionStruct.toMatrix t))⁻¹| • volume\n[PROOFSTEP]\nsimp only [Matrix.TransvectionStruct.det, ENNReal.ofReal_one, (volume_preserving_transvectionStruct _).map_eq, one_smul,\n  _root_.inv_one, abs_one]\n[GOAL]\ncase hmul\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nM : Matrix ι ι ℝ\nhM : det M ≠ 0\n⊢ ∀ (A B : Matrix ι ι ℝ),\n    det A ≠ 0 →\n      det B ≠ 0 →\n        Measure.map (↑(↑toLin' A)) volume = ofReal |(det A)⁻¹| • volume →\n          Measure.map (↑(↑toLin' B)) volume = ofReal |(det B)⁻¹| • volume →\n            Measure.map (↑(↑toLin' (A * B))) volume = ofReal |(det (A * B))⁻¹| • volume\n[PROOFSTEP]\nintro A B _ _ IHA IHB\n[GOAL]\ncase hmul\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nM : Matrix ι ι ℝ\nhM : det M ≠ 0\nA B : Matrix ι ι ℝ\na✝¹ : det A ≠ 0\na✝ : det B ≠ 0\nIHA : Measure.map (↑(↑toLin' A)) volume = ofReal |(det A)⁻¹| • volume\nIHB : Measure.map (↑(↑toLin' B)) volume = ofReal |(det B)⁻¹| • volume\n⊢ Measure.map (↑(↑toLin' (A * B))) volume = ofReal |(det (A * B))⁻¹| • volume\n[PROOFSTEP]\nrw [toLin'_mul, det_mul, LinearMap.coe_comp, ← Measure.map_map, IHB, Measure.map_smul, IHA, smul_smul, ←\n  ENNReal.ofReal_mul (abs_nonneg _), ← abs_mul, mul_comm, mul_inv]\n[GOAL]\ncase hmul.hg\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nM : Matrix ι ι ℝ\nhM : det M ≠ 0\nA B : Matrix ι ι ℝ\na✝¹ : det A ≠ 0\na✝ : det B ≠ 0\nIHA : Measure.map (↑(↑toLin' A)) volume = ofReal |(det A)⁻¹| • volume\nIHB : Measure.map (↑(↑toLin' B)) volume = ofReal |(det B)⁻¹| • volume\n⊢ Measurable ↑(↑toLin' A)\n[PROOFSTEP]\napply Continuous.measurable\n[GOAL]\ncase hmul.hg.hf\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nM : Matrix ι ι ℝ\nhM : det M ≠ 0\nA B : Matrix ι ι ℝ\na✝¹ : det A ≠ 0\na✝ : det B ≠ 0\nIHA : Measure.map (↑(↑toLin' A)) volume = ofReal |(det A)⁻¹| • volume\nIHB : Measure.map (↑(↑toLin' B)) volume = ofReal |(det B)⁻¹| • volume\n⊢ Continuous ↑(↑toLin' A)\n[PROOFSTEP]\napply LinearMap.continuous_on_pi\n[GOAL]\ncase hmul.hf\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nM : Matrix ι ι ℝ\nhM : det M ≠ 0\nA B : Matrix ι ι ℝ\na✝¹ : det A ≠ 0\na✝ : det B ≠ 0\nIHA : Measure.map (↑(↑toLin' A)) volume = ofReal |(det A)⁻¹| • volume\nIHB : Measure.map (↑(↑toLin' B)) volume = ofReal |(det B)⁻¹| • volume\n⊢ Measurable ↑(↑toLin' B)\n[PROOFSTEP]\napply Continuous.measurable\n[GOAL]\ncase hmul.hf.hf\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nM : Matrix ι ι ℝ\nhM : det M ≠ 0\nA B : Matrix ι ι ℝ\na✝¹ : det A ≠ 0\na✝ : det B ≠ 0\nIHA : Measure.map (↑(↑toLin' A)) volume = ofReal |(det A)⁻¹| • volume\nIHB : Measure.map (↑(↑toLin' B)) volume = ofReal |(det B)⁻¹| • volume\n⊢ Continuous ↑(↑toLin' B)\n[PROOFSTEP]\napply LinearMap.continuous_on_pi\n[GOAL]\nι : Type u_1\ninst✝ : Fintype ι\nf : (ι → ℝ) →ₗ[ℝ] ι → ℝ\nhf : ↑LinearMap.det f ≠ 0\n⊢ Measure.map (↑f) volume = ofReal |(↑LinearMap.det f)⁻¹| • volume\n[PROOFSTEP]\nclassical\n  -- this is deduced from the matrix case\nlet M := LinearMap.toMatrix' f\nhave A : LinearMap.det f = det M := by simp only [LinearMap.det_toMatrix']\nhave B : f = toLin' M := by simp only [toLin'_toMatrix']\nrw [A, B]\napply map_matrix_volume_pi_eq_smul_volume_pi\nrwa [A] at hf \n[GOAL]\nι : Type u_1\ninst✝ : Fintype ι\nf : (ι → ℝ) →ₗ[ℝ] ι → ℝ\nhf : ↑LinearMap.det f ≠ 0\n⊢ Measure.map (↑f) volume = ofReal |(↑LinearMap.det f)⁻¹| • volume\n[PROOFSTEP]\nlet M := LinearMap.toMatrix' f\n[GOAL]\nι : Type u_1\ninst✝ : Fintype ι\nf : (ι → ℝ) →ₗ[ℝ] ι → ℝ\nhf : ↑LinearMap.det f ≠ 0\nM : (fun x => Matrix ι ι ℝ) f := ↑LinearMap.toMatrix' f\n⊢ Measure.map (↑f) volume = ofReal |(↑LinearMap.det f)⁻¹| • volume\n[PROOFSTEP]\nhave A : LinearMap.det f = det M := by simp only [LinearMap.det_toMatrix']\n[GOAL]\nι : Type u_1\ninst✝ : Fintype ι\nf : (ι → ℝ) →ₗ[ℝ] ι → ℝ\nhf : ↑LinearMap.det f ≠ 0\nM : (fun x => Matrix ι ι ℝ) f := ↑LinearMap.toMatrix' f\n⊢ ↑LinearMap.det f = det M\n[PROOFSTEP]\nsimp only [LinearMap.det_toMatrix']\n[GOAL]\nι : Type u_1\ninst✝ : Fintype ι\nf : (ι → ℝ) →ₗ[ℝ] ι → ℝ\nhf : ↑LinearMap.det f ≠ 0\nM : (fun x => Matrix ι ι ℝ) f := ↑LinearMap.toMatrix' f\nA : ↑LinearMap.det f = det M\n⊢ Measure.map (↑f) volume = ofReal |(↑LinearMap.det f)⁻¹| • volume\n[PROOFSTEP]\nhave B : f = toLin' M := by simp only [toLin'_toMatrix']\n[GOAL]\nι : Type u_1\ninst✝ : Fintype ι\nf : (ι → ℝ) →ₗ[ℝ] ι → ℝ\nhf : ↑LinearMap.det f ≠ 0\nM : (fun x => Matrix ι ι ℝ) f := ↑LinearMap.toMatrix' f\nA : ↑LinearMap.det f = det M\n⊢ f = ↑toLin' M\n[PROOFSTEP]\nsimp only [toLin'_toMatrix']\n[GOAL]\nι : Type u_1\ninst✝ : Fintype ι\nf : (ι → ℝ) →ₗ[ℝ] ι → ℝ\nhf : ↑LinearMap.det f ≠ 0\nM : (fun x => Matrix ι ι ℝ) f := ↑LinearMap.toMatrix' f\nA : ↑LinearMap.det f = det M\nB : f = ↑toLin' M\n⊢ Measure.map (↑f) volume = ofReal |(↑LinearMap.det f)⁻¹| • volume\n[PROOFSTEP]\nrw [A, B]\n[GOAL]\nι : Type u_1\ninst✝ : Fintype ι\nf : (ι → ℝ) →ₗ[ℝ] ι → ℝ\nhf : ↑LinearMap.det f ≠ 0\nM : (fun x => Matrix ι ι ℝ) f := ↑LinearMap.toMatrix' f\nA : ↑LinearMap.det f = det M\nB : f = ↑toLin' M\n⊢ Measure.map (↑(↑toLin' M)) volume = ofReal |(det M)⁻¹| • volume\n[PROOFSTEP]\napply map_matrix_volume_pi_eq_smul_volume_pi\n[GOAL]\ncase hM\nι : Type u_1\ninst✝ : Fintype ι\nf : (ι → ℝ) →ₗ[ℝ] ι → ℝ\nhf : ↑LinearMap.det f ≠ 0\nM : (fun x => Matrix ι ι ℝ) f := ↑LinearMap.toMatrix' f\nA : ↑LinearMap.det f = det M\nB : f = ↑toLin' M\n⊢ det M ≠ 0\n[PROOFSTEP]\nrwa [A] at hf \n[GOAL]\nα : Type u_1\nf g : α → ℝ\ns : Set α\n⊢ regionBetween f g s ⊆ s ×ˢ univ\n[PROOFSTEP]\nsimpa only [prod_univ, regionBetween, Set.preimage, setOf_subset_setOf] using fun a => And.left\n[GOAL]\nα : Type u_1\ninst✝ : MeasurableSpace α\nμ : Measure α\nf g : α → ℝ\ns : Set α\nhf : Measurable f\nhg : Measurable g\nhs : MeasurableSet s\n⊢ MeasurableSet (regionBetween f g s)\n[PROOFSTEP]\ndsimp only [regionBetween, Ioo, mem_setOf_eq, setOf_and]\n[GOAL]\nα : Type u_1\ninst✝ : MeasurableSpace α\nμ : Measure α\nf g : α → ℝ\ns : Set α\nhf : Measurable f\nhg : Measurable g\nhs : MeasurableSet s\n⊢ MeasurableSet ({a | a.fst ∈ s} ∩ {a | a.snd ∈ {a_1 | f a.fst < a_1} ∩ {a_1 | a_1 < g a.fst}})\n[PROOFSTEP]\nrefine'\n  MeasurableSet.inter _\n    ((measurableSet_lt (hf.comp measurable_fst) measurable_snd).inter\n      (measurableSet_lt measurable_snd (hg.comp measurable_fst)))\n[GOAL]\nα : Type u_1\ninst✝ : MeasurableSpace α\nμ : Measure α\nf g : α → ℝ\ns : Set α\nhf : Measurable f\nhg : Measurable g\nhs : MeasurableSet s\n⊢ MeasurableSet {a | a.fst ∈ s}\n[PROOFSTEP]\nexact measurable_fst hs\n[GOAL]\nα : Type u_1\ninst✝ : MeasurableSpace α\nμ : Measure α\nf g : α → ℝ\ns : Set α\nhf : Measurable f\nhg : Measurable g\nhs : MeasurableSet s\n⊢ MeasurableSet {p | p.fst ∈ s ∧ p.snd ∈ Ioc (f p.fst) (g p.fst)}\n[PROOFSTEP]\ndsimp only [regionBetween, Ioc, mem_setOf_eq, setOf_and]\n[GOAL]\nα : Type u_1\ninst✝ : MeasurableSpace α\nμ : Measure α\nf g : α → ℝ\ns : Set α\nhf : Measurable f\nhg : Measurable g\nhs : MeasurableSet s\n⊢ MeasurableSet ({a | a.fst ∈ s} ∩ {a | a.snd ∈ {a_1 | f a.fst < a_1} ∩ {a_1 | a_1 ≤ g a.fst}})\n[PROOFSTEP]\nrefine'\n  MeasurableSet.inter _\n    ((measurableSet_lt (hf.comp measurable_fst) measurable_snd).inter\n      (measurableSet_le measurable_snd (hg.comp measurable_fst)))\n[GOAL]\nα : Type u_1\ninst✝ : MeasurableSpace α\nμ : Measure α\nf g : α → ℝ\ns : Set α\nhf : Measurable f\nhg : Measurable g\nhs : MeasurableSet s\n⊢ MeasurableSet {a | a.fst ∈ s}\n[PROOFSTEP]\nexact measurable_fst hs\n[GOAL]\nα : Type u_1\ninst✝ : MeasurableSpace α\nμ : Measure α\nf g : α → ℝ\ns : Set α\nhf : Measurable f\nhg : Measurable g\nhs : MeasurableSet s\n⊢ MeasurableSet {p | p.fst ∈ s ∧ p.snd ∈ Ico (f p.fst) (g p.fst)}\n[PROOFSTEP]\ndsimp only [regionBetween, Ico, mem_setOf_eq, setOf_and]\n[GOAL]\nα : Type u_1\ninst✝ : MeasurableSpace α\nμ : Measure α\nf g : α → ℝ\ns : Set α\nhf : Measurable f\nhg : Measurable g\nhs : MeasurableSet s\n⊢ MeasurableSet ({a | a.fst ∈ s} ∩ {a | a.snd ∈ {a_1 | f a.fst ≤ a_1} ∩ {a_1 | a_1 < g a.fst}})\n[PROOFSTEP]\nrefine'\n  MeasurableSet.inter _\n    ((measurableSet_le (hf.comp measurable_fst) measurable_snd).inter\n      (measurableSet_lt measurable_snd (hg.comp measurable_fst)))\n[GOAL]\nα : Type u_1\ninst✝ : MeasurableSpace α\nμ : Measure α\nf g : α → ℝ\ns : Set α\nhf : Measurable f\nhg : Measurable g\nhs : MeasurableSet s\n⊢ MeasurableSet {a | a.fst ∈ s}\n[PROOFSTEP]\nexact measurable_fst hs\n[GOAL]\nα : Type u_1\ninst✝ : MeasurableSpace α\nμ : Measure α\nf g : α → ℝ\ns : Set α\nhf : Measurable f\nhg : Measurable g\nhs : MeasurableSet s\n⊢ MeasurableSet {p | p.fst ∈ s ∧ p.snd ∈ Icc (f p.fst) (g p.fst)}\n[PROOFSTEP]\ndsimp only [regionBetween, Icc, mem_setOf_eq, setOf_and]\n[GOAL]\nα : Type u_1\ninst✝ : MeasurableSpace α\nμ : Measure α\nf g : α → ℝ\ns : Set α\nhf : Measurable f\nhg : Measurable g\nhs : MeasurableSet s\n⊢ MeasurableSet ({a | a.fst ∈ s} ∩ {a | a.snd ∈ {a_1 | f a.fst ≤ a_1} ∩ {a_1 | a_1 ≤ g a.fst}})\n[PROOFSTEP]\nrefine'\n  MeasurableSet.inter _\n    ((measurableSet_le (hf.comp measurable_fst) measurable_snd).inter\n      (measurableSet_le measurable_snd (hg.comp measurable_fst)))\n[GOAL]\nα : Type u_1\ninst✝ : MeasurableSpace α\nμ : Measure α\nf g : α → ℝ\ns : Set α\nhf : Measurable f\nhg : Measurable g\nhs : MeasurableSet s\n⊢ MeasurableSet {a | a.fst ∈ s}\n[PROOFSTEP]\nexact measurable_fst hs\n[GOAL]\nα : Type u_1\ninst✝ : MeasurableSpace α\nμ : Measure α\nf g : α → ℝ\ns : Set α\nhf : Measurable f\n⊢ MeasurableSet {p | p.snd = f p.fst}\n[PROOFSTEP]\nsimpa using measurableSet_region_between_cc hf hf MeasurableSet.univ\n[GOAL]\nα : Type u_1\ninst✝ : MeasurableSpace α\nμ : Measure α\nf g : α → ℝ\ns : Set α\nhf : Measurable f\nhg : Measurable g\nhs : MeasurableSet s\n⊢ ↑↑(Measure.prod μ volume) (regionBetween f g s) = ∫⁻ (y : α) in s, ofReal ((g - f) y) ∂μ\n[PROOFSTEP]\nclassical\nrw [Measure.prod_apply]\n· have h : (fun x => volume {a | x ∈ s ∧ a ∈ Ioo (f x) (g x)}) = s.indicator fun x => ENNReal.ofReal (g x - f x) :=\n    by\n    funext x\n    rw [indicator_apply]\n    split_ifs with h\n    · have hx : {a | x ∈ s ∧ a ∈ Ioo (f x) (g x)} = Ioo (f x) (g x) := by simp [h, Ioo]\n      simp only [hx, Real.volume_Ioo, sub_zero]\n    · have hx : {a | x ∈ s ∧ a ∈ Ioo (f x) (g x)} = ∅ := by simp [h]\n      simp only [hx, measure_empty]\n  dsimp only [regionBetween, preimage_setOf_eq]\n  rw [h, lintegral_indicator] <;> simp only [hs, Pi.sub_apply]\n· exact measurableSet_regionBetween hf hg hs\n[GOAL]\nα : Type u_1\ninst✝ : MeasurableSpace α\nμ : Measure α\nf g : α → ℝ\ns : Set α\nhf : Measurable f\nhg : Measurable g\nhs : MeasurableSet s\n⊢ ↑↑(Measure.prod μ volume) (regionBetween f g s) = ∫⁻ (y : α) in s, ofReal ((g - f) y) ∂μ\n[PROOFSTEP]\nrw [Measure.prod_apply]\n[GOAL]\nα : Type u_1\ninst✝ : MeasurableSpace α\nμ : Measure α\nf g : α → ℝ\ns : Set α\nhf : Measurable f\nhg : Measurable g\nhs : MeasurableSet s\n⊢ ∫⁻ (x : α), ↑↑volume (Prod.mk x ⁻¹' regionBetween f g s) ∂μ = ∫⁻ (y : α) in s, ofReal ((g - f) y) ∂μ\n[PROOFSTEP]\nhave h : (fun x => volume {a | x ∈ s ∧ a ∈ Ioo (f x) (g x)}) = s.indicator fun x => ENNReal.ofReal (g x - f x) :=\n  by\n  funext x\n  rw [indicator_apply]\n  split_ifs with h\n  · have hx : {a | x ∈ s ∧ a ∈ Ioo (f x) (g x)} = Ioo (f x) (g x) := by simp [h, Ioo]\n    simp only [hx, Real.volume_Ioo, sub_zero]\n  · have hx : {a | x ∈ s ∧ a ∈ Ioo (f x) (g x)} = ∅ := by simp [h]\n    simp only [hx, measure_empty]\n[GOAL]\nα : Type u_1\ninst✝ : MeasurableSpace α\nμ : Measure α\nf g : α → ℝ\ns : Set α\nhf : Measurable f\nhg : Measurable g\nhs : MeasurableSet s\n⊢ (fun x => ↑↑volume {a | x ∈ s ∧ a ∈ Ioo (f x) (g x)}) = indicator s fun x => ofReal (g x - f x)\n[PROOFSTEP]\nfunext x\n[GOAL]\ncase h\nα : Type u_1\ninst✝ : MeasurableSpace α\nμ : Measure α\nf g : α → ℝ\ns : Set α\nhf : Measurable f\nhg : Measurable g\nhs : MeasurableSet s\nx : α\n⊢ ↑↑volume {a | x ∈ s ∧ a ∈ Ioo (f x) (g x)} = indicator s (fun x => ofReal (g x - f x)) x\n[PROOFSTEP]\nrw [indicator_apply]\n[GOAL]\ncase h\nα : Type u_1\ninst✝ : MeasurableSpace α\nμ : Measure α\nf g : α → ℝ\ns : Set α\nhf : Measurable f\nhg : Measurable g\nhs : MeasurableSet s\nx : α\n⊢ ↑↑volume {a | x ∈ s ∧ a ∈ Ioo (f x) (g x)} = if x ∈ s then ofReal (g x - f x) else 0\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nα : Type u_1\ninst✝ : MeasurableSpace α\nμ : Measure α\nf g : α → ℝ\ns : Set α\nhf : Measurable f\nhg : Measurable g\nhs : MeasurableSet s\nx : α\nh : x ∈ s\n⊢ ↑↑volume {a | x ∈ s ∧ a ∈ Ioo (f x) (g x)} = ofReal (g x - f x)\n[PROOFSTEP]\nhave hx : {a | x ∈ s ∧ a ∈ Ioo (f x) (g x)} = Ioo (f x) (g x) := by simp [h, Ioo]\n[GOAL]\nα : Type u_1\ninst✝ : MeasurableSpace α\nμ : Measure α\nf g : α → ℝ\ns : Set α\nhf : Measurable f\nhg : Measurable g\nhs : MeasurableSet s\nx : α\nh : x ∈ s\n⊢ {a | x ∈ s ∧ a ∈ Ioo (f x) (g x)} = Ioo (f x) (g x)\n[PROOFSTEP]\nsimp [h, Ioo]\n[GOAL]\ncase pos\nα : Type u_1\ninst✝ : MeasurableSpace α\nμ : Measure α\nf g : α → ℝ\ns : Set α\nhf : Measurable f\nhg : Measurable g\nhs : MeasurableSet s\nx : α\nh : x ∈ s\nhx : {a | x ∈ s ∧ a ∈ Ioo (f x) (g x)} = Ioo (f x) (g x)\n⊢ ↑↑volume {a | x ∈ s ∧ a ∈ Ioo (f x) (g x)} = ofReal (g x - f x)\n[PROOFSTEP]\nsimp only [hx, Real.volume_Ioo, sub_zero]\n[GOAL]\ncase neg\nα : Type u_1\ninst✝ : MeasurableSpace α\nμ : Measure α\nf g : α → ℝ\ns : Set α\nhf : Measurable f\nhg : Measurable g\nhs : MeasurableSet s\nx : α\nh : ¬x ∈ s\n⊢ ↑↑volume {a | x ∈ s ∧ a ∈ Ioo (f x) (g x)} = 0\n[PROOFSTEP]\nhave hx : {a | x ∈ s ∧ a ∈ Ioo (f x) (g x)} = ∅ := by simp [h]\n[GOAL]\nα : Type u_1\ninst✝ : MeasurableSpace α\nμ : Measure α\nf g : α → ℝ\ns : Set α\nhf : Measurable f\nhg : Measurable g\nhs : MeasurableSet s\nx : α\nh : ¬x ∈ s\n⊢ {a | x ∈ s ∧ a ∈ Ioo (f x) (g x)} = ∅\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase neg\nα : Type u_1\ninst✝ : MeasurableSpace α\nμ : Measure α\nf g : α → ℝ\ns : Set α\nhf : Measurable f\nhg : Measurable g\nhs : MeasurableSet s\nx : α\nh : ¬x ∈ s\nhx : {a | x ∈ s ∧ a ∈ Ioo (f x) (g x)} = ∅\n⊢ ↑↑volume {a | x ∈ s ∧ a ∈ Ioo (f x) (g x)} = 0\n[PROOFSTEP]\nsimp only [hx, measure_empty]\n[GOAL]\nα : Type u_1\ninst✝ : MeasurableSpace α\nμ : Measure α\nf g : α → ℝ\ns : Set α\nhf : Measurable f\nhg : Measurable g\nhs : MeasurableSet s\nh : (fun x => ↑↑volume {a | x ∈ s ∧ a ∈ Ioo (f x) (g x)}) = indicator s fun x => ofReal (g x - f x)\n⊢ ∫⁻ (x : α), ↑↑volume (Prod.mk x ⁻¹' regionBetween f g s) ∂μ = ∫⁻ (y : α) in s, ofReal ((g - f) y) ∂μ\n[PROOFSTEP]\ndsimp only [regionBetween, preimage_setOf_eq]\n[GOAL]\nα : Type u_1\ninst✝ : MeasurableSpace α\nμ : Measure α\nf g : α → ℝ\ns : Set α\nhf : Measurable f\nhg : Measurable g\nhs : MeasurableSet s\nh : (fun x => ↑↑volume {a | x ∈ s ∧ a ∈ Ioo (f x) (g x)}) = indicator s fun x => ofReal (g x - f x)\n⊢ ∫⁻ (x : α), ↑↑volume {a | x ∈ s ∧ a ∈ Ioo (f x) (g x)} ∂μ = ∫⁻ (y : α) in s, ofReal ((g - f) y) ∂μ\n[PROOFSTEP]\nrw [h, lintegral_indicator]\n[GOAL]\nα : Type u_1\ninst✝ : MeasurableSpace α\nμ : Measure α\nf g : α → ℝ\ns : Set α\nhf : Measurable f\nhg : Measurable g\nhs : MeasurableSet s\nh : (fun x => ↑↑volume {a | x ∈ s ∧ a ∈ Ioo (f x) (g x)}) = indicator s fun x => ofReal (g x - f x)\n⊢ ∫⁻ (a : α) in s, ofReal (g a - f a) ∂μ = ∫⁻ (y : α) in s, ofReal ((g - f) y) ∂μ\n[PROOFSTEP]\nsimp only [hs, Pi.sub_apply]\n[GOAL]\ncase hs\nα : Type u_1\ninst✝ : MeasurableSpace α\nμ : Measure α\nf g : α → ℝ\ns : Set α\nhf : Measurable f\nhg : Measurable g\nhs : MeasurableSet s\nh : (fun x => ↑↑volume {a | x ∈ s ∧ a ∈ Ioo (f x) (g x)}) = indicator s fun x => ofReal (g x - f x)\n⊢ MeasurableSet s\n[PROOFSTEP]\nsimp only [hs, Pi.sub_apply]\n[GOAL]\nα : Type u_1\ninst✝ : MeasurableSpace α\nμ : Measure α\nf g : α → ℝ\ns : Set α\nhf : Measurable f\nhg : Measurable g\nhs : MeasurableSet s\n⊢ MeasurableSet (regionBetween f g s)\n[PROOFSTEP]\nexact measurableSet_regionBetween hf hg hs\n[GOAL]\nα : Type u_1\ninst✝¹ : MeasurableSpace α\nμ : Measure α\nf g : α → ℝ\ns : Set α\ninst✝ : SigmaFinite μ\nhf : AEMeasurable f\nhg : AEMeasurable g\nhs : MeasurableSet s\n⊢ ↑↑(Measure.prod μ volume) (regionBetween f g s) = ∫⁻ (y : α) in s, ofReal ((g - f) y) ∂μ\n[PROOFSTEP]\nhave h₁ :\n  (fun y => ENNReal.ofReal ((g - f) y)) =ᵐ[μ.restrict s] fun y =>\n    ENNReal.ofReal ((AEMeasurable.mk g hg - AEMeasurable.mk f hf) y) :=\n  (hg.ae_eq_mk.sub hf.ae_eq_mk).fun_comp ENNReal.ofReal\n[GOAL]\nα : Type u_1\ninst✝¹ : MeasurableSpace α\nμ : Measure α\nf g : α → ℝ\ns : Set α\ninst✝ : SigmaFinite μ\nhf : AEMeasurable f\nhg : AEMeasurable g\nhs : MeasurableSet s\nh₁ :\n  (fun y => ofReal ((g - f) y)) =ᶠ[ae (Measure.restrict μ s)] fun y =>\n    ofReal ((AEMeasurable.mk g hg - AEMeasurable.mk f hf) y)\n⊢ ↑↑(Measure.prod μ volume) (regionBetween f g s) = ∫⁻ (y : α) in s, ofReal ((g - f) y) ∂μ\n[PROOFSTEP]\nhave h₂ :\n  (μ.restrict s).prod volume (regionBetween f g s) =\n    (μ.restrict s).prod volume (regionBetween (AEMeasurable.mk f hf) (AEMeasurable.mk g hg) s) :=\n  by\n  apply measure_congr\n  apply EventuallyEq.rfl.inter\n  exact\n    ((quasiMeasurePreserving_fst.ae_eq_comp hf.ae_eq_mk).comp₂ _ EventuallyEq.rfl).inter\n      (EventuallyEq.rfl.comp₂ _ <| quasiMeasurePreserving_fst.ae_eq_comp hg.ae_eq_mk)\n[GOAL]\nα : Type u_1\ninst✝¹ : MeasurableSpace α\nμ : Measure α\nf g : α → ℝ\ns : Set α\ninst✝ : SigmaFinite μ\nhf : AEMeasurable f\nhg : AEMeasurable g\nhs : MeasurableSet s\nh₁ :\n  (fun y => ofReal ((g - f) y)) =ᶠ[ae (Measure.restrict μ s)] fun y =>\n    ofReal ((AEMeasurable.mk g hg - AEMeasurable.mk f hf) y)\n⊢ ↑↑(Measure.prod (Measure.restrict μ s) volume) (regionBetween f g s) =\n    ↑↑(Measure.prod (Measure.restrict μ s) volume) (regionBetween (AEMeasurable.mk f hf) (AEMeasurable.mk g hg) s)\n[PROOFSTEP]\napply measure_congr\n[GOAL]\ncase H\nα : Type u_1\ninst✝¹ : MeasurableSpace α\nμ : Measure α\nf g : α → ℝ\ns : Set α\ninst✝ : SigmaFinite μ\nhf : AEMeasurable f\nhg : AEMeasurable g\nhs : MeasurableSet s\nh₁ :\n  (fun y => ofReal ((g - f) y)) =ᶠ[ae (Measure.restrict μ s)] fun y =>\n    ofReal ((AEMeasurable.mk g hg - AEMeasurable.mk f hf) y)\n⊢ regionBetween f g s =ᶠ[ae (Measure.prod (Measure.restrict μ s) volume)]\n    regionBetween (AEMeasurable.mk f hf) (AEMeasurable.mk g hg) s\n[PROOFSTEP]\napply EventuallyEq.rfl.inter\n[GOAL]\ncase H\nα : Type u_1\ninst✝¹ : MeasurableSpace α\nμ : Measure α\nf g : α → ℝ\ns : Set α\ninst✝ : SigmaFinite μ\nhf : AEMeasurable f\nhg : AEMeasurable g\nhs : MeasurableSet s\nh₁ :\n  (fun y => ofReal ((g - f) y)) =ᶠ[ae (Measure.restrict μ s)] fun y =>\n    ofReal ((AEMeasurable.mk g hg - AEMeasurable.mk f hf) y)\n⊢ (fun p => Ioo (f p.fst) (g p.fst) p.snd) =ᶠ[ae (Measure.prod (Measure.restrict μ s) volume)] fun p =>\n    Ioo (AEMeasurable.mk f hf p.fst) (AEMeasurable.mk g hg p.fst) p.snd\n[PROOFSTEP]\nexact\n  ((quasiMeasurePreserving_fst.ae_eq_comp hf.ae_eq_mk).comp₂ _ EventuallyEq.rfl).inter\n    (EventuallyEq.rfl.comp₂ _ <| quasiMeasurePreserving_fst.ae_eq_comp hg.ae_eq_mk)\n[GOAL]\nα : Type u_1\ninst✝¹ : MeasurableSpace α\nμ : Measure α\nf g : α → ℝ\ns : Set α\ninst✝ : SigmaFinite μ\nhf : AEMeasurable f\nhg : AEMeasurable g\nhs : MeasurableSet s\nh₁ :\n  (fun y => ofReal ((g - f) y)) =ᶠ[ae (Measure.restrict μ s)] fun y =>\n    ofReal ((AEMeasurable.mk g hg - AEMeasurable.mk f hf) y)\nh₂ :\n  ↑↑(Measure.prod (Measure.restrict μ s) volume) (regionBetween f g s) =\n    ↑↑(Measure.prod (Measure.restrict μ s) volume) (regionBetween (AEMeasurable.mk f hf) (AEMeasurable.mk g hg) s)\n⊢ ↑↑(Measure.prod μ volume) (regionBetween f g s) = ∫⁻ (y : α) in s, ofReal ((g - f) y) ∂μ\n[PROOFSTEP]\nrw [lintegral_congr_ae h₁, ← volume_regionBetween_eq_lintegral' hf.measurable_mk hg.measurable_mk hs]\n[GOAL]\nα : Type u_1\ninst✝¹ : MeasurableSpace α\nμ : Measure α\nf g : α → ℝ\ns : Set α\ninst✝ : SigmaFinite μ\nhf : AEMeasurable f\nhg : AEMeasurable g\nhs : MeasurableSet s\nh₁ :\n  (fun y => ofReal ((g - f) y)) =ᶠ[ae (Measure.restrict μ s)] fun y =>\n    ofReal ((AEMeasurable.mk g hg - AEMeasurable.mk f hf) y)\nh₂ :\n  ↑↑(Measure.prod (Measure.restrict μ s) volume) (regionBetween f g s) =\n    ↑↑(Measure.prod (Measure.restrict μ s) volume) (regionBetween (AEMeasurable.mk f hf) (AEMeasurable.mk g hg) s)\n⊢ ↑↑(Measure.prod μ volume) (regionBetween f g s) =\n    ↑↑(Measure.prod μ volume) (regionBetween (AEMeasurable.mk f hf) (AEMeasurable.mk g hg) s)\n[PROOFSTEP]\nconvert h₂ using 1\n[GOAL]\ncase h.e'_2\nα : Type u_1\ninst✝¹ : MeasurableSpace α\nμ : Measure α\nf g : α → ℝ\ns : Set α\ninst✝ : SigmaFinite μ\nhf : AEMeasurable f\nhg : AEMeasurable g\nhs : MeasurableSet s\nh₁ :\n  (fun y => ofReal ((g - f) y)) =ᶠ[ae (Measure.restrict μ s)] fun y =>\n    ofReal ((AEMeasurable.mk g hg - AEMeasurable.mk f hf) y)\nh₂ :\n  ↑↑(Measure.prod (Measure.restrict μ s) volume) (regionBetween f g s) =\n    ↑↑(Measure.prod (Measure.restrict μ s) volume) (regionBetween (AEMeasurable.mk f hf) (AEMeasurable.mk g hg) s)\n⊢ ↑↑(Measure.prod μ volume) (regionBetween f g s) = ↑↑(Measure.prod (Measure.restrict μ s) volume) (regionBetween f g s)\n[PROOFSTEP]\nrw [Measure.restrict_prod_eq_prod_univ]\n[GOAL]\ncase h.e'_2\nα : Type u_1\ninst✝¹ : MeasurableSpace α\nμ : Measure α\nf g : α → ℝ\ns : Set α\ninst✝ : SigmaFinite μ\nhf : AEMeasurable f\nhg : AEMeasurable g\nhs : MeasurableSet s\nh₁ :\n  (fun y => ofReal ((g - f) y)) =ᶠ[ae (Measure.restrict μ s)] fun y =>\n    ofReal ((AEMeasurable.mk g hg - AEMeasurable.mk f hf) y)\nh₂ :\n  ↑↑(Measure.prod (Measure.restrict μ s) volume) (regionBetween f g s) =\n    ↑↑(Measure.prod (Measure.restrict μ s) volume) (regionBetween (AEMeasurable.mk f hf) (AEMeasurable.mk g hg) s)\n⊢ ↑↑(Measure.prod μ volume) (regionBetween f g s) =\n    ↑↑(Measure.restrict (Measure.prod μ volume) (s ×ˢ univ)) (regionBetween f g s)\n[PROOFSTEP]\nexact (Measure.restrict_eq_self _ (regionBetween_subset f g s)).symm\n[GOAL]\ncase h.e'_3\nα : Type u_1\ninst✝¹ : MeasurableSpace α\nμ : Measure α\nf g : α → ℝ\ns : Set α\ninst✝ : SigmaFinite μ\nhf : AEMeasurable f\nhg : AEMeasurable g\nhs : MeasurableSet s\nh₁ :\n  (fun y => ofReal ((g - f) y)) =ᶠ[ae (Measure.restrict μ s)] fun y =>\n    ofReal ((AEMeasurable.mk g hg - AEMeasurable.mk f hf) y)\nh₂ :\n  ↑↑(Measure.prod (Measure.restrict μ s) volume) (regionBetween f g s) =\n    ↑↑(Measure.prod (Measure.restrict μ s) volume) (regionBetween (AEMeasurable.mk f hf) (AEMeasurable.mk g hg) s)\n⊢ ↑↑(Measure.prod μ volume) (regionBetween (AEMeasurable.mk f hf) (AEMeasurable.mk g hg) s) =\n    ↑↑(Measure.prod (Measure.restrict μ s) volume) (regionBetween (AEMeasurable.mk f hf) (AEMeasurable.mk g hg) s)\n[PROOFSTEP]\nrw [Measure.restrict_prod_eq_prod_univ]\n[GOAL]\ncase h.e'_3\nα : Type u_1\ninst✝¹ : MeasurableSpace α\nμ : Measure α\nf g : α → ℝ\ns : Set α\ninst✝ : SigmaFinite μ\nhf : AEMeasurable f\nhg : AEMeasurable g\nhs : MeasurableSet s\nh₁ :\n  (fun y => ofReal ((g - f) y)) =ᶠ[ae (Measure.restrict μ s)] fun y =>\n    ofReal ((AEMeasurable.mk g hg - AEMeasurable.mk f hf) y)\nh₂ :\n  ↑↑(Measure.prod (Measure.restrict μ s) volume) (regionBetween f g s) =\n    ↑↑(Measure.prod (Measure.restrict μ s) volume) (regionBetween (AEMeasurable.mk f hf) (AEMeasurable.mk g hg) s)\n⊢ ↑↑(Measure.prod μ volume) (regionBetween (AEMeasurable.mk f hf) (AEMeasurable.mk g hg) s) =\n    ↑↑(Measure.restrict (Measure.prod μ volume) (s ×ˢ univ))\n      (regionBetween (AEMeasurable.mk f hf) (AEMeasurable.mk g hg) s)\n[PROOFSTEP]\nexact (Measure.restrict_eq_self _ (regionBetween_subset (AEMeasurable.mk f hf) (AEMeasurable.mk g hg) s)).symm\n[GOAL]\nμ : Measure ℝ\ninst✝ : NoAtoms μ\ns : Set ℝ\np : ℝ → Prop\nh : ∀ (a b : ℝ), a ∈ s → b ∈ s → a < b → ∀ᵐ (x : ℝ) ∂Measure.restrict μ (s ∩ Ioo a b), p x\n⊢ ∀ᵐ (x : ℝ) ∂Measure.restrict μ s, p x\n[PROOFSTEP]\nlet T : s × s → Set ℝ := fun p => Ioo p.1 p.2\n[GOAL]\nμ : Measure ℝ\ninst✝ : NoAtoms μ\ns : Set ℝ\np : ℝ → Prop\nh : ∀ (a b : ℝ), a ∈ s → b ∈ s → a < b → ∀ᵐ (x : ℝ) ∂Measure.restrict μ (s ∩ Ioo a b), p x\nT : ↑s × ↑s → Set ℝ := fun p => Ioo ↑p.fst ↑p.snd\n⊢ ∀ᵐ (x : ℝ) ∂Measure.restrict μ s, p x\n[PROOFSTEP]\nlet u := ⋃ i : ↥s × ↥s, T i\n[GOAL]\nμ : Measure ℝ\ninst✝ : NoAtoms μ\ns : Set ℝ\np : ℝ → Prop\nh : ∀ (a b : ℝ), a ∈ s → b ∈ s → a < b → ∀ᵐ (x : ℝ) ∂Measure.restrict μ (s ∩ Ioo a b), p x\nT : ↑s × ↑s → Set ℝ := fun p => Ioo ↑p.fst ↑p.snd\nu : Set ℝ := ⋃ (i : ↑s × ↑s), T i\n⊢ ∀ᵐ (x : ℝ) ∂Measure.restrict μ s, p x\n[PROOFSTEP]\nhave hfinite : (s \\ u).Finite := s.finite_diff_iUnion_Ioo'\n[GOAL]\nμ : Measure ℝ\ninst✝ : NoAtoms μ\ns : Set ℝ\np : ℝ → Prop\nh : ∀ (a b : ℝ), a ∈ s → b ∈ s → a < b → ∀ᵐ (x : ℝ) ∂Measure.restrict μ (s ∩ Ioo a b), p x\nT : ↑s × ↑s → Set ℝ := fun p => Ioo ↑p.fst ↑p.snd\nu : Set ℝ := ⋃ (i : ↑s × ↑s), T i\nhfinite : Set.Finite (s \\ u)\n⊢ ∀ᵐ (x : ℝ) ∂Measure.restrict μ s, p x\n[PROOFSTEP]\nobtain ⟨A, A_count, hA⟩ : ∃ A : Set (↥s × ↥s), A.Countable ∧ ⋃ i ∈ A, T i = ⋃ i : ↥s × ↥s, T i :=\n  isOpen_iUnion_countable _ fun p => isOpen_Ioo\n[GOAL]\ncase intro.intro\nμ : Measure ℝ\ninst✝ : NoAtoms μ\ns : Set ℝ\np : ℝ → Prop\nh : ∀ (a b : ℝ), a ∈ s → b ∈ s → a < b → ∀ᵐ (x : ℝ) ∂Measure.restrict μ (s ∩ Ioo a b), p x\nT : ↑s × ↑s → Set ℝ := fun p => Ioo ↑p.fst ↑p.snd\nu : Set ℝ := ⋃ (i : ↑s × ↑s), T i\nhfinite : Set.Finite (s \\ u)\nA : Set (↑s × ↑s)\nA_count : Set.Countable A\nhA : ⋃ (i : ↑s × ↑s) (_ : i ∈ A), T i = ⋃ (i : ↑s × ↑s), T i\n⊢ ∀ᵐ (x : ℝ) ∂Measure.restrict μ s, p x\n[PROOFSTEP]\nhave : s ⊆ s \\ u ∪ ⋃ p ∈ A, s ∩ T p := by\n  intro x hx\n  by_cases h'x : x ∈ ⋃ i : ↥s × ↥s, T i\n  · rw [← hA] at h'x \n    obtain ⟨p, pA, xp⟩ : ∃ p : ↥s × ↥s, p ∈ A ∧ x ∈ T p := by\n      simpa only [mem_iUnion, exists_prop, SetCoe.exists, exists_and_right] using h'x\n    right\n    exact mem_biUnion pA ⟨hx, xp⟩\n  · exact Or.inl ⟨hx, h'x⟩\n[GOAL]\nμ : Measure ℝ\ninst✝ : NoAtoms μ\ns : Set ℝ\np : ℝ → Prop\nh : ∀ (a b : ℝ), a ∈ s → b ∈ s → a < b → ∀ᵐ (x : ℝ) ∂Measure.restrict μ (s ∩ Ioo a b), p x\nT : ↑s × ↑s → Set ℝ := fun p => Ioo ↑p.fst ↑p.snd\nu : Set ℝ := ⋃ (i : ↑s × ↑s), T i\nhfinite : Set.Finite (s \\ u)\nA : Set (↑s × ↑s)\nA_count : Set.Countable A\nhA : ⋃ (i : ↑s × ↑s) (_ : i ∈ A), T i = ⋃ (i : ↑s × ↑s), T i\n⊢ s ⊆ s \\ u ∪ ⋃ (p : ↑s × ↑s) (_ : p ∈ A), s ∩ T p\n[PROOFSTEP]\nintro x hx\n[GOAL]\nμ : Measure ℝ\ninst✝ : NoAtoms μ\ns : Set ℝ\np : ℝ → Prop\nh : ∀ (a b : ℝ), a ∈ s → b ∈ s → a < b → ∀ᵐ (x : ℝ) ∂Measure.restrict μ (s ∩ Ioo a b), p x\nT : ↑s × ↑s → Set ℝ := fun p => Ioo ↑p.fst ↑p.snd\nu : Set ℝ := ⋃ (i : ↑s × ↑s), T i\nhfinite : Set.Finite (s \\ u)\nA : Set (↑s × ↑s)\nA_count : Set.Countable A\nhA : ⋃ (i : ↑s × ↑s) (_ : i ∈ A), T i = ⋃ (i : ↑s × ↑s), T i\nx : ℝ\nhx : x ∈ s\n⊢ x ∈ s \\ u ∪ ⋃ (p : ↑s × ↑s) (_ : p ∈ A), s ∩ T p\n[PROOFSTEP]\nby_cases h'x : x ∈ ⋃ i : ↥s × ↥s, T i\n[GOAL]\ncase pos\nμ : Measure ℝ\ninst✝ : NoAtoms μ\ns : Set ℝ\np : ℝ → Prop\nh : ∀ (a b : ℝ), a ∈ s → b ∈ s → a < b → ∀ᵐ (x : ℝ) ∂Measure.restrict μ (s ∩ Ioo a b), p x\nT : ↑s × ↑s → Set ℝ := fun p => Ioo ↑p.fst ↑p.snd\nu : Set ℝ := ⋃ (i : ↑s × ↑s), T i\nhfinite : Set.Finite (s \\ u)\nA : Set (↑s × ↑s)\nA_count : Set.Countable A\nhA : ⋃ (i : ↑s × ↑s) (_ : i ∈ A), T i = ⋃ (i : ↑s × ↑s), T i\nx : ℝ\nhx : x ∈ s\nh'x : x ∈ ⋃ (i : ↑s × ↑s), T i\n⊢ x ∈ s \\ u ∪ ⋃ (p : ↑s × ↑s) (_ : p ∈ A), s ∩ T p\n[PROOFSTEP]\nrw [← hA] at h'x \n[GOAL]\ncase pos\nμ : Measure ℝ\ninst✝ : NoAtoms μ\ns : Set ℝ\np : ℝ → Prop\nh : ∀ (a b : ℝ), a ∈ s → b ∈ s → a < b → ∀ᵐ (x : ℝ) ∂Measure.restrict μ (s ∩ Ioo a b), p x\nT : ↑s × ↑s → Set ℝ := fun p => Ioo ↑p.fst ↑p.snd\nu : Set ℝ := ⋃ (i : ↑s × ↑s), T i\nhfinite : Set.Finite (s \\ u)\nA : Set (↑s × ↑s)\nA_count : Set.Countable A\nhA : ⋃ (i : ↑s × ↑s) (_ : i ∈ A), T i = ⋃ (i : ↑s × ↑s), T i\nx : ℝ\nhx : x ∈ s\nh'x : x ∈ ⋃ (i : ↑s × ↑s) (_ : i ∈ A), T i\n⊢ x ∈ s \\ u ∪ ⋃ (p : ↑s × ↑s) (_ : p ∈ A), s ∩ T p\n[PROOFSTEP]\nobtain ⟨p, pA, xp⟩ : ∃ p : ↥s × ↥s, p ∈ A ∧ x ∈ T p := by\n  simpa only [mem_iUnion, exists_prop, SetCoe.exists, exists_and_right] using h'x\n[GOAL]\nμ : Measure ℝ\ninst✝ : NoAtoms μ\ns : Set ℝ\np : ℝ → Prop\nh : ∀ (a b : ℝ), a ∈ s → b ∈ s → a < b → ∀ᵐ (x : ℝ) ∂Measure.restrict μ (s ∩ Ioo a b), p x\nT : ↑s × ↑s → Set ℝ := fun p => Ioo ↑p.fst ↑p.snd\nu : Set ℝ := ⋃ (i : ↑s × ↑s), T i\nhfinite : Set.Finite (s \\ u)\nA : Set (↑s × ↑s)\nA_count : Set.Countable A\nhA : ⋃ (i : ↑s × ↑s) (_ : i ∈ A), T i = ⋃ (i : ↑s × ↑s), T i\nx : ℝ\nhx : x ∈ s\nh'x : x ∈ ⋃ (i : ↑s × ↑s) (_ : i ∈ A), T i\n⊢ ∃ p, p ∈ A ∧ x ∈ T p\n[PROOFSTEP]\nsimpa only [mem_iUnion, exists_prop, SetCoe.exists, exists_and_right] using h'x\n[GOAL]\ncase pos.intro.intro\nμ : Measure ℝ\ninst✝ : NoAtoms μ\ns : Set ℝ\np✝ : ℝ → Prop\nh : ∀ (a b : ℝ), a ∈ s → b ∈ s → a < b → ∀ᵐ (x : ℝ) ∂Measure.restrict μ (s ∩ Ioo a b), p✝ x\nT : ↑s × ↑s → Set ℝ := fun p => Ioo ↑p.fst ↑p.snd\nu : Set ℝ := ⋃ (i : ↑s × ↑s), T i\nhfinite : Set.Finite (s \\ u)\nA : Set (↑s × ↑s)\nA_count : Set.Countable A\nhA : ⋃ (i : ↑s × ↑s) (_ : i ∈ A), T i = ⋃ (i : ↑s × ↑s), T i\nx : ℝ\nhx : x ∈ s\nh'x : x ∈ ⋃ (i : ↑s × ↑s) (_ : i ∈ A), T i\np : ↑s × ↑s\npA : p ∈ A\nxp : x ∈ T p\n⊢ x ∈ s \\ u ∪ ⋃ (p : ↑s × ↑s) (_ : p ∈ A), s ∩ T p\n[PROOFSTEP]\nright\n[GOAL]\ncase pos.intro.intro.h\nμ : Measure ℝ\ninst✝ : NoAtoms μ\ns : Set ℝ\np✝ : ℝ → Prop\nh : ∀ (a b : ℝ), a ∈ s → b ∈ s → a < b → ∀ᵐ (x : ℝ) ∂Measure.restrict μ (s ∩ Ioo a b), p✝ x\nT : ↑s × ↑s → Set ℝ := fun p => Ioo ↑p.fst ↑p.snd\nu : Set ℝ := ⋃ (i : ↑s × ↑s), T i\nhfinite : Set.Finite (s \\ u)\nA : Set (↑s × ↑s)\nA_count : Set.Countable A\nhA : ⋃ (i : ↑s × ↑s) (_ : i ∈ A), T i = ⋃ (i : ↑s × ↑s), T i\nx : ℝ\nhx : x ∈ s\nh'x : x ∈ ⋃ (i : ↑s × ↑s) (_ : i ∈ A), T i\np : ↑s × ↑s\npA : p ∈ A\nxp : x ∈ T p\n⊢ x ∈ ⋃ (p : ↑s × ↑s) (_ : p ∈ A), s ∩ T p\n[PROOFSTEP]\nexact mem_biUnion pA ⟨hx, xp⟩\n[GOAL]\ncase neg\nμ : Measure ℝ\ninst✝ : NoAtoms μ\ns : Set ℝ\np : ℝ → Prop\nh : ∀ (a b : ℝ), a ∈ s → b ∈ s → a < b → ∀ᵐ (x : ℝ) ∂Measure.restrict μ (s ∩ Ioo a b), p x\nT : ↑s × ↑s → Set ℝ := fun p => Ioo ↑p.fst ↑p.snd\nu : Set ℝ := ⋃ (i : ↑s × ↑s), T i\nhfinite : Set.Finite (s \\ u)\nA : Set (↑s × ↑s)\nA_count : Set.Countable A\nhA : ⋃ (i : ↑s × ↑s) (_ : i ∈ A), T i = ⋃ (i : ↑s × ↑s), T i\nx : ℝ\nhx : x ∈ s\nh'x : ¬x ∈ ⋃ (i : ↑s × ↑s), T i\n⊢ x ∈ s \\ u ∪ ⋃ (p : ↑s × ↑s) (_ : p ∈ A), s ∩ T p\n[PROOFSTEP]\nexact Or.inl ⟨hx, h'x⟩\n[GOAL]\ncase intro.intro\nμ : Measure ℝ\ninst✝ : NoAtoms μ\ns : Set ℝ\np : ℝ → Prop\nh : ∀ (a b : ℝ), a ∈ s → b ∈ s → a < b → ∀ᵐ (x : ℝ) ∂Measure.restrict μ (s ∩ Ioo a b), p x\nT : ↑s × ↑s → Set ℝ := fun p => Ioo ↑p.fst ↑p.snd\nu : Set ℝ := ⋃ (i : ↑s × ↑s), T i\nhfinite : Set.Finite (s \\ u)\nA : Set (↑s × ↑s)\nA_count : Set.Countable A\nhA : ⋃ (i : ↑s × ↑s) (_ : i ∈ A), T i = ⋃ (i : ↑s × ↑s), T i\nthis : s ⊆ s \\ u ∪ ⋃ (p : ↑s × ↑s) (_ : p ∈ A), s ∩ T p\n⊢ ∀ᵐ (x : ℝ) ∂Measure.restrict μ s, p x\n[PROOFSTEP]\napply ae_restrict_of_ae_restrict_of_subset this\n[GOAL]\ncase intro.intro\nμ : Measure ℝ\ninst✝ : NoAtoms μ\ns : Set ℝ\np : ℝ → Prop\nh : ∀ (a b : ℝ), a ∈ s → b ∈ s → a < b → ∀ᵐ (x : ℝ) ∂Measure.restrict μ (s ∩ Ioo a b), p x\nT : ↑s × ↑s → Set ℝ := fun p => Ioo ↑p.fst ↑p.snd\nu : Set ℝ := ⋃ (i : ↑s × ↑s), T i\nhfinite : Set.Finite (s \\ u)\nA : Set (↑s × ↑s)\nA_count : Set.Countable A\nhA : ⋃ (i : ↑s × ↑s) (_ : i ∈ A), T i = ⋃ (i : ↑s × ↑s), T i\nthis : s ⊆ s \\ u ∪ ⋃ (p : ↑s × ↑s) (_ : p ∈ A), s ∩ T p\n⊢ ∀ᵐ (x : ℝ) ∂Measure.restrict μ (s \\ u ∪ ⋃ (p : ↑s × ↑s) (_ : p ∈ A), s ∩ T p), p x\n[PROOFSTEP]\nrw [ae_restrict_union_iff, ae_restrict_biUnion_iff _ A_count]\n[GOAL]\ncase intro.intro\nμ : Measure ℝ\ninst✝ : NoAtoms μ\ns : Set ℝ\np : ℝ → Prop\nh : ∀ (a b : ℝ), a ∈ s → b ∈ s → a < b → ∀ᵐ (x : ℝ) ∂Measure.restrict μ (s ∩ Ioo a b), p x\nT : ↑s × ↑s → Set ℝ := fun p => Ioo ↑p.fst ↑p.snd\nu : Set ℝ := ⋃ (i : ↑s × ↑s), T i\nhfinite : Set.Finite (s \\ u)\nA : Set (↑s × ↑s)\nA_count : Set.Countable A\nhA : ⋃ (i : ↑s × ↑s) (_ : i ∈ A), T i = ⋃ (i : ↑s × ↑s), T i\nthis : s ⊆ s \\ u ∪ ⋃ (p : ↑s × ↑s) (_ : p ∈ A), s ∩ T p\n⊢ (∀ᵐ (x : ℝ) ∂Measure.restrict μ (s \\ u), p x) ∧ ∀ (i : ↑s × ↑s), i ∈ A → ∀ᵐ (x : ℝ) ∂Measure.restrict μ (s ∩ T i), p x\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase intro.intro.left\nμ : Measure ℝ\ninst✝ : NoAtoms μ\ns : Set ℝ\np : ℝ → Prop\nh : ∀ (a b : ℝ), a ∈ s → b ∈ s → a < b → ∀ᵐ (x : ℝ) ∂Measure.restrict μ (s ∩ Ioo a b), p x\nT : ↑s × ↑s → Set ℝ := fun p => Ioo ↑p.fst ↑p.snd\nu : Set ℝ := ⋃ (i : ↑s × ↑s), T i\nhfinite : Set.Finite (s \\ u)\nA : Set (↑s × ↑s)\nA_count : Set.Countable A\nhA : ⋃ (i : ↑s × ↑s) (_ : i ∈ A), T i = ⋃ (i : ↑s × ↑s), T i\nthis : s ⊆ s \\ u ∪ ⋃ (p : ↑s × ↑s) (_ : p ∈ A), s ∩ T p\n⊢ ∀ᵐ (x : ℝ) ∂Measure.restrict μ (s \\ u), p x\n[PROOFSTEP]\nhave : μ.restrict (s \\ u) = 0 := by simp only [restrict_eq_zero, hfinite.measure_zero]\n[GOAL]\nμ : Measure ℝ\ninst✝ : NoAtoms μ\ns : Set ℝ\np : ℝ → Prop\nh : ∀ (a b : ℝ), a ∈ s → b ∈ s → a < b → ∀ᵐ (x : ℝ) ∂Measure.restrict μ (s ∩ Ioo a b), p x\nT : ↑s × ↑s → Set ℝ := fun p => Ioo ↑p.fst ↑p.snd\nu : Set ℝ := ⋃ (i : ↑s × ↑s), T i\nhfinite : Set.Finite (s \\ u)\nA : Set (↑s × ↑s)\nA_count : Set.Countable A\nhA : ⋃ (i : ↑s × ↑s) (_ : i ∈ A), T i = ⋃ (i : ↑s × ↑s), T i\nthis : s ⊆ s \\ u ∪ ⋃ (p : ↑s × ↑s) (_ : p ∈ A), s ∩ T p\n⊢ Measure.restrict μ (s \\ u) = 0\n[PROOFSTEP]\nsimp only [restrict_eq_zero, hfinite.measure_zero]\n[GOAL]\ncase intro.intro.left\nμ : Measure ℝ\ninst✝ : NoAtoms μ\ns : Set ℝ\np : ℝ → Prop\nh : ∀ (a b : ℝ), a ∈ s → b ∈ s → a < b → ∀ᵐ (x : ℝ) ∂Measure.restrict μ (s ∩ Ioo a b), p x\nT : ↑s × ↑s → Set ℝ := fun p => Ioo ↑p.fst ↑p.snd\nu : Set ℝ := ⋃ (i : ↑s × ↑s), T i\nhfinite : Set.Finite (s \\ u)\nA : Set (↑s × ↑s)\nA_count : Set.Countable A\nhA : ⋃ (i : ↑s × ↑s) (_ : i ∈ A), T i = ⋃ (i : ↑s × ↑s), T i\nthis✝ : s ⊆ s \\ u ∪ ⋃ (p : ↑s × ↑s) (_ : p ∈ A), s ∩ T p\nthis : Measure.restrict μ (s \\ u) = 0\n⊢ ∀ᵐ (x : ℝ) ∂Measure.restrict μ (s \\ u), p x\n[PROOFSTEP]\nsimp only [this, ae_zero, eventually_bot]\n[GOAL]\ncase intro.intro.right\nμ : Measure ℝ\ninst✝ : NoAtoms μ\ns : Set ℝ\np : ℝ → Prop\nh : ∀ (a b : ℝ), a ∈ s → b ∈ s → a < b → ∀ᵐ (x : ℝ) ∂Measure.restrict μ (s ∩ Ioo a b), p x\nT : ↑s × ↑s → Set ℝ := fun p => Ioo ↑p.fst ↑p.snd\nu : Set ℝ := ⋃ (i : ↑s × ↑s), T i\nhfinite : Set.Finite (s \\ u)\nA : Set (↑s × ↑s)\nA_count : Set.Countable A\nhA : ⋃ (i : ↑s × ↑s) (_ : i ∈ A), T i = ⋃ (i : ↑s × ↑s), T i\nthis : s ⊆ s \\ u ∪ ⋃ (p : ↑s × ↑s) (_ : p ∈ A), s ∩ T p\n⊢ ∀ (i : ↑s × ↑s), i ∈ A → ∀ᵐ (x : ℝ) ∂Measure.restrict μ (s ∩ T i), p x\n[PROOFSTEP]\nrintro ⟨⟨a, as⟩, ⟨b, bs⟩⟩ -\n[GOAL]\ncase intro.intro.right.mk.mk.mk\nμ : Measure ℝ\ninst✝ : NoAtoms μ\ns : Set ℝ\np : ℝ → Prop\nh : ∀ (a b : ℝ), a ∈ s → b ∈ s → a < b → ∀ᵐ (x : ℝ) ∂Measure.restrict μ (s ∩ Ioo a b), p x\nT : ↑s × ↑s → Set ℝ := fun p => Ioo ↑p.fst ↑p.snd\nu : Set ℝ := ⋃ (i : ↑s × ↑s), T i\nhfinite : Set.Finite (s \\ u)\nA : Set (↑s × ↑s)\nA_count : Set.Countable A\nhA : ⋃ (i : ↑s × ↑s) (_ : i ∈ A), T i = ⋃ (i : ↑s × ↑s), T i\nthis : s ⊆ s \\ u ∪ ⋃ (p : ↑s × ↑s) (_ : p ∈ A), s ∩ T p\na : ℝ\nas : a ∈ s\nb : ℝ\nbs : b ∈ s\n⊢ ∀ᵐ (x : ℝ) ∂Measure.restrict μ (s ∩ T ({ val := a, property := as }, { val := b, property := bs })), p x\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase intro.intro.right.mk.mk.mk\nμ : Measure ℝ\ninst✝ : NoAtoms μ\ns : Set ℝ\np : ℝ → Prop\nh : ∀ (a b : ℝ), a ∈ s → b ∈ s → a < b → ∀ᵐ (x : ℝ) ∂Measure.restrict μ (s ∩ Ioo a b), p x\nT : ↑s × ↑s → Set ℝ := fun p => Ioo ↑p.fst ↑p.snd\nu : Set ℝ := ⋃ (i : ↑s × ↑s), T i\nhfinite : Set.Finite (s \\ u)\nA : Set (↑s × ↑s)\nA_count : Set.Countable A\nhA : ⋃ (i : ↑s × ↑s) (_ : i ∈ A), T i = ⋃ (i : ↑s × ↑s), T i\nthis : s ⊆ s \\ u ∪ ⋃ (p : ↑s × ↑s) (_ : p ∈ A), s ∩ T p\na : ℝ\nas : a ∈ s\nb : ℝ\nbs : b ∈ s\n⊢ ∀ᵐ (x : ℝ) ∂Measure.restrict μ (s ∩ Ioo a b), p x\n[PROOFSTEP]\nrcases le_or_lt b a with (hba | hab)\n[GOAL]\ncase intro.intro.right.mk.mk.mk.inl\nμ : Measure ℝ\ninst✝ : NoAtoms μ\ns : Set ℝ\np : ℝ → Prop\nh : ∀ (a b : ℝ), a ∈ s → b ∈ s → a < b → ∀ᵐ (x : ℝ) ∂Measure.restrict μ (s ∩ Ioo a b), p x\nT : ↑s × ↑s → Set ℝ := fun p => Ioo ↑p.fst ↑p.snd\nu : Set ℝ := ⋃ (i : ↑s × ↑s), T i\nhfinite : Set.Finite (s \\ u)\nA : Set (↑s × ↑s)\nA_count : Set.Countable A\nhA : ⋃ (i : ↑s × ↑s) (_ : i ∈ A), T i = ⋃ (i : ↑s × ↑s), T i\nthis : s ⊆ s \\ u ∪ ⋃ (p : ↑s × ↑s) (_ : p ∈ A), s ∩ T p\na : ℝ\nas : a ∈ s\nb : ℝ\nbs : b ∈ s\nhba : b ≤ a\n⊢ ∀ᵐ (x : ℝ) ∂Measure.restrict μ (s ∩ Ioo a b), p x\n[PROOFSTEP]\nsimp only [Ioo_eq_empty_of_le hba, inter_empty, restrict_empty, ae_zero, eventually_bot]\n[GOAL]\ncase intro.intro.right.mk.mk.mk.inr\nμ : Measure ℝ\ninst✝ : NoAtoms μ\ns : Set ℝ\np : ℝ → Prop\nh : ∀ (a b : ℝ), a ∈ s → b ∈ s → a < b → ∀ᵐ (x : ℝ) ∂Measure.restrict μ (s ∩ Ioo a b), p x\nT : ↑s × ↑s → Set ℝ := fun p => Ioo ↑p.fst ↑p.snd\nu : Set ℝ := ⋃ (i : ↑s × ↑s), T i\nhfinite : Set.Finite (s \\ u)\nA : Set (↑s × ↑s)\nA_count : Set.Countable A\nhA : ⋃ (i : ↑s × ↑s) (_ : i ∈ A), T i = ⋃ (i : ↑s × ↑s), T i\nthis : s ⊆ s \\ u ∪ ⋃ (p : ↑s × ↑s) (_ : p ∈ A), s ∩ T p\na : ℝ\nas : a ∈ s\nb : ℝ\nbs : b ∈ s\nhab : a < b\n⊢ ∀ᵐ (x : ℝ) ∂Measure.restrict μ (s ∩ Ioo a b), p x\n[PROOFSTEP]\nexact h a b as bs hab\n[GOAL]\nμ : Measure ℝ\ninst✝ : NoAtoms μ\ns : Set ℝ\np : ℝ → Prop\nh : ∀ (a b : ℝ), a ∈ s → b ∈ s → a < b → ∀ᵐ (x : ℝ) ∂μ, x ∈ s ∩ Ioo a b → p x\n⊢ ∀ᵐ (x : ℝ) ∂μ, x ∈ s → p x\n[PROOFSTEP]\nlet T : s × s → Set ℝ := fun p => Ioo p.1 p.2\n[GOAL]\nμ : Measure ℝ\ninst✝ : NoAtoms μ\ns : Set ℝ\np : ℝ → Prop\nh : ∀ (a b : ℝ), a ∈ s → b ∈ s → a < b → ∀ᵐ (x : ℝ) ∂μ, x ∈ s ∩ Ioo a b → p x\nT : ↑s × ↑s → Set ℝ := fun p => Ioo ↑p.fst ↑p.snd\n⊢ ∀ᵐ (x : ℝ) ∂μ, x ∈ s → p x\n[PROOFSTEP]\nlet u := ⋃ i : ↥s × ↥s, T i\n[GOAL]\nμ : Measure ℝ\ninst✝ : NoAtoms μ\ns : Set ℝ\np : ℝ → Prop\nh : ∀ (a b : ℝ), a ∈ s → b ∈ s → a < b → ∀ᵐ (x : ℝ) ∂μ, x ∈ s ∩ Ioo a b → p x\nT : ↑s × ↑s → Set ℝ := fun p => Ioo ↑p.fst ↑p.snd\nu : Set ℝ := ⋃ (i : ↑s × ↑s), T i\n⊢ ∀ᵐ (x : ℝ) ∂μ, x ∈ s → p x\n[PROOFSTEP]\nhave hfinite : (s \\ u).Finite := s.finite_diff_iUnion_Ioo'\n[GOAL]\nμ : Measure ℝ\ninst✝ : NoAtoms μ\ns : Set ℝ\np : ℝ → Prop\nh : ∀ (a b : ℝ), a ∈ s → b ∈ s → a < b → ∀ᵐ (x : ℝ) ∂μ, x ∈ s ∩ Ioo a b → p x\nT : ↑s × ↑s → Set ℝ := fun p => Ioo ↑p.fst ↑p.snd\nu : Set ℝ := ⋃ (i : ↑s × ↑s), T i\nhfinite : Set.Finite (s \\ u)\n⊢ ∀ᵐ (x : ℝ) ∂μ, x ∈ s → p x\n[PROOFSTEP]\nobtain ⟨A, A_count, hA⟩ : ∃ A : Set (↥s × ↥s), A.Countable ∧ ⋃ i ∈ A, T i = ⋃ i : ↥s × ↥s, T i :=\n  isOpen_iUnion_countable _ fun p => isOpen_Ioo\n[GOAL]\ncase intro.intro\nμ : Measure ℝ\ninst✝ : NoAtoms μ\ns : Set ℝ\np : ℝ → Prop\nh : ∀ (a b : ℝ), a ∈ s → b ∈ s → a < b → ∀ᵐ (x : ℝ) ∂μ, x ∈ s ∩ Ioo a b → p x\nT : ↑s × ↑s → Set ℝ := fun p => Ioo ↑p.fst ↑p.snd\nu : Set ℝ := ⋃ (i : ↑s × ↑s), T i\nhfinite : Set.Finite (s \\ u)\nA : Set (↑s × ↑s)\nA_count : Set.Countable A\nhA : ⋃ (i : ↑s × ↑s) (_ : i ∈ A), T i = ⋃ (i : ↑s × ↑s), T i\n⊢ ∀ᵐ (x : ℝ) ∂μ, x ∈ s → p x\n[PROOFSTEP]\nhave M : ∀ᵐ x ∂μ, x ∉ s \\ u := hfinite.countable.ae_not_mem _\n[GOAL]\ncase intro.intro\nμ : Measure ℝ\ninst✝ : NoAtoms μ\ns : Set ℝ\np : ℝ → Prop\nh : ∀ (a b : ℝ), a ∈ s → b ∈ s → a < b → ∀ᵐ (x : ℝ) ∂μ, x ∈ s ∩ Ioo a b → p x\nT : ↑s × ↑s → Set ℝ := fun p => Ioo ↑p.fst ↑p.snd\nu : Set ℝ := ⋃ (i : ↑s × ↑s), T i\nhfinite : Set.Finite (s \\ u)\nA : Set (↑s × ↑s)\nA_count : Set.Countable A\nhA : ⋃ (i : ↑s × ↑s) (_ : i ∈ A), T i = ⋃ (i : ↑s × ↑s), T i\nM : ∀ᵐ (x : ℝ) ∂μ, ¬x ∈ s \\ u\n⊢ ∀ᵐ (x : ℝ) ∂μ, x ∈ s → p x\n[PROOFSTEP]\nhave M' : ∀ᵐ x ∂μ, ∀ (i : ↥s × ↥s), i ∈ A → x ∈ s ∩ T i → p x :=\n  by\n  rw [ae_ball_iff A_count]\n  rintro ⟨⟨a, as⟩, ⟨b, bs⟩⟩ -\n  change ∀ᵐ x : ℝ ∂μ, x ∈ s ∩ Ioo a b → p x\n  rcases le_or_lt b a with (hba | hab)\n  · simp only [Ioo_eq_empty_of_le hba, inter_empty, IsEmpty.forall_iff, eventually_true, mem_empty_iff_false]\n  · exact h a b as bs hab\n[GOAL]\nμ : Measure ℝ\ninst✝ : NoAtoms μ\ns : Set ℝ\np : ℝ → Prop\nh : ∀ (a b : ℝ), a ∈ s → b ∈ s → a < b → ∀ᵐ (x : ℝ) ∂μ, x ∈ s ∩ Ioo a b → p x\nT : ↑s × ↑s → Set ℝ := fun p => Ioo ↑p.fst ↑p.snd\nu : Set ℝ := ⋃ (i : ↑s × ↑s), T i\nhfinite : Set.Finite (s \\ u)\nA : Set (↑s × ↑s)\nA_count : Set.Countable A\nhA : ⋃ (i : ↑s × ↑s) (_ : i ∈ A), T i = ⋃ (i : ↑s × ↑s), T i\nM : ∀ᵐ (x : ℝ) ∂μ, ¬x ∈ s \\ u\n⊢ ∀ᵐ (x : ℝ) ∂μ, ∀ (i : ↑s × ↑s), i ∈ A → x ∈ s ∩ T i → p x\n[PROOFSTEP]\nrw [ae_ball_iff A_count]\n[GOAL]\nμ : Measure ℝ\ninst✝ : NoAtoms μ\ns : Set ℝ\np : ℝ → Prop\nh : ∀ (a b : ℝ), a ∈ s → b ∈ s → a < b → ∀ᵐ (x : ℝ) ∂μ, x ∈ s ∩ Ioo a b → p x\nT : ↑s × ↑s → Set ℝ := fun p => Ioo ↑p.fst ↑p.snd\nu : Set ℝ := ⋃ (i : ↑s × ↑s), T i\nhfinite : Set.Finite (s \\ u)\nA : Set (↑s × ↑s)\nA_count : Set.Countable A\nhA : ⋃ (i : ↑s × ↑s) (_ : i ∈ A), T i = ⋃ (i : ↑s × ↑s), T i\nM : ∀ᵐ (x : ℝ) ∂μ, ¬x ∈ s \\ u\n⊢ ∀ (i : ↑s × ↑s), i ∈ A → ∀ᵐ (x : ℝ) ∂μ, x ∈ s ∩ T i → p x\n[PROOFSTEP]\nrintro ⟨⟨a, as⟩, ⟨b, bs⟩⟩ -\n[GOAL]\ncase mk.mk.mk\nμ : Measure ℝ\ninst✝ : NoAtoms μ\ns : Set ℝ\np : ℝ → Prop\nh : ∀ (a b : ℝ), a ∈ s → b ∈ s → a < b → ∀ᵐ (x : ℝ) ∂μ, x ∈ s ∩ Ioo a b → p x\nT : ↑s × ↑s → Set ℝ := fun p => Ioo ↑p.fst ↑p.snd\nu : Set ℝ := ⋃ (i : ↑s × ↑s), T i\nhfinite : Set.Finite (s \\ u)\nA : Set (↑s × ↑s)\nA_count : Set.Countable A\nhA : ⋃ (i : ↑s × ↑s) (_ : i ∈ A), T i = ⋃ (i : ↑s × ↑s), T i\nM : ∀ᵐ (x : ℝ) ∂μ, ¬x ∈ s \\ u\na : ℝ\nas : a ∈ s\nb : ℝ\nbs : b ∈ s\n⊢ ∀ᵐ (x : ℝ) ∂μ, x ∈ s ∩ T ({ val := a, property := as }, { val := b, property := bs }) → p x\n[PROOFSTEP]\nchange ∀ᵐ x : ℝ ∂μ, x ∈ s ∩ Ioo a b → p x\n[GOAL]\ncase mk.mk.mk\nμ : Measure ℝ\ninst✝ : NoAtoms μ\ns : Set ℝ\np : ℝ → Prop\nh : ∀ (a b : ℝ), a ∈ s → b ∈ s → a < b → ∀ᵐ (x : ℝ) ∂μ, x ∈ s ∩ Ioo a b → p x\nT : ↑s × ↑s → Set ℝ := fun p => Ioo ↑p.fst ↑p.snd\nu : Set ℝ := ⋃ (i : ↑s × ↑s), T i\nhfinite : Set.Finite (s \\ u)\nA : Set (↑s × ↑s)\nA_count : Set.Countable A\nhA : ⋃ (i : ↑s × ↑s) (_ : i ∈ A), T i = ⋃ (i : ↑s × ↑s), T i\nM : ∀ᵐ (x : ℝ) ∂μ, ¬x ∈ s \\ u\na : ℝ\nas : a ∈ s\nb : ℝ\nbs : b ∈ s\n⊢ ∀ᵐ (x : ℝ) ∂μ, x ∈ s ∩ Ioo a b → p x\n[PROOFSTEP]\nrcases le_or_lt b a with (hba | hab)\n[GOAL]\ncase mk.mk.mk.inl\nμ : Measure ℝ\ninst✝ : NoAtoms μ\ns : Set ℝ\np : ℝ → Prop\nh : ∀ (a b : ℝ), a ∈ s → b ∈ s → a < b → ∀ᵐ (x : ℝ) ∂μ, x ∈ s ∩ Ioo a b → p x\nT : ↑s × ↑s → Set ℝ := fun p => Ioo ↑p.fst ↑p.snd\nu : Set ℝ := ⋃ (i : ↑s × ↑s), T i\nhfinite : Set.Finite (s \\ u)\nA : Set (↑s × ↑s)\nA_count : Set.Countable A\nhA : ⋃ (i : ↑s × ↑s) (_ : i ∈ A), T i = ⋃ (i : ↑s × ↑s), T i\nM : ∀ᵐ (x : ℝ) ∂μ, ¬x ∈ s \\ u\na : ℝ\nas : a ∈ s\nb : ℝ\nbs : b ∈ s\nhba : b ≤ a\n⊢ ∀ᵐ (x : ℝ) ∂μ, x ∈ s ∩ Ioo a b → p x\n[PROOFSTEP]\nsimp only [Ioo_eq_empty_of_le hba, inter_empty, IsEmpty.forall_iff, eventually_true, mem_empty_iff_false]\n[GOAL]\ncase mk.mk.mk.inr\nμ : Measure ℝ\ninst✝ : NoAtoms μ\ns : Set ℝ\np : ℝ → Prop\nh : ∀ (a b : ℝ), a ∈ s → b ∈ s → a < b → ∀ᵐ (x : ℝ) ∂μ, x ∈ s ∩ Ioo a b → p x\nT : ↑s × ↑s → Set ℝ := fun p => Ioo ↑p.fst ↑p.snd\nu : Set ℝ := ⋃ (i : ↑s × ↑s), T i\nhfinite : Set.Finite (s \\ u)\nA : Set (↑s × ↑s)\nA_count : Set.Countable A\nhA : ⋃ (i : ↑s × ↑s) (_ : i ∈ A), T i = ⋃ (i : ↑s × ↑s), T i\nM : ∀ᵐ (x : ℝ) ∂μ, ¬x ∈ s \\ u\na : ℝ\nas : a ∈ s\nb : ℝ\nbs : b ∈ s\nhab : a < b\n⊢ ∀ᵐ (x : ℝ) ∂μ, x ∈ s ∩ Ioo a b → p x\n[PROOFSTEP]\nexact h a b as bs hab\n[GOAL]\ncase intro.intro\nμ : Measure ℝ\ninst✝ : NoAtoms μ\ns : Set ℝ\np : ℝ → Prop\nh : ∀ (a b : ℝ), a ∈ s → b ∈ s → a < b → ∀ᵐ (x : ℝ) ∂μ, x ∈ s ∩ Ioo a b → p x\nT : ↑s × ↑s → Set ℝ := fun p => Ioo ↑p.fst ↑p.snd\nu : Set ℝ := ⋃ (i : ↑s × ↑s), T i\nhfinite : Set.Finite (s \\ u)\nA : Set (↑s × ↑s)\nA_count : Set.Countable A\nhA : ⋃ (i : ↑s × ↑s) (_ : i ∈ A), T i = ⋃ (i : ↑s × ↑s), T i\nM : ∀ᵐ (x : ℝ) ∂μ, ¬x ∈ s \\ u\nM' : ∀ᵐ (x : ℝ) ∂μ, ∀ (i : ↑s × ↑s), i ∈ A → x ∈ s ∩ T i → p x\n⊢ ∀ᵐ (x : ℝ) ∂μ, x ∈ s → p x\n[PROOFSTEP]\nfilter_upwards [M, M'] with x hx h'x\n[GOAL]\ncase h\nμ : Measure ℝ\ninst✝ : NoAtoms μ\ns : Set ℝ\np : ℝ → Prop\nh : ∀ (a b : ℝ), a ∈ s → b ∈ s → a < b → ∀ᵐ (x : ℝ) ∂μ, x ∈ s ∩ Ioo a b → p x\nT : ↑s × ↑s → Set ℝ := fun p => Ioo ↑p.fst ↑p.snd\nu : Set ℝ := ⋃ (i : ↑s × ↑s), T i\nhfinite : Set.Finite (s \\ u)\nA : Set (↑s × ↑s)\nA_count : Set.Countable A\nhA : ⋃ (i : ↑s × ↑s) (_ : i ∈ A), T i = ⋃ (i : ↑s × ↑s), T i\nM : ∀ᵐ (x : ℝ) ∂μ, ¬x ∈ s \\ u\nM' : ∀ᵐ (x : ℝ) ∂μ, ∀ (i : ↑s × ↑s), i ∈ A → x ∈ s ∩ T i → p x\nx : ℝ\nhx : ¬x ∈ s \\ ⋃ (i : ↑s × ↑s), Ioo ↑i.fst ↑i.snd\nh'x : ∀ (i : ↑s × ↑s), i ∈ A → x ∈ s ∩ Ioo ↑i.fst ↑i.snd → p x\n⊢ x ∈ s → p x\n[PROOFSTEP]\nintro xs\n[GOAL]\ncase h\nμ : Measure ℝ\ninst✝ : NoAtoms μ\ns : Set ℝ\np : ℝ → Prop\nh : ∀ (a b : ℝ), a ∈ s → b ∈ s → a < b → ∀ᵐ (x : ℝ) ∂μ, x ∈ s ∩ Ioo a b → p x\nT : ↑s × ↑s → Set ℝ := fun p => Ioo ↑p.fst ↑p.snd\nu : Set ℝ := ⋃ (i : ↑s × ↑s), T i\nhfinite : Set.Finite (s \\ u)\nA : Set (↑s × ↑s)\nA_count : Set.Countable A\nhA : ⋃ (i : ↑s × ↑s) (_ : i ∈ A), T i = ⋃ (i : ↑s × ↑s), T i\nM : ∀ᵐ (x : ℝ) ∂μ, ¬x ∈ s \\ u\nM' : ∀ᵐ (x : ℝ) ∂μ, ∀ (i : ↑s × ↑s), i ∈ A → x ∈ s ∩ T i → p x\nx : ℝ\nhx : ¬x ∈ s \\ ⋃ (i : ↑s × ↑s), Ioo ↑i.fst ↑i.snd\nh'x : ∀ (i : ↑s × ↑s), i ∈ A → x ∈ s ∩ Ioo ↑i.fst ↑i.snd → p x\nxs : x ∈ s\n⊢ p x\n[PROOFSTEP]\nby_cases Hx : x ∈ ⋃ i : ↥s × ↥s, T i\n[GOAL]\ncase pos\nμ : Measure ℝ\ninst✝ : NoAtoms μ\ns : Set ℝ\np : ℝ → Prop\nh : ∀ (a b : ℝ), a ∈ s → b ∈ s → a < b → ∀ᵐ (x : ℝ) ∂μ, x ∈ s ∩ Ioo a b → p x\nT : ↑s × ↑s → Set ℝ := fun p => Ioo ↑p.fst ↑p.snd\nu : Set ℝ := ⋃ (i : ↑s × ↑s), T i\nhfinite : Set.Finite (s \\ u)\nA : Set (↑s × ↑s)\nA_count : Set.Countable A\nhA : ⋃ (i : ↑s × ↑s) (_ : i ∈ A), T i = ⋃ (i : ↑s × ↑s), T i\nM : ∀ᵐ (x : ℝ) ∂μ, ¬x ∈ s \\ u\nM' : ∀ᵐ (x : ℝ) ∂μ, ∀ (i : ↑s × ↑s), i ∈ A → x ∈ s ∩ T i → p x\nx : ℝ\nhx : ¬x ∈ s \\ ⋃ (i : ↑s × ↑s), Ioo ↑i.fst ↑i.snd\nh'x : ∀ (i : ↑s × ↑s), i ∈ A → x ∈ s ∩ Ioo ↑i.fst ↑i.snd → p x\nxs : x ∈ s\nHx : x ∈ ⋃ (i : ↑s × ↑s), T i\n⊢ p x\n[PROOFSTEP]\nrw [← hA] at Hx \n[GOAL]\ncase pos\nμ : Measure ℝ\ninst✝ : NoAtoms μ\ns : Set ℝ\np : ℝ → Prop\nh : ∀ (a b : ℝ), a ∈ s → b ∈ s → a < b → ∀ᵐ (x : ℝ) ∂μ, x ∈ s ∩ Ioo a b → p x\nT : ↑s × ↑s → Set ℝ := fun p => Ioo ↑p.fst ↑p.snd\nu : Set ℝ := ⋃ (i : ↑s × ↑s), T i\nhfinite : Set.Finite (s \\ u)\nA : Set (↑s × ↑s)\nA_count : Set.Countable A\nhA : ⋃ (i : ↑s × ↑s) (_ : i ∈ A), T i = ⋃ (i : ↑s × ↑s), T i\nM : ∀ᵐ (x : ℝ) ∂μ, ¬x ∈ s \\ u\nM' : ∀ᵐ (x : ℝ) ∂μ, ∀ (i : ↑s × ↑s), i ∈ A → x ∈ s ∩ T i → p x\nx : ℝ\nhx : ¬x ∈ s \\ ⋃ (i : ↑s × ↑s), Ioo ↑i.fst ↑i.snd\nh'x : ∀ (i : ↑s × ↑s), i ∈ A → x ∈ s ∩ Ioo ↑i.fst ↑i.snd → p x\nxs : x ∈ s\nHx : x ∈ ⋃ (i : ↑s × ↑s) (_ : i ∈ A), T i\n⊢ p x\n[PROOFSTEP]\nobtain ⟨p, pA, xp⟩ : ∃ p : ↥s × ↥s, p ∈ A ∧ x ∈ T p := by\n  simpa only [mem_iUnion, exists_prop, SetCoe.exists, exists_and_right] using Hx\n[GOAL]\nμ : Measure ℝ\ninst✝ : NoAtoms μ\ns : Set ℝ\np : ℝ → Prop\nh : ∀ (a b : ℝ), a ∈ s → b ∈ s → a < b → ∀ᵐ (x : ℝ) ∂μ, x ∈ s ∩ Ioo a b → p x\nT : ↑s × ↑s → Set ℝ := fun p => Ioo ↑p.fst ↑p.snd\nu : Set ℝ := ⋃ (i : ↑s × ↑s), T i\nhfinite : Set.Finite (s \\ u)\nA : Set (↑s × ↑s)\nA_count : Set.Countable A\nhA : ⋃ (i : ↑s × ↑s) (_ : i ∈ A), T i = ⋃ (i : ↑s × ↑s), T i\nM : ∀ᵐ (x : ℝ) ∂μ, ¬x ∈ s \\ u\nM' : ∀ᵐ (x : ℝ) ∂μ, ∀ (i : ↑s × ↑s), i ∈ A → x ∈ s ∩ T i → p x\nx : ℝ\nhx : ¬x ∈ s \\ ⋃ (i : ↑s × ↑s), Ioo ↑i.fst ↑i.snd\nh'x : ∀ (i : ↑s × ↑s), i ∈ A → x ∈ s ∩ Ioo ↑i.fst ↑i.snd → p x\nxs : x ∈ s\nHx : x ∈ ⋃ (i : ↑s × ↑s) (_ : i ∈ A), T i\n⊢ ∃ p, p ∈ A ∧ x ∈ T p\n[PROOFSTEP]\nsimpa only [mem_iUnion, exists_prop, SetCoe.exists, exists_and_right] using Hx\n[GOAL]\ncase pos.intro.intro\nμ : Measure ℝ\ninst✝ : NoAtoms μ\ns : Set ℝ\np✝ : ℝ → Prop\nh : ∀ (a b : ℝ), a ∈ s → b ∈ s → a < b → ∀ᵐ (x : ℝ) ∂μ, x ∈ s ∩ Ioo a b → p✝ x\nT : ↑s × ↑s → Set ℝ := fun p => Ioo ↑p.fst ↑p.snd\nu : Set ℝ := ⋃ (i : ↑s × ↑s), T i\nhfinite : Set.Finite (s \\ u)\nA : Set (↑s × ↑s)\nA_count : Set.Countable A\nhA : ⋃ (i : ↑s × ↑s) (_ : i ∈ A), T i = ⋃ (i : ↑s × ↑s), T i\nM : ∀ᵐ (x : ℝ) ∂μ, ¬x ∈ s \\ u\nM' : ∀ᵐ (x : ℝ) ∂μ, ∀ (i : ↑s × ↑s), i ∈ A → x ∈ s ∩ T i → p✝ x\nx : ℝ\nhx : ¬x ∈ s \\ ⋃ (i : ↑s × ↑s), Ioo ↑i.fst ↑i.snd\nh'x : ∀ (i : ↑s × ↑s), i ∈ A → x ∈ s ∩ Ioo ↑i.fst ↑i.snd → p✝ x\nxs : x ∈ s\nHx : x ∈ ⋃ (i : ↑s × ↑s) (_ : i ∈ A), T i\np : ↑s × ↑s\npA : p ∈ A\nxp : x ∈ T p\n⊢ p✝ x\n[PROOFSTEP]\napply h'x p pA ⟨xs, xp⟩\n[GOAL]\ncase neg\nμ : Measure ℝ\ninst✝ : NoAtoms μ\ns : Set ℝ\np : ℝ → Prop\nh : ∀ (a b : ℝ), a ∈ s → b ∈ s → a < b → ∀ᵐ (x : ℝ) ∂μ, x ∈ s ∩ Ioo a b → p x\nT : ↑s × ↑s → Set ℝ := fun p => Ioo ↑p.fst ↑p.snd\nu : Set ℝ := ⋃ (i : ↑s × ↑s), T i\nhfinite : Set.Finite (s \\ u)\nA : Set (↑s × ↑s)\nA_count : Set.Countable A\nhA : ⋃ (i : ↑s × ↑s) (_ : i ∈ A), T i = ⋃ (i : ↑s × ↑s), T i\nM : ∀ᵐ (x : ℝ) ∂μ, ¬x ∈ s \\ u\nM' : ∀ᵐ (x : ℝ) ∂μ, ∀ (i : ↑s × ↑s), i ∈ A → x ∈ s ∩ T i → p x\nx : ℝ\nhx : ¬x ∈ s \\ ⋃ (i : ↑s × ↑s), Ioo ↑i.fst ↑i.snd\nh'x : ∀ (i : ↑s × ↑s), i ∈ A → x ∈ s ∩ Ioo ↑i.fst ↑i.snd → p x\nxs : x ∈ s\nHx : ¬x ∈ ⋃ (i : ↑s × ↑s), T i\n⊢ p x\n[PROOFSTEP]\nexact False.elim (hx ⟨xs, Hx⟩)\n", "meta": {"mathlib_filename": "Mathlib.MeasureTheory.Measure.Lebesgue.Basic", "llama_tokens": 49437, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7853085808877581, "lm_q2_score": 0.6859494550081926, "lm_q1q2_score": 0.5386819930732148}}
{"text": "[GOAL]\nS : Type u_1\ninst✝ : Semigroup S\na b x y z x' y' : S\nh : SemiconjBy a x y\nh' : SemiconjBy a x' y'\n⊢ SemiconjBy a (x * x') (y * y')\n[PROOFSTEP]\nunfold SemiconjBy\n[GOAL]\nS : Type u_1\ninst✝ : Semigroup S\na b x y z x' y' : S\nh : SemiconjBy a x y\nh' : SemiconjBy a x' y'\n⊢ a * (x * x') = y * y' * a\n[PROOFSTEP]\nrw [← mul_assoc, h.eq, mul_assoc, h'.eq, ← mul_assoc]\n[GOAL]\nS : Type u_1\ninst✝ : Semigroup S\na b x y z x' y' : S\nha : SemiconjBy a y z\nhb : SemiconjBy b x y\n⊢ SemiconjBy (a * b) x z\n[PROOFSTEP]\nunfold SemiconjBy\n[GOAL]\nS : Type u_1\ninst✝ : Semigroup S\na b x y z x' y' : S\nha : SemiconjBy a y z\nhb : SemiconjBy b x y\n⊢ a * b * x = z * (a * b)\n[PROOFSTEP]\nrw [mul_assoc, hb.eq, ← mul_assoc, ha.eq, mul_assoc]\n[GOAL]\nM : Type u_1\ninst✝ : MulOneClass M\na : M\n⊢ SemiconjBy a 1 1\n[PROOFSTEP]\nrw [SemiconjBy, mul_one, one_mul]\n[GOAL]\nM : Type u_1\ninst✝ : Monoid M\na : M\nx y : Mˣ\nh : SemiconjBy a ↑x ↑y\n⊢ a * ↑x⁻¹ = ↑y⁻¹ * (↑y * a) * ↑x⁻¹\n[PROOFSTEP]\nrw [Units.inv_mul_cancel_left]\n[GOAL]\nM : Type u_1\ninst✝ : Monoid M\na : M\nx y : Mˣ\nh : SemiconjBy a ↑x ↑y\n⊢ ↑y⁻¹ * (↑y * a) * ↑x⁻¹ = ↑y⁻¹ * a\n[PROOFSTEP]\nrw [← h.eq, mul_assoc, Units.mul_inv_cancel_right]\n[GOAL]\nM : Type u_1\ninst✝ : Monoid M\na : Mˣ\nx y : M\nh : SemiconjBy (↑a) x y\n⊢ ↑a⁻¹ * y = ↑a⁻¹ * (y * ↑a * ↑a⁻¹)\n[PROOFSTEP]\nrw [Units.mul_inv_cancel_right]\n[GOAL]\nM : Type u_1\ninst✝ : Monoid M\na : Mˣ\nx y : M\nh : SemiconjBy (↑a) x y\n⊢ ↑a⁻¹ * (y * ↑a * ↑a⁻¹) = x * ↑a⁻¹\n[PROOFSTEP]\nrw [← h.eq, ← mul_assoc, Units.inv_mul_cancel_left]\n[GOAL]\nM : Type u_1\ninst✝ : Monoid M\na x y : M\nh : SemiconjBy a x y\nn : ℕ\n⊢ SemiconjBy a (x ^ n) (y ^ n)\n[PROOFSTEP]\ninduction' n with n ih\n[GOAL]\ncase zero\nM : Type u_1\ninst✝ : Monoid M\na x y : M\nh : SemiconjBy a x y\n⊢ SemiconjBy a (x ^ Nat.zero) (y ^ Nat.zero)\n[PROOFSTEP]\nrw [pow_zero, pow_zero]\n[GOAL]\ncase zero\nM : Type u_1\ninst✝ : Monoid M\na x y : M\nh : SemiconjBy a x y\n⊢ SemiconjBy a 1 1\n[PROOFSTEP]\nexact SemiconjBy.one_right _\n[GOAL]\ncase succ\nM : Type u_1\ninst✝ : Monoid M\na x y : M\nh : SemiconjBy a x y\nn : ℕ\nih : SemiconjBy a (x ^ n) (y ^ n)\n⊢ SemiconjBy a (x ^ Nat.succ n) (y ^ Nat.succ n)\n[PROOFSTEP]\nrw [pow_succ, pow_succ]\n[GOAL]\ncase succ\nM : Type u_1\ninst✝ : Monoid M\na x y : M\nh : SemiconjBy a x y\nn : ℕ\nih : SemiconjBy a (x ^ n) (y ^ n)\n⊢ SemiconjBy a (x * x ^ n) (y * y ^ n)\n[PROOFSTEP]\nexact h.mul_right ih\n[GOAL]\nG : Type u_1\ninst✝ : DivisionMonoid G\na x y : G\n⊢ (a⁻¹ * x⁻¹)⁻¹ = (y⁻¹ * a⁻¹)⁻¹ ↔ SemiconjBy a y x\n[PROOFSTEP]\nrw [mul_inv_rev, mul_inv_rev, inv_inv, inv_inv, inv_inv, eq_comm, SemiconjBy]\n[GOAL]\nG : Type u_1\ninst✝ : Group G\na✝ x✝ y a x : G\n⊢ SemiconjBy a x (a * x * a⁻¹)\n[PROOFSTEP]\nunfold SemiconjBy\n[GOAL]\nG : Type u_1\ninst✝ : Group G\na✝ x✝ y a x : G\n⊢ a * x = a * x * a⁻¹ * a\n[PROOFSTEP]\nrw [mul_assoc, inv_mul_self, mul_one]\n[GOAL]\nM : Type u_1\ninst✝ : CancelCommMonoid M\na x y : M\nh : x = y\n⊢ SemiconjBy a x y\n[PROOFSTEP]\nrw [h, SemiconjBy, mul_comm]\n[GOAL]\nM : Type u_1\ninst✝ : Monoid M\nu : Mˣ\nx : M\n⊢ SemiconjBy (↑u) x (↑u * x * ↑u⁻¹)\n[PROOFSTEP]\nunfold SemiconjBy\n[GOAL]\nM : Type u_1\ninst✝ : Monoid M\nu : Mˣ\nx : M\n⊢ ↑u * x = ↑u * x * ↑u⁻¹ * ↑u\n[PROOFSTEP]\nrw [Units.inv_mul_cancel_right]\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Group.Semiconj", "llama_tokens": 1722, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7461389930307512, "lm_q2_score": 0.7217432003123989, "lm_q1q2_score": 0.538520744707885}}
{"text": "[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁷ : Ring R\ninst✝⁶ : Invertible 2\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\nx✝ y✝ z x y : P\n⊢ ↑(pointReflection R (midpoint R x y)) x = y\n[PROOFSTEP]\nrw [midpoint, pointReflection_apply, lineMap_apply, vadd_vsub, vadd_vadd, ← add_smul, ← two_mul, mul_invOf_self,\n  one_smul, vsub_vadd]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁷ : Ring R\ninst✝⁶ : Invertible 2\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\nx✝ y✝ z x y : P\n⊢ ↑(pointReflection (midpoint R x y)) x = y\n[PROOFSTEP]\nrw [midpoint, pointReflection_apply, lineMap_apply, vadd_vsub, vadd_vadd, ← add_smul, ← two_mul, mul_invOf_self,\n  one_smul, vsub_vadd]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁷ : Ring R\ninst✝⁶ : Invertible 2\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\nx✝ y✝ z x y : P\n⊢ midpoint R x y = midpoint R y x\n[PROOFSTEP]\nrw [midpoint, ← lineMap_apply_one_sub, one_sub_invOf_two, midpoint]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁷ : Ring R\ninst✝⁶ : Invertible 2\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\nx✝ y✝ z x y : P\n⊢ ↑(pointReflection R (midpoint R x y)) y = x\n[PROOFSTEP]\nrw [midpoint_comm, AffineEquiv.pointReflection_midpoint_left]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁷ : Ring R\ninst✝⁶ : Invertible 2\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\nx✝ y✝ z x y : P\n⊢ ↑(pointReflection (midpoint R x y)) y = x\n[PROOFSTEP]\nrw [midpoint_comm, Equiv.pointReflection_midpoint_left]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁷ : Ring R\ninst✝⁶ : Invertible 2\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\nx y z p₁ p₂ : P\n⊢ midpoint R p₁ p₂ -ᵥ p₂ = ⅟2 • (p₁ -ᵥ p₂)\n[PROOFSTEP]\nrw [midpoint_comm, midpoint_vsub_left]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁷ : Ring R\ninst✝⁶ : Invertible 2\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\nx y z p₁ p₂ : P\n⊢ p₂ -ᵥ midpoint R p₁ p₂ = ⅟2 • (p₂ -ᵥ p₁)\n[PROOFSTEP]\nrw [midpoint_comm, left_vsub_midpoint]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁷ : Ring R\ninst✝⁶ : Invertible 2\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\nx y z p₁ p₂ p : P\n⊢ midpoint R p₁ p₂ -ᵥ p = ⅟2 • (p₁ -ᵥ p) + ⅟2 • (p₂ -ᵥ p)\n[PROOFSTEP]\nrw [← vsub_sub_vsub_cancel_right p₁ p p₂, smul_sub, sub_eq_add_neg, ← smul_neg, neg_vsub_eq_vsub_rev, add_assoc,\n  invOf_two_smul_add_invOf_two_smul, ← vadd_vsub_assoc, midpoint_comm, midpoint, lineMap_apply]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁷ : Ring R\ninst✝⁶ : Invertible 2\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\nx y z p₁ p₂ p : P\n⊢ p -ᵥ midpoint R p₁ p₂ = ⅟2 • (p -ᵥ p₁) + ⅟2 • (p -ᵥ p₂)\n[PROOFSTEP]\nrw [← neg_vsub_eq_vsub_rev, midpoint_vsub, neg_add, ← smul_neg, ← smul_neg, neg_vsub_eq_vsub_rev, neg_vsub_eq_vsub_rev]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁷ : Ring R\ninst✝⁶ : Invertible 2\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\nx✝ y✝ z x y : P\n⊢ midpoint R x y = x ↔ x = y\n[PROOFSTEP]\nrw [midpoint_eq_iff, pointReflection_self]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁷ : Ring R\ninst✝⁶ : Invertible 2\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\nx✝ y✝ z x y : P\n⊢ x = midpoint R x y ↔ x = y\n[PROOFSTEP]\nrw [eq_comm, midpoint_eq_left_iff]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁷ : Ring R\ninst✝⁶ : Invertible 2\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\nx✝ y✝ z x y : P\n⊢ midpoint R x y = y ↔ x = y\n[PROOFSTEP]\nrw [midpoint_comm, midpoint_eq_left_iff, eq_comm]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁷ : Ring R\ninst✝⁶ : Invertible 2\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\nx✝ y✝ z x y : P\n⊢ y = midpoint R x y ↔ x = y\n[PROOFSTEP]\nrw [eq_comm, midpoint_eq_right_iff]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁷ : Ring R\ninst✝⁶ : Invertible 2\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\nx✝ y✝ z x x' y y' : P\n⊢ midpoint R x y = midpoint R x' y' ↔ x -ᵥ x' = y' -ᵥ y\n[PROOFSTEP]\nrw [← @vsub_eq_zero_iff_eq V, midpoint_vsub_midpoint, midpoint_eq_iff, pointReflection_apply, vsub_eq_sub, zero_sub,\n  vadd_eq_add, add_zero, neg_eq_iff_eq_neg, neg_vsub_eq_vsub_rev]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁷ : Ring R\ninst✝⁶ : Invertible 2\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\nx✝ y✝ z : P\nx y : V\n⊢ midpoint R x y +ᵥ midpoint R x y = midpoint R x y +ᵥ midpoint R y x\n[PROOFSTEP]\nrw [midpoint_comm]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁷ : Ring R\ninst✝⁶ : Invertible 2\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\nx✝ y✝ z : P\nx y : V\n⊢ midpoint R x y +ᵥ midpoint R y x = x + y\n[PROOFSTEP]\nrw [midpoint_vadd_midpoint, vadd_eq_add, vadd_eq_add, add_comm, midpoint_self]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁷ : Ring R\ninst✝⁶ : Invertible 2\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\nx✝ y✝ z : P\nx y : V\n⊢ 0 -ᵥ x = y -ᵥ (x + y)\n[PROOFSTEP]\nsimp [sub_add_eq_sub_sub_swap]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁷ : Ring R\ninst✝⁶ : Invertible 2\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\nx✝ y✝ z : P\nx y : V\n⊢ midpoint R x y = ⅟2 • (x + y)\n[PROOFSTEP]\nrw [midpoint_eq_iff, pointReflection_apply, vsub_eq_sub, vadd_eq_add, sub_add_eq_add_sub, ← two_smul R, smul_smul,\n  mul_invOf_self, one_smul, add_sub_cancel']\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁷ : Ring R\ninst✝⁶ : Invertible 2\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\nx✝ y z : P\nx : V\n⊢ midpoint R x (-x) = 0\n[PROOFSTEP]\nrw [midpoint_eq_smul_add, add_neg_self, smul_zero]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁷ : Ring R\ninst✝⁶ : Invertible 2\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\nx✝ y z : P\nx : V\n⊢ midpoint R (-x) x = 0\n[PROOFSTEP]\nsimpa using midpoint_self_neg R (-x)\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁷ : Ring R\ninst✝⁶ : Invertible 2\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\nx✝ y✝ z : P\nx y : V\n⊢ midpoint R (x - y) (x + y) = x\n[PROOFSTEP]\nrw [sub_eq_add_neg, ← vadd_eq_add, ← vadd_eq_add, ← midpoint_vadd_midpoint]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁷ : Ring R\ninst✝⁶ : Invertible 2\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\nx✝ y✝ z : P\nx y : V\n⊢ midpoint R x x +ᵥ midpoint R (-y) y = x\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁷ : Ring R\ninst✝⁶ : Invertible 2\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\nx✝ y✝ z : P\nx y : V\n⊢ midpoint R (x + y) (x - y) = x\n[PROOFSTEP]\nrw [midpoint_comm]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁷ : Ring R\ninst✝⁶ : Invertible 2\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\nx✝ y✝ z : P\nx y : V\n⊢ midpoint R (x - y) (x + y) = x\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\nR' : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁷ : Ring R\ninst✝⁶ : Invertible 2\ninst✝⁵ : AddCommGroup E\ninst✝⁴ : Module R E\ninst✝³ : Ring R'\ninst✝² : Invertible 2\ninst✝¹ : AddCommGroup F\ninst✝ : Module R' F\nf : E → F\nh0 : f 0 = 0\nhm : ∀ (x y : E), f (midpoint R x y) = midpoint R' (f x) (f y)\nx y : E\n⊢ f (x + y) = f 0 + f (x + y)\n[PROOFSTEP]\nrw [h0, zero_add]\n[GOAL]\nR : Type u_1\nR' : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁷ : Ring R\ninst✝⁶ : Invertible 2\ninst✝⁵ : AddCommGroup E\ninst✝⁴ : Module R E\ninst✝³ : Ring R'\ninst✝² : Invertible 2\ninst✝¹ : AddCommGroup F\ninst✝ : Module R' F\nf : E → F\nh0 : f 0 = 0\nhm : ∀ (x y : E), f (midpoint R x y) = midpoint R' (f x) (f y)\nx y : E\n⊢ midpoint R' (f 0) (f (x + y)) + midpoint R' (f 0) (f (x + y)) = f (midpoint R x y) + f (midpoint R x y)\n[PROOFSTEP]\nrw [← hm, midpoint_zero_add]\n[GOAL]\nR : Type u_1\nR' : Type u_2\nE : Type u_3\nF : Type u_4\ninst✝⁷ : Ring R\ninst✝⁶ : Invertible 2\ninst✝⁵ : AddCommGroup E\ninst✝⁴ : Module R E\ninst✝³ : Ring R'\ninst✝² : Invertible 2\ninst✝¹ : AddCommGroup F\ninst✝ : Module R' F\nf : E → F\nh0 : f 0 = 0\nhm : ∀ (x y : E), f (midpoint R x y) = midpoint R' (f x) (f y)\nx y : E\n⊢ f (midpoint R x y) + f (midpoint R x y) = f x + f y\n[PROOFSTEP]\nrw [hm, midpoint_add_self]\n", "meta": {"mathlib_filename": "Mathlib.LinearAlgebra.AffineSpace.Midpoint", "llama_tokens": 5685, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8221891305219504, "lm_q2_score": 0.6548947290421275, "lm_q1q2_score": 0.5384473278545552}}
{"text": "[GOAL]\nG : Type u_1\ninst✝ : Group G\nH K : Subgroup G\nS T : Set G\nh : IsComplement' H K\n⊢ IsComplement' K H\n[PROOFSTEP]\nlet ϕ : H × K ≃ K × H :=\n  Equiv.mk (fun x => ⟨x.2⁻¹, x.1⁻¹⟩) (fun x => ⟨x.2⁻¹, x.1⁻¹⟩) (fun x => Prod.ext (inv_inv _) (inv_inv _)) fun x =>\n    Prod.ext (inv_inv _) (inv_inv _)\n[GOAL]\nG : Type u_1\ninst✝ : Group G\nH K : Subgroup G\nS T : Set G\nh : IsComplement' H K\nϕ : { x // x ∈ H } × { x // x ∈ K } ≃ { x // x ∈ K } × { x // x ∈ H } :=\n  { toFun := fun x => (x.snd⁻¹, x.fst⁻¹), invFun := fun x => (x.snd⁻¹, x.fst⁻¹),\n    left_inv :=\n      (_ :\n        ∀ (x : { x // x ∈ H } × { x // x ∈ K }), (fun x => (x.snd⁻¹, x.fst⁻¹)) ((fun x => (x.snd⁻¹, x.fst⁻¹)) x) = x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // x ∈ K } × { x // x ∈ H }), (fun x => (x.snd⁻¹, x.fst⁻¹)) ((fun x => (x.snd⁻¹, x.fst⁻¹)) x) = x) }\n⊢ IsComplement' K H\n[PROOFSTEP]\nlet ψ : G ≃ G := Equiv.mk (fun g : G => g⁻¹) (fun g : G => g⁻¹) inv_inv inv_inv\n[GOAL]\nG : Type u_1\ninst✝ : Group G\nH K : Subgroup G\nS T : Set G\nh : IsComplement' H K\nϕ : { x // x ∈ H } × { x // x ∈ K } ≃ { x // x ∈ K } × { x // x ∈ H } :=\n  { toFun := fun x => (x.snd⁻¹, x.fst⁻¹), invFun := fun x => (x.snd⁻¹, x.fst⁻¹),\n    left_inv :=\n      (_ :\n        ∀ (x : { x // x ∈ H } × { x // x ∈ K }), (fun x => (x.snd⁻¹, x.fst⁻¹)) ((fun x => (x.snd⁻¹, x.fst⁻¹)) x) = x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // x ∈ K } × { x // x ∈ H }), (fun x => (x.snd⁻¹, x.fst⁻¹)) ((fun x => (x.snd⁻¹, x.fst⁻¹)) x) = x) }\nψ : G ≃ G :=\n  { toFun := fun g => g⁻¹, invFun := fun g => g⁻¹, left_inv := (_ : ∀ (a : G), a⁻¹⁻¹ = a),\n    right_inv := (_ : ∀ (a : G), a⁻¹⁻¹ = a) }\n⊢ IsComplement' K H\n[PROOFSTEP]\nsuffices hf : (ψ ∘ fun x : H × K => x.1.1 * x.2.1) = (fun x : K × H => x.1.1 * x.2.1) ∘ ϕ\n  by\n  rw [isComplement'_def, IsComplement, ← Equiv.bijective_comp ϕ]\n  apply (congr_arg Function.Bijective hf).mp\n  rwa [ψ.comp_bijective]\n[GOAL]\nG : Type u_1\ninst✝ : Group G\nH K : Subgroup G\nS T : Set G\nh : IsComplement' H K\nϕ : { x // x ∈ H } × { x // x ∈ K } ≃ { x // x ∈ K } × { x // x ∈ H } :=\n  { toFun := fun x => (x.snd⁻¹, x.fst⁻¹), invFun := fun x => (x.snd⁻¹, x.fst⁻¹),\n    left_inv :=\n      (_ :\n        ∀ (x : { x // x ∈ H } × { x // x ∈ K }), (fun x => (x.snd⁻¹, x.fst⁻¹)) ((fun x => (x.snd⁻¹, x.fst⁻¹)) x) = x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // x ∈ K } × { x // x ∈ H }), (fun x => (x.snd⁻¹, x.fst⁻¹)) ((fun x => (x.snd⁻¹, x.fst⁻¹)) x) = x) }\nψ : G ≃ G :=\n  { toFun := fun g => g⁻¹, invFun := fun g => g⁻¹, left_inv := (_ : ∀ (a : G), a⁻¹⁻¹ = a),\n    right_inv := (_ : ∀ (a : G), a⁻¹⁻¹ = a) }\nhf : (↑ψ ∘ fun x => ↑x.fst * ↑x.snd) = (fun x => ↑x.fst * ↑x.snd) ∘ ↑ϕ\n⊢ IsComplement' K H\n[PROOFSTEP]\nrw [isComplement'_def, IsComplement, ← Equiv.bijective_comp ϕ]\n[GOAL]\nG : Type u_1\ninst✝ : Group G\nH K : Subgroup G\nS T : Set G\nh : IsComplement' H K\nϕ : { x // x ∈ H } × { x // x ∈ K } ≃ { x // x ∈ K } × { x // x ∈ H } :=\n  { toFun := fun x => (x.snd⁻¹, x.fst⁻¹), invFun := fun x => (x.snd⁻¹, x.fst⁻¹),\n    left_inv :=\n      (_ :\n        ∀ (x : { x // x ∈ H } × { x // x ∈ K }), (fun x => (x.snd⁻¹, x.fst⁻¹)) ((fun x => (x.snd⁻¹, x.fst⁻¹)) x) = x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // x ∈ K } × { x // x ∈ H }), (fun x => (x.snd⁻¹, x.fst⁻¹)) ((fun x => (x.snd⁻¹, x.fst⁻¹)) x) = x) }\nψ : G ≃ G :=\n  { toFun := fun g => g⁻¹, invFun := fun g => g⁻¹, left_inv := (_ : ∀ (a : G), a⁻¹⁻¹ = a),\n    right_inv := (_ : ∀ (a : G), a⁻¹⁻¹ = a) }\nhf : (↑ψ ∘ fun x => ↑x.fst * ↑x.snd) = (fun x => ↑x.fst * ↑x.snd) ∘ ↑ϕ\n⊢ Function.Bijective ((fun x => ↑x.fst * ↑x.snd) ∘ ↑ϕ)\n[PROOFSTEP]\napply (congr_arg Function.Bijective hf).mp\n[GOAL]\nG : Type u_1\ninst✝ : Group G\nH K : Subgroup G\nS T : Set G\nh : IsComplement' H K\nϕ : { x // x ∈ H } × { x // x ∈ K } ≃ { x // x ∈ K } × { x // x ∈ H } :=\n  { toFun := fun x => (x.snd⁻¹, x.fst⁻¹), invFun := fun x => (x.snd⁻¹, x.fst⁻¹),\n    left_inv :=\n      (_ :\n        ∀ (x : { x // x ∈ H } × { x // x ∈ K }), (fun x => (x.snd⁻¹, x.fst⁻¹)) ((fun x => (x.snd⁻¹, x.fst⁻¹)) x) = x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // x ∈ K } × { x // x ∈ H }), (fun x => (x.snd⁻¹, x.fst⁻¹)) ((fun x => (x.snd⁻¹, x.fst⁻¹)) x) = x) }\nψ : G ≃ G :=\n  { toFun := fun g => g⁻¹, invFun := fun g => g⁻¹, left_inv := (_ : ∀ (a : G), a⁻¹⁻¹ = a),\n    right_inv := (_ : ∀ (a : G), a⁻¹⁻¹ = a) }\nhf : (↑ψ ∘ fun x => ↑x.fst * ↑x.snd) = (fun x => ↑x.fst * ↑x.snd) ∘ ↑ϕ\n⊢ Function.Bijective (↑ψ ∘ fun x => ↑x.fst * ↑x.snd)\n[PROOFSTEP]\nrwa [ψ.comp_bijective]\n[GOAL]\nG : Type u_1\ninst✝ : Group G\nH K : Subgroup G\nS T : Set G\nh : IsComplement' H K\nϕ : { x // x ∈ H } × { x // x ∈ K } ≃ { x // x ∈ K } × { x // x ∈ H } :=\n  { toFun := fun x => (x.snd⁻¹, x.fst⁻¹), invFun := fun x => (x.snd⁻¹, x.fst⁻¹),\n    left_inv :=\n      (_ :\n        ∀ (x : { x // x ∈ H } × { x // x ∈ K }), (fun x => (x.snd⁻¹, x.fst⁻¹)) ((fun x => (x.snd⁻¹, x.fst⁻¹)) x) = x),\n    right_inv :=\n      (_ :\n        ∀ (x : { x // x ∈ K } × { x // x ∈ H }), (fun x => (x.snd⁻¹, x.fst⁻¹)) ((fun x => (x.snd⁻¹, x.fst⁻¹)) x) = x) }\nψ : G ≃ G :=\n  { toFun := fun g => g⁻¹, invFun := fun g => g⁻¹, left_inv := (_ : ∀ (a : G), a⁻¹⁻¹ = a),\n    right_inv := (_ : ∀ (a : G), a⁻¹⁻¹ = a) }\n⊢ (↑ψ ∘ fun x => ↑x.fst * ↑x.snd) = (fun x => ↑x.fst * ↑x.snd) ∘ ↑ϕ\n[PROOFSTEP]\nexact funext fun x => mul_inv_rev _ _\n[GOAL]\nG : Type u_1\ninst✝ : Group G\nH K : Subgroup G\nS T : Set G\ng : G\n⊢ IsComplement {g} S ↔ S = ⊤\n[PROOFSTEP]\nrefine' ⟨fun h => top_le_iff.mp fun x _ => _, fun h => (congr_arg _ h).mpr isComplement_singleton_top⟩\n[GOAL]\nG : Type u_1\ninst✝ : Group G\nH K : Subgroup G\nS T : Set G\ng : G\nh : IsComplement {g} S\nx : G\nx✝ : x ∈ ⊤\n⊢ x ∈ S\n[PROOFSTEP]\nobtain ⟨⟨⟨z, rfl : z = g⟩, y, _⟩, hy⟩ := h.2 (g * x)\n[GOAL]\ncase intro.mk.mk.mk\nG : Type u_1\ninst✝ : Group G\nH K : Subgroup G\nS T : Set G\nx : G\nx✝ : x ∈ ⊤\nz : G\nh : IsComplement {z} S\ny : G\nproperty✝ : y ∈ S\nhy : (fun x => ↑x.fst * ↑x.snd) ({ val := z, property := (_ : z = z) }, { val := y, property := property✝ }) = z * x\n⊢ x ∈ S\n[PROOFSTEP]\nrwa [← mul_left_cancel hy]\n[GOAL]\nG : Type u_1\ninst✝ : Group G\nH K : Subgroup G\nS T : Set G\ng : G\n⊢ IsComplement S {g} ↔ S = ⊤\n[PROOFSTEP]\nrefine' ⟨fun h => top_le_iff.mp fun x _ => _, fun h => h ▸ isComplement_top_singleton⟩\n[GOAL]\nG : Type u_1\ninst✝ : Group G\nH K : Subgroup G\nS T : Set G\ng : G\nh : IsComplement S {g}\nx : G\nx✝ : x ∈ ⊤\n⊢ x ∈ S\n[PROOFSTEP]\nobtain ⟨y, hy⟩ := h.2 (x * g)\n[GOAL]\ncase intro\nG : Type u_1\ninst✝ : Group G\nH K : Subgroup G\nS T : Set G\ng : G\nh : IsComplement S {g}\nx : G\nx✝ : x ∈ ⊤\ny : ↑S × ↑{g}\nhy : (fun x => ↑x.fst * ↑x.snd) y = x * g\n⊢ x ∈ S\n[PROOFSTEP]\nconv_rhs at hy => rw [← show y.2.1 = g from y.2.2]\n[GOAL]\nG : Type u_1\ninst✝ : Group G\nH K : Subgroup G\nS T : Set G\ng : G\nh : IsComplement S {g}\nx : G\nx✝ : x ∈ ⊤\ny : ↑S × ↑{g}\nhy : (fun x => ↑x.fst * ↑x.snd) y = x * g\n| x * g\n[PROOFSTEP]\nrw [← show y.2.1 = g from y.2.2]\n[GOAL]\nG : Type u_1\ninst✝ : Group G\nH K : Subgroup G\nS T : Set G\ng : G\nh : IsComplement S {g}\nx : G\nx✝ : x ∈ ⊤\ny : ↑S × ↑{g}\nhy : (fun x => ↑x.fst * ↑x.snd) y = x * g\n| x * g\n[PROOFSTEP]\nrw [← show y.2.1 = g from y.2.2]\n[GOAL]\nG : Type u_1\ninst✝ : Group G\nH K : Subgroup G\nS T : Set G\ng : G\nh : IsComplement S {g}\nx : G\nx✝ : x ∈ ⊤\ny : ↑S × ↑{g}\nhy : (fun x => ↑x.fst * ↑x.snd) y = x * g\n| x * g\n[PROOFSTEP]\nrw [← show y.2.1 = g from y.2.2]\n[GOAL]\ncase intro\nG : Type u_1\ninst✝ : Group G\nH K : Subgroup G\nS T : Set G\ng : G\nh : IsComplement S {g}\nx : G\nx✝ : x ∈ ⊤\ny : ↑S × ↑{g}\nhy : (fun x => ↑x.fst * ↑x.snd) y = x * ↑y.snd\n⊢ x ∈ S\n[PROOFSTEP]\nrw [← mul_right_cancel hy]\n[GOAL]\ncase intro\nG : Type u_1\ninst✝ : Group G\nH K : Subgroup G\nS T : Set G\ng : G\nh : IsComplement S {g}\nx : G\nx✝ : x ∈ ⊤\ny : ↑S × ↑{g}\nhy : (fun x => ↑x.fst * ↑x.snd) y = x * ↑y.snd\n⊢ ↑y.fst ∈ S\n[PROOFSTEP]\nexact y.1.2\n[GOAL]\nG : Type u_1\ninst✝ : Group G\nH K : Subgroup G\nS T : Set G\n⊢ IsComplement ⊤ S ↔ ∃ g, S = {g}\n[PROOFSTEP]\nrefine' ⟨fun h => Set.exists_eq_singleton_iff_nonempty_subsingleton.mpr ⟨_, fun a ha b hb => _⟩, _⟩\n[GOAL]\ncase refine'_1\nG : Type u_1\ninst✝ : Group G\nH K : Subgroup G\nS T : Set G\nh : IsComplement ⊤ S\n⊢ Set.Nonempty S\n[PROOFSTEP]\nobtain ⟨a, _⟩ := h.2 1\n[GOAL]\ncase refine'_1.intro\nG : Type u_1\ninst✝ : Group G\nH K : Subgroup G\nS T : Set G\nh : IsComplement ⊤ S\na : ↑⊤ × ↑S\nh✝ : (fun x => ↑x.fst * ↑x.snd) a = 1\n⊢ Set.Nonempty S\n[PROOFSTEP]\nexact ⟨a.2.1, a.2.2⟩\n[GOAL]\ncase refine'_2\nG : Type u_1\ninst✝ : Group G\nH K : Subgroup G\nS T : Set G\nh : IsComplement ⊤ S\na : G\nha : a ∈ S\nb : G\nhb : b ∈ S\n⊢ a = b\n[PROOFSTEP]\nhave : (⟨⟨_, mem_top a⁻¹⟩, ⟨a, ha⟩⟩ : (⊤ : Set G) × S) = ⟨⟨_, mem_top b⁻¹⟩, ⟨b, hb⟩⟩ :=\n  h.1 ((inv_mul_self a).trans (inv_mul_self b).symm)\n[GOAL]\ncase refine'_2\nG : Type u_1\ninst✝ : Group G\nH K : Subgroup G\nS T : Set G\nh : IsComplement ⊤ S\na : G\nha : a ∈ S\nb : G\nhb : b ∈ S\nthis :\n  ({ val := a⁻¹, property := (_ : a⁻¹ ∈ ⊤) }, { val := a, property := ha }) =\n    ({ val := b⁻¹, property := (_ : b⁻¹ ∈ ⊤) }, { val := b, property := hb })\n⊢ a = b\n[PROOFSTEP]\nexact Subtype.ext_iff.mp (Prod.ext_iff.mp this).2\n[GOAL]\ncase refine'_3\nG : Type u_1\ninst✝ : Group G\nH K : Subgroup G\nS T : Set G\n⊢ (∃ g, S = {g}) → IsComplement ⊤ S\n[PROOFSTEP]\nrintro ⟨g, rfl⟩\n[GOAL]\ncase refine'_3.intro\nG : Type u_1\ninst✝ : Group G\nH K : Subgroup G\nT : Set G\ng : G\n⊢ IsComplement ⊤ {g}\n[PROOFSTEP]\nexact isComplement_top_singleton\n[GOAL]\nG : Type u_1\ninst✝ : Group G\nH K : Subgroup G\nS T : Set G\n⊢ IsComplement S ⊤ ↔ ∃ g, S = {g}\n[PROOFSTEP]\nrefine' ⟨fun h => Set.exists_eq_singleton_iff_nonempty_subsingleton.mpr ⟨_, fun a ha b hb => _⟩, _⟩\n[GOAL]\ncase refine'_1\nG : Type u_1\ninst✝ : Group G\nH K : Subgroup G\nS T : Set G\nh : IsComplement S ⊤\n⊢ Set.Nonempty S\n[PROOFSTEP]\nobtain ⟨a, _⟩ := h.2 1\n[GOAL]\ncase refine'_1.intro\nG : Type u_1\ninst✝ : Group G\nH K : Subgroup G\nS T : Set G\nh : IsComplement S ⊤\na : ↑S × ↑⊤\nh✝ : (fun x => ↑x.fst * ↑x.snd) a = 1\n⊢ Set.Nonempty S\n[PROOFSTEP]\nexact ⟨a.1.1, a.1.2⟩\n[GOAL]\ncase refine'_2\nG : Type u_1\ninst✝ : Group G\nH K : Subgroup G\nS T : Set G\nh : IsComplement S ⊤\na : G\nha : a ∈ S\nb : G\nhb : b ∈ S\n⊢ a = b\n[PROOFSTEP]\nhave : (⟨⟨a, ha⟩, ⟨_, mem_top a⁻¹⟩⟩ : S × (⊤ : Set G)) = ⟨⟨b, hb⟩, ⟨_, mem_top b⁻¹⟩⟩ :=\n  h.1 ((mul_inv_self a).trans (mul_inv_self b).symm)\n[GOAL]\ncase refine'_2\nG : Type u_1\ninst✝ : Group G\nH K : Subgroup G\nS T : Set G\nh : IsComplement S ⊤\na : G\nha : a ∈ S\nb : G\nhb : b ∈ S\nthis :\n  ({ val := a, property := ha }, { val := a⁻¹, property := (_ : a⁻¹ ∈ ⊤) }) =\n    ({ val := b, property := hb }, { val := b⁻¹, property := (_ : b⁻¹ ∈ ⊤) })\n⊢ a = b\n[PROOFSTEP]\nexact Subtype.ext_iff.mp (Prod.ext_iff.mp this).1\n[GOAL]\ncase refine'_3\nG : Type u_1\ninst✝ : Group G\nH K : Subgroup G\nS T : Set G\n⊢ (∃ g, S = {g}) → IsComplement S ⊤\n[PROOFSTEP]\nrintro ⟨g, rfl⟩\n[GOAL]\ncase refine'_3.intro\nG : Type u_1\ninst✝ : Group G\nH K : Subgroup G\nT : Set G\ng : G\n⊢ IsComplement {g} ⊤\n[PROOFSTEP]\nexact isComplement_singleton_top\n[GOAL]\nG : Type u_1\ninst✝ : Group G\nH K : Subgroup G\nS T : Set G\n⊢ S ∈ leftTransversals T ↔ ∀ (g : G), ∃! s, (↑s)⁻¹ * g ∈ T\n[PROOFSTEP]\nrw [leftTransversals, Set.mem_setOf_eq, isComplement_iff_existsUnique]\n[GOAL]\nG : Type u_1\ninst✝ : Group G\nH K : Subgroup G\nS T : Set G\n⊢ (∀ (g : G), ∃! x, ↑x.fst * ↑x.snd = g) ↔ ∀ (g : G), ∃! s, (↑s)⁻¹ * g ∈ T\n[PROOFSTEP]\nrefine' ⟨fun h g => _, fun h g => _⟩\n[GOAL]\ncase refine'_1\nG : Type u_1\ninst✝ : Group G\nH K : Subgroup G\nS T : Set G\nh : ∀ (g : G), ∃! x, ↑x.fst * ↑x.snd = g\ng : G\n⊢ ∃! s, (↑s)⁻¹ * g ∈ T\n[PROOFSTEP]\nobtain ⟨x, h1, h2⟩ := h g\n[GOAL]\ncase refine'_1.intro.intro\nG : Type u_1\ninst✝ : Group G\nH K : Subgroup G\nS T : Set G\nh : ∀ (g : G), ∃! x, ↑x.fst * ↑x.snd = g\ng : G\nx : ↑S × ↑T\nh1 : ↑x.fst * ↑x.snd = g\nh2 : ∀ (y : ↑S × ↑T), (fun x => ↑x.fst * ↑x.snd = g) y → y = x\n⊢ ∃! s, (↑s)⁻¹ * g ∈ T\n[PROOFSTEP]\nexact\n  ⟨x.1, (congr_arg (· ∈ T) (eq_inv_mul_of_mul_eq h1)).mp x.2.2, fun y hy =>\n    (Prod.ext_iff.mp (h2 ⟨y, (↑y)⁻¹ * g, hy⟩ (mul_inv_cancel_left (↑y) g))).1⟩\n[GOAL]\ncase refine'_2\nG : Type u_1\ninst✝ : Group G\nH K : Subgroup G\nS T : Set G\nh : ∀ (g : G), ∃! s, (↑s)⁻¹ * g ∈ T\ng : G\n⊢ ∃! x, ↑x.fst * ↑x.snd = g\n[PROOFSTEP]\nobtain ⟨x, h1, h2⟩ := h g\n[GOAL]\ncase refine'_2.intro.intro\nG : Type u_1\ninst✝ : Group G\nH K : Subgroup G\nS T : Set G\nh : ∀ (g : G), ∃! s, (↑s)⁻¹ * g ∈ T\ng : G\nx : ↑S\nh1 : (↑x)⁻¹ * g ∈ T\nh2 : ∀ (y : ↑S), (fun s => (↑s)⁻¹ * g ∈ T) y → y = x\n⊢ ∃! x, ↑x.fst * ↑x.snd = g\n[PROOFSTEP]\nrefine' ⟨⟨x, (↑x)⁻¹ * g, h1⟩, mul_inv_cancel_left (↑x) g, fun y hy => _⟩\n[GOAL]\ncase refine'_2.intro.intro\nG : Type u_1\ninst✝ : Group G\nH K : Subgroup G\nS T : Set G\nh : ∀ (g : G), ∃! s, (↑s)⁻¹ * g ∈ T\ng : G\nx : ↑S\nh1 : (↑x)⁻¹ * g ∈ T\nh2 : ∀ (y : ↑S), (fun s => (↑s)⁻¹ * g ∈ T) y → y = x\ny : ↑S × ↑T\nhy : (fun x => ↑x.fst * ↑x.snd = g) y\n⊢ y = (x, { val := (↑x)⁻¹ * g, property := h1 })\n[PROOFSTEP]\nhave hf := h2 y.1 ((congr_arg (· ∈ T) (eq_inv_mul_of_mul_eq hy)).mp y.2.2)\n[GOAL]\ncase refine'_2.intro.intro\nG : Type u_1\ninst✝ : Group G\nH K : Subgroup G\nS T : Set G\nh : ∀ (g : G), ∃! s, (↑s)⁻¹ * g ∈ T\ng : G\nx : ↑S\nh1 : (↑x)⁻¹ * g ∈ T\nh2 : ∀ (y : ↑S), (fun s => (↑s)⁻¹ * g ∈ T) y → y = x\ny : ↑S × ↑T\nhy : (fun x => ↑x.fst * ↑x.snd = g) y\nhf : y.fst = x\n⊢ y = (x, { val := (↑x)⁻¹ * g, property := h1 })\n[PROOFSTEP]\nexact Prod.ext hf (Subtype.ext (eq_inv_mul_of_mul_eq (hf ▸ hy)))\n[GOAL]\nG : Type u_1\ninst✝ : Group G\nH K : Subgroup G\nS T : Set G\n⊢ S ∈ rightTransversals T ↔ ∀ (g : G), ∃! s, g * (↑s)⁻¹ ∈ T\n[PROOFSTEP]\nrw [rightTransversals, Set.mem_setOf_eq, isComplement_iff_existsUnique]\n[GOAL]\nG : Type u_1\ninst✝ : Group G\nH K : Subgroup G\nS T : Set G\n⊢ (∀ (g : G), ∃! x, ↑x.fst * ↑x.snd = g) ↔ ∀ (g : G), ∃! s, g * (↑s)⁻¹ ∈ T\n[PROOFSTEP]\nrefine' ⟨fun h g => _, fun h g => _⟩\n[GOAL]\ncase refine'_1\nG : Type u_1\ninst✝ : Group G\nH K : Subgroup G\nS T : Set G\nh : ∀ (g : G), ∃! x, ↑x.fst * ↑x.snd = g\ng : G\n⊢ ∃! s, g * (↑s)⁻¹ ∈ T\n[PROOFSTEP]\nobtain ⟨x, h1, h2⟩ := h g\n[GOAL]\ncase refine'_1.intro.intro\nG : Type u_1\ninst✝ : Group G\nH K : Subgroup G\nS T : Set G\nh : ∀ (g : G), ∃! x, ↑x.fst * ↑x.snd = g\ng : G\nx : ↑T × ↑S\nh1 : ↑x.fst * ↑x.snd = g\nh2 : ∀ (y : ↑T × ↑S), (fun x => ↑x.fst * ↑x.snd = g) y → y = x\n⊢ ∃! s, g * (↑s)⁻¹ ∈ T\n[PROOFSTEP]\nexact\n  ⟨x.2, (congr_arg (· ∈ T) (eq_mul_inv_of_mul_eq h1)).mp x.1.2, fun y hy =>\n    (Prod.ext_iff.mp (h2 ⟨⟨g * (↑y)⁻¹, hy⟩, y⟩ (inv_mul_cancel_right g y))).2⟩\n[GOAL]\ncase refine'_2\nG : Type u_1\ninst✝ : Group G\nH K : Subgroup G\nS T : Set G\nh : ∀ (g : G), ∃! s, g * (↑s)⁻¹ ∈ T\ng : G\n⊢ ∃! x, ↑x.fst * ↑x.snd = g\n[PROOFSTEP]\nobtain ⟨x, h1, h2⟩ := h g\n[GOAL]\ncase refine'_2.intro.intro\nG : Type u_1\ninst✝ : Group G\nH K : Subgroup G\nS T : Set G\nh : ∀ (g : G), ∃! s, g * (↑s)⁻¹ ∈ T\ng : G\nx : ↑S\nh1 : g * (↑x)⁻¹ ∈ T\nh2 : ∀ (y : ↑S), (fun s => g * (↑s)⁻¹ ∈ T) y → y = x\n⊢ ∃! x, ↑x.fst * ↑x.snd = g\n[PROOFSTEP]\nrefine' ⟨⟨⟨g * (↑x)⁻¹, h1⟩, x⟩, inv_mul_cancel_right g x, fun y hy => _⟩\n[GOAL]\ncase refine'_2.intro.intro\nG : Type u_1\ninst✝ : Group G\nH K : Subgroup G\nS T : Set G\nh : ∀ (g : G), ∃! s, g * (↑s)⁻¹ ∈ T\ng : G\nx : ↑S\nh1 : g * (↑x)⁻¹ ∈ T\nh2 : ∀ (y : ↑S), (fun s => g * (↑s)⁻¹ ∈ T) y → y = x\ny : ↑T × ↑S\nhy : (fun x => ↑x.fst * ↑x.snd = g) y\n⊢ y = ({ val := g * (↑x)⁻¹, property := h1 }, x)\n[PROOFSTEP]\nhave hf := h2 y.2 ((congr_arg (· ∈ T) (eq_mul_inv_of_mul_eq hy)).mp y.1.2)\n[GOAL]\ncase refine'_2.intro.intro\nG : Type u_1\ninst✝ : Group G\nH K : Subgroup G\nS T : Set G\nh : ∀ (g : G), ∃! s, g * (↑s)⁻¹ ∈ T\ng : G\nx : ↑S\nh1 : g * (↑x)⁻¹ ∈ T\nh2 : ∀ (y : ↑S), (fun s => g * (↑s)⁻¹ ∈ T) y → y = x\ny : ↑T × ↑S\nhy : (fun x => ↑x.fst * ↑x.snd = g) y\nhf : y.snd = x\n⊢ y = ({ val := g * (↑x)⁻¹, property := h1 }, x)\n[PROOFSTEP]\nexact Prod.ext (Subtype.ext (eq_mul_inv_of_mul_eq (hf ▸ hy))) hf\n[GOAL]\nG : Type u_1\ninst✝ : Group G\nH K : Subgroup G\nS T : Set G\n⊢ S ∈ leftTransversals ↑H ↔ ∀ (q : Quotient (QuotientGroup.leftRel H)), ∃! s, Quotient.mk'' ↑s = q\n[PROOFSTEP]\nsimp_rw [mem_leftTransversals_iff_existsUnique_inv_mul_mem, SetLike.mem_coe, ← QuotientGroup.eq']\n[GOAL]\nG : Type u_1\ninst✝ : Group G\nH K : Subgroup G\nS T : Set G\n⊢ (∀ (g : G), ∃! s, ↑↑s = ↑g) ↔ ∀ (q : Quotient (QuotientGroup.leftRel H)), ∃! s, Quotient.mk'' ↑s = q\n[PROOFSTEP]\nexact ⟨fun h q => Quotient.inductionOn' q h, fun h g => h (Quotient.mk'' g)⟩\n[GOAL]\nG : Type u_1\ninst✝ : Group G\nH K : Subgroup G\nS T : Set G\n⊢ S ∈ rightTransversals ↑H ↔ ∀ (q : Quotient (QuotientGroup.rightRel H)), ∃! s, Quotient.mk'' ↑s = q\n[PROOFSTEP]\nsimp_rw [mem_rightTransversals_iff_existsUnique_mul_inv_mem, SetLike.mem_coe, ← QuotientGroup.rightRel_apply, ←\n  Quotient.eq'']\n[GOAL]\nG : Type u_1\ninst✝ : Group G\nH K : Subgroup G\nS T : Set G\n⊢ (∀ (g : G), ∃! s, Quotient.mk'' ↑s = Quotient.mk'' g) ↔\n    ∀ (q : Quotient (QuotientGroup.rightRel H)), ∃! s, Quotient.mk'' ↑s = q\n[PROOFSTEP]\nexact ⟨fun h q => Quotient.inductionOn' q h, fun h g => h (Quotient.mk'' g)⟩\n[GOAL]\nG : Type u_1\ninst✝ : Group G\nH K : Subgroup G\nS T : Set G\nf : G ⧸ H → G\nhf : ∀ (q : G ⧸ H), ↑(f q) = q\n⊢ Function.Injective (Set.restrict (Set.range f) Quotient.mk'')\n[PROOFSTEP]\nrintro ⟨-, q₁, rfl⟩ ⟨-, q₂, rfl⟩ h\n[GOAL]\ncase mk.intro.mk.intro\nG : Type u_1\ninst✝ : Group G\nH K : Subgroup G\nS T : Set G\nf : G ⧸ H → G\nhf : ∀ (q : G ⧸ H), ↑(f q) = q\nq₁ q₂ : G ⧸ H\nh :\n  Set.restrict (Set.range f) Quotient.mk'' { val := f q₁, property := (_ : ∃ y, f y = f q₁) } =\n    Set.restrict (Set.range f) Quotient.mk'' { val := f q₂, property := (_ : ∃ y, f y = f q₂) }\n⊢ { val := f q₁, property := (_ : ∃ y, f y = f q₁) } = { val := f q₂, property := (_ : ∃ y, f y = f q₂) }\n[PROOFSTEP]\nexact Subtype.ext $ congr_arg f $ ((hf q₁).symm.trans h).trans (hf q₂)\n[GOAL]\nG : Type u_1\ninst✝ : Group G\nH K : Subgroup G\nS T : Set G\nf : Quotient (QuotientGroup.rightRel H) → G\nhf : ∀ (q : Quotient (QuotientGroup.rightRel H)), Quotient.mk'' (f q) = q\n⊢ Function.Injective (Set.restrict (Set.range f) Quotient.mk'')\n[PROOFSTEP]\nrintro ⟨-, q₁, rfl⟩ ⟨-, q₂, rfl⟩ h\n[GOAL]\ncase mk.intro.mk.intro\nG : Type u_1\ninst✝ : Group G\nH K : Subgroup G\nS T : Set G\nf : Quotient (QuotientGroup.rightRel H) → G\nhf : ∀ (q : Quotient (QuotientGroup.rightRel H)), Quotient.mk'' (f q) = q\nq₁ q₂ : Quotient (QuotientGroup.rightRel H)\nh :\n  Set.restrict (Set.range f) Quotient.mk'' { val := f q₁, property := (_ : ∃ y, f y = f q₁) } =\n    Set.restrict (Set.range f) Quotient.mk'' { val := f q₂, property := (_ : ∃ y, f y = f q₂) }\n⊢ { val := f q₁, property := (_ : ∃ y, f y = f q₁) } = { val := f q₂, property := (_ : ∃ y, f y = f q₂) }\n[PROOFSTEP]\nexact Subtype.ext $ congr_arg f $ ((hf q₁).symm.trans h).trans (hf q₂)\n[GOAL]\nG : Type u_1\ninst✝ : Group G\nH K : Subgroup G\nS T : Set G\ng : G\n⊢ ∃ S, S ∈ leftTransversals ↑H ∧ g ∈ S\n[PROOFSTEP]\nclassical\nrefine'\n  ⟨Set.range (Function.update Quotient.out' _ g), range_mem_leftTransversals fun q => _, Quotient.mk'' g,\n    Function.update_same (Quotient.mk'' g) g Quotient.out'⟩\nby_cases hq : q = Quotient.mk'' g\n· exact hq.symm ▸ congr_arg _ (Function.update_same (Quotient.mk'' g) g Quotient.out')\n· refine' (Function.update_noteq _ g Quotient.out') ▸ q.out_eq'\n  exact hq\n[GOAL]\nG : Type u_1\ninst✝ : Group G\nH K : Subgroup G\nS T : Set G\ng : G\n⊢ ∃ S, S ∈ leftTransversals ↑H ∧ g ∈ S\n[PROOFSTEP]\nrefine'\n  ⟨Set.range (Function.update Quotient.out' _ g), range_mem_leftTransversals fun q => _, Quotient.mk'' g,\n    Function.update_same (Quotient.mk'' g) g Quotient.out'⟩\n[GOAL]\nG : Type u_1\ninst✝ : Group G\nH K : Subgroup G\nS T : Set G\ng : G\nq : G ⧸ H\n⊢ ↑(Function.update Quotient.out' (Quotient.mk'' g) g q) = q\n[PROOFSTEP]\nby_cases hq : q = Quotient.mk'' g\n[GOAL]\ncase pos\nG : Type u_1\ninst✝ : Group G\nH K : Subgroup G\nS T : Set G\ng : G\nq : G ⧸ H\nhq : q = Quotient.mk'' g\n⊢ ↑(Function.update Quotient.out' (Quotient.mk'' g) g q) = q\n[PROOFSTEP]\nexact hq.symm ▸ congr_arg _ (Function.update_same (Quotient.mk'' g) g Quotient.out')\n[GOAL]\ncase neg\nG : Type u_1\ninst✝ : Group G\nH K : Subgroup G\nS T : Set G\ng : G\nq : G ⧸ H\nhq : ¬q = Quotient.mk'' g\n⊢ ↑(Function.update Quotient.out' (Quotient.mk'' g) g q) = q\n[PROOFSTEP]\nrefine' (Function.update_noteq _ g Quotient.out') ▸ q.out_eq'\n[GOAL]\ncase neg\nG : Type u_1\ninst✝ : Group G\nH K : Subgroup G\nS T : Set G\ng : G\nq : G ⧸ H\nhq : ¬q = Quotient.mk'' g\n⊢ q ≠ Quotient.mk'' g\n[PROOFSTEP]\nexact hq\n[GOAL]\nG : Type u_1\ninst✝ : Group G\nH K : Subgroup G\nS T : Set G\ng : G\n⊢ ∃ S, S ∈ rightTransversals ↑H ∧ g ∈ S\n[PROOFSTEP]\nclassical\nrefine'\n  ⟨Set.range (Function.update Quotient.out' _ g), range_mem_rightTransversals fun q => _, Quotient.mk'' g,\n    Function.update_same (Quotient.mk'' g) g Quotient.out'⟩\nby_cases hq : q = Quotient.mk'' g\n· exact hq.symm ▸ congr_arg _ (Function.update_same (Quotient.mk'' g) g Quotient.out')\n· exact Eq.trans (congr_arg _ (Function.update_noteq hq g Quotient.out')) q.out_eq'\n[GOAL]\nG : Type u_1\ninst✝ : Group G\nH K : Subgroup G\nS T : Set G\ng : G\n⊢ ∃ S, S ∈ rightTransversals ↑H ∧ g ∈ S\n[PROOFSTEP]\nrefine'\n  ⟨Set.range (Function.update Quotient.out' _ g), range_mem_rightTransversals fun q => _, Quotient.mk'' g,\n    Function.update_same (Quotient.mk'' g) g Quotient.out'⟩\n[GOAL]\nG : Type u_1\ninst✝ : Group G\nH K : Subgroup G\nS T : Set G\ng : G\nq : Quotient (QuotientGroup.rightRel H)\n⊢ Quotient.mk'' (Function.update Quotient.out' (Quotient.mk'' g) g q) = q\n[PROOFSTEP]\nby_cases hq : q = Quotient.mk'' g\n[GOAL]\ncase pos\nG : Type u_1\ninst✝ : Group G\nH K : Subgroup G\nS T : Set G\ng : G\nq : Quotient (QuotientGroup.rightRel H)\nhq : q = Quotient.mk'' g\n⊢ Quotient.mk'' (Function.update Quotient.out' (Quotient.mk'' g) g q) = q\n[PROOFSTEP]\nexact hq.symm ▸ congr_arg _ (Function.update_same (Quotient.mk'' g) g Quotient.out')\n[GOAL]\ncase neg\nG : Type u_1\ninst✝ : Group G\nH K : Subgroup G\nS T : Set G\ng : G\nq : Quotient (QuotientGroup.rightRel H)\nhq : ¬q = Quotient.mk'' g\n⊢ Quotient.mk'' (Function.update Quotient.out' (Quotient.mk'' g) g q) = q\n[PROOFSTEP]\nexact Eq.trans (congr_arg _ (Function.update_noteq hq g Quotient.out')) q.out_eq'\n[GOAL]\nG : Type u_1\ninst✝ : Group G\nH K : Subgroup G\nS T : Set G\nf : G ⧸ H → G\nhf : ∀ (q : G ⧸ H), ↑(f q) = q\nq : G ⧸ H\n⊢ ↑(↑(toEquiv (_ : (Set.range fun q => f q) ∈ leftTransversals ↑H)) q) = f q\n[PROOFSTEP]\nrefine' (Subtype.ext_iff.mp _).trans (Subtype.coe_mk (f q) ⟨q, rfl⟩)\n[GOAL]\nG : Type u_1\ninst✝ : Group G\nH K : Subgroup G\nS T : Set G\nf : G ⧸ H → G\nhf : ∀ (q : G ⧸ H), ↑(f q) = q\nq : G ⧸ H\n⊢ ↑(toEquiv (_ : (Set.range fun q => f q) ∈ leftTransversals ↑H)) q =\n    { val := f q, property := (_ : ∃ y, (fun q => f q) y = f q) }\n[PROOFSTEP]\nexact (toEquiv (range_mem_leftTransversals hf)).apply_eq_iff_eq_symm_apply.mpr (hf q).symm\n[GOAL]\nG : Type u_1\ninst✝ : Group G\nH K : Subgroup G\nS T : Set G\nhS : S ∈ leftTransversals ↑H\ng : G\n⊢ ((↑(toFun hS g))⁻¹ * g)⁻¹ = g⁻¹ * ↑(toFun hS g)\n[PROOFSTEP]\nrw [mul_inv_rev, inv_inv]\n[GOAL]\nG : Type u_1\ninst✝ : Group G\nH K : Subgroup G\nS T : Set G\nf : Quotient (QuotientGroup.rightRel H) → G\nhf : ∀ (q : Quotient (QuotientGroup.rightRel H)), Quotient.mk'' (f q) = q\nq : Quotient (QuotientGroup.rightRel H)\n⊢ ↑(↑(toEquiv (_ : (Set.range fun q => f q) ∈ rightTransversals ↑H)) q) = f q\n[PROOFSTEP]\nrefine' (Subtype.ext_iff.mp _).trans (Subtype.coe_mk (f q) ⟨q, rfl⟩)\n[GOAL]\nG : Type u_1\ninst✝ : Group G\nH K : Subgroup G\nS T : Set G\nf : Quotient (QuotientGroup.rightRel H) → G\nhf : ∀ (q : Quotient (QuotientGroup.rightRel H)), Quotient.mk'' (f q) = q\nq : Quotient (QuotientGroup.rightRel H)\n⊢ ↑(toEquiv (_ : (Set.range fun q => f q) ∈ rightTransversals ↑H)) q =\n    { val := f q, property := (_ : ∃ y, (fun q => f q) y = f q) }\n[PROOFSTEP]\nexact (toEquiv (range_mem_rightTransversals hf)).apply_eq_iff_eq_symm_apply.mpr (hf q).symm\n[GOAL]\nG : Type u_1\ninst✝ : Group G\nH K : Subgroup G\nS T : Set G\nhS : S ∈ rightTransversals ↑H\ng : G\n⊢ (g * (↑(toFun hS g))⁻¹)⁻¹ = ↑(toFun hS g) * g⁻¹\n[PROOFSTEP]\nrw [mul_inv_rev, inv_inv]\n[GOAL]\nG : Type u_1\ninst✝³ : Group G\nH K : Subgroup G\nS T✝ : Set G\nF : Type u_2\ninst✝² : Group F\ninst✝¹ : MulAction F G\ninst✝ : QuotientAction F H\nf : F\nT : ↑(leftTransversals ↑H)\n⊢ f • ↑T ∈ leftTransversals ↑H\n[PROOFSTEP]\nrefine' mem_leftTransversals_iff_existsUnique_inv_mul_mem.mpr fun g => _\n[GOAL]\nG : Type u_1\ninst✝³ : Group G\nH K : Subgroup G\nS T✝ : Set G\nF : Type u_2\ninst✝² : Group F\ninst✝¹ : MulAction F G\ninst✝ : QuotientAction F H\nf : F\nT : ↑(leftTransversals ↑H)\ng : G\n⊢ ∃! s, (↑s)⁻¹ * g ∈ ↑H\n[PROOFSTEP]\nobtain ⟨t, ht1, ht2⟩ := mem_leftTransversals_iff_existsUnique_inv_mul_mem.mp T.2 (f⁻¹ • g)\n[GOAL]\ncase intro.intro\nG : Type u_1\ninst✝³ : Group G\nH K : Subgroup G\nS T✝ : Set G\nF : Type u_2\ninst✝² : Group F\ninst✝¹ : MulAction F G\ninst✝ : QuotientAction F H\nf : F\nT : ↑(leftTransversals ↑H)\ng : G\nt : ↑↑T\nht1 : (↑t)⁻¹ * f⁻¹ • g ∈ ↑H\nht2 : ∀ (y : ↑↑T), (fun s => (↑s)⁻¹ * f⁻¹ • g ∈ ↑H) y → y = t\n⊢ ∃! s, (↑s)⁻¹ * g ∈ ↑H\n[PROOFSTEP]\nrefine' ⟨⟨f • (t : G), Set.smul_mem_smul_set t.2⟩, _, _⟩\n[GOAL]\ncase intro.intro.refine'_1\nG : Type u_1\ninst✝³ : Group G\nH K : Subgroup G\nS T✝ : Set G\nF : Type u_2\ninst✝² : Group F\ninst✝¹ : MulAction F G\ninst✝ : QuotientAction F H\nf : F\nT : ↑(leftTransversals ↑H)\ng : G\nt : ↑↑T\nht1 : (↑t)⁻¹ * f⁻¹ • g ∈ ↑H\nht2 : ∀ (y : ↑↑T), (fun s => (↑s)⁻¹ * f⁻¹ • g ∈ ↑H) y → y = t\n⊢ (fun s => (↑s)⁻¹ * g ∈ ↑H) { val := f • ↑t, property := (_ : f • ↑t ∈ f • ↑T) }\n[PROOFSTEP]\nexact smul_inv_smul f g ▸ QuotientAction.inv_mul_mem f ht1\n[GOAL]\ncase intro.intro.refine'_2\nG : Type u_1\ninst✝³ : Group G\nH K : Subgroup G\nS T✝ : Set G\nF : Type u_2\ninst✝² : Group F\ninst✝¹ : MulAction F G\ninst✝ : QuotientAction F H\nf : F\nT : ↑(leftTransversals ↑H)\ng : G\nt : ↑↑T\nht1 : (↑t)⁻¹ * f⁻¹ • g ∈ ↑H\nht2 : ∀ (y : ↑↑T), (fun s => (↑s)⁻¹ * f⁻¹ • g ∈ ↑H) y → y = t\n⊢ ∀ (y : ↑(f • ↑T)), (fun s => (↑s)⁻¹ * g ∈ ↑H) y → y = { val := f • ↑t, property := (_ : f • ↑t ∈ f • ↑T) }\n[PROOFSTEP]\nrintro ⟨-, t', ht', rfl⟩ h\n[GOAL]\ncase intro.intro.refine'_2.mk.intro.intro\nG : Type u_1\ninst✝³ : Group G\nH K : Subgroup G\nS T✝ : Set G\nF : Type u_2\ninst✝² : Group F\ninst✝¹ : MulAction F G\ninst✝ : QuotientAction F H\nf : F\nT : ↑(leftTransversals ↑H)\ng : G\nt : ↑↑T\nht1 : (↑t)⁻¹ * f⁻¹ • g ∈ ↑H\nht2 : ∀ (y : ↑↑T), (fun s => (↑s)⁻¹ * f⁻¹ • g ∈ ↑H) y → y = t\nt' : G\nht' : t' ∈ ↑T\nh :\n  (↑{ val := (fun x => f • x) t', property := (_ : ∃ a, a ∈ ↑T ∧ (fun x => f • x) a = (fun x => f • x) t') })⁻¹ * g ∈ ↑H\n⊢ { val := (fun x => f • x) t', property := (_ : ∃ a, a ∈ ↑T ∧ (fun x => f • x) a = (fun x => f • x) t') } =\n    { val := f • ↑t, property := (_ : f • ↑t ∈ f • ↑T) }\n[PROOFSTEP]\nreplace h := QuotientAction.inv_mul_mem f⁻¹ h\n[GOAL]\ncase intro.intro.refine'_2.mk.intro.intro\nG : Type u_1\ninst✝³ : Group G\nH K : Subgroup G\nS T✝ : Set G\nF : Type u_2\ninst✝² : Group F\ninst✝¹ : MulAction F G\ninst✝ : QuotientAction F H\nf : F\nT : ↑(leftTransversals ↑H)\ng : G\nt : ↑↑T\nht1 : (↑t)⁻¹ * f⁻¹ • g ∈ ↑H\nht2 : ∀ (y : ↑↑T), (fun s => (↑s)⁻¹ * f⁻¹ • g ∈ ↑H) y → y = t\nt' : G\nht' : t' ∈ ↑T\nh :\n  (f⁻¹ • ↑{ val := (fun x => f • x) t', property := (_ : ∃ a, a ∈ ↑T ∧ (fun x => f • x) a = (fun x => f • x) t') })⁻¹ *\n      f⁻¹ • g ∈\n    H\n⊢ { val := (fun x => f • x) t', property := (_ : ∃ a, a ∈ ↑T ∧ (fun x => f • x) a = (fun x => f • x) t') } =\n    { val := f • ↑t, property := (_ : f • ↑t ∈ f • ↑T) }\n[PROOFSTEP]\nsimp only [Subtype.ext_iff, Subtype.coe_mk, smul_left_cancel_iff, inv_smul_smul] at h ⊢\n[GOAL]\ncase intro.intro.refine'_2.mk.intro.intro\nG : Type u_1\ninst✝³ : Group G\nH K : Subgroup G\nS T✝ : Set G\nF : Type u_2\ninst✝² : Group F\ninst✝¹ : MulAction F G\ninst✝ : QuotientAction F H\nf : F\nT : ↑(leftTransversals ↑H)\ng : G\nt : ↑↑T\nht1 : (↑t)⁻¹ * f⁻¹ • g ∈ ↑H\nht2 : ∀ (y : ↑↑T), (fun s => (↑s)⁻¹ * f⁻¹ • g ∈ ↑H) y → y = t\nt' : G\nht' : t' ∈ ↑T\nh : t'⁻¹ * f⁻¹ • g ∈ H\n⊢ t' = ↑t\n[PROOFSTEP]\nexact Subtype.ext_iff.mp (ht2 ⟨t', ht'⟩ h)\n[GOAL]\nG : Type u_1\ninst✝³ : Group G\nH K : Subgroup G\nS T✝ : Set G\nF : Type u_2\ninst✝² : Group F\ninst✝¹ : MulAction F G\ninst✝ : QuotientAction F H\nf : F\nT : ↑(leftTransversals ↑H)\nq : G ⧸ H\n⊢ ↑(↑(toEquiv (_ : ↑(f • T) ∈ leftTransversals ↑H)) q) = f • ↑(↑(toEquiv (_ : ↑T ∈ leftTransversals ↑H)) (f⁻¹ • q))\n[PROOFSTEP]\nrw [smul_toEquiv, smul_inv_smul]\n[GOAL]\nG : Type u_1\ninst✝ : Group G\nH K : Subgroup G\nS T : Set G\nh : IsComplement' H K\n⊢ IsCompl H K\n[PROOFSTEP]\nrefine'\n  ⟨disjoint_iff_inf_le.mpr fun g ⟨p, q⟩ =>\n      let x : H × K := ⟨⟨g, p⟩, 1⟩\n      let y : H × K := ⟨1, g, q⟩\n      Subtype.ext_iff.mp (Prod.ext_iff.mp (show x = y from h.1 ((mul_one g).trans (one_mul g).symm))).1,\n    codisjoint_iff_le_sup.mpr fun g _ => _⟩\n[GOAL]\nG : Type u_1\ninst✝ : Group G\nH K : Subgroup G\nS T : Set G\nh : IsComplement' H K\ng : G\nx✝ : g ∈ ⊤\n⊢ g ∈ H ⊔ K\n[PROOFSTEP]\nobtain ⟨⟨h, k⟩, rfl⟩ := h.2 g\n[GOAL]\ncase intro.mk\nG : Type u_1\ninst✝ : Group G\nH K : Subgroup G\nS T : Set G\nh✝ : IsComplement' H K\nh : ↑↑H\nk : ↑↑K\nx✝ : (fun x => ↑x.fst * ↑x.snd) (h, k) ∈ ⊤\n⊢ (fun x => ↑x.fst * ↑x.snd) (h, k) ∈ H ⊔ K\n[PROOFSTEP]\nexact Subgroup.mul_mem_sup h.2 k.2\n[GOAL]\nG : Type u_1\ninst✝ : Group G\nH K : Subgroup G\nS T : Set G\nh1 : Disjoint H K\nh2 : ↑H * ↑K = Set.univ\n⊢ IsComplement' H K\n[PROOFSTEP]\nrefine' ⟨mul_injective_of_disjoint h1, fun g => _⟩\n[GOAL]\nG : Type u_1\ninst✝ : Group G\nH K : Subgroup G\nS T : Set G\nh1 : Disjoint H K\nh2 : ↑H * ↑K = Set.univ\ng : G\n⊢ ∃ a, (fun x => ↑x.fst * ↑x.snd) a = g\n[PROOFSTEP]\nobtain ⟨h, k, hh, hk, hg⟩ := Set.eq_univ_iff_forall.mp h2 g\n[GOAL]\ncase intro.intro.intro.intro\nG : Type u_1\ninst✝ : Group G\nH K : Subgroup G\nS T : Set G\nh1 : Disjoint H K\nh2 : ↑H * ↑K = Set.univ\ng h k : G\nhh : h ∈ ↑H\nhk : k ∈ ↑K\nhg : (fun x x_1 => x * x_1) h k = g\n⊢ ∃ a, (fun x => ↑x.fst * ↑x.snd) a = g\n[PROOFSTEP]\nexact ⟨(⟨h, hh⟩, ⟨k, hk⟩), hg⟩\n[GOAL]\nG : Type u_1\ninst✝¹ : Group G\nH K : Subgroup G\nS T : Set G\nα : Type u_2\ninst✝ : MulAction G α\na : α\nh1 : ∀ (h : { x // x ∈ H }), h • a = a → h = 1\nh2 : ∀ (g : G), ∃ h, h • g • a = a\n⊢ IsComplement' H (MulAction.stabilizer G a)\n[PROOFSTEP]\nrefine' isComplement_iff_existsUnique.mpr fun g => _\n[GOAL]\nG : Type u_1\ninst✝¹ : Group G\nH K : Subgroup G\nS T : Set G\nα : Type u_2\ninst✝ : MulAction G α\na : α\nh1 : ∀ (h : { x // x ∈ H }), h • a = a → h = 1\nh2 : ∀ (g : G), ∃ h, h • g • a = a\ng : G\n⊢ ∃! x, ↑x.fst * ↑x.snd = g\n[PROOFSTEP]\nobtain ⟨h, hh⟩ := h2 g\n[GOAL]\ncase intro\nG : Type u_1\ninst✝¹ : Group G\nH K : Subgroup G\nS T : Set G\nα : Type u_2\ninst✝ : MulAction G α\na : α\nh1 : ∀ (h : { x // x ∈ H }), h • a = a → h = 1\nh2 : ∀ (g : G), ∃ h, h • g • a = a\ng : G\nh : { x // x ∈ H }\nhh : h • g • a = a\n⊢ ∃! x, ↑x.fst * ↑x.snd = g\n[PROOFSTEP]\nhave hh' : (↑h * g) • a = a := by rwa [mul_smul]\n[GOAL]\nG : Type u_1\ninst✝¹ : Group G\nH K : Subgroup G\nS T : Set G\nα : Type u_2\ninst✝ : MulAction G α\na : α\nh1 : ∀ (h : { x // x ∈ H }), h • a = a → h = 1\nh2 : ∀ (g : G), ∃ h, h • g • a = a\ng : G\nh : { x // x ∈ H }\nhh : h • g • a = a\n⊢ (↑h * g) • a = a\n[PROOFSTEP]\nrwa [mul_smul]\n[GOAL]\ncase intro\nG : Type u_1\ninst✝¹ : Group G\nH K : Subgroup G\nS T : Set G\nα : Type u_2\ninst✝ : MulAction G α\na : α\nh1 : ∀ (h : { x // x ∈ H }), h • a = a → h = 1\nh2 : ∀ (g : G), ∃ h, h • g • a = a\ng : G\nh : { x // x ∈ H }\nhh : h • g • a = a\nhh' : (↑h * g) • a = a\n⊢ ∃! x, ↑x.fst * ↑x.snd = g\n[PROOFSTEP]\nrefine' ⟨⟨h⁻¹, h * g, hh'⟩, inv_mul_cancel_left (↑h) g, _⟩\n[GOAL]\ncase intro\nG : Type u_1\ninst✝¹ : Group G\nH K : Subgroup G\nS T : Set G\nα : Type u_2\ninst✝ : MulAction G α\na : α\nh1 : ∀ (h : { x // x ∈ H }), h • a = a → h = 1\nh2 : ∀ (g : G), ∃ h, h • g • a = a\ng : G\nh : { x // x ∈ H }\nhh : h • g • a = a\nhh' : (↑h * g) • a = a\n⊢ ∀ (y : ↑↑H × ↑↑(MulAction.stabilizer G a)),\n    (fun x => ↑x.fst * ↑x.snd = g) y → y = (h⁻¹, { val := ↑h * g, property := hh' })\n[PROOFSTEP]\nrintro ⟨h', g, hg : g • a = a⟩ rfl\n[GOAL]\ncase intro.mk.mk\nG : Type u_1\ninst✝¹ : Group G\nH K : Subgroup G\nS T : Set G\nα : Type u_2\ninst✝ : MulAction G α\na : α\nh1 : ∀ (h : { x // x ∈ H }), h • a = a → h = 1\nh2 : ∀ (g : G), ∃ h, h • g • a = a\nh : { x // x ∈ H }\nh' : ↑↑H\ng : G\nhg : g • a = a\nhh : h • (↑(h', { val := g, property := hg }).fst * ↑(h', { val := g, property := hg }).snd) • a = a\nhh' : (↑h * (↑(h', { val := g, property := hg }).fst * ↑(h', { val := g, property := hg }).snd)) • a = a\n⊢ (h', { val := g, property := hg }) =\n    (h⁻¹,\n      { val := ↑h * (↑(h', { val := g, property := hg }).fst * ↑(h', { val := g, property := hg }).snd),\n        property := hh' })\n[PROOFSTEP]\nspecialize h1 (h * h') (by rwa [mul_smul, smul_def h', ← hg, ← mul_smul, hg])\n[GOAL]\nG : Type u_1\ninst✝¹ : Group G\nH K : Subgroup G\nS T : Set G\nα : Type u_2\ninst✝ : MulAction G α\na : α\nh1 : ∀ (h : { x // x ∈ H }), h • a = a → h = 1\nh2 : ∀ (g : G), ∃ h, h • g • a = a\nh : { x // x ∈ H }\nh' : ↑↑H\ng : G\nhg : g • a = a\nhh : h • (↑(h', { val := g, property := hg }).fst * ↑(h', { val := g, property := hg }).snd) • a = a\nhh' : (↑h * (↑(h', { val := g, property := hg }).fst * ↑(h', { val := g, property := hg }).snd)) • a = a\n⊢ (h * h') • a = a\n[PROOFSTEP]\nrwa [mul_smul, smul_def h', ← hg, ← mul_smul, hg]\n[GOAL]\ncase intro.mk.mk\nG : Type u_1\ninst✝¹ : Group G\nH K : Subgroup G\nS T : Set G\nα : Type u_2\ninst✝ : MulAction G α\na : α\nh2 : ∀ (g : G), ∃ h, h • g • a = a\nh : { x // x ∈ H }\nh' : ↑↑H\ng : G\nhg : g • a = a\nhh : h • (↑(h', { val := g, property := hg }).fst * ↑(h', { val := g, property := hg }).snd) • a = a\nhh' : (↑h * (↑(h', { val := g, property := hg }).fst * ↑(h', { val := g, property := hg }).snd)) • a = a\nh1 : h * h' = 1\n⊢ (h', { val := g, property := hg }) =\n    (h⁻¹,\n      { val := ↑h * (↑(h', { val := g, property := hg }).fst * ↑(h', { val := g, property := hg }).snd),\n        property := hh' })\n[PROOFSTEP]\nrefine' Prod.ext (eq_inv_of_mul_eq_one_right h1) (Subtype.ext _)\n[GOAL]\ncase intro.mk.mk\nG : Type u_1\ninst✝¹ : Group G\nH K : Subgroup G\nS T : Set G\nα : Type u_2\ninst✝ : MulAction G α\na : α\nh2 : ∀ (g : G), ∃ h, h • g • a = a\nh : { x // x ∈ H }\nh' : ↑↑H\ng : G\nhg : g • a = a\nhh : h • (↑(h', { val := g, property := hg }).fst * ↑(h', { val := g, property := hg }).snd) • a = a\nhh' : (↑h * (↑(h', { val := g, property := hg }).fst * ↑(h', { val := g, property := hg }).snd)) • a = a\nh1 : h * h' = 1\n⊢ ↑(h', { val := g, property := hg }).snd =\n    ↑(h⁻¹,\n          { val := ↑h * (↑(h', { val := g, property := hg }).fst * ↑(h', { val := g, property := hg }).snd),\n            property := hh' }).snd\n[PROOFSTEP]\nrwa [Subtype.ext_iff, coe_one, coe_mul, ← self_eq_mul_left, mul_assoc (↑h) (↑h') g] at h1 \n[GOAL]\nG : Type u\ninst✝ : Group G\nH : Subgroup G\ng : G\nq : orbitRel.Quotient { x // x ∈ zpowers g } (G ⧸ H)\nk : ℤ\n⊢ ↑(quotientEquivSigmaZMod H g) (g ^ k • Quotient.out' q) = { fst := q, snd := ↑k }\n[PROOFSTEP]\nrw [apply_eq_iff_eq_symm_apply, quotientEquivSigmaZMod_symm_apply, ZMod.coe_int_cast, zpow_smul_mod_minimalPeriod]\n[GOAL]\nG : Type u\ninst✝ : Group G\nH : Subgroup G\ng : G\nq : G ⧸ H\n⊢ ↑(transferFunction H g q) = q\n[PROOFSTEP]\nrw [transferFunction_apply, ← smul_eq_mul, Quotient.coe_smul_out', ← quotientEquivSigmaZMod_symm_apply, Sigma.eta,\n  symm_apply_apply]\n[GOAL]\nG : Type u\ninst✝ : Group G\nH : Subgroup G\ng : G\nq : orbitRel.Quotient { x // x ∈ zpowers g } (G ⧸ H)\nk : ZMod (minimalPeriod ((fun x x_1 => x • x_1) g) (Quotient.out' q))\n⊢ ↑(↑(toEquiv (_ : ↑(transferTransversal H g) ∈ leftTransversals ↑H)) (g ^ ↑k • Quotient.out' q)) =\n    g ^ ↑k * Quotient.out' (Quotient.out' q)\n[PROOFSTEP]\nrw [transferTransversal_apply, transferFunction_apply, ← quotientEquivSigmaZMod_symm_apply, apply_symm_apply]\n[GOAL]\nG : Type u\ninst✝ : Group G\nH : Subgroup G\ng : G\nq : orbitRel.Quotient { x // x ∈ zpowers g } (G ⧸ H)\nk : ZMod (minimalPeriod ((fun x x_1 => x • x_1) g) (Quotient.out' q))\n⊢ ↑(↑(toEquiv (_ : ↑(g • transferTransversal H g) ∈ leftTransversals ↑H)) (g ^ ↑k • Quotient.out' q)) =\n    if k = 0 then g ^ minimalPeriod ((fun x x_1 => x • x_1) g) (Quotient.out' q) * Quotient.out' (Quotient.out' q)\n    else g ^ ↑k * Quotient.out' (Quotient.out' q)\n[PROOFSTEP]\nrw [smul_apply_eq_smul_apply_inv_smul, transferTransversal_apply, transferFunction_apply, ← mul_smul, ← zpow_neg_one, ←\n  zpow_add, quotientEquivSigmaZMod_apply, smul_eq_mul, ← mul_assoc, ← zpow_one_add, Int.cast_add, Int.cast_neg,\n  Int.cast_one, int_cast_cast, cast_id', id.def, ← sub_eq_neg_add, cast_sub_one, add_sub_cancel'_right]\n[GOAL]\nG : Type u\ninst✝ : Group G\nH : Subgroup G\ng : G\nq : orbitRel.Quotient { x // x ∈ zpowers g } (G ⧸ H)\nk : ZMod (minimalPeriod ((fun x x_1 => x • x_1) g) (Quotient.out' q))\n⊢ (g ^\n        if k = 0 then ↑(minimalPeriod ((fun x x_1 => x • x_1) g) (Quotient.out' { fst := q, snd := k - 1 }.fst))\n        else ↑k) *\n      Quotient.out' (Quotient.out' { fst := q, snd := k - 1 }.fst) =\n    if k = 0 then g ^ minimalPeriod ((fun x x_1 => x • x_1) g) (Quotient.out' q) * Quotient.out' (Quotient.out' q)\n    else g ^ ↑k * Quotient.out' (Quotient.out' q)\n[PROOFSTEP]\nby_cases hk : k = 0\n[GOAL]\ncase pos\nG : Type u\ninst✝ : Group G\nH : Subgroup G\ng : G\nq : orbitRel.Quotient { x // x ∈ zpowers g } (G ⧸ H)\nk : ZMod (minimalPeriod ((fun x x_1 => x • x_1) g) (Quotient.out' q))\nhk : k = 0\n⊢ (g ^\n        if k = 0 then ↑(minimalPeriod ((fun x x_1 => x • x_1) g) (Quotient.out' { fst := q, snd := k - 1 }.fst))\n        else ↑k) *\n      Quotient.out' (Quotient.out' { fst := q, snd := k - 1 }.fst) =\n    if k = 0 then g ^ minimalPeriod ((fun x x_1 => x • x_1) g) (Quotient.out' q) * Quotient.out' (Quotient.out' q)\n    else g ^ ↑k * Quotient.out' (Quotient.out' q)\n[PROOFSTEP]\nrw [if_pos hk, if_pos hk, zpow_ofNat]\n[GOAL]\ncase neg\nG : Type u\ninst✝ : Group G\nH : Subgroup G\ng : G\nq : orbitRel.Quotient { x // x ∈ zpowers g } (G ⧸ H)\nk : ZMod (minimalPeriod ((fun x x_1 => x • x_1) g) (Quotient.out' q))\nhk : ¬k = 0\n⊢ (g ^\n        if k = 0 then ↑(minimalPeriod ((fun x x_1 => x • x_1) g) (Quotient.out' { fst := q, snd := k - 1 }.fst))\n        else ↑k) *\n      Quotient.out' (Quotient.out' { fst := q, snd := k - 1 }.fst) =\n    if k = 0 then g ^ minimalPeriod ((fun x x_1 => x • x_1) g) (Quotient.out' q) * Quotient.out' (Quotient.out' q)\n    else g ^ ↑k * Quotient.out' (Quotient.out' q)\n[PROOFSTEP]\nrw [if_neg hk, if_neg hk]\n", "meta": {"mathlib_filename": "Mathlib.GroupTheory.Complement", "llama_tokens": 19595, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8499711908591638, "lm_q2_score": 0.6334102498375401, "lm_q1q2_score": 0.5383804643568145}}
{"text": "[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\ninst✝¹ : Preorder β\ninst✝ : Preorder γ\nf : α → β\ns : Set α\nl : Filter α\na : α\nt✝ : Set α\nl' : Filter α\nt : Set δ\ng : δ → α\nb : δ\nhf : IsMinOn f s a\nhg : MapsTo g t s\nha : g b = a\ny : δ\nhy : y ∈ t\n⊢ y ∈ {x | (fun x => (f ∘ g) b ≤ (f ∘ g) x) x}\n[PROOFSTEP]\nsimpa only [ha, (· ∘ ·)] using hf (hg hy)\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\ninst✝ : OrderedAddCommGroup β\nf g : α → β\na : α\ns : Set α\nl : Filter α\nhf : IsMinFilter f l a\nhg : IsMaxFilter g l a\n⊢ IsMinFilter (fun x => f x - g x) l a\n[PROOFSTEP]\nsimpa only [sub_eq_add_neg] using hf.add hg.neg\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\ninst✝ : OrderedAddCommGroup β\nf g : α → β\na : α\ns : Set α\nl : Filter α\nhf : IsMaxFilter f l a\nhg : IsMinFilter g l a\n⊢ IsMaxFilter (fun x => f x - g x) l a\n[PROOFSTEP]\nsimpa only [sub_eq_add_neg] using hf.add hg.neg\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\ninst✝ : OrderedAddCommGroup β\nf g : α → β\na : α\ns : Set α\nl : Filter α\nhf : IsMinOn f s a\nhg : IsMaxOn g s a\n⊢ IsMinOn (fun x => f x - g x) s a\n[PROOFSTEP]\nsimpa only [sub_eq_add_neg] using hf.add hg.neg\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type x\ninst✝ : OrderedAddCommGroup β\nf g : α → β\na : α\ns : Set α\nl : Filter α\nhf : IsMaxOn f s a\nhg : IsMinOn g s a\n⊢ IsMaxOn (fun x => f x - g x) s a\n[PROOFSTEP]\nsimpa only [sub_eq_add_neg] using hf.add hg.neg\n[GOAL]\nα✝ : Type u\nβ✝ : Type v\nγ : Type w\nδ : Type x\nα : Type u_1\nβ : Type u_2\ninst✝ : Preorder β\nf g : α → β\na : α\nl : Filter α\nhle : g ≤ᶠ[l] f\nhfga : f a = g a\nh : IsMaxFilter f l a\n⊢ IsMaxFilter g l a\n[PROOFSTEP]\nrefine' hle.mp (h.mono fun x hf hgf => _)\n[GOAL]\nα✝ : Type u\nβ✝ : Type v\nγ : Type w\nδ : Type x\nα : Type u_1\nβ : Type u_2\ninst✝ : Preorder β\nf g : α → β\na : α\nl : Filter α\nhle : g ≤ᶠ[l] f\nhfga : f a = g a\nh : IsMaxFilter f l a\nx : α\nhf : f x ≤ f a\nhgf : g x ≤ f x\n⊢ g x ≤ g a\n[PROOFSTEP]\nrw [← hfga]\n[GOAL]\nα✝ : Type u\nβ✝ : Type v\nγ : Type w\nδ : Type x\nα : Type u_1\nβ : Type u_2\ninst✝ : Preorder β\nf g : α → β\na : α\nl : Filter α\nhle : g ≤ᶠ[l] f\nhfga : f a = g a\nh : IsMaxFilter f l a\nx : α\nhf : f x ≤ f a\nhgf : g x ≤ f x\n⊢ g x ≤ f a\n[PROOFSTEP]\nexact le_trans hgf hf\n[GOAL]\nα✝ : Type u\nβ✝ : Type v\nγ : Type w\nδ : Type x\nα : Type u_1\nβ : Type u_2\ninst✝ : Preorder β\nf g : α → β\na : α\nl : Filter α\nh : IsExtrFilter f l a\nheq : f =ᶠ[l] g\nhfga : f a = g a\n⊢ IsExtrFilter g l a\n[PROOFSTEP]\nrw [IsExtrFilter] at *\n[GOAL]\nα✝ : Type u\nβ✝ : Type v\nγ : Type w\nδ : Type x\nα : Type u_1\nβ : Type u_2\ninst✝ : Preorder β\nf g : α → β\na : α\nl : Filter α\nh : IsMinFilter f l a ∨ IsMaxFilter f l a\nheq : f =ᶠ[l] g\nhfga : f a = g a\n⊢ IsMinFilter g l a ∨ IsMaxFilter g l a\n[PROOFSTEP]\nrwa [← heq.isMaxFilter_iff hfga, ← heq.isMinFilter_iff hfga]\n", "meta": {"mathlib_filename": "Mathlib.Order.Filter.Extr", "llama_tokens": 1448, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES\n\n", "lm_q1_score": 0.8006920020959544, "lm_q2_score": 0.672331705744791, "lm_q1q2_score": 0.5383306195453847}}
{"text": "[GOAL]\nR : Type u_1\nS : Type u_2\nM : Type u_3\ninst✝ : MonoidWithZero M\nn : ℕ\nx✝ : 0 < n + 1\n⊢ 0 ^ (n + 1) = 0\n[PROOFSTEP]\nrw [pow_succ, zero_mul]\n[GOAL]\nR : Type u_1\nS : Type u_2\nM : Type u_3\ninst✝ : MonoidWithZero M\nk : ℕ\nx✝ : k + 1 ≠ 0\n⊢ 0 ^ (k + 1) = 0\n[PROOFSTEP]\nrw [pow_succ]\n[GOAL]\nR : Type u_1\nS : Type u_2\nM : Type u_3\ninst✝ : MonoidWithZero M\nk : ℕ\nx✝ : k + 1 ≠ 0\n⊢ 0 * 0 ^ k = 0\n[PROOFSTEP]\nexact zero_mul _\n[GOAL]\nR : Type u_1\nS : Type u_2\nM : Type u_3\ninst✝ : MonoidWithZero M\nn : ℕ\n⊢ 0 ^ n = if n = 0 then 1 else 0\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nR : Type u_1\nS : Type u_2\nM : Type u_3\ninst✝ : MonoidWithZero M\nn : ℕ\nh : n = 0\n⊢ 0 ^ n = 1\n[PROOFSTEP]\nrw [h, pow_zero]\n[GOAL]\ncase neg\nR : Type u_1\nS : Type u_2\nM : Type u_3\ninst✝ : MonoidWithZero M\nn : ℕ\nh : ¬n = 0\n⊢ 0 ^ n = 0\n[PROOFSTEP]\nrw [zero_pow (Nat.pos_of_ne_zero h)]\n[GOAL]\nR : Type u_1\nS : Type u_2\nM : Type u_3\ninst✝ : MonoidWithZero M\nx : M\nn m : ℕ\nhn : n ≤ m\nhx : x ^ n = 0\n⊢ x ^ m = 0\n[PROOFSTEP]\nrw [← tsub_add_cancel_of_le hn, pow_add, hx, mul_zero]\n[GOAL]\nR : Type u_1\nS : Type u_2\nM : Type u_3\ninst✝¹ : MonoidWithZero M\ninst✝ : NoZeroDivisors M\nx : M\nn : ℕ\nH : x ^ n = 0\n⊢ x = 0\n[PROOFSTEP]\ninduction' n with n ih\n[GOAL]\ncase zero\nR : Type u_1\nS : Type u_2\nM : Type u_3\ninst✝¹ : MonoidWithZero M\ninst✝ : NoZeroDivisors M\nx : M\nn : ℕ\nH✝ : x ^ n = 0\nH : x ^ Nat.zero = 0\n⊢ x = 0\n[PROOFSTEP]\nrw [pow_zero] at H \n[GOAL]\ncase zero\nR : Type u_1\nS : Type u_2\nM : Type u_3\ninst✝¹ : MonoidWithZero M\ninst✝ : NoZeroDivisors M\nx : M\nn : ℕ\nH✝ : x ^ n = 0\nH : 1 = 0\n⊢ x = 0\n[PROOFSTEP]\nrw [← mul_one x, H, mul_zero]\n[GOAL]\ncase succ\nR : Type u_1\nS : Type u_2\nM : Type u_3\ninst✝¹ : MonoidWithZero M\ninst✝ : NoZeroDivisors M\nx : M\nn✝ : ℕ\nH✝ : x ^ n✝ = 0\nn : ℕ\nih : x ^ n = 0 → x = 0\nH : x ^ Nat.succ n = 0\n⊢ x = 0\n[PROOFSTEP]\nrw [pow_succ] at H \n[GOAL]\ncase succ\nR : Type u_1\nS : Type u_2\nM : Type u_3\ninst✝¹ : MonoidWithZero M\ninst✝ : NoZeroDivisors M\nx : M\nn✝ : ℕ\nH✝ : x ^ n✝ = 0\nn : ℕ\nih : x ^ n = 0 → x = 0\nH : x * x ^ n = 0\n⊢ x = 0\n[PROOFSTEP]\nexact Or.casesOn (mul_eq_zero.1 H) id ih\n[GOAL]\nR : Type u_1\nS : Type u_2\nM : Type u_3\ninst✝¹ : MonoidWithZero M\ninst✝ : NoZeroDivisors M\na : M\nn : ℕ\nhn : 0 < n\n⊢ a ^ n = 0 ↔ a = 0\n[PROOFSTEP]\nrefine' ⟨pow_eq_zero, _⟩\n[GOAL]\nR : Type u_1\nS : Type u_2\nM : Type u_3\ninst✝¹ : MonoidWithZero M\ninst✝ : NoZeroDivisors M\na : M\nn : ℕ\nhn : 0 < n\n⊢ a = 0 → a ^ n = 0\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nR : Type u_1\nS : Type u_2\nM : Type u_3\ninst✝¹ : MonoidWithZero M\ninst✝ : NoZeroDivisors M\nn : ℕ\nhn : 0 < n\n⊢ 0 ^ n = 0\n[PROOFSTEP]\nexact zero_pow hn\n[GOAL]\nR : Type u_1\nS : Type u_2\nM : Type u_3\ninst✝² : MonoidWithZero M\ninst✝¹ : NoZeroDivisors M\ninst✝ : Nontrivial M\na : M\nn : ℕ\n⊢ a ^ n = 0 ↔ a = 0 ∧ n ≠ 0\n[PROOFSTEP]\ncases (zero_le n).eq_or_gt\n[GOAL]\ncase inl\nR : Type u_1\nS : Type u_2\nM : Type u_3\ninst✝² : MonoidWithZero M\ninst✝¹ : NoZeroDivisors M\ninst✝ : Nontrivial M\na : M\nn : ℕ\nh✝ : n = 0\n⊢ a ^ n = 0 ↔ a = 0 ∧ n ≠ 0\n[PROOFSTEP]\nsimp [*, ne_of_gt]\n[GOAL]\ncase inr\nR : Type u_1\nS : Type u_2\nM : Type u_3\ninst✝² : MonoidWithZero M\ninst✝¹ : NoZeroDivisors M\ninst✝ : Nontrivial M\na : M\nn : ℕ\nh✝ : 0 < n\n⊢ a ^ n = 0 ↔ a = 0 ∧ n ≠ 0\n[PROOFSTEP]\nsimp [*, ne_of_gt]\n[GOAL]\nR : Type u_1\nS : Type u_2\nM : Type u_3\ninst✝ : MonoidWithZero M\na : M\nn : ℕ\nhn : n ≠ 0\n⊢ a ^ n ≠ 0 → a ≠ 0\n[PROOFSTEP]\ncontrapose!\n[GOAL]\nR : Type u_1\nS : Type u_2\nM : Type u_3\ninst✝ : MonoidWithZero M\na : M\nn : ℕ\nhn : n ≠ 0\n⊢ a = 0 → a ^ n = 0\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nR : Type u_1\nS : Type u_2\nM : Type u_3\ninst✝ : MonoidWithZero M\nn : ℕ\nhn : n ≠ 0\n⊢ 0 ^ n = 0\n[PROOFSTEP]\nexact zero_pow' n hn\n[GOAL]\nR : Type u_1\nS : Type u_2\nM : Type u_3\ninst✝¹ : MonoidWithZero M\ninst✝ : Nontrivial M\nn : ℕ\n⊢ 0 ^ n = 0 ↔ 0 < n\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nR : Type u_1\nS : Type u_2\nM : Type u_3\ninst✝¹ : MonoidWithZero M\ninst✝ : Nontrivial M\nn : ℕ\n⊢ 0 ^ n = 0 → 0 < n\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nR : Type u_1\nS : Type u_2\nM : Type u_3\ninst✝¹ : MonoidWithZero M\ninst✝ : Nontrivial M\nn : ℕ\n⊢ 0 < n → 0 ^ n = 0\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nR : Type u_1\nS : Type u_2\nM : Type u_3\ninst✝¹ : MonoidWithZero M\ninst✝ : Nontrivial M\nn : ℕ\nh : 0 ^ n = 0\n⊢ 0 < n\n[PROOFSTEP]\nrw [pos_iff_ne_zero]\n[GOAL]\ncase mp\nR : Type u_1\nS : Type u_2\nM : Type u_3\ninst✝¹ : MonoidWithZero M\ninst✝ : Nontrivial M\nn : ℕ\nh : 0 ^ n = 0\n⊢ n ≠ 0\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase mp\nR : Type u_1\nS : Type u_2\nM : Type u_3\ninst✝¹ : MonoidWithZero M\ninst✝ : Nontrivial M\nh : 0 ^ 0 = 0\n⊢ False\n[PROOFSTEP]\nsimp at h \n[GOAL]\ncase mpr\nR : Type u_1\nS : Type u_2\nM : Type u_3\ninst✝¹ : MonoidWithZero M\ninst✝ : Nontrivial M\nn : ℕ\nh : 0 < n\n⊢ 0 ^ n = 0\n[PROOFSTEP]\nexact zero_pow' n h.ne.symm\n[GOAL]\nR : Type u_1\nS : Type u_2\nM : Type u_3\ninst✝ : MonoidWithZero M\nr : M\n⊢ inverse r ^ 0 = inverse (r ^ 0)\n[PROOFSTEP]\nrw [pow_zero, pow_zero, Ring.inverse_one]\n[GOAL]\nR : Type u_1\nS : Type u_2\nM : Type u_3\ninst✝ : MonoidWithZero M\nr : M\nn : ℕ\n⊢ inverse r ^ (n + 1) = inverse (r ^ (n + 1))\n[PROOFSTEP]\nrw [pow_succ, pow_succ', Ring.mul_inverse_rev' ((Commute.refl r).pow_left n), Ring.inverse_pow r n]\n[GOAL]\nR : Type u_1\nS : Type u_2\nM : Type u_3\ninst✝ : CancelCommMonoidWithZero R\nx : R\nn m : ℕ\nh0 : x ≠ 0\nh1 : ¬IsUnit x\n⊢ x ^ n ∣ x ^ m ↔ n ≤ m\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nR : Type u_1\nS : Type u_2\nM : Type u_3\ninst✝ : CancelCommMonoidWithZero R\nx : R\nn m : ℕ\nh0 : x ≠ 0\nh1 : ¬IsUnit x\n⊢ x ^ n ∣ x ^ m → n ≤ m\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nR : Type u_1\nS : Type u_2\nM : Type u_3\ninst✝ : CancelCommMonoidWithZero R\nx : R\nn m : ℕ\nh0 : x ≠ 0\nh1 : ¬IsUnit x\nh : x ^ n ∣ x ^ m\n⊢ n ≤ m\n[PROOFSTEP]\nrw [← not_lt]\n[GOAL]\ncase mp\nR : Type u_1\nS : Type u_2\nM : Type u_3\ninst✝ : CancelCommMonoidWithZero R\nx : R\nn m : ℕ\nh0 : x ≠ 0\nh1 : ¬IsUnit x\nh : x ^ n ∣ x ^ m\n⊢ ¬m < n\n[PROOFSTEP]\nintro hmn\n[GOAL]\ncase mp\nR : Type u_1\nS : Type u_2\nM : Type u_3\ninst✝ : CancelCommMonoidWithZero R\nx : R\nn m : ℕ\nh0 : x ≠ 0\nh1 : ¬IsUnit x\nh : x ^ n ∣ x ^ m\nhmn : m < n\n⊢ False\n[PROOFSTEP]\napply h1\n[GOAL]\ncase mp\nR : Type u_1\nS : Type u_2\nM : Type u_3\ninst✝ : CancelCommMonoidWithZero R\nx : R\nn m : ℕ\nh0 : x ≠ 0\nh1 : ¬IsUnit x\nh : x ^ n ∣ x ^ m\nhmn : m < n\n⊢ IsUnit x\n[PROOFSTEP]\nhave : x ^ m * x ∣ x ^ m * 1 := by\n  rw [← pow_succ', mul_one]\n  exact (pow_dvd_pow _ (Nat.succ_le_of_lt hmn)).trans h\n[GOAL]\nR : Type u_1\nS : Type u_2\nM : Type u_3\ninst✝ : CancelCommMonoidWithZero R\nx : R\nn m : ℕ\nh0 : x ≠ 0\nh1 : ¬IsUnit x\nh : x ^ n ∣ x ^ m\nhmn : m < n\n⊢ x ^ m * x ∣ x ^ m * 1\n[PROOFSTEP]\nrw [← pow_succ', mul_one]\n[GOAL]\nR : Type u_1\nS : Type u_2\nM : Type u_3\ninst✝ : CancelCommMonoidWithZero R\nx : R\nn m : ℕ\nh0 : x ≠ 0\nh1 : ¬IsUnit x\nh : x ^ n ∣ x ^ m\nhmn : m < n\n⊢ x ^ (m + 1) ∣ x ^ m\n[PROOFSTEP]\nexact (pow_dvd_pow _ (Nat.succ_le_of_lt hmn)).trans h\n[GOAL]\ncase mp\nR : Type u_1\nS : Type u_2\nM : Type u_3\ninst✝ : CancelCommMonoidWithZero R\nx : R\nn m : ℕ\nh0 : x ≠ 0\nh1 : ¬IsUnit x\nh : x ^ n ∣ x ^ m\nhmn : m < n\nthis : x ^ m * x ∣ x ^ m * 1\n⊢ IsUnit x\n[PROOFSTEP]\nrwa [mul_dvd_mul_iff_left, ← isUnit_iff_dvd_one] at this \n[GOAL]\ncase mp\nR : Type u_1\nS : Type u_2\nM : Type u_3\ninst✝ : CancelCommMonoidWithZero R\nx : R\nn m : ℕ\nh0 : x ≠ 0\nh1 : ¬IsUnit x\nh : x ^ n ∣ x ^ m\nhmn : m < n\nthis : x ^ m * x ∣ x ^ m * 1\n⊢ x ^ m ≠ 0\n[PROOFSTEP]\napply pow_ne_zero m h0\n[GOAL]\ncase mpr\nR : Type u_1\nS : Type u_2\nM : Type u_3\ninst✝ : CancelCommMonoidWithZero R\nx : R\nn m : ℕ\nh0 : x ≠ 0\nh1 : ¬IsUnit x\n⊢ n ≤ m → x ^ n ∣ x ^ m\n[PROOFSTEP]\napply pow_dvd_pow\n[GOAL]\nR : Type u_1\nS : Type u_2\nM : Type u_3\ninst✝¹ : Semiring R\ninst✝ : Semiring S\nn m : ℕ\na b c : R\nha : c ^ n ∣ a\nhb : c ^ m ∣ b\n⊢ c ^ min n m ∣ a + b\n[PROOFSTEP]\nreplace ha := (pow_dvd_pow c (min_le_left n m)).trans ha\n[GOAL]\nR : Type u_1\nS : Type u_2\nM : Type u_3\ninst✝¹ : Semiring R\ninst✝ : Semiring S\nn m : ℕ\na b c : R\nhb : c ^ m ∣ b\nha : c ^ min n m ∣ a\n⊢ c ^ min n m ∣ a + b\n[PROOFSTEP]\nreplace hb := (pow_dvd_pow c (min_le_right n m)).trans hb\n[GOAL]\nR : Type u_1\nS : Type u_2\nM : Type u_3\ninst✝¹ : Semiring R\ninst✝ : Semiring S\nn m : ℕ\na b c : R\nha : c ^ min n m ∣ a\nhb : c ^ min n m ∣ b\n⊢ c ^ min n m ∣ a + b\n[PROOFSTEP]\nexact dvd_add ha hb\n[GOAL]\nR : Type u_1\nS : Type u_2\nM : Type u_3\ninst✝ : CommSemiring R\na b : R\n⊢ (a + b) ^ 2 = a ^ 2 + 2 * a * b + b ^ 2\n[PROOFSTEP]\nsimp only [sq, add_mul_self_eq]\n[GOAL]\nR : Type u_1\nS : Type u_2\nM : Type u_3\ninst✝ : CommSemiring R\na b : R\n⊢ (a + b) ^ 2 = a ^ 2 + b ^ 2 + 2 * a * b\n[PROOFSTEP]\nrw [add_sq, add_assoc, add_comm _ (b ^ 2), add_assoc]\n[GOAL]\nR : Type u_1\nS : Type u_2\nM : Type u_3\ninst✝¹ : Monoid R\ninst✝ : HasDistribNeg R\nn : ℕ\nh : (-1) ^ n = -1\n⊢ (-1) ^ (n + 1) = 1\n[PROOFSTEP]\nrw [pow_succ, h, neg_one_mul, neg_neg]\n[GOAL]\nR : Type u_1\nS : Type u_2\nM : Type u_3\ninst✝¹ : Monoid R\ninst✝ : HasDistribNeg R\nn : ℕ\nh : (-1) ^ n = 1\n⊢ (-1) ^ (n + 1) = -1\n[PROOFSTEP]\nrw [pow_succ, h, mul_one]\n[GOAL]\nR : Type u_1\nS : Type u_2\nM : Type u_3\ninst✝¹ : Monoid R\ninst✝ : HasDistribNeg R\na : R\nn : ℕ\n⊢ (-a) ^ bit0 n = a ^ bit0 n\n[PROOFSTEP]\nrw [pow_bit0', neg_mul_neg, pow_bit0']\n[GOAL]\nR : Type u_1\nS : Type u_2\nM : Type u_3\ninst✝¹ : Monoid R\ninst✝ : HasDistribNeg R\na : R\nn : ℕ\n⊢ (-a) ^ bit1 n = -a ^ bit1 n\n[PROOFSTEP]\nsimp only [bit1, pow_succ, neg_pow_bit0, neg_mul_eq_neg_mul]\n[GOAL]\nR : Type u_1\nS : Type u_2\nM : Type u_3\ninst✝¹ : Monoid R\ninst✝ : HasDistribNeg R\na : R\n⊢ (-a) ^ 2 = a ^ 2\n[PROOFSTEP]\nsimp [sq]\n[GOAL]\nR : Type u_1\nS : Type u_2\nM : Type u_3\ninst✝¹ : Monoid R\ninst✝ : HasDistribNeg R\n⊢ (-1) ^ 2 = 1\n[PROOFSTEP]\nsimp [neg_sq, one_pow]\n[GOAL]\nR : Type u_1\nS : Type u_2\nM : Type u_3\ninst✝ : Ring R\na b : R\nh : Commute a b\n⊢ a ^ 2 - b ^ 2 = (a + b) * (a - b)\n[PROOFSTEP]\nrw [sq, sq, h.mul_self_sub_mul_self_eq]\n[GOAL]\nR : Type u_1\nS : Type u_2\nM : Type u_3\ninst✝ : Ring R\na b : R\nn : ℕ\nr : R\n⊢ (-1) ^ n * r = 0 ↔ r = 0\n[PROOFSTEP]\nrcases neg_one_pow_eq_or R n with h | h\n[GOAL]\ncase inl\nR : Type u_1\nS : Type u_2\nM : Type u_3\ninst✝ : Ring R\na b : R\nn : ℕ\nr : R\nh : (-1) ^ n = 1\n⊢ (-1) ^ n * r = 0 ↔ r = 0\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase inr\nR : Type u_1\nS : Type u_2\nM : Type u_3\ninst✝ : Ring R\na b : R\nn : ℕ\nr : R\nh : (-1) ^ n = -1\n⊢ (-1) ^ n * r = 0 ↔ r = 0\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nR : Type u_1\nS : Type u_2\nM : Type u_3\ninst✝ : Ring R\na b : R\nn : ℕ\nr : R\n⊢ r * (-1) ^ n = 0 ↔ r = 0\n[PROOFSTEP]\nrcases neg_one_pow_eq_or R n with h | h\n[GOAL]\ncase inl\nR : Type u_1\nS : Type u_2\nM : Type u_3\ninst✝ : Ring R\na b : R\nn : ℕ\nr : R\nh : (-1) ^ n = 1\n⊢ r * (-1) ^ n = 0 ↔ r = 0\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase inr\nR : Type u_1\nS : Type u_2\nM : Type u_3\ninst✝ : Ring R\na b : R\nn : ℕ\nr : R\nh : (-1) ^ n = -1\n⊢ r * (-1) ^ n = 0 ↔ r = 0\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nR : Type u_1\nS : Type u_2\nM : Type u_3\ninst✝¹ : Ring R\na b : R\ninst✝ : NoZeroDivisors R\nh : Commute a b\n⊢ a ^ 2 = b ^ 2 ↔ a = b ∨ a = -b\n[PROOFSTEP]\nrw [← sub_eq_zero, h.sq_sub_sq, mul_eq_zero, add_eq_zero_iff_eq_neg, sub_eq_zero, or_comm]\n[GOAL]\nR : Type u_1\nS : Type u_2\nM : Type u_3\ninst✝¹ : Ring R\na b : R\ninst✝ : NoZeroDivisors R\n⊢ a ^ 2 = 1 ↔ a = 1 ∨ a = -1\n[PROOFSTEP]\nrw [← (Commute.one_right a).sq_eq_sq_iff_eq_or_eq_neg, one_pow]\n[GOAL]\nR : Type u_1\nS : Type u_2\nM : Type u_3\ninst✝ : CommRing R\na b : R\n⊢ (a - b) ^ 2 = a ^ 2 - 2 * a * b + b ^ 2\n[PROOFSTEP]\nrw [sub_eq_add_neg, add_sq, neg_sq, mul_neg, ← sub_eq_add_neg]\n[GOAL]\nR : Type u_1\nS : Type u_2\nM : Type u_3\ninst✝ : CommRing R\na b : R\n⊢ (a - b) ^ 2 = a ^ 2 + b ^ 2 - 2 * a * b\n[PROOFSTEP]\nrw [sub_eq_add_neg, add_sq', neg_sq, mul_neg, ← sub_eq_add_neg]\n[GOAL]\nR : Type u_1\nS : Type u_2\nM : Type u_3\ninst✝¹ : CommRing R\ninst✝ : NoZeroDivisors R\na✝ b✝ : R\na b : Rˣ\n⊢ a ^ 2 = b ^ 2 ↔ a = b ∨ a = -b\n[PROOFSTEP]\nsimp_rw [ext_iff, val_pow_eq_pow_val, sq_eq_sq_iff_eq_or_eq_neg, Units.val_neg]\n", "meta": {"mathlib_filename": "Mathlib.Algebra.GroupPower.Ring", "llama_tokens": 6500, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8354835289107307, "lm_q2_score": 0.6442251133170357, "lm_q1q2_score": 0.5382394710870324}}
{"text": "[GOAL]\nR : Type u_1\nM✝ : Type u_2\ninst✝¹⁵ : Semiring R\ninst✝¹⁴ : AddCommMonoid M✝\ninst✝¹³ : Module R M✝\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹² : Ring R₁\ninst✝¹¹ : AddCommGroup M₁\ninst✝¹⁰ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝⁹ : CommSemiring R₂\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁶ : CommRing R₃\ninst✝⁵ : AddCommGroup M₃\ninst✝⁴ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝³ : Field K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\nB : BilinForm R M✝\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\no : Type u_12\ninst✝ : Fintype n\nM : Matrix n n R₂\nx y z : n → R₂\n⊢ (fun v w => ∑ i : n, ∑ j : n, v i * M i j * w j) (x + y) z =\n    (fun v w => ∑ i : n, ∑ j : n, v i * M i j * w j) x z + (fun v w => ∑ i : n, ∑ j : n, v i * M i j * w j) y z\n[PROOFSTEP]\nsimp only [Pi.add_apply, add_mul, sum_add_distrib]\n[GOAL]\nR : Type u_1\nM✝ : Type u_2\ninst✝¹⁵ : Semiring R\ninst✝¹⁴ : AddCommMonoid M✝\ninst✝¹³ : Module R M✝\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹² : Ring R₁\ninst✝¹¹ : AddCommGroup M₁\ninst✝¹⁰ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝⁹ : CommSemiring R₂\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁶ : CommRing R₃\ninst✝⁵ : AddCommGroup M₃\ninst✝⁴ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝³ : Field K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\nB : BilinForm R M✝\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\no : Type u_12\ninst✝ : Fintype n\nM : Matrix n n R₂\na : R₂\nx y : n → R₂\n⊢ (fun v w => ∑ i : n, ∑ j : n, v i * M i j * w j) (a • x) y = a * (fun v w => ∑ i : n, ∑ j : n, v i * M i j * w j) x y\n[PROOFSTEP]\nsimp only [Pi.smul_apply, smul_eq_mul, mul_assoc, mul_sum]\n[GOAL]\nR : Type u_1\nM✝ : Type u_2\ninst✝¹⁵ : Semiring R\ninst✝¹⁴ : AddCommMonoid M✝\ninst✝¹³ : Module R M✝\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹² : Ring R₁\ninst✝¹¹ : AddCommGroup M₁\ninst✝¹⁰ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝⁹ : CommSemiring R₂\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁶ : CommRing R₃\ninst✝⁵ : AddCommGroup M₃\ninst✝⁴ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝³ : Field K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\nB : BilinForm R M✝\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\no : Type u_12\ninst✝ : Fintype n\nM : Matrix n n R₂\nx y z : n → R₂\n⊢ (fun v w => ∑ i : n, ∑ j : n, v i * M i j * w j) x (y + z) =\n    (fun v w => ∑ i : n, ∑ j : n, v i * M i j * w j) x y + (fun v w => ∑ i : n, ∑ j : n, v i * M i j * w j) x z\n[PROOFSTEP]\nsimp only [Pi.add_apply, mul_add, sum_add_distrib]\n[GOAL]\nR : Type u_1\nM✝ : Type u_2\ninst✝¹⁵ : Semiring R\ninst✝¹⁴ : AddCommMonoid M✝\ninst✝¹³ : Module R M✝\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹² : Ring R₁\ninst✝¹¹ : AddCommGroup M₁\ninst✝¹⁰ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝⁹ : CommSemiring R₂\ninst✝⁸ : AddCommMonoid M₂\ninst✝⁷ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁶ : CommRing R₃\ninst✝⁵ : AddCommGroup M₃\ninst✝⁴ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝³ : Field K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\nB : BilinForm R M✝\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\no : Type u_12\ninst✝ : Fintype n\nM : Matrix n n R₂\na : R₂\nx y : n → R₂\n⊢ (fun v w => ∑ i : n, ∑ j : n, v i * M i j * w j) x (a • y) = a * (fun v w => ∑ i : n, ∑ j : n, v i * M i j * w j) x y\n[PROOFSTEP]\nsimp only [Pi.smul_apply, smul_eq_mul, mul_assoc, mul_left_comm, mul_sum]\n[GOAL]\nR : Type u_1\nM✝ : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M✝\ninst✝¹⁴ : Module R M✝\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB : BilinForm R M✝\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\no : Type u_12\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nM : Matrix n n R₂\ni j : n\n⊢ bilin (toBilin'Aux M) (↑(LinearMap.stdBasis R₂ (fun x => R₂) i) 1) (↑(LinearMap.stdBasis R₂ (fun x => R₂) j) 1) =\n    M i j\n[PROOFSTEP]\nrw [Matrix.toBilin'Aux]\n[GOAL]\nR : Type u_1\nM✝ : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M✝\ninst✝¹⁴ : Module R M✝\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB : BilinForm R M✝\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\no : Type u_12\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nM : Matrix n n R₂\ni j : n\n⊢ bilin\n      { bilin := fun v w => ∑ i : n, ∑ j : n, v i * M i j * w j,\n        bilin_add_left :=\n          (_ :\n            ∀ (x y z : n → R₂),\n              ∑ i : n, ∑ j : n, (x + y) i * M i j * z j =\n                ∑ x_1 : n, ∑ x_2 : n, x x_1 * M x_1 x_2 * z x_2 + ∑ x : n, ∑ x_1 : n, y x * M x x_1 * z x_1),\n        bilin_smul_left :=\n          (_ :\n            ∀ (a : R₂) (x y : n → R₂),\n              ∑ i : n, ∑ j : n, (a • x) i * M i j * y j = a * ∑ i : n, ∑ j : n, x i * M i j * y j),\n        bilin_add_right :=\n          (_ :\n            ∀ (x y z : n → R₂),\n              ∑ i : n, ∑ j : n, x i * M i j * (y + z) j =\n                ∑ x_1 : n, ∑ x_2 : n, x x_1 * M x_1 x_2 * y x_2 + ∑ x_1 : n, ∑ x_2 : n, x x_1 * M x_1 x_2 * z x_2),\n        bilin_smul_right :=\n          (_ :\n            ∀ (a : R₂) (x y : n → R₂),\n              ∑ i : n, ∑ j : n, x i * M i j * (a • y) j = a * ∑ i : n, ∑ j : n, x i * M i j * y j) }\n      (↑(LinearMap.stdBasis R₂ (fun x => R₂) i) 1) (↑(LinearMap.stdBasis R₂ (fun x => R₂) j) 1) =\n    M i j\n[PROOFSTEP]\ndsimp only\n  -- Porting note: had to add `dsimp only` to get rid of the projections\n[GOAL]\nR : Type u_1\nM✝ : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M✝\ninst✝¹⁴ : Module R M✝\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB : BilinForm R M✝\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\no : Type u_12\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nM : Matrix n n R₂\ni j : n\n⊢ ∑ i_1 : n,\n      ∑ j_1 : n,\n        ↑(LinearMap.stdBasis R₂ (fun x => R₂) i) 1 i_1 * M i_1 j_1 * ↑(LinearMap.stdBasis R₂ (fun x => R₂) j) 1 j_1 =\n    M i j\n[PROOFSTEP]\nrw [sum_eq_single i, sum_eq_single j]\n[GOAL]\nR : Type u_1\nM✝ : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M✝\ninst✝¹⁴ : Module R M✝\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB : BilinForm R M✝\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\no : Type u_12\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nM : Matrix n n R₂\ni j : n\n⊢ ↑(LinearMap.stdBasis R₂ (fun x => R₂) i) 1 i * M i j * ↑(LinearMap.stdBasis R₂ (fun x => R₂) j) 1 j = M i j\n[PROOFSTEP]\nsimp only [stdBasis_same, stdBasis_same, one_mul, mul_one]\n[GOAL]\ncase h₀\nR : Type u_1\nM✝ : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M✝\ninst✝¹⁴ : Module R M✝\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB : BilinForm R M✝\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\no : Type u_12\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nM : Matrix n n R₂\ni j : n\n⊢ ∀ (b : n),\n    b ∈ univ →\n      b ≠ j → ↑(LinearMap.stdBasis R₂ (fun x => R₂) i) 1 i * M i b * ↑(LinearMap.stdBasis R₂ (fun x => R₂) j) 1 b = 0\n[PROOFSTEP]\nrintro j' - hj'\n[GOAL]\ncase h₀\nR : Type u_1\nM✝ : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M✝\ninst✝¹⁴ : Module R M✝\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB : BilinForm R M✝\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\no : Type u_12\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nM : Matrix n n R₂\ni j j' : n\nhj' : j' ≠ j\n⊢ ↑(LinearMap.stdBasis R₂ (fun x => R₂) i) 1 i * M i j' * ↑(LinearMap.stdBasis R₂ (fun x => R₂) j) 1 j' = 0\n[PROOFSTEP]\napply mul_eq_zero_of_right\n[GOAL]\ncase h₀.h\nR : Type u_1\nM✝ : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M✝\ninst✝¹⁴ : Module R M✝\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB : BilinForm R M✝\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\no : Type u_12\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nM : Matrix n n R₂\ni j j' : n\nhj' : j' ≠ j\n⊢ ↑(LinearMap.stdBasis R₂ (fun x => R₂) j) 1 j' = 0\n[PROOFSTEP]\nexact stdBasis_ne R₂ (fun _ => R₂) _ _ hj' 1\n[GOAL]\ncase h₁\nR : Type u_1\nM✝ : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M✝\ninst✝¹⁴ : Module R M✝\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB : BilinForm R M✝\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\no : Type u_12\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nM : Matrix n n R₂\ni j : n\n⊢ ¬j ∈ univ → ↑(LinearMap.stdBasis R₂ (fun x => R₂) i) 1 i * M i j * ↑(LinearMap.stdBasis R₂ (fun x => R₂) j) 1 j = 0\n[PROOFSTEP]\nintros\n[GOAL]\ncase h₁\nR : Type u_1\nM✝ : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M✝\ninst✝¹⁴ : Module R M✝\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB : BilinForm R M✝\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\no : Type u_12\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nM : Matrix n n R₂\ni j : n\na✝ : ¬j ∈ univ\n⊢ ↑(LinearMap.stdBasis R₂ (fun x => R₂) i) 1 i * M i j * ↑(LinearMap.stdBasis R₂ (fun x => R₂) j) 1 j = 0\n[PROOFSTEP]\nhave := Finset.mem_univ j\n[GOAL]\ncase h₁\nR : Type u_1\nM✝ : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M✝\ninst✝¹⁴ : Module R M✝\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB : BilinForm R M✝\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\no : Type u_12\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nM : Matrix n n R₂\ni j : n\na✝ : ¬j ∈ univ\nthis : j ∈ univ\n⊢ ↑(LinearMap.stdBasis R₂ (fun x => R₂) i) 1 i * M i j * ↑(LinearMap.stdBasis R₂ (fun x => R₂) j) 1 j = 0\n[PROOFSTEP]\ncontradiction\n[GOAL]\ncase h₀\nR : Type u_1\nM✝ : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M✝\ninst✝¹⁴ : Module R M✝\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB : BilinForm R M✝\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\no : Type u_12\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nM : Matrix n n R₂\ni j : n\n⊢ ∀ (b : n),\n    b ∈ univ →\n      b ≠ i →\n        ∑ j_1 : n,\n            ↑(LinearMap.stdBasis R₂ (fun x => R₂) i) 1 b * M b j_1 * ↑(LinearMap.stdBasis R₂ (fun x => R₂) j) 1 j_1 =\n          0\n[PROOFSTEP]\nrintro i' - hi'\n[GOAL]\ncase h₀\nR : Type u_1\nM✝ : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M✝\ninst✝¹⁴ : Module R M✝\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB : BilinForm R M✝\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\no : Type u_12\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nM : Matrix n n R₂\ni j i' : n\nhi' : i' ≠ i\n⊢ ∑ j_1 : n, ↑(LinearMap.stdBasis R₂ (fun x => R₂) i) 1 i' * M i' j_1 * ↑(LinearMap.stdBasis R₂ (fun x => R₂) j) 1 j_1 =\n    0\n[PROOFSTEP]\nrefine' Finset.sum_eq_zero fun j _ => _\n[GOAL]\ncase h₀\nR : Type u_1\nM✝ : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M✝\ninst✝¹⁴ : Module R M✝\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB : BilinForm R M✝\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\no : Type u_12\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nM : Matrix n n R₂\ni j✝ i' : n\nhi' : i' ≠ i\nj : n\nx✝ : j ∈ univ\n⊢ ↑(LinearMap.stdBasis R₂ (fun x => R₂) i) 1 i' * M i' j * ↑(LinearMap.stdBasis R₂ (fun x => R₂) j✝) 1 j = 0\n[PROOFSTEP]\napply mul_eq_zero_of_left\n[GOAL]\ncase h₀.h\nR : Type u_1\nM✝ : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M✝\ninst✝¹⁴ : Module R M✝\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB : BilinForm R M✝\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\no : Type u_12\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nM : Matrix n n R₂\ni j✝ i' : n\nhi' : i' ≠ i\nj : n\nx✝ : j ∈ univ\n⊢ ↑(LinearMap.stdBasis R₂ (fun x => R₂) i) 1 i' * M i' j = 0\n[PROOFSTEP]\napply mul_eq_zero_of_left\n[GOAL]\ncase h₀.h.h\nR : Type u_1\nM✝ : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M✝\ninst✝¹⁴ : Module R M✝\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB : BilinForm R M✝\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\no : Type u_12\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nM : Matrix n n R₂\ni j✝ i' : n\nhi' : i' ≠ i\nj : n\nx✝ : j ∈ univ\n⊢ ↑(LinearMap.stdBasis R₂ (fun x => R₂) i) 1 i' = 0\n[PROOFSTEP]\nexact stdBasis_ne R₂ (fun _ => R₂) _ _ hi' 1\n[GOAL]\ncase h₁\nR : Type u_1\nM✝ : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M✝\ninst✝¹⁴ : Module R M✝\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB : BilinForm R M✝\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\no : Type u_12\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nM : Matrix n n R₂\ni j : n\n⊢ ¬i ∈ univ →\n    ∑ j_1 : n, ↑(LinearMap.stdBasis R₂ (fun x => R₂) i) 1 i * M i j_1 * ↑(LinearMap.stdBasis R₂ (fun x => R₂) j) 1 j_1 =\n      0\n[PROOFSTEP]\nintros\n[GOAL]\ncase h₁\nR : Type u_1\nM✝ : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M✝\ninst✝¹⁴ : Module R M✝\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB : BilinForm R M✝\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\no : Type u_12\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nM : Matrix n n R₂\ni j : n\na✝ : ¬i ∈ univ\n⊢ ∑ j_1 : n, ↑(LinearMap.stdBasis R₂ (fun x => R₂) i) 1 i * M i j_1 * ↑(LinearMap.stdBasis R₂ (fun x => R₂) j) 1 j_1 = 0\n[PROOFSTEP]\nhave := Finset.mem_univ i\n[GOAL]\ncase h₁\nR : Type u_1\nM✝ : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M✝\ninst✝¹⁴ : Module R M✝\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB : BilinForm R M✝\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\no : Type u_12\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nM : Matrix n n R₂\ni j : n\na✝ : ¬i ∈ univ\nthis : i ∈ univ\n⊢ ∑ j_1 : n, ↑(LinearMap.stdBasis R₂ (fun x => R₂) i) 1 i * M i j_1 * ↑(LinearMap.stdBasis R₂ (fun x => R₂) j) 1 j_1 = 0\n[PROOFSTEP]\ncontradiction\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : AddCommMonoid M\ninst✝¹⁵ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁴ : Ring R₁\ninst✝¹³ : AddCommGroup M₁\ninst✝¹² : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹¹ : CommSemiring R₂\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁸ : CommRing R₃\ninst✝⁷ : AddCommGroup M₃\ninst✝⁶ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁵ : Field K\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂✝ : BilinForm R₂ M₂\nn : Type u_11\no : Type u_12\ninst✝² : Fintype n\ninst✝¹ : Fintype o\ninst✝ : DecidableEq n\nB₂ : BilinForm R₂ (n → R₂)\n⊢ toBilin'Aux (↑(toMatrixAux fun j => ↑(LinearMap.stdBasis R₂ (fun x => R₂) j) 1) B₂) = B₂\n[PROOFSTEP]\nrefine' ext_basis (Pi.basisFun R₂ n) fun i j => _\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : AddCommMonoid M\ninst✝¹⁵ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁴ : Ring R₁\ninst✝¹³ : AddCommGroup M₁\ninst✝¹² : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹¹ : CommSemiring R₂\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁸ : CommRing R₃\ninst✝⁷ : AddCommGroup M₃\ninst✝⁶ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁵ : Field K\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂✝ : BilinForm R₂ M₂\nn : Type u_11\no : Type u_12\ninst✝² : Fintype n\ninst✝¹ : Fintype o\ninst✝ : DecidableEq n\nB₂ : BilinForm R₂ (n → R₂)\ni j : n\n⊢ bilin (toBilin'Aux (↑(toMatrixAux fun j => ↑(LinearMap.stdBasis R₂ (fun x => R₂) j) 1) B₂)) (↑(Pi.basisFun R₂ n) i)\n      (↑(Pi.basisFun R₂ n) j) =\n    bilin B₂ (↑(Pi.basisFun R₂ n) i) (↑(Pi.basisFun R₂ n) j)\n[PROOFSTEP]\nrw [Pi.basisFun_apply, Pi.basisFun_apply, Matrix.toBilin'Aux_stdBasis, BilinForm.toMatrixAux_apply]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁸ : Semiring R\ninst✝¹⁷ : AddCommMonoid M\ninst✝¹⁶ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁵ : Ring R₁\ninst✝¹⁴ : AddCommGroup M₁\ninst✝¹³ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹² : CommSemiring R₂\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁹ : CommRing R₃\ninst✝⁸ : AddCommGroup M₃\ninst✝⁷ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\no : Type u_12\ninst✝³ : Fintype n\ninst✝² : Fintype o\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq o\nsrc✝ : BilinForm R₂ ((fun x => n → R₂) 1) →ₗ[R₂] Matrix n n R₂ :=\n  toMatrixAux fun j => ↑(LinearMap.stdBasis R₂ (fun x => R₂) j) 1\nB : BilinForm R₂ (n → R₂)\n⊢ toBilin'Aux\n      (AddHom.toFun\n        { toAddHom := src✝.toAddHom,\n            map_smul' :=\n              (_ :\n                ∀ (r : R₂) (x : BilinForm R₂ ((fun x => n → R₂) 1)),\n                  AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R₂) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n        B) =\n    B\n[PROOFSTEP]\nconvert toBilin'Aux_toMatrixAux B\n[GOAL]\nR : Type u_1\nM✝ : Type u_2\ninst✝¹⁸ : Semiring R\ninst✝¹⁷ : AddCommMonoid M✝\ninst✝¹⁶ : Module R M✝\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁵ : Ring R₁\ninst✝¹⁴ : AddCommGroup M₁\ninst✝¹³ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹² : CommSemiring R₂\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁹ : CommRing R₃\ninst✝⁸ : AddCommGroup M₃\ninst✝⁷ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module K V\nB : BilinForm R M✝\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\no : Type u_12\ninst✝³ : Fintype n\ninst✝² : Fintype o\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq o\nsrc✝ : BilinForm R₂ ((fun x => n → R₂) 1) →ₗ[R₂] Matrix n n R₂ :=\n  toMatrixAux fun j => ↑(LinearMap.stdBasis R₂ (fun x => R₂) j) 1\nM : Matrix n n R₂\n⊢ AddHom.toFun\n      { toAddHom := src✝.toAddHom,\n          map_smul' :=\n            (_ :\n              ∀ (r : R₂) (x : BilinForm R₂ ((fun x => n → R₂) 1)),\n                AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R₂) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n      (toBilin'Aux M) =\n    M\n[PROOFSTEP]\next i j\n[GOAL]\ncase a.h\nR : Type u_1\nM✝ : Type u_2\ninst✝¹⁸ : Semiring R\ninst✝¹⁷ : AddCommMonoid M✝\ninst✝¹⁶ : Module R M✝\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁵ : Ring R₁\ninst✝¹⁴ : AddCommGroup M₁\ninst✝¹³ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹² : CommSemiring R₂\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁹ : CommRing R₃\ninst✝⁸ : AddCommGroup M₃\ninst✝⁷ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module K V\nB : BilinForm R M✝\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\no : Type u_12\ninst✝³ : Fintype n\ninst✝² : Fintype o\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq o\nsrc✝ : BilinForm R₂ ((fun x => n → R₂) 1) →ₗ[R₂] Matrix n n R₂ :=\n  toMatrixAux fun j => ↑(LinearMap.stdBasis R₂ (fun x => R₂) j) 1\nM : Matrix n n R₂\ni j : n\n⊢ AddHom.toFun\n      { toAddHom := src✝.toAddHom,\n          map_smul' :=\n            (_ :\n              ∀ (r : R₂) (x : BilinForm R₂ ((fun x => n → R₂) 1)),\n                AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R₂) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n      (toBilin'Aux M) i j =\n    M i j\n[PROOFSTEP]\nsimp only [toFun_eq_coe, BilinForm.toMatrixAux_apply, Matrix.toBilin'Aux_stdBasis]\n[GOAL]\nR : Type u_1\nM✝ : Type u_2\ninst✝¹⁸ : Semiring R\ninst✝¹⁷ : AddCommMonoid M✝\ninst✝¹⁶ : Module R M✝\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁵ : Ring R₁\ninst✝¹⁴ : AddCommGroup M₁\ninst✝¹³ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹² : CommSemiring R₂\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁹ : CommRing R₃\ninst✝⁸ : AddCommGroup M₃\ninst✝⁷ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module K V\nB : BilinForm R M✝\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\no : Type u_12\ninst✝³ : Fintype n\ninst✝² : Fintype o\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq o\nM : Matrix n n R₂\nv w : n → R₂\n⊢ bilin (↑toBilin' M) v w = v ⬝ᵥ mulVec M w\n[PROOFSTEP]\nsimp_rw [Matrix.toBilin'_apply, Matrix.dotProduct, Matrix.mulVec, Matrix.dotProduct]\n[GOAL]\nR : Type u_1\nM✝ : Type u_2\ninst✝¹⁸ : Semiring R\ninst✝¹⁷ : AddCommMonoid M✝\ninst✝¹⁶ : Module R M✝\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁵ : Ring R₁\ninst✝¹⁴ : AddCommGroup M₁\ninst✝¹³ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹² : CommSemiring R₂\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁹ : CommRing R₃\ninst✝⁸ : AddCommGroup M₃\ninst✝⁷ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module K V\nB : BilinForm R M✝\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\no : Type u_12\ninst✝³ : Fintype n\ninst✝² : Fintype o\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq o\nM : Matrix n n R₂\nv w : n → R₂\n⊢ ∑ i : n, ∑ j : n, v i * M i j * w j = ∑ x : n, v x * ∑ x_1 : n, M x x_1 * w x_1\n[PROOFSTEP]\nrefine' Finset.sum_congr rfl fun _ _ => _\n[GOAL]\nR : Type u_1\nM✝ : Type u_2\ninst✝¹⁸ : Semiring R\ninst✝¹⁷ : AddCommMonoid M✝\ninst✝¹⁶ : Module R M✝\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁵ : Ring R₁\ninst✝¹⁴ : AddCommGroup M₁\ninst✝¹³ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹² : CommSemiring R₂\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁹ : CommRing R₃\ninst✝⁸ : AddCommGroup M₃\ninst✝⁷ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module K V\nB : BilinForm R M✝\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\no : Type u_12\ninst✝³ : Fintype n\ninst✝² : Fintype o\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq o\nM : Matrix n n R₂\nv w : n → R₂\nx✝¹ : n\nx✝ : x✝¹ ∈ univ\n⊢ ∑ j : n, v x✝¹ * M x✝¹ j * w j = v x✝¹ * ∑ x : n, M x✝¹ x * w x\n[PROOFSTEP]\nrw [Finset.mul_sum]\n[GOAL]\nR : Type u_1\nM✝ : Type u_2\ninst✝¹⁸ : Semiring R\ninst✝¹⁷ : AddCommMonoid M✝\ninst✝¹⁶ : Module R M✝\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁵ : Ring R₁\ninst✝¹⁴ : AddCommGroup M₁\ninst✝¹³ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹² : CommSemiring R₂\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁹ : CommRing R₃\ninst✝⁸ : AddCommGroup M₃\ninst✝⁷ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module K V\nB : BilinForm R M✝\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\no : Type u_12\ninst✝³ : Fintype n\ninst✝² : Fintype o\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq o\nM : Matrix n n R₂\nv w : n → R₂\nx✝¹ : n\nx✝ : x✝¹ ∈ univ\n⊢ ∑ j : n, v x✝¹ * M x✝¹ j * w j = ∑ x : n, v x✝¹ * (M x✝¹ x * w x)\n[PROOFSTEP]\nrefine' Finset.sum_congr rfl fun _ _ => _\n[GOAL]\nR : Type u_1\nM✝ : Type u_2\ninst✝¹⁸ : Semiring R\ninst✝¹⁷ : AddCommMonoid M✝\ninst✝¹⁶ : Module R M✝\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁵ : Ring R₁\ninst✝¹⁴ : AddCommGroup M₁\ninst✝¹³ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹² : CommSemiring R₂\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁹ : CommRing R₃\ninst✝⁸ : AddCommGroup M₃\ninst✝⁷ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module K V\nB : BilinForm R M✝\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\no : Type u_12\ninst✝³ : Fintype n\ninst✝² : Fintype o\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq o\nM : Matrix n n R₂\nv w : n → R₂\nx✝³ : n\nx✝² : x✝³ ∈ univ\nx✝¹ : n\nx✝ : x✝¹ ∈ univ\n⊢ v x✝³ * M x✝³ x✝¹ * w x✝¹ = v x✝³ * (M x✝³ x✝¹ * w x✝¹)\n[PROOFSTEP]\nrw [← mul_assoc]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁸ : Semiring R\ninst✝¹⁷ : AddCommMonoid M\ninst✝¹⁶ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁵ : Ring R₁\ninst✝¹⁴ : AddCommGroup M₁\ninst✝¹³ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹² : CommSemiring R₂\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁹ : CommRing R₃\ninst✝⁸ : AddCommGroup M₃\ninst✝⁷ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\no : Type u_12\ninst✝³ : Fintype n\ninst✝² : Fintype o\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq o\nB : BilinForm R₂ (n → R₂)\nl r : (o → R₂) →ₗ[R₂] n → R₂\n⊢ ↑toMatrix' (comp B l r) = (↑LinearMap.toMatrix' l)ᵀ * ↑toMatrix' B * ↑LinearMap.toMatrix' r\n[PROOFSTEP]\next i j\n[GOAL]\ncase a.h\nR : Type u_1\nM : Type u_2\ninst✝¹⁸ : Semiring R\ninst✝¹⁷ : AddCommMonoid M\ninst✝¹⁶ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁵ : Ring R₁\ninst✝¹⁴ : AddCommGroup M₁\ninst✝¹³ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹² : CommSemiring R₂\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁹ : CommRing R₃\ninst✝⁸ : AddCommGroup M₃\ninst✝⁷ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\no : Type u_12\ninst✝³ : Fintype n\ninst✝² : Fintype o\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq o\nB : BilinForm R₂ (n → R₂)\nl r : (o → R₂) →ₗ[R₂] n → R₂\ni j : o\n⊢ ↑toMatrix' (comp B l r) i j = ((↑LinearMap.toMatrix' l)ᵀ * ↑toMatrix' B * ↑LinearMap.toMatrix' r) i j\n[PROOFSTEP]\nsimp only [BilinForm.toMatrix'_apply, BilinForm.comp_apply, transpose_apply, Matrix.mul_apply, LinearMap.toMatrix',\n  LinearEquiv.coe_mk, sum_mul]\n[GOAL]\ncase a.h\nR : Type u_1\nM : Type u_2\ninst✝¹⁸ : Semiring R\ninst✝¹⁷ : AddCommMonoid M\ninst✝¹⁶ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁵ : Ring R₁\ninst✝¹⁴ : AddCommGroup M₁\ninst✝¹³ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹² : CommSemiring R₂\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁹ : CommRing R₃\ninst✝⁸ : AddCommGroup M₃\ninst✝⁷ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\no : Type u_12\ninst✝³ : Fintype n\ninst✝² : Fintype o\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq o\nB : BilinForm R₂ (n → R₂)\nl r : (o → R₂) →ₗ[R₂] n → R₂\ni j : o\n⊢ bilin B (↑l (↑(LinearMap.stdBasis R₂ (fun x => R₂) i) 1)) (↑r (↑(LinearMap.stdBasis R₂ (fun x => R₂) j) 1)) =\n    ∑ x : n,\n      ∑ x_1 : n,\n        ↑of (fun i j => ↑l (↑(LinearMap.stdBasis R₂ (fun x => R₂) j) 1) i) x_1 i *\n            bilin B (↑(LinearMap.stdBasis R₂ (fun x => R₂) x_1) 1) (↑(LinearMap.stdBasis R₂ (fun x => R₂) x) 1) *\n          ↑of (fun i j => ↑r (↑(LinearMap.stdBasis R₂ (fun x => R₂) j) 1) i) x j\n[PROOFSTEP]\nrw [sum_comm]\n[GOAL]\ncase a.h\nR : Type u_1\nM : Type u_2\ninst✝¹⁸ : Semiring R\ninst✝¹⁷ : AddCommMonoid M\ninst✝¹⁶ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁵ : Ring R₁\ninst✝¹⁴ : AddCommGroup M₁\ninst✝¹³ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹² : CommSemiring R₂\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁹ : CommRing R₃\ninst✝⁸ : AddCommGroup M₃\ninst✝⁷ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\no : Type u_12\ninst✝³ : Fintype n\ninst✝² : Fintype o\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq o\nB : BilinForm R₂ (n → R₂)\nl r : (o → R₂) →ₗ[R₂] n → R₂\ni j : o\n⊢ bilin B (↑l (↑(LinearMap.stdBasis R₂ (fun x => R₂) i) 1)) (↑r (↑(LinearMap.stdBasis R₂ (fun x => R₂) j) 1)) =\n    ∑ y : n,\n      ∑ x : n,\n        ↑of (fun i j => ↑l (↑(LinearMap.stdBasis R₂ (fun x => R₂) j) 1) i) y i *\n            bilin B (↑(LinearMap.stdBasis R₂ (fun x => R₂) y) 1) (↑(LinearMap.stdBasis R₂ (fun x => R₂) x) 1) *\n          ↑of (fun i j => ↑r (↑(LinearMap.stdBasis R₂ (fun x => R₂) j) 1) i) x j\n[PROOFSTEP]\nconv_lhs => rw [← BilinForm.sum_repr_mul_repr_mul (Pi.basisFun R₂ n) (l _) (r _)]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁸ : Semiring R\ninst✝¹⁷ : AddCommMonoid M\ninst✝¹⁶ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁵ : Ring R₁\ninst✝¹⁴ : AddCommGroup M₁\ninst✝¹³ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹² : CommSemiring R₂\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁹ : CommRing R₃\ninst✝⁸ : AddCommGroup M₃\ninst✝⁷ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\no : Type u_12\ninst✝³ : Fintype n\ninst✝² : Fintype o\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq o\nB : BilinForm R₂ (n → R₂)\nl r : (o → R₂) →ₗ[R₂] n → R₂\ni j : o\n| bilin B (↑l (↑(LinearMap.stdBasis R₂ (fun x => R₂) i) 1)) (↑r (↑(LinearMap.stdBasis R₂ (fun x => R₂) j) 1))\n[PROOFSTEP]\nrw [← BilinForm.sum_repr_mul_repr_mul (Pi.basisFun R₂ n) (l _) (r _)]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁸ : Semiring R\ninst✝¹⁷ : AddCommMonoid M\ninst✝¹⁶ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁵ : Ring R₁\ninst✝¹⁴ : AddCommGroup M₁\ninst✝¹³ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹² : CommSemiring R₂\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁹ : CommRing R₃\ninst✝⁸ : AddCommGroup M₃\ninst✝⁷ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\no : Type u_12\ninst✝³ : Fintype n\ninst✝² : Fintype o\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq o\nB : BilinForm R₂ (n → R₂)\nl r : (o → R₂) →ₗ[R₂] n → R₂\ni j : o\n| bilin B (↑l (↑(LinearMap.stdBasis R₂ (fun x => R₂) i) 1)) (↑r (↑(LinearMap.stdBasis R₂ (fun x => R₂) j) 1))\n[PROOFSTEP]\nrw [← BilinForm.sum_repr_mul_repr_mul (Pi.basisFun R₂ n) (l _) (r _)]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁸ : Semiring R\ninst✝¹⁷ : AddCommMonoid M\ninst✝¹⁶ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁵ : Ring R₁\ninst✝¹⁴ : AddCommGroup M₁\ninst✝¹³ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹² : CommSemiring R₂\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁹ : CommRing R₃\ninst✝⁸ : AddCommGroup M₃\ninst✝⁷ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\no : Type u_12\ninst✝³ : Fintype n\ninst✝² : Fintype o\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq o\nB : BilinForm R₂ (n → R₂)\nl r : (o → R₂) →ₗ[R₂] n → R₂\ni j : o\n| bilin B (↑l (↑(LinearMap.stdBasis R₂ (fun x => R₂) i) 1)) (↑r (↑(LinearMap.stdBasis R₂ (fun x => R₂) j) 1))\n[PROOFSTEP]\nrw [← BilinForm.sum_repr_mul_repr_mul (Pi.basisFun R₂ n) (l _) (r _)]\n[GOAL]\ncase a.h\nR : Type u_1\nM : Type u_2\ninst✝¹⁸ : Semiring R\ninst✝¹⁷ : AddCommMonoid M\ninst✝¹⁶ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁵ : Ring R₁\ninst✝¹⁴ : AddCommGroup M₁\ninst✝¹³ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹² : CommSemiring R₂\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁹ : CommRing R₃\ninst✝⁸ : AddCommGroup M₃\ninst✝⁷ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\no : Type u_12\ninst✝³ : Fintype n\ninst✝² : Fintype o\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq o\nB : BilinForm R₂ (n → R₂)\nl r : (o → R₂) →ₗ[R₂] n → R₂\ni j : o\n⊢ (Finsupp.sum (↑(Pi.basisFun R₂ n).repr (↑l (↑(LinearMap.stdBasis R₂ (fun x => R₂) i) 1))) fun i xi =>\n      Finsupp.sum (↑(Pi.basisFun R₂ n).repr (↑r (↑(LinearMap.stdBasis R₂ (fun x => R₂) j) 1))) fun j yj =>\n        xi • yj • bilin B (↑(Pi.basisFun R₂ n) i) (↑(Pi.basisFun R₂ n) j)) =\n    ∑ y : n,\n      ∑ x : n,\n        ↑of (fun i j => ↑l (↑(LinearMap.stdBasis R₂ (fun x => R₂) j) 1) i) y i *\n            bilin B (↑(LinearMap.stdBasis R₂ (fun x => R₂) y) 1) (↑(LinearMap.stdBasis R₂ (fun x => R₂) x) 1) *\n          ↑of (fun i j => ↑r (↑(LinearMap.stdBasis R₂ (fun x => R₂) j) 1) i) x j\n[PROOFSTEP]\nrw [Finsupp.sum_fintype]\n[GOAL]\ncase a.h\nR : Type u_1\nM : Type u_2\ninst✝¹⁸ : Semiring R\ninst✝¹⁷ : AddCommMonoid M\ninst✝¹⁶ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁵ : Ring R₁\ninst✝¹⁴ : AddCommGroup M₁\ninst✝¹³ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹² : CommSemiring R₂\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁹ : CommRing R₃\ninst✝⁸ : AddCommGroup M₃\ninst✝⁷ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\no : Type u_12\ninst✝³ : Fintype n\ninst✝² : Fintype o\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq o\nB : BilinForm R₂ (n → R₂)\nl r : (o → R₂) →ₗ[R₂] n → R₂\ni j : o\n⊢ (∑ i_1 : n,\n      Finsupp.sum (↑(Pi.basisFun R₂ n).repr (↑r (↑(LinearMap.stdBasis R₂ (fun x => R₂) j) 1))) fun j yj =>\n        ↑(↑(Pi.basisFun R₂ n).repr (↑l (↑(LinearMap.stdBasis R₂ (fun x => R₂) i) 1))) i_1 •\n          yj • bilin B (↑(Pi.basisFun R₂ n) i_1) (↑(Pi.basisFun R₂ n) j)) =\n    ∑ y : n,\n      ∑ x : n,\n        ↑of (fun i j => ↑l (↑(LinearMap.stdBasis R₂ (fun x => R₂) j) 1) i) y i *\n            bilin B (↑(LinearMap.stdBasis R₂ (fun x => R₂) y) 1) (↑(LinearMap.stdBasis R₂ (fun x => R₂) x) 1) *\n          ↑of (fun i j => ↑r (↑(LinearMap.stdBasis R₂ (fun x => R₂) j) 1) i) x j\n[PROOFSTEP]\napply sum_congr rfl\n[GOAL]\ncase a.h\nR : Type u_1\nM : Type u_2\ninst✝¹⁸ : Semiring R\ninst✝¹⁷ : AddCommMonoid M\ninst✝¹⁶ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁵ : Ring R₁\ninst✝¹⁴ : AddCommGroup M₁\ninst✝¹³ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹² : CommSemiring R₂\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁹ : CommRing R₃\ninst✝⁸ : AddCommGroup M₃\ninst✝⁷ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\no : Type u_12\ninst✝³ : Fintype n\ninst✝² : Fintype o\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq o\nB : BilinForm R₂ (n → R₂)\nl r : (o → R₂) →ₗ[R₂] n → R₂\ni j : o\n⊢ ∀ (x : n),\n    x ∈ univ →\n      (Finsupp.sum (↑(Pi.basisFun R₂ n).repr (↑r (↑(LinearMap.stdBasis R₂ (fun x => R₂) j) 1))) fun j yj =>\n          ↑(↑(Pi.basisFun R₂ n).repr (↑l (↑(LinearMap.stdBasis R₂ (fun x => R₂) i) 1))) x •\n            yj • bilin B (↑(Pi.basisFun R₂ n) x) (↑(Pi.basisFun R₂ n) j)) =\n        ∑ x_1 : n,\n          ↑of (fun i j => ↑l (↑(LinearMap.stdBasis R₂ (fun x => R₂) j) 1) i) x i *\n              bilin B (↑(LinearMap.stdBasis R₂ (fun x => R₂) x) 1) (↑(LinearMap.stdBasis R₂ (fun x => R₂) x_1) 1) *\n            ↑of (fun i j => ↑r (↑(LinearMap.stdBasis R₂ (fun x => R₂) j) 1) i) x_1 j\n[PROOFSTEP]\nrintro i' -\n[GOAL]\ncase a.h\nR : Type u_1\nM : Type u_2\ninst✝¹⁸ : Semiring R\ninst✝¹⁷ : AddCommMonoid M\ninst✝¹⁶ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁵ : Ring R₁\ninst✝¹⁴ : AddCommGroup M₁\ninst✝¹³ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹² : CommSemiring R₂\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁹ : CommRing R₃\ninst✝⁸ : AddCommGroup M₃\ninst✝⁷ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\no : Type u_12\ninst✝³ : Fintype n\ninst✝² : Fintype o\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq o\nB : BilinForm R₂ (n → R₂)\nl r : (o → R₂) →ₗ[R₂] n → R₂\ni j : o\ni' : n\n⊢ (Finsupp.sum (↑(Pi.basisFun R₂ n).repr (↑r (↑(LinearMap.stdBasis R₂ (fun x => R₂) j) 1))) fun j yj =>\n      ↑(↑(Pi.basisFun R₂ n).repr (↑l (↑(LinearMap.stdBasis R₂ (fun x => R₂) i) 1))) i' •\n        yj • bilin B (↑(Pi.basisFun R₂ n) i') (↑(Pi.basisFun R₂ n) j)) =\n    ∑ x : n,\n      ↑of (fun i j => ↑l (↑(LinearMap.stdBasis R₂ (fun x => R₂) j) 1) i) i' i *\n          bilin B (↑(LinearMap.stdBasis R₂ (fun x => R₂) i') 1) (↑(LinearMap.stdBasis R₂ (fun x => R₂) x) 1) *\n        ↑of (fun i j => ↑r (↑(LinearMap.stdBasis R₂ (fun x => R₂) j) 1) i) x j\n[PROOFSTEP]\nrw [Finsupp.sum_fintype]\n[GOAL]\ncase a.h\nR : Type u_1\nM : Type u_2\ninst✝¹⁸ : Semiring R\ninst✝¹⁷ : AddCommMonoid M\ninst✝¹⁶ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁵ : Ring R₁\ninst✝¹⁴ : AddCommGroup M₁\ninst✝¹³ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹² : CommSemiring R₂\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁹ : CommRing R₃\ninst✝⁸ : AddCommGroup M₃\ninst✝⁷ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\no : Type u_12\ninst✝³ : Fintype n\ninst✝² : Fintype o\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq o\nB : BilinForm R₂ (n → R₂)\nl r : (o → R₂) →ₗ[R₂] n → R₂\ni j : o\ni' : n\n⊢ ∑ i_1 : n,\n      ↑(↑(Pi.basisFun R₂ n).repr (↑l (↑(LinearMap.stdBasis R₂ (fun x => R₂) i) 1))) i' •\n        ↑(↑(Pi.basisFun R₂ n).repr (↑r (↑(LinearMap.stdBasis R₂ (fun x => R₂) j) 1))) i_1 •\n          bilin B (↑(Pi.basisFun R₂ n) i') (↑(Pi.basisFun R₂ n) i_1) =\n    ∑ x : n,\n      ↑of (fun i j => ↑l (↑(LinearMap.stdBasis R₂ (fun x => R₂) j) 1) i) i' i *\n          bilin B (↑(LinearMap.stdBasis R₂ (fun x => R₂) i') 1) (↑(LinearMap.stdBasis R₂ (fun x => R₂) x) 1) *\n        ↑of (fun i j => ↑r (↑(LinearMap.stdBasis R₂ (fun x => R₂) j) 1) i) x j\n[PROOFSTEP]\napply sum_congr rfl\n[GOAL]\ncase a.h\nR : Type u_1\nM : Type u_2\ninst✝¹⁸ : Semiring R\ninst✝¹⁷ : AddCommMonoid M\ninst✝¹⁶ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁵ : Ring R₁\ninst✝¹⁴ : AddCommGroup M₁\ninst✝¹³ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹² : CommSemiring R₂\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁹ : CommRing R₃\ninst✝⁸ : AddCommGroup M₃\ninst✝⁷ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\no : Type u_12\ninst✝³ : Fintype n\ninst✝² : Fintype o\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq o\nB : BilinForm R₂ (n → R₂)\nl r : (o → R₂) →ₗ[R₂] n → R₂\ni j : o\ni' : n\n⊢ ∀ (x : n),\n    x ∈ univ →\n      ↑(↑(Pi.basisFun R₂ n).repr (↑l (↑(LinearMap.stdBasis R₂ (fun x => R₂) i) 1))) i' •\n          ↑(↑(Pi.basisFun R₂ n).repr (↑r (↑(LinearMap.stdBasis R₂ (fun x => R₂) j) 1))) x •\n            bilin B (↑(Pi.basisFun R₂ n) i') (↑(Pi.basisFun R₂ n) x) =\n        ↑of (fun i j => ↑l (↑(LinearMap.stdBasis R₂ (fun x => R₂) j) 1) i) i' i *\n            bilin B (↑(LinearMap.stdBasis R₂ (fun x => R₂) i') 1) (↑(LinearMap.stdBasis R₂ (fun x => R₂) x) 1) *\n          ↑of (fun i j => ↑r (↑(LinearMap.stdBasis R₂ (fun x => R₂) j) 1) i) x j\n[PROOFSTEP]\nrintro j' -\n[GOAL]\ncase a.h\nR : Type u_1\nM : Type u_2\ninst✝¹⁸ : Semiring R\ninst✝¹⁷ : AddCommMonoid M\ninst✝¹⁶ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁵ : Ring R₁\ninst✝¹⁴ : AddCommGroup M₁\ninst✝¹³ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹² : CommSemiring R₂\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁹ : CommRing R₃\ninst✝⁸ : AddCommGroup M₃\ninst✝⁷ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\no : Type u_12\ninst✝³ : Fintype n\ninst✝² : Fintype o\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq o\nB : BilinForm R₂ (n → R₂)\nl r : (o → R₂) →ₗ[R₂] n → R₂\ni j : o\ni' j' : n\n⊢ ↑(↑(Pi.basisFun R₂ n).repr (↑l (↑(LinearMap.stdBasis R₂ (fun x => R₂) i) 1))) i' •\n      ↑(↑(Pi.basisFun R₂ n).repr (↑r (↑(LinearMap.stdBasis R₂ (fun x => R₂) j) 1))) j' •\n        bilin B (↑(Pi.basisFun R₂ n) i') (↑(Pi.basisFun R₂ n) j') =\n    ↑of (fun i j => ↑l (↑(LinearMap.stdBasis R₂ (fun x => R₂) j) 1) i) i' i *\n        bilin B (↑(LinearMap.stdBasis R₂ (fun x => R₂) i') 1) (↑(LinearMap.stdBasis R₂ (fun x => R₂) j') 1) *\n      ↑of (fun i j => ↑r (↑(LinearMap.stdBasis R₂ (fun x => R₂) j) 1) i) j' j\n[PROOFSTEP]\nsimp only [smul_eq_mul, Pi.basisFun_repr, mul_assoc, mul_comm, mul_left_comm, Pi.basisFun_apply, of_apply]\n[GOAL]\ncase a.h.h\nR : Type u_1\nM : Type u_2\ninst✝¹⁸ : Semiring R\ninst✝¹⁷ : AddCommMonoid M\ninst✝¹⁶ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁵ : Ring R₁\ninst✝¹⁴ : AddCommGroup M₁\ninst✝¹³ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹² : CommSemiring R₂\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁹ : CommRing R₃\ninst✝⁸ : AddCommGroup M₃\ninst✝⁷ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\no : Type u_12\ninst✝³ : Fintype n\ninst✝² : Fintype o\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq o\nB : BilinForm R₂ (n → R₂)\nl r : (o → R₂) →ₗ[R₂] n → R₂\ni j : o\ni' : n\n⊢ ∀ (i_1 : n),\n    ↑(↑(Pi.basisFun R₂ n).repr (↑l (↑(LinearMap.stdBasis R₂ (fun x => R₂) i) 1))) i' •\n        0 • bilin B (↑(Pi.basisFun R₂ n) i') (↑(Pi.basisFun R₂ n) i_1) =\n      0\n[PROOFSTEP]\nintros\n[GOAL]\ncase a.h.h\nR : Type u_1\nM : Type u_2\ninst✝¹⁸ : Semiring R\ninst✝¹⁷ : AddCommMonoid M\ninst✝¹⁶ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁵ : Ring R₁\ninst✝¹⁴ : AddCommGroup M₁\ninst✝¹³ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹² : CommSemiring R₂\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁹ : CommRing R₃\ninst✝⁸ : AddCommGroup M₃\ninst✝⁷ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\no : Type u_12\ninst✝³ : Fintype n\ninst✝² : Fintype o\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq o\nB : BilinForm R₂ (n → R₂)\nl r : (o → R₂) →ₗ[R₂] n → R₂\ni j : o\ni' i✝ : n\n⊢ ↑(↑(Pi.basisFun R₂ n).repr (↑l (↑(LinearMap.stdBasis R₂ (fun x => R₂) i) 1))) i' •\n      0 • bilin B (↑(Pi.basisFun R₂ n) i') (↑(Pi.basisFun R₂ n) i✝) =\n    0\n[PROOFSTEP]\nsimp only [zero_smul, smul_zero]\n[GOAL]\ncase a.h.h\nR : Type u_1\nM : Type u_2\ninst✝¹⁸ : Semiring R\ninst✝¹⁷ : AddCommMonoid M\ninst✝¹⁶ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁵ : Ring R₁\ninst✝¹⁴ : AddCommGroup M₁\ninst✝¹³ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹² : CommSemiring R₂\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁹ : CommRing R₃\ninst✝⁸ : AddCommGroup M₃\ninst✝⁷ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\no : Type u_12\ninst✝³ : Fintype n\ninst✝² : Fintype o\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq o\nB : BilinForm R₂ (n → R₂)\nl r : (o → R₂) →ₗ[R₂] n → R₂\ni j : o\n⊢ ∀ (i : n),\n    (Finsupp.sum (↑(Pi.basisFun R₂ n).repr (↑r (↑(LinearMap.stdBasis R₂ (fun x => R₂) j) 1))) fun j yj =>\n        0 • yj • bilin B (↑(Pi.basisFun R₂ n) i) (↑(Pi.basisFun R₂ n) j)) =\n      0\n[PROOFSTEP]\nintros\n[GOAL]\ncase a.h.h\nR : Type u_1\nM : Type u_2\ninst✝¹⁸ : Semiring R\ninst✝¹⁷ : AddCommMonoid M\ninst✝¹⁶ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁵ : Ring R₁\ninst✝¹⁴ : AddCommGroup M₁\ninst✝¹³ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹² : CommSemiring R₂\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁹ : CommRing R₃\ninst✝⁸ : AddCommGroup M₃\ninst✝⁷ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\no : Type u_12\ninst✝³ : Fintype n\ninst✝² : Fintype o\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq o\nB : BilinForm R₂ (n → R₂)\nl r : (o → R₂) →ₗ[R₂] n → R₂\ni j : o\ni✝ : n\n⊢ (Finsupp.sum (↑(Pi.basisFun R₂ n).repr (↑r (↑(LinearMap.stdBasis R₂ (fun x => R₂) j) 1))) fun j yj =>\n      0 • yj • bilin B (↑(Pi.basisFun R₂ n) i✝) (↑(Pi.basisFun R₂ n) j)) =\n    0\n[PROOFSTEP]\nsimp only [zero_smul, Finsupp.sum_zero]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁸ : Semiring R\ninst✝¹⁷ : AddCommMonoid M\ninst✝¹⁶ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁵ : Ring R₁\ninst✝¹⁴ : AddCommGroup M₁\ninst✝¹³ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹² : CommSemiring R₂\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁹ : CommRing R₃\ninst✝⁸ : AddCommGroup M₃\ninst✝⁷ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\no : Type u_12\ninst✝³ : Fintype n\ninst✝² : Fintype o\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq o\nB : BilinForm R₂ (n → R₂)\nf : (n → R₂) →ₗ[R₂] n → R₂\n⊢ ↑toMatrix' (compLeft B f) = (↑LinearMap.toMatrix' f)ᵀ * ↑toMatrix' B\n[PROOFSTEP]\nsimp only [BilinForm.compLeft, BilinForm.toMatrix'_comp, toMatrix'_id, Matrix.mul_one]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁸ : Semiring R\ninst✝¹⁷ : AddCommMonoid M\ninst✝¹⁶ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁵ : Ring R₁\ninst✝¹⁴ : AddCommGroup M₁\ninst✝¹³ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹² : CommSemiring R₂\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁹ : CommRing R₃\ninst✝⁸ : AddCommGroup M₃\ninst✝⁷ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\no : Type u_12\ninst✝³ : Fintype n\ninst✝² : Fintype o\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq o\nB : BilinForm R₂ (n → R₂)\nf : (n → R₂) →ₗ[R₂] n → R₂\n⊢ ↑toMatrix' (compRight B f) = ↑toMatrix' B * ↑LinearMap.toMatrix' f\n[PROOFSTEP]\nsimp only [BilinForm.compRight, BilinForm.toMatrix'_comp, toMatrix'_id, transpose_one, Matrix.one_mul]\n[GOAL]\nR : Type u_1\nM✝ : Type u_2\ninst✝¹⁸ : Semiring R\ninst✝¹⁷ : AddCommMonoid M✝\ninst✝¹⁶ : Module R M✝\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁵ : Ring R₁\ninst✝¹⁴ : AddCommGroup M₁\ninst✝¹³ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹² : CommSemiring R₂\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁹ : CommRing R₃\ninst✝⁸ : AddCommGroup M₃\ninst✝⁷ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module K V\nB✝ : BilinForm R M✝\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\no : Type u_12\ninst✝³ : Fintype n\ninst✝² : Fintype o\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq o\nB : BilinForm R₂ (n → R₂)\nM : Matrix o n R₂\nN : Matrix n o R₂\n⊢ M * ↑toMatrix' B * N = ↑toMatrix' (comp B (↑Matrix.toLin' Mᵀ) (↑Matrix.toLin' N))\n[PROOFSTEP]\nsimp only [B.toMatrix'_comp, transpose_transpose, toMatrix'_toLin']\n[GOAL]\nR : Type u_1\nM✝ : Type u_2\ninst✝¹⁸ : Semiring R\ninst✝¹⁷ : AddCommMonoid M✝\ninst✝¹⁶ : Module R M✝\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁵ : Ring R₁\ninst✝¹⁴ : AddCommGroup M₁\ninst✝¹³ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹² : CommSemiring R₂\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁹ : CommRing R₃\ninst✝⁸ : AddCommGroup M₃\ninst✝⁷ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module K V\nB✝ : BilinForm R M✝\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\no : Type u_12\ninst✝³ : Fintype n\ninst✝² : Fintype o\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq o\nB : BilinForm R₂ (n → R₂)\nM : Matrix n n R₂\n⊢ M * ↑toMatrix' B = ↑toMatrix' (compLeft B (↑Matrix.toLin' Mᵀ))\n[PROOFSTEP]\nsimp only [toMatrix'_compLeft, transpose_transpose, toMatrix'_toLin']\n[GOAL]\nR : Type u_1\nM✝ : Type u_2\ninst✝¹⁸ : Semiring R\ninst✝¹⁷ : AddCommMonoid M✝\ninst✝¹⁶ : Module R M✝\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁵ : Ring R₁\ninst✝¹⁴ : AddCommGroup M₁\ninst✝¹³ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹² : CommSemiring R₂\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁹ : CommRing R₃\ninst✝⁸ : AddCommGroup M₃\ninst✝⁷ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module K V\nB✝ : BilinForm R M✝\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\no : Type u_12\ninst✝³ : Fintype n\ninst✝² : Fintype o\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq o\nB : BilinForm R₂ (n → R₂)\nM : Matrix n n R₂\n⊢ ↑toMatrix' B * M = ↑toMatrix' (compRight B (↑Matrix.toLin' M))\n[PROOFSTEP]\nsimp only [toMatrix'_compRight, toMatrix'_toLin']\n[GOAL]\nR : Type u_1\nM✝ : Type u_2\ninst✝¹⁸ : Semiring R\ninst✝¹⁷ : AddCommMonoid M✝\ninst✝¹⁶ : Module R M✝\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁵ : Ring R₁\ninst✝¹⁴ : AddCommGroup M₁\ninst✝¹³ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹² : CommSemiring R₂\ninst✝¹¹ : AddCommMonoid M₂\ninst✝¹⁰ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁹ : CommRing R₃\ninst✝⁸ : AddCommGroup M₃\ninst✝⁷ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁶ : Field K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module K V\nB : BilinForm R M✝\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\no : Type u_12\ninst✝³ : Fintype n\ninst✝² : Fintype o\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq o\nM : Matrix n n R₂\nP Q : Matrix n o R₂\n⊢ ↑BilinForm.toMatrix' (BilinForm.comp (↑toBilin' M) (↑toLin' P) (↑toLin' Q)) =\n    ↑BilinForm.toMatrix' (↑toBilin' (Pᵀ * M * Q))\n[PROOFSTEP]\nsimp only [BilinForm.toMatrix'_comp, BilinForm.toMatrix'_toBilin', toMatrix'_toLin']\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : AddCommMonoid M\ninst✝¹⁵ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁴ : Ring R₁\ninst✝¹³ : AddCommGroup M₁\ninst✝¹² : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹¹ : CommSemiring R₂\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁸ : CommRing R₃\ninst✝⁷ : AddCommGroup M₃\ninst✝⁶ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁵ : Field K\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\no : Type u_12\ninst✝² : Fintype n\ninst✝¹ : Fintype o\ninst✝ : DecidableEq n\nb : Basis n R₂ M₂\nB : BilinForm R₂ M₂\ni j : n\n⊢ ↑(toMatrix b) B i j = bilin B (↑b i) (↑b j)\n[PROOFSTEP]\nrw [BilinForm.toMatrix, LinearEquiv.trans_apply, BilinForm.toMatrix'_apply, congr_apply, b.equivFun_symm_stdBasis,\n  b.equivFun_symm_stdBasis]\n[GOAL]\nR : Type u_1\nM✝ : Type u_2\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : AddCommMonoid M✝\ninst✝¹⁵ : Module R M✝\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁴ : Ring R₁\ninst✝¹³ : AddCommGroup M₁\ninst✝¹² : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹¹ : CommSemiring R₂\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁸ : CommRing R₃\ninst✝⁷ : AddCommGroup M₃\ninst✝⁶ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁵ : Field K\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module K V\nB : BilinForm R M✝\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\no : Type u_12\ninst✝² : Fintype n\ninst✝¹ : Fintype o\ninst✝ : DecidableEq n\nb : Basis n R₂ M₂\nM : Matrix n n R₂\nx y : M₂\n⊢ bilin (↑(toBilin b) M) x y = ∑ i : n, ∑ j : n, ↑(↑b.repr x) i * M i j * ↑(↑b.repr y) j\n[PROOFSTEP]\nrw [Matrix.toBilin, BilinForm.toMatrix, LinearEquiv.symm_trans_apply, ← Matrix.toBilin']\n[GOAL]\nR : Type u_1\nM✝ : Type u_2\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : AddCommMonoid M✝\ninst✝¹⁵ : Module R M✝\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁴ : Ring R₁\ninst✝¹³ : AddCommGroup M₁\ninst✝¹² : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹¹ : CommSemiring R₂\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁸ : CommRing R₃\ninst✝⁷ : AddCommGroup M₃\ninst✝⁶ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁵ : Field K\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module K V\nB : BilinForm R M✝\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\no : Type u_12\ninst✝² : Fintype n\ninst✝¹ : Fintype o\ninst✝ : DecidableEq n\nb : Basis n R₂ M₂\nM : Matrix n n R₂\nx y : M₂\n⊢ bilin (↑(LinearEquiv.symm (BilinForm.congr (Basis.equivFun b))) (↑toBilin' M)) x y =\n    ∑ i : n, ∑ j : n, ↑(↑b.repr x) i * M i j * ↑(↑b.repr y) j\n[PROOFSTEP]\nsimp only [congr_symm, congr_apply, LinearEquiv.symm_symm, Matrix.toBilin'_apply, Basis.equivFun_apply]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : AddCommMonoid M\ninst✝¹⁵ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁴ : Ring R₁\ninst✝¹³ : AddCommGroup M₁\ninst✝¹² : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹¹ : CommSemiring R₂\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁸ : CommRing R₃\ninst✝⁷ : AddCommGroup M₃\ninst✝⁶ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁵ : Field K\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\no : Type u_12\ninst✝² : Fintype n\ninst✝¹ : Fintype o\ninst✝ : DecidableEq n\nb : Basis n R₂ M₂\nB : BilinForm R₂ M₂\ni j : n\n⊢ ↑(toMatrixAux ↑b) B i j = ↑(BilinForm.toMatrix b) B i j\n[PROOFSTEP]\nrw [BilinForm.toMatrix_apply, BilinForm.toMatrixAux_apply]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : AddCommMonoid M\ninst✝¹⁵ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁴ : Ring R₁\ninst✝¹³ : AddCommGroup M₁\ninst✝¹² : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹¹ : CommSemiring R₂\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁸ : CommRing R₃\ninst✝⁷ : AddCommGroup M₃\ninst✝⁶ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁵ : Field K\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\no : Type u_12\ninst✝² : Fintype n\ninst✝¹ : Fintype o\ninst✝ : DecidableEq n\nb : Basis n R₂ M₂\n⊢ toBilin (Pi.basisFun R₂ n) = toBilin'\n[PROOFSTEP]\next M\n[GOAL]\ncase h.H\nR : Type u_1\nM✝ : Type u_2\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : AddCommMonoid M✝\ninst✝¹⁵ : Module R M✝\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁴ : Ring R₁\ninst✝¹³ : AddCommGroup M₁\ninst✝¹² : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹¹ : CommSemiring R₂\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁸ : CommRing R₃\ninst✝⁷ : AddCommGroup M₃\ninst✝⁶ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁵ : Field K\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module K V\nB : BilinForm R M✝\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\no : Type u_12\ninst✝² : Fintype n\ninst✝¹ : Fintype o\ninst✝ : DecidableEq n\nb : Basis n R₂ M₂\nM : Matrix n n R₂\nx✝ y✝ : n → R₂\n⊢ bilin (↑(toBilin (Pi.basisFun R₂ n)) M) x✝ y✝ = bilin (↑toBilin' M) x✝ y✝\n[PROOFSTEP]\nsimp only [Matrix.toBilin_apply, Matrix.toBilin'_apply, Pi.basisFun_repr]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : AddCommMonoid M\ninst✝¹⁵ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁴ : Ring R₁\ninst✝¹³ : AddCommGroup M₁\ninst✝¹² : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹¹ : CommSemiring R₂\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁸ : CommRing R₃\ninst✝⁷ : AddCommGroup M₃\ninst✝⁶ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁵ : Field K\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\no : Type u_12\ninst✝² : Fintype n\ninst✝¹ : Fintype o\ninst✝ : DecidableEq n\nb : Basis n R₂ M₂\n⊢ toMatrix (Pi.basisFun R₂ n) = toMatrix'\n[PROOFSTEP]\next B\n[GOAL]\ncase h.a.h\nR : Type u_1\nM : Type u_2\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : AddCommMonoid M\ninst✝¹⁵ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁴ : Ring R₁\ninst✝¹³ : AddCommGroup M₁\ninst✝¹² : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹¹ : CommSemiring R₂\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁸ : CommRing R₃\ninst✝⁷ : AddCommGroup M₃\ninst✝⁶ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁵ : Field K\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\no : Type u_12\ninst✝² : Fintype n\ninst✝¹ : Fintype o\ninst✝ : DecidableEq n\nb : Basis n R₂ M₂\nB : BilinForm R₂ (n → R₂)\ni✝ x✝ : n\n⊢ ↑(toMatrix (Pi.basisFun R₂ n)) B i✝ x✝ = ↑toMatrix' B i✝ x✝\n[PROOFSTEP]\nrw [BilinForm.toMatrix_apply, BilinForm.toMatrix'_apply, Pi.basisFun_apply, Pi.basisFun_apply]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝²⁰ : Semiring R\ninst✝¹⁹ : AddCommMonoid M\ninst✝¹⁸ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁷ : Ring R₁\ninst✝¹⁶ : AddCommGroup M₁\ninst✝¹⁵ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁴ : CommSemiring R₂\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝¹¹ : CommRing R₃\ninst✝¹⁰ : AddCommGroup M₃\ninst✝⁹ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁸ : Field K\ninst✝⁷ : AddCommGroup V\ninst✝⁶ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\no : Type u_12\ninst✝⁵ : Fintype n\ninst✝⁴ : Fintype o\ninst✝³ : DecidableEq n\nb : Basis n R₂ M₂\nM₂' : Type u_13\ninst✝² : AddCommMonoid M₂'\ninst✝¹ : Module R₂ M₂'\nc : Basis o R₂ M₂'\ninst✝ : DecidableEq o\nB : BilinForm R₂ M₂\nl r : M₂' →ₗ[R₂] M₂\n⊢ ↑(toMatrix c) (comp B l r) = (↑(LinearMap.toMatrix c b) l)ᵀ * ↑(toMatrix b) B * ↑(LinearMap.toMatrix c b) r\n[PROOFSTEP]\next i j\n[GOAL]\ncase a.h\nR : Type u_1\nM : Type u_2\ninst✝²⁰ : Semiring R\ninst✝¹⁹ : AddCommMonoid M\ninst✝¹⁸ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁷ : Ring R₁\ninst✝¹⁶ : AddCommGroup M₁\ninst✝¹⁵ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁴ : CommSemiring R₂\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝¹¹ : CommRing R₃\ninst✝¹⁰ : AddCommGroup M₃\ninst✝⁹ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁸ : Field K\ninst✝⁷ : AddCommGroup V\ninst✝⁶ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\no : Type u_12\ninst✝⁵ : Fintype n\ninst✝⁴ : Fintype o\ninst✝³ : DecidableEq n\nb : Basis n R₂ M₂\nM₂' : Type u_13\ninst✝² : AddCommMonoid M₂'\ninst✝¹ : Module R₂ M₂'\nc : Basis o R₂ M₂'\ninst✝ : DecidableEq o\nB : BilinForm R₂ M₂\nl r : M₂' →ₗ[R₂] M₂\ni j : o\n⊢ ↑(toMatrix c) (comp B l r) i j = ((↑(LinearMap.toMatrix c b) l)ᵀ * ↑(toMatrix b) B * ↑(LinearMap.toMatrix c b) r) i j\n[PROOFSTEP]\nsimp only [BilinForm.toMatrix_apply, BilinForm.comp_apply, transpose_apply, Matrix.mul_apply, LinearMap.toMatrix',\n  LinearEquiv.coe_mk, sum_mul]\n[GOAL]\ncase a.h\nR : Type u_1\nM : Type u_2\ninst✝²⁰ : Semiring R\ninst✝¹⁹ : AddCommMonoid M\ninst✝¹⁸ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁷ : Ring R₁\ninst✝¹⁶ : AddCommGroup M₁\ninst✝¹⁵ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁴ : CommSemiring R₂\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝¹¹ : CommRing R₃\ninst✝¹⁰ : AddCommGroup M₃\ninst✝⁹ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁸ : Field K\ninst✝⁷ : AddCommGroup V\ninst✝⁶ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\no : Type u_12\ninst✝⁵ : Fintype n\ninst✝⁴ : Fintype o\ninst✝³ : DecidableEq n\nb : Basis n R₂ M₂\nM₂' : Type u_13\ninst✝² : AddCommMonoid M₂'\ninst✝¹ : Module R₂ M₂'\nc : Basis o R₂ M₂'\ninst✝ : DecidableEq o\nB : BilinForm R₂ M₂\nl r : M₂' →ₗ[R₂] M₂\ni j : o\n⊢ bilin B (↑l (↑c i)) (↑r (↑c j)) =\n    ∑ x : n, ∑ x_1 : n, ↑(LinearMap.toMatrix c b) l x_1 i * bilin B (↑b x_1) (↑b x) * ↑(LinearMap.toMatrix c b) r x j\n[PROOFSTEP]\nrw [sum_comm]\n[GOAL]\ncase a.h\nR : Type u_1\nM : Type u_2\ninst✝²⁰ : Semiring R\ninst✝¹⁹ : AddCommMonoid M\ninst✝¹⁸ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁷ : Ring R₁\ninst✝¹⁶ : AddCommGroup M₁\ninst✝¹⁵ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁴ : CommSemiring R₂\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝¹¹ : CommRing R₃\ninst✝¹⁰ : AddCommGroup M₃\ninst✝⁹ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁸ : Field K\ninst✝⁷ : AddCommGroup V\ninst✝⁶ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\no : Type u_12\ninst✝⁵ : Fintype n\ninst✝⁴ : Fintype o\ninst✝³ : DecidableEq n\nb : Basis n R₂ M₂\nM₂' : Type u_13\ninst✝² : AddCommMonoid M₂'\ninst✝¹ : Module R₂ M₂'\nc : Basis o R₂ M₂'\ninst✝ : DecidableEq o\nB : BilinForm R₂ M₂\nl r : M₂' →ₗ[R₂] M₂\ni j : o\n⊢ bilin B (↑l (↑c i)) (↑r (↑c j)) =\n    ∑ y : n, ∑ x : n, ↑(LinearMap.toMatrix c b) l y i * bilin B (↑b y) (↑b x) * ↑(LinearMap.toMatrix c b) r x j\n[PROOFSTEP]\nconv_lhs => rw [← BilinForm.sum_repr_mul_repr_mul b]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝²⁰ : Semiring R\ninst✝¹⁹ : AddCommMonoid M\ninst✝¹⁸ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁷ : Ring R₁\ninst✝¹⁶ : AddCommGroup M₁\ninst✝¹⁵ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁴ : CommSemiring R₂\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝¹¹ : CommRing R₃\ninst✝¹⁰ : AddCommGroup M₃\ninst✝⁹ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁸ : Field K\ninst✝⁷ : AddCommGroup V\ninst✝⁶ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\no : Type u_12\ninst✝⁵ : Fintype n\ninst✝⁴ : Fintype o\ninst✝³ : DecidableEq n\nb : Basis n R₂ M₂\nM₂' : Type u_13\ninst✝² : AddCommMonoid M₂'\ninst✝¹ : Module R₂ M₂'\nc : Basis o R₂ M₂'\ninst✝ : DecidableEq o\nB : BilinForm R₂ M₂\nl r : M₂' →ₗ[R₂] M₂\ni j : o\n| bilin B (↑l (↑c i)) (↑r (↑c j))\n[PROOFSTEP]\nrw [← BilinForm.sum_repr_mul_repr_mul b]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝²⁰ : Semiring R\ninst✝¹⁹ : AddCommMonoid M\ninst✝¹⁸ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁷ : Ring R₁\ninst✝¹⁶ : AddCommGroup M₁\ninst✝¹⁵ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁴ : CommSemiring R₂\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝¹¹ : CommRing R₃\ninst✝¹⁰ : AddCommGroup M₃\ninst✝⁹ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁸ : Field K\ninst✝⁷ : AddCommGroup V\ninst✝⁶ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\no : Type u_12\ninst✝⁵ : Fintype n\ninst✝⁴ : Fintype o\ninst✝³ : DecidableEq n\nb : Basis n R₂ M₂\nM₂' : Type u_13\ninst✝² : AddCommMonoid M₂'\ninst✝¹ : Module R₂ M₂'\nc : Basis o R₂ M₂'\ninst✝ : DecidableEq o\nB : BilinForm R₂ M₂\nl r : M₂' →ₗ[R₂] M₂\ni j : o\n| bilin B (↑l (↑c i)) (↑r (↑c j))\n[PROOFSTEP]\nrw [← BilinForm.sum_repr_mul_repr_mul b]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝²⁰ : Semiring R\ninst✝¹⁹ : AddCommMonoid M\ninst✝¹⁸ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁷ : Ring R₁\ninst✝¹⁶ : AddCommGroup M₁\ninst✝¹⁵ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁴ : CommSemiring R₂\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝¹¹ : CommRing R₃\ninst✝¹⁰ : AddCommGroup M₃\ninst✝⁹ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁸ : Field K\ninst✝⁷ : AddCommGroup V\ninst✝⁶ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\no : Type u_12\ninst✝⁵ : Fintype n\ninst✝⁴ : Fintype o\ninst✝³ : DecidableEq n\nb : Basis n R₂ M₂\nM₂' : Type u_13\ninst✝² : AddCommMonoid M₂'\ninst✝¹ : Module R₂ M₂'\nc : Basis o R₂ M₂'\ninst✝ : DecidableEq o\nB : BilinForm R₂ M₂\nl r : M₂' →ₗ[R₂] M₂\ni j : o\n| bilin B (↑l (↑c i)) (↑r (↑c j))\n[PROOFSTEP]\nrw [← BilinForm.sum_repr_mul_repr_mul b]\n[GOAL]\ncase a.h\nR : Type u_1\nM : Type u_2\ninst✝²⁰ : Semiring R\ninst✝¹⁹ : AddCommMonoid M\ninst✝¹⁸ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁷ : Ring R₁\ninst✝¹⁶ : AddCommGroup M₁\ninst✝¹⁵ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁴ : CommSemiring R₂\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝¹¹ : CommRing R₃\ninst✝¹⁰ : AddCommGroup M₃\ninst✝⁹ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁸ : Field K\ninst✝⁷ : AddCommGroup V\ninst✝⁶ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\no : Type u_12\ninst✝⁵ : Fintype n\ninst✝⁴ : Fintype o\ninst✝³ : DecidableEq n\nb : Basis n R₂ M₂\nM₂' : Type u_13\ninst✝² : AddCommMonoid M₂'\ninst✝¹ : Module R₂ M₂'\nc : Basis o R₂ M₂'\ninst✝ : DecidableEq o\nB : BilinForm R₂ M₂\nl r : M₂' →ₗ[R₂] M₂\ni j : o\n⊢ (Finsupp.sum (↑b.repr (↑l (↑c i))) fun i xi =>\n      Finsupp.sum (↑b.repr (↑r (↑c j))) fun j yj => xi • yj • bilin B (↑b i) (↑b j)) =\n    ∑ y : n, ∑ x : n, ↑(LinearMap.toMatrix c b) l y i * bilin B (↑b y) (↑b x) * ↑(LinearMap.toMatrix c b) r x j\n[PROOFSTEP]\nrw [Finsupp.sum_fintype]\n[GOAL]\ncase a.h\nR : Type u_1\nM : Type u_2\ninst✝²⁰ : Semiring R\ninst✝¹⁹ : AddCommMonoid M\ninst✝¹⁸ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁷ : Ring R₁\ninst✝¹⁶ : AddCommGroup M₁\ninst✝¹⁵ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁴ : CommSemiring R₂\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝¹¹ : CommRing R₃\ninst✝¹⁰ : AddCommGroup M₃\ninst✝⁹ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁸ : Field K\ninst✝⁷ : AddCommGroup V\ninst✝⁶ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\no : Type u_12\ninst✝⁵ : Fintype n\ninst✝⁴ : Fintype o\ninst✝³ : DecidableEq n\nb : Basis n R₂ M₂\nM₂' : Type u_13\ninst✝² : AddCommMonoid M₂'\ninst✝¹ : Module R₂ M₂'\nc : Basis o R₂ M₂'\ninst✝ : DecidableEq o\nB : BilinForm R₂ M₂\nl r : M₂' →ₗ[R₂] M₂\ni j : o\n⊢ (∑ i_1 : n, Finsupp.sum (↑b.repr (↑r (↑c j))) fun j yj => ↑(↑b.repr (↑l (↑c i))) i_1 • yj • bilin B (↑b i_1) (↑b j)) =\n    ∑ y : n, ∑ x : n, ↑(LinearMap.toMatrix c b) l y i * bilin B (↑b y) (↑b x) * ↑(LinearMap.toMatrix c b) r x j\n[PROOFSTEP]\napply sum_congr rfl\n[GOAL]\ncase a.h\nR : Type u_1\nM : Type u_2\ninst✝²⁰ : Semiring R\ninst✝¹⁹ : AddCommMonoid M\ninst✝¹⁸ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁷ : Ring R₁\ninst✝¹⁶ : AddCommGroup M₁\ninst✝¹⁵ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁴ : CommSemiring R₂\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝¹¹ : CommRing R₃\ninst✝¹⁰ : AddCommGroup M₃\ninst✝⁹ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁸ : Field K\ninst✝⁷ : AddCommGroup V\ninst✝⁶ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\no : Type u_12\ninst✝⁵ : Fintype n\ninst✝⁴ : Fintype o\ninst✝³ : DecidableEq n\nb : Basis n R₂ M₂\nM₂' : Type u_13\ninst✝² : AddCommMonoid M₂'\ninst✝¹ : Module R₂ M₂'\nc : Basis o R₂ M₂'\ninst✝ : DecidableEq o\nB : BilinForm R₂ M₂\nl r : M₂' →ₗ[R₂] M₂\ni j : o\n⊢ ∀ (x : n),\n    x ∈ univ →\n      (Finsupp.sum (↑b.repr (↑r (↑c j))) fun j yj => ↑(↑b.repr (↑l (↑c i))) x • yj • bilin B (↑b x) (↑b j)) =\n        ∑ x_1 : n, ↑(LinearMap.toMatrix c b) l x i * bilin B (↑b x) (↑b x_1) * ↑(LinearMap.toMatrix c b) r x_1 j\n[PROOFSTEP]\nrintro i' -\n[GOAL]\ncase a.h\nR : Type u_1\nM : Type u_2\ninst✝²⁰ : Semiring R\ninst✝¹⁹ : AddCommMonoid M\ninst✝¹⁸ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁷ : Ring R₁\ninst✝¹⁶ : AddCommGroup M₁\ninst✝¹⁵ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁴ : CommSemiring R₂\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝¹¹ : CommRing R₃\ninst✝¹⁰ : AddCommGroup M₃\ninst✝⁹ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁸ : Field K\ninst✝⁷ : AddCommGroup V\ninst✝⁶ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\no : Type u_12\ninst✝⁵ : Fintype n\ninst✝⁴ : Fintype o\ninst✝³ : DecidableEq n\nb : Basis n R₂ M₂\nM₂' : Type u_13\ninst✝² : AddCommMonoid M₂'\ninst✝¹ : Module R₂ M₂'\nc : Basis o R₂ M₂'\ninst✝ : DecidableEq o\nB : BilinForm R₂ M₂\nl r : M₂' →ₗ[R₂] M₂\ni j : o\ni' : n\n⊢ (Finsupp.sum (↑b.repr (↑r (↑c j))) fun j yj => ↑(↑b.repr (↑l (↑c i))) i' • yj • bilin B (↑b i') (↑b j)) =\n    ∑ x : n, ↑(LinearMap.toMatrix c b) l i' i * bilin B (↑b i') (↑b x) * ↑(LinearMap.toMatrix c b) r x j\n[PROOFSTEP]\nrw [Finsupp.sum_fintype]\n[GOAL]\ncase a.h\nR : Type u_1\nM : Type u_2\ninst✝²⁰ : Semiring R\ninst✝¹⁹ : AddCommMonoid M\ninst✝¹⁸ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁷ : Ring R₁\ninst✝¹⁶ : AddCommGroup M₁\ninst✝¹⁵ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁴ : CommSemiring R₂\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝¹¹ : CommRing R₃\ninst✝¹⁰ : AddCommGroup M₃\ninst✝⁹ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁸ : Field K\ninst✝⁷ : AddCommGroup V\ninst✝⁶ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\no : Type u_12\ninst✝⁵ : Fintype n\ninst✝⁴ : Fintype o\ninst✝³ : DecidableEq n\nb : Basis n R₂ M₂\nM₂' : Type u_13\ninst✝² : AddCommMonoid M₂'\ninst✝¹ : Module R₂ M₂'\nc : Basis o R₂ M₂'\ninst✝ : DecidableEq o\nB : BilinForm R₂ M₂\nl r : M₂' →ₗ[R₂] M₂\ni j : o\ni' : n\n⊢ ∑ i_1 : n, ↑(↑b.repr (↑l (↑c i))) i' • ↑(↑b.repr (↑r (↑c j))) i_1 • bilin B (↑b i') (↑b i_1) =\n    ∑ x : n, ↑(LinearMap.toMatrix c b) l i' i * bilin B (↑b i') (↑b x) * ↑(LinearMap.toMatrix c b) r x j\n[PROOFSTEP]\napply sum_congr rfl\n[GOAL]\ncase a.h\nR : Type u_1\nM : Type u_2\ninst✝²⁰ : Semiring R\ninst✝¹⁹ : AddCommMonoid M\ninst✝¹⁸ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁷ : Ring R₁\ninst✝¹⁶ : AddCommGroup M₁\ninst✝¹⁵ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁴ : CommSemiring R₂\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝¹¹ : CommRing R₃\ninst✝¹⁰ : AddCommGroup M₃\ninst✝⁹ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁸ : Field K\ninst✝⁷ : AddCommGroup V\ninst✝⁶ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\no : Type u_12\ninst✝⁵ : Fintype n\ninst✝⁴ : Fintype o\ninst✝³ : DecidableEq n\nb : Basis n R₂ M₂\nM₂' : Type u_13\ninst✝² : AddCommMonoid M₂'\ninst✝¹ : Module R₂ M₂'\nc : Basis o R₂ M₂'\ninst✝ : DecidableEq o\nB : BilinForm R₂ M₂\nl r : M₂' →ₗ[R₂] M₂\ni j : o\ni' : n\n⊢ ∀ (x : n),\n    x ∈ univ →\n      ↑(↑b.repr (↑l (↑c i))) i' • ↑(↑b.repr (↑r (↑c j))) x • bilin B (↑b i') (↑b x) =\n        ↑(LinearMap.toMatrix c b) l i' i * bilin B (↑b i') (↑b x) * ↑(LinearMap.toMatrix c b) r x j\n[PROOFSTEP]\nrintro j' -\n[GOAL]\ncase a.h\nR : Type u_1\nM : Type u_2\ninst✝²⁰ : Semiring R\ninst✝¹⁹ : AddCommMonoid M\ninst✝¹⁸ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁷ : Ring R₁\ninst✝¹⁶ : AddCommGroup M₁\ninst✝¹⁵ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁴ : CommSemiring R₂\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝¹¹ : CommRing R₃\ninst✝¹⁰ : AddCommGroup M₃\ninst✝⁹ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁸ : Field K\ninst✝⁷ : AddCommGroup V\ninst✝⁶ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\no : Type u_12\ninst✝⁵ : Fintype n\ninst✝⁴ : Fintype o\ninst✝³ : DecidableEq n\nb : Basis n R₂ M₂\nM₂' : Type u_13\ninst✝² : AddCommMonoid M₂'\ninst✝¹ : Module R₂ M₂'\nc : Basis o R₂ M₂'\ninst✝ : DecidableEq o\nB : BilinForm R₂ M₂\nl r : M₂' →ₗ[R₂] M₂\ni j : o\ni' j' : n\n⊢ ↑(↑b.repr (↑l (↑c i))) i' • ↑(↑b.repr (↑r (↑c j))) j' • bilin B (↑b i') (↑b j') =\n    ↑(LinearMap.toMatrix c b) l i' i * bilin B (↑b i') (↑b j') * ↑(LinearMap.toMatrix c b) r j' j\n[PROOFSTEP]\nsimp only [smul_eq_mul, LinearMap.toMatrix_apply, Basis.equivFun_apply, mul_assoc, mul_comm, mul_left_comm]\n[GOAL]\ncase a.h.h\nR : Type u_1\nM : Type u_2\ninst✝²⁰ : Semiring R\ninst✝¹⁹ : AddCommMonoid M\ninst✝¹⁸ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁷ : Ring R₁\ninst✝¹⁶ : AddCommGroup M₁\ninst✝¹⁵ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁴ : CommSemiring R₂\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝¹¹ : CommRing R₃\ninst✝¹⁰ : AddCommGroup M₃\ninst✝⁹ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁸ : Field K\ninst✝⁷ : AddCommGroup V\ninst✝⁶ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\no : Type u_12\ninst✝⁵ : Fintype n\ninst✝⁴ : Fintype o\ninst✝³ : DecidableEq n\nb : Basis n R₂ M₂\nM₂' : Type u_13\ninst✝² : AddCommMonoid M₂'\ninst✝¹ : Module R₂ M₂'\nc : Basis o R₂ M₂'\ninst✝ : DecidableEq o\nB : BilinForm R₂ M₂\nl r : M₂' →ₗ[R₂] M₂\ni j : o\ni' : n\n⊢ ∀ (i_1 : n), ↑(↑b.repr (↑l (↑c i))) i' • 0 • bilin B (↑b i') (↑b i_1) = 0\n[PROOFSTEP]\nintros\n[GOAL]\ncase a.h.h\nR : Type u_1\nM : Type u_2\ninst✝²⁰ : Semiring R\ninst✝¹⁹ : AddCommMonoid M\ninst✝¹⁸ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁷ : Ring R₁\ninst✝¹⁶ : AddCommGroup M₁\ninst✝¹⁵ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁴ : CommSemiring R₂\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝¹¹ : CommRing R₃\ninst✝¹⁰ : AddCommGroup M₃\ninst✝⁹ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁸ : Field K\ninst✝⁷ : AddCommGroup V\ninst✝⁶ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\no : Type u_12\ninst✝⁵ : Fintype n\ninst✝⁴ : Fintype o\ninst✝³ : DecidableEq n\nb : Basis n R₂ M₂\nM₂' : Type u_13\ninst✝² : AddCommMonoid M₂'\ninst✝¹ : Module R₂ M₂'\nc : Basis o R₂ M₂'\ninst✝ : DecidableEq o\nB : BilinForm R₂ M₂\nl r : M₂' →ₗ[R₂] M₂\ni j : o\ni' i✝ : n\n⊢ ↑(↑b.repr (↑l (↑c i))) i' • 0 • bilin B (↑b i') (↑b i✝) = 0\n[PROOFSTEP]\nsimp only [zero_smul, smul_zero]\n[GOAL]\ncase a.h.h\nR : Type u_1\nM : Type u_2\ninst✝²⁰ : Semiring R\ninst✝¹⁹ : AddCommMonoid M\ninst✝¹⁸ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁷ : Ring R₁\ninst✝¹⁶ : AddCommGroup M₁\ninst✝¹⁵ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁴ : CommSemiring R₂\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝¹¹ : CommRing R₃\ninst✝¹⁰ : AddCommGroup M₃\ninst✝⁹ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁸ : Field K\ninst✝⁷ : AddCommGroup V\ninst✝⁶ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\no : Type u_12\ninst✝⁵ : Fintype n\ninst✝⁴ : Fintype o\ninst✝³ : DecidableEq n\nb : Basis n R₂ M₂\nM₂' : Type u_13\ninst✝² : AddCommMonoid M₂'\ninst✝¹ : Module R₂ M₂'\nc : Basis o R₂ M₂'\ninst✝ : DecidableEq o\nB : BilinForm R₂ M₂\nl r : M₂' →ₗ[R₂] M₂\ni j : o\n⊢ ∀ (i : n), (Finsupp.sum (↑b.repr (↑r (↑c j))) fun j yj => 0 • yj • bilin B (↑b i) (↑b j)) = 0\n[PROOFSTEP]\nintros\n[GOAL]\ncase a.h.h\nR : Type u_1\nM : Type u_2\ninst✝²⁰ : Semiring R\ninst✝¹⁹ : AddCommMonoid M\ninst✝¹⁸ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁷ : Ring R₁\ninst✝¹⁶ : AddCommGroup M₁\ninst✝¹⁵ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁴ : CommSemiring R₂\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝¹¹ : CommRing R₃\ninst✝¹⁰ : AddCommGroup M₃\ninst✝⁹ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁸ : Field K\ninst✝⁷ : AddCommGroup V\ninst✝⁶ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\no : Type u_12\ninst✝⁵ : Fintype n\ninst✝⁴ : Fintype o\ninst✝³ : DecidableEq n\nb : Basis n R₂ M₂\nM₂' : Type u_13\ninst✝² : AddCommMonoid M₂'\ninst✝¹ : Module R₂ M₂'\nc : Basis o R₂ M₂'\ninst✝ : DecidableEq o\nB : BilinForm R₂ M₂\nl r : M₂' →ₗ[R₂] M₂\ni j : o\ni✝ : n\n⊢ (Finsupp.sum (↑b.repr (↑r (↑c j))) fun j yj => 0 • yj • bilin B (↑b i✝) (↑b j)) = 0\n[PROOFSTEP]\nsimp only [zero_smul, Finsupp.sum_zero]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝²⁰ : Semiring R\ninst✝¹⁹ : AddCommMonoid M\ninst✝¹⁸ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁷ : Ring R₁\ninst✝¹⁶ : AddCommGroup M₁\ninst✝¹⁵ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁴ : CommSemiring R₂\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝¹¹ : CommRing R₃\ninst✝¹⁰ : AddCommGroup M₃\ninst✝⁹ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁸ : Field K\ninst✝⁷ : AddCommGroup V\ninst✝⁶ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\no : Type u_12\ninst✝⁵ : Fintype n\ninst✝⁴ : Fintype o\ninst✝³ : DecidableEq n\nb : Basis n R₂ M₂\nM₂' : Type u_13\ninst✝² : AddCommMonoid M₂'\ninst✝¹ : Module R₂ M₂'\nc : Basis o R₂ M₂'\ninst✝ : DecidableEq o\nB : BilinForm R₂ M₂\nf : M₂ →ₗ[R₂] M₂\n⊢ ↑(toMatrix b) (compLeft B f) = (↑(LinearMap.toMatrix b b) f)ᵀ * ↑(toMatrix b) B\n[PROOFSTEP]\nsimp only [compLeft, BilinForm.toMatrix_comp b b, toMatrix_id, Matrix.mul_one]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝²⁰ : Semiring R\ninst✝¹⁹ : AddCommMonoid M\ninst✝¹⁸ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁷ : Ring R₁\ninst✝¹⁶ : AddCommGroup M₁\ninst✝¹⁵ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁴ : CommSemiring R₂\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝¹¹ : CommRing R₃\ninst✝¹⁰ : AddCommGroup M₃\ninst✝⁹ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁸ : Field K\ninst✝⁷ : AddCommGroup V\ninst✝⁶ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\no : Type u_12\ninst✝⁵ : Fintype n\ninst✝⁴ : Fintype o\ninst✝³ : DecidableEq n\nb : Basis n R₂ M₂\nM₂' : Type u_13\ninst✝² : AddCommMonoid M₂'\ninst✝¹ : Module R₂ M₂'\nc : Basis o R₂ M₂'\ninst✝ : DecidableEq o\nB : BilinForm R₂ M₂\nf : M₂ →ₗ[R₂] M₂\n⊢ ↑(toMatrix b) (compRight B f) = ↑(toMatrix b) B * ↑(LinearMap.toMatrix b b) f\n[PROOFSTEP]\nsimp only [BilinForm.compRight, BilinForm.toMatrix_comp b b, toMatrix_id, transpose_one, Matrix.one_mul]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝²⁰ : Semiring R\ninst✝¹⁹ : AddCommMonoid M\ninst✝¹⁸ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁷ : Ring R₁\ninst✝¹⁶ : AddCommGroup M₁\ninst✝¹⁵ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁴ : CommSemiring R₂\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝¹¹ : CommRing R₃\ninst✝¹⁰ : AddCommGroup M₃\ninst✝⁹ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁸ : Field K\ninst✝⁷ : AddCommGroup V\ninst✝⁶ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\no : Type u_12\ninst✝⁵ : Fintype n\ninst✝⁴ : Fintype o\ninst✝³ : DecidableEq n\nb : Basis n R₂ M₂\nM₂' : Type u_13\ninst✝² : AddCommMonoid M₂'\ninst✝¹ : Module R₂ M₂'\nc✝ : Basis o R₂ M₂'\ninst✝ : DecidableEq o\nc : Basis o R₂ M₂\nB : BilinForm R₂ M₂\n⊢ (Basis.toMatrix b ↑c)ᵀ * ↑(toMatrix b) B * Basis.toMatrix b ↑c = ↑(toMatrix c) B\n[PROOFSTEP]\nrw [← LinearMap.toMatrix_id_eq_basis_toMatrix, ← BilinForm.toMatrix_comp, BilinForm.comp_id_id]\n[GOAL]\nR : Type u_1\nM✝ : Type u_2\ninst✝²⁰ : Semiring R\ninst✝¹⁹ : AddCommMonoid M✝\ninst✝¹⁸ : Module R M✝\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁷ : Ring R₁\ninst✝¹⁶ : AddCommGroup M₁\ninst✝¹⁵ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁴ : CommSemiring R₂\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝¹¹ : CommRing R₃\ninst✝¹⁰ : AddCommGroup M₃\ninst✝⁹ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁸ : Field K\ninst✝⁷ : AddCommGroup V\ninst✝⁶ : Module K V\nB✝ : BilinForm R M✝\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\no : Type u_12\ninst✝⁵ : Fintype n\ninst✝⁴ : Fintype o\ninst✝³ : DecidableEq n\nb : Basis n R₂ M₂\nM₂' : Type u_13\ninst✝² : AddCommMonoid M₂'\ninst✝¹ : Module R₂ M₂'\nc : Basis o R₂ M₂'\ninst✝ : DecidableEq o\nB : BilinForm R₂ M₂\nM : Matrix o n R₂\nN : Matrix n o R₂\n⊢ M * ↑(toMatrix b) B * N = ↑(toMatrix c) (comp B (↑(Matrix.toLin c b) Mᵀ) (↑(Matrix.toLin c b) N))\n[PROOFSTEP]\nsimp only [B.toMatrix_comp b c, toMatrix_toLin, transpose_transpose]\n[GOAL]\nR : Type u_1\nM✝ : Type u_2\ninst✝²⁰ : Semiring R\ninst✝¹⁹ : AddCommMonoid M✝\ninst✝¹⁸ : Module R M✝\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁷ : Ring R₁\ninst✝¹⁶ : AddCommGroup M₁\ninst✝¹⁵ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁴ : CommSemiring R₂\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝¹¹ : CommRing R₃\ninst✝¹⁰ : AddCommGroup M₃\ninst✝⁹ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁸ : Field K\ninst✝⁷ : AddCommGroup V\ninst✝⁶ : Module K V\nB✝ : BilinForm R M✝\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\no : Type u_12\ninst✝⁵ : Fintype n\ninst✝⁴ : Fintype o\ninst✝³ : DecidableEq n\nb : Basis n R₂ M₂\nM₂' : Type u_13\ninst✝² : AddCommMonoid M₂'\ninst✝¹ : Module R₂ M₂'\nc : Basis o R₂ M₂'\ninst✝ : DecidableEq o\nB : BilinForm R₂ M₂\nM : Matrix n n R₂\n⊢ M * ↑(toMatrix b) B = ↑(toMatrix b) (compLeft B (↑(Matrix.toLin b b) Mᵀ))\n[PROOFSTEP]\nrw [B.toMatrix_compLeft b, toMatrix_toLin, transpose_transpose]\n[GOAL]\nR : Type u_1\nM✝ : Type u_2\ninst✝²⁰ : Semiring R\ninst✝¹⁹ : AddCommMonoid M✝\ninst✝¹⁸ : Module R M✝\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁷ : Ring R₁\ninst✝¹⁶ : AddCommGroup M₁\ninst✝¹⁵ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁴ : CommSemiring R₂\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝¹¹ : CommRing R₃\ninst✝¹⁰ : AddCommGroup M₃\ninst✝⁹ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁸ : Field K\ninst✝⁷ : AddCommGroup V\ninst✝⁶ : Module K V\nB✝ : BilinForm R M✝\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\no : Type u_12\ninst✝⁵ : Fintype n\ninst✝⁴ : Fintype o\ninst✝³ : DecidableEq n\nb : Basis n R₂ M₂\nM₂' : Type u_13\ninst✝² : AddCommMonoid M₂'\ninst✝¹ : Module R₂ M₂'\nc : Basis o R₂ M₂'\ninst✝ : DecidableEq o\nB : BilinForm R₂ M₂\nM : Matrix n n R₂\n⊢ ↑(toMatrix b) B * M = ↑(toMatrix b) (compRight B (↑(Matrix.toLin b b) M))\n[PROOFSTEP]\nrw [B.toMatrix_compRight b, toMatrix_toLin]\n[GOAL]\nR : Type u_1\nM✝ : Type u_2\ninst✝²⁰ : Semiring R\ninst✝¹⁹ : AddCommMonoid M✝\ninst✝¹⁸ : Module R M✝\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁷ : Ring R₁\ninst✝¹⁶ : AddCommGroup M₁\ninst✝¹⁵ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁴ : CommSemiring R₂\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝¹¹ : CommRing R₃\ninst✝¹⁰ : AddCommGroup M₃\ninst✝⁹ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁸ : Field K\ninst✝⁷ : AddCommGroup V\ninst✝⁶ : Module K V\nB : BilinForm R M✝\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\no : Type u_12\ninst✝⁵ : Fintype n\ninst✝⁴ : Fintype o\ninst✝³ : DecidableEq n\nb : Basis n R₂ M₂\nM₂' : Type u_13\ninst✝² : AddCommMonoid M₂'\ninst✝¹ : Module R₂ M₂'\nc : Basis o R₂ M₂'\ninst✝ : DecidableEq o\nM : Matrix n n R₂\nP Q : Matrix n o R₂\n⊢ ↑(BilinForm.toMatrix c) (BilinForm.comp (↑(toBilin b) M) (↑(toLin c b) P) (↑(toLin c b) Q)) =\n    ↑(BilinForm.toMatrix c) (↑(toBilin c) (Pᵀ * M * Q))\n[PROOFSTEP]\nsimp only [BilinForm.toMatrix_comp b c, BilinForm.toMatrix_toBilin, toMatrix_toLin]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\ninst✝¹ : Fintype n\nb : Basis n R₃ M₃\nJ J₃ A A' : Matrix n n R₃\ninst✝ : DecidableEq n\n⊢ BilinForm.IsAdjointPair (↑toBilin' J) (↑toBilin' J₃) (↑toLin' A) (↑toLin' A') ↔ IsAdjointPair J J₃ A A'\n[PROOFSTEP]\nrw [BilinForm.isAdjointPair_iff_compLeft_eq_compRight]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\ninst✝¹ : Fintype n\nb : Basis n R₃ M₃\nJ J₃ A A' : Matrix n n R₃\ninst✝ : DecidableEq n\n⊢ BilinForm.compLeft (↑toBilin' J₃) (↑toLin' A) = BilinForm.compRight (↑toBilin' J) (↑toLin' A') ↔\n    IsAdjointPair J J₃ A A'\n[PROOFSTEP]\nhave h : ∀ B B' : BilinForm R₃ (n → R₃), B = B' ↔ BilinForm.toMatrix' B = BilinForm.toMatrix' B' :=\n  by\n  intro B B'\n  constructor <;> intro h\n  · rw [h]\n  · exact BilinForm.toMatrix'.injective h\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\ninst✝¹ : Fintype n\nb : Basis n R₃ M₃\nJ J₃ A A' : Matrix n n R₃\ninst✝ : DecidableEq n\n⊢ ∀ (B B' : BilinForm R₃ (n → R₃)), B = B' ↔ ↑BilinForm.toMatrix' B = ↑BilinForm.toMatrix' B'\n[PROOFSTEP]\nintro B B'\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\ninst✝¹ : Fintype n\nb : Basis n R₃ M₃\nJ J₃ A A' : Matrix n n R₃\ninst✝ : DecidableEq n\nB B' : BilinForm R₃ (n → R₃)\n⊢ B = B' ↔ ↑BilinForm.toMatrix' B = ↑BilinForm.toMatrix' B'\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\ninst✝¹ : Fintype n\nb : Basis n R₃ M₃\nJ J₃ A A' : Matrix n n R₃\ninst✝ : DecidableEq n\nB B' : BilinForm R₃ (n → R₃)\n⊢ B = B' → ↑BilinForm.toMatrix' B = ↑BilinForm.toMatrix' B'\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\ninst✝¹ : Fintype n\nb : Basis n R₃ M₃\nJ J₃ A A' : Matrix n n R₃\ninst✝ : DecidableEq n\nB B' : BilinForm R₃ (n → R₃)\n⊢ ↑BilinForm.toMatrix' B = ↑BilinForm.toMatrix' B' → B = B'\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\ninst✝¹ : Fintype n\nb : Basis n R₃ M₃\nJ J₃ A A' : Matrix n n R₃\ninst✝ : DecidableEq n\nB B' : BilinForm R₃ (n → R₃)\nh : B = B'\n⊢ ↑BilinForm.toMatrix' B = ↑BilinForm.toMatrix' B'\n[PROOFSTEP]\nrw [h]\n[GOAL]\ncase mpr\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\ninst✝¹ : Fintype n\nb : Basis n R₃ M₃\nJ J₃ A A' : Matrix n n R₃\ninst✝ : DecidableEq n\nB B' : BilinForm R₃ (n → R₃)\nh : ↑BilinForm.toMatrix' B = ↑BilinForm.toMatrix' B'\n⊢ B = B'\n[PROOFSTEP]\nexact BilinForm.toMatrix'.injective h\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\ninst✝¹ : Fintype n\nb : Basis n R₃ M₃\nJ J₃ A A' : Matrix n n R₃\ninst✝ : DecidableEq n\nh : ∀ (B B' : BilinForm R₃ (n → R₃)), B = B' ↔ ↑BilinForm.toMatrix' B = ↑BilinForm.toMatrix' B'\n⊢ BilinForm.compLeft (↑toBilin' J₃) (↑toLin' A) = BilinForm.compRight (↑toBilin' J) (↑toLin' A') ↔\n    IsAdjointPair J J₃ A A'\n[PROOFSTEP]\nrw [h, BilinForm.toMatrix'_compLeft, BilinForm.toMatrix'_compRight, LinearMap.toMatrix'_toLin',\n  LinearMap.toMatrix'_toLin', BilinForm.toMatrix'_toBilin', BilinForm.toMatrix'_toBilin']\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\ninst✝¹ : Fintype n\nb : Basis n R₃ M₃\nJ J₃ A A' : Matrix n n R₃\ninst✝ : DecidableEq n\nh : ∀ (B B' : BilinForm R₃ (n → R₃)), B = B' ↔ ↑BilinForm.toMatrix' B = ↑BilinForm.toMatrix' B'\n⊢ Aᵀ * J₃ = J * A' ↔ IsAdjointPair J J₃ A A'\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\ninst✝¹ : Fintype n\nb : Basis n R₃ M₃\nJ J₃ A A' : Matrix n n R₃\ninst✝ : DecidableEq n\n⊢ BilinForm.IsAdjointPair (↑(toBilin b) J) (↑(toBilin b) J₃) (↑(toLin b b) A) (↑(toLin b b) A') ↔\n    IsAdjointPair J J₃ A A'\n[PROOFSTEP]\nrw [BilinForm.isAdjointPair_iff_compLeft_eq_compRight]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\ninst✝¹ : Fintype n\nb : Basis n R₃ M₃\nJ J₃ A A' : Matrix n n R₃\ninst✝ : DecidableEq n\n⊢ BilinForm.compLeft (↑(toBilin b) J₃) (↑(toLin b b) A) = BilinForm.compRight (↑(toBilin b) J) (↑(toLin b b) A') ↔\n    IsAdjointPair J J₃ A A'\n[PROOFSTEP]\nhave h : ∀ B B' : BilinForm R₃ M₃, B = B' ↔ BilinForm.toMatrix b B = BilinForm.toMatrix b B' :=\n  by\n  intro B B'\n  constructor <;> intro h\n  · rw [h]\n  · exact (BilinForm.toMatrix b).injective h\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\ninst✝¹ : Fintype n\nb : Basis n R₃ M₃\nJ J₃ A A' : Matrix n n R₃\ninst✝ : DecidableEq n\n⊢ ∀ (B B' : BilinForm R₃ M₃), B = B' ↔ ↑(BilinForm.toMatrix b) B = ↑(BilinForm.toMatrix b) B'\n[PROOFSTEP]\nintro B B'\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\ninst✝¹ : Fintype n\nb : Basis n R₃ M₃\nJ J₃ A A' : Matrix n n R₃\ninst✝ : DecidableEq n\nB B' : BilinForm R₃ M₃\n⊢ B = B' ↔ ↑(BilinForm.toMatrix b) B = ↑(BilinForm.toMatrix b) B'\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\ninst✝¹ : Fintype n\nb : Basis n R₃ M₃\nJ J₃ A A' : Matrix n n R₃\ninst✝ : DecidableEq n\nB B' : BilinForm R₃ M₃\n⊢ B = B' → ↑(BilinForm.toMatrix b) B = ↑(BilinForm.toMatrix b) B'\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\ninst✝¹ : Fintype n\nb : Basis n R₃ M₃\nJ J₃ A A' : Matrix n n R₃\ninst✝ : DecidableEq n\nB B' : BilinForm R₃ M₃\n⊢ ↑(BilinForm.toMatrix b) B = ↑(BilinForm.toMatrix b) B' → B = B'\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\ninst✝¹ : Fintype n\nb : Basis n R₃ M₃\nJ J₃ A A' : Matrix n n R₃\ninst✝ : DecidableEq n\nB B' : BilinForm R₃ M₃\nh : B = B'\n⊢ ↑(BilinForm.toMatrix b) B = ↑(BilinForm.toMatrix b) B'\n[PROOFSTEP]\nrw [h]\n[GOAL]\ncase mpr\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\ninst✝¹ : Fintype n\nb : Basis n R₃ M₃\nJ J₃ A A' : Matrix n n R₃\ninst✝ : DecidableEq n\nB B' : BilinForm R₃ M₃\nh : ↑(BilinForm.toMatrix b) B = ↑(BilinForm.toMatrix b) B'\n⊢ B = B'\n[PROOFSTEP]\nexact (BilinForm.toMatrix b).injective h\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\ninst✝¹ : Fintype n\nb : Basis n R₃ M₃\nJ J₃ A A' : Matrix n n R₃\ninst✝ : DecidableEq n\nh : ∀ (B B' : BilinForm R₃ M₃), B = B' ↔ ↑(BilinForm.toMatrix b) B = ↑(BilinForm.toMatrix b) B'\n⊢ BilinForm.compLeft (↑(toBilin b) J₃) (↑(toLin b b) A) = BilinForm.compRight (↑(toBilin b) J) (↑(toLin b b) A') ↔\n    IsAdjointPair J J₃ A A'\n[PROOFSTEP]\nrw [h, BilinForm.toMatrix_compLeft, BilinForm.toMatrix_compRight, LinearMap.toMatrix_toLin, LinearMap.toMatrix_toLin,\n  BilinForm.toMatrix_toBilin, BilinForm.toMatrix_toBilin]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\ninst✝¹ : Fintype n\nb : Basis n R₃ M₃\nJ J₃ A A' : Matrix n n R₃\ninst✝ : DecidableEq n\nh : ∀ (B B' : BilinForm R₃ M₃), B = B' ↔ ↑(BilinForm.toMatrix b) B = ↑(BilinForm.toMatrix b) B'\n⊢ Aᵀ * J₃ = J * A' ↔ IsAdjointPair J J₃ A A'\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\ninst✝¹ : Fintype n\nb : Basis n R₃ M₃\nJ J₃ A A' : Matrix n n R₃\ninst✝ : DecidableEq n\nP : Matrix n n R₃\nh : IsUnit P\n⊢ IsAdjointPair (Pᵀ * J * P) (Pᵀ * J * P) A A' ↔ IsAdjointPair J J (P * A * P⁻¹) (P * A' * P⁻¹)\n[PROOFSTEP]\nhave h' : IsUnit P.det := P.isUnit_iff_isUnit_det.mp h\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\ninst✝¹ : Fintype n\nb : Basis n R₃ M₃\nJ J₃ A A' : Matrix n n R₃\ninst✝ : DecidableEq n\nP : Matrix n n R₃\nh : IsUnit P\nh' : IsUnit (det P)\n⊢ IsAdjointPair (Pᵀ * J * P) (Pᵀ * J * P) A A' ↔ IsAdjointPair J J (P * A * P⁻¹) (P * A' * P⁻¹)\n[PROOFSTEP]\nlet u := P.nonsingInvUnit h'\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\ninst✝¹ : Fintype n\nb : Basis n R₃ M₃\nJ J₃ A A' : Matrix n n R₃\ninst✝ : DecidableEq n\nP : Matrix n n R₃\nh : IsUnit P\nh' : IsUnit (det P)\nu : (Matrix n n R₃)ˣ := nonsingInvUnit P h'\n⊢ IsAdjointPair (Pᵀ * J * P) (Pᵀ * J * P) A A' ↔ IsAdjointPair J J (P * A * P⁻¹) (P * A' * P⁻¹)\n[PROOFSTEP]\nhave coe_u : (u : Matrix n n R₃) = P := rfl\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\ninst✝¹ : Fintype n\nb : Basis n R₃ M₃\nJ J₃ A A' : Matrix n n R₃\ninst✝ : DecidableEq n\nP : Matrix n n R₃\nh : IsUnit P\nh' : IsUnit (det P)\nu : (Matrix n n R₃)ˣ := nonsingInvUnit P h'\ncoe_u : ↑u = P\n⊢ IsAdjointPair (Pᵀ * J * P) (Pᵀ * J * P) A A' ↔ IsAdjointPair J J (P * A * P⁻¹) (P * A' * P⁻¹)\n[PROOFSTEP]\nhave coe_u_inv : (↑u⁻¹ : Matrix n n R₃) = P⁻¹ := rfl\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\ninst✝¹ : Fintype n\nb : Basis n R₃ M₃\nJ J₃ A A' : Matrix n n R₃\ninst✝ : DecidableEq n\nP : Matrix n n R₃\nh : IsUnit P\nh' : IsUnit (det P)\nu : (Matrix n n R₃)ˣ := nonsingInvUnit P h'\ncoe_u : ↑u = P\ncoe_u_inv : ↑u⁻¹ = P⁻¹\n⊢ IsAdjointPair (Pᵀ * J * P) (Pᵀ * J * P) A A' ↔ IsAdjointPair J J (P * A * P⁻¹) (P * A' * P⁻¹)\n[PROOFSTEP]\nlet v := Pᵀ.nonsingInvUnit (P.isUnit_det_transpose h')\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\ninst✝¹ : Fintype n\nb : Basis n R₃ M₃\nJ J₃ A A' : Matrix n n R₃\ninst✝ : DecidableEq n\nP : Matrix n n R₃\nh : IsUnit P\nh' : IsUnit (det P)\nu : (Matrix n n R₃)ˣ := nonsingInvUnit P h'\ncoe_u : ↑u = P\ncoe_u_inv : ↑u⁻¹ = P⁻¹\nv : (Matrix n n R₃)ˣ := nonsingInvUnit Pᵀ (_ : IsUnit (det Pᵀ))\n⊢ IsAdjointPair (Pᵀ * J * P) (Pᵀ * J * P) A A' ↔ IsAdjointPair J J (P * A * P⁻¹) (P * A' * P⁻¹)\n[PROOFSTEP]\nhave coe_v : (v : Matrix n n R₃) = Pᵀ := rfl\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\ninst✝¹ : Fintype n\nb : Basis n R₃ M₃\nJ J₃ A A' : Matrix n n R₃\ninst✝ : DecidableEq n\nP : Matrix n n R₃\nh : IsUnit P\nh' : IsUnit (det P)\nu : (Matrix n n R₃)ˣ := nonsingInvUnit P h'\ncoe_u : ↑u = P\ncoe_u_inv : ↑u⁻¹ = P⁻¹\nv : (Matrix n n R₃)ˣ := nonsingInvUnit Pᵀ (_ : IsUnit (det Pᵀ))\ncoe_v : ↑v = Pᵀ\n⊢ IsAdjointPair (Pᵀ * J * P) (Pᵀ * J * P) A A' ↔ IsAdjointPair J J (P * A * P⁻¹) (P * A' * P⁻¹)\n[PROOFSTEP]\nhave coe_v_inv : (↑v⁻¹ : Matrix n n R₃) = P⁻¹ᵀ := P.transpose_nonsing_inv.symm\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\ninst✝¹ : Fintype n\nb : Basis n R₃ M₃\nJ J₃ A A' : Matrix n n R₃\ninst✝ : DecidableEq n\nP : Matrix n n R₃\nh : IsUnit P\nh' : IsUnit (det P)\nu : (Matrix n n R₃)ˣ := nonsingInvUnit P h'\ncoe_u : ↑u = P\ncoe_u_inv : ↑u⁻¹ = P⁻¹\nv : (Matrix n n R₃)ˣ := nonsingInvUnit Pᵀ (_ : IsUnit (det Pᵀ))\ncoe_v : ↑v = Pᵀ\ncoe_v_inv : ↑v⁻¹ = P⁻¹ᵀ\n⊢ IsAdjointPair (Pᵀ * J * P) (Pᵀ * J * P) A A' ↔ IsAdjointPair J J (P * A * P⁻¹) (P * A' * P⁻¹)\n[PROOFSTEP]\nset x := Aᵀ * Pᵀ * J with x_def\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\ninst✝¹ : Fintype n\nb : Basis n R₃ M₃\nJ J₃ A A' : Matrix n n R₃\ninst✝ : DecidableEq n\nP : Matrix n n R₃\nh : IsUnit P\nh' : IsUnit (det P)\nu : (Matrix n n R₃)ˣ := nonsingInvUnit P h'\ncoe_u : ↑u = P\ncoe_u_inv : ↑u⁻¹ = P⁻¹\nv : (Matrix n n R₃)ˣ := nonsingInvUnit Pᵀ (_ : IsUnit (det Pᵀ))\ncoe_v : ↑v = Pᵀ\ncoe_v_inv : ↑v⁻¹ = P⁻¹ᵀ\nx : Matrix n n R₃ := Aᵀ * Pᵀ * J\nx_def : x = Aᵀ * Pᵀ * J\n⊢ IsAdjointPair (Pᵀ * J * P) (Pᵀ * J * P) A A' ↔ IsAdjointPair J J (P * A * P⁻¹) (P * A' * P⁻¹)\n[PROOFSTEP]\nset y := J * P * A' with y_def\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\ninst✝¹ : Fintype n\nb : Basis n R₃ M₃\nJ J₃ A A' : Matrix n n R₃\ninst✝ : DecidableEq n\nP : Matrix n n R₃\nh : IsUnit P\nh' : IsUnit (det P)\nu : (Matrix n n R₃)ˣ := nonsingInvUnit P h'\ncoe_u : ↑u = P\ncoe_u_inv : ↑u⁻¹ = P⁻¹\nv : (Matrix n n R₃)ˣ := nonsingInvUnit Pᵀ (_ : IsUnit (det Pᵀ))\ncoe_v : ↑v = Pᵀ\ncoe_v_inv : ↑v⁻¹ = P⁻¹ᵀ\nx : Matrix n n R₃ := Aᵀ * Pᵀ * J\nx_def : x = Aᵀ * Pᵀ * J\ny : Matrix n n R₃ := J * P * A'\ny_def : y = J * P * A'\n⊢ IsAdjointPair (Pᵀ * J * P) (Pᵀ * J * P) A A' ↔ IsAdjointPair J J (P * A * P⁻¹) (P * A' * P⁻¹)\n[PROOFSTEP]\nsimp only [Matrix.IsAdjointPair]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\ninst✝¹ : Fintype n\nb : Basis n R₃ M₃\nJ J₃ A A' : Matrix n n R₃\ninst✝ : DecidableEq n\nP : Matrix n n R₃\nh : IsUnit P\nh' : IsUnit (det P)\nu : (Matrix n n R₃)ˣ := nonsingInvUnit P h'\ncoe_u : ↑u = P\ncoe_u_inv : ↑u⁻¹ = P⁻¹\nv : (Matrix n n R₃)ˣ := nonsingInvUnit Pᵀ (_ : IsUnit (det Pᵀ))\ncoe_v : ↑v = Pᵀ\ncoe_v_inv : ↑v⁻¹ = P⁻¹ᵀ\nx : Matrix n n R₃ := Aᵀ * Pᵀ * J\nx_def : x = Aᵀ * Pᵀ * J\ny : Matrix n n R₃ := J * P * A'\ny_def : y = J * P * A'\n⊢ Aᵀ * (Pᵀ * J * P) = Pᵀ * J * P * A' ↔ (P * A * P⁻¹)ᵀ * J = J * (P * A' * P⁻¹)\n[PROOFSTEP]\ncalc\n  (Aᵀ * (Pᵀ * J * P) = Pᵀ * J * P * A') ↔ (x * ↑u = ↑v * y) := ?_\n  _ ↔ (↑v⁻¹ * x = y * ↑u⁻¹) := ?_\n  _ ↔ ((P * A * P⁻¹)ᵀ * J = J * (P * A' * P⁻¹)) := ?_\n[GOAL]\ncase calc_1\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\ninst✝¹ : Fintype n\nb : Basis n R₃ M₃\nJ J₃ A A' : Matrix n n R₃\ninst✝ : DecidableEq n\nP : Matrix n n R₃\nh : IsUnit P\nh' : IsUnit (det P)\nu : (Matrix n n R₃)ˣ := nonsingInvUnit P h'\ncoe_u : ↑u = P\ncoe_u_inv : ↑u⁻¹ = P⁻¹\nv : (Matrix n n R₃)ˣ := nonsingInvUnit Pᵀ (_ : IsUnit (det Pᵀ))\ncoe_v : ↑v = Pᵀ\ncoe_v_inv : ↑v⁻¹ = P⁻¹ᵀ\nx : Matrix n n R₃ := Aᵀ * Pᵀ * J\nx_def : x = Aᵀ * Pᵀ * J\ny : Matrix n n R₃ := J * P * A'\ny_def : y = J * P * A'\n⊢ Aᵀ * (Pᵀ * J * P) = Pᵀ * J * P * A' ↔ x * ↑u = ↑v * y\n[PROOFSTEP]\nsimp only [mul_assoc, x_def, y_def, coe_u, coe_v]\n[GOAL]\ncase calc_2\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\ninst✝¹ : Fintype n\nb : Basis n R₃ M₃\nJ J₃ A A' : Matrix n n R₃\ninst✝ : DecidableEq n\nP : Matrix n n R₃\nh : IsUnit P\nh' : IsUnit (det P)\nu : (Matrix n n R₃)ˣ := nonsingInvUnit P h'\ncoe_u : ↑u = P\ncoe_u_inv : ↑u⁻¹ = P⁻¹\nv : (Matrix n n R₃)ˣ := nonsingInvUnit Pᵀ (_ : IsUnit (det Pᵀ))\ncoe_v : ↑v = Pᵀ\ncoe_v_inv : ↑v⁻¹ = P⁻¹ᵀ\nx : Matrix n n R₃ := Aᵀ * Pᵀ * J\nx_def : x = Aᵀ * Pᵀ * J\ny : Matrix n n R₃ := J * P * A'\ny_def : y = J * P * A'\n⊢ x * ↑u = ↑v * y ↔ ↑v⁻¹ * x = y * ↑u⁻¹\n[PROOFSTEP]\nrw [Units.eq_mul_inv_iff_mul_eq, mul_assoc (↑v⁻¹) x, Units.inv_mul_eq_iff_eq_mul]\n[GOAL]\ncase calc_3\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\ninst✝¹ : Fintype n\nb : Basis n R₃ M₃\nJ J₃ A A' : Matrix n n R₃\ninst✝ : DecidableEq n\nP : Matrix n n R₃\nh : IsUnit P\nh' : IsUnit (det P)\nu : (Matrix n n R₃)ˣ := nonsingInvUnit P h'\ncoe_u : ↑u = P\ncoe_u_inv : ↑u⁻¹ = P⁻¹\nv : (Matrix n n R₃)ˣ := nonsingInvUnit Pᵀ (_ : IsUnit (det Pᵀ))\ncoe_v : ↑v = Pᵀ\ncoe_v_inv : ↑v⁻¹ = P⁻¹ᵀ\nx : Matrix n n R₃ := Aᵀ * Pᵀ * J\nx_def : x = Aᵀ * Pᵀ * J\ny : Matrix n n R₃ := J * P * A'\ny_def : y = J * P * A'\n⊢ ↑v⁻¹ * x = y * ↑u⁻¹ ↔ (P * A * P⁻¹)ᵀ * J = J * (P * A' * P⁻¹)\n[PROOFSTEP]\nrw [x_def, y_def, coe_u_inv, coe_v_inv]\n[GOAL]\ncase calc_3\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\ninst✝¹ : Fintype n\nb : Basis n R₃ M₃\nJ J₃ A A' : Matrix n n R₃\ninst✝ : DecidableEq n\nP : Matrix n n R₃\nh : IsUnit P\nh' : IsUnit (det P)\nu : (Matrix n n R₃)ˣ := nonsingInvUnit P h'\ncoe_u : ↑u = P\ncoe_u_inv : ↑u⁻¹ = P⁻¹\nv : (Matrix n n R₃)ˣ := nonsingInvUnit Pᵀ (_ : IsUnit (det Pᵀ))\ncoe_v : ↑v = Pᵀ\ncoe_v_inv : ↑v⁻¹ = P⁻¹ᵀ\nx : Matrix n n R₃ := Aᵀ * Pᵀ * J\nx_def : x = Aᵀ * Pᵀ * J\ny : Matrix n n R₃ := J * P * A'\ny_def : y = J * P * A'\n⊢ P⁻¹ᵀ * (Aᵀ * Pᵀ * J) = J * P * A' * P⁻¹ ↔ (P * A * P⁻¹)ᵀ * J = J * (P * A' * P⁻¹)\n[PROOFSTEP]\nsimp only [Matrix.mul_assoc, Matrix.transpose_mul]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\ninst✝¹ : Fintype n\nb : Basis n R₃ M₃\nJ J₃ A A' : Matrix n n R₃\ninst✝ : DecidableEq n\n⊢ A ∈ pairSelfAdjointMatricesSubmodule J J₃ ↔ IsAdjointPair J J₃ A A\n[PROOFSTEP]\nsimp only [mem_pairSelfAdjointMatricesSubmodule]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\ninst✝¹ : Fintype n\nb : Basis n R₃ M₃\nJ J₃ A A' : Matrix n n R₃\ninst✝ : DecidableEq n\n⊢ A ∈ selfAdjointMatricesSubmodule J ↔ Matrix.IsSelfAdjoint J A\n[PROOFSTEP]\nsimp only [mem_selfAdjointMatricesSubmodule]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁶ : Semiring R\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹³ : Ring R₁\ninst✝¹² : AddCommGroup M₁\ninst✝¹¹ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹⁰ : CommSemiring R₂\ninst✝⁹ : AddCommMonoid M₂\ninst✝⁸ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝⁷ : CommRing R₃\ninst✝⁶ : AddCommGroup M₃\ninst✝⁵ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nB : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nn : Type u_11\ninst✝¹ : Fintype n\nb : Basis n R₃ M₃\nJ J₃ A A' : Matrix n n R₃\ninst✝ : DecidableEq n\n⊢ A ∈ skewAdjointMatricesSubmodule J ↔ IsSkewAdjoint J A\n[PROOFSTEP]\nsimp only [mem_skewAdjointMatricesSubmodule]\n[GOAL]\nR : Type u_1\nM✝ : Type u_2\ninst✝¹⁹ : Semiring R\ninst✝¹⁸ : AddCommMonoid M✝\ninst✝¹⁷ : Module R M✝\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁶ : Ring R₁\ninst✝¹⁵ : AddCommGroup M₁\ninst✝¹⁴ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹³ : CommSemiring R₂\ninst✝¹² : AddCommMonoid M₂\ninst✝¹¹ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝¹⁰ : CommRing R₃\ninst✝⁹ : AddCommGroup M₃\ninst✝⁸ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁷ : Field K\ninst✝⁶ : AddCommGroup V\ninst✝⁵ : Module K V\nB : BilinForm R M✝\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nA : Type u_11\ninst✝⁴ : CommRing A\ninst✝³ : IsDomain A\ninst✝² : Module A M₃\nB₃ : BilinForm A M₃\nι : Type u_12\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nM : Matrix ι ι R₃\nh : Matrix.Nondegenerate M\nx : ι → R₃\nhx : ∀ (n : ι → R₃), bilin (↑Matrix.toBilin' M) x n = 0\ny : ι → R₃\n⊢ x ⬝ᵥ mulVec M y = 0\n[PROOFSTEP]\nsimpa only [toBilin'_apply'] using hx y\n[GOAL]\nR : Type u_1\nM✝ : Type u_2\ninst✝¹⁹ : Semiring R\ninst✝¹⁸ : AddCommMonoid M✝\ninst✝¹⁷ : Module R M✝\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁶ : Ring R₁\ninst✝¹⁵ : AddCommGroup M₁\ninst✝¹⁴ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹³ : CommSemiring R₂\ninst✝¹² : AddCommMonoid M₂\ninst✝¹¹ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝¹⁰ : CommRing R₃\ninst✝⁹ : AddCommGroup M₃\ninst✝⁸ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁷ : Field K\ninst✝⁶ : AddCommGroup V\ninst✝⁵ : Module K V\nB : BilinForm R M✝\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nA : Type u_11\ninst✝⁴ : CommRing A\ninst✝³ : IsDomain A\ninst✝² : Module A M₃\nB₃ : BilinForm A M₃\nι : Type u_12\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nM : Matrix ι ι R₃\nb : Basis ι R₃ M₃\n⊢ Nondegenerate (↑(toBilin b) M) ↔ Matrix.Nondegenerate M\n[PROOFSTEP]\nrw [← Matrix.nondegenerate_toBilin'_iff_nondegenerate_toBilin, Matrix.nondegenerate_toBilin'_iff]\n[GOAL]\nR : Type u_1\nM✝ : Type u_2\ninst✝¹⁹ : Semiring R\ninst✝¹⁸ : AddCommMonoid M✝\ninst✝¹⁷ : Module R M✝\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁶ : Ring R₁\ninst✝¹⁵ : AddCommGroup M₁\ninst✝¹⁴ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹³ : CommSemiring R₂\ninst✝¹² : AddCommMonoid M₂\ninst✝¹¹ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝¹⁰ : CommRing R₃\ninst✝⁹ : AddCommGroup M₃\ninst✝⁸ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁷ : Field K\ninst✝⁶ : AddCommGroup V\ninst✝⁵ : Module K V\nB : BilinForm R M✝\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nA : Type u_11\ninst✝⁴ : CommRing A\ninst✝³ : IsDomain A\ninst✝² : Module A M₃\nB₃ : BilinForm A M₃\nι : Type u_12\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nM : Matrix ι ι A\n⊢ Nondegenerate (↑toBilin' M) ↔ det M ≠ 0\n[PROOFSTEP]\nrw [Matrix.nondegenerate_toBilin'_iff, Matrix.nondegenerate_iff_det_ne_zero]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝¹⁹ : Semiring R\ninst✝¹⁸ : AddCommMonoid M\ninst✝¹⁷ : Module R M\nR₁ : Type u_3\nM₁ : Type u_4\ninst✝¹⁶ : Ring R₁\ninst✝¹⁵ : AddCommGroup M₁\ninst✝¹⁴ : Module R₁ M₁\nR₂ : Type u_5\nM₂ : Type u_6\ninst✝¹³ : CommSemiring R₂\ninst✝¹² : AddCommMonoid M₂\ninst✝¹¹ : Module R₂ M₂\nR₃ : Type u_7\nM₃ : Type u_8\ninst✝¹⁰ : CommRing R₃\ninst✝⁹ : AddCommGroup M₃\ninst✝⁸ : Module R₃ M₃\nV : Type u_9\nK : Type u_10\ninst✝⁷ : Field K\ninst✝⁶ : AddCommGroup V\ninst✝⁵ : Module K V\nB✝ : BilinForm R M\nB₁ : BilinForm R₁ M₁\nB₂ : BilinForm R₂ M₂\nA : Type u_11\ninst✝⁴ : CommRing A\ninst✝³ : IsDomain A\ninst✝² : Module A M₃\nB₃ : BilinForm A M₃\nι : Type u_12\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nB : BilinForm A M₃\nb : Basis ι A M₃\n⊢ Nondegenerate B ↔ det (↑(toMatrix b) B) ≠ 0\n[PROOFSTEP]\nrw [← Matrix.nondegenerate_iff_det_ne_zero, nondegenerate_toMatrix_iff]\n", "meta": {"mathlib_filename": "Mathlib.LinearAlgebra.Matrix.BilinearForm", "llama_tokens": 66498, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8856314798554444, "lm_q2_score": 0.6076631698328917, "lm_q1q2_score": 0.5381656323527542}}
{"text": "[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace 𝕜 F\nK : Submodule 𝕜 E\na✝ b✝ : E\nhx : a✝ ∈ {v | ∀ (u : E), u ∈ K → inner u v = 0}\nhy : b✝ ∈ {v | ∀ (u : E), u ∈ K → inner u v = 0}\nu : E\nhu : u ∈ K\n⊢ inner u (a✝ + b✝) = 0\n[PROOFSTEP]\nrw [inner_add_right, hx u hu, hy u hu, add_zero]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace 𝕜 F\nK : Submodule 𝕜 E\nc : 𝕜\nx : E\nhx :\n  x ∈\n    {\n          toAddSubsemigroup :=\n            { carrier := {v | ∀ (u : E), u ∈ K → inner u v = 0},\n              add_mem' :=\n                (_ :\n                  ∀ {a b : E},\n                    a ∈ {v | ∀ (u : E), u ∈ K → inner u v = 0} →\n                      b ∈ {v | ∀ (u : E), u ∈ K → inner u v = 0} → ∀ (u : E), u ∈ K → inner u (a + b) = 0) },\n          zero_mem' := (_ : ∀ (x : E), x ∈ K → inner x 0 = 0) }.toAddSubsemigroup.carrier\nu : E\nhu : u ∈ K\n⊢ inner u (c • x) = 0\n[PROOFSTEP]\nrw [inner_smul_right, hx u hu, mul_zero]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace 𝕜 F\nK : Submodule 𝕜 E\nv : E\n⊢ v ∈ Kᗮ ↔ ∀ (u : E), u ∈ K → inner v u = 0\n[PROOFSTEP]\nsimp_rw [mem_orthogonal, inner_eq_zero_symm]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace 𝕜 F\nK : Submodule 𝕜 E\nu v : E\nhu : u ∈ K\nhv : v ∈ Kᗮ\n⊢ inner v u = 0\n[PROOFSTEP]\nrw [inner_eq_zero_symm]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace 𝕜 F\nK : Submodule 𝕜 E\nu v : E\nhu : u ∈ K\nhv : v ∈ Kᗮ\n⊢ inner u v = 0\n[PROOFSTEP]\nexact inner_right_of_mem_orthogonal hu hv\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace 𝕜 F\nK : Submodule 𝕜 E\nu v : E\n⊢ v ∈ (span 𝕜 {u})ᗮ ↔ inner u v = 0\n[PROOFSTEP]\nrefine' ⟨inner_right_of_mem_orthogonal (mem_span_singleton_self u), _⟩\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace 𝕜 F\nK : Submodule 𝕜 E\nu v : E\n⊢ inner u v = 0 → v ∈ (span 𝕜 {u})ᗮ\n[PROOFSTEP]\nintro hv w hw\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace 𝕜 F\nK : Submodule 𝕜 E\nu v : E\nhv : inner u v = 0\nw : E\nhw : w ∈ span 𝕜 {u}\n⊢ inner w v = 0\n[PROOFSTEP]\nrw [mem_span_singleton] at hw \n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace 𝕜 F\nK : Submodule 𝕜 E\nu v : E\nhv : inner u v = 0\nw : E\nhw : ∃ a, a • u = w\n⊢ inner w v = 0\n[PROOFSTEP]\nobtain ⟨c, rfl⟩ := hw\n[GOAL]\ncase intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace 𝕜 F\nK : Submodule 𝕜 E\nu v : E\nhv : inner u v = 0\nc : 𝕜\n⊢ inner (c • u) v = 0\n[PROOFSTEP]\nsimp [inner_smul_left, hv]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace 𝕜 F\nK : Submodule 𝕜 E\nu v : E\n⊢ v ∈ (span 𝕜 {u})ᗮ ↔ inner v u = 0\n[PROOFSTEP]\nrw [mem_orthogonal_singleton_iff_inner_right, inner_eq_zero_symm]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace 𝕜 F\nK : Submodule 𝕜 E\nx y : E\nh : ∀ (v : { x // x ∈ K }), inner x ↑v = inner y ↑v\n⊢ x - y ∈ Kᗮ\n[PROOFSTEP]\nrw [mem_orthogonal']\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace 𝕜 F\nK : Submodule 𝕜 E\nx y : E\nh : ∀ (v : { x // x ∈ K }), inner x ↑v = inner y ↑v\n⊢ ∀ (u : E), u ∈ K → inner (x - y) u = 0\n[PROOFSTEP]\nintro u hu\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace 𝕜 F\nK : Submodule 𝕜 E\nx y : E\nh : ∀ (v : { x // x ∈ K }), inner x ↑v = inner y ↑v\nu : E\nhu : u ∈ K\n⊢ inner (x - y) u = 0\n[PROOFSTEP]\nrw [inner_sub_left, sub_eq_zero]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace 𝕜 F\nK : Submodule 𝕜 E\nx y : E\nh : ∀ (v : { x // x ∈ K }), inner x ↑v = inner y ↑v\nu : E\nhu : u ∈ K\n⊢ inner x u = inner y u\n[PROOFSTEP]\nexact h ⟨u, hu⟩\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace 𝕜 F\nK : Submodule 𝕜 E\nx y : E\nh : ∀ (v : { x // x ∈ K }), inner (↑v) x = inner (↑v) y\n⊢ x - y ∈ Kᗮ\n[PROOFSTEP]\nintro u hu\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace 𝕜 F\nK : Submodule 𝕜 E\nx y : E\nh : ∀ (v : { x // x ∈ K }), inner (↑v) x = inner (↑v) y\nu : E\nhu : u ∈ K\n⊢ inner u (x - y) = 0\n[PROOFSTEP]\nrw [inner_sub_right, sub_eq_zero]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace 𝕜 F\nK : Submodule 𝕜 E\nx y : E\nh : ∀ (v : { x // x ∈ K }), inner (↑v) x = inner (↑v) y\nu : E\nhu : u ∈ K\n⊢ inner u x = inner u y\n[PROOFSTEP]\nexact h ⟨u, hu⟩\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace 𝕜 F\nK : Submodule 𝕜 E\n⊢ K ⊓ Kᗮ = ⊥\n[PROOFSTEP]\nrw [eq_bot_iff]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace 𝕜 F\nK : Submodule 𝕜 E\n⊢ K ⊓ Kᗮ ≤ ⊥\n[PROOFSTEP]\nintro x\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace 𝕜 F\nK : Submodule 𝕜 E\nx : E\n⊢ x ∈ K ⊓ Kᗮ → x ∈ ⊥\n[PROOFSTEP]\nrw [mem_inf]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace 𝕜 F\nK : Submodule 𝕜 E\nx : E\n⊢ x ∈ K ∧ x ∈ Kᗮ → x ∈ ⊥\n[PROOFSTEP]\nexact fun ⟨hx, ho⟩ => inner_self_eq_zero.1 (ho x hx)\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace 𝕜 F\nK : Submodule 𝕜 E\n⊢ Disjoint K Kᗮ\n[PROOFSTEP]\nsimp [disjoint_iff, K.inf_orthogonal_eq_bot]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace 𝕜 F\nK : Submodule 𝕜 E\n⊢ Kᗮ = ⨅ (v : { x // x ∈ K }), LinearMap.ker (↑(innerSL 𝕜) ↑v)\n[PROOFSTEP]\napply le_antisymm\n[GOAL]\ncase a\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace 𝕜 F\nK : Submodule 𝕜 E\n⊢ Kᗮ ≤ ⨅ (v : { x // x ∈ K }), LinearMap.ker (↑(innerSL 𝕜) ↑v)\n[PROOFSTEP]\nrw [le_iInf_iff]\n[GOAL]\ncase a\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace 𝕜 F\nK : Submodule 𝕜 E\n⊢ ∀ (i : { x // x ∈ K }), Kᗮ ≤ LinearMap.ker (↑(innerSL 𝕜) ↑i)\n[PROOFSTEP]\nrintro ⟨v, hv⟩ w hw\n[GOAL]\ncase a.mk\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace 𝕜 F\nK : Submodule 𝕜 E\nv : E\nhv : v ∈ K\nw : E\nhw : w ∈ Kᗮ\n⊢ w ∈ LinearMap.ker (↑(innerSL 𝕜) ↑{ val := v, property := hv })\n[PROOFSTEP]\nsimpa using hw _ hv\n[GOAL]\ncase a\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace 𝕜 F\nK : Submodule 𝕜 E\n⊢ ⨅ (v : { x // x ∈ K }), LinearMap.ker (↑(innerSL 𝕜) ↑v) ≤ Kᗮ\n[PROOFSTEP]\nintro v hv w hw\n[GOAL]\ncase a\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace 𝕜 F\nK : Submodule 𝕜 E\nv : E\nhv : v ∈ ⨅ (v : { x // x ∈ K }), LinearMap.ker (↑(innerSL 𝕜) ↑v)\nw : E\nhw : w ∈ K\n⊢ inner w v = 0\n[PROOFSTEP]\nsimp only [mem_iInf] at hv \n[GOAL]\ncase a\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace 𝕜 F\nK : Submodule 𝕜 E\nv w : E\nhw : w ∈ K\nhv : ∀ (i : { x // x ∈ K }), v ∈ LinearMap.ker (↑(innerSL 𝕜) ↑i)\n⊢ inner w v = 0\n[PROOFSTEP]\nexact hv ⟨w, hw⟩\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace 𝕜 F\nK : Submodule 𝕜 E\n⊢ IsClosed ↑Kᗮ\n[PROOFSTEP]\nrw [orthogonal_eq_inter K]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace 𝕜 F\nK : Submodule 𝕜 E\n⊢ IsClosed ↑(⨅ (v : { x // x ∈ K }), LinearMap.ker (↑(innerSL 𝕜) ↑v))\n[PROOFSTEP]\nhave := fun v : K => ContinuousLinearMap.isClosed_ker (innerSL 𝕜 (v : E))\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace 𝕜 F\nK : Submodule 𝕜 E\nthis : ∀ (v : { x // x ∈ K }), IsClosed ↑(LinearMap.ker (↑(innerSL 𝕜) ↑v))\n⊢ IsClosed ↑(⨅ (v : { x // x ∈ K }), LinearMap.ker (↑(innerSL 𝕜) ↑v))\n[PROOFSTEP]\nconvert isClosed_iInter this\n[GOAL]\ncase h.e'_3\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace 𝕜 F\nK : Submodule 𝕜 E\nthis : ∀ (v : { x // x ∈ K }), IsClosed ↑(LinearMap.ker (↑(innerSL 𝕜) ↑v))\n⊢ ↑(⨅ (v : { x // x ∈ K }), LinearMap.ker (↑(innerSL 𝕜) ↑v)) =\n    ⋂ (i : { x // x ∈ K }), ↑(LinearMap.ker (↑(innerSL 𝕜) ↑i))\n[PROOFSTEP]\nsimp only [iInf_coe]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace 𝕜 F\nK : Submodule 𝕜 E\n⊢ ⊤ᗮ = ⊥\n[PROOFSTEP]\next x\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace 𝕜 F\nK : Submodule 𝕜 E\nx : E\n⊢ x ∈ ⊤ᗮ ↔ x ∈ ⊥\n[PROOFSTEP]\nrw [mem_bot, mem_orthogonal]\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace 𝕜 F\nK : Submodule 𝕜 E\nx : E\n⊢ (∀ (u : E), u ∈ ⊤ → inner u x = 0) ↔ x = 0\n[PROOFSTEP]\nexact\n  ⟨fun h => inner_self_eq_zero.mp (h x mem_top), by\n    rintro rfl\n    simp⟩\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace 𝕜 F\nK : Submodule 𝕜 E\nx : E\n⊢ x = 0 → ∀ (u : E), u ∈ ⊤ → inner u x = 0\n[PROOFSTEP]\nrintro rfl\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace 𝕜 F\nK : Submodule 𝕜 E\n⊢ ∀ (u : E), u ∈ ⊤ → inner u 0 = 0\n[PROOFSTEP]\nsimp\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace 𝕜 F\nK : Submodule 𝕜 E\n⊢ ⊥ᗮ = ⊤\n[PROOFSTEP]\nrw [← top_orthogonal_eq_bot, eq_top_iff]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace 𝕜 F\nK : Submodule 𝕜 E\n⊢ ⊤ ≤ ⊤ᗮᗮ\n[PROOFSTEP]\nexact le_orthogonal_orthogonal ⊤\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace 𝕜 F\nK : Submodule 𝕜 E\n⊢ Kᗮ = ⊤ ↔ K = ⊥\n[PROOFSTEP]\nrefine'\n  ⟨_, by\n    rintro rfl\n    exact bot_orthogonal_eq_top⟩\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace 𝕜 F\nK : Submodule 𝕜 E\n⊢ K = ⊥ → Kᗮ = ⊤\n[PROOFSTEP]\nrintro rfl\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace 𝕜 F\n⊢ ⊥ᗮ = ⊤\n[PROOFSTEP]\nexact bot_orthogonal_eq_top\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace 𝕜 F\nK : Submodule 𝕜 E\n⊢ Kᗮ = ⊤ → K = ⊥\n[PROOFSTEP]\nintro h\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace 𝕜 F\nK : Submodule 𝕜 E\nh : Kᗮ = ⊤\n⊢ K = ⊥\n[PROOFSTEP]\nhave : K ⊓ Kᗮ = ⊥ := K.orthogonal_disjoint.eq_bot\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace 𝕜 F\nK : Submodule 𝕜 E\nh : Kᗮ = ⊤\nthis : K ⊓ Kᗮ = ⊥\n⊢ K = ⊥\n[PROOFSTEP]\nrwa [h, inf_comm, top_inf_eq] at this \n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace 𝕜 F\nU : Submodule 𝕜 E\nV : Set (Submodule 𝕜 E)\n⊢ (∀ (Uᵢ : Submodule 𝕜 E), Uᵢ ∈ V → Uᵢ ⟂ U) ↔ ∀ (Vᵢ : Submodule 𝕜 E), Vᵢ ∈ V → U ⟂ Vᵢ\n[PROOFSTEP]\nsimp_rw [isOrtho_comm]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace 𝕜 F\nι : Sort u_4\nU : Submodule 𝕜 E\nV : ι → Submodule 𝕜 E\n⊢ (∀ (i : ι), V i ⟂ U) ↔ ∀ (i : ι), U ⟂ V i\n[PROOFSTEP]\nsimp_rw [isOrtho_comm]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace 𝕜 F\ns t : Set E\n⊢ span 𝕜 s ⟂ span 𝕜 t ↔ ∀ ⦃u : E⦄, u ∈ s → ∀ ⦃v : E⦄, v ∈ t → inner u v = 0\n[PROOFSTEP]\nsimp_rw [span_eq_iSup_of_singleton_spans s, span_eq_iSup_of_singleton_spans t, isOrtho_iSup_left, isOrtho_iSup_right,\n  isOrtho_iff_le, span_le, Set.subset_def, SetLike.mem_coe, mem_orthogonal_singleton_iff_inner_left,\n  Set.mem_singleton_iff, forall_eq]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace 𝕜 F\nf : E →ₗᵢ[𝕜] F\nU V : Submodule 𝕜 E\nh : U ⟂ V\n⊢ Submodule.map f U ⟂ Submodule.map f V\n[PROOFSTEP]\nrw [isOrtho_iff_inner_eq] at *\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace 𝕜 F\nf : E →ₗᵢ[𝕜] F\nU V : Submodule 𝕜 E\nh : ∀ (u : E), u ∈ U → ∀ (v : E), v ∈ V → inner u v = 0\n⊢ ∀ (u : F), u ∈ Submodule.map f U → ∀ (v : F), v ∈ Submodule.map f V → inner u v = 0\n[PROOFSTEP]\nsimp_rw [mem_map, forall_exists_index, and_imp, forall_apply_eq_imp_iff₂, LinearIsometry.inner_map_map]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace 𝕜 F\nf : E →ₗᵢ[𝕜] F\nU V : Submodule 𝕜 E\nh : ∀ (u : E), u ∈ U → ∀ (v : E), v ∈ V → inner u v = 0\n⊢ ∀ (a : E), a ∈ U → ∀ (a_2 : E), a_2 ∈ V → inner a a_2 = 0\n[PROOFSTEP]\nexact h\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace 𝕜 F\nf : E →ₗᵢ[𝕜] F\nU V : Submodule 𝕜 F\nh : U ⟂ V\n⊢ Submodule.comap f U ⟂ Submodule.comap f V\n[PROOFSTEP]\nrw [isOrtho_iff_inner_eq] at *\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace 𝕜 F\nf : E →ₗᵢ[𝕜] F\nU V : Submodule 𝕜 F\nh : ∀ (u : F), u ∈ U → ∀ (v : F), v ∈ V → inner u v = 0\n⊢ ∀ (u : E), u ∈ Submodule.comap f U → ∀ (v : E), v ∈ Submodule.comap f V → inner u v = 0\n[PROOFSTEP]\nsimp_rw [mem_comap, ← f.inner_map_map]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace 𝕜 F\nf : E →ₗᵢ[𝕜] F\nU V : Submodule 𝕜 F\nh : ∀ (u : F), u ∈ U → ∀ (v : F), v ∈ V → inner u v = 0\n⊢ ∀ (u : E), ↑f u ∈ U → ∀ (v : E), ↑f v ∈ V → inner (↑f u) (↑f v) = 0\n[PROOFSTEP]\nintro u hu v hv\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace 𝕜 F\nf : E →ₗᵢ[𝕜] F\nU V : Submodule 𝕜 F\nh : ∀ (u : F), u ∈ U → ∀ (v : F), v ∈ V → inner u v = 0\nu : E\nhu : ↑f u ∈ U\nv : E\nhv : ↑f v ∈ V\n⊢ inner (↑f u) (↑f v) = 0\n[PROOFSTEP]\nexact h _ hu _ hv\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace 𝕜 F\nf : E ≃ₗᵢ[𝕜] F\nU V : Submodule 𝕜 E\nh : Submodule.map f U ⟂ Submodule.map f V\n⊢ U ⟂ V\n[PROOFSTEP]\nhave hf : ∀ p : Submodule 𝕜 E, (p.map f).comap f.toLinearIsometry = p := comap_map_eq_of_injective f.injective\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace 𝕜 F\nf : E ≃ₗᵢ[𝕜] F\nU V : Submodule 𝕜 E\nh : Submodule.map f U ⟂ Submodule.map f V\nhf : ∀ (p : Submodule 𝕜 E), Submodule.comap (LinearIsometryEquiv.toLinearIsometry f) (Submodule.map f p) = p\n⊢ U ⟂ V\n[PROOFSTEP]\nsimpa only [hf] using h.comap f.toLinearIsometry\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace 𝕜 F\nf : E ≃ₗᵢ[𝕜] F\nU V : Submodule 𝕜 F\nh : Submodule.comap f U ⟂ Submodule.comap f V\n⊢ U ⟂ V\n[PROOFSTEP]\nhave hf : ∀ p : Submodule 𝕜 F, (p.comap f).map f.toLinearIsometry = p := map_comap_eq_of_surjective f.surjective\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace 𝕜 F\nf : E ≃ₗᵢ[𝕜] F\nU V : Submodule 𝕜 F\nh : Submodule.comap f U ⟂ Submodule.comap f V\nhf : ∀ (p : Submodule 𝕜 F), Submodule.map (LinearIsometryEquiv.toLinearIsometry f) (Submodule.comap f p) = p\n⊢ U ⟂ V\n[PROOFSTEP]\nsimpa only [hf] using h.map f.toLinearIsometry\n", "meta": {"mathlib_filename": "Mathlib.Analysis.InnerProductSpace.Orthogonal", "llama_tokens": 10313, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8397339516289533, "lm_q2_score": 0.640635868562172, "lm_q1q2_score": 0.5379636894629595}}
{"text": "[GOAL]\nα : Type u_2\nβ : Type u_1\ninst✝¹ : Preorder α\ninst✝ : Preorder β\ne : α ≃o β\nb : β\n⊢ ↑e ⁻¹' Iic b = Iic (↑(symm e) b)\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nα : Type u_2\nβ : Type u_1\ninst✝¹ : Preorder α\ninst✝ : Preorder β\ne : α ≃o β\nb : β\nx : α\n⊢ x ∈ ↑e ⁻¹' Iic b ↔ x ∈ Iic (↑(symm e) b)\n[PROOFSTEP]\nsimp [← e.le_iff_le]\n[GOAL]\nα : Type u_2\nβ : Type u_1\ninst✝¹ : Preorder α\ninst✝ : Preorder β\ne : α ≃o β\nb : β\n⊢ ↑e ⁻¹' Ici b = Ici (↑(symm e) b)\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nα : Type u_2\nβ : Type u_1\ninst✝¹ : Preorder α\ninst✝ : Preorder β\ne : α ≃o β\nb : β\nx : α\n⊢ x ∈ ↑e ⁻¹' Ici b ↔ x ∈ Ici (↑(symm e) b)\n[PROOFSTEP]\nsimp [← e.le_iff_le]\n[GOAL]\nα : Type u_2\nβ : Type u_1\ninst✝¹ : Preorder α\ninst✝ : Preorder β\ne : α ≃o β\nb : β\n⊢ ↑e ⁻¹' Iio b = Iio (↑(symm e) b)\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nα : Type u_2\nβ : Type u_1\ninst✝¹ : Preorder α\ninst✝ : Preorder β\ne : α ≃o β\nb : β\nx : α\n⊢ x ∈ ↑e ⁻¹' Iio b ↔ x ∈ Iio (↑(symm e) b)\n[PROOFSTEP]\nsimp [← e.lt_iff_lt]\n[GOAL]\nα : Type u_2\nβ : Type u_1\ninst✝¹ : Preorder α\ninst✝ : Preorder β\ne : α ≃o β\nb : β\n⊢ ↑e ⁻¹' Ioi b = Ioi (↑(symm e) b)\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nα : Type u_2\nβ : Type u_1\ninst✝¹ : Preorder α\ninst✝ : Preorder β\ne : α ≃o β\nb : β\nx : α\n⊢ x ∈ ↑e ⁻¹' Ioi b ↔ x ∈ Ioi (↑(symm e) b)\n[PROOFSTEP]\nsimp [← e.lt_iff_lt]\n[GOAL]\nα : Type u_2\nβ : Type u_1\ninst✝¹ : Preorder α\ninst✝ : Preorder β\ne : α ≃o β\na b : β\n⊢ ↑e ⁻¹' Icc a b = Icc (↑(symm e) a) (↑(symm e) b)\n[PROOFSTEP]\nsimp [← Ici_inter_Iic]\n[GOAL]\nα : Type u_2\nβ : Type u_1\ninst✝¹ : Preorder α\ninst✝ : Preorder β\ne : α ≃o β\na b : β\n⊢ ↑e ⁻¹' Ico a b = Ico (↑(symm e) a) (↑(symm e) b)\n[PROOFSTEP]\nsimp [← Ici_inter_Iio]\n[GOAL]\nα : Type u_2\nβ : Type u_1\ninst✝¹ : Preorder α\ninst✝ : Preorder β\ne : α ≃o β\na b : β\n⊢ ↑e ⁻¹' Ioc a b = Ioc (↑(symm e) a) (↑(symm e) b)\n[PROOFSTEP]\nsimp [← Ioi_inter_Iic]\n[GOAL]\nα : Type u_2\nβ : Type u_1\ninst✝¹ : Preorder α\ninst✝ : Preorder β\ne : α ≃o β\na b : β\n⊢ ↑e ⁻¹' Ioo a b = Ioo (↑(symm e) a) (↑(symm e) b)\n[PROOFSTEP]\nsimp [← Ioi_inter_Iio]\n[GOAL]\nα : Type u_2\nβ : Type u_1\ninst✝¹ : Preorder α\ninst✝ : Preorder β\ne : α ≃o β\na : α\n⊢ ↑e '' Iic a = Iic (↑e a)\n[PROOFSTEP]\nrw [e.image_eq_preimage, e.symm.preimage_Iic, e.symm_symm]\n[GOAL]\nα : Type u_2\nβ : Type u_1\ninst✝¹ : Preorder α\ninst✝ : Preorder β\ne : α ≃o β\na : α\n⊢ ↑e '' Iio a = Iio (↑e a)\n[PROOFSTEP]\nrw [e.image_eq_preimage, e.symm.preimage_Iio, e.symm_symm]\n[GOAL]\nα : Type u_2\nβ : Type u_1\ninst✝¹ : Preorder α\ninst✝ : Preorder β\ne : α ≃o β\na b : α\n⊢ ↑e '' Ioo a b = Ioo (↑e a) (↑e b)\n[PROOFSTEP]\nrw [e.image_eq_preimage, e.symm.preimage_Ioo, e.symm_symm]\n[GOAL]\nα : Type u_2\nβ : Type u_1\ninst✝¹ : Preorder α\ninst✝ : Preorder β\ne : α ≃o β\na b : α\n⊢ ↑e '' Ioc a b = Ioc (↑e a) (↑e b)\n[PROOFSTEP]\nrw [e.image_eq_preimage, e.symm.preimage_Ioc, e.symm_symm]\n[GOAL]\nα : Type u_2\nβ : Type u_1\ninst✝¹ : Preorder α\ninst✝ : Preorder β\ne : α ≃o β\na b : α\n⊢ ↑e '' Ico a b = Ico (↑e a) (↑e b)\n[PROOFSTEP]\nrw [e.image_eq_preimage, e.symm.preimage_Ico, e.symm_symm]\n[GOAL]\nα : Type u_2\nβ : Type u_1\ninst✝¹ : Preorder α\ninst✝ : Preorder β\ne : α ≃o β\na b : α\n⊢ ↑e '' Icc a b = Icc (↑e a) (↑e b)\n[PROOFSTEP]\nrw [e.image_eq_preimage, e.symm.preimage_Icc, e.symm_symm]\n[GOAL]\nα : Type ?u.15052\ninst✝¹ : Preorder α\ninst✝ : OrderTop α\nsrc✝ : Subtype (Iic ⊤) ≃ α := Equiv.subtypeUnivEquiv (_ : ∀ (x : α), x ≤ ⊤)\nx y : ↑(Iic ⊤)\n⊢ ↑{ toFun := src✝.toFun, invFun := src✝.invFun, left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),\n            right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }\n        x ≤\n      ↑{ toFun := src✝.toFun, invFun := src✝.invFun, left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),\n            right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }\n        y ↔\n    x ≤ y\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type ?u.15647\ninst✝¹ : Preorder α\ninst✝ : OrderBot α\nsrc✝ : Subtype (Ici ⊥) ≃ α := Equiv.subtypeUnivEquiv (_ : ∀ (x : α), ⊥ ≤ x)\nx y : ↑(Ici ⊥)\n⊢ ↑{ toFun := src✝.toFun, invFun := src✝.invFun, left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),\n            right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }\n        x ≤\n      ↑{ toFun := src✝.toFun, invFun := src✝.invFun, left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),\n            right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }\n        y ↔\n    x ≤ y\n[PROOFSTEP]\nrfl\n", "meta": {"mathlib_filename": "Mathlib.Data.Set.Intervals.OrderIso", "llama_tokens": 2445, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7879311856832191, "lm_q2_score": 0.6825737214979745, "lm_q1q2_score": 0.5378211216961064}}
{"text": "[GOAL]\nx : ℝ\nhx : x ≠ 0\n⊢ HasStrictDerivAt sqrt (1 / (2 * sqrt x)) x ∧ ∀ (n : ℕ∞), ContDiffAt ℝ n sqrt x\n[PROOFSTEP]\ncases' hx.lt_or_lt with hx hx\n[GOAL]\ncase inl\nx : ℝ\nhx✝ : x ≠ 0\nhx : x < 0\n⊢ HasStrictDerivAt sqrt (1 / (2 * sqrt x)) x ∧ ∀ (n : ℕ∞), ContDiffAt ℝ n sqrt x\n[PROOFSTEP]\nrw [sqrt_eq_zero_of_nonpos hx.le, mul_zero, div_zero]\n[GOAL]\ncase inl\nx : ℝ\nhx✝ : x ≠ 0\nhx : x < 0\n⊢ HasStrictDerivAt sqrt 0 x ∧ ∀ (n : ℕ∞), ContDiffAt ℝ n sqrt x\n[PROOFSTEP]\nhave : sqrt =ᶠ[𝓝 x] fun _ => 0 := (gt_mem_nhds hx).mono fun x hx => sqrt_eq_zero_of_nonpos hx.le\n[GOAL]\ncase inl\nx : ℝ\nhx✝ : x ≠ 0\nhx : x < 0\nthis : sqrt =ᶠ[𝓝 x] fun x => 0\n⊢ HasStrictDerivAt sqrt 0 x ∧ ∀ (n : ℕ∞), ContDiffAt ℝ n sqrt x\n[PROOFSTEP]\nexact\n  ⟨(hasStrictDerivAt_const x (0 : ℝ)).congr_of_eventuallyEq this.symm, fun n =>\n    contDiffAt_const.congr_of_eventuallyEq this⟩\n[GOAL]\ncase inr\nx : ℝ\nhx✝ : x ≠ 0\nhx : 0 < x\n⊢ HasStrictDerivAt sqrt (1 / (2 * sqrt x)) x ∧ ∀ (n : ℕ∞), ContDiffAt ℝ n sqrt x\n[PROOFSTEP]\nhave : ↑2 * sqrt x ^ (2 - 1) ≠ 0 := by simp [(sqrt_pos.2 hx).ne', @two_ne_zero ℝ]\n[GOAL]\nx : ℝ\nhx✝ : x ≠ 0\nhx : 0 < x\n⊢ 2 * sqrt x ^ (2 - 1) ≠ 0\n[PROOFSTEP]\nsimp [(sqrt_pos.2 hx).ne', @two_ne_zero ℝ]\n[GOAL]\ncase inr\nx : ℝ\nhx✝ : x ≠ 0\nhx : 0 < x\nthis : 2 * sqrt x ^ (2 - 1) ≠ 0\n⊢ HasStrictDerivAt sqrt (1 / (2 * sqrt x)) x ∧ ∀ (n : ℕ∞), ContDiffAt ℝ n sqrt x\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase inr.left\nx : ℝ\nhx✝ : x ≠ 0\nhx : 0 < x\nthis : 2 * sqrt x ^ (2 - 1) ≠ 0\n⊢ HasStrictDerivAt sqrt (1 / (2 * sqrt x)) x\n[PROOFSTEP]\nsimpa using sqLocalHomeomorph.hasStrictDerivAt_symm hx this (hasStrictDerivAt_pow 2 _)\n[GOAL]\ncase inr.right\nx : ℝ\nhx✝ : x ≠ 0\nhx : 0 < x\nthis : 2 * sqrt x ^ (2 - 1) ≠ 0\n⊢ ∀ (n : ℕ∞), ContDiffAt ℝ n sqrt x\n[PROOFSTEP]\nexact fun n => sqLocalHomeomorph.contDiffAt_symm_deriv this hx (hasDerivAt_pow 2 (sqrt x)) (contDiffAt_id.pow 2)\n[GOAL]\nf : ℝ → ℝ\ns : Set ℝ\nf' x : ℝ\nhf : HasDerivWithinAt f f' s x\nhx : f x ≠ 0\n⊢ HasDerivWithinAt (fun y => Real.sqrt (f y)) (f' / (2 * Real.sqrt (f x))) s x\n[PROOFSTEP]\nsimpa only [(· ∘ ·), div_eq_inv_mul, mul_one] using (hasDerivAt_sqrt hx).comp_hasDerivWithinAt x hf\n[GOAL]\nf : ℝ → ℝ\ns : Set ℝ\nf' x : ℝ\nhf : HasDerivAt f f' x\nhx : f x ≠ 0\n⊢ HasDerivAt (fun y => Real.sqrt (f y)) (f' / (2 * Real.sqrt (f x))) x\n[PROOFSTEP]\nsimpa only [(· ∘ ·), div_eq_inv_mul, mul_one] using (hasDerivAt_sqrt hx).comp x hf\n[GOAL]\nf : ℝ → ℝ\ns : Set ℝ\nf' x : ℝ\nhf : HasStrictDerivAt f f' x\nhx : f x ≠ 0\n⊢ HasStrictDerivAt (fun t => Real.sqrt (f t)) (f' / (2 * Real.sqrt (f x))) x\n[PROOFSTEP]\nsimpa only [(· ∘ ·), div_eq_inv_mul, mul_one] using (hasStrictDerivAt_sqrt hx).comp x hf\n", "meta": {"mathlib_filename": "Mathlib.Analysis.SpecialFunctions.Sqrt", "llama_tokens": 1411, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7690802370707281, "lm_q2_score": 0.6992544335934766, "lm_q1q2_score": 0.5377827655608287}}
{"text": "[GOAL]\nK : Type v\nV : Type w\ninst✝⁵ : Field K\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module K V\ninst✝² : IsAlgClosed K\ninst✝¹ : FiniteDimensional K V\ninst✝ : Nontrivial V\nf : End K V\n⊢ ∃ c, HasEigenvalue f c\n[PROOFSTEP]\nsimp_rw [hasEigenvalue_iff_mem_spectrum]\n[GOAL]\nK : Type v\nV : Type w\ninst✝⁵ : Field K\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module K V\ninst✝² : IsAlgClosed K\ninst✝¹ : FiniteDimensional K V\ninst✝ : Nontrivial V\nf : End K V\n⊢ ∃ c, c ∈ spectrum K f\n[PROOFSTEP]\nexact spectrum.nonempty_of_isAlgClosed_of_finiteDimensional K f\n[GOAL]\nK : Type v\nV : Type w\ninst✝⁴ : Field K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\ninst✝¹ : IsAlgClosed K\ninst✝ : FiniteDimensional K V\nf : End K V\n⊢ ⨆ (μ : K) (k : ℕ), ↑(generalizedEigenspace f μ) k = ⊤\n[PROOFSTEP]\ninduction' h_dim : finrank K V using Nat.strong_induction_on with n ih generalizing V\n[GOAL]\ncase h\nK : Type v\nV✝ : Type w\ninst✝⁷ : Field K\ninst✝⁶ : AddCommGroup V✝\ninst✝⁵ : Module K V✝\ninst✝⁴ : IsAlgClosed K\ninst✝³ : FiniteDimensional K V✝\nf✝ : End K V✝\nx✝ : ℕ\nh_dim✝ : finrank K V✝ = x✝\nn : ℕ\nih :\n  ∀ (m : ℕ),\n    m < n →\n      ∀ {V : Type w} [inst : AddCommGroup V] [inst_1 : Module K V] [inst_2 : FiniteDimensional K V] (f : End K V),\n        finrank K V = m → ⨆ (μ : K) (k : ℕ), ↑(generalizedEigenspace f μ) k = ⊤\nV : Type w\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nf : End K V\nh_dim : finrank K V = n\n⊢ ⨆ (μ : K) (k : ℕ), ↑(generalizedEigenspace f μ) k = ⊤\n[PROOFSTEP]\ncases' n with n\n[GOAL]\ncase h.zero\nK : Type v\nV✝ : Type w\ninst✝⁷ : Field K\ninst✝⁶ : AddCommGroup V✝\ninst✝⁵ : Module K V✝\ninst✝⁴ : IsAlgClosed K\ninst✝³ : FiniteDimensional K V✝\nf✝ : End K V✝\nx✝ : ℕ\nh_dim✝ : finrank K V✝ = x✝\nV : Type w\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nf : End K V\nih :\n  ∀ (m : ℕ),\n    m < Nat.zero →\n      ∀ {V : Type w} [inst : AddCommGroup V] [inst_1 : Module K V] [inst_2 : FiniteDimensional K V] (f : End K V),\n        finrank K V = m → ⨆ (μ : K) (k : ℕ), ↑(generalizedEigenspace f μ) k = ⊤\nh_dim : finrank K V = Nat.zero\n⊢ ⨆ (μ : K) (k : ℕ), ↑(generalizedEigenspace f μ) k = ⊤\n[PROOFSTEP]\nrw [← top_le_iff]\n[GOAL]\ncase h.zero\nK : Type v\nV✝ : Type w\ninst✝⁷ : Field K\ninst✝⁶ : AddCommGroup V✝\ninst✝⁵ : Module K V✝\ninst✝⁴ : IsAlgClosed K\ninst✝³ : FiniteDimensional K V✝\nf✝ : End K V✝\nx✝ : ℕ\nh_dim✝ : finrank K V✝ = x✝\nV : Type w\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nf : End K V\nih :\n  ∀ (m : ℕ),\n    m < Nat.zero →\n      ∀ {V : Type w} [inst : AddCommGroup V] [inst_1 : Module K V] [inst_2 : FiniteDimensional K V] (f : End K V),\n        finrank K V = m → ⨆ (μ : K) (k : ℕ), ↑(generalizedEigenspace f μ) k = ⊤\nh_dim : finrank K V = Nat.zero\n⊢ ⊤ ≤ ⨆ (μ : K) (k : ℕ), ↑(generalizedEigenspace f μ) k\n[PROOFSTEP]\nsimp only [finrank_eq_zero.1 (Eq.trans (finrank_top _ _) h_dim), bot_le]\n  -- Otherwise the vector space is nontrivial.\n[GOAL]\ncase h.succ\nK : Type v\nV✝ : Type w\ninst✝⁷ : Field K\ninst✝⁶ : AddCommGroup V✝\ninst✝⁵ : Module K V✝\ninst✝⁴ : IsAlgClosed K\ninst✝³ : FiniteDimensional K V✝\nf✝ : End K V✝\nx✝ : ℕ\nh_dim✝ : finrank K V✝ = x✝\nV : Type w\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nf : End K V\nn : ℕ\nih :\n  ∀ (m : ℕ),\n    m < Nat.succ n →\n      ∀ {V : Type w} [inst : AddCommGroup V] [inst_1 : Module K V] [inst_2 : FiniteDimensional K V] (f : End K V),\n        finrank K V = m → ⨆ (μ : K) (k : ℕ), ↑(generalizedEigenspace f μ) k = ⊤\nh_dim : finrank K V = Nat.succ n\n⊢ ⨆ (μ : K) (k : ℕ), ↑(generalizedEigenspace f μ) k = ⊤\n[PROOFSTEP]\nhaveI : Nontrivial V :=\n  finrank_pos_iff.1\n    (by rw [h_dim]; apply Nat.zero_lt_succ)\n      -- Hence, `f` has an eigenvalue `μ₀`.\n[GOAL]\nK : Type v\nV✝ : Type w\ninst✝⁷ : Field K\ninst✝⁶ : AddCommGroup V✝\ninst✝⁵ : Module K V✝\ninst✝⁴ : IsAlgClosed K\ninst✝³ : FiniteDimensional K V✝\nf✝ : End K V✝\nx✝ : ℕ\nh_dim✝ : finrank K V✝ = x✝\nV : Type w\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nf : End K V\nn : ℕ\nih :\n  ∀ (m : ℕ),\n    m < Nat.succ n →\n      ∀ {V : Type w} [inst : AddCommGroup V] [inst_1 : Module K V] [inst_2 : FiniteDimensional K V] (f : End K V),\n        finrank K V = m → ⨆ (μ : K) (k : ℕ), ↑(generalizedEigenspace f μ) k = ⊤\nh_dim : finrank K V = Nat.succ n\n⊢ 0 < finrank ?m.10065 V\n[PROOFSTEP]\nrw [h_dim]\n[GOAL]\nK : Type v\nV✝ : Type w\ninst✝⁷ : Field K\ninst✝⁶ : AddCommGroup V✝\ninst✝⁵ : Module K V✝\ninst✝⁴ : IsAlgClosed K\ninst✝³ : FiniteDimensional K V✝\nf✝ : End K V✝\nx✝ : ℕ\nh_dim✝ : finrank K V✝ = x✝\nV : Type w\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nf : End K V\nn : ℕ\nih :\n  ∀ (m : ℕ),\n    m < Nat.succ n →\n      ∀ {V : Type w} [inst : AddCommGroup V] [inst_1 : Module K V] [inst_2 : FiniteDimensional K V] (f : End K V),\n        finrank K V = m → ⨆ (μ : K) (k : ℕ), ↑(generalizedEigenspace f μ) k = ⊤\nh_dim : finrank K V = Nat.succ n\n⊢ 0 < Nat.succ n\n[PROOFSTEP]\napply Nat.zero_lt_succ\n[GOAL]\ncase h.succ\nK : Type v\nV✝ : Type w\ninst✝⁷ : Field K\ninst✝⁶ : AddCommGroup V✝\ninst✝⁵ : Module K V✝\ninst✝⁴ : IsAlgClosed K\ninst✝³ : FiniteDimensional K V✝\nf✝ : End K V✝\nx✝ : ℕ\nh_dim✝ : finrank K V✝ = x✝\nV : Type w\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nf : End K V\nn : ℕ\nih :\n  ∀ (m : ℕ),\n    m < Nat.succ n →\n      ∀ {V : Type w} [inst : AddCommGroup V] [inst_1 : Module K V] [inst_2 : FiniteDimensional K V] (f : End K V),\n        finrank K V = m → ⨆ (μ : K) (k : ℕ), ↑(generalizedEigenspace f μ) k = ⊤\nh_dim : finrank K V = Nat.succ n\nthis : Nontrivial V\n⊢ ⨆ (μ : K) (k : ℕ), ↑(generalizedEigenspace f μ) k = ⊤\n[PROOFSTEP]\nobtain ⟨μ₀, hμ₀⟩ : ∃ μ₀, f.HasEigenvalue μ₀ := exists_eigenvalue f\n[GOAL]\ncase h.succ.intro\nK : Type v\nV✝ : Type w\ninst✝⁷ : Field K\ninst✝⁶ : AddCommGroup V✝\ninst✝⁵ : Module K V✝\ninst✝⁴ : IsAlgClosed K\ninst✝³ : FiniteDimensional K V✝\nf✝ : End K V✝\nx✝ : ℕ\nh_dim✝ : finrank K V✝ = x✝\nV : Type w\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nf : End K V\nn : ℕ\nih :\n  ∀ (m : ℕ),\n    m < Nat.succ n →\n      ∀ {V : Type w} [inst : AddCommGroup V] [inst_1 : Module K V] [inst_2 : FiniteDimensional K V] (f : End K V),\n        finrank K V = m → ⨆ (μ : K) (k : ℕ), ↑(generalizedEigenspace f μ) k = ⊤\nh_dim : finrank K V = Nat.succ n\nthis : Nontrivial V\nμ₀ : K\nhμ₀ : HasEigenvalue f μ₀\n⊢ ⨆ (μ : K) (k : ℕ), ↑(generalizedEigenspace f μ) k = ⊤\n[PROOFSTEP]\nlet ES :=\n  f.generalizedEigenspace μ₀\n    (finrank K V)\n      -- and `ER` to be the generalized eigenrange.\n[GOAL]\ncase h.succ.intro\nK : Type v\nV✝ : Type w\ninst✝⁷ : Field K\ninst✝⁶ : AddCommGroup V✝\ninst✝⁵ : Module K V✝\ninst✝⁴ : IsAlgClosed K\ninst✝³ : FiniteDimensional K V✝\nf✝ : End K V✝\nx✝ : ℕ\nh_dim✝ : finrank K V✝ = x✝\nV : Type w\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nf : End K V\nn : ℕ\nih :\n  ∀ (m : ℕ),\n    m < Nat.succ n →\n      ∀ {V : Type w} [inst : AddCommGroup V] [inst_1 : Module K V] [inst_2 : FiniteDimensional K V] (f : End K V),\n        finrank K V = m → ⨆ (μ : K) (k : ℕ), ↑(generalizedEigenspace f μ) k = ⊤\nh_dim : finrank K V = Nat.succ n\nthis : Nontrivial V\nμ₀ : K\nhμ₀ : HasEigenvalue f μ₀\nES : Submodule K V := ↑(generalizedEigenspace f μ₀) (finrank K V)\n⊢ ⨆ (μ : K) (k : ℕ), ↑(generalizedEigenspace f μ) k = ⊤\n[PROOFSTEP]\nlet ER :=\n  f.generalizedEigenrange μ₀\n    (finrank K V)\n      -- `f` maps `ER` into itself.\n[GOAL]\ncase h.succ.intro\nK : Type v\nV✝ : Type w\ninst✝⁷ : Field K\ninst✝⁶ : AddCommGroup V✝\ninst✝⁵ : Module K V✝\ninst✝⁴ : IsAlgClosed K\ninst✝³ : FiniteDimensional K V✝\nf✝ : End K V✝\nx✝ : ℕ\nh_dim✝ : finrank K V✝ = x✝\nV : Type w\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nf : End K V\nn : ℕ\nih :\n  ∀ (m : ℕ),\n    m < Nat.succ n →\n      ∀ {V : Type w} [inst : AddCommGroup V] [inst_1 : Module K V] [inst_2 : FiniteDimensional K V] (f : End K V),\n        finrank K V = m → ⨆ (μ : K) (k : ℕ), ↑(generalizedEigenspace f μ) k = ⊤\nh_dim : finrank K V = Nat.succ n\nthis : Nontrivial V\nμ₀ : K\nhμ₀ : HasEigenvalue f μ₀\nES : Submodule K V := ↑(generalizedEigenspace f μ₀) (finrank K V)\nER : Submodule K V := generalizedEigenrange f μ₀ (finrank K V)\n⊢ ⨆ (μ : K) (k : ℕ), ↑(generalizedEigenspace f μ) k = ⊤\n[PROOFSTEP]\nhave h_f_ER : ∀ x : V, x ∈ ER → f x ∈ ER := fun x hx =>\n  map_generalizedEigenrange_le\n    (Submodule.mem_map_of_mem hx)\n      -- Therefore, we can define the restriction `f'` of `f` to `ER`.\n[GOAL]\ncase h.succ.intro\nK : Type v\nV✝ : Type w\ninst✝⁷ : Field K\ninst✝⁶ : AddCommGroup V✝\ninst✝⁵ : Module K V✝\ninst✝⁴ : IsAlgClosed K\ninst✝³ : FiniteDimensional K V✝\nf✝ : End K V✝\nx✝ : ℕ\nh_dim✝ : finrank K V✝ = x✝\nV : Type w\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nf : End K V\nn : ℕ\nih :\n  ∀ (m : ℕ),\n    m < Nat.succ n →\n      ∀ {V : Type w} [inst : AddCommGroup V] [inst_1 : Module K V] [inst_2 : FiniteDimensional K V] (f : End K V),\n        finrank K V = m → ⨆ (μ : K) (k : ℕ), ↑(generalizedEigenspace f μ) k = ⊤\nh_dim : finrank K V = Nat.succ n\nthis : Nontrivial V\nμ₀ : K\nhμ₀ : HasEigenvalue f μ₀\nES : Submodule K V := ↑(generalizedEigenspace f μ₀) (finrank K V)\nER : Submodule K V := generalizedEigenrange f μ₀ (finrank K V)\nh_f_ER : ∀ (x : V), x ∈ ER → ↑f x ∈ ER\n⊢ ⨆ (μ : K) (k : ℕ), ↑(generalizedEigenspace f μ) k = ⊤\n[PROOFSTEP]\nlet f' : End K ER := f.restrict h_f_ER\n[GOAL]\ncase h.succ.intro\nK : Type v\nV✝ : Type w\ninst✝⁷ : Field K\ninst✝⁶ : AddCommGroup V✝\ninst✝⁵ : Module K V✝\ninst✝⁴ : IsAlgClosed K\ninst✝³ : FiniteDimensional K V✝\nf✝ : End K V✝\nx✝ : ℕ\nh_dim✝ : finrank K V✝ = x✝\nV : Type w\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nf : End K V\nn : ℕ\nih :\n  ∀ (m : ℕ),\n    m < Nat.succ n →\n      ∀ {V : Type w} [inst : AddCommGroup V] [inst_1 : Module K V] [inst_2 : FiniteDimensional K V] (f : End K V),\n        finrank K V = m → ⨆ (μ : K) (k : ℕ), ↑(generalizedEigenspace f μ) k = ⊤\nh_dim : finrank K V = Nat.succ n\nthis : Nontrivial V\nμ₀ : K\nhμ₀ : HasEigenvalue f μ₀\nES : Submodule K V := ↑(generalizedEigenspace f μ₀) (finrank K V)\nER : Submodule K V := generalizedEigenrange f μ₀ (finrank K V)\nh_f_ER : ∀ (x : V), x ∈ ER → ↑f x ∈ ER\nf' : End K { x // x ∈ ER } := LinearMap.restrict f h_f_ER\n⊢ ⨆ (μ : K) (k : ℕ), ↑(generalizedEigenspace f μ) k = ⊤\n[PROOFSTEP]\nhave h_dim_ES_pos : 0 < finrank K ES := by\n  dsimp only\n  rw [h_dim]\n  apply\n    pos_finrank_generalizedEigenspace_of_hasEigenvalue hμ₀\n      (Nat.zero_lt_succ n)\n        -- and the dimensions of `ES` and `ER` add up to `finrank K V`.\n[GOAL]\nK : Type v\nV✝ : Type w\ninst✝⁷ : Field K\ninst✝⁶ : AddCommGroup V✝\ninst✝⁵ : Module K V✝\ninst✝⁴ : IsAlgClosed K\ninst✝³ : FiniteDimensional K V✝\nf✝ : End K V✝\nx✝ : ℕ\nh_dim✝ : finrank K V✝ = x✝\nV : Type w\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nf : End K V\nn : ℕ\nih :\n  ∀ (m : ℕ),\n    m < Nat.succ n →\n      ∀ {V : Type w} [inst : AddCommGroup V] [inst_1 : Module K V] [inst_2 : FiniteDimensional K V] (f : End K V),\n        finrank K V = m → ⨆ (μ : K) (k : ℕ), ↑(generalizedEigenspace f μ) k = ⊤\nh_dim : finrank K V = Nat.succ n\nthis : Nontrivial V\nμ₀ : K\nhμ₀ : HasEigenvalue f μ₀\nES : Submodule K V := ↑(generalizedEigenspace f μ₀) (finrank K V)\nER : Submodule K V := generalizedEigenrange f μ₀ (finrank K V)\nh_f_ER : ∀ (x : V), x ∈ ER → ↑f x ∈ ER\nf' : End K { x // x ∈ ER } := LinearMap.restrict f h_f_ER\n⊢ 0 < finrank K { x // x ∈ ES }\n[PROOFSTEP]\ndsimp only\n[GOAL]\nK : Type v\nV✝ : Type w\ninst✝⁷ : Field K\ninst✝⁶ : AddCommGroup V✝\ninst✝⁵ : Module K V✝\ninst✝⁴ : IsAlgClosed K\ninst✝³ : FiniteDimensional K V✝\nf✝ : End K V✝\nx✝ : ℕ\nh_dim✝ : finrank K V✝ = x✝\nV : Type w\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nf : End K V\nn : ℕ\nih :\n  ∀ (m : ℕ),\n    m < Nat.succ n →\n      ∀ {V : Type w} [inst : AddCommGroup V] [inst_1 : Module K V] [inst_2 : FiniteDimensional K V] (f : End K V),\n        finrank K V = m → ⨆ (μ : K) (k : ℕ), ↑(generalizedEigenspace f μ) k = ⊤\nh_dim : finrank K V = Nat.succ n\nthis : Nontrivial V\nμ₀ : K\nhμ₀ : HasEigenvalue f μ₀\nES : Submodule K V := ↑(generalizedEigenspace f μ₀) (finrank K V)\nER : Submodule K V := generalizedEigenrange f μ₀ (finrank K V)\nh_f_ER : ∀ (x : V), x ∈ ER → ↑f x ∈ ER\nf' : End K { x // x ∈ ER } := LinearMap.restrict f h_f_ER\n⊢ 0 < finrank K { x // x ∈ ↑(generalizedEigenspace f μ₀) (finrank K V) }\n[PROOFSTEP]\nrw [h_dim]\n[GOAL]\nK : Type v\nV✝ : Type w\ninst✝⁷ : Field K\ninst✝⁶ : AddCommGroup V✝\ninst✝⁵ : Module K V✝\ninst✝⁴ : IsAlgClosed K\ninst✝³ : FiniteDimensional K V✝\nf✝ : End K V✝\nx✝ : ℕ\nh_dim✝ : finrank K V✝ = x✝\nV : Type w\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nf : End K V\nn : ℕ\nih :\n  ∀ (m : ℕ),\n    m < Nat.succ n →\n      ∀ {V : Type w} [inst : AddCommGroup V] [inst_1 : Module K V] [inst_2 : FiniteDimensional K V] (f : End K V),\n        finrank K V = m → ⨆ (μ : K) (k : ℕ), ↑(generalizedEigenspace f μ) k = ⊤\nh_dim : finrank K V = Nat.succ n\nthis : Nontrivial V\nμ₀ : K\nhμ₀ : HasEigenvalue f μ₀\nES : Submodule K V := ↑(generalizedEigenspace f μ₀) (finrank K V)\nER : Submodule K V := generalizedEigenrange f μ₀ (finrank K V)\nh_f_ER : ∀ (x : V), x ∈ ER → ↑f x ∈ ER\nf' : End K { x // x ∈ ER } := LinearMap.restrict f h_f_ER\n⊢ 0 < finrank K { x // x ∈ ↑(generalizedEigenspace f μ₀) (Nat.succ n) }\n[PROOFSTEP]\napply\n  pos_finrank_generalizedEigenspace_of_hasEigenvalue hμ₀\n    (Nat.zero_lt_succ n)\n      -- and the dimensions of `ES` and `ER` add up to `finrank K V`.\n[GOAL]\ncase h.succ.intro\nK : Type v\nV✝ : Type w\ninst✝⁷ : Field K\ninst✝⁶ : AddCommGroup V✝\ninst✝⁵ : Module K V✝\ninst✝⁴ : IsAlgClosed K\ninst✝³ : FiniteDimensional K V✝\nf✝ : End K V✝\nx✝ : ℕ\nh_dim✝ : finrank K V✝ = x✝\nV : Type w\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nf : End K V\nn : ℕ\nih :\n  ∀ (m : ℕ),\n    m < Nat.succ n →\n      ∀ {V : Type w} [inst : AddCommGroup V] [inst_1 : Module K V] [inst_2 : FiniteDimensional K V] (f : End K V),\n        finrank K V = m → ⨆ (μ : K) (k : ℕ), ↑(generalizedEigenspace f μ) k = ⊤\nh_dim : finrank K V = Nat.succ n\nthis : Nontrivial V\nμ₀ : K\nhμ₀ : HasEigenvalue f μ₀\nES : Submodule K V := ↑(generalizedEigenspace f μ₀) (finrank K V)\nER : Submodule K V := generalizedEigenrange f μ₀ (finrank K V)\nh_f_ER : ∀ (x : V), x ∈ ER → ↑f x ∈ ER\nf' : End K { x // x ∈ ER } := LinearMap.restrict f h_f_ER\nh_dim_ES_pos : 0 < finrank K { x // x ∈ ES }\n⊢ ⨆ (μ : K) (k : ℕ), ↑(generalizedEigenspace f μ) k = ⊤\n[PROOFSTEP]\nhave h_dim_add : finrank K ER + finrank K ES = finrank K V := by apply LinearMap.finrank_range_add_finrank_ker\n[GOAL]\nK : Type v\nV✝ : Type w\ninst✝⁷ : Field K\ninst✝⁶ : AddCommGroup V✝\ninst✝⁵ : Module K V✝\ninst✝⁴ : IsAlgClosed K\ninst✝³ : FiniteDimensional K V✝\nf✝ : End K V✝\nx✝ : ℕ\nh_dim✝ : finrank K V✝ = x✝\nV : Type w\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nf : End K V\nn : ℕ\nih :\n  ∀ (m : ℕ),\n    m < Nat.succ n →\n      ∀ {V : Type w} [inst : AddCommGroup V] [inst_1 : Module K V] [inst_2 : FiniteDimensional K V] (f : End K V),\n        finrank K V = m → ⨆ (μ : K) (k : ℕ), ↑(generalizedEigenspace f μ) k = ⊤\nh_dim : finrank K V = Nat.succ n\nthis : Nontrivial V\nμ₀ : K\nhμ₀ : HasEigenvalue f μ₀\nES : Submodule K V := ↑(generalizedEigenspace f μ₀) (finrank K V)\nER : Submodule K V := generalizedEigenrange f μ₀ (finrank K V)\nh_f_ER : ∀ (x : V), x ∈ ER → ↑f x ∈ ER\nf' : End K { x // x ∈ ER } := LinearMap.restrict f h_f_ER\nh_dim_ES_pos : 0 < finrank K { x // x ∈ ES }\n⊢ finrank K { x // x ∈ ER } + finrank K { x // x ∈ ES } = finrank K V\n[PROOFSTEP]\napply LinearMap.finrank_range_add_finrank_ker\n[GOAL]\ncase h.succ.intro\nK : Type v\nV✝ : Type w\ninst✝⁷ : Field K\ninst✝⁶ : AddCommGroup V✝\ninst✝⁵ : Module K V✝\ninst✝⁴ : IsAlgClosed K\ninst✝³ : FiniteDimensional K V✝\nf✝ : End K V✝\nx✝ : ℕ\nh_dim✝ : finrank K V✝ = x✝\nV : Type w\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nf : End K V\nn : ℕ\nih :\n  ∀ (m : ℕ),\n    m < Nat.succ n →\n      ∀ {V : Type w} [inst : AddCommGroup V] [inst_1 : Module K V] [inst_2 : FiniteDimensional K V] (f : End K V),\n        finrank K V = m → ⨆ (μ : K) (k : ℕ), ↑(generalizedEigenspace f μ) k = ⊤\nh_dim : finrank K V = Nat.succ n\nthis : Nontrivial V\nμ₀ : K\nhμ₀ : HasEigenvalue f μ₀\nES : Submodule K V := ↑(generalizedEigenspace f μ₀) (finrank K V)\nER : Submodule K V := generalizedEigenrange f μ₀ (finrank K V)\nh_f_ER : ∀ (x : V), x ∈ ER → ↑f x ∈ ER\nf' : End K { x // x ∈ ER } := LinearMap.restrict f h_f_ER\nh_dim_ES_pos : 0 < finrank K { x // x ∈ ES }\nh_dim_add : finrank K { x // x ∈ ER } + finrank K { x // x ∈ ES } = finrank K V\n⊢ ⨆ (μ : K) (k : ℕ), ↑(generalizedEigenspace f μ) k = ⊤\n[PROOFSTEP]\nhave h_dim_ER : finrank K ER < n.succ := by\n  linarith\n    -- This allows us to apply the induction hypothesis on `ER`:\n[GOAL]\nK : Type v\nV✝ : Type w\ninst✝⁷ : Field K\ninst✝⁶ : AddCommGroup V✝\ninst✝⁵ : Module K V✝\ninst✝⁴ : IsAlgClosed K\ninst✝³ : FiniteDimensional K V✝\nf✝ : End K V✝\nx✝ : ℕ\nh_dim✝ : finrank K V✝ = x✝\nV : Type w\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nf : End K V\nn : ℕ\nih :\n  ∀ (m : ℕ),\n    m < Nat.succ n →\n      ∀ {V : Type w} [inst : AddCommGroup V] [inst_1 : Module K V] [inst_2 : FiniteDimensional K V] (f : End K V),\n        finrank K V = m → ⨆ (μ : K) (k : ℕ), ↑(generalizedEigenspace f μ) k = ⊤\nh_dim : finrank K V = Nat.succ n\nthis : Nontrivial V\nμ₀ : K\nhμ₀ : HasEigenvalue f μ₀\nES : Submodule K V := ↑(generalizedEigenspace f μ₀) (finrank K V)\nER : Submodule K V := generalizedEigenrange f μ₀ (finrank K V)\nh_f_ER : ∀ (x : V), x ∈ ER → ↑f x ∈ ER\nf' : End K { x // x ∈ ER } := LinearMap.restrict f h_f_ER\nh_dim_ES_pos : 0 < finrank K { x // x ∈ ES }\nh_dim_add : finrank K { x // x ∈ ER } + finrank K { x // x ∈ ES } = finrank K V\n⊢ finrank K { x // x ∈ ER } < Nat.succ n\n[PROOFSTEP]\nlinarith\n  -- This allows us to apply the induction hypothesis on `ER`:\n[GOAL]\ncase h.succ.intro\nK : Type v\nV✝ : Type w\ninst✝⁷ : Field K\ninst✝⁶ : AddCommGroup V✝\ninst✝⁵ : Module K V✝\ninst✝⁴ : IsAlgClosed K\ninst✝³ : FiniteDimensional K V✝\nf✝ : End K V✝\nx✝ : ℕ\nh_dim✝ : finrank K V✝ = x✝\nV : Type w\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nf : End K V\nn : ℕ\nih :\n  ∀ (m : ℕ),\n    m < Nat.succ n →\n      ∀ {V : Type w} [inst : AddCommGroup V] [inst_1 : Module K V] [inst_2 : FiniteDimensional K V] (f : End K V),\n        finrank K V = m → ⨆ (μ : K) (k : ℕ), ↑(generalizedEigenspace f μ) k = ⊤\nh_dim : finrank K V = Nat.succ n\nthis : Nontrivial V\nμ₀ : K\nhμ₀ : HasEigenvalue f μ₀\nES : Submodule K V := ↑(generalizedEigenspace f μ₀) (finrank K V)\nER : Submodule K V := generalizedEigenrange f μ₀ (finrank K V)\nh_f_ER : ∀ (x : V), x ∈ ER → ↑f x ∈ ER\nf' : End K { x // x ∈ ER } := LinearMap.restrict f h_f_ER\nh_dim_ES_pos : 0 < finrank K { x // x ∈ ES }\nh_dim_add : finrank K { x // x ∈ ER } + finrank K { x // x ∈ ES } = finrank K V\nh_dim_ER : finrank K { x // x ∈ ER } < Nat.succ n\n⊢ ⨆ (μ : K) (k : ℕ), ↑(generalizedEigenspace f μ) k = ⊤\n[PROOFSTEP]\nhave ih_ER : ⨆ (μ : K) (k : ℕ), f'.generalizedEigenspace μ k = ⊤ := ih (finrank K ER) h_dim_ER f' rfl\n[GOAL]\ncase h.succ.intro\nK : Type v\nV✝ : Type w\ninst✝⁷ : Field K\ninst✝⁶ : AddCommGroup V✝\ninst✝⁵ : Module K V✝\ninst✝⁴ : IsAlgClosed K\ninst✝³ : FiniteDimensional K V✝\nf✝ : End K V✝\nx✝ : ℕ\nh_dim✝ : finrank K V✝ = x✝\nV : Type w\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nf : End K V\nn : ℕ\nih :\n  ∀ (m : ℕ),\n    m < Nat.succ n →\n      ∀ {V : Type w} [inst : AddCommGroup V] [inst_1 : Module K V] [inst_2 : FiniteDimensional K V] (f : End K V),\n        finrank K V = m → ⨆ (μ : K) (k : ℕ), ↑(generalizedEigenspace f μ) k = ⊤\nh_dim : finrank K V = Nat.succ n\nthis : Nontrivial V\nμ₀ : K\nhμ₀ : HasEigenvalue f μ₀\nES : Submodule K V := ↑(generalizedEigenspace f μ₀) (finrank K V)\nER : Submodule K V := generalizedEigenrange f μ₀ (finrank K V)\nh_f_ER : ∀ (x : V), x ∈ ER → ↑f x ∈ ER\nf' : End K { x // x ∈ ER } := LinearMap.restrict f h_f_ER\nh_dim_ES_pos : 0 < finrank K { x // x ∈ ES }\nh_dim_add : finrank K { x // x ∈ ER } + finrank K { x // x ∈ ES } = finrank K V\nh_dim_ER : finrank K { x // x ∈ ER } < Nat.succ n\nih_ER : ⨆ (μ : K) (k : ℕ), ↑(generalizedEigenspace f' μ) k = ⊤\n⊢ ⨆ (μ : K) (k : ℕ), ↑(generalizedEigenspace f μ) k = ⊤\n[PROOFSTEP]\nhave ih_ER' : ⨆ (μ : K) (k : ℕ), (f'.generalizedEigenspace μ k).map ER.subtype = ER := by\n  simp only [(Submodule.map_iSup _ _).symm, ih_ER, Submodule.map_subtype_top ER]\n    -- Moreover, every generalized eigenspace of `f'` is contained in the corresponding generalized\n        -- eigenspace of `f`.\n[GOAL]\nK : Type v\nV✝ : Type w\ninst✝⁷ : Field K\ninst✝⁶ : AddCommGroup V✝\ninst✝⁵ : Module K V✝\ninst✝⁴ : IsAlgClosed K\ninst✝³ : FiniteDimensional K V✝\nf✝ : End K V✝\nx✝ : ℕ\nh_dim✝ : finrank K V✝ = x✝\nV : Type w\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nf : End K V\nn : ℕ\nih :\n  ∀ (m : ℕ),\n    m < Nat.succ n →\n      ∀ {V : Type w} [inst : AddCommGroup V] [inst_1 : Module K V] [inst_2 : FiniteDimensional K V] (f : End K V),\n        finrank K V = m → ⨆ (μ : K) (k : ℕ), ↑(generalizedEigenspace f μ) k = ⊤\nh_dim : finrank K V = Nat.succ n\nthis : Nontrivial V\nμ₀ : K\nhμ₀ : HasEigenvalue f μ₀\nES : Submodule K V := ↑(generalizedEigenspace f μ₀) (finrank K V)\nER : Submodule K V := generalizedEigenrange f μ₀ (finrank K V)\nh_f_ER : ∀ (x : V), x ∈ ER → ↑f x ∈ ER\nf' : End K { x // x ∈ ER } := LinearMap.restrict f h_f_ER\nh_dim_ES_pos : 0 < finrank K { x // x ∈ ES }\nh_dim_add : finrank K { x // x ∈ ER } + finrank K { x // x ∈ ES } = finrank K V\nh_dim_ER : finrank K { x // x ∈ ER } < Nat.succ n\nih_ER : ⨆ (μ : K) (k : ℕ), ↑(generalizedEigenspace f' μ) k = ⊤\n⊢ ⨆ (μ : K) (k : ℕ), Submodule.map (Submodule.subtype ER) (↑(generalizedEigenspace f' μ) k) = ER\n[PROOFSTEP]\nsimp only [(Submodule.map_iSup _ _).symm, ih_ER, Submodule.map_subtype_top ER]\n  -- Moreover, every generalized eigenspace of `f'` is contained in the corresponding generalized\n      -- eigenspace of `f`.\n[GOAL]\ncase h.succ.intro\nK : Type v\nV✝ : Type w\ninst✝⁷ : Field K\ninst✝⁶ : AddCommGroup V✝\ninst✝⁵ : Module K V✝\ninst✝⁴ : IsAlgClosed K\ninst✝³ : FiniteDimensional K V✝\nf✝ : End K V✝\nx✝ : ℕ\nh_dim✝ : finrank K V✝ = x✝\nV : Type w\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nf : End K V\nn : ℕ\nih :\n  ∀ (m : ℕ),\n    m < Nat.succ n →\n      ∀ {V : Type w} [inst : AddCommGroup V] [inst_1 : Module K V] [inst_2 : FiniteDimensional K V] (f : End K V),\n        finrank K V = m → ⨆ (μ : K) (k : ℕ), ↑(generalizedEigenspace f μ) k = ⊤\nh_dim : finrank K V = Nat.succ n\nthis : Nontrivial V\nμ₀ : K\nhμ₀ : HasEigenvalue f μ₀\nES : Submodule K V := ↑(generalizedEigenspace f μ₀) (finrank K V)\nER : Submodule K V := generalizedEigenrange f μ₀ (finrank K V)\nh_f_ER : ∀ (x : V), x ∈ ER → ↑f x ∈ ER\nf' : End K { x // x ∈ ER } := LinearMap.restrict f h_f_ER\nh_dim_ES_pos : 0 < finrank K { x // x ∈ ES }\nh_dim_add : finrank K { x // x ∈ ER } + finrank K { x // x ∈ ES } = finrank K V\nh_dim_ER : finrank K { x // x ∈ ER } < Nat.succ n\nih_ER : ⨆ (μ : K) (k : ℕ), ↑(generalizedEigenspace f' μ) k = ⊤\nih_ER' : ⨆ (μ : K) (k : ℕ), Submodule.map (Submodule.subtype ER) (↑(generalizedEigenspace f' μ) k) = ER\n⊢ ⨆ (μ : K) (k : ℕ), ↑(generalizedEigenspace f μ) k = ⊤\n[PROOFSTEP]\nhave hff' : ∀ μ k, (f'.generalizedEigenspace μ k).map ER.subtype ≤ f.generalizedEigenspace μ k :=\n  by\n  intros\n  rw [generalizedEigenspace_restrict]\n  apply Submodule.map_comap_le\n[GOAL]\nK : Type v\nV✝ : Type w\ninst✝⁷ : Field K\ninst✝⁶ : AddCommGroup V✝\ninst✝⁵ : Module K V✝\ninst✝⁴ : IsAlgClosed K\ninst✝³ : FiniteDimensional K V✝\nf✝ : End K V✝\nx✝ : ℕ\nh_dim✝ : finrank K V✝ = x✝\nV : Type w\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nf : End K V\nn : ℕ\nih :\n  ∀ (m : ℕ),\n    m < Nat.succ n →\n      ∀ {V : Type w} [inst : AddCommGroup V] [inst_1 : Module K V] [inst_2 : FiniteDimensional K V] (f : End K V),\n        finrank K V = m → ⨆ (μ : K) (k : ℕ), ↑(generalizedEigenspace f μ) k = ⊤\nh_dim : finrank K V = Nat.succ n\nthis : Nontrivial V\nμ₀ : K\nhμ₀ : HasEigenvalue f μ₀\nES : Submodule K V := ↑(generalizedEigenspace f μ₀) (finrank K V)\nER : Submodule K V := generalizedEigenrange f μ₀ (finrank K V)\nh_f_ER : ∀ (x : V), x ∈ ER → ↑f x ∈ ER\nf' : End K { x // x ∈ ER } := LinearMap.restrict f h_f_ER\nh_dim_ES_pos : 0 < finrank K { x // x ∈ ES }\nh_dim_add : finrank K { x // x ∈ ER } + finrank K { x // x ∈ ES } = finrank K V\nh_dim_ER : finrank K { x // x ∈ ER } < Nat.succ n\nih_ER : ⨆ (μ : K) (k : ℕ), ↑(generalizedEigenspace f' μ) k = ⊤\nih_ER' : ⨆ (μ : K) (k : ℕ), Submodule.map (Submodule.subtype ER) (↑(generalizedEigenspace f' μ) k) = ER\n⊢ ∀ (μ : K) (k : ℕ),\n    Submodule.map (Submodule.subtype ER) (↑(generalizedEigenspace f' μ) k) ≤ ↑(generalizedEigenspace f μ) k\n[PROOFSTEP]\nintros\n[GOAL]\nK : Type v\nV✝ : Type w\ninst✝⁷ : Field K\ninst✝⁶ : AddCommGroup V✝\ninst✝⁵ : Module K V✝\ninst✝⁴ : IsAlgClosed K\ninst✝³ : FiniteDimensional K V✝\nf✝ : End K V✝\nx✝ : ℕ\nh_dim✝ : finrank K V✝ = x✝\nV : Type w\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nf : End K V\nn : ℕ\nih :\n  ∀ (m : ℕ),\n    m < Nat.succ n →\n      ∀ {V : Type w} [inst : AddCommGroup V] [inst_1 : Module K V] [inst_2 : FiniteDimensional K V] (f : End K V),\n        finrank K V = m → ⨆ (μ : K) (k : ℕ), ↑(generalizedEigenspace f μ) k = ⊤\nh_dim : finrank K V = Nat.succ n\nthis : Nontrivial V\nμ₀ : K\nhμ₀ : HasEigenvalue f μ₀\nES : Submodule K V := ↑(generalizedEigenspace f μ₀) (finrank K V)\nER : Submodule K V := generalizedEigenrange f μ₀ (finrank K V)\nh_f_ER : ∀ (x : V), x ∈ ER → ↑f x ∈ ER\nf' : End K { x // x ∈ ER } := LinearMap.restrict f h_f_ER\nh_dim_ES_pos : 0 < finrank K { x // x ∈ ES }\nh_dim_add : finrank K { x // x ∈ ER } + finrank K { x // x ∈ ES } = finrank K V\nh_dim_ER : finrank K { x // x ∈ ER } < Nat.succ n\nih_ER : ⨆ (μ : K) (k : ℕ), ↑(generalizedEigenspace f' μ) k = ⊤\nih_ER' : ⨆ (μ : K) (k : ℕ), Submodule.map (Submodule.subtype ER) (↑(generalizedEigenspace f' μ) k) = ER\nμ✝ : K\nk✝ : ℕ\n⊢ Submodule.map (Submodule.subtype ER) (↑(generalizedEigenspace f' μ✝) k✝) ≤ ↑(generalizedEigenspace f μ✝) k✝\n[PROOFSTEP]\nrw [generalizedEigenspace_restrict]\n[GOAL]\nK : Type v\nV✝ : Type w\ninst✝⁷ : Field K\ninst✝⁶ : AddCommGroup V✝\ninst✝⁵ : Module K V✝\ninst✝⁴ : IsAlgClosed K\ninst✝³ : FiniteDimensional K V✝\nf✝ : End K V✝\nx✝ : ℕ\nh_dim✝ : finrank K V✝ = x✝\nV : Type w\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nf : End K V\nn : ℕ\nih :\n  ∀ (m : ℕ),\n    m < Nat.succ n →\n      ∀ {V : Type w} [inst : AddCommGroup V] [inst_1 : Module K V] [inst_2 : FiniteDimensional K V] (f : End K V),\n        finrank K V = m → ⨆ (μ : K) (k : ℕ), ↑(generalizedEigenspace f μ) k = ⊤\nh_dim : finrank K V = Nat.succ n\nthis : Nontrivial V\nμ₀ : K\nhμ₀ : HasEigenvalue f μ₀\nES : Submodule K V := ↑(generalizedEigenspace f μ₀) (finrank K V)\nER : Submodule K V := generalizedEigenrange f μ₀ (finrank K V)\nh_f_ER : ∀ (x : V), x ∈ ER → ↑f x ∈ ER\nf' : End K { x // x ∈ ER } := LinearMap.restrict f h_f_ER\nh_dim_ES_pos : 0 < finrank K { x // x ∈ ES }\nh_dim_add : finrank K { x // x ∈ ER } + finrank K { x // x ∈ ES } = finrank K V\nh_dim_ER : finrank K { x // x ∈ ER } < Nat.succ n\nih_ER : ⨆ (μ : K) (k : ℕ), ↑(generalizedEigenspace f' μ) k = ⊤\nih_ER' : ⨆ (μ : K) (k : ℕ), Submodule.map (Submodule.subtype ER) (↑(generalizedEigenspace f' μ) k) = ER\nμ✝ : K\nk✝ : ℕ\n⊢ Submodule.map (Submodule.subtype ER) (Submodule.comap (Submodule.subtype ER) (↑(generalizedEigenspace f μ✝) k✝)) ≤\n    ↑(generalizedEigenspace f μ✝) k✝\n[PROOFSTEP]\napply Submodule.map_comap_le\n[GOAL]\ncase h.succ.intro\nK : Type v\nV✝ : Type w\ninst✝⁷ : Field K\ninst✝⁶ : AddCommGroup V✝\ninst✝⁵ : Module K V✝\ninst✝⁴ : IsAlgClosed K\ninst✝³ : FiniteDimensional K V✝\nf✝ : End K V✝\nx✝ : ℕ\nh_dim✝ : finrank K V✝ = x✝\nV : Type w\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nf : End K V\nn : ℕ\nih :\n  ∀ (m : ℕ),\n    m < Nat.succ n →\n      ∀ {V : Type w} [inst : AddCommGroup V] [inst_1 : Module K V] [inst_2 : FiniteDimensional K V] (f : End K V),\n        finrank K V = m → ⨆ (μ : K) (k : ℕ), ↑(generalizedEigenspace f μ) k = ⊤\nh_dim : finrank K V = Nat.succ n\nthis : Nontrivial V\nμ₀ : K\nhμ₀ : HasEigenvalue f μ₀\nES : Submodule K V := ↑(generalizedEigenspace f μ₀) (finrank K V)\nER : Submodule K V := generalizedEigenrange f μ₀ (finrank K V)\nh_f_ER : ∀ (x : V), x ∈ ER → ↑f x ∈ ER\nf' : End K { x // x ∈ ER } := LinearMap.restrict f h_f_ER\nh_dim_ES_pos : 0 < finrank K { x // x ∈ ES }\nh_dim_add : finrank K { x // x ∈ ER } + finrank K { x // x ∈ ES } = finrank K V\nh_dim_ER : finrank K { x // x ∈ ER } < Nat.succ n\nih_ER : ⨆ (μ : K) (k : ℕ), ↑(generalizedEigenspace f' μ) k = ⊤\nih_ER' : ⨆ (μ : K) (k : ℕ), Submodule.map (Submodule.subtype ER) (↑(generalizedEigenspace f' μ) k) = ER\nhff' :\n  ∀ (μ : K) (k : ℕ),\n    Submodule.map (Submodule.subtype ER) (↑(generalizedEigenspace f' μ) k) ≤ ↑(generalizedEigenspace f μ) k\n⊢ ⨆ (μ : K) (k : ℕ), ↑(generalizedEigenspace f μ) k = ⊤\n[PROOFSTEP]\nhave hER : ER ≤ ⨆ (μ : K) (k : ℕ), f.generalizedEigenspace μ k :=\n  by\n  rw [← ih_ER']\n  exact iSup₂_mono hff'\n[GOAL]\nK : Type v\nV✝ : Type w\ninst✝⁷ : Field K\ninst✝⁶ : AddCommGroup V✝\ninst✝⁵ : Module K V✝\ninst✝⁴ : IsAlgClosed K\ninst✝³ : FiniteDimensional K V✝\nf✝ : End K V✝\nx✝ : ℕ\nh_dim✝ : finrank K V✝ = x✝\nV : Type w\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nf : End K V\nn : ℕ\nih :\n  ∀ (m : ℕ),\n    m < Nat.succ n →\n      ∀ {V : Type w} [inst : AddCommGroup V] [inst_1 : Module K V] [inst_2 : FiniteDimensional K V] (f : End K V),\n        finrank K V = m → ⨆ (μ : K) (k : ℕ), ↑(generalizedEigenspace f μ) k = ⊤\nh_dim : finrank K V = Nat.succ n\nthis : Nontrivial V\nμ₀ : K\nhμ₀ : HasEigenvalue f μ₀\nES : Submodule K V := ↑(generalizedEigenspace f μ₀) (finrank K V)\nER : Submodule K V := generalizedEigenrange f μ₀ (finrank K V)\nh_f_ER : ∀ (x : V), x ∈ ER → ↑f x ∈ ER\nf' : End K { x // x ∈ ER } := LinearMap.restrict f h_f_ER\nh_dim_ES_pos : 0 < finrank K { x // x ∈ ES }\nh_dim_add : finrank K { x // x ∈ ER } + finrank K { x // x ∈ ES } = finrank K V\nh_dim_ER : finrank K { x // x ∈ ER } < Nat.succ n\nih_ER : ⨆ (μ : K) (k : ℕ), ↑(generalizedEigenspace f' μ) k = ⊤\nih_ER' : ⨆ (μ : K) (k : ℕ), Submodule.map (Submodule.subtype ER) (↑(generalizedEigenspace f' μ) k) = ER\nhff' :\n  ∀ (μ : K) (k : ℕ),\n    Submodule.map (Submodule.subtype ER) (↑(generalizedEigenspace f' μ) k) ≤ ↑(generalizedEigenspace f μ) k\n⊢ ER ≤ ⨆ (μ : K) (k : ℕ), ↑(generalizedEigenspace f μ) k\n[PROOFSTEP]\nrw [← ih_ER']\n[GOAL]\nK : Type v\nV✝ : Type w\ninst✝⁷ : Field K\ninst✝⁶ : AddCommGroup V✝\ninst✝⁵ : Module K V✝\ninst✝⁴ : IsAlgClosed K\ninst✝³ : FiniteDimensional K V✝\nf✝ : End K V✝\nx✝ : ℕ\nh_dim✝ : finrank K V✝ = x✝\nV : Type w\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nf : End K V\nn : ℕ\nih :\n  ∀ (m : ℕ),\n    m < Nat.succ n →\n      ∀ {V : Type w} [inst : AddCommGroup V] [inst_1 : Module K V] [inst_2 : FiniteDimensional K V] (f : End K V),\n        finrank K V = m → ⨆ (μ : K) (k : ℕ), ↑(generalizedEigenspace f μ) k = ⊤\nh_dim : finrank K V = Nat.succ n\nthis : Nontrivial V\nμ₀ : K\nhμ₀ : HasEigenvalue f μ₀\nES : Submodule K V := ↑(generalizedEigenspace f μ₀) (finrank K V)\nER : Submodule K V := generalizedEigenrange f μ₀ (finrank K V)\nh_f_ER : ∀ (x : V), x ∈ ER → ↑f x ∈ ER\nf' : End K { x // x ∈ ER } := LinearMap.restrict f h_f_ER\nh_dim_ES_pos : 0 < finrank K { x // x ∈ ES }\nh_dim_add : finrank K { x // x ∈ ER } + finrank K { x // x ∈ ES } = finrank K V\nh_dim_ER : finrank K { x // x ∈ ER } < Nat.succ n\nih_ER : ⨆ (μ : K) (k : ℕ), ↑(generalizedEigenspace f' μ) k = ⊤\nih_ER' : ⨆ (μ : K) (k : ℕ), Submodule.map (Submodule.subtype ER) (↑(generalizedEigenspace f' μ) k) = ER\nhff' :\n  ∀ (μ : K) (k : ℕ),\n    Submodule.map (Submodule.subtype ER) (↑(generalizedEigenspace f' μ) k) ≤ ↑(generalizedEigenspace f μ) k\n⊢ ⨆ (μ : K) (k : ℕ), Submodule.map (Submodule.subtype ER) (↑(generalizedEigenspace f' μ) k) ≤\n    ⨆ (μ : K) (k : ℕ), ↑(generalizedEigenspace f μ) k\n[PROOFSTEP]\nexact iSup₂_mono hff'\n[GOAL]\ncase h.succ.intro\nK : Type v\nV✝ : Type w\ninst✝⁷ : Field K\ninst✝⁶ : AddCommGroup V✝\ninst✝⁵ : Module K V✝\ninst✝⁴ : IsAlgClosed K\ninst✝³ : FiniteDimensional K V✝\nf✝ : End K V✝\nx✝ : ℕ\nh_dim✝ : finrank K V✝ = x✝\nV : Type w\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nf : End K V\nn : ℕ\nih :\n  ∀ (m : ℕ),\n    m < Nat.succ n →\n      ∀ {V : Type w} [inst : AddCommGroup V] [inst_1 : Module K V] [inst_2 : FiniteDimensional K V] (f : End K V),\n        finrank K V = m → ⨆ (μ : K) (k : ℕ), ↑(generalizedEigenspace f μ) k = ⊤\nh_dim : finrank K V = Nat.succ n\nthis : Nontrivial V\nμ₀ : K\nhμ₀ : HasEigenvalue f μ₀\nES : Submodule K V := ↑(generalizedEigenspace f μ₀) (finrank K V)\nER : Submodule K V := generalizedEigenrange f μ₀ (finrank K V)\nh_f_ER : ∀ (x : V), x ∈ ER → ↑f x ∈ ER\nf' : End K { x // x ∈ ER } := LinearMap.restrict f h_f_ER\nh_dim_ES_pos : 0 < finrank K { x // x ∈ ES }\nh_dim_add : finrank K { x // x ∈ ER } + finrank K { x // x ∈ ES } = finrank K V\nh_dim_ER : finrank K { x // x ∈ ER } < Nat.succ n\nih_ER : ⨆ (μ : K) (k : ℕ), ↑(generalizedEigenspace f' μ) k = ⊤\nih_ER' : ⨆ (μ : K) (k : ℕ), Submodule.map (Submodule.subtype ER) (↑(generalizedEigenspace f' μ) k) = ER\nhff' :\n  ∀ (μ : K) (k : ℕ),\n    Submodule.map (Submodule.subtype ER) (↑(generalizedEigenspace f' μ) k) ≤ ↑(generalizedEigenspace f μ) k\nhER : ER ≤ ⨆ (μ : K) (k : ℕ), ↑(generalizedEigenspace f μ) k\n⊢ ⨆ (μ : K) (k : ℕ), ↑(generalizedEigenspace f μ) k = ⊤\n[PROOFSTEP]\nhave hES : ES ≤ ⨆ (μ : K) (k : ℕ), f.generalizedEigenspace μ k :=\n  le_trans (le_iSup (fun k => f.generalizedEigenspace μ₀ k) (finrank K V))\n    (le_iSup (fun μ : K => ⨆ k : ℕ, f.generalizedEigenspace μ k) μ₀)\n      -- Moreover, we know that `ER` and `ES` are disjoint.\n[GOAL]\ncase h.succ.intro\nK : Type v\nV✝ : Type w\ninst✝⁷ : Field K\ninst✝⁶ : AddCommGroup V✝\ninst✝⁵ : Module K V✝\ninst✝⁴ : IsAlgClosed K\ninst✝³ : FiniteDimensional K V✝\nf✝ : End K V✝\nx✝ : ℕ\nh_dim✝ : finrank K V✝ = x✝\nV : Type w\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nf : End K V\nn : ℕ\nih :\n  ∀ (m : ℕ),\n    m < Nat.succ n →\n      ∀ {V : Type w} [inst : AddCommGroup V] [inst_1 : Module K V] [inst_2 : FiniteDimensional K V] (f : End K V),\n        finrank K V = m → ⨆ (μ : K) (k : ℕ), ↑(generalizedEigenspace f μ) k = ⊤\nh_dim : finrank K V = Nat.succ n\nthis : Nontrivial V\nμ₀ : K\nhμ₀ : HasEigenvalue f μ₀\nES : Submodule K V := ↑(generalizedEigenspace f μ₀) (finrank K V)\nER : Submodule K V := generalizedEigenrange f μ₀ (finrank K V)\nh_f_ER : ∀ (x : V), x ∈ ER → ↑f x ∈ ER\nf' : End K { x // x ∈ ER } := LinearMap.restrict f h_f_ER\nh_dim_ES_pos : 0 < finrank K { x // x ∈ ES }\nh_dim_add : finrank K { x // x ∈ ER } + finrank K { x // x ∈ ES } = finrank K V\nh_dim_ER : finrank K { x // x ∈ ER } < Nat.succ n\nih_ER : ⨆ (μ : K) (k : ℕ), ↑(generalizedEigenspace f' μ) k = ⊤\nih_ER' : ⨆ (μ : K) (k : ℕ), Submodule.map (Submodule.subtype ER) (↑(generalizedEigenspace f' μ) k) = ER\nhff' :\n  ∀ (μ : K) (k : ℕ),\n    Submodule.map (Submodule.subtype ER) (↑(generalizedEigenspace f' μ) k) ≤ ↑(generalizedEigenspace f μ) k\nhER : ER ≤ ⨆ (μ : K) (k : ℕ), ↑(generalizedEigenspace f μ) k\nhES : ES ≤ ⨆ (μ : K) (k : ℕ), ↑(generalizedEigenspace f μ) k\n⊢ ⨆ (μ : K) (k : ℕ), ↑(generalizedEigenspace f μ) k = ⊤\n[PROOFSTEP]\nhave h_disjoint : Disjoint ER ES := generalized_eigenvec_disjoint_range_ker f μ₀\n[GOAL]\ncase h.succ.intro\nK : Type v\nV✝ : Type w\ninst✝⁷ : Field K\ninst✝⁶ : AddCommGroup V✝\ninst✝⁵ : Module K V✝\ninst✝⁴ : IsAlgClosed K\ninst✝³ : FiniteDimensional K V✝\nf✝ : End K V✝\nx✝ : ℕ\nh_dim✝ : finrank K V✝ = x✝\nV : Type w\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nf : End K V\nn : ℕ\nih :\n  ∀ (m : ℕ),\n    m < Nat.succ n →\n      ∀ {V : Type w} [inst : AddCommGroup V] [inst_1 : Module K V] [inst_2 : FiniteDimensional K V] (f : End K V),\n        finrank K V = m → ⨆ (μ : K) (k : ℕ), ↑(generalizedEigenspace f μ) k = ⊤\nh_dim : finrank K V = Nat.succ n\nthis : Nontrivial V\nμ₀ : K\nhμ₀ : HasEigenvalue f μ₀\nES : Submodule K V := ↑(generalizedEigenspace f μ₀) (finrank K V)\nER : Submodule K V := generalizedEigenrange f μ₀ (finrank K V)\nh_f_ER : ∀ (x : V), x ∈ ER → ↑f x ∈ ER\nf' : End K { x // x ∈ ER } := LinearMap.restrict f h_f_ER\nh_dim_ES_pos : 0 < finrank K { x // x ∈ ES }\nh_dim_add : finrank K { x // x ∈ ER } + finrank K { x // x ∈ ES } = finrank K V\nh_dim_ER : finrank K { x // x ∈ ER } < Nat.succ n\nih_ER : ⨆ (μ : K) (k : ℕ), ↑(generalizedEigenspace f' μ) k = ⊤\nih_ER' : ⨆ (μ : K) (k : ℕ), Submodule.map (Submodule.subtype ER) (↑(generalizedEigenspace f' μ) k) = ER\nhff' :\n  ∀ (μ : K) (k : ℕ),\n    Submodule.map (Submodule.subtype ER) (↑(generalizedEigenspace f' μ) k) ≤ ↑(generalizedEigenspace f μ) k\nhER : ER ≤ ⨆ (μ : K) (k : ℕ), ↑(generalizedEigenspace f μ) k\nhES : ES ≤ ⨆ (μ : K) (k : ℕ), ↑(generalizedEigenspace f μ) k\nh_disjoint : Disjoint ER ES\n⊢ ⨆ (μ : K) (k : ℕ), ↑(generalizedEigenspace f μ) k = ⊤\n[PROOFSTEP]\nshow ⨆ (μ : K) (k : ℕ), f.generalizedEigenspace μ k = ⊤\n[GOAL]\ncase h.succ.intro\nK : Type v\nV✝ : Type w\ninst✝⁷ : Field K\ninst✝⁶ : AddCommGroup V✝\ninst✝⁵ : Module K V✝\ninst✝⁴ : IsAlgClosed K\ninst✝³ : FiniteDimensional K V✝\nf✝ : End K V✝\nx✝ : ℕ\nh_dim✝ : finrank K V✝ = x✝\nV : Type w\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nf : End K V\nn : ℕ\nih :\n  ∀ (m : ℕ),\n    m < Nat.succ n →\n      ∀ {V : Type w} [inst : AddCommGroup V] [inst_1 : Module K V] [inst_2 : FiniteDimensional K V] (f : End K V),\n        finrank K V = m → ⨆ (μ : K) (k : ℕ), ↑(generalizedEigenspace f μ) k = ⊤\nh_dim : finrank K V = Nat.succ n\nthis : Nontrivial V\nμ₀ : K\nhμ₀ : HasEigenvalue f μ₀\nES : Submodule K V := ↑(generalizedEigenspace f μ₀) (finrank K V)\nER : Submodule K V := generalizedEigenrange f μ₀ (finrank K V)\nh_f_ER : ∀ (x : V), x ∈ ER → ↑f x ∈ ER\nf' : End K { x // x ∈ ER } := LinearMap.restrict f h_f_ER\nh_dim_ES_pos : 0 < finrank K { x // x ∈ ES }\nh_dim_add : finrank K { x // x ∈ ER } + finrank K { x // x ∈ ES } = finrank K V\nh_dim_ER : finrank K { x // x ∈ ER } < Nat.succ n\nih_ER : ⨆ (μ : K) (k : ℕ), ↑(generalizedEigenspace f' μ) k = ⊤\nih_ER' : ⨆ (μ : K) (k : ℕ), Submodule.map (Submodule.subtype ER) (↑(generalizedEigenspace f' μ) k) = ER\nhff' :\n  ∀ (μ : K) (k : ℕ),\n    Submodule.map (Submodule.subtype ER) (↑(generalizedEigenspace f' μ) k) ≤ ↑(generalizedEigenspace f μ) k\nhER : ER ≤ ⨆ (μ : K) (k : ℕ), ↑(generalizedEigenspace f μ) k\nhES : ES ≤ ⨆ (μ : K) (k : ℕ), ↑(generalizedEigenspace f μ) k\nh_disjoint : Disjoint ER ES\n⊢ ⨆ (μ : K) (k : ℕ), ↑(generalizedEigenspace f μ) k = ⊤\n[PROOFSTEP]\nrw [← top_le_iff, ← Submodule.eq_top_of_disjoint ER ES h_dim_add h_disjoint]\n[GOAL]\ncase h.succ.intro\nK : Type v\nV✝ : Type w\ninst✝⁷ : Field K\ninst✝⁶ : AddCommGroup V✝\ninst✝⁵ : Module K V✝\ninst✝⁴ : IsAlgClosed K\ninst✝³ : FiniteDimensional K V✝\nf✝ : End K V✝\nx✝ : ℕ\nh_dim✝ : finrank K V✝ = x✝\nV : Type w\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : FiniteDimensional K V\nf : End K V\nn : ℕ\nih :\n  ∀ (m : ℕ),\n    m < Nat.succ n →\n      ∀ {V : Type w} [inst : AddCommGroup V] [inst_1 : Module K V] [inst_2 : FiniteDimensional K V] (f : End K V),\n        finrank K V = m → ⨆ (μ : K) (k : ℕ), ↑(generalizedEigenspace f μ) k = ⊤\nh_dim : finrank K V = Nat.succ n\nthis : Nontrivial V\nμ₀ : K\nhμ₀ : HasEigenvalue f μ₀\nES : Submodule K V := ↑(generalizedEigenspace f μ₀) (finrank K V)\nER : Submodule K V := generalizedEigenrange f μ₀ (finrank K V)\nh_f_ER : ∀ (x : V), x ∈ ER → ↑f x ∈ ER\nf' : End K { x // x ∈ ER } := LinearMap.restrict f h_f_ER\nh_dim_ES_pos : 0 < finrank K { x // x ∈ ES }\nh_dim_add : finrank K { x // x ∈ ER } + finrank K { x // x ∈ ES } = finrank K V\nh_dim_ER : finrank K { x // x ∈ ER } < Nat.succ n\nih_ER : ⨆ (μ : K) (k : ℕ), ↑(generalizedEigenspace f' μ) k = ⊤\nih_ER' : ⨆ (μ : K) (k : ℕ), Submodule.map (Submodule.subtype ER) (↑(generalizedEigenspace f' μ) k) = ER\nhff' :\n  ∀ (μ : K) (k : ℕ),\n    Submodule.map (Submodule.subtype ER) (↑(generalizedEigenspace f' μ) k) ≤ ↑(generalizedEigenspace f μ) k\nhER : ER ≤ ⨆ (μ : K) (k : ℕ), ↑(generalizedEigenspace f μ) k\nhES : ES ≤ ⨆ (μ : K) (k : ℕ), ↑(generalizedEigenspace f μ) k\nh_disjoint : Disjoint ER ES\n⊢ ER ⊔ ES ≤ ⨆ (μ : K) (k : ℕ), ↑(generalizedEigenspace f μ) k\n[PROOFSTEP]\napply sup_le hER hES\n", "meta": {"mathlib_filename": "Mathlib.LinearAlgebra.Eigenspace.IsAlgClosed", "llama_tokens": 19866, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7690802476562641, "lm_q2_score": 0.6992544147913993, "lm_q1q2_score": 0.5377827585025055}}
{"text": "[GOAL]\nsrc✝¹ : LinearOrderedCommRing ℤ := linearOrderedCommRing\nsrc✝ : Lattice ℤ := LinearOrder.toLattice\n⊢ ∀ (s : Set ℤ) (a : ℤ), BddAbove s → a ∈ s → a ≤ sSup s\n[PROOFSTEP]\nintro s n hs hns\n[GOAL]\nsrc✝¹ : LinearOrderedCommRing ℤ := linearOrderedCommRing\nsrc✝ : Lattice ℤ := LinearOrder.toLattice\ns : Set ℤ\nn : ℤ\nhs : BddAbove s\nhns : n ∈ s\n⊢ n ≤ sSup s\n[PROOFSTEP]\nhave : s.Nonempty ∧ BddAbove s :=\n  ⟨⟨n, hns⟩, hs⟩\n    -- Porting note: this was `rw [dif_pos this]`\n[GOAL]\nsrc✝¹ : LinearOrderedCommRing ℤ := linearOrderedCommRing\nsrc✝ : Lattice ℤ := LinearOrder.toLattice\ns : Set ℤ\nn : ℤ\nhs : BddAbove s\nhns : n ∈ s\nthis : Set.Nonempty s ∧ BddAbove s\n⊢ n ≤ sSup s\n[PROOFSTEP]\nsimp only [this, and_self, dite_true, ge_iff_le]\n[GOAL]\nsrc✝¹ : LinearOrderedCommRing ℤ := linearOrderedCommRing\nsrc✝ : Lattice ℤ := LinearOrder.toLattice\ns : Set ℤ\nn : ℤ\nhs : BddAbove s\nhns : n ∈ s\nthis : Set.Nonempty s ∧ BddAbove s\n⊢ n ≤ ↑(greatestOfBdd (choose (_ : BddAbove s)) (_ : choose (_ : BddAbove s) ∈ upperBounds s) (_ : Set.Nonempty s))\n[PROOFSTEP]\nexact (greatestOfBdd _ _ _).2.2 n hns\n[GOAL]\nsrc✝¹ : LinearOrderedCommRing ℤ := linearOrderedCommRing\nsrc✝ : Lattice ℤ := LinearOrder.toLattice\n⊢ ∀ (s : Set ℤ) (a : ℤ), Set.Nonempty s → a ∈ upperBounds s → sSup s ≤ a\n[PROOFSTEP]\nintro s n hs hns\n[GOAL]\nsrc✝¹ : LinearOrderedCommRing ℤ := linearOrderedCommRing\nsrc✝ : Lattice ℤ := LinearOrder.toLattice\ns : Set ℤ\nn : ℤ\nhs : Set.Nonempty s\nhns : n ∈ upperBounds s\n⊢ sSup s ≤ n\n[PROOFSTEP]\nhave : s.Nonempty ∧ BddAbove s :=\n  ⟨hs, ⟨n, hns⟩⟩\n    -- Porting note: this was `rw [dif_pos this]`\n[GOAL]\nsrc✝¹ : LinearOrderedCommRing ℤ := linearOrderedCommRing\nsrc✝ : Lattice ℤ := LinearOrder.toLattice\ns : Set ℤ\nn : ℤ\nhs : Set.Nonempty s\nhns : n ∈ upperBounds s\nthis : Set.Nonempty s ∧ BddAbove s\n⊢ sSup s ≤ n\n[PROOFSTEP]\nsimp only [this, and_self, dite_true, ge_iff_le]\n[GOAL]\nsrc✝¹ : LinearOrderedCommRing ℤ := linearOrderedCommRing\nsrc✝ : Lattice ℤ := LinearOrder.toLattice\ns : Set ℤ\nn : ℤ\nhs : Set.Nonempty s\nhns : n ∈ upperBounds s\nthis : Set.Nonempty s ∧ BddAbove s\n⊢ ↑(greatestOfBdd (choose (_ : BddAbove s)) (_ : choose (_ : BddAbove s) ∈ upperBounds s) (_ : Set.Nonempty s)) ≤ n\n[PROOFSTEP]\nexact hns (greatestOfBdd _ (Classical.choose_spec this.2) _).2.1\n[GOAL]\nsrc✝¹ : LinearOrderedCommRing ℤ := linearOrderedCommRing\nsrc✝ : Lattice ℤ := LinearOrder.toLattice\n⊢ ∀ (s : Set ℤ) (a : ℤ), BddBelow s → a ∈ s → sInf s ≤ a\n[PROOFSTEP]\nintro s n hs hns\n[GOAL]\nsrc✝¹ : LinearOrderedCommRing ℤ := linearOrderedCommRing\nsrc✝ : Lattice ℤ := LinearOrder.toLattice\ns : Set ℤ\nn : ℤ\nhs : BddBelow s\nhns : n ∈ s\n⊢ sInf s ≤ n\n[PROOFSTEP]\nhave : s.Nonempty ∧ BddBelow s :=\n  ⟨⟨n, hns⟩, hs⟩\n    -- Porting note: this was `rw [dif_pos this]`\n[GOAL]\nsrc✝¹ : LinearOrderedCommRing ℤ := linearOrderedCommRing\nsrc✝ : Lattice ℤ := LinearOrder.toLattice\ns : Set ℤ\nn : ℤ\nhs : BddBelow s\nhns : n ∈ s\nthis : Set.Nonempty s ∧ BddBelow s\n⊢ sInf s ≤ n\n[PROOFSTEP]\nsimp only [this, and_self, dite_true, ge_iff_le]\n[GOAL]\nsrc✝¹ : LinearOrderedCommRing ℤ := linearOrderedCommRing\nsrc✝ : Lattice ℤ := LinearOrder.toLattice\ns : Set ℤ\nn : ℤ\nhs : BddBelow s\nhns : n ∈ s\nthis : Set.Nonempty s ∧ BddBelow s\n⊢ ↑(leastOfBdd (choose (_ : BddBelow s)) (_ : choose (_ : BddBelow s) ∈ lowerBounds s) (_ : Set.Nonempty s)) ≤ n\n[PROOFSTEP]\nexact (leastOfBdd _ _ _).2.2 n hns\n[GOAL]\nsrc✝¹ : LinearOrderedCommRing ℤ := linearOrderedCommRing\nsrc✝ : Lattice ℤ := LinearOrder.toLattice\n⊢ ∀ (s : Set ℤ) (a : ℤ), Set.Nonempty s → a ∈ lowerBounds s → a ≤ sInf s\n[PROOFSTEP]\nintro s n hs hns\n[GOAL]\nsrc✝¹ : LinearOrderedCommRing ℤ := linearOrderedCommRing\nsrc✝ : Lattice ℤ := LinearOrder.toLattice\ns : Set ℤ\nn : ℤ\nhs : Set.Nonempty s\nhns : n ∈ lowerBounds s\n⊢ n ≤ sInf s\n[PROOFSTEP]\nhave : s.Nonempty ∧ BddBelow s :=\n  ⟨hs, ⟨n, hns⟩⟩\n    -- Porting note: this was `rw [dif_pos this]`\n[GOAL]\nsrc✝¹ : LinearOrderedCommRing ℤ := linearOrderedCommRing\nsrc✝ : Lattice ℤ := LinearOrder.toLattice\ns : Set ℤ\nn : ℤ\nhs : Set.Nonempty s\nhns : n ∈ lowerBounds s\nthis : Set.Nonempty s ∧ BddBelow s\n⊢ n ≤ sInf s\n[PROOFSTEP]\nsimp only [this, and_self, dite_true, ge_iff_le]\n[GOAL]\nsrc✝¹ : LinearOrderedCommRing ℤ := linearOrderedCommRing\nsrc✝ : Lattice ℤ := LinearOrder.toLattice\ns : Set ℤ\nn : ℤ\nhs : Set.Nonempty s\nhns : n ∈ lowerBounds s\nthis : Set.Nonempty s ∧ BddBelow s\n⊢ n ≤ ↑(leastOfBdd (choose (_ : BddBelow s)) (_ : choose (_ : BddBelow s) ∈ lowerBounds s) (_ : Set.Nonempty s))\n[PROOFSTEP]\nexact hns (leastOfBdd _ (Classical.choose_spec this.2) _).2.1\n[GOAL]\nsrc✝¹ : LinearOrderedCommRing ℤ := linearOrderedCommRing\nsrc✝ : Lattice ℤ := LinearOrder.toLattice\ns : Set ℤ\nhs : ¬BddAbove s\n⊢ sSup s = sSup Set.univ\n[PROOFSTEP]\nsimp [hs]\n[GOAL]\nsrc✝¹ : LinearOrderedCommRing ℤ := linearOrderedCommRing\nsrc✝ : Lattice ℤ := LinearOrder.toLattice\ns : Set ℤ\nhs : ¬BddBelow s\n⊢ sInf s = sInf Set.univ\n[PROOFSTEP]\nsimp [hs]\n[GOAL]\ns : Set ℤ\ninst✝ : DecidablePred fun x => x ∈ s\nb : ℤ\nHb : ∀ (z : ℤ), z ∈ s → z ≤ b\nHinh : ∃ z, z ∈ s\n⊢ sSup s = ↑(greatestOfBdd b Hb Hinh)\n[PROOFSTEP]\nhave : s.Nonempty ∧ BddAbove s := ⟨Hinh, b, Hb⟩\n[GOAL]\ns : Set ℤ\ninst✝ : DecidablePred fun x => x ∈ s\nb : ℤ\nHb : ∀ (z : ℤ), z ∈ s → z ≤ b\nHinh : ∃ z, z ∈ s\nthis : Set.Nonempty s ∧ BddAbove s\n⊢ sSup s = ↑(greatestOfBdd b Hb Hinh)\n[PROOFSTEP]\nsimp only [sSup, this, and_self, dite_true]\n[GOAL]\ns : Set ℤ\ninst✝ : DecidablePred fun x => x ∈ s\nb : ℤ\nHb : ∀ (z : ℤ), z ∈ s → z ≤ b\nHinh : ∃ z, z ∈ s\nthis : Set.Nonempty s ∧ BddAbove s\n⊢ ↑(greatestOfBdd (choose (_ : BddAbove s)) (_ : choose (_ : BddAbove s) ∈ upperBounds s) (_ : Set.Nonempty s)) =\n    ↑(greatestOfBdd b Hb Hinh)\n[PROOFSTEP]\nconvert (coe_greatestOfBdd_eq Hb (Classical.choose_spec (⟨b, Hb⟩ : BddAbove s)) Hinh).symm\n[GOAL]\n⊢ ¬(Set.Nonempty ∅ ∧ BddAbove ∅)\n[PROOFSTEP]\nsimp\n[GOAL]\ns : Set ℤ\nh : ¬BddAbove s\n⊢ ¬(Set.Nonempty s ∧ BddAbove s)\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ns : Set ℤ\ninst✝ : DecidablePred fun x => x ∈ s\nb : ℤ\nHb : ∀ (z : ℤ), z ∈ s → b ≤ z\nHinh : ∃ z, z ∈ s\n⊢ sInf s = ↑(leastOfBdd b Hb Hinh)\n[PROOFSTEP]\nhave : s.Nonempty ∧ BddBelow s := ⟨Hinh, b, Hb⟩\n[GOAL]\ns : Set ℤ\ninst✝ : DecidablePred fun x => x ∈ s\nb : ℤ\nHb : ∀ (z : ℤ), z ∈ s → b ≤ z\nHinh : ∃ z, z ∈ s\nthis : Set.Nonempty s ∧ BddBelow s\n⊢ sInf s = ↑(leastOfBdd b Hb Hinh)\n[PROOFSTEP]\nsimp only [sInf, this, and_self, dite_true]\n[GOAL]\ns : Set ℤ\ninst✝ : DecidablePred fun x => x ∈ s\nb : ℤ\nHb : ∀ (z : ℤ), z ∈ s → b ≤ z\nHinh : ∃ z, z ∈ s\nthis : Set.Nonempty s ∧ BddBelow s\n⊢ ↑(leastOfBdd (choose (_ : BddBelow s)) (_ : choose (_ : BddBelow s) ∈ lowerBounds s) (_ : Set.Nonempty s)) =\n    ↑(leastOfBdd b Hb Hinh)\n[PROOFSTEP]\nconvert (coe_leastOfBdd_eq Hb (Classical.choose_spec (⟨b, Hb⟩ : BddBelow s)) Hinh).symm\n[GOAL]\n⊢ ¬(Set.Nonempty ∅ ∧ BddBelow ∅)\n[PROOFSTEP]\nsimp\n[GOAL]\ns : Set ℤ\nh : ¬BddBelow s\n⊢ ¬(Set.Nonempty s ∧ BddBelow s)\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ns : Set ℤ\nh1 : Set.Nonempty s\nh2 : BddAbove s\n⊢ sSup s ∈ s\n[PROOFSTEP]\nconvert (greatestOfBdd _ (Classical.choose_spec h2) h1).2.1\n[GOAL]\ncase h.e'_4\ns : Set ℤ\nh1 : Set.Nonempty s\nh2 : BddAbove s\n⊢ sSup s = ↑(greatestOfBdd (choose h2) (_ : choose h2 ∈ upperBounds s) h1)\n[PROOFSTEP]\nexact dif_pos ⟨h1, h2⟩\n[GOAL]\ns : Set ℤ\nh1 : Set.Nonempty s\nh2 : BddBelow s\n⊢ sInf s ∈ s\n[PROOFSTEP]\nconvert (leastOfBdd _ (Classical.choose_spec h2) h1).2.1\n[GOAL]\ncase h.e'_4\ns : Set ℤ\nh1 : Set.Nonempty s\nh2 : BddBelow s\n⊢ sInf s = ↑(leastOfBdd (choose h2) (_ : choose h2 ∈ lowerBounds s) h1)\n[PROOFSTEP]\nexact dif_pos ⟨h1, h2⟩\n", "meta": {"mathlib_filename": "Mathlib.Data.Int.ConditionallyCompleteOrder", "llama_tokens": 3618, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8080672135527631, "lm_q2_score": 0.665410558746814, "lm_q1q2_score": 0.5376964560751252}}
{"text": "[GOAL]\nB : Type u\ninst✝ : Bicategory B\na b c : B\nf : a ⟶ b\ng h : b ⟶ c\nη : g = h\n⊢ f ◁ eqToHom η = eqToHom (_ : f ≫ g = f ≫ h)\n[PROOFSTEP]\ncases η\n[GOAL]\ncase refl\nB : Type u\ninst✝ : Bicategory B\na b c : B\nf : a ⟶ b\ng : b ⟶ c\n⊢ f ◁ eqToHom (_ : g = g) = eqToHom (_ : f ≫ g = f ≫ g)\n[PROOFSTEP]\nsimp only [whiskerLeft_id, eqToHom_refl]\n[GOAL]\nB : Type u\ninst✝ : Bicategory B\na b c : B\nf g : a ⟶ b\nη : f = g\nh : b ⟶ c\n⊢ eqToHom η ▷ h = eqToHom (_ : f ≫ h = g ≫ h)\n[PROOFSTEP]\ncases η\n[GOAL]\ncase refl\nB : Type u\ninst✝ : Bicategory B\na b c : B\nf : a ⟶ b\nh : b ⟶ c\n⊢ eqToHom (_ : f = f) ▷ h = eqToHom (_ : f ≫ h = f ≫ h)\n[PROOFSTEP]\nsimp only [id_whiskerRight, eqToHom_refl]\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Bicategory.Strict", "llama_tokens": 374, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7799929002541068, "lm_q2_score": 0.6893056167854461, "lm_q1q2_score": 0.537653487197926}}
{"text": "[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nt : Term L α\ng : α → β\nv : β → M\n⊢ realize v (relabel g t) = realize (v ∘ g) t\n[PROOFSTEP]\ninduction' t with _ n f ts ih\n[GOAL]\ncase var\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\ng : α → β\nv : β → M\n_a✝ : α\n⊢ realize v (relabel g (var _a✝)) = realize (v ∘ g) (var _a✝)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase func\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\ng : α → β\nv : β → M\nn : ℕ\nf : Functions L n\nts : Fin n → Term L α\nih : ∀ (a : Fin n), realize v (relabel g (ts a)) = realize (v ∘ g) (ts a)\n⊢ realize v (relabel g (func f ts)) = realize (v ∘ g) (func f ts)\n[PROOFSTEP]\nsimp [ih]\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nf : Functions L 1\nt : Term L α\nv : α → M\n⊢ realize v (Functions.apply₁ f t) = funMap f ![realize v t]\n[PROOFSTEP]\nrw [Functions.apply₁, Term.realize]\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nf : Functions L 1\nt : Term L α\nv : α → M\n⊢ (funMap f fun i => realize v (Matrix.vecCons t ![] i)) = funMap f ![realize v t]\n[PROOFSTEP]\nrefine' congr rfl (funext fun i => _)\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nf : Functions L 1\nt : Term L α\nv : α → M\ni : Fin 1\n⊢ realize v (Matrix.vecCons t ![] i) = Matrix.vecCons (realize v t) ![] i\n[PROOFSTEP]\nsimp only [Matrix.cons_val_fin_one]\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nf : Functions L 2\nt₁ t₂ : Term L α\nv : α → M\n⊢ realize v (Functions.apply₂ f t₁ t₂) = funMap f ![realize v t₁, realize v t₂]\n[PROOFSTEP]\nrw [Functions.apply₂, Term.realize]\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nf : Functions L 2\nt₁ t₂ : Term L α\nv : α → M\n⊢ (funMap f fun i => realize v (Matrix.vecCons t₁ ![t₂] i)) = funMap f ![realize v t₁, realize v t₂]\n[PROOFSTEP]\nrefine' congr rfl (funext (Fin.cases _ _))\n[GOAL]\ncase refine'_1\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nf : Functions L 2\nt₁ t₂ : Term L α\nv : α → M\n⊢ realize v (Matrix.vecCons t₁ ![t₂] 0) = Matrix.vecCons (realize v t₁) ![realize v t₂] 0\n[PROOFSTEP]\nsimp only [Matrix.cons_val_zero]\n[GOAL]\ncase refine'_2\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nf : Functions L 2\nt₁ t₂ : Term L α\nv : α → M\n⊢ ∀ (i : Fin 1), realize v (Matrix.vecCons t₁ ![t₂] (succ i)) = Matrix.vecCons (realize v t₁) ![realize v t₂] (succ i)\n[PROOFSTEP]\nsimp only [Matrix.cons_val_succ, Matrix.cons_val_fin_one, forall_const]\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nt : Term L α\ntf : α → Term L β\nv : β → M\n⊢ realize v (subst t tf) = realize (fun a => realize v (tf a)) t\n[PROOFSTEP]\ninduction' t with _ _ _ _ ih\n[GOAL]\ncase var\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\ntf : α → Term L β\nv : β → M\n_a✝ : α\n⊢ realize v (subst (var _a✝) tf) = realize (fun a => realize v (tf a)) (var _a✝)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase func\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\ntf : α → Term L β\nv : β → M\nl✝ : ℕ\n_f✝ : Functions L l✝\n_ts✝ : Fin l✝ → Term L α\nih : ∀ (a : Fin l✝), realize v (subst (_ts✝ a) tf) = realize (fun a => realize v (tf a)) (_ts✝ a)\n⊢ realize v (subst (func _f✝ _ts✝) tf) = realize (fun a => realize v (tf a)) (func _f✝ _ts✝)\n[PROOFSTEP]\nsimp [ih]\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\ninst✝ : DecidableEq α\nt : Term L α\ns : Set α\nh : ↑(varFinset t) ⊆ s\nv : α → M\n⊢ realize (v ∘ Subtype.val) (restrictVar t (Set.inclusion h)) = realize v t\n[PROOFSTEP]\ninduction' t with _ _ _ _ ih\n[GOAL]\ncase var\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\ninst✝ : DecidableEq α\nt : Term L α\ns : Set α\nh✝ : ↑(varFinset t) ⊆ s\nv : α → M\n_a✝ : α\nh : ↑(varFinset (var _a✝)) ⊆ s\n⊢ realize (v ∘ Subtype.val) (restrictVar (var _a✝) (Set.inclusion h)) = realize v (var _a✝)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase func\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\ninst✝ : DecidableEq α\nt : Term L α\ns : Set α\nh✝ : ↑(varFinset t) ⊆ s\nv : α → M\nl✝ : ℕ\n_f✝ : Functions L l✝\n_ts✝ : Fin l✝ → Term L α\nih :\n  ∀ (a : Fin l✝) (h : ↑(varFinset (_ts✝ a)) ⊆ s),\n    realize (v ∘ Subtype.val) (restrictVar (_ts✝ a) (Set.inclusion h)) = realize v (_ts✝ a)\nh : ↑(varFinset (func _f✝ _ts✝)) ⊆ s\n⊢ realize (v ∘ Subtype.val) (restrictVar (func _f✝ _ts✝) (Set.inclusion h)) = realize v (func _f✝ _ts✝)\n[PROOFSTEP]\nsimp_rw [varFinset, Finset.coe_biUnion, Set.iUnion_subset_iff] at h \n[GOAL]\ncase func\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\ninst✝ : DecidableEq α\nt : Term L α\ns : Set α\nh✝¹ : ↑(varFinset t) ⊆ s\nv : α → M\nl✝ : ℕ\n_f✝ : Functions L l✝\n_ts✝ : Fin l✝ → Term L α\nih :\n  ∀ (a : Fin l✝) (h : ↑(varFinset (_ts✝ a)) ⊆ s),\n    realize (v ∘ Subtype.val) (restrictVar (_ts✝ a) (Set.inclusion h)) = realize v (_ts✝ a)\nh✝ : ↑(Finset.biUnion Finset.univ fun i => varFinset (_ts✝ i)) ⊆ s\nh : ∀ (i : Fin l✝), i ∈ ↑Finset.univ → ↑(varFinset (_ts✝ i)) ⊆ s\n⊢ realize (v ∘ Subtype.val) (restrictVar (func _f✝ _ts✝) (Set.inclusion h✝)) = realize v (func _f✝ _ts✝)\n[PROOFSTEP]\nexact congr rfl (funext fun i => ih i (h i (Finset.mem_univ i)))\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\ninst✝ : DecidableEq α\nγ : Type u_3\nt : Term L (α ⊕ γ)\ns : Set α\nh : ↑(varFinsetLeft t) ⊆ s\nv : α → M\nxs : γ → M\n⊢ realize (Sum.elim (v ∘ Subtype.val) xs) (restrictVarLeft t (Set.inclusion h)) = realize (Sum.elim v xs) t\n[PROOFSTEP]\ninduction' t with a _ _ _ ih\n[GOAL]\ncase var\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\ninst✝ : DecidableEq α\nγ : Type u_3\nt : Term L (α ⊕ γ)\ns : Set α\nh✝ : ↑(varFinsetLeft t) ⊆ s\nv : α → M\nxs : γ → M\na : α ⊕ γ\nh : ↑(varFinsetLeft (var a)) ⊆ s\n⊢ realize (Sum.elim (v ∘ Subtype.val) xs) (restrictVarLeft (var a) (Set.inclusion h)) = realize (Sum.elim v xs) (var a)\n[PROOFSTEP]\ncases a\n[GOAL]\ncase var.inl\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\ninst✝ : DecidableEq α\nγ : Type u_3\nt : Term L (α ⊕ γ)\ns : Set α\nh✝ : ↑(varFinsetLeft t) ⊆ s\nv : α → M\nxs : γ → M\nval✝ : α\nh : ↑(varFinsetLeft (var (Sum.inl val✝))) ⊆ s\n⊢ realize (Sum.elim (v ∘ Subtype.val) xs) (restrictVarLeft (var (Sum.inl val✝)) (Set.inclusion h)) =\n    realize (Sum.elim v xs) (var (Sum.inl val✝))\n[PROOFSTEP]\nrfl\n[GOAL]\ncase var.inr\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\ninst✝ : DecidableEq α\nγ : Type u_3\nt : Term L (α ⊕ γ)\ns : Set α\nh✝ : ↑(varFinsetLeft t) ⊆ s\nv : α → M\nxs : γ → M\nval✝ : γ\nh : ↑(varFinsetLeft (var (Sum.inr val✝))) ⊆ s\n⊢ realize (Sum.elim (v ∘ Subtype.val) xs) (restrictVarLeft (var (Sum.inr val✝)) (Set.inclusion h)) =\n    realize (Sum.elim v xs) (var (Sum.inr val✝))\n[PROOFSTEP]\nrfl\n[GOAL]\ncase func\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\ninst✝ : DecidableEq α\nγ : Type u_3\nt : Term L (α ⊕ γ)\ns : Set α\nh✝ : ↑(varFinsetLeft t) ⊆ s\nv : α → M\nxs : γ → M\nl✝ : ℕ\n_f✝ : Functions L l✝\n_ts✝ : Fin l✝ → Term L (α ⊕ γ)\nih :\n  ∀ (a : Fin l✝) (h : ↑(varFinsetLeft (_ts✝ a)) ⊆ s),\n    realize (Sum.elim (v ∘ Subtype.val) xs) (restrictVarLeft (_ts✝ a) (Set.inclusion h)) =\n      realize (Sum.elim v xs) (_ts✝ a)\nh : ↑(varFinsetLeft (func _f✝ _ts✝)) ⊆ s\n⊢ realize (Sum.elim (v ∘ Subtype.val) xs) (restrictVarLeft (func _f✝ _ts✝) (Set.inclusion h)) =\n    realize (Sum.elim v xs) (func _f✝ _ts✝)\n[PROOFSTEP]\nsimp_rw [varFinsetLeft, Finset.coe_biUnion, Set.iUnion_subset_iff] at h \n[GOAL]\ncase func\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\ninst✝ : DecidableEq α\nγ : Type u_3\nt : Term L (α ⊕ γ)\ns : Set α\nh✝¹ : ↑(varFinsetLeft t) ⊆ s\nv : α → M\nxs : γ → M\nl✝ : ℕ\n_f✝ : Functions L l✝\n_ts✝ : Fin l✝ → Term L (α ⊕ γ)\nih :\n  ∀ (a : Fin l✝) (h : ↑(varFinsetLeft (_ts✝ a)) ⊆ s),\n    realize (Sum.elim (v ∘ Subtype.val) xs) (restrictVarLeft (_ts✝ a) (Set.inclusion h)) =\n      realize (Sum.elim v xs) (_ts✝ a)\nh✝ : ↑(Finset.biUnion Finset.univ fun i => varFinsetLeft (_ts✝ i)) ⊆ s\nh : ∀ (i : Fin l✝), i ∈ ↑Finset.univ → ↑(varFinsetLeft (_ts✝ i)) ⊆ s\n⊢ realize (Sum.elim (v ∘ Subtype.val) xs) (restrictVarLeft (func _f✝ _ts✝) (Set.inclusion h✝)) =\n    realize (Sum.elim v xs) (func _f✝ _ts✝)\n[PROOFSTEP]\nexact congr rfl (funext fun i => ih i (h i (Finset.mem_univ i)))\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝⁴ : Structure L M\ninst✝³ : Structure L N\ninst✝² : Structure L P\nα : Type u'\nβ : Type v'\ninst✝¹ : Structure (L[[α]]) M\ninst✝ : LHom.IsExpansionOn (lhomWithConstants L α) M\nt : Term (L[[α]]) β\nv : β → M\n⊢ realize (Sum.elim (fun a => ↑(Language.con L a)) v) (constantsToVars t) = realize v t\n[PROOFSTEP]\ninduction' t with _ n f ts ih\n[GOAL]\ncase var\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝⁴ : Structure L M\ninst✝³ : Structure L N\ninst✝² : Structure L P\nα : Type u'\nβ : Type v'\ninst✝¹ : Structure (L[[α]]) M\ninst✝ : LHom.IsExpansionOn (lhomWithConstants L α) M\nv : β → M\n_a✝ : β\n⊢ realize (Sum.elim (fun a => ↑(Language.con L a)) v) (constantsToVars (var _a✝)) = realize v (var _a✝)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase func\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝⁴ : Structure L M\ninst✝³ : Structure L N\ninst✝² : Structure L P\nα : Type u'\nβ : Type v'\ninst✝¹ : Structure (L[[α]]) M\ninst✝ : LHom.IsExpansionOn (lhomWithConstants L α) M\nv : β → M\nn : ℕ\nf : Functions (L[[α]]) n\nts : Fin n → Term (L[[α]]) β\nih : ∀ (a : Fin n), realize (Sum.elim (fun a => ↑(Language.con L a)) v) (constantsToVars (ts a)) = realize v (ts a)\n⊢ realize (Sum.elim (fun a => ↑(Language.con L a)) v) (constantsToVars (func f ts)) = realize v (func f ts)\n[PROOFSTEP]\ncases n\n[GOAL]\ncase func.zero\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝⁴ : Structure L M\ninst✝³ : Structure L N\ninst✝² : Structure L P\nα : Type u'\nβ : Type v'\ninst✝¹ : Structure (L[[α]]) M\ninst✝ : LHom.IsExpansionOn (lhomWithConstants L α) M\nv : β → M\nf : Functions (L[[α]]) Nat.zero\nts : Fin Nat.zero → Term (L[[α]]) β\nih :\n  ∀ (a : Fin Nat.zero), realize (Sum.elim (fun a => ↑(Language.con L a)) v) (constantsToVars (ts a)) = realize v (ts a)\n⊢ realize (Sum.elim (fun a => ↑(Language.con L a)) v) (constantsToVars (func f ts)) = realize v (func f ts)\n[PROOFSTEP]\ncases f\n[GOAL]\ncase func.zero.inl\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝⁴ : Structure L M\ninst✝³ : Structure L N\ninst✝² : Structure L P\nα : Type u'\nβ : Type v'\ninst✝¹ : Structure (L[[α]]) M\ninst✝ : LHom.IsExpansionOn (lhomWithConstants L α) M\nv : β → M\nts : Fin Nat.zero → Term (L[[α]]) β\nih :\n  ∀ (a : Fin Nat.zero), realize (Sum.elim (fun a => ↑(Language.con L a)) v) (constantsToVars (ts a)) = realize v (ts a)\nval✝ : Functions L Nat.zero\n⊢ realize (Sum.elim (fun a => ↑(Language.con L a)) v) (constantsToVars (func (Sum.inl val✝) ts)) =\n    realize v (func (Sum.inl val✝) ts)\n[PROOFSTEP]\nsimp only [realize, ih, Nat.zero_eq, constantsOn, mk₂_Functions]\n  --Porting note: below lemma does not work with simp for some reason\n[GOAL]\ncase func.zero.inl\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝⁴ : Structure L M\ninst✝³ : Structure L N\ninst✝² : Structure L P\nα : Type u'\nβ : Type v'\ninst✝¹ : Structure (L[[α]]) M\ninst✝ : LHom.IsExpansionOn (lhomWithConstants L α) M\nv : β → M\nts : Fin Nat.zero → Term (L[[α]]) β\nih :\n  ∀ (a : Fin Nat.zero), realize (Sum.elim (fun a => ↑(Language.con L a)) v) (constantsToVars (ts a)) = realize v (ts a)\nval✝ : Functions L Nat.zero\n⊢ (funMap val✝ fun i => realize v (ts i)) = funMap (Sum.inl val✝) fun i => realize v (ts i)\n[PROOFSTEP]\nrw [withConstants_funMap_sum_inl]\n[GOAL]\ncase func.zero.inr\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝⁴ : Structure L M\ninst✝³ : Structure L N\ninst✝² : Structure L P\nα : Type u'\nβ : Type v'\ninst✝¹ : Structure (L[[α]]) M\ninst✝ : LHom.IsExpansionOn (lhomWithConstants L α) M\nv : β → M\nts : Fin Nat.zero → Term (L[[α]]) β\nih :\n  ∀ (a : Fin Nat.zero), realize (Sum.elim (fun a => ↑(Language.con L a)) v) (constantsToVars (ts a)) = realize v (ts a)\nval✝ : Functions (constantsOn α) Nat.zero\n⊢ realize (Sum.elim (fun a => ↑(Language.con L a)) v) (constantsToVars (func (Sum.inr val✝) ts)) =\n    realize v (func (Sum.inr val✝) ts)\n[PROOFSTEP]\nsimp only [realize, constantsToVars, Sum.elim_inl, funMap_eq_coe_constants]\n[GOAL]\ncase func.zero.inr\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝⁴ : Structure L M\ninst✝³ : Structure L N\ninst✝² : Structure L P\nα : Type u'\nβ : Type v'\ninst✝¹ : Structure (L[[α]]) M\ninst✝ : LHom.IsExpansionOn (lhomWithConstants L α) M\nv : β → M\nts : Fin Nat.zero → Term (L[[α]]) β\nih :\n  ∀ (a : Fin Nat.zero), realize (Sum.elim (fun a => ↑(Language.con L a)) v) (constantsToVars (ts a)) = realize v (ts a)\nval✝ : Functions (constantsOn α) Nat.zero\n⊢ ↑(Language.con L val✝) = ↑(Sum.inr val✝)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase func.succ\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝⁴ : Structure L M\ninst✝³ : Structure L N\ninst✝² : Structure L P\nα : Type u'\nβ : Type v'\ninst✝¹ : Structure (L[[α]]) M\ninst✝ : LHom.IsExpansionOn (lhomWithConstants L α) M\nv : β → M\nn✝ : ℕ\nf : Functions (L[[α]]) (Nat.succ n✝)\nts : Fin (Nat.succ n✝) → Term (L[[α]]) β\nih :\n  ∀ (a : Fin (Nat.succ n✝)),\n    realize (Sum.elim (fun a => ↑(Language.con L a)) v) (constantsToVars (ts a)) = realize v (ts a)\n⊢ realize (Sum.elim (fun a => ↑(Language.con L a)) v) (constantsToVars (func f ts)) = realize v (func f ts)\n[PROOFSTEP]\ncases' f with _ f\n[GOAL]\ncase func.succ.inl\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝⁴ : Structure L M\ninst✝³ : Structure L N\ninst✝² : Structure L P\nα : Type u'\nβ : Type v'\ninst✝¹ : Structure (L[[α]]) M\ninst✝ : LHom.IsExpansionOn (lhomWithConstants L α) M\nv : β → M\nn✝ : ℕ\nts : Fin (Nat.succ n✝) → Term (L[[α]]) β\nih :\n  ∀ (a : Fin (Nat.succ n✝)),\n    realize (Sum.elim (fun a => ↑(Language.con L a)) v) (constantsToVars (ts a)) = realize v (ts a)\nval✝ : Functions L (Nat.succ n✝)\n⊢ realize (Sum.elim (fun a => ↑(Language.con L a)) v) (constantsToVars (func (Sum.inl val✝) ts)) =\n    realize v (func (Sum.inl val✝) ts)\n[PROOFSTEP]\nsimp only [realize, ih, constantsOn, mk₂_Functions]\n  --Porting note: below lemma does not work with simp for some reason\n[GOAL]\ncase func.succ.inl\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝⁴ : Structure L M\ninst✝³ : Structure L N\ninst✝² : Structure L P\nα : Type u'\nβ : Type v'\ninst✝¹ : Structure (L[[α]]) M\ninst✝ : LHom.IsExpansionOn (lhomWithConstants L α) M\nv : β → M\nn✝ : ℕ\nts : Fin (Nat.succ n✝) → Term (L[[α]]) β\nih :\n  ∀ (a : Fin (Nat.succ n✝)),\n    realize (Sum.elim (fun a => ↑(Language.con L a)) v) (constantsToVars (ts a)) = realize v (ts a)\nval✝ : Functions L (Nat.succ n✝)\n⊢ (funMap val✝ fun i => realize v (ts i)) = funMap (Sum.inl val✝) fun i => realize v (ts i)\n[PROOFSTEP]\nrw [withConstants_funMap_sum_inl]\n[GOAL]\ncase func.succ.inr\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝⁴ : Structure L M\ninst✝³ : Structure L N\ninst✝² : Structure L P\nα : Type u'\nβ : Type v'\ninst✝¹ : Structure (L[[α]]) M\ninst✝ : LHom.IsExpansionOn (lhomWithConstants L α) M\nv : β → M\nn✝ : ℕ\nts : Fin (Nat.succ n✝) → Term (L[[α]]) β\nih :\n  ∀ (a : Fin (Nat.succ n✝)),\n    realize (Sum.elim (fun a => ↑(Language.con L a)) v) (constantsToVars (ts a)) = realize v (ts a)\nf : Functions (constantsOn α) (Nat.succ n✝)\n⊢ realize (Sum.elim (fun a => ↑(Language.con L a)) v) (constantsToVars (func (Sum.inr f) ts)) =\n    realize v (func (Sum.inr f) ts)\n[PROOFSTEP]\nexact isEmptyElim f\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝⁴ : Structure L M\ninst✝³ : Structure L N\ninst✝² : Structure L P\nα : Type u'\nβ : Type v'\ninst✝¹ : Structure (L[[α]]) M\ninst✝ : LHom.IsExpansionOn (lhomWithConstants L α) M\nt : Term L (α ⊕ β)\nv : β → M\n⊢ realize v (varsToConstants t) = realize (Sum.elim (fun a => ↑(Language.con L a)) v) t\n[PROOFSTEP]\ninduction' t with ab n f ts ih\n[GOAL]\ncase var\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝⁴ : Structure L M\ninst✝³ : Structure L N\ninst✝² : Structure L P\nα : Type u'\nβ : Type v'\ninst✝¹ : Structure (L[[α]]) M\ninst✝ : LHom.IsExpansionOn (lhomWithConstants L α) M\nv : β → M\nab : α ⊕ β\n⊢ realize v (varsToConstants (var ab)) = realize (Sum.elim (fun a => ↑(Language.con L a)) v) (var ab)\n[PROOFSTEP]\ncases' ab with a b\n[GOAL]\ncase var.inl\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝⁴ : Structure L M\ninst✝³ : Structure L N\ninst✝² : Structure L P\nα : Type u'\nβ : Type v'\ninst✝¹ : Structure (L[[α]]) M\ninst✝ : LHom.IsExpansionOn (lhomWithConstants L α) M\nv : β → M\na : α\n⊢ realize v (varsToConstants (var (Sum.inl a))) = realize (Sum.elim (fun a => ↑(Language.con L a)) v) (var (Sum.inl a))\n[PROOFSTEP]\nsimp [Language.con, realize, constantMap, funMap_eq_coe_constants]\n[GOAL]\ncase var.inr\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝⁴ : Structure L M\ninst✝³ : Structure L N\ninst✝² : Structure L P\nα : Type u'\nβ : Type v'\ninst✝¹ : Structure (L[[α]]) M\ninst✝ : LHom.IsExpansionOn (lhomWithConstants L α) M\nv : β → M\nb : β\n⊢ realize v (varsToConstants (var (Sum.inr b))) = realize (Sum.elim (fun a => ↑(Language.con L a)) v) (var (Sum.inr b))\n[PROOFSTEP]\nsimp [realize, constantMap]\n[GOAL]\ncase func\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝⁴ : Structure L M\ninst✝³ : Structure L N\ninst✝² : Structure L P\nα : Type u'\nβ : Type v'\ninst✝¹ : Structure (L[[α]]) M\ninst✝ : LHom.IsExpansionOn (lhomWithConstants L α) M\nv : β → M\nn : ℕ\nf : Functions L n\nts : Fin n → Term L (α ⊕ β)\nih : ∀ (a : Fin n), realize v (varsToConstants (ts a)) = realize (Sum.elim (fun a => ↑(Language.con L a)) v) (ts a)\n⊢ realize v (varsToConstants (func f ts)) = realize (Sum.elim (fun a => ↑(Language.con L a)) v) (func f ts)\n[PROOFSTEP]\nsimp only [realize, constantsOn, mk₂_Functions, ih]\n  --Porting note: below lemma does not work with simp for some reason\n[GOAL]\ncase func\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝⁴ : Structure L M\ninst✝³ : Structure L N\ninst✝² : Structure L P\nα : Type u'\nβ : Type v'\ninst✝¹ : Structure (L[[α]]) M\ninst✝ : LHom.IsExpansionOn (lhomWithConstants L α) M\nv : β → M\nn : ℕ\nf : Functions L n\nts : Fin n → Term L (α ⊕ β)\nih : ∀ (a : Fin n), realize v (varsToConstants (ts a)) = realize (Sum.elim (fun a => ↑(Language.con L a)) v) (ts a)\n⊢ (funMap (Sum.inl f) fun i => realize (Sum.elim (fun a => ↑(Language.con L a)) v) (ts i)) =\n    funMap f fun i => realize (Sum.elim (fun a => ↑(Language.con L a)) v) (ts i)\n[PROOFSTEP]\nrw [withConstants_funMap_sum_inl]\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝⁴ : Structure L M\ninst✝³ : Structure L N\ninst✝² : Structure L P\nα : Type u'\nβ : Type v'\ninst✝¹ : Structure (L[[α]]) M\ninst✝ : LHom.IsExpansionOn (lhomWithConstants L α) M\nn : ℕ\nt : Term (L[[α]]) (β ⊕ Fin n)\nv : β → M\nxs : Fin n → M\n⊢ realize (Sum.elim (Sum.elim (fun a => ↑(Language.con L a)) v) xs) (↑constantsVarsEquivLeft t) =\n    realize (Sum.elim v xs) t\n[PROOFSTEP]\nsimp only [constantsVarsEquivLeft, realize_relabel, Equiv.coe_trans, Function.comp_apply, constantsVarsEquiv_apply,\n  relabelEquiv_symm_apply]\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝⁴ : Structure L M\ninst✝³ : Structure L N\ninst✝² : Structure L P\nα : Type u'\nβ : Type v'\ninst✝¹ : Structure (L[[α]]) M\ninst✝ : LHom.IsExpansionOn (lhomWithConstants L α) M\nn : ℕ\nt : Term (L[[α]]) (β ⊕ Fin n)\nv : β → M\nxs : Fin n → M\n⊢ realize (Sum.elim (Sum.elim (fun a => ↑(Language.con L a)) v) xs ∘ ↑(Equiv.sumAssoc α β (Fin n)).symm)\n      (constantsToVars t) =\n    realize (Sum.elim v xs) t\n[PROOFSTEP]\nrefine' _root_.trans _ realize_constantsToVars\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝⁴ : Structure L M\ninst✝³ : Structure L N\ninst✝² : Structure L P\nα : Type u'\nβ : Type v'\ninst✝¹ : Structure (L[[α]]) M\ninst✝ : LHom.IsExpansionOn (lhomWithConstants L α) M\nn : ℕ\nt : Term (L[[α]]) (β ⊕ Fin n)\nv : β → M\nxs : Fin n → M\n⊢ realize (Sum.elim (Sum.elim (fun a => ↑(Language.con L a)) v) xs ∘ ↑(Equiv.sumAssoc α β (Fin n)).symm)\n      (constantsToVars t) =\n    realize (Sum.elim (fun a => ↑(Language.con L a)) (Sum.elim v xs)) (constantsToVars t)\n[PROOFSTEP]\nrcongr x\n[GOAL]\ncase e_v.h\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝⁴ : Structure L M\ninst✝³ : Structure L N\ninst✝² : Structure L P\nα : Type u'\nβ : Type v'\ninst✝¹ : Structure (L[[α]]) M\ninst✝ : LHom.IsExpansionOn (lhomWithConstants L α) M\nn : ℕ\nt : Term (L[[α]]) (β ⊕ Fin n)\nv : β → M\nxs : Fin n → M\nx : α ⊕ β ⊕ Fin n\n⊢ (Sum.elim (Sum.elim (fun a => ↑(Language.con L a)) v) xs ∘ ↑(Equiv.sumAssoc α β (Fin n)).symm) x =\n    Sum.elim (fun a => ↑(Language.con L a)) (Sum.elim v xs) x\n[PROOFSTEP]\nrcases x with (a | (b | i))\n[GOAL]\ncase e_v.h.inl\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝⁴ : Structure L M\ninst✝³ : Structure L N\ninst✝² : Structure L P\nα : Type u'\nβ : Type v'\ninst✝¹ : Structure (L[[α]]) M\ninst✝ : LHom.IsExpansionOn (lhomWithConstants L α) M\nn : ℕ\nt : Term (L[[α]]) (β ⊕ Fin n)\nv : β → M\nxs : Fin n → M\na : α\n⊢ (Sum.elim (Sum.elim (fun a => ↑(Language.con L a)) v) xs ∘ ↑(Equiv.sumAssoc α β (Fin n)).symm) (Sum.inl a) =\n    Sum.elim (fun a => ↑(Language.con L a)) (Sum.elim v xs) (Sum.inl a)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase e_v.h.inr.inl\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝⁴ : Structure L M\ninst✝³ : Structure L N\ninst✝² : Structure L P\nα : Type u'\nβ : Type v'\ninst✝¹ : Structure (L[[α]]) M\ninst✝ : LHom.IsExpansionOn (lhomWithConstants L α) M\nn : ℕ\nt : Term (L[[α]]) (β ⊕ Fin n)\nv : β → M\nxs : Fin n → M\nb : β\n⊢ (Sum.elim (Sum.elim (fun a => ↑(Language.con L a)) v) xs ∘ ↑(Equiv.sumAssoc α β (Fin n)).symm) (Sum.inr (Sum.inl b)) =\n    Sum.elim (fun a => ↑(Language.con L a)) (Sum.elim v xs) (Sum.inr (Sum.inl b))\n[PROOFSTEP]\nsimp\n[GOAL]\ncase e_v.h.inr.inr\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝⁴ : Structure L M\ninst✝³ : Structure L N\ninst✝² : Structure L P\nα : Type u'\nβ : Type v'\ninst✝¹ : Structure (L[[α]]) M\ninst✝ : LHom.IsExpansionOn (lhomWithConstants L α) M\nn : ℕ\nt : Term (L[[α]]) (β ⊕ Fin n)\nv : β → M\nxs : Fin n → M\ni : Fin n\n⊢ (Sum.elim (Sum.elim (fun a => ↑(Language.con L a)) v) xs ∘ ↑(Equiv.sumAssoc α β (Fin n)).symm) (Sum.inr (Sum.inr i)) =\n    Sum.elim (fun a => ↑(Language.con L a)) (Sum.elim v xs) (Sum.inr (Sum.inr i))\n[PROOFSTEP]\nsimp\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝⁴ : Structure L M\ninst✝³ : Structure L N\ninst✝² : Structure L P\nα : Type u'\nβ : Type v'\ninst✝¹ : Structure L' M\nφ : L →ᴸ L'\ninst✝ : IsExpansionOn φ M\nt : Term L α\nv : α → M\n⊢ Term.realize v (onTerm φ t) = Term.realize v t\n[PROOFSTEP]\ninduction' t with _ n f ts ih\n[GOAL]\ncase var\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝⁴ : Structure L M\ninst✝³ : Structure L N\ninst✝² : Structure L P\nα : Type u'\nβ : Type v'\ninst✝¹ : Structure L' M\nφ : L →ᴸ L'\ninst✝ : IsExpansionOn φ M\nv : α → M\n_a✝ : α\n⊢ Term.realize v (onTerm φ (var _a✝)) = Term.realize v (var _a✝)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase func\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝⁴ : Structure L M\ninst✝³ : Structure L N\ninst✝² : Structure L P\nα : Type u'\nβ : Type v'\ninst✝¹ : Structure L' M\nφ : L →ᴸ L'\ninst✝ : IsExpansionOn φ M\nv : α → M\nn : ℕ\nf : Functions L n\nts : Fin n → Term L α\nih : ∀ (a : Fin n), Term.realize v (onTerm φ (ts a)) = Term.realize v (ts a)\n⊢ Term.realize v (onTerm φ (func f ts)) = Term.realize v (func f ts)\n[PROOFSTEP]\nsimp only [Term.realize, LHom.onTerm, LHom.map_onFunction, ih]\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\ng : M →[L] N\nt : Term L α\nv : α → M\n⊢ Term.realize (↑g ∘ v) t = ↑g (Term.realize v t)\n[PROOFSTEP]\ninduction t\n[GOAL]\ncase var\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\ng : M →[L] N\nv : α → M\n_a✝ : α\n⊢ Term.realize (↑g ∘ v) (var _a✝) = ↑g (Term.realize v (var _a✝))\n[PROOFSTEP]\nrfl\n[GOAL]\ncase func\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\ng : M →[L] N\nv : α → M\nl✝ : ℕ\n_f✝ : Functions L l✝\n_ts✝ : Fin l✝ → Term L α\n_ts_ih✝ : ∀ (a : Fin l✝), Term.realize (↑g ∘ v) (_ts✝ a) = ↑g (Term.realize v (_ts✝ a))\n⊢ Term.realize (↑g ∘ v) (func _f✝ _ts✝) = ↑g (Term.realize v (func _f✝ _ts✝))\n[PROOFSTEP]\nrw [Term.realize, Term.realize, g.map_fun]\n[GOAL]\ncase func\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\ng : M →[L] N\nv : α → M\nl✝ : ℕ\n_f✝ : Functions L l✝\n_ts✝ : Fin l✝ → Term L α\n_ts_ih✝ : ∀ (a : Fin l✝), Term.realize (↑g ∘ v) (_ts✝ a) = ↑g (Term.realize v (_ts✝ a))\n⊢ (funMap _f✝ fun i => Term.realize (↑g ∘ v) (_ts✝ i)) = funMap _f✝ (↑g ∘ fun i => Term.realize v (_ts✝ i))\n[PROOFSTEP]\nrefine' congr rfl _\n[GOAL]\ncase func\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\ng : M →[L] N\nv : α → M\nl✝ : ℕ\n_f✝ : Functions L l✝\n_ts✝ : Fin l✝ → Term L α\n_ts_ih✝ : ∀ (a : Fin l✝), Term.realize (↑g ∘ v) (_ts✝ a) = ↑g (Term.realize v (_ts✝ a))\n⊢ (fun i => Term.realize (↑g ∘ v) (_ts✝ i)) = ↑g ∘ fun i => Term.realize v (_ts✝ i)\n[PROOFSTEP]\next x\n[GOAL]\ncase func.h\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\ng : M →[L] N\nv : α → M\nl✝ : ℕ\n_f✝ : Functions L l✝\n_ts✝ : Fin l✝ → Term L α\n_ts_ih✝ : ∀ (a : Fin l✝), Term.realize (↑g ∘ v) (_ts✝ a) = ↑g (Term.realize v (_ts✝ a))\nx : Fin l✝\n⊢ Term.realize (↑g ∘ v) (_ts✝ x) = (↑g ∘ fun i => Term.realize v (_ts✝ i)) x\n[PROOFSTEP]\nsimp [*]\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn l : ℕ\nφ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv : α → M\nxs : Fin l → M\n⊢ Realize ⊤ v xs ↔ True\n[PROOFSTEP]\nsimp [Top.top]\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn l : ℕ\nφ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv : α → M\nxs : Fin l → M\n⊢ Realize (φ ⊓ ψ) v xs ↔ Realize φ v xs ∧ Realize ψ v xs\n[PROOFSTEP]\nsimp [Inf.inf, Realize]\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn l : ℕ\nφ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv : α → M\nxs : Fin l → M\n⊢ (Realize φ v xs → Realize ψ v xs → False) → False ↔ Realize φ v xs ∧ Realize ψ v xs\n[PROOFSTEP]\ntauto\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn l✝ : ℕ\nφ ψ : BoundedFormula L α l✝\nθ : BoundedFormula L α (Nat.succ l✝)\nv✝ : α → M\nxs✝ : Fin l✝ → M\nl : List (BoundedFormula L α n)\nv : α → M\nxs : Fin n → M\n⊢ Realize (List.foldr (fun x x_1 => x ⊓ x_1) ⊤ l) v xs ↔ ∀ (φ : BoundedFormula L α n), φ ∈ l → Realize φ v xs\n[PROOFSTEP]\ninduction' l with φ l ih\n[GOAL]\ncase nil\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn l : ℕ\nφ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝ : Fin l → M\nv : α → M\nxs : Fin n → M\n⊢ Realize (List.foldr (fun x x_1 => x ⊓ x_1) ⊤ []) v xs ↔ ∀ (φ : BoundedFormula L α n), φ ∈ [] → Realize φ v xs\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn l✝ : ℕ\nφ✝ ψ : BoundedFormula L α l✝\nθ : BoundedFormula L α (Nat.succ l✝)\nv✝ : α → M\nxs✝ : Fin l✝ → M\nv : α → M\nxs : Fin n → M\nφ : BoundedFormula L α n\nl : List (BoundedFormula L α n)\nih : Realize (List.foldr (fun x x_1 => x ⊓ x_1) ⊤ l) v xs ↔ ∀ (φ : BoundedFormula L α n), φ ∈ l → Realize φ v xs\n⊢ Realize (List.foldr (fun x x_1 => x ⊓ x_1) ⊤ (φ :: l)) v xs ↔\n    ∀ (φ_1 : BoundedFormula L α n), φ_1 ∈ φ :: l → Realize φ_1 v xs\n[PROOFSTEP]\nsimp [ih]\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn l : ℕ\nφ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv : α → M\nxs : Fin l → M\n⊢ Realize (φ ⟹ ψ) v xs ↔ Realize φ v xs → Realize ψ v xs\n[PROOFSTEP]\nsimp only [Realize]\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn l : ℕ\nφ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv : α → M\nxs : Fin l → M\nR : Relations L 1\nt : Term L (α ⊕ Fin l)\n⊢ Realize (Relations.boundedFormula₁ R t) v xs ↔ RelMap R ![realize (Sum.elim v xs) t]\n[PROOFSTEP]\nrw [Relations.boundedFormula₁, realize_rel, iff_eq_eq]\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn l : ℕ\nφ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv : α → M\nxs : Fin l → M\nR : Relations L 1\nt : Term L (α ⊕ Fin l)\n⊢ (RelMap R fun i => realize (Sum.elim v xs) (Matrix.vecCons t ![] i)) = RelMap R ![realize (Sum.elim v xs) t]\n[PROOFSTEP]\nrefine' congr rfl (funext fun _ => _)\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn l : ℕ\nφ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv : α → M\nxs : Fin l → M\nR : Relations L 1\nt : Term L (α ⊕ Fin l)\nx✝ : Fin 1\n⊢ realize (Sum.elim v xs) (Matrix.vecCons t ![] x✝) = Matrix.vecCons (realize (Sum.elim v xs) t) ![] x✝\n[PROOFSTEP]\nsimp only [Matrix.cons_val_fin_one]\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn l : ℕ\nφ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv : α → M\nxs : Fin l → M\nR : Relations L 2\nt₁ t₂ : Term L (α ⊕ Fin l)\n⊢ Realize (Relations.boundedFormula₂ R t₁ t₂) v xs ↔ RelMap R ![realize (Sum.elim v xs) t₁, realize (Sum.elim v xs) t₂]\n[PROOFSTEP]\nrw [Relations.boundedFormula₂, realize_rel, iff_eq_eq]\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn l : ℕ\nφ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv : α → M\nxs : Fin l → M\nR : Relations L 2\nt₁ t₂ : Term L (α ⊕ Fin l)\n⊢ (RelMap R fun i => realize (Sum.elim v xs) (Matrix.vecCons t₁ ![t₂] i)) =\n    RelMap R ![realize (Sum.elim v xs) t₁, realize (Sum.elim v xs) t₂]\n[PROOFSTEP]\nrefine' congr rfl (funext (Fin.cases _ _))\n[GOAL]\ncase refine'_1\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn l : ℕ\nφ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv : α → M\nxs : Fin l → M\nR : Relations L 2\nt₁ t₂ : Term L (α ⊕ Fin l)\n⊢ realize (Sum.elim v xs) (Matrix.vecCons t₁ ![t₂] 0) =\n    Matrix.vecCons (realize (Sum.elim v xs) t₁) ![realize (Sum.elim v xs) t₂] 0\n[PROOFSTEP]\nsimp only [Matrix.cons_val_zero]\n[GOAL]\ncase refine'_2\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn l : ℕ\nφ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv : α → M\nxs : Fin l → M\nR : Relations L 2\nt₁ t₂ : Term L (α ⊕ Fin l)\n⊢ ∀ (i : Fin 1),\n    realize (Sum.elim v xs) (Matrix.vecCons t₁ ![t₂] (succ i)) =\n      Matrix.vecCons (realize (Sum.elim v xs) t₁) ![realize (Sum.elim v xs) t₂] (succ i)\n[PROOFSTEP]\nsimp only [Matrix.cons_val_succ, Matrix.cons_val_fin_one, forall_const]\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn l : ℕ\nφ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv : α → M\nxs : Fin l → M\n⊢ Realize (φ ⊔ ψ) v xs ↔ Realize φ v xs ∨ Realize ψ v xs\n[PROOFSTEP]\nsimp only [realize, Sup.sup, realize_not, eq_iff_iff]\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn l : ℕ\nφ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv : α → M\nxs : Fin l → M\n⊢ Realize (∼φ ⟹ ψ) v xs ↔ Realize φ v xs ∨ Realize ψ v xs\n[PROOFSTEP]\ntauto\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn l✝ : ℕ\nφ ψ : BoundedFormula L α l✝\nθ : BoundedFormula L α (Nat.succ l✝)\nv✝ : α → M\nxs✝ : Fin l✝ → M\nl : List (BoundedFormula L α n)\nv : α → M\nxs : Fin n → M\n⊢ Realize (List.foldr (fun x x_1 => x ⊔ x_1) ⊥ l) v xs ↔ ∃ φ, φ ∈ l ∧ Realize φ v xs\n[PROOFSTEP]\ninduction' l with φ l ih\n[GOAL]\ncase nil\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn l : ℕ\nφ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝ : Fin l → M\nv : α → M\nxs : Fin n → M\n⊢ Realize (List.foldr (fun x x_1 => x ⊔ x_1) ⊥ []) v xs ↔ ∃ φ, φ ∈ [] ∧ Realize φ v xs\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn l✝ : ℕ\nφ✝ ψ : BoundedFormula L α l✝\nθ : BoundedFormula L α (Nat.succ l✝)\nv✝ : α → M\nxs✝ : Fin l✝ → M\nv : α → M\nxs : Fin n → M\nφ : BoundedFormula L α n\nl : List (BoundedFormula L α n)\nih : Realize (List.foldr (fun x x_1 => x ⊔ x_1) ⊥ l) v xs ↔ ∃ φ, φ ∈ l ∧ Realize φ v xs\n⊢ Realize (List.foldr (fun x x_1 => x ⊔ x_1) ⊥ (φ :: l)) v xs ↔ ∃ φ_1, φ_1 ∈ φ :: l ∧ Realize φ_1 v xs\n[PROOFSTEP]\nsimp_rw [List.foldr_cons, realize_sup, ih, List.mem_cons, or_and_right, exists_or, exists_eq_left]\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn l : ℕ\nφ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv : α → M\nxs : Fin l → M\n⊢ Realize (∃'θ) v xs ↔ ∃ a, Realize θ v (snoc xs a)\n[PROOFSTEP]\nrw [BoundedFormula.ex, realize_not, realize_all, not_forall]\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn l : ℕ\nφ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv : α → M\nxs : Fin l → M\n⊢ (∃ x, ¬Realize (∼θ) v (snoc xs x)) ↔ ∃ a, Realize θ v (snoc xs a)\n[PROOFSTEP]\nsimp_rw [realize_not, Classical.not_not]\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn l : ℕ\nφ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv : α → M\nxs : Fin l → M\n⊢ Realize (φ ⇔ ψ) v xs ↔ (Realize φ v xs ↔ Realize ψ v xs)\n[PROOFSTEP]\nsimp only [BoundedFormula.iff, realize_inf, realize_imp, and_imp, ← iff_def]\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn✝ l : ℕ\nφ✝ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝ : Fin l → M\nm n : ℕ\nh : m = n\nh' : m ≤ n\nφ : BoundedFormula L α m\nv : α → M\nxs : Fin n → M\n⊢ Realize (castLE h' φ) v xs ↔ Realize φ v (xs ∘ ↑(castIso h))\n[PROOFSTEP]\nsubst h\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn l : ℕ\nφ✝ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝ : Fin l → M\nm : ℕ\nφ : BoundedFormula L α m\nv : α → M\nh' : m ≤ m\nxs : Fin m → M\n⊢ Realize (castLE h' φ) v xs ↔ Realize φ v (xs ∘ ↑(castIso (_ : m = m)))\n[PROOFSTEP]\nsimp only [castLE_rfl, castIso_refl, OrderIso.coe_refl, Function.comp.right_id]\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\nn✝ l : ℕ\nφ✝ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝ : Fin l → M\ninst✝ : Structure L' M\nft : (n : ℕ) → Term L (α ⊕ Fin n) → Term L' (β ⊕ Fin n)\nfr : (n : ℕ) → Relations L n → Relations L' n\nn : ℕ\nφ : BoundedFormula L α n\nv : α → M\nv' : β → M\nxs : Fin n → M\nh1 : ∀ (n : ℕ) (t : Term L (α ⊕ Fin n)) (xs : Fin n → M), realize (Sum.elim v' xs) (ft n t) = realize (Sum.elim v xs) t\nh2 : ∀ (n : ℕ) (R : Relations L n) (x : Fin n → M), RelMap (fr n R) x = RelMap R x\n⊢ Realize (mapTermRel ft fr (fun x => id) φ) v' xs ↔ Realize φ v xs\n[PROOFSTEP]\ninduction' φ with _ _ _ _ _ _ _ _ _ _ _ ih1 ih2 _ _ ih\n[GOAL]\ncase falsum\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\nn✝¹ l : ℕ\nφ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝¹ : Fin l → M\ninst✝ : Structure L' M\nft : (n : ℕ) → Term L (α ⊕ Fin n) → Term L' (β ⊕ Fin n)\nfr : (n : ℕ) → Relations L n → Relations L' n\nn : ℕ\nv : α → M\nv' : β → M\nxs✝ : Fin n → M\nh1 : ∀ (n : ℕ) (t : Term L (α ⊕ Fin n)) (xs : Fin n → M), realize (Sum.elim v' xs) (ft n t) = realize (Sum.elim v xs) t\nh2 : ∀ (n : ℕ) (R : Relations L n) (x : Fin n → M), RelMap (fr n R) x = RelMap R x\nn✝ : ℕ\nxs : Fin n✝ → M\n⊢ Realize (mapTermRel ft fr (fun x => id) falsum) v' xs ↔ Realize falsum v xs\n[PROOFSTEP]\nrfl\n[GOAL]\ncase equal\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\nn✝¹ l : ℕ\nφ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝¹ : Fin l → M\ninst✝ : Structure L' M\nft : (n : ℕ) → Term L (α ⊕ Fin n) → Term L' (β ⊕ Fin n)\nfr : (n : ℕ) → Relations L n → Relations L' n\nn : ℕ\nv : α → M\nv' : β → M\nxs✝ : Fin n → M\nh1 : ∀ (n : ℕ) (t : Term L (α ⊕ Fin n)) (xs : Fin n → M), realize (Sum.elim v' xs) (ft n t) = realize (Sum.elim v xs) t\nh2 : ∀ (n : ℕ) (R : Relations L n) (x : Fin n → M), RelMap (fr n R) x = RelMap R x\nn✝ : ℕ\nt₁✝ t₂✝ : Term L (α ⊕ Fin n✝)\nxs : Fin n✝ → M\n⊢ Realize (mapTermRel ft fr (fun x => id) (equal t₁✝ t₂✝)) v' xs ↔ Realize (equal t₁✝ t₂✝) v xs\n[PROOFSTEP]\nsimp [mapTermRel, Realize, h1]\n[GOAL]\ncase rel\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\nn✝¹ l : ℕ\nφ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝¹ : Fin l → M\ninst✝ : Structure L' M\nft : (n : ℕ) → Term L (α ⊕ Fin n) → Term L' (β ⊕ Fin n)\nfr : (n : ℕ) → Relations L n → Relations L' n\nn : ℕ\nv : α → M\nv' : β → M\nxs✝ : Fin n → M\nh1 : ∀ (n : ℕ) (t : Term L (α ⊕ Fin n)) (xs : Fin n → M), realize (Sum.elim v' xs) (ft n t) = realize (Sum.elim v xs) t\nh2 : ∀ (n : ℕ) (R : Relations L n) (x : Fin n → M), RelMap (fr n R) x = RelMap R x\nn✝ l✝ : ℕ\nR✝ : Relations L l✝\nts✝ : Fin l✝ → Term L (α ⊕ Fin n✝)\nxs : Fin n✝ → M\n⊢ Realize (mapTermRel ft fr (fun x => id) (rel R✝ ts✝)) v' xs ↔ Realize (rel R✝ ts✝) v xs\n[PROOFSTEP]\nsimp [mapTermRel, Realize, h1, h2]\n[GOAL]\ncase imp\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\nn✝¹ l : ℕ\nφ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝¹ : Fin l → M\ninst✝ : Structure L' M\nft : (n : ℕ) → Term L (α ⊕ Fin n) → Term L' (β ⊕ Fin n)\nfr : (n : ℕ) → Relations L n → Relations L' n\nn : ℕ\nv : α → M\nv' : β → M\nxs✝ : Fin n → M\nh1 : ∀ (n : ℕ) (t : Term L (α ⊕ Fin n)) (xs : Fin n → M), realize (Sum.elim v' xs) (ft n t) = realize (Sum.elim v xs) t\nh2 : ∀ (n : ℕ) (R : Relations L n) (x : Fin n → M), RelMap (fr n R) x = RelMap R x\nn✝ : ℕ\nf₁✝ f₂✝ : BoundedFormula L α n✝\nih1 : ∀ {xs : Fin n✝ → M}, Realize (mapTermRel ft fr (fun x => id) f₁✝) v' xs ↔ Realize f₁✝ v xs\nih2 : ∀ {xs : Fin n✝ → M}, Realize (mapTermRel ft fr (fun x => id) f₂✝) v' xs ↔ Realize f₂✝ v xs\nxs : Fin n✝ → M\n⊢ Realize (mapTermRel ft fr (fun x => id) (f₁✝ ⟹ f₂✝)) v' xs ↔ Realize (f₁✝ ⟹ f₂✝) v xs\n[PROOFSTEP]\nsimp [mapTermRel, Realize, ih1, ih2]\n[GOAL]\ncase all\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\nn✝¹ l : ℕ\nφ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝¹ : Fin l → M\ninst✝ : Structure L' M\nft : (n : ℕ) → Term L (α ⊕ Fin n) → Term L' (β ⊕ Fin n)\nfr : (n : ℕ) → Relations L n → Relations L' n\nn : ℕ\nv : α → M\nv' : β → M\nxs✝ : Fin n → M\nh1 : ∀ (n : ℕ) (t : Term L (α ⊕ Fin n)) (xs : Fin n → M), realize (Sum.elim v' xs) (ft n t) = realize (Sum.elim v xs) t\nh2 : ∀ (n : ℕ) (R : Relations L n) (x : Fin n → M), RelMap (fr n R) x = RelMap R x\nn✝ : ℕ\nf✝ : BoundedFormula L α (n✝ + 1)\nih : ∀ {xs : Fin (n✝ + 1) → M}, Realize (mapTermRel ft fr (fun x => id) f✝) v' xs ↔ Realize f✝ v xs\nxs : Fin n✝ → M\n⊢ Realize (mapTermRel ft fr (fun x => id) (∀'f✝)) v' xs ↔ Realize (∀'f✝) v xs\n[PROOFSTEP]\nsimp only [mapTermRel, Realize, ih, id.def]\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\nn✝ l : ℕ\nφ✝ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝ : Fin l → M\ninst✝ : Structure L' M\nk : ℕ\nft : (n : ℕ) → Term L (α ⊕ Fin n) → Term L' (β ⊕ Fin (k + n))\nfr : (n : ℕ) → Relations L n → Relations L' n\nn : ℕ\nφ : BoundedFormula L α n\nv : {n : ℕ} → (Fin (k + n) → M) → α → M\nv' : β → M\nxs : Fin (k + n) → M\nh1 :\n  ∀ (n : ℕ) (t : Term L (α ⊕ Fin n)) (xs' : Fin (k + n) → M),\n    realize (Sum.elim v' xs') (ft n t) = realize (Sum.elim (v xs') (xs' ∘ natAdd k)) t\nh2 : ∀ (n : ℕ) (R : Relations L n) (x : Fin n → M), RelMap (fr n R) x = RelMap R x\nhv : ∀ (n : ℕ) (xs : Fin (k + n) → M) (x : M), v (snoc xs x) = v xs\n⊢ Realize (mapTermRel ft fr (fun n => castLE (_ : k + (n + 1) ≤ k + n + 1)) φ) v' xs ↔ Realize φ (v xs) (xs ∘ natAdd k)\n[PROOFSTEP]\ninduction' φ with _ _ _ _ _ _ _ _ _ _ _ ih1 ih2 _ _ ih\n[GOAL]\ncase falsum\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\nn✝¹ l : ℕ\nφ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝¹ : Fin l → M\ninst✝ : Structure L' M\nk : ℕ\nft : (n : ℕ) → Term L (α ⊕ Fin n) → Term L' (β ⊕ Fin (k + n))\nfr : (n : ℕ) → Relations L n → Relations L' n\nn : ℕ\nv : {n : ℕ} → (Fin (k + n) → M) → α → M\nv' : β → M\nxs✝ : Fin (k + n) → M\nh1 :\n  ∀ (n : ℕ) (t : Term L (α ⊕ Fin n)) (xs' : Fin (k + n) → M),\n    realize (Sum.elim v' xs') (ft n t) = realize (Sum.elim (v xs') (xs' ∘ natAdd k)) t\nh2 : ∀ (n : ℕ) (R : Relations L n) (x : Fin n → M), RelMap (fr n R) x = RelMap R x\nhv : ∀ (n : ℕ) (xs : Fin (k + n) → M) (x : M), v (snoc xs x) = v xs\nn✝ : ℕ\nxs : Fin (k + n✝) → M\n⊢ Realize (mapTermRel ft fr (fun n => castLE (_ : k + (n + 1) ≤ k + n + 1)) falsum) v' xs ↔\n    Realize falsum (v xs) (xs ∘ natAdd k)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase equal\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\nn✝¹ l : ℕ\nφ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝¹ : Fin l → M\ninst✝ : Structure L' M\nk : ℕ\nft : (n : ℕ) → Term L (α ⊕ Fin n) → Term L' (β ⊕ Fin (k + n))\nfr : (n : ℕ) → Relations L n → Relations L' n\nn : ℕ\nv : {n : ℕ} → (Fin (k + n) → M) → α → M\nv' : β → M\nxs✝ : Fin (k + n) → M\nh1 :\n  ∀ (n : ℕ) (t : Term L (α ⊕ Fin n)) (xs' : Fin (k + n) → M),\n    realize (Sum.elim v' xs') (ft n t) = realize (Sum.elim (v xs') (xs' ∘ natAdd k)) t\nh2 : ∀ (n : ℕ) (R : Relations L n) (x : Fin n → M), RelMap (fr n R) x = RelMap R x\nhv : ∀ (n : ℕ) (xs : Fin (k + n) → M) (x : M), v (snoc xs x) = v xs\nn✝ : ℕ\nt₁✝ t₂✝ : Term L (α ⊕ Fin n✝)\nxs : Fin (k + n✝) → M\n⊢ Realize (mapTermRel ft fr (fun n => castLE (_ : k + (n + 1) ≤ k + n + 1)) (equal t₁✝ t₂✝)) v' xs ↔\n    Realize (equal t₁✝ t₂✝) (v xs) (xs ∘ natAdd k)\n[PROOFSTEP]\nsimp [mapTermRel, Realize, h1]\n[GOAL]\ncase rel\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\nn✝¹ l : ℕ\nφ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝¹ : Fin l → M\ninst✝ : Structure L' M\nk : ℕ\nft : (n : ℕ) → Term L (α ⊕ Fin n) → Term L' (β ⊕ Fin (k + n))\nfr : (n : ℕ) → Relations L n → Relations L' n\nn : ℕ\nv : {n : ℕ} → (Fin (k + n) → M) → α → M\nv' : β → M\nxs✝ : Fin (k + n) → M\nh1 :\n  ∀ (n : ℕ) (t : Term L (α ⊕ Fin n)) (xs' : Fin (k + n) → M),\n    realize (Sum.elim v' xs') (ft n t) = realize (Sum.elim (v xs') (xs' ∘ natAdd k)) t\nh2 : ∀ (n : ℕ) (R : Relations L n) (x : Fin n → M), RelMap (fr n R) x = RelMap R x\nhv : ∀ (n : ℕ) (xs : Fin (k + n) → M) (x : M), v (snoc xs x) = v xs\nn✝ l✝ : ℕ\nR✝ : Relations L l✝\nts✝ : Fin l✝ → Term L (α ⊕ Fin n✝)\nxs : Fin (k + n✝) → M\n⊢ Realize (mapTermRel ft fr (fun n => castLE (_ : k + (n + 1) ≤ k + n + 1)) (rel R✝ ts✝)) v' xs ↔\n    Realize (rel R✝ ts✝) (v xs) (xs ∘ natAdd k)\n[PROOFSTEP]\nsimp [mapTermRel, Realize, h1, h2]\n[GOAL]\ncase imp\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\nn✝¹ l : ℕ\nφ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝¹ : Fin l → M\ninst✝ : Structure L' M\nk : ℕ\nft : (n : ℕ) → Term L (α ⊕ Fin n) → Term L' (β ⊕ Fin (k + n))\nfr : (n : ℕ) → Relations L n → Relations L' n\nn : ℕ\nv : {n : ℕ} → (Fin (k + n) → M) → α → M\nv' : β → M\nxs✝ : Fin (k + n) → M\nh1 :\n  ∀ (n : ℕ) (t : Term L (α ⊕ Fin n)) (xs' : Fin (k + n) → M),\n    realize (Sum.elim v' xs') (ft n t) = realize (Sum.elim (v xs') (xs' ∘ natAdd k)) t\nh2 : ∀ (n : ℕ) (R : Relations L n) (x : Fin n → M), RelMap (fr n R) x = RelMap R x\nhv : ∀ (n : ℕ) (xs : Fin (k + n) → M) (x : M), v (snoc xs x) = v xs\nn✝ : ℕ\nf₁✝ f₂✝ : BoundedFormula L α n✝\nih1 :\n  ∀ (xs : Fin (k + n✝) → M),\n    Realize (mapTermRel ft fr (fun n => castLE (_ : k + (n + 1) ≤ k + n + 1)) f₁✝) v' xs ↔\n      Realize f₁✝ (v xs) (xs ∘ natAdd k)\nih2 :\n  ∀ (xs : Fin (k + n✝) → M),\n    Realize (mapTermRel ft fr (fun n => castLE (_ : k + (n + 1) ≤ k + n + 1)) f₂✝) v' xs ↔\n      Realize f₂✝ (v xs) (xs ∘ natAdd k)\nxs : Fin (k + n✝) → M\n⊢ Realize (mapTermRel ft fr (fun n => castLE (_ : k + (n + 1) ≤ k + n + 1)) (f₁✝ ⟹ f₂✝)) v' xs ↔\n    Realize (f₁✝ ⟹ f₂✝) (v xs) (xs ∘ natAdd k)\n[PROOFSTEP]\nsimp [mapTermRel, Realize, ih1, ih2]\n[GOAL]\ncase all\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\nn✝¹ l : ℕ\nφ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝¹ : Fin l → M\ninst✝ : Structure L' M\nk : ℕ\nft : (n : ℕ) → Term L (α ⊕ Fin n) → Term L' (β ⊕ Fin (k + n))\nfr : (n : ℕ) → Relations L n → Relations L' n\nn : ℕ\nv : {n : ℕ} → (Fin (k + n) → M) → α → M\nv' : β → M\nxs✝ : Fin (k + n) → M\nh1 :\n  ∀ (n : ℕ) (t : Term L (α ⊕ Fin n)) (xs' : Fin (k + n) → M),\n    realize (Sum.elim v' xs') (ft n t) = realize (Sum.elim (v xs') (xs' ∘ natAdd k)) t\nh2 : ∀ (n : ℕ) (R : Relations L n) (x : Fin n → M), RelMap (fr n R) x = RelMap R x\nhv : ∀ (n : ℕ) (xs : Fin (k + n) → M) (x : M), v (snoc xs x) = v xs\nn✝ : ℕ\nf✝ : BoundedFormula L α (n✝ + 1)\nih :\n  ∀ (xs : Fin (k + (n✝ + 1)) → M),\n    Realize (mapTermRel ft fr (fun n => castLE (_ : k + (n + 1) ≤ k + n + 1)) f✝) v' xs ↔\n      Realize f✝ (v xs) (xs ∘ natAdd k)\nxs : Fin (k + n✝) → M\n⊢ Realize (mapTermRel ft fr (fun n => castLE (_ : k + (n + 1) ≤ k + n + 1)) (∀'f✝)) v' xs ↔\n    Realize (∀'f✝) (v xs) (xs ∘ natAdd k)\n[PROOFSTEP]\nsimp [mapTermRel, Realize, ih, hv]\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn✝ l : ℕ\nφ✝ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝ : Fin l → M\nm n : ℕ\nφ : BoundedFormula L α n\ng : α → β ⊕ Fin m\nv : β → M\nxs : Fin (m + n) → M\n⊢ Realize (relabel g φ) v xs ↔ Realize φ (Sum.elim v (xs ∘ castAdd n) ∘ g) (xs ∘ natAdd m)\n[PROOFSTEP]\nrw [relabel, realize_mapTermRel_add_castLe]\n[GOAL]\ncase h1\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn✝ l : ℕ\nφ✝ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝ : Fin l → M\nm n : ℕ\nφ : BoundedFormula L α n\ng : α → β ⊕ Fin m\nv : β → M\nxs : Fin (m + n) → M\n⊢ ∀ (n : ℕ) (t : Term L (α ⊕ Fin n)) (xs' : Fin (m + n) → M),\n    realize (Sum.elim v xs') (Term.relabel (relabelAux g n) t) =\n      realize (Sum.elim (Sum.elim v (xs' ∘ castAdd n) ∘ g) (xs' ∘ natAdd m)) t\n[PROOFSTEP]\nintros\n[GOAL]\ncase h2\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn✝ l : ℕ\nφ✝ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝ : Fin l → M\nm n : ℕ\nφ : BoundedFormula L α n\ng : α → β ⊕ Fin m\nv : β → M\nxs : Fin (m + n) → M\n⊢ ∀ (n : ℕ) (R : Relations L n) (x : Fin n → M), RelMap (id R) x = RelMap R x\n[PROOFSTEP]\nintros\n[GOAL]\ncase hv\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn✝ l : ℕ\nφ✝ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝ : Fin l → M\nm n : ℕ\nφ : BoundedFormula L α n\ng : α → β ⊕ Fin m\nv : β → M\nxs : Fin (m + n) → M\n⊢ ∀ (n : ℕ) (xs : Fin (m + n) → M) (x : M),\n    Sum.elim v (snoc xs x ∘ castAdd (n + 1)) ∘ g = Sum.elim v (xs ∘ castAdd n) ∘ g\n[PROOFSTEP]\nintros\n[GOAL]\ncase h1\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn✝¹ l : ℕ\nφ✝ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝ : Fin l → M\nm n : ℕ\nφ : BoundedFormula L α n\ng : α → β ⊕ Fin m\nv : β → M\nxs : Fin (m + n) → M\nn✝ : ℕ\nt✝ : Term L (α ⊕ Fin n✝)\nxs'✝ : Fin (m + n✝) → M\n⊢ realize (Sum.elim v xs'✝) (Term.relabel (relabelAux g n✝) t✝) =\n    realize (Sum.elim (Sum.elim v (xs'✝ ∘ castAdd n✝) ∘ g) (xs'✝ ∘ natAdd m)) t✝\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h2\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn✝¹ l : ℕ\nφ✝ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝ : Fin l → M\nm n : ℕ\nφ : BoundedFormula L α n\ng : α → β ⊕ Fin m\nv : β → M\nxs : Fin (m + n) → M\nn✝ : ℕ\nR✝ : Relations L n✝\nx✝ : Fin n✝ → M\n⊢ RelMap (id R✝) x✝ = RelMap R✝ x✝\n[PROOFSTEP]\nsimp\n[GOAL]\ncase hv\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn✝¹ l : ℕ\nφ✝ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝¹ : Fin l → M\nm n : ℕ\nφ : BoundedFormula L α n\ng : α → β ⊕ Fin m\nv : β → M\nxs : Fin (m + n) → M\nn✝ : ℕ\nxs✝ : Fin (m + n✝) → M\nx✝ : M\n⊢ Sum.elim v (snoc xs✝ x✝ ∘ castAdd (n✝ + 1)) ∘ g = Sum.elim v (xs✝ ∘ castAdd n✝) ∘ g\n[PROOFSTEP]\nsimp\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn✝ l : ℕ\nφ✝ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝ : Fin l → M\nn n' m : ℕ\nφ : BoundedFormula L α n\nv : α → M\nxs : Fin (n + n') → M\nhmn : m + n' ≤ n + 1\n⊢ Realize (liftAt n' m φ) v xs ↔ Realize φ v (xs ∘ fun i => if ↑i < m then castAdd n' i else addNat i n')\n[PROOFSTEP]\nrw [liftAt]\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn✝ l : ℕ\nφ✝ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝ : Fin l → M\nn n' m : ℕ\nφ : BoundedFormula L α n\nv : α → M\nxs : Fin (n + n') → M\nhmn : m + n' ≤ n + 1\n⊢ Realize (mapTermRel (fun k t => Term.liftAt n' m t) (fun x => id) (fun x => castLE (_ : x + 1 + n' ≤ x + n' + 1)) φ) v\n      xs ↔\n    Realize φ v (xs ∘ fun i => if ↑i < m then castAdd n' i else addNat i n')\n[PROOFSTEP]\ninduction' φ with _ _ _ _ _ _ _ _ _ _ _ ih1 ih2 k _ ih3\n[GOAL]\ncase falsum\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn✝¹ l : ℕ\nφ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝¹ : Fin l → M\nn n' m : ℕ\nv : α → M\nxs✝ : Fin (n + n') → M\nhmn✝ : m + n' ≤ n + 1\nn✝ : ℕ\nxs : Fin (n✝ + n') → M\nhmn : m + n' ≤ n✝ + 1\n⊢ Realize\n      (mapTermRel (fun k t => Term.liftAt n' m t) (fun x => id) (fun x => castLE (_ : x + 1 + n' ≤ x + n' + 1)) falsum)\n      v xs ↔\n    Realize falsum v (xs ∘ fun i => if ↑i < m then castAdd n' i else addNat i n')\n[PROOFSTEP]\nsimp [mapTermRel, Realize]\n[GOAL]\ncase equal\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn✝¹ l : ℕ\nφ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝¹ : Fin l → M\nn n' m : ℕ\nv : α → M\nxs✝ : Fin (n + n') → M\nhmn✝ : m + n' ≤ n + 1\nn✝ : ℕ\nt₁✝ t₂✝ : Term L (α ⊕ Fin n✝)\nxs : Fin (n✝ + n') → M\nhmn : m + n' ≤ n✝ + 1\n⊢ Realize\n      (mapTermRel (fun k t => Term.liftAt n' m t) (fun x => id) (fun x => castLE (_ : x + 1 + n' ≤ x + n' + 1))\n        (equal t₁✝ t₂✝))\n      v xs ↔\n    Realize (equal t₁✝ t₂✝) v (xs ∘ fun i => if ↑i < m then castAdd n' i else addNat i n')\n[PROOFSTEP]\nsimp [mapTermRel, Realize, realize_rel, realize_liftAt, Sum.elim_comp_map]\n[GOAL]\ncase rel\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn✝¹ l : ℕ\nφ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝¹ : Fin l → M\nn n' m : ℕ\nv : α → M\nxs✝ : Fin (n + n') → M\nhmn✝ : m + n' ≤ n + 1\nn✝ l✝ : ℕ\nR✝ : Relations L l✝\nts✝ : Fin l✝ → Term L (α ⊕ Fin n✝)\nxs : Fin (n✝ + n') → M\nhmn : m + n' ≤ n✝ + 1\n⊢ Realize\n      (mapTermRel (fun k t => Term.liftAt n' m t) (fun x => id) (fun x => castLE (_ : x + 1 + n' ≤ x + n' + 1))\n        (rel R✝ ts✝))\n      v xs ↔\n    Realize (rel R✝ ts✝) v (xs ∘ fun i => if ↑i < m then castAdd n' i else addNat i n')\n[PROOFSTEP]\nsimp [mapTermRel, Realize, realize_rel, realize_liftAt, Sum.elim_comp_map]\n[GOAL]\ncase imp\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn✝¹ l : ℕ\nφ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝¹ : Fin l → M\nn n' m : ℕ\nv : α → M\nxs✝ : Fin (n + n') → M\nhmn✝ : m + n' ≤ n + 1\nn✝ : ℕ\nf₁✝ f₂✝ : BoundedFormula L α n✝\nih1 :\n  ∀ {xs : Fin (n✝ + n') → M},\n    m + n' ≤ n✝ + 1 →\n      (Realize\n          (mapTermRel (fun k t => Term.liftAt n' m t) (fun x => id) (fun x => castLE (_ : x + 1 + n' ≤ x + n' + 1)) f₁✝)\n          v xs ↔\n        Realize f₁✝ v (xs ∘ fun i => if ↑i < m then castAdd n' i else addNat i n'))\nih2 :\n  ∀ {xs : Fin (n✝ + n') → M},\n    m + n' ≤ n✝ + 1 →\n      (Realize\n          (mapTermRel (fun k t => Term.liftAt n' m t) (fun x => id) (fun x => castLE (_ : x + 1 + n' ≤ x + n' + 1)) f₂✝)\n          v xs ↔\n        Realize f₂✝ v (xs ∘ fun i => if ↑i < m then castAdd n' i else addNat i n'))\nxs : Fin (n✝ + n') → M\nhmn : m + n' ≤ n✝ + 1\n⊢ Realize\n      (mapTermRel (fun k t => Term.liftAt n' m t) (fun x => id) (fun x => castLE (_ : x + 1 + n' ≤ x + n' + 1))\n        (f₁✝ ⟹ f₂✝))\n      v xs ↔\n    Realize (f₁✝ ⟹ f₂✝) v (xs ∘ fun i => if ↑i < m then castAdd n' i else addNat i n')\n[PROOFSTEP]\nsimp only [mapTermRel, Realize, ih1 hmn, ih2 hmn]\n[GOAL]\ncase all\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn✝ l : ℕ\nφ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝¹ : Fin l → M\nn n' m : ℕ\nv : α → M\nxs✝ : Fin (n + n') → M\nhmn✝ : m + n' ≤ n + 1\nk : ℕ\nf✝ : BoundedFormula L α (k + 1)\nih3 :\n  ∀ {xs : Fin (k + 1 + n') → M},\n    m + n' ≤ k + 1 + 1 →\n      (Realize\n          (mapTermRel (fun k t => Term.liftAt n' m t) (fun x => id) (fun x => castLE (_ : x + 1 + n' ≤ x + n' + 1)) f✝)\n          v xs ↔\n        Realize f✝ v (xs ∘ fun i => if ↑i < m then castAdd n' i else addNat i n'))\nxs : Fin (k + n') → M\nhmn : m + n' ≤ k + 1\n⊢ Realize\n      (mapTermRel (fun k t => Term.liftAt n' m t) (fun x => id) (fun x => castLE (_ : x + 1 + n' ≤ x + n' + 1)) (∀'f✝))\n      v xs ↔\n    Realize (∀'f✝) v (xs ∘ fun i => if ↑i < m then castAdd n' i else addNat i n')\n[PROOFSTEP]\nhave h : k + 1 + n' = k + n' + 1 := by rw [add_assoc, add_comm 1 n', ← add_assoc]\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn✝ l : ℕ\nφ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝¹ : Fin l → M\nn n' m : ℕ\nv : α → M\nxs✝ : Fin (n + n') → M\nhmn✝ : m + n' ≤ n + 1\nk : ℕ\nf✝ : BoundedFormula L α (k + 1)\nih3 :\n  ∀ {xs : Fin (k + 1 + n') → M},\n    m + n' ≤ k + 1 + 1 →\n      (Realize\n          (mapTermRel (fun k t => Term.liftAt n' m t) (fun x => id) (fun x => castLE (_ : x + 1 + n' ≤ x + n' + 1)) f✝)\n          v xs ↔\n        Realize f✝ v (xs ∘ fun i => if ↑i < m then castAdd n' i else addNat i n'))\nxs : Fin (k + n') → M\nhmn : m + n' ≤ k + 1\n⊢ k + 1 + n' = k + n' + 1\n[PROOFSTEP]\nrw [add_assoc, add_comm 1 n', ← add_assoc]\n[GOAL]\ncase all\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn✝ l : ℕ\nφ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝¹ : Fin l → M\nn n' m : ℕ\nv : α → M\nxs✝ : Fin (n + n') → M\nhmn✝ : m + n' ≤ n + 1\nk : ℕ\nf✝ : BoundedFormula L α (k + 1)\nih3 :\n  ∀ {xs : Fin (k + 1 + n') → M},\n    m + n' ≤ k + 1 + 1 →\n      (Realize\n          (mapTermRel (fun k t => Term.liftAt n' m t) (fun x => id) (fun x => castLE (_ : x + 1 + n' ≤ x + n' + 1)) f✝)\n          v xs ↔\n        Realize f✝ v (xs ∘ fun i => if ↑i < m then castAdd n' i else addNat i n'))\nxs : Fin (k + n') → M\nhmn : m + n' ≤ k + 1\nh : k + 1 + n' = k + n' + 1\n⊢ Realize\n      (mapTermRel (fun k t => Term.liftAt n' m t) (fun x => id) (fun x => castLE (_ : x + 1 + n' ≤ x + n' + 1)) (∀'f✝))\n      v xs ↔\n    Realize (∀'f✝) v (xs ∘ fun i => if ↑i < m then castAdd n' i else addNat i n')\n[PROOFSTEP]\nsimp only [mapTermRel, Realize, realize_castLE_of_eq h, ih3 (hmn.trans k.succ.le_succ)]\n[GOAL]\ncase all\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn✝ l : ℕ\nφ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝¹ : Fin l → M\nn n' m : ℕ\nv : α → M\nxs✝ : Fin (n + n') → M\nhmn✝ : m + n' ≤ n + 1\nk : ℕ\nf✝ : BoundedFormula L α (k + 1)\nih3 :\n  ∀ {xs : Fin (k + 1 + n') → M},\n    m + n' ≤ k + 1 + 1 →\n      (Realize\n          (mapTermRel (fun k t => Term.liftAt n' m t) (fun x => id) (fun x => castLE (_ : x + 1 + n' ≤ x + n' + 1)) f✝)\n          v xs ↔\n        Realize f✝ v (xs ∘ fun i => if ↑i < m then castAdd n' i else addNat i n'))\nxs : Fin (k + n') → M\nhmn : m + n' ≤ k + 1\nh : k + 1 + n' = k + n' + 1\n⊢ (∀ (x : M), Realize f✝ v ((snoc xs x ∘ ↑(castIso h)) ∘ fun i => if ↑i < m then castAdd n' i else addNat i n')) ↔\n    ∀ (x : M), Realize f✝ v (snoc (xs ∘ fun i => if ↑i < m then castAdd n' i else addNat i n') x)\n[PROOFSTEP]\nrefine' forall_congr' fun x => iff_eq_eq.mpr (congr rfl (funext (Fin.lastCases _ fun i => _)))\n[GOAL]\ncase all.refine'_1\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn✝ l : ℕ\nφ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝¹ : Fin l → M\nn n' m : ℕ\nv : α → M\nxs✝ : Fin (n + n') → M\nhmn✝ : m + n' ≤ n + 1\nk : ℕ\nf✝ : BoundedFormula L α (k + 1)\nih3 :\n  ∀ {xs : Fin (k + 1 + n') → M},\n    m + n' ≤ k + 1 + 1 →\n      (Realize\n          (mapTermRel (fun k t => Term.liftAt n' m t) (fun x => id) (fun x => castLE (_ : x + 1 + n' ≤ x + n' + 1)) f✝)\n          v xs ↔\n        Realize f✝ v (xs ∘ fun i => if ↑i < m then castAdd n' i else addNat i n'))\nxs : Fin (k + n') → M\nhmn : m + n' ≤ k + 1\nh : k + 1 + n' = k + n' + 1\nx : M\n⊢ ((snoc xs x ∘ ↑(castIso h)) ∘ fun i => if ↑i < m then castAdd n' i else addNat i n') (last k) =\n    snoc (xs ∘ fun i => if ↑i < m then castAdd n' i else addNat i n') x (last k)\n[PROOFSTEP]\nsimp only [Function.comp_apply, val_last, snoc_last]\n[GOAL]\ncase all.refine'_1\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn✝ l : ℕ\nφ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝¹ : Fin l → M\nn n' m : ℕ\nv : α → M\nxs✝ : Fin (n + n') → M\nhmn✝ : m + n' ≤ n + 1\nk : ℕ\nf✝ : BoundedFormula L α (k + 1)\nih3 :\n  ∀ {xs : Fin (k + 1 + n') → M},\n    m + n' ≤ k + 1 + 1 →\n      (Realize\n          (mapTermRel (fun k t => Term.liftAt n' m t) (fun x => id) (fun x => castLE (_ : x + 1 + n' ≤ x + n' + 1)) f✝)\n          v xs ↔\n        Realize f✝ v (xs ∘ fun i => if ↑i < m then castAdd n' i else addNat i n'))\nxs : Fin (k + n') → M\nhmn : m + n' ≤ k + 1\nh : k + 1 + n' = k + n' + 1\nx : M\n⊢ snoc xs x (↑(castIso h) (if k < m then castAdd n' (last k) else addNat (last k) n')) = x\n[PROOFSTEP]\nby_cases h : k < m\n[GOAL]\ncase pos\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn✝ l : ℕ\nφ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝¹ : Fin l → M\nn n' m : ℕ\nv : α → M\nxs✝ : Fin (n + n') → M\nhmn✝ : m + n' ≤ n + 1\nk : ℕ\nf✝ : BoundedFormula L α (k + 1)\nih3 :\n  ∀ {xs : Fin (k + 1 + n') → M},\n    m + n' ≤ k + 1 + 1 →\n      (Realize\n          (mapTermRel (fun k t => Term.liftAt n' m t) (fun x => id) (fun x => castLE (_ : x + 1 + n' ≤ x + n' + 1)) f✝)\n          v xs ↔\n        Realize f✝ v (xs ∘ fun i => if ↑i < m then castAdd n' i else addNat i n'))\nxs : Fin (k + n') → M\nhmn : m + n' ≤ k + 1\nh✝ : k + 1 + n' = k + n' + 1\nx : M\nh : k < m\n⊢ snoc xs x (↑(castIso h✝) (if k < m then castAdd n' (last k) else addNat (last k) n')) = x\n[PROOFSTEP]\nrw [if_pos h]\n[GOAL]\ncase pos\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn✝ l : ℕ\nφ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝¹ : Fin l → M\nn n' m : ℕ\nv : α → M\nxs✝ : Fin (n + n') → M\nhmn✝ : m + n' ≤ n + 1\nk : ℕ\nf✝ : BoundedFormula L α (k + 1)\nih3 :\n  ∀ {xs : Fin (k + 1 + n') → M},\n    m + n' ≤ k + 1 + 1 →\n      (Realize\n          (mapTermRel (fun k t => Term.liftAt n' m t) (fun x => id) (fun x => castLE (_ : x + 1 + n' ≤ x + n' + 1)) f✝)\n          v xs ↔\n        Realize f✝ v (xs ∘ fun i => if ↑i < m then castAdd n' i else addNat i n'))\nxs : Fin (k + n') → M\nhmn : m + n' ≤ k + 1\nh✝ : k + 1 + n' = k + n' + 1\nx : M\nh : k < m\n⊢ snoc xs x (↑(castIso h✝) (castAdd n' (last k))) = x\n[PROOFSTEP]\nrefine' (congr rfl (ext _)).trans (snoc_last _ _)\n[GOAL]\ncase pos\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn✝ l : ℕ\nφ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝¹ : Fin l → M\nn n' m : ℕ\nv : α → M\nxs✝ : Fin (n + n') → M\nhmn✝ : m + n' ≤ n + 1\nk : ℕ\nf✝ : BoundedFormula L α (k + 1)\nih3 :\n  ∀ {xs : Fin (k + 1 + n') → M},\n    m + n' ≤ k + 1 + 1 →\n      (Realize\n          (mapTermRel (fun k t => Term.liftAt n' m t) (fun x => id) (fun x => castLE (_ : x + 1 + n' ≤ x + n' + 1)) f✝)\n          v xs ↔\n        Realize f✝ v (xs ∘ fun i => if ↑i < m then castAdd n' i else addNat i n'))\nxs : Fin (k + n') → M\nhmn : m + n' ≤ k + 1\nh✝ : k + 1 + n' = k + n' + 1\nx : M\nh : k < m\n⊢ ↑(↑(castIso h✝) (castAdd n' (last k))) = ↑(last (k + n'))\n[PROOFSTEP]\nsimp only [coe_orderIso_apply, coe_castAdd, val_last, self_eq_add_right]\n[GOAL]\ncase pos\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn✝ l : ℕ\nφ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝¹ : Fin l → M\nn n' m : ℕ\nv : α → M\nxs✝ : Fin (n + n') → M\nhmn✝ : m + n' ≤ n + 1\nk : ℕ\nf✝ : BoundedFormula L α (k + 1)\nih3 :\n  ∀ {xs : Fin (k + 1 + n') → M},\n    m + n' ≤ k + 1 + 1 →\n      (Realize\n          (mapTermRel (fun k t => Term.liftAt n' m t) (fun x => id) (fun x => castLE (_ : x + 1 + n' ≤ x + n' + 1)) f✝)\n          v xs ↔\n        Realize f✝ v (xs ∘ fun i => if ↑i < m then castAdd n' i else addNat i n'))\nxs : Fin (k + n') → M\nhmn : m + n' ≤ k + 1\nh✝ : k + 1 + n' = k + n' + 1\nx : M\nh : k < m\n⊢ n' = 0\n[PROOFSTEP]\nrefine' le_antisymm (le_of_add_le_add_left ((hmn.trans (Nat.succ_le_of_lt h)).trans _)) n'.zero_le\n[GOAL]\ncase pos\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn✝ l : ℕ\nφ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝¹ : Fin l → M\nn n' m : ℕ\nv : α → M\nxs✝ : Fin (n + n') → M\nhmn✝ : m + n' ≤ n + 1\nk : ℕ\nf✝ : BoundedFormula L α (k + 1)\nih3 :\n  ∀ {xs : Fin (k + 1 + n') → M},\n    m + n' ≤ k + 1 + 1 →\n      (Realize\n          (mapTermRel (fun k t => Term.liftAt n' m t) (fun x => id) (fun x => castLE (_ : x + 1 + n' ≤ x + n' + 1)) f✝)\n          v xs ↔\n        Realize f✝ v (xs ∘ fun i => if ↑i < m then castAdd n' i else addNat i n'))\nxs : Fin (k + n') → M\nhmn : m + n' ≤ k + 1\nh✝ : k + 1 + n' = k + n' + 1\nx : M\nh : k < m\n⊢ m ≤ m + 0\n[PROOFSTEP]\nrw [add_zero]\n[GOAL]\ncase neg\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn✝ l : ℕ\nφ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝¹ : Fin l → M\nn n' m : ℕ\nv : α → M\nxs✝ : Fin (n + n') → M\nhmn✝ : m + n' ≤ n + 1\nk : ℕ\nf✝ : BoundedFormula L α (k + 1)\nih3 :\n  ∀ {xs : Fin (k + 1 + n') → M},\n    m + n' ≤ k + 1 + 1 →\n      (Realize\n          (mapTermRel (fun k t => Term.liftAt n' m t) (fun x => id) (fun x => castLE (_ : x + 1 + n' ≤ x + n' + 1)) f✝)\n          v xs ↔\n        Realize f✝ v (xs ∘ fun i => if ↑i < m then castAdd n' i else addNat i n'))\nxs : Fin (k + n') → M\nhmn : m + n' ≤ k + 1\nh✝ : k + 1 + n' = k + n' + 1\nx : M\nh : ¬k < m\n⊢ snoc xs x (↑(castIso h✝) (if k < m then castAdd n' (last k) else addNat (last k) n')) = x\n[PROOFSTEP]\nrw [if_neg h]\n[GOAL]\ncase neg\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn✝ l : ℕ\nφ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝¹ : Fin l → M\nn n' m : ℕ\nv : α → M\nxs✝ : Fin (n + n') → M\nhmn✝ : m + n' ≤ n + 1\nk : ℕ\nf✝ : BoundedFormula L α (k + 1)\nih3 :\n  ∀ {xs : Fin (k + 1 + n') → M},\n    m + n' ≤ k + 1 + 1 →\n      (Realize\n          (mapTermRel (fun k t => Term.liftAt n' m t) (fun x => id) (fun x => castLE (_ : x + 1 + n' ≤ x + n' + 1)) f✝)\n          v xs ↔\n        Realize f✝ v (xs ∘ fun i => if ↑i < m then castAdd n' i else addNat i n'))\nxs : Fin (k + n') → M\nhmn : m + n' ≤ k + 1\nh✝ : k + 1 + n' = k + n' + 1\nx : M\nh : ¬k < m\n⊢ snoc xs x (↑(castIso h✝) (addNat (last k) n')) = x\n[PROOFSTEP]\nrefine' (congr rfl (ext _)).trans (snoc_last _ _)\n[GOAL]\ncase neg\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn✝ l : ℕ\nφ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝¹ : Fin l → M\nn n' m : ℕ\nv : α → M\nxs✝ : Fin (n + n') → M\nhmn✝ : m + n' ≤ n + 1\nk : ℕ\nf✝ : BoundedFormula L α (k + 1)\nih3 :\n  ∀ {xs : Fin (k + 1 + n') → M},\n    m + n' ≤ k + 1 + 1 →\n      (Realize\n          (mapTermRel (fun k t => Term.liftAt n' m t) (fun x => id) (fun x => castLE (_ : x + 1 + n' ≤ x + n' + 1)) f✝)\n          v xs ↔\n        Realize f✝ v (xs ∘ fun i => if ↑i < m then castAdd n' i else addNat i n'))\nxs : Fin (k + n') → M\nhmn : m + n' ≤ k + 1\nh✝ : k + 1 + n' = k + n' + 1\nx : M\nh : ¬k < m\n⊢ ↑(↑(castIso h✝) (addNat (last k) n')) = ↑(last (k + n'))\n[PROOFSTEP]\nsimp\n[GOAL]\ncase all.refine'_2\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn✝ l : ℕ\nφ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝¹ : Fin l → M\nn n' m : ℕ\nv : α → M\nxs✝ : Fin (n + n') → M\nhmn✝ : m + n' ≤ n + 1\nk : ℕ\nf✝ : BoundedFormula L α (k + 1)\nih3 :\n  ∀ {xs : Fin (k + 1 + n') → M},\n    m + n' ≤ k + 1 + 1 →\n      (Realize\n          (mapTermRel (fun k t => Term.liftAt n' m t) (fun x => id) (fun x => castLE (_ : x + 1 + n' ≤ x + n' + 1)) f✝)\n          v xs ↔\n        Realize f✝ v (xs ∘ fun i => if ↑i < m then castAdd n' i else addNat i n'))\nxs : Fin (k + n') → M\nhmn : m + n' ≤ k + 1\nh : k + 1 + n' = k + n' + 1\nx : M\ni : Fin k\n⊢ ((snoc xs x ∘ ↑(castIso h)) ∘ fun i => if ↑i < m then castAdd n' i else addNat i n') (castSucc i) =\n    snoc (xs ∘ fun i => if ↑i < m then castAdd n' i else addNat i n') x (castSucc i)\n[PROOFSTEP]\nsimp only [Function.comp_apply, Fin.snoc_castSucc]\n[GOAL]\ncase all.refine'_2\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn✝ l : ℕ\nφ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝¹ : Fin l → M\nn n' m : ℕ\nv : α → M\nxs✝ : Fin (n + n') → M\nhmn✝ : m + n' ≤ n + 1\nk : ℕ\nf✝ : BoundedFormula L α (k + 1)\nih3 :\n  ∀ {xs : Fin (k + 1 + n') → M},\n    m + n' ≤ k + 1 + 1 →\n      (Realize\n          (mapTermRel (fun k t => Term.liftAt n' m t) (fun x => id) (fun x => castLE (_ : x + 1 + n' ≤ x + n' + 1)) f✝)\n          v xs ↔\n        Realize f✝ v (xs ∘ fun i => if ↑i < m then castAdd n' i else addNat i n'))\nxs : Fin (k + n') → M\nhmn : m + n' ≤ k + 1\nh : k + 1 + n' = k + n' + 1\nx : M\ni : Fin k\n⊢ snoc xs x (↑(castIso h) (if ↑(castSucc i) < m then castAdd n' (castSucc i) else addNat (castSucc i) n')) =\n    xs (if ↑i < m then castAdd n' i else addNat i n')\n[PROOFSTEP]\nrefine' (congr rfl (ext _)).trans (snoc_castSucc _ _ _)\n[GOAL]\ncase all.refine'_2\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn✝ l : ℕ\nφ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝¹ : Fin l → M\nn n' m : ℕ\nv : α → M\nxs✝ : Fin (n + n') → M\nhmn✝ : m + n' ≤ n + 1\nk : ℕ\nf✝ : BoundedFormula L α (k + 1)\nih3 :\n  ∀ {xs : Fin (k + 1 + n') → M},\n    m + n' ≤ k + 1 + 1 →\n      (Realize\n          (mapTermRel (fun k t => Term.liftAt n' m t) (fun x => id) (fun x => castLE (_ : x + 1 + n' ≤ x + n' + 1)) f✝)\n          v xs ↔\n        Realize f✝ v (xs ∘ fun i => if ↑i < m then castAdd n' i else addNat i n'))\nxs : Fin (k + n') → M\nhmn : m + n' ≤ k + 1\nh : k + 1 + n' = k + n' + 1\nx : M\ni : Fin k\n⊢ ↑(↑(castIso h) (if ↑(castSucc i) < m then castAdd n' (castSucc i) else addNat (castSucc i) n')) =\n    ↑(castSucc (if ↑i < m then castAdd n' i else addNat i n'))\n[PROOFSTEP]\nsimp only [coe_castSucc, coe_orderIso_apply]\n[GOAL]\ncase all.refine'_2\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn✝ l : ℕ\nφ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝¹ : Fin l → M\nn n' m : ℕ\nv : α → M\nxs✝ : Fin (n + n') → M\nhmn✝ : m + n' ≤ n + 1\nk : ℕ\nf✝ : BoundedFormula L α (k + 1)\nih3 :\n  ∀ {xs : Fin (k + 1 + n') → M},\n    m + n' ≤ k + 1 + 1 →\n      (Realize\n          (mapTermRel (fun k t => Term.liftAt n' m t) (fun x => id) (fun x => castLE (_ : x + 1 + n' ≤ x + n' + 1)) f✝)\n          v xs ↔\n        Realize f✝ v (xs ∘ fun i => if ↑i < m then castAdd n' i else addNat i n'))\nxs : Fin (k + n') → M\nhmn : m + n' ≤ k + 1\nh : k + 1 + n' = k + n' + 1\nx : M\ni : Fin k\n⊢ ↑(if ↑i < m then castAdd n' (castSucc i) else addNat (castSucc i) n') =\n    ↑(if ↑i < m then castAdd n' i else addNat i n')\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn✝ l : ℕ\nφ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝¹ : Fin l → M\nn n' m : ℕ\nv : α → M\nxs✝ : Fin (n + n') → M\nhmn✝ : m + n' ≤ n + 1\nk : ℕ\nf✝ : BoundedFormula L α (k + 1)\nih3 :\n  ∀ {xs : Fin (k + 1 + n') → M},\n    m + n' ≤ k + 1 + 1 →\n      (Realize\n          (mapTermRel (fun k t => Term.liftAt n' m t) (fun x => id) (fun x => castLE (_ : x + 1 + n' ≤ x + n' + 1)) f✝)\n          v xs ↔\n        Realize f✝ v (xs ∘ fun i => if ↑i < m then castAdd n' i else addNat i n'))\nxs : Fin (k + n') → M\nhmn : m + n' ≤ k + 1\nh : k + 1 + n' = k + n' + 1\nx : M\ni : Fin k\nh✝ : ↑i < m\n⊢ ↑(castAdd n' (castSucc i)) = ↑(castAdd n' i)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn✝ l : ℕ\nφ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝¹ : Fin l → M\nn n' m : ℕ\nv : α → M\nxs✝ : Fin (n + n') → M\nhmn✝ : m + n' ≤ n + 1\nk : ℕ\nf✝ : BoundedFormula L α (k + 1)\nih3 :\n  ∀ {xs : Fin (k + 1 + n') → M},\n    m + n' ≤ k + 1 + 1 →\n      (Realize\n          (mapTermRel (fun k t => Term.liftAt n' m t) (fun x => id) (fun x => castLE (_ : x + 1 + n' ≤ x + n' + 1)) f✝)\n          v xs ↔\n        Realize f✝ v (xs ∘ fun i => if ↑i < m then castAdd n' i else addNat i n'))\nxs : Fin (k + n') → M\nhmn : m + n' ≤ k + 1\nh : k + 1 + n' = k + n' + 1\nx : M\ni : Fin k\nh✝ : ¬↑i < m\n⊢ ↑(addNat (castSucc i) n') = ↑(addNat i n')\n[PROOFSTEP]\nsimp\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn✝ l : ℕ\nφ✝ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝ : Fin l → M\nn m : ℕ\nφ : BoundedFormula L α n\nv : α → M\nxs : Fin (n + 1) → M\nhmn : m ≤ n\n⊢ Realize (liftAt 1 m φ) v xs ↔ Realize φ v (xs ∘ fun i => if ↑i < m then castSucc i else succ i)\n[PROOFSTEP]\nsimp [realize_liftAt (add_le_add_right hmn 1), castSucc]\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn✝ l : ℕ\nφ✝ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝ : Fin l → M\nn : ℕ\nφ : BoundedFormula L α n\nv : α → M\nxs : Fin (n + 1) → M\n⊢ Realize (liftAt 1 n φ) v xs ↔ Realize φ v (xs ∘ castSucc)\n[PROOFSTEP]\nrw [realize_liftAt_one (refl n), iff_eq_eq]\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn✝ l : ℕ\nφ✝ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝ : Fin l → M\nn : ℕ\nφ : BoundedFormula L α n\nv : α → M\nxs : Fin (n + 1) → M\n⊢ Realize φ v (xs ∘ fun i => if ↑i < n then castSucc i else succ i) = Realize φ v (xs ∘ castSucc)\n[PROOFSTEP]\nrefine' congr rfl (congr rfl (funext fun i => _))\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn✝ l : ℕ\nφ✝ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝ : Fin l → M\nn : ℕ\nφ : BoundedFormula L α n\nv : α → M\nxs : Fin (n + 1) → M\ni : Fin n\n⊢ (if ↑i < n then castSucc i else succ i) = castSucc i\n[PROOFSTEP]\nrw [if_pos i.is_lt]\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn✝ l : ℕ\nφ✝ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝ : Fin l → M\nφ : BoundedFormula L α n✝\ntf : α → Term L β\nv : β → M\nxs : Fin n✝ → M\nn : ℕ\nt : Term L (α ⊕ Fin n)\nx : Fin n → M\n⊢ realize (Sum.elim v x) (Term.subst t (Sum.elim (Term.relabel Sum.inl ∘ tf) (var ∘ Sum.inr))) =\n    realize (Sum.elim (fun a => realize v (tf a)) x) t\n[PROOFSTEP]\nrw [Term.realize_subst]\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn✝ l : ℕ\nφ✝ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝ : Fin l → M\nφ : BoundedFormula L α n✝\ntf : α → Term L β\nv : β → M\nxs : Fin n✝ → M\nn : ℕ\nt : Term L (α ⊕ Fin n)\nx : Fin n → M\n⊢ realize (fun a => realize (Sum.elim v x) (Sum.elim (Term.relabel Sum.inl ∘ tf) (var ∘ Sum.inr) a)) t =\n    realize (Sum.elim (fun a => realize v (tf a)) x) t\n[PROOFSTEP]\nrcongr a\n[GOAL]\ncase e_v.h\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn✝ l : ℕ\nφ✝ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝ : Fin l → M\nφ : BoundedFormula L α n✝\ntf : α → Term L β\nv : β → M\nxs : Fin n✝ → M\nn : ℕ\nt : Term L (α ⊕ Fin n)\nx : Fin n → M\na : α ⊕ Fin n\n⊢ realize (Sum.elim v x) (Sum.elim (Term.relabel Sum.inl ∘ tf) (var ∘ Sum.inr) a) =\n    Sum.elim (fun a => realize v (tf a)) x a\n[PROOFSTEP]\ncases a\n[GOAL]\ncase e_v.h.inl\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn✝ l : ℕ\nφ✝ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝ : Fin l → M\nφ : BoundedFormula L α n✝\ntf : α → Term L β\nv : β → M\nxs : Fin n✝ → M\nn : ℕ\nt : Term L (α ⊕ Fin n)\nx : Fin n → M\nval✝ : α\n⊢ realize (Sum.elim v x) (Sum.elim (Term.relabel Sum.inl ∘ tf) (var ∘ Sum.inr) (Sum.inl val✝)) =\n    Sum.elim (fun a => realize v (tf a)) x (Sum.inl val✝)\n[PROOFSTEP]\nsimp only [Sum.elim_inl, Function.comp_apply, Term.realize_relabel, Sum.elim_comp_inl]\n[GOAL]\ncase e_v.h.inr\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn✝ l : ℕ\nφ✝ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝ : Fin l → M\nφ : BoundedFormula L α n✝\ntf : α → Term L β\nv : β → M\nxs : Fin n✝ → M\nn : ℕ\nt : Term L (α ⊕ Fin n)\nx : Fin n → M\nval✝ : Fin n\n⊢ realize (Sum.elim v x) (Sum.elim (Term.relabel Sum.inl ∘ tf) (var ∘ Sum.inr) (Sum.inr val✝)) =\n    Sum.elim (fun a => realize v (tf a)) x (Sum.inr val✝)\n[PROOFSTEP]\nrfl\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn l : ℕ\nφ✝ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝ : Fin l → M\nφ : BoundedFormula L α n\ntf : α → Term L β\nv : β → M\nxs : Fin n → M\n⊢ ∀ (n : ℕ) (R : Relations L n) (x : Fin n → M), RelMap (id R) x = RelMap R x\n[PROOFSTEP]\nsimp\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\nn✝ l : ℕ\nφ✝ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝ : Fin l → M\ninst✝ : DecidableEq α\nn : ℕ\nφ : BoundedFormula L α n\ns : Set α\nh : ↑(freeVarFinset φ) ⊆ s\nv : α → M\nxs : Fin n → M\n⊢ Realize (restrictFreeVar φ (Set.inclusion h)) (v ∘ Subtype.val) xs ↔ Realize φ v xs\n[PROOFSTEP]\ninduction' φ with _ _ _ _ _ _ _ _ _ _ _ ih1 ih2 _ _ ih3\n[GOAL]\ncase falsum\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\nn✝¹ l : ℕ\nφ✝ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝¹ : Fin l → M\ninst✝ : DecidableEq α\nn : ℕ\nφ : BoundedFormula L α n\ns : Set α\nh✝ : ↑(freeVarFinset φ) ⊆ s\nv : α → M\nxs✝ : Fin n → M\nn✝ : ℕ\nh : ↑(freeVarFinset falsum) ⊆ s\nxs : Fin n✝ → M\n⊢ Realize (restrictFreeVar falsum (Set.inclusion h)) (v ∘ Subtype.val) xs ↔ Realize falsum v xs\n[PROOFSTEP]\nrfl\n[GOAL]\ncase equal\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\nn✝¹ l : ℕ\nφ✝ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝¹ : Fin l → M\ninst✝ : DecidableEq α\nn : ℕ\nφ : BoundedFormula L α n\ns : Set α\nh✝ : ↑(freeVarFinset φ) ⊆ s\nv : α → M\nxs✝ : Fin n → M\nn✝ : ℕ\nt₁✝ t₂✝ : Term L (α ⊕ Fin n✝)\nh : ↑(freeVarFinset (equal t₁✝ t₂✝)) ⊆ s\nxs : Fin n✝ → M\n⊢ Realize (restrictFreeVar (equal t₁✝ t₂✝) (Set.inclusion h)) (v ∘ Subtype.val) xs ↔ Realize (equal t₁✝ t₂✝) v xs\n[PROOFSTEP]\nsimp [restrictFreeVar, Realize]\n[GOAL]\ncase rel\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\nn✝¹ l : ℕ\nφ✝ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝¹ : Fin l → M\ninst✝ : DecidableEq α\nn : ℕ\nφ : BoundedFormula L α n\ns : Set α\nh✝ : ↑(freeVarFinset φ) ⊆ s\nv : α → M\nxs✝ : Fin n → M\nn✝ l✝ : ℕ\nR✝ : Relations L l✝\nts✝ : Fin l✝ → Term L (α ⊕ Fin n✝)\nh : ↑(freeVarFinset (rel R✝ ts✝)) ⊆ s\nxs : Fin n✝ → M\n⊢ Realize (restrictFreeVar (rel R✝ ts✝) (Set.inclusion h)) (v ∘ Subtype.val) xs ↔ Realize (rel R✝ ts✝) v xs\n[PROOFSTEP]\nsimp [restrictFreeVar, Realize]\n[GOAL]\ncase imp\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\nn✝¹ l : ℕ\nφ✝ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝¹ : Fin l → M\ninst✝ : DecidableEq α\nn : ℕ\nφ : BoundedFormula L α n\ns : Set α\nh✝ : ↑(freeVarFinset φ) ⊆ s\nv : α → M\nxs✝ : Fin n → M\nn✝ : ℕ\nf₁✝ f₂✝ : BoundedFormula L α n✝\nih1 :\n  ∀ (h : ↑(freeVarFinset f₁✝) ⊆ s) {xs : Fin n✝ → M},\n    Realize (restrictFreeVar f₁✝ (Set.inclusion h)) (v ∘ Subtype.val) xs ↔ Realize f₁✝ v xs\nih2 :\n  ∀ (h : ↑(freeVarFinset f₂✝) ⊆ s) {xs : Fin n✝ → M},\n    Realize (restrictFreeVar f₂✝ (Set.inclusion h)) (v ∘ Subtype.val) xs ↔ Realize f₂✝ v xs\nh : ↑(freeVarFinset (f₁✝ ⟹ f₂✝)) ⊆ s\nxs : Fin n✝ → M\n⊢ Realize (restrictFreeVar (f₁✝ ⟹ f₂✝) (Set.inclusion h)) (v ∘ Subtype.val) xs ↔ Realize (f₁✝ ⟹ f₂✝) v xs\n[PROOFSTEP]\nsimp [restrictFreeVar, Realize, ih1, ih2]\n[GOAL]\ncase all\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\nn✝¹ l : ℕ\nφ✝ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝¹ : Fin l → M\ninst✝ : DecidableEq α\nn : ℕ\nφ : BoundedFormula L α n\ns : Set α\nh✝ : ↑(freeVarFinset φ) ⊆ s\nv : α → M\nxs✝ : Fin n → M\nn✝ : ℕ\nf✝ : BoundedFormula L α (n✝ + 1)\nih3 :\n  ∀ (h : ↑(freeVarFinset f✝) ⊆ s) {xs : Fin (n✝ + 1) → M},\n    Realize (restrictFreeVar f✝ (Set.inclusion h)) (v ∘ Subtype.val) xs ↔ Realize f✝ v xs\nh : ↑(freeVarFinset (∀'f✝)) ⊆ s\nxs : Fin n✝ → M\n⊢ Realize (restrictFreeVar (∀'f✝) (Set.inclusion h)) (v ∘ Subtype.val) xs ↔ Realize (∀'f✝) v xs\n[PROOFSTEP]\nsimp [restrictFreeVar, Realize, ih3]\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝⁴ : Structure L M\ninst✝³ : Structure L N\ninst✝² : Structure L P\nα : Type u'\nβ : Type v'\nn✝ l : ℕ\nφ✝ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝ : Fin l → M\ninst✝¹ : Structure (L[[α]]) M\ninst✝ : LHom.IsExpansionOn (lhomWithConstants L α) M\nn : ℕ\nφ : BoundedFormula (L[[α]]) β n\nv : β → M\nxs : Fin n → M\n⊢ Realize (↑constantsVarsEquiv φ) (Sum.elim (fun a => ↑(Language.con L a)) v) xs ↔ Realize φ v xs\n[PROOFSTEP]\nrefine' realize_mapTermRel_id (fun n t xs => realize_constantsVarsEquivLeft) fun n R xs => _\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝⁴ : Structure L M\ninst✝³ : Structure L N\ninst✝² : Structure L P\nα : Type u'\nβ : Type v'\nn✝¹ l : ℕ\nφ✝ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝¹ : Fin l → M\ninst✝¹ : Structure (L[[α]]) M\ninst✝ : LHom.IsExpansionOn (lhomWithConstants L α) M\nn✝ : ℕ\nφ : BoundedFormula (L[[α]]) β n✝\nv : β → M\nxs✝ : Fin n✝ → M\nn : ℕ\nR : Relations (L[[α]]) n\nxs : Fin n → M\n⊢ RelMap (↑((fun x => Equiv.sumEmpty (Relations L x) (Relations (constantsOn α) x)) n) R) xs = RelMap R xs\n[PROOFSTEP]\nrw [← (lhomWithConstants L α).map_onRelation (Equiv.sumEmpty (L.Relations n) ((constantsOn α).Relations n) R) xs]\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝⁴ : Structure L M\ninst✝³ : Structure L N\ninst✝² : Structure L P\nα : Type u'\nβ : Type v'\nn✝¹ l : ℕ\nφ✝ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝¹ : Fin l → M\ninst✝¹ : Structure (L[[α]]) M\ninst✝ : LHom.IsExpansionOn (lhomWithConstants L α) M\nn✝ : ℕ\nφ : BoundedFormula (L[[α]]) β n✝\nv : β → M\nxs✝ : Fin n✝ → M\nn : ℕ\nR : Relations (L[[α]]) n\nxs : Fin n → M\n⊢ RelMap (LHom.onRelation (lhomWithConstants L α) (↑(Equiv.sumEmpty (Relations L n) (Relations (constantsOn α) n)) R))\n      xs =\n    RelMap R xs\n[PROOFSTEP]\nrcongr\n[GOAL]\ncase a\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝⁴ : Structure L M\ninst✝³ : Structure L N\ninst✝² : Structure L P\nα : Type u'\nβ : Type v'\nn✝¹ l : ℕ\nφ✝ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝¹ : Fin l → M\ninst✝¹ : Structure (L[[α]]) M\ninst✝ : LHom.IsExpansionOn (lhomWithConstants L α) M\nn✝ : ℕ\nφ : BoundedFormula (L[[α]]) β n✝\nv : β → M\nxs✝ : Fin n✝ → M\nn : ℕ\nR : Relations (L[[α]]) n\nxs : Fin n → M\n⊢ RelMap (LHom.onRelation (lhomWithConstants L α) (↑(Equiv.sumEmpty (Relations L n) (Relations (constantsOn α) n)) R))\n      xs ↔\n    RelMap R xs\n[PROOFSTEP]\ncases' R with R R\n[GOAL]\ncase a.inl\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝⁴ : Structure L M\ninst✝³ : Structure L N\ninst✝² : Structure L P\nα : Type u'\nβ : Type v'\nn✝¹ l : ℕ\nφ✝ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝¹ : Fin l → M\ninst✝¹ : Structure (L[[α]]) M\ninst✝ : LHom.IsExpansionOn (lhomWithConstants L α) M\nn✝ : ℕ\nφ : BoundedFormula (L[[α]]) β n✝\nv : β → M\nxs✝ : Fin n✝ → M\nn : ℕ\nxs : Fin n → M\nR : Relations L n\n⊢ RelMap\n      (LHom.onRelation (lhomWithConstants L α)\n        (↑(Equiv.sumEmpty (Relations L n) (Relations (constantsOn α) n)) (Sum.inl R)))\n      xs ↔\n    RelMap (Sum.inl R) xs\n[PROOFSTEP]\nsimp\n[GOAL]\ncase a.inr\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝⁴ : Structure L M\ninst✝³ : Structure L N\ninst✝² : Structure L P\nα : Type u'\nβ : Type v'\nn✝¹ l : ℕ\nφ✝ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝¹ : Fin l → M\ninst✝¹ : Structure (L[[α]]) M\ninst✝ : LHom.IsExpansionOn (lhomWithConstants L α) M\nn✝ : ℕ\nφ : BoundedFormula (L[[α]]) β n✝\nv : β → M\nxs✝ : Fin n✝ → M\nn : ℕ\nxs : Fin n → M\nR : Relations (constantsOn α) n\n⊢ RelMap\n      (LHom.onRelation (lhomWithConstants L α)\n        (↑(Equiv.sumEmpty (Relations L n) (Relations (constantsOn α) n)) (Sum.inr R)))\n      xs ↔\n    RelMap (Sum.inr R) xs\n[PROOFSTEP]\nexact isEmptyElim R\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn l : ℕ\nφ✝ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝ : Fin l → M\ng : α ≃ β\nk : ℕ\nφ : BoundedFormula L α k\nv : β → M\nxs : Fin k → M\n⊢ Realize (↑(relabelEquiv g) φ) v xs ↔ Realize φ (v ∘ ↑g) xs\n[PROOFSTEP]\nsimp only [relabelEquiv, mapTermRelEquiv_apply, Equiv.coe_refl]\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn l : ℕ\nφ✝ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝ : Fin l → M\ng : α ≃ β\nk : ℕ\nφ : BoundedFormula L α k\nv : β → M\nxs : Fin k → M\n⊢ Realize\n      (mapTermRel (fun n => ↑(Term.relabelEquiv (Equiv.sumCongr g (_root_.Equiv.refl (Fin n))))) (fun n => id)\n        (fun x => id) φ)\n      v xs ↔\n    Realize φ (v ∘ ↑g) xs\n[PROOFSTEP]\nrefine' realize_mapTermRel_id (fun n t xs => _) fun _ _ _ => rfl\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn✝ l : ℕ\nφ✝ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝¹ : Fin l → M\ng : α ≃ β\nk : ℕ\nφ : BoundedFormula L α k\nv : β → M\nxs✝ : Fin k → M\nn : ℕ\nt : Term L (α ⊕ Fin n)\nxs : Fin n → M\n⊢ realize (Sum.elim v xs) (↑(Term.relabelEquiv (Equiv.sumCongr g (_root_.Equiv.refl (Fin n)))) t) =\n    realize (Sum.elim (v ∘ ↑g) xs) t\n[PROOFSTEP]\nsimp only [relabelEquiv_apply, Term.realize_relabel]\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn✝ l : ℕ\nφ✝ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝¹ : Fin l → M\ng : α ≃ β\nk : ℕ\nφ : BoundedFormula L α k\nv : β → M\nxs✝ : Fin k → M\nn : ℕ\nt : Term L (α ⊕ Fin n)\nxs : Fin n → M\n⊢ realize (Sum.elim v xs ∘ ↑(Equiv.sumCongr g (_root_.Equiv.refl (Fin n)))) t = realize (Sum.elim (v ∘ ↑g) xs) t\n[PROOFSTEP]\nrefine' congr (congr rfl _) rfl\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn✝ l : ℕ\nφ✝ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝¹ : Fin l → M\ng : α ≃ β\nk : ℕ\nφ : BoundedFormula L α k\nv : β → M\nxs✝ : Fin k → M\nn : ℕ\nt : Term L (α ⊕ Fin n)\nxs : Fin n → M\n⊢ Sum.elim v xs ∘ ↑(Equiv.sumCongr g (_root_.Equiv.refl (Fin n))) = Sum.elim (v ∘ ↑g) xs\n[PROOFSTEP]\next (i | i)\n[GOAL]\ncase h.inl\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn✝ l : ℕ\nφ✝ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝¹ : Fin l → M\ng : α ≃ β\nk : ℕ\nφ : BoundedFormula L α k\nv : β → M\nxs✝ : Fin k → M\nn : ℕ\nt : Term L (α ⊕ Fin n)\nxs : Fin n → M\ni : α\n⊢ (Sum.elim v xs ∘ ↑(Equiv.sumCongr g (_root_.Equiv.refl (Fin n)))) (Sum.inl i) = Sum.elim (v ∘ ↑g) xs (Sum.inl i)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h.inr\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn✝ l : ℕ\nφ✝ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝¹ : Fin l → M\ng : α ≃ β\nk : ℕ\nφ : BoundedFormula L α k\nv : β → M\nxs✝ : Fin k → M\nn : ℕ\nt : Term L (α ⊕ Fin n)\nxs : Fin n → M\ni : Fin n\n⊢ (Sum.elim v xs ∘ ↑(Equiv.sumCongr g (_root_.Equiv.refl (Fin n)))) (Sum.inr i) = Sum.elim (v ∘ ↑g) xs (Sum.inr i)\n[PROOFSTEP]\nrfl\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\nn✝ l : ℕ\nφ✝ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝ : Fin l → M\ninst✝ : Nonempty M\nn : ℕ\nφ : BoundedFormula L α n\nv : α → M\nxs : Fin n → M\n⊢ Realize (∀'liftAt 1 n φ) v xs ↔ Realize φ v xs\n[PROOFSTEP]\ninhabit M\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\nn✝ l : ℕ\nφ✝ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝ : Fin l → M\ninst✝ : Nonempty M\nn : ℕ\nφ : BoundedFormula L α n\nv : α → M\nxs : Fin n → M\ninhabited_h : Inhabited M\n⊢ Realize (∀'liftAt 1 n φ) v xs ↔ Realize φ v xs\n[PROOFSTEP]\nsimp only [realize_all, realize_liftAt_one_self]\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\nn✝ l : ℕ\nφ✝ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝ : Fin l → M\ninst✝ : Nonempty M\nn : ℕ\nφ : BoundedFormula L α n\nv : α → M\nxs : Fin n → M\ninhabited_h : Inhabited M\n⊢ (∀ (a : M), Realize φ v (snoc xs a ∘ castSucc)) ↔ Realize φ v xs\n[PROOFSTEP]\nrefine' ⟨fun h => _, fun h a => _⟩\n[GOAL]\ncase refine'_1\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\nn✝ l : ℕ\nφ✝ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝ : Fin l → M\ninst✝ : Nonempty M\nn : ℕ\nφ : BoundedFormula L α n\nv : α → M\nxs : Fin n → M\ninhabited_h : Inhabited M\nh : ∀ (a : M), Realize φ v (snoc xs a ∘ castSucc)\n⊢ Realize φ v xs\n[PROOFSTEP]\nrefine' (congr rfl (funext fun i => _)).mp (h default)\n[GOAL]\ncase refine'_1\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\nn✝ l : ℕ\nφ✝ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝ : Fin l → M\ninst✝ : Nonempty M\nn : ℕ\nφ : BoundedFormula L α n\nv : α → M\nxs : Fin n → M\ninhabited_h : Inhabited M\nh : ∀ (a : M), Realize φ v (snoc xs a ∘ castSucc)\ni : Fin n\n⊢ (snoc xs default ∘ castSucc) i = xs i\n[PROOFSTEP]\nsimp\n[GOAL]\ncase refine'_2\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\nn✝ l : ℕ\nφ✝ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝ : Fin l → M\ninst✝ : Nonempty M\nn : ℕ\nφ : BoundedFormula L α n\nv : α → M\nxs : Fin n → M\ninhabited_h : Inhabited M\nh : Realize φ v xs\na : M\n⊢ Realize φ v (snoc xs a ∘ castSucc)\n[PROOFSTEP]\nrefine' (congr rfl (funext fun i => _)).mp h\n[GOAL]\ncase refine'_2\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\nn✝ l : ℕ\nφ✝ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝ : Fin l → M\ninst✝ : Nonempty M\nn : ℕ\nφ : BoundedFormula L α n\nv : α → M\nxs : Fin n → M\ninhabited_h : Inhabited M\nh : Realize φ v xs\na : M\ni : Fin n\n⊢ xs i = (snoc xs a ∘ castSucc) i\n[PROOFSTEP]\nsimp\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\nn l : ℕ\nφ✝ ψ✝ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝ : Fin l → M\ninst✝ : Nonempty M\nφ ψ : BoundedFormula L α n\nhφ : IsQF φ\nhψ : IsPrenex ψ\nv : α → M\nxs : Fin n → M\n⊢ Realize (toPrenexImpRight φ ψ) v xs ↔ Realize (φ ⟹ ψ) v xs\n[PROOFSTEP]\ninduction' hψ with _ _ hψ _ _ _hψ ih _ _ _hψ ih\n[GOAL]\ncase of_isQF\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\nn l : ℕ\nφ✝² ψ✝ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝¹ : Fin l → M\ninst✝ : Nonempty M\nφ✝¹ ψ : BoundedFormula L α n\nhφ✝ : IsQF φ✝¹\nv : α → M\nxs✝ : Fin n → M\nn✝ : ℕ\nφ✝ : BoundedFormula L α n✝\nhψ : IsQF φ✝\nφ : BoundedFormula L α n✝\nhφ : IsQF φ\nxs : Fin n✝ → M\n⊢ Realize (toPrenexImpRight φ φ✝) v xs ↔ Realize (φ ⟹ φ✝) v xs\n[PROOFSTEP]\nrw [hψ.toPrenexImpRight]\n[GOAL]\ncase all\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\nn l : ℕ\nφ✝² ψ✝ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝¹ : Fin l → M\ninst✝ : Nonempty M\nφ✝¹ ψ : BoundedFormula L α n\nhφ✝ : IsQF φ✝¹\nv : α → M\nxs✝ : Fin n → M\nn✝ : ℕ\nφ✝ : BoundedFormula L α (n✝ + 1)\n_hψ : IsPrenex φ✝\nih :\n  ∀ {φ : BoundedFormula L α (n✝ + 1)},\n    IsQF φ → ∀ {xs : Fin (n✝ + 1) → M}, Realize (toPrenexImpRight φ φ✝) v xs ↔ Realize (φ ⟹ φ✝) v xs\nφ : BoundedFormula L α n✝\nhφ : IsQF φ\nxs : Fin n✝ → M\n⊢ Realize (toPrenexImpRight φ (∀'φ✝)) v xs ↔ Realize (φ ⟹ ∀'φ✝) v xs\n[PROOFSTEP]\nrefine' _root_.trans (forall_congr' fun _ => ih hφ.liftAt) _\n[GOAL]\ncase all\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\nn l : ℕ\nφ✝² ψ✝ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝¹ : Fin l → M\ninst✝ : Nonempty M\nφ✝¹ ψ : BoundedFormula L α n\nhφ✝ : IsQF φ✝¹\nv : α → M\nxs✝ : Fin n → M\nn✝ : ℕ\nφ✝ : BoundedFormula L α (n✝ + 1)\n_hψ : IsPrenex φ✝\nih :\n  ∀ {φ : BoundedFormula L α (n✝ + 1)},\n    IsQF φ → ∀ {xs : Fin (n✝ + 1) → M}, Realize (toPrenexImpRight φ φ✝) v xs ↔ Realize (φ ⟹ φ✝) v xs\nφ : BoundedFormula L α n✝\nhφ : IsQF φ\nxs : Fin n✝ → M\n⊢ (∀ (a : M), Realize (liftAt 1 n✝ φ ⟹ φ✝) v (snoc xs a)) ↔ Realize (φ ⟹ ∀'φ✝) v xs\n[PROOFSTEP]\nsimp only [realize_imp, realize_liftAt_one_self, snoc_comp_castSucc, realize_all]\n[GOAL]\ncase all\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\nn l : ℕ\nφ✝² ψ✝ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝¹ : Fin l → M\ninst✝ : Nonempty M\nφ✝¹ ψ : BoundedFormula L α n\nhφ✝ : IsQF φ✝¹\nv : α → M\nxs✝ : Fin n → M\nn✝ : ℕ\nφ✝ : BoundedFormula L α (n✝ + 1)\n_hψ : IsPrenex φ✝\nih :\n  ∀ {φ : BoundedFormula L α (n✝ + 1)},\n    IsQF φ → ∀ {xs : Fin (n✝ + 1) → M}, Realize (toPrenexImpRight φ φ✝) v xs ↔ Realize (φ ⟹ φ✝) v xs\nφ : BoundedFormula L α n✝\nhφ : IsQF φ\nxs : Fin n✝ → M\n⊢ (∀ (a : M), Realize φ v xs → Realize φ✝ v (snoc xs a)) ↔ Realize φ v xs → ∀ (a : M), Realize φ✝ v (snoc xs a)\n[PROOFSTEP]\nexact ⟨fun h1 a h2 => h1 h2 a, fun h1 h2 a => h1 a h2⟩\n[GOAL]\ncase ex\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\nn l : ℕ\nφ✝² ψ✝ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝¹ : Fin l → M\ninst✝ : Nonempty M\nφ✝¹ ψ : BoundedFormula L α n\nhφ✝ : IsQF φ✝¹\nv : α → M\nxs✝ : Fin n → M\nn✝ : ℕ\nφ✝ : BoundedFormula L α (n✝ + 1)\n_hψ : IsPrenex φ✝\nih :\n  ∀ {φ : BoundedFormula L α (n✝ + 1)},\n    IsQF φ → ∀ {xs : Fin (n✝ + 1) → M}, Realize (toPrenexImpRight φ φ✝) v xs ↔ Realize (φ ⟹ φ✝) v xs\nφ : BoundedFormula L α n✝\nhφ : IsQF φ\nxs : Fin n✝ → M\n⊢ Realize (toPrenexImpRight φ (∃'φ✝)) v xs ↔ Realize (φ ⟹ ∃'φ✝) v xs\n[PROOFSTEP]\nunfold toPrenexImpRight\n[GOAL]\ncase ex\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\nn l : ℕ\nφ✝² ψ✝ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝¹ : Fin l → M\ninst✝ : Nonempty M\nφ✝¹ ψ : BoundedFormula L α n\nhφ✝ : IsQF φ✝¹\nv : α → M\nxs✝ : Fin n → M\nn✝ : ℕ\nφ✝ : BoundedFormula L α (n✝ + 1)\n_hψ : IsPrenex φ✝\nih :\n  ∀ {φ : BoundedFormula L α (n✝ + 1)},\n    IsQF φ → ∀ {xs : Fin (n✝ + 1) → M}, Realize (toPrenexImpRight φ φ✝) v xs ↔ Realize (φ ⟹ φ✝) v xs\nφ : BoundedFormula L α n✝\nhφ : IsQF φ\nxs : Fin n✝ → M\n⊢ Realize (∃'toPrenexImpRight (liftAt 1 n✝ φ) φ✝) v xs ↔ Realize (φ ⟹ ∃'φ✝) v xs\n[PROOFSTEP]\nrw [realize_ex]\n[GOAL]\ncase ex\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\nn l : ℕ\nφ✝² ψ✝ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝¹ : Fin l → M\ninst✝ : Nonempty M\nφ✝¹ ψ : BoundedFormula L α n\nhφ✝ : IsQF φ✝¹\nv : α → M\nxs✝ : Fin n → M\nn✝ : ℕ\nφ✝ : BoundedFormula L α (n✝ + 1)\n_hψ : IsPrenex φ✝\nih :\n  ∀ {φ : BoundedFormula L α (n✝ + 1)},\n    IsQF φ → ∀ {xs : Fin (n✝ + 1) → M}, Realize (toPrenexImpRight φ φ✝) v xs ↔ Realize (φ ⟹ φ✝) v xs\nφ : BoundedFormula L α n✝\nhφ : IsQF φ\nxs : Fin n✝ → M\n⊢ (∃ a, Realize (toPrenexImpRight (liftAt 1 n✝ φ) φ✝) v (snoc xs a)) ↔ Realize (φ ⟹ ∃'φ✝) v xs\n[PROOFSTEP]\nrefine' _root_.trans (exists_congr fun _ => ih hφ.liftAt) _\n[GOAL]\ncase ex\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\nn l : ℕ\nφ✝² ψ✝ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝¹ : Fin l → M\ninst✝ : Nonempty M\nφ✝¹ ψ : BoundedFormula L α n\nhφ✝ : IsQF φ✝¹\nv : α → M\nxs✝ : Fin n → M\nn✝ : ℕ\nφ✝ : BoundedFormula L α (n✝ + 1)\n_hψ : IsPrenex φ✝\nih :\n  ∀ {φ : BoundedFormula L α (n✝ + 1)},\n    IsQF φ → ∀ {xs : Fin (n✝ + 1) → M}, Realize (toPrenexImpRight φ φ✝) v xs ↔ Realize (φ ⟹ φ✝) v xs\nφ : BoundedFormula L α n✝\nhφ : IsQF φ\nxs : Fin n✝ → M\n⊢ (∃ a, Realize (liftAt 1 n✝ φ ⟹ φ✝) v (snoc xs a)) ↔ Realize (φ ⟹ ∃'φ✝) v xs\n[PROOFSTEP]\nsimp only [realize_imp, realize_liftAt_one_self, snoc_comp_castSucc, realize_ex]\n[GOAL]\ncase ex\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\nn l : ℕ\nφ✝² ψ✝ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝¹ : Fin l → M\ninst✝ : Nonempty M\nφ✝¹ ψ : BoundedFormula L α n\nhφ✝ : IsQF φ✝¹\nv : α → M\nxs✝ : Fin n → M\nn✝ : ℕ\nφ✝ : BoundedFormula L α (n✝ + 1)\n_hψ : IsPrenex φ✝\nih :\n  ∀ {φ : BoundedFormula L α (n✝ + 1)},\n    IsQF φ → ∀ {xs : Fin (n✝ + 1) → M}, Realize (toPrenexImpRight φ φ✝) v xs ↔ Realize (φ ⟹ φ✝) v xs\nφ : BoundedFormula L α n✝\nhφ : IsQF φ\nxs : Fin n✝ → M\n⊢ (∃ a, Realize φ v xs → Realize φ✝ v (snoc xs a)) ↔ Realize φ v xs → ∃ a, Realize φ✝ v (snoc xs a)\n[PROOFSTEP]\nrefine' ⟨_, fun h' => _⟩\n[GOAL]\ncase ex.refine'_1\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\nn l : ℕ\nφ✝² ψ✝ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝¹ : Fin l → M\ninst✝ : Nonempty M\nφ✝¹ ψ : BoundedFormula L α n\nhφ✝ : IsQF φ✝¹\nv : α → M\nxs✝ : Fin n → M\nn✝ : ℕ\nφ✝ : BoundedFormula L α (n✝ + 1)\n_hψ : IsPrenex φ✝\nih :\n  ∀ {φ : BoundedFormula L α (n✝ + 1)},\n    IsQF φ → ∀ {xs : Fin (n✝ + 1) → M}, Realize (toPrenexImpRight φ φ✝) v xs ↔ Realize (φ ⟹ φ✝) v xs\nφ : BoundedFormula L α n✝\nhφ : IsQF φ\nxs : Fin n✝ → M\n⊢ (∃ a, Realize φ v xs → Realize φ✝ v (snoc xs a)) → Realize φ v xs → ∃ a, Realize φ✝ v (snoc xs a)\n[PROOFSTEP]\nrintro ⟨a, ha⟩ h\n[GOAL]\ncase ex.refine'_1.intro\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\nn l : ℕ\nφ✝² ψ✝ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝¹ : Fin l → M\ninst✝ : Nonempty M\nφ✝¹ ψ : BoundedFormula L α n\nhφ✝ : IsQF φ✝¹\nv : α → M\nxs✝ : Fin n → M\nn✝ : ℕ\nφ✝ : BoundedFormula L α (n✝ + 1)\n_hψ : IsPrenex φ✝\nih :\n  ∀ {φ : BoundedFormula L α (n✝ + 1)},\n    IsQF φ → ∀ {xs : Fin (n✝ + 1) → M}, Realize (toPrenexImpRight φ φ✝) v xs ↔ Realize (φ ⟹ φ✝) v xs\nφ : BoundedFormula L α n✝\nhφ : IsQF φ\nxs : Fin n✝ → M\na : M\nha : Realize φ v xs → Realize φ✝ v (snoc xs a)\nh : Realize φ v xs\n⊢ ∃ a, Realize φ✝ v (snoc xs a)\n[PROOFSTEP]\nexact ⟨a, ha h⟩\n[GOAL]\ncase ex.refine'_2\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\nn l : ℕ\nφ✝² ψ✝ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝¹ : Fin l → M\ninst✝ : Nonempty M\nφ✝¹ ψ : BoundedFormula L α n\nhφ✝ : IsQF φ✝¹\nv : α → M\nxs✝ : Fin n → M\nn✝ : ℕ\nφ✝ : BoundedFormula L α (n✝ + 1)\n_hψ : IsPrenex φ✝\nih :\n  ∀ {φ : BoundedFormula L α (n✝ + 1)},\n    IsQF φ → ∀ {xs : Fin (n✝ + 1) → M}, Realize (toPrenexImpRight φ φ✝) v xs ↔ Realize (φ ⟹ φ✝) v xs\nφ : BoundedFormula L α n✝\nhφ : IsQF φ\nxs : Fin n✝ → M\nh' : Realize φ v xs → ∃ a, Realize φ✝ v (snoc xs a)\n⊢ ∃ a, Realize φ v xs → Realize φ✝ v (snoc xs a)\n[PROOFSTEP]\nby_cases φ.Realize v xs\n[GOAL]\ncase ex.refine'_2\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\nn l : ℕ\nφ✝² ψ✝ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝¹ : Fin l → M\ninst✝ : Nonempty M\nφ✝¹ ψ : BoundedFormula L α n\nhφ✝ : IsQF φ✝¹\nv : α → M\nxs✝ : Fin n → M\nn✝ : ℕ\nφ✝ : BoundedFormula L α (n✝ + 1)\n_hψ : IsPrenex φ✝\nih :\n  ∀ {φ : BoundedFormula L α (n✝ + 1)},\n    IsQF φ → ∀ {xs : Fin (n✝ + 1) → M}, Realize (toPrenexImpRight φ φ✝) v xs ↔ Realize (φ ⟹ φ✝) v xs\nφ : BoundedFormula L α n✝\nhφ : IsQF φ\nxs : Fin n✝ → M\nh' : Realize φ v xs → ∃ a, Realize φ✝ v (snoc xs a)\n⊢ ∃ a, Realize φ v xs → Realize φ✝ v (snoc xs a)\n[PROOFSTEP]\nby_cases φ.Realize v xs\n[GOAL]\ncase pos\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\nn l : ℕ\nφ✝² ψ✝ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝¹ : Fin l → M\ninst✝ : Nonempty M\nφ✝¹ ψ : BoundedFormula L α n\nhφ✝ : IsQF φ✝¹\nv : α → M\nxs✝ : Fin n → M\nn✝ : ℕ\nφ✝ : BoundedFormula L α (n✝ + 1)\n_hψ : IsPrenex φ✝\nih :\n  ∀ {φ : BoundedFormula L α (n✝ + 1)},\n    IsQF φ → ∀ {xs : Fin (n✝ + 1) → M}, Realize (toPrenexImpRight φ φ✝) v xs ↔ Realize (φ ⟹ φ✝) v xs\nφ : BoundedFormula L α n✝\nhφ : IsQF φ\nxs : Fin n✝ → M\nh' : Realize φ v xs → ∃ a, Realize φ✝ v (snoc xs a)\nh : Realize φ v xs\n⊢ ∃ a, Realize φ v xs → Realize φ✝ v (snoc xs a)\n[PROOFSTEP]\nobtain ⟨a, ha⟩ := h' h\n[GOAL]\ncase pos.intro\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\nn l : ℕ\nφ✝² ψ✝ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝¹ : Fin l → M\ninst✝ : Nonempty M\nφ✝¹ ψ : BoundedFormula L α n\nhφ✝ : IsQF φ✝¹\nv : α → M\nxs✝ : Fin n → M\nn✝ : ℕ\nφ✝ : BoundedFormula L α (n✝ + 1)\n_hψ : IsPrenex φ✝\nih :\n  ∀ {φ : BoundedFormula L α (n✝ + 1)},\n    IsQF φ → ∀ {xs : Fin (n✝ + 1) → M}, Realize (toPrenexImpRight φ φ✝) v xs ↔ Realize (φ ⟹ φ✝) v xs\nφ : BoundedFormula L α n✝\nhφ : IsQF φ\nxs : Fin n✝ → M\nh' : Realize φ v xs → ∃ a, Realize φ✝ v (snoc xs a)\nh : Realize φ v xs\na : M\nha : Realize φ✝ v (snoc xs a)\n⊢ ∃ a, Realize φ v xs → Realize φ✝ v (snoc xs a)\n[PROOFSTEP]\nexact ⟨a, fun _ => ha⟩\n[GOAL]\ncase neg\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\nn l : ℕ\nφ✝² ψ✝ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝¹ : Fin l → M\ninst✝ : Nonempty M\nφ✝¹ ψ : BoundedFormula L α n\nhφ✝ : IsQF φ✝¹\nv : α → M\nxs✝ : Fin n → M\nn✝ : ℕ\nφ✝ : BoundedFormula L α (n✝ + 1)\n_hψ : IsPrenex φ✝\nih :\n  ∀ {φ : BoundedFormula L α (n✝ + 1)},\n    IsQF φ → ∀ {xs : Fin (n✝ + 1) → M}, Realize (toPrenexImpRight φ φ✝) v xs ↔ Realize (φ ⟹ φ✝) v xs\nφ : BoundedFormula L α n✝\nhφ : IsQF φ\nxs : Fin n✝ → M\nh' : Realize φ v xs → ∃ a, Realize φ✝ v (snoc xs a)\nh : ¬Realize φ v xs\n⊢ ∃ a, Realize φ v xs → Realize φ✝ v (snoc xs a)\n[PROOFSTEP]\ninhabit M\n[GOAL]\ncase neg\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\nn l : ℕ\nφ✝² ψ✝ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝¹ : Fin l → M\ninst✝ : Nonempty M\nφ✝¹ ψ : BoundedFormula L α n\nhφ✝ : IsQF φ✝¹\nv : α → M\nxs✝ : Fin n → M\nn✝ : ℕ\nφ✝ : BoundedFormula L α (n✝ + 1)\n_hψ : IsPrenex φ✝\nih :\n  ∀ {φ : BoundedFormula L α (n✝ + 1)},\n    IsQF φ → ∀ {xs : Fin (n✝ + 1) → M}, Realize (toPrenexImpRight φ φ✝) v xs ↔ Realize (φ ⟹ φ✝) v xs\nφ : BoundedFormula L α n✝\nhφ : IsQF φ\nxs : Fin n✝ → M\nh' : Realize φ v xs → ∃ a, Realize φ✝ v (snoc xs a)\nh : ¬Realize φ v xs\ninhabited_h : Inhabited M\n⊢ ∃ a, Realize φ v xs → Realize φ✝ v (snoc xs a)\n[PROOFSTEP]\nexact ⟨default, fun h'' => (h h'').elim⟩\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\nn l : ℕ\nφ✝ ψ✝ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝ : Fin l → M\ninst✝ : Nonempty M\nφ ψ : BoundedFormula L α n\nhφ : IsPrenex φ\nhψ : IsPrenex ψ\nv : α → M\nxs : Fin n → M\n⊢ Realize (toPrenexImp φ ψ) v xs ↔ Realize (φ ⟹ ψ) v xs\n[PROOFSTEP]\nrevert ψ\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\nn l : ℕ\nφ✝ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝ : Fin l → M\ninst✝ : Nonempty M\nφ : BoundedFormula L α n\nhφ : IsPrenex φ\nv : α → M\nxs : Fin n → M\n⊢ ∀ {ψ : BoundedFormula L α n}, IsPrenex ψ → (Realize (toPrenexImp φ ψ) v xs ↔ Realize (φ ⟹ ψ) v xs)\n[PROOFSTEP]\ninduction' hφ with _ _ hφ _ _ _hφ ih _ _ _hφ ih\n[GOAL]\ncase of_isQF\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\nn l : ℕ\nφ✝¹ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝¹ : Fin l → M\ninst✝ : Nonempty M\nφ : BoundedFormula L α n\nv : α → M\nxs✝ : Fin n → M\nn✝ : ℕ\nφ✝ : BoundedFormula L α n✝\nhφ : IsQF φ✝\nxs : Fin n✝ → M\n⊢ ∀ {ψ : BoundedFormula L α n✝}, IsPrenex ψ → (Realize (toPrenexImp φ✝ ψ) v xs ↔ Realize (φ✝ ⟹ ψ) v xs)\n[PROOFSTEP]\nintro ψ hψ\n[GOAL]\ncase all\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\nn l : ℕ\nφ✝¹ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝¹ : Fin l → M\ninst✝ : Nonempty M\nφ : BoundedFormula L α n\nv : α → M\nxs✝ : Fin n → M\nn✝ : ℕ\nφ✝ : BoundedFormula L α (n✝ + 1)\n_hφ : IsPrenex φ✝\nih :\n  ∀ {xs : Fin (n✝ + 1) → M} {ψ : BoundedFormula L α (n✝ + 1)},\n    IsPrenex ψ → (Realize (toPrenexImp φ✝ ψ) v xs ↔ Realize (φ✝ ⟹ ψ) v xs)\nxs : Fin n✝ → M\n⊢ ∀ {ψ : BoundedFormula L α n✝}, IsPrenex ψ → (Realize (toPrenexImp (∀'φ✝) ψ) v xs ↔ Realize (∀'φ✝ ⟹ ψ) v xs)\n[PROOFSTEP]\nintro ψ hψ\n[GOAL]\ncase ex\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\nn l : ℕ\nφ✝¹ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝¹ : Fin l → M\ninst✝ : Nonempty M\nφ : BoundedFormula L α n\nv : α → M\nxs✝ : Fin n → M\nn✝ : ℕ\nφ✝ : BoundedFormula L α (n✝ + 1)\n_hφ : IsPrenex φ✝\nih :\n  ∀ {xs : Fin (n✝ + 1) → M} {ψ : BoundedFormula L α (n✝ + 1)},\n    IsPrenex ψ → (Realize (toPrenexImp φ✝ ψ) v xs ↔ Realize (φ✝ ⟹ ψ) v xs)\nxs : Fin n✝ → M\n⊢ ∀ {ψ : BoundedFormula L α n✝}, IsPrenex ψ → (Realize (toPrenexImp (∃'φ✝) ψ) v xs ↔ Realize (∃'φ✝ ⟹ ψ) v xs)\n[PROOFSTEP]\nintro ψ hψ\n[GOAL]\ncase of_isQF\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\nn l : ℕ\nφ✝¹ ψ✝ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝¹ : Fin l → M\ninst✝ : Nonempty M\nφ : BoundedFormula L α n\nv : α → M\nxs✝ : Fin n → M\nn✝ : ℕ\nφ✝ : BoundedFormula L α n✝\nhφ : IsQF φ✝\nxs : Fin n✝ → M\nψ : BoundedFormula L α n✝\nhψ : IsPrenex ψ\n⊢ Realize (toPrenexImp φ✝ ψ) v xs ↔ Realize (φ✝ ⟹ ψ) v xs\n[PROOFSTEP]\nrw [hφ.toPrenexImp]\n[GOAL]\ncase of_isQF\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\nn l : ℕ\nφ✝¹ ψ✝ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝¹ : Fin l → M\ninst✝ : Nonempty M\nφ : BoundedFormula L α n\nv : α → M\nxs✝ : Fin n → M\nn✝ : ℕ\nφ✝ : BoundedFormula L α n✝\nhφ : IsQF φ✝\nxs : Fin n✝ → M\nψ : BoundedFormula L α n✝\nhψ : IsPrenex ψ\n⊢ Realize (toPrenexImpRight φ✝ ψ) v xs ↔ Realize (φ✝ ⟹ ψ) v xs\n[PROOFSTEP]\nexact realize_toPrenexImpRight hφ hψ\n[GOAL]\ncase all\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\nn l : ℕ\nφ✝¹ ψ✝ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝¹ : Fin l → M\ninst✝ : Nonempty M\nφ : BoundedFormula L α n\nv : α → M\nxs✝ : Fin n → M\nn✝ : ℕ\nφ✝ : BoundedFormula L α (n✝ + 1)\n_hφ : IsPrenex φ✝\nih :\n  ∀ {xs : Fin (n✝ + 1) → M} {ψ : BoundedFormula L α (n✝ + 1)},\n    IsPrenex ψ → (Realize (toPrenexImp φ✝ ψ) v xs ↔ Realize (φ✝ ⟹ ψ) v xs)\nxs : Fin n✝ → M\nψ : BoundedFormula L α n✝\nhψ : IsPrenex ψ\n⊢ Realize (toPrenexImp (∀'φ✝) ψ) v xs ↔ Realize (∀'φ✝ ⟹ ψ) v xs\n[PROOFSTEP]\nunfold toPrenexImp\n[GOAL]\ncase all\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\nn l : ℕ\nφ✝¹ ψ✝ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝¹ : Fin l → M\ninst✝ : Nonempty M\nφ : BoundedFormula L α n\nv : α → M\nxs✝ : Fin n → M\nn✝ : ℕ\nφ✝ : BoundedFormula L α (n✝ + 1)\n_hφ : IsPrenex φ✝\nih :\n  ∀ {xs : Fin (n✝ + 1) → M} {ψ : BoundedFormula L α (n✝ + 1)},\n    IsPrenex ψ → (Realize (toPrenexImp φ✝ ψ) v xs ↔ Realize (φ✝ ⟹ ψ) v xs)\nxs : Fin n✝ → M\nψ : BoundedFormula L α n✝\nhψ : IsPrenex ψ\n⊢ Realize (∃'toPrenexImp φ✝ (liftAt 1 n✝ ψ)) v xs ↔ Realize (∀'φ✝ ⟹ ψ) v xs\n[PROOFSTEP]\nrw [realize_ex]\n[GOAL]\ncase all\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\nn l : ℕ\nφ✝¹ ψ✝ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝¹ : Fin l → M\ninst✝ : Nonempty M\nφ : BoundedFormula L α n\nv : α → M\nxs✝ : Fin n → M\nn✝ : ℕ\nφ✝ : BoundedFormula L α (n✝ + 1)\n_hφ : IsPrenex φ✝\nih :\n  ∀ {xs : Fin (n✝ + 1) → M} {ψ : BoundedFormula L α (n✝ + 1)},\n    IsPrenex ψ → (Realize (toPrenexImp φ✝ ψ) v xs ↔ Realize (φ✝ ⟹ ψ) v xs)\nxs : Fin n✝ → M\nψ : BoundedFormula L α n✝\nhψ : IsPrenex ψ\n⊢ (∃ a, Realize (toPrenexImp φ✝ (liftAt 1 n✝ ψ)) v (snoc xs a)) ↔ Realize (∀'φ✝ ⟹ ψ) v xs\n[PROOFSTEP]\nrefine' _root_.trans (exists_congr fun _ => ih hψ.liftAt) _\n[GOAL]\ncase all\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\nn l : ℕ\nφ✝¹ ψ✝ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝¹ : Fin l → M\ninst✝ : Nonempty M\nφ : BoundedFormula L α n\nv : α → M\nxs✝ : Fin n → M\nn✝ : ℕ\nφ✝ : BoundedFormula L α (n✝ + 1)\n_hφ : IsPrenex φ✝\nih :\n  ∀ {xs : Fin (n✝ + 1) → M} {ψ : BoundedFormula L α (n✝ + 1)},\n    IsPrenex ψ → (Realize (toPrenexImp φ✝ ψ) v xs ↔ Realize (φ✝ ⟹ ψ) v xs)\nxs : Fin n✝ → M\nψ : BoundedFormula L α n✝\nhψ : IsPrenex ψ\n⊢ (∃ a, Realize (φ✝ ⟹ liftAt 1 n✝ ψ) v (snoc xs a)) ↔ Realize (∀'φ✝ ⟹ ψ) v xs\n[PROOFSTEP]\nsimp only [realize_imp, realize_liftAt_one_self, snoc_comp_castSucc, realize_all]\n[GOAL]\ncase all\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\nn l : ℕ\nφ✝¹ ψ✝ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝¹ : Fin l → M\ninst✝ : Nonempty M\nφ : BoundedFormula L α n\nv : α → M\nxs✝ : Fin n → M\nn✝ : ℕ\nφ✝ : BoundedFormula L α (n✝ + 1)\n_hφ : IsPrenex φ✝\nih :\n  ∀ {xs : Fin (n✝ + 1) → M} {ψ : BoundedFormula L α (n✝ + 1)},\n    IsPrenex ψ → (Realize (toPrenexImp φ✝ ψ) v xs ↔ Realize (φ✝ ⟹ ψ) v xs)\nxs : Fin n✝ → M\nψ : BoundedFormula L α n✝\nhψ : IsPrenex ψ\n⊢ (∃ a, Realize φ✝ v (snoc xs a) → Realize ψ v xs) ↔ (∀ (a : M), Realize φ✝ v (snoc xs a)) → Realize ψ v xs\n[PROOFSTEP]\nrefine' ⟨_, fun h' => _⟩\n[GOAL]\ncase all.refine'_1\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\nn l : ℕ\nφ✝¹ ψ✝ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝¹ : Fin l → M\ninst✝ : Nonempty M\nφ : BoundedFormula L α n\nv : α → M\nxs✝ : Fin n → M\nn✝ : ℕ\nφ✝ : BoundedFormula L α (n✝ + 1)\n_hφ : IsPrenex φ✝\nih :\n  ∀ {xs : Fin (n✝ + 1) → M} {ψ : BoundedFormula L α (n✝ + 1)},\n    IsPrenex ψ → (Realize (toPrenexImp φ✝ ψ) v xs ↔ Realize (φ✝ ⟹ ψ) v xs)\nxs : Fin n✝ → M\nψ : BoundedFormula L α n✝\nhψ : IsPrenex ψ\n⊢ (∃ a, Realize φ✝ v (snoc xs a) → Realize ψ v xs) → (∀ (a : M), Realize φ✝ v (snoc xs a)) → Realize ψ v xs\n[PROOFSTEP]\nrintro ⟨a, ha⟩ h\n[GOAL]\ncase all.refine'_1.intro\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\nn l : ℕ\nφ✝¹ ψ✝ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝¹ : Fin l → M\ninst✝ : Nonempty M\nφ : BoundedFormula L α n\nv : α → M\nxs✝ : Fin n → M\nn✝ : ℕ\nφ✝ : BoundedFormula L α (n✝ + 1)\n_hφ : IsPrenex φ✝\nih :\n  ∀ {xs : Fin (n✝ + 1) → M} {ψ : BoundedFormula L α (n✝ + 1)},\n    IsPrenex ψ → (Realize (toPrenexImp φ✝ ψ) v xs ↔ Realize (φ✝ ⟹ ψ) v xs)\nxs : Fin n✝ → M\nψ : BoundedFormula L α n✝\nhψ : IsPrenex ψ\na : M\nha : Realize φ✝ v (snoc xs a) → Realize ψ v xs\nh : ∀ (a : M), Realize φ✝ v (snoc xs a)\n⊢ Realize ψ v xs\n[PROOFSTEP]\nexact ha (h a)\n[GOAL]\ncase all.refine'_2\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\nn l : ℕ\nφ✝¹ ψ✝ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝¹ : Fin l → M\ninst✝ : Nonempty M\nφ : BoundedFormula L α n\nv : α → M\nxs✝ : Fin n → M\nn✝ : ℕ\nφ✝ : BoundedFormula L α (n✝ + 1)\n_hφ : IsPrenex φ✝\nih :\n  ∀ {xs : Fin (n✝ + 1) → M} {ψ : BoundedFormula L α (n✝ + 1)},\n    IsPrenex ψ → (Realize (toPrenexImp φ✝ ψ) v xs ↔ Realize (φ✝ ⟹ ψ) v xs)\nxs : Fin n✝ → M\nψ : BoundedFormula L α n✝\nhψ : IsPrenex ψ\nh' : (∀ (a : M), Realize φ✝ v (snoc xs a)) → Realize ψ v xs\n⊢ ∃ a, Realize φ✝ v (snoc xs a) → Realize ψ v xs\n[PROOFSTEP]\nby_cases ψ.Realize v xs\n[GOAL]\ncase all.refine'_2\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\nn l : ℕ\nφ✝¹ ψ✝ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝¹ : Fin l → M\ninst✝ : Nonempty M\nφ : BoundedFormula L α n\nv : α → M\nxs✝ : Fin n → M\nn✝ : ℕ\nφ✝ : BoundedFormula L α (n✝ + 1)\n_hφ : IsPrenex φ✝\nih :\n  ∀ {xs : Fin (n✝ + 1) → M} {ψ : BoundedFormula L α (n✝ + 1)},\n    IsPrenex ψ → (Realize (toPrenexImp φ✝ ψ) v xs ↔ Realize (φ✝ ⟹ ψ) v xs)\nxs : Fin n✝ → M\nψ : BoundedFormula L α n✝\nhψ : IsPrenex ψ\nh' : (∀ (a : M), Realize φ✝ v (snoc xs a)) → Realize ψ v xs\n⊢ ∃ a, Realize φ✝ v (snoc xs a) → Realize ψ v xs\n[PROOFSTEP]\nby_cases ψ.Realize v xs\n[GOAL]\ncase pos\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\nn l : ℕ\nφ✝¹ ψ✝ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝¹ : Fin l → M\ninst✝ : Nonempty M\nφ : BoundedFormula L α n\nv : α → M\nxs✝ : Fin n → M\nn✝ : ℕ\nφ✝ : BoundedFormula L α (n✝ + 1)\n_hφ : IsPrenex φ✝\nih :\n  ∀ {xs : Fin (n✝ + 1) → M} {ψ : BoundedFormula L α (n✝ + 1)},\n    IsPrenex ψ → (Realize (toPrenexImp φ✝ ψ) v xs ↔ Realize (φ✝ ⟹ ψ) v xs)\nxs : Fin n✝ → M\nψ : BoundedFormula L α n✝\nhψ : IsPrenex ψ\nh' : (∀ (a : M), Realize φ✝ v (snoc xs a)) → Realize ψ v xs\nh : Realize ψ v xs\n⊢ ∃ a, Realize φ✝ v (snoc xs a) → Realize ψ v xs\n[PROOFSTEP]\ninhabit M\n[GOAL]\ncase pos\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\nn l : ℕ\nφ✝¹ ψ✝ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝¹ : Fin l → M\ninst✝ : Nonempty M\nφ : BoundedFormula L α n\nv : α → M\nxs✝ : Fin n → M\nn✝ : ℕ\nφ✝ : BoundedFormula L α (n✝ + 1)\n_hφ : IsPrenex φ✝\nih :\n  ∀ {xs : Fin (n✝ + 1) → M} {ψ : BoundedFormula L α (n✝ + 1)},\n    IsPrenex ψ → (Realize (toPrenexImp φ✝ ψ) v xs ↔ Realize (φ✝ ⟹ ψ) v xs)\nxs : Fin n✝ → M\nψ : BoundedFormula L α n✝\nhψ : IsPrenex ψ\nh' : (∀ (a : M), Realize φ✝ v (snoc xs a)) → Realize ψ v xs\nh : Realize ψ v xs\ninhabited_h : Inhabited M\n⊢ ∃ a, Realize φ✝ v (snoc xs a) → Realize ψ v xs\n[PROOFSTEP]\nexact ⟨default, fun _h'' => h⟩\n[GOAL]\ncase neg\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\nn l : ℕ\nφ✝¹ ψ✝ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝¹ : Fin l → M\ninst✝ : Nonempty M\nφ : BoundedFormula L α n\nv : α → M\nxs✝ : Fin n → M\nn✝ : ℕ\nφ✝ : BoundedFormula L α (n✝ + 1)\n_hφ : IsPrenex φ✝\nih :\n  ∀ {xs : Fin (n✝ + 1) → M} {ψ : BoundedFormula L α (n✝ + 1)},\n    IsPrenex ψ → (Realize (toPrenexImp φ✝ ψ) v xs ↔ Realize (φ✝ ⟹ ψ) v xs)\nxs : Fin n✝ → M\nψ : BoundedFormula L α n✝\nhψ : IsPrenex ψ\nh' : (∀ (a : M), Realize φ✝ v (snoc xs a)) → Realize ψ v xs\nh : ¬Realize ψ v xs\n⊢ ∃ a, Realize φ✝ v (snoc xs a) → Realize ψ v xs\n[PROOFSTEP]\nobtain ⟨a, ha⟩ := not_forall.1 (h ∘ h')\n[GOAL]\ncase neg.intro\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\nn l : ℕ\nφ✝¹ ψ✝ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝¹ : Fin l → M\ninst✝ : Nonempty M\nφ : BoundedFormula L α n\nv : α → M\nxs✝ : Fin n → M\nn✝ : ℕ\nφ✝ : BoundedFormula L α (n✝ + 1)\n_hφ : IsPrenex φ✝\nih :\n  ∀ {xs : Fin (n✝ + 1) → M} {ψ : BoundedFormula L α (n✝ + 1)},\n    IsPrenex ψ → (Realize (toPrenexImp φ✝ ψ) v xs ↔ Realize (φ✝ ⟹ ψ) v xs)\nxs : Fin n✝ → M\nψ : BoundedFormula L α n✝\nhψ : IsPrenex ψ\nh' : (∀ (a : M), Realize φ✝ v (snoc xs a)) → Realize ψ v xs\nh : ¬Realize ψ v xs\na : M\nha : ¬Realize φ✝ v (snoc xs a)\n⊢ ∃ a, Realize φ✝ v (snoc xs a) → Realize ψ v xs\n[PROOFSTEP]\nexact ⟨a, fun h => (ha h).elim⟩\n[GOAL]\ncase ex\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\nn l : ℕ\nφ✝¹ ψ✝ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝¹ : Fin l → M\ninst✝ : Nonempty M\nφ : BoundedFormula L α n\nv : α → M\nxs✝ : Fin n → M\nn✝ : ℕ\nφ✝ : BoundedFormula L α (n✝ + 1)\n_hφ : IsPrenex φ✝\nih :\n  ∀ {xs : Fin (n✝ + 1) → M} {ψ : BoundedFormula L α (n✝ + 1)},\n    IsPrenex ψ → (Realize (toPrenexImp φ✝ ψ) v xs ↔ Realize (φ✝ ⟹ ψ) v xs)\nxs : Fin n✝ → M\nψ : BoundedFormula L α n✝\nhψ : IsPrenex ψ\n⊢ Realize (toPrenexImp (∃'φ✝) ψ) v xs ↔ Realize (∃'φ✝ ⟹ ψ) v xs\n[PROOFSTEP]\nrefine' _root_.trans (forall_congr' fun _ => ih hψ.liftAt) _\n[GOAL]\ncase ex\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\nn l : ℕ\nφ✝¹ ψ✝ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs✝¹ : Fin l → M\ninst✝ : Nonempty M\nφ : BoundedFormula L α n\nv : α → M\nxs✝ : Fin n → M\nn✝ : ℕ\nφ✝ : BoundedFormula L α (n✝ + 1)\n_hφ : IsPrenex φ✝\nih :\n  ∀ {xs : Fin (n✝ + 1) → M} {ψ : BoundedFormula L α (n✝ + 1)},\n    IsPrenex ψ → (Realize (toPrenexImp φ✝ ψ) v xs ↔ Realize (φ✝ ⟹ ψ) v xs)\nxs : Fin n✝ → M\nψ : BoundedFormula L α n✝\nhψ : IsPrenex ψ\n⊢ (∀ (a : M), Realize (φ✝ ⟹ liftAt 1 n✝ ψ) v (snoc xs a)) ↔ Realize (∃'φ✝ ⟹ ψ) v xs\n[PROOFSTEP]\nsimp\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\nn l : ℕ\nφ✝ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs : Fin l → M\ninst✝ : Nonempty M\nφ : BoundedFormula L α n\nv : α → M\n⊢ ∀ {xs : Fin n → M}, Realize (toPrenex φ) v xs ↔ Realize φ v xs\n[PROOFSTEP]\ninduction' φ with _ _ _ _ _ _ _ _ _ f1 f2 h1 h2 _ _ h\n[GOAL]\ncase falsum\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\nn l : ℕ\nφ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs : Fin l → M\ninst✝ : Nonempty M\nv : α → M\nn✝ : ℕ\n⊢ ∀ {xs : Fin n✝ → M}, Realize (toPrenex falsum) v xs ↔ Realize falsum v xs\n[PROOFSTEP]\nexact Iff.rfl\n[GOAL]\ncase equal\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\nn l : ℕ\nφ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs : Fin l → M\ninst✝ : Nonempty M\nv : α → M\nn✝ : ℕ\nt₁✝ t₂✝ : Term L (α ⊕ Fin n✝)\n⊢ ∀ {xs : Fin n✝ → M}, Realize (toPrenex (equal t₁✝ t₂✝)) v xs ↔ Realize (equal t₁✝ t₂✝) v xs\n[PROOFSTEP]\nexact Iff.rfl\n[GOAL]\ncase rel\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\nn l : ℕ\nφ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs : Fin l → M\ninst✝ : Nonempty M\nv : α → M\nn✝ l✝ : ℕ\nR✝ : Relations L l✝\nts✝ : Fin l✝ → Term L (α ⊕ Fin n✝)\n⊢ ∀ {xs : Fin n✝ → M}, Realize (toPrenex (rel R✝ ts✝)) v xs ↔ Realize (rel R✝ ts✝) v xs\n[PROOFSTEP]\nexact Iff.rfl\n[GOAL]\ncase imp\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\nn l : ℕ\nφ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs : Fin l → M\ninst✝ : Nonempty M\nv : α → M\nn✝ : ℕ\nf1 f2 : BoundedFormula L α n✝\nh1 : ∀ {xs : Fin n✝ → M}, Realize (toPrenex f1) v xs ↔ Realize f1 v xs\nh2 : ∀ {xs : Fin n✝ → M}, Realize (toPrenex f2) v xs ↔ Realize f2 v xs\n⊢ ∀ {xs : Fin n✝ → M}, Realize (toPrenex (f1 ⟹ f2)) v xs ↔ Realize (f1 ⟹ f2) v xs\n[PROOFSTEP]\nintros\n[GOAL]\ncase imp\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\nn l : ℕ\nφ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs : Fin l → M\ninst✝ : Nonempty M\nv : α → M\nn✝ : ℕ\nf1 f2 : BoundedFormula L α n✝\nh1 : ∀ {xs : Fin n✝ → M}, Realize (toPrenex f1) v xs ↔ Realize f1 v xs\nh2 : ∀ {xs : Fin n✝ → M}, Realize (toPrenex f2) v xs ↔ Realize f2 v xs\nxs✝ : Fin n✝ → M\n⊢ Realize (toPrenex (f1 ⟹ f2)) v xs✝ ↔ Realize (f1 ⟹ f2) v xs✝\n[PROOFSTEP]\nrw [toPrenex, realize_toPrenexImp f1.toPrenex_isPrenex f2.toPrenex_isPrenex, realize_imp, realize_imp, h1, h2]\n[GOAL]\ncase all\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\nn l : ℕ\nφ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs : Fin l → M\ninst✝ : Nonempty M\nv : α → M\nn✝ : ℕ\nf✝ : BoundedFormula L α (n✝ + 1)\nh : ∀ {xs : Fin (n✝ + 1) → M}, Realize (toPrenex f✝) v xs ↔ Realize f✝ v xs\n⊢ ∀ {xs : Fin n✝ → M}, Realize (toPrenex (∀'f✝)) v xs ↔ Realize (∀'f✝) v xs\n[PROOFSTEP]\nintros\n[GOAL]\ncase all\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\nn l : ℕ\nφ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs : Fin l → M\ninst✝ : Nonempty M\nv : α → M\nn✝ : ℕ\nf✝ : BoundedFormula L α (n✝ + 1)\nh : ∀ {xs : Fin (n✝ + 1) → M}, Realize (toPrenex f✝) v xs ↔ Realize f✝ v xs\nxs✝ : Fin n✝ → M\n⊢ Realize (toPrenex (∀'f✝)) v xs✝ ↔ Realize (∀'f✝) v xs✝\n[PROOFSTEP]\nrw [realize_all, toPrenex, realize_all]\n[GOAL]\ncase all\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\nn l : ℕ\nφ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv✝ : α → M\nxs : Fin l → M\ninst✝ : Nonempty M\nv : α → M\nn✝ : ℕ\nf✝ : BoundedFormula L α (n✝ + 1)\nh : ∀ {xs : Fin (n✝ + 1) → M}, Realize (toPrenex f✝) v xs ↔ Realize f✝ v xs\nxs✝ : Fin n✝ → M\n⊢ (∀ (a : M), Realize (toPrenex f✝) v (snoc xs✝ a)) ↔ ∀ (a : M), Realize f✝ v (snoc xs✝ a)\n[PROOFSTEP]\nexact forall_congr' fun a => h\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝⁴ : Structure L M\ninst✝³ : Structure L N\ninst✝² : Structure L P\nα : Type u'\nβ : Type v'\nn✝ : ℕ\ninst✝¹ : Structure L' M\nφ : L →ᴸ L'\ninst✝ : IsExpansionOn φ M\nn : ℕ\nψ : BoundedFormula L α n\nv : α → M\nxs : Fin n → M\n⊢ Realize (onBoundedFormula φ ψ) v xs ↔ Realize ψ v xs\n[PROOFSTEP]\ninduction' ψ with _ _ _ _ _ _ _ _ _ _ _ ih1 ih2 _ _ ih3\n[GOAL]\ncase falsum\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝⁴ : Structure L M\ninst✝³ : Structure L N\ninst✝² : Structure L P\nα : Type u'\nβ : Type v'\nn✝¹ : ℕ\ninst✝¹ : Structure L' M\nφ : L →ᴸ L'\ninst✝ : IsExpansionOn φ M\nn : ℕ\nv : α → M\nxs✝ : Fin n → M\nn✝ : ℕ\nxs : Fin n✝ → M\n⊢ Realize (onBoundedFormula φ falsum) v xs ↔ Realize falsum v xs\n[PROOFSTEP]\nrfl\n[GOAL]\ncase equal\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝⁴ : Structure L M\ninst✝³ : Structure L N\ninst✝² : Structure L P\nα : Type u'\nβ : Type v'\nn✝¹ : ℕ\ninst✝¹ : Structure L' M\nφ : L →ᴸ L'\ninst✝ : IsExpansionOn φ M\nn : ℕ\nv : α → M\nxs✝ : Fin n → M\nn✝ : ℕ\nt₁✝ t₂✝ : Term L (α ⊕ Fin n✝)\nxs : Fin n✝ → M\n⊢ Realize (onBoundedFormula φ (equal t₁✝ t₂✝)) v xs ↔ Realize (equal t₁✝ t₂✝) v xs\n[PROOFSTEP]\nsimp only [onBoundedFormula, realize_bdEqual, realize_onTerm]\n[GOAL]\ncase equal\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝⁴ : Structure L M\ninst✝³ : Structure L N\ninst✝² : Structure L P\nα : Type u'\nβ : Type v'\nn✝¹ : ℕ\ninst✝¹ : Structure L' M\nφ : L →ᴸ L'\ninst✝ : IsExpansionOn φ M\nn : ℕ\nv : α → M\nxs✝ : Fin n → M\nn✝ : ℕ\nt₁✝ t₂✝ : Term L (α ⊕ Fin n✝)\nxs : Fin n✝ → M\n⊢ Term.realize (Sum.elim v xs) t₁✝ = Term.realize (Sum.elim v xs) t₂✝ ↔ Realize (equal t₁✝ t₂✝) v xs\n[PROOFSTEP]\nrfl\n[GOAL]\ncase rel\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝⁴ : Structure L M\ninst✝³ : Structure L N\ninst✝² : Structure L P\nα : Type u'\nβ : Type v'\nn✝¹ : ℕ\ninst✝¹ : Structure L' M\nφ : L →ᴸ L'\ninst✝ : IsExpansionOn φ M\nn : ℕ\nv : α → M\nxs✝ : Fin n → M\nn✝ l✝ : ℕ\nR✝ : Relations L l✝\nts✝ : Fin l✝ → Term L (α ⊕ Fin n✝)\nxs : Fin n✝ → M\n⊢ Realize (onBoundedFormula φ (rel R✝ ts✝)) v xs ↔ Realize (rel R✝ ts✝) v xs\n[PROOFSTEP]\nsimp only [onBoundedFormula, realize_rel, LHom.map_onRelation, Function.comp_apply, realize_onTerm]\n[GOAL]\ncase rel\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝⁴ : Structure L M\ninst✝³ : Structure L N\ninst✝² : Structure L P\nα : Type u'\nβ : Type v'\nn✝¹ : ℕ\ninst✝¹ : Structure L' M\nφ : L →ᴸ L'\ninst✝ : IsExpansionOn φ M\nn : ℕ\nv : α → M\nxs✝ : Fin n → M\nn✝ l✝ : ℕ\nR✝ : Relations L l✝\nts✝ : Fin l✝ → Term L (α ⊕ Fin n✝)\nxs : Fin n✝ → M\n⊢ (RelMap R✝ fun i => Term.realize (Sum.elim v xs) (ts✝ i)) ↔ Realize (rel R✝ ts✝) v xs\n[PROOFSTEP]\nrfl\n[GOAL]\ncase imp\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝⁴ : Structure L M\ninst✝³ : Structure L N\ninst✝² : Structure L P\nα : Type u'\nβ : Type v'\nn✝¹ : ℕ\ninst✝¹ : Structure L' M\nφ : L →ᴸ L'\ninst✝ : IsExpansionOn φ M\nn : ℕ\nv : α → M\nxs✝ : Fin n → M\nn✝ : ℕ\nf₁✝ f₂✝ : BoundedFormula L α n✝\nih1 : ∀ {xs : Fin n✝ → M}, Realize (onBoundedFormula φ f₁✝) v xs ↔ Realize f₁✝ v xs\nih2 : ∀ {xs : Fin n✝ → M}, Realize (onBoundedFormula φ f₂✝) v xs ↔ Realize f₂✝ v xs\nxs : Fin n✝ → M\n⊢ Realize (onBoundedFormula φ (f₁✝ ⟹ f₂✝)) v xs ↔ Realize (f₁✝ ⟹ f₂✝) v xs\n[PROOFSTEP]\nsimp only [onBoundedFormula, ih1, ih2, realize_imp]\n[GOAL]\ncase all\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝⁴ : Structure L M\ninst✝³ : Structure L N\ninst✝² : Structure L P\nα : Type u'\nβ : Type v'\nn✝¹ : ℕ\ninst✝¹ : Structure L' M\nφ : L →ᴸ L'\ninst✝ : IsExpansionOn φ M\nn : ℕ\nv : α → M\nxs✝ : Fin n → M\nn✝ : ℕ\nf✝ : BoundedFormula L α (n✝ + 1)\nih3 : ∀ {xs : Fin (n✝ + 1) → M}, Realize (onBoundedFormula φ f✝) v xs ↔ Realize f✝ v xs\nxs : Fin n✝ → M\n⊢ Realize (onBoundedFormula φ (∀'f✝)) v xs ↔ Realize (∀'f✝) v xs\n[PROOFSTEP]\nsimp only [onBoundedFormula, ih3, realize_all]\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn : ℕ\nφ ψ : Formula L α\nv : α → M\nk : ℕ\nR : Relations L k\nts : Fin k → Term L α\n⊢ (RelMap R fun i => Term.realize (Sum.elim v default) (Term.relabel Sum.inl (ts i))) ↔\n    RelMap R fun i => Term.realize v (ts i)\n[PROOFSTEP]\nsimp\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn : ℕ\nφ ψ : Formula L α\nv : α → M\nR : Relations L 1\nt : Term L α\n⊢ Realize (Relations.formula₁ R t) v ↔ RelMap R ![Term.realize v t]\n[PROOFSTEP]\nrw [Relations.formula₁, realize_rel, iff_eq_eq]\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn : ℕ\nφ ψ : Formula L α\nv : α → M\nR : Relations L 1\nt : Term L α\n⊢ (RelMap R fun i => Term.realize v (Matrix.vecCons t ![] i)) = RelMap R ![Term.realize v t]\n[PROOFSTEP]\nrefine' congr rfl (funext fun _ => _)\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn : ℕ\nφ ψ : Formula L α\nv : α → M\nR : Relations L 1\nt : Term L α\nx✝ : Fin 1\n⊢ Term.realize v (Matrix.vecCons t ![] x✝) = Matrix.vecCons (Term.realize v t) ![] x✝\n[PROOFSTEP]\nsimp only [Matrix.cons_val_fin_one]\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn : ℕ\nφ ψ : Formula L α\nv : α → M\nR : Relations L 2\nt₁ t₂ : Term L α\n⊢ Realize (Relations.formula₂ R t₁ t₂) v ↔ RelMap R ![Term.realize v t₁, Term.realize v t₂]\n[PROOFSTEP]\nrw [Relations.formula₂, realize_rel, iff_eq_eq]\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn : ℕ\nφ ψ : Formula L α\nv : α → M\nR : Relations L 2\nt₁ t₂ : Term L α\n⊢ (RelMap R fun i => Term.realize v (Matrix.vecCons t₁ ![t₂] i)) = RelMap R ![Term.realize v t₁, Term.realize v t₂]\n[PROOFSTEP]\nrefine' congr rfl (funext (Fin.cases _ _))\n[GOAL]\ncase refine'_1\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn : ℕ\nφ ψ : Formula L α\nv : α → M\nR : Relations L 2\nt₁ t₂ : Term L α\n⊢ Term.realize v (Matrix.vecCons t₁ ![t₂] 0) = Matrix.vecCons (Term.realize v t₁) ![Term.realize v t₂] 0\n[PROOFSTEP]\nsimp only [Matrix.cons_val_zero]\n[GOAL]\ncase refine'_2\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn : ℕ\nφ ψ : Formula L α\nv : α → M\nR : Relations L 2\nt₁ t₂ : Term L α\n⊢ ∀ (i : Fin 1),\n    Term.realize v (Matrix.vecCons t₁ ![t₂] (succ i)) = Matrix.vecCons (Term.realize v t₁) ![Term.realize v t₂] (succ i)\n[PROOFSTEP]\nsimp only [Matrix.cons_val_succ, Matrix.cons_val_fin_one, forall_const]\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn : ℕ\nφ✝ ψ : Formula L α\nv✝ : α → M\nφ : Formula L α\ng : α → β\nv : β → M\n⊢ Realize (relabel g φ) v ↔ Realize φ (v ∘ g)\n[PROOFSTEP]\nrw [Realize, Realize, relabel, BoundedFormula.realize_relabel, iff_eq_eq, Fin.castAdd_zero]\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn : ℕ\nφ✝ ψ : Formula L α\nv✝ : α → M\nφ : Formula L α\ng : α → β\nv : β → M\n⊢ BoundedFormula.Realize φ (Sum.elim v (default ∘ Fin.cast (_ : 0 = 0)) ∘ Sum.inl ∘ g) (default ∘ natAdd 0) =\n    BoundedFormula.Realize φ (v ∘ g) default\n[PROOFSTEP]\nexact congr rfl (funext finZeroElim)\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn : ℕ\nφ✝ ψ : Formula L α\nv✝ : α → M\nφ : Formula L (Fin n)\nv : Empty → M\nx : Fin n → M\n⊢ BoundedFormula.Realize (BoundedFormula.relabel Sum.inr φ) v x ↔ Realize φ x\n[PROOFSTEP]\nrw [BoundedFormula.realize_relabel, Formula.Realize, Sum.elim_comp_inr, Fin.castAdd_zero, cast_refl,\n  Function.comp.right_id, Subsingleton.elim (x ∘ (natAdd n : Fin 0 → Fin n)) default]\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn : ℕ\nφ ψ : Formula L α\nv : α → M\nt₁ t₂ : Term L α\nx : α → M\n⊢ Realize (Term.equal t₁ t₂) x ↔ Term.realize x t₁ = Term.realize x t₂\n[PROOFSTEP]\nsimp [Term.equal, Realize]\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn : ℕ\nφ ψ : Formula L α\nv : α → M\nf : Functions L n\nx : Fin n → M\ny : M\n⊢ Realize (graph f) (cons y x) ↔ funMap f x = y\n[PROOFSTEP]\nsimp only [Formula.graph, Term.realize, realize_equal, Fin.cons_zero, Fin.cons_succ]\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn : ℕ\nφ ψ : Formula L α\nv : α → M\nf : Functions L n\nx : Fin n → M\ny : M\n⊢ (y = funMap f fun i => x i) ↔ funMap f x = y\n[PROOFSTEP]\nrw [eq_comm]\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝⁴ : Structure L M\ninst✝³ : Structure L N\ninst✝² : Structure L P\nα : Type u'\nβ : Type v'\nn : ℕ\ninst✝¹ : Structure L' M\nφ : L →ᴸ L'\ninst✝ : IsExpansionOn φ M\nψ : Formula L α\n⊢ setOf (Formula.Realize (onFormula φ ψ)) = setOf (Formula.Realize ψ)\n[PROOFSTEP]\next\n[GOAL]\ncase h\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝⁴ : Structure L M\ninst✝³ : Structure L N\ninst✝² : Structure L P\nα : Type u'\nβ : Type v'\nn : ℕ\ninst✝¹ : Structure L' M\nφ : L →ᴸ L'\ninst✝ : IsExpansionOn φ M\nψ : Formula L α\nx✝ : α → M\n⊢ x✝ ∈ setOf (Formula.Realize (onFormula φ ψ)) ↔ x✝ ∈ setOf (Formula.Realize ψ)\n[PROOFSTEP]\nsimp\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝⁴ : Structure L M\ninst✝³ : Structure L N\ninst✝² : Structure L P\nα : Type u'\nβ : Type v'\nn : ℕ\ninst✝¹ : Structure (L[[α]]) M\ninst✝ : LHom.IsExpansionOn (lhomWithConstants L α) M\nφ : Sentence (L[[α]])\n⊢ (Realize (↑equivSentence.symm φ) fun a => ↑(Language.con L a)) ↔ M ⊨ φ\n[PROOFSTEP]\nsimp only [equivSentence, Equiv.symm_symm, Equiv.coe_trans, Realize, BoundedFormula.realize_relabelEquiv, Function.comp]\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝⁴ : Structure L M\ninst✝³ : Structure L N\ninst✝² : Structure L P\nα : Type u'\nβ : Type v'\nn : ℕ\ninst✝¹ : Structure (L[[α]]) M\ninst✝ : LHom.IsExpansionOn (lhomWithConstants L α) M\nφ : Sentence (L[[α]])\n⊢ BoundedFormula.Realize (↑BoundedFormula.constantsVarsEquiv φ)\n      (fun x => ↑(Language.con L (↑(Equiv.sumEmpty α Empty) x))) default ↔\n    M ⊨ φ\n[PROOFSTEP]\nrefine' _root_.trans _ BoundedFormula.realize_constantsVarsEquiv\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝⁴ : Structure L M\ninst✝³ : Structure L N\ninst✝² : Structure L P\nα : Type u'\nβ : Type v'\nn : ℕ\ninst✝¹ : Structure (L[[α]]) M\ninst✝ : LHom.IsExpansionOn (lhomWithConstants L α) M\nφ : Sentence (L[[α]])\n⊢ BoundedFormula.Realize (↑BoundedFormula.constantsVarsEquiv φ)\n      (fun x => ↑(Language.con L (↑(Equiv.sumEmpty α Empty) x))) default ↔\n    BoundedFormula.Realize (↑BoundedFormula.constantsVarsEquiv φ) (Sum.elim (fun a => ↑(Language.con L a)) default)\n      default\n[PROOFSTEP]\nrw [iff_iff_eq]\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝⁴ : Structure L M\ninst✝³ : Structure L N\ninst✝² : Structure L P\nα : Type u'\nβ : Type v'\nn : ℕ\ninst✝¹ : Structure (L[[α]]) M\ninst✝ : LHom.IsExpansionOn (lhomWithConstants L α) M\nφ : Sentence (L[[α]])\n⊢ BoundedFormula.Realize (↑BoundedFormula.constantsVarsEquiv φ)\n      (fun x => ↑(Language.con L (↑(Equiv.sumEmpty α Empty) x))) default =\n    BoundedFormula.Realize (↑BoundedFormula.constantsVarsEquiv φ) (Sum.elim (fun a => ↑(Language.con L a)) default)\n      default\n[PROOFSTEP]\ncongr with (_ | a)\n[GOAL]\ncase e__v.h.inl\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝⁴ : Structure L M\ninst✝³ : Structure L N\ninst✝² : Structure L P\nα : Type u'\nβ : Type v'\nn : ℕ\ninst✝¹ : Structure (L[[α]]) M\ninst✝ : LHom.IsExpansionOn (lhomWithConstants L α) M\nφ : Sentence (L[[α]])\nval✝ : α\n⊢ ↑(Language.con L (↑(Equiv.sumEmpty α Empty) (Sum.inl val✝))) =\n    Sum.elim (fun a => ↑(Language.con L a)) default (Sum.inl val✝)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase e__v.h.inr\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝⁴ : Structure L M\ninst✝³ : Structure L N\ninst✝² : Structure L P\nα : Type u'\nβ : Type v'\nn : ℕ\ninst✝¹ : Structure (L[[α]]) M\ninst✝ : LHom.IsExpansionOn (lhomWithConstants L α) M\nφ : Sentence (L[[α]])\na : Empty\n⊢ ↑(Language.con L (↑(Equiv.sumEmpty α Empty) (Sum.inr a))) =\n    Sum.elim (fun a => ↑(Language.con L a)) default (Sum.inr a)\n[PROOFSTEP]\ncases a\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝⁴ : Structure L M\ninst✝³ : Structure L N\ninst✝² : Structure L P\nα : Type u'\nβ : Type v'\nn : ℕ\ninst✝¹ : Structure (L[[α]]) M\ninst✝ : LHom.IsExpansionOn (lhomWithConstants L α) M\nφ : Formula L α\n⊢ M ⊨ ↑equivSentence φ ↔ Realize φ fun a => ↑(Language.con L a)\n[PROOFSTEP]\nrw [← realize_equivSentence_symm_con M (equivSentence φ), _root_.Equiv.symm_apply_apply]\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn : ℕ\n⊢ M ≅[L] N ↔ ∀ (φ : Sentence L), M ⊨ φ ↔ N ⊨ φ\n[PROOFSTEP]\nsimp only [ElementarilyEquivalent, Set.ext_iff, completeTheory, Set.mem_setOf_eq]\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝⁴ : Structure L M\ninst✝³ : Structure L N\ninst✝² : Structure L P\nα : Type u'\nβ : Type v'\nn : ℕ\nT✝ : Theory L\ninst✝¹ : Structure L' M\nφ : L →ᴸ L'\ninst✝ : IsExpansionOn φ M\nT : Theory L\n⊢ M ⊨ onTheory φ T ↔ M ⊨ T\n[PROOFSTEP]\nsimp [Theory.model_iff, LHom.onTheory]\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn : ℕ\nT T' : Theory L\nh : M ⊨ T\nh' : M ⊨ T'\n⊢ M ⊨ T ∪ T'\n[PROOFSTEP]\nsimp only [model_iff, Set.mem_union] at *\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn : ℕ\nT T' : Theory L\nh : ∀ (φ : Sentence L), φ ∈ T → M ⊨ φ\nh' : ∀ (φ : Sentence L), φ ∈ T' → M ⊨ φ\n⊢ ∀ (φ : Sentence L), φ ∈ T ∨ φ ∈ T' → M ⊨ φ\n[PROOFSTEP]\nexact fun φ hφ => hφ.elim (h _) (h' _)\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn : ℕ\nT : Theory L\nφ : Sentence L\n⊢ M ⊨ {φ} ↔ M ⊨ φ\n[PROOFSTEP]\nsimp\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\nn : ℕ\nT : Theory L\ninst✝ : N ⊨ completeTheory L M\nφ : Sentence L\n⊢ N ⊨ φ ↔ M ⊨ φ\n[PROOFSTEP]\nrefine' ⟨fun h => _, (L.completeTheory M).realize_sentence_of_mem⟩\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\nn : ℕ\nT : Theory L\ninst✝ : N ⊨ completeTheory L M\nφ : Sentence L\nh : N ⊨ φ\n⊢ M ⊨ φ\n[PROOFSTEP]\ncontrapose! h\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\nn : ℕ\nT : Theory L\ninst✝ : N ⊨ completeTheory L M\nφ : Sentence L\nh : ¬M ⊨ φ\n⊢ ¬N ⊨ φ\n[PROOFSTEP]\nrw [← Sentence.realize_not] at *\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\nn : ℕ\nT : Theory L\ninst✝ : N ⊨ completeTheory L M\nφ : Sentence L\nh : M ⊨ Formula.not φ\n⊢ N ⊨ Formula.not φ\n[PROOFSTEP]\nexact (L.completeTheory M).realize_sentence_of_mem (mem_completeTheory.2 h)\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn : ℕ\nT : Theory L\nφ : BoundedFormula L α n\nv : α → M\n⊢ Formula.Realize (alls φ) v ↔ ∀ (xs : Fin n → M), Realize φ v xs\n[PROOFSTEP]\ninduction' n with n ih\n[GOAL]\ncase zero\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn : ℕ\nT : Theory L\nφ✝ : BoundedFormula L α n\nv : α → M\nφ : BoundedFormula L α Nat.zero\n⊢ Formula.Realize (alls φ) v ↔ ∀ (xs : Fin Nat.zero → M), Realize φ v xs\n[PROOFSTEP]\nexact Unique.forall_iff.symm\n[GOAL]\ncase succ\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn✝ : ℕ\nT : Theory L\nφ✝ : BoundedFormula L α n✝\nv : α → M\nn : ℕ\nih : ∀ {φ : BoundedFormula L α n}, Formula.Realize (alls φ) v ↔ ∀ (xs : Fin n → M), Realize φ v xs\nφ : BoundedFormula L α (Nat.succ n)\n⊢ Formula.Realize (alls φ) v ↔ ∀ (xs : Fin (Nat.succ n) → M), Realize φ v xs\n[PROOFSTEP]\nsimp only [alls, ih, Realize]\n[GOAL]\ncase succ\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn✝ : ℕ\nT : Theory L\nφ✝ : BoundedFormula L α n✝\nv : α → M\nn : ℕ\nih : ∀ {φ : BoundedFormula L α n}, Formula.Realize (alls φ) v ↔ ∀ (xs : Fin n → M), Realize φ v xs\nφ : BoundedFormula L α (Nat.succ n)\n⊢ (∀ (xs : Fin n → M) (x : M), Realize φ v (snoc xs x)) ↔ ∀ (xs : Fin (Nat.succ n) → M), Realize φ v xs\n[PROOFSTEP]\nexact ⟨fun h xs => Fin.snoc_init_self xs ▸ h _ _, fun h xs x => h (Fin.snoc xs x)⟩\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn : ℕ\nT : Theory L\nφ : BoundedFormula L α n\nv : α → M\n⊢ Formula.Realize (exs φ) v ↔ ∃ xs, Realize φ v xs\n[PROOFSTEP]\ninduction' n with n ih\n[GOAL]\ncase zero\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn : ℕ\nT : Theory L\nφ✝ : BoundedFormula L α n\nv : α → M\nφ : BoundedFormula L α Nat.zero\n⊢ Formula.Realize (exs φ) v ↔ ∃ xs, Realize φ v xs\n[PROOFSTEP]\nexact Unique.exists_iff.symm\n[GOAL]\ncase succ\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn✝ : ℕ\nT : Theory L\nφ✝ : BoundedFormula L α n✝\nv : α → M\nn : ℕ\nih : ∀ {φ : BoundedFormula L α n}, Formula.Realize (exs φ) v ↔ ∃ xs, Realize φ v xs\nφ : BoundedFormula L α (Nat.succ n)\n⊢ Formula.Realize (exs φ) v ↔ ∃ xs, Realize φ v xs\n[PROOFSTEP]\nsimp only [BoundedFormula.exs, ih, realize_ex]\n[GOAL]\ncase succ\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn✝ : ℕ\nT : Theory L\nφ✝ : BoundedFormula L α n✝\nv : α → M\nn : ℕ\nih : ∀ {φ : BoundedFormula L α n}, Formula.Realize (exs φ) v ↔ ∃ xs, Realize φ v xs\nφ : BoundedFormula L α (Nat.succ n)\n⊢ (∃ xs a, Realize φ v (snoc xs a)) ↔ ∃ xs, Realize φ v xs\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase succ.mp\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn✝ : ℕ\nT : Theory L\nφ✝ : BoundedFormula L α n✝\nv : α → M\nn : ℕ\nih : ∀ {φ : BoundedFormula L α n}, Formula.Realize (exs φ) v ↔ ∃ xs, Realize φ v xs\nφ : BoundedFormula L α (Nat.succ n)\n⊢ (∃ xs a, Realize φ v (snoc xs a)) → ∃ xs, Realize φ v xs\n[PROOFSTEP]\nrintro ⟨xs, x, h⟩\n[GOAL]\ncase succ.mp.intro.intro\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn✝ : ℕ\nT : Theory L\nφ✝ : BoundedFormula L α n✝\nv : α → M\nn : ℕ\nih : ∀ {φ : BoundedFormula L α n}, Formula.Realize (exs φ) v ↔ ∃ xs, Realize φ v xs\nφ : BoundedFormula L α (Nat.succ n)\nxs : Fin n → M\nx : M\nh : Realize φ v (snoc xs x)\n⊢ ∃ xs, Realize φ v xs\n[PROOFSTEP]\nexact ⟨_, h⟩\n[GOAL]\ncase succ.mpr\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn✝ : ℕ\nT : Theory L\nφ✝ : BoundedFormula L α n✝\nv : α → M\nn : ℕ\nih : ∀ {φ : BoundedFormula L α n}, Formula.Realize (exs φ) v ↔ ∃ xs, Realize φ v xs\nφ : BoundedFormula L α (Nat.succ n)\n⊢ (∃ xs, Realize φ v xs) → ∃ xs a, Realize φ v (snoc xs a)\n[PROOFSTEP]\nrintro ⟨xs, h⟩\n[GOAL]\ncase succ.mpr.intro\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn✝ : ℕ\nT : Theory L\nφ✝ : BoundedFormula L α n✝\nv : α → M\nn : ℕ\nih : ∀ {φ : BoundedFormula L α n}, Formula.Realize (exs φ) v ↔ ∃ xs, Realize φ v xs\nφ : BoundedFormula L α (Nat.succ n)\nxs : Fin (Nat.succ n) → M\nh : Realize φ v xs\n⊢ ∃ xs a, Realize φ v (snoc xs a)\n[PROOFSTEP]\nrw [← Fin.snoc_init_self xs] at h \n[GOAL]\ncase succ.mpr.intro\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn✝ : ℕ\nT : Theory L\nφ✝ : BoundedFormula L α n✝\nv : α → M\nn : ℕ\nih : ∀ {φ : BoundedFormula L α n}, Formula.Realize (exs φ) v ↔ ∃ xs, Realize φ v xs\nφ : BoundedFormula L α (Nat.succ n)\nxs : Fin (Nat.succ n) → M\nh : Realize φ v (snoc (init xs) (xs (last n)))\n⊢ ∃ xs a, Realize φ v (snoc xs a)\n[PROOFSTEP]\nexact ⟨_, _, h⟩\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn : ℕ\nT : Theory L\nφ : BoundedFormula L α n\nv : α ⊕ Fin n → M\n⊢ Formula.Realize (toFormula φ) v ↔ Realize φ (v ∘ Sum.inl) (v ∘ Sum.inr)\n[PROOFSTEP]\ninduction' φ with _ _ _ _ _ _ _ _ _ _ _ ih1 ih2 _ _ ih3 a8 a9 a0\n[GOAL]\ncase falsum\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn : ℕ\nT : Theory L\nv✝ : α ⊕ Fin n → M\nn✝ : ℕ\nv : α ⊕ Fin n✝ → M\n⊢ Formula.Realize (toFormula falsum) v ↔ Realize falsum (v ∘ Sum.inl) (v ∘ Sum.inr)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase equal\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn : ℕ\nT : Theory L\nv✝ : α ⊕ Fin n → M\nn✝ : ℕ\nt₁✝ t₂✝ : Term L (α ⊕ Fin n✝)\nv : α ⊕ Fin n✝ → M\n⊢ Formula.Realize (toFormula (equal t₁✝ t₂✝)) v ↔ Realize (equal t₁✝ t₂✝) (v ∘ Sum.inl) (v ∘ Sum.inr)\n[PROOFSTEP]\nsimp [BoundedFormula.Realize]\n[GOAL]\ncase rel\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn : ℕ\nT : Theory L\nv✝ : α ⊕ Fin n → M\nn✝ l✝ : ℕ\nR✝ : Relations L l✝\nts✝ : Fin l✝ → Term L (α ⊕ Fin n✝)\nv : α ⊕ Fin n✝ → M\n⊢ Formula.Realize (toFormula (rel R✝ ts✝)) v ↔ Realize (rel R✝ ts✝) (v ∘ Sum.inl) (v ∘ Sum.inr)\n[PROOFSTEP]\nsimp [BoundedFormula.Realize]\n[GOAL]\ncase imp\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn : ℕ\nT : Theory L\nv✝ : α ⊕ Fin n → M\nn✝ : ℕ\nf₁✝ f₂✝ : BoundedFormula L α n✝\nih1 : ∀ (v : α ⊕ Fin n✝ → M), Formula.Realize (toFormula f₁✝) v ↔ Realize f₁✝ (v ∘ Sum.inl) (v ∘ Sum.inr)\nih2 : ∀ (v : α ⊕ Fin n✝ → M), Formula.Realize (toFormula f₂✝) v ↔ Realize f₂✝ (v ∘ Sum.inl) (v ∘ Sum.inr)\nv : α ⊕ Fin n✝ → M\n⊢ Formula.Realize (toFormula (f₁✝ ⟹ f₂✝)) v ↔ Realize (f₁✝ ⟹ f₂✝) (v ∘ Sum.inl) (v ∘ Sum.inr)\n[PROOFSTEP]\nrw [toFormula, Formula.Realize, realize_imp, ← Formula.Realize, ih1, ← Formula.Realize, ih2, realize_imp]\n[GOAL]\ncase all\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn : ℕ\nT : Theory L\nv✝ : α ⊕ Fin n → M\nn✝ : ℕ\nf✝ : BoundedFormula L α (n✝ + 1)\nih3 : ∀ (v : α ⊕ Fin (n✝ + 1) → M), Formula.Realize (toFormula f✝) v ↔ Realize f✝ (v ∘ Sum.inl) (v ∘ Sum.inr)\nv : α ⊕ Fin n✝ → M\n⊢ Formula.Realize (toFormula (∀'f✝)) v ↔ Realize (∀'f✝) (v ∘ Sum.inl) (v ∘ Sum.inr)\n[PROOFSTEP]\nrw [toFormula, Formula.Realize, realize_all, realize_all]\n[GOAL]\ncase all\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn : ℕ\nT : Theory L\nv✝ : α ⊕ Fin n → M\nn✝ : ℕ\nf✝ : BoundedFormula L α (n✝ + 1)\nih3 : ∀ (v : α ⊕ Fin (n✝ + 1) → M), Formula.Realize (toFormula f✝) v ↔ Realize f✝ (v ∘ Sum.inl) (v ∘ Sum.inr)\nv : α ⊕ Fin n✝ → M\n⊢ (∀ (a : M),\n      Realize (relabel (Sum.elim (Sum.inl ∘ Sum.inl) (Sum.map Sum.inr id ∘ ↑finSumFinEquiv.symm)) (toFormula f✝)) v\n        (snoc default a)) ↔\n    ∀ (a : M), Realize f✝ (v ∘ Sum.inl) (snoc (v ∘ Sum.inr) a)\n[PROOFSTEP]\nrefine' forall_congr' fun a => _\n[GOAL]\ncase all\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn : ℕ\nT : Theory L\nv✝ : α ⊕ Fin n → M\nn✝ : ℕ\nf✝ : BoundedFormula L α (n✝ + 1)\nih3 : ∀ (v : α ⊕ Fin (n✝ + 1) → M), Formula.Realize (toFormula f✝) v ↔ Realize f✝ (v ∘ Sum.inl) (v ∘ Sum.inr)\nv : α ⊕ Fin n✝ → M\na : M\n⊢ Realize (relabel (Sum.elim (Sum.inl ∘ Sum.inl) (Sum.map Sum.inr id ∘ ↑finSumFinEquiv.symm)) (toFormula f✝)) v\n      (snoc default a) ↔\n    Realize f✝ (v ∘ Sum.inl) (snoc (v ∘ Sum.inr) a)\n[PROOFSTEP]\nhave h := ih3 (Sum.elim (v ∘ Sum.inl) (snoc (v ∘ Sum.inr) a))\n[GOAL]\ncase all\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn : ℕ\nT : Theory L\nv✝ : α ⊕ Fin n → M\nn✝ : ℕ\nf✝ : BoundedFormula L α (n✝ + 1)\nih3 : ∀ (v : α ⊕ Fin (n✝ + 1) → M), Formula.Realize (toFormula f✝) v ↔ Realize f✝ (v ∘ Sum.inl) (v ∘ Sum.inr)\nv : α ⊕ Fin n✝ → M\na : M\nh :\n  Formula.Realize (toFormula f✝) (Sum.elim (v ∘ Sum.inl) (snoc (v ∘ Sum.inr) a)) ↔\n    Realize f✝ (Sum.elim (v ∘ Sum.inl) (snoc (v ∘ Sum.inr) a) ∘ Sum.inl)\n      (Sum.elim (v ∘ Sum.inl) (snoc (v ∘ Sum.inr) a) ∘ Sum.inr)\n⊢ Realize (relabel (Sum.elim (Sum.inl ∘ Sum.inl) (Sum.map Sum.inr id ∘ ↑finSumFinEquiv.symm)) (toFormula f✝)) v\n      (snoc default a) ↔\n    Realize f✝ (v ∘ Sum.inl) (snoc (v ∘ Sum.inr) a)\n[PROOFSTEP]\nsimp only [Sum.elim_comp_inl, Sum.elim_comp_inr] at h \n[GOAL]\ncase all\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn : ℕ\nT : Theory L\nv✝ : α ⊕ Fin n → M\nn✝ : ℕ\nf✝ : BoundedFormula L α (n✝ + 1)\nih3 : ∀ (v : α ⊕ Fin (n✝ + 1) → M), Formula.Realize (toFormula f✝) v ↔ Realize f✝ (v ∘ Sum.inl) (v ∘ Sum.inr)\nv : α ⊕ Fin n✝ → M\na : M\nh :\n  Formula.Realize (toFormula f✝) (Sum.elim (v ∘ Sum.inl) (snoc (v ∘ Sum.inr) a)) ↔\n    Realize f✝ (v ∘ Sum.inl) (snoc (v ∘ Sum.inr) a)\n⊢ Realize (relabel (Sum.elim (Sum.inl ∘ Sum.inl) (Sum.map Sum.inr id ∘ ↑finSumFinEquiv.symm)) (toFormula f✝)) v\n      (snoc default a) ↔\n    Realize f✝ (v ∘ Sum.inl) (snoc (v ∘ Sum.inr) a)\n[PROOFSTEP]\nrw [← h, realize_relabel, Formula.Realize, iff_iff_eq]\n[GOAL]\ncase all\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn : ℕ\nT : Theory L\nv✝ : α ⊕ Fin n → M\nn✝ : ℕ\nf✝ : BoundedFormula L α (n✝ + 1)\nih3 : ∀ (v : α ⊕ Fin (n✝ + 1) → M), Formula.Realize (toFormula f✝) v ↔ Realize f✝ (v ∘ Sum.inl) (v ∘ Sum.inr)\nv : α ⊕ Fin n✝ → M\na : M\nh :\n  Formula.Realize (toFormula f✝) (Sum.elim (v ∘ Sum.inl) (snoc (v ∘ Sum.inr) a)) ↔\n    Realize f✝ (v ∘ Sum.inl) (snoc (v ∘ Sum.inr) a)\n⊢ Realize (toFormula f✝)\n      (Sum.elim v (snoc default a ∘ castAdd 0) ∘\n        Sum.elim (Sum.inl ∘ Sum.inl) (Sum.map Sum.inr id ∘ ↑finSumFinEquiv.symm))\n      (snoc default a ∘ natAdd 1) =\n    Realize (toFormula f✝) (Sum.elim (v ∘ Sum.inl) (snoc (v ∘ Sum.inr) a)) default\n[PROOFSTEP]\nsimp only [Function.comp]\n[GOAL]\ncase all\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn : ℕ\nT : Theory L\nv✝ : α ⊕ Fin n → M\nn✝ : ℕ\nf✝ : BoundedFormula L α (n✝ + 1)\nih3 : ∀ (v : α ⊕ Fin (n✝ + 1) → M), Formula.Realize (toFormula f✝) v ↔ Realize f✝ (v ∘ Sum.inl) (v ∘ Sum.inr)\nv : α ⊕ Fin n✝ → M\na : M\nh :\n  Formula.Realize (toFormula f✝) (Sum.elim (v ∘ Sum.inl) (snoc (v ∘ Sum.inr) a)) ↔\n    Realize f✝ (v ∘ Sum.inl) (snoc (v ∘ Sum.inr) a)\n⊢ (Realize (toFormula f✝)\n      (fun x =>\n        Sum.elim v (fun x => snoc default a (castAdd 0 x))\n          (Sum.elim (fun x => Sum.inl (Sum.inl x)) (fun x => Sum.map Sum.inr id (↑finSumFinEquiv.symm x)) x))\n      fun x => snoc default a (natAdd 1 x)) =\n    Realize (toFormula f✝) (Sum.elim (fun x => v (Sum.inl x)) (snoc (fun x => v (Sum.inr x)) a)) default\n[PROOFSTEP]\ncongr with x\n[GOAL]\ncase all.e__v.h\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn : ℕ\nT : Theory L\nv✝ : α ⊕ Fin n → M\nn✝ : ℕ\nf✝ : BoundedFormula L α (n✝ + 1)\nih3 : ∀ (v : α ⊕ Fin (n✝ + 1) → M), Formula.Realize (toFormula f✝) v ↔ Realize f✝ (v ∘ Sum.inl) (v ∘ Sum.inr)\nv : α ⊕ Fin n✝ → M\na : M\nh :\n  Formula.Realize (toFormula f✝) (Sum.elim (v ∘ Sum.inl) (snoc (v ∘ Sum.inr) a)) ↔\n    Realize f✝ (v ∘ Sum.inl) (snoc (v ∘ Sum.inr) a)\nx : α ⊕ Fin (n✝ + 1)\n⊢ Sum.elim v (fun x => snoc default a (castAdd 0 x))\n      (Sum.elim (fun x => Sum.inl (Sum.inl x)) (fun x => Sum.map Sum.inr id (↑finSumFinEquiv.symm x)) x) =\n    Sum.elim (fun x => v (Sum.inl x)) (snoc (fun x => v (Sum.inr x)) a) x\n[PROOFSTEP]\ncases' x with _ x\n[GOAL]\ncase all.e__v.h.inl\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn : ℕ\nT : Theory L\nv✝ : α ⊕ Fin n → M\nn✝ : ℕ\nf✝ : BoundedFormula L α (n✝ + 1)\nih3 : ∀ (v : α ⊕ Fin (n✝ + 1) → M), Formula.Realize (toFormula f✝) v ↔ Realize f✝ (v ∘ Sum.inl) (v ∘ Sum.inr)\nv : α ⊕ Fin n✝ → M\na : M\nh :\n  Formula.Realize (toFormula f✝) (Sum.elim (v ∘ Sum.inl) (snoc (v ∘ Sum.inr) a)) ↔\n    Realize f✝ (v ∘ Sum.inl) (snoc (v ∘ Sum.inr) a)\nval✝ : α\n⊢ Sum.elim v (fun x => snoc default a (castAdd 0 x))\n      (Sum.elim (fun x => Sum.inl (Sum.inl x)) (fun x => Sum.map Sum.inr id (↑finSumFinEquiv.symm x)) (Sum.inl val✝)) =\n    Sum.elim (fun x => v (Sum.inl x)) (snoc (fun x => v (Sum.inr x)) a) (Sum.inl val✝)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase all.e__v.h.inr\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn : ℕ\nT : Theory L\nv✝ : α ⊕ Fin n → M\nn✝ : ℕ\nf✝ : BoundedFormula L α (n✝ + 1)\nih3 : ∀ (v : α ⊕ Fin (n✝ + 1) → M), Formula.Realize (toFormula f✝) v ↔ Realize f✝ (v ∘ Sum.inl) (v ∘ Sum.inr)\nv : α ⊕ Fin n✝ → M\na : M\nh :\n  Formula.Realize (toFormula f✝) (Sum.elim (v ∘ Sum.inl) (snoc (v ∘ Sum.inr) a)) ↔\n    Realize f✝ (v ∘ Sum.inl) (snoc (v ∘ Sum.inr) a)\nx : Fin (n✝ + 1)\n⊢ Sum.elim v (fun x => snoc default a (castAdd 0 x))\n      (Sum.elim (fun x => Sum.inl (Sum.inl x)) (fun x => Sum.map Sum.inr id (↑finSumFinEquiv.symm x)) (Sum.inr x)) =\n    Sum.elim (fun x => v (Sum.inl x)) (snoc (fun x => v (Sum.inr x)) a) (Sum.inr x)\n[PROOFSTEP]\nrefine' Fin.lastCases _ _ x\n[GOAL]\ncase all.e__v.h.inr.refine'_1\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn : ℕ\nT : Theory L\nv✝ : α ⊕ Fin n → M\nn✝ : ℕ\nf✝ : BoundedFormula L α (n✝ + 1)\nih3 : ∀ (v : α ⊕ Fin (n✝ + 1) → M), Formula.Realize (toFormula f✝) v ↔ Realize f✝ (v ∘ Sum.inl) (v ∘ Sum.inr)\nv : α ⊕ Fin n✝ → M\na : M\nh :\n  Formula.Realize (toFormula f✝) (Sum.elim (v ∘ Sum.inl) (snoc (v ∘ Sum.inr) a)) ↔\n    Realize f✝ (v ∘ Sum.inl) (snoc (v ∘ Sum.inr) a)\nx : Fin (n✝ + 1)\n⊢ Sum.elim v (fun x => snoc default a (castAdd 0 x))\n      (Sum.elim (fun x => Sum.inl (Sum.inl x)) (fun x => Sum.map Sum.inr id (↑finSumFinEquiv.symm x))\n        (Sum.inr (last n✝))) =\n    Sum.elim (fun x => v (Sum.inl x)) (snoc (fun x => v (Sum.inr x)) a) (Sum.inr (last n✝))\n[PROOFSTEP]\nrw [Sum.elim_inr, Sum.elim_inr, finSumFinEquiv_symm_last, Sum.map_inr, Sum.elim_inr]\n[GOAL]\ncase all.e__v.h.inr.refine'_1\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn : ℕ\nT : Theory L\nv✝ : α ⊕ Fin n → M\nn✝ : ℕ\nf✝ : BoundedFormula L α (n✝ + 1)\nih3 : ∀ (v : α ⊕ Fin (n✝ + 1) → M), Formula.Realize (toFormula f✝) v ↔ Realize f✝ (v ∘ Sum.inl) (v ∘ Sum.inr)\nv : α ⊕ Fin n✝ → M\na : M\nh :\n  Formula.Realize (toFormula f✝) (Sum.elim (v ∘ Sum.inl) (snoc (v ∘ Sum.inr) a)) ↔\n    Realize f✝ (v ∘ Sum.inl) (snoc (v ∘ Sum.inr) a)\nx : Fin (n✝ + 1)\n⊢ snoc default a (castAdd 0 (id 0)) = snoc (fun x => v (Sum.inr x)) a (last n✝)\n[PROOFSTEP]\nsimp [Fin.snoc]\n[GOAL]\ncase all.e__v.h.inr.refine'_2\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn : ℕ\nT : Theory L\nv✝ : α ⊕ Fin n → M\nn✝ : ℕ\nf✝ : BoundedFormula L α (n✝ + 1)\nih3 : ∀ (v : α ⊕ Fin (n✝ + 1) → M), Formula.Realize (toFormula f✝) v ↔ Realize f✝ (v ∘ Sum.inl) (v ∘ Sum.inr)\nv : α ⊕ Fin n✝ → M\na : M\nh :\n  Formula.Realize (toFormula f✝) (Sum.elim (v ∘ Sum.inl) (snoc (v ∘ Sum.inr) a)) ↔\n    Realize f✝ (v ∘ Sum.inl) (snoc (v ∘ Sum.inr) a)\nx : Fin (n✝ + 1)\n⊢ ∀ (i : Fin n✝),\n    Sum.elim v (fun x => snoc default a (castAdd 0 x))\n        (Sum.elim (fun x => Sum.inl (Sum.inl x)) (fun x => Sum.map Sum.inr id (↑finSumFinEquiv.symm x))\n          (Sum.inr (castSucc i))) =\n      Sum.elim (fun x => v (Sum.inl x)) (snoc (fun x => v (Sum.inr x)) a) (Sum.inr (castSucc i))\n[PROOFSTEP]\nsimp only [castSucc, Function.comp_apply, Sum.elim_inr, finSumFinEquiv_symm_apply_castAdd, Sum.map_inl, Sum.elim_inl]\n[GOAL]\ncase all.e__v.h.inr.refine'_2\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn : ℕ\nT : Theory L\nv✝ : α ⊕ Fin n → M\nn✝ : ℕ\nf✝ : BoundedFormula L α (n✝ + 1)\nih3 : ∀ (v : α ⊕ Fin (n✝ + 1) → M), Formula.Realize (toFormula f✝) v ↔ Realize f✝ (v ∘ Sum.inl) (v ∘ Sum.inr)\nv : α ⊕ Fin n✝ → M\na : M\nh :\n  Formula.Realize (toFormula f✝) (Sum.elim (v ∘ Sum.inl) (snoc (v ∘ Sum.inr) a)) ↔\n    Realize f✝ (v ∘ Sum.inl) (snoc (v ∘ Sum.inr) a)\nx : Fin (n✝ + 1)\n⊢ ∀ (i : Fin n✝), v (Sum.inr i) = snoc (fun x => v (Sum.inr x)) a (castAdd 1 i)\n[PROOFSTEP]\nrw [← castSucc]\n[GOAL]\ncase all.e__v.h.inr.refine'_2\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn : ℕ\nT : Theory L\nv✝ : α ⊕ Fin n → M\nn✝ : ℕ\nf✝ : BoundedFormula L α (n✝ + 1)\nih3 : ∀ (v : α ⊕ Fin (n✝ + 1) → M), Formula.Realize (toFormula f✝) v ↔ Realize f✝ (v ∘ Sum.inl) (v ∘ Sum.inr)\nv : α ⊕ Fin n✝ → M\na : M\nh :\n  Formula.Realize (toFormula f✝) (Sum.elim (v ∘ Sum.inl) (snoc (v ∘ Sum.inr) a)) ↔\n    Realize f✝ (v ∘ Sum.inl) (snoc (v ∘ Sum.inr) a)\nx : Fin (n✝ + 1)\n⊢ ∀ (i : Fin n✝), v (Sum.inr i) = snoc (fun x => v (Sum.inr x)) a (castSucc i)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase all.e__xs.h\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn : ℕ\nT : Theory L\nv✝ : α ⊕ Fin n → M\nn✝ : ℕ\nf✝ : BoundedFormula L α (n✝ + 1)\nih3 : ∀ (v : α ⊕ Fin (n✝ + 1) → M), Formula.Realize (toFormula f✝) v ↔ Realize f✝ (v ∘ Sum.inl) (v ∘ Sum.inr)\nv : α ⊕ Fin n✝ → M\na : M\nh :\n  Formula.Realize (toFormula f✝) (Sum.elim (v ∘ Sum.inl) (snoc (v ∘ Sum.inr) a)) ↔\n    Realize f✝ (v ∘ Sum.inl) (snoc (v ∘ Sum.inr) a)\nx : Fin 0\n⊢ snoc default a (natAdd 1 x) = default x\n[PROOFSTEP]\nexact Fin.elim0 x\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn : ℕ\nT : Theory L\ng : M ≃[L] N\nφ : BoundedFormula L α n\nv : α → M\nxs : Fin n → M\n⊢ BoundedFormula.Realize φ (↑g ∘ v) (↑g ∘ xs) ↔ BoundedFormula.Realize φ v xs\n[PROOFSTEP]\ninduction' φ with _ _ _ _ _ _ _ _ _ _ _ ih1 ih2 _ _ ih3\n[GOAL]\ncase falsum\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn : ℕ\nT : Theory L\ng : M ≃[L] N\nv : α → M\nxs✝ : Fin n → M\nn✝ : ℕ\nxs : Fin n✝ → M\n⊢ BoundedFormula.Realize BoundedFormula.falsum (↑g ∘ v) (↑g ∘ xs) ↔ BoundedFormula.Realize BoundedFormula.falsum v xs\n[PROOFSTEP]\nrfl\n[GOAL]\ncase equal\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn : ℕ\nT : Theory L\ng : M ≃[L] N\nv : α → M\nxs✝ : Fin n → M\nn✝ : ℕ\nt₁✝ t₂✝ : Term L (α ⊕ Fin n✝)\nxs : Fin n✝ → M\n⊢ BoundedFormula.Realize (BoundedFormula.equal t₁✝ t₂✝) (↑g ∘ v) (↑g ∘ xs) ↔\n    BoundedFormula.Realize (BoundedFormula.equal t₁✝ t₂✝) v xs\n[PROOFSTEP]\nsimp only [BoundedFormula.Realize, ← Sum.comp_elim, Equiv.realize_term, g.injective.eq_iff]\n[GOAL]\ncase rel\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn : ℕ\nT : Theory L\ng : M ≃[L] N\nv : α → M\nxs✝ : Fin n → M\nn✝ l✝ : ℕ\nR✝ : Relations L l✝\nts✝ : Fin l✝ → Term L (α ⊕ Fin n✝)\nxs : Fin n✝ → M\n⊢ BoundedFormula.Realize (BoundedFormula.rel R✝ ts✝) (↑g ∘ v) (↑g ∘ xs) ↔\n    BoundedFormula.Realize (BoundedFormula.rel R✝ ts✝) v xs\n[PROOFSTEP]\nsimp only [BoundedFormula.Realize, ← Sum.comp_elim, Equiv.realize_term]\n[GOAL]\ncase rel\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn : ℕ\nT : Theory L\ng : M ≃[L] N\nv : α → M\nxs✝ : Fin n → M\nn✝ l✝ : ℕ\nR✝ : Relations L l✝\nts✝ : Fin l✝ → Term L (α ⊕ Fin n✝)\nxs : Fin n✝ → M\n⊢ (RelMap R✝ fun i => ↑g (Term.realize (Sum.elim v xs) (ts✝ i))) ↔\n    RelMap R✝ fun i => Term.realize (Sum.elim v xs) (ts✝ i)\n[PROOFSTEP]\nexact g.map_rel _ _\n[GOAL]\ncase imp\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn : ℕ\nT : Theory L\ng : M ≃[L] N\nv : α → M\nxs✝ : Fin n → M\nn✝ : ℕ\nf₁✝ f₂✝ : BoundedFormula L α n✝\nih1 : ∀ {xs : Fin n✝ → M}, BoundedFormula.Realize f₁✝ (↑g ∘ v) (↑g ∘ xs) ↔ BoundedFormula.Realize f₁✝ v xs\nih2 : ∀ {xs : Fin n✝ → M}, BoundedFormula.Realize f₂✝ (↑g ∘ v) (↑g ∘ xs) ↔ BoundedFormula.Realize f₂✝ v xs\nxs : Fin n✝ → M\n⊢ BoundedFormula.Realize (f₁✝ ⟹ f₂✝) (↑g ∘ v) (↑g ∘ xs) ↔ BoundedFormula.Realize (f₁✝ ⟹ f₂✝) v xs\n[PROOFSTEP]\nrw [BoundedFormula.Realize, ih1, ih2, BoundedFormula.Realize]\n[GOAL]\ncase all\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn : ℕ\nT : Theory L\ng : M ≃[L] N\nv : α → M\nxs✝ : Fin n → M\nn✝ : ℕ\nf✝ : BoundedFormula L α (n✝ + 1)\nih3 : ∀ {xs : Fin (n✝ + 1) → M}, BoundedFormula.Realize f✝ (↑g ∘ v) (↑g ∘ xs) ↔ BoundedFormula.Realize f✝ v xs\nxs : Fin n✝ → M\n⊢ BoundedFormula.Realize (∀'f✝) (↑g ∘ v) (↑g ∘ xs) ↔ BoundedFormula.Realize (∀'f✝) v xs\n[PROOFSTEP]\nrw [BoundedFormula.Realize, BoundedFormula.Realize]\n[GOAL]\ncase all\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn : ℕ\nT : Theory L\ng : M ≃[L] N\nv : α → M\nxs✝ : Fin n → M\nn✝ : ℕ\nf✝ : BoundedFormula L α (n✝ + 1)\nih3 : ∀ {xs : Fin (n✝ + 1) → M}, BoundedFormula.Realize f✝ (↑g ∘ v) (↑g ∘ xs) ↔ BoundedFormula.Realize f✝ v xs\nxs : Fin n✝ → M\n⊢ (∀ (x : N), BoundedFormula.Realize f✝ (↑g ∘ v) (snoc (↑g ∘ xs) x)) ↔\n    ∀ (x : M), BoundedFormula.Realize f✝ v (snoc xs x)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase all.mp\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn : ℕ\nT : Theory L\ng : M ≃[L] N\nv : α → M\nxs✝ : Fin n → M\nn✝ : ℕ\nf✝ : BoundedFormula L α (n✝ + 1)\nih3 : ∀ {xs : Fin (n✝ + 1) → M}, BoundedFormula.Realize f✝ (↑g ∘ v) (↑g ∘ xs) ↔ BoundedFormula.Realize f✝ v xs\nxs : Fin n✝ → M\n⊢ (∀ (x : N), BoundedFormula.Realize f✝ (↑g ∘ v) (snoc (↑g ∘ xs) x)) →\n    ∀ (x : M), BoundedFormula.Realize f✝ v (snoc xs x)\n[PROOFSTEP]\nintro h a\n[GOAL]\ncase all.mp\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn : ℕ\nT : Theory L\ng : M ≃[L] N\nv : α → M\nxs✝ : Fin n → M\nn✝ : ℕ\nf✝ : BoundedFormula L α (n✝ + 1)\nih3 : ∀ {xs : Fin (n✝ + 1) → M}, BoundedFormula.Realize f✝ (↑g ∘ v) (↑g ∘ xs) ↔ BoundedFormula.Realize f✝ v xs\nxs : Fin n✝ → M\nh : ∀ (x : N), BoundedFormula.Realize f✝ (↑g ∘ v) (snoc (↑g ∘ xs) x)\na : M\n⊢ BoundedFormula.Realize f✝ v (snoc xs a)\n[PROOFSTEP]\nhave h' := h (g a)\n[GOAL]\ncase all.mp\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn : ℕ\nT : Theory L\ng : M ≃[L] N\nv : α → M\nxs✝ : Fin n → M\nn✝ : ℕ\nf✝ : BoundedFormula L α (n✝ + 1)\nih3 : ∀ {xs : Fin (n✝ + 1) → M}, BoundedFormula.Realize f✝ (↑g ∘ v) (↑g ∘ xs) ↔ BoundedFormula.Realize f✝ v xs\nxs : Fin n✝ → M\nh : ∀ (x : N), BoundedFormula.Realize f✝ (↑g ∘ v) (snoc (↑g ∘ xs) x)\na : M\nh' : BoundedFormula.Realize f✝ (↑g ∘ v) (snoc (↑g ∘ xs) (↑g a))\n⊢ BoundedFormula.Realize f✝ v (snoc xs a)\n[PROOFSTEP]\nrw [← Fin.comp_snoc, ih3] at h' \n[GOAL]\ncase all.mp\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn : ℕ\nT : Theory L\ng : M ≃[L] N\nv : α → M\nxs✝ : Fin n → M\nn✝ : ℕ\nf✝ : BoundedFormula L α (n✝ + 1)\nih3 : ∀ {xs : Fin (n✝ + 1) → M}, BoundedFormula.Realize f✝ (↑g ∘ v) (↑g ∘ xs) ↔ BoundedFormula.Realize f✝ v xs\nxs : Fin n✝ → M\nh : ∀ (x : N), BoundedFormula.Realize f✝ (↑g ∘ v) (snoc (↑g ∘ xs) x)\na : M\nh' : BoundedFormula.Realize f✝ v (snoc xs a)\n⊢ BoundedFormula.Realize f✝ v (snoc xs a)\n[PROOFSTEP]\nexact h'\n[GOAL]\ncase all.mpr\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn : ℕ\nT : Theory L\ng : M ≃[L] N\nv : α → M\nxs✝ : Fin n → M\nn✝ : ℕ\nf✝ : BoundedFormula L α (n✝ + 1)\nih3 : ∀ {xs : Fin (n✝ + 1) → M}, BoundedFormula.Realize f✝ (↑g ∘ v) (↑g ∘ xs) ↔ BoundedFormula.Realize f✝ v xs\nxs : Fin n✝ → M\n⊢ (∀ (x : M), BoundedFormula.Realize f✝ v (snoc xs x)) →\n    ∀ (x : N), BoundedFormula.Realize f✝ (↑g ∘ v) (snoc (↑g ∘ xs) x)\n[PROOFSTEP]\nintro h a\n[GOAL]\ncase all.mpr\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn : ℕ\nT : Theory L\ng : M ≃[L] N\nv : α → M\nxs✝ : Fin n → M\nn✝ : ℕ\nf✝ : BoundedFormula L α (n✝ + 1)\nih3 : ∀ {xs : Fin (n✝ + 1) → M}, BoundedFormula.Realize f✝ (↑g ∘ v) (↑g ∘ xs) ↔ BoundedFormula.Realize f✝ v xs\nxs : Fin n✝ → M\nh : ∀ (x : M), BoundedFormula.Realize f✝ v (snoc xs x)\na : N\n⊢ BoundedFormula.Realize f✝ (↑g ∘ v) (snoc (↑g ∘ xs) a)\n[PROOFSTEP]\nhave h' := h (g.symm a)\n[GOAL]\ncase all.mpr\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn : ℕ\nT : Theory L\ng : M ≃[L] N\nv : α → M\nxs✝ : Fin n → M\nn✝ : ℕ\nf✝ : BoundedFormula L α (n✝ + 1)\nih3 : ∀ {xs : Fin (n✝ + 1) → M}, BoundedFormula.Realize f✝ (↑g ∘ v) (↑g ∘ xs) ↔ BoundedFormula.Realize f✝ v xs\nxs : Fin n✝ → M\nh : ∀ (x : M), BoundedFormula.Realize f✝ v (snoc xs x)\na : N\nh' : BoundedFormula.Realize f✝ v (snoc xs (↑(symm g) a))\n⊢ BoundedFormula.Realize f✝ (↑g ∘ v) (snoc (↑g ∘ xs) a)\n[PROOFSTEP]\nrw [← ih3, Fin.comp_snoc, g.apply_symm_apply] at h' \n[GOAL]\ncase all.mpr\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn : ℕ\nT : Theory L\ng : M ≃[L] N\nv : α → M\nxs✝ : Fin n → M\nn✝ : ℕ\nf✝ : BoundedFormula L α (n✝ + 1)\nih3 : ∀ {xs : Fin (n✝ + 1) → M}, BoundedFormula.Realize f✝ (↑g ∘ v) (↑g ∘ xs) ↔ BoundedFormula.Realize f✝ v xs\nxs : Fin n✝ → M\nh : ∀ (x : M), BoundedFormula.Realize f✝ v (snoc xs x)\na : N\nh' : BoundedFormula.Realize f✝ (↑g ∘ v) (snoc (↑g ∘ xs) a)\n⊢ BoundedFormula.Realize f✝ (↑g ∘ v) (snoc (↑g ∘ xs) a)\n[PROOFSTEP]\nexact h'\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn : ℕ\nT : Theory L\ng : M ≃[L] N\nφ : Formula L α\nv : α → M\n⊢ Formula.Realize φ (↑g ∘ v) ↔ Formula.Realize φ v\n[PROOFSTEP]\nrw [Formula.Realize, Formula.Realize, ← g.realize_boundedFormula φ, iff_eq_eq, Unique.eq_default (g ∘ default)]\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn : ℕ\nT : Theory L\ng : M ≃[L] N\nφ : Sentence L\n⊢ M ⊨ φ ↔ N ⊨ φ\n[PROOFSTEP]\nrw [Sentence.Realize, Sentence.Realize, ← g.realize_formula, Unique.eq_default (g ∘ default)]\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn✝ : ℕ\nT : Theory L\nn : ℕ\n⊢ M ⊨ Sentence.cardGe L n ↔ ↑n ≤ #M\n[PROOFSTEP]\nrw [← lift_mk_fin, ← lift_le.{0}, lift_lift, lift_mk_le, Sentence.cardGe, Sentence.Realize, BoundedFormula.realize_exs]\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn✝ : ℕ\nT : Theory L\nn : ℕ\n⊢ (∃ xs,\n      BoundedFormula.Realize\n        (List.foldr (fun x x_1 => x ⊓ x_1) ⊤\n          (List.map (fun ij => ∼((var ∘ Sum.inr) ij.fst =' (var ∘ Sum.inr) ij.snd))\n            (List.filter (fun ij => decide (ij.fst ≠ ij.snd)) (List.finRange n ×ˢ List.finRange n))))\n        default xs) ↔\n    Nonempty (Fin n ↪ M)\n[PROOFSTEP]\nsimp_rw [BoundedFormula.realize_foldr_inf]\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn✝ : ℕ\nT : Theory L\nn : ℕ\n⊢ (∃ xs,\n      ∀ (φ : BoundedFormula L Empty n),\n        φ ∈\n            List.map (fun ij => ∼((var ∘ Sum.inr) ij.fst =' (var ∘ Sum.inr) ij.snd))\n              (List.filter (fun ij => decide (ij.fst ≠ ij.snd)) (List.finRange n ×ˢ List.finRange n)) →\n          BoundedFormula.Realize φ default xs) ↔\n    Nonempty (Fin n ↪ M)\n[PROOFSTEP]\nsimp only [Function.comp_apply, List.mem_map, Prod.exists, Ne.def, List.mem_product, List.mem_finRange,\n  forall_exists_index, and_imp, List.mem_filter, true_and_iff]\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn✝ : ℕ\nT : Theory L\nn : ℕ\n⊢ (∃ xs,\n      ∀ (φ : BoundedFormula L Empty n) (x x_1 : Fin n),\n        (decide ¬x = x_1) = true → ∼(var (Sum.inr x) =' var (Sum.inr x_1)) = φ → BoundedFormula.Realize φ default xs) ↔\n    Nonempty (Fin n ↪ M)\n[PROOFSTEP]\nrefine' ⟨_, fun xs => ⟨xs.some, _⟩⟩\n[GOAL]\ncase refine'_1\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn✝ : ℕ\nT : Theory L\nn : ℕ\n⊢ (∃ xs,\n      ∀ (φ : BoundedFormula L Empty n) (x x_1 : Fin n),\n        (decide ¬x = x_1) = true → ∼(var (Sum.inr x) =' var (Sum.inr x_1)) = φ → BoundedFormula.Realize φ default xs) →\n    Nonempty (Fin n ↪ M)\n[PROOFSTEP]\nrintro ⟨xs, h⟩\n[GOAL]\ncase refine'_1.intro\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn✝ : ℕ\nT : Theory L\nn : ℕ\nxs : Fin n → M\nh :\n  ∀ (φ : BoundedFormula L Empty n) (x x_1 : Fin n),\n    (decide ¬x = x_1) = true → ∼(var (Sum.inr x) =' var (Sum.inr x_1)) = φ → BoundedFormula.Realize φ default xs\n⊢ Nonempty (Fin n ↪ M)\n[PROOFSTEP]\nrefine' ⟨⟨xs, fun i j ij => _⟩⟩\n[GOAL]\ncase refine'_1.intro\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn✝ : ℕ\nT : Theory L\nn : ℕ\nxs : Fin n → M\nh :\n  ∀ (φ : BoundedFormula L Empty n) (x x_1 : Fin n),\n    (decide ¬x = x_1) = true → ∼(var (Sum.inr x) =' var (Sum.inr x_1)) = φ → BoundedFormula.Realize φ default xs\ni j : Fin n\nij : xs i = xs j\n⊢ i = j\n[PROOFSTEP]\ncontrapose! ij\n[GOAL]\ncase refine'_1.intro\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn✝ : ℕ\nT : Theory L\nn : ℕ\nxs : Fin n → M\nh :\n  ∀ (φ : BoundedFormula L Empty n) (x x_1 : Fin n),\n    (decide ¬x = x_1) = true → ∼(var (Sum.inr x) =' var (Sum.inr x_1)) = φ → BoundedFormula.Realize φ default xs\ni j : Fin n\nij : i ≠ j\n⊢ xs i ≠ xs j\n[PROOFSTEP]\nhave hij := h _ i j (by simpa using ij) rfl\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn✝ : ℕ\nT : Theory L\nn : ℕ\nxs : Fin n → M\nh :\n  ∀ (φ : BoundedFormula L Empty n) (x x_1 : Fin n),\n    (decide ¬x = x_1) = true → ∼(var (Sum.inr x) =' var (Sum.inr x_1)) = φ → BoundedFormula.Realize φ default xs\ni j : Fin n\nij : i ≠ j\n⊢ (decide ¬i = j) = true\n[PROOFSTEP]\nsimpa using ij\n[GOAL]\ncase refine'_1.intro\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn✝ : ℕ\nT : Theory L\nn : ℕ\nxs : Fin n → M\nh :\n  ∀ (φ : BoundedFormula L Empty n) (x x_1 : Fin n),\n    (decide ¬x = x_1) = true → ∼(var (Sum.inr x) =' var (Sum.inr x_1)) = φ → BoundedFormula.Realize φ default xs\ni j : Fin n\nij : i ≠ j\nhij : BoundedFormula.Realize (∼(var (Sum.inr i) =' var (Sum.inr j))) default xs\n⊢ xs i ≠ xs j\n[PROOFSTEP]\nsimp only [BoundedFormula.realize_not, Term.realize, BoundedFormula.realize_bdEqual, Sum.elim_inr] at hij \n[GOAL]\ncase refine'_1.intro\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn✝ : ℕ\nT : Theory L\nn : ℕ\nxs : Fin n → M\nh :\n  ∀ (φ : BoundedFormula L Empty n) (x x_1 : Fin n),\n    (decide ¬x = x_1) = true → ∼(var (Sum.inr x) =' var (Sum.inr x_1)) = φ → BoundedFormula.Realize φ default xs\ni j : Fin n\nij : i ≠ j\nhij : ¬xs i = xs j\n⊢ xs i ≠ xs j\n[PROOFSTEP]\nexact hij\n[GOAL]\ncase refine'_2\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn✝ : ℕ\nT : Theory L\nn : ℕ\nxs : Nonempty (Fin n ↪ M)\n⊢ ∀ (φ : BoundedFormula L Empty n) (x x_1 : Fin n),\n    (decide ¬x = x_1) = true →\n      ∼(var (Sum.inr x) =' var (Sum.inr x_1)) = φ → BoundedFormula.Realize φ default ↑(Nonempty.some xs)\n[PROOFSTEP]\nrintro _ i j ij rfl\n[GOAL]\ncase refine'_2\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn✝ : ℕ\nT : Theory L\nn : ℕ\nxs : Nonempty (Fin n ↪ M)\ni j : Fin n\nij : (decide ¬i = j) = true\n⊢ BoundedFormula.Realize (∼(var (Sum.inr i) =' var (Sum.inr j))) default ↑(Nonempty.some xs)\n[PROOFSTEP]\nsimpa using ij\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn : ℕ\nT : Theory L\n⊢ M ⊨ infiniteTheory L ↔ Infinite M\n[PROOFSTEP]\nsimp [infiniteTheory, infinite_iff, aleph0_le]\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn : ℕ\nT : Theory L\n⊢ M ⊨ nonemptyTheory L ↔ Nonempty M\n[PROOFSTEP]\nsimp only [nonemptyTheory, Theory.model_iff, Set.mem_singleton_iff, forall_eq, Sentence.realize_cardGe, Nat.cast_one,\n  one_le_iff_ne_zero, mk_ne_zero_iff]\n[GOAL]\nL : Language\nL' : Language\nM✝ : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M✝\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\nn : ℕ\nT : Theory L\nM : Type w\ninst✝ : Structure (L[[α]]) M\ns : Set α\n⊢ M ⊨ distinctConstantsTheory L s ↔ Set.InjOn (fun i => ↑(Language.con L i)) s\n[PROOFSTEP]\nsimp only [distinctConstantsTheory, Theory.model_iff, Set.mem_image, Set.mem_inter, Set.mem_prod, Set.mem_compl,\n  Prod.exists, forall_exists_index, and_imp]\n[GOAL]\nL : Language\nL' : Language\nM✝ : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M✝\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\nn : ℕ\nT : Theory L\nM : Type w\ninst✝ : Structure (L[[α]]) M\ns : Set α\n⊢ (∀ (φ : Sentence (L[[α]])) (x x_1 : α),\n      (x, x_1) ∈ s ×ˢ s ∩ (Set.diagonal α)ᶜ →\n        Formula.not (Term.equal (Constants.term (Language.con L x)) (Constants.term (Language.con L x_1))) = φ →\n          M ⊨ φ) ↔\n    Set.InjOn (fun i => ↑(Language.con L i)) s\n[PROOFSTEP]\nrefine' ⟨fun h a as b bs ab => _, _⟩\n[GOAL]\ncase refine'_1\nL : Language\nL' : Language\nM✝ : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M✝\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\nn : ℕ\nT : Theory L\nM : Type w\ninst✝ : Structure (L[[α]]) M\ns : Set α\nh :\n  ∀ (φ : Sentence (L[[α]])) (x x_1 : α),\n    (x, x_1) ∈ s ×ˢ s ∩ (Set.diagonal α)ᶜ →\n      Formula.not (Term.equal (Constants.term (Language.con L x)) (Constants.term (Language.con L x_1))) = φ → M ⊨ φ\na : α\nas : a ∈ s\nb : α\nbs : b ∈ s\nab : (fun i => ↑(Language.con L i)) a = (fun i => ↑(Language.con L i)) b\n⊢ a = b\n[PROOFSTEP]\ncontrapose! ab\n[GOAL]\ncase refine'_1\nL : Language\nL' : Language\nM✝ : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M✝\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\nn : ℕ\nT : Theory L\nM : Type w\ninst✝ : Structure (L[[α]]) M\ns : Set α\nh :\n  ∀ (φ : Sentence (L[[α]])) (x x_1 : α),\n    (x, x_1) ∈ s ×ˢ s ∩ (Set.diagonal α)ᶜ →\n      Formula.not (Term.equal (Constants.term (Language.con L x)) (Constants.term (Language.con L x_1))) = φ → M ⊨ φ\na : α\nas : a ∈ s\nb : α\nbs : b ∈ s\nab : a ≠ b\n⊢ ↑(Language.con L a) ≠ ↑(Language.con L b)\n[PROOFSTEP]\nhave h' := h _ a b ⟨⟨as, bs⟩, ab⟩ rfl\n[GOAL]\ncase refine'_1\nL : Language\nL' : Language\nM✝ : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M✝\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\nn : ℕ\nT : Theory L\nM : Type w\ninst✝ : Structure (L[[α]]) M\ns : Set α\nh :\n  ∀ (φ : Sentence (L[[α]])) (x x_1 : α),\n    (x, x_1) ∈ s ×ˢ s ∩ (Set.diagonal α)ᶜ →\n      Formula.not (Term.equal (Constants.term (Language.con L x)) (Constants.term (Language.con L x_1))) = φ → M ⊨ φ\na : α\nas : a ∈ s\nb : α\nbs : b ∈ s\nab : a ≠ b\nh' : M ⊨ Formula.not (Term.equal (Constants.term (Language.con L a)) (Constants.term (Language.con L b)))\n⊢ ↑(Language.con L a) ≠ ↑(Language.con L b)\n[PROOFSTEP]\nsimp only [Sentence.Realize, Formula.realize_not, Formula.realize_equal, Term.realize_constants] at h' \n[GOAL]\ncase refine'_1\nL : Language\nL' : Language\nM✝ : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M✝\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\nn : ℕ\nT : Theory L\nM : Type w\ninst✝ : Structure (L[[α]]) M\ns : Set α\nh :\n  ∀ (φ : Sentence (L[[α]])) (x x_1 : α),\n    (x, x_1) ∈ s ×ˢ s ∩ (Set.diagonal α)ᶜ →\n      Formula.not (Term.equal (Constants.term (Language.con L x)) (Constants.term (Language.con L x_1))) = φ → M ⊨ φ\na : α\nas : a ∈ s\nb : α\nbs : b ∈ s\nab : a ≠ b\nh' : ¬↑(Language.con L a) = ↑(Language.con L b)\n⊢ ↑(Language.con L a) ≠ ↑(Language.con L b)\n[PROOFSTEP]\nexact h'\n[GOAL]\ncase refine'_2\nL : Language\nL' : Language\nM✝ : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M✝\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\nn : ℕ\nT : Theory L\nM : Type w\ninst✝ : Structure (L[[α]]) M\ns : Set α\n⊢ Set.InjOn (fun i => ↑(Language.con L i)) s →\n    ∀ (φ : Sentence (L[[α]])) (x x_1 : α),\n      (x, x_1) ∈ s ×ˢ s ∩ (Set.diagonal α)ᶜ →\n        Formula.not (Term.equal (Constants.term (Language.con L x)) (Constants.term (Language.con L x_1))) = φ → M ⊨ φ\n[PROOFSTEP]\nrintro h φ a b ⟨⟨as, bs⟩, ab⟩ rfl\n[GOAL]\ncase refine'_2.intro.intro\nL : Language\nL' : Language\nM✝ : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M✝\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\nn : ℕ\nT : Theory L\nM : Type w\ninst✝ : Structure (L[[α]]) M\ns : Set α\nh : Set.InjOn (fun i => ↑(Language.con L i)) s\na b : α\nab : (a, b) ∈ (Set.diagonal α)ᶜ\nas : (a, b).fst ∈ s\nbs : (a, b).snd ∈ s\n⊢ M ⊨ Formula.not (Term.equal (Constants.term (Language.con L a)) (Constants.term (Language.con L b)))\n[PROOFSTEP]\nsimp only [Sentence.Realize, Formula.realize_not, Formula.realize_equal, Term.realize_constants]\n[GOAL]\ncase refine'_2.intro.intro\nL : Language\nL' : Language\nM✝ : Type w\nN : Type u_1\nP : Type u_2\ninst✝³ : Structure L M✝\ninst✝² : Structure L N\ninst✝¹ : Structure L P\nα : Type u'\nβ : Type v'\nn : ℕ\nT : Theory L\nM : Type w\ninst✝ : Structure (L[[α]]) M\ns : Set α\nh : Set.InjOn (fun i => ↑(Language.con L i)) s\na b : α\nab : (a, b) ∈ (Set.diagonal α)ᶜ\nas : (a, b).fst ∈ s\nbs : (a, b).snd ∈ s\n⊢ ¬↑(Language.con L a) = ↑(Language.con L b)\n[PROOFSTEP]\nexact fun contra => ab (h as bs contra)\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nn : ℕ\nT : Theory L\nh : M ≅[L] N\n⊢ M ⊨ T ↔ N ⊨ T\n[PROOFSTEP]\nrw [Theory.model_iff_subset_completeTheory, Theory.model_iff_subset_completeTheory, h.completeTheory_eq]\n", "meta": {"mathlib_filename": "Mathlib.ModelTheory.Semantics", "llama_tokens": 97807, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7799928900257126, "lm_q2_score": 0.689305616785446, "lm_q1q2_score": 0.5376534801474364}}
{"text": "[GOAL]\na✝ b✝ : ℤ\nn : ℕ\na b : ℤ\n⊢ natAbs a = natAbs b ↔ a * a = b * b\n[PROOFSTEP]\nrw [← abs_eq_iff_mul_self_eq, abs_eq_natAbs, abs_eq_natAbs]\n[GOAL]\na✝ b✝ : ℤ\nn : ℕ\na b : ℤ\n⊢ natAbs a = natAbs b ↔ ↑(natAbs a) = ↑(natAbs b)\n[PROOFSTEP]\nexact Int.coe_nat_inj'.symm\n[GOAL]\na✝ b✝ : ℤ\nn : ℕ\na b : ℤ\n⊢ natAbs a < natAbs b ↔ a * a < b * b\n[PROOFSTEP]\nrw [← abs_lt_iff_mul_self_lt, abs_eq_natAbs, abs_eq_natAbs]\n[GOAL]\na✝ b✝ : ℤ\nn : ℕ\na b : ℤ\n⊢ natAbs a < natAbs b ↔ ↑(natAbs a) < ↑(natAbs b)\n[PROOFSTEP]\nexact Int.ofNat_lt.symm\n[GOAL]\na✝ b✝ : ℤ\nn : ℕ\na b : ℤ\n⊢ natAbs a ≤ natAbs b ↔ a * a ≤ b * b\n[PROOFSTEP]\nrw [← abs_le_iff_mul_self_le, abs_eq_natAbs, abs_eq_natAbs]\n[GOAL]\na✝ b✝ : ℤ\nn : ℕ\na b : ℤ\n⊢ natAbs a ≤ natAbs b ↔ ↑(natAbs a) ≤ ↑(natAbs b)\n[PROOFSTEP]\nexact Int.ofNat_le.symm\n[GOAL]\na✝ b✝ : ℤ\nn : ℕ\na b c : ℤ\nh : a * b ∣ c\n⊢ b ∣ c / a\n[PROOFSTEP]\nrcases eq_or_ne a 0 with (rfl | ha)\n[GOAL]\ncase inl\na b✝ : ℤ\nn : ℕ\nb c : ℤ\nh : 0 * b ∣ c\n⊢ b ∣ c / 0\n[PROOFSTEP]\nsimp only [Int.ediv_zero, dvd_zero]\n[GOAL]\ncase inr\na✝ b✝ : ℤ\nn : ℕ\na b c : ℤ\nh : a * b ∣ c\nha : a ≠ 0\n⊢ b ∣ c / a\n[PROOFSTEP]\nrcases h with ⟨d, rfl⟩\n[GOAL]\ncase inr.intro\na✝ b✝ : ℤ\nn : ℕ\na b : ℤ\nha : a ≠ 0\nd : ℤ\n⊢ b ∣ a * b * d / a\n[PROOFSTEP]\nrefine' ⟨d, _⟩\n[GOAL]\ncase inr.intro\na✝ b✝ : ℤ\nn : ℕ\na b : ℤ\nha : a ≠ 0\nd : ℤ\n⊢ a * b * d / a = b * d\n[PROOFSTEP]\nrw [mul_assoc, Int.mul_ediv_cancel_left _ ha]\n[GOAL]\na b : ℤ\nn : ℕ\nm x : ℤ\nh1 : m ∣ x\nh2 : |x| < m\n⊢ x = 0\n[PROOFSTEP]\nby_cases hm : m = 0\n[GOAL]\ncase pos\na b : ℤ\nn : ℕ\nm x : ℤ\nh1 : m ∣ x\nh2 : |x| < m\nhm : m = 0\n⊢ x = 0\n[PROOFSTEP]\nsubst m\n[GOAL]\ncase pos\na b : ℤ\nn : ℕ\nx : ℤ\nh1 : 0 ∣ x\nh2 : |x| < 0\n⊢ x = 0\n[PROOFSTEP]\nexact zero_dvd_iff.mp h1\n[GOAL]\ncase neg\na b : ℤ\nn : ℕ\nm x : ℤ\nh1 : m ∣ x\nh2 : |x| < m\nhm : ¬m = 0\n⊢ x = 0\n[PROOFSTEP]\nrcases h1 with ⟨d, rfl⟩\n[GOAL]\ncase neg.intro\na b : ℤ\nn : ℕ\nm : ℤ\nhm : ¬m = 0\nd : ℤ\nh2 : |m * d| < m\n⊢ m * d = 0\n[PROOFSTEP]\napply mul_eq_zero_of_right\n[GOAL]\ncase neg.intro.h\na b : ℤ\nn : ℕ\nm : ℤ\nhm : ¬m = 0\nd : ℤ\nh2 : |m * d| < m\n⊢ d = 0\n[PROOFSTEP]\nrw [← abs_lt_one_iff, ← mul_lt_iff_lt_one_right (abs_pos.mpr hm), ← abs_mul]\n[GOAL]\ncase neg.intro.h\na b : ℤ\nn : ℕ\nm : ℤ\nhm : ¬m = 0\nd : ℤ\nh2 : |m * d| < m\n⊢ |m * d| < |m|\n[PROOFSTEP]\nexact lt_of_lt_of_le h2 (le_abs_self m)\n", "meta": {"mathlib_filename": "Mathlib.Data.Int.Order.Lemmas", "llama_tokens": 1435, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7577943712746407, "lm_q2_score": 0.7090191399336402, "lm_q1q2_score": 0.5372907133676993}}
{"text": "[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na : α\n⊢ ∀ (r₁ r₂ : List (List α)),\n    sublists'Aux a r₁ r₂ =\n      Array.toList\n        (Array.foldl (fun r l => Array.push r (a :: l)) (toArray r₂) (toArray r₁) 0 (Array.size (toArray r₁)))\n[PROOFSTEP]\nintro r₁ r₂\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na : α\nr₁ r₂ : List (List α)\n⊢ sublists'Aux a r₁ r₂ =\n    Array.toList (Array.foldl (fun r l => Array.push r (a :: l)) (toArray r₂) (toArray r₁) 0 (Array.size (toArray r₁)))\n[PROOFSTEP]\nrw [sublists'Aux, Array.foldl_eq_foldl_data]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na : α\nr₁ r₂ : List (List α)\n⊢ foldl (fun r l => r ++ [a :: l]) r₂ r₁ =\n    Array.toList (foldl (fun r l => Array.push r (a :: l)) (toArray r₂) (toArray r₁).data)\n[PROOFSTEP]\nhave := List.foldl_hom Array.toList (fun r l => r.push (a :: l)) (fun r l => r ++ [a :: l]) r₁ r₂.toArray (by simp)\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na : α\nr₁ r₂ : List (List α)\n⊢ ∀ (x : Array (List α)) (y : List α),\n    (fun r l => r ++ [a :: l]) (Array.toList x) y = Array.toList ((fun r l => Array.push r (a :: l)) x y)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na : α\nr₁ r₂ : List (List α)\nthis :\n  foldl (fun r l => r ++ [a :: l]) (Array.toList (toArray r₂)) r₁ =\n    Array.toList (foldl (fun r l => Array.push r (a :: l)) (toArray r₂) r₁)\n⊢ foldl (fun r l => r ++ [a :: l]) r₂ r₁ =\n    Array.toList (foldl (fun r l => Array.push r (a :: l)) (toArray r₂) (toArray r₁).data)\n[PROOFSTEP]\nsimpa using this\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nl : List α\n⊢ sublists' l = foldr (fun a r => sublists'Aux a r r) [[]] l\n[PROOFSTEP]\nsimp only [sublists', sublists'Aux_eq_array_foldl]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nl : List α\n⊢ Array.toList\n      (foldr (fun a arr => Array.foldl (fun r l => Array.push r (a :: l)) arr arr 0 (Array.size arr)) #[[]] l) =\n    foldr\n      (fun a r =>\n        Array.toList\n          (Array.foldl (fun r l => Array.push r (a :: l)) (toArray r) (toArray r) 0 (Array.size (toArray r))))\n      [[]] l\n[PROOFSTEP]\nrw [← List.foldr_hom Array.toList]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nl : List α\n⊢ foldr ?g₂ (Array.toList #[[]]) l =\n    foldr\n      (fun a r =>\n        Array.toList\n          (Array.foldl (fun r l => Array.push r (a :: l)) (toArray r) (toArray r) 0 (Array.size (toArray r))))\n      [[]] l\n[PROOFSTEP]\nrfl\n[GOAL]\ncase H\nα : Type u\nβ : Type v\nγ : Type w\nl : List α\n⊢ ∀ (x : α) (y : Array (List α)),\n    Array.toList\n        (Array.foldl (fun r l => Array.push r (x :: l)) (toArray (Array.toList y)) (toArray (Array.toList y)) 0\n          (Array.size (toArray (Array.toList y)))) =\n      Array.toList (Array.foldl (fun r l => Array.push r (x :: l)) y y 0 (Array.size y))\n[PROOFSTEP]\nintros _ _\n[GOAL]\ncase H\nα : Type u\nβ : Type v\nγ : Type w\nl : List α\nx✝ : α\ny✝ : Array (List α)\n⊢ Array.toList\n      (Array.foldl (fun r l => Array.push r (x✝ :: l)) (toArray (Array.toList y✝)) (toArray (Array.toList y✝)) 0\n        (Array.size (toArray (Array.toList y✝)))) =\n    Array.toList (Array.foldl (fun r l => Array.push r (x✝ :: l)) y✝ y✝ 0 (Array.size y✝))\n[PROOFSTEP]\ncongr\n[GOAL]\ncase H.e_as.h.e_4.h\nα : Type u\nβ : Type v\nγ : Type w\nl : List α\nx✝ : α\ny✝ : Array (List α)\n⊢ toArray (Array.toList y✝) = y✝\n[PROOFSTEP]\nsimp\n[GOAL]\ncase H.e_as.h.e_5.h\nα : Type u\nβ : Type v\nγ : Type w\nl : List α\nx✝ : α\ny✝ : Array (List α)\n⊢ toArray (Array.toList y✝) = y✝\n[PROOFSTEP]\nsimp\n[GOAL]\ncase H.e_as.h.e_7.e_a\nα : Type u\nβ : Type v\nγ : Type w\nl : List α\nx✝ : α\ny✝ : Array (List α)\n⊢ toArray (Array.toList y✝) = y✝\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na : α\nr₁ x✝ : List (List α)\n⊢ sublists'Aux a [] x✝ = x✝ ++ map (cons a) []\n[PROOFSTEP]\nsimp [sublists'Aux]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na : α\nr₁✝ r₁ : List (List α)\nl : List α\nih : ∀ (r₂ : List (List α)), sublists'Aux a r₁ r₂ = r₂ ++ map (cons a) r₁\nr₂ : List (List α)\n⊢ sublists'Aux a (r₁ ++ [l]) r₂ = r₂ ++ map (cons a) (r₁ ++ [l])\n[PROOFSTEP]\nrw [map_append, map_singleton, ← append_assoc, ← ih, sublists'Aux, foldl_append, foldl]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na : α\nr₁✝ r₁ : List (List α)\nl : List α\nih : ∀ (r₂ : List (List α)), sublists'Aux a r₁ r₂ = r₂ ++ map (cons a) r₁\nr₂ : List (List α)\n⊢ foldl (fun r l => r ++ [a :: l]) (foldl (fun r l => r ++ [a :: l]) r₂ r₁ ++ [a :: l]) [] =\n    sublists'Aux a r₁ r₂ ++ [a :: l]\n[PROOFSTEP]\nsimp [sublists'Aux]\n  -- Porting note: simp can prove `sublists'_singleton`\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na : α\nl : List α\n⊢ sublists' (a :: l) = sublists' l ++ map (cons a) (sublists' l)\n[PROOFSTEP]\nsimp [sublists'_eq_sublists'Aux, foldr_cons, sublists'Aux_eq_map]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns t : List α\n⊢ s ∈ sublists' t ↔ s <+ t\n[PROOFSTEP]\ninduction' t with a t IH generalizing s\n[GOAL]\ncase nil\nα : Type u\nβ : Type v\nγ : Type w\ns✝ s : List α\n⊢ s ∈ sublists' [] ↔ s <+ []\n[PROOFSTEP]\nsimp only [sublists'_nil, mem_singleton]\n[GOAL]\ncase nil\nα : Type u\nβ : Type v\nγ : Type w\ns✝ s : List α\n⊢ s = [] ↔ s <+ []\n[PROOFSTEP]\nexact ⟨fun h => by rw [h], eq_nil_of_sublist_nil⟩\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns✝ s : List α\nh : s = []\n⊢ s <+ []\n[PROOFSTEP]\nrw [h]\n[GOAL]\ncase cons\nα : Type u\nβ : Type v\nγ : Type w\ns✝ : List α\na : α\nt : List α\nIH : ∀ {s : List α}, s ∈ sublists' t ↔ s <+ t\ns : List α\n⊢ s ∈ sublists' (a :: t) ↔ s <+ a :: t\n[PROOFSTEP]\nsimp only [sublists'_cons, mem_append, IH, mem_map]\n[GOAL]\ncase cons\nα : Type u\nβ : Type v\nγ : Type w\ns✝ : List α\na : α\nt : List α\nIH : ∀ {s : List α}, s ∈ sublists' t ↔ s <+ t\ns : List α\n⊢ (s <+ t ∨ ∃ a_1, a_1 <+ t ∧ a :: a_1 = s) ↔ s <+ a :: t\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase cons.mp\nα : Type u\nβ : Type v\nγ : Type w\ns✝ : List α\na : α\nt : List α\nIH : ∀ {s : List α}, s ∈ sublists' t ↔ s <+ t\ns : List α\n⊢ (s <+ t ∨ ∃ a_1, a_1 <+ t ∧ a :: a_1 = s) → s <+ a :: t\n[PROOFSTEP]\nintro h\n[GOAL]\ncase cons.mpr\nα : Type u\nβ : Type v\nγ : Type w\ns✝ : List α\na : α\nt : List α\nIH : ∀ {s : List α}, s ∈ sublists' t ↔ s <+ t\ns : List α\n⊢ s <+ a :: t → s <+ t ∨ ∃ a_2, a_2 <+ t ∧ a :: a_2 = s\n[PROOFSTEP]\nintro h\n[GOAL]\ncase cons.mp\nα : Type u\nβ : Type v\nγ : Type w\ns✝ : List α\na : α\nt : List α\nIH : ∀ {s : List α}, s ∈ sublists' t ↔ s <+ t\ns : List α\nh : s <+ t ∨ ∃ a_1, a_1 <+ t ∧ a :: a_1 = s\n⊢ s <+ a :: t\ncase cons.mpr\nα : Type u\nβ : Type v\nγ : Type w\ns✝ : List α\na : α\nt : List α\nIH : ∀ {s : List α}, s ∈ sublists' t ↔ s <+ t\ns : List α\nh : s <+ a :: t\n⊢ s <+ t ∨ ∃ a_1, a_1 <+ t ∧ a :: a_1 = s\n[PROOFSTEP]\nrcases h with (h | ⟨s, h, rfl⟩)\n[GOAL]\ncase cons.mp.inl\nα : Type u\nβ : Type v\nγ : Type w\ns✝ : List α\na : α\nt : List α\nIH : ∀ {s : List α}, s ∈ sublists' t ↔ s <+ t\ns : List α\nh : s <+ t\n⊢ s <+ a :: t\n[PROOFSTEP]\nexact sublist_cons_of_sublist _ h\n[GOAL]\ncase cons.mp.inr.intro.intro\nα : Type u\nβ : Type v\nγ : Type w\ns✝ : List α\na : α\nt : List α\nIH : ∀ {s : List α}, s ∈ sublists' t ↔ s <+ t\ns : List α\nh : s <+ t\n⊢ a :: s <+ a :: t\n[PROOFSTEP]\nexact h.cons_cons _\n[GOAL]\ncase cons.mpr\nα : Type u\nβ : Type v\nγ : Type w\ns✝ : List α\na : α\nt : List α\nIH : ∀ {s : List α}, s ∈ sublists' t ↔ s <+ t\ns : List α\nh : s <+ a :: t\n⊢ s <+ t ∨ ∃ a_1, a_1 <+ t ∧ a :: a_1 = s\n[PROOFSTEP]\ncases' h with _ _ _ h s _ _ h\n[GOAL]\ncase cons.mpr.cons\nα : Type u\nβ : Type v\nγ : Type w\ns✝ : List α\na : α\nt : List α\nIH : ∀ {s : List α}, s ∈ sublists' t ↔ s <+ t\ns : List α\nh : s <+ t\n⊢ s <+ t ∨ ∃ a_1, a_1 <+ t ∧ a :: a_1 = s\n[PROOFSTEP]\nexact Or.inl h\n[GOAL]\ncase cons.mpr.cons₂\nα : Type u\nβ : Type v\nγ : Type w\ns✝ : List α\na : α\nt : List α\nIH : ∀ {s : List α}, s ∈ sublists' t ↔ s <+ t\ns : List α\nh : s <+ t\n⊢ a :: s <+ t ∨ ∃ a_1, a_1 <+ t ∧ a :: a_1 = a :: s\n[PROOFSTEP]\nexact Or.inr ⟨s, h, rfl⟩\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na : α\nl : List α\n⊢ length (sublists' (a :: l)) = 2 ^ length (a :: l)\n[PROOFSTEP]\nsimp_arith only [sublists'_cons, length_append, length_sublists' l, length_map, length, Nat.pow_succ', mul_succ,\n  mul_zero, zero_add]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\n⊢ sublistsAux = fun a r =>\n    Array.toList\n      (Array.foldl (fun r l => Array.push (Array.push r l) (a :: l)) #[] (toArray r) 0 (Array.size (toArray r)))\n[PROOFSTEP]\nfunext a r\n[GOAL]\ncase h.h\nα : Type u\nβ : Type v\nγ : Type w\na : α\nr : List (List α)\n⊢ sublistsAux a r =\n    Array.toList\n      (Array.foldl (fun r l => Array.push (Array.push r l) (a :: l)) #[] (toArray r) 0 (Array.size (toArray r)))\n[PROOFSTEP]\nsimp only [sublistsAux, Array.foldl_eq_foldl_data, Array.mkEmpty]\n[GOAL]\ncase h.h\nα : Type u\nβ : Type v\nγ : Type w\na : α\nr : List (List α)\n⊢ foldl (fun r l => r ++ [l, a :: l]) [] r =\n    Array.toList (foldl (fun r l => Array.push (Array.push r l) (a :: l)) #[] (toArray r).data)\n[PROOFSTEP]\nhave :=\n  foldl_hom Array.toList (fun r l => (r.push l).push (a :: l)) (fun (r : List (List α)) l => r ++ [l, a :: l]) r #[]\n    (by simp)\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na : α\nr : List (List α)\n⊢ ∀ (x : Array (List α)) (y : List α),\n    (fun r l => r ++ [l, a :: l]) (Array.toList x) y =\n      Array.toList ((fun r l => Array.push (Array.push r l) (a :: l)) x y)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.h\nα : Type u\nβ : Type v\nγ : Type w\na : α\nr : List (List α)\nthis :\n  foldl (fun r l => r ++ [l, a :: l]) (Array.toList #[]) r =\n    Array.toList (foldl (fun r l => Array.push (Array.push r l) (a :: l)) #[] r)\n⊢ foldl (fun r l => r ++ [l, a :: l]) [] r =\n    Array.toList (foldl (fun r l => Array.push (Array.push r l) (a :: l)) #[] (toArray r).data)\n[PROOFSTEP]\nsimpa using this\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na : α\nr : List (List α)\n⊢ sublistsAux a [] = List.bind [] fun l => [l, a :: l]\n[PROOFSTEP]\nsimp [sublistsAux]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na : α\nr✝ r : List (List α)\nl : List α\nih : sublistsAux a r = List.bind r fun l => [l, a :: l]\n⊢ sublistsAux a (r ++ [l]) = List.bind (r ++ [l]) fun l => [l, a :: l]\n[PROOFSTEP]\nrw [append_bind, ← ih, bind_singleton, sublistsAux, foldl_append]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na : α\nr✝ r : List (List α)\nl : List α\nih : sublistsAux a r = List.bind r fun l => [l, a :: l]\n⊢ foldl (fun r l => r ++ [l, a :: l]) (foldl (fun r l => r ++ [l, a :: l]) [] r) [l] = sublistsAux a r ++ [l, a :: l]\n[PROOFSTEP]\nsimp [sublistsAux]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nl : List α\n⊢ sublists l = foldr sublistsAux [[]] l\n[PROOFSTEP]\nsimp only [sublists, sublistsAux_eq_array_foldl, Array.foldr_eq_foldr_data]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nl : List α\n⊢ Array.toList\n      (foldr\n        (fun a arr =>\n          Array.foldl (fun r l => Array.push (Array.push r l) (a :: l)) (Array.mkEmpty (Array.size arr * 2)) arr 0\n            (Array.size arr))\n        #[[]] l) =\n    foldr\n      (fun a r =>\n        Array.toList\n          (Array.foldl (fun r l => Array.push (Array.push r l) (a :: l)) #[] (toArray r) 0 (Array.size (toArray r))))\n      [[]] l\n[PROOFSTEP]\nrw [← foldr_hom Array.toList]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nl : List α\n⊢ foldr ?g₂ (Array.toList #[[]]) l =\n    foldr\n      (fun a r =>\n        Array.toList\n          (Array.foldl (fun r l => Array.push (Array.push r l) (a :: l)) #[] (toArray r) 0 (Array.size (toArray r))))\n      [[]] l\n[PROOFSTEP]\nrfl\n[GOAL]\ncase H\nα : Type u\nβ : Type v\nγ : Type w\nl : List α\n⊢ ∀ (x : α) (y : Array (List α)),\n    Array.toList\n        (Array.foldl (fun r l => Array.push (Array.push r l) (x :: l)) #[] (toArray (Array.toList y)) 0\n          (Array.size (toArray (Array.toList y)))) =\n      Array.toList\n        (Array.foldl (fun r l => Array.push (Array.push r l) (x :: l)) (Array.mkEmpty (Array.size y * 2)) y 0\n          (Array.size y))\n[PROOFSTEP]\nintros _ _\n[GOAL]\ncase H\nα : Type u\nβ : Type v\nγ : Type w\nl : List α\nx✝ : α\ny✝ : Array (List α)\n⊢ Array.toList\n      (Array.foldl (fun r l => Array.push (Array.push r l) (x✝ :: l)) #[] (toArray (Array.toList y✝)) 0\n        (Array.size (toArray (Array.toList y✝)))) =\n    Array.toList\n      (Array.foldl (fun r l => Array.push (Array.push r l) (x✝ :: l)) (Array.mkEmpty (Array.size y✝ * 2)) y✝ 0\n        (Array.size y✝))\n[PROOFSTEP]\ncongr\n[GOAL]\ncase H.e_as.h.e_5.h\nα : Type u\nβ : Type v\nγ : Type w\nl : List α\nx✝ : α\ny✝ : Array (List α)\n⊢ toArray (Array.toList y✝) = y✝\n[PROOFSTEP]\nsimp\n[GOAL]\ncase H.e_as.h.e_7.e_a\nα : Type u\nβ : Type v\nγ : Type w\nl : List α\nx✝ : α\ny✝ : Array (List α)\n⊢ toArray (Array.toList y✝) = y✝\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nl₁ l₂ : List α\n⊢ sublists (l₁ ++ l₂) = do\n    let x ← sublists l₂\n    map (fun x_1 => x_1 ++ x) (sublists l₁)\n[PROOFSTEP]\nsimp only [sublists_eq_sublistsAux, foldr_append, sublistsAux_eq_bind]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nl₁ l₂ : List α\n⊢ foldr (fun a r => List.bind r fun l => [l, a :: l]) (foldr (fun a r => List.bind r fun l => [l, a :: l]) [[]] l₂) l₁ =\n    do\n    let x ← foldr (fun a r => List.bind r fun l => [l, a :: l]) [[]] l₂\n    map (fun x_1 => x_1 ++ x) (foldr (fun a r => List.bind r fun l => [l, a :: l]) [[]] l₁)\n[PROOFSTEP]\ninduction l₁\n[GOAL]\ncase nil\nα : Type u\nβ : Type v\nγ : Type w\nl₂ : List α\n⊢ foldr (fun a r => List.bind r fun l => [l, a :: l]) (foldr (fun a r => List.bind r fun l => [l, a :: l]) [[]] l₂) [] =\n    do\n    let x ← foldr (fun a r => List.bind r fun l => [l, a :: l]) [[]] l₂\n    map (fun x_1 => x_1 ++ x) (foldr (fun a r => List.bind r fun l => [l, a :: l]) [[]] [])\n[PROOFSTEP]\ncase nil => simp\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nl₂ : List α\n⊢ foldr (fun a r => List.bind r fun l => [l, a :: l]) (foldr (fun a r => List.bind r fun l => [l, a :: l]) [[]] l₂) [] =\n    do\n    let x ← foldr (fun a r => List.bind r fun l => [l, a :: l]) [[]] l₂\n    map (fun x_1 => x_1 ++ x) (foldr (fun a r => List.bind r fun l => [l, a :: l]) [[]] [])\n[PROOFSTEP]\ncase nil => simp\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nl₂ : List α\n⊢ foldr (fun a r => List.bind r fun l => [l, a :: l]) (foldr (fun a r => List.bind r fun l => [l, a :: l]) [[]] l₂) [] =\n    do\n    let x ← foldr (fun a r => List.bind r fun l => [l, a :: l]) [[]] l₂\n    map (fun x_1 => x_1 ++ x) (foldr (fun a r => List.bind r fun l => [l, a :: l]) [[]] [])\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\nα : Type u\nβ : Type v\nγ : Type w\nl₂ : List α\nhead✝ : α\ntail✝ : List α\ntail_ih✝ :\n  foldr (fun a r => List.bind r fun l => [l, a :: l]) (foldr (fun a r => List.bind r fun l => [l, a :: l]) [[]] l₂)\n      tail✝ =\n    do\n    let x ← foldr (fun a r => List.bind r fun l => [l, a :: l]) [[]] l₂\n    map (fun x_1 => x_1 ++ x) (foldr (fun a r => List.bind r fun l => [l, a :: l]) [[]] tail✝)\n⊢ foldr (fun a r => List.bind r fun l => [l, a :: l]) (foldr (fun a r => List.bind r fun l => [l, a :: l]) [[]] l₂)\n      (head✝ :: tail✝) =\n    do\n    let x ← foldr (fun a r => List.bind r fun l => [l, a :: l]) [[]] l₂\n    map (fun x_1 => x_1 ++ x) (foldr (fun a r => List.bind r fun l => [l, a :: l]) [[]] (head✝ :: tail✝))\n[PROOFSTEP]\ncase cons a l₁ ih =>\n  rw [foldr_cons, ih]\n  simp [List.bind, join_join, Function.comp]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nl₂ : List α\na : α\nl₁ : List α\nih :\n  foldr (fun a r => List.bind r fun l => [l, a :: l]) (foldr (fun a r => List.bind r fun l => [l, a :: l]) [[]] l₂) l₁ =\n    do\n    let x ← foldr (fun a r => List.bind r fun l => [l, a :: l]) [[]] l₂\n    map (fun x_1 => x_1 ++ x) (foldr (fun a r => List.bind r fun l => [l, a :: l]) [[]] l₁)\n⊢ foldr (fun a r => List.bind r fun l => [l, a :: l]) (foldr (fun a r => List.bind r fun l => [l, a :: l]) [[]] l₂)\n      (a :: l₁) =\n    do\n    let x ← foldr (fun a r => List.bind r fun l => [l, a :: l]) [[]] l₂\n    map (fun x_1 => x_1 ++ x) (foldr (fun a r => List.bind r fun l => [l, a :: l]) [[]] (a :: l₁))\n[PROOFSTEP]\ncase cons a l₁ ih =>\n  rw [foldr_cons, ih]\n  simp [List.bind, join_join, Function.comp]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nl₂ : List α\na : α\nl₁ : List α\nih :\n  foldr (fun a r => List.bind r fun l => [l, a :: l]) (foldr (fun a r => List.bind r fun l => [l, a :: l]) [[]] l₂) l₁ =\n    do\n    let x ← foldr (fun a r => List.bind r fun l => [l, a :: l]) [[]] l₂\n    map (fun x_1 => x_1 ++ x) (foldr (fun a r => List.bind r fun l => [l, a :: l]) [[]] l₁)\n⊢ foldr (fun a r => List.bind r fun l => [l, a :: l]) (foldr (fun a r => List.bind r fun l => [l, a :: l]) [[]] l₂)\n      (a :: l₁) =\n    do\n    let x ← foldr (fun a r => List.bind r fun l => [l, a :: l]) [[]] l₂\n    map (fun x_1 => x_1 ++ x) (foldr (fun a r => List.bind r fun l => [l, a :: l]) [[]] (a :: l₁))\n[PROOFSTEP]\nrw [foldr_cons, ih]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nl₂ : List α\na : α\nl₁ : List α\nih :\n  foldr (fun a r => List.bind r fun l => [l, a :: l]) (foldr (fun a r => List.bind r fun l => [l, a :: l]) [[]] l₂) l₁ =\n    do\n    let x ← foldr (fun a r => List.bind r fun l => [l, a :: l]) [[]] l₂\n    map (fun x_1 => x_1 ++ x) (foldr (fun a r => List.bind r fun l => [l, a :: l]) [[]] l₁)\n⊢ (List.bind\n      (do\n        let x ← foldr (fun a r => List.bind r fun l => [l, a :: l]) [[]] l₂\n        map (fun x_1 => x_1 ++ x) (foldr (fun a r => List.bind r fun l => [l, a :: l]) [[]] l₁))\n      fun l => [l, a :: l]) =\n    do\n    let x ← foldr (fun a r => List.bind r fun l => [l, a :: l]) [[]] l₂\n    map (fun x_1 => x_1 ++ x) (foldr (fun a r => List.bind r fun l => [l, a :: l]) [[]] (a :: l₁))\n[PROOFSTEP]\nsimp [List.bind, join_join, Function.comp]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na : α\nl : List α\n⊢ sublists ([a] ++ l) = do\n    let x ← sublists l\n    [x, a :: x]\n[PROOFSTEP]\nrw [sublists_append]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na : α\nl : List α\n⊢ (do\n      let x ← sublists l\n      map (fun x_1 => x_1 ++ x) (sublists [a])) =\n    do\n    let x ← sublists l\n    [x, a :: x]\n[PROOFSTEP]\nsimp only [sublists_singleton, map_cons, bind_eq_bind, nil_append, cons_append, map_nil]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nl : List α\na : α\n⊢ sublists (l ++ [a]) = sublists l ++ map (fun x => x ++ [a]) (sublists l)\n[PROOFSTEP]\nrw [sublists_append, sublists_singleton, bind_eq_bind, cons_bind, cons_bind, nil_bind, map_id' append_nil, append_nil]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nl : List α\n⊢ sublists (reverse l) = map reverse (sublists' l)\n[PROOFSTEP]\ninduction' l with hd tl ih <;> [rfl;\n  simp only [reverse_cons, sublists_append, sublists'_cons, map_append, ih, sublists_singleton, map_eq_map,\n    bind_eq_bind, map_map, cons_bind, append_nil, nil_bind, (· ∘ ·)]]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nl : List α\n⊢ sublists (reverse l) = map reverse (sublists' l)\n[PROOFSTEP]\ninduction' l with hd tl ih\n[GOAL]\ncase nil\nα : Type u\nβ : Type v\nγ : Type w\n⊢ sublists (reverse []) = map reverse (sublists' [])\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\nα : Type u\nβ : Type v\nγ : Type w\nhd : α\ntl : List α\nih : sublists (reverse tl) = map reverse (sublists' tl)\n⊢ sublists (reverse (hd :: tl)) = map reverse (sublists' (hd :: tl))\n[PROOFSTEP]\nsimp only [reverse_cons, sublists_append, sublists'_cons, map_append, ih, sublists_singleton, map_eq_map, bind_eq_bind,\n  map_map, cons_bind, append_nil, nil_bind, (· ∘ ·)]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nl : List α\n⊢ sublists l = map reverse (sublists' (reverse l))\n[PROOFSTEP]\nrw [← sublists_reverse, reverse_reverse]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nl : List α\n⊢ sublists' (reverse l) = map reverse (sublists l)\n[PROOFSTEP]\nsimp only [sublists_eq_sublists', map_map, map_id' reverse_reverse, Function.comp]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nl : List α\n⊢ sublists' l = map reverse (sublists (reverse l))\n[PROOFSTEP]\nrw [← sublists'_reverse, reverse_reverse]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns t : List α\n⊢ s ∈ sublists t ↔ s <+ t\n[PROOFSTEP]\nrw [← reverse_sublist, ← mem_sublists', sublists'_reverse, mem_map_of_injective reverse_injective]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nl : List α\n⊢ length (sublists l) = 2 ^ length l\n[PROOFSTEP]\nsimp only [sublists_eq_sublists', length_map, length_sublists', length_reverse]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nl : List α\n⊢ map List.ret l <+ sublists l\n[PROOFSTEP]\ninduction' l using reverseRecOn with l a ih\n[GOAL]\ncase H0\nα : Type u\nβ : Type v\nγ : Type w\n⊢ map List.ret [] <+ sublists []\n[PROOFSTEP]\nsimp only [map, map_append, sublists_concat]\n[GOAL]\ncase H1\nα : Type u\nβ : Type v\nγ : Type w\nl : List α\na : α\nih : map List.ret l <+ sublists l\n⊢ map List.ret (l ++ [a]) <+ sublists (l ++ [a])\n[PROOFSTEP]\nsimp only [map, map_append, sublists_concat]\n[GOAL]\ncase H0\nα : Type u\nβ : Type v\nγ : Type w\n⊢ [] <+ sublists []\n[PROOFSTEP]\nsimp only [sublists_nil, sublist_cons]\n[GOAL]\ncase H1\nα : Type u\nβ : Type v\nγ : Type w\nl : List α\na : α\nih : map List.ret l <+ sublists l\n⊢ map List.ret l ++ [List.ret a] <+ sublists l ++ map (fun x => x ++ [a]) (sublists l)\n[PROOFSTEP]\nexact\n  ((append_sublist_append_left _).2 <|\n        singleton_sublist.2 <| mem_map.2 ⟨[], mem_sublists.2 (nil_sublist _), by rfl⟩).trans\n    ((append_sublist_append_right _).2 ih)\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nl : List α\na : α\nih : map List.ret l <+ sublists l\n⊢ [] ++ [a] = List.ret a\n[PROOFSTEP]\nrfl\n[GOAL]\nα✝ : Type u\nβ✝ : Type v\nγ✝ : Type w\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nl : List α\nf : List α → β\ng : β → γ\nr : List β\ns : List γ\n⊢ sublistsLenAux 0 l (g ∘ f) (map g r ++ s) = map g (sublistsLenAux 0 l f r) ++ s\n[PROOFSTEP]\nunfold sublistsLenAux\n[GOAL]\nα✝ : Type u\nβ✝ : Type v\nγ✝ : Type w\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nl : List α\nf : List α → β\ng : β → γ\nr : List β\ns : List γ\n⊢ (g ∘ f) [] :: (map g r ++ s) = map g (f [] :: r) ++ s\n[PROOFSTEP]\nsimp\n[GOAL]\nα✝ : Type u\nβ✝ : Type v\nγ✝ : Type w\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nn : ℕ\na : α\nl : List α\nf : List α → β\ng : β → γ\nr : List β\ns : List γ\n⊢ sublistsLenAux (n + 1) (a :: l) (g ∘ f) (map g r ++ s) = map g (sublistsLenAux (n + 1) (a :: l) f r) ++ s\n[PROOFSTEP]\nunfold sublistsLenAux\n[GOAL]\nα✝ : Type u\nβ✝ : Type v\nγ✝ : Type w\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nn : ℕ\na : α\nl : List α\nf : List α → β\ng : β → γ\nr : List β\ns : List γ\n⊢ sublistsLenAux (Nat.add n 0 + 1) l (g ∘ f) (sublistsLenAux (Nat.add n 0) l ((g ∘ f) ∘ cons a) (map g r ++ s)) =\n    map g (sublistsLenAux (Nat.add n 0 + 1) l f (sublistsLenAux (Nat.add n 0) l (f ∘ cons a) r)) ++ s\n[PROOFSTEP]\nsimp only [show (g ∘ f) ∘ List.cons a = g ∘ f ∘ List.cons a by rfl, sublistsLenAux_append, sublistsLenAux_append]\n[GOAL]\nα✝ : Type u\nβ✝ : Type v\nγ✝ : Type w\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nn : ℕ\na : α\nl : List α\nf : List α → β\ng : β → γ\nr : List β\ns : List γ\n⊢ (g ∘ f) ∘ cons a = g ∘ f ∘ cons a\n[PROOFSTEP]\nrfl\n[GOAL]\nα✝ : Type u\nβ✝ : Type v\nγ : Type w\nα : Type u_1\nβ : Type u_2\nl : List α\nn : ℕ\nf : List α → β\nr : List β\n⊢ sublistsLenAux n l f r = map f (sublistsLen n l) ++ r\n[PROOFSTEP]\nrw [sublistsLen, ← sublistsLenAux_append]\n[GOAL]\nα✝ : Type u\nβ✝ : Type v\nγ : Type w\nα : Type u_1\nβ : Type u_2\nl : List α\nn : ℕ\nf : List α → β\nr : List β\n⊢ sublistsLenAux n l f r = sublistsLenAux n l (f ∘ id) (map f [] ++ r)\n[PROOFSTEP]\nrfl\n[GOAL]\nα✝ : Type u\nβ : Type v\nγ : Type w\nα : Type u_1\nl : List α\nf : List α → β\nr : List β\n⊢ sublistsLenAux 0 l f r = f [] :: r\n[PROOFSTEP]\ncases l\n[GOAL]\ncase nil\nα✝ : Type u\nβ : Type v\nγ : Type w\nα : Type u_1\nf : List α → β\nr : List β\n⊢ sublistsLenAux 0 [] f r = f [] :: r\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\nα✝ : Type u\nβ : Type v\nγ : Type w\nα : Type u_1\nf : List α → β\nr : List β\nhead✝ : α\ntail✝ : List α\n⊢ sublistsLenAux 0 (head✝ :: tail✝) f r = f [] :: r\n[PROOFSTEP]\nrfl\n[GOAL]\nα✝ : Type u\nβ : Type v\nγ : Type w\nα : Type u_1\nn : ℕ\na : α\nl : List α\n⊢ sublistsLen (n + 1) (a :: l) = sublistsLen (n + 1) l ++ map (cons a) (sublistsLen n l)\n[PROOFSTEP]\nrw [sublistsLen, sublistsLenAux, sublistsLenAux_eq, sublistsLenAux_eq, map_id, append_nil]\n[GOAL]\nα✝ : Type u\nβ : Type v\nγ : Type w\nα : Type u_1\nn : ℕ\na : α\nl : List α\n⊢ sublistsLen (n + 1) l ++ map (id ∘ cons a) (sublistsLen n l) = sublistsLen (n + 1) l ++ map (cons a) (sublistsLen n l)\n[PROOFSTEP]\nrfl\n[GOAL]\nα✝ : Type u\nβ : Type v\nγ : Type w\nα : Type u_1\nl : List α\n⊢ length (sublistsLen 0 l) = Nat.choose (length l) 0\n[PROOFSTEP]\nsimp\n[GOAL]\nα✝ : Type u\nβ : Type v\nγ : Type w\nα : Type u_1\nn✝ : ℕ\n⊢ length (sublistsLen (n✝ + 1) []) = Nat.choose (length []) (n✝ + 1)\n[PROOFSTEP]\nsimp\n[GOAL]\nα✝ : Type u\nβ : Type v\nγ : Type w\nα : Type u_1\nn : ℕ\na : α\nl : List α\n⊢ length (sublistsLen (n + 1) (a :: l)) = Nat.choose (length (a :: l)) (n + 1)\n[PROOFSTEP]\nrw [sublistsLen_succ_cons, length_append, length_sublistsLen (n + 1) l, length_map, length_sublistsLen n l, length_cons,\n  Nat.choose_succ_succ, add_comm]\n[GOAL]\nα✝ : Type u\nβ : Type v\nγ : Type w\nα : Type u_1\nl : List α\n⊢ sublistsLen 0 l <+ sublists' l\n[PROOFSTEP]\nsimp\n[GOAL]\nα✝ : Type u\nβ : Type v\nγ : Type w\nα : Type u_1\nn : ℕ\na : α\nl : List α\n⊢ sublistsLen (n + 1) (a :: l) <+ sublists' (a :: l)\n[PROOFSTEP]\nrw [sublistsLen_succ_cons, sublists'_cons]\n[GOAL]\nα✝ : Type u\nβ : Type v\nγ : Type w\nα : Type u_1\nn : ℕ\na : α\nl : List α\n⊢ sublistsLen (n + 1) l ++ map (cons a) (sublistsLen n l) <+ sublists' l ++ map (cons a) (sublists' l)\n[PROOFSTEP]\nexact (sublistsLen_sublist_sublists' _ _).append ((sublistsLen_sublist_sublists' _ _).map _)\n[GOAL]\nα✝ : Type u\nβ : Type v\nγ : Type w\nα : Type u_1\nn : ℕ\nl₁ l₂ : List α\nh : l₁ <+ l₂\n⊢ sublistsLen n l₁ <+ sublistsLen n l₂\n[PROOFSTEP]\ninduction' n with n IHn generalizing l₁ l₂\n[GOAL]\ncase zero\nα✝ : Type u\nβ : Type v\nγ : Type w\nα : Type u_1\nl₁✝ l₂✝ : List α\nh✝ : l₁✝ <+ l₂✝\nl₁ l₂ : List α\nh : l₁ <+ l₂\n⊢ sublistsLen zero l₁ <+ sublistsLen zero l₂\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\nα✝ : Type u\nβ : Type v\nγ : Type w\nα : Type u_1\nl₁✝ l₂✝ : List α\nh✝ : l₁✝ <+ l₂✝\nn : ℕ\nIHn : ∀ {l₁ l₂ : List α}, l₁ <+ l₂ → sublistsLen n l₁ <+ sublistsLen n l₂\nl₁ l₂ : List α\nh : l₁ <+ l₂\n⊢ sublistsLen (succ n) l₁ <+ sublistsLen (succ n) l₂\n[PROOFSTEP]\ninduction' h with l₁ l₂ a _ IH l₁ l₂ a s IH\n[GOAL]\ncase succ.slnil\nα✝ : Type u\nβ : Type v\nγ : Type w\nα : Type u_1\nl₁✝ l₂✝ : List α\nh : l₁✝ <+ l₂✝\nn : ℕ\nIHn : ∀ {l₁ l₂ : List α}, l₁ <+ l₂ → sublistsLen n l₁ <+ sublistsLen n l₂\nl₁ l₂ : List α\n⊢ sublistsLen (succ n) [] <+ sublistsLen (succ n) []\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ.cons\nα✝ : Type u\nβ : Type v\nγ : Type w\nα : Type u_1\nl₁✝¹ l₂✝¹ : List α\nh : l₁✝¹ <+ l₂✝¹\nn : ℕ\nIHn : ∀ {l₁ l₂ : List α}, l₁ <+ l₂ → sublistsLen n l₁ <+ sublistsLen n l₂\nl₁✝ l₂✝ l₁ l₂ : List α\na : α\na✝ : l₁ <+ l₂\nIH : sublistsLen (succ n) l₁ <+ sublistsLen (succ n) l₂\n⊢ sublistsLen (succ n) l₁ <+ sublistsLen (succ n) (a :: l₂)\n[PROOFSTEP]\nrefine' IH.trans _\n[GOAL]\ncase succ.cons\nα✝ : Type u\nβ : Type v\nγ : Type w\nα : Type u_1\nl₁✝¹ l₂✝¹ : List α\nh : l₁✝¹ <+ l₂✝¹\nn : ℕ\nIHn : ∀ {l₁ l₂ : List α}, l₁ <+ l₂ → sublistsLen n l₁ <+ sublistsLen n l₂\nl₁✝ l₂✝ l₁ l₂ : List α\na : α\na✝ : l₁ <+ l₂\nIH : sublistsLen (succ n) l₁ <+ sublistsLen (succ n) l₂\n⊢ sublistsLen (succ n) l₂ <+ sublistsLen (succ n) (a :: l₂)\n[PROOFSTEP]\nrw [sublistsLen_succ_cons]\n[GOAL]\ncase succ.cons\nα✝ : Type u\nβ : Type v\nγ : Type w\nα : Type u_1\nl₁✝¹ l₂✝¹ : List α\nh : l₁✝¹ <+ l₂✝¹\nn : ℕ\nIHn : ∀ {l₁ l₂ : List α}, l₁ <+ l₂ → sublistsLen n l₁ <+ sublistsLen n l₂\nl₁✝ l₂✝ l₁ l₂ : List α\na : α\na✝ : l₁ <+ l₂\nIH : sublistsLen (succ n) l₁ <+ sublistsLen (succ n) l₂\n⊢ sublistsLen (succ n) l₂ <+ sublistsLen (n + 1) l₂ ++ map (cons a) (sublistsLen n l₂)\n[PROOFSTEP]\napply sublist_append_left\n[GOAL]\ncase succ.cons₂\nα✝ : Type u\nβ : Type v\nγ : Type w\nα : Type u_1\nl₁✝¹ l₂✝¹ : List α\nh : l₁✝¹ <+ l₂✝¹\nn : ℕ\nIHn : ∀ {l₁ l₂ : List α}, l₁ <+ l₂ → sublistsLen n l₁ <+ sublistsLen n l₂\nl₁✝ l₂✝ l₁ l₂ : List α\na : α\ns : l₁ <+ l₂\nIH : sublistsLen (succ n) l₁ <+ sublistsLen (succ n) l₂\n⊢ sublistsLen (succ n) (a :: l₁) <+ sublistsLen (succ n) (a :: l₂)\n[PROOFSTEP]\nsimp [sublistsLen_succ_cons]\n[GOAL]\ncase succ.cons₂\nα✝ : Type u\nβ : Type v\nγ : Type w\nα : Type u_1\nl₁✝¹ l₂✝¹ : List α\nh : l₁✝¹ <+ l₂✝¹\nn : ℕ\nIHn : ∀ {l₁ l₂ : List α}, l₁ <+ l₂ → sublistsLen n l₁ <+ sublistsLen n l₂\nl₁✝ l₂✝ l₁ l₂ : List α\na : α\ns : l₁ <+ l₂\nIH : sublistsLen (succ n) l₁ <+ sublistsLen (succ n) l₂\n⊢ sublistsLen (n + 1) l₁ ++ map (cons a) (sublistsLen n l₁) <+ sublistsLen (n + 1) l₂ ++ map (cons a) (sublistsLen n l₂)\n[PROOFSTEP]\nexact IH.append ((IHn s).map _)\n[GOAL]\nα✝ : Type u\nβ : Type v\nγ : Type w\nα : Type u_1\nl l' : List α\nh : l' ∈ sublistsLen 0 l\n⊢ length l' = 0\n[PROOFSTEP]\nsimp_all\n[GOAL]\nα✝ : Type u\nβ : Type v\nγ : Type w\nα : Type u_1\nn : ℕ\na : α\nl l' : List α\nh : l' ∈ sublistsLen (n + 1) (a :: l)\n⊢ length l' = n + 1\n[PROOFSTEP]\nrw [sublistsLen_succ_cons, mem_append, mem_map] at h \n[GOAL]\nα✝ : Type u\nβ : Type v\nγ : Type w\nα : Type u_1\nn : ℕ\na : α\nl l' : List α\nh : l' ∈ sublistsLen (n + 1) l ∨ ∃ a_1, a_1 ∈ sublistsLen n l ∧ a :: a_1 = l'\n⊢ length l' = n + 1\n[PROOFSTEP]\nrcases h with (h | ⟨l', h, rfl⟩)\n[GOAL]\ncase inl\nα✝ : Type u\nβ : Type v\nγ : Type w\nα : Type u_1\nn : ℕ\na : α\nl l' : List α\nh : l' ∈ sublistsLen (n + 1) l\n⊢ length l' = n + 1\n[PROOFSTEP]\nexact length_of_sublistsLen h\n[GOAL]\ncase inr.intro.intro\nα✝ : Type u\nβ : Type v\nγ : Type w\nα : Type u_1\nn : ℕ\na : α\nl l' : List α\nh : l' ∈ sublistsLen n l\n⊢ length (a :: l') = n + 1\n[PROOFSTEP]\nexact congr_arg (· + 1) (length_of_sublistsLen h)\n[GOAL]\nα✝ : Type u\nβ : Type v\nγ : Type w\nα : Type u_1\nl l' : List α\nh : l' <+ l\n⊢ l' ∈ sublistsLen (length l') l\n[PROOFSTEP]\ninduction' h with l₁ l₂ a s IH l₁ l₂ a s IH\n[GOAL]\ncase slnil\nα✝ : Type u\nβ : Type v\nγ : Type w\nα : Type u_1\nl l' : List α\n⊢ [] ∈ sublistsLen (length []) []\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\nα✝ : Type u\nβ : Type v\nγ : Type w\nα : Type u_1\nl l' l₁ l₂ : List α\na : α\ns : l₁ <+ l₂\nIH : l₁ ∈ sublistsLen (length l₁) l₂\n⊢ l₁ ∈ sublistsLen (length l₁) (a :: l₂)\n[PROOFSTEP]\ncases' l₁ with b l₁\n[GOAL]\ncase cons.nil\nα✝ : Type u\nβ : Type v\nγ : Type w\nα : Type u_1\nl l' l₂ : List α\na : α\ns : [] <+ l₂\nIH : [] ∈ sublistsLen (length []) l₂\n⊢ [] ∈ sublistsLen (length []) (a :: l₂)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons.cons\nα✝ : Type u\nβ : Type v\nγ : Type w\nα : Type u_1\nl l' l₂ : List α\na b : α\nl₁ : List α\ns : b :: l₁ <+ l₂\nIH : b :: l₁ ∈ sublistsLen (length (b :: l₁)) l₂\n⊢ b :: l₁ ∈ sublistsLen (length (b :: l₁)) (a :: l₂)\n[PROOFSTEP]\nrw [length, sublistsLen_succ_cons]\n[GOAL]\ncase cons.cons\nα✝ : Type u\nβ : Type v\nγ : Type w\nα : Type u_1\nl l' l₂ : List α\na b : α\nl₁ : List α\ns : b :: l₁ <+ l₂\nIH : b :: l₁ ∈ sublistsLen (length (b :: l₁)) l₂\n⊢ b :: l₁ ∈ sublistsLen (length l₁ + 1) l₂ ++ map (cons a) (sublistsLen (length l₁) l₂)\n[PROOFSTEP]\nexact mem_append_left _ IH\n[GOAL]\ncase cons₂\nα✝ : Type u\nβ : Type v\nγ : Type w\nα : Type u_1\nl l' l₁ l₂ : List α\na : α\ns : l₁ <+ l₂\nIH : l₁ ∈ sublistsLen (length l₁) l₂\n⊢ a :: l₁ ∈ sublistsLen (length (a :: l₁)) (a :: l₂)\n[PROOFSTEP]\nrw [length, sublistsLen_succ_cons]\n[GOAL]\ncase cons₂\nα✝ : Type u\nβ : Type v\nγ : Type w\nα : Type u_1\nl l' l₁ l₂ : List α\na : α\ns : l₁ <+ l₂\nIH : l₁ ∈ sublistsLen (length l₁) l₂\n⊢ a :: l₁ ∈ sublistsLen (length l₁ + 1) l₂ ++ map (cons a) (sublistsLen (length l₁) l₂)\n[PROOFSTEP]\nexact mem_append_right _ (mem_map.2 ⟨_, IH, rfl⟩)\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na : α\nl : List α\n⊢ sublistsLen (length (a :: l)) (a :: l) = [a :: l]\n[PROOFSTEP]\nsimp only [length, sublistsLen_succ_cons, sublistsLen_length, map, sublistsLen_of_length_lt (lt_succ_self _),\n  nil_append]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : α → α → Prop\na : α\nl : List α\nH₁ : ∀ (a' : α), a' ∈ l → R a a'\nH₂ : Pairwise R l\n⊢ Pairwise (Lex (swap R)) (List.sublists' (a :: l))\n[PROOFSTEP]\nsimp only [sublists'_cons, pairwise_append, pairwise_map, mem_sublists', mem_map, exists_imp, and_imp]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : α → α → Prop\na : α\nl : List α\nH₁ : ∀ (a' : α), a' ∈ l → R a a'\nH₂ : Pairwise R l\n⊢ Pairwise (Lex (swap R)) (List.sublists' l) ∧\n    Pairwise (fun a_1 b => Lex (swap R) (a :: a_1) (a :: b)) (List.sublists' l) ∧\n      ∀ (a_1 : List α), a_1 <+ l → ∀ (b x : List α), x <+ l → a :: x = b → Lex (swap R) a_1 b\n[PROOFSTEP]\nrefine' ⟨H₂.sublists', H₂.sublists'.imp fun l₁ => Lex.cons l₁, _⟩\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : α → α → Prop\na : α\nl : List α\nH₁ : ∀ (a' : α), a' ∈ l → R a a'\nH₂ : Pairwise R l\n⊢ ∀ (a_1 : List α), a_1 <+ l → ∀ (b x : List α), x <+ l → a :: x = b → Lex (swap R) a_1 b\n[PROOFSTEP]\nrintro l₁ sl₁ x l₂ _ rfl\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : α → α → Prop\na : α\nl : List α\nH₁ : ∀ (a' : α), a' ∈ l → R a a'\nH₂ : Pairwise R l\nl₁ : List α\nsl₁ : l₁ <+ l\nl₂ : List α\na✝ : l₂ <+ l\n⊢ Lex (swap R) l₁ (a :: l₂)\n[PROOFSTEP]\ncases' l₁ with b l₁\n[GOAL]\ncase nil\nα : Type u\nβ : Type v\nγ : Type w\nR : α → α → Prop\na : α\nl : List α\nH₁ : ∀ (a' : α), a' ∈ l → R a a'\nH₂ : Pairwise R l\nl₂ : List α\na✝ : l₂ <+ l\nsl₁ : [] <+ l\n⊢ Lex (swap R) [] (a :: l₂)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase cons\nα : Type u\nβ : Type v\nγ : Type w\nR : α → α → Prop\na : α\nl : List α\nH₁ : ∀ (a' : α), a' ∈ l → R a a'\nH₂ : Pairwise R l\nl₂ : List α\na✝ : l₂ <+ l\nb : α\nl₁ : List α\nsl₁ : b :: l₁ <+ l\n⊢ Lex (swap R) (b :: l₁) (a :: l₂)\n[PROOFSTEP]\nexact Lex.rel (H₁ _ <| sl₁.subset <| mem_cons_self _ _)\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : α → α → Prop\nl : List α\nH : Pairwise R l\n⊢ Pairwise (fun l₁ l₂ => Lex R (reverse l₁) (reverse l₂)) (sublists l)\n[PROOFSTEP]\nhave := (pairwise_reverse.2 H).sublists'\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : α → α → Prop\nl : List α\nH : Pairwise R l\nthis : Pairwise (Lex (swap fun b a => R a b)) (sublists' (reverse l))\n⊢ Pairwise (fun l₁ l₂ => Lex R (reverse l₁) (reverse l₂)) (sublists l)\n[PROOFSTEP]\nrwa [sublists'_reverse, pairwise_map] at this \n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nl : List α\nh✝ : Nodup l\nl₁ l₂ : List α\nh : Lex (fun x x_1 => x ≠ x_1) (reverse l₁) (reverse l₂)\n⊢ l₁ ≠ l₂\n[PROOFSTEP]\nsimpa using h.to_ne\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nl : List α\n⊢ Nodup (sublists' l) ↔ Nodup l\n[PROOFSTEP]\nrw [sublists'_eq_sublists, nodup_map_iff reverse_injective, nodup_sublists, nodup_reverse]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nn : ℕ\nl : List α\nh : Nodup l\n⊢ Nodup (sublistsLen n l)\n[PROOFSTEP]\nhave : Pairwise (· ≠ ·) l.sublists' :=\n  Pairwise.imp (fun h => Lex.to_ne (by convert h using 3; simp [swap, eq_comm])) h.sublists'\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nn : ℕ\nl : List α\nh✝ : Nodup l\na✝ b✝ : List α\nh : Lex (swap fun x x_1 => x ≠ x_1) a✝ b✝\n⊢ Lex (fun x x_1 => x ≠ x_1) a✝ b✝\n[PROOFSTEP]\nconvert h using 3\n[GOAL]\ncase h.e'_2.h.e'_4.h.h\nα : Type u\nβ : Type v\nγ : Type w\nn : ℕ\nl : List α\nh✝ : Nodup l\na✝ b✝ : List α\nh : Lex (swap fun x x_1 => x ≠ x_1) a✝ b✝\nx✝ : α\n⊢ (fun x => ¬x = x✝) = fun x => x✝ ≠ x\n[PROOFSTEP]\nsimp [swap, eq_comm]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nn : ℕ\nl : List α\nh : Nodup l\nthis : Pairwise (fun x x_1 => x ≠ x_1) (sublists' l)\n⊢ Nodup (sublistsLen n l)\n[PROOFSTEP]\nexact this.sublist (sublistsLen_sublist_sublists' _ _)\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\n⊢ sublists (map f []) = map (map f) (sublists [])\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\na : α\nl : List α\n⊢ sublists (map f (a :: l)) = map (map f) (sublists (a :: l))\n[PROOFSTEP]\nrw [map_cons, sublists_cons, bind_eq_bind, sublists_map f l, sublists_cons, bind_eq_bind, map_eq_bind, map_eq_bind]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\na : α\nl : List α\n⊢ (List.bind (List.bind (sublists l) fun x => [map f x]) fun x => [x, f a :: x]) =\n    List.bind (List.bind (sublists l) fun x => [x, a :: x]) fun x => [map f x]\n[PROOFSTEP]\ninduction sublists l\n[GOAL]\ncase nil\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\na : α\nl : List α\n⊢ (List.bind (List.bind [] fun x => [map f x]) fun x => [x, f a :: x]) =\n    List.bind (List.bind [] fun x => [x, a :: x]) fun x => [map f x]\n[PROOFSTEP]\nsimp [*]\n  --Porting note: new theorem\n[GOAL]\ncase cons\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\na : α\nl head✝ : List α\ntail✝ : List (List α)\ntail_ih✝ :\n  (List.bind (List.bind tail✝ fun x => [map f x]) fun x => [x, f a :: x]) =\n    List.bind (List.bind tail✝ fun x => [x, a :: x]) fun x => [map f x]\n⊢ (List.bind (List.bind (head✝ :: tail✝) fun x => [map f x]) fun x => [x, f a :: x]) =\n    List.bind (List.bind (head✝ :: tail✝) fun x => [x, a :: x]) fun x => [map f x]\n[PROOFSTEP]\nsimp [*]\n  --Porting note: new theorem\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\n⊢ sublists' (map f []) = map (map f) (sublists' [])\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\na : α\nl : List α\n⊢ sublists' (map f (a :: l)) = map (map f) (sublists' (a :: l))\n[PROOFSTEP]\nsimp [map_cons, sublists'_cons, sublists'_map f l, Function.comp]\n  --Porting note: moved because it is now used to prove `sublists_cons_perm_append`\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nl : List α\n⊢ sublists l ~ sublists' l\n[PROOFSTEP]\nrw [← finRange_map_get l, sublists_map, sublists'_map]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nl : List α\n⊢ map (map (get l)) (sublists (finRange (length l))) ~ map (map (get l)) (sublists' (finRange (length l)))\n[PROOFSTEP]\nrefine' Perm.map _ _\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nl : List α\n⊢ sublists (finRange (length l)) ~ sublists' (finRange (length l))\n[PROOFSTEP]\nexact (perm_ext (nodup_sublists.2 (nodup_finRange _)) (nodup_sublists'.2 (nodup_finRange _))).2 (by simp)\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nl : List α\n⊢ ∀ (a : List (Fin (length l))), a ∈ sublists (finRange (length l)) ↔ a ∈ sublists' (finRange (length l))\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na : α\nl : List α\n⊢ sublists' (a :: l) ~ sublists l ++ map (cons a) (sublists l)\n[PROOFSTEP]\nrw [sublists'_cons]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na : α\nl : List α\n⊢ sublists' l ++ map (cons a) (sublists' l) ~ sublists l ++ map (cons a) (sublists l)\n[PROOFSTEP]\nexact Perm.append (sublists_perm_sublists' _).symm (Perm.map _ (sublists_perm_sublists' _).symm)\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nl : List α\n⊢ ∀ (l₁ l₂ : List α), (l₁, l₂) ∈ revzip (sublists l) → l₁ ++ l₂ ~ l\n[PROOFSTEP]\nrw [revzip]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nl : List α\n⊢ ∀ (l₁ l₂ : List α), (l₁, l₂) ∈ zip (sublists l) (reverse (sublists l)) → l₁ ++ l₂ ~ l\n[PROOFSTEP]\ninduction' l using List.reverseRecOn with l' a ih\n[GOAL]\ncase H0\nα : Type u\nβ : Type v\nγ : Type w\n⊢ ∀ (l₁ l₂ : List α), (l₁, l₂) ∈ zip (sublists []) (reverse (sublists [])) → l₁ ++ l₂ ~ []\n[PROOFSTEP]\nintro l₁ l₂ h\n[GOAL]\ncase H0\nα : Type u\nβ : Type v\nγ : Type w\nl₁ l₂ : List α\nh : (l₁, l₂) ∈ zip (sublists []) (reverse (sublists []))\n⊢ l₁ ++ l₂ ~ []\n[PROOFSTEP]\nsimp at h \n[GOAL]\ncase H0\nα : Type u\nβ : Type v\nγ : Type w\nl₁ l₂ : List α\nh : l₁ = [] ∧ l₂ = []\n⊢ l₁ ++ l₂ ~ []\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase H1\nα : Type u\nβ : Type v\nγ : Type w\nl' : List α\na : α\nih : ∀ (l₁ l₂ : List α), (l₁, l₂) ∈ zip (sublists l') (reverse (sublists l')) → l₁ ++ l₂ ~ l'\n⊢ ∀ (l₁ l₂ : List α), (l₁, l₂) ∈ zip (sublists (l' ++ [a])) (reverse (sublists (l' ++ [a]))) → l₁ ++ l₂ ~ l' ++ [a]\n[PROOFSTEP]\nintro l₁ l₂ h\n[GOAL]\ncase H1\nα : Type u\nβ : Type v\nγ : Type w\nl' : List α\na : α\nih : ∀ (l₁ l₂ : List α), (l₁, l₂) ∈ zip (sublists l') (reverse (sublists l')) → l₁ ++ l₂ ~ l'\nl₁ l₂ : List α\nh : (l₁, l₂) ∈ zip (sublists (l' ++ [a])) (reverse (sublists (l' ++ [a])))\n⊢ l₁ ++ l₂ ~ l' ++ [a]\n[PROOFSTEP]\nrw [sublists_concat, reverse_append, zip_append, ← map_reverse, zip_map_right, zip_map_left] at * <;> [skip; simp]\n[GOAL]\ncase H1\nα : Type u\nβ : Type v\nγ : Type w\nl' : List α\na : α\nih : ∀ (l₁ l₂ : List α), (l₁, l₂) ∈ zip (sublists l') (reverse (sublists l')) → l₁ ++ l₂ ~ l'\nl₁ l₂ : List α\nh : (l₁, l₂) ∈ zip (sublists (l' ++ [a])) (reverse (sublists (l' ++ [a])))\n⊢ l₁ ++ l₂ ~ l' ++ [a]\n[PROOFSTEP]\nrw [sublists_concat, reverse_append, zip_append, ← map_reverse, zip_map_right, zip_map_left] at *\n[GOAL]\ncase H1\nα : Type u\nβ : Type v\nγ : Type w\nl' : List α\na : α\nih : ∀ (l₁ l₂ : List α), (l₁, l₂) ∈ zip (sublists l') (reverse (sublists l')) → l₁ ++ l₂ ~ l'\nl₁ l₂ : List α\nh :\n  (l₁, l₂) ∈\n    map (Prod.map id fun x => x ++ [a]) (zip (sublists l') (reverse (sublists l'))) ++\n      map (Prod.map (fun x => x ++ [a]) id) (zip (sublists l') (reverse (sublists l')))\n⊢ l₁ ++ l₂ ~ l' ++ [a]\n[PROOFSTEP]\nskip\n[GOAL]\ncase H1\nα : Type u\nβ : Type v\nγ : Type w\nl' : List α\na : α\nih : ∀ (l₁ l₂ : List α), (l₁, l₂) ∈ zip (sublists l') (reverse (sublists l')) → l₁ ++ l₂ ~ l'\nl₁ l₂ : List α\nh :\n  (l₁, l₂) ∈\n    zip (sublists l' ++ map (fun x => x ++ [a]) (sublists l'))\n      (reverse (map (fun x => x ++ [a]) (sublists l')) ++ reverse (sublists l'))\n⊢ length (sublists l') = length (reverse (map (fun x => x ++ [a]) (sublists l')))\n[PROOFSTEP]\nsimp\n[GOAL]\ncase H1\nα : Type u\nβ : Type v\nγ : Type w\nl' : List α\na : α\nih : ∀ (l₁ l₂ : List α), (l₁, l₂) ∈ zip (sublists l') (reverse (sublists l')) → l₁ ++ l₂ ~ l'\nl₁ l₂ : List α\nh :\n  (l₁, l₂) ∈\n    map (Prod.map id fun x => x ++ [a]) (zip (sublists l') (reverse (sublists l'))) ++\n      map (Prod.map (fun x => x ++ [a]) id) (zip (sublists l') (reverse (sublists l')))\n⊢ l₁ ++ l₂ ~ l' ++ [a]\n[PROOFSTEP]\nsimp only [Prod.mk.inj_iff, mem_map, mem_append, Prod.map_mk, Prod.exists] at h \n[GOAL]\ncase H1\nα : Type u\nβ : Type v\nγ : Type w\nl' : List α\na : α\nih : ∀ (l₁ l₂ : List α), (l₁, l₂) ∈ zip (sublists l') (reverse (sublists l')) → l₁ ++ l₂ ~ l'\nl₁ l₂ : List α\nh :\n  (∃ a_1 b, (a_1, b) ∈ zip (sublists l') (reverse (sublists l')) ∧ id a_1 = l₁ ∧ b ++ [a] = l₂) ∨\n    ∃ a_1 b, (a_1, b) ∈ zip (sublists l') (reverse (sublists l')) ∧ a_1 ++ [a] = l₁ ∧ id b = l₂\n⊢ l₁ ++ l₂ ~ l' ++ [a]\n[PROOFSTEP]\nrcases h with (⟨l₁, l₂', h, rfl, rfl⟩ | ⟨l₁', l₂, h, rfl, rfl⟩)\n[GOAL]\ncase H1.inl.intro.intro.intro.intro\nα : Type u\nβ : Type v\nγ : Type w\nl' : List α\na : α\nih : ∀ (l₁ l₂ : List α), (l₁, l₂) ∈ zip (sublists l') (reverse (sublists l')) → l₁ ++ l₂ ~ l'\nl₁ l₂' : List α\nh : (l₁, l₂') ∈ zip (sublists l') (reverse (sublists l'))\n⊢ id l₁ ++ (l₂' ++ [a]) ~ l' ++ [a]\n[PROOFSTEP]\nrw [← append_assoc]\n[GOAL]\ncase H1.inl.intro.intro.intro.intro\nα : Type u\nβ : Type v\nγ : Type w\nl' : List α\na : α\nih : ∀ (l₁ l₂ : List α), (l₁, l₂) ∈ zip (sublists l') (reverse (sublists l')) → l₁ ++ l₂ ~ l'\nl₁ l₂' : List α\nh : (l₁, l₂') ∈ zip (sublists l') (reverse (sublists l'))\n⊢ id l₁ ++ l₂' ++ [a] ~ l' ++ [a]\n[PROOFSTEP]\nexact (ih _ _ h).append_right _\n[GOAL]\ncase H1.inr.intro.intro.intro.intro\nα : Type u\nβ : Type v\nγ : Type w\nl' : List α\na : α\nih : ∀ (l₁ l₂ : List α), (l₁, l₂) ∈ zip (sublists l') (reverse (sublists l')) → l₁ ++ l₂ ~ l'\nl₁' l₂ : List α\nh : (l₁', l₂) ∈ zip (sublists l') (reverse (sublists l'))\n⊢ l₁' ++ [a] ++ id l₂ ~ l' ++ [a]\n[PROOFSTEP]\nrw [append_assoc]\n[GOAL]\ncase H1.inr.intro.intro.intro.intro\nα : Type u\nβ : Type v\nγ : Type w\nl' : List α\na : α\nih : ∀ (l₁ l₂ : List α), (l₁, l₂) ∈ zip (sublists l') (reverse (sublists l')) → l₁ ++ l₂ ~ l'\nl₁' l₂ : List α\nh : (l₁', l₂) ∈ zip (sublists l') (reverse (sublists l'))\n⊢ l₁' ++ ([a] ++ id l₂) ~ l' ++ [a]\n[PROOFSTEP]\napply (perm_append_comm.append_left _).trans\n[GOAL]\ncase H1.inr.intro.intro.intro.intro\nα : Type u\nβ : Type v\nγ : Type w\nl' : List α\na : α\nih : ∀ (l₁ l₂ : List α), (l₁, l₂) ∈ zip (sublists l') (reverse (sublists l')) → l₁ ++ l₂ ~ l'\nl₁' l₂ : List α\nh : (l₁', l₂) ∈ zip (sublists l') (reverse (sublists l'))\n⊢ l₁' ++ (id l₂ ++ [a]) ~ l' ++ [a]\n[PROOFSTEP]\nrw [← append_assoc]\n[GOAL]\ncase H1.inr.intro.intro.intro.intro\nα : Type u\nβ : Type v\nγ : Type w\nl' : List α\na : α\nih : ∀ (l₁ l₂ : List α), (l₁, l₂) ∈ zip (sublists l') (reverse (sublists l')) → l₁ ++ l₂ ~ l'\nl₁' l₂ : List α\nh : (l₁', l₂) ∈ zip (sublists l') (reverse (sublists l'))\n⊢ l₁' ++ id l₂ ++ [a] ~ l' ++ [a]\n[PROOFSTEP]\nexact (ih _ _ h).append_right _\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nl : List α\n⊢ ∀ (l₁ l₂ : List α), (l₁, l₂) ∈ revzip (sublists' l) → l₁ ++ l₂ ~ l\n[PROOFSTEP]\nrw [revzip]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nl : List α\n⊢ ∀ (l₁ l₂ : List α), (l₁, l₂) ∈ zip (sublists' l) (reverse (sublists' l)) → l₁ ++ l₂ ~ l\n[PROOFSTEP]\ninduction' l with a l IH\n[GOAL]\ncase nil\nα : Type u\nβ : Type v\nγ : Type w\n⊢ ∀ (l₁ l₂ : List α), (l₁, l₂) ∈ zip (sublists' []) (reverse (sublists' [])) → l₁ ++ l₂ ~ []\n[PROOFSTEP]\nintro l₁ l₂ h\n[GOAL]\ncase cons\nα : Type u\nβ : Type v\nγ : Type w\na : α\nl : List α\nIH : ∀ (l₁ l₂ : List α), (l₁, l₂) ∈ zip (sublists' l) (reverse (sublists' l)) → l₁ ++ l₂ ~ l\n⊢ ∀ (l₁ l₂ : List α), (l₁, l₂) ∈ zip (sublists' (a :: l)) (reverse (sublists' (a :: l))) → l₁ ++ l₂ ~ a :: l\n[PROOFSTEP]\nintro l₁ l₂ h\n[GOAL]\ncase nil\nα : Type u\nβ : Type v\nγ : Type w\nl₁ l₂ : List α\nh : (l₁, l₂) ∈ zip (sublists' []) (reverse (sublists' []))\n⊢ l₁ ++ l₂ ~ []\n[PROOFSTEP]\nsimp at h \n[GOAL]\ncase nil\nα : Type u\nβ : Type v\nγ : Type w\nl₁ l₂ : List α\nh : l₁ = [] ∧ l₂ = []\n⊢ l₁ ++ l₂ ~ []\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase cons\nα : Type u\nβ : Type v\nγ : Type w\na : α\nl : List α\nIH : ∀ (l₁ l₂ : List α), (l₁, l₂) ∈ zip (sublists' l) (reverse (sublists' l)) → l₁ ++ l₂ ~ l\nl₁ l₂ : List α\nh : (l₁, l₂) ∈ zip (sublists' (a :: l)) (reverse (sublists' (a :: l)))\n⊢ l₁ ++ l₂ ~ a :: l\n[PROOFSTEP]\nrw [sublists'_cons, reverse_append, zip_append, ← map_reverse, zip_map_right, zip_map_left] at * <;> [simp at h ; simp]\n[GOAL]\ncase cons\nα : Type u\nβ : Type v\nγ : Type w\na : α\nl : List α\nIH : ∀ (l₁ l₂ : List α), (l₁, l₂) ∈ zip (sublists' l) (reverse (sublists' l)) → l₁ ++ l₂ ~ l\nl₁ l₂ : List α\nh : (l₁, l₂) ∈ zip (sublists' (a :: l)) (reverse (sublists' (a :: l)))\n⊢ l₁ ++ l₂ ~ a :: l\n[PROOFSTEP]\nrw [sublists'_cons, reverse_append, zip_append, ← map_reverse, zip_map_right, zip_map_left] at *\n[GOAL]\ncase cons\nα : Type u\nβ : Type v\nγ : Type w\na : α\nl : List α\nIH : ∀ (l₁ l₂ : List α), (l₁, l₂) ∈ zip (sublists' l) (reverse (sublists' l)) → l₁ ++ l₂ ~ l\nl₁ l₂ : List α\nh :\n  (l₁, l₂) ∈\n    map (Prod.map id (cons a)) (zip (sublists' l) (reverse (sublists' l))) ++\n      map (Prod.map (cons a) id) (zip (sublists' l) (reverse (sublists' l)))\n⊢ l₁ ++ l₂ ~ a :: l\n[PROOFSTEP]\nsimp at h \n[GOAL]\ncase cons\nα : Type u\nβ : Type v\nγ : Type w\na : α\nl : List α\nIH : ∀ (l₁ l₂ : List α), (l₁, l₂) ∈ zip (sublists' l) (reverse (sublists' l)) → l₁ ++ l₂ ~ l\nl₁ l₂ : List α\nh :\n  (l₁, l₂) ∈\n    zip (sublists' l ++ map (cons a) (sublists' l)) (reverse (map (cons a) (sublists' l)) ++ reverse (sublists' l))\n⊢ length (sublists' l) = length (reverse (map (cons a) (sublists' l)))\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\nα : Type u\nβ : Type v\nγ : Type w\na : α\nl : List α\nIH : ∀ (l₁ l₂ : List α), (l₁, l₂) ∈ zip (sublists' l) (reverse (sublists' l)) → l₁ ++ l₂ ~ l\nl₁ l₂ : List α\nh :\n  (∃ a_1 b, (a_1, b) ∈ zip (sublists' l) (reverse (sublists' l)) ∧ a_1 = l₁ ∧ a :: b = l₂) ∨\n    ∃ a_1, (a_1, l₂) ∈ zip (sublists' l) (reverse (sublists' l)) ∧ a :: a_1 = l₁\n⊢ l₁ ++ l₂ ~ a :: l\n[PROOFSTEP]\nrcases h with (⟨l₁, l₂', h, rfl, rfl⟩ | ⟨l₁', h, rfl⟩)\n[GOAL]\ncase cons.inl.intro.intro.intro.intro\nα : Type u\nβ : Type v\nγ : Type w\na : α\nl : List α\nIH : ∀ (l₁ l₂ : List α), (l₁, l₂) ∈ zip (sublists' l) (reverse (sublists' l)) → l₁ ++ l₂ ~ l\nl₁ l₂' : List α\nh : (l₁, l₂') ∈ zip (sublists' l) (reverse (sublists' l))\n⊢ l₁ ++ a :: l₂' ~ a :: l\n[PROOFSTEP]\nexact perm_middle.trans ((IH _ _ h).cons _)\n[GOAL]\ncase cons.inr.intro.intro\nα : Type u\nβ : Type v\nγ : Type w\na : α\nl : List α\nIH : ∀ (l₁ l₂ : List α), (l₁, l₂) ∈ zip (sublists' l) (reverse (sublists' l)) → l₁ ++ l₂ ~ l\nl₂ l₁' : List α\nh : (l₁', l₂) ∈ zip (sublists' l) (reverse (sublists' l))\n⊢ a :: l₁' ++ l₂ ~ a :: l\n[PROOFSTEP]\nexact (IH _ _ h).cons _\n[GOAL]\nα✝ : Type u\nβ : Type v\nγ : Type w\nα : Type u_1\nl : List α\n⊢ (List.bind (range (length l + 1)) fun n => sublistsLen n l) ~ sublists' l\n[PROOFSTEP]\ninduction' l with h tl l_ih\n[GOAL]\ncase nil\nα✝ : Type u\nβ : Type v\nγ : Type w\nα : Type u_1\n⊢ (List.bind (range (length [] + 1)) fun n => sublistsLen n []) ~ sublists' []\n[PROOFSTEP]\nsimp [range_succ]\n[GOAL]\ncase cons\nα✝ : Type u\nβ : Type v\nγ : Type w\nα : Type u_1\nh : α\ntl : List α\nl_ih : (List.bind (range (length tl + 1)) fun n => sublistsLen n tl) ~ sublists' tl\n⊢ (List.bind (range (length (h :: tl) + 1)) fun n => sublistsLen n (h :: tl)) ~ sublists' (h :: tl)\n[PROOFSTEP]\nsimp_rw [range_succ_eq_map, length, cons_bind, map_bind, sublistsLen_succ_cons, sublists'_cons, List.sublistsLen_zero,\n  List.singleton_append]\n[GOAL]\ncase cons\nα✝ : Type u\nβ : Type v\nγ : Type w\nα : Type u_1\nh : α\ntl : List α\nl_ih : (List.bind (range (length tl + 1)) fun n => sublistsLen n tl) ~ sublists' tl\n⊢ ([] :: List.bind (range (length tl + 1)) fun a => sublistsLen (a + 1) tl ++ map (cons h) (sublistsLen a tl)) ~\n    sublists' tl ++ map (cons h) (sublists' tl)\n[PROOFSTEP]\nrefine' ((bind_append_perm (range (tl.length + 1)) _ _).symm.cons _).trans _\n[GOAL]\ncase cons\nα✝ : Type u\nβ : Type v\nγ : Type w\nα : Type u_1\nh : α\ntl : List α\nl_ih : (List.bind (range (length tl + 1)) fun n => sublistsLen n tl) ~ sublists' tl\n⊢ [] ::\n      ((List.bind (range (length tl + 1)) fun a => sublistsLen (a + 1) tl) ++\n        List.bind (range (length tl + 1)) fun a => map (cons h) (sublistsLen a tl)) ~\n    sublists' tl ++ map (cons h) (sublists' tl)\n[PROOFSTEP]\nsimp_rw [← List.bind_map, ← cons_append]\n[GOAL]\ncase cons\nα✝ : Type u\nβ : Type v\nγ : Type w\nα : Type u_1\nh : α\ntl : List α\nl_ih : (List.bind (range (length tl + 1)) fun n => sublistsLen n tl) ~ sublists' tl\n⊢ ([] :: List.bind (range (length tl + 1)) fun a => sublistsLen (a + 1) tl) ++\n      map (cons h) (List.bind (range (length tl + 1)) fun a => sublistsLen a tl) ~\n    sublists' tl ++ map (cons h) (sublists' tl)\n[PROOFSTEP]\nrw [← List.singleton_append, ← List.sublistsLen_zero tl]\n[GOAL]\ncase cons\nα✝ : Type u\nβ : Type v\nγ : Type w\nα : Type u_1\nh : α\ntl : List α\nl_ih : (List.bind (range (length tl + 1)) fun n => sublistsLen n tl) ~ sublists' tl\n⊢ (sublistsLen 0 tl ++ List.bind (range (length tl + 1)) fun a => sublistsLen (a + 1) tl) ++\n      map (cons h) (List.bind (range (length tl + 1)) fun a => sublistsLen a tl) ~\n    sublists' tl ++ map (cons h) (sublists' tl)\n[PROOFSTEP]\nrefine' Perm.append _ (l_ih.map _)\n[GOAL]\ncase cons\nα✝ : Type u\nβ : Type v\nγ : Type w\nα : Type u_1\nh : α\ntl : List α\nl_ih : (List.bind (range (length tl + 1)) fun n => sublistsLen n tl) ~ sublists' tl\n⊢ (sublistsLen 0 tl ++ List.bind (range (length tl + 1)) fun a => sublistsLen (a + 1) tl) ~ sublists' tl\n[PROOFSTEP]\nrw [List.range_succ, append_bind, bind_singleton, sublistsLen_of_length_lt (Nat.lt_succ_self _), append_nil, ←\n  List.map_bind (fun n => sublistsLen n tl) Nat.succ, ← cons_bind 0 _ fun n => sublistsLen n tl, ← range_succ_eq_map]\n[GOAL]\ncase cons\nα✝ : Type u\nβ : Type v\nγ : Type w\nα : Type u_1\nh : α\ntl : List α\nl_ih : (List.bind (range (length tl + 1)) fun n => sublistsLen n tl) ~ sublists' tl\n⊢ (List.bind (range (length tl + 1)) fun n => sublistsLen n tl) ~ sublists' tl\n[PROOFSTEP]\nexact l_ih\n", "meta": {"mathlib_filename": "Mathlib.Data.List.Sublists", "llama_tokens": 23853, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7577943603346811, "lm_q2_score": 0.7090191399336402, "lm_q1q2_score": 0.5372907056110586}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : DecidableEq α\nm : Multiset α\na : α\nx✝ : List α\n⊢ count a (dedup (Quot.mk Setoid.r x✝)) = if a ∈ Quot.mk Setoid.r x✝ then 1 else 0\n[PROOFSTEP]\nsimp only [quot_mk_to_coe'', coe_dedup, mem_coe, List.mem_dedup, coe_nodup, coe_count]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : DecidableEq α\nm : Multiset α\na : α\nx✝ : List α\n⊢ List.count a (List.dedup x✝) = if a ∈ x✝ then 1 else 0\n[PROOFSTEP]\napply List.count_dedup _ _\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : DecidableEq α\ninst✝ : DecidableEq β\nm : Multiset α\nf : α → Multiset β\n⊢ dedup (bind (dedup m) f) = dedup (bind m f)\n[PROOFSTEP]\next x\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\ninst✝¹ : DecidableEq α\ninst✝ : DecidableEq β\nm : Multiset α\nf : α → Multiset β\nx : β\n⊢ count x (dedup (bind (dedup m) f)) = count x (dedup (bind m f))\n[PROOFSTEP]\nsimp_rw [count_dedup]\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\ninst✝¹ : DecidableEq α\ninst✝ : DecidableEq β\nm : Multiset α\nf : α → Multiset β\nx : β\n⊢ (if x ∈ bind (dedup m) f then 1 else 0) = if x ∈ bind m f then 1 else 0\n[PROOFSTEP]\nrefine if_congr ?_ rfl rfl\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\ninst✝¹ : DecidableEq α\ninst✝ : DecidableEq β\nm : Multiset α\nf : α → Multiset β\nx : β\n⊢ x ∈ bind (dedup m) f ↔ x ∈ bind m f\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : DecidableEq α\ns : Multiset α\n⊢ s ≤ dedup s ↔ Nodup s\n[PROOFSTEP]\nrw [le_dedup, and_iff_right le_rfl]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : DecidableEq α\ns t : Multiset α\n⊢ dedup s = dedup t ↔ ∀ (a : α), a ∈ s ↔ a ∈ t\n[PROOFSTEP]\nsimp [Nodup.ext]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : DecidableEq α\ninst✝ : DecidableEq β\nf : α → β\ns : Multiset α\n⊢ dedup (map f (dedup s)) = dedup (map f s)\n[PROOFSTEP]\nsimp [dedup_ext]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : DecidableEq α\ns : Multiset α\nn : ℕ\nh0 : n ≠ 0\n⊢ dedup (n • s) = dedup s\n[PROOFSTEP]\next a\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\ninst✝ : DecidableEq α\ns : Multiset α\nn : ℕ\nh0 : n ≠ 0\na : α\n⊢ count a (dedup (n • s)) = count a (dedup s)\n[PROOFSTEP]\nby_cases h : a ∈ s\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\ninst✝ : DecidableEq α\ns : Multiset α\nn : ℕ\nh0 : n ≠ 0\na : α\nh : a ∈ s\n⊢ count a (dedup (n • s)) = count a (dedup s)\n[PROOFSTEP]\nsimp [h, h0]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\ninst✝ : DecidableEq α\ns : Multiset α\nn : ℕ\nh0 : n ≠ 0\na : α\nh : ¬a ∈ s\n⊢ count a (dedup (n • s)) = count a (dedup s)\n[PROOFSTEP]\nsimp [h, h0]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : DecidableEq α\ns t : Multiset α\nhno : Nodup s\n⊢ s ≤ Multiset.dedup t ↔ s ≤ t\n[PROOFSTEP]\nsimp [le_dedup, hno]\n[GOAL]\nα : Type u_1\ns t : Multiset α\nn : ℕ\nh : Nodup s\nhn : n ≠ 0\n⊢ s ≤ n • t ↔ s ≤ t\n[PROOFSTEP]\nclassical\nrw [← h.le_dedup_iff_le, Iff.comm, ← h.le_dedup_iff_le]\nsimp [hn]\n[GOAL]\nα : Type u_1\ns t : Multiset α\nn : ℕ\nh : Nodup s\nhn : n ≠ 0\n⊢ s ≤ n • t ↔ s ≤ t\n[PROOFSTEP]\nrw [← h.le_dedup_iff_le, Iff.comm, ← h.le_dedup_iff_le]\n[GOAL]\nα : Type u_1\ns t : Multiset α\nn : ℕ\nh : Nodup s\nhn : n ≠ 0\n⊢ s ≤ Multiset.dedup t ↔ s ≤ Multiset.dedup (n • t)\n[PROOFSTEP]\nsimp [hn]\n", "meta": {"mathlib_filename": "Mathlib.Data.Multiset.Dedup", "llama_tokens": 1643, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.757794360334681, "lm_q2_score": 0.7090191214879991, "lm_q1q2_score": 0.5372906916330557}}
{"text": "[GOAL]\nX✝ : Type u\nY : Type v\ninst✝² : TopologicalSpace X✝\ninst✝¹ : TopologicalSpace Y\nx₀ x₁ : X✝\nX : Type u\ninst✝ : TopologicalSpace X\nx : X\n⊢ Group (FundamentalGroup X x)\n[PROOFSTEP]\ndsimp only [FundamentalGroup]\n[GOAL]\nX✝ : Type u\nY : Type v\ninst✝² : TopologicalSpace X✝\ninst✝¹ : TopologicalSpace Y\nx₀ x₁ : X✝\nX : Type u\ninst✝ : TopologicalSpace X\nx : X\n⊢ Group (Aut x)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nX✝ : Type u\nY : Type v\ninst✝² : TopologicalSpace X✝\ninst✝¹ : TopologicalSpace Y\nx₀ x₁ : X✝\nX : Type u\ninst✝ : TopologicalSpace X\nx : X\n⊢ Inhabited (FundamentalGroup X x)\n[PROOFSTEP]\ndsimp only [FundamentalGroup]\n[GOAL]\nX✝ : Type u\nY : Type v\ninst✝² : TopologicalSpace X✝\ninst✝¹ : TopologicalSpace Y\nx₀ x₁ : X✝\nX : Type u\ninst✝ : TopologicalSpace X\nx : X\n⊢ Inhabited (Aut x)\n[PROOFSTEP]\ninfer_instance\n", "meta": {"mathlib_filename": "Mathlib.AlgebraicTopology.FundamentalGroupoid.FundamentalGroup", "llama_tokens": 386, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8031737963569014, "lm_q2_score": 0.6688802735722128, "lm_q1q2_score": 0.537227108633237}}
{"text": "[GOAL]\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝ : Ω\nπ : Ω → ℕ\nr : ℝ\nω : Ω\nn : ℕ\nhπn : ∀ (ω : Ω), π ω ≤ n\n⊢ leastGE f r (π ω) ω = min (π ω) (leastGE f r n ω)\n[PROOFSTEP]\nclassical\nrefine' le_antisymm (le_min (leastGE_le _) (leastGE_mono (hπn ω) r ω)) _\nby_cases hle : π ω ≤ leastGE f r n ω\n· rw [min_eq_left hle, leastGE]\n  by_cases h : ∃ j ∈ Set.Icc 0 (π ω), f j ω ∈ Set.Ici r\n  · refine' hle.trans (Eq.le _)\n    rw [leastGE, ← hitting_eq_hitting_of_exists (hπn ω) h]\n  · simp only [hitting, if_neg h, le_rfl]\n· rw [min_eq_right (not_le.1 hle).le, leastGE, leastGE, ← hitting_eq_hitting_of_exists (hπn ω) _]\n  rw [not_le, leastGE, hitting_lt_iff _ (hπn ω)] at hle \n  exact\n    let ⟨j, hj₁, hj₂⟩ := hle\n    ⟨j, ⟨hj₁.1, hj₁.2.le⟩, hj₂⟩\n[GOAL]\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝ : Ω\nπ : Ω → ℕ\nr : ℝ\nω : Ω\nn : ℕ\nhπn : ∀ (ω : Ω), π ω ≤ n\n⊢ leastGE f r (π ω) ω = min (π ω) (leastGE f r n ω)\n[PROOFSTEP]\nrefine' le_antisymm (le_min (leastGE_le _) (leastGE_mono (hπn ω) r ω)) _\n[GOAL]\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝ : Ω\nπ : Ω → ℕ\nr : ℝ\nω : Ω\nn : ℕ\nhπn : ∀ (ω : Ω), π ω ≤ n\n⊢ min (π ω) (leastGE f r n ω) ≤ leastGE f r (π ω) ω\n[PROOFSTEP]\nby_cases hle : π ω ≤ leastGE f r n ω\n[GOAL]\ncase pos\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝ : Ω\nπ : Ω → ℕ\nr : ℝ\nω : Ω\nn : ℕ\nhπn : ∀ (ω : Ω), π ω ≤ n\nhle : π ω ≤ leastGE f r n ω\n⊢ min (π ω) (leastGE f r n ω) ≤ leastGE f r (π ω) ω\n[PROOFSTEP]\nrw [min_eq_left hle, leastGE]\n[GOAL]\ncase pos\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝ : Ω\nπ : Ω → ℕ\nr : ℝ\nω : Ω\nn : ℕ\nhπn : ∀ (ω : Ω), π ω ≤ n\nhle : π ω ≤ leastGE f r n ω\n⊢ π ω ≤ hitting f (Set.Ici r) 0 (π ω) ω\n[PROOFSTEP]\nby_cases h : ∃ j ∈ Set.Icc 0 (π ω), f j ω ∈ Set.Ici r\n[GOAL]\ncase pos\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝ : Ω\nπ : Ω → ℕ\nr : ℝ\nω : Ω\nn : ℕ\nhπn : ∀ (ω : Ω), π ω ≤ n\nhle : π ω ≤ leastGE f r n ω\nh : ∃ j, j ∈ Set.Icc 0 (π ω) ∧ f j ω ∈ Set.Ici r\n⊢ π ω ≤ hitting f (Set.Ici r) 0 (π ω) ω\n[PROOFSTEP]\nrefine' hle.trans (Eq.le _)\n[GOAL]\ncase pos\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝ : Ω\nπ : Ω → ℕ\nr : ℝ\nω : Ω\nn : ℕ\nhπn : ∀ (ω : Ω), π ω ≤ n\nhle : π ω ≤ leastGE f r n ω\nh : ∃ j, j ∈ Set.Icc 0 (π ω) ∧ f j ω ∈ Set.Ici r\n⊢ leastGE f r n ω = hitting f (Set.Ici r) 0 (π ω) ω\n[PROOFSTEP]\nrw [leastGE, ← hitting_eq_hitting_of_exists (hπn ω) h]\n[GOAL]\ncase neg\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝ : Ω\nπ : Ω → ℕ\nr : ℝ\nω : Ω\nn : ℕ\nhπn : ∀ (ω : Ω), π ω ≤ n\nhle : π ω ≤ leastGE f r n ω\nh : ¬∃ j, j ∈ Set.Icc 0 (π ω) ∧ f j ω ∈ Set.Ici r\n⊢ π ω ≤ hitting f (Set.Ici r) 0 (π ω) ω\n[PROOFSTEP]\nsimp only [hitting, if_neg h, le_rfl]\n[GOAL]\ncase neg\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝ : Ω\nπ : Ω → ℕ\nr : ℝ\nω : Ω\nn : ℕ\nhπn : ∀ (ω : Ω), π ω ≤ n\nhle : ¬π ω ≤ leastGE f r n ω\n⊢ min (π ω) (leastGE f r n ω) ≤ leastGE f r (π ω) ω\n[PROOFSTEP]\nrw [min_eq_right (not_le.1 hle).le, leastGE, leastGE, ← hitting_eq_hitting_of_exists (hπn ω) _]\n[GOAL]\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝ : Ω\nπ : Ω → ℕ\nr : ℝ\nω : Ω\nn : ℕ\nhπn : ∀ (ω : Ω), π ω ≤ n\nhle : ¬π ω ≤ leastGE f r n ω\n⊢ ∃ j, j ∈ Set.Icc 0 (π ω) ∧ f j ω ∈ Set.Ici r\n[PROOFSTEP]\nrw [not_le, leastGE, hitting_lt_iff _ (hπn ω)] at hle \n[GOAL]\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝ : Ω\nπ : Ω → ℕ\nr : ℝ\nω : Ω\nn : ℕ\nhπn : ∀ (ω : Ω), π ω ≤ n\nhle : ∃ j, j ∈ Set.Ico 0 (π ω) ∧ f j ω ∈ Set.Ici r\n⊢ ∃ j, j ∈ Set.Icc 0 (π ω) ∧ f j ω ∈ Set.Ici r\n[PROOFSTEP]\nexact\n  let ⟨j, hj₁, hj₂⟩ := hle\n  ⟨j, ⟨hj₁.1, hj₁.2.le⟩, hj₂⟩\n[GOAL]\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf✝ : ℕ → Ω → ℝ\nω : Ω\nf : ℕ → Ω → ℝ\nπ : Ω → ℕ\nr : ℝ\nn : ℕ\nhπn : ∀ (ω : Ω), π ω ≤ n\n⊢ stoppedValue (fun i => stoppedValue f (leastGE f r i)) π = stoppedValue (stoppedProcess f (leastGE f r n)) π\n[PROOFSTEP]\next1 ω\n[GOAL]\ncase h\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf✝ : ℕ → Ω → ℝ\nω✝ : Ω\nf : ℕ → Ω → ℝ\nπ : Ω → ℕ\nr : ℝ\nn : ℕ\nhπn : ∀ (ω : Ω), π ω ≤ n\nω : Ω\n⊢ stoppedValue (fun i => stoppedValue f (leastGE f r i)) π ω = stoppedValue (stoppedProcess f (leastGE f r n)) π ω\n[PROOFSTEP]\nsimp_rw [stoppedProcess, stoppedValue]\n[GOAL]\ncase h\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf✝ : ℕ → Ω → ℝ\nω✝ : Ω\nf : ℕ → Ω → ℝ\nπ : Ω → ℕ\nr : ℝ\nn : ℕ\nhπn : ∀ (ω : Ω), π ω ≤ n\nω : Ω\n⊢ f (leastGE f r (π ω) ω) ω = f (min (π ω) (leastGE f r n ω)) ω\n[PROOFSTEP]\nrw [leastGE_eq_min _ _ _ hπn]\n[GOAL]\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω : Ω\ninst✝ : IsFiniteMeasure μ\nhf : Submartingale f ℱ μ\nr : ℝ\n⊢ Submartingale (fun i => stoppedValue f (leastGE f r i)) ℱ μ\n[PROOFSTEP]\nrw [submartingale_iff_expected_stoppedValue_mono]\n[GOAL]\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω : Ω\ninst✝ : IsFiniteMeasure μ\nhf : Submartingale f ℱ μ\nr : ℝ\n⊢ ∀ (τ π : Ω → ℕ),\n    IsStoppingTime ℱ τ →\n      IsStoppingTime ℱ π →\n        τ ≤ π →\n          (∃ N, ∀ (x : Ω), π x ≤ N) →\n            ∫ (x : Ω), stoppedValue (fun i => stoppedValue f (leastGE f r i)) τ x ∂μ ≤\n              ∫ (x : Ω), stoppedValue (fun i => stoppedValue f (leastGE f r i)) π x ∂μ\n[PROOFSTEP]\nintro σ π hσ hπ hσ_le_π hπ_bdd\n[GOAL]\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω : Ω\ninst✝ : IsFiniteMeasure μ\nhf : Submartingale f ℱ μ\nr : ℝ\nσ π : Ω → ℕ\nhσ : IsStoppingTime ℱ σ\nhπ : IsStoppingTime ℱ π\nhσ_le_π : σ ≤ π\nhπ_bdd : ∃ N, ∀ (x : Ω), π x ≤ N\n⊢ ∫ (x : Ω), stoppedValue (fun i => stoppedValue f (leastGE f r i)) σ x ∂μ ≤\n    ∫ (x : Ω), stoppedValue (fun i => stoppedValue f (leastGE f r i)) π x ∂μ\n[PROOFSTEP]\nobtain ⟨n, hπ_le_n⟩ := hπ_bdd\n[GOAL]\ncase intro\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω : Ω\ninst✝ : IsFiniteMeasure μ\nhf : Submartingale f ℱ μ\nr : ℝ\nσ π : Ω → ℕ\nhσ : IsStoppingTime ℱ σ\nhπ : IsStoppingTime ℱ π\nhσ_le_π : σ ≤ π\nn : ℕ\nhπ_le_n : ∀ (x : Ω), π x ≤ n\n⊢ ∫ (x : Ω), stoppedValue (fun i => stoppedValue f (leastGE f r i)) σ x ∂μ ≤\n    ∫ (x : Ω), stoppedValue (fun i => stoppedValue f (leastGE f r i)) π x ∂μ\n[PROOFSTEP]\nsimp_rw [stoppedValue_stoppedValue_leastGE f σ r fun i => (hσ_le_π i).trans (hπ_le_n i)]\n[GOAL]\ncase intro\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω : Ω\ninst✝ : IsFiniteMeasure μ\nhf : Submartingale f ℱ μ\nr : ℝ\nσ π : Ω → ℕ\nhσ : IsStoppingTime ℱ σ\nhπ : IsStoppingTime ℱ π\nhσ_le_π : σ ≤ π\nn : ℕ\nhπ_le_n : ∀ (x : Ω), π x ≤ n\n⊢ ∫ (x : Ω), stoppedValue (stoppedProcess f (leastGE f r n)) σ x ∂μ ≤\n    ∫ (x : Ω), stoppedValue (fun i => stoppedValue f (leastGE f r i)) π x ∂μ\n[PROOFSTEP]\nsimp_rw [stoppedValue_stoppedValue_leastGE f π r hπ_le_n]\n[GOAL]\ncase intro\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω : Ω\ninst✝ : IsFiniteMeasure μ\nhf : Submartingale f ℱ μ\nr : ℝ\nσ π : Ω → ℕ\nhσ : IsStoppingTime ℱ σ\nhπ : IsStoppingTime ℱ π\nhσ_le_π : σ ≤ π\nn : ℕ\nhπ_le_n : ∀ (x : Ω), π x ≤ n\n⊢ ∫ (x : Ω), stoppedValue (stoppedProcess f (leastGE f r n)) σ x ∂μ ≤\n    ∫ (x : Ω), stoppedValue (stoppedProcess f (leastGE f r n)) π x ∂μ\n[PROOFSTEP]\nrefine' hf.expected_stoppedValue_mono _ _ _ fun ω => (min_le_left _ _).trans (hπ_le_n ω)\n[GOAL]\ncase intro.refine'_1\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω : Ω\ninst✝ : IsFiniteMeasure μ\nhf : Submartingale f ℱ μ\nr : ℝ\nσ π : Ω → ℕ\nhσ : IsStoppingTime ℱ σ\nhπ : IsStoppingTime ℱ π\nhσ_le_π : σ ≤ π\nn : ℕ\nhπ_le_n : ∀ (x : Ω), π x ≤ n\n⊢ IsStoppingTime ℱ fun x => min (σ x) (leastGE f r n x)\n[PROOFSTEP]\nexact hσ.min (hf.adapted.isStoppingTime_leastGE _ _)\n[GOAL]\ncase intro.refine'_2\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω : Ω\ninst✝ : IsFiniteMeasure μ\nhf : Submartingale f ℱ μ\nr : ℝ\nσ π : Ω → ℕ\nhσ : IsStoppingTime ℱ σ\nhπ : IsStoppingTime ℱ π\nhσ_le_π : σ ≤ π\nn : ℕ\nhπ_le_n : ∀ (x : Ω), π x ≤ n\n⊢ IsStoppingTime ℱ fun x => min (π x) (leastGE f r n x)\n[PROOFSTEP]\nexact hπ.min (hf.adapted.isStoppingTime_leastGE _ _)\n[GOAL]\ncase intro.refine'_3\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω : Ω\ninst✝ : IsFiniteMeasure μ\nhf : Submartingale f ℱ μ\nr : ℝ\nσ π : Ω → ℕ\nhσ : IsStoppingTime ℱ σ\nhπ : IsStoppingTime ℱ π\nhσ_le_π : σ ≤ π\nn : ℕ\nhπ_le_n : ∀ (x : Ω), π x ≤ n\n⊢ (fun x => min (σ x) (leastGE f r n x)) ≤ fun x => min (π x) (leastGE f r n x)\n[PROOFSTEP]\nexact fun ω => min_le_min (hσ_le_π ω) le_rfl\n[GOAL]\ncase hadp\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω : Ω\ninst✝ : IsFiniteMeasure μ\nhf : Submartingale f ℱ μ\nr : ℝ\n⊢ Adapted ℱ fun i => stoppedValue f (leastGE f r i)\n[PROOFSTEP]\nexact fun i =>\n  stronglyMeasurable_stoppedValue_of_le hf.adapted.progMeasurable_of_discrete (hf.adapted.isStoppingTime_leastGE _ _)\n    leastGE_le\n[GOAL]\ncase hint\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω : Ω\ninst✝ : IsFiniteMeasure μ\nhf : Submartingale f ℱ μ\nr : ℝ\n⊢ ∀ (i : ℕ), Integrable (stoppedValue f (leastGE f r i))\n[PROOFSTEP]\nexact fun i => integrable_stoppedValue _ (hf.adapted.isStoppingTime_leastGE _ _) hf.integrable leastGE_le\n[GOAL]\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω : Ω\nr : ℝ\nR : ℝ≥0\nhr : 0 ≤ r\nhf0 : f 0 = 0\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\ni : ℕ\n⊢ ∀ᵐ (ω : Ω) ∂μ, stoppedValue f (leastGE f r i) ω ≤ r + ↑R\n[PROOFSTEP]\nfilter_upwards [hbdd] with ω hbddω\n[GOAL]\ncase h\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝ : Ω\nr : ℝ\nR : ℝ≥0\nhr : 0 ≤ r\nhf0 : f 0 = 0\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\ni : ℕ\nω : Ω\nhbddω : ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\n⊢ stoppedValue f (leastGE f r i) ω ≤ r + ↑R\n[PROOFSTEP]\nchange f (leastGE f r i ω) ω ≤ r + R\n[GOAL]\ncase h\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝ : Ω\nr : ℝ\nR : ℝ≥0\nhr : 0 ≤ r\nhf0 : f 0 = 0\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\ni : ℕ\nω : Ω\nhbddω : ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\n⊢ f (leastGE f r i ω) ω ≤ r + ↑R\n[PROOFSTEP]\nby_cases heq : leastGE f r i ω = 0\n[GOAL]\ncase pos\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝ : Ω\nr : ℝ\nR : ℝ≥0\nhr : 0 ≤ r\nhf0 : f 0 = 0\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\ni : ℕ\nω : Ω\nhbddω : ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\nheq : leastGE f r i ω = 0\n⊢ f (leastGE f r i ω) ω ≤ r + ↑R\n[PROOFSTEP]\nrw [heq, hf0, Pi.zero_apply]\n[GOAL]\ncase pos\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝ : Ω\nr : ℝ\nR : ℝ≥0\nhr : 0 ≤ r\nhf0 : f 0 = 0\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\ni : ℕ\nω : Ω\nhbddω : ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\nheq : leastGE f r i ω = 0\n⊢ 0 ≤ r + ↑R\n[PROOFSTEP]\nexact add_nonneg hr R.coe_nonneg\n[GOAL]\ncase neg\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝ : Ω\nr : ℝ\nR : ℝ≥0\nhr : 0 ≤ r\nhf0 : f 0 = 0\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\ni : ℕ\nω : Ω\nhbddω : ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\nheq : ¬leastGE f r i ω = 0\n⊢ f (leastGE f r i ω) ω ≤ r + ↑R\n[PROOFSTEP]\nobtain ⟨k, hk⟩ := Nat.exists_eq_succ_of_ne_zero heq\n[GOAL]\ncase neg.intro\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝ : Ω\nr : ℝ\nR : ℝ≥0\nhr : 0 ≤ r\nhf0 : f 0 = 0\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\ni : ℕ\nω : Ω\nhbddω : ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\nheq : ¬leastGE f r i ω = 0\nk : ℕ\nhk : leastGE f r i ω = Nat.succ k\n⊢ f (leastGE f r i ω) ω ≤ r + ↑R\n[PROOFSTEP]\nrw [hk, add_comm, ← sub_le_iff_le_add]\n[GOAL]\ncase neg.intro\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝ : Ω\nr : ℝ\nR : ℝ≥0\nhr : 0 ≤ r\nhf0 : f 0 = 0\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\ni : ℕ\nω : Ω\nhbddω : ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\nheq : ¬leastGE f r i ω = 0\nk : ℕ\nhk : leastGE f r i ω = Nat.succ k\n⊢ f (Nat.succ k) ω - r ≤ ↑R\n[PROOFSTEP]\nhave := not_mem_of_lt_hitting (hk.symm ▸ k.lt_succ_self : k < leastGE f r i ω) (zero_le _)\n[GOAL]\ncase neg.intro\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝ : Ω\nr : ℝ\nR : ℝ≥0\nhr : 0 ≤ r\nhf0 : f 0 = 0\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\ni : ℕ\nω : Ω\nhbddω : ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\nheq : ¬leastGE f r i ω = 0\nk : ℕ\nhk : leastGE f r i ω = Nat.succ k\nthis : ¬f k ω ∈ Set.Ici r\n⊢ f (Nat.succ k) ω - r ≤ ↑R\n[PROOFSTEP]\nsimp only [Set.mem_union, Set.mem_Iic, Set.mem_Ici, not_or, not_le] at this \n[GOAL]\ncase neg.intro\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝ : Ω\nr : ℝ\nR : ℝ≥0\nhr : 0 ≤ r\nhf0 : f 0 = 0\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\ni : ℕ\nω : Ω\nhbddω : ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\nheq : ¬leastGE f r i ω = 0\nk : ℕ\nhk : leastGE f r i ω = Nat.succ k\nthis : f k ω < r\n⊢ f (Nat.succ k) ω - r ≤ ↑R\n[PROOFSTEP]\nexact (sub_lt_sub_left this _).le.trans ((le_abs_self _).trans (hbddω _))\n[GOAL]\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhf : Submartingale f ℱ μ\nhr : 0 ≤ r\nhf0 : f 0 = 0\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\ni : ℕ\n⊢ snorm (stoppedValue f (leastGE f r i)) 1 μ ≤ 2 * ↑↑μ Set.univ * ENNReal.ofReal (r + ↑R)\n[PROOFSTEP]\nrefine' snorm_one_le_of_le' ((hf.stoppedValue_leastGE r).integrable _) _ (norm_stoppedValue_leastGE_le hr hf0 hbdd i)\n[GOAL]\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhf : Submartingale f ℱ μ\nhr : 0 ≤ r\nhf0 : f 0 = 0\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\ni : ℕ\n⊢ 0 ≤ ∫ (x : Ω), stoppedValue f (leastGE f r i) x ∂μ\n[PROOFSTEP]\nrw [← integral_univ]\n[GOAL]\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhf : Submartingale f ℱ μ\nhr : 0 ≤ r\nhf0 : f 0 = 0\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\ni : ℕ\n⊢ 0 ≤ ∫ (x : Ω) in Set.univ, stoppedValue f (leastGE f r i) x ∂μ\n[PROOFSTEP]\nrefine' le_trans _ ((hf.stoppedValue_leastGE r).set_integral_le (zero_le _) MeasurableSet.univ)\n[GOAL]\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhf : Submartingale f ℱ μ\nhr : 0 ≤ r\nhf0 : f 0 = 0\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\ni : ℕ\n⊢ 0 ≤ ∫ (ω : Ω) in Set.univ, stoppedValue f (leastGE f r 0) ω ∂μ\n[PROOFSTEP]\nsimp_rw [stoppedValue, leastGE, hitting_of_le le_rfl, hf0, integral_zero', le_rfl]\n[GOAL]\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhf : Submartingale f ℱ μ\nhr : 0 ≤ r\nhf0 : f 0 = 0\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\ni : ℕ\n⊢ snorm (stoppedValue f (leastGE f r i)) 1 μ ≤ ↑(ENNReal.toNNReal (2 * ↑↑μ Set.univ * ENNReal.ofReal (r + ↑R)))\n[PROOFSTEP]\nrefine' (hf.stoppedValue_leastGE_snorm_le hr hf0 hbdd i).trans _\n[GOAL]\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhf : Submartingale f ℱ μ\nhr : 0 ≤ r\nhf0 : f 0 = 0\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\ni : ℕ\n⊢ 2 * ↑↑μ Set.univ * ENNReal.ofReal (r + ↑R) ≤ ↑(ENNReal.toNNReal (2 * ↑↑μ Set.univ * ENNReal.ofReal (r + ↑R)))\n[PROOFSTEP]\nsimp [ENNReal.coe_toNNReal (measure_ne_top μ _), ENNReal.coe_toNNReal]\n[GOAL]\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhf : Submartingale f ℱ μ\nhf0 : f 0 = 0\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\n⊢ ∀ᵐ (ω : Ω) ∂μ, BddAbove (Set.range fun n => f n ω) → ∃ c, Tendsto (fun n => f n ω) atTop (𝓝 c)\n[PROOFSTEP]\nhave ht : ∀ᵐ ω ∂μ, ∀ i : ℕ, ∃ c, Tendsto (fun n => stoppedValue f (leastGE f i n) ω) atTop (𝓝 c) :=\n  by\n  rw [ae_all_iff]\n  exact fun i =>\n    Submartingale.exists_ae_tendsto_of_bdd (hf.stoppedValue_leastGE i)\n      (hf.stoppedValue_leastGE_snorm_le' i.cast_nonneg hf0 hbdd)\n[GOAL]\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhf : Submartingale f ℱ μ\nhf0 : f 0 = 0\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\n⊢ ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), ∃ c, Tendsto (fun n => stoppedValue f (leastGE f (↑i) n) ω) atTop (𝓝 c)\n[PROOFSTEP]\nrw [ae_all_iff]\n[GOAL]\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhf : Submartingale f ℱ μ\nhf0 : f 0 = 0\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\n⊢ ∀ (i : ℕ), ∀ᵐ (a : Ω) ∂μ, ∃ c, Tendsto (fun n => stoppedValue f (leastGE f (↑i) n) a) atTop (𝓝 c)\n[PROOFSTEP]\nexact fun i =>\n  Submartingale.exists_ae_tendsto_of_bdd (hf.stoppedValue_leastGE i)\n    (hf.stoppedValue_leastGE_snorm_le' i.cast_nonneg hf0 hbdd)\n[GOAL]\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhf : Submartingale f ℱ μ\nhf0 : f 0 = 0\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\nht : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), ∃ c, Tendsto (fun n => stoppedValue f (leastGE f (↑i) n) ω) atTop (𝓝 c)\n⊢ ∀ᵐ (ω : Ω) ∂μ, BddAbove (Set.range fun n => f n ω) → ∃ c, Tendsto (fun n => f n ω) atTop (𝓝 c)\n[PROOFSTEP]\nfilter_upwards [ht] with ω hω hωb\n[GOAL]\ncase h\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝ : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhf : Submartingale f ℱ μ\nhf0 : f 0 = 0\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\nht : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), ∃ c, Tendsto (fun n => stoppedValue f (leastGE f (↑i) n) ω) atTop (𝓝 c)\nω : Ω\nhω : ∀ (i : ℕ), ∃ c, Tendsto (fun n => stoppedValue f (leastGE f (↑i) n) ω) atTop (𝓝 c)\nhωb : BddAbove (Set.range fun n => f n ω)\n⊢ ∃ c, Tendsto (fun n => f n ω) atTop (𝓝 c)\n[PROOFSTEP]\nrw [BddAbove] at hωb \n[GOAL]\ncase h\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝ : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhf : Submartingale f ℱ μ\nhf0 : f 0 = 0\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\nht : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), ∃ c, Tendsto (fun n => stoppedValue f (leastGE f (↑i) n) ω) atTop (𝓝 c)\nω : Ω\nhω : ∀ (i : ℕ), ∃ c, Tendsto (fun n => stoppedValue f (leastGE f (↑i) n) ω) atTop (𝓝 c)\nhωb : Set.Nonempty (upperBounds (Set.range fun n => f n ω))\n⊢ ∃ c, Tendsto (fun n => f n ω) atTop (𝓝 c)\n[PROOFSTEP]\nobtain ⟨i, hi⟩ := exists_nat_gt hωb.some\n[GOAL]\ncase h.intro\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝ : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhf : Submartingale f ℱ μ\nhf0 : f 0 = 0\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\nht : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), ∃ c, Tendsto (fun n => stoppedValue f (leastGE f (↑i) n) ω) atTop (𝓝 c)\nω : Ω\nhω : ∀ (i : ℕ), ∃ c, Tendsto (fun n => stoppedValue f (leastGE f (↑i) n) ω) atTop (𝓝 c)\nhωb : Set.Nonempty (upperBounds (Set.range fun n => f n ω))\ni : ℕ\nhi : Set.Nonempty.some hωb < ↑i\n⊢ ∃ c, Tendsto (fun n => f n ω) atTop (𝓝 c)\n[PROOFSTEP]\nhave hib : ∀ n, f n ω < i := by\n  intro n\n  exact lt_of_le_of_lt ((mem_upperBounds.1 hωb.some_mem) _ ⟨n, rfl⟩) hi\n[GOAL]\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝ : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhf : Submartingale f ℱ μ\nhf0 : f 0 = 0\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\nht : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), ∃ c, Tendsto (fun n => stoppedValue f (leastGE f (↑i) n) ω) atTop (𝓝 c)\nω : Ω\nhω : ∀ (i : ℕ), ∃ c, Tendsto (fun n => stoppedValue f (leastGE f (↑i) n) ω) atTop (𝓝 c)\nhωb : Set.Nonempty (upperBounds (Set.range fun n => f n ω))\ni : ℕ\nhi : Set.Nonempty.some hωb < ↑i\n⊢ ∀ (n : ℕ), f n ω < ↑i\n[PROOFSTEP]\nintro n\n[GOAL]\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝ : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhf : Submartingale f ℱ μ\nhf0 : f 0 = 0\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\nht : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), ∃ c, Tendsto (fun n => stoppedValue f (leastGE f (↑i) n) ω) atTop (𝓝 c)\nω : Ω\nhω : ∀ (i : ℕ), ∃ c, Tendsto (fun n => stoppedValue f (leastGE f (↑i) n) ω) atTop (𝓝 c)\nhωb : Set.Nonempty (upperBounds (Set.range fun n => f n ω))\ni : ℕ\nhi : Set.Nonempty.some hωb < ↑i\nn : ℕ\n⊢ f n ω < ↑i\n[PROOFSTEP]\nexact lt_of_le_of_lt ((mem_upperBounds.1 hωb.some_mem) _ ⟨n, rfl⟩) hi\n[GOAL]\ncase h.intro\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝ : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhf : Submartingale f ℱ μ\nhf0 : f 0 = 0\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\nht : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), ∃ c, Tendsto (fun n => stoppedValue f (leastGE f (↑i) n) ω) atTop (𝓝 c)\nω : Ω\nhω : ∀ (i : ℕ), ∃ c, Tendsto (fun n => stoppedValue f (leastGE f (↑i) n) ω) atTop (𝓝 c)\nhωb : Set.Nonempty (upperBounds (Set.range fun n => f n ω))\ni : ℕ\nhi : Set.Nonempty.some hωb < ↑i\nhib : ∀ (n : ℕ), f n ω < ↑i\n⊢ ∃ c, Tendsto (fun n => f n ω) atTop (𝓝 c)\n[PROOFSTEP]\nhave heq : ∀ n, stoppedValue f (leastGE f i n) ω = f n ω :=\n  by\n  intro n\n  rw [leastGE]; unfold hitting; rw [stoppedValue]\n  rw [if_neg]\n  simp only [Set.mem_Icc, Set.mem_union, Set.mem_Ici]\n  push_neg\n  exact fun j _ => hib j\n[GOAL]\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝ : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhf : Submartingale f ℱ μ\nhf0 : f 0 = 0\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\nht : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), ∃ c, Tendsto (fun n => stoppedValue f (leastGE f (↑i) n) ω) atTop (𝓝 c)\nω : Ω\nhω : ∀ (i : ℕ), ∃ c, Tendsto (fun n => stoppedValue f (leastGE f (↑i) n) ω) atTop (𝓝 c)\nhωb : Set.Nonempty (upperBounds (Set.range fun n => f n ω))\ni : ℕ\nhi : Set.Nonempty.some hωb < ↑i\nhib : ∀ (n : ℕ), f n ω < ↑i\n⊢ ∀ (n : ℕ), stoppedValue f (leastGE f (↑i) n) ω = f n ω\n[PROOFSTEP]\nintro n\n[GOAL]\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝ : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhf : Submartingale f ℱ μ\nhf0 : f 0 = 0\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\nht : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), ∃ c, Tendsto (fun n => stoppedValue f (leastGE f (↑i) n) ω) atTop (𝓝 c)\nω : Ω\nhω : ∀ (i : ℕ), ∃ c, Tendsto (fun n => stoppedValue f (leastGE f (↑i) n) ω) atTop (𝓝 c)\nhωb : Set.Nonempty (upperBounds (Set.range fun n => f n ω))\ni : ℕ\nhi : Set.Nonempty.some hωb < ↑i\nhib : ∀ (n : ℕ), f n ω < ↑i\nn : ℕ\n⊢ stoppedValue f (leastGE f (↑i) n) ω = f n ω\n[PROOFSTEP]\nrw [leastGE]\n[GOAL]\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝ : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhf : Submartingale f ℱ μ\nhf0 : f 0 = 0\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\nht : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), ∃ c, Tendsto (fun n => stoppedValue f (leastGE f (↑i) n) ω) atTop (𝓝 c)\nω : Ω\nhω : ∀ (i : ℕ), ∃ c, Tendsto (fun n => stoppedValue f (leastGE f (↑i) n) ω) atTop (𝓝 c)\nhωb : Set.Nonempty (upperBounds (Set.range fun n => f n ω))\ni : ℕ\nhi : Set.Nonempty.some hωb < ↑i\nhib : ∀ (n : ℕ), f n ω < ↑i\nn : ℕ\n⊢ stoppedValue f (hitting f (Set.Ici ↑i) 0 n) ω = f n ω\n[PROOFSTEP]\nunfold hitting\n[GOAL]\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝ : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhf : Submartingale f ℱ μ\nhf0 : f 0 = 0\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\nht : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), ∃ c, Tendsto (fun n => stoppedValue f (leastGE f (↑i) n) ω) atTop (𝓝 c)\nω : Ω\nhω : ∀ (i : ℕ), ∃ c, Tendsto (fun n => stoppedValue f (leastGE f (↑i) n) ω) atTop (𝓝 c)\nhωb : Set.Nonempty (upperBounds (Set.range fun n => f n ω))\ni : ℕ\nhi : Set.Nonempty.some hωb < ↑i\nhib : ∀ (n : ℕ), f n ω < ↑i\nn : ℕ\n⊢ stoppedValue f\n      (fun x =>\n        if ∃ j, j ∈ Set.Icc 0 n ∧ f j x ∈ Set.Ici ↑i then sInf (Set.Icc 0 n ∩ {i_1 | f i_1 x ∈ Set.Ici ↑i}) else n)\n      ω =\n    f n ω\n[PROOFSTEP]\nrw [stoppedValue]\n[GOAL]\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝ : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhf : Submartingale f ℱ μ\nhf0 : f 0 = 0\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\nht : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), ∃ c, Tendsto (fun n => stoppedValue f (leastGE f (↑i) n) ω) atTop (𝓝 c)\nω : Ω\nhω : ∀ (i : ℕ), ∃ c, Tendsto (fun n => stoppedValue f (leastGE f (↑i) n) ω) atTop (𝓝 c)\nhωb : Set.Nonempty (upperBounds (Set.range fun n => f n ω))\ni : ℕ\nhi : Set.Nonempty.some hωb < ↑i\nhib : ∀ (n : ℕ), f n ω < ↑i\nn : ℕ\n⊢ f (if ∃ j, j ∈ Set.Icc 0 n ∧ f j ω ∈ Set.Ici ↑i then sInf (Set.Icc 0 n ∩ {i_1 | f i_1 ω ∈ Set.Ici ↑i}) else n) ω =\n    f n ω\n[PROOFSTEP]\nrw [if_neg]\n[GOAL]\ncase hnc\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝ : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhf : Submartingale f ℱ μ\nhf0 : f 0 = 0\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\nht : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), ∃ c, Tendsto (fun n => stoppedValue f (leastGE f (↑i) n) ω) atTop (𝓝 c)\nω : Ω\nhω : ∀ (i : ℕ), ∃ c, Tendsto (fun n => stoppedValue f (leastGE f (↑i) n) ω) atTop (𝓝 c)\nhωb : Set.Nonempty (upperBounds (Set.range fun n => f n ω))\ni : ℕ\nhi : Set.Nonempty.some hωb < ↑i\nhib : ∀ (n : ℕ), f n ω < ↑i\nn : ℕ\n⊢ ¬∃ j, j ∈ Set.Icc 0 n ∧ f j ω ∈ Set.Ici ↑i\n[PROOFSTEP]\nsimp only [Set.mem_Icc, Set.mem_union, Set.mem_Ici]\n[GOAL]\ncase hnc\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝ : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhf : Submartingale f ℱ μ\nhf0 : f 0 = 0\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\nht : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), ∃ c, Tendsto (fun n => stoppedValue f (leastGE f (↑i) n) ω) atTop (𝓝 c)\nω : Ω\nhω : ∀ (i : ℕ), ∃ c, Tendsto (fun n => stoppedValue f (leastGE f (↑i) n) ω) atTop (𝓝 c)\nhωb : Set.Nonempty (upperBounds (Set.range fun n => f n ω))\ni : ℕ\nhi : Set.Nonempty.some hωb < ↑i\nhib : ∀ (n : ℕ), f n ω < ↑i\nn : ℕ\n⊢ ¬∃ j, (0 ≤ j ∧ j ≤ n) ∧ ↑i ≤ f j ω\n[PROOFSTEP]\npush_neg\n[GOAL]\ncase hnc\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝ : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhf : Submartingale f ℱ μ\nhf0 : f 0 = 0\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\nht : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), ∃ c, Tendsto (fun n => stoppedValue f (leastGE f (↑i) n) ω) atTop (𝓝 c)\nω : Ω\nhω : ∀ (i : ℕ), ∃ c, Tendsto (fun n => stoppedValue f (leastGE f (↑i) n) ω) atTop (𝓝 c)\nhωb : Set.Nonempty (upperBounds (Set.range fun n => f n ω))\ni : ℕ\nhi : Set.Nonempty.some hωb < ↑i\nhib : ∀ (n : ℕ), f n ω < ↑i\nn : ℕ\n⊢ ∀ (j : ℕ), 0 ≤ j ∧ j ≤ n → f j ω < ↑i\n[PROOFSTEP]\nexact fun j _ => hib j\n[GOAL]\ncase h.intro\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝ : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhf : Submartingale f ℱ μ\nhf0 : f 0 = 0\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\nht : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), ∃ c, Tendsto (fun n => stoppedValue f (leastGE f (↑i) n) ω) atTop (𝓝 c)\nω : Ω\nhω : ∀ (i : ℕ), ∃ c, Tendsto (fun n => stoppedValue f (leastGE f (↑i) n) ω) atTop (𝓝 c)\nhωb : Set.Nonempty (upperBounds (Set.range fun n => f n ω))\ni : ℕ\nhi : Set.Nonempty.some hωb < ↑i\nhib : ∀ (n : ℕ), f n ω < ↑i\nheq : ∀ (n : ℕ), stoppedValue f (leastGE f (↑i) n) ω = f n ω\n⊢ ∃ c, Tendsto (fun n => f n ω) atTop (𝓝 c)\n[PROOFSTEP]\nsimp only [← heq, hω i]\n[GOAL]\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhf : Submartingale f ℱ μ\nhf0 : f 0 = 0\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\n⊢ ∀ᵐ (ω : Ω) ∂μ, BddAbove (Set.range fun n => f n ω) ↔ ∃ c, Tendsto (fun n => f n ω) atTop (𝓝 c)\n[PROOFSTEP]\nfilter_upwards [hf.exists_tendsto_of_abs_bddAbove_aux hf0 hbdd] with ω hω using ⟨hω, fun ⟨c, hc⟩ => hc.bddAbove_range⟩\n[GOAL]\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhf : Submartingale f ℱ μ\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\n⊢ ∀ᵐ (ω : Ω) ∂μ, BddAbove (Set.range fun n => f n ω) ↔ ∃ c, Tendsto (fun n => f n ω) atTop (𝓝 c)\n[PROOFSTEP]\nset g : ℕ → Ω → ℝ := fun n ω => f n ω - f 0 ω\n[GOAL]\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhf : Submartingale f ℱ μ\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\ng : ℕ → Ω → ℝ := fun n ω => f n ω - f 0 ω\n⊢ ∀ᵐ (ω : Ω) ∂μ, BddAbove (Set.range fun n => f n ω) ↔ ∃ c, Tendsto (fun n => f n ω) atTop (𝓝 c)\n[PROOFSTEP]\nhave hg : Submartingale g ℱ μ := hf.sub_martingale (martingale_const_fun _ _ (hf.adapted 0) (hf.integrable 0))\n[GOAL]\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhf : Submartingale f ℱ μ\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\ng : ℕ → Ω → ℝ := fun n ω => f n ω - f 0 ω\nhg : Submartingale g ℱ μ\n⊢ ∀ᵐ (ω : Ω) ∂μ, BddAbove (Set.range fun n => f n ω) ↔ ∃ c, Tendsto (fun n => f n ω) atTop (𝓝 c)\n[PROOFSTEP]\nhave hg0 : g 0 = 0 := by\n  ext ω\n  simp only [sub_self, Pi.zero_apply]\n[GOAL]\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhf : Submartingale f ℱ μ\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\ng : ℕ → Ω → ℝ := fun n ω => f n ω - f 0 ω\nhg : Submartingale g ℱ μ\n⊢ g 0 = 0\n[PROOFSTEP]\next ω\n[GOAL]\ncase h\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝ : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhf : Submartingale f ℱ μ\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\ng : ℕ → Ω → ℝ := fun n ω => f n ω - f 0 ω\nhg : Submartingale g ℱ μ\nω : Ω\n⊢ g 0 ω = OfNat.ofNat 0 ω\n[PROOFSTEP]\nsimp only [sub_self, Pi.zero_apply]\n[GOAL]\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhf : Submartingale f ℱ μ\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\ng : ℕ → Ω → ℝ := fun n ω => f n ω - f 0 ω\nhg : Submartingale g ℱ μ\nhg0 : g 0 = 0\n⊢ ∀ᵐ (ω : Ω) ∂μ, BddAbove (Set.range fun n => f n ω) ↔ ∃ c, Tendsto (fun n => f n ω) atTop (𝓝 c)\n[PROOFSTEP]\nhave hgbdd : ∀ᵐ ω ∂μ, ∀ i : ℕ, |g (i + 1) ω - g i ω| ≤ ↑R := by simpa only [sub_sub_sub_cancel_right]\n[GOAL]\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhf : Submartingale f ℱ μ\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\ng : ℕ → Ω → ℝ := fun n ω => f n ω - f 0 ω\nhg : Submartingale g ℱ μ\nhg0 : g 0 = 0\n⊢ ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |g (i + 1) ω - g i ω| ≤ ↑R\n[PROOFSTEP]\nsimpa only [sub_sub_sub_cancel_right]\n[GOAL]\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhf : Submartingale f ℱ μ\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\ng : ℕ → Ω → ℝ := fun n ω => f n ω - f 0 ω\nhg : Submartingale g ℱ μ\nhg0 : g 0 = 0\nhgbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |g (i + 1) ω - g i ω| ≤ ↑R\n⊢ ∀ᵐ (ω : Ω) ∂μ, BddAbove (Set.range fun n => f n ω) ↔ ∃ c, Tendsto (fun n => f n ω) atTop (𝓝 c)\n[PROOFSTEP]\nfilter_upwards [hg.bddAbove_iff_exists_tendsto_aux hg0 hgbdd] with ω hω\n[GOAL]\ncase h\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝ : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhf : Submartingale f ℱ μ\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\ng : ℕ → Ω → ℝ := fun n ω => f n ω - f 0 ω\nhg : Submartingale g ℱ μ\nhg0 : g 0 = 0\nhgbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |g (i + 1) ω - g i ω| ≤ ↑R\nω : Ω\nhω : BddAbove (Set.range fun n => f n ω - f 0 ω) ↔ ∃ c, Tendsto (fun n => f n ω - f 0 ω) atTop (𝓝 c)\n⊢ BddAbove (Set.range fun n => f n ω) ↔ ∃ c, Tendsto (fun n => f n ω) atTop (𝓝 c)\n[PROOFSTEP]\nconvert hω using 1\n[GOAL]\ncase h.e'_1.a\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝ : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhf : Submartingale f ℱ μ\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\ng : ℕ → Ω → ℝ := fun n ω => f n ω - f 0 ω\nhg : Submartingale g ℱ μ\nhg0 : g 0 = 0\nhgbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |g (i + 1) ω - g i ω| ≤ ↑R\nω : Ω\nhω : BddAbove (Set.range fun n => f n ω - f 0 ω) ↔ ∃ c, Tendsto (fun n => f n ω - f 0 ω) atTop (𝓝 c)\n⊢ BddAbove (Set.range fun n => f n ω) ↔ BddAbove (Set.range fun n => f n ω - f 0 ω)\n[PROOFSTEP]\nrefine' ⟨fun h => _, fun h => _⟩\n[GOAL]\ncase h.e'_1.a.refine'_1\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝ : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhf : Submartingale f ℱ μ\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\ng : ℕ → Ω → ℝ := fun n ω => f n ω - f 0 ω\nhg : Submartingale g ℱ μ\nhg0 : g 0 = 0\nhgbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |g (i + 1) ω - g i ω| ≤ ↑R\nω : Ω\nhω : BddAbove (Set.range fun n => f n ω - f 0 ω) ↔ ∃ c, Tendsto (fun n => f n ω - f 0 ω) atTop (𝓝 c)\nh : BddAbove (Set.range fun n => f n ω)\n⊢ BddAbove (Set.range fun n => f n ω - f 0 ω)\n[PROOFSTEP]\nobtain ⟨b, hb⟩ := h\n[GOAL]\ncase h.e'_1.a.refine'_2\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝ : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhf : Submartingale f ℱ μ\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\ng : ℕ → Ω → ℝ := fun n ω => f n ω - f 0 ω\nhg : Submartingale g ℱ μ\nhg0 : g 0 = 0\nhgbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |g (i + 1) ω - g i ω| ≤ ↑R\nω : Ω\nhω : BddAbove (Set.range fun n => f n ω - f 0 ω) ↔ ∃ c, Tendsto (fun n => f n ω - f 0 ω) atTop (𝓝 c)\nh : BddAbove (Set.range fun n => f n ω - f 0 ω)\n⊢ BddAbove (Set.range fun n => f n ω)\n[PROOFSTEP]\nobtain ⟨b, hb⟩ := h\n[GOAL]\ncase h.e'_1.a.refine'_1.intro\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝ : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhf : Submartingale f ℱ μ\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\ng : ℕ → Ω → ℝ := fun n ω => f n ω - f 0 ω\nhg : Submartingale g ℱ μ\nhg0 : g 0 = 0\nhgbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |g (i + 1) ω - g i ω| ≤ ↑R\nω : Ω\nhω : BddAbove (Set.range fun n => f n ω - f 0 ω) ↔ ∃ c, Tendsto (fun n => f n ω - f 0 ω) atTop (𝓝 c)\nb : ℝ\nhb : b ∈ upperBounds (Set.range fun n => f n ω)\n⊢ BddAbove (Set.range fun n => f n ω - f 0 ω)\n[PROOFSTEP]\nrefine' ⟨b + |f 0 ω|, fun y hy => _⟩\n[GOAL]\ncase h.e'_1.a.refine'_2.intro\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝ : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhf : Submartingale f ℱ μ\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\ng : ℕ → Ω → ℝ := fun n ω => f n ω - f 0 ω\nhg : Submartingale g ℱ μ\nhg0 : g 0 = 0\nhgbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |g (i + 1) ω - g i ω| ≤ ↑R\nω : Ω\nhω : BddAbove (Set.range fun n => f n ω - f 0 ω) ↔ ∃ c, Tendsto (fun n => f n ω - f 0 ω) atTop (𝓝 c)\nb : ℝ\nhb : b ∈ upperBounds (Set.range fun n => f n ω - f 0 ω)\n⊢ BddAbove (Set.range fun n => f n ω)\n[PROOFSTEP]\nrefine' ⟨b + |f 0 ω|, fun y hy => _⟩\n[GOAL]\ncase h.e'_1.a.refine'_1.intro\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝ : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhf : Submartingale f ℱ μ\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\ng : ℕ → Ω → ℝ := fun n ω => f n ω - f 0 ω\nhg : Submartingale g ℱ μ\nhg0 : g 0 = 0\nhgbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |g (i + 1) ω - g i ω| ≤ ↑R\nω : Ω\nhω : BddAbove (Set.range fun n => f n ω - f 0 ω) ↔ ∃ c, Tendsto (fun n => f n ω - f 0 ω) atTop (𝓝 c)\nb : ℝ\nhb : b ∈ upperBounds (Set.range fun n => f n ω)\ny : ℝ\nhy : y ∈ Set.range fun n => f n ω - f 0 ω\n⊢ y ≤ b + |f 0 ω|\n[PROOFSTEP]\nobtain ⟨n, rfl⟩ := hy\n[GOAL]\ncase h.e'_1.a.refine'_2.intro\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝ : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhf : Submartingale f ℱ μ\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\ng : ℕ → Ω → ℝ := fun n ω => f n ω - f 0 ω\nhg : Submartingale g ℱ μ\nhg0 : g 0 = 0\nhgbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |g (i + 1) ω - g i ω| ≤ ↑R\nω : Ω\nhω : BddAbove (Set.range fun n => f n ω - f 0 ω) ↔ ∃ c, Tendsto (fun n => f n ω - f 0 ω) atTop (𝓝 c)\nb : ℝ\nhb : b ∈ upperBounds (Set.range fun n => f n ω - f 0 ω)\ny : ℝ\nhy : y ∈ Set.range fun n => f n ω\n⊢ y ≤ b + |f 0 ω|\n[PROOFSTEP]\nobtain ⟨n, rfl⟩ := hy\n[GOAL]\ncase h.e'_1.a.refine'_1.intro.intro\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝ : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhf : Submartingale f ℱ μ\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\ng : ℕ → Ω → ℝ := fun n ω => f n ω - f 0 ω\nhg : Submartingale g ℱ μ\nhg0 : g 0 = 0\nhgbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |g (i + 1) ω - g i ω| ≤ ↑R\nω : Ω\nhω : BddAbove (Set.range fun n => f n ω - f 0 ω) ↔ ∃ c, Tendsto (fun n => f n ω - f 0 ω) atTop (𝓝 c)\nb : ℝ\nhb : b ∈ upperBounds (Set.range fun n => f n ω)\nn : ℕ\n⊢ (fun n => f n ω - f 0 ω) n ≤ b + |f 0 ω|\n[PROOFSTEP]\nsimp_rw [sub_eq_add_neg]\n[GOAL]\ncase h.e'_1.a.refine'_1.intro.intro\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝ : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhf : Submartingale f ℱ μ\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\ng : ℕ → Ω → ℝ := fun n ω => f n ω - f 0 ω\nhg : Submartingale g ℱ μ\nhg0 : g 0 = 0\nhgbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |g (i + 1) ω - g i ω| ≤ ↑R\nω : Ω\nhω : BddAbove (Set.range fun n => f n ω - f 0 ω) ↔ ∃ c, Tendsto (fun n => f n ω - f 0 ω) atTop (𝓝 c)\nb : ℝ\nhb : b ∈ upperBounds (Set.range fun n => f n ω)\nn : ℕ\n⊢ f n ω + -f 0 ω ≤ b + |f 0 ω|\n[PROOFSTEP]\nexact add_le_add (hb ⟨n, rfl⟩) (neg_le_abs_self _)\n[GOAL]\ncase h.e'_1.a.refine'_2.intro.intro\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝ : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhf : Submartingale f ℱ μ\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\ng : ℕ → Ω → ℝ := fun n ω => f n ω - f 0 ω\nhg : Submartingale g ℱ μ\nhg0 : g 0 = 0\nhgbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |g (i + 1) ω - g i ω| ≤ ↑R\nω : Ω\nhω : BddAbove (Set.range fun n => f n ω - f 0 ω) ↔ ∃ c, Tendsto (fun n => f n ω - f 0 ω) atTop (𝓝 c)\nb : ℝ\nhb : b ∈ upperBounds (Set.range fun n => f n ω - f 0 ω)\nn : ℕ\n⊢ (fun n => f n ω) n ≤ b + |f 0 ω|\n[PROOFSTEP]\nexact sub_le_iff_le_add.1 (le_trans (sub_le_sub_left (le_abs_self _) _) (hb ⟨n, rfl⟩))\n[GOAL]\ncase h.e'_2.a\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝ : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhf : Submartingale f ℱ μ\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\ng : ℕ → Ω → ℝ := fun n ω => f n ω - f 0 ω\nhg : Submartingale g ℱ μ\nhg0 : g 0 = 0\nhgbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |g (i + 1) ω - g i ω| ≤ ↑R\nω : Ω\nhω : BddAbove (Set.range fun n => f n ω - f 0 ω) ↔ ∃ c, Tendsto (fun n => f n ω - f 0 ω) atTop (𝓝 c)\n⊢ (∃ c, Tendsto (fun n => f n ω) atTop (𝓝 c)) ↔ ∃ c, Tendsto (fun n => f n ω - f 0 ω) atTop (𝓝 c)\n[PROOFSTEP]\nrefine' ⟨fun h => _, fun h => _⟩\n[GOAL]\ncase h.e'_2.a.refine'_1\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝ : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhf : Submartingale f ℱ μ\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\ng : ℕ → Ω → ℝ := fun n ω => f n ω - f 0 ω\nhg : Submartingale g ℱ μ\nhg0 : g 0 = 0\nhgbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |g (i + 1) ω - g i ω| ≤ ↑R\nω : Ω\nhω : BddAbove (Set.range fun n => f n ω - f 0 ω) ↔ ∃ c, Tendsto (fun n => f n ω - f 0 ω) atTop (𝓝 c)\nh : ∃ c, Tendsto (fun n => f n ω) atTop (𝓝 c)\n⊢ ∃ c, Tendsto (fun n => f n ω - f 0 ω) atTop (𝓝 c)\n[PROOFSTEP]\nobtain ⟨c, hc⟩ := h\n[GOAL]\ncase h.e'_2.a.refine'_2\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝ : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhf : Submartingale f ℱ μ\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\ng : ℕ → Ω → ℝ := fun n ω => f n ω - f 0 ω\nhg : Submartingale g ℱ μ\nhg0 : g 0 = 0\nhgbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |g (i + 1) ω - g i ω| ≤ ↑R\nω : Ω\nhω : BddAbove (Set.range fun n => f n ω - f 0 ω) ↔ ∃ c, Tendsto (fun n => f n ω - f 0 ω) atTop (𝓝 c)\nh : ∃ c, Tendsto (fun n => f n ω - f 0 ω) atTop (𝓝 c)\n⊢ ∃ c, Tendsto (fun n => f n ω) atTop (𝓝 c)\n[PROOFSTEP]\nobtain ⟨c, hc⟩ := h\n[GOAL]\ncase h.e'_2.a.refine'_1.intro\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝ : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhf : Submartingale f ℱ μ\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\ng : ℕ → Ω → ℝ := fun n ω => f n ω - f 0 ω\nhg : Submartingale g ℱ μ\nhg0 : g 0 = 0\nhgbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |g (i + 1) ω - g i ω| ≤ ↑R\nω : Ω\nhω : BddAbove (Set.range fun n => f n ω - f 0 ω) ↔ ∃ c, Tendsto (fun n => f n ω - f 0 ω) atTop (𝓝 c)\nc : ℝ\nhc : Tendsto (fun n => f n ω) atTop (𝓝 c)\n⊢ ∃ c, Tendsto (fun n => f n ω - f 0 ω) atTop (𝓝 c)\n[PROOFSTEP]\nexact ⟨c - f 0 ω, hc.sub_const _⟩\n[GOAL]\ncase h.e'_2.a.refine'_2.intro\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝ : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhf : Submartingale f ℱ μ\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\ng : ℕ → Ω → ℝ := fun n ω => f n ω - f 0 ω\nhg : Submartingale g ℱ μ\nhg0 : g 0 = 0\nhgbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |g (i + 1) ω - g i ω| ≤ ↑R\nω : Ω\nhω : BddAbove (Set.range fun n => f n ω - f 0 ω) ↔ ∃ c, Tendsto (fun n => f n ω - f 0 ω) atTop (𝓝 c)\nc : ℝ\nhc : Tendsto (fun n => f n ω - f 0 ω) atTop (𝓝 c)\n⊢ ∃ c, Tendsto (fun n => f n ω) atTop (𝓝 c)\n[PROOFSTEP]\nrefine' ⟨c + f 0 ω, _⟩\n[GOAL]\ncase h.e'_2.a.refine'_2.intro\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝ : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhf : Submartingale f ℱ μ\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\ng : ℕ → Ω → ℝ := fun n ω => f n ω - f 0 ω\nhg : Submartingale g ℱ μ\nhg0 : g 0 = 0\nhgbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |g (i + 1) ω - g i ω| ≤ ↑R\nω : Ω\nhω : BddAbove (Set.range fun n => f n ω - f 0 ω) ↔ ∃ c, Tendsto (fun n => f n ω - f 0 ω) atTop (𝓝 c)\nc : ℝ\nhc : Tendsto (fun n => f n ω - f 0 ω) atTop (𝓝 c)\n⊢ Tendsto (fun n => f n ω) atTop (𝓝 (c + f 0 ω))\n[PROOFSTEP]\nhave := hc.add_const (f 0 ω)\n[GOAL]\ncase h.e'_2.a.refine'_2.intro\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝ : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhf : Submartingale f ℱ μ\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\ng : ℕ → Ω → ℝ := fun n ω => f n ω - f 0 ω\nhg : Submartingale g ℱ μ\nhg0 : g 0 = 0\nhgbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |g (i + 1) ω - g i ω| ≤ ↑R\nω : Ω\nhω : BddAbove (Set.range fun n => f n ω - f 0 ω) ↔ ∃ c, Tendsto (fun n => f n ω - f 0 ω) atTop (𝓝 c)\nc : ℝ\nhc : Tendsto (fun n => f n ω - f 0 ω) atTop (𝓝 c)\nthis : Tendsto (fun k => f k ω - f 0 ω + f 0 ω) atTop (𝓝 (c + f 0 ω))\n⊢ Tendsto (fun n => f n ω) atTop (𝓝 (c + f 0 ω))\n[PROOFSTEP]\nsimpa only [sub_add_cancel]\n[GOAL]\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhf : Martingale f ℱ μ\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\n⊢ ∀ᵐ (ω : Ω) ∂μ, BddAbove (Set.range fun n => f n ω) ↔ BddBelow (Set.range fun n => f n ω)\n[PROOFSTEP]\nhave hbdd' : ∀ᵐ ω ∂μ, ∀ i, |(-f) (i + 1) ω - (-f) i ω| ≤ R :=\n  by\n  filter_upwards [hbdd] with ω hω i\n  erw [← abs_neg, neg_sub, sub_neg_eq_add, neg_add_eq_sub]\n  exact hω i\n[GOAL]\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhf : Martingale f ℱ μ\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\n⊢ ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |(-f) (i + 1) ω - (-f) i ω| ≤ ↑R\n[PROOFSTEP]\nfilter_upwards [hbdd] with ω hω i\n[GOAL]\ncase h\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝ : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhf : Martingale f ℱ μ\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\nω : Ω\nhω : ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\ni : ℕ\n⊢ |(-f) (i + 1) ω - (-f) i ω| ≤ ↑R\n[PROOFSTEP]\nerw [← abs_neg, neg_sub, sub_neg_eq_add, neg_add_eq_sub]\n[GOAL]\ncase h\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝ : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhf : Martingale f ℱ μ\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\nω : Ω\nhω : ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\ni : ℕ\n⊢ |f (i + 1) ω - f i ω| ≤ ↑R\n[PROOFSTEP]\nexact hω i\n[GOAL]\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhf : Martingale f ℱ μ\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\nhbdd' : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |(-f) (i + 1) ω - (-f) i ω| ≤ ↑R\n⊢ ∀ᵐ (ω : Ω) ∂μ, BddAbove (Set.range fun n => f n ω) ↔ BddBelow (Set.range fun n => f n ω)\n[PROOFSTEP]\nhave hup := hf.submartingale.bddAbove_iff_exists_tendsto hbdd\n[GOAL]\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhf : Martingale f ℱ μ\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\nhbdd' : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |(-f) (i + 1) ω - (-f) i ω| ≤ ↑R\nhup : ∀ᵐ (ω : Ω) ∂μ, BddAbove (Set.range fun n => f n ω) ↔ ∃ c, Tendsto (fun n => f n ω) atTop (𝓝 c)\n⊢ ∀ᵐ (ω : Ω) ∂μ, BddAbove (Set.range fun n => f n ω) ↔ BddBelow (Set.range fun n => f n ω)\n[PROOFSTEP]\nhave hdown := hf.neg.submartingale.bddAbove_iff_exists_tendsto hbdd'\n[GOAL]\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhf : Martingale f ℱ μ\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\nhbdd' : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |(-f) (i + 1) ω - (-f) i ω| ≤ ↑R\nhup : ∀ᵐ (ω : Ω) ∂μ, BddAbove (Set.range fun n => f n ω) ↔ ∃ c, Tendsto (fun n => f n ω) atTop (𝓝 c)\nhdown : ∀ᵐ (ω : Ω) ∂μ, BddAbove (Set.range fun n => (-f) n ω) ↔ ∃ c, Tendsto (fun n => (-f) n ω) atTop (𝓝 c)\n⊢ ∀ᵐ (ω : Ω) ∂μ, BddAbove (Set.range fun n => f n ω) ↔ BddBelow (Set.range fun n => f n ω)\n[PROOFSTEP]\nfilter_upwards [hup, hdown] with ω hω₁ hω₂\n[GOAL]\ncase h\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝ : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhf : Martingale f ℱ μ\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\nhbdd' : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |(-f) (i + 1) ω - (-f) i ω| ≤ ↑R\nhup : ∀ᵐ (ω : Ω) ∂μ, BddAbove (Set.range fun n => f n ω) ↔ ∃ c, Tendsto (fun n => f n ω) atTop (𝓝 c)\nhdown : ∀ᵐ (ω : Ω) ∂μ, BddAbove (Set.range fun n => (-f) n ω) ↔ ∃ c, Tendsto (fun n => (-f) n ω) atTop (𝓝 c)\nω : Ω\nhω₁ : BddAbove (Set.range fun n => f n ω) ↔ ∃ c, Tendsto (fun n => f n ω) atTop (𝓝 c)\nhω₂ : BddAbove (Set.range fun n => (-f) n ω) ↔ ∃ c, Tendsto (fun n => (-f) n ω) atTop (𝓝 c)\n⊢ BddAbove (Set.range fun n => f n ω) ↔ BddBelow (Set.range fun n => f n ω)\n[PROOFSTEP]\nhave : (∃ c, Tendsto (fun n => f n ω) atTop (𝓝 c)) ↔ ∃ c, Tendsto (fun n => (-f) n ω) atTop (𝓝 c) :=\n  by\n  constructor <;> rintro ⟨c, hc⟩\n  · exact ⟨-c, hc.neg⟩\n  · refine' ⟨-c, _⟩\n    convert hc.neg\n    simp only [neg_neg, Pi.neg_apply]\n[GOAL]\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝ : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhf : Martingale f ℱ μ\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\nhbdd' : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |(-f) (i + 1) ω - (-f) i ω| ≤ ↑R\nhup : ∀ᵐ (ω : Ω) ∂μ, BddAbove (Set.range fun n => f n ω) ↔ ∃ c, Tendsto (fun n => f n ω) atTop (𝓝 c)\nhdown : ∀ᵐ (ω : Ω) ∂μ, BddAbove (Set.range fun n => (-f) n ω) ↔ ∃ c, Tendsto (fun n => (-f) n ω) atTop (𝓝 c)\nω : Ω\nhω₁ : BddAbove (Set.range fun n => f n ω) ↔ ∃ c, Tendsto (fun n => f n ω) atTop (𝓝 c)\nhω₂ : BddAbove (Set.range fun n => (-f) n ω) ↔ ∃ c, Tendsto (fun n => (-f) n ω) atTop (𝓝 c)\n⊢ (∃ c, Tendsto (fun n => f n ω) atTop (𝓝 c)) ↔ ∃ c, Tendsto (fun n => (-f) n ω) atTop (𝓝 c)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝ : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhf : Martingale f ℱ μ\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\nhbdd' : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |(-f) (i + 1) ω - (-f) i ω| ≤ ↑R\nhup : ∀ᵐ (ω : Ω) ∂μ, BddAbove (Set.range fun n => f n ω) ↔ ∃ c, Tendsto (fun n => f n ω) atTop (𝓝 c)\nhdown : ∀ᵐ (ω : Ω) ∂μ, BddAbove (Set.range fun n => (-f) n ω) ↔ ∃ c, Tendsto (fun n => (-f) n ω) atTop (𝓝 c)\nω : Ω\nhω₁ : BddAbove (Set.range fun n => f n ω) ↔ ∃ c, Tendsto (fun n => f n ω) atTop (𝓝 c)\nhω₂ : BddAbove (Set.range fun n => (-f) n ω) ↔ ∃ c, Tendsto (fun n => (-f) n ω) atTop (𝓝 c)\n⊢ (∃ c, Tendsto (fun n => f n ω) atTop (𝓝 c)) → ∃ c, Tendsto (fun n => (-f) n ω) atTop (𝓝 c)\n[PROOFSTEP]\nrintro ⟨c, hc⟩\n[GOAL]\ncase mpr\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝ : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhf : Martingale f ℱ μ\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\nhbdd' : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |(-f) (i + 1) ω - (-f) i ω| ≤ ↑R\nhup : ∀ᵐ (ω : Ω) ∂μ, BddAbove (Set.range fun n => f n ω) ↔ ∃ c, Tendsto (fun n => f n ω) atTop (𝓝 c)\nhdown : ∀ᵐ (ω : Ω) ∂μ, BddAbove (Set.range fun n => (-f) n ω) ↔ ∃ c, Tendsto (fun n => (-f) n ω) atTop (𝓝 c)\nω : Ω\nhω₁ : BddAbove (Set.range fun n => f n ω) ↔ ∃ c, Tendsto (fun n => f n ω) atTop (𝓝 c)\nhω₂ : BddAbove (Set.range fun n => (-f) n ω) ↔ ∃ c, Tendsto (fun n => (-f) n ω) atTop (𝓝 c)\n⊢ (∃ c, Tendsto (fun n => (-f) n ω) atTop (𝓝 c)) → ∃ c, Tendsto (fun n => f n ω) atTop (𝓝 c)\n[PROOFSTEP]\nrintro ⟨c, hc⟩\n[GOAL]\ncase mp.intro\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝ : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhf : Martingale f ℱ μ\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\nhbdd' : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |(-f) (i + 1) ω - (-f) i ω| ≤ ↑R\nhup : ∀ᵐ (ω : Ω) ∂μ, BddAbove (Set.range fun n => f n ω) ↔ ∃ c, Tendsto (fun n => f n ω) atTop (𝓝 c)\nhdown : ∀ᵐ (ω : Ω) ∂μ, BddAbove (Set.range fun n => (-f) n ω) ↔ ∃ c, Tendsto (fun n => (-f) n ω) atTop (𝓝 c)\nω : Ω\nhω₁ : BddAbove (Set.range fun n => f n ω) ↔ ∃ c, Tendsto (fun n => f n ω) atTop (𝓝 c)\nhω₂ : BddAbove (Set.range fun n => (-f) n ω) ↔ ∃ c, Tendsto (fun n => (-f) n ω) atTop (𝓝 c)\nc : ℝ\nhc : Tendsto (fun n => f n ω) atTop (𝓝 c)\n⊢ ∃ c, Tendsto (fun n => (-f) n ω) atTop (𝓝 c)\n[PROOFSTEP]\nexact ⟨-c, hc.neg⟩\n[GOAL]\ncase mpr.intro\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝ : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhf : Martingale f ℱ μ\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\nhbdd' : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |(-f) (i + 1) ω - (-f) i ω| ≤ ↑R\nhup : ∀ᵐ (ω : Ω) ∂μ, BddAbove (Set.range fun n => f n ω) ↔ ∃ c, Tendsto (fun n => f n ω) atTop (𝓝 c)\nhdown : ∀ᵐ (ω : Ω) ∂μ, BddAbove (Set.range fun n => (-f) n ω) ↔ ∃ c, Tendsto (fun n => (-f) n ω) atTop (𝓝 c)\nω : Ω\nhω₁ : BddAbove (Set.range fun n => f n ω) ↔ ∃ c, Tendsto (fun n => f n ω) atTop (𝓝 c)\nhω₂ : BddAbove (Set.range fun n => (-f) n ω) ↔ ∃ c, Tendsto (fun n => (-f) n ω) atTop (𝓝 c)\nc : ℝ\nhc : Tendsto (fun n => (-f) n ω) atTop (𝓝 c)\n⊢ ∃ c, Tendsto (fun n => f n ω) atTop (𝓝 c)\n[PROOFSTEP]\nrefine' ⟨-c, _⟩\n[GOAL]\ncase mpr.intro\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝ : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhf : Martingale f ℱ μ\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\nhbdd' : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |(-f) (i + 1) ω - (-f) i ω| ≤ ↑R\nhup : ∀ᵐ (ω : Ω) ∂μ, BddAbove (Set.range fun n => f n ω) ↔ ∃ c, Tendsto (fun n => f n ω) atTop (𝓝 c)\nhdown : ∀ᵐ (ω : Ω) ∂μ, BddAbove (Set.range fun n => (-f) n ω) ↔ ∃ c, Tendsto (fun n => (-f) n ω) atTop (𝓝 c)\nω : Ω\nhω₁ : BddAbove (Set.range fun n => f n ω) ↔ ∃ c, Tendsto (fun n => f n ω) atTop (𝓝 c)\nhω₂ : BddAbove (Set.range fun n => (-f) n ω) ↔ ∃ c, Tendsto (fun n => (-f) n ω) atTop (𝓝 c)\nc : ℝ\nhc : Tendsto (fun n => (-f) n ω) atTop (𝓝 c)\n⊢ Tendsto (fun n => f n ω) atTop (𝓝 (-c))\n[PROOFSTEP]\nconvert hc.neg\n[GOAL]\ncase h.e'_3.h\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝ : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhf : Martingale f ℱ μ\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\nhbdd' : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |(-f) (i + 1) ω - (-f) i ω| ≤ ↑R\nhup : ∀ᵐ (ω : Ω) ∂μ, BddAbove (Set.range fun n => f n ω) ↔ ∃ c, Tendsto (fun n => f n ω) atTop (𝓝 c)\nhdown : ∀ᵐ (ω : Ω) ∂μ, BddAbove (Set.range fun n => (-f) n ω) ↔ ∃ c, Tendsto (fun n => (-f) n ω) atTop (𝓝 c)\nω : Ω\nhω₁ : BddAbove (Set.range fun n => f n ω) ↔ ∃ c, Tendsto (fun n => f n ω) atTop (𝓝 c)\nhω₂ : BddAbove (Set.range fun n => (-f) n ω) ↔ ∃ c, Tendsto (fun n => (-f) n ω) atTop (𝓝 c)\nc : ℝ\nhc : Tendsto (fun n => (-f) n ω) atTop (𝓝 c)\nx✝ : ℕ\n⊢ f x✝ ω = -(-f) x✝ ω\n[PROOFSTEP]\nsimp only [neg_neg, Pi.neg_apply]\n[GOAL]\ncase h\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝ : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhf : Martingale f ℱ μ\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\nhbdd' : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |(-f) (i + 1) ω - (-f) i ω| ≤ ↑R\nhup : ∀ᵐ (ω : Ω) ∂μ, BddAbove (Set.range fun n => f n ω) ↔ ∃ c, Tendsto (fun n => f n ω) atTop (𝓝 c)\nhdown : ∀ᵐ (ω : Ω) ∂μ, BddAbove (Set.range fun n => (-f) n ω) ↔ ∃ c, Tendsto (fun n => (-f) n ω) atTop (𝓝 c)\nω : Ω\nhω₁ : BddAbove (Set.range fun n => f n ω) ↔ ∃ c, Tendsto (fun n => f n ω) atTop (𝓝 c)\nhω₂ : BddAbove (Set.range fun n => (-f) n ω) ↔ ∃ c, Tendsto (fun n => (-f) n ω) atTop (𝓝 c)\nthis : (∃ c, Tendsto (fun n => f n ω) atTop (𝓝 c)) ↔ ∃ c, Tendsto (fun n => (-f) n ω) atTop (𝓝 c)\n⊢ BddAbove (Set.range fun n => f n ω) ↔ BddBelow (Set.range fun n => f n ω)\n[PROOFSTEP]\nrw [hω₁, this, ← hω₂]\n[GOAL]\ncase h\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝ : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhf : Martingale f ℱ μ\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\nhbdd' : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |(-f) (i + 1) ω - (-f) i ω| ≤ ↑R\nhup : ∀ᵐ (ω : Ω) ∂μ, BddAbove (Set.range fun n => f n ω) ↔ ∃ c, Tendsto (fun n => f n ω) atTop (𝓝 c)\nhdown : ∀ᵐ (ω : Ω) ∂μ, BddAbove (Set.range fun n => (-f) n ω) ↔ ∃ c, Tendsto (fun n => (-f) n ω) atTop (𝓝 c)\nω : Ω\nhω₁ : BddAbove (Set.range fun n => f n ω) ↔ ∃ c, Tendsto (fun n => f n ω) atTop (𝓝 c)\nhω₂ : BddAbove (Set.range fun n => (-f) n ω) ↔ ∃ c, Tendsto (fun n => (-f) n ω) atTop (𝓝 c)\nthis : (∃ c, Tendsto (fun n => f n ω) atTop (𝓝 c)) ↔ ∃ c, Tendsto (fun n => (-f) n ω) atTop (𝓝 c)\n⊢ BddAbove (Set.range fun n => (-f) n ω) ↔ BddBelow (Set.range fun n => f n ω)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝ : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhf : Martingale f ℱ μ\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\nhbdd' : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |(-f) (i + 1) ω - (-f) i ω| ≤ ↑R\nhup : ∀ᵐ (ω : Ω) ∂μ, BddAbove (Set.range fun n => f n ω) ↔ ∃ c, Tendsto (fun n => f n ω) atTop (𝓝 c)\nhdown : ∀ᵐ (ω : Ω) ∂μ, BddAbove (Set.range fun n => (-f) n ω) ↔ ∃ c, Tendsto (fun n => (-f) n ω) atTop (𝓝 c)\nω : Ω\nhω₁ : BddAbove (Set.range fun n => f n ω) ↔ ∃ c, Tendsto (fun n => f n ω) atTop (𝓝 c)\nhω₂ : BddAbove (Set.range fun n => (-f) n ω) ↔ ∃ c, Tendsto (fun n => (-f) n ω) atTop (𝓝 c)\nthis : (∃ c, Tendsto (fun n => f n ω) atTop (𝓝 c)) ↔ ∃ c, Tendsto (fun n => (-f) n ω) atTop (𝓝 c)\n⊢ BddAbove (Set.range fun n => (-f) n ω) → BddBelow (Set.range fun n => f n ω)\n[PROOFSTEP]\nrintro ⟨c, hc⟩\n[GOAL]\ncase h.mpr\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝ : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhf : Martingale f ℱ μ\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\nhbdd' : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |(-f) (i + 1) ω - (-f) i ω| ≤ ↑R\nhup : ∀ᵐ (ω : Ω) ∂μ, BddAbove (Set.range fun n => f n ω) ↔ ∃ c, Tendsto (fun n => f n ω) atTop (𝓝 c)\nhdown : ∀ᵐ (ω : Ω) ∂μ, BddAbove (Set.range fun n => (-f) n ω) ↔ ∃ c, Tendsto (fun n => (-f) n ω) atTop (𝓝 c)\nω : Ω\nhω₁ : BddAbove (Set.range fun n => f n ω) ↔ ∃ c, Tendsto (fun n => f n ω) atTop (𝓝 c)\nhω₂ : BddAbove (Set.range fun n => (-f) n ω) ↔ ∃ c, Tendsto (fun n => (-f) n ω) atTop (𝓝 c)\nthis : (∃ c, Tendsto (fun n => f n ω) atTop (𝓝 c)) ↔ ∃ c, Tendsto (fun n => (-f) n ω) atTop (𝓝 c)\n⊢ BddBelow (Set.range fun n => f n ω) → BddAbove (Set.range fun n => (-f) n ω)\n[PROOFSTEP]\nrintro ⟨c, hc⟩\n[GOAL]\ncase h.mp.intro\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝ : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhf : Martingale f ℱ μ\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\nhbdd' : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |(-f) (i + 1) ω - (-f) i ω| ≤ ↑R\nhup : ∀ᵐ (ω : Ω) ∂μ, BddAbove (Set.range fun n => f n ω) ↔ ∃ c, Tendsto (fun n => f n ω) atTop (𝓝 c)\nhdown : ∀ᵐ (ω : Ω) ∂μ, BddAbove (Set.range fun n => (-f) n ω) ↔ ∃ c, Tendsto (fun n => (-f) n ω) atTop (𝓝 c)\nω : Ω\nhω₁ : BddAbove (Set.range fun n => f n ω) ↔ ∃ c, Tendsto (fun n => f n ω) atTop (𝓝 c)\nhω₂ : BddAbove (Set.range fun n => (-f) n ω) ↔ ∃ c, Tendsto (fun n => (-f) n ω) atTop (𝓝 c)\nthis : (∃ c, Tendsto (fun n => f n ω) atTop (𝓝 c)) ↔ ∃ c, Tendsto (fun n => (-f) n ω) atTop (𝓝 c)\nc : ℝ\nhc : c ∈ upperBounds (Set.range fun n => (-f) n ω)\n⊢ BddBelow (Set.range fun n => f n ω)\n[PROOFSTEP]\nrefine' ⟨-c, fun ω hω => _⟩\n[GOAL]\ncase h.mpr.intro\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝ : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhf : Martingale f ℱ μ\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\nhbdd' : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |(-f) (i + 1) ω - (-f) i ω| ≤ ↑R\nhup : ∀ᵐ (ω : Ω) ∂μ, BddAbove (Set.range fun n => f n ω) ↔ ∃ c, Tendsto (fun n => f n ω) atTop (𝓝 c)\nhdown : ∀ᵐ (ω : Ω) ∂μ, BddAbove (Set.range fun n => (-f) n ω) ↔ ∃ c, Tendsto (fun n => (-f) n ω) atTop (𝓝 c)\nω : Ω\nhω₁ : BddAbove (Set.range fun n => f n ω) ↔ ∃ c, Tendsto (fun n => f n ω) atTop (𝓝 c)\nhω₂ : BddAbove (Set.range fun n => (-f) n ω) ↔ ∃ c, Tendsto (fun n => (-f) n ω) atTop (𝓝 c)\nthis : (∃ c, Tendsto (fun n => f n ω) atTop (𝓝 c)) ↔ ∃ c, Tendsto (fun n => (-f) n ω) atTop (𝓝 c)\nc : ℝ\nhc : c ∈ lowerBounds (Set.range fun n => f n ω)\n⊢ BddAbove (Set.range fun n => (-f) n ω)\n[PROOFSTEP]\nrefine' ⟨-c, fun ω hω => _⟩\n[GOAL]\ncase h.mp.intro\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝¹ : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhf : Martingale f ℱ μ\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\nhbdd' : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |(-f) (i + 1) ω - (-f) i ω| ≤ ↑R\nhup : ∀ᵐ (ω : Ω) ∂μ, BddAbove (Set.range fun n => f n ω) ↔ ∃ c, Tendsto (fun n => f n ω) atTop (𝓝 c)\nhdown : ∀ᵐ (ω : Ω) ∂μ, BddAbove (Set.range fun n => (-f) n ω) ↔ ∃ c, Tendsto (fun n => (-f) n ω) atTop (𝓝 c)\nω✝ : Ω\nhω₁ : BddAbove (Set.range fun n => f n ω✝) ↔ ∃ c, Tendsto (fun n => f n ω✝) atTop (𝓝 c)\nhω₂ : BddAbove (Set.range fun n => (-f) n ω✝) ↔ ∃ c, Tendsto (fun n => (-f) n ω✝) atTop (𝓝 c)\nthis : (∃ c, Tendsto (fun n => f n ω✝) atTop (𝓝 c)) ↔ ∃ c, Tendsto (fun n => (-f) n ω✝) atTop (𝓝 c)\nc : ℝ\nhc : c ∈ upperBounds (Set.range fun n => (-f) n ω✝)\nω : ℝ\nhω : ω ∈ Set.range fun n => f n ω✝\n⊢ -c ≤ ω\n[PROOFSTEP]\nrw [mem_upperBounds] at hc \n[GOAL]\ncase h.mp.intro\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝¹ : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhf : Martingale f ℱ μ\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\nhbdd' : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |(-f) (i + 1) ω - (-f) i ω| ≤ ↑R\nhup : ∀ᵐ (ω : Ω) ∂μ, BddAbove (Set.range fun n => f n ω) ↔ ∃ c, Tendsto (fun n => f n ω) atTop (𝓝 c)\nhdown : ∀ᵐ (ω : Ω) ∂μ, BddAbove (Set.range fun n => (-f) n ω) ↔ ∃ c, Tendsto (fun n => (-f) n ω) atTop (𝓝 c)\nω✝ : Ω\nhω₁ : BddAbove (Set.range fun n => f n ω✝) ↔ ∃ c, Tendsto (fun n => f n ω✝) atTop (𝓝 c)\nhω₂ : BddAbove (Set.range fun n => (-f) n ω✝) ↔ ∃ c, Tendsto (fun n => (-f) n ω✝) atTop (𝓝 c)\nthis : (∃ c, Tendsto (fun n => f n ω✝) atTop (𝓝 c)) ↔ ∃ c, Tendsto (fun n => (-f) n ω✝) atTop (𝓝 c)\nc : ℝ\nhc : ∀ (x : ℝ), (x ∈ Set.range fun n => (-f) n ω✝) → x ≤ c\nω : ℝ\nhω : ω ∈ Set.range fun n => f n ω✝\n⊢ -c ≤ ω\n[PROOFSTEP]\nrefine' neg_le.2 (hc _ _)\n[GOAL]\ncase h.mp.intro\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝¹ : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhf : Martingale f ℱ μ\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\nhbdd' : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |(-f) (i + 1) ω - (-f) i ω| ≤ ↑R\nhup : ∀ᵐ (ω : Ω) ∂μ, BddAbove (Set.range fun n => f n ω) ↔ ∃ c, Tendsto (fun n => f n ω) atTop (𝓝 c)\nhdown : ∀ᵐ (ω : Ω) ∂μ, BddAbove (Set.range fun n => (-f) n ω) ↔ ∃ c, Tendsto (fun n => (-f) n ω) atTop (𝓝 c)\nω✝ : Ω\nhω₁ : BddAbove (Set.range fun n => f n ω✝) ↔ ∃ c, Tendsto (fun n => f n ω✝) atTop (𝓝 c)\nhω₂ : BddAbove (Set.range fun n => (-f) n ω✝) ↔ ∃ c, Tendsto (fun n => (-f) n ω✝) atTop (𝓝 c)\nthis : (∃ c, Tendsto (fun n => f n ω✝) atTop (𝓝 c)) ↔ ∃ c, Tendsto (fun n => (-f) n ω✝) atTop (𝓝 c)\nc : ℝ\nhc : ∀ (x : ℝ), (x ∈ Set.range fun n => (-f) n ω✝) → x ≤ c\nω : ℝ\nhω : ω ∈ Set.range fun n => f n ω✝\n⊢ -ω ∈ Set.range fun n => (-f) n ω✝\n[PROOFSTEP]\nsimpa only [Pi.neg_apply, Set.mem_range, neg_inj]\n[GOAL]\ncase h.mpr.intro\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝¹ : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhf : Martingale f ℱ μ\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\nhbdd' : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |(-f) (i + 1) ω - (-f) i ω| ≤ ↑R\nhup : ∀ᵐ (ω : Ω) ∂μ, BddAbove (Set.range fun n => f n ω) ↔ ∃ c, Tendsto (fun n => f n ω) atTop (𝓝 c)\nhdown : ∀ᵐ (ω : Ω) ∂μ, BddAbove (Set.range fun n => (-f) n ω) ↔ ∃ c, Tendsto (fun n => (-f) n ω) atTop (𝓝 c)\nω✝ : Ω\nhω₁ : BddAbove (Set.range fun n => f n ω✝) ↔ ∃ c, Tendsto (fun n => f n ω✝) atTop (𝓝 c)\nhω₂ : BddAbove (Set.range fun n => (-f) n ω✝) ↔ ∃ c, Tendsto (fun n => (-f) n ω✝) atTop (𝓝 c)\nthis : (∃ c, Tendsto (fun n => f n ω✝) atTop (𝓝 c)) ↔ ∃ c, Tendsto (fun n => (-f) n ω✝) atTop (𝓝 c)\nc : ℝ\nhc : c ∈ lowerBounds (Set.range fun n => f n ω✝)\nω : ℝ\nhω : ω ∈ Set.range fun n => (-f) n ω✝\n⊢ ω ≤ -c\n[PROOFSTEP]\nrw [mem_lowerBounds] at hc \n[GOAL]\ncase h.mpr.intro\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝¹ : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhf : Martingale f ℱ μ\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\nhbdd' : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |(-f) (i + 1) ω - (-f) i ω| ≤ ↑R\nhup : ∀ᵐ (ω : Ω) ∂μ, BddAbove (Set.range fun n => f n ω) ↔ ∃ c, Tendsto (fun n => f n ω) atTop (𝓝 c)\nhdown : ∀ᵐ (ω : Ω) ∂μ, BddAbove (Set.range fun n => (-f) n ω) ↔ ∃ c, Tendsto (fun n => (-f) n ω) atTop (𝓝 c)\nω✝ : Ω\nhω₁ : BddAbove (Set.range fun n => f n ω✝) ↔ ∃ c, Tendsto (fun n => f n ω✝) atTop (𝓝 c)\nhω₂ : BddAbove (Set.range fun n => (-f) n ω✝) ↔ ∃ c, Tendsto (fun n => (-f) n ω✝) atTop (𝓝 c)\nthis : (∃ c, Tendsto (fun n => f n ω✝) atTop (𝓝 c)) ↔ ∃ c, Tendsto (fun n => (-f) n ω✝) atTop (𝓝 c)\nc : ℝ\nhc : ∀ (x : ℝ), (x ∈ Set.range fun n => f n ω✝) → c ≤ x\nω : ℝ\nhω : ω ∈ Set.range fun n => (-f) n ω✝\n⊢ ω ≤ -c\n[PROOFSTEP]\nsimp_rw [Set.mem_range, Pi.neg_apply, neg_eq_iff_eq_neg] at hω \n[GOAL]\ncase h.mpr.intro\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝¹ : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhf : Martingale f ℱ μ\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\nhbdd' : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |(-f) (i + 1) ω - (-f) i ω| ≤ ↑R\nhup : ∀ᵐ (ω : Ω) ∂μ, BddAbove (Set.range fun n => f n ω) ↔ ∃ c, Tendsto (fun n => f n ω) atTop (𝓝 c)\nhdown : ∀ᵐ (ω : Ω) ∂μ, BddAbove (Set.range fun n => (-f) n ω) ↔ ∃ c, Tendsto (fun n => (-f) n ω) atTop (𝓝 c)\nω✝ : Ω\nhω₁ : BddAbove (Set.range fun n => f n ω✝) ↔ ∃ c, Tendsto (fun n => f n ω✝) atTop (𝓝 c)\nhω₂ : BddAbove (Set.range fun n => (-f) n ω✝) ↔ ∃ c, Tendsto (fun n => (-f) n ω✝) atTop (𝓝 c)\nthis : (∃ c, Tendsto (fun n => f n ω✝) atTop (𝓝 c)) ↔ ∃ c, Tendsto (fun n => (-f) n ω✝) atTop (𝓝 c)\nc : ℝ\nhc : ∀ (x : ℝ), (x ∈ Set.range fun n => f n ω✝) → c ≤ x\nω : ℝ\nhω : ∃ y, f y ω✝ = -ω\n⊢ ω ≤ -c\n[PROOFSTEP]\nrefine' le_neg.1 (hc _ _)\n[GOAL]\ncase h.mpr.intro\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝¹ : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhf : Martingale f ℱ μ\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\nhbdd' : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |(-f) (i + 1) ω - (-f) i ω| ≤ ↑R\nhup : ∀ᵐ (ω : Ω) ∂μ, BddAbove (Set.range fun n => f n ω) ↔ ∃ c, Tendsto (fun n => f n ω) atTop (𝓝 c)\nhdown : ∀ᵐ (ω : Ω) ∂μ, BddAbove (Set.range fun n => (-f) n ω) ↔ ∃ c, Tendsto (fun n => (-f) n ω) atTop (𝓝 c)\nω✝ : Ω\nhω₁ : BddAbove (Set.range fun n => f n ω✝) ↔ ∃ c, Tendsto (fun n => f n ω✝) atTop (𝓝 c)\nhω₂ : BddAbove (Set.range fun n => (-f) n ω✝) ↔ ∃ c, Tendsto (fun n => (-f) n ω✝) atTop (𝓝 c)\nthis : (∃ c, Tendsto (fun n => f n ω✝) atTop (𝓝 c)) ↔ ∃ c, Tendsto (fun n => (-f) n ω✝) atTop (𝓝 c)\nc : ℝ\nhc : ∀ (x : ℝ), (x ∈ Set.range fun n => f n ω✝) → c ≤ x\nω : ℝ\nhω : ∃ y, f y ω✝ = -ω\n⊢ -ω ∈ Set.range fun n => f n ω✝\n[PROOFSTEP]\nsimpa only [Set.mem_range]\n[GOAL]\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhf : Martingale f ℱ μ\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\n⊢ ∀ᵐ (ω : Ω) ∂μ, ¬Tendsto (fun n => f n ω) atTop atTop\n[PROOFSTEP]\nfilter_upwards [hf.bddAbove_range_iff_bddBelow_range hbdd] with ω hω htop using\n  unbounded_of_tendsto_atTop htop (hω.2 <| bddBelow_range_of_tendsto_atTop_atTop htop)\n[GOAL]\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhf : Martingale f ℱ μ\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\n⊢ ∀ᵐ (ω : Ω) ∂μ, ¬Tendsto (fun n => f n ω) atTop atBot\n[PROOFSTEP]\nfilter_upwards [hf.bddAbove_range_iff_bddBelow_range hbdd] with ω hω htop using\n  unbounded_of_tendsto_atBot htop (hω.1 <| bddAbove_range_of_tendsto_atTop_atBot htop)\n[GOAL]\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω : Ω\nr : ℝ\nR : ℝ≥0\ns : ℕ → Set Ω\n⊢ process s 0 = 0\n[PROOFSTEP]\nrw [process, Finset.range_zero, Finset.sum_empty]\n[GOAL]\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ✝ : Measure Ω\nℱ✝ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω : Ω\nr : ℝ\nR : ℝ≥0\ns✝ : ℕ → Set Ω\nℱ : Filtration ℕ m0\nμ : Measure Ω\ns : ℕ → Set Ω\nn : ℕ\n⊢ martingalePart (process s) ℱ μ n =\n    ∑ k in Finset.range n, (Set.indicator (s (k + 1)) 1 - μ[Set.indicator (s (k + 1)) 1|↑ℱ k])\n[PROOFSTEP]\nsimp only [martingalePart_eq_sum, process_zero, zero_add]\n[GOAL]\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ✝ : Measure Ω\nℱ✝ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω : Ω\nr : ℝ\nR : ℝ≥0\ns✝ : ℕ → Set Ω\nℱ : Filtration ℕ m0\nμ : Measure Ω\ns : ℕ → Set Ω\nn : ℕ\n⊢ ∑ i in Finset.range n, (process s (i + 1) - process s i - μ[process s (i + 1) - process s i|↑ℱ i]) =\n    ∑ k in Finset.range n, (Set.indicator (s (k + 1)) 1 - μ[Set.indicator (s (k + 1)) 1|↑ℱ k])\n[PROOFSTEP]\nrefine' Finset.sum_congr rfl fun k _ => _\n[GOAL]\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ✝ : Measure Ω\nℱ✝ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω : Ω\nr : ℝ\nR : ℝ≥0\ns✝ : ℕ → Set Ω\nℱ : Filtration ℕ m0\nμ : Measure Ω\ns : ℕ → Set Ω\nn k : ℕ\nx✝ : k ∈ Finset.range n\n⊢ process s (k + 1) - process s k - μ[process s (k + 1) - process s k|↑ℱ k] =\n    Set.indicator (s (k + 1)) 1 - μ[Set.indicator (s (k + 1)) 1|↑ℱ k]\n[PROOFSTEP]\nsimp only [process, Finset.sum_range_succ_sub_sum]\n[GOAL]\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ✝ : Measure Ω\nℱ✝ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω : Ω\nr : ℝ\nR : ℝ≥0\ns✝ : ℕ → Set Ω\nℱ : Filtration ℕ m0\nμ : Measure Ω\ns : ℕ → Set Ω\nn : ℕ\n⊢ predictablePart (process s) ℱ μ n = ∑ k in Finset.range n, μ[Set.indicator (s (k + 1)) 1|↑ℱ k]\n[PROOFSTEP]\nhave := martingalePart_process_ae_eq ℱ μ s n\n[GOAL]\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ✝ : Measure Ω\nℱ✝ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω : Ω\nr : ℝ\nR : ℝ≥0\ns✝ : ℕ → Set Ω\nℱ : Filtration ℕ m0\nμ : Measure Ω\ns : ℕ → Set Ω\nn : ℕ\nthis :\n  martingalePart (process s) ℱ μ n =\n    ∑ k in Finset.range n, (Set.indicator (s (k + 1)) 1 - μ[Set.indicator (s (k + 1)) 1|↑ℱ k])\n⊢ predictablePart (process s) ℱ μ n = ∑ k in Finset.range n, μ[Set.indicator (s (k + 1)) 1|↑ℱ k]\n[PROOFSTEP]\nsimp_rw [martingalePart, process, Finset.sum_sub_distrib] at this \n[GOAL]\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ✝ : Measure Ω\nℱ✝ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω : Ω\nr : ℝ\nR : ℝ≥0\ns✝ : ℕ → Set Ω\nℱ : Filtration ℕ m0\nμ : Measure Ω\ns : ℕ → Set Ω\nn : ℕ\nthis :\n  ∑ k in Finset.range n, Set.indicator (s (k + 1)) 1 - predictablePart (process s) ℱ μ n =\n    ∑ k in Finset.range n, Set.indicator (s (k + 1)) 1 - ∑ x in Finset.range n, μ[Set.indicator (s (x + 1)) 1|↑ℱ x]\n⊢ predictablePart (process s) ℱ μ n = ∑ k in Finset.range n, μ[Set.indicator (s (k + 1)) 1|↑ℱ k]\n[PROOFSTEP]\nexact sub_right_injective this\n[GOAL]\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝ : Ω\nr : ℝ\nR : ℝ≥0\ns✝ s : ℕ → Set Ω\nω : Ω\nn : ℕ\n⊢ |process s (n + 1) ω - process s n ω| ≤ ↑1\n[PROOFSTEP]\nnorm_cast\n[GOAL]\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝ : Ω\nr : ℝ\nR : ℝ≥0\ns✝ s : ℕ → Set Ω\nω : Ω\nn : ℕ\n⊢ |process s (n + 1) ω - process s n ω| ≤ 1\n[PROOFSTEP]\nrw [process, process, Finset.sum_apply, Finset.sum_apply, Finset.sum_range_succ_sub_sum, ← Real.norm_eq_abs,\n  norm_indicator_eq_indicator_norm]\n[GOAL]\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝ : Ω\nr : ℝ\nR : ℝ≥0\ns✝ s : ℕ → Set Ω\nω : Ω\nn : ℕ\n⊢ Set.indicator (s (n + 1)) (fun a => ‖OfNat.ofNat 1 a‖) ω ≤ 1\n[PROOFSTEP]\nrefine' Set.indicator_le' (fun _ _ => _) (fun _ _ => zero_le_one) _\n[GOAL]\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝ : Ω\nr : ℝ\nR : ℝ≥0\ns✝ s : ℕ → Set Ω\nω : Ω\nn : ℕ\nx✝¹ : Ω\nx✝ : x✝¹ ∈ s (n + 1)\n⊢ ‖OfNat.ofNat 1 x✝¹‖ ≤ 1\n[PROOFSTEP]\nrw [Pi.one_apply, norm_one]\n[GOAL]\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhfmono : ∀ᵐ (ω : Ω) ∂μ, ∀ (n : ℕ), f n ω ≤ f (n + 1) ω\nhf : Adapted ℱ f\nhint : ∀ (n : ℕ), Integrable (f n)\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (n : ℕ), |f (n + 1) ω - f n ω| ≤ ↑R\n⊢ ∀ᵐ (ω : Ω) ∂μ, Tendsto (fun n => f n ω) atTop atTop ↔ Tendsto (fun n => predictablePart f ℱ μ n ω) atTop atTop\n[PROOFSTEP]\nhave h₁ := (martingale_martingalePart hf hint).ae_not_tendsto_atTop_atTop (martingalePart_bdd_difference ℱ hbdd)\n[GOAL]\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhfmono : ∀ᵐ (ω : Ω) ∂μ, ∀ (n : ℕ), f n ω ≤ f (n + 1) ω\nhf : Adapted ℱ f\nhint : ∀ (n : ℕ), Integrable (f n)\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (n : ℕ), |f (n + 1) ω - f n ω| ≤ ↑R\nh₁ : ∀ᵐ (ω : Ω) ∂μ, ¬Tendsto (fun n => martingalePart f ℱ μ n ω) atTop atTop\n⊢ ∀ᵐ (ω : Ω) ∂μ, Tendsto (fun n => f n ω) atTop atTop ↔ Tendsto (fun n => predictablePart f ℱ μ n ω) atTop atTop\n[PROOFSTEP]\nhave h₂ := (martingale_martingalePart hf hint).ae_not_tendsto_atTop_atBot (martingalePart_bdd_difference ℱ hbdd)\n[GOAL]\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhfmono : ∀ᵐ (ω : Ω) ∂μ, ∀ (n : ℕ), f n ω ≤ f (n + 1) ω\nhf : Adapted ℱ f\nhint : ∀ (n : ℕ), Integrable (f n)\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (n : ℕ), |f (n + 1) ω - f n ω| ≤ ↑R\nh₁ : ∀ᵐ (ω : Ω) ∂μ, ¬Tendsto (fun n => martingalePart f ℱ μ n ω) atTop atTop\nh₂ : ∀ᵐ (ω : Ω) ∂μ, ¬Tendsto (fun n => martingalePart f ℱ μ n ω) atTop atBot\n⊢ ∀ᵐ (ω : Ω) ∂μ, Tendsto (fun n => f n ω) atTop atTop ↔ Tendsto (fun n => predictablePart f ℱ μ n ω) atTop atTop\n[PROOFSTEP]\nhave h₃ : ∀ᵐ ω ∂μ, ∀ n, 0 ≤ (μ[f (n + 1) - f n|ℱ n]) ω :=\n  by\n  refine' ae_all_iff.2 fun n => condexp_nonneg _\n  filter_upwards [ae_all_iff.1 hfmono n] with ω hω using sub_nonneg.2 hω\n[GOAL]\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhfmono : ∀ᵐ (ω : Ω) ∂μ, ∀ (n : ℕ), f n ω ≤ f (n + 1) ω\nhf : Adapted ℱ f\nhint : ∀ (n : ℕ), Integrable (f n)\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (n : ℕ), |f (n + 1) ω - f n ω| ≤ ↑R\nh₁ : ∀ᵐ (ω : Ω) ∂μ, ¬Tendsto (fun n => martingalePart f ℱ μ n ω) atTop atTop\nh₂ : ∀ᵐ (ω : Ω) ∂μ, ¬Tendsto (fun n => martingalePart f ℱ μ n ω) atTop atBot\n⊢ ∀ᵐ (ω : Ω) ∂μ, ∀ (n : ℕ), 0 ≤ (μ[f (n + 1) - f n|↑ℱ n]) ω\n[PROOFSTEP]\nrefine' ae_all_iff.2 fun n => condexp_nonneg _\n[GOAL]\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhfmono : ∀ᵐ (ω : Ω) ∂μ, ∀ (n : ℕ), f n ω ≤ f (n + 1) ω\nhf : Adapted ℱ f\nhint : ∀ (n : ℕ), Integrable (f n)\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (n : ℕ), |f (n + 1) ω - f n ω| ≤ ↑R\nh₁ : ∀ᵐ (ω : Ω) ∂μ, ¬Tendsto (fun n => martingalePart f ℱ μ n ω) atTop atTop\nh₂ : ∀ᵐ (ω : Ω) ∂μ, ¬Tendsto (fun n => martingalePart f ℱ μ n ω) atTop atBot\nn : ℕ\n⊢ 0 ≤ᵐ[μ] f (n + 1) - f n\n[PROOFSTEP]\nfilter_upwards [ae_all_iff.1 hfmono n] with ω hω using sub_nonneg.2 hω\n[GOAL]\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhfmono : ∀ᵐ (ω : Ω) ∂μ, ∀ (n : ℕ), f n ω ≤ f (n + 1) ω\nhf : Adapted ℱ f\nhint : ∀ (n : ℕ), Integrable (f n)\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (n : ℕ), |f (n + 1) ω - f n ω| ≤ ↑R\nh₁ : ∀ᵐ (ω : Ω) ∂μ, ¬Tendsto (fun n => martingalePart f ℱ μ n ω) atTop atTop\nh₂ : ∀ᵐ (ω : Ω) ∂μ, ¬Tendsto (fun n => martingalePart f ℱ μ n ω) atTop atBot\nh₃ : ∀ᵐ (ω : Ω) ∂μ, ∀ (n : ℕ), 0 ≤ (μ[f (n + 1) - f n|↑ℱ n]) ω\n⊢ ∀ᵐ (ω : Ω) ∂μ, Tendsto (fun n => f n ω) atTop atTop ↔ Tendsto (fun n => predictablePart f ℱ μ n ω) atTop atTop\n[PROOFSTEP]\nfilter_upwards [h₁, h₂, h₃, hfmono] with ω hω₁ hω₂ hω₃ hω₄\n[GOAL]\ncase h\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝ : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhfmono : ∀ᵐ (ω : Ω) ∂μ, ∀ (n : ℕ), f n ω ≤ f (n + 1) ω\nhf : Adapted ℱ f\nhint : ∀ (n : ℕ), Integrable (f n)\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (n : ℕ), |f (n + 1) ω - f n ω| ≤ ↑R\nh₁ : ∀ᵐ (ω : Ω) ∂μ, ¬Tendsto (fun n => martingalePart f ℱ μ n ω) atTop atTop\nh₂ : ∀ᵐ (ω : Ω) ∂μ, ¬Tendsto (fun n => martingalePart f ℱ μ n ω) atTop atBot\nh₃ : ∀ᵐ (ω : Ω) ∂μ, ∀ (n : ℕ), 0 ≤ (μ[f (n + 1) - f n|↑ℱ n]) ω\nω : Ω\nhω₁ : ¬Tendsto (fun n => martingalePart f ℱ μ n ω) atTop atTop\nhω₂ : ¬Tendsto (fun n => martingalePart f ℱ μ n ω) atTop atBot\nhω₃ : ∀ (n : ℕ), 0 ≤ (μ[f (n + 1) - f n|↑ℱ n]) ω\nhω₄ : ∀ (n : ℕ), f n ω ≤ f (n + 1) ω\n⊢ Tendsto (fun n => f n ω) atTop atTop ↔ Tendsto (fun n => predictablePart f ℱ μ n ω) atTop atTop\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝ : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhfmono : ∀ᵐ (ω : Ω) ∂μ, ∀ (n : ℕ), f n ω ≤ f (n + 1) ω\nhf : Adapted ℱ f\nhint : ∀ (n : ℕ), Integrable (f n)\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (n : ℕ), |f (n + 1) ω - f n ω| ≤ ↑R\nh₁ : ∀ᵐ (ω : Ω) ∂μ, ¬Tendsto (fun n => martingalePart f ℱ μ n ω) atTop atTop\nh₂ : ∀ᵐ (ω : Ω) ∂μ, ¬Tendsto (fun n => martingalePart f ℱ μ n ω) atTop atBot\nh₃ : ∀ᵐ (ω : Ω) ∂μ, ∀ (n : ℕ), 0 ≤ (μ[f (n + 1) - f n|↑ℱ n]) ω\nω : Ω\nhω₁ : ¬Tendsto (fun n => martingalePart f ℱ μ n ω) atTop atTop\nhω₂ : ¬Tendsto (fun n => martingalePart f ℱ μ n ω) atTop atBot\nhω₃ : ∀ (n : ℕ), 0 ≤ (μ[f (n + 1) - f n|↑ℱ n]) ω\nhω₄ : ∀ (n : ℕ), f n ω ≤ f (n + 1) ω\n⊢ Tendsto (fun n => f n ω) atTop atTop → Tendsto (fun n => predictablePart f ℱ μ n ω) atTop atTop\n[PROOFSTEP]\nintro ht\n[GOAL]\ncase h.mpr\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝ : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhfmono : ∀ᵐ (ω : Ω) ∂μ, ∀ (n : ℕ), f n ω ≤ f (n + 1) ω\nhf : Adapted ℱ f\nhint : ∀ (n : ℕ), Integrable (f n)\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (n : ℕ), |f (n + 1) ω - f n ω| ≤ ↑R\nh₁ : ∀ᵐ (ω : Ω) ∂μ, ¬Tendsto (fun n => martingalePart f ℱ μ n ω) atTop atTop\nh₂ : ∀ᵐ (ω : Ω) ∂μ, ¬Tendsto (fun n => martingalePart f ℱ μ n ω) atTop atBot\nh₃ : ∀ᵐ (ω : Ω) ∂μ, ∀ (n : ℕ), 0 ≤ (μ[f (n + 1) - f n|↑ℱ n]) ω\nω : Ω\nhω₁ : ¬Tendsto (fun n => martingalePart f ℱ μ n ω) atTop atTop\nhω₂ : ¬Tendsto (fun n => martingalePart f ℱ μ n ω) atTop atBot\nhω₃ : ∀ (n : ℕ), 0 ≤ (μ[f (n + 1) - f n|↑ℱ n]) ω\nhω₄ : ∀ (n : ℕ), f n ω ≤ f (n + 1) ω\n⊢ Tendsto (fun n => predictablePart f ℱ μ n ω) atTop atTop → Tendsto (fun n => f n ω) atTop atTop\n[PROOFSTEP]\nintro ht\n[GOAL]\ncase h.mp\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝ : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhfmono : ∀ᵐ (ω : Ω) ∂μ, ∀ (n : ℕ), f n ω ≤ f (n + 1) ω\nhf : Adapted ℱ f\nhint : ∀ (n : ℕ), Integrable (f n)\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (n : ℕ), |f (n + 1) ω - f n ω| ≤ ↑R\nh₁ : ∀ᵐ (ω : Ω) ∂μ, ¬Tendsto (fun n => martingalePart f ℱ μ n ω) atTop atTop\nh₂ : ∀ᵐ (ω : Ω) ∂μ, ¬Tendsto (fun n => martingalePart f ℱ μ n ω) atTop atBot\nh₃ : ∀ᵐ (ω : Ω) ∂μ, ∀ (n : ℕ), 0 ≤ (μ[f (n + 1) - f n|↑ℱ n]) ω\nω : Ω\nhω₁ : ¬Tendsto (fun n => martingalePart f ℱ μ n ω) atTop atTop\nhω₂ : ¬Tendsto (fun n => martingalePart f ℱ μ n ω) atTop atBot\nhω₃ : ∀ (n : ℕ), 0 ≤ (μ[f (n + 1) - f n|↑ℱ n]) ω\nhω₄ : ∀ (n : ℕ), f n ω ≤ f (n + 1) ω\nht : Tendsto (fun n => f n ω) atTop atTop\n⊢ Tendsto (fun n => predictablePart f ℱ μ n ω) atTop atTop\n[PROOFSTEP]\nrefine' tendsto_atTop_atTop_of_monotone' _ _\n[GOAL]\ncase h.mp.refine'_1\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝ : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhfmono : ∀ᵐ (ω : Ω) ∂μ, ∀ (n : ℕ), f n ω ≤ f (n + 1) ω\nhf : Adapted ℱ f\nhint : ∀ (n : ℕ), Integrable (f n)\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (n : ℕ), |f (n + 1) ω - f n ω| ≤ ↑R\nh₁ : ∀ᵐ (ω : Ω) ∂μ, ¬Tendsto (fun n => martingalePart f ℱ μ n ω) atTop atTop\nh₂ : ∀ᵐ (ω : Ω) ∂μ, ¬Tendsto (fun n => martingalePart f ℱ μ n ω) atTop atBot\nh₃ : ∀ᵐ (ω : Ω) ∂μ, ∀ (n : ℕ), 0 ≤ (μ[f (n + 1) - f n|↑ℱ n]) ω\nω : Ω\nhω₁ : ¬Tendsto (fun n => martingalePart f ℱ μ n ω) atTop atTop\nhω₂ : ¬Tendsto (fun n => martingalePart f ℱ μ n ω) atTop atBot\nhω₃ : ∀ (n : ℕ), 0 ≤ (μ[f (n + 1) - f n|↑ℱ n]) ω\nhω₄ : ∀ (n : ℕ), f n ω ≤ f (n + 1) ω\nht : Tendsto (fun n => f n ω) atTop atTop\n⊢ Monotone fun n => predictablePart f ℱ μ n ω\n[PROOFSTEP]\nintro n m hnm\n[GOAL]\ncase h.mp.refine'_1\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝ : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhfmono : ∀ᵐ (ω : Ω) ∂μ, ∀ (n : ℕ), f n ω ≤ f (n + 1) ω\nhf : Adapted ℱ f\nhint : ∀ (n : ℕ), Integrable (f n)\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (n : ℕ), |f (n + 1) ω - f n ω| ≤ ↑R\nh₁ : ∀ᵐ (ω : Ω) ∂μ, ¬Tendsto (fun n => martingalePart f ℱ μ n ω) atTop atTop\nh₂ : ∀ᵐ (ω : Ω) ∂μ, ¬Tendsto (fun n => martingalePart f ℱ μ n ω) atTop atBot\nh₃ : ∀ᵐ (ω : Ω) ∂μ, ∀ (n : ℕ), 0 ≤ (μ[f (n + 1) - f n|↑ℱ n]) ω\nω : Ω\nhω₁ : ¬Tendsto (fun n => martingalePart f ℱ μ n ω) atTop atTop\nhω₂ : ¬Tendsto (fun n => martingalePart f ℱ μ n ω) atTop atBot\nhω₃ : ∀ (n : ℕ), 0 ≤ (μ[f (n + 1) - f n|↑ℱ n]) ω\nhω₄ : ∀ (n : ℕ), f n ω ≤ f (n + 1) ω\nht : Tendsto (fun n => f n ω) atTop atTop\nn m : ℕ\nhnm : n ≤ m\n⊢ (fun n => predictablePart f ℱ μ n ω) n ≤ (fun n => predictablePart f ℱ μ n ω) m\n[PROOFSTEP]\nsimp only [predictablePart, Finset.sum_apply]\n[GOAL]\ncase h.mp.refine'_1\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝ : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhfmono : ∀ᵐ (ω : Ω) ∂μ, ∀ (n : ℕ), f n ω ≤ f (n + 1) ω\nhf : Adapted ℱ f\nhint : ∀ (n : ℕ), Integrable (f n)\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (n : ℕ), |f (n + 1) ω - f n ω| ≤ ↑R\nh₁ : ∀ᵐ (ω : Ω) ∂μ, ¬Tendsto (fun n => martingalePart f ℱ μ n ω) atTop atTop\nh₂ : ∀ᵐ (ω : Ω) ∂μ, ¬Tendsto (fun n => martingalePart f ℱ μ n ω) atTop atBot\nh₃ : ∀ᵐ (ω : Ω) ∂μ, ∀ (n : ℕ), 0 ≤ (μ[f (n + 1) - f n|↑ℱ n]) ω\nω : Ω\nhω₁ : ¬Tendsto (fun n => martingalePart f ℱ μ n ω) atTop atTop\nhω₂ : ¬Tendsto (fun n => martingalePart f ℱ μ n ω) atTop atBot\nhω₃ : ∀ (n : ℕ), 0 ≤ (μ[f (n + 1) - f n|↑ℱ n]) ω\nhω₄ : ∀ (n : ℕ), f n ω ≤ f (n + 1) ω\nht : Tendsto (fun n => f n ω) atTop atTop\nn m : ℕ\nhnm : n ≤ m\n⊢ ∑ c in Finset.range n, (μ[f (c + 1) - f c|↑ℱ c]) ω ≤ ∑ c in Finset.range m, (μ[f (c + 1) - f c|↑ℱ c]) ω\n[PROOFSTEP]\nrefine' Finset.sum_mono_set_of_nonneg hω₃ (Finset.range_mono hnm)\n[GOAL]\ncase h.mp.refine'_2\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝ : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhfmono : ∀ᵐ (ω : Ω) ∂μ, ∀ (n : ℕ), f n ω ≤ f (n + 1) ω\nhf : Adapted ℱ f\nhint : ∀ (n : ℕ), Integrable (f n)\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (n : ℕ), |f (n + 1) ω - f n ω| ≤ ↑R\nh₁ : ∀ᵐ (ω : Ω) ∂μ, ¬Tendsto (fun n => martingalePart f ℱ μ n ω) atTop atTop\nh₂ : ∀ᵐ (ω : Ω) ∂μ, ¬Tendsto (fun n => martingalePart f ℱ μ n ω) atTop atBot\nh₃ : ∀ᵐ (ω : Ω) ∂μ, ∀ (n : ℕ), 0 ≤ (μ[f (n + 1) - f n|↑ℱ n]) ω\nω : Ω\nhω₁ : ¬Tendsto (fun n => martingalePart f ℱ μ n ω) atTop atTop\nhω₂ : ¬Tendsto (fun n => martingalePart f ℱ μ n ω) atTop atBot\nhω₃ : ∀ (n : ℕ), 0 ≤ (μ[f (n + 1) - f n|↑ℱ n]) ω\nhω₄ : ∀ (n : ℕ), f n ω ≤ f (n + 1) ω\nht : Tendsto (fun n => f n ω) atTop atTop\n⊢ ¬BddAbove (Set.range fun n => predictablePart f ℱ μ n ω)\n[PROOFSTEP]\nrintro ⟨b, hbdd⟩\n[GOAL]\ncase h.mp.refine'_2.intro\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝ : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhfmono : ∀ᵐ (ω : Ω) ∂μ, ∀ (n : ℕ), f n ω ≤ f (n + 1) ω\nhf : Adapted ℱ f\nhint : ∀ (n : ℕ), Integrable (f n)\nhbdd✝ : ∀ᵐ (ω : Ω) ∂μ, ∀ (n : ℕ), |f (n + 1) ω - f n ω| ≤ ↑R\nh₁ : ∀ᵐ (ω : Ω) ∂μ, ¬Tendsto (fun n => martingalePart f ℱ μ n ω) atTop atTop\nh₂ : ∀ᵐ (ω : Ω) ∂μ, ¬Tendsto (fun n => martingalePart f ℱ μ n ω) atTop atBot\nh₃ : ∀ᵐ (ω : Ω) ∂μ, ∀ (n : ℕ), 0 ≤ (μ[f (n + 1) - f n|↑ℱ n]) ω\nω : Ω\nhω₁ : ¬Tendsto (fun n => martingalePart f ℱ μ n ω) atTop atTop\nhω₂ : ¬Tendsto (fun n => martingalePart f ℱ μ n ω) atTop atBot\nhω₃ : ∀ (n : ℕ), 0 ≤ (μ[f (n + 1) - f n|↑ℱ n]) ω\nhω₄ : ∀ (n : ℕ), f n ω ≤ f (n + 1) ω\nht : Tendsto (fun n => f n ω) atTop atTop\nb : ℝ\nhbdd : b ∈ upperBounds (Set.range fun n => predictablePart f ℱ μ n ω)\n⊢ False\n[PROOFSTEP]\nrw [← tendsto_neg_atBot_iff] at ht \n[GOAL]\ncase h.mp.refine'_2.intro\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝ : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhfmono : ∀ᵐ (ω : Ω) ∂μ, ∀ (n : ℕ), f n ω ≤ f (n + 1) ω\nhf : Adapted ℱ f\nhint : ∀ (n : ℕ), Integrable (f n)\nhbdd✝ : ∀ᵐ (ω : Ω) ∂μ, ∀ (n : ℕ), |f (n + 1) ω - f n ω| ≤ ↑R\nh₁ : ∀ᵐ (ω : Ω) ∂μ, ¬Tendsto (fun n => martingalePart f ℱ μ n ω) atTop atTop\nh₂ : ∀ᵐ (ω : Ω) ∂μ, ¬Tendsto (fun n => martingalePart f ℱ μ n ω) atTop atBot\nh₃ : ∀ᵐ (ω : Ω) ∂μ, ∀ (n : ℕ), 0 ≤ (μ[f (n + 1) - f n|↑ℱ n]) ω\nω : Ω\nhω₁ : ¬Tendsto (fun n => martingalePart f ℱ μ n ω) atTop atTop\nhω₂ : ¬Tendsto (fun n => martingalePart f ℱ μ n ω) atTop atBot\nhω₃ : ∀ (n : ℕ), 0 ≤ (μ[f (n + 1) - f n|↑ℱ n]) ω\nhω₄ : ∀ (n : ℕ), f n ω ≤ f (n + 1) ω\nht : Tendsto (fun x => -f x ω) atTop atBot\nb : ℝ\nhbdd : b ∈ upperBounds (Set.range fun n => predictablePart f ℱ μ n ω)\n⊢ False\n[PROOFSTEP]\nsimp only [martingalePart, sub_eq_add_neg] at hω₁ \n[GOAL]\ncase h.mp.refine'_2.intro\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝ : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhfmono : ∀ᵐ (ω : Ω) ∂μ, ∀ (n : ℕ), f n ω ≤ f (n + 1) ω\nhf : Adapted ℱ f\nhint : ∀ (n : ℕ), Integrable (f n)\nhbdd✝ : ∀ᵐ (ω : Ω) ∂μ, ∀ (n : ℕ), |f (n + 1) ω - f n ω| ≤ ↑R\nh₁ : ∀ᵐ (ω : Ω) ∂μ, ¬Tendsto (fun n => martingalePart f ℱ μ n ω) atTop atTop\nh₂ : ∀ᵐ (ω : Ω) ∂μ, ¬Tendsto (fun n => martingalePart f ℱ μ n ω) atTop atBot\nh₃ : ∀ᵐ (ω : Ω) ∂μ, ∀ (n : ℕ), 0 ≤ (μ[f (n + 1) - f n|↑ℱ n]) ω\nω : Ω\nhω₂ : ¬Tendsto (fun n => martingalePart f ℱ μ n ω) atTop atBot\nhω₃ : ∀ (n : ℕ), 0 ≤ (μ[f (n + 1) - f n|↑ℱ n]) ω\nhω₄ : ∀ (n : ℕ), f n ω ≤ f (n + 1) ω\nht : Tendsto (fun x => -f x ω) atTop atBot\nb : ℝ\nhbdd : b ∈ upperBounds (Set.range fun n => predictablePart f ℱ μ n ω)\nhω₁ : ¬Tendsto (fun n => (f n + -predictablePart f ℱ μ n) ω) atTop atTop\n⊢ False\n[PROOFSTEP]\nexact hω₁ (tendsto_atTop_add_right_of_le _ (-b) (tendsto_neg_atBot_iff.1 ht) fun n => neg_le_neg (hbdd ⟨n, rfl⟩))\n[GOAL]\ncase h.mpr\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝ : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhfmono : ∀ᵐ (ω : Ω) ∂μ, ∀ (n : ℕ), f n ω ≤ f (n + 1) ω\nhf : Adapted ℱ f\nhint : ∀ (n : ℕ), Integrable (f n)\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (n : ℕ), |f (n + 1) ω - f n ω| ≤ ↑R\nh₁ : ∀ᵐ (ω : Ω) ∂μ, ¬Tendsto (fun n => martingalePart f ℱ μ n ω) atTop atTop\nh₂ : ∀ᵐ (ω : Ω) ∂μ, ¬Tendsto (fun n => martingalePart f ℱ μ n ω) atTop atBot\nh₃ : ∀ᵐ (ω : Ω) ∂μ, ∀ (n : ℕ), 0 ≤ (μ[f (n + 1) - f n|↑ℱ n]) ω\nω : Ω\nhω₁ : ¬Tendsto (fun n => martingalePart f ℱ μ n ω) atTop atTop\nhω₂ : ¬Tendsto (fun n => martingalePart f ℱ μ n ω) atTop atBot\nhω₃ : ∀ (n : ℕ), 0 ≤ (μ[f (n + 1) - f n|↑ℱ n]) ω\nhω₄ : ∀ (n : ℕ), f n ω ≤ f (n + 1) ω\nht : Tendsto (fun n => predictablePart f ℱ μ n ω) atTop atTop\n⊢ Tendsto (fun n => f n ω) atTop atTop\n[PROOFSTEP]\nrefine' tendsto_atTop_atTop_of_monotone' (monotone_nat_of_le_succ hω₄) _\n[GOAL]\ncase h.mpr\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝ : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhfmono : ∀ᵐ (ω : Ω) ∂μ, ∀ (n : ℕ), f n ω ≤ f (n + 1) ω\nhf : Adapted ℱ f\nhint : ∀ (n : ℕ), Integrable (f n)\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (n : ℕ), |f (n + 1) ω - f n ω| ≤ ↑R\nh₁ : ∀ᵐ (ω : Ω) ∂μ, ¬Tendsto (fun n => martingalePart f ℱ μ n ω) atTop atTop\nh₂ : ∀ᵐ (ω : Ω) ∂μ, ¬Tendsto (fun n => martingalePart f ℱ μ n ω) atTop atBot\nh₃ : ∀ᵐ (ω : Ω) ∂μ, ∀ (n : ℕ), 0 ≤ (μ[f (n + 1) - f n|↑ℱ n]) ω\nω : Ω\nhω₁ : ¬Tendsto (fun n => martingalePart f ℱ μ n ω) atTop atTop\nhω₂ : ¬Tendsto (fun n => martingalePart f ℱ μ n ω) atTop atBot\nhω₃ : ∀ (n : ℕ), 0 ≤ (μ[f (n + 1) - f n|↑ℱ n]) ω\nhω₄ : ∀ (n : ℕ), f n ω ≤ f (n + 1) ω\nht : Tendsto (fun n => predictablePart f ℱ μ n ω) atTop atTop\n⊢ ¬BddAbove (Set.range fun n => f n ω)\n[PROOFSTEP]\nrintro ⟨b, hbdd⟩\n[GOAL]\ncase h.mpr.intro\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝ : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\nhfmono : ∀ᵐ (ω : Ω) ∂μ, ∀ (n : ℕ), f n ω ≤ f (n + 1) ω\nhf : Adapted ℱ f\nhint : ∀ (n : ℕ), Integrable (f n)\nhbdd✝ : ∀ᵐ (ω : Ω) ∂μ, ∀ (n : ℕ), |f (n + 1) ω - f n ω| ≤ ↑R\nh₁ : ∀ᵐ (ω : Ω) ∂μ, ¬Tendsto (fun n => martingalePart f ℱ μ n ω) atTop atTop\nh₂ : ∀ᵐ (ω : Ω) ∂μ, ¬Tendsto (fun n => martingalePart f ℱ μ n ω) atTop atBot\nh₃ : ∀ᵐ (ω : Ω) ∂μ, ∀ (n : ℕ), 0 ≤ (μ[f (n + 1) - f n|↑ℱ n]) ω\nω : Ω\nhω₁ : ¬Tendsto (fun n => martingalePart f ℱ μ n ω) atTop atTop\nhω₂ : ¬Tendsto (fun n => martingalePart f ℱ μ n ω) atTop atBot\nhω₃ : ∀ (n : ℕ), 0 ≤ (μ[f (n + 1) - f n|↑ℱ n]) ω\nhω₄ : ∀ (n : ℕ), f n ω ≤ f (n + 1) ω\nht : Tendsto (fun n => predictablePart f ℱ μ n ω) atTop atTop\nb : ℝ\nhbdd : b ∈ upperBounds (Set.range fun n => f n ω)\n⊢ False\n[PROOFSTEP]\nexact hω₂ ((tendsto_atBot_add_left_of_ge _ b fun n => hbdd ⟨n, rfl⟩) <| tendsto_neg_atBot_iff.2 ht)\n[GOAL]\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\ns : ℕ → Set Ω\nhs : ∀ (n : ℕ), MeasurableSet (s n)\n⊢ ∀ᵐ (ω : Ω) ∂μ,\n    Tendsto (fun n => ∑ k in Finset.range n, Set.indicator (s (k + 1)) 1 ω) atTop atTop ↔\n      Tendsto (fun n => ∑ k in Finset.range n, (μ[Set.indicator (s (k + 1)) 1|↑ℱ k]) ω) atTop atTop\n[PROOFSTEP]\nhave :=\n  tendsto_sum_indicator_atTop_iff (eventually_of_forall fun ω n => ?_) (adapted_process hs) (integrable_process μ hs)\n    (eventually_of_forall <| process_difference_le s)\n[GOAL]\ncase refine_2\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\ns : ℕ → Set Ω\nhs : ∀ (n : ℕ), MeasurableSet (s n)\nthis :\n  ∀ᵐ (ω : Ω) ∂μ,\n    Tendsto (fun n => process (fun n => s n) n ω) atTop atTop ↔\n      Tendsto (fun n => predictablePart (process fun n => s n) ℱ μ n ω) atTop atTop\n⊢ ∀ᵐ (ω : Ω) ∂μ,\n    Tendsto (fun n => ∑ k in Finset.range n, Set.indicator (s (k + 1)) 1 ω) atTop atTop ↔\n      Tendsto (fun n => ∑ k in Finset.range n, (μ[Set.indicator (s (k + 1)) 1|↑ℱ k]) ω) atTop atTop\ncase refine_1\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝ : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\ns : ℕ → Set Ω\nhs : ∀ (n : ℕ), MeasurableSet (s n)\nω : Ω\nn : ℕ\n⊢ process (fun n => s n) n ω ≤ process (fun n => s n) (n + 1) ω\n[PROOFSTEP]\nswap\n[GOAL]\ncase refine_1\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝ : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\ns : ℕ → Set Ω\nhs : ∀ (n : ℕ), MeasurableSet (s n)\nω : Ω\nn : ℕ\n⊢ process (fun n => s n) n ω ≤ process (fun n => s n) (n + 1) ω\n[PROOFSTEP]\nrw [process, process, ← sub_nonneg, Finset.sum_apply, Finset.sum_apply, Finset.sum_range_succ_sub_sum]\n[GOAL]\ncase refine_1\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω✝ : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\ns : ℕ → Set Ω\nhs : ∀ (n : ℕ), MeasurableSet (s n)\nω : Ω\nn : ℕ\n⊢ 0 ≤ Set.indicator (s (n + 1)) 1 ω\n[PROOFSTEP]\nexact Set.indicator_nonneg (fun _ _ => zero_le_one) _\n[GOAL]\ncase refine_2\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\ns : ℕ → Set Ω\nhs : ∀ (n : ℕ), MeasurableSet (s n)\nthis :\n  ∀ᵐ (ω : Ω) ∂μ,\n    Tendsto (fun n => process (fun n => s n) n ω) atTop atTop ↔\n      Tendsto (fun n => predictablePart (process fun n => s n) ℱ μ n ω) atTop atTop\n⊢ ∀ᵐ (ω : Ω) ∂μ,\n    Tendsto (fun n => ∑ k in Finset.range n, Set.indicator (s (k + 1)) 1 ω) atTop atTop ↔\n      Tendsto (fun n => ∑ k in Finset.range n, (μ[Set.indicator (s (k + 1)) 1|↑ℱ k]) ω) atTop atTop\n[PROOFSTEP]\nsimp_rw [process, predictablePart_process_ae_eq] at this \n[GOAL]\ncase refine_2\nΩ : Type u_1\nm0 : MeasurableSpace Ω\nμ : Measure Ω\nℱ : Filtration ℕ m0\nf : ℕ → Ω → ℝ\nω : Ω\nr : ℝ\nR : ℝ≥0\ninst✝ : IsFiniteMeasure μ\ns : ℕ → Set Ω\nhs : ∀ (n : ℕ), MeasurableSet (s n)\nthis :\n  ∀ᵐ (ω : Ω) ∂μ,\n    Tendsto (fun n => Finset.sum (Finset.range n) (fun k => Set.indicator (s (k + 1)) 1) ω) atTop atTop ↔\n      Tendsto (fun n => Finset.sum (Finset.range n) (fun k => μ[Set.indicator (s (k + 1)) 1|↑ℱ k]) ω) atTop atTop\n⊢ ∀ᵐ (ω : Ω) ∂μ,\n    Tendsto (fun n => ∑ k in Finset.range n, Set.indicator (s (k + 1)) 1 ω) atTop atTop ↔\n      Tendsto (fun n => ∑ k in Finset.range n, (μ[Set.indicator (s (k + 1)) 1|↑ℱ k]) ω) atTop atTop\n[PROOFSTEP]\nsimpa using this\n", "meta": {"mathlib_filename": "Mathlib.Probability.Martingale.BorelCantelli", "llama_tokens": 55307, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8479677506936878, "lm_q2_score": 0.6334102775181399, "lm_q1q2_score": 0.5371114882933217}}
{"text": "[GOAL]\nι : Type u_1\nα : ι → Type u_2\nr r₁ r₂ : ι → ι → Prop\ns s₁ s₂ : (i : ι) → α i → α i → Prop\na b : (i : ι) × α i\n⊢ Lex r s a b ↔ r a.fst b.fst ∨ ∃ h, s b.fst (h ▸ a.snd) b.snd\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nι : Type u_1\nα : ι → Type u_2\nr r₁ r₂ : ι → ι → Prop\ns s₁ s₂ : (i : ι) → α i → α i → Prop\na b : (i : ι) × α i\n⊢ Lex r s a b → r a.fst b.fst ∨ ∃ h, s b.fst (h ▸ a.snd) b.snd\n[PROOFSTEP]\nrintro (⟨a, b, hij⟩ | ⟨a, b, hab⟩)\n[GOAL]\ncase mp.left\nι : Type u_1\nα : ι → Type u_2\nr r₁ r₂ : ι → ι → Prop\ns s₁ s₂ : (i : ι) → α i → α i → Prop\ni✝ j✝ : ι\na : α i✝\nb : α j✝\nhij : r i✝ j✝\n⊢ r { fst := i✝, snd := a }.fst { fst := j✝, snd := b }.fst ∨\n    ∃ h, s { fst := j✝, snd := b }.fst (h ▸ { fst := i✝, snd := a }.snd) { fst := j✝, snd := b }.snd\n[PROOFSTEP]\nexact Or.inl hij\n[GOAL]\ncase mp.right\nι : Type u_1\nα : ι → Type u_2\nr r₁ r₂ : ι → ι → Prop\ns s₁ s₂ : (i : ι) → α i → α i → Prop\ni✝ : ι\na b : α i✝\nhab : s i✝ a b\n⊢ r { fst := i✝, snd := a }.fst { fst := i✝, snd := b }.fst ∨\n    ∃ h, s { fst := i✝, snd := b }.fst (h ▸ { fst := i✝, snd := a }.snd) { fst := i✝, snd := b }.snd\n[PROOFSTEP]\nexact Or.inr ⟨rfl, hab⟩\n[GOAL]\ncase mpr\nι : Type u_1\nα : ι → Type u_2\nr r₁ r₂ : ι → ι → Prop\ns s₁ s₂ : (i : ι) → α i → α i → Prop\na b : (i : ι) × α i\n⊢ (r a.fst b.fst ∨ ∃ h, s b.fst (h ▸ a.snd) b.snd) → Lex r s a b\n[PROOFSTEP]\nobtain ⟨i, a⟩ := a\n[GOAL]\ncase mpr.mk\nι : Type u_1\nα : ι → Type u_2\nr r₁ r₂ : ι → ι → Prop\ns s₁ s₂ : (i : ι) → α i → α i → Prop\nb : (i : ι) × α i\ni : ι\na : α i\n⊢ (r { fst := i, snd := a }.fst b.fst ∨ ∃ h, s b.fst (h ▸ { fst := i, snd := a }.snd) b.snd) →\n    Lex r s { fst := i, snd := a } b\n[PROOFSTEP]\nobtain ⟨j, b⟩ := b\n[GOAL]\ncase mpr.mk.mk\nι : Type u_1\nα : ι → Type u_2\nr r₁ r₂ : ι → ι → Prop\ns s₁ s₂ : (i : ι) → α i → α i → Prop\ni : ι\na : α i\nj : ι\nb : α j\n⊢ (r { fst := i, snd := a }.fst { fst := j, snd := b }.fst ∨\n      ∃ h, s { fst := j, snd := b }.fst (h ▸ { fst := i, snd := a }.snd) { fst := j, snd := b }.snd) →\n    Lex r s { fst := i, snd := a } { fst := j, snd := b }\n[PROOFSTEP]\ndsimp only\n[GOAL]\ncase mpr.mk.mk\nι : Type u_1\nα : ι → Type u_2\nr r₁ r₂ : ι → ι → Prop\ns s₁ s₂ : (i : ι) → α i → α i → Prop\ni : ι\na : α i\nj : ι\nb : α j\n⊢ (r i j ∨ ∃ h, s j (h ▸ a) b) → Lex r s { fst := i, snd := a } { fst := j, snd := b }\n[PROOFSTEP]\nrintro (h | ⟨rfl, h⟩)\n[GOAL]\ncase mpr.mk.mk.inl\nι : Type u_1\nα : ι → Type u_2\nr r₁ r₂ : ι → ι → Prop\ns s₁ s₂ : (i : ι) → α i → α i → Prop\ni : ι\na : α i\nj : ι\nb : α j\nh : r i j\n⊢ Lex r s { fst := i, snd := a } { fst := j, snd := b }\n[PROOFSTEP]\nexact Lex.left _ _ h\n[GOAL]\ncase mpr.mk.mk.inr.intro\nι : Type u_1\nα : ι → Type u_2\nr r₁ r₂ : ι → ι → Prop\ns s₁ s₂ : (i : ι) → α i → α i → Prop\ni : ι\na b : α i\nh : s i ((_ : i = i) ▸ a) b\n⊢ Lex r s { fst := i, snd := a } { fst := i, snd := b }\n[PROOFSTEP]\nexact Lex.right _ _ h\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\nr r₁ r₂ : ι → ι → Prop\ns s₁ s₂ : (i : ι) → α i → α i → Prop\na✝ b✝ : (i : ι) × α i\nhr : ∀ (a b : ι), r₁ a b → r₂ a b\nhs : ∀ (i : ι) (a b : α i), s₁ i a b → s₂ i a b\na b : (i : ι) × α i\nh : Lex r₁ s₁ a b\n⊢ Lex r₂ s₂ a b\n[PROOFSTEP]\nobtain ⟨a, b, hij⟩ | ⟨a, b, hab⟩ := h\n[GOAL]\ncase left\nι : Type u_1\nα : ι → Type u_2\nr r₁ r₂ : ι → ι → Prop\ns s₁ s₂ : (i : ι) → α i → α i → Prop\na✝ b✝ : (i : ι) × α i\nhr : ∀ (a b : ι), r₁ a b → r₂ a b\nhs : ∀ (i : ι) (a b : α i), s₁ i a b → s₂ i a b\ni✝ j✝ : ι\na : α i✝\nb : α j✝\nhij : r₁ i✝ j✝\n⊢ Lex r₂ s₂ { fst := i✝, snd := a } { fst := j✝, snd := b }\n[PROOFSTEP]\nexact Lex.left _ _ (hr _ _ hij)\n[GOAL]\ncase right\nι : Type u_1\nα : ι → Type u_2\nr r₁ r₂ : ι → ι → Prop\ns s₁ s₂ : (i : ι) → α i → α i → Prop\na✝ b✝ : (i : ι) × α i\nhr : ∀ (a b : ι), r₁ a b → r₂ a b\nhs : ∀ (i : ι) (a b : α i), s₁ i a b → s₂ i a b\ni✝ : ι\na b : α i✝\nhab : s₁ i✝ a b\n⊢ Lex r₂ s₂ { fst := i✝, snd := a } { fst := i✝, snd := b }\n[PROOFSTEP]\nexact Lex.right _ _ (hs _ _ _ hab)\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\nr r₁ r₂ : ι → ι → Prop\ns s₁ s₂ : (i : ι) → α i → α i → Prop\na b : (i : ι) × α i\n⊢ Lex (Function.swap r) s a b ↔ Lex r (fun i => Function.swap (s i)) b a\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nι : Type u_1\nα : ι → Type u_2\nr r₁ r₂ : ι → ι → Prop\ns s₁ s₂ : (i : ι) → α i → α i → Prop\na b : (i : ι) × α i\n⊢ Lex (Function.swap r) s a b → Lex r (fun i => Function.swap (s i)) b a\n[PROOFSTEP]\nrintro (⟨a, b, h⟩ | ⟨a, b, h⟩)\n[GOAL]\ncase mp.left\nι : Type u_1\nα : ι → Type u_2\nr r₁ r₂ : ι → ι → Prop\ns s₁ s₂ : (i : ι) → α i → α i → Prop\ni✝ j✝ : ι\na : α i✝\nb : α j✝\nh : Function.swap r i✝ j✝\n⊢ Lex r (fun i => Function.swap (s i)) { fst := j✝, snd := b } { fst := i✝, snd := a }\ncase mp.right\nι : Type u_1\nα : ι → Type u_2\nr r₁ r₂ : ι → ι → Prop\ns s₁ s₂ : (i : ι) → α i → α i → Prop\ni✝ : ι\na b : α i✝\nh : s i✝ a b\n⊢ Lex r (fun i => Function.swap (s i)) { fst := i✝, snd := b } { fst := i✝, snd := a }\n[PROOFSTEP]\nexacts [Lex.left _ _ h, Lex.right _ _ h]\n[GOAL]\ncase mpr\nι : Type u_1\nα : ι → Type u_2\nr r₁ r₂ : ι → ι → Prop\ns s₁ s₂ : (i : ι) → α i → α i → Prop\na b : (i : ι) × α i\n⊢ Lex r (fun i => Function.swap (s i)) b a → Lex (Function.swap r) s a b\n[PROOFSTEP]\nrintro (⟨a, b, h⟩ | ⟨a, b, h⟩)\n[GOAL]\ncase mpr.left\nι : Type u_1\nα : ι → Type u_2\nr r₁ r₂ : ι → ι → Prop\ns s₁ s₂ : (i : ι) → α i → α i → Prop\ni✝ j✝ : ι\na : α i✝\nb : α j✝\nh : r i✝ j✝\n⊢ Lex (Function.swap r) s { fst := j✝, snd := b } { fst := i✝, snd := a }\ncase mpr.right\nι : Type u_1\nα : ι → Type u_2\nr r₁ r₂ : ι → ι → Prop\ns s₁ s₂ : (i : ι) → α i → α i → Prop\ni✝ : ι\na b : α i✝\nh : Function.swap (s i✝) a b\n⊢ Lex (Function.swap r) s { fst := i✝, snd := b } { fst := i✝, snd := a }\n[PROOFSTEP]\nexacts [Lex.left _ _ h, Lex.right _ _ h]\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\nr r₁ r₂ : ι → ι → Prop\ns s₁ s₂ : (i : ι) → α i → α i → Prop\na b : (i : ι) × α i\ninst✝¹ : IsIrrefl ι r\ninst✝ : ∀ (i : ι), IsIrrefl (α i) (s i)\n⊢ ∀ (a : (i : ι) × α i), ¬Lex r s a a\n[PROOFSTEP]\nrintro _ (⟨a, b, hi⟩ | ⟨a, b, ha⟩)\n[GOAL]\ncase left\nι : Type u_1\nα : ι → Type u_2\nr r₁ r₂ : ι → ι → Prop\ns s₁ s₂ : (i : ι) → α i → α i → Prop\na✝ b : (i : ι) × α i\ninst✝¹ : IsIrrefl ι r\ninst✝ : ∀ (i : ι), IsIrrefl (α i) (s i)\ni✝ : ι\na : α i✝\nhi : r i✝ i✝\n⊢ False\n[PROOFSTEP]\nexact irrefl _ hi\n[GOAL]\ncase right\nι : Type u_1\nα : ι → Type u_2\nr r₁ r₂ : ι → ι → Prop\ns s₁ s₂ : (i : ι) → α i → α i → Prop\na✝ b : (i : ι) × α i\ninst✝¹ : IsIrrefl ι r\ninst✝ : ∀ (i : ι), IsIrrefl (α i) (s i)\ni✝ : ι\na : α i✝\nha : s i✝ a a\n⊢ False\n[PROOFSTEP]\nexact irrefl _ ha\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\nr r₁ r₂ : ι → ι → Prop\ns s₁ s₂ : (i : ι) → α i → α i → Prop\na b : (i : ι) × α i\ninst✝¹ : IsTrans ι r\ninst✝ : ∀ (i : ι), IsTrans (α i) (s i)\n⊢ ∀ (a b c : (i : ι) × α i), Lex r s a b → Lex r s b c → Lex r s a c\n[PROOFSTEP]\nrintro _ _ _ (⟨a, b, hij⟩ | ⟨a, b, hab⟩) (⟨_, c, hk⟩ | ⟨_, c, hc⟩)\n[GOAL]\ncase left.left\nι : Type u_1\nα : ι → Type u_2\nr r₁ r₂ : ι → ι → Prop\ns s₁ s₂ : (i : ι) → α i → α i → Prop\na✝ b✝ : (i : ι) × α i\ninst✝¹ : IsTrans ι r\ninst✝ : ∀ (i : ι), IsTrans (α i) (s i)\ni✝ j✝¹ : ι\na : α i✝\nb : α j✝¹\nhij : r i✝ j✝¹\nj✝ : ι\nc : α j✝\nhk : r j✝¹ j✝\n⊢ Lex r s { fst := i✝, snd := a } { fst := j✝, snd := c }\n[PROOFSTEP]\nexact Lex.left _ _ (_root_.trans hij hk)\n[GOAL]\ncase left.right\nι : Type u_1\nα : ι → Type u_2\nr r₁ r₂ : ι → ι → Prop\ns s₁ s₂ : (i : ι) → α i → α i → Prop\na✝ b✝ : (i : ι) × α i\ninst✝¹ : IsTrans ι r\ninst✝ : ∀ (i : ι), IsTrans (α i) (s i)\ni✝ j✝ : ι\na : α i✝\nb : α j✝\nhij : r i✝ j✝\nc : α j✝\nhc : s j✝ b c\n⊢ Lex r s { fst := i✝, snd := a } { fst := j✝, snd := c }\n[PROOFSTEP]\nexact Lex.left _ _ hij\n[GOAL]\ncase right.left\nι : Type u_1\nα : ι → Type u_2\nr r₁ r₂ : ι → ι → Prop\ns s₁ s₂ : (i : ι) → α i → α i → Prop\na✝ b✝ : (i : ι) × α i\ninst✝¹ : IsTrans ι r\ninst✝ : ∀ (i : ι), IsTrans (α i) (s i)\ni✝ : ι\na b : α i✝\nhab : s i✝ a b\nj✝ : ι\nc : α j✝\nhk : r i✝ j✝\n⊢ Lex r s { fst := i✝, snd := a } { fst := j✝, snd := c }\n[PROOFSTEP]\nexact Lex.left _ _ hk\n[GOAL]\ncase right.right\nι : Type u_1\nα : ι → Type u_2\nr r₁ r₂ : ι → ι → Prop\ns s₁ s₂ : (i : ι) → α i → α i → Prop\na✝ b✝ : (i : ι) × α i\ninst✝¹ : IsTrans ι r\ninst✝ : ∀ (i : ι), IsTrans (α i) (s i)\ni✝ : ι\na b : α i✝\nhab : s i✝ a b\nc : α i✝\nhc : s i✝ b c\n⊢ Lex r s { fst := i✝, snd := a } { fst := i✝, snd := c }\n[PROOFSTEP]\nexact Lex.right _ _ (_root_.trans hab hc)\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\nr r₁ r₂ : ι → ι → Prop\ns s₁ s₂ : (i : ι) → α i → α i → Prop\na b : (i : ι) × α i\ninst✝¹ : IsSymm ι r\ninst✝ : ∀ (i : ι), IsSymm (α i) (s i)\n⊢ ∀ (a b : (i : ι) × α i), Lex r s a b → Lex r s b a\n[PROOFSTEP]\nrintro _ _ (⟨a, b, hij⟩ | ⟨a, b, hab⟩)\n[GOAL]\ncase left\nι : Type u_1\nα : ι → Type u_2\nr r₁ r₂ : ι → ι → Prop\ns s₁ s₂ : (i : ι) → α i → α i → Prop\na✝ b✝ : (i : ι) × α i\ninst✝¹ : IsSymm ι r\ninst✝ : ∀ (i : ι), IsSymm (α i) (s i)\ni✝ j✝ : ι\na : α i✝\nb : α j✝\nhij : r i✝ j✝\n⊢ Lex r s { fst := j✝, snd := b } { fst := i✝, snd := a }\n[PROOFSTEP]\nexact Lex.left _ _ (symm hij)\n[GOAL]\ncase right\nι : Type u_1\nα : ι → Type u_2\nr r₁ r₂ : ι → ι → Prop\ns s₁ s₂ : (i : ι) → α i → α i → Prop\na✝ b✝ : (i : ι) × α i\ninst✝¹ : IsSymm ι r\ninst✝ : ∀ (i : ι), IsSymm (α i) (s i)\ni✝ : ι\na b : α i✝\nhab : s i✝ a b\n⊢ Lex r s { fst := i✝, snd := b } { fst := i✝, snd := a }\n[PROOFSTEP]\nexact Lex.right _ _ (symm hab)\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\nr r₁ r₂ : ι → ι → Prop\ns s₁ s₂ : (i : ι) → α i → α i → Prop\na b : (i : ι) × α i\ninst✝¹ : IsAsymm ι r\ninst✝ : ∀ (i : ι), IsAntisymm (α i) (s i)\n⊢ ∀ (a b : (i : ι) × α i), Lex r s a b → Lex r s b a → a = b\n[PROOFSTEP]\nrintro _ _ (⟨a, b, hij⟩ | ⟨a, b, hab⟩) (⟨_, _, hji⟩ | ⟨_, _, hba⟩)\n[GOAL]\ncase left.left\nι : Type u_1\nα : ι → Type u_2\nr r₁ r₂ : ι → ι → Prop\ns s₁ s₂ : (i : ι) → α i → α i → Prop\na✝ b✝ : (i : ι) × α i\ninst✝¹ : IsAsymm ι r\ninst✝ : ∀ (i : ι), IsAntisymm (α i) (s i)\ni✝ j✝ : ι\na : α i✝\nb : α j✝\nhij : r i✝ j✝\nhji : r j✝ i✝\n⊢ { fst := i✝, snd := a } = { fst := j✝, snd := b }\n[PROOFSTEP]\nexact (asymm hij hji).elim\n[GOAL]\ncase left.right\nι : Type u_1\nα : ι → Type u_2\nr r₁ r₂ : ι → ι → Prop\ns s₁ s₂ : (i : ι) → α i → α i → Prop\na✝ b✝ : (i : ι) × α i\ninst✝¹ : IsAsymm ι r\ninst✝ : ∀ (i : ι), IsAntisymm (α i) (s i)\ni✝ : ι\na b : α i✝\nhij : r i✝ i✝\nhba : s i✝ b a\n⊢ { fst := i✝, snd := a } = { fst := i✝, snd := b }\n[PROOFSTEP]\nexact (irrefl _ hij).elim\n[GOAL]\ncase right.left\nι : Type u_1\nα : ι → Type u_2\nr r₁ r₂ : ι → ι → Prop\ns s₁ s₂ : (i : ι) → α i → α i → Prop\na✝ b✝ : (i : ι) × α i\ninst✝¹ : IsAsymm ι r\ninst✝ : ∀ (i : ι), IsAntisymm (α i) (s i)\ni✝ : ι\na b : α i✝\nhab : s i✝ a b\nhji : r i✝ i✝\n⊢ { fst := i✝, snd := a } = { fst := i✝, snd := b }\n[PROOFSTEP]\nexact (irrefl _ hji).elim\n[GOAL]\ncase right.right\nι : Type u_1\nα : ι → Type u_2\nr r₁ r₂ : ι → ι → Prop\ns s₁ s₂ : (i : ι) → α i → α i → Prop\na✝ b✝ : (i : ι) × α i\ninst✝¹ : IsAsymm ι r\ninst✝ : ∀ (i : ι), IsAntisymm (α i) (s i)\ni✝ : ι\na b : α i✝\nhab : s i✝ a b\nhba : s i✝ b a\n⊢ { fst := i✝, snd := a } = { fst := i✝, snd := b }\n[PROOFSTEP]\nexact ext rfl (heq_of_eq $ antisymm hab hba)\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\nr r₁ r₂ : ι → ι → Prop\ns s₁ s₂ : (i : ι) → α i → α i → Prop\na b : (i : ι) × α i\ninst✝¹ : IsTrichotomous ι r\ninst✝ : ∀ (i : ι), IsTotal (α i) (s i)\n⊢ ∀ (a b : (i : ι) × α i), Lex r s a b ∨ Lex r s b a\n[PROOFSTEP]\nrintro ⟨i, a⟩ ⟨j, b⟩\n[GOAL]\ncase mk.mk\nι : Type u_1\nα : ι → Type u_2\nr r₁ r₂ : ι → ι → Prop\ns s₁ s₂ : (i : ι) → α i → α i → Prop\na✝ b✝ : (i : ι) × α i\ninst✝¹ : IsTrichotomous ι r\ninst✝ : ∀ (i : ι), IsTotal (α i) (s i)\ni : ι\na : α i\nj : ι\nb : α j\n⊢ Lex r s { fst := i, snd := a } { fst := j, snd := b } ∨ Lex r s { fst := j, snd := b } { fst := i, snd := a }\n[PROOFSTEP]\nobtain hij | rfl | hji := trichotomous_of r i j\n[GOAL]\ncase mk.mk.inl\nι : Type u_1\nα : ι → Type u_2\nr r₁ r₂ : ι → ι → Prop\ns s₁ s₂ : (i : ι) → α i → α i → Prop\na✝ b✝ : (i : ι) × α i\ninst✝¹ : IsTrichotomous ι r\ninst✝ : ∀ (i : ι), IsTotal (α i) (s i)\ni : ι\na : α i\nj : ι\nb : α j\nhij : r i j\n⊢ Lex r s { fst := i, snd := a } { fst := j, snd := b } ∨ Lex r s { fst := j, snd := b } { fst := i, snd := a }\n[PROOFSTEP]\nexact Or.inl (Lex.left _ _ hij)\n[GOAL]\ncase mk.mk.inr.inl\nι : Type u_1\nα : ι → Type u_2\nr r₁ r₂ : ι → ι → Prop\ns s₁ s₂ : (i : ι) → α i → α i → Prop\na✝ b✝ : (i : ι) × α i\ninst✝¹ : IsTrichotomous ι r\ninst✝ : ∀ (i : ι), IsTotal (α i) (s i)\ni : ι\na b : α i\n⊢ Lex r s { fst := i, snd := a } { fst := i, snd := b } ∨ Lex r s { fst := i, snd := b } { fst := i, snd := a }\n[PROOFSTEP]\nobtain hab | hba := total_of (s i) a b\n[GOAL]\ncase mk.mk.inr.inl.inl\nι : Type u_1\nα : ι → Type u_2\nr r₁ r₂ : ι → ι → Prop\ns s₁ s₂ : (i : ι) → α i → α i → Prop\na✝ b✝ : (i : ι) × α i\ninst✝¹ : IsTrichotomous ι r\ninst✝ : ∀ (i : ι), IsTotal (α i) (s i)\ni : ι\na b : α i\nhab : s i a b\n⊢ Lex r s { fst := i, snd := a } { fst := i, snd := b } ∨ Lex r s { fst := i, snd := b } { fst := i, snd := a }\n[PROOFSTEP]\nexact Or.inl (Lex.right _ _ hab)\n[GOAL]\ncase mk.mk.inr.inl.inr\nι : Type u_1\nα : ι → Type u_2\nr r₁ r₂ : ι → ι → Prop\ns s₁ s₂ : (i : ι) → α i → α i → Prop\na✝ b✝ : (i : ι) × α i\ninst✝¹ : IsTrichotomous ι r\ninst✝ : ∀ (i : ι), IsTotal (α i) (s i)\ni : ι\na b : α i\nhba : s i b a\n⊢ Lex r s { fst := i, snd := a } { fst := i, snd := b } ∨ Lex r s { fst := i, snd := b } { fst := i, snd := a }\n[PROOFSTEP]\nexact Or.inr (Lex.right _ _ hba)\n[GOAL]\ncase mk.mk.inr.inr\nι : Type u_1\nα : ι → Type u_2\nr r₁ r₂ : ι → ι → Prop\ns s₁ s₂ : (i : ι) → α i → α i → Prop\na✝ b✝ : (i : ι) × α i\ninst✝¹ : IsTrichotomous ι r\ninst✝ : ∀ (i : ι), IsTotal (α i) (s i)\ni : ι\na : α i\nj : ι\nb : α j\nhji : r j i\n⊢ Lex r s { fst := i, snd := a } { fst := j, snd := b } ∨ Lex r s { fst := j, snd := b } { fst := i, snd := a }\n[PROOFSTEP]\nexact Or.inr (Lex.left _ _ hji)\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\nr r₁ r₂ : ι → ι → Prop\ns s₁ s₂ : (i : ι) → α i → α i → Prop\na b : (i : ι) × α i\ninst✝¹ : IsTrichotomous ι r\ninst✝ : ∀ (i : ι), IsTrichotomous (α i) (s i)\n⊢ ∀ (a b : (i : ι) × α i), Lex r s a b ∨ a = b ∨ Lex r s b a\n[PROOFSTEP]\nrintro ⟨i, a⟩ ⟨j, b⟩\n[GOAL]\ncase mk.mk\nι : Type u_1\nα : ι → Type u_2\nr r₁ r₂ : ι → ι → Prop\ns s₁ s₂ : (i : ι) → α i → α i → Prop\na✝ b✝ : (i : ι) × α i\ninst✝¹ : IsTrichotomous ι r\ninst✝ : ∀ (i : ι), IsTrichotomous (α i) (s i)\ni : ι\na : α i\nj : ι\nb : α j\n⊢ Lex r s { fst := i, snd := a } { fst := j, snd := b } ∨\n    { fst := i, snd := a } = { fst := j, snd := b } ∨ Lex r s { fst := j, snd := b } { fst := i, snd := a }\n[PROOFSTEP]\nobtain hij | rfl | hji := trichotomous_of r i j\n[GOAL]\ncase mk.mk.inl\nι : Type u_1\nα : ι → Type u_2\nr r₁ r₂ : ι → ι → Prop\ns s₁ s₂ : (i : ι) → α i → α i → Prop\na✝ b✝ : (i : ι) × α i\ninst✝¹ : IsTrichotomous ι r\ninst✝ : ∀ (i : ι), IsTrichotomous (α i) (s i)\ni : ι\na : α i\nj : ι\nb : α j\nhij : r i j\n⊢ Lex r s { fst := i, snd := a } { fst := j, snd := b } ∨\n    { fst := i, snd := a } = { fst := j, snd := b } ∨ Lex r s { fst := j, snd := b } { fst := i, snd := a }\n[PROOFSTEP]\nexact Or.inl (Lex.left _ _ hij)\n[GOAL]\ncase mk.mk.inr.inl\nι : Type u_1\nα : ι → Type u_2\nr r₁ r₂ : ι → ι → Prop\ns s₁ s₂ : (i : ι) → α i → α i → Prop\na✝ b✝ : (i : ι) × α i\ninst✝¹ : IsTrichotomous ι r\ninst✝ : ∀ (i : ι), IsTrichotomous (α i) (s i)\ni : ι\na b : α i\n⊢ Lex r s { fst := i, snd := a } { fst := i, snd := b } ∨\n    { fst := i, snd := a } = { fst := i, snd := b } ∨ Lex r s { fst := i, snd := b } { fst := i, snd := a }\n[PROOFSTEP]\nobtain hab | rfl | hba := trichotomous_of (s i) a b\n[GOAL]\ncase mk.mk.inr.inl.inl\nι : Type u_1\nα : ι → Type u_2\nr r₁ r₂ : ι → ι → Prop\ns s₁ s₂ : (i : ι) → α i → α i → Prop\na✝ b✝ : (i : ι) × α i\ninst✝¹ : IsTrichotomous ι r\ninst✝ : ∀ (i : ι), IsTrichotomous (α i) (s i)\ni : ι\na b : α i\nhab : s i a b\n⊢ Lex r s { fst := i, snd := a } { fst := i, snd := b } ∨\n    { fst := i, snd := a } = { fst := i, snd := b } ∨ Lex r s { fst := i, snd := b } { fst := i, snd := a }\n[PROOFSTEP]\nexact Or.inl (Lex.right _ _ hab)\n[GOAL]\ncase mk.mk.inr.inl.inr.inl\nι : Type u_1\nα : ι → Type u_2\nr r₁ r₂ : ι → ι → Prop\ns s₁ s₂ : (i : ι) → α i → α i → Prop\na✝ b : (i : ι) × α i\ninst✝¹ : IsTrichotomous ι r\ninst✝ : ∀ (i : ι), IsTrichotomous (α i) (s i)\ni : ι\na : α i\n⊢ Lex r s { fst := i, snd := a } { fst := i, snd := a } ∨\n    { fst := i, snd := a } = { fst := i, snd := a } ∨ Lex r s { fst := i, snd := a } { fst := i, snd := a }\n[PROOFSTEP]\nexact Or.inr (Or.inl rfl)\n[GOAL]\ncase mk.mk.inr.inl.inr.inr\nι : Type u_1\nα : ι → Type u_2\nr r₁ r₂ : ι → ι → Prop\ns s₁ s₂ : (i : ι) → α i → α i → Prop\na✝ b✝ : (i : ι) × α i\ninst✝¹ : IsTrichotomous ι r\ninst✝ : ∀ (i : ι), IsTrichotomous (α i) (s i)\ni : ι\na b : α i\nhba : s i b a\n⊢ Lex r s { fst := i, snd := a } { fst := i, snd := b } ∨\n    { fst := i, snd := a } = { fst := i, snd := b } ∨ Lex r s { fst := i, snd := b } { fst := i, snd := a }\n[PROOFSTEP]\nexact Or.inr (Or.inr $ Lex.right _ _ hba)\n[GOAL]\ncase mk.mk.inr.inr\nι : Type u_1\nα : ι → Type u_2\nr r₁ r₂ : ι → ι → Prop\ns s₁ s₂ : (i : ι) → α i → α i → Prop\na✝ b✝ : (i : ι) × α i\ninst✝¹ : IsTrichotomous ι r\ninst✝ : ∀ (i : ι), IsTrichotomous (α i) (s i)\ni : ι\na : α i\nj : ι\nb : α j\nhji : r j i\n⊢ Lex r s { fst := i, snd := a } { fst := j, snd := b } ∨\n    { fst := i, snd := a } = { fst := j, snd := b } ∨ Lex r s { fst := j, snd := b } { fst := i, snd := a }\n[PROOFSTEP]\nexact Or.inr (Or.inr $ Lex.left _ _ hji)\n[GOAL]\nι : Sort u_1\nα : ι → Sort u_2\nr r₁ r₂ : ι → ι → Prop\ns s₁ s₂ : (i : ι) → α i → α i → Prop\na b : (i : ι) ×' α i\n⊢ Lex r s a b ↔ r a.fst b.fst ∨ ∃ h, s b.fst (h ▸ a.snd) b.snd\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nι : Sort u_1\nα : ι → Sort u_2\nr r₁ r₂ : ι → ι → Prop\ns s₁ s₂ : (i : ι) → α i → α i → Prop\na b : (i : ι) ×' α i\n⊢ Lex r s a b → r a.fst b.fst ∨ ∃ h, s b.fst (h ▸ a.snd) b.snd\n[PROOFSTEP]\nrintro (⟨a, b, hij⟩ | ⟨i, hab⟩)\n[GOAL]\ncase mp.left\nι : Sort u_1\nα : ι → Sort u_2\nr r₁ r₂ : ι → ι → Prop\ns s₁ s₂ : (i : ι) → α i → α i → Prop\na₁✝ : ι\na : α a₁✝\na₂✝ : ι\nb : α a₂✝\nhij : r a₁✝ a₂✝\n⊢ r { fst := a₁✝, snd := a }.fst { fst := a₂✝, snd := b }.fst ∨\n    ∃ h, s { fst := a₂✝, snd := b }.fst (h ▸ { fst := a₁✝, snd := a }.snd) { fst := a₂✝, snd := b }.snd\n[PROOFSTEP]\nexact Or.inl hij\n[GOAL]\ncase mp.right\nι : Sort u_1\nα : ι → Sort u_2\nr r₁ r₂ : ι → ι → Prop\ns s₁ s₂ : (i : ι) → α i → α i → Prop\ni : ι\nb₁✝ b₂✝ : α i\nhab : s i b₁✝ b₂✝\n⊢ r { fst := i, snd := b₁✝ }.fst { fst := i, snd := b₂✝ }.fst ∨\n    ∃ h, s { fst := i, snd := b₂✝ }.fst (h ▸ { fst := i, snd := b₁✝ }.snd) { fst := i, snd := b₂✝ }.snd\n[PROOFSTEP]\nexact Or.inr ⟨rfl, hab⟩\n[GOAL]\ncase mpr\nι : Sort u_1\nα : ι → Sort u_2\nr r₁ r₂ : ι → ι → Prop\ns s₁ s₂ : (i : ι) → α i → α i → Prop\na b : (i : ι) ×' α i\n⊢ (r a.fst b.fst ∨ ∃ h, s b.fst (h ▸ a.snd) b.snd) → Lex r s a b\n[PROOFSTEP]\nobtain ⟨i, a⟩ := a\n[GOAL]\ncase mpr.mk\nι : Sort u_1\nα : ι → Sort u_2\nr r₁ r₂ : ι → ι → Prop\ns s₁ s₂ : (i : ι) → α i → α i → Prop\nb : (i : ι) ×' α i\ni : ι\na : α i\n⊢ (r { fst := i, snd := a }.fst b.fst ∨ ∃ h, s b.fst (h ▸ { fst := i, snd := a }.snd) b.snd) →\n    Lex r s { fst := i, snd := a } b\n[PROOFSTEP]\nobtain ⟨j, b⟩ := b\n[GOAL]\ncase mpr.mk.mk\nι : Sort u_1\nα : ι → Sort u_2\nr r₁ r₂ : ι → ι → Prop\ns s₁ s₂ : (i : ι) → α i → α i → Prop\ni : ι\na : α i\nj : ι\nb : α j\n⊢ (r { fst := i, snd := a }.fst { fst := j, snd := b }.fst ∨\n      ∃ h, s { fst := j, snd := b }.fst (h ▸ { fst := i, snd := a }.snd) { fst := j, snd := b }.snd) →\n    Lex r s { fst := i, snd := a } { fst := j, snd := b }\n[PROOFSTEP]\ndsimp only\n[GOAL]\ncase mpr.mk.mk\nι : Sort u_1\nα : ι → Sort u_2\nr r₁ r₂ : ι → ι → Prop\ns s₁ s₂ : (i : ι) → α i → α i → Prop\ni : ι\na : α i\nj : ι\nb : α j\n⊢ (r i j ∨ ∃ h, s j (h ▸ a) b) → Lex r s { fst := i, snd := a } { fst := j, snd := b }\n[PROOFSTEP]\nrintro (h | ⟨rfl, h⟩)\n[GOAL]\ncase mpr.mk.mk.inl\nι : Sort u_1\nα : ι → Sort u_2\nr r₁ r₂ : ι → ι → Prop\ns s₁ s₂ : (i : ι) → α i → α i → Prop\ni : ι\na : α i\nj : ι\nb : α j\nh : r i j\n⊢ Lex r s { fst := i, snd := a } { fst := j, snd := b }\n[PROOFSTEP]\nexact Lex.left _ _ h\n[GOAL]\ncase mpr.mk.mk.inr.intro\nι : Sort u_1\nα : ι → Sort u_2\nr r₁ r₂ : ι → ι → Prop\ns s₁ s₂ : (i : ι) → α i → α i → Prop\ni : ι\na b : α i\nh : s i ((_ : i = i) ▸ a) b\n⊢ Lex r s { fst := i, snd := a } { fst := i, snd := b }\n[PROOFSTEP]\nexact Lex.right _ h\n[GOAL]\nι : Sort u_1\nα : ι → Sort u_2\nr r₁✝ r₂✝ : ι → ι → Prop\ns s₁✝ s₂✝ : (i : ι) → α i → α i → Prop\nr₁ r₂ : ι → ι → Prop\ns₁ s₂ : (i : ι) → α i → α i → Prop\nhr : ∀ (a b : ι), r₁ a b → r₂ a b\nhs : ∀ (i : ι) (a b : α i), s₁ i a b → s₂ i a b\na b : (i : ι) ×' α i\nh : Lex r₁ s₁ a b\n⊢ Lex r₂ s₂ a b\n[PROOFSTEP]\nobtain ⟨a, b, hij⟩ | ⟨i, hab⟩ := h\n[GOAL]\ncase left\nι : Sort u_1\nα : ι → Sort u_2\nr r₁✝ r₂✝ : ι → ι → Prop\ns s₁✝ s₂✝ : (i : ι) → α i → α i → Prop\nr₁ r₂ : ι → ι → Prop\ns₁ s₂ : (i : ι) → α i → α i → Prop\nhr : ∀ (a b : ι), r₁ a b → r₂ a b\nhs : ∀ (i : ι) (a b : α i), s₁ i a b → s₂ i a b\na₁✝ : ι\na : α a₁✝\na₂✝ : ι\nb : α a₂✝\nhij : r₁ a₁✝ a₂✝\n⊢ Lex r₂ s₂ { fst := a₁✝, snd := a } { fst := a₂✝, snd := b }\n[PROOFSTEP]\nexact Lex.left _ _ (hr _ _ hij)\n[GOAL]\ncase right\nι : Sort u_1\nα : ι → Sort u_2\nr r₁✝ r₂✝ : ι → ι → Prop\ns s₁✝ s₂✝ : (i : ι) → α i → α i → Prop\nr₁ r₂ : ι → ι → Prop\ns₁ s₂ : (i : ι) → α i → α i → Prop\nhr : ∀ (a b : ι), r₁ a b → r₂ a b\nhs : ∀ (i : ι) (a b : α i), s₁ i a b → s₂ i a b\ni : ι\nb₁✝ b₂✝ : α i\nhab : s₁ i b₁✝ b₂✝\n⊢ Lex r₂ s₂ { fst := i, snd := b₁✝ } { fst := i, snd := b₂✝ }\n[PROOFSTEP]\nexact Lex.right _ (hs _ _ _ hab)\n", "meta": {"mathlib_filename": "Mathlib.Data.Sigma.Lex", "llama_tokens": 12368, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8244619350028204, "lm_q2_score": 0.6513548714339145, "lm_q1q2_score": 0.5370172976759184}}
{"text": "[GOAL]\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : CompleteSpace F\nf : E → F\nU : Set E\nhf : AnalyticOn 𝕜 f U\nhU : IsPreconnected U\nz₀ : E\nh₀ : z₀ ∈ U\nhfz₀ : f =ᶠ[𝓝 z₀] 0\n⊢ EqOn f 0 U\n[PROOFSTEP]\nlet u := {x | f =ᶠ[𝓝 x] 0}\n[GOAL]\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : CompleteSpace F\nf : E → F\nU : Set E\nhf : AnalyticOn 𝕜 f U\nhU : IsPreconnected U\nz₀ : E\nh₀ : z₀ ∈ U\nhfz₀ : f =ᶠ[𝓝 z₀] 0\nu : Set E := {x | f =ᶠ[𝓝 x] 0}\n⊢ EqOn f 0 U\n[PROOFSTEP]\nsuffices main : closure u ∩ U ⊆ u\n[GOAL]\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : CompleteSpace F\nf : E → F\nU : Set E\nhf : AnalyticOn 𝕜 f U\nhU : IsPreconnected U\nz₀ : E\nh₀ : z₀ ∈ U\nhfz₀ : f =ᶠ[𝓝 z₀] 0\nu : Set E := {x | f =ᶠ[𝓝 x] 0}\nmain : closure u ∩ U ⊆ u\n⊢ EqOn f 0 U\n[PROOFSTEP]\nhave Uu : U ⊆ u := hU.subset_of_closure_inter_subset isOpen_setOf_eventually_nhds ⟨z₀, h₀, hfz₀⟩ main\n[GOAL]\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : CompleteSpace F\nf : E → F\nU : Set E\nhf : AnalyticOn 𝕜 f U\nhU : IsPreconnected U\nz₀ : E\nh₀ : z₀ ∈ U\nhfz₀ : f =ᶠ[𝓝 z₀] 0\nu : Set E := {x | f =ᶠ[𝓝 x] 0}\nmain : closure u ∩ U ⊆ u\nUu : U ⊆ u\n⊢ EqOn f 0 U\n[PROOFSTEP]\nintro z hz\n[GOAL]\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : CompleteSpace F\nf : E → F\nU : Set E\nhf : AnalyticOn 𝕜 f U\nhU : IsPreconnected U\nz₀ : E\nh₀ : z₀ ∈ U\nhfz₀ : f =ᶠ[𝓝 z₀] 0\nu : Set E := {x | f =ᶠ[𝓝 x] 0}\nmain : closure u ∩ U ⊆ u\nUu : U ⊆ u\nz : E\nhz : z ∈ U\n⊢ f z = OfNat.ofNat 0 z\n[PROOFSTEP]\nsimpa using\n  mem_of_mem_nhds\n    (Uu hz)\n      /- Take a limit point `x`, then a ball `B (x, r)` on which it has a power series expansion, and\n          then `y ∈ B (x, r/2) ∩ u`. Then `f` has a power series expansion on `B (y, r/2)` as it is\n          contained in `B (x, r)`. All the coefficients in this series expansion vanish, as `f` is zero\n          on a neighborhood of `y`. Therefore, `f` is zero on `B (y, r/2)`. As this ball contains `x`,\n          it follows that `f` vanishes on a neighborhood of `x`, proving the claim. -/\n[GOAL]\ncase main\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : CompleteSpace F\nf : E → F\nU : Set E\nhf : AnalyticOn 𝕜 f U\nhU : IsPreconnected U\nz₀ : E\nh₀ : z₀ ∈ U\nhfz₀ : f =ᶠ[𝓝 z₀] 0\nu : Set E := {x | f =ᶠ[𝓝 x] 0}\n⊢ closure u ∩ U ⊆ u\n[PROOFSTEP]\nrintro x ⟨xu, xU⟩\n[GOAL]\ncase main.intro\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : CompleteSpace F\nf : E → F\nU : Set E\nhf : AnalyticOn 𝕜 f U\nhU : IsPreconnected U\nz₀ : E\nh₀ : z₀ ∈ U\nhfz₀ : f =ᶠ[𝓝 z₀] 0\nu : Set E := {x | f =ᶠ[𝓝 x] 0}\nx : E\nxu : x ∈ closure u\nxU : x ∈ U\n⊢ x ∈ u\n[PROOFSTEP]\nrcases hf x xU with ⟨p, r, hp⟩\n[GOAL]\ncase main.intro.intro.intro\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : CompleteSpace F\nf : E → F\nU : Set E\nhf : AnalyticOn 𝕜 f U\nhU : IsPreconnected U\nz₀ : E\nh₀ : z₀ ∈ U\nhfz₀ : f =ᶠ[𝓝 z₀] 0\nu : Set E := {x | f =ᶠ[𝓝 x] 0}\nx : E\nxu : x ∈ closure u\nxU : x ∈ U\np : FormalMultilinearSeries 𝕜 E F\nr : ℝ≥0∞\nhp : HasFPowerSeriesOnBall f p x r\n⊢ x ∈ u\n[PROOFSTEP]\nobtain ⟨y, yu, hxy⟩ : ∃ y ∈ u, edist x y < r / 2\n[GOAL]\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : CompleteSpace F\nf : E → F\nU : Set E\nhf : AnalyticOn 𝕜 f U\nhU : IsPreconnected U\nz₀ : E\nh₀ : z₀ ∈ U\nhfz₀ : f =ᶠ[𝓝 z₀] 0\nu : Set E := {x | f =ᶠ[𝓝 x] 0}\nx : E\nxu : x ∈ closure u\nxU : x ∈ U\np : FormalMultilinearSeries 𝕜 E F\nr : ℝ≥0∞\nhp : HasFPowerSeriesOnBall f p x r\n⊢ ∃ y, y ∈ u ∧ edist x y < r / 2\ncase main.intro.intro.intro.intro.intro\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : CompleteSpace F\nf : E → F\nU : Set E\nhf : AnalyticOn 𝕜 f U\nhU : IsPreconnected U\nz₀ : E\nh₀ : z₀ ∈ U\nhfz₀ : f =ᶠ[𝓝 z₀] 0\nu : Set E := {x | f =ᶠ[𝓝 x] 0}\nx : E\nxu : x ∈ closure u\nxU : x ∈ U\np : FormalMultilinearSeries 𝕜 E F\nr : ℝ≥0∞\nhp : HasFPowerSeriesOnBall f p x r\ny : E\nyu : y ∈ u\nhxy : edist x y < r / 2\n⊢ x ∈ u\n[PROOFSTEP]\nexact EMetric.mem_closure_iff.1 xu (r / 2) (ENNReal.half_pos hp.r_pos.ne')\n[GOAL]\ncase main.intro.intro.intro.intro.intro\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : CompleteSpace F\nf : E → F\nU : Set E\nhf : AnalyticOn 𝕜 f U\nhU : IsPreconnected U\nz₀ : E\nh₀ : z₀ ∈ U\nhfz₀ : f =ᶠ[𝓝 z₀] 0\nu : Set E := {x | f =ᶠ[𝓝 x] 0}\nx : E\nxu : x ∈ closure u\nxU : x ∈ U\np : FormalMultilinearSeries 𝕜 E F\nr : ℝ≥0∞\nhp : HasFPowerSeriesOnBall f p x r\ny : E\nyu : y ∈ u\nhxy : edist x y < r / 2\n⊢ x ∈ u\n[PROOFSTEP]\nlet q := p.changeOrigin (y - x)\n[GOAL]\ncase main.intro.intro.intro.intro.intro\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : CompleteSpace F\nf : E → F\nU : Set E\nhf : AnalyticOn 𝕜 f U\nhU : IsPreconnected U\nz₀ : E\nh₀ : z₀ ∈ U\nhfz₀ : f =ᶠ[𝓝 z₀] 0\nu : Set E := {x | f =ᶠ[𝓝 x] 0}\nx : E\nxu : x ∈ closure u\nxU : x ∈ U\np : FormalMultilinearSeries 𝕜 E F\nr : ℝ≥0∞\nhp : HasFPowerSeriesOnBall f p x r\ny : E\nyu : y ∈ u\nhxy : edist x y < r / 2\nq : FormalMultilinearSeries 𝕜 E F := FormalMultilinearSeries.changeOrigin p (y - x)\n⊢ x ∈ u\n[PROOFSTEP]\nhave has_series : HasFPowerSeriesOnBall f q y (r / 2) :=\n  by\n  have A : (‖y - x‖₊ : ℝ≥0∞) < r / 2 := by rwa [edist_comm, edist_eq_coe_nnnorm_sub] at hxy \n  have := hp.changeOrigin (A.trans_le ENNReal.half_le_self)\n  simp only [add_sub_cancel'_right] at this \n  apply this.mono (ENNReal.half_pos hp.r_pos.ne')\n  apply ENNReal.le_sub_of_add_le_left ENNReal.coe_ne_top\n  apply (add_le_add A.le (le_refl (r / 2))).trans (le_of_eq _)\n  exact ENNReal.add_halves _\n[GOAL]\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : CompleteSpace F\nf : E → F\nU : Set E\nhf : AnalyticOn 𝕜 f U\nhU : IsPreconnected U\nz₀ : E\nh₀ : z₀ ∈ U\nhfz₀ : f =ᶠ[𝓝 z₀] 0\nu : Set E := {x | f =ᶠ[𝓝 x] 0}\nx : E\nxu : x ∈ closure u\nxU : x ∈ U\np : FormalMultilinearSeries 𝕜 E F\nr : ℝ≥0∞\nhp : HasFPowerSeriesOnBall f p x r\ny : E\nyu : y ∈ u\nhxy : edist x y < r / 2\nq : FormalMultilinearSeries 𝕜 E F := FormalMultilinearSeries.changeOrigin p (y - x)\n⊢ HasFPowerSeriesOnBall f q y (r / 2)\n[PROOFSTEP]\nhave A : (‖y - x‖₊ : ℝ≥0∞) < r / 2 := by rwa [edist_comm, edist_eq_coe_nnnorm_sub] at hxy \n[GOAL]\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : CompleteSpace F\nf : E → F\nU : Set E\nhf : AnalyticOn 𝕜 f U\nhU : IsPreconnected U\nz₀ : E\nh₀ : z₀ ∈ U\nhfz₀ : f =ᶠ[𝓝 z₀] 0\nu : Set E := {x | f =ᶠ[𝓝 x] 0}\nx : E\nxu : x ∈ closure u\nxU : x ∈ U\np : FormalMultilinearSeries 𝕜 E F\nr : ℝ≥0∞\nhp : HasFPowerSeriesOnBall f p x r\ny : E\nyu : y ∈ u\nhxy : edist x y < r / 2\nq : FormalMultilinearSeries 𝕜 E F := FormalMultilinearSeries.changeOrigin p (y - x)\n⊢ ↑‖y - x‖₊ < r / 2\n[PROOFSTEP]\nrwa [edist_comm, edist_eq_coe_nnnorm_sub] at hxy \n[GOAL]\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : CompleteSpace F\nf : E → F\nU : Set E\nhf : AnalyticOn 𝕜 f U\nhU : IsPreconnected U\nz₀ : E\nh₀ : z₀ ∈ U\nhfz₀ : f =ᶠ[𝓝 z₀] 0\nu : Set E := {x | f =ᶠ[𝓝 x] 0}\nx : E\nxu : x ∈ closure u\nxU : x ∈ U\np : FormalMultilinearSeries 𝕜 E F\nr : ℝ≥0∞\nhp : HasFPowerSeriesOnBall f p x r\ny : E\nyu : y ∈ u\nhxy : edist x y < r / 2\nq : FormalMultilinearSeries 𝕜 E F := FormalMultilinearSeries.changeOrigin p (y - x)\nA : ↑‖y - x‖₊ < r / 2\n⊢ HasFPowerSeriesOnBall f q y (r / 2)\n[PROOFSTEP]\nhave := hp.changeOrigin (A.trans_le ENNReal.half_le_self)\n[GOAL]\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : CompleteSpace F\nf : E → F\nU : Set E\nhf : AnalyticOn 𝕜 f U\nhU : IsPreconnected U\nz₀ : E\nh₀ : z₀ ∈ U\nhfz₀ : f =ᶠ[𝓝 z₀] 0\nu : Set E := {x | f =ᶠ[𝓝 x] 0}\nx : E\nxu : x ∈ closure u\nxU : x ∈ U\np : FormalMultilinearSeries 𝕜 E F\nr : ℝ≥0∞\nhp : HasFPowerSeriesOnBall f p x r\ny : E\nyu : y ∈ u\nhxy : edist x y < r / 2\nq : FormalMultilinearSeries 𝕜 E F := FormalMultilinearSeries.changeOrigin p (y - x)\nA : ↑‖y - x‖₊ < r / 2\nthis : HasFPowerSeriesOnBall f (FormalMultilinearSeries.changeOrigin p (y - x)) (x + (y - x)) (r - ↑‖y - x‖₊)\n⊢ HasFPowerSeriesOnBall f q y (r / 2)\n[PROOFSTEP]\nsimp only [add_sub_cancel'_right] at this \n[GOAL]\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : CompleteSpace F\nf : E → F\nU : Set E\nhf : AnalyticOn 𝕜 f U\nhU : IsPreconnected U\nz₀ : E\nh₀ : z₀ ∈ U\nhfz₀ : f =ᶠ[𝓝 z₀] 0\nu : Set E := {x | f =ᶠ[𝓝 x] 0}\nx : E\nxu : x ∈ closure u\nxU : x ∈ U\np : FormalMultilinearSeries 𝕜 E F\nr : ℝ≥0∞\nhp : HasFPowerSeriesOnBall f p x r\ny : E\nyu : y ∈ u\nhxy : edist x y < r / 2\nq : FormalMultilinearSeries 𝕜 E F := FormalMultilinearSeries.changeOrigin p (y - x)\nA : ↑‖y - x‖₊ < r / 2\nthis : HasFPowerSeriesOnBall f (FormalMultilinearSeries.changeOrigin p (y - x)) y (r - ↑‖y - x‖₊)\n⊢ HasFPowerSeriesOnBall f q y (r / 2)\n[PROOFSTEP]\napply this.mono (ENNReal.half_pos hp.r_pos.ne')\n[GOAL]\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : CompleteSpace F\nf : E → F\nU : Set E\nhf : AnalyticOn 𝕜 f U\nhU : IsPreconnected U\nz₀ : E\nh₀ : z₀ ∈ U\nhfz₀ : f =ᶠ[𝓝 z₀] 0\nu : Set E := {x | f =ᶠ[𝓝 x] 0}\nx : E\nxu : x ∈ closure u\nxU : x ∈ U\np : FormalMultilinearSeries 𝕜 E F\nr : ℝ≥0∞\nhp : HasFPowerSeriesOnBall f p x r\ny : E\nyu : y ∈ u\nhxy : edist x y < r / 2\nq : FormalMultilinearSeries 𝕜 E F := FormalMultilinearSeries.changeOrigin p (y - x)\nA : ↑‖y - x‖₊ < r / 2\nthis : HasFPowerSeriesOnBall f (FormalMultilinearSeries.changeOrigin p (y - x)) y (r - ↑‖y - x‖₊)\n⊢ r / 2 ≤ r - ↑‖y - x‖₊\n[PROOFSTEP]\napply ENNReal.le_sub_of_add_le_left ENNReal.coe_ne_top\n[GOAL]\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : CompleteSpace F\nf : E → F\nU : Set E\nhf : AnalyticOn 𝕜 f U\nhU : IsPreconnected U\nz₀ : E\nh₀ : z₀ ∈ U\nhfz₀ : f =ᶠ[𝓝 z₀] 0\nu : Set E := {x | f =ᶠ[𝓝 x] 0}\nx : E\nxu : x ∈ closure u\nxU : x ∈ U\np : FormalMultilinearSeries 𝕜 E F\nr : ℝ≥0∞\nhp : HasFPowerSeriesOnBall f p x r\ny : E\nyu : y ∈ u\nhxy : edist x y < r / 2\nq : FormalMultilinearSeries 𝕜 E F := FormalMultilinearSeries.changeOrigin p (y - x)\nA : ↑‖y - x‖₊ < r / 2\nthis : HasFPowerSeriesOnBall f (FormalMultilinearSeries.changeOrigin p (y - x)) y (r - ↑‖y - x‖₊)\n⊢ ↑‖y - x‖₊ + r / 2 ≤ r\n[PROOFSTEP]\napply (add_le_add A.le (le_refl (r / 2))).trans (le_of_eq _)\n[GOAL]\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : CompleteSpace F\nf : E → F\nU : Set E\nhf : AnalyticOn 𝕜 f U\nhU : IsPreconnected U\nz₀ : E\nh₀ : z₀ ∈ U\nhfz₀ : f =ᶠ[𝓝 z₀] 0\nu : Set E := {x | f =ᶠ[𝓝 x] 0}\nx : E\nxu : x ∈ closure u\nxU : x ∈ U\np : FormalMultilinearSeries 𝕜 E F\nr : ℝ≥0∞\nhp : HasFPowerSeriesOnBall f p x r\ny : E\nyu : y ∈ u\nhxy : edist x y < r / 2\nq : FormalMultilinearSeries 𝕜 E F := FormalMultilinearSeries.changeOrigin p (y - x)\nA : ↑‖y - x‖₊ < r / 2\nthis : HasFPowerSeriesOnBall f (FormalMultilinearSeries.changeOrigin p (y - x)) y (r - ↑‖y - x‖₊)\n⊢ r / 2 + r / 2 = r\n[PROOFSTEP]\nexact ENNReal.add_halves _\n[GOAL]\ncase main.intro.intro.intro.intro.intro\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : CompleteSpace F\nf : E → F\nU : Set E\nhf : AnalyticOn 𝕜 f U\nhU : IsPreconnected U\nz₀ : E\nh₀ : z₀ ∈ U\nhfz₀ : f =ᶠ[𝓝 z₀] 0\nu : Set E := {x | f =ᶠ[𝓝 x] 0}\nx : E\nxu : x ∈ closure u\nxU : x ∈ U\np : FormalMultilinearSeries 𝕜 E F\nr : ℝ≥0∞\nhp : HasFPowerSeriesOnBall f p x r\ny : E\nyu : y ∈ u\nhxy : edist x y < r / 2\nq : FormalMultilinearSeries 𝕜 E F := FormalMultilinearSeries.changeOrigin p (y - x)\nhas_series : HasFPowerSeriesOnBall f q y (r / 2)\n⊢ x ∈ u\n[PROOFSTEP]\nhave M : EMetric.ball y (r / 2) ∈ 𝓝 x := EMetric.isOpen_ball.mem_nhds hxy\n[GOAL]\ncase main.intro.intro.intro.intro.intro\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : CompleteSpace F\nf : E → F\nU : Set E\nhf : AnalyticOn 𝕜 f U\nhU : IsPreconnected U\nz₀ : E\nh₀ : z₀ ∈ U\nhfz₀ : f =ᶠ[𝓝 z₀] 0\nu : Set E := {x | f =ᶠ[𝓝 x] 0}\nx : E\nxu : x ∈ closure u\nxU : x ∈ U\np : FormalMultilinearSeries 𝕜 E F\nr : ℝ≥0∞\nhp : HasFPowerSeriesOnBall f p x r\ny : E\nyu : y ∈ u\nhxy : edist x y < r / 2\nq : FormalMultilinearSeries 𝕜 E F := FormalMultilinearSeries.changeOrigin p (y - x)\nhas_series : HasFPowerSeriesOnBall f q y (r / 2)\nM : EMetric.ball y (r / 2) ∈ 𝓝 x\n⊢ x ∈ u\n[PROOFSTEP]\nfilter_upwards [M] with z hz\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : CompleteSpace F\nf : E → F\nU : Set E\nhf : AnalyticOn 𝕜 f U\nhU : IsPreconnected U\nz₀ : E\nh₀ : z₀ ∈ U\nhfz₀ : f =ᶠ[𝓝 z₀] 0\nu : Set E := {x | f =ᶠ[𝓝 x] 0}\nx : E\nxu : x ∈ closure u\nxU : x ∈ U\np : FormalMultilinearSeries 𝕜 E F\nr : ℝ≥0∞\nhp : HasFPowerSeriesOnBall f p x r\ny : E\nyu : y ∈ u\nhxy : edist x y < r / 2\nq : FormalMultilinearSeries 𝕜 E F := FormalMultilinearSeries.changeOrigin p (y - x)\nhas_series : HasFPowerSeriesOnBall f q y (r / 2)\nM : EMetric.ball y (r / 2) ∈ 𝓝 x\nz : E\nhz : z ∈ EMetric.ball y (r / 2)\n⊢ f z = OfNat.ofNat 0 z\n[PROOFSTEP]\nhave A : HasSum (fun n : ℕ => q n fun _ : Fin n => z - y) (f z) := has_series.hasSum_sub hz\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : CompleteSpace F\nf : E → F\nU : Set E\nhf : AnalyticOn 𝕜 f U\nhU : IsPreconnected U\nz₀ : E\nh₀ : z₀ ∈ U\nhfz₀ : f =ᶠ[𝓝 z₀] 0\nu : Set E := {x | f =ᶠ[𝓝 x] 0}\nx : E\nxu : x ∈ closure u\nxU : x ∈ U\np : FormalMultilinearSeries 𝕜 E F\nr : ℝ≥0∞\nhp : HasFPowerSeriesOnBall f p x r\ny : E\nyu : y ∈ u\nhxy : edist x y < r / 2\nq : FormalMultilinearSeries 𝕜 E F := FormalMultilinearSeries.changeOrigin p (y - x)\nhas_series : HasFPowerSeriesOnBall f q y (r / 2)\nM : EMetric.ball y (r / 2) ∈ 𝓝 x\nz : E\nhz : z ∈ EMetric.ball y (r / 2)\nA : HasSum (fun n => ↑(q n) fun x => z - y) (f z)\n⊢ f z = OfNat.ofNat 0 z\n[PROOFSTEP]\nhave B : HasSum (fun n : ℕ => q n fun _ : Fin n => z - y) 0 :=\n  by\n  have : HasFPowerSeriesAt 0 q y := has_series.hasFPowerSeriesAt.congr yu\n  convert hasSum_zero (α := F) using 2\n  ext n\n  exact this.apply_eq_zero n _\n[GOAL]\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : CompleteSpace F\nf : E → F\nU : Set E\nhf : AnalyticOn 𝕜 f U\nhU : IsPreconnected U\nz₀ : E\nh₀ : z₀ ∈ U\nhfz₀ : f =ᶠ[𝓝 z₀] 0\nu : Set E := {x | f =ᶠ[𝓝 x] 0}\nx : E\nxu : x ∈ closure u\nxU : x ∈ U\np : FormalMultilinearSeries 𝕜 E F\nr : ℝ≥0∞\nhp : HasFPowerSeriesOnBall f p x r\ny : E\nyu : y ∈ u\nhxy : edist x y < r / 2\nq : FormalMultilinearSeries 𝕜 E F := FormalMultilinearSeries.changeOrigin p (y - x)\nhas_series : HasFPowerSeriesOnBall f q y (r / 2)\nM : EMetric.ball y (r / 2) ∈ 𝓝 x\nz : E\nhz : z ∈ EMetric.ball y (r / 2)\nA : HasSum (fun n => ↑(q n) fun x => z - y) (f z)\n⊢ HasSum (fun n => ↑(q n) fun x => z - y) 0\n[PROOFSTEP]\nhave : HasFPowerSeriesAt 0 q y := has_series.hasFPowerSeriesAt.congr yu\n[GOAL]\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : CompleteSpace F\nf : E → F\nU : Set E\nhf : AnalyticOn 𝕜 f U\nhU : IsPreconnected U\nz₀ : E\nh₀ : z₀ ∈ U\nhfz₀ : f =ᶠ[𝓝 z₀] 0\nu : Set E := {x | f =ᶠ[𝓝 x] 0}\nx : E\nxu : x ∈ closure u\nxU : x ∈ U\np : FormalMultilinearSeries 𝕜 E F\nr : ℝ≥0∞\nhp : HasFPowerSeriesOnBall f p x r\ny : E\nyu : y ∈ u\nhxy : edist x y < r / 2\nq : FormalMultilinearSeries 𝕜 E F := FormalMultilinearSeries.changeOrigin p (y - x)\nhas_series : HasFPowerSeriesOnBall f q y (r / 2)\nM : EMetric.ball y (r / 2) ∈ 𝓝 x\nz : E\nhz : z ∈ EMetric.ball y (r / 2)\nA : HasSum (fun n => ↑(q n) fun x => z - y) (f z)\nthis : HasFPowerSeriesAt 0 q y\n⊢ HasSum (fun n => ↑(q n) fun x => z - y) 0\n[PROOFSTEP]\nconvert hasSum_zero (α := F) using 2\n[GOAL]\ncase h.e.h.e'_5\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : CompleteSpace F\nf : E → F\nU : Set E\nhf : AnalyticOn 𝕜 f U\nhU : IsPreconnected U\nz₀ : E\nh₀ : z₀ ∈ U\nhfz₀ : f =ᶠ[𝓝 z₀] 0\nu : Set E := {x | f =ᶠ[𝓝 x] 0}\nx : E\nxu : x ∈ closure u\nxU : x ∈ U\np : FormalMultilinearSeries 𝕜 E F\nr : ℝ≥0∞\nhp : HasFPowerSeriesOnBall f p x r\ny : E\nyu : y ∈ u\nhxy : edist x y < r / 2\nq : FormalMultilinearSeries 𝕜 E F := FormalMultilinearSeries.changeOrigin p (y - x)\nhas_series : HasFPowerSeriesOnBall f q y (r / 2)\nM : EMetric.ball y (r / 2) ∈ 𝓝 x\nz : E\nhz : z ∈ EMetric.ball y (r / 2)\nA : HasSum (fun n => ↑(q n) fun x => z - y) (f z)\nthis : HasFPowerSeriesAt 0 q y\n⊢ (fun n => ↑(q n) fun x => z - y) = fun x => 0\n[PROOFSTEP]\next n\n[GOAL]\ncase h.e.h.e'_5.h\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : CompleteSpace F\nf : E → F\nU : Set E\nhf : AnalyticOn 𝕜 f U\nhU : IsPreconnected U\nz₀ : E\nh₀ : z₀ ∈ U\nhfz₀ : f =ᶠ[𝓝 z₀] 0\nu : Set E := {x | f =ᶠ[𝓝 x] 0}\nx : E\nxu : x ∈ closure u\nxU : x ∈ U\np : FormalMultilinearSeries 𝕜 E F\nr : ℝ≥0∞\nhp : HasFPowerSeriesOnBall f p x r\ny : E\nyu : y ∈ u\nhxy : edist x y < r / 2\nq : FormalMultilinearSeries 𝕜 E F := FormalMultilinearSeries.changeOrigin p (y - x)\nhas_series : HasFPowerSeriesOnBall f q y (r / 2)\nM : EMetric.ball y (r / 2) ∈ 𝓝 x\nz : E\nhz : z ∈ EMetric.ball y (r / 2)\nA : HasSum (fun n => ↑(q n) fun x => z - y) (f z)\nthis : HasFPowerSeriesAt 0 q y\nn : ℕ\n⊢ (↑(q n) fun x => z - y) = 0\n[PROOFSTEP]\nexact this.apply_eq_zero n _\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : CompleteSpace F\nf : E → F\nU : Set E\nhf : AnalyticOn 𝕜 f U\nhU : IsPreconnected U\nz₀ : E\nh₀ : z₀ ∈ U\nhfz₀ : f =ᶠ[𝓝 z₀] 0\nu : Set E := {x | f =ᶠ[𝓝 x] 0}\nx : E\nxu : x ∈ closure u\nxU : x ∈ U\np : FormalMultilinearSeries 𝕜 E F\nr : ℝ≥0∞\nhp : HasFPowerSeriesOnBall f p x r\ny : E\nyu : y ∈ u\nhxy : edist x y < r / 2\nq : FormalMultilinearSeries 𝕜 E F := FormalMultilinearSeries.changeOrigin p (y - x)\nhas_series : HasFPowerSeriesOnBall f q y (r / 2)\nM : EMetric.ball y (r / 2) ∈ 𝓝 x\nz : E\nhz : z ∈ EMetric.ball y (r / 2)\nA : HasSum (fun n => ↑(q n) fun x => z - y) (f z)\nB : HasSum (fun n => ↑(q n) fun x => z - y) 0\n⊢ f z = OfNat.ofNat 0 z\n[PROOFSTEP]\nexact HasSum.unique A B\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\nf : E → F\nU : Set E\nhf : AnalyticOn 𝕜 f U\nhU : IsPreconnected U\nz₀ : E\nh₀ : z₀ ∈ U\nhfz₀ : f =ᶠ[𝓝 z₀] 0\n⊢ EqOn f 0 U\n[PROOFSTEP]\nlet F' := UniformSpace.Completion F\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\nf : E → F\nU : Set E\nhf : AnalyticOn 𝕜 f U\nhU : IsPreconnected U\nz₀ : E\nh₀ : z₀ ∈ U\nhfz₀ : f =ᶠ[𝓝 z₀] 0\nF' : Type u_3 := UniformSpace.Completion F\n⊢ EqOn f 0 U\n[PROOFSTEP]\nset e : F →L[𝕜] F' := UniformSpace.Completion.toComplL\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\nf : E → F\nU : Set E\nhf : AnalyticOn 𝕜 f U\nhU : IsPreconnected U\nz₀ : E\nh₀ : z₀ ∈ U\nhfz₀ : f =ᶠ[𝓝 z₀] 0\nF' : Type u_3 := UniformSpace.Completion F\ne : F →L[𝕜] F' := UniformSpace.Completion.toComplL\n⊢ EqOn f 0 U\n[PROOFSTEP]\nhave : AnalyticOn 𝕜 (e ∘ f) U := fun x hx => (e.analyticAt _).comp (hf x hx)\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\nf : E → F\nU : Set E\nhf : AnalyticOn 𝕜 f U\nhU : IsPreconnected U\nz₀ : E\nh₀ : z₀ ∈ U\nhfz₀ : f =ᶠ[𝓝 z₀] 0\nF' : Type u_3 := UniformSpace.Completion F\ne : F →L[𝕜] F' := UniformSpace.Completion.toComplL\nthis : AnalyticOn 𝕜 (↑e ∘ f) U\n⊢ EqOn f 0 U\n[PROOFSTEP]\nhave A : EqOn (e ∘ f) 0 U :=\n  by\n  apply eqOn_zero_of_preconnected_of_eventuallyEq_zero_aux this hU h₀\n  filter_upwards [hfz₀] with x hx\n  simp only [hx, Function.comp_apply, Pi.zero_apply, map_zero]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\nf : E → F\nU : Set E\nhf : AnalyticOn 𝕜 f U\nhU : IsPreconnected U\nz₀ : E\nh₀ : z₀ ∈ U\nhfz₀ : f =ᶠ[𝓝 z₀] 0\nF' : Type u_3 := UniformSpace.Completion F\ne : F →L[𝕜] F' := UniformSpace.Completion.toComplL\nthis : AnalyticOn 𝕜 (↑e ∘ f) U\n⊢ EqOn (↑e ∘ f) 0 U\n[PROOFSTEP]\napply eqOn_zero_of_preconnected_of_eventuallyEq_zero_aux this hU h₀\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\nf : E → F\nU : Set E\nhf : AnalyticOn 𝕜 f U\nhU : IsPreconnected U\nz₀ : E\nh₀ : z₀ ∈ U\nhfz₀ : f =ᶠ[𝓝 z₀] 0\nF' : Type u_3 := UniformSpace.Completion F\ne : F →L[𝕜] F' := UniformSpace.Completion.toComplL\nthis : AnalyticOn 𝕜 (↑e ∘ f) U\n⊢ ↑e ∘ f =ᶠ[𝓝 z₀] 0\n[PROOFSTEP]\nfilter_upwards [hfz₀] with x hx\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\nf : E → F\nU : Set E\nhf : AnalyticOn 𝕜 f U\nhU : IsPreconnected U\nz₀ : E\nh₀ : z₀ ∈ U\nhfz₀ : f =ᶠ[𝓝 z₀] 0\nF' : Type u_3 := UniformSpace.Completion F\ne : F →L[𝕜] F' := UniformSpace.Completion.toComplL\nthis : AnalyticOn 𝕜 (↑e ∘ f) U\nx : E\nhx : f x = OfNat.ofNat 0 x\n⊢ (↑UniformSpace.Completion.toComplL ∘ f) x = OfNat.ofNat 0 x\n[PROOFSTEP]\nsimp only [hx, Function.comp_apply, Pi.zero_apply, map_zero]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\nf : E → F\nU : Set E\nhf : AnalyticOn 𝕜 f U\nhU : IsPreconnected U\nz₀ : E\nh₀ : z₀ ∈ U\nhfz₀ : f =ᶠ[𝓝 z₀] 0\nF' : Type u_3 := UniformSpace.Completion F\ne : F →L[𝕜] F' := UniformSpace.Completion.toComplL\nthis : AnalyticOn 𝕜 (↑e ∘ f) U\nA : EqOn (↑e ∘ f) 0 U\n⊢ EqOn f 0 U\n[PROOFSTEP]\nintro z hz\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\nf : E → F\nU : Set E\nhf : AnalyticOn 𝕜 f U\nhU : IsPreconnected U\nz₀ : E\nh₀ : z₀ ∈ U\nhfz₀ : f =ᶠ[𝓝 z₀] 0\nF' : Type u_3 := UniformSpace.Completion F\ne : F →L[𝕜] F' := UniformSpace.Completion.toComplL\nthis : AnalyticOn 𝕜 (↑e ∘ f) U\nA : EqOn (↑e ∘ f) 0 U\nz : E\nhz : z ∈ U\n⊢ f z = OfNat.ofNat 0 z\n[PROOFSTEP]\nhave : e (f z) = e 0 := by simpa only using A hz\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\nf : E → F\nU : Set E\nhf : AnalyticOn 𝕜 f U\nhU : IsPreconnected U\nz₀ : E\nh₀ : z₀ ∈ U\nhfz₀ : f =ᶠ[𝓝 z₀] 0\nF' : Type u_3 := UniformSpace.Completion F\ne : F →L[𝕜] F' := UniformSpace.Completion.toComplL\nthis : AnalyticOn 𝕜 (↑e ∘ f) U\nA : EqOn (↑e ∘ f) 0 U\nz : E\nhz : z ∈ U\n⊢ ↑e (f z) = ↑e 0\n[PROOFSTEP]\nsimpa only using A hz\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\nf : E → F\nU : Set E\nhf : AnalyticOn 𝕜 f U\nhU : IsPreconnected U\nz₀ : E\nh₀ : z₀ ∈ U\nhfz₀ : f =ᶠ[𝓝 z₀] 0\nF' : Type u_3 := UniformSpace.Completion F\ne : F →L[𝕜] F' := UniformSpace.Completion.toComplL\nthis✝ : AnalyticOn 𝕜 (↑e ∘ f) U\nA : EqOn (↑e ∘ f) 0 U\nz : E\nhz : z ∈ U\nthis : ↑e (f z) = ↑e 0\n⊢ f z = OfNat.ofNat 0 z\n[PROOFSTEP]\nexact UniformSpace.Completion.coe_injective F this\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\nf g : E → F\nU : Set E\nhf : AnalyticOn 𝕜 f U\nhg : AnalyticOn 𝕜 g U\nhU : IsPreconnected U\nz₀ : E\nh₀ : z₀ ∈ U\nhfg : f =ᶠ[𝓝 z₀] g\n⊢ EqOn f g U\n[PROOFSTEP]\nhave hfg' : f - g =ᶠ[𝓝 z₀] 0 := hfg.mono fun z h => by simp [h]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\nf g : E → F\nU : Set E\nhf : AnalyticOn 𝕜 f U\nhg : AnalyticOn 𝕜 g U\nhU : IsPreconnected U\nz₀ : E\nh₀ : z₀ ∈ U\nhfg : f =ᶠ[𝓝 z₀] g\nz : E\nh : f z = g z\n⊢ (f - g) z = OfNat.ofNat 0 z\n[PROOFSTEP]\nsimp [h]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\nf g : E → F\nU : Set E\nhf : AnalyticOn 𝕜 f U\nhg : AnalyticOn 𝕜 g U\nhU : IsPreconnected U\nz₀ : E\nh₀ : z₀ ∈ U\nhfg : f =ᶠ[𝓝 z₀] g\nhfg' : f - g =ᶠ[𝓝 z₀] 0\n⊢ EqOn f g U\n[PROOFSTEP]\nsimpa [sub_eq_zero] using fun z hz => (hf.sub hg).eqOn_zero_of_preconnected_of_eventuallyEq_zero hU h₀ hfg' hz\n", "meta": {"mathlib_filename": "Mathlib.Analysis.Analytic.Uniqueness", "llama_tokens": 14160, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8289388083214156, "lm_q2_score": 0.6477982247516797, "lm_q1q2_score": 0.536985088458386}}
{"text": "[GOAL]\nM : Type u_1\ninst✝ : OrderedAddCommMonoid M\nf : ℕ → M\nhf : ∀ ⦃m n : ℕ⦄, 0 < m → m ≤ n → f n ≤ f m\nn : ℕ\n⊢ ∑ k in Ico 1 (2 ^ n), f k ≤ ∑ k in range n, 2 ^ k • f (2 ^ k)\n[PROOFSTEP]\ninduction' n with n ihn\n[GOAL]\ncase zero\nM : Type u_1\ninst✝ : OrderedAddCommMonoid M\nf : ℕ → M\nhf : ∀ ⦃m n : ℕ⦄, 0 < m → m ≤ n → f n ≤ f m\n⊢ ∑ k in Ico 1 (2 ^ Nat.zero), f k ≤ ∑ k in range Nat.zero, 2 ^ k • f (2 ^ k)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\nM : Type u_1\ninst✝ : OrderedAddCommMonoid M\nf : ℕ → M\nhf : ∀ ⦃m n : ℕ⦄, 0 < m → m ≤ n → f n ≤ f m\nn : ℕ\nihn : ∑ k in Ico 1 (2 ^ n), f k ≤ ∑ k in range n, 2 ^ k • f (2 ^ k)\n⊢ ∑ k in Ico 1 (2 ^ Nat.succ n), f k ≤ ∑ k in range (Nat.succ n), 2 ^ k • f (2 ^ k)\n[PROOFSTEP]\nsuffices (∑ k in Ico (2 ^ n) (2 ^ (n + 1)), f k) ≤ 2 ^ n • f (2 ^ n)\n  by\n  rw [sum_range_succ, ← sum_Ico_consecutive]\n  exact add_le_add ihn this\n  exacts [n.one_le_two_pow, Nat.pow_le_pow_of_le_right zero_lt_two n.le_succ]\n[GOAL]\nM : Type u_1\ninst✝ : OrderedAddCommMonoid M\nf : ℕ → M\nhf : ∀ ⦃m n : ℕ⦄, 0 < m → m ≤ n → f n ≤ f m\nn : ℕ\nihn : ∑ k in Ico 1 (2 ^ n), f k ≤ ∑ k in range n, 2 ^ k • f (2 ^ k)\nthis : ∑ k in Ico (2 ^ n) (2 ^ (n + 1)), f k ≤ 2 ^ n • f (2 ^ n)\n⊢ ∑ k in Ico 1 (2 ^ Nat.succ n), f k ≤ ∑ k in range (Nat.succ n), 2 ^ k • f (2 ^ k)\n[PROOFSTEP]\nrw [sum_range_succ, ← sum_Ico_consecutive]\n[GOAL]\nM : Type u_1\ninst✝ : OrderedAddCommMonoid M\nf : ℕ → M\nhf : ∀ ⦃m n : ℕ⦄, 0 < m → m ≤ n → f n ≤ f m\nn : ℕ\nihn : ∑ k in Ico 1 (2 ^ n), f k ≤ ∑ k in range n, 2 ^ k • f (2 ^ k)\nthis : ∑ k in Ico (2 ^ n) (2 ^ (n + 1)), f k ≤ 2 ^ n • f (2 ^ n)\n⊢ ∑ i in Ico 1 ?n, f i + ∑ i in Ico ?n (2 ^ Nat.succ n), f i ≤ ∑ x in range n, 2 ^ x • f (2 ^ x) + 2 ^ n • f (2 ^ n)\ncase n\nM : Type u_1\ninst✝ : OrderedAddCommMonoid M\nf : ℕ → M\nhf : ∀ ⦃m n : ℕ⦄, 0 < m → m ≤ n → f n ≤ f m\nn : ℕ\nihn : ∑ k in Ico 1 (2 ^ n), f k ≤ ∑ k in range n, 2 ^ k • f (2 ^ k)\nthis : ∑ k in Ico (2 ^ n) (2 ^ (n + 1)), f k ≤ 2 ^ n • f (2 ^ n)\n⊢ ℕ\ncase hmn\nM : Type u_1\ninst✝ : OrderedAddCommMonoid M\nf : ℕ → M\nhf : ∀ ⦃m n : ℕ⦄, 0 < m → m ≤ n → f n ≤ f m\nn : ℕ\nihn : ∑ k in Ico 1 (2 ^ n), f k ≤ ∑ k in range n, 2 ^ k • f (2 ^ k)\nthis : ∑ k in Ico (2 ^ n) (2 ^ (n + 1)), f k ≤ 2 ^ n • f (2 ^ n)\n⊢ 1 ≤ ?n\ncase hnk\nM : Type u_1\ninst✝ : OrderedAddCommMonoid M\nf : ℕ → M\nhf : ∀ ⦃m n : ℕ⦄, 0 < m → m ≤ n → f n ≤ f m\nn : ℕ\nihn : ∑ k in Ico 1 (2 ^ n), f k ≤ ∑ k in range n, 2 ^ k • f (2 ^ k)\nthis : ∑ k in Ico (2 ^ n) (2 ^ (n + 1)), f k ≤ 2 ^ n • f (2 ^ n)\n⊢ ?n ≤ 2 ^ Nat.succ n\n[PROOFSTEP]\nexact add_le_add ihn this\n[GOAL]\ncase hmn\nM : Type u_1\ninst✝ : OrderedAddCommMonoid M\nf : ℕ → M\nhf : ∀ ⦃m n : ℕ⦄, 0 < m → m ≤ n → f n ≤ f m\nn : ℕ\nihn : ∑ k in Ico 1 (2 ^ n), f k ≤ ∑ k in range n, 2 ^ k • f (2 ^ k)\nthis : ∑ k in Ico (2 ^ n) (2 ^ (n + 1)), f k ≤ 2 ^ n • f (2 ^ n)\n⊢ 1 ≤ 2 ^ n\ncase hnk\nM : Type u_1\ninst✝ : OrderedAddCommMonoid M\nf : ℕ → M\nhf : ∀ ⦃m n : ℕ⦄, 0 < m → m ≤ n → f n ≤ f m\nn : ℕ\nihn : ∑ k in Ico 1 (2 ^ n), f k ≤ ∑ k in range n, 2 ^ k • f (2 ^ k)\nthis : ∑ k in Ico (2 ^ n) (2 ^ (n + 1)), f k ≤ 2 ^ n • f (2 ^ n)\n⊢ 2 ^ n ≤ 2 ^ Nat.succ n\n[PROOFSTEP]\nexacts [n.one_le_two_pow, Nat.pow_le_pow_of_le_right zero_lt_two n.le_succ]\n[GOAL]\ncase succ\nM : Type u_1\ninst✝ : OrderedAddCommMonoid M\nf : ℕ → M\nhf : ∀ ⦃m n : ℕ⦄, 0 < m → m ≤ n → f n ≤ f m\nn : ℕ\nihn : ∑ k in Ico 1 (2 ^ n), f k ≤ ∑ k in range n, 2 ^ k • f (2 ^ k)\n⊢ ∑ k in Ico (2 ^ n) (2 ^ (n + 1)), f k ≤ 2 ^ n • f (2 ^ n)\n[PROOFSTEP]\nhave : ∀ k ∈ Ico (2 ^ n) (2 ^ (n + 1)), f k ≤ f (2 ^ n) := fun k hk => hf (pow_pos zero_lt_two _) (mem_Ico.mp hk).1\n[GOAL]\ncase succ\nM : Type u_1\ninst✝ : OrderedAddCommMonoid M\nf : ℕ → M\nhf : ∀ ⦃m n : ℕ⦄, 0 < m → m ≤ n → f n ≤ f m\nn : ℕ\nihn : ∑ k in Ico 1 (2 ^ n), f k ≤ ∑ k in range n, 2 ^ k • f (2 ^ k)\nthis : ∀ (k : ℕ), k ∈ Ico (2 ^ n) (2 ^ (n + 1)) → f k ≤ f (2 ^ n)\n⊢ ∑ k in Ico (2 ^ n) (2 ^ (n + 1)), f k ≤ 2 ^ n • f (2 ^ n)\n[PROOFSTEP]\nconvert sum_le_sum this\n[GOAL]\ncase h.e'_4\nM : Type u_1\ninst✝ : OrderedAddCommMonoid M\nf : ℕ → M\nhf : ∀ ⦃m n : ℕ⦄, 0 < m → m ≤ n → f n ≤ f m\nn : ℕ\nihn : ∑ k in Ico 1 (2 ^ n), f k ≤ ∑ k in range n, 2 ^ k • f (2 ^ k)\nthis : ∀ (k : ℕ), k ∈ Ico (2 ^ n) (2 ^ (n + 1)) → f k ≤ f (2 ^ n)\n⊢ 2 ^ n • f (2 ^ n) = ∑ i in Ico (2 ^ n) (2 ^ (n + 1)), f (2 ^ n)\n[PROOFSTEP]\nsimp [pow_succ, two_mul]\n[GOAL]\nM : Type u_1\ninst✝ : OrderedAddCommMonoid M\nf : ℕ → M\nhf : ∀ ⦃m n : ℕ⦄, 0 < m → m ≤ n → f n ≤ f m\nn : ℕ\n⊢ ∑ k in range (2 ^ n), f k ≤ f 0 + ∑ k in range n, 2 ^ k • f (2 ^ k)\n[PROOFSTEP]\nconvert add_le_add_left (le_sum_condensed' hf n) (f 0)\n[GOAL]\ncase h.e'_3\nM : Type u_1\ninst✝ : OrderedAddCommMonoid M\nf : ℕ → M\nhf : ∀ ⦃m n : ℕ⦄, 0 < m → m ≤ n → f n ≤ f m\nn : ℕ\n⊢ ∑ k in range (2 ^ n), f k = f 0 + ∑ k in Ico 1 (2 ^ n), f k\n[PROOFSTEP]\nrw [← sum_range_add_sum_Ico _ n.one_le_two_pow, sum_range_succ, sum_range_zero, zero_add]\n[GOAL]\nM : Type u_1\ninst✝ : OrderedAddCommMonoid M\nf : ℕ → M\nhf : ∀ ⦃m n : ℕ⦄, 1 < m → m ≤ n → f n ≤ f m\nn : ℕ\n⊢ ∑ k in range n, 2 ^ k • f (2 ^ (k + 1)) ≤ ∑ k in Ico 2 (2 ^ n + 1), f k\n[PROOFSTEP]\ninduction' n with n ihn\n[GOAL]\ncase zero\nM : Type u_1\ninst✝ : OrderedAddCommMonoid M\nf : ℕ → M\nhf : ∀ ⦃m n : ℕ⦄, 1 < m → m ≤ n → f n ≤ f m\n⊢ ∑ k in range Nat.zero, 2 ^ k • f (2 ^ (k + 1)) ≤ ∑ k in Ico 2 (2 ^ Nat.zero + 1), f k\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\nM : Type u_1\ninst✝ : OrderedAddCommMonoid M\nf : ℕ → M\nhf : ∀ ⦃m n : ℕ⦄, 1 < m → m ≤ n → f n ≤ f m\nn : ℕ\nihn : ∑ k in range n, 2 ^ k • f (2 ^ (k + 1)) ≤ ∑ k in Ico 2 (2 ^ n + 1), f k\n⊢ ∑ k in range (Nat.succ n), 2 ^ k • f (2 ^ (k + 1)) ≤ ∑ k in Ico 2 (2 ^ Nat.succ n + 1), f k\n[PROOFSTEP]\nsuffices 2 ^ n • f (2 ^ (n + 1)) ≤ ∑ k in Ico (2 ^ n + 1) (2 ^ (n + 1) + 1), f k\n  by\n  rw [sum_range_succ, ← sum_Ico_consecutive]\n  exacts [add_le_add ihn this, (add_le_add_right n.one_le_two_pow _ : 1 + 1 ≤ 2 ^ n + 1),\n    add_le_add_right (Nat.pow_le_pow_of_le_right zero_lt_two n.le_succ) _]\n[GOAL]\nM : Type u_1\ninst✝ : OrderedAddCommMonoid M\nf : ℕ → M\nhf : ∀ ⦃m n : ℕ⦄, 1 < m → m ≤ n → f n ≤ f m\nn : ℕ\nihn : ∑ k in range n, 2 ^ k • f (2 ^ (k + 1)) ≤ ∑ k in Ico 2 (2 ^ n + 1), f k\nthis : 2 ^ n • f (2 ^ (n + 1)) ≤ ∑ k in Ico (2 ^ n + 1) (2 ^ (n + 1) + 1), f k\n⊢ ∑ k in range (Nat.succ n), 2 ^ k • f (2 ^ (k + 1)) ≤ ∑ k in Ico 2 (2 ^ Nat.succ n + 1), f k\n[PROOFSTEP]\nrw [sum_range_succ, ← sum_Ico_consecutive]\n[GOAL]\nM : Type u_1\ninst✝ : OrderedAddCommMonoid M\nf : ℕ → M\nhf : ∀ ⦃m n : ℕ⦄, 1 < m → m ≤ n → f n ≤ f m\nn : ℕ\nihn : ∑ k in range n, 2 ^ k • f (2 ^ (k + 1)) ≤ ∑ k in Ico 2 (2 ^ n + 1), f k\nthis : 2 ^ n • f (2 ^ (n + 1)) ≤ ∑ k in Ico (2 ^ n + 1) (2 ^ (n + 1) + 1), f k\n⊢ ∑ x in range n, 2 ^ x • f (2 ^ (x + 1)) + 2 ^ n • f (2 ^ (n + 1)) ≤\n    ∑ i in Ico 2 ?n, f i + ∑ i in Ico ?n (2 ^ Nat.succ n + 1), f i\ncase n\nM : Type u_1\ninst✝ : OrderedAddCommMonoid M\nf : ℕ → M\nhf : ∀ ⦃m n : ℕ⦄, 1 < m → m ≤ n → f n ≤ f m\nn : ℕ\nihn : ∑ k in range n, 2 ^ k • f (2 ^ (k + 1)) ≤ ∑ k in Ico 2 (2 ^ n + 1), f k\nthis : 2 ^ n • f (2 ^ (n + 1)) ≤ ∑ k in Ico (2 ^ n + 1) (2 ^ (n + 1) + 1), f k\n⊢ ℕ\ncase hmn\nM : Type u_1\ninst✝ : OrderedAddCommMonoid M\nf : ℕ → M\nhf : ∀ ⦃m n : ℕ⦄, 1 < m → m ≤ n → f n ≤ f m\nn : ℕ\nihn : ∑ k in range n, 2 ^ k • f (2 ^ (k + 1)) ≤ ∑ k in Ico 2 (2 ^ n + 1), f k\nthis : 2 ^ n • f (2 ^ (n + 1)) ≤ ∑ k in Ico (2 ^ n + 1) (2 ^ (n + 1) + 1), f k\n⊢ 2 ≤ ?n\ncase hnk\nM : Type u_1\ninst✝ : OrderedAddCommMonoid M\nf : ℕ → M\nhf : ∀ ⦃m n : ℕ⦄, 1 < m → m ≤ n → f n ≤ f m\nn : ℕ\nihn : ∑ k in range n, 2 ^ k • f (2 ^ (k + 1)) ≤ ∑ k in Ico 2 (2 ^ n + 1), f k\nthis : 2 ^ n • f (2 ^ (n + 1)) ≤ ∑ k in Ico (2 ^ n + 1) (2 ^ (n + 1) + 1), f k\n⊢ ?n ≤ 2 ^ Nat.succ n + 1\n[PROOFSTEP]\nexacts [add_le_add ihn this, (add_le_add_right n.one_le_two_pow _ : 1 + 1 ≤ 2 ^ n + 1),\n  add_le_add_right (Nat.pow_le_pow_of_le_right zero_lt_two n.le_succ) _]\n[GOAL]\ncase succ\nM : Type u_1\ninst✝ : OrderedAddCommMonoid M\nf : ℕ → M\nhf : ∀ ⦃m n : ℕ⦄, 1 < m → m ≤ n → f n ≤ f m\nn : ℕ\nihn : ∑ k in range n, 2 ^ k • f (2 ^ (k + 1)) ≤ ∑ k in Ico 2 (2 ^ n + 1), f k\n⊢ 2 ^ n • f (2 ^ (n + 1)) ≤ ∑ k in Ico (2 ^ n + 1) (2 ^ (n + 1) + 1), f k\n[PROOFSTEP]\nhave : ∀ k ∈ Ico (2 ^ n + 1) (2 ^ (n + 1) + 1), f (2 ^ (n + 1)) ≤ f k := fun k hk =>\n  hf (n.one_le_two_pow.trans_lt <| (Nat.lt_succ_of_le le_rfl).trans_le (mem_Ico.mp hk).1)\n    (Nat.le_of_lt_succ <| (mem_Ico.mp hk).2)\n[GOAL]\ncase succ\nM : Type u_1\ninst✝ : OrderedAddCommMonoid M\nf : ℕ → M\nhf : ∀ ⦃m n : ℕ⦄, 1 < m → m ≤ n → f n ≤ f m\nn : ℕ\nihn : ∑ k in range n, 2 ^ k • f (2 ^ (k + 1)) ≤ ∑ k in Ico 2 (2 ^ n + 1), f k\nthis : ∀ (k : ℕ), k ∈ Ico (2 ^ n + 1) (2 ^ (n + 1) + 1) → f (2 ^ (n + 1)) ≤ f k\n⊢ 2 ^ n • f (2 ^ (n + 1)) ≤ ∑ k in Ico (2 ^ n + 1) (2 ^ (n + 1) + 1), f k\n[PROOFSTEP]\nconvert sum_le_sum this\n[GOAL]\ncase h.e'_3\nM : Type u_1\ninst✝ : OrderedAddCommMonoid M\nf : ℕ → M\nhf : ∀ ⦃m n : ℕ⦄, 1 < m → m ≤ n → f n ≤ f m\nn : ℕ\nihn : ∑ k in range n, 2 ^ k • f (2 ^ (k + 1)) ≤ ∑ k in Ico 2 (2 ^ n + 1), f k\nthis : ∀ (k : ℕ), k ∈ Ico (2 ^ n + 1) (2 ^ (n + 1) + 1) → f (2 ^ (n + 1)) ≤ f k\n⊢ 2 ^ n • f (2 ^ (n + 1)) = ∑ i in Ico (2 ^ n + 1) (2 ^ (n + 1) + 1), f (2 ^ (n + 1))\n[PROOFSTEP]\nsimp [pow_succ, two_mul]\n[GOAL]\nM : Type u_1\ninst✝ : OrderedAddCommMonoid M\nf : ℕ → M\nhf : ∀ ⦃m n : ℕ⦄, 1 < m → m ≤ n → f n ≤ f m\nn : ℕ\n⊢ ∑ k in range (n + 1), 2 ^ k • f (2 ^ k) ≤ f 1 + 2 • ∑ k in Ico 2 (2 ^ n + 1), f k\n[PROOFSTEP]\nconvert add_le_add_left (nsmul_le_nsmul_of_le_right (sum_condensed_le' hf n) 2) (f 1)\n[GOAL]\ncase h.e'_3\nM : Type u_1\ninst✝ : OrderedAddCommMonoid M\nf : ℕ → M\nhf : ∀ ⦃m n : ℕ⦄, 1 < m → m ≤ n → f n ≤ f m\nn : ℕ\n⊢ ∑ k in range (n + 1), 2 ^ k • f (2 ^ k) = f 1 + 2 • ∑ k in range n, 2 ^ k • f (2 ^ (k + 1))\n[PROOFSTEP]\nsimp [sum_range_succ', add_comm, pow_succ, mul_nsmul', sum_nsmul]\n[GOAL]\nf : ℕ → ℝ≥0∞\nhf : ∀ ⦃m n : ℕ⦄, 0 < m → m ≤ n → f n ≤ f m\n⊢ ∑' (k : ℕ), f k ≤ f 0 + ∑' (k : ℕ), ↑(2 ^ k) * f (2 ^ k)\n[PROOFSTEP]\nrw [ENNReal.tsum_eq_iSup_nat' (Nat.tendsto_pow_atTop_atTop_of_one_lt _root_.one_lt_two)]\n[GOAL]\nf : ℕ → ℝ≥0∞\nhf : ∀ ⦃m n : ℕ⦄, 0 < m → m ≤ n → f n ≤ f m\n⊢ ⨆ (i : ℕ), ∑ a in Finset.range (2 ^ i), f a ≤ f 0 + ∑' (k : ℕ), ↑(2 ^ k) * f (2 ^ k)\n[PROOFSTEP]\nrefine' iSup_le fun n => (Finset.le_sum_condensed hf n).trans (add_le_add_left _ _)\n[GOAL]\nf : ℕ → ℝ≥0∞\nhf : ∀ ⦃m n : ℕ⦄, 0 < m → m ≤ n → f n ≤ f m\nn : ℕ\n⊢ ∑ k in Finset.range n, 2 ^ k • f (2 ^ k) ≤ ∑' (k : ℕ), ↑(2 ^ k) * f (2 ^ k)\n[PROOFSTEP]\nsimp only [nsmul_eq_mul, Nat.cast_pow, Nat.cast_two]\n[GOAL]\nf : ℕ → ℝ≥0∞\nhf : ∀ ⦃m n : ℕ⦄, 0 < m → m ≤ n → f n ≤ f m\nn : ℕ\n⊢ ∑ x in Finset.range n, 2 ^ x * f (2 ^ x) ≤ ∑' (k : ℕ), 2 ^ k * f (2 ^ k)\n[PROOFSTEP]\napply ENNReal.sum_le_tsum\n[GOAL]\nf : ℕ → ℝ≥0∞\nhf : ∀ ⦃m n : ℕ⦄, 1 < m → m ≤ n → f n ≤ f m\n⊢ ∑' (k : ℕ), ↑(2 ^ k) * f (2 ^ k) ≤ f 1 + 2 * ∑' (k : ℕ), f k\n[PROOFSTEP]\nrw [ENNReal.tsum_eq_iSup_nat' (tendsto_atTop_mono Nat.le_succ tendsto_id), two_mul, ← two_nsmul]\n[GOAL]\nf : ℕ → ℝ≥0∞\nhf : ∀ ⦃m n : ℕ⦄, 1 < m → m ≤ n → f n ≤ f m\n⊢ ⨆ (i : ℕ), ∑ a in Finset.range (Nat.succ i), ↑(2 ^ a) * f (2 ^ a) ≤ f 1 + 2 • ∑' (k : ℕ), f k\n[PROOFSTEP]\nrefine'\n  iSup_le fun n =>\n    le_trans _ (add_le_add_left (nsmul_le_nsmul_of_le_right (ENNReal.sum_le_tsum <| Finset.Ico 2 (2 ^ n + 1)) _) _)\n[GOAL]\nf : ℕ → ℝ≥0∞\nhf : ∀ ⦃m n : ℕ⦄, 1 < m → m ≤ n → f n ≤ f m\nn : ℕ\n⊢ ∑ a in Finset.range (Nat.succ n), ↑(2 ^ a) * f (2 ^ a) ≤ f 1 + 2 • ∑ x in Finset.Ico 2 (2 ^ n + 1), f x\n[PROOFSTEP]\nsimpa using Finset.sum_condensed_le hf n\n[GOAL]\nf : ℕ → ℝ≥0\nhf : ∀ ⦃m n : ℕ⦄, 0 < m → m ≤ n → f n ≤ f m\n⊢ (Summable fun k => 2 ^ k * f (2 ^ k)) ↔ Summable f\n[PROOFSTEP]\nsimp only [← ENNReal.tsum_coe_ne_top_iff_summable, Ne.def, not_iff_not, ENNReal.coe_mul, ENNReal.coe_pow,\n  ENNReal.coe_two]\n[GOAL]\nf : ℕ → ℝ≥0\nhf : ∀ ⦃m n : ℕ⦄, 0 < m → m ≤ n → f n ≤ f m\n⊢ ∑' (b : ℕ), 2 ^ b * ↑(f (2 ^ b)) = ⊤ ↔ ∑' (b : ℕ), ↑(f b) = ⊤\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nf : ℕ → ℝ≥0\nhf : ∀ ⦃m n : ℕ⦄, 0 < m → m ≤ n → f n ≤ f m\n⊢ ∑' (b : ℕ), 2 ^ b * ↑(f (2 ^ b)) = ⊤ → ∑' (b : ℕ), ↑(f b) = ⊤\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nf : ℕ → ℝ≥0\nhf : ∀ ⦃m n : ℕ⦄, 0 < m → m ≤ n → f n ≤ f m\n⊢ ∑' (b : ℕ), ↑(f b) = ⊤ → ∑' (b : ℕ), 2 ^ b * ↑(f (2 ^ b)) = ⊤\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nf : ℕ → ℝ≥0\nhf : ∀ ⦃m n : ℕ⦄, 0 < m → m ≤ n → f n ≤ f m\nh : ∑' (b : ℕ), 2 ^ b * ↑(f (2 ^ b)) = ⊤\n⊢ ∑' (b : ℕ), ↑(f b) = ⊤\n[PROOFSTEP]\nreplace hf : ∀ m n, 1 < m → m ≤ n → (f n : ℝ≥0∞) ≤ f m := fun m n hm hmn =>\n  ENNReal.coe_le_coe.2 (hf (zero_lt_one.trans hm) hmn)\n[GOAL]\ncase mp\nf : ℕ → ℝ≥0\nh : ∑' (b : ℕ), 2 ^ b * ↑(f (2 ^ b)) = ⊤\nhf : ∀ (m n : ℕ), 1 < m → m ≤ n → ↑(f n) ≤ ↑(f m)\n⊢ ∑' (b : ℕ), ↑(f b) = ⊤\n[PROOFSTEP]\nsimpa [h, ENNReal.add_eq_top, ENNReal.mul_eq_top] using ENNReal.tsum_condensed_le hf\n[GOAL]\ncase mpr\nf : ℕ → ℝ≥0\nhf : ∀ ⦃m n : ℕ⦄, 0 < m → m ≤ n → f n ≤ f m\nh : ∑' (b : ℕ), ↑(f b) = ⊤\n⊢ ∑' (b : ℕ), 2 ^ b * ↑(f (2 ^ b)) = ⊤\n[PROOFSTEP]\nreplace hf : ∀ m n, 0 < m → m ≤ n → (f n : ℝ≥0∞) ≤ f m := fun m n hm hmn => ENNReal.coe_le_coe.2 (hf hm hmn)\n[GOAL]\ncase mpr\nf : ℕ → ℝ≥0\nh : ∑' (b : ℕ), ↑(f b) = ⊤\nhf : ∀ (m n : ℕ), 0 < m → m ≤ n → ↑(f n) ≤ ↑(f m)\n⊢ ∑' (b : ℕ), 2 ^ b * ↑(f (2 ^ b)) = ⊤\n[PROOFSTEP]\nsimpa [h, ENNReal.add_eq_top] using ENNReal.le_tsum_condensed hf\n[GOAL]\nf : ℕ → ℝ\nh_nonneg : ∀ (n : ℕ), 0 ≤ f n\nh_mono : ∀ ⦃m n : ℕ⦄, 0 < m → m ≤ n → f n ≤ f m\n⊢ (Summable fun k => 2 ^ k * f (2 ^ k)) ↔ Summable f\n[PROOFSTEP]\nlift f to ℕ → ℝ≥0 using h_nonneg\n[GOAL]\ncase intro\nf : ℕ → ℝ≥0\nh_mono : ∀ ⦃m n : ℕ⦄, 0 < m → m ≤ n → (fun i => ↑(f i)) n ≤ (fun i => ↑(f i)) m\n⊢ (Summable fun k => 2 ^ k * (fun i => ↑(f i)) (2 ^ k)) ↔ Summable fun i => ↑(f i)\n[PROOFSTEP]\nsimp only [NNReal.coe_le_coe] at *\n[GOAL]\ncase intro\nf : ℕ → ℝ≥0\nh_mono : ∀ ⦃m n : ℕ⦄, 0 < m → m ≤ n → f n ≤ f m\n⊢ (Summable fun k => 2 ^ k * ↑(f (2 ^ k))) ↔ Summable fun i => ↑(f i)\n[PROOFSTEP]\nexact_mod_cast NNReal.summable_condensed_iff h_mono\n[GOAL]\np : ℝ\n⊢ (Summable fun n => (↑n ^ p)⁻¹) ↔ 1 < p\n[PROOFSTEP]\ncases' le_or_lt 0 p with hp hp\n[GOAL]\ncase inl\np : ℝ\nhp : 0 ≤ p\n⊢ (Summable fun n => (↑n ^ p)⁻¹) ↔ 1 < p\n[PROOFSTEP]\nrw [← summable_condensed_iff_of_nonneg]\n[GOAL]\ncase inl\np : ℝ\nhp : 0 ≤ p\n⊢ (Summable fun k => 2 ^ k * (↑(2 ^ k) ^ p)⁻¹) ↔ 1 < p\n[PROOFSTEP]\nsimp_rw [Nat.cast_pow, Nat.cast_two, ← rpow_nat_cast, ← rpow_mul zero_lt_two.le, mul_comm _ p, rpow_mul zero_lt_two.le,\n  rpow_nat_cast, ← inv_pow, ← mul_pow, summable_geometric_iff_norm_lt_1]\n[GOAL]\ncase inl\np : ℝ\nhp : 0 ≤ p\n⊢ ‖2 * (2 ^ p)⁻¹‖ < 1 ↔ 1 < p\n[PROOFSTEP]\nnth_rw 1 [← rpow_one 2]\n[GOAL]\ncase inl\np : ℝ\nhp : 0 ≤ p\n⊢ ‖2 ^ 1 * (2 ^ p)⁻¹‖ < 1 ↔ 1 < p\n[PROOFSTEP]\nrw [← division_def, ← rpow_sub zero_lt_two, norm_eq_abs, abs_of_pos (rpow_pos_of_pos zero_lt_two _),\n  rpow_lt_one_iff zero_lt_two.le]\n[GOAL]\ncase inl\np : ℝ\nhp : 0 ≤ p\n⊢ 2 = 0 ∧ 1 - p ≠ 0 ∨ 1 < 2 ∧ 1 - p < 0 ∨ 2 < 1 ∧ 0 < 1 - p ↔ 1 < p\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase inl.h_nonneg\np : ℝ\nhp : 0 ≤ p\n⊢ ∀ (n : ℕ), 0 ≤ (↑n ^ p)⁻¹\n[PROOFSTEP]\nintro n\n[GOAL]\ncase inl.h_nonneg\np : ℝ\nhp : 0 ≤ p\nn : ℕ\n⊢ 0 ≤ (↑n ^ p)⁻¹\n[PROOFSTEP]\nexact inv_nonneg.2 (rpow_nonneg_of_nonneg n.cast_nonneg _)\n[GOAL]\ncase inl.h_mono\np : ℝ\nhp : 0 ≤ p\n⊢ ∀ ⦃m n : ℕ⦄, 0 < m → m ≤ n → (↑n ^ p)⁻¹ ≤ (↑m ^ p)⁻¹\n[PROOFSTEP]\nintro m n hm hmn\n[GOAL]\ncase inl.h_mono\np : ℝ\nhp : 0 ≤ p\nm n : ℕ\nhm : 0 < m\nhmn : m ≤ n\n⊢ (↑n ^ p)⁻¹ ≤ (↑m ^ p)⁻¹\n[PROOFSTEP]\nexact\n  inv_le_inv_of_le (rpow_pos_of_pos (Nat.cast_pos.2 hm) _)\n    (rpow_le_rpow m.cast_nonneg (Nat.cast_le.2 hmn) hp)\n      -- If `p < 0`, then `1 / n ^ p` tends to infinity, thus the series diverges.\n[GOAL]\ncase inr\np : ℝ\nhp : p < 0\n⊢ (Summable fun n => (↑n ^ p)⁻¹) ↔ 1 < p\n[PROOFSTEP]\nsuffices ¬Summable (fun n => ((n : ℝ) ^ p)⁻¹ : ℕ → ℝ)\n  by\n  have : ¬1 < p := fun hp₁ => hp.not_le (zero_le_one.trans hp₁.le)\n  simpa only [this, iff_false]\n[GOAL]\np : ℝ\nhp : p < 0\nthis : ¬Summable fun n => (↑n ^ p)⁻¹\n⊢ (Summable fun n => (↑n ^ p)⁻¹) ↔ 1 < p\n[PROOFSTEP]\nhave : ¬1 < p := fun hp₁ => hp.not_le (zero_le_one.trans hp₁.le)\n[GOAL]\np : ℝ\nhp : p < 0\nthis✝ : ¬Summable fun n => (↑n ^ p)⁻¹\nthis : ¬1 < p\n⊢ (Summable fun n => (↑n ^ p)⁻¹) ↔ 1 < p\n[PROOFSTEP]\nsimpa only [this, iff_false]\n[GOAL]\ncase inr\np : ℝ\nhp : p < 0\n⊢ ¬Summable fun n => (↑n ^ p)⁻¹\n[PROOFSTEP]\nintro h\n[GOAL]\ncase inr\np : ℝ\nhp : p < 0\nh : Summable fun n => (↑n ^ p)⁻¹\n⊢ False\n[PROOFSTEP]\nobtain ⟨k : ℕ, hk₁ : ((k : ℝ) ^ p)⁻¹ < 1, hk₀ : k ≠ 0⟩ :=\n  ((h.tendsto_cofinite_zero.eventually (gt_mem_nhds zero_lt_one)).and (eventually_cofinite_ne 0)).exists\n[GOAL]\ncase inr.intro.intro\np : ℝ\nhp : p < 0\nh : Summable fun n => (↑n ^ p)⁻¹\nk : ℕ\nhk₁ : (↑k ^ p)⁻¹ < 1\nhk₀ : k ≠ 0\n⊢ False\n[PROOFSTEP]\napply hk₀\n[GOAL]\ncase inr.intro.intro\np : ℝ\nhp : p < 0\nh : Summable fun n => (↑n ^ p)⁻¹\nk : ℕ\nhk₁ : (↑k ^ p)⁻¹ < 1\nhk₀ : k ≠ 0\n⊢ k = 0\n[PROOFSTEP]\nrw [← pos_iff_ne_zero, ← @Nat.cast_pos ℝ] at hk₀ \n[GOAL]\ncase inr.intro.intro\np : ℝ\nhp : p < 0\nh : Summable fun n => (↑n ^ p)⁻¹\nk : ℕ\nhk₁ : (↑k ^ p)⁻¹ < 1\nhk₀ : 0 < ↑k\n⊢ k = 0\n[PROOFSTEP]\nsimpa [inv_lt_one_iff_of_pos (rpow_pos_of_pos hk₀ _), one_lt_rpow_iff_of_pos hk₀, hp, hp.not_lt, hk₀] using hk₁\n[GOAL]\np : ℝ\n⊢ (Summable fun n => ↑n ^ p) ↔ p < -1\n[PROOFSTEP]\nrcases neg_surjective p with ⟨p, rfl⟩\n[GOAL]\ncase intro\np : ℝ\n⊢ (Summable fun n => ↑n ^ (-p)) ↔ -p < -1\n[PROOFSTEP]\nsimp [rpow_neg]\n[GOAL]\np : ℝ\n⊢ (Summable fun n => 1 / ↑n ^ p) ↔ 1 < p\n[PROOFSTEP]\nsimp\n[GOAL]\np : ℕ\n⊢ (Summable fun n => (↑n ^ p)⁻¹) ↔ 1 < p\n[PROOFSTEP]\nsimp only [← rpow_nat_cast, Real.summable_nat_rpow_inv, Nat.one_lt_cast]\n[GOAL]\np : ℕ\n⊢ (Summable fun n => 1 / ↑n ^ p) ↔ 1 < p\n[PROOFSTEP]\nsimp only [one_div, Real.summable_nat_pow_inv]\n[GOAL]\np : ℕ\n⊢ (Summable fun n => 1 / ↑n ^ p) ↔ 1 < p\n[PROOFSTEP]\nrefine'\n  ⟨fun h => Real.summable_one_div_nat_pow.mp (h.comp_injective Nat.cast_injective), fun h =>\n    summable_int_of_summable_nat (Real.summable_one_div_nat_pow.mpr h)\n      (((Real.summable_one_div_nat_pow.mpr h).mul_left <| 1 / (-1 : ℝ) ^ p).congr fun n => _)⟩\n[GOAL]\np : ℕ\nh : 1 < p\nn : ℕ\n⊢ 1 / (-1) ^ p * (1 / ↑n ^ p) = 1 / ↑(-↑n) ^ p\n[PROOFSTEP]\nconv_rhs => rw [Int.cast_neg, neg_eq_neg_one_mul, mul_pow, ← div_div]\n[GOAL]\np : ℕ\nh : 1 < p\nn : ℕ\n| 1 / ↑(-↑n) ^ p\n[PROOFSTEP]\nrw [Int.cast_neg, neg_eq_neg_one_mul, mul_pow, ← div_div]\n[GOAL]\np : ℕ\nh : 1 < p\nn : ℕ\n| 1 / ↑(-↑n) ^ p\n[PROOFSTEP]\nrw [Int.cast_neg, neg_eq_neg_one_mul, mul_pow, ← div_div]\n[GOAL]\np : ℕ\nh : 1 < p\nn : ℕ\n| 1 / ↑(-↑n) ^ p\n[PROOFSTEP]\nrw [Int.cast_neg, neg_eq_neg_one_mul, mul_pow, ← div_div]\n[GOAL]\np : ℕ\nh : 1 < p\nn : ℕ\n⊢ 1 / (-1) ^ p * (1 / ↑n ^ p) = 1 / (-1) ^ p / ↑↑n ^ p\n[PROOFSTEP]\nconv_lhs => rw [mul_div, mul_one]\n[GOAL]\np : ℕ\nh : 1 < p\nn : ℕ\n| 1 / (-1) ^ p * (1 / ↑n ^ p)\n[PROOFSTEP]\nrw [mul_div, mul_one]\n[GOAL]\np : ℕ\nh : 1 < p\nn : ℕ\n| 1 / (-1) ^ p * (1 / ↑n ^ p)\n[PROOFSTEP]\nrw [mul_div, mul_one]\n[GOAL]\np : ℕ\nh : 1 < p\nn : ℕ\n| 1 / (-1) ^ p * (1 / ↑n ^ p)\n[PROOFSTEP]\nrw [mul_div, mul_one]\n[GOAL]\nb : ℝ\nhb : 1 < b\n⊢ Summable fun n => |↑n| ^ (-b)\n[PROOFSTEP]\napply summable_int_of_summable_nat\n[GOAL]\ncase hp\nb : ℝ\nhb : 1 < b\n⊢ Summable fun n => |↑↑n| ^ (-b)\ncase hn b : ℝ hb : 1 < b ⊢ Summable fun n => |↑(-↑n)| ^ (-b)\n[PROOFSTEP]\non_goal 2 => simp_rw [Int.cast_neg, abs_neg]\n[GOAL]\ncase hp\nb : ℝ\nhb : 1 < b\n⊢ Summable fun n => |↑↑n| ^ (-b)\ncase hn b : ℝ hb : 1 < b ⊢ Summable fun n => |↑(-↑n)| ^ (-b)\n[PROOFSTEP]\non_goal 2 => simp_rw [Int.cast_neg, abs_neg]\n[GOAL]\ncase hn\nb : ℝ\nhb : 1 < b\n⊢ Summable fun n => |↑(-↑n)| ^ (-b)\n[PROOFSTEP]\nsimp_rw [Int.cast_neg, abs_neg]\n[GOAL]\ncase hp\nb : ℝ\nhb : 1 < b\n⊢ Summable fun n => |↑↑n| ^ (-b)\ncase hn b : ℝ hb : 1 < b ⊢ Summable fun n => |↑↑n| ^ (-b)\n[PROOFSTEP]\nall_goals\n  simp_rw [Int.cast_ofNat, fun n : ℕ => abs_of_nonneg (n.cast_nonneg : 0 ≤ (n : ℝ))]\n  rwa [Real.summable_nat_rpow, neg_lt_neg_iff]\n[GOAL]\ncase hp\nb : ℝ\nhb : 1 < b\n⊢ Summable fun n => |↑↑n| ^ (-b)\n[PROOFSTEP]\nsimp_rw [Int.cast_ofNat, fun n : ℕ => abs_of_nonneg (n.cast_nonneg : 0 ≤ (n : ℝ))]\n[GOAL]\ncase hp\nb : ℝ\nhb : 1 < b\n⊢ Summable fun n => ↑n ^ (-b)\n[PROOFSTEP]\nrwa [Real.summable_nat_rpow, neg_lt_neg_iff]\n[GOAL]\ncase hn\nb : ℝ\nhb : 1 < b\n⊢ Summable fun n => |↑↑n| ^ (-b)\n[PROOFSTEP]\nsimp_rw [Int.cast_ofNat, fun n : ℕ => abs_of_nonneg (n.cast_nonneg : 0 ≤ (n : ℝ))]\n[GOAL]\ncase hn\nb : ℝ\nhb : 1 < b\n⊢ Summable fun n => ↑n ^ (-b)\n[PROOFSTEP]\nrwa [Real.summable_nat_rpow, neg_lt_neg_iff]\n[GOAL]\n⊢ ¬Summable fun n => (↑n)⁻¹\n[PROOFSTEP]\nhave : ¬Summable (fun n => ((n : ℝ) ^ 1)⁻¹ : ℕ → ℝ) := mt (Real.summable_nat_pow_inv (p := 1)).1 (lt_irrefl 1)\n[GOAL]\nthis : ¬Summable fun n => (↑n ^ 1)⁻¹\n⊢ ¬Summable fun n => (↑n)⁻¹\n[PROOFSTEP]\nsimpa\n[GOAL]\n⊢ ¬Summable fun n => 1 / ↑n\n[PROOFSTEP]\nsimpa only [inv_eq_one_div] using Real.not_summable_nat_cast_inv\n[GOAL]\n⊢ Tendsto (fun n => ∑ i in Finset.range n, 1 / (↑i + 1)) atTop atTop\n[PROOFSTEP]\nrw [← not_summable_iff_tendsto_nat_atTop_of_nonneg]\n[GOAL]\n⊢ ¬Summable fun i => 1 / (↑i + 1)\n[PROOFSTEP]\nexact_mod_cast mt (_root_.summable_nat_add_iff 1).1 Real.not_summable_one_div_nat_cast\n[GOAL]\n⊢ ∀ (n : ℕ), 0 ≤ 1 / (↑n + 1)\n[PROOFSTEP]\nexact fun i => div_nonneg zero_le_one i.cast_add_one_pos.le\n[GOAL]\np : ℝ\n⊢ (Summable fun n => (↑n ^ p)⁻¹) ↔ 1 < p\n[PROOFSTEP]\nsimp [← NNReal.summable_coe]\n[GOAL]\np : ℝ\n⊢ (Summable fun n => ↑n ^ p) ↔ p < -1\n[PROOFSTEP]\nsimp [← NNReal.summable_coe]\n[GOAL]\np : ℝ\n⊢ (Summable fun n => 1 / ↑n ^ p) ↔ 1 < p\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\nk n : ℕ\nhk : k ≠ 0\nh : k ≤ n\n⊢ ∑ i in Ioc k n, (↑i ^ 2)⁻¹ ≤ (↑k)⁻¹ - (↑n)⁻¹\n[PROOFSTEP]\nrefine' Nat.le_induction _ _ n h\n[GOAL]\ncase refine'_1\nα : Type u_1\ninst✝ : LinearOrderedField α\nk n : ℕ\nhk : k ≠ 0\nh : k ≤ n\n⊢ ∑ i in Ioc k k, (↑i ^ 2)⁻¹ ≤ (↑k)⁻¹ - (↑k)⁻¹\n[PROOFSTEP]\nsimp only [Ioc_self, sum_empty, sub_self, le_refl]\n[GOAL]\ncase refine'_2\nα : Type u_1\ninst✝ : LinearOrderedField α\nk n : ℕ\nhk : k ≠ 0\nh : k ≤ n\n⊢ ∀ (n : ℕ),\n    k ≤ n → ∑ i in Ioc k n, (↑i ^ 2)⁻¹ ≤ (↑k)⁻¹ - (↑n)⁻¹ → ∑ i in Ioc k (n + 1), (↑i ^ 2)⁻¹ ≤ (↑k)⁻¹ - (↑(n + 1))⁻¹\n[PROOFSTEP]\nintro n hn IH\n[GOAL]\ncase refine'_2\nα : Type u_1\ninst✝ : LinearOrderedField α\nk n✝ : ℕ\nhk : k ≠ 0\nh : k ≤ n✝\nn : ℕ\nhn : k ≤ n\nIH : ∑ i in Ioc k n, (↑i ^ 2)⁻¹ ≤ (↑k)⁻¹ - (↑n)⁻¹\n⊢ ∑ i in Ioc k (n + 1), (↑i ^ 2)⁻¹ ≤ (↑k)⁻¹ - (↑(n + 1))⁻¹\n[PROOFSTEP]\nrw [sum_Ioc_succ_top hn]\n[GOAL]\ncase refine'_2\nα : Type u_1\ninst✝ : LinearOrderedField α\nk n✝ : ℕ\nhk : k ≠ 0\nh : k ≤ n✝\nn : ℕ\nhn : k ≤ n\nIH : ∑ i in Ioc k n, (↑i ^ 2)⁻¹ ≤ (↑k)⁻¹ - (↑n)⁻¹\n⊢ ∑ k in Ioc k n, (↑k ^ 2)⁻¹ + (↑(n + 1) ^ 2)⁻¹ ≤ (↑k)⁻¹ - (↑(n + 1))⁻¹\n[PROOFSTEP]\napply (add_le_add IH le_rfl).trans\n[GOAL]\ncase refine'_2\nα : Type u_1\ninst✝ : LinearOrderedField α\nk n✝ : ℕ\nhk : k ≠ 0\nh : k ≤ n✝\nn : ℕ\nhn : k ≤ n\nIH : ∑ i in Ioc k n, (↑i ^ 2)⁻¹ ≤ (↑k)⁻¹ - (↑n)⁻¹\n⊢ (↑k)⁻¹ - (↑n)⁻¹ + (↑(n + 1) ^ 2)⁻¹ ≤ (↑k)⁻¹ - (↑(n + 1))⁻¹\n[PROOFSTEP]\nsimp only [sub_eq_add_neg, add_assoc, Nat.cast_add, Nat.cast_one, le_add_neg_iff_add_le, add_le_iff_nonpos_right,\n  neg_add_le_iff_le_add, add_zero]\n[GOAL]\ncase refine'_2\nα : Type u_1\ninst✝ : LinearOrderedField α\nk n✝ : ℕ\nhk : k ≠ 0\nh : k ≤ n✝\nn : ℕ\nhn : k ≤ n\nIH : ∑ i in Ioc k n, (↑i ^ 2)⁻¹ ≤ (↑k)⁻¹ - (↑n)⁻¹\n⊢ ((↑n + 1) ^ 2)⁻¹ + (↑n + 1)⁻¹ ≤ (↑n)⁻¹\n[PROOFSTEP]\nhave A : 0 < (n : α) := by simpa using hk.bot_lt.trans_le hn\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\nk n✝ : ℕ\nhk : k ≠ 0\nh : k ≤ n✝\nn : ℕ\nhn : k ≤ n\nIH : ∑ i in Ioc k n, (↑i ^ 2)⁻¹ ≤ (↑k)⁻¹ - (↑n)⁻¹\n⊢ 0 < ↑n\n[PROOFSTEP]\nsimpa using hk.bot_lt.trans_le hn\n[GOAL]\ncase refine'_2\nα : Type u_1\ninst✝ : LinearOrderedField α\nk n✝ : ℕ\nhk : k ≠ 0\nh : k ≤ n✝\nn : ℕ\nhn : k ≤ n\nIH : ∑ i in Ioc k n, (↑i ^ 2)⁻¹ ≤ (↑k)⁻¹ - (↑n)⁻¹\nA : 0 < ↑n\n⊢ ((↑n + 1) ^ 2)⁻¹ + (↑n + 1)⁻¹ ≤ (↑n)⁻¹\n[PROOFSTEP]\nhave B : 0 < (n : α) + 1 := by linarith\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\nk n✝ : ℕ\nhk : k ≠ 0\nh : k ≤ n✝\nn : ℕ\nhn : k ≤ n\nIH : ∑ i in Ioc k n, (↑i ^ 2)⁻¹ ≤ (↑k)⁻¹ - (↑n)⁻¹\nA : 0 < ↑n\n⊢ 0 < ↑n + 1\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase refine'_2\nα : Type u_1\ninst✝ : LinearOrderedField α\nk n✝ : ℕ\nhk : k ≠ 0\nh : k ≤ n✝\nn : ℕ\nhn : k ≤ n\nIH : ∑ i in Ioc k n, (↑i ^ 2)⁻¹ ≤ (↑k)⁻¹ - (↑n)⁻¹\nA : 0 < ↑n\nB : 0 < ↑n + 1\n⊢ ((↑n + 1) ^ 2)⁻¹ + (↑n + 1)⁻¹ ≤ (↑n)⁻¹\n[PROOFSTEP]\nfield_simp [B.ne']\n[GOAL]\ncase refine'_2\nα : Type u_1\ninst✝ : LinearOrderedField α\nk n✝ : ℕ\nhk : k ≠ 0\nh : k ≤ n✝\nn : ℕ\nhn : k ≤ n\nIH : ∑ i in Ioc k n, (↑i ^ 2)⁻¹ ≤ (↑k)⁻¹ - (↑n)⁻¹\nA : 0 < ↑n\nB : 0 < ↑n + 1\n⊢ (↑n + 1 + (↑n + 1) ^ 2) / ((↑n + 1) ^ 2 * (↑n + 1)) ≤ 1 / ↑n\n[PROOFSTEP]\nrw [div_le_div_iff _ A, ← sub_nonneg]\n[GOAL]\ncase refine'_2\nα : Type u_1\ninst✝ : LinearOrderedField α\nk n✝ : ℕ\nhk : k ≠ 0\nh : k ≤ n✝\nn : ℕ\nhn : k ≤ n\nIH : ∑ i in Ioc k n, (↑i ^ 2)⁻¹ ≤ (↑k)⁻¹ - (↑n)⁻¹\nA : 0 < ↑n\nB : 0 < ↑n + 1\n⊢ 0 ≤ 1 * ((↑n + 1) ^ 2 * (↑n + 1)) - (↑n + 1 + (↑n + 1) ^ 2) * ↑n\n[PROOFSTEP]\nring_nf\n[GOAL]\ncase refine'_2\nα : Type u_1\ninst✝ : LinearOrderedField α\nk n✝ : ℕ\nhk : k ≠ 0\nh : k ≤ n✝\nn : ℕ\nhn : k ≤ n\nIH : ∑ i in Ioc k n, (↑i ^ 2)⁻¹ ≤ (↑k)⁻¹ - (↑n)⁻¹\nA : 0 < ↑n\nB : 0 < ↑n + 1\n⊢ 0 ≤ 1 + ↑n\n[PROOFSTEP]\nrw [add_comm]\n[GOAL]\ncase refine'_2\nα : Type u_1\ninst✝ : LinearOrderedField α\nk n✝ : ℕ\nhk : k ≠ 0\nh : k ≤ n✝\nn : ℕ\nhn : k ≤ n\nIH : ∑ i in Ioc k n, (↑i ^ 2)⁻¹ ≤ (↑k)⁻¹ - (↑n)⁻¹\nA : 0 < ↑n\nB : 0 < ↑n + 1\n⊢ 0 ≤ ↑n + 1\n[PROOFSTEP]\nexact B.le\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\nk n✝ : ℕ\nhk : k ≠ 0\nh : k ≤ n✝\nn : ℕ\nhn : k ≤ n\nIH : ∑ i in Ioc k n, (↑i ^ 2)⁻¹ ≤ (↑k)⁻¹ - (↑n)⁻¹\nA : 0 < ↑n\nB : 0 < ↑n + 1\n⊢ 0 < (↑n + 1) ^ 2 * (↑n + 1)\n[PROOFSTEP]\npositivity\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\nk n : ℕ\n⊢ ∑ i in Ioo k n, (↑i ^ 2)⁻¹ ≤ ∑ i in Ioc k (max (k + 1) n), (↑i ^ 2)⁻¹\n[PROOFSTEP]\napply sum_le_sum_of_subset_of_nonneg\n[GOAL]\ncase h\nα : Type u_1\ninst✝ : LinearOrderedField α\nk n : ℕ\n⊢ Ioo k n ⊆ Ioc k (max (k + 1) n)\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase h\nα : Type u_1\ninst✝ : LinearOrderedField α\nk n x : ℕ\nhx : x ∈ Ioo k n\n⊢ x ∈ Ioc k (max (k + 1) n)\n[PROOFSTEP]\nsimp only [mem_Ioo] at hx \n[GOAL]\ncase h\nα : Type u_1\ninst✝ : LinearOrderedField α\nk n x : ℕ\nhx : k < x ∧ x < n\n⊢ x ∈ Ioc k (max (k + 1) n)\n[PROOFSTEP]\nsimp only [hx, hx.2.le, mem_Ioc, le_max_iff, or_true_iff, and_self_iff]\n[GOAL]\ncase hf\nα : Type u_1\ninst✝ : LinearOrderedField α\nk n : ℕ\n⊢ ∀ (i : ℕ), i ∈ Ioc k (max (k + 1) n) → ¬i ∈ Ioo k n → 0 ≤ (↑i ^ 2)⁻¹\n[PROOFSTEP]\nintro i _hi _hident\n[GOAL]\ncase hf\nα : Type u_1\ninst✝ : LinearOrderedField α\nk n i : ℕ\n_hi : i ∈ Ioc k (max (k + 1) n)\n_hident : ¬i ∈ Ioo k n\n⊢ 0 ≤ (↑i ^ 2)⁻¹\n[PROOFSTEP]\npositivity\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\nk n : ℕ\n⊢ ∑ i in Ioc k (max (k + 1) n), (↑i ^ 2)⁻¹ ≤ ((↑k + 1) ^ 2)⁻¹ + ∑ i in Ioc (Nat.succ k) (max (k + 1) n), (↑i ^ 2)⁻¹\n[PROOFSTEP]\nrw [← Nat.Icc_succ_left, ← Nat.Ico_succ_right, sum_eq_sum_Ico_succ_bot]\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\nk n : ℕ\n⊢ (↑(Nat.succ k) ^ 2)⁻¹ + ∑ k in Ico (Nat.succ k + 1) (Nat.succ (max (k + 1) n)), (↑k ^ 2)⁻¹ ≤\n    ((↑k + 1) ^ 2)⁻¹ + ∑ i in Ioc (Nat.succ k) (max (k + 1) n), (↑i ^ 2)⁻¹\ncase hab α : Type u_1 inst✝ : LinearOrderedField α k n : ℕ ⊢ Nat.succ k < Nat.succ (max (k + 1) n)\n[PROOFSTEP]\nswap\n[GOAL]\ncase hab\nα : Type u_1\ninst✝ : LinearOrderedField α\nk n : ℕ\n⊢ Nat.succ k < Nat.succ (max (k + 1) n)\n[PROOFSTEP]\nexact Nat.succ_lt_succ ((Nat.lt_succ_self k).trans_le (le_max_left _ _))\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\nk n : ℕ\n⊢ (↑(Nat.succ k) ^ 2)⁻¹ + ∑ k in Ico (Nat.succ k + 1) (Nat.succ (max (k + 1) n)), (↑k ^ 2)⁻¹ ≤\n    ((↑k + 1) ^ 2)⁻¹ + ∑ i in Ioc (Nat.succ k) (max (k + 1) n), (↑i ^ 2)⁻¹\n[PROOFSTEP]\nrw [Nat.Ico_succ_right, Nat.Icc_succ_left, Nat.cast_succ]\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\nk n : ℕ\n⊢ ((↑k + 1) ^ 2)⁻¹ + ∑ i in Ioc (Nat.succ k) (max (k + 1) n), (↑i ^ 2)⁻¹ ≤ ((↑k + 1) ^ 2)⁻¹ + (↑k + 1)⁻¹\n[PROOFSTEP]\nrefine' add_le_add le_rfl ((sum_Ioc_inv_sq_le_sub _ (le_max_left _ _)).trans _)\n[GOAL]\ncase refine'_1\nα : Type u_1\ninst✝ : LinearOrderedField α\nk n : ℕ\n⊢ Nat.succ k ≠ 0\n[PROOFSTEP]\nsimp only [Ne.def, Nat.succ_ne_zero, not_false_iff]\n[GOAL]\ncase refine'_2\nα : Type u_1\ninst✝ : LinearOrderedField α\nk n : ℕ\n⊢ (↑(Nat.succ k))⁻¹ - (↑(max (Nat.succ k) n))⁻¹ ≤ (↑k + 1)⁻¹\n[PROOFSTEP]\nsimp only [Nat.cast_succ, one_div, sub_le_self_iff, inv_nonneg, Nat.cast_nonneg]\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\nk n : ℕ\n⊢ ((↑k + 1) ^ 2)⁻¹ + (↑k + 1)⁻¹ ≤ 1 / (↑k + 1) + 1 / (↑k + 1)\n[PROOFSTEP]\nhave A : (1 : α) ≤ k + 1 := by simp only [le_add_iff_nonneg_left, Nat.cast_nonneg]\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\nk n : ℕ\n⊢ 1 ≤ ↑k + 1\n[PROOFSTEP]\nsimp only [le_add_iff_nonneg_left, Nat.cast_nonneg]\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\nk n : ℕ\nA : 1 ≤ ↑k + 1\n⊢ ((↑k + 1) ^ 2)⁻¹ + (↑k + 1)⁻¹ ≤ 1 / (↑k + 1) + 1 / (↑k + 1)\n[PROOFSTEP]\nsimp_rw [← one_div]\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\nk n : ℕ\nA : 1 ≤ ↑k + 1\n⊢ 1 / (↑k + 1) ^ 2 + 1 / (↑k + 1) ≤ 1 / (↑k + 1) + 1 / (↑k + 1)\n[PROOFSTEP]\napply add_le_add_right\n[GOAL]\ncase bc\nα : Type u_1\ninst✝ : LinearOrderedField α\nk n : ℕ\nA : 1 ≤ ↑k + 1\n⊢ 1 / (↑k + 1) ^ 2 ≤ 1 / (↑k + 1)\n[PROOFSTEP]\nrefine' div_le_div zero_le_one le_rfl (zero_lt_one.trans_le A) _\n[GOAL]\ncase bc\nα : Type u_1\ninst✝ : LinearOrderedField α\nk n : ℕ\nA : 1 ≤ ↑k + 1\n⊢ ↑k + 1 ≤ (↑k + 1) ^ 2\n[PROOFSTEP]\nsimpa using pow_le_pow A one_le_two\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedField α\nk n : ℕ\n⊢ 1 / (↑k + 1) + 1 / (↑k + 1) = 2 / (↑k + 1)\n[PROOFSTEP]\nring\n", "meta": {"mathlib_filename": "Mathlib.Analysis.PSeries", "llama_tokens": 17182, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8289388125473629, "lm_q2_score": 0.6477982179521103, "lm_q1q2_score": 0.5369850855595202}}
{"text": "[GOAL]\nV : Type u\ninst✝² : NormedAddCommGroup V\ninst✝¹ : InnerProductSpace ℝ V\ninst✝ : CompleteSpace V\nB : V →L[ℝ] V →L[ℝ] ℝ\ncoercive : IsCoercive B\n⊢ ∃ C, 0 < C ∧ ∀ (v : V), C * ‖v‖ ≤ ‖↑(continuousLinearMapOfBilin B) v‖\n[PROOFSTEP]\nrcases coercive with ⟨C, C_ge_0, coercivity⟩\n[GOAL]\ncase intro.intro\nV : Type u\ninst✝² : NormedAddCommGroup V\ninst✝¹ : InnerProductSpace ℝ V\ninst✝ : CompleteSpace V\nB : V →L[ℝ] V →L[ℝ] ℝ\nC : ℝ\nC_ge_0 : 0 < C\ncoercivity : ∀ (u : V), C * ‖u‖ * ‖u‖ ≤ ↑(↑B u) u\n⊢ ∃ C, 0 < C ∧ ∀ (v : V), C * ‖v‖ ≤ ‖↑(continuousLinearMapOfBilin B) v‖\n[PROOFSTEP]\nrefine' ⟨C, C_ge_0, _⟩\n[GOAL]\ncase intro.intro\nV : Type u\ninst✝² : NormedAddCommGroup V\ninst✝¹ : InnerProductSpace ℝ V\ninst✝ : CompleteSpace V\nB : V →L[ℝ] V →L[ℝ] ℝ\nC : ℝ\nC_ge_0 : 0 < C\ncoercivity : ∀ (u : V), C * ‖u‖ * ‖u‖ ≤ ↑(↑B u) u\n⊢ ∀ (v : V), C * ‖v‖ ≤ ‖↑(continuousLinearMapOfBilin B) v‖\n[PROOFSTEP]\nintro v\n[GOAL]\ncase intro.intro\nV : Type u\ninst✝² : NormedAddCommGroup V\ninst✝¹ : InnerProductSpace ℝ V\ninst✝ : CompleteSpace V\nB : V →L[ℝ] V →L[ℝ] ℝ\nC : ℝ\nC_ge_0 : 0 < C\ncoercivity : ∀ (u : V), C * ‖u‖ * ‖u‖ ≤ ↑(↑B u) u\nv : V\n⊢ C * ‖v‖ ≤ ‖↑(continuousLinearMapOfBilin B) v‖\n[PROOFSTEP]\nby_cases h : 0 < ‖v‖\n[GOAL]\ncase pos\nV : Type u\ninst✝² : NormedAddCommGroup V\ninst✝¹ : InnerProductSpace ℝ V\ninst✝ : CompleteSpace V\nB : V →L[ℝ] V →L[ℝ] ℝ\nC : ℝ\nC_ge_0 : 0 < C\ncoercivity : ∀ (u : V), C * ‖u‖ * ‖u‖ ≤ ↑(↑B u) u\nv : V\nh : 0 < ‖v‖\n⊢ C * ‖v‖ ≤ ‖↑(continuousLinearMapOfBilin B) v‖\n[PROOFSTEP]\nrefine' (mul_le_mul_right h).mp _\n[GOAL]\ncase pos\nV : Type u\ninst✝² : NormedAddCommGroup V\ninst✝¹ : InnerProductSpace ℝ V\ninst✝ : CompleteSpace V\nB : V →L[ℝ] V →L[ℝ] ℝ\nC : ℝ\nC_ge_0 : 0 < C\ncoercivity : ∀ (u : V), C * ‖u‖ * ‖u‖ ≤ ↑(↑B u) u\nv : V\nh : 0 < ‖v‖\n⊢ C * ‖v‖ * ‖v‖ ≤ ‖↑(continuousLinearMapOfBilin B) v‖ * ‖v‖\n[PROOFSTEP]\ncalc\n  C * ‖v‖ * ‖v‖ ≤ B v v := coercivity v\n  _ = ⟪B♯ v, v⟫_ℝ := (continuousLinearMapOfBilin_apply B v v).symm\n  _ ≤ ‖B♯ v‖ * ‖v‖ := real_inner_le_norm (B♯ v) v\n[GOAL]\ncase neg\nV : Type u\ninst✝² : NormedAddCommGroup V\ninst✝¹ : InnerProductSpace ℝ V\ninst✝ : CompleteSpace V\nB : V →L[ℝ] V →L[ℝ] ℝ\nC : ℝ\nC_ge_0 : 0 < C\ncoercivity : ∀ (u : V), C * ‖u‖ * ‖u‖ ≤ ↑(↑B u) u\nv : V\nh : ¬0 < ‖v‖\n⊢ C * ‖v‖ ≤ ‖↑(continuousLinearMapOfBilin B) v‖\n[PROOFSTEP]\nhave : v = 0 := by simpa using h\n[GOAL]\nV : Type u\ninst✝² : NormedAddCommGroup V\ninst✝¹ : InnerProductSpace ℝ V\ninst✝ : CompleteSpace V\nB : V →L[ℝ] V →L[ℝ] ℝ\nC : ℝ\nC_ge_0 : 0 < C\ncoercivity : ∀ (u : V), C * ‖u‖ * ‖u‖ ≤ ↑(↑B u) u\nv : V\nh : ¬0 < ‖v‖\n⊢ v = 0\n[PROOFSTEP]\nsimpa using h\n[GOAL]\ncase neg\nV : Type u\ninst✝² : NormedAddCommGroup V\ninst✝¹ : InnerProductSpace ℝ V\ninst✝ : CompleteSpace V\nB : V →L[ℝ] V →L[ℝ] ℝ\nC : ℝ\nC_ge_0 : 0 < C\ncoercivity : ∀ (u : V), C * ‖u‖ * ‖u‖ ≤ ↑(↑B u) u\nv : V\nh : ¬0 < ‖v‖\nthis : v = 0\n⊢ C * ‖v‖ ≤ ‖↑(continuousLinearMapOfBilin B) v‖\n[PROOFSTEP]\nsimp [this]\n[GOAL]\nV : Type u\ninst✝² : NormedAddCommGroup V\ninst✝¹ : InnerProductSpace ℝ V\ninst✝ : CompleteSpace V\nB : V →L[ℝ] V →L[ℝ] ℝ\ncoercive : IsCoercive B\n⊢ ∃ C, 0 < C ∧ AntilipschitzWith C ↑(continuousLinearMapOfBilin B)\n[PROOFSTEP]\nrcases coercive.bounded_below with ⟨C, C_pos, below_bound⟩\n[GOAL]\ncase intro.intro\nV : Type u\ninst✝² : NormedAddCommGroup V\ninst✝¹ : InnerProductSpace ℝ V\ninst✝ : CompleteSpace V\nB : V →L[ℝ] V →L[ℝ] ℝ\ncoercive : IsCoercive B\nC : ℝ\nC_pos : 0 < C\nbelow_bound : ∀ (v : V), C * ‖v‖ ≤ ‖↑(continuousLinearMapOfBilin B) v‖\n⊢ ∃ C, 0 < C ∧ AntilipschitzWith C ↑(continuousLinearMapOfBilin B)\n[PROOFSTEP]\nrefine' ⟨C⁻¹.toNNReal, Real.toNNReal_pos.mpr (inv_pos.mpr C_pos), _⟩\n[GOAL]\ncase intro.intro\nV : Type u\ninst✝² : NormedAddCommGroup V\ninst✝¹ : InnerProductSpace ℝ V\ninst✝ : CompleteSpace V\nB : V →L[ℝ] V →L[ℝ] ℝ\ncoercive : IsCoercive B\nC : ℝ\nC_pos : 0 < C\nbelow_bound : ∀ (v : V), C * ‖v‖ ≤ ‖↑(continuousLinearMapOfBilin B) v‖\n⊢ AntilipschitzWith (Real.toNNReal C⁻¹) ↑(continuousLinearMapOfBilin B)\n[PROOFSTEP]\nrefine' ContinuousLinearMap.antilipschitz_of_bound B♯ _\n[GOAL]\ncase intro.intro\nV : Type u\ninst✝² : NormedAddCommGroup V\ninst✝¹ : InnerProductSpace ℝ V\ninst✝ : CompleteSpace V\nB : V →L[ℝ] V →L[ℝ] ℝ\ncoercive : IsCoercive B\nC : ℝ\nC_pos : 0 < C\nbelow_bound : ∀ (v : V), C * ‖v‖ ≤ ‖↑(continuousLinearMapOfBilin B) v‖\n⊢ ∀ (x : V), ‖x‖ ≤ ↑(Real.toNNReal C⁻¹) * ‖↑(continuousLinearMapOfBilin B) x‖\n[PROOFSTEP]\nsimp_rw [Real.coe_toNNReal', max_eq_left_of_lt (inv_pos.mpr C_pos), ← inv_mul_le_iff (inv_pos.mpr C_pos)]\n[GOAL]\ncase intro.intro\nV : Type u\ninst✝² : NormedAddCommGroup V\ninst✝¹ : InnerProductSpace ℝ V\ninst✝ : CompleteSpace V\nB : V →L[ℝ] V →L[ℝ] ℝ\ncoercive : IsCoercive B\nC : ℝ\nC_pos : 0 < C\nbelow_bound : ∀ (v : V), C * ‖v‖ ≤ ‖↑(continuousLinearMapOfBilin B) v‖\n⊢ ∀ (x : V), C⁻¹⁻¹ * ‖x‖ ≤ ‖↑(continuousLinearMapOfBilin B) x‖\n[PROOFSTEP]\nsimpa using below_bound\n[GOAL]\nV : Type u\ninst✝² : NormedAddCommGroup V\ninst✝¹ : InnerProductSpace ℝ V\ninst✝ : CompleteSpace V\nB : V →L[ℝ] V →L[ℝ] ℝ\ncoercive : IsCoercive B\n⊢ ker (continuousLinearMapOfBilin B) = ⊥\n[PROOFSTEP]\nrw [LinearMapClass.ker_eq_bot]\n[GOAL]\nV : Type u\ninst✝² : NormedAddCommGroup V\ninst✝¹ : InnerProductSpace ℝ V\ninst✝ : CompleteSpace V\nB : V →L[ℝ] V →L[ℝ] ℝ\ncoercive : IsCoercive B\n⊢ Function.Injective ↑(continuousLinearMapOfBilin B)\n[PROOFSTEP]\nrcases coercive.antilipschitz with ⟨_, _, antilipschitz⟩\n[GOAL]\ncase intro.intro\nV : Type u\ninst✝² : NormedAddCommGroup V\ninst✝¹ : InnerProductSpace ℝ V\ninst✝ : CompleteSpace V\nB : V →L[ℝ] V →L[ℝ] ℝ\ncoercive : IsCoercive B\nw✝ : ℝ≥0\nleft✝ : 0 < w✝\nantilipschitz : AntilipschitzWith w✝ ↑(continuousLinearMapOfBilin B)\n⊢ Function.Injective ↑(continuousLinearMapOfBilin B)\n[PROOFSTEP]\nexact antilipschitz.injective\n[GOAL]\nV : Type u\ninst✝² : NormedAddCommGroup V\ninst✝¹ : InnerProductSpace ℝ V\ninst✝ : CompleteSpace V\nB : V →L[ℝ] V →L[ℝ] ℝ\ncoercive : IsCoercive B\n⊢ IsClosed ↑(range (continuousLinearMapOfBilin B))\n[PROOFSTEP]\nrcases coercive.antilipschitz with ⟨_, _, antilipschitz⟩\n[GOAL]\ncase intro.intro\nV : Type u\ninst✝² : NormedAddCommGroup V\ninst✝¹ : InnerProductSpace ℝ V\ninst✝ : CompleteSpace V\nB : V →L[ℝ] V →L[ℝ] ℝ\ncoercive : IsCoercive B\nw✝ : ℝ≥0\nleft✝ : 0 < w✝\nantilipschitz : AntilipschitzWith w✝ ↑(continuousLinearMapOfBilin B)\n⊢ IsClosed ↑(range (continuousLinearMapOfBilin B))\n[PROOFSTEP]\nexact antilipschitz.isClosed_range B♯.uniformContinuous\n[GOAL]\nV : Type u\ninst✝² : NormedAddCommGroup V\ninst✝¹ : InnerProductSpace ℝ V\ninst✝ : CompleteSpace V\nB : V →L[ℝ] V →L[ℝ] ℝ\ncoercive : IsCoercive B\n⊢ range (continuousLinearMapOfBilin B) = ⊤\n[PROOFSTEP]\nhaveI := coercive.closed_range.completeSpace_coe\n[GOAL]\nV : Type u\ninst✝² : NormedAddCommGroup V\ninst✝¹ : InnerProductSpace ℝ V\ninst✝ : CompleteSpace V\nB : V →L[ℝ] V →L[ℝ] ℝ\ncoercive : IsCoercive B\nthis : CompleteSpace ↑↑(range (continuousLinearMapOfBilin B))\n⊢ range (continuousLinearMapOfBilin B) = ⊤\n[PROOFSTEP]\nrw [← (range B♯).orthogonal_orthogonal]\n[GOAL]\nV : Type u\ninst✝² : NormedAddCommGroup V\ninst✝¹ : InnerProductSpace ℝ V\ninst✝ : CompleteSpace V\nB : V →L[ℝ] V →L[ℝ] ℝ\ncoercive : IsCoercive B\nthis : CompleteSpace ↑↑(range (continuousLinearMapOfBilin B))\n⊢ (range (continuousLinearMapOfBilin B))ᗮᗮ = ⊤\n[PROOFSTEP]\nrw [Submodule.eq_top_iff']\n[GOAL]\nV : Type u\ninst✝² : NormedAddCommGroup V\ninst✝¹ : InnerProductSpace ℝ V\ninst✝ : CompleteSpace V\nB : V →L[ℝ] V →L[ℝ] ℝ\ncoercive : IsCoercive B\nthis : CompleteSpace ↑↑(range (continuousLinearMapOfBilin B))\n⊢ ∀ (x : V), x ∈ (range (continuousLinearMapOfBilin B))ᗮᗮ\n[PROOFSTEP]\nintro v w mem_w_orthogonal\n[GOAL]\nV : Type u\ninst✝² : NormedAddCommGroup V\ninst✝¹ : InnerProductSpace ℝ V\ninst✝ : CompleteSpace V\nB : V →L[ℝ] V →L[ℝ] ℝ\ncoercive : IsCoercive B\nthis : CompleteSpace ↑↑(range (continuousLinearMapOfBilin B))\nv w : V\nmem_w_orthogonal : w ∈ (range (continuousLinearMapOfBilin B))ᗮ\n⊢ inner w v = 0\n[PROOFSTEP]\nrcases coercive with ⟨C, C_pos, coercivity⟩\n[GOAL]\ncase intro.intro\nV : Type u\ninst✝² : NormedAddCommGroup V\ninst✝¹ : InnerProductSpace ℝ V\ninst✝ : CompleteSpace V\nB : V →L[ℝ] V →L[ℝ] ℝ\nthis : CompleteSpace ↑↑(range (continuousLinearMapOfBilin B))\nv w : V\nmem_w_orthogonal : w ∈ (range (continuousLinearMapOfBilin B))ᗮ\nC : ℝ\nC_pos : 0 < C\ncoercivity : ∀ (u : V), C * ‖u‖ * ‖u‖ ≤ ↑(↑B u) u\n⊢ inner w v = 0\n[PROOFSTEP]\nobtain rfl : w = 0 :=\n  by\n  rw [← norm_eq_zero, ← mul_self_eq_zero, ← mul_right_inj' C_pos.ne', mul_zero, ← mul_assoc]\n  apply le_antisymm\n  ·\n    calc\n      C * ‖w‖ * ‖w‖ ≤ B w w := coercivity w\n      _ = ⟪B♯ w, w⟫_ℝ := (continuousLinearMapOfBilin_apply B w w).symm\n      _ = 0 := mem_w_orthogonal _ ⟨w, rfl⟩\n  · exact mul_nonneg (mul_nonneg C_pos.le (norm_nonneg w)) (norm_nonneg w)\n[GOAL]\nV : Type u\ninst✝² : NormedAddCommGroup V\ninst✝¹ : InnerProductSpace ℝ V\ninst✝ : CompleteSpace V\nB : V →L[ℝ] V →L[ℝ] ℝ\nthis : CompleteSpace ↑↑(range (continuousLinearMapOfBilin B))\nv w : V\nmem_w_orthogonal : w ∈ (range (continuousLinearMapOfBilin B))ᗮ\nC : ℝ\nC_pos : 0 < C\ncoercivity : ∀ (u : V), C * ‖u‖ * ‖u‖ ≤ ↑(↑B u) u\n⊢ w = 0\n[PROOFSTEP]\nrw [← norm_eq_zero, ← mul_self_eq_zero, ← mul_right_inj' C_pos.ne', mul_zero, ← mul_assoc]\n[GOAL]\nV : Type u\ninst✝² : NormedAddCommGroup V\ninst✝¹ : InnerProductSpace ℝ V\ninst✝ : CompleteSpace V\nB : V →L[ℝ] V →L[ℝ] ℝ\nthis : CompleteSpace ↑↑(range (continuousLinearMapOfBilin B))\nv w : V\nmem_w_orthogonal : w ∈ (range (continuousLinearMapOfBilin B))ᗮ\nC : ℝ\nC_pos : 0 < C\ncoercivity : ∀ (u : V), C * ‖u‖ * ‖u‖ ≤ ↑(↑B u) u\n⊢ C * ‖w‖ * ‖w‖ = 0\n[PROOFSTEP]\napply le_antisymm\n[GOAL]\ncase a\nV : Type u\ninst✝² : NormedAddCommGroup V\ninst✝¹ : InnerProductSpace ℝ V\ninst✝ : CompleteSpace V\nB : V →L[ℝ] V →L[ℝ] ℝ\nthis : CompleteSpace ↑↑(range (continuousLinearMapOfBilin B))\nv w : V\nmem_w_orthogonal : w ∈ (range (continuousLinearMapOfBilin B))ᗮ\nC : ℝ\nC_pos : 0 < C\ncoercivity : ∀ (u : V), C * ‖u‖ * ‖u‖ ≤ ↑(↑B u) u\n⊢ C * ‖w‖ * ‖w‖ ≤ 0\n[PROOFSTEP]\ncalc\n  C * ‖w‖ * ‖w‖ ≤ B w w := coercivity w\n  _ = ⟪B♯ w, w⟫_ℝ := (continuousLinearMapOfBilin_apply B w w).symm\n  _ = 0 := mem_w_orthogonal _ ⟨w, rfl⟩\n[GOAL]\ncase a\nV : Type u\ninst✝² : NormedAddCommGroup V\ninst✝¹ : InnerProductSpace ℝ V\ninst✝ : CompleteSpace V\nB : V →L[ℝ] V →L[ℝ] ℝ\nthis : CompleteSpace ↑↑(range (continuousLinearMapOfBilin B))\nv w : V\nmem_w_orthogonal : w ∈ (range (continuousLinearMapOfBilin B))ᗮ\nC : ℝ\nC_pos : 0 < C\ncoercivity : ∀ (u : V), C * ‖u‖ * ‖u‖ ≤ ↑(↑B u) u\n⊢ 0 ≤ C * ‖w‖ * ‖w‖\n[PROOFSTEP]\nexact mul_nonneg (mul_nonneg C_pos.le (norm_nonneg w)) (norm_nonneg w)\n[GOAL]\ncase intro.intro\nV : Type u\ninst✝² : NormedAddCommGroup V\ninst✝¹ : InnerProductSpace ℝ V\ninst✝ : CompleteSpace V\nB : V →L[ℝ] V →L[ℝ] ℝ\nthis : CompleteSpace ↑↑(range (continuousLinearMapOfBilin B))\nv : V\nC : ℝ\nC_pos : 0 < C\ncoercivity : ∀ (u : V), C * ‖u‖ * ‖u‖ ≤ ↑(↑B u) u\nmem_w_orthogonal : 0 ∈ (range (continuousLinearMapOfBilin B))ᗮ\n⊢ inner 0 v = 0\n[PROOFSTEP]\nexact inner_zero_left _\n", "meta": {"mathlib_filename": "Mathlib.Analysis.InnerProductSpace.LaxMilgram", "llama_tokens": 5406, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8198933315126792, "lm_q2_score": 0.6548947223065754, "lm_q1q2_score": 0.536943815662009}}
{"text": "[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w : E\nhv : x + v ∈ interior s\nhw : x + v + w ∈ interior s\n⊢ (fun h =>\n      f (x + h • v + h • w) - f (x + h • v) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w -\n        (h ^ 2 / 2) • ↑(↑f'' w) w) =o[𝓝[Ioi 0] 0]\n    fun h => h ^ 2\n[PROOFSTEP]\nrefine'\n  IsLittleO.trans_isBigO (isLittleO_iff.2 fun ε εpos => _)\n    (isBigO_const_mul_self ((‖v‖ + ‖w‖) * ‖w‖) _ _)\n      -- consider a ball of radius `δ` around `x` in which the Taylor approximation for `f''` is\n        -- good up to `δ`.\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w : E\nhv : x + v ∈ interior s\nhw : x + v + w ∈ interior s\nε : ℝ\nεpos : 0 < ε\n⊢ ∀ᶠ (x_1 : ℝ) in 𝓝[Ioi 0] 0,\n    ‖f (x + x_1 • v + x_1 • w) - f (x + x_1 • v) - x_1 • ↑(f' x) w - x_1 ^ 2 • ↑(↑f'' v) w -\n          (x_1 ^ 2 / 2) • ↑(↑f'' w) w‖ ≤\n      ε * ‖(‖v‖ + ‖w‖) * ‖w‖ * x_1 ^ 2‖\n[PROOFSTEP]\nrw [HasFDerivWithinAt, HasFDerivAtFilter, isLittleO_iff] at hx \n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : ∀ ⦃c : ℝ⦄, 0 < c → ∀ᶠ (x_1 : E) in 𝓝[interior s] x, ‖f' x_1 - f' x - ↑f'' (x_1 - x)‖ ≤ c * ‖x_1 - x‖\nv w : E\nhv : x + v ∈ interior s\nhw : x + v + w ∈ interior s\nε : ℝ\nεpos : 0 < ε\n⊢ ∀ᶠ (x_1 : ℝ) in 𝓝[Ioi 0] 0,\n    ‖f (x + x_1 • v + x_1 • w) - f (x + x_1 • v) - x_1 • ↑(f' x) w - x_1 ^ 2 • ↑(↑f'' v) w -\n          (x_1 ^ 2 / 2) • ↑(↑f'' w) w‖ ≤\n      ε * ‖(‖v‖ + ‖w‖) * ‖w‖ * x_1 ^ 2‖\n[PROOFSTEP]\nrcases Metric.mem_nhdsWithin_iff.1 (hx εpos) with ⟨δ, δpos, sδ⟩\n[GOAL]\ncase intro.intro\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : ∀ ⦃c : ℝ⦄, 0 < c → ∀ᶠ (x_1 : E) in 𝓝[interior s] x, ‖f' x_1 - f' x - ↑f'' (x_1 - x)‖ ≤ c * ‖x_1 - x‖\nv w : E\nhv : x + v ∈ interior s\nhw : x + v + w ∈ interior s\nε : ℝ\nεpos : 0 < ε\nδ : ℝ\nδpos : δ > 0\nsδ : Metric.ball x δ ∩ interior s ⊆ {x_1 | (fun x_2 => ‖f' x_2 - f' x - ↑f'' (x_2 - x)‖ ≤ ε * ‖x_2 - x‖) x_1}\n⊢ ∀ᶠ (x_1 : ℝ) in 𝓝[Ioi 0] 0,\n    ‖f (x + x_1 • v + x_1 • w) - f (x + x_1 • v) - x_1 • ↑(f' x) w - x_1 ^ 2 • ↑(↑f'' v) w -\n          (x_1 ^ 2 / 2) • ↑(↑f'' w) w‖ ≤\n      ε * ‖(‖v‖ + ‖w‖) * ‖w‖ * x_1 ^ 2‖\n[PROOFSTEP]\nhave E1 : ∀ᶠ h in 𝓝[>] (0 : ℝ), h * (‖v‖ + ‖w‖) < δ :=\n  by\n  have : Filter.Tendsto (fun h => h * (‖v‖ + ‖w‖)) (𝓝[>] (0 : ℝ)) (𝓝 (0 * (‖v‖ + ‖w‖))) :=\n    (continuous_id.mul continuous_const).continuousWithinAt\n  apply (tendsto_order.1 this).2 δ\n  simpa only [zero_mul] using δpos\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : ∀ ⦃c : ℝ⦄, 0 < c → ∀ᶠ (x_1 : E) in 𝓝[interior s] x, ‖f' x_1 - f' x - ↑f'' (x_1 - x)‖ ≤ c * ‖x_1 - x‖\nv w : E\nhv : x + v ∈ interior s\nhw : x + v + w ∈ interior s\nε : ℝ\nεpos : 0 < ε\nδ : ℝ\nδpos : δ > 0\nsδ : Metric.ball x δ ∩ interior s ⊆ {x_1 | (fun x_2 => ‖f' x_2 - f' x - ↑f'' (x_2 - x)‖ ≤ ε * ‖x_2 - x‖) x_1}\n⊢ ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h * (‖v‖ + ‖w‖) < δ\n[PROOFSTEP]\nhave : Filter.Tendsto (fun h => h * (‖v‖ + ‖w‖)) (𝓝[>] (0 : ℝ)) (𝓝 (0 * (‖v‖ + ‖w‖))) :=\n  (continuous_id.mul continuous_const).continuousWithinAt\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : ∀ ⦃c : ℝ⦄, 0 < c → ∀ᶠ (x_1 : E) in 𝓝[interior s] x, ‖f' x_1 - f' x - ↑f'' (x_1 - x)‖ ≤ c * ‖x_1 - x‖\nv w : E\nhv : x + v ∈ interior s\nhw : x + v + w ∈ interior s\nε : ℝ\nεpos : 0 < ε\nδ : ℝ\nδpos : δ > 0\nsδ : Metric.ball x δ ∩ interior s ⊆ {x_1 | (fun x_2 => ‖f' x_2 - f' x - ↑f'' (x_2 - x)‖ ≤ ε * ‖x_2 - x‖) x_1}\nthis : Filter.Tendsto (fun h => h * (‖v‖ + ‖w‖)) (𝓝[Ioi 0] 0) (𝓝 (0 * (‖v‖ + ‖w‖)))\n⊢ ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h * (‖v‖ + ‖w‖) < δ\n[PROOFSTEP]\napply (tendsto_order.1 this).2 δ\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : ∀ ⦃c : ℝ⦄, 0 < c → ∀ᶠ (x_1 : E) in 𝓝[interior s] x, ‖f' x_1 - f' x - ↑f'' (x_1 - x)‖ ≤ c * ‖x_1 - x‖\nv w : E\nhv : x + v ∈ interior s\nhw : x + v + w ∈ interior s\nε : ℝ\nεpos : 0 < ε\nδ : ℝ\nδpos : δ > 0\nsδ : Metric.ball x δ ∩ interior s ⊆ {x_1 | (fun x_2 => ‖f' x_2 - f' x - ↑f'' (x_2 - x)‖ ≤ ε * ‖x_2 - x‖) x_1}\nthis : Filter.Tendsto (fun h => h * (‖v‖ + ‖w‖)) (𝓝[Ioi 0] 0) (𝓝 (0 * (‖v‖ + ‖w‖)))\n⊢ δ > 0 * (‖v‖ + ‖w‖)\n[PROOFSTEP]\nsimpa only [zero_mul] using δpos\n[GOAL]\ncase intro.intro\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : ∀ ⦃c : ℝ⦄, 0 < c → ∀ᶠ (x_1 : E) in 𝓝[interior s] x, ‖f' x_1 - f' x - ↑f'' (x_1 - x)‖ ≤ c * ‖x_1 - x‖\nv w : E\nhv : x + v ∈ interior s\nhw : x + v + w ∈ interior s\nε : ℝ\nεpos : 0 < ε\nδ : ℝ\nδpos : δ > 0\nsδ : Metric.ball x δ ∩ interior s ⊆ {x_1 | (fun x_2 => ‖f' x_2 - f' x - ↑f'' (x_2 - x)‖ ≤ ε * ‖x_2 - x‖) x_1}\nE1 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h * (‖v‖ + ‖w‖) < δ\n⊢ ∀ᶠ (x_1 : ℝ) in 𝓝[Ioi 0] 0,\n    ‖f (x + x_1 • v + x_1 • w) - f (x + x_1 • v) - x_1 • ↑(f' x) w - x_1 ^ 2 • ↑(↑f'' v) w -\n          (x_1 ^ 2 / 2) • ↑(↑f'' w) w‖ ≤\n      ε * ‖(‖v‖ + ‖w‖) * ‖w‖ * x_1 ^ 2‖\n[PROOFSTEP]\nhave E2 : ∀ᶠ h in 𝓝[>] (0 : ℝ), (h : ℝ) < 1 :=\n  mem_nhdsWithin_Ioi_iff_exists_Ioo_subset.2 ⟨(1 : ℝ), by simp only [mem_Ioi, zero_lt_one], fun x hx => hx.2⟩\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : ∀ ⦃c : ℝ⦄, 0 < c → ∀ᶠ (x_1 : E) in 𝓝[interior s] x, ‖f' x_1 - f' x - ↑f'' (x_1 - x)‖ ≤ c * ‖x_1 - x‖\nv w : E\nhv : x + v ∈ interior s\nhw : x + v + w ∈ interior s\nε : ℝ\nεpos : 0 < ε\nδ : ℝ\nδpos : δ > 0\nsδ : Metric.ball x δ ∩ interior s ⊆ {x_1 | (fun x_2 => ‖f' x_2 - f' x - ↑f'' (x_2 - x)‖ ≤ ε * ‖x_2 - x‖) x_1}\nE1 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h * (‖v‖ + ‖w‖) < δ\n⊢ 1 ∈ Ioi 0\n[PROOFSTEP]\nsimp only [mem_Ioi, zero_lt_one]\n[GOAL]\ncase intro.intro\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : ∀ ⦃c : ℝ⦄, 0 < c → ∀ᶠ (x_1 : E) in 𝓝[interior s] x, ‖f' x_1 - f' x - ↑f'' (x_1 - x)‖ ≤ c * ‖x_1 - x‖\nv w : E\nhv : x + v ∈ interior s\nhw : x + v + w ∈ interior s\nε : ℝ\nεpos : 0 < ε\nδ : ℝ\nδpos : δ > 0\nsδ : Metric.ball x δ ∩ interior s ⊆ {x_1 | (fun x_2 => ‖f' x_2 - f' x - ↑f'' (x_2 - x)‖ ≤ ε * ‖x_2 - x‖) x_1}\nE1 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h * (‖v‖ + ‖w‖) < δ\nE2 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h < 1\n⊢ ∀ᶠ (x_1 : ℝ) in 𝓝[Ioi 0] 0,\n    ‖f (x + x_1 • v + x_1 • w) - f (x + x_1 • v) - x_1 • ↑(f' x) w - x_1 ^ 2 • ↑(↑f'' v) w -\n          (x_1 ^ 2 / 2) • ↑(↑f'' w) w‖ ≤\n      ε * ‖(‖v‖ + ‖w‖) * ‖w‖ * x_1 ^ 2‖\n[PROOFSTEP]\nfilter_upwards [E1, E2, self_mem_nhdsWithin] with h hδ h_lt_1 hpos\n[GOAL]\ncase h\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : ∀ ⦃c : ℝ⦄, 0 < c → ∀ᶠ (x_1 : E) in 𝓝[interior s] x, ‖f' x_1 - f' x - ↑f'' (x_1 - x)‖ ≤ c * ‖x_1 - x‖\nv w : E\nhv : x + v ∈ interior s\nhw : x + v + w ∈ interior s\nε : ℝ\nεpos : 0 < ε\nδ : ℝ\nδpos : δ > 0\nsδ : Metric.ball x δ ∩ interior s ⊆ {x_1 | (fun x_2 => ‖f' x_2 - f' x - ↑f'' (x_2 - x)‖ ≤ ε * ‖x_2 - x‖) x_1}\nE1 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h * (‖v‖ + ‖w‖) < δ\nE2 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h < 1\nh : ℝ\nhδ : h * (‖v‖ + ‖w‖) < δ\nh_lt_1 : h < 1\nhpos : h ∈ Ioi 0\n⊢ ‖f (x + h • v + h • w) - f (x + h • v) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (h ^ 2 / 2) • ↑(↑f'' w) w‖ ≤\n    ε * ‖(‖v‖ + ‖w‖) * ‖w‖ * h ^ 2‖\n[PROOFSTEP]\nreplace hpos : 0 < h := hpos\n[GOAL]\ncase h\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : ∀ ⦃c : ℝ⦄, 0 < c → ∀ᶠ (x_1 : E) in 𝓝[interior s] x, ‖f' x_1 - f' x - ↑f'' (x_1 - x)‖ ≤ c * ‖x_1 - x‖\nv w : E\nhv : x + v ∈ interior s\nhw : x + v + w ∈ interior s\nε : ℝ\nεpos : 0 < ε\nδ : ℝ\nδpos : δ > 0\nsδ : Metric.ball x δ ∩ interior s ⊆ {x_1 | (fun x_2 => ‖f' x_2 - f' x - ↑f'' (x_2 - x)‖ ≤ ε * ‖x_2 - x‖) x_1}\nE1 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h * (‖v‖ + ‖w‖) < δ\nE2 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h < 1\nh : ℝ\nhδ : h * (‖v‖ + ‖w‖) < δ\nh_lt_1 : h < 1\nhpos : 0 < h\n⊢ ‖f (x + h • v + h • w) - f (x + h • v) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (h ^ 2 / 2) • ↑(↑f'' w) w‖ ≤\n    ε * ‖(‖v‖ + ‖w‖) * ‖w‖ * h ^ 2‖\n[PROOFSTEP]\nhave xt_mem : ∀ t ∈ Icc (0 : ℝ) 1, x + h • v + (t * h) • w ∈ interior s :=\n  by\n  intro t ht\n  have : x + h • v ∈ interior s := s_conv.add_smul_mem_interior xs hv ⟨hpos, h_lt_1.le⟩\n  rw [← smul_smul]\n  apply s_conv.interior.add_smul_mem this _ ht\n  rw [add_assoc] at hw \n  rw [add_assoc, ← smul_add]\n  exact\n    s_conv.add_smul_mem_interior xs hw\n      ⟨hpos, h_lt_1.le⟩\n        -- define a function `g` on `[0,1]` (identified with `[v, v + w]`) such that `g 1 - g 0` is the\n          -- quantity to be estimated. We will check that its derivative is given by an explicit\n          -- expression `g'`, that we can bound. Then the desired bound for `g 1 - g 0` follows from the\n          -- mean value inequality.\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : ∀ ⦃c : ℝ⦄, 0 < c → ∀ᶠ (x_1 : E) in 𝓝[interior s] x, ‖f' x_1 - f' x - ↑f'' (x_1 - x)‖ ≤ c * ‖x_1 - x‖\nv w : E\nhv : x + v ∈ interior s\nhw : x + v + w ∈ interior s\nε : ℝ\nεpos : 0 < ε\nδ : ℝ\nδpos : δ > 0\nsδ : Metric.ball x δ ∩ interior s ⊆ {x_1 | (fun x_2 => ‖f' x_2 - f' x - ↑f'' (x_2 - x)‖ ≤ ε * ‖x_2 - x‖) x_1}\nE1 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h * (‖v‖ + ‖w‖) < δ\nE2 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h < 1\nh : ℝ\nhδ : h * (‖v‖ + ‖w‖) < δ\nh_lt_1 : h < 1\nhpos : 0 < h\n⊢ ∀ (t : ℝ), t ∈ Icc 0 1 → x + h • v + (t * h) • w ∈ interior s\n[PROOFSTEP]\nintro t ht\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : ∀ ⦃c : ℝ⦄, 0 < c → ∀ᶠ (x_1 : E) in 𝓝[interior s] x, ‖f' x_1 - f' x - ↑f'' (x_1 - x)‖ ≤ c * ‖x_1 - x‖\nv w : E\nhv : x + v ∈ interior s\nhw : x + v + w ∈ interior s\nε : ℝ\nεpos : 0 < ε\nδ : ℝ\nδpos : δ > 0\nsδ : Metric.ball x δ ∩ interior s ⊆ {x_1 | (fun x_2 => ‖f' x_2 - f' x - ↑f'' (x_2 - x)‖ ≤ ε * ‖x_2 - x‖) x_1}\nE1 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h * (‖v‖ + ‖w‖) < δ\nE2 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h < 1\nh : ℝ\nhδ : h * (‖v‖ + ‖w‖) < δ\nh_lt_1 : h < 1\nhpos : 0 < h\nt : ℝ\nht : t ∈ Icc 0 1\n⊢ x + h • v + (t * h) • w ∈ interior s\n[PROOFSTEP]\nhave : x + h • v ∈ interior s := s_conv.add_smul_mem_interior xs hv ⟨hpos, h_lt_1.le⟩\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : ∀ ⦃c : ℝ⦄, 0 < c → ∀ᶠ (x_1 : E) in 𝓝[interior s] x, ‖f' x_1 - f' x - ↑f'' (x_1 - x)‖ ≤ c * ‖x_1 - x‖\nv w : E\nhv : x + v ∈ interior s\nhw : x + v + w ∈ interior s\nε : ℝ\nεpos : 0 < ε\nδ : ℝ\nδpos : δ > 0\nsδ : Metric.ball x δ ∩ interior s ⊆ {x_1 | (fun x_2 => ‖f' x_2 - f' x - ↑f'' (x_2 - x)‖ ≤ ε * ‖x_2 - x‖) x_1}\nE1 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h * (‖v‖ + ‖w‖) < δ\nE2 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h < 1\nh : ℝ\nhδ : h * (‖v‖ + ‖w‖) < δ\nh_lt_1 : h < 1\nhpos : 0 < h\nt : ℝ\nht : t ∈ Icc 0 1\nthis : x + h • v ∈ interior s\n⊢ x + h • v + (t * h) • w ∈ interior s\n[PROOFSTEP]\nrw [← smul_smul]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : ∀ ⦃c : ℝ⦄, 0 < c → ∀ᶠ (x_1 : E) in 𝓝[interior s] x, ‖f' x_1 - f' x - ↑f'' (x_1 - x)‖ ≤ c * ‖x_1 - x‖\nv w : E\nhv : x + v ∈ interior s\nhw : x + v + w ∈ interior s\nε : ℝ\nεpos : 0 < ε\nδ : ℝ\nδpos : δ > 0\nsδ : Metric.ball x δ ∩ interior s ⊆ {x_1 | (fun x_2 => ‖f' x_2 - f' x - ↑f'' (x_2 - x)‖ ≤ ε * ‖x_2 - x‖) x_1}\nE1 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h * (‖v‖ + ‖w‖) < δ\nE2 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h < 1\nh : ℝ\nhδ : h * (‖v‖ + ‖w‖) < δ\nh_lt_1 : h < 1\nhpos : 0 < h\nt : ℝ\nht : t ∈ Icc 0 1\nthis : x + h • v ∈ interior s\n⊢ x + h • v + t • h • w ∈ interior s\n[PROOFSTEP]\napply s_conv.interior.add_smul_mem this _ ht\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : ∀ ⦃c : ℝ⦄, 0 < c → ∀ᶠ (x_1 : E) in 𝓝[interior s] x, ‖f' x_1 - f' x - ↑f'' (x_1 - x)‖ ≤ c * ‖x_1 - x‖\nv w : E\nhv : x + v ∈ interior s\nhw : x + v + w ∈ interior s\nε : ℝ\nεpos : 0 < ε\nδ : ℝ\nδpos : δ > 0\nsδ : Metric.ball x δ ∩ interior s ⊆ {x_1 | (fun x_2 => ‖f' x_2 - f' x - ↑f'' (x_2 - x)‖ ≤ ε * ‖x_2 - x‖) x_1}\nE1 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h * (‖v‖ + ‖w‖) < δ\nE2 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h < 1\nh : ℝ\nhδ : h * (‖v‖ + ‖w‖) < δ\nh_lt_1 : h < 1\nhpos : 0 < h\nt : ℝ\nht : t ∈ Icc 0 1\nthis : x + h • v ∈ interior s\n⊢ x + h • v + h • w ∈ interior s\n[PROOFSTEP]\nrw [add_assoc] at hw \n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : ∀ ⦃c : ℝ⦄, 0 < c → ∀ᶠ (x_1 : E) in 𝓝[interior s] x, ‖f' x_1 - f' x - ↑f'' (x_1 - x)‖ ≤ c * ‖x_1 - x‖\nv w : E\nhv : x + v ∈ interior s\nhw : x + (v + w) ∈ interior s\nε : ℝ\nεpos : 0 < ε\nδ : ℝ\nδpos : δ > 0\nsδ : Metric.ball x δ ∩ interior s ⊆ {x_1 | (fun x_2 => ‖f' x_2 - f' x - ↑f'' (x_2 - x)‖ ≤ ε * ‖x_2 - x‖) x_1}\nE1 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h * (‖v‖ + ‖w‖) < δ\nE2 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h < 1\nh : ℝ\nhδ : h * (‖v‖ + ‖w‖) < δ\nh_lt_1 : h < 1\nhpos : 0 < h\nt : ℝ\nht : t ∈ Icc 0 1\nthis : x + h • v ∈ interior s\n⊢ x + h • v + h • w ∈ interior s\n[PROOFSTEP]\nrw [add_assoc, ← smul_add]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : ∀ ⦃c : ℝ⦄, 0 < c → ∀ᶠ (x_1 : E) in 𝓝[interior s] x, ‖f' x_1 - f' x - ↑f'' (x_1 - x)‖ ≤ c * ‖x_1 - x‖\nv w : E\nhv : x + v ∈ interior s\nhw : x + (v + w) ∈ interior s\nε : ℝ\nεpos : 0 < ε\nδ : ℝ\nδpos : δ > 0\nsδ : Metric.ball x δ ∩ interior s ⊆ {x_1 | (fun x_2 => ‖f' x_2 - f' x - ↑f'' (x_2 - x)‖ ≤ ε * ‖x_2 - x‖) x_1}\nE1 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h * (‖v‖ + ‖w‖) < δ\nE2 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h < 1\nh : ℝ\nhδ : h * (‖v‖ + ‖w‖) < δ\nh_lt_1 : h < 1\nhpos : 0 < h\nt : ℝ\nht : t ∈ Icc 0 1\nthis : x + h • v ∈ interior s\n⊢ x + h • (v + w) ∈ interior s\n[PROOFSTEP]\nexact\n  s_conv.add_smul_mem_interior xs hw\n    ⟨hpos, h_lt_1.le⟩\n      -- define a function `g` on `[0,1]` (identified with `[v, v + w]`) such that `g 1 - g 0` is the\n        -- quantity to be estimated. We will check that its derivative is given by an explicit\n        -- expression `g'`, that we can bound. Then the desired bound for `g 1 - g 0` follows from the\n        -- mean value inequality.\n[GOAL]\ncase h\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : ∀ ⦃c : ℝ⦄, 0 < c → ∀ᶠ (x_1 : E) in 𝓝[interior s] x, ‖f' x_1 - f' x - ↑f'' (x_1 - x)‖ ≤ c * ‖x_1 - x‖\nv w : E\nhv : x + v ∈ interior s\nhw : x + v + w ∈ interior s\nε : ℝ\nεpos : 0 < ε\nδ : ℝ\nδpos : δ > 0\nsδ : Metric.ball x δ ∩ interior s ⊆ {x_1 | (fun x_2 => ‖f' x_2 - f' x - ↑f'' (x_2 - x)‖ ≤ ε * ‖x_2 - x‖) x_1}\nE1 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h * (‖v‖ + ‖w‖) < δ\nE2 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h < 1\nh : ℝ\nhδ : h * (‖v‖ + ‖w‖) < δ\nh_lt_1 : h < 1\nhpos : 0 < h\nxt_mem : ∀ (t : ℝ), t ∈ Icc 0 1 → x + h • v + (t * h) • w ∈ interior s\n⊢ ‖f (x + h • v + h • w) - f (x + h • v) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (h ^ 2 / 2) • ↑(↑f'' w) w‖ ≤\n    ε * ‖(‖v‖ + ‖w‖) * ‖w‖ * h ^ 2‖\n[PROOFSTEP]\nlet g t := f (x + h • v + (t * h) • w) - (t * h) • f' x w - (t * h ^ 2) • f'' v w - ((t * h) ^ 2 / 2) • f'' w w\n[GOAL]\ncase h\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : ∀ ⦃c : ℝ⦄, 0 < c → ∀ᶠ (x_1 : E) in 𝓝[interior s] x, ‖f' x_1 - f' x - ↑f'' (x_1 - x)‖ ≤ c * ‖x_1 - x‖\nv w : E\nhv : x + v ∈ interior s\nhw : x + v + w ∈ interior s\nε : ℝ\nεpos : 0 < ε\nδ : ℝ\nδpos : δ > 0\nsδ : Metric.ball x δ ∩ interior s ⊆ {x_1 | (fun x_2 => ‖f' x_2 - f' x - ↑f'' (x_2 - x)‖ ≤ ε * ‖x_2 - x‖) x_1}\nE1 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h * (‖v‖ + ‖w‖) < δ\nE2 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h < 1\nh : ℝ\nhδ : h * (‖v‖ + ‖w‖) < δ\nh_lt_1 : h < 1\nhpos : 0 < h\nxt_mem : ∀ (t : ℝ), t ∈ Icc 0 1 → x + h • v + (t * h) • w ∈ interior s\ng : ℝ → F :=\n  fun t =>\n    f (x + h • v + (t * h) • w) - (t * h) • ↑(f' x) w - (t * h ^ 2) • ↑(↑f'' v) w - ((t * h) ^ 2 / 2) • ↑(↑f'' w) w\n⊢ ‖f (x + h • v + h • w) - f (x + h • v) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (h ^ 2 / 2) • ↑(↑f'' w) w‖ ≤\n    ε * ‖(‖v‖ + ‖w‖) * ‖w‖ * h ^ 2‖\n[PROOFSTEP]\nset g' := fun t => f' (x + h • v + (t * h) • w) (h • w) - h • f' x w - h ^ 2 • f'' v w - (t * h ^ 2) • f'' w w with hg'\n[GOAL]\ncase h\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : ∀ ⦃c : ℝ⦄, 0 < c → ∀ᶠ (x_1 : E) in 𝓝[interior s] x, ‖f' x_1 - f' x - ↑f'' (x_1 - x)‖ ≤ c * ‖x_1 - x‖\nv w : E\nhv : x + v ∈ interior s\nhw : x + v + w ∈ interior s\nε : ℝ\nεpos : 0 < ε\nδ : ℝ\nδpos : δ > 0\nsδ : Metric.ball x δ ∩ interior s ⊆ {x_1 | (fun x_2 => ‖f' x_2 - f' x - ↑f'' (x_2 - x)‖ ≤ ε * ‖x_2 - x‖) x_1}\nE1 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h * (‖v‖ + ‖w‖) < δ\nE2 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h < 1\nh : ℝ\nhδ : h * (‖v‖ + ‖w‖) < δ\nh_lt_1 : h < 1\nhpos : 0 < h\nxt_mem : ∀ (t : ℝ), t ∈ Icc 0 1 → x + h • v + (t * h) • w ∈ interior s\ng : ℝ → F :=\n  fun t =>\n    f (x + h • v + (t * h) • w) - (t * h) • ↑(f' x) w - (t * h ^ 2) • ↑(↑f'' v) w - ((t * h) ^ 2 / 2) • ↑(↑f'' w) w\ng' : ℝ → (fun x => F) (h • w) :=\n  fun t => ↑(f' (x + h • v + (t * h) • w)) (h • w) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (t * h ^ 2) • ↑(↑f'' w) w\nhg' :\n  g' = fun t =>\n    ↑(f' (x + h • v + (t * h) • w)) (h • w) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (t * h ^ 2) • ↑(↑f'' w) w\n⊢ ‖f (x + h • v + h • w) - f (x + h • v) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (h ^ 2 / 2) • ↑(↑f'' w) w‖ ≤\n    ε * ‖(‖v‖ + ‖w‖) * ‖w‖ * h ^ 2‖\n[PROOFSTEP]\nhave g_deriv : ∀ t ∈ Icc (0 : ℝ) 1, HasDerivWithinAt g (g' t) (Icc 0 1) t :=\n  by\n  intro t ht\n  apply_rules [HasDerivWithinAt.sub, HasDerivWithinAt.add]\n  · refine' (hf _ _).comp_hasDerivWithinAt _ _\n    · exact xt_mem t ht\n    apply_rules [HasDerivAt.hasDerivWithinAt, HasDerivAt.const_add, HasDerivAt.smul_const, hasDerivAt_mul_const]\n  · apply_rules [HasDerivAt.hasDerivWithinAt, HasDerivAt.smul_const, hasDerivAt_mul_const]\n  · apply_rules [HasDerivAt.hasDerivWithinAt, HasDerivAt.smul_const, hasDerivAt_mul_const]\n  · suffices H :\n      HasDerivWithinAt (fun u => ((u * h) ^ 2 / 2) • f'' w w)\n        ((((2 : ℕ) : ℝ) * (t * h) ^ (2 - 1) * (1 * h) / 2) • f'' w w) (Icc 0 1) t\n    · convert H using 2\n      ring\n    apply_rules [HasDerivAt.hasDerivWithinAt, HasDerivAt.smul_const, hasDerivAt_id', HasDerivAt.pow,\n      HasDerivAt.mul_const]\n      -- check that `g'` is uniformly bounded, with a suitable bound `ε * ((‖v‖ + ‖w‖) * ‖w‖) * h^2`.\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : ∀ ⦃c : ℝ⦄, 0 < c → ∀ᶠ (x_1 : E) in 𝓝[interior s] x, ‖f' x_1 - f' x - ↑f'' (x_1 - x)‖ ≤ c * ‖x_1 - x‖\nv w : E\nhv : x + v ∈ interior s\nhw : x + v + w ∈ interior s\nε : ℝ\nεpos : 0 < ε\nδ : ℝ\nδpos : δ > 0\nsδ : Metric.ball x δ ∩ interior s ⊆ {x_1 | (fun x_2 => ‖f' x_2 - f' x - ↑f'' (x_2 - x)‖ ≤ ε * ‖x_2 - x‖) x_1}\nE1 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h * (‖v‖ + ‖w‖) < δ\nE2 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h < 1\nh : ℝ\nhδ : h * (‖v‖ + ‖w‖) < δ\nh_lt_1 : h < 1\nhpos : 0 < h\nxt_mem : ∀ (t : ℝ), t ∈ Icc 0 1 → x + h • v + (t * h) • w ∈ interior s\ng : ℝ → F :=\n  fun t =>\n    f (x + h • v + (t * h) • w) - (t * h) • ↑(f' x) w - (t * h ^ 2) • ↑(↑f'' v) w - ((t * h) ^ 2 / 2) • ↑(↑f'' w) w\ng' : ℝ → (fun x => F) (h • w) :=\n  fun t => ↑(f' (x + h • v + (t * h) • w)) (h • w) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (t * h ^ 2) • ↑(↑f'' w) w\nhg' :\n  g' = fun t =>\n    ↑(f' (x + h • v + (t * h) • w)) (h • w) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (t * h ^ 2) • ↑(↑f'' w) w\n⊢ ∀ (t : ℝ), t ∈ Icc 0 1 → HasDerivWithinAt g (g' t) (Icc 0 1) t\n[PROOFSTEP]\nintro t ht\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : ∀ ⦃c : ℝ⦄, 0 < c → ∀ᶠ (x_1 : E) in 𝓝[interior s] x, ‖f' x_1 - f' x - ↑f'' (x_1 - x)‖ ≤ c * ‖x_1 - x‖\nv w : E\nhv : x + v ∈ interior s\nhw : x + v + w ∈ interior s\nε : ℝ\nεpos : 0 < ε\nδ : ℝ\nδpos : δ > 0\nsδ : Metric.ball x δ ∩ interior s ⊆ {x_1 | (fun x_2 => ‖f' x_2 - f' x - ↑f'' (x_2 - x)‖ ≤ ε * ‖x_2 - x‖) x_1}\nE1 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h * (‖v‖ + ‖w‖) < δ\nE2 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h < 1\nh : ℝ\nhδ : h * (‖v‖ + ‖w‖) < δ\nh_lt_1 : h < 1\nhpos : 0 < h\nxt_mem : ∀ (t : ℝ), t ∈ Icc 0 1 → x + h • v + (t * h) • w ∈ interior s\ng : ℝ → F :=\n  fun t =>\n    f (x + h • v + (t * h) • w) - (t * h) • ↑(f' x) w - (t * h ^ 2) • ↑(↑f'' v) w - ((t * h) ^ 2 / 2) • ↑(↑f'' w) w\ng' : ℝ → (fun x => F) (h • w) :=\n  fun t => ↑(f' (x + h • v + (t * h) • w)) (h • w) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (t * h ^ 2) • ↑(↑f'' w) w\nhg' :\n  g' = fun t =>\n    ↑(f' (x + h • v + (t * h) • w)) (h • w) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (t * h ^ 2) • ↑(↑f'' w) w\nt : ℝ\nht : t ∈ Icc 0 1\n⊢ HasDerivWithinAt g (g' t) (Icc 0 1) t\n[PROOFSTEP]\napply_rules [HasDerivWithinAt.sub, HasDerivWithinAt.add]\n[GOAL]\ncase hf.hf.hf\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : ∀ ⦃c : ℝ⦄, 0 < c → ∀ᶠ (x_1 : E) in 𝓝[interior s] x, ‖f' x_1 - f' x - ↑f'' (x_1 - x)‖ ≤ c * ‖x_1 - x‖\nv w : E\nhv : x + v ∈ interior s\nhw : x + v + w ∈ interior s\nε : ℝ\nεpos : 0 < ε\nδ : ℝ\nδpos : δ > 0\nsδ : Metric.ball x δ ∩ interior s ⊆ {x_1 | (fun x_2 => ‖f' x_2 - f' x - ↑f'' (x_2 - x)‖ ≤ ε * ‖x_2 - x‖) x_1}\nE1 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h * (‖v‖ + ‖w‖) < δ\nE2 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h < 1\nh : ℝ\nhδ : h * (‖v‖ + ‖w‖) < δ\nh_lt_1 : h < 1\nhpos : 0 < h\nxt_mem : ∀ (t : ℝ), t ∈ Icc 0 1 → x + h • v + (t * h) • w ∈ interior s\ng : ℝ → F :=\n  fun t =>\n    f (x + h • v + (t * h) • w) - (t * h) • ↑(f' x) w - (t * h ^ 2) • ↑(↑f'' v) w - ((t * h) ^ 2 / 2) • ↑(↑f'' w) w\ng' : ℝ → (fun x => F) (h • w) :=\n  fun t => ↑(f' (x + h • v + (t * h) • w)) (h • w) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (t * h ^ 2) • ↑(↑f'' w) w\nhg' :\n  g' = fun t =>\n    ↑(f' (x + h • v + (t * h) • w)) (h • w) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (t * h ^ 2) • ↑(↑f'' w) w\nt : ℝ\nht : t ∈ Icc 0 1\n⊢ HasDerivWithinAt (fun x_1 => f (x + h • v + (x_1 * h) • w)) (↑(f' (x + h • v + (t * h) • w)) (h • w)) (Icc 0 1) t\n[PROOFSTEP]\nrefine' (hf _ _).comp_hasDerivWithinAt _ _\n[GOAL]\ncase hf.hf.hf.refine'_1\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : ∀ ⦃c : ℝ⦄, 0 < c → ∀ᶠ (x_1 : E) in 𝓝[interior s] x, ‖f' x_1 - f' x - ↑f'' (x_1 - x)‖ ≤ c * ‖x_1 - x‖\nv w : E\nhv : x + v ∈ interior s\nhw : x + v + w ∈ interior s\nε : ℝ\nεpos : 0 < ε\nδ : ℝ\nδpos : δ > 0\nsδ : Metric.ball x δ ∩ interior s ⊆ {x_1 | (fun x_2 => ‖f' x_2 - f' x - ↑f'' (x_2 - x)‖ ≤ ε * ‖x_2 - x‖) x_1}\nE1 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h * (‖v‖ + ‖w‖) < δ\nE2 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h < 1\nh : ℝ\nhδ : h * (‖v‖ + ‖w‖) < δ\nh_lt_1 : h < 1\nhpos : 0 < h\nxt_mem : ∀ (t : ℝ), t ∈ Icc 0 1 → x + h • v + (t * h) • w ∈ interior s\ng : ℝ → F :=\n  fun t =>\n    f (x + h • v + (t * h) • w) - (t * h) • ↑(f' x) w - (t * h ^ 2) • ↑(↑f'' v) w - ((t * h) ^ 2 / 2) • ↑(↑f'' w) w\ng' : ℝ → (fun x => F) (h • w) :=\n  fun t => ↑(f' (x + h • v + (t * h) • w)) (h • w) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (t * h ^ 2) • ↑(↑f'' w) w\nhg' :\n  g' = fun t =>\n    ↑(f' (x + h • v + (t * h) • w)) (h • w) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (t * h ^ 2) • ↑(↑f'' w) w\nt : ℝ\nht : t ∈ Icc 0 1\n⊢ x + h • v + (t * h) • w ∈ interior s\n[PROOFSTEP]\nexact xt_mem t ht\n[GOAL]\ncase hf.hf.hf.refine'_2\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : ∀ ⦃c : ℝ⦄, 0 < c → ∀ᶠ (x_1 : E) in 𝓝[interior s] x, ‖f' x_1 - f' x - ↑f'' (x_1 - x)‖ ≤ c * ‖x_1 - x‖\nv w : E\nhv : x + v ∈ interior s\nhw : x + v + w ∈ interior s\nε : ℝ\nεpos : 0 < ε\nδ : ℝ\nδpos : δ > 0\nsδ : Metric.ball x δ ∩ interior s ⊆ {x_1 | (fun x_2 => ‖f' x_2 - f' x - ↑f'' (x_2 - x)‖ ≤ ε * ‖x_2 - x‖) x_1}\nE1 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h * (‖v‖ + ‖w‖) < δ\nE2 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h < 1\nh : ℝ\nhδ : h * (‖v‖ + ‖w‖) < δ\nh_lt_1 : h < 1\nhpos : 0 < h\nxt_mem : ∀ (t : ℝ), t ∈ Icc 0 1 → x + h • v + (t * h) • w ∈ interior s\ng : ℝ → F :=\n  fun t =>\n    f (x + h • v + (t * h) • w) - (t * h) • ↑(f' x) w - (t * h ^ 2) • ↑(↑f'' v) w - ((t * h) ^ 2 / 2) • ↑(↑f'' w) w\ng' : ℝ → (fun x => F) (h • w) :=\n  fun t => ↑(f' (x + h • v + (t * h) • w)) (h • w) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (t * h ^ 2) • ↑(↑f'' w) w\nhg' :\n  g' = fun t =>\n    ↑(f' (x + h • v + (t * h) • w)) (h • w) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (t * h ^ 2) • ↑(↑f'' w) w\nt : ℝ\nht : t ∈ Icc 0 1\n⊢ HasDerivWithinAt (fun x_1 => x + h • v + (x_1 * h) • w) (h • w) (Icc 0 1) t\n[PROOFSTEP]\napply_rules [HasDerivAt.hasDerivWithinAt, HasDerivAt.const_add, HasDerivAt.smul_const, hasDerivAt_mul_const]\n[GOAL]\ncase hf.hf.hg\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : ∀ ⦃c : ℝ⦄, 0 < c → ∀ᶠ (x_1 : E) in 𝓝[interior s] x, ‖f' x_1 - f' x - ↑f'' (x_1 - x)‖ ≤ c * ‖x_1 - x‖\nv w : E\nhv : x + v ∈ interior s\nhw : x + v + w ∈ interior s\nε : ℝ\nεpos : 0 < ε\nδ : ℝ\nδpos : δ > 0\nsδ : Metric.ball x δ ∩ interior s ⊆ {x_1 | (fun x_2 => ‖f' x_2 - f' x - ↑f'' (x_2 - x)‖ ≤ ε * ‖x_2 - x‖) x_1}\nE1 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h * (‖v‖ + ‖w‖) < δ\nE2 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h < 1\nh : ℝ\nhδ : h * (‖v‖ + ‖w‖) < δ\nh_lt_1 : h < 1\nhpos : 0 < h\nxt_mem : ∀ (t : ℝ), t ∈ Icc 0 1 → x + h • v + (t * h) • w ∈ interior s\ng : ℝ → F :=\n  fun t =>\n    f (x + h • v + (t * h) • w) - (t * h) • ↑(f' x) w - (t * h ^ 2) • ↑(↑f'' v) w - ((t * h) ^ 2 / 2) • ↑(↑f'' w) w\ng' : ℝ → (fun x => F) (h • w) :=\n  fun t => ↑(f' (x + h • v + (t * h) • w)) (h • w) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (t * h ^ 2) • ↑(↑f'' w) w\nhg' :\n  g' = fun t =>\n    ↑(f' (x + h • v + (t * h) • w)) (h • w) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (t * h ^ 2) • ↑(↑f'' w) w\nt : ℝ\nht : t ∈ Icc 0 1\n⊢ HasDerivWithinAt (fun x_1 => (x_1 * h) • ↑(f' x) w) (h • ↑(f' x) w) (Icc 0 1) t\n[PROOFSTEP]\napply_rules [HasDerivAt.hasDerivWithinAt, HasDerivAt.smul_const, hasDerivAt_mul_const]\n[GOAL]\ncase hf.hg\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : ∀ ⦃c : ℝ⦄, 0 < c → ∀ᶠ (x_1 : E) in 𝓝[interior s] x, ‖f' x_1 - f' x - ↑f'' (x_1 - x)‖ ≤ c * ‖x_1 - x‖\nv w : E\nhv : x + v ∈ interior s\nhw : x + v + w ∈ interior s\nε : ℝ\nεpos : 0 < ε\nδ : ℝ\nδpos : δ > 0\nsδ : Metric.ball x δ ∩ interior s ⊆ {x_1 | (fun x_2 => ‖f' x_2 - f' x - ↑f'' (x_2 - x)‖ ≤ ε * ‖x_2 - x‖) x_1}\nE1 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h * (‖v‖ + ‖w‖) < δ\nE2 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h < 1\nh : ℝ\nhδ : h * (‖v‖ + ‖w‖) < δ\nh_lt_1 : h < 1\nhpos : 0 < h\nxt_mem : ∀ (t : ℝ), t ∈ Icc 0 1 → x + h • v + (t * h) • w ∈ interior s\ng : ℝ → F :=\n  fun t =>\n    f (x + h • v + (t * h) • w) - (t * h) • ↑(f' x) w - (t * h ^ 2) • ↑(↑f'' v) w - ((t * h) ^ 2 / 2) • ↑(↑f'' w) w\ng' : ℝ → (fun x => F) (h • w) :=\n  fun t => ↑(f' (x + h • v + (t * h) • w)) (h • w) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (t * h ^ 2) • ↑(↑f'' w) w\nhg' :\n  g' = fun t =>\n    ↑(f' (x + h • v + (t * h) • w)) (h • w) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (t * h ^ 2) • ↑(↑f'' w) w\nt : ℝ\nht : t ∈ Icc 0 1\n⊢ HasDerivWithinAt (fun x => (x * h ^ 2) • ↑(↑f'' v) w) (h ^ 2 • ↑(↑f'' v) w) (Icc 0 1) t\n[PROOFSTEP]\napply_rules [HasDerivAt.hasDerivWithinAt, HasDerivAt.smul_const, hasDerivAt_mul_const]\n[GOAL]\ncase hg\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : ∀ ⦃c : ℝ⦄, 0 < c → ∀ᶠ (x_1 : E) in 𝓝[interior s] x, ‖f' x_1 - f' x - ↑f'' (x_1 - x)‖ ≤ c * ‖x_1 - x‖\nv w : E\nhv : x + v ∈ interior s\nhw : x + v + w ∈ interior s\nε : ℝ\nεpos : 0 < ε\nδ : ℝ\nδpos : δ > 0\nsδ : Metric.ball x δ ∩ interior s ⊆ {x_1 | (fun x_2 => ‖f' x_2 - f' x - ↑f'' (x_2 - x)‖ ≤ ε * ‖x_2 - x‖) x_1}\nE1 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h * (‖v‖ + ‖w‖) < δ\nE2 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h < 1\nh : ℝ\nhδ : h * (‖v‖ + ‖w‖) < δ\nh_lt_1 : h < 1\nhpos : 0 < h\nxt_mem : ∀ (t : ℝ), t ∈ Icc 0 1 → x + h • v + (t * h) • w ∈ interior s\ng : ℝ → F :=\n  fun t =>\n    f (x + h • v + (t * h) • w) - (t * h) • ↑(f' x) w - (t * h ^ 2) • ↑(↑f'' v) w - ((t * h) ^ 2 / 2) • ↑(↑f'' w) w\ng' : ℝ → (fun x => F) (h • w) :=\n  fun t => ↑(f' (x + h • v + (t * h) • w)) (h • w) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (t * h ^ 2) • ↑(↑f'' w) w\nhg' :\n  g' = fun t =>\n    ↑(f' (x + h • v + (t * h) • w)) (h • w) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (t * h ^ 2) • ↑(↑f'' w) w\nt : ℝ\nht : t ∈ Icc 0 1\n⊢ HasDerivWithinAt (fun x => ((x * h) ^ 2 / 2) • ↑(↑f'' w) w) ((t * h ^ 2) • ↑(↑f'' w) w) (Icc 0 1) t\n[PROOFSTEP]\nsuffices H :\n  HasDerivWithinAt (fun u => ((u * h) ^ 2 / 2) • f'' w w) ((((2 : ℕ) : ℝ) * (t * h) ^ (2 - 1) * (1 * h) / 2) • f'' w w)\n    (Icc 0 1) t\n[GOAL]\ncase hg\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : ∀ ⦃c : ℝ⦄, 0 < c → ∀ᶠ (x_1 : E) in 𝓝[interior s] x, ‖f' x_1 - f' x - ↑f'' (x_1 - x)‖ ≤ c * ‖x_1 - x‖\nv w : E\nhv : x + v ∈ interior s\nhw : x + v + w ∈ interior s\nε : ℝ\nεpos : 0 < ε\nδ : ℝ\nδpos : δ > 0\nsδ : Metric.ball x δ ∩ interior s ⊆ {x_1 | (fun x_2 => ‖f' x_2 - f' x - ↑f'' (x_2 - x)‖ ≤ ε * ‖x_2 - x‖) x_1}\nE1 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h * (‖v‖ + ‖w‖) < δ\nE2 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h < 1\nh : ℝ\nhδ : h * (‖v‖ + ‖w‖) < δ\nh_lt_1 : h < 1\nhpos : 0 < h\nxt_mem : ∀ (t : ℝ), t ∈ Icc 0 1 → x + h • v + (t * h) • w ∈ interior s\ng : ℝ → F :=\n  fun t =>\n    f (x + h • v + (t * h) • w) - (t * h) • ↑(f' x) w - (t * h ^ 2) • ↑(↑f'' v) w - ((t * h) ^ 2 / 2) • ↑(↑f'' w) w\ng' : ℝ → (fun x => F) (h • w) :=\n  fun t => ↑(f' (x + h • v + (t * h) • w)) (h • w) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (t * h ^ 2) • ↑(↑f'' w) w\nhg' :\n  g' = fun t =>\n    ↑(f' (x + h • v + (t * h) • w)) (h • w) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (t * h ^ 2) • ↑(↑f'' w) w\nt : ℝ\nht : t ∈ Icc 0 1\nH :\n  HasDerivWithinAt (fun u => ((u * h) ^ 2 / 2) • ↑(↑f'' w) w) ((↑2 * (t * h) ^ (2 - 1) * (1 * h) / 2) • ↑(↑f'' w) w)\n    (Icc 0 1) t\n⊢ HasDerivWithinAt (fun x => ((x * h) ^ 2 / 2) • ↑(↑f'' w) w) ((t * h ^ 2) • ↑(↑f'' w) w) (Icc 0 1) t\n[PROOFSTEP]\nconvert H using 2\n[GOAL]\ncase h.e'_7.h.e'_5\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : ∀ ⦃c : ℝ⦄, 0 < c → ∀ᶠ (x_1 : E) in 𝓝[interior s] x, ‖f' x_1 - f' x - ↑f'' (x_1 - x)‖ ≤ c * ‖x_1 - x‖\nv w : E\nhv : x + v ∈ interior s\nhw : x + v + w ∈ interior s\nε : ℝ\nεpos : 0 < ε\nδ : ℝ\nδpos : δ > 0\nsδ : Metric.ball x δ ∩ interior s ⊆ {x_1 | (fun x_2 => ‖f' x_2 - f' x - ↑f'' (x_2 - x)‖ ≤ ε * ‖x_2 - x‖) x_1}\nE1 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h * (‖v‖ + ‖w‖) < δ\nE2 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h < 1\nh : ℝ\nhδ : h * (‖v‖ + ‖w‖) < δ\nh_lt_1 : h < 1\nhpos : 0 < h\nxt_mem : ∀ (t : ℝ), t ∈ Icc 0 1 → x + h • v + (t * h) • w ∈ interior s\ng : ℝ → F :=\n  fun t =>\n    f (x + h • v + (t * h) • w) - (t * h) • ↑(f' x) w - (t * h ^ 2) • ↑(↑f'' v) w - ((t * h) ^ 2 / 2) • ↑(↑f'' w) w\ng' : ℝ → (fun x => F) (h • w) :=\n  fun t => ↑(f' (x + h • v + (t * h) • w)) (h • w) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (t * h ^ 2) • ↑(↑f'' w) w\nhg' :\n  g' = fun t =>\n    ↑(f' (x + h • v + (t * h) • w)) (h • w) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (t * h ^ 2) • ↑(↑f'' w) w\nt : ℝ\nht : t ∈ Icc 0 1\nH :\n  HasDerivWithinAt (fun u => ((u * h) ^ 2 / 2) • ↑(↑f'' w) w) ((↑2 * (t * h) ^ (2 - 1) * (1 * h) / 2) • ↑(↑f'' w) w)\n    (Icc 0 1) t\n⊢ t * h ^ 2 = ↑2 * (t * h) ^ (2 - 1) * (1 * h) / 2\n[PROOFSTEP]\nring\n[GOAL]\ncase H\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : ∀ ⦃c : ℝ⦄, 0 < c → ∀ᶠ (x_1 : E) in 𝓝[interior s] x, ‖f' x_1 - f' x - ↑f'' (x_1 - x)‖ ≤ c * ‖x_1 - x‖\nv w : E\nhv : x + v ∈ interior s\nhw : x + v + w ∈ interior s\nε : ℝ\nεpos : 0 < ε\nδ : ℝ\nδpos : δ > 0\nsδ : Metric.ball x δ ∩ interior s ⊆ {x_1 | (fun x_2 => ‖f' x_2 - f' x - ↑f'' (x_2 - x)‖ ≤ ε * ‖x_2 - x‖) x_1}\nE1 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h * (‖v‖ + ‖w‖) < δ\nE2 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h < 1\nh : ℝ\nhδ : h * (‖v‖ + ‖w‖) < δ\nh_lt_1 : h < 1\nhpos : 0 < h\nxt_mem : ∀ (t : ℝ), t ∈ Icc 0 1 → x + h • v + (t * h) • w ∈ interior s\ng : ℝ → F :=\n  fun t =>\n    f (x + h • v + (t * h) • w) - (t * h) • ↑(f' x) w - (t * h ^ 2) • ↑(↑f'' v) w - ((t * h) ^ 2 / 2) • ↑(↑f'' w) w\ng' : ℝ → (fun x => F) (h • w) :=\n  fun t => ↑(f' (x + h • v + (t * h) • w)) (h • w) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (t * h ^ 2) • ↑(↑f'' w) w\nhg' :\n  g' = fun t =>\n    ↑(f' (x + h • v + (t * h) • w)) (h • w) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (t * h ^ 2) • ↑(↑f'' w) w\nt : ℝ\nht : t ∈ Icc 0 1\n⊢ HasDerivWithinAt (fun u => ((u * h) ^ 2 / 2) • ↑(↑f'' w) w) ((↑2 * (t * h) ^ (2 - 1) * (1 * h) / 2) • ↑(↑f'' w) w)\n    (Icc 0 1) t\n[PROOFSTEP]\napply_rules [HasDerivAt.hasDerivWithinAt, HasDerivAt.smul_const, hasDerivAt_id', HasDerivAt.pow, HasDerivAt.mul_const]\n  -- check that `g'` is uniformly bounded, with a suitable bound `ε * ((‖v‖ + ‖w‖) * ‖w‖) * h^2`.\n[GOAL]\ncase h\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : ∀ ⦃c : ℝ⦄, 0 < c → ∀ᶠ (x_1 : E) in 𝓝[interior s] x, ‖f' x_1 - f' x - ↑f'' (x_1 - x)‖ ≤ c * ‖x_1 - x‖\nv w : E\nhv : x + v ∈ interior s\nhw : x + v + w ∈ interior s\nε : ℝ\nεpos : 0 < ε\nδ : ℝ\nδpos : δ > 0\nsδ : Metric.ball x δ ∩ interior s ⊆ {x_1 | (fun x_2 => ‖f' x_2 - f' x - ↑f'' (x_2 - x)‖ ≤ ε * ‖x_2 - x‖) x_1}\nE1 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h * (‖v‖ + ‖w‖) < δ\nE2 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h < 1\nh : ℝ\nhδ : h * (‖v‖ + ‖w‖) < δ\nh_lt_1 : h < 1\nhpos : 0 < h\nxt_mem : ∀ (t : ℝ), t ∈ Icc 0 1 → x + h • v + (t * h) • w ∈ interior s\ng : ℝ → F :=\n  fun t =>\n    f (x + h • v + (t * h) • w) - (t * h) • ↑(f' x) w - (t * h ^ 2) • ↑(↑f'' v) w - ((t * h) ^ 2 / 2) • ↑(↑f'' w) w\ng' : ℝ → (fun x => F) (h • w) :=\n  fun t => ↑(f' (x + h • v + (t * h) • w)) (h • w) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (t * h ^ 2) • ↑(↑f'' w) w\nhg' :\n  g' = fun t =>\n    ↑(f' (x + h • v + (t * h) • w)) (h • w) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (t * h ^ 2) • ↑(↑f'' w) w\ng_deriv : ∀ (t : ℝ), t ∈ Icc 0 1 → HasDerivWithinAt g (g' t) (Icc 0 1) t\n⊢ ‖f (x + h • v + h • w) - f (x + h • v) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (h ^ 2 / 2) • ↑(↑f'' w) w‖ ≤\n    ε * ‖(‖v‖ + ‖w‖) * ‖w‖ * h ^ 2‖\n[PROOFSTEP]\nhave g'_bound : ∀ t ∈ Ico (0 : ℝ) 1, ‖g' t‖ ≤ ε * ((‖v‖ + ‖w‖) * ‖w‖) * h ^ 2 :=\n  by\n  intro t ht\n  have I : ‖h • v + (t * h) • w‖ ≤ h * (‖v‖ + ‖w‖) :=\n    calc\n      ‖h • v + (t * h) • w‖ ≤ ‖h • v‖ + ‖(t * h) • w‖ := norm_add_le _ _\n      _ = h * ‖v‖ + t * (h * ‖w‖) := by\n        simp only [norm_smul, Real.norm_eq_abs, hpos.le, abs_of_nonneg, abs_mul, ht.left, mul_assoc]\n      _ ≤ h * ‖v‖ + 1 * (h * ‖w‖) := by gcongr; exact ht.2.le\n      _ = h * (‖v‖ + ‖w‖) := by ring\n  calc\n    ‖g' t‖ = ‖(f' (x + h • v + (t * h) • w) - f' x - f'' (h • v + (t * h) • w)) (h • w)‖ :=\n      by\n      rw [hg']\n      have : h * (t * h) = t * (h * h) := by ring\n      simp only [ContinuousLinearMap.coe_sub', ContinuousLinearMap.map_add, pow_two, ContinuousLinearMap.add_apply,\n        Pi.smul_apply, smul_sub, smul_add, smul_smul, ← sub_sub, ContinuousLinearMap.coe_smul', Pi.sub_apply,\n        ContinuousLinearMap.map_smul, this]\n    _ ≤ ‖f' (x + h • v + (t * h) • w) - f' x - f'' (h • v + (t * h) • w)‖ * ‖h • w‖ :=\n      (ContinuousLinearMap.le_op_norm _ _)\n    _ ≤ ε * ‖h • v + (t * h) • w‖ * ‖h • w‖ :=\n      by\n      apply mul_le_mul_of_nonneg_right _ (norm_nonneg _)\n      have H : x + h • v + (t * h) • w ∈ Metric.ball x δ ∩ interior s :=\n        by\n        refine' ⟨_, xt_mem t ⟨ht.1, ht.2.le⟩⟩\n        rw [add_assoc, add_mem_ball_iff_norm]\n        exact I.trans_lt hδ\n      simpa only [mem_setOf_eq, add_assoc x, add_sub_cancel'] using sδ H\n    _ ≤ ε * (‖h • v‖ + ‖h • w‖) * ‖h • w‖ := by\n      gcongr\n      apply (norm_add_le _ _).trans\n      gcongr\n      simp only [norm_smul, Real.norm_eq_abs, abs_mul, abs_of_nonneg, ht.1, hpos.le, mul_assoc]\n      exact mul_le_of_le_one_left (mul_nonneg hpos.le (norm_nonneg _)) ht.2.le\n    _ = ε * ((‖v‖ + ‖w‖) * ‖w‖) * h ^ 2 := by simp only [norm_smul, Real.norm_eq_abs, abs_mul, abs_of_nonneg, hpos.le];\n      ring\n        -- conclude using the mean value inequality\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : ∀ ⦃c : ℝ⦄, 0 < c → ∀ᶠ (x_1 : E) in 𝓝[interior s] x, ‖f' x_1 - f' x - ↑f'' (x_1 - x)‖ ≤ c * ‖x_1 - x‖\nv w : E\nhv : x + v ∈ interior s\nhw : x + v + w ∈ interior s\nε : ℝ\nεpos : 0 < ε\nδ : ℝ\nδpos : δ > 0\nsδ : Metric.ball x δ ∩ interior s ⊆ {x_1 | (fun x_2 => ‖f' x_2 - f' x - ↑f'' (x_2 - x)‖ ≤ ε * ‖x_2 - x‖) x_1}\nE1 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h * (‖v‖ + ‖w‖) < δ\nE2 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h < 1\nh : ℝ\nhδ : h * (‖v‖ + ‖w‖) < δ\nh_lt_1 : h < 1\nhpos : 0 < h\nxt_mem : ∀ (t : ℝ), t ∈ Icc 0 1 → x + h • v + (t * h) • w ∈ interior s\ng : ℝ → F :=\n  fun t =>\n    f (x + h • v + (t * h) • w) - (t * h) • ↑(f' x) w - (t * h ^ 2) • ↑(↑f'' v) w - ((t * h) ^ 2 / 2) • ↑(↑f'' w) w\ng' : ℝ → (fun x => F) (h • w) :=\n  fun t => ↑(f' (x + h • v + (t * h) • w)) (h • w) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (t * h ^ 2) • ↑(↑f'' w) w\nhg' :\n  g' = fun t =>\n    ↑(f' (x + h • v + (t * h) • w)) (h • w) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (t * h ^ 2) • ↑(↑f'' w) w\ng_deriv : ∀ (t : ℝ), t ∈ Icc 0 1 → HasDerivWithinAt g (g' t) (Icc 0 1) t\n⊢ ∀ (t : ℝ), t ∈ Ico 0 1 → ‖g' t‖ ≤ ε * ((‖v‖ + ‖w‖) * ‖w‖) * h ^ 2\n[PROOFSTEP]\nintro t ht\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : ∀ ⦃c : ℝ⦄, 0 < c → ∀ᶠ (x_1 : E) in 𝓝[interior s] x, ‖f' x_1 - f' x - ↑f'' (x_1 - x)‖ ≤ c * ‖x_1 - x‖\nv w : E\nhv : x + v ∈ interior s\nhw : x + v + w ∈ interior s\nε : ℝ\nεpos : 0 < ε\nδ : ℝ\nδpos : δ > 0\nsδ : Metric.ball x δ ∩ interior s ⊆ {x_1 | (fun x_2 => ‖f' x_2 - f' x - ↑f'' (x_2 - x)‖ ≤ ε * ‖x_2 - x‖) x_1}\nE1 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h * (‖v‖ + ‖w‖) < δ\nE2 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h < 1\nh : ℝ\nhδ : h * (‖v‖ + ‖w‖) < δ\nh_lt_1 : h < 1\nhpos : 0 < h\nxt_mem : ∀ (t : ℝ), t ∈ Icc 0 1 → x + h • v + (t * h) • w ∈ interior s\ng : ℝ → F :=\n  fun t =>\n    f (x + h • v + (t * h) • w) - (t * h) • ↑(f' x) w - (t * h ^ 2) • ↑(↑f'' v) w - ((t * h) ^ 2 / 2) • ↑(↑f'' w) w\ng' : ℝ → (fun x => F) (h • w) :=\n  fun t => ↑(f' (x + h • v + (t * h) • w)) (h • w) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (t * h ^ 2) • ↑(↑f'' w) w\nhg' :\n  g' = fun t =>\n    ↑(f' (x + h • v + (t * h) • w)) (h • w) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (t * h ^ 2) • ↑(↑f'' w) w\ng_deriv : ∀ (t : ℝ), t ∈ Icc 0 1 → HasDerivWithinAt g (g' t) (Icc 0 1) t\nt : ℝ\nht : t ∈ Ico 0 1\n⊢ ‖g' t‖ ≤ ε * ((‖v‖ + ‖w‖) * ‖w‖) * h ^ 2\n[PROOFSTEP]\nhave I : ‖h • v + (t * h) • w‖ ≤ h * (‖v‖ + ‖w‖) :=\n  calc\n    ‖h • v + (t * h) • w‖ ≤ ‖h • v‖ + ‖(t * h) • w‖ := norm_add_le _ _\n    _ = h * ‖v‖ + t * (h * ‖w‖) := by\n      simp only [norm_smul, Real.norm_eq_abs, hpos.le, abs_of_nonneg, abs_mul, ht.left, mul_assoc]\n    _ ≤ h * ‖v‖ + 1 * (h * ‖w‖) := by gcongr; exact ht.2.le\n    _ = h * (‖v‖ + ‖w‖) := by ring\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : ∀ ⦃c : ℝ⦄, 0 < c → ∀ᶠ (x_1 : E) in 𝓝[interior s] x, ‖f' x_1 - f' x - ↑f'' (x_1 - x)‖ ≤ c * ‖x_1 - x‖\nv w : E\nhv : x + v ∈ interior s\nhw : x + v + w ∈ interior s\nε : ℝ\nεpos : 0 < ε\nδ : ℝ\nδpos : δ > 0\nsδ : Metric.ball x δ ∩ interior s ⊆ {x_1 | (fun x_2 => ‖f' x_2 - f' x - ↑f'' (x_2 - x)‖ ≤ ε * ‖x_2 - x‖) x_1}\nE1 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h * (‖v‖ + ‖w‖) < δ\nE2 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h < 1\nh : ℝ\nhδ : h * (‖v‖ + ‖w‖) < δ\nh_lt_1 : h < 1\nhpos : 0 < h\nxt_mem : ∀ (t : ℝ), t ∈ Icc 0 1 → x + h • v + (t * h) • w ∈ interior s\ng : ℝ → F :=\n  fun t =>\n    f (x + h • v + (t * h) • w) - (t * h) • ↑(f' x) w - (t * h ^ 2) • ↑(↑f'' v) w - ((t * h) ^ 2 / 2) • ↑(↑f'' w) w\ng' : ℝ → (fun x => F) (h • w) :=\n  fun t => ↑(f' (x + h • v + (t * h) • w)) (h • w) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (t * h ^ 2) • ↑(↑f'' w) w\nhg' :\n  g' = fun t =>\n    ↑(f' (x + h • v + (t * h) • w)) (h • w) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (t * h ^ 2) • ↑(↑f'' w) w\ng_deriv : ∀ (t : ℝ), t ∈ Icc 0 1 → HasDerivWithinAt g (g' t) (Icc 0 1) t\nt : ℝ\nht : t ∈ Ico 0 1\n⊢ ‖h • v‖ + ‖(t * h) • w‖ = h * ‖v‖ + t * (h * ‖w‖)\n[PROOFSTEP]\nsimp only [norm_smul, Real.norm_eq_abs, hpos.le, abs_of_nonneg, abs_mul, ht.left, mul_assoc]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : ∀ ⦃c : ℝ⦄, 0 < c → ∀ᶠ (x_1 : E) in 𝓝[interior s] x, ‖f' x_1 - f' x - ↑f'' (x_1 - x)‖ ≤ c * ‖x_1 - x‖\nv w : E\nhv : x + v ∈ interior s\nhw : x + v + w ∈ interior s\nε : ℝ\nεpos : 0 < ε\nδ : ℝ\nδpos : δ > 0\nsδ : Metric.ball x δ ∩ interior s ⊆ {x_1 | (fun x_2 => ‖f' x_2 - f' x - ↑f'' (x_2 - x)‖ ≤ ε * ‖x_2 - x‖) x_1}\nE1 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h * (‖v‖ + ‖w‖) < δ\nE2 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h < 1\nh : ℝ\nhδ : h * (‖v‖ + ‖w‖) < δ\nh_lt_1 : h < 1\nhpos : 0 < h\nxt_mem : ∀ (t : ℝ), t ∈ Icc 0 1 → x + h • v + (t * h) • w ∈ interior s\ng : ℝ → F :=\n  fun t =>\n    f (x + h • v + (t * h) • w) - (t * h) • ↑(f' x) w - (t * h ^ 2) • ↑(↑f'' v) w - ((t * h) ^ 2 / 2) • ↑(↑f'' w) w\ng' : ℝ → (fun x => F) (h • w) :=\n  fun t => ↑(f' (x + h • v + (t * h) • w)) (h • w) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (t * h ^ 2) • ↑(↑f'' w) w\nhg' :\n  g' = fun t =>\n    ↑(f' (x + h • v + (t * h) • w)) (h • w) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (t * h ^ 2) • ↑(↑f'' w) w\ng_deriv : ∀ (t : ℝ), t ∈ Icc 0 1 → HasDerivWithinAt g (g' t) (Icc 0 1) t\nt : ℝ\nht : t ∈ Ico 0 1\n⊢ h * ‖v‖ + t * (h * ‖w‖) ≤ h * ‖v‖ + 1 * (h * ‖w‖)\n[PROOFSTEP]\ngcongr\n[GOAL]\ncase bc.h\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : ∀ ⦃c : ℝ⦄, 0 < c → ∀ᶠ (x_1 : E) in 𝓝[interior s] x, ‖f' x_1 - f' x - ↑f'' (x_1 - x)‖ ≤ c * ‖x_1 - x‖\nv w : E\nhv : x + v ∈ interior s\nhw : x + v + w ∈ interior s\nε : ℝ\nεpos : 0 < ε\nδ : ℝ\nδpos : δ > 0\nsδ : Metric.ball x δ ∩ interior s ⊆ {x_1 | (fun x_2 => ‖f' x_2 - f' x - ↑f'' (x_2 - x)‖ ≤ ε * ‖x_2 - x‖) x_1}\nE1 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h * (‖v‖ + ‖w‖) < δ\nE2 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h < 1\nh : ℝ\nhδ : h * (‖v‖ + ‖w‖) < δ\nh_lt_1 : h < 1\nhpos : 0 < h\nxt_mem : ∀ (t : ℝ), t ∈ Icc 0 1 → x + h • v + (t * h) • w ∈ interior s\ng : ℝ → F :=\n  fun t =>\n    f (x + h • v + (t * h) • w) - (t * h) • ↑(f' x) w - (t * h ^ 2) • ↑(↑f'' v) w - ((t * h) ^ 2 / 2) • ↑(↑f'' w) w\ng' : ℝ → (fun x => F) (h • w) :=\n  fun t => ↑(f' (x + h • v + (t * h) • w)) (h • w) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (t * h ^ 2) • ↑(↑f'' w) w\nhg' :\n  g' = fun t =>\n    ↑(f' (x + h • v + (t * h) • w)) (h • w) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (t * h ^ 2) • ↑(↑f'' w) w\ng_deriv : ∀ (t : ℝ), t ∈ Icc 0 1 → HasDerivWithinAt g (g' t) (Icc 0 1) t\nt : ℝ\nht : t ∈ Ico 0 1\n⊢ t ≤ 1\n[PROOFSTEP]\nexact ht.2.le\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : ∀ ⦃c : ℝ⦄, 0 < c → ∀ᶠ (x_1 : E) in 𝓝[interior s] x, ‖f' x_1 - f' x - ↑f'' (x_1 - x)‖ ≤ c * ‖x_1 - x‖\nv w : E\nhv : x + v ∈ interior s\nhw : x + v + w ∈ interior s\nε : ℝ\nεpos : 0 < ε\nδ : ℝ\nδpos : δ > 0\nsδ : Metric.ball x δ ∩ interior s ⊆ {x_1 | (fun x_2 => ‖f' x_2 - f' x - ↑f'' (x_2 - x)‖ ≤ ε * ‖x_2 - x‖) x_1}\nE1 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h * (‖v‖ + ‖w‖) < δ\nE2 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h < 1\nh : ℝ\nhδ : h * (‖v‖ + ‖w‖) < δ\nh_lt_1 : h < 1\nhpos : 0 < h\nxt_mem : ∀ (t : ℝ), t ∈ Icc 0 1 → x + h • v + (t * h) • w ∈ interior s\ng : ℝ → F :=\n  fun t =>\n    f (x + h • v + (t * h) • w) - (t * h) • ↑(f' x) w - (t * h ^ 2) • ↑(↑f'' v) w - ((t * h) ^ 2 / 2) • ↑(↑f'' w) w\ng' : ℝ → (fun x => F) (h • w) :=\n  fun t => ↑(f' (x + h • v + (t * h) • w)) (h • w) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (t * h ^ 2) • ↑(↑f'' w) w\nhg' :\n  g' = fun t =>\n    ↑(f' (x + h • v + (t * h) • w)) (h • w) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (t * h ^ 2) • ↑(↑f'' w) w\ng_deriv : ∀ (t : ℝ), t ∈ Icc 0 1 → HasDerivWithinAt g (g' t) (Icc 0 1) t\nt : ℝ\nht : t ∈ Ico 0 1\n⊢ h * ‖v‖ + 1 * (h * ‖w‖) = h * (‖v‖ + ‖w‖)\n[PROOFSTEP]\nring\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : ∀ ⦃c : ℝ⦄, 0 < c → ∀ᶠ (x_1 : E) in 𝓝[interior s] x, ‖f' x_1 - f' x - ↑f'' (x_1 - x)‖ ≤ c * ‖x_1 - x‖\nv w : E\nhv : x + v ∈ interior s\nhw : x + v + w ∈ interior s\nε : ℝ\nεpos : 0 < ε\nδ : ℝ\nδpos : δ > 0\nsδ : Metric.ball x δ ∩ interior s ⊆ {x_1 | (fun x_2 => ‖f' x_2 - f' x - ↑f'' (x_2 - x)‖ ≤ ε * ‖x_2 - x‖) x_1}\nE1 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h * (‖v‖ + ‖w‖) < δ\nE2 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h < 1\nh : ℝ\nhδ : h * (‖v‖ + ‖w‖) < δ\nh_lt_1 : h < 1\nhpos : 0 < h\nxt_mem : ∀ (t : ℝ), t ∈ Icc 0 1 → x + h • v + (t * h) • w ∈ interior s\ng : ℝ → F :=\n  fun t =>\n    f (x + h • v + (t * h) • w) - (t * h) • ↑(f' x) w - (t * h ^ 2) • ↑(↑f'' v) w - ((t * h) ^ 2 / 2) • ↑(↑f'' w) w\ng' : ℝ → (fun x => F) (h • w) :=\n  fun t => ↑(f' (x + h • v + (t * h) • w)) (h • w) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (t * h ^ 2) • ↑(↑f'' w) w\nhg' :\n  g' = fun t =>\n    ↑(f' (x + h • v + (t * h) • w)) (h • w) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (t * h ^ 2) • ↑(↑f'' w) w\ng_deriv : ∀ (t : ℝ), t ∈ Icc 0 1 → HasDerivWithinAt g (g' t) (Icc 0 1) t\nt : ℝ\nht : t ∈ Ico 0 1\nI : ‖h • v + (t * h) • w‖ ≤ h * (‖v‖ + ‖w‖)\n⊢ ‖g' t‖ ≤ ε * ((‖v‖ + ‖w‖) * ‖w‖) * h ^ 2\n[PROOFSTEP]\ncalc\n  ‖g' t‖ = ‖(f' (x + h • v + (t * h) • w) - f' x - f'' (h • v + (t * h) • w)) (h • w)‖ :=\n    by\n    rw [hg']\n    have : h * (t * h) = t * (h * h) := by ring\n    simp only [ContinuousLinearMap.coe_sub', ContinuousLinearMap.map_add, pow_two, ContinuousLinearMap.add_apply,\n      Pi.smul_apply, smul_sub, smul_add, smul_smul, ← sub_sub, ContinuousLinearMap.coe_smul', Pi.sub_apply,\n      ContinuousLinearMap.map_smul, this]\n  _ ≤ ‖f' (x + h • v + (t * h) • w) - f' x - f'' (h • v + (t * h) • w)‖ * ‖h • w‖ :=\n    (ContinuousLinearMap.le_op_norm _ _)\n  _ ≤ ε * ‖h • v + (t * h) • w‖ * ‖h • w‖ :=\n    by\n    apply mul_le_mul_of_nonneg_right _ (norm_nonneg _)\n    have H : x + h • v + (t * h) • w ∈ Metric.ball x δ ∩ interior s :=\n      by\n      refine' ⟨_, xt_mem t ⟨ht.1, ht.2.le⟩⟩\n      rw [add_assoc, add_mem_ball_iff_norm]\n      exact I.trans_lt hδ\n    simpa only [mem_setOf_eq, add_assoc x, add_sub_cancel'] using sδ H\n  _ ≤ ε * (‖h • v‖ + ‖h • w‖) * ‖h • w‖ := by\n    gcongr\n    apply (norm_add_le _ _).trans\n    gcongr\n    simp only [norm_smul, Real.norm_eq_abs, abs_mul, abs_of_nonneg, ht.1, hpos.le, mul_assoc]\n    exact mul_le_of_le_one_left (mul_nonneg hpos.le (norm_nonneg _)) ht.2.le\n  _ = ε * ((‖v‖ + ‖w‖) * ‖w‖) * h ^ 2 := by simp only [norm_smul, Real.norm_eq_abs, abs_mul, abs_of_nonneg, hpos.le];\n    ring\n      -- conclude using the mean value inequality\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : ∀ ⦃c : ℝ⦄, 0 < c → ∀ᶠ (x_1 : E) in 𝓝[interior s] x, ‖f' x_1 - f' x - ↑f'' (x_1 - x)‖ ≤ c * ‖x_1 - x‖\nv w : E\nhv : x + v ∈ interior s\nhw : x + v + w ∈ interior s\nε : ℝ\nεpos : 0 < ε\nδ : ℝ\nδpos : δ > 0\nsδ : Metric.ball x δ ∩ interior s ⊆ {x_1 | (fun x_2 => ‖f' x_2 - f' x - ↑f'' (x_2 - x)‖ ≤ ε * ‖x_2 - x‖) x_1}\nE1 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h * (‖v‖ + ‖w‖) < δ\nE2 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h < 1\nh : ℝ\nhδ : h * (‖v‖ + ‖w‖) < δ\nh_lt_1 : h < 1\nhpos : 0 < h\nxt_mem : ∀ (t : ℝ), t ∈ Icc 0 1 → x + h • v + (t * h) • w ∈ interior s\ng : ℝ → F :=\n  fun t =>\n    f (x + h • v + (t * h) • w) - (t * h) • ↑(f' x) w - (t * h ^ 2) • ↑(↑f'' v) w - ((t * h) ^ 2 / 2) • ↑(↑f'' w) w\ng' : ℝ → (fun x => F) (h • w) :=\n  fun t => ↑(f' (x + h • v + (t * h) • w)) (h • w) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (t * h ^ 2) • ↑(↑f'' w) w\nhg' :\n  g' = fun t =>\n    ↑(f' (x + h • v + (t * h) • w)) (h • w) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (t * h ^ 2) • ↑(↑f'' w) w\ng_deriv : ∀ (t : ℝ), t ∈ Icc 0 1 → HasDerivWithinAt g (g' t) (Icc 0 1) t\nt : ℝ\nht : t ∈ Ico 0 1\nI : ‖h • v + (t * h) • w‖ ≤ h * (‖v‖ + ‖w‖)\n⊢ ‖g' t‖ = ‖↑(f' (x + h • v + (t * h) • w) - f' x - ↑f'' (h • v + (t * h) • w)) (h • w)‖\n[PROOFSTEP]\nrw [hg']\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : ∀ ⦃c : ℝ⦄, 0 < c → ∀ᶠ (x_1 : E) in 𝓝[interior s] x, ‖f' x_1 - f' x - ↑f'' (x_1 - x)‖ ≤ c * ‖x_1 - x‖\nv w : E\nhv : x + v ∈ interior s\nhw : x + v + w ∈ interior s\nε : ℝ\nεpos : 0 < ε\nδ : ℝ\nδpos : δ > 0\nsδ : Metric.ball x δ ∩ interior s ⊆ {x_1 | (fun x_2 => ‖f' x_2 - f' x - ↑f'' (x_2 - x)‖ ≤ ε * ‖x_2 - x‖) x_1}\nE1 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h * (‖v‖ + ‖w‖) < δ\nE2 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h < 1\nh : ℝ\nhδ : h * (‖v‖ + ‖w‖) < δ\nh_lt_1 : h < 1\nhpos : 0 < h\nxt_mem : ∀ (t : ℝ), t ∈ Icc 0 1 → x + h • v + (t * h) • w ∈ interior s\ng : ℝ → F :=\n  fun t =>\n    f (x + h • v + (t * h) • w) - (t * h) • ↑(f' x) w - (t * h ^ 2) • ↑(↑f'' v) w - ((t * h) ^ 2 / 2) • ↑(↑f'' w) w\ng' : ℝ → (fun x => F) (h • w) :=\n  fun t => ↑(f' (x + h • v + (t * h) • w)) (h • w) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (t * h ^ 2) • ↑(↑f'' w) w\nhg' :\n  g' = fun t =>\n    ↑(f' (x + h • v + (t * h) • w)) (h • w) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (t * h ^ 2) • ↑(↑f'' w) w\ng_deriv : ∀ (t : ℝ), t ∈ Icc 0 1 → HasDerivWithinAt g (g' t) (Icc 0 1) t\nt : ℝ\nht : t ∈ Ico 0 1\nI : ‖h • v + (t * h) • w‖ ≤ h * (‖v‖ + ‖w‖)\n⊢ ‖(fun t => ↑(f' (x + h • v + (t * h) • w)) (h • w) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (t * h ^ 2) • ↑(↑f'' w) w)\n        t‖ =\n    ‖↑(f' (x + h • v + (t * h) • w) - f' x - ↑f'' (h • v + (t * h) • w)) (h • w)‖\n[PROOFSTEP]\nhave : h * (t * h) = t * (h * h) := by ring\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : ∀ ⦃c : ℝ⦄, 0 < c → ∀ᶠ (x_1 : E) in 𝓝[interior s] x, ‖f' x_1 - f' x - ↑f'' (x_1 - x)‖ ≤ c * ‖x_1 - x‖\nv w : E\nhv : x + v ∈ interior s\nhw : x + v + w ∈ interior s\nε : ℝ\nεpos : 0 < ε\nδ : ℝ\nδpos : δ > 0\nsδ : Metric.ball x δ ∩ interior s ⊆ {x_1 | (fun x_2 => ‖f' x_2 - f' x - ↑f'' (x_2 - x)‖ ≤ ε * ‖x_2 - x‖) x_1}\nE1 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h * (‖v‖ + ‖w‖) < δ\nE2 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h < 1\nh : ℝ\nhδ : h * (‖v‖ + ‖w‖) < δ\nh_lt_1 : h < 1\nhpos : 0 < h\nxt_mem : ∀ (t : ℝ), t ∈ Icc 0 1 → x + h • v + (t * h) • w ∈ interior s\ng : ℝ → F :=\n  fun t =>\n    f (x + h • v + (t * h) • w) - (t * h) • ↑(f' x) w - (t * h ^ 2) • ↑(↑f'' v) w - ((t * h) ^ 2 / 2) • ↑(↑f'' w) w\ng' : ℝ → (fun x => F) (h • w) :=\n  fun t => ↑(f' (x + h • v + (t * h) • w)) (h • w) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (t * h ^ 2) • ↑(↑f'' w) w\nhg' :\n  g' = fun t =>\n    ↑(f' (x + h • v + (t * h) • w)) (h • w) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (t * h ^ 2) • ↑(↑f'' w) w\ng_deriv : ∀ (t : ℝ), t ∈ Icc 0 1 → HasDerivWithinAt g (g' t) (Icc 0 1) t\nt : ℝ\nht : t ∈ Ico 0 1\nI : ‖h • v + (t * h) • w‖ ≤ h * (‖v‖ + ‖w‖)\n⊢ h * (t * h) = t * (h * h)\n[PROOFSTEP]\nring\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : ∀ ⦃c : ℝ⦄, 0 < c → ∀ᶠ (x_1 : E) in 𝓝[interior s] x, ‖f' x_1 - f' x - ↑f'' (x_1 - x)‖ ≤ c * ‖x_1 - x‖\nv w : E\nhv : x + v ∈ interior s\nhw : x + v + w ∈ interior s\nε : ℝ\nεpos : 0 < ε\nδ : ℝ\nδpos : δ > 0\nsδ : Metric.ball x δ ∩ interior s ⊆ {x_1 | (fun x_2 => ‖f' x_2 - f' x - ↑f'' (x_2 - x)‖ ≤ ε * ‖x_2 - x‖) x_1}\nE1 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h * (‖v‖ + ‖w‖) < δ\nE2 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h < 1\nh : ℝ\nhδ : h * (‖v‖ + ‖w‖) < δ\nh_lt_1 : h < 1\nhpos : 0 < h\nxt_mem : ∀ (t : ℝ), t ∈ Icc 0 1 → x + h • v + (t * h) • w ∈ interior s\ng : ℝ → F :=\n  fun t =>\n    f (x + h • v + (t * h) • w) - (t * h) • ↑(f' x) w - (t * h ^ 2) • ↑(↑f'' v) w - ((t * h) ^ 2 / 2) • ↑(↑f'' w) w\ng' : ℝ → (fun x => F) (h • w) :=\n  fun t => ↑(f' (x + h • v + (t * h) • w)) (h • w) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (t * h ^ 2) • ↑(↑f'' w) w\nhg' :\n  g' = fun t =>\n    ↑(f' (x + h • v + (t * h) • w)) (h • w) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (t * h ^ 2) • ↑(↑f'' w) w\ng_deriv : ∀ (t : ℝ), t ∈ Icc 0 1 → HasDerivWithinAt g (g' t) (Icc 0 1) t\nt : ℝ\nht : t ∈ Ico 0 1\nI : ‖h • v + (t * h) • w‖ ≤ h * (‖v‖ + ‖w‖)\nthis : h * (t * h) = t * (h * h)\n⊢ ‖(fun t => ↑(f' (x + h • v + (t * h) • w)) (h • w) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (t * h ^ 2) • ↑(↑f'' w) w)\n        t‖ =\n    ‖↑(f' (x + h • v + (t * h) • w) - f' x - ↑f'' (h • v + (t * h) • w)) (h • w)‖\n[PROOFSTEP]\nsimp only [ContinuousLinearMap.coe_sub', ContinuousLinearMap.map_add, pow_two, ContinuousLinearMap.add_apply,\n  Pi.smul_apply, smul_sub, smul_add, smul_smul, ← sub_sub, ContinuousLinearMap.coe_smul', Pi.sub_apply,\n  ContinuousLinearMap.map_smul, this]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : ∀ ⦃c : ℝ⦄, 0 < c → ∀ᶠ (x_1 : E) in 𝓝[interior s] x, ‖f' x_1 - f' x - ↑f'' (x_1 - x)‖ ≤ c * ‖x_1 - x‖\nv w : E\nhv : x + v ∈ interior s\nhw : x + v + w ∈ interior s\nε : ℝ\nεpos : 0 < ε\nδ : ℝ\nδpos : δ > 0\nsδ : Metric.ball x δ ∩ interior s ⊆ {x_1 | (fun x_2 => ‖f' x_2 - f' x - ↑f'' (x_2 - x)‖ ≤ ε * ‖x_2 - x‖) x_1}\nE1 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h * (‖v‖ + ‖w‖) < δ\nE2 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h < 1\nh : ℝ\nhδ : h * (‖v‖ + ‖w‖) < δ\nh_lt_1 : h < 1\nhpos : 0 < h\nxt_mem : ∀ (t : ℝ), t ∈ Icc 0 1 → x + h • v + (t * h) • w ∈ interior s\ng : ℝ → F :=\n  fun t =>\n    f (x + h • v + (t * h) • w) - (t * h) • ↑(f' x) w - (t * h ^ 2) • ↑(↑f'' v) w - ((t * h) ^ 2 / 2) • ↑(↑f'' w) w\ng' : ℝ → (fun x => F) (h • w) :=\n  fun t => ↑(f' (x + h • v + (t * h) • w)) (h • w) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (t * h ^ 2) • ↑(↑f'' w) w\nhg' :\n  g' = fun t =>\n    ↑(f' (x + h • v + (t * h) • w)) (h • w) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (t * h ^ 2) • ↑(↑f'' w) w\ng_deriv : ∀ (t : ℝ), t ∈ Icc 0 1 → HasDerivWithinAt g (g' t) (Icc 0 1) t\nt : ℝ\nht : t ∈ Ico 0 1\nI : ‖h • v + (t * h) • w‖ ≤ h * (‖v‖ + ‖w‖)\n⊢ ‖f' (x + h • v + (t * h) • w) - f' x - ↑f'' (h • v + (t * h) • w)‖ * ‖h • w‖ ≤ ε * ‖h • v + (t * h) • w‖ * ‖h • w‖\n[PROOFSTEP]\napply mul_le_mul_of_nonneg_right _ (norm_nonneg _)\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : ∀ ⦃c : ℝ⦄, 0 < c → ∀ᶠ (x_1 : E) in 𝓝[interior s] x, ‖f' x_1 - f' x - ↑f'' (x_1 - x)‖ ≤ c * ‖x_1 - x‖\nv w : E\nhv : x + v ∈ interior s\nhw : x + v + w ∈ interior s\nε : ℝ\nεpos : 0 < ε\nδ : ℝ\nδpos : δ > 0\nsδ : Metric.ball x δ ∩ interior s ⊆ {x_1 | (fun x_2 => ‖f' x_2 - f' x - ↑f'' (x_2 - x)‖ ≤ ε * ‖x_2 - x‖) x_1}\nE1 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h * (‖v‖ + ‖w‖) < δ\nE2 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h < 1\nh : ℝ\nhδ : h * (‖v‖ + ‖w‖) < δ\nh_lt_1 : h < 1\nhpos : 0 < h\nxt_mem : ∀ (t : ℝ), t ∈ Icc 0 1 → x + h • v + (t * h) • w ∈ interior s\ng : ℝ → F :=\n  fun t =>\n    f (x + h • v + (t * h) • w) - (t * h) • ↑(f' x) w - (t * h ^ 2) • ↑(↑f'' v) w - ((t * h) ^ 2 / 2) • ↑(↑f'' w) w\ng' : ℝ → (fun x => F) (h • w) :=\n  fun t => ↑(f' (x + h • v + (t * h) • w)) (h • w) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (t * h ^ 2) • ↑(↑f'' w) w\nhg' :\n  g' = fun t =>\n    ↑(f' (x + h • v + (t * h) • w)) (h • w) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (t * h ^ 2) • ↑(↑f'' w) w\ng_deriv : ∀ (t : ℝ), t ∈ Icc 0 1 → HasDerivWithinAt g (g' t) (Icc 0 1) t\nt : ℝ\nht : t ∈ Ico 0 1\nI : ‖h • v + (t * h) • w‖ ≤ h * (‖v‖ + ‖w‖)\n⊢ ‖f' (x + h • v + (t * h) • w) - f' x - ↑f'' (h • v + (t * h) • w)‖ ≤ ε * ‖h • v + (t * h) • w‖\n[PROOFSTEP]\nhave H : x + h • v + (t * h) • w ∈ Metric.ball x δ ∩ interior s :=\n  by\n  refine' ⟨_, xt_mem t ⟨ht.1, ht.2.le⟩⟩\n  rw [add_assoc, add_mem_ball_iff_norm]\n  exact I.trans_lt hδ\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : ∀ ⦃c : ℝ⦄, 0 < c → ∀ᶠ (x_1 : E) in 𝓝[interior s] x, ‖f' x_1 - f' x - ↑f'' (x_1 - x)‖ ≤ c * ‖x_1 - x‖\nv w : E\nhv : x + v ∈ interior s\nhw : x + v + w ∈ interior s\nε : ℝ\nεpos : 0 < ε\nδ : ℝ\nδpos : δ > 0\nsδ : Metric.ball x δ ∩ interior s ⊆ {x_1 | (fun x_2 => ‖f' x_2 - f' x - ↑f'' (x_2 - x)‖ ≤ ε * ‖x_2 - x‖) x_1}\nE1 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h * (‖v‖ + ‖w‖) < δ\nE2 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h < 1\nh : ℝ\nhδ : h * (‖v‖ + ‖w‖) < δ\nh_lt_1 : h < 1\nhpos : 0 < h\nxt_mem : ∀ (t : ℝ), t ∈ Icc 0 1 → x + h • v + (t * h) • w ∈ interior s\ng : ℝ → F :=\n  fun t =>\n    f (x + h • v + (t * h) • w) - (t * h) • ↑(f' x) w - (t * h ^ 2) • ↑(↑f'' v) w - ((t * h) ^ 2 / 2) • ↑(↑f'' w) w\ng' : ℝ → (fun x => F) (h • w) :=\n  fun t => ↑(f' (x + h • v + (t * h) • w)) (h • w) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (t * h ^ 2) • ↑(↑f'' w) w\nhg' :\n  g' = fun t =>\n    ↑(f' (x + h • v + (t * h) • w)) (h • w) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (t * h ^ 2) • ↑(↑f'' w) w\ng_deriv : ∀ (t : ℝ), t ∈ Icc 0 1 → HasDerivWithinAt g (g' t) (Icc 0 1) t\nt : ℝ\nht : t ∈ Ico 0 1\nI : ‖h • v + (t * h) • w‖ ≤ h * (‖v‖ + ‖w‖)\n⊢ x + h • v + (t * h) • w ∈ Metric.ball x δ ∩ interior s\n[PROOFSTEP]\nrefine' ⟨_, xt_mem t ⟨ht.1, ht.2.le⟩⟩\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : ∀ ⦃c : ℝ⦄, 0 < c → ∀ᶠ (x_1 : E) in 𝓝[interior s] x, ‖f' x_1 - f' x - ↑f'' (x_1 - x)‖ ≤ c * ‖x_1 - x‖\nv w : E\nhv : x + v ∈ interior s\nhw : x + v + w ∈ interior s\nε : ℝ\nεpos : 0 < ε\nδ : ℝ\nδpos : δ > 0\nsδ : Metric.ball x δ ∩ interior s ⊆ {x_1 | (fun x_2 => ‖f' x_2 - f' x - ↑f'' (x_2 - x)‖ ≤ ε * ‖x_2 - x‖) x_1}\nE1 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h * (‖v‖ + ‖w‖) < δ\nE2 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h < 1\nh : ℝ\nhδ : h * (‖v‖ + ‖w‖) < δ\nh_lt_1 : h < 1\nhpos : 0 < h\nxt_mem : ∀ (t : ℝ), t ∈ Icc 0 1 → x + h • v + (t * h) • w ∈ interior s\ng : ℝ → F :=\n  fun t =>\n    f (x + h • v + (t * h) • w) - (t * h) • ↑(f' x) w - (t * h ^ 2) • ↑(↑f'' v) w - ((t * h) ^ 2 / 2) • ↑(↑f'' w) w\ng' : ℝ → (fun x => F) (h • w) :=\n  fun t => ↑(f' (x + h • v + (t * h) • w)) (h • w) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (t * h ^ 2) • ↑(↑f'' w) w\nhg' :\n  g' = fun t =>\n    ↑(f' (x + h • v + (t * h) • w)) (h • w) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (t * h ^ 2) • ↑(↑f'' w) w\ng_deriv : ∀ (t : ℝ), t ∈ Icc 0 1 → HasDerivWithinAt g (g' t) (Icc 0 1) t\nt : ℝ\nht : t ∈ Ico 0 1\nI : ‖h • v + (t * h) • w‖ ≤ h * (‖v‖ + ‖w‖)\n⊢ x + h • v + (t * h) • w ∈ Metric.ball x δ\n[PROOFSTEP]\nrw [add_assoc, add_mem_ball_iff_norm]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : ∀ ⦃c : ℝ⦄, 0 < c → ∀ᶠ (x_1 : E) in 𝓝[interior s] x, ‖f' x_1 - f' x - ↑f'' (x_1 - x)‖ ≤ c * ‖x_1 - x‖\nv w : E\nhv : x + v ∈ interior s\nhw : x + v + w ∈ interior s\nε : ℝ\nεpos : 0 < ε\nδ : ℝ\nδpos : δ > 0\nsδ : Metric.ball x δ ∩ interior s ⊆ {x_1 | (fun x_2 => ‖f' x_2 - f' x - ↑f'' (x_2 - x)‖ ≤ ε * ‖x_2 - x‖) x_1}\nE1 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h * (‖v‖ + ‖w‖) < δ\nE2 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h < 1\nh : ℝ\nhδ : h * (‖v‖ + ‖w‖) < δ\nh_lt_1 : h < 1\nhpos : 0 < h\nxt_mem : ∀ (t : ℝ), t ∈ Icc 0 1 → x + h • v + (t * h) • w ∈ interior s\ng : ℝ → F :=\n  fun t =>\n    f (x + h • v + (t * h) • w) - (t * h) • ↑(f' x) w - (t * h ^ 2) • ↑(↑f'' v) w - ((t * h) ^ 2 / 2) • ↑(↑f'' w) w\ng' : ℝ → (fun x => F) (h • w) :=\n  fun t => ↑(f' (x + h • v + (t * h) • w)) (h • w) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (t * h ^ 2) • ↑(↑f'' w) w\nhg' :\n  g' = fun t =>\n    ↑(f' (x + h • v + (t * h) • w)) (h • w) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (t * h ^ 2) • ↑(↑f'' w) w\ng_deriv : ∀ (t : ℝ), t ∈ Icc 0 1 → HasDerivWithinAt g (g' t) (Icc 0 1) t\nt : ℝ\nht : t ∈ Ico 0 1\nI : ‖h • v + (t * h) • w‖ ≤ h * (‖v‖ + ‖w‖)\n⊢ ‖h • v + (t * h) • w‖ < δ\n[PROOFSTEP]\nexact I.trans_lt hδ\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : ∀ ⦃c : ℝ⦄, 0 < c → ∀ᶠ (x_1 : E) in 𝓝[interior s] x, ‖f' x_1 - f' x - ↑f'' (x_1 - x)‖ ≤ c * ‖x_1 - x‖\nv w : E\nhv : x + v ∈ interior s\nhw : x + v + w ∈ interior s\nε : ℝ\nεpos : 0 < ε\nδ : ℝ\nδpos : δ > 0\nsδ : Metric.ball x δ ∩ interior s ⊆ {x_1 | (fun x_2 => ‖f' x_2 - f' x - ↑f'' (x_2 - x)‖ ≤ ε * ‖x_2 - x‖) x_1}\nE1 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h * (‖v‖ + ‖w‖) < δ\nE2 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h < 1\nh : ℝ\nhδ : h * (‖v‖ + ‖w‖) < δ\nh_lt_1 : h < 1\nhpos : 0 < h\nxt_mem : ∀ (t : ℝ), t ∈ Icc 0 1 → x + h • v + (t * h) • w ∈ interior s\ng : ℝ → F :=\n  fun t =>\n    f (x + h • v + (t * h) • w) - (t * h) • ↑(f' x) w - (t * h ^ 2) • ↑(↑f'' v) w - ((t * h) ^ 2 / 2) • ↑(↑f'' w) w\ng' : ℝ → (fun x => F) (h • w) :=\n  fun t => ↑(f' (x + h • v + (t * h) • w)) (h • w) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (t * h ^ 2) • ↑(↑f'' w) w\nhg' :\n  g' = fun t =>\n    ↑(f' (x + h • v + (t * h) • w)) (h • w) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (t * h ^ 2) • ↑(↑f'' w) w\ng_deriv : ∀ (t : ℝ), t ∈ Icc 0 1 → HasDerivWithinAt g (g' t) (Icc 0 1) t\nt : ℝ\nht : t ∈ Ico 0 1\nI : ‖h • v + (t * h) • w‖ ≤ h * (‖v‖ + ‖w‖)\nH : x + h • v + (t * h) • w ∈ Metric.ball x δ ∩ interior s\n⊢ ‖f' (x + h • v + (t * h) • w) - f' x - ↑f'' (h • v + (t * h) • w)‖ ≤ ε * ‖h • v + (t * h) • w‖\n[PROOFSTEP]\nsimpa only [mem_setOf_eq, add_assoc x, add_sub_cancel'] using sδ H\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : ∀ ⦃c : ℝ⦄, 0 < c → ∀ᶠ (x_1 : E) in 𝓝[interior s] x, ‖f' x_1 - f' x - ↑f'' (x_1 - x)‖ ≤ c * ‖x_1 - x‖\nv w : E\nhv : x + v ∈ interior s\nhw : x + v + w ∈ interior s\nε : ℝ\nεpos : 0 < ε\nδ : ℝ\nδpos : δ > 0\nsδ : Metric.ball x δ ∩ interior s ⊆ {x_1 | (fun x_2 => ‖f' x_2 - f' x - ↑f'' (x_2 - x)‖ ≤ ε * ‖x_2 - x‖) x_1}\nE1 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h * (‖v‖ + ‖w‖) < δ\nE2 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h < 1\nh : ℝ\nhδ : h * (‖v‖ + ‖w‖) < δ\nh_lt_1 : h < 1\nhpos : 0 < h\nxt_mem : ∀ (t : ℝ), t ∈ Icc 0 1 → x + h • v + (t * h) • w ∈ interior s\ng : ℝ → F :=\n  fun t =>\n    f (x + h • v + (t * h) • w) - (t * h) • ↑(f' x) w - (t * h ^ 2) • ↑(↑f'' v) w - ((t * h) ^ 2 / 2) • ↑(↑f'' w) w\ng' : ℝ → (fun x => F) (h • w) :=\n  fun t => ↑(f' (x + h • v + (t * h) • w)) (h • w) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (t * h ^ 2) • ↑(↑f'' w) w\nhg' :\n  g' = fun t =>\n    ↑(f' (x + h • v + (t * h) • w)) (h • w) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (t * h ^ 2) • ↑(↑f'' w) w\ng_deriv : ∀ (t : ℝ), t ∈ Icc 0 1 → HasDerivWithinAt g (g' t) (Icc 0 1) t\nt : ℝ\nht : t ∈ Ico 0 1\nI : ‖h • v + (t * h) • w‖ ≤ h * (‖v‖ + ‖w‖)\n⊢ ε * ‖h • v + (t * h) • w‖ * ‖h • w‖ ≤ ε * (‖h • v‖ + ‖h • w‖) * ‖h • w‖\n[PROOFSTEP]\ngcongr\n[GOAL]\ncase h.h\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : ∀ ⦃c : ℝ⦄, 0 < c → ∀ᶠ (x_1 : E) in 𝓝[interior s] x, ‖f' x_1 - f' x - ↑f'' (x_1 - x)‖ ≤ c * ‖x_1 - x‖\nv w : E\nhv : x + v ∈ interior s\nhw : x + v + w ∈ interior s\nε : ℝ\nεpos : 0 < ε\nδ : ℝ\nδpos : δ > 0\nsδ : Metric.ball x δ ∩ interior s ⊆ {x_1 | (fun x_2 => ‖f' x_2 - f' x - ↑f'' (x_2 - x)‖ ≤ ε * ‖x_2 - x‖) x_1}\nE1 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h * (‖v‖ + ‖w‖) < δ\nE2 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h < 1\nh : ℝ\nhδ : h * (‖v‖ + ‖w‖) < δ\nh_lt_1 : h < 1\nhpos : 0 < h\nxt_mem : ∀ (t : ℝ), t ∈ Icc 0 1 → x + h • v + (t * h) • w ∈ interior s\ng : ℝ → F :=\n  fun t =>\n    f (x + h • v + (t * h) • w) - (t * h) • ↑(f' x) w - (t * h ^ 2) • ↑(↑f'' v) w - ((t * h) ^ 2 / 2) • ↑(↑f'' w) w\ng' : ℝ → (fun x => F) (h • w) :=\n  fun t => ↑(f' (x + h • v + (t * h) • w)) (h • w) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (t * h ^ 2) • ↑(↑f'' w) w\nhg' :\n  g' = fun t =>\n    ↑(f' (x + h • v + (t * h) • w)) (h • w) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (t * h ^ 2) • ↑(↑f'' w) w\ng_deriv : ∀ (t : ℝ), t ∈ Icc 0 1 → HasDerivWithinAt g (g' t) (Icc 0 1) t\nt : ℝ\nht : t ∈ Ico 0 1\nI : ‖h • v + (t * h) • w‖ ≤ h * (‖v‖ + ‖w‖)\n⊢ ‖h • v + (t * h) • w‖ ≤ ‖h • v‖ + ‖h • w‖\n[PROOFSTEP]\napply (norm_add_le _ _).trans\n[GOAL]\ncase h.h\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : ∀ ⦃c : ℝ⦄, 0 < c → ∀ᶠ (x_1 : E) in 𝓝[interior s] x, ‖f' x_1 - f' x - ↑f'' (x_1 - x)‖ ≤ c * ‖x_1 - x‖\nv w : E\nhv : x + v ∈ interior s\nhw : x + v + w ∈ interior s\nε : ℝ\nεpos : 0 < ε\nδ : ℝ\nδpos : δ > 0\nsδ : Metric.ball x δ ∩ interior s ⊆ {x_1 | (fun x_2 => ‖f' x_2 - f' x - ↑f'' (x_2 - x)‖ ≤ ε * ‖x_2 - x‖) x_1}\nE1 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h * (‖v‖ + ‖w‖) < δ\nE2 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h < 1\nh : ℝ\nhδ : h * (‖v‖ + ‖w‖) < δ\nh_lt_1 : h < 1\nhpos : 0 < h\nxt_mem : ∀ (t : ℝ), t ∈ Icc 0 1 → x + h • v + (t * h) • w ∈ interior s\ng : ℝ → F :=\n  fun t =>\n    f (x + h • v + (t * h) • w) - (t * h) • ↑(f' x) w - (t * h ^ 2) • ↑(↑f'' v) w - ((t * h) ^ 2 / 2) • ↑(↑f'' w) w\ng' : ℝ → (fun x => F) (h • w) :=\n  fun t => ↑(f' (x + h • v + (t * h) • w)) (h • w) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (t * h ^ 2) • ↑(↑f'' w) w\nhg' :\n  g' = fun t =>\n    ↑(f' (x + h • v + (t * h) • w)) (h • w) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (t * h ^ 2) • ↑(↑f'' w) w\ng_deriv : ∀ (t : ℝ), t ∈ Icc 0 1 → HasDerivWithinAt g (g' t) (Icc 0 1) t\nt : ℝ\nht : t ∈ Ico 0 1\nI : ‖h • v + (t * h) • w‖ ≤ h * (‖v‖ + ‖w‖)\n⊢ ‖h • v‖ + ‖(t * h) • w‖ ≤ ‖h • v‖ + ‖h • w‖\n[PROOFSTEP]\ngcongr\n[GOAL]\ncase h.h.bc\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : ∀ ⦃c : ℝ⦄, 0 < c → ∀ᶠ (x_1 : E) in 𝓝[interior s] x, ‖f' x_1 - f' x - ↑f'' (x_1 - x)‖ ≤ c * ‖x_1 - x‖\nv w : E\nhv : x + v ∈ interior s\nhw : x + v + w ∈ interior s\nε : ℝ\nεpos : 0 < ε\nδ : ℝ\nδpos : δ > 0\nsδ : Metric.ball x δ ∩ interior s ⊆ {x_1 | (fun x_2 => ‖f' x_2 - f' x - ↑f'' (x_2 - x)‖ ≤ ε * ‖x_2 - x‖) x_1}\nE1 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h * (‖v‖ + ‖w‖) < δ\nE2 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h < 1\nh : ℝ\nhδ : h * (‖v‖ + ‖w‖) < δ\nh_lt_1 : h < 1\nhpos : 0 < h\nxt_mem : ∀ (t : ℝ), t ∈ Icc 0 1 → x + h • v + (t * h) • w ∈ interior s\ng : ℝ → F :=\n  fun t =>\n    f (x + h • v + (t * h) • w) - (t * h) • ↑(f' x) w - (t * h ^ 2) • ↑(↑f'' v) w - ((t * h) ^ 2 / 2) • ↑(↑f'' w) w\ng' : ℝ → (fun x => F) (h • w) :=\n  fun t => ↑(f' (x + h • v + (t * h) • w)) (h • w) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (t * h ^ 2) • ↑(↑f'' w) w\nhg' :\n  g' = fun t =>\n    ↑(f' (x + h • v + (t * h) • w)) (h • w) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (t * h ^ 2) • ↑(↑f'' w) w\ng_deriv : ∀ (t : ℝ), t ∈ Icc 0 1 → HasDerivWithinAt g (g' t) (Icc 0 1) t\nt : ℝ\nht : t ∈ Ico 0 1\nI : ‖h • v + (t * h) • w‖ ≤ h * (‖v‖ + ‖w‖)\n⊢ ‖(t * h) • w‖ ≤ ‖h • w‖\n[PROOFSTEP]\nsimp only [norm_smul, Real.norm_eq_abs, abs_mul, abs_of_nonneg, ht.1, hpos.le, mul_assoc]\n[GOAL]\ncase h.h.bc\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : ∀ ⦃c : ℝ⦄, 0 < c → ∀ᶠ (x_1 : E) in 𝓝[interior s] x, ‖f' x_1 - f' x - ↑f'' (x_1 - x)‖ ≤ c * ‖x_1 - x‖\nv w : E\nhv : x + v ∈ interior s\nhw : x + v + w ∈ interior s\nε : ℝ\nεpos : 0 < ε\nδ : ℝ\nδpos : δ > 0\nsδ : Metric.ball x δ ∩ interior s ⊆ {x_1 | (fun x_2 => ‖f' x_2 - f' x - ↑f'' (x_2 - x)‖ ≤ ε * ‖x_2 - x‖) x_1}\nE1 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h * (‖v‖ + ‖w‖) < δ\nE2 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h < 1\nh : ℝ\nhδ : h * (‖v‖ + ‖w‖) < δ\nh_lt_1 : h < 1\nhpos : 0 < h\nxt_mem : ∀ (t : ℝ), t ∈ Icc 0 1 → x + h • v + (t * h) • w ∈ interior s\ng : ℝ → F :=\n  fun t =>\n    f (x + h • v + (t * h) • w) - (t * h) • ↑(f' x) w - (t * h ^ 2) • ↑(↑f'' v) w - ((t * h) ^ 2 / 2) • ↑(↑f'' w) w\ng' : ℝ → (fun x => F) (h • w) :=\n  fun t => ↑(f' (x + h • v + (t * h) • w)) (h • w) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (t * h ^ 2) • ↑(↑f'' w) w\nhg' :\n  g' = fun t =>\n    ↑(f' (x + h • v + (t * h) • w)) (h • w) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (t * h ^ 2) • ↑(↑f'' w) w\ng_deriv : ∀ (t : ℝ), t ∈ Icc 0 1 → HasDerivWithinAt g (g' t) (Icc 0 1) t\nt : ℝ\nht : t ∈ Ico 0 1\nI : ‖h • v + (t * h) • w‖ ≤ h * (‖v‖ + ‖w‖)\n⊢ t * (h * ‖w‖) ≤ h * ‖w‖\n[PROOFSTEP]\nexact mul_le_of_le_one_left (mul_nonneg hpos.le (norm_nonneg _)) ht.2.le\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : ∀ ⦃c : ℝ⦄, 0 < c → ∀ᶠ (x_1 : E) in 𝓝[interior s] x, ‖f' x_1 - f' x - ↑f'' (x_1 - x)‖ ≤ c * ‖x_1 - x‖\nv w : E\nhv : x + v ∈ interior s\nhw : x + v + w ∈ interior s\nε : ℝ\nεpos : 0 < ε\nδ : ℝ\nδpos : δ > 0\nsδ : Metric.ball x δ ∩ interior s ⊆ {x_1 | (fun x_2 => ‖f' x_2 - f' x - ↑f'' (x_2 - x)‖ ≤ ε * ‖x_2 - x‖) x_1}\nE1 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h * (‖v‖ + ‖w‖) < δ\nE2 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h < 1\nh : ℝ\nhδ : h * (‖v‖ + ‖w‖) < δ\nh_lt_1 : h < 1\nhpos : 0 < h\nxt_mem : ∀ (t : ℝ), t ∈ Icc 0 1 → x + h • v + (t * h) • w ∈ interior s\ng : ℝ → F :=\n  fun t =>\n    f (x + h • v + (t * h) • w) - (t * h) • ↑(f' x) w - (t * h ^ 2) • ↑(↑f'' v) w - ((t * h) ^ 2 / 2) • ↑(↑f'' w) w\ng' : ℝ → (fun x => F) (h • w) :=\n  fun t => ↑(f' (x + h • v + (t * h) • w)) (h • w) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (t * h ^ 2) • ↑(↑f'' w) w\nhg' :\n  g' = fun t =>\n    ↑(f' (x + h • v + (t * h) • w)) (h • w) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (t * h ^ 2) • ↑(↑f'' w) w\ng_deriv : ∀ (t : ℝ), t ∈ Icc 0 1 → HasDerivWithinAt g (g' t) (Icc 0 1) t\nt : ℝ\nht : t ∈ Ico 0 1\nI : ‖h • v + (t * h) • w‖ ≤ h * (‖v‖ + ‖w‖)\n⊢ ε * (‖h • v‖ + ‖h • w‖) * ‖h • w‖ = ε * ((‖v‖ + ‖w‖) * ‖w‖) * h ^ 2\n[PROOFSTEP]\nsimp only [norm_smul, Real.norm_eq_abs, abs_mul, abs_of_nonneg, hpos.le]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : ∀ ⦃c : ℝ⦄, 0 < c → ∀ᶠ (x_1 : E) in 𝓝[interior s] x, ‖f' x_1 - f' x - ↑f'' (x_1 - x)‖ ≤ c * ‖x_1 - x‖\nv w : E\nhv : x + v ∈ interior s\nhw : x + v + w ∈ interior s\nε : ℝ\nεpos : 0 < ε\nδ : ℝ\nδpos : δ > 0\nsδ : Metric.ball x δ ∩ interior s ⊆ {x_1 | (fun x_2 => ‖f' x_2 - f' x - ↑f'' (x_2 - x)‖ ≤ ε * ‖x_2 - x‖) x_1}\nE1 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h * (‖v‖ + ‖w‖) < δ\nE2 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h < 1\nh : ℝ\nhδ : h * (‖v‖ + ‖w‖) < δ\nh_lt_1 : h < 1\nhpos : 0 < h\nxt_mem : ∀ (t : ℝ), t ∈ Icc 0 1 → x + h • v + (t * h) • w ∈ interior s\ng : ℝ → F :=\n  fun t =>\n    f (x + h • v + (t * h) • w) - (t * h) • ↑(f' x) w - (t * h ^ 2) • ↑(↑f'' v) w - ((t * h) ^ 2 / 2) • ↑(↑f'' w) w\ng' : ℝ → (fun x => F) (h • w) :=\n  fun t => ↑(f' (x + h • v + (t * h) • w)) (h • w) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (t * h ^ 2) • ↑(↑f'' w) w\nhg' :\n  g' = fun t =>\n    ↑(f' (x + h • v + (t * h) • w)) (h • w) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (t * h ^ 2) • ↑(↑f'' w) w\ng_deriv : ∀ (t : ℝ), t ∈ Icc 0 1 → HasDerivWithinAt g (g' t) (Icc 0 1) t\nt : ℝ\nht : t ∈ Ico 0 1\nI : ‖h • v + (t * h) • w‖ ≤ h * (‖v‖ + ‖w‖)\n⊢ ε * (h * ‖v‖ + h * ‖w‖) * (h * ‖w‖) = ε * ((‖v‖ + ‖w‖) * ‖w‖) * h ^ 2\n[PROOFSTEP]\nring\n  -- conclude using the mean value inequality\n[GOAL]\ncase h\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : ∀ ⦃c : ℝ⦄, 0 < c → ∀ᶠ (x_1 : E) in 𝓝[interior s] x, ‖f' x_1 - f' x - ↑f'' (x_1 - x)‖ ≤ c * ‖x_1 - x‖\nv w : E\nhv : x + v ∈ interior s\nhw : x + v + w ∈ interior s\nε : ℝ\nεpos : 0 < ε\nδ : ℝ\nδpos : δ > 0\nsδ : Metric.ball x δ ∩ interior s ⊆ {x_1 | (fun x_2 => ‖f' x_2 - f' x - ↑f'' (x_2 - x)‖ ≤ ε * ‖x_2 - x‖) x_1}\nE1 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h * (‖v‖ + ‖w‖) < δ\nE2 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h < 1\nh : ℝ\nhδ : h * (‖v‖ + ‖w‖) < δ\nh_lt_1 : h < 1\nhpos : 0 < h\nxt_mem : ∀ (t : ℝ), t ∈ Icc 0 1 → x + h • v + (t * h) • w ∈ interior s\ng : ℝ → F :=\n  fun t =>\n    f (x + h • v + (t * h) • w) - (t * h) • ↑(f' x) w - (t * h ^ 2) • ↑(↑f'' v) w - ((t * h) ^ 2 / 2) • ↑(↑f'' w) w\ng' : ℝ → (fun x => F) (h • w) :=\n  fun t => ↑(f' (x + h • v + (t * h) • w)) (h • w) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (t * h ^ 2) • ↑(↑f'' w) w\nhg' :\n  g' = fun t =>\n    ↑(f' (x + h • v + (t * h) • w)) (h • w) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (t * h ^ 2) • ↑(↑f'' w) w\ng_deriv : ∀ (t : ℝ), t ∈ Icc 0 1 → HasDerivWithinAt g (g' t) (Icc 0 1) t\ng'_bound : ∀ (t : ℝ), t ∈ Ico 0 1 → ‖g' t‖ ≤ ε * ((‖v‖ + ‖w‖) * ‖w‖) * h ^ 2\n⊢ ‖f (x + h • v + h • w) - f (x + h • v) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (h ^ 2 / 2) • ↑(↑f'' w) w‖ ≤\n    ε * ‖(‖v‖ + ‖w‖) * ‖w‖ * h ^ 2‖\n[PROOFSTEP]\nhave I : ‖g 1 - g 0‖ ≤ ε * ((‖v‖ + ‖w‖) * ‖w‖) * h ^ 2 := by\n  simpa only [mul_one, sub_zero] using\n    norm_image_sub_le_of_norm_deriv_le_segment' g_deriv g'_bound 1 (right_mem_Icc.2 zero_le_one)\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : ∀ ⦃c : ℝ⦄, 0 < c → ∀ᶠ (x_1 : E) in 𝓝[interior s] x, ‖f' x_1 - f' x - ↑f'' (x_1 - x)‖ ≤ c * ‖x_1 - x‖\nv w : E\nhv : x + v ∈ interior s\nhw : x + v + w ∈ interior s\nε : ℝ\nεpos : 0 < ε\nδ : ℝ\nδpos : δ > 0\nsδ : Metric.ball x δ ∩ interior s ⊆ {x_1 | (fun x_2 => ‖f' x_2 - f' x - ↑f'' (x_2 - x)‖ ≤ ε * ‖x_2 - x‖) x_1}\nE1 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h * (‖v‖ + ‖w‖) < δ\nE2 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h < 1\nh : ℝ\nhδ : h * (‖v‖ + ‖w‖) < δ\nh_lt_1 : h < 1\nhpos : 0 < h\nxt_mem : ∀ (t : ℝ), t ∈ Icc 0 1 → x + h • v + (t * h) • w ∈ interior s\ng : ℝ → F :=\n  fun t =>\n    f (x + h • v + (t * h) • w) - (t * h) • ↑(f' x) w - (t * h ^ 2) • ↑(↑f'' v) w - ((t * h) ^ 2 / 2) • ↑(↑f'' w) w\ng' : ℝ → (fun x => F) (h • w) :=\n  fun t => ↑(f' (x + h • v + (t * h) • w)) (h • w) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (t * h ^ 2) • ↑(↑f'' w) w\nhg' :\n  g' = fun t =>\n    ↑(f' (x + h • v + (t * h) • w)) (h • w) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (t * h ^ 2) • ↑(↑f'' w) w\ng_deriv : ∀ (t : ℝ), t ∈ Icc 0 1 → HasDerivWithinAt g (g' t) (Icc 0 1) t\ng'_bound : ∀ (t : ℝ), t ∈ Ico 0 1 → ‖g' t‖ ≤ ε * ((‖v‖ + ‖w‖) * ‖w‖) * h ^ 2\n⊢ ‖g 1 - g 0‖ ≤ ε * ((‖v‖ + ‖w‖) * ‖w‖) * h ^ 2\n[PROOFSTEP]\nsimpa only [mul_one, sub_zero] using\n  norm_image_sub_le_of_norm_deriv_le_segment' g_deriv g'_bound 1 (right_mem_Icc.2 zero_le_one)\n[GOAL]\ncase h\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : ∀ ⦃c : ℝ⦄, 0 < c → ∀ᶠ (x_1 : E) in 𝓝[interior s] x, ‖f' x_1 - f' x - ↑f'' (x_1 - x)‖ ≤ c * ‖x_1 - x‖\nv w : E\nhv : x + v ∈ interior s\nhw : x + v + w ∈ interior s\nε : ℝ\nεpos : 0 < ε\nδ : ℝ\nδpos : δ > 0\nsδ : Metric.ball x δ ∩ interior s ⊆ {x_1 | (fun x_2 => ‖f' x_2 - f' x - ↑f'' (x_2 - x)‖ ≤ ε * ‖x_2 - x‖) x_1}\nE1 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h * (‖v‖ + ‖w‖) < δ\nE2 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h < 1\nh : ℝ\nhδ : h * (‖v‖ + ‖w‖) < δ\nh_lt_1 : h < 1\nhpos : 0 < h\nxt_mem : ∀ (t : ℝ), t ∈ Icc 0 1 → x + h • v + (t * h) • w ∈ interior s\ng : ℝ → F :=\n  fun t =>\n    f (x + h • v + (t * h) • w) - (t * h) • ↑(f' x) w - (t * h ^ 2) • ↑(↑f'' v) w - ((t * h) ^ 2 / 2) • ↑(↑f'' w) w\ng' : ℝ → (fun x => F) (h • w) :=\n  fun t => ↑(f' (x + h • v + (t * h) • w)) (h • w) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (t * h ^ 2) • ↑(↑f'' w) w\nhg' :\n  g' = fun t =>\n    ↑(f' (x + h • v + (t * h) • w)) (h • w) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (t * h ^ 2) • ↑(↑f'' w) w\ng_deriv : ∀ (t : ℝ), t ∈ Icc 0 1 → HasDerivWithinAt g (g' t) (Icc 0 1) t\ng'_bound : ∀ (t : ℝ), t ∈ Ico 0 1 → ‖g' t‖ ≤ ε * ((‖v‖ + ‖w‖) * ‖w‖) * h ^ 2\nI : ‖g 1 - g 0‖ ≤ ε * ((‖v‖ + ‖w‖) * ‖w‖) * h ^ 2\n⊢ ‖f (x + h • v + h • w) - f (x + h • v) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (h ^ 2 / 2) • ↑(↑f'' w) w‖ ≤\n    ε * ‖(‖v‖ + ‖w‖) * ‖w‖ * h ^ 2‖\n[PROOFSTEP]\nconvert I using 1\n[GOAL]\ncase h.e'_3\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : ∀ ⦃c : ℝ⦄, 0 < c → ∀ᶠ (x_1 : E) in 𝓝[interior s] x, ‖f' x_1 - f' x - ↑f'' (x_1 - x)‖ ≤ c * ‖x_1 - x‖\nv w : E\nhv : x + v ∈ interior s\nhw : x + v + w ∈ interior s\nε : ℝ\nεpos : 0 < ε\nδ : ℝ\nδpos : δ > 0\nsδ : Metric.ball x δ ∩ interior s ⊆ {x_1 | (fun x_2 => ‖f' x_2 - f' x - ↑f'' (x_2 - x)‖ ≤ ε * ‖x_2 - x‖) x_1}\nE1 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h * (‖v‖ + ‖w‖) < δ\nE2 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h < 1\nh : ℝ\nhδ : h * (‖v‖ + ‖w‖) < δ\nh_lt_1 : h < 1\nhpos : 0 < h\nxt_mem : ∀ (t : ℝ), t ∈ Icc 0 1 → x + h • v + (t * h) • w ∈ interior s\ng : ℝ → F :=\n  fun t =>\n    f (x + h • v + (t * h) • w) - (t * h) • ↑(f' x) w - (t * h ^ 2) • ↑(↑f'' v) w - ((t * h) ^ 2 / 2) • ↑(↑f'' w) w\ng' : ℝ → (fun x => F) (h • w) :=\n  fun t => ↑(f' (x + h • v + (t * h) • w)) (h • w) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (t * h ^ 2) • ↑(↑f'' w) w\nhg' :\n  g' = fun t =>\n    ↑(f' (x + h • v + (t * h) • w)) (h • w) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (t * h ^ 2) • ↑(↑f'' w) w\ng_deriv : ∀ (t : ℝ), t ∈ Icc 0 1 → HasDerivWithinAt g (g' t) (Icc 0 1) t\ng'_bound : ∀ (t : ℝ), t ∈ Ico 0 1 → ‖g' t‖ ≤ ε * ((‖v‖ + ‖w‖) * ‖w‖) * h ^ 2\nI : ‖g 1 - g 0‖ ≤ ε * ((‖v‖ + ‖w‖) * ‖w‖) * h ^ 2\n⊢ ‖f (x + h • v + h • w) - f (x + h • v) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (h ^ 2 / 2) • ↑(↑f'' w) w‖ =\n    ‖g 1 - g 0‖\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase h.e'_3.e_a\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : ∀ ⦃c : ℝ⦄, 0 < c → ∀ᶠ (x_1 : E) in 𝓝[interior s] x, ‖f' x_1 - f' x - ↑f'' (x_1 - x)‖ ≤ c * ‖x_1 - x‖\nv w : E\nhv : x + v ∈ interior s\nhw : x + v + w ∈ interior s\nε : ℝ\nεpos : 0 < ε\nδ : ℝ\nδpos : δ > 0\nsδ : Metric.ball x δ ∩ interior s ⊆ {x_1 | (fun x_2 => ‖f' x_2 - f' x - ↑f'' (x_2 - x)‖ ≤ ε * ‖x_2 - x‖) x_1}\nE1 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h * (‖v‖ + ‖w‖) < δ\nE2 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h < 1\nh : ℝ\nhδ : h * (‖v‖ + ‖w‖) < δ\nh_lt_1 : h < 1\nhpos : 0 < h\nxt_mem : ∀ (t : ℝ), t ∈ Icc 0 1 → x + h • v + (t * h) • w ∈ interior s\ng : ℝ → F :=\n  fun t =>\n    f (x + h • v + (t * h) • w) - (t * h) • ↑(f' x) w - (t * h ^ 2) • ↑(↑f'' v) w - ((t * h) ^ 2 / 2) • ↑(↑f'' w) w\ng' : ℝ → (fun x => F) (h • w) :=\n  fun t => ↑(f' (x + h • v + (t * h) • w)) (h • w) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (t * h ^ 2) • ↑(↑f'' w) w\nhg' :\n  g' = fun t =>\n    ↑(f' (x + h • v + (t * h) • w)) (h • w) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (t * h ^ 2) • ↑(↑f'' w) w\ng_deriv : ∀ (t : ℝ), t ∈ Icc 0 1 → HasDerivWithinAt g (g' t) (Icc 0 1) t\ng'_bound : ∀ (t : ℝ), t ∈ Ico 0 1 → ‖g' t‖ ≤ ε * ((‖v‖ + ‖w‖) * ‖w‖) * h ^ 2\nI : ‖g 1 - g 0‖ ≤ ε * ((‖v‖ + ‖w‖) * ‖w‖) * h ^ 2\n⊢ f (x + h • v + h • w) - f (x + h • v) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (h ^ 2 / 2) • ↑(↑f'' w) w = g 1 - g 0\n[PROOFSTEP]\nsimp only [Nat.one_ne_zero, add_zero, one_mul, zero_div, zero_mul, sub_zero, zero_smul, Ne.def, not_false_iff,\n  bit0_eq_zero, zero_pow']\n[GOAL]\ncase h.e'_3.e_a\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : ∀ ⦃c : ℝ⦄, 0 < c → ∀ᶠ (x_1 : E) in 𝓝[interior s] x, ‖f' x_1 - f' x - ↑f'' (x_1 - x)‖ ≤ c * ‖x_1 - x‖\nv w : E\nhv : x + v ∈ interior s\nhw : x + v + w ∈ interior s\nε : ℝ\nεpos : 0 < ε\nδ : ℝ\nδpos : δ > 0\nsδ : Metric.ball x δ ∩ interior s ⊆ {x_1 | (fun x_2 => ‖f' x_2 - f' x - ↑f'' (x_2 - x)‖ ≤ ε * ‖x_2 - x‖) x_1}\nE1 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h * (‖v‖ + ‖w‖) < δ\nE2 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h < 1\nh : ℝ\nhδ : h * (‖v‖ + ‖w‖) < δ\nh_lt_1 : h < 1\nhpos : 0 < h\nxt_mem : ∀ (t : ℝ), t ∈ Icc 0 1 → x + h • v + (t * h) • w ∈ interior s\ng : ℝ → F :=\n  fun t =>\n    f (x + h • v + (t * h) • w) - (t * h) • ↑(f' x) w - (t * h ^ 2) • ↑(↑f'' v) w - ((t * h) ^ 2 / 2) • ↑(↑f'' w) w\ng' : ℝ → (fun x => F) (h • w) :=\n  fun t => ↑(f' (x + h • v + (t * h) • w)) (h • w) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (t * h ^ 2) • ↑(↑f'' w) w\nhg' :\n  g' = fun t =>\n    ↑(f' (x + h • v + (t * h) • w)) (h • w) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (t * h ^ 2) • ↑(↑f'' w) w\ng_deriv : ∀ (t : ℝ), t ∈ Icc 0 1 → HasDerivWithinAt g (g' t) (Icc 0 1) t\ng'_bound : ∀ (t : ℝ), t ∈ Ico 0 1 → ‖g' t‖ ≤ ε * ((‖v‖ + ‖w‖) * ‖w‖) * h ^ 2\nI : ‖g 1 - g 0‖ ≤ ε * ((‖v‖ + ‖w‖) * ‖w‖) * h ^ 2\n⊢ f (x + h • v + h • w) - f (x + h • v) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (h ^ 2 / 2) • ↑(↑f'' w) w =\n    f (x + h • v + h • w) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (h ^ 2 / 2) • ↑(↑f'' w) w - f (x + h • v)\n[PROOFSTEP]\nabel\n[GOAL]\ncase h.e'_3.e_a\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : ∀ ⦃c : ℝ⦄, 0 < c → ∀ᶠ (x_1 : E) in 𝓝[interior s] x, ‖f' x_1 - f' x - ↑f'' (x_1 - x)‖ ≤ c * ‖x_1 - x‖\nv w : E\nhv : x + v ∈ interior s\nhw : x + v + w ∈ interior s\nε : ℝ\nεpos : 0 < ε\nδ : ℝ\nδpos : δ > 0\nsδ : Metric.ball x δ ∩ interior s ⊆ {x_1 | (fun x_2 => ‖f' x_2 - f' x - ↑f'' (x_2 - x)‖ ≤ ε * ‖x_2 - x‖) x_1}\nE1 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h * (‖v‖ + ‖w‖) < δ\nE2 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h < 1\nh : ℝ\nhδ : h * (‖v‖ + ‖w‖) < δ\nh_lt_1 : h < 1\nhpos : 0 < h\nxt_mem : ∀ (t : ℝ), t ∈ Icc 0 1 → x + h • v + (t * h) • w ∈ interior s\ng : ℝ → F :=\n  fun t =>\n    f (x + h • v + (t * h) • w) - (t * h) • ↑(f' x) w - (t * h ^ 2) • ↑(↑f'' v) w - ((t * h) ^ 2 / 2) • ↑(↑f'' w) w\ng' : ℝ → (fun x => F) (h • w) :=\n  fun t => ↑(f' (x + h • v + (t * h) • w)) (h • w) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (t * h ^ 2) • ↑(↑f'' w) w\nhg' :\n  g' = fun t =>\n    ↑(f' (x + h • v + (t * h) • w)) (h • w) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (t * h ^ 2) • ↑(↑f'' w) w\ng_deriv : ∀ (t : ℝ), t ∈ Icc 0 1 → HasDerivWithinAt g (g' t) (Icc 0 1) t\ng'_bound : ∀ (t : ℝ), t ∈ Ico 0 1 → ‖g' t‖ ≤ ε * ((‖v‖ + ‖w‖) * ‖w‖) * h ^ 2\nI : ‖g 1 - g 0‖ ≤ ε * ((‖v‖ + ‖w‖) * ‖w‖) * h ^ 2\n⊢ f (x + h • v + h • w) - f (x + h • v) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (h ^ 2 / 2) • ↑(↑f'' w) w =\n    f (x + h • v + h • w) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (h ^ 2 / 2) • ↑(↑f'' w) w - f (x + h • v)\n[PROOFSTEP]\nabel\n[GOAL]\ncase h.e'_4\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : ∀ ⦃c : ℝ⦄, 0 < c → ∀ᶠ (x_1 : E) in 𝓝[interior s] x, ‖f' x_1 - f' x - ↑f'' (x_1 - x)‖ ≤ c * ‖x_1 - x‖\nv w : E\nhv : x + v ∈ interior s\nhw : x + v + w ∈ interior s\nε : ℝ\nεpos : 0 < ε\nδ : ℝ\nδpos : δ > 0\nsδ : Metric.ball x δ ∩ interior s ⊆ {x_1 | (fun x_2 => ‖f' x_2 - f' x - ↑f'' (x_2 - x)‖ ≤ ε * ‖x_2 - x‖) x_1}\nE1 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h * (‖v‖ + ‖w‖) < δ\nE2 : ∀ᶠ (h : ℝ) in 𝓝[Ioi 0] 0, h < 1\nh : ℝ\nhδ : h * (‖v‖ + ‖w‖) < δ\nh_lt_1 : h < 1\nhpos : 0 < h\nxt_mem : ∀ (t : ℝ), t ∈ Icc 0 1 → x + h • v + (t * h) • w ∈ interior s\ng : ℝ → F :=\n  fun t =>\n    f (x + h • v + (t * h) • w) - (t * h) • ↑(f' x) w - (t * h ^ 2) • ↑(↑f'' v) w - ((t * h) ^ 2 / 2) • ↑(↑f'' w) w\ng' : ℝ → (fun x => F) (h • w) :=\n  fun t => ↑(f' (x + h • v + (t * h) • w)) (h • w) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (t * h ^ 2) • ↑(↑f'' w) w\nhg' :\n  g' = fun t =>\n    ↑(f' (x + h • v + (t * h) • w)) (h • w) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' v) w - (t * h ^ 2) • ↑(↑f'' w) w\ng_deriv : ∀ (t : ℝ), t ∈ Icc 0 1 → HasDerivWithinAt g (g' t) (Icc 0 1) t\ng'_bound : ∀ (t : ℝ), t ∈ Ico 0 1 → ‖g' t‖ ≤ ε * ((‖v‖ + ‖w‖) * ‖w‖) * h ^ 2\nI : ‖g 1 - g 0‖ ≤ ε * ((‖v‖ + ‖w‖) * ‖w‖) * h ^ 2\n⊢ ε * ‖(‖v‖ + ‖w‖) * ‖w‖ * h ^ 2‖ = ε * ((‖v‖ + ‖w‖) * ‖w‖) * h ^ 2\n[PROOFSTEP]\nsimp only [Real.norm_eq_abs, abs_mul, add_nonneg (norm_nonneg v) (norm_nonneg w), abs_of_nonneg, hpos.le, mul_assoc,\n  pow_bit0_abs, norm_nonneg, abs_pow]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w : E\nh4v : x + 4 • v ∈ interior s\nh4w : x + 4 • w ∈ interior s\n⊢ (fun h =>\n      f (x + h • (2 • v + 2 • w)) + f (x + h • (v + w)) - f (x + h • (2 • v + w)) - f (x + h • (v + 2 • w)) -\n        h ^ 2 • ↑(↑f'' v) w) =o[𝓝[Ioi 0] 0]\n    fun h => h ^ 2\n[PROOFSTEP]\nhave A : (1 : ℝ) / 2 ∈ Ioc (0 : ℝ) 1 := ⟨by norm_num, by norm_num⟩\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w : E\nh4v : x + 4 • v ∈ interior s\nh4w : x + 4 • w ∈ interior s\n⊢ 0 < 1 / 2\n[PROOFSTEP]\nnorm_num\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w : E\nh4v : x + 4 • v ∈ interior s\nh4w : x + 4 • w ∈ interior s\n⊢ 1 / 2 ≤ 1\n[PROOFSTEP]\nnorm_num\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w : E\nh4v : x + 4 • v ∈ interior s\nh4w : x + 4 • w ∈ interior s\nA : 1 / 2 ∈ Ioc 0 1\n⊢ (fun h =>\n      f (x + h • (2 • v + 2 • w)) + f (x + h • (v + w)) - f (x + h • (2 • v + w)) - f (x + h • (v + 2 • w)) -\n        h ^ 2 • ↑(↑f'' v) w) =o[𝓝[Ioi 0] 0]\n    fun h => h ^ 2\n[PROOFSTEP]\nhave B : (1 : ℝ) / 2 ∈ Icc (0 : ℝ) 1 := ⟨by norm_num, by norm_num⟩\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w : E\nh4v : x + 4 • v ∈ interior s\nh4w : x + 4 • w ∈ interior s\nA : 1 / 2 ∈ Ioc 0 1\n⊢ 0 ≤ 1 / 2\n[PROOFSTEP]\nnorm_num\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w : E\nh4v : x + 4 • v ∈ interior s\nh4w : x + 4 • w ∈ interior s\nA : 1 / 2 ∈ Ioc 0 1\n⊢ 1 / 2 ≤ 1\n[PROOFSTEP]\nnorm_num\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w : E\nh4v : x + 4 • v ∈ interior s\nh4w : x + 4 • w ∈ interior s\nA : 1 / 2 ∈ Ioc 0 1\nB : 1 / 2 ∈ Icc 0 1\n⊢ (fun h =>\n      f (x + h • (2 • v + 2 • w)) + f (x + h • (v + w)) - f (x + h • (2 • v + w)) - f (x + h • (v + 2 • w)) -\n        h ^ 2 • ↑(↑f'' v) w) =o[𝓝[Ioi 0] 0]\n    fun h => h ^ 2\n[PROOFSTEP]\nhave C : ∀ w : E, (2 : ℝ) • w = 2 • w := fun w => by simp only [two_smul]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w✝ : E\nh4v : x + 4 • v ∈ interior s\nh4w : x + 4 • w✝ ∈ interior s\nA : 1 / 2 ∈ Ioc 0 1\nB : 1 / 2 ∈ Icc 0 1\nw : E\n⊢ 2 • w = 2 • w\n[PROOFSTEP]\nsimp only [two_smul]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w : E\nh4v : x + 4 • v ∈ interior s\nh4w : x + 4 • w ∈ interior s\nA : 1 / 2 ∈ Ioc 0 1\nB : 1 / 2 ∈ Icc 0 1\nC : ∀ (w : E), 2 • w = 2 • w\n⊢ (fun h =>\n      f (x + h • (2 • v + 2 • w)) + f (x + h • (v + w)) - f (x + h • (2 • v + w)) - f (x + h • (v + 2 • w)) -\n        h ^ 2 • ↑(↑f'' v) w) =o[𝓝[Ioi 0] 0]\n    fun h => h ^ 2\n[PROOFSTEP]\nhave h2v2w : x + (2 : ℝ) • v + (2 : ℝ) • w ∈ interior s :=\n  by\n  convert s_conv.interior.add_smul_sub_mem h4v h4w B using 1\n  simp only [smul_sub, smul_smul, one_div, add_sub_add_left_eq_sub, mul_add, add_smul]\n  norm_num\n  simp only [show (4 : ℝ) = (2 : ℝ) + (2 : ℝ) by norm_num, _root_.add_smul]\n  abel\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w : E\nh4v : x + 4 • v ∈ interior s\nh4w : x + 4 • w ∈ interior s\nA : 1 / 2 ∈ Ioc 0 1\nB : 1 / 2 ∈ Icc 0 1\nC : ∀ (w : E), 2 • w = 2 • w\n⊢ x + 2 • v + 2 • w ∈ interior s\n[PROOFSTEP]\nconvert s_conv.interior.add_smul_sub_mem h4v h4w B using 1\n[GOAL]\ncase h.e'_4\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w : E\nh4v : x + 4 • v ∈ interior s\nh4w : x + 4 • w ∈ interior s\nA : 1 / 2 ∈ Ioc 0 1\nB : 1 / 2 ∈ Icc 0 1\nC : ∀ (w : E), 2 • w = 2 • w\n⊢ x + 2 • v + 2 • w = x + 4 • v + (1 / 2) • (x + 4 • w - (x + 4 • v))\n[PROOFSTEP]\nsimp only [smul_sub, smul_smul, one_div, add_sub_add_left_eq_sub, mul_add, add_smul]\n[GOAL]\ncase h.e'_4\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w : E\nh4v : x + 4 • v ∈ interior s\nh4w : x + 4 • w ∈ interior s\nA : 1 / 2 ∈ Ioc 0 1\nB : 1 / 2 ∈ Icc 0 1\nC : ∀ (w : E), 2 • w = 2 • w\n⊢ x + 2 • v + 2 • w = x + 4 • v + ((2⁻¹ * 4) • w - (2⁻¹ * 4) • v)\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase h.e'_4\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w : E\nh4v : x + 4 • v ∈ interior s\nh4w : x + 4 • w ∈ interior s\nA : 1 / 2 ∈ Ioc 0 1\nB : 1 / 2 ∈ Icc 0 1\nC : ∀ (w : E), 2 • w = 2 • w\n⊢ x + 2 • v + 2 • w = x + 4 • v + (2 • w - 2 • v)\n[PROOFSTEP]\nsimp only [show (4 : ℝ) = (2 : ℝ) + (2 : ℝ) by norm_num, _root_.add_smul]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w : E\nh4v : x + 4 • v ∈ interior s\nh4w : x + 4 • w ∈ interior s\nA : 1 / 2 ∈ Ioc 0 1\nB : 1 / 2 ∈ Icc 0 1\nC : ∀ (w : E), 2 • w = 2 • w\n⊢ 4 = 2 + 2\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase h.e'_4\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w : E\nh4v : x + 4 • v ∈ interior s\nh4w : x + 4 • w ∈ interior s\nA : 1 / 2 ∈ Ioc 0 1\nB : 1 / 2 ∈ Icc 0 1\nC : ∀ (w : E), 2 • w = 2 • w\n⊢ x + 2 • v + 2 • w = x + (2 • v + 2 • v) + (2 • w - 2 • v)\n[PROOFSTEP]\nabel\n[GOAL]\ncase h.e'_4\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w : E\nh4v : x + 4 • v ∈ interior s\nh4w : x + 4 • w ∈ interior s\nA : 1 / 2 ∈ Ioc 0 1\nB : 1 / 2 ∈ Icc 0 1\nC : ∀ (w : E), 2 • w = 2 • w\n⊢ x + 2 • v + 2 • w = x + (2 • v + 2 • v) + (2 • w - 2 • v)\n[PROOFSTEP]\nabel\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w : E\nh4v : x + 4 • v ∈ interior s\nh4w : x + 4 • w ∈ interior s\nA : 1 / 2 ∈ Ioc 0 1\nB : 1 / 2 ∈ Icc 0 1\nC : ∀ (w : E), 2 • w = 2 • w\nh2v2w : x + 2 • v + 2 • w ∈ interior s\n⊢ (fun h =>\n      f (x + h • (2 • v + 2 • w)) + f (x + h • (v + w)) - f (x + h • (2 • v + w)) - f (x + h • (v + 2 • w)) -\n        h ^ 2 • ↑(↑f'' v) w) =o[𝓝[Ioi 0] 0]\n    fun h => h ^ 2\n[PROOFSTEP]\nhave h2vww : x + (2 • v + w) + w ∈ interior s := by\n  convert h2v2w using 1\n  simp only [two_smul]\n  abel\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w : E\nh4v : x + 4 • v ∈ interior s\nh4w : x + 4 • w ∈ interior s\nA : 1 / 2 ∈ Ioc 0 1\nB : 1 / 2 ∈ Icc 0 1\nC : ∀ (w : E), 2 • w = 2 • w\nh2v2w : x + 2 • v + 2 • w ∈ interior s\n⊢ x + (2 • v + w) + w ∈ interior s\n[PROOFSTEP]\nconvert h2v2w using 1\n[GOAL]\ncase h.e'_4\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w : E\nh4v : x + 4 • v ∈ interior s\nh4w : x + 4 • w ∈ interior s\nA : 1 / 2 ∈ Ioc 0 1\nB : 1 / 2 ∈ Icc 0 1\nC : ∀ (w : E), 2 • w = 2 • w\nh2v2w : x + 2 • v + 2 • w ∈ interior s\n⊢ x + (2 • v + w) + w = x + 2 • v + 2 • w\n[PROOFSTEP]\nsimp only [two_smul]\n[GOAL]\ncase h.e'_4\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w : E\nh4v : x + 4 • v ∈ interior s\nh4w : x + 4 • w ∈ interior s\nA : 1 / 2 ∈ Ioc 0 1\nB : 1 / 2 ∈ Icc 0 1\nC : ∀ (w : E), 2 • w = 2 • w\nh2v2w : x + 2 • v + 2 • w ∈ interior s\n⊢ x + (v + v + w) + w = x + (v + v) + (w + w)\n[PROOFSTEP]\nabel\n[GOAL]\ncase h.e'_4\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w : E\nh4v : x + 4 • v ∈ interior s\nh4w : x + 4 • w ∈ interior s\nA : 1 / 2 ∈ Ioc 0 1\nB : 1 / 2 ∈ Icc 0 1\nC : ∀ (w : E), 2 • w = 2 • w\nh2v2w : x + 2 • v + 2 • w ∈ interior s\n⊢ x + (v + v + w) + w = x + (v + v) + (w + w)\n[PROOFSTEP]\nabel\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w : E\nh4v : x + 4 • v ∈ interior s\nh4w : x + 4 • w ∈ interior s\nA : 1 / 2 ∈ Ioc 0 1\nB : 1 / 2 ∈ Icc 0 1\nC : ∀ (w : E), 2 • w = 2 • w\nh2v2w : x + 2 • v + 2 • w ∈ interior s\nh2vww : x + (2 • v + w) + w ∈ interior s\n⊢ (fun h =>\n      f (x + h • (2 • v + 2 • w)) + f (x + h • (v + w)) - f (x + h • (2 • v + w)) - f (x + h • (v + 2 • w)) -\n        h ^ 2 • ↑(↑f'' v) w) =o[𝓝[Ioi 0] 0]\n    fun h => h ^ 2\n[PROOFSTEP]\nhave h2v : x + (2 : ℝ) • v ∈ interior s :=\n  by\n  convert s_conv.add_smul_sub_mem_interior xs h4v A using 1\n  simp only [smul_smul, one_div, add_sub_cancel', add_right_inj]\n  norm_num\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w : E\nh4v : x + 4 • v ∈ interior s\nh4w : x + 4 • w ∈ interior s\nA : 1 / 2 ∈ Ioc 0 1\nB : 1 / 2 ∈ Icc 0 1\nC : ∀ (w : E), 2 • w = 2 • w\nh2v2w : x + 2 • v + 2 • w ∈ interior s\nh2vww : x + (2 • v + w) + w ∈ interior s\n⊢ x + 2 • v ∈ interior s\n[PROOFSTEP]\nconvert s_conv.add_smul_sub_mem_interior xs h4v A using 1\n[GOAL]\ncase h.e'_4\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w : E\nh4v : x + 4 • v ∈ interior s\nh4w : x + 4 • w ∈ interior s\nA : 1 / 2 ∈ Ioc 0 1\nB : 1 / 2 ∈ Icc 0 1\nC : ∀ (w : E), 2 • w = 2 • w\nh2v2w : x + 2 • v + 2 • w ∈ interior s\nh2vww : x + (2 • v + w) + w ∈ interior s\n⊢ x + 2 • v = x + (1 / 2) • (x + 4 • v - x)\n[PROOFSTEP]\nsimp only [smul_smul, one_div, add_sub_cancel', add_right_inj]\n[GOAL]\ncase h.e'_4\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w : E\nh4v : x + 4 • v ∈ interior s\nh4w : x + 4 • w ∈ interior s\nA : 1 / 2 ∈ Ioc 0 1\nB : 1 / 2 ∈ Icc 0 1\nC : ∀ (w : E), 2 • w = 2 • w\nh2v2w : x + 2 • v + 2 • w ∈ interior s\nh2vww : x + (2 • v + w) + w ∈ interior s\n⊢ 2 • v = (2⁻¹ * 4) • v\n[PROOFSTEP]\nnorm_num\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w : E\nh4v : x + 4 • v ∈ interior s\nh4w : x + 4 • w ∈ interior s\nA : 1 / 2 ∈ Ioc 0 1\nB : 1 / 2 ∈ Icc 0 1\nC : ∀ (w : E), 2 • w = 2 • w\nh2v2w : x + 2 • v + 2 • w ∈ interior s\nh2vww : x + (2 • v + w) + w ∈ interior s\nh2v : x + 2 • v ∈ interior s\n⊢ (fun h =>\n      f (x + h • (2 • v + 2 • w)) + f (x + h • (v + w)) - f (x + h • (2 • v + w)) - f (x + h • (v + 2 • w)) -\n        h ^ 2 • ↑(↑f'' v) w) =o[𝓝[Ioi 0] 0]\n    fun h => h ^ 2\n[PROOFSTEP]\nhave h2w : x + (2 : ℝ) • w ∈ interior s :=\n  by\n  convert s_conv.add_smul_sub_mem_interior xs h4w A using 1\n  simp only [smul_smul, one_div, add_sub_cancel', add_right_inj]\n  norm_num\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w : E\nh4v : x + 4 • v ∈ interior s\nh4w : x + 4 • w ∈ interior s\nA : 1 / 2 ∈ Ioc 0 1\nB : 1 / 2 ∈ Icc 0 1\nC : ∀ (w : E), 2 • w = 2 • w\nh2v2w : x + 2 • v + 2 • w ∈ interior s\nh2vww : x + (2 • v + w) + w ∈ interior s\nh2v : x + 2 • v ∈ interior s\n⊢ x + 2 • w ∈ interior s\n[PROOFSTEP]\nconvert s_conv.add_smul_sub_mem_interior xs h4w A using 1\n[GOAL]\ncase h.e'_4\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w : E\nh4v : x + 4 • v ∈ interior s\nh4w : x + 4 • w ∈ interior s\nA : 1 / 2 ∈ Ioc 0 1\nB : 1 / 2 ∈ Icc 0 1\nC : ∀ (w : E), 2 • w = 2 • w\nh2v2w : x + 2 • v + 2 • w ∈ interior s\nh2vww : x + (2 • v + w) + w ∈ interior s\nh2v : x + 2 • v ∈ interior s\n⊢ x + 2 • w = x + (1 / 2) • (x + 4 • w - x)\n[PROOFSTEP]\nsimp only [smul_smul, one_div, add_sub_cancel', add_right_inj]\n[GOAL]\ncase h.e'_4\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w : E\nh4v : x + 4 • v ∈ interior s\nh4w : x + 4 • w ∈ interior s\nA : 1 / 2 ∈ Ioc 0 1\nB : 1 / 2 ∈ Icc 0 1\nC : ∀ (w : E), 2 • w = 2 • w\nh2v2w : x + 2 • v + 2 • w ∈ interior s\nh2vww : x + (2 • v + w) + w ∈ interior s\nh2v : x + 2 • v ∈ interior s\n⊢ 2 • w = (2⁻¹ * 4) • w\n[PROOFSTEP]\nnorm_num\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w : E\nh4v : x + 4 • v ∈ interior s\nh4w : x + 4 • w ∈ interior s\nA : 1 / 2 ∈ Ioc 0 1\nB : 1 / 2 ∈ Icc 0 1\nC : ∀ (w : E), 2 • w = 2 • w\nh2v2w : x + 2 • v + 2 • w ∈ interior s\nh2vww : x + (2 • v + w) + w ∈ interior s\nh2v : x + 2 • v ∈ interior s\nh2w : x + 2 • w ∈ interior s\n⊢ (fun h =>\n      f (x + h • (2 • v + 2 • w)) + f (x + h • (v + w)) - f (x + h • (2 • v + w)) - f (x + h • (v + 2 • w)) -\n        h ^ 2 • ↑(↑f'' v) w) =o[𝓝[Ioi 0] 0]\n    fun h => h ^ 2\n[PROOFSTEP]\nhave hvw : x + (v + w) ∈ interior s :=\n  by\n  convert s_conv.add_smul_sub_mem_interior xs h2v2w A using 1\n  simp only [smul_smul, one_div, add_sub_cancel', add_right_inj, smul_add, smul_sub]\n  norm_num\n  abel\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w : E\nh4v : x + 4 • v ∈ interior s\nh4w : x + 4 • w ∈ interior s\nA : 1 / 2 ∈ Ioc 0 1\nB : 1 / 2 ∈ Icc 0 1\nC : ∀ (w : E), 2 • w = 2 • w\nh2v2w : x + 2 • v + 2 • w ∈ interior s\nh2vww : x + (2 • v + w) + w ∈ interior s\nh2v : x + 2 • v ∈ interior s\nh2w : x + 2 • w ∈ interior s\n⊢ x + (v + w) ∈ interior s\n[PROOFSTEP]\nconvert s_conv.add_smul_sub_mem_interior xs h2v2w A using 1\n[GOAL]\ncase h.e'_4\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w : E\nh4v : x + 4 • v ∈ interior s\nh4w : x + 4 • w ∈ interior s\nA : 1 / 2 ∈ Ioc 0 1\nB : 1 / 2 ∈ Icc 0 1\nC : ∀ (w : E), 2 • w = 2 • w\nh2v2w : x + 2 • v + 2 • w ∈ interior s\nh2vww : x + (2 • v + w) + w ∈ interior s\nh2v : x + 2 • v ∈ interior s\nh2w : x + 2 • w ∈ interior s\n⊢ x + (v + w) = x + (1 / 2) • (x + 2 • v + 2 • w - x)\n[PROOFSTEP]\nsimp only [smul_smul, one_div, add_sub_cancel', add_right_inj, smul_add, smul_sub]\n[GOAL]\ncase h.e'_4\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w : E\nh4v : x + 4 • v ∈ interior s\nh4w : x + 4 • w ∈ interior s\nA : 1 / 2 ∈ Ioc 0 1\nB : 1 / 2 ∈ Icc 0 1\nC : ∀ (w : E), 2 • w = 2 • w\nh2v2w : x + 2 • v + 2 • w ∈ interior s\nh2vww : x + (2 • v + w) + w ∈ interior s\nh2v : x + 2 • v ∈ interior s\nh2w : x + 2 • w ∈ interior s\n⊢ v + w = 2⁻¹ • x + (2⁻¹ * 2) • v + (2⁻¹ * 2) • w - 2⁻¹ • x\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase h.e'_4\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w : E\nh4v : x + 4 • v ∈ interior s\nh4w : x + 4 • w ∈ interior s\nA : 1 / 2 ∈ Ioc 0 1\nB : 1 / 2 ∈ Icc 0 1\nC : ∀ (w : E), 2 • w = 2 • w\nh2v2w : x + 2 • v + 2 • w ∈ interior s\nh2vww : x + (2 • v + w) + w ∈ interior s\nh2v : x + 2 • v ∈ interior s\nh2w : x + 2 • w ∈ interior s\n⊢ v + w = (1 / 2) • x + v + w - (1 / 2) • x\n[PROOFSTEP]\nabel\n[GOAL]\ncase h.e'_4\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w : E\nh4v : x + 4 • v ∈ interior s\nh4w : x + 4 • w ∈ interior s\nA : 1 / 2 ∈ Ioc 0 1\nB : 1 / 2 ∈ Icc 0 1\nC : ∀ (w : E), 2 • w = 2 • w\nh2v2w : x + 2 • v + 2 • w ∈ interior s\nh2vww : x + (2 • v + w) + w ∈ interior s\nh2v : x + 2 • v ∈ interior s\nh2w : x + 2 • w ∈ interior s\n⊢ v + w = (1 / 2) • x + v + w - (1 / 2) • x\n[PROOFSTEP]\nabel\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w : E\nh4v : x + 4 • v ∈ interior s\nh4w : x + 4 • w ∈ interior s\nA : 1 / 2 ∈ Ioc 0 1\nB : 1 / 2 ∈ Icc 0 1\nC : ∀ (w : E), 2 • w = 2 • w\nh2v2w : x + 2 • v + 2 • w ∈ interior s\nh2vww : x + (2 • v + w) + w ∈ interior s\nh2v : x + 2 • v ∈ interior s\nh2w : x + 2 • w ∈ interior s\nhvw : x + (v + w) ∈ interior s\n⊢ (fun h =>\n      f (x + h • (2 • v + 2 • w)) + f (x + h • (v + w)) - f (x + h • (2 • v + w)) - f (x + h • (v + 2 • w)) -\n        h ^ 2 • ↑(↑f'' v) w) =o[𝓝[Ioi 0] 0]\n    fun h => h ^ 2\n[PROOFSTEP]\nhave h2vw : x + (2 • v + w) ∈ interior s :=\n  by\n  convert s_conv.interior.add_smul_sub_mem h2v h2v2w B using 1\n  simp only [smul_add, smul_sub, smul_smul, ← C]\n  norm_num\n  abel\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w : E\nh4v : x + 4 • v ∈ interior s\nh4w : x + 4 • w ∈ interior s\nA : 1 / 2 ∈ Ioc 0 1\nB : 1 / 2 ∈ Icc 0 1\nC : ∀ (w : E), 2 • w = 2 • w\nh2v2w : x + 2 • v + 2 • w ∈ interior s\nh2vww : x + (2 • v + w) + w ∈ interior s\nh2v : x + 2 • v ∈ interior s\nh2w : x + 2 • w ∈ interior s\nhvw : x + (v + w) ∈ interior s\n⊢ x + (2 • v + w) ∈ interior s\n[PROOFSTEP]\nconvert s_conv.interior.add_smul_sub_mem h2v h2v2w B using 1\n[GOAL]\ncase h.e'_4\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w : E\nh4v : x + 4 • v ∈ interior s\nh4w : x + 4 • w ∈ interior s\nA : 1 / 2 ∈ Ioc 0 1\nB : 1 / 2 ∈ Icc 0 1\nC : ∀ (w : E), 2 • w = 2 • w\nh2v2w : x + 2 • v + 2 • w ∈ interior s\nh2vww : x + (2 • v + w) + w ∈ interior s\nh2v : x + 2 • v ∈ interior s\nh2w : x + 2 • w ∈ interior s\nhvw : x + (v + w) ∈ interior s\n⊢ x + (2 • v + w) = x + 2 • v + (1 / 2) • (x + 2 • v + 2 • w - (x + 2 • v))\n[PROOFSTEP]\nsimp only [smul_add, smul_sub, smul_smul, ← C]\n[GOAL]\ncase h.e'_4\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w : E\nh4v : x + 4 • v ∈ interior s\nh4w : x + 4 • w ∈ interior s\nA : 1 / 2 ∈ Ioc 0 1\nB : 1 / 2 ∈ Icc 0 1\nC : ∀ (w : E), 2 • w = 2 • w\nh2v2w : x + 2 • v + 2 • w ∈ interior s\nh2vww : x + (2 • v + w) + w ∈ interior s\nh2v : x + 2 • v ∈ interior s\nh2w : x + 2 • w ∈ interior s\nhvw : x + (v + w) ∈ interior s\n⊢ x + (2 • v + w) = x + 2 • v + ((1 / 2) • x + (1 / 2 * 2) • v + (1 / 2 * 2) • w - ((1 / 2) • x + (1 / 2 * 2) • v))\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase h.e'_4\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w : E\nh4v : x + 4 • v ∈ interior s\nh4w : x + 4 • w ∈ interior s\nA : 1 / 2 ∈ Ioc 0 1\nB : 1 / 2 ∈ Icc 0 1\nC : ∀ (w : E), 2 • w = 2 • w\nh2v2w : x + 2 • v + 2 • w ∈ interior s\nh2vww : x + (2 • v + w) + w ∈ interior s\nh2v : x + 2 • v ∈ interior s\nh2w : x + 2 • w ∈ interior s\nhvw : x + (v + w) ∈ interior s\n⊢ x + (2 • v + w) = x + 2 • v + w\n[PROOFSTEP]\nabel\n[GOAL]\ncase h.e'_4\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w : E\nh4v : x + 4 • v ∈ interior s\nh4w : x + 4 • w ∈ interior s\nA : 1 / 2 ∈ Ioc 0 1\nB : 1 / 2 ∈ Icc 0 1\nC : ∀ (w : E), 2 • w = 2 • w\nh2v2w : x + 2 • v + 2 • w ∈ interior s\nh2vww : x + (2 • v + w) + w ∈ interior s\nh2v : x + 2 • v ∈ interior s\nh2w : x + 2 • w ∈ interior s\nhvw : x + (v + w) ∈ interior s\n⊢ x + (2 • v + w) = x + 2 • v + w\n[PROOFSTEP]\nabel\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w : E\nh4v : x + 4 • v ∈ interior s\nh4w : x + 4 • w ∈ interior s\nA : 1 / 2 ∈ Ioc 0 1\nB : 1 / 2 ∈ Icc 0 1\nC : ∀ (w : E), 2 • w = 2 • w\nh2v2w : x + 2 • v + 2 • w ∈ interior s\nh2vww : x + (2 • v + w) + w ∈ interior s\nh2v : x + 2 • v ∈ interior s\nh2w : x + 2 • w ∈ interior s\nhvw : x + (v + w) ∈ interior s\nh2vw : x + (2 • v + w) ∈ interior s\n⊢ (fun h =>\n      f (x + h • (2 • v + 2 • w)) + f (x + h • (v + w)) - f (x + h • (2 • v + w)) - f (x + h • (v + 2 • w)) -\n        h ^ 2 • ↑(↑f'' v) w) =o[𝓝[Ioi 0] 0]\n    fun h => h ^ 2\n[PROOFSTEP]\nhave hvww : x + (v + w) + w ∈ interior s :=\n  by\n  convert s_conv.interior.add_smul_sub_mem h2w h2v2w B using 1\n  rw [one_div, add_sub_add_right_eq_sub, add_sub_cancel', inv_smul_smul₀ two_ne_zero, two_smul]\n  abel\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w : E\nh4v : x + 4 • v ∈ interior s\nh4w : x + 4 • w ∈ interior s\nA : 1 / 2 ∈ Ioc 0 1\nB : 1 / 2 ∈ Icc 0 1\nC : ∀ (w : E), 2 • w = 2 • w\nh2v2w : x + 2 • v + 2 • w ∈ interior s\nh2vww : x + (2 • v + w) + w ∈ interior s\nh2v : x + 2 • v ∈ interior s\nh2w : x + 2 • w ∈ interior s\nhvw : x + (v + w) ∈ interior s\nh2vw : x + (2 • v + w) ∈ interior s\n⊢ x + (v + w) + w ∈ interior s\n[PROOFSTEP]\nconvert s_conv.interior.add_smul_sub_mem h2w h2v2w B using 1\n[GOAL]\ncase h.e'_4\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w : E\nh4v : x + 4 • v ∈ interior s\nh4w : x + 4 • w ∈ interior s\nA : 1 / 2 ∈ Ioc 0 1\nB : 1 / 2 ∈ Icc 0 1\nC : ∀ (w : E), 2 • w = 2 • w\nh2v2w : x + 2 • v + 2 • w ∈ interior s\nh2vww : x + (2 • v + w) + w ∈ interior s\nh2v : x + 2 • v ∈ interior s\nh2w : x + 2 • w ∈ interior s\nhvw : x + (v + w) ∈ interior s\nh2vw : x + (2 • v + w) ∈ interior s\n⊢ x + (v + w) + w = x + 2 • w + (1 / 2) • (x + 2 • v + 2 • w - (x + 2 • w))\n[PROOFSTEP]\nrw [one_div, add_sub_add_right_eq_sub, add_sub_cancel', inv_smul_smul₀ two_ne_zero, two_smul]\n[GOAL]\ncase h.e'_4\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w : E\nh4v : x + 4 • v ∈ interior s\nh4w : x + 4 • w ∈ interior s\nA : 1 / 2 ∈ Ioc 0 1\nB : 1 / 2 ∈ Icc 0 1\nC : ∀ (w : E), 2 • w = 2 • w\nh2v2w : x + 2 • v + 2 • w ∈ interior s\nh2vww : x + (2 • v + w) + w ∈ interior s\nh2v : x + 2 • v ∈ interior s\nh2w : x + 2 • w ∈ interior s\nhvw : x + (v + w) ∈ interior s\nh2vw : x + (2 • v + w) ∈ interior s\n⊢ x + (v + w) + w = x + (w + w) + v\n[PROOFSTEP]\nabel\n[GOAL]\ncase h.e'_4\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w : E\nh4v : x + 4 • v ∈ interior s\nh4w : x + 4 • w ∈ interior s\nA : 1 / 2 ∈ Ioc 0 1\nB : 1 / 2 ∈ Icc 0 1\nC : ∀ (w : E), 2 • w = 2 • w\nh2v2w : x + 2 • v + 2 • w ∈ interior s\nh2vww : x + (2 • v + w) + w ∈ interior s\nh2v : x + 2 • v ∈ interior s\nh2w : x + 2 • w ∈ interior s\nhvw : x + (v + w) ∈ interior s\nh2vw : x + (2 • v + w) ∈ interior s\n⊢ x + (v + w) + w = x + (w + w) + v\n[PROOFSTEP]\nabel\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w : E\nh4v : x + 4 • v ∈ interior s\nh4w : x + 4 • w ∈ interior s\nA : 1 / 2 ∈ Ioc 0 1\nB : 1 / 2 ∈ Icc 0 1\nC : ∀ (w : E), 2 • w = 2 • w\nh2v2w : x + 2 • v + 2 • w ∈ interior s\nh2vww : x + (2 • v + w) + w ∈ interior s\nh2v : x + 2 • v ∈ interior s\nh2w : x + 2 • w ∈ interior s\nhvw : x + (v + w) ∈ interior s\nh2vw : x + (2 • v + w) ∈ interior s\nhvww : x + (v + w) + w ∈ interior s\n⊢ (fun h =>\n      f (x + h • (2 • v + 2 • w)) + f (x + h • (v + w)) - f (x + h • (2 • v + w)) - f (x + h • (v + 2 • w)) -\n        h ^ 2 • ↑(↑f'' v) w) =o[𝓝[Ioi 0] 0]\n    fun h => h ^ 2\n[PROOFSTEP]\nhave TA1 := s_conv.taylor_approx_two_segment hf xs hx h2vw h2vww\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w : E\nh4v : x + 4 • v ∈ interior s\nh4w : x + 4 • w ∈ interior s\nA : 1 / 2 ∈ Ioc 0 1\nB : 1 / 2 ∈ Icc 0 1\nC : ∀ (w : E), 2 • w = 2 • w\nh2v2w : x + 2 • v + 2 • w ∈ interior s\nh2vww : x + (2 • v + w) + w ∈ interior s\nh2v : x + 2 • v ∈ interior s\nh2w : x + 2 • w ∈ interior s\nhvw : x + (v + w) ∈ interior s\nh2vw : x + (2 • v + w) ∈ interior s\nhvww : x + (v + w) + w ∈ interior s\nTA1 :\n  (fun h =>\n      f (x + h • (2 • v + w) + h • w) - f (x + h • (2 • v + w)) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' (2 • v + w)) w -\n        (h ^ 2 / 2) • ↑(↑f'' w) w) =o[𝓝[Ioi 0] 0]\n    fun h => h ^ 2\n⊢ (fun h =>\n      f (x + h • (2 • v + 2 • w)) + f (x + h • (v + w)) - f (x + h • (2 • v + w)) - f (x + h • (v + 2 • w)) -\n        h ^ 2 • ↑(↑f'' v) w) =o[𝓝[Ioi 0] 0]\n    fun h => h ^ 2\n[PROOFSTEP]\nhave TA2 := s_conv.taylor_approx_two_segment hf xs hx hvw hvww\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w : E\nh4v : x + 4 • v ∈ interior s\nh4w : x + 4 • w ∈ interior s\nA : 1 / 2 ∈ Ioc 0 1\nB : 1 / 2 ∈ Icc 0 1\nC : ∀ (w : E), 2 • w = 2 • w\nh2v2w : x + 2 • v + 2 • w ∈ interior s\nh2vww : x + (2 • v + w) + w ∈ interior s\nh2v : x + 2 • v ∈ interior s\nh2w : x + 2 • w ∈ interior s\nhvw : x + (v + w) ∈ interior s\nh2vw : x + (2 • v + w) ∈ interior s\nhvww : x + (v + w) + w ∈ interior s\nTA1 :\n  (fun h =>\n      f (x + h • (2 • v + w) + h • w) - f (x + h • (2 • v + w)) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' (2 • v + w)) w -\n        (h ^ 2 / 2) • ↑(↑f'' w) w) =o[𝓝[Ioi 0] 0]\n    fun h => h ^ 2\nTA2 :\n  (fun h =>\n      f (x + h • (v + w) + h • w) - f (x + h • (v + w)) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' (v + w)) w -\n        (h ^ 2 / 2) • ↑(↑f'' w) w) =o[𝓝[Ioi 0] 0]\n    fun h => h ^ 2\n⊢ (fun h =>\n      f (x + h • (2 • v + 2 • w)) + f (x + h • (v + w)) - f (x + h • (2 • v + w)) - f (x + h • (v + 2 • w)) -\n        h ^ 2 • ↑(↑f'' v) w) =o[𝓝[Ioi 0] 0]\n    fun h => h ^ 2\n[PROOFSTEP]\nconvert TA1.sub TA2 using 1\n[GOAL]\ncase h.e'_7\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w : E\nh4v : x + 4 • v ∈ interior s\nh4w : x + 4 • w ∈ interior s\nA : 1 / 2 ∈ Ioc 0 1\nB : 1 / 2 ∈ Icc 0 1\nC : ∀ (w : E), 2 • w = 2 • w\nh2v2w : x + 2 • v + 2 • w ∈ interior s\nh2vww : x + (2 • v + w) + w ∈ interior s\nh2v : x + 2 • v ∈ interior s\nh2w : x + 2 • w ∈ interior s\nhvw : x + (v + w) ∈ interior s\nh2vw : x + (2 • v + w) ∈ interior s\nhvww : x + (v + w) + w ∈ interior s\nTA1 :\n  (fun h =>\n      f (x + h • (2 • v + w) + h • w) - f (x + h • (2 • v + w)) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' (2 • v + w)) w -\n        (h ^ 2 / 2) • ↑(↑f'' w) w) =o[𝓝[Ioi 0] 0]\n    fun h => h ^ 2\nTA2 :\n  (fun h =>\n      f (x + h • (v + w) + h • w) - f (x + h • (v + w)) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' (v + w)) w -\n        (h ^ 2 / 2) • ↑(↑f'' w) w) =o[𝓝[Ioi 0] 0]\n    fun h => h ^ 2\n⊢ (fun h =>\n      f (x + h • (2 • v + 2 • w)) + f (x + h • (v + w)) - f (x + h • (2 • v + w)) - f (x + h • (v + 2 • w)) -\n        h ^ 2 • ↑(↑f'' v) w) =\n    fun x_1 =>\n    f (x + x_1 • (2 • v + w) + x_1 • w) - f (x + x_1 • (2 • v + w)) - x_1 • ↑(f' x) w -\n          x_1 ^ 2 • ↑(↑f'' (2 • v + w)) w -\n        (x_1 ^ 2 / 2) • ↑(↑f'' w) w -\n      (f (x + x_1 • (v + w) + x_1 • w) - f (x + x_1 • (v + w)) - x_1 • ↑(f' x) w - x_1 ^ 2 • ↑(↑f'' (v + w)) w -\n        (x_1 ^ 2 / 2) • ↑(↑f'' w) w)\n[PROOFSTEP]\next h\n[GOAL]\ncase h.e'_7.h\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w : E\nh4v : x + 4 • v ∈ interior s\nh4w : x + 4 • w ∈ interior s\nA : 1 / 2 ∈ Ioc 0 1\nB : 1 / 2 ∈ Icc 0 1\nC : ∀ (w : E), 2 • w = 2 • w\nh2v2w : x + 2 • v + 2 • w ∈ interior s\nh2vww : x + (2 • v + w) + w ∈ interior s\nh2v : x + 2 • v ∈ interior s\nh2w : x + 2 • w ∈ interior s\nhvw : x + (v + w) ∈ interior s\nh2vw : x + (2 • v + w) ∈ interior s\nhvww : x + (v + w) + w ∈ interior s\nTA1 :\n  (fun h =>\n      f (x + h • (2 • v + w) + h • w) - f (x + h • (2 • v + w)) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' (2 • v + w)) w -\n        (h ^ 2 / 2) • ↑(↑f'' w) w) =o[𝓝[Ioi 0] 0]\n    fun h => h ^ 2\nTA2 :\n  (fun h =>\n      f (x + h • (v + w) + h • w) - f (x + h • (v + w)) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' (v + w)) w -\n        (h ^ 2 / 2) • ↑(↑f'' w) w) =o[𝓝[Ioi 0] 0]\n    fun h => h ^ 2\nh : ℝ\n⊢ f (x + h • (2 • v + 2 • w)) + f (x + h • (v + w)) - f (x + h • (2 • v + w)) - f (x + h • (v + 2 • w)) -\n      h ^ 2 • ↑(↑f'' v) w =\n    f (x + h • (2 • v + w) + h • w) - f (x + h • (2 • v + w)) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' (2 • v + w)) w -\n        (h ^ 2 / 2) • ↑(↑f'' w) w -\n      (f (x + h • (v + w) + h • w) - f (x + h • (v + w)) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' (v + w)) w -\n        (h ^ 2 / 2) • ↑(↑f'' w) w)\n[PROOFSTEP]\nsimp only [two_smul, smul_add, ← add_assoc, ContinuousLinearMap.map_add, ContinuousLinearMap.add_apply, Pi.smul_apply,\n  ContinuousLinearMap.coe_smul', ContinuousLinearMap.map_smul]\n[GOAL]\ncase h.e'_7.h\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w : E\nh4v : x + 4 • v ∈ interior s\nh4w : x + 4 • w ∈ interior s\nA : 1 / 2 ∈ Ioc 0 1\nB : 1 / 2 ∈ Icc 0 1\nC : ∀ (w : E), 2 • w = 2 • w\nh2v2w : x + 2 • v + 2 • w ∈ interior s\nh2vww : x + (2 • v + w) + w ∈ interior s\nh2v : x + 2 • v ∈ interior s\nh2w : x + 2 • w ∈ interior s\nhvw : x + (v + w) ∈ interior s\nh2vw : x + (2 • v + w) ∈ interior s\nhvww : x + (v + w) + w ∈ interior s\nTA1 :\n  (fun h =>\n      f (x + h • (2 • v + w) + h • w) - f (x + h • (2 • v + w)) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' (2 • v + w)) w -\n        (h ^ 2 / 2) • ↑(↑f'' w) w) =o[𝓝[Ioi 0] 0]\n    fun h => h ^ 2\nTA2 :\n  (fun h =>\n      f (x + h • (v + w) + h • w) - f (x + h • (v + w)) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' (v + w)) w -\n        (h ^ 2 / 2) • ↑(↑f'' w) w) =o[𝓝[Ioi 0] 0]\n    fun h => h ^ 2\nh : ℝ\n⊢ f (x + h • v + h • v + h • w + h • w) + f (x + h • v + h • w) - f (x + h • v + h • v + h • w) -\n        f (x + h • v + h • w + h • w) -\n      h ^ 2 • ↑(↑f'' v) w =\n    f (x + h • v + h • v + h • w + h • w) - f (x + h • v + h • v + h • w) - h • ↑(f' x) w -\n          (h ^ 2 • ↑(↑f'' v) w + h ^ 2 • ↑(↑f'' v) w + h ^ 2 • ↑(↑f'' w) w) -\n        (h ^ 2 / 2) • ↑(↑f'' w) w -\n      (f (x + h • v + h • w + h • w) - f (x + h • v + h • w) - h • ↑(f' x) w -\n          (h ^ 2 • ↑(↑f'' v) w + h ^ 2 • ↑(↑f'' w) w) -\n        (h ^ 2 / 2) • ↑(↑f'' w) w)\n[PROOFSTEP]\nabel\n[GOAL]\ncase h.e'_7.h\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w : E\nh4v : x + 4 • v ∈ interior s\nh4w : x + 4 • w ∈ interior s\nA : 1 / 2 ∈ Ioc 0 1\nB : 1 / 2 ∈ Icc 0 1\nC : ∀ (w : E), 2 • w = 2 • w\nh2v2w : x + 2 • v + 2 • w ∈ interior s\nh2vww : x + (2 • v + w) + w ∈ interior s\nh2v : x + 2 • v ∈ interior s\nh2w : x + 2 • w ∈ interior s\nhvw : x + (v + w) ∈ interior s\nh2vw : x + (2 • v + w) ∈ interior s\nhvww : x + (v + w) + w ∈ interior s\nTA1 :\n  (fun h =>\n      f (x + h • (2 • v + w) + h • w) - f (x + h • (2 • v + w)) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' (2 • v + w)) w -\n        (h ^ 2 / 2) • ↑(↑f'' w) w) =o[𝓝[Ioi 0] 0]\n    fun h => h ^ 2\nTA2 :\n  (fun h =>\n      f (x + h • (v + w) + h • w) - f (x + h • (v + w)) - h • ↑(f' x) w - h ^ 2 • ↑(↑f'' (v + w)) w -\n        (h ^ 2 / 2) • ↑(↑f'' w) w) =o[𝓝[Ioi 0] 0]\n    fun h => h ^ 2\nh : ℝ\n⊢ f (x + h • v + h • v + h • w + h • w) + f (x + h • v + h • w) - f (x + h • v + h • v + h • w) -\n        f (x + h • v + h • w + h • w) -\n      h ^ 2 • ↑(↑f'' v) w =\n    f (x + h • v + h • v + h • w + h • w) - f (x + h • v + h • v + h • w) - h • ↑(f' x) w -\n          (h ^ 2 • ↑(↑f'' v) w + h ^ 2 • ↑(↑f'' v) w + h ^ 2 • ↑(↑f'' w) w) -\n        (h ^ 2 / 2) • ↑(↑f'' w) w -\n      (f (x + h • v + h • w + h • w) - f (x + h • v + h • w) - h • ↑(f' x) w -\n          (h ^ 2 • ↑(↑f'' v) w + h ^ 2 • ↑(↑f'' w) w) -\n        (h ^ 2 / 2) • ↑(↑f'' w) w)\n[PROOFSTEP]\nabel\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w : E\nh4v : x + 4 • v ∈ interior s\nh4w : x + 4 • w ∈ interior s\n⊢ ↑(↑f'' w) v = ↑(↑f'' v) w\n[PROOFSTEP]\nhave A : (fun h : ℝ => h ^ 2 • (f'' w v - f'' v w)) =o[𝓝[>] 0] fun h => h ^ 2 :=\n  by\n  convert\n    (s_conv.isLittleO_alternate_sum_square hf xs hx h4v h4w).sub\n      (s_conv.isLittleO_alternate_sum_square hf xs hx h4w h4v) using\n    1\n  ext h\n  simp only [add_comm, smul_add, smul_sub]\n  abel\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w : E\nh4v : x + 4 • v ∈ interior s\nh4w : x + 4 • w ∈ interior s\n⊢ (fun h => h ^ 2 • (↑(↑f'' w) v - ↑(↑f'' v) w)) =o[𝓝[Ioi 0] 0] fun h => h ^ 2\n[PROOFSTEP]\nconvert\n  (s_conv.isLittleO_alternate_sum_square hf xs hx h4v h4w).sub\n    (s_conv.isLittleO_alternate_sum_square hf xs hx h4w h4v) using\n  1\n[GOAL]\ncase h.e'_7\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w : E\nh4v : x + 4 • v ∈ interior s\nh4w : x + 4 • w ∈ interior s\n⊢ (fun h => h ^ 2 • (↑(↑f'' w) v - ↑(↑f'' v) w)) = fun x_1 =>\n    f (x + x_1 • (2 • v + 2 • w)) + f (x + x_1 • (v + w)) - f (x + x_1 • (2 • v + w)) - f (x + x_1 • (v + 2 • w)) -\n        x_1 ^ 2 • ↑(↑f'' v) w -\n      (f (x + x_1 • (2 • w + 2 • v)) + f (x + x_1 • (w + v)) - f (x + x_1 • (2 • w + v)) - f (x + x_1 • (w + 2 • v)) -\n        x_1 ^ 2 • ↑(↑f'' w) v)\n[PROOFSTEP]\next h\n[GOAL]\ncase h.e'_7.h\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w : E\nh4v : x + 4 • v ∈ interior s\nh4w : x + 4 • w ∈ interior s\nh : ℝ\n⊢ h ^ 2 • (↑(↑f'' w) v - ↑(↑f'' v) w) =\n    f (x + h • (2 • v + 2 • w)) + f (x + h • (v + w)) - f (x + h • (2 • v + w)) - f (x + h • (v + 2 • w)) -\n        h ^ 2 • ↑(↑f'' v) w -\n      (f (x + h • (2 • w + 2 • v)) + f (x + h • (w + v)) - f (x + h • (2 • w + v)) - f (x + h • (w + 2 • v)) -\n        h ^ 2 • ↑(↑f'' w) v)\n[PROOFSTEP]\nsimp only [add_comm, smul_add, smul_sub]\n[GOAL]\ncase h.e'_7.h\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w : E\nh4v : x + 4 • v ∈ interior s\nh4w : x + 4 • w ∈ interior s\nh : ℝ\n⊢ h ^ 2 • ↑(↑f'' w) v - h ^ 2 • ↑(↑f'' v) w =\n    f (x + (h • v + h • w)) + f (x + (h • 2 • v + h • 2 • w)) - f (x + (h • w + h • 2 • v)) -\n          f (x + (h • v + h • 2 • w)) -\n        h ^ 2 • ↑(↑f'' v) w -\n      (f (x + (h • v + h • w)) + f (x + (h • 2 • v + h • 2 • w)) - f (x + (h • v + h • 2 • w)) -\n          f (x + (h • w + h • 2 • v)) -\n        h ^ 2 • ↑(↑f'' w) v)\n[PROOFSTEP]\nabel\n[GOAL]\ncase h.e'_7.h\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w : E\nh4v : x + 4 • v ∈ interior s\nh4w : x + 4 • w ∈ interior s\nh : ℝ\n⊢ h ^ 2 • ↑(↑f'' w) v - h ^ 2 • ↑(↑f'' v) w =\n    f (x + (h • v + h • w)) + f (x + (h • 2 • v + h • 2 • w)) - f (x + (h • w + h • 2 • v)) -\n          f (x + (h • v + h • 2 • w)) -\n        h ^ 2 • ↑(↑f'' v) w -\n      (f (x + (h • v + h • w)) + f (x + (h • 2 • v + h • 2 • w)) - f (x + (h • v + h • 2 • w)) -\n          f (x + (h • w + h • 2 • v)) -\n        h ^ 2 • ↑(↑f'' w) v)\n[PROOFSTEP]\nabel\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w : E\nh4v : x + 4 • v ∈ interior s\nh4w : x + 4 • w ∈ interior s\nA : (fun h => h ^ 2 • (↑(↑f'' w) v - ↑(↑f'' v) w)) =o[𝓝[Ioi 0] 0] fun h => h ^ 2\n⊢ ↑(↑f'' w) v = ↑(↑f'' v) w\n[PROOFSTEP]\nhave B : (fun _ : ℝ => f'' w v - f'' v w) =o[𝓝[>] 0] fun _ => (1 : ℝ) :=\n  by\n  have : (fun h : ℝ => 1 / h ^ 2) =O[𝓝[>] 0] fun h => 1 / h ^ 2 := isBigO_refl _ _\n  have C := this.smul_isLittleO A\n  apply C.congr' _ _\n  · filter_upwards [self_mem_nhdsWithin]\n    intro h (hpos : 0 < h)\n    rw [← one_smul ℝ (f'' w v - f'' v w), smul_smul, smul_smul]\n    congr 1\n    field_simp [LT.lt.ne' hpos]\n  · filter_upwards [self_mem_nhdsWithin] with h (hpos : 0 < h)\n    field_simp [LT.lt.ne' hpos, SMul.smul]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w : E\nh4v : x + 4 • v ∈ interior s\nh4w : x + 4 • w ∈ interior s\nA : (fun h => h ^ 2 • (↑(↑f'' w) v - ↑(↑f'' v) w)) =o[𝓝[Ioi 0] 0] fun h => h ^ 2\n⊢ (fun x => ↑(↑f'' w) v - ↑(↑f'' v) w) =o[𝓝[Ioi 0] 0] fun x => 1\n[PROOFSTEP]\nhave : (fun h : ℝ => 1 / h ^ 2) =O[𝓝[>] 0] fun h => 1 / h ^ 2 := isBigO_refl _ _\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w : E\nh4v : x + 4 • v ∈ interior s\nh4w : x + 4 • w ∈ interior s\nA : (fun h => h ^ 2 • (↑(↑f'' w) v - ↑(↑f'' v) w)) =o[𝓝[Ioi 0] 0] fun h => h ^ 2\nthis : (fun h => 1 / h ^ 2) =O[𝓝[Ioi 0] 0] fun h => 1 / h ^ 2\n⊢ (fun x => ↑(↑f'' w) v - ↑(↑f'' v) w) =o[𝓝[Ioi 0] 0] fun x => 1\n[PROOFSTEP]\nhave C := this.smul_isLittleO A\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w : E\nh4v : x + 4 • v ∈ interior s\nh4w : x + 4 • w ∈ interior s\nA : (fun h => h ^ 2 • (↑(↑f'' w) v - ↑(↑f'' v) w)) =o[𝓝[Ioi 0] 0] fun h => h ^ 2\nthis : (fun h => 1 / h ^ 2) =O[𝓝[Ioi 0] 0] fun h => 1 / h ^ 2\nC : (fun x => (1 / x ^ 2) • x ^ 2 • (↑(↑f'' w) v - ↑(↑f'' v) w)) =o[𝓝[Ioi 0] 0] fun x => (1 / x ^ 2) • x ^ 2\n⊢ (fun x => ↑(↑f'' w) v - ↑(↑f'' v) w) =o[𝓝[Ioi 0] 0] fun x => 1\n[PROOFSTEP]\napply C.congr' _ _\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w : E\nh4v : x + 4 • v ∈ interior s\nh4w : x + 4 • w ∈ interior s\nA : (fun h => h ^ 2 • (↑(↑f'' w) v - ↑(↑f'' v) w)) =o[𝓝[Ioi 0] 0] fun h => h ^ 2\nthis : (fun h => 1 / h ^ 2) =O[𝓝[Ioi 0] 0] fun h => 1 / h ^ 2\nC : (fun x => (1 / x ^ 2) • x ^ 2 • (↑(↑f'' w) v - ↑(↑f'' v) w)) =o[𝓝[Ioi 0] 0] fun x => (1 / x ^ 2) • x ^ 2\n⊢ (fun x => (1 / x ^ 2) • x ^ 2 • (↑(↑f'' w) v - ↑(↑f'' v) w)) =ᶠ[𝓝[Ioi 0] 0] fun x => ↑(↑f'' w) v - ↑(↑f'' v) w\n[PROOFSTEP]\nfilter_upwards [self_mem_nhdsWithin]\n[GOAL]\ncase h\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w : E\nh4v : x + 4 • v ∈ interior s\nh4w : x + 4 • w ∈ interior s\nA : (fun h => h ^ 2 • (↑(↑f'' w) v - ↑(↑f'' v) w)) =o[𝓝[Ioi 0] 0] fun h => h ^ 2\nthis : (fun h => 1 / h ^ 2) =O[𝓝[Ioi 0] 0] fun h => 1 / h ^ 2\nC : (fun x => (1 / x ^ 2) • x ^ 2 • (↑(↑f'' w) v - ↑(↑f'' v) w)) =o[𝓝[Ioi 0] 0] fun x => (1 / x ^ 2) • x ^ 2\n⊢ ∀ (a : ℝ), a ∈ Ioi 0 → (1 / a ^ 2) • a ^ 2 • (↑(↑f'' w) v - ↑(↑f'' v) w) = ↑(↑f'' w) v - ↑(↑f'' v) w\n[PROOFSTEP]\nintro h (hpos : 0 < h)\n[GOAL]\ncase h\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w : E\nh4v : x + 4 • v ∈ interior s\nh4w : x + 4 • w ∈ interior s\nA : (fun h => h ^ 2 • (↑(↑f'' w) v - ↑(↑f'' v) w)) =o[𝓝[Ioi 0] 0] fun h => h ^ 2\nthis : (fun h => 1 / h ^ 2) =O[𝓝[Ioi 0] 0] fun h => 1 / h ^ 2\nC : (fun x => (1 / x ^ 2) • x ^ 2 • (↑(↑f'' w) v - ↑(↑f'' v) w)) =o[𝓝[Ioi 0] 0] fun x => (1 / x ^ 2) • x ^ 2\nh : ℝ\nhpos : 0 < h\n⊢ (1 / h ^ 2) • h ^ 2 • (↑(↑f'' w) v - ↑(↑f'' v) w) = ↑(↑f'' w) v - ↑(↑f'' v) w\n[PROOFSTEP]\nrw [← one_smul ℝ (f'' w v - f'' v w), smul_smul, smul_smul]\n[GOAL]\ncase h\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w : E\nh4v : x + 4 • v ∈ interior s\nh4w : x + 4 • w ∈ interior s\nA : (fun h => h ^ 2 • (↑(↑f'' w) v - ↑(↑f'' v) w)) =o[𝓝[Ioi 0] 0] fun h => h ^ 2\nthis : (fun h => 1 / h ^ 2) =O[𝓝[Ioi 0] 0] fun h => 1 / h ^ 2\nC : (fun x => (1 / x ^ 2) • x ^ 2 • (↑(↑f'' w) v - ↑(↑f'' v) w)) =o[𝓝[Ioi 0] 0] fun x => (1 / x ^ 2) • x ^ 2\nh : ℝ\nhpos : 0 < h\n⊢ (1 / h ^ 2 * h ^ 2 * 1) • (↑(↑f'' w) v - ↑(↑f'' v) w) = 1 • (↑(↑f'' w) v - ↑(↑f'' v) w)\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase h.e_a\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w : E\nh4v : x + 4 • v ∈ interior s\nh4w : x + 4 • w ∈ interior s\nA : (fun h => h ^ 2 • (↑(↑f'' w) v - ↑(↑f'' v) w)) =o[𝓝[Ioi 0] 0] fun h => h ^ 2\nthis : (fun h => 1 / h ^ 2) =O[𝓝[Ioi 0] 0] fun h => 1 / h ^ 2\nC : (fun x => (1 / x ^ 2) • x ^ 2 • (↑(↑f'' w) v - ↑(↑f'' v) w)) =o[𝓝[Ioi 0] 0] fun x => (1 / x ^ 2) • x ^ 2\nh : ℝ\nhpos : 0 < h\n⊢ 1 / h ^ 2 * h ^ 2 * 1 = 1\n[PROOFSTEP]\nfield_simp [LT.lt.ne' hpos]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w : E\nh4v : x + 4 • v ∈ interior s\nh4w : x + 4 • w ∈ interior s\nA : (fun h => h ^ 2 • (↑(↑f'' w) v - ↑(↑f'' v) w)) =o[𝓝[Ioi 0] 0] fun h => h ^ 2\nthis : (fun h => 1 / h ^ 2) =O[𝓝[Ioi 0] 0] fun h => 1 / h ^ 2\nC : (fun x => (1 / x ^ 2) • x ^ 2 • (↑(↑f'' w) v - ↑(↑f'' v) w)) =o[𝓝[Ioi 0] 0] fun x => (1 / x ^ 2) • x ^ 2\n⊢ (fun x => (1 / x ^ 2) • x ^ 2) =ᶠ[𝓝[Ioi 0] 0] fun x => 1\n[PROOFSTEP]\nfilter_upwards [self_mem_nhdsWithin] with h (hpos : 0 < h)\n[GOAL]\ncase h\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w : E\nh4v : x + 4 • v ∈ interior s\nh4w : x + 4 • w ∈ interior s\nA : (fun h => h ^ 2 • (↑(↑f'' w) v - ↑(↑f'' v) w)) =o[𝓝[Ioi 0] 0] fun h => h ^ 2\nthis : (fun h => 1 / h ^ 2) =O[𝓝[Ioi 0] 0] fun h => 1 / h ^ 2\nC : (fun x => (1 / x ^ 2) • x ^ 2 • (↑(↑f'' w) v - ↑(↑f'' v) w)) =o[𝓝[Ioi 0] 0] fun x => (1 / x ^ 2) • x ^ 2\nh : ℝ\nhpos : 0 < h\n⊢ (1 / h ^ 2) • h ^ 2 = 1\n[PROOFSTEP]\nfield_simp [LT.lt.ne' hpos, SMul.smul]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w : E\nh4v : x + 4 • v ∈ interior s\nh4w : x + 4 • w ∈ interior s\nA : (fun h => h ^ 2 • (↑(↑f'' w) v - ↑(↑f'' v) w)) =o[𝓝[Ioi 0] 0] fun h => h ^ 2\nB : (fun x => ↑(↑f'' w) v - ↑(↑f'' v) w) =o[𝓝[Ioi 0] 0] fun x => 1\n⊢ ↑(↑f'' w) v = ↑(↑f'' v) w\n[PROOFSTEP]\nsimpa only [sub_eq_zero] using isLittleO_const_const_iff.1 B\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns✝ : Set E\ns_conv✝ : Convex ℝ s✝\nf✝ : E → F\nf'✝ : E → E →L[ℝ] F\nf''✝ : E →L[ℝ] E →L[ℝ] F\nhf✝ : ∀ (x : E), x ∈ interior s✝ → HasFDerivAt f✝ (f'✝ x) x\nx✝ : E\nxs✝ : x✝ ∈ s✝\nhx✝ : HasFDerivWithinAt f'✝ f''✝ (interior s✝) x✝\ns : Set E\ns_conv : Convex ℝ s\nhne : Set.Nonempty (interior s)\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w : E\n⊢ ↑(↑f'' v) w = ↑(↑f'' w) v\n[PROOFSTEP]\nrcases hne with ⟨y, hy⟩\n[GOAL]\ncase intro\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns✝ : Set E\ns_conv✝ : Convex ℝ s✝\nf✝ : E → F\nf'✝ : E → E →L[ℝ] F\nf''✝ : E →L[ℝ] E →L[ℝ] F\nhf✝ : ∀ (x : E), x ∈ interior s✝ → HasFDerivAt f✝ (f'✝ x) x\nx✝ : E\nxs✝ : x✝ ∈ s✝\nhx✝ : HasFDerivWithinAt f'✝ f''✝ (interior s✝) x✝\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w y : E\nhy : y ∈ interior s\n⊢ ↑(↑f'' v) w = ↑(↑f'' w) v\n[PROOFSTEP]\nobtain ⟨z, hz⟩ : ∃ z, z = ((1 : ℝ) / 4) • (y - x) := ⟨((1 : ℝ) / 4) • (y - x), rfl⟩\n[GOAL]\ncase intro.intro\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns✝ : Set E\ns_conv✝ : Convex ℝ s✝\nf✝ : E → F\nf'✝ : E → E →L[ℝ] F\nf''✝ : E →L[ℝ] E →L[ℝ] F\nhf✝ : ∀ (x : E), x ∈ interior s✝ → HasFDerivAt f✝ (f'✝ x) x\nx✝ : E\nxs✝ : x✝ ∈ s✝\nhx✝ : HasFDerivWithinAt f'✝ f''✝ (interior s✝) x✝\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w y : E\nhy : y ∈ interior s\nz : E\nhz : z = (1 / 4) • (y - x)\n⊢ ↑(↑f'' v) w = ↑(↑f'' w) v\n[PROOFSTEP]\nhave A : ∀ m : E, Filter.Tendsto (fun t : ℝ => x + (4 : ℝ) • (z + t • m)) (𝓝 0) (𝓝 y) :=\n  by\n  intro m\n  have : x + (4 : ℝ) • (z + (0 : ℝ) • m) = y := by simp [hz]\n  rw [← this]\n  refine' tendsto_const_nhds.add <| tendsto_const_nhds.smul <| tendsto_const_nhds.add _\n  exact continuousAt_id.smul continuousAt_const\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns✝ : Set E\ns_conv✝ : Convex ℝ s✝\nf✝ : E → F\nf'✝ : E → E →L[ℝ] F\nf''✝ : E →L[ℝ] E →L[ℝ] F\nhf✝ : ∀ (x : E), x ∈ interior s✝ → HasFDerivAt f✝ (f'✝ x) x\nx✝ : E\nxs✝ : x✝ ∈ s✝\nhx✝ : HasFDerivWithinAt f'✝ f''✝ (interior s✝) x✝\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w y : E\nhy : y ∈ interior s\nz : E\nhz : z = (1 / 4) • (y - x)\n⊢ ∀ (m : E), Filter.Tendsto (fun t => x + 4 • (z + t • m)) (𝓝 0) (𝓝 y)\n[PROOFSTEP]\nintro m\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns✝ : Set E\ns_conv✝ : Convex ℝ s✝\nf✝ : E → F\nf'✝ : E → E →L[ℝ] F\nf''✝ : E →L[ℝ] E →L[ℝ] F\nhf✝ : ∀ (x : E), x ∈ interior s✝ → HasFDerivAt f✝ (f'✝ x) x\nx✝ : E\nxs✝ : x✝ ∈ s✝\nhx✝ : HasFDerivWithinAt f'✝ f''✝ (interior s✝) x✝\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w y : E\nhy : y ∈ interior s\nz : E\nhz : z = (1 / 4) • (y - x)\nm : E\n⊢ Filter.Tendsto (fun t => x + 4 • (z + t • m)) (𝓝 0) (𝓝 y)\n[PROOFSTEP]\nhave : x + (4 : ℝ) • (z + (0 : ℝ) • m) = y := by simp [hz]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns✝ : Set E\ns_conv✝ : Convex ℝ s✝\nf✝ : E → F\nf'✝ : E → E →L[ℝ] F\nf''✝ : E →L[ℝ] E →L[ℝ] F\nhf✝ : ∀ (x : E), x ∈ interior s✝ → HasFDerivAt f✝ (f'✝ x) x\nx✝ : E\nxs✝ : x✝ ∈ s✝\nhx✝ : HasFDerivWithinAt f'✝ f''✝ (interior s✝) x✝\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w y : E\nhy : y ∈ interior s\nz : E\nhz : z = (1 / 4) • (y - x)\nm : E\n⊢ x + 4 • (z + 0 • m) = y\n[PROOFSTEP]\nsimp [hz]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns✝ : Set E\ns_conv✝ : Convex ℝ s✝\nf✝ : E → F\nf'✝ : E → E →L[ℝ] F\nf''✝ : E →L[ℝ] E →L[ℝ] F\nhf✝ : ∀ (x : E), x ∈ interior s✝ → HasFDerivAt f✝ (f'✝ x) x\nx✝ : E\nxs✝ : x✝ ∈ s✝\nhx✝ : HasFDerivWithinAt f'✝ f''✝ (interior s✝) x✝\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w y : E\nhy : y ∈ interior s\nz : E\nhz : z = (1 / 4) • (y - x)\nm : E\nthis : x + 4 • (z + 0 • m) = y\n⊢ Filter.Tendsto (fun t => x + 4 • (z + t • m)) (𝓝 0) (𝓝 y)\n[PROOFSTEP]\nrw [← this]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns✝ : Set E\ns_conv✝ : Convex ℝ s✝\nf✝ : E → F\nf'✝ : E → E →L[ℝ] F\nf''✝ : E →L[ℝ] E →L[ℝ] F\nhf✝ : ∀ (x : E), x ∈ interior s✝ → HasFDerivAt f✝ (f'✝ x) x\nx✝ : E\nxs✝ : x✝ ∈ s✝\nhx✝ : HasFDerivWithinAt f'✝ f''✝ (interior s✝) x✝\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w y : E\nhy : y ∈ interior s\nz : E\nhz : z = (1 / 4) • (y - x)\nm : E\nthis : x + 4 • (z + 0 • m) = y\n⊢ Filter.Tendsto (fun t => x + 4 • (z + t • m)) (𝓝 0) (𝓝 (x + 4 • (z + 0 • m)))\n[PROOFSTEP]\nrefine' tendsto_const_nhds.add <| tendsto_const_nhds.smul <| tendsto_const_nhds.add _\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns✝ : Set E\ns_conv✝ : Convex ℝ s✝\nf✝ : E → F\nf'✝ : E → E →L[ℝ] F\nf''✝ : E →L[ℝ] E →L[ℝ] F\nhf✝ : ∀ (x : E), x ∈ interior s✝ → HasFDerivAt f✝ (f'✝ x) x\nx✝ : E\nxs✝ : x✝ ∈ s✝\nhx✝ : HasFDerivWithinAt f'✝ f''✝ (interior s✝) x✝\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w y : E\nhy : y ∈ interior s\nz : E\nhz : z = (1 / 4) • (y - x)\nm : E\nthis : x + 4 • (z + 0 • m) = y\n⊢ Filter.Tendsto (fun t => t • m) (𝓝 0) (𝓝 (0 • m))\n[PROOFSTEP]\nexact continuousAt_id.smul continuousAt_const\n[GOAL]\ncase intro.intro\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns✝ : Set E\ns_conv✝ : Convex ℝ s✝\nf✝ : E → F\nf'✝ : E → E →L[ℝ] F\nf''✝ : E →L[ℝ] E →L[ℝ] F\nhf✝ : ∀ (x : E), x ∈ interior s✝ → HasFDerivAt f✝ (f'✝ x) x\nx✝ : E\nxs✝ : x✝ ∈ s✝\nhx✝ : HasFDerivWithinAt f'✝ f''✝ (interior s✝) x✝\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w y : E\nhy : y ∈ interior s\nz : E\nhz : z = (1 / 4) • (y - x)\nA : ∀ (m : E), Filter.Tendsto (fun t => x + 4 • (z + t • m)) (𝓝 0) (𝓝 y)\n⊢ ↑(↑f'' v) w = ↑(↑f'' w) v\n[PROOFSTEP]\nhave B : ∀ m : E, ∀ᶠ t in 𝓝[>] (0 : ℝ), x + (4 : ℝ) • (z + t • m) ∈ interior s :=\n  by\n  intro m\n  apply nhdsWithin_le_nhds\n  apply A m\n  rw [mem_interior_iff_mem_nhds] at hy \n  exact interior_mem_nhds.2 hy\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns✝ : Set E\ns_conv✝ : Convex ℝ s✝\nf✝ : E → F\nf'✝ : E → E →L[ℝ] F\nf''✝ : E →L[ℝ] E →L[ℝ] F\nhf✝ : ∀ (x : E), x ∈ interior s✝ → HasFDerivAt f✝ (f'✝ x) x\nx✝ : E\nxs✝ : x✝ ∈ s✝\nhx✝ : HasFDerivWithinAt f'✝ f''✝ (interior s✝) x✝\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w y : E\nhy : y ∈ interior s\nz : E\nhz : z = (1 / 4) • (y - x)\nA : ∀ (m : E), Filter.Tendsto (fun t => x + 4 • (z + t • m)) (𝓝 0) (𝓝 y)\n⊢ ∀ (m : E), ∀ᶠ (t : ℝ) in 𝓝[Ioi 0] 0, x + 4 • (z + t • m) ∈ interior s\n[PROOFSTEP]\nintro m\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns✝ : Set E\ns_conv✝ : Convex ℝ s✝\nf✝ : E → F\nf'✝ : E → E →L[ℝ] F\nf''✝ : E →L[ℝ] E →L[ℝ] F\nhf✝ : ∀ (x : E), x ∈ interior s✝ → HasFDerivAt f✝ (f'✝ x) x\nx✝ : E\nxs✝ : x✝ ∈ s✝\nhx✝ : HasFDerivWithinAt f'✝ f''✝ (interior s✝) x✝\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w y : E\nhy : y ∈ interior s\nz : E\nhz : z = (1 / 4) • (y - x)\nA : ∀ (m : E), Filter.Tendsto (fun t => x + 4 • (z + t • m)) (𝓝 0) (𝓝 y)\nm : E\n⊢ ∀ᶠ (t : ℝ) in 𝓝[Ioi 0] 0, x + 4 • (z + t • m) ∈ interior s\n[PROOFSTEP]\napply nhdsWithin_le_nhds\n[GOAL]\ncase a\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns✝ : Set E\ns_conv✝ : Convex ℝ s✝\nf✝ : E → F\nf'✝ : E → E →L[ℝ] F\nf''✝ : E →L[ℝ] E →L[ℝ] F\nhf✝ : ∀ (x : E), x ∈ interior s✝ → HasFDerivAt f✝ (f'✝ x) x\nx✝ : E\nxs✝ : x✝ ∈ s✝\nhx✝ : HasFDerivWithinAt f'✝ f''✝ (interior s✝) x✝\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w y : E\nhy : y ∈ interior s\nz : E\nhz : z = (1 / 4) • (y - x)\nA : ∀ (m : E), Filter.Tendsto (fun t => x + 4 • (z + t • m)) (𝓝 0) (𝓝 y)\nm : E\n⊢ {x_1 | (fun t => x + 4 • (z + t • m) ∈ interior s) x_1} ∈ 𝓝 0\n[PROOFSTEP]\napply A m\n[GOAL]\ncase a.a\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns✝ : Set E\ns_conv✝ : Convex ℝ s✝\nf✝ : E → F\nf'✝ : E → E →L[ℝ] F\nf''✝ : E →L[ℝ] E →L[ℝ] F\nhf✝ : ∀ (x : E), x ∈ interior s✝ → HasFDerivAt f✝ (f'✝ x) x\nx✝ : E\nxs✝ : x✝ ∈ s✝\nhx✝ : HasFDerivWithinAt f'✝ f''✝ (interior s✝) x✝\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w y : E\nhy : y ∈ interior s\nz : E\nhz : z = (1 / 4) • (y - x)\nA : ∀ (m : E), Filter.Tendsto (fun t => x + 4 • (z + t • m)) (𝓝 0) (𝓝 y)\nm : E\n⊢ interior s ∈ 𝓝 y\n[PROOFSTEP]\nrw [mem_interior_iff_mem_nhds] at hy \n[GOAL]\ncase a.a\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns✝ : Set E\ns_conv✝ : Convex ℝ s✝\nf✝ : E → F\nf'✝ : E → E →L[ℝ] F\nf''✝ : E →L[ℝ] E →L[ℝ] F\nhf✝ : ∀ (x : E), x ∈ interior s✝ → HasFDerivAt f✝ (f'✝ x) x\nx✝ : E\nxs✝ : x✝ ∈ s✝\nhx✝ : HasFDerivWithinAt f'✝ f''✝ (interior s✝) x✝\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w y : E\nhy : s ∈ 𝓝 y\nz : E\nhz : z = (1 / 4) • (y - x)\nA : ∀ (m : E), Filter.Tendsto (fun t => x + 4 • (z + t • m)) (𝓝 0) (𝓝 y)\nm : E\n⊢ interior s ∈ 𝓝 y\n[PROOFSTEP]\nexact interior_mem_nhds.2 hy\n[GOAL]\ncase intro.intro\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns✝ : Set E\ns_conv✝ : Convex ℝ s✝\nf✝ : E → F\nf'✝ : E → E →L[ℝ] F\nf''✝ : E →L[ℝ] E →L[ℝ] F\nhf✝ : ∀ (x : E), x ∈ interior s✝ → HasFDerivAt f✝ (f'✝ x) x\nx✝ : E\nxs✝ : x✝ ∈ s✝\nhx✝ : HasFDerivWithinAt f'✝ f''✝ (interior s✝) x✝\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w y : E\nhy : y ∈ interior s\nz : E\nhz : z = (1 / 4) • (y - x)\nA : ∀ (m : E), Filter.Tendsto (fun t => x + 4 • (z + t • m)) (𝓝 0) (𝓝 y)\nB : ∀ (m : E), ∀ᶠ (t : ℝ) in 𝓝[Ioi 0] 0, x + 4 • (z + t • m) ∈ interior s\n⊢ ↑(↑f'' v) w = ↑(↑f'' w) v\n[PROOFSTEP]\nchoose t ts tpos using fun m => ((B m).and self_mem_nhdsWithin).exists\n[GOAL]\ncase intro.intro\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns✝ : Set E\ns_conv✝ : Convex ℝ s✝\nf✝ : E → F\nf'✝ : E → E →L[ℝ] F\nf''✝ : E →L[ℝ] E →L[ℝ] F\nhf✝ : ∀ (x : E), x ∈ interior s✝ → HasFDerivAt f✝ (f'✝ x) x\nx✝ : E\nxs✝ : x✝ ∈ s✝\nhx✝ : HasFDerivWithinAt f'✝ f''✝ (interior s✝) x✝\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w y : E\nhy : y ∈ interior s\nz : E\nhz : z = (1 / 4) • (y - x)\nA : ∀ (m : E), Filter.Tendsto (fun t => x + 4 • (z + t • m)) (𝓝 0) (𝓝 y)\nB : ∀ (m : E), ∀ᶠ (t : ℝ) in 𝓝[Ioi 0] 0, x + 4 • (z + t • m) ∈ interior s\nt : E → ℝ\nts : ∀ (m : E), x + 4 • (z + t m • m) ∈ interior s\ntpos : ∀ (m : E), 0 < t m\n⊢ ↑(↑f'' v) w = ↑(↑f'' w) v\n[PROOFSTEP]\nhave C : ∀ m : E, f'' m z = f'' z m := by\n  intro m\n  have : f'' (z + t m • m) (z + t 0 • (0 : E)) = f'' (z + t 0 • (0 : E)) (z + t m • m) :=\n    s_conv.second_derivative_within_at_symmetric_of_mem_interior hf xs hx (ts 0) (ts m)\n  simp only [ContinuousLinearMap.map_add, ContinuousLinearMap.map_smul, add_right_inj, ContinuousLinearMap.add_apply,\n    Pi.smul_apply, ContinuousLinearMap.coe_smul', add_zero, ContinuousLinearMap.zero_apply, smul_zero,\n    ContinuousLinearMap.map_zero] at this \n  exact smul_right_injective F (tpos m).ne' this\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns✝ : Set E\ns_conv✝ : Convex ℝ s✝\nf✝ : E → F\nf'✝ : E → E →L[ℝ] F\nf''✝ : E →L[ℝ] E →L[ℝ] F\nhf✝ : ∀ (x : E), x ∈ interior s✝ → HasFDerivAt f✝ (f'✝ x) x\nx✝ : E\nxs✝ : x✝ ∈ s✝\nhx✝ : HasFDerivWithinAt f'✝ f''✝ (interior s✝) x✝\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w y : E\nhy : y ∈ interior s\nz : E\nhz : z = (1 / 4) • (y - x)\nA : ∀ (m : E), Filter.Tendsto (fun t => x + 4 • (z + t • m)) (𝓝 0) (𝓝 y)\nB : ∀ (m : E), ∀ᶠ (t : ℝ) in 𝓝[Ioi 0] 0, x + 4 • (z + t • m) ∈ interior s\nt : E → ℝ\nts : ∀ (m : E), x + 4 • (z + t m • m) ∈ interior s\ntpos : ∀ (m : E), 0 < t m\n⊢ ∀ (m : E), ↑(↑f'' m) z = ↑(↑f'' z) m\n[PROOFSTEP]\nintro m\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns✝ : Set E\ns_conv✝ : Convex ℝ s✝\nf✝ : E → F\nf'✝ : E → E →L[ℝ] F\nf''✝ : E →L[ℝ] E →L[ℝ] F\nhf✝ : ∀ (x : E), x ∈ interior s✝ → HasFDerivAt f✝ (f'✝ x) x\nx✝ : E\nxs✝ : x✝ ∈ s✝\nhx✝ : HasFDerivWithinAt f'✝ f''✝ (interior s✝) x✝\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w y : E\nhy : y ∈ interior s\nz : E\nhz : z = (1 / 4) • (y - x)\nA : ∀ (m : E), Filter.Tendsto (fun t => x + 4 • (z + t • m)) (𝓝 0) (𝓝 y)\nB : ∀ (m : E), ∀ᶠ (t : ℝ) in 𝓝[Ioi 0] 0, x + 4 • (z + t • m) ∈ interior s\nt : E → ℝ\nts : ∀ (m : E), x + 4 • (z + t m • m) ∈ interior s\ntpos : ∀ (m : E), 0 < t m\nm : E\n⊢ ↑(↑f'' m) z = ↑(↑f'' z) m\n[PROOFSTEP]\nhave : f'' (z + t m • m) (z + t 0 • (0 : E)) = f'' (z + t 0 • (0 : E)) (z + t m • m) :=\n  s_conv.second_derivative_within_at_symmetric_of_mem_interior hf xs hx (ts 0) (ts m)\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns✝ : Set E\ns_conv✝ : Convex ℝ s✝\nf✝ : E → F\nf'✝ : E → E →L[ℝ] F\nf''✝ : E →L[ℝ] E →L[ℝ] F\nhf✝ : ∀ (x : E), x ∈ interior s✝ → HasFDerivAt f✝ (f'✝ x) x\nx✝ : E\nxs✝ : x✝ ∈ s✝\nhx✝ : HasFDerivWithinAt f'✝ f''✝ (interior s✝) x✝\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w y : E\nhy : y ∈ interior s\nz : E\nhz : z = (1 / 4) • (y - x)\nA : ∀ (m : E), Filter.Tendsto (fun t => x + 4 • (z + t • m)) (𝓝 0) (𝓝 y)\nB : ∀ (m : E), ∀ᶠ (t : ℝ) in 𝓝[Ioi 0] 0, x + 4 • (z + t • m) ∈ interior s\nt : E → ℝ\nts : ∀ (m : E), x + 4 • (z + t m • m) ∈ interior s\ntpos : ∀ (m : E), 0 < t m\nm : E\nthis : ↑(↑f'' (z + t m • m)) (z + t 0 • 0) = ↑(↑f'' (z + t 0 • 0)) (z + t m • m)\n⊢ ↑(↑f'' m) z = ↑(↑f'' z) m\n[PROOFSTEP]\nsimp only [ContinuousLinearMap.map_add, ContinuousLinearMap.map_smul, add_right_inj, ContinuousLinearMap.add_apply,\n  Pi.smul_apply, ContinuousLinearMap.coe_smul', add_zero, ContinuousLinearMap.zero_apply, smul_zero,\n  ContinuousLinearMap.map_zero] at this \n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns✝ : Set E\ns_conv✝ : Convex ℝ s✝\nf✝ : E → F\nf'✝ : E → E →L[ℝ] F\nf''✝ : E →L[ℝ] E →L[ℝ] F\nhf✝ : ∀ (x : E), x ∈ interior s✝ → HasFDerivAt f✝ (f'✝ x) x\nx✝ : E\nxs✝ : x✝ ∈ s✝\nhx✝ : HasFDerivWithinAt f'✝ f''✝ (interior s✝) x✝\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w y : E\nhy : y ∈ interior s\nz : E\nhz : z = (1 / 4) • (y - x)\nA : ∀ (m : E), Filter.Tendsto (fun t => x + 4 • (z + t • m)) (𝓝 0) (𝓝 y)\nB : ∀ (m : E), ∀ᶠ (t : ℝ) in 𝓝[Ioi 0] 0, x + 4 • (z + t • m) ∈ interior s\nt : E → ℝ\nts : ∀ (m : E), x + 4 • (z + t m • m) ∈ interior s\ntpos : ∀ (m : E), 0 < t m\nm : E\nthis : t m • ↑(↑f'' m) z = t m • ↑(↑f'' z) m\n⊢ ↑(↑f'' m) z = ↑(↑f'' z) m\n[PROOFSTEP]\nexact smul_right_injective F (tpos m).ne' this\n[GOAL]\ncase intro.intro\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns✝ : Set E\ns_conv✝ : Convex ℝ s✝\nf✝ : E → F\nf'✝ : E → E →L[ℝ] F\nf''✝ : E →L[ℝ] E →L[ℝ] F\nhf✝ : ∀ (x : E), x ∈ interior s✝ → HasFDerivAt f✝ (f'✝ x) x\nx✝ : E\nxs✝ : x✝ ∈ s✝\nhx✝ : HasFDerivWithinAt f'✝ f''✝ (interior s✝) x✝\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w y : E\nhy : y ∈ interior s\nz : E\nhz : z = (1 / 4) • (y - x)\nA : ∀ (m : E), Filter.Tendsto (fun t => x + 4 • (z + t • m)) (𝓝 0) (𝓝 y)\nB : ∀ (m : E), ∀ᶠ (t : ℝ) in 𝓝[Ioi 0] 0, x + 4 • (z + t • m) ∈ interior s\nt : E → ℝ\nts : ∀ (m : E), x + 4 • (z + t m • m) ∈ interior s\ntpos : ∀ (m : E), 0 < t m\nC : ∀ (m : E), ↑(↑f'' m) z = ↑(↑f'' z) m\n⊢ ↑(↑f'' v) w = ↑(↑f'' w) v\n[PROOFSTEP]\nhave : f'' (z + t v • v) (z + t w • w) = f'' (z + t w • w) (z + t v • v) :=\n  s_conv.second_derivative_within_at_symmetric_of_mem_interior hf xs hx (ts w) (ts v)\n[GOAL]\ncase intro.intro\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns✝ : Set E\ns_conv✝ : Convex ℝ s✝\nf✝ : E → F\nf'✝ : E → E →L[ℝ] F\nf''✝ : E →L[ℝ] E →L[ℝ] F\nhf✝ : ∀ (x : E), x ∈ interior s✝ → HasFDerivAt f✝ (f'✝ x) x\nx✝ : E\nxs✝ : x✝ ∈ s✝\nhx✝ : HasFDerivWithinAt f'✝ f''✝ (interior s✝) x✝\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w y : E\nhy : y ∈ interior s\nz : E\nhz : z = (1 / 4) • (y - x)\nA : ∀ (m : E), Filter.Tendsto (fun t => x + 4 • (z + t • m)) (𝓝 0) (𝓝 y)\nB : ∀ (m : E), ∀ᶠ (t : ℝ) in 𝓝[Ioi 0] 0, x + 4 • (z + t • m) ∈ interior s\nt : E → ℝ\nts : ∀ (m : E), x + 4 • (z + t m • m) ∈ interior s\ntpos : ∀ (m : E), 0 < t m\nC : ∀ (m : E), ↑(↑f'' m) z = ↑(↑f'' z) m\nthis : ↑(↑f'' (z + t v • v)) (z + t w • w) = ↑(↑f'' (z + t w • w)) (z + t v • v)\n⊢ ↑(↑f'' v) w = ↑(↑f'' w) v\n[PROOFSTEP]\nsimp only [ContinuousLinearMap.map_add, ContinuousLinearMap.map_smul, smul_add, smul_smul,\n  ContinuousLinearMap.add_apply, Pi.smul_apply, ContinuousLinearMap.coe_smul', C] at this \n[GOAL]\ncase intro.intro\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns✝ : Set E\ns_conv✝ : Convex ℝ s✝\nf✝ : E → F\nf'✝ : E → E →L[ℝ] F\nf''✝ : E →L[ℝ] E →L[ℝ] F\nhf✝ : ∀ (x : E), x ∈ interior s✝ → HasFDerivAt f✝ (f'✝ x) x\nx✝ : E\nxs✝ : x✝ ∈ s✝\nhx✝ : HasFDerivWithinAt f'✝ f''✝ (interior s✝) x✝\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w y : E\nhy : y ∈ interior s\nz : E\nhz : z = (1 / 4) • (y - x)\nA : ∀ (m : E), Filter.Tendsto (fun t => x + 4 • (z + t • m)) (𝓝 0) (𝓝 y)\nB : ∀ (m : E), ∀ᶠ (t : ℝ) in 𝓝[Ioi 0] 0, x + 4 • (z + t • m) ∈ interior s\nt : E → ℝ\nts : ∀ (m : E), x + 4 • (z + t m • m) ∈ interior s\ntpos : ∀ (m : E), 0 < t m\nC : ∀ (m : E), ↑(↑f'' m) z = ↑(↑f'' z) m\nthis :\n  ↑(↑f'' z) z + t v • ↑(↑f'' z) v + (t w • ↑(↑f'' z) w + (t w * t v) • ↑(↑f'' v) w) =\n    ↑(↑f'' z) z + t w • ↑(↑f'' z) w + (t v • ↑(↑f'' z) v + (t v * t w) • ↑(↑f'' w) v)\n⊢ ↑(↑f'' v) w = ↑(↑f'' w) v\n[PROOFSTEP]\nrw [add_assoc, add_assoc, add_right_inj, add_left_comm, add_right_inj, add_right_inj, mul_comm] at this \n[GOAL]\ncase intro.intro\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns✝ : Set E\ns_conv✝ : Convex ℝ s✝\nf✝ : E → F\nf'✝ : E → E →L[ℝ] F\nf''✝ : E →L[ℝ] E →L[ℝ] F\nhf✝ : ∀ (x : E), x ∈ interior s✝ → HasFDerivAt f✝ (f'✝ x) x\nx✝ : E\nxs✝ : x✝ ∈ s✝\nhx✝ : HasFDerivWithinAt f'✝ f''✝ (interior s✝) x✝\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w y : E\nhy : y ∈ interior s\nz : E\nhz : z = (1 / 4) • (y - x)\nA : ∀ (m : E), Filter.Tendsto (fun t => x + 4 • (z + t • m)) (𝓝 0) (𝓝 y)\nB : ∀ (m : E), ∀ᶠ (t : ℝ) in 𝓝[Ioi 0] 0, x + 4 • (z + t • m) ∈ interior s\nt : E → ℝ\nts : ∀ (m : E), x + 4 • (z + t m • m) ∈ interior s\ntpos : ∀ (m : E), 0 < t m\nC : ∀ (m : E), ↑(↑f'' m) z = ↑(↑f'' z) m\nthis : (t v * t w) • ↑(↑f'' v) w = (t v * t w) • ↑(↑f'' w) v\n⊢ ↑(↑f'' v) w = ↑(↑f'' w) v\n[PROOFSTEP]\napply smul_right_injective F _ this\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns✝ : Set E\ns_conv✝ : Convex ℝ s✝\nf✝ : E → F\nf'✝ : E → E →L[ℝ] F\nf''✝ : E →L[ℝ] E →L[ℝ] F\nhf✝ : ∀ (x : E), x ∈ interior s✝ → HasFDerivAt f✝ (f'✝ x) x\nx✝ : E\nxs✝ : x✝ ∈ s✝\nhx✝ : HasFDerivWithinAt f'✝ f''✝ (interior s✝) x✝\ns : Set E\ns_conv : Convex ℝ s\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ (x : E), x ∈ interior s → HasFDerivAt f (f' x) x\nx : E\nxs : x ∈ s\nhx : HasFDerivWithinAt f' f'' (interior s) x\nv w y : E\nhy : y ∈ interior s\nz : E\nhz : z = (1 / 4) • (y - x)\nA : ∀ (m : E), Filter.Tendsto (fun t => x + 4 • (z + t • m)) (𝓝 0) (𝓝 y)\nB : ∀ (m : E), ∀ᶠ (t : ℝ) in 𝓝[Ioi 0] 0, x + 4 • (z + t • m) ∈ interior s\nt : E → ℝ\nts : ∀ (m : E), x + 4 • (z + t m • m) ∈ interior s\ntpos : ∀ (m : E), 0 < t m\nC : ∀ (m : E), ↑(↑f'' m) z = ↑(↑f'' z) m\nthis : (t v * t w) • ↑(↑f'' v) w = (t v * t w) • ↑(↑f'' w) v\n⊢ t v * t w ≠ 0\n[PROOFSTEP]\nsimp [(tpos v).ne', (tpos w).ne']\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf✝ : E → F\nf'✝ : E → E →L[ℝ] F\nf''✝ : E →L[ℝ] E →L[ℝ] F\nhf✝ : ∀ (x : E), x ∈ interior s → HasFDerivAt f✝ (f'✝ x) x\nx : E\nxs : x ∈ s\nhx✝ : HasFDerivWithinAt f'✝ f''✝ (interior s) x\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ᶠ (y : E) in 𝓝 x, HasFDerivAt f (f' y) y\nhx : HasFDerivAt f' f'' x\nv w : E\n⊢ ↑(↑f'' v) w = ↑(↑f'' w) v\n[PROOFSTEP]\nrcases Metric.mem_nhds_iff.1 hf with ⟨ε, εpos, hε⟩\n[GOAL]\ncase intro.intro\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf✝ : E → F\nf'✝ : E → E →L[ℝ] F\nf''✝ : E →L[ℝ] E →L[ℝ] F\nhf✝ : ∀ (x : E), x ∈ interior s → HasFDerivAt f✝ (f'✝ x) x\nx : E\nxs : x ∈ s\nhx✝ : HasFDerivWithinAt f'✝ f''✝ (interior s) x\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ᶠ (y : E) in 𝓝 x, HasFDerivAt f (f' y) y\nhx : HasFDerivAt f' f'' x\nv w : E\nε : ℝ\nεpos : ε > 0\nhε : Metric.ball x ε ⊆ {x | (fun y => HasFDerivAt f (f' y) y) x}\n⊢ ↑(↑f'' v) w = ↑(↑f'' w) v\n[PROOFSTEP]\nhave A : (interior (Metric.ball x ε)).Nonempty := by rwa [Metric.isOpen_ball.interior_eq, Metric.nonempty_ball]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf✝ : E → F\nf'✝ : E → E →L[ℝ] F\nf''✝ : E →L[ℝ] E →L[ℝ] F\nhf✝ : ∀ (x : E), x ∈ interior s → HasFDerivAt f✝ (f'✝ x) x\nx : E\nxs : x ∈ s\nhx✝ : HasFDerivWithinAt f'✝ f''✝ (interior s) x\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ᶠ (y : E) in 𝓝 x, HasFDerivAt f (f' y) y\nhx : HasFDerivAt f' f'' x\nv w : E\nε : ℝ\nεpos : ε > 0\nhε : Metric.ball x ε ⊆ {x | (fun y => HasFDerivAt f (f' y) y) x}\n⊢ Set.Nonempty (interior (Metric.ball x ε))\n[PROOFSTEP]\nrwa [Metric.isOpen_ball.interior_eq, Metric.nonempty_ball]\n[GOAL]\ncase intro.intro\nE : Type u_1\nF : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ns : Set E\ns_conv : Convex ℝ s\nf✝ : E → F\nf'✝ : E → E →L[ℝ] F\nf''✝ : E →L[ℝ] E →L[ℝ] F\nhf✝ : ∀ (x : E), x ∈ interior s → HasFDerivAt f✝ (f'✝ x) x\nx : E\nxs : x ∈ s\nhx✝ : HasFDerivWithinAt f'✝ f''✝ (interior s) x\nf : E → F\nf' : E → E →L[ℝ] F\nf'' : E →L[ℝ] E →L[ℝ] F\nhf : ∀ᶠ (y : E) in 𝓝 x, HasFDerivAt f (f' y) y\nhx : HasFDerivAt f' f'' x\nv w : E\nε : ℝ\nεpos : ε > 0\nhε : Metric.ball x ε ⊆ {x | (fun y => HasFDerivAt f (f' y) y) x}\nA : Set.Nonempty (interior (Metric.ball x ε))\n⊢ ↑(↑f'' v) w = ↑(↑f'' w) v\n[PROOFSTEP]\nexact\n  Convex.second_derivative_within_at_symmetric (convex_ball x ε) A (fun y hy => hε (interior_subset hy))\n    (Metric.mem_ball_self εpos) hx.hasFDerivWithinAt v w\n", "meta": {"mathlib_filename": "Mathlib.Analysis.Calculus.FDeriv.Symmetric", "llama_tokens": 104944, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8198933359135361, "lm_q2_score": 0.6548947155710233, "lm_q1q2_score": 0.5369438130216727}}
{"text": "[GOAL]\nb n : ℕ\n⊢ log b n = 0 ↔ n < b ∨ b ≤ 1\n[PROOFSTEP]\nrw [log, dite_eq_right_iff]\n[GOAL]\nb n : ℕ\n⊢ (∀ (h : b ≤ n ∧ 1 < b),\n      (let_fun this := (_ : n / b < n);\n        log b (n / b) + 1) =\n        0) ↔\n    n < b ∨ b ≤ 1\n[PROOFSTEP]\nsimp only [Nat.succ_ne_zero, imp_false, not_and_or, not_le, not_lt]\n[GOAL]\nb n : ℕ\n⊢ 0 < log b n ↔ b ≤ n ∧ 1 < b\n[PROOFSTEP]\nrw [pos_iff_ne_zero, Ne.def, log_eq_zero_iff, not_or, not_lt, not_le]\n[GOAL]\nb n : ℕ\nh : 1 < b\nhn : b ≤ n\n⊢ log b n = log b (n / b) + 1\n[PROOFSTEP]\nrw [log]\n[GOAL]\nb n : ℕ\nh : 1 < b\nhn : b ≤ n\n⊢ (if h : b ≤ n ∧ 1 < b then\n      let_fun this := (_ : n / b < n);\n      log b (n / b) + 1\n    else 0) =\n    log b (n / b) + 1\n[PROOFSTEP]\nexact if_pos ⟨hn, h⟩\n[GOAL]\nb : ℕ\nhb : 1 < b\nx y : ℕ\nhy : y ≠ 0\n⊢ b ^ x ≤ y ↔ x ≤ log b y\n[PROOFSTEP]\ninduction' y using Nat.strong_induction_on with y ih generalizing x\n[GOAL]\ncase h\nb : ℕ\nhb : 1 < b\nx✝ y✝ : ℕ\nhy✝ : y✝ ≠ 0\ny : ℕ\nih : ∀ (m : ℕ), m < y → ∀ {x : ℕ}, m ≠ 0 → (b ^ x ≤ m ↔ x ≤ log b m)\nx : ℕ\nhy : y ≠ 0\n⊢ b ^ x ≤ y ↔ x ≤ log b y\n[PROOFSTEP]\ncases x with\n| zero => exact iff_of_true hy.bot_lt (zero_le _)\n| succ x =>\n  rw [log]; split_ifs with h\n  · have b_pos : 0 < b := zero_le_one.trans_lt hb\n    rw [succ_eq_add_one, add_le_add_iff_right, ← ih (y / b) (div_lt_self hy.bot_lt hb) (Nat.div_pos h.1 b_pos).ne',\n      le_div_iff_mul_le b_pos, pow_succ', mul_comm]\n  · exact iff_of_false (fun hby => h ⟨(le_self_pow x.succ_ne_zero _).trans hby, hb⟩) (not_succ_le_zero _)\n[GOAL]\ncase h\nb : ℕ\nhb : 1 < b\nx✝ y✝ : ℕ\nhy✝ : y✝ ≠ 0\ny : ℕ\nih : ∀ (m : ℕ), m < y → ∀ {x : ℕ}, m ≠ 0 → (b ^ x ≤ m ↔ x ≤ log b m)\nx : ℕ\nhy : y ≠ 0\n⊢ b ^ x ≤ y ↔ x ≤ log b y\n[PROOFSTEP]\ncases x with\n| zero => exact iff_of_true hy.bot_lt (zero_le _)\n| succ x =>\n  rw [log]; split_ifs with h\n  · have b_pos : 0 < b := zero_le_one.trans_lt hb\n    rw [succ_eq_add_one, add_le_add_iff_right, ← ih (y / b) (div_lt_self hy.bot_lt hb) (Nat.div_pos h.1 b_pos).ne',\n      le_div_iff_mul_le b_pos, pow_succ', mul_comm]\n  · exact iff_of_false (fun hby => h ⟨(le_self_pow x.succ_ne_zero _).trans hby, hb⟩) (not_succ_le_zero _)\n[GOAL]\ncase h.zero\nb : ℕ\nhb : 1 < b\nx y✝ : ℕ\nhy✝ : y✝ ≠ 0\ny : ℕ\nih : ∀ (m : ℕ), m < y → ∀ {x : ℕ}, m ≠ 0 → (b ^ x ≤ m ↔ x ≤ log b m)\nhy : y ≠ 0\n⊢ b ^ zero ≤ y ↔ zero ≤ log b y\n[PROOFSTEP]\n\n| zero => exact iff_of_true hy.bot_lt (zero_le _)\n[GOAL]\ncase h.zero\nb : ℕ\nhb : 1 < b\nx y✝ : ℕ\nhy✝ : y✝ ≠ 0\ny : ℕ\nih : ∀ (m : ℕ), m < y → ∀ {x : ℕ}, m ≠ 0 → (b ^ x ≤ m ↔ x ≤ log b m)\nhy : y ≠ 0\n⊢ b ^ zero ≤ y ↔ zero ≤ log b y\n[PROOFSTEP]\nexact iff_of_true hy.bot_lt (zero_le _)\n[GOAL]\ncase h.succ\nb : ℕ\nhb : 1 < b\nx✝ y✝ : ℕ\nhy✝ : y✝ ≠ 0\ny : ℕ\nih : ∀ (m : ℕ), m < y → ∀ {x : ℕ}, m ≠ 0 → (b ^ x ≤ m ↔ x ≤ log b m)\nhy : y ≠ 0\nx : ℕ\n⊢ b ^ succ x ≤ y ↔ succ x ≤ log b y\n[PROOFSTEP]\n\n| succ x =>\n  rw [log]; split_ifs with h\n  · have b_pos : 0 < b := zero_le_one.trans_lt hb\n    rw [succ_eq_add_one, add_le_add_iff_right, ← ih (y / b) (div_lt_self hy.bot_lt hb) (Nat.div_pos h.1 b_pos).ne',\n      le_div_iff_mul_le b_pos, pow_succ', mul_comm]\n  · exact iff_of_false (fun hby => h ⟨(le_self_pow x.succ_ne_zero _).trans hby, hb⟩) (not_succ_le_zero _)\n[GOAL]\ncase h.succ\nb : ℕ\nhb : 1 < b\nx✝ y✝ : ℕ\nhy✝ : y✝ ≠ 0\ny : ℕ\nih : ∀ (m : ℕ), m < y → ∀ {x : ℕ}, m ≠ 0 → (b ^ x ≤ m ↔ x ≤ log b m)\nhy : y ≠ 0\nx : ℕ\n⊢ b ^ succ x ≤ y ↔ succ x ≤ log b y\n[PROOFSTEP]\nrw [log]\n[GOAL]\ncase h.succ\nb : ℕ\nhb : 1 < b\nx✝ y✝ : ℕ\nhy✝ : y✝ ≠ 0\ny : ℕ\nih : ∀ (m : ℕ), m < y → ∀ {x : ℕ}, m ≠ 0 → (b ^ x ≤ m ↔ x ≤ log b m)\nhy : y ≠ 0\nx : ℕ\n⊢ b ^ succ x ≤ y ↔\n    succ x ≤\n      if h : b ≤ y ∧ 1 < b then\n        let_fun this := (_ : y / b < y);\n        log b (y / b) + 1\n      else 0\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nb : ℕ\nhb : 1 < b\nx✝ y✝ : ℕ\nhy✝ : y✝ ≠ 0\ny : ℕ\nih : ∀ (m : ℕ), m < y → ∀ {x : ℕ}, m ≠ 0 → (b ^ x ≤ m ↔ x ≤ log b m)\nhy : y ≠ 0\nx : ℕ\nh : b ≤ y ∧ 1 < b\n⊢ b ^ succ x ≤ y ↔\n    succ x ≤\n      let_fun this := (_ : y / b < y);\n      log b (y / b) + 1\n[PROOFSTEP]\nhave b_pos : 0 < b := zero_le_one.trans_lt hb\n[GOAL]\ncase pos\nb : ℕ\nhb : 1 < b\nx✝ y✝ : ℕ\nhy✝ : y✝ ≠ 0\ny : ℕ\nih : ∀ (m : ℕ), m < y → ∀ {x : ℕ}, m ≠ 0 → (b ^ x ≤ m ↔ x ≤ log b m)\nhy : y ≠ 0\nx : ℕ\nh : b ≤ y ∧ 1 < b\nb_pos : 0 < b\n⊢ b ^ succ x ≤ y ↔\n    succ x ≤\n      let_fun this := (_ : y / b < y);\n      log b (y / b) + 1\n[PROOFSTEP]\nrw [succ_eq_add_one, add_le_add_iff_right, ← ih (y / b) (div_lt_self hy.bot_lt hb) (Nat.div_pos h.1 b_pos).ne',\n  le_div_iff_mul_le b_pos, pow_succ', mul_comm]\n[GOAL]\ncase neg\nb : ℕ\nhb : 1 < b\nx✝ y✝ : ℕ\nhy✝ : y✝ ≠ 0\ny : ℕ\nih : ∀ (m : ℕ), m < y → ∀ {x : ℕ}, m ≠ 0 → (b ^ x ≤ m ↔ x ≤ log b m)\nhy : y ≠ 0\nx : ℕ\nh : ¬(b ≤ y ∧ 1 < b)\n⊢ b ^ succ x ≤ y ↔ succ x ≤ 0\n[PROOFSTEP]\nexact iff_of_false (fun hby => h ⟨(le_self_pow x.succ_ne_zero _).trans hby, hb⟩) (not_succ_le_zero _)\n[GOAL]\nb x y : ℕ\nhy : y ≠ 0\nh : x ≤ log b y\n⊢ b ^ x ≤ y\n[PROOFSTEP]\nrefine' (le_or_lt b 1).elim (fun hb => _) fun hb => (pow_le_iff_le_log hb hy).2 h\n[GOAL]\nb x y : ℕ\nhy : y ≠ 0\nh : x ≤ log b y\nhb : b ≤ 1\n⊢ b ^ x ≤ y\n[PROOFSTEP]\nrw [log_of_left_le_one hb, nonpos_iff_eq_zero] at h \n[GOAL]\nb x y : ℕ\nhy : y ≠ 0\nh : x = 0\nhb : b ≤ 1\n⊢ b ^ x ≤ y\n[PROOFSTEP]\nrwa [h, pow_zero, one_le_iff_ne_zero]\n[GOAL]\nb x y : ℕ\nhb : 1 < b\nh : b ^ x ≤ y\n⊢ x ≤ log b y\n[PROOFSTEP]\nrcases ne_or_eq y 0 with (hy | rfl)\n[GOAL]\ncase inl\nb x y : ℕ\nhb : 1 < b\nh : b ^ x ≤ y\nhy : y ≠ 0\n⊢ x ≤ log b y\ncase inr b x : ℕ hb : 1 < b h : b ^ x ≤ 0 ⊢ x ≤ log b 0\n[PROOFSTEP]\nexacts [(pow_le_iff_le_log hb hy).1 h, (h.not_lt (pow_pos (zero_lt_one.trans hb) _)).elim]\n[GOAL]\nb m n : ℕ\nh : m ≠ 0 ∨ 1 < b ∧ n ≠ 0\n⊢ log b n = m ↔ b ^ m ≤ n ∧ n < b ^ (m + 1)\n[PROOFSTEP]\nrcases em (1 < b ∧ n ≠ 0) with (⟨hb, hn⟩ | hbn)\n[GOAL]\ncase inl.intro\nb m n : ℕ\nh : m ≠ 0 ∨ 1 < b ∧ n ≠ 0\nhb : 1 < b\nhn : n ≠ 0\n⊢ log b n = m ↔ b ^ m ≤ n ∧ n < b ^ (m + 1)\n[PROOFSTEP]\nrw [le_antisymm_iff, ← lt_succ_iff, ← pow_le_iff_le_log, ← lt_pow_iff_log_lt, and_comm]\n[GOAL]\ncase inl.intro.hb\nb m n : ℕ\nh : m ≠ 0 ∨ 1 < b ∧ n ≠ 0\nhb : 1 < b\nhn : n ≠ 0\n⊢ 1 < b\n[PROOFSTEP]\nassumption\n[GOAL]\ncase inl.intro.hy\nb m n : ℕ\nh : m ≠ 0 ∨ 1 < b ∧ n ≠ 0\nhb : 1 < b\nhn : n ≠ 0\n⊢ n ≠ 0\n[PROOFSTEP]\nassumption\n[GOAL]\ncase inl.intro.hb\nb m n : ℕ\nh : m ≠ 0 ∨ 1 < b ∧ n ≠ 0\nhb : 1 < b\nhn : n ≠ 0\n⊢ 1 < b\n[PROOFSTEP]\nassumption\n[GOAL]\ncase inl.intro.hy\nb m n : ℕ\nh : m ≠ 0 ∨ 1 < b ∧ n ≠ 0\nhb : 1 < b\nhn : n ≠ 0\n⊢ n ≠ 0\n[PROOFSTEP]\nassumption\n[GOAL]\ncase inr\nb m n : ℕ\nh : m ≠ 0 ∨ 1 < b ∧ n ≠ 0\nhbn : ¬(1 < b ∧ n ≠ 0)\n⊢ log b n = m ↔ b ^ m ≤ n ∧ n < b ^ (m + 1)\n[PROOFSTEP]\nhave hm : m ≠ 0 := h.resolve_right hbn\n[GOAL]\ncase inr\nb m n : ℕ\nh : m ≠ 0 ∨ 1 < b ∧ n ≠ 0\nhbn : ¬(1 < b ∧ n ≠ 0)\nhm : m ≠ 0\n⊢ log b n = m ↔ b ^ m ≤ n ∧ n < b ^ (m + 1)\n[PROOFSTEP]\nrw [not_and_or, not_lt, Ne.def, not_not] at hbn \n[GOAL]\ncase inr\nb m n : ℕ\nh : m ≠ 0 ∨ 1 < b ∧ n ≠ 0\nhbn : b ≤ 1 ∨ n = 0\nhm : m ≠ 0\n⊢ log b n = m ↔ b ^ m ≤ n ∧ n < b ^ (m + 1)\n[PROOFSTEP]\nrcases hbn with (hb | rfl)\n[GOAL]\ncase inr.inl\nb m n : ℕ\nh : m ≠ 0 ∨ 1 < b ∧ n ≠ 0\nhm : m ≠ 0\nhb : b ≤ 1\n⊢ log b n = m ↔ b ^ m ≤ n ∧ n < b ^ (m + 1)\n[PROOFSTEP]\nsimpa only [log_of_left_le_one hb, hm.symm, false_iff_iff, not_and, not_lt] using\n  le_trans (pow_le_pow_of_le_one' hb m.le_succ)\n[GOAL]\ncase inr.inr\nb m : ℕ\nhm : m ≠ 0\nh : m ≠ 0 ∨ 1 < b ∧ 0 ≠ 0\n⊢ log b 0 = m ↔ b ^ m ≤ 0 ∧ 0 < b ^ (m + 1)\n[PROOFSTEP]\nsimpa only [log_zero_right, hm.symm, nonpos_iff_eq_zero, false_iff, not_and, not_lt, add_pos_iff, or_true,\n  pow_eq_zero_iff] using pow_eq_zero\n[GOAL]\nb m n : ℕ\nh₁ : b ^ m ≤ n\nh₂ : n < b ^ (m + 1)\n⊢ log b n = m\n[PROOFSTEP]\nrcases eq_or_ne m 0 with (rfl | hm)\n[GOAL]\ncase inl\nb n : ℕ\nh₁ : b ^ 0 ≤ n\nh₂ : n < b ^ (0 + 1)\n⊢ log b n = 0\n[PROOFSTEP]\nrw [pow_one] at h₂ \n[GOAL]\ncase inl\nb n : ℕ\nh₁ : b ^ 0 ≤ n\nh₂ : n < b\n⊢ log b n = 0\n[PROOFSTEP]\nexact log_of_lt h₂\n[GOAL]\ncase inr\nb m n : ℕ\nh₁ : b ^ m ≤ n\nh₂ : n < b ^ (m + 1)\nhm : m ≠ 0\n⊢ log b n = m\n[PROOFSTEP]\nexact (log_eq_iff (Or.inl hm)).2 ⟨h₁, h₂⟩\n[GOAL]\nb n : ℕ\n⊢ log b n = 1 ↔ b ≤ n ∧ n < b * b\n[PROOFSTEP]\nrw [log_eq_iff (Or.inl one_ne_zero), pow_add, pow_one]\n[GOAL]\nb n : ℕ\nhb : 1 < b\nhn : n ≠ 0\n⊢ log b (n * b) = log b n + 1\n[PROOFSTEP]\napply log_eq_of_pow_le_of_lt_pow\n[GOAL]\ncase h₁\nb n : ℕ\nhb : 1 < b\nhn : n ≠ 0\n⊢ b ^ (log b n + 1) ≤ n * b\n[PROOFSTEP]\nrw [pow_succ', mul_comm b]\n[GOAL]\ncase h₂\nb n : ℕ\nhb : 1 < b\nhn : n ≠ 0\n⊢ n * b < b ^ (log b n + 1 + 1)\n[PROOFSTEP]\nrw [pow_succ', mul_comm b]\n[GOAL]\ncase h₁\nb n : ℕ\nhb : 1 < b\nhn : n ≠ 0\n⊢ b ^ log b n * b ≤ n * b\ncase h₂ b n : ℕ hb : 1 < b hn : n ≠ 0 ⊢ n * b < b ^ (log b n + 1) * b\n[PROOFSTEP]\nexacts [mul_le_mul_right' (pow_log_le_self _ hn) _,\n  (mul_lt_mul_right (zero_lt_one.trans hb)).2 (lt_pow_succ_log_self hb _)]\n[GOAL]\nb : ℕ\n⊢ b ^ log b 0 ≤ 0 + 1\n[PROOFSTEP]\nrw [log_zero_right, pow_zero]\n[GOAL]\nb : ℕ\n⊢ Monotone (log b)\n[PROOFSTEP]\nrefine' monotone_nat_of_le_succ fun n => _\n[GOAL]\nb n : ℕ\n⊢ log b n ≤ log b (n + 1)\n[PROOFSTEP]\ncases' le_or_lt b 1 with hb hb\n[GOAL]\ncase inl\nb n : ℕ\nhb : b ≤ 1\n⊢ log b n ≤ log b (n + 1)\n[PROOFSTEP]\nrw [log_of_left_le_one hb]\n[GOAL]\ncase inl\nb n : ℕ\nhb : b ≤ 1\n⊢ 0 ≤ log b (n + 1)\n[PROOFSTEP]\nexact zero_le _\n[GOAL]\ncase inr\nb n : ℕ\nhb : 1 < b\n⊢ log b n ≤ log b (n + 1)\n[PROOFSTEP]\nexact le_log_of_pow_le hb (pow_log_le_add_one _ _)\n[GOAL]\nb c n : ℕ\nhc : 1 < c\nhb : c ≤ b\n⊢ log b n ≤ log c n\n[PROOFSTEP]\nrcases eq_or_ne n 0 with (rfl | hn)\n[GOAL]\ncase inl\nb c : ℕ\nhc : 1 < c\nhb : c ≤ b\n⊢ log b 0 ≤ log c 0\n[PROOFSTEP]\nrw [log_zero_right, log_zero_right]\n[GOAL]\ncase inr\nb c n : ℕ\nhc : 1 < c\nhb : c ≤ b\nhn : n ≠ 0\n⊢ log b n ≤ log c n\n[PROOFSTEP]\napply le_log_of_pow_le hc\n[GOAL]\ncase inr\nb c n : ℕ\nhc : 1 < c\nhb : c ≤ b\nhn : n ≠ 0\n⊢ c ^ log b n ≤ n\n[PROOFSTEP]\ncalc\n  c ^ log b n ≤ b ^ log b n := pow_le_pow_of_le_left' hb _\n  _ ≤ n := pow_log_le_self _ hn\n[GOAL]\nb n : ℕ\n⊢ log b (n / b) = log b n - 1\n[PROOFSTEP]\ncases' le_or_lt b 1 with hb hb\n[GOAL]\ncase inl\nb n : ℕ\nhb : b ≤ 1\n⊢ log b (n / b) = log b n - 1\n[PROOFSTEP]\nrw [log_of_left_le_one hb, log_of_left_le_one hb, Nat.zero_sub]\n[GOAL]\ncase inr\nb n : ℕ\nhb : 1 < b\n⊢ log b (n / b) = log b n - 1\n[PROOFSTEP]\ncases' lt_or_le n b with h h\n[GOAL]\ncase inr.inl\nb n : ℕ\nhb : 1 < b\nh : n < b\n⊢ log b (n / b) = log b n - 1\n[PROOFSTEP]\nrw [div_eq_of_lt h, log_of_lt h, log_zero_right]\n[GOAL]\ncase inr.inr\nb n : ℕ\nhb : 1 < b\nh : b ≤ n\n⊢ log b (n / b) = log b n - 1\n[PROOFSTEP]\nrw [log_of_one_lt_of_le hb h, add_tsub_cancel_right]\n[GOAL]\nb n : ℕ\n⊢ log b (n / b * b) = log b n\n[PROOFSTEP]\ncases' le_or_lt b 1 with hb hb\n[GOAL]\ncase inl\nb n : ℕ\nhb : b ≤ 1\n⊢ log b (n / b * b) = log b n\n[PROOFSTEP]\nrw [log_of_left_le_one hb, log_of_left_le_one hb]\n[GOAL]\ncase inr\nb n : ℕ\nhb : 1 < b\n⊢ log b (n / b * b) = log b n\n[PROOFSTEP]\ncases' lt_or_le n b with h h\n[GOAL]\ncase inr.inl\nb n : ℕ\nhb : 1 < b\nh : n < b\n⊢ log b (n / b * b) = log b n\n[PROOFSTEP]\nrw [div_eq_of_lt h, zero_mul, log_zero_right, log_of_lt h]\n[GOAL]\ncase inr.inr\nb n : ℕ\nhb : 1 < b\nh : b ≤ n\n⊢ log b (n / b * b) = log b n\n[PROOFSTEP]\nrw [log_mul_base hb (Nat.div_pos h (zero_le_one.trans_lt hb)).ne', log_div_base,\n  tsub_add_cancel_of_le (succ_le_iff.2 <| log_pos hb h)]\n[GOAL]\nb n : ℕ\nhb : 1 < b\nhn : 2 ≤ n\n⊢ (n + b - 1) / b < n\n[PROOFSTEP]\nrw [div_lt_iff_lt_mul (zero_lt_one.trans hb), ← succ_le_iff, ← pred_eq_sub_one,\n  succ_pred_eq_of_pos (add_pos (zero_lt_one.trans hn) (zero_lt_one.trans hb))]\n[GOAL]\nb n : ℕ\nhb : 1 < b\nhn : 2 ≤ n\n⊢ n + b ≤ n * b\n[PROOFSTEP]\nexact add_le_mul hn hb\n[GOAL]\nb : ℕ\nhb : b ≤ 1\nn : ℕ\n⊢ clog b n = 0\n[PROOFSTEP]\nrw [clog, dif_neg fun h : 1 < b ∧ 1 < n => h.1.not_le hb]\n[GOAL]\nn : ℕ\nhn : n ≤ 1\nb : ℕ\n⊢ clog b n = 0\n[PROOFSTEP]\nrw [clog, dif_neg fun h : 1 < b ∧ 1 < n => h.2.not_le hn]\n[GOAL]\nb n : ℕ\nhb : 1 < b\nhn : 2 ≤ n\n⊢ clog b n = clog b ((n + b - 1) / b) + 1\n[PROOFSTEP]\nrw [clog, dif_pos (⟨hb, hn⟩ : 1 < b ∧ 1 < n)]\n[GOAL]\nb n : ℕ\nhb : 1 < b\nhn : 2 ≤ n\n⊢ 0 < clog b n\n[PROOFSTEP]\nrw [clog_of_two_le hb hn]\n[GOAL]\nb n : ℕ\nhb : 1 < b\nhn : 2 ≤ n\n⊢ 0 < clog b ((n + b - 1) / b) + 1\n[PROOFSTEP]\nexact zero_lt_succ _\n[GOAL]\nb n : ℕ\nhn : 2 ≤ n\nh : n ≤ b\n⊢ clog b n = 1\n[PROOFSTEP]\nrw [clog_of_two_le (hn.trans h) hn, clog_of_right_le_one]\n[GOAL]\ncase hn\nb n : ℕ\nhn : 2 ≤ n\nh : n ≤ b\n⊢ (n + b - 1) / b ≤ 1\n[PROOFSTEP]\nhave n_pos : 0 < n := (zero_lt_two' ℕ).trans_le hn\n[GOAL]\ncase hn\nb n : ℕ\nhn : 2 ≤ n\nh : n ≤ b\nn_pos : 0 < n\n⊢ (n + b - 1) / b ≤ 1\n[PROOFSTEP]\nrw [← lt_succ_iff, Nat.div_lt_iff_lt_mul (n_pos.trans_le h), ← succ_le_iff, ← pred_eq_sub_one,\n  succ_pred_eq_of_pos (add_pos n_pos (n_pos.trans_le h)), succ_mul, one_mul]\n[GOAL]\ncase hn\nb n : ℕ\nhn : 2 ≤ n\nh : n ≤ b\nn_pos : 0 < n\n⊢ n + b ≤ b + b\n[PROOFSTEP]\nexact add_le_add_right h _\n[GOAL]\nb : ℕ\nhb : 1 < b\nx y : ℕ\n⊢ x ≤ b ^ y ↔ clog b x ≤ y\n[PROOFSTEP]\ninduction' x using Nat.strong_induction_on with x ih generalizing y\n[GOAL]\ncase h\nb : ℕ\nhb : 1 < b\ny✝ x : ℕ\nih : ∀ (m : ℕ), m < x → ∀ {y : ℕ}, m ≤ b ^ y ↔ clog b m ≤ y\ny : ℕ\n⊢ x ≤ b ^ y ↔ clog b x ≤ y\n[PROOFSTEP]\ncases y\n[GOAL]\ncase h.zero\nb : ℕ\nhb : 1 < b\ny x : ℕ\nih : ∀ (m : ℕ), m < x → ∀ {y : ℕ}, m ≤ b ^ y ↔ clog b m ≤ y\n⊢ x ≤ b ^ zero ↔ clog b x ≤ zero\n[PROOFSTEP]\nrw [pow_zero]\n[GOAL]\ncase h.zero\nb : ℕ\nhb : 1 < b\ny x : ℕ\nih : ∀ (m : ℕ), m < x → ∀ {y : ℕ}, m ≤ b ^ y ↔ clog b m ≤ y\n⊢ x ≤ 1 ↔ clog b x ≤ zero\n[PROOFSTEP]\nrefine' ⟨fun h => (clog_of_right_le_one h b).le, _⟩\n[GOAL]\ncase h.zero\nb : ℕ\nhb : 1 < b\ny x : ℕ\nih : ∀ (m : ℕ), m < x → ∀ {y : ℕ}, m ≤ b ^ y ↔ clog b m ≤ y\n⊢ clog b x ≤ zero → x ≤ 1\n[PROOFSTEP]\nsimp_rw [← not_lt]\n[GOAL]\ncase h.zero\nb : ℕ\nhb : 1 < b\ny x : ℕ\nih : ∀ (m : ℕ), m < x → ∀ {y : ℕ}, m ≤ b ^ y ↔ clog b m ≤ y\n⊢ ¬zero < clog b x → ¬1 < x\n[PROOFSTEP]\ncontrapose!\n[GOAL]\ncase h.zero\nb : ℕ\nhb : 1 < b\ny x : ℕ\nih : ∀ (m : ℕ), m < x → ∀ {y : ℕ}, m ≤ b ^ y ↔ clog b m ≤ y\n⊢ 1 < x → zero < clog b x\n[PROOFSTEP]\nexact clog_pos hb\n[GOAL]\ncase h.succ\nb : ℕ\nhb : 1 < b\ny x : ℕ\nih : ∀ (m : ℕ), m < x → ∀ {y : ℕ}, m ≤ b ^ y ↔ clog b m ≤ y\nn✝ : ℕ\n⊢ x ≤ b ^ succ n✝ ↔ clog b x ≤ succ n✝\n[PROOFSTEP]\nhave b_pos : 0 < b := (zero_lt_one' ℕ).trans hb\n[GOAL]\ncase h.succ\nb : ℕ\nhb : 1 < b\ny x : ℕ\nih : ∀ (m : ℕ), m < x → ∀ {y : ℕ}, m ≤ b ^ y ↔ clog b m ≤ y\nn✝ : ℕ\nb_pos : 0 < b\n⊢ x ≤ b ^ succ n✝ ↔ clog b x ≤ succ n✝\n[PROOFSTEP]\nrw [clog]\n[GOAL]\ncase h.succ\nb : ℕ\nhb : 1 < b\ny x : ℕ\nih : ∀ (m : ℕ), m < x → ∀ {y : ℕ}, m ≤ b ^ y ↔ clog b m ≤ y\nn✝ : ℕ\nb_pos : 0 < b\n⊢ x ≤ b ^ succ n✝ ↔\n    (if h : 1 < b ∧ 1 < x then\n        let_fun this := (_ : (x + b - 1) / b < x);\n        clog b ((x + b - 1) / b) + 1\n      else 0) ≤\n      succ n✝\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nb : ℕ\nhb : 1 < b\ny x : ℕ\nih : ∀ (m : ℕ), m < x → ∀ {y : ℕ}, m ≤ b ^ y ↔ clog b m ≤ y\nn✝ : ℕ\nb_pos : 0 < b\nh : 1 < b ∧ 1 < x\n⊢ x ≤ b ^ succ n✝ ↔\n    (let_fun this := (_ : (x + b - 1) / b < x);\n      clog b ((x + b - 1) / b) + 1) ≤\n      succ n✝\n[PROOFSTEP]\nrw [succ_eq_add_one, add_le_add_iff_right, ← ih ((x + b - 1) / b) (add_pred_div_lt hb h.2),\n  Nat.div_le_iff_le_mul_add_pred b_pos, mul_comm b, ← pow_succ, add_tsub_assoc_of_le (Nat.succ_le_of_lt b_pos),\n  add_le_add_iff_right]\n[GOAL]\ncase neg\nb : ℕ\nhb : 1 < b\ny x : ℕ\nih : ∀ (m : ℕ), m < x → ∀ {y : ℕ}, m ≤ b ^ y ↔ clog b m ≤ y\nn✝ : ℕ\nb_pos : 0 < b\nh : ¬(1 < b ∧ 1 < x)\n⊢ x ≤ b ^ succ n✝ ↔ 0 ≤ succ n✝\n[PROOFSTEP]\nexact iff_of_true ((not_lt.1 (not_and.1 h hb)).trans <| succ_le_of_lt <| pow_pos b_pos _) (zero_le _)\n[GOAL]\nb x : ℕ\nhb : 1 < b\nz : ℕ\n⊢ clog b (b ^ x) ≤ z ↔ x ≤ z\n[PROOFSTEP]\nrw [← le_pow_iff_clog_le hb]\n[GOAL]\nb x : ℕ\nhb : 1 < b\nz : ℕ\n⊢ b ^ x ≤ b ^ z ↔ x ≤ z\n[PROOFSTEP]\nexact (pow_right_strictMono hb).le_iff_le\n[GOAL]\nb : ℕ\nhb : 1 < b\nx : ℕ\nhx : 1 < x\n⊢ b ^ pred (clog b x) < x\n[PROOFSTEP]\nrw [← not_le, le_pow_iff_clog_le hb, not_le]\n[GOAL]\nb : ℕ\nhb : 1 < b\nx : ℕ\nhx : 1 < x\n⊢ pred (clog b x) < clog b x\n[PROOFSTEP]\nexact pred_lt (clog_pos hb hx).ne'\n[GOAL]\nb n m : ℕ\nh : n ≤ m\n⊢ clog b n ≤ clog b m\n[PROOFSTEP]\ncases' le_or_lt b 1 with hb hb\n[GOAL]\ncase inl\nb n m : ℕ\nh : n ≤ m\nhb : b ≤ 1\n⊢ clog b n ≤ clog b m\n[PROOFSTEP]\nrw [clog_of_left_le_one hb]\n[GOAL]\ncase inl\nb n m : ℕ\nh : n ≤ m\nhb : b ≤ 1\n⊢ 0 ≤ clog b m\n[PROOFSTEP]\nexact zero_le _\n[GOAL]\ncase inr\nb n m : ℕ\nh : n ≤ m\nhb : 1 < b\n⊢ clog b n ≤ clog b m\n[PROOFSTEP]\nrw [← le_pow_iff_clog_le hb]\n[GOAL]\ncase inr\nb n m : ℕ\nh : n ≤ m\nhb : 1 < b\n⊢ n ≤ b ^ clog b m\n[PROOFSTEP]\nexact h.trans (le_pow_clog hb _)\n[GOAL]\nb c n : ℕ\nhc : 1 < c\nhb : c ≤ b\n⊢ clog b n ≤ clog c n\n[PROOFSTEP]\nrw [← le_pow_iff_clog_le (lt_of_lt_of_le hc hb)]\n[GOAL]\nb c n : ℕ\nhc : 1 < c\nhb : c ≤ b\n⊢ n ≤ b ^ clog c n\n[PROOFSTEP]\ncalc\n  n ≤ c ^ clog c n := le_pow_clog hc _\n  _ ≤ b ^ clog c n := pow_le_pow_of_le_left hb _\n[GOAL]\nb n : ℕ\n⊢ log b n ≤ clog b n\n[PROOFSTEP]\nobtain hb | hb := le_or_lt b 1\n[GOAL]\ncase inl\nb n : ℕ\nhb : b ≤ 1\n⊢ log b n ≤ clog b n\n[PROOFSTEP]\nrw [log_of_left_le_one hb]\n[GOAL]\ncase inl\nb n : ℕ\nhb : b ≤ 1\n⊢ 0 ≤ clog b n\n[PROOFSTEP]\nexact zero_le _\n[GOAL]\ncase inr\nb n : ℕ\nhb : 1 < b\n⊢ log b n ≤ clog b n\n[PROOFSTEP]\ncases n with\n| zero =>\n  rw [log_zero_right]\n  exact zero_le _\n| succ n => exact (pow_right_strictMono hb).le_iff_le.1 ((pow_log_le_self b n.succ_ne_zero).trans <| le_pow_clog hb _)\n[GOAL]\ncase inr\nb n : ℕ\nhb : 1 < b\n⊢ log b n ≤ clog b n\n[PROOFSTEP]\ncases n with\n| zero =>\n  rw [log_zero_right]\n  exact zero_le _\n| succ n => exact (pow_right_strictMono hb).le_iff_le.1 ((pow_log_le_self b n.succ_ne_zero).trans <| le_pow_clog hb _)\n[GOAL]\ncase inr.zero\nb : ℕ\nhb : 1 < b\n⊢ log b zero ≤ clog b zero\n[PROOFSTEP]\n\n| zero =>\n  rw [log_zero_right]\n  exact zero_le _\n[GOAL]\ncase inr.zero\nb : ℕ\nhb : 1 < b\n⊢ log b zero ≤ clog b zero\n[PROOFSTEP]\nrw [log_zero_right]\n[GOAL]\ncase inr.zero\nb : ℕ\nhb : 1 < b\n⊢ 0 ≤ clog b zero\n[PROOFSTEP]\nexact zero_le _\n[GOAL]\ncase inr.succ\nb : ℕ\nhb : 1 < b\nn : ℕ\n⊢ log b (succ n) ≤ clog b (succ n)\n[PROOFSTEP]\n\n| succ n => exact (pow_right_strictMono hb).le_iff_le.1 ((pow_log_le_self b n.succ_ne_zero).trans <| le_pow_clog hb _)\n[GOAL]\ncase inr.succ\nb : ℕ\nhb : 1 < b\nn : ℕ\n⊢ log b (succ n) ≤ clog b (succ n)\n[PROOFSTEP]\nexact (pow_right_strictMono hb).le_iff_le.1 ((pow_log_le_self b n.succ_ne_zero).trans <| le_pow_clog hb _)\n", "meta": {"mathlib_filename": "Mathlib.Data.Nat.Log", "llama_tokens": 10475, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7606506635289836, "lm_q2_score": 0.7057850154599562, "lm_q1q2_score": 0.5368558403184296}}
{"text": "[GOAL]\np : ℕ\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : DecidableEq R\nn : ℕ\n⊢ wittPolynomial p R n = ∑ i in range (n + 1), ↑C (↑p ^ i) * X i ^ p ^ (n - i)\n[PROOFSTEP]\napply sum_congr rfl\n[GOAL]\np : ℕ\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : DecidableEq R\nn : ℕ\n⊢ ∀ (x : ℕ), x ∈ range (n + 1) → ↑(monomial (single x (p ^ (n - x)))) (↑p ^ x) = ↑C (↑p ^ x) * X x ^ p ^ (n - x)\n[PROOFSTEP]\nrintro i -\n[GOAL]\np : ℕ\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : DecidableEq R\nn i : ℕ\n⊢ ↑(monomial (single i (p ^ (n - i)))) (↑p ^ i) = ↑C (↑p ^ i) * X i ^ p ^ (n - i)\n[PROOFSTEP]\nrw [monomial_eq, Finsupp.prod_single_index]\n[GOAL]\np : ℕ\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : DecidableEq R\nn i : ℕ\n⊢ X i ^ 0 = 1\n[PROOFSTEP]\nrw [pow_zero]\n[GOAL]\np : ℕ\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : DecidableEq R\nS : Type u_2\ninst✝ : CommRing S\nf : R →+* S\nn : ℕ\n⊢ ↑(map f) (W_ R n) = W_ S n\n[PROOFSTEP]\nrw [wittPolynomial, map_sum, wittPolynomial]\n[GOAL]\np : ℕ\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : DecidableEq R\nS : Type u_2\ninst✝ : CommRing S\nf : R →+* S\nn : ℕ\n⊢ ∑ x in range (n + 1), ↑(map f) (↑(monomial (single x (p ^ (n - x)))) (↑p ^ x)) =\n    ∑ i in range (n + 1), ↑(monomial (single i (p ^ (n - i)))) (↑p ^ i)\n[PROOFSTEP]\nrefine sum_congr rfl fun i _ => ?_\n[GOAL]\np : ℕ\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : DecidableEq R\nS : Type u_2\ninst✝ : CommRing S\nf : R →+* S\nn i : ℕ\nx✝ : i ∈ range (n + 1)\n⊢ ↑(map f) (↑(monomial (single i (p ^ (n - i)))) (↑p ^ i)) = ↑(monomial (single i (p ^ (n - i)))) (↑p ^ i)\n[PROOFSTEP]\nrw [map_monomial, RingHom.map_pow, map_natCast]\n[GOAL]\np : ℕ\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : DecidableEq R\nS : Type u_2\ninst✝ : CommRing S\nhp : Fact (Nat.Prime p)\nn : ℕ\n⊢ ↑constantCoeff (W_ R n) = 0\n[PROOFSTEP]\nsimp only [wittPolynomial, map_sum, constantCoeff_monomial]\n[GOAL]\np : ℕ\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : DecidableEq R\nS : Type u_2\ninst✝ : CommRing S\nhp : Fact (Nat.Prime p)\nn : ℕ\n⊢ (∑ x in range (n + 1), if single x (p ^ (n - x)) = 0 then ↑p ^ x else 0) = 0\n[PROOFSTEP]\nrw [sum_eq_zero]\n[GOAL]\np : ℕ\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : DecidableEq R\nS : Type u_2\ninst✝ : CommRing S\nhp : Fact (Nat.Prime p)\nn : ℕ\n⊢ ∀ (x : ℕ), x ∈ range (n + 1) → (if single x (p ^ (n - x)) = 0 then ↑p ^ x else 0) = 0\n[PROOFSTEP]\nrintro i _\n[GOAL]\np : ℕ\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : DecidableEq R\nS : Type u_2\ninst✝ : CommRing S\nhp : Fact (Nat.Prime p)\nn i : ℕ\na✝ : i ∈ range (n + 1)\n⊢ (if single i (p ^ (n - i)) = 0 then ↑p ^ i else 0) = 0\n[PROOFSTEP]\nrw [if_neg]\n[GOAL]\ncase hnc\np : ℕ\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : DecidableEq R\nS : Type u_2\ninst✝ : CommRing S\nhp : Fact (Nat.Prime p)\nn i : ℕ\na✝ : i ∈ range (n + 1)\n⊢ ¬single i (p ^ (n - i)) = 0\n[PROOFSTEP]\nrw [Finsupp.single_eq_zero]\n[GOAL]\ncase hnc\np : ℕ\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : DecidableEq R\nS : Type u_2\ninst✝ : CommRing S\nhp : Fact (Nat.Prime p)\nn i : ℕ\na✝ : i ∈ range (n + 1)\n⊢ ¬p ^ (n - i) = 0\n[PROOFSTEP]\nexact ne_of_gt (pow_pos hp.1.pos _)\n[GOAL]\np : ℕ\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : DecidableEq R\nS : Type u_2\ninst✝ : CommRing S\n⊢ W_ R 0 = X 0\n[PROOFSTEP]\nsimp only [wittPolynomial, X, sum_singleton, range_one, pow_zero, zero_add, tsub_self]\n[GOAL]\np : ℕ\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : DecidableEq R\nS : Type u_2\ninst✝ : CommRing S\n⊢ W_ R 1 = ↑C ↑p * X 1 + X 0 ^ p\n[PROOFSTEP]\nsimp only [wittPolynomial_eq_sum_C_mul_X_pow, sum_range_succ_comm, range_one, sum_singleton, one_mul, pow_one, C_1,\n  pow_zero, tsub_self, tsub_zero]\n[GOAL]\np : ℕ\nR : Type u_1\ninst✝⁴ : CommRing R\ninst✝³ : DecidableEq R\nS : Type u_2\ninst✝² : CommRing S\nA : Type u_3\ninst✝¹ : CommRing A\ninst✝ : Algebra R A\nf : ℕ → A\nn : ℕ\n⊢ ↑(aeval f) (W_ R n) = ∑ i in range (n + 1), ↑p ^ i * f i ^ p ^ (n - i)\n[PROOFSTEP]\nsimp [wittPolynomial, AlgHom.map_sum, aeval_monomial, Finsupp.prod_single_index]\n[GOAL]\np : ℕ\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : DecidableEq R\nS : Type u_2\ninst✝ : CommRing S\nn : ℕ\n⊢ W_ (ZMod (p ^ (n + 1))) (n + 1) = ↑(expand p) (W_ (ZMod (p ^ (n + 1))) n)\n[PROOFSTEP]\nsimp only [wittPolynomial_eq_sum_C_mul_X_pow]\n[GOAL]\np : ℕ\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : DecidableEq R\nS : Type u_2\ninst✝ : CommRing S\nn : ℕ\n⊢ ∑ x in range (n + 1 + 1), ↑C (↑p ^ x) * X x ^ p ^ (n + 1 - x) =\n    ↑(expand p) (∑ x in range (n + 1), ↑C (↑p ^ x) * X x ^ p ^ (n - x))\n[PROOFSTEP]\nrw [sum_range_succ, ← Nat.cast_pow, CharP.cast_eq_zero (ZMod (p ^ (n + 1))) (p ^ (n + 1)), C_0, zero_mul, add_zero,\n  AlgHom.map_sum, sum_congr rfl]\n[GOAL]\np : ℕ\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : DecidableEq R\nS : Type u_2\ninst✝ : CommRing S\nn : ℕ\n⊢ ∀ (x : ℕ), x ∈ range (n + 1) → ↑C (↑p ^ x) * X x ^ p ^ (n + 1 - x) = ↑(expand p) (↑C (↑p ^ x) * X x ^ p ^ (n - x))\n[PROOFSTEP]\nintro k hk\n[GOAL]\np : ℕ\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : DecidableEq R\nS : Type u_2\ninst✝ : CommRing S\nn k : ℕ\nhk : k ∈ range (n + 1)\n⊢ ↑C (↑p ^ k) * X k ^ p ^ (n + 1 - k) = ↑(expand p) (↑C (↑p ^ k) * X k ^ p ^ (n - k))\n[PROOFSTEP]\nrw [AlgHom.map_mul, AlgHom.map_pow, expand_X, algHom_C, ← pow_mul, ← pow_succ]\n[GOAL]\np : ℕ\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : DecidableEq R\nS : Type u_2\ninst✝ : CommRing S\nn k : ℕ\nhk : k ∈ range (n + 1)\n⊢ ↑C (↑p ^ k) * X k ^ p ^ (n + 1 - k) = ↑C (↑p ^ k) * X k ^ p ^ (n - k + 1)\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_a.e_a.e_a\np : ℕ\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : DecidableEq R\nS : Type u_2\ninst✝ : CommRing S\nn k : ℕ\nhk : k ∈ range (n + 1)\n⊢ n + 1 - k = n - k + 1\n[PROOFSTEP]\nrw [mem_range] at hk \n[GOAL]\ncase e_a.e_a.e_a\np : ℕ\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : DecidableEq R\nS : Type u_2\ninst✝ : CommRing S\nn k : ℕ\nhk : k < n + 1\n⊢ n + 1 - k = n - k + 1\n[PROOFSTEP]\nrw [add_comm, add_tsub_assoc_of_le (Nat.lt_succ_iff.mp hk), ← add_comm]\n[GOAL]\np : ℕ\nR : Type u_1\ninst✝³ : CommRing R\ninst✝² : DecidableEq R\nS : Type u_2\ninst✝¹ : CommRing S\nhp : NeZero p\ninst✝ : CharZero R\nn : ℕ\n⊢ vars (W_ R n) = range (n + 1)\n[PROOFSTEP]\nhave : ∀ i, (monomial (Finsupp.single i (p ^ (n - i))) ((p : R) ^ i)).vars = { i } :=\n  by\n  intro i\n  refine' vars_monomial_single i (pow_ne_zero _ hp.1) _\n  rw [← Nat.cast_pow, Nat.cast_ne_zero]\n  exact pow_ne_zero i hp.1\n[GOAL]\np : ℕ\nR : Type u_1\ninst✝³ : CommRing R\ninst✝² : DecidableEq R\nS : Type u_2\ninst✝¹ : CommRing S\nhp : NeZero p\ninst✝ : CharZero R\nn : ℕ\n⊢ ∀ (i : ℕ), vars (↑(monomial (single i (p ^ (n - i)))) (↑p ^ i)) = {i}\n[PROOFSTEP]\nintro i\n[GOAL]\np : ℕ\nR : Type u_1\ninst✝³ : CommRing R\ninst✝² : DecidableEq R\nS : Type u_2\ninst✝¹ : CommRing S\nhp : NeZero p\ninst✝ : CharZero R\nn i : ℕ\n⊢ vars (↑(monomial (single i (p ^ (n - i)))) (↑p ^ i)) = {i}\n[PROOFSTEP]\nrefine' vars_monomial_single i (pow_ne_zero _ hp.1) _\n[GOAL]\np : ℕ\nR : Type u_1\ninst✝³ : CommRing R\ninst✝² : DecidableEq R\nS : Type u_2\ninst✝¹ : CommRing S\nhp : NeZero p\ninst✝ : CharZero R\nn i : ℕ\n⊢ ↑p ^ i ≠ 0\n[PROOFSTEP]\nrw [← Nat.cast_pow, Nat.cast_ne_zero]\n[GOAL]\np : ℕ\nR : Type u_1\ninst✝³ : CommRing R\ninst✝² : DecidableEq R\nS : Type u_2\ninst✝¹ : CommRing S\nhp : NeZero p\ninst✝ : CharZero R\nn i : ℕ\n⊢ p ^ i ≠ 0\n[PROOFSTEP]\nexact pow_ne_zero i hp.1\n[GOAL]\np : ℕ\nR : Type u_1\ninst✝³ : CommRing R\ninst✝² : DecidableEq R\nS : Type u_2\ninst✝¹ : CommRing S\nhp : NeZero p\ninst✝ : CharZero R\nn : ℕ\nthis : ∀ (i : ℕ), vars (↑(monomial (single i (p ^ (n - i)))) (↑p ^ i)) = {i}\n⊢ vars (W_ R n) = range (n + 1)\n[PROOFSTEP]\nrw [wittPolynomial, vars_sum_of_disjoint]\n[GOAL]\np : ℕ\nR : Type u_1\ninst✝³ : CommRing R\ninst✝² : DecidableEq R\nS : Type u_2\ninst✝¹ : CommRing S\nhp : NeZero p\ninst✝ : CharZero R\nn : ℕ\nthis : ∀ (i : ℕ), vars (↑(monomial (single i (p ^ (n - i)))) (↑p ^ i)) = {i}\n⊢ (Finset.biUnion (range (n + 1)) fun i => vars (↑(monomial (single i (p ^ (n - i)))) (↑p ^ i))) = range (n + 1)\n[PROOFSTEP]\nsimp only [this, biUnion_singleton_eq_self]\n[GOAL]\ncase h\np : ℕ\nR : Type u_1\ninst✝³ : CommRing R\ninst✝² : DecidableEq R\nS : Type u_2\ninst✝¹ : CommRing S\nhp : NeZero p\ninst✝ : CharZero R\nn : ℕ\nthis : ∀ (i : ℕ), vars (↑(monomial (single i (p ^ (n - i)))) (↑p ^ i)) = {i}\n⊢ Pairwise (Disjoint on fun i => vars (↑(monomial (single i (p ^ (n - i)))) (↑p ^ i)))\n[PROOFSTEP]\nsimp only [this]\n[GOAL]\ncase h\np : ℕ\nR : Type u_1\ninst✝³ : CommRing R\ninst✝² : DecidableEq R\nS : Type u_2\ninst✝¹ : CommRing S\nhp : NeZero p\ninst✝ : CharZero R\nn : ℕ\nthis : ∀ (i : ℕ), vars (↑(monomial (single i (p ^ (n - i)))) (↑p ^ i)) = {i}\n⊢ Pairwise (Disjoint on fun i => {i})\n[PROOFSTEP]\nintro a b h\n[GOAL]\ncase h\np : ℕ\nR : Type u_1\ninst✝³ : CommRing R\ninst✝² : DecidableEq R\nS : Type u_2\ninst✝¹ : CommRing S\nhp : NeZero p\ninst✝ : CharZero R\nn : ℕ\nthis : ∀ (i : ℕ), vars (↑(monomial (single i (p ^ (n - i)))) (↑p ^ i)) = {i}\na b : ℕ\nh : a ≠ b\n⊢ (Disjoint on fun i => {i}) a b\n[PROOFSTEP]\napply disjoint_singleton_left.mpr\n[GOAL]\ncase h\np : ℕ\nR : Type u_1\ninst✝³ : CommRing R\ninst✝² : DecidableEq R\nS : Type u_2\ninst✝¹ : CommRing S\nhp : NeZero p\ninst✝ : CharZero R\nn : ℕ\nthis : ∀ (i : ℕ), vars (↑(monomial (single i (p ^ (n - i)))) (↑p ^ i)) = {i}\na b : ℕ\nh : a ≠ b\n⊢ ¬a ∈ (fun i => {i}) b\n[PROOFSTEP]\nrwa [mem_singleton]\n[GOAL]\np : ℕ\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : DecidableEq R\nS : Type u_2\ninst✝ : CommRing S\nhp : NeZero p\nn : ℕ\n⊢ vars (W_ R n) ⊆ range (n + 1)\n[PROOFSTEP]\nrw [← map_wittPolynomial p (Int.castRingHom R), ← wittPolynomial_vars p ℤ]\n[GOAL]\np : ℕ\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : DecidableEq R\nS : Type u_2\ninst✝ : CommRing S\nhp : NeZero p\nn : ℕ\n⊢ vars (↑(map (Int.castRingHom R)) (W_ ℤ n)) ⊆ vars (W_ ℤ n)\n[PROOFSTEP]\napply vars_map\n[GOAL]\np : ℕ\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : DecidableEq R\ninst✝ : Invertible ↑p\nn : ℕ\n⊢ xInTermsOfW p R n = (X n - ∑ i in range n, ↑C (↑p ^ i) * xInTermsOfW p R i ^ p ^ (n - i)) * ↑C (⅟↑p ^ n)\n[PROOFSTEP]\nrw [xInTermsOfW, ← Fin.sum_univ_eq_sum_range]\n[GOAL]\np : ℕ\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : DecidableEq R\nhp : Fact (Nat.Prime p)\ninst✝ : Invertible ↑p\nn : ℕ\n⊢ ↑constantCoeff (xInTermsOfW p R n) = 0\n[PROOFSTEP]\napply Nat.strongInductionOn n\n[GOAL]\np : ℕ\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : DecidableEq R\nhp : Fact (Nat.Prime p)\ninst✝ : Invertible ↑p\nn : ℕ\n⊢ ∀ (n : ℕ), (∀ (m : ℕ), m < n → ↑constantCoeff (xInTermsOfW p R m) = 0) → ↑constantCoeff (xInTermsOfW p R n) = 0\n[PROOFSTEP]\nclear n\n[GOAL]\np : ℕ\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : DecidableEq R\nhp : Fact (Nat.Prime p)\ninst✝ : Invertible ↑p\n⊢ ∀ (n : ℕ), (∀ (m : ℕ), m < n → ↑constantCoeff (xInTermsOfW p R m) = 0) → ↑constantCoeff (xInTermsOfW p R n) = 0\n[PROOFSTEP]\nintro n IH\n[GOAL]\np : ℕ\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : DecidableEq R\nhp : Fact (Nat.Prime p)\ninst✝ : Invertible ↑p\nn : ℕ\nIH : ∀ (m : ℕ), m < n → ↑constantCoeff (xInTermsOfW p R m) = 0\n⊢ ↑constantCoeff (xInTermsOfW p R n) = 0\n[PROOFSTEP]\nrw [xInTermsOfW_eq, mul_comm, RingHom.map_mul, RingHom.map_sub, map_sum, constantCoeff_C, constantCoeff_X, zero_sub,\n  mul_neg, neg_eq_zero]\n  -- porting note: here, we should be able to do `rw [sum_eq_zero]`, but the goal that\n    -- is created is not what we expect, and the sum is not replaced by zero...\n    -- is it a bug in `rw` tactic?\n[GOAL]\np : ℕ\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : DecidableEq R\nhp : Fact (Nat.Prime p)\ninst✝ : Invertible ↑p\nn : ℕ\nIH : ∀ (m : ℕ), m < n → ↑constantCoeff (xInTermsOfW p R m) = 0\n⊢ ⅟↑p ^ n * ∑ x in range n, ↑constantCoeff (↑C (↑p ^ x) * xInTermsOfW p R x ^ p ^ (n - x)) = 0\n[PROOFSTEP]\nrefine' Eq.trans (_ : _ = ((⅟↑p : R) ^ n) * 0) (mul_zero _)\n[GOAL]\np : ℕ\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : DecidableEq R\nhp : Fact (Nat.Prime p)\ninst✝ : Invertible ↑p\nn : ℕ\nIH : ∀ (m : ℕ), m < n → ↑constantCoeff (xInTermsOfW p R m) = 0\n⊢ ⅟↑p ^ n * ∑ x in range n, ↑constantCoeff (↑C (↑p ^ x) * xInTermsOfW p R x ^ p ^ (n - x)) = ⅟↑p ^ n * 0\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_a\np : ℕ\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : DecidableEq R\nhp : Fact (Nat.Prime p)\ninst✝ : Invertible ↑p\nn : ℕ\nIH : ∀ (m : ℕ), m < n → ↑constantCoeff (xInTermsOfW p R m) = 0\n⊢ ∑ x in range n, ↑constantCoeff (↑C (↑p ^ x) * xInTermsOfW p R x ^ p ^ (n - x)) = 0\n[PROOFSTEP]\nrw [sum_eq_zero]\n[GOAL]\ncase e_a\np : ℕ\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : DecidableEq R\nhp : Fact (Nat.Prime p)\ninst✝ : Invertible ↑p\nn : ℕ\nIH : ∀ (m : ℕ), m < n → ↑constantCoeff (xInTermsOfW p R m) = 0\n⊢ ∀ (x : ℕ), x ∈ range n → ↑constantCoeff (↑C (↑p ^ x) * xInTermsOfW p R x ^ p ^ (n - x)) = 0\n[PROOFSTEP]\nintro m H\n[GOAL]\ncase e_a\np : ℕ\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : DecidableEq R\nhp : Fact (Nat.Prime p)\ninst✝ : Invertible ↑p\nn : ℕ\nIH : ∀ (m : ℕ), m < n → ↑constantCoeff (xInTermsOfW p R m) = 0\nm : ℕ\nH : m ∈ range n\n⊢ ↑constantCoeff (↑C (↑p ^ m) * xInTermsOfW p R m ^ p ^ (n - m)) = 0\n[PROOFSTEP]\nrw [mem_range] at H \n[GOAL]\ncase e_a\np : ℕ\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : DecidableEq R\nhp : Fact (Nat.Prime p)\ninst✝ : Invertible ↑p\nn : ℕ\nIH : ∀ (m : ℕ), m < n → ↑constantCoeff (xInTermsOfW p R m) = 0\nm : ℕ\nH : m < n\n⊢ ↑constantCoeff (↑C (↑p ^ m) * xInTermsOfW p R m ^ p ^ (n - m)) = 0\n[PROOFSTEP]\nsimp only [RingHom.map_mul, RingHom.map_pow, map_natCast, IH m H]\n[GOAL]\ncase e_a\np : ℕ\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : DecidableEq R\nhp : Fact (Nat.Prime p)\ninst✝ : Invertible ↑p\nn : ℕ\nIH : ∀ (m : ℕ), m < n → ↑constantCoeff (xInTermsOfW p R m) = 0\nm : ℕ\nH : m < n\n⊢ ↑p ^ m * 0 ^ p ^ (n - m) = 0\n[PROOFSTEP]\nrw [zero_pow, mul_zero]\n[GOAL]\ncase e_a\np : ℕ\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : DecidableEq R\nhp : Fact (Nat.Prime p)\ninst✝ : Invertible ↑p\nn : ℕ\nIH : ∀ (m : ℕ), m < n → ↑constantCoeff (xInTermsOfW p R m) = 0\nm : ℕ\nH : m < n\n⊢ 0 < p ^ (n - m)\n[PROOFSTEP]\napply pow_pos hp.1.pos\n[GOAL]\np : ℕ\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : DecidableEq R\ninst✝ : Invertible ↑p\n⊢ xInTermsOfW p R 0 = X 0\n[PROOFSTEP]\nrw [xInTermsOfW_eq, range_zero, sum_empty, pow_zero, C_1, mul_one, sub_zero]\n[GOAL]\np : ℕ\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : DecidableEq R\nhp : Fact (Nat.Prime p)\nn : ℕ\n⊢ n ∈ vars (xInTermsOfW p ℚ n) ∧ vars (xInTermsOfW p ℚ n) ⊆ range (n + 1)\n[PROOFSTEP]\napply Nat.strongInductionOn n\n[GOAL]\np : ℕ\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : DecidableEq R\nhp : Fact (Nat.Prime p)\nn : ℕ\n⊢ ∀ (n : ℕ),\n    (∀ (m : ℕ), m < n → m ∈ vars (xInTermsOfW p ℚ m) ∧ vars (xInTermsOfW p ℚ m) ⊆ range (m + 1)) →\n      n ∈ vars (xInTermsOfW p ℚ n) ∧ vars (xInTermsOfW p ℚ n) ⊆ range (n + 1)\n[PROOFSTEP]\nclear n\n[GOAL]\np : ℕ\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : DecidableEq R\nhp : Fact (Nat.Prime p)\n⊢ ∀ (n : ℕ),\n    (∀ (m : ℕ), m < n → m ∈ vars (xInTermsOfW p ℚ m) ∧ vars (xInTermsOfW p ℚ m) ⊆ range (m + 1)) →\n      n ∈ vars (xInTermsOfW p ℚ n) ∧ vars (xInTermsOfW p ℚ n) ⊆ range (n + 1)\n[PROOFSTEP]\nintro n ih\n[GOAL]\np : ℕ\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : DecidableEq R\nhp : Fact (Nat.Prime p)\nn : ℕ\nih : ∀ (m : ℕ), m < n → m ∈ vars (xInTermsOfW p ℚ m) ∧ vars (xInTermsOfW p ℚ m) ⊆ range (m + 1)\n⊢ n ∈ vars (xInTermsOfW p ℚ n) ∧ vars (xInTermsOfW p ℚ n) ⊆ range (n + 1)\n[PROOFSTEP]\nrw [xInTermsOfW_eq, mul_comm, vars_C_mul _ (nonzero_of_invertible _), vars_sub_of_disjoint, vars_X, range_succ,\n  insert_eq]\n[GOAL]\np : ℕ\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : DecidableEq R\nhp : Fact (Nat.Prime p)\nn : ℕ\nih : ∀ (m : ℕ), m < n → m ∈ vars (xInTermsOfW p ℚ m) ∧ vars (xInTermsOfW p ℚ m) ⊆ range (m + 1)\n⊢ n ∈ {n} ∪ vars (∑ i in range n, ↑C (↑p ^ i) * xInTermsOfW p ℚ i ^ p ^ (n - i)) ∧\n    {n} ∪ vars (∑ i in range n, ↑C (↑p ^ i) * xInTermsOfW p ℚ i ^ p ^ (n - i)) ⊆ {n} ∪ range n\ncase hpq\np : ℕ\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : DecidableEq R\nhp : Fact (Nat.Prime p)\nn : ℕ\nih : ∀ (m : ℕ), m < n → m ∈ vars (xInTermsOfW p ℚ m) ∧ vars (xInTermsOfW p ℚ m) ⊆ range (m + 1)\n⊢ Disjoint (vars (X n)) (vars (∑ i in range n, ↑C (↑p ^ i) * xInTermsOfW p ℚ i ^ p ^ (n - i)))\n[PROOFSTEP]\non_goal 1 =>\n  simp only [true_and_iff, true_or_iff, eq_self_iff_true, mem_union, mem_singleton]\n  intro i\n  rw [mem_union, mem_union]\n  apply Or.imp id\n[GOAL]\np : ℕ\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : DecidableEq R\nhp : Fact (Nat.Prime p)\nn : ℕ\nih : ∀ (m : ℕ), m < n → m ∈ vars (xInTermsOfW p ℚ m) ∧ vars (xInTermsOfW p ℚ m) ⊆ range (m + 1)\n⊢ n ∈ {n} ∪ vars (∑ i in range n, ↑C (↑p ^ i) * xInTermsOfW p ℚ i ^ p ^ (n - i)) ∧\n    {n} ∪ vars (∑ i in range n, ↑C (↑p ^ i) * xInTermsOfW p ℚ i ^ p ^ (n - i)) ⊆ {n} ∪ range n\ncase hpq\np : ℕ\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : DecidableEq R\nhp : Fact (Nat.Prime p)\nn : ℕ\nih : ∀ (m : ℕ), m < n → m ∈ vars (xInTermsOfW p ℚ m) ∧ vars (xInTermsOfW p ℚ m) ⊆ range (m + 1)\n⊢ Disjoint (vars (X n)) (vars (∑ i in range n, ↑C (↑p ^ i) * xInTermsOfW p ℚ i ^ p ^ (n - i)))\n[PROOFSTEP]\non_goal 1 =>\n  simp only [true_and_iff, true_or_iff, eq_self_iff_true, mem_union, mem_singleton]\n  intro i\n  rw [mem_union, mem_union]\n  apply Or.imp id\n[GOAL]\np : ℕ\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : DecidableEq R\nhp : Fact (Nat.Prime p)\nn : ℕ\nih : ∀ (m : ℕ), m < n → m ∈ vars (xInTermsOfW p ℚ m) ∧ vars (xInTermsOfW p ℚ m) ⊆ range (m + 1)\n⊢ n ∈ {n} ∪ vars (∑ i in range n, ↑C (↑p ^ i) * xInTermsOfW p ℚ i ^ p ^ (n - i)) ∧\n    {n} ∪ vars (∑ i in range n, ↑C (↑p ^ i) * xInTermsOfW p ℚ i ^ p ^ (n - i)) ⊆ {n} ∪ range n\n[PROOFSTEP]\nsimp only [true_and_iff, true_or_iff, eq_self_iff_true, mem_union, mem_singleton]\n[GOAL]\np : ℕ\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : DecidableEq R\nhp : Fact (Nat.Prime p)\nn : ℕ\nih : ∀ (m : ℕ), m < n → m ∈ vars (xInTermsOfW p ℚ m) ∧ vars (xInTermsOfW p ℚ m) ⊆ range (m + 1)\n⊢ {n} ∪ vars (∑ x in range n, ↑C (↑p ^ x) * xInTermsOfW p ℚ x ^ p ^ (n - x)) ⊆ {n} ∪ range n\n[PROOFSTEP]\nintro i\n[GOAL]\np : ℕ\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : DecidableEq R\nhp : Fact (Nat.Prime p)\nn : ℕ\nih : ∀ (m : ℕ), m < n → m ∈ vars (xInTermsOfW p ℚ m) ∧ vars (xInTermsOfW p ℚ m) ⊆ range (m + 1)\ni : ℕ\n⊢ i ∈ {n} ∪ vars (∑ x in range n, ↑C (↑p ^ x) * xInTermsOfW p ℚ x ^ p ^ (n - x)) → i ∈ {n} ∪ range n\n[PROOFSTEP]\nrw [mem_union, mem_union]\n[GOAL]\np : ℕ\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : DecidableEq R\nhp : Fact (Nat.Prime p)\nn : ℕ\nih : ∀ (m : ℕ), m < n → m ∈ vars (xInTermsOfW p ℚ m) ∧ vars (xInTermsOfW p ℚ m) ⊆ range (m + 1)\ni : ℕ\n⊢ i ∈ {n} ∨ i ∈ vars (∑ x in range n, ↑C (↑p ^ x) * xInTermsOfW p ℚ x ^ p ^ (n - x)) → i ∈ {n} ∨ i ∈ range n\n[PROOFSTEP]\napply Or.imp id\n[GOAL]\np : ℕ\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : DecidableEq R\nhp : Fact (Nat.Prime p)\nn : ℕ\nih : ∀ (m : ℕ), m < n → m ∈ vars (xInTermsOfW p ℚ m) ∧ vars (xInTermsOfW p ℚ m) ⊆ range (m + 1)\ni : ℕ\n⊢ i ∈ vars (∑ x in range n, ↑C (↑p ^ x) * xInTermsOfW p ℚ x ^ p ^ (n - x)) → i ∈ range n\ncase hpq\np : ℕ\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : DecidableEq R\nhp : Fact (Nat.Prime p)\nn : ℕ\nih : ∀ (m : ℕ), m < n → m ∈ vars (xInTermsOfW p ℚ m) ∧ vars (xInTermsOfW p ℚ m) ⊆ range (m + 1)\n⊢ Disjoint (vars (X n)) (vars (∑ i in range n, ↑C (↑p ^ i) * xInTermsOfW p ℚ i ^ p ^ (n - i)))\n[PROOFSTEP]\non_goal 2 => rw [vars_X, disjoint_singleton_left]\n[GOAL]\np : ℕ\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : DecidableEq R\nhp : Fact (Nat.Prime p)\nn : ℕ\nih : ∀ (m : ℕ), m < n → m ∈ vars (xInTermsOfW p ℚ m) ∧ vars (xInTermsOfW p ℚ m) ⊆ range (m + 1)\ni : ℕ\n⊢ i ∈ vars (∑ x in range n, ↑C (↑p ^ x) * xInTermsOfW p ℚ x ^ p ^ (n - x)) → i ∈ range n\ncase hpq\np : ℕ\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : DecidableEq R\nhp : Fact (Nat.Prime p)\nn : ℕ\nih : ∀ (m : ℕ), m < n → m ∈ vars (xInTermsOfW p ℚ m) ∧ vars (xInTermsOfW p ℚ m) ⊆ range (m + 1)\n⊢ Disjoint (vars (X n)) (vars (∑ i in range n, ↑C (↑p ^ i) * xInTermsOfW p ℚ i ^ p ^ (n - i)))\n[PROOFSTEP]\non_goal 2 => rw [vars_X, disjoint_singleton_left]\n[GOAL]\ncase hpq\np : ℕ\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : DecidableEq R\nhp : Fact (Nat.Prime p)\nn : ℕ\nih : ∀ (m : ℕ), m < n → m ∈ vars (xInTermsOfW p ℚ m) ∧ vars (xInTermsOfW p ℚ m) ⊆ range (m + 1)\n⊢ Disjoint (vars (X n)) (vars (∑ i in range n, ↑C (↑p ^ i) * xInTermsOfW p ℚ i ^ p ^ (n - i)))\n[PROOFSTEP]\nrw [vars_X, disjoint_singleton_left]\n[GOAL]\np : ℕ\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : DecidableEq R\nhp : Fact (Nat.Prime p)\nn : ℕ\nih : ∀ (m : ℕ), m < n → m ∈ vars (xInTermsOfW p ℚ m) ∧ vars (xInTermsOfW p ℚ m) ⊆ range (m + 1)\ni : ℕ\n⊢ i ∈ vars (∑ x in range n, ↑C (↑p ^ x) * xInTermsOfW p ℚ x ^ p ^ (n - x)) → i ∈ range n\ncase hpq\np : ℕ\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : DecidableEq R\nhp : Fact (Nat.Prime p)\nn : ℕ\nih : ∀ (m : ℕ), m < n → m ∈ vars (xInTermsOfW p ℚ m) ∧ vars (xInTermsOfW p ℚ m) ⊆ range (m + 1)\n⊢ ¬n ∈ vars (∑ i in range n, ↑C (↑p ^ i) * xInTermsOfW p ℚ i ^ p ^ (n - i))\n[PROOFSTEP]\nall_goals\n  intro H\n  replace H := vars_sum_subset _ _ H\n  rw [mem_biUnion] at H \n  rcases H with ⟨j, hj, H⟩\n  rw [vars_C_mul] at H \n  swap\n  · apply pow_ne_zero\n    exact_mod_cast hp.1.ne_zero\n  rw [mem_range] at hj \n  replace H := (ih j hj).2 (vars_pow _ _ H)\n  rw [mem_range] at H \n[GOAL]\np : ℕ\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : DecidableEq R\nhp : Fact (Nat.Prime p)\nn : ℕ\nih : ∀ (m : ℕ), m < n → m ∈ vars (xInTermsOfW p ℚ m) ∧ vars (xInTermsOfW p ℚ m) ⊆ range (m + 1)\ni : ℕ\n⊢ i ∈ vars (∑ x in range n, ↑C (↑p ^ x) * xInTermsOfW p ℚ x ^ p ^ (n - x)) → i ∈ range n\n[PROOFSTEP]\nintro H\n[GOAL]\np : ℕ\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : DecidableEq R\nhp : Fact (Nat.Prime p)\nn : ℕ\nih : ∀ (m : ℕ), m < n → m ∈ vars (xInTermsOfW p ℚ m) ∧ vars (xInTermsOfW p ℚ m) ⊆ range (m + 1)\ni : ℕ\nH : i ∈ vars (∑ x in range n, ↑C (↑p ^ x) * xInTermsOfW p ℚ x ^ p ^ (n - x))\n⊢ i ∈ range n\n[PROOFSTEP]\nreplace H := vars_sum_subset _ _ H\n[GOAL]\np : ℕ\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : DecidableEq R\nhp : Fact (Nat.Prime p)\nn : ℕ\nih : ∀ (m : ℕ), m < n → m ∈ vars (xInTermsOfW p ℚ m) ∧ vars (xInTermsOfW p ℚ m) ⊆ range (m + 1)\ni : ℕ\nH : i ∈ Finset.biUnion (range n) fun i => vars (↑C (↑p ^ i) * xInTermsOfW p ℚ i ^ p ^ (n - i))\n⊢ i ∈ range n\n[PROOFSTEP]\nrw [mem_biUnion] at H \n[GOAL]\np : ℕ\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : DecidableEq R\nhp : Fact (Nat.Prime p)\nn : ℕ\nih : ∀ (m : ℕ), m < n → m ∈ vars (xInTermsOfW p ℚ m) ∧ vars (xInTermsOfW p ℚ m) ⊆ range (m + 1)\ni : ℕ\nH : ∃ a, a ∈ range n ∧ i ∈ vars (↑C (↑p ^ a) * xInTermsOfW p ℚ a ^ p ^ (n - a))\n⊢ i ∈ range n\n[PROOFSTEP]\nrcases H with ⟨j, hj, H⟩\n[GOAL]\ncase intro.intro\np : ℕ\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : DecidableEq R\nhp : Fact (Nat.Prime p)\nn : ℕ\nih : ∀ (m : ℕ), m < n → m ∈ vars (xInTermsOfW p ℚ m) ∧ vars (xInTermsOfW p ℚ m) ⊆ range (m + 1)\ni j : ℕ\nhj : j ∈ range n\nH : i ∈ vars (↑C (↑p ^ j) * xInTermsOfW p ℚ j ^ p ^ (n - j))\n⊢ i ∈ range n\n[PROOFSTEP]\nrw [vars_C_mul] at H \n[GOAL]\ncase intro.intro\np : ℕ\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : DecidableEq R\nhp : Fact (Nat.Prime p)\nn : ℕ\nih : ∀ (m : ℕ), m < n → m ∈ vars (xInTermsOfW p ℚ m) ∧ vars (xInTermsOfW p ℚ m) ⊆ range (m + 1)\ni j : ℕ\nhj : j ∈ range n\nH : i ∈ vars (xInTermsOfW p ℚ j ^ p ^ (n - j))\n⊢ i ∈ range n\ncase intro.intro.ha\np : ℕ\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : DecidableEq R\nhp : Fact (Nat.Prime p)\nn : ℕ\nih : ∀ (m : ℕ), m < n → m ∈ vars (xInTermsOfW p ℚ m) ∧ vars (xInTermsOfW p ℚ m) ⊆ range (m + 1)\ni j : ℕ\nhj : j ∈ range n\nH : i ∈ vars (↑C (↑p ^ j) * xInTermsOfW p ℚ j ^ p ^ (n - j))\n⊢ ↑p ^ j ≠ 0\n[PROOFSTEP]\nswap\n[GOAL]\ncase intro.intro.ha\np : ℕ\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : DecidableEq R\nhp : Fact (Nat.Prime p)\nn : ℕ\nih : ∀ (m : ℕ), m < n → m ∈ vars (xInTermsOfW p ℚ m) ∧ vars (xInTermsOfW p ℚ m) ⊆ range (m + 1)\ni j : ℕ\nhj : j ∈ range n\nH : i ∈ vars (↑C (↑p ^ j) * xInTermsOfW p ℚ j ^ p ^ (n - j))\n⊢ ↑p ^ j ≠ 0\n[PROOFSTEP]\napply pow_ne_zero\n[GOAL]\ncase intro.intro.ha.h\np : ℕ\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : DecidableEq R\nhp : Fact (Nat.Prime p)\nn : ℕ\nih : ∀ (m : ℕ), m < n → m ∈ vars (xInTermsOfW p ℚ m) ∧ vars (xInTermsOfW p ℚ m) ⊆ range (m + 1)\ni j : ℕ\nhj : j ∈ range n\nH : i ∈ vars (↑C (↑p ^ j) * xInTermsOfW p ℚ j ^ p ^ (n - j))\n⊢ ↑p ≠ 0\n[PROOFSTEP]\nexact_mod_cast hp.1.ne_zero\n[GOAL]\ncase intro.intro\np : ℕ\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : DecidableEq R\nhp : Fact (Nat.Prime p)\nn : ℕ\nih : ∀ (m : ℕ), m < n → m ∈ vars (xInTermsOfW p ℚ m) ∧ vars (xInTermsOfW p ℚ m) ⊆ range (m + 1)\ni j : ℕ\nhj : j ∈ range n\nH : i ∈ vars (xInTermsOfW p ℚ j ^ p ^ (n - j))\n⊢ i ∈ range n\n[PROOFSTEP]\nrw [mem_range] at hj \n[GOAL]\ncase intro.intro\np : ℕ\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : DecidableEq R\nhp : Fact (Nat.Prime p)\nn : ℕ\nih : ∀ (m : ℕ), m < n → m ∈ vars (xInTermsOfW p ℚ m) ∧ vars (xInTermsOfW p ℚ m) ⊆ range (m + 1)\ni j : ℕ\nhj : j < n\nH : i ∈ vars (xInTermsOfW p ℚ j ^ p ^ (n - j))\n⊢ i ∈ range n\n[PROOFSTEP]\nreplace H := (ih j hj).2 (vars_pow _ _ H)\n[GOAL]\ncase intro.intro\np : ℕ\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : DecidableEq R\nhp : Fact (Nat.Prime p)\nn : ℕ\nih : ∀ (m : ℕ), m < n → m ∈ vars (xInTermsOfW p ℚ m) ∧ vars (xInTermsOfW p ℚ m) ⊆ range (m + 1)\ni j : ℕ\nhj : j < n\nH : i ∈ range (j + 1)\n⊢ i ∈ range n\n[PROOFSTEP]\nrw [mem_range] at H \n[GOAL]\ncase hpq\np : ℕ\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : DecidableEq R\nhp : Fact (Nat.Prime p)\nn : ℕ\nih : ∀ (m : ℕ), m < n → m ∈ vars (xInTermsOfW p ℚ m) ∧ vars (xInTermsOfW p ℚ m) ⊆ range (m + 1)\n⊢ ¬n ∈ vars (∑ i in range n, ↑C (↑p ^ i) * xInTermsOfW p ℚ i ^ p ^ (n - i))\n[PROOFSTEP]\nintro H\n[GOAL]\ncase hpq\np : ℕ\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : DecidableEq R\nhp : Fact (Nat.Prime p)\nn : ℕ\nih : ∀ (m : ℕ), m < n → m ∈ vars (xInTermsOfW p ℚ m) ∧ vars (xInTermsOfW p ℚ m) ⊆ range (m + 1)\nH : n ∈ vars (∑ i in range n, ↑C (↑p ^ i) * xInTermsOfW p ℚ i ^ p ^ (n - i))\n⊢ False\n[PROOFSTEP]\nreplace H := vars_sum_subset _ _ H\n[GOAL]\ncase hpq\np : ℕ\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : DecidableEq R\nhp : Fact (Nat.Prime p)\nn : ℕ\nih : ∀ (m : ℕ), m < n → m ∈ vars (xInTermsOfW p ℚ m) ∧ vars (xInTermsOfW p ℚ m) ⊆ range (m + 1)\nH : n ∈ Finset.biUnion (range n) fun i => vars (↑C (↑p ^ i) * xInTermsOfW p ℚ i ^ p ^ (n - i))\n⊢ False\n[PROOFSTEP]\nrw [mem_biUnion] at H \n[GOAL]\ncase hpq\np : ℕ\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : DecidableEq R\nhp : Fact (Nat.Prime p)\nn : ℕ\nih : ∀ (m : ℕ), m < n → m ∈ vars (xInTermsOfW p ℚ m) ∧ vars (xInTermsOfW p ℚ m) ⊆ range (m + 1)\nH : ∃ a, a ∈ range n ∧ n ∈ vars (↑C (↑p ^ a) * xInTermsOfW p ℚ a ^ p ^ (n - a))\n⊢ False\n[PROOFSTEP]\nrcases H with ⟨j, hj, H⟩\n[GOAL]\ncase hpq.intro.intro\np : ℕ\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : DecidableEq R\nhp : Fact (Nat.Prime p)\nn : ℕ\nih : ∀ (m : ℕ), m < n → m ∈ vars (xInTermsOfW p ℚ m) ∧ vars (xInTermsOfW p ℚ m) ⊆ range (m + 1)\nj : ℕ\nhj : j ∈ range n\nH : n ∈ vars (↑C (↑p ^ j) * xInTermsOfW p ℚ j ^ p ^ (n - j))\n⊢ False\n[PROOFSTEP]\nrw [vars_C_mul] at H \n[GOAL]\ncase hpq.intro.intro\np : ℕ\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : DecidableEq R\nhp : Fact (Nat.Prime p)\nn : ℕ\nih : ∀ (m : ℕ), m < n → m ∈ vars (xInTermsOfW p ℚ m) ∧ vars (xInTermsOfW p ℚ m) ⊆ range (m + 1)\nj : ℕ\nhj : j ∈ range n\nH : n ∈ vars (xInTermsOfW p ℚ j ^ p ^ (n - j))\n⊢ False\ncase hpq.intro.intro.ha\np : ℕ\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : DecidableEq R\nhp : Fact (Nat.Prime p)\nn : ℕ\nih : ∀ (m : ℕ), m < n → m ∈ vars (xInTermsOfW p ℚ m) ∧ vars (xInTermsOfW p ℚ m) ⊆ range (m + 1)\nj : ℕ\nhj : j ∈ range n\nH : n ∈ vars (↑C (↑p ^ j) * xInTermsOfW p ℚ j ^ p ^ (n - j))\n⊢ ↑p ^ j ≠ 0\n[PROOFSTEP]\nswap\n[GOAL]\ncase hpq.intro.intro.ha\np : ℕ\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : DecidableEq R\nhp : Fact (Nat.Prime p)\nn : ℕ\nih : ∀ (m : ℕ), m < n → m ∈ vars (xInTermsOfW p ℚ m) ∧ vars (xInTermsOfW p ℚ m) ⊆ range (m + 1)\nj : ℕ\nhj : j ∈ range n\nH : n ∈ vars (↑C (↑p ^ j) * xInTermsOfW p ℚ j ^ p ^ (n - j))\n⊢ ↑p ^ j ≠ 0\n[PROOFSTEP]\napply pow_ne_zero\n[GOAL]\ncase hpq.intro.intro.ha.h\np : ℕ\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : DecidableEq R\nhp : Fact (Nat.Prime p)\nn : ℕ\nih : ∀ (m : ℕ), m < n → m ∈ vars (xInTermsOfW p ℚ m) ∧ vars (xInTermsOfW p ℚ m) ⊆ range (m + 1)\nj : ℕ\nhj : j ∈ range n\nH : n ∈ vars (↑C (↑p ^ j) * xInTermsOfW p ℚ j ^ p ^ (n - j))\n⊢ ↑p ≠ 0\n[PROOFSTEP]\nexact_mod_cast hp.1.ne_zero\n[GOAL]\ncase hpq.intro.intro\np : ℕ\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : DecidableEq R\nhp : Fact (Nat.Prime p)\nn : ℕ\nih : ∀ (m : ℕ), m < n → m ∈ vars (xInTermsOfW p ℚ m) ∧ vars (xInTermsOfW p ℚ m) ⊆ range (m + 1)\nj : ℕ\nhj : j ∈ range n\nH : n ∈ vars (xInTermsOfW p ℚ j ^ p ^ (n - j))\n⊢ False\n[PROOFSTEP]\nrw [mem_range] at hj \n[GOAL]\ncase hpq.intro.intro\np : ℕ\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : DecidableEq R\nhp : Fact (Nat.Prime p)\nn : ℕ\nih : ∀ (m : ℕ), m < n → m ∈ vars (xInTermsOfW p ℚ m) ∧ vars (xInTermsOfW p ℚ m) ⊆ range (m + 1)\nj : ℕ\nhj : j < n\nH : n ∈ vars (xInTermsOfW p ℚ j ^ p ^ (n - j))\n⊢ False\n[PROOFSTEP]\nreplace H := (ih j hj).2 (vars_pow _ _ H)\n[GOAL]\ncase hpq.intro.intro\np : ℕ\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : DecidableEq R\nhp : Fact (Nat.Prime p)\nn : ℕ\nih : ∀ (m : ℕ), m < n → m ∈ vars (xInTermsOfW p ℚ m) ∧ vars (xInTermsOfW p ℚ m) ⊆ range (m + 1)\nj : ℕ\nhj : j < n\nH : n ∈ range (j + 1)\n⊢ False\n[PROOFSTEP]\nrw [mem_range] at H \n[GOAL]\ncase intro.intro\np : ℕ\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : DecidableEq R\nhp : Fact (Nat.Prime p)\nn : ℕ\nih : ∀ (m : ℕ), m < n → m ∈ vars (xInTermsOfW p ℚ m) ∧ vars (xInTermsOfW p ℚ m) ⊆ range (m + 1)\ni j : ℕ\nhj : j < n\nH : i < j + 1\n⊢ i ∈ range n\n[PROOFSTEP]\nrw [mem_range]\n[GOAL]\ncase intro.intro\np : ℕ\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : DecidableEq R\nhp : Fact (Nat.Prime p)\nn : ℕ\nih : ∀ (m : ℕ), m < n → m ∈ vars (xInTermsOfW p ℚ m) ∧ vars (xInTermsOfW p ℚ m) ⊆ range (m + 1)\ni j : ℕ\nhj : j < n\nH : i < j + 1\n⊢ i < n\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase hpq.intro.intro\np : ℕ\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : DecidableEq R\nhp : Fact (Nat.Prime p)\nn : ℕ\nih : ∀ (m : ℕ), m < n → m ∈ vars (xInTermsOfW p ℚ m) ∧ vars (xInTermsOfW p ℚ m) ⊆ range (m + 1)\nj : ℕ\nhj : j < n\nH : n < j + 1\n⊢ False\n[PROOFSTEP]\nlinarith\n[GOAL]\np : ℕ\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : DecidableEq R\ninst✝ : Invertible ↑p\nn : ℕ\n⊢ xInTermsOfW p R n * ↑C (↑p ^ n) = X n - ∑ i in range n, ↑C (↑p ^ i) * xInTermsOfW p R i ^ p ^ (n - i)\n[PROOFSTEP]\nrw [xInTermsOfW_eq, mul_assoc, ← C_mul, ← mul_pow, invOf_mul_self, one_pow, C_1, mul_one]\n[GOAL]\np : ℕ\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : DecidableEq R\ninst✝ : Invertible ↑p\nk : ℕ\n⊢ ↑(bind₁ (xInTermsOfW p R)) (W_ R k) = X k\n[PROOFSTEP]\nrw [wittPolynomial_eq_sum_C_mul_X_pow, AlgHom.map_sum]\n[GOAL]\np : ℕ\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : DecidableEq R\ninst✝ : Invertible ↑p\nk : ℕ\n⊢ ∑ x in range (k + 1), ↑(bind₁ (xInTermsOfW p R)) (↑C (↑p ^ x) * X x ^ p ^ (k - x)) = X k\n[PROOFSTEP]\nsimp only [Nat.cast_pow, AlgHom.map_pow, C_pow, AlgHom.map_mul, algHom_C]\n[GOAL]\np : ℕ\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : DecidableEq R\ninst✝ : Invertible ↑p\nk : ℕ\n⊢ ∑ x in range (k + 1), ↑C ↑p ^ x * ↑(bind₁ (xInTermsOfW p R)) (X x) ^ p ^ (k - x) = X k\n[PROOFSTEP]\nrw [sum_range_succ_comm, tsub_self, pow_zero, pow_one, bind₁_X_right, mul_comm, ← C_pow, xInTermsOfW_aux]\n[GOAL]\np : ℕ\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : DecidableEq R\ninst✝ : Invertible ↑p\nk : ℕ\n⊢ X k - ∑ i in range k, ↑C (↑p ^ i) * xInTermsOfW p R i ^ p ^ (k - i) +\n      ∑ x in range k, ↑C ↑p ^ x * ↑(bind₁ (xInTermsOfW p R)) (X x) ^ p ^ (k - x) =\n    X k\n[PROOFSTEP]\nsimp only [Nat.cast_pow, C_pow, bind₁_X_right, sub_add_cancel]\n[GOAL]\np : ℕ\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : DecidableEq R\ninst✝ : Invertible ↑p\nn : ℕ\n⊢ ↑(bind₁ (W_ R)) (xInTermsOfW p R n) = X n\n[PROOFSTEP]\napply Nat.strongInductionOn n\n[GOAL]\np : ℕ\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : DecidableEq R\ninst✝ : Invertible ↑p\nn : ℕ\n⊢ ∀ (n : ℕ), (∀ (m : ℕ), m < n → ↑(bind₁ (W_ R)) (xInTermsOfW p R m) = X m) → ↑(bind₁ (W_ R)) (xInTermsOfW p R n) = X n\n[PROOFSTEP]\nclear n\n[GOAL]\np : ℕ\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : DecidableEq R\ninst✝ : Invertible ↑p\n⊢ ∀ (n : ℕ), (∀ (m : ℕ), m < n → ↑(bind₁ (W_ R)) (xInTermsOfW p R m) = X m) → ↑(bind₁ (W_ R)) (xInTermsOfW p R n) = X n\n[PROOFSTEP]\nintro n H\n[GOAL]\np : ℕ\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : DecidableEq R\ninst✝ : Invertible ↑p\nn : ℕ\nH : ∀ (m : ℕ), m < n → ↑(bind₁ (W_ R)) (xInTermsOfW p R m) = X m\n⊢ ↑(bind₁ (W_ R)) (xInTermsOfW p R n) = X n\n[PROOFSTEP]\nrw [xInTermsOfW_eq, AlgHom.map_mul, AlgHom.map_sub, bind₁_X_right, algHom_C, AlgHom.map_sum,\n  show X n = (X n * C ((p : R) ^ n)) * C ((⅟p : R) ^ n) by\n    rw [mul_assoc, ← C_mul, ← mul_pow, mul_invOf_self, one_pow, map_one, mul_one]]\n[GOAL]\np : ℕ\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : DecidableEq R\ninst✝ : Invertible ↑p\nn : ℕ\nH : ∀ (m : ℕ), m < n → ↑(bind₁ (W_ R)) (xInTermsOfW p R m) = X m\n⊢ X n = X n * ↑C (↑p ^ n) * ↑C (⅟↑p ^ n)\n[PROOFSTEP]\nrw [mul_assoc, ← C_mul, ← mul_pow, mul_invOf_self, one_pow, map_one, mul_one]\n[GOAL]\np : ℕ\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : DecidableEq R\ninst✝ : Invertible ↑p\nn : ℕ\nH : ∀ (m : ℕ), m < n → ↑(bind₁ (W_ R)) (xInTermsOfW p R m) = X m\n⊢ (W_ R n - ∑ x in range n, ↑(bind₁ (W_ R)) (↑C (↑p ^ x) * xInTermsOfW p R x ^ p ^ (n - x))) * ↑C (⅟↑p ^ n) =\n    X n * ↑C (↑p ^ n) * ↑C (⅟↑p ^ n)\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_a\np : ℕ\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : DecidableEq R\ninst✝ : Invertible ↑p\nn : ℕ\nH : ∀ (m : ℕ), m < n → ↑(bind₁ (W_ R)) (xInTermsOfW p R m) = X m\n⊢ W_ R n - ∑ x in range n, ↑(bind₁ (W_ R)) (↑C (↑p ^ x) * xInTermsOfW p R x ^ p ^ (n - x)) = X n * ↑C (↑p ^ n)\n[PROOFSTEP]\nrw [wittPolynomial_eq_sum_C_mul_X_pow, sum_range_succ_comm, tsub_self, pow_zero, pow_one, mul_comm (X n), add_sub_assoc,\n  add_right_eq_self, sub_eq_zero]\n[GOAL]\ncase e_a\np : ℕ\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : DecidableEq R\ninst✝ : Invertible ↑p\nn : ℕ\nH : ∀ (m : ℕ), m < n → ↑(bind₁ (W_ R)) (xInTermsOfW p R m) = X m\n⊢ ∑ x in range n, ↑C (↑p ^ x) * X x ^ p ^ (n - x) =\n    ∑ x in range n, ↑(bind₁ (W_ R)) (↑C (↑p ^ x) * xInTermsOfW p R x ^ p ^ (n - x))\n[PROOFSTEP]\napply sum_congr rfl\n[GOAL]\ncase e_a\np : ℕ\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : DecidableEq R\ninst✝ : Invertible ↑p\nn : ℕ\nH : ∀ (m : ℕ), m < n → ↑(bind₁ (W_ R)) (xInTermsOfW p R m) = X m\n⊢ ∀ (x : ℕ),\n    x ∈ range n → ↑C (↑p ^ x) * X x ^ p ^ (n - x) = ↑(bind₁ (W_ R)) (↑C (↑p ^ x) * xInTermsOfW p R x ^ p ^ (n - x))\n[PROOFSTEP]\nintro i h\n[GOAL]\ncase e_a\np : ℕ\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : DecidableEq R\ninst✝ : Invertible ↑p\nn : ℕ\nH : ∀ (m : ℕ), m < n → ↑(bind₁ (W_ R)) (xInTermsOfW p R m) = X m\ni : ℕ\nh : i ∈ range n\n⊢ ↑C (↑p ^ i) * X i ^ p ^ (n - i) = ↑(bind₁ (W_ R)) (↑C (↑p ^ i) * xInTermsOfW p R i ^ p ^ (n - i))\n[PROOFSTEP]\nrw [mem_range] at h \n[GOAL]\ncase e_a\np : ℕ\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : DecidableEq R\ninst✝ : Invertible ↑p\nn : ℕ\nH : ∀ (m : ℕ), m < n → ↑(bind₁ (W_ R)) (xInTermsOfW p R m) = X m\ni : ℕ\nh : i < n\n⊢ ↑C (↑p ^ i) * X i ^ p ^ (n - i) = ↑(bind₁ (W_ R)) (↑C (↑p ^ i) * xInTermsOfW p R i ^ p ^ (n - i))\n[PROOFSTEP]\nrw [AlgHom.map_mul, AlgHom.map_pow, algHom_C, H i h]\n", "meta": {"mathlib_filename": "Mathlib.RingTheory.WittVector.WittPolynomial", "llama_tokens": 18767, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8333246118695629, "lm_q2_score": 0.6442251064863697, "lm_q1q2_score": 0.5368486368193818}}
{"text": "[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nhp : p ≠ 2\n⊢ legendreSym p 2 = ↑χ₈ ↑p\n[PROOFSTEP]\nhave : (2 : ZMod p) = (2 : ℤ) := by norm_cast\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nhp : p ≠ 2\n⊢ 2 = ↑2\n[PROOFSTEP]\nnorm_cast\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nhp : p ≠ 2\nthis : 2 = ↑2\n⊢ legendreSym p 2 = ↑χ₈ ↑p\n[PROOFSTEP]\nrw [legendreSym, ← this, quadraticChar_two ((ringChar_zmod_n p).substr hp), card p]\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nhp : p ≠ 2\n⊢ legendreSym p (-2) = ↑χ₈' ↑p\n[PROOFSTEP]\nhave : (-2 : ZMod p) = (-2 : ℤ) := by norm_cast\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nhp : p ≠ 2\n⊢ -2 = ↑(-2)\n[PROOFSTEP]\nnorm_cast\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nhp : p ≠ 2\nthis : -2 = ↑(-2)\n⊢ legendreSym p (-2) = ↑χ₈' ↑p\n[PROOFSTEP]\nrw [legendreSym, ← this, quadraticChar_neg_two ((ringChar_zmod_n p).substr hp), card p]\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nhp : p ≠ 2\n⊢ IsSquare 2 ↔ p % 8 = 1 ∨ p % 8 = 7\n[PROOFSTEP]\nrw [FiniteField.isSquare_two_iff, card p]\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nhp : p ≠ 2\n⊢ p % 8 ≠ 3 ∧ p % 8 ≠ 5 ↔ p % 8 = 1 ∨ p % 8 = 7\n[PROOFSTEP]\nhave h₁ := Prime.mod_two_eq_one_iff_ne_two.mpr hp\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nhp : p ≠ 2\nh₁ : p % 2 = 1\n⊢ p % 8 ≠ 3 ∧ p % 8 ≠ 5 ↔ p % 8 = 1 ∨ p % 8 = 7\n[PROOFSTEP]\nrw [← mod_mod_of_dvd p (by norm_num : 2 ∣ 8)] at h₁ \n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nhp : p ≠ 2\nh₁ : p % 2 = 1\n⊢ 2 ∣ 8\n[PROOFSTEP]\nnorm_num\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nhp : p ≠ 2\nh₁ : p % 8 % 2 = 1\n⊢ p % 8 ≠ 3 ∧ p % 8 ≠ 5 ↔ p % 8 = 1 ∨ p % 8 = 7\n[PROOFSTEP]\nhave h₂ := mod_lt p (by norm_num : 0 < 8)\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nhp : p ≠ 2\nh₁ : p % 8 % 2 = 1\n⊢ 0 < 8\n[PROOFSTEP]\nnorm_num\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nhp : p ≠ 2\nh₁ : p % 8 % 2 = 1\nh₂ : p % 8 < 8\n⊢ p % 8 ≠ 3 ∧ p % 8 ≠ 5 ↔ p % 8 = 1 ∨ p % 8 = 7\n[PROOFSTEP]\nrevert h₂ h₁\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nhp : p ≠ 2\n⊢ p % 8 % 2 = 1 → p % 8 < 8 → (p % 8 ≠ 3 ∧ p % 8 ≠ 5 ↔ p % 8 = 1 ∨ p % 8 = 7)\n[PROOFSTEP]\ngeneralize p % 8 = m\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nhp : p ≠ 2\nm : ℕ\n⊢ m % 2 = 1 → m < 8 → (m ≠ 3 ∧ m ≠ 5 ↔ m = 1 ∨ m = 7)\n[PROOFSTEP]\nclear! p\n[GOAL]\nm : ℕ\n⊢ m % 2 = 1 → m < 8 → (m ≠ 3 ∧ m ≠ 5 ↔ m = 1 ∨ m = 7)\n[PROOFSTEP]\nintros\n[GOAL]\nm : ℕ\nh₁✝ : m % 2 = 1\nh₂✝ : m < 8\n⊢ m ≠ 3 ∧ m ≠ 5 ↔ m = 1 ∨ m = 7\n[PROOFSTEP]\ninterval_cases m\n[GOAL]\ncase «0»\nm : ℕ\nh₁✝ : 0 % 2 = 1\nh₂✝ : 0 < 8\n⊢ 0 ≠ 3 ∧ 0 ≠ 5 ↔ 0 = 1 ∨ 0 = 7\n[PROOFSTEP]\nsimp_all\n  -- Porting note: was `decide!`\n[GOAL]\ncase «1»\nm : ℕ\nh₁✝ : 1 % 2 = 1\nh₂✝ : 1 < 8\n⊢ 1 ≠ 3 ∧ 1 ≠ 5 ↔ 1 = 1 ∨ 1 = 7\n[PROOFSTEP]\nsimp_all\n  -- Porting note: was `decide!`\n[GOAL]\ncase «2»\nm : ℕ\nh₁✝ : 2 % 2 = 1\nh₂✝ : 2 < 8\n⊢ 2 ≠ 3 ∧ 2 ≠ 5 ↔ 2 = 1 ∨ 2 = 7\n[PROOFSTEP]\nsimp_all\n  -- Porting note: was `decide!`\n[GOAL]\ncase «3»\nm : ℕ\nh₁✝ : 3 % 2 = 1\nh₂✝ : 3 < 8\n⊢ 3 ≠ 3 ∧ 3 ≠ 5 ↔ 3 = 1 ∨ 3 = 7\n[PROOFSTEP]\nsimp_all\n  -- Porting note: was `decide!`\n[GOAL]\ncase «4»\nm : ℕ\nh₁✝ : 4 % 2 = 1\nh₂✝ : 4 < 8\n⊢ 4 ≠ 3 ∧ 4 ≠ 5 ↔ 4 = 1 ∨ 4 = 7\n[PROOFSTEP]\nsimp_all\n  -- Porting note: was `decide!`\n[GOAL]\ncase «5»\nm : ℕ\nh₁✝ : 5 % 2 = 1\nh₂✝ : 5 < 8\n⊢ 5 ≠ 3 ∧ 5 ≠ 5 ↔ 5 = 1 ∨ 5 = 7\n[PROOFSTEP]\nsimp_all\n  -- Porting note: was `decide!`\n[GOAL]\ncase «6»\nm : ℕ\nh₁✝ : 6 % 2 = 1\nh₂✝ : 6 < 8\n⊢ 6 ≠ 3 ∧ 6 ≠ 5 ↔ 6 = 1 ∨ 6 = 7\n[PROOFSTEP]\nsimp_all\n  -- Porting note: was `decide!`\n[GOAL]\ncase «7»\nm : ℕ\nh₁✝ : 7 % 2 = 1\nh₂✝ : 7 < 8\n⊢ 7 ≠ 3 ∧ 7 ≠ 5 ↔ 7 = 1 ∨ 7 = 7\n[PROOFSTEP]\nsimp_all\n  -- Porting note: was `decide!`\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nhp : p ≠ 2\n⊢ IsSquare (-2) ↔ p % 8 = 1 ∨ p % 8 = 3\n[PROOFSTEP]\nrw [FiniteField.isSquare_neg_two_iff, card p]\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nhp : p ≠ 2\n⊢ p % 8 ≠ 5 ∧ p % 8 ≠ 7 ↔ p % 8 = 1 ∨ p % 8 = 3\n[PROOFSTEP]\nhave h₁ := Prime.mod_two_eq_one_iff_ne_two.mpr hp\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nhp : p ≠ 2\nh₁ : p % 2 = 1\n⊢ p % 8 ≠ 5 ∧ p % 8 ≠ 7 ↔ p % 8 = 1 ∨ p % 8 = 3\n[PROOFSTEP]\nrw [← mod_mod_of_dvd p (by norm_num : 2 ∣ 8)] at h₁ \n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nhp : p ≠ 2\nh₁ : p % 2 = 1\n⊢ 2 ∣ 8\n[PROOFSTEP]\nnorm_num\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nhp : p ≠ 2\nh₁ : p % 8 % 2 = 1\n⊢ p % 8 ≠ 5 ∧ p % 8 ≠ 7 ↔ p % 8 = 1 ∨ p % 8 = 3\n[PROOFSTEP]\nhave h₂ := mod_lt p (by norm_num : 0 < 8)\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nhp : p ≠ 2\nh₁ : p % 8 % 2 = 1\n⊢ 0 < 8\n[PROOFSTEP]\nnorm_num\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nhp : p ≠ 2\nh₁ : p % 8 % 2 = 1\nh₂ : p % 8 < 8\n⊢ p % 8 ≠ 5 ∧ p % 8 ≠ 7 ↔ p % 8 = 1 ∨ p % 8 = 3\n[PROOFSTEP]\nrevert h₂ h₁\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nhp : p ≠ 2\n⊢ p % 8 % 2 = 1 → p % 8 < 8 → (p % 8 ≠ 5 ∧ p % 8 ≠ 7 ↔ p % 8 = 1 ∨ p % 8 = 3)\n[PROOFSTEP]\ngeneralize p % 8 = m\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nhp : p ≠ 2\nm : ℕ\n⊢ m % 2 = 1 → m < 8 → (m ≠ 5 ∧ m ≠ 7 ↔ m = 1 ∨ m = 3)\n[PROOFSTEP]\nclear! p\n[GOAL]\nm : ℕ\n⊢ m % 2 = 1 → m < 8 → (m ≠ 5 ∧ m ≠ 7 ↔ m = 1 ∨ m = 3)\n[PROOFSTEP]\nintros\n[GOAL]\nm : ℕ\nh₁✝ : m % 2 = 1\nh₂✝ : m < 8\n⊢ m ≠ 5 ∧ m ≠ 7 ↔ m = 1 ∨ m = 3\n[PROOFSTEP]\ninterval_cases m\n[GOAL]\ncase «0»\nm : ℕ\nh₁✝ : 0 % 2 = 1\nh₂✝ : 0 < 8\n⊢ 0 ≠ 5 ∧ 0 ≠ 7 ↔ 0 = 1 ∨ 0 = 3\n[PROOFSTEP]\nsimp_all\n  -- Porting note: was `decide!`\n[GOAL]\ncase «1»\nm : ℕ\nh₁✝ : 1 % 2 = 1\nh₂✝ : 1 < 8\n⊢ 1 ≠ 5 ∧ 1 ≠ 7 ↔ 1 = 1 ∨ 1 = 3\n[PROOFSTEP]\nsimp_all\n  -- Porting note: was `decide!`\n[GOAL]\ncase «2»\nm : ℕ\nh₁✝ : 2 % 2 = 1\nh₂✝ : 2 < 8\n⊢ 2 ≠ 5 ∧ 2 ≠ 7 ↔ 2 = 1 ∨ 2 = 3\n[PROOFSTEP]\nsimp_all\n  -- Porting note: was `decide!`\n[GOAL]\ncase «3»\nm : ℕ\nh₁✝ : 3 % 2 = 1\nh₂✝ : 3 < 8\n⊢ 3 ≠ 5 ∧ 3 ≠ 7 ↔ 3 = 1 ∨ 3 = 3\n[PROOFSTEP]\nsimp_all\n  -- Porting note: was `decide!`\n[GOAL]\ncase «4»\nm : ℕ\nh₁✝ : 4 % 2 = 1\nh₂✝ : 4 < 8\n⊢ 4 ≠ 5 ∧ 4 ≠ 7 ↔ 4 = 1 ∨ 4 = 3\n[PROOFSTEP]\nsimp_all\n  -- Porting note: was `decide!`\n[GOAL]\ncase «5»\nm : ℕ\nh₁✝ : 5 % 2 = 1\nh₂✝ : 5 < 8\n⊢ 5 ≠ 5 ∧ 5 ≠ 7 ↔ 5 = 1 ∨ 5 = 3\n[PROOFSTEP]\nsimp_all\n  -- Porting note: was `decide!`\n[GOAL]\ncase «6»\nm : ℕ\nh₁✝ : 6 % 2 = 1\nh₂✝ : 6 < 8\n⊢ 6 ≠ 5 ∧ 6 ≠ 7 ↔ 6 = 1 ∨ 6 = 3\n[PROOFSTEP]\nsimp_all\n  -- Porting note: was `decide!`\n[GOAL]\ncase «7»\nm : ℕ\nh₁✝ : 7 % 2 = 1\nh₂✝ : 7 < 8\n⊢ 7 ≠ 5 ∧ 7 ≠ 7 ↔ 7 = 1 ∨ 7 = 3\n[PROOFSTEP]\nsimp_all\n  -- Porting note: was `decide!`\n[GOAL]\np q : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : Fact (Nat.Prime q)\nhp : p ≠ 2\nhq : q ≠ 2\nhpq : p ≠ q\n⊢ legendreSym q ↑p * legendreSym p ↑q = (-1) ^ (p / 2 * (q / 2))\n[PROOFSTEP]\nhave hp₁ := (Prime.eq_two_or_odd <| @Fact.out p.Prime _).resolve_left hp\n[GOAL]\np q : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : Fact (Nat.Prime q)\nhp : p ≠ 2\nhq : q ≠ 2\nhpq : p ≠ q\nhp₁ : p % 2 = 1\n⊢ legendreSym q ↑p * legendreSym p ↑q = (-1) ^ (p / 2 * (q / 2))\n[PROOFSTEP]\nhave hq₁ := (Prime.eq_two_or_odd <| @Fact.out q.Prime _).resolve_left hq\n[GOAL]\np q : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : Fact (Nat.Prime q)\nhp : p ≠ 2\nhq : q ≠ 2\nhpq : p ≠ q\nhp₁ : p % 2 = 1\nhq₁ : q % 2 = 1\n⊢ legendreSym q ↑p * legendreSym p ↑q = (-1) ^ (p / 2 * (q / 2))\n[PROOFSTEP]\nhave hq₂ : ringChar (ZMod q) ≠ 2 := (ringChar_zmod_n q).substr hq\n[GOAL]\np q : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : Fact (Nat.Prime q)\nhp : p ≠ 2\nhq : q ≠ 2\nhpq : p ≠ q\nhp₁ : p % 2 = 1\nhq₁ : q % 2 = 1\nhq₂ : ringChar (ZMod q) ≠ 2\n⊢ legendreSym q ↑p * legendreSym p ↑q = (-1) ^ (p / 2 * (q / 2))\n[PROOFSTEP]\nhave h := quadraticChar_odd_prime ((ringChar_zmod_n p).substr hp) hq ((ringChar_zmod_n p).substr hpq)\n[GOAL]\np q : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : Fact (Nat.Prime q)\nhp : p ≠ 2\nhq : q ≠ 2\nhpq : p ≠ q\nhp₁ : p % 2 = 1\nhq₁ : q % 2 = 1\nhq₂ : ringChar (ZMod q) ≠ 2\nh :\n  ↑(quadraticChar (ZMod p)) ↑q = ↑(quadraticChar (ZMod q)) (↑(↑χ₄ ↑(Fintype.card (ZMod p))) * ↑(Fintype.card (ZMod p)))\n⊢ legendreSym q ↑p * legendreSym p ↑q = (-1) ^ (p / 2 * (q / 2))\n[PROOFSTEP]\nrw [card p] at h \n[GOAL]\np q : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : Fact (Nat.Prime q)\nhp : p ≠ 2\nhq : q ≠ 2\nhpq : p ≠ q\nhp₁ : p % 2 = 1\nhq₁ : q % 2 = 1\nhq₂ : ringChar (ZMod q) ≠ 2\nh : ↑(quadraticChar (ZMod p)) ↑q = ↑(quadraticChar (ZMod q)) (↑(↑χ₄ ↑p) * ↑p)\n⊢ legendreSym q ↑p * legendreSym p ↑q = (-1) ^ (p / 2 * (q / 2))\n[PROOFSTEP]\nhave nc : ∀ n r : ℕ, ((n : ℤ) : ZMod r) = n := fun n r => by norm_cast\n[GOAL]\np q : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : Fact (Nat.Prime q)\nhp : p ≠ 2\nhq : q ≠ 2\nhpq : p ≠ q\nhp₁ : p % 2 = 1\nhq₁ : q % 2 = 1\nhq₂ : ringChar (ZMod q) ≠ 2\nh : ↑(quadraticChar (ZMod p)) ↑q = ↑(quadraticChar (ZMod q)) (↑(↑χ₄ ↑p) * ↑p)\nn r : ℕ\n⊢ ↑↑n = ↑n\n[PROOFSTEP]\nnorm_cast\n[GOAL]\np q : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : Fact (Nat.Prime q)\nhp : p ≠ 2\nhq : q ≠ 2\nhpq : p ≠ q\nhp₁ : p % 2 = 1\nhq₁ : q % 2 = 1\nhq₂ : ringChar (ZMod q) ≠ 2\nh : ↑(quadraticChar (ZMod p)) ↑q = ↑(quadraticChar (ZMod q)) (↑(↑χ₄ ↑p) * ↑p)\nnc : ∀ (n r : ℕ), ↑↑n = ↑n\n⊢ legendreSym q ↑p * legendreSym p ↑q = (-1) ^ (p / 2 * (q / 2))\n[PROOFSTEP]\nhave nc' : (((-1) ^ (p / 2) : ℤ) : ZMod q) = (-1) ^ (p / 2) := by norm_cast\n[GOAL]\np q : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : Fact (Nat.Prime q)\nhp : p ≠ 2\nhq : q ≠ 2\nhpq : p ≠ q\nhp₁ : p % 2 = 1\nhq₁ : q % 2 = 1\nhq₂ : ringChar (ZMod q) ≠ 2\nh : ↑(quadraticChar (ZMod p)) ↑q = ↑(quadraticChar (ZMod q)) (↑(↑χ₄ ↑p) * ↑p)\nnc : ∀ (n r : ℕ), ↑↑n = ↑n\n⊢ ↑((-1) ^ (p / 2)) = (-1) ^ (p / 2)\n[PROOFSTEP]\nnorm_cast\n[GOAL]\np q : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : Fact (Nat.Prime q)\nhp : p ≠ 2\nhq : q ≠ 2\nhpq : p ≠ q\nhp₁ : p % 2 = 1\nhq₁ : q % 2 = 1\nhq₂ : ringChar (ZMod q) ≠ 2\nh : ↑(quadraticChar (ZMod p)) ↑q = ↑(quadraticChar (ZMod q)) (↑(↑χ₄ ↑p) * ↑p)\nnc : ∀ (n r : ℕ), ↑↑n = ↑n\nnc' : ↑((-1) ^ (p / 2)) = (-1) ^ (p / 2)\n⊢ legendreSym q ↑p * legendreSym p ↑q = (-1) ^ (p / 2 * (q / 2))\n[PROOFSTEP]\nrw [legendreSym, legendreSym, nc, nc, h, map_mul, mul_rotate', mul_comm (p / 2), ← pow_two,\n  quadraticChar_sq_one (prime_ne_zero q p hpq.symm), mul_one, pow_mul, χ₄_eq_neg_one_pow hp₁, nc', map_pow,\n  quadraticChar_neg_one hq₂, card q, χ₄_eq_neg_one_pow hq₁]\n[GOAL]\np q : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : Fact (Nat.Prime q)\nhp : p ≠ 2\nhq : q ≠ 2\n⊢ legendreSym q ↑p = (-1) ^ (p / 2 * (q / 2)) * legendreSym p ↑q\n[PROOFSTEP]\ncases' eq_or_ne p q with h h\n[GOAL]\ncase inl\np q : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : Fact (Nat.Prime q)\nhp : p ≠ 2\nhq : q ≠ 2\nh : p = q\n⊢ legendreSym q ↑p = (-1) ^ (p / 2 * (q / 2)) * legendreSym p ↑q\n[PROOFSTEP]\nsubst p\n[GOAL]\ncase inl\nq : ℕ\ninst✝¹ : Fact (Nat.Prime q)\nhq : q ≠ 2\ninst✝ : Fact (Nat.Prime q)\nhp : q ≠ 2\n⊢ legendreSym q ↑q = (-1) ^ (q / 2 * (q / 2)) * legendreSym q ↑q\n[PROOFSTEP]\nrw [(eq_zero_iff q q).mpr (by exact_mod_cast nat_cast_self q), mul_zero]\n[GOAL]\nq : ℕ\ninst✝¹ : Fact (Nat.Prime q)\nhq : q ≠ 2\ninst✝ : Fact (Nat.Prime q)\nhp : q ≠ 2\n⊢ ↑↑q = 0\n[PROOFSTEP]\nexact_mod_cast nat_cast_self q\n[GOAL]\ncase inr\np q : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : Fact (Nat.Prime q)\nhp : p ≠ 2\nhq : q ≠ 2\nh : p ≠ q\n⊢ legendreSym q ↑p = (-1) ^ (p / 2 * (q / 2)) * legendreSym p ↑q\n[PROOFSTEP]\nhave qr := congr_arg (· * legendreSym p q) (quadratic_reciprocity hp hq h)\n[GOAL]\ncase inr\np q : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : Fact (Nat.Prime q)\nhp : p ≠ 2\nhq : q ≠ 2\nh : p ≠ q\nqr :\n  (fun x => x * legendreSym p ↑q) (legendreSym q ↑p * legendreSym p ↑q) =\n    (fun x => x * legendreSym p ↑q) ((-1) ^ (p / 2 * (q / 2)))\n⊢ legendreSym q ↑p = (-1) ^ (p / 2 * (q / 2)) * legendreSym p ↑q\n[PROOFSTEP]\nhave : ((q : ℤ) : ZMod p) ≠ 0 := by exact_mod_cast prime_ne_zero p q h\n[GOAL]\np q : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : Fact (Nat.Prime q)\nhp : p ≠ 2\nhq : q ≠ 2\nh : p ≠ q\nqr :\n  (fun x => x * legendreSym p ↑q) (legendreSym q ↑p * legendreSym p ↑q) =\n    (fun x => x * legendreSym p ↑q) ((-1) ^ (p / 2 * (q / 2)))\n⊢ ↑↑q ≠ 0\n[PROOFSTEP]\nexact_mod_cast prime_ne_zero p q h\n[GOAL]\ncase inr\np q : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : Fact (Nat.Prime q)\nhp : p ≠ 2\nhq : q ≠ 2\nh : p ≠ q\nqr :\n  (fun x => x * legendreSym p ↑q) (legendreSym q ↑p * legendreSym p ↑q) =\n    (fun x => x * legendreSym p ↑q) ((-1) ^ (p / 2 * (q / 2)))\nthis : ↑↑q ≠ 0\n⊢ legendreSym q ↑p = (-1) ^ (p / 2 * (q / 2)) * legendreSym p ↑q\n[PROOFSTEP]\nsimpa only [mul_assoc, ← pow_two, sq_one p this, mul_one] using qr\n[GOAL]\np q : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : Fact (Nat.Prime q)\nhp : p % 4 = 1\nhq : q ≠ 2\n⊢ legendreSym q ↑p = legendreSym p ↑q\n[PROOFSTEP]\nrw [quadratic_reciprocity' (Prime.mod_two_eq_one_iff_ne_two.mp (odd_of_mod_four_eq_one hp)) hq, pow_mul,\n  neg_one_pow_div_two_of_one_mod_four hp, one_pow, one_mul]\n[GOAL]\np q : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : Fact (Nat.Prime q)\nhp : p % 4 = 3\nhq : q % 4 = 3\n⊢ legendreSym q ↑p = -legendreSym p ↑q\n[PROOFSTEP]\nlet nop := @neg_one_pow_div_two_of_three_mod_four\n[GOAL]\np q : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : Fact (Nat.Prime q)\nhp : p % 4 = 3\nhq : q % 4 = 3\nnop : ∀ {n : ℕ}, n % 4 = 3 → (-1) ^ (n / 2) = -1 := @neg_one_pow_div_two_of_three_mod_four\n⊢ legendreSym q ↑p = -legendreSym p ↑q\n[PROOFSTEP]\nrw [quadratic_reciprocity', pow_mul, nop hp, nop hq, neg_one_mul]\n[GOAL]\ncase hp\np q : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : Fact (Nat.Prime q)\nhp : p % 4 = 3\nhq : q % 4 = 3\nnop : ∀ {n : ℕ}, n % 4 = 3 → (-1) ^ (n / 2) = -1 := @neg_one_pow_div_two_of_three_mod_four\n⊢ p ≠ 2\n[PROOFSTEP]\nrwa [← Prime.mod_two_eq_one_iff_ne_two, odd_of_mod_four_eq_three]\n[GOAL]\ncase hq\np q : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : Fact (Nat.Prime q)\nhp : p % 4 = 3\nhq : q % 4 = 3\nnop : ∀ {n : ℕ}, n % 4 = 3 → (-1) ^ (n / 2) = -1 := @neg_one_pow_div_two_of_three_mod_four\n⊢ q ≠ 2\n[PROOFSTEP]\nrwa [← Prime.mod_two_eq_one_iff_ne_two, odd_of_mod_four_eq_three]\n[GOAL]\np q : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : Fact (Nat.Prime q)\nhp1 : p % 4 = 1\nhq1 : q ≠ 2\n⊢ IsSquare ↑q ↔ IsSquare ↑p\n[PROOFSTEP]\ncases' eq_or_ne p q with h h\n[GOAL]\ncase inl\np q : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : Fact (Nat.Prime q)\nhp1 : p % 4 = 1\nhq1 : q ≠ 2\nh : p = q\n⊢ IsSquare ↑q ↔ IsSquare ↑p\n[PROOFSTEP]\nsubst p\n[GOAL]\ncase inl\nq : ℕ\ninst✝¹ : Fact (Nat.Prime q)\nhq1 : q ≠ 2\ninst✝ : Fact (Nat.Prime q)\nhp1 : q % 4 = 1\n⊢ IsSquare ↑q ↔ IsSquare ↑q\n[PROOFSTEP]\nrfl\n[GOAL]\ncase inr\np q : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : Fact (Nat.Prime q)\nhp1 : p % 4 = 1\nhq1 : q ≠ 2\nh : p ≠ q\n⊢ IsSquare ↑q ↔ IsSquare ↑p\n[PROOFSTEP]\nrw [← eq_one_iff' p (prime_ne_zero p q h), ← eq_one_iff' q (prime_ne_zero q p h.symm),\n  quadratic_reciprocity_one_mod_four hp1 hq1]\n[GOAL]\np q : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : Fact (Nat.Prime q)\nhp3 : p % 4 = 3\nhq3 : q % 4 = 3\nhpq : p ≠ q\n⊢ IsSquare ↑q ↔ ¬IsSquare ↑p\n[PROOFSTEP]\nrw [← eq_one_iff' p (prime_ne_zero p q hpq), ← eq_neg_one_iff' q, quadratic_reciprocity_three_mod_four hp3 hq3, neg_inj]\n", "meta": {"mathlib_filename": "Mathlib.NumberTheory.LegendreSymbol.QuadraticReciprocity", "llama_tokens": 8665, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8152325073083131, "lm_q2_score": 0.6584174938590246, "lm_q1q2_score": 0.5367633443743485}}
{"text": "[GOAL]\nR : Type u_1\nRₛ : Type u_2\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing Rₛ\ninst✝⁴ : Algebra R Rₛ\nS : Submonoid R\nhT : IsLocalization S Rₛ\nM : Type u_3\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : Module Rₛ M\ninst✝ : IsScalarTower R Rₛ M\nι : Type u_4\nb : ι → M\nhli : LinearIndependent R b\n⊢ LinearIndependent Rₛ b\n[PROOFSTEP]\nrw [linearIndependent_iff'] at hli ⊢\n[GOAL]\nR : Type u_1\nRₛ : Type u_2\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing Rₛ\ninst✝⁴ : Algebra R Rₛ\nS : Submonoid R\nhT : IsLocalization S Rₛ\nM : Type u_3\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : Module Rₛ M\ninst✝ : IsScalarTower R Rₛ M\nι : Type u_4\nb : ι → M\nhli : ∀ (s : Finset ι) (g : ι → R), ∑ i in s, g i • b i = 0 → ∀ (i : ι), i ∈ s → g i = 0\n⊢ ∀ (s : Finset ι) (g : ι → Rₛ), ∑ i in s, g i • b i = 0 → ∀ (i : ι), i ∈ s → g i = 0\n[PROOFSTEP]\nintro s g hg i hi\n[GOAL]\nR : Type u_1\nRₛ : Type u_2\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing Rₛ\ninst✝⁴ : Algebra R Rₛ\nS : Submonoid R\nhT : IsLocalization S Rₛ\nM : Type u_3\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : Module Rₛ M\ninst✝ : IsScalarTower R Rₛ M\nι : Type u_4\nb : ι → M\nhli : ∀ (s : Finset ι) (g : ι → R), ∑ i in s, g i • b i = 0 → ∀ (i : ι), i ∈ s → g i = 0\ns : Finset ι\ng : ι → Rₛ\nhg : ∑ i in s, g i • b i = 0\ni : ι\nhi : i ∈ s\n⊢ g i = 0\n[PROOFSTEP]\nchoose! a g' hg' using IsLocalization.exist_integer_multiples S s g\n[GOAL]\nR : Type u_1\nRₛ : Type u_2\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing Rₛ\ninst✝⁴ : Algebra R Rₛ\nS : Submonoid R\nhT : IsLocalization S Rₛ\nM : Type u_3\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : Module Rₛ M\ninst✝ : IsScalarTower R Rₛ M\nι : Type u_4\nb : ι → M\nhli : ∀ (s : Finset ι) (g : ι → R), ∑ i in s, g i • b i = 0 → ∀ (i : ι), i ∈ s → g i = 0\ns : Finset ι\ng : ι → Rₛ\nhg : ∑ i in s, g i • b i = 0\ni : ι\nhi : i ∈ s\na : { x // x ∈ S }\ng' : ι → R\nhg' : ∀ (i : ι), i ∈ s → ↑(algebraMap R Rₛ) (g' i) = ↑a • g i\n⊢ g i = 0\n[PROOFSTEP]\nspecialize hli s g' _ i hi\n[GOAL]\nR : Type u_1\nRₛ : Type u_2\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing Rₛ\ninst✝⁴ : Algebra R Rₛ\nS : Submonoid R\nhT : IsLocalization S Rₛ\nM : Type u_3\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : Module Rₛ M\ninst✝ : IsScalarTower R Rₛ M\nι : Type u_4\nb : ι → M\nhli : ∀ (s : Finset ι) (g : ι → R), ∑ i in s, g i • b i = 0 → ∀ (i : ι), i ∈ s → g i = 0\ns : Finset ι\ng : ι → Rₛ\nhg : ∑ i in s, g i • b i = 0\ni : ι\nhi : i ∈ s\na : { x // x ∈ S }\ng' : ι → R\nhg' : ∀ (i : ι), i ∈ s → ↑(algebraMap R Rₛ) (g' i) = ↑a • g i\n⊢ ∑ i in s, g' i • b i = 0\n[PROOFSTEP]\nrw [← @smul_zero _ M _ _ (a : R), ← hg, Finset.smul_sum]\n[GOAL]\nR : Type u_1\nRₛ : Type u_2\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing Rₛ\ninst✝⁴ : Algebra R Rₛ\nS : Submonoid R\nhT : IsLocalization S Rₛ\nM : Type u_3\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : Module Rₛ M\ninst✝ : IsScalarTower R Rₛ M\nι : Type u_4\nb : ι → M\nhli : ∀ (s : Finset ι) (g : ι → R), ∑ i in s, g i • b i = 0 → ∀ (i : ι), i ∈ s → g i = 0\ns : Finset ι\ng : ι → Rₛ\nhg : ∑ i in s, g i • b i = 0\ni : ι\nhi : i ∈ s\na : { x // x ∈ S }\ng' : ι → R\nhg' : ∀ (i : ι), i ∈ s → ↑(algebraMap R Rₛ) (g' i) = ↑a • g i\n⊢ ∑ i in s, g' i • b i = ∑ x in s, ↑a • g x • b x\n[PROOFSTEP]\nrefine' Finset.sum_congr rfl fun i hi => _\n[GOAL]\nR : Type u_1\nRₛ : Type u_2\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing Rₛ\ninst✝⁴ : Algebra R Rₛ\nS : Submonoid R\nhT : IsLocalization S Rₛ\nM : Type u_3\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : Module Rₛ M\ninst✝ : IsScalarTower R Rₛ M\nι : Type u_4\nb : ι → M\nhli : ∀ (s : Finset ι) (g : ι → R), ∑ i in s, g i • b i = 0 → ∀ (i : ι), i ∈ s → g i = 0\ns : Finset ι\ng : ι → Rₛ\nhg : ∑ i in s, g i • b i = 0\ni✝ : ι\nhi✝ : i✝ ∈ s\na : { x // x ∈ S }\ng' : ι → R\nhg' : ∀ (i : ι), i ∈ s → ↑(algebraMap R Rₛ) (g' i) = ↑a • g i\ni : ι\nhi : i ∈ s\n⊢ g' i • b i = ↑a • g i • b i\n[PROOFSTEP]\nrw [← IsScalarTower.algebraMap_smul Rₛ, hg' i hi, smul_assoc]\n[GOAL]\nR : Type u_1\nRₛ : Type u_2\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing Rₛ\ninst✝⁴ : Algebra R Rₛ\nS : Submonoid R\nhT : IsLocalization S Rₛ\nM : Type u_3\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : Module Rₛ M\ninst✝ : IsScalarTower R Rₛ M\nι : Type u_4\nb : ι → M\ns : Finset ι\ng : ι → Rₛ\nhg : ∑ i in s, g i • b i = 0\ni : ι\nhi : i ∈ s\na : { x // x ∈ S }\ng' : ι → R\nhg' : ∀ (i : ι), i ∈ s → ↑(algebraMap R Rₛ) (g' i) = ↑a • g i\nhli : g' i = 0\n⊢ g i = 0\n[PROOFSTEP]\nrefine' (IsLocalization.map_units Rₛ a).mul_right_eq_zero.mp _\n[GOAL]\nR : Type u_1\nRₛ : Type u_2\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing Rₛ\ninst✝⁴ : Algebra R Rₛ\nS : Submonoid R\nhT : IsLocalization S Rₛ\nM : Type u_3\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : Module Rₛ M\ninst✝ : IsScalarTower R Rₛ M\nι : Type u_4\nb : ι → M\ns : Finset ι\ng : ι → Rₛ\nhg : ∑ i in s, g i • b i = 0\ni : ι\nhi : i ∈ s\na : { x // x ∈ S }\ng' : ι → R\nhg' : ∀ (i : ι), i ∈ s → ↑(algebraMap R Rₛ) (g' i) = ↑a • g i\nhli : g' i = 0\n⊢ ↑(algebraMap R Rₛ) ↑a * g i = 0\n[PROOFSTEP]\nrw [← Algebra.smul_def, ← map_zero (algebraMap R Rₛ), ← hli, hg' i hi]\n[GOAL]\nR : Type u_1\nRₛ : Type u_2\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing Rₛ\ninst✝⁸ : Algebra R Rₛ\nS : Submonoid R\nhT : IsLocalization S Rₛ\nA : Type u_3\ninst✝⁷ : CommRing A\ninst✝⁶ : Algebra R A\nAₛ : Type u_4\ninst✝⁵ : CommRing Aₛ\ninst✝⁴ : Algebra A Aₛ\ninst✝³ : Algebra Rₛ Aₛ\ninst✝² : Algebra R Aₛ\ninst✝¹ : IsScalarTower R Rₛ Aₛ\ninst✝ : IsScalarTower R A Aₛ\nhA : IsLocalization (Algebra.algebraMapSubmonoid A S) Aₛ\nι : Type u_5\nv : ι → A\nhv : LinearIndependent R v\n⊢ LinearIndependent Rₛ (↑(algebraMap A Aₛ) ∘ v)\n[PROOFSTEP]\nrw [linearIndependent_iff'] at hv ⊢\n[GOAL]\nR : Type u_1\nRₛ : Type u_2\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing Rₛ\ninst✝⁸ : Algebra R Rₛ\nS : Submonoid R\nhT : IsLocalization S Rₛ\nA : Type u_3\ninst✝⁷ : CommRing A\ninst✝⁶ : Algebra R A\nAₛ : Type u_4\ninst✝⁵ : CommRing Aₛ\ninst✝⁴ : Algebra A Aₛ\ninst✝³ : Algebra Rₛ Aₛ\ninst✝² : Algebra R Aₛ\ninst✝¹ : IsScalarTower R Rₛ Aₛ\ninst✝ : IsScalarTower R A Aₛ\nhA : IsLocalization (Algebra.algebraMapSubmonoid A S) Aₛ\nι : Type u_5\nv : ι → A\nhv : ∀ (s : Finset ι) (g : ι → R), ∑ i in s, g i • v i = 0 → ∀ (i : ι), i ∈ s → g i = 0\n⊢ ∀ (s : Finset ι) (g : ι → Rₛ), ∑ i in s, g i • (↑(algebraMap A Aₛ) ∘ v) i = 0 → ∀ (i : ι), i ∈ s → g i = 0\n[PROOFSTEP]\nintro s g hg i hi\n[GOAL]\nR : Type u_1\nRₛ : Type u_2\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing Rₛ\ninst✝⁸ : Algebra R Rₛ\nS : Submonoid R\nhT : IsLocalization S Rₛ\nA : Type u_3\ninst✝⁷ : CommRing A\ninst✝⁶ : Algebra R A\nAₛ : Type u_4\ninst✝⁵ : CommRing Aₛ\ninst✝⁴ : Algebra A Aₛ\ninst✝³ : Algebra Rₛ Aₛ\ninst✝² : Algebra R Aₛ\ninst✝¹ : IsScalarTower R Rₛ Aₛ\ninst✝ : IsScalarTower R A Aₛ\nhA : IsLocalization (Algebra.algebraMapSubmonoid A S) Aₛ\nι : Type u_5\nv : ι → A\nhv : ∀ (s : Finset ι) (g : ι → R), ∑ i in s, g i • v i = 0 → ∀ (i : ι), i ∈ s → g i = 0\ns : Finset ι\ng : ι → Rₛ\nhg : ∑ i in s, g i • (↑(algebraMap A Aₛ) ∘ v) i = 0\ni : ι\nhi : i ∈ s\n⊢ g i = 0\n[PROOFSTEP]\nchoose! a g' hg' using IsLocalization.exist_integer_multiples S s g\n[GOAL]\nR : Type u_1\nRₛ : Type u_2\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing Rₛ\ninst✝⁸ : Algebra R Rₛ\nS : Submonoid R\nhT : IsLocalization S Rₛ\nA : Type u_3\ninst✝⁷ : CommRing A\ninst✝⁶ : Algebra R A\nAₛ : Type u_4\ninst✝⁵ : CommRing Aₛ\ninst✝⁴ : Algebra A Aₛ\ninst✝³ : Algebra Rₛ Aₛ\ninst✝² : Algebra R Aₛ\ninst✝¹ : IsScalarTower R Rₛ Aₛ\ninst✝ : IsScalarTower R A Aₛ\nhA : IsLocalization (Algebra.algebraMapSubmonoid A S) Aₛ\nι : Type u_5\nv : ι → A\nhv : ∀ (s : Finset ι) (g : ι → R), ∑ i in s, g i • v i = 0 → ∀ (i : ι), i ∈ s → g i = 0\ns : Finset ι\ng : ι → Rₛ\nhg : ∑ i in s, g i • (↑(algebraMap A Aₛ) ∘ v) i = 0\ni : ι\nhi : i ∈ s\na : { x // x ∈ S }\ng' : ι → R\nhg' : ∀ (i : ι), i ∈ s → ↑(algebraMap R Rₛ) (g' i) = ↑a • g i\n⊢ g i = 0\n[PROOFSTEP]\nhave h0 : algebraMap A Aₛ (∑ i in s, g' i • v i) = 0 :=\n  by\n  apply_fun (· • ·) (a : R) at hg \n  rw [smul_zero, Finset.smul_sum] at hg \n  rw [map_sum, ← hg]\n  refine' Finset.sum_congr rfl fun i hi => _\n  rw [← smul_assoc, ← hg' i hi, Algebra.smul_def, map_mul, ← IsScalarTower.algebraMap_apply, ← Algebra.smul_def,\n    algebraMap_smul, Function.comp_apply]\n[GOAL]\nR : Type u_1\nRₛ : Type u_2\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing Rₛ\ninst✝⁸ : Algebra R Rₛ\nS : Submonoid R\nhT : IsLocalization S Rₛ\nA : Type u_3\ninst✝⁷ : CommRing A\ninst✝⁶ : Algebra R A\nAₛ : Type u_4\ninst✝⁵ : CommRing Aₛ\ninst✝⁴ : Algebra A Aₛ\ninst✝³ : Algebra Rₛ Aₛ\ninst✝² : Algebra R Aₛ\ninst✝¹ : IsScalarTower R Rₛ Aₛ\ninst✝ : IsScalarTower R A Aₛ\nhA : IsLocalization (Algebra.algebraMapSubmonoid A S) Aₛ\nι : Type u_5\nv : ι → A\nhv : ∀ (s : Finset ι) (g : ι → R), ∑ i in s, g i • v i = 0 → ∀ (i : ι), i ∈ s → g i = 0\ns : Finset ι\ng : ι → Rₛ\nhg : ∑ i in s, g i • (↑(algebraMap A Aₛ) ∘ v) i = 0\ni : ι\nhi : i ∈ s\na : { x // x ∈ S }\ng' : ι → R\nhg' : ∀ (i : ι), i ∈ s → ↑(algebraMap R Rₛ) (g' i) = ↑a • g i\n⊢ ↑(algebraMap A Aₛ) (∑ i in s, g' i • v i) = 0\n[PROOFSTEP]\napply_fun (· • ·) (a : R) at hg \n[GOAL]\nR : Type u_1\nRₛ : Type u_2\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing Rₛ\ninst✝⁸ : Algebra R Rₛ\nS : Submonoid R\nhT : IsLocalization S Rₛ\nA : Type u_3\ninst✝⁷ : CommRing A\ninst✝⁶ : Algebra R A\nAₛ : Type u_4\ninst✝⁵ : CommRing Aₛ\ninst✝⁴ : Algebra A Aₛ\ninst✝³ : Algebra Rₛ Aₛ\ninst✝² : Algebra R Aₛ\ninst✝¹ : IsScalarTower R Rₛ Aₛ\ninst✝ : IsScalarTower R A Aₛ\nhA : IsLocalization (Algebra.algebraMapSubmonoid A S) Aₛ\nι : Type u_5\nv : ι → A\nhv : ∀ (s : Finset ι) (g : ι → R), ∑ i in s, g i • v i = 0 → ∀ (i : ι), i ∈ s → g i = 0\ns : Finset ι\ng : ι → Rₛ\ni : ι\nhi : i ∈ s\na : { x // x ∈ S }\ng' : ι → R\nhg' : ∀ (i : ι), i ∈ s → ↑(algebraMap R Rₛ) (g' i) = ↑a • g i\nhg : ↑a • ∑ i in s, g i • (↑(algebraMap A Aₛ) ∘ v) i = ↑a • 0\n⊢ ↑(algebraMap A Aₛ) (∑ i in s, g' i • v i) = 0\n[PROOFSTEP]\nrw [smul_zero, Finset.smul_sum] at hg \n[GOAL]\nR : Type u_1\nRₛ : Type u_2\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing Rₛ\ninst✝⁸ : Algebra R Rₛ\nS : Submonoid R\nhT : IsLocalization S Rₛ\nA : Type u_3\ninst✝⁷ : CommRing A\ninst✝⁶ : Algebra R A\nAₛ : Type u_4\ninst✝⁵ : CommRing Aₛ\ninst✝⁴ : Algebra A Aₛ\ninst✝³ : Algebra Rₛ Aₛ\ninst✝² : Algebra R Aₛ\ninst✝¹ : IsScalarTower R Rₛ Aₛ\ninst✝ : IsScalarTower R A Aₛ\nhA : IsLocalization (Algebra.algebraMapSubmonoid A S) Aₛ\nι : Type u_5\nv : ι → A\nhv : ∀ (s : Finset ι) (g : ι → R), ∑ i in s, g i • v i = 0 → ∀ (i : ι), i ∈ s → g i = 0\ns : Finset ι\ng : ι → Rₛ\ni : ι\nhi : i ∈ s\na : { x // x ∈ S }\ng' : ι → R\nhg' : ∀ (i : ι), i ∈ s → ↑(algebraMap R Rₛ) (g' i) = ↑a • g i\nhg : ∑ x in s, ↑a • g x • (↑(algebraMap A Aₛ) ∘ v) x = 0\n⊢ ↑(algebraMap A Aₛ) (∑ i in s, g' i • v i) = 0\n[PROOFSTEP]\nrw [map_sum, ← hg]\n[GOAL]\nR : Type u_1\nRₛ : Type u_2\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing Rₛ\ninst✝⁸ : Algebra R Rₛ\nS : Submonoid R\nhT : IsLocalization S Rₛ\nA : Type u_3\ninst✝⁷ : CommRing A\ninst✝⁶ : Algebra R A\nAₛ : Type u_4\ninst✝⁵ : CommRing Aₛ\ninst✝⁴ : Algebra A Aₛ\ninst✝³ : Algebra Rₛ Aₛ\ninst✝² : Algebra R Aₛ\ninst✝¹ : IsScalarTower R Rₛ Aₛ\ninst✝ : IsScalarTower R A Aₛ\nhA : IsLocalization (Algebra.algebraMapSubmonoid A S) Aₛ\nι : Type u_5\nv : ι → A\nhv : ∀ (s : Finset ι) (g : ι → R), ∑ i in s, g i • v i = 0 → ∀ (i : ι), i ∈ s → g i = 0\ns : Finset ι\ng : ι → Rₛ\ni : ι\nhi : i ∈ s\na : { x // x ∈ S }\ng' : ι → R\nhg' : ∀ (i : ι), i ∈ s → ↑(algebraMap R Rₛ) (g' i) = ↑a • g i\nhg : ∑ x in s, ↑a • g x • (↑(algebraMap A Aₛ) ∘ v) x = 0\n⊢ ∑ x in s, ↑(algebraMap A Aₛ) (g' x • v x) = ∑ x in s, ↑a • g x • (↑(algebraMap A Aₛ) ∘ v) x\n[PROOFSTEP]\nrefine' Finset.sum_congr rfl fun i hi => _\n[GOAL]\nR : Type u_1\nRₛ : Type u_2\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing Rₛ\ninst✝⁸ : Algebra R Rₛ\nS : Submonoid R\nhT : IsLocalization S Rₛ\nA : Type u_3\ninst✝⁷ : CommRing A\ninst✝⁶ : Algebra R A\nAₛ : Type u_4\ninst✝⁵ : CommRing Aₛ\ninst✝⁴ : Algebra A Aₛ\ninst✝³ : Algebra Rₛ Aₛ\ninst✝² : Algebra R Aₛ\ninst✝¹ : IsScalarTower R Rₛ Aₛ\ninst✝ : IsScalarTower R A Aₛ\nhA : IsLocalization (Algebra.algebraMapSubmonoid A S) Aₛ\nι : Type u_5\nv : ι → A\nhv : ∀ (s : Finset ι) (g : ι → R), ∑ i in s, g i • v i = 0 → ∀ (i : ι), i ∈ s → g i = 0\ns : Finset ι\ng : ι → Rₛ\ni✝ : ι\nhi✝ : i✝ ∈ s\na : { x // x ∈ S }\ng' : ι → R\nhg' : ∀ (i : ι), i ∈ s → ↑(algebraMap R Rₛ) (g' i) = ↑a • g i\nhg : ∑ x in s, ↑a • g x • (↑(algebraMap A Aₛ) ∘ v) x = 0\ni : ι\nhi : i ∈ s\n⊢ ↑(algebraMap A Aₛ) (g' i • v i) = ↑a • g i • (↑(algebraMap A Aₛ) ∘ v) i\n[PROOFSTEP]\nrw [← smul_assoc, ← hg' i hi, Algebra.smul_def, map_mul, ← IsScalarTower.algebraMap_apply, ← Algebra.smul_def,\n  algebraMap_smul, Function.comp_apply]\n[GOAL]\nR : Type u_1\nRₛ : Type u_2\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing Rₛ\ninst✝⁸ : Algebra R Rₛ\nS : Submonoid R\nhT : IsLocalization S Rₛ\nA : Type u_3\ninst✝⁷ : CommRing A\ninst✝⁶ : Algebra R A\nAₛ : Type u_4\ninst✝⁵ : CommRing Aₛ\ninst✝⁴ : Algebra A Aₛ\ninst✝³ : Algebra Rₛ Aₛ\ninst✝² : Algebra R Aₛ\ninst✝¹ : IsScalarTower R Rₛ Aₛ\ninst✝ : IsScalarTower R A Aₛ\nhA : IsLocalization (Algebra.algebraMapSubmonoid A S) Aₛ\nι : Type u_5\nv : ι → A\nhv : ∀ (s : Finset ι) (g : ι → R), ∑ i in s, g i • v i = 0 → ∀ (i : ι), i ∈ s → g i = 0\ns : Finset ι\ng : ι → Rₛ\nhg : ∑ i in s, g i • (↑(algebraMap A Aₛ) ∘ v) i = 0\ni : ι\nhi : i ∈ s\na : { x // x ∈ S }\ng' : ι → R\nhg' : ∀ (i : ι), i ∈ s → ↑(algebraMap R Rₛ) (g' i) = ↑a • g i\nh0 : ↑(algebraMap A Aₛ) (∑ i in s, g' i • v i) = 0\n⊢ g i = 0\n[PROOFSTEP]\nobtain ⟨⟨_, r, hrS, rfl⟩, hr : algebraMap R A r * _ = 0⟩ :=\n  (IsLocalization.map_eq_zero_iff (Algebra.algebraMapSubmonoid A S) _ _).1 h0\n[GOAL]\ncase intro.mk.intro.intro\nR : Type u_1\nRₛ : Type u_2\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing Rₛ\ninst✝⁸ : Algebra R Rₛ\nS : Submonoid R\nhT : IsLocalization S Rₛ\nA : Type u_3\ninst✝⁷ : CommRing A\ninst✝⁶ : Algebra R A\nAₛ : Type u_4\ninst✝⁵ : CommRing Aₛ\ninst✝⁴ : Algebra A Aₛ\ninst✝³ : Algebra Rₛ Aₛ\ninst✝² : Algebra R Aₛ\ninst✝¹ : IsScalarTower R Rₛ Aₛ\ninst✝ : IsScalarTower R A Aₛ\nhA : IsLocalization (Algebra.algebraMapSubmonoid A S) Aₛ\nι : Type u_5\nv : ι → A\nhv : ∀ (s : Finset ι) (g : ι → R), ∑ i in s, g i • v i = 0 → ∀ (i : ι), i ∈ s → g i = 0\ns : Finset ι\ng : ι → Rₛ\nhg : ∑ i in s, g i • (↑(algebraMap A Aₛ) ∘ v) i = 0\ni : ι\nhi : i ∈ s\na : { x // x ∈ S }\ng' : ι → R\nhg' : ∀ (i : ι), i ∈ s → ↑(algebraMap R Rₛ) (g' i) = ↑a • g i\nh0 : ↑(algebraMap A Aₛ) (∑ i in s, g' i • v i) = 0\nr : R\nhrS : r ∈ ↑S\nhr : ↑(algebraMap R A) r * ∑ i in s, g' i • v i = 0\n⊢ g i = 0\n[PROOFSTEP]\nsimp_rw [Finset.mul_sum, ← Algebra.smul_def, smul_smul] at hr \n[GOAL]\ncase intro.mk.intro.intro\nR : Type u_1\nRₛ : Type u_2\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing Rₛ\ninst✝⁸ : Algebra R Rₛ\nS : Submonoid R\nhT : IsLocalization S Rₛ\nA : Type u_3\ninst✝⁷ : CommRing A\ninst✝⁶ : Algebra R A\nAₛ : Type u_4\ninst✝⁵ : CommRing Aₛ\ninst✝⁴ : Algebra A Aₛ\ninst✝³ : Algebra Rₛ Aₛ\ninst✝² : Algebra R Aₛ\ninst✝¹ : IsScalarTower R Rₛ Aₛ\ninst✝ : IsScalarTower R A Aₛ\nhA : IsLocalization (Algebra.algebraMapSubmonoid A S) Aₛ\nι : Type u_5\nv : ι → A\nhv : ∀ (s : Finset ι) (g : ι → R), ∑ i in s, g i • v i = 0 → ∀ (i : ι), i ∈ s → g i = 0\ns : Finset ι\ng : ι → Rₛ\nhg : ∑ i in s, g i • (↑(algebraMap A Aₛ) ∘ v) i = 0\ni : ι\nhi : i ∈ s\na : { x // x ∈ S }\ng' : ι → R\nhg' : ∀ (i : ι), i ∈ s → ↑(algebraMap R Rₛ) (g' i) = ↑a • g i\nh0 : ↑(algebraMap A Aₛ) (∑ i in s, g' i • v i) = 0\nr : R\nhrS : r ∈ ↑S\nhr : ∑ x in s, (r * g' x) • v x = 0\n⊢ g i = 0\n[PROOFSTEP]\nspecialize hv s _ hr i hi\n[GOAL]\ncase intro.mk.intro.intro\nR : Type u_1\nRₛ : Type u_2\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing Rₛ\ninst✝⁸ : Algebra R Rₛ\nS : Submonoid R\nhT : IsLocalization S Rₛ\nA : Type u_3\ninst✝⁷ : CommRing A\ninst✝⁶ : Algebra R A\nAₛ : Type u_4\ninst✝⁵ : CommRing Aₛ\ninst✝⁴ : Algebra A Aₛ\ninst✝³ : Algebra Rₛ Aₛ\ninst✝² : Algebra R Aₛ\ninst✝¹ : IsScalarTower R Rₛ Aₛ\ninst✝ : IsScalarTower R A Aₛ\nhA : IsLocalization (Algebra.algebraMapSubmonoid A S) Aₛ\nι : Type u_5\nv : ι → A\ns : Finset ι\ng : ι → Rₛ\nhg : ∑ i in s, g i • (↑(algebraMap A Aₛ) ∘ v) i = 0\ni : ι\nhi : i ∈ s\na : { x // x ∈ S }\ng' : ι → R\nhg' : ∀ (i : ι), i ∈ s → ↑(algebraMap R Rₛ) (g' i) = ↑a • g i\nh0 : ↑(algebraMap A Aₛ) (∑ i in s, g' i • v i) = 0\nr : R\nhrS : r ∈ ↑S\nhr : ∑ x in s, (r * g' x) • v x = 0\nhv : r * g' i = 0\n⊢ g i = 0\n[PROOFSTEP]\nrw [← (IsLocalization.map_units Rₛ a).mul_right_eq_zero, ← Algebra.smul_def, ← hg' i hi]\n[GOAL]\ncase intro.mk.intro.intro\nR : Type u_1\nRₛ : Type u_2\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing Rₛ\ninst✝⁸ : Algebra R Rₛ\nS : Submonoid R\nhT : IsLocalization S Rₛ\nA : Type u_3\ninst✝⁷ : CommRing A\ninst✝⁶ : Algebra R A\nAₛ : Type u_4\ninst✝⁵ : CommRing Aₛ\ninst✝⁴ : Algebra A Aₛ\ninst✝³ : Algebra Rₛ Aₛ\ninst✝² : Algebra R Aₛ\ninst✝¹ : IsScalarTower R Rₛ Aₛ\ninst✝ : IsScalarTower R A Aₛ\nhA : IsLocalization (Algebra.algebraMapSubmonoid A S) Aₛ\nι : Type u_5\nv : ι → A\ns : Finset ι\ng : ι → Rₛ\nhg : ∑ i in s, g i • (↑(algebraMap A Aₛ) ∘ v) i = 0\ni : ι\nhi : i ∈ s\na : { x // x ∈ S }\ng' : ι → R\nhg' : ∀ (i : ι), i ∈ s → ↑(algebraMap R Rₛ) (g' i) = ↑a • g i\nh0 : ↑(algebraMap A Aₛ) (∑ i in s, g' i • v i) = 0\nr : R\nhrS : r ∈ ↑S\nhr : ∑ x in s, (r * g' x) • v x = 0\nhv : r * g' i = 0\n⊢ ↑(algebraMap R Rₛ) (g' i) = 0\n[PROOFSTEP]\nexact (IsLocalization.map_eq_zero_iff S _ _).2 ⟨⟨r, hrS⟩, hv⟩\n[GOAL]\nR : Type u_1\nRₛ : Type u_2\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing Rₛ\ninst✝⁸ : Algebra R Rₛ\nS : Submonoid R\nhT : IsLocalization S Rₛ\nA : Type u_3\ninst✝⁷ : CommRing A\ninst✝⁶ : Algebra R A\nAₛ : Type u_4\ninst✝⁵ : CommRing Aₛ\ninst✝⁴ : Algebra A Aₛ\ninst✝³ : Algebra Rₛ Aₛ\ninst✝² : Algebra R Aₛ\ninst✝¹ : IsScalarTower R Rₛ Aₛ\ninst✝ : IsScalarTower R A Aₛ\nhA : IsLocalization (Algebra.algebraMapSubmonoid A S) Aₛ\nv : Set A\nhv : span R v = ⊤\n⊢ span Rₛ (↑(algebraMap A Aₛ) '' v) = ⊤\n[PROOFSTEP]\nrw [eq_top_iff]\n[GOAL]\nR : Type u_1\nRₛ : Type u_2\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing Rₛ\ninst✝⁸ : Algebra R Rₛ\nS : Submonoid R\nhT : IsLocalization S Rₛ\nA : Type u_3\ninst✝⁷ : CommRing A\ninst✝⁶ : Algebra R A\nAₛ : Type u_4\ninst✝⁵ : CommRing Aₛ\ninst✝⁴ : Algebra A Aₛ\ninst✝³ : Algebra Rₛ Aₛ\ninst✝² : Algebra R Aₛ\ninst✝¹ : IsScalarTower R Rₛ Aₛ\ninst✝ : IsScalarTower R A Aₛ\nhA : IsLocalization (Algebra.algebraMapSubmonoid A S) Aₛ\nv : Set A\nhv : span R v = ⊤\n⊢ ⊤ ≤ span Rₛ (↑(algebraMap A Aₛ) '' v)\n[PROOFSTEP]\nrintro a' -\n[GOAL]\nR : Type u_1\nRₛ : Type u_2\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing Rₛ\ninst✝⁸ : Algebra R Rₛ\nS : Submonoid R\nhT : IsLocalization S Rₛ\nA : Type u_3\ninst✝⁷ : CommRing A\ninst✝⁶ : Algebra R A\nAₛ : Type u_4\ninst✝⁵ : CommRing Aₛ\ninst✝⁴ : Algebra A Aₛ\ninst✝³ : Algebra Rₛ Aₛ\ninst✝² : Algebra R Aₛ\ninst✝¹ : IsScalarTower R Rₛ Aₛ\ninst✝ : IsScalarTower R A Aₛ\nhA : IsLocalization (Algebra.algebraMapSubmonoid A S) Aₛ\nv : Set A\nhv : span R v = ⊤\na' : Aₛ\n⊢ a' ∈ span Rₛ (↑(algebraMap A Aₛ) '' v)\n[PROOFSTEP]\nobtain ⟨a, ⟨_, s, hs, rfl⟩, rfl⟩ := IsLocalization.mk'_surjective (Algebra.algebraMapSubmonoid A S) a'\n[GOAL]\ncase intro.intro.mk.intro.intro\nR : Type u_1\nRₛ : Type u_2\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing Rₛ\ninst✝⁸ : Algebra R Rₛ\nS : Submonoid R\nhT : IsLocalization S Rₛ\nA : Type u_3\ninst✝⁷ : CommRing A\ninst✝⁶ : Algebra R A\nAₛ : Type u_4\ninst✝⁵ : CommRing Aₛ\ninst✝⁴ : Algebra A Aₛ\ninst✝³ : Algebra Rₛ Aₛ\ninst✝² : Algebra R Aₛ\ninst✝¹ : IsScalarTower R Rₛ Aₛ\ninst✝ : IsScalarTower R A Aₛ\nhA : IsLocalization (Algebra.algebraMapSubmonoid A S) Aₛ\nv : Set A\nhv : span R v = ⊤\na : A\ns : R\nhs : s ∈ ↑S\n⊢ IsLocalization.mk' Aₛ a\n      { val := ↑(algebraMap R A) s, property := (_ : ∃ a, a ∈ ↑S ∧ ↑(algebraMap R A) a = ↑(algebraMap R A) s) } ∈\n    span Rₛ (↑(algebraMap A Aₛ) '' v)\n[PROOFSTEP]\nrw [IsLocalization.mk'_eq_mul_mk'_one, mul_comm, ← map_one (algebraMap R A)]\n[GOAL]\ncase intro.intro.mk.intro.intro\nR : Type u_1\nRₛ : Type u_2\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing Rₛ\ninst✝⁸ : Algebra R Rₛ\nS : Submonoid R\nhT : IsLocalization S Rₛ\nA : Type u_3\ninst✝⁷ : CommRing A\ninst✝⁶ : Algebra R A\nAₛ : Type u_4\ninst✝⁵ : CommRing Aₛ\ninst✝⁴ : Algebra A Aₛ\ninst✝³ : Algebra Rₛ Aₛ\ninst✝² : Algebra R Aₛ\ninst✝¹ : IsScalarTower R Rₛ Aₛ\ninst✝ : IsScalarTower R A Aₛ\nhA : IsLocalization (Algebra.algebraMapSubmonoid A S) Aₛ\nv : Set A\nhv : span R v = ⊤\na : A\ns : R\nhs : s ∈ ↑S\n⊢ IsLocalization.mk' Aₛ (↑(algebraMap R A) 1)\n        { val := ↑(algebraMap R A) s, property := (_ : ∃ a, a ∈ ↑S ∧ ↑(algebraMap R A) a = ↑(algebraMap R A) s) } *\n      ↑(algebraMap A Aₛ) a ∈\n    span Rₛ (↑(algebraMap A Aₛ) '' v)\n[PROOFSTEP]\nerw [← IsLocalization.algebraMap_mk' A Rₛ Aₛ (1 : R) ⟨s, hs⟩]\n  -- `erw` needed to unify `⟨s, hs⟩`\n[GOAL]\ncase intro.intro.mk.intro.intro\nR : Type u_1\nRₛ : Type u_2\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing Rₛ\ninst✝⁸ : Algebra R Rₛ\nS : Submonoid R\nhT : IsLocalization S Rₛ\nA : Type u_3\ninst✝⁷ : CommRing A\ninst✝⁶ : Algebra R A\nAₛ : Type u_4\ninst✝⁵ : CommRing Aₛ\ninst✝⁴ : Algebra A Aₛ\ninst✝³ : Algebra Rₛ Aₛ\ninst✝² : Algebra R Aₛ\ninst✝¹ : IsScalarTower R Rₛ Aₛ\ninst✝ : IsScalarTower R A Aₛ\nhA : IsLocalization (Algebra.algebraMapSubmonoid A S) Aₛ\nv : Set A\nhv : span R v = ⊤\na : A\ns : R\nhs : s ∈ ↑S\n⊢ ↑(algebraMap Rₛ Aₛ) (IsLocalization.mk' Rₛ 1 { val := s, property := hs }) * ↑(algebraMap A Aₛ) a ∈\n    span Rₛ (↑(algebraMap A Aₛ) '' v)\n[PROOFSTEP]\nrw [← Algebra.smul_def]\n[GOAL]\ncase intro.intro.mk.intro.intro\nR : Type u_1\nRₛ : Type u_2\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing Rₛ\ninst✝⁸ : Algebra R Rₛ\nS : Submonoid R\nhT : IsLocalization S Rₛ\nA : Type u_3\ninst✝⁷ : CommRing A\ninst✝⁶ : Algebra R A\nAₛ : Type u_4\ninst✝⁵ : CommRing Aₛ\ninst✝⁴ : Algebra A Aₛ\ninst✝³ : Algebra Rₛ Aₛ\ninst✝² : Algebra R Aₛ\ninst✝¹ : IsScalarTower R Rₛ Aₛ\ninst✝ : IsScalarTower R A Aₛ\nhA : IsLocalization (Algebra.algebraMapSubmonoid A S) Aₛ\nv : Set A\nhv : span R v = ⊤\na : A\ns : R\nhs : s ∈ ↑S\n⊢ IsLocalization.mk' Rₛ 1 { val := s, property := hs } • ↑(algebraMap A Aₛ) a ∈ span Rₛ (↑(algebraMap A Aₛ) '' v)\n[PROOFSTEP]\nrefine' smul_mem _ _ (span_subset_span R Rₛ _ _)\n[GOAL]\ncase intro.intro.mk.intro.intro\nR : Type u_1\nRₛ : Type u_2\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing Rₛ\ninst✝⁸ : Algebra R Rₛ\nS : Submonoid R\nhT : IsLocalization S Rₛ\nA : Type u_3\ninst✝⁷ : CommRing A\ninst✝⁶ : Algebra R A\nAₛ : Type u_4\ninst✝⁵ : CommRing Aₛ\ninst✝⁴ : Algebra A Aₛ\ninst✝³ : Algebra Rₛ Aₛ\ninst✝² : Algebra R Aₛ\ninst✝¹ : IsScalarTower R Rₛ Aₛ\ninst✝ : IsScalarTower R A Aₛ\nhA : IsLocalization (Algebra.algebraMapSubmonoid A S) Aₛ\nv : Set A\nhv : span R v = ⊤\na : A\ns : R\nhs : s ∈ ↑S\n⊢ ↑(algebraMap A Aₛ) a ∈ ↑(span R (↑(algebraMap A Aₛ) '' v))\n[PROOFSTEP]\nrw [← Algebra.coe_linearMap, ← LinearMap.coe_restrictScalars R, ← LinearMap.map_span]\n[GOAL]\ncase intro.intro.mk.intro.intro\nR : Type u_1\nRₛ : Type u_2\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing Rₛ\ninst✝⁸ : Algebra R Rₛ\nS : Submonoid R\nhT : IsLocalization S Rₛ\nA : Type u_3\ninst✝⁷ : CommRing A\ninst✝⁶ : Algebra R A\nAₛ : Type u_4\ninst✝⁵ : CommRing Aₛ\ninst✝⁴ : Algebra A Aₛ\ninst✝³ : Algebra Rₛ Aₛ\ninst✝² : Algebra R Aₛ\ninst✝¹ : IsScalarTower R Rₛ Aₛ\ninst✝ : IsScalarTower R A Aₛ\nhA : IsLocalization (Algebra.algebraMapSubmonoid A S) Aₛ\nv : Set A\nhv : span R v = ⊤\na : A\ns : R\nhs : s ∈ ↑S\n⊢ ↑(↑R (Algebra.linearMap A Aₛ)) a ∈ ↑(map (↑R (Algebra.linearMap A Aₛ)) (span R v))\n[PROOFSTEP]\nexact mem_map_of_mem (hv.symm ▸ mem_top)\n[GOAL]\nR : Type u_1\nRₛ : Type u_2\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing Rₛ\ninst✝⁸ : Algebra R Rₛ\nS : Submonoid R\nhT : IsLocalization S Rₛ\nA : Type u_3\ninst✝⁷ : CommRing A\ninst✝⁶ : Algebra R A\nAₛ : Type u_4\ninst✝⁵ : CommRing Aₛ\ninst✝⁴ : Algebra A Aₛ\ninst✝³ : Algebra Rₛ Aₛ\ninst✝² : Algebra R Aₛ\ninst✝¹ : IsScalarTower R Rₛ Aₛ\ninst✝ : IsScalarTower R A Aₛ\nhA : IsLocalization (Algebra.algebraMapSubmonoid A S) Aₛ\nι : Type u_5\nb : Basis ι R A\n⊢ ⊤ ≤ span Rₛ (Set.range (↑(algebraMap A Aₛ) ∘ ↑b))\n[PROOFSTEP]\nrw [Set.range_comp, SpanEqTop.localization_localization Rₛ S Aₛ b.span_eq]\n[GOAL]\nR : Type u_1\nRₛ : Type u_2\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing Rₛ\ninst✝⁸ : Algebra R Rₛ\nS : Submonoid R\nhT : IsLocalization S Rₛ\nA : Type u_3\ninst✝⁷ : CommRing A\ninst✝⁶ : Algebra R A\nAₛ : Type u_4\ninst✝⁵ : CommRing Aₛ\ninst✝⁴ : Algebra A Aₛ\ninst✝³ : Algebra Rₛ Aₛ\ninst✝² : Algebra R Aₛ\ninst✝¹ : IsScalarTower R Rₛ Aₛ\ninst✝ : IsScalarTower R A Aₛ\nhA : IsLocalization (Algebra.algebraMapSubmonoid A S) Aₛ\nι : Type u_5\nb : Basis ι R A\nx : A\ni : ι\n⊢ ↑(↑(localizationLocalization Rₛ S Aₛ b).repr (↑(algebraMap A Aₛ) x)) i =\n    ↑(↑(localizationLocalization Rₛ S Aₛ b).repr\n          (Finsupp.sum (↑b.repr x) fun j c => ↑(algebraMap R Rₛ) c • ↑(algebraMap A Aₛ) (↑b j)))\n      i\n[PROOFSTEP]\nsimp_rw [IsScalarTower.algebraMap_smul, Algebra.smul_def, IsScalarTower.algebraMap_apply R A Aₛ, ← _root_.map_mul, ←\n  map_finsupp_sum, ← Algebra.smul_def, ← Finsupp.total_apply, Basis.total_repr]\n[GOAL]\nR : Type u_1\nRₛ : Type u_2\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing Rₛ\ninst✝⁸ : Algebra R Rₛ\nS : Submonoid R\nhT : IsLocalization S Rₛ\nA : Type u_3\ninst✝⁷ : CommRing A\ninst✝⁶ : Algebra R A\nAₛ : Type u_4\ninst✝⁵ : CommRing Aₛ\ninst✝⁴ : Algebra A Aₛ\ninst✝³ : Algebra Rₛ Aₛ\ninst✝² : Algebra R Aₛ\ninst✝¹ : IsScalarTower R Rₛ Aₛ\ninst✝ : IsScalarTower R A Aₛ\nhA : IsLocalization (Algebra.algebraMapSubmonoid A S) Aₛ\nι : Type u_5\nb : Basis ι R A\nx : A\ni : ι\n⊢ ↑(↑(localizationLocalization Rₛ S Aₛ b).repr\n          (Finsupp.sum (↑b.repr x) fun j c => ↑(algebraMap R Rₛ) c • ↑(algebraMap A Aₛ) (↑b j)))\n      i =\n    Finsupp.sum (↑b.repr x) fun j c => ↑(algebraMap R Rₛ) c • ↑(Finsupp.single j 1) i\n[PROOFSTEP]\nsimp_rw [← b.localizationLocalization_apply Rₛ S Aₛ, map_finsupp_sum, LinearEquiv.map_smul, Basis.repr_self,\n  Finsupp.sum_apply, Finsupp.smul_apply]\n[GOAL]\nR : Type u_1\nRₛ : Type u_2\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing Rₛ\ninst✝⁸ : Algebra R Rₛ\nS : Submonoid R\nhT : IsLocalization S Rₛ\nA : Type u_3\ninst✝⁷ : CommRing A\ninst✝⁶ : Algebra R A\nAₛ : Type u_4\ninst✝⁵ : CommRing Aₛ\ninst✝⁴ : Algebra A Aₛ\ninst✝³ : Algebra Rₛ Aₛ\ninst✝² : Algebra R Aₛ\ninst✝¹ : IsScalarTower R Rₛ Aₛ\ninst✝ : IsScalarTower R A Aₛ\nhA : IsLocalization (Algebra.algebraMapSubmonoid A S) Aₛ\nι : Type u_5\nb : Basis ι R A\nx : A\ni j : ι\nx✝ : j ∈ (↑b.repr x).support\nhj : j ≠ i\n⊢ (fun j c => ↑(algebraMap R Rₛ) c • ↑(Finsupp.single j 1) i) j (↑(↑b.repr x) j) = 0\n[PROOFSTEP]\nsimp [hj]\n[GOAL]\nR : Type u_1\nRₛ : Type u_2\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing Rₛ\ninst✝⁸ : Algebra R Rₛ\nS : Submonoid R\nhT : IsLocalization S Rₛ\nA : Type u_3\ninst✝⁷ : CommRing A\ninst✝⁶ : Algebra R A\nAₛ : Type u_4\ninst✝⁵ : CommRing Aₛ\ninst✝⁴ : Algebra A Aₛ\ninst✝³ : Algebra Rₛ Aₛ\ninst✝² : Algebra R Aₛ\ninst✝¹ : IsScalarTower R Rₛ Aₛ\ninst✝ : IsScalarTower R A Aₛ\nhA : IsLocalization (Algebra.algebraMapSubmonoid A S) Aₛ\nι : Type u_5\nb : Basis ι R A\nx : A\ni : ι\nhi : ¬i ∈ (↑b.repr x).support\n⊢ (fun j c => ↑(algebraMap R Rₛ) c • ↑(Finsupp.single j 1) i) i (↑(↑b.repr x) i) = 0\n[PROOFSTEP]\nsimp [Finsupp.not_mem_support_iff.mp hi]\n[GOAL]\nR : Type u_1\nRₛ : Type u_2\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing Rₛ\ninst✝⁸ : Algebra R Rₛ\nS : Submonoid R\nhT : IsLocalization S Rₛ\nA : Type u_3\ninst✝⁷ : CommRing A\ninst✝⁶ : Algebra R A\nAₛ : Type u_4\ninst✝⁵ : CommRing Aₛ\ninst✝⁴ : Algebra A Aₛ\ninst✝³ : Algebra Rₛ Aₛ\ninst✝² : Algebra R Aₛ\ninst✝¹ : IsScalarTower R Rₛ Aₛ\ninst✝ : IsScalarTower R A Aₛ\nhA : IsLocalization (Algebra.algebraMapSubmonoid A S) Aₛ\nι : Type u_5\nb : Basis ι R A\nx : A\ni : ι\n⊢ (fun j c => ↑(algebraMap R Rₛ) c • ↑(Finsupp.single j 1) i) i (↑(↑b.repr x) i) = ↑(algebraMap R Rₛ) (↑(↑b.repr x) i)\n[PROOFSTEP]\nsimp [Algebra.smul_def]\n[GOAL]\nR : Type u_1\nRₛ : Type u_2\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing Rₛ\ninst✝⁸ : Algebra R Rₛ\nS : Submonoid R\nhT : IsLocalization S Rₛ\nA : Type u_3\ninst✝⁷ : CommRing A\ninst✝⁶ : Algebra R A\nAₛ : Type u_4\ninst✝⁵ : CommRing Aₛ\ninst✝⁴ : Algebra A Aₛ\ninst✝³ : Algebra Rₛ Aₛ\ninst✝² : Algebra R Aₛ\ninst✝¹ : IsScalarTower R Rₛ Aₛ\ninst✝ : IsScalarTower R A Aₛ\nhA : IsLocalization (Algebra.algebraMapSubmonoid A S) Aₛ\nι : Type u_5\nb : Basis ι R A\n⊢ span R (Set.range ↑(localizationLocalization Rₛ S Aₛ b)) = span R (↑(IsScalarTower.toAlgHom R A Aₛ) '' Set.range ↑b)\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_s\nR : Type u_1\nRₛ : Type u_2\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing Rₛ\ninst✝⁸ : Algebra R Rₛ\nS : Submonoid R\nhT : IsLocalization S Rₛ\nA : Type u_3\ninst✝⁷ : CommRing A\ninst✝⁶ : Algebra R A\nAₛ : Type u_4\ninst✝⁵ : CommRing Aₛ\ninst✝⁴ : Algebra A Aₛ\ninst✝³ : Algebra Rₛ Aₛ\ninst✝² : Algebra R Aₛ\ninst✝¹ : IsScalarTower R Rₛ Aₛ\ninst✝ : IsScalarTower R A Aₛ\nhA : IsLocalization (Algebra.algebraMapSubmonoid A S) Aₛ\nι : Type u_5\nb : Basis ι R A\n⊢ Set.range ↑(localizationLocalization Rₛ S Aₛ b) = ↑(IsScalarTower.toAlgHom R A Aₛ) '' Set.range ↑b\n[PROOFSTEP]\next\n[GOAL]\ncase e_s.h\nR : Type u_1\nRₛ : Type u_2\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing Rₛ\ninst✝⁸ : Algebra R Rₛ\nS : Submonoid R\nhT : IsLocalization S Rₛ\nA : Type u_3\ninst✝⁷ : CommRing A\ninst✝⁶ : Algebra R A\nAₛ : Type u_4\ninst✝⁵ : CommRing Aₛ\ninst✝⁴ : Algebra A Aₛ\ninst✝³ : Algebra Rₛ Aₛ\ninst✝² : Algebra R Aₛ\ninst✝¹ : IsScalarTower R Rₛ Aₛ\ninst✝ : IsScalarTower R A Aₛ\nhA : IsLocalization (Algebra.algebraMapSubmonoid A S) Aₛ\nι : Type u_5\nb : Basis ι R A\nx✝ : Aₛ\n⊢ x✝ ∈ Set.range ↑(localizationLocalization Rₛ S Aₛ b) ↔ x✝ ∈ ↑(IsScalarTower.toAlgHom R A Aₛ) '' Set.range ↑b\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\nRₛ : Type u_2\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing Rₛ\ninst✝⁸ : Algebra R Rₛ\nS : Submonoid R\nhT : IsLocalization S Rₛ\nA : Type u_3\ninst✝⁷ : CommRing A\ninst✝⁶ : Algebra R A\nAₛ : Type u_4\ninst✝⁵ : CommRing Aₛ\ninst✝⁴ : Algebra A Aₛ\ninst✝³ : Algebra Rₛ Aₛ\ninst✝² : Algebra R Aₛ\ninst✝¹ : IsScalarTower R Rₛ Aₛ\ninst✝ : IsScalarTower R A Aₛ\nhA : IsLocalization (Algebra.algebraMapSubmonoid A S) Aₛ\nι : Type u_5\nb : Basis ι R A\n⊢ span R (↑(IsScalarTower.toAlgHom R A Aₛ) '' Set.range ↑b) =\n    map (IsScalarTower.toAlgHom R A Aₛ) (span R (Set.range ↑b))\n[PROOFSTEP]\nrw [Submodule.map_span]\n[GOAL]\nR : Type u_1\nRₛ : Type u_2\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing Rₛ\ninst✝⁸ : Algebra R Rₛ\nS : Submonoid R\nhT : IsLocalization S Rₛ\nA : Type u_3\ninst✝⁷ : CommRing A\ninst✝⁶ : Algebra R A\nAₛ : Type u_4\ninst✝⁵ : CommRing Aₛ\ninst✝⁴ : Algebra A Aₛ\ninst✝³ : Algebra Rₛ Aₛ\ninst✝² : Algebra R Aₛ\ninst✝¹ : IsScalarTower R Rₛ Aₛ\ninst✝ : IsScalarTower R A Aₛ\nhA : IsLocalization (Algebra.algebraMapSubmonoid A S) Aₛ\nι : Type u_5\nb : Basis ι R A\n⊢ map (IsScalarTower.toAlgHom R A Aₛ) (span R (Set.range ↑b)) = LinearMap.range (IsScalarTower.toAlgHom R A Aₛ)\n[PROOFSTEP]\nrw [b.span_eq, Submodule.map_top]\n[GOAL]\nR : Type u_1\ninst✝¹¹ : CommRing R\nS : Submonoid R\nA : Type u_2\ninst✝¹⁰ : CommRing A\ninst✝⁹ : Algebra R A\ninst✝⁸ : IsLocalization S A\nM : Type u_3\nN : Type u_4\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : Module A M\ninst✝⁴ : IsScalarTower R A M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : Module A N\ninst✝ : IsScalarTower R A N\nf : M →ₗ[R] N\n⊢ ∀ (r : A) (x : M),\n    AddHom.toFun { toFun := ↑f, map_add' := (_ : ∀ (x y : M), ↑f (x + y) = ↑f x + ↑f y) } (r • x) =\n      ↑(RingHom.id A) r • AddHom.toFun { toFun := ↑f, map_add' := (_ : ∀ (x y : M), ↑f (x + y) = ↑f x + ↑f y) } x\n[PROOFSTEP]\nintro r m\n[GOAL]\nR : Type u_1\ninst✝¹¹ : CommRing R\nS : Submonoid R\nA : Type u_2\ninst✝¹⁰ : CommRing A\ninst✝⁹ : Algebra R A\ninst✝⁸ : IsLocalization S A\nM : Type u_3\nN : Type u_4\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : Module A M\ninst✝⁴ : IsScalarTower R A M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : Module A N\ninst✝ : IsScalarTower R A N\nf : M →ₗ[R] N\nr : A\nm : M\n⊢ AddHom.toFun { toFun := ↑f, map_add' := (_ : ∀ (x y : M), ↑f (x + y) = ↑f x + ↑f y) } (r • m) =\n    ↑(RingHom.id A) r • AddHom.toFun { toFun := ↑f, map_add' := (_ : ∀ (x y : M), ↑f (x + y) = ↑f x + ↑f y) } m\n[PROOFSTEP]\nsimp only [RingHom.id_apply]\n[GOAL]\nR : Type u_1\ninst✝¹¹ : CommRing R\nS : Submonoid R\nA : Type u_2\ninst✝¹⁰ : CommRing A\ninst✝⁹ : Algebra R A\ninst✝⁸ : IsLocalization S A\nM : Type u_3\nN : Type u_4\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : Module A M\ninst✝⁴ : IsScalarTower R A M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : Module A N\ninst✝ : IsScalarTower R A N\nf : M →ₗ[R] N\nr : A\nm : M\n⊢ ↑f (r • m) = r • ↑f m\n[PROOFSTEP]\nrcases mk'_surjective S r with ⟨r, s, rfl⟩\n[GOAL]\ncase intro.intro\nR : Type u_1\ninst✝¹¹ : CommRing R\nS : Submonoid R\nA : Type u_2\ninst✝¹⁰ : CommRing A\ninst✝⁹ : Algebra R A\ninst✝⁸ : IsLocalization S A\nM : Type u_3\nN : Type u_4\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : Module A M\ninst✝⁴ : IsScalarTower R A M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : Module A N\ninst✝ : IsScalarTower R A N\nf : M →ₗ[R] N\nm : M\nr : R\ns : { x // x ∈ S }\n⊢ ↑f (mk' A r s • m) = mk' A r s • ↑f m\n[PROOFSTEP]\ncalc\n  f (mk' A r s • m) = ((s : R) • mk' A 1 s) • f (mk' A r s • m) := by simp\n  _ = (mk' A 1 s) • (s : R) • f (mk' A r s • m) := by rw [smul_comm, smul_assoc]\n  _ = (mk' A 1 s) • f ((s : R) • mk' A r s • m) := by simp\n  _ = (mk' A 1 s) • f (r • m) := by rw [← smul_assoc, smul_mk'_self, algebraMap_smul]\n  _ = (mk' A 1 s) • r • f m := by simp\n  _ = mk' A r s • f m := by rw [smul_comm, ← smul_assoc, smul_mk'_one]\n[GOAL]\nR : Type u_1\ninst✝¹¹ : CommRing R\nS : Submonoid R\nA : Type u_2\ninst✝¹⁰ : CommRing A\ninst✝⁹ : Algebra R A\ninst✝⁸ : IsLocalization S A\nM : Type u_3\nN : Type u_4\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : Module A M\ninst✝⁴ : IsScalarTower R A M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : Module A N\ninst✝ : IsScalarTower R A N\nf : M →ₗ[R] N\nm : M\nr : R\ns : { x // x ∈ S }\n⊢ ↑f (mk' A r s • m) = (↑s • mk' A 1 s) • ↑f (mk' A r s • m)\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\ninst✝¹¹ : CommRing R\nS : Submonoid R\nA : Type u_2\ninst✝¹⁰ : CommRing A\ninst✝⁹ : Algebra R A\ninst✝⁸ : IsLocalization S A\nM : Type u_3\nN : Type u_4\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : Module A M\ninst✝⁴ : IsScalarTower R A M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : Module A N\ninst✝ : IsScalarTower R A N\nf : M →ₗ[R] N\nm : M\nr : R\ns : { x // x ∈ S }\n⊢ (↑s • mk' A 1 s) • ↑f (mk' A r s • m) = mk' A 1 s • ↑s • ↑f (mk' A r s • m)\n[PROOFSTEP]\nrw [smul_comm, smul_assoc]\n[GOAL]\nR : Type u_1\ninst✝¹¹ : CommRing R\nS : Submonoid R\nA : Type u_2\ninst✝¹⁰ : CommRing A\ninst✝⁹ : Algebra R A\ninst✝⁸ : IsLocalization S A\nM : Type u_3\nN : Type u_4\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : Module A M\ninst✝⁴ : IsScalarTower R A M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : Module A N\ninst✝ : IsScalarTower R A N\nf : M →ₗ[R] N\nm : M\nr : R\ns : { x // x ∈ S }\n⊢ mk' A 1 s • ↑s • ↑f (mk' A r s • m) = mk' A 1 s • ↑f (↑s • mk' A r s • m)\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\ninst✝¹¹ : CommRing R\nS : Submonoid R\nA : Type u_2\ninst✝¹⁰ : CommRing A\ninst✝⁹ : Algebra R A\ninst✝⁸ : IsLocalization S A\nM : Type u_3\nN : Type u_4\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : Module A M\ninst✝⁴ : IsScalarTower R A M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : Module A N\ninst✝ : IsScalarTower R A N\nf : M →ₗ[R] N\nm : M\nr : R\ns : { x // x ∈ S }\n⊢ mk' A 1 s • ↑f (↑s • mk' A r s • m) = mk' A 1 s • ↑f (r • m)\n[PROOFSTEP]\nrw [← smul_assoc, smul_mk'_self, algebraMap_smul]\n[GOAL]\nR : Type u_1\ninst✝¹¹ : CommRing R\nS : Submonoid R\nA : Type u_2\ninst✝¹⁰ : CommRing A\ninst✝⁹ : Algebra R A\ninst✝⁸ : IsLocalization S A\nM : Type u_3\nN : Type u_4\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : Module A M\ninst✝⁴ : IsScalarTower R A M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : Module A N\ninst✝ : IsScalarTower R A N\nf : M →ₗ[R] N\nm : M\nr : R\ns : { x // x ∈ S }\n⊢ mk' A 1 s • ↑f (r • m) = mk' A 1 s • r • ↑f m\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\ninst✝¹¹ : CommRing R\nS : Submonoid R\nA : Type u_2\ninst✝¹⁰ : CommRing A\ninst✝⁹ : Algebra R A\ninst✝⁸ : IsLocalization S A\nM : Type u_3\nN : Type u_4\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : Module A M\ninst✝⁴ : IsScalarTower R A M\ninst✝³ : AddCommMonoid N\ninst✝² : Module R N\ninst✝¹ : Module A N\ninst✝ : IsScalarTower R A N\nf : M →ₗ[R] N\nm : M\nr : R\ns : { x // x ∈ S }\n⊢ mk' A 1 s • r • ↑f m = mk' A r s • ↑f m\n[PROOFSTEP]\nrw [smul_comm, ← smul_assoc, smul_mk'_one]\n", "meta": {"mathlib_filename": "Mathlib.RingTheory.Localization.Module", "llama_tokens": 20168, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8104789178257653, "lm_q2_score": 0.6619228825191872, "lm_q1q2_score": 0.536474541508262}}
{"text": "[GOAL]\nα : Type u\nβ : Type u_1\nw x✝ y✝ z : α\ninst✝ : GeneralizedBooleanAlgebra α\nx y : α\n⊢ x \\ y ⊔ x ⊓ y = x\n[PROOFSTEP]\nrw [sup_comm, sup_inf_sdiff]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x✝ y✝ z : α\ninst✝ : GeneralizedBooleanAlgebra α\nx y : α\n⊢ x \\ y ⊓ (x ⊓ y) = ⊥\n[PROOFSTEP]\nrw [inf_comm, inf_inf_sdiff]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\nsrc✝ : Bot α := toBot\na : α\n⊢ ⊥ ≤ a\n[PROOFSTEP]\nrw [← inf_inf_sdiff a a, inf_assoc]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\nsrc✝ : Bot α := toBot\na : α\n⊢ a ⊓ (a ⊓ a \\ a) ≤ a\n[PROOFSTEP]\nexact inf_le_left\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\ns : x ⊓ y ⊔ z = x\ni : x ⊓ y ⊓ z = ⊥\n⊢ x \\ y = z\n[PROOFSTEP]\nconv_rhs at s => rw [← sup_inf_sdiff x y, sup_comm]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\ns : x ⊓ y ⊔ z = x\ni : x ⊓ y ⊓ z = ⊥\n| x\n[PROOFSTEP]\nrw [← sup_inf_sdiff x y, sup_comm]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\ns : x ⊓ y ⊔ z = x\ni : x ⊓ y ⊓ z = ⊥\n| x\n[PROOFSTEP]\nrw [← sup_inf_sdiff x y, sup_comm]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\ns : x ⊓ y ⊔ z = x\ni : x ⊓ y ⊓ z = ⊥\n| x\n[PROOFSTEP]\nrw [← sup_inf_sdiff x y, sup_comm]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\ns : x ⊓ y ⊔ z = x \\ y ⊔ x ⊓ y\ni : x ⊓ y ⊓ z = ⊥\n⊢ x \\ y = z\n[PROOFSTEP]\nrw [sup_comm] at s \n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\ns : z ⊔ x ⊓ y = x \\ y ⊔ x ⊓ y\ni : x ⊓ y ⊓ z = ⊥\n⊢ x \\ y = z\n[PROOFSTEP]\nconv_rhs at i => rw [← inf_inf_sdiff x y, inf_comm]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\ns : z ⊔ x ⊓ y = x \\ y ⊔ x ⊓ y\ni : x ⊓ y ⊓ z = ⊥\n| ⊥\n[PROOFSTEP]\nrw [← inf_inf_sdiff x y, inf_comm]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\ns : z ⊔ x ⊓ y = x \\ y ⊔ x ⊓ y\ni : x ⊓ y ⊓ z = ⊥\n| ⊥\n[PROOFSTEP]\nrw [← inf_inf_sdiff x y, inf_comm]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\ns : z ⊔ x ⊓ y = x \\ y ⊔ x ⊓ y\ni : x ⊓ y ⊓ z = ⊥\n| ⊥\n[PROOFSTEP]\nrw [← inf_inf_sdiff x y, inf_comm]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\ns : z ⊔ x ⊓ y = x \\ y ⊔ x ⊓ y\ni : x ⊓ y ⊓ z = x \\ y ⊓ (x ⊓ y)\n⊢ x \\ y = z\n[PROOFSTEP]\nrw [inf_comm] at i \n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\ns : z ⊔ x ⊓ y = x \\ y ⊔ x ⊓ y\ni : z ⊓ (x ⊓ y) = x \\ y ⊓ (x ⊓ y)\n⊢ x \\ y = z\n[PROOFSTEP]\nexact (eq_of_inf_eq_sup_eq i s).symm\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\n⊢ y \\ x ⊔ x = y \\ x ⊔ (x ⊔ x ⊓ y)\n[PROOFSTEP]\nrw [sup_inf_self]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\n⊢ y \\ x ⊔ (x ⊔ x ⊓ y) = y ⊓ x ⊔ y \\ x ⊔ x\n[PROOFSTEP]\nac_rfl\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\n⊢ y ⊓ x ⊔ y \\ x ⊔ x = y ⊔ x\n[PROOFSTEP]\nrw [sup_inf_sdiff]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\n⊢ ⊥ = x ⊓ y ⊓ x \\ y\n[PROOFSTEP]\nrw [inf_inf_sdiff]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\n⊢ x ⊓ y ⊓ x \\ y = x ⊓ (y ⊓ x ⊔ y \\ x) ⊓ x \\ y\n[PROOFSTEP]\nrw [sup_inf_sdiff]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\n⊢ x ⊓ (y ⊓ x ⊔ y \\ x) ⊓ x \\ y = (x ⊓ (y ⊓ x) ⊔ x ⊓ y \\ x) ⊓ x \\ y\n[PROOFSTEP]\nrw [inf_sup_left]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\n⊢ (x ⊓ (y ⊓ x) ⊔ x ⊓ y \\ x) ⊓ x \\ y = (y ⊓ (x ⊓ x) ⊔ x ⊓ y \\ x) ⊓ x \\ y\n[PROOFSTEP]\nac_rfl\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\n⊢ (y ⊓ (x ⊓ x) ⊔ x ⊓ y \\ x) ⊓ x \\ y = (y ⊓ x ⊔ x ⊓ y \\ x) ⊓ x \\ y\n[PROOFSTEP]\nrw [inf_idem]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\n⊢ (y ⊓ x ⊔ x ⊓ y \\ x) ⊓ x \\ y = x ⊓ y ⊓ x \\ y ⊔ x ⊓ y \\ x ⊓ x \\ y\n[PROOFSTEP]\nrw [inf_sup_right, @inf_comm _ _ x y]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\n⊢ x ⊓ y ⊓ x \\ y ⊔ x ⊓ y \\ x ⊓ x \\ y = x ⊓ y \\ x ⊓ x \\ y\n[PROOFSTEP]\nrw [inf_inf_sdiff, bot_sup_eq]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\n⊢ x ⊓ y \\ x ⊓ x \\ y = x ⊓ x \\ y ⊓ y \\ x\n[PROOFSTEP]\nac_rfl\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\n⊢ x ⊓ x \\ y ⊓ y \\ x = x \\ y ⊓ y \\ x\n[PROOFSTEP]\nrw [inf_of_le_right sdiff_le']\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\n⊢ x ⊓ y \\ x = (x ⊓ y ⊔ x \\ y) ⊓ y \\ x\n[PROOFSTEP]\nrw [sup_inf_sdiff]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\n⊢ (x ⊓ y ⊔ x \\ y) ⊓ y \\ x = x ⊓ y ⊓ y \\ x ⊔ x \\ y ⊓ y \\ x\n[PROOFSTEP]\nrw [inf_sup_right]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\n⊢ x ⊓ y ⊓ y \\ x ⊔ x \\ y ⊓ y \\ x = ⊥\n[PROOFSTEP]\nrw [@inf_comm _ _ x y, inf_inf_sdiff, sdiff_inf_sdiff, bot_sup_eq]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\n⊢ y \\ x ⊓ x = ⊥\n[PROOFSTEP]\nrw [inf_comm, inf_sdiff_self_right]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x✝ y✝ z✝ : α\ninst✝ : GeneralizedBooleanAlgebra α\nsrc✝¹ : GeneralizedBooleanAlgebra α := inst✝\nsrc✝ : OrderBot α := toOrderBot\ny x z : α\nh : y \\ x ≤ z\n⊢ y \\ x = x ⊓ y \\ x ⊔ z ⊓ y \\ x\n[PROOFSTEP]\nrw [inf_eq_right.2 h, inf_sdiff_self_right, bot_sup_eq]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x✝ y✝ z✝ : α\ninst✝ : GeneralizedBooleanAlgebra α\nsrc✝¹ : GeneralizedBooleanAlgebra α := inst✝\nsrc✝ : OrderBot α := toOrderBot\ny x z : α\nh : y \\ x ≤ z\n⊢ y ⊔ (x ⊔ z) = y \\ x ⊔ x ⊔ z\n[PROOFSTEP]\nrw [← sup_assoc, ← @sdiff_sup_self' _ x y]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x✝ y✝ z✝ : α\ninst✝ : GeneralizedBooleanAlgebra α\nsrc✝¹ : GeneralizedBooleanAlgebra α := inst✝\nsrc✝ : OrderBot α := toOrderBot\ny x z : α\nh : y \\ x ≤ z\n⊢ y \\ x ⊔ x ⊔ z = x ⊔ z ⊔ y \\ x\n[PROOFSTEP]\nac_rfl\n[GOAL]\nα : Type u\nβ : Type u_1\nw x✝ y✝ z✝ : α\ninst✝ : GeneralizedBooleanAlgebra α\nsrc✝¹ : GeneralizedBooleanAlgebra α := inst✝\nsrc✝ : OrderBot α := toOrderBot\ny x z : α\nh : y ≤ x ⊔ z\n⊢ x ⊔ z ⊔ x ≤ z ⊔ x\n[PROOFSTEP]\nrw [sup_assoc, sup_comm, sup_assoc, sup_idem]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\nh : x ≤ y ∧ Disjoint x z\n⊢ x ≤ y \\ z\n[PROOFSTEP]\nrw [← h.2.sdiff_eq_left]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\nh : x ≤ y ∧ Disjoint x z\n⊢ x \\ z ≤ y \\ z\n[PROOFSTEP]\nexact sdiff_le_sdiff_right h.1\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\nhi : Disjoint x z\nhs : x ⊔ z = y\nh : y ⊓ x = x\n⊢ y ⊓ x ⊔ z = y\n[PROOFSTEP]\nrw [h, hs]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\nhi : Disjoint x z\nhs : x ⊔ z = y\nh : y ⊓ x = x\n⊢ y ⊓ x ⊓ z = ⊥\n[PROOFSTEP]\nrw [h, hi.eq_bot]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\nhd : Disjoint x z\nhz : z ≤ y\nhs : y ≤ x ⊔ z\n⊢ y ⊓ x ⊔ z = y\n[PROOFSTEP]\nrw [← inf_eq_right] at hs \n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\nhd : Disjoint x z\nhz : z ≤ y\nhs : (x ⊔ z) ⊓ y = y\n⊢ y ⊓ x ⊔ z = y\n[PROOFSTEP]\nrwa [sup_inf_right, inf_sup_right, @sup_comm _ _ x, inf_sup_self, inf_comm, @sup_comm _ _ z, hs, sup_eq_left]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\nhd : Disjoint x z\nhz : z ≤ y\nhs : y ≤ x ⊔ z\n⊢ y ⊓ x ⊓ z = ⊥\n[PROOFSTEP]\nrw [inf_assoc, hd.eq_bot, inf_bot_eq]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\nhz : z ≤ y\nhx : x ≤ y\nH : Disjoint z (y \\ x)\n⊢ z ⊔ y \\ x ≤ x ⊔ y \\ x\n[PROOFSTEP]\nrw [sup_sdiff_cancel_right hx]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\nhz : z ≤ y\nhx : x ≤ y\nH : Disjoint z (y \\ x)\n⊢ z ⊔ y \\ x ≤ y\n[PROOFSTEP]\nrefine' le_trans (sup_le_sup_left sdiff_le z) _\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\nhz : z ≤ y\nhx : x ≤ y\nH : Disjoint z (y \\ x)\n⊢ z ⊔ y ≤ y\n[PROOFSTEP]\nrw [sup_eq_right.2 hz]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\nhz : z ≤ y\nhx : x ≤ y\n⊢ z ⊓ y \\ x = ⊥ ↔ z ≤ x\n[PROOFSTEP]\nrw [← disjoint_iff]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\nhz : z ≤ y\nhx : x ≤ y\n⊢ Disjoint z (y \\ x) ↔ z ≤ x\n[PROOFSTEP]\nexact disjoint_sdiff_iff_le hz hx\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\nhz : z ≤ y\nhx : x ≤ y\nH : x ≤ z\n⊢ y = z ⊔ y \\ x\n[PROOFSTEP]\napply le_antisymm\n[GOAL]\ncase a\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\nhz : z ≤ y\nhx : x ≤ y\nH : x ≤ z\n⊢ y ≤ z ⊔ y \\ x\n[PROOFSTEP]\nconv_lhs => rw [← sup_inf_sdiff y x]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\nhz : z ≤ y\nhx : x ≤ y\nH : x ≤ z\n| y\n[PROOFSTEP]\nrw [← sup_inf_sdiff y x]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\nhz : z ≤ y\nhx : x ≤ y\nH : x ≤ z\n| y\n[PROOFSTEP]\nrw [← sup_inf_sdiff y x]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\nhz : z ≤ y\nhx : x ≤ y\nH : x ≤ z\n| y\n[PROOFSTEP]\nrw [← sup_inf_sdiff y x]\n[GOAL]\ncase a\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\nhz : z ≤ y\nhx : x ≤ y\nH : x ≤ z\n⊢ y ⊓ x ⊔ y \\ x ≤ z ⊔ y \\ x\n[PROOFSTEP]\napply sup_le_sup_right\n[GOAL]\ncase a.h₁\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\nhz : z ≤ y\nhx : x ≤ y\nH : x ≤ z\n⊢ y ⊓ x ≤ z\n[PROOFSTEP]\nrwa [inf_eq_right.2 hx]\n[GOAL]\ncase a\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\nhz : z ≤ y\nhx : x ≤ y\nH : x ≤ z\n⊢ z ⊔ y \\ x ≤ y\n[PROOFSTEP]\napply le_trans\n[GOAL]\ncase a.a\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\nhz : z ≤ y\nhx : x ≤ y\nH : x ≤ z\n⊢ z ⊔ y \\ x ≤ ?a.b✝\n[PROOFSTEP]\napply sup_le_sup_right hz\n[GOAL]\ncase a.a\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\nhz : z ≤ y\nhx : x ≤ y\nH : x ≤ z\n⊢ y ⊔ y \\ x ≤ y\n[PROOFSTEP]\nrw [sup_sdiff_left]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\nhz : z ≤ y\nhx : x ≤ y\nH : y = z ⊔ y \\ x\n⊢ x ≤ z\n[PROOFSTEP]\nconv_lhs at H => rw [← sup_sdiff_cancel_right hx]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\nhz : z ≤ y\nhx : x ≤ y\nH : y = z ⊔ y \\ x\n| y\n[PROOFSTEP]\nrw [← sup_sdiff_cancel_right hx]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\nhz : z ≤ y\nhx : x ≤ y\nH : y = z ⊔ y \\ x\n| y\n[PROOFSTEP]\nrw [← sup_sdiff_cancel_right hx]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\nhz : z ≤ y\nhx : x ≤ y\nH : y = z ⊔ y \\ x\n| y\n[PROOFSTEP]\nrw [← sup_sdiff_cancel_right hx]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\nhz : z ≤ y\nhx : x ≤ y\nH : x ⊔ y \\ x = z ⊔ y \\ x\n⊢ x ≤ z\n[PROOFSTEP]\nrefine' le_of_inf_le_sup_le _ H.le\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\nhz : z ≤ y\nhx : x ≤ y\nH : x ⊔ y \\ x = z ⊔ y \\ x\n⊢ x ⊓ y \\ x ≤ z ⊓ y \\ x\n[PROOFSTEP]\nrw [inf_sdiff_self_right]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\nhz : z ≤ y\nhx : x ≤ y\nH : x ⊔ y \\ x = z ⊔ y \\ x\n⊢ ⊥ ≤ z ⊓ y \\ x\n[PROOFSTEP]\nexact bot_le\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\n⊢ y ⊓ (x ⊔ z) ⊔ y \\ x ⊓ y \\ z = (y ⊓ (x ⊔ z) ⊔ y \\ x) ⊓ (y ⊓ (x ⊔ z) ⊔ y \\ z)\n[PROOFSTEP]\nrw [sup_inf_left]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\n⊢ (y ⊓ (x ⊔ z) ⊔ y \\ x) ⊓ (y ⊓ (x ⊔ z) ⊔ y \\ z) = (y ⊓ x ⊔ y ⊓ z ⊔ y \\ x) ⊓ (y ⊓ x ⊔ y ⊓ z ⊔ y \\ z)\n[PROOFSTEP]\nrw [@inf_sup_left _ _ y]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\n⊢ (y ⊓ x ⊔ y ⊓ z ⊔ y \\ x) ⊓ (y ⊓ x ⊔ y ⊓ z ⊔ y \\ z) = (y ⊓ z ⊔ (y ⊓ x ⊔ y \\ x)) ⊓ (y ⊓ x ⊔ (y ⊓ z ⊔ y \\ z))\n[PROOFSTEP]\nac_rfl\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\n⊢ (y ⊓ z ⊔ (y ⊓ x ⊔ y \\ x)) ⊓ (y ⊓ x ⊔ (y ⊓ z ⊔ y \\ z)) = (y ⊓ z ⊔ y) ⊓ (y ⊓ x ⊔ y)\n[PROOFSTEP]\nrw [sup_inf_sdiff, sup_inf_sdiff]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\n⊢ (y ⊓ z ⊔ y) ⊓ (y ⊓ x ⊔ y) = (y ⊔ y ⊓ z) ⊓ (y ⊔ y ⊓ x)\n[PROOFSTEP]\nac_rfl\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\n⊢ (y ⊔ y ⊓ z) ⊓ (y ⊔ y ⊓ x) = y\n[PROOFSTEP]\nrw [sup_inf_self, sup_inf_self, inf_idem]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\n⊢ y ⊓ (x ⊔ z) ⊓ (y \\ x ⊓ y \\ z) = (y ⊓ x ⊔ y ⊓ z) ⊓ (y \\ x ⊓ y \\ z)\n[PROOFSTEP]\nrw [inf_sup_left]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\n⊢ (y ⊓ x ⊔ y ⊓ z) ⊓ (y \\ x ⊓ y \\ z) = y ⊓ x ⊓ (y \\ x ⊓ y \\ z) ⊔ y ⊓ z ⊓ (y \\ x ⊓ y \\ z)\n[PROOFSTEP]\nrw [inf_sup_right]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\n⊢ y ⊓ x ⊓ (y \\ x ⊓ y \\ z) ⊔ y ⊓ z ⊓ (y \\ x ⊓ y \\ z) = y ⊓ x ⊓ y \\ x ⊓ y \\ z ⊔ y \\ x ⊓ (y \\ z ⊓ (y ⊓ z))\n[PROOFSTEP]\nac_rfl\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\n⊢ y ⊓ x ⊓ y \\ x ⊓ y \\ z ⊔ y \\ x ⊓ (y \\ z ⊓ (y ⊓ z)) = ⊥\n[PROOFSTEP]\nrw [inf_inf_sdiff, bot_inf_eq, bot_sup_eq, @inf_comm _ _ (y \\ z), inf_inf_sdiff, inf_bot_eq]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\nh : y \\ x = y \\ z\n⊢ y ⊓ x ⊓ ?m.20593 h = y ⊓ z ⊓ ?m.20593 h\n[PROOFSTEP]\nrw [inf_inf_sdiff, h, inf_inf_sdiff]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\nh : y \\ x = y \\ z\n⊢ y ⊓ x ⊔ y \\ x = y ⊓ z ⊔ y \\ x\n[PROOFSTEP]\nrw [sup_inf_sdiff, h, sup_inf_sdiff]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\nh : y ⊓ x = y ⊓ z\n⊢ y \\ x = y \\ z\n[PROOFSTEP]\nrw [← sdiff_inf_self_right, ← sdiff_inf_self_right z y, inf_comm, h, inf_comm]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\n⊢ x \\ y = x ↔ x \\ y = x \\ ⊥\n[PROOFSTEP]\nrw [sdiff_bot]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\n⊢ x ⊓ y = x ⊓ ⊥ ↔ Disjoint y x\n[PROOFSTEP]\nrw [inf_bot_eq, inf_comm, disjoint_iff]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\n⊢ x \\ y = x ↔ Disjoint x y\n[PROOFSTEP]\nrw [sdiff_eq_self_iff_disjoint, disjoint_comm]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\nhx : y ≤ x\nhy : y ≠ ⊥\n⊢ x \\ y < x\n[PROOFSTEP]\nrefine' sdiff_le.lt_of_ne fun h => hy _\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\nhx : y ≤ x\nhy : y ≠ ⊥\nh : x \\ y = x\n⊢ y = ⊥\n[PROOFSTEP]\nrw [sdiff_eq_self_iff_disjoint', disjoint_iff] at h \n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\nhx : y ≤ x\nhy : y ≠ ⊥\nh : x ⊓ y = ⊥\n⊢ y = ⊥\n[PROOFSTEP]\nrw [← h, inf_eq_right.mpr hx]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\n⊢ x ⊓ y ⊓ z ⊔ y \\ z = x ⊓ (y ⊓ z) ⊔ y \\ z\n[PROOFSTEP]\nrw [inf_assoc]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\n⊢ x ⊓ (y ⊓ z) ⊔ y \\ z = (x ⊔ y \\ z) ⊓ y\n[PROOFSTEP]\nrw [sup_inf_right, sup_inf_sdiff]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\n⊢ (x ⊔ y \\ z) ⊓ y = x ⊓ y ⊔ y \\ z\n[PROOFSTEP]\nrw [inf_sup_right, inf_sdiff_left]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\n⊢ x \\ (y \\ z) = x \\ y ⊔ x ⊓ y ⊓ z\n[PROOFSTEP]\nrw [sup_comm, inf_comm, ← inf_assoc, sup_inf_inf_sdiff]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\n⊢ x \\ (y \\ z) = z ⊓ x ⊔ x \\ y\n[PROOFSTEP]\napply sdiff_unique\n[GOAL]\ncase s\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\n⊢ x ⊓ y \\ z ⊔ (z ⊓ x ⊔ x \\ y) = x\n[PROOFSTEP]\ncalc\n  x ⊓ y \\ z ⊔ (z ⊓ x ⊔ x \\ y) = (x ⊔ (z ⊓ x ⊔ x \\ y)) ⊓ (y \\ z ⊔ (z ⊓ x ⊔ x \\ y)) := by rw [sup_inf_right]\n  _ = (x ⊔ x ⊓ z ⊔ x \\ y) ⊓ (y \\ z ⊔ (x ⊓ z ⊔ x \\ y)) := by ac_rfl\n  _ = x ⊓ (y \\ z ⊔ x ⊓ z ⊔ x \\ y) := by rw [sup_inf_self, sup_sdiff_left, ← sup_assoc]\n  _ = x ⊓ (y \\ z ⊓ (z ⊔ y) ⊔ x ⊓ (z ⊔ y) ⊔ x \\ y) := by\n    rw [sup_inf_left, sdiff_sup_self', inf_sup_right, @sup_comm _ _ y]\n  _ = x ⊓ (y \\ z ⊔ (x ⊓ z ⊔ x ⊓ y) ⊔ x \\ y) := by rw [inf_sdiff_sup_right, @inf_sup_left _ _ x z y]\n  _ = x ⊓ (y \\ z ⊔ (x ⊓ z ⊔ (x ⊓ y ⊔ x \\ y))) := by ac_rfl\n  _ = x ⊓ (y \\ z ⊔ (x ⊔ x ⊓ z)) := by rw [sup_inf_sdiff, @sup_comm _ _ (x ⊓ z)]\n  _ = x := by rw [sup_inf_self, sup_comm, inf_sup_self]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\n⊢ x ⊓ y \\ z ⊔ (z ⊓ x ⊔ x \\ y) = (x ⊔ (z ⊓ x ⊔ x \\ y)) ⊓ (y \\ z ⊔ (z ⊓ x ⊔ x \\ y))\n[PROOFSTEP]\nrw [sup_inf_right]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\n⊢ (x ⊔ (z ⊓ x ⊔ x \\ y)) ⊓ (y \\ z ⊔ (z ⊓ x ⊔ x \\ y)) = (x ⊔ x ⊓ z ⊔ x \\ y) ⊓ (y \\ z ⊔ (x ⊓ z ⊔ x \\ y))\n[PROOFSTEP]\nac_rfl\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\n⊢ (x ⊔ x ⊓ z ⊔ x \\ y) ⊓ (y \\ z ⊔ (x ⊓ z ⊔ x \\ y)) = x ⊓ (y \\ z ⊔ x ⊓ z ⊔ x \\ y)\n[PROOFSTEP]\nrw [sup_inf_self, sup_sdiff_left, ← sup_assoc]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\n⊢ x ⊓ (y \\ z ⊔ x ⊓ z ⊔ x \\ y) = x ⊓ (y \\ z ⊓ (z ⊔ y) ⊔ x ⊓ (z ⊔ y) ⊔ x \\ y)\n[PROOFSTEP]\nrw [sup_inf_left, sdiff_sup_self', inf_sup_right, @sup_comm _ _ y]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\n⊢ x ⊓ (y \\ z ⊓ (z ⊔ y) ⊔ x ⊓ (z ⊔ y) ⊔ x \\ y) = x ⊓ (y \\ z ⊔ (x ⊓ z ⊔ x ⊓ y) ⊔ x \\ y)\n[PROOFSTEP]\nrw [inf_sdiff_sup_right, @inf_sup_left _ _ x z y]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\n⊢ x ⊓ (y \\ z ⊔ (x ⊓ z ⊔ x ⊓ y) ⊔ x \\ y) = x ⊓ (y \\ z ⊔ (x ⊓ z ⊔ (x ⊓ y ⊔ x \\ y)))\n[PROOFSTEP]\nac_rfl\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\n⊢ x ⊓ (y \\ z ⊔ (x ⊓ z ⊔ (x ⊓ y ⊔ x \\ y))) = x ⊓ (y \\ z ⊔ (x ⊔ x ⊓ z))\n[PROOFSTEP]\nrw [sup_inf_sdiff, @sup_comm _ _ (x ⊓ z)]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\n⊢ x ⊓ (y \\ z ⊔ (x ⊔ x ⊓ z)) = x\n[PROOFSTEP]\nrw [sup_inf_self, sup_comm, inf_sup_self]\n[GOAL]\ncase i\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\n⊢ x ⊓ y \\ z ⊓ (z ⊓ x ⊔ x \\ y) = ⊥\n[PROOFSTEP]\ncalc\n  x ⊓ y \\ z ⊓ (z ⊓ x ⊔ x \\ y) = x ⊓ y \\ z ⊓ (z ⊓ x) ⊔ x ⊓ y \\ z ⊓ x \\ y := by rw [inf_sup_left]\n  _ = x ⊓ (y \\ z ⊓ z ⊓ x) ⊔ x ⊓ y \\ z ⊓ x \\ y := by ac_rfl\n  _ = x ⊓ y \\ z ⊓ x \\ y := by rw [inf_sdiff_self_left, bot_inf_eq, inf_bot_eq, bot_sup_eq]\n  _ = x ⊓ (y \\ z ⊓ y) ⊓ x \\ y := by conv_lhs => rw [← inf_sdiff_left]\n  _ = x ⊓ (y \\ z ⊓ (y ⊓ x \\ y)) := by ac_rfl\n  _ = ⊥ := by rw [inf_sdiff_self_right, inf_bot_eq, inf_bot_eq]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\n⊢ x ⊓ y \\ z ⊓ (z ⊓ x ⊔ x \\ y) = x ⊓ y \\ z ⊓ (z ⊓ x) ⊔ x ⊓ y \\ z ⊓ x \\ y\n[PROOFSTEP]\nrw [inf_sup_left]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\n⊢ x ⊓ y \\ z ⊓ (z ⊓ x) ⊔ x ⊓ y \\ z ⊓ x \\ y = x ⊓ (y \\ z ⊓ z ⊓ x) ⊔ x ⊓ y \\ z ⊓ x \\ y\n[PROOFSTEP]\nac_rfl\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\n⊢ x ⊓ (y \\ z ⊓ z ⊓ x) ⊔ x ⊓ y \\ z ⊓ x \\ y = x ⊓ y \\ z ⊓ x \\ y\n[PROOFSTEP]\nrw [inf_sdiff_self_left, bot_inf_eq, inf_bot_eq, bot_sup_eq]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\n⊢ x ⊓ y \\ z ⊓ x \\ y = x ⊓ (y \\ z ⊓ y) ⊓ x \\ y\n[PROOFSTEP]\nconv_lhs => rw [← inf_sdiff_left]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\n| x ⊓ y \\ z ⊓ x \\ y\n[PROOFSTEP]\nrw [← inf_sdiff_left]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\n| x ⊓ y \\ z ⊓ x \\ y\n[PROOFSTEP]\nrw [← inf_sdiff_left]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\n| x ⊓ y \\ z ⊓ x \\ y\n[PROOFSTEP]\nrw [← inf_sdiff_left]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\n⊢ x ⊓ (y \\ z ⊓ y) ⊓ x \\ y = x ⊓ (y \\ z ⊓ (y ⊓ x \\ y))\n[PROOFSTEP]\nac_rfl\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\n⊢ x ⊓ (y \\ z ⊓ (y ⊓ x \\ y)) = ⊥\n[PROOFSTEP]\nrw [inf_sdiff_self_right, inf_bot_eq, inf_bot_eq]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\n⊢ x \\ y ⊔ x ⊓ y ⊓ z = z ⊓ x ⊓ y ⊔ x \\ y\n[PROOFSTEP]\nac_rfl\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\n⊢ z ⊓ x ⊓ y ⊔ x \\ y = x \\ y ⊔ x ⊓ z\n[PROOFSTEP]\nrw [sup_inf_inf_sdiff, sup_comm, inf_comm]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\nh : z ≤ x\n⊢ x \\ (y \\ z) = x \\ y ⊔ z\n[PROOFSTEP]\nrw [sdiff_sdiff_right', inf_eq_right.2 h]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\n⊢ x \\ (x \\ y) = x ⊓ y\n[PROOFSTEP]\nrw [sdiff_sdiff_right, inf_idem, sdiff_self, bot_sup_eq]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\nh : y ≤ x\n⊢ x \\ (x \\ y) = y\n[PROOFSTEP]\nrw [sdiff_sdiff_right_self, inf_of_le_right h]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\nhy : y ≤ x\nh : x \\ y = z\n⊢ x \\ z = y\n[PROOFSTEP]\nrw [← h, sdiff_sdiff_eq_self hy]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\nhxz : x ≤ z\nhyz : y ≤ z\nh : z \\ x = z \\ y\n⊢ x = y\n[PROOFSTEP]\nrw [← sdiff_sdiff_eq_self hxz, h, sdiff_sdiff_eq_self hyz]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\n⊢ (x \\ y) \\ z = x \\ y ⊓ x \\ z\n[PROOFSTEP]\nrw [sdiff_sdiff_left, sdiff_sup]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\n⊢ z \\ (x \\ y ⊔ y \\ x) = (z \\ x ⊔ z ⊓ x ⊓ y) ⊓ (z \\ y ⊔ z ⊓ y ⊓ x)\n[PROOFSTEP]\nrw [sdiff_sup, sdiff_sdiff_right, sdiff_sdiff_right]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\n⊢ (z \\ x ⊔ z ⊓ x ⊓ y) ⊓ (z \\ y ⊔ z ⊓ y ⊓ x) = z ⊓ (z \\ x ⊔ y) ⊓ (z \\ y ⊔ z ⊓ y ⊓ x)\n[PROOFSTEP]\nrw [sup_inf_left, sup_comm, sup_inf_sdiff]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\n⊢ z ⊓ (z \\ x ⊔ y) ⊓ (z \\ y ⊔ z ⊓ y ⊓ x) = z ⊓ (z \\ x ⊔ y) ⊓ (z ⊓ (z \\ y ⊔ x))\n[PROOFSTEP]\nrw [sup_inf_left, @sup_comm _ _ (z \\ y), sup_inf_sdiff]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\n⊢ z ⊓ (z \\ x ⊔ y) ⊓ (z ⊓ (z \\ y ⊔ x)) = z ⊓ z ⊓ (z \\ x ⊔ y) ⊓ (z \\ y ⊔ x)\n[PROOFSTEP]\nac_rfl\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\n⊢ z ⊓ z ⊓ (z \\ x ⊔ y) ⊓ (z \\ y ⊔ x) = z ⊓ (z \\ x ⊔ y) ⊓ (z \\ y ⊔ x)\n[PROOFSTEP]\nrw [inf_idem]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\n⊢ z \\ (x \\ y) ⊓ z \\ (y \\ x) = (z \\ x ⊔ z ⊓ x ⊓ y) ⊓ (z \\ y ⊔ z ⊓ y ⊓ x)\n[PROOFSTEP]\nrw [sdiff_sdiff_right, sdiff_sdiff_right]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\n⊢ (z \\ x ⊔ z ⊓ x ⊓ y) ⊓ (z \\ y ⊔ z ⊓ y ⊓ x) = (z \\ x ⊔ z ⊓ y ⊓ x) ⊓ (z \\ y ⊔ z ⊓ y ⊓ x)\n[PROOFSTEP]\nac_rfl\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\n⊢ z \\ x ⊓ z \\ y ⊔ z ⊓ y ⊓ x = z ⊓ x ⊓ y ⊔ z \\ x ⊓ z \\ y\n[PROOFSTEP]\nac_rfl\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\n⊢ x ⊓ y ⊓ z ⊔ x \\ z ⊓ y \\ z = (x ⊓ y ⊓ z ⊔ x \\ z) ⊓ (x ⊓ y ⊓ z ⊔ y \\ z)\n[PROOFSTEP]\nrw [sup_inf_left]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\n⊢ (x ⊓ y ⊓ z ⊔ x \\ z) ⊓ (x ⊓ y ⊓ z ⊔ y \\ z) = (x ⊓ y ⊓ (z ⊔ x) ⊔ x \\ z) ⊓ (x ⊓ y ⊓ z ⊔ y \\ z)\n[PROOFSTEP]\nrw [sup_inf_right, sup_sdiff_self_right, inf_sup_right, inf_sdiff_sup_right]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\n⊢ (x ⊓ y ⊓ (z ⊔ x) ⊔ x \\ z) ⊓ (x ⊓ y ⊓ z ⊔ y \\ z) = (y ⊓ (x ⊓ (x ⊔ z)) ⊔ x \\ z) ⊓ (x ⊓ y ⊓ z ⊔ y \\ z)\n[PROOFSTEP]\nac_rfl\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\n⊢ (y ⊓ (x ⊓ (x ⊔ z)) ⊔ x \\ z) ⊓ (x ⊓ y ⊓ z ⊔ y \\ z) = (y ⊓ x ⊔ x \\ z) ⊓ (x ⊓ y ⊔ y \\ z)\n[PROOFSTEP]\nrw [inf_sup_self, sup_inf_inf_sdiff]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\n⊢ (y ⊓ x ⊔ x \\ z) ⊓ (x ⊓ y ⊔ y \\ z) = x ⊓ y ⊔ x \\ z ⊓ y \\ z\n[PROOFSTEP]\nrw [@inf_comm _ _ y, sup_inf_left]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\n⊢ x ⊓ y ⊓ z ⊓ (x \\ z ⊓ y \\ z) = x ⊓ y ⊓ (z ⊓ x \\ z) ⊓ y \\ z\n[PROOFSTEP]\nac_rfl\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\n⊢ x ⊓ y ⊓ (z ⊓ x \\ z) ⊓ y \\ z = ⊥\n[PROOFSTEP]\nrw [inf_sdiff_self_right, inf_bot_eq, bot_inf_eq]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\n⊢ x ⊓ y ⊓ z ⊔ x ⊓ y \\ z = x ⊓ (y ⊓ z) ⊔ x ⊓ y \\ z\n[PROOFSTEP]\nrw [inf_assoc]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\n⊢ x ⊓ (y ⊓ z ⊔ y \\ z) = x ⊓ y\n[PROOFSTEP]\nrw [sup_inf_sdiff]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\n⊢ x ⊓ y ⊓ z ⊓ (x ⊓ y \\ z) = x ⊓ x ⊓ (y ⊓ z ⊓ y \\ z)\n[PROOFSTEP]\nac_rfl\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\n⊢ x ⊓ x ⊓ (y ⊓ z ⊓ y \\ z) = ⊥\n[PROOFSTEP]\nrw [inf_inf_sdiff, inf_bot_eq]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\n⊢ x \\ z ⊓ y = (x ⊓ y) \\ z\n[PROOFSTEP]\nrw [@inf_comm _ _ x, inf_comm, inf_sdiff_assoc]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\na b c : α\n⊢ a ⊓ b \\ c = (a ⊓ b) \\ (a ⊓ c)\n[PROOFSTEP]\nrw [sdiff_inf, sdiff_eq_bot_iff.2 inf_le_left, bot_sup_eq, inf_sdiff_assoc]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\na b c : α\n⊢ a \\ b ⊓ c = (a ⊓ c) \\ (b ⊓ c)\n[PROOFSTEP]\nsimp_rw [@inf_comm _ _ _ c, inf_sdiff_distrib_left]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\n⊢ Disjoint (x \\ z) y ↔ Disjoint x (y \\ z)\n[PROOFSTEP]\nsimp_rw [disjoint_iff, inf_sdiff_right_comm, inf_sdiff_assoc]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\n⊢ x \\ y ⊔ y \\ x ⊔ x ⊓ y = (x \\ y ⊔ y \\ x ⊔ x) ⊓ (x \\ y ⊔ y \\ x ⊔ y)\n[PROOFSTEP]\nrw [sup_inf_left]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\n⊢ (x \\ y ⊔ y \\ x ⊔ x) ⊓ (x \\ y ⊔ y \\ x ⊔ y) = (x \\ y ⊔ x ⊔ y \\ x) ⊓ (x \\ y ⊔ (y \\ x ⊔ y))\n[PROOFSTEP]\nac_rfl\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\n⊢ (x \\ y ⊔ x ⊔ y \\ x) ⊓ (x \\ y ⊔ (y \\ x ⊔ y)) = (x ⊔ y \\ x) ⊓ (x \\ y ⊔ y)\n[PROOFSTEP]\nrw [sup_sdiff_right, sup_sdiff_right]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\n⊢ (x ⊔ y \\ x) ⊓ (x \\ y ⊔ y) = x ⊔ y\n[PROOFSTEP]\nrw [sup_sdiff_self_right, sup_sdiff_self_left, inf_idem]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\nh : y < z \\ x\nhxz : x ≤ z\n⊢ x ⊔ y < z\n[PROOFSTEP]\nrw [← sup_sdiff_cancel_right hxz]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\nh : y < z \\ x\nhxz : x ≤ z\n⊢ x ⊔ y < x ⊔ z \\ x\n[PROOFSTEP]\nrefine' (sup_le_sup_left h.le _).lt_of_not_le fun h' => h.not_le _\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\nh : y < z \\ x\nhxz : x ≤ z\nh' : x ⊔ z \\ x ≤ x ⊔ y\n⊢ z \\ x ≤ y\n[PROOFSTEP]\nrw [← sdiff_idem]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\nh : y < z \\ x\nhxz : x ≤ z\nh' : x ⊔ z \\ x ≤ x ⊔ y\n⊢ (z \\ x) \\ x ≤ y\n[PROOFSTEP]\nexact (sdiff_le_sdiff_of_sup_le_sup_left h').trans sdiff_le\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\nh : x < z \\ y\nhyz : y ≤ z\n⊢ x ⊔ y < z\n[PROOFSTEP]\nrw [← sdiff_sup_cancel hyz]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\nh : x < z \\ y\nhyz : y ≤ z\n⊢ x ⊔ y < z \\ y ⊔ y\n[PROOFSTEP]\nrefine' (sup_le_sup_right h.le _).lt_of_not_le fun h' => h.not_le _\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\nh : x < z \\ y\nhyz : y ≤ z\nh' : z \\ y ⊔ y ≤ x ⊔ y\n⊢ z \\ y ≤ x\n[PROOFSTEP]\nrw [← sdiff_idem]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : GeneralizedBooleanAlgebra α\nh : x < z \\ y\nhyz : y ≤ z\nh' : z \\ y ⊔ y ≤ x ⊔ y\n⊢ (z \\ y) \\ y ≤ x\n[PROOFSTEP]\nexact (sdiff_le_sdiff_of_sup_le_sup_right h').trans sdiff_le\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝¹ : GeneralizedBooleanAlgebra α\ninst✝ : OrderTop α\nsrc✝² : GeneralizedBooleanAlgebra α := inst✝¹\nsrc✝¹ : OrderBot α := toOrderBot\nsrc✝ : OrderTop α := inst✝\nx✝¹ x✝ : α\n⊢ x✝¹ \\ x✝ = x✝¹ ⊓ x✝ᶜ\n[PROOFSTEP]\nerw [← inf_sdiff_assoc, inf_top_eq]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : BooleanAlgebra α\nsrc✝ : BooleanAlgebra α := inst✝\na b : α\n⊢ a ⊓ b ⊔ a \\ b = a\n[PROOFSTEP]\nrw [sdiff_eq, ← inf_sup_left, sup_compl_eq_top, inf_top_eq]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : BooleanAlgebra α\nsrc✝ : BooleanAlgebra α := inst✝\na b : α\n⊢ a ⊓ b ⊓ a \\ b = ⊥\n[PROOFSTEP]\nrw [sdiff_eq, ← inf_inf_distrib_left, inf_compl_eq_bot', inf_bot_eq]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : BooleanAlgebra α\nsrc✝¹ : BooleanAlgebra α := inst✝\nsrc✝ : GeneralizedCoheytingAlgebra α := GeneralizedBooleanAlgebra.toGeneralizedCoheytingAlgebra\na b c : α\n⊢ a ≤ b ⇨ c ↔ a ⊓ b ≤ c\n[PROOFSTEP]\nrw [himp_eq, isCompl_compl.le_sup_right_iff_inf_left_le]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : BooleanAlgebra α\nsrc✝¹ : BooleanAlgebra α := inst✝\nsrc✝ : GeneralizedCoheytingAlgebra α := GeneralizedBooleanAlgebra.toGeneralizedCoheytingAlgebra\na : α\n⊢ ⊤ \\ a = ￢a\n[PROOFSTEP]\nrw [sdiff_eq, top_inf_eq]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : BooleanAlgebra α\nsrc✝¹ : BooleanAlgebra α := inst✝\nsrc✝ : GeneralizedCoheytingAlgebra α := GeneralizedBooleanAlgebra.toGeneralizedCoheytingAlgebra\na : α\n⊢ aᶜ = ￢a\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : BooleanAlgebra α\nh : x = yᶜ\n⊢ IsCompl x y\n[PROOFSTEP]\nrw [h]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : BooleanAlgebra α\nh : x = yᶜ\n⊢ IsCompl yᶜ y\n[PROOFSTEP]\nexact isCompl_compl.symm\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : BooleanAlgebra α\nh : xᶜ = y\n⊢ IsCompl x y\n[PROOFSTEP]\nrw [← h]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : BooleanAlgebra α\nh : xᶜ = y\n⊢ IsCompl x xᶜ\n[PROOFSTEP]\nexact isCompl_compl\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : BooleanAlgebra α\n⊢ xᶜ = y ↔ yᶜ = x\n[PROOFSTEP]\nrw [eq_comm, compl_eq_iff_isCompl, eq_compl_iff_isCompl]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : BooleanAlgebra α\n⊢ x = yᶜ ↔ y = xᶜ\n[PROOFSTEP]\nrw [eq_comm, compl_eq_iff_isCompl, eq_compl_iff_isCompl]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : BooleanAlgebra α\nh : yᶜ ≤ xᶜ\n⊢ x ≤ y\n[PROOFSTEP]\nhave h := compl_le_compl h\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : BooleanAlgebra α\nh✝ : yᶜ ≤ xᶜ\nh : xᶜᶜ ≤ yᶜᶜ\n⊢ x ≤ y\n[PROOFSTEP]\nsimp at h \n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : BooleanAlgebra α\nh✝ : yᶜ ≤ xᶜ\nh : x ≤ y\n⊢ x ≤ y\n[PROOFSTEP]\nassumption\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : BooleanAlgebra α\nh : yᶜ ≤ x\n⊢ xᶜ ≤ y\n[PROOFSTEP]\nsimpa only [compl_compl] using compl_le_compl h\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : BooleanAlgebra α\n⊢ xᶜ ≤ x ↔ x = ⊤\n[PROOFSTEP]\nsimpa using le_compl_self (a := xᶜ)\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝¹ : BooleanAlgebra α\ninst✝ : Nontrivial α\n⊢ xᶜ < x ↔ x = ⊤\n[PROOFSTEP]\nsimpa using lt_compl_self (a := xᶜ)\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : BooleanAlgebra α\n⊢ x \\ yᶜ = x ⊓ y\n[PROOFSTEP]\nrw [sdiff_eq, compl_compl]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : BooleanAlgebra α\n⊢ x ⊓ y ⊔ x ⊓ yᶜ = x\n[PROOFSTEP]\nrw [← sdiff_eq, sup_inf_sdiff _ _]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : BooleanAlgebra α\n⊢ (x \\ y)ᶜ = x ⇨ y\n[PROOFSTEP]\nrw [sdiff_eq, himp_eq, compl_inf, compl_compl, sup_comm]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : BooleanAlgebra α\n⊢ xᶜ \\ yᶜ = y \\ x\n[PROOFSTEP]\nrw [sdiff_compl, sdiff_eq, inf_comm]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : BooleanAlgebra α\n⊢ Disjoint xᶜ y ↔ y ≤ x\n[PROOFSTEP]\nrw [← le_compl_iff_disjoint_left, compl_compl]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝ : BooleanAlgebra α\n⊢ Disjoint x yᶜ ↔ x ≤ y\n[PROOFSTEP]\nrw [← le_compl_iff_disjoint_right, compl_compl]\n[GOAL]\nα✝ : Type u\nβ✝ : Type u_1\nw x✝ y z : α✝\nα : Type ?u.67933\nβ : Type ?u.67936\ninst✝¹ : BooleanAlgebra α\ninst✝ : BooleanAlgebra β\nsrc✝¹ : HeytingAlgebra (α × β) := heytingAlgebra\nsrc✝ : DistribLattice (α × β) := distribLattice α β\nx : α × β\n⊢ x ⊓ xᶜ ≤ ⊥\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase left\nα✝ : Type u\nβ✝ : Type u_1\nw x✝ y z : α✝\nα : Type ?u.67933\nβ : Type ?u.67936\ninst✝¹ : BooleanAlgebra α\ninst✝ : BooleanAlgebra β\nsrc✝¹ : HeytingAlgebra (α × β) := heytingAlgebra\nsrc✝ : DistribLattice (α × β) := distribLattice α β\nx : α × β\n⊢ (x ⊓ xᶜ).fst ≤ ⊥.fst\n[PROOFSTEP]\nsimp\n[GOAL]\ncase right\nα✝ : Type u\nβ✝ : Type u_1\nw x✝ y z : α✝\nα : Type ?u.67933\nβ : Type ?u.67936\ninst✝¹ : BooleanAlgebra α\ninst✝ : BooleanAlgebra β\nsrc✝¹ : HeytingAlgebra (α × β) := heytingAlgebra\nsrc✝ : DistribLattice (α × β) := distribLattice α β\nx : α × β\n⊢ (x ⊓ xᶜ).snd ≤ ⊥.snd\n[PROOFSTEP]\nsimp\n[GOAL]\nα✝ : Type u\nβ✝ : Type u_1\nw x✝ y z : α✝\nα : Type ?u.67933\nβ : Type ?u.67936\ninst✝¹ : BooleanAlgebra α\ninst✝ : BooleanAlgebra β\nsrc✝¹ : HeytingAlgebra (α × β) := heytingAlgebra\nsrc✝ : DistribLattice (α × β) := distribLattice α β\nx : α × β\n⊢ ⊤ ≤ x ⊔ xᶜ\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase left\nα✝ : Type u\nβ✝ : Type u_1\nw x✝ y z : α✝\nα : Type ?u.67933\nβ : Type ?u.67936\ninst✝¹ : BooleanAlgebra α\ninst✝ : BooleanAlgebra β\nsrc✝¹ : HeytingAlgebra (α × β) := heytingAlgebra\nsrc✝ : DistribLattice (α × β) := distribLattice α β\nx : α × β\n⊢ ⊤.fst ≤ (x ⊔ xᶜ).fst\n[PROOFSTEP]\nsimp\n[GOAL]\ncase right\nα✝ : Type u\nβ✝ : Type u_1\nw x✝ y z : α✝\nα : Type ?u.67933\nβ : Type ?u.67936\ninst✝¹ : BooleanAlgebra α\ninst✝ : BooleanAlgebra β\nsrc✝¹ : HeytingAlgebra (α × β) := heytingAlgebra\nsrc✝ : DistribLattice (α × β) := distribLattice α β\nx : α × β\n⊢ ⊤.snd ≤ (x ⊔ xᶜ).snd\n[PROOFSTEP]\nsimp\n[GOAL]\nα✝ : Type u\nβ✝ : Type u_1\nw x✝ y✝ z : α✝\nα : Type ?u.67933\nβ : Type ?u.67936\ninst✝¹ : BooleanAlgebra α\ninst✝ : BooleanAlgebra β\nsrc✝¹ : HeytingAlgebra (α × β) := heytingAlgebra\nsrc✝ : DistribLattice (α × β) := distribLattice α β\nx y : α × β\n⊢ x \\ y = x ⊓ yᶜ\n[PROOFSTEP]\next\n[GOAL]\ncase h₁\nα✝ : Type u\nβ✝ : Type u_1\nw x✝ y✝ z : α✝\nα : Type ?u.67933\nβ : Type ?u.67936\ninst✝¹ : BooleanAlgebra α\ninst✝ : BooleanAlgebra β\nsrc✝¹ : HeytingAlgebra (α × β) := heytingAlgebra\nsrc✝ : DistribLattice (α × β) := distribLattice α β\nx y : α × β\n⊢ (x \\ y).fst = (x ⊓ yᶜ).fst\n[PROOFSTEP]\nsimp [sdiff_eq]\n[GOAL]\ncase h₂\nα✝ : Type u\nβ✝ : Type u_1\nw x✝ y✝ z : α✝\nα : Type ?u.67933\nβ : Type ?u.67936\ninst✝¹ : BooleanAlgebra α\ninst✝ : BooleanAlgebra β\nsrc✝¹ : HeytingAlgebra (α × β) := heytingAlgebra\nsrc✝ : DistribLattice (α × β) := distribLattice α β\nx y : α × β\n⊢ (x \\ y).snd = (x ⊓ yᶜ).snd\n[PROOFSTEP]\nsimp [sdiff_eq]\n[GOAL]\nα✝ : Type u\nβ✝ : Type u_1\nw x✝ y✝ z : α✝\nα : Type ?u.67933\nβ : Type ?u.67936\ninst✝¹ : BooleanAlgebra α\ninst✝ : BooleanAlgebra β\nsrc✝¹ : HeytingAlgebra (α × β) := heytingAlgebra\nsrc✝ : DistribLattice (α × β) := distribLattice α β\nx y : α × β\n⊢ x ⇨ y = y ⊔ xᶜ\n[PROOFSTEP]\next\n[GOAL]\ncase h₁\nα✝ : Type u\nβ✝ : Type u_1\nw x✝ y✝ z : α✝\nα : Type ?u.67933\nβ : Type ?u.67936\ninst✝¹ : BooleanAlgebra α\ninst✝ : BooleanAlgebra β\nsrc✝¹ : HeytingAlgebra (α × β) := heytingAlgebra\nsrc✝ : DistribLattice (α × β) := distribLattice α β\nx y : α × β\n⊢ (x ⇨ y).fst = (y ⊔ xᶜ).fst\n[PROOFSTEP]\nsimp [himp_eq]\n[GOAL]\ncase h₂\nα✝ : Type u\nβ✝ : Type u_1\nw x✝ y✝ z : α✝\nα : Type ?u.67933\nβ : Type ?u.67936\ninst✝¹ : BooleanAlgebra α\ninst✝ : BooleanAlgebra β\nsrc✝¹ : HeytingAlgebra (α × β) := heytingAlgebra\nsrc✝ : DistribLattice (α × β) := distribLattice α β\nx y : α × β\n⊢ (x ⇨ y).snd = (y ⊔ xᶜ).snd\n[PROOFSTEP]\nsimp [himp_eq]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\nsrc✝¹ : LinearOrder Bool := Bool.linearOrder\nsrc✝ : BoundedOrder Bool := Bool.boundedOrder\n⊢ ∀ (x y z : Bool), (x ⊔ y) ⊓ (x ⊔ z) ≤ x ⊔ y ⊓ z\n[PROOFSTEP]\ndecide\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝⁴ : Sup α\ninst✝³ : Inf α\ninst✝² : Bot α\ninst✝¹ : SDiff α\ninst✝ : GeneralizedBooleanAlgebra β\nf : α → β\nhf : Injective f\nmap_sup : ∀ (a b : α), f (a ⊔ b) = f a ⊔ f b\nmap_inf : ∀ (a b : α), f (a ⊓ b) = f a ⊓ f b\nmap_bot : f ⊥ = ⊥\nmap_sdiff : ∀ (a b : α), f (a \\ b) = f a \\ f b\nsrc✝¹ : GeneralizedCoheytingAlgebra α := Injective.generalizedCoheytingAlgebra f hf map_sup map_inf map_bot map_sdiff\nsrc✝ : DistribLattice α := Injective.distribLattice f hf map_sup map_inf\na b : α\n⊢ f (a ⊓ b ⊔ a \\ b) = f a\n[PROOFSTEP]\nerw [map_sup, map_sdiff, map_inf, sup_inf_sdiff]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝⁴ : Sup α\ninst✝³ : Inf α\ninst✝² : Bot α\ninst✝¹ : SDiff α\ninst✝ : GeneralizedBooleanAlgebra β\nf : α → β\nhf : Injective f\nmap_sup : ∀ (a b : α), f (a ⊔ b) = f a ⊔ f b\nmap_inf : ∀ (a b : α), f (a ⊓ b) = f a ⊓ f b\nmap_bot : f ⊥ = ⊥\nmap_sdiff : ∀ (a b : α), f (a \\ b) = f a \\ f b\nsrc✝¹ : GeneralizedCoheytingAlgebra α := Injective.generalizedCoheytingAlgebra f hf map_sup map_inf map_bot map_sdiff\nsrc✝ : DistribLattice α := Injective.distribLattice f hf map_sup map_inf\na b : α\n⊢ f (a ⊓ b ⊓ a \\ b) = f ⊥\n[PROOFSTEP]\nerw [map_inf, map_sdiff, map_inf, inf_inf_sdiff, map_bot]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝⁶ : Sup α\ninst✝⁵ : Inf α\ninst✝⁴ : Top α\ninst✝³ : Bot α\ninst✝² : HasCompl α\ninst✝¹ : SDiff α\ninst✝ : BooleanAlgebra β\nf : α → β\nhf : Injective f\nmap_sup : ∀ (a b : α), f (a ⊔ b) = f a ⊔ f b\nmap_inf : ∀ (a b : α), f (a ⊓ b) = f a ⊓ f b\nmap_top : f ⊤ = ⊤\nmap_bot : f ⊥ = ⊥\nmap_compl : ∀ (a : α), f aᶜ = (f a)ᶜ\nmap_sdiff : ∀ (a b : α), f (a \\ b) = f a \\ f b\nsrc✝ : GeneralizedBooleanAlgebra α := Injective.generalizedBooleanAlgebra f hf map_sup map_inf map_bot map_sdiff\na : α\n⊢ f a ⊓ f aᶜ = f ⊥\n[PROOFSTEP]\nrw [map_compl, inf_compl_eq_bot, map_bot]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝⁶ : Sup α\ninst✝⁵ : Inf α\ninst✝⁴ : Top α\ninst✝³ : Bot α\ninst✝² : HasCompl α\ninst✝¹ : SDiff α\ninst✝ : BooleanAlgebra β\nf : α → β\nhf : Injective f\nmap_sup : ∀ (a b : α), f (a ⊔ b) = f a ⊔ f b\nmap_inf : ∀ (a b : α), f (a ⊓ b) = f a ⊓ f b\nmap_top : f ⊤ = ⊤\nmap_bot : f ⊥ = ⊥\nmap_compl : ∀ (a : α), f aᶜ = (f a)ᶜ\nmap_sdiff : ∀ (a b : α), f (a \\ b) = f a \\ f b\nsrc✝ : GeneralizedBooleanAlgebra α := Injective.generalizedBooleanAlgebra f hf map_sup map_inf map_bot map_sdiff\na : α\n⊢ f a ⊔ f aᶜ = f ⊤\n[PROOFSTEP]\nrw [map_compl, sup_compl_eq_top, map_top]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝⁶ : Sup α\ninst✝⁵ : Inf α\ninst✝⁴ : Top α\ninst✝³ : Bot α\ninst✝² : HasCompl α\ninst✝¹ : SDiff α\ninst✝ : BooleanAlgebra β\nf : α → β\nhf : Injective f\nmap_sup : ∀ (a b : α), f (a ⊔ b) = f a ⊔ f b\nmap_inf : ∀ (a b : α), f (a ⊓ b) = f a ⊓ f b\nmap_top : f ⊤ = ⊤\nmap_bot : f ⊥ = ⊥\nmap_compl : ∀ (a : α), f aᶜ = (f a)ᶜ\nmap_sdiff : ∀ (a b : α), f (a \\ b) = f a \\ f b\nsrc✝ : GeneralizedBooleanAlgebra α := Injective.generalizedBooleanAlgebra f hf map_sup map_inf map_bot map_sdiff\na b : α\n⊢ a \\ b = a ⊓ bᶜ\n[PROOFSTEP]\nrefine hf ((map_sdiff _ _).trans (sdiff_eq.trans ?_))\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\ninst✝⁶ : Sup α\ninst✝⁵ : Inf α\ninst✝⁴ : Top α\ninst✝³ : Bot α\ninst✝² : HasCompl α\ninst✝¹ : SDiff α\ninst✝ : BooleanAlgebra β\nf : α → β\nhf : Injective f\nmap_sup : ∀ (a b : α), f (a ⊔ b) = f a ⊔ f b\nmap_inf : ∀ (a b : α), f (a ⊓ b) = f a ⊓ f b\nmap_top : f ⊤ = ⊤\nmap_bot : f ⊥ = ⊥\nmap_compl : ∀ (a : α), f aᶜ = (f a)ᶜ\nmap_sdiff : ∀ (a b : α), f (a \\ b) = f a \\ f b\nsrc✝ : GeneralizedBooleanAlgebra α := Injective.generalizedBooleanAlgebra f hf map_sup map_inf map_bot map_sdiff\na b : α\n⊢ f a ⊓ (f b)ᶜ = f (a ⊓ bᶜ)\n[PROOFSTEP]\nrw [map_inf, map_compl]\n[GOAL]\nα : Type u\nβ : Type u_1\nw x y z : α\n⊢ BooleanAlgebra PUnit\n[PROOFSTEP]\nrefine' { PUnit.biheytingAlgebra with .. }\n[GOAL]\ncase refine'_1\nα : Type u\nβ : Type u_1\nw x y z : α\nsrc✝ : BiheytingAlgebra PUnit := biheytingAlgebra\n⊢ ∀ (x y z : PUnit), (x ⊔ y) ⊓ (x ⊔ z) ≤ x ⊔ y ⊓ z\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_1\nα : Type u\nβ : Type u_1\nw x y z : α\nsrc✝ : BiheytingAlgebra PUnit := biheytingAlgebra\nx✝ y✝ z✝ : PUnit\n⊢ (x✝ ⊔ y✝) ⊓ (x✝ ⊔ z✝) ≤ x✝ ⊔ y✝ ⊓ z✝\n[PROOFSTEP]\ntrivial\n[GOAL]\ncase refine'_2\nα : Type u\nβ : Type u_1\nw x y z : α\nsrc✝ : BiheytingAlgebra PUnit := biheytingAlgebra\n⊢ ∀ (x : PUnit), x ⊓ xᶜ ≤ ⊥\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_2\nα : Type u\nβ : Type u_1\nw x y z : α\nsrc✝ : BiheytingAlgebra PUnit := biheytingAlgebra\nx✝ : PUnit\n⊢ x✝ ⊓ x✝ᶜ ≤ ⊥\n[PROOFSTEP]\ntrivial\n[GOAL]\ncase refine'_3\nα : Type u\nβ : Type u_1\nw x y z : α\nsrc✝ : BiheytingAlgebra PUnit := biheytingAlgebra\n⊢ ∀ (x : PUnit), ⊤ ≤ x ⊔ xᶜ\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_3\nα : Type u\nβ : Type u_1\nw x y z : α\nsrc✝ : BiheytingAlgebra PUnit := biheytingAlgebra\nx✝ : PUnit\n⊢ ⊤ ≤ x✝ ⊔ x✝ᶜ\n[PROOFSTEP]\ntrivial\n[GOAL]\ncase refine'_4\nα : Type u\nβ : Type u_1\nw x y z : α\nsrc✝ : BiheytingAlgebra PUnit := biheytingAlgebra\n⊢ ∀ (x y : PUnit), x \\ y = x ⊓ yᶜ\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_4\nα : Type u\nβ : Type u_1\nw x y z : α\nsrc✝ : BiheytingAlgebra PUnit := biheytingAlgebra\nx✝ y✝ : PUnit\n⊢ x✝ \\ y✝ = x✝ ⊓ y✝ᶜ\n[PROOFSTEP]\ntrivial\n[GOAL]\ncase refine'_5\nα : Type u\nβ : Type u_1\nw x y z : α\nsrc✝ : BiheytingAlgebra PUnit := biheytingAlgebra\n⊢ ∀ (x y : PUnit), x ⇨ y = y ⊔ xᶜ\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_5\nα : Type u\nβ : Type u_1\nw x y z : α\nsrc✝ : BiheytingAlgebra PUnit := biheytingAlgebra\nx✝ y✝ : PUnit\n⊢ x✝ ⇨ y✝ = y✝ ⊔ x✝ᶜ\n[PROOFSTEP]\ntrivial\n", "meta": {"mathlib_filename": "Mathlib.Order.BooleanAlgebra", "llama_tokens": 23922, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8418256512199033, "lm_q2_score": 0.6370308082623217, "lm_q1q2_score": 0.5362688750125704}}
{"text": "[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\n⊢ ‖x - y‖ * ‖x - y‖ = ‖x‖ * ‖x‖ + ‖y‖ * ‖y‖ - 2 * ‖x‖ * ‖y‖ * Real.cos (angle x y)\n[PROOFSTEP]\nrw [show 2 * ‖x‖ * ‖y‖ * Real.cos (angle x y) = 2 * (Real.cos (angle x y) * (‖x‖ * ‖y‖)) by ring,\n  cos_angle_mul_norm_mul_norm, ← real_inner_self_eq_norm_mul_norm, ← real_inner_self_eq_norm_mul_norm, ←\n  real_inner_self_eq_norm_mul_norm, real_inner_sub_sub_self, sub_add_eq_add_sub]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\n⊢ 2 * ‖x‖ * ‖y‖ * Real.cos (angle x y) = 2 * (Real.cos (angle x y) * (‖x‖ * ‖y‖))\n[PROOFSTEP]\nring\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : ‖x‖ = ‖y‖\n⊢ angle x (x - y) = angle y (y - x)\n[PROOFSTEP]\nrefine' Real.injOn_cos ⟨angle_nonneg _ _, angle_le_pi _ _⟩ ⟨angle_nonneg _ _, angle_le_pi _ _⟩ _\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : ‖x‖ = ‖y‖\n⊢ Real.cos (angle x (x - y)) = Real.cos (angle y (y - x))\n[PROOFSTEP]\nrw [cos_angle, cos_angle, h, ← neg_sub, norm_neg, neg_sub, inner_sub_right, inner_sub_right,\n  real_inner_self_eq_norm_mul_norm, real_inner_self_eq_norm_mul_norm, h, real_inner_comm x y]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nh : angle x (x - y) = angle y (y - x)\nhpi : angle x y ≠ π\n⊢ ‖x‖ = ‖y‖\n[PROOFSTEP]\nreplace h :=\n  Real.arccos_injOn (abs_le.mp (abs_real_inner_div_norm_mul_norm_le_one x (x - y)))\n    (abs_le.mp (abs_real_inner_div_norm_mul_norm_le_one y (y - x))) h\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhpi : angle x y ≠ π\nh : inner x (x - y) / (‖x‖ * ‖x - y‖) = inner y (y - x) / (‖y‖ * ‖y - x‖)\n⊢ ‖x‖ = ‖y‖\n[PROOFSTEP]\nby_cases hxy : x = y\n[GOAL]\ncase pos\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhpi : angle x y ≠ π\nh : inner x (x - y) / (‖x‖ * ‖x - y‖) = inner y (y - x) / (‖y‖ * ‖y - x‖)\nhxy : x = y\n⊢ ‖x‖ = ‖y‖\n[PROOFSTEP]\nrw [hxy]\n[GOAL]\ncase neg\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhpi : angle x y ≠ π\nh : inner x (x - y) / (‖x‖ * ‖x - y‖) = inner y (y - x) / (‖y‖ * ‖y - x‖)\nhxy : ¬x = y\n⊢ ‖x‖ = ‖y‖\n[PROOFSTEP]\nrw [← norm_neg (y - x), neg_sub, mul_comm, mul_comm ‖y‖, div_eq_mul_inv, div_eq_mul_inv, mul_inv_rev, mul_inv_rev, ←\n  mul_assoc, ← mul_assoc] at h \n[GOAL]\ncase neg\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhpi : angle x y ≠ π\nh : inner x (x - y) * ‖x‖⁻¹ * ‖x - y‖⁻¹ = inner y (y - x) * ‖y‖⁻¹ * ‖x - y‖⁻¹\nhxy : ¬x = y\n⊢ ‖x‖ = ‖y‖\n[PROOFSTEP]\nreplace h := mul_right_cancel₀ (inv_ne_zero fun hz => hxy (eq_of_sub_eq_zero (norm_eq_zero.1 hz))) h\n[GOAL]\ncase neg\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhpi : angle x y ≠ π\nhxy : ¬x = y\nh : inner x (x - y) * ‖x‖⁻¹ = inner y (y - x) * ‖y‖⁻¹\n⊢ ‖x‖ = ‖y‖\n[PROOFSTEP]\nrw [inner_sub_right, inner_sub_right, real_inner_comm x y, real_inner_self_eq_norm_mul_norm,\n  real_inner_self_eq_norm_mul_norm, mul_sub_right_distrib, mul_sub_right_distrib, mul_self_mul_inv, mul_self_mul_inv,\n  sub_eq_sub_iff_sub_eq_sub, ← mul_sub_left_distrib] at h \n[GOAL]\ncase neg\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhpi : angle x y ≠ π\nhxy : ¬x = y\nh : ‖x‖ - ‖y‖ = inner x y * (‖x‖⁻¹ - ‖y‖⁻¹)\n⊢ ‖x‖ = ‖y‖\n[PROOFSTEP]\nby_cases hx0 : x = 0\n[GOAL]\ncase pos\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhpi : angle x y ≠ π\nhxy : ¬x = y\nh : ‖x‖ - ‖y‖ = inner x y * (‖x‖⁻¹ - ‖y‖⁻¹)\nhx0 : x = 0\n⊢ ‖x‖ = ‖y‖\n[PROOFSTEP]\nrw [hx0, norm_zero, inner_zero_left, zero_mul, zero_sub, neg_eq_zero] at h \n[GOAL]\ncase pos\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhpi : angle x y ≠ π\nhxy : ¬x = y\nh : ‖y‖ = 0\nhx0 : x = 0\n⊢ ‖x‖ = ‖y‖\n[PROOFSTEP]\nrw [hx0, norm_zero, h]\n[GOAL]\ncase neg\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhpi : angle x y ≠ π\nhxy : ¬x = y\nh : ‖x‖ - ‖y‖ = inner x y * (‖x‖⁻¹ - ‖y‖⁻¹)\nhx0 : ¬x = 0\n⊢ ‖x‖ = ‖y‖\n[PROOFSTEP]\nby_cases hy0 : y = 0\n[GOAL]\ncase pos\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhpi : angle x y ≠ π\nhxy : ¬x = y\nh : ‖x‖ - ‖y‖ = inner x y * (‖x‖⁻¹ - ‖y‖⁻¹)\nhx0 : ¬x = 0\nhy0 : y = 0\n⊢ ‖x‖ = ‖y‖\n[PROOFSTEP]\nrw [hy0, norm_zero, inner_zero_right, zero_mul, sub_zero] at h \n[GOAL]\ncase pos\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhpi : angle x y ≠ π\nhxy : ¬x = y\nh : ‖x‖ = 0\nhx0 : ¬x = 0\nhy0 : y = 0\n⊢ ‖x‖ = ‖y‖\n[PROOFSTEP]\nrw [hy0, norm_zero, h]\n[GOAL]\ncase neg\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhpi : angle x y ≠ π\nhxy : ¬x = y\nh : ‖x‖ - ‖y‖ = inner x y * (‖x‖⁻¹ - ‖y‖⁻¹)\nhx0 : ¬x = 0\nhy0 : ¬y = 0\n⊢ ‖x‖ = ‖y‖\n[PROOFSTEP]\nrw [inv_sub_inv (fun hz => hx0 (norm_eq_zero.1 hz)) fun hz => hy0 (norm_eq_zero.1 hz), ← neg_sub, ← mul_div_assoc,\n  mul_comm, mul_div_assoc, ← mul_neg_one] at h \n[GOAL]\ncase neg\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhpi : angle x y ≠ π\nhxy : ¬x = y\nh : (‖y‖ - ‖x‖) * -1 = (‖y‖ - ‖x‖) * (inner x y / (‖x‖ * ‖y‖))\nhx0 : ¬x = 0\nhy0 : ¬y = 0\n⊢ ‖x‖ = ‖y‖\n[PROOFSTEP]\nsymm\n[GOAL]\ncase neg\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhpi : angle x y ≠ π\nhxy : ¬x = y\nh : (‖y‖ - ‖x‖) * -1 = (‖y‖ - ‖x‖) * (inner x y / (‖x‖ * ‖y‖))\nhx0 : ¬x = 0\nhy0 : ¬y = 0\n⊢ ‖y‖ = ‖x‖\n[PROOFSTEP]\nby_contra hyx\n[GOAL]\ncase neg\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhpi : angle x y ≠ π\nhxy : ¬x = y\nh : (‖y‖ - ‖x‖) * -1 = (‖y‖ - ‖x‖) * (inner x y / (‖x‖ * ‖y‖))\nhx0 : ¬x = 0\nhy0 : ¬y = 0\nhyx : ¬‖y‖ = ‖x‖\n⊢ False\n[PROOFSTEP]\nreplace h := (mul_left_cancel₀ (sub_ne_zero_of_ne hyx) h).symm\n[GOAL]\ncase neg\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhpi : angle x y ≠ π\nhxy : ¬x = y\nhx0 : ¬x = 0\nhy0 : ¬y = 0\nhyx : ¬‖y‖ = ‖x‖\nh : inner x y / (‖x‖ * ‖y‖) = -1\n⊢ False\n[PROOFSTEP]\nrw [real_inner_div_norm_mul_norm_eq_neg_one_iff, ← angle_eq_pi_iff] at h \n[GOAL]\ncase neg\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhpi : angle x y ≠ π\nhxy : ¬x = y\nhx0 : ¬x = 0\nhy0 : ¬y = 0\nhyx : ¬‖y‖ = ‖x‖\nh : angle x y = π\n⊢ False\n[PROOFSTEP]\nexact hpi h\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\n⊢ Real.cos (angle x (x - y) + angle y (y - x)) = -Real.cos (angle x y)\n[PROOFSTEP]\nby_cases hxy : x = y\n[GOAL]\ncase pos\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\nhxy : x = y\n⊢ Real.cos (angle x (x - y) + angle y (y - x)) = -Real.cos (angle x y)\n[PROOFSTEP]\nrw [hxy, angle_self hy]\n[GOAL]\ncase pos\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\nhxy : x = y\n⊢ Real.cos (angle y (y - y) + angle y (y - y)) = -Real.cos 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\nhxy : ¬x = y\n⊢ Real.cos (angle x (x - y) + angle y (y - x)) = -Real.cos (angle x y)\n[PROOFSTEP]\nrw [Real.cos_add, cos_angle, cos_angle, cos_angle]\n[GOAL]\ncase neg\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\nhxy : ¬x = y\n⊢ inner x (x - y) / (‖x‖ * ‖x - y‖) * (inner y (y - x) / (‖y‖ * ‖y - x‖)) -\n      Real.sin (angle x (x - y)) * Real.sin (angle y (y - x)) =\n    -(inner x y / (‖x‖ * ‖y‖))\n[PROOFSTEP]\nhave hxn : ‖x‖ ≠ 0 := fun h => hx (norm_eq_zero.1 h)\n[GOAL]\ncase neg\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\nhxy : ¬x = y\nhxn : ‖x‖ ≠ 0\n⊢ inner x (x - y) / (‖x‖ * ‖x - y‖) * (inner y (y - x) / (‖y‖ * ‖y - x‖)) -\n      Real.sin (angle x (x - y)) * Real.sin (angle y (y - x)) =\n    -(inner x y / (‖x‖ * ‖y‖))\n[PROOFSTEP]\nhave hyn : ‖y‖ ≠ 0 := fun h => hy (norm_eq_zero.1 h)\n[GOAL]\ncase neg\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\nhxy : ¬x = y\nhxn : ‖x‖ ≠ 0\nhyn : ‖y‖ ≠ 0\n⊢ inner x (x - y) / (‖x‖ * ‖x - y‖) * (inner y (y - x) / (‖y‖ * ‖y - x‖)) -\n      Real.sin (angle x (x - y)) * Real.sin (angle y (y - x)) =\n    -(inner x y / (‖x‖ * ‖y‖))\n[PROOFSTEP]\nhave hxyn : ‖x - y‖ ≠ 0 := fun h => hxy (eq_of_sub_eq_zero (norm_eq_zero.1 h))\n[GOAL]\ncase neg\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\nhxy : ¬x = y\nhxn : ‖x‖ ≠ 0\nhyn : ‖y‖ ≠ 0\nhxyn : ‖x - y‖ ≠ 0\n⊢ inner x (x - y) / (‖x‖ * ‖x - y‖) * (inner y (y - x) / (‖y‖ * ‖y - x‖)) -\n      Real.sin (angle x (x - y)) * Real.sin (angle y (y - x)) =\n    -(inner x y / (‖x‖ * ‖y‖))\n[PROOFSTEP]\napply mul_right_cancel₀ hxn\n[GOAL]\ncase neg\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\nhxy : ¬x = y\nhxn : ‖x‖ ≠ 0\nhyn : ‖y‖ ≠ 0\nhxyn : ‖x - y‖ ≠ 0\n⊢ (inner x (x - y) / (‖x‖ * ‖x - y‖) * (inner y (y - x) / (‖y‖ * ‖y - x‖)) -\n        Real.sin (angle x (x - y)) * Real.sin (angle y (y - x))) *\n      ‖x‖ =\n    -(inner x y / (‖x‖ * ‖y‖)) * ‖x‖\n[PROOFSTEP]\napply mul_right_cancel₀ hyn\n[GOAL]\ncase neg\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\nhxy : ¬x = y\nhxn : ‖x‖ ≠ 0\nhyn : ‖y‖ ≠ 0\nhxyn : ‖x - y‖ ≠ 0\n⊢ (inner x (x - y) / (‖x‖ * ‖x - y‖) * (inner y (y - x) / (‖y‖ * ‖y - x‖)) -\n          Real.sin (angle x (x - y)) * Real.sin (angle y (y - x))) *\n        ‖x‖ *\n      ‖y‖ =\n    -(inner x y / (‖x‖ * ‖y‖)) * ‖x‖ * ‖y‖\n[PROOFSTEP]\napply mul_right_cancel₀ hxyn\n[GOAL]\ncase neg\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\nhxy : ¬x = y\nhxn : ‖x‖ ≠ 0\nhyn : ‖y‖ ≠ 0\nhxyn : ‖x - y‖ ≠ 0\n⊢ (inner x (x - y) / (‖x‖ * ‖x - y‖) * (inner y (y - x) / (‖y‖ * ‖y - x‖)) -\n            Real.sin (angle x (x - y)) * Real.sin (angle y (y - x))) *\n          ‖x‖ *\n        ‖y‖ *\n      ‖x - y‖ =\n    -(inner x y / (‖x‖ * ‖y‖)) * ‖x‖ * ‖y‖ * ‖x - y‖\n[PROOFSTEP]\napply mul_right_cancel₀ hxyn\n[GOAL]\ncase neg\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\nhxy : ¬x = y\nhxn : ‖x‖ ≠ 0\nhyn : ‖y‖ ≠ 0\nhxyn : ‖x - y‖ ≠ 0\n⊢ (inner x (x - y) / (‖x‖ * ‖x - y‖) * (inner y (y - x) / (‖y‖ * ‖y - x‖)) -\n              Real.sin (angle x (x - y)) * Real.sin (angle y (y - x))) *\n            ‖x‖ *\n          ‖y‖ *\n        ‖x - y‖ *\n      ‖x - y‖ =\n    -(inner x y / (‖x‖ * ‖y‖)) * ‖x‖ * ‖y‖ * ‖x - y‖ * ‖x - y‖\n[PROOFSTEP]\nhave H1 :\n  Real.sin (angle x (x - y)) * Real.sin (angle y (y - x)) * ‖x‖ * ‖y‖ * ‖x - y‖ * ‖x - y‖ =\n    Real.sin (angle x (x - y)) * (‖x‖ * ‖x - y‖) * (Real.sin (angle y (y - x)) * (‖y‖ * ‖x - y‖)) :=\n  by ring\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\nhxy : ¬x = y\nhxn : ‖x‖ ≠ 0\nhyn : ‖y‖ ≠ 0\nhxyn : ‖x - y‖ ≠ 0\n⊢ Real.sin (angle x (x - y)) * Real.sin (angle y (y - x)) * ‖x‖ * ‖y‖ * ‖x - y‖ * ‖x - y‖ =\n    Real.sin (angle x (x - y)) * (‖x‖ * ‖x - y‖) * (Real.sin (angle y (y - x)) * (‖y‖ * ‖x - y‖))\n[PROOFSTEP]\nring\n[GOAL]\ncase neg\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\nhxy : ¬x = y\nhxn : ‖x‖ ≠ 0\nhyn : ‖y‖ ≠ 0\nhxyn : ‖x - y‖ ≠ 0\nH1 :\n  Real.sin (angle x (x - y)) * Real.sin (angle y (y - x)) * ‖x‖ * ‖y‖ * ‖x - y‖ * ‖x - y‖ =\n    Real.sin (angle x (x - y)) * (‖x‖ * ‖x - y‖) * (Real.sin (angle y (y - x)) * (‖y‖ * ‖x - y‖))\n⊢ (inner x (x - y) / (‖x‖ * ‖x - y‖) * (inner y (y - x) / (‖y‖ * ‖y - x‖)) -\n              Real.sin (angle x (x - y)) * Real.sin (angle y (y - x))) *\n            ‖x‖ *\n          ‖y‖ *\n        ‖x - y‖ *\n      ‖x - y‖ =\n    -(inner x y / (‖x‖ * ‖y‖)) * ‖x‖ * ‖y‖ * ‖x - y‖ * ‖x - y‖\n[PROOFSTEP]\nhave H2 :\n  ⟪x, x⟫ * (⟪x, x⟫ - ⟪x, y⟫ - (⟪x, y⟫ - ⟪y, y⟫)) - (⟪x, x⟫ - ⟪x, y⟫) * (⟪x, x⟫ - ⟪x, y⟫) =\n    ⟪x, x⟫ * ⟪y, y⟫ - ⟪x, y⟫ * ⟪x, y⟫ :=\n  by ring\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\nhxy : ¬x = y\nhxn : ‖x‖ ≠ 0\nhyn : ‖y‖ ≠ 0\nhxyn : ‖x - y‖ ≠ 0\nH1 :\n  Real.sin (angle x (x - y)) * Real.sin (angle y (y - x)) * ‖x‖ * ‖y‖ * ‖x - y‖ * ‖x - y‖ =\n    Real.sin (angle x (x - y)) * (‖x‖ * ‖x - y‖) * (Real.sin (angle y (y - x)) * (‖y‖ * ‖x - y‖))\n⊢ inner x x * (inner x x - inner x y - (inner x y - inner y y)) - (inner x x - inner x y) * (inner x x - inner x y) =\n    inner x x * inner y y - inner x y * inner x y\n[PROOFSTEP]\nring\n[GOAL]\ncase neg\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\nhxy : ¬x = y\nhxn : ‖x‖ ≠ 0\nhyn : ‖y‖ ≠ 0\nhxyn : ‖x - y‖ ≠ 0\nH1 :\n  Real.sin (angle x (x - y)) * Real.sin (angle y (y - x)) * ‖x‖ * ‖y‖ * ‖x - y‖ * ‖x - y‖ =\n    Real.sin (angle x (x - y)) * (‖x‖ * ‖x - y‖) * (Real.sin (angle y (y - x)) * (‖y‖ * ‖x - y‖))\nH2 :\n  inner x x * (inner x x - inner x y - (inner x y - inner y y)) - (inner x x - inner x y) * (inner x x - inner x y) =\n    inner x x * inner y y - inner x y * inner x y\n⊢ (inner x (x - y) / (‖x‖ * ‖x - y‖) * (inner y (y - x) / (‖y‖ * ‖y - x‖)) -\n              Real.sin (angle x (x - y)) * Real.sin (angle y (y - x))) *\n            ‖x‖ *\n          ‖y‖ *\n        ‖x - y‖ *\n      ‖x - y‖ =\n    -(inner x y / (‖x‖ * ‖y‖)) * ‖x‖ * ‖y‖ * ‖x - y‖ * ‖x - y‖\n[PROOFSTEP]\nhave H3 :\n  ⟪y, y⟫ * (⟪y, y⟫ - ⟪x, y⟫ - (⟪x, y⟫ - ⟪x, x⟫)) - (⟪y, y⟫ - ⟪x, y⟫) * (⟪y, y⟫ - ⟪x, y⟫) =\n    ⟪x, x⟫ * ⟪y, y⟫ - ⟪x, y⟫ * ⟪x, y⟫ :=\n  by ring\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\nhxy : ¬x = y\nhxn : ‖x‖ ≠ 0\nhyn : ‖y‖ ≠ 0\nhxyn : ‖x - y‖ ≠ 0\nH1 :\n  Real.sin (angle x (x - y)) * Real.sin (angle y (y - x)) * ‖x‖ * ‖y‖ * ‖x - y‖ * ‖x - y‖ =\n    Real.sin (angle x (x - y)) * (‖x‖ * ‖x - y‖) * (Real.sin (angle y (y - x)) * (‖y‖ * ‖x - y‖))\nH2 :\n  inner x x * (inner x x - inner x y - (inner x y - inner y y)) - (inner x x - inner x y) * (inner x x - inner x y) =\n    inner x x * inner y y - inner x y * inner x y\n⊢ inner y y * (inner y y - inner x y - (inner x y - inner x x)) - (inner y y - inner x y) * (inner y y - inner x y) =\n    inner x x * inner y y - inner x y * inner x y\n[PROOFSTEP]\nring\n[GOAL]\ncase neg\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\nhxy : ¬x = y\nhxn : ‖x‖ ≠ 0\nhyn : ‖y‖ ≠ 0\nhxyn : ‖x - y‖ ≠ 0\nH1 :\n  Real.sin (angle x (x - y)) * Real.sin (angle y (y - x)) * ‖x‖ * ‖y‖ * ‖x - y‖ * ‖x - y‖ =\n    Real.sin (angle x (x - y)) * (‖x‖ * ‖x - y‖) * (Real.sin (angle y (y - x)) * (‖y‖ * ‖x - y‖))\nH2 :\n  inner x x * (inner x x - inner x y - (inner x y - inner y y)) - (inner x x - inner x y) * (inner x x - inner x y) =\n    inner x x * inner y y - inner x y * inner x y\nH3 :\n  inner y y * (inner y y - inner x y - (inner x y - inner x x)) - (inner y y - inner x y) * (inner y y - inner x y) =\n    inner x x * inner y y - inner x y * inner x y\n⊢ (inner x (x - y) / (‖x‖ * ‖x - y‖) * (inner y (y - x) / (‖y‖ * ‖y - x‖)) -\n              Real.sin (angle x (x - y)) * Real.sin (angle y (y - x))) *\n            ‖x‖ *\n          ‖y‖ *\n        ‖x - y‖ *\n      ‖x - y‖ =\n    -(inner x y / (‖x‖ * ‖y‖)) * ‖x‖ * ‖y‖ * ‖x - y‖ * ‖x - y‖\n[PROOFSTEP]\nrw [mul_sub_right_distrib, mul_sub_right_distrib, mul_sub_right_distrib, mul_sub_right_distrib, H1,\n  sin_angle_mul_norm_mul_norm, norm_sub_rev x y, sin_angle_mul_norm_mul_norm, norm_sub_rev y x, inner_sub_left,\n  inner_sub_left, inner_sub_right, inner_sub_right, inner_sub_right, inner_sub_right, real_inner_comm x y, H2, H3,\n  Real.mul_self_sqrt (sub_nonneg_of_le (real_inner_mul_inner_self_le x y)), real_inner_self_eq_norm_mul_norm,\n  real_inner_self_eq_norm_mul_norm, real_inner_eq_norm_mul_self_add_norm_mul_self_sub_norm_sub_mul_self_div_two]\n[GOAL]\ncase neg\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\nhxy : ¬x = y\nhxn : ‖x‖ ≠ 0\nhyn : ‖y‖ ≠ 0\nhxyn : ‖x - y‖ ≠ 0\nH1 :\n  Real.sin (angle x (x - y)) * Real.sin (angle y (y - x)) * ‖x‖ * ‖y‖ * ‖x - y‖ * ‖x - y‖ =\n    Real.sin (angle x (x - y)) * (‖x‖ * ‖x - y‖) * (Real.sin (angle y (y - x)) * (‖y‖ * ‖x - y‖))\nH2 :\n  inner x x * (inner x x - inner x y - (inner x y - inner y y)) - (inner x x - inner x y) * (inner x x - inner x y) =\n    inner x x * inner y y - inner x y * inner x y\nH3 :\n  inner y y * (inner y y - inner x y - (inner x y - inner x x)) - (inner y y - inner x y) * (inner y y - inner x y) =\n    inner x x * inner y y - inner x y * inner x y\n⊢ (‖x‖ * ‖x‖ - (‖x‖ * ‖x‖ + ‖y‖ * ‖y‖ - ‖x - y‖ * ‖x - y‖) / 2) / (‖x‖ * ‖x - y‖) *\n                ((‖y‖ * ‖y‖ - (‖x‖ * ‖x‖ + ‖y‖ * ‖y‖ - ‖x - y‖ * ‖x - y‖) / 2) / (‖y‖ * ‖x - y‖)) *\n              ‖x‖ *\n            ‖y‖ *\n          ‖x - y‖ *\n        ‖x - y‖ -\n      (‖x‖ * ‖x‖ * (‖y‖ * ‖y‖) -\n        (‖x‖ * ‖x‖ + ‖y‖ * ‖y‖ - ‖x - y‖ * ‖x - y‖) / 2 * ((‖x‖ * ‖x‖ + ‖y‖ * ‖y‖ - ‖x - y‖ * ‖x - y‖) / 2)) =\n    -((‖x‖ * ‖x‖ + ‖y‖ * ‖y‖ - ‖x - y‖ * ‖x - y‖) / 2 / (‖x‖ * ‖y‖)) * ‖x‖ * ‖y‖ * ‖x - y‖ * ‖x - y‖\n[PROOFSTEP]\nfield_simp [hxn, hyn, hxyn]\n[GOAL]\ncase neg\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\nhxy : ¬x = y\nhxn : ‖x‖ ≠ 0\nhyn : ‖y‖ ≠ 0\nhxyn : ‖x - y‖ ≠ 0\nH1 :\n  Real.sin (angle x (x - y)) * Real.sin (angle y (y - x)) * ‖x‖ * ‖y‖ * ‖x - y‖ * ‖x - y‖ =\n    Real.sin (angle x (x - y)) * (‖x‖ * ‖x - y‖) * (Real.sin (angle y (y - x)) * (‖y‖ * ‖x - y‖))\nH2 :\n  inner x x * (inner x x - inner x y - (inner x y - inner y y)) - (inner x x - inner x y) * (inner x x - inner x y) =\n    inner x x * inner y y - inner x y * inner x y\nH3 :\n  inner y y * (inner y y - inner x y - (inner x y - inner x x)) - (inner y y - inner x y) * (inner y y - inner x y) =\n    inner x x * inner y y - inner x y * inner x y\n⊢ ((‖x‖ * ‖x‖ * 2 - (‖x‖ * ‖x‖ + ‖y‖ * ‖y‖ - ‖x - y‖ * ‖x - y‖)) *\n                    (‖y‖ * ‖y‖ * 2 - (‖x‖ * ‖x‖ + ‖y‖ * ‖y‖ - ‖x - y‖ * ‖x - y‖)) *\n                  ‖x‖ *\n                ‖y‖ *\n              ‖x - y‖ *\n            ‖x - y‖ *\n          (2 * 2) -\n        2 * (‖x‖ * ‖x - y‖) * (2 * (‖y‖ * ‖x - y‖)) *\n          (‖x‖ * ‖x‖ * (‖y‖ * ‖y‖) * (2 * 2) -\n            (‖x‖ * ‖x‖ + ‖y‖ * ‖y‖ - ‖x - y‖ * ‖x - y‖) * (‖x‖ * ‖x‖ + ‖y‖ * ‖y‖ - ‖x - y‖ * ‖x - y‖))) *\n      (2 * (‖x‖ * ‖y‖)) =\n    (‖x - y‖ * ‖x - y‖ - (‖x‖ * ‖x‖ + ‖y‖ * ‖y‖)) * ‖x‖ * ‖y‖ * ‖x - y‖ * ‖x - y‖ *\n      (2 * (‖x‖ * ‖x - y‖) * (2 * (‖y‖ * ‖x - y‖)) * (2 * 2))\n[PROOFSTEP]\nring\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\n⊢ Real.sin (angle x (x - y) + angle y (y - x)) = Real.sin (angle x y)\n[PROOFSTEP]\nby_cases hxy : x = y\n[GOAL]\ncase pos\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\nhxy : x = y\n⊢ Real.sin (angle x (x - y) + angle y (y - x)) = Real.sin (angle x y)\n[PROOFSTEP]\nrw [hxy, angle_self hy]\n[GOAL]\ncase pos\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\nhxy : x = y\n⊢ Real.sin (angle y (y - y) + angle y (y - y)) = Real.sin 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\nhxy : ¬x = y\n⊢ Real.sin (angle x (x - y) + angle y (y - x)) = Real.sin (angle x y)\n[PROOFSTEP]\nrw [Real.sin_add, cos_angle, cos_angle]\n[GOAL]\ncase neg\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\nhxy : ¬x = y\n⊢ Real.sin (angle x (x - y)) * (inner y (y - x) / (‖y‖ * ‖y - x‖)) +\n      inner x (x - y) / (‖x‖ * ‖x - y‖) * Real.sin (angle y (y - x)) =\n    Real.sin (angle x y)\n[PROOFSTEP]\nhave hxn : ‖x‖ ≠ 0 := fun h => hx (norm_eq_zero.1 h)\n[GOAL]\ncase neg\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\nhxy : ¬x = y\nhxn : ‖x‖ ≠ 0\n⊢ Real.sin (angle x (x - y)) * (inner y (y - x) / (‖y‖ * ‖y - x‖)) +\n      inner x (x - y) / (‖x‖ * ‖x - y‖) * Real.sin (angle y (y - x)) =\n    Real.sin (angle x y)\n[PROOFSTEP]\nhave hyn : ‖y‖ ≠ 0 := fun h => hy (norm_eq_zero.1 h)\n[GOAL]\ncase neg\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\nhxy : ¬x = y\nhxn : ‖x‖ ≠ 0\nhyn : ‖y‖ ≠ 0\n⊢ Real.sin (angle x (x - y)) * (inner y (y - x) / (‖y‖ * ‖y - x‖)) +\n      inner x (x - y) / (‖x‖ * ‖x - y‖) * Real.sin (angle y (y - x)) =\n    Real.sin (angle x y)\n[PROOFSTEP]\nhave hxyn : ‖x - y‖ ≠ 0 := fun h => hxy (eq_of_sub_eq_zero (norm_eq_zero.1 h))\n[GOAL]\ncase neg\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\nhxy : ¬x = y\nhxn : ‖x‖ ≠ 0\nhyn : ‖y‖ ≠ 0\nhxyn : ‖x - y‖ ≠ 0\n⊢ Real.sin (angle x (x - y)) * (inner y (y - x) / (‖y‖ * ‖y - x‖)) +\n      inner x (x - y) / (‖x‖ * ‖x - y‖) * Real.sin (angle y (y - x)) =\n    Real.sin (angle x y)\n[PROOFSTEP]\napply mul_right_cancel₀ hxn\n[GOAL]\ncase neg\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\nhxy : ¬x = y\nhxn : ‖x‖ ≠ 0\nhyn : ‖y‖ ≠ 0\nhxyn : ‖x - y‖ ≠ 0\n⊢ (Real.sin (angle x (x - y)) * (inner y (y - x) / (‖y‖ * ‖y - x‖)) +\n        inner x (x - y) / (‖x‖ * ‖x - y‖) * Real.sin (angle y (y - x))) *\n      ‖x‖ =\n    Real.sin (angle x y) * ‖x‖\n[PROOFSTEP]\napply mul_right_cancel₀ hyn\n[GOAL]\ncase neg\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\nhxy : ¬x = y\nhxn : ‖x‖ ≠ 0\nhyn : ‖y‖ ≠ 0\nhxyn : ‖x - y‖ ≠ 0\n⊢ (Real.sin (angle x (x - y)) * (inner y (y - x) / (‖y‖ * ‖y - x‖)) +\n          inner x (x - y) / (‖x‖ * ‖x - y‖) * Real.sin (angle y (y - x))) *\n        ‖x‖ *\n      ‖y‖ =\n    Real.sin (angle x y) * ‖x‖ * ‖y‖\n[PROOFSTEP]\napply mul_right_cancel₀ hxyn\n[GOAL]\ncase neg\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\nhxy : ¬x = y\nhxn : ‖x‖ ≠ 0\nhyn : ‖y‖ ≠ 0\nhxyn : ‖x - y‖ ≠ 0\n⊢ (Real.sin (angle x (x - y)) * (inner y (y - x) / (‖y‖ * ‖y - x‖)) +\n            inner x (x - y) / (‖x‖ * ‖x - y‖) * Real.sin (angle y (y - x))) *\n          ‖x‖ *\n        ‖y‖ *\n      ‖x - y‖ =\n    Real.sin (angle x y) * ‖x‖ * ‖y‖ * ‖x - y‖\n[PROOFSTEP]\napply mul_right_cancel₀ hxyn\n[GOAL]\ncase neg\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\nhxy : ¬x = y\nhxn : ‖x‖ ≠ 0\nhyn : ‖y‖ ≠ 0\nhxyn : ‖x - y‖ ≠ 0\n⊢ (Real.sin (angle x (x - y)) * (inner y (y - x) / (‖y‖ * ‖y - x‖)) +\n              inner x (x - y) / (‖x‖ * ‖x - y‖) * Real.sin (angle y (y - x))) *\n            ‖x‖ *\n          ‖y‖ *\n        ‖x - y‖ *\n      ‖x - y‖ =\n    Real.sin (angle x y) * ‖x‖ * ‖y‖ * ‖x - y‖ * ‖x - y‖\n[PROOFSTEP]\nhave H1 :\n  Real.sin (angle x (x - y)) * (⟪y, y - x⟫ / (‖y‖ * ‖y - x‖)) * ‖x‖ * ‖y‖ * ‖x - y‖ =\n    Real.sin (angle x (x - y)) * (‖x‖ * ‖x - y‖) * (⟪y, y - x⟫ / (‖y‖ * ‖y - x‖)) * ‖y‖ :=\n  by ring\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\nhxy : ¬x = y\nhxn : ‖x‖ ≠ 0\nhyn : ‖y‖ ≠ 0\nhxyn : ‖x - y‖ ≠ 0\n⊢ Real.sin (angle x (x - y)) * (inner y (y - x) / (‖y‖ * ‖y - x‖)) * ‖x‖ * ‖y‖ * ‖x - y‖ =\n    Real.sin (angle x (x - y)) * (‖x‖ * ‖x - y‖) * (inner y (y - x) / (‖y‖ * ‖y - x‖)) * ‖y‖\n[PROOFSTEP]\nring\n[GOAL]\ncase neg\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\nhxy : ¬x = y\nhxn : ‖x‖ ≠ 0\nhyn : ‖y‖ ≠ 0\nhxyn : ‖x - y‖ ≠ 0\nH1 :\n  Real.sin (angle x (x - y)) * (inner y (y - x) / (‖y‖ * ‖y - x‖)) * ‖x‖ * ‖y‖ * ‖x - y‖ =\n    Real.sin (angle x (x - y)) * (‖x‖ * ‖x - y‖) * (inner y (y - x) / (‖y‖ * ‖y - x‖)) * ‖y‖\n⊢ (Real.sin (angle x (x - y)) * (inner y (y - x) / (‖y‖ * ‖y - x‖)) +\n              inner x (x - y) / (‖x‖ * ‖x - y‖) * Real.sin (angle y (y - x))) *\n            ‖x‖ *\n          ‖y‖ *\n        ‖x - y‖ *\n      ‖x - y‖ =\n    Real.sin (angle x y) * ‖x‖ * ‖y‖ * ‖x - y‖ * ‖x - y‖\n[PROOFSTEP]\nhave H2 :\n  ⟪x, x - y⟫ / (‖x‖ * ‖y - x‖) * Real.sin (angle y (y - x)) * ‖x‖ * ‖y‖ * ‖y - x‖ =\n    ⟪x, x - y⟫ / (‖x‖ * ‖y - x‖) * (Real.sin (angle y (y - x)) * (‖y‖ * ‖y - x‖)) * ‖x‖ :=\n  by ring\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\nhxy : ¬x = y\nhxn : ‖x‖ ≠ 0\nhyn : ‖y‖ ≠ 0\nhxyn : ‖x - y‖ ≠ 0\nH1 :\n  Real.sin (angle x (x - y)) * (inner y (y - x) / (‖y‖ * ‖y - x‖)) * ‖x‖ * ‖y‖ * ‖x - y‖ =\n    Real.sin (angle x (x - y)) * (‖x‖ * ‖x - y‖) * (inner y (y - x) / (‖y‖ * ‖y - x‖)) * ‖y‖\n⊢ inner x (x - y) / (‖x‖ * ‖y - x‖) * Real.sin (angle y (y - x)) * ‖x‖ * ‖y‖ * ‖y - x‖ =\n    inner x (x - y) / (‖x‖ * ‖y - x‖) * (Real.sin (angle y (y - x)) * (‖y‖ * ‖y - x‖)) * ‖x‖\n[PROOFSTEP]\nring\n[GOAL]\ncase neg\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\nhxy : ¬x = y\nhxn : ‖x‖ ≠ 0\nhyn : ‖y‖ ≠ 0\nhxyn : ‖x - y‖ ≠ 0\nH1 :\n  Real.sin (angle x (x - y)) * (inner y (y - x) / (‖y‖ * ‖y - x‖)) * ‖x‖ * ‖y‖ * ‖x - y‖ =\n    Real.sin (angle x (x - y)) * (‖x‖ * ‖x - y‖) * (inner y (y - x) / (‖y‖ * ‖y - x‖)) * ‖y‖\nH2 :\n  inner x (x - y) / (‖x‖ * ‖y - x‖) * Real.sin (angle y (y - x)) * ‖x‖ * ‖y‖ * ‖y - x‖ =\n    inner x (x - y) / (‖x‖ * ‖y - x‖) * (Real.sin (angle y (y - x)) * (‖y‖ * ‖y - x‖)) * ‖x‖\n⊢ (Real.sin (angle x (x - y)) * (inner y (y - x) / (‖y‖ * ‖y - x‖)) +\n              inner x (x - y) / (‖x‖ * ‖x - y‖) * Real.sin (angle y (y - x))) *\n            ‖x‖ *\n          ‖y‖ *\n        ‖x - y‖ *\n      ‖x - y‖ =\n    Real.sin (angle x y) * ‖x‖ * ‖y‖ * ‖x - y‖ * ‖x - y‖\n[PROOFSTEP]\nhave H3 :\n  ⟪x, x⟫ * (⟪x, x⟫ - ⟪x, y⟫ - (⟪x, y⟫ - ⟪y, y⟫)) - (⟪x, x⟫ - ⟪x, y⟫) * (⟪x, x⟫ - ⟪x, y⟫) =\n    ⟪x, x⟫ * ⟪y, y⟫ - ⟪x, y⟫ * ⟪x, y⟫ :=\n  by ring\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\nhxy : ¬x = y\nhxn : ‖x‖ ≠ 0\nhyn : ‖y‖ ≠ 0\nhxyn : ‖x - y‖ ≠ 0\nH1 :\n  Real.sin (angle x (x - y)) * (inner y (y - x) / (‖y‖ * ‖y - x‖)) * ‖x‖ * ‖y‖ * ‖x - y‖ =\n    Real.sin (angle x (x - y)) * (‖x‖ * ‖x - y‖) * (inner y (y - x) / (‖y‖ * ‖y - x‖)) * ‖y‖\nH2 :\n  inner x (x - y) / (‖x‖ * ‖y - x‖) * Real.sin (angle y (y - x)) * ‖x‖ * ‖y‖ * ‖y - x‖ =\n    inner x (x - y) / (‖x‖ * ‖y - x‖) * (Real.sin (angle y (y - x)) * (‖y‖ * ‖y - x‖)) * ‖x‖\n⊢ inner x x * (inner x x - inner x y - (inner x y - inner y y)) - (inner x x - inner x y) * (inner x x - inner x y) =\n    inner x x * inner y y - inner x y * inner x y\n[PROOFSTEP]\nring\n[GOAL]\ncase neg\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\nhxy : ¬x = y\nhxn : ‖x‖ ≠ 0\nhyn : ‖y‖ ≠ 0\nhxyn : ‖x - y‖ ≠ 0\nH1 :\n  Real.sin (angle x (x - y)) * (inner y (y - x) / (‖y‖ * ‖y - x‖)) * ‖x‖ * ‖y‖ * ‖x - y‖ =\n    Real.sin (angle x (x - y)) * (‖x‖ * ‖x - y‖) * (inner y (y - x) / (‖y‖ * ‖y - x‖)) * ‖y‖\nH2 :\n  inner x (x - y) / (‖x‖ * ‖y - x‖) * Real.sin (angle y (y - x)) * ‖x‖ * ‖y‖ * ‖y - x‖ =\n    inner x (x - y) / (‖x‖ * ‖y - x‖) * (Real.sin (angle y (y - x)) * (‖y‖ * ‖y - x‖)) * ‖x‖\nH3 :\n  inner x x * (inner x x - inner x y - (inner x y - inner y y)) - (inner x x - inner x y) * (inner x x - inner x y) =\n    inner x x * inner y y - inner x y * inner x y\n⊢ (Real.sin (angle x (x - y)) * (inner y (y - x) / (‖y‖ * ‖y - x‖)) +\n              inner x (x - y) / (‖x‖ * ‖x - y‖) * Real.sin (angle y (y - x))) *\n            ‖x‖ *\n          ‖y‖ *\n        ‖x - y‖ *\n      ‖x - y‖ =\n    Real.sin (angle x y) * ‖x‖ * ‖y‖ * ‖x - y‖ * ‖x - y‖\n[PROOFSTEP]\nhave H4 :\n  ⟪y, y⟫ * (⟪y, y⟫ - ⟪x, y⟫ - (⟪x, y⟫ - ⟪x, x⟫)) - (⟪y, y⟫ - ⟪x, y⟫) * (⟪y, y⟫ - ⟪x, y⟫) =\n    ⟪x, x⟫ * ⟪y, y⟫ - ⟪x, y⟫ * ⟪x, y⟫ :=\n  by ring\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\nhxy : ¬x = y\nhxn : ‖x‖ ≠ 0\nhyn : ‖y‖ ≠ 0\nhxyn : ‖x - y‖ ≠ 0\nH1 :\n  Real.sin (angle x (x - y)) * (inner y (y - x) / (‖y‖ * ‖y - x‖)) * ‖x‖ * ‖y‖ * ‖x - y‖ =\n    Real.sin (angle x (x - y)) * (‖x‖ * ‖x - y‖) * (inner y (y - x) / (‖y‖ * ‖y - x‖)) * ‖y‖\nH2 :\n  inner x (x - y) / (‖x‖ * ‖y - x‖) * Real.sin (angle y (y - x)) * ‖x‖ * ‖y‖ * ‖y - x‖ =\n    inner x (x - y) / (‖x‖ * ‖y - x‖) * (Real.sin (angle y (y - x)) * (‖y‖ * ‖y - x‖)) * ‖x‖\nH3 :\n  inner x x * (inner x x - inner x y - (inner x y - inner y y)) - (inner x x - inner x y) * (inner x x - inner x y) =\n    inner x x * inner y y - inner x y * inner x y\n⊢ inner y y * (inner y y - inner x y - (inner x y - inner x x)) - (inner y y - inner x y) * (inner y y - inner x y) =\n    inner x x * inner y y - inner x y * inner x y\n[PROOFSTEP]\nring\n[GOAL]\ncase neg\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\nhxy : ¬x = y\nhxn : ‖x‖ ≠ 0\nhyn : ‖y‖ ≠ 0\nhxyn : ‖x - y‖ ≠ 0\nH1 :\n  Real.sin (angle x (x - y)) * (inner y (y - x) / (‖y‖ * ‖y - x‖)) * ‖x‖ * ‖y‖ * ‖x - y‖ =\n    Real.sin (angle x (x - y)) * (‖x‖ * ‖x - y‖) * (inner y (y - x) / (‖y‖ * ‖y - x‖)) * ‖y‖\nH2 :\n  inner x (x - y) / (‖x‖ * ‖y - x‖) * Real.sin (angle y (y - x)) * ‖x‖ * ‖y‖ * ‖y - x‖ =\n    inner x (x - y) / (‖x‖ * ‖y - x‖) * (Real.sin (angle y (y - x)) * (‖y‖ * ‖y - x‖)) * ‖x‖\nH3 :\n  inner x x * (inner x x - inner x y - (inner x y - inner y y)) - (inner x x - inner x y) * (inner x x - inner x y) =\n    inner x x * inner y y - inner x y * inner x y\nH4 :\n  inner y y * (inner y y - inner x y - (inner x y - inner x x)) - (inner y y - inner x y) * (inner y y - inner x y) =\n    inner x x * inner y y - inner x y * inner x y\n⊢ (Real.sin (angle x (x - y)) * (inner y (y - x) / (‖y‖ * ‖y - x‖)) +\n              inner x (x - y) / (‖x‖ * ‖x - y‖) * Real.sin (angle y (y - x))) *\n            ‖x‖ *\n          ‖y‖ *\n        ‖x - y‖ *\n      ‖x - y‖ =\n    Real.sin (angle x y) * ‖x‖ * ‖y‖ * ‖x - y‖ * ‖x - y‖\n[PROOFSTEP]\nrw [right_distrib, right_distrib, right_distrib, right_distrib, H1, sin_angle_mul_norm_mul_norm, norm_sub_rev x y, H2,\n  sin_angle_mul_norm_mul_norm, norm_sub_rev y x, mul_assoc (Real.sin (angle x y)), sin_angle_mul_norm_mul_norm,\n  inner_sub_left, inner_sub_left, inner_sub_right, inner_sub_right, inner_sub_right, inner_sub_right,\n  real_inner_comm x y, H3, H4, real_inner_self_eq_norm_mul_norm, real_inner_self_eq_norm_mul_norm,\n  real_inner_eq_norm_mul_self_add_norm_mul_self_sub_norm_sub_mul_self_div_two]\n[GOAL]\ncase neg\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\nhxy : ¬x = y\nhxn : ‖x‖ ≠ 0\nhyn : ‖y‖ ≠ 0\nhxyn : ‖x - y‖ ≠ 0\nH1 :\n  Real.sin (angle x (x - y)) * (inner y (y - x) / (‖y‖ * ‖y - x‖)) * ‖x‖ * ‖y‖ * ‖x - y‖ =\n    Real.sin (angle x (x - y)) * (‖x‖ * ‖x - y‖) * (inner y (y - x) / (‖y‖ * ‖y - x‖)) * ‖y‖\nH2 :\n  inner x (x - y) / (‖x‖ * ‖y - x‖) * Real.sin (angle y (y - x)) * ‖x‖ * ‖y‖ * ‖y - x‖ =\n    inner x (x - y) / (‖x‖ * ‖y - x‖) * (Real.sin (angle y (y - x)) * (‖y‖ * ‖y - x‖)) * ‖x‖\nH3 :\n  inner x x * (inner x x - inner x y - (inner x y - inner y y)) - (inner x x - inner x y) * (inner x x - inner x y) =\n    inner x x * inner y y - inner x y * inner x y\nH4 :\n  inner y y * (inner y y - inner x y - (inner x y - inner x x)) - (inner y y - inner x y) * (inner y y - inner x y) =\n    inner x x * inner y y - inner x y * inner x y\n⊢ Real.sqrt\n              (‖x‖ * ‖x‖ * (‖y‖ * ‖y‖) -\n                (‖x‖ * ‖x‖ + ‖y‖ * ‖y‖ - ‖x - y‖ * ‖x - y‖) / 2 * ((‖x‖ * ‖x‖ + ‖y‖ * ‖y‖ - ‖x - y‖ * ‖x - y‖) / 2)) *\n            ((‖y‖ * ‖y‖ - (‖x‖ * ‖x‖ + ‖y‖ * ‖y‖ - ‖x - y‖ * ‖x - y‖) / 2) / (‖y‖ * ‖x - y‖)) *\n          ‖y‖ *\n        ‖x - y‖ +\n      (‖x‖ * ‖x‖ - (‖x‖ * ‖x‖ + ‖y‖ * ‖y‖ - ‖x - y‖ * ‖x - y‖) / 2) / (‖x‖ * ‖x - y‖) *\n            Real.sqrt\n              (‖x‖ * ‖x‖ * (‖y‖ * ‖y‖) -\n                (‖x‖ * ‖x‖ + ‖y‖ * ‖y‖ - ‖x - y‖ * ‖x - y‖) / 2 * ((‖x‖ * ‖x‖ + ‖y‖ * ‖y‖ - ‖x - y‖ * ‖x - y‖) / 2)) *\n          ‖x‖ *\n        ‖x - y‖ =\n    Real.sqrt\n          (‖x‖ * ‖x‖ * (‖y‖ * ‖y‖) -\n            (‖x‖ * ‖x‖ + ‖y‖ * ‖y‖ - ‖x - y‖ * ‖x - y‖) / 2 * ((‖x‖ * ‖x‖ + ‖y‖ * ‖y‖ - ‖x - y‖ * ‖x - y‖) / 2)) *\n        ‖x - y‖ *\n      ‖x - y‖\n[PROOFSTEP]\nfield_simp [hxn, hyn, hxyn]\n[GOAL]\ncase neg\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\nhxy : ¬x = y\nhxn : ‖x‖ ≠ 0\nhyn : ‖y‖ ≠ 0\nhxyn : ‖x - y‖ ≠ 0\nH1 :\n  Real.sin (angle x (x - y)) * (inner y (y - x) / (‖y‖ * ‖y - x‖)) * ‖x‖ * ‖y‖ * ‖x - y‖ =\n    Real.sin (angle x (x - y)) * (‖x‖ * ‖x - y‖) * (inner y (y - x) / (‖y‖ * ‖y - x‖)) * ‖y‖\nH2 :\n  inner x (x - y) / (‖x‖ * ‖y - x‖) * Real.sin (angle y (y - x)) * ‖x‖ * ‖y‖ * ‖y - x‖ =\n    inner x (x - y) / (‖x‖ * ‖y - x‖) * (Real.sin (angle y (y - x)) * (‖y‖ * ‖y - x‖)) * ‖x‖\nH3 :\n  inner x x * (inner x x - inner x y - (inner x y - inner y y)) - (inner x x - inner x y) * (inner x x - inner x y) =\n    inner x x * inner y y - inner x y * inner x y\nH4 :\n  inner y y * (inner y y - inner x y - (inner x y - inner x x)) - (inner y y - inner x y) * (inner y y - inner x y) =\n    inner x x * inner y y - inner x y * inner x y\n⊢ Real.sqrt\n                ((‖x‖ * ‖x‖ * (‖y‖ * ‖y‖) * (2 * 2) -\n                    (‖x‖ * ‖x‖ + ‖y‖ * ‖y‖ - ‖x - y‖ * ‖x - y‖) * (‖x‖ * ‖x‖ + ‖y‖ * ‖y‖ - ‖x - y‖ * ‖x - y‖)) /\n                  (2 * 2)) *\n              (‖y‖ * ‖y‖ * 2 - (‖x‖ * ‖x‖ + ‖y‖ * ‖y‖ - ‖x - y‖ * ‖x - y‖)) *\n            ‖y‖ *\n          ‖x - y‖ *\n        (2 * (‖x‖ * ‖x - y‖)) +\n      (‖x‖ * ‖x‖ * 2 - (‖x‖ * ‖x‖ + ‖y‖ * ‖y‖ - ‖x - y‖ * ‖x - y‖)) *\n              Real.sqrt\n                ((‖x‖ * ‖x‖ * (‖y‖ * ‖y‖) * (2 * 2) -\n                    (‖x‖ * ‖x‖ + ‖y‖ * ‖y‖ - ‖x - y‖ * ‖x - y‖) * (‖x‖ * ‖x‖ + ‖y‖ * ‖y‖ - ‖x - y‖ * ‖x - y‖)) /\n                  (2 * 2)) *\n            ‖x‖ *\n          ‖x - y‖ *\n        (2 * (‖y‖ * ‖x - y‖)) =\n    Real.sqrt\n            ((‖x‖ * ‖x‖ * (‖y‖ * ‖y‖) * (2 * 2) -\n                (‖x‖ * ‖x‖ + ‖y‖ * ‖y‖ - ‖x - y‖ * ‖x - y‖) * (‖x‖ * ‖x‖ + ‖y‖ * ‖y‖ - ‖x - y‖ * ‖x - y‖)) /\n              (2 * 2)) *\n          ‖x - y‖ *\n        ‖x - y‖ *\n      (2 * (‖y‖ * ‖x - y‖) * (2 * (‖x‖ * ‖x - y‖)))\n[PROOFSTEP]\nring\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\n⊢ Real.cos (angle x y + angle x (x - y) + angle y (y - x)) = -1\n[PROOFSTEP]\nrw [add_assoc, Real.cos_add, cos_angle_sub_add_angle_sub_rev_eq_neg_cos_angle hx hy,\n  sin_angle_sub_add_angle_sub_rev_eq_sin_angle hx hy, mul_neg, ← neg_add', add_comm, ← sq, ← sq, Real.sin_sq_add_cos_sq]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\n⊢ Real.sin (angle x y + angle x (x - y) + angle y (y - x)) = 0\n[PROOFSTEP]\nrw [add_assoc, Real.sin_add, cos_angle_sub_add_angle_sub_rev_eq_neg_cos_angle hx hy,\n  sin_angle_sub_add_angle_sub_rev_eq_sin_angle hx hy]\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\n⊢ Real.sin (angle x y) * -Real.cos (angle x y) + Real.cos (angle x y) * Real.sin (angle x y) = 0\n[PROOFSTEP]\nring\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\n⊢ angle x y + angle x (x - y) + angle y (y - x) = π\n[PROOFSTEP]\nhave hcos := cos_angle_add_angle_sub_add_angle_sub_eq_neg_one hx hy\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\nhcos : Real.cos (angle x y + angle x (x - y) + angle y (y - x)) = -1\n⊢ angle x y + angle x (x - y) + angle y (y - x) = π\n[PROOFSTEP]\nhave hsin := sin_angle_add_angle_sub_add_angle_sub_eq_zero hx hy\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\nhcos : Real.cos (angle x y + angle x (x - y) + angle y (y - x)) = -1\nhsin : Real.sin (angle x y + angle x (x - y) + angle y (y - x)) = 0\n⊢ angle x y + angle x (x - y) + angle y (y - x) = π\n[PROOFSTEP]\nrw [Real.sin_eq_zero_iff] at hsin \n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\nhcos : Real.cos (angle x y + angle x (x - y) + angle y (y - x)) = -1\nhsin : ∃ n, ↑n * π = angle x y + angle x (x - y) + angle y (y - x)\n⊢ angle x y + angle x (x - y) + angle y (y - x) = π\n[PROOFSTEP]\ncases' hsin with n hn\n[GOAL]\ncase intro\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\nhcos : Real.cos (angle x y + angle x (x - y) + angle y (y - x)) = -1\nn : ℤ\nhn : ↑n * π = angle x y + angle x (x - y) + angle y (y - x)\n⊢ angle x y + angle x (x - y) + angle y (y - x) = π\n[PROOFSTEP]\nsymm at hn \n[GOAL]\ncase intro\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\nhcos : Real.cos (angle x y + angle x (x - y) + angle y (y - x)) = -1\nn : ℤ\nhn : angle x y + angle x (x - y) + angle y (y - x) = ↑n * π\n⊢ angle x y + angle x (x - y) + angle y (y - x) = π\n[PROOFSTEP]\nhave h0 : 0 ≤ angle x y + angle x (x - y) + angle y (y - x) :=\n  add_nonneg (add_nonneg (angle_nonneg _ _) (angle_nonneg _ _)) (angle_nonneg _ _)\n[GOAL]\ncase intro\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\nhcos : Real.cos (angle x y + angle x (x - y) + angle y (y - x)) = -1\nn : ℤ\nhn : angle x y + angle x (x - y) + angle y (y - x) = ↑n * π\nh0 : 0 ≤ angle x y + angle x (x - y) + angle y (y - x)\n⊢ angle x y + angle x (x - y) + angle y (y - x) = π\n[PROOFSTEP]\nhave h3lt : angle x y + angle x (x - y) + angle y (y - x) < π + π + π :=\n  by\n  by_contra hnlt\n  have hxy : angle x y = π := by\n    by_contra hxy\n    exact\n      hnlt\n        (add_lt_add_of_lt_of_le (add_lt_add_of_lt_of_le (lt_of_le_of_ne (angle_le_pi _ _) hxy) (angle_le_pi _ _))\n          (angle_le_pi _ _))\n  rw [hxy] at hnlt \n  rw [angle_eq_pi_iff] at hxy \n  rcases hxy with ⟨hx, ⟨r, ⟨hr, hxr⟩⟩⟩\n  rw [hxr, ← one_smul ℝ x, ← mul_smul, mul_one, ← sub_smul, one_smul, sub_eq_add_neg,\n    angle_smul_right_of_pos _ _ (add_pos zero_lt_one (neg_pos_of_neg hr)), angle_self hx, add_zero] at hnlt \n  apply hnlt\n  rw [add_assoc]\n  exact add_lt_add_left (lt_of_le_of_lt (angle_le_pi _ _) (lt_add_of_pos_right π Real.pi_pos)) _\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\nhcos : Real.cos (angle x y + angle x (x - y) + angle y (y - x)) = -1\nn : ℤ\nhn : angle x y + angle x (x - y) + angle y (y - x) = ↑n * π\nh0 : 0 ≤ angle x y + angle x (x - y) + angle y (y - x)\n⊢ angle x y + angle x (x - y) + angle y (y - x) < π + π + π\n[PROOFSTEP]\nby_contra hnlt\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\nhcos : Real.cos (angle x y + angle x (x - y) + angle y (y - x)) = -1\nn : ℤ\nhn : angle x y + angle x (x - y) + angle y (y - x) = ↑n * π\nh0 : 0 ≤ angle x y + angle x (x - y) + angle y (y - x)\nhnlt : ¬angle x y + angle x (x - y) + angle y (y - x) < π + π + π\n⊢ False\n[PROOFSTEP]\nhave hxy : angle x y = π := by\n  by_contra hxy\n  exact\n    hnlt\n      (add_lt_add_of_lt_of_le (add_lt_add_of_lt_of_le (lt_of_le_of_ne (angle_le_pi _ _) hxy) (angle_le_pi _ _))\n        (angle_le_pi _ _))\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\nhcos : Real.cos (angle x y + angle x (x - y) + angle y (y - x)) = -1\nn : ℤ\nhn : angle x y + angle x (x - y) + angle y (y - x) = ↑n * π\nh0 : 0 ≤ angle x y + angle x (x - y) + angle y (y - x)\nhnlt : ¬angle x y + angle x (x - y) + angle y (y - x) < π + π + π\n⊢ angle x y = π\n[PROOFSTEP]\nby_contra hxy\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\nhcos : Real.cos (angle x y + angle x (x - y) + angle y (y - x)) = -1\nn : ℤ\nhn : angle x y + angle x (x - y) + angle y (y - x) = ↑n * π\nh0 : 0 ≤ angle x y + angle x (x - y) + angle y (y - x)\nhnlt : ¬angle x y + angle x (x - y) + angle y (y - x) < π + π + π\nhxy : ¬angle x y = π\n⊢ False\n[PROOFSTEP]\nexact\n  hnlt\n    (add_lt_add_of_lt_of_le (add_lt_add_of_lt_of_le (lt_of_le_of_ne (angle_le_pi _ _) hxy) (angle_le_pi _ _))\n      (angle_le_pi _ _))\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\nhcos : Real.cos (angle x y + angle x (x - y) + angle y (y - x)) = -1\nn : ℤ\nhn : angle x y + angle x (x - y) + angle y (y - x) = ↑n * π\nh0 : 0 ≤ angle x y + angle x (x - y) + angle y (y - x)\nhnlt : ¬angle x y + angle x (x - y) + angle y (y - x) < π + π + π\nhxy : angle x y = π\n⊢ False\n[PROOFSTEP]\nrw [hxy] at hnlt \n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\nhcos : Real.cos (angle x y + angle x (x - y) + angle y (y - x)) = -1\nn : ℤ\nhn : angle x y + angle x (x - y) + angle y (y - x) = ↑n * π\nh0 : 0 ≤ angle x y + angle x (x - y) + angle y (y - x)\nhnlt : ¬π + angle x (x - y) + angle y (y - x) < π + π + π\nhxy : angle x y = π\n⊢ False\n[PROOFSTEP]\nrw [angle_eq_pi_iff] at hxy \n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\nhcos : Real.cos (angle x y + angle x (x - y) + angle y (y - x)) = -1\nn : ℤ\nhn : angle x y + angle x (x - y) + angle y (y - x) = ↑n * π\nh0 : 0 ≤ angle x y + angle x (x - y) + angle y (y - x)\nhnlt : ¬π + angle x (x - y) + angle y (y - x) < π + π + π\nhxy : x ≠ 0 ∧ ∃ r, r < 0 ∧ y = r • x\n⊢ False\n[PROOFSTEP]\nrcases hxy with ⟨hx, ⟨r, ⟨hr, hxr⟩⟩⟩\n[GOAL]\ncase intro.intro.intro\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhx✝ : x ≠ 0\nhy : y ≠ 0\nhcos : Real.cos (angle x y + angle x (x - y) + angle y (y - x)) = -1\nn : ℤ\nhn : angle x y + angle x (x - y) + angle y (y - x) = ↑n * π\nh0 : 0 ≤ angle x y + angle x (x - y) + angle y (y - x)\nhnlt : ¬π + angle x (x - y) + angle y (y - x) < π + π + π\nhx : x ≠ 0\nr : ℝ\nhr : r < 0\nhxr : y = r • x\n⊢ False\n[PROOFSTEP]\nrw [hxr, ← one_smul ℝ x, ← mul_smul, mul_one, ← sub_smul, one_smul, sub_eq_add_neg,\n  angle_smul_right_of_pos _ _ (add_pos zero_lt_one (neg_pos_of_neg hr)), angle_self hx, add_zero] at hnlt \n[GOAL]\ncase intro.intro.intro\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhx✝ : x ≠ 0\nhy : y ≠ 0\nhcos : Real.cos (angle x y + angle x (x - y) + angle y (y - x)) = -1\nn : ℤ\nhn : angle x y + angle x (x - y) + angle y (y - x) = ↑n * π\nh0 : 0 ≤ angle x y + angle x (x - y) + angle y (y - x)\nhx : x ≠ 0\nr : ℝ\nhnlt : ¬π + angle (r • x) (r • x - x) < π + π + π\nhr : r < 0\nhxr : y = r • x\n⊢ False\n[PROOFSTEP]\napply hnlt\n[GOAL]\ncase intro.intro.intro\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhx✝ : x ≠ 0\nhy : y ≠ 0\nhcos : Real.cos (angle x y + angle x (x - y) + angle y (y - x)) = -1\nn : ℤ\nhn : angle x y + angle x (x - y) + angle y (y - x) = ↑n * π\nh0 : 0 ≤ angle x y + angle x (x - y) + angle y (y - x)\nhx : x ≠ 0\nr : ℝ\nhnlt : ¬π + angle (r • x) (r • x - x) < π + π + π\nhr : r < 0\nhxr : y = r • x\n⊢ π + angle (r • x) (r • x - x) < π + π + π\n[PROOFSTEP]\nrw [add_assoc]\n[GOAL]\ncase intro.intro.intro\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhx✝ : x ≠ 0\nhy : y ≠ 0\nhcos : Real.cos (angle x y + angle x (x - y) + angle y (y - x)) = -1\nn : ℤ\nhn : angle x y + angle x (x - y) + angle y (y - x) = ↑n * π\nh0 : 0 ≤ angle x y + angle x (x - y) + angle y (y - x)\nhx : x ≠ 0\nr : ℝ\nhnlt : ¬π + angle (r • x) (r • x - x) < π + π + π\nhr : r < 0\nhxr : y = r • x\n⊢ π + angle (r • x) (r • x - x) < π + (π + π)\n[PROOFSTEP]\nexact add_lt_add_left (lt_of_le_of_lt (angle_le_pi _ _) (lt_add_of_pos_right π Real.pi_pos)) _\n[GOAL]\ncase intro\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\nhcos : Real.cos (angle x y + angle x (x - y) + angle y (y - x)) = -1\nn : ℤ\nhn : angle x y + angle x (x - y) + angle y (y - x) = ↑n * π\nh0 : 0 ≤ angle x y + angle x (x - y) + angle y (y - x)\nh3lt : angle x y + angle x (x - y) + angle y (y - x) < π + π + π\n⊢ angle x y + angle x (x - y) + angle y (y - x) = π\n[PROOFSTEP]\nhave hn0 : 0 ≤ n := by\n  rw [hn, mul_nonneg_iff_left_nonneg_of_pos Real.pi_pos] at h0 \n  norm_cast at h0 \n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\nhcos : Real.cos (angle x y + angle x (x - y) + angle y (y - x)) = -1\nn : ℤ\nhn : angle x y + angle x (x - y) + angle y (y - x) = ↑n * π\nh0 : 0 ≤ angle x y + angle x (x - y) + angle y (y - x)\nh3lt : angle x y + angle x (x - y) + angle y (y - x) < π + π + π\n⊢ 0 ≤ n\n[PROOFSTEP]\nrw [hn, mul_nonneg_iff_left_nonneg_of_pos Real.pi_pos] at h0 \n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\nhcos : Real.cos (angle x y + angle x (x - y) + angle y (y - x)) = -1\nn : ℤ\nhn : angle x y + angle x (x - y) + angle y (y - x) = ↑n * π\nh0 : 0 ≤ ↑n\nh3lt : angle x y + angle x (x - y) + angle y (y - x) < π + π + π\n⊢ 0 ≤ n\n[PROOFSTEP]\nnorm_cast at h0 \n[GOAL]\ncase intro\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\nhcos : Real.cos (angle x y + angle x (x - y) + angle y (y - x)) = -1\nn : ℤ\nhn : angle x y + angle x (x - y) + angle y (y - x) = ↑n * π\nh0 : 0 ≤ angle x y + angle x (x - y) + angle y (y - x)\nh3lt : angle x y + angle x (x - y) + angle y (y - x) < π + π + π\nhn0 : 0 ≤ n\n⊢ angle x y + angle x (x - y) + angle y (y - x) = π\n[PROOFSTEP]\nhave hn3 : n < 3 := by\n  rw [hn, show π + π + π = 3 * π by ring] at h3lt \n  replace h3lt := lt_of_mul_lt_mul_right h3lt (le_of_lt Real.pi_pos)\n  norm_cast at h3lt \n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\nhcos : Real.cos (angle x y + angle x (x - y) + angle y (y - x)) = -1\nn : ℤ\nhn : angle x y + angle x (x - y) + angle y (y - x) = ↑n * π\nh0 : 0 ≤ angle x y + angle x (x - y) + angle y (y - x)\nh3lt : angle x y + angle x (x - y) + angle y (y - x) < π + π + π\nhn0 : 0 ≤ n\n⊢ n < 3\n[PROOFSTEP]\nrw [hn, show π + π + π = 3 * π by ring] at h3lt \n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\nhcos : Real.cos (angle x y + angle x (x - y) + angle y (y - x)) = -1\nn : ℤ\nhn : angle x y + angle x (x - y) + angle y (y - x) = ↑n * π\nh0 : 0 ≤ angle x y + angle x (x - y) + angle y (y - x)\nh3lt : ↑n * π < π + π + π\nhn0 : 0 ≤ n\n⊢ π + π + π = 3 * π\n[PROOFSTEP]\nring\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\nhcos : Real.cos (angle x y + angle x (x - y) + angle y (y - x)) = -1\nn : ℤ\nhn : angle x y + angle x (x - y) + angle y (y - x) = ↑n * π\nh0 : 0 ≤ angle x y + angle x (x - y) + angle y (y - x)\nh3lt : ↑n * π < 3 * π\nhn0 : 0 ≤ n\n⊢ n < 3\n[PROOFSTEP]\nreplace h3lt := lt_of_mul_lt_mul_right h3lt (le_of_lt Real.pi_pos)\n[GOAL]\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\nhcos : Real.cos (angle x y + angle x (x - y) + angle y (y - x)) = -1\nn : ℤ\nhn : angle x y + angle x (x - y) + angle y (y - x) = ↑n * π\nh0 : 0 ≤ angle x y + angle x (x - y) + angle y (y - x)\nhn0 : 0 ≤ n\nh3lt : ↑n < 3\n⊢ n < 3\n[PROOFSTEP]\nnorm_cast at h3lt \n[GOAL]\ncase intro\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\nhcos : Real.cos (angle x y + angle x (x - y) + angle y (y - x)) = -1\nn : ℤ\nhn : angle x y + angle x (x - y) + angle y (y - x) = ↑n * π\nh0 : 0 ≤ angle x y + angle x (x - y) + angle y (y - x)\nh3lt : angle x y + angle x (x - y) + angle y (y - x) < π + π + π\nhn0 : 0 ≤ n\nhn3 : n < 3\n⊢ angle x y + angle x (x - y) + angle y (y - x) = π\n[PROOFSTEP]\ninterval_cases n\n[GOAL]\ncase intro.«0»\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\nhcos : Real.cos (angle x y + angle x (x - y) + angle y (y - x)) = -1\nn : ℤ\nh0 : 0 ≤ angle x y + angle x (x - y) + angle y (y - x)\nh3lt : angle x y + angle x (x - y) + angle y (y - x) < π + π + π\nhn : angle x y + angle x (x - y) + angle y (y - x) = ↑0 * π\nhn0 : 0 ≤ 0\nhn3 : 0 < 3\n⊢ angle x y + angle x (x - y) + angle y (y - x) = π\n[PROOFSTEP]\nrw [hn] at hcos \n[GOAL]\ncase intro.«0»\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\nhcos : Real.cos (↑0 * π) = -1\nn : ℤ\nh0 : 0 ≤ angle x y + angle x (x - y) + angle y (y - x)\nh3lt : angle x y + angle x (x - y) + angle y (y - x) < π + π + π\nhn : angle x y + angle x (x - y) + angle y (y - x) = ↑0 * π\nhn0 : 0 ≤ 0\nhn3 : 0 < 3\n⊢ angle x y + angle x (x - y) + angle y (y - x) = π\n[PROOFSTEP]\nsimp at hcos \n[GOAL]\ncase intro.«0»\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\nn : ℤ\nh0 : 0 ≤ angle x y + angle x (x - y) + angle y (y - x)\nh3lt : angle x y + angle x (x - y) + angle y (y - x) < π + π + π\nhn : angle x y + angle x (x - y) + angle y (y - x) = ↑0 * π\nhn0 : 0 ≤ 0\nhn3 : 0 < 3\nhcos : 1 = -1\n⊢ angle x y + angle x (x - y) + angle y (y - x) = π\n[PROOFSTEP]\nnorm_num at hcos \n[GOAL]\ncase intro.«1»\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\nhcos : Real.cos (angle x y + angle x (x - y) + angle y (y - x)) = -1\nn : ℤ\nh0 : 0 ≤ angle x y + angle x (x - y) + angle y (y - x)\nh3lt : angle x y + angle x (x - y) + angle y (y - x) < π + π + π\nhn : angle x y + angle x (x - y) + angle y (y - x) = ↑1 * π\nhn0 : 0 ≤ 1\nhn3 : 1 < 3\n⊢ angle x y + angle x (x - y) + angle y (y - x) = π\n[PROOFSTEP]\nrw [hn]\n[GOAL]\ncase intro.«1»\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\nhcos : Real.cos (angle x y + angle x (x - y) + angle y (y - x)) = -1\nn : ℤ\nh0 : 0 ≤ angle x y + angle x (x - y) + angle y (y - x)\nh3lt : angle x y + angle x (x - y) + angle y (y - x) < π + π + π\nhn : angle x y + angle x (x - y) + angle y (y - x) = ↑1 * π\nhn0 : 0 ≤ 1\nhn3 : 1 < 3\n⊢ ↑1 * π = π\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase intro.«2»\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\nhcos : Real.cos (angle x y + angle x (x - y) + angle y (y - x)) = -1\nn : ℤ\nh0 : 0 ≤ angle x y + angle x (x - y) + angle y (y - x)\nh3lt : angle x y + angle x (x - y) + angle y (y - x) < π + π + π\nhn : angle x y + angle x (x - y) + angle y (y - x) = ↑2 * π\nhn0 : 0 ≤ 2\nhn3 : 2 < 3\n⊢ angle x y + angle x (x - y) + angle y (y - x) = π\n[PROOFSTEP]\nrw [hn] at hcos \n[GOAL]\ncase intro.«2»\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\nhcos : Real.cos (↑2 * π) = -1\nn : ℤ\nh0 : 0 ≤ angle x y + angle x (x - y) + angle y (y - x)\nh3lt : angle x y + angle x (x - y) + angle y (y - x) < π + π + π\nhn : angle x y + angle x (x - y) + angle y (y - x) = ↑2 * π\nhn0 : 0 ≤ 2\nhn3 : 2 < 3\n⊢ angle x y + angle x (x - y) + angle y (y - x) = π\n[PROOFSTEP]\nsimp at hcos \n[GOAL]\ncase intro.«2»\nV : Type u_1\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℝ V\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\nn : ℤ\nh0 : 0 ≤ angle x y + angle x (x - y) + angle y (y - x)\nh3lt : angle x y + angle x (x - y) + angle y (y - x) < π + π + π\nhn : angle x y + angle x (x - y) + angle y (y - x) = ↑2 * π\nhn0 : 0 ≤ 2\nhn3 : 2 < 3\nhcos : 1 = -1\n⊢ angle x y + angle x (x - y) + angle y (y - x) = π\n[PROOFSTEP]\nnorm_num at hcos \n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np1 p2 p3 : P\n⊢ dist p1 p3 * dist p1 p3 =\n    dist p1 p2 * dist p1 p2 + dist p3 p2 * dist p3 p2 - 2 * dist p1 p2 * dist p3 p2 * Real.cos (∠ p1 p2 p3)\n[PROOFSTEP]\nrw [dist_eq_norm_vsub V p1 p3, dist_eq_norm_vsub V p1 p2, dist_eq_norm_vsub V p3 p2]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np1 p2 p3 : P\n⊢ ‖p1 -ᵥ p3‖ * ‖p1 -ᵥ p3‖ =\n    ‖p1 -ᵥ p2‖ * ‖p1 -ᵥ p2‖ + ‖p3 -ᵥ p2‖ * ‖p3 -ᵥ p2‖ - 2 * ‖p1 -ᵥ p2‖ * ‖p3 -ᵥ p2‖ * Real.cos (∠ p1 p2 p3)\n[PROOFSTEP]\nunfold angle\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np1 p2 p3 : P\n⊢ ‖p1 -ᵥ p3‖ * ‖p1 -ᵥ p3‖ =\n    ‖p1 -ᵥ p2‖ * ‖p1 -ᵥ p2‖ + ‖p3 -ᵥ p2‖ * ‖p3 -ᵥ p2‖ -\n      2 * ‖p1 -ᵥ p2‖ * ‖p3 -ᵥ p2‖ * Real.cos (InnerProductGeometry.angle (p1 -ᵥ p2) (p3 -ᵥ p2))\n[PROOFSTEP]\nconvert norm_sub_sq_eq_norm_sq_add_norm_sq_sub_two_mul_norm_mul_norm_mul_cos_angle (p1 -ᵥ p2 : V) (p3 -ᵥ p2 : V)\n[GOAL]\ncase h.e'_2.h.e'_5.h.e'_3\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np1 p2 p3 : P\n⊢ p1 -ᵥ p3 = p1 -ᵥ p2 - (p3 -ᵥ p2)\n[PROOFSTEP]\nexact (vsub_sub_vsub_cancel_right p1 p3 p2).symm\n[GOAL]\ncase h.e'_2.h.e'_6.h.e'_3\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np1 p2 p3 : P\n⊢ p1 -ᵥ p3 = p1 -ᵥ p2 - (p3 -ᵥ p2)\n[PROOFSTEP]\nexact (vsub_sub_vsub_cancel_right p1 p3 p2).symm\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np1 p2 p3 : P\nh : dist p1 p2 = dist p1 p3\n⊢ ∠ p1 p2 p3 = ∠ p1 p3 p2\n[PROOFSTEP]\nrw [dist_eq_norm_vsub V p1 p2, dist_eq_norm_vsub V p1 p3] at h \n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np1 p2 p3 : P\nh : ‖p1 -ᵥ p2‖ = ‖p1 -ᵥ p3‖\n⊢ ∠ p1 p2 p3 = ∠ p1 p3 p2\n[PROOFSTEP]\nunfold angle\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np1 p2 p3 : P\nh : ‖p1 -ᵥ p2‖ = ‖p1 -ᵥ p3‖\n⊢ InnerProductGeometry.angle (p1 -ᵥ p2) (p3 -ᵥ p2) = InnerProductGeometry.angle (p1 -ᵥ p3) (p2 -ᵥ p3)\n[PROOFSTEP]\nconvert angle_sub_eq_angle_sub_rev_of_norm_eq h\n[GOAL]\ncase h.e'_2.h.e'_5\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np1 p2 p3 : P\nh : ‖p1 -ᵥ p2‖ = ‖p1 -ᵥ p3‖\n⊢ p3 -ᵥ p2 = p1 -ᵥ p2 - (p1 -ᵥ p3)\n[PROOFSTEP]\nexact (vsub_sub_vsub_cancel_left p3 p2 p1).symm\n[GOAL]\ncase h.e'_3.h.e'_5\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np1 p2 p3 : P\nh : ‖p1 -ᵥ p2‖ = ‖p1 -ᵥ p3‖\n⊢ p2 -ᵥ p3 = p1 -ᵥ p3 - (p1 -ᵥ p2)\n[PROOFSTEP]\nexact (vsub_sub_vsub_cancel_left p2 p3 p1).symm\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np1 p2 p3 : P\nh : ∠ p1 p2 p3 = ∠ p1 p3 p2\nhpi : ∠ p2 p1 p3 ≠ π\n⊢ dist p1 p2 = dist p1 p3\n[PROOFSTEP]\nunfold angle at h hpi \n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np1 p2 p3 : P\nh : InnerProductGeometry.angle (p1 -ᵥ p2) (p3 -ᵥ p2) = InnerProductGeometry.angle (p1 -ᵥ p3) (p2 -ᵥ p3)\nhpi : InnerProductGeometry.angle (p2 -ᵥ p1) (p3 -ᵥ p1) ≠ π\n⊢ dist p1 p2 = dist p1 p3\n[PROOFSTEP]\nrw [dist_eq_norm_vsub V p1 p2, dist_eq_norm_vsub V p1 p3]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np1 p2 p3 : P\nh : InnerProductGeometry.angle (p1 -ᵥ p2) (p3 -ᵥ p2) = InnerProductGeometry.angle (p1 -ᵥ p3) (p2 -ᵥ p3)\nhpi : InnerProductGeometry.angle (p2 -ᵥ p1) (p3 -ᵥ p1) ≠ π\n⊢ ‖p1 -ᵥ p2‖ = ‖p1 -ᵥ p3‖\n[PROOFSTEP]\nrw [← angle_neg_neg, neg_vsub_eq_vsub_rev, neg_vsub_eq_vsub_rev] at hpi \n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np1 p2 p3 : P\nh : InnerProductGeometry.angle (p1 -ᵥ p2) (p3 -ᵥ p2) = InnerProductGeometry.angle (p1 -ᵥ p3) (p2 -ᵥ p3)\nhpi : InnerProductGeometry.angle (p1 -ᵥ p2) (p1 -ᵥ p3) ≠ π\n⊢ ‖p1 -ᵥ p2‖ = ‖p1 -ᵥ p3‖\n[PROOFSTEP]\nrw [← vsub_sub_vsub_cancel_left p3 p2 p1, ← vsub_sub_vsub_cancel_left p2 p3 p1] at h \n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np1 p2 p3 : P\nh :\n  InnerProductGeometry.angle (p1 -ᵥ p2) (p1 -ᵥ p2 - (p1 -ᵥ p3)) =\n    InnerProductGeometry.angle (p1 -ᵥ p3) (p1 -ᵥ p3 - (p1 -ᵥ p2))\nhpi : InnerProductGeometry.angle (p1 -ᵥ p2) (p1 -ᵥ p3) ≠ π\n⊢ ‖p1 -ᵥ p2‖ = ‖p1 -ᵥ p3‖\n[PROOFSTEP]\nexact norm_eq_of_angle_sub_eq_angle_sub_rev_of_angle_ne_pi h hpi\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np1 p2 p3 : P\nh2 : p2 ≠ p1\nh3 : p3 ≠ p1\n⊢ ∠ p1 p2 p3 + ∠ p2 p3 p1 + ∠ p3 p1 p2 = π\n[PROOFSTEP]\nrw [add_assoc, add_comm, add_comm (∠ p2 p3 p1), angle_comm p2 p3 p1]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np1 p2 p3 : P\nh2 : p2 ≠ p1\nh3 : p3 ≠ p1\n⊢ ∠ p3 p1 p2 + ∠ p1 p3 p2 + ∠ p1 p2 p3 = π\n[PROOFSTEP]\nunfold angle\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np1 p2 p3 : P\nh2 : p2 ≠ p1\nh3 : p3 ≠ p1\n⊢ InnerProductGeometry.angle (p3 -ᵥ p1) (p2 -ᵥ p1) + InnerProductGeometry.angle (p1 -ᵥ p3) (p2 -ᵥ p3) +\n      InnerProductGeometry.angle (p1 -ᵥ p2) (p3 -ᵥ p2) =\n    π\n[PROOFSTEP]\nrw [← angle_neg_neg (p1 -ᵥ p3), ← angle_neg_neg (p1 -ᵥ p2), neg_vsub_eq_vsub_rev, neg_vsub_eq_vsub_rev,\n  neg_vsub_eq_vsub_rev, neg_vsub_eq_vsub_rev, ← vsub_sub_vsub_cancel_right p3 p2 p1, ←\n  vsub_sub_vsub_cancel_right p2 p3 p1]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\np1 p2 p3 : P\nh2 : p2 ≠ p1\nh3 : p3 ≠ p1\n⊢ InnerProductGeometry.angle (p3 -ᵥ p1) (p2 -ᵥ p1) + InnerProductGeometry.angle (p3 -ᵥ p1) (p3 -ᵥ p1 - (p2 -ᵥ p1)) +\n      InnerProductGeometry.angle (p2 -ᵥ p1) (p2 -ᵥ p1 - (p3 -ᵥ p1)) =\n    π\n[PROOFSTEP]\nexact\n  angle_add_angle_sub_add_angle_sub_eq_pi (fun he => h3 (vsub_eq_zero_iff_eq.1 he)) fun he =>\n    h2 (vsub_eq_zero_iff_eq.1 he)\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : InnerProductSpace ℝ V\ninst✝³ : MetricSpace P\ninst✝² : NormedAddTorsor V P\ninst✝¹ : Module.Oriented ℝ V (Fin 2)\ninst✝ : Fact (FiniteDimensional.finrank ℝ V = 2)\np1 p2 p3 : P\nh21 : p2 ≠ p1\nh32 : p3 ≠ p2\nh13 : p1 ≠ p3\n⊢ ∡ p1 p2 p3 + ∡ p2 p3 p1 + ∡ p3 p1 p2 = ↑π\n[PROOFSTEP]\nsimpa only [neg_vsub_eq_vsub_rev] using\n  positiveOrientation.oangle_add_cyc3_neg_left (vsub_ne_zero.mpr h21) (vsub_ne_zero.mpr h32) (vsub_ne_zero.mpr h13)\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\na b c p : P\nh : ∠ b p c = π\n⊢ dist a b ^ 2 * dist c p + dist a c ^ 2 * dist b p = dist b c * (dist a p ^ 2 + dist b p * dist c p)\n[PROOFSTEP]\nrw [pow_two, pow_two, law_cos a p b, law_cos a p c, eq_sub_of_add_eq (angle_add_angle_eq_pi_of_angle_eq_pi a h),\n  Real.cos_pi_sub, dist_eq_add_dist_of_angle_eq_pi h]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\na b c p : P\nh : ∠ b p c = π\n⊢ (dist a p * dist a p + dist b p * dist b p - 2 * dist a p * dist b p * -Real.cos (∠ a p c)) * dist c p +\n      (dist a p * dist a p + dist c p * dist c p - 2 * dist a p * dist c p * Real.cos (∠ a p c)) * dist b p =\n    (dist b p + dist c p) * (dist a p ^ 2 + dist b p * dist c p)\n[PROOFSTEP]\nring\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\na b c : P\n⊢ dist a b ^ 2 + dist a c ^ 2 = ↑2 * (dist a (midpoint ℝ b c) ^ 2 + (dist b c / 2) ^ 2)\n[PROOFSTEP]\nby_cases hbc : b = c\n[GOAL]\ncase pos\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\na b c : P\nhbc : b = c\n⊢ dist a b ^ 2 + dist a c ^ 2 = ↑2 * (dist a (midpoint ℝ b c) ^ 2 + (dist b c / 2) ^ 2)\n[PROOFSTEP]\nsimp [hbc, midpoint_self, dist_self, two_mul]\n[GOAL]\ncase neg\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\na b c : P\nhbc : ¬b = c\n⊢ dist a b ^ 2 + dist a c ^ 2 = ↑2 * (dist a (midpoint ℝ b c) ^ 2 + (dist b c / 2) ^ 2)\n[PROOFSTEP]\nlet m := midpoint ℝ b c\n[GOAL]\ncase neg\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\na b c : P\nhbc : ¬b = c\nm : P := midpoint ℝ b c\n⊢ dist a b ^ 2 + dist a c ^ 2 = ↑2 * (dist a (midpoint ℝ b c) ^ 2 + (dist b c / 2) ^ 2)\n[PROOFSTEP]\nhave : dist b c ≠ 0 := (dist_pos.mpr hbc).ne'\n[GOAL]\ncase neg\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\na b c : P\nhbc : ¬b = c\nm : P := midpoint ℝ b c\nthis : dist b c ≠ 0\n⊢ dist a b ^ 2 + dist a c ^ 2 = ↑2 * (dist a (midpoint ℝ b c) ^ 2 + (dist b c / 2) ^ 2)\n[PROOFSTEP]\nhave hm := dist_sq_mul_dist_add_dist_sq_mul_dist a b c m (angle_midpoint_eq_pi b c hbc)\n[GOAL]\ncase neg\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\na b c : P\nhbc : ¬b = c\nm : P := midpoint ℝ b c\nthis : dist b c ≠ 0\nhm : dist a b ^ 2 * dist c m + dist a c ^ 2 * dist b m = dist b c * (dist a m ^ 2 + dist b m * dist c m)\n⊢ dist a b ^ 2 + dist a c ^ 2 = ↑2 * (dist a (midpoint ℝ b c) ^ 2 + (dist b c / 2) ^ 2)\n[PROOFSTEP]\nsimp only [dist_left_midpoint, dist_right_midpoint, Real.norm_two] at hm \n[GOAL]\ncase neg\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\na b c : P\nhbc : ¬b = c\nm : P := midpoint ℝ b c\nthis : dist b c ≠ 0\nhm :\n  dist a b ^ 2 * (2⁻¹ * dist b c) + dist a c ^ 2 * (2⁻¹ * dist b c) =\n    dist b c * (dist a (midpoint ℝ b c) ^ 2 + 2⁻¹ * dist b c * (2⁻¹ * dist b c))\n⊢ dist a b ^ 2 + dist a c ^ 2 = ↑2 * (dist a (midpoint ℝ b c) ^ 2 + (dist b c / 2) ^ 2)\n[PROOFSTEP]\ncalc\n  dist a b ^ 2 + dist a c ^ 2 =\n      2 / dist b c * (dist a b ^ 2 * ((2 : ℝ)⁻¹ * dist b c) + dist a c ^ 2 * (2⁻¹ * dist b c)) :=\n    by field_simp; ring\n  _ = 2 * (dist a (midpoint ℝ b c) ^ 2 + (dist b c / 2) ^ 2) := by rw [hm]; field_simp; ring\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\na b c : P\nhbc : ¬b = c\nm : P := midpoint ℝ b c\nthis : dist b c ≠ 0\nhm :\n  dist a b ^ 2 * (2⁻¹ * dist b c) + dist a c ^ 2 * (2⁻¹ * dist b c) =\n    dist b c * (dist a (midpoint ℝ b c) ^ 2 + 2⁻¹ * dist b c * (2⁻¹ * dist b c))\n⊢ dist a b ^ 2 + dist a c ^ 2 = ↑2 / dist b c * (dist a b ^ 2 * (2⁻¹ * dist b c) + dist a c ^ 2 * (2⁻¹ * dist b c))\n[PROOFSTEP]\nfield_simp\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\na b c : P\nhbc : ¬b = c\nm : P := midpoint ℝ b c\nthis : dist b c ≠ 0\nhm :\n  dist a b ^ 2 * (2⁻¹ * dist b c) + dist a c ^ 2 * (2⁻¹ * dist b c) =\n    dist b c * (dist a (midpoint ℝ b c) ^ 2 + 2⁻¹ * dist b c * (2⁻¹ * dist b c))\n⊢ (dist a b ^ 2 + dist a c ^ 2) * (dist b c * 2) = 2 * (dist a b ^ 2 * dist b c + dist a c ^ 2 * dist b c)\n[PROOFSTEP]\nring\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\na b c : P\nhbc : ¬b = c\nm : P := midpoint ℝ b c\nthis : dist b c ≠ 0\nhm :\n  dist a b ^ 2 * (2⁻¹ * dist b c) + dist a c ^ 2 * (2⁻¹ * dist b c) =\n    dist b c * (dist a (midpoint ℝ b c) ^ 2 + 2⁻¹ * dist b c * (2⁻¹ * dist b c))\n⊢ ↑2 / dist b c * (dist a b ^ 2 * (2⁻¹ * dist b c) + dist a c ^ 2 * (2⁻¹ * dist b c)) =\n    ↑2 * (dist a (midpoint ℝ b c) ^ 2 + (dist b c / 2) ^ 2)\n[PROOFSTEP]\nrw [hm]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\na b c : P\nhbc : ¬b = c\nm : P := midpoint ℝ b c\nthis : dist b c ≠ 0\nhm :\n  dist a b ^ 2 * (2⁻¹ * dist b c) + dist a c ^ 2 * (2⁻¹ * dist b c) =\n    dist b c * (dist a (midpoint ℝ b c) ^ 2 + 2⁻¹ * dist b c * (2⁻¹ * dist b c))\n⊢ ↑2 / dist b c * (dist b c * (dist a (midpoint ℝ b c) ^ 2 + 2⁻¹ * dist b c * (2⁻¹ * dist b c))) =\n    ↑2 * (dist a (midpoint ℝ b c) ^ 2 + (dist b c / 2) ^ 2)\n[PROOFSTEP]\nfield_simp\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\na b c : P\nhbc : ¬b = c\nm : P := midpoint ℝ b c\nthis : dist b c ≠ 0\nhm :\n  dist a b ^ 2 * (2⁻¹ * dist b c) + dist a c ^ 2 * (2⁻¹ * dist b c) =\n    dist b c * (dist a (midpoint ℝ b c) ^ 2 + 2⁻¹ * dist b c * (2⁻¹ * dist b c))\n⊢ 2 * (dist b c * (dist a (midpoint ℝ b c) ^ 2 * (2 * 2) + dist b c * dist b c)) * 2 ^ 2 =\n    2 * (dist a (midpoint ℝ b c) ^ 2 * 2 ^ 2 + dist b c ^ 2) * (dist b c * (2 * 2))\n[PROOFSTEP]\nring\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\na b c a' b' c' : P\nr : ℝ\nh : ∠ a' b' c' = ∠ a b c\nhab : dist a' b' = r * dist a b\nhcb : dist c' b' = r * dist c b\n⊢ dist a' c' = r * dist a c\n[PROOFSTEP]\nhave h' : dist a' c' ^ 2 = (r * dist a c) ^ 2\n[GOAL]\ncase h'\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\na b c a' b' c' : P\nr : ℝ\nh : ∠ a' b' c' = ∠ a b c\nhab : dist a' b' = r * dist a b\nhcb : dist c' b' = r * dist c b\n⊢ dist a' c' ^ 2 = (r * dist a c) ^ 2\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\na b c a' b' c' : P\nr : ℝ\nh : ∠ a' b' c' = ∠ a b c\nhab : dist a' b' = r * dist a b\nhcb : dist c' b' = r * dist c b\nh' : dist a' c' ^ 2 = (r * dist a c) ^ 2\n⊢ dist a' c' = r * dist a c\n[PROOFSTEP]\ncalc\n  dist a' c' ^ 2 = dist a' b' ^ 2 + dist c' b' ^ 2 - 2 * dist a' b' * dist c' b' * Real.cos (∠ a' b' c') := by\n    simp [pow_two, law_cos a' b' c']\n  _ = r ^ 2 * (dist a b ^ 2 + dist c b ^ 2 - 2 * dist a b * dist c b * Real.cos (∠ a b c)) := by rw [h, hab, hcb]; ring\n  _ = (r * dist a c) ^ 2 := by simp [pow_two, ← law_cos a b c, mul_pow]; ring\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\na b c a' b' c' : P\nr : ℝ\nh : ∠ a' b' c' = ∠ a b c\nhab : dist a' b' = r * dist a b\nhcb : dist c' b' = r * dist c b\n⊢ dist a' c' ^ 2 = dist a' b' ^ 2 + dist c' b' ^ 2 - 2 * dist a' b' * dist c' b' * Real.cos (∠ a' b' c')\n[PROOFSTEP]\nsimp [pow_two, law_cos a' b' c']\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\na b c a' b' c' : P\nr : ℝ\nh : ∠ a' b' c' = ∠ a b c\nhab : dist a' b' = r * dist a b\nhcb : dist c' b' = r * dist c b\n⊢ dist a' b' ^ 2 + dist c' b' ^ 2 - 2 * dist a' b' * dist c' b' * Real.cos (∠ a' b' c') =\n    r ^ 2 * (dist a b ^ 2 + dist c b ^ 2 - 2 * dist a b * dist c b * Real.cos (∠ a b c))\n[PROOFSTEP]\nrw [h, hab, hcb]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\na b c a' b' c' : P\nr : ℝ\nh : ∠ a' b' c' = ∠ a b c\nhab : dist a' b' = r * dist a b\nhcb : dist c' b' = r * dist c b\n⊢ (r * dist a b) ^ 2 + (r * dist c b) ^ 2 - 2 * (r * dist a b) * (r * dist c b) * Real.cos (∠ a b c) =\n    r ^ 2 * (dist a b ^ 2 + dist c b ^ 2 - 2 * dist a b * dist c b * Real.cos (∠ a b c))\n[PROOFSTEP]\nring\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\na b c a' b' c' : P\nr : ℝ\nh : ∠ a' b' c' = ∠ a b c\nhab : dist a' b' = r * dist a b\nhcb : dist c' b' = r * dist c b\n⊢ r ^ 2 * (dist a b ^ 2 + dist c b ^ 2 - 2 * dist a b * dist c b * Real.cos (∠ a b c)) = (r * dist a c) ^ 2\n[PROOFSTEP]\nsimp [pow_two, ← law_cos a b c, mul_pow]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\na b c a' b' c' : P\nr : ℝ\nh : ∠ a' b' c' = ∠ a b c\nhab : dist a' b' = r * dist a b\nhcb : dist c' b' = r * dist c b\n⊢ r * r * (dist a c * dist a c) = r * dist a c * (r * dist a c)\n[PROOFSTEP]\nring\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\na b c a' b' c' : P\nr : ℝ\nh : ∠ a' b' c' = ∠ a b c\nhab : dist a' b' = r * dist a b\nhcb : dist c' b' = r * dist c b\nh' : dist a' c' ^ 2 = (r * dist a c) ^ 2\n⊢ dist a' c' = r * dist a c\n[PROOFSTEP]\nby_cases hab₁ : a = b\n[GOAL]\ncase pos\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\na b c a' b' c' : P\nr : ℝ\nh : ∠ a' b' c' = ∠ a b c\nhab : dist a' b' = r * dist a b\nhcb : dist c' b' = r * dist c b\nh' : dist a' c' ^ 2 = (r * dist a c) ^ 2\nhab₁ : a = b\n⊢ dist a' c' = r * dist a c\n[PROOFSTEP]\nhave hab'₁ : a' = b' := by rw [← dist_eq_zero, hab, dist_eq_zero.mpr hab₁, mul_zero r]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\na b c a' b' c' : P\nr : ℝ\nh : ∠ a' b' c' = ∠ a b c\nhab : dist a' b' = r * dist a b\nhcb : dist c' b' = r * dist c b\nh' : dist a' c' ^ 2 = (r * dist a c) ^ 2\nhab₁ : a = b\n⊢ a' = b'\n[PROOFSTEP]\nrw [← dist_eq_zero, hab, dist_eq_zero.mpr hab₁, mul_zero r]\n[GOAL]\ncase pos\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\na b c a' b' c' : P\nr : ℝ\nh : ∠ a' b' c' = ∠ a b c\nhab : dist a' b' = r * dist a b\nhcb : dist c' b' = r * dist c b\nh' : dist a' c' ^ 2 = (r * dist a c) ^ 2\nhab₁ : a = b\nhab'₁ : a' = b'\n⊢ dist a' c' = r * dist a c\n[PROOFSTEP]\nrw [hab₁, hab'₁, dist_comm b' c', dist_comm b c, hcb]\n[GOAL]\ncase neg\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\na b c a' b' c' : P\nr : ℝ\nh : ∠ a' b' c' = ∠ a b c\nhab : dist a' b' = r * dist a b\nhcb : dist c' b' = r * dist c b\nh' : dist a' c' ^ 2 = (r * dist a c) ^ 2\nhab₁ : ¬a = b\n⊢ dist a' c' = r * dist a c\n[PROOFSTEP]\nhave h1 : 0 ≤ r * dist a b := by rw [← hab]; exact dist_nonneg\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\na b c a' b' c' : P\nr : ℝ\nh : ∠ a' b' c' = ∠ a b c\nhab : dist a' b' = r * dist a b\nhcb : dist c' b' = r * dist c b\nh' : dist a' c' ^ 2 = (r * dist a c) ^ 2\nhab₁ : ¬a = b\n⊢ 0 ≤ r * dist a b\n[PROOFSTEP]\nrw [← hab]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\na b c a' b' c' : P\nr : ℝ\nh : ∠ a' b' c' = ∠ a b c\nhab : dist a' b' = r * dist a b\nhcb : dist c' b' = r * dist c b\nh' : dist a' c' ^ 2 = (r * dist a c) ^ 2\nhab₁ : ¬a = b\n⊢ 0 ≤ dist a' b'\n[PROOFSTEP]\nexact dist_nonneg\n[GOAL]\ncase neg\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\na b c a' b' c' : P\nr : ℝ\nh : ∠ a' b' c' = ∠ a b c\nhab : dist a' b' = r * dist a b\nhcb : dist c' b' = r * dist c b\nh' : dist a' c' ^ 2 = (r * dist a c) ^ 2\nhab₁ : ¬a = b\nh1 : 0 ≤ r * dist a b\n⊢ dist a' c' = r * dist a c\n[PROOFSTEP]\nhave h2 : 0 ≤ r := nonneg_of_mul_nonneg_left h1 (dist_pos.mpr hab₁)\n[GOAL]\ncase neg\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\na b c a' b' c' : P\nr : ℝ\nh : ∠ a' b' c' = ∠ a b c\nhab : dist a' b' = r * dist a b\nhcb : dist c' b' = r * dist c b\nh' : dist a' c' ^ 2 = (r * dist a c) ^ 2\nhab₁ : ¬a = b\nh1 : 0 ≤ r * dist a b\nh2 : 0 ≤ r\n⊢ dist a' c' = r * dist a c\n[PROOFSTEP]\nexact (sq_eq_sq dist_nonneg (mul_nonneg h2 dist_nonneg)).mp h'\n", "meta": {"mathlib_filename": "Mathlib.Geometry.Euclidean.Triangle", "llama_tokens": 38286, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.785308580887758, "lm_q2_score": 0.6825737408694988, "lm_q1q2_score": 0.5360310157934745}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\nr : α → β → Prop\ns : Finset α\nt : Finset β\na a' : α\nb b' : β\ninst✝² : DecidablePred (r a)\ninst✝¹ : (a : α) → Decidable (r a b)\nm n : ℕ\ninst✝ : (a : α) → (b : β) → Decidable (r a b)\n⊢ ∑ a in s, card (bipartiteAbove r t a) = ∑ b in t, card (bipartiteBelow r s b)\n[PROOFSTEP]\nsimp_rw [card_eq_sum_ones, bipartiteAbove, bipartiteBelow, sum_filter]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nr : α → β → Prop\ns : Finset α\nt : Finset β\na a' : α\nb b' : β\ninst✝² : DecidablePred (r a)\ninst✝¹ : (a : α) → Decidable (r a b)\nm n : ℕ\ninst✝ : (a : α) → (b : β) → Decidable (r a b)\n⊢ (∑ x in s, ∑ a in t, if r x a then 1 else 0) = ∑ x in t, ∑ a in s, if r a x then 1 else 0\n[PROOFSTEP]\nexact sum_comm\n[GOAL]\nα : Type u_1\nβ : Type u_2\nr : α → β → Prop\ns : Finset α\nt : Finset β\na a' : α\nb b' : β\ninst✝¹ : DecidablePred (r a)\ninst✝ : (a : α) → Decidable (r a b)\nm n : ℕ\nhs : ∀ (a : α), a ∈ s → ∃ b, b ∈ t ∧ r a b\nht : ∀ (b : β), b ∈ t → Set.Subsingleton {a | a ∈ s ∧ r a b}\n⊢ card s ≤ card t\n[PROOFSTEP]\nclassical\nrw [← mul_one s.card, ← mul_one t.card]\nexact\n  card_mul_le_card_mul r\n    (fun a h ↦\n      card_pos.2\n        (by\n          rw [← coe_nonempty, coe_bipartiteAbove]\n          exact hs _ h : (t.bipartiteAbove r a).Nonempty))\n    (fun b h ↦\n      card_le_one.2\n        (by\n          simp_rw [mem_bipartiteBelow]\n          exact ht _ h))\n[GOAL]\nα : Type u_1\nβ : Type u_2\nr : α → β → Prop\ns : Finset α\nt : Finset β\na a' : α\nb b' : β\ninst✝¹ : DecidablePred (r a)\ninst✝ : (a : α) → Decidable (r a b)\nm n : ℕ\nhs : ∀ (a : α), a ∈ s → ∃ b, b ∈ t ∧ r a b\nht : ∀ (b : β), b ∈ t → Set.Subsingleton {a | a ∈ s ∧ r a b}\n⊢ card s ≤ card t\n[PROOFSTEP]\nrw [← mul_one s.card, ← mul_one t.card]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nr : α → β → Prop\ns : Finset α\nt : Finset β\na a' : α\nb b' : β\ninst✝¹ : DecidablePred (r a)\ninst✝ : (a : α) → Decidable (r a b)\nm n : ℕ\nhs : ∀ (a : α), a ∈ s → ∃ b, b ∈ t ∧ r a b\nht : ∀ (b : β), b ∈ t → Set.Subsingleton {a | a ∈ s ∧ r a b}\n⊢ card s * 1 ≤ card t * 1\n[PROOFSTEP]\nexact\n  card_mul_le_card_mul r\n    (fun a h ↦\n      card_pos.2\n        (by\n          rw [← coe_nonempty, coe_bipartiteAbove]\n          exact hs _ h : (t.bipartiteAbove r a).Nonempty))\n    (fun b h ↦\n      card_le_one.2\n        (by\n          simp_rw [mem_bipartiteBelow]\n          exact ht _ h))\n[GOAL]\nα : Type u_1\nβ : Type u_2\nr : α → β → Prop\ns : Finset α\nt : Finset β\na✝ a' : α\nb b' : β\ninst✝¹ : DecidablePred (r a✝)\ninst✝ : (a : α) → Decidable (r a b)\nm n : ℕ\nhs : ∀ (a : α), a ∈ s → ∃ b, b ∈ t ∧ r a b\nht : ∀ (b : β), b ∈ t → Set.Subsingleton {a | a ∈ s ∧ r a b}\na : α\nh : a ∈ s\n⊢ Finset.Nonempty (bipartiteAbove r t a)\n[PROOFSTEP]\nrw [← coe_nonempty, coe_bipartiteAbove]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nr : α → β → Prop\ns : Finset α\nt : Finset β\na✝ a' : α\nb b' : β\ninst✝¹ : DecidablePred (r a✝)\ninst✝ : (a : α) → Decidable (r a b)\nm n : ℕ\nhs : ∀ (a : α), a ∈ s → ∃ b, b ∈ t ∧ r a b\nht : ∀ (b : β), b ∈ t → Set.Subsingleton {a | a ∈ s ∧ r a b}\na : α\nh : a ∈ s\n⊢ Set.Nonempty {b | b ∈ t ∧ r a b}\n[PROOFSTEP]\nexact hs _ h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nr : α → β → Prop\ns : Finset α\nt : Finset β\na a' : α\nb✝ b' : β\ninst✝¹ : DecidablePred (r a)\ninst✝ : (a : α) → Decidable (r a b✝)\nm n : ℕ\nhs : ∀ (a : α), a ∈ s → ∃ b, b ∈ t ∧ r a b\nht : ∀ (b : β), b ∈ t → Set.Subsingleton {a | a ∈ s ∧ r a b}\nb : β\nh : b ∈ t\n⊢ ∀ (a : α), a ∈ bipartiteBelow r s b → ∀ (b_1 : α), b_1 ∈ bipartiteBelow r s b → a = b_1\n[PROOFSTEP]\nsimp_rw [mem_bipartiteBelow]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nr : α → β → Prop\ns : Finset α\nt : Finset β\na a' : α\nb✝ b' : β\ninst✝¹ : DecidablePred (r a)\ninst✝ : (a : α) → Decidable (r a b✝)\nm n : ℕ\nhs : ∀ (a : α), a ∈ s → ∃ b, b ∈ t ∧ r a b\nht : ∀ (b : β), b ∈ t → Set.Subsingleton {a | a ∈ s ∧ r a b}\nb : β\nh : b ∈ t\n⊢ ∀ (a : α), a ∈ s ∧ r a b → ∀ (b_1 : α), b_1 ∈ s ∧ r b_1 b → a = b_1\n[PROOFSTEP]\nexact ht _ h\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Fintype α\ninst✝ : Fintype β\nr : α → β → Prop\nh₁ : LeftTotal r\nh₂ : LeftUnique r\n⊢ ∀ (a : α), a ∈ univ → ∃ b, b ∈ univ ∧ r a b\n[PROOFSTEP]\nsimpa using h₁\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Fintype α\ninst✝ : Fintype β\nr : α → β → Prop\nh₁ : RightTotal r\nh₂ : RightUnique r\n⊢ ∀ (b : β), b ∈ univ → ∃ a, a ∈ univ ∧ r a b\n[PROOFSTEP]\nsimpa using h₁\n", "meta": {"mathlib_filename": "Mathlib.Combinatorics.DoubleCounting", "llama_tokens": 2312, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7662936430859597, "lm_q2_score": 0.6992544335934766, "lm_q1q2_score": 0.5358342273623545}}
{"text": "[GOAL]\nG : Type u_1\ninst✝² : SeminormedAddCommGroup G\nH : Type u_2\ninst✝¹ : SeminormedAddCommGroup H\nK : Type u_3\ninst✝ : SeminormedAddCommGroup K\n⊢ completion (id G) = id (Completion G)\n[PROOFSTEP]\next x\n[GOAL]\ncase H\nG : Type u_1\ninst✝² : SeminormedAddCommGroup G\nH : Type u_2\ninst✝¹ : SeminormedAddCommGroup H\nK : Type u_3\ninst✝ : SeminormedAddCommGroup K\nx : Completion G\n⊢ ↑(completion (id G)) x = ↑(id (Completion G)) x\n[PROOFSTEP]\nrw [NormedAddGroupHom.completion_def, NormedAddGroupHom.coe_id, Completion.map_id]\n[GOAL]\ncase H\nG : Type u_1\ninst✝² : SeminormedAddCommGroup G\nH : Type u_2\ninst✝¹ : SeminormedAddCommGroup H\nK : Type u_3\ninst✝ : SeminormedAddCommGroup K\nx : Completion G\n⊢ _root_.id x = ↑(id (Completion G)) x\n[PROOFSTEP]\nrfl\n[GOAL]\nG : Type u_1\ninst✝² : SeminormedAddCommGroup G\nH : Type u_2\ninst✝¹ : SeminormedAddCommGroup H\nK : Type u_3\ninst✝ : SeminormedAddCommGroup K\nf : NormedAddGroupHom G H\ng : NormedAddGroupHom H K\n⊢ NormedAddGroupHom.comp (completion g) (completion f) = completion (NormedAddGroupHom.comp g f)\n[PROOFSTEP]\next x\n[GOAL]\ncase H\nG : Type u_1\ninst✝² : SeminormedAddCommGroup G\nH : Type u_2\ninst✝¹ : SeminormedAddCommGroup H\nK : Type u_3\ninst✝ : SeminormedAddCommGroup K\nf : NormedAddGroupHom G H\ng : NormedAddGroupHom H K\nx : Completion G\n⊢ ↑(NormedAddGroupHom.comp (completion g) (completion f)) x = ↑(completion (NormedAddGroupHom.comp g f)) x\n[PROOFSTEP]\nrw [NormedAddGroupHom.coe_comp, NormedAddGroupHom.completion_def, NormedAddGroupHom.completion_coe_to_fun,\n  NormedAddGroupHom.completion_coe_to_fun, Completion.map_comp g.uniformContinuous f.uniformContinuous]\n[GOAL]\ncase H\nG : Type u_1\ninst✝² : SeminormedAddCommGroup G\nH : Type u_2\ninst✝¹ : SeminormedAddCommGroup H\nK : Type u_3\ninst✝ : SeminormedAddCommGroup K\nf : NormedAddGroupHom G H\ng : NormedAddGroupHom H K\nx : Completion G\n⊢ Completion.map (↑g ∘ ↑f) x = Completion.map (↑(NormedAddGroupHom.comp g f)) x\n[PROOFSTEP]\nrfl\n[GOAL]\nG : Type u_1\ninst✝² : SeminormedAddCommGroup G\nH : Type u_2\ninst✝¹ : SeminormedAddCommGroup H\nK : Type u_3\ninst✝ : SeminormedAddCommGroup K\n⊢ ∀ (v : G), ‖↑G v‖ ≤ 1 * ‖v‖\n[PROOFSTEP]\nsimp [le_refl]\n[GOAL]\nG : Type u_1\ninst✝² : SeminormedAddCommGroup G\nH : Type u_2\ninst✝¹ : SeminormedAddCommGroup H\nK : Type u_3\ninst✝ : SeminormedAddCommGroup K\nf : NormedAddGroupHom G H\n⊢ NormedAddGroupHom.comp (completion f) toCompl = NormedAddGroupHom.comp toCompl f\n[PROOFSTEP]\next x\n[GOAL]\ncase H\nG : Type u_1\ninst✝² : SeminormedAddCommGroup G\nH : Type u_2\ninst✝¹ : SeminormedAddCommGroup H\nK : Type u_3\ninst✝ : SeminormedAddCommGroup K\nf : NormedAddGroupHom G H\nx : G\n⊢ ↑(NormedAddGroupHom.comp (completion f) toCompl) x = ↑(NormedAddGroupHom.comp toCompl f) x\n[PROOFSTEP]\nsimp\n[GOAL]\nG : Type u_1\ninst✝² : SeminormedAddCommGroup G\nH : Type u_2\ninst✝¹ : SeminormedAddCommGroup H\nK : Type u_3\ninst✝ : SeminormedAddCommGroup K\nf : NormedAddGroupHom G H\nx : G\n⊢ ‖↑f x‖ ≤ ‖completion f‖ * ‖x‖\n[PROOFSTEP]\nsimpa using f.completion.le_opNorm x\n[GOAL]\nG : Type u_1\ninst✝² : SeminormedAddCommGroup G\nH : Type u_2\ninst✝¹ : SeminormedAddCommGroup H\nK : Type u_3\ninst✝ : SeminormedAddCommGroup K\nf : NormedAddGroupHom G H\n⊢ range (NormedAddGroupHom.comp toCompl (incl (ker f))) ≤ ker (completion f)\n[PROOFSTEP]\nrintro _ ⟨⟨g, h₀ : f g = 0⟩, rfl⟩\n[GOAL]\ncase intro.mk\nG : Type u_1\ninst✝² : SeminormedAddCommGroup G\nH : Type u_2\ninst✝¹ : SeminormedAddCommGroup H\nK : Type u_3\ninst✝ : SeminormedAddCommGroup K\nf : NormedAddGroupHom G H\ng : G\nh₀ : ↑f g = 0\n⊢ ↑(toAddMonoidHom (NormedAddGroupHom.comp toCompl (incl (ker f)))) { val := g, property := h₀ } ∈ ker (completion f)\n[PROOFSTEP]\nsimp [h₀, mem_ker, Completion.coe_zero]\n[GOAL]\nG : Type u_1\ninst✝² : SeminormedAddCommGroup G\nH : Type u_2\ninst✝¹ : SeminormedAddCommGroup H\nK : Type u_3\ninst✝ : SeminormedAddCommGroup K\nf : NormedAddGroupHom G H\nC : ℝ\nh : SurjectiveOnWith f (range f) C\n⊢ ↑(ker (completion f)) = closure ↑(range (NormedAddGroupHom.comp toCompl (incl (ker f))))\n[PROOFSTEP]\nrefine le_antisymm ?_ (closure_minimal f.ker_le_ker_completion f.completion.isClosed_ker)\n[GOAL]\nG : Type u_1\ninst✝² : SeminormedAddCommGroup G\nH : Type u_2\ninst✝¹ : SeminormedAddCommGroup H\nK : Type u_3\ninst✝ : SeminormedAddCommGroup K\nf : NormedAddGroupHom G H\nC : ℝ\nh : SurjectiveOnWith f (range f) C\n⊢ ↑(ker (completion f)) ≤ closure ↑(range (NormedAddGroupHom.comp toCompl (incl (ker f))))\n[PROOFSTEP]\nrintro hatg (hatg_in : f.completion hatg = 0)\n[GOAL]\nG : Type u_1\ninst✝² : SeminormedAddCommGroup G\nH : Type u_2\ninst✝¹ : SeminormedAddCommGroup H\nK : Type u_3\ninst✝ : SeminormedAddCommGroup K\nf : NormedAddGroupHom G H\nC : ℝ\nh : SurjectiveOnWith f (range f) C\nhatg : Completion G\nhatg_in : ↑(completion f) hatg = 0\n⊢ hatg ∈ closure ↑(range (NormedAddGroupHom.comp toCompl (incl (ker f))))\n[PROOFSTEP]\nrw [SeminormedAddCommGroup.mem_closure_iff]\n[GOAL]\nG : Type u_1\ninst✝² : SeminormedAddCommGroup G\nH : Type u_2\ninst✝¹ : SeminormedAddCommGroup H\nK : Type u_3\ninst✝ : SeminormedAddCommGroup K\nf : NormedAddGroupHom G H\nC : ℝ\nh : SurjectiveOnWith f (range f) C\nhatg : Completion G\nhatg_in : ↑(completion f) hatg = 0\n⊢ ∀ (ε : ℝ), 0 < ε → ∃ b, b ∈ ↑(range (NormedAddGroupHom.comp toCompl (incl (ker f)))) ∧ ‖hatg - b‖ < ε\n[PROOFSTEP]\nintro ε ε_pos\n[GOAL]\nG : Type u_1\ninst✝² : SeminormedAddCommGroup G\nH : Type u_2\ninst✝¹ : SeminormedAddCommGroup H\nK : Type u_3\ninst✝ : SeminormedAddCommGroup K\nf : NormedAddGroupHom G H\nC : ℝ\nh : SurjectiveOnWith f (range f) C\nhatg : Completion G\nhatg_in : ↑(completion f) hatg = 0\nε : ℝ\nε_pos : 0 < ε\n⊢ ∃ b, b ∈ ↑(range (NormedAddGroupHom.comp toCompl (incl (ker f)))) ∧ ‖hatg - b‖ < ε\n[PROOFSTEP]\nrcases h.exists_pos with ⟨C', C'_pos, hC'⟩\n[GOAL]\ncase intro.intro\nG : Type u_1\ninst✝² : SeminormedAddCommGroup G\nH : Type u_2\ninst✝¹ : SeminormedAddCommGroup H\nK : Type u_3\ninst✝ : SeminormedAddCommGroup K\nf : NormedAddGroupHom G H\nC : ℝ\nh : SurjectiveOnWith f (range f) C\nhatg : Completion G\nhatg_in : ↑(completion f) hatg = 0\nε : ℝ\nε_pos : 0 < ε\nC' : ℝ\nC'_pos : C' > 0\nhC' : SurjectiveOnWith f (range f) C'\n⊢ ∃ b, b ∈ ↑(range (NormedAddGroupHom.comp toCompl (incl (ker f)))) ∧ ‖hatg - b‖ < ε\n[PROOFSTEP]\nrcases exists_pos_mul_lt ε_pos (1 + C' * ‖f‖) with ⟨δ, δ_pos, hδ⟩\n[GOAL]\ncase intro.intro.intro.intro\nG : Type u_1\ninst✝² : SeminormedAddCommGroup G\nH : Type u_2\ninst✝¹ : SeminormedAddCommGroup H\nK : Type u_3\ninst✝ : SeminormedAddCommGroup K\nf : NormedAddGroupHom G H\nC : ℝ\nh : SurjectiveOnWith f (range f) C\nhatg : Completion G\nhatg_in : ↑(completion f) hatg = 0\nε : ℝ\nε_pos : 0 < ε\nC' : ℝ\nC'_pos : C' > 0\nhC' : SurjectiveOnWith f (range f) C'\nδ : ℝ\nδ_pos : 0 < δ\nhδ : (1 + C' * ‖f‖) * δ < ε\n⊢ ∃ b, b ∈ ↑(range (NormedAddGroupHom.comp toCompl (incl (ker f)))) ∧ ‖hatg - b‖ < ε\n[PROOFSTEP]\nobtain ⟨_, ⟨g : G, rfl⟩, hg : ‖hatg - g‖ < δ⟩ :=\n  SeminormedAddCommGroup.mem_closure_iff.mp (Completion.denseInducing_coe.dense hatg) δ δ_pos\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro\nG : Type u_1\ninst✝² : SeminormedAddCommGroup G\nH : Type u_2\ninst✝¹ : SeminormedAddCommGroup H\nK : Type u_3\ninst✝ : SeminormedAddCommGroup K\nf : NormedAddGroupHom G H\nC : ℝ\nh : SurjectiveOnWith f (range f) C\nhatg : Completion G\nhatg_in : ↑(completion f) hatg = 0\nε : ℝ\nε_pos : 0 < ε\nC' : ℝ\nC'_pos : C' > 0\nhC' : SurjectiveOnWith f (range f) C'\nδ : ℝ\nδ_pos : 0 < δ\nhδ : (1 + C' * ‖f‖) * δ < ε\ng : G\nhg : ‖hatg - ↑G g‖ < δ\n⊢ ∃ b, b ∈ ↑(range (NormedAddGroupHom.comp toCompl (incl (ker f)))) ∧ ‖hatg - b‖ < ε\n[PROOFSTEP]\nobtain ⟨g' : G, hgg' : f g' = f g, hfg : ‖g'‖ ≤ C' * ‖f g‖⟩ := hC' (f g) (mem_range_self _ g)\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro\nG : Type u_1\ninst✝² : SeminormedAddCommGroup G\nH : Type u_2\ninst✝¹ : SeminormedAddCommGroup H\nK : Type u_3\ninst✝ : SeminormedAddCommGroup K\nf : NormedAddGroupHom G H\nC : ℝ\nh : SurjectiveOnWith f (range f) C\nhatg : Completion G\nhatg_in : ↑(completion f) hatg = 0\nε : ℝ\nε_pos : 0 < ε\nC' : ℝ\nC'_pos : C' > 0\nhC' : SurjectiveOnWith f (range f) C'\nδ : ℝ\nδ_pos : 0 < δ\nhδ : (1 + C' * ‖f‖) * δ < ε\ng : G\nhg : ‖hatg - ↑G g‖ < δ\ng' : G\nhgg' : ↑f g' = ↑f g\nhfg : ‖g'‖ ≤ C' * ‖↑f g‖\n⊢ ∃ b, b ∈ ↑(range (NormedAddGroupHom.comp toCompl (incl (ker f)))) ∧ ‖hatg - b‖ < ε\n[PROOFSTEP]\nhave mem_ker : g - g' ∈ f.ker := by rw [f.mem_ker, map_sub, sub_eq_zero.mpr hgg'.symm]\n[GOAL]\nG : Type u_1\ninst✝² : SeminormedAddCommGroup G\nH : Type u_2\ninst✝¹ : SeminormedAddCommGroup H\nK : Type u_3\ninst✝ : SeminormedAddCommGroup K\nf : NormedAddGroupHom G H\nC : ℝ\nh : SurjectiveOnWith f (range f) C\nhatg : Completion G\nhatg_in : ↑(completion f) hatg = 0\nε : ℝ\nε_pos : 0 < ε\nC' : ℝ\nC'_pos : C' > 0\nhC' : SurjectiveOnWith f (range f) C'\nδ : ℝ\nδ_pos : 0 < δ\nhδ : (1 + C' * ‖f‖) * δ < ε\ng : G\nhg : ‖hatg - ↑G g‖ < δ\ng' : G\nhgg' : ↑f g' = ↑f g\nhfg : ‖g'‖ ≤ C' * ‖↑f g‖\n⊢ g - g' ∈ ker f\n[PROOFSTEP]\nrw [f.mem_ker, map_sub, sub_eq_zero.mpr hgg'.symm]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro\nG : Type u_1\ninst✝² : SeminormedAddCommGroup G\nH : Type u_2\ninst✝¹ : SeminormedAddCommGroup H\nK : Type u_3\ninst✝ : SeminormedAddCommGroup K\nf : NormedAddGroupHom G H\nC : ℝ\nh : SurjectiveOnWith f (range f) C\nhatg : Completion G\nhatg_in : ↑(completion f) hatg = 0\nε : ℝ\nε_pos : 0 < ε\nC' : ℝ\nC'_pos : C' > 0\nhC' : SurjectiveOnWith f (range f) C'\nδ : ℝ\nδ_pos : 0 < δ\nhδ : (1 + C' * ‖f‖) * δ < ε\ng : G\nhg : ‖hatg - ↑G g‖ < δ\ng' : G\nhgg' : ↑f g' = ↑f g\nhfg : ‖g'‖ ≤ C' * ‖↑f g‖\nmem_ker : g - g' ∈ ker f\n⊢ ∃ b, b ∈ ↑(range (NormedAddGroupHom.comp toCompl (incl (ker f)))) ∧ ‖hatg - b‖ < ε\n[PROOFSTEP]\nrefine ⟨_, ⟨⟨g - g', mem_ker⟩, rfl⟩, ?_⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro\nG : Type u_1\ninst✝² : SeminormedAddCommGroup G\nH : Type u_2\ninst✝¹ : SeminormedAddCommGroup H\nK : Type u_3\ninst✝ : SeminormedAddCommGroup K\nf : NormedAddGroupHom G H\nC : ℝ\nh : SurjectiveOnWith f (range f) C\nhatg : Completion G\nhatg_in : ↑(completion f) hatg = 0\nε : ℝ\nε_pos : 0 < ε\nC' : ℝ\nC'_pos : C' > 0\nhC' : SurjectiveOnWith f (range f) C'\nδ : ℝ\nδ_pos : 0 < δ\nhδ : (1 + C' * ‖f‖) * δ < ε\ng : G\nhg : ‖hatg - ↑G g‖ < δ\ng' : G\nhgg' : ↑f g' = ↑f g\nhfg : ‖g'‖ ≤ C' * ‖↑f g‖\nmem_ker : g - g' ∈ ker f\n⊢ ‖hatg - ↑(toAddMonoidHom (NormedAddGroupHom.comp toCompl (incl (ker f)))) { val := g - g', property := mem_ker }‖ < ε\n[PROOFSTEP]\nhave : ‖f g‖ ≤ ‖f‖ * δ\n[GOAL]\ncase this\nG : Type u_1\ninst✝² : SeminormedAddCommGroup G\nH : Type u_2\ninst✝¹ : SeminormedAddCommGroup H\nK : Type u_3\ninst✝ : SeminormedAddCommGroup K\nf : NormedAddGroupHom G H\nC : ℝ\nh : SurjectiveOnWith f (range f) C\nhatg : Completion G\nhatg_in : ↑(completion f) hatg = 0\nε : ℝ\nε_pos : 0 < ε\nC' : ℝ\nC'_pos : C' > 0\nhC' : SurjectiveOnWith f (range f) C'\nδ : ℝ\nδ_pos : 0 < δ\nhδ : (1 + C' * ‖f‖) * δ < ε\ng : G\nhg : ‖hatg - ↑G g‖ < δ\ng' : G\nhgg' : ↑f g' = ↑f g\nhfg : ‖g'‖ ≤ C' * ‖↑f g‖\nmem_ker : g - g' ∈ ker f\n⊢ ‖↑f g‖ ≤ ‖f‖ * δ\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro\nG : Type u_1\ninst✝² : SeminormedAddCommGroup G\nH : Type u_2\ninst✝¹ : SeminormedAddCommGroup H\nK : Type u_3\ninst✝ : SeminormedAddCommGroup K\nf : NormedAddGroupHom G H\nC : ℝ\nh : SurjectiveOnWith f (range f) C\nhatg : Completion G\nhatg_in : ↑(completion f) hatg = 0\nε : ℝ\nε_pos : 0 < ε\nC' : ℝ\nC'_pos : C' > 0\nhC' : SurjectiveOnWith f (range f) C'\nδ : ℝ\nδ_pos : 0 < δ\nhδ : (1 + C' * ‖f‖) * δ < ε\ng : G\nhg : ‖hatg - ↑G g‖ < δ\ng' : G\nhgg' : ↑f g' = ↑f g\nhfg : ‖g'‖ ≤ C' * ‖↑f g‖\nmem_ker : g - g' ∈ ker f\nthis : ‖↑f g‖ ≤ ‖f‖ * δ\n⊢ ‖hatg - ↑(toAddMonoidHom (NormedAddGroupHom.comp toCompl (incl (ker f)))) { val := g - g', property := mem_ker }‖ < ε\n[PROOFSTEP]\ncalc\n  ‖f g‖ ≤ ‖f‖ * ‖hatg - g‖ := by simpa [hatg_in] using f.completion.le_opNorm (hatg - g)\n  _ ≤ ‖f‖ * δ := by gcongr\n[GOAL]\nG : Type u_1\ninst✝² : SeminormedAddCommGroup G\nH : Type u_2\ninst✝¹ : SeminormedAddCommGroup H\nK : Type u_3\ninst✝ : SeminormedAddCommGroup K\nf : NormedAddGroupHom G H\nC : ℝ\nh : SurjectiveOnWith f (range f) C\nhatg : Completion G\nhatg_in : ↑(completion f) hatg = 0\nε : ℝ\nε_pos : 0 < ε\nC' : ℝ\nC'_pos : C' > 0\nhC' : SurjectiveOnWith f (range f) C'\nδ : ℝ\nδ_pos : 0 < δ\nhδ : (1 + C' * ‖f‖) * δ < ε\ng : G\nhg : ‖hatg - ↑G g‖ < δ\ng' : G\nhgg' : ↑f g' = ↑f g\nhfg : ‖g'‖ ≤ C' * ‖↑f g‖\nmem_ker : g - g' ∈ ker f\n⊢ ‖↑f g‖ ≤ ‖f‖ * ‖hatg - ↑G g‖\n[PROOFSTEP]\nsimpa [hatg_in] using f.completion.le_opNorm (hatg - g)\n[GOAL]\nG : Type u_1\ninst✝² : SeminormedAddCommGroup G\nH : Type u_2\ninst✝¹ : SeminormedAddCommGroup H\nK : Type u_3\ninst✝ : SeminormedAddCommGroup K\nf : NormedAddGroupHom G H\nC : ℝ\nh : SurjectiveOnWith f (range f) C\nhatg : Completion G\nhatg_in : ↑(completion f) hatg = 0\nε : ℝ\nε_pos : 0 < ε\nC' : ℝ\nC'_pos : C' > 0\nhC' : SurjectiveOnWith f (range f) C'\nδ : ℝ\nδ_pos : 0 < δ\nhδ : (1 + C' * ‖f‖) * δ < ε\ng : G\nhg : ‖hatg - ↑G g‖ < δ\ng' : G\nhgg' : ↑f g' = ↑f g\nhfg : ‖g'‖ ≤ C' * ‖↑f g‖\nmem_ker : g - g' ∈ ker f\n⊢ ‖f‖ * ‖hatg - ↑G g‖ ≤ ‖f‖ * δ\n[PROOFSTEP]\ngcongr\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro\nG : Type u_1\ninst✝² : SeminormedAddCommGroup G\nH : Type u_2\ninst✝¹ : SeminormedAddCommGroup H\nK : Type u_3\ninst✝ : SeminormedAddCommGroup K\nf : NormedAddGroupHom G H\nC : ℝ\nh : SurjectiveOnWith f (range f) C\nhatg : Completion G\nhatg_in : ↑(completion f) hatg = 0\nε : ℝ\nε_pos : 0 < ε\nC' : ℝ\nC'_pos : C' > 0\nhC' : SurjectiveOnWith f (range f) C'\nδ : ℝ\nδ_pos : 0 < δ\nhδ : (1 + C' * ‖f‖) * δ < ε\ng : G\nhg : ‖hatg - ↑G g‖ < δ\ng' : G\nhgg' : ↑f g' = ↑f g\nhfg : ‖g'‖ ≤ C' * ‖↑f g‖\nmem_ker : g - g' ∈ ker f\nthis : ‖↑f g‖ ≤ ‖f‖ * δ\n⊢ ‖hatg - ↑(toAddMonoidHom (NormedAddGroupHom.comp toCompl (incl (ker f)))) { val := g - g', property := mem_ker }‖ < ε\n[PROOFSTEP]\ncalc\n  ‖hatg - ↑(g - g')‖ = ‖hatg - g + g'‖ := by rw [Completion.coe_sub, sub_add]\n  _ ≤ ‖hatg - g‖ + ‖(g' : Completion G)‖ := (norm_add_le _ _)\n  _ = ‖hatg - g‖ + ‖g'‖ := by rw [Completion.norm_coe]\n  _ < δ + C' * ‖f g‖ := (add_lt_add_of_lt_of_le hg hfg)\n  _ ≤ δ + C' * (‖f‖ * δ) := by gcongr\n  _ < ε := by simpa only [add_mul, one_mul, mul_assoc] using hδ\n[GOAL]\nG : Type u_1\ninst✝² : SeminormedAddCommGroup G\nH : Type u_2\ninst✝¹ : SeminormedAddCommGroup H\nK : Type u_3\ninst✝ : SeminormedAddCommGroup K\nf : NormedAddGroupHom G H\nC : ℝ\nh : SurjectiveOnWith f (range f) C\nhatg : Completion G\nhatg_in : ↑(completion f) hatg = 0\nε : ℝ\nε_pos : 0 < ε\nC' : ℝ\nC'_pos : C' > 0\nhC' : SurjectiveOnWith f (range f) C'\nδ : ℝ\nδ_pos : 0 < δ\nhδ : (1 + C' * ‖f‖) * δ < ε\ng : G\nhg : ‖hatg - ↑G g‖ < δ\ng' : G\nhgg' : ↑f g' = ↑f g\nhfg : ‖g'‖ ≤ C' * ‖↑f g‖\nmem_ker : g - g' ∈ ker f\nthis : ‖↑f g‖ ≤ ‖f‖ * δ\n⊢ ‖hatg - ↑G (g - g')‖ = ‖hatg - ↑G g + ↑G g'‖\n[PROOFSTEP]\nrw [Completion.coe_sub, sub_add]\n[GOAL]\nG : Type u_1\ninst✝² : SeminormedAddCommGroup G\nH : Type u_2\ninst✝¹ : SeminormedAddCommGroup H\nK : Type u_3\ninst✝ : SeminormedAddCommGroup K\nf : NormedAddGroupHom G H\nC : ℝ\nh : SurjectiveOnWith f (range f) C\nhatg : Completion G\nhatg_in : ↑(completion f) hatg = 0\nε : ℝ\nε_pos : 0 < ε\nC' : ℝ\nC'_pos : C' > 0\nhC' : SurjectiveOnWith f (range f) C'\nδ : ℝ\nδ_pos : 0 < δ\nhδ : (1 + C' * ‖f‖) * δ < ε\ng : G\nhg : ‖hatg - ↑G g‖ < δ\ng' : G\nhgg' : ↑f g' = ↑f g\nhfg : ‖g'‖ ≤ C' * ‖↑f g‖\nmem_ker : g - g' ∈ ker f\nthis : ‖↑f g‖ ≤ ‖f‖ * δ\n⊢ ‖hatg - ↑G g‖ + ‖↑G g'‖ = ‖hatg - ↑G g‖ + ‖g'‖\n[PROOFSTEP]\nrw [Completion.norm_coe]\n[GOAL]\nG : Type u_1\ninst✝² : SeminormedAddCommGroup G\nH : Type u_2\ninst✝¹ : SeminormedAddCommGroup H\nK : Type u_3\ninst✝ : SeminormedAddCommGroup K\nf : NormedAddGroupHom G H\nC : ℝ\nh : SurjectiveOnWith f (range f) C\nhatg : Completion G\nhatg_in : ↑(completion f) hatg = 0\nε : ℝ\nε_pos : 0 < ε\nC' : ℝ\nC'_pos : C' > 0\nhC' : SurjectiveOnWith f (range f) C'\nδ : ℝ\nδ_pos : 0 < δ\nhδ : (1 + C' * ‖f‖) * δ < ε\ng : G\nhg : ‖hatg - ↑G g‖ < δ\ng' : G\nhgg' : ↑f g' = ↑f g\nhfg : ‖g'‖ ≤ C' * ‖↑f g‖\nmem_ker : g - g' ∈ ker f\nthis : ‖↑f g‖ ≤ ‖f‖ * δ\n⊢ δ + C' * ‖↑f g‖ ≤ δ + C' * (‖f‖ * δ)\n[PROOFSTEP]\ngcongr\n[GOAL]\nG : Type u_1\ninst✝² : SeminormedAddCommGroup G\nH : Type u_2\ninst✝¹ : SeminormedAddCommGroup H\nK : Type u_3\ninst✝ : SeminormedAddCommGroup K\nf : NormedAddGroupHom G H\nC : ℝ\nh : SurjectiveOnWith f (range f) C\nhatg : Completion G\nhatg_in : ↑(completion f) hatg = 0\nε : ℝ\nε_pos : 0 < ε\nC' : ℝ\nC'_pos : C' > 0\nhC' : SurjectiveOnWith f (range f) C'\nδ : ℝ\nδ_pos : 0 < δ\nhδ : (1 + C' * ‖f‖) * δ < ε\ng : G\nhg : ‖hatg - ↑G g‖ < δ\ng' : G\nhgg' : ↑f g' = ↑f g\nhfg : ‖g'‖ ≤ C' * ‖↑f g‖\nmem_ker : g - g' ∈ ker f\nthis : ‖↑f g‖ ≤ ‖f‖ * δ\n⊢ δ + C' * (‖f‖ * δ) < ε\n[PROOFSTEP]\nsimpa only [add_mul, one_mul, mul_assoc] using hδ\n[GOAL]\nG : Type u_1\ninst✝³ : SeminormedAddCommGroup G\nH : Type u_2\ninst✝² : SeminormedAddCommGroup H\ninst✝¹ : SeparatedSpace H\ninst✝ : CompleteSpace H\nf : NormedAddGroupHom G H\ng : NormedAddGroupHom (Completion G) H\nhg : ∀ (v : G), ↑f v = ↑g (↑G v)\n⊢ extension f = g\n[PROOFSTEP]\next v\n[GOAL]\ncase H\nG : Type u_1\ninst✝³ : SeminormedAddCommGroup G\nH : Type u_2\ninst✝² : SeminormedAddCommGroup H\ninst✝¹ : SeparatedSpace H\ninst✝ : CompleteSpace H\nf : NormedAddGroupHom G H\ng : NormedAddGroupHom (Completion G) H\nhg : ∀ (v : G), ↑f v = ↑g (↑G v)\nv : Completion G\n⊢ ↑(extension f) v = ↑g v\n[PROOFSTEP]\nrw [NormedAddGroupHom.extension_coe_to_fun,\n  Completion.extension_unique f.uniformContinuous g.uniformContinuous fun a => hg a]\n", "meta": {"mathlib_filename": "Mathlib.Analysis.Normed.Group.HomCompletion", "llama_tokens": 8639, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.6992544335934766, "lm_q2_score": 0.7662936430859597, "lm_q1q2_score": 0.5358342273623545}}
{"text": "[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : Type x\ninst✝ : Distrib R\na x y x' y' : R\nh : SemiconjBy a x y\nh' : SemiconjBy a x' y'\n⊢ SemiconjBy a (x + x') (y + y')\n[PROOFSTEP]\nsimp only [SemiconjBy, left_distrib, right_distrib, h.eq, h'.eq]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : Type x\ninst✝ : Distrib R\na b x y : R\nha : SemiconjBy a x y\nhb : SemiconjBy b x y\n⊢ SemiconjBy (a + b) x y\n[PROOFSTEP]\nsimp only [SemiconjBy, left_distrib, right_distrib, ha.eq, hb.eq]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : Type x\ninst✝¹ : Mul R\ninst✝ : HasDistribNeg R\na x y : R\nh : SemiconjBy a x y\n⊢ SemiconjBy a (-x) (-y)\n[PROOFSTEP]\nsimp only [SemiconjBy, h.eq, neg_mul, mul_neg]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : Type x\ninst✝¹ : Mul R\ninst✝ : HasDistribNeg R\na x y : R\nh : SemiconjBy a x y\n⊢ SemiconjBy (-a) x y\n[PROOFSTEP]\nsimp only [SemiconjBy, h.eq, neg_mul, mul_neg]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : Type x\ninst✝ : NonUnitalNonAssocRing R\na b x y x' y' : R\nh : SemiconjBy a x y\nh' : SemiconjBy a x' y'\n⊢ SemiconjBy a (x - x') (y - y')\n[PROOFSTEP]\nsimpa only [sub_eq_add_neg] using h.add_right h'.neg_right\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : Type x\ninst✝ : NonUnitalNonAssocRing R\na b x y x' y' : R\nha : SemiconjBy a x y\nhb : SemiconjBy b x y\n⊢ SemiconjBy (a - b) x y\n[PROOFSTEP]\nsimpa only [sub_eq_add_neg] using ha.add_left hb.neg_left\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Ring.Semiconj", "llama_tokens": 671, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7772998611746912, "lm_q2_score": 0.6893056040203135, "lm_q1q2_score": 0.5357971503119263}}
{"text": "[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\nc x y : P\nR : ℝ\nhR : R ≠ 0\nhx : x ≠ c\nhy : y ≠ c\n⊢ inversion c R x ∈ perpBisector c (inversion c R y) ↔ dist x y = dist y c\n[PROOFSTEP]\nrw [mem_perpBisector_iff_dist_eq, dist_inversion_inversion hx hy, dist_inversion_center]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\nc x y : P\nR : ℝ\nhR : R ≠ 0\nhx : x ≠ c\nhy : y ≠ c\n⊢ R ^ 2 / dist x c = R ^ 2 / (dist x c * dist y c) * dist x y ↔ dist x y = dist y c\n[PROOFSTEP]\nhave hx' := dist_ne_zero.2 hx\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\nc x y : P\nR : ℝ\nhR : R ≠ 0\nhx : x ≠ c\nhy : y ≠ c\nhx' : dist x c ≠ 0\n⊢ R ^ 2 / dist x c = R ^ 2 / (dist x c * dist y c) * dist x y ↔ dist x y = dist y c\n[PROOFSTEP]\nhave hy' := dist_ne_zero.2 hy\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\nc x y : P\nR : ℝ\nhR : R ≠ 0\nhx : x ≠ c\nhy : y ≠ c\nhx' : dist x c ≠ 0\nhy' : dist y c ≠ 0\n⊢ R ^ 2 / dist x c = R ^ 2 / (dist x c * dist y c) * dist x y ↔ dist x y = dist y c\n[PROOFSTEP]\nfield_simp [mul_assoc, mul_comm, hx, hx.symm, eq_comm]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\nc x y : P\nR : ℝ\nhR : R ≠ 0\nhy : y ≠ c\n⊢ inversion c R x ∈ perpBisector c (inversion c R y) ↔ dist x y = dist y c ∧ x ≠ c\n[PROOFSTEP]\nrcases eq_or_ne x c with rfl | hx\n[GOAL]\ncase inl\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\nx y : P\nR : ℝ\nhR : R ≠ 0\nhy : y ≠ x\n⊢ inversion x R x ∈ perpBisector x (inversion x R y) ↔ dist x y = dist y x ∧ x ≠ x\n[PROOFSTEP]\nsimp [*]\n[GOAL]\ncase inr\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\nc x y : P\nR : ℝ\nhR : R ≠ 0\nhy : y ≠ c\nhx : x ≠ c\n⊢ inversion c R x ∈ perpBisector c (inversion c R y) ↔ dist x y = dist y c ∧ x ≠ c\n[PROOFSTEP]\nsimp [inversion_mem_perpBisector_inversion_iff hR hx hy, hx]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\nc x y : P\nR : ℝ\nhR : R ≠ 0\nhy : y ≠ c\n⊢ inversion c R ⁻¹' ↑(perpBisector c y) = sphere (inversion c R y) (R ^ 2 / dist y c) \\ {c}\n[PROOFSTEP]\nrw [← dist_inversion_center, ← preimage_inversion_perpBisector_inversion hR, inversion_inversion]\n[GOAL]\ncase hR\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\nc x y : P\nR : ℝ\nhR : R ≠ 0\nhy : y ≠ c\n⊢ R ≠ 0\n[PROOFSTEP]\nsimp [*]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\nc x y : P\nR : ℝ\nhR : R ≠ 0\nhy : y ≠ c\n⊢ inversion c R y ≠ c\n[PROOFSTEP]\nsimp [*]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\nc x y : P\nR : ℝ\nhR : R ≠ 0\nhy : y ≠ c\n⊢ inversion c R '' ↑(perpBisector c y) = sphere (inversion c R y) (R ^ 2 / dist y c) \\ {c}\n[PROOFSTEP]\nrw [image_eq_preimage_of_inverse (inversion_involutive _ hR) (inversion_involutive _ hR),\n  preimage_inversion_perpBisector hR hy]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\nc x y : P\nR : ℝ\nhR : R ≠ 0\nhy : y ≠ c\n⊢ inversion c R ⁻¹' sphere y (dist y c) = insert c ↑(perpBisector c (inversion c R y))\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\nc x✝ y : P\nR : ℝ\nhR : R ≠ 0\nhy : y ≠ c\nx : P\n⊢ x ∈ inversion c R ⁻¹' sphere y (dist y c) ↔ x ∈ insert c ↑(perpBisector c (inversion c R y))\n[PROOFSTEP]\nrcases eq_or_ne x c with rfl | hx\n[GOAL]\ncase h.inl\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\nx✝ y : P\nR : ℝ\nhR : R ≠ 0\nx : P\nhy : y ≠ x\n⊢ x ∈ inversion x R ⁻¹' sphere y (dist y x) ↔ x ∈ insert x ↑(perpBisector x (inversion x R y))\n[PROOFSTEP]\nsimp [dist_comm]\n[GOAL]\ncase h.inr\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\nc x✝ y : P\nR : ℝ\nhR : R ≠ 0\nhy : y ≠ c\nx : P\nhx : x ≠ c\n⊢ x ∈ inversion c R ⁻¹' sphere y (dist y c) ↔ x ∈ insert c ↑(perpBisector c (inversion c R y))\n[PROOFSTEP]\nrw [mem_preimage, mem_sphere, ← inversion_mem_perpBisector_inversion_iff hR]\n[GOAL]\ncase h.inr\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\nc x✝ y : P\nR : ℝ\nhR : R ≠ 0\nhy : y ≠ c\nx : P\nhx : x ≠ c\n⊢ inversion c R (inversion c R x) ∈ perpBisector c (inversion c R y) ↔ x ∈ insert c ↑(perpBisector c (inversion c R y))\n[PROOFSTEP]\nsimp [*]\n[GOAL]\ncase h.inr.hx\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\nc x✝ y : P\nR : ℝ\nhR : R ≠ 0\nhy : y ≠ c\nx : P\nhx : x ≠ c\n⊢ inversion c R x ≠ c\n[PROOFSTEP]\nsimp [*]\n[GOAL]\ncase h.inr.hy\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\nc x✝ y : P\nR : ℝ\nhR : R ≠ 0\nhy : y ≠ c\nx : P\nhx : x ≠ c\n⊢ y ≠ c\n[PROOFSTEP]\nsimp [*]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝³ : NormedAddCommGroup V\ninst✝² : InnerProductSpace ℝ V\ninst✝¹ : MetricSpace P\ninst✝ : NormedAddTorsor V P\nc x y : P\nR : ℝ\nhR : R ≠ 0\nhy : y ≠ c\n⊢ inversion c R '' sphere y (dist y c) = insert c ↑(perpBisector c (inversion c R y))\n[PROOFSTEP]\nrw [image_eq_preimage_of_inverse (inversion_involutive _ hR) (inversion_involutive _ hR),\n  preimage_inversion_sphere_dist_center hR hy]\n", "meta": {"mathlib_filename": "Mathlib.Geometry.Euclidean.Inversion.ImageHyperplane", "llama_tokens": 3147, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8221891435927268, "lm_q2_score": 0.6513548714339144, "lm_q1q2_score": 0.5355369039192007}}
{"text": "[GOAL]\nk : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝³ : OrderedSemiring k\ninst✝² : OrderedAddCommGroup M\ninst✝¹ : Module k M\ninst✝ : OrderedSMul k M\na b : M\nc : k\nhc : 0 < c\n⊢ c • a < 0 ↔ a < 0\n[PROOFSTEP]\nrw [← neg_neg a, smul_neg, neg_neg_iff_pos, neg_neg_iff_pos]\n[GOAL]\nk : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝³ : OrderedSemiring k\ninst✝² : OrderedAddCommGroup M\ninst✝¹ : Module k M\ninst✝ : OrderedSMul k M\na b : M\nc : k\nhc : 0 < c\n⊢ 0 < c • -a ↔ 0 < -a\n[PROOFSTEP]\nexact smul_pos_iff_of_pos hc\n[GOAL]\nk : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝³ : OrderedRing k\ninst✝² : OrderedAddCommGroup M\ninst✝¹ : Module k M\ninst✝ : OrderedSMul k M\na b : M\nc : k\nh : a < b\nhc : c < 0\n⊢ c • b < c • a\n[PROOFSTEP]\nrw [← neg_neg c, neg_smul, neg_smul (-c), neg_lt_neg_iff]\n[GOAL]\nk : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝³ : OrderedRing k\ninst✝² : OrderedAddCommGroup M\ninst✝¹ : Module k M\ninst✝ : OrderedSMul k M\na b : M\nc : k\nh : a < b\nhc : c < 0\n⊢ -c • a < -c • b\n[PROOFSTEP]\nexact smul_lt_smul_of_pos h (neg_pos_of_neg hc)\n[GOAL]\nk : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝³ : OrderedRing k\ninst✝² : OrderedAddCommGroup M\ninst✝¹ : Module k M\ninst✝ : OrderedSMul k M\na b : M\nc : k\nh : a ≤ b\nhc : c ≤ 0\n⊢ c • b ≤ c • a\n[PROOFSTEP]\nrw [← neg_neg c, neg_smul, neg_smul (-c), neg_le_neg_iff]\n[GOAL]\nk : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝³ : OrderedRing k\ninst✝² : OrderedAddCommGroup M\ninst✝¹ : Module k M\ninst✝ : OrderedSMul k M\na b : M\nc : k\nh : a ≤ b\nhc : c ≤ 0\n⊢ -c • a ≤ -c • b\n[PROOFSTEP]\nexact smul_le_smul_of_nonneg h (neg_nonneg_of_nonpos hc)\n[GOAL]\nk : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝³ : OrderedRing k\ninst✝² : OrderedAddCommGroup M\ninst✝¹ : Module k M\ninst✝ : OrderedSMul k M\na b : M\nc : k\nhab : c • a = c • b\nhc : c < 0\nh : a ≤ b\n⊢ a = b\n[PROOFSTEP]\nrw [← neg_neg c, neg_smul, neg_smul (-c), neg_inj] at hab \n[GOAL]\nk : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝³ : OrderedRing k\ninst✝² : OrderedAddCommGroup M\ninst✝¹ : Module k M\ninst✝ : OrderedSMul k M\na b : M\nc : k\nhab : -c • a = -c • b\nhc : c < 0\nh : a ≤ b\n⊢ a = b\n[PROOFSTEP]\nexact eq_of_smul_eq_smul_of_pos_of_le hab (neg_pos_of_neg hc) h\n[GOAL]\nk : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝³ : OrderedRing k\ninst✝² : OrderedAddCommGroup M\ninst✝¹ : Module k M\ninst✝ : OrderedSMul k M\na b : M\nc : k\nh : c • a < c • b\nhc : c ≤ 0\n⊢ b < a\n[PROOFSTEP]\nrw [← neg_neg c, neg_smul, neg_smul (-c), neg_lt_neg_iff] at h \n[GOAL]\nk : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝³ : OrderedRing k\ninst✝² : OrderedAddCommGroup M\ninst✝¹ : Module k M\ninst✝ : OrderedSMul k M\na b : M\nc : k\nh : -c • b < -c • a\nhc : c ≤ 0\n⊢ b < a\n[PROOFSTEP]\nexact lt_of_smul_lt_smul_of_nonneg h (neg_nonneg_of_nonpos hc)\n[GOAL]\nk : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝³ : OrderedRing k\ninst✝² : OrderedAddCommGroup M\ninst✝¹ : Module k M\ninst✝ : OrderedSMul k M\na b : M\nc : k\nhc : c < 0\n⊢ c • a < c • b ↔ b < a\n[PROOFSTEP]\nrw [← neg_neg c, neg_smul, neg_smul (-c), neg_lt_neg_iff]\n[GOAL]\nk : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝³ : OrderedRing k\ninst✝² : OrderedAddCommGroup M\ninst✝¹ : Module k M\ninst✝ : OrderedSMul k M\na b : M\nc : k\nhc : c < 0\n⊢ -c • b < -c • a ↔ b < a\n[PROOFSTEP]\nexact smul_lt_smul_iff_of_pos (neg_pos_of_neg hc)\n[GOAL]\nk : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝³ : OrderedRing k\ninst✝² : OrderedAddCommGroup M\ninst✝¹ : Module k M\ninst✝ : OrderedSMul k M\na b : M\nc : k\nhc : c < 0\n⊢ c • a < 0 ↔ 0 < a\n[PROOFSTEP]\nrw [← neg_neg c, neg_smul, neg_neg_iff_pos]\n[GOAL]\nk : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝³ : OrderedRing k\ninst✝² : OrderedAddCommGroup M\ninst✝¹ : Module k M\ninst✝ : OrderedSMul k M\na b : M\nc : k\nhc : c < 0\n⊢ 0 < -c • a ↔ 0 < a\n[PROOFSTEP]\nexact smul_pos_iff_of_pos (neg_pos_of_neg hc)\n[GOAL]\nk : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝³ : OrderedRing k\ninst✝² : OrderedAddCommGroup M\ninst✝¹ : Module k M\ninst✝ : OrderedSMul k M\na b : M\nc : k\nhc : c < 0\n⊢ 0 < c • a ↔ a < 0\n[PROOFSTEP]\nrw [← neg_neg c, neg_smul, neg_pos]\n[GOAL]\nk : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝³ : OrderedRing k\ninst✝² : OrderedAddCommGroup M\ninst✝¹ : Module k M\ninst✝ : OrderedSMul k M\na b : M\nc : k\nhc : c < 0\n⊢ -c • a < 0 ↔ a < 0\n[PROOFSTEP]\nexact smul_neg_iff_of_pos (neg_pos_of_neg hc)\n[GOAL]\nk : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁴ : OrderedRing k\ninst✝³ : OrderedAddCommGroup M\ninst✝² : Module k M\ninst✝¹ : OrderedSMul k M\na✝ b✝ : M\nc✝ : k\ninst✝ : ContravariantClass M M (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\na b : k\nc d : M\nhab : a ≤ b\nhcd : c ≤ d\n⊢ a • d + b • c ≤ a • c + b • d\n[PROOFSTEP]\nobtain ⟨b, rfl⟩ := exists_add_of_le hab\n[GOAL]\ncase intro\nk : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁴ : OrderedRing k\ninst✝³ : OrderedAddCommGroup M\ninst✝² : Module k M\ninst✝¹ : OrderedSMul k M\na✝ b✝ : M\nc✝ : k\ninst✝ : ContravariantClass M M (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\na : k\nc d : M\nhcd : c ≤ d\nb : k\nhab : a ≤ a + b\n⊢ a • d + (a + b) • c ≤ a • c + (a + b) • d\n[PROOFSTEP]\nobtain ⟨d, rfl⟩ := exists_add_of_le hcd\n[GOAL]\ncase intro.intro\nk : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁴ : OrderedRing k\ninst✝³ : OrderedAddCommGroup M\ninst✝² : Module k M\ninst✝¹ : OrderedSMul k M\na✝ b✝ : M\nc✝ : k\ninst✝ : ContravariantClass M M (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\na : k\nc : M\nb : k\nhab : a ≤ a + b\nd : M\nhcd : c ≤ c + d\n⊢ a • (c + d) + (a + b) • c ≤ a • c + (a + b) • (c + d)\n[PROOFSTEP]\nrw [smul_add, add_right_comm, smul_add, ← add_assoc, add_smul _ _ d]\n[GOAL]\ncase intro.intro\nk : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁴ : OrderedRing k\ninst✝³ : OrderedAddCommGroup M\ninst✝² : Module k M\ninst✝¹ : OrderedSMul k M\na✝ b✝ : M\nc✝ : k\ninst✝ : ContravariantClass M M (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\na : k\nc : M\nb : k\nhab : a ≤ a + b\nd : M\nhcd : c ≤ c + d\n⊢ a • c + (a + b) • c + a • d ≤ a • c + (a + b) • c + (a • d + b • d)\n[PROOFSTEP]\nrw [le_add_iff_nonneg_right] at hab hcd \n[GOAL]\ncase intro.intro\nk : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁴ : OrderedRing k\ninst✝³ : OrderedAddCommGroup M\ninst✝² : Module k M\ninst✝¹ : OrderedSMul k M\na✝ b✝ : M\nc✝ : k\ninst✝ : ContravariantClass M M (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\na : k\nc : M\nb : k\nhab : 0 ≤ b\nd : M\nhcd : 0 ≤ d\n⊢ a • c + (a + b) • c + a • d ≤ a • c + (a + b) • c + (a • d + b • d)\n[PROOFSTEP]\nexact add_le_add_left (le_add_of_nonneg_right <| smul_nonneg hab hcd) _\n[GOAL]\nk : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁴ : OrderedRing k\ninst✝³ : OrderedAddCommGroup M\ninst✝² : Module k M\ninst✝¹ : OrderedSMul k M\na✝ b✝ : M\nc✝ : k\ninst✝ : ContravariantClass M M (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\na b : k\nc d : M\nhba : b ≤ a\nhdc : d ≤ c\n⊢ a • d + b • c ≤ a • c + b • d\n[PROOFSTEP]\nrw [add_comm (a • d), add_comm (a • c)]\n[GOAL]\nk : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁴ : OrderedRing k\ninst✝³ : OrderedAddCommGroup M\ninst✝² : Module k M\ninst✝¹ : OrderedSMul k M\na✝ b✝ : M\nc✝ : k\ninst✝ : ContravariantClass M M (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\na b : k\nc d : M\nhba : b ≤ a\nhdc : d ≤ c\n⊢ b • c + a • d ≤ b • d + a • c\n[PROOFSTEP]\nexact smul_add_smul_le_smul_add_smul hba hdc\n[GOAL]\nk : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁵ : OrderedRing k\ninst✝⁴ : OrderedAddCommGroup M\ninst✝³ : Module k M\ninst✝² : OrderedSMul k M\na✝ b✝ : M\nc✝ : k\ninst✝¹ : CovariantClass M M (fun x x_1 => x + x_1) fun x x_1 => x < x_1\ninst✝ : ContravariantClass M M (fun x x_1 => x + x_1) fun x x_1 => x < x_1\na b : k\nc d : M\nhab : a < b\nhcd : c < d\n⊢ a • d + b • c < a • c + b • d\n[PROOFSTEP]\nobtain ⟨b, rfl⟩ := exists_add_of_le hab.le\n[GOAL]\ncase intro\nk : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁵ : OrderedRing k\ninst✝⁴ : OrderedAddCommGroup M\ninst✝³ : Module k M\ninst✝² : OrderedSMul k M\na✝ b✝ : M\nc✝ : k\ninst✝¹ : CovariantClass M M (fun x x_1 => x + x_1) fun x x_1 => x < x_1\ninst✝ : ContravariantClass M M (fun x x_1 => x + x_1) fun x x_1 => x < x_1\na : k\nc d : M\nhcd : c < d\nb : k\nhab : a < a + b\n⊢ a • d + (a + b) • c < a • c + (a + b) • d\n[PROOFSTEP]\nobtain ⟨d, rfl⟩ := exists_add_of_le hcd.le\n[GOAL]\ncase intro.intro\nk : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁵ : OrderedRing k\ninst✝⁴ : OrderedAddCommGroup M\ninst✝³ : Module k M\ninst✝² : OrderedSMul k M\na✝ b✝ : M\nc✝ : k\ninst✝¹ : CovariantClass M M (fun x x_1 => x + x_1) fun x x_1 => x < x_1\ninst✝ : ContravariantClass M M (fun x x_1 => x + x_1) fun x x_1 => x < x_1\na : k\nc : M\nb : k\nhab : a < a + b\nd : M\nhcd : c < c + d\n⊢ a • (c + d) + (a + b) • c < a • c + (a + b) • (c + d)\n[PROOFSTEP]\nrw [smul_add, add_right_comm, smul_add, ← add_assoc, add_smul _ _ d]\n[GOAL]\ncase intro.intro\nk : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁵ : OrderedRing k\ninst✝⁴ : OrderedAddCommGroup M\ninst✝³ : Module k M\ninst✝² : OrderedSMul k M\na✝ b✝ : M\nc✝ : k\ninst✝¹ : CovariantClass M M (fun x x_1 => x + x_1) fun x x_1 => x < x_1\ninst✝ : ContravariantClass M M (fun x x_1 => x + x_1) fun x x_1 => x < x_1\na : k\nc : M\nb : k\nhab : a < a + b\nd : M\nhcd : c < c + d\n⊢ a • c + (a + b) • c + a • d < a • c + (a + b) • c + (a • d + b • d)\n[PROOFSTEP]\nrw [lt_add_iff_pos_right] at hab hcd \n[GOAL]\ncase intro.intro\nk : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁵ : OrderedRing k\ninst✝⁴ : OrderedAddCommGroup M\ninst✝³ : Module k M\ninst✝² : OrderedSMul k M\na✝ b✝ : M\nc✝ : k\ninst✝¹ : CovariantClass M M (fun x x_1 => x + x_1) fun x x_1 => x < x_1\ninst✝ : ContravariantClass M M (fun x x_1 => x + x_1) fun x x_1 => x < x_1\na : k\nc : M\nb : k\nhab : 0 < b\nd : M\nhcd : 0 < d\n⊢ a • c + (a + b) • c + a • d < a • c + (a + b) • c + (a • d + b • d)\n[PROOFSTEP]\nexact add_lt_add_left (lt_add_of_pos_right _ <| smul_pos hab hcd) _\n[GOAL]\nk : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁵ : OrderedRing k\ninst✝⁴ : OrderedAddCommGroup M\ninst✝³ : Module k M\ninst✝² : OrderedSMul k M\na✝ b✝ : M\nc✝ : k\ninst✝¹ : CovariantClass M M (fun x x_1 => x + x_1) fun x x_1 => x < x_1\ninst✝ : ContravariantClass M M (fun x x_1 => x + x_1) fun x x_1 => x < x_1\na b : k\nc d : M\nhba : b < a\nhdc : d < c\n⊢ a • d + b • c < a • c + b • d\n[PROOFSTEP]\nrw [add_comm (a • d), add_comm (a • c)]\n[GOAL]\nk : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁵ : OrderedRing k\ninst✝⁴ : OrderedAddCommGroup M\ninst✝³ : Module k M\ninst✝² : OrderedSMul k M\na✝ b✝ : M\nc✝ : k\ninst✝¹ : CovariantClass M M (fun x x_1 => x + x_1) fun x x_1 => x < x_1\ninst✝ : ContravariantClass M M (fun x x_1 => x + x_1) fun x x_1 => x < x_1\na b : k\nc d : M\nhba : b < a\nhdc : d < c\n⊢ b • c + a • d < b • d + a • c\n[PROOFSTEP]\nexact smul_add_smul_lt_smul_add_smul hba hdc\n[GOAL]\nk : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝³ : LinearOrderedField k\ninst✝² : OrderedAddCommGroup M\ninst✝¹ : Module k M\ninst✝ : OrderedSMul k M\na b : M\nc : k\nhc : c < 0\n⊢ c • a ≤ c • b ↔ b ≤ a\n[PROOFSTEP]\nrw [← neg_neg c, neg_smul, neg_smul (-c), neg_le_neg_iff]\n[GOAL]\nk : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝³ : LinearOrderedField k\ninst✝² : OrderedAddCommGroup M\ninst✝¹ : Module k M\ninst✝ : OrderedSMul k M\na b : M\nc : k\nhc : c < 0\n⊢ -c • b ≤ -c • a ↔ b ≤ a\n[PROOFSTEP]\nexact smul_le_smul_iff_of_pos (neg_pos_of_neg hc)\n[GOAL]\nk : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝³ : LinearOrderedField k\ninst✝² : OrderedAddCommGroup M\ninst✝¹ : Module k M\ninst✝ : OrderedSMul k M\na b : M\nc : k\nh : c < 0\n⊢ c⁻¹ • a ≤ b ↔ c • b ≤ a\n[PROOFSTEP]\nrw [← smul_le_smul_iff_of_neg h, smul_inv_smul₀ h.ne]\n[GOAL]\nk : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝³ : LinearOrderedField k\ninst✝² : OrderedAddCommGroup M\ninst✝¹ : Module k M\ninst✝ : OrderedSMul k M\na b : M\nc : k\nh : c < 0\n⊢ c⁻¹ • a < b ↔ c • b < a\n[PROOFSTEP]\nrw [← smul_lt_smul_iff_of_neg h, smul_inv_smul₀ h.ne]\n[GOAL]\nk : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝³ : LinearOrderedField k\ninst✝² : OrderedAddCommGroup M\ninst✝¹ : Module k M\ninst✝ : OrderedSMul k M\na b : M\nc : k\nh : c < 0\n⊢ a ≤ c⁻¹ • b ↔ b ≤ c • a\n[PROOFSTEP]\nrw [← smul_le_smul_iff_of_neg h, smul_inv_smul₀ h.ne]\n[GOAL]\nk : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝³ : LinearOrderedField k\ninst✝² : OrderedAddCommGroup M\ninst✝¹ : Module k M\ninst✝ : OrderedSMul k M\na b : M\nc : k\nh : c < 0\n⊢ a < c⁻¹ • b ↔ b < c • a\n[PROOFSTEP]\nrw [← smul_lt_smul_iff_of_neg h, smul_inv_smul₀ h.ne]\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Order.Module", "llama_tokens": 6448, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8175744761936437, "lm_q2_score": 0.6548947223065755, "lm_q1q2_score": 0.5354252095517802}}
{"text": "[GOAL]\nG : Type u\ninst✝³ : Group G\ninst✝² : Fintype (ConjClasses G)\ninst✝¹ : Fintype G\ninst✝ : (x : ConjClasses G) → Fintype ↑(carrier x)\n⊢ ∑ x : ConjClasses G, Finset.card (Set.toFinset (carrier x)) = Fintype.card G\n[PROOFSTEP]\nsuffices : (Σ x : ConjClasses G, x.carrier) ≃ G\n[GOAL]\nG : Type u\ninst✝³ : Group G\ninst✝² : Fintype (ConjClasses G)\ninst✝¹ : Fintype G\ninst✝ : (x : ConjClasses G) → Fintype ↑(carrier x)\nthis : (x : ConjClasses G) × ↑(carrier x) ≃ G\n⊢ ∑ x : ConjClasses G, Finset.card (Set.toFinset (carrier x)) = Fintype.card G\n[PROOFSTEP]\nsimpa using (Fintype.card_congr this)\n[GOAL]\ncase this\nG : Type u\ninst✝³ : Group G\ninst✝² : Fintype (ConjClasses G)\ninst✝¹ : Fintype G\ninst✝ : (x : ConjClasses G) → Fintype ↑(carrier x)\n⊢ (x : ConjClasses G) × ↑(carrier x) ≃ G\n[PROOFSTEP]\nsimpa [carrier_eq_preimage_mk] using Equiv.sigmaFiberEquiv ConjClasses.mk\n[GOAL]\nG : Type u\ninst✝¹ : Group G\ninst✝ : Finite G\n⊢ ∑ᶠ (x : ConjClasses G), Set.ncard (carrier x) = Nat.card G\n[PROOFSTEP]\nclassical\ncases nonempty_fintype G\nrw [Nat.card_eq_fintype_card, ← sum_conjClasses_card_eq_card, finsum_eq_sum_of_fintype]\nsimp [Set.ncard_eq_toFinset_card']\n[GOAL]\nG : Type u\ninst✝¹ : Group G\ninst✝ : Finite G\n⊢ ∑ᶠ (x : ConjClasses G), Set.ncard (carrier x) = Nat.card G\n[PROOFSTEP]\ncases nonempty_fintype G\n[GOAL]\ncase intro\nG : Type u\ninst✝¹ : Group G\ninst✝ : Finite G\nval✝ : Fintype G\n⊢ ∑ᶠ (x : ConjClasses G), Set.ncard (carrier x) = Nat.card G\n[PROOFSTEP]\nrw [Nat.card_eq_fintype_card, ← sum_conjClasses_card_eq_card, finsum_eq_sum_of_fintype]\n[GOAL]\ncase intro\nG : Type u\ninst✝¹ : Group G\ninst✝ : Finite G\nval✝ : Fintype G\n⊢ ∑ i : ConjClasses G, Set.ncard (carrier i) = ∑ x : ConjClasses G, Finset.card (Set.toFinset (carrier x))\n[PROOFSTEP]\nsimp [Set.ncard_eq_toFinset_card']\n[GOAL]\nG : Type u\ninst✝¹ : Group G\ninst✝ : Finite G\n⊢ Nat.card { x // x ∈ Subgroup.center G } + ∑ᶠ (x : ConjClasses G) (_ : x ∈ noncenter G), Nat.card ↑(carrier x) =\n    Nat.card G\n[PROOFSTEP]\nclassical\ncases nonempty_fintype G\nrw [@Nat.card_eq_fintype_card G, ← sum_conjClasses_card_eq_card, ←\n  Finset.sum_sdiff (ConjClasses.noncenter G).toFinset.subset_univ]\nsimp only [Nat.card_eq_fintype_card, Set.toFinset_card]\ncongr 1\nswap\n· convert finsum_cond_eq_sum_of_cond_iff _ _\n  simp [Set.mem_toFinset]\ncalc\n  Fintype.card (Subgroup.center G) = Fintype.card ((noncenter G)ᶜ : Set _) := Fintype.card_congr ((mk_bijOn G).equiv _)\n  _ = Finset.card (Finset.univ \\ (noncenter G).toFinset) := by\n    rw [← Set.toFinset_card, Set.toFinset_compl, Finset.compl_eq_univ_sdiff]\n  _ = _ := ?_\nrw [Finset.card_eq_sum_ones]\nrefine Finset.sum_congr rfl ?_\nrintro ⟨g⟩ hg\nsimp only [noncenter, Set.not_subsingleton_iff, Set.toFinset_setOf, Finset.mem_univ, true_and, forall_true_left,\n  Finset.mem_sdiff, Finset.mem_filter, Set.not_nontrivial_iff] at hg \nrw [eq_comm, ← Set.toFinset_card, Finset.card_eq_one]\nexact ⟨g, Finset.coe_injective <| by simpa using hg.eq_singleton_of_mem mem_carrier_mk⟩\n[GOAL]\nG : Type u\ninst✝¹ : Group G\ninst✝ : Finite G\n⊢ Nat.card { x // x ∈ Subgroup.center G } + ∑ᶠ (x : ConjClasses G) (_ : x ∈ noncenter G), Nat.card ↑(carrier x) =\n    Nat.card G\n[PROOFSTEP]\ncases nonempty_fintype G\n[GOAL]\ncase intro\nG : Type u\ninst✝¹ : Group G\ninst✝ : Finite G\nval✝ : Fintype G\n⊢ Nat.card { x // x ∈ Subgroup.center G } + ∑ᶠ (x : ConjClasses G) (_ : x ∈ noncenter G), Nat.card ↑(carrier x) =\n    Nat.card G\n[PROOFSTEP]\nrw [@Nat.card_eq_fintype_card G, ← sum_conjClasses_card_eq_card, ←\n  Finset.sum_sdiff (ConjClasses.noncenter G).toFinset.subset_univ]\n[GOAL]\ncase intro\nG : Type u\ninst✝¹ : Group G\ninst✝ : Finite G\nval✝ : Fintype G\n⊢ Nat.card { x // x ∈ Subgroup.center G } + ∑ᶠ (x : ConjClasses G) (_ : x ∈ noncenter G), Nat.card ↑(carrier x) =\n    ∑ x in Finset.univ \\ Set.toFinset (noncenter G), Finset.card (Set.toFinset (carrier x)) +\n      ∑ x in Set.toFinset (noncenter G), Finset.card (Set.toFinset (carrier x))\n[PROOFSTEP]\nsimp only [Nat.card_eq_fintype_card, Set.toFinset_card]\n[GOAL]\ncase intro\nG : Type u\ninst✝¹ : Group G\ninst✝ : Finite G\nval✝ : Fintype G\n⊢ Fintype.card { x // x ∈ Subgroup.center G } +\n      ∑ᶠ (x : ConjClasses G) (_ : x ∈ noncenter G), Fintype.card ↑(carrier x) =\n    ∑ x in Finset.univ \\ Set.toFinset (noncenter G), Fintype.card ↑(carrier x) +\n      ∑ x in Set.toFinset (noncenter G), Fintype.card ↑(carrier x)\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase intro.e_a\nG : Type u\ninst✝¹ : Group G\ninst✝ : Finite G\nval✝ : Fintype G\n⊢ Fintype.card { x // x ∈ Subgroup.center G } =\n    ∑ x in Finset.univ \\ Set.toFinset (noncenter G), Fintype.card ↑(carrier x)\ncase intro.e_a\nG : Type u\ninst✝¹ : Group G\ninst✝ : Finite G\nval✝ : Fintype G\n⊢ ∑ᶠ (x : ConjClasses G) (_ : x ∈ noncenter G), Fintype.card ↑(carrier x) =\n    ∑ x in Set.toFinset (noncenter G), Fintype.card ↑(carrier x)\n[PROOFSTEP]\nswap\n[GOAL]\ncase intro.e_a\nG : Type u\ninst✝¹ : Group G\ninst✝ : Finite G\nval✝ : Fintype G\n⊢ ∑ᶠ (x : ConjClasses G) (_ : x ∈ noncenter G), Fintype.card ↑(carrier x) =\n    ∑ x in Set.toFinset (noncenter G), Fintype.card ↑(carrier x)\n[PROOFSTEP]\nconvert finsum_cond_eq_sum_of_cond_iff _ _\n[GOAL]\ncase intro.e_a.convert_7\nG : Type u\ninst✝¹ : Group G\ninst✝ : Finite G\nval✝ : Fintype G\n⊢ ∀ {x : ConjClasses G}, Fintype.card ↑(carrier x) ≠ 0 → (x ∈ noncenter G ↔ x ∈ Set.toFinset (noncenter G))\n[PROOFSTEP]\nsimp [Set.mem_toFinset]\n[GOAL]\ncase intro.e_a\nG : Type u\ninst✝¹ : Group G\ninst✝ : Finite G\nval✝ : Fintype G\n⊢ Fintype.card { x // x ∈ Subgroup.center G } =\n    ∑ x in Finset.univ \\ Set.toFinset (noncenter G), Fintype.card ↑(carrier x)\n[PROOFSTEP]\ncalc\n  Fintype.card (Subgroup.center G) = Fintype.card ((noncenter G)ᶜ : Set _) := Fintype.card_congr ((mk_bijOn G).equiv _)\n  _ = Finset.card (Finset.univ \\ (noncenter G).toFinset) := by\n    rw [← Set.toFinset_card, Set.toFinset_compl, Finset.compl_eq_univ_sdiff]\n  _ = _ := ?_\n[GOAL]\nG : Type u\ninst✝¹ : Group G\ninst✝ : Finite G\nval✝ : Fintype G\n⊢ Fintype.card ↑(noncenter G)ᶜ = Finset.card (Finset.univ \\ Set.toFinset (noncenter G))\n[PROOFSTEP]\nrw [← Set.toFinset_card, Set.toFinset_compl, Finset.compl_eq_univ_sdiff]\n[GOAL]\ncase intro.e_a\nG : Type u\ninst✝¹ : Group G\ninst✝ : Finite G\nval✝ : Fintype G\n⊢ Finset.card (Finset.univ \\ Set.toFinset (noncenter G)) =\n    ∑ x in Finset.univ \\ Set.toFinset (noncenter G), Fintype.card ↑(carrier x)\n[PROOFSTEP]\nrw [Finset.card_eq_sum_ones]\n[GOAL]\ncase intro.e_a\nG : Type u\ninst✝¹ : Group G\ninst✝ : Finite G\nval✝ : Fintype G\n⊢ ∑ x in Finset.univ \\ Set.toFinset (noncenter G), 1 =\n    ∑ x in Finset.univ \\ Set.toFinset (noncenter G), Fintype.card ↑(carrier x)\n[PROOFSTEP]\nrefine Finset.sum_congr rfl ?_\n[GOAL]\ncase intro.e_a\nG : Type u\ninst✝¹ : Group G\ninst✝ : Finite G\nval✝ : Fintype G\n⊢ ∀ (x : ConjClasses G), x ∈ Finset.univ \\ Set.toFinset (noncenter G) → 1 = Fintype.card ↑(carrier x)\n[PROOFSTEP]\nrintro ⟨g⟩ hg\n[GOAL]\ncase intro.e_a.mk\nG : Type u\ninst✝¹ : Group G\ninst✝ : Finite G\nval✝ : Fintype G\nx✝ : ConjClasses G\ng : G\nhg : Quot.mk Setoid.r g ∈ Finset.univ \\ Set.toFinset (noncenter G)\n⊢ 1 = Fintype.card ↑(carrier (Quot.mk Setoid.r g))\n[PROOFSTEP]\nsimp only [noncenter, Set.not_subsingleton_iff, Set.toFinset_setOf, Finset.mem_univ, true_and, forall_true_left,\n  Finset.mem_sdiff, Finset.mem_filter, Set.not_nontrivial_iff] at hg \n[GOAL]\ncase intro.e_a.mk\nG : Type u\ninst✝¹ : Group G\ninst✝ : Finite G\nval✝ : Fintype G\nx✝ : ConjClasses G\ng : G\nhg : Set.Subsingleton (carrier (Quot.mk Setoid.r g))\n⊢ 1 = Fintype.card ↑(carrier (Quot.mk Setoid.r g))\n[PROOFSTEP]\nrw [eq_comm, ← Set.toFinset_card, Finset.card_eq_one]\n[GOAL]\ncase intro.e_a.mk\nG : Type u\ninst✝¹ : Group G\ninst✝ : Finite G\nval✝ : Fintype G\nx✝ : ConjClasses G\ng : G\nhg : Set.Subsingleton (carrier (Quot.mk Setoid.r g))\n⊢ ∃ a, Set.toFinset (carrier (Quot.mk Setoid.r g)) = {a}\n[PROOFSTEP]\nexact ⟨g, Finset.coe_injective <| by simpa using hg.eq_singleton_of_mem mem_carrier_mk⟩\n[GOAL]\nG : Type u\ninst✝¹ : Group G\ninst✝ : Finite G\nval✝ : Fintype G\nx✝ : ConjClasses G\ng : G\nhg : Set.Subsingleton (carrier (Quot.mk Setoid.r g))\n⊢ ↑(Set.toFinset (carrier (Quot.mk Setoid.r g))) = ↑{g}\n[PROOFSTEP]\nsimpa using hg.eq_singleton_of_mem mem_carrier_mk\n[GOAL]\nG✝ : Type u\ninst✝⁵ : Group G✝\nG : Type u_1\ninst✝⁴ : Group G\ninst✝³ : (x : ConjClasses G) → Fintype ↑(carrier x)\ninst✝² : Fintype G\ninst✝¹ : Fintype { x // x ∈ Subgroup.center G }\ninst✝ : Fintype ↑(noncenter G)\n⊢ Fintype.card { x // x ∈ Subgroup.center G } +\n      ∑ x in Set.toFinset (noncenter G), Finset.card (Set.toFinset (carrier x)) =\n    Fintype.card G\n[PROOFSTEP]\nconvert Group.nat_card_center_add_sum_card_noncenter_eq_card G using 2\n[GOAL]\ncase h.e'_2.h.e'_5\nG✝ : Type u\ninst✝⁵ : Group G✝\nG : Type u_1\ninst✝⁴ : Group G\ninst✝³ : (x : ConjClasses G) → Fintype ↑(carrier x)\ninst✝² : Fintype G\ninst✝¹ : Fintype { x // x ∈ Subgroup.center G }\ninst✝ : Fintype ↑(noncenter G)\n⊢ Fintype.card { x // x ∈ Subgroup.center G } = Nat.card { x // x ∈ Subgroup.center G }\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.e'_2.h.e'_6\nG✝ : Type u\ninst✝⁵ : Group G✝\nG : Type u_1\ninst✝⁴ : Group G\ninst✝³ : (x : ConjClasses G) → Fintype ↑(carrier x)\ninst✝² : Fintype G\ninst✝¹ : Fintype { x // x ∈ Subgroup.center G }\ninst✝ : Fintype ↑(noncenter G)\n⊢ ∑ x in Set.toFinset (noncenter G), Finset.card (Set.toFinset (carrier x)) =\n    ∑ᶠ (x : ConjClasses G) (_ : x ∈ noncenter G), Nat.card ↑(carrier x)\n[PROOFSTEP]\nrw [← finsum_set_coe_eq_finsum_mem (noncenter G), finsum_eq_sum_of_fintype, ← Finset.sum_set_coe]\n[GOAL]\ncase h.e'_2.h.e'_6\nG✝ : Type u\ninst✝⁵ : Group G✝\nG : Type u_1\ninst✝⁴ : Group G\ninst✝³ : (x : ConjClasses G) → Fintype ↑(carrier x)\ninst✝² : Fintype G\ninst✝¹ : Fintype { x // x ∈ Subgroup.center G }\ninst✝ : Fintype ↑(noncenter G)\n⊢ ∑ i : ↑(noncenter G), Finset.card (Set.toFinset (carrier ↑i)) = ∑ i : ↑(noncenter G), Nat.card ↑(carrier ↑i)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.e'_3\nG✝ : Type u\ninst✝⁵ : Group G✝\nG : Type u_1\ninst✝⁴ : Group G\ninst✝³ : (x : ConjClasses G) → Fintype ↑(carrier x)\ninst✝² : Fintype G\ninst✝¹ : Fintype { x // x ∈ Subgroup.center G }\ninst✝ : Fintype ↑(noncenter G)\n⊢ Fintype.card G = Nat.card G\n[PROOFSTEP]\nsimp\n", "meta": {"mathlib_filename": "Mathlib.GroupTheory.ClassEquation", "llama_tokens": 4770, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7879311956428946, "lm_q2_score": 0.6791786861878392, "lm_q1q2_score": 0.5351460742631544}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\nx y : α\nS U Z : Set α\n⊢ IsGenericPoint x S ↔ ∀ (y : α), x ⤳ y ↔ y ∈ S\n[PROOFSTEP]\nsimp only [specializes_iff_mem_closure, IsGenericPoint, Set.ext_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\nx y : α\nS U Z : Set α\nh : IsGenericPoint x S\nhU : IsOpen U\n⊢ Disjoint S U ↔ ¬x ∈ U\n[PROOFSTEP]\nrw [h.mem_open_set_iff hU, ← not_disjoint_iff_nonempty_inter, Classical.not_not]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\nx y : α\nS U Z : Set α\nh : IsGenericPoint x S\nhZ : IsClosed Z\n⊢ x ∈ Z ↔ S ⊆ Z\n[PROOFSTEP]\nrw [← h.def, hZ.closure_subset_iff, singleton_subset_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\nx y : α\nS U Z : Set α\nh : IsGenericPoint x S\nf : α → β\nhf : Continuous f\n⊢ IsGenericPoint (f x) (closure (f '' S))\n[PROOFSTEP]\nrw [isGenericPoint_def, ← h.def, ← image_singleton, closure_image_closure hf]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\nx y : α\nS U Z : Set α\nhS : IsClosed S\nhxS : x ∈ S\n⊢ IsGenericPoint x S ↔ ∀ (Z : Set α), IsClosed Z → x ∈ Z → S ⊆ Z\n[PROOFSTEP]\nhave : closure { x } ⊆ S := closure_minimal (singleton_subset_iff.2 hxS) hS\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\nx y : α\nS U Z : Set α\nhS : IsClosed S\nhxS : x ∈ S\nthis : closure {x} ⊆ S\n⊢ IsGenericPoint x S ↔ ∀ (Z : Set α), IsClosed Z → x ∈ Z → S ⊆ Z\n[PROOFSTEP]\nsimp_rw [IsGenericPoint, subset_antisymm_iff, this, true_and_iff, closure, subset_sInter_iff, mem_setOf_eq, and_imp,\n  singleton_subset_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : QuasiSober α\ninst✝ : IrreducibleSpace α\n⊢ IsGenericPoint (genericPoint α) ⊤\n[PROOFSTEP]\nsimpa using (IrreducibleSpace.isIrreducible_univ α).genericPoint_spec\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : QuasiSober α\ninst✝ : IrreducibleSpace α\nx : α\n⊢ x ∈ closure univ\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : QuasiSober α\ninst✝ : T0Space α\nx : α\n⊢ IsGenericPoint x (closure (closure {x}))\n[PROOFSTEP]\nrw [closure_closure]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : QuasiSober α\ninst✝ : T0Space α\nx : α\n⊢ IsGenericPoint x (closure {x})\n[PROOFSTEP]\nexact isGenericPoint_closure\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : QuasiSober α\ninst✝ : T0Space α\n⊢ ∀ {a b : ↑{s | IsIrreducible s ∧ IsClosed s}},\n    ↑{ toFun := fun s => IsIrreducible.genericPoint (_ : IsIrreducible ↑s),\n              invFun := fun x =>\n                { val := closure {x}, property := (_ : IsIrreducible (closure {x}) ∧ IsClosed (closure {x})) },\n              left_inv :=\n                (_ :\n                  ∀ (s : ↑{s | IsIrreducible s ∧ IsClosed s}),\n                    (fun x =>\n                          { val := closure {x},\n                            property := (_ : IsIrreducible (closure {x}) ∧ IsClosed (closure {x})) })\n                        ((fun s => IsIrreducible.genericPoint (_ : IsIrreducible ↑s)) s) =\n                      s),\n              right_inv := (_ : ∀ (x : α), IsIrreducible.genericPoint (_ : IsIrreducible (closure {x})) = x) }\n          a ≤\n        ↑{ toFun := fun s => IsIrreducible.genericPoint (_ : IsIrreducible ↑s),\n              invFun := fun x =>\n                { val := closure {x}, property := (_ : IsIrreducible (closure {x}) ∧ IsClosed (closure {x})) },\n              left_inv :=\n                (_ :\n                  ∀ (s : ↑{s | IsIrreducible s ∧ IsClosed s}),\n                    (fun x =>\n                          { val := closure {x},\n                            property := (_ : IsIrreducible (closure {x}) ∧ IsClosed (closure {x})) })\n                        ((fun s => IsIrreducible.genericPoint (_ : IsIrreducible ↑s)) s) =\n                      s),\n              right_inv := (_ : ∀ (x : α), IsIrreducible.genericPoint (_ : IsIrreducible (closure {x})) = x) }\n          b ↔\n      a ≤ b\n[PROOFSTEP]\nrintro ⟨s, hs⟩ ⟨t, ht⟩\n[GOAL]\ncase mk.mk\nα : Type u_1\nβ : Type u_2\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : QuasiSober α\ninst✝ : T0Space α\ns : Set α\nhs : s ∈ {s | IsIrreducible s ∧ IsClosed s}\nt : Set α\nht : t ∈ {s | IsIrreducible s ∧ IsClosed s}\n⊢ ↑{ toFun := fun s => IsIrreducible.genericPoint (_ : IsIrreducible ↑s),\n            invFun := fun x =>\n              { val := closure {x}, property := (_ : IsIrreducible (closure {x}) ∧ IsClosed (closure {x})) },\n            left_inv :=\n              (_ :\n                ∀ (s : ↑{s | IsIrreducible s ∧ IsClosed s}),\n                  (fun x =>\n                        { val := closure {x}, property := (_ : IsIrreducible (closure {x}) ∧ IsClosed (closure {x})) })\n                      ((fun s => IsIrreducible.genericPoint (_ : IsIrreducible ↑s)) s) =\n                    s),\n            right_inv := (_ : ∀ (x : α), IsIrreducible.genericPoint (_ : IsIrreducible (closure {x})) = x) }\n        { val := s, property := hs } ≤\n      ↑{ toFun := fun s => IsIrreducible.genericPoint (_ : IsIrreducible ↑s),\n            invFun := fun x =>\n              { val := closure {x}, property := (_ : IsIrreducible (closure {x}) ∧ IsClosed (closure {x})) },\n            left_inv :=\n              (_ :\n                ∀ (s : ↑{s | IsIrreducible s ∧ IsClosed s}),\n                  (fun x =>\n                        { val := closure {x}, property := (_ : IsIrreducible (closure {x}) ∧ IsClosed (closure {x})) })\n                      ((fun s => IsIrreducible.genericPoint (_ : IsIrreducible ↑s)) s) =\n                    s),\n            right_inv := (_ : ∀ (x : α), IsIrreducible.genericPoint (_ : IsIrreducible (closure {x})) = x) }\n        { val := t, property := ht } ↔\n    { val := s, property := hs } ≤ { val := t, property := ht }\n[PROOFSTEP]\nrefine specializes_iff_closure_subset.trans ?_\n[GOAL]\ncase mk.mk\nα : Type u_1\nβ : Type u_2\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : QuasiSober α\ninst✝ : T0Space α\ns : Set α\nhs : s ∈ {s | IsIrreducible s ∧ IsClosed s}\nt : Set α\nht : t ∈ {s | IsIrreducible s ∧ IsClosed s}\n⊢ closure\n        {↑{ toFun := fun s => IsIrreducible.genericPoint (_ : IsIrreducible ↑s),\n                invFun := fun x =>\n                  { val := closure {x}, property := (_ : IsIrreducible (closure {x}) ∧ IsClosed (closure {x})) },\n                left_inv :=\n                  (_ :\n                    ∀ (s : ↑{s | IsIrreducible s ∧ IsClosed s}),\n                      (fun x =>\n                            { val := closure {x},\n                              property := (_ : IsIrreducible (closure {x}) ∧ IsClosed (closure {x})) })\n                          ((fun s => IsIrreducible.genericPoint (_ : IsIrreducible ↑s)) s) =\n                        s),\n                right_inv := (_ : ∀ (x : α), IsIrreducible.genericPoint (_ : IsIrreducible (closure {x})) = x) }\n            { val := s, property := hs }} ⊆\n      closure\n        {↑{ toFun := fun s => IsIrreducible.genericPoint (_ : IsIrreducible ↑s),\n                invFun := fun x =>\n                  { val := closure {x}, property := (_ : IsIrreducible (closure {x}) ∧ IsClosed (closure {x})) },\n                left_inv :=\n                  (_ :\n                    ∀ (s : ↑{s | IsIrreducible s ∧ IsClosed s}),\n                      (fun x =>\n                            { val := closure {x},\n                              property := (_ : IsIrreducible (closure {x}) ∧ IsClosed (closure {x})) })\n                          ((fun s => IsIrreducible.genericPoint (_ : IsIrreducible ↑s)) s) =\n                        s),\n                right_inv := (_ : ∀ (x : α), IsIrreducible.genericPoint (_ : IsIrreducible (closure {x})) = x) }\n            { val := t, property := ht }} ↔\n    { val := s, property := hs } ≤ { val := t, property := ht }\n[PROOFSTEP]\nsimp [hs.2.closure_eq, ht.2.closure_eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\nf : α → β\nhf : ClosedEmbedding f\ninst✝ : QuasiSober β\nS✝ : Set α\nhS : IsIrreducible S✝\nhS' : IsClosed S✝\n⊢ ∃ x, IsGenericPoint x S✝\n[PROOFSTEP]\nhave hS'' := hS.image f hf.continuous.continuousOn\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\nf : α → β\nhf : ClosedEmbedding f\ninst✝ : QuasiSober β\nS✝ : Set α\nhS : IsIrreducible S✝\nhS' : IsClosed S✝\nhS'' : IsIrreducible (f '' S✝)\n⊢ ∃ x, IsGenericPoint x S✝\n[PROOFSTEP]\nobtain ⟨x, hx⟩ := QuasiSober.sober hS'' (hf.isClosedMap _ hS')\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\nf : α → β\nhf : ClosedEmbedding f\ninst✝ : QuasiSober β\nS✝ : Set α\nhS : IsIrreducible S✝\nhS' : IsClosed S✝\nhS'' : IsIrreducible (f '' S✝)\nx : β\nhx : IsGenericPoint x (f '' S✝)\n⊢ ∃ x, IsGenericPoint x S✝\n[PROOFSTEP]\nobtain ⟨y, -, rfl⟩ := hx.mem\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nβ : Type u_2\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\nf : α → β\nhf : ClosedEmbedding f\ninst✝ : QuasiSober β\nS✝ : Set α\nhS : IsIrreducible S✝\nhS' : IsClosed S✝\nhS'' : IsIrreducible (f '' S✝)\ny : α\nhx : IsGenericPoint (f y) (f '' S✝)\n⊢ ∃ x, IsGenericPoint x S✝\n[PROOFSTEP]\nuse y\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\nf : α → β\nhf : ClosedEmbedding f\ninst✝ : QuasiSober β\nS✝ : Set α\nhS : IsIrreducible S✝\nhS' : IsClosed S✝\nhS'' : IsIrreducible (f '' S✝)\ny : α\nhx : IsGenericPoint (f y) (f '' S✝)\n⊢ IsGenericPoint y S✝\n[PROOFSTEP]\napply image_injective.mpr hf.inj\n[GOAL]\ncase h.a\nα : Type u_1\nβ : Type u_2\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\nf : α → β\nhf : ClosedEmbedding f\ninst✝ : QuasiSober β\nS✝ : Set α\nhS : IsIrreducible S✝\nhS' : IsClosed S✝\nhS'' : IsIrreducible (f '' S✝)\ny : α\nhx : IsGenericPoint (f y) (f '' S✝)\n⊢ f '' closure {y} = f '' S✝\n[PROOFSTEP]\nrw [← hx.def, ← hf.closure_image_eq, image_singleton]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\nf : α → β\nhf : OpenEmbedding f\ninst✝ : QuasiSober β\nS✝ : Set α\nhS : IsIrreducible S✝\nhS' : IsClosed S✝\n⊢ ∃ x, IsGenericPoint x S✝\n[PROOFSTEP]\nhave hS'' := hS.image f hf.continuous.continuousOn\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\nf : α → β\nhf : OpenEmbedding f\ninst✝ : QuasiSober β\nS✝ : Set α\nhS : IsIrreducible S✝\nhS' : IsClosed S✝\nhS'' : IsIrreducible (f '' S✝)\n⊢ ∃ x, IsGenericPoint x S✝\n[PROOFSTEP]\nobtain ⟨x, hx⟩ := QuasiSober.sober hS''.closure isClosed_closure\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\nf : α → β\nhf : OpenEmbedding f\ninst✝ : QuasiSober β\nS✝ : Set α\nhS : IsIrreducible S✝\nhS' : IsClosed S✝\nhS'' : IsIrreducible (f '' S✝)\nx : β\nhx : IsGenericPoint x (closure (f '' S✝))\n⊢ ∃ x, IsGenericPoint x S✝\n[PROOFSTEP]\nobtain ⟨T, hT, rfl⟩ := hf.toInducing.isClosed_iff.mp hS'\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nβ : Type u_2\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\nf : α → β\nhf : OpenEmbedding f\ninst✝ : QuasiSober β\nx : β\nT : Set β\nhT : IsClosed T\nhS : IsIrreducible (f ⁻¹' T)\nhS' : IsClosed (f ⁻¹' T)\nhS'' : IsIrreducible (f '' (f ⁻¹' T))\nhx : IsGenericPoint x (closure (f '' (f ⁻¹' T)))\n⊢ ∃ x, IsGenericPoint x (f ⁻¹' T)\n[PROOFSTEP]\nrw [image_preimage_eq_inter_range] at hx hS'' \n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nβ : Type u_2\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\nf : α → β\nhf : OpenEmbedding f\ninst✝ : QuasiSober β\nx : β\nT : Set β\nhT : IsClosed T\nhS : IsIrreducible (f ⁻¹' T)\nhS' : IsClosed (f ⁻¹' T)\nhS'' : IsIrreducible (T ∩ range f)\nhx : IsGenericPoint x (closure (T ∩ range f))\n⊢ ∃ x, IsGenericPoint x (f ⁻¹' T)\n[PROOFSTEP]\nhave hxT : x ∈ T := by\n  rw [← hT.closure_eq]\n  exact closure_mono (inter_subset_left _ _) hx.mem\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\nf : α → β\nhf : OpenEmbedding f\ninst✝ : QuasiSober β\nx : β\nT : Set β\nhT : IsClosed T\nhS : IsIrreducible (f ⁻¹' T)\nhS' : IsClosed (f ⁻¹' T)\nhS'' : IsIrreducible (T ∩ range f)\nhx : IsGenericPoint x (closure (T ∩ range f))\n⊢ x ∈ T\n[PROOFSTEP]\nrw [← hT.closure_eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\nf : α → β\nhf : OpenEmbedding f\ninst✝ : QuasiSober β\nx : β\nT : Set β\nhT : IsClosed T\nhS : IsIrreducible (f ⁻¹' T)\nhS' : IsClosed (f ⁻¹' T)\nhS'' : IsIrreducible (T ∩ range f)\nhx : IsGenericPoint x (closure (T ∩ range f))\n⊢ x ∈ closure T\n[PROOFSTEP]\nexact closure_mono (inter_subset_left _ _) hx.mem\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nβ : Type u_2\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\nf : α → β\nhf : OpenEmbedding f\ninst✝ : QuasiSober β\nx : β\nT : Set β\nhT : IsClosed T\nhS : IsIrreducible (f ⁻¹' T)\nhS' : IsClosed (f ⁻¹' T)\nhS'' : IsIrreducible (T ∩ range f)\nhx : IsGenericPoint x (closure (T ∩ range f))\nhxT : x ∈ T\n⊢ ∃ x, IsGenericPoint x (f ⁻¹' T)\n[PROOFSTEP]\nobtain ⟨y, rfl⟩ : x ∈ range f := by\n  rw [hx.mem_open_set_iff hf.open_range]\n  refine' Nonempty.mono _ hS''.1\n  simpa using subset_closure\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\nf : α → β\nhf : OpenEmbedding f\ninst✝ : QuasiSober β\nx : β\nT : Set β\nhT : IsClosed T\nhS : IsIrreducible (f ⁻¹' T)\nhS' : IsClosed (f ⁻¹' T)\nhS'' : IsIrreducible (T ∩ range f)\nhx : IsGenericPoint x (closure (T ∩ range f))\nhxT : x ∈ T\n⊢ x ∈ range f\n[PROOFSTEP]\nrw [hx.mem_open_set_iff hf.open_range]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\nf : α → β\nhf : OpenEmbedding f\ninst✝ : QuasiSober β\nx : β\nT : Set β\nhT : IsClosed T\nhS : IsIrreducible (f ⁻¹' T)\nhS' : IsClosed (f ⁻¹' T)\nhS'' : IsIrreducible (T ∩ range f)\nhx : IsGenericPoint x (closure (T ∩ range f))\nhxT : x ∈ T\n⊢ Set.Nonempty (closure (T ∩ range f) ∩ range f)\n[PROOFSTEP]\nrefine' Nonempty.mono _ hS''.1\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\nf : α → β\nhf : OpenEmbedding f\ninst✝ : QuasiSober β\nx : β\nT : Set β\nhT : IsClosed T\nhS : IsIrreducible (f ⁻¹' T)\nhS' : IsClosed (f ⁻¹' T)\nhS'' : IsIrreducible (T ∩ range f)\nhx : IsGenericPoint x (closure (T ∩ range f))\nhxT : x ∈ T\n⊢ T ∩ range f ⊆ closure (T ∩ range f) ∩ range f\n[PROOFSTEP]\nsimpa using subset_closure\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\nf : α → β\nhf : OpenEmbedding f\ninst✝ : QuasiSober β\nT : Set β\nhT : IsClosed T\nhS : IsIrreducible (f ⁻¹' T)\nhS' : IsClosed (f ⁻¹' T)\nhS'' : IsIrreducible (T ∩ range f)\ny : α\nhx : IsGenericPoint (f y) (closure (T ∩ range f))\nhxT : f y ∈ T\n⊢ ∃ x, IsGenericPoint x (f ⁻¹' T)\n[PROOFSTEP]\nuse y\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\nf : α → β\nhf : OpenEmbedding f\ninst✝ : QuasiSober β\nT : Set β\nhT : IsClosed T\nhS : IsIrreducible (f ⁻¹' T)\nhS' : IsClosed (f ⁻¹' T)\nhS'' : IsIrreducible (T ∩ range f)\ny : α\nhx : IsGenericPoint (f y) (closure (T ∩ range f))\nhxT : f y ∈ T\n⊢ IsGenericPoint y (f ⁻¹' T)\n[PROOFSTEP]\nchange _ = _\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\nf : α → β\nhf : OpenEmbedding f\ninst✝ : QuasiSober β\nT : Set β\nhT : IsClosed T\nhS : IsIrreducible (f ⁻¹' T)\nhS' : IsClosed (f ⁻¹' T)\nhS'' : IsIrreducible (T ∩ range f)\ny : α\nhx : IsGenericPoint (f y) (closure (T ∩ range f))\nhxT : f y ∈ T\n⊢ closure {y} = f ⁻¹' T\n[PROOFSTEP]\nrw [hf.toEmbedding.closure_eq_preimage_closure_image, image_singleton, show _ = _ from hx]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\nf : α → β\nhf : OpenEmbedding f\ninst✝ : QuasiSober β\nT : Set β\nhT : IsClosed T\nhS : IsIrreducible (f ⁻¹' T)\nhS' : IsClosed (f ⁻¹' T)\nhS'' : IsIrreducible (T ∩ range f)\ny : α\nhx : IsGenericPoint (f y) (closure (T ∩ range f))\nhxT : f y ∈ T\n⊢ f ⁻¹' closure (T ∩ range f) = f ⁻¹' T\n[PROOFSTEP]\napply image_injective.mpr hf.inj\n[GOAL]\ncase h.a\nα : Type u_1\nβ : Type u_2\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\nf : α → β\nhf : OpenEmbedding f\ninst✝ : QuasiSober β\nT : Set β\nhT : IsClosed T\nhS : IsIrreducible (f ⁻¹' T)\nhS' : IsClosed (f ⁻¹' T)\nhS'' : IsIrreducible (T ∩ range f)\ny : α\nhx : IsGenericPoint (f y) (closure (T ∩ range f))\nhxT : f y ∈ T\n⊢ f '' (f ⁻¹' closure (T ∩ range f)) = f '' (f ⁻¹' T)\n[PROOFSTEP]\next z\n[GOAL]\ncase h.a.h\nα : Type u_1\nβ : Type u_2\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\nf : α → β\nhf : OpenEmbedding f\ninst✝ : QuasiSober β\nT : Set β\nhT : IsClosed T\nhS : IsIrreducible (f ⁻¹' T)\nhS' : IsClosed (f ⁻¹' T)\nhS'' : IsIrreducible (T ∩ range f)\ny : α\nhx : IsGenericPoint (f y) (closure (T ∩ range f))\nhxT : f y ∈ T\nz : β\n⊢ z ∈ f '' (f ⁻¹' closure (T ∩ range f)) ↔ z ∈ f '' (f ⁻¹' T)\n[PROOFSTEP]\nsimp only [image_preimage_eq_inter_range, mem_inter_iff, and_congr_left_iff]\n[GOAL]\ncase h.a.h\nα : Type u_1\nβ : Type u_2\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\nf : α → β\nhf : OpenEmbedding f\ninst✝ : QuasiSober β\nT : Set β\nhT : IsClosed T\nhS : IsIrreducible (f ⁻¹' T)\nhS' : IsClosed (f ⁻¹' T)\nhS'' : IsIrreducible (T ∩ range f)\ny : α\nhx : IsGenericPoint (f y) (closure (T ∩ range f))\nhxT : f y ∈ T\nz : β\n⊢ z ∈ range f → (z ∈ closure (T ∩ range f) ↔ z ∈ T)\n[PROOFSTEP]\nexact fun hy => ⟨fun h => hT.closure_eq ▸ closure_mono (inter_subset_left _ _) h, fun h => subset_closure ⟨h, hy⟩⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\nS : Set (Set α)\nhS : ∀ (s : ↑S), IsOpen ↑s\nhS' : ∀ (s : ↑S), QuasiSober ↑↑s\nhS'' : ⋃₀ S = ⊤\n⊢ QuasiSober α\n[PROOFSTEP]\nrw [quasiSober_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\nS : Set (Set α)\nhS : ∀ (s : ↑S), IsOpen ↑s\nhS' : ∀ (s : ↑S), QuasiSober ↑↑s\nhS'' : ⋃₀ S = ⊤\n⊢ ∀ {S : Set α}, IsIrreducible S → IsClosed S → ∃ x, IsGenericPoint x S\n[PROOFSTEP]\nintro t h h'\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\nS : Set (Set α)\nhS : ∀ (s : ↑S), IsOpen ↑s\nhS' : ∀ (s : ↑S), QuasiSober ↑↑s\nhS'' : ⋃₀ S = ⊤\nt : Set α\nh : IsIrreducible t\nh' : IsClosed t\n⊢ ∃ x, IsGenericPoint x t\n[PROOFSTEP]\nobtain ⟨x, hx⟩ := h.1\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\nS : Set (Set α)\nhS : ∀ (s : ↑S), IsOpen ↑s\nhS' : ∀ (s : ↑S), QuasiSober ↑↑s\nhS'' : ⋃₀ S = ⊤\nt : Set α\nh : IsIrreducible t\nh' : IsClosed t\nx : α\nhx : x ∈ t\n⊢ ∃ x, IsGenericPoint x t\n[PROOFSTEP]\nobtain ⟨U, hU, hU'⟩ : x ∈ ⋃₀ S := by\n  rw [hS'']\n  trivial\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\nS : Set (Set α)\nhS : ∀ (s : ↑S), IsOpen ↑s\nhS' : ∀ (s : ↑S), QuasiSober ↑↑s\nhS'' : ⋃₀ S = ⊤\nt : Set α\nh : IsIrreducible t\nh' : IsClosed t\nx : α\nhx : x ∈ t\n⊢ x ∈ ⋃₀ S\n[PROOFSTEP]\nrw [hS'']\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\nS : Set (Set α)\nhS : ∀ (s : ↑S), IsOpen ↑s\nhS' : ∀ (s : ↑S), QuasiSober ↑↑s\nhS'' : ⋃₀ S = ⊤\nt : Set α\nh : IsIrreducible t\nh' : IsClosed t\nx : α\nhx : x ∈ t\n⊢ x ∈ ⊤\n[PROOFSTEP]\ntrivial\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\nS : Set (Set α)\nhS : ∀ (s : ↑S), IsOpen ↑s\nhS' : ∀ (s : ↑S), QuasiSober ↑↑s\nhS'' : ⋃₀ S = ⊤\nt : Set α\nh : IsIrreducible t\nh' : IsClosed t\nx : α\nhx : x ∈ t\nU : Set α\nhU : U ∈ S\nhU' : x ∈ U\n⊢ ∃ x, IsGenericPoint x t\n[PROOFSTEP]\nhaveI : QuasiSober U := hS' ⟨U, hU⟩\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\nS : Set (Set α)\nhS : ∀ (s : ↑S), IsOpen ↑s\nhS' : ∀ (s : ↑S), QuasiSober ↑↑s\nhS'' : ⋃₀ S = ⊤\nt : Set α\nh : IsIrreducible t\nh' : IsClosed t\nx : α\nhx : x ∈ t\nU : Set α\nhU : U ∈ S\nhU' : x ∈ U\nthis : QuasiSober ↑U\n⊢ ∃ x, IsGenericPoint x t\n[PROOFSTEP]\nhave H : IsPreirreducible ((↑) ⁻¹' t : Set U) := h.2.preimage (hS ⟨U, hU⟩).openEmbedding_subtype_val\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\nS : Set (Set α)\nhS : ∀ (s : ↑S), IsOpen ↑s\nhS' : ∀ (s : ↑S), QuasiSober ↑↑s\nhS'' : ⋃₀ S = ⊤\nt : Set α\nh : IsIrreducible t\nh' : IsClosed t\nx : α\nhx : x ∈ t\nU : Set α\nhU : U ∈ S\nhU' : x ∈ U\nthis : QuasiSober ↑U\nH : IsPreirreducible (Subtype.val ⁻¹' t)\n⊢ ∃ x, IsGenericPoint x t\n[PROOFSTEP]\nreplace H : IsIrreducible ((↑) ⁻¹' t : Set U) := ⟨⟨⟨x, hU'⟩, by simpa using hx⟩, H⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\nS : Set (Set α)\nhS : ∀ (s : ↑S), IsOpen ↑s\nhS' : ∀ (s : ↑S), QuasiSober ↑↑s\nhS'' : ⋃₀ S = ⊤\nt : Set α\nh : IsIrreducible t\nh' : IsClosed t\nx : α\nhx : x ∈ t\nU : Set α\nhU : U ∈ S\nhU' : x ∈ U\nthis : QuasiSober ↑U\nH : IsPreirreducible (Subtype.val ⁻¹' t)\n⊢ { val := x, property := hU' } ∈ Subtype.val ⁻¹' t\n[PROOFSTEP]\nsimpa using hx\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\nS : Set (Set α)\nhS : ∀ (s : ↑S), IsOpen ↑s\nhS' : ∀ (s : ↑S), QuasiSober ↑↑s\nhS'' : ⋃₀ S = ⊤\nt : Set α\nh : IsIrreducible t\nh' : IsClosed t\nx : α\nhx : x ∈ t\nU : Set α\nhU : U ∈ S\nhU' : x ∈ U\nthis : QuasiSober ↑U\nH : IsIrreducible (Subtype.val ⁻¹' t)\n⊢ ∃ x, IsGenericPoint x t\n[PROOFSTEP]\nuse H.genericPoint\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\nS : Set (Set α)\nhS : ∀ (s : ↑S), IsOpen ↑s\nhS' : ∀ (s : ↑S), QuasiSober ↑↑s\nhS'' : ⋃₀ S = ⊤\nt : Set α\nh : IsIrreducible t\nh' : IsClosed t\nx : α\nhx : x ∈ t\nU : Set α\nhU : U ∈ S\nhU' : x ∈ U\nthis : QuasiSober ↑U\nH : IsIrreducible (Subtype.val ⁻¹' t)\n⊢ IsGenericPoint (↑(IsIrreducible.genericPoint H)) t\n[PROOFSTEP]\nhave := continuous_subtype_val.closure_preimage_subset _ H.genericPoint_spec.mem\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\nS : Set (Set α)\nhS : ∀ (s : ↑S), IsOpen ↑s\nhS' : ∀ (s : ↑S), QuasiSober ↑↑s\nhS'' : ⋃₀ S = ⊤\nt : Set α\nh : IsIrreducible t\nh' : IsClosed t\nx : α\nhx : x ∈ t\nU : Set α\nhU : U ∈ S\nhU' : x ∈ U\nthis✝ : QuasiSober ↑U\nH : IsIrreducible (Subtype.val ⁻¹' t)\nthis : IsIrreducible.genericPoint H ∈ Subtype.val ⁻¹' closure t\n⊢ IsGenericPoint (↑(IsIrreducible.genericPoint H)) t\n[PROOFSTEP]\nrw [h'.closure_eq] at this \n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\nS : Set (Set α)\nhS : ∀ (s : ↑S), IsOpen ↑s\nhS' : ∀ (s : ↑S), QuasiSober ↑↑s\nhS'' : ⋃₀ S = ⊤\nt : Set α\nh : IsIrreducible t\nh' : IsClosed t\nx : α\nhx : x ∈ t\nU : Set α\nhU : U ∈ S\nhU' : x ∈ U\nthis✝ : QuasiSober ↑U\nH : IsIrreducible (Subtype.val ⁻¹' t)\nthis : IsIrreducible.genericPoint H ∈ Subtype.val ⁻¹' t\n⊢ IsGenericPoint (↑(IsIrreducible.genericPoint H)) t\n[PROOFSTEP]\napply le_antisymm\n[GOAL]\ncase h.a\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\nS : Set (Set α)\nhS : ∀ (s : ↑S), IsOpen ↑s\nhS' : ∀ (s : ↑S), QuasiSober ↑↑s\nhS'' : ⋃₀ S = ⊤\nt : Set α\nh : IsIrreducible t\nh' : IsClosed t\nx : α\nhx : x ∈ t\nU : Set α\nhU : U ∈ S\nhU' : x ∈ U\nthis✝ : QuasiSober ↑U\nH : IsIrreducible (Subtype.val ⁻¹' t)\nthis : IsIrreducible.genericPoint H ∈ Subtype.val ⁻¹' t\n⊢ closure {↑(IsIrreducible.genericPoint H)} ≤ t\n[PROOFSTEP]\napply h'.closure_subset_iff.mpr\n[GOAL]\ncase h.a\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\nS : Set (Set α)\nhS : ∀ (s : ↑S), IsOpen ↑s\nhS' : ∀ (s : ↑S), QuasiSober ↑↑s\nhS'' : ⋃₀ S = ⊤\nt : Set α\nh : IsIrreducible t\nh' : IsClosed t\nx : α\nhx : x ∈ t\nU : Set α\nhU : U ∈ S\nhU' : x ∈ U\nthis✝ : QuasiSober ↑U\nH : IsIrreducible (Subtype.val ⁻¹' t)\nthis : IsIrreducible.genericPoint H ∈ Subtype.val ⁻¹' t\n⊢ {↑(IsIrreducible.genericPoint H)} ⊆ t\n[PROOFSTEP]\nsimpa using this\n[GOAL]\ncase h.a\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\nS : Set (Set α)\nhS : ∀ (s : ↑S), IsOpen ↑s\nhS' : ∀ (s : ↑S), QuasiSober ↑↑s\nhS'' : ⋃₀ S = ⊤\nt : Set α\nh : IsIrreducible t\nh' : IsClosed t\nx : α\nhx : x ∈ t\nU : Set α\nhU : U ∈ S\nhU' : x ∈ U\nthis✝ : QuasiSober ↑U\nH : IsIrreducible (Subtype.val ⁻¹' t)\nthis : IsIrreducible.genericPoint H ∈ Subtype.val ⁻¹' t\n⊢ t ≤ closure {↑(IsIrreducible.genericPoint H)}\n[PROOFSTEP]\nrw [← image_singleton, ← closure_image_closure continuous_subtype_val, H.genericPoint_spec.def]\n[GOAL]\ncase h.a\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\nS : Set (Set α)\nhS : ∀ (s : ↑S), IsOpen ↑s\nhS' : ∀ (s : ↑S), QuasiSober ↑↑s\nhS'' : ⋃₀ S = ⊤\nt : Set α\nh : IsIrreducible t\nh' : IsClosed t\nx : α\nhx : x ∈ t\nU : Set α\nhU : U ∈ S\nhU' : x ∈ U\nthis✝ : QuasiSober ↑U\nH : IsIrreducible (Subtype.val ⁻¹' t)\nthis : IsIrreducible.genericPoint H ∈ Subtype.val ⁻¹' t\n⊢ t ≤ closure (Subtype.val '' closure (Subtype.val ⁻¹' t))\n[PROOFSTEP]\nrefine' (subset_closure_inter_of_isPreirreducible_of_isOpen h.2 (hS ⟨U, hU⟩) ⟨x, hx, hU'⟩).trans (closure_mono _)\n[GOAL]\ncase h.a\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\nS : Set (Set α)\nhS : ∀ (s : ↑S), IsOpen ↑s\nhS' : ∀ (s : ↑S), QuasiSober ↑↑s\nhS'' : ⋃₀ S = ⊤\nt : Set α\nh : IsIrreducible t\nh' : IsClosed t\nx : α\nhx : x ∈ t\nU : Set α\nhU : U ∈ S\nhU' : x ∈ U\nthis✝ : QuasiSober ↑U\nH : IsIrreducible (Subtype.val ⁻¹' t)\nthis : IsIrreducible.genericPoint H ∈ Subtype.val ⁻¹' t\n⊢ t ∩ ↑{ val := U, property := hU } ⊆ Subtype.val '' closure (Subtype.val ⁻¹' t)\n[PROOFSTEP]\nrw [← Subtype.image_preimage_coe]\n[GOAL]\ncase h.a\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\nS : Set (Set α)\nhS : ∀ (s : ↑S), IsOpen ↑s\nhS' : ∀ (s : ↑S), QuasiSober ↑↑s\nhS'' : ⋃₀ S = ⊤\nt : Set α\nh : IsIrreducible t\nh' : IsClosed t\nx : α\nhx : x ∈ t\nU : Set α\nhU : U ∈ S\nhU' : x ∈ U\nthis✝ : QuasiSober ↑U\nH : IsIrreducible (Subtype.val ⁻¹' t)\nthis : IsIrreducible.genericPoint H ∈ Subtype.val ⁻¹' t\n⊢ Subtype.val '' (Subtype.val ⁻¹' t) ⊆ Subtype.val '' closure (Subtype.val ⁻¹' t)\n[PROOFSTEP]\nexact Set.image_subset _ subset_closure\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : T2Space α\nS✝ : Set α\nh : IsIrreducible S✝\nx✝ : IsClosed S✝\n⊢ ∃ x, IsGenericPoint x S✝\n[PROOFSTEP]\nobtain ⟨x, rfl⟩ := isIrreducible_iff_singleton.mp h\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : T2Space α\nx : α\nh : IsIrreducible {x}\nx✝ : IsClosed {x}\n⊢ ∃ x_1, IsGenericPoint x_1 {x}\n[PROOFSTEP]\nexact ⟨x, closure_singleton⟩\n", "meta": {"mathlib_filename": "Mathlib.Topology.Sober", "llama_tokens": 12438, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7956581000631541, "lm_q2_score": 0.672331705744791, "lm_q1q2_score": 0.5349461676051199}}
{"text": "[GOAL]\nX Y : TopCat\nf : X ⟶ Y\nx : ↑X\nx✝ : OpenNhds x\n⊢ x✝ ≤ x✝\n[PROOFSTEP]\ndsimp [LE.le]\n[GOAL]\nX Y : TopCat\nf : X ⟶ Y\nx : ↑X\nx✝ : OpenNhds x\n⊢ x✝.obj ≤ x✝.obj\n[PROOFSTEP]\nexact le_rfl\n[GOAL]\nX Y : TopCat\nf : X ⟶ Y\nx : ↑X\nx✝² x✝¹ x✝ : OpenNhds x\n⊢ x✝² ≤ x✝¹ → x✝¹ ≤ x✝ → x✝² ≤ x✝\n[PROOFSTEP]\ndsimp [LE.le]\n[GOAL]\nX Y : TopCat\nf : X ⟶ Y\nx : ↑X\nx✝² x✝¹ x✝ : OpenNhds x\n⊢ x✝².obj ≤ x✝¹.obj → x✝¹.obj ≤ x✝.obj → x✝².obj ≤ x✝.obj\n[PROOFSTEP]\nexact le_trans\n[GOAL]\nX Y : TopCat\nf : X ⟶ Y\nx : ↑X\nx✝ : OpenNhds x\n⊢ x✝ ≤ ⊤\n[PROOFSTEP]\ndsimp [LE.le]\n[GOAL]\nX Y : TopCat\nf : X ⟶ Y\nx : ↑X\nx✝ : OpenNhds x\n⊢ x✝.obj ≤ ⊤\n[PROOFSTEP]\nexact le_top\n[GOAL]\nX Y : TopCat\nf : X ⟶ Y\nx : ↑X\nU : (OpenNhds x)ᵒᵖ\n⊢ (map (𝟙 X) x).obj U.unop = U.unop\n[PROOFSTEP]\nsimp\n[GOAL]\nX Y : TopCat\nf : X ⟶ Y\nx : ↑X\nU : (OpenNhds x)ᵒᵖ\n⊢ (map (𝟙 X) x).op.obj U = U\n[PROOFSTEP]\nsimp\n[GOAL]\nX Y : TopCat\nf : X ⟶ Y\nx : ↑X\nU : OpenNhds (↑f x)\n⊢ (inclusion (↑f x) ⋙ Opens.map f).obj U ≅ (map f x ⋙ inclusion x).obj U\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase hom_inv_id\nX Y : TopCat\nf : X ⟶ Y\nx : ↑X\nU : OpenNhds (↑f x)\n⊢ autoParam (?hom ≫ ?inv = 𝟙 ((inclusion (↑f x) ⋙ Opens.map f).obj U)) _auto✝\ncase inv_hom_id\nX Y : TopCat\nf : X ⟶ Y\nx : ↑X\nU : OpenNhds (↑f x)\n⊢ autoParam (?inv ≫ ?hom = 𝟙 ((map f x ⋙ inclusion x).obj U)) _auto✝\ncase hom\nX Y : TopCat\nf : X ⟶ Y\nx : ↑X\nU : OpenNhds (↑f x)\n⊢ (inclusion (↑f x) ⋙ Opens.map f).obj U ⟶ (map f x ⋙ inclusion x).obj U\ncase inv\nX Y : TopCat\nf : X ⟶ Y\nx : ↑X\nU : OpenNhds (↑f x)\n⊢ (map f x ⋙ inclusion x).obj U ⟶ (inclusion (↑f x) ⋙ Opens.map f).obj U\n[PROOFSTEP]\nrfl\n[GOAL]\ncase inv_hom_id\nX Y : TopCat\nf : X ⟶ Y\nx : ↑X\nU : OpenNhds (↑f x)\n⊢ autoParam (?inv ≫ ?hom = 𝟙 ((map f x ⋙ inclusion x).obj U)) _auto✝\ncase hom\nX Y : TopCat\nf : X ⟶ Y\nx : ↑X\nU : OpenNhds (↑f x)\n⊢ (inclusion (↑f x) ⋙ Opens.map f).obj U ⟶ (map f x ⋙ inclusion x).obj U\ncase inv\nX Y : TopCat\nf : X ⟶ Y\nx : ↑X\nU : OpenNhds (↑f x)\n⊢ (map f x ⋙ inclusion x).obj U ⟶ (inclusion (↑f x) ⋙ Opens.map f).obj U\n[PROOFSTEP]\nrfl\n[GOAL]\ncase hom\nX Y : TopCat\nf : X ⟶ Y\nx : ↑X\nU : OpenNhds (↑f x)\n⊢ (inclusion (↑f x) ⋙ Opens.map f).obj U ⟶ (map f x ⋙ inclusion x).obj U\ncase inv\nX Y : TopCat\nf : X ⟶ Y\nx : ↑X\nU : OpenNhds (↑f x)\n⊢ (map f x ⋙ inclusion x).obj U ⟶ (inclusion (↑f x) ⋙ Opens.map f).obj U\n[PROOFSTEP]\nexact 𝟙 _\n[GOAL]\ncase inv\nX Y : TopCat\nf : X ⟶ Y\nx : ↑X\nU : OpenNhds (↑f x)\n⊢ (map f x ⋙ inclusion x).obj U ⟶ (inclusion (↑f x) ⋙ Opens.map f).obj U\n[PROOFSTEP]\nexact 𝟙 _\n", "meta": {"mathlib_filename": "Mathlib.Topology.Category.TopCat.OpenNhds", "llama_tokens": 1470, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.808067204308405, "lm_q2_score": 0.6619228691808011, "lm_q1q2_score": 0.534878162366728}}
{"text": "[GOAL]\n⊢ StableUnderComposition fun {R S} [CommRing R] [CommRing S] f => IsIntegral f\n[PROOFSTEP]\nintrov R hf hg\n[GOAL]\nR S T : Type u_1\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : CommRing T\nf : R →+* S\ng : S →+* T\nhf : IsIntegral f\nhg : IsIntegral g\n⊢ IsIntegral (comp g f)\n[PROOFSTEP]\nexact RingHom.isIntegral_trans _ _ hf hg\n[GOAL]\n⊢ RespectsIso fun {R S} [CommRing R] [CommRing S] f => IsIntegral f\n[PROOFSTEP]\napply isIntegral_stableUnderComposition.respectsIso\n[GOAL]\n⊢ ∀ {R S : Type u_1} [inst : CommRing R] [inst_1 : CommRing S] (e : R ≃+* S), IsIntegral (RingEquiv.toRingHom e)\n[PROOFSTEP]\nintrov x\n[GOAL]\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\ne : R ≃+* S\nx : S\n⊢ IsIntegralElem (RingEquiv.toRingHom e) x\n[PROOFSTEP]\nrw [← e.apply_symm_apply x]\n[GOAL]\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\ne : R ≃+* S\nx : S\n⊢ IsIntegralElem (RingEquiv.toRingHom e) (↑e (↑(RingEquiv.symm e) x))\n[PROOFSTEP]\napply RingHom.is_integral_map\n[GOAL]\n⊢ StableUnderBaseChange fun {R S} [CommRing R] [CommRing S] f => IsIntegral f\n[PROOFSTEP]\nrefine' StableUnderBaseChange.mk _ isIntegral_respectsIso _\n[GOAL]\n⊢ ∀ ⦃R S T : Type u_1⦄ [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing T] [inst_3 : Algebra R S]\n    [inst_4 : Algebra R T], IsIntegral (algebraMap R T) → IsIntegral includeLeftRingHom\n[PROOFSTEP]\nintrov h x\n[GOAL]\nR S T : Type u_1\ninst✝⁴ : CommRing R\ninst✝³ : CommRing S\ninst✝² : CommRing T\ninst✝¹ : Algebra R S\ninst✝ : Algebra R T\nh : IsIntegral (algebraMap R T)\nx : S ⊗[R] T\n⊢ IsIntegralElem includeLeftRingHom x\n[PROOFSTEP]\nrefine' TensorProduct.induction_on x _ _ _\n[GOAL]\ncase refine'_1\nR S T : Type u_1\ninst✝⁴ : CommRing R\ninst✝³ : CommRing S\ninst✝² : CommRing T\ninst✝¹ : Algebra R S\ninst✝ : Algebra R T\nh : IsIntegral (algebraMap R T)\nx : S ⊗[R] T\n⊢ IsIntegralElem includeLeftRingHom 0\n[PROOFSTEP]\napply isIntegral_zero\n[GOAL]\ncase refine'_2\nR S T : Type u_1\ninst✝⁴ : CommRing R\ninst✝³ : CommRing S\ninst✝² : CommRing T\ninst✝¹ : Algebra R S\ninst✝ : Algebra R T\nh : IsIntegral (algebraMap R T)\nx : S ⊗[R] T\n⊢ ∀ (x : S) (y : T), IsIntegralElem includeLeftRingHom (x ⊗ₜ[R] y)\n[PROOFSTEP]\nintro x y\n[GOAL]\ncase refine'_2\nR S T : Type u_1\ninst✝⁴ : CommRing R\ninst✝³ : CommRing S\ninst✝² : CommRing T\ninst✝¹ : Algebra R S\ninst✝ : Algebra R T\nh : IsIntegral (algebraMap R T)\nx✝ : S ⊗[R] T\nx : S\ny : T\n⊢ IsIntegralElem includeLeftRingHom (x ⊗ₜ[R] y)\n[PROOFSTEP]\nexact IsIntegral.tmul x (h y)\n[GOAL]\ncase refine'_3\nR S T : Type u_1\ninst✝⁴ : CommRing R\ninst✝³ : CommRing S\ninst✝² : CommRing T\ninst✝¹ : Algebra R S\ninst✝ : Algebra R T\nh : IsIntegral (algebraMap R T)\nx : S ⊗[R] T\n⊢ ∀ (x y : S ⊗[R] T),\n    IsIntegralElem includeLeftRingHom x →\n      IsIntegralElem includeLeftRingHom y → IsIntegralElem includeLeftRingHom (x + y)\n[PROOFSTEP]\nintro x y hx hy\n[GOAL]\ncase refine'_3\nR S T : Type u_1\ninst✝⁴ : CommRing R\ninst✝³ : CommRing S\ninst✝² : CommRing T\ninst✝¹ : Algebra R S\ninst✝ : Algebra R T\nh : IsIntegral (algebraMap R T)\nx✝ x y : S ⊗[R] T\nhx : IsIntegralElem includeLeftRingHom x\nhy : IsIntegralElem includeLeftRingHom y\n⊢ IsIntegralElem includeLeftRingHom (x + y)\n[PROOFSTEP]\nexact isIntegral_add hx hy\n", "meta": {"mathlib_filename": "Mathlib.RingTheory.RingHom.Integral", "llama_tokens": 1528, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7718434978390747, "lm_q2_score": 0.6926419894793246, "lm_q1q2_score": 0.5346112159099375}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : CompactSpace α\n⊢ 𝓝ˢ (diagonal α) = 𝓤 α\n[PROOFSTEP]\nrefine' nhdsSet_diagonal_le_uniformity.antisymm _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : CompactSpace α\n⊢ 𝓤 α ≤ 𝓝ˢ (diagonal α)\n[PROOFSTEP]\nhave :\n  (𝓤 (α × α)).HasBasis (fun U => U ∈ 𝓤 α) fun U =>\n    (fun p : (α × α) × α × α => ((p.1.1, p.2.1), p.1.2, p.2.2)) ⁻¹' U ×ˢ U :=\n  by\n  rw [uniformity_prod_eq_comap_prod]\n  exact (𝓤 α).basis_sets.prod_self.comap _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : CompactSpace α\n⊢ HasBasis (𝓤 (α × α)) (fun U => U ∈ 𝓤 α) fun U => (fun p => ((p.fst.fst, p.snd.fst), p.fst.snd, p.snd.snd)) ⁻¹' U ×ˢ U\n[PROOFSTEP]\nrw [uniformity_prod_eq_comap_prod]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : CompactSpace α\n⊢ HasBasis (Filter.comap (fun p => ((p.fst.fst, p.snd.fst), p.fst.snd, p.snd.snd)) (𝓤 α ×ˢ 𝓤 α)) (fun U => U ∈ 𝓤 α)\n    fun U => (fun p => ((p.fst.fst, p.snd.fst), p.fst.snd, p.snd.snd)) ⁻¹' U ×ˢ U\n[PROOFSTEP]\nexact (𝓤 α).basis_sets.prod_self.comap _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : CompactSpace α\nthis :\n  HasBasis (𝓤 (α × α)) (fun U => U ∈ 𝓤 α) fun U => (fun p => ((p.fst.fst, p.snd.fst), p.fst.snd, p.snd.snd)) ⁻¹' U ×ˢ U\n⊢ 𝓤 α ≤ 𝓝ˢ (diagonal α)\n[PROOFSTEP]\nrefine' (isCompact_diagonal.nhdsSet_basis_uniformity this).ge_iff.2 fun U hU => _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : CompactSpace α\nthis :\n  HasBasis (𝓤 (α × α)) (fun U => U ∈ 𝓤 α) fun U => (fun p => ((p.fst.fst, p.snd.fst), p.fst.snd, p.snd.snd)) ⁻¹' U ×ˢ U\nU : Set (α × α)\nhU : U ∈ 𝓤 α\n⊢ ⋃ (x : α × α) (_ : x ∈ diagonal α), ball x ((fun p => ((p.fst.fst, p.snd.fst), p.fst.snd, p.snd.snd)) ⁻¹' U ×ˢ U) ∈\n    𝓤 α\n[PROOFSTEP]\nexact mem_of_superset hU fun ⟨x, y⟩ hxy => mem_iUnion₂.2 ⟨(x, x), rfl, refl_mem_uniformity hU, hxy⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\nt : TopologicalSpace γ\ninst✝ : CompactSpace γ\nu u' : UniformSpace γ\nh : toTopologicalSpace = t\nh' : toTopologicalSpace = t\n⊢ u = u'\n[PROOFSTEP]\nrefine uniformSpace_eq ?_\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\nt : TopologicalSpace γ\ninst✝ : CompactSpace γ\nu u' : UniformSpace γ\nh : toTopologicalSpace = t\nh' : toTopologicalSpace = t\n⊢ 𝓤 γ = 𝓤 γ\n[PROOFSTEP]\nhave : @CompactSpace γ u.toTopologicalSpace := by rwa [h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\nt : TopologicalSpace γ\ninst✝ : CompactSpace γ\nu u' : UniformSpace γ\nh : toTopologicalSpace = t\nh' : toTopologicalSpace = t\n⊢ CompactSpace γ\n[PROOFSTEP]\nrwa [h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\nt : TopologicalSpace γ\ninst✝ : CompactSpace γ\nu u' : UniformSpace γ\nh : toTopologicalSpace = t\nh' : toTopologicalSpace = t\nthis : CompactSpace γ\n⊢ 𝓤 γ = 𝓤 γ\n[PROOFSTEP]\nhave : @CompactSpace γ u'.toTopologicalSpace := by rwa [h']\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\nt : TopologicalSpace γ\ninst✝ : CompactSpace γ\nu u' : UniformSpace γ\nh : toTopologicalSpace = t\nh' : toTopologicalSpace = t\nthis : CompactSpace γ\n⊢ CompactSpace γ\n[PROOFSTEP]\nrwa [h']\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\nt : TopologicalSpace γ\ninst✝ : CompactSpace γ\nu u' : UniformSpace γ\nh : toTopologicalSpace = t\nh' : toTopologicalSpace = t\nthis✝ : CompactSpace γ\nthis : CompactSpace γ\n⊢ 𝓤 γ = 𝓤 γ\n[PROOFSTEP]\nrw [@compactSpace_uniformity _ u, compactSpace_uniformity, h, h']\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁴ : UniformSpace α\ninst✝³ : UniformSpace β\ninst✝² : TopologicalSpace γ\ninst✝¹ : CompactSpace γ\ninst✝ : T2Space γ\n⊢ (Filter.lift' (𝓝ˢ (diagonal γ)) fun s => s ○ s) ≤ 𝓝ˢ (diagonal γ)\n[PROOFSTEP]\nset 𝓝Δ :=\n  𝓝ˢ\n    (diagonal γ)\n      -- The filter of neighborhoods of Δ\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁴ : UniformSpace α\ninst✝³ : UniformSpace β\ninst✝² : TopologicalSpace γ\ninst✝¹ : CompactSpace γ\ninst✝ : T2Space γ\n𝓝Δ : Filter (γ × γ) := 𝓝ˢ (diagonal γ)\n⊢ (Filter.lift' 𝓝Δ fun s => s ○ s) ≤ 𝓝Δ\n[PROOFSTEP]\nset F := 𝓝Δ.lift' fun s : Set (γ × γ) => s ○ s\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁴ : UniformSpace α\ninst✝³ : UniformSpace β\ninst✝² : TopologicalSpace γ\ninst✝¹ : CompactSpace γ\ninst✝ : T2Space γ\n𝓝Δ : Filter (γ × γ) := 𝓝ˢ (diagonal γ)\nF : Filter (γ × γ) := Filter.lift' 𝓝Δ fun s => s ○ s\n⊢ F ≤ 𝓝Δ\n[PROOFSTEP]\nrw [le_iff_forall_inf_principal_compl]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁴ : UniformSpace α\ninst✝³ : UniformSpace β\ninst✝² : TopologicalSpace γ\ninst✝¹ : CompactSpace γ\ninst✝ : T2Space γ\n𝓝Δ : Filter (γ × γ) := 𝓝ˢ (diagonal γ)\nF : Filter (γ × γ) := Filter.lift' 𝓝Δ fun s => s ○ s\n⊢ ∀ (V : Set (γ × γ)), V ∈ 𝓝Δ → F ⊓ 𝓟 Vᶜ = ⊥\n[PROOFSTEP]\nintro V V_in\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁴ : UniformSpace α\ninst✝³ : UniformSpace β\ninst✝² : TopologicalSpace γ\ninst✝¹ : CompactSpace γ\ninst✝ : T2Space γ\n𝓝Δ : Filter (γ × γ) := 𝓝ˢ (diagonal γ)\nF : Filter (γ × γ) := Filter.lift' 𝓝Δ fun s => s ○ s\nV : Set (γ × γ)\nV_in : V ∈ 𝓝Δ\n⊢ F ⊓ 𝓟 Vᶜ = ⊥\n[PROOFSTEP]\nby_contra H\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁴ : UniformSpace α\ninst✝³ : UniformSpace β\ninst✝² : TopologicalSpace γ\ninst✝¹ : CompactSpace γ\ninst✝ : T2Space γ\n𝓝Δ : Filter (γ × γ) := 𝓝ˢ (diagonal γ)\nF : Filter (γ × γ) := Filter.lift' 𝓝Δ fun s => s ○ s\nV : Set (γ × γ)\nV_in : V ∈ 𝓝Δ\nH : ¬F ⊓ 𝓟 Vᶜ = ⊥\n⊢ False\n[PROOFSTEP]\nhaveI : NeBot (F ⊓ 𝓟 Vᶜ) :=\n  ⟨H⟩\n    -- Hence compactness would give us a cluster point (x, y) for F ⊓ 𝓟 Vᶜ\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁴ : UniformSpace α\ninst✝³ : UniformSpace β\ninst✝² : TopologicalSpace γ\ninst✝¹ : CompactSpace γ\ninst✝ : T2Space γ\n𝓝Δ : Filter (γ × γ) := 𝓝ˢ (diagonal γ)\nF : Filter (γ × γ) := Filter.lift' 𝓝Δ fun s => s ○ s\nV : Set (γ × γ)\nV_in : V ∈ 𝓝Δ\nH : ¬F ⊓ 𝓟 Vᶜ = ⊥\nthis : NeBot (F ⊓ 𝓟 Vᶜ)\n⊢ False\n[PROOFSTEP]\nobtain ⟨⟨x, y⟩, hxy⟩ : ∃ p : γ × γ, ClusterPt p (F ⊓ 𝓟 Vᶜ) :=\n  cluster_point_of_compact\n    _\n      -- In particular (x, y) is a cluster point of 𝓟 Vᶜ, hence is not in the interior of V,\n          -- and a fortiori not in Δ, so x ≠ y\n[GOAL]\ncase intro.mk\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁴ : UniformSpace α\ninst✝³ : UniformSpace β\ninst✝² : TopologicalSpace γ\ninst✝¹ : CompactSpace γ\ninst✝ : T2Space γ\n𝓝Δ : Filter (γ × γ) := 𝓝ˢ (diagonal γ)\nF : Filter (γ × γ) := Filter.lift' 𝓝Δ fun s => s ○ s\nV : Set (γ × γ)\nV_in : V ∈ 𝓝Δ\nH : ¬F ⊓ 𝓟 Vᶜ = ⊥\nthis : NeBot (F ⊓ 𝓟 Vᶜ)\nx y : γ\nhxy : ClusterPt (x, y) (F ⊓ 𝓟 Vᶜ)\n⊢ False\n[PROOFSTEP]\nhave clV : ClusterPt (x, y) (𝓟 <| Vᶜ) := hxy.of_inf_right\n[GOAL]\ncase intro.mk\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁴ : UniformSpace α\ninst✝³ : UniformSpace β\ninst✝² : TopologicalSpace γ\ninst✝¹ : CompactSpace γ\ninst✝ : T2Space γ\n𝓝Δ : Filter (γ × γ) := 𝓝ˢ (diagonal γ)\nF : Filter (γ × γ) := Filter.lift' 𝓝Δ fun s => s ○ s\nV : Set (γ × γ)\nV_in : V ∈ 𝓝Δ\nH : ¬F ⊓ 𝓟 Vᶜ = ⊥\nthis : NeBot (F ⊓ 𝓟 Vᶜ)\nx y : γ\nhxy : ClusterPt (x, y) (F ⊓ 𝓟 Vᶜ)\nclV : ClusterPt (x, y) (𝓟 Vᶜ)\n⊢ False\n[PROOFSTEP]\nhave : (x, y) ∉ interior V :=\n  by\n  have : (x, y) ∈ closure Vᶜ := by rwa [mem_closure_iff_clusterPt]\n  rwa [closure_compl] at this \n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁴ : UniformSpace α\ninst✝³ : UniformSpace β\ninst✝² : TopologicalSpace γ\ninst✝¹ : CompactSpace γ\ninst✝ : T2Space γ\n𝓝Δ : Filter (γ × γ) := 𝓝ˢ (diagonal γ)\nF : Filter (γ × γ) := Filter.lift' 𝓝Δ fun s => s ○ s\nV : Set (γ × γ)\nV_in : V ∈ 𝓝Δ\nH : ¬F ⊓ 𝓟 Vᶜ = ⊥\nthis : NeBot (F ⊓ 𝓟 Vᶜ)\nx y : γ\nhxy : ClusterPt (x, y) (F ⊓ 𝓟 Vᶜ)\nclV : ClusterPt (x, y) (𝓟 Vᶜ)\n⊢ ¬(x, y) ∈ interior V\n[PROOFSTEP]\nhave : (x, y) ∈ closure Vᶜ := by rwa [mem_closure_iff_clusterPt]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁴ : UniformSpace α\ninst✝³ : UniformSpace β\ninst✝² : TopologicalSpace γ\ninst✝¹ : CompactSpace γ\ninst✝ : T2Space γ\n𝓝Δ : Filter (γ × γ) := 𝓝ˢ (diagonal γ)\nF : Filter (γ × γ) := Filter.lift' 𝓝Δ fun s => s ○ s\nV : Set (γ × γ)\nV_in : V ∈ 𝓝Δ\nH : ¬F ⊓ 𝓟 Vᶜ = ⊥\nthis : NeBot (F ⊓ 𝓟 Vᶜ)\nx y : γ\nhxy : ClusterPt (x, y) (F ⊓ 𝓟 Vᶜ)\nclV : ClusterPt (x, y) (𝓟 Vᶜ)\n⊢ (x, y) ∈ closure Vᶜ\n[PROOFSTEP]\nrwa [mem_closure_iff_clusterPt]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁴ : UniformSpace α\ninst✝³ : UniformSpace β\ninst✝² : TopologicalSpace γ\ninst✝¹ : CompactSpace γ\ninst✝ : T2Space γ\n𝓝Δ : Filter (γ × γ) := 𝓝ˢ (diagonal γ)\nF : Filter (γ × γ) := Filter.lift' 𝓝Δ fun s => s ○ s\nV : Set (γ × γ)\nV_in : V ∈ 𝓝Δ\nH : ¬F ⊓ 𝓟 Vᶜ = ⊥\nthis✝ : NeBot (F ⊓ 𝓟 Vᶜ)\nx y : γ\nhxy : ClusterPt (x, y) (F ⊓ 𝓟 Vᶜ)\nclV : ClusterPt (x, y) (𝓟 Vᶜ)\nthis : (x, y) ∈ closure Vᶜ\n⊢ ¬(x, y) ∈ interior V\n[PROOFSTEP]\nrwa [closure_compl] at this \n[GOAL]\ncase intro.mk\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁴ : UniformSpace α\ninst✝³ : UniformSpace β\ninst✝² : TopologicalSpace γ\ninst✝¹ : CompactSpace γ\ninst✝ : T2Space γ\n𝓝Δ : Filter (γ × γ) := 𝓝ˢ (diagonal γ)\nF : Filter (γ × γ) := Filter.lift' 𝓝Δ fun s => s ○ s\nV : Set (γ × γ)\nV_in : V ∈ 𝓝Δ\nH : ¬F ⊓ 𝓟 Vᶜ = ⊥\nthis✝ : NeBot (F ⊓ 𝓟 Vᶜ)\nx y : γ\nhxy : ClusterPt (x, y) (F ⊓ 𝓟 Vᶜ)\nclV : ClusterPt (x, y) (𝓟 Vᶜ)\nthis : ¬(x, y) ∈ interior V\n⊢ False\n[PROOFSTEP]\nhave diag_subset : diagonal γ ⊆ interior V := subset_interior_iff_mem_nhdsSet.2 V_in\n[GOAL]\ncase intro.mk\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁴ : UniformSpace α\ninst✝³ : UniformSpace β\ninst✝² : TopologicalSpace γ\ninst✝¹ : CompactSpace γ\ninst✝ : T2Space γ\n𝓝Δ : Filter (γ × γ) := 𝓝ˢ (diagonal γ)\nF : Filter (γ × γ) := Filter.lift' 𝓝Δ fun s => s ○ s\nV : Set (γ × γ)\nV_in : V ∈ 𝓝Δ\nH : ¬F ⊓ 𝓟 Vᶜ = ⊥\nthis✝ : NeBot (F ⊓ 𝓟 Vᶜ)\nx y : γ\nhxy : ClusterPt (x, y) (F ⊓ 𝓟 Vᶜ)\nclV : ClusterPt (x, y) (𝓟 Vᶜ)\nthis : ¬(x, y) ∈ interior V\ndiag_subset : diagonal γ ⊆ interior V\n⊢ False\n[PROOFSTEP]\nhave x_ne_y : x ≠ y := mt (@diag_subset (x, y)) this\n[GOAL]\ncase intro.mk\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁴ : UniformSpace α\ninst✝³ : UniformSpace β\ninst✝² : TopologicalSpace γ\ninst✝¹ : CompactSpace γ\ninst✝ : T2Space γ\n𝓝Δ : Filter (γ × γ) := 𝓝ˢ (diagonal γ)\nF : Filter (γ × γ) := Filter.lift' 𝓝Δ fun s => s ○ s\nV : Set (γ × γ)\nV_in : V ∈ 𝓝Δ\nH : ¬F ⊓ 𝓟 Vᶜ = ⊥\nthis✝ : NeBot (F ⊓ 𝓟 Vᶜ)\nx y : γ\nhxy : ClusterPt (x, y) (F ⊓ 𝓟 Vᶜ)\nclV : ClusterPt (x, y) (𝓟 Vᶜ)\nthis : ¬(x, y) ∈ interior V\ndiag_subset : diagonal γ ⊆ interior V\nx_ne_y : x ≠ y\n⊢ False\n[PROOFSTEP]\nhaveI : NormalSpace γ := normalOfCompactT2\n[GOAL]\ncase intro.mk\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁴ : UniformSpace α\ninst✝³ : UniformSpace β\ninst✝² : TopologicalSpace γ\ninst✝¹ : CompactSpace γ\ninst✝ : T2Space γ\n𝓝Δ : Filter (γ × γ) := 𝓝ˢ (diagonal γ)\nF : Filter (γ × γ) := Filter.lift' 𝓝Δ fun s => s ○ s\nV : Set (γ × γ)\nV_in : V ∈ 𝓝Δ\nH : ¬F ⊓ 𝓟 Vᶜ = ⊥\nthis✝¹ : NeBot (F ⊓ 𝓟 Vᶜ)\nx y : γ\nhxy : ClusterPt (x, y) (F ⊓ 𝓟 Vᶜ)\nclV : ClusterPt (x, y) (𝓟 Vᶜ)\nthis✝ : ¬(x, y) ∈ interior V\ndiag_subset : diagonal γ ⊆ interior V\nx_ne_y : x ≠ y\nthis : NormalSpace γ\n⊢ False\n[PROOFSTEP]\nobtain ⟨U₁, _, V₁, V₁_in, U₂, _, V₂, V₂_in, V₁_cl, V₂_cl, U₁_op, U₂_op, VU₁, VU₂, hU₁₂⟩ := disjoint_nested_nhds x_ne_y\n[GOAL]\ncase intro.mk.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁴ : UniformSpace α\ninst✝³ : UniformSpace β\ninst✝² : TopologicalSpace γ\ninst✝¹ : CompactSpace γ\ninst✝ : T2Space γ\n𝓝Δ : Filter (γ × γ) := 𝓝ˢ (diagonal γ)\nF : Filter (γ × γ) := Filter.lift' 𝓝Δ fun s => s ○ s\nV : Set (γ × γ)\nV_in : V ∈ 𝓝Δ\nH : ¬F ⊓ 𝓟 Vᶜ = ⊥\nthis✝¹ : NeBot (F ⊓ 𝓟 Vᶜ)\nx y : γ\nhxy : ClusterPt (x, y) (F ⊓ 𝓟 Vᶜ)\nclV : ClusterPt (x, y) (𝓟 Vᶜ)\nthis✝ : ¬(x, y) ∈ interior V\ndiag_subset : diagonal γ ⊆ interior V\nx_ne_y : x ≠ y\nthis : NormalSpace γ\nU₁ : Set γ\nleft✝¹ : U₁ ∈ 𝓝 x\nV₁ : Set γ\nV₁_in : V₁ ∈ 𝓝 x\nU₂ : Set γ\nleft✝ : U₂ ∈ 𝓝 y\nV₂ : Set γ\nV₂_in : V₂ ∈ 𝓝 y\nV₁_cl : IsClosed V₁\nV₂_cl : IsClosed V₂\nU₁_op : IsOpen U₁\nU₂_op : IsOpen U₂\nVU₁ : V₁ ⊆ U₁\nVU₂ : V₂ ⊆ U₂\nhU₁₂ : Disjoint U₁ U₂\n⊢ False\n[PROOFSTEP]\nlet U₃ := (V₁ ∪ V₂)ᶜ\n[GOAL]\ncase intro.mk.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁴ : UniformSpace α\ninst✝³ : UniformSpace β\ninst✝² : TopologicalSpace γ\ninst✝¹ : CompactSpace γ\ninst✝ : T2Space γ\n𝓝Δ : Filter (γ × γ) := 𝓝ˢ (diagonal γ)\nF : Filter (γ × γ) := Filter.lift' 𝓝Δ fun s => s ○ s\nV : Set (γ × γ)\nV_in : V ∈ 𝓝Δ\nH : ¬F ⊓ 𝓟 Vᶜ = ⊥\nthis✝¹ : NeBot (F ⊓ 𝓟 Vᶜ)\nx y : γ\nhxy : ClusterPt (x, y) (F ⊓ 𝓟 Vᶜ)\nclV : ClusterPt (x, y) (𝓟 Vᶜ)\nthis✝ : ¬(x, y) ∈ interior V\ndiag_subset : diagonal γ ⊆ interior V\nx_ne_y : x ≠ y\nthis : NormalSpace γ\nU₁ : Set γ\nleft✝¹ : U₁ ∈ 𝓝 x\nV₁ : Set γ\nV₁_in : V₁ ∈ 𝓝 x\nU₂ : Set γ\nleft✝ : U₂ ∈ 𝓝 y\nV₂ : Set γ\nV₂_in : V₂ ∈ 𝓝 y\nV₁_cl : IsClosed V₁\nV₂_cl : IsClosed V₂\nU₁_op : IsOpen U₁\nU₂_op : IsOpen U₂\nVU₁ : V₁ ⊆ U₁\nVU₂ : V₂ ⊆ U₂\nhU₁₂ : Disjoint U₁ U₂\nU₃ : Set γ := (V₁ ∪ V₂)ᶜ\n⊢ False\n[PROOFSTEP]\nhave U₃_op : IsOpen U₃ := (V₁_cl.union V₂_cl).isOpen_compl\n[GOAL]\ncase intro.mk.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁴ : UniformSpace α\ninst✝³ : UniformSpace β\ninst✝² : TopologicalSpace γ\ninst✝¹ : CompactSpace γ\ninst✝ : T2Space γ\n𝓝Δ : Filter (γ × γ) := 𝓝ˢ (diagonal γ)\nF : Filter (γ × γ) := Filter.lift' 𝓝Δ fun s => s ○ s\nV : Set (γ × γ)\nV_in : V ∈ 𝓝Δ\nH : ¬F ⊓ 𝓟 Vᶜ = ⊥\nthis✝¹ : NeBot (F ⊓ 𝓟 Vᶜ)\nx y : γ\nhxy : ClusterPt (x, y) (F ⊓ 𝓟 Vᶜ)\nclV : ClusterPt (x, y) (𝓟 Vᶜ)\nthis✝ : ¬(x, y) ∈ interior V\ndiag_subset : diagonal γ ⊆ interior V\nx_ne_y : x ≠ y\nthis : NormalSpace γ\nU₁ : Set γ\nleft✝¹ : U₁ ∈ 𝓝 x\nV₁ : Set γ\nV₁_in : V₁ ∈ 𝓝 x\nU₂ : Set γ\nleft✝ : U₂ ∈ 𝓝 y\nV₂ : Set γ\nV₂_in : V₂ ∈ 𝓝 y\nV₁_cl : IsClosed V₁\nV₂_cl : IsClosed V₂\nU₁_op : IsOpen U₁\nU₂_op : IsOpen U₂\nVU₁ : V₁ ⊆ U₁\nVU₂ : V₂ ⊆ U₂\nhU₁₂ : Disjoint U₁ U₂\nU₃ : Set γ := (V₁ ∪ V₂)ᶜ\nU₃_op : IsOpen U₃\n⊢ False\n[PROOFSTEP]\nlet W := U₁ ×ˢ U₁ ∪ U₂ ×ˢ U₂ ∪ U₃ ×ˢ U₃\n[GOAL]\ncase intro.mk.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁴ : UniformSpace α\ninst✝³ : UniformSpace β\ninst✝² : TopologicalSpace γ\ninst✝¹ : CompactSpace γ\ninst✝ : T2Space γ\n𝓝Δ : Filter (γ × γ) := 𝓝ˢ (diagonal γ)\nF : Filter (γ × γ) := Filter.lift' 𝓝Δ fun s => s ○ s\nV : Set (γ × γ)\nV_in : V ∈ 𝓝Δ\nH : ¬F ⊓ 𝓟 Vᶜ = ⊥\nthis✝¹ : NeBot (F ⊓ 𝓟 Vᶜ)\nx y : γ\nhxy : ClusterPt (x, y) (F ⊓ 𝓟 Vᶜ)\nclV : ClusterPt (x, y) (𝓟 Vᶜ)\nthis✝ : ¬(x, y) ∈ interior V\ndiag_subset : diagonal γ ⊆ interior V\nx_ne_y : x ≠ y\nthis : NormalSpace γ\nU₁ : Set γ\nleft✝¹ : U₁ ∈ 𝓝 x\nV₁ : Set γ\nV₁_in : V₁ ∈ 𝓝 x\nU₂ : Set γ\nleft✝ : U₂ ∈ 𝓝 y\nV₂ : Set γ\nV₂_in : V₂ ∈ 𝓝 y\nV₁_cl : IsClosed V₁\nV₂_cl : IsClosed V₂\nU₁_op : IsOpen U₁\nU₂_op : IsOpen U₂\nVU₁ : V₁ ⊆ U₁\nVU₂ : V₂ ⊆ U₂\nhU₁₂ : Disjoint U₁ U₂\nU₃ : Set γ := (V₁ ∪ V₂)ᶜ\nU₃_op : IsOpen U₃\nW : Set (γ × γ) := U₁ ×ˢ U₁ ∪ U₂ ×ˢ U₂ ∪ U₃ ×ˢ U₃\n⊢ False\n[PROOFSTEP]\nhave W_in : W ∈ 𝓝Δ := by\n  rw [mem_nhdsSet_iff_forall]\n  rintro ⟨z, z'⟩ (rfl : z = z')\n  refine' IsOpen.mem_nhds _ _\n  · apply_rules [IsOpen.union, IsOpen.prod]\n  · simp only [mem_union, mem_prod, and_self_iff]\n    exact (_root_.em _).imp_left fun h => union_subset_union VU₁ VU₂ h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁴ : UniformSpace α\ninst✝³ : UniformSpace β\ninst✝² : TopologicalSpace γ\ninst✝¹ : CompactSpace γ\ninst✝ : T2Space γ\n𝓝Δ : Filter (γ × γ) := 𝓝ˢ (diagonal γ)\nF : Filter (γ × γ) := Filter.lift' 𝓝Δ fun s => s ○ s\nV : Set (γ × γ)\nV_in : V ∈ 𝓝Δ\nH : ¬F ⊓ 𝓟 Vᶜ = ⊥\nthis✝¹ : NeBot (F ⊓ 𝓟 Vᶜ)\nx y : γ\nhxy : ClusterPt (x, y) (F ⊓ 𝓟 Vᶜ)\nclV : ClusterPt (x, y) (𝓟 Vᶜ)\nthis✝ : ¬(x, y) ∈ interior V\ndiag_subset : diagonal γ ⊆ interior V\nx_ne_y : x ≠ y\nthis : NormalSpace γ\nU₁ : Set γ\nleft✝¹ : U₁ ∈ 𝓝 x\nV₁ : Set γ\nV₁_in : V₁ ∈ 𝓝 x\nU₂ : Set γ\nleft✝ : U₂ ∈ 𝓝 y\nV₂ : Set γ\nV₂_in : V₂ ∈ 𝓝 y\nV₁_cl : IsClosed V₁\nV₂_cl : IsClosed V₂\nU₁_op : IsOpen U₁\nU₂_op : IsOpen U₂\nVU₁ : V₁ ⊆ U₁\nVU₂ : V₂ ⊆ U₂\nhU₁₂ : Disjoint U₁ U₂\nU₃ : Set γ := (V₁ ∪ V₂)ᶜ\nU₃_op : IsOpen U₃\nW : Set (γ × γ) := U₁ ×ˢ U₁ ∪ U₂ ×ˢ U₂ ∪ U₃ ×ˢ U₃\n⊢ W ∈ 𝓝Δ\n[PROOFSTEP]\nrw [mem_nhdsSet_iff_forall]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁴ : UniformSpace α\ninst✝³ : UniformSpace β\ninst✝² : TopologicalSpace γ\ninst✝¹ : CompactSpace γ\ninst✝ : T2Space γ\n𝓝Δ : Filter (γ × γ) := 𝓝ˢ (diagonal γ)\nF : Filter (γ × γ) := Filter.lift' 𝓝Δ fun s => s ○ s\nV : Set (γ × γ)\nV_in : V ∈ 𝓝Δ\nH : ¬F ⊓ 𝓟 Vᶜ = ⊥\nthis✝¹ : NeBot (F ⊓ 𝓟 Vᶜ)\nx y : γ\nhxy : ClusterPt (x, y) (F ⊓ 𝓟 Vᶜ)\nclV : ClusterPt (x, y) (𝓟 Vᶜ)\nthis✝ : ¬(x, y) ∈ interior V\ndiag_subset : diagonal γ ⊆ interior V\nx_ne_y : x ≠ y\nthis : NormalSpace γ\nU₁ : Set γ\nleft✝¹ : U₁ ∈ 𝓝 x\nV₁ : Set γ\nV₁_in : V₁ ∈ 𝓝 x\nU₂ : Set γ\nleft✝ : U₂ ∈ 𝓝 y\nV₂ : Set γ\nV₂_in : V₂ ∈ 𝓝 y\nV₁_cl : IsClosed V₁\nV₂_cl : IsClosed V₂\nU₁_op : IsOpen U₁\nU₂_op : IsOpen U₂\nVU₁ : V₁ ⊆ U₁\nVU₂ : V₂ ⊆ U₂\nhU₁₂ : Disjoint U₁ U₂\nU₃ : Set γ := (V₁ ∪ V₂)ᶜ\nU₃_op : IsOpen U₃\nW : Set (γ × γ) := U₁ ×ˢ U₁ ∪ U₂ ×ˢ U₂ ∪ U₃ ×ˢ U₃\n⊢ ∀ (x : γ × γ), x ∈ diagonal γ → W ∈ 𝓝 x\n[PROOFSTEP]\nrintro ⟨z, z'⟩ (rfl : z = z')\n[GOAL]\ncase mk\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁴ : UniformSpace α\ninst✝³ : UniformSpace β\ninst✝² : TopologicalSpace γ\ninst✝¹ : CompactSpace γ\ninst✝ : T2Space γ\n𝓝Δ : Filter (γ × γ) := 𝓝ˢ (diagonal γ)\nF : Filter (γ × γ) := Filter.lift' 𝓝Δ fun s => s ○ s\nV : Set (γ × γ)\nV_in : V ∈ 𝓝Δ\nH : ¬F ⊓ 𝓟 Vᶜ = ⊥\nthis✝¹ : NeBot (F ⊓ 𝓟 Vᶜ)\nx y : γ\nhxy : ClusterPt (x, y) (F ⊓ 𝓟 Vᶜ)\nclV : ClusterPt (x, y) (𝓟 Vᶜ)\nthis✝ : ¬(x, y) ∈ interior V\ndiag_subset : diagonal γ ⊆ interior V\nx_ne_y : x ≠ y\nthis : NormalSpace γ\nU₁ : Set γ\nleft✝¹ : U₁ ∈ 𝓝 x\nV₁ : Set γ\nV₁_in : V₁ ∈ 𝓝 x\nU₂ : Set γ\nleft✝ : U₂ ∈ 𝓝 y\nV₂ : Set γ\nV₂_in : V₂ ∈ 𝓝 y\nV₁_cl : IsClosed V₁\nV₂_cl : IsClosed V₂\nU₁_op : IsOpen U₁\nU₂_op : IsOpen U₂\nVU₁ : V₁ ⊆ U₁\nVU₂ : V₂ ⊆ U₂\nhU₁₂ : Disjoint U₁ U₂\nU₃ : Set γ := (V₁ ∪ V₂)ᶜ\nU₃_op : IsOpen U₃\nW : Set (γ × γ) := U₁ ×ˢ U₁ ∪ U₂ ×ˢ U₂ ∪ U₃ ×ˢ U₃\nz : γ\n⊢ W ∈ 𝓝 (z, z)\n[PROOFSTEP]\nrefine' IsOpen.mem_nhds _ _\n[GOAL]\ncase mk.refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁴ : UniformSpace α\ninst✝³ : UniformSpace β\ninst✝² : TopologicalSpace γ\ninst✝¹ : CompactSpace γ\ninst✝ : T2Space γ\n𝓝Δ : Filter (γ × γ) := 𝓝ˢ (diagonal γ)\nF : Filter (γ × γ) := Filter.lift' 𝓝Δ fun s => s ○ s\nV : Set (γ × γ)\nV_in : V ∈ 𝓝Δ\nH : ¬F ⊓ 𝓟 Vᶜ = ⊥\nthis✝¹ : NeBot (F ⊓ 𝓟 Vᶜ)\nx y : γ\nhxy : ClusterPt (x, y) (F ⊓ 𝓟 Vᶜ)\nclV : ClusterPt (x, y) (𝓟 Vᶜ)\nthis✝ : ¬(x, y) ∈ interior V\ndiag_subset : diagonal γ ⊆ interior V\nx_ne_y : x ≠ y\nthis : NormalSpace γ\nU₁ : Set γ\nleft✝¹ : U₁ ∈ 𝓝 x\nV₁ : Set γ\nV₁_in : V₁ ∈ 𝓝 x\nU₂ : Set γ\nleft✝ : U₂ ∈ 𝓝 y\nV₂ : Set γ\nV₂_in : V₂ ∈ 𝓝 y\nV₁_cl : IsClosed V₁\nV₂_cl : IsClosed V₂\nU₁_op : IsOpen U₁\nU₂_op : IsOpen U₂\nVU₁ : V₁ ⊆ U₁\nVU₂ : V₂ ⊆ U₂\nhU₁₂ : Disjoint U₁ U₂\nU₃ : Set γ := (V₁ ∪ V₂)ᶜ\nU₃_op : IsOpen U₃\nW : Set (γ × γ) := U₁ ×ˢ U₁ ∪ U₂ ×ˢ U₂ ∪ U₃ ×ˢ U₃\nz : γ\n⊢ IsOpen W\n[PROOFSTEP]\napply_rules [IsOpen.union, IsOpen.prod]\n[GOAL]\ncase mk.refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁴ : UniformSpace α\ninst✝³ : UniformSpace β\ninst✝² : TopologicalSpace γ\ninst✝¹ : CompactSpace γ\ninst✝ : T2Space γ\n𝓝Δ : Filter (γ × γ) := 𝓝ˢ (diagonal γ)\nF : Filter (γ × γ) := Filter.lift' 𝓝Δ fun s => s ○ s\nV : Set (γ × γ)\nV_in : V ∈ 𝓝Δ\nH : ¬F ⊓ 𝓟 Vᶜ = ⊥\nthis✝¹ : NeBot (F ⊓ 𝓟 Vᶜ)\nx y : γ\nhxy : ClusterPt (x, y) (F ⊓ 𝓟 Vᶜ)\nclV : ClusterPt (x, y) (𝓟 Vᶜ)\nthis✝ : ¬(x, y) ∈ interior V\ndiag_subset : diagonal γ ⊆ interior V\nx_ne_y : x ≠ y\nthis : NormalSpace γ\nU₁ : Set γ\nleft✝¹ : U₁ ∈ 𝓝 x\nV₁ : Set γ\nV₁_in : V₁ ∈ 𝓝 x\nU₂ : Set γ\nleft✝ : U₂ ∈ 𝓝 y\nV₂ : Set γ\nV₂_in : V₂ ∈ 𝓝 y\nV₁_cl : IsClosed V₁\nV₂_cl : IsClosed V₂\nU₁_op : IsOpen U₁\nU₂_op : IsOpen U₂\nVU₁ : V₁ ⊆ U₁\nVU₂ : V₂ ⊆ U₂\nhU₁₂ : Disjoint U₁ U₂\nU₃ : Set γ := (V₁ ∪ V₂)ᶜ\nU₃_op : IsOpen U₃\nW : Set (γ × γ) := U₁ ×ˢ U₁ ∪ U₂ ×ˢ U₂ ∪ U₃ ×ˢ U₃\nz : γ\n⊢ (z, z) ∈ W\n[PROOFSTEP]\nsimp only [mem_union, mem_prod, and_self_iff]\n[GOAL]\ncase mk.refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁴ : UniformSpace α\ninst✝³ : UniformSpace β\ninst✝² : TopologicalSpace γ\ninst✝¹ : CompactSpace γ\ninst✝ : T2Space γ\n𝓝Δ : Filter (γ × γ) := 𝓝ˢ (diagonal γ)\nF : Filter (γ × γ) := Filter.lift' 𝓝Δ fun s => s ○ s\nV : Set (γ × γ)\nV_in : V ∈ 𝓝Δ\nH : ¬F ⊓ 𝓟 Vᶜ = ⊥\nthis✝¹ : NeBot (F ⊓ 𝓟 Vᶜ)\nx y : γ\nhxy : ClusterPt (x, y) (F ⊓ 𝓟 Vᶜ)\nclV : ClusterPt (x, y) (𝓟 Vᶜ)\nthis✝ : ¬(x, y) ∈ interior V\ndiag_subset : diagonal γ ⊆ interior V\nx_ne_y : x ≠ y\nthis : NormalSpace γ\nU₁ : Set γ\nleft✝¹ : U₁ ∈ 𝓝 x\nV₁ : Set γ\nV₁_in : V₁ ∈ 𝓝 x\nU₂ : Set γ\nleft✝ : U₂ ∈ 𝓝 y\nV₂ : Set γ\nV₂_in : V₂ ∈ 𝓝 y\nV₁_cl : IsClosed V₁\nV₂_cl : IsClosed V₂\nU₁_op : IsOpen U₁\nU₂_op : IsOpen U₂\nVU₁ : V₁ ⊆ U₁\nVU₂ : V₂ ⊆ U₂\nhU₁₂ : Disjoint U₁ U₂\nU₃ : Set γ := (V₁ ∪ V₂)ᶜ\nU₃_op : IsOpen U₃\nW : Set (γ × γ) := U₁ ×ˢ U₁ ∪ U₂ ×ˢ U₂ ∪ U₃ ×ˢ U₃\nz : γ\n⊢ (z ∈ U₁ ∨ z ∈ U₂) ∨ z ∈ (V₁ ∪ V₂)ᶜ\n[PROOFSTEP]\nexact (_root_.em _).imp_left fun h => union_subset_union VU₁ VU₂ h\n[GOAL]\ncase intro.mk.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁴ : UniformSpace α\ninst✝³ : UniformSpace β\ninst✝² : TopologicalSpace γ\ninst✝¹ : CompactSpace γ\ninst✝ : T2Space γ\n𝓝Δ : Filter (γ × γ) := 𝓝ˢ (diagonal γ)\nF : Filter (γ × γ) := Filter.lift' 𝓝Δ fun s => s ○ s\nV : Set (γ × γ)\nV_in : V ∈ 𝓝Δ\nH : ¬F ⊓ 𝓟 Vᶜ = ⊥\nthis✝¹ : NeBot (F ⊓ 𝓟 Vᶜ)\nx y : γ\nhxy : ClusterPt (x, y) (F ⊓ 𝓟 Vᶜ)\nclV : ClusterPt (x, y) (𝓟 Vᶜ)\nthis✝ : ¬(x, y) ∈ interior V\ndiag_subset : diagonal γ ⊆ interior V\nx_ne_y : x ≠ y\nthis : NormalSpace γ\nU₁ : Set γ\nleft✝¹ : U₁ ∈ 𝓝 x\nV₁ : Set γ\nV₁_in : V₁ ∈ 𝓝 x\nU₂ : Set γ\nleft✝ : U₂ ∈ 𝓝 y\nV₂ : Set γ\nV₂_in : V₂ ∈ 𝓝 y\nV₁_cl : IsClosed V₁\nV₂_cl : IsClosed V₂\nU₁_op : IsOpen U₁\nU₂_op : IsOpen U₂\nVU₁ : V₁ ⊆ U₁\nVU₂ : V₂ ⊆ U₂\nhU₁₂ : Disjoint U₁ U₂\nU₃ : Set γ := (V₁ ∪ V₂)ᶜ\nU₃_op : IsOpen U₃\nW : Set (γ × γ) := U₁ ×ˢ U₁ ∪ U₂ ×ˢ U₂ ∪ U₃ ×ˢ U₃\nW_in : W ∈ 𝓝Δ\n⊢ False\n[PROOFSTEP]\nhave : W ○ W ∈ F := @mem_lift' _ _ _ (fun s => s ○ s) _ W_in\n[GOAL]\ncase intro.mk.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁴ : UniformSpace α\ninst✝³ : UniformSpace β\ninst✝² : TopologicalSpace γ\ninst✝¹ : CompactSpace γ\ninst✝ : T2Space γ\n𝓝Δ : Filter (γ × γ) := 𝓝ˢ (diagonal γ)\nF : Filter (γ × γ) := Filter.lift' 𝓝Δ fun s => s ○ s\nV : Set (γ × γ)\nV_in : V ∈ 𝓝Δ\nH : ¬F ⊓ 𝓟 Vᶜ = ⊥\nthis✝² : NeBot (F ⊓ 𝓟 Vᶜ)\nx y : γ\nhxy : ClusterPt (x, y) (F ⊓ 𝓟 Vᶜ)\nclV : ClusterPt (x, y) (𝓟 Vᶜ)\nthis✝¹ : ¬(x, y) ∈ interior V\ndiag_subset : diagonal γ ⊆ interior V\nx_ne_y : x ≠ y\nthis✝ : NormalSpace γ\nU₁ : Set γ\nleft✝¹ : U₁ ∈ 𝓝 x\nV₁ : Set γ\nV₁_in : V₁ ∈ 𝓝 x\nU₂ : Set γ\nleft✝ : U₂ ∈ 𝓝 y\nV₂ : Set γ\nV₂_in : V₂ ∈ 𝓝 y\nV₁_cl : IsClosed V₁\nV₂_cl : IsClosed V₂\nU₁_op : IsOpen U₁\nU₂_op : IsOpen U₂\nVU₁ : V₁ ⊆ U₁\nVU₂ : V₂ ⊆ U₂\nhU₁₂ : Disjoint U₁ U₂\nU₃ : Set γ := (V₁ ∪ V₂)ᶜ\nU₃_op : IsOpen U₃\nW : Set (γ × γ) := U₁ ×ˢ U₁ ∪ U₂ ×ˢ U₂ ∪ U₃ ×ˢ U₃\nW_in : W ∈ 𝓝Δ\nthis : W ○ W ∈ F\n⊢ False\n[PROOFSTEP]\nhave hV₁₂ : V₁ ×ˢ V₂ ∈ 𝓝 (x, y) := prod_mem_nhds V₁_in V₂_in\n[GOAL]\ncase intro.mk.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁴ : UniformSpace α\ninst✝³ : UniformSpace β\ninst✝² : TopologicalSpace γ\ninst✝¹ : CompactSpace γ\ninst✝ : T2Space γ\n𝓝Δ : Filter (γ × γ) := 𝓝ˢ (diagonal γ)\nF : Filter (γ × γ) := Filter.lift' 𝓝Δ fun s => s ○ s\nV : Set (γ × γ)\nV_in : V ∈ 𝓝Δ\nH : ¬F ⊓ 𝓟 Vᶜ = ⊥\nthis✝² : NeBot (F ⊓ 𝓟 Vᶜ)\nx y : γ\nhxy : ClusterPt (x, y) (F ⊓ 𝓟 Vᶜ)\nclV : ClusterPt (x, y) (𝓟 Vᶜ)\nthis✝¹ : ¬(x, y) ∈ interior V\ndiag_subset : diagonal γ ⊆ interior V\nx_ne_y : x ≠ y\nthis✝ : NormalSpace γ\nU₁ : Set γ\nleft✝¹ : U₁ ∈ 𝓝 x\nV₁ : Set γ\nV₁_in : V₁ ∈ 𝓝 x\nU₂ : Set γ\nleft✝ : U₂ ∈ 𝓝 y\nV₂ : Set γ\nV₂_in : V₂ ∈ 𝓝 y\nV₁_cl : IsClosed V₁\nV₂_cl : IsClosed V₂\nU₁_op : IsOpen U₁\nU₂_op : IsOpen U₂\nVU₁ : V₁ ⊆ U₁\nVU₂ : V₂ ⊆ U₂\nhU₁₂ : Disjoint U₁ U₂\nU₃ : Set γ := (V₁ ∪ V₂)ᶜ\nU₃_op : IsOpen U₃\nW : Set (γ × γ) := U₁ ×ˢ U₁ ∪ U₂ ×ˢ U₂ ∪ U₃ ×ˢ U₃\nW_in : W ∈ 𝓝Δ\nthis : W ○ W ∈ F\nhV₁₂ : V₁ ×ˢ V₂ ∈ 𝓝 (x, y)\n⊢ False\n[PROOFSTEP]\nobtain ⟨⟨u, v⟩, ⟨u_in, v_in⟩, w, huw, hwv⟩ := clusterPt_iff.mp hxy.of_inf_left hV₁₂ this\n[GOAL]\ncase intro.mk.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.mk.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁴ : UniformSpace α\ninst✝³ : UniformSpace β\ninst✝² : TopologicalSpace γ\ninst✝¹ : CompactSpace γ\ninst✝ : T2Space γ\n𝓝Δ : Filter (γ × γ) := 𝓝ˢ (diagonal γ)\nF : Filter (γ × γ) := Filter.lift' 𝓝Δ fun s => s ○ s\nV : Set (γ × γ)\nV_in : V ∈ 𝓝Δ\nH : ¬F ⊓ 𝓟 Vᶜ = ⊥\nthis✝² : NeBot (F ⊓ 𝓟 Vᶜ)\nx y : γ\nhxy : ClusterPt (x, y) (F ⊓ 𝓟 Vᶜ)\nclV : ClusterPt (x, y) (𝓟 Vᶜ)\nthis✝¹ : ¬(x, y) ∈ interior V\ndiag_subset : diagonal γ ⊆ interior V\nx_ne_y : x ≠ y\nthis✝ : NormalSpace γ\nU₁ : Set γ\nleft✝¹ : U₁ ∈ 𝓝 x\nV₁ : Set γ\nV₁_in : V₁ ∈ 𝓝 x\nU₂ : Set γ\nleft✝ : U₂ ∈ 𝓝 y\nV₂ : Set γ\nV₂_in : V₂ ∈ 𝓝 y\nV₁_cl : IsClosed V₁\nV₂_cl : IsClosed V₂\nU₁_op : IsOpen U₁\nU₂_op : IsOpen U₂\nVU₁ : V₁ ⊆ U₁\nVU₂ : V₂ ⊆ U₂\nhU₁₂ : Disjoint U₁ U₂\nU₃ : Set γ := (V₁ ∪ V₂)ᶜ\nU₃_op : IsOpen U₃\nW : Set (γ × γ) := U₁ ×ˢ U₁ ∪ U₂ ×ˢ U₂ ∪ U₃ ×ˢ U₃\nW_in : W ∈ 𝓝Δ\nthis : W ○ W ∈ F\nhV₁₂ : V₁ ×ˢ V₂ ∈ 𝓝 (x, y)\nu v : γ\nu_in : (u, v).fst ∈ V₁\nv_in : (u, v).snd ∈ V₂\nw : γ\nhuw : ((u, v).fst, w) ∈ W\nhwv : (w, (u, v).snd) ∈ W\n⊢ False\n[PROOFSTEP]\nhave uw_in : (u, w) ∈ U₁ ×ˢ U₁ :=\n  (huw.resolve_right fun h => h.1 <| Or.inl u_in).resolve_right fun h =>\n    hU₁₂.le_bot\n      ⟨VU₁ u_in, h.1⟩\n        -- Similarly, because v ∈ V₂, (w ,v) ∈ W forces (w, v) ∈ U₂ ×ˢ U₂.\n[GOAL]\ncase intro.mk.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.mk.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁴ : UniformSpace α\ninst✝³ : UniformSpace β\ninst✝² : TopologicalSpace γ\ninst✝¹ : CompactSpace γ\ninst✝ : T2Space γ\n𝓝Δ : Filter (γ × γ) := 𝓝ˢ (diagonal γ)\nF : Filter (γ × γ) := Filter.lift' 𝓝Δ fun s => s ○ s\nV : Set (γ × γ)\nV_in : V ∈ 𝓝Δ\nH : ¬F ⊓ 𝓟 Vᶜ = ⊥\nthis✝² : NeBot (F ⊓ 𝓟 Vᶜ)\nx y : γ\nhxy : ClusterPt (x, y) (F ⊓ 𝓟 Vᶜ)\nclV : ClusterPt (x, y) (𝓟 Vᶜ)\nthis✝¹ : ¬(x, y) ∈ interior V\ndiag_subset : diagonal γ ⊆ interior V\nx_ne_y : x ≠ y\nthis✝ : NormalSpace γ\nU₁ : Set γ\nleft✝¹ : U₁ ∈ 𝓝 x\nV₁ : Set γ\nV₁_in : V₁ ∈ 𝓝 x\nU₂ : Set γ\nleft✝ : U₂ ∈ 𝓝 y\nV₂ : Set γ\nV₂_in : V₂ ∈ 𝓝 y\nV₁_cl : IsClosed V₁\nV₂_cl : IsClosed V₂\nU₁_op : IsOpen U₁\nU₂_op : IsOpen U₂\nVU₁ : V₁ ⊆ U₁\nVU₂ : V₂ ⊆ U₂\nhU₁₂ : Disjoint U₁ U₂\nU₃ : Set γ := (V₁ ∪ V₂)ᶜ\nU₃_op : IsOpen U₃\nW : Set (γ × γ) := U₁ ×ˢ U₁ ∪ U₂ ×ˢ U₂ ∪ U₃ ×ˢ U₃\nW_in : W ∈ 𝓝Δ\nthis : W ○ W ∈ F\nhV₁₂ : V₁ ×ˢ V₂ ∈ 𝓝 (x, y)\nu v : γ\nu_in : (u, v).fst ∈ V₁\nv_in : (u, v).snd ∈ V₂\nw : γ\nhuw : ((u, v).fst, w) ∈ W\nhwv : (w, (u, v).snd) ∈ W\nuw_in : (u, w) ∈ U₁ ×ˢ U₁\n⊢ False\n[PROOFSTEP]\nhave wv_in : (w, v) ∈ U₂ ×ˢ U₂ :=\n  (hwv.resolve_right fun h => h.2 <| Or.inr v_in).resolve_left fun h =>\n    hU₁₂.le_bot\n      ⟨h.2, VU₂ v_in⟩\n        -- Hence w ∈ U₁ ∩ U₂ which is empty.\n            -- So we have a contradiction\n[GOAL]\ncase intro.mk.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.mk.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁴ : UniformSpace α\ninst✝³ : UniformSpace β\ninst✝² : TopologicalSpace γ\ninst✝¹ : CompactSpace γ\ninst✝ : T2Space γ\n𝓝Δ : Filter (γ × γ) := 𝓝ˢ (diagonal γ)\nF : Filter (γ × γ) := Filter.lift' 𝓝Δ fun s => s ○ s\nV : Set (γ × γ)\nV_in : V ∈ 𝓝Δ\nH : ¬F ⊓ 𝓟 Vᶜ = ⊥\nthis✝² : NeBot (F ⊓ 𝓟 Vᶜ)\nx y : γ\nhxy : ClusterPt (x, y) (F ⊓ 𝓟 Vᶜ)\nclV : ClusterPt (x, y) (𝓟 Vᶜ)\nthis✝¹ : ¬(x, y) ∈ interior V\ndiag_subset : diagonal γ ⊆ interior V\nx_ne_y : x ≠ y\nthis✝ : NormalSpace γ\nU₁ : Set γ\nleft✝¹ : U₁ ∈ 𝓝 x\nV₁ : Set γ\nV₁_in : V₁ ∈ 𝓝 x\nU₂ : Set γ\nleft✝ : U₂ ∈ 𝓝 y\nV₂ : Set γ\nV₂_in : V₂ ∈ 𝓝 y\nV₁_cl : IsClosed V₁\nV₂_cl : IsClosed V₂\nU₁_op : IsOpen U₁\nU₂_op : IsOpen U₂\nVU₁ : V₁ ⊆ U₁\nVU₂ : V₂ ⊆ U₂\nhU₁₂ : Disjoint U₁ U₂\nU₃ : Set γ := (V₁ ∪ V₂)ᶜ\nU₃_op : IsOpen U₃\nW : Set (γ × γ) := U₁ ×ˢ U₁ ∪ U₂ ×ˢ U₂ ∪ U₃ ×ˢ U₃\nW_in : W ∈ 𝓝Δ\nthis : W ○ W ∈ F\nhV₁₂ : V₁ ×ˢ V₂ ∈ 𝓝 (x, y)\nu v : γ\nu_in : (u, v).fst ∈ V₁\nv_in : (u, v).snd ∈ V₂\nw : γ\nhuw : ((u, v).fst, w) ∈ W\nhwv : (w, (u, v).snd) ∈ W\nuw_in : (u, w) ∈ U₁ ×ˢ U₁\nwv_in : (w, v) ∈ U₂ ×ˢ U₂\n⊢ False\n[PROOFSTEP]\nexact hU₁₂.le_bot ⟨uw_in.2, wv_in.1⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁴ : UniformSpace α\ninst✝³ : UniformSpace β\ninst✝² : TopologicalSpace γ\ninst✝¹ : CompactSpace γ\ninst✝ : T2Space γ\n⊢ ∀ (s : Set γ),\n    IsOpen s ↔\n      ∀ (x : γ),\n        x ∈ s →\n          {p | p.fst = x → p.snd ∈ s} ∈\n            { uniformity := 𝓝ˢ (diagonal γ), refl := (_ : 𝓟 idRel ≤ 𝓝ˢ idRel),\n                symm := (_ : Tendsto Prod.swap (𝓝ˢ (diagonal γ)) (𝓝ˢ (diagonal γ))),\n                comp := (_ : (Filter.lift' (𝓝ˢ (diagonal γ)) fun s => s ○ s) ≤ 𝓝ˢ (diagonal γ)) }.uniformity\n[PROOFSTEP]\nsuffices ∀ x : γ, Filter.comap (Prod.mk x) (𝓝ˢ (diagonal γ)) = 𝓝 x\n  by\n  intro s\n  simp_rw [isOpen_iff_mem_nhds, ← mem_comap_prod_mk, this]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁴ : UniformSpace α\ninst✝³ : UniformSpace β\ninst✝² : TopologicalSpace γ\ninst✝¹ : CompactSpace γ\ninst✝ : T2Space γ\nthis : ∀ (x : γ), Filter.comap (Prod.mk x) (𝓝ˢ (diagonal γ)) = 𝓝 x\n⊢ ∀ (s : Set γ),\n    IsOpen s ↔\n      ∀ (x : γ),\n        x ∈ s →\n          {p | p.fst = x → p.snd ∈ s} ∈\n            { uniformity := 𝓝ˢ (diagonal γ), refl := (_ : 𝓟 idRel ≤ 𝓝ˢ idRel),\n                symm := (_ : Tendsto Prod.swap (𝓝ˢ (diagonal γ)) (𝓝ˢ (diagonal γ))),\n                comp := (_ : (Filter.lift' (𝓝ˢ (diagonal γ)) fun s => s ○ s) ≤ 𝓝ˢ (diagonal γ)) }.uniformity\n[PROOFSTEP]\nintro s\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁴ : UniformSpace α\ninst✝³ : UniformSpace β\ninst✝² : TopologicalSpace γ\ninst✝¹ : CompactSpace γ\ninst✝ : T2Space γ\nthis : ∀ (x : γ), Filter.comap (Prod.mk x) (𝓝ˢ (diagonal γ)) = 𝓝 x\ns : Set γ\n⊢ IsOpen s ↔\n    ∀ (x : γ),\n      x ∈ s →\n        {p | p.fst = x → p.snd ∈ s} ∈\n          { uniformity := 𝓝ˢ (diagonal γ), refl := (_ : 𝓟 idRel ≤ 𝓝ˢ idRel),\n              symm := (_ : Tendsto Prod.swap (𝓝ˢ (diagonal γ)) (𝓝ˢ (diagonal γ))),\n              comp := (_ : (Filter.lift' (𝓝ˢ (diagonal γ)) fun s => s ○ s) ≤ 𝓝ˢ (diagonal γ)) }.uniformity\n[PROOFSTEP]\nsimp_rw [isOpen_iff_mem_nhds, ← mem_comap_prod_mk, this]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁴ : UniformSpace α\ninst✝³ : UniformSpace β\ninst✝² : TopologicalSpace γ\ninst✝¹ : CompactSpace γ\ninst✝ : T2Space γ\n⊢ ∀ (x : γ), Filter.comap (Prod.mk x) (𝓝ˢ (diagonal γ)) = 𝓝 x\n[PROOFSTEP]\nintro x\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁴ : UniformSpace α\ninst✝³ : UniformSpace β\ninst✝² : TopologicalSpace γ\ninst✝¹ : CompactSpace γ\ninst✝ : T2Space γ\nx : γ\n⊢ Filter.comap (Prod.mk x) (𝓝ˢ (diagonal γ)) = 𝓝 x\n[PROOFSTEP]\nsimp_rw [nhdsSet_diagonal, comap_iSup, nhds_prod_eq, comap_prod, (· ∘ ·), comap_id']\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁴ : UniformSpace α\ninst✝³ : UniformSpace β\ninst✝² : TopologicalSpace γ\ninst✝¹ : CompactSpace γ\ninst✝ : T2Space γ\nx : γ\n⊢ ⨆ (i : γ), Filter.comap (fun x_1 => x) (𝓝 i) ⊓ 𝓝 i = 𝓝 x\n[PROOFSTEP]\nrw [iSup_split_single _ x, comap_const_of_mem fun V => mem_of_mem_nhds]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁴ : UniformSpace α\ninst✝³ : UniformSpace β\ninst✝² : TopologicalSpace γ\ninst✝¹ : CompactSpace γ\ninst✝ : T2Space γ\nx : γ\n⊢ ⊤ ⊓ 𝓝 x ⊔ ⨆ (i : γ) (_ : i ≠ x), Filter.comap (fun x_2 => x) (𝓝 i) ⊓ 𝓝 i = 𝓝 x\n[PROOFSTEP]\nsuffices ∀ (y) (_ : y ≠ x), comap (fun _ : γ => x) (𝓝 y) ⊓ 𝓝 y ≤ 𝓝 x by simpa\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁴ : UniformSpace α\ninst✝³ : UniformSpace β\ninst✝² : TopologicalSpace γ\ninst✝¹ : CompactSpace γ\ninst✝ : T2Space γ\nx : γ\nthis : ∀ (y : γ), y ≠ x → Filter.comap (fun x_2 => x) (𝓝 y) ⊓ 𝓝 y ≤ 𝓝 x\n⊢ ⊤ ⊓ 𝓝 x ⊔ ⨆ (i : γ) (_ : i ≠ x), Filter.comap (fun x_2 => x) (𝓝 i) ⊓ 𝓝 i = 𝓝 x\n[PROOFSTEP]\nsimpa\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁴ : UniformSpace α\ninst✝³ : UniformSpace β\ninst✝² : TopologicalSpace γ\ninst✝¹ : CompactSpace γ\ninst✝ : T2Space γ\nx : γ\n⊢ ∀ (y : γ), y ≠ x → Filter.comap (fun x_2 => x) (𝓝 y) ⊓ 𝓝 y ≤ 𝓝 x\n[PROOFSTEP]\nintro y hxy\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁴ : UniformSpace α\ninst✝³ : UniformSpace β\ninst✝² : TopologicalSpace γ\ninst✝¹ : CompactSpace γ\ninst✝ : T2Space γ\nx y : γ\nhxy : y ≠ x\n⊢ Filter.comap (fun x_1 => x) (𝓝 y) ⊓ 𝓝 y ≤ 𝓝 x\n[PROOFSTEP]\nsimp [comap_const_of_not_mem (compl_singleton_mem_nhds hxy) (Classical.not_not.2 rfl)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\ninst✝ : CompactSpace α\nf : α → β\nh : Continuous f\n⊢ map (Prod.map f f) (𝓤 α) = map (Prod.map f f) (𝓝ˢ (diagonal α))\n[PROOFSTEP]\nrw [nhdsSet_diagonal_eq_uniformity]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : UniformSpace α\ninst✝ : UniformSpace β\ns : Set α\nf : α → β\nhs : IsCompact s\nhf : ContinuousOn f s\n⊢ UniformContinuousOn f s\n[PROOFSTEP]\nrw [uniformContinuousOn_iff_restrict]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : UniformSpace α\ninst✝ : UniformSpace β\ns : Set α\nf : α → β\nhs : IsCompact s\nhf : ContinuousOn f s\n⊢ UniformContinuous (restrict s f)\n[PROOFSTEP]\nrw [isCompact_iff_compactSpace] at hs \n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : UniformSpace α\ninst✝ : UniformSpace β\ns : Set α\nf : α → β\nhs : CompactSpace ↑s\nhf : ContinuousOn f s\n⊢ UniformContinuous (restrict s f)\n[PROOFSTEP]\nrw [continuousOn_iff_continuous_restrict] at hf \n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : UniformSpace α\ninst✝ : UniformSpace β\ns : Set α\nf : α → β\nhs : CompactSpace ↑s\nhf : Continuous (restrict s f)\n⊢ UniformContinuous (restrict s f)\n[PROOFSTEP]\nexact CompactSpace.uniformContinuous_of_continuous hf\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : UniformSpace α\ninst✝ : UniformSpace β\nr : Set (β × β)\ns : Set α\nhs : IsCompact s\nf : α → β\nhf : ∀ (a : α), a ∈ s → ContinuousAt f a\nhr : r ∈ 𝓤 β\n⊢ {x | x.fst ∈ s → (f x.fst, f x.snd) ∈ r} ∈ 𝓤 α\n[PROOFSTEP]\nobtain ⟨t, ht, htsymm, htr⟩ := comp_symm_mem_uniformity_sets hr\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : UniformSpace α\ninst✝ : UniformSpace β\nr : Set (β × β)\ns : Set α\nhs : IsCompact s\nf : α → β\nhf : ∀ (a : α), a ∈ s → ContinuousAt f a\nhr : r ∈ 𝓤 β\nt : Set (β × β)\nht : t ∈ 𝓤 β\nhtsymm : SymmetricRel t\nhtr : t ○ t ⊆ r\n⊢ {x | x.fst ∈ s → (f x.fst, f x.snd) ∈ r} ∈ 𝓤 α\n[PROOFSTEP]\nchoose U hU T hT hb using fun a ha =>\n  exists_mem_nhds_ball_subset_of_mem_nhds ((hf a ha).preimage_mem_nhds <| mem_nhds_left _ ht)\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : UniformSpace α\ninst✝ : UniformSpace β\nr : Set (β × β)\ns : Set α\nhs : IsCompact s\nf : α → β\nhf : ∀ (a : α), a ∈ s → ContinuousAt f a\nhr : r ∈ 𝓤 β\nt : Set (β × β)\nht : t ∈ 𝓤 β\nhtsymm : SymmetricRel t\nhtr : t ○ t ⊆ r\nU : (a : α) → a ∈ s → Set α\nhU : ∀ (a : α) (ha : a ∈ s), U a ha ∈ 𝓝 a\nT : (a : α) → a ∈ s → Set (α × α)\nhT : ∀ (a : α) (ha : a ∈ s), T a ha ∈ 𝓤 α\nhb : ∀ (a : α) (ha : a ∈ s) (a' : α), a' ∈ U a ha → ball a' (T a ha) ⊆ f ⁻¹' {y | (f a, y) ∈ t}\n⊢ {x | x.fst ∈ s → (f x.fst, f x.snd) ∈ r} ∈ 𝓤 α\n[PROOFSTEP]\nobtain ⟨fs, hsU⟩ := hs.elim_nhds_subcover' U hU\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : UniformSpace α\ninst✝ : UniformSpace β\nr : Set (β × β)\ns : Set α\nhs : IsCompact s\nf : α → β\nhf : ∀ (a : α), a ∈ s → ContinuousAt f a\nhr : r ∈ 𝓤 β\nt : Set (β × β)\nht : t ∈ 𝓤 β\nhtsymm : SymmetricRel t\nhtr : t ○ t ⊆ r\nU : (a : α) → a ∈ s → Set α\nhU : ∀ (a : α) (ha : a ∈ s), U a ha ∈ 𝓝 a\nT : (a : α) → a ∈ s → Set (α × α)\nhT : ∀ (a : α) (ha : a ∈ s), T a ha ∈ 𝓤 α\nhb : ∀ (a : α) (ha : a ∈ s) (a' : α), a' ∈ U a ha → ball a' (T a ha) ⊆ f ⁻¹' {y | (f a, y) ∈ t}\nfs : Finset ↑s\nhsU : s ⊆ ⋃ (x : ↑s) (_ : x ∈ fs), U ↑x (_ : ↑x ∈ s)\n⊢ {x | x.fst ∈ s → (f x.fst, f x.snd) ∈ r} ∈ 𝓤 α\n[PROOFSTEP]\napply mem_of_superset ((biInter_finset_mem fs).2 fun a _ => hT a a.2)\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : UniformSpace α\ninst✝ : UniformSpace β\nr : Set (β × β)\ns : Set α\nhs : IsCompact s\nf : α → β\nhf : ∀ (a : α), a ∈ s → ContinuousAt f a\nhr : r ∈ 𝓤 β\nt : Set (β × β)\nht : t ∈ 𝓤 β\nhtsymm : SymmetricRel t\nhtr : t ○ t ⊆ r\nU : (a : α) → a ∈ s → Set α\nhU : ∀ (a : α) (ha : a ∈ s), U a ha ∈ 𝓝 a\nT : (a : α) → a ∈ s → Set (α × α)\nhT : ∀ (a : α) (ha : a ∈ s), T a ha ∈ 𝓤 α\nhb : ∀ (a : α) (ha : a ∈ s) (a' : α), a' ∈ U a ha → ball a' (T a ha) ⊆ f ⁻¹' {y | (f a, y) ∈ t}\nfs : Finset ↑s\nhsU : s ⊆ ⋃ (x : ↑s) (_ : x ∈ fs), U ↑x (_ : ↑x ∈ s)\n⊢ ⋂ (i : ↑s) (_ : i ∈ fs), T ↑i (_ : ↑i ∈ s) ⊆ {x | x.fst ∈ s → (f x.fst, f x.snd) ∈ r}\n[PROOFSTEP]\nrintro ⟨a₁, a₂⟩ h h₁\n[GOAL]\ncase intro.intro.intro.intro.mk\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : UniformSpace α\ninst✝ : UniformSpace β\nr : Set (β × β)\ns : Set α\nhs : IsCompact s\nf : α → β\nhf : ∀ (a : α), a ∈ s → ContinuousAt f a\nhr : r ∈ 𝓤 β\nt : Set (β × β)\nht : t ∈ 𝓤 β\nhtsymm : SymmetricRel t\nhtr : t ○ t ⊆ r\nU : (a : α) → a ∈ s → Set α\nhU : ∀ (a : α) (ha : a ∈ s), U a ha ∈ 𝓝 a\nT : (a : α) → a ∈ s → Set (α × α)\nhT : ∀ (a : α) (ha : a ∈ s), T a ha ∈ 𝓤 α\nhb : ∀ (a : α) (ha : a ∈ s) (a' : α), a' ∈ U a ha → ball a' (T a ha) ⊆ f ⁻¹' {y | (f a, y) ∈ t}\nfs : Finset ↑s\nhsU : s ⊆ ⋃ (x : ↑s) (_ : x ∈ fs), U ↑x (_ : ↑x ∈ s)\na₁ a₂ : α\nh : (a₁, a₂) ∈ ⋂ (i : ↑s) (_ : i ∈ fs), T ↑i (_ : ↑i ∈ s)\nh₁ : (a₁, a₂).fst ∈ s\n⊢ (f (a₁, a₂).fst, f (a₁, a₂).snd) ∈ r\n[PROOFSTEP]\nobtain ⟨a, ha, haU⟩ := Set.mem_iUnion₂.1 (hsU h₁)\n[GOAL]\ncase intro.intro.intro.intro.mk.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : UniformSpace α\ninst✝ : UniformSpace β\nr : Set (β × β)\ns : Set α\nhs : IsCompact s\nf : α → β\nhf : ∀ (a : α), a ∈ s → ContinuousAt f a\nhr : r ∈ 𝓤 β\nt : Set (β × β)\nht : t ∈ 𝓤 β\nhtsymm : SymmetricRel t\nhtr : t ○ t ⊆ r\nU : (a : α) → a ∈ s → Set α\nhU : ∀ (a : α) (ha : a ∈ s), U a ha ∈ 𝓝 a\nT : (a : α) → a ∈ s → Set (α × α)\nhT : ∀ (a : α) (ha : a ∈ s), T a ha ∈ 𝓤 α\nhb : ∀ (a : α) (ha : a ∈ s) (a' : α), a' ∈ U a ha → ball a' (T a ha) ⊆ f ⁻¹' {y | (f a, y) ∈ t}\nfs : Finset ↑s\nhsU : s ⊆ ⋃ (x : ↑s) (_ : x ∈ fs), U ↑x (_ : ↑x ∈ s)\na₁ a₂ : α\nh : (a₁, a₂) ∈ ⋂ (i : ↑s) (_ : i ∈ fs), T ↑i (_ : ↑i ∈ s)\nh₁ : (a₁, a₂).fst ∈ s\na : ↑s\nha : a ∈ fs\nhaU : (a₁, a₂).fst ∈ U ↑a (_ : ↑a ∈ s)\n⊢ (f (a₁, a₂).fst, f (a₁, a₂).snd) ∈ r\n[PROOFSTEP]\napply htr\n[GOAL]\ncase intro.intro.intro.intro.mk.intro.intro.a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : UniformSpace α\ninst✝ : UniformSpace β\nr : Set (β × β)\ns : Set α\nhs : IsCompact s\nf : α → β\nhf : ∀ (a : α), a ∈ s → ContinuousAt f a\nhr : r ∈ 𝓤 β\nt : Set (β × β)\nht : t ∈ 𝓤 β\nhtsymm : SymmetricRel t\nhtr : t ○ t ⊆ r\nU : (a : α) → a ∈ s → Set α\nhU : ∀ (a : α) (ha : a ∈ s), U a ha ∈ 𝓝 a\nT : (a : α) → a ∈ s → Set (α × α)\nhT : ∀ (a : α) (ha : a ∈ s), T a ha ∈ 𝓤 α\nhb : ∀ (a : α) (ha : a ∈ s) (a' : α), a' ∈ U a ha → ball a' (T a ha) ⊆ f ⁻¹' {y | (f a, y) ∈ t}\nfs : Finset ↑s\nhsU : s ⊆ ⋃ (x : ↑s) (_ : x ∈ fs), U ↑x (_ : ↑x ∈ s)\na₁ a₂ : α\nh : (a₁, a₂) ∈ ⋂ (i : ↑s) (_ : i ∈ fs), T ↑i (_ : ↑i ∈ s)\nh₁ : (a₁, a₂).fst ∈ s\na : ↑s\nha : a ∈ fs\nhaU : (a₁, a₂).fst ∈ U ↑a (_ : ↑a ∈ s)\n⊢ (f (a₁, a₂).fst, f (a₁, a₂).snd) ∈ t ○ t\n[PROOFSTEP]\nrefine' ⟨f a, htsymm.mk_mem_comm.1 (hb _ _ _ haU _), hb _ _ _ haU _⟩\n[GOAL]\ncase intro.intro.intro.intro.mk.intro.intro.a.refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : UniformSpace α\ninst✝ : UniformSpace β\nr : Set (β × β)\ns : Set α\nhs : IsCompact s\nf : α → β\nhf : ∀ (a : α), a ∈ s → ContinuousAt f a\nhr : r ∈ 𝓤 β\nt : Set (β × β)\nht : t ∈ 𝓤 β\nhtsymm : SymmetricRel t\nhtr : t ○ t ⊆ r\nU : (a : α) → a ∈ s → Set α\nhU : ∀ (a : α) (ha : a ∈ s), U a ha ∈ 𝓝 a\nT : (a : α) → a ∈ s → Set (α × α)\nhT : ∀ (a : α) (ha : a ∈ s), T a ha ∈ 𝓤 α\nhb : ∀ (a : α) (ha : a ∈ s) (a' : α), a' ∈ U a ha → ball a' (T a ha) ⊆ f ⁻¹' {y | (f a, y) ∈ t}\nfs : Finset ↑s\nhsU : s ⊆ ⋃ (x : ↑s) (_ : x ∈ fs), U ↑x (_ : ↑x ∈ s)\na₁ a₂ : α\nh : (a₁, a₂) ∈ ⋂ (i : ↑s) (_ : i ∈ fs), T ↑i (_ : ↑i ∈ s)\nh₁ : (a₁, a₂).fst ∈ s\na : ↑s\nha : a ∈ fs\nhaU : (a₁, a₂).fst ∈ U ↑a (_ : ↑a ∈ s)\n⊢ (a₁, a₂).fst ∈ ball (a₁, a₂).fst (T ↑a (_ : ↑a ∈ s))\ncase intro.intro.intro.intro.mk.intro.intro.a.refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : UniformSpace α\ninst✝ : UniformSpace β\nr : Set (β × β)\ns : Set α\nhs : IsCompact s\nf : α → β\nhf : ∀ (a : α), a ∈ s → ContinuousAt f a\nhr : r ∈ 𝓤 β\nt : Set (β × β)\nht : t ∈ 𝓤 β\nhtsymm : SymmetricRel t\nhtr : t ○ t ⊆ r\nU : (a : α) → a ∈ s → Set α\nhU : ∀ (a : α) (ha : a ∈ s), U a ha ∈ 𝓝 a\nT : (a : α) → a ∈ s → Set (α × α)\nhT : ∀ (a : α) (ha : a ∈ s), T a ha ∈ 𝓤 α\nhb : ∀ (a : α) (ha : a ∈ s) (a' : α), a' ∈ U a ha → ball a' (T a ha) ⊆ f ⁻¹' {y | (f a, y) ∈ t}\nfs : Finset ↑s\nhsU : s ⊆ ⋃ (x : ↑s) (_ : x ∈ fs), U ↑x (_ : ↑x ∈ s)\na₁ a₂ : α\nh : (a₁, a₂) ∈ ⋂ (i : ↑s) (_ : i ∈ fs), T ↑i (_ : ↑i ∈ s)\nh₁ : (a₁, a₂).fst ∈ s\na : ↑s\nha : a ∈ fs\nhaU : (a₁, a₂).fst ∈ U ↑a (_ : ↑a ∈ s)\n⊢ (a₁, a₂).snd ∈ ball (a₁, a₂).fst (T ↑a (_ : ↑a ∈ s))\n[PROOFSTEP]\nexacts [mem_ball_self _ (hT a a.2), mem_iInter₂.1 h a ha]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : UniformSpace α\ninst✝ : UniformSpace β\nf : α → β\nx : β\nh_cont : Continuous f\nhx : Tendsto f (cocompact α) (𝓝 x)\nr : Set (β × β)\nhr : r ∈ 𝓤 β\n⊢ {x | (f x.fst, f x.snd) ∈ r} ∈ 𝓤 α\n[PROOFSTEP]\nobtain ⟨t, ht, htsymm, htr⟩ := comp_symm_mem_uniformity_sets hr\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : UniformSpace α\ninst✝ : UniformSpace β\nf : α → β\nx : β\nh_cont : Continuous f\nhx : Tendsto f (cocompact α) (𝓝 x)\nr : Set (β × β)\nhr : r ∈ 𝓤 β\nt : Set (β × β)\nht : t ∈ 𝓤 β\nhtsymm : SymmetricRel t\nhtr : t ○ t ⊆ r\n⊢ {x | (f x.fst, f x.snd) ∈ r} ∈ 𝓤 α\n[PROOFSTEP]\nobtain ⟨s, hs, hst⟩ := mem_cocompact.1 (hx <| mem_nhds_left _ ht)\n[GOAL]\ncase intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : UniformSpace α\ninst✝ : UniformSpace β\nf : α → β\nx : β\nh_cont : Continuous f\nhx : Tendsto f (cocompact α) (𝓝 x)\nr : Set (β × β)\nhr : r ∈ 𝓤 β\nt : Set (β × β)\nht : t ∈ 𝓤 β\nhtsymm : SymmetricRel t\nhtr : t ○ t ⊆ r\ns : Set α\nhs : IsCompact s\nhst : sᶜ ⊆ f ⁻¹' {y | (x, y) ∈ t}\n⊢ {x | (f x.fst, f x.snd) ∈ r} ∈ 𝓤 α\n[PROOFSTEP]\napply\n  mem_of_superset\n    (symmetrize_mem_uniformity <|\n      (hs.uniformContinuousAt_of_continuousAt f fun _ _ => h_cont.continuousAt) <| symmetrize_mem_uniformity hr)\n[GOAL]\ncase intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : UniformSpace α\ninst✝ : UniformSpace β\nf : α → β\nx : β\nh_cont : Continuous f\nhx : Tendsto f (cocompact α) (𝓝 x)\nr : Set (β × β)\nhr : r ∈ 𝓤 β\nt : Set (β × β)\nht : t ∈ 𝓤 β\nhtsymm : SymmetricRel t\nhtr : t ○ t ⊆ r\ns : Set α\nhs : IsCompact s\nhst : sᶜ ⊆ f ⁻¹' {y | (x, y) ∈ t}\n⊢ symmetrizeRel {x | x.fst ∈ s → (f x.fst, f x.snd) ∈ symmetrizeRel r} ⊆ {x | (f x.fst, f x.snd) ∈ r}\n[PROOFSTEP]\nrintro ⟨b₁, b₂⟩ h\n[GOAL]\ncase intro.intro.intro.intro.intro.mk\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : UniformSpace α\ninst✝ : UniformSpace β\nf : α → β\nx : β\nh_cont : Continuous f\nhx : Tendsto f (cocompact α) (𝓝 x)\nr : Set (β × β)\nhr : r ∈ 𝓤 β\nt : Set (β × β)\nht : t ∈ 𝓤 β\nhtsymm : SymmetricRel t\nhtr : t ○ t ⊆ r\ns : Set α\nhs : IsCompact s\nhst : sᶜ ⊆ f ⁻¹' {y | (x, y) ∈ t}\nb₁ b₂ : α\nh : (b₁, b₂) ∈ symmetrizeRel {x | x.fst ∈ s → (f x.fst, f x.snd) ∈ symmetrizeRel r}\n⊢ (b₁, b₂) ∈ {x | (f x.fst, f x.snd) ∈ r}\n[PROOFSTEP]\nby_cases h₁ : b₁ ∈ s\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : UniformSpace α\ninst✝ : UniformSpace β\nf : α → β\nx : β\nh_cont : Continuous f\nhx : Tendsto f (cocompact α) (𝓝 x)\nr : Set (β × β)\nhr : r ∈ 𝓤 β\nt : Set (β × β)\nht : t ∈ 𝓤 β\nhtsymm : SymmetricRel t\nhtr : t ○ t ⊆ r\ns : Set α\nhs : IsCompact s\nhst : sᶜ ⊆ f ⁻¹' {y | (x, y) ∈ t}\nb₁ b₂ : α\nh : (b₁, b₂) ∈ symmetrizeRel {x | x.fst ∈ s → (f x.fst, f x.snd) ∈ symmetrizeRel r}\nh₁ : b₁ ∈ s\n⊢ (b₁, b₂) ∈ {x | (f x.fst, f x.snd) ∈ r}\n[PROOFSTEP]\nexact (h.1 h₁).1\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : UniformSpace α\ninst✝ : UniformSpace β\nf : α → β\nx : β\nh_cont : Continuous f\nhx : Tendsto f (cocompact α) (𝓝 x)\nr : Set (β × β)\nhr : r ∈ 𝓤 β\nt : Set (β × β)\nht : t ∈ 𝓤 β\nhtsymm : SymmetricRel t\nhtr : t ○ t ⊆ r\ns : Set α\nhs : IsCompact s\nhst : sᶜ ⊆ f ⁻¹' {y | (x, y) ∈ t}\nb₁ b₂ : α\nh : (b₁, b₂) ∈ symmetrizeRel {x | x.fst ∈ s → (f x.fst, f x.snd) ∈ symmetrizeRel r}\nh₁ : ¬b₁ ∈ s\n⊢ (b₁, b₂) ∈ {x | (f x.fst, f x.snd) ∈ r}\n[PROOFSTEP]\nby_cases h₂ : b₂ ∈ s\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : UniformSpace α\ninst✝ : UniformSpace β\nf : α → β\nx : β\nh_cont : Continuous f\nhx : Tendsto f (cocompact α) (𝓝 x)\nr : Set (β × β)\nhr : r ∈ 𝓤 β\nt : Set (β × β)\nht : t ∈ 𝓤 β\nhtsymm : SymmetricRel t\nhtr : t ○ t ⊆ r\ns : Set α\nhs : IsCompact s\nhst : sᶜ ⊆ f ⁻¹' {y | (x, y) ∈ t}\nb₁ b₂ : α\nh : (b₁, b₂) ∈ symmetrizeRel {x | x.fst ∈ s → (f x.fst, f x.snd) ∈ symmetrizeRel r}\nh₁ : ¬b₁ ∈ s\nh₂ : b₂ ∈ s\n⊢ (b₁, b₂) ∈ {x | (f x.fst, f x.snd) ∈ r}\n[PROOFSTEP]\nexact (h.2 h₂).2\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : UniformSpace α\ninst✝ : UniformSpace β\nf : α → β\nx : β\nh_cont : Continuous f\nhx : Tendsto f (cocompact α) (𝓝 x)\nr : Set (β × β)\nhr : r ∈ 𝓤 β\nt : Set (β × β)\nht : t ∈ 𝓤 β\nhtsymm : SymmetricRel t\nhtr : t ○ t ⊆ r\ns : Set α\nhs : IsCompact s\nhst : sᶜ ⊆ f ⁻¹' {y | (x, y) ∈ t}\nb₁ b₂ : α\nh : (b₁, b₂) ∈ symmetrizeRel {x | x.fst ∈ s → (f x.fst, f x.snd) ∈ symmetrizeRel r}\nh₁ : ¬b₁ ∈ s\nh₂ : ¬b₂ ∈ s\n⊢ (b₁, b₂) ∈ {x | (f x.fst, f x.snd) ∈ r}\n[PROOFSTEP]\napply htr\n[GOAL]\ncase neg.a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : UniformSpace α\ninst✝ : UniformSpace β\nf : α → β\nx : β\nh_cont : Continuous f\nhx : Tendsto f (cocompact α) (𝓝 x)\nr : Set (β × β)\nhr : r ∈ 𝓤 β\nt : Set (β × β)\nht : t ∈ 𝓤 β\nhtsymm : SymmetricRel t\nhtr : t ○ t ⊆ r\ns : Set α\nhs : IsCompact s\nhst : sᶜ ⊆ f ⁻¹' {y | (x, y) ∈ t}\nb₁ b₂ : α\nh : (b₁, b₂) ∈ symmetrizeRel {x | x.fst ∈ s → (f x.fst, f x.snd) ∈ symmetrizeRel r}\nh₁ : ¬b₁ ∈ s\nh₂ : ¬b₂ ∈ s\n⊢ (f (b₁, b₂).fst, f (b₁, b₂).snd) ∈ t ○ t\n[PROOFSTEP]\nexact ⟨x, htsymm.mk_mem_comm.1 (hst h₁), hst h₂⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝³ : UniformSpace α\ninst✝² : UniformSpace β\nf : α → γ\ninst✝¹ : TopologicalSpace γ\ninst✝ : One γ\nh : HasCompactMulSupport f\n⊢ Tendsto f (cocompact α) (𝓝 1)\n[PROOFSTEP]\nintro N hN\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝³ : UniformSpace α\ninst✝² : UniformSpace β\nf : α → γ\ninst✝¹ : TopologicalSpace γ\ninst✝ : One γ\nh : HasCompactMulSupport f\nN : Set γ\nhN : N ∈ 𝓝 1\n⊢ N ∈ map f (cocompact α)\n[PROOFSTEP]\nrw [mem_map, mem_cocompact']\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝³ : UniformSpace α\ninst✝² : UniformSpace β\nf : α → γ\ninst✝¹ : TopologicalSpace γ\ninst✝ : One γ\nh : HasCompactMulSupport f\nN : Set γ\nhN : N ∈ 𝓝 1\n⊢ ∃ t, IsCompact t ∧ (f ⁻¹' N)ᶜ ⊆ t\n[PROOFSTEP]\nrefine' ⟨mulTSupport f, h.isCompact, _⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝³ : UniformSpace α\ninst✝² : UniformSpace β\nf : α → γ\ninst✝¹ : TopologicalSpace γ\ninst✝ : One γ\nh : HasCompactMulSupport f\nN : Set γ\nhN : N ∈ 𝓝 1\n⊢ (f ⁻¹' N)ᶜ ⊆ mulTSupport f\n[PROOFSTEP]\nrw [compl_subset_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝³ : UniformSpace α\ninst✝² : UniformSpace β\nf : α → γ\ninst✝¹ : TopologicalSpace γ\ninst✝ : One γ\nh : HasCompactMulSupport f\nN : Set γ\nhN : N ∈ 𝓝 1\n⊢ (mulTSupport f)ᶜ ⊆ f ⁻¹' N\n[PROOFSTEP]\nintro v hv\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝³ : UniformSpace α\ninst✝² : UniformSpace β\nf : α → γ\ninst✝¹ : TopologicalSpace γ\ninst✝ : One γ\nh : HasCompactMulSupport f\nN : Set γ\nhN : N ∈ 𝓝 1\nv : α\nhv : v ∈ (mulTSupport f)ᶜ\n⊢ v ∈ f ⁻¹' N\n[PROOFSTEP]\nrw [mem_preimage, image_eq_one_of_nmem_mulTSupport hv]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝³ : UniformSpace α\ninst✝² : UniformSpace β\nf : α → γ\ninst✝¹ : TopologicalSpace γ\ninst✝ : One γ\nh : HasCompactMulSupport f\nN : Set γ\nhN : N ∈ 𝓝 1\nv : α\nhv : v ∈ (mulTSupport f)ᶜ\n⊢ 1 ∈ N\n[PROOFSTEP]\nexact mem_of_mem_nhds hN\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁴ : UniformSpace α\ninst✝³ : UniformSpace β\ninst✝² : LocallyCompactSpace α\ninst✝¹ : CompactSpace β\ninst✝ : UniformSpace γ\nf : α → β → γ\nx : α\nU : Set α\nhxU : U ∈ 𝓝 x\nh : ContinuousOn (↿f) (U ×ˢ univ)\n⊢ TendstoUniformly f (f x) (𝓝 x)\n[PROOFSTEP]\nrcases LocallyCompactSpace.local_compact_nhds _ _ hxU with ⟨K, hxK, hKU, hK⟩\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁴ : UniformSpace α\ninst✝³ : UniformSpace β\ninst✝² : LocallyCompactSpace α\ninst✝¹ : CompactSpace β\ninst✝ : UniformSpace γ\nf : α → β → γ\nx : α\nU : Set α\nhxU : U ∈ 𝓝 x\nh : ContinuousOn (↿f) (U ×ˢ univ)\nK : Set α\nhxK : K ∈ 𝓝 x\nhKU : K ⊆ U\nhK : IsCompact K\n⊢ TendstoUniformly f (f x) (𝓝 x)\n[PROOFSTEP]\nhave : UniformContinuousOn (↿f) (K ×ˢ univ) :=\n  IsCompact.uniformContinuousOn_of_continuous (hK.prod isCompact_univ) (h.mono <| prod_mono hKU Subset.rfl)\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁴ : UniformSpace α\ninst✝³ : UniformSpace β\ninst✝² : LocallyCompactSpace α\ninst✝¹ : CompactSpace β\ninst✝ : UniformSpace γ\nf : α → β → γ\nx : α\nU : Set α\nhxU : U ∈ 𝓝 x\nh : ContinuousOn (↿f) (U ×ˢ univ)\nK : Set α\nhxK : K ∈ 𝓝 x\nhKU : K ⊆ U\nhK : IsCompact K\nthis : UniformContinuousOn (↿f) (K ×ˢ univ)\n⊢ TendstoUniformly f (f x) (𝓝 x)\n[PROOFSTEP]\nexact this.tendstoUniformly hxK\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\nι : Type u_4\nF : ι → β → α\ninst✝ : CompactSpace β\nh : Equicontinuous F\n⊢ UniformEquicontinuous F\n[PROOFSTEP]\nrw [equicontinuous_iff_continuous] at h \n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\nι : Type u_4\nF : ι → β → α\ninst✝ : CompactSpace β\nh : Continuous (↑UniformFun.ofFun ∘ Function.swap F)\n⊢ UniformEquicontinuous F\n[PROOFSTEP]\nrw [uniformEquicontinuous_iff_uniformContinuous]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : UniformSpace α\ninst✝¹ : UniformSpace β\nι : Type u_4\nF : ι → β → α\ninst✝ : CompactSpace β\nh : Continuous (↑UniformFun.ofFun ∘ Function.swap F)\n⊢ UniformContinuous (↑UniformFun.ofFun ∘ Function.swap F)\n[PROOFSTEP]\nexact CompactSpace.uniformContinuous_of_continuous h\n", "meta": {"mathlib_filename": "Mathlib.Topology.UniformSpace.Compact", "llama_tokens": 28659, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7718434978390746, "lm_q2_score": 0.6926419767901475, "lm_q1q2_score": 0.5346112061158785}}
{"text": "[GOAL]\nα : Type u₁\nβ : Type u₂\nγ : Type u₃\nδ : Type u₄\nι : Type u₅\ninst✝¹ : MulZeroClass β\ninst✝ : DecidableEq α\ng₁ g₂ : α →₀ β\n⊢ (g₁ * g₂).support ⊆ g₁.support ∩ g₂.support\n[PROOFSTEP]\nintro a h\n[GOAL]\nα : Type u₁\nβ : Type u₂\nγ : Type u₃\nδ : Type u₄\nι : Type u₅\ninst✝¹ : MulZeroClass β\ninst✝ : DecidableEq α\ng₁ g₂ : α →₀ β\na : α\nh : a ∈ (g₁ * g₂).support\n⊢ a ∈ g₁.support ∩ g₂.support\n[PROOFSTEP]\nsimp only [mul_apply, mem_support_iff] at h \n[GOAL]\nα : Type u₁\nβ : Type u₂\nγ : Type u₃\nδ : Type u₄\nι : Type u₅\ninst✝¹ : MulZeroClass β\ninst✝ : DecidableEq α\ng₁ g₂ : α →₀ β\na : α\nh : ↑g₁ a * ↑g₂ a ≠ 0\n⊢ a ∈ g₁.support ∩ g₂.support\n[PROOFSTEP]\nsimp only [mem_support_iff, mem_inter, Ne.def]\n[GOAL]\nα : Type u₁\nβ : Type u₂\nγ : Type u₃\nδ : Type u₄\nι : Type u₅\ninst✝¹ : MulZeroClass β\ninst✝ : DecidableEq α\ng₁ g₂ : α →₀ β\na : α\nh : ↑g₁ a * ↑g₂ a ≠ 0\n⊢ ¬↑g₁ a = 0 ∧ ¬↑g₂ a = 0\n[PROOFSTEP]\nrw [← not_or]\n[GOAL]\nα : Type u₁\nβ : Type u₂\nγ : Type u₃\nδ : Type u₄\nι : Type u₅\ninst✝¹ : MulZeroClass β\ninst✝ : DecidableEq α\ng₁ g₂ : α →₀ β\na : α\nh : ↑g₁ a * ↑g₂ a ≠ 0\n⊢ ¬(↑g₁ a = 0 ∨ ↑g₂ a = 0)\n[PROOFSTEP]\nintro w\n[GOAL]\nα : Type u₁\nβ : Type u₂\nγ : Type u₃\nδ : Type u₄\nι : Type u₅\ninst✝¹ : MulZeroClass β\ninst✝ : DecidableEq α\ng₁ g₂ : α →₀ β\na : α\nh : ↑g₁ a * ↑g₂ a ≠ 0\nw : ↑g₁ a = 0 ∨ ↑g₂ a = 0\n⊢ False\n[PROOFSTEP]\napply h\n[GOAL]\nα : Type u₁\nβ : Type u₂\nγ : Type u₃\nδ : Type u₄\nι : Type u₅\ninst✝¹ : MulZeroClass β\ninst✝ : DecidableEq α\ng₁ g₂ : α →₀ β\na : α\nh : ↑g₁ a * ↑g₂ a ≠ 0\nw : ↑g₁ a = 0 ∨ ↑g₂ a = 0\n⊢ ↑g₁ a * ↑g₂ a = 0\n[PROOFSTEP]\ncases' w with w w\n[GOAL]\ncase inl\nα : Type u₁\nβ : Type u₂\nγ : Type u₃\nδ : Type u₄\nι : Type u₅\ninst✝¹ : MulZeroClass β\ninst✝ : DecidableEq α\ng₁ g₂ : α →₀ β\na : α\nh : ↑g₁ a * ↑g₂ a ≠ 0\nw : ↑g₁ a = 0\n⊢ ↑g₁ a * ↑g₂ a = 0\n[PROOFSTEP]\nrw [w]\n[GOAL]\ncase inl\nα : Type u₁\nβ : Type u₂\nγ : Type u₃\nδ : Type u₄\nι : Type u₅\ninst✝¹ : MulZeroClass β\ninst✝ : DecidableEq α\ng₁ g₂ : α →₀ β\na : α\nh : ↑g₁ a * ↑g₂ a ≠ 0\nw : ↑g₁ a = 0\n⊢ 0 * ↑g₂ a = 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\nα : Type u₁\nβ : Type u₂\nγ : Type u₃\nδ : Type u₄\nι : Type u₅\ninst✝¹ : MulZeroClass β\ninst✝ : DecidableEq α\ng₁ g₂ : α →₀ β\na : α\nh : ↑g₁ a * ↑g₂ a ≠ 0\nw : ↑g₂ a = 0\n⊢ ↑g₁ a * ↑g₂ a = 0\n[PROOFSTEP]\nrw [w]\n[GOAL]\ncase inr\nα : Type u₁\nβ : Type u₂\nγ : Type u₃\nδ : Type u₄\nι : Type u₅\ninst✝¹ : MulZeroClass β\ninst✝ : DecidableEq α\ng₁ g₂ : α →₀ β\na : α\nh : ↑g₁ a * ↑g₂ a ≠ 0\nw : ↑g₂ a = 0\n⊢ ↑g₁ a * 0 = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u₁\nβ : Type u₂\nγ : Type u₃\nδ : Type u₄\nι : Type u₅\ninst✝ : Semiring β\nf : α → β\ng : α →₀ β\n⊢ Set.Finite (Function.support fun a => f a • ↑g a)\n[PROOFSTEP]\napply Set.Finite.subset g.finite_support\n[GOAL]\nα : Type u₁\nβ : Type u₂\nγ : Type u₃\nδ : Type u₄\nι : Type u₅\ninst✝ : Semiring β\nf : α → β\ng : α →₀ β\n⊢ (Function.support fun a => f a • ↑g a) ⊆ Function.support ↑g\n[PROOFSTEP]\nsimp only [Function.support_subset_iff, Finsupp.mem_support_iff, Ne.def, Finsupp.fun_support_eq, Finset.mem_coe]\n[GOAL]\nα : Type u₁\nβ : Type u₂\nγ : Type u₃\nδ : Type u₄\nι : Type u₅\ninst✝ : Semiring β\nf : α → β\ng : α →₀ β\n⊢ ∀ (x : α), ¬f x • ↑g x = 0 → ¬↑g x = 0\n[PROOFSTEP]\nintro x hx h\n[GOAL]\nα : Type u₁\nβ : Type u₂\nγ : Type u₃\nδ : Type u₄\nι : Type u₅\ninst✝ : Semiring β\nf : α → β\ng : α →₀ β\nx : α\nhx : ¬f x • ↑g x = 0\nh : ↑g x = 0\n⊢ False\n[PROOFSTEP]\napply hx\n[GOAL]\nα : Type u₁\nβ : Type u₂\nγ : Type u₃\nδ : Type u₄\nι : Type u₅\ninst✝ : Semiring β\nf : α → β\ng : α →₀ β\nx : α\nhx : ¬f x • ↑g x = 0\nh : ↑g x = 0\n⊢ f x • ↑g x = 0\n[PROOFSTEP]\nrw [h, smul_zero]\n", "meta": {"mathlib_filename": "Mathlib.Data.Finsupp.Pointwise", "llama_tokens": 1965, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7718434978390747, "lm_q2_score": 0.6926419704455588, "lm_q1q2_score": 0.5346112012188491}}
{"text": "[GOAL]\nι : Type u\ns : Finset ι\nf : ι → ℝ\nn : ℕ\nhf : ∀ (a : ι), a ∈ s → 0 ≤ f a\n⊢ (∑ x in s, f x) ^ (n + 1) / ↑(card s) ^ n ≤ ∑ x in s, f x ^ (n + 1)\n[PROOFSTEP]\nrcases s.eq_empty_or_nonempty with (rfl | hs)\n[GOAL]\ncase inl\nι : Type u\nf : ι → ℝ\nn : ℕ\nhf : ∀ (a : ι), a ∈ ∅ → 0 ≤ f a\n⊢ (∑ x in ∅, f x) ^ (n + 1) / ↑(card ∅) ^ n ≤ ∑ x in ∅, f x ^ (n + 1)\n[PROOFSTEP]\nsimp_rw [Finset.sum_empty, zero_pow' _ (Nat.succ_ne_zero n), zero_div]\n[GOAL]\ncase inl\nι : Type u\nf : ι → ℝ\nn : ℕ\nhf : ∀ (a : ι), a ∈ ∅ → 0 ≤ f a\n⊢ 0 ≤ 0\n[PROOFSTEP]\nrfl\n[GOAL]\ncase inr\nι : Type u\ns : Finset ι\nf : ι → ℝ\nn : ℕ\nhf : ∀ (a : ι), a ∈ s → 0 ≤ f a\nhs : Finset.Nonempty s\n⊢ (∑ x in s, f x) ^ (n + 1) / ↑(card s) ^ n ≤ ∑ x in s, f x ^ (n + 1)\n[PROOFSTEP]\nhave hs0 : 0 < (s.card : ℝ) := Nat.cast_pos.2 hs.card_pos\n[GOAL]\ncase inr\nι : Type u\ns : Finset ι\nf : ι → ℝ\nn : ℕ\nhf : ∀ (a : ι), a ∈ s → 0 ≤ f a\nhs : Finset.Nonempty s\nhs0 : 0 < ↑(card s)\n⊢ (∑ x in s, f x) ^ (n + 1) / ↑(card s) ^ n ≤ ∑ x in s, f x ^ (n + 1)\n[PROOFSTEP]\nsuffices (∑ x in s, f x / s.card) ^ (n + 1) ≤ ∑ x in s, f x ^ (n + 1) / s.card by\n  rwa [← Finset.sum_div, ← Finset.sum_div, div_pow, pow_succ' (s.card : ℝ), ← div_div, div_le_iff hs0, div_mul,\n    div_self hs0.ne', div_one] at this \n[GOAL]\nι : Type u\ns : Finset ι\nf : ι → ℝ\nn : ℕ\nhf : ∀ (a : ι), a ∈ s → 0 ≤ f a\nhs : Finset.Nonempty s\nhs0 : 0 < ↑(card s)\nthis : (∑ x in s, f x / ↑(card s)) ^ (n + 1) ≤ ∑ x in s, f x ^ (n + 1) / ↑(card s)\n⊢ (∑ x in s, f x) ^ (n + 1) / ↑(card s) ^ n ≤ ∑ x in s, f x ^ (n + 1)\n[PROOFSTEP]\nrwa [← Finset.sum_div, ← Finset.sum_div, div_pow, pow_succ' (s.card : ℝ), ← div_div, div_le_iff hs0, div_mul,\n  div_self hs0.ne', div_one] at this \n[GOAL]\ncase inr\nι : Type u\ns : Finset ι\nf : ι → ℝ\nn : ℕ\nhf : ∀ (a : ι), a ∈ s → 0 ≤ f a\nhs : Finset.Nonempty s\nhs0 : 0 < ↑(card s)\n⊢ (∑ x in s, f x / ↑(card s)) ^ (n + 1) ≤ ∑ x in s, f x ^ (n + 1) / ↑(card s)\n[PROOFSTEP]\nhave :=\n  @ConvexOn.map_sum_le ℝ ℝ ℝ ι _ _ _ _ _ _ (Set.Ici 0) (fun x => x ^ (n + 1)) s (fun _ => 1 / s.card) ((↑) ∘ f)\n    (convexOn_pow (n + 1)) ?_ ?_ fun i hi => Set.mem_Ici.2 (hf i hi)\n[GOAL]\ncase inr.refine_3\nι : Type u\ns : Finset ι\nf : ι → ℝ\nn : ℕ\nhf : ∀ (a : ι), a ∈ s → 0 ≤ f a\nhs : Finset.Nonempty s\nhs0 : 0 < ↑(card s)\nthis :\n  (fun x => x ^ (n + 1)) (∑ i in s, (fun x => 1 / ↑(card s)) i • ((fun x => x) ∘ f) i) ≤\n    ∑ i in s, (fun x => 1 / ↑(card s)) i • (fun x => x ^ (n + 1)) (((fun x => x) ∘ f) i)\n⊢ (∑ x in s, f x / ↑(card s)) ^ (n + 1) ≤ ∑ x in s, f x ^ (n + 1) / ↑(card s)\n[PROOFSTEP]\nsimpa only [inv_mul_eq_div, one_div, Algebra.id.smul_eq_mul] using this\n[GOAL]\ncase inr.refine_1\nι : Type u\ns : Finset ι\nf : ι → ℝ\nn : ℕ\nhf : ∀ (a : ι), a ∈ s → 0 ≤ f a\nhs : Finset.Nonempty s\nhs0 : 0 < ↑(card s)\n⊢ ∀ (i : ι), i ∈ s → 0 ≤ (fun x => 1 / ↑(card s)) i\n[PROOFSTEP]\nsimp only [one_div, inv_nonneg, Nat.cast_nonneg, imp_true_iff]\n[GOAL]\ncase inr.refine_2\nι : Type u\ns : Finset ι\nf : ι → ℝ\nn : ℕ\nhf : ∀ (a : ι), a ∈ s → 0 ≤ f a\nhs : Finset.Nonempty s\nhs0 : 0 < ↑(card s)\n⊢ ∑ i in s, (fun x => 1 / ↑(card s)) i = 1\n[PROOFSTEP]\nsimpa only [one_div, Finset.sum_const, nsmul_eq_mul] using mul_inv_cancel hs0.ne'\n[GOAL]\nι : Type u\ns : Finset ι\nw z : ι → ℝ\nhw : ∀ (i : ι), i ∈ s → 0 ≤ w i\nhw' : ∑ i in s, w i = 1\nhz : ∀ (i : ι), i ∈ s → 0 ≤ z i\np : ℝ\nhp : 1 ≤ p\n⊢ ∑ i in s, w i * z i ≤ (∑ i in s, w i * z i ^ p) ^ (1 / p)\n[PROOFSTEP]\nhave : 0 < p := by positivity\n[GOAL]\nι : Type u\ns : Finset ι\nw z : ι → ℝ\nhw : ∀ (i : ι), i ∈ s → 0 ≤ w i\nhw' : ∑ i in s, w i = 1\nhz : ∀ (i : ι), i ∈ s → 0 ≤ z i\np : ℝ\nhp : 1 ≤ p\n⊢ 0 < p\n[PROOFSTEP]\npositivity\n[GOAL]\nι : Type u\ns : Finset ι\nw z : ι → ℝ\nhw : ∀ (i : ι), i ∈ s → 0 ≤ w i\nhw' : ∑ i in s, w i = 1\nhz : ∀ (i : ι), i ∈ s → 0 ≤ z i\np : ℝ\nhp : 1 ≤ p\nthis : 0 < p\n⊢ ∑ i in s, w i * z i ≤ (∑ i in s, w i * z i ^ p) ^ (1 / p)\n[PROOFSTEP]\nrw [← rpow_le_rpow_iff _ _ this, ← rpow_mul, one_div_mul_cancel (ne_of_gt this), rpow_one]\n[GOAL]\nι : Type u\ns : Finset ι\nw z : ι → ℝ\nhw : ∀ (i : ι), i ∈ s → 0 ≤ w i\nhw' : ∑ i in s, w i = 1\nhz : ∀ (i : ι), i ∈ s → 0 ≤ z i\np : ℝ\nhp : 1 ≤ p\nthis : 0 < p\n⊢ (∑ i in s, w i * z i) ^ p ≤ ∑ i in s, w i * z i ^ p\ncase hx\nι : Type u\ns : Finset ι\nw z : ι → ℝ\nhw : ∀ (i : ι), i ∈ s → 0 ≤ w i\nhw' : ∑ i in s, w i = 1\nhz : ∀ (i : ι), i ∈ s → 0 ≤ z i\np : ℝ\nhp : 1 ≤ p\nthis : 0 < p\n⊢ 0 ≤ ∑ i in s, w i * z i ^ p\nι : Type u\ns : Finset ι\nw z : ι → ℝ\nhw : ∀ (i : ι), i ∈ s → 0 ≤ w i\nhw' : ∑ i in s, w i = 1\nhz : ∀ (i : ι), i ∈ s → 0 ≤ z i\np : ℝ\nhp : 1 ≤ p\nthis : 0 < p\n⊢ 0 ≤ ∑ i in s, w i * z i\nι : Type u\ns : Finset ι\nw z : ι → ℝ\nhw : ∀ (i : ι), i ∈ s → 0 ≤ w i\nhw' : ∑ i in s, w i = 1\nhz : ∀ (i : ι), i ∈ s → 0 ≤ z i\np : ℝ\nhp : 1 ≤ p\nthis : 0 < p\n⊢ 0 ≤ (∑ i in s, w i * z i ^ p) ^ (1 / p)\n[PROOFSTEP]\nexact rpow_arith_mean_le_arith_mean_rpow s w z hw hw' hz hp\n[GOAL]\ncase hx\nι : Type u\ns : Finset ι\nw z : ι → ℝ\nhw : ∀ (i : ι), i ∈ s → 0 ≤ w i\nhw' : ∑ i in s, w i = 1\nhz : ∀ (i : ι), i ∈ s → 0 ≤ z i\np : ℝ\nhp : 1 ≤ p\nthis : 0 < p\n⊢ 0 ≤ ∑ i in s, w i * z i ^ p\nι : Type u\ns : Finset ι\nw z : ι → ℝ\nhw : ∀ (i : ι), i ∈ s → 0 ≤ w i\nhw' : ∑ i in s, w i = 1\nhz : ∀ (i : ι), i ∈ s → 0 ≤ z i\np : ℝ\nhp : 1 ≤ p\nthis : 0 < p\n⊢ 0 ≤ ∑ i in s, w i * z i\nι : Type u\ns : Finset ι\nw z : ι → ℝ\nhw : ∀ (i : ι), i ∈ s → 0 ≤ w i\nhw' : ∑ i in s, w i = 1\nhz : ∀ (i : ι), i ∈ s → 0 ≤ z i\np : ℝ\nhp : 1 ≤ p\nthis : 0 < p\n⊢ 0 ≤ (∑ i in s, w i * z i ^ p) ^ (1 / p)\n[PROOFSTEP]\nall_goals\n  apply_rules [sum_nonneg, rpow_nonneg_of_nonneg]\n  intro i hi\n  apply_rules [mul_nonneg, rpow_nonneg_of_nonneg, hw i hi, hz i hi]\n[GOAL]\ncase hx\nι : Type u\ns : Finset ι\nw z : ι → ℝ\nhw : ∀ (i : ι), i ∈ s → 0 ≤ w i\nhw' : ∑ i in s, w i = 1\nhz : ∀ (i : ι), i ∈ s → 0 ≤ z i\np : ℝ\nhp : 1 ≤ p\nthis : 0 < p\n⊢ 0 ≤ ∑ i in s, w i * z i ^ p\n[PROOFSTEP]\napply_rules [sum_nonneg, rpow_nonneg_of_nonneg]\n[GOAL]\ncase hx\nι : Type u\ns : Finset ι\nw z : ι → ℝ\nhw : ∀ (i : ι), i ∈ s → 0 ≤ w i\nhw' : ∑ i in s, w i = 1\nhz : ∀ (i : ι), i ∈ s → 0 ≤ z i\np : ℝ\nhp : 1 ≤ p\nthis : 0 < p\nhw'_symm : 1 = ∑ i in s, w i\n⊢ ∀ (i : ι), i ∈ s → 0 ≤ w i * z i ^ p\n[PROOFSTEP]\nintro i hi\n[GOAL]\ncase hx\nι : Type u\ns : Finset ι\nw z : ι → ℝ\nhw : ∀ (i : ι), i ∈ s → 0 ≤ w i\nhw' : ∑ i in s, w i = 1\nhz : ∀ (i : ι), i ∈ s → 0 ≤ z i\np : ℝ\nhp : 1 ≤ p\nthis : 0 < p\nhw'_symm : 1 = ∑ i in s, w i\ni : ι\nhi : i ∈ s\n⊢ 0 ≤ w i * z i ^ p\n[PROOFSTEP]\napply_rules [mul_nonneg, rpow_nonneg_of_nonneg, hw i hi, hz i hi]\n[GOAL]\nι : Type u\ns : Finset ι\nw z : ι → ℝ\nhw : ∀ (i : ι), i ∈ s → 0 ≤ w i\nhw' : ∑ i in s, w i = 1\nhz : ∀ (i : ι), i ∈ s → 0 ≤ z i\np : ℝ\nhp : 1 ≤ p\nthis : 0 < p\n⊢ 0 ≤ ∑ i in s, w i * z i\n[PROOFSTEP]\napply_rules [sum_nonneg, rpow_nonneg_of_nonneg]\n[GOAL]\nι : Type u\ns : Finset ι\nw z : ι → ℝ\nhw : ∀ (i : ι), i ∈ s → 0 ≤ w i\nhw' : ∑ i in s, w i = 1\nhz : ∀ (i : ι), i ∈ s → 0 ≤ z i\np : ℝ\nhp : 1 ≤ p\nthis : 0 < p\nhw'_symm : 1 = ∑ i in s, w i\n⊢ ∀ (i : ι), i ∈ s → 0 ≤ w i * z i\n[PROOFSTEP]\nintro i hi\n[GOAL]\nι : Type u\ns : Finset ι\nw z : ι → ℝ\nhw : ∀ (i : ι), i ∈ s → 0 ≤ w i\nhw' : ∑ i in s, w i = 1\nhz : ∀ (i : ι), i ∈ s → 0 ≤ z i\np : ℝ\nhp : 1 ≤ p\nthis : 0 < p\nhw'_symm : 1 = ∑ i in s, w i\ni : ι\nhi : i ∈ s\n⊢ 0 ≤ w i * z i\n[PROOFSTEP]\napply_rules [mul_nonneg, rpow_nonneg_of_nonneg, hw i hi, hz i hi]\n[GOAL]\nι : Type u\ns : Finset ι\nw z : ι → ℝ\nhw : ∀ (i : ι), i ∈ s → 0 ≤ w i\nhw' : ∑ i in s, w i = 1\nhz : ∀ (i : ι), i ∈ s → 0 ≤ z i\np : ℝ\nhp : 1 ≤ p\nthis : 0 < p\n⊢ 0 ≤ (∑ i in s, w i * z i ^ p) ^ (1 / p)\n[PROOFSTEP]\napply_rules [sum_nonneg, rpow_nonneg_of_nonneg]\n[GOAL]\ncase hx\nι : Type u\ns : Finset ι\nw z : ι → ℝ\nhw : ∀ (i : ι), i ∈ s → 0 ≤ w i\nhw' : ∑ i in s, w i = 1\nhz : ∀ (i : ι), i ∈ s → 0 ≤ z i\np : ℝ\nhp : 1 ≤ p\nthis : 0 < p\nhw'_symm : 1 = ∑ i in s, w i\n⊢ ∀ (i : ι), i ∈ s → 0 ≤ w i * z i ^ p\n[PROOFSTEP]\nintro i hi\n[GOAL]\ncase hx\nι : Type u\ns : Finset ι\nw z : ι → ℝ\nhw : ∀ (i : ι), i ∈ s → 0 ≤ w i\nhw' : ∑ i in s, w i = 1\nhz : ∀ (i : ι), i ∈ s → 0 ≤ z i\np : ℝ\nhp : 1 ≤ p\nthis : 0 < p\nhw'_symm : 1 = ∑ i in s, w i\ni : ι\nhi : i ∈ s\n⊢ 0 ≤ w i * z i ^ p\n[PROOFSTEP]\napply_rules [mul_nonneg, rpow_nonneg_of_nonneg, hw i hi, hz i hi]\n[GOAL]\nι : Type u\ns : Finset ι\nw z : ι → ℝ≥0\nhw' : ∑ i in s, w i = 1\nn : ℕ\n⊢ (∑ i in s, w i * z i) ^ n ≤ ∑ i in s, w i * z i ^ n\n[PROOFSTEP]\nexact_mod_cast\n  Real.pow_arith_mean_le_arith_mean_pow s _ _ (fun i _ => (w i).coe_nonneg) (by exact_mod_cast hw')\n    (fun i _ => (z i).coe_nonneg) n\n[GOAL]\nι : Type u\ns : Finset ι\nw z : ι → ℝ≥0\nhw' : ∑ i in s, w i = 1\nn : ℕ\n⊢ ∑ i in s, ↑(w i) = 1\n[PROOFSTEP]\nexact_mod_cast hw'\n[GOAL]\nι : Type u\ns : Finset ι\nf : ι → ℝ≥0\nn : ℕ\n⊢ ↑((∑ x in s, f x) ^ (n + 1)) / ↑(card s) ^ n ≤ ↑(∑ x in s, f x ^ (n + 1))\n[PROOFSTEP]\nsimpa only [← NNReal.coe_le_coe, NNReal.coe_sum, Nonneg.coe_div, NNReal.coe_pow] using\n  @Real.pow_sum_div_card_le_sum_pow ι s (((↑) : ℝ≥0 → ℝ) ∘ f) n fun _ _ => NNReal.coe_nonneg _\n[GOAL]\nι : Type u\ns : Finset ι\nw z : ι → ℝ≥0\nhw' : ∑ i in s, w i = 1\np : ℝ\nhp : 1 ≤ p\n⊢ (∑ i in s, w i * z i) ^ p ≤ ∑ i in s, w i * z i ^ p\n[PROOFSTEP]\nexact_mod_cast\n  Real.rpow_arith_mean_le_arith_mean_rpow s _ _ (fun i _ => (w i).coe_nonneg) (by exact_mod_cast hw')\n    (fun i _ => (z i).coe_nonneg) hp\n[GOAL]\nι : Type u\ns : Finset ι\nw z : ι → ℝ≥0\nhw' : ∑ i in s, w i = 1\np : ℝ\nhp : 1 ≤ p\n⊢ ∑ i in s, ↑(w i) = 1\n[PROOFSTEP]\nexact_mod_cast hw'\n[GOAL]\nι : Type u\ns : Finset ι\nw₁ w₂ z₁ z₂ : ℝ≥0\nhw' : w₁ + w₂ = 1\np : ℝ\nhp : 1 ≤ p\n⊢ (w₁ * z₁ + w₂ * z₂) ^ p ≤ w₁ * z₁ ^ p + w₂ * z₂ ^ p\n[PROOFSTEP]\nhave h := rpow_arith_mean_le_arith_mean_rpow univ ![w₁, w₂] ![z₁, z₂] ?_ hp\n[GOAL]\ncase refine_2\nι : Type u\ns : Finset ι\nw₁ w₂ z₁ z₂ : ℝ≥0\nhw' : w₁ + w₂ = 1\np : ℝ\nhp : 1 ≤ p\nh :\n  (∑ i : Fin (Nat.succ (Nat.succ 0)), Matrix.vecCons w₁ ![w₂] i * Matrix.vecCons z₁ ![z₂] i) ^ p ≤\n    ∑ i : Fin (Nat.succ (Nat.succ 0)), Matrix.vecCons w₁ ![w₂] i * Matrix.vecCons z₁ ![z₂] i ^ p\n⊢ (w₁ * z₁ + w₂ * z₂) ^ p ≤ w₁ * z₁ ^ p + w₂ * z₂ ^ p\n[PROOFSTEP]\nsimpa [Fin.sum_univ_succ] using h\n[GOAL]\ncase refine_1\nι : Type u\ns : Finset ι\nw₁ w₂ z₁ z₂ : ℝ≥0\nhw' : w₁ + w₂ = 1\np : ℝ\nhp : 1 ≤ p\n⊢ ∑ i : Fin (Nat.succ (Nat.succ 0)), Matrix.vecCons w₁ ![w₂] i = 1\n[PROOFSTEP]\nsimp [hw', Fin.sum_univ_succ]\n[GOAL]\nι : Type u\ns : Finset ι\nz₁ z₂ : ℝ≥0\np : ℝ\nhp : 1 ≤ p\n⊢ (z₁ + z₂) ^ p ≤ 2 ^ (p - 1) * (z₁ ^ p + z₂ ^ p)\n[PROOFSTEP]\nrcases eq_or_lt_of_le hp with (rfl | h'p)\n[GOAL]\ncase inl\nι : Type u\ns : Finset ι\nz₁ z₂ : ℝ≥0\nhp : 1 ≤ 1\n⊢ (z₁ + z₂) ^ 1 ≤ 2 ^ (1 - 1) * (z₁ ^ 1 + z₂ ^ 1)\n[PROOFSTEP]\nsimp only [rpow_one, sub_self, rpow_zero, one_mul]\n[GOAL]\ncase inl\nι : Type u\ns : Finset ι\nz₁ z₂ : ℝ≥0\nhp : 1 ≤ 1\n⊢ z₁ + z₂ ≤ z₁ + z₂\n[PROOFSTEP]\nrfl\n[GOAL]\ncase inr\nι : Type u\ns : Finset ι\nz₁ z₂ : ℝ≥0\np : ℝ\nhp : 1 ≤ p\nh'p : 1 < p\n⊢ (z₁ + z₂) ^ p ≤ 2 ^ (p - 1) * (z₁ ^ p + z₂ ^ p)\n[PROOFSTEP]\nconvert rpow_arith_mean_le_arith_mean2_rpow (1 / 2) (1 / 2) (2 * z₁) (2 * z₂) (add_halves 1) hp using 1\n[GOAL]\ncase h.e'_3\nι : Type u\ns : Finset ι\nz₁ z₂ : ℝ≥0\np : ℝ\nhp : 1 ≤ p\nh'p : 1 < p\n⊢ (z₁ + z₂) ^ p = (1 / 2 * (2 * z₁) + 1 / 2 * (2 * z₂)) ^ p\n[PROOFSTEP]\nsimp only [one_div, inv_mul_cancel_left₀, Ne.def, mul_eq_zero, two_ne_zero, one_ne_zero, not_false_iff]\n[GOAL]\ncase h.e'_4\nι : Type u\ns : Finset ι\nz₁ z₂ : ℝ≥0\np : ℝ\nhp : 1 ≤ p\nh'p : 1 < p\n⊢ 2 ^ (p - 1) * (z₁ ^ p + z₂ ^ p) = 1 / 2 * (2 * z₁) ^ p + 1 / 2 * (2 * z₂) ^ p\n[PROOFSTEP]\nhave A : p - 1 ≠ 0 := ne_of_gt (sub_pos.2 h'p)\n[GOAL]\ncase h.e'_4\nι : Type u\ns : Finset ι\nz₁ z₂ : ℝ≥0\np : ℝ\nhp : 1 ≤ p\nh'p : 1 < p\nA : p - 1 ≠ 0\n⊢ 2 ^ (p - 1) * (z₁ ^ p + z₂ ^ p) = 1 / 2 * (2 * z₁) ^ p + 1 / 2 * (2 * z₂) ^ p\n[PROOFSTEP]\nsimp only [mul_rpow, rpow_sub' _ A, div_eq_inv_mul, rpow_one, mul_one]\n[GOAL]\ncase h.e'_4\nι : Type u\ns : Finset ι\nz₁ z₂ : ℝ≥0\np : ℝ\nhp : 1 ≤ p\nh'p : 1 < p\nA : p - 1 ≠ 0\n⊢ 2⁻¹ * 2 ^ p * (z₁ ^ p + z₂ ^ p) = 2⁻¹ * (2 ^ p * z₁ ^ p) + 2⁻¹ * (2 ^ p * z₂ ^ p)\n[PROOFSTEP]\nring\n[GOAL]\nι : Type u\ns : Finset ι\nw z : ι → ℝ≥0\nhw' : ∑ i in s, w i = 1\np : ℝ\nhp : 1 ≤ p\n⊢ ∑ i in s, w i * z i ≤ (∑ i in s, w i * z i ^ p) ^ (1 / p)\n[PROOFSTEP]\nexact_mod_cast\n  Real.arith_mean_le_rpow_mean s _ _ (fun i _ => (w i).coe_nonneg) (by exact_mod_cast hw') (fun i _ => (z i).coe_nonneg)\n    hp\n[GOAL]\nι : Type u\ns : Finset ι\nw z : ι → ℝ≥0\nhw' : ∑ i in s, w i = 1\np : ℝ\nhp : 1 ≤ p\n⊢ ∑ i in s, ↑(w i) = 1\n[PROOFSTEP]\nexact_mod_cast hw'\n[GOAL]\nι : Type u\ns : Finset ι\np : ℝ\na b : ℝ≥0\nhab : a + b ≤ 1\nhp1 : 1 ≤ p\n⊢ a ^ p + b ^ p ≤ 1\n[PROOFSTEP]\nhave h_le_one : ∀ x : ℝ≥0, x ≤ 1 → x ^ p ≤ x := fun x hx => rpow_le_self_of_le_one hx hp1\n[GOAL]\nι : Type u\ns : Finset ι\np : ℝ\na b : ℝ≥0\nhab : a + b ≤ 1\nhp1 : 1 ≤ p\nh_le_one : ∀ (x : ℝ≥0), x ≤ 1 → x ^ p ≤ x\n⊢ a ^ p + b ^ p ≤ 1\n[PROOFSTEP]\nhave ha : a ≤ 1 := (self_le_add_right a b).trans hab\n[GOAL]\nι : Type u\ns : Finset ι\np : ℝ\na b : ℝ≥0\nhab : a + b ≤ 1\nhp1 : 1 ≤ p\nh_le_one : ∀ (x : ℝ≥0), x ≤ 1 → x ^ p ≤ x\nha : a ≤ 1\n⊢ a ^ p + b ^ p ≤ 1\n[PROOFSTEP]\nhave hb : b ≤ 1 := (self_le_add_left b a).trans hab\n[GOAL]\nι : Type u\ns : Finset ι\np : ℝ\na b : ℝ≥0\nhab : a + b ≤ 1\nhp1 : 1 ≤ p\nh_le_one : ∀ (x : ℝ≥0), x ≤ 1 → x ^ p ≤ x\nha : a ≤ 1\nhb : b ≤ 1\n⊢ a ^ p + b ^ p ≤ 1\n[PROOFSTEP]\nexact (add_le_add (h_le_one a ha) (h_le_one b hb)).trans hab\n[GOAL]\nι : Type u\ns : Finset ι\np : ℝ\na b : ℝ≥0\nhp1 : 1 ≤ p\n⊢ a ^ p + b ^ p ≤ (a + b) ^ p\n[PROOFSTEP]\nhave hp_pos : 0 < p := by positivity\n[GOAL]\nι : Type u\ns : Finset ι\np : ℝ\na b : ℝ≥0\nhp1 : 1 ≤ p\n⊢ 0 < p\n[PROOFSTEP]\npositivity\n[GOAL]\nι : Type u\ns : Finset ι\np : ℝ\na b : ℝ≥0\nhp1 : 1 ≤ p\nhp_pos : 0 < p\n⊢ a ^ p + b ^ p ≤ (a + b) ^ p\n[PROOFSTEP]\nby_cases h_zero : a + b = 0\n[GOAL]\ncase pos\nι : Type u\ns : Finset ι\np : ℝ\na b : ℝ≥0\nhp1 : 1 ≤ p\nhp_pos : 0 < p\nh_zero : a + b = 0\n⊢ a ^ p + b ^ p ≤ (a + b) ^ p\n[PROOFSTEP]\nsimp [add_eq_zero_iff.mp h_zero, hp_pos.ne']\n[GOAL]\ncase neg\nι : Type u\ns : Finset ι\np : ℝ\na b : ℝ≥0\nhp1 : 1 ≤ p\nhp_pos : 0 < p\nh_zero : ¬a + b = 0\n⊢ a ^ p + b ^ p ≤ (a + b) ^ p\n[PROOFSTEP]\nhave h_nonzero : ¬(a = 0 ∧ b = 0) := by rwa [add_eq_zero_iff] at h_zero \n[GOAL]\nι : Type u\ns : Finset ι\np : ℝ\na b : ℝ≥0\nhp1 : 1 ≤ p\nhp_pos : 0 < p\nh_zero : ¬a + b = 0\n⊢ ¬(a = 0 ∧ b = 0)\n[PROOFSTEP]\nrwa [add_eq_zero_iff] at h_zero \n[GOAL]\ncase neg\nι : Type u\ns : Finset ι\np : ℝ\na b : ℝ≥0\nhp1 : 1 ≤ p\nhp_pos : 0 < p\nh_zero : ¬a + b = 0\nh_nonzero : ¬(a = 0 ∧ b = 0)\n⊢ a ^ p + b ^ p ≤ (a + b) ^ p\n[PROOFSTEP]\nhave h_add : a / (a + b) + b / (a + b) = 1 := by rw [div_add_div_same, div_self h_zero]\n[GOAL]\nι : Type u\ns : Finset ι\np : ℝ\na b : ℝ≥0\nhp1 : 1 ≤ p\nhp_pos : 0 < p\nh_zero : ¬a + b = 0\nh_nonzero : ¬(a = 0 ∧ b = 0)\n⊢ a / (a + b) + b / (a + b) = 1\n[PROOFSTEP]\nrw [div_add_div_same, div_self h_zero]\n[GOAL]\ncase neg\nι : Type u\ns : Finset ι\np : ℝ\na b : ℝ≥0\nhp1 : 1 ≤ p\nhp_pos : 0 < p\nh_zero : ¬a + b = 0\nh_nonzero : ¬(a = 0 ∧ b = 0)\nh_add : a / (a + b) + b / (a + b) = 1\n⊢ a ^ p + b ^ p ≤ (a + b) ^ p\n[PROOFSTEP]\nhave h := add_rpow_le_one_of_add_le_one (a / (a + b)) (b / (a + b)) h_add.le hp1\n[GOAL]\ncase neg\nι : Type u\ns : Finset ι\np : ℝ\na b : ℝ≥0\nhp1 : 1 ≤ p\nhp_pos : 0 < p\nh_zero : ¬a + b = 0\nh_nonzero : ¬(a = 0 ∧ b = 0)\nh_add : a / (a + b) + b / (a + b) = 1\nh : (a / (a + b)) ^ p + (b / (a + b)) ^ p ≤ 1\n⊢ a ^ p + b ^ p ≤ (a + b) ^ p\n[PROOFSTEP]\nrw [div_rpow a (a + b), div_rpow b (a + b)] at h \n[GOAL]\ncase neg\nι : Type u\ns : Finset ι\np : ℝ\na b : ℝ≥0\nhp1 : 1 ≤ p\nhp_pos : 0 < p\nh_zero : ¬a + b = 0\nh_nonzero : ¬(a = 0 ∧ b = 0)\nh_add : a / (a + b) + b / (a + b) = 1\nh : a ^ p / (a + b) ^ p + b ^ p / (a + b) ^ p ≤ 1\n⊢ a ^ p + b ^ p ≤ (a + b) ^ p\n[PROOFSTEP]\nhave hab_0 : (a + b) ^ p ≠ 0 := by simp [hp_pos, h_nonzero]\n[GOAL]\nι : Type u\ns : Finset ι\np : ℝ\na b : ℝ≥0\nhp1 : 1 ≤ p\nhp_pos : 0 < p\nh_zero : ¬a + b = 0\nh_nonzero : ¬(a = 0 ∧ b = 0)\nh_add : a / (a + b) + b / (a + b) = 1\nh : a ^ p / (a + b) ^ p + b ^ p / (a + b) ^ p ≤ 1\n⊢ (a + b) ^ p ≠ 0\n[PROOFSTEP]\nsimp [hp_pos, h_nonzero]\n[GOAL]\ncase neg\nι : Type u\ns : Finset ι\np : ℝ\na b : ℝ≥0\nhp1 : 1 ≤ p\nhp_pos : 0 < p\nh_zero : ¬a + b = 0\nh_nonzero : ¬(a = 0 ∧ b = 0)\nh_add : a / (a + b) + b / (a + b) = 1\nh : a ^ p / (a + b) ^ p + b ^ p / (a + b) ^ p ≤ 1\nhab_0 : (a + b) ^ p ≠ 0\n⊢ a ^ p + b ^ p ≤ (a + b) ^ p\n[PROOFSTEP]\nhave hab_0' : 0 < (a + b) ^ p := zero_lt_iff.mpr hab_0\n[GOAL]\ncase neg\nι : Type u\ns : Finset ι\np : ℝ\na b : ℝ≥0\nhp1 : 1 ≤ p\nhp_pos : 0 < p\nh_zero : ¬a + b = 0\nh_nonzero : ¬(a = 0 ∧ b = 0)\nh_add : a / (a + b) + b / (a + b) = 1\nh : a ^ p / (a + b) ^ p + b ^ p / (a + b) ^ p ≤ 1\nhab_0 : (a + b) ^ p ≠ 0\nhab_0' : 0 < (a + b) ^ p\n⊢ a ^ p + b ^ p ≤ (a + b) ^ p\n[PROOFSTEP]\nhave h_mul : (a + b) ^ p * (a ^ p / (a + b) ^ p + b ^ p / (a + b) ^ p) ≤ (a + b) ^ p :=\n  by\n  nth_rw 4 [← mul_one ((a + b) ^ p)]\n  exact (mul_le_mul_left hab_0').mpr h\n[GOAL]\nι : Type u\ns : Finset ι\np : ℝ\na b : ℝ≥0\nhp1 : 1 ≤ p\nhp_pos : 0 < p\nh_zero : ¬a + b = 0\nh_nonzero : ¬(a = 0 ∧ b = 0)\nh_add : a / (a + b) + b / (a + b) = 1\nh : a ^ p / (a + b) ^ p + b ^ p / (a + b) ^ p ≤ 1\nhab_0 : (a + b) ^ p ≠ 0\nhab_0' : 0 < (a + b) ^ p\n⊢ (a + b) ^ p * (a ^ p / (a + b) ^ p + b ^ p / (a + b) ^ p) ≤ (a + b) ^ p\n[PROOFSTEP]\nnth_rw 4 [← mul_one ((a + b) ^ p)]\n[GOAL]\nι : Type u\ns : Finset ι\np : ℝ\na b : ℝ≥0\nhp1 : 1 ≤ p\nhp_pos : 0 < p\nh_zero : ¬a + b = 0\nh_nonzero : ¬(a = 0 ∧ b = 0)\nh_add : a / (a + b) + b / (a + b) = 1\nh : a ^ p / (a + b) ^ p + b ^ p / (a + b) ^ p ≤ 1\nhab_0 : (a + b) ^ p ≠ 0\nhab_0' : 0 < (a + b) ^ p\n⊢ (a + b) ^ p * (a ^ p / (a + b) ^ p + b ^ p / (a + b) ^ p) ≤ (a + b) ^ p * 1\n[PROOFSTEP]\nexact (mul_le_mul_left hab_0').mpr h\n[GOAL]\ncase neg\nι : Type u\ns : Finset ι\np : ℝ\na b : ℝ≥0\nhp1 : 1 ≤ p\nhp_pos : 0 < p\nh_zero : ¬a + b = 0\nh_nonzero : ¬(a = 0 ∧ b = 0)\nh_add : a / (a + b) + b / (a + b) = 1\nh : a ^ p / (a + b) ^ p + b ^ p / (a + b) ^ p ≤ 1\nhab_0 : (a + b) ^ p ≠ 0\nhab_0' : 0 < (a + b) ^ p\nh_mul : (a + b) ^ p * (a ^ p / (a + b) ^ p + b ^ p / (a + b) ^ p) ≤ (a + b) ^ p\n⊢ a ^ p + b ^ p ≤ (a + b) ^ p\n[PROOFSTEP]\nrwa [div_eq_mul_inv, div_eq_mul_inv, mul_add, mul_comm (a ^ p), mul_comm (b ^ p), ← mul_assoc, ← mul_assoc,\n  mul_inv_cancel hab_0, one_mul, one_mul] at h_mul \n[GOAL]\nι : Type u\ns : Finset ι\np : ℝ\na b : ℝ≥0\nhp1 : 1 ≤ p\n⊢ (a ^ p + b ^ p) ^ (1 / p) ≤ a + b\n[PROOFSTEP]\nrw [← @NNReal.le_rpow_one_div_iff _ _ (1 / p) (by simp [lt_of_lt_of_le zero_lt_one hp1])]\n[GOAL]\nι : Type u\ns : Finset ι\np : ℝ\na b : ℝ≥0\nhp1 : 1 ≤ p\n⊢ 0 < 1 / p\n[PROOFSTEP]\nsimp [lt_of_lt_of_le zero_lt_one hp1]\n[GOAL]\nι : Type u\ns : Finset ι\np : ℝ\na b : ℝ≥0\nhp1 : 1 ≤ p\n⊢ a ^ p + b ^ p ≤ (a + b) ^ (1 / (1 / p))\n[PROOFSTEP]\nrw [one_div_one_div]\n[GOAL]\nι : Type u\ns : Finset ι\np : ℝ\na b : ℝ≥0\nhp1 : 1 ≤ p\n⊢ a ^ p + b ^ p ≤ (a + b) ^ p\n[PROOFSTEP]\nexact add_rpow_le_rpow_add _ _ hp1\n[GOAL]\nι : Type u\ns : Finset ι\np q : ℝ\na b : ℝ≥0\nhp_pos : 0 < p\nhpq : p ≤ q\n⊢ (a ^ q + b ^ q) ^ (1 / q) ≤ (a ^ p + b ^ p) ^ (1 / p)\n[PROOFSTEP]\nhave h_rpow : ∀ a : ℝ≥0, a ^ q = (a ^ p) ^ (q / p) := fun a => by\n  rw [← NNReal.rpow_mul, div_eq_inv_mul, ← mul_assoc, _root_.mul_inv_cancel hp_pos.ne.symm, one_mul]\n[GOAL]\nι : Type u\ns : Finset ι\np q : ℝ\na✝ b : ℝ≥0\nhp_pos : 0 < p\nhpq : p ≤ q\na : ℝ≥0\n⊢ a ^ q = (a ^ p) ^ (q / p)\n[PROOFSTEP]\nrw [← NNReal.rpow_mul, div_eq_inv_mul, ← mul_assoc, _root_.mul_inv_cancel hp_pos.ne.symm, one_mul]\n[GOAL]\nι : Type u\ns : Finset ι\np q : ℝ\na b : ℝ≥0\nhp_pos : 0 < p\nhpq : p ≤ q\nh_rpow : ∀ (a : ℝ≥0), a ^ q = (a ^ p) ^ (q / p)\n⊢ (a ^ q + b ^ q) ^ (1 / q) ≤ (a ^ p + b ^ p) ^ (1 / p)\n[PROOFSTEP]\nhave h_rpow_add_rpow_le_add : ((a ^ p) ^ (q / p) + (b ^ p) ^ (q / p)) ^ (1 / (q / p)) ≤ a ^ p + b ^ p :=\n  by\n  refine' rpow_add_rpow_le_add (a ^ p) (b ^ p) _\n  rwa [one_le_div hp_pos]\n[GOAL]\nι : Type u\ns : Finset ι\np q : ℝ\na b : ℝ≥0\nhp_pos : 0 < p\nhpq : p ≤ q\nh_rpow : ∀ (a : ℝ≥0), a ^ q = (a ^ p) ^ (q / p)\n⊢ ((a ^ p) ^ (q / p) + (b ^ p) ^ (q / p)) ^ (1 / (q / p)) ≤ a ^ p + b ^ p\n[PROOFSTEP]\nrefine' rpow_add_rpow_le_add (a ^ p) (b ^ p) _\n[GOAL]\nι : Type u\ns : Finset ι\np q : ℝ\na b : ℝ≥0\nhp_pos : 0 < p\nhpq : p ≤ q\nh_rpow : ∀ (a : ℝ≥0), a ^ q = (a ^ p) ^ (q / p)\n⊢ 1 ≤ q / p\n[PROOFSTEP]\nrwa [one_le_div hp_pos]\n[GOAL]\nι : Type u\ns : Finset ι\np q : ℝ\na b : ℝ≥0\nhp_pos : 0 < p\nhpq : p ≤ q\nh_rpow : ∀ (a : ℝ≥0), a ^ q = (a ^ p) ^ (q / p)\nh_rpow_add_rpow_le_add : ((a ^ p) ^ (q / p) + (b ^ p) ^ (q / p)) ^ (1 / (q / p)) ≤ a ^ p + b ^ p\n⊢ (a ^ q + b ^ q) ^ (1 / q) ≤ (a ^ p + b ^ p) ^ (1 / p)\n[PROOFSTEP]\nrw [h_rpow a, h_rpow b, NNReal.le_rpow_one_div_iff hp_pos, ← NNReal.rpow_mul, mul_comm, mul_one_div]\n[GOAL]\nι : Type u\ns : Finset ι\np q : ℝ\na b : ℝ≥0\nhp_pos : 0 < p\nhpq : p ≤ q\nh_rpow : ∀ (a : ℝ≥0), a ^ q = (a ^ p) ^ (q / p)\nh_rpow_add_rpow_le_add : ((a ^ p) ^ (q / p) + (b ^ p) ^ (q / p)) ^ (1 / (q / p)) ≤ a ^ p + b ^ p\n⊢ ((a ^ p) ^ (q / p) + (b ^ p) ^ (q / p)) ^ (p / q) ≤ a ^ p + b ^ p\n[PROOFSTEP]\nrwa [one_div_div] at h_rpow_add_rpow_le_add \n[GOAL]\nι : Type u\ns : Finset ι\np : ℝ\na b : ℝ≥0\nhp : 0 ≤ p\nhp1 : p ≤ 1\n⊢ (a + b) ^ p ≤ a ^ p + b ^ p\n[PROOFSTEP]\nrcases hp.eq_or_lt with (rfl | hp_pos)\n[GOAL]\ncase inl\nι : Type u\ns : Finset ι\na b : ℝ≥0\nhp : 0 ≤ 0\nhp1 : 0 ≤ 1\n⊢ (a + b) ^ 0 ≤ a ^ 0 + b ^ 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\nι : Type u\ns : Finset ι\np : ℝ\na b : ℝ≥0\nhp : 0 ≤ p\nhp1 : p ≤ 1\nhp_pos : 0 < p\n⊢ (a + b) ^ p ≤ a ^ p + b ^ p\n[PROOFSTEP]\nhave h := rpow_add_rpow_le a b hp_pos hp1\n[GOAL]\ncase inr\nι : Type u\ns : Finset ι\np : ℝ\na b : ℝ≥0\nhp : 0 ≤ p\nhp1 : p ≤ 1\nhp_pos : 0 < p\nh : (a ^ 1 + b ^ 1) ^ (1 / 1) ≤ (a ^ p + b ^ p) ^ (1 / p)\n⊢ (a + b) ^ p ≤ a ^ p + b ^ p\n[PROOFSTEP]\nrw [one_div_one] at h \n[GOAL]\ncase inr\nι : Type u\ns : Finset ι\np : ℝ\na b : ℝ≥0\nhp : 0 ≤ p\nhp1 : p ≤ 1\nhp_pos : 0 < p\nh : (a ^ 1 + b ^ 1) ^ 1 ≤ (a ^ p + b ^ p) ^ (1 / p)\n⊢ (a + b) ^ p ≤ a ^ p + b ^ p\n[PROOFSTEP]\nrepeat' rw [NNReal.rpow_one] at h \n[GOAL]\ncase inr\nι : Type u\ns : Finset ι\np : ℝ\na b : ℝ≥0\nhp : 0 ≤ p\nhp1 : p ≤ 1\nhp_pos : 0 < p\nh : (a ^ 1 + b ^ 1) ^ 1 ≤ (a ^ p + b ^ p) ^ (1 / p)\n⊢ (a + b) ^ p ≤ a ^ p + b ^ p\n[PROOFSTEP]\nrw [NNReal.rpow_one] at h \n[GOAL]\ncase inr\nι : Type u\ns : Finset ι\np : ℝ\na b : ℝ≥0\nhp : 0 ≤ p\nhp1 : p ≤ 1\nhp_pos : 0 < p\nh : a ^ 1 + b ^ 1 ≤ (a ^ p + b ^ p) ^ (1 / p)\n⊢ (a + b) ^ p ≤ a ^ p + b ^ p\n[PROOFSTEP]\nrw [NNReal.rpow_one] at h \n[GOAL]\ncase inr\nι : Type u\ns : Finset ι\np : ℝ\na b : ℝ≥0\nhp : 0 ≤ p\nhp1 : p ≤ 1\nhp_pos : 0 < p\nh : a + b ^ 1 ≤ (a ^ p + b ^ p) ^ (1 / p)\n⊢ (a + b) ^ p ≤ a ^ p + b ^ p\n[PROOFSTEP]\nrw [NNReal.rpow_one] at h \n[GOAL]\ncase inr\nι : Type u\ns : Finset ι\np : ℝ\na b : ℝ≥0\nhp : 0 ≤ p\nhp1 : p ≤ 1\nhp_pos : 0 < p\nh : a + b ≤ (a ^ p + b ^ p) ^ (1 / p)\n⊢ (a + b) ^ p ≤ a ^ p + b ^ p\n[PROOFSTEP]\nrw [NNReal.rpow_one] at h \n[GOAL]\ncase inr\nι : Type u\ns : Finset ι\np : ℝ\na b : ℝ≥0\nhp : 0 ≤ p\nhp1 : p ≤ 1\nhp_pos : 0 < p\nh : a + b ≤ (a ^ p + b ^ p) ^ (1 / p)\n⊢ (a + b) ^ p ≤ a ^ p + b ^ p\n[PROOFSTEP]\nexact (NNReal.le_rpow_one_div_iff hp_pos).mp h\n[GOAL]\nι : Type u\ns : Finset ι\nw z : ι → ℝ≥0∞\nhw' : ∑ i in s, w i = 1\np : ℝ\nhp : 1 ≤ p\n⊢ (∑ i in s, w i * z i) ^ p ≤ ∑ i in s, w i * z i ^ p\n[PROOFSTEP]\nhave hp_pos : 0 < p\n[GOAL]\ncase hp_pos\nι : Type u\ns : Finset ι\nw z : ι → ℝ≥0∞\nhw' : ∑ i in s, w i = 1\np : ℝ\nhp : 1 ≤ p\n⊢ 0 < p\nι : Type u\ns : Finset ι\nw z : ι → ℝ≥0∞\nhw' : ∑ i in s, w i = 1\np : ℝ\nhp : 1 ≤ p\nhp_pos : 0 < p\n⊢ (∑ i in s, w i * z i) ^ p ≤ ∑ i in s, w i * z i ^ p\n[PROOFSTEP]\npositivity\n[GOAL]\nι : Type u\ns : Finset ι\nw z : ι → ℝ≥0∞\nhw' : ∑ i in s, w i = 1\np : ℝ\nhp : 1 ≤ p\nhp_pos : 0 < p\n⊢ (∑ i in s, w i * z i) ^ p ≤ ∑ i in s, w i * z i ^ p\n[PROOFSTEP]\nhave hp_nonneg : 0 ≤ p\n[GOAL]\ncase hp_nonneg\nι : Type u\ns : Finset ι\nw z : ι → ℝ≥0∞\nhw' : ∑ i in s, w i = 1\np : ℝ\nhp : 1 ≤ p\nhp_pos : 0 < p\n⊢ 0 ≤ p\nι : Type u\ns : Finset ι\nw z : ι → ℝ≥0∞\nhw' : ∑ i in s, w i = 1\np : ℝ\nhp : 1 ≤ p\nhp_pos : 0 < p\nhp_nonneg : 0 ≤ p\n⊢ (∑ i in s, w i * z i) ^ p ≤ ∑ i in s, w i * z i ^ p\n[PROOFSTEP]\npositivity\n[GOAL]\nι : Type u\ns : Finset ι\nw z : ι → ℝ≥0∞\nhw' : ∑ i in s, w i = 1\np : ℝ\nhp : 1 ≤ p\nhp_pos : 0 < p\nhp_nonneg : 0 ≤ p\n⊢ (∑ i in s, w i * z i) ^ p ≤ ∑ i in s, w i * z i ^ p\n[PROOFSTEP]\nhave hp_not_neg : ¬p < 0 := by simp [hp_nonneg]\n[GOAL]\nι : Type u\ns : Finset ι\nw z : ι → ℝ≥0∞\nhw' : ∑ i in s, w i = 1\np : ℝ\nhp : 1 ≤ p\nhp_pos : 0 < p\nhp_nonneg : 0 ≤ p\n⊢ ¬p < 0\n[PROOFSTEP]\nsimp [hp_nonneg]\n[GOAL]\nι : Type u\ns : Finset ι\nw z : ι → ℝ≥0∞\nhw' : ∑ i in s, w i = 1\np : ℝ\nhp : 1 ≤ p\nhp_pos : 0 < p\nhp_nonneg : 0 ≤ p\nhp_not_neg : ¬p < 0\n⊢ (∑ i in s, w i * z i) ^ p ≤ ∑ i in s, w i * z i ^ p\n[PROOFSTEP]\nhave h_top_iff_rpow_top : ∀ (i : ι), i ∈ s → (w i * z i = ⊤ ↔ w i * z i ^ p = ⊤) := by\n  simp [ENNReal.mul_eq_top, hp_pos, hp_nonneg, hp_not_neg]\n[GOAL]\nι : Type u\ns : Finset ι\nw z : ι → ℝ≥0∞\nhw' : ∑ i in s, w i = 1\np : ℝ\nhp : 1 ≤ p\nhp_pos : 0 < p\nhp_nonneg : 0 ≤ p\nhp_not_neg : ¬p < 0\n⊢ ∀ (i : ι), i ∈ s → (w i * z i = ⊤ ↔ w i * z i ^ p = ⊤)\n[PROOFSTEP]\nsimp [ENNReal.mul_eq_top, hp_pos, hp_nonneg, hp_not_neg]\n[GOAL]\nι : Type u\ns : Finset ι\nw z : ι → ℝ≥0∞\nhw' : ∑ i in s, w i = 1\np : ℝ\nhp : 1 ≤ p\nhp_pos : 0 < p\nhp_nonneg : 0 ≤ p\nhp_not_neg : ¬p < 0\nh_top_iff_rpow_top : ∀ (i : ι), i ∈ s → (w i * z i = ⊤ ↔ w i * z i ^ p = ⊤)\n⊢ (∑ i in s, w i * z i) ^ p ≤ ∑ i in s, w i * z i ^ p\n[PROOFSTEP]\nrefine' le_of_top_imp_top_of_toNNReal_le _ _\n[GOAL]\ncase refine'_1\nι : Type u\ns : Finset ι\nw z : ι → ℝ≥0∞\nhw' : ∑ i in s, w i = 1\np : ℝ\nhp : 1 ≤ p\nhp_pos : 0 < p\nhp_nonneg : 0 ≤ p\nhp_not_neg : ¬p < 0\nh_top_iff_rpow_top : ∀ (i : ι), i ∈ s → (w i * z i = ⊤ ↔ w i * z i ^ p = ⊤)\n⊢ (∑ i in s, w i * z i) ^ p = ⊤ → ∑ i in s, w i * z i ^ p = ⊤\n[PROOFSTEP]\nrw [rpow_eq_top_iff, sum_eq_top_iff, sum_eq_top_iff]\n[GOAL]\ncase refine'_1\nι : Type u\ns : Finset ι\nw z : ι → ℝ≥0∞\nhw' : ∑ i in s, w i = 1\np : ℝ\nhp : 1 ≤ p\nhp_pos : 0 < p\nhp_nonneg : 0 ≤ p\nhp_not_neg : ¬p < 0\nh_top_iff_rpow_top : ∀ (i : ι), i ∈ s → (w i * z i = ⊤ ↔ w i * z i ^ p = ⊤)\n⊢ ∑ i in s, w i * z i = 0 ∧ p < 0 ∨ (∃ a, a ∈ s ∧ w a * z a = ⊤) ∧ 0 < p → ∃ a, a ∈ s ∧ w a * z a ^ p = ⊤\n[PROOFSTEP]\nintro h\n[GOAL]\ncase refine'_1\nι : Type u\ns : Finset ι\nw z : ι → ℝ≥0∞\nhw' : ∑ i in s, w i = 1\np : ℝ\nhp : 1 ≤ p\nhp_pos : 0 < p\nhp_nonneg : 0 ≤ p\nhp_not_neg : ¬p < 0\nh_top_iff_rpow_top : ∀ (i : ι), i ∈ s → (w i * z i = ⊤ ↔ w i * z i ^ p = ⊤)\nh : ∑ i in s, w i * z i = 0 ∧ p < 0 ∨ (∃ a, a ∈ s ∧ w a * z a = ⊤) ∧ 0 < p\n⊢ ∃ a, a ∈ s ∧ w a * z a ^ p = ⊤\n[PROOFSTEP]\nsimp only [and_false_iff, hp_not_neg, false_or_iff] at h \n[GOAL]\ncase refine'_1\nι : Type u\ns : Finset ι\nw z : ι → ℝ≥0∞\nhw' : ∑ i in s, w i = 1\np : ℝ\nhp : 1 ≤ p\nhp_pos : 0 < p\nhp_nonneg : 0 ≤ p\nhp_not_neg : ¬p < 0\nh_top_iff_rpow_top : ∀ (i : ι), i ∈ s → (w i * z i = ⊤ ↔ w i * z i ^ p = ⊤)\nh : (∃ a, a ∈ s ∧ w a * z a = ⊤) ∧ 0 < p\n⊢ ∃ a, a ∈ s ∧ w a * z a ^ p = ⊤\n[PROOFSTEP]\nrcases h.left with ⟨a, H, ha⟩\n[GOAL]\ncase refine'_1.intro.intro\nι : Type u\ns : Finset ι\nw z : ι → ℝ≥0∞\nhw' : ∑ i in s, w i = 1\np : ℝ\nhp : 1 ≤ p\nhp_pos : 0 < p\nhp_nonneg : 0 ≤ p\nhp_not_neg : ¬p < 0\nh_top_iff_rpow_top : ∀ (i : ι), i ∈ s → (w i * z i = ⊤ ↔ w i * z i ^ p = ⊤)\nh : (∃ a, a ∈ s ∧ w a * z a = ⊤) ∧ 0 < p\na : ι\nH : a ∈ s\nha : w a * z a = ⊤\n⊢ ∃ a, a ∈ s ∧ w a * z a ^ p = ⊤\n[PROOFSTEP]\nuse a, H\n[GOAL]\ncase right\nι : Type u\ns : Finset ι\nw z : ι → ℝ≥0∞\nhw' : ∑ i in s, w i = 1\np : ℝ\nhp : 1 ≤ p\nhp_pos : 0 < p\nhp_nonneg : 0 ≤ p\nhp_not_neg : ¬p < 0\nh_top_iff_rpow_top : ∀ (i : ι), i ∈ s → (w i * z i = ⊤ ↔ w i * z i ^ p = ⊤)\nh : (∃ a, a ∈ s ∧ w a * z a = ⊤) ∧ 0 < p\na : ι\nH : a ∈ s\nha : w a * z a = ⊤\n⊢ w a * z a ^ p = ⊤\n[PROOFSTEP]\nrwa [← h_top_iff_rpow_top a H]\n[GOAL]\ncase refine'_2\nι : Type u\ns : Finset ι\nw z : ι → ℝ≥0∞\nhw' : ∑ i in s, w i = 1\np : ℝ\nhp : 1 ≤ p\nhp_pos : 0 < p\nhp_nonneg : 0 ≤ p\nhp_not_neg : ¬p < 0\nh_top_iff_rpow_top : ∀ (i : ι), i ∈ s → (w i * z i = ⊤ ↔ w i * z i ^ p = ⊤)\n⊢ (∑ i in s, w i * z i) ^ p ≠ ⊤ →\n    ∑ i in s, w i * z i ^ p ≠ ⊤ →\n      ENNReal.toNNReal ((∑ i in s, w i * z i) ^ p) ≤ ENNReal.toNNReal (∑ i in s, w i * z i ^ p)\n[PROOFSTEP]\nintro h_top_rpow_sum\n  _\n    -- show hypotheses needed to put the `.toNNReal` inside the sums.\n[GOAL]\ncase refine'_2\nι : Type u\ns : Finset ι\nw z : ι → ℝ≥0∞\nhw' : ∑ i in s, w i = 1\np : ℝ\nhp : 1 ≤ p\nhp_pos : 0 < p\nhp_nonneg : 0 ≤ p\nhp_not_neg : ¬p < 0\nh_top_iff_rpow_top : ∀ (i : ι), i ∈ s → (w i * z i = ⊤ ↔ w i * z i ^ p = ⊤)\nh_top_rpow_sum : (∑ i in s, w i * z i) ^ p ≠ ⊤\na✝ : ∑ i in s, w i * z i ^ p ≠ ⊤\n⊢ ENNReal.toNNReal ((∑ i in s, w i * z i) ^ p) ≤ ENNReal.toNNReal (∑ i in s, w i * z i ^ p)\n[PROOFSTEP]\nhave h_top : ∀ a : ι, a ∈ s → w a * z a ≠ ⊤ :=\n  haveI h_top_sum : ∑ i : ι in s, w i * z i ≠ ⊤ := by\n    intro h\n    rw [h, top_rpow_of_pos hp_pos] at h_top_rpow_sum \n    exact h_top_rpow_sum rfl\n  fun a ha => (lt_top_of_sum_ne_top h_top_sum ha).ne\n[GOAL]\nι : Type u\ns : Finset ι\nw z : ι → ℝ≥0∞\nhw' : ∑ i in s, w i = 1\np : ℝ\nhp : 1 ≤ p\nhp_pos : 0 < p\nhp_nonneg : 0 ≤ p\nhp_not_neg : ¬p < 0\nh_top_iff_rpow_top : ∀ (i : ι), i ∈ s → (w i * z i = ⊤ ↔ w i * z i ^ p = ⊤)\nh_top_rpow_sum : (∑ i in s, w i * z i) ^ p ≠ ⊤\na✝ : ∑ i in s, w i * z i ^ p ≠ ⊤\n⊢ ∑ i in s, w i * z i ≠ ⊤\n[PROOFSTEP]\nintro h\n[GOAL]\nι : Type u\ns : Finset ι\nw z : ι → ℝ≥0∞\nhw' : ∑ i in s, w i = 1\np : ℝ\nhp : 1 ≤ p\nhp_pos : 0 < p\nhp_nonneg : 0 ≤ p\nhp_not_neg : ¬p < 0\nh_top_iff_rpow_top : ∀ (i : ι), i ∈ s → (w i * z i = ⊤ ↔ w i * z i ^ p = ⊤)\nh_top_rpow_sum : (∑ i in s, w i * z i) ^ p ≠ ⊤\na✝ : ∑ i in s, w i * z i ^ p ≠ ⊤\nh : ∑ i in s, w i * z i = ⊤\n⊢ False\n[PROOFSTEP]\nrw [h, top_rpow_of_pos hp_pos] at h_top_rpow_sum \n[GOAL]\nι : Type u\ns : Finset ι\nw z : ι → ℝ≥0∞\nhw' : ∑ i in s, w i = 1\np : ℝ\nhp : 1 ≤ p\nhp_pos : 0 < p\nhp_nonneg : 0 ≤ p\nhp_not_neg : ¬p < 0\nh_top_iff_rpow_top : ∀ (i : ι), i ∈ s → (w i * z i = ⊤ ↔ w i * z i ^ p = ⊤)\nh_top_rpow_sum : ⊤ ≠ ⊤\na✝ : ∑ i in s, w i * z i ^ p ≠ ⊤\nh : ∑ i in s, w i * z i = ⊤\n⊢ False\n[PROOFSTEP]\nexact h_top_rpow_sum rfl\n[GOAL]\ncase refine'_2\nι : Type u\ns : Finset ι\nw z : ι → ℝ≥0∞\nhw' : ∑ i in s, w i = 1\np : ℝ\nhp : 1 ≤ p\nhp_pos : 0 < p\nhp_nonneg : 0 ≤ p\nhp_not_neg : ¬p < 0\nh_top_iff_rpow_top : ∀ (i : ι), i ∈ s → (w i * z i = ⊤ ↔ w i * z i ^ p = ⊤)\nh_top_rpow_sum : (∑ i in s, w i * z i) ^ p ≠ ⊤\na✝ : ∑ i in s, w i * z i ^ p ≠ ⊤\nh_top : ∀ (a : ι), a ∈ s → w a * z a ≠ ⊤\n⊢ ENNReal.toNNReal ((∑ i in s, w i * z i) ^ p) ≤ ENNReal.toNNReal (∑ i in s, w i * z i ^ p)\n[PROOFSTEP]\nhave h_top_rpow : ∀ a : ι, a ∈ s → w a * z a ^ p ≠ ⊤ :=\n  by\n  intro i hi\n  specialize h_top i hi\n  rwa [Ne.def, ← h_top_iff_rpow_top i hi]\n    -- put the `.toNNReal` inside the sums.\n[GOAL]\nι : Type u\ns : Finset ι\nw z : ι → ℝ≥0∞\nhw' : ∑ i in s, w i = 1\np : ℝ\nhp : 1 ≤ p\nhp_pos : 0 < p\nhp_nonneg : 0 ≤ p\nhp_not_neg : ¬p < 0\nh_top_iff_rpow_top : ∀ (i : ι), i ∈ s → (w i * z i = ⊤ ↔ w i * z i ^ p = ⊤)\nh_top_rpow_sum : (∑ i in s, w i * z i) ^ p ≠ ⊤\na✝ : ∑ i in s, w i * z i ^ p ≠ ⊤\nh_top : ∀ (a : ι), a ∈ s → w a * z a ≠ ⊤\n⊢ ∀ (a : ι), a ∈ s → w a * z a ^ p ≠ ⊤\n[PROOFSTEP]\nintro i hi\n[GOAL]\nι : Type u\ns : Finset ι\nw z : ι → ℝ≥0∞\nhw' : ∑ i in s, w i = 1\np : ℝ\nhp : 1 ≤ p\nhp_pos : 0 < p\nhp_nonneg : 0 ≤ p\nhp_not_neg : ¬p < 0\nh_top_iff_rpow_top : ∀ (i : ι), i ∈ s → (w i * z i = ⊤ ↔ w i * z i ^ p = ⊤)\nh_top_rpow_sum : (∑ i in s, w i * z i) ^ p ≠ ⊤\na✝ : ∑ i in s, w i * z i ^ p ≠ ⊤\nh_top : ∀ (a : ι), a ∈ s → w a * z a ≠ ⊤\ni : ι\nhi : i ∈ s\n⊢ w i * z i ^ p ≠ ⊤\n[PROOFSTEP]\nspecialize h_top i hi\n[GOAL]\nι : Type u\ns : Finset ι\nw z : ι → ℝ≥0∞\nhw' : ∑ i in s, w i = 1\np : ℝ\nhp : 1 ≤ p\nhp_pos : 0 < p\nhp_nonneg : 0 ≤ p\nhp_not_neg : ¬p < 0\nh_top_iff_rpow_top : ∀ (i : ι), i ∈ s → (w i * z i = ⊤ ↔ w i * z i ^ p = ⊤)\nh_top_rpow_sum : (∑ i in s, w i * z i) ^ p ≠ ⊤\na✝ : ∑ i in s, w i * z i ^ p ≠ ⊤\ni : ι\nhi : i ∈ s\nh_top : w i * z i ≠ ⊤\n⊢ w i * z i ^ p ≠ ⊤\n[PROOFSTEP]\nrwa [Ne.def, ← h_top_iff_rpow_top i hi]\n  -- put the `.toNNReal` inside the sums.\n[GOAL]\ncase refine'_2\nι : Type u\ns : Finset ι\nw z : ι → ℝ≥0∞\nhw' : ∑ i in s, w i = 1\np : ℝ\nhp : 1 ≤ p\nhp_pos : 0 < p\nhp_nonneg : 0 ≤ p\nhp_not_neg : ¬p < 0\nh_top_iff_rpow_top : ∀ (i : ι), i ∈ s → (w i * z i = ⊤ ↔ w i * z i ^ p = ⊤)\nh_top_rpow_sum : (∑ i in s, w i * z i) ^ p ≠ ⊤\na✝ : ∑ i in s, w i * z i ^ p ≠ ⊤\nh_top : ∀ (a : ι), a ∈ s → w a * z a ≠ ⊤\nh_top_rpow : ∀ (a : ι), a ∈ s → w a * z a ^ p ≠ ⊤\n⊢ ENNReal.toNNReal ((∑ i in s, w i * z i) ^ p) ≤ ENNReal.toNNReal (∑ i in s, w i * z i ^ p)\n[PROOFSTEP]\nsimp_rw [toNNReal_sum h_top_rpow, ← toNNReal_rpow, toNNReal_sum h_top, toNNReal_mul, ← toNNReal_rpow]\n  -- use corresponding nnreal result\n[GOAL]\ncase refine'_2\nι : Type u\ns : Finset ι\nw z : ι → ℝ≥0∞\nhw' : ∑ i in s, w i = 1\np : ℝ\nhp : 1 ≤ p\nhp_pos : 0 < p\nhp_nonneg : 0 ≤ p\nhp_not_neg : ¬p < 0\nh_top_iff_rpow_top : ∀ (i : ι), i ∈ s → (w i * z i = ⊤ ↔ w i * z i ^ p = ⊤)\nh_top_rpow_sum : (∑ i in s, w i * z i) ^ p ≠ ⊤\na✝ : ∑ i in s, w i * z i ^ p ≠ ⊤\nh_top : ∀ (a : ι), a ∈ s → w a * z a ≠ ⊤\nh_top_rpow : ∀ (a : ι), a ∈ s → w a * z a ^ p ≠ ⊤\n⊢ (∑ x in s, ENNReal.toNNReal (w x) * ENNReal.toNNReal (z x)) ^ p ≤\n    ∑ x in s, ENNReal.toNNReal (w x) * ENNReal.toNNReal (z x) ^ p\n[PROOFSTEP]\nrefine' NNReal.rpow_arith_mean_le_arith_mean_rpow s (fun i => (w i).toNNReal) (fun i => (z i).toNNReal) _ hp\n[GOAL]\ncase refine'_2\nι : Type u\ns : Finset ι\nw z : ι → ℝ≥0∞\nhw' : ∑ i in s, w i = 1\np : ℝ\nhp : 1 ≤ p\nhp_pos : 0 < p\nhp_nonneg : 0 ≤ p\nhp_not_neg : ¬p < 0\nh_top_iff_rpow_top : ∀ (i : ι), i ∈ s → (w i * z i = ⊤ ↔ w i * z i ^ p = ⊤)\nh_top_rpow_sum : (∑ i in s, w i * z i) ^ p ≠ ⊤\na✝ : ∑ i in s, w i * z i ^ p ≠ ⊤\nh_top : ∀ (a : ι), a ∈ s → w a * z a ≠ ⊤\nh_top_rpow : ∀ (a : ι), a ∈ s → w a * z a ^ p ≠ ⊤\n⊢ ∑ i in s, (fun i => ENNReal.toNNReal (w i)) i = 1\n[PROOFSTEP]\nhave h_sum_nnreal : ∑ i in s, w i = ↑(∑ i in s, (w i).toNNReal) :=\n  by\n  rw [coe_finset_sum]\n  refine' sum_congr rfl fun i hi => (coe_toNNReal _).symm\n  refine' (lt_top_of_sum_ne_top _ hi).ne\n  exact hw'.symm ▸ ENNReal.one_ne_top\n[GOAL]\nι : Type u\ns : Finset ι\nw z : ι → ℝ≥0∞\nhw' : ∑ i in s, w i = 1\np : ℝ\nhp : 1 ≤ p\nhp_pos : 0 < p\nhp_nonneg : 0 ≤ p\nhp_not_neg : ¬p < 0\nh_top_iff_rpow_top : ∀ (i : ι), i ∈ s → (w i * z i = ⊤ ↔ w i * z i ^ p = ⊤)\nh_top_rpow_sum : (∑ i in s, w i * z i) ^ p ≠ ⊤\na✝ : ∑ i in s, w i * z i ^ p ≠ ⊤\nh_top : ∀ (a : ι), a ∈ s → w a * z a ≠ ⊤\nh_top_rpow : ∀ (a : ι), a ∈ s → w a * z a ^ p ≠ ⊤\n⊢ ∑ i in s, w i = ↑(∑ i in s, ENNReal.toNNReal (w i))\n[PROOFSTEP]\nrw [coe_finset_sum]\n[GOAL]\nι : Type u\ns : Finset ι\nw z : ι → ℝ≥0∞\nhw' : ∑ i in s, w i = 1\np : ℝ\nhp : 1 ≤ p\nhp_pos : 0 < p\nhp_nonneg : 0 ≤ p\nhp_not_neg : ¬p < 0\nh_top_iff_rpow_top : ∀ (i : ι), i ∈ s → (w i * z i = ⊤ ↔ w i * z i ^ p = ⊤)\nh_top_rpow_sum : (∑ i in s, w i * z i) ^ p ≠ ⊤\na✝ : ∑ i in s, w i * z i ^ p ≠ ⊤\nh_top : ∀ (a : ι), a ∈ s → w a * z a ≠ ⊤\nh_top_rpow : ∀ (a : ι), a ∈ s → w a * z a ^ p ≠ ⊤\n⊢ ∑ i in s, w i = ∑ a in s, ↑(ENNReal.toNNReal (w a))\n[PROOFSTEP]\nrefine' sum_congr rfl fun i hi => (coe_toNNReal _).symm\n[GOAL]\nι : Type u\ns : Finset ι\nw z : ι → ℝ≥0∞\nhw' : ∑ i in s, w i = 1\np : ℝ\nhp : 1 ≤ p\nhp_pos : 0 < p\nhp_nonneg : 0 ≤ p\nhp_not_neg : ¬p < 0\nh_top_iff_rpow_top : ∀ (i : ι), i ∈ s → (w i * z i = ⊤ ↔ w i * z i ^ p = ⊤)\nh_top_rpow_sum : (∑ i in s, w i * z i) ^ p ≠ ⊤\na✝ : ∑ i in s, w i * z i ^ p ≠ ⊤\nh_top : ∀ (a : ι), a ∈ s → w a * z a ≠ ⊤\nh_top_rpow : ∀ (a : ι), a ∈ s → w a * z a ^ p ≠ ⊤\ni : ι\nhi : i ∈ s\n⊢ w i ≠ ⊤\n[PROOFSTEP]\nrefine' (lt_top_of_sum_ne_top _ hi).ne\n[GOAL]\nι : Type u\ns : Finset ι\nw z : ι → ℝ≥0∞\nhw' : ∑ i in s, w i = 1\np : ℝ\nhp : 1 ≤ p\nhp_pos : 0 < p\nhp_nonneg : 0 ≤ p\nhp_not_neg : ¬p < 0\nh_top_iff_rpow_top : ∀ (i : ι), i ∈ s → (w i * z i = ⊤ ↔ w i * z i ^ p = ⊤)\nh_top_rpow_sum : (∑ i in s, w i * z i) ^ p ≠ ⊤\na✝ : ∑ i in s, w i * z i ^ p ≠ ⊤\nh_top : ∀ (a : ι), a ∈ s → w a * z a ≠ ⊤\nh_top_rpow : ∀ (a : ι), a ∈ s → w a * z a ^ p ≠ ⊤\ni : ι\nhi : i ∈ s\n⊢ ∑ x in s, w x ≠ ⊤\n[PROOFSTEP]\nexact hw'.symm ▸ ENNReal.one_ne_top\n[GOAL]\ncase refine'_2\nι : Type u\ns : Finset ι\nw z : ι → ℝ≥0∞\nhw' : ∑ i in s, w i = 1\np : ℝ\nhp : 1 ≤ p\nhp_pos : 0 < p\nhp_nonneg : 0 ≤ p\nhp_not_neg : ¬p < 0\nh_top_iff_rpow_top : ∀ (i : ι), i ∈ s → (w i * z i = ⊤ ↔ w i * z i ^ p = ⊤)\nh_top_rpow_sum : (∑ i in s, w i * z i) ^ p ≠ ⊤\na✝ : ∑ i in s, w i * z i ^ p ≠ ⊤\nh_top : ∀ (a : ι), a ∈ s → w a * z a ≠ ⊤\nh_top_rpow : ∀ (a : ι), a ∈ s → w a * z a ^ p ≠ ⊤\nh_sum_nnreal : ∑ i in s, w i = ↑(∑ i in s, ENNReal.toNNReal (w i))\n⊢ ∑ i in s, (fun i => ENNReal.toNNReal (w i)) i = 1\n[PROOFSTEP]\nrwa [← coe_eq_coe, ← h_sum_nnreal]\n[GOAL]\nι : Type u\ns : Finset ι\nw₁ w₂ z₁ z₂ : ℝ≥0∞\nhw' : w₁ + w₂ = 1\np : ℝ\nhp : 1 ≤ p\n⊢ (w₁ * z₁ + w₂ * z₂) ^ p ≤ w₁ * z₁ ^ p + w₂ * z₂ ^ p\n[PROOFSTEP]\nhave h := rpow_arith_mean_le_arith_mean_rpow univ ![w₁, w₂] ![z₁, z₂] ?_ hp\n[GOAL]\ncase refine_2\nι : Type u\ns : Finset ι\nw₁ w₂ z₁ z₂ : ℝ≥0∞\nhw' : w₁ + w₂ = 1\np : ℝ\nhp : 1 ≤ p\nh :\n  (∑ i : Fin (Nat.succ (Nat.succ 0)), Matrix.vecCons w₁ ![w₂] i * Matrix.vecCons z₁ ![z₂] i) ^ p ≤\n    ∑ i : Fin (Nat.succ (Nat.succ 0)), Matrix.vecCons w₁ ![w₂] i * Matrix.vecCons z₁ ![z₂] i ^ p\n⊢ (w₁ * z₁ + w₂ * z₂) ^ p ≤ w₁ * z₁ ^ p + w₂ * z₂ ^ p\n[PROOFSTEP]\nsimpa [Fin.sum_univ_succ] using h\n[GOAL]\ncase refine_1\nι : Type u\ns : Finset ι\nw₁ w₂ z₁ z₂ : ℝ≥0∞\nhw' : w₁ + w₂ = 1\np : ℝ\nhp : 1 ≤ p\n⊢ ∑ i : Fin (Nat.succ (Nat.succ 0)), Matrix.vecCons w₁ ![w₂] i = 1\n[PROOFSTEP]\nsimp [hw', Fin.sum_univ_succ]\n[GOAL]\nι : Type u\ns : Finset ι\nz₁ z₂ : ℝ≥0∞\np : ℝ\nhp : 1 ≤ p\n⊢ (z₁ + z₂) ^ p ≤ 2 ^ (p - 1) * (z₁ ^ p + z₂ ^ p)\n[PROOFSTEP]\nrcases eq_or_lt_of_le hp with (rfl | h'p)\n[GOAL]\ncase inl\nι : Type u\ns : Finset ι\nz₁ z₂ : ℝ≥0∞\nhp : 1 ≤ 1\n⊢ (z₁ + z₂) ^ 1 ≤ 2 ^ (1 - 1) * (z₁ ^ 1 + z₂ ^ 1)\n[PROOFSTEP]\nsimp only [rpow_one, sub_self, rpow_zero, one_mul, le_refl]\n[GOAL]\ncase inr\nι : Type u\ns : Finset ι\nz₁ z₂ : ℝ≥0∞\np : ℝ\nhp : 1 ≤ p\nh'p : 1 < p\n⊢ (z₁ + z₂) ^ p ≤ 2 ^ (p - 1) * (z₁ ^ p + z₂ ^ p)\n[PROOFSTEP]\nconvert rpow_arith_mean_le_arith_mean2_rpow (1 / 2) (1 / 2) (2 * z₁) (2 * z₂) (ENNReal.add_halves 1) hp using 1\n[GOAL]\ncase h.e'_3\nι : Type u\ns : Finset ι\nz₁ z₂ : ℝ≥0∞\np : ℝ\nhp : 1 ≤ p\nh'p : 1 < p\n⊢ (z₁ + z₂) ^ p = (1 / 2 * (2 * z₁) + 1 / 2 * (2 * z₂)) ^ p\n[PROOFSTEP]\nsimp [← mul_assoc, ENNReal.inv_mul_cancel two_ne_zero two_ne_top]\n[GOAL]\ncase h.e'_4\nι : Type u\ns : Finset ι\nz₁ z₂ : ℝ≥0∞\np : ℝ\nhp : 1 ≤ p\nh'p : 1 < p\n⊢ 2 ^ (p - 1) * (z₁ ^ p + z₂ ^ p) = 1 / 2 * (2 * z₁) ^ p + 1 / 2 * (2 * z₂) ^ p\n[PROOFSTEP]\nhave _ : p - 1 ≠ 0 := ne_of_gt (sub_pos.2 h'p)\n[GOAL]\ncase h.e'_4\nι : Type u\ns : Finset ι\nz₁ z₂ : ℝ≥0∞\np : ℝ\nhp : 1 ≤ p\nh'p : 1 < p\nx✝ : p - 1 ≠ 0\n⊢ 2 ^ (p - 1) * (z₁ ^ p + z₂ ^ p) = 1 / 2 * (2 * z₁) ^ p + 1 / 2 * (2 * z₂) ^ p\n[PROOFSTEP]\nsimp only [mul_rpow_of_nonneg _ _ (zero_le_one.trans hp), rpow_sub _ _ two_ne_zero two_ne_top, ENNReal.div_eq_inv_mul,\n  rpow_one, mul_one]\n[GOAL]\ncase h.e'_4\nι : Type u\ns : Finset ι\nz₁ z₂ : ℝ≥0∞\np : ℝ\nhp : 1 ≤ p\nh'p : 1 < p\nx✝ : p - 1 ≠ 0\n⊢ 2⁻¹ * 2 ^ p * (z₁ ^ p + z₂ ^ p) = 2⁻¹ * (2 ^ p * z₁ ^ p) + 2⁻¹ * (2 ^ p * z₂ ^ p)\n[PROOFSTEP]\nring\n[GOAL]\nι : Type u\ns : Finset ι\np : ℝ\na b : ℝ≥0∞\nhp1 : 1 ≤ p\n⊢ a ^ p + b ^ p ≤ (a + b) ^ p\n[PROOFSTEP]\nhave hp_pos : 0 < p := by positivity\n[GOAL]\nι : Type u\ns : Finset ι\np : ℝ\na b : ℝ≥0∞\nhp1 : 1 ≤ p\n⊢ 0 < p\n[PROOFSTEP]\npositivity\n[GOAL]\nι : Type u\ns : Finset ι\np : ℝ\na b : ℝ≥0∞\nhp1 : 1 ≤ p\nhp_pos : 0 < p\n⊢ a ^ p + b ^ p ≤ (a + b) ^ p\n[PROOFSTEP]\nby_cases h_top : a + b = ⊤\n[GOAL]\ncase pos\nι : Type u\ns : Finset ι\np : ℝ\na b : ℝ≥0∞\nhp1 : 1 ≤ p\nhp_pos : 0 < p\nh_top : a + b = ⊤\n⊢ a ^ p + b ^ p ≤ (a + b) ^ p\n[PROOFSTEP]\nrw [← @ENNReal.rpow_eq_top_iff_of_pos (a + b) p hp_pos] at h_top \n[GOAL]\ncase pos\nι : Type u\ns : Finset ι\np : ℝ\na b : ℝ≥0∞\nhp1 : 1 ≤ p\nhp_pos : 0 < p\nh_top : (a + b) ^ p = ⊤\n⊢ a ^ p + b ^ p ≤ (a + b) ^ p\n[PROOFSTEP]\nrw [h_top]\n[GOAL]\ncase pos\nι : Type u\ns : Finset ι\np : ℝ\na b : ℝ≥0∞\nhp1 : 1 ≤ p\nhp_pos : 0 < p\nh_top : (a + b) ^ p = ⊤\n⊢ a ^ p + b ^ p ≤ ⊤\n[PROOFSTEP]\nexact le_top\n[GOAL]\ncase neg\nι : Type u\ns : Finset ι\np : ℝ\na b : ℝ≥0∞\nhp1 : 1 ≤ p\nhp_pos : 0 < p\nh_top : ¬a + b = ⊤\n⊢ a ^ p + b ^ p ≤ (a + b) ^ p\n[PROOFSTEP]\nobtain ⟨ha_top, hb_top⟩ := add_ne_top.mp h_top\n[GOAL]\ncase neg.intro\nι : Type u\ns : Finset ι\np : ℝ\na b : ℝ≥0∞\nhp1 : 1 ≤ p\nhp_pos : 0 < p\nh_top : ¬a + b = ⊤\nha_top : a ≠ ⊤\nhb_top : b ≠ ⊤\n⊢ a ^ p + b ^ p ≤ (a + b) ^ p\n[PROOFSTEP]\nlift a to ℝ≥0 using ha_top\n[GOAL]\ncase neg.intro.intro\nι : Type u\ns : Finset ι\np : ℝ\nb : ℝ≥0∞\nhp1 : 1 ≤ p\nhp_pos : 0 < p\nhb_top : b ≠ ⊤\na : ℝ≥0\nh_top : ¬↑a + b = ⊤\n⊢ ↑a ^ p + b ^ p ≤ (↑a + b) ^ p\n[PROOFSTEP]\nlift b to ℝ≥0 using hb_top\n[GOAL]\ncase neg.intro.intro.intro\nι : Type u\ns : Finset ι\np : ℝ\nhp1 : 1 ≤ p\nhp_pos : 0 < p\na b : ℝ≥0\nh_top : ¬↑a + ↑b = ⊤\n⊢ ↑a ^ p + ↑b ^ p ≤ (↑a + ↑b) ^ p\n[PROOFSTEP]\nsimpa [← ENNReal.coe_rpow_of_nonneg _ hp_pos.le] using ENNReal.coe_le_coe.2 (NNReal.add_rpow_le_rpow_add a b hp1)\n[GOAL]\nι : Type u\ns : Finset ι\np : ℝ\na b : ℝ≥0∞\nhp1 : 1 ≤ p\n⊢ (a ^ p + b ^ p) ^ (1 / p) ≤ a + b\n[PROOFSTEP]\nrw [← @ENNReal.le_rpow_one_div_iff _ _ (1 / p) (by simp [lt_of_lt_of_le zero_lt_one hp1])]\n[GOAL]\nι : Type u\ns : Finset ι\np : ℝ\na b : ℝ≥0∞\nhp1 : 1 ≤ p\n⊢ 0 < 1 / p\n[PROOFSTEP]\nsimp [lt_of_lt_of_le zero_lt_one hp1]\n[GOAL]\nι : Type u\ns : Finset ι\np : ℝ\na b : ℝ≥0∞\nhp1 : 1 ≤ p\n⊢ a ^ p + b ^ p ≤ (a + b) ^ (1 / (1 / p))\n[PROOFSTEP]\nrw [one_div_one_div]\n[GOAL]\nι : Type u\ns : Finset ι\np : ℝ\na b : ℝ≥0∞\nhp1 : 1 ≤ p\n⊢ a ^ p + b ^ p ≤ (a + b) ^ p\n[PROOFSTEP]\nexact add_rpow_le_rpow_add _ _ hp1\n[GOAL]\nι : Type u\ns : Finset ι\np q : ℝ\na b : ℝ≥0∞\nhp_pos : 0 < p\nhpq : p ≤ q\n⊢ (a ^ q + b ^ q) ^ (1 / q) ≤ (a ^ p + b ^ p) ^ (1 / p)\n[PROOFSTEP]\nhave h_rpow : ∀ a : ℝ≥0∞, a ^ q = (a ^ p) ^ (q / p) := fun a => by\n  rw [← ENNReal.rpow_mul, _root_.mul_div_cancel' _ hp_pos.ne']\n[GOAL]\nι : Type u\ns : Finset ι\np q : ℝ\na✝ b : ℝ≥0∞\nhp_pos : 0 < p\nhpq : p ≤ q\na : ℝ≥0∞\n⊢ a ^ q = (a ^ p) ^ (q / p)\n[PROOFSTEP]\nrw [← ENNReal.rpow_mul, _root_.mul_div_cancel' _ hp_pos.ne']\n[GOAL]\nι : Type u\ns : Finset ι\np q : ℝ\na b : ℝ≥0∞\nhp_pos : 0 < p\nhpq : p ≤ q\nh_rpow : ∀ (a : ℝ≥0∞), a ^ q = (a ^ p) ^ (q / p)\n⊢ (a ^ q + b ^ q) ^ (1 / q) ≤ (a ^ p + b ^ p) ^ (1 / p)\n[PROOFSTEP]\nhave h_rpow_add_rpow_le_add : ((a ^ p) ^ (q / p) + (b ^ p) ^ (q / p)) ^ (1 / (q / p)) ≤ a ^ p + b ^ p :=\n  by\n  refine' rpow_add_rpow_le_add (a ^ p) (b ^ p) _\n  rwa [one_le_div hp_pos]\n[GOAL]\nι : Type u\ns : Finset ι\np q : ℝ\na b : ℝ≥0∞\nhp_pos : 0 < p\nhpq : p ≤ q\nh_rpow : ∀ (a : ℝ≥0∞), a ^ q = (a ^ p) ^ (q / p)\n⊢ ((a ^ p) ^ (q / p) + (b ^ p) ^ (q / p)) ^ (1 / (q / p)) ≤ a ^ p + b ^ p\n[PROOFSTEP]\nrefine' rpow_add_rpow_le_add (a ^ p) (b ^ p) _\n[GOAL]\nι : Type u\ns : Finset ι\np q : ℝ\na b : ℝ≥0∞\nhp_pos : 0 < p\nhpq : p ≤ q\nh_rpow : ∀ (a : ℝ≥0∞), a ^ q = (a ^ p) ^ (q / p)\n⊢ 1 ≤ q / p\n[PROOFSTEP]\nrwa [one_le_div hp_pos]\n[GOAL]\nι : Type u\ns : Finset ι\np q : ℝ\na b : ℝ≥0∞\nhp_pos : 0 < p\nhpq : p ≤ q\nh_rpow : ∀ (a : ℝ≥0∞), a ^ q = (a ^ p) ^ (q / p)\nh_rpow_add_rpow_le_add : ((a ^ p) ^ (q / p) + (b ^ p) ^ (q / p)) ^ (1 / (q / p)) ≤ a ^ p + b ^ p\n⊢ (a ^ q + b ^ q) ^ (1 / q) ≤ (a ^ p + b ^ p) ^ (1 / p)\n[PROOFSTEP]\nrw [h_rpow a, h_rpow b, ENNReal.le_rpow_one_div_iff hp_pos, ← ENNReal.rpow_mul, mul_comm, mul_one_div]\n[GOAL]\nι : Type u\ns : Finset ι\np q : ℝ\na b : ℝ≥0∞\nhp_pos : 0 < p\nhpq : p ≤ q\nh_rpow : ∀ (a : ℝ≥0∞), a ^ q = (a ^ p) ^ (q / p)\nh_rpow_add_rpow_le_add : ((a ^ p) ^ (q / p) + (b ^ p) ^ (q / p)) ^ (1 / (q / p)) ≤ a ^ p + b ^ p\n⊢ ((a ^ p) ^ (q / p) + (b ^ p) ^ (q / p)) ^ (p / q) ≤ a ^ p + b ^ p\n[PROOFSTEP]\nrwa [one_div_div] at h_rpow_add_rpow_le_add \n[GOAL]\nι : Type u\ns : Finset ι\np : ℝ\na b : ℝ≥0∞\nhp : 0 ≤ p\nhp1 : p ≤ 1\n⊢ (a + b) ^ p ≤ a ^ p + b ^ p\n[PROOFSTEP]\nrcases hp.eq_or_lt with (rfl | hp_pos)\n[GOAL]\ncase inl\nι : Type u\ns : Finset ι\na b : ℝ≥0∞\nhp : 0 ≤ 0\nhp1 : 0 ≤ 1\n⊢ (a + b) ^ 0 ≤ a ^ 0 + b ^ 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\nι : Type u\ns : Finset ι\np : ℝ\na b : ℝ≥0∞\nhp : 0 ≤ p\nhp1 : p ≤ 1\nhp_pos : 0 < p\n⊢ (a + b) ^ p ≤ a ^ p + b ^ p\n[PROOFSTEP]\nhave h := rpow_add_rpow_le a b hp_pos hp1\n[GOAL]\ncase inr\nι : Type u\ns : Finset ι\np : ℝ\na b : ℝ≥0∞\nhp : 0 ≤ p\nhp1 : p ≤ 1\nhp_pos : 0 < p\nh : (a ^ 1 + b ^ 1) ^ (1 / 1) ≤ (a ^ p + b ^ p) ^ (1 / p)\n⊢ (a + b) ^ p ≤ a ^ p + b ^ p\n[PROOFSTEP]\nrw [one_div_one] at h \n[GOAL]\ncase inr\nι : Type u\ns : Finset ι\np : ℝ\na b : ℝ≥0∞\nhp : 0 ≤ p\nhp1 : p ≤ 1\nhp_pos : 0 < p\nh : (a ^ 1 + b ^ 1) ^ 1 ≤ (a ^ p + b ^ p) ^ (1 / p)\n⊢ (a + b) ^ p ≤ a ^ p + b ^ p\n[PROOFSTEP]\nrepeat' rw [ENNReal.rpow_one] at h \n[GOAL]\ncase inr\nι : Type u\ns : Finset ι\np : ℝ\na b : ℝ≥0∞\nhp : 0 ≤ p\nhp1 : p ≤ 1\nhp_pos : 0 < p\nh : (a ^ 1 + b ^ 1) ^ 1 ≤ (a ^ p + b ^ p) ^ (1 / p)\n⊢ (a + b) ^ p ≤ a ^ p + b ^ p\n[PROOFSTEP]\nrw [ENNReal.rpow_one] at h \n[GOAL]\ncase inr\nι : Type u\ns : Finset ι\np : ℝ\na b : ℝ≥0∞\nhp : 0 ≤ p\nhp1 : p ≤ 1\nhp_pos : 0 < p\nh : a ^ 1 + b ^ 1 ≤ (a ^ p + b ^ p) ^ (1 / p)\n⊢ (a + b) ^ p ≤ a ^ p + b ^ p\n[PROOFSTEP]\nrw [ENNReal.rpow_one] at h \n[GOAL]\ncase inr\nι : Type u\ns : Finset ι\np : ℝ\na b : ℝ≥0∞\nhp : 0 ≤ p\nhp1 : p ≤ 1\nhp_pos : 0 < p\nh : a + b ^ 1 ≤ (a ^ p + b ^ p) ^ (1 / p)\n⊢ (a + b) ^ p ≤ a ^ p + b ^ p\n[PROOFSTEP]\nrw [ENNReal.rpow_one] at h \n[GOAL]\ncase inr\nι : Type u\ns : Finset ι\np : ℝ\na b : ℝ≥0∞\nhp : 0 ≤ p\nhp1 : p ≤ 1\nhp_pos : 0 < p\nh : a + b ≤ (a ^ p + b ^ p) ^ (1 / p)\n⊢ (a + b) ^ p ≤ a ^ p + b ^ p\n[PROOFSTEP]\nrw [ENNReal.rpow_one] at h \n[GOAL]\ncase inr\nι : Type u\ns : Finset ι\np : ℝ\na b : ℝ≥0∞\nhp : 0 ≤ p\nhp1 : p ≤ 1\nhp_pos : 0 < p\nh : a + b ≤ (a ^ p + b ^ p) ^ (1 / p)\n⊢ (a + b) ^ p ≤ a ^ p + b ^ p\n[PROOFSTEP]\nexact (ENNReal.le_rpow_one_div_iff hp_pos).mp h\n", "meta": {"mathlib_filename": "Mathlib.Analysis.MeanInequalitiesPow", "llama_tokens": 26616, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8438950947024555, "lm_q2_score": 0.6334102498375401, "lm_q1q2_score": 0.534531802772157}}
{"text": "[GOAL]\nR S : Type u\nx y : R\ninst✝ : Ring R\nh : IsNilpotent x\n⊢ IsNilpotent (-x)\n[PROOFSTEP]\nobtain ⟨n, hn⟩ := h\n[GOAL]\ncase intro\nR S : Type u\nx y : R\ninst✝ : Ring R\nn : ℕ\nhn : x ^ n = 0\n⊢ IsNilpotent (-x)\n[PROOFSTEP]\nuse n\n[GOAL]\ncase h\nR S : Type u\nx y : R\ninst✝ : Ring R\nn : ℕ\nhn : x ^ n = 0\n⊢ (-x) ^ n = 0\n[PROOFSTEP]\nrw [neg_pow, hn, mul_zero]\n[GOAL]\nR S : Type u\nx y : R\ninst✝² : MonoidWithZero R\ninst✝¹ : MonoidWithZero S\nr : R\nF : Type u_1\ninst✝ : MonoidWithZeroHomClass F R S\nhr : IsNilpotent r\nf : F\n⊢ IsNilpotent (↑f r)\n[PROOFSTEP]\nuse hr.choose\n[GOAL]\ncase h\nR S : Type u\nx y : R\ninst✝² : MonoidWithZero R\ninst✝¹ : MonoidWithZero S\nr : R\nF : Type u_1\ninst✝ : MonoidWithZeroHomClass F R S\nhr : IsNilpotent r\nf : F\n⊢ ↑f r ^ Exists.choose hr = 0\n[PROOFSTEP]\nrw [← map_pow, hr.choose_spec, map_zero]\n[GOAL]\nR S : Type u\nx y : R\ninst✝ : Ring R\nr : R\nhnil : IsNilpotent r\n⊢ IsUnit (r - 1)\n[PROOFSTEP]\nobtain ⟨n, hn⟩ := hnil\n[GOAL]\ncase intro\nR S : Type u\nx y : R\ninst✝ : Ring R\nr : R\nn : ℕ\nhn : r ^ n = 0\n⊢ IsUnit (r - 1)\n[PROOFSTEP]\nrefine' ⟨⟨r - 1, -∑ i in Finset.range n, r ^ i, _, _⟩, rfl⟩\n[GOAL]\ncase intro.refine'_1\nR S : Type u\nx y : R\ninst✝ : Ring R\nr : R\nn : ℕ\nhn : r ^ n = 0\n⊢ (r - 1) * -∑ i in Finset.range n, r ^ i = 1\n[PROOFSTEP]\nrw [mul_neg, mul_geom_sum, hn]\n[GOAL]\ncase intro.refine'_1\nR S : Type u\nx y : R\ninst✝ : Ring R\nr : R\nn : ℕ\nhn : r ^ n = 0\n⊢ -(0 - 1) = 1\n[PROOFSTEP]\nsimp\n[GOAL]\ncase intro.refine'_2\nR S : Type u\nx y : R\ninst✝ : Ring R\nr : R\nn : ℕ\nhn : r ^ n = 0\n⊢ (-∑ i in Finset.range n, r ^ i) * (r - 1) = 1\n[PROOFSTEP]\nrw [neg_mul, geom_sum_mul, hn]\n[GOAL]\ncase intro.refine'_2\nR S : Type u\nx y : R\ninst✝ : Ring R\nr : R\nn : ℕ\nhn : r ^ n = 0\n⊢ -(0 - 1) = 1\n[PROOFSTEP]\nsimp\n[GOAL]\nR S : Type u\nx y : R\ninst✝ : Ring R\nr : R\nu : Rˣ\nhnil : IsNilpotent r\nhru : Commute r ↑u⁻¹\n⊢ IsUnit (↑u + r)\n[PROOFSTEP]\nrw [← Units.isUnit_mul_units _ u⁻¹, add_mul, Units.mul_inv, ← IsUnit.neg_iff, add_comm, neg_add, ← sub_eq_add_neg]\n[GOAL]\nR S : Type u\nx y : R\ninst✝ : Ring R\nr : R\nu : Rˣ\nhnil : IsNilpotent r\nhru : Commute r ↑u⁻¹\n⊢ IsUnit (-(r * ↑u⁻¹) - 1)\n[PROOFSTEP]\nobtain ⟨n, hn⟩ := hnil\n[GOAL]\ncase intro\nR S : Type u\nx y : R\ninst✝ : Ring R\nr : R\nu : Rˣ\nhru : Commute r ↑u⁻¹\nn : ℕ\nhn : r ^ n = 0\n⊢ IsUnit (-(r * ↑u⁻¹) - 1)\n[PROOFSTEP]\nrefine' IsNilpotent.sub_one_isUnit ⟨n, _⟩\n[GOAL]\ncase intro\nR S : Type u\nx y : R\ninst✝ : Ring R\nr : R\nu : Rˣ\nhru : Commute r ↑u⁻¹\nn : ℕ\nhn : r ^ n = 0\n⊢ (-(r * ↑u⁻¹)) ^ n = 0\n[PROOFSTEP]\nrw [neg_pow, hru.mul_pow, hn]\n[GOAL]\ncase intro\nR S : Type u\nx y : R\ninst✝ : Ring R\nr : R\nu : Rˣ\nhru : Commute r ↑u⁻¹\nn : ℕ\nhn : r ^ n = 0\n⊢ (-1) ^ n * (0 * ↑u⁻¹ ^ n) = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nR S : Type u\nx y : R\ninst✝³ : MonoidWithZero R\ninst✝² : MonoidWithZero S\nF : Type u_1\ninst✝¹ : MonoidWithZeroHomClass F R S\nf : F\nhf : Function.Injective ↑f\ninst✝ : IsReduced S\n⊢ IsReduced R\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase eq_zero\nR S : Type u\nx y : R\ninst✝³ : MonoidWithZero R\ninst✝² : MonoidWithZero S\nF : Type u_1\ninst✝¹ : MonoidWithZeroHomClass F R S\nf : F\nhf : Function.Injective ↑f\ninst✝ : IsReduced S\n⊢ ∀ (x : R), IsNilpotent x → x = 0\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase eq_zero\nR S : Type u\nx✝ y : R\ninst✝³ : MonoidWithZero R\ninst✝² : MonoidWithZero S\nF : Type u_1\ninst✝¹ : MonoidWithZeroHomClass F R S\nf : F\nhf : Function.Injective ↑f\ninst✝ : IsReduced S\nx : R\nhx : IsNilpotent x\n⊢ x = 0\n[PROOFSTEP]\napply hf\n[GOAL]\ncase eq_zero.a\nR S : Type u\nx✝ y : R\ninst✝³ : MonoidWithZero R\ninst✝² : MonoidWithZero S\nF : Type u_1\ninst✝¹ : MonoidWithZeroHomClass F R S\nf : F\nhf : Function.Injective ↑f\ninst✝ : IsReduced S\nx : R\nhx : IsNilpotent x\n⊢ ↑f x = ↑f 0\n[PROOFSTEP]\nrw [map_zero]\n[GOAL]\ncase eq_zero.a\nR S : Type u\nx✝ y : R\ninst✝³ : MonoidWithZero R\ninst✝² : MonoidWithZero S\nF : Type u_1\ninst✝¹ : MonoidWithZeroHomClass F R S\nf : F\nhf : Function.Injective ↑f\ninst✝ : IsReduced S\nx : R\nhx : IsNilpotent x\n⊢ ↑f x = 0\n[PROOFSTEP]\nexact (hx.map f).eq_zero\n[GOAL]\nR S✝ : Type u\nx y : R\nS : Type u_1\nF : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : CommRing S\ninst✝ : RingHomClass F R S\nf : F\nhf : Function.Surjective ↑f\n⊢ Ideal.IsRadical (ker f) ↔ IsReduced S\n[PROOFSTEP]\nsimp_rw [isReduced_iff, hf.forall, IsNilpotent, ← map_pow, ← RingHom.mem_ker]\n[GOAL]\nR S✝ : Type u\nx y : R\nS : Type u_1\nF : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : CommRing S\ninst✝ : RingHomClass F R S\nf : F\nhf : Function.Surjective ↑f\n⊢ Ideal.IsRadical (ker f) ↔ ∀ (x : R), (∃ n, x ^ n ∈ ker f) → x ∈ ker f\n[PROOFSTEP]\nrfl\n[GOAL]\nR S : Type u\nx y : R\ninst✝ : MonoidWithZero R\n⊢ IsRadical 0 ↔ IsReduced R\n[PROOFSTEP]\nsimp_rw [isReduced_iff, IsNilpotent, exists_imp, ← zero_dvd_iff]\n[GOAL]\nR S : Type u\nx y : R\ninst✝ : MonoidWithZero R\n⊢ IsRadical 0 ↔ ∀ (x : R) (x_1 : ℕ), 0 ∣ x ^ x_1 → 0 ∣ x\n[PROOFSTEP]\nexact forall_swap\n[GOAL]\nR S : Type u\nx y : R\ninst✝ : CommSemiring R\n⊢ IsRadical y ↔ Ideal.IsRadical (Ideal.span {y})\n[PROOFSTEP]\nsimp_rw [IsRadical, ← Ideal.mem_span_singleton]\n[GOAL]\nR S : Type u\nx y : R\ninst✝ : CommSemiring R\n⊢ (∀ (n : ℕ) (x : R), x ^ n ∈ Ideal.span {y} → x ∈ Ideal.span {y}) ↔ Ideal.IsRadical (Ideal.span {y})\n[PROOFSTEP]\nexact forall_swap.trans (forall_congr' fun r => exists_imp.symm)\n[GOAL]\nR S : Type u\nx y : R\ninst✝ : MonoidWithZero R\nk : ℕ\nhk : 1 < k\n⊢ IsReduced R ↔ ∀ (x : R), x ^ k = 0 → x = 0\n[PROOFSTEP]\nsimp_rw [← zero_isRadical_iff, isRadical_iff_pow_one_lt k hk, zero_dvd_iff]\n[GOAL]\nR S : Type u\nx y : R\ninst✝ : Semiring R\nh_comm : Commute x y\nhx : IsNilpotent x\nhy : IsNilpotent y\n⊢ IsNilpotent (x + y)\n[PROOFSTEP]\nobtain ⟨n, hn⟩ := hx\n[GOAL]\ncase intro\nR S : Type u\nx y : R\ninst✝ : Semiring R\nh_comm : Commute x y\nhy : IsNilpotent y\nn : ℕ\nhn : x ^ n = 0\n⊢ IsNilpotent (x + y)\n[PROOFSTEP]\nobtain ⟨m, hm⟩ := hy\n[GOAL]\ncase intro.intro\nR S : Type u\nx y : R\ninst✝ : Semiring R\nh_comm : Commute x y\nn : ℕ\nhn : x ^ n = 0\nm : ℕ\nhm : y ^ m = 0\n⊢ IsNilpotent (x + y)\n[PROOFSTEP]\nuse n + m - 1\n[GOAL]\ncase h\nR S : Type u\nx y : R\ninst✝ : Semiring R\nh_comm : Commute x y\nn : ℕ\nhn : x ^ n = 0\nm : ℕ\nhm : y ^ m = 0\n⊢ (x + y) ^ (n + m - 1) = 0\n[PROOFSTEP]\nrw [h_comm.add_pow']\n[GOAL]\ncase h\nR S : Type u\nx y : R\ninst✝ : Semiring R\nh_comm : Commute x y\nn : ℕ\nhn : x ^ n = 0\nm : ℕ\nhm : y ^ m = 0\n⊢ ∑ m_1 in Finset.Nat.antidiagonal (n + m - 1), Nat.choose (n + m - 1) m_1.fst • (x ^ m_1.fst * y ^ m_1.snd) = 0\n[PROOFSTEP]\napply Finset.sum_eq_zero\n[GOAL]\ncase h.h\nR S : Type u\nx y : R\ninst✝ : Semiring R\nh_comm : Commute x y\nn : ℕ\nhn : x ^ n = 0\nm : ℕ\nhm : y ^ m = 0\n⊢ ∀ (x_1 : ℕ × ℕ),\n    x_1 ∈ Finset.Nat.antidiagonal (n + m - 1) → Nat.choose (n + m - 1) x_1.fst • (x ^ x_1.fst * y ^ x_1.snd) = 0\n[PROOFSTEP]\nrintro ⟨i, j⟩ hij\n[GOAL]\ncase h.h.mk\nR S : Type u\nx y : R\ninst✝ : Semiring R\nh_comm : Commute x y\nn : ℕ\nhn : x ^ n = 0\nm : ℕ\nhm : y ^ m = 0\ni j : ℕ\nhij : (i, j) ∈ Finset.Nat.antidiagonal (n + m - 1)\n⊢ Nat.choose (n + m - 1) (i, j).fst • (x ^ (i, j).fst * y ^ (i, j).snd) = 0\n[PROOFSTEP]\nsuffices x ^ i * y ^ j = 0 by simp only [this, nsmul_eq_mul, mul_zero]\n[GOAL]\nR S : Type u\nx y : R\ninst✝ : Semiring R\nh_comm : Commute x y\nn : ℕ\nhn : x ^ n = 0\nm : ℕ\nhm : y ^ m = 0\ni j : ℕ\nhij : (i, j) ∈ Finset.Nat.antidiagonal (n + m - 1)\nthis : x ^ i * y ^ j = 0\n⊢ Nat.choose (n + m - 1) (i, j).fst • (x ^ (i, j).fst * y ^ (i, j).snd) = 0\n[PROOFSTEP]\nsimp only [this, nsmul_eq_mul, mul_zero]\n[GOAL]\ncase h.h.mk\nR S : Type u\nx y : R\ninst✝ : Semiring R\nh_comm : Commute x y\nn : ℕ\nhn : x ^ n = 0\nm : ℕ\nhm : y ^ m = 0\ni j : ℕ\nhij : (i, j) ∈ Finset.Nat.antidiagonal (n + m - 1)\n⊢ x ^ i * y ^ j = 0\n[PROOFSTEP]\ncases' Nat.le_or_le_of_add_eq_add_pred (Finset.Nat.mem_antidiagonal.mp hij) with hi hj\n[GOAL]\ncase h.h.mk.inl\nR S : Type u\nx y : R\ninst✝ : Semiring R\nh_comm : Commute x y\nn : ℕ\nhn : x ^ n = 0\nm : ℕ\nhm : y ^ m = 0\ni j : ℕ\nhij : (i, j) ∈ Finset.Nat.antidiagonal (n + m - 1)\nhi : n ≤ (i, j).fst\n⊢ x ^ i * y ^ j = 0\n[PROOFSTEP]\nrw [pow_eq_zero_of_le hi hn, zero_mul]\n[GOAL]\ncase h.h.mk.inr\nR S : Type u\nx y : R\ninst✝ : Semiring R\nh_comm : Commute x y\nn : ℕ\nhn : x ^ n = 0\nm : ℕ\nhm : y ^ m = 0\ni j : ℕ\nhij : (i, j) ∈ Finset.Nat.antidiagonal (n + m - 1)\nhj : m ≤ (i, j).snd\n⊢ x ^ i * y ^ j = 0\n[PROOFSTEP]\nrw [pow_eq_zero_of_le hj hm, mul_zero]\n[GOAL]\nR S : Type u\nx y : R\ninst✝ : Semiring R\nh_comm✝ : Commute x y\nι : Type u_1\ns : Finset ι\nf : ι → R\nhnp : ∀ (i : ι), i ∈ s → IsNilpotent (f i)\nh_comm : ∀ (i j : ι), i ∈ s → j ∈ s → Commute (f i) (f j)\n⊢ IsNilpotent (∑ i in s, f i)\n[PROOFSTEP]\nclassical\ninduction' s using Finset.induction with j s hj ih; simp\nrw [Finset.sum_insert hj]\napply Commute.isNilpotent_add\n· exact Commute.sum_right _ _ _ (fun i hi ↦ h_comm _ _ (by simp) (by simp [hi]))\n· apply hnp; simp\n· exact ih (fun i hi ↦ hnp i (by simp [hi])) (fun i j hi hj ↦ h_comm i j (by simp [hi]) (by simp [hj]))\n[GOAL]\nR S : Type u\nx y : R\ninst✝ : Semiring R\nh_comm✝ : Commute x y\nι : Type u_1\ns : Finset ι\nf : ι → R\nhnp : ∀ (i : ι), i ∈ s → IsNilpotent (f i)\nh_comm : ∀ (i j : ι), i ∈ s → j ∈ s → Commute (f i) (f j)\n⊢ IsNilpotent (∑ i in s, f i)\n[PROOFSTEP]\ninduction' s using Finset.induction with j s hj ih\n[GOAL]\ncase empty\nR S : Type u\nx y : R\ninst✝ : Semiring R\nh_comm✝¹ : Commute x y\nι : Type u_1\ns : Finset ι\nf : ι → R\nhnp✝ : ∀ (i : ι), i ∈ s → IsNilpotent (f i)\nh_comm✝ : ∀ (i j : ι), i ∈ s → j ∈ s → Commute (f i) (f j)\nhnp : ∀ (i : ι), i ∈ ∅ → IsNilpotent (f i)\nh_comm : ∀ (i j : ι), i ∈ ∅ → j ∈ ∅ → Commute (f i) (f j)\n⊢ IsNilpotent (∑ i in ∅, f i)\ncase insert\nR S : Type u\nx y : R\ninst✝ : Semiring R\nh_comm✝¹ : Commute x y\nι : Type u_1\ns✝ : Finset ι\nf : ι → R\nhnp✝ : ∀ (i : ι), i ∈ s✝ → IsNilpotent (f i)\nh_comm✝ : ∀ (i j : ι), i ∈ s✝ → j ∈ s✝ → Commute (f i) (f j)\nj : ι\ns : Finset ι\nhj : ¬j ∈ s\nih :\n  (∀ (i : ι), i ∈ s → IsNilpotent (f i)) →\n    (∀ (i j : ι), i ∈ s → j ∈ s → Commute (f i) (f j)) → IsNilpotent (∑ i in s, f i)\nhnp : ∀ (i : ι), i ∈ insert j s → IsNilpotent (f i)\nh_comm : ∀ (i j_1 : ι), i ∈ insert j s → j_1 ∈ insert j s → Commute (f i) (f j_1)\n⊢ IsNilpotent (∑ i in insert j s, f i)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase insert\nR S : Type u\nx y : R\ninst✝ : Semiring R\nh_comm✝¹ : Commute x y\nι : Type u_1\ns✝ : Finset ι\nf : ι → R\nhnp✝ : ∀ (i : ι), i ∈ s✝ → IsNilpotent (f i)\nh_comm✝ : ∀ (i j : ι), i ∈ s✝ → j ∈ s✝ → Commute (f i) (f j)\nj : ι\ns : Finset ι\nhj : ¬j ∈ s\nih :\n  (∀ (i : ι), i ∈ s → IsNilpotent (f i)) →\n    (∀ (i j : ι), i ∈ s → j ∈ s → Commute (f i) (f j)) → IsNilpotent (∑ i in s, f i)\nhnp : ∀ (i : ι), i ∈ insert j s → IsNilpotent (f i)\nh_comm : ∀ (i j_1 : ι), i ∈ insert j s → j_1 ∈ insert j s → Commute (f i) (f j_1)\n⊢ IsNilpotent (∑ i in insert j s, f i)\n[PROOFSTEP]\nrw [Finset.sum_insert hj]\n[GOAL]\ncase insert\nR S : Type u\nx y : R\ninst✝ : Semiring R\nh_comm✝¹ : Commute x y\nι : Type u_1\ns✝ : Finset ι\nf : ι → R\nhnp✝ : ∀ (i : ι), i ∈ s✝ → IsNilpotent (f i)\nh_comm✝ : ∀ (i j : ι), i ∈ s✝ → j ∈ s✝ → Commute (f i) (f j)\nj : ι\ns : Finset ι\nhj : ¬j ∈ s\nih :\n  (∀ (i : ι), i ∈ s → IsNilpotent (f i)) →\n    (∀ (i j : ι), i ∈ s → j ∈ s → Commute (f i) (f j)) → IsNilpotent (∑ i in s, f i)\nhnp : ∀ (i : ι), i ∈ insert j s → IsNilpotent (f i)\nh_comm : ∀ (i j_1 : ι), i ∈ insert j s → j_1 ∈ insert j s → Commute (f i) (f j_1)\n⊢ IsNilpotent (f j + ∑ x in s, f x)\n[PROOFSTEP]\napply Commute.isNilpotent_add\n[GOAL]\ncase insert.h_comm\nR S : Type u\nx y : R\ninst✝ : Semiring R\nh_comm✝¹ : Commute x y\nι : Type u_1\ns✝ : Finset ι\nf : ι → R\nhnp✝ : ∀ (i : ι), i ∈ s✝ → IsNilpotent (f i)\nh_comm✝ : ∀ (i j : ι), i ∈ s✝ → j ∈ s✝ → Commute (f i) (f j)\nj : ι\ns : Finset ι\nhj : ¬j ∈ s\nih :\n  (∀ (i : ι), i ∈ s → IsNilpotent (f i)) →\n    (∀ (i j : ι), i ∈ s → j ∈ s → Commute (f i) (f j)) → IsNilpotent (∑ i in s, f i)\nhnp : ∀ (i : ι), i ∈ insert j s → IsNilpotent (f i)\nh_comm : ∀ (i j_1 : ι), i ∈ insert j s → j_1 ∈ insert j s → Commute (f i) (f j_1)\n⊢ Commute (f j) (∑ x in s, f x)\n[PROOFSTEP]\nexact Commute.sum_right _ _ _ (fun i hi ↦ h_comm _ _ (by simp) (by simp [hi]))\n[GOAL]\nR S : Type u\nx y : R\ninst✝ : Semiring R\nh_comm✝¹ : Commute x y\nι : Type u_1\ns✝ : Finset ι\nf : ι → R\nhnp✝ : ∀ (i : ι), i ∈ s✝ → IsNilpotent (f i)\nh_comm✝ : ∀ (i j : ι), i ∈ s✝ → j ∈ s✝ → Commute (f i) (f j)\nj : ι\ns : Finset ι\nhj : ¬j ∈ s\nih :\n  (∀ (i : ι), i ∈ s → IsNilpotent (f i)) →\n    (∀ (i j : ι), i ∈ s → j ∈ s → Commute (f i) (f j)) → IsNilpotent (∑ i in s, f i)\nhnp : ∀ (i : ι), i ∈ insert j s → IsNilpotent (f i)\nh_comm : ∀ (i j_1 : ι), i ∈ insert j s → j_1 ∈ insert j s → Commute (f i) (f j_1)\ni : ι\nhi : i ∈ s\n⊢ j ∈ insert j s\n[PROOFSTEP]\nsimp\n[GOAL]\nR S : Type u\nx y : R\ninst✝ : Semiring R\nh_comm✝¹ : Commute x y\nι : Type u_1\ns✝ : Finset ι\nf : ι → R\nhnp✝ : ∀ (i : ι), i ∈ s✝ → IsNilpotent (f i)\nh_comm✝ : ∀ (i j : ι), i ∈ s✝ → j ∈ s✝ → Commute (f i) (f j)\nj : ι\ns : Finset ι\nhj : ¬j ∈ s\nih :\n  (∀ (i : ι), i ∈ s → IsNilpotent (f i)) →\n    (∀ (i j : ι), i ∈ s → j ∈ s → Commute (f i) (f j)) → IsNilpotent (∑ i in s, f i)\nhnp : ∀ (i : ι), i ∈ insert j s → IsNilpotent (f i)\nh_comm : ∀ (i j_1 : ι), i ∈ insert j s → j_1 ∈ insert j s → Commute (f i) (f j_1)\ni : ι\nhi : i ∈ s\n⊢ i ∈ insert j s\n[PROOFSTEP]\nsimp [hi]\n[GOAL]\ncase insert.hx\nR S : Type u\nx y : R\ninst✝ : Semiring R\nh_comm✝¹ : Commute x y\nι : Type u_1\ns✝ : Finset ι\nf : ι → R\nhnp✝ : ∀ (i : ι), i ∈ s✝ → IsNilpotent (f i)\nh_comm✝ : ∀ (i j : ι), i ∈ s✝ → j ∈ s✝ → Commute (f i) (f j)\nj : ι\ns : Finset ι\nhj : ¬j ∈ s\nih :\n  (∀ (i : ι), i ∈ s → IsNilpotent (f i)) →\n    (∀ (i j : ι), i ∈ s → j ∈ s → Commute (f i) (f j)) → IsNilpotent (∑ i in s, f i)\nhnp : ∀ (i : ι), i ∈ insert j s → IsNilpotent (f i)\nh_comm : ∀ (i j_1 : ι), i ∈ insert j s → j_1 ∈ insert j s → Commute (f i) (f j_1)\n⊢ IsNilpotent (f j)\n[PROOFSTEP]\napply hnp\n[GOAL]\ncase insert.hx.a\nR S : Type u\nx y : R\ninst✝ : Semiring R\nh_comm✝¹ : Commute x y\nι : Type u_1\ns✝ : Finset ι\nf : ι → R\nhnp✝ : ∀ (i : ι), i ∈ s✝ → IsNilpotent (f i)\nh_comm✝ : ∀ (i j : ι), i ∈ s✝ → j ∈ s✝ → Commute (f i) (f j)\nj : ι\ns : Finset ι\nhj : ¬j ∈ s\nih :\n  (∀ (i : ι), i ∈ s → IsNilpotent (f i)) →\n    (∀ (i j : ι), i ∈ s → j ∈ s → Commute (f i) (f j)) → IsNilpotent (∑ i in s, f i)\nhnp : ∀ (i : ι), i ∈ insert j s → IsNilpotent (f i)\nh_comm : ∀ (i j_1 : ι), i ∈ insert j s → j_1 ∈ insert j s → Commute (f i) (f j_1)\n⊢ j ∈ insert j s\n[PROOFSTEP]\nsimp\n[GOAL]\ncase insert.hy\nR S : Type u\nx y : R\ninst✝ : Semiring R\nh_comm✝¹ : Commute x y\nι : Type u_1\ns✝ : Finset ι\nf : ι → R\nhnp✝ : ∀ (i : ι), i ∈ s✝ → IsNilpotent (f i)\nh_comm✝ : ∀ (i j : ι), i ∈ s✝ → j ∈ s✝ → Commute (f i) (f j)\nj : ι\ns : Finset ι\nhj : ¬j ∈ s\nih :\n  (∀ (i : ι), i ∈ s → IsNilpotent (f i)) →\n    (∀ (i j : ι), i ∈ s → j ∈ s → Commute (f i) (f j)) → IsNilpotent (∑ i in s, f i)\nhnp : ∀ (i : ι), i ∈ insert j s → IsNilpotent (f i)\nh_comm : ∀ (i j_1 : ι), i ∈ insert j s → j_1 ∈ insert j s → Commute (f i) (f j_1)\n⊢ IsNilpotent (∑ x in s, f x)\n[PROOFSTEP]\nexact ih (fun i hi ↦ hnp i (by simp [hi])) (fun i j hi hj ↦ h_comm i j (by simp [hi]) (by simp [hj]))\n[GOAL]\nR S : Type u\nx y : R\ninst✝ : Semiring R\nh_comm✝¹ : Commute x y\nι : Type u_1\ns✝ : Finset ι\nf : ι → R\nhnp✝ : ∀ (i : ι), i ∈ s✝ → IsNilpotent (f i)\nh_comm✝ : ∀ (i j : ι), i ∈ s✝ → j ∈ s✝ → Commute (f i) (f j)\nj : ι\ns : Finset ι\nhj : ¬j ∈ s\nih :\n  (∀ (i : ι), i ∈ s → IsNilpotent (f i)) →\n    (∀ (i j : ι), i ∈ s → j ∈ s → Commute (f i) (f j)) → IsNilpotent (∑ i in s, f i)\nhnp : ∀ (i : ι), i ∈ insert j s → IsNilpotent (f i)\nh_comm : ∀ (i j_1 : ι), i ∈ insert j s → j_1 ∈ insert j s → Commute (f i) (f j_1)\ni : ι\nhi : i ∈ s\n⊢ i ∈ insert j s\n[PROOFSTEP]\nsimp [hi]\n[GOAL]\nR S : Type u\nx y : R\ninst✝ : Semiring R\nh_comm✝¹ : Commute x y\nι : Type u_1\ns✝ : Finset ι\nf : ι → R\nhnp✝ : ∀ (i : ι), i ∈ s✝ → IsNilpotent (f i)\nh_comm✝ : ∀ (i j : ι), i ∈ s✝ → j ∈ s✝ → Commute (f i) (f j)\nj✝ : ι\ns : Finset ι\nhj✝ : ¬j✝ ∈ s\nih :\n  (∀ (i : ι), i ∈ s → IsNilpotent (f i)) →\n    (∀ (i j : ι), i ∈ s → j ∈ s → Commute (f i) (f j)) → IsNilpotent (∑ i in s, f i)\nhnp : ∀ (i : ι), i ∈ insert j✝ s → IsNilpotent (f i)\nh_comm : ∀ (i j : ι), i ∈ insert j✝ s → j ∈ insert j✝ s → Commute (f i) (f j)\ni j : ι\nhi : i ∈ s\nhj : j ∈ s\n⊢ i ∈ insert j✝ s\n[PROOFSTEP]\nsimp [hi]\n[GOAL]\nR S : Type u\nx y : R\ninst✝ : Semiring R\nh_comm✝¹ : Commute x y\nι : Type u_1\ns✝ : Finset ι\nf : ι → R\nhnp✝ : ∀ (i : ι), i ∈ s✝ → IsNilpotent (f i)\nh_comm✝ : ∀ (i j : ι), i ∈ s✝ → j ∈ s✝ → Commute (f i) (f j)\nj✝ : ι\ns : Finset ι\nhj✝ : ¬j✝ ∈ s\nih :\n  (∀ (i : ι), i ∈ s → IsNilpotent (f i)) →\n    (∀ (i j : ι), i ∈ s → j ∈ s → Commute (f i) (f j)) → IsNilpotent (∑ i in s, f i)\nhnp : ∀ (i : ι), i ∈ insert j✝ s → IsNilpotent (f i)\nh_comm : ∀ (i j : ι), i ∈ insert j✝ s → j ∈ insert j✝ s → Commute (f i) (f j)\ni j : ι\nhi : i ∈ s\nhj : j ∈ s\n⊢ j ∈ insert j✝ s\n[PROOFSTEP]\nsimp [hj]\n[GOAL]\nR S : Type u\nx y : R\ninst✝ : Semiring R\nh_comm : Commute x y\nh : IsNilpotent x\n⊢ IsNilpotent (x * y)\n[PROOFSTEP]\nobtain ⟨n, hn⟩ := h\n[GOAL]\ncase intro\nR S : Type u\nx y : R\ninst✝ : Semiring R\nh_comm : Commute x y\nn : ℕ\nhn : x ^ n = 0\n⊢ IsNilpotent (x * y)\n[PROOFSTEP]\nuse n\n[GOAL]\ncase h\nR S : Type u\nx y : R\ninst✝ : Semiring R\nh_comm : Commute x y\nn : ℕ\nhn : x ^ n = 0\n⊢ (x * y) ^ n = 0\n[PROOFSTEP]\nrw [h_comm.mul_pow, hn, zero_mul]\n[GOAL]\nR S : Type u\nx y : R\ninst✝ : Semiring R\nh_comm : Commute x y\nhy : y ∈ nonZeroDivisorsLeft R\n⊢ IsNilpotent (x * y) ↔ IsNilpotent x\n[PROOFSTEP]\nrefine' ⟨_, h_comm.isNilpotent_mul_left⟩\n[GOAL]\nR S : Type u\nx y : R\ninst✝ : Semiring R\nh_comm : Commute x y\nhy : y ∈ nonZeroDivisorsLeft R\n⊢ IsNilpotent (x * y) → IsNilpotent x\n[PROOFSTEP]\nrintro ⟨k, hk⟩\n[GOAL]\ncase intro\nR S : Type u\nx y : R\ninst✝ : Semiring R\nh_comm : Commute x y\nhy : y ∈ nonZeroDivisorsLeft R\nk : ℕ\nhk : (x * y) ^ k = 0\n⊢ IsNilpotent x\n[PROOFSTEP]\nrw [mul_pow h_comm] at hk \n[GOAL]\ncase intro\nR S : Type u\nx y : R\ninst✝ : Semiring R\nh_comm : Commute x y\nhy : y ∈ nonZeroDivisorsLeft R\nk : ℕ\nhk : x ^ k * y ^ k = 0\n⊢ IsNilpotent x\n[PROOFSTEP]\nexact ⟨k, (nonZeroDivisorsLeft R).pow_mem hy k _ hk⟩\n[GOAL]\nR S : Type u\nx y : R\ninst✝ : Semiring R\nh_comm : Commute x y\nh : IsNilpotent y\n⊢ IsNilpotent (x * y)\n[PROOFSTEP]\nrw [h_comm.eq]\n[GOAL]\nR S : Type u\nx y : R\ninst✝ : Semiring R\nh_comm : Commute x y\nh : IsNilpotent y\n⊢ IsNilpotent (y * x)\n[PROOFSTEP]\nexact h_comm.symm.isNilpotent_mul_left h\n[GOAL]\nR S : Type u\nx y : R\ninst✝ : Semiring R\nh_comm : Commute x y\nhx : x ∈ nonZeroDivisorsRight R\n⊢ IsNilpotent (x * y) ↔ IsNilpotent y\n[PROOFSTEP]\nrefine' ⟨_, h_comm.isNilpotent_mul_right⟩\n[GOAL]\nR S : Type u\nx y : R\ninst✝ : Semiring R\nh_comm : Commute x y\nhx : x ∈ nonZeroDivisorsRight R\n⊢ IsNilpotent (x * y) → IsNilpotent y\n[PROOFSTEP]\nrintro ⟨k, hk⟩\n[GOAL]\ncase intro\nR S : Type u\nx y : R\ninst✝ : Semiring R\nh_comm : Commute x y\nhx : x ∈ nonZeroDivisorsRight R\nk : ℕ\nhk : (x * y) ^ k = 0\n⊢ IsNilpotent y\n[PROOFSTEP]\nrw [mul_pow h_comm] at hk \n[GOAL]\ncase intro\nR S : Type u\nx y : R\ninst✝ : Semiring R\nh_comm : Commute x y\nhx : x ∈ nonZeroDivisorsRight R\nk : ℕ\nhk : x ^ k * y ^ k = 0\n⊢ IsNilpotent y\n[PROOFSTEP]\nexact ⟨k, (nonZeroDivisorsRight R).pow_mem hx k _ hk⟩\n[GOAL]\nR S : Type u\nx y : R\ninst✝ : Ring R\nh_comm : Commute x y\nhx : IsNilpotent x\nhy : IsNilpotent y\n⊢ IsNilpotent (x - y)\n[PROOFSTEP]\nrw [← neg_right_iff] at h_comm \n[GOAL]\nR S : Type u\nx y : R\ninst✝ : Ring R\nh_comm✝ : Commute x y\nh_comm : Commute x (-y)\nhx : IsNilpotent x\nhy : IsNilpotent y\n⊢ IsNilpotent (x - y)\n[PROOFSTEP]\nrw [← isNilpotent_neg_iff] at hy \n[GOAL]\nR S : Type u\nx y : R\ninst✝ : Ring R\nh_comm✝ : Commute x y\nh_comm : Commute x (-y)\nhx : IsNilpotent x\nhy : IsNilpotent (-y)\n⊢ IsNilpotent (x - y)\n[PROOFSTEP]\nrw [sub_eq_add_neg]\n[GOAL]\nR S : Type u\nx y : R\ninst✝ : Ring R\nh_comm✝ : Commute x y\nh_comm : Commute x (-y)\nhx : IsNilpotent x\nhy : IsNilpotent (-y)\n⊢ IsNilpotent (x + -y)\n[PROOFSTEP]\nexact h_comm.isNilpotent_add hx hy\n[GOAL]\nR✝ S : Type u\nx✝ y✝ : R✝\ninst✝¹ : CommSemiring R✝\nx y : R✝\nR : Type u_1\ninst✝ : CommSemiring R\n⊢ sInf {J | ⊥ ≤ J ∧ Ideal.IsPrime J} = sInf {J | Ideal.IsPrime J}\n[PROOFSTEP]\nsimp_rw [and_iff_right bot_le]\n[GOAL]\nR S : Type u\nx✝ y✝ : R\ninst✝ : CommSemiring R\nx y : R\n⊢ IsNilpotent x ↔ ∀ (J : Ideal R), Ideal.IsPrime J → x ∈ J\n[PROOFSTEP]\nrw [← mem_nilradical, nilradical_eq_sInf, Submodule.mem_sInf]\n[GOAL]\nR S : Type u\nx✝ y✝ : R\ninst✝ : CommSemiring R\nx y : R\n⊢ (∀ (p : Submodule R R), p ∈ {J | Ideal.IsPrime J} → x ∈ p) ↔ ∀ (J : Ideal R), Ideal.IsPrime J → x ∈ J\n[PROOFSTEP]\nrfl\n[GOAL]\nR S : Type u\nx y : R\nA : Type v\ninst✝² : CommSemiring R\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\na : A\n⊢ IsNilpotent (mulLeft R a) ↔ IsNilpotent a\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nR S : Type u\nx y : R\nA : Type v\ninst✝² : CommSemiring R\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\na : A\n⊢ IsNilpotent (mulLeft R a) → IsNilpotent a\n[PROOFSTEP]\nrintro ⟨n, hn⟩\n[GOAL]\ncase mpr\nR S : Type u\nx y : R\nA : Type v\ninst✝² : CommSemiring R\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\na : A\n⊢ IsNilpotent a → IsNilpotent (mulLeft R a)\n[PROOFSTEP]\nrintro ⟨n, hn⟩\n[GOAL]\ncase mp.intro\nR S : Type u\nx y : R\nA : Type v\ninst✝² : CommSemiring R\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\na : A\nn : ℕ\nhn : mulLeft R a ^ n = 0\n⊢ IsNilpotent a\n[PROOFSTEP]\nuse n\n[GOAL]\ncase mpr.intro\nR S : Type u\nx y : R\nA : Type v\ninst✝² : CommSemiring R\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\na : A\nn : ℕ\nhn : a ^ n = 0\n⊢ IsNilpotent (mulLeft R a)\n[PROOFSTEP]\nuse n\n[GOAL]\ncase h\nR S : Type u\nx y : R\nA : Type v\ninst✝² : CommSemiring R\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\na : A\nn : ℕ\nhn : mulLeft R a ^ n = 0\n⊢ a ^ n = 0\n[PROOFSTEP]\nsimp only [mulLeft_eq_zero_iff, pow_mulLeft] at hn ⊢\n[GOAL]\ncase h\nR S : Type u\nx y : R\nA : Type v\ninst✝² : CommSemiring R\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\na : A\nn : ℕ\nhn : a ^ n = 0\n⊢ mulLeft R a ^ n = 0\n[PROOFSTEP]\nsimp only [mulLeft_eq_zero_iff, pow_mulLeft] at hn ⊢\n[GOAL]\ncase h\nR S : Type u\nx y : R\nA : Type v\ninst✝² : CommSemiring R\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\na : A\nn : ℕ\nhn : a ^ n = 0\n⊢ a ^ n = 0\n[PROOFSTEP]\nexact hn\n[GOAL]\ncase h\nR S : Type u\nx y : R\nA : Type v\ninst✝² : CommSemiring R\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\na : A\nn : ℕ\nhn : a ^ n = 0\n⊢ a ^ n = 0\n[PROOFSTEP]\nexact hn\n[GOAL]\nR S : Type u\nx y : R\nA : Type v\ninst✝² : CommSemiring R\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\na : A\n⊢ IsNilpotent (mulRight R a) ↔ IsNilpotent a\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nR S : Type u\nx y : R\nA : Type v\ninst✝² : CommSemiring R\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\na : A\n⊢ IsNilpotent (mulRight R a) → IsNilpotent a\n[PROOFSTEP]\nrintro ⟨n, hn⟩\n[GOAL]\ncase mpr\nR S : Type u\nx y : R\nA : Type v\ninst✝² : CommSemiring R\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\na : A\n⊢ IsNilpotent a → IsNilpotent (mulRight R a)\n[PROOFSTEP]\nrintro ⟨n, hn⟩\n[GOAL]\ncase mp.intro\nR S : Type u\nx y : R\nA : Type v\ninst✝² : CommSemiring R\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\na : A\nn : ℕ\nhn : mulRight R a ^ n = 0\n⊢ IsNilpotent a\n[PROOFSTEP]\nuse n\n[GOAL]\ncase mpr.intro\nR S : Type u\nx y : R\nA : Type v\ninst✝² : CommSemiring R\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\na : A\nn : ℕ\nhn : a ^ n = 0\n⊢ IsNilpotent (mulRight R a)\n[PROOFSTEP]\nuse n\n[GOAL]\ncase h\nR S : Type u\nx y : R\nA : Type v\ninst✝² : CommSemiring R\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\na : A\nn : ℕ\nhn : mulRight R a ^ n = 0\n⊢ a ^ n = 0\n[PROOFSTEP]\nsimp only [mulRight_eq_zero_iff, pow_mulRight] at hn ⊢\n[GOAL]\ncase h\nR S : Type u\nx y : R\nA : Type v\ninst✝² : CommSemiring R\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\na : A\nn : ℕ\nhn : a ^ n = 0\n⊢ mulRight R a ^ n = 0\n[PROOFSTEP]\nsimp only [mulRight_eq_zero_iff, pow_mulRight] at hn ⊢\n[GOAL]\ncase h\nR S : Type u\nx y : R\nA : Type v\ninst✝² : CommSemiring R\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\na : A\nn : ℕ\nhn : a ^ n = 0\n⊢ a ^ n = 0\n[PROOFSTEP]\nexact hn\n[GOAL]\ncase h\nR S : Type u\nx y : R\nA : Type v\ninst✝² : CommSemiring R\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\na : A\nn : ℕ\nhn : a ^ n = 0\n⊢ a ^ n = 0\n[PROOFSTEP]\nexact hn\n[GOAL]\nR S : Type u\nx y : R\nM : Type v\ninst✝² : Ring R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nf : End R M\np : Submodule R M\nhp : p ≤ Submodule.comap f p\nhnp : IsNilpotent f\n⊢ IsNilpotent (Submodule.mapQ p p f hp)\n[PROOFSTEP]\nobtain ⟨k, hk⟩ := hnp\n[GOAL]\ncase intro\nR S : Type u\nx y : R\nM : Type v\ninst✝² : Ring R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nf : End R M\np : Submodule R M\nhp : p ≤ Submodule.comap f p\nk : ℕ\nhk : f ^ k = 0\n⊢ IsNilpotent (Submodule.mapQ p p f hp)\n[PROOFSTEP]\nuse k\n[GOAL]\ncase h\nR S : Type u\nx y : R\nM : Type v\ninst✝² : Ring R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nf : End R M\np : Submodule R M\nhp : p ≤ Submodule.comap f p\nk : ℕ\nhk : f ^ k = 0\n⊢ Submodule.mapQ p p f hp ^ k = 0\n[PROOFSTEP]\nsimp [← p.mapQ_pow, hk]\n", "meta": {"mathlib_filename": "Mathlib.RingTheory.Nilpotent", "llama_tokens": 13075, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8031738057795403, "lm_q2_score": 0.6654105521116443, "lm_q1q2_score": 0.5344403255453746}}
{"text": "[GOAL]\nX Y Z : AddCommGroupCat\nf : X ⟶ Y\ng : Y ⟶ Z\n⊢ Exact f g ↔ AddMonoidHom.range f = AddMonoidHom.ker g\n[PROOFSTEP]\nrw [Abelian.exact_iff' f g (kernelIsLimit _) (cokernelIsColimit _)]\n[GOAL]\nX Y Z : AddCommGroupCat\nf : X ⟶ Y\ng : Y ⟶ Z\n⊢ f ≫ g = 0 ∧ Fork.ι (kernelCone g) ≫ Cofork.π (cokernelCocone f) = 0 ↔ AddMonoidHom.range f = AddMonoidHom.ker g\n[PROOFSTEP]\nexact\n  ⟨fun h =>\n    ((AddMonoidHom.range_le_ker_iff _ _).mpr h.left).antisymm ((QuotientAddGroup.ker_le_range_iff _ _).mpr h.right),\n    fun h => ⟨(AddMonoidHom.range_le_ker_iff _ _).mp h.le, (QuotientAddGroup.ker_le_range_iff _ _).mp h.symm.le⟩⟩\n[GOAL]\nX Y Z : AddCommGroupCat\nf : X ⟶ Y\ng : Y ⟶ Z\nJ : Type u\ninst✝¹ : SmallCategory J\ninst✝ : IsFiltered J\n⊢ PreservesFiniteLimits colim\n[PROOFSTEP]\nrefine Functor.preservesFiniteLimitsOfMapExact _ fun F G H η γ h => (exact_iff _ _).mpr (le_antisymm ?_ ?_)\n[GOAL]\ncase refine_1\nX Y Z : AddCommGroupCat\nf : X ⟶ Y\ng : Y ⟶ Z\nJ : Type u\ninst✝¹ : SmallCategory J\ninst✝ : IsFiltered J\nF G H : J ⥤ AddCommGroupCat\nη : F ⟶ G\nγ : G ⟶ H\nh : Exact η γ\n⊢ AddMonoidHom.range (colim.map η) ≤ AddMonoidHom.ker (colim.map γ)\ncase refine_2\nX Y Z : AddCommGroupCat\nf : X ⟶ Y\ng : Y ⟶ Z\nJ : Type u\ninst✝¹ : SmallCategory J\ninst✝ : IsFiltered J\nF G H : J ⥤ AddCommGroupCat\nη : F ⟶ G\nγ : G ⟶ H\nh : Exact η γ\n⊢ AddMonoidHom.ker (colim.map γ) ≤ AddMonoidHom.range (colim.map η)\n[PROOFSTEP]\nall_goals replace h : ∀ j : J, Exact (η.app j) (γ.app j) := fun j => Functor.map_exact ((evaluation _ _).obj j) η γ h\n[GOAL]\ncase refine_1\nX Y Z : AddCommGroupCat\nf : X ⟶ Y\ng : Y ⟶ Z\nJ : Type u\ninst✝¹ : SmallCategory J\ninst✝ : IsFiltered J\nF G H : J ⥤ AddCommGroupCat\nη : F ⟶ G\nγ : G ⟶ H\nh : Exact η γ\n⊢ AddMonoidHom.range (colim.map η) ≤ AddMonoidHom.ker (colim.map γ)\n[PROOFSTEP]\nreplace h : ∀ j : J, Exact (η.app j) (γ.app j) := fun j => Functor.map_exact ((evaluation _ _).obj j) η γ h\n[GOAL]\ncase refine_2\nX Y Z : AddCommGroupCat\nf : X ⟶ Y\ng : Y ⟶ Z\nJ : Type u\ninst✝¹ : SmallCategory J\ninst✝ : IsFiltered J\nF G H : J ⥤ AddCommGroupCat\nη : F ⟶ G\nγ : G ⟶ H\nh : Exact η γ\n⊢ AddMonoidHom.ker (colim.map γ) ≤ AddMonoidHom.range (colim.map η)\n[PROOFSTEP]\nreplace h : ∀ j : J, Exact (η.app j) (γ.app j) := fun j => Functor.map_exact ((evaluation _ _).obj j) η γ h\n[GOAL]\ncase refine_1\nX Y Z : AddCommGroupCat\nf : X ⟶ Y\ng : Y ⟶ Z\nJ : Type u\ninst✝¹ : SmallCategory J\ninst✝ : IsFiltered J\nF G H : J ⥤ AddCommGroupCat\nη : F ⟶ G\nγ : G ⟶ H\nh : ∀ (j : J), Exact (NatTrans.app η j) (NatTrans.app γ j)\n⊢ AddMonoidHom.range (colim.map η) ≤ AddMonoidHom.ker (colim.map γ)\n[PROOFSTEP]\nrw [AddMonoidHom.range_le_ker_iff, ← comp_def]\n[GOAL]\ncase refine_1\nX Y Z : AddCommGroupCat\nf : X ⟶ Y\ng : Y ⟶ Z\nJ : Type u\ninst✝¹ : SmallCategory J\ninst✝ : IsFiltered J\nF G H : J ⥤ AddCommGroupCat\nη : F ⟶ G\nγ : G ⟶ H\nh : ∀ (j : J), Exact (NatTrans.app η j) (NatTrans.app γ j)\n⊢ colim.map η ≫ colim.map γ = 0\n[PROOFSTEP]\nexact colimit.hom_ext fun j => by simp [reassoc_of% (h j).w]\n[GOAL]\nX Y Z : AddCommGroupCat\nf : X ⟶ Y\ng : Y ⟶ Z\nJ : Type u\ninst✝¹ : SmallCategory J\ninst✝ : IsFiltered J\nF G H : J ⥤ AddCommGroupCat\nη : F ⟶ G\nγ : G ⟶ H\nh : ∀ (j : J), Exact (NatTrans.app η j) (NatTrans.app γ j)\nj : J\n⊢ colimit.ι F j ≫ colim.map η ≫ colim.map γ = colimit.ι F j ≫ 0\n[PROOFSTEP]\nsimp [reassoc_of% (h j).w]\n[GOAL]\ncase refine_2\nX Y Z : AddCommGroupCat\nf : X ⟶ Y\ng : Y ⟶ Z\nJ : Type u\ninst✝¹ : SmallCategory J\ninst✝ : IsFiltered J\nF G H : J ⥤ AddCommGroupCat\nη : F ⟶ G\nγ : G ⟶ H\nh : ∀ (j : J), Exact (NatTrans.app η j) (NatTrans.app γ j)\n⊢ AddMonoidHom.ker (colim.map γ) ≤ AddMonoidHom.range (colim.map η)\n[PROOFSTEP]\nintro x (hx : _ = _)\n[GOAL]\ncase refine_2\nX Y Z : AddCommGroupCat\nf : X ⟶ Y\ng : Y ⟶ Z\nJ : Type u\ninst✝¹ : SmallCategory J\ninst✝ : IsFiltered J\nF G H : J ⥤ AddCommGroupCat\nη : F ⟶ G\nγ : G ⟶ H\nh : ∀ (j : J), Exact (NatTrans.app η j) (NatTrans.app γ j)\nx : ↑(colim.obj G)\nhx : ↑(colim.map γ) x = 0\n⊢ x ∈ AddMonoidHom.range (colim.map η)\n[PROOFSTEP]\nrcases Concrete.colimit_exists_rep G x with ⟨j, y, rfl⟩\n[GOAL]\ncase refine_2.intro.intro\nX Y Z : AddCommGroupCat\nf : X ⟶ Y\ng : Y ⟶ Z\nJ : Type u\ninst✝¹ : SmallCategory J\ninst✝ : IsFiltered J\nF G H : J ⥤ AddCommGroupCat\nη : F ⟶ G\nγ : G ⟶ H\nh : ∀ (j : J), Exact (NatTrans.app η j) (NatTrans.app γ j)\nj : J\ny : (forget AddCommGroupCat).obj (G.obj j)\nhx : ↑(colim.map γ) (↑(colimit.ι G j) y) = 0\n⊢ ↑(colimit.ι G j) y ∈ AddMonoidHom.range (colim.map η)\n[PROOFSTEP]\nerw [← comp_apply, colimit.ι_map, comp_apply, ← map_zero (by exact colimit.ι H j : H.obj j →+ ↑(colimit H))] at hx \n[GOAL]\nX Y Z : AddCommGroupCat\nf : X ⟶ Y\ng : Y ⟶ Z\nJ : Type u\ninst✝¹ : SmallCategory J\ninst✝ : IsFiltered J\nF G H : J ⥤ AddCommGroupCat\nη : F ⟶ G\nγ : G ⟶ H\nh : ∀ (j : J), Exact (NatTrans.app η j) (NatTrans.app γ j)\nj : J\ny : (forget AddCommGroupCat).obj (G.obj j)\nhx : ↑(colimit.ι H j) (↑(NatTrans.app γ j) y) = 0\n⊢ ↑(H.obj j) →+ ↑(colimit H)\n[PROOFSTEP]\nexact colimit.ι H j\n[GOAL]\ncase refine_2.intro.intro\nX Y Z : AddCommGroupCat\nf : X ⟶ Y\ng : Y ⟶ Z\nJ : Type u\ninst✝¹ : SmallCategory J\ninst✝ : IsFiltered J\nF G H : J ⥤ AddCommGroupCat\nη : F ⟶ G\nγ : G ⟶ H\nh : ∀ (j : J), Exact (NatTrans.app η j) (NatTrans.app γ j)\nj : J\ny : (forget AddCommGroupCat).obj (G.obj j)\nhx✝ : ↑(colimit.ι H j) (↑(NatTrans.app γ j) y) = 0\nhx : ↑(colimit.ι H j) (↑(NatTrans.app γ j) y) = ↑(colimit.ι H j) 0\n⊢ ↑(colimit.ι G j) y ∈ AddMonoidHom.range (colim.map η)\n[PROOFSTEP]\nrcases Concrete.colimit_exists_of_rep_eq H _ _ hx with ⟨k, e₁, e₂, hk : _ = H.map e₂ 0⟩\n[GOAL]\ncase refine_2.intro.intro.intro.intro.intro\nX Y Z : AddCommGroupCat\nf : X ⟶ Y\ng : Y ⟶ Z\nJ : Type u\ninst✝¹ : SmallCategory J\ninst✝ : IsFiltered J\nF G H : J ⥤ AddCommGroupCat\nη : F ⟶ G\nγ : G ⟶ H\nh : ∀ (j : J), Exact (NatTrans.app η j) (NatTrans.app γ j)\nj : J\ny : (forget AddCommGroupCat).obj (G.obj j)\nhx✝ : ↑(colimit.ι H j) (↑(NatTrans.app γ j) y) = 0\nhx : ↑(colimit.ι H j) (↑(NatTrans.app γ j) y) = ↑(colimit.ι H j) 0\nk : J\ne₁ e₂ : j ⟶ k\nhk : ↑(H.map e₁) (↑(NatTrans.app γ j) y) = ↑(H.map e₂) 0\n⊢ ↑(colimit.ι G j) y ∈ AddMonoidHom.range (colim.map η)\n[PROOFSTEP]\nrw [map_zero, ← comp_apply, ← NatTrans.naturality, comp_apply] at hk \n[GOAL]\ncase refine_2.intro.intro.intro.intro.intro\nX Y Z : AddCommGroupCat\nf : X ⟶ Y\ng : Y ⟶ Z\nJ : Type u\ninst✝¹ : SmallCategory J\ninst✝ : IsFiltered J\nF G H : J ⥤ AddCommGroupCat\nη : F ⟶ G\nγ : G ⟶ H\nh : ∀ (j : J), Exact (NatTrans.app η j) (NatTrans.app γ j)\nj : J\ny : (forget AddCommGroupCat).obj (G.obj j)\nhx✝ : ↑(colimit.ι H j) (↑(NatTrans.app γ j) y) = 0\nhx : ↑(colimit.ι H j) (↑(NatTrans.app γ j) y) = ↑(colimit.ι H j) 0\nk : J\ne₁ e₂ : j ⟶ k\nhk : ↑(NatTrans.app γ k) (↑(G.map e₁) y) = 0\n⊢ ↑(colimit.ι G j) y ∈ AddMonoidHom.range (colim.map η)\n[PROOFSTEP]\nrcases((exact_iff _ _).mp <| h k).ge hk with ⟨t, ht⟩\n[GOAL]\ncase refine_2.intro.intro.intro.intro.intro.intro\nX Y Z : AddCommGroupCat\nf : X ⟶ Y\ng : Y ⟶ Z\nJ : Type u\ninst✝¹ : SmallCategory J\ninst✝ : IsFiltered J\nF G H : J ⥤ AddCommGroupCat\nη : F ⟶ G\nγ : G ⟶ H\nh : ∀ (j : J), Exact (NatTrans.app η j) (NatTrans.app γ j)\nj : J\ny : (forget AddCommGroupCat).obj (G.obj j)\nhx✝ : ↑(colimit.ι H j) (↑(NatTrans.app γ j) y) = 0\nhx : ↑(colimit.ι H j) (↑(NatTrans.app γ j) y) = ↑(colimit.ι H j) 0\nk : J\ne₁ e₂ : j ⟶ k\nhk : ↑(NatTrans.app γ k) (↑(G.map e₁) y) = 0\nt : ↑(F.obj k)\nht : ↑(NatTrans.app η k) t = ↑(G.map e₁) y\n⊢ ↑(colimit.ι G j) y ∈ AddMonoidHom.range (colim.map η)\n[PROOFSTEP]\nuse colimit.ι F k t\n[GOAL]\ncase h\nX Y Z : AddCommGroupCat\nf : X ⟶ Y\ng : Y ⟶ Z\nJ : Type u\ninst✝¹ : SmallCategory J\ninst✝ : IsFiltered J\nF G H : J ⥤ AddCommGroupCat\nη : F ⟶ G\nγ : G ⟶ H\nh : ∀ (j : J), Exact (NatTrans.app η j) (NatTrans.app γ j)\nj : J\ny : (forget AddCommGroupCat).obj (G.obj j)\nhx✝ : ↑(colimit.ι H j) (↑(NatTrans.app γ j) y) = 0\nhx : ↑(colimit.ι H j) (↑(NatTrans.app γ j) y) = ↑(colimit.ι H j) 0\nk : J\ne₁ e₂ : j ⟶ k\nhk : ↑(NatTrans.app γ k) (↑(G.map e₁) y) = 0\nt : ↑(F.obj k)\nht : ↑(NatTrans.app η k) t = ↑(G.map e₁) y\n⊢ ↑(colim.map η) (↑(colimit.ι F k) t) = ↑(colimit.ι G j) y\n[PROOFSTEP]\nerw [← comp_apply, colimit.ι_map, comp_apply, ht]\n[GOAL]\ncase h\nX Y Z : AddCommGroupCat\nf : X ⟶ Y\ng : Y ⟶ Z\nJ : Type u\ninst✝¹ : SmallCategory J\ninst✝ : IsFiltered J\nF G H : J ⥤ AddCommGroupCat\nη : F ⟶ G\nγ : G ⟶ H\nh : ∀ (j : J), Exact (NatTrans.app η j) (NatTrans.app γ j)\nj : J\ny : (forget AddCommGroupCat).obj (G.obj j)\nhx✝ : ↑(colimit.ι H j) (↑(NatTrans.app γ j) y) = 0\nhx : ↑(colimit.ι H j) (↑(NatTrans.app γ j) y) = ↑(colimit.ι H j) 0\nk : J\ne₁ e₂ : j ⟶ k\nhk : ↑(NatTrans.app γ k) (↑(G.map e₁) y) = 0\nt : ↑(F.obj k)\nht : ↑(NatTrans.app η k) t = ↑(G.map e₁) y\n⊢ ↑(colimit.ι G k) (↑(G.map e₁) y) = ↑(colimit.ι G j) y\n[PROOFSTEP]\nexact colimit.w_apply G e₁ y\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Category.GroupCat.Abelian", "llama_tokens": 4481, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7905303285397349, "lm_q2_score": 0.6757645944891558, "lm_q1q2_score": 0.5342124068970331}}
{"text": "[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝¹ : CommMonoid M\ninst✝ : OrderedCommMonoid N\nf : M → N\np : M → Prop\nh_mul : ∀ (x y : M), p x → p y → f (x * y) ≤ f x * f y\nhp_mul : ∀ (x y : M), p x → p y → p (x * y)\ng : ι → M\ns : Finset ι\nhs_nonempty : Finset.Nonempty s\nhs : ∀ (i : ι), i ∈ s → p (g i)\n⊢ f (∏ i in s, g i) ≤ ∏ i in s, f (g i)\n[PROOFSTEP]\nrefine' le_trans (Multiset.le_prod_nonempty_of_submultiplicative_on_pred f p h_mul hp_mul _ _ _) _\n[GOAL]\ncase refine'_1\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝¹ : CommMonoid M\ninst✝ : OrderedCommMonoid N\nf : M → N\np : M → Prop\nh_mul : ∀ (x y : M), p x → p y → f (x * y) ≤ f x * f y\nhp_mul : ∀ (x y : M), p x → p y → p (x * y)\ng : ι → M\ns : Finset ι\nhs_nonempty : Finset.Nonempty s\nhs : ∀ (i : ι), i ∈ s → p (g i)\n⊢ Multiset.map (fun i => g i) s.val ≠ ∅\n[PROOFSTEP]\nsimp [hs_nonempty.ne_empty]\n[GOAL]\ncase refine'_2\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝¹ : CommMonoid M\ninst✝ : OrderedCommMonoid N\nf : M → N\np : M → Prop\nh_mul : ∀ (x y : M), p x → p y → f (x * y) ≤ f x * f y\nhp_mul : ∀ (x y : M), p x → p y → p (x * y)\ng : ι → M\ns : Finset ι\nhs_nonempty : Finset.Nonempty s\nhs : ∀ (i : ι), i ∈ s → p (g i)\n⊢ ∀ (a : M), a ∈ Multiset.map (fun i => g i) s.val → p a\n[PROOFSTEP]\nexact Multiset.forall_mem_map_iff.mpr hs\n[GOAL]\ncase refine'_3\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝¹ : CommMonoid M\ninst✝ : OrderedCommMonoid N\nf : M → N\np : M → Prop\nh_mul : ∀ (x y : M), p x → p y → f (x * y) ≤ f x * f y\nhp_mul : ∀ (x y : M), p x → p y → p (x * y)\ng : ι → M\ns : Finset ι\nhs_nonempty : Finset.Nonempty s\nhs : ∀ (i : ι), i ∈ s → p (g i)\n⊢ Multiset.prod (Multiset.map f (Multiset.map (fun i => g i) s.val)) ≤ ∏ i in s, f (g i)\n[PROOFSTEP]\nrw [Multiset.map_map]\n[GOAL]\ncase refine'_3\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝¹ : CommMonoid M\ninst✝ : OrderedCommMonoid N\nf : M → N\np : M → Prop\nh_mul : ∀ (x y : M), p x → p y → f (x * y) ≤ f x * f y\nhp_mul : ∀ (x y : M), p x → p y → p (x * y)\ng : ι → M\ns : Finset ι\nhs_nonempty : Finset.Nonempty s\nhs : ∀ (i : ι), i ∈ s → p (g i)\n⊢ Multiset.prod (Multiset.map (f ∘ fun i => g i) s.val) ≤ ∏ i in s, f (g i)\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝¹ : CommMonoid M\ninst✝ : OrderedCommMonoid N\nf : M → N\np : M → Prop\nh_one : f 1 = 1\nh_mul : ∀ (x y : M), p x → p y → f (x * y) ≤ f x * f y\nhp_mul : ∀ (x y : M), p x → p y → p (x * y)\ng : ι → M\ns : Finset ι\nhs : ∀ (i : ι), i ∈ s → p (g i)\n⊢ f (∏ i in s, g i) ≤ ∏ i in s, f (g i)\n[PROOFSTEP]\nrcases eq_empty_or_nonempty s with (rfl | hs_nonempty)\n[GOAL]\ncase inl\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝¹ : CommMonoid M\ninst✝ : OrderedCommMonoid N\nf : M → N\np : M → Prop\nh_one : f 1 = 1\nh_mul : ∀ (x y : M), p x → p y → f (x * y) ≤ f x * f y\nhp_mul : ∀ (x y : M), p x → p y → p (x * y)\ng : ι → M\nhs : ∀ (i : ι), i ∈ ∅ → p (g i)\n⊢ f (∏ i in ∅, g i) ≤ ∏ i in ∅, f (g i)\n[PROOFSTEP]\nsimp [h_one]\n[GOAL]\ncase inr\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝¹ : CommMonoid M\ninst✝ : OrderedCommMonoid N\nf : M → N\np : M → Prop\nh_one : f 1 = 1\nh_mul : ∀ (x y : M), p x → p y → f (x * y) ≤ f x * f y\nhp_mul : ∀ (x y : M), p x → p y → p (x * y)\ng : ι → M\ns : Finset ι\nhs : ∀ (i : ι), i ∈ s → p (g i)\nhs_nonempty : Finset.Nonempty s\n⊢ f (∏ i in s, g i) ≤ ∏ i in s, f (g i)\n[PROOFSTEP]\nexact le_prod_nonempty_of_submultiplicative_on_pred f p h_mul hp_mul g s hs_nonempty hs\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝¹ : CommMonoid M\ninst✝ : OrderedCommMonoid N\nf : M → N\nh_one : f 1 = 1\nh_mul : ∀ (x y : M), f (x * y) ≤ f x * f y\ns : Finset ι\ng : ι → M\n⊢ f (∏ i in s, g i) ≤ ∏ i in s, f (g i)\n[PROOFSTEP]\nrefine' le_trans (Multiset.le_prod_of_submultiplicative f h_one h_mul _) _\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝¹ : CommMonoid M\ninst✝ : OrderedCommMonoid N\nf : M → N\nh_one : f 1 = 1\nh_mul : ∀ (x y : M), f (x * y) ≤ f x * f y\ns : Finset ι\ng : ι → M\n⊢ Multiset.prod (Multiset.map f (Multiset.map (fun i => g i) s.val)) ≤ ∏ i in s, f (g i)\n[PROOFSTEP]\nrw [Multiset.map_map]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝¹ : CommMonoid M\ninst✝ : OrderedCommMonoid N\nf : M → N\nh_one : f 1 = 1\nh_mul : ∀ (x y : M), f (x * y) ≤ f x * f y\ns : Finset ι\ng : ι → M\n⊢ Multiset.prod (Multiset.map (f ∘ fun i => g i) s.val) ≤ ∏ i in s, f (g i)\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝¹ : CommMonoid M\ninst✝ : OrderedCommMonoid N\nf g : ι → N\ns t : Finset ι\nh : ∀ (i : ι), i ∈ s → 1 ≤ f i\n⊢ 1 ≤ ∏ i in s, 1\n[PROOFSTEP]\nrw [prod_const_one]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝¹ : CommMonoid M\ninst✝ : OrderedCommMonoid N\nf g : ι → N\ns t : Finset ι\nh : ∀ (i : ι), i ∈ s → f i ≤ 1\n⊢ ∏ i in s, 1 = 1\n[PROOFSTEP]\nrw [prod_const_one]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝¹ : CommMonoid M\ninst✝ : OrderedCommMonoid N\nf g : ι → N\ns t : Finset ι\nh : s ⊆ t\nhf : ∀ (i : ι), i ∈ t → ¬i ∈ s → 1 ≤ f i\n⊢ ∏ i in s, f i ≤ ∏ i in t, f i\n[PROOFSTEP]\nclassical calc\n  ∏ i in s, f i ≤ (∏ i in t \\ s, f i) * ∏ i in s, f i :=\n    le_mul_of_one_le_left' <| one_le_prod' <| by simpa only [mem_sdiff, and_imp]\n  _ = ∏ i in t \\ s ∪ s, f i := (prod_union sdiff_disjoint).symm\n  _ = ∏ i in t, f i := by rw [sdiff_union_of_subset h]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝¹ : CommMonoid M\ninst✝ : OrderedCommMonoid N\nf g : ι → N\ns t : Finset ι\nh : s ⊆ t\nhf : ∀ (i : ι), i ∈ t → ¬i ∈ s → 1 ≤ f i\n⊢ ∏ i in s, f i ≤ ∏ i in t, f i\n[PROOFSTEP]\ncalc\n  ∏ i in s, f i ≤ (∏ i in t \\ s, f i) * ∏ i in s, f i :=\n    le_mul_of_one_le_left' <| one_le_prod' <| by simpa only [mem_sdiff, and_imp]\n  _ = ∏ i in t \\ s ∪ s, f i := (prod_union sdiff_disjoint).symm\n  _ = ∏ i in t, f i := by rw [sdiff_union_of_subset h]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝¹ : CommMonoid M\ninst✝ : OrderedCommMonoid N\nf g : ι → N\ns t : Finset ι\nh : s ⊆ t\nhf : ∀ (i : ι), i ∈ t → ¬i ∈ s → 1 ≤ f i\n⊢ ∀ (i : ι), i ∈ t \\ s → 1 ≤ f i\n[PROOFSTEP]\nsimpa only [mem_sdiff, and_imp]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝¹ : CommMonoid M\ninst✝ : OrderedCommMonoid N\nf g : ι → N\ns t : Finset ι\nh : s ⊆ t\nhf : ∀ (i : ι), i ∈ t → ¬i ∈ s → 1 ≤ f i\n⊢ ∏ i in t \\ s ∪ s, f i = ∏ i in t, f i\n[PROOFSTEP]\nrw [sdiff_union_of_subset h]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝¹ : CommMonoid M\ninst✝ : OrderedCommMonoid N\nf g : ι → N\ns t : Finset ι\n⊢ (∀ (i : ι), i ∈ s → 1 ≤ f i) → (∏ i in s, f i = 1 ↔ ∀ (i : ι), i ∈ s → f i = 1)\n[PROOFSTEP]\nclassical\nrefine Finset.induction_on s (fun _ ↦ ⟨fun _ _ h ↦ False.elim (Finset.not_mem_empty _ h), fun _ ↦ rfl⟩) ?_\nintro a s ha ih H\nhave : ∀ i ∈ s, 1 ≤ f i := fun _ ↦ H _ ∘ mem_insert_of_mem\nrw [prod_insert ha, mul_eq_one_iff' (H _ <| mem_insert_self _ _) (one_le_prod' this), forall_mem_insert, ih this]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝¹ : CommMonoid M\ninst✝ : OrderedCommMonoid N\nf g : ι → N\ns t : Finset ι\n⊢ (∀ (i : ι), i ∈ s → 1 ≤ f i) → (∏ i in s, f i = 1 ↔ ∀ (i : ι), i ∈ s → f i = 1)\n[PROOFSTEP]\nrefine Finset.induction_on s (fun _ ↦ ⟨fun _ _ h ↦ False.elim (Finset.not_mem_empty _ h), fun _ ↦ rfl⟩) ?_\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝¹ : CommMonoid M\ninst✝ : OrderedCommMonoid N\nf g : ι → N\ns t : Finset ι\n⊢ ∀ ⦃a : ι⦄ {s : Finset ι},\n    ¬a ∈ s →\n      ((∀ (i : ι), i ∈ s → 1 ≤ f i) → (∏ i in s, f i = 1 ↔ ∀ (i : ι), i ∈ s → f i = 1)) →\n        (∀ (i : ι), i ∈ insert a s → 1 ≤ f i) → (∏ i in insert a s, f i = 1 ↔ ∀ (i : ι), i ∈ insert a s → f i = 1)\n[PROOFSTEP]\nintro a s ha ih H\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝¹ : CommMonoid M\ninst✝ : OrderedCommMonoid N\nf g : ι → N\ns✝ t : Finset ι\na : ι\ns : Finset ι\nha : ¬a ∈ s\nih : (∀ (i : ι), i ∈ s → 1 ≤ f i) → (∏ i in s, f i = 1 ↔ ∀ (i : ι), i ∈ s → f i = 1)\nH : ∀ (i : ι), i ∈ insert a s → 1 ≤ f i\n⊢ ∏ i in insert a s, f i = 1 ↔ ∀ (i : ι), i ∈ insert a s → f i = 1\n[PROOFSTEP]\nhave : ∀ i ∈ s, 1 ≤ f i := fun _ ↦ H _ ∘ mem_insert_of_mem\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝¹ : CommMonoid M\ninst✝ : OrderedCommMonoid N\nf g : ι → N\ns✝ t : Finset ι\na : ι\ns : Finset ι\nha : ¬a ∈ s\nih : (∀ (i : ι), i ∈ s → 1 ≤ f i) → (∏ i in s, f i = 1 ↔ ∀ (i : ι), i ∈ s → f i = 1)\nH : ∀ (i : ι), i ∈ insert a s → 1 ≤ f i\nthis : ∀ (i : ι), i ∈ s → 1 ≤ f i\n⊢ ∏ i in insert a s, f i = 1 ↔ ∀ (i : ι), i ∈ insert a s → f i = 1\n[PROOFSTEP]\nrw [prod_insert ha, mul_eq_one_iff' (H _ <| mem_insert_self _ _) (one_le_prod' this), forall_mem_insert, ih this]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝¹ : CommMonoid M\ninst✝ : OrderedCommMonoid N\nf✝ g : ι → N\ns✝ t s : Finset ι\nf : ι → N\nn : N\nh : ∀ (x : ι), x ∈ s → f x ≤ n\n⊢ Finset.prod s f ≤ n ^ card s\n[PROOFSTEP]\nrefine' (Multiset.prod_le_pow_card (s.val.map f) n _).trans _\n[GOAL]\ncase refine'_1\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝¹ : CommMonoid M\ninst✝ : OrderedCommMonoid N\nf✝ g : ι → N\ns✝ t s : Finset ι\nf : ι → N\nn : N\nh : ∀ (x : ι), x ∈ s → f x ≤ n\n⊢ ∀ (x : N), x ∈ Multiset.map f s.val → x ≤ n\n[PROOFSTEP]\nsimpa using h\n[GOAL]\ncase refine'_2\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝¹ : CommMonoid M\ninst✝ : OrderedCommMonoid N\nf✝ g : ι → N\ns✝ t s : Finset ι\nf : ι → N\nn : N\nh : ∀ (x : ι), x ∈ s → f x ≤ n\n⊢ n ^ ↑Multiset.card (Multiset.map f s.val) ≤ n ^ card s\n[PROOFSTEP]\nsimp\n[GOAL]\ncase refine'_2\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝¹ : CommMonoid M\ninst✝ : OrderedCommMonoid N\nf✝ g : ι → N\ns✝ t s : Finset ι\nf : ι → N\nn : N\nh : ∀ (x : ι), x ∈ s → f x ≤ n\n⊢ n ^ ↑Multiset.card s.val ≤ n ^ card s\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG✝ : Type u_6\nk : Type u_7\nR : Type u_8\nG : Type u_9\ninst✝ : LinearOrderedAddCommGroup G\nf : ι → G\ns : Finset ι\nhf : ∀ (i : ι), i ∈ s → 0 ≤ f i\n⊢ |∑ i in s, f i| = ∑ i in s, f i\n[PROOFSTEP]\nrw [abs_of_nonneg (Finset.sum_nonneg hf)]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG✝ : Type u_6\nk : Type u_7\nR : Type u_8\nG : Type u_9\ninst✝ : LinearOrderedAddCommGroup G\nf : ι → G\ns : Finset ι\nhf : ∀ (i : ι), 0 ≤ f i\n⊢ |∑ i in s, f i| = ∑ i in s, f i\n[PROOFSTEP]\nrw [abs_of_nonneg (Finset.sum_nonneg' hf)]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : DecidableEq β\nf : α → β\ns : Finset α\nt : Finset β\nHf : ∀ (a : α), a ∈ s → f a ∈ t\nn : ℕ\nhn : ∀ (a : β), a ∈ t → card (filter (fun x => f x = a) s) ≤ n\n⊢ ∑ _a in t, n = n * card t\n[PROOFSTEP]\nsimp [mul_comm]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : DecidableEq β\nf : α → β\ns : Finset α\nt : Finset β\nHf : ∀ (a : α), a ∈ s → f a ∈ t\nn : ℕ\nhn : ∀ (a : β), a ∈ t → n ≤ card (filter (fun x => f x = a) s)\n⊢ n * card t = ∑ _a in t, n\n[PROOFSTEP]\nsimp [mul_comm]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : DecidableEq β\nf : α → β\ns : Finset α\nt : Finset β\nHf : ∀ (a : α), a ∈ s → f a ∈ t\nn : ℕ\nhn : ∀ (a : β), a ∈ t → n ≤ card (filter (fun x => f x = a) s)\n⊢ ∑ a in t, card (filter (fun x => f x = a) s) = card s\n[PROOFSTEP]\nrw [← card_eq_sum_card_fiberwise Hf]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : DecidableEq α\ns : Finset α\nB : Finset (Finset α)\nn : ℕ\nh : ∀ (a : α), a ∈ s → card (filter ((fun x x_1 => x ∈ x_1) a) B) ≤ n\n⊢ ∑ t in B, card (s ∩ t) ≤ card s * n\n[PROOFSTEP]\nrefine' le_trans _ (s.sum_le_card_nsmul _ _ h)\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : DecidableEq α\ns : Finset α\nB : Finset (Finset α)\nn : ℕ\nh : ∀ (a : α), a ∈ s → card (filter ((fun x x_1 => x ∈ x_1) a) B) ≤ n\n⊢ ∑ t in B, card (s ∩ t) ≤ ∑ x in s, card (filter ((fun x x_1 => x ∈ x_1) x) B)\n[PROOFSTEP]\nsimp_rw [← filter_mem_eq_inter, card_eq_sum_ones, sum_filter]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : DecidableEq α\ns : Finset α\nB : Finset (Finset α)\nn : ℕ\nh : ∀ (a : α), a ∈ s → card (filter ((fun x x_1 => x ∈ x_1) a) B) ≤ n\n⊢ (∑ x in B, ∑ a in s, if a ∈ x then 1 else 0) ≤ ∑ x in s, ∑ a in B, if x ∈ a then 1 else 0\n[PROOFSTEP]\nexact sum_comm.le\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝¹ : DecidableEq α\ns : Finset α\nB : Finset (Finset α)\nn : ℕ\ninst✝ : Fintype α\nh : ∀ (a : α), card (filter ((fun x x_1 => x ∈ x_1) a) B) ≤ n\n⊢ ∑ s in B, card s = ∑ s in B, card (univ ∩ s)\n[PROOFSTEP]\nsimp_rw [univ_inter]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : DecidableEq α\ns : Finset α\nB : Finset (Finset α)\nn : ℕ\nh : ∀ (a : α), a ∈ s → n ≤ card (filter ((fun x x_1 => x ∈ x_1) a) B)\n⊢ card s * n ≤ ∑ t in B, card (s ∩ t)\n[PROOFSTEP]\napply (s.card_nsmul_le_sum _ _ h).trans\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : DecidableEq α\ns : Finset α\nB : Finset (Finset α)\nn : ℕ\nh : ∀ (a : α), a ∈ s → n ≤ card (filter ((fun x x_1 => x ∈ x_1) a) B)\n⊢ ∑ x in s, card (filter ((fun x x_1 => x ∈ x_1) x) B) ≤ ∑ t in B, card (s ∩ t)\n[PROOFSTEP]\nsimp_rw [← filter_mem_eq_inter, card_eq_sum_ones, sum_filter]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : DecidableEq α\ns : Finset α\nB : Finset (Finset α)\nn : ℕ\nh : ∀ (a : α), a ∈ s → n ≤ card (filter ((fun x x_1 => x ∈ x_1) a) B)\n⊢ (∑ x in s, ∑ a in B, if x ∈ a then 1 else 0) ≤ ∑ x in B, ∑ a in s, if a ∈ x then 1 else 0\n[PROOFSTEP]\nexact sum_comm.le\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝¹ : DecidableEq α\ns : Finset α\nB : Finset (Finset α)\nn : ℕ\ninst✝ : Fintype α\nh : ∀ (a : α), n ≤ card (filter ((fun x x_1 => x ∈ x_1) a) B)\n⊢ ∑ s in B, card (univ ∩ s) = ∑ s in B, card s\n[PROOFSTEP]\nsimp_rw [univ_inter]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝¹ : DecidableEq α\ns : Finset α\nB : Finset (Finset α)\nn : ℕ\ninst✝ : Fintype α\nh : ∀ (a : α), card (filter ((fun x x_1 => x ∈ x_1) a) B) = n\n⊢ ∑ s in B, card s = Fintype.card α * n\n[PROOFSTEP]\nsimp_rw [Fintype.card, ← sum_card_inter fun a _ ↦ h a, univ_inter]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : DecidableEq α\ns✝ : Finset α\nB : Finset (Finset α)\nn : ℕ\ns : Finset ι\nf : ι → Finset α\nhs : Set.PairwiseDisjoint (↑s) f\nhf : ∀ (i : ι), i ∈ s → Finset.Nonempty (f i)\n⊢ card s ≤ card (Finset.biUnion s f)\n[PROOFSTEP]\nrw [card_biUnion hs, card_eq_sum_ones]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : DecidableEq α\ns✝ : Finset α\nB : Finset (Finset α)\nn : ℕ\ns : Finset ι\nf : ι → Finset α\nhs : Set.PairwiseDisjoint (↑s) f\nhf : ∀ (i : ι), i ∈ s → Finset.Nonempty (f i)\n⊢ ∑ x in s, 1 ≤ ∑ u in s, card (f u)\n[PROOFSTEP]\nexact sum_le_sum fun i hi ↦ (hf i hi).card_pos\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : DecidableEq α\ns✝ : Finset α\nB : Finset (Finset α)\nn : ℕ\ns : Finset ι\nf : ι → Finset α\nhs : Set.PairwiseDisjoint (↑s) f\n⊢ card s ≤ card (Finset.biUnion s f) + card (filter (fun i => f i = ∅) s)\n[PROOFSTEP]\nrw [← Finset.filter_card_add_filter_neg_card_eq_card fun i ↦ f i = ∅, add_comm]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : DecidableEq α\ns✝ : Finset α\nB : Finset (Finset α)\nn : ℕ\ns : Finset ι\nf : ι → Finset α\nhs : Set.PairwiseDisjoint (↑s) f\n⊢ card (filter (fun a => ¬f a = ∅) s) + card (filter (fun i => f i = ∅) s) ≤\n    card (Finset.biUnion s f) + card (filter (fun i => f i = ∅) s)\n[PROOFSTEP]\nexact\n  add_le_add_right\n    ((card_le_card_biUnion (hs.subset <| filter_subset _ _) fun i hi ↦\n          nonempty_of_ne_empty <| (mem_filter.1 hi).2).trans <|\n      card_le_of_subset <| biUnion_subset_biUnion_of_subset_left _ <| filter_subset _ _)\n    _\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : CanonicallyOrderedMonoid M\nf : ι → M\ns t : Finset ι\nh : ∀ (x : ι), x ∈ s → f x ≠ 1 → x ∈ t\n⊢ ∏ x in s, f x ≤ ∏ x in t, f x\n[PROOFSTEP]\nclassical calc\n  ∏ x in s, f x = (∏ x in s.filter fun x ↦ f x = 1, f x) * ∏ x in s.filter fun x ↦ f x ≠ 1, f x :=\n    by\n    rw [← prod_union, filter_union_filter_neg_eq]\n    exact disjoint_filter.2 fun _ _ h n_h ↦ n_h h\n  _ ≤ ∏ x in t, f x :=\n    mul_le_of_le_one_of_le (prod_le_one' <| by simp only [mem_filter, and_imp]; exact fun _ _ ↦ le_of_eq)\n      (prod_le_prod_of_subset' <| by simpa only [subset_iff, mem_filter, and_imp])\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : CanonicallyOrderedMonoid M\nf : ι → M\ns t : Finset ι\nh : ∀ (x : ι), x ∈ s → f x ≠ 1 → x ∈ t\n⊢ ∏ x in s, f x ≤ ∏ x in t, f x\n[PROOFSTEP]\ncalc\n  ∏ x in s, f x = (∏ x in s.filter fun x ↦ f x = 1, f x) * ∏ x in s.filter fun x ↦ f x ≠ 1, f x :=\n    by\n    rw [← prod_union, filter_union_filter_neg_eq]\n    exact disjoint_filter.2 fun _ _ h n_h ↦ n_h h\n  _ ≤ ∏ x in t, f x :=\n    mul_le_of_le_one_of_le (prod_le_one' <| by simp only [mem_filter, and_imp]; exact fun _ _ ↦ le_of_eq)\n      (prod_le_prod_of_subset' <| by simpa only [subset_iff, mem_filter, and_imp])\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : CanonicallyOrderedMonoid M\nf : ι → M\ns t : Finset ι\nh : ∀ (x : ι), x ∈ s → f x ≠ 1 → x ∈ t\n⊢ ∏ x in s, f x = (∏ x in filter (fun x => f x = 1) s, f x) * ∏ x in filter (fun x => f x ≠ 1) s, f x\n[PROOFSTEP]\nrw [← prod_union, filter_union_filter_neg_eq]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : CanonicallyOrderedMonoid M\nf : ι → M\ns t : Finset ι\nh : ∀ (x : ι), x ∈ s → f x ≠ 1 → x ∈ t\n⊢ Disjoint (filter (fun x => f x = 1) s) (filter (fun x => f x ≠ 1) s)\n[PROOFSTEP]\nexact disjoint_filter.2 fun _ _ h n_h ↦ n_h h\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : CanonicallyOrderedMonoid M\nf : ι → M\ns t : Finset ι\nh : ∀ (x : ι), x ∈ s → f x ≠ 1 → x ∈ t\n⊢ ∀ (i : ι), i ∈ filter (fun x => f x = 1) s → f i ≤ 1\n[PROOFSTEP]\nsimp only [mem_filter, and_imp]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : CanonicallyOrderedMonoid M\nf : ι → M\ns t : Finset ι\nh : ∀ (x : ι), x ∈ s → f x ≠ 1 → x ∈ t\n⊢ ∀ (i : ι), i ∈ s → f i = 1 → f i ≤ 1\n[PROOFSTEP]\nexact fun _ _ ↦ le_of_eq\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : CanonicallyOrderedMonoid M\nf : ι → M\ns t : Finset ι\nh : ∀ (x : ι), x ∈ s → f x ≠ 1 → x ∈ t\n⊢ filter (fun x => f x ≠ 1) s ⊆ t\n[PROOFSTEP]\nsimpa only [subset_iff, mem_filter, and_imp]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : OrderedCancelCommMonoid M\nf g : ι → M\ns t : Finset ι\nHle : ∀ (i : ι), i ∈ s → f i ≤ g i\nHlt : ∃ i, i ∈ s ∧ f i < g i\n⊢ ∏ i in s, f i < ∏ i in s, g i\n[PROOFSTEP]\nclassical\nrcases Hlt with ⟨i, hi, hlt⟩\nrw [← insert_erase hi, prod_insert (not_mem_erase _ _), prod_insert (not_mem_erase _ _)]\nexact mul_lt_mul_of_lt_of_le hlt (prod_le_prod' fun j hj ↦ Hle j <| mem_of_mem_erase hj)\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : OrderedCancelCommMonoid M\nf g : ι → M\ns t : Finset ι\nHle : ∀ (i : ι), i ∈ s → f i ≤ g i\nHlt : ∃ i, i ∈ s ∧ f i < g i\n⊢ ∏ i in s, f i < ∏ i in s, g i\n[PROOFSTEP]\nrcases Hlt with ⟨i, hi, hlt⟩\n[GOAL]\ncase intro.intro\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : OrderedCancelCommMonoid M\nf g : ι → M\ns t : Finset ι\nHle : ∀ (i : ι), i ∈ s → f i ≤ g i\ni : ι\nhi : i ∈ s\nhlt : f i < g i\n⊢ ∏ i in s, f i < ∏ i in s, g i\n[PROOFSTEP]\nrw [← insert_erase hi, prod_insert (not_mem_erase _ _), prod_insert (not_mem_erase _ _)]\n[GOAL]\ncase intro.intro\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : OrderedCancelCommMonoid M\nf g : ι → M\ns t : Finset ι\nHle : ∀ (i : ι), i ∈ s → f i ≤ g i\ni : ι\nhi : i ∈ s\nhlt : f i < g i\n⊢ f i * ∏ x in erase s i, f x < g i * ∏ x in erase s i, g x\n[PROOFSTEP]\nexact mul_lt_mul_of_lt_of_le hlt (prod_le_prod' fun j hj ↦ Hle j <| mem_of_mem_erase hj)\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : OrderedCancelCommMonoid M\nf g : ι → M\ns t : Finset ι\nhs : Finset.Nonempty s\nHlt : ∀ (i : ι), i ∈ s → f i < g i\n⊢ ∏ i in s, f i < ∏ i in s, g i\n[PROOFSTEP]\napply prod_lt_prod'\n[GOAL]\ncase Hle\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : OrderedCancelCommMonoid M\nf g : ι → M\ns t : Finset ι\nhs : Finset.Nonempty s\nHlt : ∀ (i : ι), i ∈ s → f i < g i\n⊢ ∀ (i : ι), i ∈ s → f i ≤ g i\n[PROOFSTEP]\nintro i hi\n[GOAL]\ncase Hle\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : OrderedCancelCommMonoid M\nf g : ι → M\ns t : Finset ι\nhs : Finset.Nonempty s\nHlt : ∀ (i : ι), i ∈ s → f i < g i\ni : ι\nhi : i ∈ s\n⊢ f i ≤ g i\n[PROOFSTEP]\napply le_of_lt (Hlt i hi)\n[GOAL]\ncase Hlt\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : OrderedCancelCommMonoid M\nf g : ι → M\ns t : Finset ι\nhs : Finset.Nonempty s\nHlt : ∀ (i : ι), i ∈ s → f i < g i\n⊢ ∃ i, i ∈ s ∧ f i < g i\n[PROOFSTEP]\ncases' hs with i hi\n[GOAL]\ncase Hlt.intro\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : OrderedCancelCommMonoid M\nf g : ι → M\ns t : Finset ι\nHlt : ∀ (i : ι), i ∈ s → f i < g i\ni : ι\nhi : i ∈ s\n⊢ ∃ i, i ∈ s ∧ f i < g i\n[PROOFSTEP]\nexact ⟨i, hi, Hlt i hi⟩\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : OrderedCancelCommMonoid M\nf g : ι → M\ns t : Finset ι\nh : s ⊆ t\ni : ι\nht : i ∈ t\nhs : ¬i ∈ s\nhlt : 1 < f i\nhle : ∀ (j : ι), j ∈ t → ¬j ∈ s → 1 ≤ f j\n⊢ ∏ j in s, f j < ∏ j in t, f j\n[PROOFSTEP]\nclassical calc\n  ∏ j in s, f j < ∏ j in insert i s, f j := by\n    rw [prod_insert hs]\n    exact lt_mul_of_one_lt_left' (∏ j in s, f j) hlt\n  _ ≤ ∏ j in t, f j := by\n    apply prod_le_prod_of_subset_of_one_le'\n    · simp [Finset.insert_subset_iff, h, ht]\n    · intro x hx h'x\n      simp only [mem_insert, not_or] at h'x \n      exact hle x hx h'x.2\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : OrderedCancelCommMonoid M\nf g : ι → M\ns t : Finset ι\nh : s ⊆ t\ni : ι\nht : i ∈ t\nhs : ¬i ∈ s\nhlt : 1 < f i\nhle : ∀ (j : ι), j ∈ t → ¬j ∈ s → 1 ≤ f j\n⊢ ∏ j in s, f j < ∏ j in t, f j\n[PROOFSTEP]\ncalc\n  ∏ j in s, f j < ∏ j in insert i s, f j := by\n    rw [prod_insert hs]\n    exact lt_mul_of_one_lt_left' (∏ j in s, f j) hlt\n  _ ≤ ∏ j in t, f j := by\n    apply prod_le_prod_of_subset_of_one_le'\n    · simp [Finset.insert_subset_iff, h, ht]\n    · intro x hx h'x\n      simp only [mem_insert, not_or] at h'x \n      exact hle x hx h'x.2\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : OrderedCancelCommMonoid M\nf g : ι → M\ns t : Finset ι\nh : s ⊆ t\ni : ι\nht : i ∈ t\nhs : ¬i ∈ s\nhlt : 1 < f i\nhle : ∀ (j : ι), j ∈ t → ¬j ∈ s → 1 ≤ f j\n⊢ ∏ j in s, f j < ∏ j in insert i s, f j\n[PROOFSTEP]\nrw [prod_insert hs]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : OrderedCancelCommMonoid M\nf g : ι → M\ns t : Finset ι\nh : s ⊆ t\ni : ι\nht : i ∈ t\nhs : ¬i ∈ s\nhlt : 1 < f i\nhle : ∀ (j : ι), j ∈ t → ¬j ∈ s → 1 ≤ f j\n⊢ ∏ j in s, f j < f i * ∏ x in s, f x\n[PROOFSTEP]\nexact lt_mul_of_one_lt_left' (∏ j in s, f j) hlt\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : OrderedCancelCommMonoid M\nf g : ι → M\ns t : Finset ι\nh : s ⊆ t\ni : ι\nht : i ∈ t\nhs : ¬i ∈ s\nhlt : 1 < f i\nhle : ∀ (j : ι), j ∈ t → ¬j ∈ s → 1 ≤ f j\n⊢ ∏ j in insert i s, f j ≤ ∏ j in t, f j\n[PROOFSTEP]\napply prod_le_prod_of_subset_of_one_le'\n[GOAL]\ncase h\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : OrderedCancelCommMonoid M\nf g : ι → M\ns t : Finset ι\nh : s ⊆ t\ni : ι\nht : i ∈ t\nhs : ¬i ∈ s\nhlt : 1 < f i\nhle : ∀ (j : ι), j ∈ t → ¬j ∈ s → 1 ≤ f j\n⊢ insert i s ⊆ t\n[PROOFSTEP]\nsimp [Finset.insert_subset_iff, h, ht]\n[GOAL]\ncase hf\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : OrderedCancelCommMonoid M\nf g : ι → M\ns t : Finset ι\nh : s ⊆ t\ni : ι\nht : i ∈ t\nhs : ¬i ∈ s\nhlt : 1 < f i\nhle : ∀ (j : ι), j ∈ t → ¬j ∈ s → 1 ≤ f j\n⊢ ∀ (i_1 : ι), i_1 ∈ t → ¬i_1 ∈ insert i s → 1 ≤ f i_1\n[PROOFSTEP]\nintro x hx h'x\n[GOAL]\ncase hf\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : OrderedCancelCommMonoid M\nf g : ι → M\ns t : Finset ι\nh : s ⊆ t\ni : ι\nht : i ∈ t\nhs : ¬i ∈ s\nhlt : 1 < f i\nhle : ∀ (j : ι), j ∈ t → ¬j ∈ s → 1 ≤ f j\nx : ι\nhx : x ∈ t\nh'x : ¬x ∈ insert i s\n⊢ 1 ≤ f x\n[PROOFSTEP]\nsimp only [mem_insert, not_or] at h'x \n[GOAL]\ncase hf\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : OrderedCancelCommMonoid M\nf g : ι → M\ns t : Finset ι\nh : s ⊆ t\ni : ι\nht : i ∈ t\nhs : ¬i ∈ s\nhlt : 1 < f i\nhle : ∀ (j : ι), j ∈ t → ¬j ∈ s → 1 ≤ f j\nx : ι\nhx : x ∈ t\nh'x : ¬x = i ∧ ¬x ∈ s\n⊢ 1 ≤ f x\n[PROOFSTEP]\nexact hle x hx h'x.2\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : OrderedCancelCommMonoid M\nf g : ι → M\ns t : Finset ι\nh : ∀ (i : ι), i ∈ s → 1 < f i\nhs : Finset.Nonempty s\n⊢ 1 ≤ ∏ i in s, 1\n[PROOFSTEP]\nrw [prod_const_one]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : OrderedCancelCommMonoid M\nf g : ι → M\ns t : Finset ι\nh : ∀ (i : ι), i ∈ s → f i < 1\nhs : Finset.Nonempty s\n⊢ ∏ i in s, 1 ≤ 1\n[PROOFSTEP]\nrw [prod_const_one]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : OrderedCancelCommMonoid M\nf✝ g✝ : ι → M\ns t : Finset ι\nf g : ι → M\nh : ∀ (i : ι), i ∈ s → f i ≤ g i\n⊢ ∏ i in s, f i = ∏ i in s, g i ↔ ∀ (i : ι), i ∈ s → f i = g i\n[PROOFSTEP]\nclassical\nrevert h\nrefine\n  Finset.induction_on s (fun _ ↦ ⟨fun _ _ h ↦ False.elim (Finset.not_mem_empty _ h), fun _ ↦ rfl⟩) fun a s ha ih H ↦ ?_\nspecialize ih fun i ↦ H i ∘ Finset.mem_insert_of_mem\nrw [Finset.prod_insert ha, Finset.prod_insert ha, Finset.forall_mem_insert, ← ih]\nexact mul_eq_mul_iff_eq_and_eq (H a (s.mem_insert_self a)) (Finset.prod_le_prod' fun i ↦ H i ∘ Finset.mem_insert_of_mem)\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : OrderedCancelCommMonoid M\nf✝ g✝ : ι → M\ns t : Finset ι\nf g : ι → M\nh : ∀ (i : ι), i ∈ s → f i ≤ g i\n⊢ ∏ i in s, f i = ∏ i in s, g i ↔ ∀ (i : ι), i ∈ s → f i = g i\n[PROOFSTEP]\nrevert h\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : OrderedCancelCommMonoid M\nf✝ g✝ : ι → M\ns t : Finset ι\nf g : ι → M\n⊢ (∀ (i : ι), i ∈ s → f i ≤ g i) → (∏ i in s, f i = ∏ i in s, g i ↔ ∀ (i : ι), i ∈ s → f i = g i)\n[PROOFSTEP]\nrefine\n  Finset.induction_on s (fun _ ↦ ⟨fun _ _ h ↦ False.elim (Finset.not_mem_empty _ h), fun _ ↦ rfl⟩) fun a s ha ih H ↦ ?_\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : OrderedCancelCommMonoid M\nf✝ g✝ : ι → M\ns✝ t : Finset ι\nf g : ι → M\na : ι\ns : Finset ι\nha : ¬a ∈ s\nih : (∀ (i : ι), i ∈ s → f i ≤ g i) → (∏ i in s, f i = ∏ i in s, g i ↔ ∀ (i : ι), i ∈ s → f i = g i)\nH : ∀ (i : ι), i ∈ insert a s → f i ≤ g i\n⊢ ∏ i in insert a s, f i = ∏ i in insert a s, g i ↔ ∀ (i : ι), i ∈ insert a s → f i = g i\n[PROOFSTEP]\nspecialize ih fun i ↦ H i ∘ Finset.mem_insert_of_mem\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : OrderedCancelCommMonoid M\nf✝ g✝ : ι → M\ns✝ t : Finset ι\nf g : ι → M\na : ι\ns : Finset ι\nha : ¬a ∈ s\nH : ∀ (i : ι), i ∈ insert a s → f i ≤ g i\nih : ∏ i in s, f i = ∏ i in s, g i ↔ ∀ (i : ι), i ∈ s → f i = g i\n⊢ ∏ i in insert a s, f i = ∏ i in insert a s, g i ↔ ∀ (i : ι), i ∈ insert a s → f i = g i\n[PROOFSTEP]\nrw [Finset.prod_insert ha, Finset.prod_insert ha, Finset.forall_mem_insert, ← ih]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : OrderedCancelCommMonoid M\nf✝ g✝ : ι → M\ns✝ t : Finset ι\nf g : ι → M\na : ι\ns : Finset ι\nha : ¬a ∈ s\nH : ∀ (i : ι), i ∈ insert a s → f i ≤ g i\nih : ∏ i in s, f i = ∏ i in s, g i ↔ ∀ (i : ι), i ∈ s → f i = g i\n⊢ f a * ∏ x in s, f x = g a * ∏ x in s, g x ↔ f a = g a ∧ ∏ i in s, f i = ∏ i in s, g i\n[PROOFSTEP]\nexact mul_eq_mul_iff_eq_and_eq (H a (s.mem_insert_self a)) (Finset.prod_le_prod' fun i ↦ H i ∘ Finset.mem_insert_of_mem)\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : LinearOrderedCancelCommMonoid M\nf g : ι → M\ns t : Finset ι\nHlt : ∏ i in s, f i < ∏ i in s, g i\n⊢ ∃ i, i ∈ s ∧ f i < g i\n[PROOFSTEP]\ncontrapose! Hlt with Hle\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : LinearOrderedCancelCommMonoid M\nf g : ι → M\ns t : Finset ι\nHle : ∀ (i : ι), i ∈ s → g i ≤ f i\n⊢ ∏ i in s, g i ≤ ∏ i in s, f i\n[PROOFSTEP]\nexact prod_le_prod' Hle\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : LinearOrderedCancelCommMonoid M\nf g : ι → M\ns t : Finset ι\nhs : Finset.Nonempty s\nHle : ∏ i in s, f i ≤ ∏ i in s, g i\n⊢ ∃ i, i ∈ s ∧ f i ≤ g i\n[PROOFSTEP]\ncontrapose! Hle with Hlt\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : LinearOrderedCancelCommMonoid M\nf g : ι → M\ns t : Finset ι\nhs : Finset.Nonempty s\nHlt : ∀ (i : ι), i ∈ s → g i < f i\n⊢ ∏ i in s, g i < ∏ i in s, f i\n[PROOFSTEP]\nexact prod_lt_prod_of_nonempty' hs Hlt\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : LinearOrderedCancelCommMonoid M\nf✝ g : ι → M\ns t : Finset ι\nf : ι → M\nh₁ : ∏ i in s, f i = 1\nh₂ : ∃ i, i ∈ s ∧ f i ≠ 1\n⊢ ∃ i, i ∈ s ∧ 1 < f i\n[PROOFSTEP]\ncontrapose! h₁\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : LinearOrderedCancelCommMonoid M\nf✝ g : ι → M\ns t : Finset ι\nf : ι → M\nh₂ : ∃ i, i ∈ s ∧ f i ≠ 1\nh₁ : ∀ (i : ι), i ∈ s → f i ≤ 1\n⊢ ∏ i in s, f i ≠ 1\n[PROOFSTEP]\nobtain ⟨i, m, i_ne⟩ : ∃ i ∈ s, f i ≠ 1 := h₂\n[GOAL]\ncase intro.intro\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : LinearOrderedCancelCommMonoid M\nf✝ g : ι → M\ns t : Finset ι\nf : ι → M\nh₁ : ∀ (i : ι), i ∈ s → f i ≤ 1\ni : ι\nm : i ∈ s\ni_ne : f i ≠ 1\n⊢ ∏ i in s, f i ≠ 1\n[PROOFSTEP]\napply ne_of_lt\n[GOAL]\ncase intro.intro.h\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : LinearOrderedCancelCommMonoid M\nf✝ g : ι → M\ns t : Finset ι\nf : ι → M\nh₁ : ∀ (i : ι), i ∈ s → f i ≤ 1\ni : ι\nm : i ∈ s\ni_ne : f i ≠ 1\n⊢ ∏ i in s, f i < 1\n[PROOFSTEP]\ncalc\n  ∏ j in s, f j < ∏ j in s, 1 := prod_lt_prod' h₁ ⟨i, m, (h₁ i m).lt_of_ne i_ne⟩\n  _ = 1 := prod_const_one\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : OrderedCommSemiring R\nf g : ι → R\ns t : Finset ι\nh0 : ∀ (i : ι), i ∈ s → 0 ≤ f i\nh1 : ∀ (i : ι), i ∈ s → f i ≤ g i\n⊢ ∏ i in s, f i ≤ ∏ i in s, g i\n[PROOFSTEP]\ninduction' s using Finset.induction with a s has ih h\n[GOAL]\ncase empty\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : OrderedCommSemiring R\nf g : ι → R\ns t : Finset ι\nh0✝ : ∀ (i : ι), i ∈ s → 0 ≤ f i\nh1✝ : ∀ (i : ι), i ∈ s → f i ≤ g i\nh0 : ∀ (i : ι), i ∈ ∅ → 0 ≤ f i\nh1 : ∀ (i : ι), i ∈ ∅ → f i ≤ g i\n⊢ ∏ i in ∅, f i ≤ ∏ i in ∅, g i\n[PROOFSTEP]\nsimp\n[GOAL]\ncase insert\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : OrderedCommSemiring R\nf g : ι → R\ns✝ t : Finset ι\nh0✝ : ∀ (i : ι), i ∈ s✝ → 0 ≤ f i\nh1✝ : ∀ (i : ι), i ∈ s✝ → f i ≤ g i\na : ι\ns : Finset ι\nhas : ¬a ∈ s\nih : (∀ (i : ι), i ∈ s → 0 ≤ f i) → (∀ (i : ι), i ∈ s → f i ≤ g i) → ∏ i in s, f i ≤ ∏ i in s, g i\nh0 : ∀ (i : ι), i ∈ insert a s → 0 ≤ f i\nh1 : ∀ (i : ι), i ∈ insert a s → f i ≤ g i\n⊢ ∏ i in insert a s, f i ≤ ∏ i in insert a s, g i\n[PROOFSTEP]\nsimp only [prod_insert has]\n[GOAL]\ncase insert\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : OrderedCommSemiring R\nf g : ι → R\ns✝ t : Finset ι\nh0✝ : ∀ (i : ι), i ∈ s✝ → 0 ≤ f i\nh1✝ : ∀ (i : ι), i ∈ s✝ → f i ≤ g i\na : ι\ns : Finset ι\nhas : ¬a ∈ s\nih : (∀ (i : ι), i ∈ s → 0 ≤ f i) → (∀ (i : ι), i ∈ s → f i ≤ g i) → ∏ i in s, f i ≤ ∏ i in s, g i\nh0 : ∀ (i : ι), i ∈ insert a s → 0 ≤ f i\nh1 : ∀ (i : ι), i ∈ insert a s → f i ≤ g i\n⊢ f a * ∏ i in s, f i ≤ g a * ∏ i in s, g i\n[PROOFSTEP]\napply mul_le_mul\n[GOAL]\ncase insert.h₁\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : OrderedCommSemiring R\nf g : ι → R\ns✝ t : Finset ι\nh0✝ : ∀ (i : ι), i ∈ s✝ → 0 ≤ f i\nh1✝ : ∀ (i : ι), i ∈ s✝ → f i ≤ g i\na : ι\ns : Finset ι\nhas : ¬a ∈ s\nih : (∀ (i : ι), i ∈ s → 0 ≤ f i) → (∀ (i : ι), i ∈ s → f i ≤ g i) → ∏ i in s, f i ≤ ∏ i in s, g i\nh0 : ∀ (i : ι), i ∈ insert a s → 0 ≤ f i\nh1 : ∀ (i : ι), i ∈ insert a s → f i ≤ g i\n⊢ f a ≤ g a\n[PROOFSTEP]\nexact h1 a (mem_insert_self a s)\n[GOAL]\ncase insert.h₂\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : OrderedCommSemiring R\nf g : ι → R\ns✝ t : Finset ι\nh0✝ : ∀ (i : ι), i ∈ s✝ → 0 ≤ f i\nh1✝ : ∀ (i : ι), i ∈ s✝ → f i ≤ g i\na : ι\ns : Finset ι\nhas : ¬a ∈ s\nih : (∀ (i : ι), i ∈ s → 0 ≤ f i) → (∀ (i : ι), i ∈ s → f i ≤ g i) → ∏ i in s, f i ≤ ∏ i in s, g i\nh0 : ∀ (i : ι), i ∈ insert a s → 0 ≤ f i\nh1 : ∀ (i : ι), i ∈ insert a s → f i ≤ g i\n⊢ ∏ i in s, f i ≤ ∏ i in s, g i\n[PROOFSTEP]\nrefine ih (fun x H ↦ h0 _ ?_) (fun x H ↦ h1 _ ?_)\n[GOAL]\ncase insert.h₂.refine_1\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : OrderedCommSemiring R\nf g : ι → R\ns✝ t : Finset ι\nh0✝ : ∀ (i : ι), i ∈ s✝ → 0 ≤ f i\nh1✝ : ∀ (i : ι), i ∈ s✝ → f i ≤ g i\na : ι\ns : Finset ι\nhas : ¬a ∈ s\nih : (∀ (i : ι), i ∈ s → 0 ≤ f i) → (∀ (i : ι), i ∈ s → f i ≤ g i) → ∏ i in s, f i ≤ ∏ i in s, g i\nh0 : ∀ (i : ι), i ∈ insert a s → 0 ≤ f i\nh1 : ∀ (i : ι), i ∈ insert a s → f i ≤ g i\nx : ι\nH : x ∈ s\n⊢ x ∈ insert a s\n[PROOFSTEP]\nexact mem_insert_of_mem H\n[GOAL]\ncase insert.h₂.refine_2\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : OrderedCommSemiring R\nf g : ι → R\ns✝ t : Finset ι\nh0✝ : ∀ (i : ι), i ∈ s✝ → 0 ≤ f i\nh1✝ : ∀ (i : ι), i ∈ s✝ → f i ≤ g i\na : ι\ns : Finset ι\nhas : ¬a ∈ s\nih : (∀ (i : ι), i ∈ s → 0 ≤ f i) → (∀ (i : ι), i ∈ s → f i ≤ g i) → ∏ i in s, f i ≤ ∏ i in s, g i\nh0 : ∀ (i : ι), i ∈ insert a s → 0 ≤ f i\nh1 : ∀ (i : ι), i ∈ insert a s → f i ≤ g i\nx : ι\nH : x ∈ s\n⊢ x ∈ insert a s\n[PROOFSTEP]\nexact mem_insert_of_mem H\n[GOAL]\ncase insert.c0\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : OrderedCommSemiring R\nf g : ι → R\ns✝ t : Finset ι\nh0✝ : ∀ (i : ι), i ∈ s✝ → 0 ≤ f i\nh1✝ : ∀ (i : ι), i ∈ s✝ → f i ≤ g i\na : ι\ns : Finset ι\nhas : ¬a ∈ s\nih : (∀ (i : ι), i ∈ s → 0 ≤ f i) → (∀ (i : ι), i ∈ s → f i ≤ g i) → ∏ i in s, f i ≤ ∏ i in s, g i\nh0 : ∀ (i : ι), i ∈ insert a s → 0 ≤ f i\nh1 : ∀ (i : ι), i ∈ insert a s → f i ≤ g i\n⊢ 0 ≤ ∏ i in s, f i\n[PROOFSTEP]\napply prod_nonneg fun x H ↦ h0 x (mem_insert_of_mem H)\n[GOAL]\ncase insert.b0\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : OrderedCommSemiring R\nf g : ι → R\ns✝ t : Finset ι\nh0✝ : ∀ (i : ι), i ∈ s✝ → 0 ≤ f i\nh1✝ : ∀ (i : ι), i ∈ s✝ → f i ≤ g i\na : ι\ns : Finset ι\nhas : ¬a ∈ s\nih : (∀ (i : ι), i ∈ s → 0 ≤ f i) → (∀ (i : ι), i ∈ s → f i ≤ g i) → ∏ i in s, f i ≤ ∏ i in s, g i\nh0 : ∀ (i : ι), i ∈ insert a s → 0 ≤ f i\nh1 : ∀ (i : ι), i ∈ insert a s → f i ≤ g i\n⊢ 0 ≤ g a\n[PROOFSTEP]\napply le_trans (h0 a (mem_insert_self a s)) (h1 a (mem_insert_self a s))\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : OrderedCommSemiring R\nf g : ι → R\ns t : Finset ι\nh0 : ∀ (i : ι), i ∈ s → 0 ≤ f i\nh1 : ∀ (i : ι), i ∈ s → f i ≤ 1\n⊢ ∏ i in s, f i ≤ 1\n[PROOFSTEP]\nconvert ← prod_le_prod h0 h1\n[GOAL]\ncase h.e'_4\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : OrderedCommSemiring R\nf g : ι → R\ns t : Finset ι\nh0 : ∀ (i : ι), i ∈ s → 0 ≤ f i\nh1 : ∀ (i : ι), i ∈ s → f i ≤ 1\n⊢ ∏ i in s, 1 = 1\n[PROOFSTEP]\nexact Finset.prod_const_one\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : OrderedCommSemiring R\nf✝ g✝ : ι → R\ns t : Finset ι\ni : ι\nf g h : ι → R\nhi : i ∈ s\nh2i : g i + h i ≤ f i\nhgf : ∀ (j : ι), j ∈ s → j ≠ i → g j ≤ f j\nhhf : ∀ (j : ι), j ∈ s → j ≠ i → h j ≤ f j\nhg : ∀ (i : ι), i ∈ s → 0 ≤ g i\nhh : ∀ (i : ι), i ∈ s → 0 ≤ h i\n⊢ ∏ i in s, g i + ∏ i in s, h i ≤ ∏ i in s, f i\n[PROOFSTEP]\nsimp_rw [prod_eq_mul_prod_diff_singleton hi]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : OrderedCommSemiring R\nf✝ g✝ : ι → R\ns t : Finset ι\ni : ι\nf g h : ι → R\nhi : i ∈ s\nh2i : g i + h i ≤ f i\nhgf : ∀ (j : ι), j ∈ s → j ≠ i → g j ≤ f j\nhhf : ∀ (j : ι), j ∈ s → j ≠ i → h j ≤ f j\nhg : ∀ (i : ι), i ∈ s → 0 ≤ g i\nhh : ∀ (i : ι), i ∈ s → 0 ≤ h i\n⊢ g i * ∏ i in s \\ {i}, g i + h i * ∏ i in s \\ {i}, h i ≤ f i * ∏ i in s \\ {i}, f i\n[PROOFSTEP]\nrefine le_trans ?_ (mul_le_mul_of_nonneg_right h2i ?_)\n[GOAL]\ncase refine_1\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : OrderedCommSemiring R\nf✝ g✝ : ι → R\ns t : Finset ι\ni : ι\nf g h : ι → R\nhi : i ∈ s\nh2i : g i + h i ≤ f i\nhgf : ∀ (j : ι), j ∈ s → j ≠ i → g j ≤ f j\nhhf : ∀ (j : ι), j ∈ s → j ≠ i → h j ≤ f j\nhg : ∀ (i : ι), i ∈ s → 0 ≤ g i\nhh : ∀ (i : ι), i ∈ s → 0 ≤ h i\n⊢ g i * ∏ i in s \\ {i}, g i + h i * ∏ i in s \\ {i}, h i ≤ (g i + h i) * ∏ i in s \\ {i}, f i\n[PROOFSTEP]\nrw [right_distrib]\n[GOAL]\ncase refine_1\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : OrderedCommSemiring R\nf✝ g✝ : ι → R\ns t : Finset ι\ni : ι\nf g h : ι → R\nhi : i ∈ s\nh2i : g i + h i ≤ f i\nhgf : ∀ (j : ι), j ∈ s → j ≠ i → g j ≤ f j\nhhf : ∀ (j : ι), j ∈ s → j ≠ i → h j ≤ f j\nhg : ∀ (i : ι), i ∈ s → 0 ≤ g i\nhh : ∀ (i : ι), i ∈ s → 0 ≤ h i\n⊢ g i * ∏ i in s \\ {i}, g i + h i * ∏ i in s \\ {i}, h i ≤ g i * ∏ i in s \\ {i}, f i + h i * ∏ i in s \\ {i}, f i\n[PROOFSTEP]\nrefine add_le_add ?_ ?_\n[GOAL]\ncase refine_1.refine_1\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : OrderedCommSemiring R\nf✝ g✝ : ι → R\ns t : Finset ι\ni : ι\nf g h : ι → R\nhi : i ∈ s\nh2i : g i + h i ≤ f i\nhgf : ∀ (j : ι), j ∈ s → j ≠ i → g j ≤ f j\nhhf : ∀ (j : ι), j ∈ s → j ≠ i → h j ≤ f j\nhg : ∀ (i : ι), i ∈ s → 0 ≤ g i\nhh : ∀ (i : ι), i ∈ s → 0 ≤ h i\n⊢ g i * ∏ i in s \\ {i}, g i ≤ g i * ∏ i in s \\ {i}, f i\n[PROOFSTEP]\nrefine mul_le_mul_of_nonneg_left ?_ ?_\n[GOAL]\ncase refine_1.refine_1.refine_1\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : OrderedCommSemiring R\nf✝ g✝ : ι → R\ns t : Finset ι\ni : ι\nf g h : ι → R\nhi : i ∈ s\nh2i : g i + h i ≤ f i\nhgf : ∀ (j : ι), j ∈ s → j ≠ i → g j ≤ f j\nhhf : ∀ (j : ι), j ∈ s → j ≠ i → h j ≤ f j\nhg : ∀ (i : ι), i ∈ s → 0 ≤ g i\nhh : ∀ (i : ι), i ∈ s → 0 ≤ h i\n⊢ ∏ i in s \\ {i}, g i ≤ ∏ i in s \\ {i}, f i\n[PROOFSTEP]\nrefine prod_le_prod ?_ ?_\n[GOAL]\ncase refine_1.refine_1.refine_1.refine_1\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : OrderedCommSemiring R\nf✝ g✝ : ι → R\ns t : Finset ι\ni : ι\nf g h : ι → R\nhi : i ∈ s\nh2i : g i + h i ≤ f i\nhgf : ∀ (j : ι), j ∈ s → j ≠ i → g j ≤ f j\nhhf : ∀ (j : ι), j ∈ s → j ≠ i → h j ≤ f j\nhg : ∀ (i : ι), i ∈ s → 0 ≤ g i\nhh : ∀ (i : ι), i ∈ s → 0 ≤ h i\n⊢ ∀ (i_1 : ι), i_1 ∈ s \\ {i} → 0 ≤ g i_1\n[PROOFSTEP]\nsimp (config := { contextual := true }) [*]\n[GOAL]\ncase refine_1.refine_1.refine_1.refine_2\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : OrderedCommSemiring R\nf✝ g✝ : ι → R\ns t : Finset ι\ni : ι\nf g h : ι → R\nhi : i ∈ s\nh2i : g i + h i ≤ f i\nhgf : ∀ (j : ι), j ∈ s → j ≠ i → g j ≤ f j\nhhf : ∀ (j : ι), j ∈ s → j ≠ i → h j ≤ f j\nhg : ∀ (i : ι), i ∈ s → 0 ≤ g i\nhh : ∀ (i : ι), i ∈ s → 0 ≤ h i\n⊢ ∀ (i_1 : ι), i_1 ∈ s \\ {i} → g i_1 ≤ f i_1\n[PROOFSTEP]\nsimp (config := { contextual := true }) [*]\n[GOAL]\ncase refine_1.refine_1.refine_2\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : OrderedCommSemiring R\nf✝ g✝ : ι → R\ns t : Finset ι\ni : ι\nf g h : ι → R\nhi : i ∈ s\nh2i : g i + h i ≤ f i\nhgf : ∀ (j : ι), j ∈ s → j ≠ i → g j ≤ f j\nhhf : ∀ (j : ι), j ∈ s → j ≠ i → h j ≤ f j\nhg : ∀ (i : ι), i ∈ s → 0 ≤ g i\nhh : ∀ (i : ι), i ∈ s → 0 ≤ h i\n⊢ 0 ≤ g i\n[PROOFSTEP]\ntry apply_assumption\n[GOAL]\ncase refine_1.refine_1.refine_2\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : OrderedCommSemiring R\nf✝ g✝ : ι → R\ns t : Finset ι\ni : ι\nf g h : ι → R\nhi : i ∈ s\nh2i : g i + h i ≤ f i\nhgf : ∀ (j : ι), j ∈ s → j ≠ i → g j ≤ f j\nhhf : ∀ (j : ι), j ∈ s → j ≠ i → h j ≤ f j\nhg : ∀ (i : ι), i ∈ s → 0 ≤ g i\nhh : ∀ (i : ι), i ∈ s → 0 ≤ h i\n⊢ 0 ≤ g i\n[PROOFSTEP]\napply_assumption\n[GOAL]\ncase refine_1.refine_1.refine_2.a\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : OrderedCommSemiring R\nf✝ g✝ : ι → R\ns t : Finset ι\ni : ι\nf g h : ι → R\nhi : i ∈ s\nh2i : g i + h i ≤ f i\nhgf : ∀ (j : ι), j ∈ s → j ≠ i → g j ≤ f j\nhhf : ∀ (j : ι), j ∈ s → j ≠ i → h j ≤ f j\nhg : ∀ (i : ι), i ∈ s → 0 ≤ g i\nhh : ∀ (i : ι), i ∈ s → 0 ≤ h i\n⊢ i ∈ s\n[PROOFSTEP]\ntry assumption\n[GOAL]\ncase refine_1.refine_1.refine_2.a\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : OrderedCommSemiring R\nf✝ g✝ : ι → R\ns t : Finset ι\ni : ι\nf g h : ι → R\nhi : i ∈ s\nh2i : g i + h i ≤ f i\nhgf : ∀ (j : ι), j ∈ s → j ≠ i → g j ≤ f j\nhhf : ∀ (j : ι), j ∈ s → j ≠ i → h j ≤ f j\nhg : ∀ (i : ι), i ∈ s → 0 ≤ g i\nhh : ∀ (i : ι), i ∈ s → 0 ≤ h i\n⊢ i ∈ s\n[PROOFSTEP]\nassumption\n[GOAL]\ncase refine_1.refine_2\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : OrderedCommSemiring R\nf✝ g✝ : ι → R\ns t : Finset ι\ni : ι\nf g h : ι → R\nhi : i ∈ s\nh2i : g i + h i ≤ f i\nhgf : ∀ (j : ι), j ∈ s → j ≠ i → g j ≤ f j\nhhf : ∀ (j : ι), j ∈ s → j ≠ i → h j ≤ f j\nhg : ∀ (i : ι), i ∈ s → 0 ≤ g i\nhh : ∀ (i : ι), i ∈ s → 0 ≤ h i\n⊢ h i * ∏ i in s \\ {i}, h i ≤ h i * ∏ i in s \\ {i}, f i\n[PROOFSTEP]\nrefine mul_le_mul_of_nonneg_left ?_ ?_\n[GOAL]\ncase refine_1.refine_2.refine_1\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : OrderedCommSemiring R\nf✝ g✝ : ι → R\ns t : Finset ι\ni : ι\nf g h : ι → R\nhi : i ∈ s\nh2i : g i + h i ≤ f i\nhgf : ∀ (j : ι), j ∈ s → j ≠ i → g j ≤ f j\nhhf : ∀ (j : ι), j ∈ s → j ≠ i → h j ≤ f j\nhg : ∀ (i : ι), i ∈ s → 0 ≤ g i\nhh : ∀ (i : ι), i ∈ s → 0 ≤ h i\n⊢ ∏ i in s \\ {i}, h i ≤ ∏ i in s \\ {i}, f i\n[PROOFSTEP]\nrefine prod_le_prod ?_ ?_\n[GOAL]\ncase refine_1.refine_2.refine_1.refine_1\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : OrderedCommSemiring R\nf✝ g✝ : ι → R\ns t : Finset ι\ni : ι\nf g h : ι → R\nhi : i ∈ s\nh2i : g i + h i ≤ f i\nhgf : ∀ (j : ι), j ∈ s → j ≠ i → g j ≤ f j\nhhf : ∀ (j : ι), j ∈ s → j ≠ i → h j ≤ f j\nhg : ∀ (i : ι), i ∈ s → 0 ≤ g i\nhh : ∀ (i : ι), i ∈ s → 0 ≤ h i\n⊢ ∀ (i_1 : ι), i_1 ∈ s \\ {i} → 0 ≤ h i_1\n[PROOFSTEP]\nsimp (config := { contextual := true }) [*]\n[GOAL]\ncase refine_1.refine_2.refine_1.refine_2\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : OrderedCommSemiring R\nf✝ g✝ : ι → R\ns t : Finset ι\ni : ι\nf g h : ι → R\nhi : i ∈ s\nh2i : g i + h i ≤ f i\nhgf : ∀ (j : ι), j ∈ s → j ≠ i → g j ≤ f j\nhhf : ∀ (j : ι), j ∈ s → j ≠ i → h j ≤ f j\nhg : ∀ (i : ι), i ∈ s → 0 ≤ g i\nhh : ∀ (i : ι), i ∈ s → 0 ≤ h i\n⊢ ∀ (i_1 : ι), i_1 ∈ s \\ {i} → h i_1 ≤ f i_1\n[PROOFSTEP]\nsimp (config := { contextual := true }) [*]\n[GOAL]\ncase refine_1.refine_2.refine_2\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : OrderedCommSemiring R\nf✝ g✝ : ι → R\ns t : Finset ι\ni : ι\nf g h : ι → R\nhi : i ∈ s\nh2i : g i + h i ≤ f i\nhgf : ∀ (j : ι), j ∈ s → j ≠ i → g j ≤ f j\nhhf : ∀ (j : ι), j ∈ s → j ≠ i → h j ≤ f j\nhg : ∀ (i : ι), i ∈ s → 0 ≤ g i\nhh : ∀ (i : ι), i ∈ s → 0 ≤ h i\n⊢ 0 ≤ h i\n[PROOFSTEP]\ntry apply_assumption\n[GOAL]\ncase refine_1.refine_2.refine_2\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : OrderedCommSemiring R\nf✝ g✝ : ι → R\ns t : Finset ι\ni : ι\nf g h : ι → R\nhi : i ∈ s\nh2i : g i + h i ≤ f i\nhgf : ∀ (j : ι), j ∈ s → j ≠ i → g j ≤ f j\nhhf : ∀ (j : ι), j ∈ s → j ≠ i → h j ≤ f j\nhg : ∀ (i : ι), i ∈ s → 0 ≤ g i\nhh : ∀ (i : ι), i ∈ s → 0 ≤ h i\n⊢ 0 ≤ h i\n[PROOFSTEP]\napply_assumption\n[GOAL]\ncase refine_1.refine_2.refine_2.a\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : OrderedCommSemiring R\nf✝ g✝ : ι → R\ns t : Finset ι\ni : ι\nf g h : ι → R\nhi : i ∈ s\nh2i : g i + h i ≤ f i\nhgf : ∀ (j : ι), j ∈ s → j ≠ i → g j ≤ f j\nhhf : ∀ (j : ι), j ∈ s → j ≠ i → h j ≤ f j\nhg : ∀ (i : ι), i ∈ s → 0 ≤ g i\nhh : ∀ (i : ι), i ∈ s → 0 ≤ h i\n⊢ i ∈ s\n[PROOFSTEP]\ntry assumption\n[GOAL]\ncase refine_1.refine_2.refine_2.a\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : OrderedCommSemiring R\nf✝ g✝ : ι → R\ns t : Finset ι\ni : ι\nf g h : ι → R\nhi : i ∈ s\nh2i : g i + h i ≤ f i\nhgf : ∀ (j : ι), j ∈ s → j ≠ i → g j ≤ f j\nhhf : ∀ (j : ι), j ∈ s → j ≠ i → h j ≤ f j\nhg : ∀ (i : ι), i ∈ s → 0 ≤ g i\nhh : ∀ (i : ι), i ∈ s → 0 ≤ h i\n⊢ i ∈ s\n[PROOFSTEP]\nassumption\n[GOAL]\ncase refine_2\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : OrderedCommSemiring R\nf✝ g✝ : ι → R\ns t : Finset ι\ni : ι\nf g h : ι → R\nhi : i ∈ s\nh2i : g i + h i ≤ f i\nhgf : ∀ (j : ι), j ∈ s → j ≠ i → g j ≤ f j\nhhf : ∀ (j : ι), j ∈ s → j ≠ i → h j ≤ f j\nhg : ∀ (i : ι), i ∈ s → 0 ≤ g i\nhh : ∀ (i : ι), i ∈ s → 0 ≤ h i\n⊢ 0 ≤ ∏ i in s \\ {i}, f i\n[PROOFSTEP]\napply prod_nonneg\n[GOAL]\ncase refine_2.h0\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : OrderedCommSemiring R\nf✝ g✝ : ι → R\ns t : Finset ι\ni : ι\nf g h : ι → R\nhi : i ∈ s\nh2i : g i + h i ≤ f i\nhgf : ∀ (j : ι), j ∈ s → j ≠ i → g j ≤ f j\nhhf : ∀ (j : ι), j ∈ s → j ≠ i → h j ≤ f j\nhg : ∀ (i : ι), i ∈ s → 0 ≤ g i\nhh : ∀ (i : ι), i ∈ s → 0 ≤ h i\n⊢ ∀ (i_1 : ι), i_1 ∈ s \\ {i} → 0 ≤ f i_1\n[PROOFSTEP]\nsimp only [and_imp, mem_sdiff, mem_singleton]\n[GOAL]\ncase refine_2.h0\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : OrderedCommSemiring R\nf✝ g✝ : ι → R\ns t : Finset ι\ni : ι\nf g h : ι → R\nhi : i ∈ s\nh2i : g i + h i ≤ f i\nhgf : ∀ (j : ι), j ∈ s → j ≠ i → g j ≤ f j\nhhf : ∀ (j : ι), j ∈ s → j ≠ i → h j ≤ f j\nhg : ∀ (i : ι), i ∈ s → 0 ≤ g i\nhh : ∀ (i : ι), i ∈ s → 0 ≤ h i\n⊢ ∀ (i_1 : ι), i_1 ∈ s → ¬i_1 = i → 0 ≤ f i_1\n[PROOFSTEP]\nintro j h1j h2j\n[GOAL]\ncase refine_2.h0\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : OrderedCommSemiring R\nf✝ g✝ : ι → R\ns t : Finset ι\ni : ι\nf g h : ι → R\nhi : i ∈ s\nh2i : g i + h i ≤ f i\nhgf : ∀ (j : ι), j ∈ s → j ≠ i → g j ≤ f j\nhhf : ∀ (j : ι), j ∈ s → j ≠ i → h j ≤ f j\nhg : ∀ (i : ι), i ∈ s → 0 ≤ g i\nhh : ∀ (i : ι), i ∈ s → 0 ≤ h i\nj : ι\nh1j : j ∈ s\nh2j : ¬j = i\n⊢ 0 ≤ f j\n[PROOFSTEP]\nexact le_trans (hg j h1j) (hgf j h1j h2j)\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : CanonicallyOrderedCommSemiring R\nf g h : ι → R\ns : Finset ι\ni : ι\nhi : i ∈ s\nh2i : g i + h i ≤ f i\nhgf : ∀ (j : ι), j ∈ s → j ≠ i → g j ≤ f j\nhhf : ∀ (j : ι), j ∈ s → j ≠ i → h j ≤ f j\n⊢ ∏ i in s, g i + ∏ i in s, h i ≤ ∏ i in s, f i\n[PROOFSTEP]\nclassical\nsimp_rw [prod_eq_mul_prod_diff_singleton hi]\nrefine' le_trans _ (mul_le_mul_right' h2i _)\nrw [right_distrib]\napply add_le_add <;> apply mul_le_mul_left' <;> apply prod_le_prod' <;>\n        simp only [and_imp, mem_sdiff, mem_singleton] <;>\n      intros <;>\n    apply_assumption <;>\n  assumption\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : CanonicallyOrderedCommSemiring R\nf g h : ι → R\ns : Finset ι\ni : ι\nhi : i ∈ s\nh2i : g i + h i ≤ f i\nhgf : ∀ (j : ι), j ∈ s → j ≠ i → g j ≤ f j\nhhf : ∀ (j : ι), j ∈ s → j ≠ i → h j ≤ f j\n⊢ ∏ i in s, g i + ∏ i in s, h i ≤ ∏ i in s, f i\n[PROOFSTEP]\nsimp_rw [prod_eq_mul_prod_diff_singleton hi]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : CanonicallyOrderedCommSemiring R\nf g h : ι → R\ns : Finset ι\ni : ι\nhi : i ∈ s\nh2i : g i + h i ≤ f i\nhgf : ∀ (j : ι), j ∈ s → j ≠ i → g j ≤ f j\nhhf : ∀ (j : ι), j ∈ s → j ≠ i → h j ≤ f j\n⊢ g i * ∏ i in s \\ {i}, g i + h i * ∏ i in s \\ {i}, h i ≤ f i * ∏ i in s \\ {i}, f i\n[PROOFSTEP]\nrefine' le_trans _ (mul_le_mul_right' h2i _)\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : CanonicallyOrderedCommSemiring R\nf g h : ι → R\ns : Finset ι\ni : ι\nhi : i ∈ s\nh2i : g i + h i ≤ f i\nhgf : ∀ (j : ι), j ∈ s → j ≠ i → g j ≤ f j\nhhf : ∀ (j : ι), j ∈ s → j ≠ i → h j ≤ f j\n⊢ g i * ∏ i in s \\ {i}, g i + h i * ∏ i in s \\ {i}, h i ≤ (g i + h i) * ∏ i in s \\ {i}, f i\n[PROOFSTEP]\nrw [right_distrib]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : CanonicallyOrderedCommSemiring R\nf g h : ι → R\ns : Finset ι\ni : ι\nhi : i ∈ s\nh2i : g i + h i ≤ f i\nhgf : ∀ (j : ι), j ∈ s → j ≠ i → g j ≤ f j\nhhf : ∀ (j : ι), j ∈ s → j ≠ i → h j ≤ f j\n⊢ g i * ∏ i in s \\ {i}, g i + h i * ∏ i in s \\ {i}, h i ≤ g i * ∏ i in s \\ {i}, f i + h i * ∏ i in s \\ {i}, f i\n[PROOFSTEP]\napply add_le_add\n[GOAL]\ncase h₁\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : CanonicallyOrderedCommSemiring R\nf g h : ι → R\ns : Finset ι\ni : ι\nhi : i ∈ s\nh2i : g i + h i ≤ f i\nhgf : ∀ (j : ι), j ∈ s → j ≠ i → g j ≤ f j\nhhf : ∀ (j : ι), j ∈ s → j ≠ i → h j ≤ f j\n⊢ g i * ∏ i in s \\ {i}, g i ≤ g i * ∏ i in s \\ {i}, f i\n[PROOFSTEP]\napply mul_le_mul_left'\n[GOAL]\ncase h₂\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : CanonicallyOrderedCommSemiring R\nf g h : ι → R\ns : Finset ι\ni : ι\nhi : i ∈ s\nh2i : g i + h i ≤ f i\nhgf : ∀ (j : ι), j ∈ s → j ≠ i → g j ≤ f j\nhhf : ∀ (j : ι), j ∈ s → j ≠ i → h j ≤ f j\n⊢ h i * ∏ i in s \\ {i}, h i ≤ h i * ∏ i in s \\ {i}, f i\n[PROOFSTEP]\napply mul_le_mul_left'\n[GOAL]\ncase h₁.bc\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : CanonicallyOrderedCommSemiring R\nf g h : ι → R\ns : Finset ι\ni : ι\nhi : i ∈ s\nh2i : g i + h i ≤ f i\nhgf : ∀ (j : ι), j ∈ s → j ≠ i → g j ≤ f j\nhhf : ∀ (j : ι), j ∈ s → j ≠ i → h j ≤ f j\n⊢ ∏ i in s \\ {i}, g i ≤ ∏ i in s \\ {i}, f i\n[PROOFSTEP]\napply prod_le_prod'\n[GOAL]\ncase h₂.bc\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : CanonicallyOrderedCommSemiring R\nf g h : ι → R\ns : Finset ι\ni : ι\nhi : i ∈ s\nh2i : g i + h i ≤ f i\nhgf : ∀ (j : ι), j ∈ s → j ≠ i → g j ≤ f j\nhhf : ∀ (j : ι), j ∈ s → j ≠ i → h j ≤ f j\n⊢ ∏ i in s \\ {i}, h i ≤ ∏ i in s \\ {i}, f i\n[PROOFSTEP]\napply prod_le_prod'\n[GOAL]\ncase h₁.bc.h\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : CanonicallyOrderedCommSemiring R\nf g h : ι → R\ns : Finset ι\ni : ι\nhi : i ∈ s\nh2i : g i + h i ≤ f i\nhgf : ∀ (j : ι), j ∈ s → j ≠ i → g j ≤ f j\nhhf : ∀ (j : ι), j ∈ s → j ≠ i → h j ≤ f j\n⊢ ∀ (i_1 : ι), i_1 ∈ s \\ {i} → g i_1 ≤ f i_1\n[PROOFSTEP]\nsimp only [and_imp, mem_sdiff, mem_singleton]\n[GOAL]\ncase h₂.bc.h\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : CanonicallyOrderedCommSemiring R\nf g h : ι → R\ns : Finset ι\ni : ι\nhi : i ∈ s\nh2i : g i + h i ≤ f i\nhgf : ∀ (j : ι), j ∈ s → j ≠ i → g j ≤ f j\nhhf : ∀ (j : ι), j ∈ s → j ≠ i → h j ≤ f j\n⊢ ∀ (i_1 : ι), i_1 ∈ s \\ {i} → h i_1 ≤ f i_1\n[PROOFSTEP]\nsimp only [and_imp, mem_sdiff, mem_singleton]\n[GOAL]\ncase h₁.bc.h\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : CanonicallyOrderedCommSemiring R\nf g h : ι → R\ns : Finset ι\ni : ι\nhi : i ∈ s\nh2i : g i + h i ≤ f i\nhgf : ∀ (j : ι), j ∈ s → j ≠ i → g j ≤ f j\nhhf : ∀ (j : ι), j ∈ s → j ≠ i → h j ≤ f j\n⊢ ∀ (i_1 : ι), i_1 ∈ s → ¬i_1 = i → g i_1 ≤ f i_1\n[PROOFSTEP]\nintros\n[GOAL]\ncase h₂.bc.h\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : CanonicallyOrderedCommSemiring R\nf g h : ι → R\ns : Finset ι\ni : ι\nhi : i ∈ s\nh2i : g i + h i ≤ f i\nhgf : ∀ (j : ι), j ∈ s → j ≠ i → g j ≤ f j\nhhf : ∀ (j : ι), j ∈ s → j ≠ i → h j ≤ f j\n⊢ ∀ (i_1 : ι), i_1 ∈ s → ¬i_1 = i → h i_1 ≤ f i_1\n[PROOFSTEP]\nintros\n[GOAL]\ncase h₁.bc.h\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : CanonicallyOrderedCommSemiring R\nf g h : ι → R\ns : Finset ι\ni : ι\nhi : i ∈ s\nh2i : g i + h i ≤ f i\nhgf : ∀ (j : ι), j ∈ s → j ≠ i → g j ≤ f j\nhhf : ∀ (j : ι), j ∈ s → j ≠ i → h j ≤ f j\ni✝ : ι\na✝¹ : i✝ ∈ s\na✝ : ¬i✝ = i\n⊢ g i✝ ≤ f i✝\n[PROOFSTEP]\napply_assumption\n[GOAL]\ncase h₂.bc.h\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : CanonicallyOrderedCommSemiring R\nf g h : ι → R\ns : Finset ι\ni : ι\nhi : i ∈ s\nh2i : g i + h i ≤ f i\nhgf : ∀ (j : ι), j ∈ s → j ≠ i → g j ≤ f j\nhhf : ∀ (j : ι), j ∈ s → j ≠ i → h j ≤ f j\ni✝ : ι\na✝¹ : i✝ ∈ s\na✝ : ¬i✝ = i\n⊢ h i✝ ≤ f i✝\n[PROOFSTEP]\napply_assumption\n[GOAL]\ncase h₁.bc.h.a\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : CanonicallyOrderedCommSemiring R\nf g h : ι → R\ns : Finset ι\ni : ι\nhi : i ∈ s\nh2i : g i + h i ≤ f i\nhgf : ∀ (j : ι), j ∈ s → j ≠ i → g j ≤ f j\nhhf : ∀ (j : ι), j ∈ s → j ≠ i → h j ≤ f j\ni✝ : ι\na✝¹ : i✝ ∈ s\na✝ : ¬i✝ = i\n⊢ i✝ ∈ s\n[PROOFSTEP]\nassumption\n[GOAL]\ncase h₁.bc.h.a\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : CanonicallyOrderedCommSemiring R\nf g h : ι → R\ns : Finset ι\ni : ι\nhi : i ∈ s\nh2i : g i + h i ≤ f i\nhgf : ∀ (j : ι), j ∈ s → j ≠ i → g j ≤ f j\nhhf : ∀ (j : ι), j ∈ s → j ≠ i → h j ≤ f j\ni✝ : ι\na✝¹ : i✝ ∈ s\na✝ : ¬i✝ = i\n⊢ i✝ ≠ i\n[PROOFSTEP]\nassumption\n[GOAL]\ncase h₂.bc.h.a\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : CanonicallyOrderedCommSemiring R\nf g h : ι → R\ns : Finset ι\ni : ι\nhi : i ∈ s\nh2i : g i + h i ≤ f i\nhgf : ∀ (j : ι), j ∈ s → j ≠ i → g j ≤ f j\nhhf : ∀ (j : ι), j ∈ s → j ≠ i → h j ≤ f j\ni✝ : ι\na✝¹ : i✝ ∈ s\na✝ : ¬i✝ = i\n⊢ i✝ ∈ s\n[PROOFSTEP]\nassumption\n[GOAL]\ncase h₂.bc.h.a\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : CanonicallyOrderedCommSemiring R\nf g h : ι → R\ns : Finset ι\ni : ι\nhi : i ∈ s\nh2i : g i + h i ≤ f i\nhgf : ∀ (j : ι), j ∈ s → j ≠ i → g j ≤ f j\nhhf : ∀ (j : ι), j ∈ s → j ≠ i → h j ≤ f j\ni✝ : ι\na✝¹ : i✝ ∈ s\na✝ : ¬i✝ = i\n⊢ i✝ ≠ i\n[PROOFSTEP]\nassumption\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : AddCommMonoid M\ns : Finset ι\nf : ι → WithTop M\n⊢ ∑ i in s, f i = ⊤ ↔ ∃ i, i ∈ s ∧ f i = ⊤\n[PROOFSTEP]\ninduction s using Finset.cons_induction\n[GOAL]\ncase empty\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : AddCommMonoid M\nf : ι → WithTop M\n⊢ ∑ i in ∅, f i = ⊤ ↔ ∃ i, i ∈ ∅ ∧ f i = ⊤\n[PROOFSTEP]\nsimp [*]\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝ : AddCommMonoid M\nf : ι → WithTop M\na✝¹ : ι\ns✝ : Finset ι\nh✝ : ¬a✝¹ ∈ s✝\na✝ : ∑ i in s✝, f i = ⊤ ↔ ∃ i, i ∈ s✝ ∧ f i = ⊤\n⊢ ∑ i in cons a✝¹ s✝ h✝, f i = ⊤ ↔ ∃ i, i ∈ cons a✝¹ s✝ h✝ ∧ f i = ⊤\n[PROOFSTEP]\nsimp [*]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nM : Type u_4\nN : Type u_5\nG : Type u_6\nk : Type u_7\nR : Type u_8\ninst✝¹ : AddCommMonoid M\ninst✝ : LT M\ns : Finset ι\nf : ι → WithTop M\n⊢ ∑ i in s, f i < ⊤ ↔ ∀ (i : ι), i ∈ s → f i < ⊤\n[PROOFSTEP]\nsimp only [WithTop.lt_top_iff_ne_top, ne_eq, sum_eq_top_iff, not_exists, not_and]\n", "meta": {"mathlib_filename": "Mathlib.Algebra.BigOperators.Order", "llama_tokens": 34395, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8289387914176258, "lm_q2_score": 0.6442251064863697, "lm_q1q2_score": 0.5340231811717026}}
{"text": "[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : HasLimits C\nX : TopCat\nF : J ⥤ Presheaf C X\nH : ∀ (j : J), Presheaf.IsSheaf (F.obj j)\nc : Cone F\nhc : IsLimit c\n⊢ Presheaf.IsSheaf c.pt\n[PROOFSTEP]\nlet F' : J ⥤ Sheaf C X :=\n  { obj := fun j => ⟨F.obj j, H j⟩\n    map := fun f => ⟨F.map f⟩ }\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : HasLimits C\nX : TopCat\nF : J ⥤ Presheaf C X\nH : ∀ (j : J), Presheaf.IsSheaf (F.obj j)\nc : Cone F\nhc : IsLimit c\nF' : J ⥤ Sheaf C X :=\n  CategoryTheory.Functor.mk\n    { obj := fun j => { val := F.obj j, cond := (_ : Presheaf.IsSheaf (F.obj j)) },\n      map := fun {X_1 Y} f => { val := F.map f } }\n⊢ Presheaf.IsSheaf c.pt\n[PROOFSTEP]\nlet e : F' ⋙ Sheaf.forget C X ≅ F := NatIso.ofComponents fun _ => Iso.refl _\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : HasLimits C\nX : TopCat\nF : J ⥤ Presheaf C X\nH : ∀ (j : J), Presheaf.IsSheaf (F.obj j)\nc : Cone F\nhc : IsLimit c\nF' : J ⥤ Sheaf C X :=\n  CategoryTheory.Functor.mk\n    { obj := fun j => { val := F.obj j, cond := (_ : Presheaf.IsSheaf (F.obj j)) },\n      map := fun {X_1 Y} f => { val := F.map f } }\ne : F' ⋙ Sheaf.forget C X ≅ F := NatIso.ofComponents fun x => Iso.refl ((F' ⋙ Sheaf.forget C X).obj x)\n⊢ Presheaf.IsSheaf c.pt\n[PROOFSTEP]\nexact\n  Presheaf.isSheaf_of_iso ((isLimitOfPreserves (Sheaf.forget C X) (limit.isLimit F')).conePointsIsoOfNatIso hc e)\n    (limit F').2\n", "meta": {"mathlib_filename": "Mathlib.Topology.Sheaves.Limits", "llama_tokens": 720, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7981867729389246, "lm_q2_score": 0.6688802603710086, "lm_q1q2_score": 0.5338913765080829}}
{"text": "[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nR : Type u_4\nα : Type u_5\ninst✝³ : DecidableEq l\ninst✝² : DecidableEq m\ninst✝¹ : DecidableEq n\ninst✝ : Semiring α\ni : m\nj : n\na b : α\n⊢ b • stdBasisMatrix i j a = stdBasisMatrix i j (b • a)\n[PROOFSTEP]\nunfold stdBasisMatrix\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nR : Type u_4\nα : Type u_5\ninst✝³ : DecidableEq l\ninst✝² : DecidableEq m\ninst✝¹ : DecidableEq n\ninst✝ : Semiring α\ni : m\nj : n\na b : α\n⊢ (b • fun i' j' => if i = i' ∧ j = j' then a else 0) = fun i' j' => if i = i' ∧ j = j' then b • a else 0\n[PROOFSTEP]\next\n[GOAL]\ncase a.h\nl : Type u_1\nm : Type u_2\nn : Type u_3\nR : Type u_4\nα : Type u_5\ninst✝³ : DecidableEq l\ninst✝² : DecidableEq m\ninst✝¹ : DecidableEq n\ninst✝ : Semiring α\ni : m\nj : n\na b : α\ni✝ : m\nx✝ : n\n⊢ (b • fun i' j' => if i = i' ∧ j = j' then a else 0) i✝ x✝ = if i = i✝ ∧ j = x✝ then b • a else 0\n[PROOFSTEP]\nsimp\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nR : Type u_4\nα : Type u_5\ninst✝³ : DecidableEq l\ninst✝² : DecidableEq m\ninst✝¹ : DecidableEq n\ninst✝ : Semiring α\ni : m\nj : n\n⊢ stdBasisMatrix i j 0 = 0\n[PROOFSTEP]\nunfold stdBasisMatrix\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nR : Type u_4\nα : Type u_5\ninst✝³ : DecidableEq l\ninst✝² : DecidableEq m\ninst✝¹ : DecidableEq n\ninst✝ : Semiring α\ni : m\nj : n\n⊢ (fun i' j' => if i = i' ∧ j = j' then 0 else 0) = 0\n[PROOFSTEP]\next\n[GOAL]\ncase a.h\nl : Type u_1\nm : Type u_2\nn : Type u_3\nR : Type u_4\nα : Type u_5\ninst✝³ : DecidableEq l\ninst✝² : DecidableEq m\ninst✝¹ : DecidableEq n\ninst✝ : Semiring α\ni : m\nj : n\ni✝ : m\nx✝ : n\n⊢ (if i = i✝ ∧ j = x✝ then 0 else 0) = OfNat.ofNat 0 i✝ x✝\n[PROOFSTEP]\nsimp\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nR : Type u_4\nα : Type u_5\ninst✝³ : DecidableEq l\ninst✝² : DecidableEq m\ninst✝¹ : DecidableEq n\ninst✝ : Semiring α\ni : m\nj : n\na b : α\n⊢ stdBasisMatrix i j (a + b) = stdBasisMatrix i j a + stdBasisMatrix i j b\n[PROOFSTEP]\nunfold stdBasisMatrix\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nR : Type u_4\nα : Type u_5\ninst✝³ : DecidableEq l\ninst✝² : DecidableEq m\ninst✝¹ : DecidableEq n\ninst✝ : Semiring α\ni : m\nj : n\na b : α\n⊢ (fun i' j' => if i = i' ∧ j = j' then a + b else 0) =\n    (fun i' j' => if i = i' ∧ j = j' then a else 0) + fun i' j' => if i = i' ∧ j = j' then b else 0\n[PROOFSTEP]\next\n[GOAL]\ncase a.h\nl : Type u_1\nm : Type u_2\nn : Type u_3\nR : Type u_4\nα : Type u_5\ninst✝³ : DecidableEq l\ninst✝² : DecidableEq m\ninst✝¹ : DecidableEq n\ninst✝ : Semiring α\ni : m\nj : n\na b : α\ni✝ : m\nx✝ : n\n⊢ (if i = i✝ ∧ j = x✝ then a + b else 0) =\n    ((fun i' j' => if i = i' ∧ j = j' then a else 0) + fun i' j' => if i = i' ∧ j = j' then b else 0) i✝ x✝\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nl : Type u_1\nm : Type u_2\nn : Type u_3\nR : Type u_4\nα : Type u_5\ninst✝³ : DecidableEq l\ninst✝² : DecidableEq m\ninst✝¹ : DecidableEq n\ninst✝ : Semiring α\ni : m\nj : n\na b : α\ni✝ : m\nx✝ : n\nh : i = i✝ ∧ j = x✝\n⊢ a + b = ((fun i' j' => if i = i' ∧ j = j' then a else 0) + fun i' j' => if i = i' ∧ j = j' then b else 0) i✝ x✝\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase neg\nl : Type u_1\nm : Type u_2\nn : Type u_3\nR : Type u_4\nα : Type u_5\ninst✝³ : DecidableEq l\ninst✝² : DecidableEq m\ninst✝¹ : DecidableEq n\ninst✝ : Semiring α\ni : m\nj : n\na b : α\ni✝ : m\nx✝ : n\nh : ¬(i = i✝ ∧ j = x✝)\n⊢ 0 = ((fun i' j' => if i = i' ∧ j = j' then a else 0) + fun i' j' => if i = i' ∧ j = j' then b else 0) i✝ x✝\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nR : Type u_4\nα : Type u_5\ninst✝⁵ : DecidableEq l\ninst✝⁴ : DecidableEq m\ninst✝³ : DecidableEq n\ninst✝² : Semiring α\ninst✝¹ : Fintype m\ninst✝ : Fintype n\nx : Matrix m n α\n⊢ x = ∑ i : m, ∑ j : n, stdBasisMatrix i j (x i j)\n[PROOFSTEP]\next i j\n[GOAL]\ncase a.h\nl : Type u_1\nm : Type u_2\nn : Type u_3\nR : Type u_4\nα : Type u_5\ninst✝⁵ : DecidableEq l\ninst✝⁴ : DecidableEq m\ninst✝³ : DecidableEq n\ninst✝² : Semiring α\ninst✝¹ : Fintype m\ninst✝ : Fintype n\nx : Matrix m n α\ni : m\nj : n\n⊢ x i j = Finset.sum Finset.univ (fun i => ∑ j : n, stdBasisMatrix i j (x i j)) i j\n[PROOFSTEP]\nsymm\n[GOAL]\ncase a.h\nl : Type u_1\nm : Type u_2\nn : Type u_3\nR : Type u_4\nα : Type u_5\ninst✝⁵ : DecidableEq l\ninst✝⁴ : DecidableEq m\ninst✝³ : DecidableEq n\ninst✝² : Semiring α\ninst✝¹ : Fintype m\ninst✝ : Fintype n\nx : Matrix m n α\ni : m\nj : n\n⊢ Finset.sum Finset.univ (fun i => ∑ j : n, stdBasisMatrix i j (x i j)) i j = x i j\n[PROOFSTEP]\niterate 2\n  rw [Finset.sum_apply]\n    -- Porting note: was `convert`\n[GOAL]\ncase a.h\nl : Type u_1\nm : Type u_2\nn : Type u_3\nR : Type u_4\nα : Type u_5\ninst✝⁵ : DecidableEq l\ninst✝⁴ : DecidableEq m\ninst✝³ : DecidableEq n\ninst✝² : Semiring α\ninst✝¹ : Fintype m\ninst✝ : Fintype n\nx : Matrix m n α\ni : m\nj : n\n⊢ Finset.sum Finset.univ (fun i => ∑ j : n, stdBasisMatrix i j (x i j)) i j = x i j\n[PROOFSTEP]\nrw [Finset.sum_apply]\n  -- Porting note: was `convert`\n[GOAL]\ncase a.h\nl : Type u_1\nm : Type u_2\nn : Type u_3\nR : Type u_4\nα : Type u_5\ninst✝⁵ : DecidableEq l\ninst✝⁴ : DecidableEq m\ninst✝³ : DecidableEq n\ninst✝² : Semiring α\ninst✝¹ : Fintype m\ninst✝ : Fintype n\nx : Matrix m n α\ni : m\nj : n\n⊢ Finset.sum Finset.univ (fun c => Finset.sum Finset.univ (fun j => stdBasisMatrix c j (x c j)) i) j = x i j\n[PROOFSTEP]\nrw [Finset.sum_apply]\n  -- Porting note: was `convert`\n[GOAL]\ncase a.h\nl : Type u_1\nm : Type u_2\nn : Type u_3\nR : Type u_4\nα : Type u_5\ninst✝⁵ : DecidableEq l\ninst✝⁴ : DecidableEq m\ninst✝³ : DecidableEq n\ninst✝² : Semiring α\ninst✝¹ : Fintype m\ninst✝ : Fintype n\nx : Matrix m n α\ni : m\nj : n\n⊢ ∑ c : m, Finset.sum Finset.univ (fun j => stdBasisMatrix c j (x c j)) i j = x i j\n[PROOFSTEP]\nrefine (Fintype.sum_eq_single i ?_).trans ?_\n[GOAL]\ncase a.h.refine_1\nl : Type u_1\nm : Type u_2\nn : Type u_3\nR : Type u_4\nα : Type u_5\ninst✝⁵ : DecidableEq l\ninst✝⁴ : DecidableEq m\ninst✝³ : DecidableEq n\ninst✝² : Semiring α\ninst✝¹ : Fintype m\ninst✝ : Fintype n\nx : Matrix m n α\ni : m\nj : n\n⊢ ∀ (x_1 : m), x_1 ≠ i → Finset.sum Finset.univ (fun j => stdBasisMatrix x_1 j (x x_1 j)) i j = 0\ncase a.h.refine_2\nl : Type u_1\nm : Type u_2\nn : Type u_3\nR : Type u_4\nα : Type u_5\ninst✝⁵ : DecidableEq l\ninst✝⁴ : DecidableEq m\ninst✝³ : DecidableEq n\ninst✝² : Semiring α\ninst✝¹ : Fintype m\ninst✝ : Fintype n\nx : Matrix m n α\ni : m\nj : n\n⊢ Finset.sum Finset.univ (fun j => stdBasisMatrix i j (x i j)) i j = x i j\n[PROOFSTEP]\nswap\n[GOAL]\ncase a.h.refine_2\nl : Type u_1\nm : Type u_2\nn : Type u_3\nR : Type u_4\nα : Type u_5\ninst✝⁵ : DecidableEq l\ninst✝⁴ : DecidableEq m\ninst✝³ : DecidableEq n\ninst✝² : Semiring α\ninst✝¹ : Fintype m\ninst✝ : Fintype n\nx : Matrix m n α\ni : m\nj : n\n⊢ Finset.sum Finset.univ (fun j => stdBasisMatrix i j (x i j)) i j = x i j\n[PROOFSTEP]\nsimp only [stdBasisMatrix]\n[GOAL]\ncase a.h.refine_2\nl : Type u_1\nm : Type u_2\nn : Type u_3\nR : Type u_4\nα : Type u_5\ninst✝⁵ : DecidableEq l\ninst✝⁴ : DecidableEq m\ninst✝³ : DecidableEq n\ninst✝² : Semiring α\ninst✝¹ : Fintype m\ninst✝ : Fintype n\nx : Matrix m n α\ni : m\nj : n\n⊢ Finset.sum Finset.univ (fun x_1 i' j' => if i = i' ∧ x_1 = j' then x i x_1 else 0) i j = x i j\n[PROOFSTEP]\nrw [Fintype.sum_apply, Fintype.sum_apply]\n[GOAL]\ncase a.h.refine_2\nl : Type u_1\nm : Type u_2\nn : Type u_3\nR : Type u_4\nα : Type u_5\ninst✝⁵ : DecidableEq l\ninst✝⁴ : DecidableEq m\ninst✝³ : DecidableEq n\ninst✝² : Semiring α\ninst✝¹ : Fintype m\ninst✝ : Fintype n\nx : Matrix m n α\ni : m\nj : n\n⊢ (∑ c : n, if i = i ∧ c = j then x i c else 0) = x i j\n[PROOFSTEP]\nsimp\n[GOAL]\ncase a.h.refine_1\nl : Type u_1\nm : Type u_2\nn : Type u_3\nR : Type u_4\nα : Type u_5\ninst✝⁵ : DecidableEq l\ninst✝⁴ : DecidableEq m\ninst✝³ : DecidableEq n\ninst✝² : Semiring α\ninst✝¹ : Fintype m\ninst✝ : Fintype n\nx : Matrix m n α\ni : m\nj : n\n⊢ ∀ (x_1 : m), x_1 ≠ i → Finset.sum Finset.univ (fun j => stdBasisMatrix x_1 j (x x_1 j)) i j = 0\n[PROOFSTEP]\nintro j' hj'\n[GOAL]\ncase a.h.refine_1\nl : Type u_1\nm : Type u_2\nn : Type u_3\nR : Type u_4\nα : Type u_5\ninst✝⁵ : DecidableEq l\ninst✝⁴ : DecidableEq m\ninst✝³ : DecidableEq n\ninst✝² : Semiring α\ninst✝¹ : Fintype m\ninst✝ : Fintype n\nx : Matrix m n α\ni : m\nj : n\nj' : m\nhj' : j' ≠ i\n⊢ Finset.sum Finset.univ (fun j => stdBasisMatrix j' j (x j' j)) i j = 0\n[PROOFSTEP]\nsimp only [stdBasisMatrix]\n[GOAL]\ncase a.h.refine_1\nl : Type u_1\nm : Type u_2\nn : Type u_3\nR : Type u_4\nα : Type u_5\ninst✝⁵ : DecidableEq l\ninst✝⁴ : DecidableEq m\ninst✝³ : DecidableEq n\ninst✝² : Semiring α\ninst✝¹ : Fintype m\ninst✝ : Fintype n\nx : Matrix m n α\ni : m\nj : n\nj' : m\nhj' : j' ≠ i\n⊢ Finset.sum Finset.univ (fun x_1 i' j'_1 => if j' = i' ∧ x_1 = j'_1 then x j' x_1 else 0) i j = 0\n[PROOFSTEP]\nrw [Fintype.sum_apply, Fintype.sum_apply]\n[GOAL]\ncase a.h.refine_1\nl : Type u_1\nm : Type u_2\nn : Type u_3\nR : Type u_4\nα : Type u_5\ninst✝⁵ : DecidableEq l\ninst✝⁴ : DecidableEq m\ninst✝³ : DecidableEq n\ninst✝² : Semiring α\ninst✝¹ : Fintype m\ninst✝ : Fintype n\nx : Matrix m n α\ni : m\nj : n\nj' : m\nhj' : j' ≠ i\n⊢ (∑ c : n, if j' = i ∧ c = j then x j' c else 0) = 0\n[PROOFSTEP]\nsimp [hj']\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nR : Type u_4\nα : Type u_5\ninst✝³ : DecidableEq l\ninst✝² : DecidableEq m\ninst✝¹ : DecidableEq n\ninst✝ : Semiring α\ni : m\nj : n\n⊢ stdBasisMatrix i j 1 = vecMulVec (fun i' => if i = i' then 1 else 0) fun j' => if j = j' then 1 else 0\n[PROOFSTEP]\next i' j'\n[GOAL]\ncase a.h\nl : Type u_1\nm : Type u_2\nn : Type u_3\nR : Type u_4\nα : Type u_5\ninst✝³ : DecidableEq l\ninst✝² : DecidableEq m\ninst✝¹ : DecidableEq n\ninst✝ : Semiring α\ni : m\nj : n\ni' : m\nj' : n\n⊢ stdBasisMatrix i j 1 i' j' = vecMulVec (fun i' => if i = i' then 1 else 0) (fun j' => if j = j' then 1 else 0) i' j'\n[PROOFSTEP]\nsimp only [stdBasisMatrix, vecMulVec, mul_ite, mul_one, mul_zero, of_apply]\n  -- Porting note: added next line\n[GOAL]\ncase a.h\nl : Type u_1\nm : Type u_2\nn : Type u_3\nR : Type u_4\nα : Type u_5\ninst✝³ : DecidableEq l\ninst✝² : DecidableEq m\ninst✝¹ : DecidableEq n\ninst✝ : Semiring α\ni : m\nj : n\ni' : m\nj' : n\n⊢ (if i = i' ∧ j = j' then 1 else 0) = if j = j' then if i = i' then 1 else 0 else 0\n[PROOFSTEP]\nsimp_rw [@and_comm (i = i')]\n[GOAL]\ncase a.h\nl : Type u_1\nm : Type u_2\nn : Type u_3\nR : Type u_4\nα : Type u_5\ninst✝³ : DecidableEq l\ninst✝² : DecidableEq m\ninst✝¹ : DecidableEq n\ninst✝ : Semiring α\ni : m\nj : n\ni' : m\nj' : n\n⊢ (if j = j' ∧ i = i' then 1 else 0) = if j = j' then if i = i' then 1 else 0 else 0\n[PROOFSTEP]\nexact ite_and _ _ _ _\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nR : Type u_4\nα : Type u_5\ninst✝⁵ : DecidableEq l\ninst✝⁴ : DecidableEq m\ninst✝³ : DecidableEq n\ninst✝² : Semiring α\ninst✝¹ : Fintype m\ninst✝ : Fintype n\nP : Matrix m n α → Prop\nM : Matrix m n α\nh_zero : P 0\nh_add : ∀ (p q : Matrix m n α), P p → P q → P (p + q)\nh_std_basis : ∀ (i : m) (j : n) (x : α), P (stdBasisMatrix i j x)\n⊢ P M\n[PROOFSTEP]\nrw [matrix_eq_sum_std_basis M, ← Finset.sum_product']\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nR : Type u_4\nα : Type u_5\ninst✝⁵ : DecidableEq l\ninst✝⁴ : DecidableEq m\ninst✝³ : DecidableEq n\ninst✝² : Semiring α\ninst✝¹ : Fintype m\ninst✝ : Fintype n\nP : Matrix m n α → Prop\nM : Matrix m n α\nh_zero : P 0\nh_add : ∀ (p q : Matrix m n α), P p → P q → P (p + q)\nh_std_basis : ∀ (i : m) (j : n) (x : α), P (stdBasisMatrix i j x)\n⊢ P (∑ x in Finset.univ ×ˢ Finset.univ, stdBasisMatrix x.fst x.snd (M x.fst x.snd))\n[PROOFSTEP]\napply Finset.sum_induction _ _ h_add h_zero\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nR : Type u_4\nα : Type u_5\ninst✝⁵ : DecidableEq l\ninst✝⁴ : DecidableEq m\ninst✝³ : DecidableEq n\ninst✝² : Semiring α\ninst✝¹ : Fintype m\ninst✝ : Fintype n\nP : Matrix m n α → Prop\nM : Matrix m n α\nh_zero : P 0\nh_add : ∀ (p q : Matrix m n α), P p → P q → P (p + q)\nh_std_basis : ∀ (i : m) (j : n) (x : α), P (stdBasisMatrix i j x)\n⊢ ∀ (x : m × n), x ∈ Finset.univ ×ˢ Finset.univ → P (stdBasisMatrix x.fst x.snd (M x.fst x.snd))\n[PROOFSTEP]\nintros\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nR : Type u_4\nα : Type u_5\ninst✝⁵ : DecidableEq l\ninst✝⁴ : DecidableEq m\ninst✝³ : DecidableEq n\ninst✝² : Semiring α\ninst✝¹ : Fintype m\ninst✝ : Fintype n\nP : Matrix m n α → Prop\nM : Matrix m n α\nh_zero : P 0\nh_add : ∀ (p q : Matrix m n α), P p → P q → P (p + q)\nh_std_basis : ∀ (i : m) (j : n) (x : α), P (stdBasisMatrix i j x)\nx✝ : m × n\na✝ : x✝ ∈ Finset.univ ×ˢ Finset.univ\n⊢ P (stdBasisMatrix x✝.fst x✝.snd (M x✝.fst x✝.snd))\n[PROOFSTEP]\napply h_std_basis\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nR : Type u_4\nα : Type u_5\ninst✝⁷ : DecidableEq l\ninst✝⁶ : DecidableEq m\ninst✝⁵ : DecidableEq n\ninst✝⁴ : Semiring α\ninst✝³ : Fintype m\ninst✝² : Fintype n\ninst✝¹ : Nonempty m\ninst✝ : Nonempty n\nP : Matrix m n α → Prop\nM : Matrix m n α\nh_add : ∀ (p q : Matrix m n α), P p → P q → P (p + q)\nh_std_basis : ∀ (i : m) (j : n) (x : α), P (stdBasisMatrix i j x)\n⊢ P 0\n[PROOFSTEP]\ninhabit m\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nR : Type u_4\nα : Type u_5\ninst✝⁷ : DecidableEq l\ninst✝⁶ : DecidableEq m\ninst✝⁵ : DecidableEq n\ninst✝⁴ : Semiring α\ninst✝³ : Fintype m\ninst✝² : Fintype n\ninst✝¹ : Nonempty m\ninst✝ : Nonempty n\nP : Matrix m n α → Prop\nM : Matrix m n α\nh_add : ∀ (p q : Matrix m n α), P p → P q → P (p + q)\nh_std_basis : ∀ (i : m) (j : n) (x : α), P (stdBasisMatrix i j x)\ninhabited_h : Inhabited m\n⊢ P 0\n[PROOFSTEP]\ninhabit n\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nR : Type u_4\nα : Type u_5\ninst✝⁷ : DecidableEq l\ninst✝⁶ : DecidableEq m\ninst✝⁵ : DecidableEq n\ninst✝⁴ : Semiring α\ninst✝³ : Fintype m\ninst✝² : Fintype n\ninst✝¹ : Nonempty m\ninst✝ : Nonempty n\nP : Matrix m n α → Prop\nM : Matrix m n α\nh_add : ∀ (p q : Matrix m n α), P p → P q → P (p + q)\nh_std_basis : ∀ (i : m) (j : n) (x : α), P (stdBasisMatrix i j x)\ninhabited_h✝ : Inhabited m\ninhabited_h : Inhabited n\n⊢ P 0\n[PROOFSTEP]\nsimpa using h_std_basis default default 0\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nR : Type u_4\nα : Type u_5\ninst✝³ : DecidableEq l\ninst✝² : DecidableEq m\ninst✝¹ : DecidableEq n\ninst✝ : Semiring α\ni : m\nj : n\nc : α\ni' : m\nj' : n\nh : ¬(i = i' ∧ j = j')\n⊢ stdBasisMatrix i j c i' j' = 0\n[PROOFSTEP]\nsimp only [stdBasisMatrix, and_imp, ite_eq_right_iff]\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nR : Type u_4\nα : Type u_5\ninst✝³ : DecidableEq l\ninst✝² : DecidableEq m\ninst✝¹ : DecidableEq n\ninst✝ : Semiring α\ni : m\nj : n\nc : α\ni' : m\nj' : n\nh : ¬(i = i' ∧ j = j')\n⊢ i = i' → j = j' → c = 0\n[PROOFSTEP]\ntauto\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nR : Type u_4\nα : Type u_5\ninst✝³ : DecidableEq l\ninst✝² : DecidableEq m\ninst✝¹ : DecidableEq n\ninst✝ : Semiring α\ni✝ : m\nj✝ : n\nc : α\ni'✝ : m\nj'✝ : n\ni i' : m\nhi : i ≠ i'\nj j' : n\na : α\n⊢ stdBasisMatrix i j a i' j' = 0\n[PROOFSTEP]\nsimp [hi]\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nR : Type u_4\nα : Type u_5\ninst✝³ : DecidableEq l\ninst✝² : DecidableEq m\ninst✝¹ : DecidableEq n\ninst✝ : Semiring α\ni✝ : m\nj✝ : n\nc : α\ni'✝ : m\nj'✝ : n\ni i' : m\nj j' : n\nhj : j ≠ j'\na : α\n⊢ stdBasisMatrix i j a i' j' = 0\n[PROOFSTEP]\nsimp [hj]\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nR : Type u_4\nα : Type u_5\ninst✝³ : DecidableEq l\ninst✝² : DecidableEq m\ninst✝¹ : DecidableEq n\ninst✝ : Semiring α\ni j : n\nc : α\ni' j' : n\n⊢ diag (stdBasisMatrix i i c) = Pi.single i c\n[PROOFSTEP]\next j\n[GOAL]\ncase h\nl : Type u_1\nm : Type u_2\nn : Type u_3\nR : Type u_4\nα : Type u_5\ninst✝³ : DecidableEq l\ninst✝² : DecidableEq m\ninst✝¹ : DecidableEq n\ninst✝ : Semiring α\ni j✝ : n\nc : α\ni' j' j : n\n⊢ diag (stdBasisMatrix i i c) j = Pi.single i c j\n[PROOFSTEP]\nby_cases hij : i = j\n[GOAL]\ncase pos\nl : Type u_1\nm : Type u_2\nn : Type u_3\nR : Type u_4\nα : Type u_5\ninst✝³ : DecidableEq l\ninst✝² : DecidableEq m\ninst✝¹ : DecidableEq n\ninst✝ : Semiring α\ni j✝ : n\nc : α\ni' j' j : n\nhij : i = j\n⊢ diag (stdBasisMatrix i i c) j = Pi.single i c j\n[PROOFSTEP]\ntry rw [hij]\n[GOAL]\ncase pos\nl : Type u_1\nm : Type u_2\nn : Type u_3\nR : Type u_4\nα : Type u_5\ninst✝³ : DecidableEq l\ninst✝² : DecidableEq m\ninst✝¹ : DecidableEq n\ninst✝ : Semiring α\ni j✝ : n\nc : α\ni' j' j : n\nhij : i = j\n⊢ diag (stdBasisMatrix i i c) j = Pi.single i c j\n[PROOFSTEP]\nrw [hij]\n[GOAL]\ncase neg\nl : Type u_1\nm : Type u_2\nn : Type u_3\nR : Type u_4\nα : Type u_5\ninst✝³ : DecidableEq l\ninst✝² : DecidableEq m\ninst✝¹ : DecidableEq n\ninst✝ : Semiring α\ni j✝ : n\nc : α\ni' j' j : n\nhij : ¬i = j\n⊢ diag (stdBasisMatrix i i c) j = Pi.single i c j\n[PROOFSTEP]\ntry rw [hij]\n[GOAL]\ncase neg\nl : Type u_1\nm : Type u_2\nn : Type u_3\nR : Type u_4\nα : Type u_5\ninst✝³ : DecidableEq l\ninst✝² : DecidableEq m\ninst✝¹ : DecidableEq n\ninst✝ : Semiring α\ni j✝ : n\nc : α\ni' j' j : n\nhij : ¬i = j\n⊢ diag (stdBasisMatrix i i c) j = Pi.single i c j\n[PROOFSTEP]\nrw [hij]\n[GOAL]\ncase pos\nl : Type u_1\nm : Type u_2\nn : Type u_3\nR : Type u_4\nα : Type u_5\ninst✝³ : DecidableEq l\ninst✝² : DecidableEq m\ninst✝¹ : DecidableEq n\ninst✝ : Semiring α\ni j✝ : n\nc : α\ni' j' j : n\nhij : i = j\n⊢ diag (stdBasisMatrix j j c) j = Pi.single j c j\n[PROOFSTEP]\nsimp [hij]\n[GOAL]\ncase neg\nl : Type u_1\nm : Type u_2\nn : Type u_3\nR : Type u_4\nα : Type u_5\ninst✝³ : DecidableEq l\ninst✝² : DecidableEq m\ninst✝¹ : DecidableEq n\ninst✝ : Semiring α\ni j✝ : n\nc : α\ni' j' j : n\nhij : ¬i = j\n⊢ diag (stdBasisMatrix i i c) j = Pi.single i c j\n[PROOFSTEP]\nsimp [hij]\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nR : Type u_4\nα : Type u_5\ninst✝⁴ : DecidableEq l\ninst✝³ : DecidableEq m\ninst✝² : DecidableEq n\ninst✝¹ : Semiring α\ni j : n\nc : α\ni' j' : n\ninst✝ : Fintype n\nh : j ≠ i\n⊢ trace (stdBasisMatrix i j c) = 0\n[PROOFSTEP]\nsimp [trace, -diag_apply, h]\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nR : Type u_4\nα : Type u_5\ninst✝⁴ : DecidableEq l\ninst✝³ : DecidableEq m\ninst✝² : DecidableEq n\ninst✝¹ : Semiring α\ni j : n\nc : α\ni' j' : n\ninst✝ : Fintype n\n⊢ trace (stdBasisMatrix i i c) = c\n[PROOFSTEP]\nsimp [trace, -diag_apply]\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nR : Type u_4\nα : Type u_5\ninst✝⁴ : DecidableEq l\ninst✝³ : DecidableEq m\ninst✝² : DecidableEq n\ninst✝¹ : Semiring α\ni j : n\nc : α\ni' j' : n\ninst✝ : Fintype n\nb : n\nM : Matrix n n α\n⊢ (stdBasisMatrix i j c * M) i b = c * M j b\n[PROOFSTEP]\nsimp [mul_apply, stdBasisMatrix]\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nR : Type u_4\nα : Type u_5\ninst✝⁴ : DecidableEq l\ninst✝³ : DecidableEq m\ninst✝² : DecidableEq n\ninst✝¹ : Semiring α\ni j : n\nc : α\ni' j' : n\ninst✝ : Fintype n\na : n\nM : Matrix n n α\n⊢ (M * stdBasisMatrix i j c) a j = M a i * c\n[PROOFSTEP]\nsimp [mul_apply, stdBasisMatrix, mul_comm]\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nR : Type u_4\nα : Type u_5\ninst✝⁴ : DecidableEq l\ninst✝³ : DecidableEq m\ninst✝² : DecidableEq n\ninst✝¹ : Semiring α\ni j : n\nc : α\ni' j' : n\ninst✝ : Fintype n\na b : n\nh : a ≠ i\nM : Matrix n n α\n⊢ (stdBasisMatrix i j c * M) a b = 0\n[PROOFSTEP]\nsimp [mul_apply, h.symm]\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nR : Type u_4\nα : Type u_5\ninst✝⁴ : DecidableEq l\ninst✝³ : DecidableEq m\ninst✝² : DecidableEq n\ninst✝¹ : Semiring α\ni j : n\nc : α\ni' j' : n\ninst✝ : Fintype n\na b : n\nhbj : b ≠ j\nM : Matrix n n α\n⊢ (M * stdBasisMatrix i j c) a b = 0\n[PROOFSTEP]\nsimp [mul_apply, hbj.symm]\n[GOAL]\nl : Type u_1\nm : Type u_2\nn : Type u_3\nR : Type u_4\nα : Type u_5\ninst✝⁴ : DecidableEq l\ninst✝³ : DecidableEq m\ninst✝² : DecidableEq n\ninst✝¹ : Semiring α\ni j : n\nc : α\ni' j' : n\ninst✝ : Fintype n\nk : n\nd : α\n⊢ stdBasisMatrix i j c * stdBasisMatrix j k d = stdBasisMatrix i k (c * d)\n[PROOFSTEP]\next a b\n[GOAL]\ncase a.h\nl : Type u_1\nm : Type u_2\nn : Type u_3\nR : Type u_4\nα : Type u_5\ninst✝⁴ : DecidableEq l\ninst✝³ : DecidableEq m\ninst✝² : DecidableEq n\ninst✝¹ : Semiring α\ni j : n\nc : α\ni' j' : n\ninst✝ : Fintype n\nk : n\nd : α\na b : n\n⊢ (stdBasisMatrix i j c * stdBasisMatrix j k d) a b = stdBasisMatrix i k (c * d) a b\n[PROOFSTEP]\nsimp only [mul_apply, stdBasisMatrix, boole_mul]\n[GOAL]\ncase a.h\nl : Type u_1\nm : Type u_2\nn : Type u_3\nR : Type u_4\nα : Type u_5\ninst✝⁴ : DecidableEq l\ninst✝³ : DecidableEq m\ninst✝² : DecidableEq n\ninst✝¹ : Semiring α\ni j : n\nc : α\ni' j' : n\ninst✝ : Fintype n\nk : n\nd : α\na b : n\n⊢ (∑ j_1 : n, (if i = a ∧ j = j_1 then c else 0) * if j = j_1 ∧ k = b then d else 0) =\n    if i = a ∧ k = b then c * d else 0\n[PROOFSTEP]\nby_cases h₁ : i = a\n[GOAL]\ncase pos\nl : Type u_1\nm : Type u_2\nn : Type u_3\nR : Type u_4\nα : Type u_5\ninst✝⁴ : DecidableEq l\ninst✝³ : DecidableEq m\ninst✝² : DecidableEq n\ninst✝¹ : Semiring α\ni j : n\nc : α\ni' j' : n\ninst✝ : Fintype n\nk : n\nd : α\na b : n\nh₁ : i = a\n⊢ (∑ j_1 : n, (if i = a ∧ j = j_1 then c else 0) * if j = j_1 ∧ k = b then d else 0) =\n    if i = a ∧ k = b then c * d else 0\n[PROOFSTEP]\nby_cases h₂ : k = b\n[GOAL]\ncase neg\nl : Type u_1\nm : Type u_2\nn : Type u_3\nR : Type u_4\nα : Type u_5\ninst✝⁴ : DecidableEq l\ninst✝³ : DecidableEq m\ninst✝² : DecidableEq n\ninst✝¹ : Semiring α\ni j : n\nc : α\ni' j' : n\ninst✝ : Fintype n\nk : n\nd : α\na b : n\nh₁ : ¬i = a\n⊢ (∑ j_1 : n, (if i = a ∧ j = j_1 then c else 0) * if j = j_1 ∧ k = b then d else 0) =\n    if i = a ∧ k = b then c * d else 0\n[PROOFSTEP]\nby_cases h₂ : k = b\n[GOAL]\ncase pos\nl : Type u_1\nm : Type u_2\nn : Type u_3\nR : Type u_4\nα : Type u_5\ninst✝⁴ : DecidableEq l\ninst✝³ : DecidableEq m\ninst✝² : DecidableEq n\ninst✝¹ : Semiring α\ni j : n\nc : α\ni' j' : n\ninst✝ : Fintype n\nk : n\nd : α\na b : n\nh₁ : i = a\nh₂ : k = b\n⊢ (∑ j_1 : n, (if i = a ∧ j = j_1 then c else 0) * if j = j_1 ∧ k = b then d else 0) =\n    if i = a ∧ k = b then c * d else 0\n[PROOFSTEP]\nsimp [h₁, h₂]\n[GOAL]\ncase neg\nl : Type u_1\nm : Type u_2\nn : Type u_3\nR : Type u_4\nα : Type u_5\ninst✝⁴ : DecidableEq l\ninst✝³ : DecidableEq m\ninst✝² : DecidableEq n\ninst✝¹ : Semiring α\ni j : n\nc : α\ni' j' : n\ninst✝ : Fintype n\nk : n\nd : α\na b : n\nh₁ : i = a\nh₂ : ¬k = b\n⊢ (∑ j_1 : n, (if i = a ∧ j = j_1 then c else 0) * if j = j_1 ∧ k = b then d else 0) =\n    if i = a ∧ k = b then c * d else 0\n[PROOFSTEP]\nsimp [h₁, h₂]\n[GOAL]\ncase pos\nl : Type u_1\nm : Type u_2\nn : Type u_3\nR : Type u_4\nα : Type u_5\ninst✝⁴ : DecidableEq l\ninst✝³ : DecidableEq m\ninst✝² : DecidableEq n\ninst✝¹ : Semiring α\ni j : n\nc : α\ni' j' : n\ninst✝ : Fintype n\nk : n\nd : α\na b : n\nh₁ : ¬i = a\nh₂ : k = b\n⊢ (∑ j_1 : n, (if i = a ∧ j = j_1 then c else 0) * if j = j_1 ∧ k = b then d else 0) =\n    if i = a ∧ k = b then c * d else 0\n[PROOFSTEP]\nsimp [h₁, h₂]\n[GOAL]\ncase neg\nl : Type u_1\nm : Type u_2\nn : Type u_3\nR : Type u_4\nα : Type u_5\ninst✝⁴ : DecidableEq l\ninst✝³ : DecidableEq m\ninst✝² : DecidableEq n\ninst✝¹ : Semiring α\ni j : n\nc : α\ni' j' : n\ninst✝ : Fintype n\nk : n\nd : α\na b : n\nh₁ : ¬i = a\nh₂ : ¬k = b\n⊢ (∑ j_1 : n, (if i = a ∧ j = j_1 then c else 0) * if j = j_1 ∧ k = b then d else 0) =\n    if i = a ∧ k = b then c * d else 0\n[PROOFSTEP]\nsimp [h₁, h₂]\n[GOAL]\nl✝ : Type u_1\nm : Type u_2\nn : Type u_3\nR : Type u_4\nα : Type u_5\ninst✝⁴ : DecidableEq l✝\ninst✝³ : DecidableEq m\ninst✝² : DecidableEq n\ninst✝¹ : Semiring α\ni j : n\nc : α\ni' j' : n\ninst✝ : Fintype n\nk l : n\nh : j ≠ k\nd : α\n⊢ stdBasisMatrix i j c * stdBasisMatrix k l d = 0\n[PROOFSTEP]\next a b\n[GOAL]\ncase a.h\nl✝ : Type u_1\nm : Type u_2\nn : Type u_3\nR : Type u_4\nα : Type u_5\ninst✝⁴ : DecidableEq l✝\ninst✝³ : DecidableEq m\ninst✝² : DecidableEq n\ninst✝¹ : Semiring α\ni j : n\nc : α\ni' j' : n\ninst✝ : Fintype n\nk l : n\nh : j ≠ k\nd : α\na b : n\n⊢ (stdBasisMatrix i j c * stdBasisMatrix k l d) a b = OfNat.ofNat 0 a b\n[PROOFSTEP]\nsimp only [mul_apply, boole_mul, stdBasisMatrix]\n[GOAL]\ncase a.h\nl✝ : Type u_1\nm : Type u_2\nn : Type u_3\nR : Type u_4\nα : Type u_5\ninst✝⁴ : DecidableEq l✝\ninst✝³ : DecidableEq m\ninst✝² : DecidableEq n\ninst✝¹ : Semiring α\ni j : n\nc : α\ni' j' : n\ninst✝ : Fintype n\nk l : n\nh : j ≠ k\nd : α\na b : n\n⊢ (∑ j_1 : n, (if i = a ∧ j = j_1 then c else 0) * if k = j_1 ∧ l = b then d else 0) = OfNat.ofNat 0 a b\n[PROOFSTEP]\nby_cases h₁ : i = a\n[GOAL]\ncase pos\nl✝ : Type u_1\nm : Type u_2\nn : Type u_3\nR : Type u_4\nα : Type u_5\ninst✝⁴ : DecidableEq l✝\ninst✝³ : DecidableEq m\ninst✝² : DecidableEq n\ninst✝¹ : Semiring α\ni j : n\nc : α\ni' j' : n\ninst✝ : Fintype n\nk l : n\nh : j ≠ k\nd : α\na b : n\nh₁ : i = a\n⊢ (∑ j_1 : n, (if i = a ∧ j = j_1 then c else 0) * if k = j_1 ∧ l = b then d else 0) = OfNat.ofNat 0 a b\n[PROOFSTEP]\nsimp only [h₁, true_and, mul_ite, ite_mul, zero_mul, mul_zero, ← ite_and, zero_apply]\n[GOAL]\ncase pos\nl✝ : Type u_1\nm : Type u_2\nn : Type u_3\nR : Type u_4\nα : Type u_5\ninst✝⁴ : DecidableEq l✝\ninst✝³ : DecidableEq m\ninst✝² : DecidableEq n\ninst✝¹ : Semiring α\ni j : n\nc : α\ni' j' : n\ninst✝ : Fintype n\nk l : n\nh : j ≠ k\nd : α\na b : n\nh₁ : i = a\n⊢ (∑ x : n, if (k = x ∧ l = b) ∧ j = x then c * d else 0) = 0\n[PROOFSTEP]\nrefine Finset.sum_eq_zero (fun x _ => ?_)\n[GOAL]\ncase pos\nl✝ : Type u_1\nm : Type u_2\nn : Type u_3\nR : Type u_4\nα : Type u_5\ninst✝⁴ : DecidableEq l✝\ninst✝³ : DecidableEq m\ninst✝² : DecidableEq n\ninst✝¹ : Semiring α\ni j : n\nc : α\ni' j' : n\ninst✝ : Fintype n\nk l : n\nh : j ≠ k\nd : α\na b : n\nh₁ : i = a\nx : n\nx✝ : x ∈ Finset.univ\n⊢ (if (k = x ∧ l = b) ∧ j = x then c * d else 0) = 0\n[PROOFSTEP]\napply if_neg\n[GOAL]\ncase pos.hnc\nl✝ : Type u_1\nm : Type u_2\nn : Type u_3\nR : Type u_4\nα : Type u_5\ninst✝⁴ : DecidableEq l✝\ninst✝³ : DecidableEq m\ninst✝² : DecidableEq n\ninst✝¹ : Semiring α\ni j : n\nc : α\ni' j' : n\ninst✝ : Fintype n\nk l : n\nh : j ≠ k\nd : α\na b : n\nh₁ : i = a\nx : n\nx✝ : x ∈ Finset.univ\n⊢ ¬((k = x ∧ l = b) ∧ j = x)\n[PROOFSTEP]\nrintro ⟨⟨rfl, rfl⟩, h⟩\n[GOAL]\ncase pos.hnc.intro.intro\nl✝ : Type u_1\nm : Type u_2\nn : Type u_3\nR : Type u_4\nα : Type u_5\ninst✝⁴ : DecidableEq l✝\ninst✝³ : DecidableEq m\ninst✝² : DecidableEq n\ninst✝¹ : Semiring α\ni j : n\nc : α\ni' j' : n\ninst✝ : Fintype n\nk l : n\nh✝ : j ≠ k\nd : α\na : n\nh₁ : i = a\nx✝ : k ∈ Finset.univ\nh : j = k\n⊢ False\n[PROOFSTEP]\ncontradiction\n[GOAL]\ncase neg\nl✝ : Type u_1\nm : Type u_2\nn : Type u_3\nR : Type u_4\nα : Type u_5\ninst✝⁴ : DecidableEq l✝\ninst✝³ : DecidableEq m\ninst✝² : DecidableEq n\ninst✝¹ : Semiring α\ni j : n\nc : α\ni' j' : n\ninst✝ : Fintype n\nk l : n\nh : j ≠ k\nd : α\na b : n\nh₁ : ¬i = a\n⊢ (∑ j_1 : n, (if i = a ∧ j = j_1 then c else 0) * if k = j_1 ∧ l = b then d else 0) = OfNat.ofNat 0 a b\n[PROOFSTEP]\nsimp only [h₁, false_and, ite_false, mul_ite, zero_mul, mul_zero, ite_self, Finset.sum_const_zero, zero_apply]\n", "meta": {"mathlib_filename": "Mathlib.Data.Matrix.Basis", "llama_tokens": 13753, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.810478926981208, "lm_q2_score": 0.658417500561683, "lm_q1q2_score": 0.5336335093608818}}
{"text": "[GOAL]\nα : Sort u\nβ : Sort v\nγ : Sort w\ne₁ e₂ : α ≃ β\nh₁ : e₁.toFun = e₂.toFun\nh₂ : e₁.invFun = e₂.invFun\n⊢ e₁ = e₂\n[PROOFSTEP]\ncases e₁\n[GOAL]\ncase mk\nα : Sort u\nβ : Sort v\nγ : Sort w\ne₂ : α ≃ β\ntoFun✝ : α → β\ninvFun✝ : β → α\nleft_inv✝ : LeftInverse invFun✝ toFun✝\nright_inv✝ : Function.RightInverse invFun✝ toFun✝\nh₁ : { toFun := toFun✝, invFun := invFun✝, left_inv := left_inv✝, right_inv := right_inv✝ }.toFun = e₂.toFun\nh₂ : { toFun := toFun✝, invFun := invFun✝, left_inv := left_inv✝, right_inv := right_inv✝ }.invFun = e₂.invFun\n⊢ { toFun := toFun✝, invFun := invFun✝, left_inv := left_inv✝, right_inv := right_inv✝ } = e₂\n[PROOFSTEP]\ncases e₂\n[GOAL]\ncase mk.mk\nα : Sort u\nβ : Sort v\nγ : Sort w\ntoFun✝¹ : α → β\ninvFun✝¹ : β → α\nleft_inv✝¹ : LeftInverse invFun✝¹ toFun✝¹\nright_inv✝¹ : Function.RightInverse invFun✝¹ toFun✝¹\ntoFun✝ : α → β\ninvFun✝ : β → α\nleft_inv✝ : LeftInverse invFun✝ toFun✝\nright_inv✝ : Function.RightInverse invFun✝ toFun✝\nh₁ :\n  { toFun := toFun✝¹, invFun := invFun✝¹, left_inv := left_inv✝¹, right_inv := right_inv✝¹ }.toFun =\n    { toFun := toFun✝, invFun := invFun✝, left_inv := left_inv✝, right_inv := right_inv✝ }.toFun\nh₂ :\n  { toFun := toFun✝¹, invFun := invFun✝¹, left_inv := left_inv✝¹, right_inv := right_inv✝¹ }.invFun =\n    { toFun := toFun✝, invFun := invFun✝, left_inv := left_inv✝, right_inv := right_inv✝ }.invFun\n⊢ { toFun := toFun✝¹, invFun := invFun✝¹, left_inv := left_inv✝¹, right_inv := right_inv✝¹ } =\n    { toFun := toFun✝, invFun := invFun✝, left_inv := left_inv✝, right_inv := right_inv✝ }\n[PROOFSTEP]\ncongr\n[GOAL]\nα✝ : Sort u\nβ✝ : Sort v\nγ : Sort w\nα β : Sort ?u.16583\nh : α = β\nx✝ : α\n⊢ cast (_ : β = α) (cast h x✝) = x✝\n[PROOFSTEP]\ncases h\n[GOAL]\ncase refl\nα✝ : Sort u\nβ : Sort v\nγ : Sort w\nα : Sort ?u.16583\nx✝ : α\n⊢ cast (_ : α = α) (cast (_ : α = α) x✝) = x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nα✝ : Sort u\nβ✝ : Sort v\nγ : Sort w\nα β : Sort ?u.16583\nh : α = β\nx✝ : β\n⊢ cast h (cast (_ : β = α) x✝) = x✝\n[PROOFSTEP]\ncases h\n[GOAL]\ncase refl\nα✝ : Sort u\nβ : Sort v\nγ : Sort w\nα : Sort ?u.16583\nx✝ : α\n⊢ cast (_ : α = α) (cast (_ : α = α) x✝) = x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nα✝ : Sort u\nβ : Sort v\nγ : Sort w\nα : Type u_1\ninst✝ : Subsingleton α\ne : Perm α\n⊢ ↑e = id\n[PROOFSTEP]\nrw [Perm.subsingleton_eq_refl e, coe_refl]\n[GOAL]\nα : Sort u\nβ : Sort v\nγ : Sort w\nx : α\ny : (fun x => β) x\nf : α ≃ β\n⊢ ↑f x = y ↔ x = ↑f.symm y\n[PROOFSTEP]\nconv_lhs => rw [← apply_symm_apply f y]\n[GOAL]\nα : Sort u\nβ : Sort v\nγ : Sort w\nx : α\ny : (fun x => β) x\nf : α ≃ β\n| ↑f x = y\n[PROOFSTEP]\nrw [← apply_symm_apply f y]\n[GOAL]\nα : Sort u\nβ : Sort v\nγ : Sort w\nx : α\ny : (fun x => β) x\nf : α ≃ β\n| ↑f x = y\n[PROOFSTEP]\nrw [← apply_symm_apply f y]\n[GOAL]\nα : Sort u\nβ : Sort v\nγ : Sort w\nx : α\ny : (fun x => β) x\nf : α ≃ β\n| ↑f x = y\n[PROOFSTEP]\nrw [← apply_symm_apply f y]\n[GOAL]\nα : Sort u\nβ : Sort v\nγ : Sort w\nx : α\ny : (fun x => β) x\nf : α ≃ β\n⊢ ↑f x = ↑f (↑f.symm y) ↔ x = ↑f.symm y\n[PROOFSTEP]\nrw [apply_eq_iff_eq]\n[GOAL]\nα✝ : Sort u\nβ✝ : Sort v\nγ✝ : Sort w\nα β γ : Sort u_1\nh : α = β\nh2 : β = γ\nx : α\n⊢ ↑((Equiv.cast h).trans (Equiv.cast h2)) x = ↑(Equiv.cast (_ : α = γ)) x\n[PROOFSTEP]\nsubsts h h2\n[GOAL]\nα✝ : Sort u\nβ : Sort v\nγ : Sort w\nα : Sort u_1\nx : α\n⊢ ↑((Equiv.cast (_ : α = α)).trans (Equiv.cast (_ : α = α))) x = ↑(Equiv.cast (_ : α = α)) x\n[PROOFSTEP]\nrfl\n[GOAL]\nα✝ : Sort u\nβ✝ : Sort v\nγ : Sort w\nα β : Sort u_1\nh : α = β\na : α\nb : β\n⊢ ↑(Equiv.cast h) a = b ↔ HEq a b\n[PROOFSTEP]\nsubst h\n[GOAL]\nα✝ : Sort u\nβ : Sort v\nγ : Sort w\nα : Sort u_1\na b : α\n⊢ ↑(Equiv.cast (_ : α = α)) a = b ↔ HEq a b\n[PROOFSTEP]\nsimp [coe_refl]\n[GOAL]\nα✝ : Sort u\nβ✝ : Sort v\nγ : Sort w\nα : Sort u_1\nβ : Sort u_2\ne : α ≃ β\nx : β\ny : (fun x => α) x\nH : ↑e.symm x = y\n⊢ x = ↑e y\n[PROOFSTEP]\nsimp [H.symm]\n[GOAL]\nα✝ : Sort u\nβ✝ : Sort v\nγ : Sort w\nα : Sort u_1\nβ : Sort u_2\ne : α ≃ β\nx : β\ny : (fun x => α) x\nH : x = ↑e y\n⊢ ↑e.symm x = y\n[PROOFSTEP]\nsimp [H]\n[GOAL]\nα : Sort u\nβ : Sort v\nγ : Sort w\ne : α ≃ β\n⊢ e.symm.symm = e\n[PROOFSTEP]\ncases e\n[GOAL]\ncase mk\nα : Sort u\nβ : Sort v\nγ : Sort w\ntoFun✝ : α → β\ninvFun✝ : β → α\nleft_inv✝ : LeftInverse invFun✝ toFun✝\nright_inv✝ : Function.RightInverse invFun✝ toFun✝\n⊢ { toFun := toFun✝, invFun := invFun✝, left_inv := left_inv✝, right_inv := right_inv✝ }.symm.symm =\n    { toFun := toFun✝, invFun := invFun✝, left_inv := left_inv✝, right_inv := right_inv✝ }\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Sort u\nβ : Sort v\nγ : Sort w\ne : α ≃ β\n⊢ e.trans (Equiv.refl β) = e\n[PROOFSTEP]\ncases e\n[GOAL]\ncase mk\nα : Sort u\nβ : Sort v\nγ : Sort w\ntoFun✝ : α → β\ninvFun✝ : β → α\nleft_inv✝ : LeftInverse invFun✝ toFun✝\nright_inv✝ : Function.RightInverse invFun✝ toFun✝\n⊢ { toFun := toFun✝, invFun := invFun✝, left_inv := left_inv✝, right_inv := right_inv✝ }.trans (Equiv.refl β) =\n    { toFun := toFun✝, invFun := invFun✝, left_inv := left_inv✝, right_inv := right_inv✝ }\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Sort u\nβ : Sort v\nγ : Sort w\ne : α ≃ β\n⊢ (Equiv.refl α).trans e = e\n[PROOFSTEP]\ncases e\n[GOAL]\ncase mk\nα : Sort u\nβ : Sort v\nγ : Sort w\ntoFun✝ : α → β\ninvFun✝ : β → α\nleft_inv✝ : LeftInverse invFun✝ toFun✝\nright_inv✝ : Function.RightInverse invFun✝ toFun✝\n⊢ (Equiv.refl α).trans { toFun := toFun✝, invFun := invFun✝, left_inv := left_inv✝, right_inv := right_inv✝ } =\n    { toFun := toFun✝, invFun := invFun✝, left_inv := left_inv✝, right_inv := right_inv✝ }\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Sort u\nβ : Sort v\nγ : Sort w\ne : α ≃ β\n⊢ ∀ (x : β), ↑(e.symm.trans e) x = ↑(Equiv.refl β) x\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Sort u\nβ : Sort v\nγ : Sort w\ne : α ≃ β\n⊢ ∀ (x : α), ↑(e.trans e.symm) x = ↑(Equiv.refl α) x\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Sort u\nβ : Sort v\nγ : Sort w\nδ : Sort ?u.23940\nab : α ≃ β\ncd : γ ≃ δ\nac : α ≃ γ\n⊢ (fun bd => ab.trans (bd.trans cd.symm)) ((fun ac => (ab.symm.trans ac).trans cd) ac) = ac\n[PROOFSTEP]\next x\n[GOAL]\ncase H\nα : Sort u\nβ : Sort v\nγ : Sort w\nδ : Sort ?u.23940\nab : α ≃ β\ncd : γ ≃ δ\nac : α ≃ γ\nx : α\n⊢ ↑((fun bd => ab.trans (bd.trans cd.symm)) ((fun ac => (ab.symm.trans ac).trans cd) ac)) x = ↑ac x\n[PROOFSTEP]\nsimp only [trans_apply, comp_apply, symm_apply_apply]\n[GOAL]\nα : Sort u\nβ : Sort v\nγ : Sort w\nδ : Sort ?u.23940\nab : α ≃ β\ncd : γ ≃ δ\nac : β ≃ δ\n⊢ (fun ac => (ab.symm.trans ac).trans cd) ((fun bd => ab.trans (bd.trans cd.symm)) ac) = ac\n[PROOFSTEP]\next x\n[GOAL]\ncase H\nα : Sort u\nβ : Sort v\nγ : Sort w\nδ : Sort ?u.23940\nab : α ≃ β\ncd : γ ≃ δ\nac : β ≃ δ\nx : β\n⊢ ↑((fun ac => (ab.symm.trans ac).trans cd) ((fun bd => ab.trans (bd.trans cd.symm)) ac)) x = ↑ac x\n[PROOFSTEP]\nsimp only [trans_apply, comp_apply, apply_symm_apply]\n[GOAL]\nα✝ : Sort u\nβ✝ : Sort v\nγ : Sort w\nα : Sort u_1\nβ : Sort u_2\n⊢ equivCongr (Equiv.refl α) (Equiv.refl β) = Equiv.refl (α ≃ β)\n[PROOFSTEP]\next\n[GOAL]\ncase H.H\nα✝ : Sort u\nβ✝ : Sort v\nγ : Sort w\nα : Sort u_1\nβ : Sort u_2\nx✝¹ : α ≃ β\nx✝ : α\n⊢ ↑(↑(equivCongr (Equiv.refl α) (Equiv.refl β)) x✝¹) x✝ = ↑(↑(Equiv.refl (α ≃ β)) x✝¹) x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Sort u\nβ : Sort v\nγ : Sort w\nδ : Sort u_1\nab : α ≃ β\ncd : γ ≃ δ\n⊢ (equivCongr ab cd).symm = equivCongr ab.symm cd.symm\n[PROOFSTEP]\next\n[GOAL]\ncase H.H\nα : Sort u\nβ : Sort v\nγ : Sort w\nδ : Sort u_1\nab : α ≃ β\ncd : γ ≃ δ\nx✝¹ : β ≃ δ\nx✝ : α\n⊢ ↑(↑(equivCongr ab cd).symm x✝¹) x✝ = ↑(↑(equivCongr ab.symm cd.symm) x✝¹) x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Sort u\nβ : Sort v\nγ : Sort w\nδ : Sort u_1\nε : Sort u_2\nζ : Sort u_3\nab : α ≃ β\nde : δ ≃ ε\nbc : β ≃ γ\nef : ε ≃ ζ\n⊢ (equivCongr ab de).trans (equivCongr bc ef) = equivCongr (ab.trans bc) (de.trans ef)\n[PROOFSTEP]\next\n[GOAL]\ncase H.H\nα : Sort u\nβ : Sort v\nγ : Sort w\nδ : Sort u_1\nε : Sort u_2\nζ : Sort u_3\nab : α ≃ β\nde : δ ≃ ε\nbc : β ≃ γ\nef : ε ≃ ζ\nx✝¹ : α ≃ δ\nx✝ : γ\n⊢ ↑(↑((equivCongr ab de).trans (equivCongr bc ef)) x✝¹) x✝ = ↑(↑(equivCongr (ab.trans bc) (de.trans ef)) x✝¹) x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Sort u\nβ : Sort v\nγ : Sort w\nα' : Type u_1\nβ' : Type u_2\ne : α' ≃ β'\n⊢ ↑(permCongr e) (Equiv.refl α') = Equiv.refl β'\n[PROOFSTEP]\nsimp [permCongr_def]\n[GOAL]\nα : Sort u\nβ : Sort v\nγ : Sort w\nα' : Type u_1\nβ' : Type u_2\ne : α' ≃ β'\np p' : Perm α'\n⊢ (↑(permCongr e) p).trans (↑(permCongr e) p') = ↑(permCongr e) (p.trans p')\n[PROOFSTEP]\next\n[GOAL]\ncase H\nα : Sort u\nβ : Sort v\nγ : Sort w\nα' : Type u_1\nβ' : Type u_2\ne : α' ≃ β'\np p' : Perm α'\nx✝ : β'\n⊢ ↑((↑(permCongr e) p).trans (↑(permCongr e) p')) x✝ = ↑(↑(permCongr e) (p.trans p')) x✝\n[PROOFSTEP]\nsimp only [trans_apply, comp_apply, permCongr_apply, symm_apply_apply]\n[GOAL]\nα : Sort u\nβ : Sort v\nγ : Sort w\nα₁ : Sort u_1\nβ₁ : Sort u_2\nα₂ : Sort u_3\nβ₂ : Sort u_4\ne₁ : α₁ ≃ α₂\ne₂ : β₁ ≃ β₂\nf : α₁ → β₁\nx : α₁\n⊢ (fun f => ↑e₂.symm ∘ f ∘ ↑e₁) ((fun f => ↑e₂ ∘ f ∘ ↑e₁.symm) f) x = f x\n[PROOFSTEP]\nsimp only [comp_apply, symm_apply_apply]\n[GOAL]\nα : Sort u\nβ : Sort v\nγ : Sort w\nα₁ : Sort u_1\nβ₁ : Sort u_2\nα₂ : Sort u_3\nβ₂ : Sort u_4\ne₁ : α₁ ≃ α₂\ne₂ : β₁ ≃ β₂\nf : α₂ → β₂\nx : α₂\n⊢ (fun f => ↑e₂ ∘ f ∘ ↑e₁.symm) ((fun f => ↑e₂.symm ∘ f ∘ ↑e₁) f) x = f x\n[PROOFSTEP]\nsimp only [comp_apply, apply_symm_apply]\n[GOAL]\nα : Sort u\nβ : Sort v\nγ : Sort w\nα₁ : Sort u_1\nβ₁ : Sort u_2\nγ₁ : Sort u_3\nα₂ : Sort u_4\nβ₂ : Sort u_5\nγ₂ : Sort u_6\nea : α₁ ≃ α₂\neb : β₁ ≃ β₂\nec : γ₁ ≃ γ₂\nf : α₁ → β₁\ng : β₁ → γ₁\n⊢ ↑(arrowCongr ea ec) (g ∘ f) = ↑(arrowCongr eb ec) g ∘ ↑(arrowCongr ea eb) f\n[PROOFSTEP]\next\n[GOAL]\ncase h\nα : Sort u\nβ : Sort v\nγ : Sort w\nα₁ : Sort u_1\nβ₁ : Sort u_2\nγ₁ : Sort u_3\nα₂ : Sort u_4\nβ₂ : Sort u_5\nγ₂ : Sort u_6\nea : α₁ ≃ α₂\neb : β₁ ≃ β₂\nec : γ₁ ≃ γ₂\nf : α₁ → β₁\ng : β₁ → γ₁\nx✝ : α₂\n⊢ ↑(arrowCongr ea ec) (g ∘ f) x✝ = (↑(arrowCongr eb ec) g ∘ ↑(arrowCongr ea eb) f) x✝\n[PROOFSTEP]\nsimp only [comp, arrowCongr_apply, eb.symm_apply_apply]\n[GOAL]\nα : Sort u\nβ : Sort v\nγ : Sort w\ne : α ≃ β\nf₁ f₂ : α → α\n⊢ ↑(conj e) (f₁ ∘ f₂) = ↑(conj e) f₁ ∘ ↑(conj e) f₂\n[PROOFSTEP]\napply arrowCongr_comp\n[GOAL]\nα : Sort u\nβ : Sort v\nγ : Sort w\np : Prop\n⊢ (fun b => b = true) ((fun p => decide p) p) = p\n[PROOFSTEP]\nsimp [@Bool.decide_iff p (Classical.propDecidable _)]\n[GOAL]\nα : Sort u\nβ : Sort v\nγ : Sort w\nb : Bool\n⊢ (fun p => decide p) ((fun b => b = true) b) = b\n[PROOFSTEP]\ncases b\n[GOAL]\ncase false\nα : Sort u\nβ : Sort v\nγ : Sort w\n⊢ (fun p => decide p) ((fun b => b = true) false) = false\n[PROOFSTEP]\nsimp\n[GOAL]\ncase true\nα : Sort u\nβ : Sort v\nγ : Sort w\n⊢ (fun p => decide p) ((fun b => b = true) true) = true\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Sort u\nβ✝ : Sort v\nγ : Sort w\nβ : α → Sort u_1\ninst✝ : Subsingleton α\na : α\nx✝ : (a' : α) → β a'\nb : α\n⊢ (fun x b => cast (_ : β a = β b) x) (eval a x✝) b = x✝ b\n[PROOFSTEP]\nrw [Subsingleton.elim b a]\n[GOAL]\nα : Sort u\nβ✝ : Sort v\nγ : Sort w\nβ : α → Sort u_1\ninst✝ : Subsingleton α\na : α\nx✝ : (a' : α) → β a'\nb : α\n⊢ (fun x b => cast (_ : β a = β b) x) (eval a x✝) a = x✝ a\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Sort u\nβ : Sort v\nγ : Sort w\np : α → Prop\nq : β → Prop\nf : α ≃ β\nh : ∀ {x : α}, p x ↔ q (↑f x)\n⊢ (∃! x, p x) ↔ ∃! y, q y\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Sort u\nβ : Sort v\nγ : Sort w\np : α → Prop\nq : β → Prop\nf : α ≃ β\nh : ∀ {x : α}, p x ↔ q (↑f x)\n⊢ (∃! x, p x) → ∃! y, q y\n[PROOFSTEP]\nrintro ⟨a, ha₁, ha₂⟩\n[GOAL]\ncase mp.intro.intro\nα : Sort u\nβ : Sort v\nγ : Sort w\np : α → Prop\nq : β → Prop\nf : α ≃ β\nh : ∀ {x : α}, p x ↔ q (↑f x)\na : α\nha₁ : p a\nha₂ : ∀ (y : α), (fun x => p x) y → y = a\n⊢ ∃! y, q y\n[PROOFSTEP]\nexact ⟨f a, h.1 ha₁, fun b hb => f.symm_apply_eq.1 (ha₂ (f.symm b) (h.2 (by simpa using hb)))⟩\n[GOAL]\nα : Sort u\nβ : Sort v\nγ : Sort w\np : α → Prop\nq : β → Prop\nf : α ≃ β\nh : ∀ {x : α}, p x ↔ q (↑f x)\na : α\nha₁ : p a\nha₂ : ∀ (y : α), (fun x => p x) y → y = a\nb : β\nhb : (fun y => q y) b\n⊢ q (↑f (↑f.symm b))\n[PROOFSTEP]\nsimpa using hb\n[GOAL]\ncase mpr\nα : Sort u\nβ : Sort v\nγ : Sort w\np : α → Prop\nq : β → Prop\nf : α ≃ β\nh : ∀ {x : α}, p x ↔ q (↑f x)\n⊢ (∃! y, q y) → ∃! x, p x\n[PROOFSTEP]\nrintro ⟨b, hb₁, hb₂⟩\n[GOAL]\ncase mpr.intro.intro\nα : Sort u\nβ : Sort v\nγ : Sort w\np : α → Prop\nq : β → Prop\nf : α ≃ β\nh : ∀ {x : α}, p x ↔ q (↑f x)\nb : β\nhb₁ : q b\nhb₂ : ∀ (y : β), (fun y => q y) y → y = b\n⊢ ∃! x, p x\n[PROOFSTEP]\nexact ⟨f.symm b, h.2 (by simpa using hb₁), fun y hy => (eq_symm_apply f).2 (hb₂ _ (h.1 hy))⟩\n[GOAL]\nα : Sort u\nβ : Sort v\nγ : Sort w\np : α → Prop\nq : β → Prop\nf : α ≃ β\nh : ∀ {x : α}, p x ↔ q (↑f x)\nb : β\nhb₁ : q b\nhb₂ : ∀ (y : β), (fun y => q y) y → y = b\n⊢ q (↑f (↑f.symm b))\n[PROOFSTEP]\nsimpa using hb₁\n[GOAL]\nα : Sort u\nβ : Sort v\nγ : Sort w\np : α → Prop\nf : α ≃ β\nx✝ : α\n⊢ p x✝ ↔ p (↑f.symm (↑f x✝))\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Sort u\nβ : Sort v\nγ : Sort w\np : α → Prop\nq : β → Prop\nf : α ≃ β\nh : ∀ {x : α}, p x ↔ q (↑f x)\n⊢ (∀ (x : α), p x) ↔ ∀ (y : β), q y\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Sort u\nβ : Sort v\nγ : Sort w\np : α → Prop\nq : β → Prop\nf : α ≃ β\nh : ∀ {x : α}, p x ↔ q (↑f x)\n⊢ (∀ (x : α), p x) → ∀ (y : β), q y\n[PROOFSTEP]\nintro h₂ x\n[GOAL]\ncase mpr\nα : Sort u\nβ : Sort v\nγ : Sort w\np : α → Prop\nq : β → Prop\nf : α ≃ β\nh : ∀ {x : α}, p x ↔ q (↑f x)\n⊢ (∀ (y : β), q y) → ∀ (x : α), p x\n[PROOFSTEP]\nintro h₂ x\n[GOAL]\ncase mp\nα : Sort u\nβ : Sort v\nγ : Sort w\np : α → Prop\nq : β → Prop\nf : α ≃ β\nh : ∀ {x : α}, p x ↔ q (↑f x)\nh₂ : ∀ (x : α), p x\nx : β\n⊢ q x\n[PROOFSTEP]\nrw [← f.right_inv x]\n[GOAL]\ncase mp\nα : Sort u\nβ : Sort v\nγ : Sort w\np : α → Prop\nq : β → Prop\nf : α ≃ β\nh : ∀ {x : α}, p x ↔ q (↑f x)\nh₂ : ∀ (x : α), p x\nx : β\n⊢ q (toFun f (invFun f x))\n[PROOFSTEP]\napply h.mp\n[GOAL]\ncase mp\nα : Sort u\nβ : Sort v\nγ : Sort w\np : α → Prop\nq : β → Prop\nf : α ≃ β\nh : ∀ {x : α}, p x ↔ q (↑f x)\nh₂ : ∀ (x : α), p x\nx : β\n⊢ p (invFun f x)\n[PROOFSTEP]\napply h₂\n[GOAL]\ncase mpr\nα : Sort u\nβ : Sort v\nγ : Sort w\np : α → Prop\nq : β → Prop\nf : α ≃ β\nh : ∀ {x : α}, p x ↔ q (↑f x)\nh₂ : ∀ (y : β), q y\nx : α\n⊢ p x\n[PROOFSTEP]\napply h.mpr\n[GOAL]\ncase mpr\nα : Sort u\nβ : Sort v\nγ : Sort w\np : α → Prop\nq : β → Prop\nf : α ≃ β\nh : ∀ {x : α}, p x ↔ q (↑f x)\nh₂ : ∀ (y : β), q y\nx : α\n⊢ q (↑f x)\n[PROOFSTEP]\napply h₂\n[GOAL]\nα : Sort u\nβ : Sort v\nγ : Sort w\np : α → Prop\nf : α ≃ β\n⊢ ∀ {x : α}, p x ↔ p (↑f.symm (↑f x))\n[PROOFSTEP]\nsimp\n[GOAL]\nα✝ : Sort u\nβ✝ : Sort v\nγ : Sort w\nα : Sort u_1\nβ : Sort u_2\nf : α ≃ β\np : α → Prop\nx✝ : ∃ a, p a\na : α\nh : p a\n⊢ p (↑f.symm (↑f a))\n[PROOFSTEP]\nsimpa using h\n[GOAL]\nα : Sort u\nβ : Sort v\nγ : Sort w\nra : α → α → Prop\nrb : β → β → Prop\ne : α ≃ β\neq : ∀ (a₁ a₂ : α), ra a₁ a₂ ↔ rb (↑e a₁) (↑e a₂)\n⊢ LeftInverse (Quot.map ↑e.symm (_ : ∀ (b₁ b₂ : β), rb b₁ b₂ → ra (↑e.symm b₁) (↑e.symm b₂)))\n    (Quot.map ↑e (_ : ∀ (a₁ a₂ : α), ra a₁ a₂ → rb (↑e a₁) (↑e a₂)))\n[PROOFSTEP]\nrintro ⟨a⟩\n[GOAL]\ncase mk\nα : Sort u\nβ : Sort v\nγ : Sort w\nra : α → α → Prop\nrb : β → β → Prop\ne : α ≃ β\neq : ∀ (a₁ a₂ : α), ra a₁ a₂ ↔ rb (↑e a₁) (↑e a₂)\nx✝ : Quot ra\na : α\n⊢ Quot.map ↑e.symm (_ : ∀ (b₁ b₂ : β), rb b₁ b₂ → ra (↑e.symm b₁) (↑e.symm b₂))\n      (Quot.map ↑e (_ : ∀ (a₁ a₂ : α), ra a₁ a₂ → rb (↑e a₁) (↑e a₂)) (mk ra a)) =\n    mk ra a\n[PROOFSTEP]\nsimp only [Quot.map, Equiv.symm_apply_apply]\n[GOAL]\nα : Sort u\nβ : Sort v\nγ : Sort w\nra : α → α → Prop\nrb : β → β → Prop\ne : α ≃ β\neq : ∀ (a₁ a₂ : α), ra a₁ a₂ ↔ rb (↑e a₁) (↑e a₂)\n⊢ Function.RightInverse (Quot.map ↑e.symm (_ : ∀ (b₁ b₂ : β), rb b₁ b₂ → ra (↑e.symm b₁) (↑e.symm b₂)))\n    (Quot.map ↑e (_ : ∀ (a₁ a₂ : α), ra a₁ a₂ → rb (↑e a₁) (↑e a₂)))\n[PROOFSTEP]\nrintro ⟨a⟩\n[GOAL]\ncase mk\nα : Sort u\nβ : Sort v\nγ : Sort w\nra : α → α → Prop\nrb : β → β → Prop\ne : α ≃ β\neq : ∀ (a₁ a₂ : α), ra a₁ a₂ ↔ rb (↑e a₁) (↑e a₂)\nx✝ : Quot rb\na : β\n⊢ Quot.map ↑e (_ : ∀ (a₁ a₂ : α), ra a₁ a₂ → rb (↑e a₁) (↑e a₂))\n      (Quot.map ↑e.symm (_ : ∀ (b₁ b₂ : β), rb b₁ b₂ → ra (↑e.symm b₁) (↑e.symm b₂)) (mk rb a)) =\n    mk rb a\n[PROOFSTEP]\nsimp only [Quot.map, Equiv.apply_symm_apply]\n[GOAL]\nα : Sort u\nβ : Sort v\nγ : Sort w\nr : α → α → Prop\ne : α ≃ β\nx✝¹ x✝ : α\n⊢ r x✝¹ x✝ ↔ r (↑e.symm (↑e x✝¹)) (↑e.symm (↑e x✝))\n[PROOFSTEP]\nsimp only [e.symm_apply_apply]\n", "meta": {"mathlib_filename": "Mathlib.Logic.Equiv.Defs", "llama_tokens": 8790, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8376199714402812, "lm_q2_score": 0.6370307944803831, "lm_q1q2_score": 0.5335897158792382}}
{"text": "[GOAL]\nX Y : Scheme\nf : X ⟶ Y\n⊢ @LocallyOfFiniteType = affineLocally @RingHom.FiniteType\n[PROOFSTEP]\next X Y f\n[GOAL]\ncase h.h.h.a\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y : Scheme\nf : X ⟶ Y\n⊢ LocallyOfFiniteType f ↔ affineLocally (@RingHom.FiniteType) f\n[PROOFSTEP]\nrw [LocallyOfFiniteType_iff, affineLocally_iff_affineOpens_le]\n[GOAL]\ncase h.h.h.a.hP\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y : Scheme\nf : X ⟶ Y\n⊢ RingHom.RespectsIso @RingHom.FiniteType\n[PROOFSTEP]\nexact RingHom.finiteType_respectsIso\n[GOAL]\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y Z : Scheme\nf : X ⟶ Y\ng : Y ⟶ Z\nhf : LocallyOfFiniteType (f ≫ g)\n⊢ LocallyOfFiniteType f\n[PROOFSTEP]\nrevert hf\n[GOAL]\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y Z : Scheme\nf : X ⟶ Y\ng : Y ⟶ Z\n⊢ ∀ [hf : LocallyOfFiniteType (f ≫ g)], LocallyOfFiniteType f\n[PROOFSTEP]\nrw [locallyOfFiniteType_eq]\n[GOAL]\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y Z : Scheme\nf : X ⟶ Y\ng : Y ⟶ Z\n⊢ ∀ [hf : affineLocally (@RingHom.FiniteType) (f ≫ g)], affineLocally (@RingHom.FiniteType) f\n[PROOFSTEP]\napply RingHom.finiteType_is_local.affineLocally_of_comp\n[GOAL]\ncase H\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y Z : Scheme\nf : X ⟶ Y\ng : Y ⟶ Z\n⊢ ∀ {R S T : Type u_1} [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing T] (f : R →+* S) (g : S →+* T),\n    RingHom.FiniteType (RingHom.comp g f) → RingHom.FiniteType g\n[PROOFSTEP]\nintrov H\n[GOAL]\ncase H\nX✝ Y✝ : Scheme\nf✝¹ : X✝ ⟶ Y✝\nX Y Z : Scheme\nf✝ : X ⟶ Y\ng✝ : Y ⟶ Z\nR S T : Type u_1\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : CommRing T\nf : R →+* S\ng : S →+* T\nH : RingHom.FiniteType (RingHom.comp g f)\n⊢ RingHom.FiniteType g\n[PROOFSTEP]\nexact RingHom.FiniteType.of_comp_finiteType H\n", "meta": {"mathlib_filename": "Mathlib.AlgebraicGeometry.Morphisms.FiniteType", "llama_tokens": 902, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7662936324115011, "lm_q2_score": 0.6959583187272712, "lm_q1q2_score": 0.5333084280645218}}
{"text": "[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedAddCommGroup E''\ninst✝⁷ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedSpace 𝕜 E\ninst✝⁴ : NormedSpace 𝕜 E'\ninst✝³ : NormedSpace 𝕜 E''\ninst✝² : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝¹ : AddGroup G\ninst✝ : TopologicalSpace G\nC : ℝ\nhC : ∀ (i : G), ‖g i‖ ≤ C\nx t : G\ns u : Set G\nhx : x ∈ s\nhu : -tsupport g + s ⊆ u\n⊢ ‖↑(↑L (f t)) (g (x - t))‖ ≤ indicator u (fun t => ‖L‖ * ‖f t‖ * C) t\n[PROOFSTEP]\nrefine' le_indicator (f := fun t ↦ ‖L (f t) (g (x - t))‖) (fun t _ => _) (fun t ht => _) t\n[GOAL]\ncase refine'_1\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedAddCommGroup E''\ninst✝⁷ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx✝¹ x' : G\ny y' : E\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedSpace 𝕜 E\ninst✝⁴ : NormedSpace 𝕜 E'\ninst✝³ : NormedSpace 𝕜 E''\ninst✝² : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝¹ : AddGroup G\ninst✝ : TopologicalSpace G\nC : ℝ\nhC : ∀ (i : G), ‖g i‖ ≤ C\nx t✝ : G\ns u : Set G\nhx : x ∈ s\nhu : -tsupport g + s ⊆ u\nt : G\nx✝ : t ∈ u\n⊢ (fun t => ‖↑(↑L (f t)) (g (x - t))‖) t ≤ ‖L‖ * ‖f t‖ * C\n[PROOFSTEP]\napply_rules [L.le_of_op_norm₂_le_of_le, le_rfl]\n[GOAL]\ncase refine'_2\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedAddCommGroup E''\ninst✝⁷ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedSpace 𝕜 E\ninst✝⁴ : NormedSpace 𝕜 E'\ninst✝³ : NormedSpace 𝕜 E''\ninst✝² : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝¹ : AddGroup G\ninst✝ : TopologicalSpace G\nC : ℝ\nhC : ∀ (i : G), ‖g i‖ ≤ C\nx t✝ : G\ns u : Set G\nhx : x ∈ s\nhu : -tsupport g + s ⊆ u\nt : G\nht : ¬t ∈ u\n⊢ (fun t => ‖↑(↑L (f t)) (g (x - t))‖) t ≤ 0\n[PROOFSTEP]\nhave : x - t ∉ support g := by\n  refine mt (fun hxt => hu ?_) ht\n  refine' ⟨_, _, Set.neg_mem_neg.mpr (subset_closure hxt), hx, _⟩\n  simp only [neg_sub, sub_add_cancel]\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedAddCommGroup E''\ninst✝⁷ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedSpace 𝕜 E\ninst✝⁴ : NormedSpace 𝕜 E'\ninst✝³ : NormedSpace 𝕜 E''\ninst✝² : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝¹ : AddGroup G\ninst✝ : TopologicalSpace G\nC : ℝ\nhC : ∀ (i : G), ‖g i‖ ≤ C\nx t✝ : G\ns u : Set G\nhx : x ∈ s\nhu : -tsupport g + s ⊆ u\nt : G\nht : ¬t ∈ u\n⊢ ¬x - t ∈ support g\n[PROOFSTEP]\nrefine mt (fun hxt => hu ?_) ht\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedAddCommGroup E''\ninst✝⁷ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedSpace 𝕜 E\ninst✝⁴ : NormedSpace 𝕜 E'\ninst✝³ : NormedSpace 𝕜 E''\ninst✝² : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝¹ : AddGroup G\ninst✝ : TopologicalSpace G\nC : ℝ\nhC : ∀ (i : G), ‖g i‖ ≤ C\nx t✝ : G\ns u : Set G\nhx : x ∈ s\nhu : -tsupport g + s ⊆ u\nt : G\nht : ¬t ∈ u\nhxt : x - t ∈ support g\n⊢ t ∈ -tsupport g + s\n[PROOFSTEP]\nrefine' ⟨_, _, Set.neg_mem_neg.mpr (subset_closure hxt), hx, _⟩\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedAddCommGroup E''\ninst✝⁷ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedSpace 𝕜 E\ninst✝⁴ : NormedSpace 𝕜 E'\ninst✝³ : NormedSpace 𝕜 E''\ninst✝² : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝¹ : AddGroup G\ninst✝ : TopologicalSpace G\nC : ℝ\nhC : ∀ (i : G), ‖g i‖ ≤ C\nx t✝ : G\ns u : Set G\nhx : x ∈ s\nhu : -tsupport g + s ⊆ u\nt : G\nht : ¬t ∈ u\nhxt : x - t ∈ support g\n⊢ (fun x x_1 => x + x_1) (-(x - t)) x = t\n[PROOFSTEP]\nsimp only [neg_sub, sub_add_cancel]\n[GOAL]\ncase refine'_2\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedAddCommGroup E''\ninst✝⁷ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedSpace 𝕜 E\ninst✝⁴ : NormedSpace 𝕜 E'\ninst✝³ : NormedSpace 𝕜 E''\ninst✝² : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝¹ : AddGroup G\ninst✝ : TopologicalSpace G\nC : ℝ\nhC : ∀ (i : G), ‖g i‖ ≤ C\nx t✝ : G\ns u : Set G\nhx : x ∈ s\nhu : -tsupport g + s ⊆ u\nt : G\nht : ¬t ∈ u\nthis : ¬x - t ∈ support g\n⊢ (fun t => ‖↑(↑L (f t)) (g (x - t))‖) t ≤ 0\n[PROOFSTEP]\nsimp only [nmem_support.mp this, (L _).map_zero, norm_zero, le_rfl]\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedAddCommGroup E''\ninst✝⁷ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedSpace 𝕜 E\ninst✝⁴ : NormedSpace 𝕜 E'\ninst✝³ : NormedSpace 𝕜 E''\ninst✝² : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝¹ : AddGroup G\ninst✝ : TopologicalSpace G\nhcg : HasCompactSupport g\nhg : Continuous g\nx t : G\ns u : Set G\nhx : x ∈ s\nhu : -tsupport g + s ⊆ u\n⊢ ‖↑(↑L (f t)) (g (x - t))‖ ≤ indicator u (fun t => ‖L‖ * ‖f t‖ * ⨆ (i : G), ‖g i‖) t\n[PROOFSTEP]\nrefine convolution_integrand_bound_right_of_le_of_subset _ (fun i => ?_) hx hu\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedAddCommGroup E''\ninst✝⁷ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedSpace 𝕜 E\ninst✝⁴ : NormedSpace 𝕜 E'\ninst✝³ : NormedSpace 𝕜 E''\ninst✝² : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝¹ : AddGroup G\ninst✝ : TopologicalSpace G\nhcg : HasCompactSupport g\nhg : Continuous g\nx t : G\ns u : Set G\nhx : x ∈ s\nhu : -tsupport g + s ⊆ u\ni : G\n⊢ ‖g i‖ ≤ ⨆ (i : G), ‖g i‖\n[PROOFSTEP]\nexact le_ciSup (hg.norm.bddAbove_range_of_hasCompactSupport hcg.norm) _\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedAddCommGroup E''\ninst✝⁷ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedSpace 𝕜 E\ninst✝⁴ : NormedSpace 𝕜 E'\ninst✝³ : NormedSpace 𝕜 E''\ninst✝² : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝¹ : AddGroup G\ninst✝ : TopologicalSpace G\nhcf : HasCompactSupport f\nhf : Continuous f\nx t : G\ns : Set G\nhx : x ∈ s\n⊢ ‖↑(↑L (f (x - t))) (g t)‖ ≤ indicator (-tsupport f + s) (fun t => (‖L‖ * ⨆ (i : G), ‖f i‖) * ‖g t‖) t\n[PROOFSTEP]\nconvert hcf.convolution_integrand_bound_right L.flip hf hx using 1\n[GOAL]\ncase h.e'_4\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedAddCommGroup E''\ninst✝⁷ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝⁶ : NontriviallyNormedField 𝕜\ninst✝⁵ : NormedSpace 𝕜 E\ninst✝⁴ : NormedSpace 𝕜 E'\ninst✝³ : NormedSpace 𝕜 E''\ninst✝² : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝¹ : AddGroup G\ninst✝ : TopologicalSpace G\nhcf : HasCompactSupport f\nhf : Continuous f\nx t : G\ns : Set G\nhx : x ∈ s\n⊢ indicator (-tsupport f + s) (fun t => (‖L‖ * ⨆ (i : G), ‖f i‖) * ‖g t‖) t =\n    indicator (-tsupport f + s) (fun t => ‖ContinuousLinearMap.flip L‖ * ‖g t‖ * ⨆ (i : G), ‖f i‖) t\n[PROOFSTEP]\nsimp_rw [L.op_norm_flip, mul_right_comm]\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedAddCommGroup E''\ninst✝⁹ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedSpace 𝕜 E\ninst✝⁶ : NormedSpace 𝕜 E'\ninst✝⁵ : NormedSpace 𝕜 E''\ninst✝⁴ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝³ : MeasurableSpace G\nμ ν : Measure G\ninst✝² : AddGroup G\ninst✝¹ : MeasurableAdd G\ninst✝ : MeasurableNeg G\nx₀ : G\ns : Set G\nhbg : BddAbove ((fun i => ‖g i‖) '' ((fun t => -t + x₀) ⁻¹' s))\nhs : MeasurableSet s\nh2s : (support fun t => ↑(↑L (f t)) (g (x₀ - t))) ⊆ s\nhf : IntegrableOn f s\nhmg : AEStronglyMeasurable g (Measure.map (fun t => x₀ - t) (Measure.restrict μ s))\n⊢ ConvolutionExistsAt f g x₀ L\n[PROOFSTEP]\nunfold ConvolutionExistsAt\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedAddCommGroup E''\ninst✝⁹ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedSpace 𝕜 E\ninst✝⁶ : NormedSpace 𝕜 E'\ninst✝⁵ : NormedSpace 𝕜 E''\ninst✝⁴ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝³ : MeasurableSpace G\nμ ν : Measure G\ninst✝² : AddGroup G\ninst✝¹ : MeasurableAdd G\ninst✝ : MeasurableNeg G\nx₀ : G\ns : Set G\nhbg : BddAbove ((fun i => ‖g i‖) '' ((fun t => -t + x₀) ⁻¹' s))\nhs : MeasurableSet s\nh2s : (support fun t => ↑(↑L (f t)) (g (x₀ - t))) ⊆ s\nhf : IntegrableOn f s\nhmg : AEStronglyMeasurable g (Measure.map (fun t => x₀ - t) (Measure.restrict μ s))\n⊢ Integrable fun t => ↑(↑L (f t)) (g (x₀ - t))\n[PROOFSTEP]\nrw [← integrableOn_iff_integrable_of_support_subset h2s]\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedAddCommGroup E''\ninst✝⁹ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedSpace 𝕜 E\ninst✝⁶ : NormedSpace 𝕜 E'\ninst✝⁵ : NormedSpace 𝕜 E''\ninst✝⁴ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝³ : MeasurableSpace G\nμ ν : Measure G\ninst✝² : AddGroup G\ninst✝¹ : MeasurableAdd G\ninst✝ : MeasurableNeg G\nx₀ : G\ns : Set G\nhbg : BddAbove ((fun i => ‖g i‖) '' ((fun t => -t + x₀) ⁻¹' s))\nhs : MeasurableSet s\nh2s : (support fun t => ↑(↑L (f t)) (g (x₀ - t))) ⊆ s\nhf : IntegrableOn f s\nhmg : AEStronglyMeasurable g (Measure.map (fun t => x₀ - t) (Measure.restrict μ s))\n⊢ IntegrableOn (fun t => ↑(↑L (f t)) (g (x₀ - t))) s\n[PROOFSTEP]\nset s' := (fun t => -t + x₀) ⁻¹' s\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedAddCommGroup E''\ninst✝⁹ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedSpace 𝕜 E\ninst✝⁶ : NormedSpace 𝕜 E'\ninst✝⁵ : NormedSpace 𝕜 E''\ninst✝⁴ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝³ : MeasurableSpace G\nμ ν : Measure G\ninst✝² : AddGroup G\ninst✝¹ : MeasurableAdd G\ninst✝ : MeasurableNeg G\nx₀ : G\ns : Set G\nhs : MeasurableSet s\nh2s : (support fun t => ↑(↑L (f t)) (g (x₀ - t))) ⊆ s\nhf : IntegrableOn f s\nhmg : AEStronglyMeasurable g (Measure.map (fun t => x₀ - t) (Measure.restrict μ s))\ns' : Set G := (fun t => -t + x₀) ⁻¹' s\nhbg : BddAbove ((fun i => ‖g i‖) '' s')\n⊢ IntegrableOn (fun t => ↑(↑L (f t)) (g (x₀ - t))) s\n[PROOFSTEP]\nhave : ∀ᵐ t : G ∂μ.restrict s, ‖L (f t) (g (x₀ - t))‖ ≤ s.indicator (fun t => ‖L‖ * ‖f t‖ * ⨆ i : s', ‖g i‖) t\n[GOAL]\ncase this\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedAddCommGroup E''\ninst✝⁹ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedSpace 𝕜 E\ninst✝⁶ : NormedSpace 𝕜 E'\ninst✝⁵ : NormedSpace 𝕜 E''\ninst✝⁴ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝³ : MeasurableSpace G\nμ ν : Measure G\ninst✝² : AddGroup G\ninst✝¹ : MeasurableAdd G\ninst✝ : MeasurableNeg G\nx₀ : G\ns : Set G\nhs : MeasurableSet s\nh2s : (support fun t => ↑(↑L (f t)) (g (x₀ - t))) ⊆ s\nhf : IntegrableOn f s\nhmg : AEStronglyMeasurable g (Measure.map (fun t => x₀ - t) (Measure.restrict μ s))\ns' : Set G := (fun t => -t + x₀) ⁻¹' s\nhbg : BddAbove ((fun i => ‖g i‖) '' s')\n⊢ ∀ᵐ (t : G) ∂Measure.restrict μ s,\n    ‖↑(↑L (f t)) (g (x₀ - t))‖ ≤ indicator s (fun t => ‖L‖ * ‖f t‖ * ⨆ (i : ↑s'), ‖g ↑i‖) t\n[PROOFSTEP]\nrefine' eventually_of_forall _\n[GOAL]\ncase this\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedAddCommGroup E''\ninst✝⁹ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedSpace 𝕜 E\ninst✝⁶ : NormedSpace 𝕜 E'\ninst✝⁵ : NormedSpace 𝕜 E''\ninst✝⁴ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝³ : MeasurableSpace G\nμ ν : Measure G\ninst✝² : AddGroup G\ninst✝¹ : MeasurableAdd G\ninst✝ : MeasurableNeg G\nx₀ : G\ns : Set G\nhs : MeasurableSet s\nh2s : (support fun t => ↑(↑L (f t)) (g (x₀ - t))) ⊆ s\nhf : IntegrableOn f s\nhmg : AEStronglyMeasurable g (Measure.map (fun t => x₀ - t) (Measure.restrict μ s))\ns' : Set G := (fun t => -t + x₀) ⁻¹' s\nhbg : BddAbove ((fun i => ‖g i‖) '' s')\n⊢ ∀ (x : G), ‖↑(↑L (f x)) (g (x₀ - x))‖ ≤ indicator s (fun t => ‖L‖ * ‖f t‖ * ⨆ (i : ↑s'), ‖g ↑i‖) x\n[PROOFSTEP]\nrefine' le_indicator (fun t ht => _) fun t ht => _\n[GOAL]\ncase this.refine'_1\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedAddCommGroup E''\ninst✝⁹ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedSpace 𝕜 E\ninst✝⁶ : NormedSpace 𝕜 E'\ninst✝⁵ : NormedSpace 𝕜 E''\ninst✝⁴ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝³ : MeasurableSpace G\nμ ν : Measure G\ninst✝² : AddGroup G\ninst✝¹ : MeasurableAdd G\ninst✝ : MeasurableNeg G\nx₀ : G\ns : Set G\nhs : MeasurableSet s\nh2s : (support fun t => ↑(↑L (f t)) (g (x₀ - t))) ⊆ s\nhf : IntegrableOn f s\nhmg : AEStronglyMeasurable g (Measure.map (fun t => x₀ - t) (Measure.restrict μ s))\ns' : Set G := (fun t => -t + x₀) ⁻¹' s\nhbg : BddAbove ((fun i => ‖g i‖) '' s')\nt : G\nht : t ∈ s\n⊢ ‖↑(↑L (f t)) (g (x₀ - t))‖ ≤ ‖L‖ * ‖f t‖ * ⨆ (i : ↑s'), ‖g ↑i‖\n[PROOFSTEP]\napply_rules [L.le_of_op_norm₂_le_of_le, le_rfl]\n[GOAL]\ncase this.refine'_1.hy\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedAddCommGroup E''\ninst✝⁹ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedSpace 𝕜 E\ninst✝⁶ : NormedSpace 𝕜 E'\ninst✝⁵ : NormedSpace 𝕜 E''\ninst✝⁴ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝³ : MeasurableSpace G\nμ ν : Measure G\ninst✝² : AddGroup G\ninst✝¹ : MeasurableAdd G\ninst✝ : MeasurableNeg G\nx₀ : G\ns : Set G\nhs : MeasurableSet s\nh2s : (support fun t => ↑(↑L (f t)) (g (x₀ - t))) ⊆ s\nhf : IntegrableOn f s\nhmg : AEStronglyMeasurable g (Measure.map (fun t => x₀ - t) (Measure.restrict μ s))\ns' : Set G := (fun t => -t + x₀) ⁻¹' s\nhbg : BddAbove ((fun i => ‖g i‖) '' s')\nt : G\nht : t ∈ s\n⊢ ‖g (x₀ - t)‖ ≤ ⨆ (i : ↑s'), ‖g ↑i‖\n[PROOFSTEP]\nrefine' (le_ciSup_set hbg <| mem_preimage.mpr _)\n[GOAL]\ncase this.refine'_1.hy\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedAddCommGroup E''\ninst✝⁹ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedSpace 𝕜 E\ninst✝⁶ : NormedSpace 𝕜 E'\ninst✝⁵ : NormedSpace 𝕜 E''\ninst✝⁴ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝³ : MeasurableSpace G\nμ ν : Measure G\ninst✝² : AddGroup G\ninst✝¹ : MeasurableAdd G\ninst✝ : MeasurableNeg G\nx₀ : G\ns : Set G\nhs : MeasurableSet s\nh2s : (support fun t => ↑(↑L (f t)) (g (x₀ - t))) ⊆ s\nhf : IntegrableOn f s\nhmg : AEStronglyMeasurable g (Measure.map (fun t => x₀ - t) (Measure.restrict μ s))\ns' : Set G := (fun t => -t + x₀) ⁻¹' s\nhbg : BddAbove ((fun i => ‖g i‖) '' s')\nt : G\nht : t ∈ s\n⊢ -(x₀ - t) + x₀ ∈ s\n[PROOFSTEP]\nrwa [neg_sub, sub_add_cancel]\n[GOAL]\ncase this.refine'_2\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedAddCommGroup E''\ninst✝⁹ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedSpace 𝕜 E\ninst✝⁶ : NormedSpace 𝕜 E'\ninst✝⁵ : NormedSpace 𝕜 E''\ninst✝⁴ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝³ : MeasurableSpace G\nμ ν : Measure G\ninst✝² : AddGroup G\ninst✝¹ : MeasurableAdd G\ninst✝ : MeasurableNeg G\nx₀ : G\ns : Set G\nhs : MeasurableSet s\nh2s : (support fun t => ↑(↑L (f t)) (g (x₀ - t))) ⊆ s\nhf : IntegrableOn f s\nhmg : AEStronglyMeasurable g (Measure.map (fun t => x₀ - t) (Measure.restrict μ s))\ns' : Set G := (fun t => -t + x₀) ⁻¹' s\nhbg : BddAbove ((fun i => ‖g i‖) '' s')\nt : G\nht : ¬t ∈ s\n⊢ ‖↑(↑L (f t)) (g (x₀ - t))‖ ≤ 0\n[PROOFSTEP]\nhave : t ∉ support fun t => L (f t) (g (x₀ - t)) := mt (fun h => h2s h) ht\n[GOAL]\ncase this.refine'_2\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedAddCommGroup E''\ninst✝⁹ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedSpace 𝕜 E\ninst✝⁶ : NormedSpace 𝕜 E'\ninst✝⁵ : NormedSpace 𝕜 E''\ninst✝⁴ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝³ : MeasurableSpace G\nμ ν : Measure G\ninst✝² : AddGroup G\ninst✝¹ : MeasurableAdd G\ninst✝ : MeasurableNeg G\nx₀ : G\ns : Set G\nhs : MeasurableSet s\nh2s : (support fun t => ↑(↑L (f t)) (g (x₀ - t))) ⊆ s\nhf : IntegrableOn f s\nhmg : AEStronglyMeasurable g (Measure.map (fun t => x₀ - t) (Measure.restrict μ s))\ns' : Set G := (fun t => -t + x₀) ⁻¹' s\nhbg : BddAbove ((fun i => ‖g i‖) '' s')\nt : G\nht : ¬t ∈ s\nthis : ¬t ∈ support fun t => ↑(↑L (f t)) (g (x₀ - t))\n⊢ ‖↑(↑L (f t)) (g (x₀ - t))‖ ≤ 0\n[PROOFSTEP]\nrw [nmem_support.mp this, norm_zero]\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedAddCommGroup E''\ninst✝⁹ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedSpace 𝕜 E\ninst✝⁶ : NormedSpace 𝕜 E'\ninst✝⁵ : NormedSpace 𝕜 E''\ninst✝⁴ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝³ : MeasurableSpace G\nμ ν : Measure G\ninst✝² : AddGroup G\ninst✝¹ : MeasurableAdd G\ninst✝ : MeasurableNeg G\nx₀ : G\ns : Set G\nhs : MeasurableSet s\nh2s : (support fun t => ↑(↑L (f t)) (g (x₀ - t))) ⊆ s\nhf : IntegrableOn f s\nhmg : AEStronglyMeasurable g (Measure.map (fun t => x₀ - t) (Measure.restrict μ s))\ns' : Set G := (fun t => -t + x₀) ⁻¹' s\nhbg : BddAbove ((fun i => ‖g i‖) '' s')\nthis :\n  ∀ᵐ (t : G) ∂Measure.restrict μ s,\n    ‖↑(↑L (f t)) (g (x₀ - t))‖ ≤ indicator s (fun t => ‖L‖ * ‖f t‖ * ⨆ (i : ↑s'), ‖g ↑i‖) t\n⊢ IntegrableOn (fun t => ↑(↑L (f t)) (g (x₀ - t))) s\n[PROOFSTEP]\nrefine' Integrable.mono' _ _ this\n[GOAL]\ncase refine'_1\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedAddCommGroup E''\ninst✝⁹ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedSpace 𝕜 E\ninst✝⁶ : NormedSpace 𝕜 E'\ninst✝⁵ : NormedSpace 𝕜 E''\ninst✝⁴ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝³ : MeasurableSpace G\nμ ν : Measure G\ninst✝² : AddGroup G\ninst✝¹ : MeasurableAdd G\ninst✝ : MeasurableNeg G\nx₀ : G\ns : Set G\nhs : MeasurableSet s\nh2s : (support fun t => ↑(↑L (f t)) (g (x₀ - t))) ⊆ s\nhf : IntegrableOn f s\nhmg : AEStronglyMeasurable g (Measure.map (fun t => x₀ - t) (Measure.restrict μ s))\ns' : Set G := (fun t => -t + x₀) ⁻¹' s\nhbg : BddAbove ((fun i => ‖g i‖) '' s')\nthis :\n  ∀ᵐ (t : G) ∂Measure.restrict μ s,\n    ‖↑(↑L (f t)) (g (x₀ - t))‖ ≤ indicator s (fun t => ‖L‖ * ‖f t‖ * ⨆ (i : ↑s'), ‖g ↑i‖) t\n⊢ Integrable fun a => indicator s (fun t => ‖L‖ * ‖f t‖ * ⨆ (i : ↑s'), ‖g ↑i‖) a\n[PROOFSTEP]\nrw [integrable_indicator_iff hs]\n[GOAL]\ncase refine'_1\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedAddCommGroup E''\ninst✝⁹ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedSpace 𝕜 E\ninst✝⁶ : NormedSpace 𝕜 E'\ninst✝⁵ : NormedSpace 𝕜 E''\ninst✝⁴ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝³ : MeasurableSpace G\nμ ν : Measure G\ninst✝² : AddGroup G\ninst✝¹ : MeasurableAdd G\ninst✝ : MeasurableNeg G\nx₀ : G\ns : Set G\nhs : MeasurableSet s\nh2s : (support fun t => ↑(↑L (f t)) (g (x₀ - t))) ⊆ s\nhf : IntegrableOn f s\nhmg : AEStronglyMeasurable g (Measure.map (fun t => x₀ - t) (Measure.restrict μ s))\ns' : Set G := (fun t => -t + x₀) ⁻¹' s\nhbg : BddAbove ((fun i => ‖g i‖) '' s')\nthis :\n  ∀ᵐ (t : G) ∂Measure.restrict μ s,\n    ‖↑(↑L (f t)) (g (x₀ - t))‖ ≤ indicator s (fun t => ‖L‖ * ‖f t‖ * ⨆ (i : ↑s'), ‖g ↑i‖) t\n⊢ IntegrableOn (fun t => ‖L‖ * ‖f t‖ * ⨆ (i : ↑s'), ‖g ↑i‖) s\n[PROOFSTEP]\nexact ((hf.norm.const_mul _).mul_const _).integrableOn\n[GOAL]\ncase refine'_2\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedAddCommGroup E''\ninst✝⁹ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedSpace 𝕜 E\ninst✝⁶ : NormedSpace 𝕜 E'\ninst✝⁵ : NormedSpace 𝕜 E''\ninst✝⁴ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝³ : MeasurableSpace G\nμ ν : Measure G\ninst✝² : AddGroup G\ninst✝¹ : MeasurableAdd G\ninst✝ : MeasurableNeg G\nx₀ : G\ns : Set G\nhs : MeasurableSet s\nh2s : (support fun t => ↑(↑L (f t)) (g (x₀ - t))) ⊆ s\nhf : IntegrableOn f s\nhmg : AEStronglyMeasurable g (Measure.map (fun t => x₀ - t) (Measure.restrict μ s))\ns' : Set G := (fun t => -t + x₀) ⁻¹' s\nhbg : BddAbove ((fun i => ‖g i‖) '' s')\nthis :\n  ∀ᵐ (t : G) ∂Measure.restrict μ s,\n    ‖↑(↑L (f t)) (g (x₀ - t))‖ ≤ indicator s (fun t => ‖L‖ * ‖f t‖ * ⨆ (i : ↑s'), ‖g ↑i‖) t\n⊢ AEStronglyMeasurable (fun t => ↑(↑L (f t)) (g (x₀ - t))) (Measure.restrict μ s)\n[PROOFSTEP]\nexact hf.aestronglyMeasurable.convolution_integrand_snd' L hmg\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedAddCommGroup E''\ninst✝⁹ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedSpace 𝕜 E\ninst✝⁶ : NormedSpace 𝕜 E'\ninst✝⁵ : NormedSpace 𝕜 E''\ninst✝⁴ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝³ : MeasurableSpace G\nμ ν : Measure G\ninst✝² : AddGroup G\ninst✝¹ : MeasurableAdd G\ninst✝ : MeasurableNeg G\nx₀ : G\nh : ConvolutionExistsAt (fun x => ‖f x‖) (fun x => ‖g x‖) x₀ (mul ℝ ℝ)\nhmf : AEStronglyMeasurable f μ\nhmg : AEStronglyMeasurable g (Measure.map (fun t => x₀ - t) μ)\n⊢ ConvolutionExistsAt f g x₀ L\n[PROOFSTEP]\nrefine' (h.const_mul ‖L‖).mono' (hmf.convolution_integrand_snd' L hmg) (eventually_of_forall fun x => _)\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedAddCommGroup E''\ninst✝⁹ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedSpace 𝕜 E\ninst✝⁶ : NormedSpace 𝕜 E'\ninst✝⁵ : NormedSpace 𝕜 E''\ninst✝⁴ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝³ : MeasurableSpace G\nμ ν : Measure G\ninst✝² : AddGroup G\ninst✝¹ : MeasurableAdd G\ninst✝ : MeasurableNeg G\nx₀ : G\nh : ConvolutionExistsAt (fun x => ‖f x‖) (fun x => ‖g x‖) x₀ (mul ℝ ℝ)\nhmf : AEStronglyMeasurable f μ\nhmg : AEStronglyMeasurable g (Measure.map (fun t => x₀ - t) μ)\nx : G\n⊢ ‖↑(↑L (f x)) (g (x₀ - x))‖ ≤ ‖L‖ * ↑(↑(mul ℝ ℝ) ((fun x => ‖f x‖) x)) ((fun x => ‖g x‖) (x₀ - x))\n[PROOFSTEP]\nrw [mul_apply', ← mul_assoc]\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedAddCommGroup E''\ninst✝⁹ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedSpace 𝕜 E\ninst✝⁶ : NormedSpace 𝕜 E'\ninst✝⁵ : NormedSpace 𝕜 E''\ninst✝⁴ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝³ : MeasurableSpace G\nμ ν : Measure G\ninst✝² : AddGroup G\ninst✝¹ : MeasurableAdd G\ninst✝ : MeasurableNeg G\nx₀ : G\nh : ConvolutionExistsAt (fun x => ‖f x‖) (fun x => ‖g x‖) x₀ (mul ℝ ℝ)\nhmf : AEStronglyMeasurable f μ\nhmg : AEStronglyMeasurable g (Measure.map (fun t => x₀ - t) μ)\nx : G\n⊢ ‖↑(↑L (f x)) (g (x₀ - x))‖ ≤ ‖L‖ * (fun x => ‖f x‖) x * (fun x => ‖g x‖) (x₀ - x)\n[PROOFSTEP]\napply L.le_op_norm₂\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁵ : NormedAddCommGroup E\ninst✝¹⁴ : NormedAddCommGroup E'\ninst✝¹³ : NormedAddCommGroup E''\ninst✝¹² : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹¹ : NontriviallyNormedField 𝕜\ninst✝¹⁰ : NormedSpace 𝕜 E\ninst✝⁹ : NormedSpace 𝕜 E'\ninst✝⁸ : NormedSpace 𝕜 E''\ninst✝⁷ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁶ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁵ : AddGroup G\ninst✝⁴ : MeasurableAdd₂ G\ninst✝³ : MeasurableNeg G\ninst✝² : SigmaFinite μ\ninst✝¹ : IsAddRightInvariant μ\ninst✝ : SigmaFinite ν\nhf : Integrable f\nhg : Integrable g\n⊢ Integrable fun p => ↑(↑L (f p.snd)) (g (p.fst - p.snd))\n[PROOFSTEP]\nhave h_meas : AEStronglyMeasurable (fun p : G × G => L (f p.2) (g (p.1 - p.2))) (μ.prod ν) :=\n  hf.aestronglyMeasurable.convolution_integrand L hg.aestronglyMeasurable\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁵ : NormedAddCommGroup E\ninst✝¹⁴ : NormedAddCommGroup E'\ninst✝¹³ : NormedAddCommGroup E''\ninst✝¹² : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹¹ : NontriviallyNormedField 𝕜\ninst✝¹⁰ : NormedSpace 𝕜 E\ninst✝⁹ : NormedSpace 𝕜 E'\ninst✝⁸ : NormedSpace 𝕜 E''\ninst✝⁷ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁶ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁵ : AddGroup G\ninst✝⁴ : MeasurableAdd₂ G\ninst✝³ : MeasurableNeg G\ninst✝² : SigmaFinite μ\ninst✝¹ : IsAddRightInvariant μ\ninst✝ : SigmaFinite ν\nhf : Integrable f\nhg : Integrable g\nh_meas : AEStronglyMeasurable (fun p => ↑(↑L (f p.snd)) (g (p.fst - p.snd))) (Measure.prod μ ν)\n⊢ Integrable fun p => ↑(↑L (f p.snd)) (g (p.fst - p.snd))\n[PROOFSTEP]\nhave h2_meas : AEStronglyMeasurable (fun y : G => ∫ x : G, ‖L (f y) (g (x - y))‖ ∂μ) ν :=\n  h_meas.prod_swap.norm.integral_prod_right'\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁵ : NormedAddCommGroup E\ninst✝¹⁴ : NormedAddCommGroup E'\ninst✝¹³ : NormedAddCommGroup E''\ninst✝¹² : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹¹ : NontriviallyNormedField 𝕜\ninst✝¹⁰ : NormedSpace 𝕜 E\ninst✝⁹ : NormedSpace 𝕜 E'\ninst✝⁸ : NormedSpace 𝕜 E''\ninst✝⁷ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁶ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁵ : AddGroup G\ninst✝⁴ : MeasurableAdd₂ G\ninst✝³ : MeasurableNeg G\ninst✝² : SigmaFinite μ\ninst✝¹ : IsAddRightInvariant μ\ninst✝ : SigmaFinite ν\nhf : Integrable f\nhg : Integrable g\nh_meas : AEStronglyMeasurable (fun p => ↑(↑L (f p.snd)) (g (p.fst - p.snd))) (Measure.prod μ ν)\nh2_meas : AEStronglyMeasurable (fun y => ∫ (x : G), ‖↑(↑L (f y)) (g (x - y))‖ ∂μ) ν\n⊢ Integrable fun p => ↑(↑L (f p.snd)) (g (p.fst - p.snd))\n[PROOFSTEP]\nsimp_rw [integrable_prod_iff' h_meas]\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁵ : NormedAddCommGroup E\ninst✝¹⁴ : NormedAddCommGroup E'\ninst✝¹³ : NormedAddCommGroup E''\ninst✝¹² : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹¹ : NontriviallyNormedField 𝕜\ninst✝¹⁰ : NormedSpace 𝕜 E\ninst✝⁹ : NormedSpace 𝕜 E'\ninst✝⁸ : NormedSpace 𝕜 E''\ninst✝⁷ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁶ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁵ : AddGroup G\ninst✝⁴ : MeasurableAdd₂ G\ninst✝³ : MeasurableNeg G\ninst✝² : SigmaFinite μ\ninst✝¹ : IsAddRightInvariant μ\ninst✝ : SigmaFinite ν\nhf : Integrable f\nhg : Integrable g\nh_meas : AEStronglyMeasurable (fun p => ↑(↑L (f p.snd)) (g (p.fst - p.snd))) (Measure.prod μ ν)\nh2_meas : AEStronglyMeasurable (fun y => ∫ (x : G), ‖↑(↑L (f y)) (g (x - y))‖ ∂μ) ν\n⊢ (∀ᵐ (y : G) ∂ν, Integrable fun x => ↑(↑L (f y)) (g (x - y))) ∧\n    Integrable fun y => ∫ (x : G), ‖↑(↑L (f y)) (g (x - y))‖ ∂μ\n[PROOFSTEP]\nrefine' ⟨eventually_of_forall fun t => (L (f t)).integrable_comp (hg.comp_sub_right t), _⟩\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁵ : NormedAddCommGroup E\ninst✝¹⁴ : NormedAddCommGroup E'\ninst✝¹³ : NormedAddCommGroup E''\ninst✝¹² : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹¹ : NontriviallyNormedField 𝕜\ninst✝¹⁰ : NormedSpace 𝕜 E\ninst✝⁹ : NormedSpace 𝕜 E'\ninst✝⁸ : NormedSpace 𝕜 E''\ninst✝⁷ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁶ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁵ : AddGroup G\ninst✝⁴ : MeasurableAdd₂ G\ninst✝³ : MeasurableNeg G\ninst✝² : SigmaFinite μ\ninst✝¹ : IsAddRightInvariant μ\ninst✝ : SigmaFinite ν\nhf : Integrable f\nhg : Integrable g\nh_meas : AEStronglyMeasurable (fun p => ↑(↑L (f p.snd)) (g (p.fst - p.snd))) (Measure.prod μ ν)\nh2_meas : AEStronglyMeasurable (fun y => ∫ (x : G), ‖↑(↑L (f y)) (g (x - y))‖ ∂μ) ν\n⊢ Integrable fun y => ∫ (x : G), ‖↑(↑L (f y)) (g (x - y))‖ ∂μ\n[PROOFSTEP]\nrefine' Integrable.mono' _ h2_meas (eventually_of_forall fun t => (_ : _ ≤ ‖L‖ * ‖f t‖ * ∫ x, ‖g (x - t)‖ ∂μ))\n[GOAL]\ncase refine'_1\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁵ : NormedAddCommGroup E\ninst✝¹⁴ : NormedAddCommGroup E'\ninst✝¹³ : NormedAddCommGroup E''\ninst✝¹² : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹¹ : NontriviallyNormedField 𝕜\ninst✝¹⁰ : NormedSpace 𝕜 E\ninst✝⁹ : NormedSpace 𝕜 E'\ninst✝⁸ : NormedSpace 𝕜 E''\ninst✝⁷ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁶ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁵ : AddGroup G\ninst✝⁴ : MeasurableAdd₂ G\ninst✝³ : MeasurableNeg G\ninst✝² : SigmaFinite μ\ninst✝¹ : IsAddRightInvariant μ\ninst✝ : SigmaFinite ν\nhf : Integrable f\nhg : Integrable g\nh_meas : AEStronglyMeasurable (fun p => ↑(↑L (f p.snd)) (g (p.fst - p.snd))) (Measure.prod μ ν)\nh2_meas : AEStronglyMeasurable (fun y => ∫ (x : G), ‖↑(↑L (f y)) (g (x - y))‖ ∂μ) ν\n⊢ Integrable fun t => ‖L‖ * ‖f t‖ * ∫ (x : G), ‖g (x - t)‖ ∂μ\n[PROOFSTEP]\nsimp only [integral_sub_right_eq_self (‖g ·‖)]\n[GOAL]\ncase refine'_1\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁵ : NormedAddCommGroup E\ninst✝¹⁴ : NormedAddCommGroup E'\ninst✝¹³ : NormedAddCommGroup E''\ninst✝¹² : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹¹ : NontriviallyNormedField 𝕜\ninst✝¹⁰ : NormedSpace 𝕜 E\ninst✝⁹ : NormedSpace 𝕜 E'\ninst✝⁸ : NormedSpace 𝕜 E''\ninst✝⁷ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁶ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁵ : AddGroup G\ninst✝⁴ : MeasurableAdd₂ G\ninst✝³ : MeasurableNeg G\ninst✝² : SigmaFinite μ\ninst✝¹ : IsAddRightInvariant μ\ninst✝ : SigmaFinite ν\nhf : Integrable f\nhg : Integrable g\nh_meas : AEStronglyMeasurable (fun p => ↑(↑L (f p.snd)) (g (p.fst - p.snd))) (Measure.prod μ ν)\nh2_meas : AEStronglyMeasurable (fun y => ∫ (x : G), ‖↑(↑L (f y)) (g (x - y))‖ ∂μ) ν\n⊢ Integrable fun t => ‖L‖ * ‖f t‖ * ∫ (x : G), ‖g x‖ ∂μ\n[PROOFSTEP]\nexact (hf.norm.const_mul _).mul_const _\n[GOAL]\ncase refine'_2\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁵ : NormedAddCommGroup E\ninst✝¹⁴ : NormedAddCommGroup E'\ninst✝¹³ : NormedAddCommGroup E''\ninst✝¹² : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹¹ : NontriviallyNormedField 𝕜\ninst✝¹⁰ : NormedSpace 𝕜 E\ninst✝⁹ : NormedSpace 𝕜 E'\ninst✝⁸ : NormedSpace 𝕜 E''\ninst✝⁷ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁶ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁵ : AddGroup G\ninst✝⁴ : MeasurableAdd₂ G\ninst✝³ : MeasurableNeg G\ninst✝² : SigmaFinite μ\ninst✝¹ : IsAddRightInvariant μ\ninst✝ : SigmaFinite ν\nhf : Integrable f\nhg : Integrable g\nh_meas : AEStronglyMeasurable (fun p => ↑(↑L (f p.snd)) (g (p.fst - p.snd))) (Measure.prod μ ν)\nh2_meas : AEStronglyMeasurable (fun y => ∫ (x : G), ‖↑(↑L (f y)) (g (x - y))‖ ∂μ) ν\nt : G\n⊢ ‖∫ (x : G), ‖↑(↑L (f t)) (g (x - t))‖ ∂μ‖ ≤ ‖L‖ * ‖f t‖ * ∫ (x : G), ‖g (x - t)‖ ∂μ\n[PROOFSTEP]\nsimp_rw [← integral_mul_left]\n[GOAL]\ncase refine'_2\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁵ : NormedAddCommGroup E\ninst✝¹⁴ : NormedAddCommGroup E'\ninst✝¹³ : NormedAddCommGroup E''\ninst✝¹² : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹¹ : NontriviallyNormedField 𝕜\ninst✝¹⁰ : NormedSpace 𝕜 E\ninst✝⁹ : NormedSpace 𝕜 E'\ninst✝⁸ : NormedSpace 𝕜 E''\ninst✝⁷ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁶ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁵ : AddGroup G\ninst✝⁴ : MeasurableAdd₂ G\ninst✝³ : MeasurableNeg G\ninst✝² : SigmaFinite μ\ninst✝¹ : IsAddRightInvariant μ\ninst✝ : SigmaFinite ν\nhf : Integrable f\nhg : Integrable g\nh_meas : AEStronglyMeasurable (fun p => ↑(↑L (f p.snd)) (g (p.fst - p.snd))) (Measure.prod μ ν)\nh2_meas : AEStronglyMeasurable (fun y => ∫ (x : G), ‖↑(↑L (f y)) (g (x - y))‖ ∂μ) ν\nt : G\n⊢ ‖∫ (x : G), ‖↑(↑L (f t)) (g (x - t))‖ ∂μ‖ ≤ ∫ (a : G), ‖L‖ * ‖f t‖ * ‖g (a - t)‖ ∂μ\n[PROOFSTEP]\nrw [Real.norm_of_nonneg]\n[GOAL]\ncase refine'_2\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁵ : NormedAddCommGroup E\ninst✝¹⁴ : NormedAddCommGroup E'\ninst✝¹³ : NormedAddCommGroup E''\ninst✝¹² : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹¹ : NontriviallyNormedField 𝕜\ninst✝¹⁰ : NormedSpace 𝕜 E\ninst✝⁹ : NormedSpace 𝕜 E'\ninst✝⁸ : NormedSpace 𝕜 E''\ninst✝⁷ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁶ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁵ : AddGroup G\ninst✝⁴ : MeasurableAdd₂ G\ninst✝³ : MeasurableNeg G\ninst✝² : SigmaFinite μ\ninst✝¹ : IsAddRightInvariant μ\ninst✝ : SigmaFinite ν\nhf : Integrable f\nhg : Integrable g\nh_meas : AEStronglyMeasurable (fun p => ↑(↑L (f p.snd)) (g (p.fst - p.snd))) (Measure.prod μ ν)\nh2_meas : AEStronglyMeasurable (fun y => ∫ (x : G), ‖↑(↑L (f y)) (g (x - y))‖ ∂μ) ν\nt : G\n⊢ ∫ (x : G), ‖↑(↑L (f t)) (g (x - t))‖ ∂μ ≤ ∫ (a : G), ‖L‖ * ‖f t‖ * ‖g (a - t)‖ ∂μ\n[PROOFSTEP]\nexact\n  integral_mono_of_nonneg (eventually_of_forall fun t => norm_nonneg _) ((hg.comp_sub_right t).norm.const_mul _)\n    (eventually_of_forall fun t => L.le_op_norm₂ _ _)\n[GOAL]\ncase refine'_2\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁵ : NormedAddCommGroup E\ninst✝¹⁴ : NormedAddCommGroup E'\ninst✝¹³ : NormedAddCommGroup E''\ninst✝¹² : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹¹ : NontriviallyNormedField 𝕜\ninst✝¹⁰ : NormedSpace 𝕜 E\ninst✝⁹ : NormedSpace 𝕜 E'\ninst✝⁸ : NormedSpace 𝕜 E''\ninst✝⁷ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁶ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁵ : AddGroup G\ninst✝⁴ : MeasurableAdd₂ G\ninst✝³ : MeasurableNeg G\ninst✝² : SigmaFinite μ\ninst✝¹ : IsAddRightInvariant μ\ninst✝ : SigmaFinite ν\nhf : Integrable f\nhg : Integrable g\nh_meas : AEStronglyMeasurable (fun p => ↑(↑L (f p.snd)) (g (p.fst - p.snd))) (Measure.prod μ ν)\nh2_meas : AEStronglyMeasurable (fun y => ∫ (x : G), ‖↑(↑L (f y)) (g (x - y))‖ ∂μ) ν\nt : G\n⊢ 0 ≤ ∫ (x : G), ‖↑(↑L (f t)) (g (x - t))‖ ∂μ\n[PROOFSTEP]\nexact integral_nonneg fun x => norm_nonneg _\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedAddCommGroup E'\ninst✝¹¹ : NormedAddCommGroup E''\ninst✝¹⁰ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝⁹ : NontriviallyNormedField 𝕜\ninst✝⁸ : NormedSpace 𝕜 E\ninst✝⁷ : NormedSpace 𝕜 E'\ninst✝⁶ : NormedSpace 𝕜 E''\ninst✝⁵ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁴ : MeasurableSpace G\nμ ν : Measure G\ninst✝³ : AddGroup G\ninst✝² : TopologicalSpace G\ninst✝¹ : TopologicalAddGroup G\ninst✝ : BorelSpace G\nx₀ : G\nh : HasCompactSupport fun t => ↑(↑L (f t)) (g (x₀ - t))\nhf : LocallyIntegrable f\nhg : Continuous g\n⊢ ConvolutionExistsAt f g x₀ L\n[PROOFSTEP]\nlet u := (Homeomorph.neg G).trans (Homeomorph.addRight x₀)\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedAddCommGroup E'\ninst✝¹¹ : NormedAddCommGroup E''\ninst✝¹⁰ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝⁹ : NontriviallyNormedField 𝕜\ninst✝⁸ : NormedSpace 𝕜 E\ninst✝⁷ : NormedSpace 𝕜 E'\ninst✝⁶ : NormedSpace 𝕜 E''\ninst✝⁵ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁴ : MeasurableSpace G\nμ ν : Measure G\ninst✝³ : AddGroup G\ninst✝² : TopologicalSpace G\ninst✝¹ : TopologicalAddGroup G\ninst✝ : BorelSpace G\nx₀ : G\nh : HasCompactSupport fun t => ↑(↑L (f t)) (g (x₀ - t))\nhf : LocallyIntegrable f\nhg : Continuous g\nu : G ≃ₜ G := Homeomorph.trans (Homeomorph.neg G) (Homeomorph.addRight x₀)\n⊢ ConvolutionExistsAt f g x₀ L\n[PROOFSTEP]\nlet v := (Homeomorph.neg G).trans (Homeomorph.addLeft x₀)\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedAddCommGroup E'\ninst✝¹¹ : NormedAddCommGroup E''\ninst✝¹⁰ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝⁹ : NontriviallyNormedField 𝕜\ninst✝⁸ : NormedSpace 𝕜 E\ninst✝⁷ : NormedSpace 𝕜 E'\ninst✝⁶ : NormedSpace 𝕜 E''\ninst✝⁵ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁴ : MeasurableSpace G\nμ ν : Measure G\ninst✝³ : AddGroup G\ninst✝² : TopologicalSpace G\ninst✝¹ : TopologicalAddGroup G\ninst✝ : BorelSpace G\nx₀ : G\nh : HasCompactSupport fun t => ↑(↑L (f t)) (g (x₀ - t))\nhf : LocallyIntegrable f\nhg : Continuous g\nu : G ≃ₜ G := Homeomorph.trans (Homeomorph.neg G) (Homeomorph.addRight x₀)\nv : G ≃ₜ G := Homeomorph.trans (Homeomorph.neg G) (Homeomorph.addLeft x₀)\n⊢ ConvolutionExistsAt f g x₀ L\n[PROOFSTEP]\napply\n  ((u.isCompact_preimage.mpr h).bddAbove_image hg.norm.continuousOn).convolutionExistsAt' L\n    isClosed_closure.measurableSet subset_closure (hf.integrableOn_isCompact h)\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedAddCommGroup E'\ninst✝¹¹ : NormedAddCommGroup E''\ninst✝¹⁰ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝⁹ : NontriviallyNormedField 𝕜\ninst✝⁸ : NormedSpace 𝕜 E\ninst✝⁷ : NormedSpace 𝕜 E'\ninst✝⁶ : NormedSpace 𝕜 E''\ninst✝⁵ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁴ : MeasurableSpace G\nμ ν : Measure G\ninst✝³ : AddGroup G\ninst✝² : TopologicalSpace G\ninst✝¹ : TopologicalAddGroup G\ninst✝ : BorelSpace G\nx₀ : G\nh : HasCompactSupport fun t => ↑(↑L (f t)) (g (x₀ - t))\nhf : LocallyIntegrable f\nhg : Continuous g\nu : G ≃ₜ G := Homeomorph.trans (Homeomorph.neg G) (Homeomorph.addRight x₀)\nv : G ≃ₜ G := Homeomorph.trans (Homeomorph.neg G) (Homeomorph.addLeft x₀)\n⊢ AEStronglyMeasurable (fun x => g x)\n    (Measure.map (fun t => ↑(↑toAddUnits x₀) - t) (Measure.restrict μ (tsupport fun t => ↑(↑L (f t)) (g (x₀ - t)))))\n[PROOFSTEP]\nhave A : AEStronglyMeasurable (g ∘ v) (μ.restrict (tsupport fun t : G => L (f t) (g (x₀ - t))))\n[GOAL]\ncase A\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedAddCommGroup E'\ninst✝¹¹ : NormedAddCommGroup E''\ninst✝¹⁰ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝⁹ : NontriviallyNormedField 𝕜\ninst✝⁸ : NormedSpace 𝕜 E\ninst✝⁷ : NormedSpace 𝕜 E'\ninst✝⁶ : NormedSpace 𝕜 E''\ninst✝⁵ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁴ : MeasurableSpace G\nμ ν : Measure G\ninst✝³ : AddGroup G\ninst✝² : TopologicalSpace G\ninst✝¹ : TopologicalAddGroup G\ninst✝ : BorelSpace G\nx₀ : G\nh : HasCompactSupport fun t => ↑(↑L (f t)) (g (x₀ - t))\nhf : LocallyIntegrable f\nhg : Continuous g\nu : G ≃ₜ G := Homeomorph.trans (Homeomorph.neg G) (Homeomorph.addRight x₀)\nv : G ≃ₜ G := Homeomorph.trans (Homeomorph.neg G) (Homeomorph.addLeft x₀)\n⊢ AEStronglyMeasurable (g ∘ ↑v) (Measure.restrict μ (tsupport fun t => ↑(↑L (f t)) (g (x₀ - t))))\n[PROOFSTEP]\napply (hg.comp v.continuous).continuousOn.aestronglyMeasurable_of_isCompact h\n[GOAL]\ncase A\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedAddCommGroup E'\ninst✝¹¹ : NormedAddCommGroup E''\ninst✝¹⁰ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝⁹ : NontriviallyNormedField 𝕜\ninst✝⁸ : NormedSpace 𝕜 E\ninst✝⁷ : NormedSpace 𝕜 E'\ninst✝⁶ : NormedSpace 𝕜 E''\ninst✝⁵ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁴ : MeasurableSpace G\nμ ν : Measure G\ninst✝³ : AddGroup G\ninst✝² : TopologicalSpace G\ninst✝¹ : TopologicalAddGroup G\ninst✝ : BorelSpace G\nx₀ : G\nh : HasCompactSupport fun t => ↑(↑L (f t)) (g (x₀ - t))\nhf : LocallyIntegrable f\nhg : Continuous g\nu : G ≃ₜ G := Homeomorph.trans (Homeomorph.neg G) (Homeomorph.addRight x₀)\nv : G ≃ₜ G := Homeomorph.trans (Homeomorph.neg G) (Homeomorph.addLeft x₀)\n⊢ MeasurableSet (tsupport fun t => ↑(↑L (f t)) (g (x₀ - t)))\n[PROOFSTEP]\nexact (isClosed_tsupport _).measurableSet\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedAddCommGroup E'\ninst✝¹¹ : NormedAddCommGroup E''\ninst✝¹⁰ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝⁹ : NontriviallyNormedField 𝕜\ninst✝⁸ : NormedSpace 𝕜 E\ninst✝⁷ : NormedSpace 𝕜 E'\ninst✝⁶ : NormedSpace 𝕜 E''\ninst✝⁵ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁴ : MeasurableSpace G\nμ ν : Measure G\ninst✝³ : AddGroup G\ninst✝² : TopologicalSpace G\ninst✝¹ : TopologicalAddGroup G\ninst✝ : BorelSpace G\nx₀ : G\nh : HasCompactSupport fun t => ↑(↑L (f t)) (g (x₀ - t))\nhf : LocallyIntegrable f\nhg : Continuous g\nu : G ≃ₜ G := Homeomorph.trans (Homeomorph.neg G) (Homeomorph.addRight x₀)\nv : G ≃ₜ G := Homeomorph.trans (Homeomorph.neg G) (Homeomorph.addLeft x₀)\nA : AEStronglyMeasurable (g ∘ ↑v) (Measure.restrict μ (tsupport fun t => ↑(↑L (f t)) (g (x₀ - t))))\n⊢ AEStronglyMeasurable (fun x => g x)\n    (Measure.map (fun t => ↑(↑toAddUnits x₀) - t) (Measure.restrict μ (tsupport fun t => ↑(↑L (f t)) (g (x₀ - t)))))\n[PROOFSTEP]\nconvert\n  ((v.continuous.measurable.measurePreserving\n            (μ.restrict (tsupport fun t => L (f t) (g (x₀ - t))))).aestronglyMeasurable_comp_iff\n        v.toMeasurableEquiv.measurableEmbedding).1\n    A\n[GOAL]\ncase h.e'_6.h.e'_5.h.h.e\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedAddCommGroup E'\ninst✝¹¹ : NormedAddCommGroup E''\ninst✝¹⁰ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝⁹ : NontriviallyNormedField 𝕜\ninst✝⁸ : NormedSpace 𝕜 E\ninst✝⁷ : NormedSpace 𝕜 E'\ninst✝⁶ : NormedSpace 𝕜 E''\ninst✝⁵ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁴ : MeasurableSpace G\nμ ν : Measure G\ninst✝³ : AddGroup G\ninst✝² : TopologicalSpace G\ninst✝¹ : TopologicalAddGroup G\ninst✝ : BorelSpace G\nx₀ : G\nh : HasCompactSupport fun t => ↑(↑L (f t)) (g (x₀ - t))\nhf : LocallyIntegrable f\nhg : Continuous g\nu : G ≃ₜ G := Homeomorph.trans (Homeomorph.neg G) (Homeomorph.addRight x₀)\nv : G ≃ₜ G := Homeomorph.trans (Homeomorph.neg G) (Homeomorph.addLeft x₀)\nA : AEStronglyMeasurable (g ∘ ↑v) (Measure.restrict μ (tsupport fun t => ↑(↑L (f t)) (g (x₀ - t))))\nx✝ : G\n⊢ HSub.hSub ↑(↑toAddUnits x₀) = ↑v\n[PROOFSTEP]\next x\n[GOAL]\ncase h.e'_6.h.e'_5.h.h.e.h\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedAddCommGroup E'\ninst✝¹¹ : NormedAddCommGroup E''\ninst✝¹⁰ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx✝¹ x' : G\ny y' : E\ninst✝⁹ : NontriviallyNormedField 𝕜\ninst✝⁸ : NormedSpace 𝕜 E\ninst✝⁷ : NormedSpace 𝕜 E'\ninst✝⁶ : NormedSpace 𝕜 E''\ninst✝⁵ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁴ : MeasurableSpace G\nμ ν : Measure G\ninst✝³ : AddGroup G\ninst✝² : TopologicalSpace G\ninst✝¹ : TopologicalAddGroup G\ninst✝ : BorelSpace G\nx₀ : G\nh : HasCompactSupport fun t => ↑(↑L (f t)) (g (x₀ - t))\nhf : LocallyIntegrable f\nhg : Continuous g\nu : G ≃ₜ G := Homeomorph.trans (Homeomorph.neg G) (Homeomorph.addRight x₀)\nv : G ≃ₜ G := Homeomorph.trans (Homeomorph.neg G) (Homeomorph.addLeft x₀)\nA : AEStronglyMeasurable (g ∘ ↑v) (Measure.restrict μ (tsupport fun t => ↑(↑L (f t)) (g (x₀ - t))))\nx✝ x : G\n⊢ ↑(↑toAddUnits x₀) - x = ↑v x\n[PROOFSTEP]\nsimp only [Homeomorph.neg, sub_eq_add_neg, coe_toAddUnits, Homeomorph.trans_apply, Equiv.neg_apply, Equiv.toFun_as_coe,\n  Homeomorph.homeomorph_mk_coe, Equiv.coe_fn_mk, Homeomorph.coe_addLeft]\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedAddCommGroup E'\ninst✝¹¹ : NormedAddCommGroup E''\ninst✝¹⁰ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝⁹ : NontriviallyNormedField 𝕜\ninst✝⁸ : NormedSpace 𝕜 E\ninst✝⁷ : NormedSpace 𝕜 E'\ninst✝⁶ : NormedSpace 𝕜 E''\ninst✝⁵ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁴ : MeasurableSpace G\nμ ν : Measure G\ninst✝³ : AddGroup G\ninst✝² : TopologicalSpace G\ninst✝¹ : TopologicalAddGroup G\ninst✝ : BorelSpace G\nhcg : HasCompactSupport g\nhf : LocallyIntegrable f\nhg : Continuous g\n⊢ ConvolutionExists f g L\n[PROOFSTEP]\nintro x₀\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedAddCommGroup E'\ninst✝¹¹ : NormedAddCommGroup E''\ninst✝¹⁰ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝⁹ : NontriviallyNormedField 𝕜\ninst✝⁸ : NormedSpace 𝕜 E\ninst✝⁷ : NormedSpace 𝕜 E'\ninst✝⁶ : NormedSpace 𝕜 E''\ninst✝⁵ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁴ : MeasurableSpace G\nμ ν : Measure G\ninst✝³ : AddGroup G\ninst✝² : TopologicalSpace G\ninst✝¹ : TopologicalAddGroup G\ninst✝ : BorelSpace G\nhcg : HasCompactSupport g\nhf : LocallyIntegrable f\nhg : Continuous g\nx₀ : G\n⊢ ConvolutionExistsAt f g x₀ L\n[PROOFSTEP]\nrefine' HasCompactSupport.convolutionExistsAt L _ hf hg\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedAddCommGroup E'\ninst✝¹¹ : NormedAddCommGroup E''\ninst✝¹⁰ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝⁹ : NontriviallyNormedField 𝕜\ninst✝⁸ : NormedSpace 𝕜 E\ninst✝⁷ : NormedSpace 𝕜 E'\ninst✝⁶ : NormedSpace 𝕜 E''\ninst✝⁵ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁴ : MeasurableSpace G\nμ ν : Measure G\ninst✝³ : AddGroup G\ninst✝² : TopologicalSpace G\ninst✝¹ : TopologicalAddGroup G\ninst✝ : BorelSpace G\nhcg : HasCompactSupport g\nhf : LocallyIntegrable f\nhg : Continuous g\nx₀ : G\n⊢ HasCompactSupport fun t => ↑(↑L (f t)) (g (x₀ - t))\n[PROOFSTEP]\nrefine' (hcg.comp_homeomorph (Homeomorph.subLeft x₀)).mono _\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedAddCommGroup E'\ninst✝¹¹ : NormedAddCommGroup E''\ninst✝¹⁰ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝⁹ : NontriviallyNormedField 𝕜\ninst✝⁸ : NormedSpace 𝕜 E\ninst✝⁷ : NormedSpace 𝕜 E'\ninst✝⁶ : NormedSpace 𝕜 E''\ninst✝⁵ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁴ : MeasurableSpace G\nμ ν : Measure G\ninst✝³ : AddGroup G\ninst✝² : TopologicalSpace G\ninst✝¹ : TopologicalAddGroup G\ninst✝ : BorelSpace G\nhcg : HasCompactSupport g\nhf : LocallyIntegrable f\nhg : Continuous g\nx₀ : G\n⊢ (support fun t => ↑(↑L (f t)) (g (x₀ - t))) ⊆ support (g ∘ ↑(Homeomorph.subLeft x₀))\n[PROOFSTEP]\nrefine' fun t => mt fun ht : g (x₀ - t) = 0 => _\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedAddCommGroup E'\ninst✝¹¹ : NormedAddCommGroup E''\ninst✝¹⁰ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝⁹ : NontriviallyNormedField 𝕜\ninst✝⁸ : NormedSpace 𝕜 E\ninst✝⁷ : NormedSpace 𝕜 E'\ninst✝⁶ : NormedSpace 𝕜 E''\ninst✝⁵ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁴ : MeasurableSpace G\nμ ν : Measure G\ninst✝³ : AddGroup G\ninst✝² : TopologicalSpace G\ninst✝¹ : TopologicalAddGroup G\ninst✝ : BorelSpace G\nhcg : HasCompactSupport g\nhf : LocallyIntegrable f\nhg : Continuous g\nx₀ t : G\nht : g (x₀ - t) = 0\n⊢ (fun t => ↑(↑L (f t)) (g (x₀ - t))) t = 0\n[PROOFSTEP]\nsimp_rw [ht, (L _).map_zero]\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedAddCommGroup E'\ninst✝¹¹ : NormedAddCommGroup E''\ninst✝¹⁰ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝⁹ : NontriviallyNormedField 𝕜\ninst✝⁸ : NormedSpace 𝕜 E\ninst✝⁷ : NormedSpace 𝕜 E'\ninst✝⁶ : NormedSpace 𝕜 E''\ninst✝⁵ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁴ : MeasurableSpace G\nμ ν : Measure G\ninst✝³ : AddGroup G\ninst✝² : TopologicalSpace G\ninst✝¹ : TopologicalAddGroup G\ninst✝ : BorelSpace G\nhcf : HasCompactSupport f\nhf : LocallyIntegrable f\nhg : Continuous g\n⊢ ConvolutionExists f g L\n[PROOFSTEP]\nintro x₀\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedAddCommGroup E'\ninst✝¹¹ : NormedAddCommGroup E''\ninst✝¹⁰ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝⁹ : NontriviallyNormedField 𝕜\ninst✝⁸ : NormedSpace 𝕜 E\ninst✝⁷ : NormedSpace 𝕜 E'\ninst✝⁶ : NormedSpace 𝕜 E''\ninst✝⁵ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁴ : MeasurableSpace G\nμ ν : Measure G\ninst✝³ : AddGroup G\ninst✝² : TopologicalSpace G\ninst✝¹ : TopologicalAddGroup G\ninst✝ : BorelSpace G\nhcf : HasCompactSupport f\nhf : LocallyIntegrable f\nhg : Continuous g\nx₀ : G\n⊢ ConvolutionExistsAt f g x₀ L\n[PROOFSTEP]\nrefine' HasCompactSupport.convolutionExistsAt L _ hf hg\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedAddCommGroup E'\ninst✝¹¹ : NormedAddCommGroup E''\ninst✝¹⁰ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝⁹ : NontriviallyNormedField 𝕜\ninst✝⁸ : NormedSpace 𝕜 E\ninst✝⁷ : NormedSpace 𝕜 E'\ninst✝⁶ : NormedSpace 𝕜 E''\ninst✝⁵ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁴ : MeasurableSpace G\nμ ν : Measure G\ninst✝³ : AddGroup G\ninst✝² : TopologicalSpace G\ninst✝¹ : TopologicalAddGroup G\ninst✝ : BorelSpace G\nhcf : HasCompactSupport f\nhf : LocallyIntegrable f\nhg : Continuous g\nx₀ : G\n⊢ HasCompactSupport fun t => ↑(↑L (f t)) (g (x₀ - t))\n[PROOFSTEP]\nrefine' hcf.mono _\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedAddCommGroup E'\ninst✝¹¹ : NormedAddCommGroup E''\ninst✝¹⁰ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝⁹ : NontriviallyNormedField 𝕜\ninst✝⁸ : NormedSpace 𝕜 E\ninst✝⁷ : NormedSpace 𝕜 E'\ninst✝⁶ : NormedSpace 𝕜 E''\ninst✝⁵ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁴ : MeasurableSpace G\nμ ν : Measure G\ninst✝³ : AddGroup G\ninst✝² : TopologicalSpace G\ninst✝¹ : TopologicalAddGroup G\ninst✝ : BorelSpace G\nhcf : HasCompactSupport f\nhf : LocallyIntegrable f\nhg : Continuous g\nx₀ : G\n⊢ (support fun t => ↑(↑L (f t)) (g (x₀ - t))) ⊆ support f\n[PROOFSTEP]\nrefine' fun t => mt fun ht : f t = 0 => _\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedAddCommGroup E'\ninst✝¹¹ : NormedAddCommGroup E''\ninst✝¹⁰ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝⁹ : NontriviallyNormedField 𝕜\ninst✝⁸ : NormedSpace 𝕜 E\ninst✝⁷ : NormedSpace 𝕜 E'\ninst✝⁶ : NormedSpace 𝕜 E''\ninst✝⁵ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁴ : MeasurableSpace G\nμ ν : Measure G\ninst✝³ : AddGroup G\ninst✝² : TopologicalSpace G\ninst✝¹ : TopologicalAddGroup G\ninst✝ : BorelSpace G\nhcf : HasCompactSupport f\nhf : LocallyIntegrable f\nhg : Continuous g\nx₀ t : G\nht : f t = 0\n⊢ (fun t => ↑(↑L (f t)) (g (x₀ - t))) t = 0\n[PROOFSTEP]\nsimp_rw [ht, L.map_zero₂]\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedAddCommGroup E'\ninst✝¹² : NormedAddCommGroup E''\ninst✝¹¹ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁰ : NontriviallyNormedField 𝕜\ninst✝⁹ : NormedSpace 𝕜 E\ninst✝⁸ : NormedSpace 𝕜 E'\ninst✝⁷ : NormedSpace 𝕜 E''\ninst✝⁶ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁵ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁴ : AddCommGroup G\ninst✝³ : MeasurableNeg G\ninst✝² : IsAddLeftInvariant μ\ninst✝¹ : MeasurableAdd₂ G\ninst✝ : SigmaFinite μ\nx₀ : G\ns : Set G\nhbg : BddAbove ((fun i => ‖g i‖) '' ((fun t => x₀ - t) ⁻¹' s))\nhs : MeasurableSet s\nh2s : (support fun t => ↑(↑L (f t)) (g (x₀ - t))) ⊆ s\nhf : IntegrableOn f s\nhmg : AEStronglyMeasurable g μ\n⊢ ConvolutionExistsAt f g x₀ L\n[PROOFSTEP]\nrefine' BddAbove.convolutionExistsAt' L _ hs h2s hf _\n[GOAL]\ncase refine'_1\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedAddCommGroup E'\ninst✝¹² : NormedAddCommGroup E''\ninst✝¹¹ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁰ : NontriviallyNormedField 𝕜\ninst✝⁹ : NormedSpace 𝕜 E\ninst✝⁸ : NormedSpace 𝕜 E'\ninst✝⁷ : NormedSpace 𝕜 E''\ninst✝⁶ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁵ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁴ : AddCommGroup G\ninst✝³ : MeasurableNeg G\ninst✝² : IsAddLeftInvariant μ\ninst✝¹ : MeasurableAdd₂ G\ninst✝ : SigmaFinite μ\nx₀ : G\ns : Set G\nhbg : BddAbove ((fun i => ‖g i‖) '' ((fun t => x₀ - t) ⁻¹' s))\nhs : MeasurableSet s\nh2s : (support fun t => ↑(↑L (f t)) (g (x₀ - t))) ⊆ s\nhf : IntegrableOn f s\nhmg : AEStronglyMeasurable g μ\n⊢ BddAbove ((fun i => ‖g i‖) '' ((fun t => -t + x₀) ⁻¹' s))\n[PROOFSTEP]\nsimp_rw [← sub_eq_neg_add, hbg]\n[GOAL]\ncase refine'_2\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedAddCommGroup E'\ninst✝¹² : NormedAddCommGroup E''\ninst✝¹¹ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁰ : NontriviallyNormedField 𝕜\ninst✝⁹ : NormedSpace 𝕜 E\ninst✝⁸ : NormedSpace 𝕜 E'\ninst✝⁷ : NormedSpace 𝕜 E''\ninst✝⁶ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁵ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁴ : AddCommGroup G\ninst✝³ : MeasurableNeg G\ninst✝² : IsAddLeftInvariant μ\ninst✝¹ : MeasurableAdd₂ G\ninst✝ : SigmaFinite μ\nx₀ : G\ns : Set G\nhbg : BddAbove ((fun i => ‖g i‖) '' ((fun t => x₀ - t) ⁻¹' s))\nhs : MeasurableSet s\nh2s : (support fun t => ↑(↑L (f t)) (g (x₀ - t))) ⊆ s\nhf : IntegrableOn f s\nhmg : AEStronglyMeasurable g μ\n⊢ AEStronglyMeasurable g (Measure.map (fun t => x₀ - t) (Measure.restrict μ s))\n[PROOFSTEP]\nhave : AEStronglyMeasurable g (map (fun t : G => x₀ - t) μ) :=\n  hmg.mono' (quasiMeasurePreserving_sub_left_of_right_invariant μ x₀).absolutelyContinuous\n[GOAL]\ncase refine'_2\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedAddCommGroup E'\ninst✝¹² : NormedAddCommGroup E''\ninst✝¹¹ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁰ : NontriviallyNormedField 𝕜\ninst✝⁹ : NormedSpace 𝕜 E\ninst✝⁸ : NormedSpace 𝕜 E'\ninst✝⁷ : NormedSpace 𝕜 E''\ninst✝⁶ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁵ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁴ : AddCommGroup G\ninst✝³ : MeasurableNeg G\ninst✝² : IsAddLeftInvariant μ\ninst✝¹ : MeasurableAdd₂ G\ninst✝ : SigmaFinite μ\nx₀ : G\ns : Set G\nhbg : BddAbove ((fun i => ‖g i‖) '' ((fun t => x₀ - t) ⁻¹' s))\nhs : MeasurableSet s\nh2s : (support fun t => ↑(↑L (f t)) (g (x₀ - t))) ⊆ s\nhf : IntegrableOn f s\nhmg : AEStronglyMeasurable g μ\nthis : AEStronglyMeasurable g (Measure.map (fun t => x₀ - t) μ)\n⊢ AEStronglyMeasurable g (Measure.map (fun t => x₀ - t) (Measure.restrict μ s))\n[PROOFSTEP]\napply this.mono_measure\n[GOAL]\ncase refine'_2\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedAddCommGroup E'\ninst✝¹² : NormedAddCommGroup E''\ninst✝¹¹ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁰ : NontriviallyNormedField 𝕜\ninst✝⁹ : NormedSpace 𝕜 E\ninst✝⁸ : NormedSpace 𝕜 E'\ninst✝⁷ : NormedSpace 𝕜 E''\ninst✝⁶ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁵ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁴ : AddCommGroup G\ninst✝³ : MeasurableNeg G\ninst✝² : IsAddLeftInvariant μ\ninst✝¹ : MeasurableAdd₂ G\ninst✝ : SigmaFinite μ\nx₀ : G\ns : Set G\nhbg : BddAbove ((fun i => ‖g i‖) '' ((fun t => x₀ - t) ⁻¹' s))\nhs : MeasurableSet s\nh2s : (support fun t => ↑(↑L (f t)) (g (x₀ - t))) ⊆ s\nhf : IntegrableOn f s\nhmg : AEStronglyMeasurable g μ\nthis : AEStronglyMeasurable g (Measure.map (fun t => x₀ - t) μ)\n⊢ Measure.map (fun t => x₀ - t) (Measure.restrict μ s) ≤ Measure.map (fun t => x₀ - t) μ\n[PROOFSTEP]\nexact map_mono restrict_le_self (measurable_const.sub measurable_id')\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedAddCommGroup E'\ninst✝¹² : NormedAddCommGroup E''\ninst✝¹¹ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁰ : NontriviallyNormedField 𝕜\ninst✝⁹ : NormedSpace 𝕜 E\ninst✝⁸ : NormedSpace 𝕜 E'\ninst✝⁷ : NormedSpace 𝕜 E''\ninst✝⁶ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁵ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁴ : AddCommGroup G\ninst✝³ : MeasurableNeg G\ninst✝² : IsAddLeftInvariant μ\ninst✝¹ : MeasurableAdd G\ninst✝ : IsNegInvariant μ\n⊢ ConvolutionExistsAt g f x (ContinuousLinearMap.flip L) ↔ ConvolutionExistsAt f g x L\n[PROOFSTEP]\nsimp_rw [ConvolutionExistsAt,\n  -- porting note: added `(μ := μ)`← integrable_comp_sub_left (μ := μ) (fun t => L (f t) (g (x - t))) x, sub_sub_cancel,\n  flip_apply]\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedAddCommGroup E'\ninst✝¹² : NormedAddCommGroup E''\ninst✝¹¹ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁰ : NontriviallyNormedField 𝕜\ninst✝⁹ : NormedSpace 𝕜 E\ninst✝⁸ : NormedSpace 𝕜 E'\ninst✝⁷ : NormedSpace 𝕜 E''\ninst✝⁶ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁵ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁴ : AddCommGroup G\ninst✝³ : MeasurableNeg G\ninst✝² : IsAddLeftInvariant μ\ninst✝¹ : MeasurableAdd G\ninst✝ : IsNegInvariant μ\nh : ConvolutionExistsAt f g x L\n⊢ Integrable fun t => ↑(↑L (f (x - t))) (g t)\n[PROOFSTEP]\nconvert h.comp_sub_left x\n[GOAL]\ncase h.e'_5.h.h.e'_6.h.e'_1\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedAddCommGroup E'\ninst✝¹² : NormedAddCommGroup E''\ninst✝¹¹ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁰ : NontriviallyNormedField 𝕜\ninst✝⁹ : NormedSpace 𝕜 E\ninst✝⁸ : NormedSpace 𝕜 E'\ninst✝⁷ : NormedSpace 𝕜 E''\ninst✝⁶ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁵ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁴ : AddCommGroup G\ninst✝³ : MeasurableNeg G\ninst✝² : IsAddLeftInvariant μ\ninst✝¹ : MeasurableAdd G\ninst✝ : IsNegInvariant μ\nh : ConvolutionExistsAt f g x L\nx✝ : G\n⊢ x✝ = x - (x - x✝)\n[PROOFSTEP]\nsimp_rw [sub_sub_self]\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedAddCommGroup E'\ninst✝¹¹ : NormedAddCommGroup E''\ninst✝¹⁰ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny✝ y' : E\ninst✝⁹ : NontriviallyNormedField 𝕜\ninst✝⁸ : NormedSpace 𝕜 E\ninst✝⁷ : NormedSpace 𝕜 E'\ninst✝⁶ : NormedSpace 𝕜 E''\ninst✝⁵ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁴ : MeasurableSpace G\nμ ν : Measure G\ninst✝³ : NormedSpace ℝ F\ninst✝² : CompleteSpace F\ninst✝¹ : AddGroup G\ninst✝ : SMulCommClass ℝ 𝕜 F\ny : 𝕜\n⊢ convolution (y • f) g L = y • convolution f g L\n[PROOFSTEP]\next\n[GOAL]\ncase h\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedAddCommGroup E'\ninst✝¹¹ : NormedAddCommGroup E''\ninst✝¹⁰ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny✝ y' : E\ninst✝⁹ : NontriviallyNormedField 𝕜\ninst✝⁸ : NormedSpace 𝕜 E\ninst✝⁷ : NormedSpace 𝕜 E'\ninst✝⁶ : NormedSpace 𝕜 E''\ninst✝⁵ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁴ : MeasurableSpace G\nμ ν : Measure G\ninst✝³ : NormedSpace ℝ F\ninst✝² : CompleteSpace F\ninst✝¹ : AddGroup G\ninst✝ : SMulCommClass ℝ 𝕜 F\ny : 𝕜\nx✝ : G\n⊢ y • f ⋆[L, x✝] g = (y • convolution f g L) x✝\n[PROOFSTEP]\nsimp only [Pi.smul_apply, convolution_def, ← integral_smul, L.map_smul₂]\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedAddCommGroup E'\ninst✝¹¹ : NormedAddCommGroup E''\ninst✝¹⁰ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny✝ y' : E\ninst✝⁹ : NontriviallyNormedField 𝕜\ninst✝⁸ : NormedSpace 𝕜 E\ninst✝⁷ : NormedSpace 𝕜 E'\ninst✝⁶ : NormedSpace 𝕜 E''\ninst✝⁵ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁴ : MeasurableSpace G\nμ ν : Measure G\ninst✝³ : NormedSpace ℝ F\ninst✝² : CompleteSpace F\ninst✝¹ : AddGroup G\ninst✝ : SMulCommClass ℝ 𝕜 F\ny : 𝕜\n⊢ convolution f (y • g) L = y • convolution f g L\n[PROOFSTEP]\next\n[GOAL]\ncase h\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedAddCommGroup E'\ninst✝¹¹ : NormedAddCommGroup E''\ninst✝¹⁰ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny✝ y' : E\ninst✝⁹ : NontriviallyNormedField 𝕜\ninst✝⁸ : NormedSpace 𝕜 E\ninst✝⁷ : NormedSpace 𝕜 E'\ninst✝⁶ : NormedSpace 𝕜 E''\ninst✝⁵ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁴ : MeasurableSpace G\nμ ν : Measure G\ninst✝³ : NormedSpace ℝ F\ninst✝² : CompleteSpace F\ninst✝¹ : AddGroup G\ninst✝ : SMulCommClass ℝ 𝕜 F\ny : 𝕜\nx✝ : G\n⊢ f ⋆[L, x✝] y • g = (y • convolution f g L) x✝\n[PROOFSTEP]\nsimp only [Pi.smul_apply, convolution_def, ← integral_smul, (L _).map_smul]\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedAddCommGroup E''\ninst✝⁹ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedSpace 𝕜 E\ninst✝⁶ : NormedSpace 𝕜 E'\ninst✝⁵ : NormedSpace 𝕜 E''\ninst✝⁴ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝³ : MeasurableSpace G\nμ ν : Measure G\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\ninst✝ : AddGroup G\n⊢ convolution 0 g L = 0\n[PROOFSTEP]\next\n[GOAL]\ncase h\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedAddCommGroup E''\ninst✝⁹ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedSpace 𝕜 E\ninst✝⁶ : NormedSpace 𝕜 E'\ninst✝⁵ : NormedSpace 𝕜 E''\ninst✝⁴ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝³ : MeasurableSpace G\nμ ν : Measure G\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\ninst✝ : AddGroup G\nx✝ : G\n⊢ 0 ⋆[L, x✝] g = OfNat.ofNat 0 x✝\n[PROOFSTEP]\nsimp_rw [convolution_def, Pi.zero_apply, L.map_zero₂, integral_zero]\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedAddCommGroup E''\ninst✝⁹ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedSpace 𝕜 E\ninst✝⁶ : NormedSpace 𝕜 E'\ninst✝⁵ : NormedSpace 𝕜 E''\ninst✝⁴ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝³ : MeasurableSpace G\nμ ν : Measure G\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\ninst✝ : AddGroup G\n⊢ convolution f 0 L = 0\n[PROOFSTEP]\next\n[GOAL]\ncase h\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedAddCommGroup E''\ninst✝⁹ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedSpace 𝕜 E\ninst✝⁶ : NormedSpace 𝕜 E'\ninst✝⁵ : NormedSpace 𝕜 E''\ninst✝⁴ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝³ : MeasurableSpace G\nμ ν : Measure G\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\ninst✝ : AddGroup G\nx✝ : G\n⊢ f ⋆[L, x✝] 0 = OfNat.ofNat 0 x✝\n[PROOFSTEP]\nsimp_rw [convolution_def, Pi.zero_apply, (L _).map_zero, integral_zero]\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedAddCommGroup E''\ninst✝⁹ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedSpace 𝕜 E\ninst✝⁶ : NormedSpace 𝕜 E'\ninst✝⁵ : NormedSpace 𝕜 E''\ninst✝⁴ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝³ : MeasurableSpace G\nμ ν : Measure G\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\ninst✝ : AddGroup G\nx : G\nhfg : ConvolutionExistsAt f g x L\nhfg' : ConvolutionExistsAt f g' x L\n⊢ f ⋆[L, x] (g + g') = f ⋆[L, x] g + f ⋆[L, x] g'\n[PROOFSTEP]\nsimp only [convolution_def, (L _).map_add, Pi.add_apply, integral_add hfg hfg']\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedAddCommGroup E''\ninst✝⁹ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedSpace 𝕜 E\ninst✝⁶ : NormedSpace 𝕜 E'\ninst✝⁵ : NormedSpace 𝕜 E''\ninst✝⁴ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝³ : MeasurableSpace G\nμ ν : Measure G\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\ninst✝ : AddGroup G\nhfg : ConvolutionExists f g L\nhfg' : ConvolutionExists f g' L\n⊢ convolution f (g + g') L = convolution f g L + convolution f g' L\n[PROOFSTEP]\next x\n[GOAL]\ncase h\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedAddCommGroup E''\ninst✝⁹ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedSpace 𝕜 E\ninst✝⁶ : NormedSpace 𝕜 E'\ninst✝⁵ : NormedSpace 𝕜 E''\ninst✝⁴ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝³ : MeasurableSpace G\nμ ν : Measure G\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\ninst✝ : AddGroup G\nhfg : ConvolutionExists f g L\nhfg' : ConvolutionExists f g' L\nx : G\n⊢ f ⋆[L, x] (g + g') = (convolution f g L + convolution f g' L) x\n[PROOFSTEP]\nexact (hfg x).distrib_add (hfg' x)\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedAddCommGroup E''\ninst✝⁹ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedSpace 𝕜 E\ninst✝⁶ : NormedSpace 𝕜 E'\ninst✝⁵ : NormedSpace 𝕜 E''\ninst✝⁴ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝³ : MeasurableSpace G\nμ ν : Measure G\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\ninst✝ : AddGroup G\nx : G\nhfg : ConvolutionExistsAt f g x L\nhfg' : ConvolutionExistsAt f' g x L\n⊢ (f + f') ⋆[L, x] g = f ⋆[L, x] g + f' ⋆[L, x] g\n[PROOFSTEP]\nsimp only [convolution_def, L.map_add₂, Pi.add_apply, integral_add hfg hfg']\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedAddCommGroup E''\ninst✝⁹ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedSpace 𝕜 E\ninst✝⁶ : NormedSpace 𝕜 E'\ninst✝⁵ : NormedSpace 𝕜 E''\ninst✝⁴ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝³ : MeasurableSpace G\nμ ν : Measure G\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\ninst✝ : AddGroup G\nhfg : ConvolutionExists f g L\nhfg' : ConvolutionExists f' g L\n⊢ convolution (f + f') g L = convolution f g L + convolution f' g L\n[PROOFSTEP]\next x\n[GOAL]\ncase h\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedAddCommGroup E''\ninst✝⁹ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedSpace 𝕜 E\ninst✝⁶ : NormedSpace 𝕜 E'\ninst✝⁵ : NormedSpace 𝕜 E''\ninst✝⁴ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝³ : MeasurableSpace G\nμ ν : Measure G\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\ninst✝ : AddGroup G\nhfg : ConvolutionExists f g L\nhfg' : ConvolutionExists f' g L\nx : G\n⊢ (f + f') ⋆[L, x] g = (convolution f g L + convolution f' g L) x\n[PROOFSTEP]\nexact (hfg x).add_distrib (hfg' x)\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedAddCommGroup E''\ninst✝⁹ : NormedAddCommGroup F\nf✝ f' : G → E\ng✝ g'✝ : G → E'\nx x' : G\ny y' : E\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedSpace 𝕜 E\ninst✝⁶ : NormedSpace 𝕜 E'\ninst✝⁵ : NormedSpace 𝕜 E''\ninst✝⁴ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝³ : MeasurableSpace G\nμ ν : Measure G\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\ninst✝ : AddGroup G\nf g g' : G → ℝ\nhfg : ConvolutionExistsAt f g x (lsmul ℝ ℝ)\nhfg' : ConvolutionExistsAt f g' x (lsmul ℝ ℝ)\nhf : ∀ (x : G), 0 ≤ f x\nhg : ∀ (x : G), g x ≤ g' x\n⊢ f ⋆[lsmul ℝ ℝ, x] g ≤ f ⋆[lsmul ℝ ℝ, x] g'\n[PROOFSTEP]\napply integral_mono hfg hfg'\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedAddCommGroup E''\ninst✝⁹ : NormedAddCommGroup F\nf✝ f' : G → E\ng✝ g'✝ : G → E'\nx x' : G\ny y' : E\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedSpace 𝕜 E\ninst✝⁶ : NormedSpace 𝕜 E'\ninst✝⁵ : NormedSpace 𝕜 E''\ninst✝⁴ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝³ : MeasurableSpace G\nμ ν : Measure G\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\ninst✝ : AddGroup G\nf g g' : G → ℝ\nhfg : ConvolutionExistsAt f g x (lsmul ℝ ℝ)\nhfg' : ConvolutionExistsAt f g' x (lsmul ℝ ℝ)\nhf : ∀ (x : G), 0 ≤ f x\nhg : ∀ (x : G), g x ≤ g' x\n⊢ (fun t => ↑(↑(lsmul ℝ ℝ) (f t)) (g (x - t))) ≤ fun t => ↑(↑(lsmul ℝ ℝ) (f t)) (g' (x - t))\n[PROOFSTEP]\nsimp only [lsmul_apply, Algebra.id.smul_eq_mul]\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedAddCommGroup E''\ninst✝⁹ : NormedAddCommGroup F\nf✝ f' : G → E\ng✝ g'✝ : G → E'\nx x' : G\ny y' : E\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedSpace 𝕜 E\ninst✝⁶ : NormedSpace 𝕜 E'\ninst✝⁵ : NormedSpace 𝕜 E''\ninst✝⁴ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝³ : MeasurableSpace G\nμ ν : Measure G\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\ninst✝ : AddGroup G\nf g g' : G → ℝ\nhfg : ConvolutionExistsAt f g x (lsmul ℝ ℝ)\nhfg' : ConvolutionExistsAt f g' x (lsmul ℝ ℝ)\nhf : ∀ (x : G), 0 ≤ f x\nhg : ∀ (x : G), g x ≤ g' x\n⊢ (fun t => f t * g (x - t)) ≤ fun t => f t * g' (x - t)\n[PROOFSTEP]\nintro t\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedAddCommGroup E''\ninst✝⁹ : NormedAddCommGroup F\nf✝ f' : G → E\ng✝ g'✝ : G → E'\nx x' : G\ny y' : E\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedSpace 𝕜 E\ninst✝⁶ : NormedSpace 𝕜 E'\ninst✝⁵ : NormedSpace 𝕜 E''\ninst✝⁴ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝³ : MeasurableSpace G\nμ ν : Measure G\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\ninst✝ : AddGroup G\nf g g' : G → ℝ\nhfg : ConvolutionExistsAt f g x (lsmul ℝ ℝ)\nhfg' : ConvolutionExistsAt f g' x (lsmul ℝ ℝ)\nhf : ∀ (x : G), 0 ≤ f x\nhg : ∀ (x : G), g x ≤ g' x\nt : G\n⊢ (fun t => f t * g (x - t)) t ≤ (fun t => f t * g' (x - t)) t\n[PROOFSTEP]\napply mul_le_mul_of_nonneg_left (hg _) (hf _)\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedAddCommGroup E''\ninst✝⁹ : NormedAddCommGroup F\nf✝ f' : G → E\ng✝ g'✝ : G → E'\nx x' : G\ny y' : E\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedSpace 𝕜 E\ninst✝⁶ : NormedSpace 𝕜 E'\ninst✝⁵ : NormedSpace 𝕜 E''\ninst✝⁴ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝³ : MeasurableSpace G\nμ ν : Measure G\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\ninst✝ : AddGroup G\nf g g' : G → ℝ\nhfg' : ConvolutionExistsAt f g' x (lsmul ℝ ℝ)\nhf : ∀ (x : G), 0 ≤ f x\nhg : ∀ (x : G), g x ≤ g' x\nhg' : ∀ (x : G), 0 ≤ g' x\n⊢ f ⋆[lsmul ℝ ℝ, x] g ≤ f ⋆[lsmul ℝ ℝ, x] g'\n[PROOFSTEP]\nby_cases H : ConvolutionExistsAt f g x (lsmul ℝ ℝ) μ\n[GOAL]\ncase pos\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedAddCommGroup E''\ninst✝⁹ : NormedAddCommGroup F\nf✝ f' : G → E\ng✝ g'✝ : G → E'\nx x' : G\ny y' : E\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedSpace 𝕜 E\ninst✝⁶ : NormedSpace 𝕜 E'\ninst✝⁵ : NormedSpace 𝕜 E''\ninst✝⁴ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝³ : MeasurableSpace G\nμ ν : Measure G\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\ninst✝ : AddGroup G\nf g g' : G → ℝ\nhfg' : ConvolutionExistsAt f g' x (lsmul ℝ ℝ)\nhf : ∀ (x : G), 0 ≤ f x\nhg : ∀ (x : G), g x ≤ g' x\nhg' : ∀ (x : G), 0 ≤ g' x\nH : ConvolutionExistsAt f g x (lsmul ℝ ℝ)\n⊢ f ⋆[lsmul ℝ ℝ, x] g ≤ f ⋆[lsmul ℝ ℝ, x] g'\n[PROOFSTEP]\nexact convolution_mono_right H hfg' hf hg\n[GOAL]\ncase neg\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedAddCommGroup E''\ninst✝⁹ : NormedAddCommGroup F\nf✝ f' : G → E\ng✝ g'✝ : G → E'\nx x' : G\ny y' : E\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedSpace 𝕜 E\ninst✝⁶ : NormedSpace 𝕜 E'\ninst✝⁵ : NormedSpace 𝕜 E''\ninst✝⁴ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝³ : MeasurableSpace G\nμ ν : Measure G\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\ninst✝ : AddGroup G\nf g g' : G → ℝ\nhfg' : ConvolutionExistsAt f g' x (lsmul ℝ ℝ)\nhf : ∀ (x : G), 0 ≤ f x\nhg : ∀ (x : G), g x ≤ g' x\nhg' : ∀ (x : G), 0 ≤ g' x\nH : ¬ConvolutionExistsAt f g x (lsmul ℝ ℝ)\n⊢ f ⋆[lsmul ℝ ℝ, x] g ≤ f ⋆[lsmul ℝ ℝ, x] g'\n[PROOFSTEP]\nhave : (f ⋆[lsmul ℝ ℝ, μ] g) x = 0 := integral_undef H\n[GOAL]\ncase neg\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedAddCommGroup E''\ninst✝⁹ : NormedAddCommGroup F\nf✝ f' : G → E\ng✝ g'✝ : G → E'\nx x' : G\ny y' : E\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedSpace 𝕜 E\ninst✝⁶ : NormedSpace 𝕜 E'\ninst✝⁵ : NormedSpace 𝕜 E''\ninst✝⁴ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝³ : MeasurableSpace G\nμ ν : Measure G\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\ninst✝ : AddGroup G\nf g g' : G → ℝ\nhfg' : ConvolutionExistsAt f g' x (lsmul ℝ ℝ)\nhf : ∀ (x : G), 0 ≤ f x\nhg : ∀ (x : G), g x ≤ g' x\nhg' : ∀ (x : G), 0 ≤ g' x\nH : ¬ConvolutionExistsAt f g x (lsmul ℝ ℝ)\nthis : f ⋆[lsmul ℝ ℝ, x] g = 0\n⊢ f ⋆[lsmul ℝ ℝ, x] g ≤ f ⋆[lsmul ℝ ℝ, x] g'\n[PROOFSTEP]\nrw [this]\n[GOAL]\ncase neg\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedAddCommGroup E''\ninst✝⁹ : NormedAddCommGroup F\nf✝ f' : G → E\ng✝ g'✝ : G → E'\nx x' : G\ny y' : E\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedSpace 𝕜 E\ninst✝⁶ : NormedSpace 𝕜 E'\ninst✝⁵ : NormedSpace 𝕜 E''\ninst✝⁴ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝³ : MeasurableSpace G\nμ ν : Measure G\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\ninst✝ : AddGroup G\nf g g' : G → ℝ\nhfg' : ConvolutionExistsAt f g' x (lsmul ℝ ℝ)\nhf : ∀ (x : G), 0 ≤ f x\nhg : ∀ (x : G), g x ≤ g' x\nhg' : ∀ (x : G), 0 ≤ g' x\nH : ¬ConvolutionExistsAt f g x (lsmul ℝ ℝ)\nthis : f ⋆[lsmul ℝ ℝ, x] g = 0\n⊢ 0 ≤ f ⋆[lsmul ℝ ℝ, x] g'\n[PROOFSTEP]\nexact integral_nonneg fun y => mul_nonneg (hf y) (hg' (x - y))\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : NontriviallyNormedField 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁷ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁶ : NormedSpace ℝ F\ninst✝⁵ : CompleteSpace F\ninst✝⁴ : AddGroup G\ninst✝³ : MeasurableAdd₂ G\ninst✝² : MeasurableNeg G\ninst✝¹ : SigmaFinite μ\ninst✝ : IsAddRightInvariant μ\nh1 : f =ᶠ[ae μ] f'\nh2 : g =ᶠ[ae μ] g'\n⊢ convolution f g L = convolution f' g' L\n[PROOFSTEP]\next x\n[GOAL]\ncase h\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹² : NontriviallyNormedField 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁷ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁶ : NormedSpace ℝ F\ninst✝⁵ : CompleteSpace F\ninst✝⁴ : AddGroup G\ninst✝³ : MeasurableAdd₂ G\ninst✝² : MeasurableNeg G\ninst✝¹ : SigmaFinite μ\ninst✝ : IsAddRightInvariant μ\nh1 : f =ᶠ[ae μ] f'\nh2 : g =ᶠ[ae μ] g'\nx : G\n⊢ f ⋆[L, x] g = f' ⋆[L, x] g'\n[PROOFSTEP]\napply integral_congr_ae\n[GOAL]\ncase h.h\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹² : NontriviallyNormedField 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁷ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁶ : NormedSpace ℝ F\ninst✝⁵ : CompleteSpace F\ninst✝⁴ : AddGroup G\ninst✝³ : MeasurableAdd₂ G\ninst✝² : MeasurableNeg G\ninst✝¹ : SigmaFinite μ\ninst✝ : IsAddRightInvariant μ\nh1 : f =ᶠ[ae μ] f'\nh2 : g =ᶠ[ae μ] g'\nx : G\n⊢ (fun a => ↑(↑L (f a)) (g (x - a))) =ᶠ[ae μ] fun a => ↑(↑L (f' a)) (g' (x - a))\n[PROOFSTEP]\nexact\n  (h1.prod_mk <| h2.comp_tendsto (quasiMeasurePreserving_sub_left_of_right_invariant μ x).tendsto_ae).fun_comp\n    ↿fun x y => L x y\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedAddCommGroup E''\ninst✝⁹ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedSpace 𝕜 E\ninst✝⁶ : NormedSpace 𝕜 E'\ninst✝⁵ : NormedSpace 𝕜 E''\ninst✝⁴ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝³ : MeasurableSpace G\nμ ν : Measure G\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\ninst✝ : AddGroup G\n⊢ support (convolution f g L) ⊆ support g + support f\n[PROOFSTEP]\nintro x h2x\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedAddCommGroup E''\ninst✝⁹ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedSpace 𝕜 E\ninst✝⁶ : NormedSpace 𝕜 E'\ninst✝⁵ : NormedSpace 𝕜 E''\ninst✝⁴ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝³ : MeasurableSpace G\nμ ν : Measure G\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\ninst✝ : AddGroup G\nx : G\nh2x : x ∈ support (convolution f g L)\n⊢ x ∈ support g + support f\n[PROOFSTEP]\nby_contra hx\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedAddCommGroup E''\ninst✝⁹ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedSpace 𝕜 E\ninst✝⁶ : NormedSpace 𝕜 E'\ninst✝⁵ : NormedSpace 𝕜 E''\ninst✝⁴ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝³ : MeasurableSpace G\nμ ν : Measure G\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\ninst✝ : AddGroup G\nx : G\nh2x : x ∈ support (convolution f g L)\nhx : ¬x ∈ support g + support f\n⊢ False\n[PROOFSTEP]\napply h2x\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedAddCommGroup E''\ninst✝⁹ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedSpace 𝕜 E\ninst✝⁶ : NormedSpace 𝕜 E'\ninst✝⁵ : NormedSpace 𝕜 E''\ninst✝⁴ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝³ : MeasurableSpace G\nμ ν : Measure G\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\ninst✝ : AddGroup G\nx : G\nh2x : x ∈ support (convolution f g L)\nhx : ¬x ∈ support g + support f\n⊢ f ⋆[L, x] g = 0\n[PROOFSTEP]\nsimp_rw [Set.mem_add, not_exists, not_and_or, nmem_support] at hx \n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedAddCommGroup E''\ninst✝⁹ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedSpace 𝕜 E\ninst✝⁶ : NormedSpace 𝕜 E'\ninst✝⁵ : NormedSpace 𝕜 E''\ninst✝⁴ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝³ : MeasurableSpace G\nμ ν : Measure G\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\ninst✝ : AddGroup G\nx : G\nh2x : x ∈ support (convolution f g L)\nhx : ∀ (x_1 x_2 : G), g x_1 = 0 ∨ f x_2 = 0 ∨ ¬x_1 + x_2 = x\n⊢ f ⋆[L, x] g = 0\n[PROOFSTEP]\nrw [convolution_def]\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedAddCommGroup E''\ninst✝⁹ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedSpace 𝕜 E\ninst✝⁶ : NormedSpace 𝕜 E'\ninst✝⁵ : NormedSpace 𝕜 E''\ninst✝⁴ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝³ : MeasurableSpace G\nμ ν : Measure G\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\ninst✝ : AddGroup G\nx : G\nh2x : x ∈ support (convolution f g L)\nhx : ∀ (x_1 x_2 : G), g x_1 = 0 ∨ f x_2 = 0 ∨ ¬x_1 + x_2 = x\n⊢ ∫ (t : G), ↑(↑L (f t)) (g (x - t)) ∂μ = 0\n[PROOFSTEP]\nconvert integral_zero G F using 2\n[GOAL]\ncase h.e'_2.h.e'_7\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedAddCommGroup E''\ninst✝⁹ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedSpace 𝕜 E\ninst✝⁶ : NormedSpace 𝕜 E'\ninst✝⁵ : NormedSpace 𝕜 E''\ninst✝⁴ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝³ : MeasurableSpace G\nμ ν : Measure G\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\ninst✝ : AddGroup G\nx : G\nh2x : x ∈ support (convolution f g L)\nhx : ∀ (x_1 x_2 : G), g x_1 = 0 ∨ f x_2 = 0 ∨ ¬x_1 + x_2 = x\n⊢ (fun t => ↑(↑L (f t)) (g (x - t))) = fun x => 0\n[PROOFSTEP]\next t\n[GOAL]\ncase h.e'_2.h.e'_7.h\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedAddCommGroup E''\ninst✝⁹ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedSpace 𝕜 E\ninst✝⁶ : NormedSpace 𝕜 E'\ninst✝⁵ : NormedSpace 𝕜 E''\ninst✝⁴ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝³ : MeasurableSpace G\nμ ν : Measure G\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\ninst✝ : AddGroup G\nx : G\nh2x : x ∈ support (convolution f g L)\nhx : ∀ (x_1 x_2 : G), g x_1 = 0 ∨ f x_2 = 0 ∨ ¬x_1 + x_2 = x\nt : G\n⊢ ↑(↑L (f t)) (g (x - t)) = 0\n[PROOFSTEP]\nrcases hx (x - t) t with (h | h | h)\n[GOAL]\ncase h.e'_2.h.e'_7.h.inl\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedAddCommGroup E''\ninst✝⁹ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedSpace 𝕜 E\ninst✝⁶ : NormedSpace 𝕜 E'\ninst✝⁵ : NormedSpace 𝕜 E''\ninst✝⁴ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝³ : MeasurableSpace G\nμ ν : Measure G\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\ninst✝ : AddGroup G\nx : G\nh2x : x ∈ support (convolution f g L)\nhx : ∀ (x_1 x_2 : G), g x_1 = 0 ∨ f x_2 = 0 ∨ ¬x_1 + x_2 = x\nt : G\nh : g (x - t) = 0\n⊢ ↑(↑L (f t)) (g (x - t)) = 0\n[PROOFSTEP]\nrw [h, (L _).map_zero]\n[GOAL]\ncase h.e'_2.h.e'_7.h.inr.inl\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedAddCommGroup E''\ninst✝⁹ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedSpace 𝕜 E\ninst✝⁶ : NormedSpace 𝕜 E'\ninst✝⁵ : NormedSpace 𝕜 E''\ninst✝⁴ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝³ : MeasurableSpace G\nμ ν : Measure G\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\ninst✝ : AddGroup G\nx : G\nh2x : x ∈ support (convolution f g L)\nhx : ∀ (x_1 x_2 : G), g x_1 = 0 ∨ f x_2 = 0 ∨ ¬x_1 + x_2 = x\nt : G\nh : f t = 0\n⊢ ↑(↑L (f t)) (g (x - t)) = 0\n[PROOFSTEP]\nrw [h, L.map_zero₂]\n[GOAL]\ncase h.e'_2.h.e'_7.h.inr.inr\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedAddCommGroup E''\ninst✝⁹ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedSpace 𝕜 E\ninst✝⁶ : NormedSpace 𝕜 E'\ninst✝⁵ : NormedSpace 𝕜 E''\ninst✝⁴ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝³ : MeasurableSpace G\nμ ν : Measure G\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\ninst✝ : AddGroup G\nx : G\nh2x : x ∈ support (convolution f g L)\nhx : ∀ (x_1 x_2 : G), g x_1 = 0 ∨ f x_2 = 0 ∨ ¬x_1 + x_2 = x\nt : G\nh : ¬x - t + t = x\n⊢ ↑(↑L (f t)) (g (x - t)) = 0\n[PROOFSTEP]\nexact (h <| sub_add_cancel x t).elim\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : NormedAddCommGroup E'\ninst✝¹⁶ : NormedAddCommGroup E''\ninst✝¹⁵ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁴ : NontriviallyNormedField 𝕜\ninst✝¹³ : NormedSpace 𝕜 E\ninst✝¹² : NormedSpace 𝕜 E'\ninst✝¹¹ : NormedSpace 𝕜 E''\ninst✝¹⁰ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁹ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ninst✝⁶ : AddGroup G\ninst✝⁵ : TopologicalSpace G\ninst✝⁴ : TopologicalAddGroup G\ninst✝³ : BorelSpace G\ninst✝² : FirstCountableTopology G\ninst✝¹ : TopologicalSpace P\ninst✝ : FirstCountableTopology P\ng : P → G → E'\ns : Set P\nk : Set G\nhk : IsCompact k\nh'k : IsClosed k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContinuousOn (↿g) (s ×ˢ univ)\n⊢ ContinuousOn (fun q => f ⋆[L, q.snd] g q.fst) (s ×ˢ univ)\n[PROOFSTEP]\nintro q₀ hq₀\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : NormedAddCommGroup E'\ninst✝¹⁶ : NormedAddCommGroup E''\ninst✝¹⁵ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁴ : NontriviallyNormedField 𝕜\ninst✝¹³ : NormedSpace 𝕜 E\ninst✝¹² : NormedSpace 𝕜 E'\ninst✝¹¹ : NormedSpace 𝕜 E''\ninst✝¹⁰ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁹ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ninst✝⁶ : AddGroup G\ninst✝⁵ : TopologicalSpace G\ninst✝⁴ : TopologicalAddGroup G\ninst✝³ : BorelSpace G\ninst✝² : FirstCountableTopology G\ninst✝¹ : TopologicalSpace P\ninst✝ : FirstCountableTopology P\ng : P → G → E'\ns : Set P\nk : Set G\nhk : IsCompact k\nh'k : IsClosed k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContinuousOn (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀ ∈ s ×ˢ univ\n⊢ ContinuousWithinAt (fun q => f ⋆[L, q.snd] g q.fst) (s ×ˢ univ) q₀\n[PROOFSTEP]\nreplace hq₀ : q₀.1 ∈ s\n[GOAL]\ncase hq₀\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : NormedAddCommGroup E'\ninst✝¹⁶ : NormedAddCommGroup E''\ninst✝¹⁵ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁴ : NontriviallyNormedField 𝕜\ninst✝¹³ : NormedSpace 𝕜 E\ninst✝¹² : NormedSpace 𝕜 E'\ninst✝¹¹ : NormedSpace 𝕜 E''\ninst✝¹⁰ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁹ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ninst✝⁶ : AddGroup G\ninst✝⁵ : TopologicalSpace G\ninst✝⁴ : TopologicalAddGroup G\ninst✝³ : BorelSpace G\ninst✝² : FirstCountableTopology G\ninst✝¹ : TopologicalSpace P\ninst✝ : FirstCountableTopology P\ng : P → G → E'\ns : Set P\nk : Set G\nhk : IsCompact k\nh'k : IsClosed k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContinuousOn (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀ ∈ s ×ˢ univ\n⊢ q₀.fst ∈ s\n[PROOFSTEP]\nsimpa only [mem_prod, mem_univ, and_true] using hq₀\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : NormedAddCommGroup E'\ninst✝¹⁶ : NormedAddCommGroup E''\ninst✝¹⁵ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁴ : NontriviallyNormedField 𝕜\ninst✝¹³ : NormedSpace 𝕜 E\ninst✝¹² : NormedSpace 𝕜 E'\ninst✝¹¹ : NormedSpace 𝕜 E''\ninst✝¹⁰ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁹ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ninst✝⁶ : AddGroup G\ninst✝⁵ : TopologicalSpace G\ninst✝⁴ : TopologicalAddGroup G\ninst✝³ : BorelSpace G\ninst✝² : FirstCountableTopology G\ninst✝¹ : TopologicalSpace P\ninst✝ : FirstCountableTopology P\ng : P → G → E'\ns : Set P\nk : Set G\nhk : IsCompact k\nh'k : IsClosed k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContinuousOn (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\n⊢ ContinuousWithinAt (fun q => f ⋆[L, q.snd] g q.fst) (s ×ˢ univ) q₀\n[PROOFSTEP]\nhave A : ∀ p ∈ s, Continuous (g p) := fun p hp ↦\n  by\n  refine hg.comp_continuous (continuous_const.prod_mk continuous_id') fun x => ?_\n  simpa only [prod_mk_mem_set_prod_eq, mem_univ, and_true] using hp\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : NormedAddCommGroup E'\ninst✝¹⁶ : NormedAddCommGroup E''\ninst✝¹⁵ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁴ : NontriviallyNormedField 𝕜\ninst✝¹³ : NormedSpace 𝕜 E\ninst✝¹² : NormedSpace 𝕜 E'\ninst✝¹¹ : NormedSpace 𝕜 E''\ninst✝¹⁰ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁹ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ninst✝⁶ : AddGroup G\ninst✝⁵ : TopologicalSpace G\ninst✝⁴ : TopologicalAddGroup G\ninst✝³ : BorelSpace G\ninst✝² : FirstCountableTopology G\ninst✝¹ : TopologicalSpace P\ninst✝ : FirstCountableTopology P\ng : P → G → E'\ns : Set P\nk : Set G\nhk : IsCompact k\nh'k : IsClosed k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContinuousOn (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\np : P\nhp : p ∈ s\n⊢ Continuous (g p)\n[PROOFSTEP]\nrefine hg.comp_continuous (continuous_const.prod_mk continuous_id') fun x => ?_\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : NormedAddCommGroup E'\ninst✝¹⁶ : NormedAddCommGroup E''\ninst✝¹⁵ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹⁴ : NontriviallyNormedField 𝕜\ninst✝¹³ : NormedSpace 𝕜 E\ninst✝¹² : NormedSpace 𝕜 E'\ninst✝¹¹ : NormedSpace 𝕜 E''\ninst✝¹⁰ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁹ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ninst✝⁶ : AddGroup G\ninst✝⁵ : TopologicalSpace G\ninst✝⁴ : TopologicalAddGroup G\ninst✝³ : BorelSpace G\ninst✝² : FirstCountableTopology G\ninst✝¹ : TopologicalSpace P\ninst✝ : FirstCountableTopology P\ng : P → G → E'\ns : Set P\nk : Set G\nhk : IsCompact k\nh'k : IsClosed k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContinuousOn (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\np : P\nhp : p ∈ s\nx : G\n⊢ (p, x) ∈ s ×ˢ univ\n[PROOFSTEP]\nsimpa only [prod_mk_mem_set_prod_eq, mem_univ, and_true] using hp\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : NormedAddCommGroup E'\ninst✝¹⁶ : NormedAddCommGroup E''\ninst✝¹⁵ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁴ : NontriviallyNormedField 𝕜\ninst✝¹³ : NormedSpace 𝕜 E\ninst✝¹² : NormedSpace 𝕜 E'\ninst✝¹¹ : NormedSpace 𝕜 E''\ninst✝¹⁰ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁹ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ninst✝⁶ : AddGroup G\ninst✝⁵ : TopologicalSpace G\ninst✝⁴ : TopologicalAddGroup G\ninst✝³ : BorelSpace G\ninst✝² : FirstCountableTopology G\ninst✝¹ : TopologicalSpace P\ninst✝ : FirstCountableTopology P\ng : P → G → E'\ns : Set P\nk : Set G\nhk : IsCompact k\nh'k : IsClosed k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContinuousOn (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\nA : ∀ (p : P), p ∈ s → Continuous (g p)\n⊢ ContinuousWithinAt (fun q => f ⋆[L, q.snd] g q.fst) (s ×ˢ univ) q₀\n[PROOFSTEP]\nhave B : ∀ p ∈ s, tsupport (g p) ⊆ k := fun p hp =>\n  closure_minimal (support_subset_iff'.2 fun z hz => hgs _ _ hp hz) h'k\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : NormedAddCommGroup E'\ninst✝¹⁶ : NormedAddCommGroup E''\ninst✝¹⁵ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁴ : NontriviallyNormedField 𝕜\ninst✝¹³ : NormedSpace 𝕜 E\ninst✝¹² : NormedSpace 𝕜 E'\ninst✝¹¹ : NormedSpace 𝕜 E''\ninst✝¹⁰ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁹ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ninst✝⁶ : AddGroup G\ninst✝⁵ : TopologicalSpace G\ninst✝⁴ : TopologicalAddGroup G\ninst✝³ : BorelSpace G\ninst✝² : FirstCountableTopology G\ninst✝¹ : TopologicalSpace P\ninst✝ : FirstCountableTopology P\ng : P → G → E'\ns : Set P\nk : Set G\nhk : IsCompact k\nh'k : IsClosed k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContinuousOn (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nB : ∀ (p : P), p ∈ s → tsupport (g p) ⊆ k\n⊢ ContinuousWithinAt (fun q => f ⋆[L, q.snd] g q.fst) (s ×ˢ univ) q₀\n[PROOFSTEP]\nobtain ⟨w, C, w_open, q₀w, hw⟩ : ∃ w C, IsOpen w ∧ q₀.1 ∈ w ∧ ∀ p x, p ∈ w ∩ s → ‖g p x‖ ≤ C :=\n  by\n  have A : IsCompact ({q₀.1} ×ˢ k) := isCompact_singleton.prod hk\n  obtain ⟨t, kt, t_open, ht⟩ : ∃ t, {q₀.1} ×ˢ k ⊆ t ∧ IsOpen t ∧ Bounded (↿g '' (t ∩ s ×ˢ univ)) :=\n    by\n    apply exists_isOpen_bounded_image_inter_of_isCompact_of_continuousOn A _ hg\n    simp only [prod_subset_prod_iff, hq₀, singleton_subset_iff, subset_univ, and_self_iff, true_or_iff]\n  obtain ⟨C, Cpos, hC⟩ : ∃ C, 0 < C ∧ ↿g '' (t ∩ s ×ˢ univ) ⊆ closedBall (0 : E') C := ht.subset_ball_lt 0 0\n  obtain ⟨w, w_open, q₀w, hw⟩ : ∃ w, IsOpen w ∧ q₀.1 ∈ w ∧ w ×ˢ k ⊆ t\n  · obtain ⟨w, v, w_open, -, hw, hv, hvw⟩ :\n      ∃ (w : Set P) (v : Set G), IsOpen w ∧ IsOpen v ∧ { q₀.fst } ⊆ w ∧ k ⊆ v ∧ w ×ˢ v ⊆ t\n    exact generalized_tube_lemma isCompact_singleton hk t_open kt\n    exact ⟨w, w_open, singleton_subset_iff.1 hw, Subset.trans (Set.prod_mono Subset.rfl hv) hvw⟩\n  refine' ⟨w, C, w_open, q₀w, _⟩\n  rintro p x ⟨hp, hps⟩\n  by_cases hx : x ∈ k\n  · have H : (p, x) ∈ t := by\n      apply hw\n      simp only [prod_mk_mem_set_prod_eq, hp, hx, and_true_iff]\n    have H' : (p, x) ∈ (s ×ˢ univ : Set (P × G)) := by\n      simpa only [prod_mk_mem_set_prod_eq, mem_univ, and_true_iff] using hps\n    have : g p x ∈ closedBall (0 : E') C := hC (mem_image_of_mem _ (mem_inter H H'))\n    rwa [mem_closedBall_zero_iff] at this \n  · have : g p x = 0 := hgs _ _ hps hx\n    rw [this]\n    simpa only [norm_zero] using Cpos.le\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : NormedAddCommGroup E'\ninst✝¹⁶ : NormedAddCommGroup E''\ninst✝¹⁵ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁴ : NontriviallyNormedField 𝕜\ninst✝¹³ : NormedSpace 𝕜 E\ninst✝¹² : NormedSpace 𝕜 E'\ninst✝¹¹ : NormedSpace 𝕜 E''\ninst✝¹⁰ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁹ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ninst✝⁶ : AddGroup G\ninst✝⁵ : TopologicalSpace G\ninst✝⁴ : TopologicalAddGroup G\ninst✝³ : BorelSpace G\ninst✝² : FirstCountableTopology G\ninst✝¹ : TopologicalSpace P\ninst✝ : FirstCountableTopology P\ng : P → G → E'\ns : Set P\nk : Set G\nhk : IsCompact k\nh'k : IsClosed k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContinuousOn (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nB : ∀ (p : P), p ∈ s → tsupport (g p) ⊆ k\n⊢ ∃ w C, IsOpen w ∧ q₀.fst ∈ w ∧ ∀ (p : P) (x : G), p ∈ w ∩ s → ‖g p x‖ ≤ C\n[PROOFSTEP]\nhave A : IsCompact ({q₀.1} ×ˢ k) := isCompact_singleton.prod hk\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : NormedAddCommGroup E'\ninst✝¹⁶ : NormedAddCommGroup E''\ninst✝¹⁵ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁴ : NontriviallyNormedField 𝕜\ninst✝¹³ : NormedSpace 𝕜 E\ninst✝¹² : NormedSpace 𝕜 E'\ninst✝¹¹ : NormedSpace 𝕜 E''\ninst✝¹⁰ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁹ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ninst✝⁶ : AddGroup G\ninst✝⁵ : TopologicalSpace G\ninst✝⁴ : TopologicalAddGroup G\ninst✝³ : BorelSpace G\ninst✝² : FirstCountableTopology G\ninst✝¹ : TopologicalSpace P\ninst✝ : FirstCountableTopology P\ng : P → G → E'\ns : Set P\nk : Set G\nhk : IsCompact k\nh'k : IsClosed k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContinuousOn (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\nA✝ : ∀ (p : P), p ∈ s → Continuous (g p)\nB : ∀ (p : P), p ∈ s → tsupport (g p) ⊆ k\nA : IsCompact ({q₀.fst} ×ˢ k)\n⊢ ∃ w C, IsOpen w ∧ q₀.fst ∈ w ∧ ∀ (p : P) (x : G), p ∈ w ∩ s → ‖g p x‖ ≤ C\n[PROOFSTEP]\nobtain ⟨t, kt, t_open, ht⟩ : ∃ t, {q₀.1} ×ˢ k ⊆ t ∧ IsOpen t ∧ Bounded (↿g '' (t ∩ s ×ˢ univ)) :=\n  by\n  apply exists_isOpen_bounded_image_inter_of_isCompact_of_continuousOn A _ hg\n  simp only [prod_subset_prod_iff, hq₀, singleton_subset_iff, subset_univ, and_self_iff, true_or_iff]\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : NormedAddCommGroup E'\ninst✝¹⁶ : NormedAddCommGroup E''\ninst✝¹⁵ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁴ : NontriviallyNormedField 𝕜\ninst✝¹³ : NormedSpace 𝕜 E\ninst✝¹² : NormedSpace 𝕜 E'\ninst✝¹¹ : NormedSpace 𝕜 E''\ninst✝¹⁰ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁹ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ninst✝⁶ : AddGroup G\ninst✝⁵ : TopologicalSpace G\ninst✝⁴ : TopologicalAddGroup G\ninst✝³ : BorelSpace G\ninst✝² : FirstCountableTopology G\ninst✝¹ : TopologicalSpace P\ninst✝ : FirstCountableTopology P\ng : P → G → E'\ns : Set P\nk : Set G\nhk : IsCompact k\nh'k : IsClosed k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContinuousOn (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\nA✝ : ∀ (p : P), p ∈ s → Continuous (g p)\nB : ∀ (p : P), p ∈ s → tsupport (g p) ⊆ k\nA : IsCompact ({q₀.fst} ×ˢ k)\n⊢ ∃ t, {q₀.fst} ×ˢ k ⊆ t ∧ IsOpen t ∧ Metric.Bounded (↿g '' (t ∩ s ×ˢ univ))\n[PROOFSTEP]\napply exists_isOpen_bounded_image_inter_of_isCompact_of_continuousOn A _ hg\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : NormedAddCommGroup E'\ninst✝¹⁶ : NormedAddCommGroup E''\ninst✝¹⁵ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁴ : NontriviallyNormedField 𝕜\ninst✝¹³ : NormedSpace 𝕜 E\ninst✝¹² : NormedSpace 𝕜 E'\ninst✝¹¹ : NormedSpace 𝕜 E''\ninst✝¹⁰ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁹ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ninst✝⁶ : AddGroup G\ninst✝⁵ : TopologicalSpace G\ninst✝⁴ : TopologicalAddGroup G\ninst✝³ : BorelSpace G\ninst✝² : FirstCountableTopology G\ninst✝¹ : TopologicalSpace P\ninst✝ : FirstCountableTopology P\ng : P → G → E'\ns : Set P\nk : Set G\nhk : IsCompact k\nh'k : IsClosed k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContinuousOn (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\nA✝ : ∀ (p : P), p ∈ s → Continuous (g p)\nB : ∀ (p : P), p ∈ s → tsupport (g p) ⊆ k\nA : IsCompact ({q₀.fst} ×ˢ k)\n⊢ {q₀.fst} ×ˢ k ⊆ s ×ˢ univ\n[PROOFSTEP]\nsimp only [prod_subset_prod_iff, hq₀, singleton_subset_iff, subset_univ, and_self_iff, true_or_iff]\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : NormedAddCommGroup E'\ninst✝¹⁶ : NormedAddCommGroup E''\ninst✝¹⁵ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁴ : NontriviallyNormedField 𝕜\ninst✝¹³ : NormedSpace 𝕜 E\ninst✝¹² : NormedSpace 𝕜 E'\ninst✝¹¹ : NormedSpace 𝕜 E''\ninst✝¹⁰ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁹ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ninst✝⁶ : AddGroup G\ninst✝⁵ : TopologicalSpace G\ninst✝⁴ : TopologicalAddGroup G\ninst✝³ : BorelSpace G\ninst✝² : FirstCountableTopology G\ninst✝¹ : TopologicalSpace P\ninst✝ : FirstCountableTopology P\ng : P → G → E'\ns : Set P\nk : Set G\nhk : IsCompact k\nh'k : IsClosed k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContinuousOn (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\nA✝ : ∀ (p : P), p ∈ s → Continuous (g p)\nB : ∀ (p : P), p ∈ s → tsupport (g p) ⊆ k\nA : IsCompact ({q₀.fst} ×ˢ k)\nt : Set (P × G)\nkt : {q₀.fst} ×ˢ k ⊆ t\nt_open : IsOpen t\nht : Metric.Bounded (↿g '' (t ∩ s ×ˢ univ))\n⊢ ∃ w C, IsOpen w ∧ q₀.fst ∈ w ∧ ∀ (p : P) (x : G), p ∈ w ∩ s → ‖g p x‖ ≤ C\n[PROOFSTEP]\nobtain ⟨C, Cpos, hC⟩ : ∃ C, 0 < C ∧ ↿g '' (t ∩ s ×ˢ univ) ⊆ closedBall (0 : E') C := ht.subset_ball_lt 0 0\n[GOAL]\ncase intro.intro.intro.intro.intro\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : NormedAddCommGroup E'\ninst✝¹⁶ : NormedAddCommGroup E''\ninst✝¹⁵ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁴ : NontriviallyNormedField 𝕜\ninst✝¹³ : NormedSpace 𝕜 E\ninst✝¹² : NormedSpace 𝕜 E'\ninst✝¹¹ : NormedSpace 𝕜 E''\ninst✝¹⁰ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁹ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ninst✝⁶ : AddGroup G\ninst✝⁵ : TopologicalSpace G\ninst✝⁴ : TopologicalAddGroup G\ninst✝³ : BorelSpace G\ninst✝² : FirstCountableTopology G\ninst✝¹ : TopologicalSpace P\ninst✝ : FirstCountableTopology P\ng : P → G → E'\ns : Set P\nk : Set G\nhk : IsCompact k\nh'k : IsClosed k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContinuousOn (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\nA✝ : ∀ (p : P), p ∈ s → Continuous (g p)\nB : ∀ (p : P), p ∈ s → tsupport (g p) ⊆ k\nA : IsCompact ({q₀.fst} ×ˢ k)\nt : Set (P × G)\nkt : {q₀.fst} ×ˢ k ⊆ t\nt_open : IsOpen t\nht : Metric.Bounded (↿g '' (t ∩ s ×ˢ univ))\nC : ℝ\nCpos : 0 < C\nhC : ↿g '' (t ∩ s ×ˢ univ) ⊆ closedBall 0 C\n⊢ ∃ w C, IsOpen w ∧ q₀.fst ∈ w ∧ ∀ (p : P) (x : G), p ∈ w ∩ s → ‖g p x‖ ≤ C\n[PROOFSTEP]\nobtain ⟨w, w_open, q₀w, hw⟩ : ∃ w, IsOpen w ∧ q₀.1 ∈ w ∧ w ×ˢ k ⊆ t\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : NormedAddCommGroup E'\ninst✝¹⁶ : NormedAddCommGroup E''\ninst✝¹⁵ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁴ : NontriviallyNormedField 𝕜\ninst✝¹³ : NormedSpace 𝕜 E\ninst✝¹² : NormedSpace 𝕜 E'\ninst✝¹¹ : NormedSpace 𝕜 E''\ninst✝¹⁰ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁹ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ninst✝⁶ : AddGroup G\ninst✝⁵ : TopologicalSpace G\ninst✝⁴ : TopologicalAddGroup G\ninst✝³ : BorelSpace G\ninst✝² : FirstCountableTopology G\ninst✝¹ : TopologicalSpace P\ninst✝ : FirstCountableTopology P\ng : P → G → E'\ns : Set P\nk : Set G\nhk : IsCompact k\nh'k : IsClosed k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContinuousOn (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\nA✝ : ∀ (p : P), p ∈ s → Continuous (g p)\nB : ∀ (p : P), p ∈ s → tsupport (g p) ⊆ k\nA : IsCompact ({q₀.fst} ×ˢ k)\nt : Set (P × G)\nkt : {q₀.fst} ×ˢ k ⊆ t\nt_open : IsOpen t\nht : Metric.Bounded (↿g '' (t ∩ s ×ˢ univ))\nC : ℝ\nCpos : 0 < C\nhC : ↿g '' (t ∩ s ×ˢ univ) ⊆ closedBall 0 C\n⊢ ∃ w, IsOpen w ∧ q₀.fst ∈ w ∧ w ×ˢ k ⊆ t\n[PROOFSTEP]\nobtain ⟨w, v, w_open, -, hw, hv, hvw⟩ :\n  ∃ (w : Set P) (v : Set G), IsOpen w ∧ IsOpen v ∧ { q₀.fst } ⊆ w ∧ k ⊆ v ∧ w ×ˢ v ⊆ t\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : NormedAddCommGroup E'\ninst✝¹⁶ : NormedAddCommGroup E''\ninst✝¹⁵ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁴ : NontriviallyNormedField 𝕜\ninst✝¹³ : NormedSpace 𝕜 E\ninst✝¹² : NormedSpace 𝕜 E'\ninst✝¹¹ : NormedSpace 𝕜 E''\ninst✝¹⁰ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁹ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ninst✝⁶ : AddGroup G\ninst✝⁵ : TopologicalSpace G\ninst✝⁴ : TopologicalAddGroup G\ninst✝³ : BorelSpace G\ninst✝² : FirstCountableTopology G\ninst✝¹ : TopologicalSpace P\ninst✝ : FirstCountableTopology P\ng : P → G → E'\ns : Set P\nk : Set G\nhk : IsCompact k\nh'k : IsClosed k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContinuousOn (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\nA✝ : ∀ (p : P), p ∈ s → Continuous (g p)\nB : ∀ (p : P), p ∈ s → tsupport (g p) ⊆ k\nA : IsCompact ({q₀.fst} ×ˢ k)\nt : Set (P × G)\nkt : {q₀.fst} ×ˢ k ⊆ t\nt_open : IsOpen t\nht : Metric.Bounded (↿g '' (t ∩ s ×ˢ univ))\nC : ℝ\nCpos : 0 < C\nhC : ↿g '' (t ∩ s ×ˢ univ) ⊆ closedBall 0 C\n⊢ ∃ w v, IsOpen w ∧ IsOpen v ∧ {q₀.fst} ⊆ w ∧ k ⊆ v ∧ w ×ˢ v ⊆ t\ncase intro.intro.intro.intro.intro.intro\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : NormedAddCommGroup E'\ninst✝¹⁶ : NormedAddCommGroup E''\ninst✝¹⁵ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁴ : NontriviallyNormedField 𝕜\ninst✝¹³ : NormedSpace 𝕜 E\ninst✝¹² : NormedSpace 𝕜 E'\ninst✝¹¹ : NormedSpace 𝕜 E''\ninst✝¹⁰ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁹ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ninst✝⁶ : AddGroup G\ninst✝⁵ : TopologicalSpace G\ninst✝⁴ : TopologicalAddGroup G\ninst✝³ : BorelSpace G\ninst✝² : FirstCountableTopology G\ninst✝¹ : TopologicalSpace P\ninst✝ : FirstCountableTopology P\ng : P → G → E'\ns : Set P\nk : Set G\nhk : IsCompact k\nh'k : IsClosed k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContinuousOn (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\nA✝ : ∀ (p : P), p ∈ s → Continuous (g p)\nB : ∀ (p : P), p ∈ s → tsupport (g p) ⊆ k\nA : IsCompact ({q₀.fst} ×ˢ k)\nt : Set (P × G)\nkt : {q₀.fst} ×ˢ k ⊆ t\nt_open : IsOpen t\nht : Metric.Bounded (↿g '' (t ∩ s ×ˢ univ))\nC : ℝ\nCpos : 0 < C\nhC : ↿g '' (t ∩ s ×ˢ univ) ⊆ closedBall 0 C\nw : Set P\nv : Set G\nw_open : IsOpen w\nhw : {q₀.fst} ⊆ w\nhv : k ⊆ v\nhvw : w ×ˢ v ⊆ t\n⊢ ∃ w, IsOpen w ∧ q₀.fst ∈ w ∧ w ×ˢ k ⊆ t\n[PROOFSTEP]\nexact generalized_tube_lemma isCompact_singleton hk t_open kt\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : NormedAddCommGroup E'\ninst✝¹⁶ : NormedAddCommGroup E''\ninst✝¹⁵ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁴ : NontriviallyNormedField 𝕜\ninst✝¹³ : NormedSpace 𝕜 E\ninst✝¹² : NormedSpace 𝕜 E'\ninst✝¹¹ : NormedSpace 𝕜 E''\ninst✝¹⁰ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁹ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ninst✝⁶ : AddGroup G\ninst✝⁵ : TopologicalSpace G\ninst✝⁴ : TopologicalAddGroup G\ninst✝³ : BorelSpace G\ninst✝² : FirstCountableTopology G\ninst✝¹ : TopologicalSpace P\ninst✝ : FirstCountableTopology P\ng : P → G → E'\ns : Set P\nk : Set G\nhk : IsCompact k\nh'k : IsClosed k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContinuousOn (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\nA✝ : ∀ (p : P), p ∈ s → Continuous (g p)\nB : ∀ (p : P), p ∈ s → tsupport (g p) ⊆ k\nA : IsCompact ({q₀.fst} ×ˢ k)\nt : Set (P × G)\nkt : {q₀.fst} ×ˢ k ⊆ t\nt_open : IsOpen t\nht : Metric.Bounded (↿g '' (t ∩ s ×ˢ univ))\nC : ℝ\nCpos : 0 < C\nhC : ↿g '' (t ∩ s ×ˢ univ) ⊆ closedBall 0 C\nw : Set P\nv : Set G\nw_open : IsOpen w\nhw : {q₀.fst} ⊆ w\nhv : k ⊆ v\nhvw : w ×ˢ v ⊆ t\n⊢ ∃ w, IsOpen w ∧ q₀.fst ∈ w ∧ w ×ˢ k ⊆ t\n[PROOFSTEP]\nexact ⟨w, w_open, singleton_subset_iff.1 hw, Subset.trans (Set.prod_mono Subset.rfl hv) hvw⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : NormedAddCommGroup E'\ninst✝¹⁶ : NormedAddCommGroup E''\ninst✝¹⁵ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁴ : NontriviallyNormedField 𝕜\ninst✝¹³ : NormedSpace 𝕜 E\ninst✝¹² : NormedSpace 𝕜 E'\ninst✝¹¹ : NormedSpace 𝕜 E''\ninst✝¹⁰ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁹ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ninst✝⁶ : AddGroup G\ninst✝⁵ : TopologicalSpace G\ninst✝⁴ : TopologicalAddGroup G\ninst✝³ : BorelSpace G\ninst✝² : FirstCountableTopology G\ninst✝¹ : TopologicalSpace P\ninst✝ : FirstCountableTopology P\ng : P → G → E'\ns : Set P\nk : Set G\nhk : IsCompact k\nh'k : IsClosed k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContinuousOn (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\nA✝ : ∀ (p : P), p ∈ s → Continuous (g p)\nB : ∀ (p : P), p ∈ s → tsupport (g p) ⊆ k\nA : IsCompact ({q₀.fst} ×ˢ k)\nt : Set (P × G)\nkt : {q₀.fst} ×ˢ k ⊆ t\nt_open : IsOpen t\nht : Metric.Bounded (↿g '' (t ∩ s ×ˢ univ))\nC : ℝ\nCpos : 0 < C\nhC : ↿g '' (t ∩ s ×ˢ univ) ⊆ closedBall 0 C\nw : Set P\nw_open : IsOpen w\nq₀w : q₀.fst ∈ w\nhw : w ×ˢ k ⊆ t\n⊢ ∃ w C, IsOpen w ∧ q₀.fst ∈ w ∧ ∀ (p : P) (x : G), p ∈ w ∩ s → ‖g p x‖ ≤ C\n[PROOFSTEP]\nrefine' ⟨w, C, w_open, q₀w, _⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : NormedAddCommGroup E'\ninst✝¹⁶ : NormedAddCommGroup E''\ninst✝¹⁵ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁴ : NontriviallyNormedField 𝕜\ninst✝¹³ : NormedSpace 𝕜 E\ninst✝¹² : NormedSpace 𝕜 E'\ninst✝¹¹ : NormedSpace 𝕜 E''\ninst✝¹⁰ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁹ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ninst✝⁶ : AddGroup G\ninst✝⁵ : TopologicalSpace G\ninst✝⁴ : TopologicalAddGroup G\ninst✝³ : BorelSpace G\ninst✝² : FirstCountableTopology G\ninst✝¹ : TopologicalSpace P\ninst✝ : FirstCountableTopology P\ng : P → G → E'\ns : Set P\nk : Set G\nhk : IsCompact k\nh'k : IsClosed k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContinuousOn (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\nA✝ : ∀ (p : P), p ∈ s → Continuous (g p)\nB : ∀ (p : P), p ∈ s → tsupport (g p) ⊆ k\nA : IsCompact ({q₀.fst} ×ˢ k)\nt : Set (P × G)\nkt : {q₀.fst} ×ˢ k ⊆ t\nt_open : IsOpen t\nht : Metric.Bounded (↿g '' (t ∩ s ×ˢ univ))\nC : ℝ\nCpos : 0 < C\nhC : ↿g '' (t ∩ s ×ˢ univ) ⊆ closedBall 0 C\nw : Set P\nw_open : IsOpen w\nq₀w : q₀.fst ∈ w\nhw : w ×ˢ k ⊆ t\n⊢ ∀ (p : P) (x : G), p ∈ w ∩ s → ‖g p x‖ ≤ C\n[PROOFSTEP]\nrintro p x ⟨hp, hps⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : NormedAddCommGroup E'\ninst✝¹⁶ : NormedAddCommGroup E''\ninst✝¹⁵ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹⁴ : NontriviallyNormedField 𝕜\ninst✝¹³ : NormedSpace 𝕜 E\ninst✝¹² : NormedSpace 𝕜 E'\ninst✝¹¹ : NormedSpace 𝕜 E''\ninst✝¹⁰ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁹ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ninst✝⁶ : AddGroup G\ninst✝⁵ : TopologicalSpace G\ninst✝⁴ : TopologicalAddGroup G\ninst✝³ : BorelSpace G\ninst✝² : FirstCountableTopology G\ninst✝¹ : TopologicalSpace P\ninst✝ : FirstCountableTopology P\ng : P → G → E'\ns : Set P\nk : Set G\nhk : IsCompact k\nh'k : IsClosed k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContinuousOn (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\nA✝ : ∀ (p : P), p ∈ s → Continuous (g p)\nB : ∀ (p : P), p ∈ s → tsupport (g p) ⊆ k\nA : IsCompact ({q₀.fst} ×ˢ k)\nt : Set (P × G)\nkt : {q₀.fst} ×ˢ k ⊆ t\nt_open : IsOpen t\nht : Metric.Bounded (↿g '' (t ∩ s ×ˢ univ))\nC : ℝ\nCpos : 0 < C\nhC : ↿g '' (t ∩ s ×ˢ univ) ⊆ closedBall 0 C\nw : Set P\nw_open : IsOpen w\nq₀w : q₀.fst ∈ w\nhw : w ×ˢ k ⊆ t\np : P\nx : G\nhp : p ∈ w\nhps : p ∈ s\n⊢ ‖g p x‖ ≤ C\n[PROOFSTEP]\nby_cases hx : x ∈ k\n[GOAL]\ncase pos\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : NormedAddCommGroup E'\ninst✝¹⁶ : NormedAddCommGroup E''\ninst✝¹⁵ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹⁴ : NontriviallyNormedField 𝕜\ninst✝¹³ : NormedSpace 𝕜 E\ninst✝¹² : NormedSpace 𝕜 E'\ninst✝¹¹ : NormedSpace 𝕜 E''\ninst✝¹⁰ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁹ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ninst✝⁶ : AddGroup G\ninst✝⁵ : TopologicalSpace G\ninst✝⁴ : TopologicalAddGroup G\ninst✝³ : BorelSpace G\ninst✝² : FirstCountableTopology G\ninst✝¹ : TopologicalSpace P\ninst✝ : FirstCountableTopology P\ng : P → G → E'\ns : Set P\nk : Set G\nhk : IsCompact k\nh'k : IsClosed k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContinuousOn (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\nA✝ : ∀ (p : P), p ∈ s → Continuous (g p)\nB : ∀ (p : P), p ∈ s → tsupport (g p) ⊆ k\nA : IsCompact ({q₀.fst} ×ˢ k)\nt : Set (P × G)\nkt : {q₀.fst} ×ˢ k ⊆ t\nt_open : IsOpen t\nht : Metric.Bounded (↿g '' (t ∩ s ×ˢ univ))\nC : ℝ\nCpos : 0 < C\nhC : ↿g '' (t ∩ s ×ˢ univ) ⊆ closedBall 0 C\nw : Set P\nw_open : IsOpen w\nq₀w : q₀.fst ∈ w\nhw : w ×ˢ k ⊆ t\np : P\nx : G\nhp : p ∈ w\nhps : p ∈ s\nhx : x ∈ k\n⊢ ‖g p x‖ ≤ C\n[PROOFSTEP]\nhave H : (p, x) ∈ t := by\n  apply hw\n  simp only [prod_mk_mem_set_prod_eq, hp, hx, and_true_iff]\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : NormedAddCommGroup E'\ninst✝¹⁶ : NormedAddCommGroup E''\ninst✝¹⁵ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹⁴ : NontriviallyNormedField 𝕜\ninst✝¹³ : NormedSpace 𝕜 E\ninst✝¹² : NormedSpace 𝕜 E'\ninst✝¹¹ : NormedSpace 𝕜 E''\ninst✝¹⁰ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁹ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ninst✝⁶ : AddGroup G\ninst✝⁵ : TopologicalSpace G\ninst✝⁴ : TopologicalAddGroup G\ninst✝³ : BorelSpace G\ninst✝² : FirstCountableTopology G\ninst✝¹ : TopologicalSpace P\ninst✝ : FirstCountableTopology P\ng : P → G → E'\ns : Set P\nk : Set G\nhk : IsCompact k\nh'k : IsClosed k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContinuousOn (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\nA✝ : ∀ (p : P), p ∈ s → Continuous (g p)\nB : ∀ (p : P), p ∈ s → tsupport (g p) ⊆ k\nA : IsCompact ({q₀.fst} ×ˢ k)\nt : Set (P × G)\nkt : {q₀.fst} ×ˢ k ⊆ t\nt_open : IsOpen t\nht : Metric.Bounded (↿g '' (t ∩ s ×ˢ univ))\nC : ℝ\nCpos : 0 < C\nhC : ↿g '' (t ∩ s ×ˢ univ) ⊆ closedBall 0 C\nw : Set P\nw_open : IsOpen w\nq₀w : q₀.fst ∈ w\nhw : w ×ˢ k ⊆ t\np : P\nx : G\nhp : p ∈ w\nhps : p ∈ s\nhx : x ∈ k\n⊢ (p, x) ∈ t\n[PROOFSTEP]\napply hw\n[GOAL]\ncase a\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : NormedAddCommGroup E'\ninst✝¹⁶ : NormedAddCommGroup E''\ninst✝¹⁵ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹⁴ : NontriviallyNormedField 𝕜\ninst✝¹³ : NormedSpace 𝕜 E\ninst✝¹² : NormedSpace 𝕜 E'\ninst✝¹¹ : NormedSpace 𝕜 E''\ninst✝¹⁰ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁹ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ninst✝⁶ : AddGroup G\ninst✝⁵ : TopologicalSpace G\ninst✝⁴ : TopologicalAddGroup G\ninst✝³ : BorelSpace G\ninst✝² : FirstCountableTopology G\ninst✝¹ : TopologicalSpace P\ninst✝ : FirstCountableTopology P\ng : P → G → E'\ns : Set P\nk : Set G\nhk : IsCompact k\nh'k : IsClosed k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContinuousOn (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\nA✝ : ∀ (p : P), p ∈ s → Continuous (g p)\nB : ∀ (p : P), p ∈ s → tsupport (g p) ⊆ k\nA : IsCompact ({q₀.fst} ×ˢ k)\nt : Set (P × G)\nkt : {q₀.fst} ×ˢ k ⊆ t\nt_open : IsOpen t\nht : Metric.Bounded (↿g '' (t ∩ s ×ˢ univ))\nC : ℝ\nCpos : 0 < C\nhC : ↿g '' (t ∩ s ×ˢ univ) ⊆ closedBall 0 C\nw : Set P\nw_open : IsOpen w\nq₀w : q₀.fst ∈ w\nhw : w ×ˢ k ⊆ t\np : P\nx : G\nhp : p ∈ w\nhps : p ∈ s\nhx : x ∈ k\n⊢ (p, x) ∈ w ×ˢ k\n[PROOFSTEP]\nsimp only [prod_mk_mem_set_prod_eq, hp, hx, and_true_iff]\n[GOAL]\ncase pos\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : NormedAddCommGroup E'\ninst✝¹⁶ : NormedAddCommGroup E''\ninst✝¹⁵ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹⁴ : NontriviallyNormedField 𝕜\ninst✝¹³ : NormedSpace 𝕜 E\ninst✝¹² : NormedSpace 𝕜 E'\ninst✝¹¹ : NormedSpace 𝕜 E''\ninst✝¹⁰ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁹ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ninst✝⁶ : AddGroup G\ninst✝⁵ : TopologicalSpace G\ninst✝⁴ : TopologicalAddGroup G\ninst✝³ : BorelSpace G\ninst✝² : FirstCountableTopology G\ninst✝¹ : TopologicalSpace P\ninst✝ : FirstCountableTopology P\ng : P → G → E'\ns : Set P\nk : Set G\nhk : IsCompact k\nh'k : IsClosed k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContinuousOn (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\nA✝ : ∀ (p : P), p ∈ s → Continuous (g p)\nB : ∀ (p : P), p ∈ s → tsupport (g p) ⊆ k\nA : IsCompact ({q₀.fst} ×ˢ k)\nt : Set (P × G)\nkt : {q₀.fst} ×ˢ k ⊆ t\nt_open : IsOpen t\nht : Metric.Bounded (↿g '' (t ∩ s ×ˢ univ))\nC : ℝ\nCpos : 0 < C\nhC : ↿g '' (t ∩ s ×ˢ univ) ⊆ closedBall 0 C\nw : Set P\nw_open : IsOpen w\nq₀w : q₀.fst ∈ w\nhw : w ×ˢ k ⊆ t\np : P\nx : G\nhp : p ∈ w\nhps : p ∈ s\nhx : x ∈ k\nH : (p, x) ∈ t\n⊢ ‖g p x‖ ≤ C\n[PROOFSTEP]\nhave H' : (p, x) ∈ (s ×ˢ univ : Set (P × G)) := by\n  simpa only [prod_mk_mem_set_prod_eq, mem_univ, and_true_iff] using hps\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : NormedAddCommGroup E'\ninst✝¹⁶ : NormedAddCommGroup E''\ninst✝¹⁵ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹⁴ : NontriviallyNormedField 𝕜\ninst✝¹³ : NormedSpace 𝕜 E\ninst✝¹² : NormedSpace 𝕜 E'\ninst✝¹¹ : NormedSpace 𝕜 E''\ninst✝¹⁰ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁹ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ninst✝⁶ : AddGroup G\ninst✝⁵ : TopologicalSpace G\ninst✝⁴ : TopologicalAddGroup G\ninst✝³ : BorelSpace G\ninst✝² : FirstCountableTopology G\ninst✝¹ : TopologicalSpace P\ninst✝ : FirstCountableTopology P\ng : P → G → E'\ns : Set P\nk : Set G\nhk : IsCompact k\nh'k : IsClosed k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContinuousOn (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\nA✝ : ∀ (p : P), p ∈ s → Continuous (g p)\nB : ∀ (p : P), p ∈ s → tsupport (g p) ⊆ k\nA : IsCompact ({q₀.fst} ×ˢ k)\nt : Set (P × G)\nkt : {q₀.fst} ×ˢ k ⊆ t\nt_open : IsOpen t\nht : Metric.Bounded (↿g '' (t ∩ s ×ˢ univ))\nC : ℝ\nCpos : 0 < C\nhC : ↿g '' (t ∩ s ×ˢ univ) ⊆ closedBall 0 C\nw : Set P\nw_open : IsOpen w\nq₀w : q₀.fst ∈ w\nhw : w ×ˢ k ⊆ t\np : P\nx : G\nhp : p ∈ w\nhps : p ∈ s\nhx : x ∈ k\nH : (p, x) ∈ t\n⊢ (p, x) ∈ s ×ˢ univ\n[PROOFSTEP]\nsimpa only [prod_mk_mem_set_prod_eq, mem_univ, and_true_iff] using hps\n[GOAL]\ncase pos\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : NormedAddCommGroup E'\ninst✝¹⁶ : NormedAddCommGroup E''\ninst✝¹⁵ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹⁴ : NontriviallyNormedField 𝕜\ninst✝¹³ : NormedSpace 𝕜 E\ninst✝¹² : NormedSpace 𝕜 E'\ninst✝¹¹ : NormedSpace 𝕜 E''\ninst✝¹⁰ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁹ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ninst✝⁶ : AddGroup G\ninst✝⁵ : TopologicalSpace G\ninst✝⁴ : TopologicalAddGroup G\ninst✝³ : BorelSpace G\ninst✝² : FirstCountableTopology G\ninst✝¹ : TopologicalSpace P\ninst✝ : FirstCountableTopology P\ng : P → G → E'\ns : Set P\nk : Set G\nhk : IsCompact k\nh'k : IsClosed k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContinuousOn (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\nA✝ : ∀ (p : P), p ∈ s → Continuous (g p)\nB : ∀ (p : P), p ∈ s → tsupport (g p) ⊆ k\nA : IsCompact ({q₀.fst} ×ˢ k)\nt : Set (P × G)\nkt : {q₀.fst} ×ˢ k ⊆ t\nt_open : IsOpen t\nht : Metric.Bounded (↿g '' (t ∩ s ×ˢ univ))\nC : ℝ\nCpos : 0 < C\nhC : ↿g '' (t ∩ s ×ˢ univ) ⊆ closedBall 0 C\nw : Set P\nw_open : IsOpen w\nq₀w : q₀.fst ∈ w\nhw : w ×ˢ k ⊆ t\np : P\nx : G\nhp : p ∈ w\nhps : p ∈ s\nhx : x ∈ k\nH : (p, x) ∈ t\nH' : (p, x) ∈ s ×ˢ univ\n⊢ ‖g p x‖ ≤ C\n[PROOFSTEP]\nhave : g p x ∈ closedBall (0 : E') C := hC (mem_image_of_mem _ (mem_inter H H'))\n[GOAL]\ncase pos\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : NormedAddCommGroup E'\ninst✝¹⁶ : NormedAddCommGroup E''\ninst✝¹⁵ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹⁴ : NontriviallyNormedField 𝕜\ninst✝¹³ : NormedSpace 𝕜 E\ninst✝¹² : NormedSpace 𝕜 E'\ninst✝¹¹ : NormedSpace 𝕜 E''\ninst✝¹⁰ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁹ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ninst✝⁶ : AddGroup G\ninst✝⁵ : TopologicalSpace G\ninst✝⁴ : TopologicalAddGroup G\ninst✝³ : BorelSpace G\ninst✝² : FirstCountableTopology G\ninst✝¹ : TopologicalSpace P\ninst✝ : FirstCountableTopology P\ng : P → G → E'\ns : Set P\nk : Set G\nhk : IsCompact k\nh'k : IsClosed k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContinuousOn (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\nA✝ : ∀ (p : P), p ∈ s → Continuous (g p)\nB : ∀ (p : P), p ∈ s → tsupport (g p) ⊆ k\nA : IsCompact ({q₀.fst} ×ˢ k)\nt : Set (P × G)\nkt : {q₀.fst} ×ˢ k ⊆ t\nt_open : IsOpen t\nht : Metric.Bounded (↿g '' (t ∩ s ×ˢ univ))\nC : ℝ\nCpos : 0 < C\nhC : ↿g '' (t ∩ s ×ˢ univ) ⊆ closedBall 0 C\nw : Set P\nw_open : IsOpen w\nq₀w : q₀.fst ∈ w\nhw : w ×ˢ k ⊆ t\np : P\nx : G\nhp : p ∈ w\nhps : p ∈ s\nhx : x ∈ k\nH : (p, x) ∈ t\nH' : (p, x) ∈ s ×ˢ univ\nthis : g p x ∈ closedBall 0 C\n⊢ ‖g p x‖ ≤ C\n[PROOFSTEP]\nrwa [mem_closedBall_zero_iff] at this \n[GOAL]\ncase neg\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : NormedAddCommGroup E'\ninst✝¹⁶ : NormedAddCommGroup E''\ninst✝¹⁵ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹⁴ : NontriviallyNormedField 𝕜\ninst✝¹³ : NormedSpace 𝕜 E\ninst✝¹² : NormedSpace 𝕜 E'\ninst✝¹¹ : NormedSpace 𝕜 E''\ninst✝¹⁰ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁹ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ninst✝⁶ : AddGroup G\ninst✝⁵ : TopologicalSpace G\ninst✝⁴ : TopologicalAddGroup G\ninst✝³ : BorelSpace G\ninst✝² : FirstCountableTopology G\ninst✝¹ : TopologicalSpace P\ninst✝ : FirstCountableTopology P\ng : P → G → E'\ns : Set P\nk : Set G\nhk : IsCompact k\nh'k : IsClosed k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContinuousOn (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\nA✝ : ∀ (p : P), p ∈ s → Continuous (g p)\nB : ∀ (p : P), p ∈ s → tsupport (g p) ⊆ k\nA : IsCompact ({q₀.fst} ×ˢ k)\nt : Set (P × G)\nkt : {q₀.fst} ×ˢ k ⊆ t\nt_open : IsOpen t\nht : Metric.Bounded (↿g '' (t ∩ s ×ˢ univ))\nC : ℝ\nCpos : 0 < C\nhC : ↿g '' (t ∩ s ×ˢ univ) ⊆ closedBall 0 C\nw : Set P\nw_open : IsOpen w\nq₀w : q₀.fst ∈ w\nhw : w ×ˢ k ⊆ t\np : P\nx : G\nhp : p ∈ w\nhps : p ∈ s\nhx : ¬x ∈ k\n⊢ ‖g p x‖ ≤ C\n[PROOFSTEP]\nhave : g p x = 0 := hgs _ _ hps hx\n[GOAL]\ncase neg\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : NormedAddCommGroup E'\ninst✝¹⁶ : NormedAddCommGroup E''\ninst✝¹⁵ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹⁴ : NontriviallyNormedField 𝕜\ninst✝¹³ : NormedSpace 𝕜 E\ninst✝¹² : NormedSpace 𝕜 E'\ninst✝¹¹ : NormedSpace 𝕜 E''\ninst✝¹⁰ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁹ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ninst✝⁶ : AddGroup G\ninst✝⁵ : TopologicalSpace G\ninst✝⁴ : TopologicalAddGroup G\ninst✝³ : BorelSpace G\ninst✝² : FirstCountableTopology G\ninst✝¹ : TopologicalSpace P\ninst✝ : FirstCountableTopology P\ng : P → G → E'\ns : Set P\nk : Set G\nhk : IsCompact k\nh'k : IsClosed k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContinuousOn (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\nA✝ : ∀ (p : P), p ∈ s → Continuous (g p)\nB : ∀ (p : P), p ∈ s → tsupport (g p) ⊆ k\nA : IsCompact ({q₀.fst} ×ˢ k)\nt : Set (P × G)\nkt : {q₀.fst} ×ˢ k ⊆ t\nt_open : IsOpen t\nht : Metric.Bounded (↿g '' (t ∩ s ×ˢ univ))\nC : ℝ\nCpos : 0 < C\nhC : ↿g '' (t ∩ s ×ˢ univ) ⊆ closedBall 0 C\nw : Set P\nw_open : IsOpen w\nq₀w : q₀.fst ∈ w\nhw : w ×ˢ k ⊆ t\np : P\nx : G\nhp : p ∈ w\nhps : p ∈ s\nhx : ¬x ∈ k\nthis : g p x = 0\n⊢ ‖g p x‖ ≤ C\n[PROOFSTEP]\nrw [this]\n[GOAL]\ncase neg\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : NormedAddCommGroup E'\ninst✝¹⁶ : NormedAddCommGroup E''\ninst✝¹⁵ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹⁴ : NontriviallyNormedField 𝕜\ninst✝¹³ : NormedSpace 𝕜 E\ninst✝¹² : NormedSpace 𝕜 E'\ninst✝¹¹ : NormedSpace 𝕜 E''\ninst✝¹⁰ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁹ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ninst✝⁶ : AddGroup G\ninst✝⁵ : TopologicalSpace G\ninst✝⁴ : TopologicalAddGroup G\ninst✝³ : BorelSpace G\ninst✝² : FirstCountableTopology G\ninst✝¹ : TopologicalSpace P\ninst✝ : FirstCountableTopology P\ng : P → G → E'\ns : Set P\nk : Set G\nhk : IsCompact k\nh'k : IsClosed k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContinuousOn (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\nA✝ : ∀ (p : P), p ∈ s → Continuous (g p)\nB : ∀ (p : P), p ∈ s → tsupport (g p) ⊆ k\nA : IsCompact ({q₀.fst} ×ˢ k)\nt : Set (P × G)\nkt : {q₀.fst} ×ˢ k ⊆ t\nt_open : IsOpen t\nht : Metric.Bounded (↿g '' (t ∩ s ×ˢ univ))\nC : ℝ\nCpos : 0 < C\nhC : ↿g '' (t ∩ s ×ˢ univ) ⊆ closedBall 0 C\nw : Set P\nw_open : IsOpen w\nq₀w : q₀.fst ∈ w\nhw : w ×ˢ k ⊆ t\np : P\nx : G\nhp : p ∈ w\nhps : p ∈ s\nhx : ¬x ∈ k\nthis : g p x = 0\n⊢ ‖0‖ ≤ C\n[PROOFSTEP]\nsimpa only [norm_zero] using Cpos.le\n[GOAL]\ncase intro.intro.intro.intro\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : NormedAddCommGroup E'\ninst✝¹⁶ : NormedAddCommGroup E''\ninst✝¹⁵ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁴ : NontriviallyNormedField 𝕜\ninst✝¹³ : NormedSpace 𝕜 E\ninst✝¹² : NormedSpace 𝕜 E'\ninst✝¹¹ : NormedSpace 𝕜 E''\ninst✝¹⁰ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁹ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ninst✝⁶ : AddGroup G\ninst✝⁵ : TopologicalSpace G\ninst✝⁴ : TopologicalAddGroup G\ninst✝³ : BorelSpace G\ninst✝² : FirstCountableTopology G\ninst✝¹ : TopologicalSpace P\ninst✝ : FirstCountableTopology P\ng : P → G → E'\ns : Set P\nk : Set G\nhk : IsCompact k\nh'k : IsClosed k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContinuousOn (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nB : ∀ (p : P), p ∈ s → tsupport (g p) ⊆ k\nw : Set P\nC : ℝ\nw_open : IsOpen w\nq₀w : q₀.fst ∈ w\nhw : ∀ (p : P) (x : G), p ∈ w ∩ s → ‖g p x‖ ≤ C\n⊢ ContinuousWithinAt (fun q => f ⋆[L, q.snd] g q.fst) (s ×ˢ univ) q₀\n[PROOFSTEP]\nhave I1 : ∀ᶠ q : P × G in 𝓝[s ×ˢ univ] q₀, AEStronglyMeasurable (fun a : G => L (f a) (g q.1 (q.2 - a))) μ :=\n  by\n  filter_upwards [self_mem_nhdsWithin]\n  rintro ⟨p, x⟩ ⟨hp, -⟩\n  refine' (HasCompactSupport.convolutionExists_right L _ hf (A _ hp) _).1\n  exact isCompact_of_isClosed_subset hk (isClosed_tsupport _) (B p hp)\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : NormedAddCommGroup E'\ninst✝¹⁶ : NormedAddCommGroup E''\ninst✝¹⁵ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁴ : NontriviallyNormedField 𝕜\ninst✝¹³ : NormedSpace 𝕜 E\ninst✝¹² : NormedSpace 𝕜 E'\ninst✝¹¹ : NormedSpace 𝕜 E''\ninst✝¹⁰ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁹ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ninst✝⁶ : AddGroup G\ninst✝⁵ : TopologicalSpace G\ninst✝⁴ : TopologicalAddGroup G\ninst✝³ : BorelSpace G\ninst✝² : FirstCountableTopology G\ninst✝¹ : TopologicalSpace P\ninst✝ : FirstCountableTopology P\ng : P → G → E'\ns : Set P\nk : Set G\nhk : IsCompact k\nh'k : IsClosed k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContinuousOn (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nB : ∀ (p : P), p ∈ s → tsupport (g p) ⊆ k\nw : Set P\nC : ℝ\nw_open : IsOpen w\nq₀w : q₀.fst ∈ w\nhw : ∀ (p : P) (x : G), p ∈ w ∩ s → ‖g p x‖ ≤ C\n⊢ ∀ᶠ (q : P × G) in 𝓝[s ×ˢ univ] q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g q.fst (q.snd - a))) μ\n[PROOFSTEP]\nfilter_upwards [self_mem_nhdsWithin]\n[GOAL]\ncase h\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : NormedAddCommGroup E'\ninst✝¹⁶ : NormedAddCommGroup E''\ninst✝¹⁵ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁴ : NontriviallyNormedField 𝕜\ninst✝¹³ : NormedSpace 𝕜 E\ninst✝¹² : NormedSpace 𝕜 E'\ninst✝¹¹ : NormedSpace 𝕜 E''\ninst✝¹⁰ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁹ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ninst✝⁶ : AddGroup G\ninst✝⁵ : TopologicalSpace G\ninst✝⁴ : TopologicalAddGroup G\ninst✝³ : BorelSpace G\ninst✝² : FirstCountableTopology G\ninst✝¹ : TopologicalSpace P\ninst✝ : FirstCountableTopology P\ng : P → G → E'\ns : Set P\nk : Set G\nhk : IsCompact k\nh'k : IsClosed k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContinuousOn (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nB : ∀ (p : P), p ∈ s → tsupport (g p) ⊆ k\nw : Set P\nC : ℝ\nw_open : IsOpen w\nq₀w : q₀.fst ∈ w\nhw : ∀ (p : P) (x : G), p ∈ w ∩ s → ‖g p x‖ ≤ C\n⊢ ∀ (a : P × G), a ∈ s ×ˢ univ → AEStronglyMeasurable (fun a_2 => ↑(↑L (f a_2)) (g a.fst (a.snd - a_2))) μ\n[PROOFSTEP]\nrintro ⟨p, x⟩ ⟨hp, -⟩\n[GOAL]\ncase h.mk.intro\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : NormedAddCommGroup E'\ninst✝¹⁶ : NormedAddCommGroup E''\ninst✝¹⁵ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹⁴ : NontriviallyNormedField 𝕜\ninst✝¹³ : NormedSpace 𝕜 E\ninst✝¹² : NormedSpace 𝕜 E'\ninst✝¹¹ : NormedSpace 𝕜 E''\ninst✝¹⁰ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁹ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ninst✝⁶ : AddGroup G\ninst✝⁵ : TopologicalSpace G\ninst✝⁴ : TopologicalAddGroup G\ninst✝³ : BorelSpace G\ninst✝² : FirstCountableTopology G\ninst✝¹ : TopologicalSpace P\ninst✝ : FirstCountableTopology P\ng : P → G → E'\ns : Set P\nk : Set G\nhk : IsCompact k\nh'k : IsClosed k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContinuousOn (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nB : ∀ (p : P), p ∈ s → tsupport (g p) ⊆ k\nw : Set P\nC : ℝ\nw_open : IsOpen w\nq₀w : q₀.fst ∈ w\nhw : ∀ (p : P) (x : G), p ∈ w ∩ s → ‖g p x‖ ≤ C\np : P\nx : G\nhp : (p, x).fst ∈ s\n⊢ AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g (p, x).fst ((p, x).snd - a))) μ\n[PROOFSTEP]\nrefine' (HasCompactSupport.convolutionExists_right L _ hf (A _ hp) _).1\n[GOAL]\ncase h.mk.intro\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : NormedAddCommGroup E'\ninst✝¹⁶ : NormedAddCommGroup E''\ninst✝¹⁵ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹⁴ : NontriviallyNormedField 𝕜\ninst✝¹³ : NormedSpace 𝕜 E\ninst✝¹² : NormedSpace 𝕜 E'\ninst✝¹¹ : NormedSpace 𝕜 E''\ninst✝¹⁰ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁹ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ninst✝⁶ : AddGroup G\ninst✝⁵ : TopologicalSpace G\ninst✝⁴ : TopologicalAddGroup G\ninst✝³ : BorelSpace G\ninst✝² : FirstCountableTopology G\ninst✝¹ : TopologicalSpace P\ninst✝ : FirstCountableTopology P\ng : P → G → E'\ns : Set P\nk : Set G\nhk : IsCompact k\nh'k : IsClosed k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContinuousOn (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nB : ∀ (p : P), p ∈ s → tsupport (g p) ⊆ k\nw : Set P\nC : ℝ\nw_open : IsOpen w\nq₀w : q₀.fst ∈ w\nhw : ∀ (p : P) (x : G), p ∈ w ∩ s → ‖g p x‖ ≤ C\np : P\nx : G\nhp : (p, x).fst ∈ s\n⊢ HasCompactSupport (g (p, x).fst)\n[PROOFSTEP]\nexact isCompact_of_isClosed_subset hk (isClosed_tsupport _) (B p hp)\n[GOAL]\ncase intro.intro.intro.intro\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : NormedAddCommGroup E'\ninst✝¹⁶ : NormedAddCommGroup E''\ninst✝¹⁵ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁴ : NontriviallyNormedField 𝕜\ninst✝¹³ : NormedSpace 𝕜 E\ninst✝¹² : NormedSpace 𝕜 E'\ninst✝¹¹ : NormedSpace 𝕜 E''\ninst✝¹⁰ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁹ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ninst✝⁶ : AddGroup G\ninst✝⁵ : TopologicalSpace G\ninst✝⁴ : TopologicalAddGroup G\ninst✝³ : BorelSpace G\ninst✝² : FirstCountableTopology G\ninst✝¹ : TopologicalSpace P\ninst✝ : FirstCountableTopology P\ng : P → G → E'\ns : Set P\nk : Set G\nhk : IsCompact k\nh'k : IsClosed k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContinuousOn (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nB : ∀ (p : P), p ∈ s → tsupport (g p) ⊆ k\nw : Set P\nC : ℝ\nw_open : IsOpen w\nq₀w : q₀.fst ∈ w\nhw : ∀ (p : P) (x : G), p ∈ w ∩ s → ‖g p x‖ ≤ C\nI1 : ∀ᶠ (q : P × G) in 𝓝[s ×ˢ univ] q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g q.fst (q.snd - a))) μ\n⊢ ContinuousWithinAt (fun q => f ⋆[L, q.snd] g q.fst) (s ×ˢ univ) q₀\n[PROOFSTEP]\nlet K' := -k + {q₀.2}\n[GOAL]\ncase intro.intro.intro.intro\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : NormedAddCommGroup E'\ninst✝¹⁶ : NormedAddCommGroup E''\ninst✝¹⁵ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁴ : NontriviallyNormedField 𝕜\ninst✝¹³ : NormedSpace 𝕜 E\ninst✝¹² : NormedSpace 𝕜 E'\ninst✝¹¹ : NormedSpace 𝕜 E''\ninst✝¹⁰ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁹ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ninst✝⁶ : AddGroup G\ninst✝⁵ : TopologicalSpace G\ninst✝⁴ : TopologicalAddGroup G\ninst✝³ : BorelSpace G\ninst✝² : FirstCountableTopology G\ninst✝¹ : TopologicalSpace P\ninst✝ : FirstCountableTopology P\ng : P → G → E'\ns : Set P\nk : Set G\nhk : IsCompact k\nh'k : IsClosed k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContinuousOn (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nB : ∀ (p : P), p ∈ s → tsupport (g p) ⊆ k\nw : Set P\nC : ℝ\nw_open : IsOpen w\nq₀w : q₀.fst ∈ w\nhw : ∀ (p : P) (x : G), p ∈ w ∩ s → ‖g p x‖ ≤ C\nI1 : ∀ᶠ (q : P × G) in 𝓝[s ×ˢ univ] q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g q.fst (q.snd - a))) μ\nK' : Set G := -k + {q₀.snd}\n⊢ ContinuousWithinAt (fun q => f ⋆[L, q.snd] g q.fst) (s ×ˢ univ) q₀\n[PROOFSTEP]\nhave hK' : IsCompact K' := hk.neg.add isCompact_singleton\n[GOAL]\ncase intro.intro.intro.intro\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : NormedAddCommGroup E'\ninst✝¹⁶ : NormedAddCommGroup E''\ninst✝¹⁵ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁴ : NontriviallyNormedField 𝕜\ninst✝¹³ : NormedSpace 𝕜 E\ninst✝¹² : NormedSpace 𝕜 E'\ninst✝¹¹ : NormedSpace 𝕜 E''\ninst✝¹⁰ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁹ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ninst✝⁶ : AddGroup G\ninst✝⁵ : TopologicalSpace G\ninst✝⁴ : TopologicalAddGroup G\ninst✝³ : BorelSpace G\ninst✝² : FirstCountableTopology G\ninst✝¹ : TopologicalSpace P\ninst✝ : FirstCountableTopology P\ng : P → G → E'\ns : Set P\nk : Set G\nhk : IsCompact k\nh'k : IsClosed k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContinuousOn (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nB : ∀ (p : P), p ∈ s → tsupport (g p) ⊆ k\nw : Set P\nC : ℝ\nw_open : IsOpen w\nq₀w : q₀.fst ∈ w\nhw : ∀ (p : P) (x : G), p ∈ w ∩ s → ‖g p x‖ ≤ C\nI1 : ∀ᶠ (q : P × G) in 𝓝[s ×ˢ univ] q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g q.fst (q.snd - a))) μ\nK' : Set G := -k + {q₀.snd}\nhK' : IsCompact K'\n⊢ ContinuousWithinAt (fun q => f ⋆[L, q.snd] g q.fst) (s ×ˢ univ) q₀\n[PROOFSTEP]\nobtain ⟨U, U_open, K'U, hU⟩ : ∃ U, IsOpen U ∧ K' ⊆ U ∧ IntegrableOn f U μ := hf.integrableOn_nhds_isCompact hK'\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : NormedAddCommGroup E'\ninst✝¹⁶ : NormedAddCommGroup E''\ninst✝¹⁵ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁴ : NontriviallyNormedField 𝕜\ninst✝¹³ : NormedSpace 𝕜 E\ninst✝¹² : NormedSpace 𝕜 E'\ninst✝¹¹ : NormedSpace 𝕜 E''\ninst✝¹⁰ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁹ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ninst✝⁶ : AddGroup G\ninst✝⁵ : TopologicalSpace G\ninst✝⁴ : TopologicalAddGroup G\ninst✝³ : BorelSpace G\ninst✝² : FirstCountableTopology G\ninst✝¹ : TopologicalSpace P\ninst✝ : FirstCountableTopology P\ng : P → G → E'\ns : Set P\nk : Set G\nhk : IsCompact k\nh'k : IsClosed k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContinuousOn (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nB : ∀ (p : P), p ∈ s → tsupport (g p) ⊆ k\nw : Set P\nC : ℝ\nw_open : IsOpen w\nq₀w : q₀.fst ∈ w\nhw : ∀ (p : P) (x : G), p ∈ w ∩ s → ‖g p x‖ ≤ C\nI1 : ∀ᶠ (q : P × G) in 𝓝[s ×ˢ univ] q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g q.fst (q.snd - a))) μ\nK' : Set G := -k + {q₀.snd}\nhK' : IsCompact K'\nU : Set G\nU_open : IsOpen U\nK'U : K' ⊆ U\nhU : IntegrableOn f U\n⊢ ContinuousWithinAt (fun q => f ⋆[L, q.snd] g q.fst) (s ×ˢ univ) q₀\n[PROOFSTEP]\nlet bound : G → ℝ := indicator U fun a => ‖L‖ * ‖f a‖ * C\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : NormedAddCommGroup E'\ninst✝¹⁶ : NormedAddCommGroup E''\ninst✝¹⁵ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁴ : NontriviallyNormedField 𝕜\ninst✝¹³ : NormedSpace 𝕜 E\ninst✝¹² : NormedSpace 𝕜 E'\ninst✝¹¹ : NormedSpace 𝕜 E''\ninst✝¹⁰ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁹ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ninst✝⁶ : AddGroup G\ninst✝⁵ : TopologicalSpace G\ninst✝⁴ : TopologicalAddGroup G\ninst✝³ : BorelSpace G\ninst✝² : FirstCountableTopology G\ninst✝¹ : TopologicalSpace P\ninst✝ : FirstCountableTopology P\ng : P → G → E'\ns : Set P\nk : Set G\nhk : IsCompact k\nh'k : IsClosed k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContinuousOn (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nB : ∀ (p : P), p ∈ s → tsupport (g p) ⊆ k\nw : Set P\nC : ℝ\nw_open : IsOpen w\nq₀w : q₀.fst ∈ w\nhw : ∀ (p : P) (x : G), p ∈ w ∩ s → ‖g p x‖ ≤ C\nI1 : ∀ᶠ (q : P × G) in 𝓝[s ×ˢ univ] q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g q.fst (q.snd - a))) μ\nK' : Set G := -k + {q₀.snd}\nhK' : IsCompact K'\nU : Set G\nU_open : IsOpen U\nK'U : K' ⊆ U\nhU : IntegrableOn f U\nbound : G → ℝ := indicator U fun a => ‖L‖ * ‖f a‖ * C\n⊢ ContinuousWithinAt (fun q => f ⋆[L, q.snd] g q.fst) (s ×ˢ univ) q₀\n[PROOFSTEP]\nhave I2 : ∀ᶠ q : P × G in 𝓝[s ×ˢ univ] q₀, ∀ᵐ a ∂μ, ‖L (f a) (g q.1 (q.2 - a))‖ ≤ bound a :=\n  by\n  obtain ⟨V, V_mem, hV⟩ : ∃ V ∈ 𝓝 (0 : G), K' + V ⊆ U := compact_open_separated_add_right hK' U_open K'U\n  have : ((w ∩ s) ×ˢ ({q₀.2} + V) : Set (P × G)) ∈ 𝓝[s ×ˢ univ] q₀ :=\n    by\n    conv_rhs => rw [← @Prod.mk.eta _ _ q₀, nhdsWithin_prod_eq, nhdsWithin_univ]\n    refine' Filter.prod_mem_prod _ (singleton_add_mem_nhds_of_nhds_zero q₀.2 V_mem)\n    exact mem_nhdsWithin_iff_exists_mem_nhds_inter.2 ⟨w, w_open.mem_nhds q₀w, Subset.rfl⟩\n  filter_upwards [this]\n  rintro ⟨p, x⟩ hpx\n  simp only [prod_mk_mem_set_prod_eq] at hpx \n  refine eventually_of_forall fun a => ?_\n  apply convolution_integrand_bound_right_of_le_of_subset _ _ hpx.2 _\n  · intro x\n    exact hw _ _ hpx.1\n  · rw [← add_assoc]\n    apply Subset.trans (add_subset_add_right (add_subset_add_right _)) hV\n    rw [neg_subset_neg]\n    exact B p hpx.1.2\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : NormedAddCommGroup E'\ninst✝¹⁶ : NormedAddCommGroup E''\ninst✝¹⁵ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁴ : NontriviallyNormedField 𝕜\ninst✝¹³ : NormedSpace 𝕜 E\ninst✝¹² : NormedSpace 𝕜 E'\ninst✝¹¹ : NormedSpace 𝕜 E''\ninst✝¹⁰ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁹ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ninst✝⁶ : AddGroup G\ninst✝⁵ : TopologicalSpace G\ninst✝⁴ : TopologicalAddGroup G\ninst✝³ : BorelSpace G\ninst✝² : FirstCountableTopology G\ninst✝¹ : TopologicalSpace P\ninst✝ : FirstCountableTopology P\ng : P → G → E'\ns : Set P\nk : Set G\nhk : IsCompact k\nh'k : IsClosed k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContinuousOn (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nB : ∀ (p : P), p ∈ s → tsupport (g p) ⊆ k\nw : Set P\nC : ℝ\nw_open : IsOpen w\nq₀w : q₀.fst ∈ w\nhw : ∀ (p : P) (x : G), p ∈ w ∩ s → ‖g p x‖ ≤ C\nI1 : ∀ᶠ (q : P × G) in 𝓝[s ×ˢ univ] q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g q.fst (q.snd - a))) μ\nK' : Set G := -k + {q₀.snd}\nhK' : IsCompact K'\nU : Set G\nU_open : IsOpen U\nK'U : K' ⊆ U\nhU : IntegrableOn f U\nbound : G → ℝ := indicator U fun a => ‖L‖ * ‖f a‖ * C\n⊢ ∀ᶠ (q : P × G) in 𝓝[s ×ˢ univ] q₀, ∀ᵐ (a : G) ∂μ, ‖↑(↑L (f a)) (g q.fst (q.snd - a))‖ ≤ bound a\n[PROOFSTEP]\nobtain ⟨V, V_mem, hV⟩ : ∃ V ∈ 𝓝 (0 : G), K' + V ⊆ U := compact_open_separated_add_right hK' U_open K'U\n[GOAL]\ncase intro.intro\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : NormedAddCommGroup E'\ninst✝¹⁶ : NormedAddCommGroup E''\ninst✝¹⁵ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁴ : NontriviallyNormedField 𝕜\ninst✝¹³ : NormedSpace 𝕜 E\ninst✝¹² : NormedSpace 𝕜 E'\ninst✝¹¹ : NormedSpace 𝕜 E''\ninst✝¹⁰ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁹ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ninst✝⁶ : AddGroup G\ninst✝⁵ : TopologicalSpace G\ninst✝⁴ : TopologicalAddGroup G\ninst✝³ : BorelSpace G\ninst✝² : FirstCountableTopology G\ninst✝¹ : TopologicalSpace P\ninst✝ : FirstCountableTopology P\ng : P → G → E'\ns : Set P\nk : Set G\nhk : IsCompact k\nh'k : IsClosed k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContinuousOn (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nB : ∀ (p : P), p ∈ s → tsupport (g p) ⊆ k\nw : Set P\nC : ℝ\nw_open : IsOpen w\nq₀w : q₀.fst ∈ w\nhw : ∀ (p : P) (x : G), p ∈ w ∩ s → ‖g p x‖ ≤ C\nI1 : ∀ᶠ (q : P × G) in 𝓝[s ×ˢ univ] q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g q.fst (q.snd - a))) μ\nK' : Set G := -k + {q₀.snd}\nhK' : IsCompact K'\nU : Set G\nU_open : IsOpen U\nK'U : K' ⊆ U\nhU : IntegrableOn f U\nbound : G → ℝ := indicator U fun a => ‖L‖ * ‖f a‖ * C\nV : Set G\nV_mem : V ∈ 𝓝 0\nhV : K' + V ⊆ U\n⊢ ∀ᶠ (q : P × G) in 𝓝[s ×ˢ univ] q₀, ∀ᵐ (a : G) ∂μ, ‖↑(↑L (f a)) (g q.fst (q.snd - a))‖ ≤ bound a\n[PROOFSTEP]\nhave : ((w ∩ s) ×ˢ ({q₀.2} + V) : Set (P × G)) ∈ 𝓝[s ×ˢ univ] q₀ :=\n  by\n  conv_rhs => rw [← @Prod.mk.eta _ _ q₀, nhdsWithin_prod_eq, nhdsWithin_univ]\n  refine' Filter.prod_mem_prod _ (singleton_add_mem_nhds_of_nhds_zero q₀.2 V_mem)\n  exact mem_nhdsWithin_iff_exists_mem_nhds_inter.2 ⟨w, w_open.mem_nhds q₀w, Subset.rfl⟩\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : NormedAddCommGroup E'\ninst✝¹⁶ : NormedAddCommGroup E''\ninst✝¹⁵ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁴ : NontriviallyNormedField 𝕜\ninst✝¹³ : NormedSpace 𝕜 E\ninst✝¹² : NormedSpace 𝕜 E'\ninst✝¹¹ : NormedSpace 𝕜 E''\ninst✝¹⁰ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁹ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ninst✝⁶ : AddGroup G\ninst✝⁵ : TopologicalSpace G\ninst✝⁴ : TopologicalAddGroup G\ninst✝³ : BorelSpace G\ninst✝² : FirstCountableTopology G\ninst✝¹ : TopologicalSpace P\ninst✝ : FirstCountableTopology P\ng : P → G → E'\ns : Set P\nk : Set G\nhk : IsCompact k\nh'k : IsClosed k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContinuousOn (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nB : ∀ (p : P), p ∈ s → tsupport (g p) ⊆ k\nw : Set P\nC : ℝ\nw_open : IsOpen w\nq₀w : q₀.fst ∈ w\nhw : ∀ (p : P) (x : G), p ∈ w ∩ s → ‖g p x‖ ≤ C\nI1 : ∀ᶠ (q : P × G) in 𝓝[s ×ˢ univ] q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g q.fst (q.snd - a))) μ\nK' : Set G := -k + {q₀.snd}\nhK' : IsCompact K'\nU : Set G\nU_open : IsOpen U\nK'U : K' ⊆ U\nhU : IntegrableOn f U\nbound : G → ℝ := indicator U fun a => ‖L‖ * ‖f a‖ * C\nV : Set G\nV_mem : V ∈ 𝓝 0\nhV : K' + V ⊆ U\n⊢ (w ∩ s) ×ˢ ({q₀.snd} + V) ∈ 𝓝[s ×ˢ univ] q₀\n[PROOFSTEP]\nconv_rhs => rw [← @Prod.mk.eta _ _ q₀, nhdsWithin_prod_eq, nhdsWithin_univ]\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : NormedAddCommGroup E'\ninst✝¹⁶ : NormedAddCommGroup E''\ninst✝¹⁵ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁴ : NontriviallyNormedField 𝕜\ninst✝¹³ : NormedSpace 𝕜 E\ninst✝¹² : NormedSpace 𝕜 E'\ninst✝¹¹ : NormedSpace 𝕜 E''\ninst✝¹⁰ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁹ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ninst✝⁶ : AddGroup G\ninst✝⁵ : TopologicalSpace G\ninst✝⁴ : TopologicalAddGroup G\ninst✝³ : BorelSpace G\ninst✝² : FirstCountableTopology G\ninst✝¹ : TopologicalSpace P\ninst✝ : FirstCountableTopology P\ng : P → G → E'\ns : Set P\nk : Set G\nhk : IsCompact k\nh'k : IsClosed k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContinuousOn (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nB : ∀ (p : P), p ∈ s → tsupport (g p) ⊆ k\nw : Set P\nC : ℝ\nw_open : IsOpen w\nq₀w : q₀.fst ∈ w\nhw : ∀ (p : P) (x : G), p ∈ w ∩ s → ‖g p x‖ ≤ C\nI1 : ∀ᶠ (q : P × G) in 𝓝[s ×ˢ univ] q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g q.fst (q.snd - a))) μ\nK' : Set G := -k + {q₀.snd}\nhK' : IsCompact K'\nU : Set G\nU_open : IsOpen U\nK'U : K' ⊆ U\nhU : IntegrableOn f U\nbound : G → ℝ := indicator U fun a => ‖L‖ * ‖f a‖ * C\nV : Set G\nV_mem : V ∈ 𝓝 0\nhV : K' + V ⊆ U\n| 𝓝[s ×ˢ univ] q₀\n[PROOFSTEP]\nrw [← @Prod.mk.eta _ _ q₀, nhdsWithin_prod_eq, nhdsWithin_univ]\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : NormedAddCommGroup E'\ninst✝¹⁶ : NormedAddCommGroup E''\ninst✝¹⁵ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁴ : NontriviallyNormedField 𝕜\ninst✝¹³ : NormedSpace 𝕜 E\ninst✝¹² : NormedSpace 𝕜 E'\ninst✝¹¹ : NormedSpace 𝕜 E''\ninst✝¹⁰ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁹ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ninst✝⁶ : AddGroup G\ninst✝⁵ : TopologicalSpace G\ninst✝⁴ : TopologicalAddGroup G\ninst✝³ : BorelSpace G\ninst✝² : FirstCountableTopology G\ninst✝¹ : TopologicalSpace P\ninst✝ : FirstCountableTopology P\ng : P → G → E'\ns : Set P\nk : Set G\nhk : IsCompact k\nh'k : IsClosed k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContinuousOn (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nB : ∀ (p : P), p ∈ s → tsupport (g p) ⊆ k\nw : Set P\nC : ℝ\nw_open : IsOpen w\nq₀w : q₀.fst ∈ w\nhw : ∀ (p : P) (x : G), p ∈ w ∩ s → ‖g p x‖ ≤ C\nI1 : ∀ᶠ (q : P × G) in 𝓝[s ×ˢ univ] q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g q.fst (q.snd - a))) μ\nK' : Set G := -k + {q₀.snd}\nhK' : IsCompact K'\nU : Set G\nU_open : IsOpen U\nK'U : K' ⊆ U\nhU : IntegrableOn f U\nbound : G → ℝ := indicator U fun a => ‖L‖ * ‖f a‖ * C\nV : Set G\nV_mem : V ∈ 𝓝 0\nhV : K' + V ⊆ U\n| 𝓝[s ×ˢ univ] q₀\n[PROOFSTEP]\nrw [← @Prod.mk.eta _ _ q₀, nhdsWithin_prod_eq, nhdsWithin_univ]\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : NormedAddCommGroup E'\ninst✝¹⁶ : NormedAddCommGroup E''\ninst✝¹⁵ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁴ : NontriviallyNormedField 𝕜\ninst✝¹³ : NormedSpace 𝕜 E\ninst✝¹² : NormedSpace 𝕜 E'\ninst✝¹¹ : NormedSpace 𝕜 E''\ninst✝¹⁰ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁹ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ninst✝⁶ : AddGroup G\ninst✝⁵ : TopologicalSpace G\ninst✝⁴ : TopologicalAddGroup G\ninst✝³ : BorelSpace G\ninst✝² : FirstCountableTopology G\ninst✝¹ : TopologicalSpace P\ninst✝ : FirstCountableTopology P\ng : P → G → E'\ns : Set P\nk : Set G\nhk : IsCompact k\nh'k : IsClosed k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContinuousOn (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nB : ∀ (p : P), p ∈ s → tsupport (g p) ⊆ k\nw : Set P\nC : ℝ\nw_open : IsOpen w\nq₀w : q₀.fst ∈ w\nhw : ∀ (p : P) (x : G), p ∈ w ∩ s → ‖g p x‖ ≤ C\nI1 : ∀ᶠ (q : P × G) in 𝓝[s ×ˢ univ] q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g q.fst (q.snd - a))) μ\nK' : Set G := -k + {q₀.snd}\nhK' : IsCompact K'\nU : Set G\nU_open : IsOpen U\nK'U : K' ⊆ U\nhU : IntegrableOn f U\nbound : G → ℝ := indicator U fun a => ‖L‖ * ‖f a‖ * C\nV : Set G\nV_mem : V ∈ 𝓝 0\nhV : K' + V ⊆ U\n| 𝓝[s ×ˢ univ] q₀\n[PROOFSTEP]\nrw [← @Prod.mk.eta _ _ q₀, nhdsWithin_prod_eq, nhdsWithin_univ]\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : NormedAddCommGroup E'\ninst✝¹⁶ : NormedAddCommGroup E''\ninst✝¹⁵ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁴ : NontriviallyNormedField 𝕜\ninst✝¹³ : NormedSpace 𝕜 E\ninst✝¹² : NormedSpace 𝕜 E'\ninst✝¹¹ : NormedSpace 𝕜 E''\ninst✝¹⁰ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁹ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ninst✝⁶ : AddGroup G\ninst✝⁵ : TopologicalSpace G\ninst✝⁴ : TopologicalAddGroup G\ninst✝³ : BorelSpace G\ninst✝² : FirstCountableTopology G\ninst✝¹ : TopologicalSpace P\ninst✝ : FirstCountableTopology P\ng : P → G → E'\ns : Set P\nk : Set G\nhk : IsCompact k\nh'k : IsClosed k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContinuousOn (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nB : ∀ (p : P), p ∈ s → tsupport (g p) ⊆ k\nw : Set P\nC : ℝ\nw_open : IsOpen w\nq₀w : q₀.fst ∈ w\nhw : ∀ (p : P) (x : G), p ∈ w ∩ s → ‖g p x‖ ≤ C\nI1 : ∀ᶠ (q : P × G) in 𝓝[s ×ˢ univ] q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g q.fst (q.snd - a))) μ\nK' : Set G := -k + {q₀.snd}\nhK' : IsCompact K'\nU : Set G\nU_open : IsOpen U\nK'U : K' ⊆ U\nhU : IntegrableOn f U\nbound : G → ℝ := indicator U fun a => ‖L‖ * ‖f a‖ * C\nV : Set G\nV_mem : V ∈ 𝓝 0\nhV : K' + V ⊆ U\n⊢ (w ∩ s) ×ˢ ({q₀.snd} + V) ∈ 𝓝[s] q₀.fst ×ˢ 𝓝 q₀.snd\n[PROOFSTEP]\nrefine' Filter.prod_mem_prod _ (singleton_add_mem_nhds_of_nhds_zero q₀.2 V_mem)\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : NormedAddCommGroup E'\ninst✝¹⁶ : NormedAddCommGroup E''\ninst✝¹⁵ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁴ : NontriviallyNormedField 𝕜\ninst✝¹³ : NormedSpace 𝕜 E\ninst✝¹² : NormedSpace 𝕜 E'\ninst✝¹¹ : NormedSpace 𝕜 E''\ninst✝¹⁰ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁹ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ninst✝⁶ : AddGroup G\ninst✝⁵ : TopologicalSpace G\ninst✝⁴ : TopologicalAddGroup G\ninst✝³ : BorelSpace G\ninst✝² : FirstCountableTopology G\ninst✝¹ : TopologicalSpace P\ninst✝ : FirstCountableTopology P\ng : P → G → E'\ns : Set P\nk : Set G\nhk : IsCompact k\nh'k : IsClosed k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContinuousOn (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nB : ∀ (p : P), p ∈ s → tsupport (g p) ⊆ k\nw : Set P\nC : ℝ\nw_open : IsOpen w\nq₀w : q₀.fst ∈ w\nhw : ∀ (p : P) (x : G), p ∈ w ∩ s → ‖g p x‖ ≤ C\nI1 : ∀ᶠ (q : P × G) in 𝓝[s ×ˢ univ] q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g q.fst (q.snd - a))) μ\nK' : Set G := -k + {q₀.snd}\nhK' : IsCompact K'\nU : Set G\nU_open : IsOpen U\nK'U : K' ⊆ U\nhU : IntegrableOn f U\nbound : G → ℝ := indicator U fun a => ‖L‖ * ‖f a‖ * C\nV : Set G\nV_mem : V ∈ 𝓝 0\nhV : K' + V ⊆ U\n⊢ w ∩ s ∈ 𝓝[s] q₀.fst\n[PROOFSTEP]\nexact mem_nhdsWithin_iff_exists_mem_nhds_inter.2 ⟨w, w_open.mem_nhds q₀w, Subset.rfl⟩\n[GOAL]\ncase intro.intro\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : NormedAddCommGroup E'\ninst✝¹⁶ : NormedAddCommGroup E''\ninst✝¹⁵ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁴ : NontriviallyNormedField 𝕜\ninst✝¹³ : NormedSpace 𝕜 E\ninst✝¹² : NormedSpace 𝕜 E'\ninst✝¹¹ : NormedSpace 𝕜 E''\ninst✝¹⁰ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁹ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ninst✝⁶ : AddGroup G\ninst✝⁵ : TopologicalSpace G\ninst✝⁴ : TopologicalAddGroup G\ninst✝³ : BorelSpace G\ninst✝² : FirstCountableTopology G\ninst✝¹ : TopologicalSpace P\ninst✝ : FirstCountableTopology P\ng : P → G → E'\ns : Set P\nk : Set G\nhk : IsCompact k\nh'k : IsClosed k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContinuousOn (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nB : ∀ (p : P), p ∈ s → tsupport (g p) ⊆ k\nw : Set P\nC : ℝ\nw_open : IsOpen w\nq₀w : q₀.fst ∈ w\nhw : ∀ (p : P) (x : G), p ∈ w ∩ s → ‖g p x‖ ≤ C\nI1 : ∀ᶠ (q : P × G) in 𝓝[s ×ˢ univ] q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g q.fst (q.snd - a))) μ\nK' : Set G := -k + {q₀.snd}\nhK' : IsCompact K'\nU : Set G\nU_open : IsOpen U\nK'U : K' ⊆ U\nhU : IntegrableOn f U\nbound : G → ℝ := indicator U fun a => ‖L‖ * ‖f a‖ * C\nV : Set G\nV_mem : V ∈ 𝓝 0\nhV : K' + V ⊆ U\nthis : (w ∩ s) ×ˢ ({q₀.snd} + V) ∈ 𝓝[s ×ˢ univ] q₀\n⊢ ∀ᶠ (q : P × G) in 𝓝[s ×ˢ univ] q₀, ∀ᵐ (a : G) ∂μ, ‖↑(↑L (f a)) (g q.fst (q.snd - a))‖ ≤ bound a\n[PROOFSTEP]\nfilter_upwards [this]\n[GOAL]\ncase h\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : NormedAddCommGroup E'\ninst✝¹⁶ : NormedAddCommGroup E''\ninst✝¹⁵ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁴ : NontriviallyNormedField 𝕜\ninst✝¹³ : NormedSpace 𝕜 E\ninst✝¹² : NormedSpace 𝕜 E'\ninst✝¹¹ : NormedSpace 𝕜 E''\ninst✝¹⁰ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁹ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ninst✝⁶ : AddGroup G\ninst✝⁵ : TopologicalSpace G\ninst✝⁴ : TopologicalAddGroup G\ninst✝³ : BorelSpace G\ninst✝² : FirstCountableTopology G\ninst✝¹ : TopologicalSpace P\ninst✝ : FirstCountableTopology P\ng : P → G → E'\ns : Set P\nk : Set G\nhk : IsCompact k\nh'k : IsClosed k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContinuousOn (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nB : ∀ (p : P), p ∈ s → tsupport (g p) ⊆ k\nw : Set P\nC : ℝ\nw_open : IsOpen w\nq₀w : q₀.fst ∈ w\nhw : ∀ (p : P) (x : G), p ∈ w ∩ s → ‖g p x‖ ≤ C\nI1 : ∀ᶠ (q : P × G) in 𝓝[s ×ˢ univ] q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g q.fst (q.snd - a))) μ\nK' : Set G := -k + {q₀.snd}\nhK' : IsCompact K'\nU : Set G\nU_open : IsOpen U\nK'U : K' ⊆ U\nhU : IntegrableOn f U\nbound : G → ℝ := indicator U fun a => ‖L‖ * ‖f a‖ * C\nV : Set G\nV_mem : V ∈ 𝓝 0\nhV : K' + V ⊆ U\nthis : (w ∩ s) ×ˢ ({q₀.snd} + V) ∈ 𝓝[s ×ˢ univ] q₀\n⊢ ∀ (a : P × G),\n    a ∈ (w ∩ s) ×ˢ ({q₀.snd} + V) →\n      ∀ᵐ (a_2 : G) ∂μ, ‖↑(↑L (f a_2)) (g a.fst (a.snd - a_2))‖ ≤ indicator U (fun a => ‖L‖ * ‖f a‖ * C) a_2\n[PROOFSTEP]\nrintro ⟨p, x⟩ hpx\n[GOAL]\ncase h.mk\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : NormedAddCommGroup E'\ninst✝¹⁶ : NormedAddCommGroup E''\ninst✝¹⁵ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹⁴ : NontriviallyNormedField 𝕜\ninst✝¹³ : NormedSpace 𝕜 E\ninst✝¹² : NormedSpace 𝕜 E'\ninst✝¹¹ : NormedSpace 𝕜 E''\ninst✝¹⁰ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁹ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ninst✝⁶ : AddGroup G\ninst✝⁵ : TopologicalSpace G\ninst✝⁴ : TopologicalAddGroup G\ninst✝³ : BorelSpace G\ninst✝² : FirstCountableTopology G\ninst✝¹ : TopologicalSpace P\ninst✝ : FirstCountableTopology P\ng : P → G → E'\ns : Set P\nk : Set G\nhk : IsCompact k\nh'k : IsClosed k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContinuousOn (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nB : ∀ (p : P), p ∈ s → tsupport (g p) ⊆ k\nw : Set P\nC : ℝ\nw_open : IsOpen w\nq₀w : q₀.fst ∈ w\nhw : ∀ (p : P) (x : G), p ∈ w ∩ s → ‖g p x‖ ≤ C\nI1 : ∀ᶠ (q : P × G) in 𝓝[s ×ˢ univ] q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g q.fst (q.snd - a))) μ\nK' : Set G := -k + {q₀.snd}\nhK' : IsCompact K'\nU : Set G\nU_open : IsOpen U\nK'U : K' ⊆ U\nhU : IntegrableOn f U\nbound : G → ℝ := indicator U fun a => ‖L‖ * ‖f a‖ * C\nV : Set G\nV_mem : V ∈ 𝓝 0\nhV : K' + V ⊆ U\nthis : (w ∩ s) ×ˢ ({q₀.snd} + V) ∈ 𝓝[s ×ˢ univ] q₀\np : P\nx : G\nhpx : (p, x) ∈ (w ∩ s) ×ˢ ({q₀.snd} + V)\n⊢ ∀ᵐ (a : G) ∂μ, ‖↑(↑L (f a)) (g (p, x).fst ((p, x).snd - a))‖ ≤ indicator U (fun a => ‖L‖ * ‖f a‖ * C) a\n[PROOFSTEP]\nsimp only [prod_mk_mem_set_prod_eq] at hpx \n[GOAL]\ncase h.mk\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : NormedAddCommGroup E'\ninst✝¹⁶ : NormedAddCommGroup E''\ninst✝¹⁵ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹⁴ : NontriviallyNormedField 𝕜\ninst✝¹³ : NormedSpace 𝕜 E\ninst✝¹² : NormedSpace 𝕜 E'\ninst✝¹¹ : NormedSpace 𝕜 E''\ninst✝¹⁰ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁹ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ninst✝⁶ : AddGroup G\ninst✝⁵ : TopologicalSpace G\ninst✝⁴ : TopologicalAddGroup G\ninst✝³ : BorelSpace G\ninst✝² : FirstCountableTopology G\ninst✝¹ : TopologicalSpace P\ninst✝ : FirstCountableTopology P\ng : P → G → E'\ns : Set P\nk : Set G\nhk : IsCompact k\nh'k : IsClosed k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContinuousOn (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nB : ∀ (p : P), p ∈ s → tsupport (g p) ⊆ k\nw : Set P\nC : ℝ\nw_open : IsOpen w\nq₀w : q₀.fst ∈ w\nhw : ∀ (p : P) (x : G), p ∈ w ∩ s → ‖g p x‖ ≤ C\nI1 : ∀ᶠ (q : P × G) in 𝓝[s ×ˢ univ] q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g q.fst (q.snd - a))) μ\nK' : Set G := -k + {q₀.snd}\nhK' : IsCompact K'\nU : Set G\nU_open : IsOpen U\nK'U : K' ⊆ U\nhU : IntegrableOn f U\nbound : G → ℝ := indicator U fun a => ‖L‖ * ‖f a‖ * C\nV : Set G\nV_mem : V ∈ 𝓝 0\nhV : K' + V ⊆ U\nthis : (w ∩ s) ×ˢ ({q₀.snd} + V) ∈ 𝓝[s ×ˢ univ] q₀\np : P\nx : G\nhpx : p ∈ w ∩ s ∧ x ∈ {q₀.snd} + V\n⊢ ∀ᵐ (a : G) ∂μ, ‖↑(↑L (f a)) (g (p, x).fst ((p, x).snd - a))‖ ≤ indicator U (fun a => ‖L‖ * ‖f a‖ * C) a\n[PROOFSTEP]\nrefine eventually_of_forall fun a => ?_\n[GOAL]\ncase h.mk\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : NormedAddCommGroup E'\ninst✝¹⁶ : NormedAddCommGroup E''\ninst✝¹⁵ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹⁴ : NontriviallyNormedField 𝕜\ninst✝¹³ : NormedSpace 𝕜 E\ninst✝¹² : NormedSpace 𝕜 E'\ninst✝¹¹ : NormedSpace 𝕜 E''\ninst✝¹⁰ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁹ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ninst✝⁶ : AddGroup G\ninst✝⁵ : TopologicalSpace G\ninst✝⁴ : TopologicalAddGroup G\ninst✝³ : BorelSpace G\ninst✝² : FirstCountableTopology G\ninst✝¹ : TopologicalSpace P\ninst✝ : FirstCountableTopology P\ng : P → G → E'\ns : Set P\nk : Set G\nhk : IsCompact k\nh'k : IsClosed k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContinuousOn (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nB : ∀ (p : P), p ∈ s → tsupport (g p) ⊆ k\nw : Set P\nC : ℝ\nw_open : IsOpen w\nq₀w : q₀.fst ∈ w\nhw : ∀ (p : P) (x : G), p ∈ w ∩ s → ‖g p x‖ ≤ C\nI1 : ∀ᶠ (q : P × G) in 𝓝[s ×ˢ univ] q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g q.fst (q.snd - a))) μ\nK' : Set G := -k + {q₀.snd}\nhK' : IsCompact K'\nU : Set G\nU_open : IsOpen U\nK'U : K' ⊆ U\nhU : IntegrableOn f U\nbound : G → ℝ := indicator U fun a => ‖L‖ * ‖f a‖ * C\nV : Set G\nV_mem : V ∈ 𝓝 0\nhV : K' + V ⊆ U\nthis : (w ∩ s) ×ˢ ({q₀.snd} + V) ∈ 𝓝[s ×ˢ univ] q₀\np : P\nx : G\nhpx : p ∈ w ∩ s ∧ x ∈ {q₀.snd} + V\na : G\n⊢ ‖↑(↑L (f a)) (g (p, x).fst ((p, x).snd - a))‖ ≤ indicator U (fun a => ‖L‖ * ‖f a‖ * C) a\n[PROOFSTEP]\napply convolution_integrand_bound_right_of_le_of_subset _ _ hpx.2 _\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : NormedAddCommGroup E'\ninst✝¹⁶ : NormedAddCommGroup E''\ninst✝¹⁵ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹⁴ : NontriviallyNormedField 𝕜\ninst✝¹³ : NormedSpace 𝕜 E\ninst✝¹² : NormedSpace 𝕜 E'\ninst✝¹¹ : NormedSpace 𝕜 E''\ninst✝¹⁰ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁹ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ninst✝⁶ : AddGroup G\ninst✝⁵ : TopologicalSpace G\ninst✝⁴ : TopologicalAddGroup G\ninst✝³ : BorelSpace G\ninst✝² : FirstCountableTopology G\ninst✝¹ : TopologicalSpace P\ninst✝ : FirstCountableTopology P\ng : P → G → E'\ns : Set P\nk : Set G\nhk : IsCompact k\nh'k : IsClosed k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContinuousOn (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nB : ∀ (p : P), p ∈ s → tsupport (g p) ⊆ k\nw : Set P\nC : ℝ\nw_open : IsOpen w\nq₀w : q₀.fst ∈ w\nhw : ∀ (p : P) (x : G), p ∈ w ∩ s → ‖g p x‖ ≤ C\nI1 : ∀ᶠ (q : P × G) in 𝓝[s ×ˢ univ] q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g q.fst (q.snd - a))) μ\nK' : Set G := -k + {q₀.snd}\nhK' : IsCompact K'\nU : Set G\nU_open : IsOpen U\nK'U : K' ⊆ U\nhU : IntegrableOn f U\nbound : G → ℝ := indicator U fun a => ‖L‖ * ‖f a‖ * C\nV : Set G\nV_mem : V ∈ 𝓝 0\nhV : K' + V ⊆ U\nthis : (w ∩ s) ×ˢ ({q₀.snd} + V) ∈ 𝓝[s ×ˢ univ] q₀\np : P\nx : G\nhpx : p ∈ w ∩ s ∧ x ∈ {q₀.snd} + V\na : G\n⊢ ∀ (i : G), ‖g (p, x).fst i‖ ≤ C\n[PROOFSTEP]\nintro x\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : NormedAddCommGroup E'\ninst✝¹⁶ : NormedAddCommGroup E''\ninst✝¹⁵ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx✝¹ x' : G\ny y' : E\ninst✝¹⁴ : NontriviallyNormedField 𝕜\ninst✝¹³ : NormedSpace 𝕜 E\ninst✝¹² : NormedSpace 𝕜 E'\ninst✝¹¹ : NormedSpace 𝕜 E''\ninst✝¹⁰ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁹ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ninst✝⁶ : AddGroup G\ninst✝⁵ : TopologicalSpace G\ninst✝⁴ : TopologicalAddGroup G\ninst✝³ : BorelSpace G\ninst✝² : FirstCountableTopology G\ninst✝¹ : TopologicalSpace P\ninst✝ : FirstCountableTopology P\ng : P → G → E'\ns : Set P\nk : Set G\nhk : IsCompact k\nh'k : IsClosed k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContinuousOn (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nB : ∀ (p : P), p ∈ s → tsupport (g p) ⊆ k\nw : Set P\nC : ℝ\nw_open : IsOpen w\nq₀w : q₀.fst ∈ w\nhw : ∀ (p : P) (x : G), p ∈ w ∩ s → ‖g p x‖ ≤ C\nI1 : ∀ᶠ (q : P × G) in 𝓝[s ×ˢ univ] q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g q.fst (q.snd - a))) μ\nK' : Set G := -k + {q₀.snd}\nhK' : IsCompact K'\nU : Set G\nU_open : IsOpen U\nK'U : K' ⊆ U\nhU : IntegrableOn f U\nbound : G → ℝ := indicator U fun a => ‖L‖ * ‖f a‖ * C\nV : Set G\nV_mem : V ∈ 𝓝 0\nhV : K' + V ⊆ U\nthis : (w ∩ s) ×ˢ ({q₀.snd} + V) ∈ 𝓝[s ×ˢ univ] q₀\np : P\nx✝ : G\nhpx : p ∈ w ∩ s ∧ x✝ ∈ {q₀.snd} + V\na x : G\n⊢ ‖g (p, x✝).fst x‖ ≤ C\n[PROOFSTEP]\nexact hw _ _ hpx.1\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : NormedAddCommGroup E'\ninst✝¹⁶ : NormedAddCommGroup E''\ninst✝¹⁵ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹⁴ : NontriviallyNormedField 𝕜\ninst✝¹³ : NormedSpace 𝕜 E\ninst✝¹² : NormedSpace 𝕜 E'\ninst✝¹¹ : NormedSpace 𝕜 E''\ninst✝¹⁰ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁹ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ninst✝⁶ : AddGroup G\ninst✝⁵ : TopologicalSpace G\ninst✝⁴ : TopologicalAddGroup G\ninst✝³ : BorelSpace G\ninst✝² : FirstCountableTopology G\ninst✝¹ : TopologicalSpace P\ninst✝ : FirstCountableTopology P\ng : P → G → E'\ns : Set P\nk : Set G\nhk : IsCompact k\nh'k : IsClosed k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContinuousOn (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nB : ∀ (p : P), p ∈ s → tsupport (g p) ⊆ k\nw : Set P\nC : ℝ\nw_open : IsOpen w\nq₀w : q₀.fst ∈ w\nhw : ∀ (p : P) (x : G), p ∈ w ∩ s → ‖g p x‖ ≤ C\nI1 : ∀ᶠ (q : P × G) in 𝓝[s ×ˢ univ] q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g q.fst (q.snd - a))) μ\nK' : Set G := -k + {q₀.snd}\nhK' : IsCompact K'\nU : Set G\nU_open : IsOpen U\nK'U : K' ⊆ U\nhU : IntegrableOn f U\nbound : G → ℝ := indicator U fun a => ‖L‖ * ‖f a‖ * C\nV : Set G\nV_mem : V ∈ 𝓝 0\nhV : K' + V ⊆ U\nthis : (w ∩ s) ×ˢ ({q₀.snd} + V) ∈ 𝓝[s ×ˢ univ] q₀\np : P\nx : G\nhpx : p ∈ w ∩ s ∧ x ∈ {q₀.snd} + V\na : G\n⊢ -tsupport (g (p, x).fst) + ({q₀.snd} + V) ⊆ U\n[PROOFSTEP]\nrw [← add_assoc]\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : NormedAddCommGroup E'\ninst✝¹⁶ : NormedAddCommGroup E''\ninst✝¹⁵ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹⁴ : NontriviallyNormedField 𝕜\ninst✝¹³ : NormedSpace 𝕜 E\ninst✝¹² : NormedSpace 𝕜 E'\ninst✝¹¹ : NormedSpace 𝕜 E''\ninst✝¹⁰ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁹ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ninst✝⁶ : AddGroup G\ninst✝⁵ : TopologicalSpace G\ninst✝⁴ : TopologicalAddGroup G\ninst✝³ : BorelSpace G\ninst✝² : FirstCountableTopology G\ninst✝¹ : TopologicalSpace P\ninst✝ : FirstCountableTopology P\ng : P → G → E'\ns : Set P\nk : Set G\nhk : IsCompact k\nh'k : IsClosed k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContinuousOn (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nB : ∀ (p : P), p ∈ s → tsupport (g p) ⊆ k\nw : Set P\nC : ℝ\nw_open : IsOpen w\nq₀w : q₀.fst ∈ w\nhw : ∀ (p : P) (x : G), p ∈ w ∩ s → ‖g p x‖ ≤ C\nI1 : ∀ᶠ (q : P × G) in 𝓝[s ×ˢ univ] q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g q.fst (q.snd - a))) μ\nK' : Set G := -k + {q₀.snd}\nhK' : IsCompact K'\nU : Set G\nU_open : IsOpen U\nK'U : K' ⊆ U\nhU : IntegrableOn f U\nbound : G → ℝ := indicator U fun a => ‖L‖ * ‖f a‖ * C\nV : Set G\nV_mem : V ∈ 𝓝 0\nhV : K' + V ⊆ U\nthis : (w ∩ s) ×ˢ ({q₀.snd} + V) ∈ 𝓝[s ×ˢ univ] q₀\np : P\nx : G\nhpx : p ∈ w ∩ s ∧ x ∈ {q₀.snd} + V\na : G\n⊢ -tsupport (g (p, x).fst) + {q₀.snd} + V ⊆ U\n[PROOFSTEP]\napply Subset.trans (add_subset_add_right (add_subset_add_right _)) hV\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : NormedAddCommGroup E'\ninst✝¹⁶ : NormedAddCommGroup E''\ninst✝¹⁵ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹⁴ : NontriviallyNormedField 𝕜\ninst✝¹³ : NormedSpace 𝕜 E\ninst✝¹² : NormedSpace 𝕜 E'\ninst✝¹¹ : NormedSpace 𝕜 E''\ninst✝¹⁰ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁹ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ninst✝⁶ : AddGroup G\ninst✝⁵ : TopologicalSpace G\ninst✝⁴ : TopologicalAddGroup G\ninst✝³ : BorelSpace G\ninst✝² : FirstCountableTopology G\ninst✝¹ : TopologicalSpace P\ninst✝ : FirstCountableTopology P\ng : P → G → E'\ns : Set P\nk : Set G\nhk : IsCompact k\nh'k : IsClosed k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContinuousOn (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nB : ∀ (p : P), p ∈ s → tsupport (g p) ⊆ k\nw : Set P\nC : ℝ\nw_open : IsOpen w\nq₀w : q₀.fst ∈ w\nhw : ∀ (p : P) (x : G), p ∈ w ∩ s → ‖g p x‖ ≤ C\nI1 : ∀ᶠ (q : P × G) in 𝓝[s ×ˢ univ] q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g q.fst (q.snd - a))) μ\nK' : Set G := -k + {q₀.snd}\nhK' : IsCompact K'\nU : Set G\nU_open : IsOpen U\nK'U : K' ⊆ U\nhU : IntegrableOn f U\nbound : G → ℝ := indicator U fun a => ‖L‖ * ‖f a‖ * C\nV : Set G\nV_mem : V ∈ 𝓝 0\nhV : K' + V ⊆ U\nthis : (w ∩ s) ×ˢ ({q₀.snd} + V) ∈ 𝓝[s ×ˢ univ] q₀\np : P\nx : G\nhpx : p ∈ w ∩ s ∧ x ∈ {q₀.snd} + V\na : G\n⊢ -tsupport (g (p, x).fst) ⊆ -k\n[PROOFSTEP]\nrw [neg_subset_neg]\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : NormedAddCommGroup E'\ninst✝¹⁶ : NormedAddCommGroup E''\ninst✝¹⁵ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹⁴ : NontriviallyNormedField 𝕜\ninst✝¹³ : NormedSpace 𝕜 E\ninst✝¹² : NormedSpace 𝕜 E'\ninst✝¹¹ : NormedSpace 𝕜 E''\ninst✝¹⁰ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁹ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ninst✝⁶ : AddGroup G\ninst✝⁵ : TopologicalSpace G\ninst✝⁴ : TopologicalAddGroup G\ninst✝³ : BorelSpace G\ninst✝² : FirstCountableTopology G\ninst✝¹ : TopologicalSpace P\ninst✝ : FirstCountableTopology P\ng : P → G → E'\ns : Set P\nk : Set G\nhk : IsCompact k\nh'k : IsClosed k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContinuousOn (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nB : ∀ (p : P), p ∈ s → tsupport (g p) ⊆ k\nw : Set P\nC : ℝ\nw_open : IsOpen w\nq₀w : q₀.fst ∈ w\nhw : ∀ (p : P) (x : G), p ∈ w ∩ s → ‖g p x‖ ≤ C\nI1 : ∀ᶠ (q : P × G) in 𝓝[s ×ˢ univ] q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g q.fst (q.snd - a))) μ\nK' : Set G := -k + {q₀.snd}\nhK' : IsCompact K'\nU : Set G\nU_open : IsOpen U\nK'U : K' ⊆ U\nhU : IntegrableOn f U\nbound : G → ℝ := indicator U fun a => ‖L‖ * ‖f a‖ * C\nV : Set G\nV_mem : V ∈ 𝓝 0\nhV : K' + V ⊆ U\nthis : (w ∩ s) ×ˢ ({q₀.snd} + V) ∈ 𝓝[s ×ˢ univ] q₀\np : P\nx : G\nhpx : p ∈ w ∩ s ∧ x ∈ {q₀.snd} + V\na : G\n⊢ tsupport (g (p, x).fst) ⊆ k\n[PROOFSTEP]\nexact B p hpx.1.2\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : NormedAddCommGroup E'\ninst✝¹⁶ : NormedAddCommGroup E''\ninst✝¹⁵ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁴ : NontriviallyNormedField 𝕜\ninst✝¹³ : NormedSpace 𝕜 E\ninst✝¹² : NormedSpace 𝕜 E'\ninst✝¹¹ : NormedSpace 𝕜 E''\ninst✝¹⁰ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁹ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ninst✝⁶ : AddGroup G\ninst✝⁵ : TopologicalSpace G\ninst✝⁴ : TopologicalAddGroup G\ninst✝³ : BorelSpace G\ninst✝² : FirstCountableTopology G\ninst✝¹ : TopologicalSpace P\ninst✝ : FirstCountableTopology P\ng : P → G → E'\ns : Set P\nk : Set G\nhk : IsCompact k\nh'k : IsClosed k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContinuousOn (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nB : ∀ (p : P), p ∈ s → tsupport (g p) ⊆ k\nw : Set P\nC : ℝ\nw_open : IsOpen w\nq₀w : q₀.fst ∈ w\nhw : ∀ (p : P) (x : G), p ∈ w ∩ s → ‖g p x‖ ≤ C\nI1 : ∀ᶠ (q : P × G) in 𝓝[s ×ˢ univ] q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g q.fst (q.snd - a))) μ\nK' : Set G := -k + {q₀.snd}\nhK' : IsCompact K'\nU : Set G\nU_open : IsOpen U\nK'U : K' ⊆ U\nhU : IntegrableOn f U\nbound : G → ℝ := indicator U fun a => ‖L‖ * ‖f a‖ * C\nI2 : ∀ᶠ (q : P × G) in 𝓝[s ×ˢ univ] q₀, ∀ᵐ (a : G) ∂μ, ‖↑(↑L (f a)) (g q.fst (q.snd - a))‖ ≤ bound a\n⊢ ContinuousWithinAt (fun q => f ⋆[L, q.snd] g q.fst) (s ×ˢ univ) q₀\n[PROOFSTEP]\nhave I3 : Integrable bound μ := by\n  rw [integrable_indicator_iff U_open.measurableSet]\n  exact (hU.norm.const_mul _).mul_const _\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : NormedAddCommGroup E'\ninst✝¹⁶ : NormedAddCommGroup E''\ninst✝¹⁵ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁴ : NontriviallyNormedField 𝕜\ninst✝¹³ : NormedSpace 𝕜 E\ninst✝¹² : NormedSpace 𝕜 E'\ninst✝¹¹ : NormedSpace 𝕜 E''\ninst✝¹⁰ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁹ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ninst✝⁶ : AddGroup G\ninst✝⁵ : TopologicalSpace G\ninst✝⁴ : TopologicalAddGroup G\ninst✝³ : BorelSpace G\ninst✝² : FirstCountableTopology G\ninst✝¹ : TopologicalSpace P\ninst✝ : FirstCountableTopology P\ng : P → G → E'\ns : Set P\nk : Set G\nhk : IsCompact k\nh'k : IsClosed k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContinuousOn (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nB : ∀ (p : P), p ∈ s → tsupport (g p) ⊆ k\nw : Set P\nC : ℝ\nw_open : IsOpen w\nq₀w : q₀.fst ∈ w\nhw : ∀ (p : P) (x : G), p ∈ w ∩ s → ‖g p x‖ ≤ C\nI1 : ∀ᶠ (q : P × G) in 𝓝[s ×ˢ univ] q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g q.fst (q.snd - a))) μ\nK' : Set G := -k + {q₀.snd}\nhK' : IsCompact K'\nU : Set G\nU_open : IsOpen U\nK'U : K' ⊆ U\nhU : IntegrableOn f U\nbound : G → ℝ := indicator U fun a => ‖L‖ * ‖f a‖ * C\nI2 : ∀ᶠ (q : P × G) in 𝓝[s ×ˢ univ] q₀, ∀ᵐ (a : G) ∂μ, ‖↑(↑L (f a)) (g q.fst (q.snd - a))‖ ≤ bound a\n⊢ Integrable bound\n[PROOFSTEP]\nrw [integrable_indicator_iff U_open.measurableSet]\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : NormedAddCommGroup E'\ninst✝¹⁶ : NormedAddCommGroup E''\ninst✝¹⁵ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁴ : NontriviallyNormedField 𝕜\ninst✝¹³ : NormedSpace 𝕜 E\ninst✝¹² : NormedSpace 𝕜 E'\ninst✝¹¹ : NormedSpace 𝕜 E''\ninst✝¹⁰ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁹ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ninst✝⁶ : AddGroup G\ninst✝⁵ : TopologicalSpace G\ninst✝⁴ : TopologicalAddGroup G\ninst✝³ : BorelSpace G\ninst✝² : FirstCountableTopology G\ninst✝¹ : TopologicalSpace P\ninst✝ : FirstCountableTopology P\ng : P → G → E'\ns : Set P\nk : Set G\nhk : IsCompact k\nh'k : IsClosed k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContinuousOn (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nB : ∀ (p : P), p ∈ s → tsupport (g p) ⊆ k\nw : Set P\nC : ℝ\nw_open : IsOpen w\nq₀w : q₀.fst ∈ w\nhw : ∀ (p : P) (x : G), p ∈ w ∩ s → ‖g p x‖ ≤ C\nI1 : ∀ᶠ (q : P × G) in 𝓝[s ×ˢ univ] q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g q.fst (q.snd - a))) μ\nK' : Set G := -k + {q₀.snd}\nhK' : IsCompact K'\nU : Set G\nU_open : IsOpen U\nK'U : K' ⊆ U\nhU : IntegrableOn f U\nbound : G → ℝ := indicator U fun a => ‖L‖ * ‖f a‖ * C\nI2 : ∀ᶠ (q : P × G) in 𝓝[s ×ˢ univ] q₀, ∀ᵐ (a : G) ∂μ, ‖↑(↑L (f a)) (g q.fst (q.snd - a))‖ ≤ bound a\n⊢ IntegrableOn (fun a => ‖L‖ * ‖f a‖ * C) U\n[PROOFSTEP]\nexact (hU.norm.const_mul _).mul_const _\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : NormedAddCommGroup E'\ninst✝¹⁶ : NormedAddCommGroup E''\ninst✝¹⁵ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁴ : NontriviallyNormedField 𝕜\ninst✝¹³ : NormedSpace 𝕜 E\ninst✝¹² : NormedSpace 𝕜 E'\ninst✝¹¹ : NormedSpace 𝕜 E''\ninst✝¹⁰ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁹ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ninst✝⁶ : AddGroup G\ninst✝⁵ : TopologicalSpace G\ninst✝⁴ : TopologicalAddGroup G\ninst✝³ : BorelSpace G\ninst✝² : FirstCountableTopology G\ninst✝¹ : TopologicalSpace P\ninst✝ : FirstCountableTopology P\ng : P → G → E'\ns : Set P\nk : Set G\nhk : IsCompact k\nh'k : IsClosed k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContinuousOn (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nB : ∀ (p : P), p ∈ s → tsupport (g p) ⊆ k\nw : Set P\nC : ℝ\nw_open : IsOpen w\nq₀w : q₀.fst ∈ w\nhw : ∀ (p : P) (x : G), p ∈ w ∩ s → ‖g p x‖ ≤ C\nI1 : ∀ᶠ (q : P × G) in 𝓝[s ×ˢ univ] q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g q.fst (q.snd - a))) μ\nK' : Set G := -k + {q₀.snd}\nhK' : IsCompact K'\nU : Set G\nU_open : IsOpen U\nK'U : K' ⊆ U\nhU : IntegrableOn f U\nbound : G → ℝ := indicator U fun a => ‖L‖ * ‖f a‖ * C\nI2 : ∀ᶠ (q : P × G) in 𝓝[s ×ˢ univ] q₀, ∀ᵐ (a : G) ∂μ, ‖↑(↑L (f a)) (g q.fst (q.snd - a))‖ ≤ bound a\nI3 : Integrable bound\n⊢ ContinuousWithinAt (fun q => f ⋆[L, q.snd] g q.fst) (s ×ˢ univ) q₀\n[PROOFSTEP]\nhave I4 : ∀ᵐ a : G ∂μ, ContinuousWithinAt (fun q : P × G => L (f a) (g q.1 (q.2 - a))) (s ×ˢ univ) q₀ :=\n  by\n  refine eventually_of_forall fun a => ?_\n  suffices H : ContinuousWithinAt (fun q : P × G => (f a, g q.1 (q.2 - a))) (s ×ˢ univ) q₀\n  exact L.continuous₂.continuousAt.comp_continuousWithinAt H\n  apply continuousWithinAt_const.prod\n  change ContinuousWithinAt (fun q : P × G => (↿g) (q.1, q.2 - a)) (s ×ˢ univ) q₀\n  have : ContinuousAt (fun q : P × G => (q.1, q.2 - a)) (q₀.1, q₀.2) :=\n    (continuous_fst.prod_mk (continuous_snd.sub continuous_const)).continuousAt\n  rw [← @Prod.mk.eta _ _ q₀]\n  have h'q₀ : (q₀.1, q₀.2 - a) ∈ (s ×ˢ univ : Set (P × G)) := ⟨hq₀, mem_univ _⟩\n  refine' ContinuousWithinAt.comp (hg _ h'q₀) this.continuousWithinAt _\n  rintro ⟨q, x⟩ ⟨hq, -⟩\n  exact ⟨hq, mem_univ _⟩\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : NormedAddCommGroup E'\ninst✝¹⁶ : NormedAddCommGroup E''\ninst✝¹⁵ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁴ : NontriviallyNormedField 𝕜\ninst✝¹³ : NormedSpace 𝕜 E\ninst✝¹² : NormedSpace 𝕜 E'\ninst✝¹¹ : NormedSpace 𝕜 E''\ninst✝¹⁰ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁹ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ninst✝⁶ : AddGroup G\ninst✝⁵ : TopologicalSpace G\ninst✝⁴ : TopologicalAddGroup G\ninst✝³ : BorelSpace G\ninst✝² : FirstCountableTopology G\ninst✝¹ : TopologicalSpace P\ninst✝ : FirstCountableTopology P\ng : P → G → E'\ns : Set P\nk : Set G\nhk : IsCompact k\nh'k : IsClosed k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContinuousOn (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nB : ∀ (p : P), p ∈ s → tsupport (g p) ⊆ k\nw : Set P\nC : ℝ\nw_open : IsOpen w\nq₀w : q₀.fst ∈ w\nhw : ∀ (p : P) (x : G), p ∈ w ∩ s → ‖g p x‖ ≤ C\nI1 : ∀ᶠ (q : P × G) in 𝓝[s ×ˢ univ] q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g q.fst (q.snd - a))) μ\nK' : Set G := -k + {q₀.snd}\nhK' : IsCompact K'\nU : Set G\nU_open : IsOpen U\nK'U : K' ⊆ U\nhU : IntegrableOn f U\nbound : G → ℝ := indicator U fun a => ‖L‖ * ‖f a‖ * C\nI2 : ∀ᶠ (q : P × G) in 𝓝[s ×ˢ univ] q₀, ∀ᵐ (a : G) ∂μ, ‖↑(↑L (f a)) (g q.fst (q.snd - a))‖ ≤ bound a\nI3 : Integrable bound\n⊢ ∀ᵐ (a : G) ∂μ, ContinuousWithinAt (fun q => ↑(↑L (f a)) (g q.fst (q.snd - a))) (s ×ˢ univ) q₀\n[PROOFSTEP]\nrefine eventually_of_forall fun a => ?_\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : NormedAddCommGroup E'\ninst✝¹⁶ : NormedAddCommGroup E''\ninst✝¹⁵ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁴ : NontriviallyNormedField 𝕜\ninst✝¹³ : NormedSpace 𝕜 E\ninst✝¹² : NormedSpace 𝕜 E'\ninst✝¹¹ : NormedSpace 𝕜 E''\ninst✝¹⁰ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁹ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ninst✝⁶ : AddGroup G\ninst✝⁵ : TopologicalSpace G\ninst✝⁴ : TopologicalAddGroup G\ninst✝³ : BorelSpace G\ninst✝² : FirstCountableTopology G\ninst✝¹ : TopologicalSpace P\ninst✝ : FirstCountableTopology P\ng : P → G → E'\ns : Set P\nk : Set G\nhk : IsCompact k\nh'k : IsClosed k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContinuousOn (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nB : ∀ (p : P), p ∈ s → tsupport (g p) ⊆ k\nw : Set P\nC : ℝ\nw_open : IsOpen w\nq₀w : q₀.fst ∈ w\nhw : ∀ (p : P) (x : G), p ∈ w ∩ s → ‖g p x‖ ≤ C\nI1 : ∀ᶠ (q : P × G) in 𝓝[s ×ˢ univ] q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g q.fst (q.snd - a))) μ\nK' : Set G := -k + {q₀.snd}\nhK' : IsCompact K'\nU : Set G\nU_open : IsOpen U\nK'U : K' ⊆ U\nhU : IntegrableOn f U\nbound : G → ℝ := indicator U fun a => ‖L‖ * ‖f a‖ * C\nI2 : ∀ᶠ (q : P × G) in 𝓝[s ×ˢ univ] q₀, ∀ᵐ (a : G) ∂μ, ‖↑(↑L (f a)) (g q.fst (q.snd - a))‖ ≤ bound a\nI3 : Integrable bound\na : G\n⊢ ContinuousWithinAt (fun q => ↑(↑L (f a)) (g q.fst (q.snd - a))) (s ×ˢ univ) q₀\n[PROOFSTEP]\nsuffices H : ContinuousWithinAt (fun q : P × G => (f a, g q.1 (q.2 - a))) (s ×ˢ univ) q₀\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : NormedAddCommGroup E'\ninst✝¹⁶ : NormedAddCommGroup E''\ninst✝¹⁵ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁴ : NontriviallyNormedField 𝕜\ninst✝¹³ : NormedSpace 𝕜 E\ninst✝¹² : NormedSpace 𝕜 E'\ninst✝¹¹ : NormedSpace 𝕜 E''\ninst✝¹⁰ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁹ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ninst✝⁶ : AddGroup G\ninst✝⁵ : TopologicalSpace G\ninst✝⁴ : TopologicalAddGroup G\ninst✝³ : BorelSpace G\ninst✝² : FirstCountableTopology G\ninst✝¹ : TopologicalSpace P\ninst✝ : FirstCountableTopology P\ng : P → G → E'\ns : Set P\nk : Set G\nhk : IsCompact k\nh'k : IsClosed k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContinuousOn (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nB : ∀ (p : P), p ∈ s → tsupport (g p) ⊆ k\nw : Set P\nC : ℝ\nw_open : IsOpen w\nq₀w : q₀.fst ∈ w\nhw : ∀ (p : P) (x : G), p ∈ w ∩ s → ‖g p x‖ ≤ C\nI1 : ∀ᶠ (q : P × G) in 𝓝[s ×ˢ univ] q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g q.fst (q.snd - a))) μ\nK' : Set G := -k + {q₀.snd}\nhK' : IsCompact K'\nU : Set G\nU_open : IsOpen U\nK'U : K' ⊆ U\nhU : IntegrableOn f U\nbound : G → ℝ := indicator U fun a => ‖L‖ * ‖f a‖ * C\nI2 : ∀ᶠ (q : P × G) in 𝓝[s ×ˢ univ] q₀, ∀ᵐ (a : G) ∂μ, ‖↑(↑L (f a)) (g q.fst (q.snd - a))‖ ≤ bound a\nI3 : Integrable bound\na : G\nH : ContinuousWithinAt (fun q => (f a, g q.fst (q.snd - a))) (s ×ˢ univ) q₀\n⊢ ContinuousWithinAt (fun q => ↑(↑L (f a)) (g q.fst (q.snd - a))) (s ×ˢ univ) q₀\ncase H\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : NormedAddCommGroup E'\ninst✝¹⁶ : NormedAddCommGroup E''\ninst✝¹⁵ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁴ : NontriviallyNormedField 𝕜\ninst✝¹³ : NormedSpace 𝕜 E\ninst✝¹² : NormedSpace 𝕜 E'\ninst✝¹¹ : NormedSpace 𝕜 E''\ninst✝¹⁰ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁹ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ninst✝⁶ : AddGroup G\ninst✝⁵ : TopologicalSpace G\ninst✝⁴ : TopologicalAddGroup G\ninst✝³ : BorelSpace G\ninst✝² : FirstCountableTopology G\ninst✝¹ : TopologicalSpace P\ninst✝ : FirstCountableTopology P\ng : P → G → E'\ns : Set P\nk : Set G\nhk : IsCompact k\nh'k : IsClosed k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContinuousOn (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nB : ∀ (p : P), p ∈ s → tsupport (g p) ⊆ k\nw : Set P\nC : ℝ\nw_open : IsOpen w\nq₀w : q₀.fst ∈ w\nhw : ∀ (p : P) (x : G), p ∈ w ∩ s → ‖g p x‖ ≤ C\nI1 : ∀ᶠ (q : P × G) in 𝓝[s ×ˢ univ] q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g q.fst (q.snd - a))) μ\nK' : Set G := -k + {q₀.snd}\nhK' : IsCompact K'\nU : Set G\nU_open : IsOpen U\nK'U : K' ⊆ U\nhU : IntegrableOn f U\nbound : G → ℝ := indicator U fun a => ‖L‖ * ‖f a‖ * C\nI2 : ∀ᶠ (q : P × G) in 𝓝[s ×ˢ univ] q₀, ∀ᵐ (a : G) ∂μ, ‖↑(↑L (f a)) (g q.fst (q.snd - a))‖ ≤ bound a\nI3 : Integrable bound\na : G\n⊢ ContinuousWithinAt (fun q => (f a, g q.fst (q.snd - a))) (s ×ˢ univ) q₀\n[PROOFSTEP]\nexact L.continuous₂.continuousAt.comp_continuousWithinAt H\n[GOAL]\ncase H\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : NormedAddCommGroup E'\ninst✝¹⁶ : NormedAddCommGroup E''\ninst✝¹⁵ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁴ : NontriviallyNormedField 𝕜\ninst✝¹³ : NormedSpace 𝕜 E\ninst✝¹² : NormedSpace 𝕜 E'\ninst✝¹¹ : NormedSpace 𝕜 E''\ninst✝¹⁰ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁹ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ninst✝⁶ : AddGroup G\ninst✝⁵ : TopologicalSpace G\ninst✝⁴ : TopologicalAddGroup G\ninst✝³ : BorelSpace G\ninst✝² : FirstCountableTopology G\ninst✝¹ : TopologicalSpace P\ninst✝ : FirstCountableTopology P\ng : P → G → E'\ns : Set P\nk : Set G\nhk : IsCompact k\nh'k : IsClosed k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContinuousOn (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nB : ∀ (p : P), p ∈ s → tsupport (g p) ⊆ k\nw : Set P\nC : ℝ\nw_open : IsOpen w\nq₀w : q₀.fst ∈ w\nhw : ∀ (p : P) (x : G), p ∈ w ∩ s → ‖g p x‖ ≤ C\nI1 : ∀ᶠ (q : P × G) in 𝓝[s ×ˢ univ] q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g q.fst (q.snd - a))) μ\nK' : Set G := -k + {q₀.snd}\nhK' : IsCompact K'\nU : Set G\nU_open : IsOpen U\nK'U : K' ⊆ U\nhU : IntegrableOn f U\nbound : G → ℝ := indicator U fun a => ‖L‖ * ‖f a‖ * C\nI2 : ∀ᶠ (q : P × G) in 𝓝[s ×ˢ univ] q₀, ∀ᵐ (a : G) ∂μ, ‖↑(↑L (f a)) (g q.fst (q.snd - a))‖ ≤ bound a\nI3 : Integrable bound\na : G\n⊢ ContinuousWithinAt (fun q => (f a, g q.fst (q.snd - a))) (s ×ˢ univ) q₀\n[PROOFSTEP]\napply continuousWithinAt_const.prod\n[GOAL]\ncase H\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : NormedAddCommGroup E'\ninst✝¹⁶ : NormedAddCommGroup E''\ninst✝¹⁵ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁴ : NontriviallyNormedField 𝕜\ninst✝¹³ : NormedSpace 𝕜 E\ninst✝¹² : NormedSpace 𝕜 E'\ninst✝¹¹ : NormedSpace 𝕜 E''\ninst✝¹⁰ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁹ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ninst✝⁶ : AddGroup G\ninst✝⁵ : TopologicalSpace G\ninst✝⁴ : TopologicalAddGroup G\ninst✝³ : BorelSpace G\ninst✝² : FirstCountableTopology G\ninst✝¹ : TopologicalSpace P\ninst✝ : FirstCountableTopology P\ng : P → G → E'\ns : Set P\nk : Set G\nhk : IsCompact k\nh'k : IsClosed k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContinuousOn (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nB : ∀ (p : P), p ∈ s → tsupport (g p) ⊆ k\nw : Set P\nC : ℝ\nw_open : IsOpen w\nq₀w : q₀.fst ∈ w\nhw : ∀ (p : P) (x : G), p ∈ w ∩ s → ‖g p x‖ ≤ C\nI1 : ∀ᶠ (q : P × G) in 𝓝[s ×ˢ univ] q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g q.fst (q.snd - a))) μ\nK' : Set G := -k + {q₀.snd}\nhK' : IsCompact K'\nU : Set G\nU_open : IsOpen U\nK'U : K' ⊆ U\nhU : IntegrableOn f U\nbound : G → ℝ := indicator U fun a => ‖L‖ * ‖f a‖ * C\nI2 : ∀ᶠ (q : P × G) in 𝓝[s ×ˢ univ] q₀, ∀ᵐ (a : G) ∂μ, ‖↑(↑L (f a)) (g q.fst (q.snd - a))‖ ≤ bound a\nI3 : Integrable bound\na : G\n⊢ ContinuousWithinAt (fun x => g x.fst (x.snd - a)) (s ×ˢ univ) q₀\n[PROOFSTEP]\nchange ContinuousWithinAt (fun q : P × G => (↿g) (q.1, q.2 - a)) (s ×ˢ univ) q₀\n[GOAL]\ncase H\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : NormedAddCommGroup E'\ninst✝¹⁶ : NormedAddCommGroup E''\ninst✝¹⁵ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁴ : NontriviallyNormedField 𝕜\ninst✝¹³ : NormedSpace 𝕜 E\ninst✝¹² : NormedSpace 𝕜 E'\ninst✝¹¹ : NormedSpace 𝕜 E''\ninst✝¹⁰ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁹ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ninst✝⁶ : AddGroup G\ninst✝⁵ : TopologicalSpace G\ninst✝⁴ : TopologicalAddGroup G\ninst✝³ : BorelSpace G\ninst✝² : FirstCountableTopology G\ninst✝¹ : TopologicalSpace P\ninst✝ : FirstCountableTopology P\ng : P → G → E'\ns : Set P\nk : Set G\nhk : IsCompact k\nh'k : IsClosed k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContinuousOn (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nB : ∀ (p : P), p ∈ s → tsupport (g p) ⊆ k\nw : Set P\nC : ℝ\nw_open : IsOpen w\nq₀w : q₀.fst ∈ w\nhw : ∀ (p : P) (x : G), p ∈ w ∩ s → ‖g p x‖ ≤ C\nI1 : ∀ᶠ (q : P × G) in 𝓝[s ×ˢ univ] q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g q.fst (q.snd - a))) μ\nK' : Set G := -k + {q₀.snd}\nhK' : IsCompact K'\nU : Set G\nU_open : IsOpen U\nK'U : K' ⊆ U\nhU : IntegrableOn f U\nbound : G → ℝ := indicator U fun a => ‖L‖ * ‖f a‖ * C\nI2 : ∀ᶠ (q : P × G) in 𝓝[s ×ˢ univ] q₀, ∀ᵐ (a : G) ∂μ, ‖↑(↑L (f a)) (g q.fst (q.snd - a))‖ ≤ bound a\nI3 : Integrable bound\na : G\n⊢ ContinuousWithinAt (fun q => (↿g) (q.fst, q.snd - a)) (s ×ˢ univ) q₀\n[PROOFSTEP]\nhave : ContinuousAt (fun q : P × G => (q.1, q.2 - a)) (q₀.1, q₀.2) :=\n  (continuous_fst.prod_mk (continuous_snd.sub continuous_const)).continuousAt\n[GOAL]\ncase H\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : NormedAddCommGroup E'\ninst✝¹⁶ : NormedAddCommGroup E''\ninst✝¹⁵ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁴ : NontriviallyNormedField 𝕜\ninst✝¹³ : NormedSpace 𝕜 E\ninst✝¹² : NormedSpace 𝕜 E'\ninst✝¹¹ : NormedSpace 𝕜 E''\ninst✝¹⁰ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁹ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ninst✝⁶ : AddGroup G\ninst✝⁵ : TopologicalSpace G\ninst✝⁴ : TopologicalAddGroup G\ninst✝³ : BorelSpace G\ninst✝² : FirstCountableTopology G\ninst✝¹ : TopologicalSpace P\ninst✝ : FirstCountableTopology P\ng : P → G → E'\ns : Set P\nk : Set G\nhk : IsCompact k\nh'k : IsClosed k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContinuousOn (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nB : ∀ (p : P), p ∈ s → tsupport (g p) ⊆ k\nw : Set P\nC : ℝ\nw_open : IsOpen w\nq₀w : q₀.fst ∈ w\nhw : ∀ (p : P) (x : G), p ∈ w ∩ s → ‖g p x‖ ≤ C\nI1 : ∀ᶠ (q : P × G) in 𝓝[s ×ˢ univ] q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g q.fst (q.snd - a))) μ\nK' : Set G := -k + {q₀.snd}\nhK' : IsCompact K'\nU : Set G\nU_open : IsOpen U\nK'U : K' ⊆ U\nhU : IntegrableOn f U\nbound : G → ℝ := indicator U fun a => ‖L‖ * ‖f a‖ * C\nI2 : ∀ᶠ (q : P × G) in 𝓝[s ×ˢ univ] q₀, ∀ᵐ (a : G) ∂μ, ‖↑(↑L (f a)) (g q.fst (q.snd - a))‖ ≤ bound a\nI3 : Integrable bound\na : G\nthis : ContinuousAt (fun q => (q.fst, q.snd - a)) (q₀.fst, q₀.snd)\n⊢ ContinuousWithinAt (fun q => (↿g) (q.fst, q.snd - a)) (s ×ˢ univ) q₀\n[PROOFSTEP]\nrw [← @Prod.mk.eta _ _ q₀]\n[GOAL]\ncase H\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : NormedAddCommGroup E'\ninst✝¹⁶ : NormedAddCommGroup E''\ninst✝¹⁵ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁴ : NontriviallyNormedField 𝕜\ninst✝¹³ : NormedSpace 𝕜 E\ninst✝¹² : NormedSpace 𝕜 E'\ninst✝¹¹ : NormedSpace 𝕜 E''\ninst✝¹⁰ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁹ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ninst✝⁶ : AddGroup G\ninst✝⁵ : TopologicalSpace G\ninst✝⁴ : TopologicalAddGroup G\ninst✝³ : BorelSpace G\ninst✝² : FirstCountableTopology G\ninst✝¹ : TopologicalSpace P\ninst✝ : FirstCountableTopology P\ng : P → G → E'\ns : Set P\nk : Set G\nhk : IsCompact k\nh'k : IsClosed k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContinuousOn (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nB : ∀ (p : P), p ∈ s → tsupport (g p) ⊆ k\nw : Set P\nC : ℝ\nw_open : IsOpen w\nq₀w : q₀.fst ∈ w\nhw : ∀ (p : P) (x : G), p ∈ w ∩ s → ‖g p x‖ ≤ C\nI1 : ∀ᶠ (q : P × G) in 𝓝[s ×ˢ univ] q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g q.fst (q.snd - a))) μ\nK' : Set G := -k + {q₀.snd}\nhK' : IsCompact K'\nU : Set G\nU_open : IsOpen U\nK'U : K' ⊆ U\nhU : IntegrableOn f U\nbound : G → ℝ := indicator U fun a => ‖L‖ * ‖f a‖ * C\nI2 : ∀ᶠ (q : P × G) in 𝓝[s ×ˢ univ] q₀, ∀ᵐ (a : G) ∂μ, ‖↑(↑L (f a)) (g q.fst (q.snd - a))‖ ≤ bound a\nI3 : Integrable bound\na : G\nthis : ContinuousAt (fun q => (q.fst, q.snd - a)) (q₀.fst, q₀.snd)\n⊢ ContinuousWithinAt (fun q => (↿g) (q.fst, q.snd - a)) (s ×ˢ univ) (q₀.fst, q₀.snd)\n[PROOFSTEP]\nhave h'q₀ : (q₀.1, q₀.2 - a) ∈ (s ×ˢ univ : Set (P × G)) := ⟨hq₀, mem_univ _⟩\n[GOAL]\ncase H\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : NormedAddCommGroup E'\ninst✝¹⁶ : NormedAddCommGroup E''\ninst✝¹⁵ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁴ : NontriviallyNormedField 𝕜\ninst✝¹³ : NormedSpace 𝕜 E\ninst✝¹² : NormedSpace 𝕜 E'\ninst✝¹¹ : NormedSpace 𝕜 E''\ninst✝¹⁰ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁹ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ninst✝⁶ : AddGroup G\ninst✝⁵ : TopologicalSpace G\ninst✝⁴ : TopologicalAddGroup G\ninst✝³ : BorelSpace G\ninst✝² : FirstCountableTopology G\ninst✝¹ : TopologicalSpace P\ninst✝ : FirstCountableTopology P\ng : P → G → E'\ns : Set P\nk : Set G\nhk : IsCompact k\nh'k : IsClosed k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContinuousOn (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nB : ∀ (p : P), p ∈ s → tsupport (g p) ⊆ k\nw : Set P\nC : ℝ\nw_open : IsOpen w\nq₀w : q₀.fst ∈ w\nhw : ∀ (p : P) (x : G), p ∈ w ∩ s → ‖g p x‖ ≤ C\nI1 : ∀ᶠ (q : P × G) in 𝓝[s ×ˢ univ] q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g q.fst (q.snd - a))) μ\nK' : Set G := -k + {q₀.snd}\nhK' : IsCompact K'\nU : Set G\nU_open : IsOpen U\nK'U : K' ⊆ U\nhU : IntegrableOn f U\nbound : G → ℝ := indicator U fun a => ‖L‖ * ‖f a‖ * C\nI2 : ∀ᶠ (q : P × G) in 𝓝[s ×ˢ univ] q₀, ∀ᵐ (a : G) ∂μ, ‖↑(↑L (f a)) (g q.fst (q.snd - a))‖ ≤ bound a\nI3 : Integrable bound\na : G\nthis : ContinuousAt (fun q => (q.fst, q.snd - a)) (q₀.fst, q₀.snd)\nh'q₀ : (q₀.fst, q₀.snd - a) ∈ s ×ˢ univ\n⊢ ContinuousWithinAt (fun q => (↿g) (q.fst, q.snd - a)) (s ×ˢ univ) (q₀.fst, q₀.snd)\n[PROOFSTEP]\nrefine' ContinuousWithinAt.comp (hg _ h'q₀) this.continuousWithinAt _\n[GOAL]\ncase H\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : NormedAddCommGroup E'\ninst✝¹⁶ : NormedAddCommGroup E''\ninst✝¹⁵ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁴ : NontriviallyNormedField 𝕜\ninst✝¹³ : NormedSpace 𝕜 E\ninst✝¹² : NormedSpace 𝕜 E'\ninst✝¹¹ : NormedSpace 𝕜 E''\ninst✝¹⁰ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁹ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ninst✝⁶ : AddGroup G\ninst✝⁵ : TopologicalSpace G\ninst✝⁴ : TopologicalAddGroup G\ninst✝³ : BorelSpace G\ninst✝² : FirstCountableTopology G\ninst✝¹ : TopologicalSpace P\ninst✝ : FirstCountableTopology P\ng : P → G → E'\ns : Set P\nk : Set G\nhk : IsCompact k\nh'k : IsClosed k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContinuousOn (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nB : ∀ (p : P), p ∈ s → tsupport (g p) ⊆ k\nw : Set P\nC : ℝ\nw_open : IsOpen w\nq₀w : q₀.fst ∈ w\nhw : ∀ (p : P) (x : G), p ∈ w ∩ s → ‖g p x‖ ≤ C\nI1 : ∀ᶠ (q : P × G) in 𝓝[s ×ˢ univ] q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g q.fst (q.snd - a))) μ\nK' : Set G := -k + {q₀.snd}\nhK' : IsCompact K'\nU : Set G\nU_open : IsOpen U\nK'U : K' ⊆ U\nhU : IntegrableOn f U\nbound : G → ℝ := indicator U fun a => ‖L‖ * ‖f a‖ * C\nI2 : ∀ᶠ (q : P × G) in 𝓝[s ×ˢ univ] q₀, ∀ᵐ (a : G) ∂μ, ‖↑(↑L (f a)) (g q.fst (q.snd - a))‖ ≤ bound a\nI3 : Integrable bound\na : G\nthis : ContinuousAt (fun q => (q.fst, q.snd - a)) (q₀.fst, q₀.snd)\nh'q₀ : (q₀.fst, q₀.snd - a) ∈ s ×ˢ univ\n⊢ MapsTo (fun q => (q.fst, q.snd - a)) (s ×ˢ univ) (s ×ˢ univ)\n[PROOFSTEP]\nrintro ⟨q, x⟩ ⟨hq, -⟩\n[GOAL]\ncase H.mk.intro\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : NormedAddCommGroup E'\ninst✝¹⁶ : NormedAddCommGroup E''\ninst✝¹⁵ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹⁴ : NontriviallyNormedField 𝕜\ninst✝¹³ : NormedSpace 𝕜 E\ninst✝¹² : NormedSpace 𝕜 E'\ninst✝¹¹ : NormedSpace 𝕜 E''\ninst✝¹⁰ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁹ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ninst✝⁶ : AddGroup G\ninst✝⁵ : TopologicalSpace G\ninst✝⁴ : TopologicalAddGroup G\ninst✝³ : BorelSpace G\ninst✝² : FirstCountableTopology G\ninst✝¹ : TopologicalSpace P\ninst✝ : FirstCountableTopology P\ng : P → G → E'\ns : Set P\nk : Set G\nhk : IsCompact k\nh'k : IsClosed k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContinuousOn (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nB : ∀ (p : P), p ∈ s → tsupport (g p) ⊆ k\nw : Set P\nC : ℝ\nw_open : IsOpen w\nq₀w : q₀.fst ∈ w\nhw : ∀ (p : P) (x : G), p ∈ w ∩ s → ‖g p x‖ ≤ C\nI1 : ∀ᶠ (q : P × G) in 𝓝[s ×ˢ univ] q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g q.fst (q.snd - a))) μ\nK' : Set G := -k + {q₀.snd}\nhK' : IsCompact K'\nU : Set G\nU_open : IsOpen U\nK'U : K' ⊆ U\nhU : IntegrableOn f U\nbound : G → ℝ := indicator U fun a => ‖L‖ * ‖f a‖ * C\nI2 : ∀ᶠ (q : P × G) in 𝓝[s ×ˢ univ] q₀, ∀ᵐ (a : G) ∂μ, ‖↑(↑L (f a)) (g q.fst (q.snd - a))‖ ≤ bound a\nI3 : Integrable bound\na : G\nthis : ContinuousAt (fun q => (q.fst, q.snd - a)) (q₀.fst, q₀.snd)\nh'q₀ : (q₀.fst, q₀.snd - a) ∈ s ×ˢ univ\nq : P\nx : G\nhq : (q, x).fst ∈ s\n⊢ (fun q => (q.fst, q.snd - a)) (q, x) ∈ s ×ˢ univ\n[PROOFSTEP]\nexact ⟨hq, mem_univ _⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : NormedAddCommGroup E'\ninst✝¹⁶ : NormedAddCommGroup E''\ninst✝¹⁵ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁴ : NontriviallyNormedField 𝕜\ninst✝¹³ : NormedSpace 𝕜 E\ninst✝¹² : NormedSpace 𝕜 E'\ninst✝¹¹ : NormedSpace 𝕜 E''\ninst✝¹⁰ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁹ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ninst✝⁶ : AddGroup G\ninst✝⁵ : TopologicalSpace G\ninst✝⁴ : TopologicalAddGroup G\ninst✝³ : BorelSpace G\ninst✝² : FirstCountableTopology G\ninst✝¹ : TopologicalSpace P\ninst✝ : FirstCountableTopology P\ng : P → G → E'\ns : Set P\nk : Set G\nhk : IsCompact k\nh'k : IsClosed k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContinuousOn (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nB : ∀ (p : P), p ∈ s → tsupport (g p) ⊆ k\nw : Set P\nC : ℝ\nw_open : IsOpen w\nq₀w : q₀.fst ∈ w\nhw : ∀ (p : P) (x : G), p ∈ w ∩ s → ‖g p x‖ ≤ C\nI1 : ∀ᶠ (q : P × G) in 𝓝[s ×ˢ univ] q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g q.fst (q.snd - a))) μ\nK' : Set G := -k + {q₀.snd}\nhK' : IsCompact K'\nU : Set G\nU_open : IsOpen U\nK'U : K' ⊆ U\nhU : IntegrableOn f U\nbound : G → ℝ := indicator U fun a => ‖L‖ * ‖f a‖ * C\nI2 : ∀ᶠ (q : P × G) in 𝓝[s ×ˢ univ] q₀, ∀ᵐ (a : G) ∂μ, ‖↑(↑L (f a)) (g q.fst (q.snd - a))‖ ≤ bound a\nI3 : Integrable bound\nI4 : ∀ᵐ (a : G) ∂μ, ContinuousWithinAt (fun q => ↑(↑L (f a)) (g q.fst (q.snd - a))) (s ×ˢ univ) q₀\n⊢ ContinuousWithinAt (fun q => f ⋆[L, q.snd] g q.fst) (s ×ˢ univ) q₀\n[PROOFSTEP]\nexact continuousWithinAt_of_dominated I1 I2 I3 I4\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : NormedAddCommGroup E'\ninst✝¹⁶ : NormedAddCommGroup E''\ninst✝¹⁵ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁴ : NontriviallyNormedField 𝕜\ninst✝¹³ : NormedSpace 𝕜 E\ninst✝¹² : NormedSpace 𝕜 E'\ninst✝¹¹ : NormedSpace 𝕜 E''\ninst✝¹⁰ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁹ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ninst✝⁶ : AddGroup G\ninst✝⁵ : TopologicalSpace G\ninst✝⁴ : TopologicalAddGroup G\ninst✝³ : BorelSpace G\ninst✝² : FirstCountableTopology G\ninst✝¹ : TopologicalSpace P\ninst✝ : FirstCountableTopology P\ns : Set P\nv : P → G\nhv : ContinuousOn v s\ng : P → G → E'\nk : Set G\nhk : IsCompact k\nh'k : IsClosed k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContinuousOn (↿g) (s ×ˢ univ)\n⊢ ContinuousOn (fun x => f ⋆[L, v x] g x) s\n[PROOFSTEP]\napply (continuousOn_convolution_right_with_param' L hk h'k hgs hf hg).comp (continuousOn_id.prod hv)\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : NormedAddCommGroup E'\ninst✝¹⁶ : NormedAddCommGroup E''\ninst✝¹⁵ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁴ : NontriviallyNormedField 𝕜\ninst✝¹³ : NormedSpace 𝕜 E\ninst✝¹² : NormedSpace 𝕜 E'\ninst✝¹¹ : NormedSpace 𝕜 E''\ninst✝¹⁰ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁹ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ninst✝⁶ : AddGroup G\ninst✝⁵ : TopologicalSpace G\ninst✝⁴ : TopologicalAddGroup G\ninst✝³ : BorelSpace G\ninst✝² : FirstCountableTopology G\ninst✝¹ : TopologicalSpace P\ninst✝ : FirstCountableTopology P\ns : Set P\nv : P → G\nhv : ContinuousOn v s\ng : P → G → E'\nk : Set G\nhk : IsCompact k\nh'k : IsClosed k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContinuousOn (↿g) (s ×ˢ univ)\n⊢ MapsTo (fun x => (_root_.id x, v x)) s (s ×ˢ univ)\n[PROOFSTEP]\nintro x hx\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : NormedAddCommGroup E'\ninst✝¹⁶ : NormedAddCommGroup E''\ninst✝¹⁵ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹⁴ : NontriviallyNormedField 𝕜\ninst✝¹³ : NormedSpace 𝕜 E\ninst✝¹² : NormedSpace 𝕜 E'\ninst✝¹¹ : NormedSpace 𝕜 E''\ninst✝¹⁰ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁹ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ninst✝⁶ : AddGroup G\ninst✝⁵ : TopologicalSpace G\ninst✝⁴ : TopologicalAddGroup G\ninst✝³ : BorelSpace G\ninst✝² : FirstCountableTopology G\ninst✝¹ : TopologicalSpace P\ninst✝ : FirstCountableTopology P\ns : Set P\nv : P → G\nhv : ContinuousOn v s\ng : P → G → E'\nk : Set G\nhk : IsCompact k\nh'k : IsClosed k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContinuousOn (↿g) (s ×ˢ univ)\nx : P\nhx : x ∈ s\n⊢ (fun x => (_root_.id x, v x)) x ∈ s ×ˢ univ\n[PROOFSTEP]\nsimp only [hx, prod_mk_mem_set_prod_eq, mem_univ, and_self_iff, id.def]\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : NormedAddCommGroup E'\ninst✝¹⁶ : NormedAddCommGroup E''\ninst✝¹⁵ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁴ : NontriviallyNormedField 𝕜\ninst✝¹³ : NormedSpace 𝕜 E\ninst✝¹² : NormedSpace 𝕜 E'\ninst✝¹¹ : NormedSpace 𝕜 E''\ninst✝¹⁰ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁹ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ninst✝⁶ : AddGroup G\ninst✝⁵ : TopologicalSpace G\ninst✝⁴ : TopologicalAddGroup G\ninst✝³ : BorelSpace G\ninst✝² : FirstCountableTopology G\ninst✝¹ : TopologicalSpace P\ninst✝ : FirstCountableTopology P\nhcg : HasCompactSupport g\nhf : LocallyIntegrable f\nhg : Continuous g\n⊢ Continuous (convolution f g L)\n[PROOFSTEP]\nrw [continuous_iff_continuousOn_univ]\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : NormedAddCommGroup E'\ninst✝¹⁶ : NormedAddCommGroup E''\ninst✝¹⁵ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁴ : NontriviallyNormedField 𝕜\ninst✝¹³ : NormedSpace 𝕜 E\ninst✝¹² : NormedSpace 𝕜 E'\ninst✝¹¹ : NormedSpace 𝕜 E''\ninst✝¹⁰ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁹ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ninst✝⁶ : AddGroup G\ninst✝⁵ : TopologicalSpace G\ninst✝⁴ : TopologicalAddGroup G\ninst✝³ : BorelSpace G\ninst✝² : FirstCountableTopology G\ninst✝¹ : TopologicalSpace P\ninst✝ : FirstCountableTopology P\nhcg : HasCompactSupport g\nhf : LocallyIntegrable f\nhg : Continuous g\n⊢ ContinuousOn (convolution f g L) univ\n[PROOFSTEP]\nlet g' : G → G → E' := fun _ q => g q\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : NormedAddCommGroup E'\ninst✝¹⁶ : NormedAddCommGroup E''\ninst✝¹⁵ : NormedAddCommGroup F\nf f' : G → E\ng g'✝ : G → E'\nx x' : G\ny y' : E\ninst✝¹⁴ : NontriviallyNormedField 𝕜\ninst✝¹³ : NormedSpace 𝕜 E\ninst✝¹² : NormedSpace 𝕜 E'\ninst✝¹¹ : NormedSpace 𝕜 E''\ninst✝¹⁰ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁹ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ninst✝⁶ : AddGroup G\ninst✝⁵ : TopologicalSpace G\ninst✝⁴ : TopologicalAddGroup G\ninst✝³ : BorelSpace G\ninst✝² : FirstCountableTopology G\ninst✝¹ : TopologicalSpace P\ninst✝ : FirstCountableTopology P\nhcg : HasCompactSupport g\nhf : LocallyIntegrable f\nhg : Continuous g\ng' : G → G → E' := fun x q => g q\n⊢ ContinuousOn (convolution f g L) univ\n[PROOFSTEP]\nhave : ContinuousOn (↿g') (univ ×ˢ univ) := (hg.comp continuous_snd).continuousOn\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : NormedAddCommGroup E'\ninst✝¹⁶ : NormedAddCommGroup E''\ninst✝¹⁵ : NormedAddCommGroup F\nf f' : G → E\ng g'✝ : G → E'\nx x' : G\ny y' : E\ninst✝¹⁴ : NontriviallyNormedField 𝕜\ninst✝¹³ : NormedSpace 𝕜 E\ninst✝¹² : NormedSpace 𝕜 E'\ninst✝¹¹ : NormedSpace 𝕜 E''\ninst✝¹⁰ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁹ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ninst✝⁶ : AddGroup G\ninst✝⁵ : TopologicalSpace G\ninst✝⁴ : TopologicalAddGroup G\ninst✝³ : BorelSpace G\ninst✝² : FirstCountableTopology G\ninst✝¹ : TopologicalSpace P\ninst✝ : FirstCountableTopology P\nhcg : HasCompactSupport g\nhf : LocallyIntegrable f\nhg : Continuous g\ng' : G → G → E' := fun x q => g q\nthis : ContinuousOn (↿g') (univ ×ˢ univ)\n⊢ ContinuousOn (convolution f g L) univ\n[PROOFSTEP]\nexact\n  continuousOn_convolution_right_with_param_comp' L (continuous_iff_continuousOn_univ.1 continuous_id) hcg\n    (isClosed_tsupport _) (fun p x _ hx => image_eq_zero_of_nmem_tsupport hx) hf this\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : NormedAddCommGroup E'\ninst✝¹⁷ : NormedAddCommGroup E''\ninst✝¹⁶ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁵ : NontriviallyNormedField 𝕜\ninst✝¹⁴ : NormedSpace 𝕜 E\ninst✝¹³ : NormedSpace 𝕜 E'\ninst✝¹² : NormedSpace 𝕜 E''\ninst✝¹¹ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝¹⁰ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\ninst✝⁷ : AddGroup G\ninst✝⁶ : TopologicalSpace G\ninst✝⁵ : TopologicalAddGroup G\ninst✝⁴ : BorelSpace G\ninst✝³ : FirstCountableTopology G\ninst✝² : TopologicalSpace P\ninst✝¹ : FirstCountableTopology P\ninst✝ : SecondCountableTopology G\nhbg : BddAbove (range fun x => ‖g x‖)\nhf : Integrable f\nhg : Continuous g\n⊢ Continuous (convolution f g L)\n[PROOFSTEP]\nrefine' continuous_iff_continuousAt.mpr fun x₀ => _\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : NormedAddCommGroup E'\ninst✝¹⁷ : NormedAddCommGroup E''\ninst✝¹⁶ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁵ : NontriviallyNormedField 𝕜\ninst✝¹⁴ : NormedSpace 𝕜 E\ninst✝¹³ : NormedSpace 𝕜 E'\ninst✝¹² : NormedSpace 𝕜 E''\ninst✝¹¹ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝¹⁰ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\ninst✝⁷ : AddGroup G\ninst✝⁶ : TopologicalSpace G\ninst✝⁵ : TopologicalAddGroup G\ninst✝⁴ : BorelSpace G\ninst✝³ : FirstCountableTopology G\ninst✝² : TopologicalSpace P\ninst✝¹ : FirstCountableTopology P\ninst✝ : SecondCountableTopology G\nhbg : BddAbove (range fun x => ‖g x‖)\nhf : Integrable f\nhg : Continuous g\nx₀ : G\n⊢ ContinuousAt (convolution f g L) x₀\n[PROOFSTEP]\nhave : ∀ᶠ x in 𝓝 x₀, ∀ᵐ t : G ∂μ, ‖L (f t) (g (x - t))‖ ≤ ‖L‖ * ‖f t‖ * ⨆ i, ‖g i‖ :=\n  by\n  refine' eventually_of_forall fun x => eventually_of_forall fun t => _\n  apply_rules [L.le_of_op_norm₂_le_of_le, le_rfl, le_ciSup hbg (x - t)]\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : NormedAddCommGroup E'\ninst✝¹⁷ : NormedAddCommGroup E''\ninst✝¹⁶ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁵ : NontriviallyNormedField 𝕜\ninst✝¹⁴ : NormedSpace 𝕜 E\ninst✝¹³ : NormedSpace 𝕜 E'\ninst✝¹² : NormedSpace 𝕜 E''\ninst✝¹¹ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝¹⁰ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\ninst✝⁷ : AddGroup G\ninst✝⁶ : TopologicalSpace G\ninst✝⁵ : TopologicalAddGroup G\ninst✝⁴ : BorelSpace G\ninst✝³ : FirstCountableTopology G\ninst✝² : TopologicalSpace P\ninst✝¹ : FirstCountableTopology P\ninst✝ : SecondCountableTopology G\nhbg : BddAbove (range fun x => ‖g x‖)\nhf : Integrable f\nhg : Continuous g\nx₀ : G\n⊢ ∀ᶠ (x : G) in 𝓝 x₀, ∀ᵐ (t : G) ∂μ, ‖↑(↑L (f t)) (g (x - t))‖ ≤ ‖L‖ * ‖f t‖ * ⨆ (i : G), ‖g i‖\n[PROOFSTEP]\nrefine' eventually_of_forall fun x => eventually_of_forall fun t => _\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : NormedAddCommGroup E'\ninst✝¹⁷ : NormedAddCommGroup E''\ninst✝¹⁶ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹⁵ : NontriviallyNormedField 𝕜\ninst✝¹⁴ : NormedSpace 𝕜 E\ninst✝¹³ : NormedSpace 𝕜 E'\ninst✝¹² : NormedSpace 𝕜 E''\ninst✝¹¹ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝¹⁰ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\ninst✝⁷ : AddGroup G\ninst✝⁶ : TopologicalSpace G\ninst✝⁵ : TopologicalAddGroup G\ninst✝⁴ : BorelSpace G\ninst✝³ : FirstCountableTopology G\ninst✝² : TopologicalSpace P\ninst✝¹ : FirstCountableTopology P\ninst✝ : SecondCountableTopology G\nhbg : BddAbove (range fun x => ‖g x‖)\nhf : Integrable f\nhg : Continuous g\nx₀ x t : G\n⊢ ‖↑(↑L (f t)) (g (x - t))‖ ≤ ‖L‖ * ‖f t‖ * ⨆ (i : G), ‖g i‖\n[PROOFSTEP]\napply_rules [L.le_of_op_norm₂_le_of_le, le_rfl, le_ciSup hbg (x - t)]\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : NormedAddCommGroup E'\ninst✝¹⁷ : NormedAddCommGroup E''\ninst✝¹⁶ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁵ : NontriviallyNormedField 𝕜\ninst✝¹⁴ : NormedSpace 𝕜 E\ninst✝¹³ : NormedSpace 𝕜 E'\ninst✝¹² : NormedSpace 𝕜 E''\ninst✝¹¹ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝¹⁰ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\ninst✝⁷ : AddGroup G\ninst✝⁶ : TopologicalSpace G\ninst✝⁵ : TopologicalAddGroup G\ninst✝⁴ : BorelSpace G\ninst✝³ : FirstCountableTopology G\ninst✝² : TopologicalSpace P\ninst✝¹ : FirstCountableTopology P\ninst✝ : SecondCountableTopology G\nhbg : BddAbove (range fun x => ‖g x‖)\nhf : Integrable f\nhg : Continuous g\nx₀ : G\nthis : ∀ᶠ (x : G) in 𝓝 x₀, ∀ᵐ (t : G) ∂μ, ‖↑(↑L (f t)) (g (x - t))‖ ≤ ‖L‖ * ‖f t‖ * ⨆ (i : G), ‖g i‖\n⊢ ContinuousAt (convolution f g L) x₀\n[PROOFSTEP]\nrefine' continuousAt_of_dominated _ this _ _\n[GOAL]\ncase refine'_1\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : NormedAddCommGroup E'\ninst✝¹⁷ : NormedAddCommGroup E''\ninst✝¹⁶ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁵ : NontriviallyNormedField 𝕜\ninst✝¹⁴ : NormedSpace 𝕜 E\ninst✝¹³ : NormedSpace 𝕜 E'\ninst✝¹² : NormedSpace 𝕜 E''\ninst✝¹¹ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝¹⁰ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\ninst✝⁷ : AddGroup G\ninst✝⁶ : TopologicalSpace G\ninst✝⁵ : TopologicalAddGroup G\ninst✝⁴ : BorelSpace G\ninst✝³ : FirstCountableTopology G\ninst✝² : TopologicalSpace P\ninst✝¹ : FirstCountableTopology P\ninst✝ : SecondCountableTopology G\nhbg : BddAbove (range fun x => ‖g x‖)\nhf : Integrable f\nhg : Continuous g\nx₀ : G\nthis : ∀ᶠ (x : G) in 𝓝 x₀, ∀ᵐ (t : G) ∂μ, ‖↑(↑L (f t)) (g (x - t))‖ ≤ ‖L‖ * ‖f t‖ * ⨆ (i : G), ‖g i‖\n⊢ ∀ᶠ (x : G) in 𝓝 x₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g (x - a))) μ\n[PROOFSTEP]\nexact eventually_of_forall fun x => hf.aestronglyMeasurable.convolution_integrand_snd' L hg.aestronglyMeasurable\n[GOAL]\ncase refine'_2\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : NormedAddCommGroup E'\ninst✝¹⁷ : NormedAddCommGroup E''\ninst✝¹⁶ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁵ : NontriviallyNormedField 𝕜\ninst✝¹⁴ : NormedSpace 𝕜 E\ninst✝¹³ : NormedSpace 𝕜 E'\ninst✝¹² : NormedSpace 𝕜 E''\ninst✝¹¹ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝¹⁰ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\ninst✝⁷ : AddGroup G\ninst✝⁶ : TopologicalSpace G\ninst✝⁵ : TopologicalAddGroup G\ninst✝⁴ : BorelSpace G\ninst✝³ : FirstCountableTopology G\ninst✝² : TopologicalSpace P\ninst✝¹ : FirstCountableTopology P\ninst✝ : SecondCountableTopology G\nhbg : BddAbove (range fun x => ‖g x‖)\nhf : Integrable f\nhg : Continuous g\nx₀ : G\nthis : ∀ᶠ (x : G) in 𝓝 x₀, ∀ᵐ (t : G) ∂μ, ‖↑(↑L (f t)) (g (x - t))‖ ≤ ‖L‖ * ‖f t‖ * ⨆ (i : G), ‖g i‖\n⊢ Integrable fun a => ‖L‖ * ‖f a‖ * ⨆ (i : G), ‖g i‖\n[PROOFSTEP]\nexact (hf.norm.const_mul _).mul_const _\n[GOAL]\ncase refine'_3\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : NormedAddCommGroup E'\ninst✝¹⁷ : NormedAddCommGroup E''\ninst✝¹⁶ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁵ : NontriviallyNormedField 𝕜\ninst✝¹⁴ : NormedSpace 𝕜 E\ninst✝¹³ : NormedSpace 𝕜 E'\ninst✝¹² : NormedSpace 𝕜 E''\ninst✝¹¹ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝¹⁰ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\ninst✝⁷ : AddGroup G\ninst✝⁶ : TopologicalSpace G\ninst✝⁵ : TopologicalAddGroup G\ninst✝⁴ : BorelSpace G\ninst✝³ : FirstCountableTopology G\ninst✝² : TopologicalSpace P\ninst✝¹ : FirstCountableTopology P\ninst✝ : SecondCountableTopology G\nhbg : BddAbove (range fun x => ‖g x‖)\nhf : Integrable f\nhg : Continuous g\nx₀ : G\nthis : ∀ᶠ (x : G) in 𝓝 x₀, ∀ᵐ (t : G) ∂μ, ‖↑(↑L (f t)) (g (x - t))‖ ≤ ‖L‖ * ‖f t‖ * ⨆ (i : G), ‖g i‖\n⊢ ∀ᵐ (a : G) ∂μ, ContinuousAt (fun x => ↑(↑L (f a)) (g (x - a))) x₀\n[PROOFSTEP]\nexact\n  eventually_of_forall fun t =>\n    (L.continuous₂.comp₂ continuous_const <| hg.comp <| continuous_id.sub continuous_const).continuousAt\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : NontriviallyNormedField 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁷ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁶ : NormedSpace ℝ F\ninst✝⁵ : CompleteSpace F\ninst✝⁴ : AddCommGroup G\ninst✝³ : IsAddLeftInvariant μ\ninst✝² : IsNegInvariant μ\ninst✝¹ : MeasurableNeg G\ninst✝ : MeasurableAdd G\n⊢ convolution g f (ContinuousLinearMap.flip L) = convolution f g L\n[PROOFSTEP]\next1 x\n[GOAL]\ncase h\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹² : NontriviallyNormedField 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁷ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁶ : NormedSpace ℝ F\ninst✝⁵ : CompleteSpace F\ninst✝⁴ : AddCommGroup G\ninst✝³ : IsAddLeftInvariant μ\ninst✝² : IsNegInvariant μ\ninst✝¹ : MeasurableNeg G\ninst✝ : MeasurableAdd G\nx : G\n⊢ g ⋆[ContinuousLinearMap.flip L, x] f = f ⋆[L, x] g\n[PROOFSTEP]\nsimp_rw [convolution_def]\n[GOAL]\ncase h\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹² : NontriviallyNormedField 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁷ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁶ : NormedSpace ℝ F\ninst✝⁵ : CompleteSpace F\ninst✝⁴ : AddCommGroup G\ninst✝³ : IsAddLeftInvariant μ\ninst✝² : IsNegInvariant μ\ninst✝¹ : MeasurableNeg G\ninst✝ : MeasurableAdd G\nx : G\n⊢ ∫ (t : G), ↑(↑(ContinuousLinearMap.flip L) (g t)) (f (x - t)) ∂μ = ∫ (t : G), ↑(↑L (f t)) (g (x - t)) ∂μ\n[PROOFSTEP]\nrw [← integral_sub_left_eq_self _ μ x]\n[GOAL]\ncase h\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹² : NontriviallyNormedField 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁷ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁶ : NormedSpace ℝ F\ninst✝⁵ : CompleteSpace F\ninst✝⁴ : AddCommGroup G\ninst✝³ : IsAddLeftInvariant μ\ninst✝² : IsNegInvariant μ\ninst✝¹ : MeasurableNeg G\ninst✝ : MeasurableAdd G\nx : G\n⊢ ∫ (x_1 : G), ↑(↑(ContinuousLinearMap.flip L) (g (x - x_1))) (f (x - (x - x_1))) ∂μ =\n    ∫ (t : G), ↑(↑L (f t)) (g (x - t)) ∂μ\n[PROOFSTEP]\nsimp_rw [sub_sub_self, flip_apply]\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : NontriviallyNormedField 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁷ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁶ : NormedSpace ℝ F\ninst✝⁵ : CompleteSpace F\ninst✝⁴ : AddCommGroup G\ninst✝³ : IsAddLeftInvariant μ\ninst✝² : IsNegInvariant μ\ninst✝¹ : MeasurableNeg G\ninst✝ : MeasurableAdd G\n⊢ f ⋆[L, x] g = ∫ (t : G), ↑(↑L (f (x - t))) (g t) ∂μ\n[PROOFSTEP]\nrw [← convolution_flip]\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : NontriviallyNormedField 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁷ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁶ : NormedSpace ℝ F\ninst✝⁵ : CompleteSpace F\ninst✝⁴ : AddCommGroup G\ninst✝³ : IsAddLeftInvariant μ\ninst✝² : IsNegInvariant μ\ninst✝¹ : MeasurableNeg G\ninst✝ : MeasurableAdd G\n⊢ g ⋆[ContinuousLinearMap.flip L, x] f = ∫ (t : G), ↑(↑L (f (x - t))) (g t) ∂μ\n[PROOFSTEP]\nrfl\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : NontriviallyNormedField 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁷ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁶ : NormedSpace ℝ F\ninst✝⁵ : CompleteSpace F\ninst✝⁴ : AddCommGroup G\ninst✝³ : IsAddLeftInvariant μ\ninst✝² : IsNegInvariant μ\ninst✝¹ : MeasurableNeg G\ninst✝ : MeasurableAdd G\nh1 : ∀ᵐ (x : G) ∂μ, f (-x) = f x\nh2 : ∀ᵐ (x : G) ∂μ, g (-x) = g x\n⊢ ∫ (t : G), ↑(↑L (f t)) (g (-x - t)) ∂μ = ∫ (t : G), ↑(↑L (f (-t))) (g (x + t)) ∂μ\n[PROOFSTEP]\napply integral_congr_ae\n[GOAL]\ncase h\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : NontriviallyNormedField 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁷ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁶ : NormedSpace ℝ F\ninst✝⁵ : CompleteSpace F\ninst✝⁴ : AddCommGroup G\ninst✝³ : IsAddLeftInvariant μ\ninst✝² : IsNegInvariant μ\ninst✝¹ : MeasurableNeg G\ninst✝ : MeasurableAdd G\nh1 : ∀ᵐ (x : G) ∂μ, f (-x) = f x\nh2 : ∀ᵐ (x : G) ∂μ, g (-x) = g x\n⊢ (fun a => ↑(↑L (f a)) (g (-x - a))) =ᶠ[ae μ] fun a => ↑(↑L (f (-a))) (g (x + a))\n[PROOFSTEP]\nfilter_upwards [h1, (eventually_add_left_iff μ x).2 h2] with t ht h't\n[GOAL]\ncase h\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : NontriviallyNormedField 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁷ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁶ : NormedSpace ℝ F\ninst✝⁵ : CompleteSpace F\ninst✝⁴ : AddCommGroup G\ninst✝³ : IsAddLeftInvariant μ\ninst✝² : IsNegInvariant μ\ninst✝¹ : MeasurableNeg G\ninst✝ : MeasurableAdd G\nh1 : ∀ᵐ (x : G) ∂μ, f (-x) = f x\nh2 : ∀ᵐ (x : G) ∂μ, g (-x) = g x\nt : G\nht : f (-t) = f t\nh't : g (-(x + t)) = g (x + t)\n⊢ ↑(↑L (f t)) (g (-x - t)) = ↑(↑L (f (-t))) (g (x + t))\n[PROOFSTEP]\nsimp_rw [ht, ← h't, neg_add']\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : NontriviallyNormedField 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁷ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁶ : NormedSpace ℝ F\ninst✝⁵ : CompleteSpace F\ninst✝⁴ : AddCommGroup G\ninst✝³ : IsAddLeftInvariant μ\ninst✝² : IsNegInvariant μ\ninst✝¹ : MeasurableNeg G\ninst✝ : MeasurableAdd G\nh1 : ∀ᵐ (x : G) ∂μ, f (-x) = f x\nh2 : ∀ᵐ (x : G) ∂μ, g (-x) = g x\n⊢ ∫ (t : G), ↑(↑L (f (-t))) (g (x + t)) ∂μ = ∫ (t : G), ↑(↑L (f t)) (g (x - t)) ∂μ\n[PROOFSTEP]\nrw [← integral_neg_eq_self]\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : NontriviallyNormedField 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁷ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁶ : NormedSpace ℝ F\ninst✝⁵ : CompleteSpace F\ninst✝⁴ : AddCommGroup G\ninst✝³ : IsAddLeftInvariant μ\ninst✝² : IsNegInvariant μ\ninst✝¹ : MeasurableNeg G\ninst✝ : MeasurableAdd G\nh1 : ∀ᵐ (x : G) ∂μ, f (-x) = f x\nh2 : ∀ᵐ (x : G) ∂μ, g (-x) = g x\n⊢ ∫ (x_1 : G), ↑(↑L (f (- -x_1))) (g (x + -x_1)) ∂μ = ∫ (t : G), ↑(↑L (f t)) (g (x - t)) ∂μ\n[PROOFSTEP]\nsimp only [neg_neg, ← sub_eq_add_neg]\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : NormedAddCommGroup E'\ninst✝¹⁶ : NormedAddCommGroup E''\ninst✝¹⁵ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁴ : NontriviallyNormedField 𝕜\ninst✝¹³ : NormedSpace 𝕜 E\ninst✝¹² : NormedSpace 𝕜 E'\ninst✝¹¹ : NormedSpace 𝕜 E''\ninst✝¹⁰ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁹ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ninst✝⁶ : AddCommGroup G\ninst✝⁵ : IsAddLeftInvariant μ\ninst✝⁴ : IsNegInvariant μ\ninst✝³ : TopologicalSpace G\ninst✝² : TopologicalAddGroup G\ninst✝¹ : BorelSpace G\ninst✝ : FirstCountableTopology G\nhcf : HasCompactSupport f\nhf : Continuous f\nhg : LocallyIntegrable g\n⊢ Continuous (convolution f g L)\n[PROOFSTEP]\nrw [← convolution_flip]\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : NormedAddCommGroup E'\ninst✝¹⁶ : NormedAddCommGroup E''\ninst✝¹⁵ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁴ : NontriviallyNormedField 𝕜\ninst✝¹³ : NormedSpace 𝕜 E\ninst✝¹² : NormedSpace 𝕜 E'\ninst✝¹¹ : NormedSpace 𝕜 E''\ninst✝¹⁰ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁹ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ninst✝⁶ : AddCommGroup G\ninst✝⁵ : IsAddLeftInvariant μ\ninst✝⁴ : IsNegInvariant μ\ninst✝³ : TopologicalSpace G\ninst✝² : TopologicalAddGroup G\ninst✝¹ : BorelSpace G\ninst✝ : FirstCountableTopology G\nhcf : HasCompactSupport f\nhf : Continuous f\nhg : LocallyIntegrable g\n⊢ Continuous (convolution g f (ContinuousLinearMap.flip L))\n[PROOFSTEP]\nexact hcf.continuous_convolution_right L.flip hg hf\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : NormedAddCommGroup E'\ninst✝¹⁶ : NormedAddCommGroup E''\ninst✝¹⁵ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁴ : NontriviallyNormedField 𝕜\ninst✝¹³ : NormedSpace 𝕜 E\ninst✝¹² : NormedSpace 𝕜 E'\ninst✝¹¹ : NormedSpace 𝕜 E''\ninst✝¹⁰ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁹ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ninst✝⁶ : AddCommGroup G\ninst✝⁵ : IsAddLeftInvariant μ\ninst✝⁴ : IsNegInvariant μ\ninst✝³ : TopologicalSpace G\ninst✝² : TopologicalAddGroup G\ninst✝¹ : BorelSpace G\ninst✝ : SecondCountableTopology G\nhbf : BddAbove (range fun x => ‖f x‖)\nhf : Continuous f\nhg : Integrable g\n⊢ Continuous (convolution f g L)\n[PROOFSTEP]\nrw [← convolution_flip]\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : NormedAddCommGroup E'\ninst✝¹⁶ : NormedAddCommGroup E''\ninst✝¹⁵ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁴ : NontriviallyNormedField 𝕜\ninst✝¹³ : NormedSpace 𝕜 E\ninst✝¹² : NormedSpace 𝕜 E'\ninst✝¹¹ : NormedSpace 𝕜 E''\ninst✝¹⁰ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁹ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ninst✝⁶ : AddCommGroup G\ninst✝⁵ : IsAddLeftInvariant μ\ninst✝⁴ : IsNegInvariant μ\ninst✝³ : TopologicalSpace G\ninst✝² : TopologicalAddGroup G\ninst✝¹ : BorelSpace G\ninst✝ : SecondCountableTopology G\nhbf : BddAbove (range fun x => ‖f x‖)\nhf : Continuous f\nhg : Integrable g\n⊢ Continuous (convolution g f (ContinuousLinearMap.flip L))\n[PROOFSTEP]\nexact hbf.continuous_convolution_right_of_integrable L.flip hg hf\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedAddCommGroup E''\ninst✝⁹ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedSpace 𝕜 E\ninst✝⁶ : NormedSpace 𝕜 E'\ninst✝⁵ : NormedSpace 𝕜 E''\ninst✝⁴ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝³ : MeasurableSpace G\nμ ν : Measure G\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\ninst✝ : SeminormedAddCommGroup G\nx₀ : G\nR : ℝ\nhf : support f ⊆ ball 0 R\nhg : ∀ (x : G), x ∈ ball x₀ R → g x = g x₀\n⊢ f ⋆[L, x₀] g = ∫ (t : G), ↑(↑L (f t)) (g x₀) ∂μ\n[PROOFSTEP]\nhave h2 : ∀ t, L (f t) (g (x₀ - t)) = L (f t) (g x₀) := fun t ↦\n  by\n  by_cases ht : t ∈ support f\n  · have h2t := hf ht\n    rw [mem_ball_zero_iff] at h2t \n    specialize hg (x₀ - t)\n    rw [sub_eq_add_neg, add_mem_ball_iff_norm, norm_neg, ← sub_eq_add_neg] at hg \n    rw [hg h2t]\n  · rw [nmem_support] at ht \n    simp_rw [ht, L.map_zero₂]\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedAddCommGroup E''\ninst✝⁹ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedSpace 𝕜 E\ninst✝⁶ : NormedSpace 𝕜 E'\ninst✝⁵ : NormedSpace 𝕜 E''\ninst✝⁴ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝³ : MeasurableSpace G\nμ ν : Measure G\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\ninst✝ : SeminormedAddCommGroup G\nx₀ : G\nR : ℝ\nhf : support f ⊆ ball 0 R\nhg : ∀ (x : G), x ∈ ball x₀ R → g x = g x₀\nt : G\n⊢ ↑(↑L (f t)) (g (x₀ - t)) = ↑(↑L (f t)) (g x₀)\n[PROOFSTEP]\nby_cases ht : t ∈ support f\n[GOAL]\ncase pos\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedAddCommGroup E''\ninst✝⁹ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedSpace 𝕜 E\ninst✝⁶ : NormedSpace 𝕜 E'\ninst✝⁵ : NormedSpace 𝕜 E''\ninst✝⁴ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝³ : MeasurableSpace G\nμ ν : Measure G\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\ninst✝ : SeminormedAddCommGroup G\nx₀ : G\nR : ℝ\nhf : support f ⊆ ball 0 R\nhg : ∀ (x : G), x ∈ ball x₀ R → g x = g x₀\nt : G\nht : t ∈ support f\n⊢ ↑(↑L (f t)) (g (x₀ - t)) = ↑(↑L (f t)) (g x₀)\n[PROOFSTEP]\nhave h2t := hf ht\n[GOAL]\ncase pos\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedAddCommGroup E''\ninst✝⁹ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedSpace 𝕜 E\ninst✝⁶ : NormedSpace 𝕜 E'\ninst✝⁵ : NormedSpace 𝕜 E''\ninst✝⁴ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝³ : MeasurableSpace G\nμ ν : Measure G\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\ninst✝ : SeminormedAddCommGroup G\nx₀ : G\nR : ℝ\nhf : support f ⊆ ball 0 R\nhg : ∀ (x : G), x ∈ ball x₀ R → g x = g x₀\nt : G\nht : t ∈ support f\nh2t : t ∈ ball 0 R\n⊢ ↑(↑L (f t)) (g (x₀ - t)) = ↑(↑L (f t)) (g x₀)\n[PROOFSTEP]\nrw [mem_ball_zero_iff] at h2t \n[GOAL]\ncase pos\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedAddCommGroup E''\ninst✝⁹ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedSpace 𝕜 E\ninst✝⁶ : NormedSpace 𝕜 E'\ninst✝⁵ : NormedSpace 𝕜 E''\ninst✝⁴ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝³ : MeasurableSpace G\nμ ν : Measure G\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\ninst✝ : SeminormedAddCommGroup G\nx₀ : G\nR : ℝ\nhf : support f ⊆ ball 0 R\nhg : ∀ (x : G), x ∈ ball x₀ R → g x = g x₀\nt : G\nht : t ∈ support f\nh2t : ‖t‖ < R\n⊢ ↑(↑L (f t)) (g (x₀ - t)) = ↑(↑L (f t)) (g x₀)\n[PROOFSTEP]\nspecialize hg (x₀ - t)\n[GOAL]\ncase pos\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedAddCommGroup E''\ninst✝⁹ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedSpace 𝕜 E\ninst✝⁶ : NormedSpace 𝕜 E'\ninst✝⁵ : NormedSpace 𝕜 E''\ninst✝⁴ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝³ : MeasurableSpace G\nμ ν : Measure G\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\ninst✝ : SeminormedAddCommGroup G\nx₀ : G\nR : ℝ\nhf : support f ⊆ ball 0 R\nt : G\nht : t ∈ support f\nh2t : ‖t‖ < R\nhg : x₀ - t ∈ ball x₀ R → g (x₀ - t) = g x₀\n⊢ ↑(↑L (f t)) (g (x₀ - t)) = ↑(↑L (f t)) (g x₀)\n[PROOFSTEP]\nrw [sub_eq_add_neg, add_mem_ball_iff_norm, norm_neg, ← sub_eq_add_neg] at hg \n[GOAL]\ncase pos\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedAddCommGroup E''\ninst✝⁹ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedSpace 𝕜 E\ninst✝⁶ : NormedSpace 𝕜 E'\ninst✝⁵ : NormedSpace 𝕜 E''\ninst✝⁴ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝³ : MeasurableSpace G\nμ ν : Measure G\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\ninst✝ : SeminormedAddCommGroup G\nx₀ : G\nR : ℝ\nhf : support f ⊆ ball 0 R\nt : G\nht : t ∈ support f\nh2t : ‖t‖ < R\nhg : ‖t‖ < R → g (x₀ - t) = g x₀\n⊢ ↑(↑L (f t)) (g (x₀ - t)) = ↑(↑L (f t)) (g x₀)\n[PROOFSTEP]\nrw [hg h2t]\n[GOAL]\ncase neg\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedAddCommGroup E''\ninst✝⁹ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedSpace 𝕜 E\ninst✝⁶ : NormedSpace 𝕜 E'\ninst✝⁵ : NormedSpace 𝕜 E''\ninst✝⁴ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝³ : MeasurableSpace G\nμ ν : Measure G\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\ninst✝ : SeminormedAddCommGroup G\nx₀ : G\nR : ℝ\nhf : support f ⊆ ball 0 R\nhg : ∀ (x : G), x ∈ ball x₀ R → g x = g x₀\nt : G\nht : ¬t ∈ support f\n⊢ ↑(↑L (f t)) (g (x₀ - t)) = ↑(↑L (f t)) (g x₀)\n[PROOFSTEP]\nrw [nmem_support] at ht \n[GOAL]\ncase neg\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedAddCommGroup E''\ninst✝⁹ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedSpace 𝕜 E\ninst✝⁶ : NormedSpace 𝕜 E'\ninst✝⁵ : NormedSpace 𝕜 E''\ninst✝⁴ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝³ : MeasurableSpace G\nμ ν : Measure G\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\ninst✝ : SeminormedAddCommGroup G\nx₀ : G\nR : ℝ\nhf : support f ⊆ ball 0 R\nhg : ∀ (x : G), x ∈ ball x₀ R → g x = g x₀\nt : G\nht : f t = 0\n⊢ ↑(↑L (f t)) (g (x₀ - t)) = ↑(↑L (f t)) (g x₀)\n[PROOFSTEP]\nsimp_rw [ht, L.map_zero₂]\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedAddCommGroup E''\ninst✝⁹ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝⁸ : NontriviallyNormedField 𝕜\ninst✝⁷ : NormedSpace 𝕜 E\ninst✝⁶ : NormedSpace 𝕜 E'\ninst✝⁵ : NormedSpace 𝕜 E''\ninst✝⁴ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝³ : MeasurableSpace G\nμ ν : Measure G\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\ninst✝ : SeminormedAddCommGroup G\nx₀ : G\nR : ℝ\nhf : support f ⊆ ball 0 R\nhg : ∀ (x : G), x ∈ ball x₀ R → g x = g x₀\nh2 : ∀ (t : G), ↑(↑L (f t)) (g (x₀ - t)) = ↑(↑L (f t)) (g x₀)\n⊢ f ⋆[L, x₀] g = ∫ (t : G), ↑(↑L (f t)) (g x₀) ∂μ\n[PROOFSTEP]\nsimp_rw [convolution_def, h2]\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : NontriviallyNormedField 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁷ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁶ : NormedSpace ℝ F\ninst✝⁵ : CompleteSpace F\ninst✝⁴ : SeminormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : SecondCountableTopology G\ninst✝¹ : IsAddLeftInvariant μ\ninst✝ : SigmaFinite μ\nx₀ : G\nR ε : ℝ\nz₀ : E'\nhε : 0 ≤ ε\nhif : Integrable f\nhf : support f ⊆ ball 0 R\nhmg : AEStronglyMeasurable g μ\nhg : ∀ (x : G), x ∈ ball x₀ R → dist (g x) z₀ ≤ ε\n⊢ dist (f ⋆[L, x₀] g) (∫ (t : G), ↑(↑L (f t)) z₀ ∂μ) ≤ (‖L‖ * ∫ (x : G), ‖f x‖ ∂μ) * ε\n[PROOFSTEP]\nhave hfg : ConvolutionExistsAt f g x₀ L μ :=\n  by\n  refine' BddAbove.convolutionExistsAt L _ Metric.isOpen_ball.measurableSet (Subset.trans _ hf) hif.integrableOn hmg\n  swap; · refine' fun t => mt fun ht : f t = 0 => _; simp_rw [ht, L.map_zero₂]\n  rw [bddAbove_def]\n  refine' ⟨‖z₀‖ + ε, _⟩\n  rintro _ ⟨x, hx, rfl⟩\n  refine' norm_le_norm_add_const_of_dist_le (hg x _)\n  rwa [mem_ball_iff_norm, norm_sub_rev, ← mem_ball_zero_iff]\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : NontriviallyNormedField 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁷ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁶ : NormedSpace ℝ F\ninst✝⁵ : CompleteSpace F\ninst✝⁴ : SeminormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : SecondCountableTopology G\ninst✝¹ : IsAddLeftInvariant μ\ninst✝ : SigmaFinite μ\nx₀ : G\nR ε : ℝ\nz₀ : E'\nhε : 0 ≤ ε\nhif : Integrable f\nhf : support f ⊆ ball 0 R\nhmg : AEStronglyMeasurable g μ\nhg : ∀ (x : G), x ∈ ball x₀ R → dist (g x) z₀ ≤ ε\n⊢ ConvolutionExistsAt f g x₀ L\n[PROOFSTEP]\nrefine' BddAbove.convolutionExistsAt L _ Metric.isOpen_ball.measurableSet (Subset.trans _ hf) hif.integrableOn hmg\n[GOAL]\ncase refine'_1\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : NontriviallyNormedField 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁷ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁶ : NormedSpace ℝ F\ninst✝⁵ : CompleteSpace F\ninst✝⁴ : SeminormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : SecondCountableTopology G\ninst✝¹ : IsAddLeftInvariant μ\ninst✝ : SigmaFinite μ\nx₀ : G\nR ε : ℝ\nz₀ : E'\nhε : 0 ≤ ε\nhif : Integrable f\nhf : support f ⊆ ball 0 R\nhmg : AEStronglyMeasurable g μ\nhg : ∀ (x : G), x ∈ ball x₀ R → dist (g x) z₀ ≤ ε\n⊢ BddAbove ((fun i => ‖g i‖) '' ((fun t => x₀ - t) ⁻¹' ball 0 R))\ncase refine'_2\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : NontriviallyNormedField 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁷ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁶ : NormedSpace ℝ F\ninst✝⁵ : CompleteSpace F\ninst✝⁴ : SeminormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : SecondCountableTopology G\ninst✝¹ : IsAddLeftInvariant μ\ninst✝ : SigmaFinite μ\nx₀ : G\nR ε : ℝ\nz₀ : E'\nhε : 0 ≤ ε\nhif : Integrable f\nhf : support f ⊆ ball 0 R\nhmg : AEStronglyMeasurable g μ\nhg : ∀ (x : G), x ∈ ball x₀ R → dist (g x) z₀ ≤ ε\n⊢ (support fun t => ↑(↑L (f t)) (g (x₀ - t))) ⊆ support f\n[PROOFSTEP]\nswap\n[GOAL]\ncase refine'_2\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : NontriviallyNormedField 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁷ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁶ : NormedSpace ℝ F\ninst✝⁵ : CompleteSpace F\ninst✝⁴ : SeminormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : SecondCountableTopology G\ninst✝¹ : IsAddLeftInvariant μ\ninst✝ : SigmaFinite μ\nx₀ : G\nR ε : ℝ\nz₀ : E'\nhε : 0 ≤ ε\nhif : Integrable f\nhf : support f ⊆ ball 0 R\nhmg : AEStronglyMeasurable g μ\nhg : ∀ (x : G), x ∈ ball x₀ R → dist (g x) z₀ ≤ ε\n⊢ (support fun t => ↑(↑L (f t)) (g (x₀ - t))) ⊆ support f\n[PROOFSTEP]\nrefine' fun t => mt fun ht : f t = 0 => _\n[GOAL]\ncase refine'_2\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : NontriviallyNormedField 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁷ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁶ : NormedSpace ℝ F\ninst✝⁵ : CompleteSpace F\ninst✝⁴ : SeminormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : SecondCountableTopology G\ninst✝¹ : IsAddLeftInvariant μ\ninst✝ : SigmaFinite μ\nx₀ : G\nR ε : ℝ\nz₀ : E'\nhε : 0 ≤ ε\nhif : Integrable f\nhf : support f ⊆ ball 0 R\nhmg : AEStronglyMeasurable g μ\nhg : ∀ (x : G), x ∈ ball x₀ R → dist (g x) z₀ ≤ ε\nt : G\nht : f t = 0\n⊢ (fun t => ↑(↑L (f t)) (g (x₀ - t))) t = 0\n[PROOFSTEP]\nsimp_rw [ht, L.map_zero₂]\n[GOAL]\ncase refine'_1\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : NontriviallyNormedField 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁷ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁶ : NormedSpace ℝ F\ninst✝⁵ : CompleteSpace F\ninst✝⁴ : SeminormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : SecondCountableTopology G\ninst✝¹ : IsAddLeftInvariant μ\ninst✝ : SigmaFinite μ\nx₀ : G\nR ε : ℝ\nz₀ : E'\nhε : 0 ≤ ε\nhif : Integrable f\nhf : support f ⊆ ball 0 R\nhmg : AEStronglyMeasurable g μ\nhg : ∀ (x : G), x ∈ ball x₀ R → dist (g x) z₀ ≤ ε\n⊢ BddAbove ((fun i => ‖g i‖) '' ((fun t => x₀ - t) ⁻¹' ball 0 R))\n[PROOFSTEP]\nrw [bddAbove_def]\n[GOAL]\ncase refine'_1\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : NontriviallyNormedField 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁷ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁶ : NormedSpace ℝ F\ninst✝⁵ : CompleteSpace F\ninst✝⁴ : SeminormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : SecondCountableTopology G\ninst✝¹ : IsAddLeftInvariant μ\ninst✝ : SigmaFinite μ\nx₀ : G\nR ε : ℝ\nz₀ : E'\nhε : 0 ≤ ε\nhif : Integrable f\nhf : support f ⊆ ball 0 R\nhmg : AEStronglyMeasurable g μ\nhg : ∀ (x : G), x ∈ ball x₀ R → dist (g x) z₀ ≤ ε\n⊢ ∃ x, ∀ (y : ℝ), y ∈ (fun i => ‖g i‖) '' ((fun t => x₀ - t) ⁻¹' ball 0 R) → y ≤ x\n[PROOFSTEP]\nrefine' ⟨‖z₀‖ + ε, _⟩\n[GOAL]\ncase refine'_1\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : NontriviallyNormedField 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁷ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁶ : NormedSpace ℝ F\ninst✝⁵ : CompleteSpace F\ninst✝⁴ : SeminormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : SecondCountableTopology G\ninst✝¹ : IsAddLeftInvariant μ\ninst✝ : SigmaFinite μ\nx₀ : G\nR ε : ℝ\nz₀ : E'\nhε : 0 ≤ ε\nhif : Integrable f\nhf : support f ⊆ ball 0 R\nhmg : AEStronglyMeasurable g μ\nhg : ∀ (x : G), x ∈ ball x₀ R → dist (g x) z₀ ≤ ε\n⊢ ∀ (y : ℝ), y ∈ (fun i => ‖g i‖) '' ((fun t => x₀ - t) ⁻¹' ball 0 R) → y ≤ ‖z₀‖ + ε\n[PROOFSTEP]\nrintro _ ⟨x, hx, rfl⟩\n[GOAL]\ncase refine'_1.intro.intro\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹² : NontriviallyNormedField 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁷ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁶ : NormedSpace ℝ F\ninst✝⁵ : CompleteSpace F\ninst✝⁴ : SeminormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : SecondCountableTopology G\ninst✝¹ : IsAddLeftInvariant μ\ninst✝ : SigmaFinite μ\nx₀ : G\nR ε : ℝ\nz₀ : E'\nhε : 0 ≤ ε\nhif : Integrable f\nhf : support f ⊆ ball 0 R\nhmg : AEStronglyMeasurable g μ\nhg : ∀ (x : G), x ∈ ball x₀ R → dist (g x) z₀ ≤ ε\nx : G\nhx : x ∈ (fun t => x₀ - t) ⁻¹' ball 0 R\n⊢ (fun i => ‖g i‖) x ≤ ‖z₀‖ + ε\n[PROOFSTEP]\nrefine' norm_le_norm_add_const_of_dist_le (hg x _)\n[GOAL]\ncase refine'_1.intro.intro\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹² : NontriviallyNormedField 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁷ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁶ : NormedSpace ℝ F\ninst✝⁵ : CompleteSpace F\ninst✝⁴ : SeminormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : SecondCountableTopology G\ninst✝¹ : IsAddLeftInvariant μ\ninst✝ : SigmaFinite μ\nx₀ : G\nR ε : ℝ\nz₀ : E'\nhε : 0 ≤ ε\nhif : Integrable f\nhf : support f ⊆ ball 0 R\nhmg : AEStronglyMeasurable g μ\nhg : ∀ (x : G), x ∈ ball x₀ R → dist (g x) z₀ ≤ ε\nx : G\nhx : x ∈ (fun t => x₀ - t) ⁻¹' ball 0 R\n⊢ x ∈ ball x₀ R\n[PROOFSTEP]\nrwa [mem_ball_iff_norm, norm_sub_rev, ← mem_ball_zero_iff]\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : NontriviallyNormedField 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁷ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁶ : NormedSpace ℝ F\ninst✝⁵ : CompleteSpace F\ninst✝⁴ : SeminormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : SecondCountableTopology G\ninst✝¹ : IsAddLeftInvariant μ\ninst✝ : SigmaFinite μ\nx₀ : G\nR ε : ℝ\nz₀ : E'\nhε : 0 ≤ ε\nhif : Integrable f\nhf : support f ⊆ ball 0 R\nhmg : AEStronglyMeasurable g μ\nhg : ∀ (x : G), x ∈ ball x₀ R → dist (g x) z₀ ≤ ε\nhfg : ConvolutionExistsAt f g x₀ L\n⊢ dist (f ⋆[L, x₀] g) (∫ (t : G), ↑(↑L (f t)) z₀ ∂μ) ≤ (‖L‖ * ∫ (x : G), ‖f x‖ ∂μ) * ε\n[PROOFSTEP]\nhave h2 : ∀ t, dist (L (f t) (g (x₀ - t))) (L (f t) z₀) ≤ ‖L (f t)‖ * ε :=\n  by\n  intro t; by_cases ht : t ∈ support f\n  · have h2t := hf ht\n    rw [mem_ball_zero_iff] at h2t \n    specialize hg (x₀ - t)\n    rw [sub_eq_add_neg, add_mem_ball_iff_norm, norm_neg, ← sub_eq_add_neg] at hg \n    refine' ((L (f t)).dist_le_op_norm _ _).trans _\n    exact mul_le_mul_of_nonneg_left (hg h2t) (norm_nonneg _)\n  · rw [nmem_support] at ht \n    simp_rw [ht, L.map_zero₂, L.map_zero, norm_zero, zero_mul, dist_self]\n    rfl\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : NontriviallyNormedField 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁷ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁶ : NormedSpace ℝ F\ninst✝⁵ : CompleteSpace F\ninst✝⁴ : SeminormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : SecondCountableTopology G\ninst✝¹ : IsAddLeftInvariant μ\ninst✝ : SigmaFinite μ\nx₀ : G\nR ε : ℝ\nz₀ : E'\nhε : 0 ≤ ε\nhif : Integrable f\nhf : support f ⊆ ball 0 R\nhmg : AEStronglyMeasurable g μ\nhg : ∀ (x : G), x ∈ ball x₀ R → dist (g x) z₀ ≤ ε\nhfg : ConvolutionExistsAt f g x₀ L\n⊢ ∀ (t : G), dist (↑(↑L (f t)) (g (x₀ - t))) (↑(↑L (f t)) z₀) ≤ ‖↑L (f t)‖ * ε\n[PROOFSTEP]\nintro t\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : NontriviallyNormedField 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁷ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁶ : NormedSpace ℝ F\ninst✝⁵ : CompleteSpace F\ninst✝⁴ : SeminormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : SecondCountableTopology G\ninst✝¹ : IsAddLeftInvariant μ\ninst✝ : SigmaFinite μ\nx₀ : G\nR ε : ℝ\nz₀ : E'\nhε : 0 ≤ ε\nhif : Integrable f\nhf : support f ⊆ ball 0 R\nhmg : AEStronglyMeasurable g μ\nhg : ∀ (x : G), x ∈ ball x₀ R → dist (g x) z₀ ≤ ε\nhfg : ConvolutionExistsAt f g x₀ L\nt : G\n⊢ dist (↑(↑L (f t)) (g (x₀ - t))) (↑(↑L (f t)) z₀) ≤ ‖↑L (f t)‖ * ε\n[PROOFSTEP]\nby_cases ht : t ∈ support f\n[GOAL]\ncase pos\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : NontriviallyNormedField 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁷ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁶ : NormedSpace ℝ F\ninst✝⁵ : CompleteSpace F\ninst✝⁴ : SeminormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : SecondCountableTopology G\ninst✝¹ : IsAddLeftInvariant μ\ninst✝ : SigmaFinite μ\nx₀ : G\nR ε : ℝ\nz₀ : E'\nhε : 0 ≤ ε\nhif : Integrable f\nhf : support f ⊆ ball 0 R\nhmg : AEStronglyMeasurable g μ\nhg : ∀ (x : G), x ∈ ball x₀ R → dist (g x) z₀ ≤ ε\nhfg : ConvolutionExistsAt f g x₀ L\nt : G\nht : t ∈ support f\n⊢ dist (↑(↑L (f t)) (g (x₀ - t))) (↑(↑L (f t)) z₀) ≤ ‖↑L (f t)‖ * ε\n[PROOFSTEP]\nhave h2t := hf ht\n[GOAL]\ncase pos\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : NontriviallyNormedField 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁷ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁶ : NormedSpace ℝ F\ninst✝⁵ : CompleteSpace F\ninst✝⁴ : SeminormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : SecondCountableTopology G\ninst✝¹ : IsAddLeftInvariant μ\ninst✝ : SigmaFinite μ\nx₀ : G\nR ε : ℝ\nz₀ : E'\nhε : 0 ≤ ε\nhif : Integrable f\nhf : support f ⊆ ball 0 R\nhmg : AEStronglyMeasurable g μ\nhg : ∀ (x : G), x ∈ ball x₀ R → dist (g x) z₀ ≤ ε\nhfg : ConvolutionExistsAt f g x₀ L\nt : G\nht : t ∈ support f\nh2t : t ∈ ball 0 R\n⊢ dist (↑(↑L (f t)) (g (x₀ - t))) (↑(↑L (f t)) z₀) ≤ ‖↑L (f t)‖ * ε\n[PROOFSTEP]\nrw [mem_ball_zero_iff] at h2t \n[GOAL]\ncase pos\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : NontriviallyNormedField 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁷ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁶ : NormedSpace ℝ F\ninst✝⁵ : CompleteSpace F\ninst✝⁴ : SeminormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : SecondCountableTopology G\ninst✝¹ : IsAddLeftInvariant μ\ninst✝ : SigmaFinite μ\nx₀ : G\nR ε : ℝ\nz₀ : E'\nhε : 0 ≤ ε\nhif : Integrable f\nhf : support f ⊆ ball 0 R\nhmg : AEStronglyMeasurable g μ\nhg : ∀ (x : G), x ∈ ball x₀ R → dist (g x) z₀ ≤ ε\nhfg : ConvolutionExistsAt f g x₀ L\nt : G\nht : t ∈ support f\nh2t : ‖t‖ < R\n⊢ dist (↑(↑L (f t)) (g (x₀ - t))) (↑(↑L (f t)) z₀) ≤ ‖↑L (f t)‖ * ε\n[PROOFSTEP]\nspecialize hg (x₀ - t)\n[GOAL]\ncase pos\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : NontriviallyNormedField 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁷ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁶ : NormedSpace ℝ F\ninst✝⁵ : CompleteSpace F\ninst✝⁴ : SeminormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : SecondCountableTopology G\ninst✝¹ : IsAddLeftInvariant μ\ninst✝ : SigmaFinite μ\nx₀ : G\nR ε : ℝ\nz₀ : E'\nhε : 0 ≤ ε\nhif : Integrable f\nhf : support f ⊆ ball 0 R\nhmg : AEStronglyMeasurable g μ\nhfg : ConvolutionExistsAt f g x₀ L\nt : G\nht : t ∈ support f\nh2t : ‖t‖ < R\nhg : x₀ - t ∈ ball x₀ R → dist (g (x₀ - t)) z₀ ≤ ε\n⊢ dist (↑(↑L (f t)) (g (x₀ - t))) (↑(↑L (f t)) z₀) ≤ ‖↑L (f t)‖ * ε\n[PROOFSTEP]\nrw [sub_eq_add_neg, add_mem_ball_iff_norm, norm_neg, ← sub_eq_add_neg] at hg \n[GOAL]\ncase pos\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : NontriviallyNormedField 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁷ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁶ : NormedSpace ℝ F\ninst✝⁵ : CompleteSpace F\ninst✝⁴ : SeminormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : SecondCountableTopology G\ninst✝¹ : IsAddLeftInvariant μ\ninst✝ : SigmaFinite μ\nx₀ : G\nR ε : ℝ\nz₀ : E'\nhε : 0 ≤ ε\nhif : Integrable f\nhf : support f ⊆ ball 0 R\nhmg : AEStronglyMeasurable g μ\nhfg : ConvolutionExistsAt f g x₀ L\nt : G\nht : t ∈ support f\nh2t : ‖t‖ < R\nhg : ‖t‖ < R → dist (g (x₀ - t)) z₀ ≤ ε\n⊢ dist (↑(↑L (f t)) (g (x₀ - t))) (↑(↑L (f t)) z₀) ≤ ‖↑L (f t)‖ * ε\n[PROOFSTEP]\nrefine' ((L (f t)).dist_le_op_norm _ _).trans _\n[GOAL]\ncase pos\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : NontriviallyNormedField 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁷ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁶ : NormedSpace ℝ F\ninst✝⁵ : CompleteSpace F\ninst✝⁴ : SeminormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : SecondCountableTopology G\ninst✝¹ : IsAddLeftInvariant μ\ninst✝ : SigmaFinite μ\nx₀ : G\nR ε : ℝ\nz₀ : E'\nhε : 0 ≤ ε\nhif : Integrable f\nhf : support f ⊆ ball 0 R\nhmg : AEStronglyMeasurable g μ\nhfg : ConvolutionExistsAt f g x₀ L\nt : G\nht : t ∈ support f\nh2t : ‖t‖ < R\nhg : ‖t‖ < R → dist (g (x₀ - t)) z₀ ≤ ε\n⊢ ‖↑L (f t)‖ * dist (g (x₀ - t)) z₀ ≤ ‖↑L (f t)‖ * ε\n[PROOFSTEP]\nexact mul_le_mul_of_nonneg_left (hg h2t) (norm_nonneg _)\n[GOAL]\ncase neg\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : NontriviallyNormedField 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁷ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁶ : NormedSpace ℝ F\ninst✝⁵ : CompleteSpace F\ninst✝⁴ : SeminormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : SecondCountableTopology G\ninst✝¹ : IsAddLeftInvariant μ\ninst✝ : SigmaFinite μ\nx₀ : G\nR ε : ℝ\nz₀ : E'\nhε : 0 ≤ ε\nhif : Integrable f\nhf : support f ⊆ ball 0 R\nhmg : AEStronglyMeasurable g μ\nhg : ∀ (x : G), x ∈ ball x₀ R → dist (g x) z₀ ≤ ε\nhfg : ConvolutionExistsAt f g x₀ L\nt : G\nht : ¬t ∈ support f\n⊢ dist (↑(↑L (f t)) (g (x₀ - t))) (↑(↑L (f t)) z₀) ≤ ‖↑L (f t)‖ * ε\n[PROOFSTEP]\nrw [nmem_support] at ht \n[GOAL]\ncase neg\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : NontriviallyNormedField 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁷ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁶ : NormedSpace ℝ F\ninst✝⁵ : CompleteSpace F\ninst✝⁴ : SeminormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : SecondCountableTopology G\ninst✝¹ : IsAddLeftInvariant μ\ninst✝ : SigmaFinite μ\nx₀ : G\nR ε : ℝ\nz₀ : E'\nhε : 0 ≤ ε\nhif : Integrable f\nhf : support f ⊆ ball 0 R\nhmg : AEStronglyMeasurable g μ\nhg : ∀ (x : G), x ∈ ball x₀ R → dist (g x) z₀ ≤ ε\nhfg : ConvolutionExistsAt f g x₀ L\nt : G\nht : f t = 0\n⊢ dist (↑(↑L (f t)) (g (x₀ - t))) (↑(↑L (f t)) z₀) ≤ ‖↑L (f t)‖ * ε\n[PROOFSTEP]\nsimp_rw [ht, L.map_zero₂, L.map_zero, norm_zero, zero_mul, dist_self]\n[GOAL]\ncase neg\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : NontriviallyNormedField 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁷ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁶ : NormedSpace ℝ F\ninst✝⁵ : CompleteSpace F\ninst✝⁴ : SeminormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : SecondCountableTopology G\ninst✝¹ : IsAddLeftInvariant μ\ninst✝ : SigmaFinite μ\nx₀ : G\nR ε : ℝ\nz₀ : E'\nhε : 0 ≤ ε\nhif : Integrable f\nhf : support f ⊆ ball 0 R\nhmg : AEStronglyMeasurable g μ\nhg : ∀ (x : G), x ∈ ball x₀ R → dist (g x) z₀ ≤ ε\nhfg : ConvolutionExistsAt f g x₀ L\nt : G\nht : f t = 0\n⊢ 0 ≤ 0\n[PROOFSTEP]\nrfl\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : NontriviallyNormedField 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁷ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁶ : NormedSpace ℝ F\ninst✝⁵ : CompleteSpace F\ninst✝⁴ : SeminormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : SecondCountableTopology G\ninst✝¹ : IsAddLeftInvariant μ\ninst✝ : SigmaFinite μ\nx₀ : G\nR ε : ℝ\nz₀ : E'\nhε : 0 ≤ ε\nhif : Integrable f\nhf : support f ⊆ ball 0 R\nhmg : AEStronglyMeasurable g μ\nhg : ∀ (x : G), x ∈ ball x₀ R → dist (g x) z₀ ≤ ε\nhfg : ConvolutionExistsAt f g x₀ L\nh2 : ∀ (t : G), dist (↑(↑L (f t)) (g (x₀ - t))) (↑(↑L (f t)) z₀) ≤ ‖↑L (f t)‖ * ε\n⊢ dist (f ⋆[L, x₀] g) (∫ (t : G), ↑(↑L (f t)) z₀ ∂μ) ≤ (‖L‖ * ∫ (x : G), ‖f x‖ ∂μ) * ε\n[PROOFSTEP]\nsimp_rw [convolution_def]\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : NontriviallyNormedField 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁷ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁶ : NormedSpace ℝ F\ninst✝⁵ : CompleteSpace F\ninst✝⁴ : SeminormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : SecondCountableTopology G\ninst✝¹ : IsAddLeftInvariant μ\ninst✝ : SigmaFinite μ\nx₀ : G\nR ε : ℝ\nz₀ : E'\nhε : 0 ≤ ε\nhif : Integrable f\nhf : support f ⊆ ball 0 R\nhmg : AEStronglyMeasurable g μ\nhg : ∀ (x : G), x ∈ ball x₀ R → dist (g x) z₀ ≤ ε\nhfg : ConvolutionExistsAt f g x₀ L\nh2 : ∀ (t : G), dist (↑(↑L (f t)) (g (x₀ - t))) (↑(↑L (f t)) z₀) ≤ ‖↑L (f t)‖ * ε\n⊢ dist (∫ (t : G), ↑(↑L (f t)) (g (x₀ - t)) ∂μ) (∫ (t : G), ↑(↑L (f t)) z₀ ∂μ) ≤ (‖L‖ * ∫ (x : G), ‖f x‖ ∂μ) * ε\n[PROOFSTEP]\nsimp_rw [dist_eq_norm] at h2 ⊢\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : NontriviallyNormedField 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁷ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁶ : NormedSpace ℝ F\ninst✝⁵ : CompleteSpace F\ninst✝⁴ : SeminormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : SecondCountableTopology G\ninst✝¹ : IsAddLeftInvariant μ\ninst✝ : SigmaFinite μ\nx₀ : G\nR ε : ℝ\nz₀ : E'\nhε : 0 ≤ ε\nhif : Integrable f\nhf : support f ⊆ ball 0 R\nhmg : AEStronglyMeasurable g μ\nhg : ∀ (x : G), x ∈ ball x₀ R → dist (g x) z₀ ≤ ε\nhfg : ConvolutionExistsAt f g x₀ L\nh2 : ∀ (t : G), ‖↑(↑L (f t)) (g (x₀ - t)) - ↑(↑L (f t)) z₀‖ ≤ ‖↑L (f t)‖ * ε\n⊢ ‖∫ (t : G), ↑(↑L (f t)) (g (x₀ - t)) ∂μ - ∫ (t : G), ↑(↑L (f t)) z₀ ∂μ‖ ≤ (‖L‖ * ∫ (x : G), ‖f x‖ ∂μ) * ε\n[PROOFSTEP]\nrw [← integral_sub hfg.integrable]\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : NontriviallyNormedField 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁷ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁶ : NormedSpace ℝ F\ninst✝⁵ : CompleteSpace F\ninst✝⁴ : SeminormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : SecondCountableTopology G\ninst✝¹ : IsAddLeftInvariant μ\ninst✝ : SigmaFinite μ\nx₀ : G\nR ε : ℝ\nz₀ : E'\nhε : 0 ≤ ε\nhif : Integrable f\nhf : support f ⊆ ball 0 R\nhmg : AEStronglyMeasurable g μ\nhg : ∀ (x : G), x ∈ ball x₀ R → dist (g x) z₀ ≤ ε\nhfg : ConvolutionExistsAt f g x₀ L\nh2 : ∀ (t : G), ‖↑(↑L (f t)) (g (x₀ - t)) - ↑(↑L (f t)) z₀‖ ≤ ‖↑L (f t)‖ * ε\n⊢ ‖∫ (a : G), ↑(↑L (f a)) (g (x₀ - a)) - ↑(↑L (f a)) z₀ ∂μ‖ ≤ (‖L‖ * ∫ (x : G), ‖f x‖ ∂μ) * ε\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : NontriviallyNormedField 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁷ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁶ : NormedSpace ℝ F\ninst✝⁵ : CompleteSpace F\ninst✝⁴ : SeminormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : SecondCountableTopology G\ninst✝¹ : IsAddLeftInvariant μ\ninst✝ : SigmaFinite μ\nx₀ : G\nR ε : ℝ\nz₀ : E'\nhε : 0 ≤ ε\nhif : Integrable f\nhf : support f ⊆ ball 0 R\nhmg : AEStronglyMeasurable g μ\nhg : ∀ (x : G), x ∈ ball x₀ R → dist (g x) z₀ ≤ ε\nhfg : ConvolutionExistsAt f g x₀ L\nh2 : ∀ (t : G), ‖↑(↑L (f t)) (g (x₀ - t)) - ↑(↑L (f t)) z₀‖ ≤ ‖↑L (f t)‖ * ε\n⊢ Integrable fun t => ↑(↑L (f t)) z₀\n[PROOFSTEP]\nswap\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : NontriviallyNormedField 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁷ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁶ : NormedSpace ℝ F\ninst✝⁵ : CompleteSpace F\ninst✝⁴ : SeminormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : SecondCountableTopology G\ninst✝¹ : IsAddLeftInvariant μ\ninst✝ : SigmaFinite μ\nx₀ : G\nR ε : ℝ\nz₀ : E'\nhε : 0 ≤ ε\nhif : Integrable f\nhf : support f ⊆ ball 0 R\nhmg : AEStronglyMeasurable g μ\nhg : ∀ (x : G), x ∈ ball x₀ R → dist (g x) z₀ ≤ ε\nhfg : ConvolutionExistsAt f g x₀ L\nh2 : ∀ (t : G), ‖↑(↑L (f t)) (g (x₀ - t)) - ↑(↑L (f t)) z₀‖ ≤ ‖↑L (f t)‖ * ε\n⊢ Integrable fun t => ↑(↑L (f t)) z₀\n[PROOFSTEP]\nexact (L.flip z₀).integrable_comp hif\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : NontriviallyNormedField 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁷ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁶ : NormedSpace ℝ F\ninst✝⁵ : CompleteSpace F\ninst✝⁴ : SeminormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : SecondCountableTopology G\ninst✝¹ : IsAddLeftInvariant μ\ninst✝ : SigmaFinite μ\nx₀ : G\nR ε : ℝ\nz₀ : E'\nhε : 0 ≤ ε\nhif : Integrable f\nhf : support f ⊆ ball 0 R\nhmg : AEStronglyMeasurable g μ\nhg : ∀ (x : G), x ∈ ball x₀ R → dist (g x) z₀ ≤ ε\nhfg : ConvolutionExistsAt f g x₀ L\nh2 : ∀ (t : G), ‖↑(↑L (f t)) (g (x₀ - t)) - ↑(↑L (f t)) z₀‖ ≤ ‖↑L (f t)‖ * ε\n⊢ ‖∫ (a : G), ↑(↑L (f a)) (g (x₀ - a)) - ↑(↑L (f a)) z₀ ∂μ‖ ≤ (‖L‖ * ∫ (x : G), ‖f x‖ ∂μ) * ε\n[PROOFSTEP]\nrefine' (norm_integral_le_of_norm_le ((L.integrable_comp hif).norm.mul_const ε) (eventually_of_forall h2)).trans _\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : NontriviallyNormedField 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁷ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁶ : NormedSpace ℝ F\ninst✝⁵ : CompleteSpace F\ninst✝⁴ : SeminormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : SecondCountableTopology G\ninst✝¹ : IsAddLeftInvariant μ\ninst✝ : SigmaFinite μ\nx₀ : G\nR ε : ℝ\nz₀ : E'\nhε : 0 ≤ ε\nhif : Integrable f\nhf : support f ⊆ ball 0 R\nhmg : AEStronglyMeasurable g μ\nhg : ∀ (x : G), x ∈ ball x₀ R → dist (g x) z₀ ≤ ε\nhfg : ConvolutionExistsAt f g x₀ L\nh2 : ∀ (t : G), ‖↑(↑L (f t)) (g (x₀ - t)) - ↑(↑L (f t)) z₀‖ ≤ ‖↑L (f t)‖ * ε\n⊢ ∫ (x : G), ‖↑L (f x)‖ * ε ∂μ ≤ (‖L‖ * ∫ (x : G), ‖f x‖ ∂μ) * ε\n[PROOFSTEP]\nrw [integral_mul_right]\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : NontriviallyNormedField 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁷ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁶ : NormedSpace ℝ F\ninst✝⁵ : CompleteSpace F\ninst✝⁴ : SeminormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : SecondCountableTopology G\ninst✝¹ : IsAddLeftInvariant μ\ninst✝ : SigmaFinite μ\nx₀ : G\nR ε : ℝ\nz₀ : E'\nhε : 0 ≤ ε\nhif : Integrable f\nhf : support f ⊆ ball 0 R\nhmg : AEStronglyMeasurable g μ\nhg : ∀ (x : G), x ∈ ball x₀ R → dist (g x) z₀ ≤ ε\nhfg : ConvolutionExistsAt f g x₀ L\nh2 : ∀ (t : G), ‖↑(↑L (f t)) (g (x₀ - t)) - ↑(↑L (f t)) z₀‖ ≤ ‖↑L (f t)‖ * ε\n⊢ (∫ (a : G), ‖↑L (f a)‖ ∂μ) * ε ≤ (‖L‖ * ∫ (x : G), ‖f x‖ ∂μ) * ε\n[PROOFSTEP]\nrefine' mul_le_mul_of_nonneg_right _ hε\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : NontriviallyNormedField 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁷ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁶ : NormedSpace ℝ F\ninst✝⁵ : CompleteSpace F\ninst✝⁴ : SeminormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : SecondCountableTopology G\ninst✝¹ : IsAddLeftInvariant μ\ninst✝ : SigmaFinite μ\nx₀ : G\nR ε : ℝ\nz₀ : E'\nhε : 0 ≤ ε\nhif : Integrable f\nhf : support f ⊆ ball 0 R\nhmg : AEStronglyMeasurable g μ\nhg : ∀ (x : G), x ∈ ball x₀ R → dist (g x) z₀ ≤ ε\nhfg : ConvolutionExistsAt f g x₀ L\nh2 : ∀ (t : G), ‖↑(↑L (f t)) (g (x₀ - t)) - ↑(↑L (f t)) z₀‖ ≤ ‖↑L (f t)‖ * ε\n⊢ ∫ (a : G), ‖↑L (f a)‖ ∂μ ≤ ‖L‖ * ∫ (x : G), ‖f x‖ ∂μ\n[PROOFSTEP]\nhave h3 : ∀ t, ‖L (f t)‖ ≤ ‖L‖ * ‖f t‖ := by\n  intro t\n  exact L.le_op_norm (f t)\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : NontriviallyNormedField 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁷ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁶ : NormedSpace ℝ F\ninst✝⁵ : CompleteSpace F\ninst✝⁴ : SeminormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : SecondCountableTopology G\ninst✝¹ : IsAddLeftInvariant μ\ninst✝ : SigmaFinite μ\nx₀ : G\nR ε : ℝ\nz₀ : E'\nhε : 0 ≤ ε\nhif : Integrable f\nhf : support f ⊆ ball 0 R\nhmg : AEStronglyMeasurable g μ\nhg : ∀ (x : G), x ∈ ball x₀ R → dist (g x) z₀ ≤ ε\nhfg : ConvolutionExistsAt f g x₀ L\nh2 : ∀ (t : G), ‖↑(↑L (f t)) (g (x₀ - t)) - ↑(↑L (f t)) z₀‖ ≤ ‖↑L (f t)‖ * ε\n⊢ ∀ (t : G), ‖↑L (f t)‖ ≤ ‖L‖ * ‖f t‖\n[PROOFSTEP]\nintro t\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : NontriviallyNormedField 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁷ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁶ : NormedSpace ℝ F\ninst✝⁵ : CompleteSpace F\ninst✝⁴ : SeminormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : SecondCountableTopology G\ninst✝¹ : IsAddLeftInvariant μ\ninst✝ : SigmaFinite μ\nx₀ : G\nR ε : ℝ\nz₀ : E'\nhε : 0 ≤ ε\nhif : Integrable f\nhf : support f ⊆ ball 0 R\nhmg : AEStronglyMeasurable g μ\nhg : ∀ (x : G), x ∈ ball x₀ R → dist (g x) z₀ ≤ ε\nhfg : ConvolutionExistsAt f g x₀ L\nh2 : ∀ (t : G), ‖↑(↑L (f t)) (g (x₀ - t)) - ↑(↑L (f t)) z₀‖ ≤ ‖↑L (f t)‖ * ε\nt : G\n⊢ ‖↑L (f t)‖ ≤ ‖L‖ * ‖f t‖\n[PROOFSTEP]\nexact L.le_op_norm (f t)\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : NontriviallyNormedField 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁷ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁶ : NormedSpace ℝ F\ninst✝⁵ : CompleteSpace F\ninst✝⁴ : SeminormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : SecondCountableTopology G\ninst✝¹ : IsAddLeftInvariant μ\ninst✝ : SigmaFinite μ\nx₀ : G\nR ε : ℝ\nz₀ : E'\nhε : 0 ≤ ε\nhif : Integrable f\nhf : support f ⊆ ball 0 R\nhmg : AEStronglyMeasurable g μ\nhg : ∀ (x : G), x ∈ ball x₀ R → dist (g x) z₀ ≤ ε\nhfg : ConvolutionExistsAt f g x₀ L\nh2 : ∀ (t : G), ‖↑(↑L (f t)) (g (x₀ - t)) - ↑(↑L (f t)) z₀‖ ≤ ‖↑L (f t)‖ * ε\nh3 : ∀ (t : G), ‖↑L (f t)‖ ≤ ‖L‖ * ‖f t‖\n⊢ ∫ (a : G), ‖↑L (f a)‖ ∂μ ≤ ‖L‖ * ∫ (x : G), ‖f x‖ ∂μ\n[PROOFSTEP]\nrefine' (integral_mono (L.integrable_comp hif).norm (hif.norm.const_mul _) h3).trans_eq _\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : NontriviallyNormedField 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁷ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁶ : NormedSpace ℝ F\ninst✝⁵ : CompleteSpace F\ninst✝⁴ : SeminormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : SecondCountableTopology G\ninst✝¹ : IsAddLeftInvariant μ\ninst✝ : SigmaFinite μ\nx₀ : G\nR ε : ℝ\nz₀ : E'\nhε : 0 ≤ ε\nhif : Integrable f\nhf : support f ⊆ ball 0 R\nhmg : AEStronglyMeasurable g μ\nhg : ∀ (x : G), x ∈ ball x₀ R → dist (g x) z₀ ≤ ε\nhfg : ConvolutionExistsAt f g x₀ L\nh2 : ∀ (t : G), ‖↑(↑L (f t)) (g (x₀ - t)) - ↑(↑L (f t)) z₀‖ ≤ ‖↑L (f t)‖ * ε\nh3 : ∀ (t : G), ‖↑L (f t)‖ ≤ ‖L‖ * ‖f t‖\n⊢ ∫ (a : G), ‖L‖ * ‖f a‖ ∂μ = ‖L‖ * ∫ (x : G), ‖f x‖ ∂μ\n[PROOFSTEP]\nrw [integral_mul_left]\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : NormedAddCommGroup E'\ninst✝¹⁷ : NormedAddCommGroup E''\ninst✝¹⁶ : NormedAddCommGroup F\nf✝ f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁵ : NontriviallyNormedField 𝕜\ninst✝¹⁴ : NormedSpace 𝕜 E\ninst✝¹³ : NormedSpace 𝕜 E'\ninst✝¹² : NormedSpace 𝕜 E''\ninst✝¹¹ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝¹⁰ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\ninst✝⁷ : SeminormedAddCommGroup G\ninst✝⁶ : BorelSpace G\ninst✝⁵ : SecondCountableTopology G\ninst✝⁴ : IsAddLeftInvariant μ\ninst✝³ : SigmaFinite μ\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedSpace ℝ E'\ninst✝ : CompleteSpace E'\nf : G → ℝ\nx₀ : G\nR ε : ℝ\nz₀ : E'\nhε : 0 ≤ ε\nhf : support f ⊆ ball 0 R\nhnf : ∀ (x : G), 0 ≤ f x\nhintf : ∫ (x : G), f x ∂μ = 1\nhmg : AEStronglyMeasurable g μ\nhg : ∀ (x : G), x ∈ ball x₀ R → dist (g x) z₀ ≤ ε\n⊢ dist (f ⋆[lsmul ℝ ℝ, x₀] g) z₀ ≤ ε\n[PROOFSTEP]\nhave hif : Integrable f μ := integrable_of_integral_eq_one hintf\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : NormedAddCommGroup E'\ninst✝¹⁷ : NormedAddCommGroup E''\ninst✝¹⁶ : NormedAddCommGroup F\nf✝ f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁵ : NontriviallyNormedField 𝕜\ninst✝¹⁴ : NormedSpace 𝕜 E\ninst✝¹³ : NormedSpace 𝕜 E'\ninst✝¹² : NormedSpace 𝕜 E''\ninst✝¹¹ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝¹⁰ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\ninst✝⁷ : SeminormedAddCommGroup G\ninst✝⁶ : BorelSpace G\ninst✝⁵ : SecondCountableTopology G\ninst✝⁴ : IsAddLeftInvariant μ\ninst✝³ : SigmaFinite μ\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedSpace ℝ E'\ninst✝ : CompleteSpace E'\nf : G → ℝ\nx₀ : G\nR ε : ℝ\nz₀ : E'\nhε : 0 ≤ ε\nhf : support f ⊆ ball 0 R\nhnf : ∀ (x : G), 0 ≤ f x\nhintf : ∫ (x : G), f x ∂μ = 1\nhmg : AEStronglyMeasurable g μ\nhg : ∀ (x : G), x ∈ ball x₀ R → dist (g x) z₀ ≤ ε\nhif : Integrable f\n⊢ dist (f ⋆[lsmul ℝ ℝ, x₀] g) z₀ ≤ ε\n[PROOFSTEP]\nconvert (dist_convolution_le' (lsmul ℝ ℝ) hε hif hf hmg hg).trans _\n[GOAL]\ncase h.e'_3.h.e'_4\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : NormedAddCommGroup E'\ninst✝¹⁷ : NormedAddCommGroup E''\ninst✝¹⁶ : NormedAddCommGroup F\nf✝ f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁵ : NontriviallyNormedField 𝕜\ninst✝¹⁴ : NormedSpace 𝕜 E\ninst✝¹³ : NormedSpace 𝕜 E'\ninst✝¹² : NormedSpace 𝕜 E''\ninst✝¹¹ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝¹⁰ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\ninst✝⁷ : SeminormedAddCommGroup G\ninst✝⁶ : BorelSpace G\ninst✝⁵ : SecondCountableTopology G\ninst✝⁴ : IsAddLeftInvariant μ\ninst✝³ : SigmaFinite μ\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedSpace ℝ E'\ninst✝ : CompleteSpace E'\nf : G → ℝ\nx₀ : G\nR ε : ℝ\nz₀ : E'\nhε : 0 ≤ ε\nhf : support f ⊆ ball 0 R\nhnf : ∀ (x : G), 0 ≤ f x\nhintf : ∫ (x : G), f x ∂μ = 1\nhmg : AEStronglyMeasurable g μ\nhg : ∀ (x : G), x ∈ ball x₀ R → dist (g x) z₀ ≤ ε\nhif : Integrable f\n⊢ z₀ = ∫ (t : G), ↑(↑(lsmul ℝ ℝ) (f t)) z₀ ∂μ\n[PROOFSTEP]\nsimp_rw [lsmul_apply, integral_smul_const, hintf, one_smul]\n[GOAL]\ncase convert_2\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : NormedAddCommGroup E'\ninst✝¹⁷ : NormedAddCommGroup E''\ninst✝¹⁶ : NormedAddCommGroup F\nf✝ f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁵ : NontriviallyNormedField 𝕜\ninst✝¹⁴ : NormedSpace 𝕜 E\ninst✝¹³ : NormedSpace 𝕜 E'\ninst✝¹² : NormedSpace 𝕜 E''\ninst✝¹¹ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝¹⁰ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\ninst✝⁷ : SeminormedAddCommGroup G\ninst✝⁶ : BorelSpace G\ninst✝⁵ : SecondCountableTopology G\ninst✝⁴ : IsAddLeftInvariant μ\ninst✝³ : SigmaFinite μ\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedSpace ℝ E'\ninst✝ : CompleteSpace E'\nf : G → ℝ\nx₀ : G\nR ε : ℝ\nz₀ : E'\nhε : 0 ≤ ε\nhf : support f ⊆ ball 0 R\nhnf : ∀ (x : G), 0 ≤ f x\nhintf : ∫ (x : G), f x ∂μ = 1\nhmg : AEStronglyMeasurable g μ\nhg : ∀ (x : G), x ∈ ball x₀ R → dist (g x) z₀ ≤ ε\nhif : Integrable f\n⊢ (‖lsmul ℝ ℝ‖ * ∫ (x : G), ‖f x‖ ∂μ) * ε ≤ ε\n[PROOFSTEP]\nsimp_rw [Real.norm_of_nonneg (hnf _), hintf, mul_one]\n[GOAL]\ncase convert_2\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : NormedAddCommGroup E'\ninst✝¹⁷ : NormedAddCommGroup E''\ninst✝¹⁶ : NormedAddCommGroup F\nf✝ f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁵ : NontriviallyNormedField 𝕜\ninst✝¹⁴ : NormedSpace 𝕜 E\ninst✝¹³ : NormedSpace 𝕜 E'\ninst✝¹² : NormedSpace 𝕜 E''\ninst✝¹¹ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝¹⁰ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\ninst✝⁷ : SeminormedAddCommGroup G\ninst✝⁶ : BorelSpace G\ninst✝⁵ : SecondCountableTopology G\ninst✝⁴ : IsAddLeftInvariant μ\ninst✝³ : SigmaFinite μ\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedSpace ℝ E'\ninst✝ : CompleteSpace E'\nf : G → ℝ\nx₀ : G\nR ε : ℝ\nz₀ : E'\nhε : 0 ≤ ε\nhf : support f ⊆ ball 0 R\nhnf : ∀ (x : G), 0 ≤ f x\nhintf : ∫ (x : G), f x ∂μ = 1\nhmg : AEStronglyMeasurable g μ\nhg : ∀ (x : G), x ∈ ball x₀ R → dist (g x) z₀ ≤ ε\nhif : Integrable f\n⊢ ‖lsmul ℝ ℝ‖ * ε ≤ ε\n[PROOFSTEP]\nexact (mul_le_mul_of_nonneg_right op_norm_lsmul_le hε).trans_eq (one_mul ε)\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : NormedAddCommGroup E'\ninst✝¹⁷ : NormedAddCommGroup E''\ninst✝¹⁶ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁵ : NontriviallyNormedField 𝕜\ninst✝¹⁴ : NormedSpace 𝕜 E\ninst✝¹³ : NormedSpace 𝕜 E'\ninst✝¹² : NormedSpace 𝕜 E''\ninst✝¹¹ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝¹⁰ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\ninst✝⁷ : SeminormedAddCommGroup G\ninst✝⁶ : BorelSpace G\ninst✝⁵ : SecondCountableTopology G\ninst✝⁴ : IsAddLeftInvariant μ\ninst✝³ : SigmaFinite μ\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedSpace ℝ E'\ninst✝ : CompleteSpace E'\nι : Type u_1\ng : ι → G → E'\nl : Filter ι\nx₀ : G\nz₀ : E'\nφ : ι → G → ℝ\nk : ι → G\nhnφ : ∀ᶠ (i : ι) in l, ∀ (x : G), 0 ≤ φ i x\nhiφ : ∀ᶠ (i : ι) in l, ∫ (x : G), φ i x ∂μ = 1\nhφ : Tendsto (fun n => support (φ n)) l (smallSets (𝓝 0))\nhmg : ∀ᶠ (i : ι) in l, AEStronglyMeasurable (g i) μ\nhcg : Tendsto (uncurry g) (l ×ˢ 𝓝 x₀) (𝓝 z₀)\nhk : Tendsto k l (𝓝 x₀)\n⊢ Tendsto (fun i => φ i ⋆[lsmul ℝ ℝ, k i] g i) l (𝓝 z₀)\n[PROOFSTEP]\nsimp_rw [tendsto_smallSets_iff] at hφ \n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : NormedAddCommGroup E'\ninst✝¹⁷ : NormedAddCommGroup E''\ninst✝¹⁶ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁵ : NontriviallyNormedField 𝕜\ninst✝¹⁴ : NormedSpace 𝕜 E\ninst✝¹³ : NormedSpace 𝕜 E'\ninst✝¹² : NormedSpace 𝕜 E''\ninst✝¹¹ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝¹⁰ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\ninst✝⁷ : SeminormedAddCommGroup G\ninst✝⁶ : BorelSpace G\ninst✝⁵ : SecondCountableTopology G\ninst✝⁴ : IsAddLeftInvariant μ\ninst✝³ : SigmaFinite μ\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedSpace ℝ E'\ninst✝ : CompleteSpace E'\nι : Type u_1\ng : ι → G → E'\nl : Filter ι\nx₀ : G\nz₀ : E'\nφ : ι → G → ℝ\nk : ι → G\nhnφ : ∀ᶠ (i : ι) in l, ∀ (x : G), 0 ≤ φ i x\nhiφ : ∀ᶠ (i : ι) in l, ∫ (x : G), φ i x ∂μ = 1\nhmg : ∀ᶠ (i : ι) in l, AEStronglyMeasurable (g i) μ\nhcg : Tendsto (uncurry g) (l ×ˢ 𝓝 x₀) (𝓝 z₀)\nhk : Tendsto k l (𝓝 x₀)\nhφ : ∀ (t : Set G), t ∈ 𝓝 0 → ∀ᶠ (x : ι) in l, support (φ x) ⊆ t\n⊢ Tendsto (fun i => φ i ⋆[lsmul ℝ ℝ, k i] g i) l (𝓝 z₀)\n[PROOFSTEP]\nrw [Metric.tendsto_nhds] at hcg ⊢\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : NormedAddCommGroup E'\ninst✝¹⁷ : NormedAddCommGroup E''\ninst✝¹⁶ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁵ : NontriviallyNormedField 𝕜\ninst✝¹⁴ : NormedSpace 𝕜 E\ninst✝¹³ : NormedSpace 𝕜 E'\ninst✝¹² : NormedSpace 𝕜 E''\ninst✝¹¹ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝¹⁰ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\ninst✝⁷ : SeminormedAddCommGroup G\ninst✝⁶ : BorelSpace G\ninst✝⁵ : SecondCountableTopology G\ninst✝⁴ : IsAddLeftInvariant μ\ninst✝³ : SigmaFinite μ\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedSpace ℝ E'\ninst✝ : CompleteSpace E'\nι : Type u_1\ng : ι → G → E'\nl : Filter ι\nx₀ : G\nz₀ : E'\nφ : ι → G → ℝ\nk : ι → G\nhnφ : ∀ᶠ (i : ι) in l, ∀ (x : G), 0 ≤ φ i x\nhiφ : ∀ᶠ (i : ι) in l, ∫ (x : G), φ i x ∂μ = 1\nhmg : ∀ᶠ (i : ι) in l, AEStronglyMeasurable (g i) μ\nhcg : ∀ (ε : ℝ), ε > 0 → ∀ᶠ (x : ι × G) in l ×ˢ 𝓝 x₀, dist (uncurry g x) z₀ < ε\nhk : Tendsto k l (𝓝 x₀)\nhφ : ∀ (t : Set G), t ∈ 𝓝 0 → ∀ᶠ (x : ι) in l, support (φ x) ⊆ t\n⊢ ∀ (ε : ℝ), ε > 0 → ∀ᶠ (x : ι) in l, dist (φ x ⋆[lsmul ℝ ℝ, k x] g x) z₀ < ε\n[PROOFSTEP]\nsimp_rw [Metric.eventually_prod_nhds_iff] at hcg \n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : NormedAddCommGroup E'\ninst✝¹⁷ : NormedAddCommGroup E''\ninst✝¹⁶ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁵ : NontriviallyNormedField 𝕜\ninst✝¹⁴ : NormedSpace 𝕜 E\ninst✝¹³ : NormedSpace 𝕜 E'\ninst✝¹² : NormedSpace 𝕜 E''\ninst✝¹¹ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝¹⁰ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\ninst✝⁷ : SeminormedAddCommGroup G\ninst✝⁶ : BorelSpace G\ninst✝⁵ : SecondCountableTopology G\ninst✝⁴ : IsAddLeftInvariant μ\ninst✝³ : SigmaFinite μ\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedSpace ℝ E'\ninst✝ : CompleteSpace E'\nι : Type u_1\ng : ι → G → E'\nl : Filter ι\nx₀ : G\nz₀ : E'\nφ : ι → G → ℝ\nk : ι → G\nhnφ : ∀ᶠ (i : ι) in l, ∀ (x : G), 0 ≤ φ i x\nhiφ : ∀ᶠ (i : ι) in l, ∫ (x : G), φ i x ∂μ = 1\nhmg : ∀ᶠ (i : ι) in l, AEStronglyMeasurable (g i) μ\nhk : Tendsto k l (𝓝 x₀)\nhφ : ∀ (t : Set G), t ∈ 𝓝 0 → ∀ᶠ (x : ι) in l, support (φ x) ⊆ t\nhcg :\n  ∀ (ε : ℝ),\n    ε > 0 →\n      ∃ pa,\n        (∀ᶠ (i : ι) in l, pa i) ∧\n          ∃ ε_1, ε_1 > 0 ∧ ∀ {i : ι}, pa i → ∀ {x : G}, dist x x₀ < ε_1 → dist (uncurry g (i, x)) z₀ < ε\n⊢ ∀ (ε : ℝ), ε > 0 → ∀ᶠ (x : ι) in l, dist (φ x ⋆[lsmul ℝ ℝ, k x] g x) z₀ < ε\n[PROOFSTEP]\nintro ε hε\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : NormedAddCommGroup E'\ninst✝¹⁷ : NormedAddCommGroup E''\ninst✝¹⁶ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁵ : NontriviallyNormedField 𝕜\ninst✝¹⁴ : NormedSpace 𝕜 E\ninst✝¹³ : NormedSpace 𝕜 E'\ninst✝¹² : NormedSpace 𝕜 E''\ninst✝¹¹ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝¹⁰ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\ninst✝⁷ : SeminormedAddCommGroup G\ninst✝⁶ : BorelSpace G\ninst✝⁵ : SecondCountableTopology G\ninst✝⁴ : IsAddLeftInvariant μ\ninst✝³ : SigmaFinite μ\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedSpace ℝ E'\ninst✝ : CompleteSpace E'\nι : Type u_1\ng : ι → G → E'\nl : Filter ι\nx₀ : G\nz₀ : E'\nφ : ι → G → ℝ\nk : ι → G\nhnφ : ∀ᶠ (i : ι) in l, ∀ (x : G), 0 ≤ φ i x\nhiφ : ∀ᶠ (i : ι) in l, ∫ (x : G), φ i x ∂μ = 1\nhmg : ∀ᶠ (i : ι) in l, AEStronglyMeasurable (g i) μ\nhk : Tendsto k l (𝓝 x₀)\nhφ : ∀ (t : Set G), t ∈ 𝓝 0 → ∀ᶠ (x : ι) in l, support (φ x) ⊆ t\nhcg :\n  ∀ (ε : ℝ),\n    ε > 0 →\n      ∃ pa,\n        (∀ᶠ (i : ι) in l, pa i) ∧\n          ∃ ε_1, ε_1 > 0 ∧ ∀ {i : ι}, pa i → ∀ {x : G}, dist x x₀ < ε_1 → dist (uncurry g (i, x)) z₀ < ε\nε : ℝ\nhε : ε > 0\n⊢ ∀ᶠ (x : ι) in l, dist (φ x ⋆[lsmul ℝ ℝ, k x] g x) z₀ < ε\n[PROOFSTEP]\nhave h2ε : 0 < ε / 3 := div_pos hε (by norm_num)\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : NormedAddCommGroup E'\ninst✝¹⁷ : NormedAddCommGroup E''\ninst✝¹⁶ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁵ : NontriviallyNormedField 𝕜\ninst✝¹⁴ : NormedSpace 𝕜 E\ninst✝¹³ : NormedSpace 𝕜 E'\ninst✝¹² : NormedSpace 𝕜 E''\ninst✝¹¹ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝¹⁰ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\ninst✝⁷ : SeminormedAddCommGroup G\ninst✝⁶ : BorelSpace G\ninst✝⁵ : SecondCountableTopology G\ninst✝⁴ : IsAddLeftInvariant μ\ninst✝³ : SigmaFinite μ\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedSpace ℝ E'\ninst✝ : CompleteSpace E'\nι : Type u_1\ng : ι → G → E'\nl : Filter ι\nx₀ : G\nz₀ : E'\nφ : ι → G → ℝ\nk : ι → G\nhnφ : ∀ᶠ (i : ι) in l, ∀ (x : G), 0 ≤ φ i x\nhiφ : ∀ᶠ (i : ι) in l, ∫ (x : G), φ i x ∂μ = 1\nhmg : ∀ᶠ (i : ι) in l, AEStronglyMeasurable (g i) μ\nhk : Tendsto k l (𝓝 x₀)\nhφ : ∀ (t : Set G), t ∈ 𝓝 0 → ∀ᶠ (x : ι) in l, support (φ x) ⊆ t\nhcg :\n  ∀ (ε : ℝ),\n    ε > 0 →\n      ∃ pa,\n        (∀ᶠ (i : ι) in l, pa i) ∧\n          ∃ ε_1, ε_1 > 0 ∧ ∀ {i : ι}, pa i → ∀ {x : G}, dist x x₀ < ε_1 → dist (uncurry g (i, x)) z₀ < ε\nε : ℝ\nhε : ε > 0\n⊢ 0 < 3\n[PROOFSTEP]\nnorm_num\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : NormedAddCommGroup E'\ninst✝¹⁷ : NormedAddCommGroup E''\ninst✝¹⁶ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁵ : NontriviallyNormedField 𝕜\ninst✝¹⁴ : NormedSpace 𝕜 E\ninst✝¹³ : NormedSpace 𝕜 E'\ninst✝¹² : NormedSpace 𝕜 E''\ninst✝¹¹ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝¹⁰ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\ninst✝⁷ : SeminormedAddCommGroup G\ninst✝⁶ : BorelSpace G\ninst✝⁵ : SecondCountableTopology G\ninst✝⁴ : IsAddLeftInvariant μ\ninst✝³ : SigmaFinite μ\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedSpace ℝ E'\ninst✝ : CompleteSpace E'\nι : Type u_1\ng : ι → G → E'\nl : Filter ι\nx₀ : G\nz₀ : E'\nφ : ι → G → ℝ\nk : ι → G\nhnφ : ∀ᶠ (i : ι) in l, ∀ (x : G), 0 ≤ φ i x\nhiφ : ∀ᶠ (i : ι) in l, ∫ (x : G), φ i x ∂μ = 1\nhmg : ∀ᶠ (i : ι) in l, AEStronglyMeasurable (g i) μ\nhk : Tendsto k l (𝓝 x₀)\nhφ : ∀ (t : Set G), t ∈ 𝓝 0 → ∀ᶠ (x : ι) in l, support (φ x) ⊆ t\nhcg :\n  ∀ (ε : ℝ),\n    ε > 0 →\n      ∃ pa,\n        (∀ᶠ (i : ι) in l, pa i) ∧\n          ∃ ε_1, ε_1 > 0 ∧ ∀ {i : ι}, pa i → ∀ {x : G}, dist x x₀ < ε_1 → dist (uncurry g (i, x)) z₀ < ε\nε : ℝ\nhε : ε > 0\nh2ε : 0 < ε / 3\n⊢ ∀ᶠ (x : ι) in l, dist (φ x ⋆[lsmul ℝ ℝ, k x] g x) z₀ < ε\n[PROOFSTEP]\nobtain ⟨p, hp, δ, hδ, hgδ⟩ := hcg _ h2ε\n[GOAL]\ncase intro.intro.intro.intro\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : NormedAddCommGroup E'\ninst✝¹⁷ : NormedAddCommGroup E''\ninst✝¹⁶ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁵ : NontriviallyNormedField 𝕜\ninst✝¹⁴ : NormedSpace 𝕜 E\ninst✝¹³ : NormedSpace 𝕜 E'\ninst✝¹² : NormedSpace 𝕜 E''\ninst✝¹¹ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝¹⁰ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\ninst✝⁷ : SeminormedAddCommGroup G\ninst✝⁶ : BorelSpace G\ninst✝⁵ : SecondCountableTopology G\ninst✝⁴ : IsAddLeftInvariant μ\ninst✝³ : SigmaFinite μ\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedSpace ℝ E'\ninst✝ : CompleteSpace E'\nι : Type u_1\ng : ι → G → E'\nl : Filter ι\nx₀ : G\nz₀ : E'\nφ : ι → G → ℝ\nk : ι → G\nhnφ : ∀ᶠ (i : ι) in l, ∀ (x : G), 0 ≤ φ i x\nhiφ : ∀ᶠ (i : ι) in l, ∫ (x : G), φ i x ∂μ = 1\nhmg : ∀ᶠ (i : ι) in l, AEStronglyMeasurable (g i) μ\nhk : Tendsto k l (𝓝 x₀)\nhφ : ∀ (t : Set G), t ∈ 𝓝 0 → ∀ᶠ (x : ι) in l, support (φ x) ⊆ t\nhcg :\n  ∀ (ε : ℝ),\n    ε > 0 →\n      ∃ pa,\n        (∀ᶠ (i : ι) in l, pa i) ∧\n          ∃ ε_1, ε_1 > 0 ∧ ∀ {i : ι}, pa i → ∀ {x : G}, dist x x₀ < ε_1 → dist (uncurry g (i, x)) z₀ < ε\nε : ℝ\nhε : ε > 0\nh2ε : 0 < ε / 3\np : ι → Prop\nhp : ∀ᶠ (i : ι) in l, p i\nδ : ℝ\nhδ : δ > 0\nhgδ : ∀ {i : ι}, p i → ∀ {x : G}, dist x x₀ < δ → dist (uncurry g (i, x)) z₀ < ε / 3\n⊢ ∀ᶠ (x : ι) in l, dist (φ x ⋆[lsmul ℝ ℝ, k x] g x) z₀ < ε\n[PROOFSTEP]\ndsimp only [uncurry] at hgδ \n[GOAL]\ncase intro.intro.intro.intro\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : NormedAddCommGroup E'\ninst✝¹⁷ : NormedAddCommGroup E''\ninst✝¹⁶ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁵ : NontriviallyNormedField 𝕜\ninst✝¹⁴ : NormedSpace 𝕜 E\ninst✝¹³ : NormedSpace 𝕜 E'\ninst✝¹² : NormedSpace 𝕜 E''\ninst✝¹¹ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝¹⁰ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\ninst✝⁷ : SeminormedAddCommGroup G\ninst✝⁶ : BorelSpace G\ninst✝⁵ : SecondCountableTopology G\ninst✝⁴ : IsAddLeftInvariant μ\ninst✝³ : SigmaFinite μ\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedSpace ℝ E'\ninst✝ : CompleteSpace E'\nι : Type u_1\ng : ι → G → E'\nl : Filter ι\nx₀ : G\nz₀ : E'\nφ : ι → G → ℝ\nk : ι → G\nhnφ : ∀ᶠ (i : ι) in l, ∀ (x : G), 0 ≤ φ i x\nhiφ : ∀ᶠ (i : ι) in l, ∫ (x : G), φ i x ∂μ = 1\nhmg : ∀ᶠ (i : ι) in l, AEStronglyMeasurable (g i) μ\nhk : Tendsto k l (𝓝 x₀)\nhφ : ∀ (t : Set G), t ∈ 𝓝 0 → ∀ᶠ (x : ι) in l, support (φ x) ⊆ t\nhcg :\n  ∀ (ε : ℝ),\n    ε > 0 →\n      ∃ pa,\n        (∀ᶠ (i : ι) in l, pa i) ∧\n          ∃ ε_1, ε_1 > 0 ∧ ∀ {i : ι}, pa i → ∀ {x : G}, dist x x₀ < ε_1 → dist (uncurry g (i, x)) z₀ < ε\nε : ℝ\nhε : ε > 0\nh2ε : 0 < ε / 3\np : ι → Prop\nhp : ∀ᶠ (i : ι) in l, p i\nδ : ℝ\nhδ : δ > 0\nhgδ : ∀ {i : ι}, p i → ∀ {x : G}, dist x x₀ < δ → dist (g i x) z₀ < ε / 3\n⊢ ∀ᶠ (x : ι) in l, dist (φ x ⋆[lsmul ℝ ℝ, k x] g x) z₀ < ε\n[PROOFSTEP]\nhave h2k := hk.eventually (ball_mem_nhds x₀ <| half_pos hδ)\n[GOAL]\ncase intro.intro.intro.intro\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : NormedAddCommGroup E'\ninst✝¹⁷ : NormedAddCommGroup E''\ninst✝¹⁶ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁵ : NontriviallyNormedField 𝕜\ninst✝¹⁴ : NormedSpace 𝕜 E\ninst✝¹³ : NormedSpace 𝕜 E'\ninst✝¹² : NormedSpace 𝕜 E''\ninst✝¹¹ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝¹⁰ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\ninst✝⁷ : SeminormedAddCommGroup G\ninst✝⁶ : BorelSpace G\ninst✝⁵ : SecondCountableTopology G\ninst✝⁴ : IsAddLeftInvariant μ\ninst✝³ : SigmaFinite μ\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedSpace ℝ E'\ninst✝ : CompleteSpace E'\nι : Type u_1\ng : ι → G → E'\nl : Filter ι\nx₀ : G\nz₀ : E'\nφ : ι → G → ℝ\nk : ι → G\nhnφ : ∀ᶠ (i : ι) in l, ∀ (x : G), 0 ≤ φ i x\nhiφ : ∀ᶠ (i : ι) in l, ∫ (x : G), φ i x ∂μ = 1\nhmg : ∀ᶠ (i : ι) in l, AEStronglyMeasurable (g i) μ\nhk : Tendsto k l (𝓝 x₀)\nhφ : ∀ (t : Set G), t ∈ 𝓝 0 → ∀ᶠ (x : ι) in l, support (φ x) ⊆ t\nhcg :\n  ∀ (ε : ℝ),\n    ε > 0 →\n      ∃ pa,\n        (∀ᶠ (i : ι) in l, pa i) ∧\n          ∃ ε_1, ε_1 > 0 ∧ ∀ {i : ι}, pa i → ∀ {x : G}, dist x x₀ < ε_1 → dist (uncurry g (i, x)) z₀ < ε\nε : ℝ\nhε : ε > 0\nh2ε : 0 < ε / 3\np : ι → Prop\nhp : ∀ᶠ (i : ι) in l, p i\nδ : ℝ\nhδ : δ > 0\nhgδ : ∀ {i : ι}, p i → ∀ {x : G}, dist x x₀ < δ → dist (g i x) z₀ < ε / 3\nh2k : ∀ᶠ (x : ι) in l, dist (k x) x₀ < δ / 2\n⊢ ∀ᶠ (x : ι) in l, dist (φ x ⋆[lsmul ℝ ℝ, k x] g x) z₀ < ε\n[PROOFSTEP]\nhave h2φ := hφ (ball (0 : G) _) <| ball_mem_nhds _ (half_pos hδ)\n[GOAL]\ncase intro.intro.intro.intro\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : NormedAddCommGroup E'\ninst✝¹⁷ : NormedAddCommGroup E''\ninst✝¹⁶ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁵ : NontriviallyNormedField 𝕜\ninst✝¹⁴ : NormedSpace 𝕜 E\ninst✝¹³ : NormedSpace 𝕜 E'\ninst✝¹² : NormedSpace 𝕜 E''\ninst✝¹¹ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝¹⁰ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\ninst✝⁷ : SeminormedAddCommGroup G\ninst✝⁶ : BorelSpace G\ninst✝⁵ : SecondCountableTopology G\ninst✝⁴ : IsAddLeftInvariant μ\ninst✝³ : SigmaFinite μ\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedSpace ℝ E'\ninst✝ : CompleteSpace E'\nι : Type u_1\ng : ι → G → E'\nl : Filter ι\nx₀ : G\nz₀ : E'\nφ : ι → G → ℝ\nk : ι → G\nhnφ : ∀ᶠ (i : ι) in l, ∀ (x : G), 0 ≤ φ i x\nhiφ : ∀ᶠ (i : ι) in l, ∫ (x : G), φ i x ∂μ = 1\nhmg : ∀ᶠ (i : ι) in l, AEStronglyMeasurable (g i) μ\nhk : Tendsto k l (𝓝 x₀)\nhφ : ∀ (t : Set G), t ∈ 𝓝 0 → ∀ᶠ (x : ι) in l, support (φ x) ⊆ t\nhcg :\n  ∀ (ε : ℝ),\n    ε > 0 →\n      ∃ pa,\n        (∀ᶠ (i : ι) in l, pa i) ∧\n          ∃ ε_1, ε_1 > 0 ∧ ∀ {i : ι}, pa i → ∀ {x : G}, dist x x₀ < ε_1 → dist (uncurry g (i, x)) z₀ < ε\nε : ℝ\nhε : ε > 0\nh2ε : 0 < ε / 3\np : ι → Prop\nhp : ∀ᶠ (i : ι) in l, p i\nδ : ℝ\nhδ : δ > 0\nhgδ : ∀ {i : ι}, p i → ∀ {x : G}, dist x x₀ < δ → dist (g i x) z₀ < ε / 3\nh2k : ∀ᶠ (x : ι) in l, dist (k x) x₀ < δ / 2\nh2φ : ∀ᶠ (x : ι) in l, support (φ x) ⊆ ball 0 (δ / 2)\n⊢ ∀ᶠ (x : ι) in l, dist (φ x ⋆[lsmul ℝ ℝ, k x] g x) z₀ < ε\n[PROOFSTEP]\nfilter_upwards [hp, h2k, h2φ, hnφ, hiφ, hmg] with i hpi hki hφi hnφi hiφi hmgi\n[GOAL]\ncase h\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : NormedAddCommGroup E'\ninst✝¹⁷ : NormedAddCommGroup E''\ninst✝¹⁶ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁵ : NontriviallyNormedField 𝕜\ninst✝¹⁴ : NormedSpace 𝕜 E\ninst✝¹³ : NormedSpace 𝕜 E'\ninst✝¹² : NormedSpace 𝕜 E''\ninst✝¹¹ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝¹⁰ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\ninst✝⁷ : SeminormedAddCommGroup G\ninst✝⁶ : BorelSpace G\ninst✝⁵ : SecondCountableTopology G\ninst✝⁴ : IsAddLeftInvariant μ\ninst✝³ : SigmaFinite μ\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedSpace ℝ E'\ninst✝ : CompleteSpace E'\nι : Type u_1\ng : ι → G → E'\nl : Filter ι\nx₀ : G\nz₀ : E'\nφ : ι → G → ℝ\nk : ι → G\nhnφ : ∀ᶠ (i : ι) in l, ∀ (x : G), 0 ≤ φ i x\nhiφ : ∀ᶠ (i : ι) in l, ∫ (x : G), φ i x ∂μ = 1\nhmg : ∀ᶠ (i : ι) in l, AEStronglyMeasurable (g i) μ\nhk : Tendsto k l (𝓝 x₀)\nhφ : ∀ (t : Set G), t ∈ 𝓝 0 → ∀ᶠ (x : ι) in l, support (φ x) ⊆ t\nhcg :\n  ∀ (ε : ℝ),\n    ε > 0 →\n      ∃ pa,\n        (∀ᶠ (i : ι) in l, pa i) ∧\n          ∃ ε_1, ε_1 > 0 ∧ ∀ {i : ι}, pa i → ∀ {x : G}, dist x x₀ < ε_1 → dist (uncurry g (i, x)) z₀ < ε\nε : ℝ\nhε : ε > 0\nh2ε : 0 < ε / 3\np : ι → Prop\nhp : ∀ᶠ (i : ι) in l, p i\nδ : ℝ\nhδ : δ > 0\nhgδ : ∀ {i : ι}, p i → ∀ {x : G}, dist x x₀ < δ → dist (g i x) z₀ < ε / 3\nh2k : ∀ᶠ (x : ι) in l, dist (k x) x₀ < δ / 2\nh2φ : ∀ᶠ (x : ι) in l, support (φ x) ⊆ ball 0 (δ / 2)\ni : ι\nhpi : p i\nhki : dist (k i) x₀ < δ / 2\nhφi : support (φ i) ⊆ ball 0 (δ / 2)\nhnφi : ∀ (x : G), 0 ≤ φ i x\nhiφi : ∫ (x : G), φ i x ∂μ = 1\nhmgi : AEStronglyMeasurable (g i) μ\n⊢ dist (φ i ⋆[lsmul ℝ ℝ, k i] g i) z₀ < ε\n[PROOFSTEP]\nhave hgi : dist (g i (k i)) z₀ < ε / 3 := hgδ hpi (hki.trans <| half_lt_self hδ)\n[GOAL]\ncase h\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : NormedAddCommGroup E'\ninst✝¹⁷ : NormedAddCommGroup E''\ninst✝¹⁶ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁵ : NontriviallyNormedField 𝕜\ninst✝¹⁴ : NormedSpace 𝕜 E\ninst✝¹³ : NormedSpace 𝕜 E'\ninst✝¹² : NormedSpace 𝕜 E''\ninst✝¹¹ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝¹⁰ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\ninst✝⁷ : SeminormedAddCommGroup G\ninst✝⁶ : BorelSpace G\ninst✝⁵ : SecondCountableTopology G\ninst✝⁴ : IsAddLeftInvariant μ\ninst✝³ : SigmaFinite μ\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedSpace ℝ E'\ninst✝ : CompleteSpace E'\nι : Type u_1\ng : ι → G → E'\nl : Filter ι\nx₀ : G\nz₀ : E'\nφ : ι → G → ℝ\nk : ι → G\nhnφ : ∀ᶠ (i : ι) in l, ∀ (x : G), 0 ≤ φ i x\nhiφ : ∀ᶠ (i : ι) in l, ∫ (x : G), φ i x ∂μ = 1\nhmg : ∀ᶠ (i : ι) in l, AEStronglyMeasurable (g i) μ\nhk : Tendsto k l (𝓝 x₀)\nhφ : ∀ (t : Set G), t ∈ 𝓝 0 → ∀ᶠ (x : ι) in l, support (φ x) ⊆ t\nhcg :\n  ∀ (ε : ℝ),\n    ε > 0 →\n      ∃ pa,\n        (∀ᶠ (i : ι) in l, pa i) ∧\n          ∃ ε_1, ε_1 > 0 ∧ ∀ {i : ι}, pa i → ∀ {x : G}, dist x x₀ < ε_1 → dist (uncurry g (i, x)) z₀ < ε\nε : ℝ\nhε : ε > 0\nh2ε : 0 < ε / 3\np : ι → Prop\nhp : ∀ᶠ (i : ι) in l, p i\nδ : ℝ\nhδ : δ > 0\nhgδ : ∀ {i : ι}, p i → ∀ {x : G}, dist x x₀ < δ → dist (g i x) z₀ < ε / 3\nh2k : ∀ᶠ (x : ι) in l, dist (k x) x₀ < δ / 2\nh2φ : ∀ᶠ (x : ι) in l, support (φ x) ⊆ ball 0 (δ / 2)\ni : ι\nhpi : p i\nhki : dist (k i) x₀ < δ / 2\nhφi : support (φ i) ⊆ ball 0 (δ / 2)\nhnφi : ∀ (x : G), 0 ≤ φ i x\nhiφi : ∫ (x : G), φ i x ∂μ = 1\nhmgi : AEStronglyMeasurable (g i) μ\nhgi : dist (g i (k i)) z₀ < ε / 3\n⊢ dist (φ i ⋆[lsmul ℝ ℝ, k i] g i) z₀ < ε\n[PROOFSTEP]\nhave h1 : ∀ x' ∈ ball (k i) (δ / 2), dist (g i x') (g i (k i)) ≤ ε / 3 + ε / 3 :=\n  by\n  intro x' hx'\n  refine' (dist_triangle_right _ _ _).trans (add_le_add (hgδ hpi _).le hgi.le)\n  exact ((dist_triangle _ _ _).trans_lt (add_lt_add hx'.out hki)).trans_eq (add_halves δ)\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : NormedAddCommGroup E'\ninst✝¹⁷ : NormedAddCommGroup E''\ninst✝¹⁶ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁵ : NontriviallyNormedField 𝕜\ninst✝¹⁴ : NormedSpace 𝕜 E\ninst✝¹³ : NormedSpace 𝕜 E'\ninst✝¹² : NormedSpace 𝕜 E''\ninst✝¹¹ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝¹⁰ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\ninst✝⁷ : SeminormedAddCommGroup G\ninst✝⁶ : BorelSpace G\ninst✝⁵ : SecondCountableTopology G\ninst✝⁴ : IsAddLeftInvariant μ\ninst✝³ : SigmaFinite μ\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedSpace ℝ E'\ninst✝ : CompleteSpace E'\nι : Type u_1\ng : ι → G → E'\nl : Filter ι\nx₀ : G\nz₀ : E'\nφ : ι → G → ℝ\nk : ι → G\nhnφ : ∀ᶠ (i : ι) in l, ∀ (x : G), 0 ≤ φ i x\nhiφ : ∀ᶠ (i : ι) in l, ∫ (x : G), φ i x ∂μ = 1\nhmg : ∀ᶠ (i : ι) in l, AEStronglyMeasurable (g i) μ\nhk : Tendsto k l (𝓝 x₀)\nhφ : ∀ (t : Set G), t ∈ 𝓝 0 → ∀ᶠ (x : ι) in l, support (φ x) ⊆ t\nhcg :\n  ∀ (ε : ℝ),\n    ε > 0 →\n      ∃ pa,\n        (∀ᶠ (i : ι) in l, pa i) ∧\n          ∃ ε_1, ε_1 > 0 ∧ ∀ {i : ι}, pa i → ∀ {x : G}, dist x x₀ < ε_1 → dist (uncurry g (i, x)) z₀ < ε\nε : ℝ\nhε : ε > 0\nh2ε : 0 < ε / 3\np : ι → Prop\nhp : ∀ᶠ (i : ι) in l, p i\nδ : ℝ\nhδ : δ > 0\nhgδ : ∀ {i : ι}, p i → ∀ {x : G}, dist x x₀ < δ → dist (g i x) z₀ < ε / 3\nh2k : ∀ᶠ (x : ι) in l, dist (k x) x₀ < δ / 2\nh2φ : ∀ᶠ (x : ι) in l, support (φ x) ⊆ ball 0 (δ / 2)\ni : ι\nhpi : p i\nhki : dist (k i) x₀ < δ / 2\nhφi : support (φ i) ⊆ ball 0 (δ / 2)\nhnφi : ∀ (x : G), 0 ≤ φ i x\nhiφi : ∫ (x : G), φ i x ∂μ = 1\nhmgi : AEStronglyMeasurable (g i) μ\nhgi : dist (g i (k i)) z₀ < ε / 3\n⊢ ∀ (x' : G), x' ∈ ball (k i) (δ / 2) → dist (g i x') (g i (k i)) ≤ ε / 3 + ε / 3\n[PROOFSTEP]\nintro x' hx'\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : NormedAddCommGroup E'\ninst✝¹⁷ : NormedAddCommGroup E''\ninst✝¹⁶ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx x'✝ : G\ny y' : E\ninst✝¹⁵ : NontriviallyNormedField 𝕜\ninst✝¹⁴ : NormedSpace 𝕜 E\ninst✝¹³ : NormedSpace 𝕜 E'\ninst✝¹² : NormedSpace 𝕜 E''\ninst✝¹¹ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝¹⁰ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\ninst✝⁷ : SeminormedAddCommGroup G\ninst✝⁶ : BorelSpace G\ninst✝⁵ : SecondCountableTopology G\ninst✝⁴ : IsAddLeftInvariant μ\ninst✝³ : SigmaFinite μ\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedSpace ℝ E'\ninst✝ : CompleteSpace E'\nι : Type u_1\ng : ι → G → E'\nl : Filter ι\nx₀ : G\nz₀ : E'\nφ : ι → G → ℝ\nk : ι → G\nhnφ : ∀ᶠ (i : ι) in l, ∀ (x : G), 0 ≤ φ i x\nhiφ : ∀ᶠ (i : ι) in l, ∫ (x : G), φ i x ∂μ = 1\nhmg : ∀ᶠ (i : ι) in l, AEStronglyMeasurable (g i) μ\nhk : Tendsto k l (𝓝 x₀)\nhφ : ∀ (t : Set G), t ∈ 𝓝 0 → ∀ᶠ (x : ι) in l, support (φ x) ⊆ t\nhcg :\n  ∀ (ε : ℝ),\n    ε > 0 →\n      ∃ pa,\n        (∀ᶠ (i : ι) in l, pa i) ∧\n          ∃ ε_1, ε_1 > 0 ∧ ∀ {i : ι}, pa i → ∀ {x : G}, dist x x₀ < ε_1 → dist (uncurry g (i, x)) z₀ < ε\nε : ℝ\nhε : ε > 0\nh2ε : 0 < ε / 3\np : ι → Prop\nhp : ∀ᶠ (i : ι) in l, p i\nδ : ℝ\nhδ : δ > 0\nhgδ : ∀ {i : ι}, p i → ∀ {x : G}, dist x x₀ < δ → dist (g i x) z₀ < ε / 3\nh2k : ∀ᶠ (x : ι) in l, dist (k x) x₀ < δ / 2\nh2φ : ∀ᶠ (x : ι) in l, support (φ x) ⊆ ball 0 (δ / 2)\ni : ι\nhpi : p i\nhki : dist (k i) x₀ < δ / 2\nhφi : support (φ i) ⊆ ball 0 (δ / 2)\nhnφi : ∀ (x : G), 0 ≤ φ i x\nhiφi : ∫ (x : G), φ i x ∂μ = 1\nhmgi : AEStronglyMeasurable (g i) μ\nhgi : dist (g i (k i)) z₀ < ε / 3\nx' : G\nhx' : x' ∈ ball (k i) (δ / 2)\n⊢ dist (g i x') (g i (k i)) ≤ ε / 3 + ε / 3\n[PROOFSTEP]\nrefine' (dist_triangle_right _ _ _).trans (add_le_add (hgδ hpi _).le hgi.le)\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : NormedAddCommGroup E'\ninst✝¹⁷ : NormedAddCommGroup E''\ninst✝¹⁶ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx x'✝ : G\ny y' : E\ninst✝¹⁵ : NontriviallyNormedField 𝕜\ninst✝¹⁴ : NormedSpace 𝕜 E\ninst✝¹³ : NormedSpace 𝕜 E'\ninst✝¹² : NormedSpace 𝕜 E''\ninst✝¹¹ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝¹⁰ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\ninst✝⁷ : SeminormedAddCommGroup G\ninst✝⁶ : BorelSpace G\ninst✝⁵ : SecondCountableTopology G\ninst✝⁴ : IsAddLeftInvariant μ\ninst✝³ : SigmaFinite μ\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedSpace ℝ E'\ninst✝ : CompleteSpace E'\nι : Type u_1\ng : ι → G → E'\nl : Filter ι\nx₀ : G\nz₀ : E'\nφ : ι → G → ℝ\nk : ι → G\nhnφ : ∀ᶠ (i : ι) in l, ∀ (x : G), 0 ≤ φ i x\nhiφ : ∀ᶠ (i : ι) in l, ∫ (x : G), φ i x ∂μ = 1\nhmg : ∀ᶠ (i : ι) in l, AEStronglyMeasurable (g i) μ\nhk : Tendsto k l (𝓝 x₀)\nhφ : ∀ (t : Set G), t ∈ 𝓝 0 → ∀ᶠ (x : ι) in l, support (φ x) ⊆ t\nhcg :\n  ∀ (ε : ℝ),\n    ε > 0 →\n      ∃ pa,\n        (∀ᶠ (i : ι) in l, pa i) ∧\n          ∃ ε_1, ε_1 > 0 ∧ ∀ {i : ι}, pa i → ∀ {x : G}, dist x x₀ < ε_1 → dist (uncurry g (i, x)) z₀ < ε\nε : ℝ\nhε : ε > 0\nh2ε : 0 < ε / 3\np : ι → Prop\nhp : ∀ᶠ (i : ι) in l, p i\nδ : ℝ\nhδ : δ > 0\nhgδ : ∀ {i : ι}, p i → ∀ {x : G}, dist x x₀ < δ → dist (g i x) z₀ < ε / 3\nh2k : ∀ᶠ (x : ι) in l, dist (k x) x₀ < δ / 2\nh2φ : ∀ᶠ (x : ι) in l, support (φ x) ⊆ ball 0 (δ / 2)\ni : ι\nhpi : p i\nhki : dist (k i) x₀ < δ / 2\nhφi : support (φ i) ⊆ ball 0 (δ / 2)\nhnφi : ∀ (x : G), 0 ≤ φ i x\nhiφi : ∫ (x : G), φ i x ∂μ = 1\nhmgi : AEStronglyMeasurable (g i) μ\nhgi : dist (g i (k i)) z₀ < ε / 3\nx' : G\nhx' : x' ∈ ball (k i) (δ / 2)\n⊢ dist x' x₀ < δ\n[PROOFSTEP]\nexact ((dist_triangle _ _ _).trans_lt (add_lt_add hx'.out hki)).trans_eq (add_halves δ)\n[GOAL]\ncase h\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : NormedAddCommGroup E'\ninst✝¹⁷ : NormedAddCommGroup E''\ninst✝¹⁶ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁵ : NontriviallyNormedField 𝕜\ninst✝¹⁴ : NormedSpace 𝕜 E\ninst✝¹³ : NormedSpace 𝕜 E'\ninst✝¹² : NormedSpace 𝕜 E''\ninst✝¹¹ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝¹⁰ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\ninst✝⁷ : SeminormedAddCommGroup G\ninst✝⁶ : BorelSpace G\ninst✝⁵ : SecondCountableTopology G\ninst✝⁴ : IsAddLeftInvariant μ\ninst✝³ : SigmaFinite μ\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedSpace ℝ E'\ninst✝ : CompleteSpace E'\nι : Type u_1\ng : ι → G → E'\nl : Filter ι\nx₀ : G\nz₀ : E'\nφ : ι → G → ℝ\nk : ι → G\nhnφ : ∀ᶠ (i : ι) in l, ∀ (x : G), 0 ≤ φ i x\nhiφ : ∀ᶠ (i : ι) in l, ∫ (x : G), φ i x ∂μ = 1\nhmg : ∀ᶠ (i : ι) in l, AEStronglyMeasurable (g i) μ\nhk : Tendsto k l (𝓝 x₀)\nhφ : ∀ (t : Set G), t ∈ 𝓝 0 → ∀ᶠ (x : ι) in l, support (φ x) ⊆ t\nhcg :\n  ∀ (ε : ℝ),\n    ε > 0 →\n      ∃ pa,\n        (∀ᶠ (i : ι) in l, pa i) ∧\n          ∃ ε_1, ε_1 > 0 ∧ ∀ {i : ι}, pa i → ∀ {x : G}, dist x x₀ < ε_1 → dist (uncurry g (i, x)) z₀ < ε\nε : ℝ\nhε : ε > 0\nh2ε : 0 < ε / 3\np : ι → Prop\nhp : ∀ᶠ (i : ι) in l, p i\nδ : ℝ\nhδ : δ > 0\nhgδ : ∀ {i : ι}, p i → ∀ {x : G}, dist x x₀ < δ → dist (g i x) z₀ < ε / 3\nh2k : ∀ᶠ (x : ι) in l, dist (k x) x₀ < δ / 2\nh2φ : ∀ᶠ (x : ι) in l, support (φ x) ⊆ ball 0 (δ / 2)\ni : ι\nhpi : p i\nhki : dist (k i) x₀ < δ / 2\nhφi : support (φ i) ⊆ ball 0 (δ / 2)\nhnφi : ∀ (x : G), 0 ≤ φ i x\nhiφi : ∫ (x : G), φ i x ∂μ = 1\nhmgi : AEStronglyMeasurable (g i) μ\nhgi : dist (g i (k i)) z₀ < ε / 3\nh1 : ∀ (x' : G), x' ∈ ball (k i) (δ / 2) → dist (g i x') (g i (k i)) ≤ ε / 3 + ε / 3\n⊢ dist (φ i ⋆[lsmul ℝ ℝ, k i] g i) z₀ < ε\n[PROOFSTEP]\nhave := dist_convolution_le (add_pos h2ε h2ε).le hφi hnφi hiφi hmgi h1\n[GOAL]\ncase h\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : NormedAddCommGroup E'\ninst✝¹⁷ : NormedAddCommGroup E''\ninst✝¹⁶ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁵ : NontriviallyNormedField 𝕜\ninst✝¹⁴ : NormedSpace 𝕜 E\ninst✝¹³ : NormedSpace 𝕜 E'\ninst✝¹² : NormedSpace 𝕜 E''\ninst✝¹¹ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝¹⁰ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\ninst✝⁷ : SeminormedAddCommGroup G\ninst✝⁶ : BorelSpace G\ninst✝⁵ : SecondCountableTopology G\ninst✝⁴ : IsAddLeftInvariant μ\ninst✝³ : SigmaFinite μ\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedSpace ℝ E'\ninst✝ : CompleteSpace E'\nι : Type u_1\ng : ι → G → E'\nl : Filter ι\nx₀ : G\nz₀ : E'\nφ : ι → G → ℝ\nk : ι → G\nhnφ : ∀ᶠ (i : ι) in l, ∀ (x : G), 0 ≤ φ i x\nhiφ : ∀ᶠ (i : ι) in l, ∫ (x : G), φ i x ∂μ = 1\nhmg : ∀ᶠ (i : ι) in l, AEStronglyMeasurable (g i) μ\nhk : Tendsto k l (𝓝 x₀)\nhφ : ∀ (t : Set G), t ∈ 𝓝 0 → ∀ᶠ (x : ι) in l, support (φ x) ⊆ t\nhcg :\n  ∀ (ε : ℝ),\n    ε > 0 →\n      ∃ pa,\n        (∀ᶠ (i : ι) in l, pa i) ∧\n          ∃ ε_1, ε_1 > 0 ∧ ∀ {i : ι}, pa i → ∀ {x : G}, dist x x₀ < ε_1 → dist (uncurry g (i, x)) z₀ < ε\nε : ℝ\nhε : ε > 0\nh2ε : 0 < ε / 3\np : ι → Prop\nhp : ∀ᶠ (i : ι) in l, p i\nδ : ℝ\nhδ : δ > 0\nhgδ : ∀ {i : ι}, p i → ∀ {x : G}, dist x x₀ < δ → dist (g i x) z₀ < ε / 3\nh2k : ∀ᶠ (x : ι) in l, dist (k x) x₀ < δ / 2\nh2φ : ∀ᶠ (x : ι) in l, support (φ x) ⊆ ball 0 (δ / 2)\ni : ι\nhpi : p i\nhki : dist (k i) x₀ < δ / 2\nhφi : support (φ i) ⊆ ball 0 (δ / 2)\nhnφi : ∀ (x : G), 0 ≤ φ i x\nhiφi : ∫ (x : G), φ i x ∂μ = 1\nhmgi : AEStronglyMeasurable (g i) μ\nhgi : dist (g i (k i)) z₀ < ε / 3\nh1 : ∀ (x' : G), x' ∈ ball (k i) (δ / 2) → dist (g i x') (g i (k i)) ≤ ε / 3 + ε / 3\nthis : dist (φ i ⋆[lsmul ℝ ℝ, k i] g i) (g i (k i)) ≤ ε / 3 + ε / 3\n⊢ dist (φ i ⋆[lsmul ℝ ℝ, k i] g i) z₀ < ε\n[PROOFSTEP]\nrefine' ((dist_triangle _ _ _).trans_lt (add_lt_add_of_le_of_lt this hgi)).trans_eq _\n[GOAL]\ncase h\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : NormedAddCommGroup E'\ninst✝¹⁷ : NormedAddCommGroup E''\ninst✝¹⁶ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁵ : NontriviallyNormedField 𝕜\ninst✝¹⁴ : NormedSpace 𝕜 E\ninst✝¹³ : NormedSpace 𝕜 E'\ninst✝¹² : NormedSpace 𝕜 E''\ninst✝¹¹ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝¹⁰ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\ninst✝⁷ : SeminormedAddCommGroup G\ninst✝⁶ : BorelSpace G\ninst✝⁵ : SecondCountableTopology G\ninst✝⁴ : IsAddLeftInvariant μ\ninst✝³ : SigmaFinite μ\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedSpace ℝ E'\ninst✝ : CompleteSpace E'\nι : Type u_1\ng : ι → G → E'\nl : Filter ι\nx₀ : G\nz₀ : E'\nφ : ι → G → ℝ\nk : ι → G\nhnφ : ∀ᶠ (i : ι) in l, ∀ (x : G), 0 ≤ φ i x\nhiφ : ∀ᶠ (i : ι) in l, ∫ (x : G), φ i x ∂μ = 1\nhmg : ∀ᶠ (i : ι) in l, AEStronglyMeasurable (g i) μ\nhk : Tendsto k l (𝓝 x₀)\nhφ : ∀ (t : Set G), t ∈ 𝓝 0 → ∀ᶠ (x : ι) in l, support (φ x) ⊆ t\nhcg :\n  ∀ (ε : ℝ),\n    ε > 0 →\n      ∃ pa,\n        (∀ᶠ (i : ι) in l, pa i) ∧\n          ∃ ε_1, ε_1 > 0 ∧ ∀ {i : ι}, pa i → ∀ {x : G}, dist x x₀ < ε_1 → dist (uncurry g (i, x)) z₀ < ε\nε : ℝ\nhε : ε > 0\nh2ε : 0 < ε / 3\np : ι → Prop\nhp : ∀ᶠ (i : ι) in l, p i\nδ : ℝ\nhδ : δ > 0\nhgδ : ∀ {i : ι}, p i → ∀ {x : G}, dist x x₀ < δ → dist (g i x) z₀ < ε / 3\nh2k : ∀ᶠ (x : ι) in l, dist (k x) x₀ < δ / 2\nh2φ : ∀ᶠ (x : ι) in l, support (φ x) ⊆ ball 0 (δ / 2)\ni : ι\nhpi : p i\nhki : dist (k i) x₀ < δ / 2\nhφi : support (φ i) ⊆ ball 0 (δ / 2)\nhnφi : ∀ (x : G), 0 ≤ φ i x\nhiφi : ∫ (x : G), φ i x ∂μ = 1\nhmgi : AEStronglyMeasurable (g i) μ\nhgi : dist (g i (k i)) z₀ < ε / 3\nh1 : ∀ (x' : G), x' ∈ ball (k i) (δ / 2) → dist (g i x') (g i (k i)) ≤ ε / 3 + ε / 3\nthis : dist (φ i ⋆[lsmul ℝ ℝ, k i] g i) (g i (k i)) ≤ ε / 3 + ε / 3\n⊢ ε / 3 + ε / 3 + ε / 3 = ε\n[PROOFSTEP]\nfield_simp\n[GOAL]\ncase h\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : NormedAddCommGroup E'\ninst✝¹⁷ : NormedAddCommGroup E''\ninst✝¹⁶ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁵ : NontriviallyNormedField 𝕜\ninst✝¹⁴ : NormedSpace 𝕜 E\ninst✝¹³ : NormedSpace 𝕜 E'\ninst✝¹² : NormedSpace 𝕜 E''\ninst✝¹¹ : NormedSpace 𝕜 F\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝¹⁰ : MeasurableSpace G\nμ ν : Measure G\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\ninst✝⁷ : SeminormedAddCommGroup G\ninst✝⁶ : BorelSpace G\ninst✝⁵ : SecondCountableTopology G\ninst✝⁴ : IsAddLeftInvariant μ\ninst✝³ : SigmaFinite μ\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedSpace ℝ E'\ninst✝ : CompleteSpace E'\nι : Type u_1\ng : ι → G → E'\nl : Filter ι\nx₀ : G\nz₀ : E'\nφ : ι → G → ℝ\nk : ι → G\nhnφ : ∀ᶠ (i : ι) in l, ∀ (x : G), 0 ≤ φ i x\nhiφ : ∀ᶠ (i : ι) in l, ∫ (x : G), φ i x ∂μ = 1\nhmg : ∀ᶠ (i : ι) in l, AEStronglyMeasurable (g i) μ\nhk : Tendsto k l (𝓝 x₀)\nhφ : ∀ (t : Set G), t ∈ 𝓝 0 → ∀ᶠ (x : ι) in l, support (φ x) ⊆ t\nhcg :\n  ∀ (ε : ℝ),\n    ε > 0 →\n      ∃ pa,\n        (∀ᶠ (i : ι) in l, pa i) ∧\n          ∃ ε_1, ε_1 > 0 ∧ ∀ {i : ι}, pa i → ∀ {x : G}, dist x x₀ < ε_1 → dist (uncurry g (i, x)) z₀ < ε\nε : ℝ\nhε : ε > 0\nh2ε : 0 < ε / 3\np : ι → Prop\nhp : ∀ᶠ (i : ι) in l, p i\nδ : ℝ\nhδ : δ > 0\nhgδ : ∀ {i : ι}, p i → ∀ {x : G}, dist x x₀ < δ → dist (g i x) z₀ < ε / 3\nh2k : ∀ᶠ (x : ι) in l, dist (k x) x₀ < δ / 2\nh2φ : ∀ᶠ (x : ι) in l, support (φ x) ⊆ ball 0 (δ / 2)\ni : ι\nhpi : p i\nhki : dist (k i) x₀ < δ / 2\nhφi : support (φ i) ⊆ ball 0 (δ / 2)\nhnφi : ∀ (x : G), 0 ≤ φ i x\nhiφi : ∫ (x : G), φ i x ∂μ = 1\nhmgi : AEStronglyMeasurable (g i) μ\nhgi : dist (g i (k i)) z₀ < ε / 3\nh1 : ∀ (x' : G), x' ∈ ball (k i) (δ / 2) → dist (g i x') (g i (k i)) ≤ ε / 3 + ε / 3\nthis : dist (φ i ⋆[lsmul ℝ ℝ, k i] g i) (g i (k i)) ≤ ε / 3 + ε / 3\n⊢ ε + ε + ε = ε * 3\n[PROOFSTEP]\nring_nf\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝²⁹ : NormedAddCommGroup E\ninst✝²⁸ : NormedAddCommGroup E'\ninst✝²⁷ : NormedAddCommGroup E''\ninst✝²⁶ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝²⁵ : IsROrC 𝕜\ninst✝²⁴ : NormedSpace 𝕜 E\ninst✝²³ : NormedSpace 𝕜 E'\ninst✝²² : NormedSpace 𝕜 E''\ninst✝²¹ : NormedSpace ℝ F\ninst✝²⁰ : NormedSpace 𝕜 F\nn : ℕ∞\ninst✝¹⁹ : CompleteSpace F\ninst✝¹⁸ : MeasurableSpace G\nμ ν : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝¹⁷ : NormedAddCommGroup F'\ninst✝¹⁶ : NormedSpace ℝ F'\ninst✝¹⁵ : NormedSpace 𝕜 F'\ninst✝¹⁴ : CompleteSpace F'\ninst✝¹³ : NormedAddCommGroup F''\ninst✝¹² : NormedSpace ℝ F''\ninst✝¹¹ : NormedSpace 𝕜 F''\ninst✝¹⁰ : CompleteSpace F''\nk : G → E''\nL₂ : F →L[𝕜] E'' →L[𝕜] F'\nL₃ : E →L[𝕜] F'' →L[𝕜] F'\nL₄ : E' →L[𝕜] E'' →L[𝕜] F''\ninst✝⁹ : AddGroup G\ninst✝⁸ : SigmaFinite μ\ninst✝⁷ : SigmaFinite ν\ninst✝⁶ : IsAddRightInvariant μ\ninst✝⁵ : MeasurableAdd₂ G\ninst✝⁴ : MeasurableNeg G\ninst✝³ : NormedSpace ℝ E\ninst✝² : NormedSpace ℝ E'\ninst✝¹ : CompleteSpace E\ninst✝ : CompleteSpace E'\nhf : Integrable f\nhg : Integrable g\n⊢ ∫ (x : G), f ⋆[L, x] g ∂μ = ↑(↑L (∫ (x : G), f x ∂ν)) (∫ (x : G), g x ∂μ)\n[PROOFSTEP]\nrefine' (integral_integral_swap (by apply hf.convolution_integrand L hg)).trans _\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝²⁹ : NormedAddCommGroup E\ninst✝²⁸ : NormedAddCommGroup E'\ninst✝²⁷ : NormedAddCommGroup E''\ninst✝²⁶ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝²⁵ : IsROrC 𝕜\ninst✝²⁴ : NormedSpace 𝕜 E\ninst✝²³ : NormedSpace 𝕜 E'\ninst✝²² : NormedSpace 𝕜 E''\ninst✝²¹ : NormedSpace ℝ F\ninst✝²⁰ : NormedSpace 𝕜 F\nn : ℕ∞\ninst✝¹⁹ : CompleteSpace F\ninst✝¹⁸ : MeasurableSpace G\nμ ν : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝¹⁷ : NormedAddCommGroup F'\ninst✝¹⁶ : NormedSpace ℝ F'\ninst✝¹⁵ : NormedSpace 𝕜 F'\ninst✝¹⁴ : CompleteSpace F'\ninst✝¹³ : NormedAddCommGroup F''\ninst✝¹² : NormedSpace ℝ F''\ninst✝¹¹ : NormedSpace 𝕜 F''\ninst✝¹⁰ : CompleteSpace F''\nk : G → E''\nL₂ : F →L[𝕜] E'' →L[𝕜] F'\nL₃ : E →L[𝕜] F'' →L[𝕜] F'\nL₄ : E' →L[𝕜] E'' →L[𝕜] F''\ninst✝⁹ : AddGroup G\ninst✝⁸ : SigmaFinite μ\ninst✝⁷ : SigmaFinite ν\ninst✝⁶ : IsAddRightInvariant μ\ninst✝⁵ : MeasurableAdd₂ G\ninst✝⁴ : MeasurableNeg G\ninst✝³ : NormedSpace ℝ E\ninst✝² : NormedSpace ℝ E'\ninst✝¹ : CompleteSpace E\ninst✝ : CompleteSpace E'\nhf : Integrable f\nhg : Integrable g\n⊢ Integrable (uncurry fun x t => ↑(↑L (f t)) (g (x - t)))\n[PROOFSTEP]\napply hf.convolution_integrand L hg\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝²⁹ : NormedAddCommGroup E\ninst✝²⁸ : NormedAddCommGroup E'\ninst✝²⁷ : NormedAddCommGroup E''\ninst✝²⁶ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝²⁵ : IsROrC 𝕜\ninst✝²⁴ : NormedSpace 𝕜 E\ninst✝²³ : NormedSpace 𝕜 E'\ninst✝²² : NormedSpace 𝕜 E''\ninst✝²¹ : NormedSpace ℝ F\ninst✝²⁰ : NormedSpace 𝕜 F\nn : ℕ∞\ninst✝¹⁹ : CompleteSpace F\ninst✝¹⁸ : MeasurableSpace G\nμ ν : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝¹⁷ : NormedAddCommGroup F'\ninst✝¹⁶ : NormedSpace ℝ F'\ninst✝¹⁵ : NormedSpace 𝕜 F'\ninst✝¹⁴ : CompleteSpace F'\ninst✝¹³ : NormedAddCommGroup F''\ninst✝¹² : NormedSpace ℝ F''\ninst✝¹¹ : NormedSpace 𝕜 F''\ninst✝¹⁰ : CompleteSpace F''\nk : G → E''\nL₂ : F →L[𝕜] E'' →L[𝕜] F'\nL₃ : E →L[𝕜] F'' →L[𝕜] F'\nL₄ : E' →L[𝕜] E'' →L[𝕜] F''\ninst✝⁹ : AddGroup G\ninst✝⁸ : SigmaFinite μ\ninst✝⁷ : SigmaFinite ν\ninst✝⁶ : IsAddRightInvariant μ\ninst✝⁵ : MeasurableAdd₂ G\ninst✝⁴ : MeasurableNeg G\ninst✝³ : NormedSpace ℝ E\ninst✝² : NormedSpace ℝ E'\ninst✝¹ : CompleteSpace E\ninst✝ : CompleteSpace E'\nhf : Integrable f\nhg : Integrable g\n⊢ ∫ (y : G), ∫ (x : G), ↑(↑L (f y)) (g (x - y)) ∂μ ∂ν = ↑(↑L (∫ (x : G), f x ∂ν)) (∫ (x : G), g x ∂μ)\n[PROOFSTEP]\nsimp_rw [integral_comp_comm _ (hg.comp_sub_right _), integral_sub_right_eq_self]\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝²⁹ : NormedAddCommGroup E\ninst✝²⁸ : NormedAddCommGroup E'\ninst✝²⁷ : NormedAddCommGroup E''\ninst✝²⁶ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝²⁵ : IsROrC 𝕜\ninst✝²⁴ : NormedSpace 𝕜 E\ninst✝²³ : NormedSpace 𝕜 E'\ninst✝²² : NormedSpace 𝕜 E''\ninst✝²¹ : NormedSpace ℝ F\ninst✝²⁰ : NormedSpace 𝕜 F\nn : ℕ∞\ninst✝¹⁹ : CompleteSpace F\ninst✝¹⁸ : MeasurableSpace G\nμ ν : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝¹⁷ : NormedAddCommGroup F'\ninst✝¹⁶ : NormedSpace ℝ F'\ninst✝¹⁵ : NormedSpace 𝕜 F'\ninst✝¹⁴ : CompleteSpace F'\ninst✝¹³ : NormedAddCommGroup F''\ninst✝¹² : NormedSpace ℝ F''\ninst✝¹¹ : NormedSpace 𝕜 F''\ninst✝¹⁰ : CompleteSpace F''\nk : G → E''\nL₂ : F →L[𝕜] E'' →L[𝕜] F'\nL₃ : E →L[𝕜] F'' →L[𝕜] F'\nL₄ : E' →L[𝕜] E'' →L[𝕜] F''\ninst✝⁹ : AddGroup G\ninst✝⁸ : SigmaFinite μ\ninst✝⁷ : SigmaFinite ν\ninst✝⁶ : IsAddRightInvariant μ\ninst✝⁵ : MeasurableAdd₂ G\ninst✝⁴ : MeasurableNeg G\ninst✝³ : NormedSpace ℝ E\ninst✝² : NormedSpace ℝ E'\ninst✝¹ : CompleteSpace E\ninst✝ : CompleteSpace E'\nhf : Integrable f\nhg : Integrable g\n⊢ ∫ (y : G), ↑(↑L (f y)) (∫ (x : G), g x ∂μ) ∂ν = ↑(↑L (∫ (x : G), f x ∂ν)) (∫ (x : G), g x ∂μ)\n[PROOFSTEP]\nexact (L.flip (∫ x, g x ∂μ)).integral_comp_comm hf\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝²⁶ : NormedAddCommGroup E\ninst✝²⁵ : NormedAddCommGroup E'\ninst✝²⁴ : NormedAddCommGroup E''\ninst✝²³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝²² : IsROrC 𝕜\ninst✝²¹ : NormedSpace 𝕜 E\ninst✝²⁰ : NormedSpace 𝕜 E'\ninst✝¹⁹ : NormedSpace 𝕜 E''\ninst✝¹⁸ : NormedSpace ℝ F\ninst✝¹⁷ : NormedSpace 𝕜 F\nn : ℕ∞\ninst✝¹⁶ : CompleteSpace F\ninst✝¹⁵ : MeasurableSpace G\nμ ν : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝¹⁴ : NormedAddCommGroup F'\ninst✝¹³ : NormedSpace ℝ F'\ninst✝¹² : NormedSpace 𝕜 F'\ninst✝¹¹ : CompleteSpace F'\ninst✝¹⁰ : NormedAddCommGroup F''\ninst✝⁹ : NormedSpace ℝ F''\ninst✝⁸ : NormedSpace 𝕜 F''\ninst✝⁷ : CompleteSpace F''\nk : G → E''\nL₂ : F →L[𝕜] E'' →L[𝕜] F'\nL₃ : E →L[𝕜] F'' →L[𝕜] F'\nL₄ : E' →L[𝕜] E'' →L[𝕜] F''\ninst✝⁶ : AddGroup G\ninst✝⁵ : SigmaFinite μ\ninst✝⁴ : SigmaFinite ν\ninst✝³ : IsAddRightInvariant μ\ninst✝² : MeasurableAdd₂ G\ninst✝¹ : IsAddRightInvariant ν\ninst✝ : MeasurableNeg G\nhL : ∀ (x : E) (y : E') (z : E''), ↑(↑L₂ (↑(↑L x) y)) z = ↑(↑L₃ x) (↑(↑L₄ y) z)\nx₀ : G\nhfg : ∀ᵐ (y : G) ∂μ, ConvolutionExistsAt f g y L\nhgk : ∀ᵐ (x : G) ∂ν, ConvolutionExistsAt g k x L₄\nhi : Integrable (uncurry fun x y => ↑(↑L₃ (f y)) (↑(↑L₄ (g (x - y))) (k (x₀ - x))))\n⊢ ∫ (t : G), ∫ (s : G), ↑(↑L₂ (↑(↑L (f s)) (g (t - s)))) (k (x₀ - t)) ∂ν ∂μ =\n    ∫ (t : G), ∫ (s : G), ↑(↑L₃ (f s)) (↑(↑L₄ (g (t - s))) (k (x₀ - t))) ∂ν ∂μ\n[PROOFSTEP]\nsimp_rw [hL]\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝²⁶ : NormedAddCommGroup E\ninst✝²⁵ : NormedAddCommGroup E'\ninst✝²⁴ : NormedAddCommGroup E''\ninst✝²³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝²² : IsROrC 𝕜\ninst✝²¹ : NormedSpace 𝕜 E\ninst✝²⁰ : NormedSpace 𝕜 E'\ninst✝¹⁹ : NormedSpace 𝕜 E''\ninst✝¹⁸ : NormedSpace ℝ F\ninst✝¹⁷ : NormedSpace 𝕜 F\nn : ℕ∞\ninst✝¹⁶ : CompleteSpace F\ninst✝¹⁵ : MeasurableSpace G\nμ ν : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝¹⁴ : NormedAddCommGroup F'\ninst✝¹³ : NormedSpace ℝ F'\ninst✝¹² : NormedSpace 𝕜 F'\ninst✝¹¹ : CompleteSpace F'\ninst✝¹⁰ : NormedAddCommGroup F''\ninst✝⁹ : NormedSpace ℝ F''\ninst✝⁸ : NormedSpace 𝕜 F''\ninst✝⁷ : CompleteSpace F''\nk : G → E''\nL₂ : F →L[𝕜] E'' →L[𝕜] F'\nL₃ : E →L[𝕜] F'' →L[𝕜] F'\nL₄ : E' →L[𝕜] E'' →L[𝕜] F''\ninst✝⁶ : AddGroup G\ninst✝⁵ : SigmaFinite μ\ninst✝⁴ : SigmaFinite ν\ninst✝³ : IsAddRightInvariant μ\ninst✝² : MeasurableAdd₂ G\ninst✝¹ : IsAddRightInvariant ν\ninst✝ : MeasurableNeg G\nhL : ∀ (x : E) (y : E') (z : E''), ↑(↑L₂ (↑(↑L x) y)) z = ↑(↑L₃ x) (↑(↑L₄ y) z)\nx₀ : G\nhfg : ∀ᵐ (y : G) ∂μ, ConvolutionExistsAt f g y L\nhgk : ∀ᵐ (x : G) ∂ν, ConvolutionExistsAt g k x L₄\nhi : Integrable (uncurry fun x y => ↑(↑L₃ (f y)) (↑(↑L₄ (g (x - y))) (k (x₀ - x))))\n⊢ ∫ (t : G), ∫ (s : G), ↑(↑L₃ (f s)) (↑(↑L₄ (g (t - s))) (k (x₀ - t))) ∂ν ∂μ =\n    ∫ (s : G), ∫ (t : G), ↑(↑L₃ (f s)) (↑(↑L₄ (g (t - s))) (k (x₀ - t))) ∂μ ∂ν\n[PROOFSTEP]\nrw [integral_integral_swap hi]\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝²⁶ : NormedAddCommGroup E\ninst✝²⁵ : NormedAddCommGroup E'\ninst✝²⁴ : NormedAddCommGroup E''\ninst✝²³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝²² : IsROrC 𝕜\ninst✝²¹ : NormedSpace 𝕜 E\ninst✝²⁰ : NormedSpace 𝕜 E'\ninst✝¹⁹ : NormedSpace 𝕜 E''\ninst✝¹⁸ : NormedSpace ℝ F\ninst✝¹⁷ : NormedSpace 𝕜 F\nn : ℕ∞\ninst✝¹⁶ : CompleteSpace F\ninst✝¹⁵ : MeasurableSpace G\nμ ν : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝¹⁴ : NormedAddCommGroup F'\ninst✝¹³ : NormedSpace ℝ F'\ninst✝¹² : NormedSpace 𝕜 F'\ninst✝¹¹ : CompleteSpace F'\ninst✝¹⁰ : NormedAddCommGroup F''\ninst✝⁹ : NormedSpace ℝ F''\ninst✝⁸ : NormedSpace 𝕜 F''\ninst✝⁷ : CompleteSpace F''\nk : G → E''\nL₂ : F →L[𝕜] E'' →L[𝕜] F'\nL₃ : E →L[𝕜] F'' →L[𝕜] F'\nL₄ : E' →L[𝕜] E'' →L[𝕜] F''\ninst✝⁶ : AddGroup G\ninst✝⁵ : SigmaFinite μ\ninst✝⁴ : SigmaFinite ν\ninst✝³ : IsAddRightInvariant μ\ninst✝² : MeasurableAdd₂ G\ninst✝¹ : IsAddRightInvariant ν\ninst✝ : MeasurableNeg G\nhL : ∀ (x : E) (y : E') (z : E''), ↑(↑L₂ (↑(↑L x) y)) z = ↑(↑L₃ x) (↑(↑L₄ y) z)\nx₀ : G\nhfg : ∀ᵐ (y : G) ∂μ, ConvolutionExistsAt f g y L\nhgk : ∀ᵐ (x : G) ∂ν, ConvolutionExistsAt g k x L₄\nhi : Integrable (uncurry fun x y => ↑(↑L₃ (f y)) (↑(↑L₄ (g (x - y))) (k (x₀ - x))))\n⊢ ∫ (s : G), ∫ (t : G), ↑(↑L₃ (f s)) (↑(↑L₄ (g (t - s))) (k (x₀ - t))) ∂μ ∂ν =\n    ∫ (s : G), ∫ (u : G), ↑(↑L₃ (f s)) (↑(↑L₄ (g u)) (k (x₀ - s - u))) ∂μ ∂ν\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_f\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝²⁶ : NormedAddCommGroup E\ninst✝²⁵ : NormedAddCommGroup E'\ninst✝²⁴ : NormedAddCommGroup E''\ninst✝²³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝²² : IsROrC 𝕜\ninst✝²¹ : NormedSpace 𝕜 E\ninst✝²⁰ : NormedSpace 𝕜 E'\ninst✝¹⁹ : NormedSpace 𝕜 E''\ninst✝¹⁸ : NormedSpace ℝ F\ninst✝¹⁷ : NormedSpace 𝕜 F\nn : ℕ∞\ninst✝¹⁶ : CompleteSpace F\ninst✝¹⁵ : MeasurableSpace G\nμ ν : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝¹⁴ : NormedAddCommGroup F'\ninst✝¹³ : NormedSpace ℝ F'\ninst✝¹² : NormedSpace 𝕜 F'\ninst✝¹¹ : CompleteSpace F'\ninst✝¹⁰ : NormedAddCommGroup F''\ninst✝⁹ : NormedSpace ℝ F''\ninst✝⁸ : NormedSpace 𝕜 F''\ninst✝⁷ : CompleteSpace F''\nk : G → E''\nL₂ : F →L[𝕜] E'' →L[𝕜] F'\nL₃ : E →L[𝕜] F'' →L[𝕜] F'\nL₄ : E' →L[𝕜] E'' →L[𝕜] F''\ninst✝⁶ : AddGroup G\ninst✝⁵ : SigmaFinite μ\ninst✝⁴ : SigmaFinite ν\ninst✝³ : IsAddRightInvariant μ\ninst✝² : MeasurableAdd₂ G\ninst✝¹ : IsAddRightInvariant ν\ninst✝ : MeasurableNeg G\nhL : ∀ (x : E) (y : E') (z : E''), ↑(↑L₂ (↑(↑L x) y)) z = ↑(↑L₃ x) (↑(↑L₄ y) z)\nx₀ : G\nhfg : ∀ᵐ (y : G) ∂μ, ConvolutionExistsAt f g y L\nhgk : ∀ᵐ (x : G) ∂ν, ConvolutionExistsAt g k x L₄\nhi : Integrable (uncurry fun x y => ↑(↑L₃ (f y)) (↑(↑L₄ (g (x - y))) (k (x₀ - x))))\n⊢ (fun s => ∫ (t : G), ↑(↑L₃ (f s)) (↑(↑L₄ (g (t - s))) (k (x₀ - t))) ∂μ) = fun s =>\n    ∫ (u : G), ↑(↑L₃ (f s)) (↑(↑L₄ (g u)) (k (x₀ - s - u))) ∂μ\n[PROOFSTEP]\next t\n[GOAL]\ncase e_f.h\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝²⁶ : NormedAddCommGroup E\ninst✝²⁵ : NormedAddCommGroup E'\ninst✝²⁴ : NormedAddCommGroup E''\ninst✝²³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝²² : IsROrC 𝕜\ninst✝²¹ : NormedSpace 𝕜 E\ninst✝²⁰ : NormedSpace 𝕜 E'\ninst✝¹⁹ : NormedSpace 𝕜 E''\ninst✝¹⁸ : NormedSpace ℝ F\ninst✝¹⁷ : NormedSpace 𝕜 F\nn : ℕ∞\ninst✝¹⁶ : CompleteSpace F\ninst✝¹⁵ : MeasurableSpace G\nμ ν : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝¹⁴ : NormedAddCommGroup F'\ninst✝¹³ : NormedSpace ℝ F'\ninst✝¹² : NormedSpace 𝕜 F'\ninst✝¹¹ : CompleteSpace F'\ninst✝¹⁰ : NormedAddCommGroup F''\ninst✝⁹ : NormedSpace ℝ F''\ninst✝⁸ : NormedSpace 𝕜 F''\ninst✝⁷ : CompleteSpace F''\nk : G → E''\nL₂ : F →L[𝕜] E'' →L[𝕜] F'\nL₃ : E →L[𝕜] F'' →L[𝕜] F'\nL₄ : E' →L[𝕜] E'' →L[𝕜] F''\ninst✝⁶ : AddGroup G\ninst✝⁵ : SigmaFinite μ\ninst✝⁴ : SigmaFinite ν\ninst✝³ : IsAddRightInvariant μ\ninst✝² : MeasurableAdd₂ G\ninst✝¹ : IsAddRightInvariant ν\ninst✝ : MeasurableNeg G\nhL : ∀ (x : E) (y : E') (z : E''), ↑(↑L₂ (↑(↑L x) y)) z = ↑(↑L₃ x) (↑(↑L₄ y) z)\nx₀ : G\nhfg : ∀ᵐ (y : G) ∂μ, ConvolutionExistsAt f g y L\nhgk : ∀ᵐ (x : G) ∂ν, ConvolutionExistsAt g k x L₄\nhi : Integrable (uncurry fun x y => ↑(↑L₃ (f y)) (↑(↑L₄ (g (x - y))) (k (x₀ - x))))\nt : G\n⊢ ∫ (t_1 : G), ↑(↑L₃ (f t)) (↑(↑L₄ (g (t_1 - t))) (k (x₀ - t_1))) ∂μ =\n    ∫ (u : G), ↑(↑L₃ (f t)) (↑(↑L₄ (g u)) (k (x₀ - t - u))) ∂μ\n[PROOFSTEP]\nrw [eq_comm, ← integral_sub_right_eq_self _ t]\n[GOAL]\ncase e_f.h\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝²⁶ : NormedAddCommGroup E\ninst✝²⁵ : NormedAddCommGroup E'\ninst✝²⁴ : NormedAddCommGroup E''\ninst✝²³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝²² : IsROrC 𝕜\ninst✝²¹ : NormedSpace 𝕜 E\ninst✝²⁰ : NormedSpace 𝕜 E'\ninst✝¹⁹ : NormedSpace 𝕜 E''\ninst✝¹⁸ : NormedSpace ℝ F\ninst✝¹⁷ : NormedSpace 𝕜 F\nn : ℕ∞\ninst✝¹⁶ : CompleteSpace F\ninst✝¹⁵ : MeasurableSpace G\nμ ν : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝¹⁴ : NormedAddCommGroup F'\ninst✝¹³ : NormedSpace ℝ F'\ninst✝¹² : NormedSpace 𝕜 F'\ninst✝¹¹ : CompleteSpace F'\ninst✝¹⁰ : NormedAddCommGroup F''\ninst✝⁹ : NormedSpace ℝ F''\ninst✝⁸ : NormedSpace 𝕜 F''\ninst✝⁷ : CompleteSpace F''\nk : G → E''\nL₂ : F →L[𝕜] E'' →L[𝕜] F'\nL₃ : E →L[𝕜] F'' →L[𝕜] F'\nL₄ : E' →L[𝕜] E'' →L[𝕜] F''\ninst✝⁶ : AddGroup G\ninst✝⁵ : SigmaFinite μ\ninst✝⁴ : SigmaFinite ν\ninst✝³ : IsAddRightInvariant μ\ninst✝² : MeasurableAdd₂ G\ninst✝¹ : IsAddRightInvariant ν\ninst✝ : MeasurableNeg G\nhL : ∀ (x : E) (y : E') (z : E''), ↑(↑L₂ (↑(↑L x) y)) z = ↑(↑L₃ x) (↑(↑L₄ y) z)\nx₀ : G\nhfg : ∀ᵐ (y : G) ∂μ, ConvolutionExistsAt f g y L\nhgk : ∀ᵐ (x : G) ∂ν, ConvolutionExistsAt g k x L₄\nhi : Integrable (uncurry fun x y => ↑(↑L₃ (f y)) (↑(↑L₄ (g (x - y))) (k (x₀ - x))))\nt : G\n⊢ ∫ (x : G), ↑(↑L₃ (f t)) (↑(↑L₄ (g (x - t))) (k (x₀ - t - (x - t)))) ∂μ =\n    ∫ (t_1 : G), ↑(↑L₃ (f t)) (↑(↑L₄ (g (t_1 - t))) (k (x₀ - t_1))) ∂μ\n[PROOFSTEP]\nsimp_rw [sub_sub_sub_cancel_right]\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝²⁶ : NormedAddCommGroup E\ninst✝²⁵ : NormedAddCommGroup E'\ninst✝²⁴ : NormedAddCommGroup E''\ninst✝²³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝²² : IsROrC 𝕜\ninst✝²¹ : NormedSpace 𝕜 E\ninst✝²⁰ : NormedSpace 𝕜 E'\ninst✝¹⁹ : NormedSpace 𝕜 E''\ninst✝¹⁸ : NormedSpace ℝ F\ninst✝¹⁷ : NormedSpace 𝕜 F\nn : ℕ∞\ninst✝¹⁶ : CompleteSpace F\ninst✝¹⁵ : MeasurableSpace G\nμ ν : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝¹⁴ : NormedAddCommGroup F'\ninst✝¹³ : NormedSpace ℝ F'\ninst✝¹² : NormedSpace 𝕜 F'\ninst✝¹¹ : CompleteSpace F'\ninst✝¹⁰ : NormedAddCommGroup F''\ninst✝⁹ : NormedSpace ℝ F''\ninst✝⁸ : NormedSpace 𝕜 F''\ninst✝⁷ : CompleteSpace F''\nk : G → E''\nL₂ : F →L[𝕜] E'' →L[𝕜] F'\nL₃ : E →L[𝕜] F'' →L[𝕜] F'\nL₄ : E' →L[𝕜] E'' →L[𝕜] F''\ninst✝⁶ : AddGroup G\ninst✝⁵ : SigmaFinite μ\ninst✝⁴ : SigmaFinite ν\ninst✝³ : IsAddRightInvariant μ\ninst✝² : MeasurableAdd₂ G\ninst✝¹ : IsAddRightInvariant ν\ninst✝ : MeasurableNeg G\nhL : ∀ (x : E) (y : E') (z : E''), ↑(↑L₂ (↑(↑L x) y)) z = ↑(↑L₃ x) (↑(↑L₄ y) z)\nx₀ : G\nhfg : ∀ᵐ (y : G) ∂μ, ConvolutionExistsAt f g y L\nhgk : ∀ᵐ (x : G) ∂ν, ConvolutionExistsAt g k x L₄\nhi : Integrable (uncurry fun x y => ↑(↑L₃ (f y)) (↑(↑L₄ (g (x - y))) (k (x₀ - x))))\n⊢ ∫ (s : G), ∫ (u : G), ↑(↑L₃ (f s)) (↑(↑L₄ (g u)) (k (x₀ - s - u))) ∂μ ∂ν =\n    ∫ (s : G), ↑(↑L₃ (f s)) (∫ (u : G), ↑(↑L₄ (g u)) (k (x₀ - s - u)) ∂μ) ∂ν\n[PROOFSTEP]\nrefine' integral_congr_ae _\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝²⁶ : NormedAddCommGroup E\ninst✝²⁵ : NormedAddCommGroup E'\ninst✝²⁴ : NormedAddCommGroup E''\ninst✝²³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝²² : IsROrC 𝕜\ninst✝²¹ : NormedSpace 𝕜 E\ninst✝²⁰ : NormedSpace 𝕜 E'\ninst✝¹⁹ : NormedSpace 𝕜 E''\ninst✝¹⁸ : NormedSpace ℝ F\ninst✝¹⁷ : NormedSpace 𝕜 F\nn : ℕ∞\ninst✝¹⁶ : CompleteSpace F\ninst✝¹⁵ : MeasurableSpace G\nμ ν : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝¹⁴ : NormedAddCommGroup F'\ninst✝¹³ : NormedSpace ℝ F'\ninst✝¹² : NormedSpace 𝕜 F'\ninst✝¹¹ : CompleteSpace F'\ninst✝¹⁰ : NormedAddCommGroup F''\ninst✝⁹ : NormedSpace ℝ F''\ninst✝⁸ : NormedSpace 𝕜 F''\ninst✝⁷ : CompleteSpace F''\nk : G → E''\nL₂ : F →L[𝕜] E'' →L[𝕜] F'\nL₃ : E →L[𝕜] F'' →L[𝕜] F'\nL₄ : E' →L[𝕜] E'' →L[𝕜] F''\ninst✝⁶ : AddGroup G\ninst✝⁵ : SigmaFinite μ\ninst✝⁴ : SigmaFinite ν\ninst✝³ : IsAddRightInvariant μ\ninst✝² : MeasurableAdd₂ G\ninst✝¹ : IsAddRightInvariant ν\ninst✝ : MeasurableNeg G\nhL : ∀ (x : E) (y : E') (z : E''), ↑(↑L₂ (↑(↑L x) y)) z = ↑(↑L₃ x) (↑(↑L₄ y) z)\nx₀ : G\nhfg : ∀ᵐ (y : G) ∂μ, ConvolutionExistsAt f g y L\nhgk : ∀ᵐ (x : G) ∂ν, ConvolutionExistsAt g k x L₄\nhi : Integrable (uncurry fun x y => ↑(↑L₃ (f y)) (↑(↑L₄ (g (x - y))) (k (x₀ - x))))\n⊢ (fun s => ∫ (u : G), ↑(↑L₃ (f s)) (↑(↑L₄ (g u)) (k (x₀ - s - u))) ∂μ) =ᶠ[ae ν] fun s =>\n    ↑(↑L₃ (f s)) (∫ (u : G), ↑(↑L₄ (g u)) (k (x₀ - s - u)) ∂μ)\n[PROOFSTEP]\nrefine' ((quasiMeasurePreserving_sub_left_of_right_invariant ν x₀).ae hgk).mono fun t ht => _\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝²⁶ : NormedAddCommGroup E\ninst✝²⁵ : NormedAddCommGroup E'\ninst✝²⁴ : NormedAddCommGroup E''\ninst✝²³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝²² : IsROrC 𝕜\ninst✝²¹ : NormedSpace 𝕜 E\ninst✝²⁰ : NormedSpace 𝕜 E'\ninst✝¹⁹ : NormedSpace 𝕜 E''\ninst✝¹⁸ : NormedSpace ℝ F\ninst✝¹⁷ : NormedSpace 𝕜 F\nn : ℕ∞\ninst✝¹⁶ : CompleteSpace F\ninst✝¹⁵ : MeasurableSpace G\nμ ν : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝¹⁴ : NormedAddCommGroup F'\ninst✝¹³ : NormedSpace ℝ F'\ninst✝¹² : NormedSpace 𝕜 F'\ninst✝¹¹ : CompleteSpace F'\ninst✝¹⁰ : NormedAddCommGroup F''\ninst✝⁹ : NormedSpace ℝ F''\ninst✝⁸ : NormedSpace 𝕜 F''\ninst✝⁷ : CompleteSpace F''\nk : G → E''\nL₂ : F →L[𝕜] E'' →L[𝕜] F'\nL₃ : E →L[𝕜] F'' →L[𝕜] F'\nL₄ : E' →L[𝕜] E'' →L[𝕜] F''\ninst✝⁶ : AddGroup G\ninst✝⁵ : SigmaFinite μ\ninst✝⁴ : SigmaFinite ν\ninst✝³ : IsAddRightInvariant μ\ninst✝² : MeasurableAdd₂ G\ninst✝¹ : IsAddRightInvariant ν\ninst✝ : MeasurableNeg G\nhL : ∀ (x : E) (y : E') (z : E''), ↑(↑L₂ (↑(↑L x) y)) z = ↑(↑L₃ x) (↑(↑L₄ y) z)\nx₀ : G\nhfg : ∀ᵐ (y : G) ∂μ, ConvolutionExistsAt f g y L\nhgk : ∀ᵐ (x : G) ∂ν, ConvolutionExistsAt g k x L₄\nhi : Integrable (uncurry fun x y => ↑(↑L₃ (f y)) (↑(↑L₄ (g (x - y))) (k (x₀ - x))))\nt : G\nht : ConvolutionExistsAt g k (x₀ - t) L₄\n⊢ (fun s => ∫ (u : G), ↑(↑L₃ (f s)) (↑(↑L₄ (g u)) (k (x₀ - s - u))) ∂μ) t =\n    (fun s => ↑(↑L₃ (f s)) (∫ (u : G), ↑(↑L₄ (g u)) (k (x₀ - s - u)) ∂μ)) t\n[PROOFSTEP]\nexact (L₃ (f t)).integral_comp_comm ht\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝²⁶ : NormedAddCommGroup E\ninst✝²⁵ : NormedAddCommGroup E'\ninst✝²⁴ : NormedAddCommGroup E''\ninst✝²³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝²² : IsROrC 𝕜\ninst✝²¹ : NormedSpace 𝕜 E\ninst✝²⁰ : NormedSpace 𝕜 E'\ninst✝¹⁹ : NormedSpace 𝕜 E''\ninst✝¹⁸ : NormedSpace ℝ F\ninst✝¹⁷ : NormedSpace 𝕜 F\nn : ℕ∞\ninst✝¹⁶ : CompleteSpace F\ninst✝¹⁵ : MeasurableSpace G\nμ ν : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝¹⁴ : NormedAddCommGroup F'\ninst✝¹³ : NormedSpace ℝ F'\ninst✝¹² : NormedSpace 𝕜 F'\ninst✝¹¹ : CompleteSpace F'\ninst✝¹⁰ : NormedAddCommGroup F''\ninst✝⁹ : NormedSpace ℝ F''\ninst✝⁸ : NormedSpace 𝕜 F''\ninst✝⁷ : CompleteSpace F''\nk : G → E''\nL₂ : F →L[𝕜] E'' →L[𝕜] F'\nL₃ : E →L[𝕜] F'' →L[𝕜] F'\nL₄ : E' →L[𝕜] E'' →L[𝕜] F''\ninst✝⁶ : AddGroup G\ninst✝⁵ : SigmaFinite μ\ninst✝⁴ : SigmaFinite ν\ninst✝³ : IsAddRightInvariant μ\ninst✝² : MeasurableAdd₂ G\ninst✝¹ : IsAddRightInvariant ν\ninst✝ : MeasurableNeg G\nhL : ∀ (x : E) (y : E') (z : E''), ↑(↑L₂ (↑(↑L x) y)) z = ↑(↑L₃ x) (↑(↑L₄ y) z)\nx₀ : G\nhf : AEStronglyMeasurable f ν\nhg : AEStronglyMeasurable g μ\nhk : AEStronglyMeasurable k μ\nhfg : ∀ᵐ (y : G) ∂μ, ConvolutionExistsAt f g y L\nhgk : ∀ᵐ (x : G) ∂ν, ConvolutionExistsAt (fun x => ‖g x‖) (fun x => ‖k x‖) x (mul ℝ ℝ)\nhfgk : ConvolutionExistsAt (fun x => ‖f x‖) (convolution (fun x => ‖g x‖) (fun x => ‖k x‖) (mul ℝ ℝ)) x₀ (mul ℝ ℝ)\n⊢ convolution f g L ⋆[L₂, x₀] k = f ⋆[L₃, x₀] convolution g k L₄\n[PROOFSTEP]\nrefine'\n  convolution_assoc' L L₂ L₃ L₄ hL hfg (hgk.mono fun x hx => hx.ofNorm L₄ hg hk)\n    _\n      -- the following is similar to `integrable.convolution_integrand`\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝²⁶ : NormedAddCommGroup E\ninst✝²⁵ : NormedAddCommGroup E'\ninst✝²⁴ : NormedAddCommGroup E''\ninst✝²³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝²² : IsROrC 𝕜\ninst✝²¹ : NormedSpace 𝕜 E\ninst✝²⁰ : NormedSpace 𝕜 E'\ninst✝¹⁹ : NormedSpace 𝕜 E''\ninst✝¹⁸ : NormedSpace ℝ F\ninst✝¹⁷ : NormedSpace 𝕜 F\nn : ℕ∞\ninst✝¹⁶ : CompleteSpace F\ninst✝¹⁵ : MeasurableSpace G\nμ ν : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝¹⁴ : NormedAddCommGroup F'\ninst✝¹³ : NormedSpace ℝ F'\ninst✝¹² : NormedSpace 𝕜 F'\ninst✝¹¹ : CompleteSpace F'\ninst✝¹⁰ : NormedAddCommGroup F''\ninst✝⁹ : NormedSpace ℝ F''\ninst✝⁸ : NormedSpace 𝕜 F''\ninst✝⁷ : CompleteSpace F''\nk : G → E''\nL₂ : F →L[𝕜] E'' →L[𝕜] F'\nL₃ : E →L[𝕜] F'' →L[𝕜] F'\nL₄ : E' →L[𝕜] E'' →L[𝕜] F''\ninst✝⁶ : AddGroup G\ninst✝⁵ : SigmaFinite μ\ninst✝⁴ : SigmaFinite ν\ninst✝³ : IsAddRightInvariant μ\ninst✝² : MeasurableAdd₂ G\ninst✝¹ : IsAddRightInvariant ν\ninst✝ : MeasurableNeg G\nhL : ∀ (x : E) (y : E') (z : E''), ↑(↑L₂ (↑(↑L x) y)) z = ↑(↑L₃ x) (↑(↑L₄ y) z)\nx₀ : G\nhf : AEStronglyMeasurable f ν\nhg : AEStronglyMeasurable g μ\nhk : AEStronglyMeasurable k μ\nhfg : ∀ᵐ (y : G) ∂μ, ConvolutionExistsAt f g y L\nhgk : ∀ᵐ (x : G) ∂ν, ConvolutionExistsAt (fun x => ‖g x‖) (fun x => ‖k x‖) x (mul ℝ ℝ)\nhfgk : ConvolutionExistsAt (fun x => ‖f x‖) (convolution (fun x => ‖g x‖) (fun x => ‖k x‖) (mul ℝ ℝ)) x₀ (mul ℝ ℝ)\n⊢ Integrable (uncurry fun x y => ↑(↑L₃ (f y)) (↑(↑L₄ (g (x - y))) (k (x₀ - x))))\n[PROOFSTEP]\nhave h_meas : AEStronglyMeasurable (uncurry fun x y => L₃ (f y) (L₄ (g x) (k (x₀ - y - x)))) (μ.prod ν) :=\n  by\n  refine' L₃.aestronglyMeasurable_comp₂ hf.snd _\n  refine' L₄.aestronglyMeasurable_comp₂ hg.fst _\n  refine' (hk.mono' _).comp_measurable ((measurable_const.sub measurable_snd).sub measurable_fst)\n  refine' QuasiMeasurePreserving.absolutelyContinuous _\n  refine'\n    QuasiMeasurePreserving.prod_of_left ((measurable_const.sub measurable_snd).sub measurable_fst)\n      (eventually_of_forall fun y => _)\n  dsimp only\n  exact quasiMeasurePreserving_sub_left_of_right_invariant μ _\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝²⁶ : NormedAddCommGroup E\ninst✝²⁵ : NormedAddCommGroup E'\ninst✝²⁴ : NormedAddCommGroup E''\ninst✝²³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝²² : IsROrC 𝕜\ninst✝²¹ : NormedSpace 𝕜 E\ninst✝²⁰ : NormedSpace 𝕜 E'\ninst✝¹⁹ : NormedSpace 𝕜 E''\ninst✝¹⁸ : NormedSpace ℝ F\ninst✝¹⁷ : NormedSpace 𝕜 F\nn : ℕ∞\ninst✝¹⁶ : CompleteSpace F\ninst✝¹⁵ : MeasurableSpace G\nμ ν : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝¹⁴ : NormedAddCommGroup F'\ninst✝¹³ : NormedSpace ℝ F'\ninst✝¹² : NormedSpace 𝕜 F'\ninst✝¹¹ : CompleteSpace F'\ninst✝¹⁰ : NormedAddCommGroup F''\ninst✝⁹ : NormedSpace ℝ F''\ninst✝⁸ : NormedSpace 𝕜 F''\ninst✝⁷ : CompleteSpace F''\nk : G → E''\nL₂ : F →L[𝕜] E'' →L[𝕜] F'\nL₃ : E →L[𝕜] F'' →L[𝕜] F'\nL₄ : E' →L[𝕜] E'' →L[𝕜] F''\ninst✝⁶ : AddGroup G\ninst✝⁵ : SigmaFinite μ\ninst✝⁴ : SigmaFinite ν\ninst✝³ : IsAddRightInvariant μ\ninst✝² : MeasurableAdd₂ G\ninst✝¹ : IsAddRightInvariant ν\ninst✝ : MeasurableNeg G\nhL : ∀ (x : E) (y : E') (z : E''), ↑(↑L₂ (↑(↑L x) y)) z = ↑(↑L₃ x) (↑(↑L₄ y) z)\nx₀ : G\nhf : AEStronglyMeasurable f ν\nhg : AEStronglyMeasurable g μ\nhk : AEStronglyMeasurable k μ\nhfg : ∀ᵐ (y : G) ∂μ, ConvolutionExistsAt f g y L\nhgk : ∀ᵐ (x : G) ∂ν, ConvolutionExistsAt (fun x => ‖g x‖) (fun x => ‖k x‖) x (mul ℝ ℝ)\nhfgk : ConvolutionExistsAt (fun x => ‖f x‖) (convolution (fun x => ‖g x‖) (fun x => ‖k x‖) (mul ℝ ℝ)) x₀ (mul ℝ ℝ)\n⊢ AEStronglyMeasurable (uncurry fun x y => ↑(↑L₃ (f y)) (↑(↑L₄ (g x)) (k (x₀ - y - x)))) (Measure.prod μ ν)\n[PROOFSTEP]\nrefine' L₃.aestronglyMeasurable_comp₂ hf.snd _\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝²⁶ : NormedAddCommGroup E\ninst✝²⁵ : NormedAddCommGroup E'\ninst✝²⁴ : NormedAddCommGroup E''\ninst✝²³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝²² : IsROrC 𝕜\ninst✝²¹ : NormedSpace 𝕜 E\ninst✝²⁰ : NormedSpace 𝕜 E'\ninst✝¹⁹ : NormedSpace 𝕜 E''\ninst✝¹⁸ : NormedSpace ℝ F\ninst✝¹⁷ : NormedSpace 𝕜 F\nn : ℕ∞\ninst✝¹⁶ : CompleteSpace F\ninst✝¹⁵ : MeasurableSpace G\nμ ν : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝¹⁴ : NormedAddCommGroup F'\ninst✝¹³ : NormedSpace ℝ F'\ninst✝¹² : NormedSpace 𝕜 F'\ninst✝¹¹ : CompleteSpace F'\ninst✝¹⁰ : NormedAddCommGroup F''\ninst✝⁹ : NormedSpace ℝ F''\ninst✝⁸ : NormedSpace 𝕜 F''\ninst✝⁷ : CompleteSpace F''\nk : G → E''\nL₂ : F →L[𝕜] E'' →L[𝕜] F'\nL₃ : E →L[𝕜] F'' →L[𝕜] F'\nL₄ : E' →L[𝕜] E'' →L[𝕜] F''\ninst✝⁶ : AddGroup G\ninst✝⁵ : SigmaFinite μ\ninst✝⁴ : SigmaFinite ν\ninst✝³ : IsAddRightInvariant μ\ninst✝² : MeasurableAdd₂ G\ninst✝¹ : IsAddRightInvariant ν\ninst✝ : MeasurableNeg G\nhL : ∀ (x : E) (y : E') (z : E''), ↑(↑L₂ (↑(↑L x) y)) z = ↑(↑L₃ x) (↑(↑L₄ y) z)\nx₀ : G\nhf : AEStronglyMeasurable f ν\nhg : AEStronglyMeasurable g μ\nhk : AEStronglyMeasurable k μ\nhfg : ∀ᵐ (y : G) ∂μ, ConvolutionExistsAt f g y L\nhgk : ∀ᵐ (x : G) ∂ν, ConvolutionExistsAt (fun x => ‖g x‖) (fun x => ‖k x‖) x (mul ℝ ℝ)\nhfgk : ConvolutionExistsAt (fun x => ‖f x‖) (convolution (fun x => ‖g x‖) (fun x => ‖k x‖) (mul ℝ ℝ)) x₀ (mul ℝ ℝ)\n⊢ AEStronglyMeasurable (fun x => ↑(↑L₄ (g x.fst)) (k (x₀ - x.snd - x.fst))) (Measure.prod μ ν)\n[PROOFSTEP]\nrefine' L₄.aestronglyMeasurable_comp₂ hg.fst _\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝²⁶ : NormedAddCommGroup E\ninst✝²⁵ : NormedAddCommGroup E'\ninst✝²⁴ : NormedAddCommGroup E''\ninst✝²³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝²² : IsROrC 𝕜\ninst✝²¹ : NormedSpace 𝕜 E\ninst✝²⁰ : NormedSpace 𝕜 E'\ninst✝¹⁹ : NormedSpace 𝕜 E''\ninst✝¹⁸ : NormedSpace ℝ F\ninst✝¹⁷ : NormedSpace 𝕜 F\nn : ℕ∞\ninst✝¹⁶ : CompleteSpace F\ninst✝¹⁵ : MeasurableSpace G\nμ ν : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝¹⁴ : NormedAddCommGroup F'\ninst✝¹³ : NormedSpace ℝ F'\ninst✝¹² : NormedSpace 𝕜 F'\ninst✝¹¹ : CompleteSpace F'\ninst✝¹⁰ : NormedAddCommGroup F''\ninst✝⁹ : NormedSpace ℝ F''\ninst✝⁸ : NormedSpace 𝕜 F''\ninst✝⁷ : CompleteSpace F''\nk : G → E''\nL₂ : F →L[𝕜] E'' →L[𝕜] F'\nL₃ : E →L[𝕜] F'' →L[𝕜] F'\nL₄ : E' →L[𝕜] E'' →L[𝕜] F''\ninst✝⁶ : AddGroup G\ninst✝⁵ : SigmaFinite μ\ninst✝⁴ : SigmaFinite ν\ninst✝³ : IsAddRightInvariant μ\ninst✝² : MeasurableAdd₂ G\ninst✝¹ : IsAddRightInvariant ν\ninst✝ : MeasurableNeg G\nhL : ∀ (x : E) (y : E') (z : E''), ↑(↑L₂ (↑(↑L x) y)) z = ↑(↑L₃ x) (↑(↑L₄ y) z)\nx₀ : G\nhf : AEStronglyMeasurable f ν\nhg : AEStronglyMeasurable g μ\nhk : AEStronglyMeasurable k μ\nhfg : ∀ᵐ (y : G) ∂μ, ConvolutionExistsAt f g y L\nhgk : ∀ᵐ (x : G) ∂ν, ConvolutionExistsAt (fun x => ‖g x‖) (fun x => ‖k x‖) x (mul ℝ ℝ)\nhfgk : ConvolutionExistsAt (fun x => ‖f x‖) (convolution (fun x => ‖g x‖) (fun x => ‖k x‖) (mul ℝ ℝ)) x₀ (mul ℝ ℝ)\n⊢ AEStronglyMeasurable (fun x => k (x₀ - x.snd - x.fst)) (Measure.prod μ ν)\n[PROOFSTEP]\nrefine' (hk.mono' _).comp_measurable ((measurable_const.sub measurable_snd).sub measurable_fst)\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝²⁶ : NormedAddCommGroup E\ninst✝²⁵ : NormedAddCommGroup E'\ninst✝²⁴ : NormedAddCommGroup E''\ninst✝²³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝²² : IsROrC 𝕜\ninst✝²¹ : NormedSpace 𝕜 E\ninst✝²⁰ : NormedSpace 𝕜 E'\ninst✝¹⁹ : NormedSpace 𝕜 E''\ninst✝¹⁸ : NormedSpace ℝ F\ninst✝¹⁷ : NormedSpace 𝕜 F\nn : ℕ∞\ninst✝¹⁶ : CompleteSpace F\ninst✝¹⁵ : MeasurableSpace G\nμ ν : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝¹⁴ : NormedAddCommGroup F'\ninst✝¹³ : NormedSpace ℝ F'\ninst✝¹² : NormedSpace 𝕜 F'\ninst✝¹¹ : CompleteSpace F'\ninst✝¹⁰ : NormedAddCommGroup F''\ninst✝⁹ : NormedSpace ℝ F''\ninst✝⁸ : NormedSpace 𝕜 F''\ninst✝⁷ : CompleteSpace F''\nk : G → E''\nL₂ : F →L[𝕜] E'' →L[𝕜] F'\nL₃ : E →L[𝕜] F'' →L[𝕜] F'\nL₄ : E' →L[𝕜] E'' →L[𝕜] F''\ninst✝⁶ : AddGroup G\ninst✝⁵ : SigmaFinite μ\ninst✝⁴ : SigmaFinite ν\ninst✝³ : IsAddRightInvariant μ\ninst✝² : MeasurableAdd₂ G\ninst✝¹ : IsAddRightInvariant ν\ninst✝ : MeasurableNeg G\nhL : ∀ (x : E) (y : E') (z : E''), ↑(↑L₂ (↑(↑L x) y)) z = ↑(↑L₃ x) (↑(↑L₄ y) z)\nx₀ : G\nhf : AEStronglyMeasurable f ν\nhg : AEStronglyMeasurable g μ\nhk : AEStronglyMeasurable k μ\nhfg : ∀ᵐ (y : G) ∂μ, ConvolutionExistsAt f g y L\nhgk : ∀ᵐ (x : G) ∂ν, ConvolutionExistsAt (fun x => ‖g x‖) (fun x => ‖k x‖) x (mul ℝ ℝ)\nhfgk : ConvolutionExistsAt (fun x => ‖f x‖) (convolution (fun x => ‖g x‖) (fun x => ‖k x‖) (mul ℝ ℝ)) x₀ (mul ℝ ℝ)\n⊢ Measure.map (fun x => x₀ - x.snd - x.fst) (Measure.prod μ ν) ≪ μ\n[PROOFSTEP]\nrefine' QuasiMeasurePreserving.absolutelyContinuous _\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝²⁶ : NormedAddCommGroup E\ninst✝²⁵ : NormedAddCommGroup E'\ninst✝²⁴ : NormedAddCommGroup E''\ninst✝²³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝²² : IsROrC 𝕜\ninst✝²¹ : NormedSpace 𝕜 E\ninst✝²⁰ : NormedSpace 𝕜 E'\ninst✝¹⁹ : NormedSpace 𝕜 E''\ninst✝¹⁸ : NormedSpace ℝ F\ninst✝¹⁷ : NormedSpace 𝕜 F\nn : ℕ∞\ninst✝¹⁶ : CompleteSpace F\ninst✝¹⁵ : MeasurableSpace G\nμ ν : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝¹⁴ : NormedAddCommGroup F'\ninst✝¹³ : NormedSpace ℝ F'\ninst✝¹² : NormedSpace 𝕜 F'\ninst✝¹¹ : CompleteSpace F'\ninst✝¹⁰ : NormedAddCommGroup F''\ninst✝⁹ : NormedSpace ℝ F''\ninst✝⁸ : NormedSpace 𝕜 F''\ninst✝⁷ : CompleteSpace F''\nk : G → E''\nL₂ : F →L[𝕜] E'' →L[𝕜] F'\nL₃ : E →L[𝕜] F'' →L[𝕜] F'\nL₄ : E' →L[𝕜] E'' →L[𝕜] F''\ninst✝⁶ : AddGroup G\ninst✝⁵ : SigmaFinite μ\ninst✝⁴ : SigmaFinite ν\ninst✝³ : IsAddRightInvariant μ\ninst✝² : MeasurableAdd₂ G\ninst✝¹ : IsAddRightInvariant ν\ninst✝ : MeasurableNeg G\nhL : ∀ (x : E) (y : E') (z : E''), ↑(↑L₂ (↑(↑L x) y)) z = ↑(↑L₃ x) (↑(↑L₄ y) z)\nx₀ : G\nhf : AEStronglyMeasurable f ν\nhg : AEStronglyMeasurable g μ\nhk : AEStronglyMeasurable k μ\nhfg : ∀ᵐ (y : G) ∂μ, ConvolutionExistsAt f g y L\nhgk : ∀ᵐ (x : G) ∂ν, ConvolutionExistsAt (fun x => ‖g x‖) (fun x => ‖k x‖) x (mul ℝ ℝ)\nhfgk : ConvolutionExistsAt (fun x => ‖f x‖) (convolution (fun x => ‖g x‖) (fun x => ‖k x‖) (mul ℝ ℝ)) x₀ (mul ℝ ℝ)\n⊢ QuasiMeasurePreserving fun x => x₀ - x.snd - x.fst\n[PROOFSTEP]\nrefine'\n  QuasiMeasurePreserving.prod_of_left ((measurable_const.sub measurable_snd).sub measurable_fst)\n    (eventually_of_forall fun y => _)\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝²⁶ : NormedAddCommGroup E\ninst✝²⁵ : NormedAddCommGroup E'\ninst✝²⁴ : NormedAddCommGroup E''\ninst✝²³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny✝ y' : E\ninst✝²² : IsROrC 𝕜\ninst✝²¹ : NormedSpace 𝕜 E\ninst✝²⁰ : NormedSpace 𝕜 E'\ninst✝¹⁹ : NormedSpace 𝕜 E''\ninst✝¹⁸ : NormedSpace ℝ F\ninst✝¹⁷ : NormedSpace 𝕜 F\nn : ℕ∞\ninst✝¹⁶ : CompleteSpace F\ninst✝¹⁵ : MeasurableSpace G\nμ ν : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝¹⁴ : NormedAddCommGroup F'\ninst✝¹³ : NormedSpace ℝ F'\ninst✝¹² : NormedSpace 𝕜 F'\ninst✝¹¹ : CompleteSpace F'\ninst✝¹⁰ : NormedAddCommGroup F''\ninst✝⁹ : NormedSpace ℝ F''\ninst✝⁸ : NormedSpace 𝕜 F''\ninst✝⁷ : CompleteSpace F''\nk : G → E''\nL₂ : F →L[𝕜] E'' →L[𝕜] F'\nL₃ : E →L[𝕜] F'' →L[𝕜] F'\nL₄ : E' →L[𝕜] E'' →L[𝕜] F''\ninst✝⁶ : AddGroup G\ninst✝⁵ : SigmaFinite μ\ninst✝⁴ : SigmaFinite ν\ninst✝³ : IsAddRightInvariant μ\ninst✝² : MeasurableAdd₂ G\ninst✝¹ : IsAddRightInvariant ν\ninst✝ : MeasurableNeg G\nhL : ∀ (x : E) (y : E') (z : E''), ↑(↑L₂ (↑(↑L x) y)) z = ↑(↑L₃ x) (↑(↑L₄ y) z)\nx₀ : G\nhf : AEStronglyMeasurable f ν\nhg : AEStronglyMeasurable g μ\nhk : AEStronglyMeasurable k μ\nhfg : ∀ᵐ (y : G) ∂μ, ConvolutionExistsAt f g y L\nhgk : ∀ᵐ (x : G) ∂ν, ConvolutionExistsAt (fun x => ‖g x‖) (fun x => ‖k x‖) x (mul ℝ ℝ)\nhfgk : ConvolutionExistsAt (fun x => ‖f x‖) (convolution (fun x => ‖g x‖) (fun x => ‖k x‖) (mul ℝ ℝ)) x₀ (mul ℝ ℝ)\ny : G\n⊢ QuasiMeasurePreserving fun x => x₀ - (x, y).snd - (x, y).fst\n[PROOFSTEP]\ndsimp only\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝²⁶ : NormedAddCommGroup E\ninst✝²⁵ : NormedAddCommGroup E'\ninst✝²⁴ : NormedAddCommGroup E''\ninst✝²³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny✝ y' : E\ninst✝²² : IsROrC 𝕜\ninst✝²¹ : NormedSpace 𝕜 E\ninst✝²⁰ : NormedSpace 𝕜 E'\ninst✝¹⁹ : NormedSpace 𝕜 E''\ninst✝¹⁸ : NormedSpace ℝ F\ninst✝¹⁷ : NormedSpace 𝕜 F\nn : ℕ∞\ninst✝¹⁶ : CompleteSpace F\ninst✝¹⁵ : MeasurableSpace G\nμ ν : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝¹⁴ : NormedAddCommGroup F'\ninst✝¹³ : NormedSpace ℝ F'\ninst✝¹² : NormedSpace 𝕜 F'\ninst✝¹¹ : CompleteSpace F'\ninst✝¹⁰ : NormedAddCommGroup F''\ninst✝⁹ : NormedSpace ℝ F''\ninst✝⁸ : NormedSpace 𝕜 F''\ninst✝⁷ : CompleteSpace F''\nk : G → E''\nL₂ : F →L[𝕜] E'' →L[𝕜] F'\nL₃ : E →L[𝕜] F'' →L[𝕜] F'\nL₄ : E' →L[𝕜] E'' →L[𝕜] F''\ninst✝⁶ : AddGroup G\ninst✝⁵ : SigmaFinite μ\ninst✝⁴ : SigmaFinite ν\ninst✝³ : IsAddRightInvariant μ\ninst✝² : MeasurableAdd₂ G\ninst✝¹ : IsAddRightInvariant ν\ninst✝ : MeasurableNeg G\nhL : ∀ (x : E) (y : E') (z : E''), ↑(↑L₂ (↑(↑L x) y)) z = ↑(↑L₃ x) (↑(↑L₄ y) z)\nx₀ : G\nhf : AEStronglyMeasurable f ν\nhg : AEStronglyMeasurable g μ\nhk : AEStronglyMeasurable k μ\nhfg : ∀ᵐ (y : G) ∂μ, ConvolutionExistsAt f g y L\nhgk : ∀ᵐ (x : G) ∂ν, ConvolutionExistsAt (fun x => ‖g x‖) (fun x => ‖k x‖) x (mul ℝ ℝ)\nhfgk : ConvolutionExistsAt (fun x => ‖f x‖) (convolution (fun x => ‖g x‖) (fun x => ‖k x‖) (mul ℝ ℝ)) x₀ (mul ℝ ℝ)\ny : G\n⊢ QuasiMeasurePreserving fun x => x₀ - y - x\n[PROOFSTEP]\nexact quasiMeasurePreserving_sub_left_of_right_invariant μ _\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝²⁶ : NormedAddCommGroup E\ninst✝²⁵ : NormedAddCommGroup E'\ninst✝²⁴ : NormedAddCommGroup E''\ninst✝²³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝²² : IsROrC 𝕜\ninst✝²¹ : NormedSpace 𝕜 E\ninst✝²⁰ : NormedSpace 𝕜 E'\ninst✝¹⁹ : NormedSpace 𝕜 E''\ninst✝¹⁸ : NormedSpace ℝ F\ninst✝¹⁷ : NormedSpace 𝕜 F\nn : ℕ∞\ninst✝¹⁶ : CompleteSpace F\ninst✝¹⁵ : MeasurableSpace G\nμ ν : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝¹⁴ : NormedAddCommGroup F'\ninst✝¹³ : NormedSpace ℝ F'\ninst✝¹² : NormedSpace 𝕜 F'\ninst✝¹¹ : CompleteSpace F'\ninst✝¹⁰ : NormedAddCommGroup F''\ninst✝⁹ : NormedSpace ℝ F''\ninst✝⁸ : NormedSpace 𝕜 F''\ninst✝⁷ : CompleteSpace F''\nk : G → E''\nL₂ : F →L[𝕜] E'' →L[𝕜] F'\nL₃ : E →L[𝕜] F'' →L[𝕜] F'\nL₄ : E' →L[𝕜] E'' →L[𝕜] F''\ninst✝⁶ : AddGroup G\ninst✝⁵ : SigmaFinite μ\ninst✝⁴ : SigmaFinite ν\ninst✝³ : IsAddRightInvariant μ\ninst✝² : MeasurableAdd₂ G\ninst✝¹ : IsAddRightInvariant ν\ninst✝ : MeasurableNeg G\nhL : ∀ (x : E) (y : E') (z : E''), ↑(↑L₂ (↑(↑L x) y)) z = ↑(↑L₃ x) (↑(↑L₄ y) z)\nx₀ : G\nhf : AEStronglyMeasurable f ν\nhg : AEStronglyMeasurable g μ\nhk : AEStronglyMeasurable k μ\nhfg : ∀ᵐ (y : G) ∂μ, ConvolutionExistsAt f g y L\nhgk : ∀ᵐ (x : G) ∂ν, ConvolutionExistsAt (fun x => ‖g x‖) (fun x => ‖k x‖) x (mul ℝ ℝ)\nhfgk : ConvolutionExistsAt (fun x => ‖f x‖) (convolution (fun x => ‖g x‖) (fun x => ‖k x‖) (mul ℝ ℝ)) x₀ (mul ℝ ℝ)\nh_meas : AEStronglyMeasurable (uncurry fun x y => ↑(↑L₃ (f y)) (↑(↑L₄ (g x)) (k (x₀ - y - x)))) (Measure.prod μ ν)\n⊢ Integrable (uncurry fun x y => ↑(↑L₃ (f y)) (↑(↑L₄ (g (x - y))) (k (x₀ - x))))\n[PROOFSTEP]\nhave h2_meas : AEStronglyMeasurable (fun y => ∫ x, ‖L₃ (f y) (L₄ (g x) (k (x₀ - y - x)))‖ ∂μ) ν :=\n  h_meas.prod_swap.norm.integral_prod_right'\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝²⁶ : NormedAddCommGroup E\ninst✝²⁵ : NormedAddCommGroup E'\ninst✝²⁴ : NormedAddCommGroup E''\ninst✝²³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝²² : IsROrC 𝕜\ninst✝²¹ : NormedSpace 𝕜 E\ninst✝²⁰ : NormedSpace 𝕜 E'\ninst✝¹⁹ : NormedSpace 𝕜 E''\ninst✝¹⁸ : NormedSpace ℝ F\ninst✝¹⁷ : NormedSpace 𝕜 F\nn : ℕ∞\ninst✝¹⁶ : CompleteSpace F\ninst✝¹⁵ : MeasurableSpace G\nμ ν : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝¹⁴ : NormedAddCommGroup F'\ninst✝¹³ : NormedSpace ℝ F'\ninst✝¹² : NormedSpace 𝕜 F'\ninst✝¹¹ : CompleteSpace F'\ninst✝¹⁰ : NormedAddCommGroup F''\ninst✝⁹ : NormedSpace ℝ F''\ninst✝⁸ : NormedSpace 𝕜 F''\ninst✝⁷ : CompleteSpace F''\nk : G → E''\nL₂ : F →L[𝕜] E'' →L[𝕜] F'\nL₃ : E →L[𝕜] F'' →L[𝕜] F'\nL₄ : E' →L[𝕜] E'' →L[𝕜] F''\ninst✝⁶ : AddGroup G\ninst✝⁵ : SigmaFinite μ\ninst✝⁴ : SigmaFinite ν\ninst✝³ : IsAddRightInvariant μ\ninst✝² : MeasurableAdd₂ G\ninst✝¹ : IsAddRightInvariant ν\ninst✝ : MeasurableNeg G\nhL : ∀ (x : E) (y : E') (z : E''), ↑(↑L₂ (↑(↑L x) y)) z = ↑(↑L₃ x) (↑(↑L₄ y) z)\nx₀ : G\nhf : AEStronglyMeasurable f ν\nhg : AEStronglyMeasurable g μ\nhk : AEStronglyMeasurable k μ\nhfg : ∀ᵐ (y : G) ∂μ, ConvolutionExistsAt f g y L\nhgk : ∀ᵐ (x : G) ∂ν, ConvolutionExistsAt (fun x => ‖g x‖) (fun x => ‖k x‖) x (mul ℝ ℝ)\nhfgk : ConvolutionExistsAt (fun x => ‖f x‖) (convolution (fun x => ‖g x‖) (fun x => ‖k x‖) (mul ℝ ℝ)) x₀ (mul ℝ ℝ)\nh_meas : AEStronglyMeasurable (uncurry fun x y => ↑(↑L₃ (f y)) (↑(↑L₄ (g x)) (k (x₀ - y - x)))) (Measure.prod μ ν)\nh2_meas : AEStronglyMeasurable (fun y => ∫ (x : G), ‖↑(↑L₃ (f y)) (↑(↑L₄ (g x)) (k (x₀ - y - x)))‖ ∂μ) ν\n⊢ Integrable (uncurry fun x y => ↑(↑L₃ (f y)) (↑(↑L₄ (g (x - y))) (k (x₀ - x))))\n[PROOFSTEP]\nhave h3 : map (fun z : G × G => (z.1 - z.2, z.2)) (μ.prod ν) = μ.prod ν := (measurePreserving_sub_prod μ ν).map_eq\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝²⁶ : NormedAddCommGroup E\ninst✝²⁵ : NormedAddCommGroup E'\ninst✝²⁴ : NormedAddCommGroup E''\ninst✝²³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝²² : IsROrC 𝕜\ninst✝²¹ : NormedSpace 𝕜 E\ninst✝²⁰ : NormedSpace 𝕜 E'\ninst✝¹⁹ : NormedSpace 𝕜 E''\ninst✝¹⁸ : NormedSpace ℝ F\ninst✝¹⁷ : NormedSpace 𝕜 F\nn : ℕ∞\ninst✝¹⁶ : CompleteSpace F\ninst✝¹⁵ : MeasurableSpace G\nμ ν : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝¹⁴ : NormedAddCommGroup F'\ninst✝¹³ : NormedSpace ℝ F'\ninst✝¹² : NormedSpace 𝕜 F'\ninst✝¹¹ : CompleteSpace F'\ninst✝¹⁰ : NormedAddCommGroup F''\ninst✝⁹ : NormedSpace ℝ F''\ninst✝⁸ : NormedSpace 𝕜 F''\ninst✝⁷ : CompleteSpace F''\nk : G → E''\nL₂ : F →L[𝕜] E'' →L[𝕜] F'\nL₃ : E →L[𝕜] F'' →L[𝕜] F'\nL₄ : E' →L[𝕜] E'' →L[𝕜] F''\ninst✝⁶ : AddGroup G\ninst✝⁵ : SigmaFinite μ\ninst✝⁴ : SigmaFinite ν\ninst✝³ : IsAddRightInvariant μ\ninst✝² : MeasurableAdd₂ G\ninst✝¹ : IsAddRightInvariant ν\ninst✝ : MeasurableNeg G\nhL : ∀ (x : E) (y : E') (z : E''), ↑(↑L₂ (↑(↑L x) y)) z = ↑(↑L₃ x) (↑(↑L₄ y) z)\nx₀ : G\nhf : AEStronglyMeasurable f ν\nhg : AEStronglyMeasurable g μ\nhk : AEStronglyMeasurable k μ\nhfg : ∀ᵐ (y : G) ∂μ, ConvolutionExistsAt f g y L\nhgk : ∀ᵐ (x : G) ∂ν, ConvolutionExistsAt (fun x => ‖g x‖) (fun x => ‖k x‖) x (mul ℝ ℝ)\nhfgk : ConvolutionExistsAt (fun x => ‖f x‖) (convolution (fun x => ‖g x‖) (fun x => ‖k x‖) (mul ℝ ℝ)) x₀ (mul ℝ ℝ)\nh_meas : AEStronglyMeasurable (uncurry fun x y => ↑(↑L₃ (f y)) (↑(↑L₄ (g x)) (k (x₀ - y - x)))) (Measure.prod μ ν)\nh2_meas : AEStronglyMeasurable (fun y => ∫ (x : G), ‖↑(↑L₃ (f y)) (↑(↑L₄ (g x)) (k (x₀ - y - x)))‖ ∂μ) ν\nh3 : Measure.map (fun z => (z.fst - z.snd, z.snd)) (Measure.prod μ ν) = Measure.prod μ ν\n⊢ Integrable (uncurry fun x y => ↑(↑L₃ (f y)) (↑(↑L₄ (g (x - y))) (k (x₀ - x))))\n[PROOFSTEP]\nsuffices Integrable (uncurry fun x y => L₃ (f y) (L₄ (g x) (k (x₀ - y - x)))) (μ.prod ν)\n  by\n  rw [← h3] at this \n  convert this.comp_measurable (measurable_sub.prod_mk measurable_snd)\n  ext ⟨x, y⟩\n  simp_rw [uncurry, Function.comp_apply, sub_sub_sub_cancel_right]\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝²⁶ : NormedAddCommGroup E\ninst✝²⁵ : NormedAddCommGroup E'\ninst✝²⁴ : NormedAddCommGroup E''\ninst✝²³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝²² : IsROrC 𝕜\ninst✝²¹ : NormedSpace 𝕜 E\ninst✝²⁰ : NormedSpace 𝕜 E'\ninst✝¹⁹ : NormedSpace 𝕜 E''\ninst✝¹⁸ : NormedSpace ℝ F\ninst✝¹⁷ : NormedSpace 𝕜 F\nn : ℕ∞\ninst✝¹⁶ : CompleteSpace F\ninst✝¹⁵ : MeasurableSpace G\nμ ν : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝¹⁴ : NormedAddCommGroup F'\ninst✝¹³ : NormedSpace ℝ F'\ninst✝¹² : NormedSpace 𝕜 F'\ninst✝¹¹ : CompleteSpace F'\ninst✝¹⁰ : NormedAddCommGroup F''\ninst✝⁹ : NormedSpace ℝ F''\ninst✝⁸ : NormedSpace 𝕜 F''\ninst✝⁷ : CompleteSpace F''\nk : G → E''\nL₂ : F →L[𝕜] E'' →L[𝕜] F'\nL₃ : E →L[𝕜] F'' →L[𝕜] F'\nL₄ : E' →L[𝕜] E'' →L[𝕜] F''\ninst✝⁶ : AddGroup G\ninst✝⁵ : SigmaFinite μ\ninst✝⁴ : SigmaFinite ν\ninst✝³ : IsAddRightInvariant μ\ninst✝² : MeasurableAdd₂ G\ninst✝¹ : IsAddRightInvariant ν\ninst✝ : MeasurableNeg G\nhL : ∀ (x : E) (y : E') (z : E''), ↑(↑L₂ (↑(↑L x) y)) z = ↑(↑L₃ x) (↑(↑L₄ y) z)\nx₀ : G\nhf : AEStronglyMeasurable f ν\nhg : AEStronglyMeasurable g μ\nhk : AEStronglyMeasurable k μ\nhfg : ∀ᵐ (y : G) ∂μ, ConvolutionExistsAt f g y L\nhgk : ∀ᵐ (x : G) ∂ν, ConvolutionExistsAt (fun x => ‖g x‖) (fun x => ‖k x‖) x (mul ℝ ℝ)\nhfgk : ConvolutionExistsAt (fun x => ‖f x‖) (convolution (fun x => ‖g x‖) (fun x => ‖k x‖) (mul ℝ ℝ)) x₀ (mul ℝ ℝ)\nh_meas : AEStronglyMeasurable (uncurry fun x y => ↑(↑L₃ (f y)) (↑(↑L₄ (g x)) (k (x₀ - y - x)))) (Measure.prod μ ν)\nh2_meas : AEStronglyMeasurable (fun y => ∫ (x : G), ‖↑(↑L₃ (f y)) (↑(↑L₄ (g x)) (k (x₀ - y - x)))‖ ∂μ) ν\nh3 : Measure.map (fun z => (z.fst - z.snd, z.snd)) (Measure.prod μ ν) = Measure.prod μ ν\nthis : Integrable (uncurry fun x y => ↑(↑L₃ (f y)) (↑(↑L₄ (g x)) (k (x₀ - y - x))))\n⊢ Integrable (uncurry fun x y => ↑(↑L₃ (f y)) (↑(↑L₄ (g (x - y))) (k (x₀ - x))))\n[PROOFSTEP]\nrw [← h3] at this \n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝²⁶ : NormedAddCommGroup E\ninst✝²⁵ : NormedAddCommGroup E'\ninst✝²⁴ : NormedAddCommGroup E''\ninst✝²³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝²² : IsROrC 𝕜\ninst✝²¹ : NormedSpace 𝕜 E\ninst✝²⁰ : NormedSpace 𝕜 E'\ninst✝¹⁹ : NormedSpace 𝕜 E''\ninst✝¹⁸ : NormedSpace ℝ F\ninst✝¹⁷ : NormedSpace 𝕜 F\nn : ℕ∞\ninst✝¹⁶ : CompleteSpace F\ninst✝¹⁵ : MeasurableSpace G\nμ ν : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝¹⁴ : NormedAddCommGroup F'\ninst✝¹³ : NormedSpace ℝ F'\ninst✝¹² : NormedSpace 𝕜 F'\ninst✝¹¹ : CompleteSpace F'\ninst✝¹⁰ : NormedAddCommGroup F''\ninst✝⁹ : NormedSpace ℝ F''\ninst✝⁸ : NormedSpace 𝕜 F''\ninst✝⁷ : CompleteSpace F''\nk : G → E''\nL₂ : F →L[𝕜] E'' →L[𝕜] F'\nL₃ : E →L[𝕜] F'' →L[𝕜] F'\nL₄ : E' →L[𝕜] E'' →L[𝕜] F''\ninst✝⁶ : AddGroup G\ninst✝⁵ : SigmaFinite μ\ninst✝⁴ : SigmaFinite ν\ninst✝³ : IsAddRightInvariant μ\ninst✝² : MeasurableAdd₂ G\ninst✝¹ : IsAddRightInvariant ν\ninst✝ : MeasurableNeg G\nhL : ∀ (x : E) (y : E') (z : E''), ↑(↑L₂ (↑(↑L x) y)) z = ↑(↑L₃ x) (↑(↑L₄ y) z)\nx₀ : G\nhf : AEStronglyMeasurable f ν\nhg : AEStronglyMeasurable g μ\nhk : AEStronglyMeasurable k μ\nhfg : ∀ᵐ (y : G) ∂μ, ConvolutionExistsAt f g y L\nhgk : ∀ᵐ (x : G) ∂ν, ConvolutionExistsAt (fun x => ‖g x‖) (fun x => ‖k x‖) x (mul ℝ ℝ)\nhfgk : ConvolutionExistsAt (fun x => ‖f x‖) (convolution (fun x => ‖g x‖) (fun x => ‖k x‖) (mul ℝ ℝ)) x₀ (mul ℝ ℝ)\nh_meas : AEStronglyMeasurable (uncurry fun x y => ↑(↑L₃ (f y)) (↑(↑L₄ (g x)) (k (x₀ - y - x)))) (Measure.prod μ ν)\nh2_meas : AEStronglyMeasurable (fun y => ∫ (x : G), ‖↑(↑L₃ (f y)) (↑(↑L₄ (g x)) (k (x₀ - y - x)))‖ ∂μ) ν\nh3 : Measure.map (fun z => (z.fst - z.snd, z.snd)) (Measure.prod μ ν) = Measure.prod μ ν\nthis : Integrable (uncurry fun x y => ↑(↑L₃ (f y)) (↑(↑L₄ (g x)) (k (x₀ - y - x))))\n⊢ Integrable (uncurry fun x y => ↑(↑L₃ (f y)) (↑(↑L₄ (g (x - y))) (k (x₀ - x))))\n[PROOFSTEP]\nconvert this.comp_measurable (measurable_sub.prod_mk measurable_snd)\n[GOAL]\ncase h.e'_5\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝²⁶ : NormedAddCommGroup E\ninst✝²⁵ : NormedAddCommGroup E'\ninst✝²⁴ : NormedAddCommGroup E''\ninst✝²³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝²² : IsROrC 𝕜\ninst✝²¹ : NormedSpace 𝕜 E\ninst✝²⁰ : NormedSpace 𝕜 E'\ninst✝¹⁹ : NormedSpace 𝕜 E''\ninst✝¹⁸ : NormedSpace ℝ F\ninst✝¹⁷ : NormedSpace 𝕜 F\nn : ℕ∞\ninst✝¹⁶ : CompleteSpace F\ninst✝¹⁵ : MeasurableSpace G\nμ ν : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝¹⁴ : NormedAddCommGroup F'\ninst✝¹³ : NormedSpace ℝ F'\ninst✝¹² : NormedSpace 𝕜 F'\ninst✝¹¹ : CompleteSpace F'\ninst✝¹⁰ : NormedAddCommGroup F''\ninst✝⁹ : NormedSpace ℝ F''\ninst✝⁸ : NormedSpace 𝕜 F''\ninst✝⁷ : CompleteSpace F''\nk : G → E''\nL₂ : F →L[𝕜] E'' →L[𝕜] F'\nL₃ : E →L[𝕜] F'' →L[𝕜] F'\nL₄ : E' →L[𝕜] E'' →L[𝕜] F''\ninst✝⁶ : AddGroup G\ninst✝⁵ : SigmaFinite μ\ninst✝⁴ : SigmaFinite ν\ninst✝³ : IsAddRightInvariant μ\ninst✝² : MeasurableAdd₂ G\ninst✝¹ : IsAddRightInvariant ν\ninst✝ : MeasurableNeg G\nhL : ∀ (x : E) (y : E') (z : E''), ↑(↑L₂ (↑(↑L x) y)) z = ↑(↑L₃ x) (↑(↑L₄ y) z)\nx₀ : G\nhf : AEStronglyMeasurable f ν\nhg : AEStronglyMeasurable g μ\nhk : AEStronglyMeasurable k μ\nhfg : ∀ᵐ (y : G) ∂μ, ConvolutionExistsAt f g y L\nhgk : ∀ᵐ (x : G) ∂ν, ConvolutionExistsAt (fun x => ‖g x‖) (fun x => ‖k x‖) x (mul ℝ ℝ)\nhfgk : ConvolutionExistsAt (fun x => ‖f x‖) (convolution (fun x => ‖g x‖) (fun x => ‖k x‖) (mul ℝ ℝ)) x₀ (mul ℝ ℝ)\nh_meas : AEStronglyMeasurable (uncurry fun x y => ↑(↑L₃ (f y)) (↑(↑L₄ (g x)) (k (x₀ - y - x)))) (Measure.prod μ ν)\nh2_meas : AEStronglyMeasurable (fun y => ∫ (x : G), ‖↑(↑L₃ (f y)) (↑(↑L₄ (g x)) (k (x₀ - y - x)))‖ ∂μ) ν\nh3 : Measure.map (fun z => (z.fst - z.snd, z.snd)) (Measure.prod μ ν) = Measure.prod μ ν\nthis : Integrable (uncurry fun x y => ↑(↑L₃ (f y)) (↑(↑L₄ (g x)) (k (x₀ - y - x))))\n⊢ (uncurry fun x y => ↑(↑L₃ (f y)) (↑(↑L₄ (g (x - y))) (k (x₀ - x)))) =\n    (uncurry fun x y => ↑(↑L₃ (f y)) (↑(↑L₄ (g x)) (k (x₀ - y - x)))) ∘ fun z => (z.fst - z.snd, z.snd)\n[PROOFSTEP]\next ⟨x, y⟩\n[GOAL]\ncase h.e'_5.h.mk\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝²⁶ : NormedAddCommGroup E\ninst✝²⁵ : NormedAddCommGroup E'\ninst✝²⁴ : NormedAddCommGroup E''\ninst✝²³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx✝ x' : G\ny✝ y' : E\ninst✝²² : IsROrC 𝕜\ninst✝²¹ : NormedSpace 𝕜 E\ninst✝²⁰ : NormedSpace 𝕜 E'\ninst✝¹⁹ : NormedSpace 𝕜 E''\ninst✝¹⁸ : NormedSpace ℝ F\ninst✝¹⁷ : NormedSpace 𝕜 F\nn : ℕ∞\ninst✝¹⁶ : CompleteSpace F\ninst✝¹⁵ : MeasurableSpace G\nμ ν : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝¹⁴ : NormedAddCommGroup F'\ninst✝¹³ : NormedSpace ℝ F'\ninst✝¹² : NormedSpace 𝕜 F'\ninst✝¹¹ : CompleteSpace F'\ninst✝¹⁰ : NormedAddCommGroup F''\ninst✝⁹ : NormedSpace ℝ F''\ninst✝⁸ : NormedSpace 𝕜 F''\ninst✝⁷ : CompleteSpace F''\nk : G → E''\nL₂ : F →L[𝕜] E'' →L[𝕜] F'\nL₃ : E →L[𝕜] F'' →L[𝕜] F'\nL₄ : E' →L[𝕜] E'' →L[𝕜] F''\ninst✝⁶ : AddGroup G\ninst✝⁵ : SigmaFinite μ\ninst✝⁴ : SigmaFinite ν\ninst✝³ : IsAddRightInvariant μ\ninst✝² : MeasurableAdd₂ G\ninst✝¹ : IsAddRightInvariant ν\ninst✝ : MeasurableNeg G\nhL : ∀ (x : E) (y : E') (z : E''), ↑(↑L₂ (↑(↑L x) y)) z = ↑(↑L₃ x) (↑(↑L₄ y) z)\nx₀ : G\nhf : AEStronglyMeasurable f ν\nhg : AEStronglyMeasurable g μ\nhk : AEStronglyMeasurable k μ\nhfg : ∀ᵐ (y : G) ∂μ, ConvolutionExistsAt f g y L\nhgk : ∀ᵐ (x : G) ∂ν, ConvolutionExistsAt (fun x => ‖g x‖) (fun x => ‖k x‖) x (mul ℝ ℝ)\nhfgk : ConvolutionExistsAt (fun x => ‖f x‖) (convolution (fun x => ‖g x‖) (fun x => ‖k x‖) (mul ℝ ℝ)) x₀ (mul ℝ ℝ)\nh_meas : AEStronglyMeasurable (uncurry fun x y => ↑(↑L₃ (f y)) (↑(↑L₄ (g x)) (k (x₀ - y - x)))) (Measure.prod μ ν)\nh2_meas : AEStronglyMeasurable (fun y => ∫ (x : G), ‖↑(↑L₃ (f y)) (↑(↑L₄ (g x)) (k (x₀ - y - x)))‖ ∂μ) ν\nh3 : Measure.map (fun z => (z.fst - z.snd, z.snd)) (Measure.prod μ ν) = Measure.prod μ ν\nthis : Integrable (uncurry fun x y => ↑(↑L₃ (f y)) (↑(↑L₄ (g x)) (k (x₀ - y - x))))\nx y : G\n⊢ uncurry (fun x y => ↑(↑L₃ (f y)) (↑(↑L₄ (g (x - y))) (k (x₀ - x)))) (x, y) =\n    ((uncurry fun x y => ↑(↑L₃ (f y)) (↑(↑L₄ (g x)) (k (x₀ - y - x)))) ∘ fun z => (z.fst - z.snd, z.snd)) (x, y)\n[PROOFSTEP]\nsimp_rw [uncurry, Function.comp_apply, sub_sub_sub_cancel_right]\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝²⁶ : NormedAddCommGroup E\ninst✝²⁵ : NormedAddCommGroup E'\ninst✝²⁴ : NormedAddCommGroup E''\ninst✝²³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝²² : IsROrC 𝕜\ninst✝²¹ : NormedSpace 𝕜 E\ninst✝²⁰ : NormedSpace 𝕜 E'\ninst✝¹⁹ : NormedSpace 𝕜 E''\ninst✝¹⁸ : NormedSpace ℝ F\ninst✝¹⁷ : NormedSpace 𝕜 F\nn : ℕ∞\ninst✝¹⁶ : CompleteSpace F\ninst✝¹⁵ : MeasurableSpace G\nμ ν : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝¹⁴ : NormedAddCommGroup F'\ninst✝¹³ : NormedSpace ℝ F'\ninst✝¹² : NormedSpace 𝕜 F'\ninst✝¹¹ : CompleteSpace F'\ninst✝¹⁰ : NormedAddCommGroup F''\ninst✝⁹ : NormedSpace ℝ F''\ninst✝⁸ : NormedSpace 𝕜 F''\ninst✝⁷ : CompleteSpace F''\nk : G → E''\nL₂ : F →L[𝕜] E'' →L[𝕜] F'\nL₃ : E →L[𝕜] F'' →L[𝕜] F'\nL₄ : E' →L[𝕜] E'' →L[𝕜] F''\ninst✝⁶ : AddGroup G\ninst✝⁵ : SigmaFinite μ\ninst✝⁴ : SigmaFinite ν\ninst✝³ : IsAddRightInvariant μ\ninst✝² : MeasurableAdd₂ G\ninst✝¹ : IsAddRightInvariant ν\ninst✝ : MeasurableNeg G\nhL : ∀ (x : E) (y : E') (z : E''), ↑(↑L₂ (↑(↑L x) y)) z = ↑(↑L₃ x) (↑(↑L₄ y) z)\nx₀ : G\nhf : AEStronglyMeasurable f ν\nhg : AEStronglyMeasurable g μ\nhk : AEStronglyMeasurable k μ\nhfg : ∀ᵐ (y : G) ∂μ, ConvolutionExistsAt f g y L\nhgk : ∀ᵐ (x : G) ∂ν, ConvolutionExistsAt (fun x => ‖g x‖) (fun x => ‖k x‖) x (mul ℝ ℝ)\nhfgk : ConvolutionExistsAt (fun x => ‖f x‖) (convolution (fun x => ‖g x‖) (fun x => ‖k x‖) (mul ℝ ℝ)) x₀ (mul ℝ ℝ)\nh_meas : AEStronglyMeasurable (uncurry fun x y => ↑(↑L₃ (f y)) (↑(↑L₄ (g x)) (k (x₀ - y - x)))) (Measure.prod μ ν)\nh2_meas : AEStronglyMeasurable (fun y => ∫ (x : G), ‖↑(↑L₃ (f y)) (↑(↑L₄ (g x)) (k (x₀ - y - x)))‖ ∂μ) ν\nh3 : Measure.map (fun z => (z.fst - z.snd, z.snd)) (Measure.prod μ ν) = Measure.prod μ ν\n⊢ Integrable (uncurry fun x y => ↑(↑L₃ (f y)) (↑(↑L₄ (g x)) (k (x₀ - y - x))))\n[PROOFSTEP]\nsimp_rw [integrable_prod_iff' h_meas]\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝²⁶ : NormedAddCommGroup E\ninst✝²⁵ : NormedAddCommGroup E'\ninst✝²⁴ : NormedAddCommGroup E''\ninst✝²³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝²² : IsROrC 𝕜\ninst✝²¹ : NormedSpace 𝕜 E\ninst✝²⁰ : NormedSpace 𝕜 E'\ninst✝¹⁹ : NormedSpace 𝕜 E''\ninst✝¹⁸ : NormedSpace ℝ F\ninst✝¹⁷ : NormedSpace 𝕜 F\nn : ℕ∞\ninst✝¹⁶ : CompleteSpace F\ninst✝¹⁵ : MeasurableSpace G\nμ ν : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝¹⁴ : NormedAddCommGroup F'\ninst✝¹³ : NormedSpace ℝ F'\ninst✝¹² : NormedSpace 𝕜 F'\ninst✝¹¹ : CompleteSpace F'\ninst✝¹⁰ : NormedAddCommGroup F''\ninst✝⁹ : NormedSpace ℝ F''\ninst✝⁸ : NormedSpace 𝕜 F''\ninst✝⁷ : CompleteSpace F''\nk : G → E''\nL₂ : F →L[𝕜] E'' →L[𝕜] F'\nL₃ : E →L[𝕜] F'' →L[𝕜] F'\nL₄ : E' →L[𝕜] E'' →L[𝕜] F''\ninst✝⁶ : AddGroup G\ninst✝⁵ : SigmaFinite μ\ninst✝⁴ : SigmaFinite ν\ninst✝³ : IsAddRightInvariant μ\ninst✝² : MeasurableAdd₂ G\ninst✝¹ : IsAddRightInvariant ν\ninst✝ : MeasurableNeg G\nhL : ∀ (x : E) (y : E') (z : E''), ↑(↑L₂ (↑(↑L x) y)) z = ↑(↑L₃ x) (↑(↑L₄ y) z)\nx₀ : G\nhf : AEStronglyMeasurable f ν\nhg : AEStronglyMeasurable g μ\nhk : AEStronglyMeasurable k μ\nhfg : ∀ᵐ (y : G) ∂μ, ConvolutionExistsAt f g y L\nhgk : ∀ᵐ (x : G) ∂ν, ConvolutionExistsAt (fun x => ‖g x‖) (fun x => ‖k x‖) x (mul ℝ ℝ)\nhfgk : ConvolutionExistsAt (fun x => ‖f x‖) (convolution (fun x => ‖g x‖) (fun x => ‖k x‖) (mul ℝ ℝ)) x₀ (mul ℝ ℝ)\nh_meas : AEStronglyMeasurable (uncurry fun x y => ↑(↑L₃ (f y)) (↑(↑L₄ (g x)) (k (x₀ - y - x)))) (Measure.prod μ ν)\nh2_meas : AEStronglyMeasurable (fun y => ∫ (x : G), ‖↑(↑L₃ (f y)) (↑(↑L₄ (g x)) (k (x₀ - y - x)))‖ ∂μ) ν\nh3 : Measure.map (fun z => (z.fst - z.snd, z.snd)) (Measure.prod μ ν) = Measure.prod μ ν\n⊢ (∀ᵐ (y : G) ∂ν, Integrable fun x => uncurry (fun x y => ↑(↑L₃ (f y)) (↑(↑L₄ (g x)) (k (x₀ - y - x)))) (x, y)) ∧\n    Integrable fun y => ∫ (x : G), ‖uncurry (fun x y => ↑(↑L₃ (f y)) (↑(↑L₄ (g x)) (k (x₀ - y - x)))) (x, y)‖ ∂μ\n[PROOFSTEP]\nrefine'\n  ⟨((quasiMeasurePreserving_sub_left_of_right_invariant ν x₀).ae hgk).mono fun t ht =>\n      (L₃ (f t)).integrable_comp <| ht.ofNorm L₄ hg hk,\n    _⟩\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝²⁶ : NormedAddCommGroup E\ninst✝²⁵ : NormedAddCommGroup E'\ninst✝²⁴ : NormedAddCommGroup E''\ninst✝²³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝²² : IsROrC 𝕜\ninst✝²¹ : NormedSpace 𝕜 E\ninst✝²⁰ : NormedSpace 𝕜 E'\ninst✝¹⁹ : NormedSpace 𝕜 E''\ninst✝¹⁸ : NormedSpace ℝ F\ninst✝¹⁷ : NormedSpace 𝕜 F\nn : ℕ∞\ninst✝¹⁶ : CompleteSpace F\ninst✝¹⁵ : MeasurableSpace G\nμ ν : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝¹⁴ : NormedAddCommGroup F'\ninst✝¹³ : NormedSpace ℝ F'\ninst✝¹² : NormedSpace 𝕜 F'\ninst✝¹¹ : CompleteSpace F'\ninst✝¹⁰ : NormedAddCommGroup F''\ninst✝⁹ : NormedSpace ℝ F''\ninst✝⁸ : NormedSpace 𝕜 F''\ninst✝⁷ : CompleteSpace F''\nk : G → E''\nL₂ : F →L[𝕜] E'' →L[𝕜] F'\nL₃ : E →L[𝕜] F'' →L[𝕜] F'\nL₄ : E' →L[𝕜] E'' →L[𝕜] F''\ninst✝⁶ : AddGroup G\ninst✝⁵ : SigmaFinite μ\ninst✝⁴ : SigmaFinite ν\ninst✝³ : IsAddRightInvariant μ\ninst✝² : MeasurableAdd₂ G\ninst✝¹ : IsAddRightInvariant ν\ninst✝ : MeasurableNeg G\nhL : ∀ (x : E) (y : E') (z : E''), ↑(↑L₂ (↑(↑L x) y)) z = ↑(↑L₃ x) (↑(↑L₄ y) z)\nx₀ : G\nhf : AEStronglyMeasurable f ν\nhg : AEStronglyMeasurable g μ\nhk : AEStronglyMeasurable k μ\nhfg : ∀ᵐ (y : G) ∂μ, ConvolutionExistsAt f g y L\nhgk : ∀ᵐ (x : G) ∂ν, ConvolutionExistsAt (fun x => ‖g x‖) (fun x => ‖k x‖) x (mul ℝ ℝ)\nhfgk : ConvolutionExistsAt (fun x => ‖f x‖) (convolution (fun x => ‖g x‖) (fun x => ‖k x‖) (mul ℝ ℝ)) x₀ (mul ℝ ℝ)\nh_meas : AEStronglyMeasurable (uncurry fun x y => ↑(↑L₃ (f y)) (↑(↑L₄ (g x)) (k (x₀ - y - x)))) (Measure.prod μ ν)\nh2_meas : AEStronglyMeasurable (fun y => ∫ (x : G), ‖↑(↑L₃ (f y)) (↑(↑L₄ (g x)) (k (x₀ - y - x)))‖ ∂μ) ν\nh3 : Measure.map (fun z => (z.fst - z.snd, z.snd)) (Measure.prod μ ν) = Measure.prod μ ν\n⊢ Integrable fun y => ∫ (x : G), ‖uncurry (fun x y => ↑(↑L₃ (f y)) (↑(↑L₄ (g x)) (k (x₀ - y - x)))) (x, y)‖ ∂μ\n[PROOFSTEP]\nrefine'\n  (hfgk.const_mul (‖L₃‖ * ‖L₄‖)).mono' h2_meas\n    (((quasiMeasurePreserving_sub_left_of_right_invariant ν x₀).ae hgk).mono fun t ht => _)\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝²⁶ : NormedAddCommGroup E\ninst✝²⁵ : NormedAddCommGroup E'\ninst✝²⁴ : NormedAddCommGroup E''\ninst✝²³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝²² : IsROrC 𝕜\ninst✝²¹ : NormedSpace 𝕜 E\ninst✝²⁰ : NormedSpace 𝕜 E'\ninst✝¹⁹ : NormedSpace 𝕜 E''\ninst✝¹⁸ : NormedSpace ℝ F\ninst✝¹⁷ : NormedSpace 𝕜 F\nn : ℕ∞\ninst✝¹⁶ : CompleteSpace F\ninst✝¹⁵ : MeasurableSpace G\nμ ν : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝¹⁴ : NormedAddCommGroup F'\ninst✝¹³ : NormedSpace ℝ F'\ninst✝¹² : NormedSpace 𝕜 F'\ninst✝¹¹ : CompleteSpace F'\ninst✝¹⁰ : NormedAddCommGroup F''\ninst✝⁹ : NormedSpace ℝ F''\ninst✝⁸ : NormedSpace 𝕜 F''\ninst✝⁷ : CompleteSpace F''\nk : G → E''\nL₂ : F →L[𝕜] E'' →L[𝕜] F'\nL₃ : E →L[𝕜] F'' →L[𝕜] F'\nL₄ : E' →L[𝕜] E'' →L[𝕜] F''\ninst✝⁶ : AddGroup G\ninst✝⁵ : SigmaFinite μ\ninst✝⁴ : SigmaFinite ν\ninst✝³ : IsAddRightInvariant μ\ninst✝² : MeasurableAdd₂ G\ninst✝¹ : IsAddRightInvariant ν\ninst✝ : MeasurableNeg G\nhL : ∀ (x : E) (y : E') (z : E''), ↑(↑L₂ (↑(↑L x) y)) z = ↑(↑L₃ x) (↑(↑L₄ y) z)\nx₀ : G\nhf : AEStronglyMeasurable f ν\nhg : AEStronglyMeasurable g μ\nhk : AEStronglyMeasurable k μ\nhfg : ∀ᵐ (y : G) ∂μ, ConvolutionExistsAt f g y L\nhgk : ∀ᵐ (x : G) ∂ν, ConvolutionExistsAt (fun x => ‖g x‖) (fun x => ‖k x‖) x (mul ℝ ℝ)\nhfgk : ConvolutionExistsAt (fun x => ‖f x‖) (convolution (fun x => ‖g x‖) (fun x => ‖k x‖) (mul ℝ ℝ)) x₀ (mul ℝ ℝ)\nh_meas : AEStronglyMeasurable (uncurry fun x y => ↑(↑L₃ (f y)) (↑(↑L₄ (g x)) (k (x₀ - y - x)))) (Measure.prod μ ν)\nh2_meas : AEStronglyMeasurable (fun y => ∫ (x : G), ‖↑(↑L₃ (f y)) (↑(↑L₄ (g x)) (k (x₀ - y - x)))‖ ∂μ) ν\nh3 : Measure.map (fun z => (z.fst - z.snd, z.snd)) (Measure.prod μ ν) = Measure.prod μ ν\nt : G\nht : ConvolutionExistsAt (fun x => ‖g x‖) (fun x => ‖k x‖) (x₀ - t) (mul ℝ ℝ)\n⊢ ‖∫ (x : G), ‖uncurry (fun x y => ↑(↑L₃ (f y)) (↑(↑L₄ (g x)) (k (x₀ - y - x)))) (x, t)‖ ∂μ‖ ≤\n    ‖L₃‖ * ‖L₄‖ * ↑(↑(mul ℝ ℝ) ((fun x => ‖f x‖) t)) ((fun x => ‖g x‖) ⋆[mul ℝ ℝ, (x₀ - t)] fun x => ‖k x‖)\n[PROOFSTEP]\nsimp_rw [convolution_def, mul_apply', mul_mul_mul_comm ‖L₃‖ ‖L₄‖, ← integral_mul_left]\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝²⁶ : NormedAddCommGroup E\ninst✝²⁵ : NormedAddCommGroup E'\ninst✝²⁴ : NormedAddCommGroup E''\ninst✝²³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝²² : IsROrC 𝕜\ninst✝²¹ : NormedSpace 𝕜 E\ninst✝²⁰ : NormedSpace 𝕜 E'\ninst✝¹⁹ : NormedSpace 𝕜 E''\ninst✝¹⁸ : NormedSpace ℝ F\ninst✝¹⁷ : NormedSpace 𝕜 F\nn : ℕ∞\ninst✝¹⁶ : CompleteSpace F\ninst✝¹⁵ : MeasurableSpace G\nμ ν : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝¹⁴ : NormedAddCommGroup F'\ninst✝¹³ : NormedSpace ℝ F'\ninst✝¹² : NormedSpace 𝕜 F'\ninst✝¹¹ : CompleteSpace F'\ninst✝¹⁰ : NormedAddCommGroup F''\ninst✝⁹ : NormedSpace ℝ F''\ninst✝⁸ : NormedSpace 𝕜 F''\ninst✝⁷ : CompleteSpace F''\nk : G → E''\nL₂ : F →L[𝕜] E'' →L[𝕜] F'\nL₃ : E →L[𝕜] F'' →L[𝕜] F'\nL₄ : E' →L[𝕜] E'' →L[𝕜] F''\ninst✝⁶ : AddGroup G\ninst✝⁵ : SigmaFinite μ\ninst✝⁴ : SigmaFinite ν\ninst✝³ : IsAddRightInvariant μ\ninst✝² : MeasurableAdd₂ G\ninst✝¹ : IsAddRightInvariant ν\ninst✝ : MeasurableNeg G\nhL : ∀ (x : E) (y : E') (z : E''), ↑(↑L₂ (↑(↑L x) y)) z = ↑(↑L₃ x) (↑(↑L₄ y) z)\nx₀ : G\nhf : AEStronglyMeasurable f ν\nhg : AEStronglyMeasurable g μ\nhk : AEStronglyMeasurable k μ\nhfg : ∀ᵐ (y : G) ∂μ, ConvolutionExistsAt f g y L\nhgk : ∀ᵐ (x : G) ∂ν, ConvolutionExistsAt (fun x => ‖g x‖) (fun x => ‖k x‖) x (mul ℝ ℝ)\nhfgk : ConvolutionExistsAt (fun x => ‖f x‖) (convolution (fun x => ‖g x‖) (fun x => ‖k x‖) (mul ℝ ℝ)) x₀ (mul ℝ ℝ)\nh_meas : AEStronglyMeasurable (uncurry fun x y => ↑(↑L₃ (f y)) (↑(↑L₄ (g x)) (k (x₀ - y - x)))) (Measure.prod μ ν)\nh2_meas : AEStronglyMeasurable (fun y => ∫ (x : G), ‖↑(↑L₃ (f y)) (↑(↑L₄ (g x)) (k (x₀ - y - x)))‖ ∂μ) ν\nh3 : Measure.map (fun z => (z.fst - z.snd, z.snd)) (Measure.prod μ ν) = Measure.prod μ ν\nt : G\nht : ConvolutionExistsAt (fun x => ‖g x‖) (fun x => ‖k x‖) (x₀ - t) (mul ℝ ℝ)\n⊢ ‖∫ (x : G), ‖uncurry (fun x y => ↑(↑L₃ (f y)) (↑(↑L₄ (g x)) (k (x₀ - y - x)))) (x, t)‖ ∂μ‖ ≤\n    ∫ (a : G), ‖L₃‖ * ‖f t‖ * (‖L₄‖ * (‖g a‖ * ‖k (x₀ - t - a)‖)) ∂μ\n[PROOFSTEP]\nrw [Real.norm_of_nonneg]\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝²⁶ : NormedAddCommGroup E\ninst✝²⁵ : NormedAddCommGroup E'\ninst✝²⁴ : NormedAddCommGroup E''\ninst✝²³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝²² : IsROrC 𝕜\ninst✝²¹ : NormedSpace 𝕜 E\ninst✝²⁰ : NormedSpace 𝕜 E'\ninst✝¹⁹ : NormedSpace 𝕜 E''\ninst✝¹⁸ : NormedSpace ℝ F\ninst✝¹⁷ : NormedSpace 𝕜 F\nn : ℕ∞\ninst✝¹⁶ : CompleteSpace F\ninst✝¹⁵ : MeasurableSpace G\nμ ν : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝¹⁴ : NormedAddCommGroup F'\ninst✝¹³ : NormedSpace ℝ F'\ninst✝¹² : NormedSpace 𝕜 F'\ninst✝¹¹ : CompleteSpace F'\ninst✝¹⁰ : NormedAddCommGroup F''\ninst✝⁹ : NormedSpace ℝ F''\ninst✝⁸ : NormedSpace 𝕜 F''\ninst✝⁷ : CompleteSpace F''\nk : G → E''\nL₂ : F →L[𝕜] E'' →L[𝕜] F'\nL₃ : E →L[𝕜] F'' →L[𝕜] F'\nL₄ : E' →L[𝕜] E'' →L[𝕜] F''\ninst✝⁶ : AddGroup G\ninst✝⁵ : SigmaFinite μ\ninst✝⁴ : SigmaFinite ν\ninst✝³ : IsAddRightInvariant μ\ninst✝² : MeasurableAdd₂ G\ninst✝¹ : IsAddRightInvariant ν\ninst✝ : MeasurableNeg G\nhL : ∀ (x : E) (y : E') (z : E''), ↑(↑L₂ (↑(↑L x) y)) z = ↑(↑L₃ x) (↑(↑L₄ y) z)\nx₀ : G\nhf : AEStronglyMeasurable f ν\nhg : AEStronglyMeasurable g μ\nhk : AEStronglyMeasurable k μ\nhfg : ∀ᵐ (y : G) ∂μ, ConvolutionExistsAt f g y L\nhgk : ∀ᵐ (x : G) ∂ν, ConvolutionExistsAt (fun x => ‖g x‖) (fun x => ‖k x‖) x (mul ℝ ℝ)\nhfgk : ConvolutionExistsAt (fun x => ‖f x‖) (convolution (fun x => ‖g x‖) (fun x => ‖k x‖) (mul ℝ ℝ)) x₀ (mul ℝ ℝ)\nh_meas : AEStronglyMeasurable (uncurry fun x y => ↑(↑L₃ (f y)) (↑(↑L₄ (g x)) (k (x₀ - y - x)))) (Measure.prod μ ν)\nh2_meas : AEStronglyMeasurable (fun y => ∫ (x : G), ‖↑(↑L₃ (f y)) (↑(↑L₄ (g x)) (k (x₀ - y - x)))‖ ∂μ) ν\nh3 : Measure.map (fun z => (z.fst - z.snd, z.snd)) (Measure.prod μ ν) = Measure.prod μ ν\nt : G\nht : ConvolutionExistsAt (fun x => ‖g x‖) (fun x => ‖k x‖) (x₀ - t) (mul ℝ ℝ)\n⊢ ∫ (x : G), ‖uncurry (fun x y => ↑(↑L₃ (f y)) (↑(↑L₄ (g x)) (k (x₀ - y - x)))) (x, t)‖ ∂μ ≤\n    ∫ (a : G), ‖L₃‖ * ‖f t‖ * (‖L₄‖ * (‖g a‖ * ‖k (x₀ - t - a)‖)) ∂μ\n[PROOFSTEP]\nrefine'\n  integral_mono_of_nonneg (eventually_of_forall fun t => norm_nonneg _) ((ht.const_mul _).const_mul _)\n    (eventually_of_forall fun s => _)\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝²⁶ : NormedAddCommGroup E\ninst✝²⁵ : NormedAddCommGroup E'\ninst✝²⁴ : NormedAddCommGroup E''\ninst✝²³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝²² : IsROrC 𝕜\ninst✝²¹ : NormedSpace 𝕜 E\ninst✝²⁰ : NormedSpace 𝕜 E'\ninst✝¹⁹ : NormedSpace 𝕜 E''\ninst✝¹⁸ : NormedSpace ℝ F\ninst✝¹⁷ : NormedSpace 𝕜 F\nn : ℕ∞\ninst✝¹⁶ : CompleteSpace F\ninst✝¹⁵ : MeasurableSpace G\nμ ν : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝¹⁴ : NormedAddCommGroup F'\ninst✝¹³ : NormedSpace ℝ F'\ninst✝¹² : NormedSpace 𝕜 F'\ninst✝¹¹ : CompleteSpace F'\ninst✝¹⁰ : NormedAddCommGroup F''\ninst✝⁹ : NormedSpace ℝ F''\ninst✝⁸ : NormedSpace 𝕜 F''\ninst✝⁷ : CompleteSpace F''\nk : G → E''\nL₂ : F →L[𝕜] E'' →L[𝕜] F'\nL₃ : E →L[𝕜] F'' →L[𝕜] F'\nL₄ : E' →L[𝕜] E'' →L[𝕜] F''\ninst✝⁶ : AddGroup G\ninst✝⁵ : SigmaFinite μ\ninst✝⁴ : SigmaFinite ν\ninst✝³ : IsAddRightInvariant μ\ninst✝² : MeasurableAdd₂ G\ninst✝¹ : IsAddRightInvariant ν\ninst✝ : MeasurableNeg G\nhL : ∀ (x : E) (y : E') (z : E''), ↑(↑L₂ (↑(↑L x) y)) z = ↑(↑L₃ x) (↑(↑L₄ y) z)\nx₀ : G\nhf : AEStronglyMeasurable f ν\nhg : AEStronglyMeasurable g μ\nhk : AEStronglyMeasurable k μ\nhfg : ∀ᵐ (y : G) ∂μ, ConvolutionExistsAt f g y L\nhgk : ∀ᵐ (x : G) ∂ν, ConvolutionExistsAt (fun x => ‖g x‖) (fun x => ‖k x‖) x (mul ℝ ℝ)\nhfgk : ConvolutionExistsAt (fun x => ‖f x‖) (convolution (fun x => ‖g x‖) (fun x => ‖k x‖) (mul ℝ ℝ)) x₀ (mul ℝ ℝ)\nh_meas : AEStronglyMeasurable (uncurry fun x y => ↑(↑L₃ (f y)) (↑(↑L₄ (g x)) (k (x₀ - y - x)))) (Measure.prod μ ν)\nh2_meas : AEStronglyMeasurable (fun y => ∫ (x : G), ‖↑(↑L₃ (f y)) (↑(↑L₄ (g x)) (k (x₀ - y - x)))‖ ∂μ) ν\nh3 : Measure.map (fun z => (z.fst - z.snd, z.snd)) (Measure.prod μ ν) = Measure.prod μ ν\nt : G\nht : ConvolutionExistsAt (fun x => ‖g x‖) (fun x => ‖k x‖) (x₀ - t) (mul ℝ ℝ)\ns : G\n⊢ (fun x => ‖uncurry (fun x y => ↑(↑L₃ (f y)) (↑(↑L₄ (g x)) (k (x₀ - y - x)))) (x, t)‖) s ≤\n    (fun a => ‖L₃‖ * ‖f t‖ * (‖L₄‖ * (‖g a‖ * ‖k (x₀ - t - a)‖))) s\n[PROOFSTEP]\nsimp only [← mul_assoc ‖L₄‖]\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝²⁶ : NormedAddCommGroup E\ninst✝²⁵ : NormedAddCommGroup E'\ninst✝²⁴ : NormedAddCommGroup E''\ninst✝²³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝²² : IsROrC 𝕜\ninst✝²¹ : NormedSpace 𝕜 E\ninst✝²⁰ : NormedSpace 𝕜 E'\ninst✝¹⁹ : NormedSpace 𝕜 E''\ninst✝¹⁸ : NormedSpace ℝ F\ninst✝¹⁷ : NormedSpace 𝕜 F\nn : ℕ∞\ninst✝¹⁶ : CompleteSpace F\ninst✝¹⁵ : MeasurableSpace G\nμ ν : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝¹⁴ : NormedAddCommGroup F'\ninst✝¹³ : NormedSpace ℝ F'\ninst✝¹² : NormedSpace 𝕜 F'\ninst✝¹¹ : CompleteSpace F'\ninst✝¹⁰ : NormedAddCommGroup F''\ninst✝⁹ : NormedSpace ℝ F''\ninst✝⁸ : NormedSpace 𝕜 F''\ninst✝⁷ : CompleteSpace F''\nk : G → E''\nL₂ : F →L[𝕜] E'' →L[𝕜] F'\nL₃ : E →L[𝕜] F'' →L[𝕜] F'\nL₄ : E' →L[𝕜] E'' →L[𝕜] F''\ninst✝⁶ : AddGroup G\ninst✝⁵ : SigmaFinite μ\ninst✝⁴ : SigmaFinite ν\ninst✝³ : IsAddRightInvariant μ\ninst✝² : MeasurableAdd₂ G\ninst✝¹ : IsAddRightInvariant ν\ninst✝ : MeasurableNeg G\nhL : ∀ (x : E) (y : E') (z : E''), ↑(↑L₂ (↑(↑L x) y)) z = ↑(↑L₃ x) (↑(↑L₄ y) z)\nx₀ : G\nhf : AEStronglyMeasurable f ν\nhg : AEStronglyMeasurable g μ\nhk : AEStronglyMeasurable k μ\nhfg : ∀ᵐ (y : G) ∂μ, ConvolutionExistsAt f g y L\nhgk : ∀ᵐ (x : G) ∂ν, ConvolutionExistsAt (fun x => ‖g x‖) (fun x => ‖k x‖) x (mul ℝ ℝ)\nhfgk : ConvolutionExistsAt (fun x => ‖f x‖) (convolution (fun x => ‖g x‖) (fun x => ‖k x‖) (mul ℝ ℝ)) x₀ (mul ℝ ℝ)\nh_meas : AEStronglyMeasurable (uncurry fun x y => ↑(↑L₃ (f y)) (↑(↑L₄ (g x)) (k (x₀ - y - x)))) (Measure.prod μ ν)\nh2_meas : AEStronglyMeasurable (fun y => ∫ (x : G), ‖↑(↑L₃ (f y)) (↑(↑L₄ (g x)) (k (x₀ - y - x)))‖ ∂μ) ν\nh3 : Measure.map (fun z => (z.fst - z.snd, z.snd)) (Measure.prod μ ν) = Measure.prod μ ν\nt : G\nht : ConvolutionExistsAt (fun x => ‖g x‖) (fun x => ‖k x‖) (x₀ - t) (mul ℝ ℝ)\ns : G\n⊢ ‖uncurry (fun x y => ↑(↑L₃ (f y)) (↑(↑L₄ (g x)) (k (x₀ - y - x)))) (s, t)‖ ≤\n    ‖L₃‖ * ‖f t‖ * (‖L₄‖ * ‖g s‖ * ‖k (x₀ - t - s)‖)\n[PROOFSTEP]\napply_rules [ContinuousLinearMap.le_of_op_norm₂_le_of_le, le_rfl]\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝²⁶ : NormedAddCommGroup E\ninst✝²⁵ : NormedAddCommGroup E'\ninst✝²⁴ : NormedAddCommGroup E''\ninst✝²³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝²² : IsROrC 𝕜\ninst✝²¹ : NormedSpace 𝕜 E\ninst✝²⁰ : NormedSpace 𝕜 E'\ninst✝¹⁹ : NormedSpace 𝕜 E''\ninst✝¹⁸ : NormedSpace ℝ F\ninst✝¹⁷ : NormedSpace 𝕜 F\nn : ℕ∞\ninst✝¹⁶ : CompleteSpace F\ninst✝¹⁵ : MeasurableSpace G\nμ ν : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝¹⁴ : NormedAddCommGroup F'\ninst✝¹³ : NormedSpace ℝ F'\ninst✝¹² : NormedSpace 𝕜 F'\ninst✝¹¹ : CompleteSpace F'\ninst✝¹⁰ : NormedAddCommGroup F''\ninst✝⁹ : NormedSpace ℝ F''\ninst✝⁸ : NormedSpace 𝕜 F''\ninst✝⁷ : CompleteSpace F''\nk : G → E''\nL₂ : F →L[𝕜] E'' →L[𝕜] F'\nL₃ : E →L[𝕜] F'' →L[𝕜] F'\nL₄ : E' →L[𝕜] E'' →L[𝕜] F''\ninst✝⁶ : AddGroup G\ninst✝⁵ : SigmaFinite μ\ninst✝⁴ : SigmaFinite ν\ninst✝³ : IsAddRightInvariant μ\ninst✝² : MeasurableAdd₂ G\ninst✝¹ : IsAddRightInvariant ν\ninst✝ : MeasurableNeg G\nhL : ∀ (x : E) (y : E') (z : E''), ↑(↑L₂ (↑(↑L x) y)) z = ↑(↑L₃ x) (↑(↑L₄ y) z)\nx₀ : G\nhf : AEStronglyMeasurable f ν\nhg : AEStronglyMeasurable g μ\nhk : AEStronglyMeasurable k μ\nhfg : ∀ᵐ (y : G) ∂μ, ConvolutionExistsAt f g y L\nhgk : ∀ᵐ (x : G) ∂ν, ConvolutionExistsAt (fun x => ‖g x‖) (fun x => ‖k x‖) x (mul ℝ ℝ)\nhfgk : ConvolutionExistsAt (fun x => ‖f x‖) (convolution (fun x => ‖g x‖) (fun x => ‖k x‖) (mul ℝ ℝ)) x₀ (mul ℝ ℝ)\nh_meas : AEStronglyMeasurable (uncurry fun x y => ↑(↑L₃ (f y)) (↑(↑L₄ (g x)) (k (x₀ - y - x)))) (Measure.prod μ ν)\nh2_meas : AEStronglyMeasurable (fun y => ∫ (x : G), ‖↑(↑L₃ (f y)) (↑(↑L₄ (g x)) (k (x₀ - y - x)))‖ ∂μ) ν\nh3 : Measure.map (fun z => (z.fst - z.snd, z.snd)) (Measure.prod μ ν) = Measure.prod μ ν\nt : G\nht : ConvolutionExistsAt (fun x => ‖g x‖) (fun x => ‖k x‖) (x₀ - t) (mul ℝ ℝ)\n⊢ 0 ≤ ∫ (x : G), ‖uncurry (fun x y => ↑(↑L₃ (f y)) (↑(↑L₄ (g x)) (k (x₀ - y - x)))) (x, t)‖ ∂μ\n[PROOFSTEP]\nexact integral_nonneg fun x => norm_nonneg _\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedAddCommGroup E'\ninst✝¹¹ : NormedAddCommGroup E''\ninst✝¹⁰ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝⁹ : IsROrC 𝕜\ninst✝⁸ : NormedSpace 𝕜 E\ninst✝⁷ : NormedSpace 𝕜 E'\ninst✝⁶ : NormedSpace 𝕜 E''\ninst✝⁵ : NormedSpace ℝ F\ninst✝⁴ : NormedSpace 𝕜 F\nn : ℕ∞\ninst✝³ : CompleteSpace F\ninst✝² : MeasurableSpace G\nμ ν : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : BorelSpace G\ng : G → E'' →L[𝕜] E'\nhf : LocallyIntegrable f\nhcg : HasCompactSupport g\nhg : Continuous g\nx₀ : G\nx : E''\n⊢ ↑(f ⋆[precompR E'' L, x₀] g) x = f ⋆[L, x₀] fun a => ↑(g a) x\n[PROOFSTEP]\nhave := hcg.convolutionExists_right (L.precompR E'' : _) hf hg x₀\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedAddCommGroup E'\ninst✝¹¹ : NormedAddCommGroup E''\ninst✝¹⁰ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝⁹ : IsROrC 𝕜\ninst✝⁸ : NormedSpace 𝕜 E\ninst✝⁷ : NormedSpace 𝕜 E'\ninst✝⁶ : NormedSpace 𝕜 E''\ninst✝⁵ : NormedSpace ℝ F\ninst✝⁴ : NormedSpace 𝕜 F\nn : ℕ∞\ninst✝³ : CompleteSpace F\ninst✝² : MeasurableSpace G\nμ ν : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : BorelSpace G\ng : G → E'' →L[𝕜] E'\nhf : LocallyIntegrable f\nhcg : HasCompactSupport g\nhg : Continuous g\nx₀ : G\nx : E''\nthis : ConvolutionExistsAt f g x₀ (precompR E'' L)\n⊢ ↑(f ⋆[precompR E'' L, x₀] g) x = f ⋆[L, x₀] fun a => ↑(g a) x\n[PROOFSTEP]\nsimp_rw [convolution_def, ContinuousLinearMap.integral_apply this]\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedAddCommGroup E'\ninst✝¹¹ : NormedAddCommGroup E''\ninst✝¹⁰ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝⁹ : IsROrC 𝕜\ninst✝⁸ : NormedSpace 𝕜 E\ninst✝⁷ : NormedSpace 𝕜 E'\ninst✝⁶ : NormedSpace 𝕜 E''\ninst✝⁵ : NormedSpace ℝ F\ninst✝⁴ : NormedSpace 𝕜 F\nn : ℕ∞\ninst✝³ : CompleteSpace F\ninst✝² : MeasurableSpace G\nμ ν : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝¹ : NormedAddCommGroup G\ninst✝ : BorelSpace G\ng : G → E'' →L[𝕜] E'\nhf : LocallyIntegrable f\nhcg : HasCompactSupport g\nhg : Continuous g\nx₀ : G\nx : E''\nthis : ConvolutionExistsAt f g x₀ (precompR E'' L)\n⊢ ∫ (a : G), ↑(↑(↑(precompR E'' L) (f a)) (g (x₀ - a))) x ∂μ = ∫ (t : G), ↑(↑L (f t)) (↑(g (x₀ - t)) x) ∂μ\n[PROOFSTEP]\nrfl\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\nn : ℕ∞\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\nμ ν : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : SigmaFinite μ\ninst✝ : IsAddLeftInvariant μ\nhcg : HasCompactSupport g\nhf : LocallyIntegrable f\nhg : ContDiff 𝕜 1 g\nx₀ : G\n⊢ HasFDerivAt (convolution f g L) (f ⋆[precompR G L, x₀] fderiv 𝕜 g) x₀\n[PROOFSTEP]\nrcases hcg.eq_zero_or_finiteDimensional 𝕜 hg.continuous with (rfl | fin_dim)\n[GOAL]\ncase inl\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\nn : ℕ∞\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\nμ ν : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : SigmaFinite μ\ninst✝ : IsAddLeftInvariant μ\nhf : LocallyIntegrable f\nx₀ : G\nhcg : HasCompactSupport 0\nhg : ContDiff 𝕜 1 0\n⊢ HasFDerivAt (convolution f 0 L) (f ⋆[precompR G L, x₀] fderiv 𝕜 0) x₀\n[PROOFSTEP]\nhave : fderiv 𝕜 (0 : G → E') = 0 := fderiv_const (0 : E')\n[GOAL]\ncase inl\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\nn : ℕ∞\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\nμ ν : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : SigmaFinite μ\ninst✝ : IsAddLeftInvariant μ\nhf : LocallyIntegrable f\nx₀ : G\nhcg : HasCompactSupport 0\nhg : ContDiff 𝕜 1 0\nthis : fderiv 𝕜 0 = 0\n⊢ HasFDerivAt (convolution f 0 L) (f ⋆[precompR G L, x₀] fderiv 𝕜 0) x₀\n[PROOFSTEP]\nsimp only [this, convolution_zero, Pi.zero_apply]\n[GOAL]\ncase inl\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\nn : ℕ∞\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\nμ ν : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : SigmaFinite μ\ninst✝ : IsAddLeftInvariant μ\nhf : LocallyIntegrable f\nx₀ : G\nhcg : HasCompactSupport 0\nhg : ContDiff 𝕜 1 0\nthis : fderiv 𝕜 0 = 0\n⊢ HasFDerivAt 0 0 x₀\n[PROOFSTEP]\nexact hasFDerivAt_const (0 : F) x₀\n[GOAL]\ncase inr\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\nn : ℕ∞\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\nμ ν : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : SigmaFinite μ\ninst✝ : IsAddLeftInvariant μ\nhcg : HasCompactSupport g\nhf : LocallyIntegrable f\nhg : ContDiff 𝕜 1 g\nx₀ : G\nfin_dim : FiniteDimensional 𝕜 G\n⊢ HasFDerivAt (convolution f g L) (f ⋆[precompR G L, x₀] fderiv 𝕜 g) x₀\n[PROOFSTEP]\nhave : ProperSpace G := FiniteDimensional.proper_isROrC 𝕜 G\n[GOAL]\ncase inr\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\nn : ℕ∞\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\nμ ν : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : SigmaFinite μ\ninst✝ : IsAddLeftInvariant μ\nhcg : HasCompactSupport g\nhf : LocallyIntegrable f\nhg : ContDiff 𝕜 1 g\nx₀ : G\nfin_dim : FiniteDimensional 𝕜 G\nthis : ProperSpace G\n⊢ HasFDerivAt (convolution f g L) (f ⋆[precompR G L, x₀] fderiv 𝕜 g) x₀\n[PROOFSTEP]\nset L' := L.precompR G\n[GOAL]\ncase inr\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\nn : ℕ∞\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\nμ ν : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : SigmaFinite μ\ninst✝ : IsAddLeftInvariant μ\nhcg : HasCompactSupport g\nhf : LocallyIntegrable f\nhg : ContDiff 𝕜 1 g\nx₀ : G\nfin_dim : FiniteDimensional 𝕜 G\nthis : ProperSpace G\nL' : E →L[𝕜] (G →L[𝕜] E') →L[𝕜] G →L[𝕜] F := precompR G L\n⊢ HasFDerivAt (convolution f g L) (f ⋆[L', x₀] fderiv 𝕜 g) x₀\n[PROOFSTEP]\nhave h1 : ∀ᶠ x in 𝓝 x₀, AEStronglyMeasurable (fun t => L (f t) (g (x - t))) μ :=\n  eventually_of_forall (hf.aestronglyMeasurable.convolution_integrand_snd L hg.continuous.aestronglyMeasurable)\n[GOAL]\ncase inr\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\nn : ℕ∞\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\nμ ν : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : SigmaFinite μ\ninst✝ : IsAddLeftInvariant μ\nhcg : HasCompactSupport g\nhf : LocallyIntegrable f\nhg : ContDiff 𝕜 1 g\nx₀ : G\nfin_dim : FiniteDimensional 𝕜 G\nthis : ProperSpace G\nL' : E →L[𝕜] (G →L[𝕜] E') →L[𝕜] G →L[𝕜] F := precompR G L\nh1 : ∀ᶠ (x : G) in 𝓝 x₀, AEStronglyMeasurable (fun t => ↑(↑L (f t)) (g (x - t))) μ\n⊢ HasFDerivAt (convolution f g L) (f ⋆[L', x₀] fderiv 𝕜 g) x₀\n[PROOFSTEP]\nhave h2 : ∀ x, AEStronglyMeasurable (fun t => L' (f t) (fderiv 𝕜 g (x - t))) μ :=\n  hf.aestronglyMeasurable.convolution_integrand_snd L' (hg.continuous_fderiv le_rfl).aestronglyMeasurable\n[GOAL]\ncase inr\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\nn : ℕ∞\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\nμ ν : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : SigmaFinite μ\ninst✝ : IsAddLeftInvariant μ\nhcg : HasCompactSupport g\nhf : LocallyIntegrable f\nhg : ContDiff 𝕜 1 g\nx₀ : G\nfin_dim : FiniteDimensional 𝕜 G\nthis : ProperSpace G\nL' : E →L[𝕜] (G →L[𝕜] E') →L[𝕜] G →L[𝕜] F := precompR G L\nh1 : ∀ᶠ (x : G) in 𝓝 x₀, AEStronglyMeasurable (fun t => ↑(↑L (f t)) (g (x - t))) μ\nh2 : ∀ (x : G), AEStronglyMeasurable (fun t => ↑(↑L' (f t)) (fderiv 𝕜 g (x - t))) μ\n⊢ HasFDerivAt (convolution f g L) (f ⋆[L', x₀] fderiv 𝕜 g) x₀\n[PROOFSTEP]\nhave h3 : ∀ x t, HasFDerivAt (fun x => g (x - t)) (fderiv 𝕜 g (x - t)) x := fun x t ↦ by\n  simpa using\n    (hg.differentiable le_rfl).differentiableAt.hasFDerivAt.comp x ((hasFDerivAt_id x).sub (hasFDerivAt_const t x))\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\nn : ℕ∞\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\nμ ν : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : SigmaFinite μ\ninst✝ : IsAddLeftInvariant μ\nhcg : HasCompactSupport g\nhf : LocallyIntegrable f\nhg : ContDiff 𝕜 1 g\nx₀ : G\nfin_dim : FiniteDimensional 𝕜 G\nthis : ProperSpace G\nL' : E →L[𝕜] (G →L[𝕜] E') →L[𝕜] G →L[𝕜] F := precompR G L\nh1 : ∀ᶠ (x : G) in 𝓝 x₀, AEStronglyMeasurable (fun t => ↑(↑L (f t)) (g (x - t))) μ\nh2 : ∀ (x : G), AEStronglyMeasurable (fun t => ↑(↑L' (f t)) (fderiv 𝕜 g (x - t))) μ\nx t : G\n⊢ HasFDerivAt (fun x => g (x - t)) (fderiv 𝕜 g (x - t)) x\n[PROOFSTEP]\nsimpa using\n  (hg.differentiable le_rfl).differentiableAt.hasFDerivAt.comp x ((hasFDerivAt_id x).sub (hasFDerivAt_const t x))\n[GOAL]\ncase inr\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\nn : ℕ∞\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\nμ ν : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : SigmaFinite μ\ninst✝ : IsAddLeftInvariant μ\nhcg : HasCompactSupport g\nhf : LocallyIntegrable f\nhg : ContDiff 𝕜 1 g\nx₀ : G\nfin_dim : FiniteDimensional 𝕜 G\nthis : ProperSpace G\nL' : E →L[𝕜] (G →L[𝕜] E') →L[𝕜] G →L[𝕜] F := precompR G L\nh1 : ∀ᶠ (x : G) in 𝓝 x₀, AEStronglyMeasurable (fun t => ↑(↑L (f t)) (g (x - t))) μ\nh2 : ∀ (x : G), AEStronglyMeasurable (fun t => ↑(↑L' (f t)) (fderiv 𝕜 g (x - t))) μ\nh3 : ∀ (x t : G), HasFDerivAt (fun x => g (x - t)) (fderiv 𝕜 g (x - t)) x\n⊢ HasFDerivAt (convolution f g L) (f ⋆[L', x₀] fderiv 𝕜 g) x₀\n[PROOFSTEP]\nlet K' := -tsupport (fderiv 𝕜 g) + closedBall x₀ 1\n[GOAL]\ncase inr\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\nn : ℕ∞\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\nμ ν : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : SigmaFinite μ\ninst✝ : IsAddLeftInvariant μ\nhcg : HasCompactSupport g\nhf : LocallyIntegrable f\nhg : ContDiff 𝕜 1 g\nx₀ : G\nfin_dim : FiniteDimensional 𝕜 G\nthis : ProperSpace G\nL' : E →L[𝕜] (G →L[𝕜] E') →L[𝕜] G →L[𝕜] F := precompR G L\nh1 : ∀ᶠ (x : G) in 𝓝 x₀, AEStronglyMeasurable (fun t => ↑(↑L (f t)) (g (x - t))) μ\nh2 : ∀ (x : G), AEStronglyMeasurable (fun t => ↑(↑L' (f t)) (fderiv 𝕜 g (x - t))) μ\nh3 : ∀ (x t : G), HasFDerivAt (fun x => g (x - t)) (fderiv 𝕜 g (x - t)) x\nK' : Set G := -tsupport (fderiv 𝕜 g) + closedBall x₀ 1\n⊢ HasFDerivAt (convolution f g L) (f ⋆[L', x₀] fderiv 𝕜 g) x₀\n[PROOFSTEP]\nhave hK' : IsCompact K' :=\n  (hcg.fderiv 𝕜).neg.add\n    (isCompact_closedBall x₀ 1)\n      -- porting note: was\n        -- `refine' hasFDerivAt_integral_of_dominated_of_fderiv_le zero_lt_one h1 _ (h2 x₀) _ _ _`\n        -- but it failed; surprisingly, `apply` works\n[GOAL]\ncase inr\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\nn : ℕ∞\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\nμ ν : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : SigmaFinite μ\ninst✝ : IsAddLeftInvariant μ\nhcg : HasCompactSupport g\nhf : LocallyIntegrable f\nhg : ContDiff 𝕜 1 g\nx₀ : G\nfin_dim : FiniteDimensional 𝕜 G\nthis : ProperSpace G\nL' : E →L[𝕜] (G →L[𝕜] E') →L[𝕜] G →L[𝕜] F := precompR G L\nh1 : ∀ᶠ (x : G) in 𝓝 x₀, AEStronglyMeasurable (fun t => ↑(↑L (f t)) (g (x - t))) μ\nh2 : ∀ (x : G), AEStronglyMeasurable (fun t => ↑(↑L' (f t)) (fderiv 𝕜 g (x - t))) μ\nh3 : ∀ (x t : G), HasFDerivAt (fun x => g (x - t)) (fderiv 𝕜 g (x - t)) x\nK' : Set G := -tsupport (fderiv 𝕜 g) + closedBall x₀ 1\nhK' : IsCompact K'\n⊢ HasFDerivAt (convolution f g L) (f ⋆[L', x₀] fderiv 𝕜 g) x₀\n[PROOFSTEP]\napply hasFDerivAt_integral_of_dominated_of_fderiv_le zero_lt_one h1 _ (h2 x₀)\n[GOAL]\ncase inr.h_bound\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\nn : ℕ∞\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\nμ ν : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : SigmaFinite μ\ninst✝ : IsAddLeftInvariant μ\nhcg : HasCompactSupport g\nhf : LocallyIntegrable f\nhg : ContDiff 𝕜 1 g\nx₀ : G\nfin_dim : FiniteDimensional 𝕜 G\nthis : ProperSpace G\nL' : E →L[𝕜] (G →L[𝕜] E') →L[𝕜] G →L[𝕜] F := precompR G L\nh1 : ∀ᶠ (x : G) in 𝓝 x₀, AEStronglyMeasurable (fun t => ↑(↑L (f t)) (g (x - t))) μ\nh2 : ∀ (x : G), AEStronglyMeasurable (fun t => ↑(↑L' (f t)) (fderiv 𝕜 g (x - t))) μ\nh3 : ∀ (x t : G), HasFDerivAt (fun x => g (x - t)) (fderiv 𝕜 g (x - t)) x\nK' : Set G := -tsupport (fderiv 𝕜 g) + closedBall x₀ 1\nhK' : IsCompact K'\n⊢ ∀ᵐ (a : G) ∂μ, ∀ (x : G), x ∈ ball x₀ 1 → ‖↑(↑L' (f a)) (fderiv 𝕜 g (x - a))‖ ≤ ?m.2141475 a\n[PROOFSTEP]\nrefine'\n  eventually_of_forall fun t x hx =>\n    (hcg.fderiv 𝕜).convolution_integrand_bound_right L' (hg.continuous_fderiv le_rfl) (ball_subset_closedBall hx)\n[GOAL]\ncase inr.bound_integrable\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\nn : ℕ∞\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\nμ ν : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : SigmaFinite μ\ninst✝ : IsAddLeftInvariant μ\nhcg : HasCompactSupport g\nhf : LocallyIntegrable f\nhg : ContDiff 𝕜 1 g\nx₀ : G\nfin_dim : FiniteDimensional 𝕜 G\nthis : ProperSpace G\nL' : E →L[𝕜] (G →L[𝕜] E') →L[𝕜] G →L[𝕜] F := precompR G L\nh1 : ∀ᶠ (x : G) in 𝓝 x₀, AEStronglyMeasurable (fun t => ↑(↑L (f t)) (g (x - t))) μ\nh2 : ∀ (x : G), AEStronglyMeasurable (fun t => ↑(↑L' (f t)) (fderiv 𝕜 g (x - t))) μ\nh3 : ∀ (x t : G), HasFDerivAt (fun x => g (x - t)) (fderiv 𝕜 g (x - t)) x\nK' : Set G := -tsupport (fderiv 𝕜 g) + closedBall x₀ 1\nhK' : IsCompact K'\n⊢ Integrable fun t =>\n    indicator (-tsupport (fderiv 𝕜 g) + closedBall x₀ 1) (fun t => ‖L'‖ * ‖f t‖ * ⨆ (i : G), ‖fderiv 𝕜 g i‖) t\n[PROOFSTEP]\nrw [integrable_indicator_iff hK'.measurableSet]\n[GOAL]\ncase inr.bound_integrable\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\nn : ℕ∞\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\nμ ν : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : SigmaFinite μ\ninst✝ : IsAddLeftInvariant μ\nhcg : HasCompactSupport g\nhf : LocallyIntegrable f\nhg : ContDiff 𝕜 1 g\nx₀ : G\nfin_dim : FiniteDimensional 𝕜 G\nthis : ProperSpace G\nL' : E →L[𝕜] (G →L[𝕜] E') →L[𝕜] G →L[𝕜] F := precompR G L\nh1 : ∀ᶠ (x : G) in 𝓝 x₀, AEStronglyMeasurable (fun t => ↑(↑L (f t)) (g (x - t))) μ\nh2 : ∀ (x : G), AEStronglyMeasurable (fun t => ↑(↑L' (f t)) (fderiv 𝕜 g (x - t))) μ\nh3 : ∀ (x t : G), HasFDerivAt (fun x => g (x - t)) (fderiv 𝕜 g (x - t)) x\nK' : Set G := -tsupport (fderiv 𝕜 g) + closedBall x₀ 1\nhK' : IsCompact K'\n⊢ IntegrableOn (fun t => ‖L'‖ * ‖f t‖ * ⨆ (i : G), ‖fderiv 𝕜 g i‖) K'\n[PROOFSTEP]\nexact ((hf.integrableOn_isCompact hK').norm.const_mul _).mul_const _\n[GOAL]\ncase inr.h_diff\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\nn : ℕ∞\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\nμ ν : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : SigmaFinite μ\ninst✝ : IsAddLeftInvariant μ\nhcg : HasCompactSupport g\nhf : LocallyIntegrable f\nhg : ContDiff 𝕜 1 g\nx₀ : G\nfin_dim : FiniteDimensional 𝕜 G\nthis : ProperSpace G\nL' : E →L[𝕜] (G →L[𝕜] E') →L[𝕜] G →L[𝕜] F := precompR G L\nh1 : ∀ᶠ (x : G) in 𝓝 x₀, AEStronglyMeasurable (fun t => ↑(↑L (f t)) (g (x - t))) μ\nh2 : ∀ (x : G), AEStronglyMeasurable (fun t => ↑(↑L' (f t)) (fderiv 𝕜 g (x - t))) μ\nh3 : ∀ (x t : G), HasFDerivAt (fun x => g (x - t)) (fderiv 𝕜 g (x - t)) x\nK' : Set G := -tsupport (fderiv 𝕜 g) + closedBall x₀ 1\nhK' : IsCompact K'\n⊢ ∀ᵐ (a : G) ∂μ,\n    ∀ (x : G), x ∈ ball x₀ 1 → HasFDerivAt (fun x => ↑(↑L (f a)) (g (x - a))) (↑(↑L' (f a)) (fderiv 𝕜 g (x - a))) x\n[PROOFSTEP]\nexact eventually_of_forall fun t x _ => (L _).hasFDerivAt.comp x (h3 x t)\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\nn : ℕ∞\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\nμ ν : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : SigmaFinite μ\ninst✝ : IsAddLeftInvariant μ\nhcg : HasCompactSupport g\nhf : LocallyIntegrable f\nhg : ContDiff 𝕜 1 g\nx₀ : G\nfin_dim : FiniteDimensional 𝕜 G\nthis : ProperSpace G\nL' : E →L[𝕜] (G →L[𝕜] E') →L[𝕜] G →L[𝕜] F := precompR G L\nh1 : ∀ᶠ (x : G) in 𝓝 x₀, AEStronglyMeasurable (fun t => ↑(↑L (f t)) (g (x - t))) μ\nh2 : ∀ (x : G), AEStronglyMeasurable (fun t => ↑(↑L' (f t)) (fderiv 𝕜 g (x - t))) μ\nh3 : ∀ (x t : G), HasFDerivAt (fun x => g (x - t)) (fderiv 𝕜 g (x - t)) x\nK' : Set G := -tsupport (fderiv 𝕜 g) + closedBall x₀ 1\nhK' : IsCompact K'\n⊢ Integrable fun t => ↑(↑L (f t)) (g (x₀ - t))\n[PROOFSTEP]\nexact hcg.convolutionExists_right L hf hg.continuous x₀\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedAddCommGroup E'\ninst✝¹⁵ : NormedAddCommGroup E''\ninst✝¹⁴ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedSpace 𝕜 E\ninst✝¹¹ : NormedSpace 𝕜 E'\ninst✝¹⁰ : NormedSpace 𝕜 E''\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : NormedSpace 𝕜 F\nn : ℕ∞\ninst✝⁷ : CompleteSpace F\ninst✝⁶ : MeasurableSpace G\nμ ν : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : BorelSpace G\ninst✝³ : NormedSpace 𝕜 G\ninst✝² : SigmaFinite μ\ninst✝¹ : IsAddLeftInvariant μ\ninst✝ : IsNegInvariant μ\nhcf : HasCompactSupport f\nhf : ContDiff 𝕜 1 f\nhg : LocallyIntegrable g\nx₀ : G\n⊢ HasFDerivAt (convolution f g L) (fderiv 𝕜 f ⋆[precompL G L, x₀] g) x₀\n[PROOFSTEP]\nsimp (config := { singlePass := true }) only [← convolution_flip]\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedAddCommGroup E'\ninst✝¹⁵ : NormedAddCommGroup E''\ninst✝¹⁴ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedSpace 𝕜 E\ninst✝¹¹ : NormedSpace 𝕜 E'\ninst✝¹⁰ : NormedSpace 𝕜 E''\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : NormedSpace 𝕜 F\nn : ℕ∞\ninst✝⁷ : CompleteSpace F\ninst✝⁶ : MeasurableSpace G\nμ ν : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : BorelSpace G\ninst✝³ : NormedSpace 𝕜 G\ninst✝² : SigmaFinite μ\ninst✝¹ : IsAddLeftInvariant μ\ninst✝ : IsNegInvariant μ\nhcf : HasCompactSupport f\nhf : ContDiff 𝕜 1 f\nhg : LocallyIntegrable g\nx₀ : G\n⊢ HasFDerivAt (convolution g f (ContinuousLinearMap.flip L))\n    (g ⋆[ContinuousLinearMap.flip (precompL G L), x₀] fderiv 𝕜 f) x₀\n[PROOFSTEP]\nexact hcf.hasFDerivAt_convolution_right L.flip hg hf x₀\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedAddCommGroup E'\ninst✝⁹ : NormedAddCommGroup E''\ninst✝⁸ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedSpace 𝕜 E'\ninst✝⁴ : NormedSpace ℝ F\ninst✝³ : NormedSpace 𝕜 F\nf₀ : 𝕜 → E\ng₀ : 𝕜 → E'\nn : ℕ∞\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝² : CompleteSpace F\nμ : Measure 𝕜\ninst✝¹ : IsAddLeftInvariant μ\ninst✝ : SigmaFinite μ\nhf : LocallyIntegrable f₀\nhcg : HasCompactSupport g₀\nhg : ContDiff 𝕜 1 g₀\nx₀ : 𝕜\n⊢ HasDerivAt (convolution f₀ g₀ L) (f₀ ⋆[L, x₀] deriv g₀) x₀\n[PROOFSTEP]\nconvert (hcg.hasFDerivAt_convolution_right L hf hg x₀).hasDerivAt using 1\n[GOAL]\ncase h.e'_7\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedAddCommGroup E'\ninst✝⁹ : NormedAddCommGroup E''\ninst✝⁸ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedSpace 𝕜 E'\ninst✝⁴ : NormedSpace ℝ F\ninst✝³ : NormedSpace 𝕜 F\nf₀ : 𝕜 → E\ng₀ : 𝕜 → E'\nn : ℕ∞\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝² : CompleteSpace F\nμ : Measure 𝕜\ninst✝¹ : IsAddLeftInvariant μ\ninst✝ : SigmaFinite μ\nhf : LocallyIntegrable f₀\nhcg : HasCompactSupport g₀\nhg : ContDiff 𝕜 1 g₀\nx₀ : 𝕜\n⊢ f₀ ⋆[L, x₀] deriv g₀ = ↑(f₀ ⋆[precompR 𝕜 L, x₀] fderiv 𝕜 g₀) 1\n[PROOFSTEP]\nrw [convolution_precompR_apply L hf (hcg.fderiv 𝕜) (hg.continuous_fderiv le_rfl)]\n[GOAL]\ncase h.e'_7\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedAddCommGroup E'\ninst✝⁹ : NormedAddCommGroup E''\ninst✝⁸ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : NormedSpace 𝕜 E'\ninst✝⁴ : NormedSpace ℝ F\ninst✝³ : NormedSpace 𝕜 F\nf₀ : 𝕜 → E\ng₀ : 𝕜 → E'\nn : ℕ∞\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝² : CompleteSpace F\nμ : Measure 𝕜\ninst✝¹ : IsAddLeftInvariant μ\ninst✝ : SigmaFinite μ\nhf : LocallyIntegrable f₀\nhcg : HasCompactSupport g₀\nhg : ContDiff 𝕜 1 g₀\nx₀ : 𝕜\n⊢ f₀ ⋆[L, x₀] deriv g₀ = f₀ ⋆[L, x₀] fun a => ↑(fderiv 𝕜 g₀ a) 1\n[PROOFSTEP]\nrfl\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedAddCommGroup E''\ninst✝⁹ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedSpace 𝕜 E\ninst✝⁶ : NormedSpace 𝕜 E'\ninst✝⁵ : NormedSpace ℝ F\ninst✝⁴ : NormedSpace 𝕜 F\nf₀ : 𝕜 → E\ng₀ : 𝕜 → E'\nn : ℕ∞\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝³ : CompleteSpace F\nμ : Measure 𝕜\ninst✝² : IsAddLeftInvariant μ\ninst✝¹ : SigmaFinite μ\ninst✝ : IsNegInvariant μ\nhcf : HasCompactSupport f₀\nhf : ContDiff 𝕜 1 f₀\nhg : LocallyIntegrable g₀\nx₀ : 𝕜\n⊢ HasDerivAt (convolution f₀ g₀ L) (deriv f₀ ⋆[L, x₀] g₀) x₀\n[PROOFSTEP]\nsimp (config := { singlePass := true }) only [← convolution_flip]\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedAddCommGroup E''\ninst✝⁹ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedSpace 𝕜 E\ninst✝⁶ : NormedSpace 𝕜 E'\ninst✝⁵ : NormedSpace ℝ F\ninst✝⁴ : NormedSpace 𝕜 F\nf₀ : 𝕜 → E\ng₀ : 𝕜 → E'\nn : ℕ∞\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝³ : CompleteSpace F\nμ : Measure 𝕜\ninst✝² : IsAddLeftInvariant μ\ninst✝¹ : SigmaFinite μ\ninst✝ : IsNegInvariant μ\nhcf : HasCompactSupport f₀\nhf : ContDiff 𝕜 1 f₀\nhg : LocallyIntegrable g₀\nx₀ : 𝕜\n⊢ HasDerivAt (convolution g₀ f₀ (ContinuousLinearMap.flip L)) (g₀ ⋆[ContinuousLinearMap.flip L, x₀] deriv f₀) x₀\n[PROOFSTEP]\nexact hcf.hasDerivAt_convolution_right L.flip hg hf x₀\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\n⊢ HasFDerivAt (fun q => f ⋆[L, q.snd] g q.fst) (f ⋆[precompR (P × G) L, q₀.snd] fun x => fderiv 𝕜 (↿g) (q₀.fst, x)) q₀\n[PROOFSTEP]\nlet g' := fderiv 𝕜 ↿g\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\n⊢ HasFDerivAt (fun q => f ⋆[L, q.snd] g q.fst) (f ⋆[precompR (P × G) L, q₀.snd] fun x => fderiv 𝕜 (↿g) (q₀.fst, x)) q₀\n[PROOFSTEP]\nhave A : ∀ p ∈ s, Continuous (g p) := fun p hp ↦\n  by\n  refine hg.continuousOn.comp_continuous (continuous_const.prod_mk continuous_id') fun x => ?_\n  simpa only [prod_mk_mem_set_prod_eq, mem_univ, and_true_iff] using hp\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\np : P\nhp : p ∈ s\n⊢ Continuous (g p)\n[PROOFSTEP]\nrefine hg.continuousOn.comp_continuous (continuous_const.prod_mk continuous_id') fun x => ?_\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\np : P\nhp : p ∈ s\nx : G\n⊢ (p, x) ∈ s ×ˢ univ\n[PROOFSTEP]\nsimpa only [prod_mk_mem_set_prod_eq, mem_univ, and_true_iff] using hp\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA : ∀ (p : P), p ∈ s → Continuous (g p)\n⊢ HasFDerivAt (fun q => f ⋆[L, q.snd] g q.fst) (f ⋆[precompR (P × G) L, q₀.snd] fun x => fderiv 𝕜 (↿g) (q₀.fst, x)) q₀\n[PROOFSTEP]\nhave A' : ∀ q : P × G, q.1 ∈ s → s ×ˢ univ ∈ 𝓝 q := fun q hq ↦\n  by\n  apply (hs.prod isOpen_univ).mem_nhds\n  simpa only [mem_prod, mem_univ, and_true_iff] using hq\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nq : P × G\nhq : q.fst ∈ s\n⊢ s ×ˢ univ ∈ 𝓝 q\n[PROOFSTEP]\napply (hs.prod isOpen_univ).mem_nhds\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nq : P × G\nhq : q.fst ∈ s\n⊢ q ∈ s ×ˢ univ\n[PROOFSTEP]\nsimpa only [mem_prod, mem_univ, and_true_iff] using hq\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\n⊢ HasFDerivAt (fun q => f ⋆[L, q.snd] g q.fst) (f ⋆[precompR (P × G) L, q₀.snd] fun x => fderiv 𝕜 (↿g) (q₀.fst, x)) q₀\n[PROOFSTEP]\nhave g'_zero : ∀ p x, p ∈ s → x ∉ k → g' (p, x) = 0 :=\n  by\n  intro p x hp hx\n  refine' (hasFDerivAt_zero_of_eventually_const 0 _).fderiv\n  have M2 : kᶜ ∈ 𝓝 x := hk.isClosed.isOpen_compl.mem_nhds hx\n  have M1 : s ∈ 𝓝 p := hs.mem_nhds hp\n  rw [nhds_prod_eq]\n  filter_upwards [prod_mem_prod M1 M2]\n  rintro ⟨p, y⟩ ⟨hp, hy⟩\n  exact hgs p y hp hy\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\n⊢ ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\n[PROOFSTEP]\nintro p x hp hx\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\np : P\nx : G\nhp : p ∈ s\nhx : ¬x ∈ k\n⊢ g' (p, x) = 0\n[PROOFSTEP]\nrefine' (hasFDerivAt_zero_of_eventually_const 0 _).fderiv\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\np : P\nx : G\nhp : p ∈ s\nhx : ¬x ∈ k\n⊢ ↿g =ᶠ[𝓝 (p, x)] fun x => 0\n[PROOFSTEP]\nhave M2 : kᶜ ∈ 𝓝 x := hk.isClosed.isOpen_compl.mem_nhds hx\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\np : P\nx : G\nhp : p ∈ s\nhx : ¬x ∈ k\nM2 : kᶜ ∈ 𝓝 x\n⊢ ↿g =ᶠ[𝓝 (p, x)] fun x => 0\n[PROOFSTEP]\nhave M1 : s ∈ 𝓝 p := hs.mem_nhds hp\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\np : P\nx : G\nhp : p ∈ s\nhx : ¬x ∈ k\nM2 : kᶜ ∈ 𝓝 x\nM1 : s ∈ 𝓝 p\n⊢ ↿g =ᶠ[𝓝 (p, x)] fun x => 0\n[PROOFSTEP]\nrw [nhds_prod_eq]\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\np : P\nx : G\nhp : p ∈ s\nhx : ¬x ∈ k\nM2 : kᶜ ∈ 𝓝 x\nM1 : s ∈ 𝓝 p\n⊢ ↿g =ᶠ[𝓝 p ×ˢ 𝓝 x] fun x => 0\n[PROOFSTEP]\nfilter_upwards [prod_mem_prod M1 M2]\n[GOAL]\ncase h\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\np : P\nx : G\nhp : p ∈ s\nhx : ¬x ∈ k\nM2 : kᶜ ∈ 𝓝 x\nM1 : s ∈ 𝓝 p\n⊢ ∀ (a : P × G), a ∈ s ×ˢ kᶜ → (↿g) a = 0\n[PROOFSTEP]\nrintro ⟨p, y⟩ ⟨hp, hy⟩\n[GOAL]\ncase h.mk.intro\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx✝ x' : G\ny✝ y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\np✝ : P\nx : G\nhp✝ : p✝ ∈ s\nhx : ¬x ∈ k\nM2 : kᶜ ∈ 𝓝 x\nM1 : s ∈ 𝓝 p✝\np : P\ny : G\nhp : (p, y).fst ∈ s\nhy : (p, y).snd ∈ kᶜ\n⊢ (↿g) (p, y) = 0\n[PROOFSTEP]\nexact hgs p y hp hy\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\n⊢ HasFDerivAt (fun q => f ⋆[L, q.snd] g q.fst) (f ⋆[precompR (P × G) L, q₀.snd] fun x => fderiv 𝕜 (↿g) (q₀.fst, x)) q₀\n[PROOFSTEP]\nobtain ⟨ε, C, εpos, h₀ε, hε⟩ : ∃ ε C, 0 < ε ∧ ball q₀.1 ε ⊆ s ∧ ∀ p x, ‖p - q₀.1‖ < ε → ‖g' (p, x)‖ ≤ C :=\n  by\n  have A : IsCompact ({q₀.1} ×ˢ k) := isCompact_singleton.prod hk\n  obtain ⟨t, kt, t_open, ht⟩ : ∃ t, {q₀.1} ×ˢ k ⊆ t ∧ IsOpen t ∧ Bounded (g' '' t) :=\n    by\n    have B : ContinuousOn g' (s ×ˢ univ) := hg.continuousOn_fderiv_of_open (hs.prod isOpen_univ) le_rfl\n    apply exists_isOpen_bounded_image_of_isCompact_of_continuousOn A (hs.prod isOpen_univ) _ B\n    simp only [prod_subset_prod_iff, hq₀, singleton_subset_iff, subset_univ, and_self_iff, true_or_iff]\n  obtain ⟨ε, εpos, hε, h'ε⟩ : ∃ ε : ℝ, 0 < ε ∧ thickening ε ({ q₀.fst } ×ˢ k) ⊆ t ∧ ball q₀.1 ε ⊆ s :=\n    by\n    obtain ⟨ε, εpos, hε⟩ : ∃ ε : ℝ, 0 < ε ∧ thickening ε (({ q₀.fst } : Set P) ×ˢ k) ⊆ t\n    · exact A.exists_thickening_subset_open t_open kt\n    obtain ⟨δ, δpos, hδ⟩ : ∃ δ : ℝ, 0 < δ ∧ ball q₀.1 δ ⊆ s\n    · exact Metric.isOpen_iff.1 hs _ hq₀\n    refine' ⟨min ε δ, lt_min εpos δpos, _, _⟩\n    · exact Subset.trans (thickening_mono (min_le_left _ _) _) hε\n    · exact Subset.trans (ball_subset_ball (min_le_right _ _)) hδ\n  obtain ⟨C, Cpos, hC⟩ : ∃ C, 0 < C ∧ g' '' t ⊆ closedBall 0 C; exact ht.subset_ball_lt 0 0\n  refine' ⟨ε, C, εpos, h'ε, fun p x hp => _⟩\n  have hps : p ∈ s := h'ε (mem_ball_iff_norm.2 hp)\n  by_cases hx : x ∈ k\n  · have H : (p, x) ∈ t := by\n      apply hε\n      refine' mem_thickening_iff.2 ⟨(q₀.1, x), _, _⟩\n      · simp only [hx, singleton_prod, mem_image, Prod.mk.inj_iff, eq_self_iff_true, true_and_iff, exists_eq_right]\n      · rw [← dist_eq_norm] at hp \n        simpa only [Prod.dist_eq, εpos, dist_self, max_lt_iff, and_true_iff] using hp\n    have : g' (p, x) ∈ closedBall (0 : P × G →L[𝕜] E') C := hC (mem_image_of_mem _ H)\n    rwa [mem_closedBall_zero_iff] at this \n  · have : g' (p, x) = 0 := g'_zero _ _ hps hx\n    rw [this]\n    simpa only [norm_zero] using Cpos.le\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\n⊢ ∃ ε C, 0 < ε ∧ ball q₀.fst ε ⊆ s ∧ ∀ (p : P) (x : G), ‖p - q₀.fst‖ < ε → ‖g' (p, x)‖ ≤ C\n[PROOFSTEP]\nhave A : IsCompact ({q₀.1} ×ˢ k) := isCompact_singleton.prod hk\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA✝ : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nA : IsCompact ({q₀.fst} ×ˢ k)\n⊢ ∃ ε C, 0 < ε ∧ ball q₀.fst ε ⊆ s ∧ ∀ (p : P) (x : G), ‖p - q₀.fst‖ < ε → ‖g' (p, x)‖ ≤ C\n[PROOFSTEP]\nobtain ⟨t, kt, t_open, ht⟩ : ∃ t, {q₀.1} ×ˢ k ⊆ t ∧ IsOpen t ∧ Bounded (g' '' t) :=\n  by\n  have B : ContinuousOn g' (s ×ˢ univ) := hg.continuousOn_fderiv_of_open (hs.prod isOpen_univ) le_rfl\n  apply exists_isOpen_bounded_image_of_isCompact_of_continuousOn A (hs.prod isOpen_univ) _ B\n  simp only [prod_subset_prod_iff, hq₀, singleton_subset_iff, subset_univ, and_self_iff, true_or_iff]\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA✝ : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nA : IsCompact ({q₀.fst} ×ˢ k)\n⊢ ∃ t, {q₀.fst} ×ˢ k ⊆ t ∧ IsOpen t ∧ Metric.Bounded (g' '' t)\n[PROOFSTEP]\nhave B : ContinuousOn g' (s ×ˢ univ) := hg.continuousOn_fderiv_of_open (hs.prod isOpen_univ) le_rfl\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA✝ : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nA : IsCompact ({q₀.fst} ×ˢ k)\nB : ContinuousOn g' (s ×ˢ univ)\n⊢ ∃ t, {q₀.fst} ×ˢ k ⊆ t ∧ IsOpen t ∧ Metric.Bounded (g' '' t)\n[PROOFSTEP]\napply exists_isOpen_bounded_image_of_isCompact_of_continuousOn A (hs.prod isOpen_univ) _ B\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA✝ : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nA : IsCompact ({q₀.fst} ×ˢ k)\nB : ContinuousOn g' (s ×ˢ univ)\n⊢ {q₀.fst} ×ˢ k ⊆ s ×ˢ univ\n[PROOFSTEP]\nsimp only [prod_subset_prod_iff, hq₀, singleton_subset_iff, subset_univ, and_self_iff, true_or_iff]\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA✝ : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nA : IsCompact ({q₀.fst} ×ˢ k)\nt : Set (P × G)\nkt : {q₀.fst} ×ˢ k ⊆ t\nt_open : IsOpen t\nht : Metric.Bounded (g' '' t)\n⊢ ∃ ε C, 0 < ε ∧ ball q₀.fst ε ⊆ s ∧ ∀ (p : P) (x : G), ‖p - q₀.fst‖ < ε → ‖g' (p, x)‖ ≤ C\n[PROOFSTEP]\nobtain ⟨ε, εpos, hε, h'ε⟩ : ∃ ε : ℝ, 0 < ε ∧ thickening ε ({ q₀.fst } ×ˢ k) ⊆ t ∧ ball q₀.1 ε ⊆ s :=\n  by\n  obtain ⟨ε, εpos, hε⟩ : ∃ ε : ℝ, 0 < ε ∧ thickening ε (({ q₀.fst } : Set P) ×ˢ k) ⊆ t\n  · exact A.exists_thickening_subset_open t_open kt\n  obtain ⟨δ, δpos, hδ⟩ : ∃ δ : ℝ, 0 < δ ∧ ball q₀.1 δ ⊆ s\n  · exact Metric.isOpen_iff.1 hs _ hq₀\n  refine' ⟨min ε δ, lt_min εpos δpos, _, _⟩\n  · exact Subset.trans (thickening_mono (min_le_left _ _) _) hε\n  · exact Subset.trans (ball_subset_ball (min_le_right _ _)) hδ\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA✝ : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nA : IsCompact ({q₀.fst} ×ˢ k)\nt : Set (P × G)\nkt : {q₀.fst} ×ˢ k ⊆ t\nt_open : IsOpen t\nht : Metric.Bounded (g' '' t)\n⊢ ∃ ε, 0 < ε ∧ thickening ε ({q₀.fst} ×ˢ k) ⊆ t ∧ ball q₀.fst ε ⊆ s\n[PROOFSTEP]\nobtain ⟨ε, εpos, hε⟩ : ∃ ε : ℝ, 0 < ε ∧ thickening ε (({ q₀.fst } : Set P) ×ˢ k) ⊆ t\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA✝ : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nA : IsCompact ({q₀.fst} ×ˢ k)\nt : Set (P × G)\nkt : {q₀.fst} ×ˢ k ⊆ t\nt_open : IsOpen t\nht : Metric.Bounded (g' '' t)\n⊢ ∃ ε, 0 < ε ∧ thickening ε ({q₀.fst} ×ˢ k) ⊆ t\n[PROOFSTEP]\nexact A.exists_thickening_subset_open t_open kt\n[GOAL]\ncase intro.intro\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA✝ : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nA : IsCompact ({q₀.fst} ×ˢ k)\nt : Set (P × G)\nkt : {q₀.fst} ×ˢ k ⊆ t\nt_open : IsOpen t\nht : Metric.Bounded (g' '' t)\nε : ℝ\nεpos : 0 < ε\nhε : thickening ε ({q₀.fst} ×ˢ k) ⊆ t\n⊢ ∃ ε, 0 < ε ∧ thickening ε ({q₀.fst} ×ˢ k) ⊆ t ∧ ball q₀.fst ε ⊆ s\n[PROOFSTEP]\nobtain ⟨δ, δpos, hδ⟩ : ∃ δ : ℝ, 0 < δ ∧ ball q₀.1 δ ⊆ s\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA✝ : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nA : IsCompact ({q₀.fst} ×ˢ k)\nt : Set (P × G)\nkt : {q₀.fst} ×ˢ k ⊆ t\nt_open : IsOpen t\nht : Metric.Bounded (g' '' t)\nε : ℝ\nεpos : 0 < ε\nhε : thickening ε ({q₀.fst} ×ˢ k) ⊆ t\n⊢ ∃ δ, 0 < δ ∧ ball q₀.fst δ ⊆ s\n[PROOFSTEP]\nexact Metric.isOpen_iff.1 hs _ hq₀\n[GOAL]\ncase intro.intro.intro.intro\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA✝ : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nA : IsCompact ({q₀.fst} ×ˢ k)\nt : Set (P × G)\nkt : {q₀.fst} ×ˢ k ⊆ t\nt_open : IsOpen t\nht : Metric.Bounded (g' '' t)\nε : ℝ\nεpos : 0 < ε\nhε : thickening ε ({q₀.fst} ×ˢ k) ⊆ t\nδ : ℝ\nδpos : 0 < δ\nhδ : ball q₀.fst δ ⊆ s\n⊢ ∃ ε, 0 < ε ∧ thickening ε ({q₀.fst} ×ˢ k) ⊆ t ∧ ball q₀.fst ε ⊆ s\n[PROOFSTEP]\nrefine' ⟨min ε δ, lt_min εpos δpos, _, _⟩\n[GOAL]\ncase intro.intro.intro.intro.refine'_1\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA✝ : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nA : IsCompact ({q₀.fst} ×ˢ k)\nt : Set (P × G)\nkt : {q₀.fst} ×ˢ k ⊆ t\nt_open : IsOpen t\nht : Metric.Bounded (g' '' t)\nε : ℝ\nεpos : 0 < ε\nhε : thickening ε ({q₀.fst} ×ˢ k) ⊆ t\nδ : ℝ\nδpos : 0 < δ\nhδ : ball q₀.fst δ ⊆ s\n⊢ thickening (min ε δ) ({q₀.fst} ×ˢ k) ⊆ t\n[PROOFSTEP]\nexact Subset.trans (thickening_mono (min_le_left _ _) _) hε\n[GOAL]\ncase intro.intro.intro.intro.refine'_2\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA✝ : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nA : IsCompact ({q₀.fst} ×ˢ k)\nt : Set (P × G)\nkt : {q₀.fst} ×ˢ k ⊆ t\nt_open : IsOpen t\nht : Metric.Bounded (g' '' t)\nε : ℝ\nεpos : 0 < ε\nhε : thickening ε ({q₀.fst} ×ˢ k) ⊆ t\nδ : ℝ\nδpos : 0 < δ\nhδ : ball q₀.fst δ ⊆ s\n⊢ ball q₀.fst (min ε δ) ⊆ s\n[PROOFSTEP]\nexact Subset.trans (ball_subset_ball (min_le_right _ _)) hδ\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA✝ : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nA : IsCompact ({q₀.fst} ×ˢ k)\nt : Set (P × G)\nkt : {q₀.fst} ×ˢ k ⊆ t\nt_open : IsOpen t\nht : Metric.Bounded (g' '' t)\nε : ℝ\nεpos : 0 < ε\nhε : thickening ε ({q₀.fst} ×ˢ k) ⊆ t\nh'ε : ball q₀.fst ε ⊆ s\n⊢ ∃ ε C, 0 < ε ∧ ball q₀.fst ε ⊆ s ∧ ∀ (p : P) (x : G), ‖p - q₀.fst‖ < ε → ‖g' (p, x)‖ ≤ C\n[PROOFSTEP]\nobtain ⟨C, Cpos, hC⟩ : ∃ C, 0 < C ∧ g' '' t ⊆ closedBall 0 C\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA✝ : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nA : IsCompact ({q₀.fst} ×ˢ k)\nt : Set (P × G)\nkt : {q₀.fst} ×ˢ k ⊆ t\nt_open : IsOpen t\nht : Metric.Bounded (g' '' t)\nε : ℝ\nεpos : 0 < ε\nhε : thickening ε ({q₀.fst} ×ˢ k) ⊆ t\nh'ε : ball q₀.fst ε ⊆ s\n⊢ ∃ C, 0 < C ∧ g' '' t ⊆ closedBall 0 C\ncase intro.intro.intro.intro.intro.intro.intro.intro\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA✝ : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nA : IsCompact ({q₀.fst} ×ˢ k)\nt : Set (P × G)\nkt : {q₀.fst} ×ˢ k ⊆ t\nt_open : IsOpen t\nht : Metric.Bounded (g' '' t)\nε : ℝ\nεpos : 0 < ε\nhε : thickening ε ({q₀.fst} ×ˢ k) ⊆ t\nh'ε : ball q₀.fst ε ⊆ s\nC : ℝ\nCpos : 0 < C\nhC : g' '' t ⊆ closedBall 0 C\n⊢ ∃ ε C, 0 < ε ∧ ball q₀.fst ε ⊆ s ∧ ∀ (p : P) (x : G), ‖p - q₀.fst‖ < ε → ‖g' (p, x)‖ ≤ C\n[PROOFSTEP]\nexact ht.subset_ball_lt 0 0\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA✝ : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nA : IsCompact ({q₀.fst} ×ˢ k)\nt : Set (P × G)\nkt : {q₀.fst} ×ˢ k ⊆ t\nt_open : IsOpen t\nht : Metric.Bounded (g' '' t)\nε : ℝ\nεpos : 0 < ε\nhε : thickening ε ({q₀.fst} ×ˢ k) ⊆ t\nh'ε : ball q₀.fst ε ⊆ s\nC : ℝ\nCpos : 0 < C\nhC : g' '' t ⊆ closedBall 0 C\n⊢ ∃ ε C, 0 < ε ∧ ball q₀.fst ε ⊆ s ∧ ∀ (p : P) (x : G), ‖p - q₀.fst‖ < ε → ‖g' (p, x)‖ ≤ C\n[PROOFSTEP]\nrefine' ⟨ε, C, εpos, h'ε, fun p x hp => _⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA✝ : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nA : IsCompact ({q₀.fst} ×ˢ k)\nt : Set (P × G)\nkt : {q₀.fst} ×ˢ k ⊆ t\nt_open : IsOpen t\nht : Metric.Bounded (g' '' t)\nε : ℝ\nεpos : 0 < ε\nhε : thickening ε ({q₀.fst} ×ˢ k) ⊆ t\nh'ε : ball q₀.fst ε ⊆ s\nC : ℝ\nCpos : 0 < C\nhC : g' '' t ⊆ closedBall 0 C\np : P\nx : G\nhp : ‖p - q₀.fst‖ < ε\n⊢ ‖g' (p, x)‖ ≤ C\n[PROOFSTEP]\nhave hps : p ∈ s := h'ε (mem_ball_iff_norm.2 hp)\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA✝ : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nA : IsCompact ({q₀.fst} ×ˢ k)\nt : Set (P × G)\nkt : {q₀.fst} ×ˢ k ⊆ t\nt_open : IsOpen t\nht : Metric.Bounded (g' '' t)\nε : ℝ\nεpos : 0 < ε\nhε : thickening ε ({q₀.fst} ×ˢ k) ⊆ t\nh'ε : ball q₀.fst ε ⊆ s\nC : ℝ\nCpos : 0 < C\nhC : g' '' t ⊆ closedBall 0 C\np : P\nx : G\nhp : ‖p - q₀.fst‖ < ε\nhps : p ∈ s\n⊢ ‖g' (p, x)‖ ≤ C\n[PROOFSTEP]\nby_cases hx : x ∈ k\n[GOAL]\ncase pos\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA✝ : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nA : IsCompact ({q₀.fst} ×ˢ k)\nt : Set (P × G)\nkt : {q₀.fst} ×ˢ k ⊆ t\nt_open : IsOpen t\nht : Metric.Bounded (g' '' t)\nε : ℝ\nεpos : 0 < ε\nhε : thickening ε ({q₀.fst} ×ˢ k) ⊆ t\nh'ε : ball q₀.fst ε ⊆ s\nC : ℝ\nCpos : 0 < C\nhC : g' '' t ⊆ closedBall 0 C\np : P\nx : G\nhp : ‖p - q₀.fst‖ < ε\nhps : p ∈ s\nhx : x ∈ k\n⊢ ‖g' (p, x)‖ ≤ C\n[PROOFSTEP]\nhave H : (p, x) ∈ t := by\n  apply hε\n  refine' mem_thickening_iff.2 ⟨(q₀.1, x), _, _⟩\n  · simp only [hx, singleton_prod, mem_image, Prod.mk.inj_iff, eq_self_iff_true, true_and_iff, exists_eq_right]\n  · rw [← dist_eq_norm] at hp \n    simpa only [Prod.dist_eq, εpos, dist_self, max_lt_iff, and_true_iff] using hp\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA✝ : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nA : IsCompact ({q₀.fst} ×ˢ k)\nt : Set (P × G)\nkt : {q₀.fst} ×ˢ k ⊆ t\nt_open : IsOpen t\nht : Metric.Bounded (g' '' t)\nε : ℝ\nεpos : 0 < ε\nhε : thickening ε ({q₀.fst} ×ˢ k) ⊆ t\nh'ε : ball q₀.fst ε ⊆ s\nC : ℝ\nCpos : 0 < C\nhC : g' '' t ⊆ closedBall 0 C\np : P\nx : G\nhp : ‖p - q₀.fst‖ < ε\nhps : p ∈ s\nhx : x ∈ k\n⊢ (p, x) ∈ t\n[PROOFSTEP]\napply hε\n[GOAL]\ncase a\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA✝ : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nA : IsCompact ({q₀.fst} ×ˢ k)\nt : Set (P × G)\nkt : {q₀.fst} ×ˢ k ⊆ t\nt_open : IsOpen t\nht : Metric.Bounded (g' '' t)\nε : ℝ\nεpos : 0 < ε\nhε : thickening ε ({q₀.fst} ×ˢ k) ⊆ t\nh'ε : ball q₀.fst ε ⊆ s\nC : ℝ\nCpos : 0 < C\nhC : g' '' t ⊆ closedBall 0 C\np : P\nx : G\nhp : ‖p - q₀.fst‖ < ε\nhps : p ∈ s\nhx : x ∈ k\n⊢ (p, x) ∈ thickening ε ({q₀.fst} ×ˢ k)\n[PROOFSTEP]\nrefine' mem_thickening_iff.2 ⟨(q₀.1, x), _, _⟩\n[GOAL]\ncase a.refine'_1\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA✝ : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nA : IsCompact ({q₀.fst} ×ˢ k)\nt : Set (P × G)\nkt : {q₀.fst} ×ˢ k ⊆ t\nt_open : IsOpen t\nht : Metric.Bounded (g' '' t)\nε : ℝ\nεpos : 0 < ε\nhε : thickening ε ({q₀.fst} ×ˢ k) ⊆ t\nh'ε : ball q₀.fst ε ⊆ s\nC : ℝ\nCpos : 0 < C\nhC : g' '' t ⊆ closedBall 0 C\np : P\nx : G\nhp : ‖p - q₀.fst‖ < ε\nhps : p ∈ s\nhx : x ∈ k\n⊢ (q₀.fst, x) ∈ {q₀.fst} ×ˢ k\n[PROOFSTEP]\nsimp only [hx, singleton_prod, mem_image, Prod.mk.inj_iff, eq_self_iff_true, true_and_iff, exists_eq_right]\n[GOAL]\ncase a.refine'_2\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA✝ : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nA : IsCompact ({q₀.fst} ×ˢ k)\nt : Set (P × G)\nkt : {q₀.fst} ×ˢ k ⊆ t\nt_open : IsOpen t\nht : Metric.Bounded (g' '' t)\nε : ℝ\nεpos : 0 < ε\nhε : thickening ε ({q₀.fst} ×ˢ k) ⊆ t\nh'ε : ball q₀.fst ε ⊆ s\nC : ℝ\nCpos : 0 < C\nhC : g' '' t ⊆ closedBall 0 C\np : P\nx : G\nhp : ‖p - q₀.fst‖ < ε\nhps : p ∈ s\nhx : x ∈ k\n⊢ dist (p, x) (q₀.fst, x) < ε\n[PROOFSTEP]\nrw [← dist_eq_norm] at hp \n[GOAL]\ncase a.refine'_2\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA✝ : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nA : IsCompact ({q₀.fst} ×ˢ k)\nt : Set (P × G)\nkt : {q₀.fst} ×ˢ k ⊆ t\nt_open : IsOpen t\nht : Metric.Bounded (g' '' t)\nε : ℝ\nεpos : 0 < ε\nhε : thickening ε ({q₀.fst} ×ˢ k) ⊆ t\nh'ε : ball q₀.fst ε ⊆ s\nC : ℝ\nCpos : 0 < C\nhC : g' '' t ⊆ closedBall 0 C\np : P\nx : G\nhp : dist p q₀.fst < ε\nhps : p ∈ s\nhx : x ∈ k\n⊢ dist (p, x) (q₀.fst, x) < ε\n[PROOFSTEP]\nsimpa only [Prod.dist_eq, εpos, dist_self, max_lt_iff, and_true_iff] using hp\n[GOAL]\ncase pos\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA✝ : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nA : IsCompact ({q₀.fst} ×ˢ k)\nt : Set (P × G)\nkt : {q₀.fst} ×ˢ k ⊆ t\nt_open : IsOpen t\nht : Metric.Bounded (g' '' t)\nε : ℝ\nεpos : 0 < ε\nhε : thickening ε ({q₀.fst} ×ˢ k) ⊆ t\nh'ε : ball q₀.fst ε ⊆ s\nC : ℝ\nCpos : 0 < C\nhC : g' '' t ⊆ closedBall 0 C\np : P\nx : G\nhp : ‖p - q₀.fst‖ < ε\nhps : p ∈ s\nhx : x ∈ k\nH : (p, x) ∈ t\n⊢ ‖g' (p, x)‖ ≤ C\n[PROOFSTEP]\nhave : g' (p, x) ∈ closedBall (0 : P × G →L[𝕜] E') C := hC (mem_image_of_mem _ H)\n[GOAL]\ncase pos\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA✝ : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nA : IsCompact ({q₀.fst} ×ˢ k)\nt : Set (P × G)\nkt : {q₀.fst} ×ˢ k ⊆ t\nt_open : IsOpen t\nht : Metric.Bounded (g' '' t)\nε : ℝ\nεpos : 0 < ε\nhε : thickening ε ({q₀.fst} ×ˢ k) ⊆ t\nh'ε : ball q₀.fst ε ⊆ s\nC : ℝ\nCpos : 0 < C\nhC : g' '' t ⊆ closedBall 0 C\np : P\nx : G\nhp : ‖p - q₀.fst‖ < ε\nhps : p ∈ s\nhx : x ∈ k\nH : (p, x) ∈ t\nthis : g' (p, x) ∈ closedBall 0 C\n⊢ ‖g' (p, x)‖ ≤ C\n[PROOFSTEP]\nrwa [mem_closedBall_zero_iff] at this \n[GOAL]\ncase neg\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA✝ : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nA : IsCompact ({q₀.fst} ×ˢ k)\nt : Set (P × G)\nkt : {q₀.fst} ×ˢ k ⊆ t\nt_open : IsOpen t\nht : Metric.Bounded (g' '' t)\nε : ℝ\nεpos : 0 < ε\nhε : thickening ε ({q₀.fst} ×ˢ k) ⊆ t\nh'ε : ball q₀.fst ε ⊆ s\nC : ℝ\nCpos : 0 < C\nhC : g' '' t ⊆ closedBall 0 C\np : P\nx : G\nhp : ‖p - q₀.fst‖ < ε\nhps : p ∈ s\nhx : ¬x ∈ k\n⊢ ‖g' (p, x)‖ ≤ C\n[PROOFSTEP]\nhave : g' (p, x) = 0 := g'_zero _ _ hps hx\n[GOAL]\ncase neg\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA✝ : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nA : IsCompact ({q₀.fst} ×ˢ k)\nt : Set (P × G)\nkt : {q₀.fst} ×ˢ k ⊆ t\nt_open : IsOpen t\nht : Metric.Bounded (g' '' t)\nε : ℝ\nεpos : 0 < ε\nhε : thickening ε ({q₀.fst} ×ˢ k) ⊆ t\nh'ε : ball q₀.fst ε ⊆ s\nC : ℝ\nCpos : 0 < C\nhC : g' '' t ⊆ closedBall 0 C\np : P\nx : G\nhp : ‖p - q₀.fst‖ < ε\nhps : p ∈ s\nhx : ¬x ∈ k\nthis : g' (p, x) = 0\n⊢ ‖g' (p, x)‖ ≤ C\n[PROOFSTEP]\nrw [this]\n[GOAL]\ncase neg\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA✝ : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nA : IsCompact ({q₀.fst} ×ˢ k)\nt : Set (P × G)\nkt : {q₀.fst} ×ˢ k ⊆ t\nt_open : IsOpen t\nht : Metric.Bounded (g' '' t)\nε : ℝ\nεpos : 0 < ε\nhε : thickening ε ({q₀.fst} ×ˢ k) ⊆ t\nh'ε : ball q₀.fst ε ⊆ s\nC : ℝ\nCpos : 0 < C\nhC : g' '' t ⊆ closedBall 0 C\np : P\nx : G\nhp : ‖p - q₀.fst‖ < ε\nhps : p ∈ s\nhx : ¬x ∈ k\nthis : g' (p, x) = 0\n⊢ ‖0‖ ≤ C\n[PROOFSTEP]\nsimpa only [norm_zero] using Cpos.le\n[GOAL]\ncase intro.intro.intro.intro\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nε C : ℝ\nεpos : 0 < ε\nh₀ε : ball q₀.fst ε ⊆ s\nhε : ∀ (p : P) (x : G), ‖p - q₀.fst‖ < ε → ‖g' (p, x)‖ ≤ C\n⊢ HasFDerivAt (fun q => f ⋆[L, q.snd] g q.fst) (f ⋆[precompR (P × G) L, q₀.snd] fun x => fderiv 𝕜 (↿g) (q₀.fst, x)) q₀\n[PROOFSTEP]\nhave I1 : ∀ᶠ x : P × G in 𝓝 q₀, AEStronglyMeasurable (fun a : G => L (f a) (g x.1 (x.2 - a))) μ :=\n  by\n  filter_upwards [A' q₀ hq₀]\n  rintro ⟨p, x⟩ ⟨hp, -⟩\n  refine' (HasCompactSupport.convolutionExists_right L _ hf (A _ hp) _).1\n  apply isCompact_of_isClosed_subset hk (isClosed_tsupport _)\n  exact closure_minimal (support_subset_iff'.2 fun z hz => hgs _ _ hp hz) hk.isClosed\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nε C : ℝ\nεpos : 0 < ε\nh₀ε : ball q₀.fst ε ⊆ s\nhε : ∀ (p : P) (x : G), ‖p - q₀.fst‖ < ε → ‖g' (p, x)‖ ≤ C\n⊢ ∀ᶠ (x : P × G) in 𝓝 q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g x.fst (x.snd - a))) μ\n[PROOFSTEP]\nfilter_upwards [A' q₀ hq₀]\n[GOAL]\ncase h\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nε C : ℝ\nεpos : 0 < ε\nh₀ε : ball q₀.fst ε ⊆ s\nhε : ∀ (p : P) (x : G), ‖p - q₀.fst‖ < ε → ‖g' (p, x)‖ ≤ C\n⊢ ∀ (a : P × G), a ∈ s ×ˢ univ → AEStronglyMeasurable (fun a_2 => ↑(↑L (f a_2)) (g a.fst (a.snd - a_2))) μ\n[PROOFSTEP]\nrintro ⟨p, x⟩ ⟨hp, -⟩\n[GOAL]\ncase h.mk.intro\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nε C : ℝ\nεpos : 0 < ε\nh₀ε : ball q₀.fst ε ⊆ s\nhε : ∀ (p : P) (x : G), ‖p - q₀.fst‖ < ε → ‖g' (p, x)‖ ≤ C\np : P\nx : G\nhp : (p, x).fst ∈ s\n⊢ AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g (p, x).fst ((p, x).snd - a))) μ\n[PROOFSTEP]\nrefine' (HasCompactSupport.convolutionExists_right L _ hf (A _ hp) _).1\n[GOAL]\ncase h.mk.intro\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nε C : ℝ\nεpos : 0 < ε\nh₀ε : ball q₀.fst ε ⊆ s\nhε : ∀ (p : P) (x : G), ‖p - q₀.fst‖ < ε → ‖g' (p, x)‖ ≤ C\np : P\nx : G\nhp : (p, x).fst ∈ s\n⊢ HasCompactSupport (g (p, x).fst)\n[PROOFSTEP]\napply isCompact_of_isClosed_subset hk (isClosed_tsupport _)\n[GOAL]\ncase h.mk.intro\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nε C : ℝ\nεpos : 0 < ε\nh₀ε : ball q₀.fst ε ⊆ s\nhε : ∀ (p : P) (x : G), ‖p - q₀.fst‖ < ε → ‖g' (p, x)‖ ≤ C\np : P\nx : G\nhp : (p, x).fst ∈ s\n⊢ tsupport (g (p, x).fst) ⊆ k\n[PROOFSTEP]\nexact closure_minimal (support_subset_iff'.2 fun z hz => hgs _ _ hp hz) hk.isClosed\n[GOAL]\ncase intro.intro.intro.intro\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nε C : ℝ\nεpos : 0 < ε\nh₀ε : ball q₀.fst ε ⊆ s\nhε : ∀ (p : P) (x : G), ‖p - q₀.fst‖ < ε → ‖g' (p, x)‖ ≤ C\nI1 : ∀ᶠ (x : P × G) in 𝓝 q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g x.fst (x.snd - a))) μ\n⊢ HasFDerivAt (fun q => f ⋆[L, q.snd] g q.fst) (f ⋆[precompR (P × G) L, q₀.snd] fun x => fderiv 𝕜 (↿g) (q₀.fst, x)) q₀\n[PROOFSTEP]\nhave I2 : Integrable (fun a : G => L (f a) (g q₀.1 (q₀.2 - a))) μ :=\n  by\n  have M : HasCompactSupport (g q₀.1) := HasCompactSupport.intro hk fun x hx => hgs q₀.1 x hq₀ hx\n  apply M.convolutionExists_right L hf (A q₀.1 hq₀) q₀.2\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nε C : ℝ\nεpos : 0 < ε\nh₀ε : ball q₀.fst ε ⊆ s\nhε : ∀ (p : P) (x : G), ‖p - q₀.fst‖ < ε → ‖g' (p, x)‖ ≤ C\nI1 : ∀ᶠ (x : P × G) in 𝓝 q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g x.fst (x.snd - a))) μ\n⊢ Integrable fun a => ↑(↑L (f a)) (g q₀.fst (q₀.snd - a))\n[PROOFSTEP]\nhave M : HasCompactSupport (g q₀.1) := HasCompactSupport.intro hk fun x hx => hgs q₀.1 x hq₀ hx\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nε C : ℝ\nεpos : 0 < ε\nh₀ε : ball q₀.fst ε ⊆ s\nhε : ∀ (p : P) (x : G), ‖p - q₀.fst‖ < ε → ‖g' (p, x)‖ ≤ C\nI1 : ∀ᶠ (x : P × G) in 𝓝 q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g x.fst (x.snd - a))) μ\nM : HasCompactSupport (g q₀.fst)\n⊢ Integrable fun a => ↑(↑L (f a)) (g q₀.fst (q₀.snd - a))\n[PROOFSTEP]\napply M.convolutionExists_right L hf (A q₀.1 hq₀) q₀.2\n[GOAL]\ncase intro.intro.intro.intro\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nε C : ℝ\nεpos : 0 < ε\nh₀ε : ball q₀.fst ε ⊆ s\nhε : ∀ (p : P) (x : G), ‖p - q₀.fst‖ < ε → ‖g' (p, x)‖ ≤ C\nI1 : ∀ᶠ (x : P × G) in 𝓝 q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g x.fst (x.snd - a))) μ\nI2 : Integrable fun a => ↑(↑L (f a)) (g q₀.fst (q₀.snd - a))\n⊢ HasFDerivAt (fun q => f ⋆[L, q.snd] g q.fst) (f ⋆[precompR (P × G) L, q₀.snd] fun x => fderiv 𝕜 (↿g) (q₀.fst, x)) q₀\n[PROOFSTEP]\nhave I3 : AEStronglyMeasurable (fun a : G => (L (f a)).comp (g' (q₀.fst, q₀.snd - a))) μ :=\n  by\n  have T : HasCompactSupport fun y => g' (q₀.1, y) := HasCompactSupport.intro hk fun x hx => g'_zero q₀.1 x hq₀ hx\n  apply (HasCompactSupport.convolutionExists_right (L.precompR (P × G) : _) T hf _ q₀.2).1\n  have : ContinuousOn g' (s ×ˢ univ) := hg.continuousOn_fderiv_of_open (hs.prod isOpen_univ) le_rfl\n  apply this.comp_continuous (continuous_const.prod_mk continuous_id')\n  intro x\n  simpa only [prod_mk_mem_set_prod_eq, mem_univ, and_true_iff] using hq₀\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nε C : ℝ\nεpos : 0 < ε\nh₀ε : ball q₀.fst ε ⊆ s\nhε : ∀ (p : P) (x : G), ‖p - q₀.fst‖ < ε → ‖g' (p, x)‖ ≤ C\nI1 : ∀ᶠ (x : P × G) in 𝓝 q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g x.fst (x.snd - a))) μ\nI2 : Integrable fun a => ↑(↑L (f a)) (g q₀.fst (q₀.snd - a))\n⊢ AEStronglyMeasurable (fun a => ContinuousLinearMap.comp (↑L (f a)) (g' (q₀.fst, q₀.snd - a))) μ\n[PROOFSTEP]\nhave T : HasCompactSupport fun y => g' (q₀.1, y) := HasCompactSupport.intro hk fun x hx => g'_zero q₀.1 x hq₀ hx\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nε C : ℝ\nεpos : 0 < ε\nh₀ε : ball q₀.fst ε ⊆ s\nhε : ∀ (p : P) (x : G), ‖p - q₀.fst‖ < ε → ‖g' (p, x)‖ ≤ C\nI1 : ∀ᶠ (x : P × G) in 𝓝 q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g x.fst (x.snd - a))) μ\nI2 : Integrable fun a => ↑(↑L (f a)) (g q₀.fst (q₀.snd - a))\nT : HasCompactSupport fun y => g' (q₀.fst, y)\n⊢ AEStronglyMeasurable (fun a => ContinuousLinearMap.comp (↑L (f a)) (g' (q₀.fst, q₀.snd - a))) μ\n[PROOFSTEP]\napply (HasCompactSupport.convolutionExists_right (L.precompR (P × G) : _) T hf _ q₀.2).1\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nε C : ℝ\nεpos : 0 < ε\nh₀ε : ball q₀.fst ε ⊆ s\nhε : ∀ (p : P) (x : G), ‖p - q₀.fst‖ < ε → ‖g' (p, x)‖ ≤ C\nI1 : ∀ᶠ (x : P × G) in 𝓝 q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g x.fst (x.snd - a))) μ\nI2 : Integrable fun a => ↑(↑L (f a)) (g q₀.fst (q₀.snd - a))\nT : HasCompactSupport fun y => g' (q₀.fst, y)\n⊢ Continuous fun y => g' (q₀.fst, y)\n[PROOFSTEP]\nhave : ContinuousOn g' (s ×ˢ univ) := hg.continuousOn_fderiv_of_open (hs.prod isOpen_univ) le_rfl\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nε C : ℝ\nεpos : 0 < ε\nh₀ε : ball q₀.fst ε ⊆ s\nhε : ∀ (p : P) (x : G), ‖p - q₀.fst‖ < ε → ‖g' (p, x)‖ ≤ C\nI1 : ∀ᶠ (x : P × G) in 𝓝 q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g x.fst (x.snd - a))) μ\nI2 : Integrable fun a => ↑(↑L (f a)) (g q₀.fst (q₀.snd - a))\nT : HasCompactSupport fun y => g' (q₀.fst, y)\nthis : ContinuousOn g' (s ×ˢ univ)\n⊢ Continuous fun y => g' (q₀.fst, y)\n[PROOFSTEP]\napply this.comp_continuous (continuous_const.prod_mk continuous_id')\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nε C : ℝ\nεpos : 0 < ε\nh₀ε : ball q₀.fst ε ⊆ s\nhε : ∀ (p : P) (x : G), ‖p - q₀.fst‖ < ε → ‖g' (p, x)‖ ≤ C\nI1 : ∀ᶠ (x : P × G) in 𝓝 q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g x.fst (x.snd - a))) μ\nI2 : Integrable fun a => ↑(↑L (f a)) (g q₀.fst (q₀.snd - a))\nT : HasCompactSupport fun y => g' (q₀.fst, y)\nthis : ContinuousOn g' (s ×ˢ univ)\n⊢ ∀ (x : G), (q₀.fst, x) ∈ s ×ˢ univ\n[PROOFSTEP]\nintro x\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nε C : ℝ\nεpos : 0 < ε\nh₀ε : ball q₀.fst ε ⊆ s\nhε : ∀ (p : P) (x : G), ‖p - q₀.fst‖ < ε → ‖g' (p, x)‖ ≤ C\nI1 : ∀ᶠ (x : P × G) in 𝓝 q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g x.fst (x.snd - a))) μ\nI2 : Integrable fun a => ↑(↑L (f a)) (g q₀.fst (q₀.snd - a))\nT : HasCompactSupport fun y => g' (q₀.fst, y)\nthis : ContinuousOn g' (s ×ˢ univ)\nx : G\n⊢ (q₀.fst, x) ∈ s ×ˢ univ\n[PROOFSTEP]\nsimpa only [prod_mk_mem_set_prod_eq, mem_univ, and_true_iff] using hq₀\n[GOAL]\ncase intro.intro.intro.intro\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nε C : ℝ\nεpos : 0 < ε\nh₀ε : ball q₀.fst ε ⊆ s\nhε : ∀ (p : P) (x : G), ‖p - q₀.fst‖ < ε → ‖g' (p, x)‖ ≤ C\nI1 : ∀ᶠ (x : P × G) in 𝓝 q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g x.fst (x.snd - a))) μ\nI2 : Integrable fun a => ↑(↑L (f a)) (g q₀.fst (q₀.snd - a))\nI3 : AEStronglyMeasurable (fun a => ContinuousLinearMap.comp (↑L (f a)) (g' (q₀.fst, q₀.snd - a))) μ\n⊢ HasFDerivAt (fun q => f ⋆[L, q.snd] g q.fst) (f ⋆[precompR (P × G) L, q₀.snd] fun x => fderiv 𝕜 (↿g) (q₀.fst, x)) q₀\n[PROOFSTEP]\nset K' := (-k + {q₀.2} : Set G) with K'_def\n[GOAL]\ncase intro.intro.intro.intro\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nε C : ℝ\nεpos : 0 < ε\nh₀ε : ball q₀.fst ε ⊆ s\nhε : ∀ (p : P) (x : G), ‖p - q₀.fst‖ < ε → ‖g' (p, x)‖ ≤ C\nI1 : ∀ᶠ (x : P × G) in 𝓝 q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g x.fst (x.snd - a))) μ\nI2 : Integrable fun a => ↑(↑L (f a)) (g q₀.fst (q₀.snd - a))\nI3 : AEStronglyMeasurable (fun a => ContinuousLinearMap.comp (↑L (f a)) (g' (q₀.fst, q₀.snd - a))) μ\nK' : Set G := -k + {q₀.snd}\nK'_def : K' = -k + {q₀.snd}\n⊢ HasFDerivAt (fun q => f ⋆[L, q.snd] g q.fst) (f ⋆[precompR (P × G) L, q₀.snd] fun x => fderiv 𝕜 (↿g) (q₀.fst, x)) q₀\n[PROOFSTEP]\nhave hK' : IsCompact K' := hk.neg.add isCompact_singleton\n[GOAL]\ncase intro.intro.intro.intro\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nε C : ℝ\nεpos : 0 < ε\nh₀ε : ball q₀.fst ε ⊆ s\nhε : ∀ (p : P) (x : G), ‖p - q₀.fst‖ < ε → ‖g' (p, x)‖ ≤ C\nI1 : ∀ᶠ (x : P × G) in 𝓝 q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g x.fst (x.snd - a))) μ\nI2 : Integrable fun a => ↑(↑L (f a)) (g q₀.fst (q₀.snd - a))\nI3 : AEStronglyMeasurable (fun a => ContinuousLinearMap.comp (↑L (f a)) (g' (q₀.fst, q₀.snd - a))) μ\nK' : Set G := -k + {q₀.snd}\nK'_def : K' = -k + {q₀.snd}\nhK' : IsCompact K'\n⊢ HasFDerivAt (fun q => f ⋆[L, q.snd] g q.fst) (f ⋆[precompR (P × G) L, q₀.snd] fun x => fderiv 𝕜 (↿g) (q₀.fst, x)) q₀\n[PROOFSTEP]\nobtain ⟨U, U_open, K'U, hU⟩ : ∃ U, IsOpen U ∧ K' ⊆ U ∧ IntegrableOn f U μ\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nε C : ℝ\nεpos : 0 < ε\nh₀ε : ball q₀.fst ε ⊆ s\nhε : ∀ (p : P) (x : G), ‖p - q₀.fst‖ < ε → ‖g' (p, x)‖ ≤ C\nI1 : ∀ᶠ (x : P × G) in 𝓝 q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g x.fst (x.snd - a))) μ\nI2 : Integrable fun a => ↑(↑L (f a)) (g q₀.fst (q₀.snd - a))\nI3 : AEStronglyMeasurable (fun a => ContinuousLinearMap.comp (↑L (f a)) (g' (q₀.fst, q₀.snd - a))) μ\nK' : Set G := -k + {q₀.snd}\nK'_def : K' = -k + {q₀.snd}\nhK' : IsCompact K'\n⊢ ∃ U, IsOpen U ∧ K' ⊆ U ∧ IntegrableOn f U\ncase intro.intro.intro.intro.intro.intro.intro\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nε C : ℝ\nεpos : 0 < ε\nh₀ε : ball q₀.fst ε ⊆ s\nhε : ∀ (p : P) (x : G), ‖p - q₀.fst‖ < ε → ‖g' (p, x)‖ ≤ C\nI1 : ∀ᶠ (x : P × G) in 𝓝 q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g x.fst (x.snd - a))) μ\nI2 : Integrable fun a => ↑(↑L (f a)) (g q₀.fst (q₀.snd - a))\nI3 : AEStronglyMeasurable (fun a => ContinuousLinearMap.comp (↑L (f a)) (g' (q₀.fst, q₀.snd - a))) μ\nK' : Set G := -k + {q₀.snd}\nK'_def : K' = -k + {q₀.snd}\nhK' : IsCompact K'\nU : Set G\nU_open : IsOpen U\nK'U : K' ⊆ U\nhU : IntegrableOn f U\n⊢ HasFDerivAt (fun q => f ⋆[L, q.snd] g q.fst) (f ⋆[precompR (P × G) L, q₀.snd] fun x => fderiv 𝕜 (↿g) (q₀.fst, x)) q₀\n[PROOFSTEP]\nexact hf.integrableOn_nhds_isCompact hK'\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nε C : ℝ\nεpos : 0 < ε\nh₀ε : ball q₀.fst ε ⊆ s\nhε : ∀ (p : P) (x : G), ‖p - q₀.fst‖ < ε → ‖g' (p, x)‖ ≤ C\nI1 : ∀ᶠ (x : P × G) in 𝓝 q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g x.fst (x.snd - a))) μ\nI2 : Integrable fun a => ↑(↑L (f a)) (g q₀.fst (q₀.snd - a))\nI3 : AEStronglyMeasurable (fun a => ContinuousLinearMap.comp (↑L (f a)) (g' (q₀.fst, q₀.snd - a))) μ\nK' : Set G := -k + {q₀.snd}\nK'_def : K' = -k + {q₀.snd}\nhK' : IsCompact K'\nU : Set G\nU_open : IsOpen U\nK'U : K' ⊆ U\nhU : IntegrableOn f U\n⊢ HasFDerivAt (fun q => f ⋆[L, q.snd] g q.fst) (f ⋆[precompR (P × G) L, q₀.snd] fun x => fderiv 𝕜 (↿g) (q₀.fst, x)) q₀\n[PROOFSTEP]\nobtain ⟨δ, δpos, δε, hδ⟩ : ∃ δ, (0 : ℝ) < δ ∧ δ ≤ ε ∧ K' + ball 0 δ ⊆ U :=\n  by\n  obtain ⟨V, V_mem, hV⟩ : ∃ V ∈ 𝓝 (0 : G), K' + V ⊆ U := compact_open_separated_add_right hK' U_open K'U\n  rcases Metric.mem_nhds_iff.1 V_mem with ⟨δ, δpos, hδ⟩\n  refine' ⟨min δ ε, lt_min δpos εpos, min_le_right δ ε, _⟩\n  exact (add_subset_add_left ((ball_subset_ball (min_le_left _ _)).trans hδ)).trans hV\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nε C : ℝ\nεpos : 0 < ε\nh₀ε : ball q₀.fst ε ⊆ s\nhε : ∀ (p : P) (x : G), ‖p - q₀.fst‖ < ε → ‖g' (p, x)‖ ≤ C\nI1 : ∀ᶠ (x : P × G) in 𝓝 q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g x.fst (x.snd - a))) μ\nI2 : Integrable fun a => ↑(↑L (f a)) (g q₀.fst (q₀.snd - a))\nI3 : AEStronglyMeasurable (fun a => ContinuousLinearMap.comp (↑L (f a)) (g' (q₀.fst, q₀.snd - a))) μ\nK' : Set G := -k + {q₀.snd}\nK'_def : K' = -k + {q₀.snd}\nhK' : IsCompact K'\nU : Set G\nU_open : IsOpen U\nK'U : K' ⊆ U\nhU : IntegrableOn f U\n⊢ ∃ δ, 0 < δ ∧ δ ≤ ε ∧ K' + ball 0 δ ⊆ U\n[PROOFSTEP]\nobtain ⟨V, V_mem, hV⟩ : ∃ V ∈ 𝓝 (0 : G), K' + V ⊆ U := compact_open_separated_add_right hK' U_open K'U\n[GOAL]\ncase intro.intro\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nε C : ℝ\nεpos : 0 < ε\nh₀ε : ball q₀.fst ε ⊆ s\nhε : ∀ (p : P) (x : G), ‖p - q₀.fst‖ < ε → ‖g' (p, x)‖ ≤ C\nI1 : ∀ᶠ (x : P × G) in 𝓝 q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g x.fst (x.snd - a))) μ\nI2 : Integrable fun a => ↑(↑L (f a)) (g q₀.fst (q₀.snd - a))\nI3 : AEStronglyMeasurable (fun a => ContinuousLinearMap.comp (↑L (f a)) (g' (q₀.fst, q₀.snd - a))) μ\nK' : Set G := -k + {q₀.snd}\nK'_def : K' = -k + {q₀.snd}\nhK' : IsCompact K'\nU : Set G\nU_open : IsOpen U\nK'U : K' ⊆ U\nhU : IntegrableOn f U\nV : Set G\nV_mem : V ∈ 𝓝 0\nhV : K' + V ⊆ U\n⊢ ∃ δ, 0 < δ ∧ δ ≤ ε ∧ K' + ball 0 δ ⊆ U\n[PROOFSTEP]\nrcases Metric.mem_nhds_iff.1 V_mem with ⟨δ, δpos, hδ⟩\n[GOAL]\ncase intro.intro.intro.intro\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nε C : ℝ\nεpos : 0 < ε\nh₀ε : ball q₀.fst ε ⊆ s\nhε : ∀ (p : P) (x : G), ‖p - q₀.fst‖ < ε → ‖g' (p, x)‖ ≤ C\nI1 : ∀ᶠ (x : P × G) in 𝓝 q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g x.fst (x.snd - a))) μ\nI2 : Integrable fun a => ↑(↑L (f a)) (g q₀.fst (q₀.snd - a))\nI3 : AEStronglyMeasurable (fun a => ContinuousLinearMap.comp (↑L (f a)) (g' (q₀.fst, q₀.snd - a))) μ\nK' : Set G := -k + {q₀.snd}\nK'_def : K' = -k + {q₀.snd}\nhK' : IsCompact K'\nU : Set G\nU_open : IsOpen U\nK'U : K' ⊆ U\nhU : IntegrableOn f U\nV : Set G\nV_mem : V ∈ 𝓝 0\nhV : K' + V ⊆ U\nδ : ℝ\nδpos : δ > 0\nhδ : ball 0 δ ⊆ V\n⊢ ∃ δ, 0 < δ ∧ δ ≤ ε ∧ K' + ball 0 δ ⊆ U\n[PROOFSTEP]\nrefine' ⟨min δ ε, lt_min δpos εpos, min_le_right δ ε, _⟩\n[GOAL]\ncase intro.intro.intro.intro\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nε C : ℝ\nεpos : 0 < ε\nh₀ε : ball q₀.fst ε ⊆ s\nhε : ∀ (p : P) (x : G), ‖p - q₀.fst‖ < ε → ‖g' (p, x)‖ ≤ C\nI1 : ∀ᶠ (x : P × G) in 𝓝 q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g x.fst (x.snd - a))) μ\nI2 : Integrable fun a => ↑(↑L (f a)) (g q₀.fst (q₀.snd - a))\nI3 : AEStronglyMeasurable (fun a => ContinuousLinearMap.comp (↑L (f a)) (g' (q₀.fst, q₀.snd - a))) μ\nK' : Set G := -k + {q₀.snd}\nK'_def : K' = -k + {q₀.snd}\nhK' : IsCompact K'\nU : Set G\nU_open : IsOpen U\nK'U : K' ⊆ U\nhU : IntegrableOn f U\nV : Set G\nV_mem : V ∈ 𝓝 0\nhV : K' + V ⊆ U\nδ : ℝ\nδpos : δ > 0\nhδ : ball 0 δ ⊆ V\n⊢ K' + ball 0 (min δ ε) ⊆ U\n[PROOFSTEP]\nexact (add_subset_add_left ((ball_subset_ball (min_le_left _ _)).trans hδ)).trans hV\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nε C : ℝ\nεpos : 0 < ε\nh₀ε : ball q₀.fst ε ⊆ s\nhε : ∀ (p : P) (x : G), ‖p - q₀.fst‖ < ε → ‖g' (p, x)‖ ≤ C\nI1 : ∀ᶠ (x : P × G) in 𝓝 q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g x.fst (x.snd - a))) μ\nI2 : Integrable fun a => ↑(↑L (f a)) (g q₀.fst (q₀.snd - a))\nI3 : AEStronglyMeasurable (fun a => ContinuousLinearMap.comp (↑L (f a)) (g' (q₀.fst, q₀.snd - a))) μ\nK' : Set G := -k + {q₀.snd}\nK'_def : K' = -k + {q₀.snd}\nhK' : IsCompact K'\nU : Set G\nU_open : IsOpen U\nK'U : K' ⊆ U\nhU : IntegrableOn f U\nδ : ℝ\nδpos : 0 < δ\nδε : δ ≤ ε\nhδ : K' + ball 0 δ ⊆ U\n⊢ HasFDerivAt (fun q => f ⋆[L, q.snd] g q.fst) (f ⋆[precompR (P × G) L, q₀.snd] fun x => fderiv 𝕜 (↿g) (q₀.fst, x)) q₀\n[PROOFSTEP]\nletI :=\n  ContinuousLinearMap.hasOpNorm (𝕜 := 𝕜) (𝕜₂ := 𝕜) (E := E) (F := (P × G →L[𝕜] E') →L[𝕜] P × G →L[𝕜] F) (σ₁₂ :=\n    RingHom.id 𝕜)\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nε C : ℝ\nεpos : 0 < ε\nh₀ε : ball q₀.fst ε ⊆ s\nhε : ∀ (p : P) (x : G), ‖p - q₀.fst‖ < ε → ‖g' (p, x)‖ ≤ C\nI1 : ∀ᶠ (x : P × G) in 𝓝 q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g x.fst (x.snd - a))) μ\nI2 : Integrable fun a => ↑(↑L (f a)) (g q₀.fst (q₀.snd - a))\nI3 : AEStronglyMeasurable (fun a => ContinuousLinearMap.comp (↑L (f a)) (g' (q₀.fst, q₀.snd - a))) μ\nK' : Set G := -k + {q₀.snd}\nK'_def : K' = -k + {q₀.snd}\nhK' : IsCompact K'\nU : Set G\nU_open : IsOpen U\nK'U : K' ⊆ U\nhU : IntegrableOn f U\nδ : ℝ\nδpos : 0 < δ\nδε : δ ≤ ε\nhδ : K' + ball 0 δ ⊆ U\nthis : Norm (E →L[𝕜] (P × G →L[𝕜] E') →L[𝕜] P × G →L[𝕜] F) := hasOpNorm\n⊢ HasFDerivAt (fun q => f ⋆[L, q.snd] g q.fst) (f ⋆[precompR (P × G) L, q₀.snd] fun x => fderiv 𝕜 (↿g) (q₀.fst, x)) q₀\n[PROOFSTEP]\nlet bound : G → ℝ := indicator U fun t => ‖(L.precompR (P × G))‖ * ‖f t‖ * C\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nε C : ℝ\nεpos : 0 < ε\nh₀ε : ball q₀.fst ε ⊆ s\nhε : ∀ (p : P) (x : G), ‖p - q₀.fst‖ < ε → ‖g' (p, x)‖ ≤ C\nI1 : ∀ᶠ (x : P × G) in 𝓝 q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g x.fst (x.snd - a))) μ\nI2 : Integrable fun a => ↑(↑L (f a)) (g q₀.fst (q₀.snd - a))\nI3 : AEStronglyMeasurable (fun a => ContinuousLinearMap.comp (↑L (f a)) (g' (q₀.fst, q₀.snd - a))) μ\nK' : Set G := -k + {q₀.snd}\nK'_def : K' = -k + {q₀.snd}\nhK' : IsCompact K'\nU : Set G\nU_open : IsOpen U\nK'U : K' ⊆ U\nhU : IntegrableOn f U\nδ : ℝ\nδpos : 0 < δ\nδε : δ ≤ ε\nhδ : K' + ball 0 δ ⊆ U\nthis : Norm (E →L[𝕜] (P × G →L[𝕜] E') →L[𝕜] P × G →L[𝕜] F) := hasOpNorm\nbound : G → ℝ := indicator U fun t => ‖precompR (P × G) L‖ * ‖f t‖ * C\n⊢ HasFDerivAt (fun q => f ⋆[L, q.snd] g q.fst) (f ⋆[precompR (P × G) L, q₀.snd] fun x => fderiv 𝕜 (↿g) (q₀.fst, x)) q₀\n[PROOFSTEP]\nhave I4 : ∀ᵐ a : G ∂μ, ∀ x : P × G, dist x q₀ < δ → ‖L.precompR (P × G) (f a) (g' (x.fst, x.snd - a))‖ ≤ bound a :=\n  by\n  apply eventually_of_forall\n  intro a x hx\n  rw [Prod.dist_eq, dist_eq_norm, dist_eq_norm] at hx \n  have : (-tsupport fun a => g' (x.1, a)) + ball q₀.2 δ ⊆ U :=\n    by\n    apply Subset.trans _ hδ\n    rw [K'_def, add_assoc]\n    apply add_subset_add\n    · rw [neg_subset_neg]\n      refine closure_minimal (support_subset_iff'.2 fun z hz => ?_) hk.isClosed\n      apply g'_zero x.1 z (h₀ε _) hz\n      rw [mem_ball_iff_norm]\n      exact ((le_max_left _ _).trans_lt hx).trans_le δε\n    · simp only [add_ball, thickening_singleton, zero_vadd, subset_rfl]\n  apply convolution_integrand_bound_right_of_le_of_subset _ _ _ this\n  · intro y\n    exact hε _ _ (((le_max_left _ _).trans_lt hx).trans_le δε)\n  · rw [mem_ball_iff_norm]\n    exact (le_max_right _ _).trans_lt hx\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nε C : ℝ\nεpos : 0 < ε\nh₀ε : ball q₀.fst ε ⊆ s\nhε : ∀ (p : P) (x : G), ‖p - q₀.fst‖ < ε → ‖g' (p, x)‖ ≤ C\nI1 : ∀ᶠ (x : P × G) in 𝓝 q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g x.fst (x.snd - a))) μ\nI2 : Integrable fun a => ↑(↑L (f a)) (g q₀.fst (q₀.snd - a))\nI3 : AEStronglyMeasurable (fun a => ContinuousLinearMap.comp (↑L (f a)) (g' (q₀.fst, q₀.snd - a))) μ\nK' : Set G := -k + {q₀.snd}\nK'_def : K' = -k + {q₀.snd}\nhK' : IsCompact K'\nU : Set G\nU_open : IsOpen U\nK'U : K' ⊆ U\nhU : IntegrableOn f U\nδ : ℝ\nδpos : 0 < δ\nδε : δ ≤ ε\nhδ : K' + ball 0 δ ⊆ U\nthis : Norm (E →L[𝕜] (P × G →L[𝕜] E') →L[𝕜] P × G →L[𝕜] F) := hasOpNorm\nbound : G → ℝ := indicator U fun t => ‖precompR (P × G) L‖ * ‖f t‖ * C\n⊢ ∀ᵐ (a : G) ∂μ, ∀ (x : P × G), dist x q₀ < δ → ‖↑(↑(precompR (P × G) L) (f a)) (g' (x.fst, x.snd - a))‖ ≤ bound a\n[PROOFSTEP]\napply eventually_of_forall\n[GOAL]\ncase hp\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nε C : ℝ\nεpos : 0 < ε\nh₀ε : ball q₀.fst ε ⊆ s\nhε : ∀ (p : P) (x : G), ‖p - q₀.fst‖ < ε → ‖g' (p, x)‖ ≤ C\nI1 : ∀ᶠ (x : P × G) in 𝓝 q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g x.fst (x.snd - a))) μ\nI2 : Integrable fun a => ↑(↑L (f a)) (g q₀.fst (q₀.snd - a))\nI3 : AEStronglyMeasurable (fun a => ContinuousLinearMap.comp (↑L (f a)) (g' (q₀.fst, q₀.snd - a))) μ\nK' : Set G := -k + {q₀.snd}\nK'_def : K' = -k + {q₀.snd}\nhK' : IsCompact K'\nU : Set G\nU_open : IsOpen U\nK'U : K' ⊆ U\nhU : IntegrableOn f U\nδ : ℝ\nδpos : 0 < δ\nδε : δ ≤ ε\nhδ : K' + ball 0 δ ⊆ U\nthis : Norm (E →L[𝕜] (P × G →L[𝕜] E') →L[𝕜] P × G →L[𝕜] F) := hasOpNorm\nbound : G → ℝ := indicator U fun t => ‖precompR (P × G) L‖ * ‖f t‖ * C\n⊢ ∀ (x : G) (x_1 : P × G), dist x_1 q₀ < δ → ‖↑(↑(precompR (P × G) L) (f x)) (g' (x_1.fst, x_1.snd - x))‖ ≤ bound x\n[PROOFSTEP]\nintro a x hx\n[GOAL]\ncase hp\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nε C : ℝ\nεpos : 0 < ε\nh₀ε : ball q₀.fst ε ⊆ s\nhε : ∀ (p : P) (x : G), ‖p - q₀.fst‖ < ε → ‖g' (p, x)‖ ≤ C\nI1 : ∀ᶠ (x : P × G) in 𝓝 q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g x.fst (x.snd - a))) μ\nI2 : Integrable fun a => ↑(↑L (f a)) (g q₀.fst (q₀.snd - a))\nI3 : AEStronglyMeasurable (fun a => ContinuousLinearMap.comp (↑L (f a)) (g' (q₀.fst, q₀.snd - a))) μ\nK' : Set G := -k + {q₀.snd}\nK'_def : K' = -k + {q₀.snd}\nhK' : IsCompact K'\nU : Set G\nU_open : IsOpen U\nK'U : K' ⊆ U\nhU : IntegrableOn f U\nδ : ℝ\nδpos : 0 < δ\nδε : δ ≤ ε\nhδ : K' + ball 0 δ ⊆ U\nthis : Norm (E →L[𝕜] (P × G →L[𝕜] E') →L[𝕜] P × G →L[𝕜] F) := hasOpNorm\nbound : G → ℝ := indicator U fun t => ‖precompR (P × G) L‖ * ‖f t‖ * C\na : G\nx : P × G\nhx : dist x q₀ < δ\n⊢ ‖↑(↑(precompR (P × G) L) (f a)) (g' (x.fst, x.snd - a))‖ ≤ bound a\n[PROOFSTEP]\nrw [Prod.dist_eq, dist_eq_norm, dist_eq_norm] at hx \n[GOAL]\ncase hp\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nε C : ℝ\nεpos : 0 < ε\nh₀ε : ball q₀.fst ε ⊆ s\nhε : ∀ (p : P) (x : G), ‖p - q₀.fst‖ < ε → ‖g' (p, x)‖ ≤ C\nI1 : ∀ᶠ (x : P × G) in 𝓝 q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g x.fst (x.snd - a))) μ\nI2 : Integrable fun a => ↑(↑L (f a)) (g q₀.fst (q₀.snd - a))\nI3 : AEStronglyMeasurable (fun a => ContinuousLinearMap.comp (↑L (f a)) (g' (q₀.fst, q₀.snd - a))) μ\nK' : Set G := -k + {q₀.snd}\nK'_def : K' = -k + {q₀.snd}\nhK' : IsCompact K'\nU : Set G\nU_open : IsOpen U\nK'U : K' ⊆ U\nhU : IntegrableOn f U\nδ : ℝ\nδpos : 0 < δ\nδε : δ ≤ ε\nhδ : K' + ball 0 δ ⊆ U\nthis : Norm (E →L[𝕜] (P × G →L[𝕜] E') →L[𝕜] P × G →L[𝕜] F) := hasOpNorm\nbound : G → ℝ := indicator U fun t => ‖precompR (P × G) L‖ * ‖f t‖ * C\na : G\nx : P × G\nhx : max ‖x.fst - q₀.fst‖ ‖x.snd - q₀.snd‖ < δ\n⊢ ‖↑(↑(precompR (P × G) L) (f a)) (g' (x.fst, x.snd - a))‖ ≤ bound a\n[PROOFSTEP]\nhave : (-tsupport fun a => g' (x.1, a)) + ball q₀.2 δ ⊆ U :=\n  by\n  apply Subset.trans _ hδ\n  rw [K'_def, add_assoc]\n  apply add_subset_add\n  · rw [neg_subset_neg]\n    refine closure_minimal (support_subset_iff'.2 fun z hz => ?_) hk.isClosed\n    apply g'_zero x.1 z (h₀ε _) hz\n    rw [mem_ball_iff_norm]\n    exact ((le_max_left _ _).trans_lt hx).trans_le δε\n  · simp only [add_ball, thickening_singleton, zero_vadd, subset_rfl]\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nε C : ℝ\nεpos : 0 < ε\nh₀ε : ball q₀.fst ε ⊆ s\nhε : ∀ (p : P) (x : G), ‖p - q₀.fst‖ < ε → ‖g' (p, x)‖ ≤ C\nI1 : ∀ᶠ (x : P × G) in 𝓝 q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g x.fst (x.snd - a))) μ\nI2 : Integrable fun a => ↑(↑L (f a)) (g q₀.fst (q₀.snd - a))\nI3 : AEStronglyMeasurable (fun a => ContinuousLinearMap.comp (↑L (f a)) (g' (q₀.fst, q₀.snd - a))) μ\nK' : Set G := -k + {q₀.snd}\nK'_def : K' = -k + {q₀.snd}\nhK' : IsCompact K'\nU : Set G\nU_open : IsOpen U\nK'U : K' ⊆ U\nhU : IntegrableOn f U\nδ : ℝ\nδpos : 0 < δ\nδε : δ ≤ ε\nhδ : K' + ball 0 δ ⊆ U\nthis : Norm (E →L[𝕜] (P × G →L[𝕜] E') →L[𝕜] P × G →L[𝕜] F) := hasOpNorm\nbound : G → ℝ := indicator U fun t => ‖precompR (P × G) L‖ * ‖f t‖ * C\na : G\nx : P × G\nhx : max ‖x.fst - q₀.fst‖ ‖x.snd - q₀.snd‖ < δ\n⊢ (-tsupport fun a => g' (x.fst, a)) + ball q₀.snd δ ⊆ U\n[PROOFSTEP]\napply Subset.trans _ hδ\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nε C : ℝ\nεpos : 0 < ε\nh₀ε : ball q₀.fst ε ⊆ s\nhε : ∀ (p : P) (x : G), ‖p - q₀.fst‖ < ε → ‖g' (p, x)‖ ≤ C\nI1 : ∀ᶠ (x : P × G) in 𝓝 q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g x.fst (x.snd - a))) μ\nI2 : Integrable fun a => ↑(↑L (f a)) (g q₀.fst (q₀.snd - a))\nI3 : AEStronglyMeasurable (fun a => ContinuousLinearMap.comp (↑L (f a)) (g' (q₀.fst, q₀.snd - a))) μ\nK' : Set G := -k + {q₀.snd}\nK'_def : K' = -k + {q₀.snd}\nhK' : IsCompact K'\nU : Set G\nU_open : IsOpen U\nK'U : K' ⊆ U\nhU : IntegrableOn f U\nδ : ℝ\nδpos : 0 < δ\nδε : δ ≤ ε\nhδ : K' + ball 0 δ ⊆ U\nthis : Norm (E →L[𝕜] (P × G →L[𝕜] E') →L[𝕜] P × G →L[𝕜] F) := hasOpNorm\nbound : G → ℝ := indicator U fun t => ‖precompR (P × G) L‖ * ‖f t‖ * C\na : G\nx : P × G\nhx : max ‖x.fst - q₀.fst‖ ‖x.snd - q₀.snd‖ < δ\n⊢ (-tsupport fun a => g' (x.fst, a)) + ball q₀.snd δ ⊆ K' + ball 0 δ\n[PROOFSTEP]\nrw [K'_def, add_assoc]\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nε C : ℝ\nεpos : 0 < ε\nh₀ε : ball q₀.fst ε ⊆ s\nhε : ∀ (p : P) (x : G), ‖p - q₀.fst‖ < ε → ‖g' (p, x)‖ ≤ C\nI1 : ∀ᶠ (x : P × G) in 𝓝 q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g x.fst (x.snd - a))) μ\nI2 : Integrable fun a => ↑(↑L (f a)) (g q₀.fst (q₀.snd - a))\nI3 : AEStronglyMeasurable (fun a => ContinuousLinearMap.comp (↑L (f a)) (g' (q₀.fst, q₀.snd - a))) μ\nK' : Set G := -k + {q₀.snd}\nK'_def : K' = -k + {q₀.snd}\nhK' : IsCompact K'\nU : Set G\nU_open : IsOpen U\nK'U : K' ⊆ U\nhU : IntegrableOn f U\nδ : ℝ\nδpos : 0 < δ\nδε : δ ≤ ε\nhδ : K' + ball 0 δ ⊆ U\nthis : Norm (E →L[𝕜] (P × G →L[𝕜] E') →L[𝕜] P × G →L[𝕜] F) := hasOpNorm\nbound : G → ℝ := indicator U fun t => ‖precompR (P × G) L‖ * ‖f t‖ * C\na : G\nx : P × G\nhx : max ‖x.fst - q₀.fst‖ ‖x.snd - q₀.snd‖ < δ\n⊢ (-tsupport fun a => g' (x.fst, a)) + ball q₀.snd δ ⊆ -k + ({q₀.snd} + ball 0 δ)\n[PROOFSTEP]\napply add_subset_add\n[GOAL]\ncase a\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nε C : ℝ\nεpos : 0 < ε\nh₀ε : ball q₀.fst ε ⊆ s\nhε : ∀ (p : P) (x : G), ‖p - q₀.fst‖ < ε → ‖g' (p, x)‖ ≤ C\nI1 : ∀ᶠ (x : P × G) in 𝓝 q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g x.fst (x.snd - a))) μ\nI2 : Integrable fun a => ↑(↑L (f a)) (g q₀.fst (q₀.snd - a))\nI3 : AEStronglyMeasurable (fun a => ContinuousLinearMap.comp (↑L (f a)) (g' (q₀.fst, q₀.snd - a))) μ\nK' : Set G := -k + {q₀.snd}\nK'_def : K' = -k + {q₀.snd}\nhK' : IsCompact K'\nU : Set G\nU_open : IsOpen U\nK'U : K' ⊆ U\nhU : IntegrableOn f U\nδ : ℝ\nδpos : 0 < δ\nδε : δ ≤ ε\nhδ : K' + ball 0 δ ⊆ U\nthis : Norm (E →L[𝕜] (P × G →L[𝕜] E') →L[𝕜] P × G →L[𝕜] F) := hasOpNorm\nbound : G → ℝ := indicator U fun t => ‖precompR (P × G) L‖ * ‖f t‖ * C\na : G\nx : P × G\nhx : max ‖x.fst - q₀.fst‖ ‖x.snd - q₀.snd‖ < δ\n⊢ (-tsupport fun a => g' (x.fst, a)) ⊆ -k\n[PROOFSTEP]\nrw [neg_subset_neg]\n[GOAL]\ncase a\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nε C : ℝ\nεpos : 0 < ε\nh₀ε : ball q₀.fst ε ⊆ s\nhε : ∀ (p : P) (x : G), ‖p - q₀.fst‖ < ε → ‖g' (p, x)‖ ≤ C\nI1 : ∀ᶠ (x : P × G) in 𝓝 q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g x.fst (x.snd - a))) μ\nI2 : Integrable fun a => ↑(↑L (f a)) (g q₀.fst (q₀.snd - a))\nI3 : AEStronglyMeasurable (fun a => ContinuousLinearMap.comp (↑L (f a)) (g' (q₀.fst, q₀.snd - a))) μ\nK' : Set G := -k + {q₀.snd}\nK'_def : K' = -k + {q₀.snd}\nhK' : IsCompact K'\nU : Set G\nU_open : IsOpen U\nK'U : K' ⊆ U\nhU : IntegrableOn f U\nδ : ℝ\nδpos : 0 < δ\nδε : δ ≤ ε\nhδ : K' + ball 0 δ ⊆ U\nthis : Norm (E →L[𝕜] (P × G →L[𝕜] E') →L[𝕜] P × G →L[𝕜] F) := hasOpNorm\nbound : G → ℝ := indicator U fun t => ‖precompR (P × G) L‖ * ‖f t‖ * C\na : G\nx : P × G\nhx : max ‖x.fst - q₀.fst‖ ‖x.snd - q₀.snd‖ < δ\n⊢ (tsupport fun a => g' (x.fst, a)) ⊆ k\n[PROOFSTEP]\nrefine closure_minimal (support_subset_iff'.2 fun z hz => ?_) hk.isClosed\n[GOAL]\ncase a\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nε C : ℝ\nεpos : 0 < ε\nh₀ε : ball q₀.fst ε ⊆ s\nhε : ∀ (p : P) (x : G), ‖p - q₀.fst‖ < ε → ‖g' (p, x)‖ ≤ C\nI1 : ∀ᶠ (x : P × G) in 𝓝 q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g x.fst (x.snd - a))) μ\nI2 : Integrable fun a => ↑(↑L (f a)) (g q₀.fst (q₀.snd - a))\nI3 : AEStronglyMeasurable (fun a => ContinuousLinearMap.comp (↑L (f a)) (g' (q₀.fst, q₀.snd - a))) μ\nK' : Set G := -k + {q₀.snd}\nK'_def : K' = -k + {q₀.snd}\nhK' : IsCompact K'\nU : Set G\nU_open : IsOpen U\nK'U : K' ⊆ U\nhU : IntegrableOn f U\nδ : ℝ\nδpos : 0 < δ\nδε : δ ≤ ε\nhδ : K' + ball 0 δ ⊆ U\nthis : Norm (E →L[𝕜] (P × G →L[𝕜] E') →L[𝕜] P × G →L[𝕜] F) := hasOpNorm\nbound : G → ℝ := indicator U fun t => ‖precompR (P × G) L‖ * ‖f t‖ * C\na : G\nx : P × G\nhx : max ‖x.fst - q₀.fst‖ ‖x.snd - q₀.snd‖ < δ\nz : G\nhz : ¬z ∈ k\n⊢ g' (x.fst, z) = 0\n[PROOFSTEP]\napply g'_zero x.1 z (h₀ε _) hz\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nε C : ℝ\nεpos : 0 < ε\nh₀ε : ball q₀.fst ε ⊆ s\nhε : ∀ (p : P) (x : G), ‖p - q₀.fst‖ < ε → ‖g' (p, x)‖ ≤ C\nI1 : ∀ᶠ (x : P × G) in 𝓝 q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g x.fst (x.snd - a))) μ\nI2 : Integrable fun a => ↑(↑L (f a)) (g q₀.fst (q₀.snd - a))\nI3 : AEStronglyMeasurable (fun a => ContinuousLinearMap.comp (↑L (f a)) (g' (q₀.fst, q₀.snd - a))) μ\nK' : Set G := -k + {q₀.snd}\nK'_def : K' = -k + {q₀.snd}\nhK' : IsCompact K'\nU : Set G\nU_open : IsOpen U\nK'U : K' ⊆ U\nhU : IntegrableOn f U\nδ : ℝ\nδpos : 0 < δ\nδε : δ ≤ ε\nhδ : K' + ball 0 δ ⊆ U\nthis : Norm (E →L[𝕜] (P × G →L[𝕜] E') →L[𝕜] P × G →L[𝕜] F) := hasOpNorm\nbound : G → ℝ := indicator U fun t => ‖precompR (P × G) L‖ * ‖f t‖ * C\na : G\nx : P × G\nhx : max ‖x.fst - q₀.fst‖ ‖x.snd - q₀.snd‖ < δ\nz : G\nhz : ¬z ∈ k\n⊢ x.fst ∈ ball q₀.fst ε\n[PROOFSTEP]\nrw [mem_ball_iff_norm]\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nε C : ℝ\nεpos : 0 < ε\nh₀ε : ball q₀.fst ε ⊆ s\nhε : ∀ (p : P) (x : G), ‖p - q₀.fst‖ < ε → ‖g' (p, x)‖ ≤ C\nI1 : ∀ᶠ (x : P × G) in 𝓝 q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g x.fst (x.snd - a))) μ\nI2 : Integrable fun a => ↑(↑L (f a)) (g q₀.fst (q₀.snd - a))\nI3 : AEStronglyMeasurable (fun a => ContinuousLinearMap.comp (↑L (f a)) (g' (q₀.fst, q₀.snd - a))) μ\nK' : Set G := -k + {q₀.snd}\nK'_def : K' = -k + {q₀.snd}\nhK' : IsCompact K'\nU : Set G\nU_open : IsOpen U\nK'U : K' ⊆ U\nhU : IntegrableOn f U\nδ : ℝ\nδpos : 0 < δ\nδε : δ ≤ ε\nhδ : K' + ball 0 δ ⊆ U\nthis : Norm (E →L[𝕜] (P × G →L[𝕜] E') →L[𝕜] P × G →L[𝕜] F) := hasOpNorm\nbound : G → ℝ := indicator U fun t => ‖precompR (P × G) L‖ * ‖f t‖ * C\na : G\nx : P × G\nhx : max ‖x.fst - q₀.fst‖ ‖x.snd - q₀.snd‖ < δ\nz : G\nhz : ¬z ∈ k\n⊢ ‖x.fst - q₀.fst‖ < ε\n[PROOFSTEP]\nexact ((le_max_left _ _).trans_lt hx).trans_le δε\n[GOAL]\ncase a\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nε C : ℝ\nεpos : 0 < ε\nh₀ε : ball q₀.fst ε ⊆ s\nhε : ∀ (p : P) (x : G), ‖p - q₀.fst‖ < ε → ‖g' (p, x)‖ ≤ C\nI1 : ∀ᶠ (x : P × G) in 𝓝 q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g x.fst (x.snd - a))) μ\nI2 : Integrable fun a => ↑(↑L (f a)) (g q₀.fst (q₀.snd - a))\nI3 : AEStronglyMeasurable (fun a => ContinuousLinearMap.comp (↑L (f a)) (g' (q₀.fst, q₀.snd - a))) μ\nK' : Set G := -k + {q₀.snd}\nK'_def : K' = -k + {q₀.snd}\nhK' : IsCompact K'\nU : Set G\nU_open : IsOpen U\nK'U : K' ⊆ U\nhU : IntegrableOn f U\nδ : ℝ\nδpos : 0 < δ\nδε : δ ≤ ε\nhδ : K' + ball 0 δ ⊆ U\nthis : Norm (E →L[𝕜] (P × G →L[𝕜] E') →L[𝕜] P × G →L[𝕜] F) := hasOpNorm\nbound : G → ℝ := indicator U fun t => ‖precompR (P × G) L‖ * ‖f t‖ * C\na : G\nx : P × G\nhx : max ‖x.fst - q₀.fst‖ ‖x.snd - q₀.snd‖ < δ\n⊢ ball q₀.snd δ ⊆ {q₀.snd} + ball 0 δ\n[PROOFSTEP]\nsimp only [add_ball, thickening_singleton, zero_vadd, subset_rfl]\n[GOAL]\ncase hp\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nε C : ℝ\nεpos : 0 < ε\nh₀ε : ball q₀.fst ε ⊆ s\nhε : ∀ (p : P) (x : G), ‖p - q₀.fst‖ < ε → ‖g' (p, x)‖ ≤ C\nI1 : ∀ᶠ (x : P × G) in 𝓝 q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g x.fst (x.snd - a))) μ\nI2 : Integrable fun a => ↑(↑L (f a)) (g q₀.fst (q₀.snd - a))\nI3 : AEStronglyMeasurable (fun a => ContinuousLinearMap.comp (↑L (f a)) (g' (q₀.fst, q₀.snd - a))) μ\nK' : Set G := -k + {q₀.snd}\nK'_def : K' = -k + {q₀.snd}\nhK' : IsCompact K'\nU : Set G\nU_open : IsOpen U\nK'U : K' ⊆ U\nhU : IntegrableOn f U\nδ : ℝ\nδpos : 0 < δ\nδε : δ ≤ ε\nhδ : K' + ball 0 δ ⊆ U\nthis✝ : Norm (E →L[𝕜] (P × G →L[𝕜] E') →L[𝕜] P × G →L[𝕜] F) := hasOpNorm\nbound : G → ℝ := indicator U fun t => ‖precompR (P × G) L‖ * ‖f t‖ * C\na : G\nx : P × G\nhx : max ‖x.fst - q₀.fst‖ ‖x.snd - q₀.snd‖ < δ\nthis : (-tsupport fun a => g' (x.fst, a)) + ball q₀.snd δ ⊆ U\n⊢ ‖↑(↑(precompR (P × G) L) (f a)) (g' (x.fst, x.snd - a))‖ ≤ bound a\n[PROOFSTEP]\napply convolution_integrand_bound_right_of_le_of_subset _ _ _ this\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nε C : ℝ\nεpos : 0 < ε\nh₀ε : ball q₀.fst ε ⊆ s\nhε : ∀ (p : P) (x : G), ‖p - q₀.fst‖ < ε → ‖g' (p, x)‖ ≤ C\nI1 : ∀ᶠ (x : P × G) in 𝓝 q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g x.fst (x.snd - a))) μ\nI2 : Integrable fun a => ↑(↑L (f a)) (g q₀.fst (q₀.snd - a))\nI3 : AEStronglyMeasurable (fun a => ContinuousLinearMap.comp (↑L (f a)) (g' (q₀.fst, q₀.snd - a))) μ\nK' : Set G := -k + {q₀.snd}\nK'_def : K' = -k + {q₀.snd}\nhK' : IsCompact K'\nU : Set G\nU_open : IsOpen U\nK'U : K' ⊆ U\nhU : IntegrableOn f U\nδ : ℝ\nδpos : 0 < δ\nδε : δ ≤ ε\nhδ : K' + ball 0 δ ⊆ U\nthis✝ : Norm (E →L[𝕜] (P × G →L[𝕜] E') →L[𝕜] P × G →L[𝕜] F) := hasOpNorm\nbound : G → ℝ := indicator U fun t => ‖precompR (P × G) L‖ * ‖f t‖ * C\na : G\nx : P × G\nhx : max ‖x.fst - q₀.fst‖ ‖x.snd - q₀.snd‖ < δ\nthis : (-tsupport fun a => g' (x.fst, a)) + ball q₀.snd δ ⊆ U\n⊢ ∀ (i : G), ‖g' (x.fst, i)‖ ≤ C\n[PROOFSTEP]\nintro y\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx✝ x' : G\ny✝ y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nε C : ℝ\nεpos : 0 < ε\nh₀ε : ball q₀.fst ε ⊆ s\nhε : ∀ (p : P) (x : G), ‖p - q₀.fst‖ < ε → ‖g' (p, x)‖ ≤ C\nI1 : ∀ᶠ (x : P × G) in 𝓝 q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g x.fst (x.snd - a))) μ\nI2 : Integrable fun a => ↑(↑L (f a)) (g q₀.fst (q₀.snd - a))\nI3 : AEStronglyMeasurable (fun a => ContinuousLinearMap.comp (↑L (f a)) (g' (q₀.fst, q₀.snd - a))) μ\nK' : Set G := -k + {q₀.snd}\nK'_def : K' = -k + {q₀.snd}\nhK' : IsCompact K'\nU : Set G\nU_open : IsOpen U\nK'U : K' ⊆ U\nhU : IntegrableOn f U\nδ : ℝ\nδpos : 0 < δ\nδε : δ ≤ ε\nhδ : K' + ball 0 δ ⊆ U\nthis✝ : Norm (E →L[𝕜] (P × G →L[𝕜] E') →L[𝕜] P × G →L[𝕜] F) := hasOpNorm\nbound : G → ℝ := indicator U fun t => ‖precompR (P × G) L‖ * ‖f t‖ * C\na : G\nx : P × G\nhx : max ‖x.fst - q₀.fst‖ ‖x.snd - q₀.snd‖ < δ\nthis : (-tsupport fun a => g' (x.fst, a)) + ball q₀.snd δ ⊆ U\ny : G\n⊢ ‖g' (x.fst, y)‖ ≤ C\n[PROOFSTEP]\nexact hε _ _ (((le_max_left _ _).trans_lt hx).trans_le δε)\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nε C : ℝ\nεpos : 0 < ε\nh₀ε : ball q₀.fst ε ⊆ s\nhε : ∀ (p : P) (x : G), ‖p - q₀.fst‖ < ε → ‖g' (p, x)‖ ≤ C\nI1 : ∀ᶠ (x : P × G) in 𝓝 q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g x.fst (x.snd - a))) μ\nI2 : Integrable fun a => ↑(↑L (f a)) (g q₀.fst (q₀.snd - a))\nI3 : AEStronglyMeasurable (fun a => ContinuousLinearMap.comp (↑L (f a)) (g' (q₀.fst, q₀.snd - a))) μ\nK' : Set G := -k + {q₀.snd}\nK'_def : K' = -k + {q₀.snd}\nhK' : IsCompact K'\nU : Set G\nU_open : IsOpen U\nK'U : K' ⊆ U\nhU : IntegrableOn f U\nδ : ℝ\nδpos : 0 < δ\nδε : δ ≤ ε\nhδ : K' + ball 0 δ ⊆ U\nthis✝ : Norm (E →L[𝕜] (P × G →L[𝕜] E') →L[𝕜] P × G →L[𝕜] F) := hasOpNorm\nbound : G → ℝ := indicator U fun t => ‖precompR (P × G) L‖ * ‖f t‖ * C\na : G\nx : P × G\nhx : max ‖x.fst - q₀.fst‖ ‖x.snd - q₀.snd‖ < δ\nthis : (-tsupport fun a => g' (x.fst, a)) + ball q₀.snd δ ⊆ U\n⊢ x.snd ∈ ball q₀.snd δ\n[PROOFSTEP]\nrw [mem_ball_iff_norm]\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nε C : ℝ\nεpos : 0 < ε\nh₀ε : ball q₀.fst ε ⊆ s\nhε : ∀ (p : P) (x : G), ‖p - q₀.fst‖ < ε → ‖g' (p, x)‖ ≤ C\nI1 : ∀ᶠ (x : P × G) in 𝓝 q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g x.fst (x.snd - a))) μ\nI2 : Integrable fun a => ↑(↑L (f a)) (g q₀.fst (q₀.snd - a))\nI3 : AEStronglyMeasurable (fun a => ContinuousLinearMap.comp (↑L (f a)) (g' (q₀.fst, q₀.snd - a))) μ\nK' : Set G := -k + {q₀.snd}\nK'_def : K' = -k + {q₀.snd}\nhK' : IsCompact K'\nU : Set G\nU_open : IsOpen U\nK'U : K' ⊆ U\nhU : IntegrableOn f U\nδ : ℝ\nδpos : 0 < δ\nδε : δ ≤ ε\nhδ : K' + ball 0 δ ⊆ U\nthis✝ : Norm (E →L[𝕜] (P × G →L[𝕜] E') →L[𝕜] P × G →L[𝕜] F) := hasOpNorm\nbound : G → ℝ := indicator U fun t => ‖precompR (P × G) L‖ * ‖f t‖ * C\na : G\nx : P × G\nhx : max ‖x.fst - q₀.fst‖ ‖x.snd - q₀.snd‖ < δ\nthis : (-tsupport fun a => g' (x.fst, a)) + ball q₀.snd δ ⊆ U\n⊢ ‖x.snd - q₀.snd‖ < δ\n[PROOFSTEP]\nexact (le_max_right _ _).trans_lt hx\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nε C : ℝ\nεpos : 0 < ε\nh₀ε : ball q₀.fst ε ⊆ s\nhε : ∀ (p : P) (x : G), ‖p - q₀.fst‖ < ε → ‖g' (p, x)‖ ≤ C\nI1 : ∀ᶠ (x : P × G) in 𝓝 q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g x.fst (x.snd - a))) μ\nI2 : Integrable fun a => ↑(↑L (f a)) (g q₀.fst (q₀.snd - a))\nI3 : AEStronglyMeasurable (fun a => ContinuousLinearMap.comp (↑L (f a)) (g' (q₀.fst, q₀.snd - a))) μ\nK' : Set G := -k + {q₀.snd}\nK'_def : K' = -k + {q₀.snd}\nhK' : IsCompact K'\nU : Set G\nU_open : IsOpen U\nK'U : K' ⊆ U\nhU : IntegrableOn f U\nδ : ℝ\nδpos : 0 < δ\nδε : δ ≤ ε\nhδ : K' + ball 0 δ ⊆ U\nthis : Norm (E →L[𝕜] (P × G →L[𝕜] E') →L[𝕜] P × G →L[𝕜] F) := hasOpNorm\nbound : G → ℝ := indicator U fun t => ‖precompR (P × G) L‖ * ‖f t‖ * C\nI4 : ∀ᵐ (a : G) ∂μ, ∀ (x : P × G), dist x q₀ < δ → ‖↑(↑(precompR (P × G) L) (f a)) (g' (x.fst, x.snd - a))‖ ≤ bound a\n⊢ HasFDerivAt (fun q => f ⋆[L, q.snd] g q.fst) (f ⋆[precompR (P × G) L, q₀.snd] fun x => fderiv 𝕜 (↿g) (q₀.fst, x)) q₀\n[PROOFSTEP]\nhave I5 : Integrable bound μ := by\n  rw [integrable_indicator_iff U_open.measurableSet]\n  exact (hU.norm.const_mul _).mul_const _\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nε C : ℝ\nεpos : 0 < ε\nh₀ε : ball q₀.fst ε ⊆ s\nhε : ∀ (p : P) (x : G), ‖p - q₀.fst‖ < ε → ‖g' (p, x)‖ ≤ C\nI1 : ∀ᶠ (x : P × G) in 𝓝 q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g x.fst (x.snd - a))) μ\nI2 : Integrable fun a => ↑(↑L (f a)) (g q₀.fst (q₀.snd - a))\nI3 : AEStronglyMeasurable (fun a => ContinuousLinearMap.comp (↑L (f a)) (g' (q₀.fst, q₀.snd - a))) μ\nK' : Set G := -k + {q₀.snd}\nK'_def : K' = -k + {q₀.snd}\nhK' : IsCompact K'\nU : Set G\nU_open : IsOpen U\nK'U : K' ⊆ U\nhU : IntegrableOn f U\nδ : ℝ\nδpos : 0 < δ\nδε : δ ≤ ε\nhδ : K' + ball 0 δ ⊆ U\nthis : Norm (E →L[𝕜] (P × G →L[𝕜] E') →L[𝕜] P × G →L[𝕜] F) := hasOpNorm\nbound : G → ℝ := indicator U fun t => ‖precompR (P × G) L‖ * ‖f t‖ * C\nI4 : ∀ᵐ (a : G) ∂μ, ∀ (x : P × G), dist x q₀ < δ → ‖↑(↑(precompR (P × G) L) (f a)) (g' (x.fst, x.snd - a))‖ ≤ bound a\n⊢ Integrable bound\n[PROOFSTEP]\nrw [integrable_indicator_iff U_open.measurableSet]\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nε C : ℝ\nεpos : 0 < ε\nh₀ε : ball q₀.fst ε ⊆ s\nhε : ∀ (p : P) (x : G), ‖p - q₀.fst‖ < ε → ‖g' (p, x)‖ ≤ C\nI1 : ∀ᶠ (x : P × G) in 𝓝 q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g x.fst (x.snd - a))) μ\nI2 : Integrable fun a => ↑(↑L (f a)) (g q₀.fst (q₀.snd - a))\nI3 : AEStronglyMeasurable (fun a => ContinuousLinearMap.comp (↑L (f a)) (g' (q₀.fst, q₀.snd - a))) μ\nK' : Set G := -k + {q₀.snd}\nK'_def : K' = -k + {q₀.snd}\nhK' : IsCompact K'\nU : Set G\nU_open : IsOpen U\nK'U : K' ⊆ U\nhU : IntegrableOn f U\nδ : ℝ\nδpos : 0 < δ\nδε : δ ≤ ε\nhδ : K' + ball 0 δ ⊆ U\nthis : Norm (E →L[𝕜] (P × G →L[𝕜] E') →L[𝕜] P × G →L[𝕜] F) := hasOpNorm\nbound : G → ℝ := indicator U fun t => ‖precompR (P × G) L‖ * ‖f t‖ * C\nI4 : ∀ᵐ (a : G) ∂μ, ∀ (x : P × G), dist x q₀ < δ → ‖↑(↑(precompR (P × G) L) (f a)) (g' (x.fst, x.snd - a))‖ ≤ bound a\n⊢ IntegrableOn (fun t => ‖precompR (P × G) L‖ * ‖f t‖ * C) U\n[PROOFSTEP]\nexact (hU.norm.const_mul _).mul_const _\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nε C : ℝ\nεpos : 0 < ε\nh₀ε : ball q₀.fst ε ⊆ s\nhε : ∀ (p : P) (x : G), ‖p - q₀.fst‖ < ε → ‖g' (p, x)‖ ≤ C\nI1 : ∀ᶠ (x : P × G) in 𝓝 q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g x.fst (x.snd - a))) μ\nI2 : Integrable fun a => ↑(↑L (f a)) (g q₀.fst (q₀.snd - a))\nI3 : AEStronglyMeasurable (fun a => ContinuousLinearMap.comp (↑L (f a)) (g' (q₀.fst, q₀.snd - a))) μ\nK' : Set G := -k + {q₀.snd}\nK'_def : K' = -k + {q₀.snd}\nhK' : IsCompact K'\nU : Set G\nU_open : IsOpen U\nK'U : K' ⊆ U\nhU : IntegrableOn f U\nδ : ℝ\nδpos : 0 < δ\nδε : δ ≤ ε\nhδ : K' + ball 0 δ ⊆ U\nthis : Norm (E →L[𝕜] (P × G →L[𝕜] E') →L[𝕜] P × G →L[𝕜] F) := hasOpNorm\nbound : G → ℝ := indicator U fun t => ‖precompR (P × G) L‖ * ‖f t‖ * C\nI4 : ∀ᵐ (a : G) ∂μ, ∀ (x : P × G), dist x q₀ < δ → ‖↑(↑(precompR (P × G) L) (f a)) (g' (x.fst, x.snd - a))‖ ≤ bound a\nI5 : Integrable bound\n⊢ HasFDerivAt (fun q => f ⋆[L, q.snd] g q.fst) (f ⋆[precompR (P × G) L, q₀.snd] fun x => fderiv 𝕜 (↿g) (q₀.fst, x)) q₀\n[PROOFSTEP]\nhave I6 :\n  ∀ᵐ a : G ∂μ,\n    ∀ x : P × G,\n      dist x q₀ < δ →\n        HasFDerivAt (fun x : P × G => L (f a) (g x.1 (x.2 - a))) ((L (f a)).comp (g' (x.fst, x.snd - a))) x :=\n  by\n  apply eventually_of_forall\n  intro a x hx\n  apply (L _).hasFDerivAt.comp x\n  have N : s ×ˢ univ ∈ 𝓝 (x.1, x.2 - a) := by\n    apply A'\n    apply h₀ε\n    rw [Prod.dist_eq] at hx \n    exact lt_of_lt_of_le (lt_of_le_of_lt (le_max_left _ _) hx) δε\n  have Z := ((hg.differentiableOn le_rfl).differentiableAt N).hasFDerivAt\n  have Z' : HasFDerivAt (fun x : P × G => (x.1, x.2 - a)) (ContinuousLinearMap.id 𝕜 (P × G)) x :=\n    by\n    have : (fun x : P × G => (x.1, x.2 - a)) = _root_.id - fun x => (0, a) := by\n      ext x <;> simp only [Pi.sub_apply, id.def, Prod.fst_sub, sub_zero, Prod.snd_sub]\n    rw [this]\n    exact (hasFDerivAt_id x).sub_const (0, a)\n  exact Z.comp x Z'\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nε C : ℝ\nεpos : 0 < ε\nh₀ε : ball q₀.fst ε ⊆ s\nhε : ∀ (p : P) (x : G), ‖p - q₀.fst‖ < ε → ‖g' (p, x)‖ ≤ C\nI1 : ∀ᶠ (x : P × G) in 𝓝 q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g x.fst (x.snd - a))) μ\nI2 : Integrable fun a => ↑(↑L (f a)) (g q₀.fst (q₀.snd - a))\nI3 : AEStronglyMeasurable (fun a => ContinuousLinearMap.comp (↑L (f a)) (g' (q₀.fst, q₀.snd - a))) μ\nK' : Set G := -k + {q₀.snd}\nK'_def : K' = -k + {q₀.snd}\nhK' : IsCompact K'\nU : Set G\nU_open : IsOpen U\nK'U : K' ⊆ U\nhU : IntegrableOn f U\nδ : ℝ\nδpos : 0 < δ\nδε : δ ≤ ε\nhδ : K' + ball 0 δ ⊆ U\nthis : Norm (E →L[𝕜] (P × G →L[𝕜] E') →L[𝕜] P × G →L[𝕜] F) := hasOpNorm\nbound : G → ℝ := indicator U fun t => ‖precompR (P × G) L‖ * ‖f t‖ * C\nI4 : ∀ᵐ (a : G) ∂μ, ∀ (x : P × G), dist x q₀ < δ → ‖↑(↑(precompR (P × G) L) (f a)) (g' (x.fst, x.snd - a))‖ ≤ bound a\nI5 : Integrable bound\n⊢ ∀ᵐ (a : G) ∂μ,\n    ∀ (x : P × G),\n      dist x q₀ < δ →\n        HasFDerivAt (fun x => ↑(↑L (f a)) (g x.fst (x.snd - a)))\n          (ContinuousLinearMap.comp (↑L (f a)) (g' (x.fst, x.snd - a))) x\n[PROOFSTEP]\napply eventually_of_forall\n[GOAL]\ncase hp\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nε C : ℝ\nεpos : 0 < ε\nh₀ε : ball q₀.fst ε ⊆ s\nhε : ∀ (p : P) (x : G), ‖p - q₀.fst‖ < ε → ‖g' (p, x)‖ ≤ C\nI1 : ∀ᶠ (x : P × G) in 𝓝 q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g x.fst (x.snd - a))) μ\nI2 : Integrable fun a => ↑(↑L (f a)) (g q₀.fst (q₀.snd - a))\nI3 : AEStronglyMeasurable (fun a => ContinuousLinearMap.comp (↑L (f a)) (g' (q₀.fst, q₀.snd - a))) μ\nK' : Set G := -k + {q₀.snd}\nK'_def : K' = -k + {q₀.snd}\nhK' : IsCompact K'\nU : Set G\nU_open : IsOpen U\nK'U : K' ⊆ U\nhU : IntegrableOn f U\nδ : ℝ\nδpos : 0 < δ\nδε : δ ≤ ε\nhδ : K' + ball 0 δ ⊆ U\nthis : Norm (E →L[𝕜] (P × G →L[𝕜] E') →L[𝕜] P × G →L[𝕜] F) := hasOpNorm\nbound : G → ℝ := indicator U fun t => ‖precompR (P × G) L‖ * ‖f t‖ * C\nI4 : ∀ᵐ (a : G) ∂μ, ∀ (x : P × G), dist x q₀ < δ → ‖↑(↑(precompR (P × G) L) (f a)) (g' (x.fst, x.snd - a))‖ ≤ bound a\nI5 : Integrable bound\n⊢ ∀ (x : G) (x_1 : P × G),\n    dist x_1 q₀ < δ →\n      HasFDerivAt (fun x_2 => ↑(↑L (f x)) (g x_2.fst (x_2.snd - x)))\n        (ContinuousLinearMap.comp (↑L (f x)) (g' (x_1.fst, x_1.snd - x))) x_1\n[PROOFSTEP]\nintro a x hx\n[GOAL]\ncase hp\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nε C : ℝ\nεpos : 0 < ε\nh₀ε : ball q₀.fst ε ⊆ s\nhε : ∀ (p : P) (x : G), ‖p - q₀.fst‖ < ε → ‖g' (p, x)‖ ≤ C\nI1 : ∀ᶠ (x : P × G) in 𝓝 q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g x.fst (x.snd - a))) μ\nI2 : Integrable fun a => ↑(↑L (f a)) (g q₀.fst (q₀.snd - a))\nI3 : AEStronglyMeasurable (fun a => ContinuousLinearMap.comp (↑L (f a)) (g' (q₀.fst, q₀.snd - a))) μ\nK' : Set G := -k + {q₀.snd}\nK'_def : K' = -k + {q₀.snd}\nhK' : IsCompact K'\nU : Set G\nU_open : IsOpen U\nK'U : K' ⊆ U\nhU : IntegrableOn f U\nδ : ℝ\nδpos : 0 < δ\nδε : δ ≤ ε\nhδ : K' + ball 0 δ ⊆ U\nthis : Norm (E →L[𝕜] (P × G →L[𝕜] E') →L[𝕜] P × G →L[𝕜] F) := hasOpNorm\nbound : G → ℝ := indicator U fun t => ‖precompR (P × G) L‖ * ‖f t‖ * C\nI4 : ∀ᵐ (a : G) ∂μ, ∀ (x : P × G), dist x q₀ < δ → ‖↑(↑(precompR (P × G) L) (f a)) (g' (x.fst, x.snd - a))‖ ≤ bound a\nI5 : Integrable bound\na : G\nx : P × G\nhx : dist x q₀ < δ\n⊢ HasFDerivAt (fun x => ↑(↑L (f a)) (g x.fst (x.snd - a))) (ContinuousLinearMap.comp (↑L (f a)) (g' (x.fst, x.snd - a)))\n    x\n[PROOFSTEP]\napply (L _).hasFDerivAt.comp x\n[GOAL]\ncase hp\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nε C : ℝ\nεpos : 0 < ε\nh₀ε : ball q₀.fst ε ⊆ s\nhε : ∀ (p : P) (x : G), ‖p - q₀.fst‖ < ε → ‖g' (p, x)‖ ≤ C\nI1 : ∀ᶠ (x : P × G) in 𝓝 q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g x.fst (x.snd - a))) μ\nI2 : Integrable fun a => ↑(↑L (f a)) (g q₀.fst (q₀.snd - a))\nI3 : AEStronglyMeasurable (fun a => ContinuousLinearMap.comp (↑L (f a)) (g' (q₀.fst, q₀.snd - a))) μ\nK' : Set G := -k + {q₀.snd}\nK'_def : K' = -k + {q₀.snd}\nhK' : IsCompact K'\nU : Set G\nU_open : IsOpen U\nK'U : K' ⊆ U\nhU : IntegrableOn f U\nδ : ℝ\nδpos : 0 < δ\nδε : δ ≤ ε\nhδ : K' + ball 0 δ ⊆ U\nthis : Norm (E →L[𝕜] (P × G →L[𝕜] E') →L[𝕜] P × G →L[𝕜] F) := hasOpNorm\nbound : G → ℝ := indicator U fun t => ‖precompR (P × G) L‖ * ‖f t‖ * C\nI4 : ∀ᵐ (a : G) ∂μ, ∀ (x : P × G), dist x q₀ < δ → ‖↑(↑(precompR (P × G) L) (f a)) (g' (x.fst, x.snd - a))‖ ≤ bound a\nI5 : Integrable bound\na : G\nx : P × G\nhx : dist x q₀ < δ\n⊢ HasFDerivAt (fun x => g x.fst (x.snd - a)) (g' (x.fst, x.snd - a)) x\n[PROOFSTEP]\nhave N : s ×ˢ univ ∈ 𝓝 (x.1, x.2 - a) := by\n  apply A'\n  apply h₀ε\n  rw [Prod.dist_eq] at hx \n  exact lt_of_lt_of_le (lt_of_le_of_lt (le_max_left _ _) hx) δε\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nε C : ℝ\nεpos : 0 < ε\nh₀ε : ball q₀.fst ε ⊆ s\nhε : ∀ (p : P) (x : G), ‖p - q₀.fst‖ < ε → ‖g' (p, x)‖ ≤ C\nI1 : ∀ᶠ (x : P × G) in 𝓝 q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g x.fst (x.snd - a))) μ\nI2 : Integrable fun a => ↑(↑L (f a)) (g q₀.fst (q₀.snd - a))\nI3 : AEStronglyMeasurable (fun a => ContinuousLinearMap.comp (↑L (f a)) (g' (q₀.fst, q₀.snd - a))) μ\nK' : Set G := -k + {q₀.snd}\nK'_def : K' = -k + {q₀.snd}\nhK' : IsCompact K'\nU : Set G\nU_open : IsOpen U\nK'U : K' ⊆ U\nhU : IntegrableOn f U\nδ : ℝ\nδpos : 0 < δ\nδε : δ ≤ ε\nhδ : K' + ball 0 δ ⊆ U\nthis : Norm (E →L[𝕜] (P × G →L[𝕜] E') →L[𝕜] P × G →L[𝕜] F) := hasOpNorm\nbound : G → ℝ := indicator U fun t => ‖precompR (P × G) L‖ * ‖f t‖ * C\nI4 : ∀ᵐ (a : G) ∂μ, ∀ (x : P × G), dist x q₀ < δ → ‖↑(↑(precompR (P × G) L) (f a)) (g' (x.fst, x.snd - a))‖ ≤ bound a\nI5 : Integrable bound\na : G\nx : P × G\nhx : dist x q₀ < δ\n⊢ s ×ˢ univ ∈ 𝓝 (x.fst, x.snd - a)\n[PROOFSTEP]\napply A'\n[GOAL]\ncase a\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nε C : ℝ\nεpos : 0 < ε\nh₀ε : ball q₀.fst ε ⊆ s\nhε : ∀ (p : P) (x : G), ‖p - q₀.fst‖ < ε → ‖g' (p, x)‖ ≤ C\nI1 : ∀ᶠ (x : P × G) in 𝓝 q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g x.fst (x.snd - a))) μ\nI2 : Integrable fun a => ↑(↑L (f a)) (g q₀.fst (q₀.snd - a))\nI3 : AEStronglyMeasurable (fun a => ContinuousLinearMap.comp (↑L (f a)) (g' (q₀.fst, q₀.snd - a))) μ\nK' : Set G := -k + {q₀.snd}\nK'_def : K' = -k + {q₀.snd}\nhK' : IsCompact K'\nU : Set G\nU_open : IsOpen U\nK'U : K' ⊆ U\nhU : IntegrableOn f U\nδ : ℝ\nδpos : 0 < δ\nδε : δ ≤ ε\nhδ : K' + ball 0 δ ⊆ U\nthis : Norm (E →L[𝕜] (P × G →L[𝕜] E') →L[𝕜] P × G →L[𝕜] F) := hasOpNorm\nbound : G → ℝ := indicator U fun t => ‖precompR (P × G) L‖ * ‖f t‖ * C\nI4 : ∀ᵐ (a : G) ∂μ, ∀ (x : P × G), dist x q₀ < δ → ‖↑(↑(precompR (P × G) L) (f a)) (g' (x.fst, x.snd - a))‖ ≤ bound a\nI5 : Integrable bound\na : G\nx : P × G\nhx : dist x q₀ < δ\n⊢ (x.fst, x.snd - a).fst ∈ s\n[PROOFSTEP]\napply h₀ε\n[GOAL]\ncase a.a\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nε C : ℝ\nεpos : 0 < ε\nh₀ε : ball q₀.fst ε ⊆ s\nhε : ∀ (p : P) (x : G), ‖p - q₀.fst‖ < ε → ‖g' (p, x)‖ ≤ C\nI1 : ∀ᶠ (x : P × G) in 𝓝 q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g x.fst (x.snd - a))) μ\nI2 : Integrable fun a => ↑(↑L (f a)) (g q₀.fst (q₀.snd - a))\nI3 : AEStronglyMeasurable (fun a => ContinuousLinearMap.comp (↑L (f a)) (g' (q₀.fst, q₀.snd - a))) μ\nK' : Set G := -k + {q₀.snd}\nK'_def : K' = -k + {q₀.snd}\nhK' : IsCompact K'\nU : Set G\nU_open : IsOpen U\nK'U : K' ⊆ U\nhU : IntegrableOn f U\nδ : ℝ\nδpos : 0 < δ\nδε : δ ≤ ε\nhδ : K' + ball 0 δ ⊆ U\nthis : Norm (E →L[𝕜] (P × G →L[𝕜] E') →L[𝕜] P × G →L[𝕜] F) := hasOpNorm\nbound : G → ℝ := indicator U fun t => ‖precompR (P × G) L‖ * ‖f t‖ * C\nI4 : ∀ᵐ (a : G) ∂μ, ∀ (x : P × G), dist x q₀ < δ → ‖↑(↑(precompR (P × G) L) (f a)) (g' (x.fst, x.snd - a))‖ ≤ bound a\nI5 : Integrable bound\na : G\nx : P × G\nhx : dist x q₀ < δ\n⊢ (x.fst, x.snd - a).fst ∈ ball q₀.fst ε\n[PROOFSTEP]\nrw [Prod.dist_eq] at hx \n[GOAL]\ncase a.a\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nε C : ℝ\nεpos : 0 < ε\nh₀ε : ball q₀.fst ε ⊆ s\nhε : ∀ (p : P) (x : G), ‖p - q₀.fst‖ < ε → ‖g' (p, x)‖ ≤ C\nI1 : ∀ᶠ (x : P × G) in 𝓝 q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g x.fst (x.snd - a))) μ\nI2 : Integrable fun a => ↑(↑L (f a)) (g q₀.fst (q₀.snd - a))\nI3 : AEStronglyMeasurable (fun a => ContinuousLinearMap.comp (↑L (f a)) (g' (q₀.fst, q₀.snd - a))) μ\nK' : Set G := -k + {q₀.snd}\nK'_def : K' = -k + {q₀.snd}\nhK' : IsCompact K'\nU : Set G\nU_open : IsOpen U\nK'U : K' ⊆ U\nhU : IntegrableOn f U\nδ : ℝ\nδpos : 0 < δ\nδε : δ ≤ ε\nhδ : K' + ball 0 δ ⊆ U\nthis : Norm (E →L[𝕜] (P × G →L[𝕜] E') →L[𝕜] P × G →L[𝕜] F) := hasOpNorm\nbound : G → ℝ := indicator U fun t => ‖precompR (P × G) L‖ * ‖f t‖ * C\nI4 : ∀ᵐ (a : G) ∂μ, ∀ (x : P × G), dist x q₀ < δ → ‖↑(↑(precompR (P × G) L) (f a)) (g' (x.fst, x.snd - a))‖ ≤ bound a\nI5 : Integrable bound\na : G\nx : P × G\nhx : max (dist x.fst q₀.fst) (dist x.snd q₀.snd) < δ\n⊢ (x.fst, x.snd - a).fst ∈ ball q₀.fst ε\n[PROOFSTEP]\nexact lt_of_lt_of_le (lt_of_le_of_lt (le_max_left _ _) hx) δε\n[GOAL]\ncase hp\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nε C : ℝ\nεpos : 0 < ε\nh₀ε : ball q₀.fst ε ⊆ s\nhε : ∀ (p : P) (x : G), ‖p - q₀.fst‖ < ε → ‖g' (p, x)‖ ≤ C\nI1 : ∀ᶠ (x : P × G) in 𝓝 q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g x.fst (x.snd - a))) μ\nI2 : Integrable fun a => ↑(↑L (f a)) (g q₀.fst (q₀.snd - a))\nI3 : AEStronglyMeasurable (fun a => ContinuousLinearMap.comp (↑L (f a)) (g' (q₀.fst, q₀.snd - a))) μ\nK' : Set G := -k + {q₀.snd}\nK'_def : K' = -k + {q₀.snd}\nhK' : IsCompact K'\nU : Set G\nU_open : IsOpen U\nK'U : K' ⊆ U\nhU : IntegrableOn f U\nδ : ℝ\nδpos : 0 < δ\nδε : δ ≤ ε\nhδ : K' + ball 0 δ ⊆ U\nthis : Norm (E →L[𝕜] (P × G →L[𝕜] E') →L[𝕜] P × G →L[𝕜] F) := hasOpNorm\nbound : G → ℝ := indicator U fun t => ‖precompR (P × G) L‖ * ‖f t‖ * C\nI4 : ∀ᵐ (a : G) ∂μ, ∀ (x : P × G), dist x q₀ < δ → ‖↑(↑(precompR (P × G) L) (f a)) (g' (x.fst, x.snd - a))‖ ≤ bound a\nI5 : Integrable bound\na : G\nx : P × G\nhx : dist x q₀ < δ\nN : s ×ˢ univ ∈ 𝓝 (x.fst, x.snd - a)\n⊢ HasFDerivAt (fun x => g x.fst (x.snd - a)) (g' (x.fst, x.snd - a)) x\n[PROOFSTEP]\nhave Z := ((hg.differentiableOn le_rfl).differentiableAt N).hasFDerivAt\n[GOAL]\ncase hp\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nε C : ℝ\nεpos : 0 < ε\nh₀ε : ball q₀.fst ε ⊆ s\nhε : ∀ (p : P) (x : G), ‖p - q₀.fst‖ < ε → ‖g' (p, x)‖ ≤ C\nI1 : ∀ᶠ (x : P × G) in 𝓝 q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g x.fst (x.snd - a))) μ\nI2 : Integrable fun a => ↑(↑L (f a)) (g q₀.fst (q₀.snd - a))\nI3 : AEStronglyMeasurable (fun a => ContinuousLinearMap.comp (↑L (f a)) (g' (q₀.fst, q₀.snd - a))) μ\nK' : Set G := -k + {q₀.snd}\nK'_def : K' = -k + {q₀.snd}\nhK' : IsCompact K'\nU : Set G\nU_open : IsOpen U\nK'U : K' ⊆ U\nhU : IntegrableOn f U\nδ : ℝ\nδpos : 0 < δ\nδε : δ ≤ ε\nhδ : K' + ball 0 δ ⊆ U\nthis : Norm (E →L[𝕜] (P × G →L[𝕜] E') →L[𝕜] P × G →L[𝕜] F) := hasOpNorm\nbound : G → ℝ := indicator U fun t => ‖precompR (P × G) L‖ * ‖f t‖ * C\nI4 : ∀ᵐ (a : G) ∂μ, ∀ (x : P × G), dist x q₀ < δ → ‖↑(↑(precompR (P × G) L) (f a)) (g' (x.fst, x.snd - a))‖ ≤ bound a\nI5 : Integrable bound\na : G\nx : P × G\nhx : dist x q₀ < δ\nN : s ×ˢ univ ∈ 𝓝 (x.fst, x.snd - a)\nZ : HasFDerivAt (↿g) (fderiv 𝕜 (↿g) (x.fst, x.snd - a)) (x.fst, x.snd - a)\n⊢ HasFDerivAt (fun x => g x.fst (x.snd - a)) (g' (x.fst, x.snd - a)) x\n[PROOFSTEP]\nhave Z' : HasFDerivAt (fun x : P × G => (x.1, x.2 - a)) (ContinuousLinearMap.id 𝕜 (P × G)) x :=\n  by\n  have : (fun x : P × G => (x.1, x.2 - a)) = _root_.id - fun x => (0, a) := by\n    ext x <;> simp only [Pi.sub_apply, id.def, Prod.fst_sub, sub_zero, Prod.snd_sub]\n  rw [this]\n  exact (hasFDerivAt_id x).sub_const (0, a)\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nε C : ℝ\nεpos : 0 < ε\nh₀ε : ball q₀.fst ε ⊆ s\nhε : ∀ (p : P) (x : G), ‖p - q₀.fst‖ < ε → ‖g' (p, x)‖ ≤ C\nI1 : ∀ᶠ (x : P × G) in 𝓝 q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g x.fst (x.snd - a))) μ\nI2 : Integrable fun a => ↑(↑L (f a)) (g q₀.fst (q₀.snd - a))\nI3 : AEStronglyMeasurable (fun a => ContinuousLinearMap.comp (↑L (f a)) (g' (q₀.fst, q₀.snd - a))) μ\nK' : Set G := -k + {q₀.snd}\nK'_def : K' = -k + {q₀.snd}\nhK' : IsCompact K'\nU : Set G\nU_open : IsOpen U\nK'U : K' ⊆ U\nhU : IntegrableOn f U\nδ : ℝ\nδpos : 0 < δ\nδε : δ ≤ ε\nhδ : K' + ball 0 δ ⊆ U\nthis : Norm (E →L[𝕜] (P × G →L[𝕜] E') →L[𝕜] P × G →L[𝕜] F) := hasOpNorm\nbound : G → ℝ := indicator U fun t => ‖precompR (P × G) L‖ * ‖f t‖ * C\nI4 : ∀ᵐ (a : G) ∂μ, ∀ (x : P × G), dist x q₀ < δ → ‖↑(↑(precompR (P × G) L) (f a)) (g' (x.fst, x.snd - a))‖ ≤ bound a\nI5 : Integrable bound\na : G\nx : P × G\nhx : dist x q₀ < δ\nN : s ×ˢ univ ∈ 𝓝 (x.fst, x.snd - a)\nZ : HasFDerivAt (↿g) (fderiv 𝕜 (↿g) (x.fst, x.snd - a)) (x.fst, x.snd - a)\n⊢ HasFDerivAt (fun x => (x.fst, x.snd - a)) (ContinuousLinearMap.id 𝕜 (P × G)) x\n[PROOFSTEP]\nhave : (fun x : P × G => (x.1, x.2 - a)) = _root_.id - fun x => (0, a) := by\n  ext x <;> simp only [Pi.sub_apply, id.def, Prod.fst_sub, sub_zero, Prod.snd_sub]\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nε C : ℝ\nεpos : 0 < ε\nh₀ε : ball q₀.fst ε ⊆ s\nhε : ∀ (p : P) (x : G), ‖p - q₀.fst‖ < ε → ‖g' (p, x)‖ ≤ C\nI1 : ∀ᶠ (x : P × G) in 𝓝 q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g x.fst (x.snd - a))) μ\nI2 : Integrable fun a => ↑(↑L (f a)) (g q₀.fst (q₀.snd - a))\nI3 : AEStronglyMeasurable (fun a => ContinuousLinearMap.comp (↑L (f a)) (g' (q₀.fst, q₀.snd - a))) μ\nK' : Set G := -k + {q₀.snd}\nK'_def : K' = -k + {q₀.snd}\nhK' : IsCompact K'\nU : Set G\nU_open : IsOpen U\nK'U : K' ⊆ U\nhU : IntegrableOn f U\nδ : ℝ\nδpos : 0 < δ\nδε : δ ≤ ε\nhδ : K' + ball 0 δ ⊆ U\nthis : Norm (E →L[𝕜] (P × G →L[𝕜] E') →L[𝕜] P × G →L[𝕜] F) := hasOpNorm\nbound : G → ℝ := indicator U fun t => ‖precompR (P × G) L‖ * ‖f t‖ * C\nI4 : ∀ᵐ (a : G) ∂μ, ∀ (x : P × G), dist x q₀ < δ → ‖↑(↑(precompR (P × G) L) (f a)) (g' (x.fst, x.snd - a))‖ ≤ bound a\nI5 : Integrable bound\na : G\nx : P × G\nhx : dist x q₀ < δ\nN : s ×ˢ univ ∈ 𝓝 (x.fst, x.snd - a)\nZ : HasFDerivAt (↿g) (fderiv 𝕜 (↿g) (x.fst, x.snd - a)) (x.fst, x.snd - a)\n⊢ (fun x => (x.fst, x.snd - a)) = _root_.id - fun x => (0, a)\n[PROOFSTEP]\next x\n[GOAL]\ncase h.h₁\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx✝¹ x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nε C : ℝ\nεpos : 0 < ε\nh₀ε : ball q₀.fst ε ⊆ s\nhε : ∀ (p : P) (x : G), ‖p - q₀.fst‖ < ε → ‖g' (p, x)‖ ≤ C\nI1 : ∀ᶠ (x : P × G) in 𝓝 q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g x.fst (x.snd - a))) μ\nI2 : Integrable fun a => ↑(↑L (f a)) (g q₀.fst (q₀.snd - a))\nI3 : AEStronglyMeasurable (fun a => ContinuousLinearMap.comp (↑L (f a)) (g' (q₀.fst, q₀.snd - a))) μ\nK' : Set G := -k + {q₀.snd}\nK'_def : K' = -k + {q₀.snd}\nhK' : IsCompact K'\nU : Set G\nU_open : IsOpen U\nK'U : K' ⊆ U\nhU : IntegrableOn f U\nδ : ℝ\nδpos : 0 < δ\nδε : δ ≤ ε\nhδ : K' + ball 0 δ ⊆ U\nthis : Norm (E →L[𝕜] (P × G →L[𝕜] E') →L[𝕜] P × G →L[𝕜] F) := hasOpNorm\nbound : G → ℝ := indicator U fun t => ‖precompR (P × G) L‖ * ‖f t‖ * C\nI4 : ∀ᵐ (a : G) ∂μ, ∀ (x : P × G), dist x q₀ < δ → ‖↑(↑(precompR (P × G) L) (f a)) (g' (x.fst, x.snd - a))‖ ≤ bound a\nI5 : Integrable bound\na : G\nx✝ : P × G\nhx : dist x✝ q₀ < δ\nN : s ×ˢ univ ∈ 𝓝 (x✝.fst, x✝.snd - a)\nZ : HasFDerivAt (↿g) (fderiv 𝕜 (↿g) (x✝.fst, x✝.snd - a)) (x✝.fst, x✝.snd - a)\nx : P × G\n⊢ (x.fst, x.snd - a).fst = ((_root_.id - fun x => (0, a)) x).fst\n[PROOFSTEP]\nsimp only [Pi.sub_apply, id.def, Prod.fst_sub, sub_zero, Prod.snd_sub]\n[GOAL]\ncase h.h₂\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx✝¹ x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nε C : ℝ\nεpos : 0 < ε\nh₀ε : ball q₀.fst ε ⊆ s\nhε : ∀ (p : P) (x : G), ‖p - q₀.fst‖ < ε → ‖g' (p, x)‖ ≤ C\nI1 : ∀ᶠ (x : P × G) in 𝓝 q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g x.fst (x.snd - a))) μ\nI2 : Integrable fun a => ↑(↑L (f a)) (g q₀.fst (q₀.snd - a))\nI3 : AEStronglyMeasurable (fun a => ContinuousLinearMap.comp (↑L (f a)) (g' (q₀.fst, q₀.snd - a))) μ\nK' : Set G := -k + {q₀.snd}\nK'_def : K' = -k + {q₀.snd}\nhK' : IsCompact K'\nU : Set G\nU_open : IsOpen U\nK'U : K' ⊆ U\nhU : IntegrableOn f U\nδ : ℝ\nδpos : 0 < δ\nδε : δ ≤ ε\nhδ : K' + ball 0 δ ⊆ U\nthis : Norm (E →L[𝕜] (P × G →L[𝕜] E') →L[𝕜] P × G →L[𝕜] F) := hasOpNorm\nbound : G → ℝ := indicator U fun t => ‖precompR (P × G) L‖ * ‖f t‖ * C\nI4 : ∀ᵐ (a : G) ∂μ, ∀ (x : P × G), dist x q₀ < δ → ‖↑(↑(precompR (P × G) L) (f a)) (g' (x.fst, x.snd - a))‖ ≤ bound a\nI5 : Integrable bound\na : G\nx✝ : P × G\nhx : dist x✝ q₀ < δ\nN : s ×ˢ univ ∈ 𝓝 (x✝.fst, x✝.snd - a)\nZ : HasFDerivAt (↿g) (fderiv 𝕜 (↿g) (x✝.fst, x✝.snd - a)) (x✝.fst, x✝.snd - a)\nx : P × G\n⊢ (x.fst, x.snd - a).snd = ((_root_.id - fun x => (0, a)) x).snd\n[PROOFSTEP]\nsimp only [Pi.sub_apply, id.def, Prod.fst_sub, sub_zero, Prod.snd_sub]\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nε C : ℝ\nεpos : 0 < ε\nh₀ε : ball q₀.fst ε ⊆ s\nhε : ∀ (p : P) (x : G), ‖p - q₀.fst‖ < ε → ‖g' (p, x)‖ ≤ C\nI1 : ∀ᶠ (x : P × G) in 𝓝 q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g x.fst (x.snd - a))) μ\nI2 : Integrable fun a => ↑(↑L (f a)) (g q₀.fst (q₀.snd - a))\nI3 : AEStronglyMeasurable (fun a => ContinuousLinearMap.comp (↑L (f a)) (g' (q₀.fst, q₀.snd - a))) μ\nK' : Set G := -k + {q₀.snd}\nK'_def : K' = -k + {q₀.snd}\nhK' : IsCompact K'\nU : Set G\nU_open : IsOpen U\nK'U : K' ⊆ U\nhU : IntegrableOn f U\nδ : ℝ\nδpos : 0 < δ\nδε : δ ≤ ε\nhδ : K' + ball 0 δ ⊆ U\nthis✝ : Norm (E →L[𝕜] (P × G →L[𝕜] E') →L[𝕜] P × G →L[𝕜] F) := hasOpNorm\nbound : G → ℝ := indicator U fun t => ‖precompR (P × G) L‖ * ‖f t‖ * C\nI4 : ∀ᵐ (a : G) ∂μ, ∀ (x : P × G), dist x q₀ < δ → ‖↑(↑(precompR (P × G) L) (f a)) (g' (x.fst, x.snd - a))‖ ≤ bound a\nI5 : Integrable bound\na : G\nx : P × G\nhx : dist x q₀ < δ\nN : s ×ˢ univ ∈ 𝓝 (x.fst, x.snd - a)\nZ : HasFDerivAt (↿g) (fderiv 𝕜 (↿g) (x.fst, x.snd - a)) (x.fst, x.snd - a)\nthis : (fun x => (x.fst, x.snd - a)) = _root_.id - fun x => (0, a)\n⊢ HasFDerivAt (fun x => (x.fst, x.snd - a)) (ContinuousLinearMap.id 𝕜 (P × G)) x\n[PROOFSTEP]\nrw [this]\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nε C : ℝ\nεpos : 0 < ε\nh₀ε : ball q₀.fst ε ⊆ s\nhε : ∀ (p : P) (x : G), ‖p - q₀.fst‖ < ε → ‖g' (p, x)‖ ≤ C\nI1 : ∀ᶠ (x : P × G) in 𝓝 q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g x.fst (x.snd - a))) μ\nI2 : Integrable fun a => ↑(↑L (f a)) (g q₀.fst (q₀.snd - a))\nI3 : AEStronglyMeasurable (fun a => ContinuousLinearMap.comp (↑L (f a)) (g' (q₀.fst, q₀.snd - a))) μ\nK' : Set G := -k + {q₀.snd}\nK'_def : K' = -k + {q₀.snd}\nhK' : IsCompact K'\nU : Set G\nU_open : IsOpen U\nK'U : K' ⊆ U\nhU : IntegrableOn f U\nδ : ℝ\nδpos : 0 < δ\nδε : δ ≤ ε\nhδ : K' + ball 0 δ ⊆ U\nthis✝ : Norm (E →L[𝕜] (P × G →L[𝕜] E') →L[𝕜] P × G →L[𝕜] F) := hasOpNorm\nbound : G → ℝ := indicator U fun t => ‖precompR (P × G) L‖ * ‖f t‖ * C\nI4 : ∀ᵐ (a : G) ∂μ, ∀ (x : P × G), dist x q₀ < δ → ‖↑(↑(precompR (P × G) L) (f a)) (g' (x.fst, x.snd - a))‖ ≤ bound a\nI5 : Integrable bound\na : G\nx : P × G\nhx : dist x q₀ < δ\nN : s ×ˢ univ ∈ 𝓝 (x.fst, x.snd - a)\nZ : HasFDerivAt (↿g) (fderiv 𝕜 (↿g) (x.fst, x.snd - a)) (x.fst, x.snd - a)\nthis : (fun x => (x.fst, x.snd - a)) = _root_.id - fun x => (0, a)\n⊢ HasFDerivAt (_root_.id - fun x => (0, a)) (ContinuousLinearMap.id 𝕜 (P × G)) x\n[PROOFSTEP]\nexact (hasFDerivAt_id x).sub_const (0, a)\n[GOAL]\ncase hp\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nε C : ℝ\nεpos : 0 < ε\nh₀ε : ball q₀.fst ε ⊆ s\nhε : ∀ (p : P) (x : G), ‖p - q₀.fst‖ < ε → ‖g' (p, x)‖ ≤ C\nI1 : ∀ᶠ (x : P × G) in 𝓝 q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g x.fst (x.snd - a))) μ\nI2 : Integrable fun a => ↑(↑L (f a)) (g q₀.fst (q₀.snd - a))\nI3 : AEStronglyMeasurable (fun a => ContinuousLinearMap.comp (↑L (f a)) (g' (q₀.fst, q₀.snd - a))) μ\nK' : Set G := -k + {q₀.snd}\nK'_def : K' = -k + {q₀.snd}\nhK' : IsCompact K'\nU : Set G\nU_open : IsOpen U\nK'U : K' ⊆ U\nhU : IntegrableOn f U\nδ : ℝ\nδpos : 0 < δ\nδε : δ ≤ ε\nhδ : K' + ball 0 δ ⊆ U\nthis : Norm (E →L[𝕜] (P × G →L[𝕜] E') →L[𝕜] P × G →L[𝕜] F) := hasOpNorm\nbound : G → ℝ := indicator U fun t => ‖precompR (P × G) L‖ * ‖f t‖ * C\nI4 : ∀ᵐ (a : G) ∂μ, ∀ (x : P × G), dist x q₀ < δ → ‖↑(↑(precompR (P × G) L) (f a)) (g' (x.fst, x.snd - a))‖ ≤ bound a\nI5 : Integrable bound\na : G\nx : P × G\nhx : dist x q₀ < δ\nN : s ×ˢ univ ∈ 𝓝 (x.fst, x.snd - a)\nZ : HasFDerivAt (↿g) (fderiv 𝕜 (↿g) (x.fst, x.snd - a)) (x.fst, x.snd - a)\nZ' : HasFDerivAt (fun x => (x.fst, x.snd - a)) (ContinuousLinearMap.id 𝕜 (P × G)) x\n⊢ HasFDerivAt (fun x => g x.fst (x.snd - a)) (g' (x.fst, x.snd - a)) x\n[PROOFSTEP]\nexact Z.comp x Z'\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng✝ g'✝ : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 1 (↿g) (s ×ˢ univ)\nq₀ : P × G\nhq₀ : q₀.fst ∈ s\ng' : P × G → P × G →L[𝕜] E' := fderiv 𝕜 ↿g\nA : ∀ (p : P), p ∈ s → Continuous (g p)\nA' : ∀ (q : P × G), q.fst ∈ s → s ×ˢ univ ∈ 𝓝 q\ng'_zero : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g' (p, x) = 0\nε C : ℝ\nεpos : 0 < ε\nh₀ε : ball q₀.fst ε ⊆ s\nhε : ∀ (p : P) (x : G), ‖p - q₀.fst‖ < ε → ‖g' (p, x)‖ ≤ C\nI1 : ∀ᶠ (x : P × G) in 𝓝 q₀, AEStronglyMeasurable (fun a => ↑(↑L (f a)) (g x.fst (x.snd - a))) μ\nI2 : Integrable fun a => ↑(↑L (f a)) (g q₀.fst (q₀.snd - a))\nI3 : AEStronglyMeasurable (fun a => ContinuousLinearMap.comp (↑L (f a)) (g' (q₀.fst, q₀.snd - a))) μ\nK' : Set G := -k + {q₀.snd}\nK'_def : K' = -k + {q₀.snd}\nhK' : IsCompact K'\nU : Set G\nU_open : IsOpen U\nK'U : K' ⊆ U\nhU : IntegrableOn f U\nδ : ℝ\nδpos : 0 < δ\nδε : δ ≤ ε\nhδ : K' + ball 0 δ ⊆ U\nthis : Norm (E →L[𝕜] (P × G →L[𝕜] E') →L[𝕜] P × G →L[𝕜] F) := hasOpNorm\nbound : G → ℝ := indicator U fun t => ‖precompR (P × G) L‖ * ‖f t‖ * C\nI4 : ∀ᵐ (a : G) ∂μ, ∀ (x : P × G), dist x q₀ < δ → ‖↑(↑(precompR (P × G) L) (f a)) (g' (x.fst, x.snd - a))‖ ≤ bound a\nI5 : Integrable bound\nI6 :\n  ∀ᵐ (a : G) ∂μ,\n    ∀ (x : P × G),\n      dist x q₀ < δ →\n        HasFDerivAt (fun x => ↑(↑L (f a)) (g x.fst (x.snd - a)))\n          (ContinuousLinearMap.comp (↑L (f a)) (g' (x.fst, x.snd - a))) x\n⊢ HasFDerivAt (fun q => f ⋆[L, q.snd] g q.fst) (f ⋆[precompR (P × G) L, q₀.snd] fun x => fderiv 𝕜 (↿g) (q₀.fst, x)) q₀\n[PROOFSTEP]\nexact hasFDerivAt_integral_of_dominated_of_fderiv_le δpos I1 I2 I3 I4 I5 I6\n[GOAL]\n𝕜 : Type u𝕜\nG✝ : Type uG\nE : Type uE\nE'✝ : Type uE'\nE'' : Type uE''\nF✝ : Type uF\nF' : Type uF'\nF'' : Type uF''\nP✝ : Type uP\ninst✝²⁸ : NormedAddCommGroup E\ninst✝²⁷ : NormedAddCommGroup E'✝\ninst✝²⁶ : NormedAddCommGroup E''\ninst✝²⁵ : NormedAddCommGroup F✝\nf✝ f' : G✝ → E\ng✝ g' : G✝ → E'✝\nx x' : G✝\ny y' : E\ninst✝²⁴ : IsROrC 𝕜\ninst✝²³ : NormedSpace 𝕜 E\ninst✝²² : NormedSpace 𝕜 E'✝\ninst✝²¹ : NormedSpace 𝕜 E''\ninst✝²⁰ : NormedSpace ℝ F✝\ninst✝¹⁹ : NormedSpace 𝕜 F✝\ninst✝¹⁸ : CompleteSpace F✝\ninst✝¹⁷ : MeasurableSpace G✝\ninst✝¹⁶ : NormedAddCommGroup G✝\ninst✝¹⁵ : BorelSpace G✝\ninst✝¹⁴ : NormedSpace 𝕜 G✝\ninst✝¹³ : NormedAddCommGroup P✝\ninst✝¹² : NormedSpace 𝕜 P✝\nμ✝ : Measure G✝\nL✝ : E →L[𝕜] E'✝ →L[𝕜] F✝\nG E' F P : Type uP\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 E'\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\nμ : Measure G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nf : G → E\nn : ℕ∞\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 n (↿g) (s ×ˢ univ)\n⊢ ContDiffOn 𝕜 n (fun q => f ⋆[L, q.snd] g q.fst) (s ×ˢ univ)\n[PROOFSTEP]\ninduction' n using ENat.nat_induction with n ih ih generalizing g E' F\n[GOAL]\ncase h0\n𝕜 : Type u𝕜\nG✝ : Type uG\nE : Type uE\nE'✝¹ : Type uE'\nE'' : Type uE''\nF✝¹ : Type uF\nF' : Type uF'\nF'' : Type uF''\nP✝ : Type uP\ninst✝³⁴ : NormedAddCommGroup E\ninst✝³³ : NormedAddCommGroup E'✝¹\ninst✝³² : NormedAddCommGroup E''\ninst✝³¹ : NormedAddCommGroup F✝¹\nf✝ f' : G✝ → E\ng✝¹ g' : G✝ → E'✝¹\nx x' : G✝\ny y' : E\ninst✝³⁰ : IsROrC 𝕜\ninst✝²⁹ : NormedSpace 𝕜 E\ninst✝²⁸ : NormedSpace 𝕜 E'✝¹\ninst✝²⁷ : NormedSpace 𝕜 E''\ninst✝²⁶ : NormedSpace ℝ F✝¹\ninst✝²⁵ : NormedSpace 𝕜 F✝¹\ninst✝²⁴ : CompleteSpace F✝¹\ninst✝²³ : MeasurableSpace G✝\ninst✝²² : NormedAddCommGroup G✝\ninst✝²¹ : BorelSpace G✝\ninst✝²⁰ : NormedSpace 𝕜 G✝\ninst✝¹⁹ : NormedAddCommGroup P✝\ninst✝¹⁸ : NormedSpace 𝕜 P✝\nμ✝ : Measure G✝\nL✝¹ : E →L[𝕜] E'✝¹ →L[𝕜] F✝¹\nG E'✝ F✝ P : Type uP\ninst✝¹⁷ : NormedAddCommGroup E'✝\ninst✝¹⁶ : NormedAddCommGroup F✝\ninst✝¹⁵ : NormedSpace 𝕜 E'✝\ninst✝¹⁴ : NormedSpace ℝ F✝\ninst✝¹³ : NormedSpace 𝕜 F✝\ninst✝¹² : CompleteSpace F✝\ninst✝¹¹ : MeasurableSpace G\nμ : Measure G\ninst✝¹⁰ : NormedAddCommGroup G\ninst✝⁹ : BorelSpace G\ninst✝⁸ : NormedSpace 𝕜 G\ninst✝⁷ : NormedAddCommGroup P\ninst✝⁶ : NormedSpace 𝕜 P\nf : G → E\nn : ℕ∞\nL✝ : E →L[𝕜] E'✝ →L[𝕜] F✝\ng✝ : P → G → E'✝\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs✝ : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g✝ p x = 0\nhf : LocallyIntegrable f\nhg✝ : ContDiffOn 𝕜 n (↿g✝) (s ×ˢ univ)\nE' F : Type uP\ninst✝⁵ : NormedAddCommGroup E'\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 E'\ninst✝² : NormedSpace ℝ F\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : CompleteSpace F\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhg : ContDiffOn 𝕜 0 (↿g) (s ×ˢ univ)\n⊢ ContDiffOn 𝕜 0 (fun q => f ⋆[L, q.snd] g q.fst) (s ×ˢ univ)\n[PROOFSTEP]\nrw [contDiffOn_zero] at hg ⊢\n[GOAL]\ncase h0\n𝕜 : Type u𝕜\nG✝ : Type uG\nE : Type uE\nE'✝¹ : Type uE'\nE'' : Type uE''\nF✝¹ : Type uF\nF' : Type uF'\nF'' : Type uF''\nP✝ : Type uP\ninst✝³⁴ : NormedAddCommGroup E\ninst✝³³ : NormedAddCommGroup E'✝¹\ninst✝³² : NormedAddCommGroup E''\ninst✝³¹ : NormedAddCommGroup F✝¹\nf✝ f' : G✝ → E\ng✝¹ g' : G✝ → E'✝¹\nx x' : G✝\ny y' : E\ninst✝³⁰ : IsROrC 𝕜\ninst✝²⁹ : NormedSpace 𝕜 E\ninst✝²⁸ : NormedSpace 𝕜 E'✝¹\ninst✝²⁷ : NormedSpace 𝕜 E''\ninst✝²⁶ : NormedSpace ℝ F✝¹\ninst✝²⁵ : NormedSpace 𝕜 F✝¹\ninst✝²⁴ : CompleteSpace F✝¹\ninst✝²³ : MeasurableSpace G✝\ninst✝²² : NormedAddCommGroup G✝\ninst✝²¹ : BorelSpace G✝\ninst✝²⁰ : NormedSpace 𝕜 G✝\ninst✝¹⁹ : NormedAddCommGroup P✝\ninst✝¹⁸ : NormedSpace 𝕜 P✝\nμ✝ : Measure G✝\nL✝¹ : E →L[𝕜] E'✝¹ →L[𝕜] F✝¹\nG E'✝ F✝ P : Type uP\ninst✝¹⁷ : NormedAddCommGroup E'✝\ninst✝¹⁶ : NormedAddCommGroup F✝\ninst✝¹⁵ : NormedSpace 𝕜 E'✝\ninst✝¹⁴ : NormedSpace ℝ F✝\ninst✝¹³ : NormedSpace 𝕜 F✝\ninst✝¹² : CompleteSpace F✝\ninst✝¹¹ : MeasurableSpace G\nμ : Measure G\ninst✝¹⁰ : NormedAddCommGroup G\ninst✝⁹ : BorelSpace G\ninst✝⁸ : NormedSpace 𝕜 G\ninst✝⁷ : NormedAddCommGroup P\ninst✝⁶ : NormedSpace 𝕜 P\nf : G → E\nn : ℕ∞\nL✝ : E →L[𝕜] E'✝ →L[𝕜] F✝\ng✝ : P → G → E'✝\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs✝ : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g✝ p x = 0\nhf : LocallyIntegrable f\nhg✝ : ContDiffOn 𝕜 n (↿g✝) (s ×ˢ univ)\nE' F : Type uP\ninst✝⁵ : NormedAddCommGroup E'\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 E'\ninst✝² : NormedSpace ℝ F\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : CompleteSpace F\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhg : ContinuousOn (↿g) (s ×ˢ univ)\n⊢ ContinuousOn (fun q => f ⋆[L, q.snd] g q.fst) (s ×ˢ univ)\n[PROOFSTEP]\nexact continuousOn_convolution_right_with_param L hk hgs hf hg\n[GOAL]\ncase hsuc\n𝕜 : Type u𝕜\nG✝ : Type uG\nE : Type uE\nE'✝¹ : Type uE'\nE'' : Type uE''\nF✝¹ : Type uF\nF' : Type uF'\nF'' : Type uF''\nP✝ : Type uP\ninst✝³⁴ : NormedAddCommGroup E\ninst✝³³ : NormedAddCommGroup E'✝¹\ninst✝³² : NormedAddCommGroup E''\ninst✝³¹ : NormedAddCommGroup F✝¹\nf✝ f' : G✝ → E\ng✝¹ g' : G✝ → E'✝¹\nx x' : G✝\ny y' : E\ninst✝³⁰ : IsROrC 𝕜\ninst✝²⁹ : NormedSpace 𝕜 E\ninst✝²⁸ : NormedSpace 𝕜 E'✝¹\ninst✝²⁷ : NormedSpace 𝕜 E''\ninst✝²⁶ : NormedSpace ℝ F✝¹\ninst✝²⁵ : NormedSpace 𝕜 F✝¹\ninst✝²⁴ : CompleteSpace F✝¹\ninst✝²³ : MeasurableSpace G✝\ninst✝²² : NormedAddCommGroup G✝\ninst✝²¹ : BorelSpace G✝\ninst✝²⁰ : NormedSpace 𝕜 G✝\ninst✝¹⁹ : NormedAddCommGroup P✝\ninst✝¹⁸ : NormedSpace 𝕜 P✝\nμ✝ : Measure G✝\nL✝¹ : E →L[𝕜] E'✝¹ →L[𝕜] F✝¹\nG E'✝ F✝ P : Type uP\ninst✝¹⁷ : NormedAddCommGroup E'✝\ninst✝¹⁶ : NormedAddCommGroup F✝\ninst✝¹⁵ : NormedSpace 𝕜 E'✝\ninst✝¹⁴ : NormedSpace ℝ F✝\ninst✝¹³ : NormedSpace 𝕜 F✝\ninst✝¹² : CompleteSpace F✝\ninst✝¹¹ : MeasurableSpace G\nμ : Measure G\ninst✝¹⁰ : NormedAddCommGroup G\ninst✝⁹ : BorelSpace G\ninst✝⁸ : NormedSpace 𝕜 G\ninst✝⁷ : NormedAddCommGroup P\ninst✝⁶ : NormedSpace 𝕜 P\nf : G → E\nn✝ : ℕ∞\nL✝ : E →L[𝕜] E'✝ →L[𝕜] F✝\ng✝ : P → G → E'✝\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs✝ : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g✝ p x = 0\nhf : LocallyIntegrable f\nhg✝ : ContDiffOn 𝕜 n✝ (↿g✝) (s ×ˢ univ)\nn : ℕ\nih :\n  ∀ {E' F : Type uP} [inst : NormedAddCommGroup E'] [inst_1 : NormedAddCommGroup F] [inst_2 : NormedSpace 𝕜 E']\n    [inst_3 : NormedSpace ℝ F] [inst_4 : NormedSpace 𝕜 F] [inst_5 : CompleteSpace F] (L : E →L[𝕜] E' →L[𝕜] F)\n    {g : P → G → E'},\n    (∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0) →\n      ContDiffOn 𝕜 (↑n) (↿g) (s ×ˢ univ) → ContDiffOn 𝕜 (↑n) (fun q => f ⋆[L, q.snd] g q.fst) (s ×ˢ univ)\nE' F : Type uP\ninst✝⁵ : NormedAddCommGroup E'\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 E'\ninst✝² : NormedSpace ℝ F\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : CompleteSpace F\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) (↿g) (s ×ˢ univ)\n⊢ ContDiffOn 𝕜 (↑(Nat.succ n)) (fun q => f ⋆[L, q.snd] g q.fst) (s ×ˢ univ)\n[PROOFSTEP]\nlet f' : P → G → P × G →L[𝕜] F := fun p a => (f ⋆[L.precompR (P × G), μ] fun x : G => fderiv 𝕜 (uncurry g) (p, x)) a\n[GOAL]\ncase hsuc\n𝕜 : Type u𝕜\nG✝ : Type uG\nE : Type uE\nE'✝¹ : Type uE'\nE'' : Type uE''\nF✝¹ : Type uF\nF' : Type uF'\nF'' : Type uF''\nP✝ : Type uP\ninst✝³⁴ : NormedAddCommGroup E\ninst✝³³ : NormedAddCommGroup E'✝¹\ninst✝³² : NormedAddCommGroup E''\ninst✝³¹ : NormedAddCommGroup F✝¹\nf✝ f'✝ : G✝ → E\ng✝¹ g' : G✝ → E'✝¹\nx x' : G✝\ny y' : E\ninst✝³⁰ : IsROrC 𝕜\ninst✝²⁹ : NormedSpace 𝕜 E\ninst✝²⁸ : NormedSpace 𝕜 E'✝¹\ninst✝²⁷ : NormedSpace 𝕜 E''\ninst✝²⁶ : NormedSpace ℝ F✝¹\ninst✝²⁵ : NormedSpace 𝕜 F✝¹\ninst✝²⁴ : CompleteSpace F✝¹\ninst✝²³ : MeasurableSpace G✝\ninst✝²² : NormedAddCommGroup G✝\ninst✝²¹ : BorelSpace G✝\ninst✝²⁰ : NormedSpace 𝕜 G✝\ninst✝¹⁹ : NormedAddCommGroup P✝\ninst✝¹⁸ : NormedSpace 𝕜 P✝\nμ✝ : Measure G✝\nL✝¹ : E →L[𝕜] E'✝¹ →L[𝕜] F✝¹\nG E'✝ F✝ P : Type uP\ninst✝¹⁷ : NormedAddCommGroup E'✝\ninst✝¹⁶ : NormedAddCommGroup F✝\ninst✝¹⁵ : NormedSpace 𝕜 E'✝\ninst✝¹⁴ : NormedSpace ℝ F✝\ninst✝¹³ : NormedSpace 𝕜 F✝\ninst✝¹² : CompleteSpace F✝\ninst✝¹¹ : MeasurableSpace G\nμ : Measure G\ninst✝¹⁰ : NormedAddCommGroup G\ninst✝⁹ : BorelSpace G\ninst✝⁸ : NormedSpace 𝕜 G\ninst✝⁷ : NormedAddCommGroup P\ninst✝⁶ : NormedSpace 𝕜 P\nf : G → E\nn✝ : ℕ∞\nL✝ : E →L[𝕜] E'✝ →L[𝕜] F✝\ng✝ : P → G → E'✝\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs✝ : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g✝ p x = 0\nhf : LocallyIntegrable f\nhg✝ : ContDiffOn 𝕜 n✝ (↿g✝) (s ×ˢ univ)\nn : ℕ\nih :\n  ∀ {E' F : Type uP} [inst : NormedAddCommGroup E'] [inst_1 : NormedAddCommGroup F] [inst_2 : NormedSpace 𝕜 E']\n    [inst_3 : NormedSpace ℝ F] [inst_4 : NormedSpace 𝕜 F] [inst_5 : CompleteSpace F] (L : E →L[𝕜] E' →L[𝕜] F)\n    {g : P → G → E'},\n    (∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0) →\n      ContDiffOn 𝕜 (↑n) (↿g) (s ×ˢ univ) → ContDiffOn 𝕜 (↑n) (fun q => f ⋆[L, q.snd] g q.fst) (s ×ˢ univ)\nE' F : Type uP\ninst✝⁵ : NormedAddCommGroup E'\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 E'\ninst✝² : NormedSpace ℝ F\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : CompleteSpace F\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) (↿g) (s ×ˢ univ)\nf' : P → G → P × G →L[𝕜] F := fun p a => f ⋆[precompR (P × G) L, a] fun x => fderiv 𝕜 (uncurry g) (p, x)\n⊢ ContDiffOn 𝕜 (↑(Nat.succ n)) (fun q => f ⋆[L, q.snd] g q.fst) (s ×ˢ univ)\n[PROOFSTEP]\nhave A : ∀ q₀ : P × G, q₀.1 ∈ s → HasFDerivAt (fun q : P × G => (f ⋆[L, μ] g q.1) q.2) (f' q₀.1 q₀.2) q₀ :=\n  hasFDerivAt_convolution_right_with_param L hs hk hgs hf hg.one_of_succ\n[GOAL]\ncase hsuc\n𝕜 : Type u𝕜\nG✝ : Type uG\nE : Type uE\nE'✝¹ : Type uE'\nE'' : Type uE''\nF✝¹ : Type uF\nF' : Type uF'\nF'' : Type uF''\nP✝ : Type uP\ninst✝³⁴ : NormedAddCommGroup E\ninst✝³³ : NormedAddCommGroup E'✝¹\ninst✝³² : NormedAddCommGroup E''\ninst✝³¹ : NormedAddCommGroup F✝¹\nf✝ f'✝ : G✝ → E\ng✝¹ g' : G✝ → E'✝¹\nx x' : G✝\ny y' : E\ninst✝³⁰ : IsROrC 𝕜\ninst✝²⁹ : NormedSpace 𝕜 E\ninst✝²⁸ : NormedSpace 𝕜 E'✝¹\ninst✝²⁷ : NormedSpace 𝕜 E''\ninst✝²⁶ : NormedSpace ℝ F✝¹\ninst✝²⁵ : NormedSpace 𝕜 F✝¹\ninst✝²⁴ : CompleteSpace F✝¹\ninst✝²³ : MeasurableSpace G✝\ninst✝²² : NormedAddCommGroup G✝\ninst✝²¹ : BorelSpace G✝\ninst✝²⁰ : NormedSpace 𝕜 G✝\ninst✝¹⁹ : NormedAddCommGroup P✝\ninst✝¹⁸ : NormedSpace 𝕜 P✝\nμ✝ : Measure G✝\nL✝¹ : E →L[𝕜] E'✝¹ →L[𝕜] F✝¹\nG E'✝ F✝ P : Type uP\ninst✝¹⁷ : NormedAddCommGroup E'✝\ninst✝¹⁶ : NormedAddCommGroup F✝\ninst✝¹⁵ : NormedSpace 𝕜 E'✝\ninst✝¹⁴ : NormedSpace ℝ F✝\ninst✝¹³ : NormedSpace 𝕜 F✝\ninst✝¹² : CompleteSpace F✝\ninst✝¹¹ : MeasurableSpace G\nμ : Measure G\ninst✝¹⁰ : NormedAddCommGroup G\ninst✝⁹ : BorelSpace G\ninst✝⁸ : NormedSpace 𝕜 G\ninst✝⁷ : NormedAddCommGroup P\ninst✝⁶ : NormedSpace 𝕜 P\nf : G → E\nn✝ : ℕ∞\nL✝ : E →L[𝕜] E'✝ →L[𝕜] F✝\ng✝ : P → G → E'✝\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs✝ : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g✝ p x = 0\nhf : LocallyIntegrable f\nhg✝ : ContDiffOn 𝕜 n✝ (↿g✝) (s ×ˢ univ)\nn : ℕ\nih :\n  ∀ {E' F : Type uP} [inst : NormedAddCommGroup E'] [inst_1 : NormedAddCommGroup F] [inst_2 : NormedSpace 𝕜 E']\n    [inst_3 : NormedSpace ℝ F] [inst_4 : NormedSpace 𝕜 F] [inst_5 : CompleteSpace F] (L : E →L[𝕜] E' →L[𝕜] F)\n    {g : P → G → E'},\n    (∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0) →\n      ContDiffOn 𝕜 (↑n) (↿g) (s ×ˢ univ) → ContDiffOn 𝕜 (↑n) (fun q => f ⋆[L, q.snd] g q.fst) (s ×ˢ univ)\nE' F : Type uP\ninst✝⁵ : NormedAddCommGroup E'\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 E'\ninst✝² : NormedSpace ℝ F\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : CompleteSpace F\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhg : ContDiffOn 𝕜 (↑(Nat.succ n)) (↿g) (s ×ˢ univ)\nf' : P → G → P × G →L[𝕜] F := fun p a => f ⋆[precompR (P × G) L, a] fun x => fderiv 𝕜 (uncurry g) (p, x)\nA : ∀ (q₀ : P × G), q₀.fst ∈ s → HasFDerivAt (fun q => f ⋆[L, q.snd] g q.fst) (f' q₀.fst q₀.snd) q₀\n⊢ ContDiffOn 𝕜 (↑(Nat.succ n)) (fun q => f ⋆[L, q.snd] g q.fst) (s ×ˢ univ)\n[PROOFSTEP]\nrw [contDiffOn_succ_iff_fderiv_of_open (hs.prod (@isOpen_univ G _))] at hg ⊢\n[GOAL]\ncase hsuc\n𝕜 : Type u𝕜\nG✝ : Type uG\nE : Type uE\nE'✝¹ : Type uE'\nE'' : Type uE''\nF✝¹ : Type uF\nF' : Type uF'\nF'' : Type uF''\nP✝ : Type uP\ninst✝³⁴ : NormedAddCommGroup E\ninst✝³³ : NormedAddCommGroup E'✝¹\ninst✝³² : NormedAddCommGroup E''\ninst✝³¹ : NormedAddCommGroup F✝¹\nf✝ f'✝ : G✝ → E\ng✝¹ g' : G✝ → E'✝¹\nx x' : G✝\ny y' : E\ninst✝³⁰ : IsROrC 𝕜\ninst✝²⁹ : NormedSpace 𝕜 E\ninst✝²⁸ : NormedSpace 𝕜 E'✝¹\ninst✝²⁷ : NormedSpace 𝕜 E''\ninst✝²⁶ : NormedSpace ℝ F✝¹\ninst✝²⁵ : NormedSpace 𝕜 F✝¹\ninst✝²⁴ : CompleteSpace F✝¹\ninst✝²³ : MeasurableSpace G✝\ninst✝²² : NormedAddCommGroup G✝\ninst✝²¹ : BorelSpace G✝\ninst✝²⁰ : NormedSpace 𝕜 G✝\ninst✝¹⁹ : NormedAddCommGroup P✝\ninst✝¹⁸ : NormedSpace 𝕜 P✝\nμ✝ : Measure G✝\nL✝¹ : E →L[𝕜] E'✝¹ →L[𝕜] F✝¹\nG E'✝ F✝ P : Type uP\ninst✝¹⁷ : NormedAddCommGroup E'✝\ninst✝¹⁶ : NormedAddCommGroup F✝\ninst✝¹⁵ : NormedSpace 𝕜 E'✝\ninst✝¹⁴ : NormedSpace ℝ F✝\ninst✝¹³ : NormedSpace 𝕜 F✝\ninst✝¹² : CompleteSpace F✝\ninst✝¹¹ : MeasurableSpace G\nμ : Measure G\ninst✝¹⁰ : NormedAddCommGroup G\ninst✝⁹ : BorelSpace G\ninst✝⁸ : NormedSpace 𝕜 G\ninst✝⁷ : NormedAddCommGroup P\ninst✝⁶ : NormedSpace 𝕜 P\nf : G → E\nn✝ : ℕ∞\nL✝ : E →L[𝕜] E'✝ →L[𝕜] F✝\ng✝ : P → G → E'✝\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs✝ : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g✝ p x = 0\nhf : LocallyIntegrable f\nhg✝ : ContDiffOn 𝕜 n✝ (↿g✝) (s ×ˢ univ)\nn : ℕ\nih :\n  ∀ {E' F : Type uP} [inst : NormedAddCommGroup E'] [inst_1 : NormedAddCommGroup F] [inst_2 : NormedSpace 𝕜 E']\n    [inst_3 : NormedSpace ℝ F] [inst_4 : NormedSpace 𝕜 F] [inst_5 : CompleteSpace F] (L : E →L[𝕜] E' →L[𝕜] F)\n    {g : P → G → E'},\n    (∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0) →\n      ContDiffOn 𝕜 (↑n) (↿g) (s ×ˢ univ) → ContDiffOn 𝕜 (↑n) (fun q => f ⋆[L, q.snd] g q.fst) (s ×ˢ univ)\nE' F : Type uP\ninst✝⁵ : NormedAddCommGroup E'\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 E'\ninst✝² : NormedSpace ℝ F\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : CompleteSpace F\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhg : DifferentiableOn 𝕜 (↿g) (s ×ˢ univ) ∧ ContDiffOn 𝕜 (↑n) (fun y => fderiv 𝕜 (↿g) y) (s ×ˢ univ)\nf' : P → G → P × G →L[𝕜] F := fun p a => f ⋆[precompR (P × G) L, a] fun x => fderiv 𝕜 (uncurry g) (p, x)\nA : ∀ (q₀ : P × G), q₀.fst ∈ s → HasFDerivAt (fun q => f ⋆[L, q.snd] g q.fst) (f' q₀.fst q₀.snd) q₀\n⊢ DifferentiableOn 𝕜 (fun q => f ⋆[L, q.snd] g q.fst) (s ×ˢ univ) ∧\n    ContDiffOn 𝕜 (↑n) (fun y => fderiv 𝕜 (fun q => f ⋆[L, q.snd] g q.fst) y) (s ×ˢ univ)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase hsuc.left\n𝕜 : Type u𝕜\nG✝ : Type uG\nE : Type uE\nE'✝¹ : Type uE'\nE'' : Type uE''\nF✝¹ : Type uF\nF' : Type uF'\nF'' : Type uF''\nP✝ : Type uP\ninst✝³⁴ : NormedAddCommGroup E\ninst✝³³ : NormedAddCommGroup E'✝¹\ninst✝³² : NormedAddCommGroup E''\ninst✝³¹ : NormedAddCommGroup F✝¹\nf✝ f'✝ : G✝ → E\ng✝¹ g' : G✝ → E'✝¹\nx x' : G✝\ny y' : E\ninst✝³⁰ : IsROrC 𝕜\ninst✝²⁹ : NormedSpace 𝕜 E\ninst✝²⁸ : NormedSpace 𝕜 E'✝¹\ninst✝²⁷ : NormedSpace 𝕜 E''\ninst✝²⁶ : NormedSpace ℝ F✝¹\ninst✝²⁵ : NormedSpace 𝕜 F✝¹\ninst✝²⁴ : CompleteSpace F✝¹\ninst✝²³ : MeasurableSpace G✝\ninst✝²² : NormedAddCommGroup G✝\ninst✝²¹ : BorelSpace G✝\ninst✝²⁰ : NormedSpace 𝕜 G✝\ninst✝¹⁹ : NormedAddCommGroup P✝\ninst✝¹⁸ : NormedSpace 𝕜 P✝\nμ✝ : Measure G✝\nL✝¹ : E →L[𝕜] E'✝¹ →L[𝕜] F✝¹\nG E'✝ F✝ P : Type uP\ninst✝¹⁷ : NormedAddCommGroup E'✝\ninst✝¹⁶ : NormedAddCommGroup F✝\ninst✝¹⁵ : NormedSpace 𝕜 E'✝\ninst✝¹⁴ : NormedSpace ℝ F✝\ninst✝¹³ : NormedSpace 𝕜 F✝\ninst✝¹² : CompleteSpace F✝\ninst✝¹¹ : MeasurableSpace G\nμ : Measure G\ninst✝¹⁰ : NormedAddCommGroup G\ninst✝⁹ : BorelSpace G\ninst✝⁸ : NormedSpace 𝕜 G\ninst✝⁷ : NormedAddCommGroup P\ninst✝⁶ : NormedSpace 𝕜 P\nf : G → E\nn✝ : ℕ∞\nL✝ : E →L[𝕜] E'✝ →L[𝕜] F✝\ng✝ : P → G → E'✝\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs✝ : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g✝ p x = 0\nhf : LocallyIntegrable f\nhg✝ : ContDiffOn 𝕜 n✝ (↿g✝) (s ×ˢ univ)\nn : ℕ\nih :\n  ∀ {E' F : Type uP} [inst : NormedAddCommGroup E'] [inst_1 : NormedAddCommGroup F] [inst_2 : NormedSpace 𝕜 E']\n    [inst_3 : NormedSpace ℝ F] [inst_4 : NormedSpace 𝕜 F] [inst_5 : CompleteSpace F] (L : E →L[𝕜] E' →L[𝕜] F)\n    {g : P → G → E'},\n    (∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0) →\n      ContDiffOn 𝕜 (↑n) (↿g) (s ×ˢ univ) → ContDiffOn 𝕜 (↑n) (fun q => f ⋆[L, q.snd] g q.fst) (s ×ˢ univ)\nE' F : Type uP\ninst✝⁵ : NormedAddCommGroup E'\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 E'\ninst✝² : NormedSpace ℝ F\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : CompleteSpace F\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhg : DifferentiableOn 𝕜 (↿g) (s ×ˢ univ) ∧ ContDiffOn 𝕜 (↑n) (fun y => fderiv 𝕜 (↿g) y) (s ×ˢ univ)\nf' : P → G → P × G →L[𝕜] F := fun p a => f ⋆[precompR (P × G) L, a] fun x => fderiv 𝕜 (uncurry g) (p, x)\nA : ∀ (q₀ : P × G), q₀.fst ∈ s → HasFDerivAt (fun q => f ⋆[L, q.snd] g q.fst) (f' q₀.fst q₀.snd) q₀\n⊢ DifferentiableOn 𝕜 (fun q => f ⋆[L, q.snd] g q.fst) (s ×ˢ univ)\n[PROOFSTEP]\nrintro ⟨p, x⟩ ⟨hp, -⟩\n[GOAL]\ncase hsuc.left.mk.intro\n𝕜 : Type u𝕜\nG✝ : Type uG\nE : Type uE\nE'✝¹ : Type uE'\nE'' : Type uE''\nF✝¹ : Type uF\nF' : Type uF'\nF'' : Type uF''\nP✝ : Type uP\ninst✝³⁴ : NormedAddCommGroup E\ninst✝³³ : NormedAddCommGroup E'✝¹\ninst✝³² : NormedAddCommGroup E''\ninst✝³¹ : NormedAddCommGroup F✝¹\nf✝ f'✝ : G✝ → E\ng✝¹ g' : G✝ → E'✝¹\nx✝ x' : G✝\ny y' : E\ninst✝³⁰ : IsROrC 𝕜\ninst✝²⁹ : NormedSpace 𝕜 E\ninst✝²⁸ : NormedSpace 𝕜 E'✝¹\ninst✝²⁷ : NormedSpace 𝕜 E''\ninst✝²⁶ : NormedSpace ℝ F✝¹\ninst✝²⁵ : NormedSpace 𝕜 F✝¹\ninst✝²⁴ : CompleteSpace F✝¹\ninst✝²³ : MeasurableSpace G✝\ninst✝²² : NormedAddCommGroup G✝\ninst✝²¹ : BorelSpace G✝\ninst✝²⁰ : NormedSpace 𝕜 G✝\ninst✝¹⁹ : NormedAddCommGroup P✝\ninst✝¹⁸ : NormedSpace 𝕜 P✝\nμ✝ : Measure G✝\nL✝¹ : E →L[𝕜] E'✝¹ →L[𝕜] F✝¹\nG E'✝ F✝ P : Type uP\ninst✝¹⁷ : NormedAddCommGroup E'✝\ninst✝¹⁶ : NormedAddCommGroup F✝\ninst✝¹⁵ : NormedSpace 𝕜 E'✝\ninst✝¹⁴ : NormedSpace ℝ F✝\ninst✝¹³ : NormedSpace 𝕜 F✝\ninst✝¹² : CompleteSpace F✝\ninst✝¹¹ : MeasurableSpace G\nμ : Measure G\ninst✝¹⁰ : NormedAddCommGroup G\ninst✝⁹ : BorelSpace G\ninst✝⁸ : NormedSpace 𝕜 G\ninst✝⁷ : NormedAddCommGroup P\ninst✝⁶ : NormedSpace 𝕜 P\nf : G → E\nn✝ : ℕ∞\nL✝ : E →L[𝕜] E'✝ →L[𝕜] F✝\ng✝ : P → G → E'✝\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs✝ : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g✝ p x = 0\nhf : LocallyIntegrable f\nhg✝ : ContDiffOn 𝕜 n✝ (↿g✝) (s ×ˢ univ)\nn : ℕ\nih :\n  ∀ {E' F : Type uP} [inst : NormedAddCommGroup E'] [inst_1 : NormedAddCommGroup F] [inst_2 : NormedSpace 𝕜 E']\n    [inst_3 : NormedSpace ℝ F] [inst_4 : NormedSpace 𝕜 F] [inst_5 : CompleteSpace F] (L : E →L[𝕜] E' →L[𝕜] F)\n    {g : P → G → E'},\n    (∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0) →\n      ContDiffOn 𝕜 (↑n) (↿g) (s ×ˢ univ) → ContDiffOn 𝕜 (↑n) (fun q => f ⋆[L, q.snd] g q.fst) (s ×ˢ univ)\nE' F : Type uP\ninst✝⁵ : NormedAddCommGroup E'\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 E'\ninst✝² : NormedSpace ℝ F\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : CompleteSpace F\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhg : DifferentiableOn 𝕜 (↿g) (s ×ˢ univ) ∧ ContDiffOn 𝕜 (↑n) (fun y => fderiv 𝕜 (↿g) y) (s ×ˢ univ)\nf' : P → G → P × G →L[𝕜] F := fun p a => f ⋆[precompR (P × G) L, a] fun x => fderiv 𝕜 (uncurry g) (p, x)\nA : ∀ (q₀ : P × G), q₀.fst ∈ s → HasFDerivAt (fun q => f ⋆[L, q.snd] g q.fst) (f' q₀.fst q₀.snd) q₀\np : P\nx : G\nhp : (p, x).fst ∈ s\n⊢ DifferentiableWithinAt 𝕜 (fun q => f ⋆[L, q.snd] g q.fst) (s ×ˢ univ) (p, x)\n[PROOFSTEP]\nexact (A (p, x) hp).differentiableAt.differentiableWithinAt\n[GOAL]\ncase hsuc.right\n𝕜 : Type u𝕜\nG✝ : Type uG\nE : Type uE\nE'✝¹ : Type uE'\nE'' : Type uE''\nF✝¹ : Type uF\nF' : Type uF'\nF'' : Type uF''\nP✝ : Type uP\ninst✝³⁴ : NormedAddCommGroup E\ninst✝³³ : NormedAddCommGroup E'✝¹\ninst✝³² : NormedAddCommGroup E''\ninst✝³¹ : NormedAddCommGroup F✝¹\nf✝ f'✝ : G✝ → E\ng✝¹ g' : G✝ → E'✝¹\nx x' : G✝\ny y' : E\ninst✝³⁰ : IsROrC 𝕜\ninst✝²⁹ : NormedSpace 𝕜 E\ninst✝²⁸ : NormedSpace 𝕜 E'✝¹\ninst✝²⁷ : NormedSpace 𝕜 E''\ninst✝²⁶ : NormedSpace ℝ F✝¹\ninst✝²⁵ : NormedSpace 𝕜 F✝¹\ninst✝²⁴ : CompleteSpace F✝¹\ninst✝²³ : MeasurableSpace G✝\ninst✝²² : NormedAddCommGroup G✝\ninst✝²¹ : BorelSpace G✝\ninst✝²⁰ : NormedSpace 𝕜 G✝\ninst✝¹⁹ : NormedAddCommGroup P✝\ninst✝¹⁸ : NormedSpace 𝕜 P✝\nμ✝ : Measure G✝\nL✝¹ : E →L[𝕜] E'✝¹ →L[𝕜] F✝¹\nG E'✝ F✝ P : Type uP\ninst✝¹⁷ : NormedAddCommGroup E'✝\ninst✝¹⁶ : NormedAddCommGroup F✝\ninst✝¹⁵ : NormedSpace 𝕜 E'✝\ninst✝¹⁴ : NormedSpace ℝ F✝\ninst✝¹³ : NormedSpace 𝕜 F✝\ninst✝¹² : CompleteSpace F✝\ninst✝¹¹ : MeasurableSpace G\nμ : Measure G\ninst✝¹⁰ : NormedAddCommGroup G\ninst✝⁹ : BorelSpace G\ninst✝⁸ : NormedSpace 𝕜 G\ninst✝⁷ : NormedAddCommGroup P\ninst✝⁶ : NormedSpace 𝕜 P\nf : G → E\nn✝ : ℕ∞\nL✝ : E →L[𝕜] E'✝ →L[𝕜] F✝\ng✝ : P → G → E'✝\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs✝ : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g✝ p x = 0\nhf : LocallyIntegrable f\nhg✝ : ContDiffOn 𝕜 n✝ (↿g✝) (s ×ˢ univ)\nn : ℕ\nih :\n  ∀ {E' F : Type uP} [inst : NormedAddCommGroup E'] [inst_1 : NormedAddCommGroup F] [inst_2 : NormedSpace 𝕜 E']\n    [inst_3 : NormedSpace ℝ F] [inst_4 : NormedSpace 𝕜 F] [inst_5 : CompleteSpace F] (L : E →L[𝕜] E' →L[𝕜] F)\n    {g : P → G → E'},\n    (∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0) →\n      ContDiffOn 𝕜 (↑n) (↿g) (s ×ˢ univ) → ContDiffOn 𝕜 (↑n) (fun q => f ⋆[L, q.snd] g q.fst) (s ×ˢ univ)\nE' F : Type uP\ninst✝⁵ : NormedAddCommGroup E'\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 E'\ninst✝² : NormedSpace ℝ F\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : CompleteSpace F\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhg : DifferentiableOn 𝕜 (↿g) (s ×ˢ univ) ∧ ContDiffOn 𝕜 (↑n) (fun y => fderiv 𝕜 (↿g) y) (s ×ˢ univ)\nf' : P → G → P × G →L[𝕜] F := fun p a => f ⋆[precompR (P × G) L, a] fun x => fderiv 𝕜 (uncurry g) (p, x)\nA : ∀ (q₀ : P × G), q₀.fst ∈ s → HasFDerivAt (fun q => f ⋆[L, q.snd] g q.fst) (f' q₀.fst q₀.snd) q₀\n⊢ ContDiffOn 𝕜 (↑n) (fun y => fderiv 𝕜 (fun q => f ⋆[L, q.snd] g q.fst) y) (s ×ˢ univ)\n[PROOFSTEP]\nsuffices H : ContDiffOn 𝕜 n (↿f') (s ×ˢ univ)\n[GOAL]\ncase hsuc.right\n𝕜 : Type u𝕜\nG✝ : Type uG\nE : Type uE\nE'✝¹ : Type uE'\nE'' : Type uE''\nF✝¹ : Type uF\nF' : Type uF'\nF'' : Type uF''\nP✝ : Type uP\ninst✝³⁴ : NormedAddCommGroup E\ninst✝³³ : NormedAddCommGroup E'✝¹\ninst✝³² : NormedAddCommGroup E''\ninst✝³¹ : NormedAddCommGroup F✝¹\nf✝ f'✝ : G✝ → E\ng✝¹ g' : G✝ → E'✝¹\nx x' : G✝\ny y' : E\ninst✝³⁰ : IsROrC 𝕜\ninst✝²⁹ : NormedSpace 𝕜 E\ninst✝²⁸ : NormedSpace 𝕜 E'✝¹\ninst✝²⁷ : NormedSpace 𝕜 E''\ninst✝²⁶ : NormedSpace ℝ F✝¹\ninst✝²⁵ : NormedSpace 𝕜 F✝¹\ninst✝²⁴ : CompleteSpace F✝¹\ninst✝²³ : MeasurableSpace G✝\ninst✝²² : NormedAddCommGroup G✝\ninst✝²¹ : BorelSpace G✝\ninst✝²⁰ : NormedSpace 𝕜 G✝\ninst✝¹⁹ : NormedAddCommGroup P✝\ninst✝¹⁸ : NormedSpace 𝕜 P✝\nμ✝ : Measure G✝\nL✝¹ : E →L[𝕜] E'✝¹ →L[𝕜] F✝¹\nG E'✝ F✝ P : Type uP\ninst✝¹⁷ : NormedAddCommGroup E'✝\ninst✝¹⁶ : NormedAddCommGroup F✝\ninst✝¹⁵ : NormedSpace 𝕜 E'✝\ninst✝¹⁴ : NormedSpace ℝ F✝\ninst✝¹³ : NormedSpace 𝕜 F✝\ninst✝¹² : CompleteSpace F✝\ninst✝¹¹ : MeasurableSpace G\nμ : Measure G\ninst✝¹⁰ : NormedAddCommGroup G\ninst✝⁹ : BorelSpace G\ninst✝⁸ : NormedSpace 𝕜 G\ninst✝⁷ : NormedAddCommGroup P\ninst✝⁶ : NormedSpace 𝕜 P\nf : G → E\nn✝ : ℕ∞\nL✝ : E →L[𝕜] E'✝ →L[𝕜] F✝\ng✝ : P → G → E'✝\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs✝ : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g✝ p x = 0\nhf : LocallyIntegrable f\nhg✝ : ContDiffOn 𝕜 n✝ (↿g✝) (s ×ˢ univ)\nn : ℕ\nih :\n  ∀ {E' F : Type uP} [inst : NormedAddCommGroup E'] [inst_1 : NormedAddCommGroup F] [inst_2 : NormedSpace 𝕜 E']\n    [inst_3 : NormedSpace ℝ F] [inst_4 : NormedSpace 𝕜 F] [inst_5 : CompleteSpace F] (L : E →L[𝕜] E' →L[𝕜] F)\n    {g : P → G → E'},\n    (∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0) →\n      ContDiffOn 𝕜 (↑n) (↿g) (s ×ˢ univ) → ContDiffOn 𝕜 (↑n) (fun q => f ⋆[L, q.snd] g q.fst) (s ×ˢ univ)\nE' F : Type uP\ninst✝⁵ : NormedAddCommGroup E'\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 E'\ninst✝² : NormedSpace ℝ F\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : CompleteSpace F\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhg : DifferentiableOn 𝕜 (↿g) (s ×ˢ univ) ∧ ContDiffOn 𝕜 (↑n) (fun y => fderiv 𝕜 (↿g) y) (s ×ˢ univ)\nf' : P → G → P × G →L[𝕜] F := fun p a => f ⋆[precompR (P × G) L, a] fun x => fderiv 𝕜 (uncurry g) (p, x)\nA : ∀ (q₀ : P × G), q₀.fst ∈ s → HasFDerivAt (fun q => f ⋆[L, q.snd] g q.fst) (f' q₀.fst q₀.snd) q₀\nH : ContDiffOn 𝕜 (↑n) (↿f') (s ×ˢ univ)\n⊢ ContDiffOn 𝕜 (↑n) (fun y => fderiv 𝕜 (fun q => f ⋆[L, q.snd] g q.fst) y) (s ×ˢ univ)\n[PROOFSTEP]\napply H.congr\n[GOAL]\ncase hsuc.right\n𝕜 : Type u𝕜\nG✝ : Type uG\nE : Type uE\nE'✝¹ : Type uE'\nE'' : Type uE''\nF✝¹ : Type uF\nF' : Type uF'\nF'' : Type uF''\nP✝ : Type uP\ninst✝³⁴ : NormedAddCommGroup E\ninst✝³³ : NormedAddCommGroup E'✝¹\ninst✝³² : NormedAddCommGroup E''\ninst✝³¹ : NormedAddCommGroup F✝¹\nf✝ f'✝ : G✝ → E\ng✝¹ g' : G✝ → E'✝¹\nx x' : G✝\ny y' : E\ninst✝³⁰ : IsROrC 𝕜\ninst✝²⁹ : NormedSpace 𝕜 E\ninst✝²⁸ : NormedSpace 𝕜 E'✝¹\ninst✝²⁷ : NormedSpace 𝕜 E''\ninst✝²⁶ : NormedSpace ℝ F✝¹\ninst✝²⁵ : NormedSpace 𝕜 F✝¹\ninst✝²⁴ : CompleteSpace F✝¹\ninst✝²³ : MeasurableSpace G✝\ninst✝²² : NormedAddCommGroup G✝\ninst✝²¹ : BorelSpace G✝\ninst✝²⁰ : NormedSpace 𝕜 G✝\ninst✝¹⁹ : NormedAddCommGroup P✝\ninst✝¹⁸ : NormedSpace 𝕜 P✝\nμ✝ : Measure G✝\nL✝¹ : E →L[𝕜] E'✝¹ →L[𝕜] F✝¹\nG E'✝ F✝ P : Type uP\ninst✝¹⁷ : NormedAddCommGroup E'✝\ninst✝¹⁶ : NormedAddCommGroup F✝\ninst✝¹⁵ : NormedSpace 𝕜 E'✝\ninst✝¹⁴ : NormedSpace ℝ F✝\ninst✝¹³ : NormedSpace 𝕜 F✝\ninst✝¹² : CompleteSpace F✝\ninst✝¹¹ : MeasurableSpace G\nμ : Measure G\ninst✝¹⁰ : NormedAddCommGroup G\ninst✝⁹ : BorelSpace G\ninst✝⁸ : NormedSpace 𝕜 G\ninst✝⁷ : NormedAddCommGroup P\ninst✝⁶ : NormedSpace 𝕜 P\nf : G → E\nn✝ : ℕ∞\nL✝ : E →L[𝕜] E'✝ →L[𝕜] F✝\ng✝ : P → G → E'✝\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs✝ : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g✝ p x = 0\nhf : LocallyIntegrable f\nhg✝ : ContDiffOn 𝕜 n✝ (↿g✝) (s ×ˢ univ)\nn : ℕ\nih :\n  ∀ {E' F : Type uP} [inst : NormedAddCommGroup E'] [inst_1 : NormedAddCommGroup F] [inst_2 : NormedSpace 𝕜 E']\n    [inst_3 : NormedSpace ℝ F] [inst_4 : NormedSpace 𝕜 F] [inst_5 : CompleteSpace F] (L : E →L[𝕜] E' →L[𝕜] F)\n    {g : P → G → E'},\n    (∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0) →\n      ContDiffOn 𝕜 (↑n) (↿g) (s ×ˢ univ) → ContDiffOn 𝕜 (↑n) (fun q => f ⋆[L, q.snd] g q.fst) (s ×ˢ univ)\nE' F : Type uP\ninst✝⁵ : NormedAddCommGroup E'\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 E'\ninst✝² : NormedSpace ℝ F\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : CompleteSpace F\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhg : DifferentiableOn 𝕜 (↿g) (s ×ˢ univ) ∧ ContDiffOn 𝕜 (↑n) (fun y => fderiv 𝕜 (↿g) y) (s ×ˢ univ)\nf' : P → G → P × G →L[𝕜] F := fun p a => f ⋆[precompR (P × G) L, a] fun x => fderiv 𝕜 (uncurry g) (p, x)\nA : ∀ (q₀ : P × G), q₀.fst ∈ s → HasFDerivAt (fun q => f ⋆[L, q.snd] g q.fst) (f' q₀.fst q₀.snd) q₀\nH : ContDiffOn 𝕜 (↑n) (↿f') (s ×ˢ univ)\n⊢ ∀ (x : P × G), x ∈ s ×ˢ univ → fderiv 𝕜 (fun q => f ⋆[L, q.snd] g q.fst) x = (↿f') x\n[PROOFSTEP]\nrintro ⟨p, x⟩ ⟨hp, -⟩\n[GOAL]\ncase hsuc.right.mk.intro\n𝕜 : Type u𝕜\nG✝ : Type uG\nE : Type uE\nE'✝¹ : Type uE'\nE'' : Type uE''\nF✝¹ : Type uF\nF' : Type uF'\nF'' : Type uF''\nP✝ : Type uP\ninst✝³⁴ : NormedAddCommGroup E\ninst✝³³ : NormedAddCommGroup E'✝¹\ninst✝³² : NormedAddCommGroup E''\ninst✝³¹ : NormedAddCommGroup F✝¹\nf✝ f'✝ : G✝ → E\ng✝¹ g' : G✝ → E'✝¹\nx✝ x' : G✝\ny y' : E\ninst✝³⁰ : IsROrC 𝕜\ninst✝²⁹ : NormedSpace 𝕜 E\ninst✝²⁸ : NormedSpace 𝕜 E'✝¹\ninst✝²⁷ : NormedSpace 𝕜 E''\ninst✝²⁶ : NormedSpace ℝ F✝¹\ninst✝²⁵ : NormedSpace 𝕜 F✝¹\ninst✝²⁴ : CompleteSpace F✝¹\ninst✝²³ : MeasurableSpace G✝\ninst✝²² : NormedAddCommGroup G✝\ninst✝²¹ : BorelSpace G✝\ninst✝²⁰ : NormedSpace 𝕜 G✝\ninst✝¹⁹ : NormedAddCommGroup P✝\ninst✝¹⁸ : NormedSpace 𝕜 P✝\nμ✝ : Measure G✝\nL✝¹ : E →L[𝕜] E'✝¹ →L[𝕜] F✝¹\nG E'✝ F✝ P : Type uP\ninst✝¹⁷ : NormedAddCommGroup E'✝\ninst✝¹⁶ : NormedAddCommGroup F✝\ninst✝¹⁵ : NormedSpace 𝕜 E'✝\ninst✝¹⁴ : NormedSpace ℝ F✝\ninst✝¹³ : NormedSpace 𝕜 F✝\ninst✝¹² : CompleteSpace F✝\ninst✝¹¹ : MeasurableSpace G\nμ : Measure G\ninst✝¹⁰ : NormedAddCommGroup G\ninst✝⁹ : BorelSpace G\ninst✝⁸ : NormedSpace 𝕜 G\ninst✝⁷ : NormedAddCommGroup P\ninst✝⁶ : NormedSpace 𝕜 P\nf : G → E\nn✝ : ℕ∞\nL✝ : E →L[𝕜] E'✝ →L[𝕜] F✝\ng✝ : P → G → E'✝\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs✝ : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g✝ p x = 0\nhf : LocallyIntegrable f\nhg✝ : ContDiffOn 𝕜 n✝ (↿g✝) (s ×ˢ univ)\nn : ℕ\nih :\n  ∀ {E' F : Type uP} [inst : NormedAddCommGroup E'] [inst_1 : NormedAddCommGroup F] [inst_2 : NormedSpace 𝕜 E']\n    [inst_3 : NormedSpace ℝ F] [inst_4 : NormedSpace 𝕜 F] [inst_5 : CompleteSpace F] (L : E →L[𝕜] E' →L[𝕜] F)\n    {g : P → G → E'},\n    (∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0) →\n      ContDiffOn 𝕜 (↑n) (↿g) (s ×ˢ univ) → ContDiffOn 𝕜 (↑n) (fun q => f ⋆[L, q.snd] g q.fst) (s ×ˢ univ)\nE' F : Type uP\ninst✝⁵ : NormedAddCommGroup E'\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 E'\ninst✝² : NormedSpace ℝ F\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : CompleteSpace F\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhg : DifferentiableOn 𝕜 (↿g) (s ×ˢ univ) ∧ ContDiffOn 𝕜 (↑n) (fun y => fderiv 𝕜 (↿g) y) (s ×ˢ univ)\nf' : P → G → P × G →L[𝕜] F := fun p a => f ⋆[precompR (P × G) L, a] fun x => fderiv 𝕜 (uncurry g) (p, x)\nA : ∀ (q₀ : P × G), q₀.fst ∈ s → HasFDerivAt (fun q => f ⋆[L, q.snd] g q.fst) (f' q₀.fst q₀.snd) q₀\nH : ContDiffOn 𝕜 (↑n) (↿f') (s ×ˢ univ)\np : P\nx : G\nhp : (p, x).fst ∈ s\n⊢ fderiv 𝕜 (fun q => f ⋆[L, q.snd] g q.fst) (p, x) = (↿f') (p, x)\n[PROOFSTEP]\nexact (A (p, x) hp).fderiv\n[GOAL]\ncase H\n𝕜 : Type u𝕜\nG✝ : Type uG\nE : Type uE\nE'✝¹ : Type uE'\nE'' : Type uE''\nF✝¹ : Type uF\nF' : Type uF'\nF'' : Type uF''\nP✝ : Type uP\ninst✝³⁴ : NormedAddCommGroup E\ninst✝³³ : NormedAddCommGroup E'✝¹\ninst✝³² : NormedAddCommGroup E''\ninst✝³¹ : NormedAddCommGroup F✝¹\nf✝ f'✝ : G✝ → E\ng✝¹ g' : G✝ → E'✝¹\nx x' : G✝\ny y' : E\ninst✝³⁰ : IsROrC 𝕜\ninst✝²⁹ : NormedSpace 𝕜 E\ninst✝²⁸ : NormedSpace 𝕜 E'✝¹\ninst✝²⁷ : NormedSpace 𝕜 E''\ninst✝²⁶ : NormedSpace ℝ F✝¹\ninst✝²⁵ : NormedSpace 𝕜 F✝¹\ninst✝²⁴ : CompleteSpace F✝¹\ninst✝²³ : MeasurableSpace G✝\ninst✝²² : NormedAddCommGroup G✝\ninst✝²¹ : BorelSpace G✝\ninst✝²⁰ : NormedSpace 𝕜 G✝\ninst✝¹⁹ : NormedAddCommGroup P✝\ninst✝¹⁸ : NormedSpace 𝕜 P✝\nμ✝ : Measure G✝\nL✝¹ : E →L[𝕜] E'✝¹ →L[𝕜] F✝¹\nG E'✝ F✝ P : Type uP\ninst✝¹⁷ : NormedAddCommGroup E'✝\ninst✝¹⁶ : NormedAddCommGroup F✝\ninst✝¹⁵ : NormedSpace 𝕜 E'✝\ninst✝¹⁴ : NormedSpace ℝ F✝\ninst✝¹³ : NormedSpace 𝕜 F✝\ninst✝¹² : CompleteSpace F✝\ninst✝¹¹ : MeasurableSpace G\nμ : Measure G\ninst✝¹⁰ : NormedAddCommGroup G\ninst✝⁹ : BorelSpace G\ninst✝⁸ : NormedSpace 𝕜 G\ninst✝⁷ : NormedAddCommGroup P\ninst✝⁶ : NormedSpace 𝕜 P\nf : G → E\nn✝ : ℕ∞\nL✝ : E →L[𝕜] E'✝ →L[𝕜] F✝\ng✝ : P → G → E'✝\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs✝ : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g✝ p x = 0\nhf : LocallyIntegrable f\nhg✝ : ContDiffOn 𝕜 n✝ (↿g✝) (s ×ˢ univ)\nn : ℕ\nih :\n  ∀ {E' F : Type uP} [inst : NormedAddCommGroup E'] [inst_1 : NormedAddCommGroup F] [inst_2 : NormedSpace 𝕜 E']\n    [inst_3 : NormedSpace ℝ F] [inst_4 : NormedSpace 𝕜 F] [inst_5 : CompleteSpace F] (L : E →L[𝕜] E' →L[𝕜] F)\n    {g : P → G → E'},\n    (∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0) →\n      ContDiffOn 𝕜 (↑n) (↿g) (s ×ˢ univ) → ContDiffOn 𝕜 (↑n) (fun q => f ⋆[L, q.snd] g q.fst) (s ×ˢ univ)\nE' F : Type uP\ninst✝⁵ : NormedAddCommGroup E'\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 E'\ninst✝² : NormedSpace ℝ F\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : CompleteSpace F\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhg : DifferentiableOn 𝕜 (↿g) (s ×ˢ univ) ∧ ContDiffOn 𝕜 (↑n) (fun y => fderiv 𝕜 (↿g) y) (s ×ˢ univ)\nf' : P → G → P × G →L[𝕜] F := fun p a => f ⋆[precompR (P × G) L, a] fun x => fderiv 𝕜 (uncurry g) (p, x)\nA : ∀ (q₀ : P × G), q₀.fst ∈ s → HasFDerivAt (fun q => f ⋆[L, q.snd] g q.fst) (f' q₀.fst q₀.snd) q₀\n⊢ ContDiffOn 𝕜 (↑n) (↿f') (s ×ˢ univ)\n[PROOFSTEP]\nhave B : ∀ (p : P) (x : G), p ∈ s → x ∉ k → fderiv 𝕜 (uncurry g) (p, x) = 0 :=\n  by\n  intro p x hp hx\n  apply (hasFDerivAt_zero_of_eventually_const (0 : E') _).fderiv\n  have M2 : kᶜ ∈ 𝓝 x := IsOpen.mem_nhds hk.isClosed.isOpen_compl hx\n  have M1 : s ∈ 𝓝 p := hs.mem_nhds hp\n  rw [nhds_prod_eq]\n  filter_upwards [prod_mem_prod M1 M2]\n  rintro ⟨p, y⟩ ⟨hp, hy⟩\n  exact hgs p y hp hy\n[GOAL]\n𝕜 : Type u𝕜\nG✝ : Type uG\nE : Type uE\nE'✝¹ : Type uE'\nE'' : Type uE''\nF✝¹ : Type uF\nF' : Type uF'\nF'' : Type uF''\nP✝ : Type uP\ninst✝³⁴ : NormedAddCommGroup E\ninst✝³³ : NormedAddCommGroup E'✝¹\ninst✝³² : NormedAddCommGroup E''\ninst✝³¹ : NormedAddCommGroup F✝¹\nf✝ f'✝ : G✝ → E\ng✝¹ g' : G✝ → E'✝¹\nx x' : G✝\ny y' : E\ninst✝³⁰ : IsROrC 𝕜\ninst✝²⁹ : NormedSpace 𝕜 E\ninst✝²⁸ : NormedSpace 𝕜 E'✝¹\ninst✝²⁷ : NormedSpace 𝕜 E''\ninst✝²⁶ : NormedSpace ℝ F✝¹\ninst✝²⁵ : NormedSpace 𝕜 F✝¹\ninst✝²⁴ : CompleteSpace F✝¹\ninst✝²³ : MeasurableSpace G✝\ninst✝²² : NormedAddCommGroup G✝\ninst✝²¹ : BorelSpace G✝\ninst✝²⁰ : NormedSpace 𝕜 G✝\ninst✝¹⁹ : NormedAddCommGroup P✝\ninst✝¹⁸ : NormedSpace 𝕜 P✝\nμ✝ : Measure G✝\nL✝¹ : E →L[𝕜] E'✝¹ →L[𝕜] F✝¹\nG E'✝ F✝ P : Type uP\ninst✝¹⁷ : NormedAddCommGroup E'✝\ninst✝¹⁶ : NormedAddCommGroup F✝\ninst✝¹⁵ : NormedSpace 𝕜 E'✝\ninst✝¹⁴ : NormedSpace ℝ F✝\ninst✝¹³ : NormedSpace 𝕜 F✝\ninst✝¹² : CompleteSpace F✝\ninst✝¹¹ : MeasurableSpace G\nμ : Measure G\ninst✝¹⁰ : NormedAddCommGroup G\ninst✝⁹ : BorelSpace G\ninst✝⁸ : NormedSpace 𝕜 G\ninst✝⁷ : NormedAddCommGroup P\ninst✝⁶ : NormedSpace 𝕜 P\nf : G → E\nn✝ : ℕ∞\nL✝ : E →L[𝕜] E'✝ →L[𝕜] F✝\ng✝ : P → G → E'✝\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs✝ : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g✝ p x = 0\nhf : LocallyIntegrable f\nhg✝ : ContDiffOn 𝕜 n✝ (↿g✝) (s ×ˢ univ)\nn : ℕ\nih :\n  ∀ {E' F : Type uP} [inst : NormedAddCommGroup E'] [inst_1 : NormedAddCommGroup F] [inst_2 : NormedSpace 𝕜 E']\n    [inst_3 : NormedSpace ℝ F] [inst_4 : NormedSpace 𝕜 F] [inst_5 : CompleteSpace F] (L : E →L[𝕜] E' →L[𝕜] F)\n    {g : P → G → E'},\n    (∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0) →\n      ContDiffOn 𝕜 (↑n) (↿g) (s ×ˢ univ) → ContDiffOn 𝕜 (↑n) (fun q => f ⋆[L, q.snd] g q.fst) (s ×ˢ univ)\nE' F : Type uP\ninst✝⁵ : NormedAddCommGroup E'\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 E'\ninst✝² : NormedSpace ℝ F\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : CompleteSpace F\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhg : DifferentiableOn 𝕜 (↿g) (s ×ˢ univ) ∧ ContDiffOn 𝕜 (↑n) (fun y => fderiv 𝕜 (↿g) y) (s ×ˢ univ)\nf' : P → G → P × G →L[𝕜] F := fun p a => f ⋆[precompR (P × G) L, a] fun x => fderiv 𝕜 (uncurry g) (p, x)\nA : ∀ (q₀ : P × G), q₀.fst ∈ s → HasFDerivAt (fun q => f ⋆[L, q.snd] g q.fst) (f' q₀.fst q₀.snd) q₀\n⊢ ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → fderiv 𝕜 (uncurry g) (p, x) = 0\n[PROOFSTEP]\nintro p x hp hx\n[GOAL]\n𝕜 : Type u𝕜\nG✝ : Type uG\nE : Type uE\nE'✝¹ : Type uE'\nE'' : Type uE''\nF✝¹ : Type uF\nF' : Type uF'\nF'' : Type uF''\nP✝ : Type uP\ninst✝³⁴ : NormedAddCommGroup E\ninst✝³³ : NormedAddCommGroup E'✝¹\ninst✝³² : NormedAddCommGroup E''\ninst✝³¹ : NormedAddCommGroup F✝¹\nf✝ f'✝ : G✝ → E\ng✝¹ g' : G✝ → E'✝¹\nx✝ x' : G✝\ny y' : E\ninst✝³⁰ : IsROrC 𝕜\ninst✝²⁹ : NormedSpace 𝕜 E\ninst✝²⁸ : NormedSpace 𝕜 E'✝¹\ninst✝²⁷ : NormedSpace 𝕜 E''\ninst✝²⁶ : NormedSpace ℝ F✝¹\ninst✝²⁵ : NormedSpace 𝕜 F✝¹\ninst✝²⁴ : CompleteSpace F✝¹\ninst✝²³ : MeasurableSpace G✝\ninst✝²² : NormedAddCommGroup G✝\ninst✝²¹ : BorelSpace G✝\ninst✝²⁰ : NormedSpace 𝕜 G✝\ninst✝¹⁹ : NormedAddCommGroup P✝\ninst✝¹⁸ : NormedSpace 𝕜 P✝\nμ✝ : Measure G✝\nL✝¹ : E →L[𝕜] E'✝¹ →L[𝕜] F✝¹\nG E'✝ F✝ P : Type uP\ninst✝¹⁷ : NormedAddCommGroup E'✝\ninst✝¹⁶ : NormedAddCommGroup F✝\ninst✝¹⁵ : NormedSpace 𝕜 E'✝\ninst✝¹⁴ : NormedSpace ℝ F✝\ninst✝¹³ : NormedSpace 𝕜 F✝\ninst✝¹² : CompleteSpace F✝\ninst✝¹¹ : MeasurableSpace G\nμ : Measure G\ninst✝¹⁰ : NormedAddCommGroup G\ninst✝⁹ : BorelSpace G\ninst✝⁸ : NormedSpace 𝕜 G\ninst✝⁷ : NormedAddCommGroup P\ninst✝⁶ : NormedSpace 𝕜 P\nf : G → E\nn✝ : ℕ∞\nL✝ : E →L[𝕜] E'✝ →L[𝕜] F✝\ng✝ : P → G → E'✝\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs✝ : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g✝ p x = 0\nhf : LocallyIntegrable f\nhg✝ : ContDiffOn 𝕜 n✝ (↿g✝) (s ×ˢ univ)\nn : ℕ\nih :\n  ∀ {E' F : Type uP} [inst : NormedAddCommGroup E'] [inst_1 : NormedAddCommGroup F] [inst_2 : NormedSpace 𝕜 E']\n    [inst_3 : NormedSpace ℝ F] [inst_4 : NormedSpace 𝕜 F] [inst_5 : CompleteSpace F] (L : E →L[𝕜] E' →L[𝕜] F)\n    {g : P → G → E'},\n    (∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0) →\n      ContDiffOn 𝕜 (↑n) (↿g) (s ×ˢ univ) → ContDiffOn 𝕜 (↑n) (fun q => f ⋆[L, q.snd] g q.fst) (s ×ˢ univ)\nE' F : Type uP\ninst✝⁵ : NormedAddCommGroup E'\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 E'\ninst✝² : NormedSpace ℝ F\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : CompleteSpace F\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhg : DifferentiableOn 𝕜 (↿g) (s ×ˢ univ) ∧ ContDiffOn 𝕜 (↑n) (fun y => fderiv 𝕜 (↿g) y) (s ×ˢ univ)\nf' : P → G → P × G →L[𝕜] F := fun p a => f ⋆[precompR (P × G) L, a] fun x => fderiv 𝕜 (uncurry g) (p, x)\nA : ∀ (q₀ : P × G), q₀.fst ∈ s → HasFDerivAt (fun q => f ⋆[L, q.snd] g q.fst) (f' q₀.fst q₀.snd) q₀\np : P\nx : G\nhp : p ∈ s\nhx : ¬x ∈ k\n⊢ fderiv 𝕜 (uncurry g) (p, x) = 0\n[PROOFSTEP]\napply (hasFDerivAt_zero_of_eventually_const (0 : E') _).fderiv\n[GOAL]\n𝕜 : Type u𝕜\nG✝ : Type uG\nE : Type uE\nE'✝¹ : Type uE'\nE'' : Type uE''\nF✝¹ : Type uF\nF' : Type uF'\nF'' : Type uF''\nP✝ : Type uP\ninst✝³⁴ : NormedAddCommGroup E\ninst✝³³ : NormedAddCommGroup E'✝¹\ninst✝³² : NormedAddCommGroup E''\ninst✝³¹ : NormedAddCommGroup F✝¹\nf✝ f'✝ : G✝ → E\ng✝¹ g' : G✝ → E'✝¹\nx✝ x' : G✝\ny y' : E\ninst✝³⁰ : IsROrC 𝕜\ninst✝²⁹ : NormedSpace 𝕜 E\ninst✝²⁸ : NormedSpace 𝕜 E'✝¹\ninst✝²⁷ : NormedSpace 𝕜 E''\ninst✝²⁶ : NormedSpace ℝ F✝¹\ninst✝²⁵ : NormedSpace 𝕜 F✝¹\ninst✝²⁴ : CompleteSpace F✝¹\ninst✝²³ : MeasurableSpace G✝\ninst✝²² : NormedAddCommGroup G✝\ninst✝²¹ : BorelSpace G✝\ninst✝²⁰ : NormedSpace 𝕜 G✝\ninst✝¹⁹ : NormedAddCommGroup P✝\ninst✝¹⁸ : NormedSpace 𝕜 P✝\nμ✝ : Measure G✝\nL✝¹ : E →L[𝕜] E'✝¹ →L[𝕜] F✝¹\nG E'✝ F✝ P : Type uP\ninst✝¹⁷ : NormedAddCommGroup E'✝\ninst✝¹⁶ : NormedAddCommGroup F✝\ninst✝¹⁵ : NormedSpace 𝕜 E'✝\ninst✝¹⁴ : NormedSpace ℝ F✝\ninst✝¹³ : NormedSpace 𝕜 F✝\ninst✝¹² : CompleteSpace F✝\ninst✝¹¹ : MeasurableSpace G\nμ : Measure G\ninst✝¹⁰ : NormedAddCommGroup G\ninst✝⁹ : BorelSpace G\ninst✝⁸ : NormedSpace 𝕜 G\ninst✝⁷ : NormedAddCommGroup P\ninst✝⁶ : NormedSpace 𝕜 P\nf : G → E\nn✝ : ℕ∞\nL✝ : E →L[𝕜] E'✝ →L[𝕜] F✝\ng✝ : P → G → E'✝\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs✝ : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g✝ p x = 0\nhf : LocallyIntegrable f\nhg✝ : ContDiffOn 𝕜 n✝ (↿g✝) (s ×ˢ univ)\nn : ℕ\nih :\n  ∀ {E' F : Type uP} [inst : NormedAddCommGroup E'] [inst_1 : NormedAddCommGroup F] [inst_2 : NormedSpace 𝕜 E']\n    [inst_3 : NormedSpace ℝ F] [inst_4 : NormedSpace 𝕜 F] [inst_5 : CompleteSpace F] (L : E →L[𝕜] E' →L[𝕜] F)\n    {g : P → G → E'},\n    (∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0) →\n      ContDiffOn 𝕜 (↑n) (↿g) (s ×ˢ univ) → ContDiffOn 𝕜 (↑n) (fun q => f ⋆[L, q.snd] g q.fst) (s ×ˢ univ)\nE' F : Type uP\ninst✝⁵ : NormedAddCommGroup E'\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 E'\ninst✝² : NormedSpace ℝ F\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : CompleteSpace F\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhg : DifferentiableOn 𝕜 (↿g) (s ×ˢ univ) ∧ ContDiffOn 𝕜 (↑n) (fun y => fderiv 𝕜 (↿g) y) (s ×ˢ univ)\nf' : P → G → P × G →L[𝕜] F := fun p a => f ⋆[precompR (P × G) L, a] fun x => fderiv 𝕜 (uncurry g) (p, x)\nA : ∀ (q₀ : P × G), q₀.fst ∈ s → HasFDerivAt (fun q => f ⋆[L, q.snd] g q.fst) (f' q₀.fst q₀.snd) q₀\np : P\nx : G\nhp : p ∈ s\nhx : ¬x ∈ k\n⊢ uncurry g =ᶠ[𝓝 (p, x)] fun x => 0\n[PROOFSTEP]\nhave M2 : kᶜ ∈ 𝓝 x := IsOpen.mem_nhds hk.isClosed.isOpen_compl hx\n[GOAL]\n𝕜 : Type u𝕜\nG✝ : Type uG\nE : Type uE\nE'✝¹ : Type uE'\nE'' : Type uE''\nF✝¹ : Type uF\nF' : Type uF'\nF'' : Type uF''\nP✝ : Type uP\ninst✝³⁴ : NormedAddCommGroup E\ninst✝³³ : NormedAddCommGroup E'✝¹\ninst✝³² : NormedAddCommGroup E''\ninst✝³¹ : NormedAddCommGroup F✝¹\nf✝ f'✝ : G✝ → E\ng✝¹ g' : G✝ → E'✝¹\nx✝ x' : G✝\ny y' : E\ninst✝³⁰ : IsROrC 𝕜\ninst✝²⁹ : NormedSpace 𝕜 E\ninst✝²⁸ : NormedSpace 𝕜 E'✝¹\ninst✝²⁷ : NormedSpace 𝕜 E''\ninst✝²⁶ : NormedSpace ℝ F✝¹\ninst✝²⁵ : NormedSpace 𝕜 F✝¹\ninst✝²⁴ : CompleteSpace F✝¹\ninst✝²³ : MeasurableSpace G✝\ninst✝²² : NormedAddCommGroup G✝\ninst✝²¹ : BorelSpace G✝\ninst✝²⁰ : NormedSpace 𝕜 G✝\ninst✝¹⁹ : NormedAddCommGroup P✝\ninst✝¹⁸ : NormedSpace 𝕜 P✝\nμ✝ : Measure G✝\nL✝¹ : E →L[𝕜] E'✝¹ →L[𝕜] F✝¹\nG E'✝ F✝ P : Type uP\ninst✝¹⁷ : NormedAddCommGroup E'✝\ninst✝¹⁶ : NormedAddCommGroup F✝\ninst✝¹⁵ : NormedSpace 𝕜 E'✝\ninst✝¹⁴ : NormedSpace ℝ F✝\ninst✝¹³ : NormedSpace 𝕜 F✝\ninst✝¹² : CompleteSpace F✝\ninst✝¹¹ : MeasurableSpace G\nμ : Measure G\ninst✝¹⁰ : NormedAddCommGroup G\ninst✝⁹ : BorelSpace G\ninst✝⁸ : NormedSpace 𝕜 G\ninst✝⁷ : NormedAddCommGroup P\ninst✝⁶ : NormedSpace 𝕜 P\nf : G → E\nn✝ : ℕ∞\nL✝ : E →L[𝕜] E'✝ →L[𝕜] F✝\ng✝ : P → G → E'✝\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs✝ : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g✝ p x = 0\nhf : LocallyIntegrable f\nhg✝ : ContDiffOn 𝕜 n✝ (↿g✝) (s ×ˢ univ)\nn : ℕ\nih :\n  ∀ {E' F : Type uP} [inst : NormedAddCommGroup E'] [inst_1 : NormedAddCommGroup F] [inst_2 : NormedSpace 𝕜 E']\n    [inst_3 : NormedSpace ℝ F] [inst_4 : NormedSpace 𝕜 F] [inst_5 : CompleteSpace F] (L : E →L[𝕜] E' →L[𝕜] F)\n    {g : P → G → E'},\n    (∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0) →\n      ContDiffOn 𝕜 (↑n) (↿g) (s ×ˢ univ) → ContDiffOn 𝕜 (↑n) (fun q => f ⋆[L, q.snd] g q.fst) (s ×ˢ univ)\nE' F : Type uP\ninst✝⁵ : NormedAddCommGroup E'\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 E'\ninst✝² : NormedSpace ℝ F\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : CompleteSpace F\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhg : DifferentiableOn 𝕜 (↿g) (s ×ˢ univ) ∧ ContDiffOn 𝕜 (↑n) (fun y => fderiv 𝕜 (↿g) y) (s ×ˢ univ)\nf' : P → G → P × G →L[𝕜] F := fun p a => f ⋆[precompR (P × G) L, a] fun x => fderiv 𝕜 (uncurry g) (p, x)\nA : ∀ (q₀ : P × G), q₀.fst ∈ s → HasFDerivAt (fun q => f ⋆[L, q.snd] g q.fst) (f' q₀.fst q₀.snd) q₀\np : P\nx : G\nhp : p ∈ s\nhx : ¬x ∈ k\nM2 : kᶜ ∈ 𝓝 x\n⊢ uncurry g =ᶠ[𝓝 (p, x)] fun x => 0\n[PROOFSTEP]\nhave M1 : s ∈ 𝓝 p := hs.mem_nhds hp\n[GOAL]\n𝕜 : Type u𝕜\nG✝ : Type uG\nE : Type uE\nE'✝¹ : Type uE'\nE'' : Type uE''\nF✝¹ : Type uF\nF' : Type uF'\nF'' : Type uF''\nP✝ : Type uP\ninst✝³⁴ : NormedAddCommGroup E\ninst✝³³ : NormedAddCommGroup E'✝¹\ninst✝³² : NormedAddCommGroup E''\ninst✝³¹ : NormedAddCommGroup F✝¹\nf✝ f'✝ : G✝ → E\ng✝¹ g' : G✝ → E'✝¹\nx✝ x' : G✝\ny y' : E\ninst✝³⁰ : IsROrC 𝕜\ninst✝²⁹ : NormedSpace 𝕜 E\ninst✝²⁸ : NormedSpace 𝕜 E'✝¹\ninst✝²⁷ : NormedSpace 𝕜 E''\ninst✝²⁶ : NormedSpace ℝ F✝¹\ninst✝²⁵ : NormedSpace 𝕜 F✝¹\ninst✝²⁴ : CompleteSpace F✝¹\ninst✝²³ : MeasurableSpace G✝\ninst✝²² : NormedAddCommGroup G✝\ninst✝²¹ : BorelSpace G✝\ninst✝²⁰ : NormedSpace 𝕜 G✝\ninst✝¹⁹ : NormedAddCommGroup P✝\ninst✝¹⁸ : NormedSpace 𝕜 P✝\nμ✝ : Measure G✝\nL✝¹ : E →L[𝕜] E'✝¹ →L[𝕜] F✝¹\nG E'✝ F✝ P : Type uP\ninst✝¹⁷ : NormedAddCommGroup E'✝\ninst✝¹⁶ : NormedAddCommGroup F✝\ninst✝¹⁵ : NormedSpace 𝕜 E'✝\ninst✝¹⁴ : NormedSpace ℝ F✝\ninst✝¹³ : NormedSpace 𝕜 F✝\ninst✝¹² : CompleteSpace F✝\ninst✝¹¹ : MeasurableSpace G\nμ : Measure G\ninst✝¹⁰ : NormedAddCommGroup G\ninst✝⁹ : BorelSpace G\ninst✝⁸ : NormedSpace 𝕜 G\ninst✝⁷ : NormedAddCommGroup P\ninst✝⁶ : NormedSpace 𝕜 P\nf : G → E\nn✝ : ℕ∞\nL✝ : E →L[𝕜] E'✝ →L[𝕜] F✝\ng✝ : P → G → E'✝\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs✝ : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g✝ p x = 0\nhf : LocallyIntegrable f\nhg✝ : ContDiffOn 𝕜 n✝ (↿g✝) (s ×ˢ univ)\nn : ℕ\nih :\n  ∀ {E' F : Type uP} [inst : NormedAddCommGroup E'] [inst_1 : NormedAddCommGroup F] [inst_2 : NormedSpace 𝕜 E']\n    [inst_3 : NormedSpace ℝ F] [inst_4 : NormedSpace 𝕜 F] [inst_5 : CompleteSpace F] (L : E →L[𝕜] E' →L[𝕜] F)\n    {g : P → G → E'},\n    (∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0) →\n      ContDiffOn 𝕜 (↑n) (↿g) (s ×ˢ univ) → ContDiffOn 𝕜 (↑n) (fun q => f ⋆[L, q.snd] g q.fst) (s ×ˢ univ)\nE' F : Type uP\ninst✝⁵ : NormedAddCommGroup E'\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 E'\ninst✝² : NormedSpace ℝ F\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : CompleteSpace F\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhg : DifferentiableOn 𝕜 (↿g) (s ×ˢ univ) ∧ ContDiffOn 𝕜 (↑n) (fun y => fderiv 𝕜 (↿g) y) (s ×ˢ univ)\nf' : P → G → P × G →L[𝕜] F := fun p a => f ⋆[precompR (P × G) L, a] fun x => fderiv 𝕜 (uncurry g) (p, x)\nA : ∀ (q₀ : P × G), q₀.fst ∈ s → HasFDerivAt (fun q => f ⋆[L, q.snd] g q.fst) (f' q₀.fst q₀.snd) q₀\np : P\nx : G\nhp : p ∈ s\nhx : ¬x ∈ k\nM2 : kᶜ ∈ 𝓝 x\nM1 : s ∈ 𝓝 p\n⊢ uncurry g =ᶠ[𝓝 (p, x)] fun x => 0\n[PROOFSTEP]\nrw [nhds_prod_eq]\n[GOAL]\n𝕜 : Type u𝕜\nG✝ : Type uG\nE : Type uE\nE'✝¹ : Type uE'\nE'' : Type uE''\nF✝¹ : Type uF\nF' : Type uF'\nF'' : Type uF''\nP✝ : Type uP\ninst✝³⁴ : NormedAddCommGroup E\ninst✝³³ : NormedAddCommGroup E'✝¹\ninst✝³² : NormedAddCommGroup E''\ninst✝³¹ : NormedAddCommGroup F✝¹\nf✝ f'✝ : G✝ → E\ng✝¹ g' : G✝ → E'✝¹\nx✝ x' : G✝\ny y' : E\ninst✝³⁰ : IsROrC 𝕜\ninst✝²⁹ : NormedSpace 𝕜 E\ninst✝²⁸ : NormedSpace 𝕜 E'✝¹\ninst✝²⁷ : NormedSpace 𝕜 E''\ninst✝²⁶ : NormedSpace ℝ F✝¹\ninst✝²⁵ : NormedSpace 𝕜 F✝¹\ninst✝²⁴ : CompleteSpace F✝¹\ninst✝²³ : MeasurableSpace G✝\ninst✝²² : NormedAddCommGroup G✝\ninst✝²¹ : BorelSpace G✝\ninst✝²⁰ : NormedSpace 𝕜 G✝\ninst✝¹⁹ : NormedAddCommGroup P✝\ninst✝¹⁸ : NormedSpace 𝕜 P✝\nμ✝ : Measure G✝\nL✝¹ : E →L[𝕜] E'✝¹ →L[𝕜] F✝¹\nG E'✝ F✝ P : Type uP\ninst✝¹⁷ : NormedAddCommGroup E'✝\ninst✝¹⁶ : NormedAddCommGroup F✝\ninst✝¹⁵ : NormedSpace 𝕜 E'✝\ninst✝¹⁴ : NormedSpace ℝ F✝\ninst✝¹³ : NormedSpace 𝕜 F✝\ninst✝¹² : CompleteSpace F✝\ninst✝¹¹ : MeasurableSpace G\nμ : Measure G\ninst✝¹⁰ : NormedAddCommGroup G\ninst✝⁹ : BorelSpace G\ninst✝⁸ : NormedSpace 𝕜 G\ninst✝⁷ : NormedAddCommGroup P\ninst✝⁶ : NormedSpace 𝕜 P\nf : G → E\nn✝ : ℕ∞\nL✝ : E →L[𝕜] E'✝ →L[𝕜] F✝\ng✝ : P → G → E'✝\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs✝ : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g✝ p x = 0\nhf : LocallyIntegrable f\nhg✝ : ContDiffOn 𝕜 n✝ (↿g✝) (s ×ˢ univ)\nn : ℕ\nih :\n  ∀ {E' F : Type uP} [inst : NormedAddCommGroup E'] [inst_1 : NormedAddCommGroup F] [inst_2 : NormedSpace 𝕜 E']\n    [inst_3 : NormedSpace ℝ F] [inst_4 : NormedSpace 𝕜 F] [inst_5 : CompleteSpace F] (L : E →L[𝕜] E' →L[𝕜] F)\n    {g : P → G → E'},\n    (∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0) →\n      ContDiffOn 𝕜 (↑n) (↿g) (s ×ˢ univ) → ContDiffOn 𝕜 (↑n) (fun q => f ⋆[L, q.snd] g q.fst) (s ×ˢ univ)\nE' F : Type uP\ninst✝⁵ : NormedAddCommGroup E'\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 E'\ninst✝² : NormedSpace ℝ F\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : CompleteSpace F\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhg : DifferentiableOn 𝕜 (↿g) (s ×ˢ univ) ∧ ContDiffOn 𝕜 (↑n) (fun y => fderiv 𝕜 (↿g) y) (s ×ˢ univ)\nf' : P → G → P × G →L[𝕜] F := fun p a => f ⋆[precompR (P × G) L, a] fun x => fderiv 𝕜 (uncurry g) (p, x)\nA : ∀ (q₀ : P × G), q₀.fst ∈ s → HasFDerivAt (fun q => f ⋆[L, q.snd] g q.fst) (f' q₀.fst q₀.snd) q₀\np : P\nx : G\nhp : p ∈ s\nhx : ¬x ∈ k\nM2 : kᶜ ∈ 𝓝 x\nM1 : s ∈ 𝓝 p\n⊢ uncurry g =ᶠ[𝓝 p ×ˢ 𝓝 x] fun x => 0\n[PROOFSTEP]\nfilter_upwards [prod_mem_prod M1 M2]\n[GOAL]\ncase h\n𝕜 : Type u𝕜\nG✝ : Type uG\nE : Type uE\nE'✝¹ : Type uE'\nE'' : Type uE''\nF✝¹ : Type uF\nF' : Type uF'\nF'' : Type uF''\nP✝ : Type uP\ninst✝³⁴ : NormedAddCommGroup E\ninst✝³³ : NormedAddCommGroup E'✝¹\ninst✝³² : NormedAddCommGroup E''\ninst✝³¹ : NormedAddCommGroup F✝¹\nf✝ f'✝ : G✝ → E\ng✝¹ g' : G✝ → E'✝¹\nx✝ x' : G✝\ny y' : E\ninst✝³⁰ : IsROrC 𝕜\ninst✝²⁹ : NormedSpace 𝕜 E\ninst✝²⁸ : NormedSpace 𝕜 E'✝¹\ninst✝²⁷ : NormedSpace 𝕜 E''\ninst✝²⁶ : NormedSpace ℝ F✝¹\ninst✝²⁵ : NormedSpace 𝕜 F✝¹\ninst✝²⁴ : CompleteSpace F✝¹\ninst✝²³ : MeasurableSpace G✝\ninst✝²² : NormedAddCommGroup G✝\ninst✝²¹ : BorelSpace G✝\ninst✝²⁰ : NormedSpace 𝕜 G✝\ninst✝¹⁹ : NormedAddCommGroup P✝\ninst✝¹⁸ : NormedSpace 𝕜 P✝\nμ✝ : Measure G✝\nL✝¹ : E →L[𝕜] E'✝¹ →L[𝕜] F✝¹\nG E'✝ F✝ P : Type uP\ninst✝¹⁷ : NormedAddCommGroup E'✝\ninst✝¹⁶ : NormedAddCommGroup F✝\ninst✝¹⁵ : NormedSpace 𝕜 E'✝\ninst✝¹⁴ : NormedSpace ℝ F✝\ninst✝¹³ : NormedSpace 𝕜 F✝\ninst✝¹² : CompleteSpace F✝\ninst✝¹¹ : MeasurableSpace G\nμ : Measure G\ninst✝¹⁰ : NormedAddCommGroup G\ninst✝⁹ : BorelSpace G\ninst✝⁸ : NormedSpace 𝕜 G\ninst✝⁷ : NormedAddCommGroup P\ninst✝⁶ : NormedSpace 𝕜 P\nf : G → E\nn✝ : ℕ∞\nL✝ : E →L[𝕜] E'✝ →L[𝕜] F✝\ng✝ : P → G → E'✝\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs✝ : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g✝ p x = 0\nhf : LocallyIntegrable f\nhg✝ : ContDiffOn 𝕜 n✝ (↿g✝) (s ×ˢ univ)\nn : ℕ\nih :\n  ∀ {E' F : Type uP} [inst : NormedAddCommGroup E'] [inst_1 : NormedAddCommGroup F] [inst_2 : NormedSpace 𝕜 E']\n    [inst_3 : NormedSpace ℝ F] [inst_4 : NormedSpace 𝕜 F] [inst_5 : CompleteSpace F] (L : E →L[𝕜] E' →L[𝕜] F)\n    {g : P → G → E'},\n    (∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0) →\n      ContDiffOn 𝕜 (↑n) (↿g) (s ×ˢ univ) → ContDiffOn 𝕜 (↑n) (fun q => f ⋆[L, q.snd] g q.fst) (s ×ˢ univ)\nE' F : Type uP\ninst✝⁵ : NormedAddCommGroup E'\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 E'\ninst✝² : NormedSpace ℝ F\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : CompleteSpace F\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhg : DifferentiableOn 𝕜 (↿g) (s ×ˢ univ) ∧ ContDiffOn 𝕜 (↑n) (fun y => fderiv 𝕜 (↿g) y) (s ×ˢ univ)\nf' : P → G → P × G →L[𝕜] F := fun p a => f ⋆[precompR (P × G) L, a] fun x => fderiv 𝕜 (uncurry g) (p, x)\nA : ∀ (q₀ : P × G), q₀.fst ∈ s → HasFDerivAt (fun q => f ⋆[L, q.snd] g q.fst) (f' q₀.fst q₀.snd) q₀\np : P\nx : G\nhp : p ∈ s\nhx : ¬x ∈ k\nM2 : kᶜ ∈ 𝓝 x\nM1 : s ∈ 𝓝 p\n⊢ ∀ (a : P × G), a ∈ s ×ˢ kᶜ → uncurry g a = 0\n[PROOFSTEP]\nrintro ⟨p, y⟩ ⟨hp, hy⟩\n[GOAL]\ncase h.mk.intro\n𝕜 : Type u𝕜\nG✝ : Type uG\nE : Type uE\nE'✝¹ : Type uE'\nE'' : Type uE''\nF✝¹ : Type uF\nF' : Type uF'\nF'' : Type uF''\nP✝ : Type uP\ninst✝³⁴ : NormedAddCommGroup E\ninst✝³³ : NormedAddCommGroup E'✝¹\ninst✝³² : NormedAddCommGroup E''\ninst✝³¹ : NormedAddCommGroup F✝¹\nf✝ f'✝ : G✝ → E\ng✝¹ g' : G✝ → E'✝¹\nx✝ x' : G✝\ny✝ y' : E\ninst✝³⁰ : IsROrC 𝕜\ninst✝²⁹ : NormedSpace 𝕜 E\ninst✝²⁸ : NormedSpace 𝕜 E'✝¹\ninst✝²⁷ : NormedSpace 𝕜 E''\ninst✝²⁶ : NormedSpace ℝ F✝¹\ninst✝²⁵ : NormedSpace 𝕜 F✝¹\ninst✝²⁴ : CompleteSpace F✝¹\ninst✝²³ : MeasurableSpace G✝\ninst✝²² : NormedAddCommGroup G✝\ninst✝²¹ : BorelSpace G✝\ninst✝²⁰ : NormedSpace 𝕜 G✝\ninst✝¹⁹ : NormedAddCommGroup P✝\ninst✝¹⁸ : NormedSpace 𝕜 P✝\nμ✝ : Measure G✝\nL✝¹ : E →L[𝕜] E'✝¹ →L[𝕜] F✝¹\nG E'✝ F✝ P : Type uP\ninst✝¹⁷ : NormedAddCommGroup E'✝\ninst✝¹⁶ : NormedAddCommGroup F✝\ninst✝¹⁵ : NormedSpace 𝕜 E'✝\ninst✝¹⁴ : NormedSpace ℝ F✝\ninst✝¹³ : NormedSpace 𝕜 F✝\ninst✝¹² : CompleteSpace F✝\ninst✝¹¹ : MeasurableSpace G\nμ : Measure G\ninst✝¹⁰ : NormedAddCommGroup G\ninst✝⁹ : BorelSpace G\ninst✝⁸ : NormedSpace 𝕜 G\ninst✝⁷ : NormedAddCommGroup P\ninst✝⁶ : NormedSpace 𝕜 P\nf : G → E\nn✝ : ℕ∞\nL✝ : E →L[𝕜] E'✝ →L[𝕜] F✝\ng✝ : P → G → E'✝\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs✝ : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g✝ p x = 0\nhf : LocallyIntegrable f\nhg✝ : ContDiffOn 𝕜 n✝ (↿g✝) (s ×ˢ univ)\nn : ℕ\nih :\n  ∀ {E' F : Type uP} [inst : NormedAddCommGroup E'] [inst_1 : NormedAddCommGroup F] [inst_2 : NormedSpace 𝕜 E']\n    [inst_3 : NormedSpace ℝ F] [inst_4 : NormedSpace 𝕜 F] [inst_5 : CompleteSpace F] (L : E →L[𝕜] E' →L[𝕜] F)\n    {g : P → G → E'},\n    (∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0) →\n      ContDiffOn 𝕜 (↑n) (↿g) (s ×ˢ univ) → ContDiffOn 𝕜 (↑n) (fun q => f ⋆[L, q.snd] g q.fst) (s ×ˢ univ)\nE' F : Type uP\ninst✝⁵ : NormedAddCommGroup E'\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 E'\ninst✝² : NormedSpace ℝ F\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : CompleteSpace F\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhg : DifferentiableOn 𝕜 (↿g) (s ×ˢ univ) ∧ ContDiffOn 𝕜 (↑n) (fun y => fderiv 𝕜 (↿g) y) (s ×ˢ univ)\nf' : P → G → P × G →L[𝕜] F := fun p a => f ⋆[precompR (P × G) L, a] fun x => fderiv 𝕜 (uncurry g) (p, x)\nA : ∀ (q₀ : P × G), q₀.fst ∈ s → HasFDerivAt (fun q => f ⋆[L, q.snd] g q.fst) (f' q₀.fst q₀.snd) q₀\np✝ : P\nx : G\nhp✝ : p✝ ∈ s\nhx : ¬x ∈ k\nM2 : kᶜ ∈ 𝓝 x\nM1 : s ∈ 𝓝 p✝\np : P\ny : G\nhp : (p, y).fst ∈ s\nhy : (p, y).snd ∈ kᶜ\n⊢ uncurry g (p, y) = 0\n[PROOFSTEP]\nexact hgs p y hp hy\n[GOAL]\ncase H\n𝕜 : Type u𝕜\nG✝ : Type uG\nE : Type uE\nE'✝¹ : Type uE'\nE'' : Type uE''\nF✝¹ : Type uF\nF' : Type uF'\nF'' : Type uF''\nP✝ : Type uP\ninst✝³⁴ : NormedAddCommGroup E\ninst✝³³ : NormedAddCommGroup E'✝¹\ninst✝³² : NormedAddCommGroup E''\ninst✝³¹ : NormedAddCommGroup F✝¹\nf✝ f'✝ : G✝ → E\ng✝¹ g' : G✝ → E'✝¹\nx x' : G✝\ny y' : E\ninst✝³⁰ : IsROrC 𝕜\ninst✝²⁹ : NormedSpace 𝕜 E\ninst✝²⁸ : NormedSpace 𝕜 E'✝¹\ninst✝²⁷ : NormedSpace 𝕜 E''\ninst✝²⁶ : NormedSpace ℝ F✝¹\ninst✝²⁵ : NormedSpace 𝕜 F✝¹\ninst✝²⁴ : CompleteSpace F✝¹\ninst✝²³ : MeasurableSpace G✝\ninst✝²² : NormedAddCommGroup G✝\ninst✝²¹ : BorelSpace G✝\ninst✝²⁰ : NormedSpace 𝕜 G✝\ninst✝¹⁹ : NormedAddCommGroup P✝\ninst✝¹⁸ : NormedSpace 𝕜 P✝\nμ✝ : Measure G✝\nL✝¹ : E →L[𝕜] E'✝¹ →L[𝕜] F✝¹\nG E'✝ F✝ P : Type uP\ninst✝¹⁷ : NormedAddCommGroup E'✝\ninst✝¹⁶ : NormedAddCommGroup F✝\ninst✝¹⁵ : NormedSpace 𝕜 E'✝\ninst✝¹⁴ : NormedSpace ℝ F✝\ninst✝¹³ : NormedSpace 𝕜 F✝\ninst✝¹² : CompleteSpace F✝\ninst✝¹¹ : MeasurableSpace G\nμ : Measure G\ninst✝¹⁰ : NormedAddCommGroup G\ninst✝⁹ : BorelSpace G\ninst✝⁸ : NormedSpace 𝕜 G\ninst✝⁷ : NormedAddCommGroup P\ninst✝⁶ : NormedSpace 𝕜 P\nf : G → E\nn✝ : ℕ∞\nL✝ : E →L[𝕜] E'✝ →L[𝕜] F✝\ng✝ : P → G → E'✝\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs✝ : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g✝ p x = 0\nhf : LocallyIntegrable f\nhg✝ : ContDiffOn 𝕜 n✝ (↿g✝) (s ×ˢ univ)\nn : ℕ\nih :\n  ∀ {E' F : Type uP} [inst : NormedAddCommGroup E'] [inst_1 : NormedAddCommGroup F] [inst_2 : NormedSpace 𝕜 E']\n    [inst_3 : NormedSpace ℝ F] [inst_4 : NormedSpace 𝕜 F] [inst_5 : CompleteSpace F] (L : E →L[𝕜] E' →L[𝕜] F)\n    {g : P → G → E'},\n    (∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0) →\n      ContDiffOn 𝕜 (↑n) (↿g) (s ×ˢ univ) → ContDiffOn 𝕜 (↑n) (fun q => f ⋆[L, q.snd] g q.fst) (s ×ˢ univ)\nE' F : Type uP\ninst✝⁵ : NormedAddCommGroup E'\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 E'\ninst✝² : NormedSpace ℝ F\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : CompleteSpace F\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhg : DifferentiableOn 𝕜 (↿g) (s ×ˢ univ) ∧ ContDiffOn 𝕜 (↑n) (fun y => fderiv 𝕜 (↿g) y) (s ×ˢ univ)\nf' : P → G → P × G →L[𝕜] F := fun p a => f ⋆[precompR (P × G) L, a] fun x => fderiv 𝕜 (uncurry g) (p, x)\nA : ∀ (q₀ : P × G), q₀.fst ∈ s → HasFDerivAt (fun q => f ⋆[L, q.snd] g q.fst) (f' q₀.fst q₀.snd) q₀\nB : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → fderiv 𝕜 (uncurry g) (p, x) = 0\n⊢ ContDiffOn 𝕜 (↑n) (↿f') (s ×ˢ univ)\n[PROOFSTEP]\napply ih (L.precompR (P × G) : _) B\n[GOAL]\ncase H\n𝕜 : Type u𝕜\nG✝ : Type uG\nE : Type uE\nE'✝¹ : Type uE'\nE'' : Type uE''\nF✝¹ : Type uF\nF' : Type uF'\nF'' : Type uF''\nP✝ : Type uP\ninst✝³⁴ : NormedAddCommGroup E\ninst✝³³ : NormedAddCommGroup E'✝¹\ninst✝³² : NormedAddCommGroup E''\ninst✝³¹ : NormedAddCommGroup F✝¹\nf✝ f'✝ : G✝ → E\ng✝¹ g' : G✝ → E'✝¹\nx x' : G✝\ny y' : E\ninst✝³⁰ : IsROrC 𝕜\ninst✝²⁹ : NormedSpace 𝕜 E\ninst✝²⁸ : NormedSpace 𝕜 E'✝¹\ninst✝²⁷ : NormedSpace 𝕜 E''\ninst✝²⁶ : NormedSpace ℝ F✝¹\ninst✝²⁵ : NormedSpace 𝕜 F✝¹\ninst✝²⁴ : CompleteSpace F✝¹\ninst✝²³ : MeasurableSpace G✝\ninst✝²² : NormedAddCommGroup G✝\ninst✝²¹ : BorelSpace G✝\ninst✝²⁰ : NormedSpace 𝕜 G✝\ninst✝¹⁹ : NormedAddCommGroup P✝\ninst✝¹⁸ : NormedSpace 𝕜 P✝\nμ✝ : Measure G✝\nL✝¹ : E →L[𝕜] E'✝¹ →L[𝕜] F✝¹\nG E'✝ F✝ P : Type uP\ninst✝¹⁷ : NormedAddCommGroup E'✝\ninst✝¹⁶ : NormedAddCommGroup F✝\ninst✝¹⁵ : NormedSpace 𝕜 E'✝\ninst✝¹⁴ : NormedSpace ℝ F✝\ninst✝¹³ : NormedSpace 𝕜 F✝\ninst✝¹² : CompleteSpace F✝\ninst✝¹¹ : MeasurableSpace G\nμ : Measure G\ninst✝¹⁰ : NormedAddCommGroup G\ninst✝⁹ : BorelSpace G\ninst✝⁸ : NormedSpace 𝕜 G\ninst✝⁷ : NormedAddCommGroup P\ninst✝⁶ : NormedSpace 𝕜 P\nf : G → E\nn✝ : ℕ∞\nL✝ : E →L[𝕜] E'✝ →L[𝕜] F✝\ng✝ : P → G → E'✝\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs✝ : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g✝ p x = 0\nhf : LocallyIntegrable f\nhg✝ : ContDiffOn 𝕜 n✝ (↿g✝) (s ×ˢ univ)\nn : ℕ\nih :\n  ∀ {E' F : Type uP} [inst : NormedAddCommGroup E'] [inst_1 : NormedAddCommGroup F] [inst_2 : NormedSpace 𝕜 E']\n    [inst_3 : NormedSpace ℝ F] [inst_4 : NormedSpace 𝕜 F] [inst_5 : CompleteSpace F] (L : E →L[𝕜] E' →L[𝕜] F)\n    {g : P → G → E'},\n    (∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0) →\n      ContDiffOn 𝕜 (↑n) (↿g) (s ×ˢ univ) → ContDiffOn 𝕜 (↑n) (fun q => f ⋆[L, q.snd] g q.fst) (s ×ˢ univ)\nE' F : Type uP\ninst✝⁵ : NormedAddCommGroup E'\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 E'\ninst✝² : NormedSpace ℝ F\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : CompleteSpace F\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhg : DifferentiableOn 𝕜 (↿g) (s ×ˢ univ) ∧ ContDiffOn 𝕜 (↑n) (fun y => fderiv 𝕜 (↿g) y) (s ×ˢ univ)\nf' : P → G → P × G →L[𝕜] F := fun p a => f ⋆[precompR (P × G) L, a] fun x => fderiv 𝕜 (uncurry g) (p, x)\nA : ∀ (q₀ : P × G), q₀.fst ∈ s → HasFDerivAt (fun q => f ⋆[L, q.snd] g q.fst) (f' q₀.fst q₀.snd) q₀\nB : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → fderiv 𝕜 (uncurry g) (p, x) = 0\n⊢ ContDiffOn 𝕜 (↑n) (↿fun p x => fderiv 𝕜 (uncurry g) (p, x)) (s ×ˢ univ)\n[PROOFSTEP]\nconvert hg.2\n[GOAL]\ncase htop\n𝕜 : Type u𝕜\nG✝ : Type uG\nE : Type uE\nE'✝¹ : Type uE'\nE'' : Type uE''\nF✝¹ : Type uF\nF' : Type uF'\nF'' : Type uF''\nP✝ : Type uP\ninst✝³⁴ : NormedAddCommGroup E\ninst✝³³ : NormedAddCommGroup E'✝¹\ninst✝³² : NormedAddCommGroup E''\ninst✝³¹ : NormedAddCommGroup F✝¹\nf✝ f' : G✝ → E\ng✝¹ g' : G✝ → E'✝¹\nx x' : G✝\ny y' : E\ninst✝³⁰ : IsROrC 𝕜\ninst✝²⁹ : NormedSpace 𝕜 E\ninst✝²⁸ : NormedSpace 𝕜 E'✝¹\ninst✝²⁷ : NormedSpace 𝕜 E''\ninst✝²⁶ : NormedSpace ℝ F✝¹\ninst✝²⁵ : NormedSpace 𝕜 F✝¹\ninst✝²⁴ : CompleteSpace F✝¹\ninst✝²³ : MeasurableSpace G✝\ninst✝²² : NormedAddCommGroup G✝\ninst✝²¹ : BorelSpace G✝\ninst✝²⁰ : NormedSpace 𝕜 G✝\ninst✝¹⁹ : NormedAddCommGroup P✝\ninst✝¹⁸ : NormedSpace 𝕜 P✝\nμ✝ : Measure G✝\nL✝¹ : E →L[𝕜] E'✝¹ →L[𝕜] F✝¹\nG E'✝ F✝ P : Type uP\ninst✝¹⁷ : NormedAddCommGroup E'✝\ninst✝¹⁶ : NormedAddCommGroup F✝\ninst✝¹⁵ : NormedSpace 𝕜 E'✝\ninst✝¹⁴ : NormedSpace ℝ F✝\ninst✝¹³ : NormedSpace 𝕜 F✝\ninst✝¹² : CompleteSpace F✝\ninst✝¹¹ : MeasurableSpace G\nμ : Measure G\ninst✝¹⁰ : NormedAddCommGroup G\ninst✝⁹ : BorelSpace G\ninst✝⁸ : NormedSpace 𝕜 G\ninst✝⁷ : NormedAddCommGroup P\ninst✝⁶ : NormedSpace 𝕜 P\nf : G → E\nn : ℕ∞\nL✝ : E →L[𝕜] E'✝ →L[𝕜] F✝\ng✝ : P → G → E'✝\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs✝ : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g✝ p x = 0\nhf : LocallyIntegrable f\nhg✝ : ContDiffOn 𝕜 n (↿g✝) (s ×ˢ univ)\nih :\n  ∀ (n : ℕ) {E' F : Type uP} [inst : NormedAddCommGroup E'] [inst_1 : NormedAddCommGroup F] [inst_2 : NormedSpace 𝕜 E']\n    [inst_3 : NormedSpace ℝ F] [inst_4 : NormedSpace 𝕜 F] [inst_5 : CompleteSpace F] (L : E →L[𝕜] E' →L[𝕜] F)\n    {g : P → G → E'},\n    (∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0) →\n      ContDiffOn 𝕜 (↑n) (↿g) (s ×ˢ univ) → ContDiffOn 𝕜 (↑n) (fun q => f ⋆[L, q.snd] g q.fst) (s ×ˢ univ)\nE' F : Type uP\ninst✝⁵ : NormedAddCommGroup E'\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 E'\ninst✝² : NormedSpace ℝ F\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : CompleteSpace F\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhg : ContDiffOn 𝕜 ⊤ (↿g) (s ×ˢ univ)\n⊢ ContDiffOn 𝕜 ⊤ (fun q => f ⋆[L, q.snd] g q.fst) (s ×ˢ univ)\n[PROOFSTEP]\nrw [contDiffOn_top] at hg ⊢\n[GOAL]\ncase htop\n𝕜 : Type u𝕜\nG✝ : Type uG\nE : Type uE\nE'✝¹ : Type uE'\nE'' : Type uE''\nF✝¹ : Type uF\nF' : Type uF'\nF'' : Type uF''\nP✝ : Type uP\ninst✝³⁴ : NormedAddCommGroup E\ninst✝³³ : NormedAddCommGroup E'✝¹\ninst✝³² : NormedAddCommGroup E''\ninst✝³¹ : NormedAddCommGroup F✝¹\nf✝ f' : G✝ → E\ng✝¹ g' : G✝ → E'✝¹\nx x' : G✝\ny y' : E\ninst✝³⁰ : IsROrC 𝕜\ninst✝²⁹ : NormedSpace 𝕜 E\ninst✝²⁸ : NormedSpace 𝕜 E'✝¹\ninst✝²⁷ : NormedSpace 𝕜 E''\ninst✝²⁶ : NormedSpace ℝ F✝¹\ninst✝²⁵ : NormedSpace 𝕜 F✝¹\ninst✝²⁴ : CompleteSpace F✝¹\ninst✝²³ : MeasurableSpace G✝\ninst✝²² : NormedAddCommGroup G✝\ninst✝²¹ : BorelSpace G✝\ninst✝²⁰ : NormedSpace 𝕜 G✝\ninst✝¹⁹ : NormedAddCommGroup P✝\ninst✝¹⁸ : NormedSpace 𝕜 P✝\nμ✝ : Measure G✝\nL✝¹ : E →L[𝕜] E'✝¹ →L[𝕜] F✝¹\nG E'✝ F✝ P : Type uP\ninst✝¹⁷ : NormedAddCommGroup E'✝\ninst✝¹⁶ : NormedAddCommGroup F✝\ninst✝¹⁵ : NormedSpace 𝕜 E'✝\ninst✝¹⁴ : NormedSpace ℝ F✝\ninst✝¹³ : NormedSpace 𝕜 F✝\ninst✝¹² : CompleteSpace F✝\ninst✝¹¹ : MeasurableSpace G\nμ : Measure G\ninst✝¹⁰ : NormedAddCommGroup G\ninst✝⁹ : BorelSpace G\ninst✝⁸ : NormedSpace 𝕜 G\ninst✝⁷ : NormedAddCommGroup P\ninst✝⁶ : NormedSpace 𝕜 P\nf : G → E\nn : ℕ∞\nL✝ : E →L[𝕜] E'✝ →L[𝕜] F✝\ng✝ : P → G → E'✝\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs✝ : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g✝ p x = 0\nhf : LocallyIntegrable f\nhg✝ : ContDiffOn 𝕜 n (↿g✝) (s ×ˢ univ)\nih :\n  ∀ (n : ℕ) {E' F : Type uP} [inst : NormedAddCommGroup E'] [inst_1 : NormedAddCommGroup F] [inst_2 : NormedSpace 𝕜 E']\n    [inst_3 : NormedSpace ℝ F] [inst_4 : NormedSpace 𝕜 F] [inst_5 : CompleteSpace F] (L : E →L[𝕜] E' →L[𝕜] F)\n    {g : P → G → E'},\n    (∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0) →\n      ContDiffOn 𝕜 (↑n) (↿g) (s ×ˢ univ) → ContDiffOn 𝕜 (↑n) (fun q => f ⋆[L, q.snd] g q.fst) (s ×ˢ univ)\nE' F : Type uP\ninst✝⁵ : NormedAddCommGroup E'\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 E'\ninst✝² : NormedSpace ℝ F\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : CompleteSpace F\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhg : ∀ (n : ℕ), ContDiffOn 𝕜 (↑n) (↿g) (s ×ˢ univ)\n⊢ ∀ (n : ℕ), ContDiffOn 𝕜 (↑n) (fun q => f ⋆[L, q.snd] g q.fst) (s ×ˢ univ)\n[PROOFSTEP]\nintro n\n[GOAL]\ncase htop\n𝕜 : Type u𝕜\nG✝ : Type uG\nE : Type uE\nE'✝¹ : Type uE'\nE'' : Type uE''\nF✝¹ : Type uF\nF' : Type uF'\nF'' : Type uF''\nP✝ : Type uP\ninst✝³⁴ : NormedAddCommGroup E\ninst✝³³ : NormedAddCommGroup E'✝¹\ninst✝³² : NormedAddCommGroup E''\ninst✝³¹ : NormedAddCommGroup F✝¹\nf✝ f' : G✝ → E\ng✝¹ g' : G✝ → E'✝¹\nx x' : G✝\ny y' : E\ninst✝³⁰ : IsROrC 𝕜\ninst✝²⁹ : NormedSpace 𝕜 E\ninst✝²⁸ : NormedSpace 𝕜 E'✝¹\ninst✝²⁷ : NormedSpace 𝕜 E''\ninst✝²⁶ : NormedSpace ℝ F✝¹\ninst✝²⁵ : NormedSpace 𝕜 F✝¹\ninst✝²⁴ : CompleteSpace F✝¹\ninst✝²³ : MeasurableSpace G✝\ninst✝²² : NormedAddCommGroup G✝\ninst✝²¹ : BorelSpace G✝\ninst✝²⁰ : NormedSpace 𝕜 G✝\ninst✝¹⁹ : NormedAddCommGroup P✝\ninst✝¹⁸ : NormedSpace 𝕜 P✝\nμ✝ : Measure G✝\nL✝¹ : E →L[𝕜] E'✝¹ →L[𝕜] F✝¹\nG E'✝ F✝ P : Type uP\ninst✝¹⁷ : NormedAddCommGroup E'✝\ninst✝¹⁶ : NormedAddCommGroup F✝\ninst✝¹⁵ : NormedSpace 𝕜 E'✝\ninst✝¹⁴ : NormedSpace ℝ F✝\ninst✝¹³ : NormedSpace 𝕜 F✝\ninst✝¹² : CompleteSpace F✝\ninst✝¹¹ : MeasurableSpace G\nμ : Measure G\ninst✝¹⁰ : NormedAddCommGroup G\ninst✝⁹ : BorelSpace G\ninst✝⁸ : NormedSpace 𝕜 G\ninst✝⁷ : NormedAddCommGroup P\ninst✝⁶ : NormedSpace 𝕜 P\nf : G → E\nn✝ : ℕ∞\nL✝ : E →L[𝕜] E'✝ →L[𝕜] F✝\ng✝ : P → G → E'✝\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs✝ : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g✝ p x = 0\nhf : LocallyIntegrable f\nhg✝ : ContDiffOn 𝕜 n✝ (↿g✝) (s ×ˢ univ)\nih :\n  ∀ (n : ℕ) {E' F : Type uP} [inst : NormedAddCommGroup E'] [inst_1 : NormedAddCommGroup F] [inst_2 : NormedSpace 𝕜 E']\n    [inst_3 : NormedSpace ℝ F] [inst_4 : NormedSpace 𝕜 F] [inst_5 : CompleteSpace F] (L : E →L[𝕜] E' →L[𝕜] F)\n    {g : P → G → E'},\n    (∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0) →\n      ContDiffOn 𝕜 (↑n) (↿g) (s ×ˢ univ) → ContDiffOn 𝕜 (↑n) (fun q => f ⋆[L, q.snd] g q.fst) (s ×ˢ univ)\nE' F : Type uP\ninst✝⁵ : NormedAddCommGroup E'\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 E'\ninst✝² : NormedSpace ℝ F\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : CompleteSpace F\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhg : ∀ (n : ℕ), ContDiffOn 𝕜 (↑n) (↿g) (s ×ˢ univ)\nn : ℕ\n⊢ ContDiffOn 𝕜 (↑n) (fun q => f ⋆[L, q.snd] g q.fst) (s ×ˢ univ)\n[PROOFSTEP]\nexact ih n L hgs (hg n)\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf✝ f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL✝ : E →L[𝕜] E' →L[𝕜] F\nf : G → E\nn : ℕ∞\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 n (↿g) (s ×ˢ univ)\n⊢ ContDiffOn 𝕜 n (fun q => f ⋆[L, q.snd] g q.fst) (s ×ˢ univ)\n[PROOFSTEP]\nlet eG : Type max uG uE' uF uP := ULift.{max uE' uF uP} G\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf✝ f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL✝ : E →L[𝕜] E' →L[𝕜] F\nf : G → E\nn : ℕ∞\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 n (↿g) (s ×ˢ univ)\neG : Type (max uG uE' uF uP) := ULift G\n⊢ ContDiffOn 𝕜 n (fun q => f ⋆[L, q.snd] g q.fst) (s ×ˢ univ)\n[PROOFSTEP]\nborelize eG\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf✝ f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL✝ : E →L[𝕜] E' →L[𝕜] F\nf : G → E\nn : ℕ∞\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 n (↿g) (s ×ˢ univ)\neG : Type (max uG uE' uF uP) := ULift G\nthis✝¹ : MeasurableSpace eG := borel eG\nthis✝ : BorelSpace eG\n⊢ ContDiffOn 𝕜 n (fun q => f ⋆[L, q.snd] g q.fst) (s ×ˢ univ)\n[PROOFSTEP]\nlet eE' : Type max uE' uG uF uP := ULift.{max uG uF uP} E'\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf✝ f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL✝ : E →L[𝕜] E' →L[𝕜] F\nf : G → E\nn : ℕ∞\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 n (↿g) (s ×ˢ univ)\neG : Type (max uG uE' uF uP) := ULift G\nthis✝¹ : MeasurableSpace eG := borel eG\nthis✝ : BorelSpace eG\neE' : Type (max uE' uG uF uP) := ULift E'\n⊢ ContDiffOn 𝕜 n (fun q => f ⋆[L, q.snd] g q.fst) (s ×ˢ univ)\n[PROOFSTEP]\nlet eF : Type max uF uG uE' uP := ULift.{max uG uE' uP} F\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf✝ f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL✝ : E →L[𝕜] E' →L[𝕜] F\nf : G → E\nn : ℕ∞\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 n (↿g) (s ×ˢ univ)\neG : Type (max uG uE' uF uP) := ULift G\nthis✝¹ : MeasurableSpace eG := borel eG\nthis✝ : BorelSpace eG\neE' : Type (max uE' uG uF uP) := ULift E'\neF : Type (max uF uG uE' uP) := ULift F\n⊢ ContDiffOn 𝕜 n (fun q => f ⋆[L, q.snd] g q.fst) (s ×ˢ univ)\n[PROOFSTEP]\nlet eP : Type max uP uG uE' uF := ULift.{max uG uE' uF} P\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf✝ f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL✝ : E →L[𝕜] E' →L[𝕜] F\nf : G → E\nn : ℕ∞\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 n (↿g) (s ×ˢ univ)\neG : Type (max uG uE' uF uP) := ULift G\nthis✝¹ : MeasurableSpace eG := borel eG\nthis✝ : BorelSpace eG\neE' : Type (max uE' uG uF uP) := ULift E'\neF : Type (max uF uG uE' uP) := ULift F\neP : Type (max uP uG uE' uF) := ULift P\n⊢ ContDiffOn 𝕜 n (fun q => f ⋆[L, q.snd] g q.fst) (s ×ˢ univ)\n[PROOFSTEP]\nhave isoG : eG ≃L[𝕜] G := ContinuousLinearEquiv.ulift\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf✝ f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL✝ : E →L[𝕜] E' →L[𝕜] F\nf : G → E\nn : ℕ∞\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 n (↿g) (s ×ˢ univ)\neG : Type (max uG uE' uF uP) := ULift G\nthis✝¹ : MeasurableSpace eG := borel eG\nthis✝ : BorelSpace eG\neE' : Type (max uE' uG uF uP) := ULift E'\neF : Type (max uF uG uE' uP) := ULift F\neP : Type (max uP uG uE' uF) := ULift P\nisoG : eG ≃L[𝕜] G\n⊢ ContDiffOn 𝕜 n (fun q => f ⋆[L, q.snd] g q.fst) (s ×ˢ univ)\n[PROOFSTEP]\nhave isoE' : eE' ≃L[𝕜] E' := ContinuousLinearEquiv.ulift\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf✝ f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL✝ : E →L[𝕜] E' →L[𝕜] F\nf : G → E\nn : ℕ∞\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 n (↿g) (s ×ˢ univ)\neG : Type (max uG uE' uF uP) := ULift G\nthis✝¹ : MeasurableSpace eG := borel eG\nthis✝ : BorelSpace eG\neE' : Type (max uE' uG uF uP) := ULift E'\neF : Type (max uF uG uE' uP) := ULift F\neP : Type (max uP uG uE' uF) := ULift P\nisoG : eG ≃L[𝕜] G\nisoE' : eE' ≃L[𝕜] E'\n⊢ ContDiffOn 𝕜 n (fun q => f ⋆[L, q.snd] g q.fst) (s ×ˢ univ)\n[PROOFSTEP]\nhave isoF : eF ≃L[𝕜] F := ContinuousLinearEquiv.ulift\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf✝ f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL✝ : E →L[𝕜] E' →L[𝕜] F\nf : G → E\nn : ℕ∞\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 n (↿g) (s ×ˢ univ)\neG : Type (max uG uE' uF uP) := ULift G\nthis✝¹ : MeasurableSpace eG := borel eG\nthis✝ : BorelSpace eG\neE' : Type (max uE' uG uF uP) := ULift E'\neF : Type (max uF uG uE' uP) := ULift F\neP : Type (max uP uG uE' uF) := ULift P\nisoG : eG ≃L[𝕜] G\nisoE' : eE' ≃L[𝕜] E'\nisoF : eF ≃L[𝕜] F\n⊢ ContDiffOn 𝕜 n (fun q => f ⋆[L, q.snd] g q.fst) (s ×ˢ univ)\n[PROOFSTEP]\nhave isoP : eP ≃L[𝕜] P := ContinuousLinearEquiv.ulift\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf✝ f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL✝ : E →L[𝕜] E' →L[𝕜] F\nf : G → E\nn : ℕ∞\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 n (↿g) (s ×ˢ univ)\neG : Type (max uG uE' uF uP) := ULift G\nthis✝¹ : MeasurableSpace eG := borel eG\nthis✝ : BorelSpace eG\neE' : Type (max uE' uG uF uP) := ULift E'\neF : Type (max uF uG uE' uP) := ULift F\neP : Type (max uP uG uE' uF) := ULift P\nisoG : eG ≃L[𝕜] G\nisoE' : eE' ≃L[𝕜] E'\nisoF : eF ≃L[𝕜] F\nisoP : eP ≃L[𝕜] P\n⊢ ContDiffOn 𝕜 n (fun q => f ⋆[L, q.snd] g q.fst) (s ×ˢ univ)\n[PROOFSTEP]\nlet ef := f ∘ isoG\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf✝ f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL✝ : E →L[𝕜] E' →L[𝕜] F\nf : G → E\nn : ℕ∞\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 n (↿g) (s ×ˢ univ)\neG : Type (max uG uE' uF uP) := ULift G\nthis✝¹ : MeasurableSpace eG := borel eG\nthis✝ : BorelSpace eG\neE' : Type (max uE' uG uF uP) := ULift E'\neF : Type (max uF uG uE' uP) := ULift F\neP : Type (max uP uG uE' uF) := ULift P\nisoG : eG ≃L[𝕜] G\nisoE' : eE' ≃L[𝕜] E'\nisoF : eF ≃L[𝕜] F\nisoP : eP ≃L[𝕜] P\nef : eG → E := f ∘ ↑isoG\n⊢ ContDiffOn 𝕜 n (fun q => f ⋆[L, q.snd] g q.fst) (s ×ˢ univ)\n[PROOFSTEP]\nlet eμ : MeasureTheory.Measure eG := Measure.map isoG.symm μ\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf✝ f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL✝ : E →L[𝕜] E' →L[𝕜] F\nf : G → E\nn : ℕ∞\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 n (↿g) (s ×ˢ univ)\neG : Type (max uG uE' uF uP) := ULift G\nthis✝¹ : MeasurableSpace eG := borel eG\nthis✝ : BorelSpace eG\neE' : Type (max uE' uG uF uP) := ULift E'\neF : Type (max uF uG uE' uP) := ULift F\neP : Type (max uP uG uE' uF) := ULift P\nisoG : eG ≃L[𝕜] G\nisoE' : eE' ≃L[𝕜] E'\nisoF : eF ≃L[𝕜] F\nisoP : eP ≃L[𝕜] P\nef : eG → E := f ∘ ↑isoG\neμ : Measure eG := Measure.map (↑(ContinuousLinearEquiv.symm isoG)) μ\n⊢ ContDiffOn 𝕜 n (fun q => f ⋆[L, q.snd] g q.fst) (s ×ˢ univ)\n[PROOFSTEP]\nlet eg : eP → eG → eE' := fun ep ex => isoE'.symm (g (isoP ep) (isoG ex))\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf✝ f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL✝ : E →L[𝕜] E' →L[𝕜] F\nf : G → E\nn : ℕ∞\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 n (↿g) (s ×ˢ univ)\neG : Type (max uG uE' uF uP) := ULift G\nthis✝¹ : MeasurableSpace eG := borel eG\nthis✝ : BorelSpace eG\neE' : Type (max uE' uG uF uP) := ULift E'\neF : Type (max uF uG uE' uP) := ULift F\neP : Type (max uP uG uE' uF) := ULift P\nisoG : eG ≃L[𝕜] G\nisoE' : eE' ≃L[𝕜] E'\nisoF : eF ≃L[𝕜] F\nisoP : eP ≃L[𝕜] P\nef : eG → E := f ∘ ↑isoG\neμ : Measure eG := Measure.map (↑(ContinuousLinearEquiv.symm isoG)) μ\neg : eP → eG → eE' := fun ep ex => ↑(ContinuousLinearEquiv.symm isoE') (g (↑isoP ep) (↑isoG ex))\n⊢ ContDiffOn 𝕜 n (fun q => f ⋆[L, q.snd] g q.fst) (s ×ˢ univ)\n[PROOFSTEP]\nlet eL :=\n  ContinuousLinearMap.comp ((ContinuousLinearEquiv.arrowCongr isoE' isoF).symm : (E' →L[𝕜] F) →L[𝕜] eE' →L[𝕜] eF) L\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf✝ f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL✝ : E →L[𝕜] E' →L[𝕜] F\nf : G → E\nn : ℕ∞\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 n (↿g) (s ×ˢ univ)\neG : Type (max uG uE' uF uP) := ULift G\nthis✝¹ : MeasurableSpace eG := borel eG\nthis✝ : BorelSpace eG\neE' : Type (max uE' uG uF uP) := ULift E'\neF : Type (max uF uG uE' uP) := ULift F\neP : Type (max uP uG uE' uF) := ULift P\nisoG : eG ≃L[𝕜] G\nisoE' : eE' ≃L[𝕜] E'\nisoF : eF ≃L[𝕜] F\nisoP : eP ≃L[𝕜] P\nef : eG → E := f ∘ ↑isoG\neμ : Measure eG := Measure.map (↑(ContinuousLinearEquiv.symm isoG)) μ\neg : eP → eG → eE' := fun ep ex => ↑(ContinuousLinearEquiv.symm isoE') (g (↑isoP ep) (↑isoG ex))\neL : E →L[𝕜] eE' →L[𝕜] eF :=\n  ContinuousLinearMap.comp (↑(ContinuousLinearEquiv.symm (ContinuousLinearEquiv.arrowCongr isoE' isoF))) L\n⊢ ContDiffOn 𝕜 n (fun q => f ⋆[L, q.snd] g q.fst) (s ×ˢ univ)\n[PROOFSTEP]\nlet R := fun q : eP × eG => (ef ⋆[eL, eμ] eg q.1) q.2\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf✝ f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL✝ : E →L[𝕜] E' →L[𝕜] F\nf : G → E\nn : ℕ∞\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 n (↿g) (s ×ˢ univ)\neG : Type (max uG uE' uF uP) := ULift G\nthis✝¹ : MeasurableSpace eG := borel eG\nthis✝ : BorelSpace eG\neE' : Type (max uE' uG uF uP) := ULift E'\neF : Type (max uF uG uE' uP) := ULift F\neP : Type (max uP uG uE' uF) := ULift P\nisoG : eG ≃L[𝕜] G\nisoE' : eE' ≃L[𝕜] E'\nisoF : eF ≃L[𝕜] F\nisoP : eP ≃L[𝕜] P\nef : eG → E := f ∘ ↑isoG\neμ : Measure eG := Measure.map (↑(ContinuousLinearEquiv.symm isoG)) μ\neg : eP → eG → eE' := fun ep ex => ↑(ContinuousLinearEquiv.symm isoE') (g (↑isoP ep) (↑isoG ex))\neL : E →L[𝕜] eE' →L[𝕜] eF :=\n  ContinuousLinearMap.comp (↑(ContinuousLinearEquiv.symm (ContinuousLinearEquiv.arrowCongr isoE' isoF))) L\nR : eP × eG → eF := fun q => ef ⋆[eL, q.snd] eg q.fst\n⊢ ContDiffOn 𝕜 n (fun q => f ⋆[L, q.snd] g q.fst) (s ×ˢ univ)\n[PROOFSTEP]\nhave R_contdiff : ContDiffOn 𝕜 n R ((isoP ⁻¹' s) ×ˢ univ) :=\n  by\n  have hek : IsCompact (isoG ⁻¹' k) := isoG.toHomeomorph.closedEmbedding.isCompact_preimage hk\n  have hes : IsOpen (isoP ⁻¹' s) := isoP.continuous.isOpen_preimage _ hs\n  refine' contDiffOn_convolution_right_with_param_aux eL hes hek _ _ _\n  · intro p x hp hx\n    simp only [(· ∘ ·), ContinuousLinearEquiv.prod_apply, LinearIsometryEquiv.coe_coe,\n      ContinuousLinearEquiv.map_eq_zero_iff]\n    exact hgs _ _ hp hx\n  · apply (locallyIntegrable_map_homeomorph isoG.symm.toHomeomorph).2\n    convert hf\n    ext1 x\n    simp only [ContinuousLinearEquiv.coe_toHomeomorph, (· ∘ ·), ContinuousLinearEquiv.apply_symm_apply]\n  · apply isoE'.symm.contDiff.comp_contDiffOn\n    apply hg.comp (isoP.prod isoG).contDiff.contDiffOn\n    rintro ⟨p, x⟩ ⟨hp, -⟩\n    simpa only [mem_preimage, ContinuousLinearEquiv.prod_apply, prod_mk_mem_set_prod_eq, mem_univ, and_true_iff] using\n      hp\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf✝ f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL✝ : E →L[𝕜] E' →L[𝕜] F\nf : G → E\nn : ℕ∞\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 n (↿g) (s ×ˢ univ)\neG : Type (max uG uE' uF uP) := ULift G\nthis✝¹ : MeasurableSpace eG := borel eG\nthis✝ : BorelSpace eG\neE' : Type (max uE' uG uF uP) := ULift E'\neF : Type (max uF uG uE' uP) := ULift F\neP : Type (max uP uG uE' uF) := ULift P\nisoG : eG ≃L[𝕜] G\nisoE' : eE' ≃L[𝕜] E'\nisoF : eF ≃L[𝕜] F\nisoP : eP ≃L[𝕜] P\nef : eG → E := f ∘ ↑isoG\neμ : Measure eG := Measure.map (↑(ContinuousLinearEquiv.symm isoG)) μ\neg : eP → eG → eE' := fun ep ex => ↑(ContinuousLinearEquiv.symm isoE') (g (↑isoP ep) (↑isoG ex))\neL : E →L[𝕜] eE' →L[𝕜] eF :=\n  ContinuousLinearMap.comp (↑(ContinuousLinearEquiv.symm (ContinuousLinearEquiv.arrowCongr isoE' isoF))) L\nR : eP × eG → eF := fun q => ef ⋆[eL, q.snd] eg q.fst\n⊢ ContDiffOn 𝕜 n R ((↑isoP ⁻¹' s) ×ˢ univ)\n[PROOFSTEP]\nhave hek : IsCompact (isoG ⁻¹' k) := isoG.toHomeomorph.closedEmbedding.isCompact_preimage hk\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf✝ f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL✝ : E →L[𝕜] E' →L[𝕜] F\nf : G → E\nn : ℕ∞\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 n (↿g) (s ×ˢ univ)\neG : Type (max uG uE' uF uP) := ULift G\nthis✝¹ : MeasurableSpace eG := borel eG\nthis✝ : BorelSpace eG\neE' : Type (max uE' uG uF uP) := ULift E'\neF : Type (max uF uG uE' uP) := ULift F\neP : Type (max uP uG uE' uF) := ULift P\nisoG : eG ≃L[𝕜] G\nisoE' : eE' ≃L[𝕜] E'\nisoF : eF ≃L[𝕜] F\nisoP : eP ≃L[𝕜] P\nef : eG → E := f ∘ ↑isoG\neμ : Measure eG := Measure.map (↑(ContinuousLinearEquiv.symm isoG)) μ\neg : eP → eG → eE' := fun ep ex => ↑(ContinuousLinearEquiv.symm isoE') (g (↑isoP ep) (↑isoG ex))\neL : E →L[𝕜] eE' →L[𝕜] eF :=\n  ContinuousLinearMap.comp (↑(ContinuousLinearEquiv.symm (ContinuousLinearEquiv.arrowCongr isoE' isoF))) L\nR : eP × eG → eF := fun q => ef ⋆[eL, q.snd] eg q.fst\nhek : IsCompact (↑isoG ⁻¹' k)\n⊢ ContDiffOn 𝕜 n R ((↑isoP ⁻¹' s) ×ˢ univ)\n[PROOFSTEP]\nhave hes : IsOpen (isoP ⁻¹' s) := isoP.continuous.isOpen_preimage _ hs\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf✝ f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL✝ : E →L[𝕜] E' →L[𝕜] F\nf : G → E\nn : ℕ∞\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 n (↿g) (s ×ˢ univ)\neG : Type (max uG uE' uF uP) := ULift G\nthis✝¹ : MeasurableSpace eG := borel eG\nthis✝ : BorelSpace eG\neE' : Type (max uE' uG uF uP) := ULift E'\neF : Type (max uF uG uE' uP) := ULift F\neP : Type (max uP uG uE' uF) := ULift P\nisoG : eG ≃L[𝕜] G\nisoE' : eE' ≃L[𝕜] E'\nisoF : eF ≃L[𝕜] F\nisoP : eP ≃L[𝕜] P\nef : eG → E := f ∘ ↑isoG\neμ : Measure eG := Measure.map (↑(ContinuousLinearEquiv.symm isoG)) μ\neg : eP → eG → eE' := fun ep ex => ↑(ContinuousLinearEquiv.symm isoE') (g (↑isoP ep) (↑isoG ex))\neL : E →L[𝕜] eE' →L[𝕜] eF :=\n  ContinuousLinearMap.comp (↑(ContinuousLinearEquiv.symm (ContinuousLinearEquiv.arrowCongr isoE' isoF))) L\nR : eP × eG → eF := fun q => ef ⋆[eL, q.snd] eg q.fst\nhek : IsCompact (↑isoG ⁻¹' k)\nhes : IsOpen (↑isoP ⁻¹' s)\n⊢ ContDiffOn 𝕜 n R ((↑isoP ⁻¹' s) ×ˢ univ)\n[PROOFSTEP]\nrefine' contDiffOn_convolution_right_with_param_aux eL hes hek _ _ _\n[GOAL]\ncase refine'_1\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf✝ f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL✝ : E →L[𝕜] E' →L[𝕜] F\nf : G → E\nn : ℕ∞\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 n (↿g) (s ×ˢ univ)\neG : Type (max uG uE' uF uP) := ULift G\nthis✝¹ : MeasurableSpace eG := borel eG\nthis✝ : BorelSpace eG\neE' : Type (max uE' uG uF uP) := ULift E'\neF : Type (max uF uG uE' uP) := ULift F\neP : Type (max uP uG uE' uF) := ULift P\nisoG : eG ≃L[𝕜] G\nisoE' : eE' ≃L[𝕜] E'\nisoF : eF ≃L[𝕜] F\nisoP : eP ≃L[𝕜] P\nef : eG → E := f ∘ ↑isoG\neμ : Measure eG := Measure.map (↑(ContinuousLinearEquiv.symm isoG)) μ\neg : eP → eG → eE' := fun ep ex => ↑(ContinuousLinearEquiv.symm isoE') (g (↑isoP ep) (↑isoG ex))\neL : E →L[𝕜] eE' →L[𝕜] eF :=\n  ContinuousLinearMap.comp (↑(ContinuousLinearEquiv.symm (ContinuousLinearEquiv.arrowCongr isoE' isoF))) L\nR : eP × eG → eF := fun q => ef ⋆[eL, q.snd] eg q.fst\nhek : IsCompact (↑isoG ⁻¹' k)\nhes : IsOpen (↑isoP ⁻¹' s)\n⊢ ∀ (p : eP) (x : eG), p ∈ ↑isoP ⁻¹' s → ¬x ∈ ↑isoG ⁻¹' k → eg p x = 0\n[PROOFSTEP]\nintro p x hp hx\n[GOAL]\ncase refine'_1\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf✝ f' : G → E\ng✝ g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL✝ : E →L[𝕜] E' →L[𝕜] F\nf : G → E\nn : ℕ∞\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 n (↿g) (s ×ˢ univ)\neG : Type (max uG uE' uF uP) := ULift G\nthis✝¹ : MeasurableSpace eG := borel eG\nthis✝ : BorelSpace eG\neE' : Type (max uE' uG uF uP) := ULift E'\neF : Type (max uF uG uE' uP) := ULift F\neP : Type (max uP uG uE' uF) := ULift P\nisoG : eG ≃L[𝕜] G\nisoE' : eE' ≃L[𝕜] E'\nisoF : eF ≃L[𝕜] F\nisoP : eP ≃L[𝕜] P\nef : eG → E := f ∘ ↑isoG\neμ : Measure eG := Measure.map (↑(ContinuousLinearEquiv.symm isoG)) μ\neg : eP → eG → eE' := fun ep ex => ↑(ContinuousLinearEquiv.symm isoE') (g (↑isoP ep) (↑isoG ex))\neL : E →L[𝕜] eE' →L[𝕜] eF :=\n  ContinuousLinearMap.comp (↑(ContinuousLinearEquiv.symm (ContinuousLinearEquiv.arrowCongr isoE' isoF))) L\nR : eP × eG → eF := fun q => ef ⋆[eL, q.snd] eg q.fst\nhek : IsCompact (↑isoG ⁻¹' k)\nhes : IsOpen (↑isoP ⁻¹' s)\np : eP\nx : eG\nhp : p ∈ ↑isoP ⁻¹' s\nhx : ¬x ∈ ↑isoG ⁻¹' k\n⊢ eg p x = 0\n[PROOFSTEP]\nsimp only [(· ∘ ·), ContinuousLinearEquiv.prod_apply, LinearIsometryEquiv.coe_coe,\n  ContinuousLinearEquiv.map_eq_zero_iff]\n[GOAL]\ncase refine'_1\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf✝ f' : G → E\ng✝ g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL✝ : E →L[𝕜] E' →L[𝕜] F\nf : G → E\nn : ℕ∞\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 n (↿g) (s ×ˢ univ)\neG : Type (max uG uE' uF uP) := ULift G\nthis✝¹ : MeasurableSpace eG := borel eG\nthis✝ : BorelSpace eG\neE' : Type (max uE' uG uF uP) := ULift E'\neF : Type (max uF uG uE' uP) := ULift F\neP : Type (max uP uG uE' uF) := ULift P\nisoG : eG ≃L[𝕜] G\nisoE' : eE' ≃L[𝕜] E'\nisoF : eF ≃L[𝕜] F\nisoP : eP ≃L[𝕜] P\nef : eG → E := f ∘ ↑isoG\neμ : Measure eG := Measure.map (↑(ContinuousLinearEquiv.symm isoG)) μ\neg : eP → eG → eE' := fun ep ex => ↑(ContinuousLinearEquiv.symm isoE') (g (↑isoP ep) (↑isoG ex))\neL : E →L[𝕜] eE' →L[𝕜] eF :=\n  ContinuousLinearMap.comp (↑(ContinuousLinearEquiv.symm (ContinuousLinearEquiv.arrowCongr isoE' isoF))) L\nR : eP × eG → eF := fun q => ef ⋆[eL, q.snd] eg q.fst\nhek : IsCompact (↑isoG ⁻¹' k)\nhes : IsOpen (↑isoP ⁻¹' s)\np : eP\nx : eG\nhp : p ∈ ↑isoP ⁻¹' s\nhx : ¬x ∈ ↑isoG ⁻¹' k\n⊢ g (↑isoP p) (↑isoG x) = 0\n[PROOFSTEP]\nexact hgs _ _ hp hx\n[GOAL]\ncase refine'_2\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf✝ f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL✝ : E →L[𝕜] E' →L[𝕜] F\nf : G → E\nn : ℕ∞\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 n (↿g) (s ×ˢ univ)\neG : Type (max uG uE' uF uP) := ULift G\nthis✝¹ : MeasurableSpace eG := borel eG\nthis✝ : BorelSpace eG\neE' : Type (max uE' uG uF uP) := ULift E'\neF : Type (max uF uG uE' uP) := ULift F\neP : Type (max uP uG uE' uF) := ULift P\nisoG : eG ≃L[𝕜] G\nisoE' : eE' ≃L[𝕜] E'\nisoF : eF ≃L[𝕜] F\nisoP : eP ≃L[𝕜] P\nef : eG → E := f ∘ ↑isoG\neμ : Measure eG := Measure.map (↑(ContinuousLinearEquiv.symm isoG)) μ\neg : eP → eG → eE' := fun ep ex => ↑(ContinuousLinearEquiv.symm isoE') (g (↑isoP ep) (↑isoG ex))\neL : E →L[𝕜] eE' →L[𝕜] eF :=\n  ContinuousLinearMap.comp (↑(ContinuousLinearEquiv.symm (ContinuousLinearEquiv.arrowCongr isoE' isoF))) L\nR : eP × eG → eF := fun q => ef ⋆[eL, q.snd] eg q.fst\nhek : IsCompact (↑isoG ⁻¹' k)\nhes : IsOpen (↑isoP ⁻¹' s)\n⊢ LocallyIntegrable ef\n[PROOFSTEP]\napply (locallyIntegrable_map_homeomorph isoG.symm.toHomeomorph).2\n[GOAL]\ncase refine'_2\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf✝ f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL✝ : E →L[𝕜] E' →L[𝕜] F\nf : G → E\nn : ℕ∞\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 n (↿g) (s ×ˢ univ)\neG : Type (max uG uE' uF uP) := ULift G\nthis✝¹ : MeasurableSpace eG := borel eG\nthis✝ : BorelSpace eG\neE' : Type (max uE' uG uF uP) := ULift E'\neF : Type (max uF uG uE' uP) := ULift F\neP : Type (max uP uG uE' uF) := ULift P\nisoG : eG ≃L[𝕜] G\nisoE' : eE' ≃L[𝕜] E'\nisoF : eF ≃L[𝕜] F\nisoP : eP ≃L[𝕜] P\nef : eG → E := f ∘ ↑isoG\neμ : Measure eG := Measure.map (↑(ContinuousLinearEquiv.symm isoG)) μ\neg : eP → eG → eE' := fun ep ex => ↑(ContinuousLinearEquiv.symm isoE') (g (↑isoP ep) (↑isoG ex))\neL : E →L[𝕜] eE' →L[𝕜] eF :=\n  ContinuousLinearMap.comp (↑(ContinuousLinearEquiv.symm (ContinuousLinearEquiv.arrowCongr isoE' isoF))) L\nR : eP × eG → eF := fun q => ef ⋆[eL, q.snd] eg q.fst\nhek : IsCompact (↑isoG ⁻¹' k)\nhes : IsOpen (↑isoP ⁻¹' s)\n⊢ LocallyIntegrable (ef ∘ ↑(ContinuousLinearEquiv.toHomeomorph (ContinuousLinearEquiv.symm isoG)))\n[PROOFSTEP]\nconvert hf\n[GOAL]\ncase h.e'_6\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf✝ f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL✝ : E →L[𝕜] E' →L[𝕜] F\nf : G → E\nn : ℕ∞\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 n (↿g) (s ×ˢ univ)\neG : Type (max uG uE' uF uP) := ULift G\nthis✝¹ : MeasurableSpace eG := borel eG\nthis✝ : BorelSpace eG\neE' : Type (max uE' uG uF uP) := ULift E'\neF : Type (max uF uG uE' uP) := ULift F\neP : Type (max uP uG uE' uF) := ULift P\nisoG : eG ≃L[𝕜] G\nisoE' : eE' ≃L[𝕜] E'\nisoF : eF ≃L[𝕜] F\nisoP : eP ≃L[𝕜] P\nef : eG → E := f ∘ ↑isoG\neμ : Measure eG := Measure.map (↑(ContinuousLinearEquiv.symm isoG)) μ\neg : eP → eG → eE' := fun ep ex => ↑(ContinuousLinearEquiv.symm isoE') (g (↑isoP ep) (↑isoG ex))\neL : E →L[𝕜] eE' →L[𝕜] eF :=\n  ContinuousLinearMap.comp (↑(ContinuousLinearEquiv.symm (ContinuousLinearEquiv.arrowCongr isoE' isoF))) L\nR : eP × eG → eF := fun q => ef ⋆[eL, q.snd] eg q.fst\nhek : IsCompact (↑isoG ⁻¹' k)\nhes : IsOpen (↑isoP ⁻¹' s)\n⊢ ef ∘ ↑(ContinuousLinearEquiv.toHomeomorph (ContinuousLinearEquiv.symm isoG)) = f\n[PROOFSTEP]\next1 x\n[GOAL]\ncase h.e'_6.h\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf✝ f' : G → E\ng✝ g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL✝ : E →L[𝕜] E' →L[𝕜] F\nf : G → E\nn : ℕ∞\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 n (↿g) (s ×ˢ univ)\neG : Type (max uG uE' uF uP) := ULift G\nthis✝¹ : MeasurableSpace eG := borel eG\nthis✝ : BorelSpace eG\neE' : Type (max uE' uG uF uP) := ULift E'\neF : Type (max uF uG uE' uP) := ULift F\neP : Type (max uP uG uE' uF) := ULift P\nisoG : eG ≃L[𝕜] G\nisoE' : eE' ≃L[𝕜] E'\nisoF : eF ≃L[𝕜] F\nisoP : eP ≃L[𝕜] P\nef : eG → E := f ∘ ↑isoG\neμ : Measure eG := Measure.map (↑(ContinuousLinearEquiv.symm isoG)) μ\neg : eP → eG → eE' := fun ep ex => ↑(ContinuousLinearEquiv.symm isoE') (g (↑isoP ep) (↑isoG ex))\neL : E →L[𝕜] eE' →L[𝕜] eF :=\n  ContinuousLinearMap.comp (↑(ContinuousLinearEquiv.symm (ContinuousLinearEquiv.arrowCongr isoE' isoF))) L\nR : eP × eG → eF := fun q => ef ⋆[eL, q.snd] eg q.fst\nhek : IsCompact (↑isoG ⁻¹' k)\nhes : IsOpen (↑isoP ⁻¹' s)\nx : G\n⊢ (ef ∘ ↑(ContinuousLinearEquiv.toHomeomorph (ContinuousLinearEquiv.symm isoG))) x = f x\n[PROOFSTEP]\nsimp only [ContinuousLinearEquiv.coe_toHomeomorph, (· ∘ ·), ContinuousLinearEquiv.apply_symm_apply]\n[GOAL]\ncase refine'_3\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf✝ f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL✝ : E →L[𝕜] E' →L[𝕜] F\nf : G → E\nn : ℕ∞\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 n (↿g) (s ×ˢ univ)\neG : Type (max uG uE' uF uP) := ULift G\nthis✝¹ : MeasurableSpace eG := borel eG\nthis✝ : BorelSpace eG\neE' : Type (max uE' uG uF uP) := ULift E'\neF : Type (max uF uG uE' uP) := ULift F\neP : Type (max uP uG uE' uF) := ULift P\nisoG : eG ≃L[𝕜] G\nisoE' : eE' ≃L[𝕜] E'\nisoF : eF ≃L[𝕜] F\nisoP : eP ≃L[𝕜] P\nef : eG → E := f ∘ ↑isoG\neμ : Measure eG := Measure.map (↑(ContinuousLinearEquiv.symm isoG)) μ\neg : eP → eG → eE' := fun ep ex => ↑(ContinuousLinearEquiv.symm isoE') (g (↑isoP ep) (↑isoG ex))\neL : E →L[𝕜] eE' →L[𝕜] eF :=\n  ContinuousLinearMap.comp (↑(ContinuousLinearEquiv.symm (ContinuousLinearEquiv.arrowCongr isoE' isoF))) L\nR : eP × eG → eF := fun q => ef ⋆[eL, q.snd] eg q.fst\nhek : IsCompact (↑isoG ⁻¹' k)\nhes : IsOpen (↑isoP ⁻¹' s)\n⊢ ContDiffOn 𝕜 n (↿eg) ((↑isoP ⁻¹' s) ×ˢ univ)\n[PROOFSTEP]\napply isoE'.symm.contDiff.comp_contDiffOn\n[GOAL]\ncase refine'_3\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf✝ f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL✝ : E →L[𝕜] E' →L[𝕜] F\nf : G → E\nn : ℕ∞\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 n (↿g) (s ×ˢ univ)\neG : Type (max uG uE' uF uP) := ULift G\nthis✝¹ : MeasurableSpace eG := borel eG\nthis✝ : BorelSpace eG\neE' : Type (max uE' uG uF uP) := ULift E'\neF : Type (max uF uG uE' uP) := ULift F\neP : Type (max uP uG uE' uF) := ULift P\nisoG : eG ≃L[𝕜] G\nisoE' : eE' ≃L[𝕜] E'\nisoF : eF ≃L[𝕜] F\nisoP : eP ≃L[𝕜] P\nef : eG → E := f ∘ ↑isoG\neμ : Measure eG := Measure.map (↑(ContinuousLinearEquiv.symm isoG)) μ\neg : eP → eG → eE' := fun ep ex => ↑(ContinuousLinearEquiv.symm isoE') (g (↑isoP ep) (↑isoG ex))\neL : E →L[𝕜] eE' →L[𝕜] eF :=\n  ContinuousLinearMap.comp (↑(ContinuousLinearEquiv.symm (ContinuousLinearEquiv.arrowCongr isoE' isoF))) L\nR : eP × eG → eF := fun q => ef ⋆[eL, q.snd] eg q.fst\nhek : IsCompact (↑isoG ⁻¹' k)\nhes : IsOpen (↑isoP ⁻¹' s)\n⊢ ContDiffOn 𝕜 n (fun x => g (↑isoP x.fst) (↑isoG x.snd)) ((↑isoP ⁻¹' s) ×ˢ univ)\n[PROOFSTEP]\napply hg.comp (isoP.prod isoG).contDiff.contDiffOn\n[GOAL]\ncase refine'_3\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf✝ f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL✝ : E →L[𝕜] E' →L[𝕜] F\nf : G → E\nn : ℕ∞\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 n (↿g) (s ×ˢ univ)\neG : Type (max uG uE' uF uP) := ULift G\nthis✝¹ : MeasurableSpace eG := borel eG\nthis✝ : BorelSpace eG\neE' : Type (max uE' uG uF uP) := ULift E'\neF : Type (max uF uG uE' uP) := ULift F\neP : Type (max uP uG uE' uF) := ULift P\nisoG : eG ≃L[𝕜] G\nisoE' : eE' ≃L[𝕜] E'\nisoF : eF ≃L[𝕜] F\nisoP : eP ≃L[𝕜] P\nef : eG → E := f ∘ ↑isoG\neμ : Measure eG := Measure.map (↑(ContinuousLinearEquiv.symm isoG)) μ\neg : eP → eG → eE' := fun ep ex => ↑(ContinuousLinearEquiv.symm isoE') (g (↑isoP ep) (↑isoG ex))\neL : E →L[𝕜] eE' →L[𝕜] eF :=\n  ContinuousLinearMap.comp (↑(ContinuousLinearEquiv.symm (ContinuousLinearEquiv.arrowCongr isoE' isoF))) L\nR : eP × eG → eF := fun q => ef ⋆[eL, q.snd] eg q.fst\nhek : IsCompact (↑isoG ⁻¹' k)\nhes : IsOpen (↑isoP ⁻¹' s)\n⊢ (↑isoP ⁻¹' s) ×ˢ univ ⊆ ↑(ContinuousLinearEquiv.prod isoP isoG) ⁻¹' s ×ˢ univ\n[PROOFSTEP]\nrintro ⟨p, x⟩ ⟨hp, -⟩\n[GOAL]\ncase refine'_3.mk.intro\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf✝ f' : G → E\ng✝ g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL✝ : E →L[𝕜] E' →L[𝕜] F\nf : G → E\nn : ℕ∞\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 n (↿g) (s ×ˢ univ)\neG : Type (max uG uE' uF uP) := ULift G\nthis✝¹ : MeasurableSpace eG := borel eG\nthis✝ : BorelSpace eG\neE' : Type (max uE' uG uF uP) := ULift E'\neF : Type (max uF uG uE' uP) := ULift F\neP : Type (max uP uG uE' uF) := ULift P\nisoG : eG ≃L[𝕜] G\nisoE' : eE' ≃L[𝕜] E'\nisoF : eF ≃L[𝕜] F\nisoP : eP ≃L[𝕜] P\nef : eG → E := f ∘ ↑isoG\neμ : Measure eG := Measure.map (↑(ContinuousLinearEquiv.symm isoG)) μ\neg : eP → eG → eE' := fun ep ex => ↑(ContinuousLinearEquiv.symm isoE') (g (↑isoP ep) (↑isoG ex))\neL : E →L[𝕜] eE' →L[𝕜] eF :=\n  ContinuousLinearMap.comp (↑(ContinuousLinearEquiv.symm (ContinuousLinearEquiv.arrowCongr isoE' isoF))) L\nR : eP × eG → eF := fun q => ef ⋆[eL, q.snd] eg q.fst\nhek : IsCompact (↑isoG ⁻¹' k)\nhes : IsOpen (↑isoP ⁻¹' s)\np : eP\nx : eG\nhp : (p, x).fst ∈ ↑isoP ⁻¹' s\n⊢ (p, x) ∈ ↑(ContinuousLinearEquiv.prod isoP isoG) ⁻¹' s ×ˢ univ\n[PROOFSTEP]\nsimpa only [mem_preimage, ContinuousLinearEquiv.prod_apply, prod_mk_mem_set_prod_eq, mem_univ, and_true_iff] using hp\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf✝ f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL✝ : E →L[𝕜] E' →L[𝕜] F\nf : G → E\nn : ℕ∞\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 n (↿g) (s ×ˢ univ)\neG : Type (max uG uE' uF uP) := ULift G\nthis✝¹ : MeasurableSpace eG := borel eG\nthis✝ : BorelSpace eG\neE' : Type (max uE' uG uF uP) := ULift E'\neF : Type (max uF uG uE' uP) := ULift F\neP : Type (max uP uG uE' uF) := ULift P\nisoG : eG ≃L[𝕜] G\nisoE' : eE' ≃L[𝕜] E'\nisoF : eF ≃L[𝕜] F\nisoP : eP ≃L[𝕜] P\nef : eG → E := f ∘ ↑isoG\neμ : Measure eG := Measure.map (↑(ContinuousLinearEquiv.symm isoG)) μ\neg : eP → eG → eE' := fun ep ex => ↑(ContinuousLinearEquiv.symm isoE') (g (↑isoP ep) (↑isoG ex))\neL : E →L[𝕜] eE' →L[𝕜] eF :=\n  ContinuousLinearMap.comp (↑(ContinuousLinearEquiv.symm (ContinuousLinearEquiv.arrowCongr isoE' isoF))) L\nR : eP × eG → eF := fun q => ef ⋆[eL, q.snd] eg q.fst\nR_contdiff : ContDiffOn 𝕜 n R ((↑isoP ⁻¹' s) ×ˢ univ)\n⊢ ContDiffOn 𝕜 n (fun q => f ⋆[L, q.snd] g q.fst) (s ×ˢ univ)\n[PROOFSTEP]\nhave A : ContDiffOn 𝕜 n (isoF ∘ R ∘ (isoP.prod isoG).symm) (s ×ˢ univ) :=\n  by\n  apply isoF.contDiff.comp_contDiffOn\n  apply R_contdiff.comp (ContinuousLinearEquiv.contDiff _).contDiffOn\n  rintro ⟨p, x⟩ ⟨hp, -⟩\n  simpa only [mem_preimage, mem_prod, mem_univ, and_true_iff, ContinuousLinearEquiv.prod_symm,\n    ContinuousLinearEquiv.prod_apply, ContinuousLinearEquiv.apply_symm_apply] using hp\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf✝ f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL✝ : E →L[𝕜] E' →L[𝕜] F\nf : G → E\nn : ℕ∞\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 n (↿g) (s ×ˢ univ)\neG : Type (max uG uE' uF uP) := ULift G\nthis✝¹ : MeasurableSpace eG := borel eG\nthis✝ : BorelSpace eG\neE' : Type (max uE' uG uF uP) := ULift E'\neF : Type (max uF uG uE' uP) := ULift F\neP : Type (max uP uG uE' uF) := ULift P\nisoG : eG ≃L[𝕜] G\nisoE' : eE' ≃L[𝕜] E'\nisoF : eF ≃L[𝕜] F\nisoP : eP ≃L[𝕜] P\nef : eG → E := f ∘ ↑isoG\neμ : Measure eG := Measure.map (↑(ContinuousLinearEquiv.symm isoG)) μ\neg : eP → eG → eE' := fun ep ex => ↑(ContinuousLinearEquiv.symm isoE') (g (↑isoP ep) (↑isoG ex))\neL : E →L[𝕜] eE' →L[𝕜] eF :=\n  ContinuousLinearMap.comp (↑(ContinuousLinearEquiv.symm (ContinuousLinearEquiv.arrowCongr isoE' isoF))) L\nR : eP × eG → eF := fun q => ef ⋆[eL, q.snd] eg q.fst\nR_contdiff : ContDiffOn 𝕜 n R ((↑isoP ⁻¹' s) ×ˢ univ)\n⊢ ContDiffOn 𝕜 n (↑isoF ∘ R ∘ ↑(ContinuousLinearEquiv.symm (ContinuousLinearEquiv.prod isoP isoG))) (s ×ˢ univ)\n[PROOFSTEP]\napply isoF.contDiff.comp_contDiffOn\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf✝ f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL✝ : E →L[𝕜] E' →L[𝕜] F\nf : G → E\nn : ℕ∞\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 n (↿g) (s ×ˢ univ)\neG : Type (max uG uE' uF uP) := ULift G\nthis✝¹ : MeasurableSpace eG := borel eG\nthis✝ : BorelSpace eG\neE' : Type (max uE' uG uF uP) := ULift E'\neF : Type (max uF uG uE' uP) := ULift F\neP : Type (max uP uG uE' uF) := ULift P\nisoG : eG ≃L[𝕜] G\nisoE' : eE' ≃L[𝕜] E'\nisoF : eF ≃L[𝕜] F\nisoP : eP ≃L[𝕜] P\nef : eG → E := f ∘ ↑isoG\neμ : Measure eG := Measure.map (↑(ContinuousLinearEquiv.symm isoG)) μ\neg : eP → eG → eE' := fun ep ex => ↑(ContinuousLinearEquiv.symm isoE') (g (↑isoP ep) (↑isoG ex))\neL : E →L[𝕜] eE' →L[𝕜] eF :=\n  ContinuousLinearMap.comp (↑(ContinuousLinearEquiv.symm (ContinuousLinearEquiv.arrowCongr isoE' isoF))) L\nR : eP × eG → eF := fun q => ef ⋆[eL, q.snd] eg q.fst\nR_contdiff : ContDiffOn 𝕜 n R ((↑isoP ⁻¹' s) ×ˢ univ)\n⊢ ContDiffOn 𝕜 n (R ∘ ↑(ContinuousLinearEquiv.symm (ContinuousLinearEquiv.prod isoP isoG))) (s ×ˢ univ)\n[PROOFSTEP]\napply R_contdiff.comp (ContinuousLinearEquiv.contDiff _).contDiffOn\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf✝ f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL✝ : E →L[𝕜] E' →L[𝕜] F\nf : G → E\nn : ℕ∞\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 n (↿g) (s ×ˢ univ)\neG : Type (max uG uE' uF uP) := ULift G\nthis✝¹ : MeasurableSpace eG := borel eG\nthis✝ : BorelSpace eG\neE' : Type (max uE' uG uF uP) := ULift E'\neF : Type (max uF uG uE' uP) := ULift F\neP : Type (max uP uG uE' uF) := ULift P\nisoG : eG ≃L[𝕜] G\nisoE' : eE' ≃L[𝕜] E'\nisoF : eF ≃L[𝕜] F\nisoP : eP ≃L[𝕜] P\nef : eG → E := f ∘ ↑isoG\neμ : Measure eG := Measure.map (↑(ContinuousLinearEquiv.symm isoG)) μ\neg : eP → eG → eE' := fun ep ex => ↑(ContinuousLinearEquiv.symm isoE') (g (↑isoP ep) (↑isoG ex))\neL : E →L[𝕜] eE' →L[𝕜] eF :=\n  ContinuousLinearMap.comp (↑(ContinuousLinearEquiv.symm (ContinuousLinearEquiv.arrowCongr isoE' isoF))) L\nR : eP × eG → eF := fun q => ef ⋆[eL, q.snd] eg q.fst\nR_contdiff : ContDiffOn 𝕜 n R ((↑isoP ⁻¹' s) ×ˢ univ)\n⊢ s ×ˢ univ ⊆ ↑(ContinuousLinearEquiv.symm (ContinuousLinearEquiv.prod isoP isoG)) ⁻¹' (↑isoP ⁻¹' s) ×ˢ univ\n[PROOFSTEP]\nrintro ⟨p, x⟩ ⟨hp, -⟩\n[GOAL]\ncase mk.intro\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf✝ f' : G → E\ng✝ g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL✝ : E →L[𝕜] E' →L[𝕜] F\nf : G → E\nn : ℕ∞\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 n (↿g) (s ×ˢ univ)\neG : Type (max uG uE' uF uP) := ULift G\nthis✝¹ : MeasurableSpace eG := borel eG\nthis✝ : BorelSpace eG\neE' : Type (max uE' uG uF uP) := ULift E'\neF : Type (max uF uG uE' uP) := ULift F\neP : Type (max uP uG uE' uF) := ULift P\nisoG : eG ≃L[𝕜] G\nisoE' : eE' ≃L[𝕜] E'\nisoF : eF ≃L[𝕜] F\nisoP : eP ≃L[𝕜] P\nef : eG → E := f ∘ ↑isoG\neμ : Measure eG := Measure.map (↑(ContinuousLinearEquiv.symm isoG)) μ\neg : eP → eG → eE' := fun ep ex => ↑(ContinuousLinearEquiv.symm isoE') (g (↑isoP ep) (↑isoG ex))\neL : E →L[𝕜] eE' →L[𝕜] eF :=\n  ContinuousLinearMap.comp (↑(ContinuousLinearEquiv.symm (ContinuousLinearEquiv.arrowCongr isoE' isoF))) L\nR : eP × eG → eF := fun q => ef ⋆[eL, q.snd] eg q.fst\nR_contdiff : ContDiffOn 𝕜 n R ((↑isoP ⁻¹' s) ×ˢ univ)\np : P\nx : G\nhp : (p, x).fst ∈ s\n⊢ (p, x) ∈ ↑(ContinuousLinearEquiv.symm (ContinuousLinearEquiv.prod isoP isoG)) ⁻¹' (↑isoP ⁻¹' s) ×ˢ univ\n[PROOFSTEP]\nsimpa only [mem_preimage, mem_prod, mem_univ, and_true_iff, ContinuousLinearEquiv.prod_symm,\n  ContinuousLinearEquiv.prod_apply, ContinuousLinearEquiv.apply_symm_apply] using hp\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf✝ f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL✝ : E →L[𝕜] E' →L[𝕜] F\nf : G → E\nn : ℕ∞\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 n (↿g) (s ×ˢ univ)\neG : Type (max uG uE' uF uP) := ULift G\nthis✝¹ : MeasurableSpace eG := borel eG\nthis✝ : BorelSpace eG\neE' : Type (max uE' uG uF uP) := ULift E'\neF : Type (max uF uG uE' uP) := ULift F\neP : Type (max uP uG uE' uF) := ULift P\nisoG : eG ≃L[𝕜] G\nisoE' : eE' ≃L[𝕜] E'\nisoF : eF ≃L[𝕜] F\nisoP : eP ≃L[𝕜] P\nef : eG → E := f ∘ ↑isoG\neμ : Measure eG := Measure.map (↑(ContinuousLinearEquiv.symm isoG)) μ\neg : eP → eG → eE' := fun ep ex => ↑(ContinuousLinearEquiv.symm isoE') (g (↑isoP ep) (↑isoG ex))\neL : E →L[𝕜] eE' →L[𝕜] eF :=\n  ContinuousLinearMap.comp (↑(ContinuousLinearEquiv.symm (ContinuousLinearEquiv.arrowCongr isoE' isoF))) L\nR : eP × eG → eF := fun q => ef ⋆[eL, q.snd] eg q.fst\nR_contdiff : ContDiffOn 𝕜 n R ((↑isoP ⁻¹' s) ×ˢ univ)\nA : ContDiffOn 𝕜 n (↑isoF ∘ R ∘ ↑(ContinuousLinearEquiv.symm (ContinuousLinearEquiv.prod isoP isoG))) (s ×ˢ univ)\n⊢ ContDiffOn 𝕜 n (fun q => f ⋆[L, q.snd] g q.fst) (s ×ˢ univ)\n[PROOFSTEP]\nhave : isoF ∘ R ∘ (isoP.prod isoG).symm = fun q : P × G => (f ⋆[L, μ] g q.1) q.2 :=\n  by\n  apply funext\n  rintro ⟨p, x⟩\n  simp only [LinearIsometryEquiv.coe_coe, (· ∘ ·), ContinuousLinearEquiv.prod_symm, ContinuousLinearEquiv.prod_apply]\n  simp only [convolution, coe_comp', ContinuousLinearEquiv.coe_coe, (· ∘ ·)]\n  rw [ClosedEmbedding.integral_map, ← isoF.integral_comp_comm]\n  swap; · exact isoG.symm.toHomeomorph.closedEmbedding\n  congr 1\n  ext1 a\n  simp only [(· ∘ ·), ContinuousLinearEquiv.apply_symm_apply, coe_comp', ContinuousLinearEquiv.prod_apply,\n    ContinuousLinearEquiv.map_sub, ContinuousLinearEquiv.arrowCongr, ContinuousLinearEquiv.arrowCongrSL_symm_apply,\n    ContinuousLinearEquiv.coe_coe, Function.comp_apply, ContinuousLinearEquiv.apply_symm_apply]\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf✝ f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL✝ : E →L[𝕜] E' →L[𝕜] F\nf : G → E\nn : ℕ∞\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 n (↿g) (s ×ˢ univ)\neG : Type (max uG uE' uF uP) := ULift G\nthis✝¹ : MeasurableSpace eG := borel eG\nthis✝ : BorelSpace eG\neE' : Type (max uE' uG uF uP) := ULift E'\neF : Type (max uF uG uE' uP) := ULift F\neP : Type (max uP uG uE' uF) := ULift P\nisoG : eG ≃L[𝕜] G\nisoE' : eE' ≃L[𝕜] E'\nisoF : eF ≃L[𝕜] F\nisoP : eP ≃L[𝕜] P\nef : eG → E := f ∘ ↑isoG\neμ : Measure eG := Measure.map (↑(ContinuousLinearEquiv.symm isoG)) μ\neg : eP → eG → eE' := fun ep ex => ↑(ContinuousLinearEquiv.symm isoE') (g (↑isoP ep) (↑isoG ex))\neL : E →L[𝕜] eE' →L[𝕜] eF :=\n  ContinuousLinearMap.comp (↑(ContinuousLinearEquiv.symm (ContinuousLinearEquiv.arrowCongr isoE' isoF))) L\nR : eP × eG → eF := fun q => ef ⋆[eL, q.snd] eg q.fst\nR_contdiff : ContDiffOn 𝕜 n R ((↑isoP ⁻¹' s) ×ˢ univ)\nA : ContDiffOn 𝕜 n (↑isoF ∘ R ∘ ↑(ContinuousLinearEquiv.symm (ContinuousLinearEquiv.prod isoP isoG))) (s ×ˢ univ)\n⊢ ↑isoF ∘ R ∘ ↑(ContinuousLinearEquiv.symm (ContinuousLinearEquiv.prod isoP isoG)) = fun q => f ⋆[L, q.snd] g q.fst\n[PROOFSTEP]\napply funext\n[GOAL]\ncase h\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf✝ f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL✝ : E →L[𝕜] E' →L[𝕜] F\nf : G → E\nn : ℕ∞\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 n (↿g) (s ×ˢ univ)\neG : Type (max uG uE' uF uP) := ULift G\nthis✝¹ : MeasurableSpace eG := borel eG\nthis✝ : BorelSpace eG\neE' : Type (max uE' uG uF uP) := ULift E'\neF : Type (max uF uG uE' uP) := ULift F\neP : Type (max uP uG uE' uF) := ULift P\nisoG : eG ≃L[𝕜] G\nisoE' : eE' ≃L[𝕜] E'\nisoF : eF ≃L[𝕜] F\nisoP : eP ≃L[𝕜] P\nef : eG → E := f ∘ ↑isoG\neμ : Measure eG := Measure.map (↑(ContinuousLinearEquiv.symm isoG)) μ\neg : eP → eG → eE' := fun ep ex => ↑(ContinuousLinearEquiv.symm isoE') (g (↑isoP ep) (↑isoG ex))\neL : E →L[𝕜] eE' →L[𝕜] eF :=\n  ContinuousLinearMap.comp (↑(ContinuousLinearEquiv.symm (ContinuousLinearEquiv.arrowCongr isoE' isoF))) L\nR : eP × eG → eF := fun q => ef ⋆[eL, q.snd] eg q.fst\nR_contdiff : ContDiffOn 𝕜 n R ((↑isoP ⁻¹' s) ×ˢ univ)\nA : ContDiffOn 𝕜 n (↑isoF ∘ R ∘ ↑(ContinuousLinearEquiv.symm (ContinuousLinearEquiv.prod isoP isoG))) (s ×ˢ univ)\n⊢ ∀ (x : P × G),\n    (↑isoF ∘ R ∘ ↑(ContinuousLinearEquiv.symm (ContinuousLinearEquiv.prod isoP isoG))) x = f ⋆[L, x.snd] g x.fst\n[PROOFSTEP]\nrintro ⟨p, x⟩\n[GOAL]\ncase h.mk\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf✝ f' : G → E\ng✝ g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL✝ : E →L[𝕜] E' →L[𝕜] F\nf : G → E\nn : ℕ∞\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 n (↿g) (s ×ˢ univ)\neG : Type (max uG uE' uF uP) := ULift G\nthis✝¹ : MeasurableSpace eG := borel eG\nthis✝ : BorelSpace eG\neE' : Type (max uE' uG uF uP) := ULift E'\neF : Type (max uF uG uE' uP) := ULift F\neP : Type (max uP uG uE' uF) := ULift P\nisoG : eG ≃L[𝕜] G\nisoE' : eE' ≃L[𝕜] E'\nisoF : eF ≃L[𝕜] F\nisoP : eP ≃L[𝕜] P\nef : eG → E := f ∘ ↑isoG\neμ : Measure eG := Measure.map (↑(ContinuousLinearEquiv.symm isoG)) μ\neg : eP → eG → eE' := fun ep ex => ↑(ContinuousLinearEquiv.symm isoE') (g (↑isoP ep) (↑isoG ex))\neL : E →L[𝕜] eE' →L[𝕜] eF :=\n  ContinuousLinearMap.comp (↑(ContinuousLinearEquiv.symm (ContinuousLinearEquiv.arrowCongr isoE' isoF))) L\nR : eP × eG → eF := fun q => ef ⋆[eL, q.snd] eg q.fst\nR_contdiff : ContDiffOn 𝕜 n R ((↑isoP ⁻¹' s) ×ˢ univ)\nA : ContDiffOn 𝕜 n (↑isoF ∘ R ∘ ↑(ContinuousLinearEquiv.symm (ContinuousLinearEquiv.prod isoP isoG))) (s ×ˢ univ)\np : P\nx : G\n⊢ (↑isoF ∘ R ∘ ↑(ContinuousLinearEquiv.symm (ContinuousLinearEquiv.prod isoP isoG))) (p, x) =\n    f ⋆[L, (p, x).snd] g (p, x).fst\n[PROOFSTEP]\nsimp only [LinearIsometryEquiv.coe_coe, (· ∘ ·), ContinuousLinearEquiv.prod_symm, ContinuousLinearEquiv.prod_apply]\n[GOAL]\ncase h.mk\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf✝ f' : G → E\ng✝ g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL✝ : E →L[𝕜] E' →L[𝕜] F\nf : G → E\nn : ℕ∞\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 n (↿g) (s ×ˢ univ)\neG : Type (max uG uE' uF uP) := ULift G\nthis✝¹ : MeasurableSpace eG := borel eG\nthis✝ : BorelSpace eG\neE' : Type (max uE' uG uF uP) := ULift E'\neF : Type (max uF uG uE' uP) := ULift F\neP : Type (max uP uG uE' uF) := ULift P\nisoG : eG ≃L[𝕜] G\nisoE' : eE' ≃L[𝕜] E'\nisoF : eF ≃L[𝕜] F\nisoP : eP ≃L[𝕜] P\nef : eG → E := f ∘ ↑isoG\neμ : Measure eG := Measure.map (↑(ContinuousLinearEquiv.symm isoG)) μ\neg : eP → eG → eE' := fun ep ex => ↑(ContinuousLinearEquiv.symm isoE') (g (↑isoP ep) (↑isoG ex))\neL : E →L[𝕜] eE' →L[𝕜] eF :=\n  ContinuousLinearMap.comp (↑(ContinuousLinearEquiv.symm (ContinuousLinearEquiv.arrowCongr isoE' isoF))) L\nR : eP × eG → eF := fun q => ef ⋆[eL, q.snd] eg q.fst\nR_contdiff : ContDiffOn 𝕜 n R ((↑isoP ⁻¹' s) ×ˢ univ)\nA : ContDiffOn 𝕜 n (↑isoF ∘ R ∘ ↑(ContinuousLinearEquiv.symm (ContinuousLinearEquiv.prod isoP isoG))) (s ×ˢ univ)\np : P\nx : G\n⊢ ↑isoF\n      ((fun x =>\n          f\n            (↑isoG\n              x)) ⋆[ContinuousLinearMap.comp\n          (↑(ContinuousLinearEquiv.symm (ContinuousLinearEquiv.arrowCongr isoE' isoF))) L,\n        ↑(ContinuousLinearEquiv.symm isoG) x] fun ex =>\n        ↑(ContinuousLinearEquiv.symm isoE') (g (↑isoP (↑(ContinuousLinearEquiv.symm isoP) p)) (↑isoG ex))) =\n    f ⋆[L, x] g p\n[PROOFSTEP]\nsimp only [convolution, coe_comp', ContinuousLinearEquiv.coe_coe, (· ∘ ·)]\n[GOAL]\ncase h.mk\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf✝ f' : G → E\ng✝ g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL✝ : E →L[𝕜] E' →L[𝕜] F\nf : G → E\nn : ℕ∞\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 n (↿g) (s ×ˢ univ)\neG : Type (max uG uE' uF uP) := ULift G\nthis✝¹ : MeasurableSpace eG := borel eG\nthis✝ : BorelSpace eG\neE' : Type (max uE' uG uF uP) := ULift E'\neF : Type (max uF uG uE' uP) := ULift F\neP : Type (max uP uG uE' uF) := ULift P\nisoG : eG ≃L[𝕜] G\nisoE' : eE' ≃L[𝕜] E'\nisoF : eF ≃L[𝕜] F\nisoP : eP ≃L[𝕜] P\nef : eG → E := f ∘ ↑isoG\neμ : Measure eG := Measure.map (↑(ContinuousLinearEquiv.symm isoG)) μ\neg : eP → eG → eE' := fun ep ex => ↑(ContinuousLinearEquiv.symm isoE') (g (↑isoP ep) (↑isoG ex))\neL : E →L[𝕜] eE' →L[𝕜] eF :=\n  ContinuousLinearMap.comp (↑(ContinuousLinearEquiv.symm (ContinuousLinearEquiv.arrowCongr isoE' isoF))) L\nR : eP × eG → eF := fun q => ef ⋆[eL, q.snd] eg q.fst\nR_contdiff : ContDiffOn 𝕜 n R ((↑isoP ⁻¹' s) ×ˢ univ)\nA : ContDiffOn 𝕜 n (↑isoF ∘ R ∘ ↑(ContinuousLinearEquiv.symm (ContinuousLinearEquiv.prod isoP isoG))) (s ×ˢ univ)\np : P\nx : G\n⊢ ↑isoF\n      (∫ (t : ULift G),\n        ↑(↑(ContinuousLinearEquiv.symm (ContinuousLinearEquiv.arrowCongr isoE' isoF)) (↑L (f (↑isoG t))))\n          (↑(ContinuousLinearEquiv.symm isoE')\n            (g (↑isoP (↑(ContinuousLinearEquiv.symm isoP) p))\n              (↑isoG\n                (↑(ContinuousLinearEquiv.symm isoG) x - t)))) ∂Measure.map (↑(ContinuousLinearEquiv.symm isoG)) μ) =\n    ∫ (t : G), ↑(↑L (f t)) (g p (x - t)) ∂μ\n[PROOFSTEP]\nrw [ClosedEmbedding.integral_map, ← isoF.integral_comp_comm]\n[GOAL]\ncase h.mk\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf✝ f' : G → E\ng✝ g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL✝ : E →L[𝕜] E' →L[𝕜] F\nf : G → E\nn : ℕ∞\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 n (↿g) (s ×ˢ univ)\neG : Type (max uG uE' uF uP) := ULift G\nthis✝¹ : MeasurableSpace eG := borel eG\nthis✝ : BorelSpace eG\neE' : Type (max uE' uG uF uP) := ULift E'\neF : Type (max uF uG uE' uP) := ULift F\neP : Type (max uP uG uE' uF) := ULift P\nisoG : eG ≃L[𝕜] G\nisoE' : eE' ≃L[𝕜] E'\nisoF : eF ≃L[𝕜] F\nisoP : eP ≃L[𝕜] P\nef : eG → E := f ∘ ↑isoG\neμ : Measure eG := Measure.map (↑(ContinuousLinearEquiv.symm isoG)) μ\neg : eP → eG → eE' := fun ep ex => ↑(ContinuousLinearEquiv.symm isoE') (g (↑isoP ep) (↑isoG ex))\neL : E →L[𝕜] eE' →L[𝕜] eF :=\n  ContinuousLinearMap.comp (↑(ContinuousLinearEquiv.symm (ContinuousLinearEquiv.arrowCongr isoE' isoF))) L\nR : eP × eG → eF := fun q => ef ⋆[eL, q.snd] eg q.fst\nR_contdiff : ContDiffOn 𝕜 n R ((↑isoP ⁻¹' s) ×ˢ univ)\nA : ContDiffOn 𝕜 n (↑isoF ∘ R ∘ ↑(ContinuousLinearEquiv.symm (ContinuousLinearEquiv.prod isoP isoG))) (s ×ˢ univ)\np : P\nx : G\n⊢ ∫ (a : G),\n      ↑isoF\n        (↑(↑(ContinuousLinearEquiv.symm (ContinuousLinearEquiv.arrowCongr isoE' isoF))\n              (↑L (f (↑isoG (↑(ContinuousLinearEquiv.symm isoG) a)))))\n          (↑(ContinuousLinearEquiv.symm isoE')\n            (g (↑isoP (↑(ContinuousLinearEquiv.symm isoP) p))\n              (↑isoG (↑(ContinuousLinearEquiv.symm isoG) x - ↑(ContinuousLinearEquiv.symm isoG) a))))) ∂μ =\n    ∫ (t : G), ↑(↑L (f t)) (g p (x - t)) ∂μ\ncase h.mk.hφ\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf✝ f' : G → E\ng✝ g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL✝ : E →L[𝕜] E' →L[𝕜] F\nf : G → E\nn : ℕ∞\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 n (↿g) (s ×ˢ univ)\neG : Type (max uG uE' uF uP) := ULift G\nthis✝¹ : MeasurableSpace eG := borel eG\nthis✝ : BorelSpace eG\neE' : Type (max uE' uG uF uP) := ULift E'\neF : Type (max uF uG uE' uP) := ULift F\neP : Type (max uP uG uE' uF) := ULift P\nisoG : eG ≃L[𝕜] G\nisoE' : eE' ≃L[𝕜] E'\nisoF : eF ≃L[𝕜] F\nisoP : eP ≃L[𝕜] P\nef : eG → E := f ∘ ↑isoG\neμ : Measure eG := Measure.map (↑(ContinuousLinearEquiv.symm isoG)) μ\neg : eP → eG → eE' := fun ep ex => ↑(ContinuousLinearEquiv.symm isoE') (g (↑isoP ep) (↑isoG ex))\neL : E →L[𝕜] eE' →L[𝕜] eF :=\n  ContinuousLinearMap.comp (↑(ContinuousLinearEquiv.symm (ContinuousLinearEquiv.arrowCongr isoE' isoF))) L\nR : eP × eG → eF := fun q => ef ⋆[eL, q.snd] eg q.fst\nR_contdiff : ContDiffOn 𝕜 n R ((↑isoP ⁻¹' s) ×ˢ univ)\nA : ContDiffOn 𝕜 n (↑isoF ∘ R ∘ ↑(ContinuousLinearEquiv.symm (ContinuousLinearEquiv.prod isoP isoG))) (s ×ˢ univ)\np : P\nx : G\n⊢ ClosedEmbedding ↑(ContinuousLinearEquiv.symm isoG)\n[PROOFSTEP]\nswap\n[GOAL]\ncase h.mk.hφ\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf✝ f' : G → E\ng✝ g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL✝ : E →L[𝕜] E' →L[𝕜] F\nf : G → E\nn : ℕ∞\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 n (↿g) (s ×ˢ univ)\neG : Type (max uG uE' uF uP) := ULift G\nthis✝¹ : MeasurableSpace eG := borel eG\nthis✝ : BorelSpace eG\neE' : Type (max uE' uG uF uP) := ULift E'\neF : Type (max uF uG uE' uP) := ULift F\neP : Type (max uP uG uE' uF) := ULift P\nisoG : eG ≃L[𝕜] G\nisoE' : eE' ≃L[𝕜] E'\nisoF : eF ≃L[𝕜] F\nisoP : eP ≃L[𝕜] P\nef : eG → E := f ∘ ↑isoG\neμ : Measure eG := Measure.map (↑(ContinuousLinearEquiv.symm isoG)) μ\neg : eP → eG → eE' := fun ep ex => ↑(ContinuousLinearEquiv.symm isoE') (g (↑isoP ep) (↑isoG ex))\neL : E →L[𝕜] eE' →L[𝕜] eF :=\n  ContinuousLinearMap.comp (↑(ContinuousLinearEquiv.symm (ContinuousLinearEquiv.arrowCongr isoE' isoF))) L\nR : eP × eG → eF := fun q => ef ⋆[eL, q.snd] eg q.fst\nR_contdiff : ContDiffOn 𝕜 n R ((↑isoP ⁻¹' s) ×ˢ univ)\nA : ContDiffOn 𝕜 n (↑isoF ∘ R ∘ ↑(ContinuousLinearEquiv.symm (ContinuousLinearEquiv.prod isoP isoG))) (s ×ˢ univ)\np : P\nx : G\n⊢ ClosedEmbedding ↑(ContinuousLinearEquiv.symm isoG)\n[PROOFSTEP]\nexact isoG.symm.toHomeomorph.closedEmbedding\n[GOAL]\ncase h.mk\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf✝ f' : G → E\ng✝ g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL✝ : E →L[𝕜] E' →L[𝕜] F\nf : G → E\nn : ℕ∞\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 n (↿g) (s ×ˢ univ)\neG : Type (max uG uE' uF uP) := ULift G\nthis✝¹ : MeasurableSpace eG := borel eG\nthis✝ : BorelSpace eG\neE' : Type (max uE' uG uF uP) := ULift E'\neF : Type (max uF uG uE' uP) := ULift F\neP : Type (max uP uG uE' uF) := ULift P\nisoG : eG ≃L[𝕜] G\nisoE' : eE' ≃L[𝕜] E'\nisoF : eF ≃L[𝕜] F\nisoP : eP ≃L[𝕜] P\nef : eG → E := f ∘ ↑isoG\neμ : Measure eG := Measure.map (↑(ContinuousLinearEquiv.symm isoG)) μ\neg : eP → eG → eE' := fun ep ex => ↑(ContinuousLinearEquiv.symm isoE') (g (↑isoP ep) (↑isoG ex))\neL : E →L[𝕜] eE' →L[𝕜] eF :=\n  ContinuousLinearMap.comp (↑(ContinuousLinearEquiv.symm (ContinuousLinearEquiv.arrowCongr isoE' isoF))) L\nR : eP × eG → eF := fun q => ef ⋆[eL, q.snd] eg q.fst\nR_contdiff : ContDiffOn 𝕜 n R ((↑isoP ⁻¹' s) ×ˢ univ)\nA : ContDiffOn 𝕜 n (↑isoF ∘ R ∘ ↑(ContinuousLinearEquiv.symm (ContinuousLinearEquiv.prod isoP isoG))) (s ×ˢ univ)\np : P\nx : G\n⊢ ∫ (a : G),\n      ↑isoF\n        (↑(↑(ContinuousLinearEquiv.symm (ContinuousLinearEquiv.arrowCongr isoE' isoF))\n              (↑L (f (↑isoG (↑(ContinuousLinearEquiv.symm isoG) a)))))\n          (↑(ContinuousLinearEquiv.symm isoE')\n            (g (↑isoP (↑(ContinuousLinearEquiv.symm isoP) p))\n              (↑isoG (↑(ContinuousLinearEquiv.symm isoG) x - ↑(ContinuousLinearEquiv.symm isoG) a))))) ∂μ =\n    ∫ (t : G), ↑(↑L (f t)) (g p (x - t)) ∂μ\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase h.mk.e_f\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf✝ f' : G → E\ng✝ g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL✝ : E →L[𝕜] E' →L[𝕜] F\nf : G → E\nn : ℕ∞\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 n (↿g) (s ×ˢ univ)\neG : Type (max uG uE' uF uP) := ULift G\nthis✝¹ : MeasurableSpace eG := borel eG\nthis✝ : BorelSpace eG\neE' : Type (max uE' uG uF uP) := ULift E'\neF : Type (max uF uG uE' uP) := ULift F\neP : Type (max uP uG uE' uF) := ULift P\nisoG : eG ≃L[𝕜] G\nisoE' : eE' ≃L[𝕜] E'\nisoF : eF ≃L[𝕜] F\nisoP : eP ≃L[𝕜] P\nef : eG → E := f ∘ ↑isoG\neμ : Measure eG := Measure.map (↑(ContinuousLinearEquiv.symm isoG)) μ\neg : eP → eG → eE' := fun ep ex => ↑(ContinuousLinearEquiv.symm isoE') (g (↑isoP ep) (↑isoG ex))\neL : E →L[𝕜] eE' →L[𝕜] eF :=\n  ContinuousLinearMap.comp (↑(ContinuousLinearEquiv.symm (ContinuousLinearEquiv.arrowCongr isoE' isoF))) L\nR : eP × eG → eF := fun q => ef ⋆[eL, q.snd] eg q.fst\nR_contdiff : ContDiffOn 𝕜 n R ((↑isoP ⁻¹' s) ×ˢ univ)\nA : ContDiffOn 𝕜 n (↑isoF ∘ R ∘ ↑(ContinuousLinearEquiv.symm (ContinuousLinearEquiv.prod isoP isoG))) (s ×ˢ univ)\np : P\nx : G\n⊢ (fun a =>\n      ↑isoF\n        (↑(↑(ContinuousLinearEquiv.symm (ContinuousLinearEquiv.arrowCongr isoE' isoF))\n              (↑L (f (↑isoG (↑(ContinuousLinearEquiv.symm isoG) a)))))\n          (↑(ContinuousLinearEquiv.symm isoE')\n            (g (↑isoP (↑(ContinuousLinearEquiv.symm isoP) p))\n              (↑isoG (↑(ContinuousLinearEquiv.symm isoG) x - ↑(ContinuousLinearEquiv.symm isoG) a)))))) =\n    fun t => ↑(↑L (f t)) (g p (x - t))\n[PROOFSTEP]\next1 a\n[GOAL]\ncase h.mk.e_f.h\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf✝ f' : G → E\ng✝ g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL✝ : E →L[𝕜] E' →L[𝕜] F\nf : G → E\nn : ℕ∞\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 n (↿g) (s ×ˢ univ)\neG : Type (max uG uE' uF uP) := ULift G\nthis✝¹ : MeasurableSpace eG := borel eG\nthis✝ : BorelSpace eG\neE' : Type (max uE' uG uF uP) := ULift E'\neF : Type (max uF uG uE' uP) := ULift F\neP : Type (max uP uG uE' uF) := ULift P\nisoG : eG ≃L[𝕜] G\nisoE' : eE' ≃L[𝕜] E'\nisoF : eF ≃L[𝕜] F\nisoP : eP ≃L[𝕜] P\nef : eG → E := f ∘ ↑isoG\neμ : Measure eG := Measure.map (↑(ContinuousLinearEquiv.symm isoG)) μ\neg : eP → eG → eE' := fun ep ex => ↑(ContinuousLinearEquiv.symm isoE') (g (↑isoP ep) (↑isoG ex))\neL : E →L[𝕜] eE' →L[𝕜] eF :=\n  ContinuousLinearMap.comp (↑(ContinuousLinearEquiv.symm (ContinuousLinearEquiv.arrowCongr isoE' isoF))) L\nR : eP × eG → eF := fun q => ef ⋆[eL, q.snd] eg q.fst\nR_contdiff : ContDiffOn 𝕜 n R ((↑isoP ⁻¹' s) ×ˢ univ)\nA : ContDiffOn 𝕜 n (↑isoF ∘ R ∘ ↑(ContinuousLinearEquiv.symm (ContinuousLinearEquiv.prod isoP isoG))) (s ×ˢ univ)\np : P\nx a : G\n⊢ ↑isoF\n      (↑(↑(ContinuousLinearEquiv.symm (ContinuousLinearEquiv.arrowCongr isoE' isoF))\n            (↑L (f (↑isoG (↑(ContinuousLinearEquiv.symm isoG) a)))))\n        (↑(ContinuousLinearEquiv.symm isoE')\n          (g (↑isoP (↑(ContinuousLinearEquiv.symm isoP) p))\n            (↑isoG (↑(ContinuousLinearEquiv.symm isoG) x - ↑(ContinuousLinearEquiv.symm isoG) a))))) =\n    ↑(↑L (f a)) (g p (x - a))\n[PROOFSTEP]\nsimp only [(· ∘ ·), ContinuousLinearEquiv.apply_symm_apply, coe_comp', ContinuousLinearEquiv.prod_apply,\n  ContinuousLinearEquiv.map_sub, ContinuousLinearEquiv.arrowCongr, ContinuousLinearEquiv.arrowCongrSL_symm_apply,\n  ContinuousLinearEquiv.coe_coe, Function.comp_apply, ContinuousLinearEquiv.apply_symm_apply]\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf✝ f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL✝ : E →L[𝕜] E' →L[𝕜] F\nf : G → E\nn : ℕ∞\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 n (↿g) (s ×ˢ univ)\neG : Type (max uG uE' uF uP) := ULift G\nthis✝¹ : MeasurableSpace eG := borel eG\nthis✝ : BorelSpace eG\neE' : Type (max uE' uG uF uP) := ULift E'\neF : Type (max uF uG uE' uP) := ULift F\neP : Type (max uP uG uE' uF) := ULift P\nisoG : eG ≃L[𝕜] G\nisoE' : eE' ≃L[𝕜] E'\nisoF : eF ≃L[𝕜] F\nisoP : eP ≃L[𝕜] P\nef : eG → E := f ∘ ↑isoG\neμ : Measure eG := Measure.map (↑(ContinuousLinearEquiv.symm isoG)) μ\neg : eP → eG → eE' := fun ep ex => ↑(ContinuousLinearEquiv.symm isoE') (g (↑isoP ep) (↑isoG ex))\neL : E →L[𝕜] eE' →L[𝕜] eF :=\n  ContinuousLinearMap.comp (↑(ContinuousLinearEquiv.symm (ContinuousLinearEquiv.arrowCongr isoE' isoF))) L\nR : eP × eG → eF := fun q => ef ⋆[eL, q.snd] eg q.fst\nR_contdiff : ContDiffOn 𝕜 n R ((↑isoP ⁻¹' s) ×ˢ univ)\nA : ContDiffOn 𝕜 n (↑isoF ∘ R ∘ ↑(ContinuousLinearEquiv.symm (ContinuousLinearEquiv.prod isoP isoG))) (s ×ˢ univ)\nthis : ↑isoF ∘ R ∘ ↑(ContinuousLinearEquiv.symm (ContinuousLinearEquiv.prod isoP isoG)) = fun q => f ⋆[L, q.snd] g q.fst\n⊢ ContDiffOn 𝕜 n (fun q => f ⋆[L, q.snd] g q.fst) (s ×ˢ univ)\n[PROOFSTEP]\nsimp_rw [this] at A \n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf✝ f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL✝ : E →L[𝕜] E' →L[𝕜] F\nf : G → E\nn : ℕ∞\nL : E →L[𝕜] E' →L[𝕜] F\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 n (↿g) (s ×ˢ univ)\neG : Type (max uG uE' uF uP) := ULift G\nthis✝¹ : MeasurableSpace eG := borel eG\nthis✝ : BorelSpace eG\neE' : Type (max uE' uG uF uP) := ULift E'\neF : Type (max uF uG uE' uP) := ULift F\neP : Type (max uP uG uE' uF) := ULift P\nisoG : eG ≃L[𝕜] G\nisoE' : eE' ≃L[𝕜] E'\nisoF : eF ≃L[𝕜] F\nisoP : eP ≃L[𝕜] P\nef : eG → E := f ∘ ↑isoG\neμ : Measure eG := Measure.map (↑(ContinuousLinearEquiv.symm isoG)) μ\neg : eP → eG → eE' := fun ep ex => ↑(ContinuousLinearEquiv.symm isoE') (g (↑isoP ep) (↑isoG ex))\neL : E →L[𝕜] eE' →L[𝕜] eF :=\n  ContinuousLinearMap.comp (↑(ContinuousLinearEquiv.symm (ContinuousLinearEquiv.arrowCongr isoE' isoF))) L\nR : eP × eG → eF := fun q => ef ⋆[eL, q.snd] eg q.fst\nR_contdiff : ContDiffOn 𝕜 n R ((↑isoP ⁻¹' s) ×ˢ univ)\nthis : ↑isoF ∘ R ∘ ↑(ContinuousLinearEquiv.symm (ContinuousLinearEquiv.prod isoP isoG)) = fun q => f ⋆[L, q.snd] g q.fst\nA : ContDiffOn 𝕜 n (fun q => f ⋆[L, q.snd] g q.fst) (s ×ˢ univ)\n⊢ ContDiffOn 𝕜 n (fun q => f ⋆[L, q.snd] g q.fst) (s ×ˢ univ)\n[PROOFSTEP]\nexact A\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf✝ f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL✝ : E →L[𝕜] E' →L[𝕜] F\nn : ℕ∞\nL : E →L[𝕜] E' →L[𝕜] F\ns : Set P\nv : P → G\nhv : ContDiffOn 𝕜 n v s\nf : G → E\ng : P → G → E'\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 n (↿g) (s ×ˢ univ)\n⊢ ContDiffOn 𝕜 n (fun x => f ⋆[L, v x] g x) s\n[PROOFSTEP]\napply (contDiffOn_convolution_right_with_param L hs hk hgs hf hg).comp (contDiffOn_id.prod hv)\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf✝ f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL✝ : E →L[𝕜] E' →L[𝕜] F\nn : ℕ∞\nL : E →L[𝕜] E' →L[𝕜] F\ns : Set P\nv : P → G\nhv : ContDiffOn 𝕜 n v s\nf : G → E\ng : P → G → E'\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 n (↿g) (s ×ˢ univ)\n⊢ s ⊆ (fun x => (_root_.id x, v x)) ⁻¹' s ×ˢ univ\n[PROOFSTEP]\nintro x hx\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf✝ f' : G → E\ng✝ g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL✝ : E →L[𝕜] E' →L[𝕜] F\nn : ℕ∞\nL : E →L[𝕜] E' →L[𝕜] F\ns : Set P\nv : P → G\nhv : ContDiffOn 𝕜 n v s\nf : G → E\ng : P → G → E'\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 n (↿g) (s ×ˢ univ)\nx : P\nhx : x ∈ s\n⊢ x ∈ (fun x => (_root_.id x, v x)) ⁻¹' s ×ˢ univ\n[PROOFSTEP]\nsimp only [hx, mem_preimage, prod_mk_mem_set_prod_eq, mem_univ, and_self_iff, id.def]\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : NormedAddCommGroup E'\ninst✝¹⁶ : NormedAddCommGroup E''\ninst✝¹⁵ : NormedAddCommGroup F\nf✝ f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁴ : IsROrC 𝕜\ninst✝¹³ : NormedSpace 𝕜 E\ninst✝¹² : NormedSpace 𝕜 E'\ninst✝¹¹ : NormedSpace 𝕜 E''\ninst✝¹⁰ : NormedSpace ℝ F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : CompleteSpace F\ninst✝⁷ : MeasurableSpace G\ninst✝⁶ : NormedAddCommGroup G\ninst✝⁵ : BorelSpace G\ninst✝⁴ : NormedSpace 𝕜 G\ninst✝³ : NormedAddCommGroup P\ninst✝² : NormedSpace 𝕜 P\nμ : Measure G\nL✝ : E →L[𝕜] E' →L[𝕜] F\ninst✝¹ : IsAddLeftInvariant μ\ninst✝ : IsNegInvariant μ\nL : E' →L[𝕜] E →L[𝕜] F\nf : G → E\nn : ℕ∞\ng : P → G → E'\ns : Set P\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 n (↿g) (s ×ˢ univ)\n⊢ ContDiffOn 𝕜 n (fun q => g q.fst ⋆[L, q.snd] f) (s ×ˢ univ)\n[PROOFSTEP]\nsimpa only [convolution_flip] using contDiffOn_convolution_right_with_param L.flip hs hk hgs hf hg\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : NormedAddCommGroup E'\ninst✝¹⁶ : NormedAddCommGroup E''\ninst✝¹⁵ : NormedAddCommGroup F\nf✝ f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁴ : IsROrC 𝕜\ninst✝¹³ : NormedSpace 𝕜 E\ninst✝¹² : NormedSpace 𝕜 E'\ninst✝¹¹ : NormedSpace 𝕜 E''\ninst✝¹⁰ : NormedSpace ℝ F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : CompleteSpace F\ninst✝⁷ : MeasurableSpace G\ninst✝⁶ : NormedAddCommGroup G\ninst✝⁵ : BorelSpace G\ninst✝⁴ : NormedSpace 𝕜 G\ninst✝³ : NormedAddCommGroup P\ninst✝² : NormedSpace 𝕜 P\nμ : Measure G\nL✝ : E →L[𝕜] E' →L[𝕜] F\ninst✝¹ : IsAddLeftInvariant μ\ninst✝ : IsNegInvariant μ\nL : E' →L[𝕜] E →L[𝕜] F\ns : Set P\nn : ℕ∞\nv : P → G\nhv : ContDiffOn 𝕜 n v s\nf : G → E\ng : P → G → E'\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 n (↿g) (s ×ˢ univ)\n⊢ ContDiffOn 𝕜 n (fun x => g x ⋆[L, v x] f) s\n[PROOFSTEP]\napply (contDiffOn_convolution_left_with_param L hs hk hgs hf hg).comp (contDiffOn_id.prod hv)\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : NormedAddCommGroup E'\ninst✝¹⁶ : NormedAddCommGroup E''\ninst✝¹⁵ : NormedAddCommGroup F\nf✝ f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁴ : IsROrC 𝕜\ninst✝¹³ : NormedSpace 𝕜 E\ninst✝¹² : NormedSpace 𝕜 E'\ninst✝¹¹ : NormedSpace 𝕜 E''\ninst✝¹⁰ : NormedSpace ℝ F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : CompleteSpace F\ninst✝⁷ : MeasurableSpace G\ninst✝⁶ : NormedAddCommGroup G\ninst✝⁵ : BorelSpace G\ninst✝⁴ : NormedSpace 𝕜 G\ninst✝³ : NormedAddCommGroup P\ninst✝² : NormedSpace 𝕜 P\nμ : Measure G\nL✝ : E →L[𝕜] E' →L[𝕜] F\ninst✝¹ : IsAddLeftInvariant μ\ninst✝ : IsNegInvariant μ\nL : E' →L[𝕜] E →L[𝕜] F\ns : Set P\nn : ℕ∞\nv : P → G\nhv : ContDiffOn 𝕜 n v s\nf : G → E\ng : P → G → E'\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 n (↿g) (s ×ˢ univ)\n⊢ s ⊆ (fun x => (_root_.id x, v x)) ⁻¹' s ×ˢ univ\n[PROOFSTEP]\nintro x hx\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : NormedAddCommGroup E'\ninst✝¹⁶ : NormedAddCommGroup E''\ninst✝¹⁵ : NormedAddCommGroup F\nf✝ f' : G → E\ng✝ g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝¹⁴ : IsROrC 𝕜\ninst✝¹³ : NormedSpace 𝕜 E\ninst✝¹² : NormedSpace 𝕜 E'\ninst✝¹¹ : NormedSpace 𝕜 E''\ninst✝¹⁰ : NormedSpace ℝ F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : CompleteSpace F\ninst✝⁷ : MeasurableSpace G\ninst✝⁶ : NormedAddCommGroup G\ninst✝⁵ : BorelSpace G\ninst✝⁴ : NormedSpace 𝕜 G\ninst✝³ : NormedAddCommGroup P\ninst✝² : NormedSpace 𝕜 P\nμ : Measure G\nL✝ : E →L[𝕜] E' →L[𝕜] F\ninst✝¹ : IsAddLeftInvariant μ\ninst✝ : IsNegInvariant μ\nL : E' →L[𝕜] E →L[𝕜] F\ns : Set P\nn : ℕ∞\nv : P → G\nhv : ContDiffOn 𝕜 n v s\nf : G → E\ng : P → G → E'\nk : Set G\nhs : IsOpen s\nhk : IsCompact k\nhgs : ∀ (p : P) (x : G), p ∈ s → ¬x ∈ k → g p x = 0\nhf : LocallyIntegrable f\nhg : ContDiffOn 𝕜 n (↿g) (s ×ˢ univ)\nx : P\nhx : x ∈ s\n⊢ x ∈ (fun x => (_root_.id x, v x)) ⁻¹' s ×ˢ univ\n[PROOFSTEP]\nsimp only [hx, mem_preimage, prod_mk_mem_set_prod_eq, mem_univ, and_self_iff, id.def]\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\nn : ℕ∞\nhcg : HasCompactSupport g\nhf : LocallyIntegrable f\nhg : ContDiff 𝕜 n g\n⊢ ContDiff 𝕜 n (convolution f g L)\n[PROOFSTEP]\nrcases exists_compact_iff_hasCompactSupport.2 hcg with ⟨k, hk, h'k⟩\n[GOAL]\ncase intro.intro\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\nn : ℕ∞\nhcg : HasCompactSupport g\nhf : LocallyIntegrable f\nhg : ContDiff 𝕜 n g\nk : Set G\nhk : IsCompact k\nh'k : ∀ (x : G), ¬x ∈ k → g x = 0\n⊢ ContDiff 𝕜 n (convolution f g L)\n[PROOFSTEP]\nrw [← contDiffOn_univ]\n[GOAL]\ncase intro.intro\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁶ : NormedAddCommGroup E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : NormedAddCommGroup E''\ninst✝¹³ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹² : IsROrC 𝕜\ninst✝¹¹ : NormedSpace 𝕜 E\ninst✝¹⁰ : NormedSpace 𝕜 E'\ninst✝⁹ : NormedSpace 𝕜 E''\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : NormedSpace 𝕜 F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : BorelSpace G\ninst✝² : NormedSpace 𝕜 G\ninst✝¹ : NormedAddCommGroup P\ninst✝ : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\nn : ℕ∞\nhcg : HasCompactSupport g\nhf : LocallyIntegrable f\nhg : ContDiff 𝕜 n g\nk : Set G\nhk : IsCompact k\nh'k : ∀ (x : G), ¬x ∈ k → g x = 0\n⊢ ContDiffOn 𝕜 n (convolution f g L) univ\n[PROOFSTEP]\nexact\n  contDiffOn_convolution_right_with_param_comp L contDiffOn_id isOpen_univ hk (fun p x _ hx => h'k x hx) hf\n    (hg.comp contDiff_snd).contDiffOn\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : NormedAddCommGroup E'\ninst✝¹⁶ : NormedAddCommGroup E''\ninst✝¹⁵ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁴ : IsROrC 𝕜\ninst✝¹³ : NormedSpace 𝕜 E\ninst✝¹² : NormedSpace 𝕜 E'\ninst✝¹¹ : NormedSpace 𝕜 E''\ninst✝¹⁰ : NormedSpace ℝ F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : CompleteSpace F\ninst✝⁷ : MeasurableSpace G\ninst✝⁶ : NormedAddCommGroup G\ninst✝⁵ : BorelSpace G\ninst✝⁴ : NormedSpace 𝕜 G\ninst✝³ : NormedAddCommGroup P\ninst✝² : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝¹ : IsAddLeftInvariant μ\ninst✝ : IsNegInvariant μ\nn : ℕ∞\nhcf : HasCompactSupport f\nhf : ContDiff 𝕜 n f\nhg : LocallyIntegrable g\n⊢ ContDiff 𝕜 n (convolution f g L)\n[PROOFSTEP]\nrw [← convolution_flip]\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : NormedAddCommGroup E'\ninst✝¹⁶ : NormedAddCommGroup E''\ninst✝¹⁵ : NormedAddCommGroup F\nf f' : G → E\ng g' : G → E'\nx x' : G\ny y' : E\ninst✝¹⁴ : IsROrC 𝕜\ninst✝¹³ : NormedSpace 𝕜 E\ninst✝¹² : NormedSpace 𝕜 E'\ninst✝¹¹ : NormedSpace 𝕜 E''\ninst✝¹⁰ : NormedSpace ℝ F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : CompleteSpace F\ninst✝⁷ : MeasurableSpace G\ninst✝⁶ : NormedAddCommGroup G\ninst✝⁵ : BorelSpace G\ninst✝⁴ : NormedSpace 𝕜 G\ninst✝³ : NormedAddCommGroup P\ninst✝² : NormedSpace 𝕜 P\nμ : Measure G\nL : E →L[𝕜] E' →L[𝕜] F\ninst✝¹ : IsAddLeftInvariant μ\ninst✝ : IsNegInvariant μ\nn : ℕ∞\nhcf : HasCompactSupport f\nhf : ContDiff 𝕜 n f\nhg : LocallyIntegrable g\n⊢ ContDiff 𝕜 n (convolution g f (ContinuousLinearMap.flip L))\n[PROOFSTEP]\nexact hcf.contDiff_convolution_right L.flip hg hf\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : NormedAddCommGroup E''\ninst✝⁵ : NormedAddCommGroup F\nf✝ f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace ℝ E'\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\nf : ℝ → E\ng : ℝ → E'\nL : E →L[ℝ] E' →L[ℝ] F\nν : autoParam (Measure ℝ) _auto✝\ninst✝ : NoAtoms ν\n⊢ posConvolution f g L = convolution (indicator (Ioi 0) f) (indicator (Ioi 0) g) L\n[PROOFSTEP]\next1 x\n[GOAL]\ncase h\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : NormedAddCommGroup E''\ninst✝⁵ : NormedAddCommGroup F\nf✝ f' : G → E\ng✝ g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace ℝ E'\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\nf : ℝ → E\ng : ℝ → E'\nL : E →L[ℝ] E' →L[ℝ] F\nν : autoParam (Measure ℝ) _auto✝\ninst✝ : NoAtoms ν\nx : ℝ\n⊢ posConvolution f g L x = indicator (Ioi 0) f ⋆[L, x] indicator (Ioi 0) g\n[PROOFSTEP]\nunfold convolution posConvolution indicator\n[GOAL]\ncase h\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : NormedAddCommGroup E''\ninst✝⁵ : NormedAddCommGroup F\nf✝ f' : G → E\ng✝ g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace ℝ E'\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\nf : ℝ → E\ng : ℝ → E'\nL : E →L[ℝ] E' →L[ℝ] F\nν : autoParam (Measure ℝ) _auto✝\ninst✝ : NoAtoms ν\nx : ℝ\n⊢ (if x ∈ Ioi 0 then (fun x => ∫ (t : ℝ) in 0 ..x, ↑(↑L (f t)) (g (x - t)) ∂ν) x else 0) =\n    ∫ (t : ℝ), ↑(↑L (if t ∈ Ioi 0 then f t else 0)) (if x - t ∈ Ioi 0 then g (x - t) else 0) ∂ν\n[PROOFSTEP]\nsimp only\n[GOAL]\ncase h\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : NormedAddCommGroup E''\ninst✝⁵ : NormedAddCommGroup F\nf✝ f' : G → E\ng✝ g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace ℝ E'\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\nf : ℝ → E\ng : ℝ → E'\nL : E →L[ℝ] E' →L[ℝ] F\nν : autoParam (Measure ℝ) _auto✝\ninst✝ : NoAtoms ν\nx : ℝ\n⊢ (if x ∈ Ioi 0 then ∫ (t : ℝ) in 0 ..x, ↑(↑L (f t)) (g (x - t)) ∂ν else 0) =\n    ∫ (t : ℝ), ↑(↑L (if t ∈ Ioi 0 then f t else 0)) (if x - t ∈ Ioi 0 then g (x - t) else 0) ∂ν\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : NormedAddCommGroup E''\ninst✝⁵ : NormedAddCommGroup F\nf✝ f' : G → E\ng✝ g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace ℝ E'\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\nf : ℝ → E\ng : ℝ → E'\nL : E →L[ℝ] E' →L[ℝ] F\nν : autoParam (Measure ℝ) _auto✝\ninst✝ : NoAtoms ν\nx : ℝ\nh : x ∈ Ioi 0\n⊢ ∫ (t : ℝ) in 0 ..x, ↑(↑L (f t)) (g (x - t)) ∂ν =\n    ∫ (t : ℝ), ↑(↑L (if t ∈ Ioi 0 then f t else 0)) (if x - t ∈ Ioi 0 then g (x - t) else 0) ∂ν\n[PROOFSTEP]\nrw [intervalIntegral.integral_of_le (le_of_lt h), integral_Ioc_eq_integral_Ioo, ←\n  integral_indicator (measurableSet_Ioo : MeasurableSet (Ioo 0 x))]\n[GOAL]\ncase pos\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : NormedAddCommGroup E''\ninst✝⁵ : NormedAddCommGroup F\nf✝ f' : G → E\ng✝ g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace ℝ E'\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\nf : ℝ → E\ng : ℝ → E'\nL : E →L[ℝ] E' →L[ℝ] F\nν : autoParam (Measure ℝ) _auto✝\ninst✝ : NoAtoms ν\nx : ℝ\nh : x ∈ Ioi 0\n⊢ ∫ (x_1 : ℝ), indicator (Ioo 0 x) (fun t => ↑(↑L (f t)) (g (x - t))) x_1 ∂ν =\n    ∫ (t : ℝ), ↑(↑L (if t ∈ Ioi 0 then f t else 0)) (if x - t ∈ Ioi 0 then g (x - t) else 0) ∂ν\n[PROOFSTEP]\ncongr 1 with t : 1\n[GOAL]\ncase pos.e_f.h\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : NormedAddCommGroup E''\ninst✝⁵ : NormedAddCommGroup F\nf✝ f' : G → E\ng✝ g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace ℝ E'\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\nf : ℝ → E\ng : ℝ → E'\nL : E →L[ℝ] E' →L[ℝ] F\nν : autoParam (Measure ℝ) _auto✝\ninst✝ : NoAtoms ν\nx : ℝ\nh : x ∈ Ioi 0\nt : ℝ\n⊢ indicator (Ioo 0 x) (fun t => ↑(↑L (f t)) (g (x - t))) t =\n    ↑(↑L (if t ∈ Ioi 0 then f t else 0)) (if x - t ∈ Ioi 0 then g (x - t) else 0)\n[PROOFSTEP]\nhave : t ≤ 0 ∨ t ∈ Ioo 0 x ∨ x ≤ t := by\n  rcases le_or_lt t 0 with (h | h)\n  · exact Or.inl h\n  · rcases lt_or_le t x with (h' | h')\n    exacts [Or.inr (Or.inl ⟨h, h'⟩), Or.inr (Or.inr h')]\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : NormedAddCommGroup E''\ninst✝⁵ : NormedAddCommGroup F\nf✝ f' : G → E\ng✝ g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace ℝ E'\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\nf : ℝ → E\ng : ℝ → E'\nL : E →L[ℝ] E' →L[ℝ] F\nν : autoParam (Measure ℝ) _auto✝\ninst✝ : NoAtoms ν\nx : ℝ\nh : x ∈ Ioi 0\nt : ℝ\n⊢ t ≤ 0 ∨ t ∈ Ioo 0 x ∨ x ≤ t\n[PROOFSTEP]\nrcases le_or_lt t 0 with (h | h)\n[GOAL]\ncase inl\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : NormedAddCommGroup E''\ninst✝⁵ : NormedAddCommGroup F\nf✝ f' : G → E\ng✝ g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace ℝ E'\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\nf : ℝ → E\ng : ℝ → E'\nL : E →L[ℝ] E' →L[ℝ] F\nν : autoParam (Measure ℝ) _auto✝\ninst✝ : NoAtoms ν\nx : ℝ\nh✝ : x ∈ Ioi 0\nt : ℝ\nh : t ≤ 0\n⊢ t ≤ 0 ∨ t ∈ Ioo 0 x ∨ x ≤ t\n[PROOFSTEP]\nexact Or.inl h\n[GOAL]\ncase inr\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : NormedAddCommGroup E''\ninst✝⁵ : NormedAddCommGroup F\nf✝ f' : G → E\ng✝ g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace ℝ E'\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\nf : ℝ → E\ng : ℝ → E'\nL : E →L[ℝ] E' →L[ℝ] F\nν : autoParam (Measure ℝ) _auto✝\ninst✝ : NoAtoms ν\nx : ℝ\nh✝ : x ∈ Ioi 0\nt : ℝ\nh : 0 < t\n⊢ t ≤ 0 ∨ t ∈ Ioo 0 x ∨ x ≤ t\n[PROOFSTEP]\nrcases lt_or_le t x with (h' | h')\n[GOAL]\ncase inr.inl\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : NormedAddCommGroup E''\ninst✝⁵ : NormedAddCommGroup F\nf✝ f' : G → E\ng✝ g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace ℝ E'\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\nf : ℝ → E\ng : ℝ → E'\nL : E →L[ℝ] E' →L[ℝ] F\nν : autoParam (Measure ℝ) _auto✝\ninst✝ : NoAtoms ν\nx : ℝ\nh✝ : x ∈ Ioi 0\nt : ℝ\nh : 0 < t\nh' : t < x\n⊢ t ≤ 0 ∨ t ∈ Ioo 0 x ∨ x ≤ t\ncase inr.inr\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : NormedAddCommGroup E''\ninst✝⁵ : NormedAddCommGroup F\nf✝ f' : G → E\ng✝ g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace ℝ E'\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\nf : ℝ → E\ng : ℝ → E'\nL : E →L[ℝ] E' →L[ℝ] F\nν : autoParam (Measure ℝ) _auto✝\ninst✝ : NoAtoms ν\nx : ℝ\nh✝ : x ∈ Ioi 0\nt : ℝ\nh : 0 < t\nh' : x ≤ t\n⊢ t ≤ 0 ∨ t ∈ Ioo 0 x ∨ x ≤ t\n[PROOFSTEP]\nexacts [Or.inr (Or.inl ⟨h, h'⟩), Or.inr (Or.inr h')]\n[GOAL]\ncase pos.e_f.h\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : NormedAddCommGroup E''\ninst✝⁵ : NormedAddCommGroup F\nf✝ f' : G → E\ng✝ g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace ℝ E'\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\nf : ℝ → E\ng : ℝ → E'\nL : E →L[ℝ] E' →L[ℝ] F\nν : autoParam (Measure ℝ) _auto✝\ninst✝ : NoAtoms ν\nx : ℝ\nh : x ∈ Ioi 0\nt : ℝ\nthis : t ≤ 0 ∨ t ∈ Ioo 0 x ∨ x ≤ t\n⊢ indicator (Ioo 0 x) (fun t => ↑(↑L (f t)) (g (x - t))) t =\n    ↑(↑L (if t ∈ Ioi 0 then f t else 0)) (if x - t ∈ Ioi 0 then g (x - t) else 0)\n[PROOFSTEP]\nrcases this with (ht | ht | ht)\n[GOAL]\ncase pos.e_f.h.inl\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : NormedAddCommGroup E''\ninst✝⁵ : NormedAddCommGroup F\nf✝ f' : G → E\ng✝ g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace ℝ E'\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\nf : ℝ → E\ng : ℝ → E'\nL : E →L[ℝ] E' →L[ℝ] F\nν : autoParam (Measure ℝ) _auto✝\ninst✝ : NoAtoms ν\nx : ℝ\nh : x ∈ Ioi 0\nt : ℝ\nht : t ≤ 0\n⊢ indicator (Ioo 0 x) (fun t => ↑(↑L (f t)) (g (x - t))) t =\n    ↑(↑L (if t ∈ Ioi 0 then f t else 0)) (if x - t ∈ Ioi 0 then g (x - t) else 0)\n[PROOFSTEP]\nrw [indicator_of_not_mem (not_mem_Ioo_of_le ht), if_neg (not_mem_Ioi.mpr ht), ContinuousLinearMap.map_zero,\n  ContinuousLinearMap.zero_apply]\n[GOAL]\ncase pos.e_f.h.inr.inl\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : NormedAddCommGroup E''\ninst✝⁵ : NormedAddCommGroup F\nf✝ f' : G → E\ng✝ g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace ℝ E'\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\nf : ℝ → E\ng : ℝ → E'\nL : E →L[ℝ] E' →L[ℝ] F\nν : autoParam (Measure ℝ) _auto✝\ninst✝ : NoAtoms ν\nx : ℝ\nh : x ∈ Ioi 0\nt : ℝ\nht : t ∈ Ioo 0 x\n⊢ indicator (Ioo 0 x) (fun t => ↑(↑L (f t)) (g (x - t))) t =\n    ↑(↑L (if t ∈ Ioi 0 then f t else 0)) (if x - t ∈ Ioi 0 then g (x - t) else 0)\n[PROOFSTEP]\nrw [indicator_of_mem ht, if_pos (mem_Ioi.mpr ht.1), if_pos (mem_Ioi.mpr <| sub_pos.mpr ht.2)]\n[GOAL]\ncase pos.e_f.h.inr.inr\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : NormedAddCommGroup E''\ninst✝⁵ : NormedAddCommGroup F\nf✝ f' : G → E\ng✝ g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace ℝ E'\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\nf : ℝ → E\ng : ℝ → E'\nL : E →L[ℝ] E' →L[ℝ] F\nν : autoParam (Measure ℝ) _auto✝\ninst✝ : NoAtoms ν\nx : ℝ\nh : x ∈ Ioi 0\nt : ℝ\nht : x ≤ t\n⊢ indicator (Ioo 0 x) (fun t => ↑(↑L (f t)) (g (x - t))) t =\n    ↑(↑L (if t ∈ Ioi 0 then f t else 0)) (if x - t ∈ Ioi 0 then g (x - t) else 0)\n[PROOFSTEP]\nrw [indicator_of_not_mem (not_mem_Ioo_of_ge ht), if_neg (not_mem_Ioi.mpr (sub_nonpos_of_le ht)),\n  ContinuousLinearMap.map_zero]\n[GOAL]\ncase neg\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : NormedAddCommGroup E''\ninst✝⁵ : NormedAddCommGroup F\nf✝ f' : G → E\ng✝ g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace ℝ E'\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\nf : ℝ → E\ng : ℝ → E'\nL : E →L[ℝ] E' →L[ℝ] F\nν : autoParam (Measure ℝ) _auto✝\ninst✝ : NoAtoms ν\nx : ℝ\nh : ¬x ∈ Ioi 0\n⊢ 0 = ∫ (t : ℝ), ↑(↑L (if t ∈ Ioi 0 then f t else 0)) (if x - t ∈ Ioi 0 then g (x - t) else 0) ∂ν\n[PROOFSTEP]\nconvert (integral_zero ℝ F).symm with t\n[GOAL]\ncase h.e'_3.h.e'_7.h\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : NormedAddCommGroup E''\ninst✝⁵ : NormedAddCommGroup F\nf✝ f' : G → E\ng✝ g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace ℝ E'\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\nf : ℝ → E\ng : ℝ → E'\nL : E →L[ℝ] E' →L[ℝ] F\nν : autoParam (Measure ℝ) _auto✝\ninst✝ : NoAtoms ν\nx : ℝ\nh : ¬x ∈ Ioi 0\nt : ℝ\n⊢ ↑(↑L (if t ∈ Ioi 0 then f t else 0)) (if x - t ∈ Ioi 0 then g (x - t) else 0) = 0\n[PROOFSTEP]\nby_cases ht : 0 < t\n[GOAL]\ncase pos\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : NormedAddCommGroup E''\ninst✝⁵ : NormedAddCommGroup F\nf✝ f' : G → E\ng✝ g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace ℝ E'\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\nf : ℝ → E\ng : ℝ → E'\nL : E →L[ℝ] E' →L[ℝ] F\nν : autoParam (Measure ℝ) _auto✝\ninst✝ : NoAtoms ν\nx : ℝ\nh : ¬x ∈ Ioi 0\nt : ℝ\nht : 0 < t\n⊢ ↑(↑L (if t ∈ Ioi 0 then f t else 0)) (if x - t ∈ Ioi 0 then g (x - t) else 0) = 0\n[PROOFSTEP]\nrw [if_neg (_ : x - t ∉ Ioi 0), ContinuousLinearMap.map_zero]\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : NormedAddCommGroup E''\ninst✝⁵ : NormedAddCommGroup F\nf✝ f' : G → E\ng✝ g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace ℝ E'\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\nf : ℝ → E\ng : ℝ → E'\nL : E →L[ℝ] E' →L[ℝ] F\nν : autoParam (Measure ℝ) _auto✝\ninst✝ : NoAtoms ν\nx : ℝ\nh : ¬x ∈ Ioi 0\nt : ℝ\nht : 0 < t\n⊢ ¬x - t ∈ Ioi 0\n[PROOFSTEP]\nrw [not_mem_Ioi] at h ⊢\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : NormedAddCommGroup E''\ninst✝⁵ : NormedAddCommGroup F\nf✝ f' : G → E\ng✝ g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace ℝ E'\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\nf : ℝ → E\ng : ℝ → E'\nL : E →L[ℝ] E' →L[ℝ] F\nν : autoParam (Measure ℝ) _auto✝\ninst✝ : NoAtoms ν\nx : ℝ\nh : x ≤ 0\nt : ℝ\nht : 0 < t\n⊢ x - t ≤ 0\n[PROOFSTEP]\nexact sub_nonpos.mpr (h.trans ht.le)\n[GOAL]\ncase neg\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : NormedAddCommGroup E''\ninst✝⁵ : NormedAddCommGroup F\nf✝ f' : G → E\ng✝ g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace ℝ E'\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\nf : ℝ → E\ng : ℝ → E'\nL : E →L[ℝ] E' →L[ℝ] F\nν : autoParam (Measure ℝ) _auto✝\ninst✝ : NoAtoms ν\nx : ℝ\nh : ¬x ∈ Ioi 0\nt : ℝ\nht : ¬0 < t\n⊢ ↑(↑L (if t ∈ Ioi 0 then f t else 0)) (if x - t ∈ Ioi 0 then g (x - t) else 0) = 0\n[PROOFSTEP]\nrw [if_neg (mem_Ioi.not.mpr ht), ContinuousLinearMap.map_zero, ContinuousLinearMap.zero_apply]\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedAddCommGroup E'\ninst✝⁹ : NormedAddCommGroup E''\ninst✝⁸ : NormedAddCommGroup F\nf✝ f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedSpace ℝ F\ninst✝⁴ : CompleteSpace F\nf : ℝ → E\ng : ℝ → E'\nμ ν : Measure ℝ\ninst✝³ : SigmaFinite μ\ninst✝² : SigmaFinite ν\ninst✝¹ : IsAddRightInvariant μ\ninst✝ : NoAtoms ν\nhf : IntegrableOn f (Ioi 0)\nhg : IntegrableOn g (Ioi 0)\nL : E →L[ℝ] E' →L[ℝ] F\n⊢ Integrable (posConvolution f g L)\n[PROOFSTEP]\nrw [← integrable_indicator_iff (measurableSet_Ioi : MeasurableSet (Ioi (0 : ℝ)))] at hf hg \n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedAddCommGroup E'\ninst✝⁹ : NormedAddCommGroup E''\ninst✝⁸ : NormedAddCommGroup F\nf✝ f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedSpace ℝ F\ninst✝⁴ : CompleteSpace F\nf : ℝ → E\ng : ℝ → E'\nμ ν : Measure ℝ\ninst✝³ : SigmaFinite μ\ninst✝² : SigmaFinite ν\ninst✝¹ : IsAddRightInvariant μ\ninst✝ : NoAtoms ν\nhf : Integrable (indicator (Ioi 0) f)\nhg : Integrable (indicator (Ioi 0) g)\nL : E →L[ℝ] E' →L[ℝ] F\n⊢ Integrable (posConvolution f g L)\n[PROOFSTEP]\nrw [posConvolution_eq_convolution_indicator f g L ν]\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedAddCommGroup E'\ninst✝⁹ : NormedAddCommGroup E''\ninst✝⁸ : NormedAddCommGroup F\nf✝ f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedSpace ℝ F\ninst✝⁴ : CompleteSpace F\nf : ℝ → E\ng : ℝ → E'\nμ ν : Measure ℝ\ninst✝³ : SigmaFinite μ\ninst✝² : SigmaFinite ν\ninst✝¹ : IsAddRightInvariant μ\ninst✝ : NoAtoms ν\nhf : Integrable (indicator (Ioi 0) f)\nhg : Integrable (indicator (Ioi 0) g)\nL : E →L[ℝ] E' →L[ℝ] F\n⊢ Integrable (convolution (indicator (Ioi 0) f) (indicator (Ioi 0) g) L)\n[PROOFSTEP]\nexact (hf.convolution_integrand L hg).integral_prod_left\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedAddCommGroup E'\ninst✝¹¹ : NormedAddCommGroup E''\ninst✝¹⁰ : NormedAddCommGroup F\nf✝ f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝⁹ : NormedSpace ℝ E\ninst✝⁸ : NormedSpace ℝ E'\ninst✝⁷ : NormedSpace ℝ F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : CompleteSpace E\ninst✝⁴ : CompleteSpace E'\nμ ν : Measure ℝ\ninst✝³ : SigmaFinite μ\ninst✝² : SigmaFinite ν\ninst✝¹ : IsAddRightInvariant μ\ninst✝ : NoAtoms ν\nf : ℝ → E\ng : ℝ → E'\nhf : IntegrableOn f (Ioi 0)\nhg : IntegrableOn g (Ioi 0)\nL : E →L[ℝ] E' →L[ℝ] F\n⊢ ∫ (x : ℝ) in Ioi 0, ∫ (t : ℝ) in 0 ..x, ↑(↑L (f t)) (g (x - t)) ∂ν ∂μ =\n    ↑(↑L (∫ (x : ℝ) in Ioi 0, f x ∂ν)) (∫ (x : ℝ) in Ioi 0, g x ∂μ)\n[PROOFSTEP]\nrw [← integrable_indicator_iff measurableSet_Ioi] at hf hg \n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedAddCommGroup E'\ninst✝¹¹ : NormedAddCommGroup E''\ninst✝¹⁰ : NormedAddCommGroup F\nf✝ f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝⁹ : NormedSpace ℝ E\ninst✝⁸ : NormedSpace ℝ E'\ninst✝⁷ : NormedSpace ℝ F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : CompleteSpace E\ninst✝⁴ : CompleteSpace E'\nμ ν : Measure ℝ\ninst✝³ : SigmaFinite μ\ninst✝² : SigmaFinite ν\ninst✝¹ : IsAddRightInvariant μ\ninst✝ : NoAtoms ν\nf : ℝ → E\ng : ℝ → E'\nhf : Integrable (indicator (Ioi 0) f)\nhg : Integrable (indicator (Ioi 0) g)\nL : E →L[ℝ] E' →L[ℝ] F\n⊢ ∫ (x : ℝ) in Ioi 0, ∫ (t : ℝ) in 0 ..x, ↑(↑L (f t)) (g (x - t)) ∂ν ∂μ =\n    ↑(↑L (∫ (x : ℝ) in Ioi 0, f x ∂ν)) (∫ (x : ℝ) in Ioi 0, g x ∂μ)\n[PROOFSTEP]\nsimp_rw [← integral_indicator measurableSet_Ioi]\n[GOAL]\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedAddCommGroup E'\ninst✝¹¹ : NormedAddCommGroup E''\ninst✝¹⁰ : NormedAddCommGroup F\nf✝ f' : G → E\ng✝ g' : G → E'\nx x' : G\ny y' : E\ninst✝⁹ : NormedSpace ℝ E\ninst✝⁸ : NormedSpace ℝ E'\ninst✝⁷ : NormedSpace ℝ F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : CompleteSpace E\ninst✝⁴ : CompleteSpace E'\nμ ν : Measure ℝ\ninst✝³ : SigmaFinite μ\ninst✝² : SigmaFinite ν\ninst✝¹ : IsAddRightInvariant μ\ninst✝ : NoAtoms ν\nf : ℝ → E\ng : ℝ → E'\nhf : Integrable (indicator (Ioi 0) f)\nhg : Integrable (indicator (Ioi 0) g)\nL : E →L[ℝ] E' →L[ℝ] F\n⊢ ∫ (x : ℝ), indicator (Ioi 0) (fun x => ∫ (t : ℝ) in 0 ..x, ↑(↑L (f t)) (g (x - t)) ∂ν) x ∂μ =\n    ↑(↑L (∫ (x : ℝ), indicator (Ioi 0) (fun x => f x) x ∂ν)) (∫ (x : ℝ), indicator (Ioi 0) (fun x => g x) x ∂μ)\n[PROOFSTEP]\nconvert integral_convolution L hf hg using 4 with x\n[GOAL]\ncase h.e'_2.h.e'_7.h.h.e\n𝕜 : Type u𝕜\nG : Type uG\nE : Type uE\nE' : Type uE'\nE'' : Type uE''\nF : Type uF\nF' : Type uF'\nF'' : Type uF''\nP : Type uP\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedAddCommGroup E'\ninst✝¹¹ : NormedAddCommGroup E''\ninst✝¹⁰ : NormedAddCommGroup F\nf✝ f' : G → E\ng✝ g' : G → E'\nx✝ x' : G\ny y' : E\ninst✝⁹ : NormedSpace ℝ E\ninst✝⁸ : NormedSpace ℝ E'\ninst✝⁷ : NormedSpace ℝ F\ninst✝⁶ : CompleteSpace F\ninst✝⁵ : CompleteSpace E\ninst✝⁴ : CompleteSpace E'\nμ ν : Measure ℝ\ninst✝³ : SigmaFinite μ\ninst✝² : SigmaFinite ν\ninst✝¹ : IsAddRightInvariant μ\ninst✝ : NoAtoms ν\nf : ℝ → E\ng : ℝ → E'\nhf : Integrable (indicator (Ioi 0) f)\nhg : Integrable (indicator (Ioi 0) g)\nL : E →L[ℝ] E' →L[ℝ] F\nx : ℝ\n⊢ (indicator (Ioi 0) fun x => ∫ (t : ℝ) in 0 ..x, ↑(↑L (f t)) (g (x - t)) ∂ν) =\n    convolution (indicator (Ioi 0) f) (indicator (Ioi 0) g) L\n[PROOFSTEP]\napply posConvolution_eq_convolution_indicator\n", "meta": {"mathlib_filename": "Mathlib.Analysis.Convolution", "llama_tokens": 437973, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8056321936479701, "lm_q2_score": 0.6619228825191871, "lm_q1q2_score": 0.5332663838697203}}
{"text": "[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nδ K ε x : ℝ\n⊢ HasDerivAt (gronwallBound δ K ε) (K * gronwallBound δ K ε x + ε) x\n[PROOFSTEP]\nby_cases hK : K = 0\n[GOAL]\ncase pos\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nδ K ε x : ℝ\nhK : K = 0\n⊢ HasDerivAt (gronwallBound δ K ε) (K * gronwallBound δ K ε x + ε) x\n[PROOFSTEP]\nsubst K\n[GOAL]\ncase pos\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nδ ε x : ℝ\n⊢ HasDerivAt (gronwallBound δ 0 ε) (0 * gronwallBound δ 0 ε x + ε) x\n[PROOFSTEP]\nsimp only [gronwallBound_K0, zero_mul, zero_add]\n[GOAL]\ncase pos\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nδ ε x : ℝ\n⊢ HasDerivAt (fun x => δ + ε * x) ε x\n[PROOFSTEP]\nconvert ((hasDerivAt_id x).const_mul ε).const_add δ\n[GOAL]\ncase h.e'_7\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nδ ε x : ℝ\n⊢ ε = ε * 1\n[PROOFSTEP]\nrw [mul_one]\n[GOAL]\ncase neg\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nδ K ε x : ℝ\nhK : ¬K = 0\n⊢ HasDerivAt (gronwallBound δ K ε) (K * gronwallBound δ K ε x + ε) x\n[PROOFSTEP]\nsimp only [gronwallBound_of_K_ne_0 hK]\n[GOAL]\ncase neg\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nδ K ε x : ℝ\nhK : ¬K = 0\n⊢ HasDerivAt (fun x => δ * exp (K * x) + ε / K * (exp (K * x) - 1))\n    (K * (δ * exp (K * x) + ε / K * (exp (K * x) - 1)) + ε) x\n[PROOFSTEP]\nconvert\n  (((hasDerivAt_id x).const_mul K).exp.const_mul δ).add\n    ((((hasDerivAt_id x).const_mul K).exp.sub_const 1).const_mul (ε / K)) using\n  1\n[GOAL]\ncase h.e'_7\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nδ K ε x : ℝ\nhK : ¬K = 0\n⊢ K * (δ * exp (K * x) + ε / K * (exp (K * x) - 1)) + ε =\n    δ * (exp (K * id x) * (K * 1)) + ε / K * (exp (K * id x) * (K * 1))\n[PROOFSTEP]\nsimp only [id, mul_add, (mul_assoc _ _ _).symm, mul_comm _ K, mul_div_cancel' _ hK]\n[GOAL]\ncase h.e'_7\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nδ K ε x : ℝ\nhK : ¬K = 0\n⊢ K * δ * exp (K * x) + ε * (exp (K * x) - 1) + ε = K * δ * exp (K * x) * 1 + ε * exp (K * x) * 1\n[PROOFSTEP]\nring\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nδ K ε x a : ℝ\n⊢ HasDerivAt (fun y => gronwallBound δ K ε (y - a)) (K * gronwallBound δ K ε (x - a) + ε) x\n[PROOFSTEP]\nconvert (hasDerivAt_gronwallBound δ K ε _).comp x ((hasDerivAt_id x).sub_const a) using 1\n[GOAL]\ncase h.e'_7\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nδ K ε x a : ℝ\n⊢ K * gronwallBound δ K ε (x - a) + ε = (K * gronwallBound δ K ε (id x - a) + ε) * 1\n[PROOFSTEP]\nrw [id, mul_one]\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nδ K ε : ℝ\n⊢ gronwallBound δ K ε 0 = δ\n[PROOFSTEP]\nby_cases hK : K = 0\n[GOAL]\ncase pos\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nδ K ε : ℝ\nhK : K = 0\n⊢ gronwallBound δ K ε 0 = δ\n[PROOFSTEP]\nsimp only [gronwallBound, if_pos hK, mul_zero, add_zero]\n[GOAL]\ncase neg\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nδ K ε : ℝ\nhK : ¬K = 0\n⊢ gronwallBound δ K ε 0 = δ\n[PROOFSTEP]\nsimp only [gronwallBound, if_neg hK, mul_zero, exp_zero, sub_self, mul_one, add_zero]\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nδ K x : ℝ\n⊢ gronwallBound δ K 0 x = δ * exp (K * x)\n[PROOFSTEP]\nby_cases hK : K = 0\n[GOAL]\ncase pos\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nδ K x : ℝ\nhK : K = 0\n⊢ gronwallBound δ K 0 x = δ * exp (K * x)\n[PROOFSTEP]\nsimp only [gronwallBound_K0, hK, zero_mul, exp_zero, add_zero, mul_one]\n[GOAL]\ncase neg\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nδ K x : ℝ\nhK : ¬K = 0\n⊢ gronwallBound δ K 0 x = δ * exp (K * x)\n[PROOFSTEP]\nsimp only [gronwallBound_of_K_ne_0 hK, zero_div, zero_mul, add_zero]\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nK x : ℝ\n⊢ gronwallBound 0 K 0 x = 0\n[PROOFSTEP]\nsimp only [gronwallBound_ε0, zero_mul]\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nδ K x : ℝ\n⊢ Continuous fun ε => gronwallBound δ K ε x\n[PROOFSTEP]\nby_cases hK : K = 0\n[GOAL]\ncase pos\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nδ K x : ℝ\nhK : K = 0\n⊢ Continuous fun ε => gronwallBound δ K ε x\n[PROOFSTEP]\nsimp only [gronwallBound_K0, hK]\n[GOAL]\ncase pos\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nδ K x : ℝ\nhK : K = 0\n⊢ Continuous fun ε => δ + ε * x\n[PROOFSTEP]\nexact continuous_const.add (continuous_id.mul continuous_const)\n[GOAL]\ncase neg\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nδ K x : ℝ\nhK : ¬K = 0\n⊢ Continuous fun ε => gronwallBound δ K ε x\n[PROOFSTEP]\nsimp only [gronwallBound_of_K_ne_0 hK]\n[GOAL]\ncase neg\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nδ K x : ℝ\nhK : ¬K = 0\n⊢ Continuous fun ε => δ * exp (K * x) + ε / K * (exp (K * x) - 1)\n[PROOFSTEP]\nexact continuous_const.add ((continuous_id.mul continuous_const).mul continuous_const)\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf f' : ℝ → ℝ\nδ K ε a b : ℝ\nhf : ContinuousOn f (Icc a b)\nhf' : ∀ (x : ℝ), x ∈ Ico a b → ∀ (r : ℝ), f' x < r → ∃ᶠ (z : ℝ) in 𝓝[Ioi x] x, (z - x)⁻¹ * (f z - f x) < r\nha : f a ≤ δ\nbound : ∀ (x : ℝ), x ∈ Ico a b → f' x ≤ K * f x + ε\n⊢ ∀ (x : ℝ), x ∈ Icc a b → f x ≤ gronwallBound δ K ε (x - a)\n[PROOFSTEP]\nhave H : ∀ x ∈ Icc a b, ∀ ε' ∈ Ioi ε, f x ≤ gronwallBound δ K ε' (x - a) :=\n  by\n  intro x hx ε' hε'\n  apply image_le_of_liminf_slope_right_lt_deriv_boundary hf hf'\n  · rwa [sub_self, gronwallBound_x0]\n  · exact fun x => hasDerivAt_gronwallBound_shift δ K ε' x a\n  · intro x hx hfB\n    rw [← hfB]\n    apply lt_of_le_of_lt (bound x hx)\n    exact add_lt_add_left (mem_Ioi.1 hε') _\n  · exact hx\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf f' : ℝ → ℝ\nδ K ε a b : ℝ\nhf : ContinuousOn f (Icc a b)\nhf' : ∀ (x : ℝ), x ∈ Ico a b → ∀ (r : ℝ), f' x < r → ∃ᶠ (z : ℝ) in 𝓝[Ioi x] x, (z - x)⁻¹ * (f z - f x) < r\nha : f a ≤ δ\nbound : ∀ (x : ℝ), x ∈ Ico a b → f' x ≤ K * f x + ε\n⊢ ∀ (x : ℝ), x ∈ Icc a b → ∀ (ε' : ℝ), ε' ∈ Ioi ε → f x ≤ gronwallBound δ K ε' (x - a)\n[PROOFSTEP]\nintro x hx ε' hε'\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf f' : ℝ → ℝ\nδ K ε a b : ℝ\nhf : ContinuousOn f (Icc a b)\nhf' : ∀ (x : ℝ), x ∈ Ico a b → ∀ (r : ℝ), f' x < r → ∃ᶠ (z : ℝ) in 𝓝[Ioi x] x, (z - x)⁻¹ * (f z - f x) < r\nha : f a ≤ δ\nbound : ∀ (x : ℝ), x ∈ Ico a b → f' x ≤ K * f x + ε\nx : ℝ\nhx : x ∈ Icc a b\nε' : ℝ\nhε' : ε' ∈ Ioi ε\n⊢ f x ≤ gronwallBound δ K ε' (x - a)\n[PROOFSTEP]\napply image_le_of_liminf_slope_right_lt_deriv_boundary hf hf'\n[GOAL]\ncase ha\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf f' : ℝ → ℝ\nδ K ε a b : ℝ\nhf : ContinuousOn f (Icc a b)\nhf' : ∀ (x : ℝ), x ∈ Ico a b → ∀ (r : ℝ), f' x < r → ∃ᶠ (z : ℝ) in 𝓝[Ioi x] x, (z - x)⁻¹ * (f z - f x) < r\nha : f a ≤ δ\nbound : ∀ (x : ℝ), x ∈ Ico a b → f' x ≤ K * f x + ε\nx : ℝ\nhx : x ∈ Icc a b\nε' : ℝ\nhε' : ε' ∈ Ioi ε\n⊢ f a ≤ gronwallBound δ K ε' (a - a)\n[PROOFSTEP]\nrwa [sub_self, gronwallBound_x0]\n[GOAL]\ncase hB\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf f' : ℝ → ℝ\nδ K ε a b : ℝ\nhf : ContinuousOn f (Icc a b)\nhf' : ∀ (x : ℝ), x ∈ Ico a b → ∀ (r : ℝ), f' x < r → ∃ᶠ (z : ℝ) in 𝓝[Ioi x] x, (z - x)⁻¹ * (f z - f x) < r\nha : f a ≤ δ\nbound : ∀ (x : ℝ), x ∈ Ico a b → f' x ≤ K * f x + ε\nx : ℝ\nhx : x ∈ Icc a b\nε' : ℝ\nhε' : ε' ∈ Ioi ε\n⊢ ∀ (x : ℝ), HasDerivAt (fun x => gronwallBound δ K ε' (x - a)) (?m.35213 x) x\n[PROOFSTEP]\nexact fun x => hasDerivAt_gronwallBound_shift δ K ε' x a\n[GOAL]\ncase bound\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf f' : ℝ → ℝ\nδ K ε a b : ℝ\nhf : ContinuousOn f (Icc a b)\nhf' : ∀ (x : ℝ), x ∈ Ico a b → ∀ (r : ℝ), f' x < r → ∃ᶠ (z : ℝ) in 𝓝[Ioi x] x, (z - x)⁻¹ * (f z - f x) < r\nha : f a ≤ δ\nbound : ∀ (x : ℝ), x ∈ Ico a b → f' x ≤ K * f x + ε\nx : ℝ\nhx : x ∈ Icc a b\nε' : ℝ\nhε' : ε' ∈ Ioi ε\n⊢ ∀ (x : ℝ), x ∈ Ico a b → f x = gronwallBound δ K ε' (x - a) → f' x < K * gronwallBound δ K ε' (x - a) + ε'\n[PROOFSTEP]\nintro x hx hfB\n[GOAL]\ncase bound\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf f' : ℝ → ℝ\nδ K ε a b : ℝ\nhf : ContinuousOn f (Icc a b)\nhf' : ∀ (x : ℝ), x ∈ Ico a b → ∀ (r : ℝ), f' x < r → ∃ᶠ (z : ℝ) in 𝓝[Ioi x] x, (z - x)⁻¹ * (f z - f x) < r\nha : f a ≤ δ\nbound : ∀ (x : ℝ), x ∈ Ico a b → f' x ≤ K * f x + ε\nx✝ : ℝ\nhx✝ : x✝ ∈ Icc a b\nε' : ℝ\nhε' : ε' ∈ Ioi ε\nx : ℝ\nhx : x ∈ Ico a b\nhfB : f x = gronwallBound δ K ε' (x - a)\n⊢ f' x < K * gronwallBound δ K ε' (x - a) + ε'\n[PROOFSTEP]\nrw [← hfB]\n[GOAL]\ncase bound\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf f' : ℝ → ℝ\nδ K ε a b : ℝ\nhf : ContinuousOn f (Icc a b)\nhf' : ∀ (x : ℝ), x ∈ Ico a b → ∀ (r : ℝ), f' x < r → ∃ᶠ (z : ℝ) in 𝓝[Ioi x] x, (z - x)⁻¹ * (f z - f x) < r\nha : f a ≤ δ\nbound : ∀ (x : ℝ), x ∈ Ico a b → f' x ≤ K * f x + ε\nx✝ : ℝ\nhx✝ : x✝ ∈ Icc a b\nε' : ℝ\nhε' : ε' ∈ Ioi ε\nx : ℝ\nhx : x ∈ Ico a b\nhfB : f x = gronwallBound δ K ε' (x - a)\n⊢ f' x < K * f x + ε'\n[PROOFSTEP]\napply lt_of_le_of_lt (bound x hx)\n[GOAL]\ncase bound\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf f' : ℝ → ℝ\nδ K ε a b : ℝ\nhf : ContinuousOn f (Icc a b)\nhf' : ∀ (x : ℝ), x ∈ Ico a b → ∀ (r : ℝ), f' x < r → ∃ᶠ (z : ℝ) in 𝓝[Ioi x] x, (z - x)⁻¹ * (f z - f x) < r\nha : f a ≤ δ\nbound : ∀ (x : ℝ), x ∈ Ico a b → f' x ≤ K * f x + ε\nx✝ : ℝ\nhx✝ : x✝ ∈ Icc a b\nε' : ℝ\nhε' : ε' ∈ Ioi ε\nx : ℝ\nhx : x ∈ Ico a b\nhfB : f x = gronwallBound δ K ε' (x - a)\n⊢ K * f x + ε < K * f x + ε'\n[PROOFSTEP]\nexact add_lt_add_left (mem_Ioi.1 hε') _\n[GOAL]\ncase a\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf f' : ℝ → ℝ\nδ K ε a b : ℝ\nhf : ContinuousOn f (Icc a b)\nhf' : ∀ (x : ℝ), x ∈ Ico a b → ∀ (r : ℝ), f' x < r → ∃ᶠ (z : ℝ) in 𝓝[Ioi x] x, (z - x)⁻¹ * (f z - f x) < r\nha : f a ≤ δ\nbound : ∀ (x : ℝ), x ∈ Ico a b → f' x ≤ K * f x + ε\nx : ℝ\nhx : x ∈ Icc a b\nε' : ℝ\nhε' : ε' ∈ Ioi ε\n⊢ x ∈ Icc a b\n[PROOFSTEP]\nexact hx\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf f' : ℝ → ℝ\nδ K ε a b : ℝ\nhf : ContinuousOn f (Icc a b)\nhf' : ∀ (x : ℝ), x ∈ Ico a b → ∀ (r : ℝ), f' x < r → ∃ᶠ (z : ℝ) in 𝓝[Ioi x] x, (z - x)⁻¹ * (f z - f x) < r\nha : f a ≤ δ\nbound : ∀ (x : ℝ), x ∈ Ico a b → f' x ≤ K * f x + ε\nH : ∀ (x : ℝ), x ∈ Icc a b → ∀ (ε' : ℝ), ε' ∈ Ioi ε → f x ≤ gronwallBound δ K ε' (x - a)\n⊢ ∀ (x : ℝ), x ∈ Icc a b → f x ≤ gronwallBound δ K ε (x - a)\n[PROOFSTEP]\nintro x hx\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf f' : ℝ → ℝ\nδ K ε a b : ℝ\nhf : ContinuousOn f (Icc a b)\nhf' : ∀ (x : ℝ), x ∈ Ico a b → ∀ (r : ℝ), f' x < r → ∃ᶠ (z : ℝ) in 𝓝[Ioi x] x, (z - x)⁻¹ * (f z - f x) < r\nha : f a ≤ δ\nbound : ∀ (x : ℝ), x ∈ Ico a b → f' x ≤ K * f x + ε\nH : ∀ (x : ℝ), x ∈ Icc a b → ∀ (ε' : ℝ), ε' ∈ Ioi ε → f x ≤ gronwallBound δ K ε' (x - a)\nx : ℝ\nhx : x ∈ Icc a b\n⊢ f x ≤ gronwallBound δ K ε (x - a)\n[PROOFSTEP]\nchange f x ≤ (fun ε' => gronwallBound δ K ε' (x - a)) ε\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf f' : ℝ → ℝ\nδ K ε a b : ℝ\nhf : ContinuousOn f (Icc a b)\nhf' : ∀ (x : ℝ), x ∈ Ico a b → ∀ (r : ℝ), f' x < r → ∃ᶠ (z : ℝ) in 𝓝[Ioi x] x, (z - x)⁻¹ * (f z - f x) < r\nha : f a ≤ δ\nbound : ∀ (x : ℝ), x ∈ Ico a b → f' x ≤ K * f x + ε\nH : ∀ (x : ℝ), x ∈ Icc a b → ∀ (ε' : ℝ), ε' ∈ Ioi ε → f x ≤ gronwallBound δ K ε' (x - a)\nx : ℝ\nhx : x ∈ Icc a b\n⊢ f x ≤ (fun ε' => gronwallBound δ K ε' (x - a)) ε\n[PROOFSTEP]\nconvert continuousWithinAt_const.closure_le _ _ (H x hx)\n[GOAL]\ncase convert_2\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf f' : ℝ → ℝ\nδ K ε a b : ℝ\nhf : ContinuousOn f (Icc a b)\nhf' : ∀ (x : ℝ), x ∈ Ico a b → ∀ (r : ℝ), f' x < r → ∃ᶠ (z : ℝ) in 𝓝[Ioi x] x, (z - x)⁻¹ * (f z - f x) < r\nha : f a ≤ δ\nbound : ∀ (x : ℝ), x ∈ Ico a b → f' x ≤ K * f x + ε\nH : ∀ (x : ℝ), x ∈ Icc a b → ∀ (ε' : ℝ), ε' ∈ Ioi ε → f x ≤ gronwallBound δ K ε' (x - a)\nx : ℝ\nhx : x ∈ Icc a b\n⊢ ε ∈ closure (Ioi ε)\n[PROOFSTEP]\nsimp only [closure_Ioi, left_mem_Ici]\n[GOAL]\ncase convert_3\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf f' : ℝ → ℝ\nδ K ε a b : ℝ\nhf : ContinuousOn f (Icc a b)\nhf' : ∀ (x : ℝ), x ∈ Ico a b → ∀ (r : ℝ), f' x < r → ∃ᶠ (z : ℝ) in 𝓝[Ioi x] x, (z - x)⁻¹ * (f z - f x) < r\nha : f a ≤ δ\nbound : ∀ (x : ℝ), x ∈ Ico a b → f' x ≤ K * f x + ε\nH : ∀ (x : ℝ), x ∈ Icc a b → ∀ (ε' : ℝ), ε' ∈ Ioi ε → f x ≤ gronwallBound δ K ε' (x - a)\nx : ℝ\nhx : x ∈ Icc a b\n⊢ ContinuousWithinAt (fun y => gronwallBound δ K y (x - a)) (Ioi ε) ε\n[PROOFSTEP]\nexact (gronwallBound_continuous_ε δ K (x - a)).continuousWithinAt\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nv : ℝ → E → E\ns : ℝ → Set E\nK : ℝ\nhv : ∀ (t : ℝ) (x : E), x ∈ s t → ∀ (y : E), y ∈ s t → dist (v t x) (v t y) ≤ K * dist x y\nf g f' g' : ℝ → E\na b εf εg δ : ℝ\nhf : ContinuousOn f (Icc a b)\nhf' : ∀ (t : ℝ), t ∈ Ico a b → HasDerivWithinAt f (f' t) (Ici t) t\nf_bound : ∀ (t : ℝ), t ∈ Ico a b → dist (f' t) (v t (f t)) ≤ εf\nhfs : ∀ (t : ℝ), t ∈ Ico a b → f t ∈ s t\nhg : ContinuousOn g (Icc a b)\nhg' : ∀ (t : ℝ), t ∈ Ico a b → HasDerivWithinAt g (g' t) (Ici t) t\ng_bound : ∀ (t : ℝ), t ∈ Ico a b → dist (g' t) (v t (g t)) ≤ εg\nhgs : ∀ (t : ℝ), t ∈ Ico a b → g t ∈ s t\nha : dist (f a) (g a) ≤ δ\n⊢ ∀ (t : ℝ), t ∈ Icc a b → dist (f t) (g t) ≤ gronwallBound δ K (εf + εg) (t - a)\n[PROOFSTEP]\nsimp only [dist_eq_norm] at ha ⊢\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nv : ℝ → E → E\ns : ℝ → Set E\nK : ℝ\nhv : ∀ (t : ℝ) (x : E), x ∈ s t → ∀ (y : E), y ∈ s t → dist (v t x) (v t y) ≤ K * dist x y\nf g f' g' : ℝ → E\na b εf εg δ : ℝ\nhf : ContinuousOn f (Icc a b)\nhf' : ∀ (t : ℝ), t ∈ Ico a b → HasDerivWithinAt f (f' t) (Ici t) t\nf_bound : ∀ (t : ℝ), t ∈ Ico a b → dist (f' t) (v t (f t)) ≤ εf\nhfs : ∀ (t : ℝ), t ∈ Ico a b → f t ∈ s t\nhg : ContinuousOn g (Icc a b)\nhg' : ∀ (t : ℝ), t ∈ Ico a b → HasDerivWithinAt g (g' t) (Ici t) t\ng_bound : ∀ (t : ℝ), t ∈ Ico a b → dist (g' t) (v t (g t)) ≤ εg\nhgs : ∀ (t : ℝ), t ∈ Ico a b → g t ∈ s t\nha : ‖f a - g a‖ ≤ δ\n⊢ ∀ (t : ℝ), t ∈ Icc a b → ‖f t - g t‖ ≤ gronwallBound δ K (εf + εg) (t - a)\n[PROOFSTEP]\nhave h_deriv : ∀ t ∈ Ico a b, HasDerivWithinAt (fun t => f t - g t) (f' t - g' t) (Ici t) t := fun t ht =>\n  (hf' t ht).sub (hg' t ht)\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nv : ℝ → E → E\ns : ℝ → Set E\nK : ℝ\nhv : ∀ (t : ℝ) (x : E), x ∈ s t → ∀ (y : E), y ∈ s t → dist (v t x) (v t y) ≤ K * dist x y\nf g f' g' : ℝ → E\na b εf εg δ : ℝ\nhf : ContinuousOn f (Icc a b)\nhf' : ∀ (t : ℝ), t ∈ Ico a b → HasDerivWithinAt f (f' t) (Ici t) t\nf_bound : ∀ (t : ℝ), t ∈ Ico a b → dist (f' t) (v t (f t)) ≤ εf\nhfs : ∀ (t : ℝ), t ∈ Ico a b → f t ∈ s t\nhg : ContinuousOn g (Icc a b)\nhg' : ∀ (t : ℝ), t ∈ Ico a b → HasDerivWithinAt g (g' t) (Ici t) t\ng_bound : ∀ (t : ℝ), t ∈ Ico a b → dist (g' t) (v t (g t)) ≤ εg\nhgs : ∀ (t : ℝ), t ∈ Ico a b → g t ∈ s t\nha : ‖f a - g a‖ ≤ δ\nh_deriv : ∀ (t : ℝ), t ∈ Ico a b → HasDerivWithinAt (fun t => f t - g t) (f' t - g' t) (Ici t) t\n⊢ ∀ (t : ℝ), t ∈ Icc a b → ‖f t - g t‖ ≤ gronwallBound δ K (εf + εg) (t - a)\n[PROOFSTEP]\napply norm_le_gronwallBound_of_norm_deriv_right_le (hf.sub hg) h_deriv ha\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nv : ℝ → E → E\ns : ℝ → Set E\nK : ℝ\nhv : ∀ (t : ℝ) (x : E), x ∈ s t → ∀ (y : E), y ∈ s t → dist (v t x) (v t y) ≤ K * dist x y\nf g f' g' : ℝ → E\na b εf εg δ : ℝ\nhf : ContinuousOn f (Icc a b)\nhf' : ∀ (t : ℝ), t ∈ Ico a b → HasDerivWithinAt f (f' t) (Ici t) t\nf_bound : ∀ (t : ℝ), t ∈ Ico a b → dist (f' t) (v t (f t)) ≤ εf\nhfs : ∀ (t : ℝ), t ∈ Ico a b → f t ∈ s t\nhg : ContinuousOn g (Icc a b)\nhg' : ∀ (t : ℝ), t ∈ Ico a b → HasDerivWithinAt g (g' t) (Ici t) t\ng_bound : ∀ (t : ℝ), t ∈ Ico a b → dist (g' t) (v t (g t)) ≤ εg\nhgs : ∀ (t : ℝ), t ∈ Ico a b → g t ∈ s t\nha : ‖f a - g a‖ ≤ δ\nh_deriv : ∀ (t : ℝ), t ∈ Ico a b → HasDerivWithinAt (fun t => f t - g t) (f' t - g' t) (Ici t) t\n⊢ ∀ (x : ℝ), x ∈ Ico a b → ‖f' x - g' x‖ ≤ K * ‖f x - g x‖ + (εf + εg)\n[PROOFSTEP]\nintro t ht\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nv : ℝ → E → E\ns : ℝ → Set E\nK : ℝ\nhv : ∀ (t : ℝ) (x : E), x ∈ s t → ∀ (y : E), y ∈ s t → dist (v t x) (v t y) ≤ K * dist x y\nf g f' g' : ℝ → E\na b εf εg δ : ℝ\nhf : ContinuousOn f (Icc a b)\nhf' : ∀ (t : ℝ), t ∈ Ico a b → HasDerivWithinAt f (f' t) (Ici t) t\nf_bound : ∀ (t : ℝ), t ∈ Ico a b → dist (f' t) (v t (f t)) ≤ εf\nhfs : ∀ (t : ℝ), t ∈ Ico a b → f t ∈ s t\nhg : ContinuousOn g (Icc a b)\nhg' : ∀ (t : ℝ), t ∈ Ico a b → HasDerivWithinAt g (g' t) (Ici t) t\ng_bound : ∀ (t : ℝ), t ∈ Ico a b → dist (g' t) (v t (g t)) ≤ εg\nhgs : ∀ (t : ℝ), t ∈ Ico a b → g t ∈ s t\nha : ‖f a - g a‖ ≤ δ\nh_deriv : ∀ (t : ℝ), t ∈ Ico a b → HasDerivWithinAt (fun t => f t - g t) (f' t - g' t) (Ici t) t\nt : ℝ\nht : t ∈ Ico a b\n⊢ ‖f' t - g' t‖ ≤ K * ‖f t - g t‖ + (εf + εg)\n[PROOFSTEP]\nhave := dist_triangle4_right (f' t) (g' t) (v t (f t)) (v t (g t))\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nv : ℝ → E → E\ns : ℝ → Set E\nK : ℝ\nhv : ∀ (t : ℝ) (x : E), x ∈ s t → ∀ (y : E), y ∈ s t → dist (v t x) (v t y) ≤ K * dist x y\nf g f' g' : ℝ → E\na b εf εg δ : ℝ\nhf : ContinuousOn f (Icc a b)\nhf' : ∀ (t : ℝ), t ∈ Ico a b → HasDerivWithinAt f (f' t) (Ici t) t\nf_bound : ∀ (t : ℝ), t ∈ Ico a b → dist (f' t) (v t (f t)) ≤ εf\nhfs : ∀ (t : ℝ), t ∈ Ico a b → f t ∈ s t\nhg : ContinuousOn g (Icc a b)\nhg' : ∀ (t : ℝ), t ∈ Ico a b → HasDerivWithinAt g (g' t) (Ici t) t\ng_bound : ∀ (t : ℝ), t ∈ Ico a b → dist (g' t) (v t (g t)) ≤ εg\nhgs : ∀ (t : ℝ), t ∈ Ico a b → g t ∈ s t\nha : ‖f a - g a‖ ≤ δ\nh_deriv : ∀ (t : ℝ), t ∈ Ico a b → HasDerivWithinAt (fun t => f t - g t) (f' t - g' t) (Ici t) t\nt : ℝ\nht : t ∈ Ico a b\nthis : dist (f' t) (g' t) ≤ dist (f' t) (v t (f t)) + dist (g' t) (v t (g t)) + dist (v t (f t)) (v t (g t))\n⊢ ‖f' t - g' t‖ ≤ K * ‖f t - g t‖ + (εf + εg)\n[PROOFSTEP]\nrw [dist_eq_norm] at this \n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nv : ℝ → E → E\ns : ℝ → Set E\nK : ℝ\nhv : ∀ (t : ℝ) (x : E), x ∈ s t → ∀ (y : E), y ∈ s t → dist (v t x) (v t y) ≤ K * dist x y\nf g f' g' : ℝ → E\na b εf εg δ : ℝ\nhf : ContinuousOn f (Icc a b)\nhf' : ∀ (t : ℝ), t ∈ Ico a b → HasDerivWithinAt f (f' t) (Ici t) t\nf_bound : ∀ (t : ℝ), t ∈ Ico a b → dist (f' t) (v t (f t)) ≤ εf\nhfs : ∀ (t : ℝ), t ∈ Ico a b → f t ∈ s t\nhg : ContinuousOn g (Icc a b)\nhg' : ∀ (t : ℝ), t ∈ Ico a b → HasDerivWithinAt g (g' t) (Ici t) t\ng_bound : ∀ (t : ℝ), t ∈ Ico a b → dist (g' t) (v t (g t)) ≤ εg\nhgs : ∀ (t : ℝ), t ∈ Ico a b → g t ∈ s t\nha : ‖f a - g a‖ ≤ δ\nh_deriv : ∀ (t : ℝ), t ∈ Ico a b → HasDerivWithinAt (fun t => f t - g t) (f' t - g' t) (Ici t) t\nt : ℝ\nht : t ∈ Ico a b\nthis : ‖f' t - g' t‖ ≤ dist (f' t) (v t (f t)) + dist (g' t) (v t (g t)) + dist (v t (f t)) (v t (g t))\n⊢ ‖f' t - g' t‖ ≤ K * ‖f t - g t‖ + (εf + εg)\n[PROOFSTEP]\nrefine'\n  this.trans ((add_le_add (add_le_add (f_bound t ht) (g_bound t ht)) (hv t (f t) (hfs t ht) (g t) (hgs t ht))).trans _)\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nv : ℝ → E → E\ns : ℝ → Set E\nK : ℝ\nhv : ∀ (t : ℝ) (x : E), x ∈ s t → ∀ (y : E), y ∈ s t → dist (v t x) (v t y) ≤ K * dist x y\nf g f' g' : ℝ → E\na b εf εg δ : ℝ\nhf : ContinuousOn f (Icc a b)\nhf' : ∀ (t : ℝ), t ∈ Ico a b → HasDerivWithinAt f (f' t) (Ici t) t\nf_bound : ∀ (t : ℝ), t ∈ Ico a b → dist (f' t) (v t (f t)) ≤ εf\nhfs : ∀ (t : ℝ), t ∈ Ico a b → f t ∈ s t\nhg : ContinuousOn g (Icc a b)\nhg' : ∀ (t : ℝ), t ∈ Ico a b → HasDerivWithinAt g (g' t) (Ici t) t\ng_bound : ∀ (t : ℝ), t ∈ Ico a b → dist (g' t) (v t (g t)) ≤ εg\nhgs : ∀ (t : ℝ), t ∈ Ico a b → g t ∈ s t\nha : ‖f a - g a‖ ≤ δ\nh_deriv : ∀ (t : ℝ), t ∈ Ico a b → HasDerivWithinAt (fun t => f t - g t) (f' t - g' t) (Ici t) t\nt : ℝ\nht : t ∈ Ico a b\nthis : ‖f' t - g' t‖ ≤ dist (f' t) (v t (f t)) + dist (g' t) (v t (g t)) + dist (v t (f t)) (v t (g t))\n⊢ εf + εg + K * dist (f t) (g t) ≤ K * ‖f t - g t‖ + (εf + εg)\n[PROOFSTEP]\nrw [dist_eq_norm, add_comm]\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nv : ℝ → E → E\ns : ℝ → Set E\nK : ℝ\nhv : ∀ (t : ℝ) (x : E), x ∈ s t → ∀ (y : E), y ∈ s t → dist (v t x) (v t y) ≤ K * dist x y\nf g : ℝ → E\na b δ : ℝ\nhf : ContinuousOn f (Icc a b)\nhf' : ∀ (t : ℝ), t ∈ Ico a b → HasDerivWithinAt f (v t (f t)) (Ici t) t\nhfs : ∀ (t : ℝ), t ∈ Ico a b → f t ∈ s t\nhg : ContinuousOn g (Icc a b)\nhg' : ∀ (t : ℝ), t ∈ Ico a b → HasDerivWithinAt g (v t (g t)) (Ici t) t\nhgs : ∀ (t : ℝ), t ∈ Ico a b → g t ∈ s t\nha : dist (f a) (g a) ≤ δ\n⊢ ∀ (t : ℝ), t ∈ Icc a b → dist (f t) (g t) ≤ δ * exp (K * (t - a))\n[PROOFSTEP]\nhave f_bound : ∀ t ∈ Ico a b, dist (v t (f t)) (v t (f t)) ≤ 0 := by intros; rw [dist_self]\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nv : ℝ → E → E\ns : ℝ → Set E\nK : ℝ\nhv : ∀ (t : ℝ) (x : E), x ∈ s t → ∀ (y : E), y ∈ s t → dist (v t x) (v t y) ≤ K * dist x y\nf g : ℝ → E\na b δ : ℝ\nhf : ContinuousOn f (Icc a b)\nhf' : ∀ (t : ℝ), t ∈ Ico a b → HasDerivWithinAt f (v t (f t)) (Ici t) t\nhfs : ∀ (t : ℝ), t ∈ Ico a b → f t ∈ s t\nhg : ContinuousOn g (Icc a b)\nhg' : ∀ (t : ℝ), t ∈ Ico a b → HasDerivWithinAt g (v t (g t)) (Ici t) t\nhgs : ∀ (t : ℝ), t ∈ Ico a b → g t ∈ s t\nha : dist (f a) (g a) ≤ δ\n⊢ ∀ (t : ℝ), t ∈ Ico a b → dist (v t (f t)) (v t (f t)) ≤ 0\n[PROOFSTEP]\nintros\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nv : ℝ → E → E\ns : ℝ → Set E\nK : ℝ\nhv : ∀ (t : ℝ) (x : E), x ∈ s t → ∀ (y : E), y ∈ s t → dist (v t x) (v t y) ≤ K * dist x y\nf g : ℝ → E\na b δ : ℝ\nhf : ContinuousOn f (Icc a b)\nhf' : ∀ (t : ℝ), t ∈ Ico a b → HasDerivWithinAt f (v t (f t)) (Ici t) t\nhfs : ∀ (t : ℝ), t ∈ Ico a b → f t ∈ s t\nhg : ContinuousOn g (Icc a b)\nhg' : ∀ (t : ℝ), t ∈ Ico a b → HasDerivWithinAt g (v t (g t)) (Ici t) t\nhgs : ∀ (t : ℝ), t ∈ Ico a b → g t ∈ s t\nha : dist (f a) (g a) ≤ δ\nt✝ : ℝ\na✝ : t✝ ∈ Ico a b\n⊢ dist (v t✝ (f t✝)) (v t✝ (f t✝)) ≤ 0\n[PROOFSTEP]\nrw [dist_self]\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nv : ℝ → E → E\ns : ℝ → Set E\nK : ℝ\nhv : ∀ (t : ℝ) (x : E), x ∈ s t → ∀ (y : E), y ∈ s t → dist (v t x) (v t y) ≤ K * dist x y\nf g : ℝ → E\na b δ : ℝ\nhf : ContinuousOn f (Icc a b)\nhf' : ∀ (t : ℝ), t ∈ Ico a b → HasDerivWithinAt f (v t (f t)) (Ici t) t\nhfs : ∀ (t : ℝ), t ∈ Ico a b → f t ∈ s t\nhg : ContinuousOn g (Icc a b)\nhg' : ∀ (t : ℝ), t ∈ Ico a b → HasDerivWithinAt g (v t (g t)) (Ici t) t\nhgs : ∀ (t : ℝ), t ∈ Ico a b → g t ∈ s t\nha : dist (f a) (g a) ≤ δ\nf_bound : ∀ (t : ℝ), t ∈ Ico a b → dist (v t (f t)) (v t (f t)) ≤ 0\n⊢ ∀ (t : ℝ), t ∈ Icc a b → dist (f t) (g t) ≤ δ * exp (K * (t - a))\n[PROOFSTEP]\nhave g_bound : ∀ t ∈ Ico a b, dist (v t (g t)) (v t (g t)) ≤ 0 := by intros; rw [dist_self]\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nv : ℝ → E → E\ns : ℝ → Set E\nK : ℝ\nhv : ∀ (t : ℝ) (x : E), x ∈ s t → ∀ (y : E), y ∈ s t → dist (v t x) (v t y) ≤ K * dist x y\nf g : ℝ → E\na b δ : ℝ\nhf : ContinuousOn f (Icc a b)\nhf' : ∀ (t : ℝ), t ∈ Ico a b → HasDerivWithinAt f (v t (f t)) (Ici t) t\nhfs : ∀ (t : ℝ), t ∈ Ico a b → f t ∈ s t\nhg : ContinuousOn g (Icc a b)\nhg' : ∀ (t : ℝ), t ∈ Ico a b → HasDerivWithinAt g (v t (g t)) (Ici t) t\nhgs : ∀ (t : ℝ), t ∈ Ico a b → g t ∈ s t\nha : dist (f a) (g a) ≤ δ\nf_bound : ∀ (t : ℝ), t ∈ Ico a b → dist (v t (f t)) (v t (f t)) ≤ 0\n⊢ ∀ (t : ℝ), t ∈ Ico a b → dist (v t (g t)) (v t (g t)) ≤ 0\n[PROOFSTEP]\nintros\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nv : ℝ → E → E\ns : ℝ → Set E\nK : ℝ\nhv : ∀ (t : ℝ) (x : E), x ∈ s t → ∀ (y : E), y ∈ s t → dist (v t x) (v t y) ≤ K * dist x y\nf g : ℝ → E\na b δ : ℝ\nhf : ContinuousOn f (Icc a b)\nhf' : ∀ (t : ℝ), t ∈ Ico a b → HasDerivWithinAt f (v t (f t)) (Ici t) t\nhfs : ∀ (t : ℝ), t ∈ Ico a b → f t ∈ s t\nhg : ContinuousOn g (Icc a b)\nhg' : ∀ (t : ℝ), t ∈ Ico a b → HasDerivWithinAt g (v t (g t)) (Ici t) t\nhgs : ∀ (t : ℝ), t ∈ Ico a b → g t ∈ s t\nha : dist (f a) (g a) ≤ δ\nf_bound : ∀ (t : ℝ), t ∈ Ico a b → dist (v t (f t)) (v t (f t)) ≤ 0\nt✝ : ℝ\na✝ : t✝ ∈ Ico a b\n⊢ dist (v t✝ (g t✝)) (v t✝ (g t✝)) ≤ 0\n[PROOFSTEP]\nrw [dist_self]\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nv : ℝ → E → E\ns : ℝ → Set E\nK : ℝ\nhv : ∀ (t : ℝ) (x : E), x ∈ s t → ∀ (y : E), y ∈ s t → dist (v t x) (v t y) ≤ K * dist x y\nf g : ℝ → E\na b δ : ℝ\nhf : ContinuousOn f (Icc a b)\nhf' : ∀ (t : ℝ), t ∈ Ico a b → HasDerivWithinAt f (v t (f t)) (Ici t) t\nhfs : ∀ (t : ℝ), t ∈ Ico a b → f t ∈ s t\nhg : ContinuousOn g (Icc a b)\nhg' : ∀ (t : ℝ), t ∈ Ico a b → HasDerivWithinAt g (v t (g t)) (Ici t) t\nhgs : ∀ (t : ℝ), t ∈ Ico a b → g t ∈ s t\nha : dist (f a) (g a) ≤ δ\nf_bound : ∀ (t : ℝ), t ∈ Ico a b → dist (v t (f t)) (v t (f t)) ≤ 0\ng_bound : ∀ (t : ℝ), t ∈ Ico a b → dist (v t (g t)) (v t (g t)) ≤ 0\n⊢ ∀ (t : ℝ), t ∈ Icc a b → dist (f t) (g t) ≤ δ * exp (K * (t - a))\n[PROOFSTEP]\nintro t ht\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nv : ℝ → E → E\ns : ℝ → Set E\nK : ℝ\nhv : ∀ (t : ℝ) (x : E), x ∈ s t → ∀ (y : E), y ∈ s t → dist (v t x) (v t y) ≤ K * dist x y\nf g : ℝ → E\na b δ : ℝ\nhf : ContinuousOn f (Icc a b)\nhf' : ∀ (t : ℝ), t ∈ Ico a b → HasDerivWithinAt f (v t (f t)) (Ici t) t\nhfs : ∀ (t : ℝ), t ∈ Ico a b → f t ∈ s t\nhg : ContinuousOn g (Icc a b)\nhg' : ∀ (t : ℝ), t ∈ Ico a b → HasDerivWithinAt g (v t (g t)) (Ici t) t\nhgs : ∀ (t : ℝ), t ∈ Ico a b → g t ∈ s t\nha : dist (f a) (g a) ≤ δ\nf_bound : ∀ (t : ℝ), t ∈ Ico a b → dist (v t (f t)) (v t (f t)) ≤ 0\ng_bound : ∀ (t : ℝ), t ∈ Ico a b → dist (v t (g t)) (v t (g t)) ≤ 0\nt : ℝ\nht : t ∈ Icc a b\n⊢ dist (f t) (g t) ≤ δ * exp (K * (t - a))\n[PROOFSTEP]\nhave := dist_le_of_approx_trajectories_ODE_of_mem_set hv hf hf' f_bound hfs hg hg' g_bound hgs ha t ht\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nv : ℝ → E → E\ns : ℝ → Set E\nK : ℝ\nhv : ∀ (t : ℝ) (x : E), x ∈ s t → ∀ (y : E), y ∈ s t → dist (v t x) (v t y) ≤ K * dist x y\nf g : ℝ → E\na b δ : ℝ\nhf : ContinuousOn f (Icc a b)\nhf' : ∀ (t : ℝ), t ∈ Ico a b → HasDerivWithinAt f (v t (f t)) (Ici t) t\nhfs : ∀ (t : ℝ), t ∈ Ico a b → f t ∈ s t\nhg : ContinuousOn g (Icc a b)\nhg' : ∀ (t : ℝ), t ∈ Ico a b → HasDerivWithinAt g (v t (g t)) (Ici t) t\nhgs : ∀ (t : ℝ), t ∈ Ico a b → g t ∈ s t\nha : dist (f a) (g a) ≤ δ\nf_bound : ∀ (t : ℝ), t ∈ Ico a b → dist (v t (f t)) (v t (f t)) ≤ 0\ng_bound : ∀ (t : ℝ), t ∈ Ico a b → dist (v t (g t)) (v t (g t)) ≤ 0\nt : ℝ\nht : t ∈ Icc a b\nthis : dist (f t) (g t) ≤ gronwallBound δ K (0 + 0) (t - a)\n⊢ dist (f t) (g t) ≤ δ * exp (K * (t - a))\n[PROOFSTEP]\nrwa [zero_add, gronwallBound_ε0] at this \n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nv : ℝ → E → E\ns : ℝ → Set E\nK : ℝ\nhv : ∀ (t : ℝ) (x : E), x ∈ s t → ∀ (y : E), y ∈ s t → dist (v t x) (v t y) ≤ K * dist x y\nf g : ℝ → E\na b : ℝ\nhf : ContinuousOn f (Icc a b)\nhf' : ∀ (t : ℝ), t ∈ Ico a b → HasDerivWithinAt f (v t (f t)) (Ici t) t\nhfs : ∀ (t : ℝ), t ∈ Ico a b → f t ∈ s t\nhg : ContinuousOn g (Icc a b)\nhg' : ∀ (t : ℝ), t ∈ Ico a b → HasDerivWithinAt g (v t (g t)) (Ici t) t\nhgs : ∀ (t : ℝ), t ∈ Ico a b → g t ∈ s t\nha : f a = g a\nt : ℝ\nht : t ∈ Icc a b\n⊢ f t = g t\n[PROOFSTEP]\nhave := dist_le_of_trajectories_ODE_of_mem_set hv hf hf' hfs hg hg' hgs (dist_le_zero.2 ha) t ht\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nv : ℝ → E → E\ns : ℝ → Set E\nK : ℝ\nhv : ∀ (t : ℝ) (x : E), x ∈ s t → ∀ (y : E), y ∈ s t → dist (v t x) (v t y) ≤ K * dist x y\nf g : ℝ → E\na b : ℝ\nhf : ContinuousOn f (Icc a b)\nhf' : ∀ (t : ℝ), t ∈ Ico a b → HasDerivWithinAt f (v t (f t)) (Ici t) t\nhfs : ∀ (t : ℝ), t ∈ Ico a b → f t ∈ s t\nhg : ContinuousOn g (Icc a b)\nhg' : ∀ (t : ℝ), t ∈ Ico a b → HasDerivWithinAt g (v t (g t)) (Ici t) t\nhgs : ∀ (t : ℝ), t ∈ Ico a b → g t ∈ s t\nha : f a = g a\nt : ℝ\nht : t ∈ Icc a b\nthis : dist (f t) (g t) ≤ 0 * exp (K * (t - a))\n⊢ f t = g t\n[PROOFSTEP]\nrwa [zero_mul, dist_le_zero] at this \n", "meta": {"mathlib_filename": "Mathlib.Analysis.ODE.Gronwall", "llama_tokens": 17914, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8056321796478256, "lm_q2_score": 0.6619228758499942, "lm_q1q2_score": 0.5332663692297879}}
{"text": "[GOAL]\nG : Type u_1\ninst✝ : Group G\nH : Subgroup G\n⊢ Saturated H ↔ ∀ (n : ℤ) (g : G), g ^ n ∈ H → n = 0 ∨ g ∈ H\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nG : Type u_1\ninst✝ : Group G\nH : Subgroup G\n⊢ Saturated H → ∀ (n : ℤ) (g : G), g ^ n ∈ H → n = 0 ∨ g ∈ H\n[PROOFSTEP]\nintros hH n g hgn\n[GOAL]\ncase mp\nG : Type u_1\ninst✝ : Group G\nH : Subgroup G\nhH : Saturated H\nn : ℤ\ng : G\nhgn : g ^ n ∈ H\n⊢ n = 0 ∨ g ∈ H\n[PROOFSTEP]\ninduction' n with n n\n[GOAL]\ncase mp.ofNat\nG : Type u_1\ninst✝ : Group G\nH : Subgroup G\nhH : Saturated H\nn✝ : ℤ\ng : G\nhgn✝ : g ^ n✝ ∈ H\nn : ℕ\nhgn : g ^ Int.ofNat n ∈ H\n⊢ Int.ofNat n = 0 ∨ g ∈ H\n[PROOFSTEP]\nsimp only [Int.coe_nat_eq_zero, Int.ofNat_eq_coe, zpow_ofNat] at hgn ⊢\n[GOAL]\ncase mp.ofNat\nG : Type u_1\ninst✝ : Group G\nH : Subgroup G\nhH : Saturated H\nn✝ : ℤ\ng : G\nhgn✝ : g ^ n✝ ∈ H\nn : ℕ\nhgn : g ^ n ∈ H\n⊢ n = 0 ∨ g ∈ H\n[PROOFSTEP]\nexact hH hgn\n[GOAL]\ncase mp.negSucc\nG : Type u_1\ninst✝ : Group G\nH : Subgroup G\nhH : Saturated H\nn✝ : ℤ\ng : G\nhgn✝ : g ^ n✝ ∈ H\nn : ℕ\nhgn : g ^ Int.negSucc n ∈ H\n⊢ Int.negSucc n = 0 ∨ g ∈ H\n[PROOFSTEP]\nsuffices g ^ (n + 1) ∈ H by\n  refine' (hH this).imp _ id\n  simp only [IsEmpty.forall_iff, Nat.succ_ne_zero]\n[GOAL]\nG : Type u_1\ninst✝ : Group G\nH : Subgroup G\nhH : Saturated H\nn✝ : ℤ\ng : G\nhgn✝ : g ^ n✝ ∈ H\nn : ℕ\nhgn : g ^ Int.negSucc n ∈ H\nthis : g ^ (n + 1) ∈ H\n⊢ Int.negSucc n = 0 ∨ g ∈ H\n[PROOFSTEP]\nrefine' (hH this).imp _ id\n[GOAL]\nG : Type u_1\ninst✝ : Group G\nH : Subgroup G\nhH : Saturated H\nn✝ : ℤ\ng : G\nhgn✝ : g ^ n✝ ∈ H\nn : ℕ\nhgn : g ^ Int.negSucc n ∈ H\nthis : g ^ (n + 1) ∈ H\n⊢ n + 1 = 0 → Int.negSucc n = 0\n[PROOFSTEP]\nsimp only [IsEmpty.forall_iff, Nat.succ_ne_zero]\n[GOAL]\ncase mp.negSucc\nG : Type u_1\ninst✝ : Group G\nH : Subgroup G\nhH : Saturated H\nn✝ : ℤ\ng : G\nhgn✝ : g ^ n✝ ∈ H\nn : ℕ\nhgn : g ^ Int.negSucc n ∈ H\n⊢ g ^ (n + 1) ∈ H\n[PROOFSTEP]\nsimpa only [inv_mem_iff, zpow_negSucc] using hgn\n[GOAL]\ncase mpr\nG : Type u_1\ninst✝ : Group G\nH : Subgroup G\n⊢ (∀ (n : ℤ) (g : G), g ^ n ∈ H → n = 0 ∨ g ∈ H) → Saturated H\n[PROOFSTEP]\nintro h n g hgn\n[GOAL]\ncase mpr\nG : Type u_1\ninst✝ : Group G\nH : Subgroup G\nh : ∀ (n : ℤ) (g : G), g ^ n ∈ H → n = 0 ∨ g ∈ H\nn : ℕ\ng : G\nhgn : g ^ n ∈ H\n⊢ n = 0 ∨ g ∈ H\n[PROOFSTEP]\nspecialize h n g\n[GOAL]\ncase mpr\nG : Type u_1\ninst✝ : Group G\nH : Subgroup G\nn : ℕ\ng : G\nhgn : g ^ n ∈ H\nh : g ^ ↑n ∈ H → ↑n = 0 ∨ g ∈ H\n⊢ n = 0 ∨ g ∈ H\n[PROOFSTEP]\nsimp only [Int.coe_nat_eq_zero, zpow_ofNat] at h \n[GOAL]\ncase mpr\nG : Type u_1\ninst✝ : Group G\nH : Subgroup G\nn : ℕ\ng : G\nhgn : g ^ n ∈ H\nh : g ^ n ∈ H → n = 0 ∨ g ∈ H\n⊢ n = 0 ∨ g ∈ H\n[PROOFSTEP]\napply h hgn\n[GOAL]\nA₁ : Type u_1\nA₂ : Type u_2\ninst✝² : AddCommGroup A₁\ninst✝¹ : AddCommGroup A₂\ninst✝ : NoZeroSMulDivisors ℕ A₂\nf : A₁ →+ A₂\n⊢ Saturated (AddMonoidHom.ker f)\n[PROOFSTEP]\nintro n g hg\n[GOAL]\nA₁ : Type u_1\nA₂ : Type u_2\ninst✝² : AddCommGroup A₁\ninst✝¹ : AddCommGroup A₂\ninst✝ : NoZeroSMulDivisors ℕ A₂\nf : A₁ →+ A₂\nn : ℕ\ng : A₁\nhg : n • g ∈ AddMonoidHom.ker f\n⊢ n = 0 ∨ g ∈ AddMonoidHom.ker f\n[PROOFSTEP]\nsimpa only [f.mem_ker, nsmul_eq_smul, f.map_nsmul, smul_eq_zero] using hg\n", "meta": {"mathlib_filename": "Mathlib.GroupTheory.Subgroup.Saturated", "llama_tokens": 1725, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7549149868676283, "lm_q2_score": 0.7057850340255385, "lm_q1q2_score": 0.532807699692758}}
{"text": "[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nA B✝ : C\nf g : A ⟶ B✝\nF : C ⥤ D\nG : D ⥤ C\nadj : F ⊣ G\nB : D\n⊢ F.map (NatTrans.app adj.unit (G.obj B)) ≫ F.map (G.map (NatTrans.app adj.counit B)) = 𝟙 (F.obj (G.obj ((𝟭 D).obj B)))\n[PROOFSTEP]\nrw [← F.map_comp, adj.right_triangle_components]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nA B✝ : C\nf g : A ⟶ B✝\nF : C ⥤ D\nG : D ⥤ C\nadj : F ⊣ G\nB : D\n⊢ F.map (𝟙 (G.obj B)) = 𝟙 (F.obj (G.obj ((𝟭 D).obj B)))\n[PROOFSTEP]\napply F.map_id\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nA✝ B✝ : C\nf✝ g✝ : A✝ ⟶ B✝\nF : C ⥤ D\nG : D ⥤ C\nadj : F ⊣ G\ninst✝ : HasReflexiveCoequalizers C\nA B : C\nf g : A ⟶ B\nr : B ⟶ A\nrf : r ≫ f = 𝟙 B\nrg : r ≫ g = 𝟙 B\n⊢ HasCoequalizer f g\n[PROOFSTEP]\nletI := IsReflexivePair.mk' r rf rg\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nA✝ B✝ : C\nf✝ g✝ : A✝ ⟶ B✝\nF : C ⥤ D\nG : D ⥤ C\nadj : F ⊣ G\ninst✝ : HasReflexiveCoequalizers C\nA B : C\nf g : A ⟶ B\nr : B ⟶ A\nrf : r ≫ f = 𝟙 B\nrg : r ≫ g = 𝟙 B\nthis : IsReflexivePair f g := IsReflexivePair.mk' r rf rg\n⊢ HasCoequalizer f g\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nA✝ B✝ : C\nf✝ g✝ : A✝ ⟶ B✝\nF : C ⥤ D\nG : D ⥤ C\nadj : F ⊣ G\ninst✝ : HasCoreflexiveEqualizers C\nA B : C\nf g : A ⟶ B\nr : B ⟶ A\nfr : f ≫ r = 𝟙 A\ngr : g ≫ r = 𝟙 A\n⊢ HasEqualizer f g\n[PROOFSTEP]\nletI := IsCoreflexivePair.mk' r fr gr\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nA✝ B✝ : C\nf✝ g✝ : A✝ ⟶ B✝\nF : C ⥤ D\nG : D ⥤ C\nadj : F ⊣ G\ninst✝ : HasCoreflexiveEqualizers C\nA B : C\nf g : A ⟶ B\nr : B ⟶ A\nfr : f ≫ r = 𝟙 A\ngr : g ≫ r = 𝟙 A\nthis : IsCoreflexivePair f g := IsCoreflexivePair.mk' r fr gr\n⊢ HasEqualizer f g\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nA✝ B✝ : C\nf✝ g✝ : A✝ ⟶ B✝\nF : C ⥤ D\nG : D ⥤ C\nadj : F ⊣ G\ninst✝ : HasCoequalizers C\nA B : C\nf g : A ⟶ B\nx✝ : IsReflexivePair f g\n⊢ HasCoequalizer f g\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nA✝ B✝ : C\nf✝ g✝ : A✝ ⟶ B✝\nF : C ⥤ D\nG : D ⥤ C\nadj : F ⊣ G\ninst✝ : HasEqualizers C\nA B : C\nf g : A ⟶ B\nx✝ : IsCoreflexivePair f g\n⊢ HasEqualizer f g\n[PROOFSTEP]\ninfer_instance\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Limits.Shapes.Reflexive", "llama_tokens": 1445, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8558511396138365, "lm_q2_score": 0.6224593312018545, "lm_q1q2_score": 0.5327325279723737}}
{"text": "[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf g : 𝓢(E, F)\nh : (fun f => f.toFun) f = (fun f => f.toFun) g\n⊢ f = g\n[PROOFSTEP]\ncases f\n[GOAL]\ncase mk\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ng : 𝓢(E, F)\ntoFun✝ : E → F\nsmooth'✝ : ContDiff ℝ ⊤ toFun✝\ndecay'✝ : ∀ (k n : ℕ), ∃ C, ∀ (x : E), ‖x‖ ^ k * ‖iteratedFDeriv ℝ n toFun✝ x‖ ≤ C\nh : (fun f => f.toFun) { toFun := toFun✝, smooth' := smooth'✝, decay' := decay'✝ } = (fun f => f.toFun) g\n⊢ { toFun := toFun✝, smooth' := smooth'✝, decay' := decay'✝ } = g\n[PROOFSTEP]\ncases g\n[GOAL]\ncase mk.mk\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\ntoFun✝¹ : E → F\nsmooth'✝¹ : ContDiff ℝ ⊤ toFun✝¹\ndecay'✝¹ : ∀ (k n : ℕ), ∃ C, ∀ (x : E), ‖x‖ ^ k * ‖iteratedFDeriv ℝ n toFun✝¹ x‖ ≤ C\ntoFun✝ : E → F\nsmooth'✝ : ContDiff ℝ ⊤ toFun✝\ndecay'✝ : ∀ (k n : ℕ), ∃ C, ∀ (x : E), ‖x‖ ^ k * ‖iteratedFDeriv ℝ n toFun✝ x‖ ≤ C\nh :\n  (fun f => f.toFun) { toFun := toFun✝¹, smooth' := smooth'✝¹, decay' := decay'✝¹ } =\n    (fun f => f.toFun) { toFun := toFun✝, smooth' := smooth'✝, decay' := decay'✝ }\n⊢ { toFun := toFun✝¹, smooth' := smooth'✝¹, decay' := decay'✝¹ } =\n    { toFun := toFun✝, smooth' := smooth'✝, decay' := decay'✝ }\n[PROOFSTEP]\ncongr\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : 𝓢(E, F)\nk n : ℕ\n⊢ ∃ C, 0 < C ∧ ∀ (x : E), ‖x‖ ^ k * ‖iteratedFDeriv ℝ n (↑f) x‖ ≤ C\n[PROOFSTEP]\nrcases f.decay' k n with ⟨C, hC⟩\n[GOAL]\ncase intro\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : 𝓢(E, F)\nk n : ℕ\nC : ℝ\nhC : ∀ (x : E), ‖x‖ ^ k * ‖iteratedFDeriv ℝ n f.toFun x‖ ≤ C\n⊢ ∃ C, 0 < C ∧ ∀ (x : E), ‖x‖ ^ k * ‖iteratedFDeriv ℝ n (↑f) x‖ ≤ C\n[PROOFSTEP]\nexact ⟨max C 1, by positivity, fun x => (hC x).trans (le_max_left _ _)⟩\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : 𝓢(E, F)\nk n : ℕ\nC : ℝ\nhC : ∀ (x : E), ‖x‖ ^ k * ‖iteratedFDeriv ℝ n f.toFun x‖ ≤ C\n⊢ 0 < max C 1\n[PROOFSTEP]\npositivity\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : 𝓢(E, F)\nk : ℕ\n⊢ ↑f =O[cocompact E] fun x => ‖x‖ ^ (-↑k)\n[PROOFSTEP]\nobtain ⟨d, _, hd'⟩ := f.decay k 0\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : 𝓢(E, F)\nk : ℕ\nd : ℝ\nleft✝ : 0 < d\nhd' : ∀ (x : E), ‖x‖ ^ k * ‖iteratedFDeriv ℝ 0 (↑f) x‖ ≤ d\n⊢ ↑f =O[cocompact E] fun x => ‖x‖ ^ (-↑k)\n[PROOFSTEP]\nsimp only [norm_iteratedFDeriv_zero] at hd' \n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : 𝓢(E, F)\nk : ℕ\nd : ℝ\nleft✝ : 0 < d\nhd' : ∀ (x : E), ‖x‖ ^ k * ‖↑f x‖ ≤ d\n⊢ ↑f =O[cocompact E] fun x => ‖x‖ ^ (-↑k)\n[PROOFSTEP]\nsimp_rw [Asymptotics.IsBigO, Asymptotics.IsBigOWith]\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : 𝓢(E, F)\nk : ℕ\nd : ℝ\nleft✝ : 0 < d\nhd' : ∀ (x : E), ‖x‖ ^ k * ‖↑f x‖ ≤ d\n⊢ ∃ c, ∀ᶠ (x : E) in cocompact E, ‖↑f x‖ ≤ c * ‖‖x‖ ^ (-↑k)‖\n[PROOFSTEP]\nrefine' ⟨d, Filter.Eventually.filter_mono Filter.cocompact_le_cofinite _⟩\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : 𝓢(E, F)\nk : ℕ\nd : ℝ\nleft✝ : 0 < d\nhd' : ∀ (x : E), ‖x‖ ^ k * ‖↑f x‖ ≤ d\n⊢ ∀ᶠ (x : E) in cofinite, ‖↑f x‖ ≤ d * ‖‖x‖ ^ (-↑k)‖\n[PROOFSTEP]\nrefine' (Filter.eventually_cofinite_ne 0).mono fun x hx => _\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : 𝓢(E, F)\nk : ℕ\nd : ℝ\nleft✝ : 0 < d\nhd' : ∀ (x : E), ‖x‖ ^ k * ‖↑f x‖ ≤ d\nx : E\nhx : x ≠ 0\n⊢ ‖↑f x‖ ≤ d * ‖‖x‖ ^ (-↑k)‖\n[PROOFSTEP]\nrw [Real.norm_of_nonneg (zpow_nonneg (norm_nonneg _) _), zpow_neg, ← div_eq_mul_inv, le_div_iff']\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : 𝓢(E, F)\nk : ℕ\nd : ℝ\nleft✝ : 0 < d\nhd' : ∀ (x : E), ‖x‖ ^ k * ‖↑f x‖ ≤ d\nx : E\nhx : x ≠ 0\n⊢ ‖x‖ ^ ↑k * ‖↑f x‖ ≤ d\ncase intro.intro\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : 𝓢(E, F)\nk : ℕ\nd : ℝ\nleft✝ : 0 < d\nhd' : ∀ (x : E), ‖x‖ ^ k * ‖↑f x‖ ≤ d\nx : E\nhx : x ≠ 0\n⊢ 0 < ‖x‖ ^ ↑k\n[PROOFSTEP]\nexacts [hd' x, zpow_pos_of_pos (norm_pos_iff.mpr hx) _]\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\nf : 𝓢(E, F)\ninst✝ : ProperSpace E\ns : ℝ\n⊢ ↑f =O[cocompact E] fun x => ‖x‖ ^ s\n[PROOFSTEP]\nlet k := ⌈-s⌉₊\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\nf : 𝓢(E, F)\ninst✝ : ProperSpace E\ns : ℝ\nk : ℕ := ⌈-s⌉₊\n⊢ ↑f =O[cocompact E] fun x => ‖x‖ ^ s\n[PROOFSTEP]\nhave hk : -(k : ℝ) ≤ s := neg_le.mp (Nat.le_ceil (-s))\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\nf : 𝓢(E, F)\ninst✝ : ProperSpace E\ns : ℝ\nk : ℕ := ⌈-s⌉₊\nhk : -↑k ≤ s\n⊢ ↑f =O[cocompact E] fun x => ‖x‖ ^ s\n[PROOFSTEP]\nrefine' (isBigO_cocompact_zpow_neg_nat f k).trans _\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\nf : 𝓢(E, F)\ninst✝ : ProperSpace E\ns : ℝ\nk : ℕ := ⌈-s⌉₊\nhk : -↑k ≤ s\n⊢ (fun x => ‖x‖ ^ (-↑k)) =O[cocompact E] fun x => ‖x‖ ^ s\n[PROOFSTEP]\nsuffices (fun x : ℝ => x ^ (-k : ℤ)) =O[atTop] fun x : ℝ => x ^ s from this.comp_tendsto tendsto_norm_cocompact_atTop\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\nf : 𝓢(E, F)\ninst✝ : ProperSpace E\ns : ℝ\nk : ℕ := ⌈-s⌉₊\nhk : -↑k ≤ s\n⊢ (fun x => x ^ (-↑k)) =O[atTop] fun x => x ^ s\n[PROOFSTEP]\nsimp_rw [Asymptotics.IsBigO, Asymptotics.IsBigOWith]\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\nf : 𝓢(E, F)\ninst✝ : ProperSpace E\ns : ℝ\nk : ℕ := ⌈-s⌉₊\nhk : -↑k ≤ s\n⊢ ∃ c, ∀ᶠ (x : ℝ) in atTop, ‖x ^ (-↑⌈-s⌉₊)‖ ≤ c * ‖x ^ s‖\n[PROOFSTEP]\nrefine' ⟨1, (Filter.eventually_ge_atTop 1).mono fun x hx => _⟩\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\nf : 𝓢(E, F)\ninst✝ : ProperSpace E\ns : ℝ\nk : ℕ := ⌈-s⌉₊\nhk : -↑k ≤ s\nx : ℝ\nhx : 1 ≤ x\n⊢ ‖x ^ (-↑⌈-s⌉₊)‖ ≤ 1 * ‖x ^ s‖\n[PROOFSTEP]\nrw [one_mul, Real.norm_of_nonneg (Real.rpow_nonneg_of_nonneg (zero_le_one.trans hx) _),\n  Real.norm_of_nonneg (zpow_nonneg (zero_le_one.trans hx) _), ← Real.rpow_int_cast, Int.cast_neg, Int.cast_ofNat]\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\nf : 𝓢(E, F)\ninst✝ : ProperSpace E\ns : ℝ\nk : ℕ := ⌈-s⌉₊\nhk : -↑k ≤ s\nx : ℝ\nhx : 1 ≤ x\n⊢ x ^ (-↑⌈-s⌉₊) ≤ x ^ s\n[PROOFSTEP]\nexact Real.rpow_le_rpow_of_exponent_le hx hk\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\nf : 𝓢(E, F)\ninst✝ : ProperSpace E\nk : ℤ\n⊢ ↑f =O[cocompact E] fun x => ‖x‖ ^ k\n[PROOFSTEP]\nsimpa only [Real.rpow_int_cast] using isBigO_cocompact_rpow f k\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nk n : ℕ\nf g : 𝓢(E, F)\nx : E\n⊢ ‖x‖ ^ k * ‖iteratedFDeriv ℝ n (↑f + ↑g) x‖ ≤\n    ‖x‖ ^ k * ‖iteratedFDeriv ℝ n (↑f) x‖ + ‖x‖ ^ k * ‖iteratedFDeriv ℝ n (↑g) x‖\n[PROOFSTEP]\nrw [← mul_add]\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nk n : ℕ\nf g : 𝓢(E, F)\nx : E\n⊢ ‖x‖ ^ k * ‖iteratedFDeriv ℝ n (↑f + ↑g) x‖ ≤ ‖x‖ ^ k * (‖iteratedFDeriv ℝ n (↑f) x‖ + ‖iteratedFDeriv ℝ n (↑g) x‖)\n[PROOFSTEP]\nrefine' mul_le_mul_of_nonneg_left _ (by positivity)\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nk n : ℕ\nf g : 𝓢(E, F)\nx : E\n⊢ 0 ≤ ‖x‖ ^ k\n[PROOFSTEP]\npositivity\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nk n : ℕ\nf g : 𝓢(E, F)\nx : E\n⊢ ‖iteratedFDeriv ℝ n (↑f + ↑g) x‖ ≤ ‖iteratedFDeriv ℝ n (↑f) x‖ + ‖iteratedFDeriv ℝ n (↑g) x‖\n[PROOFSTEP]\nrw [iteratedFDeriv_add_apply (f.smooth _) (g.smooth _)]\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nk n : ℕ\nf g : 𝓢(E, F)\nx : E\n⊢ ‖iteratedFDeriv ℝ n (↑f) x + iteratedFDeriv ℝ n (↑g) x‖ ≤ ‖iteratedFDeriv ℝ n (↑f) x‖ + ‖iteratedFDeriv ℝ n (↑g) x‖\n[PROOFSTEP]\nexact norm_add_le _ _\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nk n : ℕ\nf : 𝓢(E, F)\nx : E\n⊢ ‖x‖ ^ k * ‖iteratedFDeriv ℝ n (-↑f) x‖ = ‖x‖ ^ k * ‖iteratedFDeriv ℝ n (↑f) x‖\n[PROOFSTEP]\nrw [iteratedFDeriv_neg_apply, norm_neg]\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : SMulCommClass ℝ 𝕜 F\nk n : ℕ\nf : 𝓢(E, F)\nc : 𝕜\nx : E\n⊢ ‖x‖ ^ k * ‖iteratedFDeriv ℝ n (c • ↑f) x‖ = ‖c‖ * ‖x‖ ^ k * ‖iteratedFDeriv ℝ n (↑f) x‖\n[PROOFSTEP]\nrw [mul_comm ‖c‖, mul_assoc, iteratedFDeriv_const_smul_apply (f.smooth _), norm_smul]\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace ℝ E\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace ℝ F\ninst✝⁵ : NormedField 𝕜\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : SMulCommClass ℝ 𝕜 F\ninst✝² : NormedField 𝕜'\ninst✝¹ : NormedSpace 𝕜' F\ninst✝ : SMulCommClass ℝ 𝕜' F\nc : 𝕜\nf : 𝓢(E, F)\nk n : ℕ\n⊢ ∃ C, ∀ (x : E), ‖x‖ ^ k * ‖iteratedFDeriv ℝ n (c • ↑f) x‖ ≤ C\n[PROOFSTEP]\nrefine' ⟨f.seminormAux k n * (‖c‖ + 1), fun x => _⟩\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace ℝ E\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace ℝ F\ninst✝⁵ : NormedField 𝕜\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : SMulCommClass ℝ 𝕜 F\ninst✝² : NormedField 𝕜'\ninst✝¹ : NormedSpace 𝕜' F\ninst✝ : SMulCommClass ℝ 𝕜' F\nc : 𝕜\nf : 𝓢(E, F)\nk n : ℕ\nx : E\n⊢ ‖x‖ ^ k * ‖iteratedFDeriv ℝ n (c • ↑f) x‖ ≤ SchwartzMap.seminormAux k n f * (‖c‖ + 1)\n[PROOFSTEP]\nhave hc : 0 ≤ ‖c‖ := by positivity\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace ℝ E\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace ℝ F\ninst✝⁵ : NormedField 𝕜\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : SMulCommClass ℝ 𝕜 F\ninst✝² : NormedField 𝕜'\ninst✝¹ : NormedSpace 𝕜' F\ninst✝ : SMulCommClass ℝ 𝕜' F\nc : 𝕜\nf : 𝓢(E, F)\nk n : ℕ\nx : E\n⊢ 0 ≤ ‖c‖\n[PROOFSTEP]\npositivity\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace ℝ E\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace ℝ F\ninst✝⁵ : NormedField 𝕜\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : SMulCommClass ℝ 𝕜 F\ninst✝² : NormedField 𝕜'\ninst✝¹ : NormedSpace 𝕜' F\ninst✝ : SMulCommClass ℝ 𝕜' F\nc : 𝕜\nf : 𝓢(E, F)\nk n : ℕ\nx : E\nhc : 0 ≤ ‖c‖\n⊢ ‖x‖ ^ k * ‖iteratedFDeriv ℝ n (c • ↑f) x‖ ≤ SchwartzMap.seminormAux k n f * (‖c‖ + 1)\n[PROOFSTEP]\nrefine' le_trans _ ((mul_le_mul_of_nonneg_right (f.le_seminormAux k n x) hc).trans _)\n[GOAL]\ncase refine'_1\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace ℝ E\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace ℝ F\ninst✝⁵ : NormedField 𝕜\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : SMulCommClass ℝ 𝕜 F\ninst✝² : NormedField 𝕜'\ninst✝¹ : NormedSpace 𝕜' F\ninst✝ : SMulCommClass ℝ 𝕜' F\nc : 𝕜\nf : 𝓢(E, F)\nk n : ℕ\nx : E\nhc : 0 ≤ ‖c‖\n⊢ ‖x‖ ^ k * ‖iteratedFDeriv ℝ n (c • ↑f) x‖ ≤ ‖x‖ ^ k * ‖iteratedFDeriv ℝ n (↑f) x‖ * ‖c‖\n[PROOFSTEP]\napply Eq.le\n[GOAL]\ncase refine'_1.a\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace ℝ E\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace ℝ F\ninst✝⁵ : NormedField 𝕜\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : SMulCommClass ℝ 𝕜 F\ninst✝² : NormedField 𝕜'\ninst✝¹ : NormedSpace 𝕜' F\ninst✝ : SMulCommClass ℝ 𝕜' F\nc : 𝕜\nf : 𝓢(E, F)\nk n : ℕ\nx : E\nhc : 0 ≤ ‖c‖\n⊢ ‖x‖ ^ k * ‖iteratedFDeriv ℝ n (c • ↑f) x‖ = ‖x‖ ^ k * ‖iteratedFDeriv ℝ n (↑f) x‖ * ‖c‖\n[PROOFSTEP]\nrw [mul_comm _ ‖c‖, ← mul_assoc]\n[GOAL]\ncase refine'_1.a\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace ℝ E\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace ℝ F\ninst✝⁵ : NormedField 𝕜\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : SMulCommClass ℝ 𝕜 F\ninst✝² : NormedField 𝕜'\ninst✝¹ : NormedSpace 𝕜' F\ninst✝ : SMulCommClass ℝ 𝕜' F\nc : 𝕜\nf : 𝓢(E, F)\nk n : ℕ\nx : E\nhc : 0 ≤ ‖c‖\n⊢ ‖x‖ ^ k * ‖iteratedFDeriv ℝ n (c • ↑f) x‖ = ‖c‖ * ‖x‖ ^ k * ‖iteratedFDeriv ℝ n (↑f) x‖\n[PROOFSTEP]\nexact decay_smul_aux k n f c x\n[GOAL]\ncase refine'_2\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace ℝ E\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace ℝ F\ninst✝⁵ : NormedField 𝕜\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : SMulCommClass ℝ 𝕜 F\ninst✝² : NormedField 𝕜'\ninst✝¹ : NormedSpace 𝕜' F\ninst✝ : SMulCommClass ℝ 𝕜' F\nc : 𝕜\nf : 𝓢(E, F)\nk n : ℕ\nx : E\nhc : 0 ≤ ‖c‖\n⊢ SchwartzMap.seminormAux k n f * ‖c‖ ≤ SchwartzMap.seminormAux k n f * (‖c‖ + 1)\n[PROOFSTEP]\napply mul_le_mul_of_nonneg_left _ (f.seminormAux_nonneg k n)\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace ℝ E\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace ℝ F\ninst✝⁵ : NormedField 𝕜\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : SMulCommClass ℝ 𝕜 F\ninst✝² : NormedField 𝕜'\ninst✝¹ : NormedSpace 𝕜' F\ninst✝ : SMulCommClass ℝ 𝕜' F\nc : 𝕜\nf : 𝓢(E, F)\nk n : ℕ\nx : E\nhc : 0 ≤ ‖c‖\n⊢ ‖c‖ ≤ ‖c‖ + 1\n[PROOFSTEP]\nlinarith\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace ℝ E\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace ℝ F\ninst✝⁵ : NormedField 𝕜\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : SMulCommClass ℝ 𝕜 F\ninst✝² : NormedField 𝕜'\ninst✝¹ : NormedSpace 𝕜' F\ninst✝ : SMulCommClass ℝ 𝕜' F\nk n : ℕ\nc : 𝕜\nf : 𝓢(E, F)\n⊢ SchwartzMap.seminormAux k n (c • f) ≤ ‖c‖ * SchwartzMap.seminormAux k n f\n[PROOFSTEP]\nrefine'\n  (c • f).seminormAux_le_bound k n (mul_nonneg (norm_nonneg _) (seminormAux_nonneg _ _ _)) fun x =>\n    (decay_smul_aux k n f c x).le.trans _\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace ℝ E\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace ℝ F\ninst✝⁵ : NormedField 𝕜\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : SMulCommClass ℝ 𝕜 F\ninst✝² : NormedField 𝕜'\ninst✝¹ : NormedSpace 𝕜' F\ninst✝ : SMulCommClass ℝ 𝕜' F\nk n : ℕ\nc : 𝕜\nf : 𝓢(E, F)\nx : E\n⊢ ‖c‖ * ‖x‖ ^ k * ‖iteratedFDeriv ℝ n (↑f) x‖ ≤ ‖c‖ * SchwartzMap.seminormAux k n f\n[PROOFSTEP]\nrw [mul_assoc]\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace ℝ E\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace ℝ F\ninst✝⁵ : NormedField 𝕜\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : SMulCommClass ℝ 𝕜 F\ninst✝² : NormedField 𝕜'\ninst✝¹ : NormedSpace 𝕜' F\ninst✝ : SMulCommClass ℝ 𝕜' F\nk n : ℕ\nc : 𝕜\nf : 𝓢(E, F)\nx : E\n⊢ ‖c‖ * (‖x‖ ^ k * ‖iteratedFDeriv ℝ n (↑f) x‖) ≤ ‖c‖ * SchwartzMap.seminormAux k n f\n[PROOFSTEP]\nexact mul_le_mul_of_nonneg_left (f.le_seminormAux k n x) (norm_nonneg _)\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace ℝ E\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace ℝ F\ninst✝⁵ : NormedField 𝕜\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : SMulCommClass ℝ 𝕜 F\ninst✝² : NormedField 𝕜'\ninst✝¹ : NormedSpace 𝕜' F\ninst✝ : SMulCommClass ℝ 𝕜' F\nc : ℕ\nf : 𝓢(E, F)\n⊢ ∀ (k n : ℕ), ∃ C, ∀ (x : E), ‖x‖ ^ k * ‖iteratedFDeriv ℝ n (c • ↑f) x‖ ≤ C\n[PROOFSTEP]\nhave : c • (f : E → F) = (c : ℝ) • f := by\n  ext x\n  simp only [Pi.smul_apply, smul_apply]\n  exact nsmul_eq_smul_cast _ _ _\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace ℝ E\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace ℝ F\ninst✝⁵ : NormedField 𝕜\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : SMulCommClass ℝ 𝕜 F\ninst✝² : NormedField 𝕜'\ninst✝¹ : NormedSpace 𝕜' F\ninst✝ : SMulCommClass ℝ 𝕜' F\nc : ℕ\nf : 𝓢(E, F)\n⊢ c • ↑f = ↑(↑c • f)\n[PROOFSTEP]\next x\n[GOAL]\ncase h\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace ℝ E\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace ℝ F\ninst✝⁵ : NormedField 𝕜\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : SMulCommClass ℝ 𝕜 F\ninst✝² : NormedField 𝕜'\ninst✝¹ : NormedSpace 𝕜' F\ninst✝ : SMulCommClass ℝ 𝕜' F\nc : ℕ\nf : 𝓢(E, F)\nx : E\n⊢ (c • ↑f) x = ↑(↑c • f) x\n[PROOFSTEP]\nsimp only [Pi.smul_apply, smul_apply]\n[GOAL]\ncase h\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace ℝ E\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace ℝ F\ninst✝⁵ : NormedField 𝕜\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : SMulCommClass ℝ 𝕜 F\ninst✝² : NormedField 𝕜'\ninst✝¹ : NormedSpace 𝕜' F\ninst✝ : SMulCommClass ℝ 𝕜' F\nc : ℕ\nf : 𝓢(E, F)\nx : E\n⊢ c • ↑f x = ↑c • ↑f x\n[PROOFSTEP]\nexact nsmul_eq_smul_cast _ _ _\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace ℝ E\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace ℝ F\ninst✝⁵ : NormedField 𝕜\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : SMulCommClass ℝ 𝕜 F\ninst✝² : NormedField 𝕜'\ninst✝¹ : NormedSpace 𝕜' F\ninst✝ : SMulCommClass ℝ 𝕜' F\nc : ℕ\nf : 𝓢(E, F)\nthis : c • ↑f = ↑(↑c • f)\n⊢ ∀ (k n : ℕ), ∃ C, ∀ (x : E), ‖x‖ ^ k * ‖iteratedFDeriv ℝ n (c • ↑f) x‖ ≤ C\n[PROOFSTEP]\nsimp only [this]\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace ℝ E\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace ℝ F\ninst✝⁵ : NormedField 𝕜\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : SMulCommClass ℝ 𝕜 F\ninst✝² : NormedField 𝕜'\ninst✝¹ : NormedSpace 𝕜' F\ninst✝ : SMulCommClass ℝ 𝕜' F\nc : ℕ\nf : 𝓢(E, F)\nthis : c • ↑f = ↑(↑c • f)\n⊢ ∀ (k n : ℕ), ∃ C, ∀ (x : E), ‖x‖ ^ k * ‖iteratedFDeriv ℝ n (↑(↑c • f)) x‖ ≤ C\n[PROOFSTEP]\nexact ((c : ℝ) • f).decay'\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace ℝ E\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace ℝ F\ninst✝⁵ : NormedField 𝕜\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : SMulCommClass ℝ 𝕜 F\ninst✝² : NormedField 𝕜'\ninst✝¹ : NormedSpace 𝕜' F\ninst✝ : SMulCommClass ℝ 𝕜' F\nc : ℤ\nf : 𝓢(E, F)\n⊢ ∀ (k n : ℕ), ∃ C, ∀ (x : E), ‖x‖ ^ k * ‖iteratedFDeriv ℝ n (c • ↑f) x‖ ≤ C\n[PROOFSTEP]\nhave : c • (f : E → F) = (c : ℝ) • f := by\n  ext x\n  simp only [Pi.smul_apply, smul_apply]\n  exact zsmul_eq_smul_cast _ _ _\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace ℝ E\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace ℝ F\ninst✝⁵ : NormedField 𝕜\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : SMulCommClass ℝ 𝕜 F\ninst✝² : NormedField 𝕜'\ninst✝¹ : NormedSpace 𝕜' F\ninst✝ : SMulCommClass ℝ 𝕜' F\nc : ℤ\nf : 𝓢(E, F)\n⊢ c • ↑f = ↑(↑c • f)\n[PROOFSTEP]\next x\n[GOAL]\ncase h\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace ℝ E\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace ℝ F\ninst✝⁵ : NormedField 𝕜\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : SMulCommClass ℝ 𝕜 F\ninst✝² : NormedField 𝕜'\ninst✝¹ : NormedSpace 𝕜' F\ninst✝ : SMulCommClass ℝ 𝕜' F\nc : ℤ\nf : 𝓢(E, F)\nx : E\n⊢ (c • ↑f) x = ↑(↑c • f) x\n[PROOFSTEP]\nsimp only [Pi.smul_apply, smul_apply]\n[GOAL]\ncase h\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace ℝ E\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace ℝ F\ninst✝⁵ : NormedField 𝕜\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : SMulCommClass ℝ 𝕜 F\ninst✝² : NormedField 𝕜'\ninst✝¹ : NormedSpace 𝕜' F\ninst✝ : SMulCommClass ℝ 𝕜' F\nc : ℤ\nf : 𝓢(E, F)\nx : E\n⊢ c • ↑f x = ↑c • ↑f x\n[PROOFSTEP]\nexact zsmul_eq_smul_cast _ _ _\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace ℝ E\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace ℝ F\ninst✝⁵ : NormedField 𝕜\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : SMulCommClass ℝ 𝕜 F\ninst✝² : NormedField 𝕜'\ninst✝¹ : NormedSpace 𝕜' F\ninst✝ : SMulCommClass ℝ 𝕜' F\nc : ℤ\nf : 𝓢(E, F)\nthis : c • ↑f = ↑(↑c • f)\n⊢ ∀ (k n : ℕ), ∃ C, ∀ (x : E), ‖x‖ ^ k * ‖iteratedFDeriv ℝ n (c • ↑f) x‖ ≤ C\n[PROOFSTEP]\nsimp only [this]\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace ℝ E\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace ℝ F\ninst✝⁵ : NormedField 𝕜\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : SMulCommClass ℝ 𝕜 F\ninst✝² : NormedField 𝕜'\ninst✝¹ : NormedSpace 𝕜' F\ninst✝ : SMulCommClass ℝ 𝕜' F\nc : ℤ\nf : 𝓢(E, F)\nthis : c • ↑f = ↑(↑c • f)\n⊢ ∀ (k n : ℕ), ∃ C, ∀ (x : E), ‖x‖ ^ k * ‖iteratedFDeriv ℝ n (↑(↑c • f)) x‖ ≤ C\n[PROOFSTEP]\nexact ((c : ℝ) • f).decay'\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nx✝² x✝¹ : ℕ\nx✝ : E\n⊢ ‖x✝‖ ^ x✝² * ‖iteratedFDeriv ℝ x✝¹ (fun x => 0) x✝‖ ≤ 1\n[PROOFSTEP]\nsimp\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nk n : ℕ\nx✝ : E\n⊢ ‖x✝‖ ^ k * ‖iteratedFDeriv ℝ n (↑0) x✝‖ ≤ 0\n[PROOFSTEP]\nsimp [Pi.zero_def]\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf g : 𝓢(E, F)\n⊢ ∀ (k n : ℕ), ∃ C, ∀ (x : E), ‖x‖ ^ k * ‖iteratedFDeriv ℝ n (↑f - ↑g) x‖ ≤ C\n[PROOFSTEP]\nintro k n\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf g : 𝓢(E, F)\nk n : ℕ\n⊢ ∃ C, ∀ (x : E), ‖x‖ ^ k * ‖iteratedFDeriv ℝ n (↑f - ↑g) x‖ ≤ C\n[PROOFSTEP]\nrefine' ⟨f.seminormAux k n + g.seminormAux k n, fun x => _⟩\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf g : 𝓢(E, F)\nk n : ℕ\nx : E\n⊢ ‖x‖ ^ k * ‖iteratedFDeriv ℝ n (↑f - ↑g) x‖ ≤ SchwartzMap.seminormAux k n f + SchwartzMap.seminormAux k n g\n[PROOFSTEP]\nrefine' le_trans _ (add_le_add (f.le_seminormAux k n x) (g.le_seminormAux k n x))\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf g : 𝓢(E, F)\nk n : ℕ\nx : E\n⊢ ‖x‖ ^ k * ‖iteratedFDeriv ℝ n (↑f - ↑g) x‖ ≤\n    ‖x‖ ^ k * ‖iteratedFDeriv ℝ n (↑f) x‖ + ‖x‖ ^ k * ‖iteratedFDeriv ℝ n (↑g) x‖\n[PROOFSTEP]\nrw [sub_eq_add_neg]\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf g : 𝓢(E, F)\nk n : ℕ\nx : E\n⊢ ‖x‖ ^ k * ‖iteratedFDeriv ℝ n (↑f + -↑g) x‖ ≤\n    ‖x‖ ^ k * ‖iteratedFDeriv ℝ n (↑f) x‖ + ‖x‖ ^ k * ‖iteratedFDeriv ℝ n (↑g) x‖\n[PROOFSTEP]\nrw [← decay_neg_aux k n g x]\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf g : 𝓢(E, F)\nk n : ℕ\nx : E\n⊢ ‖x‖ ^ k * ‖iteratedFDeriv ℝ n (↑f + -↑g) x‖ ≤\n    ‖x‖ ^ k * ‖iteratedFDeriv ℝ n (↑f) x‖ + ‖x‖ ^ k * ‖iteratedFDeriv ℝ n (-↑g) x‖\n[PROOFSTEP]\nconvert decay_add_le_aux k n f (-g) x\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\n⊢ Function.Injective ↑(coeHom E F)\n[PROOFSTEP]\nrw [coe_coeHom]\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\n⊢ Function.Injective FunLike.coe\n[PROOFSTEP]\nexact FunLike.coe_injective\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : SMulCommClass ℝ 𝕜 F\nk n : ℕ\nf : 𝓢(ℝ, F)\nM : ℝ\nhMp : 0 ≤ M\nhM : ∀ (x : ℝ), |x| ^ k * ‖iteratedDeriv n (↑f) x‖ ≤ M\n⊢ ↑(SchwartzMap.seminorm 𝕜 k n) f ≤ M\n[PROOFSTEP]\nrefine' seminorm_le_bound 𝕜 k n f hMp _\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : SMulCommClass ℝ 𝕜 F\nk n : ℕ\nf : 𝓢(ℝ, F)\nM : ℝ\nhMp : 0 ≤ M\nhM : ∀ (x : ℝ), |x| ^ k * ‖iteratedDeriv n (↑f) x‖ ≤ M\n⊢ ∀ (x : ℝ), ‖x‖ ^ k * ‖iteratedFDeriv ℝ n (↑f) x‖ ≤ M\n[PROOFSTEP]\nsimpa only [Real.norm_eq_abs, norm_iteratedFDeriv_eq_norm_iteratedDeriv]\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : SMulCommClass ℝ 𝕜 F\nk n : ℕ\nf : 𝓢(ℝ, F)\nx : ℝ\n⊢ |x| ^ k * ‖iteratedDeriv n (↑f) x‖ ≤ ↑(SchwartzMap.seminorm 𝕜 k n) f\n[PROOFSTEP]\nhave := le_seminorm 𝕜 k n f x\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : SMulCommClass ℝ 𝕜 F\nk n : ℕ\nf : 𝓢(ℝ, F)\nx : ℝ\nthis : ‖x‖ ^ k * ‖iteratedFDeriv ℝ n (↑f) x‖ ≤ ↑(SchwartzMap.seminorm 𝕜 k n) f\n⊢ |x| ^ k * ‖iteratedDeriv n (↑f) x‖ ≤ ↑(SchwartzMap.seminorm 𝕜 k n) f\n[PROOFSTEP]\nrwa [← Real.norm_eq_abs, ← norm_iteratedFDeriv_eq_norm_iteratedDeriv]\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : SMulCommClass ℝ 𝕜 F\nf : 𝓢(E, F)\nn : ℕ\nx₀ : E\n⊢ ‖iteratedFDeriv ℝ n (↑f) x₀‖ ≤ ↑(SchwartzMap.seminorm 𝕜 0 n) f\n[PROOFSTEP]\nhave := SchwartzMap.le_seminorm 𝕜 0 n f x₀\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : SMulCommClass ℝ 𝕜 F\nf : 𝓢(E, F)\nn : ℕ\nx₀ : E\nthis : ‖x₀‖ ^ 0 * ‖iteratedFDeriv ℝ n (↑f) x₀‖ ≤ ↑(SchwartzMap.seminorm 𝕜 0 n) f\n⊢ ‖iteratedFDeriv ℝ n (↑f) x₀‖ ≤ ↑(SchwartzMap.seminorm 𝕜 0 n) f\n[PROOFSTEP]\nrwa [pow_zero, one_mul] at this \n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : SMulCommClass ℝ 𝕜 F\nf : 𝓢(E, F)\nk : ℕ\nx₀ : E\n⊢ ‖x₀‖ ^ k * ‖↑f x₀‖ ≤ ↑(SchwartzMap.seminorm 𝕜 k 0) f\n[PROOFSTEP]\nhave := SchwartzMap.le_seminorm 𝕜 k 0 f x₀\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : SMulCommClass ℝ 𝕜 F\nf : 𝓢(E, F)\nk : ℕ\nx₀ : E\nthis : ‖x₀‖ ^ k * ‖iteratedFDeriv ℝ 0 (↑f) x₀‖ ≤ ↑(SchwartzMap.seminorm 𝕜 k 0) f\n⊢ ‖x₀‖ ^ k * ‖↑f x₀‖ ≤ ↑(SchwartzMap.seminorm 𝕜 k 0) f\n[PROOFSTEP]\nrwa [norm_iteratedFDeriv_zero] at this \n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : SMulCommClass ℝ 𝕜 F\nf : 𝓢(E, F)\nx₀ : E\n⊢ ‖↑f x₀‖ ≤ ↑(SchwartzMap.seminorm 𝕜 0 0) f\n[PROOFSTEP]\nhave := norm_pow_mul_le_seminorm 𝕜 f 0 x₀\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : SMulCommClass ℝ 𝕜 F\nf : 𝓢(E, F)\nx₀ : E\nthis : ‖x₀‖ ^ 0 * ‖↑f x₀‖ ≤ ↑(SchwartzMap.seminorm 𝕜 0 0) f\n⊢ ‖↑f x₀‖ ≤ ↑(SchwartzMap.seminorm 𝕜 0 0) f\n[PROOFSTEP]\nrwa [pow_zero, one_mul] at this \n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : SMulCommClass ℝ 𝕜 F\nm : ℕ × ℕ\nk n : ℕ\nhk : k ≤ m.fst\nhn : n ≤ m.snd\nf : 𝓢(E, F)\nx : E\n⊢ (1 + ‖x‖) ^ k * ‖iteratedFDeriv ℝ n (↑f) x‖ ≤\n    ↑(2 ^ m.fst) * ↑(Finset.sup (Finset.Iic m) fun m => SchwartzMap.seminorm 𝕜 m.fst m.snd) f\n[PROOFSTEP]\nrw [add_comm, add_pow]\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : SMulCommClass ℝ 𝕜 F\nm : ℕ × ℕ\nk n : ℕ\nhk : k ≤ m.fst\nhn : n ≤ m.snd\nf : 𝓢(E, F)\nx : E\n⊢ (∑ m in Finset.range (k + 1), ‖x‖ ^ m * 1 ^ (k - m) * ↑(Nat.choose k m)) * ‖iteratedFDeriv ℝ n (↑f) x‖ ≤\n    ↑(2 ^ m.fst) * ↑(Finset.sup (Finset.Iic m) fun m => SchwartzMap.seminorm 𝕜 m.fst m.snd) f\n[PROOFSTEP]\nsimp only [one_pow, mul_one, Finset.sum_congr, Finset.sum_mul]\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : SMulCommClass ℝ 𝕜 F\nm : ℕ × ℕ\nk n : ℕ\nhk : k ≤ m.fst\nhn : n ≤ m.snd\nf : 𝓢(E, F)\nx : E\n⊢ ∑ x_1 in Finset.range (k + 1), ‖x‖ ^ x_1 * ↑(Nat.choose k x_1) * ‖iteratedFDeriv ℝ n (↑f) x‖ ≤\n    ↑(2 ^ m.fst) * ↑(Finset.sup (Finset.Iic m) fun m => SchwartzMap.seminorm 𝕜 m.fst m.snd) f\n[PROOFSTEP]\nnorm_cast\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : SMulCommClass ℝ 𝕜 F\nm : ℕ × ℕ\nk n : ℕ\nhk : k ≤ m.fst\nhn : n ≤ m.snd\nf : 𝓢(E, F)\nx : E\n⊢ ∑ x_1 in Finset.range (k + 1), ‖x‖ ^ x_1 * ↑(Nat.choose k x_1) * ‖iteratedFDeriv ℝ n (↑f) x‖ ≤\n    ↑(2 ^ m.fst) * ↑(Finset.sup (Finset.Iic m) fun m => SchwartzMap.seminorm 𝕜 m.fst m.snd) f\n[PROOFSTEP]\nrw [← Nat.sum_range_choose m.1]\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : SMulCommClass ℝ 𝕜 F\nm : ℕ × ℕ\nk n : ℕ\nhk : k ≤ m.fst\nhn : n ≤ m.snd\nf : 𝓢(E, F)\nx : E\n⊢ ∑ x_1 in Finset.range (k + 1), ‖x‖ ^ x_1 * ↑(Nat.choose k x_1) * ‖iteratedFDeriv ℝ n (↑f) x‖ ≤\n    ↑(∑ m_1 in Finset.range (m.fst + 1), Nat.choose m.fst m_1) *\n      ↑(Finset.sup (Finset.Iic m) fun m => SchwartzMap.seminorm 𝕜 m.fst m.snd) f\n[PROOFSTEP]\npush_cast\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : SMulCommClass ℝ 𝕜 F\nm : ℕ × ℕ\nk n : ℕ\nhk : k ≤ m.fst\nhn : n ≤ m.snd\nf : 𝓢(E, F)\nx : E\n⊢ ∑ x_1 in Finset.range (k + 1), ‖x‖ ^ x_1 * ↑(Nat.choose k x_1) * ‖iteratedFDeriv ℝ n (↑f) x‖ ≤\n    (∑ x in Finset.range (m.fst + 1), ↑(Nat.choose m.fst x)) *\n      ↑(Finset.sup (Finset.Iic m) fun m => SchwartzMap.seminorm 𝕜 m.fst m.snd) f\n[PROOFSTEP]\nrw [Finset.sum_mul]\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : SMulCommClass ℝ 𝕜 F\nm : ℕ × ℕ\nk n : ℕ\nhk : k ≤ m.fst\nhn : n ≤ m.snd\nf : 𝓢(E, F)\nx : E\n⊢ ∑ x_1 in Finset.range (k + 1), ‖x‖ ^ x_1 * ↑(Nat.choose k x_1) * ‖iteratedFDeriv ℝ n (↑f) x‖ ≤\n    ∑ x in Finset.range (m.fst + 1),\n      ↑(Nat.choose m.fst x) * ↑(Finset.sup (Finset.Iic m) fun m => SchwartzMap.seminorm 𝕜 m.fst m.snd) f\n[PROOFSTEP]\nhave hk' : Finset.range (k + 1) ⊆ Finset.range (m.1 + 1) := by rwa [Finset.range_subset, add_le_add_iff_right]\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : SMulCommClass ℝ 𝕜 F\nm : ℕ × ℕ\nk n : ℕ\nhk : k ≤ m.fst\nhn : n ≤ m.snd\nf : 𝓢(E, F)\nx : E\n⊢ Finset.range (k + 1) ⊆ Finset.range (m.fst + 1)\n[PROOFSTEP]\nrwa [Finset.range_subset, add_le_add_iff_right]\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : SMulCommClass ℝ 𝕜 F\nm : ℕ × ℕ\nk n : ℕ\nhk : k ≤ m.fst\nhn : n ≤ m.snd\nf : 𝓢(E, F)\nx : E\nhk' : Finset.range (k + 1) ⊆ Finset.range (m.fst + 1)\n⊢ ∑ x_1 in Finset.range (k + 1), ‖x‖ ^ x_1 * ↑(Nat.choose k x_1) * ‖iteratedFDeriv ℝ n (↑f) x‖ ≤\n    ∑ x in Finset.range (m.fst + 1),\n      ↑(Nat.choose m.fst x) * ↑(Finset.sup (Finset.Iic m) fun m => SchwartzMap.seminorm 𝕜 m.fst m.snd) f\n[PROOFSTEP]\nrefine' le_trans (Finset.sum_le_sum_of_subset_of_nonneg hk' fun _ _ _ => by positivity) _\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : SMulCommClass ℝ 𝕜 F\nm : ℕ × ℕ\nk n : ℕ\nhk : k ≤ m.fst\nhn : n ≤ m.snd\nf : 𝓢(E, F)\nx : E\nhk' : Finset.range (k + 1) ⊆ Finset.range (m.fst + 1)\nx✝² : ℕ\nx✝¹ : x✝² ∈ Finset.range (m.fst + 1)\nx✝ : ¬x✝² ∈ Finset.range (k + 1)\n⊢ 0 ≤ ‖x‖ ^ x✝² * ↑(Nat.choose k x✝²) * ‖iteratedFDeriv ℝ n (↑f) x‖\n[PROOFSTEP]\npositivity\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : SMulCommClass ℝ 𝕜 F\nm : ℕ × ℕ\nk n : ℕ\nhk : k ≤ m.fst\nhn : n ≤ m.snd\nf : 𝓢(E, F)\nx : E\nhk' : Finset.range (k + 1) ⊆ Finset.range (m.fst + 1)\n⊢ ∑ i in Finset.range (m.fst + 1), ‖x‖ ^ i * ↑(Nat.choose k i) * ‖iteratedFDeriv ℝ n (↑f) x‖ ≤\n    ∑ x in Finset.range (m.fst + 1),\n      ↑(Nat.choose m.fst x) * ↑(Finset.sup (Finset.Iic m) fun m => SchwartzMap.seminorm 𝕜 m.fst m.snd) f\n[PROOFSTEP]\nrefine' Finset.sum_le_sum fun i hi => _\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : SMulCommClass ℝ 𝕜 F\nm : ℕ × ℕ\nk n : ℕ\nhk : k ≤ m.fst\nhn : n ≤ m.snd\nf : 𝓢(E, F)\nx : E\nhk' : Finset.range (k + 1) ⊆ Finset.range (m.fst + 1)\ni : ℕ\nhi : i ∈ Finset.range (m.fst + 1)\n⊢ ‖x‖ ^ i * ↑(Nat.choose k i) * ‖iteratedFDeriv ℝ n (↑f) x‖ ≤\n    ↑(Nat.choose m.fst i) * ↑(Finset.sup (Finset.Iic m) fun m => SchwartzMap.seminorm 𝕜 m.fst m.snd) f\n[PROOFSTEP]\nrw [mul_comm (‖x‖ ^ i), mul_assoc]\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : SMulCommClass ℝ 𝕜 F\nm : ℕ × ℕ\nk n : ℕ\nhk : k ≤ m.fst\nhn : n ≤ m.snd\nf : 𝓢(E, F)\nx : E\nhk' : Finset.range (k + 1) ⊆ Finset.range (m.fst + 1)\ni : ℕ\nhi : i ∈ Finset.range (m.fst + 1)\n⊢ ↑(Nat.choose k i) * (‖x‖ ^ i * ‖iteratedFDeriv ℝ n (↑f) x‖) ≤\n    ↑(Nat.choose m.fst i) * ↑(Finset.sup (Finset.Iic m) fun m => SchwartzMap.seminorm 𝕜 m.fst m.snd) f\n[PROOFSTEP]\nrefine' mul_le_mul _ _ (by positivity) (by positivity)\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : SMulCommClass ℝ 𝕜 F\nm : ℕ × ℕ\nk n : ℕ\nhk : k ≤ m.fst\nhn : n ≤ m.snd\nf : 𝓢(E, F)\nx : E\nhk' : Finset.range (k + 1) ⊆ Finset.range (m.fst + 1)\ni : ℕ\nhi : i ∈ Finset.range (m.fst + 1)\n⊢ 0 ≤ ‖x‖ ^ i * ‖iteratedFDeriv ℝ n (↑f) x‖\n[PROOFSTEP]\npositivity\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : SMulCommClass ℝ 𝕜 F\nm : ℕ × ℕ\nk n : ℕ\nhk : k ≤ m.fst\nhn : n ≤ m.snd\nf : 𝓢(E, F)\nx : E\nhk' : Finset.range (k + 1) ⊆ Finset.range (m.fst + 1)\ni : ℕ\nhi : i ∈ Finset.range (m.fst + 1)\n⊢ 0 ≤ ↑(Nat.choose m.fst i)\n[PROOFSTEP]\npositivity\n[GOAL]\ncase refine'_1\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : SMulCommClass ℝ 𝕜 F\nm : ℕ × ℕ\nk n : ℕ\nhk : k ≤ m.fst\nhn : n ≤ m.snd\nf : 𝓢(E, F)\nx : E\nhk' : Finset.range (k + 1) ⊆ Finset.range (m.fst + 1)\ni : ℕ\nhi : i ∈ Finset.range (m.fst + 1)\n⊢ ↑(Nat.choose k i) ≤ ↑(Nat.choose m.fst i)\n[PROOFSTEP]\nexact_mod_cast Nat.choose_le_choose i hk\n[GOAL]\ncase refine'_2\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : SMulCommClass ℝ 𝕜 F\nm : ℕ × ℕ\nk n : ℕ\nhk : k ≤ m.fst\nhn : n ≤ m.snd\nf : 𝓢(E, F)\nx : E\nhk' : Finset.range (k + 1) ⊆ Finset.range (m.fst + 1)\ni : ℕ\nhi : i ∈ Finset.range (m.fst + 1)\n⊢ ‖x‖ ^ i * ‖iteratedFDeriv ℝ n (↑f) x‖ ≤ ↑(Finset.sup (Finset.Iic m) fun m => SchwartzMap.seminorm 𝕜 m.fst m.snd) f\n[PROOFSTEP]\ntrans\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : SMulCommClass ℝ 𝕜 F\nm : ℕ × ℕ\nk n : ℕ\nhk : k ≤ m.fst\nhn : n ≤ m.snd\nf : 𝓢(E, F)\nx : E\nhk' : Finset.range (k + 1) ⊆ Finset.range (m.fst + 1)\ni : ℕ\nhi : i ∈ Finset.range (m.fst + 1)\n⊢ ‖x‖ ^ i * ‖iteratedFDeriv ℝ n (↑f) x‖ ≤ ?m.375189\n[PROOFSTEP]\nexact le_seminorm 𝕜 i n f x\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : SMulCommClass ℝ 𝕜 F\nm : ℕ × ℕ\nk n : ℕ\nhk : k ≤ m.fst\nhn : n ≤ m.snd\nf : 𝓢(E, F)\nx : E\nhk' : Finset.range (k + 1) ⊆ Finset.range (m.fst + 1)\ni : ℕ\nhi : i ∈ Finset.range (m.fst + 1)\n⊢ ↑(SchwartzMap.seminorm 𝕜 i n) f ≤ ↑(Finset.sup (Finset.Iic m) fun m => SchwartzMap.seminorm 𝕜 m.fst m.snd) f\n[PROOFSTEP]\napply Seminorm.le_def.1\n[GOAL]\ncase a\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : SMulCommClass ℝ 𝕜 F\nm : ℕ × ℕ\nk n : ℕ\nhk : k ≤ m.fst\nhn : n ≤ m.snd\nf : 𝓢(E, F)\nx : E\nhk' : Finset.range (k + 1) ⊆ Finset.range (m.fst + 1)\ni : ℕ\nhi : i ∈ Finset.range (m.fst + 1)\n⊢ SchwartzMap.seminorm 𝕜 i n ≤ Finset.sup (Finset.Iic m) fun m => SchwartzMap.seminorm 𝕜 m.fst m.snd\n[PROOFSTEP]\nexact Finset.le_sup_of_le (Finset.mem_Iic.2 <| Prod.mk_le_mk.2 ⟨Finset.mem_range_succ_iff.mp hi, hn⟩) le_rfl\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : SMulCommClass ℝ 𝕜 F\n⊢ WithSeminorms (schwartzSeminormFamily 𝕜 E F)\n[PROOFSTEP]\nhave A : WithSeminorms (schwartzSeminormFamily ℝ E F) := ⟨rfl⟩\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : SMulCommClass ℝ 𝕜 F\nA : WithSeminorms (schwartzSeminormFamily ℝ E F)\n⊢ WithSeminorms (schwartzSeminormFamily 𝕜 E F)\n[PROOFSTEP]\nrw [SeminormFamily.withSeminorms_iff_nhds_eq_iInf] at A ⊢\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : SMulCommClass ℝ 𝕜 F\nA : nhds 0 = ⨅ (i : ℕ × ℕ), Filter.comap (↑(schwartzSeminormFamily ℝ E F i)) (nhds 0)\n⊢ nhds 0 = ⨅ (i : ℕ × ℕ), Filter.comap (↑(schwartzSeminormFamily 𝕜 E F i)) (nhds 0)\n[PROOFSTEP]\nrw [A]\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : SMulCommClass ℝ 𝕜 F\nA : nhds 0 = ⨅ (i : ℕ × ℕ), Filter.comap (↑(schwartzSeminormFamily ℝ E F i)) (nhds 0)\n⊢ ⨅ (i : ℕ × ℕ), Filter.comap (↑(schwartzSeminormFamily ℝ E F i)) (nhds 0) =\n    ⨅ (i : ℕ × ℕ), Filter.comap (↑(schwartzSeminormFamily 𝕜 E F i)) (nhds 0)\n[PROOFSTEP]\nrfl\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : SMulCommClass ℝ 𝕜 F\n⊢ ContinuousSMul 𝕜 𝓢(E, F)\n[PROOFSTEP]\nrw [(schwartz_withSeminorms 𝕜 E F).withSeminorms_eq]\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : SMulCommClass ℝ 𝕜 F\n⊢ ContinuousSMul 𝕜 𝓢(E, F)\n[PROOFSTEP]\nexact (schwartzSeminormFamily 𝕜 E F).moduleFilterBasis.continuousSMul\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf : E → F\nhf_temperate : Function.HasTemperateGrowth f\nn : ℕ\n⊢ ∃ k C x, ∀ (N : ℕ), N ≤ n → ∀ (x : E), ‖iteratedFDeriv ℝ N f x‖ ≤ C * (1 + ‖x‖) ^ k\n[PROOFSTEP]\nchoose k C f using hf_temperate.2\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf✝ : E → F\nhf_temperate : Function.HasTemperateGrowth f✝\nn : ℕ\nk : ℕ → ℕ\nC : ℕ → ℝ\nf : ∀ (n : ℕ) (x : E), ‖iteratedFDeriv ℝ n f✝ x‖ ≤ C n * (1 + ‖x‖) ^ k n\n⊢ ∃ k C x, ∀ (N : ℕ), N ≤ n → ∀ (x : E), ‖iteratedFDeriv ℝ N f✝ x‖ ≤ C * (1 + ‖x‖) ^ k\n[PROOFSTEP]\nuse(Finset.range (n + 1)).sup k\n[GOAL]\ncase h\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf✝ : E → F\nhf_temperate : Function.HasTemperateGrowth f✝\nn : ℕ\nk : ℕ → ℕ\nC : ℕ → ℝ\nf : ∀ (n : ℕ) (x : E), ‖iteratedFDeriv ℝ n f✝ x‖ ≤ C n * (1 + ‖x‖) ^ k n\n⊢ ∃ C x, ∀ (N : ℕ), N ≤ n → ∀ (x : E), ‖iteratedFDeriv ℝ N f✝ x‖ ≤ C * (1 + ‖x‖) ^ Finset.sup (Finset.range (n + 1)) k\n[PROOFSTEP]\nlet C' := max (0 : ℝ) ((Finset.range (n + 1)).sup' (by simp) C)\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf✝ : E → F\nhf_temperate : Function.HasTemperateGrowth f✝\nn : ℕ\nk : ℕ → ℕ\nC : ℕ → ℝ\nf : ∀ (n : ℕ) (x : E), ‖iteratedFDeriv ℝ n f✝ x‖ ≤ C n * (1 + ‖x‖) ^ k n\n⊢ Finset.Nonempty (Finset.range (n + 1))\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf✝ : E → F\nhf_temperate : Function.HasTemperateGrowth f✝\nn : ℕ\nk : ℕ → ℕ\nC : ℕ → ℝ\nf : ∀ (n : ℕ) (x : E), ‖iteratedFDeriv ℝ n f✝ x‖ ≤ C n * (1 + ‖x‖) ^ k n\nC' : ℝ := max 0 (Finset.sup' (Finset.range (n + 1)) (_ : Finset.Nonempty (Finset.range (n + 1))) C)\n⊢ ∃ C x, ∀ (N : ℕ), N ≤ n → ∀ (x : E), ‖iteratedFDeriv ℝ N f✝ x‖ ≤ C * (1 + ‖x‖) ^ Finset.sup (Finset.range (n + 1)) k\n[PROOFSTEP]\nhave hC' : 0 ≤ C' := by simp only [le_refl, Finset.le_sup'_iff, true_or_iff, le_max_iff]\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf✝ : E → F\nhf_temperate : Function.HasTemperateGrowth f✝\nn : ℕ\nk : ℕ → ℕ\nC : ℕ → ℝ\nf : ∀ (n : ℕ) (x : E), ‖iteratedFDeriv ℝ n f✝ x‖ ≤ C n * (1 + ‖x‖) ^ k n\nC' : ℝ := max 0 (Finset.sup' (Finset.range (n + 1)) (_ : Finset.Nonempty (Finset.range (n + 1))) C)\n⊢ 0 ≤ C'\n[PROOFSTEP]\nsimp only [le_refl, Finset.le_sup'_iff, true_or_iff, le_max_iff]\n[GOAL]\ncase h\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf✝ : E → F\nhf_temperate : Function.HasTemperateGrowth f✝\nn : ℕ\nk : ℕ → ℕ\nC : ℕ → ℝ\nf : ∀ (n : ℕ) (x : E), ‖iteratedFDeriv ℝ n f✝ x‖ ≤ C n * (1 + ‖x‖) ^ k n\nC' : ℝ := max 0 (Finset.sup' (Finset.range (n + 1)) (_ : Finset.Nonempty (Finset.range (n + 1))) C)\nhC' : 0 ≤ C'\n⊢ ∃ C x, ∀ (N : ℕ), N ≤ n → ∀ (x : E), ‖iteratedFDeriv ℝ N f✝ x‖ ≤ C * (1 + ‖x‖) ^ Finset.sup (Finset.range (n + 1)) k\n[PROOFSTEP]\nuse C', hC'\n[GOAL]\ncase h\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf✝ : E → F\nhf_temperate : Function.HasTemperateGrowth f✝\nn : ℕ\nk : ℕ → ℕ\nC : ℕ → ℝ\nf : ∀ (n : ℕ) (x : E), ‖iteratedFDeriv ℝ n f✝ x‖ ≤ C n * (1 + ‖x‖) ^ k n\nC' : ℝ := max 0 (Finset.sup' (Finset.range (n + 1)) (_ : Finset.Nonempty (Finset.range (n + 1))) C)\nhC' : 0 ≤ C'\n⊢ ∀ (N : ℕ), N ≤ n → ∀ (x : E), ‖iteratedFDeriv ℝ N f✝ x‖ ≤ C' * (1 + ‖x‖) ^ Finset.sup (Finset.range (n + 1)) k\n[PROOFSTEP]\nintro N hN x\n[GOAL]\ncase h\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf✝ : E → F\nhf_temperate : Function.HasTemperateGrowth f✝\nn : ℕ\nk : ℕ → ℕ\nC : ℕ → ℝ\nf : ∀ (n : ℕ) (x : E), ‖iteratedFDeriv ℝ n f✝ x‖ ≤ C n * (1 + ‖x‖) ^ k n\nC' : ℝ := max 0 (Finset.sup' (Finset.range (n + 1)) (_ : Finset.Nonempty (Finset.range (n + 1))) C)\nhC' : 0 ≤ C'\nN : ℕ\nhN : N ≤ n\nx : E\n⊢ ‖iteratedFDeriv ℝ N f✝ x‖ ≤ C' * (1 + ‖x‖) ^ Finset.sup (Finset.range (n + 1)) k\n[PROOFSTEP]\nrw [← Finset.mem_range_succ_iff] at hN \n[GOAL]\ncase h\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf✝ : E → F\nhf_temperate : Function.HasTemperateGrowth f✝\nn : ℕ\nk : ℕ → ℕ\nC : ℕ → ℝ\nf : ∀ (n : ℕ) (x : E), ‖iteratedFDeriv ℝ n f✝ x‖ ≤ C n * (1 + ‖x‖) ^ k n\nC' : ℝ := max 0 (Finset.sup' (Finset.range (n + 1)) (_ : Finset.Nonempty (Finset.range (n + 1))) C)\nhC' : 0 ≤ C'\nN : ℕ\nhN : N ∈ Finset.range (Nat.succ n)\nx : E\n⊢ ‖iteratedFDeriv ℝ N f✝ x‖ ≤ C' * (1 + ‖x‖) ^ Finset.sup (Finset.range (n + 1)) k\n[PROOFSTEP]\nrefine' le_trans (f N x) (mul_le_mul _ _ (by positivity) hC')\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf✝ : E → F\nhf_temperate : Function.HasTemperateGrowth f✝\nn : ℕ\nk : ℕ → ℕ\nC : ℕ → ℝ\nf : ∀ (n : ℕ) (x : E), ‖iteratedFDeriv ℝ n f✝ x‖ ≤ C n * (1 + ‖x‖) ^ k n\nC' : ℝ := max 0 (Finset.sup' (Finset.range (n + 1)) (_ : Finset.Nonempty (Finset.range (n + 1))) C)\nhC' : 0 ≤ C'\nN : ℕ\nhN : N ∈ Finset.range (Nat.succ n)\nx : E\n⊢ 0 ≤ (1 + ‖x‖) ^ k N\n[PROOFSTEP]\npositivity\n[GOAL]\ncase h.refine'_1\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf✝ : E → F\nhf_temperate : Function.HasTemperateGrowth f✝\nn : ℕ\nk : ℕ → ℕ\nC : ℕ → ℝ\nf : ∀ (n : ℕ) (x : E), ‖iteratedFDeriv ℝ n f✝ x‖ ≤ C n * (1 + ‖x‖) ^ k n\nC' : ℝ := max 0 (Finset.sup' (Finset.range (n + 1)) (_ : Finset.Nonempty (Finset.range (n + 1))) C)\nhC' : 0 ≤ C'\nN : ℕ\nhN : N ∈ Finset.range (Nat.succ n)\nx : E\n⊢ C N ≤ C'\n[PROOFSTEP]\nsimp only [Finset.le_sup'_iff, le_max_iff]\n[GOAL]\ncase h.refine'_1\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf✝ : E → F\nhf_temperate : Function.HasTemperateGrowth f✝\nn : ℕ\nk : ℕ → ℕ\nC : ℕ → ℝ\nf : ∀ (n : ℕ) (x : E), ‖iteratedFDeriv ℝ n f✝ x‖ ≤ C n * (1 + ‖x‖) ^ k n\nC' : ℝ := max 0 (Finset.sup' (Finset.range (n + 1)) (_ : Finset.Nonempty (Finset.range (n + 1))) C)\nhC' : 0 ≤ C'\nN : ℕ\nhN : N ∈ Finset.range (Nat.succ n)\nx : E\n⊢ C N ≤ 0 ∨ ∃ b, b ∈ Finset.range (n + 1) ∧ C N ≤ C b\n[PROOFSTEP]\nright\n[GOAL]\ncase h.refine'_1.h\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf✝ : E → F\nhf_temperate : Function.HasTemperateGrowth f✝\nn : ℕ\nk : ℕ → ℕ\nC : ℕ → ℝ\nf : ∀ (n : ℕ) (x : E), ‖iteratedFDeriv ℝ n f✝ x‖ ≤ C n * (1 + ‖x‖) ^ k n\nC' : ℝ := max 0 (Finset.sup' (Finset.range (n + 1)) (_ : Finset.Nonempty (Finset.range (n + 1))) C)\nhC' : 0 ≤ C'\nN : ℕ\nhN : N ∈ Finset.range (Nat.succ n)\nx : E\n⊢ ∃ b, b ∈ Finset.range (n + 1) ∧ C N ≤ C b\n[PROOFSTEP]\nexact ⟨N, hN, rfl.le⟩\n[GOAL]\ncase h.refine'_2\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf✝ : E → F\nhf_temperate : Function.HasTemperateGrowth f✝\nn : ℕ\nk : ℕ → ℕ\nC : ℕ → ℝ\nf : ∀ (n : ℕ) (x : E), ‖iteratedFDeriv ℝ n f✝ x‖ ≤ C n * (1 + ‖x‖) ^ k n\nC' : ℝ := max 0 (Finset.sup' (Finset.range (n + 1)) (_ : Finset.Nonempty (Finset.range (n + 1))) C)\nhC' : 0 ≤ C'\nN : ℕ\nhN : N ∈ Finset.range (Nat.succ n)\nx : E\n⊢ (1 + ‖x‖) ^ k N ≤ (1 + ‖x‖) ^ Finset.sup (Finset.range (n + 1)) k\n[PROOFSTEP]\nrefine' pow_le_pow (by simp only [le_add_iff_nonneg_right, norm_nonneg]) _\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf✝ : E → F\nhf_temperate : Function.HasTemperateGrowth f✝\nn : ℕ\nk : ℕ → ℕ\nC : ℕ → ℝ\nf : ∀ (n : ℕ) (x : E), ‖iteratedFDeriv ℝ n f✝ x‖ ≤ C n * (1 + ‖x‖) ^ k n\nC' : ℝ := max 0 (Finset.sup' (Finset.range (n + 1)) (_ : Finset.Nonempty (Finset.range (n + 1))) C)\nhC' : 0 ≤ C'\nN : ℕ\nhN : N ∈ Finset.range (Nat.succ n)\nx : E\n⊢ 1 ≤ 1 + ‖x‖\n[PROOFSTEP]\nsimp only [le_add_iff_nonneg_right, norm_nonneg]\n[GOAL]\ncase h.refine'_2\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace ℝ F\nf✝ : E → F\nhf_temperate : Function.HasTemperateGrowth f✝\nn : ℕ\nk : ℕ → ℕ\nC : ℕ → ℝ\nf : ∀ (n : ℕ) (x : E), ‖iteratedFDeriv ℝ n f✝ x‖ ≤ C n * (1 + ‖x‖) ^ k n\nC' : ℝ := max 0 (Finset.sup' (Finset.range (n + 1)) (_ : Finset.Nonempty (Finset.range (n + 1))) C)\nhC' : 0 ≤ C'\nN : ℕ\nhN : N ∈ Finset.range (Nat.succ n)\nx : E\n⊢ k N ≤ Finset.sup (Finset.range (n + 1)) k\n[PROOFSTEP]\nexact Finset.le_sup hN\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace ℝ F\ninst✝⁹ : NormedField 𝕜\ninst✝⁸ : NormedField 𝕜'\ninst✝⁷ : NormedAddCommGroup D\ninst✝⁶ : NormedSpace ℝ D\ninst✝⁵ : NormedSpace 𝕜 E\ninst✝⁴ : SMulCommClass ℝ 𝕜 E\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace ℝ G\ninst✝¹ : NormedSpace 𝕜' G\ninst✝ : SMulCommClass ℝ 𝕜' G\nσ : 𝕜 →+* 𝕜'\nA : (D → E) → F → G\nhadd : ∀ (f g : 𝓢(D, E)) (x : F), A (↑f + ↑g) x = A (↑f) x + A (↑g) x\nhsmul : ∀ (a : 𝕜) (f : 𝓢(D, E)) (x : F), A (↑(a • f)) x = ↑σ a • A (↑f) x\nhsmooth : ∀ (f : 𝓢(D, E)), ContDiff ℝ ⊤ (A ↑f)\nhbound :\n  ∀ (n : ℕ × ℕ),\n    ∃ s C,\n      0 ≤ C ∧\n        ∀ (f : 𝓢(D, E)) (x : F),\n          ‖x‖ ^ n.fst * ‖iteratedFDeriv ℝ n.snd (A ↑f) x‖ ≤ C * ↑(Finset.sup s (schwartzSeminormFamily 𝕜 D E)) f\nf : 𝓢(D, E)\n⊢ ∀ (k n : ℕ), ∃ C, ∀ (x : F), ‖x‖ ^ k * ‖iteratedFDeriv ℝ n (A ↑f) x‖ ≤ C\n[PROOFSTEP]\nintro k n\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace ℝ F\ninst✝⁹ : NormedField 𝕜\ninst✝⁸ : NormedField 𝕜'\ninst✝⁷ : NormedAddCommGroup D\ninst✝⁶ : NormedSpace ℝ D\ninst✝⁵ : NormedSpace 𝕜 E\ninst✝⁴ : SMulCommClass ℝ 𝕜 E\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace ℝ G\ninst✝¹ : NormedSpace 𝕜' G\ninst✝ : SMulCommClass ℝ 𝕜' G\nσ : 𝕜 →+* 𝕜'\nA : (D → E) → F → G\nhadd : ∀ (f g : 𝓢(D, E)) (x : F), A (↑f + ↑g) x = A (↑f) x + A (↑g) x\nhsmul : ∀ (a : 𝕜) (f : 𝓢(D, E)) (x : F), A (↑(a • f)) x = ↑σ a • A (↑f) x\nhsmooth : ∀ (f : 𝓢(D, E)), ContDiff ℝ ⊤ (A ↑f)\nhbound :\n  ∀ (n : ℕ × ℕ),\n    ∃ s C,\n      0 ≤ C ∧\n        ∀ (f : 𝓢(D, E)) (x : F),\n          ‖x‖ ^ n.fst * ‖iteratedFDeriv ℝ n.snd (A ↑f) x‖ ≤ C * ↑(Finset.sup s (schwartzSeminormFamily 𝕜 D E)) f\nf : 𝓢(D, E)\nk n : ℕ\n⊢ ∃ C, ∀ (x : F), ‖x‖ ^ k * ‖iteratedFDeriv ℝ n (A ↑f) x‖ ≤ C\n[PROOFSTEP]\nrcases hbound ⟨k, n⟩ with ⟨s, C, _, h⟩\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace ℝ F\ninst✝⁹ : NormedField 𝕜\ninst✝⁸ : NormedField 𝕜'\ninst✝⁷ : NormedAddCommGroup D\ninst✝⁶ : NormedSpace ℝ D\ninst✝⁵ : NormedSpace 𝕜 E\ninst✝⁴ : SMulCommClass ℝ 𝕜 E\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace ℝ G\ninst✝¹ : NormedSpace 𝕜' G\ninst✝ : SMulCommClass ℝ 𝕜' G\nσ : 𝕜 →+* 𝕜'\nA : (D → E) → F → G\nhadd : ∀ (f g : 𝓢(D, E)) (x : F), A (↑f + ↑g) x = A (↑f) x + A (↑g) x\nhsmul : ∀ (a : 𝕜) (f : 𝓢(D, E)) (x : F), A (↑(a • f)) x = ↑σ a • A (↑f) x\nhsmooth : ∀ (f : 𝓢(D, E)), ContDiff ℝ ⊤ (A ↑f)\nhbound :\n  ∀ (n : ℕ × ℕ),\n    ∃ s C,\n      0 ≤ C ∧\n        ∀ (f : 𝓢(D, E)) (x : F),\n          ‖x‖ ^ n.fst * ‖iteratedFDeriv ℝ n.snd (A ↑f) x‖ ≤ C * ↑(Finset.sup s (schwartzSeminormFamily 𝕜 D E)) f\nf : 𝓢(D, E)\nk n : ℕ\ns : Finset (ℕ × ℕ)\nC : ℝ\nleft✝ : 0 ≤ C\nh :\n  ∀ (f : 𝓢(D, E)) (x : F),\n    ‖x‖ ^ (k, n).fst * ‖iteratedFDeriv ℝ (k, n).snd (A ↑f) x‖ ≤ C * ↑(Finset.sup s (schwartzSeminormFamily 𝕜 D E)) f\n⊢ ∃ C, ∀ (x : F), ‖x‖ ^ k * ‖iteratedFDeriv ℝ n (A ↑f) x‖ ≤ C\n[PROOFSTEP]\nexact ⟨C * (s.sup (schwartzSeminormFamily 𝕜 D E)) f, h f⟩\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace ℝ E\ninst✝¹² : NormedAddCommGroup F\ninst✝¹¹ : NormedSpace ℝ F\ninst✝¹⁰ : NormedField 𝕜\ninst✝⁹ : NormedField 𝕜'\ninst✝⁸ : NormedAddCommGroup D\ninst✝⁷ : NormedSpace ℝ D\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : SMulCommClass ℝ 𝕜 E\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace ℝ G\ninst✝² : NormedSpace 𝕜' G\ninst✝¹ : SMulCommClass ℝ 𝕜' G\nσ : 𝕜 →+* 𝕜'\ninst✝ : RingHomIsometric σ\nA : (D → E) → F → G\nhadd : ∀ (f g : 𝓢(D, E)) (x : F), A (↑f + ↑g) x = A (↑f) x + A (↑g) x\nhsmul : ∀ (a : 𝕜) (f : 𝓢(D, E)) (x : F), A (↑(a • f)) x = ↑σ a • A (↑f) x\nhsmooth : ∀ (f : 𝓢(D, E)), ContDiff ℝ ⊤ (A ↑f)\nhbound :\n  ∀ (n : ℕ × ℕ),\n    ∃ s C,\n      0 ≤ C ∧\n        ∀ (f : 𝓢(D, E)) (x : F),\n          ‖x‖ ^ n.fst * ‖iteratedFDeriv ℝ n.snd (A ↑f) x‖ ≤ C * ↑(Finset.sup s (schwartzSeminormFamily 𝕜 D E)) f\n⊢ Continuous (mkLM A hadd hsmul hsmooth hbound).toAddHom.toFun\n[PROOFSTEP]\nchange Continuous (mkLM A hadd hsmul hsmooth hbound : 𝓢(D, E) →ₛₗ[σ] 𝓢(F, G))\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace ℝ E\ninst✝¹² : NormedAddCommGroup F\ninst✝¹¹ : NormedSpace ℝ F\ninst✝¹⁰ : NormedField 𝕜\ninst✝⁹ : NormedField 𝕜'\ninst✝⁸ : NormedAddCommGroup D\ninst✝⁷ : NormedSpace ℝ D\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : SMulCommClass ℝ 𝕜 E\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace ℝ G\ninst✝² : NormedSpace 𝕜' G\ninst✝¹ : SMulCommClass ℝ 𝕜' G\nσ : 𝕜 →+* 𝕜'\ninst✝ : RingHomIsometric σ\nA : (D → E) → F → G\nhadd : ∀ (f g : 𝓢(D, E)) (x : F), A (↑f + ↑g) x = A (↑f) x + A (↑g) x\nhsmul : ∀ (a : 𝕜) (f : 𝓢(D, E)) (x : F), A (↑(a • f)) x = ↑σ a • A (↑f) x\nhsmooth : ∀ (f : 𝓢(D, E)), ContDiff ℝ ⊤ (A ↑f)\nhbound :\n  ∀ (n : ℕ × ℕ),\n    ∃ s C,\n      0 ≤ C ∧\n        ∀ (f : 𝓢(D, E)) (x : F),\n          ‖x‖ ^ n.fst * ‖iteratedFDeriv ℝ n.snd (A ↑f) x‖ ≤ C * ↑(Finset.sup s (schwartzSeminormFamily 𝕜 D E)) f\n⊢ Continuous ↑(mkLM A hadd hsmul hsmooth hbound)\n[PROOFSTEP]\nrefine' Seminorm.continuous_from_bounded (schwartz_withSeminorms 𝕜 D E) (schwartz_withSeminorms 𝕜' F G) _ fun n => _\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace ℝ E\ninst✝¹² : NormedAddCommGroup F\ninst✝¹¹ : NormedSpace ℝ F\ninst✝¹⁰ : NormedField 𝕜\ninst✝⁹ : NormedField 𝕜'\ninst✝⁸ : NormedAddCommGroup D\ninst✝⁷ : NormedSpace ℝ D\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : SMulCommClass ℝ 𝕜 E\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace ℝ G\ninst✝² : NormedSpace 𝕜' G\ninst✝¹ : SMulCommClass ℝ 𝕜' G\nσ : 𝕜 →+* 𝕜'\ninst✝ : RingHomIsometric σ\nA : (D → E) → F → G\nhadd : ∀ (f g : 𝓢(D, E)) (x : F), A (↑f + ↑g) x = A (↑f) x + A (↑g) x\nhsmul : ∀ (a : 𝕜) (f : 𝓢(D, E)) (x : F), A (↑(a • f)) x = ↑σ a • A (↑f) x\nhsmooth : ∀ (f : 𝓢(D, E)), ContDiff ℝ ⊤ (A ↑f)\nhbound :\n  ∀ (n : ℕ × ℕ),\n    ∃ s C,\n      0 ≤ C ∧\n        ∀ (f : 𝓢(D, E)) (x : F),\n          ‖x‖ ^ n.fst * ‖iteratedFDeriv ℝ n.snd (A ↑f) x‖ ≤ C * ↑(Finset.sup s (schwartzSeminormFamily 𝕜 D E)) f\nn : ℕ × ℕ\n⊢ ∃ s C,\n    Seminorm.comp (schwartzSeminormFamily 𝕜' F G n) (mkLM A hadd hsmul hsmooth hbound) ≤\n      C • Finset.sup s (schwartzSeminormFamily 𝕜 D E)\n[PROOFSTEP]\nrcases hbound n with ⟨s, C, hC, h⟩\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace ℝ E\ninst✝¹² : NormedAddCommGroup F\ninst✝¹¹ : NormedSpace ℝ F\ninst✝¹⁰ : NormedField 𝕜\ninst✝⁹ : NormedField 𝕜'\ninst✝⁸ : NormedAddCommGroup D\ninst✝⁷ : NormedSpace ℝ D\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : SMulCommClass ℝ 𝕜 E\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace ℝ G\ninst✝² : NormedSpace 𝕜' G\ninst✝¹ : SMulCommClass ℝ 𝕜' G\nσ : 𝕜 →+* 𝕜'\ninst✝ : RingHomIsometric σ\nA : (D → E) → F → G\nhadd : ∀ (f g : 𝓢(D, E)) (x : F), A (↑f + ↑g) x = A (↑f) x + A (↑g) x\nhsmul : ∀ (a : 𝕜) (f : 𝓢(D, E)) (x : F), A (↑(a • f)) x = ↑σ a • A (↑f) x\nhsmooth : ∀ (f : 𝓢(D, E)), ContDiff ℝ ⊤ (A ↑f)\nhbound :\n  ∀ (n : ℕ × ℕ),\n    ∃ s C,\n      0 ≤ C ∧\n        ∀ (f : 𝓢(D, E)) (x : F),\n          ‖x‖ ^ n.fst * ‖iteratedFDeriv ℝ n.snd (A ↑f) x‖ ≤ C * ↑(Finset.sup s (schwartzSeminormFamily 𝕜 D E)) f\nn : ℕ × ℕ\ns : Finset (ℕ × ℕ)\nC : ℝ\nhC : 0 ≤ C\nh :\n  ∀ (f : 𝓢(D, E)) (x : F),\n    ‖x‖ ^ n.fst * ‖iteratedFDeriv ℝ n.snd (A ↑f) x‖ ≤ C * ↑(Finset.sup s (schwartzSeminormFamily 𝕜 D E)) f\n⊢ ∃ s C,\n    Seminorm.comp (schwartzSeminormFamily 𝕜' F G n) (mkLM A hadd hsmul hsmooth hbound) ≤\n      C • Finset.sup s (schwartzSeminormFamily 𝕜 D E)\n[PROOFSTEP]\nrefine' ⟨s, ⟨C, hC⟩, fun f => _⟩\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace ℝ E\ninst✝¹² : NormedAddCommGroup F\ninst✝¹¹ : NormedSpace ℝ F\ninst✝¹⁰ : NormedField 𝕜\ninst✝⁹ : NormedField 𝕜'\ninst✝⁸ : NormedAddCommGroup D\ninst✝⁷ : NormedSpace ℝ D\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : SMulCommClass ℝ 𝕜 E\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace ℝ G\ninst✝² : NormedSpace 𝕜' G\ninst✝¹ : SMulCommClass ℝ 𝕜' G\nσ : 𝕜 →+* 𝕜'\ninst✝ : RingHomIsometric σ\nA : (D → E) → F → G\nhadd : ∀ (f g : 𝓢(D, E)) (x : F), A (↑f + ↑g) x = A (↑f) x + A (↑g) x\nhsmul : ∀ (a : 𝕜) (f : 𝓢(D, E)) (x : F), A (↑(a • f)) x = ↑σ a • A (↑f) x\nhsmooth : ∀ (f : 𝓢(D, E)), ContDiff ℝ ⊤ (A ↑f)\nhbound :\n  ∀ (n : ℕ × ℕ),\n    ∃ s C,\n      0 ≤ C ∧\n        ∀ (f : 𝓢(D, E)) (x : F),\n          ‖x‖ ^ n.fst * ‖iteratedFDeriv ℝ n.snd (A ↑f) x‖ ≤ C * ↑(Finset.sup s (schwartzSeminormFamily 𝕜 D E)) f\nn : ℕ × ℕ\ns : Finset (ℕ × ℕ)\nC : ℝ\nhC : 0 ≤ C\nh :\n  ∀ (f : 𝓢(D, E)) (x : F),\n    ‖x‖ ^ n.fst * ‖iteratedFDeriv ℝ n.snd (A ↑f) x‖ ≤ C * ↑(Finset.sup s (schwartzSeminormFamily 𝕜 D E)) f\nf : 𝓢(D, E)\n⊢ (fun f => ↑f) (Seminorm.comp (schwartzSeminormFamily 𝕜' F G n) (mkLM A hadd hsmul hsmooth hbound)) f ≤\n    (fun f => ↑f) ({ val := C, property := hC } • Finset.sup s (schwartzSeminormFamily 𝕜 D E)) f\n[PROOFSTEP]\nsimp only [Seminorm.comp_apply, Seminorm.smul_apply, NNReal.smul_def, Algebra.id.smul_eq_mul, Subtype.coe_mk]\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace ℝ E\ninst✝¹² : NormedAddCommGroup F\ninst✝¹¹ : NormedSpace ℝ F\ninst✝¹⁰ : NormedField 𝕜\ninst✝⁹ : NormedField 𝕜'\ninst✝⁸ : NormedAddCommGroup D\ninst✝⁷ : NormedSpace ℝ D\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : SMulCommClass ℝ 𝕜 E\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace ℝ G\ninst✝² : NormedSpace 𝕜' G\ninst✝¹ : SMulCommClass ℝ 𝕜' G\nσ : 𝕜 →+* 𝕜'\ninst✝ : RingHomIsometric σ\nA : (D → E) → F → G\nhadd : ∀ (f g : 𝓢(D, E)) (x : F), A (↑f + ↑g) x = A (↑f) x + A (↑g) x\nhsmul : ∀ (a : 𝕜) (f : 𝓢(D, E)) (x : F), A (↑(a • f)) x = ↑σ a • A (↑f) x\nhsmooth : ∀ (f : 𝓢(D, E)), ContDiff ℝ ⊤ (A ↑f)\nhbound :\n  ∀ (n : ℕ × ℕ),\n    ∃ s C,\n      0 ≤ C ∧\n        ∀ (f : 𝓢(D, E)) (x : F),\n          ‖x‖ ^ n.fst * ‖iteratedFDeriv ℝ n.snd (A ↑f) x‖ ≤ C * ↑(Finset.sup s (schwartzSeminormFamily 𝕜 D E)) f\nn : ℕ × ℕ\ns : Finset (ℕ × ℕ)\nC : ℝ\nhC : 0 ≤ C\nh :\n  ∀ (f : 𝓢(D, E)) (x : F),\n    ‖x‖ ^ n.fst * ‖iteratedFDeriv ℝ n.snd (A ↑f) x‖ ≤ C * ↑(Finset.sup s (schwartzSeminormFamily 𝕜 D E)) f\nf : 𝓢(D, E)\n⊢ ↑(schwartzSeminormFamily 𝕜' F G n) (↑(mkLM A hadd hsmul hsmooth hbound) f) ≤\n    ↑{ val := C, property := hC } * ↑(Finset.sup s (schwartzSeminormFamily 𝕜 D E)) f\n[PROOFSTEP]\nexact (mkLM A hadd hsmul hsmooth hbound f).seminorm_le_bound 𝕜' n.1 n.2 (by positivity) (h f)\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace ℝ E\ninst✝¹² : NormedAddCommGroup F\ninst✝¹¹ : NormedSpace ℝ F\ninst✝¹⁰ : NormedField 𝕜\ninst✝⁹ : NormedField 𝕜'\ninst✝⁸ : NormedAddCommGroup D\ninst✝⁷ : NormedSpace ℝ D\ninst✝⁶ : NormedSpace 𝕜 E\ninst✝⁵ : SMulCommClass ℝ 𝕜 E\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace ℝ G\ninst✝² : NormedSpace 𝕜' G\ninst✝¹ : SMulCommClass ℝ 𝕜' G\nσ : 𝕜 →+* 𝕜'\ninst✝ : RingHomIsometric σ\nA : (D → E) → F → G\nhadd : ∀ (f g : 𝓢(D, E)) (x : F), A (↑f + ↑g) x = A (↑f) x + A (↑g) x\nhsmul : ∀ (a : 𝕜) (f : 𝓢(D, E)) (x : F), A (↑(a • f)) x = ↑σ a • A (↑f) x\nhsmooth : ∀ (f : 𝓢(D, E)), ContDiff ℝ ⊤ (A ↑f)\nhbound :\n  ∀ (n : ℕ × ℕ),\n    ∃ s C,\n      0 ≤ C ∧\n        ∀ (f : 𝓢(D, E)) (x : F),\n          ‖x‖ ^ n.fst * ‖iteratedFDeriv ℝ n.snd (A ↑f) x‖ ≤ C * ↑(Finset.sup s (schwartzSeminormFamily 𝕜 D E)) f\nn : ℕ × ℕ\ns : Finset (ℕ × ℕ)\nC : ℝ\nhC : 0 ≤ C\nh :\n  ∀ (f : 𝓢(D, E)) (x : F),\n    ‖x‖ ^ n.fst * ‖iteratedFDeriv ℝ n.snd (A ↑f) x‖ ≤ C * ↑(Finset.sup s (schwartzSeminormFamily 𝕜 D E)) f\nf : 𝓢(D, E)\n⊢ 0 ≤ ↑{ val := C, property := hC } * ↑(Finset.sup s (schwartzSeminormFamily 𝕜 D E)) f\n[PROOFSTEP]\npositivity\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : SMulCommClass ℝ 𝕜 F\nm : E\n⊢ ∀ (n : ℕ × ℕ),\n    ∃ s C,\n      0 ≤ C ∧\n        ∀ (f : 𝓢(E, E →L[ℝ] F)) (x : E),\n          ‖x‖ ^ n.fst * ‖iteratedFDeriv ℝ n.snd ((fun f x => ↑(f x) m) ↑f) x‖ ≤\n            C * ↑(Finset.sup s (schwartzSeminormFamily 𝕜 E (E →L[ℝ] F))) f\n[PROOFSTEP]\nrintro ⟨k, n⟩\n[GOAL]\ncase mk\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : SMulCommClass ℝ 𝕜 F\nm : E\nk n : ℕ\n⊢ ∃ s C,\n    0 ≤ C ∧\n      ∀ (f : 𝓢(E, E →L[ℝ] F)) (x : E),\n        ‖x‖ ^ (k, n).fst * ‖iteratedFDeriv ℝ (k, n).snd ((fun f x => ↑(f x) m) ↑f) x‖ ≤\n          C * ↑(Finset.sup s (schwartzSeminormFamily 𝕜 E (E →L[ℝ] F))) f\n[PROOFSTEP]\nuse{(k, n)}, ‖m‖, norm_nonneg _\n[GOAL]\ncase right\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : SMulCommClass ℝ 𝕜 F\nm : E\nk n : ℕ\n⊢ ∀ (f : 𝓢(E, E →L[ℝ] F)) (x : E),\n    ‖x‖ ^ (k, n).fst * ‖iteratedFDeriv ℝ (k, n).snd ((fun f x => ↑(f x) m) ↑f) x‖ ≤\n      ‖m‖ * ↑(Finset.sup {(k, n)} (schwartzSeminormFamily 𝕜 E (E →L[ℝ] F))) f\n[PROOFSTEP]\nintro f x\n[GOAL]\ncase right\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : SMulCommClass ℝ 𝕜 F\nm : E\nk n : ℕ\nf : 𝓢(E, E →L[ℝ] F)\nx : E\n⊢ ‖x‖ ^ (k, n).fst * ‖iteratedFDeriv ℝ (k, n).snd ((fun f x => ↑(f x) m) ↑f) x‖ ≤\n    ‖m‖ * ↑(Finset.sup {(k, n)} (schwartzSeminormFamily 𝕜 E (E →L[ℝ] F))) f\n[PROOFSTEP]\nrefine' le_trans (mul_le_mul_of_nonneg_left (norm_iteratedFDeriv_clm_apply_const f.2 le_top) (by positivity)) _\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : SMulCommClass ℝ 𝕜 F\nm : E\nk n : ℕ\nf : 𝓢(E, E →L[ℝ] F)\nx : E\n⊢ 0 ≤ ‖x‖ ^ (k, n).fst\n[PROOFSTEP]\npositivity\n[GOAL]\ncase right\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : SMulCommClass ℝ 𝕜 F\nm : E\nk n : ℕ\nf : 𝓢(E, E →L[ℝ] F)\nx : E\n⊢ ‖x‖ ^ (k, n).fst * (‖m‖ * ‖iteratedFDeriv ℝ (k, n).snd (fun x => ↑f x) x‖) ≤\n    ‖m‖ * ↑(Finset.sup {(k, n)} (schwartzSeminormFamily 𝕜 E (E →L[ℝ] F))) f\n[PROOFSTEP]\nrw [← mul_assoc, ← mul_comm ‖m‖, mul_assoc]\n[GOAL]\ncase right\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : SMulCommClass ℝ 𝕜 F\nm : E\nk n : ℕ\nf : 𝓢(E, E →L[ℝ] F)\nx : E\n⊢ ‖m‖ * (‖x‖ ^ (k, n).fst * ‖iteratedFDeriv ℝ (k, n).snd (fun x => ↑f x) x‖) ≤\n    ‖m‖ * ↑(Finset.sup {(k, n)} (schwartzSeminormFamily 𝕜 E (E →L[ℝ] F))) f\n[PROOFSTEP]\nrefine' mul_le_mul_of_nonneg_left _ (norm_nonneg _)\n[GOAL]\ncase right\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : SMulCommClass ℝ 𝕜 F\nm : E\nk n : ℕ\nf : 𝓢(E, E →L[ℝ] F)\nx : E\n⊢ ‖x‖ ^ (k, n).fst * ‖iteratedFDeriv ℝ (k, n).snd (fun x => ↑f x) x‖ ≤\n    ↑(Finset.sup {(k, n)} (schwartzSeminormFamily 𝕜 E (E →L[ℝ] F))) f\n[PROOFSTEP]\nsimp only [Finset.sup_singleton, schwartzSeminormFamily_apply, le_seminorm]\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\ninst✝³ : NormedAddCommGroup D\ninst✝² : NormedSpace ℝ D\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nB : E →L[ℝ] F →L[ℝ] G\ng : D → F\nhg : Function.HasTemperateGrowth g\nx✝² x✝¹ : 𝓢(D, E)\nx✝ : D\n⊢ (fun f x => ↑(↑B (f x)) (g x)) (↑x✝² + ↑x✝¹) x✝ =\n    (fun f x => ↑(↑B (f x)) (g x)) (↑x✝²) x✝ + (fun f x => ↑(↑B (f x)) (g x)) (↑x✝¹) x✝\n[PROOFSTEP]\nsimp only [map_add, add_left_inj, Pi.add_apply, eq_self_iff_true, ContinuousLinearMap.add_apply]\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\ninst✝³ : NormedAddCommGroup D\ninst✝² : NormedSpace ℝ D\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nB : E →L[ℝ] F →L[ℝ] G\ng : D → F\nhg : Function.HasTemperateGrowth g\nx✝² : ℝ\nx✝¹ : 𝓢(D, E)\nx✝ : D\n⊢ (fun f x => ↑(↑B (f x)) (g x)) (↑(x✝² • x✝¹)) x✝ = ↑(RingHom.id ℝ) x✝² • (fun f x => ↑(↑B (f x)) (g x)) (↑x✝¹) x✝\n[PROOFSTEP]\nsimp only [smul_apply, map_smul, ContinuousLinearMap.coe_smul', Pi.smul_apply, RingHom.id_apply]\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\ninst✝³ : NormedAddCommGroup D\ninst✝² : NormedSpace ℝ D\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nB : E →L[ℝ] F →L[ℝ] G\ng : D → F\nhg : Function.HasTemperateGrowth g\n⊢ ∀ (n : ℕ × ℕ),\n    ∃ s C,\n      0 ≤ C ∧\n        ∀ (f : 𝓢(D, E)) (x : D),\n          ‖x‖ ^ n.fst * ‖iteratedFDeriv ℝ n.snd ((fun f x => ↑(↑B (f x)) (g x)) ↑f) x‖ ≤\n            C * ↑(Finset.sup s (schwartzSeminormFamily ℝ D E)) f\n[PROOFSTEP]\nrintro ⟨k, n⟩\n[GOAL]\ncase mk\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\ninst✝³ : NormedAddCommGroup D\ninst✝² : NormedSpace ℝ D\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nB : E →L[ℝ] F →L[ℝ] G\ng : D → F\nhg : Function.HasTemperateGrowth g\nk n : ℕ\n⊢ ∃ s C,\n    0 ≤ C ∧\n      ∀ (f : 𝓢(D, E)) (x : D),\n        ‖x‖ ^ (k, n).fst * ‖iteratedFDeriv ℝ (k, n).snd ((fun f x => ↑(↑B (f x)) (g x)) ↑f) x‖ ≤\n          C * ↑(Finset.sup s (schwartzSeminormFamily ℝ D E)) f\n[PROOFSTEP]\nrcases hg.norm_iteratedFDeriv_le_uniform_aux n with ⟨l, C, hC, hgrowth⟩\n[GOAL]\ncase mk.intro.intro.intro\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\ninst✝³ : NormedAddCommGroup D\ninst✝² : NormedSpace ℝ D\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nB : E →L[ℝ] F →L[ℝ] G\ng : D → F\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nhgrowth : ∀ (N : ℕ), N ≤ n → ∀ (x : D), ‖iteratedFDeriv ℝ N g x‖ ≤ C * (1 + ‖x‖) ^ l\n⊢ ∃ s C,\n    0 ≤ C ∧\n      ∀ (f : 𝓢(D, E)) (x : D),\n        ‖x‖ ^ (k, n).fst * ‖iteratedFDeriv ℝ (k, n).snd ((fun f x => ↑(↑B (f x)) (g x)) ↑f) x‖ ≤\n          C * ↑(Finset.sup s (schwartzSeminormFamily ℝ D E)) f\n[PROOFSTEP]\nuse Finset.Iic (l + k, n), ‖B‖ * ((n : ℝ) + (1 : ℝ)) * n.choose (n / 2) * (C * 2 ^ (l + k)), by positivity\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\ninst✝³ : NormedAddCommGroup D\ninst✝² : NormedSpace ℝ D\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nB : E →L[ℝ] F →L[ℝ] G\ng : D → F\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nhgrowth : ∀ (N : ℕ), N ≤ n → ∀ (x : D), ‖iteratedFDeriv ℝ N g x‖ ≤ C * (1 + ‖x‖) ^ l\n⊢ 0 ≤ ‖B‖ * (↑n + 1) * ↑(Nat.choose n (n / 2)) * (C * ↑(2 ^ (l + k)))\n[PROOFSTEP]\npositivity\n[GOAL]\ncase right\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\ninst✝³ : NormedAddCommGroup D\ninst✝² : NormedSpace ℝ D\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nB : E →L[ℝ] F →L[ℝ] G\ng : D → F\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nhgrowth : ∀ (N : ℕ), N ≤ n → ∀ (x : D), ‖iteratedFDeriv ℝ N g x‖ ≤ C * (1 + ‖x‖) ^ l\n⊢ ∀ (f : 𝓢(D, E)) (x : D),\n    ‖x‖ ^ (k, n).fst * ‖iteratedFDeriv ℝ (k, n).snd ((fun f x => ↑(↑B (f x)) (g x)) ↑f) x‖ ≤\n      ‖B‖ * (↑n + 1) * ↑(Nat.choose n (n / 2)) * (C * ↑(2 ^ (l + k))) *\n        ↑(Finset.sup (Finset.Iic (l + k, n)) (schwartzSeminormFamily ℝ D E)) f\n[PROOFSTEP]\nintro f x\n[GOAL]\ncase right\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\ninst✝³ : NormedAddCommGroup D\ninst✝² : NormedSpace ℝ D\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nB : E →L[ℝ] F →L[ℝ] G\ng : D → F\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nhgrowth : ∀ (N : ℕ), N ≤ n → ∀ (x : D), ‖iteratedFDeriv ℝ N g x‖ ≤ C * (1 + ‖x‖) ^ l\nf : 𝓢(D, E)\nx : D\n⊢ ‖x‖ ^ (k, n).fst * ‖iteratedFDeriv ℝ (k, n).snd ((fun f x => ↑(↑B (f x)) (g x)) ↑f) x‖ ≤\n    ‖B‖ * (↑n + 1) * ↑(Nat.choose n (n / 2)) * (C * ↑(2 ^ (l + k))) *\n      ↑(Finset.sup (Finset.Iic (l + k, n)) (schwartzSeminormFamily ℝ D E)) f\n[PROOFSTEP]\nhave hxk : 0 ≤ ‖x‖ ^ k := by positivity\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\ninst✝³ : NormedAddCommGroup D\ninst✝² : NormedSpace ℝ D\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nB : E →L[ℝ] F →L[ℝ] G\ng : D → F\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nhgrowth : ∀ (N : ℕ), N ≤ n → ∀ (x : D), ‖iteratedFDeriv ℝ N g x‖ ≤ C * (1 + ‖x‖) ^ l\nf : 𝓢(D, E)\nx : D\n⊢ 0 ≤ ‖x‖ ^ k\n[PROOFSTEP]\npositivity\n[GOAL]\ncase right\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\ninst✝³ : NormedAddCommGroup D\ninst✝² : NormedSpace ℝ D\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nB : E →L[ℝ] F →L[ℝ] G\ng : D → F\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nhgrowth : ∀ (N : ℕ), N ≤ n → ∀ (x : D), ‖iteratedFDeriv ℝ N g x‖ ≤ C * (1 + ‖x‖) ^ l\nf : 𝓢(D, E)\nx : D\nhxk : 0 ≤ ‖x‖ ^ k\n⊢ ‖x‖ ^ (k, n).fst * ‖iteratedFDeriv ℝ (k, n).snd ((fun f x => ↑(↑B (f x)) (g x)) ↑f) x‖ ≤\n    ‖B‖ * (↑n + 1) * ↑(Nat.choose n (n / 2)) * (C * ↑(2 ^ (l + k))) *\n      ↑(Finset.sup (Finset.Iic (l + k, n)) (schwartzSeminormFamily ℝ D E)) f\n[PROOFSTEP]\nhave hnorm_mul := ContinuousLinearMap.norm_iteratedFDeriv_le_of_bilinear B f.smooth' hg.1 x (n := n) le_top\n[GOAL]\ncase right\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\ninst✝³ : NormedAddCommGroup D\ninst✝² : NormedSpace ℝ D\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nB : E →L[ℝ] F →L[ℝ] G\ng : D → F\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nhgrowth : ∀ (N : ℕ), N ≤ n → ∀ (x : D), ‖iteratedFDeriv ℝ N g x‖ ≤ C * (1 + ‖x‖) ^ l\nf : 𝓢(D, E)\nx : D\nhxk : 0 ≤ ‖x‖ ^ k\nhnorm_mul :\n  ‖iteratedFDeriv ℝ n (fun y => ↑(↑B (toFun f y)) (g y)) x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1), ↑(Nat.choose n i) * ‖iteratedFDeriv ℝ i f.toFun x‖ * ‖iteratedFDeriv ℝ (n - i) g x‖\n⊢ ‖x‖ ^ (k, n).fst * ‖iteratedFDeriv ℝ (k, n).snd ((fun f x => ↑(↑B (f x)) (g x)) ↑f) x‖ ≤\n    ‖B‖ * (↑n + 1) * ↑(Nat.choose n (n / 2)) * (C * ↑(2 ^ (l + k))) *\n      ↑(Finset.sup (Finset.Iic (l + k, n)) (schwartzSeminormFamily ℝ D E)) f\n[PROOFSTEP]\nrefine' le_trans (mul_le_mul_of_nonneg_left hnorm_mul hxk) _\n[GOAL]\ncase right\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\ninst✝³ : NormedAddCommGroup D\ninst✝² : NormedSpace ℝ D\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nB : E →L[ℝ] F →L[ℝ] G\ng : D → F\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nhgrowth : ∀ (N : ℕ), N ≤ n → ∀ (x : D), ‖iteratedFDeriv ℝ N g x‖ ≤ C * (1 + ‖x‖) ^ l\nf : 𝓢(D, E)\nx : D\nhxk : 0 ≤ ‖x‖ ^ k\nhnorm_mul :\n  ‖iteratedFDeriv ℝ n (fun y => ↑(↑B (toFun f y)) (g y)) x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1), ↑(Nat.choose n i) * ‖iteratedFDeriv ℝ i f.toFun x‖ * ‖iteratedFDeriv ℝ (n - i) g x‖\n⊢ ‖x‖ ^ (k, n).fst *\n      (‖B‖ *\n        ∑ i in Finset.range (n + 1),\n          ↑(Nat.choose n i) * ‖iteratedFDeriv ℝ i f.toFun x‖ * ‖iteratedFDeriv ℝ (n - i) g x‖) ≤\n    ‖B‖ * (↑n + 1) * ↑(Nat.choose n (n / 2)) * (C * ↑(2 ^ (l + k))) *\n      ↑(Finset.sup (Finset.Iic (l + k, n)) (schwartzSeminormFamily ℝ D E)) f\n[PROOFSTEP]\nrw [← mul_assoc (‖x‖ ^ k), mul_comm (‖x‖ ^ k)]\n[GOAL]\ncase right\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\ninst✝³ : NormedAddCommGroup D\ninst✝² : NormedSpace ℝ D\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nB : E →L[ℝ] F →L[ℝ] G\ng : D → F\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nhgrowth : ∀ (N : ℕ), N ≤ n → ∀ (x : D), ‖iteratedFDeriv ℝ N g x‖ ≤ C * (1 + ‖x‖) ^ l\nf : 𝓢(D, E)\nx : D\nhxk : 0 ≤ ‖x‖ ^ k\nhnorm_mul :\n  ‖iteratedFDeriv ℝ n (fun y => ↑(↑B (toFun f y)) (g y)) x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1), ↑(Nat.choose n i) * ‖iteratedFDeriv ℝ i f.toFun x‖ * ‖iteratedFDeriv ℝ (n - i) g x‖\n⊢ ‖B‖ * ‖x‖ ^ k *\n      ∑ i in Finset.range (n + 1), ↑(Nat.choose n i) * ‖iteratedFDeriv ℝ i f.toFun x‖ * ‖iteratedFDeriv ℝ (n - i) g x‖ ≤\n    ‖B‖ * (↑n + 1) * ↑(Nat.choose n (n / 2)) * (C * ↑(2 ^ (l + k))) *\n      ↑(Finset.sup (Finset.Iic (l + k, n)) (schwartzSeminormFamily ℝ D E)) f\n[PROOFSTEP]\nsimp_rw [mul_assoc ‖B‖]\n[GOAL]\ncase right\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\ninst✝³ : NormedAddCommGroup D\ninst✝² : NormedSpace ℝ D\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nB : E →L[ℝ] F →L[ℝ] G\ng : D → F\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nhgrowth : ∀ (N : ℕ), N ≤ n → ∀ (x : D), ‖iteratedFDeriv ℝ N g x‖ ≤ C * (1 + ‖x‖) ^ l\nf : 𝓢(D, E)\nx : D\nhxk : 0 ≤ ‖x‖ ^ k\nhnorm_mul :\n  ‖iteratedFDeriv ℝ n (fun y => ↑(↑B (toFun f y)) (g y)) x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1), ↑(Nat.choose n i) * ‖iteratedFDeriv ℝ i f.toFun x‖ * ‖iteratedFDeriv ℝ (n - i) g x‖\n⊢ ‖B‖ *\n      (‖x‖ ^ k *\n        ∑ x_1 in Finset.range (n + 1),\n          ↑(Nat.choose n x_1) * ‖iteratedFDeriv ℝ x_1 f.toFun x‖ * ‖iteratedFDeriv ℝ (n - x_1) g x‖) ≤\n    ‖B‖ *\n      ((↑n + 1) * ↑(Nat.choose n (n / 2)) * (C * ↑(2 ^ (l + k))) *\n        ↑(Finset.sup (Finset.Iic (l + k, n)) (schwartzSeminormFamily ℝ D E)) f)\n[PROOFSTEP]\nrefine' mul_le_mul_of_nonneg_left _ (by positivity)\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\ninst✝³ : NormedAddCommGroup D\ninst✝² : NormedSpace ℝ D\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nB : E →L[ℝ] F →L[ℝ] G\ng : D → F\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nhgrowth : ∀ (N : ℕ), N ≤ n → ∀ (x : D), ‖iteratedFDeriv ℝ N g x‖ ≤ C * (1 + ‖x‖) ^ l\nf : 𝓢(D, E)\nx : D\nhxk : 0 ≤ ‖x‖ ^ k\nhnorm_mul :\n  ‖iteratedFDeriv ℝ n (fun y => ↑(↑B (toFun f y)) (g y)) x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1), ↑(Nat.choose n i) * ‖iteratedFDeriv ℝ i f.toFun x‖ * ‖iteratedFDeriv ℝ (n - i) g x‖\n⊢ 0 ≤ ‖B‖\n[PROOFSTEP]\npositivity\n[GOAL]\ncase right\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\ninst✝³ : NormedAddCommGroup D\ninst✝² : NormedSpace ℝ D\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nB : E →L[ℝ] F →L[ℝ] G\ng : D → F\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nhgrowth : ∀ (N : ℕ), N ≤ n → ∀ (x : D), ‖iteratedFDeriv ℝ N g x‖ ≤ C * (1 + ‖x‖) ^ l\nf : 𝓢(D, E)\nx : D\nhxk : 0 ≤ ‖x‖ ^ k\nhnorm_mul :\n  ‖iteratedFDeriv ℝ n (fun y => ↑(↑B (toFun f y)) (g y)) x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1), ↑(Nat.choose n i) * ‖iteratedFDeriv ℝ i f.toFun x‖ * ‖iteratedFDeriv ℝ (n - i) g x‖\n⊢ ‖x‖ ^ k *\n      ∑ x_1 in Finset.range (n + 1),\n        ↑(Nat.choose n x_1) * ‖iteratedFDeriv ℝ x_1 f.toFun x‖ * ‖iteratedFDeriv ℝ (n - x_1) g x‖ ≤\n    (↑n + 1) * ↑(Nat.choose n (n / 2)) * (C * ↑(2 ^ (l + k))) *\n      ↑(Finset.sup (Finset.Iic (l + k, n)) (schwartzSeminormFamily ℝ D E)) f\n[PROOFSTEP]\nrw [Finset.mul_sum]\n[GOAL]\ncase right\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\ninst✝³ : NormedAddCommGroup D\ninst✝² : NormedSpace ℝ D\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nB : E →L[ℝ] F →L[ℝ] G\ng : D → F\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nhgrowth : ∀ (N : ℕ), N ≤ n → ∀ (x : D), ‖iteratedFDeriv ℝ N g x‖ ≤ C * (1 + ‖x‖) ^ l\nf : 𝓢(D, E)\nx : D\nhxk : 0 ≤ ‖x‖ ^ k\nhnorm_mul :\n  ‖iteratedFDeriv ℝ n (fun y => ↑(↑B (toFun f y)) (g y)) x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1), ↑(Nat.choose n i) * ‖iteratedFDeriv ℝ i f.toFun x‖ * ‖iteratedFDeriv ℝ (n - i) g x‖\n⊢ ∑ x_1 in Finset.range (n + 1),\n      ‖x‖ ^ k * (↑(Nat.choose n x_1) * ‖iteratedFDeriv ℝ x_1 f.toFun x‖ * ‖iteratedFDeriv ℝ (n - x_1) g x‖) ≤\n    (↑n + 1) * ↑(Nat.choose n (n / 2)) * (C * ↑(2 ^ (l + k))) *\n      ↑(Finset.sup (Finset.Iic (l + k, n)) (schwartzSeminormFamily ℝ D E)) f\n[PROOFSTEP]\nhave : (∑ _x : ℕ in Finset.range (n + 1), (1 : ℝ)) = n + 1 := by simp\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\ninst✝³ : NormedAddCommGroup D\ninst✝² : NormedSpace ℝ D\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nB : E →L[ℝ] F →L[ℝ] G\ng : D → F\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nhgrowth : ∀ (N : ℕ), N ≤ n → ∀ (x : D), ‖iteratedFDeriv ℝ N g x‖ ≤ C * (1 + ‖x‖) ^ l\nf : 𝓢(D, E)\nx : D\nhxk : 0 ≤ ‖x‖ ^ k\nhnorm_mul :\n  ‖iteratedFDeriv ℝ n (fun y => ↑(↑B (toFun f y)) (g y)) x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1), ↑(Nat.choose n i) * ‖iteratedFDeriv ℝ i f.toFun x‖ * ‖iteratedFDeriv ℝ (n - i) g x‖\n⊢ ∑ _x in Finset.range (n + 1), 1 = ↑n + 1\n[PROOFSTEP]\nsimp\n[GOAL]\ncase right\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\ninst✝³ : NormedAddCommGroup D\ninst✝² : NormedSpace ℝ D\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nB : E →L[ℝ] F →L[ℝ] G\ng : D → F\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nhgrowth : ∀ (N : ℕ), N ≤ n → ∀ (x : D), ‖iteratedFDeriv ℝ N g x‖ ≤ C * (1 + ‖x‖) ^ l\nf : 𝓢(D, E)\nx : D\nhxk : 0 ≤ ‖x‖ ^ k\nhnorm_mul :\n  ‖iteratedFDeriv ℝ n (fun y => ↑(↑B (toFun f y)) (g y)) x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1), ↑(Nat.choose n i) * ‖iteratedFDeriv ℝ i f.toFun x‖ * ‖iteratedFDeriv ℝ (n - i) g x‖\nthis : ∑ _x in Finset.range (n + 1), 1 = ↑n + 1\n⊢ ∑ x_1 in Finset.range (n + 1),\n      ‖x‖ ^ k * (↑(Nat.choose n x_1) * ‖iteratedFDeriv ℝ x_1 f.toFun x‖ * ‖iteratedFDeriv ℝ (n - x_1) g x‖) ≤\n    (↑n + 1) * ↑(Nat.choose n (n / 2)) * (C * ↑(2 ^ (l + k))) *\n      ↑(Finset.sup (Finset.Iic (l + k, n)) (schwartzSeminormFamily ℝ D E)) f\n[PROOFSTEP]\nrepeat rw [mul_assoc ((n : ℝ) + 1)]\n[GOAL]\ncase right\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\ninst✝³ : NormedAddCommGroup D\ninst✝² : NormedSpace ℝ D\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nB : E →L[ℝ] F →L[ℝ] G\ng : D → F\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nhgrowth : ∀ (N : ℕ), N ≤ n → ∀ (x : D), ‖iteratedFDeriv ℝ N g x‖ ≤ C * (1 + ‖x‖) ^ l\nf : 𝓢(D, E)\nx : D\nhxk : 0 ≤ ‖x‖ ^ k\nhnorm_mul :\n  ‖iteratedFDeriv ℝ n (fun y => ↑(↑B (toFun f y)) (g y)) x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1), ↑(Nat.choose n i) * ‖iteratedFDeriv ℝ i f.toFun x‖ * ‖iteratedFDeriv ℝ (n - i) g x‖\nthis : ∑ _x in Finset.range (n + 1), 1 = ↑n + 1\n⊢ ∑ x_1 in Finset.range (n + 1),\n      ‖x‖ ^ k * (↑(Nat.choose n x_1) * ‖iteratedFDeriv ℝ x_1 f.toFun x‖ * ‖iteratedFDeriv ℝ (n - x_1) g x‖) ≤\n    (↑n + 1) * ↑(Nat.choose n (n / 2)) * (C * ↑(2 ^ (l + k))) *\n      ↑(Finset.sup (Finset.Iic (l + k, n)) (schwartzSeminormFamily ℝ D E)) f\n[PROOFSTEP]\nrw [mul_assoc ((n : ℝ) + 1)]\n[GOAL]\ncase right\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\ninst✝³ : NormedAddCommGroup D\ninst✝² : NormedSpace ℝ D\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nB : E →L[ℝ] F →L[ℝ] G\ng : D → F\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nhgrowth : ∀ (N : ℕ), N ≤ n → ∀ (x : D), ‖iteratedFDeriv ℝ N g x‖ ≤ C * (1 + ‖x‖) ^ l\nf : 𝓢(D, E)\nx : D\nhxk : 0 ≤ ‖x‖ ^ k\nhnorm_mul :\n  ‖iteratedFDeriv ℝ n (fun y => ↑(↑B (toFun f y)) (g y)) x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1), ↑(Nat.choose n i) * ‖iteratedFDeriv ℝ i f.toFun x‖ * ‖iteratedFDeriv ℝ (n - i) g x‖\nthis : ∑ _x in Finset.range (n + 1), 1 = ↑n + 1\n⊢ ∑ x_1 in Finset.range (n + 1),\n      ‖x‖ ^ k * (↑(Nat.choose n x_1) * ‖iteratedFDeriv ℝ x_1 f.toFun x‖ * ‖iteratedFDeriv ℝ (n - x_1) g x‖) ≤\n    (↑n + 1) * (↑(Nat.choose n (n / 2)) * (C * ↑(2 ^ (l + k)))) *\n      ↑(Finset.sup (Finset.Iic (l + k, n)) (schwartzSeminormFamily ℝ D E)) f\n[PROOFSTEP]\nrw [mul_assoc ((n : ℝ) + 1)]\n[GOAL]\ncase right\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\ninst✝³ : NormedAddCommGroup D\ninst✝² : NormedSpace ℝ D\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nB : E →L[ℝ] F →L[ℝ] G\ng : D → F\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nhgrowth : ∀ (N : ℕ), N ≤ n → ∀ (x : D), ‖iteratedFDeriv ℝ N g x‖ ≤ C * (1 + ‖x‖) ^ l\nf : 𝓢(D, E)\nx : D\nhxk : 0 ≤ ‖x‖ ^ k\nhnorm_mul :\n  ‖iteratedFDeriv ℝ n (fun y => ↑(↑B (toFun f y)) (g y)) x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1), ↑(Nat.choose n i) * ‖iteratedFDeriv ℝ i f.toFun x‖ * ‖iteratedFDeriv ℝ (n - i) g x‖\nthis : ∑ _x in Finset.range (n + 1), 1 = ↑n + 1\n⊢ ∑ x_1 in Finset.range (n + 1),\n      ‖x‖ ^ k * (↑(Nat.choose n x_1) * ‖iteratedFDeriv ℝ x_1 f.toFun x‖ * ‖iteratedFDeriv ℝ (n - x_1) g x‖) ≤\n    (↑n + 1) *\n      (↑(Nat.choose n (n / 2)) * (C * ↑(2 ^ (l + k))) *\n        ↑(Finset.sup (Finset.Iic (l + k, n)) (schwartzSeminormFamily ℝ D E)) f)\n[PROOFSTEP]\nrw [mul_assoc ((n : ℝ) + 1)]\n[GOAL]\ncase right\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\ninst✝³ : NormedAddCommGroup D\ninst✝² : NormedSpace ℝ D\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nB : E →L[ℝ] F →L[ℝ] G\ng : D → F\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nhgrowth : ∀ (N : ℕ), N ≤ n → ∀ (x : D), ‖iteratedFDeriv ℝ N g x‖ ≤ C * (1 + ‖x‖) ^ l\nf : 𝓢(D, E)\nx : D\nhxk : 0 ≤ ‖x‖ ^ k\nhnorm_mul :\n  ‖iteratedFDeriv ℝ n (fun y => ↑(↑B (toFun f y)) (g y)) x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1), ↑(Nat.choose n i) * ‖iteratedFDeriv ℝ i f.toFun x‖ * ‖iteratedFDeriv ℝ (n - i) g x‖\nthis : ∑ _x in Finset.range (n + 1), 1 = ↑n + 1\n⊢ ∑ x_1 in Finset.range (n + 1),\n      ‖x‖ ^ k * (↑(Nat.choose n x_1) * ‖iteratedFDeriv ℝ x_1 f.toFun x‖ * ‖iteratedFDeriv ℝ (n - x_1) g x‖) ≤\n    (↑n + 1) *\n      (↑(Nat.choose n (n / 2)) * (C * ↑(2 ^ (l + k))) *\n        ↑(Finset.sup (Finset.Iic (l + k, n)) (schwartzSeminormFamily ℝ D E)) f)\n[PROOFSTEP]\nrw [← this, Finset.sum_mul]\n[GOAL]\ncase right\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\ninst✝³ : NormedAddCommGroup D\ninst✝² : NormedSpace ℝ D\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nB : E →L[ℝ] F →L[ℝ] G\ng : D → F\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nhgrowth : ∀ (N : ℕ), N ≤ n → ∀ (x : D), ‖iteratedFDeriv ℝ N g x‖ ≤ C * (1 + ‖x‖) ^ l\nf : 𝓢(D, E)\nx : D\nhxk : 0 ≤ ‖x‖ ^ k\nhnorm_mul :\n  ‖iteratedFDeriv ℝ n (fun y => ↑(↑B (toFun f y)) (g y)) x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1), ↑(Nat.choose n i) * ‖iteratedFDeriv ℝ i f.toFun x‖ * ‖iteratedFDeriv ℝ (n - i) g x‖\nthis : ∑ _x in Finset.range (n + 1), 1 = ↑n + 1\n⊢ ∑ x_1 in Finset.range (n + 1),\n      ‖x‖ ^ k * (↑(Nat.choose n x_1) * ‖iteratedFDeriv ℝ x_1 f.toFun x‖ * ‖iteratedFDeriv ℝ (n - x_1) g x‖) ≤\n    ∑ x in Finset.range (n + 1),\n      1 *\n        (↑(Nat.choose n (n / 2)) * (C * ↑(2 ^ (l + k))) *\n          ↑(Finset.sup (Finset.Iic (l + k, n)) (schwartzSeminormFamily ℝ D E)) f)\n[PROOFSTEP]\nrefine' Finset.sum_le_sum fun i hi => _\n[GOAL]\ncase right\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\ninst✝³ : NormedAddCommGroup D\ninst✝² : NormedSpace ℝ D\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nB : E →L[ℝ] F →L[ℝ] G\ng : D → F\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nhgrowth : ∀ (N : ℕ), N ≤ n → ∀ (x : D), ‖iteratedFDeriv ℝ N g x‖ ≤ C * (1 + ‖x‖) ^ l\nf : 𝓢(D, E)\nx : D\nhxk : 0 ≤ ‖x‖ ^ k\nhnorm_mul :\n  ‖iteratedFDeriv ℝ n (fun y => ↑(↑B (toFun f y)) (g y)) x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1), ↑(Nat.choose n i) * ‖iteratedFDeriv ℝ i f.toFun x‖ * ‖iteratedFDeriv ℝ (n - i) g x‖\nthis : ∑ _x in Finset.range (n + 1), 1 = ↑n + 1\ni : ℕ\nhi : i ∈ Finset.range (n + 1)\n⊢ ‖x‖ ^ k * (↑(Nat.choose n i) * ‖iteratedFDeriv ℝ i f.toFun x‖ * ‖iteratedFDeriv ℝ (n - i) g x‖) ≤\n    1 *\n      (↑(Nat.choose n (n / 2)) * (C * ↑(2 ^ (l + k))) *\n        ↑(Finset.sup (Finset.Iic (l + k, n)) (schwartzSeminormFamily ℝ D E)) f)\n[PROOFSTEP]\nsimp only [one_mul]\n[GOAL]\ncase right\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\ninst✝³ : NormedAddCommGroup D\ninst✝² : NormedSpace ℝ D\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nB : E →L[ℝ] F →L[ℝ] G\ng : D → F\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nhgrowth : ∀ (N : ℕ), N ≤ n → ∀ (x : D), ‖iteratedFDeriv ℝ N g x‖ ≤ C * (1 + ‖x‖) ^ l\nf : 𝓢(D, E)\nx : D\nhxk : 0 ≤ ‖x‖ ^ k\nhnorm_mul :\n  ‖iteratedFDeriv ℝ n (fun y => ↑(↑B (toFun f y)) (g y)) x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1), ↑(Nat.choose n i) * ‖iteratedFDeriv ℝ i f.toFun x‖ * ‖iteratedFDeriv ℝ (n - i) g x‖\nthis : ∑ _x in Finset.range (n + 1), 1 = ↑n + 1\ni : ℕ\nhi : i ∈ Finset.range (n + 1)\n⊢ ‖x‖ ^ k * (↑(Nat.choose n i) * ‖iteratedFDeriv ℝ i f.toFun x‖ * ‖iteratedFDeriv ℝ (n - i) g x‖) ≤\n    ↑(Nat.choose n (n / 2)) * (C * ↑(2 ^ (l + k))) *\n      ↑(Finset.sup (Finset.Iic (l + k, n)) (schwartzSeminormFamily ℝ D E)) f\n[PROOFSTEP]\nrw [← mul_assoc, mul_comm (‖x‖ ^ k), mul_assoc, mul_assoc, mul_assoc]\n[GOAL]\ncase right\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\ninst✝³ : NormedAddCommGroup D\ninst✝² : NormedSpace ℝ D\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nB : E →L[ℝ] F →L[ℝ] G\ng : D → F\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nhgrowth : ∀ (N : ℕ), N ≤ n → ∀ (x : D), ‖iteratedFDeriv ℝ N g x‖ ≤ C * (1 + ‖x‖) ^ l\nf : 𝓢(D, E)\nx : D\nhxk : 0 ≤ ‖x‖ ^ k\nhnorm_mul :\n  ‖iteratedFDeriv ℝ n (fun y => ↑(↑B (toFun f y)) (g y)) x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1), ↑(Nat.choose n i) * ‖iteratedFDeriv ℝ i f.toFun x‖ * ‖iteratedFDeriv ℝ (n - i) g x‖\nthis : ∑ _x in Finset.range (n + 1), 1 = ↑n + 1\ni : ℕ\nhi : i ∈ Finset.range (n + 1)\n⊢ ↑(Nat.choose n i) * (‖iteratedFDeriv ℝ i f.toFun x‖ * (‖x‖ ^ k * ‖iteratedFDeriv ℝ (n - i) g x‖)) ≤\n    ↑(Nat.choose n (n / 2)) *\n      (C * ↑(2 ^ (l + k)) * ↑(Finset.sup (Finset.Iic (l + k, n)) (schwartzSeminormFamily ℝ D E)) f)\n[PROOFSTEP]\nrefine' mul_le_mul _ _ (by positivity) (by positivity)\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\ninst✝³ : NormedAddCommGroup D\ninst✝² : NormedSpace ℝ D\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nB : E →L[ℝ] F →L[ℝ] G\ng : D → F\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nhgrowth : ∀ (N : ℕ), N ≤ n → ∀ (x : D), ‖iteratedFDeriv ℝ N g x‖ ≤ C * (1 + ‖x‖) ^ l\nf : 𝓢(D, E)\nx : D\nhxk : 0 ≤ ‖x‖ ^ k\nhnorm_mul :\n  ‖iteratedFDeriv ℝ n (fun y => ↑(↑B (toFun f y)) (g y)) x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1), ↑(Nat.choose n i) * ‖iteratedFDeriv ℝ i f.toFun x‖ * ‖iteratedFDeriv ℝ (n - i) g x‖\nthis : ∑ _x in Finset.range (n + 1), 1 = ↑n + 1\ni : ℕ\nhi : i ∈ Finset.range (n + 1)\n⊢ 0 ≤ ‖iteratedFDeriv ℝ i f.toFun x‖ * (‖x‖ ^ k * ‖iteratedFDeriv ℝ (n - i) g x‖)\n[PROOFSTEP]\npositivity\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\ninst✝³ : NormedAddCommGroup D\ninst✝² : NormedSpace ℝ D\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nB : E →L[ℝ] F →L[ℝ] G\ng : D → F\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nhgrowth : ∀ (N : ℕ), N ≤ n → ∀ (x : D), ‖iteratedFDeriv ℝ N g x‖ ≤ C * (1 + ‖x‖) ^ l\nf : 𝓢(D, E)\nx : D\nhxk : 0 ≤ ‖x‖ ^ k\nhnorm_mul :\n  ‖iteratedFDeriv ℝ n (fun y => ↑(↑B (toFun f y)) (g y)) x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1), ↑(Nat.choose n i) * ‖iteratedFDeriv ℝ i f.toFun x‖ * ‖iteratedFDeriv ℝ (n - i) g x‖\nthis : ∑ _x in Finset.range (n + 1), 1 = ↑n + 1\ni : ℕ\nhi : i ∈ Finset.range (n + 1)\n⊢ 0 ≤ ↑(Nat.choose n (n / 2))\n[PROOFSTEP]\npositivity\n[GOAL]\ncase right.refine'_1\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\ninst✝³ : NormedAddCommGroup D\ninst✝² : NormedSpace ℝ D\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nB : E →L[ℝ] F →L[ℝ] G\ng : D → F\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nhgrowth : ∀ (N : ℕ), N ≤ n → ∀ (x : D), ‖iteratedFDeriv ℝ N g x‖ ≤ C * (1 + ‖x‖) ^ l\nf : 𝓢(D, E)\nx : D\nhxk : 0 ≤ ‖x‖ ^ k\nhnorm_mul :\n  ‖iteratedFDeriv ℝ n (fun y => ↑(↑B (toFun f y)) (g y)) x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1), ↑(Nat.choose n i) * ‖iteratedFDeriv ℝ i f.toFun x‖ * ‖iteratedFDeriv ℝ (n - i) g x‖\nthis : ∑ _x in Finset.range (n + 1), 1 = ↑n + 1\ni : ℕ\nhi : i ∈ Finset.range (n + 1)\n⊢ ↑(Nat.choose n i) ≤ ↑(Nat.choose n (n / 2))\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase right.refine'_1\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\ninst✝³ : NormedAddCommGroup D\ninst✝² : NormedSpace ℝ D\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nB : E →L[ℝ] F →L[ℝ] G\ng : D → F\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nhgrowth : ∀ (N : ℕ), N ≤ n → ∀ (x : D), ‖iteratedFDeriv ℝ N g x‖ ≤ C * (1 + ‖x‖) ^ l\nf : 𝓢(D, E)\nx : D\nhxk : 0 ≤ ‖x‖ ^ k\nhnorm_mul :\n  ‖iteratedFDeriv ℝ n (fun y => ↑(↑B (toFun f y)) (g y)) x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1), ↑(Nat.choose n i) * ‖iteratedFDeriv ℝ i f.toFun x‖ * ‖iteratedFDeriv ℝ (n - i) g x‖\nthis : ∑ _x in Finset.range (n + 1), 1 = ↑n + 1\ni : ℕ\nhi : i ∈ Finset.range (n + 1)\n⊢ Nat.choose n i ≤ Nat.choose n (n / 2)\n[PROOFSTEP]\nexact i.choose_le_middle n\n[GOAL]\ncase right.refine'_2\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\ninst✝³ : NormedAddCommGroup D\ninst✝² : NormedSpace ℝ D\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nB : E →L[ℝ] F →L[ℝ] G\ng : D → F\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nhgrowth : ∀ (N : ℕ), N ≤ n → ∀ (x : D), ‖iteratedFDeriv ℝ N g x‖ ≤ C * (1 + ‖x‖) ^ l\nf : 𝓢(D, E)\nx : D\nhxk : 0 ≤ ‖x‖ ^ k\nhnorm_mul :\n  ‖iteratedFDeriv ℝ n (fun y => ↑(↑B (toFun f y)) (g y)) x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1), ↑(Nat.choose n i) * ‖iteratedFDeriv ℝ i f.toFun x‖ * ‖iteratedFDeriv ℝ (n - i) g x‖\nthis : ∑ _x in Finset.range (n + 1), 1 = ↑n + 1\ni : ℕ\nhi : i ∈ Finset.range (n + 1)\n⊢ ‖iteratedFDeriv ℝ i f.toFun x‖ * (‖x‖ ^ k * ‖iteratedFDeriv ℝ (n - i) g x‖) ≤\n    C * ↑(2 ^ (l + k)) * ↑(Finset.sup (Finset.Iic (l + k, n)) (schwartzSeminormFamily ℝ D E)) f\n[PROOFSTEP]\nspecialize hgrowth (n - i) (by simp only [tsub_le_self]) x\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\ninst✝³ : NormedAddCommGroup D\ninst✝² : NormedSpace ℝ D\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nB : E →L[ℝ] F →L[ℝ] G\ng : D → F\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nhgrowth : ∀ (N : ℕ), N ≤ n → ∀ (x : D), ‖iteratedFDeriv ℝ N g x‖ ≤ C * (1 + ‖x‖) ^ l\nf : 𝓢(D, E)\nx : D\nhxk : 0 ≤ ‖x‖ ^ k\nhnorm_mul :\n  ‖iteratedFDeriv ℝ n (fun y => ↑(↑B (toFun f y)) (g y)) x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1), ↑(Nat.choose n i) * ‖iteratedFDeriv ℝ i f.toFun x‖ * ‖iteratedFDeriv ℝ (n - i) g x‖\nthis : ∑ _x in Finset.range (n + 1), 1 = ↑n + 1\ni : ℕ\nhi : i ∈ Finset.range (n + 1)\n⊢ n - i ≤ n\n[PROOFSTEP]\nsimp only [tsub_le_self]\n[GOAL]\ncase right.refine'_2\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\ninst✝³ : NormedAddCommGroup D\ninst✝² : NormedSpace ℝ D\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nB : E →L[ℝ] F →L[ℝ] G\ng : D → F\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nf : 𝓢(D, E)\nx : D\nhxk : 0 ≤ ‖x‖ ^ k\nhnorm_mul :\n  ‖iteratedFDeriv ℝ n (fun y => ↑(↑B (toFun f y)) (g y)) x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1), ↑(Nat.choose n i) * ‖iteratedFDeriv ℝ i f.toFun x‖ * ‖iteratedFDeriv ℝ (n - i) g x‖\nthis : ∑ _x in Finset.range (n + 1), 1 = ↑n + 1\ni : ℕ\nhi : i ∈ Finset.range (n + 1)\nhgrowth : ‖iteratedFDeriv ℝ (n - i) g x‖ ≤ C * (1 + ‖x‖) ^ l\n⊢ ‖iteratedFDeriv ℝ i f.toFun x‖ * (‖x‖ ^ k * ‖iteratedFDeriv ℝ (n - i) g x‖) ≤\n    C * ↑(2 ^ (l + k)) * ↑(Finset.sup (Finset.Iic (l + k, n)) (schwartzSeminormFamily ℝ D E)) f\n[PROOFSTEP]\nrw [← mul_assoc]\n[GOAL]\ncase right.refine'_2\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\ninst✝³ : NormedAddCommGroup D\ninst✝² : NormedSpace ℝ D\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nB : E →L[ℝ] F →L[ℝ] G\ng : D → F\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nf : 𝓢(D, E)\nx : D\nhxk : 0 ≤ ‖x‖ ^ k\nhnorm_mul :\n  ‖iteratedFDeriv ℝ n (fun y => ↑(↑B (toFun f y)) (g y)) x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1), ↑(Nat.choose n i) * ‖iteratedFDeriv ℝ i f.toFun x‖ * ‖iteratedFDeriv ℝ (n - i) g x‖\nthis : ∑ _x in Finset.range (n + 1), 1 = ↑n + 1\ni : ℕ\nhi : i ∈ Finset.range (n + 1)\nhgrowth : ‖iteratedFDeriv ℝ (n - i) g x‖ ≤ C * (1 + ‖x‖) ^ l\n⊢ ‖iteratedFDeriv ℝ i f.toFun x‖ * ‖x‖ ^ k * ‖iteratedFDeriv ℝ (n - i) g x‖ ≤\n    C * ↑(2 ^ (l + k)) * ↑(Finset.sup (Finset.Iic (l + k, n)) (schwartzSeminormFamily ℝ D E)) f\n[PROOFSTEP]\nrefine' le_trans (mul_le_mul_of_nonneg_left hgrowth (by positivity)) _\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\ninst✝³ : NormedAddCommGroup D\ninst✝² : NormedSpace ℝ D\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nB : E →L[ℝ] F →L[ℝ] G\ng : D → F\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nf : 𝓢(D, E)\nx : D\nhxk : 0 ≤ ‖x‖ ^ k\nhnorm_mul :\n  ‖iteratedFDeriv ℝ n (fun y => ↑(↑B (toFun f y)) (g y)) x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1), ↑(Nat.choose n i) * ‖iteratedFDeriv ℝ i f.toFun x‖ * ‖iteratedFDeriv ℝ (n - i) g x‖\nthis : ∑ _x in Finset.range (n + 1), 1 = ↑n + 1\ni : ℕ\nhi : i ∈ Finset.range (n + 1)\nhgrowth : ‖iteratedFDeriv ℝ (n - i) g x‖ ≤ C * (1 + ‖x‖) ^ l\n⊢ 0 ≤ ‖iteratedFDeriv ℝ i f.toFun x‖ * ‖x‖ ^ k\n[PROOFSTEP]\npositivity\n[GOAL]\ncase right.refine'_2\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\ninst✝³ : NormedAddCommGroup D\ninst✝² : NormedSpace ℝ D\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nB : E →L[ℝ] F →L[ℝ] G\ng : D → F\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nf : 𝓢(D, E)\nx : D\nhxk : 0 ≤ ‖x‖ ^ k\nhnorm_mul :\n  ‖iteratedFDeriv ℝ n (fun y => ↑(↑B (toFun f y)) (g y)) x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1), ↑(Nat.choose n i) * ‖iteratedFDeriv ℝ i f.toFun x‖ * ‖iteratedFDeriv ℝ (n - i) g x‖\nthis : ∑ _x in Finset.range (n + 1), 1 = ↑n + 1\ni : ℕ\nhi : i ∈ Finset.range (n + 1)\nhgrowth : ‖iteratedFDeriv ℝ (n - i) g x‖ ≤ C * (1 + ‖x‖) ^ l\n⊢ ‖iteratedFDeriv ℝ i f.toFun x‖ * ‖x‖ ^ k * (C * (1 + ‖x‖) ^ l) ≤\n    C * ↑(2 ^ (l + k)) * ↑(Finset.sup (Finset.Iic (l + k, n)) (schwartzSeminormFamily ℝ D E)) f\n[PROOFSTEP]\nrw [mul_comm _ (C * _), mul_assoc, mul_assoc C]\n[GOAL]\ncase right.refine'_2\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\ninst✝³ : NormedAddCommGroup D\ninst✝² : NormedSpace ℝ D\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nB : E →L[ℝ] F →L[ℝ] G\ng : D → F\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nf : 𝓢(D, E)\nx : D\nhxk : 0 ≤ ‖x‖ ^ k\nhnorm_mul :\n  ‖iteratedFDeriv ℝ n (fun y => ↑(↑B (toFun f y)) (g y)) x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1), ↑(Nat.choose n i) * ‖iteratedFDeriv ℝ i f.toFun x‖ * ‖iteratedFDeriv ℝ (n - i) g x‖\nthis : ∑ _x in Finset.range (n + 1), 1 = ↑n + 1\ni : ℕ\nhi : i ∈ Finset.range (n + 1)\nhgrowth : ‖iteratedFDeriv ℝ (n - i) g x‖ ≤ C * (1 + ‖x‖) ^ l\n⊢ C * ((1 + ‖x‖) ^ l * (‖iteratedFDeriv ℝ i f.toFun x‖ * ‖x‖ ^ k)) ≤\n    C * (↑(2 ^ (l + k)) * ↑(Finset.sup (Finset.Iic (l + k, n)) (schwartzSeminormFamily ℝ D E)) f)\n[PROOFSTEP]\nrefine' mul_le_mul_of_nonneg_left _ hC\n[GOAL]\ncase right.refine'_2\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\ninst✝³ : NormedAddCommGroup D\ninst✝² : NormedSpace ℝ D\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nB : E →L[ℝ] F →L[ℝ] G\ng : D → F\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nf : 𝓢(D, E)\nx : D\nhxk : 0 ≤ ‖x‖ ^ k\nhnorm_mul :\n  ‖iteratedFDeriv ℝ n (fun y => ↑(↑B (toFun f y)) (g y)) x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1), ↑(Nat.choose n i) * ‖iteratedFDeriv ℝ i f.toFun x‖ * ‖iteratedFDeriv ℝ (n - i) g x‖\nthis : ∑ _x in Finset.range (n + 1), 1 = ↑n + 1\ni : ℕ\nhi : i ∈ Finset.range (n + 1)\nhgrowth : ‖iteratedFDeriv ℝ (n - i) g x‖ ≤ C * (1 + ‖x‖) ^ l\n⊢ (1 + ‖x‖) ^ l * (‖iteratedFDeriv ℝ i f.toFun x‖ * ‖x‖ ^ k) ≤\n    ↑(2 ^ (l + k)) * ↑(Finset.sup (Finset.Iic (l + k, n)) (schwartzSeminormFamily ℝ D E)) f\n[PROOFSTEP]\nrw [mul_comm _ (‖x‖ ^ k)]\n[GOAL]\ncase right.refine'_2\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\ninst✝³ : NormedAddCommGroup D\ninst✝² : NormedSpace ℝ D\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nB : E →L[ℝ] F →L[ℝ] G\ng : D → F\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nf : 𝓢(D, E)\nx : D\nhxk : 0 ≤ ‖x‖ ^ k\nhnorm_mul :\n  ‖iteratedFDeriv ℝ n (fun y => ↑(↑B (toFun f y)) (g y)) x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1), ↑(Nat.choose n i) * ‖iteratedFDeriv ℝ i f.toFun x‖ * ‖iteratedFDeriv ℝ (n - i) g x‖\nthis : ∑ _x in Finset.range (n + 1), 1 = ↑n + 1\ni : ℕ\nhi : i ∈ Finset.range (n + 1)\nhgrowth : ‖iteratedFDeriv ℝ (n - i) g x‖ ≤ C * (1 + ‖x‖) ^ l\n⊢ (1 + ‖x‖) ^ l * (‖x‖ ^ k * ‖iteratedFDeriv ℝ i f.toFun x‖) ≤\n    ↑(2 ^ (l + k)) * ↑(Finset.sup (Finset.Iic (l + k, n)) (schwartzSeminormFamily ℝ D E)) f\n[PROOFSTEP]\nrw [← mul_assoc]\n[GOAL]\ncase right.refine'_2\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\ninst✝³ : NormedAddCommGroup D\ninst✝² : NormedSpace ℝ D\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nB : E →L[ℝ] F →L[ℝ] G\ng : D → F\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nf : 𝓢(D, E)\nx : D\nhxk : 0 ≤ ‖x‖ ^ k\nhnorm_mul :\n  ‖iteratedFDeriv ℝ n (fun y => ↑(↑B (toFun f y)) (g y)) x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1), ↑(Nat.choose n i) * ‖iteratedFDeriv ℝ i f.toFun x‖ * ‖iteratedFDeriv ℝ (n - i) g x‖\nthis : ∑ _x in Finset.range (n + 1), 1 = ↑n + 1\ni : ℕ\nhi : i ∈ Finset.range (n + 1)\nhgrowth : ‖iteratedFDeriv ℝ (n - i) g x‖ ≤ C * (1 + ‖x‖) ^ l\n⊢ (1 + ‖x‖) ^ l * ‖x‖ ^ k * ‖iteratedFDeriv ℝ i f.toFun x‖ ≤\n    ↑(2 ^ (l + k)) * ↑(Finset.sup (Finset.Iic (l + k, n)) (schwartzSeminormFamily ℝ D E)) f\n[PROOFSTEP]\nrw [Finset.mem_range_succ_iff] at hi \n[GOAL]\ncase right.refine'_2\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\ninst✝³ : NormedAddCommGroup D\ninst✝² : NormedSpace ℝ D\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nB : E →L[ℝ] F →L[ℝ] G\ng : D → F\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nf : 𝓢(D, E)\nx : D\nhxk : 0 ≤ ‖x‖ ^ k\nhnorm_mul :\n  ‖iteratedFDeriv ℝ n (fun y => ↑(↑B (toFun f y)) (g y)) x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1), ↑(Nat.choose n i) * ‖iteratedFDeriv ℝ i f.toFun x‖ * ‖iteratedFDeriv ℝ (n - i) g x‖\nthis : ∑ _x in Finset.range (n + 1), 1 = ↑n + 1\ni : ℕ\nhi : i ≤ n\nhgrowth : ‖iteratedFDeriv ℝ (n - i) g x‖ ≤ C * (1 + ‖x‖) ^ l\n⊢ (1 + ‖x‖) ^ l * ‖x‖ ^ k * ‖iteratedFDeriv ℝ i f.toFun x‖ ≤\n    ↑(2 ^ (l + k)) * ↑(Finset.sup (Finset.Iic (l + k, n)) (schwartzSeminormFamily ℝ D E)) f\n[PROOFSTEP]\nchange i ≤ (l + k, n).snd at hi \n[GOAL]\ncase right.refine'_2\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\ninst✝³ : NormedAddCommGroup D\ninst✝² : NormedSpace ℝ D\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nB : E →L[ℝ] F →L[ℝ] G\ng : D → F\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nf : 𝓢(D, E)\nx : D\nhxk : 0 ≤ ‖x‖ ^ k\nhnorm_mul :\n  ‖iteratedFDeriv ℝ n (fun y => ↑(↑B (toFun f y)) (g y)) x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1), ↑(Nat.choose n i) * ‖iteratedFDeriv ℝ i f.toFun x‖ * ‖iteratedFDeriv ℝ (n - i) g x‖\nthis : ∑ _x in Finset.range (n + 1), 1 = ↑n + 1\ni : ℕ\nhgrowth : ‖iteratedFDeriv ℝ (n - i) g x‖ ≤ C * (1 + ‖x‖) ^ l\nhi : i ≤ (l + k, n).snd\n⊢ (1 + ‖x‖) ^ l * ‖x‖ ^ k * ‖iteratedFDeriv ℝ i f.toFun x‖ ≤\n    ↑(2 ^ (l + k)) * ↑(Finset.sup (Finset.Iic (l + k, n)) (schwartzSeminormFamily ℝ D E)) f\n[PROOFSTEP]\nrefine' le_trans _ (one_add_le_sup_seminorm_apply le_rfl hi f x)\n[GOAL]\ncase right.refine'_2\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\ninst✝³ : NormedAddCommGroup D\ninst✝² : NormedSpace ℝ D\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nB : E →L[ℝ] F →L[ℝ] G\ng : D → F\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nf : 𝓢(D, E)\nx : D\nhxk : 0 ≤ ‖x‖ ^ k\nhnorm_mul :\n  ‖iteratedFDeriv ℝ n (fun y => ↑(↑B (toFun f y)) (g y)) x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1), ↑(Nat.choose n i) * ‖iteratedFDeriv ℝ i f.toFun x‖ * ‖iteratedFDeriv ℝ (n - i) g x‖\nthis : ∑ _x in Finset.range (n + 1), 1 = ↑n + 1\ni : ℕ\nhgrowth : ‖iteratedFDeriv ℝ (n - i) g x‖ ≤ C * (1 + ‖x‖) ^ l\nhi : i ≤ (l + k, n).snd\n⊢ (1 + ‖x‖) ^ l * ‖x‖ ^ k * ‖iteratedFDeriv ℝ i f.toFun x‖ ≤ (1 + ‖x‖) ^ (l + k, n).fst * ‖iteratedFDeriv ℝ i (↑f) x‖\n[PROOFSTEP]\nrefine' mul_le_mul_of_nonneg_right _ (norm_nonneg _)\n[GOAL]\ncase right.refine'_2\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\ninst✝³ : NormedAddCommGroup D\ninst✝² : NormedSpace ℝ D\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nB : E →L[ℝ] F →L[ℝ] G\ng : D → F\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nf : 𝓢(D, E)\nx : D\nhxk : 0 ≤ ‖x‖ ^ k\nhnorm_mul :\n  ‖iteratedFDeriv ℝ n (fun y => ↑(↑B (toFun f y)) (g y)) x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1), ↑(Nat.choose n i) * ‖iteratedFDeriv ℝ i f.toFun x‖ * ‖iteratedFDeriv ℝ (n - i) g x‖\nthis : ∑ _x in Finset.range (n + 1), 1 = ↑n + 1\ni : ℕ\nhgrowth : ‖iteratedFDeriv ℝ (n - i) g x‖ ≤ C * (1 + ‖x‖) ^ l\nhi : i ≤ (l + k, n).snd\n⊢ (1 + ‖x‖) ^ l * ‖x‖ ^ k ≤ (1 + ‖x‖) ^ (l + k, n).fst\n[PROOFSTEP]\nrw [pow_add]\n[GOAL]\ncase right.refine'_2\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\ninst✝³ : NormedAddCommGroup D\ninst✝² : NormedSpace ℝ D\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nB : E →L[ℝ] F →L[ℝ] G\ng : D → F\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nf : 𝓢(D, E)\nx : D\nhxk : 0 ≤ ‖x‖ ^ k\nhnorm_mul :\n  ‖iteratedFDeriv ℝ n (fun y => ↑(↑B (toFun f y)) (g y)) x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1), ↑(Nat.choose n i) * ‖iteratedFDeriv ℝ i f.toFun x‖ * ‖iteratedFDeriv ℝ (n - i) g x‖\nthis : ∑ _x in Finset.range (n + 1), 1 = ↑n + 1\ni : ℕ\nhgrowth : ‖iteratedFDeriv ℝ (n - i) g x‖ ≤ C * (1 + ‖x‖) ^ l\nhi : i ≤ (l + k, n).snd\n⊢ (1 + ‖x‖) ^ l * ‖x‖ ^ k ≤ (1 + ‖x‖) ^ l * (1 + ‖x‖) ^ k\n[PROOFSTEP]\nrefine' mul_le_mul_of_nonneg_left _ (by positivity)\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\ninst✝³ : NormedAddCommGroup D\ninst✝² : NormedSpace ℝ D\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nB : E →L[ℝ] F →L[ℝ] G\ng : D → F\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nf : 𝓢(D, E)\nx : D\nhxk : 0 ≤ ‖x‖ ^ k\nhnorm_mul :\n  ‖iteratedFDeriv ℝ n (fun y => ↑(↑B (toFun f y)) (g y)) x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1), ↑(Nat.choose n i) * ‖iteratedFDeriv ℝ i f.toFun x‖ * ‖iteratedFDeriv ℝ (n - i) g x‖\nthis : ∑ _x in Finset.range (n + 1), 1 = ↑n + 1\ni : ℕ\nhgrowth : ‖iteratedFDeriv ℝ (n - i) g x‖ ≤ C * (1 + ‖x‖) ^ l\nhi : i ≤ (l + k, n).snd\n⊢ 0 ≤ (1 + ‖x‖) ^ l\n[PROOFSTEP]\npositivity\n[GOAL]\ncase right.refine'_2\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\ninst✝³ : NormedAddCommGroup D\ninst✝² : NormedSpace ℝ D\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nB : E →L[ℝ] F →L[ℝ] G\ng : D → F\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nf : 𝓢(D, E)\nx : D\nhxk : 0 ≤ ‖x‖ ^ k\nhnorm_mul :\n  ‖iteratedFDeriv ℝ n (fun y => ↑(↑B (toFun f y)) (g y)) x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1), ↑(Nat.choose n i) * ‖iteratedFDeriv ℝ i f.toFun x‖ * ‖iteratedFDeriv ℝ (n - i) g x‖\nthis : ∑ _x in Finset.range (n + 1), 1 = ↑n + 1\ni : ℕ\nhgrowth : ‖iteratedFDeriv ℝ (n - i) g x‖ ≤ C * (1 + ‖x‖) ^ l\nhi : i ≤ (l + k, n).snd\n⊢ ‖x‖ ^ k ≤ (1 + ‖x‖) ^ k\n[PROOFSTEP]\nrefine' pow_le_pow_of_le_left (norm_nonneg _) _ _\n[GOAL]\ncase right.refine'_2\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\ninst✝³ : NormedAddCommGroup D\ninst✝² : NormedSpace ℝ D\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nB : E →L[ℝ] F →L[ℝ] G\ng : D → F\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nf : 𝓢(D, E)\nx : D\nhxk : 0 ≤ ‖x‖ ^ k\nhnorm_mul :\n  ‖iteratedFDeriv ℝ n (fun y => ↑(↑B (toFun f y)) (g y)) x‖ ≤\n    ‖B‖ *\n      ∑ i in Finset.range (n + 1), ↑(Nat.choose n i) * ‖iteratedFDeriv ℝ i f.toFun x‖ * ‖iteratedFDeriv ℝ (n - i) g x‖\nthis : ∑ _x in Finset.range (n + 1), 1 = ↑n + 1\ni : ℕ\nhgrowth : ‖iteratedFDeriv ℝ (n - i) g x‖ ≤ C * (1 + ‖x‖) ^ l\nhi : i ≤ (l + k, n).snd\n⊢ ‖x‖ ≤ 1 + ‖x‖\n[PROOFSTEP]\nsimp only [zero_le_one, le_add_iff_nonneg_left]\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedSpace ℝ E\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup D\ninst✝⁶ : NormedSpace ℝ D\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedSpace ℝ G\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : SMulCommClass ℝ 𝕜 F\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : SMulCommClass ℝ 𝕜 G\ng : D → E\nhg : Function.HasTemperateGrowth g\nhg_upper : ∃ k C, ∀ (x : D), ‖x‖ ≤ C * (1 + ‖g x‖) ^ k\nx✝² x✝¹ : 𝓢(E, F)\nx✝ : D\n⊢ (fun f x => f (g x)) (↑x✝² + ↑x✝¹) x✝ = (fun f x => f (g x)) (↑x✝²) x✝ + (fun f x => f (g x)) (↑x✝¹) x✝\n[PROOFSTEP]\nsimp only [add_left_inj, Pi.add_apply, eq_self_iff_true]\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedSpace ℝ E\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup D\ninst✝⁶ : NormedSpace ℝ D\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedSpace ℝ G\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : SMulCommClass ℝ 𝕜 F\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : SMulCommClass ℝ 𝕜 G\ng : D → E\nhg : Function.HasTemperateGrowth g\nhg_upper : ∃ k C, ∀ (x : D), ‖x‖ ≤ C * (1 + ‖g x‖) ^ k\n⊢ ∀ (n : ℕ × ℕ),\n    ∃ s C,\n      0 ≤ C ∧\n        ∀ (f : 𝓢(E, F)) (x : D),\n          ‖x‖ ^ n.fst * ‖iteratedFDeriv ℝ n.snd ((fun f x => f (g x)) ↑f) x‖ ≤\n            C * ↑(Finset.sup s (schwartzSeminormFamily 𝕜 E F)) f\n[PROOFSTEP]\nrintro ⟨k, n⟩\n[GOAL]\ncase mk\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedSpace ℝ E\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup D\ninst✝⁶ : NormedSpace ℝ D\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedSpace ℝ G\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : SMulCommClass ℝ 𝕜 F\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : SMulCommClass ℝ 𝕜 G\ng : D → E\nhg : Function.HasTemperateGrowth g\nhg_upper : ∃ k C, ∀ (x : D), ‖x‖ ≤ C * (1 + ‖g x‖) ^ k\nk n : ℕ\n⊢ ∃ s C,\n    0 ≤ C ∧\n      ∀ (f : 𝓢(E, F)) (x : D),\n        ‖x‖ ^ (k, n).fst * ‖iteratedFDeriv ℝ (k, n).snd ((fun f x => f (g x)) ↑f) x‖ ≤\n          C * ↑(Finset.sup s (schwartzSeminormFamily 𝕜 E F)) f\n[PROOFSTEP]\nrcases hg.norm_iteratedFDeriv_le_uniform_aux n with ⟨l, C, hC, hgrowth⟩\n[GOAL]\ncase mk.intro.intro.intro\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedSpace ℝ E\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup D\ninst✝⁶ : NormedSpace ℝ D\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedSpace ℝ G\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : SMulCommClass ℝ 𝕜 F\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : SMulCommClass ℝ 𝕜 G\ng : D → E\nhg : Function.HasTemperateGrowth g\nhg_upper : ∃ k C, ∀ (x : D), ‖x‖ ≤ C * (1 + ‖g x‖) ^ k\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nhgrowth : ∀ (N : ℕ), N ≤ n → ∀ (x : D), ‖iteratedFDeriv ℝ N g x‖ ≤ C * (1 + ‖x‖) ^ l\n⊢ ∃ s C,\n    0 ≤ C ∧\n      ∀ (f : 𝓢(E, F)) (x : D),\n        ‖x‖ ^ (k, n).fst * ‖iteratedFDeriv ℝ (k, n).snd ((fun f x => f (g x)) ↑f) x‖ ≤\n          C * ↑(Finset.sup s (schwartzSeminormFamily 𝕜 E F)) f\n[PROOFSTEP]\nrcases hg_upper with ⟨kg, Cg, hg_upper'⟩\n[GOAL]\ncase mk.intro.intro.intro.intro.intro\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedSpace ℝ E\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup D\ninst✝⁶ : NormedSpace ℝ D\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedSpace ℝ G\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : SMulCommClass ℝ 𝕜 F\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : SMulCommClass ℝ 𝕜 G\ng : D → E\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nhgrowth : ∀ (N : ℕ), N ≤ n → ∀ (x : D), ‖iteratedFDeriv ℝ N g x‖ ≤ C * (1 + ‖x‖) ^ l\nkg : ℕ\nCg : ℝ\nhg_upper' : ∀ (x : D), ‖x‖ ≤ Cg * (1 + ‖g x‖) ^ kg\n⊢ ∃ s C,\n    0 ≤ C ∧\n      ∀ (f : 𝓢(E, F)) (x : D),\n        ‖x‖ ^ (k, n).fst * ‖iteratedFDeriv ℝ (k, n).snd ((fun f x => f (g x)) ↑f) x‖ ≤\n          C * ↑(Finset.sup s (schwartzSeminormFamily 𝕜 E F)) f\n[PROOFSTEP]\nhave hCg : 1 ≤ 1 + Cg := by\n  refine' le_add_of_nonneg_right _\n  specialize hg_upper' 0\n  rw [norm_zero] at hg_upper' \n  refine' nonneg_of_mul_nonneg_left hg_upper' (by positivity)\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedSpace ℝ E\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup D\ninst✝⁶ : NormedSpace ℝ D\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedSpace ℝ G\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : SMulCommClass ℝ 𝕜 F\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : SMulCommClass ℝ 𝕜 G\ng : D → E\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nhgrowth : ∀ (N : ℕ), N ≤ n → ∀ (x : D), ‖iteratedFDeriv ℝ N g x‖ ≤ C * (1 + ‖x‖) ^ l\nkg : ℕ\nCg : ℝ\nhg_upper' : ∀ (x : D), ‖x‖ ≤ Cg * (1 + ‖g x‖) ^ kg\n⊢ 1 ≤ 1 + Cg\n[PROOFSTEP]\nrefine' le_add_of_nonneg_right _\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedSpace ℝ E\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup D\ninst✝⁶ : NormedSpace ℝ D\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedSpace ℝ G\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : SMulCommClass ℝ 𝕜 F\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : SMulCommClass ℝ 𝕜 G\ng : D → E\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nhgrowth : ∀ (N : ℕ), N ≤ n → ∀ (x : D), ‖iteratedFDeriv ℝ N g x‖ ≤ C * (1 + ‖x‖) ^ l\nkg : ℕ\nCg : ℝ\nhg_upper' : ∀ (x : D), ‖x‖ ≤ Cg * (1 + ‖g x‖) ^ kg\n⊢ 0 ≤ Cg\n[PROOFSTEP]\nspecialize hg_upper' 0\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedSpace ℝ E\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup D\ninst✝⁶ : NormedSpace ℝ D\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedSpace ℝ G\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : SMulCommClass ℝ 𝕜 F\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : SMulCommClass ℝ 𝕜 G\ng : D → E\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nhgrowth : ∀ (N : ℕ), N ≤ n → ∀ (x : D), ‖iteratedFDeriv ℝ N g x‖ ≤ C * (1 + ‖x‖) ^ l\nkg : ℕ\nCg : ℝ\nhg_upper' : ‖0‖ ≤ Cg * (1 + ‖g 0‖) ^ kg\n⊢ 0 ≤ Cg\n[PROOFSTEP]\nrw [norm_zero] at hg_upper' \n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedSpace ℝ E\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup D\ninst✝⁶ : NormedSpace ℝ D\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedSpace ℝ G\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : SMulCommClass ℝ 𝕜 F\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : SMulCommClass ℝ 𝕜 G\ng : D → E\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nhgrowth : ∀ (N : ℕ), N ≤ n → ∀ (x : D), ‖iteratedFDeriv ℝ N g x‖ ≤ C * (1 + ‖x‖) ^ l\nkg : ℕ\nCg : ℝ\nhg_upper' : 0 ≤ Cg * (1 + ‖g 0‖) ^ kg\n⊢ 0 ≤ Cg\n[PROOFSTEP]\nrefine' nonneg_of_mul_nonneg_left hg_upper' (by positivity)\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedSpace ℝ E\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup D\ninst✝⁶ : NormedSpace ℝ D\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedSpace ℝ G\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : SMulCommClass ℝ 𝕜 F\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : SMulCommClass ℝ 𝕜 G\ng : D → E\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nhgrowth : ∀ (N : ℕ), N ≤ n → ∀ (x : D), ‖iteratedFDeriv ℝ N g x‖ ≤ C * (1 + ‖x‖) ^ l\nkg : ℕ\nCg : ℝ\nhg_upper' : 0 ≤ Cg * (1 + ‖g 0‖) ^ kg\n⊢ 0 < (1 + ‖g 0‖) ^ kg\n[PROOFSTEP]\npositivity\n[GOAL]\ncase mk.intro.intro.intro.intro.intro\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedSpace ℝ E\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup D\ninst✝⁶ : NormedSpace ℝ D\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedSpace ℝ G\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : SMulCommClass ℝ 𝕜 F\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : SMulCommClass ℝ 𝕜 G\ng : D → E\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nhgrowth : ∀ (N : ℕ), N ≤ n → ∀ (x : D), ‖iteratedFDeriv ℝ N g x‖ ≤ C * (1 + ‖x‖) ^ l\nkg : ℕ\nCg : ℝ\nhg_upper' : ∀ (x : D), ‖x‖ ≤ Cg * (1 + ‖g x‖) ^ kg\nhCg : 1 ≤ 1 + Cg\n⊢ ∃ s C,\n    0 ≤ C ∧\n      ∀ (f : 𝓢(E, F)) (x : D),\n        ‖x‖ ^ (k, n).fst * ‖iteratedFDeriv ℝ (k, n).snd ((fun f x => f (g x)) ↑f) x‖ ≤\n          C * ↑(Finset.sup s (schwartzSeminormFamily 𝕜 E F)) f\n[PROOFSTEP]\nlet k' := kg * (k + l * n)\n[GOAL]\ncase mk.intro.intro.intro.intro.intro\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedSpace ℝ E\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup D\ninst✝⁶ : NormedSpace ℝ D\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedSpace ℝ G\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : SMulCommClass ℝ 𝕜 F\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : SMulCommClass ℝ 𝕜 G\ng : D → E\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nhgrowth : ∀ (N : ℕ), N ≤ n → ∀ (x : D), ‖iteratedFDeriv ℝ N g x‖ ≤ C * (1 + ‖x‖) ^ l\nkg : ℕ\nCg : ℝ\nhg_upper' : ∀ (x : D), ‖x‖ ≤ Cg * (1 + ‖g x‖) ^ kg\nhCg : 1 ≤ 1 + Cg\nk' : ℕ := kg * (k + l * n)\n⊢ ∃ s C,\n    0 ≤ C ∧\n      ∀ (f : 𝓢(E, F)) (x : D),\n        ‖x‖ ^ (k, n).fst * ‖iteratedFDeriv ℝ (k, n).snd ((fun f x => f (g x)) ↑f) x‖ ≤\n          C * ↑(Finset.sup s (schwartzSeminormFamily 𝕜 E F)) f\n[PROOFSTEP]\nuse Finset.Iic (k', n), (1 + Cg) ^ (k + l * n) * ((C + 1) ^ n * n ! * 2 ^ k'), by positivity\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedSpace ℝ E\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup D\ninst✝⁶ : NormedSpace ℝ D\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedSpace ℝ G\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : SMulCommClass ℝ 𝕜 F\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : SMulCommClass ℝ 𝕜 G\ng : D → E\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nhgrowth : ∀ (N : ℕ), N ≤ n → ∀ (x : D), ‖iteratedFDeriv ℝ N g x‖ ≤ C * (1 + ‖x‖) ^ l\nkg : ℕ\nCg : ℝ\nhg_upper' : ∀ (x : D), ‖x‖ ≤ Cg * (1 + ‖g x‖) ^ kg\nhCg : 1 ≤ 1 + Cg\nk' : ℕ := kg * (k + l * n)\n⊢ 0 ≤ (1 + Cg) ^ (k + l * n) * ((C + 1) ^ n * ↑n ! * ↑(2 ^ k'))\n[PROOFSTEP]\npositivity\n[GOAL]\ncase right\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedSpace ℝ E\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup D\ninst✝⁶ : NormedSpace ℝ D\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedSpace ℝ G\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : SMulCommClass ℝ 𝕜 F\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : SMulCommClass ℝ 𝕜 G\ng : D → E\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nhgrowth : ∀ (N : ℕ), N ≤ n → ∀ (x : D), ‖iteratedFDeriv ℝ N g x‖ ≤ C * (1 + ‖x‖) ^ l\nkg : ℕ\nCg : ℝ\nhg_upper' : ∀ (x : D), ‖x‖ ≤ Cg * (1 + ‖g x‖) ^ kg\nhCg : 1 ≤ 1 + Cg\nk' : ℕ := kg * (k + l * n)\n⊢ ∀ (f : 𝓢(E, F)) (x : D),\n    ‖x‖ ^ (k, n).fst * ‖iteratedFDeriv ℝ (k, n).snd ((fun f x => f (g x)) ↑f) x‖ ≤\n      (1 + Cg) ^ (k + l * n) * ((C + 1) ^ n * ↑n ! * ↑(2 ^ k')) *\n        ↑(Finset.sup (Finset.Iic (k', n)) (schwartzSeminormFamily 𝕜 E F)) f\n[PROOFSTEP]\nintro f x\n[GOAL]\ncase right\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedSpace ℝ E\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup D\ninst✝⁶ : NormedSpace ℝ D\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedSpace ℝ G\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : SMulCommClass ℝ 𝕜 F\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : SMulCommClass ℝ 𝕜 G\ng : D → E\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nhgrowth : ∀ (N : ℕ), N ≤ n → ∀ (x : D), ‖iteratedFDeriv ℝ N g x‖ ≤ C * (1 + ‖x‖) ^ l\nkg : ℕ\nCg : ℝ\nhg_upper' : ∀ (x : D), ‖x‖ ≤ Cg * (1 + ‖g x‖) ^ kg\nhCg : 1 ≤ 1 + Cg\nk' : ℕ := kg * (k + l * n)\nf : 𝓢(E, F)\nx : D\n⊢ ‖x‖ ^ (k, n).fst * ‖iteratedFDeriv ℝ (k, n).snd ((fun f x => f (g x)) ↑f) x‖ ≤\n    (1 + Cg) ^ (k + l * n) * ((C + 1) ^ n * ↑n ! * ↑(2 ^ k')) *\n      ↑(Finset.sup (Finset.Iic (k', n)) (schwartzSeminormFamily 𝕜 E F)) f\n[PROOFSTEP]\nlet seminorm_f := ((Finset.Iic (k', n)).sup (schwartzSeminormFamily 𝕜 _ _)) f\n[GOAL]\ncase right\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedSpace ℝ E\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup D\ninst✝⁶ : NormedSpace ℝ D\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedSpace ℝ G\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : SMulCommClass ℝ 𝕜 F\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : SMulCommClass ℝ 𝕜 G\ng : D → E\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nhgrowth : ∀ (N : ℕ), N ≤ n → ∀ (x : D), ‖iteratedFDeriv ℝ N g x‖ ≤ C * (1 + ‖x‖) ^ l\nkg : ℕ\nCg : ℝ\nhg_upper' : ∀ (x : D), ‖x‖ ≤ Cg * (1 + ‖g x‖) ^ kg\nhCg : 1 ≤ 1 + Cg\nk' : ℕ := kg * (k + l * n)\nf : 𝓢(E, F)\nx : D\nseminorm_f : (fun a => ℝ) f := ↑(Finset.sup (Finset.Iic (k', n)) (schwartzSeminormFamily 𝕜 E F)) f\n⊢ ‖x‖ ^ (k, n).fst * ‖iteratedFDeriv ℝ (k, n).snd ((fun f x => f (g x)) ↑f) x‖ ≤\n    (1 + Cg) ^ (k + l * n) * ((C + 1) ^ n * ↑n ! * ↑(2 ^ k')) *\n      ↑(Finset.sup (Finset.Iic (k', n)) (schwartzSeminormFamily 𝕜 E F)) f\n[PROOFSTEP]\nhave hg_upper'' : (1 + ‖x‖) ^ (k + l * n) ≤ (1 + Cg) ^ (k + l * n) * (1 + ‖g x‖) ^ k' :=\n  by\n  rw [pow_mul, ← mul_pow]\n  refine' pow_le_pow_of_le_left (by positivity) _ _\n  rw [add_mul]\n  refine' add_le_add _ (hg_upper' x)\n  nth_rw 1 [← one_mul (1 : ℝ)]\n  refine' mul_le_mul (le_refl _) (one_le_pow_of_one_le _ _) zero_le_one zero_le_one\n  simp only [le_add_iff_nonneg_right, norm_nonneg]\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedSpace ℝ E\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup D\ninst✝⁶ : NormedSpace ℝ D\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedSpace ℝ G\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : SMulCommClass ℝ 𝕜 F\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : SMulCommClass ℝ 𝕜 G\ng : D → E\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nhgrowth : ∀ (N : ℕ), N ≤ n → ∀ (x : D), ‖iteratedFDeriv ℝ N g x‖ ≤ C * (1 + ‖x‖) ^ l\nkg : ℕ\nCg : ℝ\nhg_upper' : ∀ (x : D), ‖x‖ ≤ Cg * (1 + ‖g x‖) ^ kg\nhCg : 1 ≤ 1 + Cg\nk' : ℕ := kg * (k + l * n)\nf : 𝓢(E, F)\nx : D\nseminorm_f : (fun a => ℝ) f := ↑(Finset.sup (Finset.Iic (k', n)) (schwartzSeminormFamily 𝕜 E F)) f\n⊢ (1 + ‖x‖) ^ (k + l * n) ≤ (1 + Cg) ^ (k + l * n) * (1 + ‖g x‖) ^ k'\n[PROOFSTEP]\nrw [pow_mul, ← mul_pow]\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedSpace ℝ E\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup D\ninst✝⁶ : NormedSpace ℝ D\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedSpace ℝ G\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : SMulCommClass ℝ 𝕜 F\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : SMulCommClass ℝ 𝕜 G\ng : D → E\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nhgrowth : ∀ (N : ℕ), N ≤ n → ∀ (x : D), ‖iteratedFDeriv ℝ N g x‖ ≤ C * (1 + ‖x‖) ^ l\nkg : ℕ\nCg : ℝ\nhg_upper' : ∀ (x : D), ‖x‖ ≤ Cg * (1 + ‖g x‖) ^ kg\nhCg : 1 ≤ 1 + Cg\nk' : ℕ := kg * (k + l * n)\nf : 𝓢(E, F)\nx : D\nseminorm_f : (fun a => ℝ) f := ↑(Finset.sup (Finset.Iic (k', n)) (schwartzSeminormFamily 𝕜 E F)) f\n⊢ (1 + ‖x‖) ^ (k + l * n) ≤ ((1 + Cg) * (1 + ‖g x‖) ^ kg) ^ (k + l * n)\n[PROOFSTEP]\nrefine' pow_le_pow_of_le_left (by positivity) _ _\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedSpace ℝ E\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup D\ninst✝⁶ : NormedSpace ℝ D\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedSpace ℝ G\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : SMulCommClass ℝ 𝕜 F\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : SMulCommClass ℝ 𝕜 G\ng : D → E\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nhgrowth : ∀ (N : ℕ), N ≤ n → ∀ (x : D), ‖iteratedFDeriv ℝ N g x‖ ≤ C * (1 + ‖x‖) ^ l\nkg : ℕ\nCg : ℝ\nhg_upper' : ∀ (x : D), ‖x‖ ≤ Cg * (1 + ‖g x‖) ^ kg\nhCg : 1 ≤ 1 + Cg\nk' : ℕ := kg * (k + l * n)\nf : 𝓢(E, F)\nx : D\nseminorm_f : (fun a => ℝ) f := ↑(Finset.sup (Finset.Iic (k', n)) (schwartzSeminormFamily 𝕜 E F)) f\n⊢ 0 ≤ 1 + ‖x‖\n[PROOFSTEP]\npositivity\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedSpace ℝ E\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup D\ninst✝⁶ : NormedSpace ℝ D\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedSpace ℝ G\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : SMulCommClass ℝ 𝕜 F\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : SMulCommClass ℝ 𝕜 G\ng : D → E\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nhgrowth : ∀ (N : ℕ), N ≤ n → ∀ (x : D), ‖iteratedFDeriv ℝ N g x‖ ≤ C * (1 + ‖x‖) ^ l\nkg : ℕ\nCg : ℝ\nhg_upper' : ∀ (x : D), ‖x‖ ≤ Cg * (1 + ‖g x‖) ^ kg\nhCg : 1 ≤ 1 + Cg\nk' : ℕ := kg * (k + l * n)\nf : 𝓢(E, F)\nx : D\nseminorm_f : (fun a => ℝ) f := ↑(Finset.sup (Finset.Iic (k', n)) (schwartzSeminormFamily 𝕜 E F)) f\n⊢ 1 + ‖x‖ ≤ (1 + Cg) * (1 + ‖g x‖) ^ kg\n[PROOFSTEP]\nrw [add_mul]\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedSpace ℝ E\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup D\ninst✝⁶ : NormedSpace ℝ D\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedSpace ℝ G\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : SMulCommClass ℝ 𝕜 F\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : SMulCommClass ℝ 𝕜 G\ng : D → E\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nhgrowth : ∀ (N : ℕ), N ≤ n → ∀ (x : D), ‖iteratedFDeriv ℝ N g x‖ ≤ C * (1 + ‖x‖) ^ l\nkg : ℕ\nCg : ℝ\nhg_upper' : ∀ (x : D), ‖x‖ ≤ Cg * (1 + ‖g x‖) ^ kg\nhCg : 1 ≤ 1 + Cg\nk' : ℕ := kg * (k + l * n)\nf : 𝓢(E, F)\nx : D\nseminorm_f : (fun a => ℝ) f := ↑(Finset.sup (Finset.Iic (k', n)) (schwartzSeminormFamily 𝕜 E F)) f\n⊢ 1 + ‖x‖ ≤ 1 * (1 + ‖g x‖) ^ kg + Cg * (1 + ‖g x‖) ^ kg\n[PROOFSTEP]\nrefine' add_le_add _ (hg_upper' x)\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedSpace ℝ E\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup D\ninst✝⁶ : NormedSpace ℝ D\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedSpace ℝ G\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : SMulCommClass ℝ 𝕜 F\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : SMulCommClass ℝ 𝕜 G\ng : D → E\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nhgrowth : ∀ (N : ℕ), N ≤ n → ∀ (x : D), ‖iteratedFDeriv ℝ N g x‖ ≤ C * (1 + ‖x‖) ^ l\nkg : ℕ\nCg : ℝ\nhg_upper' : ∀ (x : D), ‖x‖ ≤ Cg * (1 + ‖g x‖) ^ kg\nhCg : 1 ≤ 1 + Cg\nk' : ℕ := kg * (k + l * n)\nf : 𝓢(E, F)\nx : D\nseminorm_f : (fun a => ℝ) f := ↑(Finset.sup (Finset.Iic (k', n)) (schwartzSeminormFamily 𝕜 E F)) f\n⊢ 1 ≤ 1 * (1 + ‖g x‖) ^ kg\n[PROOFSTEP]\nnth_rw 1 [← one_mul (1 : ℝ)]\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedSpace ℝ E\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup D\ninst✝⁶ : NormedSpace ℝ D\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedSpace ℝ G\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : SMulCommClass ℝ 𝕜 F\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : SMulCommClass ℝ 𝕜 G\ng : D → E\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nhgrowth : ∀ (N : ℕ), N ≤ n → ∀ (x : D), ‖iteratedFDeriv ℝ N g x‖ ≤ C * (1 + ‖x‖) ^ l\nkg : ℕ\nCg : ℝ\nhg_upper' : ∀ (x : D), ‖x‖ ≤ Cg * (1 + ‖g x‖) ^ kg\nhCg : 1 ≤ 1 + Cg\nk' : ℕ := kg * (k + l * n)\nf : 𝓢(E, F)\nx : D\nseminorm_f : (fun a => ℝ) f := ↑(Finset.sup (Finset.Iic (k', n)) (schwartzSeminormFamily 𝕜 E F)) f\n⊢ 1 * 1 ≤ 1 * (1 + ‖g x‖) ^ kg\n[PROOFSTEP]\nrefine' mul_le_mul (le_refl _) (one_le_pow_of_one_le _ _) zero_le_one zero_le_one\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedSpace ℝ E\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup D\ninst✝⁶ : NormedSpace ℝ D\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedSpace ℝ G\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : SMulCommClass ℝ 𝕜 F\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : SMulCommClass ℝ 𝕜 G\ng : D → E\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nhgrowth : ∀ (N : ℕ), N ≤ n → ∀ (x : D), ‖iteratedFDeriv ℝ N g x‖ ≤ C * (1 + ‖x‖) ^ l\nkg : ℕ\nCg : ℝ\nhg_upper' : ∀ (x : D), ‖x‖ ≤ Cg * (1 + ‖g x‖) ^ kg\nhCg : 1 ≤ 1 + Cg\nk' : ℕ := kg * (k + l * n)\nf : 𝓢(E, F)\nx : D\nseminorm_f : (fun a => ℝ) f := ↑(Finset.sup (Finset.Iic (k', n)) (schwartzSeminormFamily 𝕜 E F)) f\n⊢ 1 ≤ 1 + ‖g x‖\n[PROOFSTEP]\nsimp only [le_add_iff_nonneg_right, norm_nonneg]\n[GOAL]\ncase right\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedSpace ℝ E\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup D\ninst✝⁶ : NormedSpace ℝ D\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedSpace ℝ G\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : SMulCommClass ℝ 𝕜 F\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : SMulCommClass ℝ 𝕜 G\ng : D → E\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nhgrowth : ∀ (N : ℕ), N ≤ n → ∀ (x : D), ‖iteratedFDeriv ℝ N g x‖ ≤ C * (1 + ‖x‖) ^ l\nkg : ℕ\nCg : ℝ\nhg_upper' : ∀ (x : D), ‖x‖ ≤ Cg * (1 + ‖g x‖) ^ kg\nhCg : 1 ≤ 1 + Cg\nk' : ℕ := kg * (k + l * n)\nf : 𝓢(E, F)\nx : D\nseminorm_f : (fun a => ℝ) f := ↑(Finset.sup (Finset.Iic (k', n)) (schwartzSeminormFamily 𝕜 E F)) f\nhg_upper'' : (1 + ‖x‖) ^ (k + l * n) ≤ (1 + Cg) ^ (k + l * n) * (1 + ‖g x‖) ^ k'\n⊢ ‖x‖ ^ (k, n).fst * ‖iteratedFDeriv ℝ (k, n).snd ((fun f x => f (g x)) ↑f) x‖ ≤\n    (1 + Cg) ^ (k + l * n) * ((C + 1) ^ n * ↑n ! * ↑(2 ^ k')) *\n      ↑(Finset.sup (Finset.Iic (k', n)) (schwartzSeminormFamily 𝕜 E F)) f\n[PROOFSTEP]\nhave hbound : ∀ i, i ≤ n → ‖iteratedFDeriv ℝ i f (g x)‖ ≤ 2 ^ k' * seminorm_f / (1 + ‖g x‖) ^ k' :=\n  by\n  intro i hi\n  have hpos : 0 < (1 + ‖g x‖) ^ k' := by positivity\n  rw [le_div_iff' hpos]\n  change i ≤ (k', n).snd at hi \n  exact one_add_le_sup_seminorm_apply le_rfl hi _ _\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedSpace ℝ E\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup D\ninst✝⁶ : NormedSpace ℝ D\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedSpace ℝ G\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : SMulCommClass ℝ 𝕜 F\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : SMulCommClass ℝ 𝕜 G\ng : D → E\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nhgrowth : ∀ (N : ℕ), N ≤ n → ∀ (x : D), ‖iteratedFDeriv ℝ N g x‖ ≤ C * (1 + ‖x‖) ^ l\nkg : ℕ\nCg : ℝ\nhg_upper' : ∀ (x : D), ‖x‖ ≤ Cg * (1 + ‖g x‖) ^ kg\nhCg : 1 ≤ 1 + Cg\nk' : ℕ := kg * (k + l * n)\nf : 𝓢(E, F)\nx : D\nseminorm_f : (fun a => ℝ) f := ↑(Finset.sup (Finset.Iic (k', n)) (schwartzSeminormFamily 𝕜 E F)) f\nhg_upper'' : (1 + ‖x‖) ^ (k + l * n) ≤ (1 + Cg) ^ (k + l * n) * (1 + ‖g x‖) ^ k'\n⊢ ∀ (i : ℕ), i ≤ n → ‖iteratedFDeriv ℝ i (↑f) (g x)‖ ≤ ↑(2 ^ k') * seminorm_f / (1 + ‖g x‖) ^ k'\n[PROOFSTEP]\nintro i hi\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedSpace ℝ E\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup D\ninst✝⁶ : NormedSpace ℝ D\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedSpace ℝ G\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : SMulCommClass ℝ 𝕜 F\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : SMulCommClass ℝ 𝕜 G\ng : D → E\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nhgrowth : ∀ (N : ℕ), N ≤ n → ∀ (x : D), ‖iteratedFDeriv ℝ N g x‖ ≤ C * (1 + ‖x‖) ^ l\nkg : ℕ\nCg : ℝ\nhg_upper' : ∀ (x : D), ‖x‖ ≤ Cg * (1 + ‖g x‖) ^ kg\nhCg : 1 ≤ 1 + Cg\nk' : ℕ := kg * (k + l * n)\nf : 𝓢(E, F)\nx : D\nseminorm_f : (fun a => ℝ) f := ↑(Finset.sup (Finset.Iic (k', n)) (schwartzSeminormFamily 𝕜 E F)) f\nhg_upper'' : (1 + ‖x‖) ^ (k + l * n) ≤ (1 + Cg) ^ (k + l * n) * (1 + ‖g x‖) ^ k'\ni : ℕ\nhi : i ≤ n\n⊢ ‖iteratedFDeriv ℝ i (↑f) (g x)‖ ≤ ↑(2 ^ k') * seminorm_f / (1 + ‖g x‖) ^ k'\n[PROOFSTEP]\nhave hpos : 0 < (1 + ‖g x‖) ^ k' := by positivity\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedSpace ℝ E\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup D\ninst✝⁶ : NormedSpace ℝ D\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedSpace ℝ G\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : SMulCommClass ℝ 𝕜 F\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : SMulCommClass ℝ 𝕜 G\ng : D → E\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nhgrowth : ∀ (N : ℕ), N ≤ n → ∀ (x : D), ‖iteratedFDeriv ℝ N g x‖ ≤ C * (1 + ‖x‖) ^ l\nkg : ℕ\nCg : ℝ\nhg_upper' : ∀ (x : D), ‖x‖ ≤ Cg * (1 + ‖g x‖) ^ kg\nhCg : 1 ≤ 1 + Cg\nk' : ℕ := kg * (k + l * n)\nf : 𝓢(E, F)\nx : D\nseminorm_f : (fun a => ℝ) f := ↑(Finset.sup (Finset.Iic (k', n)) (schwartzSeminormFamily 𝕜 E F)) f\nhg_upper'' : (1 + ‖x‖) ^ (k + l * n) ≤ (1 + Cg) ^ (k + l * n) * (1 + ‖g x‖) ^ k'\ni : ℕ\nhi : i ≤ n\n⊢ 0 < (1 + ‖g x‖) ^ k'\n[PROOFSTEP]\npositivity\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedSpace ℝ E\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup D\ninst✝⁶ : NormedSpace ℝ D\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedSpace ℝ G\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : SMulCommClass ℝ 𝕜 F\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : SMulCommClass ℝ 𝕜 G\ng : D → E\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nhgrowth : ∀ (N : ℕ), N ≤ n → ∀ (x : D), ‖iteratedFDeriv ℝ N g x‖ ≤ C * (1 + ‖x‖) ^ l\nkg : ℕ\nCg : ℝ\nhg_upper' : ∀ (x : D), ‖x‖ ≤ Cg * (1 + ‖g x‖) ^ kg\nhCg : 1 ≤ 1 + Cg\nk' : ℕ := kg * (k + l * n)\nf : 𝓢(E, F)\nx : D\nseminorm_f : (fun a => ℝ) f := ↑(Finset.sup (Finset.Iic (k', n)) (schwartzSeminormFamily 𝕜 E F)) f\nhg_upper'' : (1 + ‖x‖) ^ (k + l * n) ≤ (1 + Cg) ^ (k + l * n) * (1 + ‖g x‖) ^ k'\ni : ℕ\nhi : i ≤ n\nhpos : 0 < (1 + ‖g x‖) ^ k'\n⊢ ‖iteratedFDeriv ℝ i (↑f) (g x)‖ ≤ ↑(2 ^ k') * seminorm_f / (1 + ‖g x‖) ^ k'\n[PROOFSTEP]\nrw [le_div_iff' hpos]\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedSpace ℝ E\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup D\ninst✝⁶ : NormedSpace ℝ D\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedSpace ℝ G\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : SMulCommClass ℝ 𝕜 F\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : SMulCommClass ℝ 𝕜 G\ng : D → E\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nhgrowth : ∀ (N : ℕ), N ≤ n → ∀ (x : D), ‖iteratedFDeriv ℝ N g x‖ ≤ C * (1 + ‖x‖) ^ l\nkg : ℕ\nCg : ℝ\nhg_upper' : ∀ (x : D), ‖x‖ ≤ Cg * (1 + ‖g x‖) ^ kg\nhCg : 1 ≤ 1 + Cg\nk' : ℕ := kg * (k + l * n)\nf : 𝓢(E, F)\nx : D\nseminorm_f : (fun a => ℝ) f := ↑(Finset.sup (Finset.Iic (k', n)) (schwartzSeminormFamily 𝕜 E F)) f\nhg_upper'' : (1 + ‖x‖) ^ (k + l * n) ≤ (1 + Cg) ^ (k + l * n) * (1 + ‖g x‖) ^ k'\ni : ℕ\nhi : i ≤ n\nhpos : 0 < (1 + ‖g x‖) ^ k'\n⊢ (1 + ‖g x‖) ^ k' * ‖iteratedFDeriv ℝ i (↑f) (g x)‖ ≤ ↑(2 ^ k') * seminorm_f\n[PROOFSTEP]\nchange i ≤ (k', n).snd at hi \n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedSpace ℝ E\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup D\ninst✝⁶ : NormedSpace ℝ D\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedSpace ℝ G\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : SMulCommClass ℝ 𝕜 F\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : SMulCommClass ℝ 𝕜 G\ng : D → E\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nhgrowth : ∀ (N : ℕ), N ≤ n → ∀ (x : D), ‖iteratedFDeriv ℝ N g x‖ ≤ C * (1 + ‖x‖) ^ l\nkg : ℕ\nCg : ℝ\nhg_upper' : ∀ (x : D), ‖x‖ ≤ Cg * (1 + ‖g x‖) ^ kg\nhCg : 1 ≤ 1 + Cg\nk' : ℕ := kg * (k + l * n)\nf : 𝓢(E, F)\nx : D\nseminorm_f : (fun a => ℝ) f := ↑(Finset.sup (Finset.Iic (k', n)) (schwartzSeminormFamily 𝕜 E F)) f\nhg_upper'' : (1 + ‖x‖) ^ (k + l * n) ≤ (1 + Cg) ^ (k + l * n) * (1 + ‖g x‖) ^ k'\ni : ℕ\nhpos : 0 < (1 + ‖g x‖) ^ k'\nhi : i ≤ (k', n).snd\n⊢ (1 + ‖g x‖) ^ k' * ‖iteratedFDeriv ℝ i (↑f) (g x)‖ ≤ ↑(2 ^ k') * seminorm_f\n[PROOFSTEP]\nexact one_add_le_sup_seminorm_apply le_rfl hi _ _\n[GOAL]\ncase right\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedSpace ℝ E\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup D\ninst✝⁶ : NormedSpace ℝ D\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedSpace ℝ G\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : SMulCommClass ℝ 𝕜 F\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : SMulCommClass ℝ 𝕜 G\ng : D → E\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nhgrowth : ∀ (N : ℕ), N ≤ n → ∀ (x : D), ‖iteratedFDeriv ℝ N g x‖ ≤ C * (1 + ‖x‖) ^ l\nkg : ℕ\nCg : ℝ\nhg_upper' : ∀ (x : D), ‖x‖ ≤ Cg * (1 + ‖g x‖) ^ kg\nhCg : 1 ≤ 1 + Cg\nk' : ℕ := kg * (k + l * n)\nf : 𝓢(E, F)\nx : D\nseminorm_f : (fun a => ℝ) f := ↑(Finset.sup (Finset.Iic (k', n)) (schwartzSeminormFamily 𝕜 E F)) f\nhg_upper'' : (1 + ‖x‖) ^ (k + l * n) ≤ (1 + Cg) ^ (k + l * n) * (1 + ‖g x‖) ^ k'\nhbound : ∀ (i : ℕ), i ≤ n → ‖iteratedFDeriv ℝ i (↑f) (g x)‖ ≤ ↑(2 ^ k') * seminorm_f / (1 + ‖g x‖) ^ k'\n⊢ ‖x‖ ^ (k, n).fst * ‖iteratedFDeriv ℝ (k, n).snd ((fun f x => f (g x)) ↑f) x‖ ≤\n    (1 + Cg) ^ (k + l * n) * ((C + 1) ^ n * ↑n ! * ↑(2 ^ k')) *\n      ↑(Finset.sup (Finset.Iic (k', n)) (schwartzSeminormFamily 𝕜 E F)) f\n[PROOFSTEP]\nhave hgrowth' : ∀ N : ℕ, 1 ≤ N → N ≤ n → ‖iteratedFDeriv ℝ N g x‖ ≤ ((C + 1) * (1 + ‖x‖) ^ l) ^ N :=\n  by\n  intro N hN₁ hN₂\n  refine' (hgrowth N hN₂ x).trans _\n  rw [mul_pow]\n  have hN₁' := (lt_of_lt_of_le zero_lt_one hN₁).ne'\n  refine' mul_le_mul _ _ (by positivity) (by positivity)\n  · exact le_trans (by simp [hC]) (le_self_pow (by simp [hC]) hN₁')\n  · refine' le_self_pow (one_le_pow_of_one_le _ l) hN₁'\n    simp only [le_add_iff_nonneg_right, norm_nonneg]\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedSpace ℝ E\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup D\ninst✝⁶ : NormedSpace ℝ D\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedSpace ℝ G\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : SMulCommClass ℝ 𝕜 F\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : SMulCommClass ℝ 𝕜 G\ng : D → E\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nhgrowth : ∀ (N : ℕ), N ≤ n → ∀ (x : D), ‖iteratedFDeriv ℝ N g x‖ ≤ C * (1 + ‖x‖) ^ l\nkg : ℕ\nCg : ℝ\nhg_upper' : ∀ (x : D), ‖x‖ ≤ Cg * (1 + ‖g x‖) ^ kg\nhCg : 1 ≤ 1 + Cg\nk' : ℕ := kg * (k + l * n)\nf : 𝓢(E, F)\nx : D\nseminorm_f : (fun a => ℝ) f := ↑(Finset.sup (Finset.Iic (k', n)) (schwartzSeminormFamily 𝕜 E F)) f\nhg_upper'' : (1 + ‖x‖) ^ (k + l * n) ≤ (1 + Cg) ^ (k + l * n) * (1 + ‖g x‖) ^ k'\nhbound : ∀ (i : ℕ), i ≤ n → ‖iteratedFDeriv ℝ i (↑f) (g x)‖ ≤ ↑(2 ^ k') * seminorm_f / (1 + ‖g x‖) ^ k'\n⊢ ∀ (N : ℕ), 1 ≤ N → N ≤ n → ‖iteratedFDeriv ℝ N g x‖ ≤ ((C + 1) * (1 + ‖x‖) ^ l) ^ N\n[PROOFSTEP]\nintro N hN₁ hN₂\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedSpace ℝ E\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup D\ninst✝⁶ : NormedSpace ℝ D\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedSpace ℝ G\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : SMulCommClass ℝ 𝕜 F\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : SMulCommClass ℝ 𝕜 G\ng : D → E\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nhgrowth : ∀ (N : ℕ), N ≤ n → ∀ (x : D), ‖iteratedFDeriv ℝ N g x‖ ≤ C * (1 + ‖x‖) ^ l\nkg : ℕ\nCg : ℝ\nhg_upper' : ∀ (x : D), ‖x‖ ≤ Cg * (1 + ‖g x‖) ^ kg\nhCg : 1 ≤ 1 + Cg\nk' : ℕ := kg * (k + l * n)\nf : 𝓢(E, F)\nx : D\nseminorm_f : (fun a => ℝ) f := ↑(Finset.sup (Finset.Iic (k', n)) (schwartzSeminormFamily 𝕜 E F)) f\nhg_upper'' : (1 + ‖x‖) ^ (k + l * n) ≤ (1 + Cg) ^ (k + l * n) * (1 + ‖g x‖) ^ k'\nhbound : ∀ (i : ℕ), i ≤ n → ‖iteratedFDeriv ℝ i (↑f) (g x)‖ ≤ ↑(2 ^ k') * seminorm_f / (1 + ‖g x‖) ^ k'\nN : ℕ\nhN₁ : 1 ≤ N\nhN₂ : N ≤ n\n⊢ ‖iteratedFDeriv ℝ N g x‖ ≤ ((C + 1) * (1 + ‖x‖) ^ l) ^ N\n[PROOFSTEP]\nrefine' (hgrowth N hN₂ x).trans _\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedSpace ℝ E\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup D\ninst✝⁶ : NormedSpace ℝ D\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedSpace ℝ G\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : SMulCommClass ℝ 𝕜 F\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : SMulCommClass ℝ 𝕜 G\ng : D → E\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nhgrowth : ∀ (N : ℕ), N ≤ n → ∀ (x : D), ‖iteratedFDeriv ℝ N g x‖ ≤ C * (1 + ‖x‖) ^ l\nkg : ℕ\nCg : ℝ\nhg_upper' : ∀ (x : D), ‖x‖ ≤ Cg * (1 + ‖g x‖) ^ kg\nhCg : 1 ≤ 1 + Cg\nk' : ℕ := kg * (k + l * n)\nf : 𝓢(E, F)\nx : D\nseminorm_f : (fun a => ℝ) f := ↑(Finset.sup (Finset.Iic (k', n)) (schwartzSeminormFamily 𝕜 E F)) f\nhg_upper'' : (1 + ‖x‖) ^ (k + l * n) ≤ (1 + Cg) ^ (k + l * n) * (1 + ‖g x‖) ^ k'\nhbound : ∀ (i : ℕ), i ≤ n → ‖iteratedFDeriv ℝ i (↑f) (g x)‖ ≤ ↑(2 ^ k') * seminorm_f / (1 + ‖g x‖) ^ k'\nN : ℕ\nhN₁ : 1 ≤ N\nhN₂ : N ≤ n\n⊢ C * (1 + ‖x‖) ^ l ≤ ((C + 1) * (1 + ‖x‖) ^ l) ^ N\n[PROOFSTEP]\nrw [mul_pow]\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedSpace ℝ E\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup D\ninst✝⁶ : NormedSpace ℝ D\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedSpace ℝ G\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : SMulCommClass ℝ 𝕜 F\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : SMulCommClass ℝ 𝕜 G\ng : D → E\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nhgrowth : ∀ (N : ℕ), N ≤ n → ∀ (x : D), ‖iteratedFDeriv ℝ N g x‖ ≤ C * (1 + ‖x‖) ^ l\nkg : ℕ\nCg : ℝ\nhg_upper' : ∀ (x : D), ‖x‖ ≤ Cg * (1 + ‖g x‖) ^ kg\nhCg : 1 ≤ 1 + Cg\nk' : ℕ := kg * (k + l * n)\nf : 𝓢(E, F)\nx : D\nseminorm_f : (fun a => ℝ) f := ↑(Finset.sup (Finset.Iic (k', n)) (schwartzSeminormFamily 𝕜 E F)) f\nhg_upper'' : (1 + ‖x‖) ^ (k + l * n) ≤ (1 + Cg) ^ (k + l * n) * (1 + ‖g x‖) ^ k'\nhbound : ∀ (i : ℕ), i ≤ n → ‖iteratedFDeriv ℝ i (↑f) (g x)‖ ≤ ↑(2 ^ k') * seminorm_f / (1 + ‖g x‖) ^ k'\nN : ℕ\nhN₁ : 1 ≤ N\nhN₂ : N ≤ n\n⊢ C * (1 + ‖x‖) ^ l ≤ (C + 1) ^ N * ((1 + ‖x‖) ^ l) ^ N\n[PROOFSTEP]\nhave hN₁' := (lt_of_lt_of_le zero_lt_one hN₁).ne'\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedSpace ℝ E\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup D\ninst✝⁶ : NormedSpace ℝ D\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedSpace ℝ G\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : SMulCommClass ℝ 𝕜 F\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : SMulCommClass ℝ 𝕜 G\ng : D → E\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nhgrowth : ∀ (N : ℕ), N ≤ n → ∀ (x : D), ‖iteratedFDeriv ℝ N g x‖ ≤ C * (1 + ‖x‖) ^ l\nkg : ℕ\nCg : ℝ\nhg_upper' : ∀ (x : D), ‖x‖ ≤ Cg * (1 + ‖g x‖) ^ kg\nhCg : 1 ≤ 1 + Cg\nk' : ℕ := kg * (k + l * n)\nf : 𝓢(E, F)\nx : D\nseminorm_f : (fun a => ℝ) f := ↑(Finset.sup (Finset.Iic (k', n)) (schwartzSeminormFamily 𝕜 E F)) f\nhg_upper'' : (1 + ‖x‖) ^ (k + l * n) ≤ (1 + Cg) ^ (k + l * n) * (1 + ‖g x‖) ^ k'\nhbound : ∀ (i : ℕ), i ≤ n → ‖iteratedFDeriv ℝ i (↑f) (g x)‖ ≤ ↑(2 ^ k') * seminorm_f / (1 + ‖g x‖) ^ k'\nN : ℕ\nhN₁ : 1 ≤ N\nhN₂ : N ≤ n\nhN₁' : N ≠ 0\n⊢ C * (1 + ‖x‖) ^ l ≤ (C + 1) ^ N * ((1 + ‖x‖) ^ l) ^ N\n[PROOFSTEP]\nrefine' mul_le_mul _ _ (by positivity) (by positivity)\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedSpace ℝ E\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup D\ninst✝⁶ : NormedSpace ℝ D\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedSpace ℝ G\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : SMulCommClass ℝ 𝕜 F\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : SMulCommClass ℝ 𝕜 G\ng : D → E\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nhgrowth : ∀ (N : ℕ), N ≤ n → ∀ (x : D), ‖iteratedFDeriv ℝ N g x‖ ≤ C * (1 + ‖x‖) ^ l\nkg : ℕ\nCg : ℝ\nhg_upper' : ∀ (x : D), ‖x‖ ≤ Cg * (1 + ‖g x‖) ^ kg\nhCg : 1 ≤ 1 + Cg\nk' : ℕ := kg * (k + l * n)\nf : 𝓢(E, F)\nx : D\nseminorm_f : (fun a => ℝ) f := ↑(Finset.sup (Finset.Iic (k', n)) (schwartzSeminormFamily 𝕜 E F)) f\nhg_upper'' : (1 + ‖x‖) ^ (k + l * n) ≤ (1 + Cg) ^ (k + l * n) * (1 + ‖g x‖) ^ k'\nhbound : ∀ (i : ℕ), i ≤ n → ‖iteratedFDeriv ℝ i (↑f) (g x)‖ ≤ ↑(2 ^ k') * seminorm_f / (1 + ‖g x‖) ^ k'\nN : ℕ\nhN₁ : 1 ≤ N\nhN₂ : N ≤ n\nhN₁' : N ≠ 0\n⊢ 0 ≤ (1 + ‖x‖) ^ l\n[PROOFSTEP]\npositivity\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedSpace ℝ E\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup D\ninst✝⁶ : NormedSpace ℝ D\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedSpace ℝ G\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : SMulCommClass ℝ 𝕜 F\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : SMulCommClass ℝ 𝕜 G\ng : D → E\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nhgrowth : ∀ (N : ℕ), N ≤ n → ∀ (x : D), ‖iteratedFDeriv ℝ N g x‖ ≤ C * (1 + ‖x‖) ^ l\nkg : ℕ\nCg : ℝ\nhg_upper' : ∀ (x : D), ‖x‖ ≤ Cg * (1 + ‖g x‖) ^ kg\nhCg : 1 ≤ 1 + Cg\nk' : ℕ := kg * (k + l * n)\nf : 𝓢(E, F)\nx : D\nseminorm_f : (fun a => ℝ) f := ↑(Finset.sup (Finset.Iic (k', n)) (schwartzSeminormFamily 𝕜 E F)) f\nhg_upper'' : (1 + ‖x‖) ^ (k + l * n) ≤ (1 + Cg) ^ (k + l * n) * (1 + ‖g x‖) ^ k'\nhbound : ∀ (i : ℕ), i ≤ n → ‖iteratedFDeriv ℝ i (↑f) (g x)‖ ≤ ↑(2 ^ k') * seminorm_f / (1 + ‖g x‖) ^ k'\nN : ℕ\nhN₁ : 1 ≤ N\nhN₂ : N ≤ n\nhN₁' : N ≠ 0\n⊢ 0 ≤ (C + 1) ^ N\n[PROOFSTEP]\npositivity\n[GOAL]\ncase refine'_1\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedSpace ℝ E\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup D\ninst✝⁶ : NormedSpace ℝ D\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedSpace ℝ G\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : SMulCommClass ℝ 𝕜 F\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : SMulCommClass ℝ 𝕜 G\ng : D → E\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nhgrowth : ∀ (N : ℕ), N ≤ n → ∀ (x : D), ‖iteratedFDeriv ℝ N g x‖ ≤ C * (1 + ‖x‖) ^ l\nkg : ℕ\nCg : ℝ\nhg_upper' : ∀ (x : D), ‖x‖ ≤ Cg * (1 + ‖g x‖) ^ kg\nhCg : 1 ≤ 1 + Cg\nk' : ℕ := kg * (k + l * n)\nf : 𝓢(E, F)\nx : D\nseminorm_f : (fun a => ℝ) f := ↑(Finset.sup (Finset.Iic (k', n)) (schwartzSeminormFamily 𝕜 E F)) f\nhg_upper'' : (1 + ‖x‖) ^ (k + l * n) ≤ (1 + Cg) ^ (k + l * n) * (1 + ‖g x‖) ^ k'\nhbound : ∀ (i : ℕ), i ≤ n → ‖iteratedFDeriv ℝ i (↑f) (g x)‖ ≤ ↑(2 ^ k') * seminorm_f / (1 + ‖g x‖) ^ k'\nN : ℕ\nhN₁ : 1 ≤ N\nhN₂ : N ≤ n\nhN₁' : N ≠ 0\n⊢ C ≤ (C + 1) ^ N\n[PROOFSTEP]\nexact le_trans (by simp [hC]) (le_self_pow (by simp [hC]) hN₁')\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedSpace ℝ E\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup D\ninst✝⁶ : NormedSpace ℝ D\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedSpace ℝ G\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : SMulCommClass ℝ 𝕜 F\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : SMulCommClass ℝ 𝕜 G\ng : D → E\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nhgrowth : ∀ (N : ℕ), N ≤ n → ∀ (x : D), ‖iteratedFDeriv ℝ N g x‖ ≤ C * (1 + ‖x‖) ^ l\nkg : ℕ\nCg : ℝ\nhg_upper' : ∀ (x : D), ‖x‖ ≤ Cg * (1 + ‖g x‖) ^ kg\nhCg : 1 ≤ 1 + Cg\nk' : ℕ := kg * (k + l * n)\nf : 𝓢(E, F)\nx : D\nseminorm_f : (fun a => ℝ) f := ↑(Finset.sup (Finset.Iic (k', n)) (schwartzSeminormFamily 𝕜 E F)) f\nhg_upper'' : (1 + ‖x‖) ^ (k + l * n) ≤ (1 + Cg) ^ (k + l * n) * (1 + ‖g x‖) ^ k'\nhbound : ∀ (i : ℕ), i ≤ n → ‖iteratedFDeriv ℝ i (↑f) (g x)‖ ≤ ↑(2 ^ k') * seminorm_f / (1 + ‖g x‖) ^ k'\nN : ℕ\nhN₁ : 1 ≤ N\nhN₂ : N ≤ n\nhN₁' : N ≠ 0\n⊢ C ≤ C + 1\n[PROOFSTEP]\nsimp [hC]\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedSpace ℝ E\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup D\ninst✝⁶ : NormedSpace ℝ D\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedSpace ℝ G\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : SMulCommClass ℝ 𝕜 F\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : SMulCommClass ℝ 𝕜 G\ng : D → E\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nhgrowth : ∀ (N : ℕ), N ≤ n → ∀ (x : D), ‖iteratedFDeriv ℝ N g x‖ ≤ C * (1 + ‖x‖) ^ l\nkg : ℕ\nCg : ℝ\nhg_upper' : ∀ (x : D), ‖x‖ ≤ Cg * (1 + ‖g x‖) ^ kg\nhCg : 1 ≤ 1 + Cg\nk' : ℕ := kg * (k + l * n)\nf : 𝓢(E, F)\nx : D\nseminorm_f : (fun a => ℝ) f := ↑(Finset.sup (Finset.Iic (k', n)) (schwartzSeminormFamily 𝕜 E F)) f\nhg_upper'' : (1 + ‖x‖) ^ (k + l * n) ≤ (1 + Cg) ^ (k + l * n) * (1 + ‖g x‖) ^ k'\nhbound : ∀ (i : ℕ), i ≤ n → ‖iteratedFDeriv ℝ i (↑f) (g x)‖ ≤ ↑(2 ^ k') * seminorm_f / (1 + ‖g x‖) ^ k'\nN : ℕ\nhN₁ : 1 ≤ N\nhN₂ : N ≤ n\nhN₁' : N ≠ 0\n⊢ 1 ≤ C + 1\n[PROOFSTEP]\nsimp [hC]\n[GOAL]\ncase refine'_2\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedSpace ℝ E\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup D\ninst✝⁶ : NormedSpace ℝ D\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedSpace ℝ G\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : SMulCommClass ℝ 𝕜 F\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : SMulCommClass ℝ 𝕜 G\ng : D → E\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nhgrowth : ∀ (N : ℕ), N ≤ n → ∀ (x : D), ‖iteratedFDeriv ℝ N g x‖ ≤ C * (1 + ‖x‖) ^ l\nkg : ℕ\nCg : ℝ\nhg_upper' : ∀ (x : D), ‖x‖ ≤ Cg * (1 + ‖g x‖) ^ kg\nhCg : 1 ≤ 1 + Cg\nk' : ℕ := kg * (k + l * n)\nf : 𝓢(E, F)\nx : D\nseminorm_f : (fun a => ℝ) f := ↑(Finset.sup (Finset.Iic (k', n)) (schwartzSeminormFamily 𝕜 E F)) f\nhg_upper'' : (1 + ‖x‖) ^ (k + l * n) ≤ (1 + Cg) ^ (k + l * n) * (1 + ‖g x‖) ^ k'\nhbound : ∀ (i : ℕ), i ≤ n → ‖iteratedFDeriv ℝ i (↑f) (g x)‖ ≤ ↑(2 ^ k') * seminorm_f / (1 + ‖g x‖) ^ k'\nN : ℕ\nhN₁ : 1 ≤ N\nhN₂ : N ≤ n\nhN₁' : N ≠ 0\n⊢ (1 + ‖x‖) ^ l ≤ ((1 + ‖x‖) ^ l) ^ N\n[PROOFSTEP]\nrefine' le_self_pow (one_le_pow_of_one_le _ l) hN₁'\n[GOAL]\ncase refine'_2\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedSpace ℝ E\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup D\ninst✝⁶ : NormedSpace ℝ D\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedSpace ℝ G\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : SMulCommClass ℝ 𝕜 F\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : SMulCommClass ℝ 𝕜 G\ng : D → E\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nhgrowth : ∀ (N : ℕ), N ≤ n → ∀ (x : D), ‖iteratedFDeriv ℝ N g x‖ ≤ C * (1 + ‖x‖) ^ l\nkg : ℕ\nCg : ℝ\nhg_upper' : ∀ (x : D), ‖x‖ ≤ Cg * (1 + ‖g x‖) ^ kg\nhCg : 1 ≤ 1 + Cg\nk' : ℕ := kg * (k + l * n)\nf : 𝓢(E, F)\nx : D\nseminorm_f : (fun a => ℝ) f := ↑(Finset.sup (Finset.Iic (k', n)) (schwartzSeminormFamily 𝕜 E F)) f\nhg_upper'' : (1 + ‖x‖) ^ (k + l * n) ≤ (1 + Cg) ^ (k + l * n) * (1 + ‖g x‖) ^ k'\nhbound : ∀ (i : ℕ), i ≤ n → ‖iteratedFDeriv ℝ i (↑f) (g x)‖ ≤ ↑(2 ^ k') * seminorm_f / (1 + ‖g x‖) ^ k'\nN : ℕ\nhN₁ : 1 ≤ N\nhN₂ : N ≤ n\nhN₁' : N ≠ 0\n⊢ 1 ≤ 1 + ‖x‖\n[PROOFSTEP]\nsimp only [le_add_iff_nonneg_right, norm_nonneg]\n[GOAL]\ncase right\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedSpace ℝ E\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup D\ninst✝⁶ : NormedSpace ℝ D\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedSpace ℝ G\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : SMulCommClass ℝ 𝕜 F\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : SMulCommClass ℝ 𝕜 G\ng : D → E\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nhgrowth : ∀ (N : ℕ), N ≤ n → ∀ (x : D), ‖iteratedFDeriv ℝ N g x‖ ≤ C * (1 + ‖x‖) ^ l\nkg : ℕ\nCg : ℝ\nhg_upper' : ∀ (x : D), ‖x‖ ≤ Cg * (1 + ‖g x‖) ^ kg\nhCg : 1 ≤ 1 + Cg\nk' : ℕ := kg * (k + l * n)\nf : 𝓢(E, F)\nx : D\nseminorm_f : (fun a => ℝ) f := ↑(Finset.sup (Finset.Iic (k', n)) (schwartzSeminormFamily 𝕜 E F)) f\nhg_upper'' : (1 + ‖x‖) ^ (k + l * n) ≤ (1 + Cg) ^ (k + l * n) * (1 + ‖g x‖) ^ k'\nhbound : ∀ (i : ℕ), i ≤ n → ‖iteratedFDeriv ℝ i (↑f) (g x)‖ ≤ ↑(2 ^ k') * seminorm_f / (1 + ‖g x‖) ^ k'\nhgrowth' : ∀ (N : ℕ), 1 ≤ N → N ≤ n → ‖iteratedFDeriv ℝ N g x‖ ≤ ((C + 1) * (1 + ‖x‖) ^ l) ^ N\n⊢ ‖x‖ ^ (k, n).fst * ‖iteratedFDeriv ℝ (k, n).snd ((fun f x => f (g x)) ↑f) x‖ ≤\n    (1 + Cg) ^ (k + l * n) * ((C + 1) ^ n * ↑n ! * ↑(2 ^ k')) *\n      ↑(Finset.sup (Finset.Iic (k', n)) (schwartzSeminormFamily 𝕜 E F)) f\n[PROOFSTEP]\nhave := norm_iteratedFDeriv_comp_le f.smooth' hg.1 le_top x hbound hgrowth'\n[GOAL]\ncase right\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedSpace ℝ E\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup D\ninst✝⁶ : NormedSpace ℝ D\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedSpace ℝ G\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : SMulCommClass ℝ 𝕜 F\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : SMulCommClass ℝ 𝕜 G\ng : D → E\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nhgrowth : ∀ (N : ℕ), N ≤ n → ∀ (x : D), ‖iteratedFDeriv ℝ N g x‖ ≤ C * (1 + ‖x‖) ^ l\nkg : ℕ\nCg : ℝ\nhg_upper' : ∀ (x : D), ‖x‖ ≤ Cg * (1 + ‖g x‖) ^ kg\nhCg : 1 ≤ 1 + Cg\nk' : ℕ := kg * (k + l * n)\nf : 𝓢(E, F)\nx : D\nseminorm_f : (fun a => ℝ) f := ↑(Finset.sup (Finset.Iic (k', n)) (schwartzSeminormFamily 𝕜 E F)) f\nhg_upper'' : (1 + ‖x‖) ^ (k + l * n) ≤ (1 + Cg) ^ (k + l * n) * (1 + ‖g x‖) ^ k'\nhbound : ∀ (i : ℕ), i ≤ n → ‖iteratedFDeriv ℝ i (↑f) (g x)‖ ≤ ↑(2 ^ k') * seminorm_f / (1 + ‖g x‖) ^ k'\nhgrowth' : ∀ (N : ℕ), 1 ≤ N → N ≤ n → ‖iteratedFDeriv ℝ N g x‖ ≤ ((C + 1) * (1 + ‖x‖) ^ l) ^ N\nthis :\n  ‖iteratedFDeriv ℝ n (f.toFun ∘ g) x‖ ≤\n    ↑n ! * (↑(2 ^ k') * seminorm_f / (1 + ‖g x‖) ^ k') * ((C + 1) * (1 + ‖x‖) ^ l) ^ n\n⊢ ‖x‖ ^ (k, n).fst * ‖iteratedFDeriv ℝ (k, n).snd ((fun f x => f (g x)) ↑f) x‖ ≤\n    (1 + Cg) ^ (k + l * n) * ((C + 1) ^ n * ↑n ! * ↑(2 ^ k')) *\n      ↑(Finset.sup (Finset.Iic (k', n)) (schwartzSeminormFamily 𝕜 E F)) f\n[PROOFSTEP]\nhave hxk : ‖x‖ ^ k ≤ (1 + ‖x‖) ^ k :=\n  pow_le_pow_of_le_left (norm_nonneg _) (by simp only [zero_le_one, le_add_iff_nonneg_left]) _\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedSpace ℝ E\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup D\ninst✝⁶ : NormedSpace ℝ D\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedSpace ℝ G\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : SMulCommClass ℝ 𝕜 F\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : SMulCommClass ℝ 𝕜 G\ng : D → E\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nhgrowth : ∀ (N : ℕ), N ≤ n → ∀ (x : D), ‖iteratedFDeriv ℝ N g x‖ ≤ C * (1 + ‖x‖) ^ l\nkg : ℕ\nCg : ℝ\nhg_upper' : ∀ (x : D), ‖x‖ ≤ Cg * (1 + ‖g x‖) ^ kg\nhCg : 1 ≤ 1 + Cg\nk' : ℕ := kg * (k + l * n)\nf : 𝓢(E, F)\nx : D\nseminorm_f : (fun a => ℝ) f := ↑(Finset.sup (Finset.Iic (k', n)) (schwartzSeminormFamily 𝕜 E F)) f\nhg_upper'' : (1 + ‖x‖) ^ (k + l * n) ≤ (1 + Cg) ^ (k + l * n) * (1 + ‖g x‖) ^ k'\nhbound : ∀ (i : ℕ), i ≤ n → ‖iteratedFDeriv ℝ i (↑f) (g x)‖ ≤ ↑(2 ^ k') * seminorm_f / (1 + ‖g x‖) ^ k'\nhgrowth' : ∀ (N : ℕ), 1 ≤ N → N ≤ n → ‖iteratedFDeriv ℝ N g x‖ ≤ ((C + 1) * (1 + ‖x‖) ^ l) ^ N\nthis :\n  ‖iteratedFDeriv ℝ n (f.toFun ∘ g) x‖ ≤\n    ↑n ! * (↑(2 ^ k') * seminorm_f / (1 + ‖g x‖) ^ k') * ((C + 1) * (1 + ‖x‖) ^ l) ^ n\n⊢ ‖x‖ ≤ 1 + ‖x‖\n[PROOFSTEP]\nsimp only [zero_le_one, le_add_iff_nonneg_left]\n[GOAL]\ncase right\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedSpace ℝ E\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup D\ninst✝⁶ : NormedSpace ℝ D\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedSpace ℝ G\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : SMulCommClass ℝ 𝕜 F\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : SMulCommClass ℝ 𝕜 G\ng : D → E\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nhgrowth : ∀ (N : ℕ), N ≤ n → ∀ (x : D), ‖iteratedFDeriv ℝ N g x‖ ≤ C * (1 + ‖x‖) ^ l\nkg : ℕ\nCg : ℝ\nhg_upper' : ∀ (x : D), ‖x‖ ≤ Cg * (1 + ‖g x‖) ^ kg\nhCg : 1 ≤ 1 + Cg\nk' : ℕ := kg * (k + l * n)\nf : 𝓢(E, F)\nx : D\nseminorm_f : (fun a => ℝ) f := ↑(Finset.sup (Finset.Iic (k', n)) (schwartzSeminormFamily 𝕜 E F)) f\nhg_upper'' : (1 + ‖x‖) ^ (k + l * n) ≤ (1 + Cg) ^ (k + l * n) * (1 + ‖g x‖) ^ k'\nhbound : ∀ (i : ℕ), i ≤ n → ‖iteratedFDeriv ℝ i (↑f) (g x)‖ ≤ ↑(2 ^ k') * seminorm_f / (1 + ‖g x‖) ^ k'\nhgrowth' : ∀ (N : ℕ), 1 ≤ N → N ≤ n → ‖iteratedFDeriv ℝ N g x‖ ≤ ((C + 1) * (1 + ‖x‖) ^ l) ^ N\nthis :\n  ‖iteratedFDeriv ℝ n (f.toFun ∘ g) x‖ ≤\n    ↑n ! * (↑(2 ^ k') * seminorm_f / (1 + ‖g x‖) ^ k') * ((C + 1) * (1 + ‖x‖) ^ l) ^ n\nhxk : ‖x‖ ^ k ≤ (1 + ‖x‖) ^ k\n⊢ ‖x‖ ^ (k, n).fst * ‖iteratedFDeriv ℝ (k, n).snd ((fun f x => f (g x)) ↑f) x‖ ≤\n    (1 + Cg) ^ (k + l * n) * ((C + 1) ^ n * ↑n ! * ↑(2 ^ k')) *\n      ↑(Finset.sup (Finset.Iic (k', n)) (schwartzSeminormFamily 𝕜 E F)) f\n[PROOFSTEP]\nrefine' le_trans (mul_le_mul hxk this (by positivity) (by positivity)) _\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedSpace ℝ E\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup D\ninst✝⁶ : NormedSpace ℝ D\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedSpace ℝ G\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : SMulCommClass ℝ 𝕜 F\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : SMulCommClass ℝ 𝕜 G\ng : D → E\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nhgrowth : ∀ (N : ℕ), N ≤ n → ∀ (x : D), ‖iteratedFDeriv ℝ N g x‖ ≤ C * (1 + ‖x‖) ^ l\nkg : ℕ\nCg : ℝ\nhg_upper' : ∀ (x : D), ‖x‖ ≤ Cg * (1 + ‖g x‖) ^ kg\nhCg : 1 ≤ 1 + Cg\nk' : ℕ := kg * (k + l * n)\nf : 𝓢(E, F)\nx : D\nseminorm_f : (fun a => ℝ) f := ↑(Finset.sup (Finset.Iic (k', n)) (schwartzSeminormFamily 𝕜 E F)) f\nhg_upper'' : (1 + ‖x‖) ^ (k + l * n) ≤ (1 + Cg) ^ (k + l * n) * (1 + ‖g x‖) ^ k'\nhbound : ∀ (i : ℕ), i ≤ n → ‖iteratedFDeriv ℝ i (↑f) (g x)‖ ≤ ↑(2 ^ k') * seminorm_f / (1 + ‖g x‖) ^ k'\nhgrowth' : ∀ (N : ℕ), 1 ≤ N → N ≤ n → ‖iteratedFDeriv ℝ N g x‖ ≤ ((C + 1) * (1 + ‖x‖) ^ l) ^ N\nthis :\n  ‖iteratedFDeriv ℝ n (f.toFun ∘ g) x‖ ≤\n    ↑n ! * (↑(2 ^ k') * seminorm_f / (1 + ‖g x‖) ^ k') * ((C + 1) * (1 + ‖x‖) ^ l) ^ n\nhxk : ‖x‖ ^ k ≤ (1 + ‖x‖) ^ k\n⊢ 0 ≤ ‖iteratedFDeriv ℝ (k, n).snd ((fun f x => f (g x)) ↑f) x‖\n[PROOFSTEP]\npositivity\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedSpace ℝ E\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup D\ninst✝⁶ : NormedSpace ℝ D\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedSpace ℝ G\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : SMulCommClass ℝ 𝕜 F\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : SMulCommClass ℝ 𝕜 G\ng : D → E\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nhgrowth : ∀ (N : ℕ), N ≤ n → ∀ (x : D), ‖iteratedFDeriv ℝ N g x‖ ≤ C * (1 + ‖x‖) ^ l\nkg : ℕ\nCg : ℝ\nhg_upper' : ∀ (x : D), ‖x‖ ≤ Cg * (1 + ‖g x‖) ^ kg\nhCg : 1 ≤ 1 + Cg\nk' : ℕ := kg * (k + l * n)\nf : 𝓢(E, F)\nx : D\nseminorm_f : (fun a => ℝ) f := ↑(Finset.sup (Finset.Iic (k', n)) (schwartzSeminormFamily 𝕜 E F)) f\nhg_upper'' : (1 + ‖x‖) ^ (k + l * n) ≤ (1 + Cg) ^ (k + l * n) * (1 + ‖g x‖) ^ k'\nhbound : ∀ (i : ℕ), i ≤ n → ‖iteratedFDeriv ℝ i (↑f) (g x)‖ ≤ ↑(2 ^ k') * seminorm_f / (1 + ‖g x‖) ^ k'\nhgrowth' : ∀ (N : ℕ), 1 ≤ N → N ≤ n → ‖iteratedFDeriv ℝ N g x‖ ≤ ((C + 1) * (1 + ‖x‖) ^ l) ^ N\nthis :\n  ‖iteratedFDeriv ℝ n (f.toFun ∘ g) x‖ ≤\n    ↑n ! * (↑(2 ^ k') * seminorm_f / (1 + ‖g x‖) ^ k') * ((C + 1) * (1 + ‖x‖) ^ l) ^ n\nhxk : ‖x‖ ^ k ≤ (1 + ‖x‖) ^ k\n⊢ 0 ≤ (1 + ‖x‖) ^ k\n[PROOFSTEP]\npositivity\n[GOAL]\ncase right\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedSpace ℝ E\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup D\ninst✝⁶ : NormedSpace ℝ D\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedSpace ℝ G\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : SMulCommClass ℝ 𝕜 F\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : SMulCommClass ℝ 𝕜 G\ng : D → E\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nhgrowth : ∀ (N : ℕ), N ≤ n → ∀ (x : D), ‖iteratedFDeriv ℝ N g x‖ ≤ C * (1 + ‖x‖) ^ l\nkg : ℕ\nCg : ℝ\nhg_upper' : ∀ (x : D), ‖x‖ ≤ Cg * (1 + ‖g x‖) ^ kg\nhCg : 1 ≤ 1 + Cg\nk' : ℕ := kg * (k + l * n)\nf : 𝓢(E, F)\nx : D\nseminorm_f : (fun a => ℝ) f := ↑(Finset.sup (Finset.Iic (k', n)) (schwartzSeminormFamily 𝕜 E F)) f\nhg_upper'' : (1 + ‖x‖) ^ (k + l * n) ≤ (1 + Cg) ^ (k + l * n) * (1 + ‖g x‖) ^ k'\nhbound : ∀ (i : ℕ), i ≤ n → ‖iteratedFDeriv ℝ i (↑f) (g x)‖ ≤ ↑(2 ^ k') * seminorm_f / (1 + ‖g x‖) ^ k'\nhgrowth' : ∀ (N : ℕ), 1 ≤ N → N ≤ n → ‖iteratedFDeriv ℝ N g x‖ ≤ ((C + 1) * (1 + ‖x‖) ^ l) ^ N\nthis :\n  ‖iteratedFDeriv ℝ n (f.toFun ∘ g) x‖ ≤\n    ↑n ! * (↑(2 ^ k') * seminorm_f / (1 + ‖g x‖) ^ k') * ((C + 1) * (1 + ‖x‖) ^ l) ^ n\nhxk : ‖x‖ ^ k ≤ (1 + ‖x‖) ^ k\n⊢ (1 + ‖x‖) ^ k * (↑n ! * (↑(2 ^ k') * seminorm_f / (1 + ‖g x‖) ^ k') * ((C + 1) * (1 + ‖x‖) ^ l) ^ n) ≤\n    (1 + Cg) ^ (k + l * n) * ((C + 1) ^ n * ↑n ! * ↑(2 ^ k')) *\n      ↑(Finset.sup (Finset.Iic (k', n)) (schwartzSeminormFamily 𝕜 E F)) f\n[PROOFSTEP]\nhave rearrange :\n  (1 + ‖x‖) ^ k * (n ! * (2 ^ k' * seminorm_f / (1 + ‖g x‖) ^ k') * ((C + 1) * (1 + ‖x‖) ^ l) ^ n) =\n    (1 + ‖x‖) ^ (k + l * n) / (1 + ‖g x‖) ^ k' * ((C + 1) ^ n * n ! * 2 ^ k' * seminorm_f) :=\n  by\n  rw [mul_pow, pow_add, ← pow_mul]\n  ring\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedSpace ℝ E\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup D\ninst✝⁶ : NormedSpace ℝ D\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedSpace ℝ G\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : SMulCommClass ℝ 𝕜 F\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : SMulCommClass ℝ 𝕜 G\ng : D → E\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nhgrowth : ∀ (N : ℕ), N ≤ n → ∀ (x : D), ‖iteratedFDeriv ℝ N g x‖ ≤ C * (1 + ‖x‖) ^ l\nkg : ℕ\nCg : ℝ\nhg_upper' : ∀ (x : D), ‖x‖ ≤ Cg * (1 + ‖g x‖) ^ kg\nhCg : 1 ≤ 1 + Cg\nk' : ℕ := kg * (k + l * n)\nf : 𝓢(E, F)\nx : D\nseminorm_f : (fun a => ℝ) f := ↑(Finset.sup (Finset.Iic (k', n)) (schwartzSeminormFamily 𝕜 E F)) f\nhg_upper'' : (1 + ‖x‖) ^ (k + l * n) ≤ (1 + Cg) ^ (k + l * n) * (1 + ‖g x‖) ^ k'\nhbound : ∀ (i : ℕ), i ≤ n → ‖iteratedFDeriv ℝ i (↑f) (g x)‖ ≤ ↑(2 ^ k') * seminorm_f / (1 + ‖g x‖) ^ k'\nhgrowth' : ∀ (N : ℕ), 1 ≤ N → N ≤ n → ‖iteratedFDeriv ℝ N g x‖ ≤ ((C + 1) * (1 + ‖x‖) ^ l) ^ N\nthis :\n  ‖iteratedFDeriv ℝ n (f.toFun ∘ g) x‖ ≤\n    ↑n ! * (↑(2 ^ k') * seminorm_f / (1 + ‖g x‖) ^ k') * ((C + 1) * (1 + ‖x‖) ^ l) ^ n\nhxk : ‖x‖ ^ k ≤ (1 + ‖x‖) ^ k\n⊢ (1 + ‖x‖) ^ k * (↑n ! * (↑(2 ^ k') * seminorm_f / (1 + ‖g x‖) ^ k') * ((C + 1) * (1 + ‖x‖) ^ l) ^ n) =\n    (1 + ‖x‖) ^ (k + l * n) / (1 + ‖g x‖) ^ k' * ((C + 1) ^ n * ↑n ! * ↑(2 ^ k') * seminorm_f)\n[PROOFSTEP]\nrw [mul_pow, pow_add, ← pow_mul]\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedSpace ℝ E\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup D\ninst✝⁶ : NormedSpace ℝ D\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedSpace ℝ G\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : SMulCommClass ℝ 𝕜 F\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : SMulCommClass ℝ 𝕜 G\ng : D → E\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nhgrowth : ∀ (N : ℕ), N ≤ n → ∀ (x : D), ‖iteratedFDeriv ℝ N g x‖ ≤ C * (1 + ‖x‖) ^ l\nkg : ℕ\nCg : ℝ\nhg_upper' : ∀ (x : D), ‖x‖ ≤ Cg * (1 + ‖g x‖) ^ kg\nhCg : 1 ≤ 1 + Cg\nk' : ℕ := kg * (k + l * n)\nf : 𝓢(E, F)\nx : D\nseminorm_f : (fun a => ℝ) f := ↑(Finset.sup (Finset.Iic (k', n)) (schwartzSeminormFamily 𝕜 E F)) f\nhg_upper'' : (1 + ‖x‖) ^ (k + l * n) ≤ (1 + Cg) ^ (k + l * n) * (1 + ‖g x‖) ^ k'\nhbound : ∀ (i : ℕ), i ≤ n → ‖iteratedFDeriv ℝ i (↑f) (g x)‖ ≤ ↑(2 ^ k') * seminorm_f / (1 + ‖g x‖) ^ k'\nhgrowth' : ∀ (N : ℕ), 1 ≤ N → N ≤ n → ‖iteratedFDeriv ℝ N g x‖ ≤ ((C + 1) * (1 + ‖x‖) ^ l) ^ N\nthis :\n  ‖iteratedFDeriv ℝ n (f.toFun ∘ g) x‖ ≤\n    ↑n ! * (↑(2 ^ k') * seminorm_f / (1 + ‖g x‖) ^ k') * ((C + 1) * (1 + ‖x‖) ^ l) ^ n\nhxk : ‖x‖ ^ k ≤ (1 + ‖x‖) ^ k\n⊢ (1 + ‖x‖) ^ k * (↑n ! * (↑(2 ^ k') * seminorm_f / (1 + ‖g x‖) ^ k') * ((C + 1) ^ n * (1 + ‖x‖) ^ (l * n))) =\n    (1 + ‖x‖) ^ k * (1 + ‖x‖) ^ (l * n) / (1 + ‖g x‖) ^ k' * ((C + 1) ^ n * ↑n ! * ↑(2 ^ k') * seminorm_f)\n[PROOFSTEP]\nring\n[GOAL]\ncase right\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedSpace ℝ E\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup D\ninst✝⁶ : NormedSpace ℝ D\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedSpace ℝ G\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : SMulCommClass ℝ 𝕜 F\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : SMulCommClass ℝ 𝕜 G\ng : D → E\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nhgrowth : ∀ (N : ℕ), N ≤ n → ∀ (x : D), ‖iteratedFDeriv ℝ N g x‖ ≤ C * (1 + ‖x‖) ^ l\nkg : ℕ\nCg : ℝ\nhg_upper' : ∀ (x : D), ‖x‖ ≤ Cg * (1 + ‖g x‖) ^ kg\nhCg : 1 ≤ 1 + Cg\nk' : ℕ := kg * (k + l * n)\nf : 𝓢(E, F)\nx : D\nseminorm_f : (fun a => ℝ) f := ↑(Finset.sup (Finset.Iic (k', n)) (schwartzSeminormFamily 𝕜 E F)) f\nhg_upper'' : (1 + ‖x‖) ^ (k + l * n) ≤ (1 + Cg) ^ (k + l * n) * (1 + ‖g x‖) ^ k'\nhbound : ∀ (i : ℕ), i ≤ n → ‖iteratedFDeriv ℝ i (↑f) (g x)‖ ≤ ↑(2 ^ k') * seminorm_f / (1 + ‖g x‖) ^ k'\nhgrowth' : ∀ (N : ℕ), 1 ≤ N → N ≤ n → ‖iteratedFDeriv ℝ N g x‖ ≤ ((C + 1) * (1 + ‖x‖) ^ l) ^ N\nthis :\n  ‖iteratedFDeriv ℝ n (f.toFun ∘ g) x‖ ≤\n    ↑n ! * (↑(2 ^ k') * seminorm_f / (1 + ‖g x‖) ^ k') * ((C + 1) * (1 + ‖x‖) ^ l) ^ n\nhxk : ‖x‖ ^ k ≤ (1 + ‖x‖) ^ k\nrearrange :\n  (1 + ‖x‖) ^ k * (↑n ! * (↑(2 ^ k') * seminorm_f / (1 + ‖g x‖) ^ k') * ((C + 1) * (1 + ‖x‖) ^ l) ^ n) =\n    (1 + ‖x‖) ^ (k + l * n) / (1 + ‖g x‖) ^ k' * ((C + 1) ^ n * ↑n ! * ↑(2 ^ k') * seminorm_f)\n⊢ (1 + ‖x‖) ^ k * (↑n ! * (↑(2 ^ k') * seminorm_f / (1 + ‖g x‖) ^ k') * ((C + 1) * (1 + ‖x‖) ^ l) ^ n) ≤\n    (1 + Cg) ^ (k + l * n) * ((C + 1) ^ n * ↑n ! * ↑(2 ^ k')) *\n      ↑(Finset.sup (Finset.Iic (k', n)) (schwartzSeminormFamily 𝕜 E F)) f\n[PROOFSTEP]\nrw [rearrange]\n[GOAL]\ncase right\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedSpace ℝ E\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup D\ninst✝⁶ : NormedSpace ℝ D\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedSpace ℝ G\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : SMulCommClass ℝ 𝕜 F\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : SMulCommClass ℝ 𝕜 G\ng : D → E\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nhgrowth : ∀ (N : ℕ), N ≤ n → ∀ (x : D), ‖iteratedFDeriv ℝ N g x‖ ≤ C * (1 + ‖x‖) ^ l\nkg : ℕ\nCg : ℝ\nhg_upper' : ∀ (x : D), ‖x‖ ≤ Cg * (1 + ‖g x‖) ^ kg\nhCg : 1 ≤ 1 + Cg\nk' : ℕ := kg * (k + l * n)\nf : 𝓢(E, F)\nx : D\nseminorm_f : (fun a => ℝ) f := ↑(Finset.sup (Finset.Iic (k', n)) (schwartzSeminormFamily 𝕜 E F)) f\nhg_upper'' : (1 + ‖x‖) ^ (k + l * n) ≤ (1 + Cg) ^ (k + l * n) * (1 + ‖g x‖) ^ k'\nhbound : ∀ (i : ℕ), i ≤ n → ‖iteratedFDeriv ℝ i (↑f) (g x)‖ ≤ ↑(2 ^ k') * seminorm_f / (1 + ‖g x‖) ^ k'\nhgrowth' : ∀ (N : ℕ), 1 ≤ N → N ≤ n → ‖iteratedFDeriv ℝ N g x‖ ≤ ((C + 1) * (1 + ‖x‖) ^ l) ^ N\nthis :\n  ‖iteratedFDeriv ℝ n (f.toFun ∘ g) x‖ ≤\n    ↑n ! * (↑(2 ^ k') * seminorm_f / (1 + ‖g x‖) ^ k') * ((C + 1) * (1 + ‖x‖) ^ l) ^ n\nhxk : ‖x‖ ^ k ≤ (1 + ‖x‖) ^ k\nrearrange :\n  (1 + ‖x‖) ^ k * (↑n ! * (↑(2 ^ k') * seminorm_f / (1 + ‖g x‖) ^ k') * ((C + 1) * (1 + ‖x‖) ^ l) ^ n) =\n    (1 + ‖x‖) ^ (k + l * n) / (1 + ‖g x‖) ^ k' * ((C + 1) ^ n * ↑n ! * ↑(2 ^ k') * seminorm_f)\n⊢ (1 + ‖x‖) ^ (k + l * n) / (1 + ‖g x‖) ^ k' * ((C + 1) ^ n * ↑n ! * ↑(2 ^ k') * seminorm_f) ≤\n    (1 + Cg) ^ (k + l * n) * ((C + 1) ^ n * ↑n ! * ↑(2 ^ k')) *\n      ↑(Finset.sup (Finset.Iic (k', n)) (schwartzSeminormFamily 𝕜 E F)) f\n[PROOFSTEP]\nhave hgxk' : 0 < (1 + ‖g x‖) ^ k' := by positivity\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedSpace ℝ E\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup D\ninst✝⁶ : NormedSpace ℝ D\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedSpace ℝ G\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : SMulCommClass ℝ 𝕜 F\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : SMulCommClass ℝ 𝕜 G\ng : D → E\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nhgrowth : ∀ (N : ℕ), N ≤ n → ∀ (x : D), ‖iteratedFDeriv ℝ N g x‖ ≤ C * (1 + ‖x‖) ^ l\nkg : ℕ\nCg : ℝ\nhg_upper' : ∀ (x : D), ‖x‖ ≤ Cg * (1 + ‖g x‖) ^ kg\nhCg : 1 ≤ 1 + Cg\nk' : ℕ := kg * (k + l * n)\nf : 𝓢(E, F)\nx : D\nseminorm_f : (fun a => ℝ) f := ↑(Finset.sup (Finset.Iic (k', n)) (schwartzSeminormFamily 𝕜 E F)) f\nhg_upper'' : (1 + ‖x‖) ^ (k + l * n) ≤ (1 + Cg) ^ (k + l * n) * (1 + ‖g x‖) ^ k'\nhbound : ∀ (i : ℕ), i ≤ n → ‖iteratedFDeriv ℝ i (↑f) (g x)‖ ≤ ↑(2 ^ k') * seminorm_f / (1 + ‖g x‖) ^ k'\nhgrowth' : ∀ (N : ℕ), 1 ≤ N → N ≤ n → ‖iteratedFDeriv ℝ N g x‖ ≤ ((C + 1) * (1 + ‖x‖) ^ l) ^ N\nthis :\n  ‖iteratedFDeriv ℝ n (f.toFun ∘ g) x‖ ≤\n    ↑n ! * (↑(2 ^ k') * seminorm_f / (1 + ‖g x‖) ^ k') * ((C + 1) * (1 + ‖x‖) ^ l) ^ n\nhxk : ‖x‖ ^ k ≤ (1 + ‖x‖) ^ k\nrearrange :\n  (1 + ‖x‖) ^ k * (↑n ! * (↑(2 ^ k') * seminorm_f / (1 + ‖g x‖) ^ k') * ((C + 1) * (1 + ‖x‖) ^ l) ^ n) =\n    (1 + ‖x‖) ^ (k + l * n) / (1 + ‖g x‖) ^ k' * ((C + 1) ^ n * ↑n ! * ↑(2 ^ k') * seminorm_f)\n⊢ 0 < (1 + ‖g x‖) ^ k'\n[PROOFSTEP]\npositivity\n[GOAL]\ncase right\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedSpace ℝ E\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup D\ninst✝⁶ : NormedSpace ℝ D\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedSpace ℝ G\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : SMulCommClass ℝ 𝕜 F\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : SMulCommClass ℝ 𝕜 G\ng : D → E\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nhgrowth : ∀ (N : ℕ), N ≤ n → ∀ (x : D), ‖iteratedFDeriv ℝ N g x‖ ≤ C * (1 + ‖x‖) ^ l\nkg : ℕ\nCg : ℝ\nhg_upper' : ∀ (x : D), ‖x‖ ≤ Cg * (1 + ‖g x‖) ^ kg\nhCg : 1 ≤ 1 + Cg\nk' : ℕ := kg * (k + l * n)\nf : 𝓢(E, F)\nx : D\nseminorm_f : (fun a => ℝ) f := ↑(Finset.sup (Finset.Iic (k', n)) (schwartzSeminormFamily 𝕜 E F)) f\nhg_upper'' : (1 + ‖x‖) ^ (k + l * n) ≤ (1 + Cg) ^ (k + l * n) * (1 + ‖g x‖) ^ k'\nhbound : ∀ (i : ℕ), i ≤ n → ‖iteratedFDeriv ℝ i (↑f) (g x)‖ ≤ ↑(2 ^ k') * seminorm_f / (1 + ‖g x‖) ^ k'\nhgrowth' : ∀ (N : ℕ), 1 ≤ N → N ≤ n → ‖iteratedFDeriv ℝ N g x‖ ≤ ((C + 1) * (1 + ‖x‖) ^ l) ^ N\nthis :\n  ‖iteratedFDeriv ℝ n (f.toFun ∘ g) x‖ ≤\n    ↑n ! * (↑(2 ^ k') * seminorm_f / (1 + ‖g x‖) ^ k') * ((C + 1) * (1 + ‖x‖) ^ l) ^ n\nhxk : ‖x‖ ^ k ≤ (1 + ‖x‖) ^ k\nrearrange :\n  (1 + ‖x‖) ^ k * (↑n ! * (↑(2 ^ k') * seminorm_f / (1 + ‖g x‖) ^ k') * ((C + 1) * (1 + ‖x‖) ^ l) ^ n) =\n    (1 + ‖x‖) ^ (k + l * n) / (1 + ‖g x‖) ^ k' * ((C + 1) ^ n * ↑n ! * ↑(2 ^ k') * seminorm_f)\nhgxk' : 0 < (1 + ‖g x‖) ^ k'\n⊢ (1 + ‖x‖) ^ (k + l * n) / (1 + ‖g x‖) ^ k' * ((C + 1) ^ n * ↑n ! * ↑(2 ^ k') * seminorm_f) ≤\n    (1 + Cg) ^ (k + l * n) * ((C + 1) ^ n * ↑n ! * ↑(2 ^ k')) *\n      ↑(Finset.sup (Finset.Iic (k', n)) (schwartzSeminormFamily 𝕜 E F)) f\n[PROOFSTEP]\nrw [← div_le_iff hgxk'] at hg_upper'' \n[GOAL]\ncase right\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedSpace ℝ E\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup D\ninst✝⁶ : NormedSpace ℝ D\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedSpace ℝ G\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : SMulCommClass ℝ 𝕜 F\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : SMulCommClass ℝ 𝕜 G\ng : D → E\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nhgrowth : ∀ (N : ℕ), N ≤ n → ∀ (x : D), ‖iteratedFDeriv ℝ N g x‖ ≤ C * (1 + ‖x‖) ^ l\nkg : ℕ\nCg : ℝ\nhg_upper' : ∀ (x : D), ‖x‖ ≤ Cg * (1 + ‖g x‖) ^ kg\nhCg : 1 ≤ 1 + Cg\nk' : ℕ := kg * (k + l * n)\nf : 𝓢(E, F)\nx : D\nseminorm_f : (fun a => ℝ) f := ↑(Finset.sup (Finset.Iic (k', n)) (schwartzSeminormFamily 𝕜 E F)) f\nhg_upper'' : (1 + ‖x‖) ^ (k + l * n) / (1 + ‖g x‖) ^ k' ≤ (1 + Cg) ^ (k + l * n)\nhbound : ∀ (i : ℕ), i ≤ n → ‖iteratedFDeriv ℝ i (↑f) (g x)‖ ≤ ↑(2 ^ k') * seminorm_f / (1 + ‖g x‖) ^ k'\nhgrowth' : ∀ (N : ℕ), 1 ≤ N → N ≤ n → ‖iteratedFDeriv ℝ N g x‖ ≤ ((C + 1) * (1 + ‖x‖) ^ l) ^ N\nthis :\n  ‖iteratedFDeriv ℝ n (f.toFun ∘ g) x‖ ≤\n    ↑n ! * (↑(2 ^ k') * seminorm_f / (1 + ‖g x‖) ^ k') * ((C + 1) * (1 + ‖x‖) ^ l) ^ n\nhxk : ‖x‖ ^ k ≤ (1 + ‖x‖) ^ k\nrearrange :\n  (1 + ‖x‖) ^ k * (↑n ! * (↑(2 ^ k') * seminorm_f / (1 + ‖g x‖) ^ k') * ((C + 1) * (1 + ‖x‖) ^ l) ^ n) =\n    (1 + ‖x‖) ^ (k + l * n) / (1 + ‖g x‖) ^ k' * ((C + 1) ^ n * ↑n ! * ↑(2 ^ k') * seminorm_f)\nhgxk' : 0 < (1 + ‖g x‖) ^ k'\n⊢ (1 + ‖x‖) ^ (k + l * n) / (1 + ‖g x‖) ^ k' * ((C + 1) ^ n * ↑n ! * ↑(2 ^ k') * seminorm_f) ≤\n    (1 + Cg) ^ (k + l * n) * ((C + 1) ^ n * ↑n ! * ↑(2 ^ k')) *\n      ↑(Finset.sup (Finset.Iic (k', n)) (schwartzSeminormFamily 𝕜 E F)) f\n[PROOFSTEP]\nhave hpos : (0 : ℝ) ≤ (C + 1) ^ n * n ! * 2 ^ k' * seminorm_f :=\n  by\n  have : 0 ≤ seminorm_f := map_nonneg _ _\n  positivity\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedSpace ℝ E\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup D\ninst✝⁶ : NormedSpace ℝ D\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedSpace ℝ G\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : SMulCommClass ℝ 𝕜 F\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : SMulCommClass ℝ 𝕜 G\ng : D → E\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nhgrowth : ∀ (N : ℕ), N ≤ n → ∀ (x : D), ‖iteratedFDeriv ℝ N g x‖ ≤ C * (1 + ‖x‖) ^ l\nkg : ℕ\nCg : ℝ\nhg_upper' : ∀ (x : D), ‖x‖ ≤ Cg * (1 + ‖g x‖) ^ kg\nhCg : 1 ≤ 1 + Cg\nk' : ℕ := kg * (k + l * n)\nf : 𝓢(E, F)\nx : D\nseminorm_f : (fun a => ℝ) f := ↑(Finset.sup (Finset.Iic (k', n)) (schwartzSeminormFamily 𝕜 E F)) f\nhg_upper'' : (1 + ‖x‖) ^ (k + l * n) / (1 + ‖g x‖) ^ k' ≤ (1 + Cg) ^ (k + l * n)\nhbound : ∀ (i : ℕ), i ≤ n → ‖iteratedFDeriv ℝ i (↑f) (g x)‖ ≤ ↑(2 ^ k') * seminorm_f / (1 + ‖g x‖) ^ k'\nhgrowth' : ∀ (N : ℕ), 1 ≤ N → N ≤ n → ‖iteratedFDeriv ℝ N g x‖ ≤ ((C + 1) * (1 + ‖x‖) ^ l) ^ N\nthis :\n  ‖iteratedFDeriv ℝ n (f.toFun ∘ g) x‖ ≤\n    ↑n ! * (↑(2 ^ k') * seminorm_f / (1 + ‖g x‖) ^ k') * ((C + 1) * (1 + ‖x‖) ^ l) ^ n\nhxk : ‖x‖ ^ k ≤ (1 + ‖x‖) ^ k\nrearrange :\n  (1 + ‖x‖) ^ k * (↑n ! * (↑(2 ^ k') * seminorm_f / (1 + ‖g x‖) ^ k') * ((C + 1) * (1 + ‖x‖) ^ l) ^ n) =\n    (1 + ‖x‖) ^ (k + l * n) / (1 + ‖g x‖) ^ k' * ((C + 1) ^ n * ↑n ! * ↑(2 ^ k') * seminorm_f)\nhgxk' : 0 < (1 + ‖g x‖) ^ k'\n⊢ 0 ≤ (C + 1) ^ n * ↑n ! * ↑(2 ^ k') * seminorm_f\n[PROOFSTEP]\nhave : 0 ≤ seminorm_f := map_nonneg _ _\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedSpace ℝ E\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup D\ninst✝⁶ : NormedSpace ℝ D\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedSpace ℝ G\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : SMulCommClass ℝ 𝕜 F\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : SMulCommClass ℝ 𝕜 G\ng : D → E\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nhgrowth : ∀ (N : ℕ), N ≤ n → ∀ (x : D), ‖iteratedFDeriv ℝ N g x‖ ≤ C * (1 + ‖x‖) ^ l\nkg : ℕ\nCg : ℝ\nhg_upper' : ∀ (x : D), ‖x‖ ≤ Cg * (1 + ‖g x‖) ^ kg\nhCg : 1 ≤ 1 + Cg\nk' : ℕ := kg * (k + l * n)\nf : 𝓢(E, F)\nx : D\nseminorm_f : (fun a => ℝ) f := ↑(Finset.sup (Finset.Iic (k', n)) (schwartzSeminormFamily 𝕜 E F)) f\nhg_upper'' : (1 + ‖x‖) ^ (k + l * n) / (1 + ‖g x‖) ^ k' ≤ (1 + Cg) ^ (k + l * n)\nhbound : ∀ (i : ℕ), i ≤ n → ‖iteratedFDeriv ℝ i (↑f) (g x)‖ ≤ ↑(2 ^ k') * seminorm_f / (1 + ‖g x‖) ^ k'\nhgrowth' : ∀ (N : ℕ), 1 ≤ N → N ≤ n → ‖iteratedFDeriv ℝ N g x‖ ≤ ((C + 1) * (1 + ‖x‖) ^ l) ^ N\nthis✝ :\n  ‖iteratedFDeriv ℝ n (f.toFun ∘ g) x‖ ≤\n    ↑n ! * (↑(2 ^ k') * seminorm_f / (1 + ‖g x‖) ^ k') * ((C + 1) * (1 + ‖x‖) ^ l) ^ n\nhxk : ‖x‖ ^ k ≤ (1 + ‖x‖) ^ k\nrearrange :\n  (1 + ‖x‖) ^ k * (↑n ! * (↑(2 ^ k') * seminorm_f / (1 + ‖g x‖) ^ k') * ((C + 1) * (1 + ‖x‖) ^ l) ^ n) =\n    (1 + ‖x‖) ^ (k + l * n) / (1 + ‖g x‖) ^ k' * ((C + 1) ^ n * ↑n ! * ↑(2 ^ k') * seminorm_f)\nhgxk' : 0 < (1 + ‖g x‖) ^ k'\nthis : 0 ≤ seminorm_f\n⊢ 0 ≤ (C + 1) ^ n * ↑n ! * ↑(2 ^ k') * seminorm_f\n[PROOFSTEP]\npositivity\n[GOAL]\ncase right\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedSpace ℝ E\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup D\ninst✝⁶ : NormedSpace ℝ D\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedSpace ℝ G\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : SMulCommClass ℝ 𝕜 F\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : SMulCommClass ℝ 𝕜 G\ng : D → E\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nhgrowth : ∀ (N : ℕ), N ≤ n → ∀ (x : D), ‖iteratedFDeriv ℝ N g x‖ ≤ C * (1 + ‖x‖) ^ l\nkg : ℕ\nCg : ℝ\nhg_upper' : ∀ (x : D), ‖x‖ ≤ Cg * (1 + ‖g x‖) ^ kg\nhCg : 1 ≤ 1 + Cg\nk' : ℕ := kg * (k + l * n)\nf : 𝓢(E, F)\nx : D\nseminorm_f : (fun a => ℝ) f := ↑(Finset.sup (Finset.Iic (k', n)) (schwartzSeminormFamily 𝕜 E F)) f\nhg_upper'' : (1 + ‖x‖) ^ (k + l * n) / (1 + ‖g x‖) ^ k' ≤ (1 + Cg) ^ (k + l * n)\nhbound : ∀ (i : ℕ), i ≤ n → ‖iteratedFDeriv ℝ i (↑f) (g x)‖ ≤ ↑(2 ^ k') * seminorm_f / (1 + ‖g x‖) ^ k'\nhgrowth' : ∀ (N : ℕ), 1 ≤ N → N ≤ n → ‖iteratedFDeriv ℝ N g x‖ ≤ ((C + 1) * (1 + ‖x‖) ^ l) ^ N\nthis :\n  ‖iteratedFDeriv ℝ n (f.toFun ∘ g) x‖ ≤\n    ↑n ! * (↑(2 ^ k') * seminorm_f / (1 + ‖g x‖) ^ k') * ((C + 1) * (1 + ‖x‖) ^ l) ^ n\nhxk : ‖x‖ ^ k ≤ (1 + ‖x‖) ^ k\nrearrange :\n  (1 + ‖x‖) ^ k * (↑n ! * (↑(2 ^ k') * seminorm_f / (1 + ‖g x‖) ^ k') * ((C + 1) * (1 + ‖x‖) ^ l) ^ n) =\n    (1 + ‖x‖) ^ (k + l * n) / (1 + ‖g x‖) ^ k' * ((C + 1) ^ n * ↑n ! * ↑(2 ^ k') * seminorm_f)\nhgxk' : 0 < (1 + ‖g x‖) ^ k'\nhpos : 0 ≤ (C + 1) ^ n * ↑n ! * ↑(2 ^ k') * seminorm_f\n⊢ (1 + ‖x‖) ^ (k + l * n) / (1 + ‖g x‖) ^ k' * ((C + 1) ^ n * ↑n ! * ↑(2 ^ k') * seminorm_f) ≤\n    (1 + Cg) ^ (k + l * n) * ((C + 1) ^ n * ↑n ! * ↑(2 ^ k')) *\n      ↑(Finset.sup (Finset.Iic (k', n)) (schwartzSeminormFamily 𝕜 E F)) f\n[PROOFSTEP]\nrefine' le_trans (mul_le_mul_of_nonneg_right hg_upper'' hpos) _\n[GOAL]\ncase right\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedSpace ℝ E\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup D\ninst✝⁶ : NormedSpace ℝ D\ninst✝⁵ : NormedAddCommGroup G\ninst✝⁴ : NormedSpace ℝ G\ninst✝³ : NormedSpace 𝕜 F\ninst✝² : SMulCommClass ℝ 𝕜 F\ninst✝¹ : NormedSpace 𝕜 G\ninst✝ : SMulCommClass ℝ 𝕜 G\ng : D → E\nhg : Function.HasTemperateGrowth g\nk n l : ℕ\nC : ℝ\nhC : 0 ≤ C\nhgrowth : ∀ (N : ℕ), N ≤ n → ∀ (x : D), ‖iteratedFDeriv ℝ N g x‖ ≤ C * (1 + ‖x‖) ^ l\nkg : ℕ\nCg : ℝ\nhg_upper' : ∀ (x : D), ‖x‖ ≤ Cg * (1 + ‖g x‖) ^ kg\nhCg : 1 ≤ 1 + Cg\nk' : ℕ := kg * (k + l * n)\nf : 𝓢(E, F)\nx : D\nseminorm_f : (fun a => ℝ) f := ↑(Finset.sup (Finset.Iic (k', n)) (schwartzSeminormFamily 𝕜 E F)) f\nhg_upper'' : (1 + ‖x‖) ^ (k + l * n) / (1 + ‖g x‖) ^ k' ≤ (1 + Cg) ^ (k + l * n)\nhbound : ∀ (i : ℕ), i ≤ n → ‖iteratedFDeriv ℝ i (↑f) (g x)‖ ≤ ↑(2 ^ k') * seminorm_f / (1 + ‖g x‖) ^ k'\nhgrowth' : ∀ (N : ℕ), 1 ≤ N → N ≤ n → ‖iteratedFDeriv ℝ N g x‖ ≤ ((C + 1) * (1 + ‖x‖) ^ l) ^ N\nthis :\n  ‖iteratedFDeriv ℝ n (f.toFun ∘ g) x‖ ≤\n    ↑n ! * (↑(2 ^ k') * seminorm_f / (1 + ‖g x‖) ^ k') * ((C + 1) * (1 + ‖x‖) ^ l) ^ n\nhxk : ‖x‖ ^ k ≤ (1 + ‖x‖) ^ k\nrearrange :\n  (1 + ‖x‖) ^ k * (↑n ! * (↑(2 ^ k') * seminorm_f / (1 + ‖g x‖) ^ k') * ((C + 1) * (1 + ‖x‖) ^ l) ^ n) =\n    (1 + ‖x‖) ^ (k + l * n) / (1 + ‖g x‖) ^ k' * ((C + 1) ^ n * ↑n ! * ↑(2 ^ k') * seminorm_f)\nhgxk' : 0 < (1 + ‖g x‖) ^ k'\nhpos : 0 ≤ (C + 1) ^ n * ↑n ! * ↑(2 ^ k') * seminorm_f\n⊢ (1 + Cg) ^ (k + l * n) * ((C + 1) ^ n * ↑n ! * ↑(2 ^ k') * seminorm_f) ≤\n    (1 + Cg) ^ (k + l * n) * ((C + 1) ^ n * ↑n ! * ↑(2 ^ k')) *\n      ↑(Finset.sup (Finset.Iic (k', n)) (schwartzSeminormFamily 𝕜 E F)) f\n[PROOFSTEP]\nrw [← mul_assoc]\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ninst✝² : IsROrC 𝕜\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : SMulCommClass ℝ 𝕜 F\nx✝ : ℕ × ℕ\nk n : ℕ\nf : 𝓢(E, F)\nx : E\n⊢ ‖x‖ ^ (k, n).fst * ‖iteratedFDeriv ℝ (k, n).snd (fderiv ℝ ↑f) x‖ ≤\n    1 * ↑(Finset.sup {(k, n + 1)} (schwartzSeminormFamily 𝕜 E F)) f\n[PROOFSTEP]\nsimpa only [schwartzSeminormFamily_apply, Seminorm.comp_apply, Finset.sup_singleton, one_smul,\n  norm_iteratedFDeriv_fderiv, one_mul] using f.le_seminorm 𝕜 k (n + 1) x\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ninst✝² : IsROrC 𝕜\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : SMulCommClass ℝ 𝕜 F\nx✝ : ℕ × ℕ\nk n : ℕ\nf : 𝓢(ℝ, F)\nx : ℝ\n⊢ ‖x‖ ^ (k, n).fst * ‖iteratedFDeriv ℝ (k, n).snd ((fun f => deriv f) ↑f) x‖ ≤\n    1 * ↑(Finset.sup {(k, n + 1)} (schwartzSeminormFamily 𝕜 ℝ F)) f\n[PROOFSTEP]\nsimpa only [Real.norm_eq_abs, Finset.sup_singleton, schwartzSeminormFamily_apply, one_mul,\n  norm_iteratedFDeriv_eq_norm_iteratedDeriv, ← iteratedDeriv_succ'] using f.le_seminorm' 𝕜 k (n + 1) x\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ninst✝² : IsROrC 𝕜\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : SMulCommClass ℝ 𝕜 F\nn : ℕ\nm : Fin (n + 1) → E\nf : 𝓢(E, F)\n⊢ ↑(iteratedPDeriv 𝕜 m) f = ↑(iteratedPDeriv 𝕜 (Fin.init m)) (↑(pderivCLM 𝕜 (m (Fin.last n))) f)\n[PROOFSTEP]\ninduction' n with n IH\n[GOAL]\ncase zero\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ninst✝² : IsROrC 𝕜\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : SMulCommClass ℝ 𝕜 F\nn : ℕ\nm✝ : Fin (n + 1) → E\nf : 𝓢(E, F)\nm : Fin (Nat.zero + 1) → E\n⊢ ↑(iteratedPDeriv 𝕜 m) f = ↑(iteratedPDeriv 𝕜 (Fin.init m)) (↑(pderivCLM 𝕜 (m (Fin.last Nat.zero))) f)\n[PROOFSTEP]\nrw [iteratedPDeriv_zero, iteratedPDeriv_one]\n[GOAL]\ncase zero\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ninst✝² : IsROrC 𝕜\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : SMulCommClass ℝ 𝕜 F\nn : ℕ\nm✝ : Fin (n + 1) → E\nf : 𝓢(E, F)\nm : Fin (Nat.zero + 1) → E\n⊢ ↑(pderivCLM 𝕜 (m 0)) f = ↑(pderivCLM 𝕜 (m (Fin.last Nat.zero))) f\n[PROOFSTEP]\nrfl\n  -- The proof is `∂^{n + 2} = ∂ ∂^{n + 1} = ∂ ∂^n ∂ = ∂^{n+1} ∂`\n[GOAL]\ncase succ\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ninst✝² : IsROrC 𝕜\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : SMulCommClass ℝ 𝕜 F\nn✝ : ℕ\nm✝ : Fin (n✝ + 1) → E\nf : 𝓢(E, F)\nn : ℕ\nIH :\n  ∀ (m : Fin (n + 1) → E),\n    ↑(iteratedPDeriv 𝕜 m) f = ↑(iteratedPDeriv 𝕜 (Fin.init m)) (↑(pderivCLM 𝕜 (m (Fin.last n))) f)\nm : Fin (Nat.succ n + 1) → E\n⊢ ↑(iteratedPDeriv 𝕜 m) f = ↑(iteratedPDeriv 𝕜 (Fin.init m)) (↑(pderivCLM 𝕜 (m (Fin.last (Nat.succ n)))) f)\n[PROOFSTEP]\nhave hmzero : Fin.init m 0 = m 0 := by simp only [Fin.init_def, Fin.castSucc_zero]\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ninst✝² : IsROrC 𝕜\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : SMulCommClass ℝ 𝕜 F\nn✝ : ℕ\nm✝ : Fin (n✝ + 1) → E\nf : 𝓢(E, F)\nn : ℕ\nIH :\n  ∀ (m : Fin (n + 1) → E),\n    ↑(iteratedPDeriv 𝕜 m) f = ↑(iteratedPDeriv 𝕜 (Fin.init m)) (↑(pderivCLM 𝕜 (m (Fin.last n))) f)\nm : Fin (Nat.succ n + 1) → E\n⊢ Fin.init m 0 = m 0\n[PROOFSTEP]\nsimp only [Fin.init_def, Fin.castSucc_zero]\n[GOAL]\ncase succ\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ninst✝² : IsROrC 𝕜\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : SMulCommClass ℝ 𝕜 F\nn✝ : ℕ\nm✝ : Fin (n✝ + 1) → E\nf : 𝓢(E, F)\nn : ℕ\nIH :\n  ∀ (m : Fin (n + 1) → E),\n    ↑(iteratedPDeriv 𝕜 m) f = ↑(iteratedPDeriv 𝕜 (Fin.init m)) (↑(pderivCLM 𝕜 (m (Fin.last n))) f)\nm : Fin (Nat.succ n + 1) → E\nhmzero : Fin.init m 0 = m 0\n⊢ ↑(iteratedPDeriv 𝕜 m) f = ↑(iteratedPDeriv 𝕜 (Fin.init m)) (↑(pderivCLM 𝕜 (m (Fin.last (Nat.succ n)))) f)\n[PROOFSTEP]\nhave hmtail : Fin.tail m (Fin.last n) = m (Fin.last n.succ) := by\n  simp only [Fin.tail_def, Fin.succ_last]\n    -- Porting note: changed to `calc` proof\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ninst✝² : IsROrC 𝕜\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : SMulCommClass ℝ 𝕜 F\nn✝ : ℕ\nm✝ : Fin (n✝ + 1) → E\nf : 𝓢(E, F)\nn : ℕ\nIH :\n  ∀ (m : Fin (n + 1) → E),\n    ↑(iteratedPDeriv 𝕜 m) f = ↑(iteratedPDeriv 𝕜 (Fin.init m)) (↑(pderivCLM 𝕜 (m (Fin.last n))) f)\nm : Fin (Nat.succ n + 1) → E\nhmzero : Fin.init m 0 = m 0\n⊢ Fin.tail m (Fin.last n) = m (Fin.last (Nat.succ n))\n[PROOFSTEP]\nsimp only [Fin.tail_def, Fin.succ_last]\n  -- Porting note: changed to `calc` proof\n[GOAL]\ncase succ\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ninst✝² : IsROrC 𝕜\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : SMulCommClass ℝ 𝕜 F\nn✝ : ℕ\nm✝ : Fin (n✝ + 1) → E\nf : 𝓢(E, F)\nn : ℕ\nIH :\n  ∀ (m : Fin (n + 1) → E),\n    ↑(iteratedPDeriv 𝕜 m) f = ↑(iteratedPDeriv 𝕜 (Fin.init m)) (↑(pderivCLM 𝕜 (m (Fin.last n))) f)\nm : Fin (Nat.succ n + 1) → E\nhmzero : Fin.init m 0 = m 0\nhmtail : Fin.tail m (Fin.last n) = m (Fin.last (Nat.succ n))\n⊢ ↑(iteratedPDeriv 𝕜 m) f = ↑(iteratedPDeriv 𝕜 (Fin.init m)) (↑(pderivCLM 𝕜 (m (Fin.last (Nat.succ n)))) f)\n[PROOFSTEP]\ncalc\n  _ = pderivCLM 𝕜 (m 0) (iteratedPDeriv 𝕜 _ f) := iteratedPDeriv_succ_left _ _ _\n  _ = pderivCLM 𝕜 (m 0) ((iteratedPDeriv 𝕜 _) ((pderivCLM 𝕜 _) f)) :=\n    by\n    congr 1\n    exact IH _\n  _ = _ := by simp only [hmtail, iteratedPDeriv_succ_left, hmzero, Fin.tail_init_eq_init_tail]\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ninst✝² : IsROrC 𝕜\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : SMulCommClass ℝ 𝕜 F\nn✝ : ℕ\nm✝ : Fin (n✝ + 1) → E\nf : 𝓢(E, F)\nn : ℕ\nIH :\n  ∀ (m : Fin (n + 1) → E),\n    ↑(iteratedPDeriv 𝕜 m) f = ↑(iteratedPDeriv 𝕜 (Fin.init m)) (↑(pderivCLM 𝕜 (m (Fin.last n))) f)\nm : Fin (Nat.succ n + 1) → E\nhmzero : Fin.init m 0 = m 0\nhmtail : Fin.tail m (Fin.last n) = m (Fin.last (Nat.succ n))\n⊢ ↑(pderivCLM 𝕜 (m 0)) (↑(iteratedPDeriv 𝕜 (Fin.tail m)) f) =\n    ↑(pderivCLM 𝕜 (m 0)) (↑(iteratedPDeriv 𝕜 ?m.961203) (↑(pderivCLM 𝕜 ?m.962305) f))\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase h.e_6.h\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ninst✝² : IsROrC 𝕜\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : SMulCommClass ℝ 𝕜 F\nn✝ : ℕ\nm✝ : Fin (n✝ + 1) → E\nf : 𝓢(E, F)\nn : ℕ\nIH :\n  ∀ (m : Fin (n + 1) → E),\n    ↑(iteratedPDeriv 𝕜 m) f = ↑(iteratedPDeriv 𝕜 (Fin.init m)) (↑(pderivCLM 𝕜 (m (Fin.last n))) f)\nm : Fin (Nat.succ n + 1) → E\nhmzero : Fin.init m 0 = m 0\nhmtail : Fin.tail m (Fin.last n) = m (Fin.last (Nat.succ n))\n⊢ ↑(iteratedPDeriv 𝕜 (Fin.tail m)) f = ↑(iteratedPDeriv 𝕜 ?m.961203) (↑(pderivCLM 𝕜 ?m.962305) f)\n[PROOFSTEP]\nexact IH _\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ninst✝² : IsROrC 𝕜\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : SMulCommClass ℝ 𝕜 F\nn✝ : ℕ\nm✝ : Fin (n✝ + 1) → E\nf : 𝓢(E, F)\nn : ℕ\nIH :\n  ∀ (m : Fin (n + 1) → E),\n    ↑(iteratedPDeriv 𝕜 m) f = ↑(iteratedPDeriv 𝕜 (Fin.init m)) (↑(pderivCLM 𝕜 (m (Fin.last n))) f)\nm : Fin (Nat.succ n + 1) → E\nhmzero : Fin.init m 0 = m 0\nhmtail : Fin.tail m (Fin.last n) = m (Fin.last (Nat.succ n))\n⊢ ↑(pderivCLM 𝕜 (m 0)) (↑(iteratedPDeriv 𝕜 (Fin.init (Fin.tail m))) (↑(pderivCLM 𝕜 (Fin.tail m (Fin.last n))) f)) =\n    ↑(iteratedPDeriv 𝕜 (Fin.init m)) (↑(pderivCLM 𝕜 (m (Fin.last (Nat.succ n)))) f)\n[PROOFSTEP]\nsimp only [hmtail, iteratedPDeriv_succ_left, hmzero, Fin.tail_init_eq_init_tail]\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ninst✝² : IsROrC 𝕜\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : SMulCommClass ℝ 𝕜 F\nf g : 𝓢(E, F)\n⊢ (fun f => toBoundedContinuousFunction f) (f + g) =\n    (fun f => toBoundedContinuousFunction f) f + (fun f => toBoundedContinuousFunction f) g\n[PROOFSTEP]\next\n[GOAL]\ncase h\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ninst✝² : IsROrC 𝕜\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : SMulCommClass ℝ 𝕜 F\nf g : 𝓢(E, F)\nx✝ : E\n⊢ ↑((fun f => toBoundedContinuousFunction f) (f + g)) x✝ =\n    ↑((fun f => toBoundedContinuousFunction f) f + (fun f => toBoundedContinuousFunction f) g) x✝\n[PROOFSTEP]\nexact add_apply\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ninst✝² : IsROrC 𝕜\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : SMulCommClass ℝ 𝕜 F\na : 𝕜\nf : 𝓢(E, F)\n⊢ AddHom.toFun\n      { toFun := fun f => toBoundedContinuousFunction f,\n        map_add' :=\n          (_ :\n            ∀ (f g : 𝓢(E, F)),\n              (fun f => toBoundedContinuousFunction f) (f + g) =\n                (fun f => toBoundedContinuousFunction f) f + (fun f => toBoundedContinuousFunction f) g) }\n      (a • f) =\n    ↑(RingHom.id 𝕜) a •\n      AddHom.toFun\n        { toFun := fun f => toBoundedContinuousFunction f,\n          map_add' :=\n            (_ :\n              ∀ (f g : 𝓢(E, F)),\n                (fun f => toBoundedContinuousFunction f) (f + g) =\n                  (fun f => toBoundedContinuousFunction f) f + (fun f => toBoundedContinuousFunction f) g) }\n        f\n[PROOFSTEP]\next\n[GOAL]\ncase h\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ninst✝² : IsROrC 𝕜\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : SMulCommClass ℝ 𝕜 F\na : 𝕜\nf : 𝓢(E, F)\nx✝ : E\n⊢ ↑(AddHom.toFun\n          { toFun := fun f => toBoundedContinuousFunction f,\n            map_add' :=\n              (_ :\n                ∀ (f g : 𝓢(E, F)),\n                  (fun f => toBoundedContinuousFunction f) (f + g) =\n                    (fun f => toBoundedContinuousFunction f) f + (fun f => toBoundedContinuousFunction f) g) }\n          (a • f))\n      x✝ =\n    ↑(↑(RingHom.id 𝕜) a •\n          AddHom.toFun\n            { toFun := fun f => toBoundedContinuousFunction f,\n              map_add' :=\n                (_ :\n                  ∀ (f g : 𝓢(E, F)),\n                    (fun f => toBoundedContinuousFunction f) (f + g) =\n                      (fun f => toBoundedContinuousFunction f) f + (fun f => toBoundedContinuousFunction f) g) }\n            f)\n      x✝\n[PROOFSTEP]\nexact smul_apply\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ninst✝² : IsROrC 𝕜\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : SMulCommClass ℝ 𝕜 F\nsrc✝ : 𝓢(E, F) →ₗ[𝕜] E →ᵇ F := toBoundedContinuousFunctionLM 𝕜 E F\n⊢ Continuous\n    { toAddHom := src✝.toAddHom,\n          map_smul' :=\n            (_ :\n              ∀ (r : 𝕜) (x : 𝓢(E, F)),\n                AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id 𝕜) r • AddHom.toFun src✝.toAddHom x) }.toAddHom.toFun\n[PROOFSTEP]\nchange Continuous (toBoundedContinuousFunctionLM 𝕜 E F)\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ninst✝² : IsROrC 𝕜\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : SMulCommClass ℝ 𝕜 F\nsrc✝ : 𝓢(E, F) →ₗ[𝕜] E →ᵇ F := toBoundedContinuousFunctionLM 𝕜 E F\n⊢ Continuous ↑(toBoundedContinuousFunctionLM 𝕜 E F)\n[PROOFSTEP]\nrefine'\n  Seminorm.continuous_from_bounded (schwartz_withSeminorms 𝕜 E F) (norm_withSeminorms 𝕜 (E →ᵇ F)) _ fun _ =>\n    ⟨{0}, 1, fun f => _⟩\n      -- Porting note: Lean failed to find this instance\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ninst✝² : IsROrC 𝕜\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : SMulCommClass ℝ 𝕜 F\nsrc✝ : 𝓢(E, F) →ₗ[𝕜] E →ᵇ F := toBoundedContinuousFunctionLM 𝕜 E F\nx✝ : Fin 1\nf : 𝓢(E, F)\n⊢ (fun f => ↑f) (Seminorm.comp (normSeminorm 𝕜 (E →ᵇ F)) (toBoundedContinuousFunctionLM 𝕜 E F)) f ≤\n    (fun f => ↑f) (1 • Finset.sup {0} (schwartzSeminormFamily 𝕜 E F)) f\n[PROOFSTEP]\nhave : MulAction NNReal (Seminorm 𝕜 𝓢(E, F)) := Seminorm.instDistribMulAction.toMulAction\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ninst✝² : IsROrC 𝕜\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : SMulCommClass ℝ 𝕜 F\nsrc✝ : 𝓢(E, F) →ₗ[𝕜] E →ᵇ F := toBoundedContinuousFunctionLM 𝕜 E F\nx✝ : Fin 1\nf : 𝓢(E, F)\nthis : MulAction NNReal (Seminorm 𝕜 𝓢(E, F))\n⊢ (fun f => ↑f) (Seminorm.comp (normSeminorm 𝕜 (E →ᵇ F)) (toBoundedContinuousFunctionLM 𝕜 E F)) f ≤\n    (fun f => ↑f) (1 • Finset.sup {0} (schwartzSeminormFamily 𝕜 E F)) f\n[PROOFSTEP]\nsimp only [Seminorm.comp_apply, coe_normSeminorm, Finset.sup_singleton, schwartzSeminormFamily_apply_zero,\n  Seminorm.smul_apply, one_smul, ge_iff_le, BoundedContinuousFunction.norm_le (map_nonneg _ _)]\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ninst✝² : IsROrC 𝕜\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : SMulCommClass ℝ 𝕜 F\nsrc✝ : 𝓢(E, F) →ₗ[𝕜] E →ᵇ F := toBoundedContinuousFunctionLM 𝕜 E F\nx✝ : Fin 1\nf : 𝓢(E, F)\nthis : MulAction NNReal (Seminorm 𝕜 𝓢(E, F))\n⊢ ∀ (x : E), ‖↑(↑(toBoundedContinuousFunctionLM 𝕜 E F) f) x‖ ≤ ↑(SchwartzMap.seminorm 𝕜 0 0) f\n[PROOFSTEP]\nintro x\n[GOAL]\n𝕜 : Type u_1\n𝕜' : Type u_2\nD : Type u_3\nE : Type u_4\nF : Type u_5\nG : Type u_6\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ninst✝² : IsROrC 𝕜\ninst✝¹ : NormedSpace 𝕜 F\ninst✝ : SMulCommClass ℝ 𝕜 F\nsrc✝ : 𝓢(E, F) →ₗ[𝕜] E →ᵇ F := toBoundedContinuousFunctionLM 𝕜 E F\nx✝ : Fin 1\nf : 𝓢(E, F)\nthis : MulAction NNReal (Seminorm 𝕜 𝓢(E, F))\nx : E\n⊢ ‖↑(↑(toBoundedContinuousFunctionLM 𝕜 E F) f) x‖ ≤ ↑(SchwartzMap.seminorm 𝕜 0 0) f\n[PROOFSTEP]\nexact norm_le_seminorm 𝕜 _ _\n", "meta": {"mathlib_filename": "Mathlib.Analysis.Distribution.SchwartzSpace", "llama_tokens": 115155, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8221891479496521, "lm_q2_score": 0.647798211152541, "lm_q1q2_score": 0.5326126592708166}}
{"text": "[GOAL]\nJ✝ : Type\ninst✝⁴ : SmallCategory J✝\ninst✝³ : FinCategory J✝\nk : Type v\ninst✝² : Field k\nJ : Type\ninst✝¹ : Fintype J\nZ : J → ModuleCat k\ninst✝ : ∀ (j : J), FiniteDimensional k ↑(Z j)\n⊢ FiniteDimensional k ↑(ModuleCat.of k ((j : J) → ↑(Z j)))\n[PROOFSTEP]\nunfold ModuleCat.of\n[GOAL]\nJ✝ : Type\ninst✝⁴ : SmallCategory J✝\ninst✝³ : FinCategory J✝\nk : Type v\ninst✝² : Field k\nJ : Type\ninst✝¹ : Fintype J\nZ : J → ModuleCat k\ninst✝ : ∀ (j : J), FiniteDimensional k ↑(Z j)\n⊢ FiniteDimensional k ↑(ModuleCat.mk ((j : J) → ↑(Z j)))\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nJ✝ : Type\ninst✝⁴ : SmallCategory J✝\ninst✝³ : FinCategory J✝\nk : Type v\ninst✝² : Field k\nJ : Type\ninst✝¹ : Fintype J\nZ : J → ModuleCat k\ninst✝ : ∀ (j : J), FiniteDimensional k ↑(Z j)\nthis : FiniteDimensional k ↑(ModuleCat.of k ((j : J) → ↑(Z j)))\n⊢ Mono (ModuleCat.piIsoPi fun j => Z j).hom\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nJ : Type\ninst✝² : SmallCategory J\ninst✝¹ : FinCategory J\nk : Type v\ninst✝ : Field k\nF : J ⥤ FGModuleCat k\n⊢ ∀ (j : J), FiniteDimensional k ↑((F ⋙ forget₂ (FGModuleCat k) (ModuleCat k)).obj j)\n[PROOFSTEP]\nintro j\n[GOAL]\nJ : Type\ninst✝² : SmallCategory J\ninst✝¹ : FinCategory J\nk : Type v\ninst✝ : Field k\nF : J ⥤ FGModuleCat k\nj : J\n⊢ FiniteDimensional k ↑((F ⋙ forget₂ (FGModuleCat k) (ModuleCat k)).obj j)\n[PROOFSTEP]\nchange FiniteDimensional k (F.obj j)\n[GOAL]\nJ : Type\ninst✝² : SmallCategory J\ninst✝¹ : FinCategory J\nk : Type v\ninst✝ : Field k\nF : J ⥤ FGModuleCat k\nj : J\n⊢ FiniteDimensional k ↑(F.obj j)\n[PROOFSTEP]\ninfer_instance\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Category.FGModuleCat.Limits", "llama_tokens": 730, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8175744673038222, "lm_q2_score": 0.6513548782017745, "lm_q1q2_score": 0.5325311175715618}}
{"text": "[GOAL]\nα✝ : Type u\nβ : Type v\nα : Type u_1\ninst✝ : Sup α\nsup_comm : ∀ (a b : α), a ⊔ b = b ⊔ a\nsup_assoc : ∀ (a b c : α), a ⊔ b ⊔ c = a ⊔ (b ⊔ c)\nsup_idem : ∀ (a : α), a ⊔ a = a\na b c : α\nhab : a ≤ b\nhbc : b ≤ c\n⊢ a ≤ c\n[PROOFSTEP]\nshow a ⊔ c = c\n[GOAL]\nα✝ : Type u\nβ : Type v\nα : Type u_1\ninst✝ : Sup α\nsup_comm : ∀ (a b : α), a ⊔ b = b ⊔ a\nsup_assoc : ∀ (a b c : α), a ⊔ b ⊔ c = a ⊔ (b ⊔ c)\nsup_idem : ∀ (a : α), a ⊔ a = a\na b c : α\nhab : a ≤ b\nhbc : b ≤ c\n⊢ a ⊔ c = c\n[PROOFSTEP]\nrw [← hbc, ← sup_assoc, hab]\n[GOAL]\nα✝ : Type u\nβ : Type v\nα : Type u_1\ninst✝ : Sup α\nsup_comm : ∀ (a b : α), a ⊔ b = b ⊔ a\nsup_assoc : ∀ (a b c : α), a ⊔ b ⊔ c = a ⊔ (b ⊔ c)\nsup_idem : ∀ (a : α), a ⊔ a = a\na b : α\nhab : a ≤ b\nhba : b ≤ a\n⊢ a = b\n[PROOFSTEP]\nrwa [← hba, sup_comm]\n[GOAL]\nα✝ : Type u\nβ : Type v\nα : Type u_1\ninst✝ : Sup α\nsup_comm : ∀ (a b : α), a ⊔ b = b ⊔ a\nsup_assoc : ∀ (a b c : α), a ⊔ b ⊔ c = a ⊔ (b ⊔ c)\nsup_idem : ∀ (a : α), a ⊔ a = a\na b : α\n⊢ a ⊔ (a ⊔ b) = a ⊔ b\n[PROOFSTEP]\nrw [← sup_assoc, sup_idem]\n[GOAL]\nα✝ : Type u\nβ : Type v\nα : Type u_1\ninst✝ : Sup α\nsup_comm : ∀ (a b : α), a ⊔ b = b ⊔ a\nsup_assoc : ∀ (a b c : α), a ⊔ b ⊔ c = a ⊔ (b ⊔ c)\nsup_idem : ∀ (a : α), a ⊔ a = a\na b : α\n⊢ b ⊔ (a ⊔ b) = a ⊔ b\n[PROOFSTEP]\nrw [sup_comm, sup_assoc, sup_idem]\n[GOAL]\nα✝ : Type u\nβ : Type v\nα : Type u_1\ninst✝ : Sup α\nsup_comm : ∀ (a b : α), a ⊔ b = b ⊔ a\nsup_assoc : ∀ (a b c : α), a ⊔ b ⊔ c = a ⊔ (b ⊔ c)\nsup_idem : ∀ (a : α), a ⊔ a = a\na b c : α\nhac : a ≤ c\nhbc : b ≤ c\n⊢ a ⊔ b ≤ c\n[PROOFSTEP]\nshow (a ⊔ b) ⊔ c = c\n[GOAL]\nα✝ : Type u\nβ : Type v\nα : Type u_1\ninst✝ : Sup α\nsup_comm : ∀ (a b : α), a ⊔ b = b ⊔ a\nsup_assoc : ∀ (a b c : α), a ⊔ b ⊔ c = a ⊔ (b ⊔ c)\nsup_idem : ∀ (a : α), a ⊔ a = a\na b c : α\nhac : a ≤ c\nhbc : b ≤ c\n⊢ a ⊔ b ⊔ c = c\n[PROOFSTEP]\nrwa [sup_assoc, hbc]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : SemilatticeSup α\na b c d : α\n⊢ a ⊔ b ≤ a ∧ a ≤ a ⊔ b ↔ b ≤ a\n[PROOFSTEP]\nsimp [le_rfl]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : SemilatticeSup α\na b c d : α\n⊢ a ⊔ b ≤ b ∧ b ≤ a ⊔ b ↔ a ≤ b\n[PROOFSTEP]\nsimp [le_rfl]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : SemilatticeSup α\na b c d : α\n⊢ a ≤ b ↔ ∃ c, b = a ⊔ c\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type u\nβ : Type v\ninst✝ : SemilatticeSup α\na b c d : α\n⊢ a ≤ b → ∃ c, b = a ⊔ c\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nα : Type u\nβ : Type v\ninst✝ : SemilatticeSup α\na b c d : α\nh : a ≤ b\n⊢ ∃ c, b = a ⊔ c\n[PROOFSTEP]\nexact ⟨b, (sup_eq_right.mpr h).symm⟩\n[GOAL]\ncase mpr\nα : Type u\nβ : Type v\ninst✝ : SemilatticeSup α\na b c d : α\n⊢ (∃ c, b = a ⊔ c) → a ≤ b\n[PROOFSTEP]\nrintro ⟨c, rfl : _ = _ ⊔ _⟩\n[GOAL]\ncase mpr.intro\nα : Type u\nβ : Type v\ninst✝ : SemilatticeSup α\na c✝ d c : α\n⊢ a ≤ a ⊔ c\n[PROOFSTEP]\nexact le_sup_left\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : SemilatticeSup α\na b c d : α\n⊢ a ⊔ a = a\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : SemilatticeSup α\na b c d : α\n⊢ a ⊔ b = b ⊔ a\n[PROOFSTEP]\napply le_antisymm\n[GOAL]\ncase a\nα : Type u\nβ : Type v\ninst✝ : SemilatticeSup α\na b c d : α\n⊢ a ⊔ b ≤ b ⊔ a\n[PROOFSTEP]\nsimp\n[GOAL]\ncase a\nα : Type u\nβ : Type v\ninst✝ : SemilatticeSup α\na b c d : α\n⊢ b ⊔ a ≤ a ⊔ b\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : SemilatticeSup α\na b c d x : α\n⊢ a ⊔ b ⊔ c ≤ x ↔ a ⊔ (b ⊔ c) ≤ x\n[PROOFSTEP]\nsimp only [sup_le_iff]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : SemilatticeSup α\na b c d x : α\n⊢ (a ≤ x ∧ b ≤ x) ∧ c ≤ x ↔ a ≤ x ∧ b ≤ x ∧ c ≤ x\n[PROOFSTEP]\nrw [and_assoc]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : SemilatticeSup α\na✝ b✝ c✝ d a b c : α\n⊢ a ⊔ b ⊔ c = c ⊔ b ⊔ a\n[PROOFSTEP]\nrw [sup_comm, @sup_comm _ _ a, sup_assoc]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : SemilatticeSup α\na b c d : α\n⊢ a ⊔ (a ⊔ b) = a ⊔ b\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : SemilatticeSup α\na b c d : α\n⊢ a ⊔ b ⊔ b = a ⊔ b\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : SemilatticeSup α\na✝ b✝ c✝ d a b c : α\n⊢ a ⊔ (b ⊔ c) = b ⊔ (a ⊔ c)\n[PROOFSTEP]\nrw [← sup_assoc, ← sup_assoc, @sup_comm α _ a]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : SemilatticeSup α\na✝ b✝ c✝ d a b c : α\n⊢ a ⊔ b ⊔ c = a ⊔ c ⊔ b\n[PROOFSTEP]\nrw [sup_assoc, sup_assoc, @sup_comm _ _ b]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : SemilatticeSup α\na✝ b✝ c✝ d✝ a b c d : α\n⊢ a ⊔ b ⊔ (c ⊔ d) = a ⊔ c ⊔ (b ⊔ d)\n[PROOFSTEP]\nrw [sup_assoc, sup_left_comm b, ← sup_assoc]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : SemilatticeSup α\na✝ b✝ c✝ d a b c : α\n⊢ a ⊔ (b ⊔ c) = a ⊔ b ⊔ (a ⊔ c)\n[PROOFSTEP]\nrw [sup_sup_sup_comm, sup_idem]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : SemilatticeSup α\na✝ b✝ c✝ d a b c : α\n⊢ a ⊔ b ⊔ c = a ⊔ c ⊔ (b ⊔ c)\n[PROOFSTEP]\nrw [sup_sup_sup_comm, sup_idem]\n[GOAL]\nα✝ : Type u\nβ : Type v\ninst✝ : SemilatticeSup α✝\na b c✝ d : α✝\nα : Type u_1\nA B : SemilatticeSup α\nH : ∀ (x y : α), x ≤ y ↔ x ≤ y\nx y c : α\n⊢ x ⊔ y ≤ c ↔ x ⊔ y ≤ c\n[PROOFSTEP]\nsimp only [sup_le_iff]\n[GOAL]\nα✝ : Type u\nβ : Type v\ninst✝ : SemilatticeSup α✝\na b c✝ d : α✝\nα : Type u_1\nA B : SemilatticeSup α\nH : ∀ (x y : α), x ≤ y ↔ x ≤ y\nx y c : α\n⊢ x ⊔ y ≤ c ↔ x ≤ c ∧ y ≤ c\n[PROOFSTEP]\nrw [← H, @sup_le_iff α A, H, H]\n[GOAL]\nα✝ : Type u\nβ : Type v\ninst✝ : SemilatticeSup α✝\na b c d : α✝\nα : Type u_1\nA B : SemilatticeSup α\nH : ∀ (x y : α), x ≤ y ↔ x ≤ y\n⊢ A = B\n[PROOFSTEP]\nhave ss : A.toSup = B.toSup := by ext; apply SemilatticeSup.ext_sup H\n[GOAL]\nα✝ : Type u\nβ : Type v\ninst✝ : SemilatticeSup α✝\na b c d : α✝\nα : Type u_1\nA B : SemilatticeSup α\nH : ∀ (x y : α), x ≤ y ↔ x ≤ y\n⊢ toSup = toSup\n[PROOFSTEP]\next\n[GOAL]\ncase sup.h.h\nα✝ : Type u\nβ : Type v\ninst✝ : SemilatticeSup α✝\na b c d : α✝\nα : Type u_1\nA B : SemilatticeSup α\nH : ∀ (x y : α), x ≤ y ↔ x ≤ y\nx✝¹ x✝ : α\n⊢ x✝¹ ⊔ x✝ = x✝¹ ⊔ x✝\n[PROOFSTEP]\napply SemilatticeSup.ext_sup H\n[GOAL]\nα✝ : Type u\nβ : Type v\ninst✝ : SemilatticeSup α✝\na b c d : α✝\nα : Type u_1\nA B : SemilatticeSup α\nH : ∀ (x y : α), x ≤ y ↔ x ≤ y\nss : toSup = toSup\n⊢ A = B\n[PROOFSTEP]\ncases A\n[GOAL]\ncase mk\nα✝ : Type u\nβ : Type v\ninst✝ : SemilatticeSup α✝\na b c d : α✝\nα : Type u_1\nB : SemilatticeSup α\ntoSup✝ : Sup α\ntoPartialOrder✝ : PartialOrder α\nle_sup_left✝ : ∀ (a b : α), a ≤ a ⊔ b\nle_sup_right✝ : ∀ (a b : α), b ≤ a ⊔ b\nsup_le✝ : ∀ (a b c : α), a ≤ c → b ≤ c → a ⊔ b ≤ c\nH : ∀ (x y : α), x ≤ y ↔ x ≤ y\nss : toSup = toSup\n⊢ mk le_sup_left✝ le_sup_right✝ sup_le✝ = B\n[PROOFSTEP]\ncases B\n[GOAL]\ncase mk.mk\nα✝ : Type u\nβ : Type v\ninst✝ : SemilatticeSup α✝\na b c d : α✝\nα : Type u_1\ntoSup✝¹ : Sup α\ntoPartialOrder✝¹ : PartialOrder α\nle_sup_left✝¹ : ∀ (a b : α), a ≤ a ⊔ b\nle_sup_right✝¹ : ∀ (a b : α), b ≤ a ⊔ b\nsup_le✝¹ : ∀ (a b c : α), a ≤ c → b ≤ c → a ⊔ b ≤ c\ntoSup✝ : Sup α\ntoPartialOrder✝ : PartialOrder α\nle_sup_left✝ : ∀ (a b : α), a ≤ a ⊔ b\nle_sup_right✝ : ∀ (a b : α), b ≤ a ⊔ b\nsup_le✝ : ∀ (a b c : α), a ≤ c → b ≤ c → a ⊔ b ≤ c\nH : ∀ (x y : α), x ≤ y ↔ x ≤ y\nss : toSup = toSup\n⊢ mk le_sup_left✝¹ le_sup_right✝¹ sup_le✝¹ = mk le_sup_left✝ le_sup_right✝ sup_le✝\n[PROOFSTEP]\ncases PartialOrder.ext H\n[GOAL]\ncase mk.mk.refl\nα✝ : Type u\nβ : Type v\ninst✝ : SemilatticeSup α✝\na b c d : α✝\nα : Type u_1\ntoSup✝¹ : Sup α\ntoPartialOrder✝ : PartialOrder α\nle_sup_left✝¹ : ∀ (a b : α), a ≤ a ⊔ b\nle_sup_right✝¹ : ∀ (a b : α), b ≤ a ⊔ b\nsup_le✝¹ : ∀ (a b c : α), a ≤ c → b ≤ c → a ⊔ b ≤ c\ntoSup✝ : Sup α\nle_sup_left✝ : ∀ (a b : α), a ≤ a ⊔ b\nle_sup_right✝ : ∀ (a b : α), b ≤ a ⊔ b\nsup_le✝ : ∀ (a b c : α), a ≤ c → b ≤ c → a ⊔ b ≤ c\nH : ∀ (x y : α), x ≤ y ↔ x ≤ y\nss : toSup = toSup\n⊢ mk le_sup_left✝¹ le_sup_right✝¹ sup_le✝¹ = mk le_sup_left✝ le_sup_right✝ sup_le✝\n[PROOFSTEP]\ncongr\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : SemilatticeInf α\na b c d : α\n⊢ a ⊓ b ≤ a ∧ a ≤ a ⊓ b ↔ a ≤ b\n[PROOFSTEP]\nsimp [le_rfl]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : SemilatticeInf α\na b c d : α\n⊢ a ⊓ b ≤ b ∧ b ≤ a ⊓ b ↔ b ≤ a\n[PROOFSTEP]\nsimp [le_rfl]\n[GOAL]\nα✝ : Type u\nβ : Type v\ninst✝ : SemilatticeInf α✝\na b c✝ d : α✝\nα : Type u_1\nA B : SemilatticeInf α\nH : ∀ (x y : α), x ≤ y ↔ x ≤ y\nx y c : α\n⊢ c ≤ x ⊓ y ↔ c ≤ x ⊓ y\n[PROOFSTEP]\nsimp only [le_inf_iff]\n[GOAL]\nα✝ : Type u\nβ : Type v\ninst✝ : SemilatticeInf α✝\na b c✝ d : α✝\nα : Type u_1\nA B : SemilatticeInf α\nH : ∀ (x y : α), x ≤ y ↔ x ≤ y\nx y c : α\n⊢ c ≤ x ⊓ y ↔ c ≤ x ∧ c ≤ y\n[PROOFSTEP]\nrw [← H, @le_inf_iff α A, H, H]\n[GOAL]\nα✝ : Type u\nβ : Type v\ninst✝ : SemilatticeInf α✝\na b c d : α✝\nα : Type u_1\nA B : SemilatticeInf α\nH : ∀ (x y : α), x ≤ y ↔ x ≤ y\n⊢ A = B\n[PROOFSTEP]\nhave ss : A.toInf = B.toInf := by ext; apply SemilatticeInf.ext_inf H\n[GOAL]\nα✝ : Type u\nβ : Type v\ninst✝ : SemilatticeInf α✝\na b c d : α✝\nα : Type u_1\nA B : SemilatticeInf α\nH : ∀ (x y : α), x ≤ y ↔ x ≤ y\n⊢ toInf = toInf\n[PROOFSTEP]\next\n[GOAL]\ncase inf.h.h\nα✝ : Type u\nβ : Type v\ninst✝ : SemilatticeInf α✝\na b c d : α✝\nα : Type u_1\nA B : SemilatticeInf α\nH : ∀ (x y : α), x ≤ y ↔ x ≤ y\nx✝¹ x✝ : α\n⊢ x✝¹ ⊓ x✝ = x✝¹ ⊓ x✝\n[PROOFSTEP]\napply SemilatticeInf.ext_inf H\n[GOAL]\nα✝ : Type u\nβ : Type v\ninst✝ : SemilatticeInf α✝\na b c d : α✝\nα : Type u_1\nA B : SemilatticeInf α\nH : ∀ (x y : α), x ≤ y ↔ x ≤ y\nss : toInf = toInf\n⊢ A = B\n[PROOFSTEP]\ncases A\n[GOAL]\ncase mk\nα✝ : Type u\nβ : Type v\ninst✝ : SemilatticeInf α✝\na b c d : α✝\nα : Type u_1\nB : SemilatticeInf α\ntoInf✝ : Inf α\ntoPartialOrder✝ : PartialOrder α\ninf_le_left✝ : ∀ (a b : α), a ⊓ b ≤ a\ninf_le_right✝ : ∀ (a b : α), a ⊓ b ≤ b\nle_inf✝ : ∀ (a b c : α), a ≤ b → a ≤ c → a ≤ b ⊓ c\nH : ∀ (x y : α), x ≤ y ↔ x ≤ y\nss : toInf = toInf\n⊢ mk inf_le_left✝ inf_le_right✝ le_inf✝ = B\n[PROOFSTEP]\ncases B\n[GOAL]\ncase mk.mk\nα✝ : Type u\nβ : Type v\ninst✝ : SemilatticeInf α✝\na b c d : α✝\nα : Type u_1\ntoInf✝¹ : Inf α\ntoPartialOrder✝¹ : PartialOrder α\ninf_le_left✝¹ : ∀ (a b : α), a ⊓ b ≤ a\ninf_le_right✝¹ : ∀ (a b : α), a ⊓ b ≤ b\nle_inf✝¹ : ∀ (a b c : α), a ≤ b → a ≤ c → a ≤ b ⊓ c\ntoInf✝ : Inf α\ntoPartialOrder✝ : PartialOrder α\ninf_le_left✝ : ∀ (a b : α), a ⊓ b ≤ a\ninf_le_right✝ : ∀ (a b : α), a ⊓ b ≤ b\nle_inf✝ : ∀ (a b c : α), a ≤ b → a ≤ c → a ≤ b ⊓ c\nH : ∀ (x y : α), x ≤ y ↔ x ≤ y\nss : toInf = toInf\n⊢ mk inf_le_left✝¹ inf_le_right✝¹ le_inf✝¹ = mk inf_le_left✝ inf_le_right✝ le_inf✝\n[PROOFSTEP]\ncases PartialOrder.ext H\n[GOAL]\ncase mk.mk.refl\nα✝ : Type u\nβ : Type v\ninst✝ : SemilatticeInf α✝\na b c d : α✝\nα : Type u_1\ntoInf✝¹ : Inf α\ntoPartialOrder✝ : PartialOrder α\ninf_le_left✝¹ : ∀ (a b : α), a ⊓ b ≤ a\ninf_le_right✝¹ : ∀ (a b : α), a ⊓ b ≤ b\nle_inf✝¹ : ∀ (a b c : α), a ≤ b → a ≤ c → a ≤ b ⊓ c\ntoInf✝ : Inf α\ninf_le_left✝ : ∀ (a b : α), a ⊓ b ≤ a\ninf_le_right✝ : ∀ (a b : α), a ⊓ b ≤ b\nle_inf✝ : ∀ (a b c : α), a ≤ b → a ≤ c → a ≤ b ⊓ c\nH : ∀ (x y : α), x ≤ y ↔ x ≤ y\nss : toInf = toInf\n⊢ mk inf_le_left✝¹ inf_le_right✝¹ le_inf✝¹ = mk inf_le_left✝ inf_le_right✝ le_inf✝\n[PROOFSTEP]\ncongr\n[GOAL]\nα✝ : Type u\nβ : Type v\nα : Type u_1\ninst✝ : Inf α\ninf_comm : ∀ (a b : α), a ⊓ b = b ⊓ a\ninf_assoc : ∀ (a b c : α), a ⊓ b ⊓ c = a ⊓ (b ⊓ c)\ninf_idem : ∀ (a : α), a ⊓ a = a\n⊢ SemilatticeInf α\n[PROOFSTEP]\nhaveI : SemilatticeSup αᵒᵈ := SemilatticeSup.mk' inf_comm inf_assoc inf_idem\n[GOAL]\nα✝ : Type u\nβ : Type v\nα : Type u_1\ninst✝ : Inf α\ninf_comm : ∀ (a b : α), a ⊓ b = b ⊓ a\ninf_assoc : ∀ (a b c : α), a ⊓ b ⊓ c = a ⊓ (b ⊓ c)\ninf_idem : ∀ (a : α), a ⊓ a = a\nthis : SemilatticeSup αᵒᵈ\n⊢ SemilatticeInf α\n[PROOFSTEP]\nhaveI i := OrderDual.semilatticeInf αᵒᵈ\n[GOAL]\nα✝ : Type u\nβ : Type v\nα : Type u_1\ninst✝ : Inf α\ninf_comm : ∀ (a b : α), a ⊓ b = b ⊓ a\ninf_assoc : ∀ (a b c : α), a ⊓ b ⊓ c = a ⊓ (b ⊓ c)\ninf_idem : ∀ (a : α), a ⊓ a = a\nthis : SemilatticeSup αᵒᵈ\ni : SemilatticeInf αᵒᵈᵒᵈ\n⊢ SemilatticeInf α\n[PROOFSTEP]\nexact i\n[GOAL]\nα✝ : Type u\nβ : Type v\nα : Type u_1\ninst✝¹ : Sup α\ninst✝ : Inf α\nsup_comm : ∀ (a b : α), a ⊔ b = b ⊔ a\nsup_assoc : ∀ (a b c : α), a ⊔ b ⊔ c = a ⊔ (b ⊔ c)\nsup_idem : ∀ (a : α), a ⊔ a = a\ninf_comm : ∀ (a b : α), a ⊓ b = b ⊓ a\ninf_assoc : ∀ (a b c : α), a ⊓ b ⊓ c = a ⊓ (b ⊓ c)\ninf_idem : ∀ (a : α), a ⊓ a = a\nsup_inf_self : ∀ (a b : α), a ⊔ a ⊓ b = a\ninf_sup_self : ∀ (a b : α), a ⊓ (a ⊔ b) = a\na b : α\nh : a ⊔ b = b\n⊢ b ⊓ a = a\n[PROOFSTEP]\nrw [← h, inf_comm, inf_sup_self]\n[GOAL]\nα✝ : Type u\nβ : Type v\nα : Type u_1\ninst✝¹ : Sup α\ninst✝ : Inf α\nsup_comm : ∀ (a b : α), a ⊔ b = b ⊔ a\nsup_assoc : ∀ (a b c : α), a ⊔ b ⊔ c = a ⊔ (b ⊔ c)\nsup_idem : ∀ (a : α), a ⊔ a = a\ninf_comm : ∀ (a b : α), a ⊓ b = b ⊓ a\ninf_assoc : ∀ (a b c : α), a ⊓ b ⊓ c = a ⊓ (b ⊓ c)\ninf_idem : ∀ (a : α), a ⊓ a = a\nsup_inf_self : ∀ (a b : α), a ⊔ a ⊓ b = a\ninf_sup_self : ∀ (a b : α), a ⊓ (a ⊔ b) = a\na b : α\nh : b ⊓ a = a\n⊢ a ⊔ b = b\n[PROOFSTEP]\nrw [← h, sup_comm, sup_inf_self]\n[GOAL]\nα✝ : Type u\nβ : Type v\nα : Type u_1\ninst✝¹ : Sup α\ninst✝ : Inf α\nsup_comm : ∀ (a b : α), a ⊔ b = b ⊔ a\nsup_assoc : ∀ (a b c : α), a ⊔ b ⊔ c = a ⊔ (b ⊔ c)\ninf_comm : ∀ (a b : α), a ⊓ b = b ⊓ a\ninf_assoc : ∀ (a b c : α), a ⊓ b ⊓ c = a ⊓ (b ⊓ c)\nsup_inf_self : ∀ (a b : α), a ⊔ a ⊓ b = a\ninf_sup_self : ∀ (a b : α), a ⊓ (a ⊔ b) = a\nb : α\n⊢ b ⊔ b = b ⊔ b ⊓ (b ⊔ b)\n[PROOFSTEP]\nrw [inf_sup_self]\n[GOAL]\nα✝ : Type u\nβ : Type v\nα : Type u_1\ninst✝¹ : Sup α\ninst✝ : Inf α\nsup_comm : ∀ (a b : α), a ⊔ b = b ⊔ a\nsup_assoc : ∀ (a b c : α), a ⊔ b ⊔ c = a ⊔ (b ⊔ c)\ninf_comm : ∀ (a b : α), a ⊓ b = b ⊓ a\ninf_assoc : ∀ (a b c : α), a ⊓ b ⊓ c = a ⊓ (b ⊓ c)\nsup_inf_self : ∀ (a b : α), a ⊔ a ⊓ b = a\ninf_sup_self : ∀ (a b : α), a ⊓ (a ⊔ b) = a\nb : α\n⊢ b ⊔ b ⊓ (b ⊔ b) = b\n[PROOFSTEP]\nrw [sup_inf_self]\n[GOAL]\nα✝ : Type u\nβ : Type v\nα : Type u_1\ninst✝¹ : Sup α\ninst✝ : Inf α\nsup_comm : ∀ (a b : α), a ⊔ b = b ⊔ a\nsup_assoc : ∀ (a b c : α), a ⊔ b ⊔ c = a ⊔ (b ⊔ c)\ninf_comm : ∀ (a b : α), a ⊓ b = b ⊓ a\ninf_assoc : ∀ (a b c : α), a ⊓ b ⊓ c = a ⊓ (b ⊓ c)\nsup_inf_self : ∀ (a b : α), a ⊔ a ⊓ b = a\ninf_sup_self : ∀ (a b : α), a ⊓ (a ⊔ b) = a\nsup_idem : ∀ (b : α), b ⊔ b = b\nb : α\n⊢ b ⊓ b = b ⊓ (b ⊔ b ⊓ b)\n[PROOFSTEP]\nrw [sup_inf_self]\n[GOAL]\nα✝ : Type u\nβ : Type v\nα : Type u_1\ninst✝¹ : Sup α\ninst✝ : Inf α\nsup_comm : ∀ (a b : α), a ⊔ b = b ⊔ a\nsup_assoc : ∀ (a b c : α), a ⊔ b ⊔ c = a ⊔ (b ⊔ c)\ninf_comm : ∀ (a b : α), a ⊓ b = b ⊓ a\ninf_assoc : ∀ (a b c : α), a ⊓ b ⊓ c = a ⊓ (b ⊓ c)\nsup_inf_self : ∀ (a b : α), a ⊔ a ⊓ b = a\ninf_sup_self : ∀ (a b : α), a ⊓ (a ⊔ b) = a\nsup_idem : ∀ (b : α), b ⊔ b = b\nb : α\n⊢ b ⊓ (b ⊔ b ⊓ b) = b\n[PROOFSTEP]\nrw [inf_sup_self]\n[GOAL]\nα✝ : Type u\nβ : Type v\nα : Type u_1\ninst✝¹ : Sup α\ninst✝ : Inf α\nsup_comm : ∀ (a b : α), a ⊔ b = b ⊔ a\nsup_assoc : ∀ (a b c : α), a ⊔ b ⊔ c = a ⊔ (b ⊔ c)\ninf_comm : ∀ (a b : α), a ⊓ b = b ⊓ a\ninf_assoc : ∀ (a b c : α), a ⊓ b ⊓ c = a ⊓ (b ⊓ c)\nsup_inf_self : ∀ (a b : α), a ⊔ a ⊓ b = a\ninf_sup_self : ∀ (a b : α), a ⊓ (a ⊔ b) = a\nsup_idem : ∀ (b : α), b ⊔ b = b\ninf_idem : ∀ (b : α), b ⊓ b = b\nsemilatt_inf_inst : SemilatticeInf α := SemilatticeInf.mk' inf_comm inf_assoc inf_idem\nsemilatt_sup_inst : SemilatticeSup α := SemilatticeSup.mk' sup_comm sup_assoc sup_idem\npartial_order_eq : SemilatticeSup.toPartialOrder = SemilatticeInf.toPartialOrder\na b : α\n⊢ a ⊓ b ≤ a\n[PROOFSTEP]\nrw [partial_order_eq]\n[GOAL]\nα✝ : Type u\nβ : Type v\nα : Type u_1\ninst✝¹ : Sup α\ninst✝ : Inf α\nsup_comm : ∀ (a b : α), a ⊔ b = b ⊔ a\nsup_assoc : ∀ (a b c : α), a ⊔ b ⊔ c = a ⊔ (b ⊔ c)\ninf_comm : ∀ (a b : α), a ⊓ b = b ⊓ a\ninf_assoc : ∀ (a b c : α), a ⊓ b ⊓ c = a ⊓ (b ⊓ c)\nsup_inf_self : ∀ (a b : α), a ⊔ a ⊓ b = a\ninf_sup_self : ∀ (a b : α), a ⊓ (a ⊔ b) = a\nsup_idem : ∀ (b : α), b ⊔ b = b\ninf_idem : ∀ (b : α), b ⊓ b = b\nsemilatt_inf_inst : SemilatticeInf α := SemilatticeInf.mk' inf_comm inf_assoc inf_idem\nsemilatt_sup_inst : SemilatticeSup α := SemilatticeSup.mk' sup_comm sup_assoc sup_idem\npartial_order_eq : SemilatticeSup.toPartialOrder = SemilatticeInf.toPartialOrder\na b : α\n⊢ a ⊓ b ≤ a\n[PROOFSTEP]\napply inf_le_left\n[GOAL]\nα✝ : Type u\nβ : Type v\nα : Type u_1\ninst✝¹ : Sup α\ninst✝ : Inf α\nsup_comm : ∀ (a b : α), a ⊔ b = b ⊔ a\nsup_assoc : ∀ (a b c : α), a ⊔ b ⊔ c = a ⊔ (b ⊔ c)\ninf_comm : ∀ (a b : α), a ⊓ b = b ⊓ a\ninf_assoc : ∀ (a b c : α), a ⊓ b ⊓ c = a ⊓ (b ⊓ c)\nsup_inf_self : ∀ (a b : α), a ⊔ a ⊓ b = a\ninf_sup_self : ∀ (a b : α), a ⊓ (a ⊔ b) = a\nsup_idem : ∀ (b : α), b ⊔ b = b\ninf_idem : ∀ (b : α), b ⊓ b = b\nsemilatt_inf_inst : SemilatticeInf α := SemilatticeInf.mk' inf_comm inf_assoc inf_idem\nsemilatt_sup_inst : SemilatticeSup α := SemilatticeSup.mk' sup_comm sup_assoc sup_idem\npartial_order_eq : SemilatticeSup.toPartialOrder = SemilatticeInf.toPartialOrder\na b : α\n⊢ a ⊓ b ≤ b\n[PROOFSTEP]\nrw [partial_order_eq]\n[GOAL]\nα✝ : Type u\nβ : Type v\nα : Type u_1\ninst✝¹ : Sup α\ninst✝ : Inf α\nsup_comm : ∀ (a b : α), a ⊔ b = b ⊔ a\nsup_assoc : ∀ (a b c : α), a ⊔ b ⊔ c = a ⊔ (b ⊔ c)\ninf_comm : ∀ (a b : α), a ⊓ b = b ⊓ a\ninf_assoc : ∀ (a b c : α), a ⊓ b ⊓ c = a ⊓ (b ⊓ c)\nsup_inf_self : ∀ (a b : α), a ⊔ a ⊓ b = a\ninf_sup_self : ∀ (a b : α), a ⊓ (a ⊔ b) = a\nsup_idem : ∀ (b : α), b ⊔ b = b\ninf_idem : ∀ (b : α), b ⊓ b = b\nsemilatt_inf_inst : SemilatticeInf α := SemilatticeInf.mk' inf_comm inf_assoc inf_idem\nsemilatt_sup_inst : SemilatticeSup α := SemilatticeSup.mk' sup_comm sup_assoc sup_idem\npartial_order_eq : SemilatticeSup.toPartialOrder = SemilatticeInf.toPartialOrder\na b : α\n⊢ a ⊓ b ≤ b\n[PROOFSTEP]\napply inf_le_right\n[GOAL]\nα✝ : Type u\nβ : Type v\nα : Type u_1\ninst✝¹ : Sup α\ninst✝ : Inf α\nsup_comm : ∀ (a b : α), a ⊔ b = b ⊔ a\nsup_assoc : ∀ (a b c : α), a ⊔ b ⊔ c = a ⊔ (b ⊔ c)\ninf_comm : ∀ (a b : α), a ⊓ b = b ⊓ a\ninf_assoc : ∀ (a b c : α), a ⊓ b ⊓ c = a ⊓ (b ⊓ c)\nsup_inf_self : ∀ (a b : α), a ⊔ a ⊓ b = a\ninf_sup_self : ∀ (a b : α), a ⊓ (a ⊔ b) = a\nsup_idem : ∀ (b : α), b ⊔ b = b\ninf_idem : ∀ (b : α), b ⊓ b = b\nsemilatt_inf_inst : SemilatticeInf α := SemilatticeInf.mk' inf_comm inf_assoc inf_idem\nsemilatt_sup_inst : SemilatticeSup α := SemilatticeSup.mk' sup_comm sup_assoc sup_idem\npartial_order_eq : SemilatticeSup.toPartialOrder = SemilatticeInf.toPartialOrder\na b c : α\n⊢ a ≤ b → a ≤ c → a ≤ b ⊓ c\n[PROOFSTEP]\nrw [partial_order_eq]\n[GOAL]\nα✝ : Type u\nβ : Type v\nα : Type u_1\ninst✝¹ : Sup α\ninst✝ : Inf α\nsup_comm : ∀ (a b : α), a ⊔ b = b ⊔ a\nsup_assoc : ∀ (a b c : α), a ⊔ b ⊔ c = a ⊔ (b ⊔ c)\ninf_comm : ∀ (a b : α), a ⊓ b = b ⊓ a\ninf_assoc : ∀ (a b c : α), a ⊓ b ⊓ c = a ⊓ (b ⊓ c)\nsup_inf_self : ∀ (a b : α), a ⊔ a ⊓ b = a\ninf_sup_self : ∀ (a b : α), a ⊓ (a ⊔ b) = a\nsup_idem : ∀ (b : α), b ⊔ b = b\ninf_idem : ∀ (b : α), b ⊓ b = b\nsemilatt_inf_inst : SemilatticeInf α := SemilatticeInf.mk' inf_comm inf_assoc inf_idem\nsemilatt_sup_inst : SemilatticeSup α := SemilatticeSup.mk' sup_comm sup_assoc sup_idem\npartial_order_eq : SemilatticeSup.toPartialOrder = SemilatticeInf.toPartialOrder\na b c : α\n⊢ a ≤ b → a ≤ c → a ≤ b ⊓ c\n[PROOFSTEP]\napply le_inf\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : Lattice α\na b c d : α\n⊢ a ⊔ b ≤ a ⊓ b ↔ a = b\n[PROOFSTEP]\nsimp [le_antisymm_iff, and_comm]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : Lattice α\na b c d : α\n⊢ a ⊓ b = a ⊔ b ↔ a = b\n[PROOFSTEP]\nrw [← inf_le_sup.ge_iff_eq, sup_le_inf]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : Lattice α\na b c d : α\n⊢ a ⊓ b < a ⊔ b ↔ a ≠ b\n[PROOFSTEP]\nrw [inf_le_sup.lt_iff_ne, Ne.def, inf_eq_sup]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : Lattice α\na b c d : α\n⊢ a ⊓ b = c ∧ a ⊔ b = c ↔ a = c ∧ b = c\n[PROOFSTEP]\nrefine' ⟨fun h ↦ _, _⟩\n[GOAL]\ncase refine'_1\nα : Type u\nβ : Type v\ninst✝ : Lattice α\na b c d : α\nh : a ⊓ b = c ∧ a ⊔ b = c\n⊢ a = c ∧ b = c\ncase refine'_2 α : Type u β : Type v inst✝ : Lattice α a b c d : α ⊢ a = c ∧ b = c → a ⊓ b = c ∧ a ⊔ b = c\n[PROOFSTEP]\n{ obtain rfl := sup_eq_inf.1 (h.2.trans h.1.symm)\n  simpa using h\n}\n[GOAL]\ncase refine'_1\nα : Type u\nβ : Type v\ninst✝ : Lattice α\na b c d : α\nh : a ⊓ b = c ∧ a ⊔ b = c\n⊢ a = c ∧ b = c\n[PROOFSTEP]\nobtain rfl := sup_eq_inf.1 (h.2.trans h.1.symm)\n[GOAL]\ncase refine'_1\nα : Type u\nβ : Type v\ninst✝ : Lattice α\na c d : α\nh : a ⊓ a = c ∧ a ⊔ a = c\n⊢ a = c ∧ a = c\n[PROOFSTEP]\nsimpa using h\n[GOAL]\ncase refine'_2\nα : Type u\nβ : Type v\ninst✝ : Lattice α\na b c d : α\n⊢ a = c ∧ b = c → a ⊓ b = c ∧ a ⊔ b = c\n[PROOFSTEP]\n{ rintro ⟨rfl, rfl⟩\n  exact ⟨inf_idem, sup_idem⟩\n}\n[GOAL]\ncase refine'_2\nα : Type u\nβ : Type v\ninst✝ : Lattice α\na b c d : α\n⊢ a = c ∧ b = c → a ⊓ b = c ∧ a ⊔ b = c\n[PROOFSTEP]\nrintro ⟨rfl, rfl⟩\n[GOAL]\ncase refine'_2.intro\nα : Type u\nβ : Type v\ninst✝ : Lattice α\nb d : α\n⊢ b ⊓ b = b ∧ b ⊔ b = b\n[PROOFSTEP]\nexact ⟨inf_idem, sup_idem⟩\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : Lattice α\na b c d : α\n⊢ a ⊓ (a ⊔ b) = a\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : Lattice α\na b c d : α\n⊢ a ⊔ a ⊓ b = a\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : Lattice α\na b c d : α\n⊢ a ⊔ b = b ↔ a ⊓ b = a\n[PROOFSTEP]\nrw [sup_eq_right, ← inf_eq_left]\n[GOAL]\nα✝ : Type u\nβ : Type v\ninst✝ : Lattice α✝\na b c d : α✝\nα : Type u_1\nA B : Lattice α\nH : ∀ (x y : α), x ≤ y ↔ x ≤ y\n⊢ A = B\n[PROOFSTEP]\ncases A\n[GOAL]\ncase mk\nα✝ : Type u\nβ : Type v\ninst✝ : Lattice α✝\na b c d : α✝\nα : Type u_1\nB : Lattice α\ntoSemilatticeSup✝ : SemilatticeSup α\ntoInf✝ : Inf α\ninf_le_left✝ : ∀ (a b : α), a ⊓ b ≤ a\ninf_le_right✝ : ∀ (a b : α), a ⊓ b ≤ b\nle_inf✝ : ∀ (a b c : α), a ≤ b → a ≤ c → a ≤ b ⊓ c\nH : ∀ (x y : α), x ≤ y ↔ x ≤ y\n⊢ mk inf_le_left✝ inf_le_right✝ le_inf✝ = B\n[PROOFSTEP]\ncases B\n[GOAL]\ncase mk.mk\nα✝ : Type u\nβ : Type v\ninst✝ : Lattice α✝\na b c d : α✝\nα : Type u_1\ntoSemilatticeSup✝¹ : SemilatticeSup α\ntoInf✝¹ : Inf α\ninf_le_left✝¹ : ∀ (a b : α), a ⊓ b ≤ a\ninf_le_right✝¹ : ∀ (a b : α), a ⊓ b ≤ b\nle_inf✝¹ : ∀ (a b c : α), a ≤ b → a ≤ c → a ≤ b ⊓ c\ntoSemilatticeSup✝ : SemilatticeSup α\ntoInf✝ : Inf α\ninf_le_left✝ : ∀ (a b : α), a ⊓ b ≤ a\ninf_le_right✝ : ∀ (a b : α), a ⊓ b ≤ b\nle_inf✝ : ∀ (a b c : α), a ≤ b → a ≤ c → a ≤ b ⊓ c\nH : ∀ (x y : α), x ≤ y ↔ x ≤ y\n⊢ mk inf_le_left✝¹ inf_le_right✝¹ le_inf✝¹ = mk inf_le_left✝ inf_le_right✝ le_inf✝\n[PROOFSTEP]\ncases SemilatticeSup.ext H\n[GOAL]\ncase mk.mk.refl\nα✝ : Type u\nβ : Type v\ninst✝ : Lattice α✝\na b c d : α✝\nα : Type u_1\ntoSemilatticeSup✝ : SemilatticeSup α\ntoInf✝¹ : Inf α\ninf_le_left✝¹ : ∀ (a b : α), a ⊓ b ≤ a\ninf_le_right✝¹ : ∀ (a b : α), a ⊓ b ≤ b\nle_inf✝¹ : ∀ (a b c : α), a ≤ b → a ≤ c → a ≤ b ⊓ c\ntoInf✝ : Inf α\ninf_le_left✝ : ∀ (a b : α), a ⊓ b ≤ a\ninf_le_right✝ : ∀ (a b : α), a ⊓ b ≤ b\nle_inf✝ : ∀ (a b c : α), a ≤ b → a ≤ c → a ≤ b ⊓ c\nH : ∀ (x y : α), x ≤ y ↔ x ≤ y\n⊢ mk inf_le_left✝¹ inf_le_right✝¹ le_inf✝¹ = mk inf_le_left✝ inf_le_right✝ le_inf✝\n[PROOFSTEP]\ncases SemilatticeInf.ext H\n[GOAL]\ncase mk.mk.refl.refl\nα✝ : Type u\nβ : Type v\ninst✝ : Lattice α✝\na b c d : α✝\nα : Type u_1\ntoSemilatticeSup✝ : SemilatticeSup α\ntoInf✝ : Inf α\ninf_le_left✝¹ : ∀ (a b : α), a ⊓ b ≤ a\ninf_le_right✝¹ : ∀ (a b : α), a ⊓ b ≤ b\nle_inf✝¹ : ∀ (a b c : α), a ≤ b → a ≤ c → a ≤ b ⊓ c\ninf_le_left✝ : ∀ (a b : α), a ⊓ b ≤ a\ninf_le_right✝ : ∀ (a b : α), a ⊓ b ≤ b\nle_inf✝ : ∀ (a b c : α), a ≤ b → a ≤ c → a ≤ b ⊓ c\nH : ∀ (x y : α), x ≤ y ↔ x ≤ y\n⊢ mk inf_le_left✝¹ inf_le_right✝¹ le_inf✝¹ = mk inf_le_left✝ inf_le_right✝ le_inf✝\n[PROOFSTEP]\ncongr\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : DistribLattice α\nx y z : α\n⊢ y ⊓ z ⊔ x = (y ⊔ x) ⊓ (z ⊔ x)\n[PROOFSTEP]\nsimp only [sup_inf_left, fun y : α => @sup_comm α _ y x, eq_self_iff_true]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : DistribLattice α\nx y z : α\n⊢ x ⊓ (y ⊔ z) = x ⊓ (x ⊔ z) ⊓ (y ⊔ z)\n[PROOFSTEP]\nrw [inf_sup_self]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : DistribLattice α\nx y z : α\n⊢ x ⊓ (x ⊔ z) ⊓ (y ⊔ z) = x ⊓ (x ⊓ y ⊔ z)\n[PROOFSTEP]\nsimp only [inf_assoc, sup_inf_right, eq_self_iff_true]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : DistribLattice α\nx y z : α\n⊢ x ⊓ (x ⊓ y ⊔ z) = (x ⊔ x ⊓ y) ⊓ (x ⊓ y ⊔ z)\n[PROOFSTEP]\nrw [sup_inf_self]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : DistribLattice α\nx y z : α\n⊢ (x ⊔ x ⊓ y) ⊓ (x ⊓ y ⊔ z) = (x ⊓ y ⊔ x) ⊓ (x ⊓ y ⊔ z)\n[PROOFSTEP]\nrw [sup_comm]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : DistribLattice α\nx y z : α\n⊢ (x ⊓ y ⊔ x) ⊓ (x ⊓ y ⊔ z) = x ⊓ y ⊔ x ⊓ z\n[PROOFSTEP]\nrw [sup_inf_left]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : DistribLattice α\nx y z : α\n⊢ (y ⊔ z) ⊓ x = y ⊓ x ⊔ z ⊓ x\n[PROOFSTEP]\nsimp only [inf_sup_left, fun y : α => @inf_comm α _ y x, eq_self_iff_true]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : DistribLattice α\nx y z : α\nh₁ : x ⊓ z ≤ y ⊓ z\nh₂ : x ⊔ z ≤ y ⊔ z\n⊢ y ⊓ z ⊔ x = (y ⊔ x) ⊓ (x ⊔ z)\n[PROOFSTEP]\nrw [sup_inf_right, @sup_comm _ _ x]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : LinearOrder α\na✝ b✝ c d a b : α\np : α → Prop\nha : p a\nhb : p b\nh : a ≤ b\n⊢ p (a ⊔ b)\n[PROOFSTEP]\nrwa [sup_eq_right.2 h]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : LinearOrder α\na✝ b✝ c d a b : α\np : α → Prop\nha : p a\nhb : p b\nh : b ≤ a\n⊢ p (a ⊔ b)\n[PROOFSTEP]\nrwa [sup_eq_left.2 h]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : LinearOrder α\na b c d : α\n⊢ a ≤ b ⊔ c ↔ a ≤ b ∨ a ≤ c\n[PROOFSTEP]\nexact\n  ⟨fun h => (le_total c b).imp (fun bc => by rwa [sup_eq_left.2 bc] at h ) (fun bc => by rwa [sup_eq_right.2 bc] at h ),\n    fun h => h.elim le_sup_of_le_left le_sup_of_le_right⟩\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : LinearOrder α\na b c d : α\nh : a ≤ b ⊔ c\nbc : c ≤ b\n⊢ a ≤ b\n[PROOFSTEP]\nrwa [sup_eq_left.2 bc] at h \n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : LinearOrder α\na b c d : α\nh : a ≤ b ⊔ c\nbc : b ≤ c\n⊢ a ≤ c\n[PROOFSTEP]\nrwa [sup_eq_right.2 bc] at h \n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : LinearOrder α\na b c d : α\n⊢ a < b ⊔ c ↔ a < b ∨ a < c\n[PROOFSTEP]\nexact\n  ⟨fun h => (le_total c b).imp (fun bc => by rwa [sup_eq_left.2 bc] at h ) (fun bc => by rwa [sup_eq_right.2 bc] at h ),\n    fun h => h.elim lt_sup_of_lt_left lt_sup_of_lt_right⟩\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : LinearOrder α\na b c d : α\nh : a < b ⊔ c\nbc : c ≤ b\n⊢ a < b\n[PROOFSTEP]\nrwa [sup_eq_left.2 bc] at h \n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : LinearOrder α\na b c d : α\nh : a < b ⊔ c\nbc : b ≤ c\n⊢ a < c\n[PROOFSTEP]\nrwa [sup_eq_right.2 bc] at h \n[GOAL]\nα : Type u\nβ : Type v\ninst✝² : SemilatticeSup α\ninst✝¹ : DecidableRel fun x x_1 => x ≤ x_1\ninst✝ : IsTotal α fun x x_1 => x ≤ x_1\n⊢ (fun x x_1 => x ⊔ x_1) = maxDefault\n[PROOFSTEP]\next x y\n[GOAL]\ncase h.h\nα : Type u\nβ : Type v\ninst✝² : SemilatticeSup α\ninst✝¹ : DecidableRel fun x x_1 => x ≤ x_1\ninst✝ : IsTotal α fun x x_1 => x ≤ x_1\nx y : α\n⊢ x ⊔ y = maxDefault x y\n[PROOFSTEP]\nunfold maxDefault\n[GOAL]\ncase h.h\nα : Type u\nβ : Type v\ninst✝² : SemilatticeSup α\ninst✝¹ : DecidableRel fun x x_1 => x ≤ x_1\ninst✝ : IsTotal α fun x x_1 => x ≤ x_1\nx y : α\n⊢ x ⊔ y = if x ≤ y then y else x\n[PROOFSTEP]\nsplit_ifs with h'\n[GOAL]\ncase pos\nα : Type u\nβ : Type v\ninst✝² : SemilatticeSup α\ninst✝¹ : DecidableRel fun x x_1 => x ≤ x_1\ninst✝ : IsTotal α fun x x_1 => x ≤ x_1\nx y : α\nh' : x ≤ y\n⊢ x ⊔ y = y\ncase neg\nα : Type u\nβ : Type v\ninst✝² : SemilatticeSup α\ninst✝¹ : DecidableRel fun x x_1 => x ≤ x_1\ninst✝ : IsTotal α fun x x_1 => x ≤ x_1\nx y : α\nh' : ¬x ≤ y\n⊢ x ⊔ y = x\n[PROOFSTEP]\nexacts [sup_of_le_right h', sup_of_le_left $ (total_of (· ≤ ·) x y).resolve_left h']\n[GOAL]\nα : Type u\nβ : Type v\ninst✝² : SemilatticeInf α\ninst✝¹ : DecidableRel fun x x_1 => x ≤ x_1\ninst✝ : IsTotal α fun x x_1 => x ≤ x_1\n⊢ (fun x x_1 => x ⊓ x_1) = minDefault\n[PROOFSTEP]\next x y\n[GOAL]\ncase h.h\nα : Type u\nβ : Type v\ninst✝² : SemilatticeInf α\ninst✝¹ : DecidableRel fun x x_1 => x ≤ x_1\ninst✝ : IsTotal α fun x x_1 => x ≤ x_1\nx y : α\n⊢ x ⊓ y = minDefault x y\n[PROOFSTEP]\nunfold minDefault\n[GOAL]\ncase h.h\nα : Type u\nβ : Type v\ninst✝² : SemilatticeInf α\ninst✝¹ : DecidableRel fun x x_1 => x ≤ x_1\ninst✝ : IsTotal α fun x x_1 => x ≤ x_1\nx y : α\n⊢ x ⊓ y = if x ≤ y then x else y\n[PROOFSTEP]\nsplit_ifs with h'\n[GOAL]\ncase pos\nα : Type u\nβ : Type v\ninst✝² : SemilatticeInf α\ninst✝¹ : DecidableRel fun x x_1 => x ≤ x_1\ninst✝ : IsTotal α fun x x_1 => x ≤ x_1\nx y : α\nh' : x ≤ y\n⊢ x ⊓ y = x\ncase neg\nα : Type u\nβ : Type v\ninst✝² : SemilatticeInf α\ninst✝¹ : DecidableRel fun x x_1 => x ≤ x_1\ninst✝ : IsTotal α fun x x_1 => x ≤ x_1\nx y : α\nh' : ¬x ≤ y\n⊢ x ⊓ y = y\n[PROOFSTEP]\nexacts [inf_of_le_left h', inf_of_le_right $ (total_of (· ≤ ·) x y).resolve_left h']\n[GOAL]\nα✝ : Type u\nβ : Type v\nα : Type u\ninst✝⁴ : Lattice α\ninst✝³ : DecidableEq α\ninst✝² : DecidableRel fun x x_1 => x ≤ x_1\ninst✝¹ : DecidableRel fun x x_1 => x < x_1\ninst✝ : IsTotal α fun x x_1 => x ≤ x_1\nsrc✝ : Lattice α := inst✝⁴\n⊢ ∀ (a b : α), min a b = if a ≤ b then a else b\n[PROOFSTEP]\nexact congr_fun₂ inf_eq_minDefault\n[GOAL]\nα✝ : Type u\nβ : Type v\nα : Type u\ninst✝⁴ : Lattice α\ninst✝³ : DecidableEq α\ninst✝² : DecidableRel fun x x_1 => x ≤ x_1\ninst✝¹ : DecidableRel fun x x_1 => x < x_1\ninst✝ : IsTotal α fun x x_1 => x ≤ x_1\nsrc✝ : Lattice α := inst✝⁴\n⊢ ∀ (a b : α), max a b = if a ≤ b then b else a\n[PROOFSTEP]\nexact congr_fun₂ sup_eq_maxDefault\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : DecidableEq ι\ninst✝ : (i : ι) → SemilatticeSup (π i)\nf : (i : ι) → π i\ni : ι\na b : π i\nj : ι\n⊢ update f i (a ⊔ b) j = (update f i a ⊔ update f i b) j\n[PROOFSTEP]\nobtain rfl | hji := eq_or_ne j i\n[GOAL]\ncase inl\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : DecidableEq ι\ninst✝ : (i : ι) → SemilatticeSup (π i)\nf : (i : ι) → π i\nj : ι\na b : π j\n⊢ update f j (a ⊔ b) j = (update f j a ⊔ update f j b) j\n[PROOFSTEP]\nsimp [update_noteq, *]\n[GOAL]\ncase inr\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : DecidableEq ι\ninst✝ : (i : ι) → SemilatticeSup (π i)\nf : (i : ι) → π i\ni : ι\na b : π i\nj : ι\nhji : j ≠ i\n⊢ update f i (a ⊔ b) j = (update f i a ⊔ update f i b) j\n[PROOFSTEP]\nsimp [update_noteq, *]\n[GOAL]\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : DecidableEq ι\ninst✝ : (i : ι) → SemilatticeInf (π i)\nf : (i : ι) → π i\ni : ι\na b : π i\nj : ι\n⊢ update f i (a ⊓ b) j = (update f i a ⊓ update f i b) j\n[PROOFSTEP]\nobtain rfl | hji := eq_or_ne j i\n[GOAL]\ncase inl\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : DecidableEq ι\ninst✝ : (i : ι) → SemilatticeInf (π i)\nf : (i : ι) → π i\nj : ι\na b : π j\n⊢ update f j (a ⊓ b) j = (update f j a ⊓ update f j b) j\n[PROOFSTEP]\nsimp [update_noteq, *]\n[GOAL]\ncase inr\nα : Type u\nβ : Type v\nι : Type u_1\nπ : ι → Type u_2\ninst✝¹ : DecidableEq ι\ninst✝ : (i : ι) → SemilatticeInf (π i)\nf : (i : ι) → π i\ni : ι\na b : π i\nj : ι\nhji : j ≠ i\n⊢ update f i (a ⊓ b) j = (update f i a ⊓ update f i b) j\n[PROOFSTEP]\nsimp [update_noteq, *]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝¹ : SemilatticeInf α\ninst✝ : SemilatticeInf β\nf : α → β\nh : ∀ (x y : α), f (x ⊓ y) = f x ⊓ f y\nx y : α\nhxy : x ≤ y\n⊢ f x ⊓ f y = f x\n[PROOFSTEP]\nrw [← h, inf_eq_left.2 hxy]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝¹ : LinearOrder α\ninst✝ : SemilatticeSup β\nf : α → β\nhf : Monotone f\nx y : α\nh : x ≤ y\n⊢ f (x ⊔ y) = f x ⊔ f y\n[PROOFSTEP]\nsimp only [h, hf h, sup_of_le_right]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝¹ : LinearOrder α\ninst✝ : SemilatticeSup β\nf : α → β\nhf : Monotone f\nx y : α\nh : y ≤ x\n⊢ f (x ⊔ y) = f x ⊔ f y\n[PROOFSTEP]\nsimp only [h, hf h, sup_of_le_left]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝¹ : Sup α\ninst✝ : SemilatticeSup β\nf : α → β\nhf_inj : Injective f\nmap_sup : ∀ (a b : α), f (a ⊔ b) = f a ⊔ f b\nsrc✝ : PartialOrder α := PartialOrder.lift f hf_inj\na b : α\n⊢ a ≤ a ⊔ b\n[PROOFSTEP]\nchange f a ≤ f (a ⊔ b)\n[GOAL]\nα : Type u\nβ : Type v\ninst✝¹ : Sup α\ninst✝ : SemilatticeSup β\nf : α → β\nhf_inj : Injective f\nmap_sup : ∀ (a b : α), f (a ⊔ b) = f a ⊔ f b\nsrc✝ : PartialOrder α := PartialOrder.lift f hf_inj\na b : α\n⊢ f a ≤ f (a ⊔ b)\n[PROOFSTEP]\nrw [map_sup]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝¹ : Sup α\ninst✝ : SemilatticeSup β\nf : α → β\nhf_inj : Injective f\nmap_sup : ∀ (a b : α), f (a ⊔ b) = f a ⊔ f b\nsrc✝ : PartialOrder α := PartialOrder.lift f hf_inj\na b : α\n⊢ f a ≤ f a ⊔ f b\n[PROOFSTEP]\nexact le_sup_left\n[GOAL]\nα : Type u\nβ : Type v\ninst✝¹ : Sup α\ninst✝ : SemilatticeSup β\nf : α → β\nhf_inj : Injective f\nmap_sup : ∀ (a b : α), f (a ⊔ b) = f a ⊔ f b\nsrc✝ : PartialOrder α := PartialOrder.lift f hf_inj\na b : α\n⊢ b ≤ a ⊔ b\n[PROOFSTEP]\nchange f b ≤ f (a ⊔ b)\n[GOAL]\nα : Type u\nβ : Type v\ninst✝¹ : Sup α\ninst✝ : SemilatticeSup β\nf : α → β\nhf_inj : Injective f\nmap_sup : ∀ (a b : α), f (a ⊔ b) = f a ⊔ f b\nsrc✝ : PartialOrder α := PartialOrder.lift f hf_inj\na b : α\n⊢ f b ≤ f (a ⊔ b)\n[PROOFSTEP]\nrw [map_sup]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝¹ : Sup α\ninst✝ : SemilatticeSup β\nf : α → β\nhf_inj : Injective f\nmap_sup : ∀ (a b : α), f (a ⊔ b) = f a ⊔ f b\nsrc✝ : PartialOrder α := PartialOrder.lift f hf_inj\na b : α\n⊢ f b ≤ f a ⊔ f b\n[PROOFSTEP]\nexact le_sup_right\n[GOAL]\nα : Type u\nβ : Type v\ninst✝¹ : Sup α\ninst✝ : SemilatticeSup β\nf : α → β\nhf_inj : Injective f\nmap_sup : ∀ (a b : α), f (a ⊔ b) = f a ⊔ f b\nsrc✝ : PartialOrder α := PartialOrder.lift f hf_inj\na b c : α\nha : a ≤ c\nhb : b ≤ c\n⊢ a ⊔ b ≤ c\n[PROOFSTEP]\nchange f (a ⊔ b) ≤ f c\n[GOAL]\nα : Type u\nβ : Type v\ninst✝¹ : Sup α\ninst✝ : SemilatticeSup β\nf : α → β\nhf_inj : Injective f\nmap_sup : ∀ (a b : α), f (a ⊔ b) = f a ⊔ f b\nsrc✝ : PartialOrder α := PartialOrder.lift f hf_inj\na b c : α\nha : a ≤ c\nhb : b ≤ c\n⊢ f (a ⊔ b) ≤ f c\n[PROOFSTEP]\nrw [map_sup]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝¹ : Sup α\ninst✝ : SemilatticeSup β\nf : α → β\nhf_inj : Injective f\nmap_sup : ∀ (a b : α), f (a ⊔ b) = f a ⊔ f b\nsrc✝ : PartialOrder α := PartialOrder.lift f hf_inj\na b c : α\nha : a ≤ c\nhb : b ≤ c\n⊢ f a ⊔ f b ≤ f c\n[PROOFSTEP]\nexact sup_le ha hb\n[GOAL]\nα : Type u\nβ : Type v\ninst✝¹ : Inf α\ninst✝ : SemilatticeInf β\nf : α → β\nhf_inj : Injective f\nmap_inf : ∀ (a b : α), f (a ⊓ b) = f a ⊓ f b\nsrc✝ : PartialOrder α := PartialOrder.lift f hf_inj\na b : α\n⊢ a ⊓ b ≤ a\n[PROOFSTEP]\nchange f (a ⊓ b) ≤ f a\n[GOAL]\nα : Type u\nβ : Type v\ninst✝¹ : Inf α\ninst✝ : SemilatticeInf β\nf : α → β\nhf_inj : Injective f\nmap_inf : ∀ (a b : α), f (a ⊓ b) = f a ⊓ f b\nsrc✝ : PartialOrder α := PartialOrder.lift f hf_inj\na b : α\n⊢ f (a ⊓ b) ≤ f a\n[PROOFSTEP]\nrw [map_inf]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝¹ : Inf α\ninst✝ : SemilatticeInf β\nf : α → β\nhf_inj : Injective f\nmap_inf : ∀ (a b : α), f (a ⊓ b) = f a ⊓ f b\nsrc✝ : PartialOrder α := PartialOrder.lift f hf_inj\na b : α\n⊢ f a ⊓ f b ≤ f a\n[PROOFSTEP]\nexact inf_le_left\n[GOAL]\nα : Type u\nβ : Type v\ninst✝¹ : Inf α\ninst✝ : SemilatticeInf β\nf : α → β\nhf_inj : Injective f\nmap_inf : ∀ (a b : α), f (a ⊓ b) = f a ⊓ f b\nsrc✝ : PartialOrder α := PartialOrder.lift f hf_inj\na b : α\n⊢ a ⊓ b ≤ b\n[PROOFSTEP]\nchange f (a ⊓ b) ≤ f b\n[GOAL]\nα : Type u\nβ : Type v\ninst✝¹ : Inf α\ninst✝ : SemilatticeInf β\nf : α → β\nhf_inj : Injective f\nmap_inf : ∀ (a b : α), f (a ⊓ b) = f a ⊓ f b\nsrc✝ : PartialOrder α := PartialOrder.lift f hf_inj\na b : α\n⊢ f (a ⊓ b) ≤ f b\n[PROOFSTEP]\nrw [map_inf]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝¹ : Inf α\ninst✝ : SemilatticeInf β\nf : α → β\nhf_inj : Injective f\nmap_inf : ∀ (a b : α), f (a ⊓ b) = f a ⊓ f b\nsrc✝ : PartialOrder α := PartialOrder.lift f hf_inj\na b : α\n⊢ f a ⊓ f b ≤ f b\n[PROOFSTEP]\nexact inf_le_right\n[GOAL]\nα : Type u\nβ : Type v\ninst✝¹ : Inf α\ninst✝ : SemilatticeInf β\nf : α → β\nhf_inj : Injective f\nmap_inf : ∀ (a b : α), f (a ⊓ b) = f a ⊓ f b\nsrc✝ : PartialOrder α := PartialOrder.lift f hf_inj\na b c : α\nha : a ≤ b\nhb : a ≤ c\n⊢ a ≤ b ⊓ c\n[PROOFSTEP]\nchange f a ≤ f (b ⊓ c)\n[GOAL]\nα : Type u\nβ : Type v\ninst✝¹ : Inf α\ninst✝ : SemilatticeInf β\nf : α → β\nhf_inj : Injective f\nmap_inf : ∀ (a b : α), f (a ⊓ b) = f a ⊓ f b\nsrc✝ : PartialOrder α := PartialOrder.lift f hf_inj\na b c : α\nha : a ≤ b\nhb : a ≤ c\n⊢ f a ≤ f (b ⊓ c)\n[PROOFSTEP]\nrw [map_inf]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝¹ : Inf α\ninst✝ : SemilatticeInf β\nf : α → β\nhf_inj : Injective f\nmap_inf : ∀ (a b : α), f (a ⊓ b) = f a ⊓ f b\nsrc✝ : PartialOrder α := PartialOrder.lift f hf_inj\na b c : α\nha : a ≤ b\nhb : a ≤ c\n⊢ f a ≤ f b ⊓ f c\n[PROOFSTEP]\nexact le_inf ha hb\n[GOAL]\nα : Type u\nβ : Type v\ninst✝² : Sup α\ninst✝¹ : Inf α\ninst✝ : DistribLattice β\nf : α → β\nhf_inj : Injective f\nmap_sup : ∀ (a b : α), f (a ⊔ b) = f a ⊔ f b\nmap_inf : ∀ (a b : α), f (a ⊓ b) = f a ⊓ f b\nsrc✝ : Lattice α := Injective.lattice f hf_inj map_sup map_inf\na b c : α\n⊢ (a ⊔ b) ⊓ (a ⊔ c) ≤ a ⊔ b ⊓ c\n[PROOFSTEP]\nchange f ((a ⊔ b) ⊓ (a ⊔ c)) ≤ f (a ⊔ b ⊓ c)\n[GOAL]\nα : Type u\nβ : Type v\ninst✝² : Sup α\ninst✝¹ : Inf α\ninst✝ : DistribLattice β\nf : α → β\nhf_inj : Injective f\nmap_sup : ∀ (a b : α), f (a ⊔ b) = f a ⊔ f b\nmap_inf : ∀ (a b : α), f (a ⊓ b) = f a ⊓ f b\nsrc✝ : Lattice α := Injective.lattice f hf_inj map_sup map_inf\na b c : α\n⊢ f ((a ⊔ b) ⊓ (a ⊔ c)) ≤ f (a ⊔ b ⊓ c)\n[PROOFSTEP]\nrw [map_inf, map_sup, map_sup, map_sup, map_inf]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝² : Sup α\ninst✝¹ : Inf α\ninst✝ : DistribLattice β\nf : α → β\nhf_inj : Injective f\nmap_sup : ∀ (a b : α), f (a ⊔ b) = f a ⊔ f b\nmap_inf : ∀ (a b : α), f (a ⊓ b) = f a ⊓ f b\nsrc✝ : Lattice α := Injective.lattice f hf_inj map_sup map_inf\na b c : α\n⊢ (f a ⊔ f b) ⊓ (f a ⊔ f c) ≤ f a ⊔ f b ⊓ f c\n[PROOFSTEP]\nexact le_sup_inf\n", "meta": {"mathlib_filename": "Mathlib.Order.Lattice", "llama_tokens": 21368, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8311430520409023, "lm_q2_score": 0.6406358548398982, "lm_q1q2_score": 0.5324600396384654}}
{"text": "[GOAL]\nR : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nM' : Type u_5\nN' : Type u_6\nι : Type u_7\nκ : Type u_8\nτ : Type u_9\nι' : Type u_10\nκ' : Type u_11\ninst✝¹⁸ : DecidableEq ι\ninst✝¹⁷ : DecidableEq κ\ninst✝¹⁶ : DecidableEq τ\ninst✝¹⁵ : Fintype ι\ninst✝¹⁴ : Fintype κ\ninst✝¹³ : Fintype τ\ninst✝¹² : Fintype ι'\ninst✝¹¹ : Fintype κ'\ninst✝¹⁰ : CommRing R\ninst✝⁹ : AddCommGroup M\ninst✝⁸ : AddCommGroup N\ninst✝⁷ : AddCommGroup P\ninst✝⁶ : AddCommGroup M'\ninst✝⁵ : AddCommGroup N'\ninst✝⁴ : Module R M\ninst✝³ : Module R N\ninst✝² : Module R P\ninst✝¹ : Module R M'\ninst✝ : Module R N'\nbM : Basis ι R M\nbN : Basis κ R N\nbP : Basis τ R P\nbM' : Basis ι' R M'\nbN' : Basis κ' R N'\nf : M →ₗ[R] M'\ng : N →ₗ[R] N'\n⊢ ↑(toMatrix (Basis.tensorProduct bM bN) (Basis.tensorProduct bM' bN')) (map f g) =\n    kroneckerMap (fun x x_1 => x * x_1) (↑(toMatrix bM bM') f) (↑(toMatrix bN bN') g)\n[PROOFSTEP]\next ⟨i, j⟩ ⟨i', j'⟩\n[GOAL]\ncase a.mk.h.mk\nR : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nM' : Type u_5\nN' : Type u_6\nι : Type u_7\nκ : Type u_8\nτ : Type u_9\nι' : Type u_10\nκ' : Type u_11\ninst✝¹⁸ : DecidableEq ι\ninst✝¹⁷ : DecidableEq κ\ninst✝¹⁶ : DecidableEq τ\ninst✝¹⁵ : Fintype ι\ninst✝¹⁴ : Fintype κ\ninst✝¹³ : Fintype τ\ninst✝¹² : Fintype ι'\ninst✝¹¹ : Fintype κ'\ninst✝¹⁰ : CommRing R\ninst✝⁹ : AddCommGroup M\ninst✝⁸ : AddCommGroup N\ninst✝⁷ : AddCommGroup P\ninst✝⁶ : AddCommGroup M'\ninst✝⁵ : AddCommGroup N'\ninst✝⁴ : Module R M\ninst✝³ : Module R N\ninst✝² : Module R P\ninst✝¹ : Module R M'\ninst✝ : Module R N'\nbM : Basis ι R M\nbN : Basis κ R N\nbP : Basis τ R P\nbM' : Basis ι' R M'\nbN' : Basis κ' R N'\nf : M →ₗ[R] M'\ng : N →ₗ[R] N'\ni : ι'\nj : κ'\ni' : ι\nj' : κ\n⊢ ↑(toMatrix (Basis.tensorProduct bM bN) (Basis.tensorProduct bM' bN')) (map f g) (i, j) (i', j') =\n    kroneckerMap (fun x x_1 => x * x_1) (↑(toMatrix bM bM') f) (↑(toMatrix bN bN') g) (i, j) (i', j')\n[PROOFSTEP]\nsimp_rw [Matrix.kroneckerMap_apply, toMatrix_apply, Basis.tensorProduct_apply, TensorProduct.map_tmul,\n  Basis.tensorProduct_repr_tmul_apply]\n[GOAL]\nR : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nM' : Type u_5\nN' : Type u_6\nι : Type u_7\nκ : Type u_8\nτ : Type u_9\nι' : Type u_10\nκ' : Type u_11\ninst✝¹⁸ : DecidableEq ι\ninst✝¹⁷ : DecidableEq κ\ninst✝¹⁶ : DecidableEq τ\ninst✝¹⁵ : Fintype ι\ninst✝¹⁴ : Fintype κ\ninst✝¹³ : Fintype τ\ninst✝¹² : Fintype ι'\ninst✝¹¹ : Fintype κ'\ninst✝¹⁰ : CommRing R\ninst✝⁹ : AddCommGroup M\ninst✝⁸ : AddCommGroup N\ninst✝⁷ : AddCommGroup P\ninst✝⁶ : AddCommGroup M'\ninst✝⁵ : AddCommGroup N'\ninst✝⁴ : Module R M\ninst✝³ : Module R N\ninst✝² : Module R P\ninst✝¹ : Module R M'\ninst✝ : Module R N'\nbM : Basis ι R M\nbN : Basis κ R N\nbP : Basis τ R P\nbM' : Basis ι' R M'\nbN' : Basis κ' R N'\nA : Matrix ι' ι R\nB : Matrix κ' κ R\n⊢ ↑(toLin (Basis.tensorProduct bM bN) (Basis.tensorProduct bM' bN')) (kroneckerMap (fun x x_1 => x * x_1) A B) =\n    TensorProduct.map (↑(toLin bM bM') A) (↑(toLin bN bN') B)\n[PROOFSTEP]\nrw [← LinearEquiv.eq_symm_apply, toLin_symm, TensorProduct.toMatrix_map, toMatrix_toLin, toMatrix_toLin]\n[GOAL]\nR : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nM' : Type u_5\nN' : Type u_6\nι : Type u_7\nκ : Type u_8\nτ : Type u_9\nι' : Type u_10\nκ' : Type u_11\ninst✝¹⁸ : DecidableEq ι\ninst✝¹⁷ : DecidableEq κ\ninst✝¹⁶ : DecidableEq τ\ninst✝¹⁵ : Fintype ι\ninst✝¹⁴ : Fintype κ\ninst✝¹³ : Fintype τ\ninst✝¹² : Fintype ι'\ninst✝¹¹ : Fintype κ'\ninst✝¹⁰ : CommRing R\ninst✝⁹ : AddCommGroup M\ninst✝⁸ : AddCommGroup N\ninst✝⁷ : AddCommGroup P\ninst✝⁶ : AddCommGroup M'\ninst✝⁵ : AddCommGroup N'\ninst✝⁴ : Module R M\ninst✝³ : Module R N\ninst✝² : Module R P\ninst✝¹ : Module R M'\ninst✝ : Module R N'\nbM : Basis ι R M\nbN : Basis κ R N\nbP : Basis τ R P\nbM' : Basis ι' R M'\nbN' : Basis κ' R N'\n⊢ ↑(toMatrix (Basis.tensorProduct bM bN) (Basis.tensorProduct bN bM)) ↑(TensorProduct.comm R M N) =\n    submatrix 1 Prod.swap _root_.id\n[PROOFSTEP]\next ⟨i, j⟩ ⟨i', j'⟩\n[GOAL]\ncase a.mk.h.mk\nR : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nM' : Type u_5\nN' : Type u_6\nι : Type u_7\nκ : Type u_8\nτ : Type u_9\nι' : Type u_10\nκ' : Type u_11\ninst✝¹⁸ : DecidableEq ι\ninst✝¹⁷ : DecidableEq κ\ninst✝¹⁶ : DecidableEq τ\ninst✝¹⁵ : Fintype ι\ninst✝¹⁴ : Fintype κ\ninst✝¹³ : Fintype τ\ninst✝¹² : Fintype ι'\ninst✝¹¹ : Fintype κ'\ninst✝¹⁰ : CommRing R\ninst✝⁹ : AddCommGroup M\ninst✝⁸ : AddCommGroup N\ninst✝⁷ : AddCommGroup P\ninst✝⁶ : AddCommGroup M'\ninst✝⁵ : AddCommGroup N'\ninst✝⁴ : Module R M\ninst✝³ : Module R N\ninst✝² : Module R P\ninst✝¹ : Module R M'\ninst✝ : Module R N'\nbM : Basis ι R M\nbN : Basis κ R N\nbP : Basis τ R P\nbM' : Basis ι' R M'\nbN' : Basis κ' R N'\ni : κ\nj i' : ι\nj' : κ\n⊢ ↑(toMatrix (Basis.tensorProduct bM bN) (Basis.tensorProduct bN bM)) ↑(TensorProduct.comm R M N) (i, j) (i', j') =\n    submatrix 1 Prod.swap _root_.id (i, j) (i', j')\n[PROOFSTEP]\nsimp_rw [toMatrix_apply, Basis.tensorProduct_apply, LinearEquiv.coe_coe, TensorProduct.comm_tmul,\n  Basis.tensorProduct_repr_tmul_apply, Matrix.submatrix_apply, Prod.swap_prod_mk, id.def, Basis.repr_self_apply,\n  Matrix.one_apply, Prod.ext_iff, ite_and, @eq_comm _ i', @eq_comm _ j']\n[GOAL]\ncase a.mk.h.mk\nR : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nM' : Type u_5\nN' : Type u_6\nι : Type u_7\nκ : Type u_8\nτ : Type u_9\nι' : Type u_10\nκ' : Type u_11\ninst✝¹⁸ : DecidableEq ι\ninst✝¹⁷ : DecidableEq κ\ninst✝¹⁶ : DecidableEq τ\ninst✝¹⁵ : Fintype ι\ninst✝¹⁴ : Fintype κ\ninst✝¹³ : Fintype τ\ninst✝¹² : Fintype ι'\ninst✝¹¹ : Fintype κ'\ninst✝¹⁰ : CommRing R\ninst✝⁹ : AddCommGroup M\ninst✝⁸ : AddCommGroup N\ninst✝⁷ : AddCommGroup P\ninst✝⁶ : AddCommGroup M'\ninst✝⁵ : AddCommGroup N'\ninst✝⁴ : Module R M\ninst✝³ : Module R N\ninst✝² : Module R P\ninst✝¹ : Module R M'\ninst✝ : Module R N'\nbM : Basis ι R M\nbN : Basis κ R N\nbP : Basis τ R P\nbM' : Basis ι' R M'\nbN' : Basis κ' R N'\ni : κ\nj i' : ι\nj' : κ\n⊢ ((if i = j' then 1 else 0) * if j = i' then 1 else 0) = if j = i' then if i = j' then 1 else 0 else 0\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nR : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nM' : Type u_5\nN' : Type u_6\nι : Type u_7\nκ : Type u_8\nτ : Type u_9\nι' : Type u_10\nκ' : Type u_11\ninst✝¹⁸ : DecidableEq ι\ninst✝¹⁷ : DecidableEq κ\ninst✝¹⁶ : DecidableEq τ\ninst✝¹⁵ : Fintype ι\ninst✝¹⁴ : Fintype κ\ninst✝¹³ : Fintype τ\ninst✝¹² : Fintype ι'\ninst✝¹¹ : Fintype κ'\ninst✝¹⁰ : CommRing R\ninst✝⁹ : AddCommGroup M\ninst✝⁸ : AddCommGroup N\ninst✝⁷ : AddCommGroup P\ninst✝⁶ : AddCommGroup M'\ninst✝⁵ : AddCommGroup N'\ninst✝⁴ : Module R M\ninst✝³ : Module R N\ninst✝² : Module R P\ninst✝¹ : Module R M'\ninst✝ : Module R N'\nbM : Basis ι R M\nbN : Basis κ R N\nbP : Basis τ R P\nbM' : Basis ι' R M'\nbN' : Basis κ' R N'\ni : κ\nj i' : ι\nj' : κ\nh✝¹ : i = j'\nh✝ : j = i'\n⊢ 1 * 1 = 1\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg\nR : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nM' : Type u_5\nN' : Type u_6\nι : Type u_7\nκ : Type u_8\nτ : Type u_9\nι' : Type u_10\nκ' : Type u_11\ninst✝¹⁸ : DecidableEq ι\ninst✝¹⁷ : DecidableEq κ\ninst✝¹⁶ : DecidableEq τ\ninst✝¹⁵ : Fintype ι\ninst✝¹⁴ : Fintype κ\ninst✝¹³ : Fintype τ\ninst✝¹² : Fintype ι'\ninst✝¹¹ : Fintype κ'\ninst✝¹⁰ : CommRing R\ninst✝⁹ : AddCommGroup M\ninst✝⁸ : AddCommGroup N\ninst✝⁷ : AddCommGroup P\ninst✝⁶ : AddCommGroup M'\ninst✝⁵ : AddCommGroup N'\ninst✝⁴ : Module R M\ninst✝³ : Module R N\ninst✝² : Module R P\ninst✝¹ : Module R M'\ninst✝ : Module R N'\nbM : Basis ι R M\nbN : Basis κ R N\nbP : Basis τ R P\nbM' : Basis ι' R M'\nbN' : Basis κ' R N'\ni : κ\nj i' : ι\nj' : κ\nh✝¹ : i = j'\nh✝ : ¬j = i'\n⊢ 1 * 0 = 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase pos\nR : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nM' : Type u_5\nN' : Type u_6\nι : Type u_7\nκ : Type u_8\nτ : Type u_9\nι' : Type u_10\nκ' : Type u_11\ninst✝¹⁸ : DecidableEq ι\ninst✝¹⁷ : DecidableEq κ\ninst✝¹⁶ : DecidableEq τ\ninst✝¹⁵ : Fintype ι\ninst✝¹⁴ : Fintype κ\ninst✝¹³ : Fintype τ\ninst✝¹² : Fintype ι'\ninst✝¹¹ : Fintype κ'\ninst✝¹⁰ : CommRing R\ninst✝⁹ : AddCommGroup M\ninst✝⁸ : AddCommGroup N\ninst✝⁷ : AddCommGroup P\ninst✝⁶ : AddCommGroup M'\ninst✝⁵ : AddCommGroup N'\ninst✝⁴ : Module R M\ninst✝³ : Module R N\ninst✝² : Module R P\ninst✝¹ : Module R M'\ninst✝ : Module R N'\nbM : Basis ι R M\nbN : Basis κ R N\nbP : Basis τ R P\nbM' : Basis ι' R M'\nbN' : Basis κ' R N'\ni : κ\nj i' : ι\nj' : κ\nh✝¹ : ¬i = j'\nh✝ : j = i'\n⊢ 0 * 1 = 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg\nR : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nM' : Type u_5\nN' : Type u_6\nι : Type u_7\nκ : Type u_8\nτ : Type u_9\nι' : Type u_10\nκ' : Type u_11\ninst✝¹⁸ : DecidableEq ι\ninst✝¹⁷ : DecidableEq κ\ninst✝¹⁶ : DecidableEq τ\ninst✝¹⁵ : Fintype ι\ninst✝¹⁴ : Fintype κ\ninst✝¹³ : Fintype τ\ninst✝¹² : Fintype ι'\ninst✝¹¹ : Fintype κ'\ninst✝¹⁰ : CommRing R\ninst✝⁹ : AddCommGroup M\ninst✝⁸ : AddCommGroup N\ninst✝⁷ : AddCommGroup P\ninst✝⁶ : AddCommGroup M'\ninst✝⁵ : AddCommGroup N'\ninst✝⁴ : Module R M\ninst✝³ : Module R N\ninst✝² : Module R P\ninst✝¹ : Module R M'\ninst✝ : Module R N'\nbM : Basis ι R M\nbN : Basis κ R N\nbP : Basis τ R P\nbM' : Basis ι' R M'\nbN' : Basis κ' R N'\ni : κ\nj i' : ι\nj' : κ\nh✝¹ : ¬i = j'\nh✝ : ¬j = i'\n⊢ 0 * 0 = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nM' : Type u_5\nN' : Type u_6\nι : Type u_7\nκ : Type u_8\nτ : Type u_9\nι' : Type u_10\nκ' : Type u_11\ninst✝¹⁸ : DecidableEq ι\ninst✝¹⁷ : DecidableEq κ\ninst✝¹⁶ : DecidableEq τ\ninst✝¹⁵ : Fintype ι\ninst✝¹⁴ : Fintype κ\ninst✝¹³ : Fintype τ\ninst✝¹² : Fintype ι'\ninst✝¹¹ : Fintype κ'\ninst✝¹⁰ : CommRing R\ninst✝⁹ : AddCommGroup M\ninst✝⁸ : AddCommGroup N\ninst✝⁷ : AddCommGroup P\ninst✝⁶ : AddCommGroup M'\ninst✝⁵ : AddCommGroup N'\ninst✝⁴ : Module R M\ninst✝³ : Module R N\ninst✝² : Module R P\ninst✝¹ : Module R M'\ninst✝ : Module R N'\nbM : Basis ι R M\nbN : Basis κ R N\nbP : Basis τ R P\nbM' : Basis ι' R M'\nbN' : Basis κ' R N'\n⊢ ↑(toMatrix (Basis.tensorProduct (Basis.tensorProduct bM bN) bP) (Basis.tensorProduct bM (Basis.tensorProduct bN bP)))\n      ↑(TensorProduct.assoc R M N P) =\n    submatrix 1 _root_.id ↑(Equiv.prodAssoc ι κ τ)\n[PROOFSTEP]\next ⟨i, j, k⟩ ⟨⟨i', j'⟩, k'⟩\n[GOAL]\ncase a.mk.mk.h.mk.mk\nR : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nM' : Type u_5\nN' : Type u_6\nι : Type u_7\nκ : Type u_8\nτ : Type u_9\nι' : Type u_10\nκ' : Type u_11\ninst✝¹⁸ : DecidableEq ι\ninst✝¹⁷ : DecidableEq κ\ninst✝¹⁶ : DecidableEq τ\ninst✝¹⁵ : Fintype ι\ninst✝¹⁴ : Fintype κ\ninst✝¹³ : Fintype τ\ninst✝¹² : Fintype ι'\ninst✝¹¹ : Fintype κ'\ninst✝¹⁰ : CommRing R\ninst✝⁹ : AddCommGroup M\ninst✝⁸ : AddCommGroup N\ninst✝⁷ : AddCommGroup P\ninst✝⁶ : AddCommGroup M'\ninst✝⁵ : AddCommGroup N'\ninst✝⁴ : Module R M\ninst✝³ : Module R N\ninst✝² : Module R P\ninst✝¹ : Module R M'\ninst✝ : Module R N'\nbM : Basis ι R M\nbN : Basis κ R N\nbP : Basis τ R P\nbM' : Basis ι' R M'\nbN' : Basis κ' R N'\ni : ι\nj : κ\nk k' : τ\ni' : ι\nj' : κ\n⊢ ↑(toMatrix (Basis.tensorProduct (Basis.tensorProduct bM bN) bP) (Basis.tensorProduct bM (Basis.tensorProduct bN bP)))\n      ↑(TensorProduct.assoc R M N P) (i, j, k) ((i', j'), k') =\n    submatrix 1 _root_.id ↑(Equiv.prodAssoc ι κ τ) (i, j, k) ((i', j'), k')\n[PROOFSTEP]\nsimp_rw [toMatrix_apply, Basis.tensorProduct_apply, LinearEquiv.coe_coe, TensorProduct.assoc_tmul,\n  Basis.tensorProduct_repr_tmul_apply, Matrix.submatrix_apply, Equiv.prodAssoc_apply, id.def, Basis.repr_self_apply,\n  Matrix.one_apply, Prod.ext_iff, ite_and, @eq_comm _ i', @eq_comm _ j', @eq_comm _ k']\n[GOAL]\ncase a.mk.mk.h.mk.mk\nR : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nM' : Type u_5\nN' : Type u_6\nι : Type u_7\nκ : Type u_8\nτ : Type u_9\nι' : Type u_10\nκ' : Type u_11\ninst✝¹⁸ : DecidableEq ι\ninst✝¹⁷ : DecidableEq κ\ninst✝¹⁶ : DecidableEq τ\ninst✝¹⁵ : Fintype ι\ninst✝¹⁴ : Fintype κ\ninst✝¹³ : Fintype τ\ninst✝¹² : Fintype ι'\ninst✝¹¹ : Fintype κ'\ninst✝¹⁰ : CommRing R\ninst✝⁹ : AddCommGroup M\ninst✝⁸ : AddCommGroup N\ninst✝⁷ : AddCommGroup P\ninst✝⁶ : AddCommGroup M'\ninst✝⁵ : AddCommGroup N'\ninst✝⁴ : Module R M\ninst✝³ : Module R N\ninst✝² : Module R P\ninst✝¹ : Module R M'\ninst✝ : Module R N'\nbM : Basis ι R M\nbN : Basis κ R N\nbP : Basis τ R P\nbM' : Basis ι' R M'\nbN' : Basis κ' R N'\ni : ι\nj : κ\nk k' : τ\ni' : ι\nj' : κ\n⊢ (if i = i' then 1 else 0) * ((if j = j' then 1 else 0) * if k = k' then 1 else 0) =\n    if i = i' then if j = j' then if k = k' then 1 else 0 else 0 else 0\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nR : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nM' : Type u_5\nN' : Type u_6\nι : Type u_7\nκ : Type u_8\nτ : Type u_9\nι' : Type u_10\nκ' : Type u_11\ninst✝¹⁸ : DecidableEq ι\ninst✝¹⁷ : DecidableEq κ\ninst✝¹⁶ : DecidableEq τ\ninst✝¹⁵ : Fintype ι\ninst✝¹⁴ : Fintype κ\ninst✝¹³ : Fintype τ\ninst✝¹² : Fintype ι'\ninst✝¹¹ : Fintype κ'\ninst✝¹⁰ : CommRing R\ninst✝⁹ : AddCommGroup M\ninst✝⁸ : AddCommGroup N\ninst✝⁷ : AddCommGroup P\ninst✝⁶ : AddCommGroup M'\ninst✝⁵ : AddCommGroup N'\ninst✝⁴ : Module R M\ninst✝³ : Module R N\ninst✝² : Module R P\ninst✝¹ : Module R M'\ninst✝ : Module R N'\nbM : Basis ι R M\nbN : Basis κ R N\nbP : Basis τ R P\nbM' : Basis ι' R M'\nbN' : Basis κ' R N'\ni : ι\nj : κ\nk k' : τ\ni' : ι\nj' : κ\nh✝² : i = i'\nh✝¹ : j = j'\nh✝ : k = k'\n⊢ 1 * (1 * 1) = 1\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg\nR : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nM' : Type u_5\nN' : Type u_6\nι : Type u_7\nκ : Type u_8\nτ : Type u_9\nι' : Type u_10\nκ' : Type u_11\ninst✝¹⁸ : DecidableEq ι\ninst✝¹⁷ : DecidableEq κ\ninst✝¹⁶ : DecidableEq τ\ninst✝¹⁵ : Fintype ι\ninst✝¹⁴ : Fintype κ\ninst✝¹³ : Fintype τ\ninst✝¹² : Fintype ι'\ninst✝¹¹ : Fintype κ'\ninst✝¹⁰ : CommRing R\ninst✝⁹ : AddCommGroup M\ninst✝⁸ : AddCommGroup N\ninst✝⁷ : AddCommGroup P\ninst✝⁶ : AddCommGroup M'\ninst✝⁵ : AddCommGroup N'\ninst✝⁴ : Module R M\ninst✝³ : Module R N\ninst✝² : Module R P\ninst✝¹ : Module R M'\ninst✝ : Module R N'\nbM : Basis ι R M\nbN : Basis κ R N\nbP : Basis τ R P\nbM' : Basis ι' R M'\nbN' : Basis κ' R N'\ni : ι\nj : κ\nk k' : τ\ni' : ι\nj' : κ\nh✝² : i = i'\nh✝¹ : j = j'\nh✝ : ¬k = k'\n⊢ 1 * (1 * 0) = 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase pos\nR : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nM' : Type u_5\nN' : Type u_6\nι : Type u_7\nκ : Type u_8\nτ : Type u_9\nι' : Type u_10\nκ' : Type u_11\ninst✝¹⁸ : DecidableEq ι\ninst✝¹⁷ : DecidableEq κ\ninst✝¹⁶ : DecidableEq τ\ninst✝¹⁵ : Fintype ι\ninst✝¹⁴ : Fintype κ\ninst✝¹³ : Fintype τ\ninst✝¹² : Fintype ι'\ninst✝¹¹ : Fintype κ'\ninst✝¹⁰ : CommRing R\ninst✝⁹ : AddCommGroup M\ninst✝⁸ : AddCommGroup N\ninst✝⁷ : AddCommGroup P\ninst✝⁶ : AddCommGroup M'\ninst✝⁵ : AddCommGroup N'\ninst✝⁴ : Module R M\ninst✝³ : Module R N\ninst✝² : Module R P\ninst✝¹ : Module R M'\ninst✝ : Module R N'\nbM : Basis ι R M\nbN : Basis κ R N\nbP : Basis τ R P\nbM' : Basis ι' R M'\nbN' : Basis κ' R N'\ni : ι\nj : κ\nk k' : τ\ni' : ι\nj' : κ\nh✝² : i = i'\nh✝¹ : ¬j = j'\nh✝ : k = k'\n⊢ 1 * (0 * 1) = 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg\nR : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nM' : Type u_5\nN' : Type u_6\nι : Type u_7\nκ : Type u_8\nτ : Type u_9\nι' : Type u_10\nκ' : Type u_11\ninst✝¹⁸ : DecidableEq ι\ninst✝¹⁷ : DecidableEq κ\ninst✝¹⁶ : DecidableEq τ\ninst✝¹⁵ : Fintype ι\ninst✝¹⁴ : Fintype κ\ninst✝¹³ : Fintype τ\ninst✝¹² : Fintype ι'\ninst✝¹¹ : Fintype κ'\ninst✝¹⁰ : CommRing R\ninst✝⁹ : AddCommGroup M\ninst✝⁸ : AddCommGroup N\ninst✝⁷ : AddCommGroup P\ninst✝⁶ : AddCommGroup M'\ninst✝⁵ : AddCommGroup N'\ninst✝⁴ : Module R M\ninst✝³ : Module R N\ninst✝² : Module R P\ninst✝¹ : Module R M'\ninst✝ : Module R N'\nbM : Basis ι R M\nbN : Basis κ R N\nbP : Basis τ R P\nbM' : Basis ι' R M'\nbN' : Basis κ' R N'\ni : ι\nj : κ\nk k' : τ\ni' : ι\nj' : κ\nh✝² : i = i'\nh✝¹ : ¬j = j'\nh✝ : ¬k = k'\n⊢ 1 * (0 * 0) = 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase pos\nR : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nM' : Type u_5\nN' : Type u_6\nι : Type u_7\nκ : Type u_8\nτ : Type u_9\nι' : Type u_10\nκ' : Type u_11\ninst✝¹⁸ : DecidableEq ι\ninst✝¹⁷ : DecidableEq κ\ninst✝¹⁶ : DecidableEq τ\ninst✝¹⁵ : Fintype ι\ninst✝¹⁴ : Fintype κ\ninst✝¹³ : Fintype τ\ninst✝¹² : Fintype ι'\ninst✝¹¹ : Fintype κ'\ninst✝¹⁰ : CommRing R\ninst✝⁹ : AddCommGroup M\ninst✝⁸ : AddCommGroup N\ninst✝⁷ : AddCommGroup P\ninst✝⁶ : AddCommGroup M'\ninst✝⁵ : AddCommGroup N'\ninst✝⁴ : Module R M\ninst✝³ : Module R N\ninst✝² : Module R P\ninst✝¹ : Module R M'\ninst✝ : Module R N'\nbM : Basis ι R M\nbN : Basis κ R N\nbP : Basis τ R P\nbM' : Basis ι' R M'\nbN' : Basis κ' R N'\ni : ι\nj : κ\nk k' : τ\ni' : ι\nj' : κ\nh✝² : ¬i = i'\nh✝¹ : j = j'\nh✝ : k = k'\n⊢ 0 * (1 * 1) = 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg\nR : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nM' : Type u_5\nN' : Type u_6\nι : Type u_7\nκ : Type u_8\nτ : Type u_9\nι' : Type u_10\nκ' : Type u_11\ninst✝¹⁸ : DecidableEq ι\ninst✝¹⁷ : DecidableEq κ\ninst✝¹⁶ : DecidableEq τ\ninst✝¹⁵ : Fintype ι\ninst✝¹⁴ : Fintype κ\ninst✝¹³ : Fintype τ\ninst✝¹² : Fintype ι'\ninst✝¹¹ : Fintype κ'\ninst✝¹⁰ : CommRing R\ninst✝⁹ : AddCommGroup M\ninst✝⁸ : AddCommGroup N\ninst✝⁷ : AddCommGroup P\ninst✝⁶ : AddCommGroup M'\ninst✝⁵ : AddCommGroup N'\ninst✝⁴ : Module R M\ninst✝³ : Module R N\ninst✝² : Module R P\ninst✝¹ : Module R M'\ninst✝ : Module R N'\nbM : Basis ι R M\nbN : Basis κ R N\nbP : Basis τ R P\nbM' : Basis ι' R M'\nbN' : Basis κ' R N'\ni : ι\nj : κ\nk k' : τ\ni' : ι\nj' : κ\nh✝² : ¬i = i'\nh✝¹ : j = j'\nh✝ : ¬k = k'\n⊢ 0 * (1 * 0) = 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase pos\nR : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nM' : Type u_5\nN' : Type u_6\nι : Type u_7\nκ : Type u_8\nτ : Type u_9\nι' : Type u_10\nκ' : Type u_11\ninst✝¹⁸ : DecidableEq ι\ninst✝¹⁷ : DecidableEq κ\ninst✝¹⁶ : DecidableEq τ\ninst✝¹⁵ : Fintype ι\ninst✝¹⁴ : Fintype κ\ninst✝¹³ : Fintype τ\ninst✝¹² : Fintype ι'\ninst✝¹¹ : Fintype κ'\ninst✝¹⁰ : CommRing R\ninst✝⁹ : AddCommGroup M\ninst✝⁸ : AddCommGroup N\ninst✝⁷ : AddCommGroup P\ninst✝⁶ : AddCommGroup M'\ninst✝⁵ : AddCommGroup N'\ninst✝⁴ : Module R M\ninst✝³ : Module R N\ninst✝² : Module R P\ninst✝¹ : Module R M'\ninst✝ : Module R N'\nbM : Basis ι R M\nbN : Basis κ R N\nbP : Basis τ R P\nbM' : Basis ι' R M'\nbN' : Basis κ' R N'\ni : ι\nj : κ\nk k' : τ\ni' : ι\nj' : κ\nh✝² : ¬i = i'\nh✝¹ : ¬j = j'\nh✝ : k = k'\n⊢ 0 * (0 * 1) = 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg\nR : Type u_1\nM : Type u_2\nN : Type u_3\nP : Type u_4\nM' : Type u_5\nN' : Type u_6\nι : Type u_7\nκ : Type u_8\nτ : Type u_9\nι' : Type u_10\nκ' : Type u_11\ninst✝¹⁸ : DecidableEq ι\ninst✝¹⁷ : DecidableEq κ\ninst✝¹⁶ : DecidableEq τ\ninst✝¹⁵ : Fintype ι\ninst✝¹⁴ : Fintype κ\ninst✝¹³ : Fintype τ\ninst✝¹² : Fintype ι'\ninst✝¹¹ : Fintype κ'\ninst✝¹⁰ : CommRing R\ninst✝⁹ : AddCommGroup M\ninst✝⁸ : AddCommGroup N\ninst✝⁷ : AddCommGroup P\ninst✝⁶ : AddCommGroup M'\ninst✝⁵ : AddCommGroup N'\ninst✝⁴ : Module R M\ninst✝³ : Module R N\ninst✝² : Module R P\ninst✝¹ : Module R M'\ninst✝ : Module R N'\nbM : Basis ι R M\nbN : Basis κ R N\nbP : Basis τ R P\nbM' : Basis ι' R M'\nbN' : Basis κ' R N'\ni : ι\nj : κ\nk k' : τ\ni' : ι\nj' : κ\nh✝² : ¬i = i'\nh✝¹ : ¬j = j'\nh✝ : ¬k = k'\n⊢ 0 * (0 * 0) = 0\n[PROOFSTEP]\nsimp\n", "meta": {"mathlib_filename": "Mathlib.LinearAlgebra.TensorProduct.Matrix", "llama_tokens": 10216, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8080672227971211, "lm_q2_score": 0.658417500561683, "lm_q1q2_score": 0.5320456011199011}}
{"text": "[GOAL]\nR : Type u\nL : Type v\nM : Type w\nN : Type w₁\ninst✝¹⁰ : CommRing R\ninst✝⁹ : LieRing L\ninst✝⁸ : LieAlgebra R L\ninst✝⁷ : AddCommGroup M\ninst✝⁶ : Module R M\ninst✝⁵ : LieRingModule L M\ninst✝⁴ : LieModule R L M\ninst✝³ : AddCommGroup N\ninst✝² : Module R N\ninst✝¹ : LieRingModule L N\ninst✝ : LieModule R L N\nt : R\nx y z : L\nm n : M\n⊢ -⁅y, x⁆ = ⁅x, y⁆\n[PROOFSTEP]\nhave h : ⁅x + y, x⁆ + ⁅x + y, y⁆ = 0 := by rw [← lie_add]; apply lie_self\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nN : Type w₁\ninst✝¹⁰ : CommRing R\ninst✝⁹ : LieRing L\ninst✝⁸ : LieAlgebra R L\ninst✝⁷ : AddCommGroup M\ninst✝⁶ : Module R M\ninst✝⁵ : LieRingModule L M\ninst✝⁴ : LieModule R L M\ninst✝³ : AddCommGroup N\ninst✝² : Module R N\ninst✝¹ : LieRingModule L N\ninst✝ : LieModule R L N\nt : R\nx y z : L\nm n : M\n⊢ ⁅x + y, x⁆ + ⁅x + y, y⁆ = 0\n[PROOFSTEP]\nrw [← lie_add]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nN : Type w₁\ninst✝¹⁰ : CommRing R\ninst✝⁹ : LieRing L\ninst✝⁸ : LieAlgebra R L\ninst✝⁷ : AddCommGroup M\ninst✝⁶ : Module R M\ninst✝⁵ : LieRingModule L M\ninst✝⁴ : LieModule R L M\ninst✝³ : AddCommGroup N\ninst✝² : Module R N\ninst✝¹ : LieRingModule L N\ninst✝ : LieModule R L N\nt : R\nx y z : L\nm n : M\n⊢ ⁅x + y, x + y⁆ = 0\n[PROOFSTEP]\napply lie_self\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nN : Type w₁\ninst✝¹⁰ : CommRing R\ninst✝⁹ : LieRing L\ninst✝⁸ : LieAlgebra R L\ninst✝⁷ : AddCommGroup M\ninst✝⁶ : Module R M\ninst✝⁵ : LieRingModule L M\ninst✝⁴ : LieModule R L M\ninst✝³ : AddCommGroup N\ninst✝² : Module R N\ninst✝¹ : LieRingModule L N\ninst✝ : LieModule R L N\nt : R\nx y z : L\nm n : M\nh : ⁅x + y, x⁆ + ⁅x + y, y⁆ = 0\n⊢ -⁅y, x⁆ = ⁅x, y⁆\n[PROOFSTEP]\nsimpa [neg_eq_iff_add_eq_zero] using h\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nN : Type w₁\ninst✝¹⁰ : CommRing R\ninst✝⁹ : LieRing L\ninst✝⁸ : LieAlgebra R L\ninst✝⁷ : AddCommGroup M\ninst✝⁶ : Module R M\ninst✝⁵ : LieRingModule L M\ninst✝⁴ : LieModule R L M\ninst✝³ : AddCommGroup N\ninst✝² : Module R N\ninst✝¹ : LieRingModule L N\ninst✝ : LieModule R L N\nt✝ : R\nx✝ y z : L\nm✝ n : M\nt : R\nx m : L\n⊢ ⁅t • x, m⁆ = t • ⁅x, m⁆\n[PROOFSTEP]\nrw [← lie_skew, ← lie_skew x m, LieAlgebra.lie_smul, smul_neg]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nN : Type w₁\ninst✝¹⁰ : CommRing R\ninst✝⁹ : LieRing L\ninst✝⁸ : LieAlgebra R L\ninst✝⁷ : AddCommGroup M\ninst✝⁶ : Module R M\ninst✝⁵ : LieRingModule L M\ninst✝⁴ : LieModule R L M\ninst✝³ : AddCommGroup N\ninst✝² : Module R N\ninst✝¹ : LieRingModule L N\ninst✝ : LieModule R L N\nt : R\nx y z : L\nm n : M\n⊢ ∀ (t : R) (x m : L), ⁅x, t • m⁆ = t • ⁅x, m⁆\n[PROOFSTEP]\napply LieAlgebra.lie_smul\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nN : Type w₁\ninst✝¹⁰ : CommRing R\ninst✝⁹ : LieRing L\ninst✝⁸ : LieAlgebra R L\ninst✝⁷ : AddCommGroup M\ninst✝⁶ : Module R M\ninst✝⁵ : LieRingModule L M\ninst✝⁴ : LieModule R L M\ninst✝³ : AddCommGroup N\ninst✝² : Module R N\ninst✝¹ : LieRingModule L N\ninst✝ : LieModule R L N\nt : R\nx y z : L\nm n : M\n⊢ ⁅-x, m⁆ = -⁅x, m⁆\n[PROOFSTEP]\nrw [← sub_eq_zero, sub_neg_eq_add, ← add_lie]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nN : Type w₁\ninst✝¹⁰ : CommRing R\ninst✝⁹ : LieRing L\ninst✝⁸ : LieAlgebra R L\ninst✝⁷ : AddCommGroup M\ninst✝⁶ : Module R M\ninst✝⁵ : LieRingModule L M\ninst✝⁴ : LieModule R L M\ninst✝³ : AddCommGroup N\ninst✝² : Module R N\ninst✝¹ : LieRingModule L N\ninst✝ : LieModule R L N\nt : R\nx y z : L\nm n : M\n⊢ ⁅-x + x, m⁆ = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nN : Type w₁\ninst✝¹⁰ : CommRing R\ninst✝⁹ : LieRing L\ninst✝⁸ : LieAlgebra R L\ninst✝⁷ : AddCommGroup M\ninst✝⁶ : Module R M\ninst✝⁵ : LieRingModule L M\ninst✝⁴ : LieModule R L M\ninst✝³ : AddCommGroup N\ninst✝² : Module R N\ninst✝¹ : LieRingModule L N\ninst✝ : LieModule R L N\nt : R\nx y z : L\nm n : M\n⊢ ⁅x, -m⁆ = -⁅x, m⁆\n[PROOFSTEP]\nrw [← sub_eq_zero, sub_neg_eq_add, ← lie_add]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nN : Type w₁\ninst✝¹⁰ : CommRing R\ninst✝⁹ : LieRing L\ninst✝⁸ : LieAlgebra R L\ninst✝⁷ : AddCommGroup M\ninst✝⁶ : Module R M\ninst✝⁵ : LieRingModule L M\ninst✝⁴ : LieModule R L M\ninst✝³ : AddCommGroup N\ninst✝² : Module R N\ninst✝¹ : LieRingModule L N\ninst✝ : LieModule R L N\nt : R\nx y z : L\nm n : M\n⊢ ⁅x, -m + m⁆ = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nN : Type w₁\ninst✝¹⁰ : CommRing R\ninst✝⁹ : LieRing L\ninst✝⁸ : LieAlgebra R L\ninst✝⁷ : AddCommGroup M\ninst✝⁶ : Module R M\ninst✝⁵ : LieRingModule L M\ninst✝⁴ : LieModule R L M\ninst✝³ : AddCommGroup N\ninst✝² : Module R N\ninst✝¹ : LieRingModule L N\ninst✝ : LieModule R L N\nt : R\nx y z : L\nm n : M\n⊢ ⁅x - y, m⁆ = ⁅x, m⁆ - ⁅y, m⁆\n[PROOFSTEP]\nsimp [sub_eq_add_neg]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nN : Type w₁\ninst✝¹⁰ : CommRing R\ninst✝⁹ : LieRing L\ninst✝⁸ : LieAlgebra R L\ninst✝⁷ : AddCommGroup M\ninst✝⁶ : Module R M\ninst✝⁵ : LieRingModule L M\ninst✝⁴ : LieModule R L M\ninst✝³ : AddCommGroup N\ninst✝² : Module R N\ninst✝¹ : LieRingModule L N\ninst✝ : LieModule R L N\nt : R\nx y z : L\nm n : M\n⊢ ⁅x, m - n⁆ = ⁅x, m⁆ - ⁅x, n⁆\n[PROOFSTEP]\nsimp [sub_eq_add_neg]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nN : Type w₁\ninst✝¹⁰ : CommRing R\ninst✝⁹ : LieRing L\ninst✝⁸ : LieAlgebra R L\ninst✝⁷ : AddCommGroup M\ninst✝⁶ : Module R M\ninst✝⁵ : LieRingModule L M\ninst✝⁴ : LieModule R L M\ninst✝³ : AddCommGroup N\ninst✝² : Module R N\ninst✝¹ : LieRingModule L N\ninst✝ : LieModule R L N\nt : R\nx y z : L\nm n : M\n⊢ ⁅⁅x, y⁆, m⁆ = ⁅x, ⁅y, m⁆⁆ - ⁅y, ⁅x, m⁆⁆\n[PROOFSTEP]\nrw [leibniz_lie, add_sub_cancel]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nN : Type w₁\ninst✝¹⁰ : CommRing R\ninst✝⁹ : LieRing L\ninst✝⁸ : LieAlgebra R L\ninst✝⁷ : AddCommGroup M\ninst✝⁶ : Module R M\ninst✝⁵ : LieRingModule L M\ninst✝⁴ : LieModule R L M\ninst✝³ : AddCommGroup N\ninst✝² : Module R N\ninst✝¹ : LieRingModule L N\ninst✝ : LieModule R L N\nt : R\nx y z : L\nm n : M\n⊢ ⁅x, ⁅y, z⁆⁆ + ⁅y, ⁅z, x⁆⁆ + ⁅z, ⁅x, y⁆⁆ = 0\n[PROOFSTEP]\nrw [← neg_neg ⁅x, y⁆, lie_neg z, lie_skew y x, ← lie_skew, lie_lie]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nN : Type w₁\ninst✝¹⁰ : CommRing R\ninst✝⁹ : LieRing L\ninst✝⁸ : LieAlgebra R L\ninst✝⁷ : AddCommGroup M\ninst✝⁶ : Module R M\ninst✝⁵ : LieRingModule L M\ninst✝⁴ : LieModule R L M\ninst✝³ : AddCommGroup N\ninst✝² : Module R N\ninst✝¹ : LieRingModule L N\ninst✝ : LieModule R L N\nt : R\nx y z : L\nm n : M\n⊢ -(⁅y, ⁅z, x⁆⁆ - ⁅z, ⁅y, x⁆⁆) + ⁅y, ⁅z, x⁆⁆ + -⁅z, ⁅y, x⁆⁆ = 0\n[PROOFSTEP]\nabel\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nN : Type w₁\ninst✝¹⁰ : CommRing R\ninst✝⁹ : LieRing L\ninst✝⁸ : LieAlgebra R L\ninst✝⁷ : AddCommGroup M\ninst✝⁶ : Module R M\ninst✝⁵ : LieRingModule L M\ninst✝⁴ : LieModule R L M\ninst✝³ : AddCommGroup N\ninst✝² : Module R N\ninst✝¹ : LieRingModule L N\ninst✝ : LieModule R L N\nt : R\nx y z : L\nm n : M\n⊢ -(⁅y, ⁅z, x⁆⁆ - ⁅z, ⁅y, x⁆⁆) + ⁅y, ⁅z, x⁆⁆ + -⁅z, ⁅y, x⁆⁆ = 0\n[PROOFSTEP]\nabel\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nN : Type w₁\ninst✝¹⁰ : CommRing R\ninst✝⁹ : LieRing L\ninst✝⁸ : LieAlgebra R L\ninst✝⁷ : AddCommGroup M\ninst✝⁶ : Module R M\ninst✝⁵ : LieRingModule L M\ninst✝⁴ : LieModule R L M\ninst✝³ : AddCommGroup N\ninst✝² : Module R N\ninst✝¹ : LieRingModule L N\ninst✝ : LieModule R L N\nt : R\nx✝ y z : L\nm✝ n✝ : M\nx : L\nf : M →ₗ[R] N\nm n : M\n⊢ (fun m => ⁅x, ↑f m⁆ - ↑f ⁅x, m⁆) (m + n) = (fun m => ⁅x, ↑f m⁆ - ↑f ⁅x, m⁆) m + (fun m => ⁅x, ↑f m⁆ - ↑f ⁅x, m⁆) n\n[PROOFSTEP]\nsimp only [lie_add, LinearMap.map_add]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nN : Type w₁\ninst✝¹⁰ : CommRing R\ninst✝⁹ : LieRing L\ninst✝⁸ : LieAlgebra R L\ninst✝⁷ : AddCommGroup M\ninst✝⁶ : Module R M\ninst✝⁵ : LieRingModule L M\ninst✝⁴ : LieModule R L M\ninst✝³ : AddCommGroup N\ninst✝² : Module R N\ninst✝¹ : LieRingModule L N\ninst✝ : LieModule R L N\nt : R\nx✝ y z : L\nm✝ n✝ : M\nx : L\nf : M →ₗ[R] N\nm n : M\n⊢ ⁅x, ↑f m⁆ + ⁅x, ↑f n⁆ - (↑f ⁅x, m⁆ + ↑f ⁅x, n⁆) = ⁅x, ↑f m⁆ - ↑f ⁅x, m⁆ + (⁅x, ↑f n⁆ - ↑f ⁅x, n⁆)\n[PROOFSTEP]\nabel\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nN : Type w₁\ninst✝¹⁰ : CommRing R\ninst✝⁹ : LieRing L\ninst✝⁸ : LieAlgebra R L\ninst✝⁷ : AddCommGroup M\ninst✝⁶ : Module R M\ninst✝⁵ : LieRingModule L M\ninst✝⁴ : LieModule R L M\ninst✝³ : AddCommGroup N\ninst✝² : Module R N\ninst✝¹ : LieRingModule L N\ninst✝ : LieModule R L N\nt : R\nx✝ y z : L\nm✝ n✝ : M\nx : L\nf : M →ₗ[R] N\nm n : M\n⊢ ⁅x, ↑f m⁆ + ⁅x, ↑f n⁆ - (↑f ⁅x, m⁆ + ↑f ⁅x, n⁆) = ⁅x, ↑f m⁆ - ↑f ⁅x, m⁆ + (⁅x, ↑f n⁆ - ↑f ⁅x, n⁆)\n[PROOFSTEP]\nabel\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nN : Type w₁\ninst✝¹⁰ : CommRing R\ninst✝⁹ : LieRing L\ninst✝⁸ : LieAlgebra R L\ninst✝⁷ : AddCommGroup M\ninst✝⁶ : Module R M\ninst✝⁵ : LieRingModule L M\ninst✝⁴ : LieModule R L M\ninst✝³ : AddCommGroup N\ninst✝² : Module R N\ninst✝¹ : LieRingModule L N\ninst✝ : LieModule R L N\nt✝ : R\nx✝ y z : L\nm✝ n : M\nx : L\nf : M →ₗ[R] N\nt : R\nm : M\n⊢ AddHom.toFun\n      { toFun := fun m => ⁅x, ↑f m⁆ - ↑f ⁅x, m⁆,\n        map_add' :=\n          (_ :\n            ∀ (m n : M),\n              (fun m => ⁅x, ↑f m⁆ - ↑f ⁅x, m⁆) (m + n) =\n                (fun m => ⁅x, ↑f m⁆ - ↑f ⁅x, m⁆) m + (fun m => ⁅x, ↑f m⁆ - ↑f ⁅x, m⁆) n) }\n      (t • m) =\n    ↑(RingHom.id R) t •\n      AddHom.toFun\n        { toFun := fun m => ⁅x, ↑f m⁆ - ↑f ⁅x, m⁆,\n          map_add' :=\n            (_ :\n              ∀ (m n : M),\n                (fun m => ⁅x, ↑f m⁆ - ↑f ⁅x, m⁆) (m + n) =\n                  (fun m => ⁅x, ↑f m⁆ - ↑f ⁅x, m⁆) m + (fun m => ⁅x, ↑f m⁆ - ↑f ⁅x, m⁆) n) }\n        m\n[PROOFSTEP]\nsimp only [smul_sub, LinearMap.map_smul, lie_smul, RingHom.id_apply]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nN : Type w₁\ninst✝¹⁰ : CommRing R\ninst✝⁹ : LieRing L\ninst✝⁸ : LieAlgebra R L\ninst✝⁷ : AddCommGroup M\ninst✝⁶ : Module R M\ninst✝⁵ : LieRingModule L M\ninst✝⁴ : LieModule R L M\ninst✝³ : AddCommGroup N\ninst✝² : Module R N\ninst✝¹ : LieRingModule L N\ninst✝ : LieModule R L N\nt : R\nx✝ y✝ z : L\nm n : M\nx y : L\nf : M →ₗ[R] N\n⊢ ⁅x + y, f⁆ = ⁅x, f⁆ + ⁅y, f⁆\n[PROOFSTEP]\next n\n[GOAL]\ncase h\nR : Type u\nL : Type v\nM : Type w\nN : Type w₁\ninst✝¹⁰ : CommRing R\ninst✝⁹ : LieRing L\ninst✝⁸ : LieAlgebra R L\ninst✝⁷ : AddCommGroup M\ninst✝⁶ : Module R M\ninst✝⁵ : LieRingModule L M\ninst✝⁴ : LieModule R L M\ninst✝³ : AddCommGroup N\ninst✝² : Module R N\ninst✝¹ : LieRingModule L N\ninst✝ : LieModule R L N\nt : R\nx✝ y✝ z : L\nm n✝ : M\nx y : L\nf : M →ₗ[R] N\nn : M\n⊢ ↑⁅x + y, f⁆ n = ↑(⁅x, f⁆ + ⁅y, f⁆) n\n[PROOFSTEP]\nsimp only [add_lie, LinearMap.coe_mk, AddHom.coe_mk, LinearMap.add_apply, LinearMap.map_add]\n[GOAL]\ncase h\nR : Type u\nL : Type v\nM : Type w\nN : Type w₁\ninst✝¹⁰ : CommRing R\ninst✝⁹ : LieRing L\ninst✝⁸ : LieAlgebra R L\ninst✝⁷ : AddCommGroup M\ninst✝⁶ : Module R M\ninst✝⁵ : LieRingModule L M\ninst✝⁴ : LieModule R L M\ninst✝³ : AddCommGroup N\ninst✝² : Module R N\ninst✝¹ : LieRingModule L N\ninst✝ : LieModule R L N\nt : R\nx✝ y✝ z : L\nm n✝ : M\nx y : L\nf : M →ₗ[R] N\nn : M\n⊢ ⁅x, ↑f n⁆ + ⁅y, ↑f n⁆ - (↑f ⁅x, n⁆ + ↑f ⁅y, n⁆) = ⁅x, ↑f n⁆ - ↑f ⁅x, n⁆ + (⁅y, ↑f n⁆ - ↑f ⁅y, n⁆)\n[PROOFSTEP]\nabel\n[GOAL]\ncase h\nR : Type u\nL : Type v\nM : Type w\nN : Type w₁\ninst✝¹⁰ : CommRing R\ninst✝⁹ : LieRing L\ninst✝⁸ : LieAlgebra R L\ninst✝⁷ : AddCommGroup M\ninst✝⁶ : Module R M\ninst✝⁵ : LieRingModule L M\ninst✝⁴ : LieModule R L M\ninst✝³ : AddCommGroup N\ninst✝² : Module R N\ninst✝¹ : LieRingModule L N\ninst✝ : LieModule R L N\nt : R\nx✝ y✝ z : L\nm n✝ : M\nx y : L\nf : M →ₗ[R] N\nn : M\n⊢ ⁅x, ↑f n⁆ + ⁅y, ↑f n⁆ - (↑f ⁅x, n⁆ + ↑f ⁅y, n⁆) = ⁅x, ↑f n⁆ - ↑f ⁅x, n⁆ + (⁅y, ↑f n⁆ - ↑f ⁅y, n⁆)\n[PROOFSTEP]\nabel\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nN : Type w₁\ninst✝¹⁰ : CommRing R\ninst✝⁹ : LieRing L\ninst✝⁸ : LieAlgebra R L\ninst✝⁷ : AddCommGroup M\ninst✝⁶ : Module R M\ninst✝⁵ : LieRingModule L M\ninst✝⁴ : LieModule R L M\ninst✝³ : AddCommGroup N\ninst✝² : Module R N\ninst✝¹ : LieRingModule L N\ninst✝ : LieModule R L N\nt : R\nx✝ y z : L\nm n : M\nx : L\nf g : M →ₗ[R] N\n⊢ ⁅x, f + g⁆ = ⁅x, f⁆ + ⁅x, g⁆\n[PROOFSTEP]\next n\n[GOAL]\ncase h\nR : Type u\nL : Type v\nM : Type w\nN : Type w₁\ninst✝¹⁰ : CommRing R\ninst✝⁹ : LieRing L\ninst✝⁸ : LieAlgebra R L\ninst✝⁷ : AddCommGroup M\ninst✝⁶ : Module R M\ninst✝⁵ : LieRingModule L M\ninst✝⁴ : LieModule R L M\ninst✝³ : AddCommGroup N\ninst✝² : Module R N\ninst✝¹ : LieRingModule L N\ninst✝ : LieModule R L N\nt : R\nx✝ y z : L\nm n✝ : M\nx : L\nf g : M →ₗ[R] N\nn : M\n⊢ ↑⁅x, f + g⁆ n = ↑(⁅x, f⁆ + ⁅x, g⁆) n\n[PROOFSTEP]\nsimp only [LinearMap.coe_mk, AddHom.coe_mk, lie_add, LinearMap.add_apply]\n[GOAL]\ncase h\nR : Type u\nL : Type v\nM : Type w\nN : Type w₁\ninst✝¹⁰ : CommRing R\ninst✝⁹ : LieRing L\ninst✝⁸ : LieAlgebra R L\ninst✝⁷ : AddCommGroup M\ninst✝⁶ : Module R M\ninst✝⁵ : LieRingModule L M\ninst✝⁴ : LieModule R L M\ninst✝³ : AddCommGroup N\ninst✝² : Module R N\ninst✝¹ : LieRingModule L N\ninst✝ : LieModule R L N\nt : R\nx✝ y z : L\nm n✝ : M\nx : L\nf g : M →ₗ[R] N\nn : M\n⊢ ⁅x, ↑f n⁆ + ⁅x, ↑g n⁆ - (↑f ⁅x, n⁆ + ↑g ⁅x, n⁆) = ⁅x, ↑f n⁆ - ↑f ⁅x, n⁆ + (⁅x, ↑g n⁆ - ↑g ⁅x, n⁆)\n[PROOFSTEP]\nabel\n[GOAL]\ncase h\nR : Type u\nL : Type v\nM : Type w\nN : Type w₁\ninst✝¹⁰ : CommRing R\ninst✝⁹ : LieRing L\ninst✝⁸ : LieAlgebra R L\ninst✝⁷ : AddCommGroup M\ninst✝⁶ : Module R M\ninst✝⁵ : LieRingModule L M\ninst✝⁴ : LieModule R L M\ninst✝³ : AddCommGroup N\ninst✝² : Module R N\ninst✝¹ : LieRingModule L N\ninst✝ : LieModule R L N\nt : R\nx✝ y z : L\nm n✝ : M\nx : L\nf g : M →ₗ[R] N\nn : M\n⊢ ⁅x, ↑f n⁆ + ⁅x, ↑g n⁆ - (↑f ⁅x, n⁆ + ↑g ⁅x, n⁆) = ⁅x, ↑f n⁆ - ↑f ⁅x, n⁆ + (⁅x, ↑g n⁆ - ↑g ⁅x, n⁆)\n[PROOFSTEP]\nabel\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nN : Type w₁\ninst✝¹⁰ : CommRing R\ninst✝⁹ : LieRing L\ninst✝⁸ : LieAlgebra R L\ninst✝⁷ : AddCommGroup M\ninst✝⁶ : Module R M\ninst✝⁵ : LieRingModule L M\ninst✝⁴ : LieModule R L M\ninst✝³ : AddCommGroup N\ninst✝² : Module R N\ninst✝¹ : LieRingModule L N\ninst✝ : LieModule R L N\nt : R\nx✝ y✝ z : L\nm n : M\nx y : L\nf : M →ₗ[R] N\n⊢ ⁅x, ⁅y, f⁆⁆ = ⁅⁅x, y⁆, f⁆ + ⁅y, ⁅x, f⁆⁆\n[PROOFSTEP]\next n\n[GOAL]\ncase h\nR : Type u\nL : Type v\nM : Type w\nN : Type w₁\ninst✝¹⁰ : CommRing R\ninst✝⁹ : LieRing L\ninst✝⁸ : LieAlgebra R L\ninst✝⁷ : AddCommGroup M\ninst✝⁶ : Module R M\ninst✝⁵ : LieRingModule L M\ninst✝⁴ : LieModule R L M\ninst✝³ : AddCommGroup N\ninst✝² : Module R N\ninst✝¹ : LieRingModule L N\ninst✝ : LieModule R L N\nt : R\nx✝ y✝ z : L\nm n✝ : M\nx y : L\nf : M →ₗ[R] N\nn : M\n⊢ ↑⁅x, ⁅y, f⁆⁆ n = ↑(⁅⁅x, y⁆, f⁆ + ⁅y, ⁅x, f⁆⁆) n\n[PROOFSTEP]\nsimp only [lie_lie, LinearMap.coe_mk, AddHom.coe_mk, LinearMap.map_sub, LinearMap.add_apply, lie_sub]\n[GOAL]\ncase h\nR : Type u\nL : Type v\nM : Type w\nN : Type w₁\ninst✝¹⁰ : CommRing R\ninst✝⁹ : LieRing L\ninst✝⁸ : LieAlgebra R L\ninst✝⁷ : AddCommGroup M\ninst✝⁶ : Module R M\ninst✝⁵ : LieRingModule L M\ninst✝⁴ : LieModule R L M\ninst✝³ : AddCommGroup N\ninst✝² : Module R N\ninst✝¹ : LieRingModule L N\ninst✝ : LieModule R L N\nt : R\nx✝ y✝ z : L\nm n✝ : M\nx y : L\nf : M →ₗ[R] N\nn : M\n⊢ ⁅x, ⁅y, ↑f n⁆⁆ - ⁅x, ↑f ⁅y, n⁆⁆ - (⁅y, ↑f ⁅x, n⁆⁆ - ↑f ⁅y, ⁅x, n⁆⁆) =\n    ⁅x, ⁅y, ↑f n⁆⁆ - ⁅y, ⁅x, ↑f n⁆⁆ - (↑f ⁅x, ⁅y, n⁆⁆ - ↑f ⁅y, ⁅x, n⁆⁆) +\n      (⁅y, ⁅x, ↑f n⁆⁆ - ⁅y, ↑f ⁅x, n⁆⁆ - (⁅x, ↑f ⁅y, n⁆⁆ - ↑f ⁅x, ⁅y, n⁆⁆))\n[PROOFSTEP]\nabel\n[GOAL]\ncase h\nR : Type u\nL : Type v\nM : Type w\nN : Type w₁\ninst✝¹⁰ : CommRing R\ninst✝⁹ : LieRing L\ninst✝⁸ : LieAlgebra R L\ninst✝⁷ : AddCommGroup M\ninst✝⁶ : Module R M\ninst✝⁵ : LieRingModule L M\ninst✝⁴ : LieModule R L M\ninst✝³ : AddCommGroup N\ninst✝² : Module R N\ninst✝¹ : LieRingModule L N\ninst✝ : LieModule R L N\nt : R\nx✝ y✝ z : L\nm n✝ : M\nx y : L\nf : M →ₗ[R] N\nn : M\n⊢ ⁅x, ⁅y, ↑f n⁆⁆ - ⁅x, ↑f ⁅y, n⁆⁆ - (⁅y, ↑f ⁅x, n⁆⁆ - ↑f ⁅y, ⁅x, n⁆⁆) =\n    ⁅x, ⁅y, ↑f n⁆⁆ - ⁅y, ⁅x, ↑f n⁆⁆ - (↑f ⁅x, ⁅y, n⁆⁆ - ↑f ⁅y, ⁅x, n⁆⁆) +\n      (⁅y, ⁅x, ↑f n⁆⁆ - ⁅y, ↑f ⁅x, n⁆⁆ - (⁅x, ↑f ⁅y, n⁆⁆ - ↑f ⁅x, ⁅y, n⁆⁆))\n[PROOFSTEP]\nabel\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nN : Type w₁\ninst✝¹⁰ : CommRing R\ninst✝⁹ : LieRing L\ninst✝⁸ : LieAlgebra R L\ninst✝⁷ : AddCommGroup M\ninst✝⁶ : Module R M\ninst✝⁵ : LieRingModule L M\ninst✝⁴ : LieModule R L M\ninst✝³ : AddCommGroup N\ninst✝² : Module R N\ninst✝¹ : LieRingModule L N\ninst✝ : LieModule R L N\nt✝ : R\nx✝ y z : L\nm n : M\nt : R\nx : L\nf : M →ₗ[R] N\n⊢ ⁅t • x, f⁆ = t • ⁅x, f⁆\n[PROOFSTEP]\next n\n[GOAL]\ncase h\nR : Type u\nL : Type v\nM : Type w\nN : Type w₁\ninst✝¹⁰ : CommRing R\ninst✝⁹ : LieRing L\ninst✝⁸ : LieAlgebra R L\ninst✝⁷ : AddCommGroup M\ninst✝⁶ : Module R M\ninst✝⁵ : LieRingModule L M\ninst✝⁴ : LieModule R L M\ninst✝³ : AddCommGroup N\ninst✝² : Module R N\ninst✝¹ : LieRingModule L N\ninst✝ : LieModule R L N\nt✝ : R\nx✝ y z : L\nm n✝ : M\nt : R\nx : L\nf : M →ₗ[R] N\nn : M\n⊢ ↑⁅t • x, f⁆ n = ↑(t • ⁅x, f⁆) n\n[PROOFSTEP]\nsimp only [smul_sub, smul_lie, LinearMap.smul_apply, LieHom.lie_apply, LinearMap.map_smul]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nN : Type w₁\ninst✝¹⁰ : CommRing R\ninst✝⁹ : LieRing L\ninst✝⁸ : LieAlgebra R L\ninst✝⁷ : AddCommGroup M\ninst✝⁶ : Module R M\ninst✝⁵ : LieRingModule L M\ninst✝⁴ : LieModule R L M\ninst✝³ : AddCommGroup N\ninst✝² : Module R N\ninst✝¹ : LieRingModule L N\ninst✝ : LieModule R L N\nt✝ : R\nx✝ y z : L\nm n : M\nt : R\nx : L\nf : M →ₗ[R] N\n⊢ ⁅x, t • f⁆ = t • ⁅x, f⁆\n[PROOFSTEP]\next n\n[GOAL]\ncase h\nR : Type u\nL : Type v\nM : Type w\nN : Type w₁\ninst✝¹⁰ : CommRing R\ninst✝⁹ : LieRing L\ninst✝⁸ : LieAlgebra R L\ninst✝⁷ : AddCommGroup M\ninst✝⁶ : Module R M\ninst✝⁵ : LieRingModule L M\ninst✝⁴ : LieModule R L M\ninst✝³ : AddCommGroup N\ninst✝² : Module R N\ninst✝¹ : LieRingModule L N\ninst✝ : LieModule R L N\nt✝ : R\nx✝ y z : L\nm n✝ : M\nt : R\nx : L\nf : M →ₗ[R] N\nn : M\n⊢ ↑⁅x, t • f⁆ n = ↑(t • ⁅x, f⁆) n\n[PROOFSTEP]\nsimp only [smul_sub, LinearMap.smul_apply, LieHom.lie_apply, lie_smul]\n[GOAL]\nR : Type u\nL₁ : Type v\nL₂ : Type w\nL₃ : Type w₁\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L₁\ninst✝⁴ : LieAlgebra R L₁\ninst✝³ : LieRing L₂\ninst✝² : LieAlgebra R L₂\ninst✝¹ : LieRing L₃\ninst✝ : LieAlgebra R L₃\nx y : L₁ →ₗ⁅R⁆ L₂\nh : (fun f => f.toFun) x = (fun f => f.toFun) y\n⊢ x = y\n[PROOFSTEP]\ncases x\n[GOAL]\ncase mk\nR : Type u\nL₁ : Type v\nL₂ : Type w\nL₃ : Type w₁\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L₁\ninst✝⁴ : LieAlgebra R L₁\ninst✝³ : LieRing L₂\ninst✝² : LieAlgebra R L₂\ninst✝¹ : LieRing L₃\ninst✝ : LieAlgebra R L₃\ny : L₁ →ₗ⁅R⁆ L₂\ntoLinearMap✝ : L₁ →ₗ[R] L₂\nmap_lie'✝ :\n  ∀ {x y : L₁},\n    AddHom.toFun toLinearMap✝.toAddHom ⁅x, y⁆ =\n      ⁅AddHom.toFun toLinearMap✝.toAddHom x, AddHom.toFun toLinearMap✝.toAddHom y⁆\nh : (fun f => f.toFun) { toLinearMap := toLinearMap✝, map_lie' := map_lie'✝ } = (fun f => f.toFun) y\n⊢ { toLinearMap := toLinearMap✝, map_lie' := map_lie'✝ } = y\n[PROOFSTEP]\ncases y\n[GOAL]\ncase mk.mk\nR : Type u\nL₁ : Type v\nL₂ : Type w\nL₃ : Type w₁\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L₁\ninst✝⁴ : LieAlgebra R L₁\ninst✝³ : LieRing L₂\ninst✝² : LieAlgebra R L₂\ninst✝¹ : LieRing L₃\ninst✝ : LieAlgebra R L₃\ntoLinearMap✝¹ : L₁ →ₗ[R] L₂\nmap_lie'✝¹ :\n  ∀ {x y : L₁},\n    AddHom.toFun toLinearMap✝¹.toAddHom ⁅x, y⁆ =\n      ⁅AddHom.toFun toLinearMap✝¹.toAddHom x, AddHom.toFun toLinearMap✝¹.toAddHom y⁆\ntoLinearMap✝ : L₁ →ₗ[R] L₂\nmap_lie'✝ :\n  ∀ {x y : L₁},\n    AddHom.toFun toLinearMap✝.toAddHom ⁅x, y⁆ =\n      ⁅AddHom.toFun toLinearMap✝.toAddHom x, AddHom.toFun toLinearMap✝.toAddHom y⁆\nh :\n  (fun f => f.toFun) { toLinearMap := toLinearMap✝¹, map_lie' := map_lie'✝¹ } =\n    (fun f => f.toFun) { toLinearMap := toLinearMap✝, map_lie' := map_lie'✝ }\n⊢ { toLinearMap := toLinearMap✝¹, map_lie' := map_lie'✝¹ } = { toLinearMap := toLinearMap✝, map_lie' := map_lie'✝ }\n[PROOFSTEP]\nsimp at h \n[GOAL]\ncase mk.mk\nR : Type u\nL₁ : Type v\nL₂ : Type w\nL₃ : Type w₁\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L₁\ninst✝⁴ : LieAlgebra R L₁\ninst✝³ : LieRing L₂\ninst✝² : LieAlgebra R L₂\ninst✝¹ : LieRing L₃\ninst✝ : LieAlgebra R L₃\ntoLinearMap✝¹ : L₁ →ₗ[R] L₂\nmap_lie'✝¹ :\n  ∀ {x y : L₁},\n    AddHom.toFun toLinearMap✝¹.toAddHom ⁅x, y⁆ =\n      ⁅AddHom.toFun toLinearMap✝¹.toAddHom x, AddHom.toFun toLinearMap✝¹.toAddHom y⁆\ntoLinearMap✝ : L₁ →ₗ[R] L₂\nmap_lie'✝ :\n  ∀ {x y : L₁},\n    AddHom.toFun toLinearMap✝.toAddHom ⁅x, y⁆ =\n      ⁅AddHom.toFun toLinearMap✝.toAddHom x, AddHom.toFun toLinearMap✝.toAddHom y⁆\nh : toLinearMap✝¹ = toLinearMap✝\n⊢ { toLinearMap := toLinearMap✝¹, map_lie' := map_lie'✝¹ } = { toLinearMap := toLinearMap✝, map_lie' := map_lie'✝ }\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nR : Type u\nL₁ : Type v\nL₂ : Type w\nL₃ : Type w₁\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L₁\ninst✝⁴ : LieAlgebra R L₁\ninst✝³ : LieRing L₂\ninst✝² : LieAlgebra R L₂\ninst✝¹ : LieRing L₃\ninst✝ : LieAlgebra R L₃\nsrc✝ : L₁ →ₗ[R] L₂ := 0\n⊢ ∀ {x y : L₁},\n    AddHom.toFun\n        { toAddHom := src✝.toAddHom,\n            map_smul' :=\n              (_ :\n                ∀ (r : R) (x : L₁),\n                  AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n        ⁅x, y⁆ =\n      ⁅AddHom.toFun\n          { toAddHom := src✝.toAddHom,\n              map_smul' :=\n                (_ :\n                  ∀ (r : R) (x : L₁),\n                    AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n          x,\n        AddHom.toFun\n          { toAddHom := src✝.toAddHom,\n              map_smul' :=\n                (_ :\n                  ∀ (r : R) (x : L₁),\n                    AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n          y⁆\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nL₁ : Type v\nL₂ : Type w\nL₃ : Type w₁\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L₁\ninst✝⁴ : LieAlgebra R L₁\ninst✝³ : LieRing L₂\ninst✝² : LieAlgebra R L₂\ninst✝¹ : LieRing L₃\ninst✝ : LieAlgebra R L₃\n⊢ Injective FunLike.coe\n[PROOFSTEP]\nrintro ⟨⟨⟨f, _⟩, _⟩, _⟩ ⟨⟨⟨g, _⟩, _⟩, _⟩ h\n[GOAL]\ncase mk.mk.mk.mk.mk.mk\nR : Type u\nL₁ : Type v\nL₂ : Type w\nL₃ : Type w₁\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L₁\ninst✝⁴ : LieAlgebra R L₁\ninst✝³ : LieRing L₂\ninst✝² : LieAlgebra R L₂\ninst✝¹ : LieRing L₃\ninst✝ : LieAlgebra R L₃\nf : L₁ → L₂\nmap_add'✝¹ : ∀ (x y : L₁), f (x + y) = f x + f y\nmap_smul'✝¹ :\n  ∀ (r : R) (x : L₁),\n    AddHom.toFun { toFun := f, map_add' := map_add'✝¹ } (r • x) =\n      ↑(RingHom.id R) r • AddHom.toFun { toFun := f, map_add' := map_add'✝¹ } x\nmap_lie'✝¹ :\n  ∀ {x y : L₁},\n    AddHom.toFun { toAddHom := { toFun := f, map_add' := map_add'✝¹ }, map_smul' := map_smul'✝¹ }.toAddHom ⁅x, y⁆ =\n      ⁅AddHom.toFun { toAddHom := { toFun := f, map_add' := map_add'✝¹ }, map_smul' := map_smul'✝¹ }.toAddHom x,\n        AddHom.toFun { toAddHom := { toFun := f, map_add' := map_add'✝¹ }, map_smul' := map_smul'✝¹ }.toAddHom y⁆\ng : L₁ → L₂\nmap_add'✝ : ∀ (x y : L₁), g (x + y) = g x + g y\nmap_smul'✝ :\n  ∀ (r : R) (x : L₁),\n    AddHom.toFun { toFun := g, map_add' := map_add'✝ } (r • x) =\n      ↑(RingHom.id R) r • AddHom.toFun { toFun := g, map_add' := map_add'✝ } x\nmap_lie'✝ :\n  ∀ {x y : L₁},\n    AddHom.toFun { toAddHom := { toFun := g, map_add' := map_add'✝ }, map_smul' := map_smul'✝ }.toAddHom ⁅x, y⁆ =\n      ⁅AddHom.toFun { toAddHom := { toFun := g, map_add' := map_add'✝ }, map_smul' := map_smul'✝ }.toAddHom x,\n        AddHom.toFun { toAddHom := { toFun := g, map_add' := map_add'✝ }, map_smul' := map_smul'✝ }.toAddHom y⁆\nh :\n  ↑{ toLinearMap := { toAddHom := { toFun := f, map_add' := map_add'✝¹ }, map_smul' := map_smul'✝¹ },\n        map_lie' := map_lie'✝¹ } =\n    ↑{ toLinearMap := { toAddHom := { toFun := g, map_add' := map_add'✝ }, map_smul' := map_smul'✝ },\n        map_lie' := map_lie'✝ }\n⊢ { toLinearMap := { toAddHom := { toFun := f, map_add' := map_add'✝¹ }, map_smul' := map_smul'✝¹ },\n      map_lie' := map_lie'✝¹ } =\n    { toLinearMap := { toAddHom := { toFun := g, map_add' := map_add'✝ }, map_smul' := map_smul'✝ },\n      map_lie' := map_lie'✝ }\n[PROOFSTEP]\ncongr\n[GOAL]\nR : Type u\nL₁ : Type v\nL₂ : Type w\nL₃ : Type w₁\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L₁\ninst✝⁴ : LieAlgebra R L₁\ninst✝³ : LieRing L₂\ninst✝² : LieAlgebra R L₂\ninst✝¹ : LieRing L₃\ninst✝ : LieAlgebra R L₃\nf g : L₁ →ₗ⁅R⁆ L₂\n⊢ f = g → ∀ (x : L₁), ↑f x = ↑g x\n[PROOFSTEP]\nrintro rfl x\n[GOAL]\nR : Type u\nL₁ : Type v\nL₂ : Type w\nL₃ : Type w₁\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L₁\ninst✝⁴ : LieAlgebra R L₁\ninst✝³ : LieRing L₂\ninst✝² : LieAlgebra R L₂\ninst✝¹ : LieRing L₃\ninst✝ : LieAlgebra R L₃\nf : L₁ →ₗ⁅R⁆ L₂\nx : L₁\n⊢ ↑f x = ↑f x\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\nL₁ : Type v\nL₂ : Type w\nL₃ : Type w₁\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L₁\ninst✝⁴ : LieAlgebra R L₁\ninst✝³ : LieRing L₂\ninst✝² : LieAlgebra R L₂\ninst✝¹ : LieRing L₃\ninst✝ : LieAlgebra R L₃\nf : L₁ →ₗ⁅R⁆ L₂\nh₁ : ∀ (x y : L₁), ↑f (x + y) = ↑f x + ↑f y\nh₂ :\n  ∀ (r : R) (x : L₁),\n    AddHom.toFun { toFun := ↑f, map_add' := h₁ } (r • x) =\n      ↑(RingHom.id R) r • AddHom.toFun { toFun := ↑f, map_add' := h₁ } x\nh₃ :\n  ∀ {x y : L₁},\n    AddHom.toFun { toAddHom := { toFun := ↑f, map_add' := h₁ }, map_smul' := h₂ }.toAddHom ⁅x, y⁆ =\n      ⁅AddHom.toFun { toAddHom := { toFun := ↑f, map_add' := h₁ }, map_smul' := h₂ }.toAddHom x,\n        AddHom.toFun { toAddHom := { toFun := ↑f, map_add' := h₁ }, map_smul' := h₂ }.toAddHom y⁆\n⊢ { toLinearMap := { toAddHom := { toFun := ↑f, map_add' := h₁ }, map_smul' := h₂ }, map_lie' := h₃ } = f\n[PROOFSTEP]\next\n[GOAL]\ncase h\nR : Type u\nL₁ : Type v\nL₂ : Type w\nL₃ : Type w₁\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L₁\ninst✝⁴ : LieAlgebra R L₁\ninst✝³ : LieRing L₂\ninst✝² : LieAlgebra R L₂\ninst✝¹ : LieRing L₃\ninst✝ : LieAlgebra R L₃\nf : L₁ →ₗ⁅R⁆ L₂\nh₁ : ∀ (x y : L₁), ↑f (x + y) = ↑f x + ↑f y\nh₂ :\n  ∀ (r : R) (x : L₁),\n    AddHom.toFun { toFun := ↑f, map_add' := h₁ } (r • x) =\n      ↑(RingHom.id R) r • AddHom.toFun { toFun := ↑f, map_add' := h₁ } x\nh₃ :\n  ∀ {x y : L₁},\n    AddHom.toFun { toAddHom := { toFun := ↑f, map_add' := h₁ }, map_smul' := h₂ }.toAddHom ⁅x, y⁆ =\n      ⁅AddHom.toFun { toAddHom := { toFun := ↑f, map_add' := h₁ }, map_smul' := h₂ }.toAddHom x,\n        AddHom.toFun { toAddHom := { toFun := ↑f, map_add' := h₁ }, map_smul' := h₂ }.toAddHom y⁆\nx✝ : L₁\n⊢ ↑{ toLinearMap := { toAddHom := { toFun := ↑f, map_add' := h₁ }, map_smul' := h₂ }, map_lie' := h₃ } x✝ = ↑f x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\nL₁ : Type v\nL₂ : Type w\nL₃ : Type w₁\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L₁\ninst✝⁴ : LieAlgebra R L₁\ninst✝³ : LieRing L₂\ninst✝² : LieAlgebra R L₂\ninst✝¹ : LieRing L₃\ninst✝ : LieAlgebra R L₃\nf : L₂ →ₗ⁅R⁆ L₃\ng : L₁ →ₗ⁅R⁆ L₂\nsrc✝ : L₁ →ₗ[R] L₃ := LinearMap.comp ↑f ↑g\n⊢ ∀ {x y : L₁},\n    AddHom.toFun\n        { toAddHom := src✝.toAddHom,\n            map_smul' :=\n              (_ :\n                ∀ (r : R) (x : L₁),\n                  AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n        ⁅x, y⁆ =\n      ⁅AddHom.toFun\n          { toAddHom := src✝.toAddHom,\n              map_smul' :=\n                (_ :\n                  ∀ (r : R) (x : L₁),\n                    AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n          x,\n        AddHom.toFun\n          { toAddHom := src✝.toAddHom,\n              map_smul' :=\n                (_ :\n                  ∀ (r : R) (x : L₁),\n                    AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n          y⁆\n[PROOFSTEP]\nintros x y\n[GOAL]\nR : Type u\nL₁ : Type v\nL₂ : Type w\nL₃ : Type w₁\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L₁\ninst✝⁴ : LieAlgebra R L₁\ninst✝³ : LieRing L₂\ninst✝² : LieAlgebra R L₂\ninst✝¹ : LieRing L₃\ninst✝ : LieAlgebra R L₃\nf : L₂ →ₗ⁅R⁆ L₃\ng : L₁ →ₗ⁅R⁆ L₂\nsrc✝ : L₁ →ₗ[R] L₃ := LinearMap.comp ↑f ↑g\nx y : L₁\n⊢ AddHom.toFun\n      { toAddHom := src✝.toAddHom,\n          map_smul' :=\n            (_ :\n              ∀ (r : R) (x : L₁),\n                AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n      ⁅x, y⁆ =\n    ⁅AddHom.toFun\n        { toAddHom := src✝.toAddHom,\n            map_smul' :=\n              (_ :\n                ∀ (r : R) (x : L₁),\n                  AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n        x,\n      AddHom.toFun\n        { toAddHom := src✝.toAddHom,\n            map_smul' :=\n              (_ :\n                ∀ (r : R) (x : L₁),\n                  AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n        y⁆\n[PROOFSTEP]\nchange f (g ⁅x, y⁆) = ⁅f (g x), f (g y)⁆\n[GOAL]\nR : Type u\nL₁ : Type v\nL₂ : Type w\nL₃ : Type w₁\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L₁\ninst✝⁴ : LieAlgebra R L₁\ninst✝³ : LieRing L₂\ninst✝² : LieAlgebra R L₂\ninst✝¹ : LieRing L₃\ninst✝ : LieAlgebra R L₃\nf : L₂ →ₗ⁅R⁆ L₃\ng : L₁ →ₗ⁅R⁆ L₂\nsrc✝ : L₁ →ₗ[R] L₃ := LinearMap.comp ↑f ↑g\nx y : L₁\n⊢ ↑f (↑g ⁅x, y⁆) = ⁅↑f (↑g x), ↑f (↑g y)⁆\n[PROOFSTEP]\nrw [map_lie, map_lie]\n[GOAL]\nR : Type u\nL₁ : Type v\nL₂ : Type w\nL₃ : Type w₁\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L₁\ninst✝⁴ : LieAlgebra R L₁\ninst✝³ : LieRing L₂\ninst✝² : LieAlgebra R L₂\ninst✝¹ : LieRing L₃\ninst✝ : LieAlgebra R L₃\nf : L₁ →ₗ⁅R⁆ L₂\n⊢ comp f id = f\n[PROOFSTEP]\next\n[GOAL]\ncase h\nR : Type u\nL₁ : Type v\nL₂ : Type w\nL₃ : Type w₁\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L₁\ninst✝⁴ : LieAlgebra R L₁\ninst✝³ : LieRing L₂\ninst✝² : LieAlgebra R L₂\ninst✝¹ : LieRing L₃\ninst✝ : LieAlgebra R L₃\nf : L₁ →ₗ⁅R⁆ L₂\nx✝ : L₁\n⊢ ↑(comp f id) x✝ = ↑f x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\nL₁ : Type v\nL₂ : Type w\nL₃ : Type w₁\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L₁\ninst✝⁴ : LieAlgebra R L₁\ninst✝³ : LieRing L₂\ninst✝² : LieAlgebra R L₂\ninst✝¹ : LieRing L₃\ninst✝ : LieAlgebra R L₃\nf : L₁ →ₗ⁅R⁆ L₂\n⊢ comp id f = f\n[PROOFSTEP]\next\n[GOAL]\ncase h\nR : Type u\nL₁ : Type v\nL₂ : Type w\nL₃ : Type w₁\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L₁\ninst✝⁴ : LieAlgebra R L₁\ninst✝³ : LieRing L₂\ninst✝² : LieAlgebra R L₂\ninst✝¹ : LieRing L₃\ninst✝ : LieAlgebra R L₃\nf : L₁ →ₗ⁅R⁆ L₂\nx✝ : L₁\n⊢ ↑(comp id f) x✝ = ↑f x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\nL₁ : Type v\nL₂ : Type w\nL₃ : Type w₁\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L₁\ninst✝⁴ : LieAlgebra R L₁\ninst✝³ : LieRing L₂\ninst✝² : LieAlgebra R L₂\ninst✝¹ : LieRing L₃\ninst✝ : LieAlgebra R L₃\nf : L₁ →ₗ⁅R⁆ L₂\ng : L₂ → L₁\nh₁ : LeftInverse g ↑f\nh₂ : Function.RightInverse g ↑f\nsrc✝ : L₂ →ₗ[R] L₁ := LinearMap.inverse (↑f) g h₁ h₂\n⊢ ∀ {x y : L₂},\n    AddHom.toFun\n        { toAddHom := src✝.toAddHom,\n            map_smul' :=\n              (_ :\n                ∀ (r : R) (x : L₂),\n                  AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n        ⁅x, y⁆ =\n      ⁅AddHom.toFun\n          { toAddHom := src✝.toAddHom,\n              map_smul' :=\n                (_ :\n                  ∀ (r : R) (x : L₂),\n                    AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n          x,\n        AddHom.toFun\n          { toAddHom := src✝.toAddHom,\n              map_smul' :=\n                (_ :\n                  ∀ (r : R) (x : L₂),\n                    AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n          y⁆\n[PROOFSTEP]\nintros x y\n[GOAL]\nR : Type u\nL₁ : Type v\nL₂ : Type w\nL₃ : Type w₁\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L₁\ninst✝⁴ : LieAlgebra R L₁\ninst✝³ : LieRing L₂\ninst✝² : LieAlgebra R L₂\ninst✝¹ : LieRing L₃\ninst✝ : LieAlgebra R L₃\nf : L₁ →ₗ⁅R⁆ L₂\ng : L₂ → L₁\nh₁ : LeftInverse g ↑f\nh₂ : Function.RightInverse g ↑f\nsrc✝ : L₂ →ₗ[R] L₁ := LinearMap.inverse (↑f) g h₁ h₂\nx y : L₂\n⊢ AddHom.toFun\n      { toAddHom := src✝.toAddHom,\n          map_smul' :=\n            (_ :\n              ∀ (r : R) (x : L₂),\n                AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n      ⁅x, y⁆ =\n    ⁅AddHom.toFun\n        { toAddHom := src✝.toAddHom,\n            map_smul' :=\n              (_ :\n                ∀ (r : R) (x : L₂),\n                  AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n        x,\n      AddHom.toFun\n        { toAddHom := src✝.toAddHom,\n            map_smul' :=\n              (_ :\n                ∀ (r : R) (x : L₂),\n                  AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n        y⁆\n[PROOFSTEP]\ncalc\n  g ⁅x, y⁆ = g ⁅f (g x), f (g y)⁆ := by conv_lhs => rw [← h₂ x, ← h₂ y]\n  _ = g (f ⁅g x, g y⁆) := by rw [map_lie]\n  _ = ⁅g x, g y⁆ := h₁ _\n[GOAL]\nR : Type u\nL₁ : Type v\nL₂ : Type w\nL₃ : Type w₁\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L₁\ninst✝⁴ : LieAlgebra R L₁\ninst✝³ : LieRing L₂\ninst✝² : LieAlgebra R L₂\ninst✝¹ : LieRing L₃\ninst✝ : LieAlgebra R L₃\nf : L₁ →ₗ⁅R⁆ L₂\ng : L₂ → L₁\nh₁ : LeftInverse g ↑f\nh₂ : Function.RightInverse g ↑f\nsrc✝ : L₂ →ₗ[R] L₁ := LinearMap.inverse (↑f) g h₁ h₂\nx y : L₂\n⊢ g ⁅x, y⁆ = g ⁅↑f (g x), ↑f (g y)⁆\n[PROOFSTEP]\nconv_lhs => rw [← h₂ x, ← h₂ y]\n[GOAL]\nR : Type u\nL₁ : Type v\nL₂ : Type w\nL₃ : Type w₁\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L₁\ninst✝⁴ : LieAlgebra R L₁\ninst✝³ : LieRing L₂\ninst✝² : LieAlgebra R L₂\ninst✝¹ : LieRing L₃\ninst✝ : LieAlgebra R L₃\nf : L₁ →ₗ⁅R⁆ L₂\ng : L₂ → L₁\nh₁ : LeftInverse g ↑f\nh₂ : Function.RightInverse g ↑f\nsrc✝ : L₂ →ₗ[R] L₁ := LinearMap.inverse (↑f) g h₁ h₂\nx y : L₂\n| g ⁅x, y⁆\n[PROOFSTEP]\nrw [← h₂ x, ← h₂ y]\n[GOAL]\nR : Type u\nL₁ : Type v\nL₂ : Type w\nL₃ : Type w₁\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L₁\ninst✝⁴ : LieAlgebra R L₁\ninst✝³ : LieRing L₂\ninst✝² : LieAlgebra R L₂\ninst✝¹ : LieRing L₃\ninst✝ : LieAlgebra R L₃\nf : L₁ →ₗ⁅R⁆ L₂\ng : L₂ → L₁\nh₁ : LeftInverse g ↑f\nh₂ : Function.RightInverse g ↑f\nsrc✝ : L₂ →ₗ[R] L₁ := LinearMap.inverse (↑f) g h₁ h₂\nx y : L₂\n| g ⁅x, y⁆\n[PROOFSTEP]\nrw [← h₂ x, ← h₂ y]\n[GOAL]\nR : Type u\nL₁ : Type v\nL₂ : Type w\nL₃ : Type w₁\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L₁\ninst✝⁴ : LieAlgebra R L₁\ninst✝³ : LieRing L₂\ninst✝² : LieAlgebra R L₂\ninst✝¹ : LieRing L₃\ninst✝ : LieAlgebra R L₃\nf : L₁ →ₗ⁅R⁆ L₂\ng : L₂ → L₁\nh₁ : LeftInverse g ↑f\nh₂ : Function.RightInverse g ↑f\nsrc✝ : L₂ →ₗ[R] L₁ := LinearMap.inverse (↑f) g h₁ h₂\nx y : L₂\n| g ⁅x, y⁆\n[PROOFSTEP]\nrw [← h₂ x, ← h₂ y]\n[GOAL]\nR : Type u\nL₁ : Type v\nL₂ : Type w\nL₃ : Type w₁\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L₁\ninst✝⁴ : LieAlgebra R L₁\ninst✝³ : LieRing L₂\ninst✝² : LieAlgebra R L₂\ninst✝¹ : LieRing L₃\ninst✝ : LieAlgebra R L₃\nf : L₁ →ₗ⁅R⁆ L₂\ng : L₂ → L₁\nh₁ : LeftInverse g ↑f\nh₂ : Function.RightInverse g ↑f\nsrc✝ : L₂ →ₗ[R] L₁ := LinearMap.inverse (↑f) g h₁ h₂\nx y : L₂\n⊢ g ⁅↑f (g x), ↑f (g y)⁆ = g (↑f ⁅g x, g y⁆)\n[PROOFSTEP]\nrw [map_lie]\n[GOAL]\nR : Type u\nL₁ : Type v\nL₂ : Type w\nM : Type w₁\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L₁\ninst✝⁴ : LieAlgebra R L₁\ninst✝³ : LieRing L₂\ninst✝² : LieAlgebra R L₂\ninst✝¹ : AddCommGroup M\ninst✝ : LieRingModule L₂ M\nf : L₁ →ₗ⁅R⁆ L₂\nx y : L₁\nm : M\n⊢ ⁅x + y, m⁆ = ⁅x, m⁆ + ⁅y, m⁆\n[PROOFSTEP]\nsimp only [LieHom.map_add, add_lie]\n[GOAL]\nR : Type u\nL₁ : Type v\nL₂ : Type w\nM : Type w₁\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L₁\ninst✝⁴ : LieAlgebra R L₁\ninst✝³ : LieRing L₂\ninst✝² : LieAlgebra R L₂\ninst✝¹ : AddCommGroup M\ninst✝ : LieRingModule L₂ M\nf : L₁ →ₗ⁅R⁆ L₂\nx y : L₁\nm : M\n⊢ ⁅x, ⁅y, m⁆⁆ = ⁅⁅x, y⁆, m⁆ + ⁅y, ⁅x, m⁆⁆\n[PROOFSTEP]\nsimp only [lie_lie, sub_add_cancel, LieHom.map_lie]\n[GOAL]\nR : Type u\nL₁ : Type v\nL₂ : Type w\nM : Type w₁\ninst✝⁸ : CommRing R\ninst✝⁷ : LieRing L₁\ninst✝⁶ : LieAlgebra R L₁\ninst✝⁵ : LieRing L₂\ninst✝⁴ : LieAlgebra R L₂\ninst✝³ : AddCommGroup M\ninst✝² : LieRingModule L₂ M\nf : L₁ →ₗ⁅R⁆ L₂\ninst✝¹ : Module R M\ninst✝ : LieModule R L₂ M\nsrc✝ : LieRingModule L₁ M := LieRingModule.compLieHom M f\nt : R\nx : L₁\nm : M\n⊢ ⁅t • x, m⁆ = t • ⁅x, m⁆\n[PROOFSTEP]\nsimp only [LieRingModule.compLieHom_apply, smul_lie, LieHom.map_smul]\n[GOAL]\nR : Type u\nL₁ : Type v\nL₂ : Type w\nM : Type w₁\ninst✝⁸ : CommRing R\ninst✝⁷ : LieRing L₁\ninst✝⁶ : LieAlgebra R L₁\ninst✝⁵ : LieRing L₂\ninst✝⁴ : LieAlgebra R L₂\ninst✝³ : AddCommGroup M\ninst✝² : LieRingModule L₂ M\nf : L₁ →ₗ⁅R⁆ L₂\ninst✝¹ : Module R M\ninst✝ : LieModule R L₂ M\nsrc✝ : LieRingModule L₁ M := LieRingModule.compLieHom M f\nt : R\nx : L₁\nm : M\n⊢ ⁅x, t • m⁆ = t • ⁅x, m⁆\n[PROOFSTEP]\nsimp only [LieRingModule.compLieHom_apply, lie_smul]\n[GOAL]\nR : Type u\nL₁ : Type v\nL₂ : Type w\nL₃ : Type w₁\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L₁\ninst✝⁴ : LieRing L₂\ninst✝³ : LieRing L₃\ninst✝² : LieAlgebra R L₁\ninst✝¹ : LieAlgebra R L₂\ninst✝ : LieAlgebra R L₃\nf g : L₁ ≃ₗ⁅R⁆ L₂\nh₁ : (fun f => f.toFun) f = (fun f => f.toFun) g\nh₂ : (fun f => f.invFun) f = (fun f => f.invFun) g\n⊢ f = g\n[PROOFSTEP]\ncases f\n[GOAL]\ncase mk\nR : Type u\nL₁ : Type v\nL₂ : Type w\nL₃ : Type w₁\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L₁\ninst✝⁴ : LieRing L₂\ninst✝³ : LieRing L₃\ninst✝² : LieAlgebra R L₁\ninst✝¹ : LieAlgebra R L₂\ninst✝ : LieAlgebra R L₃\ng : L₁ ≃ₗ⁅R⁆ L₂\ntoLieHom✝ : L₁ →ₗ⁅R⁆ L₂\ninvFun✝ : L₂ → L₁\nleft_inv✝ : LeftInverse invFun✝ toLieHom✝.toFun\nright_inv✝ : Function.RightInverse invFun✝ toLieHom✝.toFun\nh₁ :\n  (fun f => f.toFun) { toLieHom := toLieHom✝, invFun := invFun✝, left_inv := left_inv✝, right_inv := right_inv✝ } =\n    (fun f => f.toFun) g\nh₂ :\n  (fun f => f.invFun) { toLieHom := toLieHom✝, invFun := invFun✝, left_inv := left_inv✝, right_inv := right_inv✝ } =\n    (fun f => f.invFun) g\n⊢ { toLieHom := toLieHom✝, invFun := invFun✝, left_inv := left_inv✝, right_inv := right_inv✝ } = g\n[PROOFSTEP]\ncases g\n[GOAL]\ncase mk.mk\nR : Type u\nL₁ : Type v\nL₂ : Type w\nL₃ : Type w₁\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L₁\ninst✝⁴ : LieRing L₂\ninst✝³ : LieRing L₃\ninst✝² : LieAlgebra R L₁\ninst✝¹ : LieAlgebra R L₂\ninst✝ : LieAlgebra R L₃\ntoLieHom✝¹ : L₁ →ₗ⁅R⁆ L₂\ninvFun✝¹ : L₂ → L₁\nleft_inv✝¹ : LeftInverse invFun✝¹ toLieHom✝¹.toFun\nright_inv✝¹ : Function.RightInverse invFun✝¹ toLieHom✝¹.toFun\ntoLieHom✝ : L₁ →ₗ⁅R⁆ L₂\ninvFun✝ : L₂ → L₁\nleft_inv✝ : LeftInverse invFun✝ toLieHom✝.toFun\nright_inv✝ : Function.RightInverse invFun✝ toLieHom✝.toFun\nh₁ :\n  (fun f => f.toFun) { toLieHom := toLieHom✝¹, invFun := invFun✝¹, left_inv := left_inv✝¹, right_inv := right_inv✝¹ } =\n    (fun f => f.toFun) { toLieHom := toLieHom✝, invFun := invFun✝, left_inv := left_inv✝, right_inv := right_inv✝ }\nh₂ :\n  (fun f => f.invFun) { toLieHom := toLieHom✝¹, invFun := invFun✝¹, left_inv := left_inv✝¹, right_inv := right_inv✝¹ } =\n    (fun f => f.invFun) { toLieHom := toLieHom✝, invFun := invFun✝, left_inv := left_inv✝, right_inv := right_inv✝ }\n⊢ { toLieHom := toLieHom✝¹, invFun := invFun✝¹, left_inv := left_inv✝¹, right_inv := right_inv✝¹ } =\n    { toLieHom := toLieHom✝, invFun := invFun✝, left_inv := left_inv✝, right_inv := right_inv✝ }\n[PROOFSTEP]\nsimp at h₁ h₂ \n[GOAL]\ncase mk.mk\nR : Type u\nL₁ : Type v\nL₂ : Type w\nL₃ : Type w₁\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L₁\ninst✝⁴ : LieRing L₂\ninst✝³ : LieRing L₃\ninst✝² : LieAlgebra R L₁\ninst✝¹ : LieAlgebra R L₂\ninst✝ : LieAlgebra R L₃\ntoLieHom✝¹ : L₁ →ₗ⁅R⁆ L₂\ninvFun✝¹ : L₂ → L₁\nleft_inv✝¹ : LeftInverse invFun✝¹ toLieHom✝¹.toFun\nright_inv✝¹ : Function.RightInverse invFun✝¹ toLieHom✝¹.toFun\ntoLieHom✝ : L₁ →ₗ⁅R⁆ L₂\ninvFun✝ : L₂ → L₁\nleft_inv✝ : LeftInverse invFun✝ toLieHom✝.toFun\nright_inv✝ : Function.RightInverse invFun✝ toLieHom✝.toFun\nh₂ : invFun✝¹ = invFun✝\nh₁ : toLieHom✝¹ = toLieHom✝\n⊢ { toLieHom := toLieHom✝¹, invFun := invFun✝¹, left_inv := left_inv✝¹, right_inv := right_inv✝¹ } =\n    { toLieHom := toLieHom✝, invFun := invFun✝, left_inv := left_inv✝, right_inv := right_inv✝ }\n[PROOFSTEP]\nsimp [*]\n[GOAL]\nR : Type u\nL₁ : Type v\nL₂ : Type w\nL₃ : Type w₁\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L₁\ninst✝⁴ : LieRing L₂\ninst✝³ : LieRing L₃\ninst✝² : LieAlgebra R L₁\ninst✝¹ : LieAlgebra R L₂\ninst✝ : LieAlgebra R L₃\n⊢ Injective toLinearEquiv\n[PROOFSTEP]\nrintro ⟨⟨⟨⟨f, -⟩, -⟩, -⟩, f_inv⟩ ⟨⟨⟨⟨g, -⟩, -⟩, -⟩, g_inv⟩\n[GOAL]\ncase mk.mk.mk.mk.mk.mk.mk.mk\nR : Type u\nL₁ : Type v\nL₂ : Type w\nL₃ : Type w₁\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L₁\ninst✝⁴ : LieRing L₂\ninst✝³ : LieRing L₃\ninst✝² : LieAlgebra R L₁\ninst✝¹ : LieAlgebra R L₂\ninst✝ : LieAlgebra R L₃\nf_inv : L₂ → L₁\nf : L₁ → L₂\nmap_add'✝¹ : ∀ (x y : L₁), f (x + y) = f x + f y\nmap_smul'✝¹ :\n  ∀ (r : R) (x : L₁),\n    AddHom.toFun { toFun := f, map_add' := map_add'✝¹ } (r • x) =\n      ↑(RingHom.id R) r • AddHom.toFun { toFun := f, map_add' := map_add'✝¹ } x\nmap_lie'✝¹ :\n  ∀ {x y : L₁},\n    AddHom.toFun { toAddHom := { toFun := f, map_add' := map_add'✝¹ }, map_smul' := map_smul'✝¹ }.toAddHom ⁅x, y⁆ =\n      ⁅AddHom.toFun { toAddHom := { toFun := f, map_add' := map_add'✝¹ }, map_smul' := map_smul'✝¹ }.toAddHom x,\n        AddHom.toFun { toAddHom := { toFun := f, map_add' := map_add'✝¹ }, map_smul' := map_smul'✝¹ }.toAddHom y⁆\nleft_inv✝¹ :\n  LeftInverse f_inv\n    (↑{ toLinearMap := { toAddHom := { toFun := f, map_add' := map_add'✝¹ }, map_smul' := map_smul'✝¹ },\n            map_lie' := map_lie'✝¹ }).toAddHom.toFun\nright_inv✝¹ :\n  Function.RightInverse f_inv\n    (↑{ toLinearMap := { toAddHom := { toFun := f, map_add' := map_add'✝¹ }, map_smul' := map_smul'✝¹ },\n            map_lie' := map_lie'✝¹ }).toAddHom.toFun\ng_inv : L₂ → L₁\ng : L₁ → L₂\nmap_add'✝ : ∀ (x y : L₁), g (x + y) = g x + g y\nmap_smul'✝ :\n  ∀ (r : R) (x : L₁),\n    AddHom.toFun { toFun := g, map_add' := map_add'✝ } (r • x) =\n      ↑(RingHom.id R) r • AddHom.toFun { toFun := g, map_add' := map_add'✝ } x\nmap_lie'✝ :\n  ∀ {x y : L₁},\n    AddHom.toFun { toAddHom := { toFun := g, map_add' := map_add'✝ }, map_smul' := map_smul'✝ }.toAddHom ⁅x, y⁆ =\n      ⁅AddHom.toFun { toAddHom := { toFun := g, map_add' := map_add'✝ }, map_smul' := map_smul'✝ }.toAddHom x,\n        AddHom.toFun { toAddHom := { toFun := g, map_add' := map_add'✝ }, map_smul' := map_smul'✝ }.toAddHom y⁆\nleft_inv✝ :\n  LeftInverse g_inv\n    (↑{ toLinearMap := { toAddHom := { toFun := g, map_add' := map_add'✝ }, map_smul' := map_smul'✝ },\n            map_lie' := map_lie'✝ }).toAddHom.toFun\nright_inv✝ :\n  Function.RightInverse g_inv\n    (↑{ toLinearMap := { toAddHom := { toFun := g, map_add' := map_add'✝ }, map_smul' := map_smul'✝ },\n            map_lie' := map_lie'✝ }).toAddHom.toFun\n⊢ toLinearEquiv\n        {\n          toLieHom :=\n            { toLinearMap := { toAddHom := { toFun := f, map_add' := map_add'✝¹ }, map_smul' := map_smul'✝¹ },\n              map_lie' := map_lie'✝¹ },\n          invFun := f_inv, left_inv := left_inv✝¹, right_inv := right_inv✝¹ } =\n      toLinearEquiv\n        {\n          toLieHom :=\n            { toLinearMap := { toAddHom := { toFun := g, map_add' := map_add'✝ }, map_smul' := map_smul'✝ },\n              map_lie' := map_lie'✝ },\n          invFun := g_inv, left_inv := left_inv✝, right_inv := right_inv✝ } →\n    {\n        toLieHom :=\n          { toLinearMap := { toAddHom := { toFun := f, map_add' := map_add'✝¹ }, map_smul' := map_smul'✝¹ },\n            map_lie' := map_lie'✝¹ },\n        invFun := f_inv, left_inv := left_inv✝¹, right_inv := right_inv✝¹ } =\n      {\n        toLieHom :=\n          { toLinearMap := { toAddHom := { toFun := g, map_add' := map_add'✝ }, map_smul' := map_smul'✝ },\n            map_lie' := map_lie'✝ },\n        invFun := g_inv, left_inv := left_inv✝, right_inv := right_inv✝ }\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mk.mk.mk.mk.mk.mk.mk.mk\nR : Type u\nL₁ : Type v\nL₂ : Type w\nL₃ : Type w₁\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L₁\ninst✝⁴ : LieRing L₂\ninst✝³ : LieRing L₃\ninst✝² : LieAlgebra R L₁\ninst✝¹ : LieAlgebra R L₂\ninst✝ : LieAlgebra R L₃\nf_inv : L₂ → L₁\nf : L₁ → L₂\nmap_add'✝¹ : ∀ (x y : L₁), f (x + y) = f x + f y\nmap_smul'✝¹ :\n  ∀ (r : R) (x : L₁),\n    AddHom.toFun { toFun := f, map_add' := map_add'✝¹ } (r • x) =\n      ↑(RingHom.id R) r • AddHom.toFun { toFun := f, map_add' := map_add'✝¹ } x\nmap_lie'✝¹ :\n  ∀ {x y : L₁},\n    AddHom.toFun { toAddHom := { toFun := f, map_add' := map_add'✝¹ }, map_smul' := map_smul'✝¹ }.toAddHom ⁅x, y⁆ =\n      ⁅AddHom.toFun { toAddHom := { toFun := f, map_add' := map_add'✝¹ }, map_smul' := map_smul'✝¹ }.toAddHom x,\n        AddHom.toFun { toAddHom := { toFun := f, map_add' := map_add'✝¹ }, map_smul' := map_smul'✝¹ }.toAddHom y⁆\nleft_inv✝¹ :\n  LeftInverse f_inv\n    (↑{ toLinearMap := { toAddHom := { toFun := f, map_add' := map_add'✝¹ }, map_smul' := map_smul'✝¹ },\n            map_lie' := map_lie'✝¹ }).toAddHom.toFun\nright_inv✝¹ :\n  Function.RightInverse f_inv\n    (↑{ toLinearMap := { toAddHom := { toFun := f, map_add' := map_add'✝¹ }, map_smul' := map_smul'✝¹ },\n            map_lie' := map_lie'✝¹ }).toAddHom.toFun\ng_inv : L₂ → L₁\ng : L₁ → L₂\nmap_add'✝ : ∀ (x y : L₁), g (x + y) = g x + g y\nmap_smul'✝ :\n  ∀ (r : R) (x : L₁),\n    AddHom.toFun { toFun := g, map_add' := map_add'✝ } (r • x) =\n      ↑(RingHom.id R) r • AddHom.toFun { toFun := g, map_add' := map_add'✝ } x\nmap_lie'✝ :\n  ∀ {x y : L₁},\n    AddHom.toFun { toAddHom := { toFun := g, map_add' := map_add'✝ }, map_smul' := map_smul'✝ }.toAddHom ⁅x, y⁆ =\n      ⁅AddHom.toFun { toAddHom := { toFun := g, map_add' := map_add'✝ }, map_smul' := map_smul'✝ }.toAddHom x,\n        AddHom.toFun { toAddHom := { toFun := g, map_add' := map_add'✝ }, map_smul' := map_smul'✝ }.toAddHom y⁆\nleft_inv✝ :\n  LeftInverse g_inv\n    (↑{ toLinearMap := { toAddHom := { toFun := g, map_add' := map_add'✝ }, map_smul' := map_smul'✝ },\n            map_lie' := map_lie'✝ }).toAddHom.toFun\nright_inv✝ :\n  Function.RightInverse g_inv\n    (↑{ toLinearMap := { toAddHom := { toFun := g, map_add' := map_add'✝ }, map_smul' := map_smul'✝ },\n            map_lie' := map_lie'✝ }).toAddHom.toFun\nh :\n  toLinearEquiv\n      {\n        toLieHom :=\n          { toLinearMap := { toAddHom := { toFun := f, map_add' := map_add'✝¹ }, map_smul' := map_smul'✝¹ },\n            map_lie' := map_lie'✝¹ },\n        invFun := f_inv, left_inv := left_inv✝¹, right_inv := right_inv✝¹ } =\n    toLinearEquiv\n      {\n        toLieHom :=\n          { toLinearMap := { toAddHom := { toFun := g, map_add' := map_add'✝ }, map_smul' := map_smul'✝ },\n            map_lie' := map_lie'✝ },\n        invFun := g_inv, left_inv := left_inv✝, right_inv := right_inv✝ }\n⊢ {\n      toLieHom :=\n        { toLinearMap := { toAddHom := { toFun := f, map_add' := map_add'✝¹ }, map_smul' := map_smul'✝¹ },\n          map_lie' := map_lie'✝¹ },\n      invFun := f_inv, left_inv := left_inv✝¹, right_inv := right_inv✝¹ } =\n    {\n      toLieHom :=\n        { toLinearMap := { toAddHom := { toFun := g, map_add' := map_add'✝ }, map_smul' := map_smul'✝ },\n          map_lie' := map_lie'✝ },\n      invFun := g_inv, left_inv := left_inv✝, right_inv := right_inv✝ }\n[PROOFSTEP]\nsimp only [to_linearEquiv_mk, LinearEquiv.mk.injEq, LinearMap.mk.injEq, AddHom.mk.injEq] at h \n[GOAL]\ncase mk.mk.mk.mk.mk.mk.mk.mk\nR : Type u\nL₁ : Type v\nL₂ : Type w\nL₃ : Type w₁\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L₁\ninst✝⁴ : LieRing L₂\ninst✝³ : LieRing L₃\ninst✝² : LieAlgebra R L₁\ninst✝¹ : LieAlgebra R L₂\ninst✝ : LieAlgebra R L₃\nf_inv : L₂ → L₁\nf : L₁ → L₂\nmap_add'✝¹ : ∀ (x y : L₁), f (x + y) = f x + f y\nmap_smul'✝¹ :\n  ∀ (r : R) (x : L₁),\n    AddHom.toFun { toFun := f, map_add' := map_add'✝¹ } (r • x) =\n      ↑(RingHom.id R) r • AddHom.toFun { toFun := f, map_add' := map_add'✝¹ } x\nmap_lie'✝¹ :\n  ∀ {x y : L₁},\n    AddHom.toFun { toAddHom := { toFun := f, map_add' := map_add'✝¹ }, map_smul' := map_smul'✝¹ }.toAddHom ⁅x, y⁆ =\n      ⁅AddHom.toFun { toAddHom := { toFun := f, map_add' := map_add'✝¹ }, map_smul' := map_smul'✝¹ }.toAddHom x,\n        AddHom.toFun { toAddHom := { toFun := f, map_add' := map_add'✝¹ }, map_smul' := map_smul'✝¹ }.toAddHom y⁆\nleft_inv✝¹ :\n  LeftInverse f_inv\n    (↑{ toLinearMap := { toAddHom := { toFun := f, map_add' := map_add'✝¹ }, map_smul' := map_smul'✝¹ },\n            map_lie' := map_lie'✝¹ }).toAddHom.toFun\nright_inv✝¹ :\n  Function.RightInverse f_inv\n    (↑{ toLinearMap := { toAddHom := { toFun := f, map_add' := map_add'✝¹ }, map_smul' := map_smul'✝¹ },\n            map_lie' := map_lie'✝¹ }).toAddHom.toFun\ng_inv : L₂ → L₁\ng : L₁ → L₂\nmap_add'✝ : ∀ (x y : L₁), g (x + y) = g x + g y\nmap_smul'✝ :\n  ∀ (r : R) (x : L₁),\n    AddHom.toFun { toFun := g, map_add' := map_add'✝ } (r • x) =\n      ↑(RingHom.id R) r • AddHom.toFun { toFun := g, map_add' := map_add'✝ } x\nmap_lie'✝ :\n  ∀ {x y : L₁},\n    AddHom.toFun { toAddHom := { toFun := g, map_add' := map_add'✝ }, map_smul' := map_smul'✝ }.toAddHom ⁅x, y⁆ =\n      ⁅AddHom.toFun { toAddHom := { toFun := g, map_add' := map_add'✝ }, map_smul' := map_smul'✝ }.toAddHom x,\n        AddHom.toFun { toAddHom := { toFun := g, map_add' := map_add'✝ }, map_smul' := map_smul'✝ }.toAddHom y⁆\nleft_inv✝ :\n  LeftInverse g_inv\n    (↑{ toLinearMap := { toAddHom := { toFun := g, map_add' := map_add'✝ }, map_smul' := map_smul'✝ },\n            map_lie' := map_lie'✝ }).toAddHom.toFun\nright_inv✝ :\n  Function.RightInverse g_inv\n    (↑{ toLinearMap := { toAddHom := { toFun := g, map_add' := map_add'✝ }, map_smul' := map_smul'✝ },\n            map_lie' := map_lie'✝ }).toAddHom.toFun\nh : f = g ∧ f_inv = g_inv\n⊢ {\n      toLieHom :=\n        { toLinearMap := { toAddHom := { toFun := f, map_add' := map_add'✝¹ }, map_smul' := map_smul'✝¹ },\n          map_lie' := map_lie'✝¹ },\n      invFun := f_inv, left_inv := left_inv✝¹, right_inv := right_inv✝¹ } =\n    {\n      toLieHom :=\n        { toLinearMap := { toAddHom := { toFun := g, map_add' := map_add'✝ }, map_smul' := map_smul'✝ },\n          map_lie' := map_lie'✝ },\n      invFun := g_inv, left_inv := left_inv✝, right_inv := right_inv✝ }\n[PROOFSTEP]\ncongr\n[GOAL]\ncase mk.mk.mk.mk.mk.mk.mk.mk.e_toLieHom.e_toLinearMap.e_toAddHom.e_toFun\nR : Type u\nL₁ : Type v\nL₂ : Type w\nL₃ : Type w₁\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L₁\ninst✝⁴ : LieRing L₂\ninst✝³ : LieRing L₃\ninst✝² : LieAlgebra R L₁\ninst✝¹ : LieAlgebra R L₂\ninst✝ : LieAlgebra R L₃\nf_inv : L₂ → L₁\nf : L₁ → L₂\nmap_add'✝¹ : ∀ (x y : L₁), f (x + y) = f x + f y\nmap_smul'✝¹ :\n  ∀ (r : R) (x : L₁),\n    AddHom.toFun { toFun := f, map_add' := map_add'✝¹ } (r • x) =\n      ↑(RingHom.id R) r • AddHom.toFun { toFun := f, map_add' := map_add'✝¹ } x\nmap_lie'✝¹ :\n  ∀ {x y : L₁},\n    AddHom.toFun { toAddHom := { toFun := f, map_add' := map_add'✝¹ }, map_smul' := map_smul'✝¹ }.toAddHom ⁅x, y⁆ =\n      ⁅AddHom.toFun { toAddHom := { toFun := f, map_add' := map_add'✝¹ }, map_smul' := map_smul'✝¹ }.toAddHom x,\n        AddHom.toFun { toAddHom := { toFun := f, map_add' := map_add'✝¹ }, map_smul' := map_smul'✝¹ }.toAddHom y⁆\nleft_inv✝¹ :\n  LeftInverse f_inv\n    (↑{ toLinearMap := { toAddHom := { toFun := f, map_add' := map_add'✝¹ }, map_smul' := map_smul'✝¹ },\n            map_lie' := map_lie'✝¹ }).toAddHom.toFun\nright_inv✝¹ :\n  Function.RightInverse f_inv\n    (↑{ toLinearMap := { toAddHom := { toFun := f, map_add' := map_add'✝¹ }, map_smul' := map_smul'✝¹ },\n            map_lie' := map_lie'✝¹ }).toAddHom.toFun\ng_inv : L₂ → L₁\ng : L₁ → L₂\nmap_add'✝ : ∀ (x y : L₁), g (x + y) = g x + g y\nmap_smul'✝ :\n  ∀ (r : R) (x : L₁),\n    AddHom.toFun { toFun := g, map_add' := map_add'✝ } (r • x) =\n      ↑(RingHom.id R) r • AddHom.toFun { toFun := g, map_add' := map_add'✝ } x\nmap_lie'✝ :\n  ∀ {x y : L₁},\n    AddHom.toFun { toAddHom := { toFun := g, map_add' := map_add'✝ }, map_smul' := map_smul'✝ }.toAddHom ⁅x, y⁆ =\n      ⁅AddHom.toFun { toAddHom := { toFun := g, map_add' := map_add'✝ }, map_smul' := map_smul'✝ }.toAddHom x,\n        AddHom.toFun { toAddHom := { toFun := g, map_add' := map_add'✝ }, map_smul' := map_smul'✝ }.toAddHom y⁆\nleft_inv✝ :\n  LeftInverse g_inv\n    (↑{ toLinearMap := { toAddHom := { toFun := g, map_add' := map_add'✝ }, map_smul' := map_smul'✝ },\n            map_lie' := map_lie'✝ }).toAddHom.toFun\nright_inv✝ :\n  Function.RightInverse g_inv\n    (↑{ toLinearMap := { toAddHom := { toFun := g, map_add' := map_add'✝ }, map_smul' := map_smul'✝ },\n            map_lie' := map_lie'✝ }).toAddHom.toFun\nh : f = g ∧ f_inv = g_inv\n⊢ f = g\ncase mk.mk.mk.mk.mk.mk.mk.mk.e_invFun\nR : Type u\nL₁ : Type v\nL₂ : Type w\nL₃ : Type w₁\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L₁\ninst✝⁴ : LieRing L₂\ninst✝³ : LieRing L₃\ninst✝² : LieAlgebra R L₁\ninst✝¹ : LieAlgebra R L₂\ninst✝ : LieAlgebra R L₃\nf_inv : L₂ → L₁\nf : L₁ → L₂\nmap_add'✝¹ : ∀ (x y : L₁), f (x + y) = f x + f y\nmap_smul'✝¹ :\n  ∀ (r : R) (x : L₁),\n    AddHom.toFun { toFun := f, map_add' := map_add'✝¹ } (r • x) =\n      ↑(RingHom.id R) r • AddHom.toFun { toFun := f, map_add' := map_add'✝¹ } x\nmap_lie'✝¹ :\n  ∀ {x y : L₁},\n    AddHom.toFun { toAddHom := { toFun := f, map_add' := map_add'✝¹ }, map_smul' := map_smul'✝¹ }.toAddHom ⁅x, y⁆ =\n      ⁅AddHom.toFun { toAddHom := { toFun := f, map_add' := map_add'✝¹ }, map_smul' := map_smul'✝¹ }.toAddHom x,\n        AddHom.toFun { toAddHom := { toFun := f, map_add' := map_add'✝¹ }, map_smul' := map_smul'✝¹ }.toAddHom y⁆\nleft_inv✝¹ :\n  LeftInverse f_inv\n    (↑{ toLinearMap := { toAddHom := { toFun := f, map_add' := map_add'✝¹ }, map_smul' := map_smul'✝¹ },\n            map_lie' := map_lie'✝¹ }).toAddHom.toFun\nright_inv✝¹ :\n  Function.RightInverse f_inv\n    (↑{ toLinearMap := { toAddHom := { toFun := f, map_add' := map_add'✝¹ }, map_smul' := map_smul'✝¹ },\n            map_lie' := map_lie'✝¹ }).toAddHom.toFun\ng_inv : L₂ → L₁\ng : L₁ → L₂\nmap_add'✝ : ∀ (x y : L₁), g (x + y) = g x + g y\nmap_smul'✝ :\n  ∀ (r : R) (x : L₁),\n    AddHom.toFun { toFun := g, map_add' := map_add'✝ } (r • x) =\n      ↑(RingHom.id R) r • AddHom.toFun { toFun := g, map_add' := map_add'✝ } x\nmap_lie'✝ :\n  ∀ {x y : L₁},\n    AddHom.toFun { toAddHom := { toFun := g, map_add' := map_add'✝ }, map_smul' := map_smul'✝ }.toAddHom ⁅x, y⁆ =\n      ⁅AddHom.toFun { toAddHom := { toFun := g, map_add' := map_add'✝ }, map_smul' := map_smul'✝ }.toAddHom x,\n        AddHom.toFun { toAddHom := { toFun := g, map_add' := map_add'✝ }, map_smul' := map_smul'✝ }.toAddHom y⁆\nleft_inv✝ :\n  LeftInverse g_inv\n    (↑{ toLinearMap := { toAddHom := { toFun := g, map_add' := map_add'✝ }, map_smul' := map_smul'✝ },\n            map_lie' := map_lie'✝ }).toAddHom.toFun\nright_inv✝ :\n  Function.RightInverse g_inv\n    (↑{ toLinearMap := { toAddHom := { toFun := g, map_add' := map_add'✝ }, map_smul' := map_smul'✝ },\n            map_lie' := map_lie'✝ }).toAddHom.toFun\nh : f = g ∧ f_inv = g_inv\n⊢ f_inv = g_inv\n[PROOFSTEP]\nexacts [h.1, h.2]\n[GOAL]\nR : Type u\nL₁ : Type v\nL₂ : Type w\nL₃ : Type w₁\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L₁\ninst✝⁴ : LieRing L₂\ninst✝³ : LieRing L₃\ninst✝² : LieAlgebra R L₁\ninst✝¹ : LieAlgebra R L₂\ninst✝ : LieAlgebra R L₃\ne : L₁ ≃ₗ⁅R⁆ L₂\n⊢ symm (symm e) = e\n[PROOFSTEP]\next\n[GOAL]\ncase h\nR : Type u\nL₁ : Type v\nL₂ : Type w\nL₃ : Type w₁\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L₁\ninst✝⁴ : LieRing L₂\ninst✝³ : LieRing L₃\ninst✝² : LieAlgebra R L₁\ninst✝¹ : LieAlgebra R L₂\ninst✝ : LieAlgebra R L₃\ne : L₁ ≃ₗ⁅R⁆ L₂\nx✝ : L₁\n⊢ ↑(symm (symm e)) x✝ = ↑e x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\nL₁ : Type v\nL₂ : Type w\nL₃ : Type w₁\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L₁\ninst✝⁴ : LieRing L₂\ninst✝³ : LieRing L₃\ninst✝² : LieAlgebra R L₁\ninst✝¹ : LieAlgebra R L₂\ninst✝ : LieAlgebra R L₃\nf : L₁ →ₗ⁅R⁆ L₂\nh : Bijective ↑f\nsrc✝ : L₁ ≃ₗ[R] L₂ := LinearEquiv.ofBijective (↑f) h\n⊢ ∀ {x y : L₁},\n    AddHom.toFun\n        {\n            toAddHom :=\n              { toFun := ↑f,\n                map_add' :=\n                  (_ :\n                    ∀ (x y : L₁),\n                      AddHom.toFun src✝.toAddHom (x + y) =\n                        AddHom.toFun src✝.toAddHom x + AddHom.toFun src✝.toAddHom y) },\n            map_smul' :=\n              (_ :\n                ∀ (r : R) (x : L₁),\n                  AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n        ⁅x, y⁆ =\n      ⁅AddHom.toFun\n          {\n              toAddHom :=\n                { toFun := ↑f,\n                  map_add' :=\n                    (_ :\n                      ∀ (x y : L₁),\n                        AddHom.toFun src✝.toAddHom (x + y) =\n                          AddHom.toFun src✝.toAddHom x + AddHom.toFun src✝.toAddHom y) },\n              map_smul' :=\n                (_ :\n                  ∀ (r : R) (x : L₁),\n                    AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n          x,\n        AddHom.toFun\n          {\n              toAddHom :=\n                { toFun := ↑f,\n                  map_add' :=\n                    (_ :\n                      ∀ (x y : L₁),\n                        AddHom.toFun src✝.toAddHom (x + y) =\n                          AddHom.toFun src✝.toAddHom x + AddHom.toFun src✝.toAddHom y) },\n              map_smul' :=\n                (_ :\n                  ∀ (r : R) (x : L₁),\n                    AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n          y⁆\n[PROOFSTEP]\nintros x y\n[GOAL]\nR : Type u\nL₁ : Type v\nL₂ : Type w\nL₃ : Type w₁\ninst✝⁶ : CommRing R\ninst✝⁵ : LieRing L₁\ninst✝⁴ : LieRing L₂\ninst✝³ : LieRing L₃\ninst✝² : LieAlgebra R L₁\ninst✝¹ : LieAlgebra R L₂\ninst✝ : LieAlgebra R L₃\nf : L₁ →ₗ⁅R⁆ L₂\nh : Bijective ↑f\nsrc✝ : L₁ ≃ₗ[R] L₂ := LinearEquiv.ofBijective (↑f) h\nx y : L₁\n⊢ AddHom.toFun\n      {\n          toAddHom :=\n            { toFun := ↑f,\n              map_add' :=\n                (_ :\n                  ∀ (x y : L₁),\n                    AddHom.toFun src✝.toAddHom (x + y) = AddHom.toFun src✝.toAddHom x + AddHom.toFun src✝.toAddHom y) },\n          map_smul' :=\n            (_ :\n              ∀ (r : R) (x : L₁),\n                AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n      ⁅x, y⁆ =\n    ⁅AddHom.toFun\n        {\n            toAddHom :=\n              { toFun := ↑f,\n                map_add' :=\n                  (_ :\n                    ∀ (x y : L₁),\n                      AddHom.toFun src✝.toAddHom (x + y) =\n                        AddHom.toFun src✝.toAddHom x + AddHom.toFun src✝.toAddHom y) },\n            map_smul' :=\n              (_ :\n                ∀ (r : R) (x : L₁),\n                  AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n        x,\n      AddHom.toFun\n        {\n            toAddHom :=\n              { toFun := ↑f,\n                map_add' :=\n                  (_ :\n                    ∀ (x y : L₁),\n                      AddHom.toFun src✝.toAddHom (x + y) =\n                        AddHom.toFun src✝.toAddHom x + AddHom.toFun src✝.toAddHom y) },\n            map_smul' :=\n              (_ :\n                ∀ (r : R) (x : L₁),\n                  AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n        y⁆\n[PROOFSTEP]\nexact f.map_lie x y\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nN : Type w₁\nP : Type w₂\ninst✝¹⁴ : CommRing R\ninst✝¹³ : LieRing L\ninst✝¹² : LieAlgebra R L\ninst✝¹¹ : AddCommGroup M\ninst✝¹⁰ : AddCommGroup N\ninst✝⁹ : AddCommGroup P\ninst✝⁸ : Module R M\ninst✝⁷ : Module R N\ninst✝⁶ : Module R P\ninst✝⁵ : LieRingModule L M\ninst✝⁴ : LieRingModule L N\ninst✝³ : LieRingModule L P\ninst✝² : LieModule R L M\ninst✝¹ : LieModule R L N\ninst✝ : LieModule R L P\nx y : M →ₗ⁅R,L⁆ N\nh : (fun f => f.toFun) x = (fun f => f.toFun) y\n⊢ x = y\n[PROOFSTEP]\ncases x\n[GOAL]\ncase mk\nR : Type u\nL : Type v\nM : Type w\nN : Type w₁\nP : Type w₂\ninst✝¹⁴ : CommRing R\ninst✝¹³ : LieRing L\ninst✝¹² : LieAlgebra R L\ninst✝¹¹ : AddCommGroup M\ninst✝¹⁰ : AddCommGroup N\ninst✝⁹ : AddCommGroup P\ninst✝⁸ : Module R M\ninst✝⁷ : Module R N\ninst✝⁶ : Module R P\ninst✝⁵ : LieRingModule L M\ninst✝⁴ : LieRingModule L N\ninst✝³ : LieRingModule L P\ninst✝² : LieModule R L M\ninst✝¹ : LieModule R L N\ninst✝ : LieModule R L P\ny : M →ₗ⁅R,L⁆ N\ntoLinearMap✝ : M →ₗ[R] N\nmap_lie'✝ : ∀ {x : L} {m : M}, AddHom.toFun toLinearMap✝.toAddHom ⁅x, m⁆ = ⁅x, AddHom.toFun toLinearMap✝.toAddHom m⁆\nh : (fun f => f.toFun) { toLinearMap := toLinearMap✝, map_lie' := map_lie'✝ } = (fun f => f.toFun) y\n⊢ { toLinearMap := toLinearMap✝, map_lie' := map_lie'✝ } = y\n[PROOFSTEP]\ncases y\n[GOAL]\ncase mk.mk\nR : Type u\nL : Type v\nM : Type w\nN : Type w₁\nP : Type w₂\ninst✝¹⁴ : CommRing R\ninst✝¹³ : LieRing L\ninst✝¹² : LieAlgebra R L\ninst✝¹¹ : AddCommGroup M\ninst✝¹⁰ : AddCommGroup N\ninst✝⁹ : AddCommGroup P\ninst✝⁸ : Module R M\ninst✝⁷ : Module R N\ninst✝⁶ : Module R P\ninst✝⁵ : LieRingModule L M\ninst✝⁴ : LieRingModule L N\ninst✝³ : LieRingModule L P\ninst✝² : LieModule R L M\ninst✝¹ : LieModule R L N\ninst✝ : LieModule R L P\ntoLinearMap✝¹ : M →ₗ[R] N\nmap_lie'✝¹ : ∀ {x : L} {m : M}, AddHom.toFun toLinearMap✝¹.toAddHom ⁅x, m⁆ = ⁅x, AddHom.toFun toLinearMap✝¹.toAddHom m⁆\ntoLinearMap✝ : M →ₗ[R] N\nmap_lie'✝ : ∀ {x : L} {m : M}, AddHom.toFun toLinearMap✝.toAddHom ⁅x, m⁆ = ⁅x, AddHom.toFun toLinearMap✝.toAddHom m⁆\nh :\n  (fun f => f.toFun) { toLinearMap := toLinearMap✝¹, map_lie' := map_lie'✝¹ } =\n    (fun f => f.toFun) { toLinearMap := toLinearMap✝, map_lie' := map_lie'✝ }\n⊢ { toLinearMap := toLinearMap✝¹, map_lie' := map_lie'✝¹ } = { toLinearMap := toLinearMap✝, map_lie' := map_lie'✝ }\n[PROOFSTEP]\nsimp at h \n[GOAL]\ncase mk.mk\nR : Type u\nL : Type v\nM : Type w\nN : Type w₁\nP : Type w₂\ninst✝¹⁴ : CommRing R\ninst✝¹³ : LieRing L\ninst✝¹² : LieAlgebra R L\ninst✝¹¹ : AddCommGroup M\ninst✝¹⁰ : AddCommGroup N\ninst✝⁹ : AddCommGroup P\ninst✝⁸ : Module R M\ninst✝⁷ : Module R N\ninst✝⁶ : Module R P\ninst✝⁵ : LieRingModule L M\ninst✝⁴ : LieRingModule L N\ninst✝³ : LieRingModule L P\ninst✝² : LieModule R L M\ninst✝¹ : LieModule R L N\ninst✝ : LieModule R L P\ntoLinearMap✝¹ : M →ₗ[R] N\nmap_lie'✝¹ : ∀ {x : L} {m : M}, AddHom.toFun toLinearMap✝¹.toAddHom ⁅x, m⁆ = ⁅x, AddHom.toFun toLinearMap✝¹.toAddHom m⁆\ntoLinearMap✝ : M →ₗ[R] N\nmap_lie'✝ : ∀ {x : L} {m : M}, AddHom.toFun toLinearMap✝.toAddHom ⁅x, m⁆ = ⁅x, AddHom.toFun toLinearMap✝.toAddHom m⁆\nh : toLinearMap✝¹ = toLinearMap✝\n⊢ { toLinearMap := toLinearMap✝¹, map_lie' := map_lie'✝¹ } = { toLinearMap := toLinearMap✝, map_lie' := map_lie'✝ }\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nN : Type w₁\nP : Type w₂\ninst✝¹⁴ : CommRing R\ninst✝¹³ : LieRing L\ninst✝¹² : LieAlgebra R L\ninst✝¹¹ : AddCommGroup M\ninst✝¹⁰ : AddCommGroup N\ninst✝⁹ : AddCommGroup P\ninst✝⁸ : Module R M\ninst✝⁷ : Module R N\ninst✝⁶ : Module R P\ninst✝⁵ : LieRingModule L M\ninst✝⁴ : LieRingModule L N\ninst✝³ : LieRingModule L P\ninst✝² : LieModule R L M\ninst✝¹ : LieModule R L N\ninst✝ : LieModule R L P\nf : M →ₗ⁅R,L⁆ N →ₗ[R] P\nx : L\nm : M\nn : N\n⊢ ⁅x, ↑(↑f m) n⁆ = ↑(↑f ⁅x, m⁆) n + ↑(↑f m) ⁅x, n⁆\n[PROOFSTEP]\nsimp only [sub_add_cancel, map_lie, LieHom.lie_apply]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nN : Type w₁\nP : Type w₂\ninst✝¹⁴ : CommRing R\ninst✝¹³ : LieRing L\ninst✝¹² : LieAlgebra R L\ninst✝¹¹ : AddCommGroup M\ninst✝¹⁰ : AddCommGroup N\ninst✝⁹ : AddCommGroup P\ninst✝⁸ : Module R M\ninst✝⁷ : Module R N\ninst✝⁶ : Module R P\ninst✝⁵ : LieRingModule L M\ninst✝⁴ : LieRingModule L N\ninst✝³ : LieRingModule L P\ninst✝² : LieModule R L M\ninst✝¹ : LieModule R L N\ninst✝ : LieModule R L P\nsrc✝ : M →ₗ[R] N := 0\n⊢ ∀ {x : L} {m : M},\n    AddHom.toFun\n        { toAddHom := src✝.toAddHom,\n            map_smul' :=\n              (_ :\n                ∀ (r : R) (x : M),\n                  AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n        ⁅x, m⁆ =\n      ⁅x,\n        AddHom.toFun\n          { toAddHom := src✝.toAddHom,\n              map_smul' :=\n                (_ :\n                  ∀ (r : R) (x : M),\n                    AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n          m⁆\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nN : Type w₁\nP : Type w₂\ninst✝¹⁴ : CommRing R\ninst✝¹³ : LieRing L\ninst✝¹² : LieAlgebra R L\ninst✝¹¹ : AddCommGroup M\ninst✝¹⁰ : AddCommGroup N\ninst✝⁹ : AddCommGroup P\ninst✝⁸ : Module R M\ninst✝⁷ : Module R N\ninst✝⁶ : Module R P\ninst✝⁵ : LieRingModule L M\ninst✝⁴ : LieRingModule L N\ninst✝³ : LieRingModule L P\ninst✝² : LieModule R L M\ninst✝¹ : LieModule R L N\ninst✝ : LieModule R L P\n⊢ Injective FunLike.coe\n[PROOFSTEP]\nrintro ⟨⟨⟨f, _⟩⟩⟩ ⟨⟨⟨g, _⟩⟩⟩ h\n[GOAL]\ncase mk.mk.mk.mk.mk.mk\nR : Type u\nL : Type v\nM : Type w\nN : Type w₁\nP : Type w₂\ninst✝¹⁴ : CommRing R\ninst✝¹³ : LieRing L\ninst✝¹² : LieAlgebra R L\ninst✝¹¹ : AddCommGroup M\ninst✝¹⁰ : AddCommGroup N\ninst✝⁹ : AddCommGroup P\ninst✝⁸ : Module R M\ninst✝⁷ : Module R N\ninst✝⁶ : Module R P\ninst✝⁵ : LieRingModule L M\ninst✝⁴ : LieRingModule L N\ninst✝³ : LieRingModule L P\ninst✝² : LieModule R L M\ninst✝¹ : LieModule R L N\ninst✝ : LieModule R L P\nf : M → N\nmap_add'✝¹ : ∀ (x y : M), f (x + y) = f x + f y\nmap_smul'✝¹ :\n  ∀ (r : R) (x : M),\n    AddHom.toFun { toFun := f, map_add' := map_add'✝¹ } (r • x) =\n      ↑(RingHom.id R) r • AddHom.toFun { toFun := f, map_add' := map_add'✝¹ } x\nmap_lie'✝¹ :\n  ∀ {x : L} {m : M},\n    AddHom.toFun { toAddHom := { toFun := f, map_add' := map_add'✝¹ }, map_smul' := map_smul'✝¹ }.toAddHom ⁅x, m⁆ =\n      ⁅x, AddHom.toFun { toAddHom := { toFun := f, map_add' := map_add'✝¹ }, map_smul' := map_smul'✝¹ }.toAddHom m⁆\ng : M → N\nmap_add'✝ : ∀ (x y : M), g (x + y) = g x + g y\nmap_smul'✝ :\n  ∀ (r : R) (x : M),\n    AddHom.toFun { toFun := g, map_add' := map_add'✝ } (r • x) =\n      ↑(RingHom.id R) r • AddHom.toFun { toFun := g, map_add' := map_add'✝ } x\nmap_lie'✝ :\n  ∀ {x : L} {m : M},\n    AddHom.toFun { toAddHom := { toFun := g, map_add' := map_add'✝ }, map_smul' := map_smul'✝ }.toAddHom ⁅x, m⁆ =\n      ⁅x, AddHom.toFun { toAddHom := { toFun := g, map_add' := map_add'✝ }, map_smul' := map_smul'✝ }.toAddHom m⁆\nh :\n  ↑{ toLinearMap := { toAddHom := { toFun := f, map_add' := map_add'✝¹ }, map_smul' := map_smul'✝¹ },\n        map_lie' := map_lie'✝¹ } =\n    ↑{ toLinearMap := { toAddHom := { toFun := g, map_add' := map_add'✝ }, map_smul' := map_smul'✝ },\n        map_lie' := map_lie'✝ }\n⊢ { toLinearMap := { toAddHom := { toFun := f, map_add' := map_add'✝¹ }, map_smul' := map_smul'✝¹ },\n      map_lie' := map_lie'✝¹ } =\n    { toLinearMap := { toAddHom := { toFun := g, map_add' := map_add'✝ }, map_smul' := map_smul'✝ },\n      map_lie' := map_lie'✝ }\n[PROOFSTEP]\ncongr\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nN : Type w₁\nP : Type w₂\ninst✝¹⁴ : CommRing R\ninst✝¹³ : LieRing L\ninst✝¹² : LieAlgebra R L\ninst✝¹¹ : AddCommGroup M\ninst✝¹⁰ : AddCommGroup N\ninst✝⁹ : AddCommGroup P\ninst✝⁸ : Module R M\ninst✝⁷ : Module R N\ninst✝⁶ : Module R P\ninst✝⁵ : LieRingModule L M\ninst✝⁴ : LieRingModule L N\ninst✝³ : LieRingModule L P\ninst✝² : LieModule R L M\ninst✝¹ : LieModule R L N\ninst✝ : LieModule R L P\nf g : M →ₗ⁅R,L⁆ N\n⊢ f = g → ∀ (m : M), ↑f m = ↑g m\n[PROOFSTEP]\nrintro rfl m\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nN : Type w₁\nP : Type w₂\ninst✝¹⁴ : CommRing R\ninst✝¹³ : LieRing L\ninst✝¹² : LieAlgebra R L\ninst✝¹¹ : AddCommGroup M\ninst✝¹⁰ : AddCommGroup N\ninst✝⁹ : AddCommGroup P\ninst✝⁸ : Module R M\ninst✝⁷ : Module R N\ninst✝⁶ : Module R P\ninst✝⁵ : LieRingModule L M\ninst✝⁴ : LieRingModule L N\ninst✝³ : LieRingModule L P\ninst✝² : LieModule R L M\ninst✝¹ : LieModule R L N\ninst✝ : LieModule R L P\nf : M →ₗ⁅R,L⁆ N\nm : M\n⊢ ↑f m = ↑f m\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nN : Type w₁\nP : Type w₂\ninst✝¹⁴ : CommRing R\ninst✝¹³ : LieRing L\ninst✝¹² : LieAlgebra R L\ninst✝¹¹ : AddCommGroup M\ninst✝¹⁰ : AddCommGroup N\ninst✝⁹ : AddCommGroup P\ninst✝⁸ : Module R M\ninst✝⁷ : Module R N\ninst✝⁶ : Module R P\ninst✝⁵ : LieRingModule L M\ninst✝⁴ : LieRingModule L N\ninst✝³ : LieRingModule L P\ninst✝² : LieModule R L M\ninst✝¹ : LieModule R L N\ninst✝ : LieModule R L P\nf : M →ₗ⁅R,L⁆ N\nh : ∀ {x : L} {m : M}, AddHom.toFun f.toAddHom ⁅x, m⁆ = ⁅x, AddHom.toFun f.toAddHom m⁆\n⊢ { toLinearMap := ↑f, map_lie' := h } = f\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nN : Type w₁\nP : Type w₂\ninst✝¹⁴ : CommRing R\ninst✝¹³ : LieRing L\ninst✝¹² : LieAlgebra R L\ninst✝¹¹ : AddCommGroup M\ninst✝¹⁰ : AddCommGroup N\ninst✝⁹ : AddCommGroup P\ninst✝⁸ : Module R M\ninst✝⁷ : Module R N\ninst✝⁶ : Module R P\ninst✝⁵ : LieRingModule L M\ninst✝⁴ : LieRingModule L N\ninst✝³ : LieRingModule L P\ninst✝² : LieModule R L M\ninst✝¹ : LieModule R L N\ninst✝ : LieModule R L P\nf : M →ₗ[R] N\nh : ∀ {x : L} {m : M}, AddHom.toFun f.toAddHom ⁅x, m⁆ = ⁅x, AddHom.toFun f.toAddHom m⁆\n⊢ ↑{ toLinearMap := f, map_lie' := h } = ↑f\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nN : Type w₁\nP : Type w₂\ninst✝¹⁴ : CommRing R\ninst✝¹³ : LieRing L\ninst✝¹² : LieAlgebra R L\ninst✝¹¹ : AddCommGroup M\ninst✝¹⁰ : AddCommGroup N\ninst✝⁹ : AddCommGroup P\ninst✝⁸ : Module R M\ninst✝⁷ : Module R N\ninst✝⁶ : Module R P\ninst✝⁵ : LieRingModule L M\ninst✝⁴ : LieRingModule L N\ninst✝³ : LieRingModule L P\ninst✝² : LieModule R L M\ninst✝¹ : LieModule R L N\ninst✝ : LieModule R L P\nf : M →ₗ[R] N\nh : ∀ {x : L} {m : M}, AddHom.toFun f.toAddHom ⁅x, m⁆ = ⁅x, AddHom.toFun f.toAddHom m⁆\n⊢ ↑{ toLinearMap := f, map_lie' := h } = f\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nN : Type w₁\nP : Type w₂\ninst✝¹⁴ : CommRing R\ninst✝¹³ : LieRing L\ninst✝¹² : LieAlgebra R L\ninst✝¹¹ : AddCommGroup M\ninst✝¹⁰ : AddCommGroup N\ninst✝⁹ : AddCommGroup P\ninst✝⁸ : Module R M\ninst✝⁷ : Module R N\ninst✝⁶ : Module R P\ninst✝⁵ : LieRingModule L M\ninst✝⁴ : LieRingModule L N\ninst✝³ : LieRingModule L P\ninst✝² : LieModule R L M\ninst✝¹ : LieModule R L N\ninst✝ : LieModule R L P\nf : N →ₗ⁅R,L⁆ P\ng : M →ₗ⁅R,L⁆ N\nsrc✝ : M →ₗ[R] P := LinearMap.comp ↑f ↑g\n⊢ ∀ {x : L} {m : M},\n    AddHom.toFun\n        { toAddHom := src✝.toAddHom,\n            map_smul' :=\n              (_ :\n                ∀ (r : R) (x : M),\n                  AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n        ⁅x, m⁆ =\n      ⁅x,\n        AddHom.toFun\n          { toAddHom := src✝.toAddHom,\n              map_smul' :=\n                (_ :\n                  ∀ (r : R) (x : M),\n                    AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n          m⁆\n[PROOFSTEP]\nintros x m\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nN : Type w₁\nP : Type w₂\ninst✝¹⁴ : CommRing R\ninst✝¹³ : LieRing L\ninst✝¹² : LieAlgebra R L\ninst✝¹¹ : AddCommGroup M\ninst✝¹⁰ : AddCommGroup N\ninst✝⁹ : AddCommGroup P\ninst✝⁸ : Module R M\ninst✝⁷ : Module R N\ninst✝⁶ : Module R P\ninst✝⁵ : LieRingModule L M\ninst✝⁴ : LieRingModule L N\ninst✝³ : LieRingModule L P\ninst✝² : LieModule R L M\ninst✝¹ : LieModule R L N\ninst✝ : LieModule R L P\nf : N →ₗ⁅R,L⁆ P\ng : M →ₗ⁅R,L⁆ N\nsrc✝ : M →ₗ[R] P := LinearMap.comp ↑f ↑g\nx : L\nm : M\n⊢ AddHom.toFun\n      { toAddHom := src✝.toAddHom,\n          map_smul' :=\n            (_ :\n              ∀ (r : R) (x : M),\n                AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n      ⁅x, m⁆ =\n    ⁅x,\n      AddHom.toFun\n        { toAddHom := src✝.toAddHom,\n            map_smul' :=\n              (_ :\n                ∀ (r : R) (x : M),\n                  AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n        m⁆\n[PROOFSTEP]\nchange f (g ⁅x, m⁆) = ⁅x, f (g m)⁆\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nN : Type w₁\nP : Type w₂\ninst✝¹⁴ : CommRing R\ninst✝¹³ : LieRing L\ninst✝¹² : LieAlgebra R L\ninst✝¹¹ : AddCommGroup M\ninst✝¹⁰ : AddCommGroup N\ninst✝⁹ : AddCommGroup P\ninst✝⁸ : Module R M\ninst✝⁷ : Module R N\ninst✝⁶ : Module R P\ninst✝⁵ : LieRingModule L M\ninst✝⁴ : LieRingModule L N\ninst✝³ : LieRingModule L P\ninst✝² : LieModule R L M\ninst✝¹ : LieModule R L N\ninst✝ : LieModule R L P\nf : N →ₗ⁅R,L⁆ P\ng : M →ₗ⁅R,L⁆ N\nsrc✝ : M →ₗ[R] P := LinearMap.comp ↑f ↑g\nx : L\nm : M\n⊢ ↑f (↑g ⁅x, m⁆) = ⁅x, ↑f (↑g m)⁆\n[PROOFSTEP]\nrw [map_lie, map_lie]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nN : Type w₁\nP : Type w₂\ninst✝¹⁴ : CommRing R\ninst✝¹³ : LieRing L\ninst✝¹² : LieAlgebra R L\ninst✝¹¹ : AddCommGroup M\ninst✝¹⁰ : AddCommGroup N\ninst✝⁹ : AddCommGroup P\ninst✝⁸ : Module R M\ninst✝⁷ : Module R N\ninst✝⁶ : Module R P\ninst✝⁵ : LieRingModule L M\ninst✝⁴ : LieRingModule L N\ninst✝³ : LieRingModule L P\ninst✝² : LieModule R L M\ninst✝¹ : LieModule R L N\ninst✝ : LieModule R L P\nf : M →ₗ⁅R,L⁆ N\ng : N → M\nh₁ : LeftInverse g ↑f\nh₂ : Function.RightInverse g ↑f\nsrc✝ : N →ₗ[R] M := LinearMap.inverse (↑f) g h₁ h₂\n⊢ ∀ {x : L} {m : N},\n    AddHom.toFun\n        { toAddHom := src✝.toAddHom,\n            map_smul' :=\n              (_ :\n                ∀ (r : R) (x : N),\n                  AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n        ⁅x, m⁆ =\n      ⁅x,\n        AddHom.toFun\n          { toAddHom := src✝.toAddHom,\n              map_smul' :=\n                (_ :\n                  ∀ (r : R) (x : N),\n                    AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n          m⁆\n[PROOFSTEP]\nintros x n\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nN : Type w₁\nP : Type w₂\ninst✝¹⁴ : CommRing R\ninst✝¹³ : LieRing L\ninst✝¹² : LieAlgebra R L\ninst✝¹¹ : AddCommGroup M\ninst✝¹⁰ : AddCommGroup N\ninst✝⁹ : AddCommGroup P\ninst✝⁸ : Module R M\ninst✝⁷ : Module R N\ninst✝⁶ : Module R P\ninst✝⁵ : LieRingModule L M\ninst✝⁴ : LieRingModule L N\ninst✝³ : LieRingModule L P\ninst✝² : LieModule R L M\ninst✝¹ : LieModule R L N\ninst✝ : LieModule R L P\nf : M →ₗ⁅R,L⁆ N\ng : N → M\nh₁ : LeftInverse g ↑f\nh₂ : Function.RightInverse g ↑f\nsrc✝ : N →ₗ[R] M := LinearMap.inverse (↑f) g h₁ h₂\nx : L\nn : N\n⊢ AddHom.toFun\n      { toAddHom := src✝.toAddHom,\n          map_smul' :=\n            (_ :\n              ∀ (r : R) (x : N),\n                AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n      ⁅x, n⁆ =\n    ⁅x,\n      AddHom.toFun\n        { toAddHom := src✝.toAddHom,\n            map_smul' :=\n              (_ :\n                ∀ (r : R) (x : N),\n                  AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n        n⁆\n[PROOFSTEP]\ncalc\n  g ⁅x, n⁆ = g ⁅x, f (g n)⁆ := by rw [h₂]\n  _ = g (f ⁅x, g n⁆) := by rw [map_lie]\n  _ = ⁅x, g n⁆ := h₁ _\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nN : Type w₁\nP : Type w₂\ninst✝¹⁴ : CommRing R\ninst✝¹³ : LieRing L\ninst✝¹² : LieAlgebra R L\ninst✝¹¹ : AddCommGroup M\ninst✝¹⁰ : AddCommGroup N\ninst✝⁹ : AddCommGroup P\ninst✝⁸ : Module R M\ninst✝⁷ : Module R N\ninst✝⁶ : Module R P\ninst✝⁵ : LieRingModule L M\ninst✝⁴ : LieRingModule L N\ninst✝³ : LieRingModule L P\ninst✝² : LieModule R L M\ninst✝¹ : LieModule R L N\ninst✝ : LieModule R L P\nf : M →ₗ⁅R,L⁆ N\ng : N → M\nh₁ : LeftInverse g ↑f\nh₂ : Function.RightInverse g ↑f\nsrc✝ : N →ₗ[R] M := LinearMap.inverse (↑f) g h₁ h₂\nx : L\nn : N\n⊢ g ⁅x, n⁆ = g ⁅x, ↑f (g n)⁆\n[PROOFSTEP]\nrw [h₂]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nN : Type w₁\nP : Type w₂\ninst✝¹⁴ : CommRing R\ninst✝¹³ : LieRing L\ninst✝¹² : LieAlgebra R L\ninst✝¹¹ : AddCommGroup M\ninst✝¹⁰ : AddCommGroup N\ninst✝⁹ : AddCommGroup P\ninst✝⁸ : Module R M\ninst✝⁷ : Module R N\ninst✝⁶ : Module R P\ninst✝⁵ : LieRingModule L M\ninst✝⁴ : LieRingModule L N\ninst✝³ : LieRingModule L P\ninst✝² : LieModule R L M\ninst✝¹ : LieModule R L N\ninst✝ : LieModule R L P\nf : M →ₗ⁅R,L⁆ N\ng : N → M\nh₁ : LeftInverse g ↑f\nh₂ : Function.RightInverse g ↑f\nsrc✝ : N →ₗ[R] M := LinearMap.inverse (↑f) g h₁ h₂\nx : L\nn : N\n⊢ g ⁅x, ↑f (g n)⁆ = g (↑f ⁅x, g n⁆)\n[PROOFSTEP]\nrw [map_lie]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nN : Type w₁\nP : Type w₂\ninst✝¹⁴ : CommRing R\ninst✝¹³ : LieRing L\ninst✝¹² : LieAlgebra R L\ninst✝¹¹ : AddCommGroup M\ninst✝¹⁰ : AddCommGroup N\ninst✝⁹ : AddCommGroup P\ninst✝⁸ : Module R M\ninst✝⁷ : Module R N\ninst✝⁶ : Module R P\ninst✝⁵ : LieRingModule L M\ninst✝⁴ : LieRingModule L N\ninst✝³ : LieRingModule L P\ninst✝² : LieModule R L M\ninst✝¹ : LieModule R L N\ninst✝ : LieModule R L P\nf g : M →ₗ⁅R,L⁆ N\nsrc✝ : M →ₗ[R] N := ↑f + ↑g\n⊢ ∀ {x : L} {m : M},\n    AddHom.toFun\n        { toAddHom := src✝.toAddHom,\n            map_smul' :=\n              (_ :\n                ∀ (r : R) (x : M),\n                  AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n        ⁅x, m⁆ =\n      ⁅x,\n        AddHom.toFun\n          { toAddHom := src✝.toAddHom,\n              map_smul' :=\n                (_ :\n                  ∀ (r : R) (x : M),\n                    AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n          m⁆\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nN : Type w₁\nP : Type w₂\ninst✝¹⁴ : CommRing R\ninst✝¹³ : LieRing L\ninst✝¹² : LieAlgebra R L\ninst✝¹¹ : AddCommGroup M\ninst✝¹⁰ : AddCommGroup N\ninst✝⁹ : AddCommGroup P\ninst✝⁸ : Module R M\ninst✝⁷ : Module R N\ninst✝⁶ : Module R P\ninst✝⁵ : LieRingModule L M\ninst✝⁴ : LieRingModule L N\ninst✝³ : LieRingModule L P\ninst✝² : LieModule R L M\ninst✝¹ : LieModule R L N\ninst✝ : LieModule R L P\nf g : M →ₗ⁅R,L⁆ N\nsrc✝ : M →ₗ[R] N := ↑f - ↑g\n⊢ ∀ {x : L} {m : M},\n    AddHom.toFun\n        { toAddHom := src✝.toAddHom,\n            map_smul' :=\n              (_ :\n                ∀ (r : R) (x : M),\n                  AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n        ⁅x, m⁆ =\n      ⁅x,\n        AddHom.toFun\n          { toAddHom := src✝.toAddHom,\n              map_smul' :=\n                (_ :\n                  ∀ (r : R) (x : M),\n                    AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n          m⁆\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nN : Type w₁\nP : Type w₂\ninst✝¹⁴ : CommRing R\ninst✝¹³ : LieRing L\ninst✝¹² : LieAlgebra R L\ninst✝¹¹ : AddCommGroup M\ninst✝¹⁰ : AddCommGroup N\ninst✝⁹ : AddCommGroup P\ninst✝⁸ : Module R M\ninst✝⁷ : Module R N\ninst✝⁶ : Module R P\ninst✝⁵ : LieRingModule L M\ninst✝⁴ : LieRingModule L N\ninst✝³ : LieRingModule L P\ninst✝² : LieModule R L M\ninst✝¹ : LieModule R L N\ninst✝ : LieModule R L P\nf : M →ₗ⁅R,L⁆ N\nsrc✝ : M →ₗ[R] N := -↑f\n⊢ ∀ {x : L} {m : M},\n    AddHom.toFun\n        { toAddHom := src✝.toAddHom,\n            map_smul' :=\n              (_ :\n                ∀ (r : R) (x : M),\n                  AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n        ⁅x, m⁆ =\n      ⁅x,\n        AddHom.toFun\n          { toAddHom := src✝.toAddHom,\n              map_smul' :=\n                (_ :\n                  ∀ (r : R) (x : M),\n                    AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n          m⁆\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nN : Type w₁\nP : Type w₂\ninst✝¹⁴ : CommRing R\ninst✝¹³ : LieRing L\ninst✝¹² : LieAlgebra R L\ninst✝¹¹ : AddCommGroup M\ninst✝¹⁰ : AddCommGroup N\ninst✝⁹ : AddCommGroup P\ninst✝⁸ : Module R M\ninst✝⁷ : Module R N\ninst✝⁶ : Module R P\ninst✝⁵ : LieRingModule L M\ninst✝⁴ : LieRingModule L N\ninst✝³ : LieRingModule L P\ninst✝² : LieModule R L M\ninst✝¹ : LieModule R L N\ninst✝ : LieModule R L P\nn : ℕ\nf : M →ₗ⁅R,L⁆ N\nsrc✝ : M →ₗ[R] N := n • ↑f\n⊢ ∀ {x : L} {m : M},\n    AddHom.toFun\n        { toAddHom := src✝.toAddHom,\n            map_smul' :=\n              (_ :\n                ∀ (r : R) (x : M),\n                  AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n        ⁅x, m⁆ =\n      ⁅x,\n        AddHom.toFun\n          { toAddHom := src✝.toAddHom,\n              map_smul' :=\n                (_ :\n                  ∀ (r : R) (x : M),\n                    AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n          m⁆\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nN : Type w₁\nP : Type w₂\ninst✝¹⁴ : CommRing R\ninst✝¹³ : LieRing L\ninst✝¹² : LieAlgebra R L\ninst✝¹¹ : AddCommGroup M\ninst✝¹⁰ : AddCommGroup N\ninst✝⁹ : AddCommGroup P\ninst✝⁸ : Module R M\ninst✝⁷ : Module R N\ninst✝⁶ : Module R P\ninst✝⁵ : LieRingModule L M\ninst✝⁴ : LieRingModule L N\ninst✝³ : LieRingModule L P\ninst✝² : LieModule R L M\ninst✝¹ : LieModule R L N\ninst✝ : LieModule R L P\nz : ℤ\nf : M →ₗ⁅R,L⁆ N\nsrc✝ : M →ₗ[R] N := z • ↑f\n⊢ ∀ {x : L} {m : M},\n    AddHom.toFun\n        { toAddHom := src✝.toAddHom,\n            map_smul' :=\n              (_ :\n                ∀ (r : R) (x : M),\n                  AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n        ⁅x, m⁆ =\n      ⁅x,\n        AddHom.toFun\n          { toAddHom := src✝.toAddHom,\n              map_smul' :=\n                (_ :\n                  ∀ (r : R) (x : M),\n                    AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n          m⁆\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nN : Type w₁\nP : Type w₂\ninst✝¹⁴ : CommRing R\ninst✝¹³ : LieRing L\ninst✝¹² : LieAlgebra R L\ninst✝¹¹ : AddCommGroup M\ninst✝¹⁰ : AddCommGroup N\ninst✝⁹ : AddCommGroup P\ninst✝⁸ : Module R M\ninst✝⁷ : Module R N\ninst✝⁶ : Module R P\ninst✝⁵ : LieRingModule L M\ninst✝⁴ : LieRingModule L N\ninst✝³ : LieRingModule L P\ninst✝² : LieModule R L M\ninst✝¹ : LieModule R L N\ninst✝ : LieModule R L P\nt : R\nf : M →ₗ⁅R,L⁆ N\nsrc✝ : M →ₗ[R] N := t • ↑f\n⊢ ∀ {x : L} {m : M},\n    AddHom.toFun\n        { toAddHom := src✝.toAddHom,\n            map_smul' :=\n              (_ :\n                ∀ (r : R) (x : M),\n                  AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n        ⁅x, m⁆ =\n      ⁅x,\n        AddHom.toFun\n          { toAddHom := src✝.toAddHom,\n              map_smul' :=\n                (_ :\n                  ∀ (r : R) (x : M),\n                    AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n          m⁆\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nN : Type w₁\nP : Type w₂\ninst✝¹⁴ : CommRing R\ninst✝¹³ : LieRing L\ninst✝¹² : LieAlgebra R L\ninst✝¹¹ : AddCommGroup M\ninst✝¹⁰ : AddCommGroup N\ninst✝⁹ : AddCommGroup P\ninst✝⁸ : Module R M\ninst✝⁷ : Module R N\ninst✝⁶ : Module R P\ninst✝⁵ : LieRingModule L M\ninst✝⁴ : LieRingModule L N\ninst✝³ : LieRingModule L P\ninst✝² : LieModule R L M\ninst✝¹ : LieModule R L N\ninst✝ : LieModule R L P\nf g : M ≃ₗ⁅R,L⁆ N\nh₁ : (fun f => f.toFun) f = (fun f => f.toFun) g\nh₂ : (fun f => f.invFun) f = (fun f => f.invFun) g\n⊢ f = g\n[PROOFSTEP]\ncases f\n[GOAL]\ncase mk\nR : Type u\nL : Type v\nM : Type w\nN : Type w₁\nP : Type w₂\ninst✝¹⁴ : CommRing R\ninst✝¹³ : LieRing L\ninst✝¹² : LieAlgebra R L\ninst✝¹¹ : AddCommGroup M\ninst✝¹⁰ : AddCommGroup N\ninst✝⁹ : AddCommGroup P\ninst✝⁸ : Module R M\ninst✝⁷ : Module R N\ninst✝⁶ : Module R P\ninst✝⁵ : LieRingModule L M\ninst✝⁴ : LieRingModule L N\ninst✝³ : LieRingModule L P\ninst✝² : LieModule R L M\ninst✝¹ : LieModule R L N\ninst✝ : LieModule R L P\ng : M ≃ₗ⁅R,L⁆ N\ntoLieModuleHom✝ : M →ₗ⁅R,L⁆ N\ninvFun✝ : N → M\nleft_inv✝ : LeftInverse invFun✝ toLieModuleHom✝.toFun\nright_inv✝ : Function.RightInverse invFun✝ toLieModuleHom✝.toFun\nh₁ :\n  (fun f => f.toFun)\n      { toLieModuleHom := toLieModuleHom✝, invFun := invFun✝, left_inv := left_inv✝, right_inv := right_inv✝ } =\n    (fun f => f.toFun) g\nh₂ :\n  (fun f => f.invFun)\n      { toLieModuleHom := toLieModuleHom✝, invFun := invFun✝, left_inv := left_inv✝, right_inv := right_inv✝ } =\n    (fun f => f.invFun) g\n⊢ { toLieModuleHom := toLieModuleHom✝, invFun := invFun✝, left_inv := left_inv✝, right_inv := right_inv✝ } = g\n[PROOFSTEP]\ncases g\n[GOAL]\ncase mk.mk\nR : Type u\nL : Type v\nM : Type w\nN : Type w₁\nP : Type w₂\ninst✝¹⁴ : CommRing R\ninst✝¹³ : LieRing L\ninst✝¹² : LieAlgebra R L\ninst✝¹¹ : AddCommGroup M\ninst✝¹⁰ : AddCommGroup N\ninst✝⁹ : AddCommGroup P\ninst✝⁸ : Module R M\ninst✝⁷ : Module R N\ninst✝⁶ : Module R P\ninst✝⁵ : LieRingModule L M\ninst✝⁴ : LieRingModule L N\ninst✝³ : LieRingModule L P\ninst✝² : LieModule R L M\ninst✝¹ : LieModule R L N\ninst✝ : LieModule R L P\ntoLieModuleHom✝¹ : M →ₗ⁅R,L⁆ N\ninvFun✝¹ : N → M\nleft_inv✝¹ : LeftInverse invFun✝¹ toLieModuleHom✝¹.toFun\nright_inv✝¹ : Function.RightInverse invFun✝¹ toLieModuleHom✝¹.toFun\ntoLieModuleHom✝ : M →ₗ⁅R,L⁆ N\ninvFun✝ : N → M\nleft_inv✝ : LeftInverse invFun✝ toLieModuleHom✝.toFun\nright_inv✝ : Function.RightInverse invFun✝ toLieModuleHom✝.toFun\nh₁ :\n  (fun f => f.toFun)\n      { toLieModuleHom := toLieModuleHom✝¹, invFun := invFun✝¹, left_inv := left_inv✝¹, right_inv := right_inv✝¹ } =\n    (fun f => f.toFun)\n      { toLieModuleHom := toLieModuleHom✝, invFun := invFun✝, left_inv := left_inv✝, right_inv := right_inv✝ }\nh₂ :\n  (fun f => f.invFun)\n      { toLieModuleHom := toLieModuleHom✝¹, invFun := invFun✝¹, left_inv := left_inv✝¹, right_inv := right_inv✝¹ } =\n    (fun f => f.invFun)\n      { toLieModuleHom := toLieModuleHom✝, invFun := invFun✝, left_inv := left_inv✝, right_inv := right_inv✝ }\n⊢ { toLieModuleHom := toLieModuleHom✝¹, invFun := invFun✝¹, left_inv := left_inv✝¹, right_inv := right_inv✝¹ } =\n    { toLieModuleHom := toLieModuleHom✝, invFun := invFun✝, left_inv := left_inv✝, right_inv := right_inv✝ }\n[PROOFSTEP]\nsimp at h₁ h₂ \n[GOAL]\ncase mk.mk\nR : Type u\nL : Type v\nM : Type w\nN : Type w₁\nP : Type w₂\ninst✝¹⁴ : CommRing R\ninst✝¹³ : LieRing L\ninst✝¹² : LieAlgebra R L\ninst✝¹¹ : AddCommGroup M\ninst✝¹⁰ : AddCommGroup N\ninst✝⁹ : AddCommGroup P\ninst✝⁸ : Module R M\ninst✝⁷ : Module R N\ninst✝⁶ : Module R P\ninst✝⁵ : LieRingModule L M\ninst✝⁴ : LieRingModule L N\ninst✝³ : LieRingModule L P\ninst✝² : LieModule R L M\ninst✝¹ : LieModule R L N\ninst✝ : LieModule R L P\ntoLieModuleHom✝¹ : M →ₗ⁅R,L⁆ N\ninvFun✝¹ : N → M\nleft_inv✝¹ : LeftInverse invFun✝¹ toLieModuleHom✝¹.toFun\nright_inv✝¹ : Function.RightInverse invFun✝¹ toLieModuleHom✝¹.toFun\ntoLieModuleHom✝ : M →ₗ⁅R,L⁆ N\ninvFun✝ : N → M\nleft_inv✝ : LeftInverse invFun✝ toLieModuleHom✝.toFun\nright_inv✝ : Function.RightInverse invFun✝ toLieModuleHom✝.toFun\nh₂ : invFun✝¹ = invFun✝\nh₁ : toLieModuleHom✝¹ = toLieModuleHom✝\n⊢ { toLieModuleHom := toLieModuleHom✝¹, invFun := invFun✝¹, left_inv := left_inv✝¹, right_inv := right_inv✝¹ } =\n    { toLieModuleHom := toLieModuleHom✝, invFun := invFun✝, left_inv := left_inv✝, right_inv := right_inv✝ }\n[PROOFSTEP]\nsimp [*]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nN : Type w₁\nP : Type w₂\ninst✝¹⁴ : CommRing R\ninst✝¹³ : LieRing L\ninst✝¹² : LieAlgebra R L\ninst✝¹¹ : AddCommGroup M\ninst✝¹⁰ : AddCommGroup N\ninst✝⁹ : AddCommGroup P\ninst✝⁸ : Module R M\ninst✝⁷ : Module R N\ninst✝⁶ : Module R P\ninst✝⁵ : LieRingModule L M\ninst✝⁴ : LieRingModule L N\ninst✝³ : LieRingModule L P\ninst✝² : LieModule R L M\ninst✝¹ : LieModule R L N\ninst✝ : LieModule R L P\n⊢ Injective toEquiv\n[PROOFSTEP]\nrintro ⟨⟨⟨⟨f, -⟩, -⟩, -⟩, f_inv⟩ ⟨⟨⟨⟨g, -⟩, -⟩, -⟩, g_inv⟩\n[GOAL]\ncase mk.mk.mk.mk.mk.mk.mk.mk\nR : Type u\nL : Type v\nM : Type w\nN : Type w₁\nP : Type w₂\ninst✝¹⁴ : CommRing R\ninst✝¹³ : LieRing L\ninst✝¹² : LieAlgebra R L\ninst✝¹¹ : AddCommGroup M\ninst✝¹⁰ : AddCommGroup N\ninst✝⁹ : AddCommGroup P\ninst✝⁸ : Module R M\ninst✝⁷ : Module R N\ninst✝⁶ : Module R P\ninst✝⁵ : LieRingModule L M\ninst✝⁴ : LieRingModule L N\ninst✝³ : LieRingModule L P\ninst✝² : LieModule R L M\ninst✝¹ : LieModule R L N\ninst✝ : LieModule R L P\nf_inv : N → M\nf : M → N\nmap_add'✝¹ : ∀ (x y : M), f (x + y) = f x + f y\nmap_smul'✝¹ :\n  ∀ (r : R) (x : M),\n    AddHom.toFun { toFun := f, map_add' := map_add'✝¹ } (r • x) =\n      ↑(RingHom.id R) r • AddHom.toFun { toFun := f, map_add' := map_add'✝¹ } x\nmap_lie'✝¹ :\n  ∀ {x : L} {m : M},\n    AddHom.toFun { toAddHom := { toFun := f, map_add' := map_add'✝¹ }, map_smul' := map_smul'✝¹ }.toAddHom ⁅x, m⁆ =\n      ⁅x, AddHom.toFun { toAddHom := { toFun := f, map_add' := map_add'✝¹ }, map_smul' := map_smul'✝¹ }.toAddHom m⁆\nleft_inv✝¹ :\n  LeftInverse f_inv\n    (↑{ toLinearMap := { toAddHom := { toFun := f, map_add' := map_add'✝¹ }, map_smul' := map_smul'✝¹ },\n            map_lie' := map_lie'✝¹ }).toAddHom.toFun\nright_inv✝¹ :\n  Function.RightInverse f_inv\n    (↑{ toLinearMap := { toAddHom := { toFun := f, map_add' := map_add'✝¹ }, map_smul' := map_smul'✝¹ },\n            map_lie' := map_lie'✝¹ }).toAddHom.toFun\ng_inv : N → M\ng : M → N\nmap_add'✝ : ∀ (x y : M), g (x + y) = g x + g y\nmap_smul'✝ :\n  ∀ (r : R) (x : M),\n    AddHom.toFun { toFun := g, map_add' := map_add'✝ } (r • x) =\n      ↑(RingHom.id R) r • AddHom.toFun { toFun := g, map_add' := map_add'✝ } x\nmap_lie'✝ :\n  ∀ {x : L} {m : M},\n    AddHom.toFun { toAddHom := { toFun := g, map_add' := map_add'✝ }, map_smul' := map_smul'✝ }.toAddHom ⁅x, m⁆ =\n      ⁅x, AddHom.toFun { toAddHom := { toFun := g, map_add' := map_add'✝ }, map_smul' := map_smul'✝ }.toAddHom m⁆\nleft_inv✝ :\n  LeftInverse g_inv\n    (↑{ toLinearMap := { toAddHom := { toFun := g, map_add' := map_add'✝ }, map_smul' := map_smul'✝ },\n            map_lie' := map_lie'✝ }).toAddHom.toFun\nright_inv✝ :\n  Function.RightInverse g_inv\n    (↑{ toLinearMap := { toAddHom := { toFun := g, map_add' := map_add'✝ }, map_smul' := map_smul'✝ },\n            map_lie' := map_lie'✝ }).toAddHom.toFun\n⊢ toEquiv\n        {\n          toLieModuleHom :=\n            { toLinearMap := { toAddHom := { toFun := f, map_add' := map_add'✝¹ }, map_smul' := map_smul'✝¹ },\n              map_lie' := map_lie'✝¹ },\n          invFun := f_inv, left_inv := left_inv✝¹, right_inv := right_inv✝¹ } =\n      toEquiv\n        {\n          toLieModuleHom :=\n            { toLinearMap := { toAddHom := { toFun := g, map_add' := map_add'✝ }, map_smul' := map_smul'✝ },\n              map_lie' := map_lie'✝ },\n          invFun := g_inv, left_inv := left_inv✝, right_inv := right_inv✝ } →\n    {\n        toLieModuleHom :=\n          { toLinearMap := { toAddHom := { toFun := f, map_add' := map_add'✝¹ }, map_smul' := map_smul'✝¹ },\n            map_lie' := map_lie'✝¹ },\n        invFun := f_inv, left_inv := left_inv✝¹, right_inv := right_inv✝¹ } =\n      {\n        toLieModuleHom :=\n          { toLinearMap := { toAddHom := { toFun := g, map_add' := map_add'✝ }, map_smul' := map_smul'✝ },\n            map_lie' := map_lie'✝ },\n        invFun := g_inv, left_inv := left_inv✝, right_inv := right_inv✝ }\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mk.mk.mk.mk.mk.mk.mk.mk\nR : Type u\nL : Type v\nM : Type w\nN : Type w₁\nP : Type w₂\ninst✝¹⁴ : CommRing R\ninst✝¹³ : LieRing L\ninst✝¹² : LieAlgebra R L\ninst✝¹¹ : AddCommGroup M\ninst✝¹⁰ : AddCommGroup N\ninst✝⁹ : AddCommGroup P\ninst✝⁸ : Module R M\ninst✝⁷ : Module R N\ninst✝⁶ : Module R P\ninst✝⁵ : LieRingModule L M\ninst✝⁴ : LieRingModule L N\ninst✝³ : LieRingModule L P\ninst✝² : LieModule R L M\ninst✝¹ : LieModule R L N\ninst✝ : LieModule R L P\nf_inv : N → M\nf : M → N\nmap_add'✝¹ : ∀ (x y : M), f (x + y) = f x + f y\nmap_smul'✝¹ :\n  ∀ (r : R) (x : M),\n    AddHom.toFun { toFun := f, map_add' := map_add'✝¹ } (r • x) =\n      ↑(RingHom.id R) r • AddHom.toFun { toFun := f, map_add' := map_add'✝¹ } x\nmap_lie'✝¹ :\n  ∀ {x : L} {m : M},\n    AddHom.toFun { toAddHom := { toFun := f, map_add' := map_add'✝¹ }, map_smul' := map_smul'✝¹ }.toAddHom ⁅x, m⁆ =\n      ⁅x, AddHom.toFun { toAddHom := { toFun := f, map_add' := map_add'✝¹ }, map_smul' := map_smul'✝¹ }.toAddHom m⁆\nleft_inv✝¹ :\n  LeftInverse f_inv\n    (↑{ toLinearMap := { toAddHom := { toFun := f, map_add' := map_add'✝¹ }, map_smul' := map_smul'✝¹ },\n            map_lie' := map_lie'✝¹ }).toAddHom.toFun\nright_inv✝¹ :\n  Function.RightInverse f_inv\n    (↑{ toLinearMap := { toAddHom := { toFun := f, map_add' := map_add'✝¹ }, map_smul' := map_smul'✝¹ },\n            map_lie' := map_lie'✝¹ }).toAddHom.toFun\ng_inv : N → M\ng : M → N\nmap_add'✝ : ∀ (x y : M), g (x + y) = g x + g y\nmap_smul'✝ :\n  ∀ (r : R) (x : M),\n    AddHom.toFun { toFun := g, map_add' := map_add'✝ } (r • x) =\n      ↑(RingHom.id R) r • AddHom.toFun { toFun := g, map_add' := map_add'✝ } x\nmap_lie'✝ :\n  ∀ {x : L} {m : M},\n    AddHom.toFun { toAddHom := { toFun := g, map_add' := map_add'✝ }, map_smul' := map_smul'✝ }.toAddHom ⁅x, m⁆ =\n      ⁅x, AddHom.toFun { toAddHom := { toFun := g, map_add' := map_add'✝ }, map_smul' := map_smul'✝ }.toAddHom m⁆\nleft_inv✝ :\n  LeftInverse g_inv\n    (↑{ toLinearMap := { toAddHom := { toFun := g, map_add' := map_add'✝ }, map_smul' := map_smul'✝ },\n            map_lie' := map_lie'✝ }).toAddHom.toFun\nright_inv✝ :\n  Function.RightInverse g_inv\n    (↑{ toLinearMap := { toAddHom := { toFun := g, map_add' := map_add'✝ }, map_smul' := map_smul'✝ },\n            map_lie' := map_lie'✝ }).toAddHom.toFun\nh :\n  toEquiv\n      {\n        toLieModuleHom :=\n          { toLinearMap := { toAddHom := { toFun := f, map_add' := map_add'✝¹ }, map_smul' := map_smul'✝¹ },\n            map_lie' := map_lie'✝¹ },\n        invFun := f_inv, left_inv := left_inv✝¹, right_inv := right_inv✝¹ } =\n    toEquiv\n      {\n        toLieModuleHom :=\n          { toLinearMap := { toAddHom := { toFun := g, map_add' := map_add'✝ }, map_smul' := map_smul'✝ },\n            map_lie' := map_lie'✝ },\n        invFun := g_inv, left_inv := left_inv✝, right_inv := right_inv✝ }\n⊢ {\n      toLieModuleHom :=\n        { toLinearMap := { toAddHom := { toFun := f, map_add' := map_add'✝¹ }, map_smul' := map_smul'✝¹ },\n          map_lie' := map_lie'✝¹ },\n      invFun := f_inv, left_inv := left_inv✝¹, right_inv := right_inv✝¹ } =\n    {\n      toLieModuleHom :=\n        { toLinearMap := { toAddHom := { toFun := g, map_add' := map_add'✝ }, map_smul' := map_smul'✝ },\n          map_lie' := map_lie'✝ },\n      invFun := g_inv, left_inv := left_inv✝, right_inv := right_inv✝ }\n[PROOFSTEP]\nsimp only [toEquiv_mk, LieModuleHom.coe_mk, LinearMap.coe_mk, AddHom.coe_mk, Equiv.mk.injEq] at h \n[GOAL]\ncase mk.mk.mk.mk.mk.mk.mk.mk\nR : Type u\nL : Type v\nM : Type w\nN : Type w₁\nP : Type w₂\ninst✝¹⁴ : CommRing R\ninst✝¹³ : LieRing L\ninst✝¹² : LieAlgebra R L\ninst✝¹¹ : AddCommGroup M\ninst✝¹⁰ : AddCommGroup N\ninst✝⁹ : AddCommGroup P\ninst✝⁸ : Module R M\ninst✝⁷ : Module R N\ninst✝⁶ : Module R P\ninst✝⁵ : LieRingModule L M\ninst✝⁴ : LieRingModule L N\ninst✝³ : LieRingModule L P\ninst✝² : LieModule R L M\ninst✝¹ : LieModule R L N\ninst✝ : LieModule R L P\nf_inv : N → M\nf : M → N\nmap_add'✝¹ : ∀ (x y : M), f (x + y) = f x + f y\nmap_smul'✝¹ :\n  ∀ (r : R) (x : M),\n    AddHom.toFun { toFun := f, map_add' := map_add'✝¹ } (r • x) =\n      ↑(RingHom.id R) r • AddHom.toFun { toFun := f, map_add' := map_add'✝¹ } x\nmap_lie'✝¹ :\n  ∀ {x : L} {m : M},\n    AddHom.toFun { toAddHom := { toFun := f, map_add' := map_add'✝¹ }, map_smul' := map_smul'✝¹ }.toAddHom ⁅x, m⁆ =\n      ⁅x, AddHom.toFun { toAddHom := { toFun := f, map_add' := map_add'✝¹ }, map_smul' := map_smul'✝¹ }.toAddHom m⁆\nleft_inv✝¹ :\n  LeftInverse f_inv\n    (↑{ toLinearMap := { toAddHom := { toFun := f, map_add' := map_add'✝¹ }, map_smul' := map_smul'✝¹ },\n            map_lie' := map_lie'✝¹ }).toAddHom.toFun\nright_inv✝¹ :\n  Function.RightInverse f_inv\n    (↑{ toLinearMap := { toAddHom := { toFun := f, map_add' := map_add'✝¹ }, map_smul' := map_smul'✝¹ },\n            map_lie' := map_lie'✝¹ }).toAddHom.toFun\ng_inv : N → M\ng : M → N\nmap_add'✝ : ∀ (x y : M), g (x + y) = g x + g y\nmap_smul'✝ :\n  ∀ (r : R) (x : M),\n    AddHom.toFun { toFun := g, map_add' := map_add'✝ } (r • x) =\n      ↑(RingHom.id R) r • AddHom.toFun { toFun := g, map_add' := map_add'✝ } x\nmap_lie'✝ :\n  ∀ {x : L} {m : M},\n    AddHom.toFun { toAddHom := { toFun := g, map_add' := map_add'✝ }, map_smul' := map_smul'✝ }.toAddHom ⁅x, m⁆ =\n      ⁅x, AddHom.toFun { toAddHom := { toFun := g, map_add' := map_add'✝ }, map_smul' := map_smul'✝ }.toAddHom m⁆\nleft_inv✝ :\n  LeftInverse g_inv\n    (↑{ toLinearMap := { toAddHom := { toFun := g, map_add' := map_add'✝ }, map_smul' := map_smul'✝ },\n            map_lie' := map_lie'✝ }).toAddHom.toFun\nright_inv✝ :\n  Function.RightInverse g_inv\n    (↑{ toLinearMap := { toAddHom := { toFun := g, map_add' := map_add'✝ }, map_smul' := map_smul'✝ },\n            map_lie' := map_lie'✝ }).toAddHom.toFun\nh : f = g ∧ f_inv = g_inv\n⊢ {\n      toLieModuleHom :=\n        { toLinearMap := { toAddHom := { toFun := f, map_add' := map_add'✝¹ }, map_smul' := map_smul'✝¹ },\n          map_lie' := map_lie'✝¹ },\n      invFun := f_inv, left_inv := left_inv✝¹, right_inv := right_inv✝¹ } =\n    {\n      toLieModuleHom :=\n        { toLinearMap := { toAddHom := { toFun := g, map_add' := map_add'✝ }, map_smul' := map_smul'✝ },\n          map_lie' := map_lie'✝ },\n      invFun := g_inv, left_inv := left_inv✝, right_inv := right_inv✝ }\n[PROOFSTEP]\ncongr\n[GOAL]\ncase mk.mk.mk.mk.mk.mk.mk.mk.e_toLieModuleHom.e_toLinearMap.e_toAddHom.e_toFun\nR : Type u\nL : Type v\nM : Type w\nN : Type w₁\nP : Type w₂\ninst✝¹⁴ : CommRing R\ninst✝¹³ : LieRing L\ninst✝¹² : LieAlgebra R L\ninst✝¹¹ : AddCommGroup M\ninst✝¹⁰ : AddCommGroup N\ninst✝⁹ : AddCommGroup P\ninst✝⁸ : Module R M\ninst✝⁷ : Module R N\ninst✝⁶ : Module R P\ninst✝⁵ : LieRingModule L M\ninst✝⁴ : LieRingModule L N\ninst✝³ : LieRingModule L P\ninst✝² : LieModule R L M\ninst✝¹ : LieModule R L N\ninst✝ : LieModule R L P\nf_inv : N → M\nf : M → N\nmap_add'✝¹ : ∀ (x y : M), f (x + y) = f x + f y\nmap_smul'✝¹ :\n  ∀ (r : R) (x : M),\n    AddHom.toFun { toFun := f, map_add' := map_add'✝¹ } (r • x) =\n      ↑(RingHom.id R) r • AddHom.toFun { toFun := f, map_add' := map_add'✝¹ } x\nmap_lie'✝¹ :\n  ∀ {x : L} {m : M},\n    AddHom.toFun { toAddHom := { toFun := f, map_add' := map_add'✝¹ }, map_smul' := map_smul'✝¹ }.toAddHom ⁅x, m⁆ =\n      ⁅x, AddHom.toFun { toAddHom := { toFun := f, map_add' := map_add'✝¹ }, map_smul' := map_smul'✝¹ }.toAddHom m⁆\nleft_inv✝¹ :\n  LeftInverse f_inv\n    (↑{ toLinearMap := { toAddHom := { toFun := f, map_add' := map_add'✝¹ }, map_smul' := map_smul'✝¹ },\n            map_lie' := map_lie'✝¹ }).toAddHom.toFun\nright_inv✝¹ :\n  Function.RightInverse f_inv\n    (↑{ toLinearMap := { toAddHom := { toFun := f, map_add' := map_add'✝¹ }, map_smul' := map_smul'✝¹ },\n            map_lie' := map_lie'✝¹ }).toAddHom.toFun\ng_inv : N → M\ng : M → N\nmap_add'✝ : ∀ (x y : M), g (x + y) = g x + g y\nmap_smul'✝ :\n  ∀ (r : R) (x : M),\n    AddHom.toFun { toFun := g, map_add' := map_add'✝ } (r • x) =\n      ↑(RingHom.id R) r • AddHom.toFun { toFun := g, map_add' := map_add'✝ } x\nmap_lie'✝ :\n  ∀ {x : L} {m : M},\n    AddHom.toFun { toAddHom := { toFun := g, map_add' := map_add'✝ }, map_smul' := map_smul'✝ }.toAddHom ⁅x, m⁆ =\n      ⁅x, AddHom.toFun { toAddHom := { toFun := g, map_add' := map_add'✝ }, map_smul' := map_smul'✝ }.toAddHom m⁆\nleft_inv✝ :\n  LeftInverse g_inv\n    (↑{ toLinearMap := { toAddHom := { toFun := g, map_add' := map_add'✝ }, map_smul' := map_smul'✝ },\n            map_lie' := map_lie'✝ }).toAddHom.toFun\nright_inv✝ :\n  Function.RightInverse g_inv\n    (↑{ toLinearMap := { toAddHom := { toFun := g, map_add' := map_add'✝ }, map_smul' := map_smul'✝ },\n            map_lie' := map_lie'✝ }).toAddHom.toFun\nh : f = g ∧ f_inv = g_inv\n⊢ f = g\ncase mk.mk.mk.mk.mk.mk.mk.mk.e_invFun\nR : Type u\nL : Type v\nM : Type w\nN : Type w₁\nP : Type w₂\ninst✝¹⁴ : CommRing R\ninst✝¹³ : LieRing L\ninst✝¹² : LieAlgebra R L\ninst✝¹¹ : AddCommGroup M\ninst✝¹⁰ : AddCommGroup N\ninst✝⁹ : AddCommGroup P\ninst✝⁸ : Module R M\ninst✝⁷ : Module R N\ninst✝⁶ : Module R P\ninst✝⁵ : LieRingModule L M\ninst✝⁴ : LieRingModule L N\ninst✝³ : LieRingModule L P\ninst✝² : LieModule R L M\ninst✝¹ : LieModule R L N\ninst✝ : LieModule R L P\nf_inv : N → M\nf : M → N\nmap_add'✝¹ : ∀ (x y : M), f (x + y) = f x + f y\nmap_smul'✝¹ :\n  ∀ (r : R) (x : M),\n    AddHom.toFun { toFun := f, map_add' := map_add'✝¹ } (r • x) =\n      ↑(RingHom.id R) r • AddHom.toFun { toFun := f, map_add' := map_add'✝¹ } x\nmap_lie'✝¹ :\n  ∀ {x : L} {m : M},\n    AddHom.toFun { toAddHom := { toFun := f, map_add' := map_add'✝¹ }, map_smul' := map_smul'✝¹ }.toAddHom ⁅x, m⁆ =\n      ⁅x, AddHom.toFun { toAddHom := { toFun := f, map_add' := map_add'✝¹ }, map_smul' := map_smul'✝¹ }.toAddHom m⁆\nleft_inv✝¹ :\n  LeftInverse f_inv\n    (↑{ toLinearMap := { toAddHom := { toFun := f, map_add' := map_add'✝¹ }, map_smul' := map_smul'✝¹ },\n            map_lie' := map_lie'✝¹ }).toAddHom.toFun\nright_inv✝¹ :\n  Function.RightInverse f_inv\n    (↑{ toLinearMap := { toAddHom := { toFun := f, map_add' := map_add'✝¹ }, map_smul' := map_smul'✝¹ },\n            map_lie' := map_lie'✝¹ }).toAddHom.toFun\ng_inv : N → M\ng : M → N\nmap_add'✝ : ∀ (x y : M), g (x + y) = g x + g y\nmap_smul'✝ :\n  ∀ (r : R) (x : M),\n    AddHom.toFun { toFun := g, map_add' := map_add'✝ } (r • x) =\n      ↑(RingHom.id R) r • AddHom.toFun { toFun := g, map_add' := map_add'✝ } x\nmap_lie'✝ :\n  ∀ {x : L} {m : M},\n    AddHom.toFun { toAddHom := { toFun := g, map_add' := map_add'✝ }, map_smul' := map_smul'✝ }.toAddHom ⁅x, m⁆ =\n      ⁅x, AddHom.toFun { toAddHom := { toFun := g, map_add' := map_add'✝ }, map_smul' := map_smul'✝ }.toAddHom m⁆\nleft_inv✝ :\n  LeftInverse g_inv\n    (↑{ toLinearMap := { toAddHom := { toFun := g, map_add' := map_add'✝ }, map_smul' := map_smul'✝ },\n            map_lie' := map_lie'✝ }).toAddHom.toFun\nright_inv✝ :\n  Function.RightInverse g_inv\n    (↑{ toLinearMap := { toAddHom := { toFun := g, map_add' := map_add'✝ }, map_smul' := map_smul'✝ },\n            map_lie' := map_lie'✝ }).toAddHom.toFun\nh : f = g ∧ f_inv = g_inv\n⊢ f_inv = g_inv\n[PROOFSTEP]\nexacts [h.1, h.2]\n[GOAL]\nR : Type u\nL : Type v\nM : Type w\nN : Type w₁\nP : Type w₂\ninst✝¹⁴ : CommRing R\ninst✝¹³ : LieRing L\ninst✝¹² : LieAlgebra R L\ninst✝¹¹ : AddCommGroup M\ninst✝¹⁰ : AddCommGroup N\ninst✝⁹ : AddCommGroup P\ninst✝⁸ : Module R M\ninst✝⁷ : Module R N\ninst✝⁶ : Module R P\ninst✝⁵ : LieRingModule L M\ninst✝⁴ : LieRingModule L N\ninst✝³ : LieRingModule L P\ninst✝² : LieModule R L M\ninst✝¹ : LieModule R L N\ninst✝ : LieModule R L P\ne : M ≃ₗ⁅R,L⁆ N\n⊢ symm (symm e) = e\n[PROOFSTEP]\nrfl\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Lie.Basic", "llama_tokens": 51595, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7606506526772883, "lm_q2_score": 0.6992544147913994, "lm_q1q2_score": 0.5318883269985532}}
{"text": "[GOAL]\nα✝ : Type u_1\nβ : Type u_2\ninst✝² : TopologicalSpace α✝\ninst✝¹ : TopologicalSpace β\ns t s₁ s₂ t₁ t₂ : Set α✝\nx : α✝\nα : Type u_3\ninst✝ : TopologicalSpace (α × α)\n⊢ 𝓝ˢ (diagonal α) = ⨆ (x : α), 𝓝 (x, x)\n[PROOFSTEP]\nrw [nhdsSet, ← range_diag, ← range_comp]\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\ninst✝² : TopologicalSpace α✝\ninst✝¹ : TopologicalSpace β\ns t s₁ s₂ t₁ t₂ : Set α✝\nx : α✝\nα : Type u_3\ninst✝ : TopologicalSpace (α × α)\n⊢ sSup (range (𝓝 ∘ fun x => (x, x))) = ⨆ (x : α), 𝓝 (x, x)\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\ns t s₁ s₂ t₁ t₂ : Set α\nx : α\n⊢ s ∈ 𝓝ˢ t ↔ ∀ (x : α), x ∈ t → s ∈ 𝓝 x\n[PROOFSTEP]\nsimp_rw [nhdsSet, Filter.mem_sSup, ball_image_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\ns t s₁ s₂ t₁ t₂ : Set α\nx : α\n⊢ s ⊆ interior t ↔ t ∈ 𝓝ˢ s\n[PROOFSTEP]\nsimp_rw [mem_nhdsSet_iff_forall, subset_interior_iff_nhds]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\ns t s₁ s₂ t₁ t₂ : Set α\nx : α\n⊢ Disjoint (𝓟 s) (𝓝ˢ t) ↔ Disjoint (closure s) t\n[PROOFSTEP]\nrw [disjoint_principal_left, ← subset_interior_iff_mem_nhdsSet, interior_compl, subset_compl_iff_disjoint_left]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\ns t s₁ s₂ t₁ t₂ : Set α\nx : α\n⊢ Disjoint (𝓝ˢ s) (𝓟 t) ↔ Disjoint s (closure t)\n[PROOFSTEP]\nrw [disjoint_comm, disjoint_principal_nhdsSet, disjoint_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\ns t s₁ s₂ t₁ t₂ : Set α\nx : α\n⊢ s ∈ 𝓝ˢ t ↔ ∃ U, IsOpen U ∧ t ⊆ U ∧ U ⊆ s\n[PROOFSTEP]\nrw [← subset_interior_iff_mem_nhdsSet, subset_interior_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\ns✝ t✝ s₁ s₂ t₁ t₂ : Set α\nx : α\ns t : Set α\n⊢ t ∈ 𝓝ˢ s ↔ ∃ i, (IsOpen i ∧ s ⊆ i) ∧ i ⊆ t\n[PROOFSTEP]\nsimp [mem_nhdsSet_iff_exists, and_assoc]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\ns t s₁ s₂ t₁ t₂ : Set α\nx : α\nhU : IsOpen s\n⊢ s ∈ 𝓝ˢ t ↔ t ⊆ s\n[PROOFSTEP]\nrw [← subset_interior_iff_mem_nhdsSet, hU.interior_eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\ns t s₁ s₂ t₁ t₂ : Set α\nx : α\n⊢ 𝓝ˢ s = 𝓟 s ↔ IsOpen s\n[PROOFSTEP]\nrw [← principal_le_nhdsSet.le_iff_eq, le_principal_iff, mem_nhdsSet_iff_forall, isOpen_iff_mem_nhds]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\ns t s₁ s₂ t₁ t₂ : Set α\nx : α\n⊢ 𝓝ˢ {x} = 𝓝 x\n[PROOFSTEP]\nsimp [nhdsSet]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\ns t s₁ s₂ t₁ t₂ : Set α\nx : α\n⊢ 𝓝ˢ ∅ = ⊥\n[PROOFSTEP]\nrw [isOpen_empty.nhdsSet_eq, principal_empty]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\ns t s₁ s₂ t₁ t₂ : Set α\nx : α\n⊢ s ∈ 𝓝ˢ ∅\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\ns t s₁ s₂ t₁ t₂ : Set α\nx : α\n⊢ 𝓝ˢ univ = ⊤\n[PROOFSTEP]\nrw [isOpen_univ.nhdsSet_eq, principal_univ]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\ns✝ t✝ s₁ s₂ t₁ t₂ : Set α\nx : α\ns t : Set α\n⊢ 𝓝ˢ (s ∪ t) = 𝓝ˢ s ⊔ 𝓝ˢ t\n[PROOFSTEP]\nsimp only [nhdsSet, image_union, sSup_union]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\ns t s₁ s₂ t₁ t₂ : Set α\nx : α\nh₁ : s₁ ∈ 𝓝ˢ t₁\nh₂ : s₂ ∈ 𝓝ˢ t₂\n⊢ s₁ ∪ s₂ ∈ 𝓝ˢ (t₁ ∪ t₂)\n[PROOFSTEP]\nrw [nhdsSet_union]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\ns t s₁ s₂ t₁ t₂ : Set α\nx : α\nh₁ : s₁ ∈ 𝓝ˢ t₁\nh₂ : s₂ ∈ 𝓝ˢ t₂\n⊢ s₁ ∪ s₂ ∈ 𝓝ˢ t₁ ⊔ 𝓝ˢ t₂\n[PROOFSTEP]\nexact union_mem_sup h₁ h₂\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\ns✝ t s₁ s₂ t₁ t₂ : Set α\nx✝ x : α\ns : Set α\n⊢ 𝓝ˢ (insert x s) = 𝓝 x ⊔ 𝓝ˢ s\n[PROOFSTEP]\nrw [insert_eq, nhdsSet_union, nhdsSet_singleton]\n", "meta": {"mathlib_filename": "Mathlib.Topology.NhdsSet", "llama_tokens": 2136, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7461389817407017, "lm_q2_score": 0.7122321720225278, "lm_q1q2_score": 0.5314241875958572}}
{"text": "[GOAL]\nM : Type u\ninst✝ : Monoid M\nX x✝¹ x✝ : Discrete M\nf : x✝¹ ⟶ x✝\n⊢ (fun X Y => { as := X.as * Y.as }) X x✝¹ = (fun X Y => { as := X.as * Y.as }) X x✝\n[PROOFSTEP]\ndsimp\n[GOAL]\nM : Type u\ninst✝ : Monoid M\nX x✝¹ x✝ : Discrete M\nf : x✝¹ ⟶ x✝\n⊢ { as := X.as * x✝¹.as } = { as := X.as * x✝.as }\n[PROOFSTEP]\nrw [eq_of_hom f]\n[GOAL]\nM : Type u\ninst✝ : Monoid M\nX₁✝ X₂✝ : Discrete M\nf : X₁✝ ⟶ X₂✝\nX : Discrete M\n⊢ (fun X Y => { as := X.as * Y.as }) X₁✝ X = (fun X Y => { as := X.as * Y.as }) X₂✝ X\n[PROOFSTEP]\ndsimp\n[GOAL]\nM : Type u\ninst✝ : Monoid M\nX₁✝ X₂✝ : Discrete M\nf : X₁✝ ⟶ X₂✝\nX : Discrete M\n⊢ { as := X₁✝.as * X.as } = { as := X₂✝.as * X.as }\n[PROOFSTEP]\nrw [eq_of_hom f]\n[GOAL]\nM : Type u\ninst✝ : Monoid M\nX₁✝ Y₁✝ X₂✝ Y₂✝ : Discrete M\nf : X₁✝ ⟶ Y₁✝\ng : X₂✝ ⟶ Y₂✝\n⊢ (fun X Y => { as := X.as * Y.as }) X₁✝ X₂✝ = (fun X Y => { as := X.as * Y.as }) Y₁✝ Y₂✝\n[PROOFSTEP]\ndsimp\n[GOAL]\nM : Type u\ninst✝ : Monoid M\nX₁✝ Y₁✝ X₂✝ Y₂✝ : Discrete M\nf : X₁✝ ⟶ Y₁✝\ng : X₂✝ ⟶ Y₂✝\n⊢ { as := X₁✝.as * X₂✝.as } = { as := Y₁✝.as * Y₂✝.as }\n[PROOFSTEP]\nrw [eq_of_hom f, eq_of_hom g]\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Monoidal.Discrete", "llama_tokens": 696, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7745833945721304, "lm_q2_score": 0.6859494485880927, "lm_q1q2_score": 0.5313250523922459}}
{"text": "[GOAL]\nα : Type u_1\ninst✝ : DivisionSemiring α\nm n : ℕ\nn_dvd : n ∣ m\nn_nonzero : ↑n ≠ 0\n⊢ ↑(m / n) = ↑m / ↑n\n[PROOFSTEP]\nrcases n_dvd with ⟨k, rfl⟩\n[GOAL]\ncase intro\nα : Type u_1\ninst✝ : DivisionSemiring α\nn : ℕ\nn_nonzero : ↑n ≠ 0\nk : ℕ\n⊢ ↑(n * k / n) = ↑(n * k) / ↑n\n[PROOFSTEP]\nhave : n ≠ 0 := by\n  rintro rfl\n  simp at n_nonzero \n[GOAL]\nα : Type u_1\ninst✝ : DivisionSemiring α\nn : ℕ\nn_nonzero : ↑n ≠ 0\nk : ℕ\n⊢ n ≠ 0\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nα : Type u_1\ninst✝ : DivisionSemiring α\nk : ℕ\nn_nonzero : ↑0 ≠ 0\n⊢ False\n[PROOFSTEP]\nsimp at n_nonzero \n[GOAL]\ncase intro\nα : Type u_1\ninst✝ : DivisionSemiring α\nn : ℕ\nn_nonzero : ↑n ≠ 0\nk : ℕ\nthis : n ≠ 0\n⊢ ↑(n * k / n) = ↑(n * k) / ↑n\n[PROOFSTEP]\nrw [Nat.mul_div_cancel_left _ this.bot_lt, mul_comm n k, cast_mul, mul_div_cancel _ n_nonzero]\n[GOAL]\nα : Type u_1\ninst✝¹ : DivisionSemiring α\ninst✝ : CharZero α\nm n d : ℕ\nhn : d ∣ n\nhm : d ∣ m\n⊢ ↑(m / d) / ↑(n / d) = ↑m / ↑n\n[PROOFSTEP]\nrcases eq_or_ne d 0 with (rfl | hd)\n[GOAL]\ncase inl\nα : Type u_1\ninst✝¹ : DivisionSemiring α\ninst✝ : CharZero α\nm n : ℕ\nhn : 0 ∣ n\nhm : 0 ∣ m\n⊢ ↑(m / 0) / ↑(n / 0) = ↑m / ↑n\n[PROOFSTEP]\nsimp [zero_dvd_iff.mp hm]\n[GOAL]\ncase inr\nα : Type u_1\ninst✝¹ : DivisionSemiring α\ninst✝ : CharZero α\nm n d : ℕ\nhn : d ∣ n\nhm : d ∣ m\nhd : d ≠ 0\n⊢ ↑(m / d) / ↑(n / d) = ↑m / ↑n\n[PROOFSTEP]\nreplace hd : (d : α) ≠ 0\n[GOAL]\ncase hd\nα : Type u_1\ninst✝¹ : DivisionSemiring α\ninst✝ : CharZero α\nm n d : ℕ\nhn : d ∣ n\nhm : d ∣ m\nhd : d ≠ 0\n⊢ ↑d ≠ 0\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase inr\nα : Type u_1\ninst✝¹ : DivisionSemiring α\ninst✝ : CharZero α\nm n d : ℕ\nhn : d ∣ n\nhm : d ∣ m\nhd : ↑d ≠ 0\n⊢ ↑(m / d) / ↑(n / d) = ↑m / ↑n\n[PROOFSTEP]\nrw [cast_div hm, cast_div hn, div_div_div_cancel_right _ hd]\n[GOAL]\ncase inr\nα : Type u_1\ninst✝¹ : DivisionSemiring α\ninst✝ : CharZero α\nm n d : ℕ\nhn : d ∣ n\nhm : d ∣ m\nhd : ↑d ≠ 0\n⊢ ↑d ≠ 0\n[PROOFSTEP]\nexact hd\n[GOAL]\ncase inr\nα : Type u_1\ninst✝¹ : DivisionSemiring α\ninst✝ : CharZero α\nm n d : ℕ\nhn : d ∣ n\nhm : d ∣ m\nhd : ↑d ≠ 0\n⊢ ↑d ≠ 0\n[PROOFSTEP]\nexact hd\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedSemifield α\nm n : ℕ\n⊢ ↑(m / n) ≤ ↑m / ↑n\n[PROOFSTEP]\ncases n\n[GOAL]\ncase zero\nα : Type u_1\ninst✝ : LinearOrderedSemifield α\nm : ℕ\n⊢ ↑(m / zero) ≤ ↑m / ↑zero\n[PROOFSTEP]\nrw [cast_zero, div_zero, Nat.div_zero, cast_zero]\n[GOAL]\ncase succ\nα : Type u_1\ninst✝ : LinearOrderedSemifield α\nm n✝ : ℕ\n⊢ ↑(m / succ n✝) ≤ ↑m / ↑(succ n✝)\n[PROOFSTEP]\nrw [le_div_iff, ← Nat.cast_mul, @Nat.cast_le]\n[GOAL]\ncase succ\nα : Type u_1\ninst✝ : LinearOrderedSemifield α\nm n✝ : ℕ\n⊢ m / succ n✝ * succ n✝ ≤ m\ncase succ α : Type u_1 inst✝ : LinearOrderedSemifield α m n✝ : ℕ ⊢ 0 < ↑(succ n✝)\n[PROOFSTEP]\nexact (Nat.div_mul_le_self m _)\n[GOAL]\ncase succ\nα : Type u_1\ninst✝ : LinearOrderedSemifield α\nm n✝ : ℕ\n⊢ 0 < ↑(succ n✝)\n[PROOFSTEP]\nexact Nat.cast_pos.2 (Nat.succ_pos _)\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedSemifield α\nn : ℕ\n⊢ 0 < 1 / (↑n + 1)\n[PROOFSTEP]\nrw [one_div]\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedSemifield α\nn : ℕ\n⊢ 0 < (↑n + 1)⁻¹\n[PROOFSTEP]\nexact inv_pos_of_nat\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedSemifield α\nn m : ℕ\nh : n ≤ m\n⊢ 1 / (↑m + 1) ≤ 1 / (↑n + 1)\n[PROOFSTEP]\nrefine' one_div_le_one_div_of_le _ _\n[GOAL]\ncase refine'_1\nα : Type u_1\ninst✝ : LinearOrderedSemifield α\nn m : ℕ\nh : n ≤ m\n⊢ 0 < ↑n + 1\ncase refine'_2 α : Type u_1 inst✝ : LinearOrderedSemifield α n m : ℕ h : n ≤ m ⊢ ↑n + 1 ≤ ↑m + 1\n[PROOFSTEP]\nexact Nat.cast_add_one_pos _\n[GOAL]\ncase refine'_2\nα : Type u_1\ninst✝ : LinearOrderedSemifield α\nn m : ℕ\nh : n ≤ m\n⊢ ↑n + 1 ≤ ↑m + 1\n[PROOFSTEP]\nsimpa\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedSemifield α\nn m : ℕ\nh : n < m\n⊢ 1 / (↑m + 1) < 1 / (↑n + 1)\n[PROOFSTEP]\nrefine' one_div_lt_one_div_of_lt _ _\n[GOAL]\ncase refine'_1\nα : Type u_1\ninst✝ : LinearOrderedSemifield α\nn m : ℕ\nh : n < m\n⊢ 0 < ↑n + 1\ncase refine'_2 α : Type u_1 inst✝ : LinearOrderedSemifield α n m : ℕ h : n < m ⊢ ↑n + 1 < ↑m + 1\n[PROOFSTEP]\nexact Nat.cast_add_one_pos _\n[GOAL]\ncase refine'_2\nα : Type u_1\ninst✝ : LinearOrderedSemifield α\nn m : ℕ\nh : n < m\n⊢ ↑n + 1 < ↑m + 1\n[PROOFSTEP]\nsimpa\n", "meta": {"mathlib_filename": "Mathlib.Data.Nat.Cast.Field", "llama_tokens": 2268, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7745833737577157, "lm_q2_score": 0.6859494485880927, "lm_q1q2_score": 0.5313250381146096}}
{"text": "[GOAL]\nC : Type u_1\nD : Type u_2\ninst✝⁵ : Category.{?u.40211, u_1} C\ninst✝⁴ : Category.{?u.40215, u_2} D\ninst✝³ : MonoidalCategory C\ninst✝² : MonoidalCategory D\nF : MonoidalFunctor C D\ninst✝¹ : Faithful F.toFunctor\ninst✝ : BraidedCategory D\nβ : (X Y : C) → X ⊗ Y ≅ Y ⊗ X\nw :\n  ∀ (X Y : C),\n    LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor X Y ≫ F.map (β X Y).hom =\n      (β_ (F.obj X) (F.obj Y)).hom ≫ LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor Y X\n⊢ ∀ {X X' Y Y' : C} (f : X ⟶ Y) (g : X' ⟶ Y'), (f ⊗ g) ≫ (β Y Y').hom = (β X X').hom ≫ (g ⊗ f)\n[PROOFSTEP]\nintros\n[GOAL]\nC : Type u_1\nD : Type u_2\ninst✝⁵ : Category.{?u.40211, u_1} C\ninst✝⁴ : Category.{?u.40215, u_2} D\ninst✝³ : MonoidalCategory C\ninst✝² : MonoidalCategory D\nF : MonoidalFunctor C D\ninst✝¹ : Faithful F.toFunctor\ninst✝ : BraidedCategory D\nβ : (X Y : C) → X ⊗ Y ≅ Y ⊗ X\nw :\n  ∀ (X Y : C),\n    LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor X Y ≫ F.map (β X Y).hom =\n      (β_ (F.obj X) (F.obj Y)).hom ≫ LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor Y X\nX✝ X'✝ Y✝ Y'✝ : C\nf✝ : X✝ ⟶ Y✝\ng✝ : X'✝ ⟶ Y'✝\n⊢ (f✝ ⊗ g✝) ≫ (β Y✝ Y'✝).hom = (β X✝ X'✝).hom ≫ (g✝ ⊗ f✝)\n[PROOFSTEP]\napply F.map_injective\n[GOAL]\ncase a\nC : Type u_1\nD : Type u_2\ninst✝⁵ : Category.{?u.40211, u_1} C\ninst✝⁴ : Category.{?u.40215, u_2} D\ninst✝³ : MonoidalCategory C\ninst✝² : MonoidalCategory D\nF : MonoidalFunctor C D\ninst✝¹ : Faithful F.toFunctor\ninst✝ : BraidedCategory D\nβ : (X Y : C) → X ⊗ Y ≅ Y ⊗ X\nw :\n  ∀ (X Y : C),\n    LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor X Y ≫ F.map (β X Y).hom =\n      (β_ (F.obj X) (F.obj Y)).hom ≫ LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor Y X\nX✝ X'✝ Y✝ Y'✝ : C\nf✝ : X✝ ⟶ Y✝\ng✝ : X'✝ ⟶ Y'✝\n⊢ F.map ((f✝ ⊗ g✝) ≫ (β Y✝ Y'✝).hom) = F.map ((β X✝ X'✝).hom ≫ (g✝ ⊗ f✝))\n[PROOFSTEP]\nrefine (cancel_epi (F.μ ?_ ?_)).1 ?_\n[GOAL]\ncase a\nC : Type u_1\nD : Type u_2\ninst✝⁵ : Category.{?u.40211, u_1} C\ninst✝⁴ : Category.{?u.40215, u_2} D\ninst✝³ : MonoidalCategory C\ninst✝² : MonoidalCategory D\nF : MonoidalFunctor C D\ninst✝¹ : Faithful F.toFunctor\ninst✝ : BraidedCategory D\nβ : (X Y : C) → X ⊗ Y ≅ Y ⊗ X\nw :\n  ∀ (X Y : C),\n    LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor X Y ≫ F.map (β X Y).hom =\n      (β_ (F.obj X) (F.obj Y)).hom ≫ LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor Y X\nX✝ X'✝ Y✝ Y'✝ : C\nf✝ : X✝ ⟶ Y✝\ng✝ : X'✝ ⟶ Y'✝\n⊢ LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor X✝ X'✝ ≫ F.map ((f✝ ⊗ g✝) ≫ (β Y✝ Y'✝).hom) =\n    LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor X✝ X'✝ ≫ F.map ((β X✝ X'✝).hom ≫ (g✝ ⊗ f✝))\n[PROOFSTEP]\nrw [Functor.map_comp, ← LaxMonoidalFunctor.μ_natural_assoc, w, Functor.map_comp, reassoc_of% w,\n  braiding_naturality_assoc, LaxMonoidalFunctor.μ_natural]\n[GOAL]\nC : Type u_1\nD : Type u_2\ninst✝⁵ : Category.{?u.40211, u_1} C\ninst✝⁴ : Category.{?u.40215, u_2} D\ninst✝³ : MonoidalCategory C\ninst✝² : MonoidalCategory D\nF : MonoidalFunctor C D\ninst✝¹ : Faithful F.toFunctor\ninst✝ : BraidedCategory D\nβ : (X Y : C) → X ⊗ Y ≅ Y ⊗ X\nw :\n  ∀ (X Y : C),\n    LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor X Y ≫ F.map (β X Y).hom =\n      (β_ (F.obj X) (F.obj Y)).hom ≫ LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor Y X\n⊢ ∀ (X Y Z : C),\n    (α_ X Y Z).hom ≫ (β X (Y ⊗ Z)).hom ≫ (α_ Y Z X).hom = ((β X Y).hom ⊗ 𝟙 Z) ≫ (α_ Y X Z).hom ≫ (𝟙 Y ⊗ (β X Z).hom)\n[PROOFSTEP]\nintros\n[GOAL]\nC : Type u_1\nD : Type u_2\ninst✝⁵ : Category.{?u.40211, u_1} C\ninst✝⁴ : Category.{?u.40215, u_2} D\ninst✝³ : MonoidalCategory C\ninst✝² : MonoidalCategory D\nF : MonoidalFunctor C D\ninst✝¹ : Faithful F.toFunctor\ninst✝ : BraidedCategory D\nβ : (X Y : C) → X ⊗ Y ≅ Y ⊗ X\nw :\n  ∀ (X Y : C),\n    LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor X Y ≫ F.map (β X Y).hom =\n      (β_ (F.obj X) (F.obj Y)).hom ≫ LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor Y X\nX✝ Y✝ Z✝ : C\n⊢ (α_ X✝ Y✝ Z✝).hom ≫ (β X✝ (Y✝ ⊗ Z✝)).hom ≫ (α_ Y✝ Z✝ X✝).hom =\n    ((β X✝ Y✝).hom ⊗ 𝟙 Z✝) ≫ (α_ Y✝ X✝ Z✝).hom ≫ (𝟙 Y✝ ⊗ (β X✝ Z✝).hom)\n[PROOFSTEP]\napply F.map_injective\n[GOAL]\ncase a\nC : Type u_1\nD : Type u_2\ninst✝⁵ : Category.{?u.40211, u_1} C\ninst✝⁴ : Category.{?u.40215, u_2} D\ninst✝³ : MonoidalCategory C\ninst✝² : MonoidalCategory D\nF : MonoidalFunctor C D\ninst✝¹ : Faithful F.toFunctor\ninst✝ : BraidedCategory D\nβ : (X Y : C) → X ⊗ Y ≅ Y ⊗ X\nw :\n  ∀ (X Y : C),\n    LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor X Y ≫ F.map (β X Y).hom =\n      (β_ (F.obj X) (F.obj Y)).hom ≫ LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor Y X\nX✝ Y✝ Z✝ : C\n⊢ F.map ((α_ X✝ Y✝ Z✝).hom ≫ (β X✝ (Y✝ ⊗ Z✝)).hom ≫ (α_ Y✝ Z✝ X✝).hom) =\n    F.map (((β X✝ Y✝).hom ⊗ 𝟙 Z✝) ≫ (α_ Y✝ X✝ Z✝).hom ≫ (𝟙 Y✝ ⊗ (β X✝ Z✝).hom))\n[PROOFSTEP]\nrefine (cancel_epi (F.μ _ _)).1 ?_\n[GOAL]\ncase a\nC : Type u_1\nD : Type u_2\ninst✝⁵ : Category.{?u.40211, u_1} C\ninst✝⁴ : Category.{?u.40215, u_2} D\ninst✝³ : MonoidalCategory C\ninst✝² : MonoidalCategory D\nF : MonoidalFunctor C D\ninst✝¹ : Faithful F.toFunctor\ninst✝ : BraidedCategory D\nβ : (X Y : C) → X ⊗ Y ≅ Y ⊗ X\nw :\n  ∀ (X Y : C),\n    LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor X Y ≫ F.map (β X Y).hom =\n      (β_ (F.obj X) (F.obj Y)).hom ≫ LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor Y X\nX✝ Y✝ Z✝ : C\n⊢ LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor (X✝ ⊗ Y✝) Z✝ ≫\n      F.map ((α_ X✝ Y✝ Z✝).hom ≫ (β X✝ (Y✝ ⊗ Z✝)).hom ≫ (α_ Y✝ Z✝ X✝).hom) =\n    LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor (X✝ ⊗ Y✝) Z✝ ≫\n      F.map (((β X✝ Y✝).hom ⊗ 𝟙 Z✝) ≫ (α_ Y✝ X✝ Z✝).hom ≫ (𝟙 Y✝ ⊗ (β X✝ Z✝).hom))\n[PROOFSTEP]\nrefine (cancel_epi (F.μ _ _ ⊗ 𝟙 _)).1 ?_\n[GOAL]\ncase a\nC : Type u_1\nD : Type u_2\ninst✝⁵ : Category.{?u.40211, u_1} C\ninst✝⁴ : Category.{?u.40215, u_2} D\ninst✝³ : MonoidalCategory C\ninst✝² : MonoidalCategory D\nF : MonoidalFunctor C D\ninst✝¹ : Faithful F.toFunctor\ninst✝ : BraidedCategory D\nβ : (X Y : C) → X ⊗ Y ≅ Y ⊗ X\nw :\n  ∀ (X Y : C),\n    LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor X Y ≫ F.map (β X Y).hom =\n      (β_ (F.obj X) (F.obj Y)).hom ≫ LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor Y X\nX✝ Y✝ Z✝ : C\n⊢ (LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor X✝ Y✝ ⊗ 𝟙 (F.obj Z✝)) ≫\n      LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor (X✝ ⊗ Y✝) Z✝ ≫\n        F.map ((α_ X✝ Y✝ Z✝).hom ≫ (β X✝ (Y✝ ⊗ Z✝)).hom ≫ (α_ Y✝ Z✝ X✝).hom) =\n    (LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor X✝ Y✝ ⊗ 𝟙 (F.obj Z✝)) ≫\n      LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor (X✝ ⊗ Y✝) Z✝ ≫\n        F.map (((β X✝ Y✝).hom ⊗ 𝟙 Z✝) ≫ (α_ Y✝ X✝ Z✝).hom ≫ (𝟙 Y✝ ⊗ (β X✝ Z✝).hom))\n[PROOFSTEP]\nrw [Functor.map_comp, Functor.map_comp, Functor.map_comp, Functor.map_comp, ← LaxMonoidalFunctor.μ_natural_assoc,\n  Functor.map_id, ← comp_tensor_id_assoc, w, comp_tensor_id, assoc, LaxMonoidalFunctor.associativity_assoc,\n  LaxMonoidalFunctor.associativity_assoc, ← LaxMonoidalFunctor.μ_natural, Functor.map_id, ← id_tensor_comp_assoc, w,\n  id_tensor_comp_assoc, reassoc_of% w, braiding_naturality_assoc, LaxMonoidalFunctor.associativity,\n  hexagon_forward_assoc]\n[GOAL]\nC : Type u_1\nD : Type u_2\ninst✝⁵ : Category.{?u.40211, u_1} C\ninst✝⁴ : Category.{?u.40215, u_2} D\ninst✝³ : MonoidalCategory C\ninst✝² : MonoidalCategory D\nF : MonoidalFunctor C D\ninst✝¹ : Faithful F.toFunctor\ninst✝ : BraidedCategory D\nβ : (X Y : C) → X ⊗ Y ≅ Y ⊗ X\nw :\n  ∀ (X Y : C),\n    LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor X Y ≫ F.map (β X Y).hom =\n      (β_ (F.obj X) (F.obj Y)).hom ≫ LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor Y X\n⊢ ∀ (X Y Z : C),\n    (α_ X Y Z).inv ≫ (β (X ⊗ Y) Z).hom ≫ (α_ Z X Y).inv = (𝟙 X ⊗ (β Y Z).hom) ≫ (α_ X Z Y).inv ≫ ((β X Z).hom ⊗ 𝟙 Y)\n[PROOFSTEP]\nintros\n[GOAL]\nC : Type u_1\nD : Type u_2\ninst✝⁵ : Category.{?u.40211, u_1} C\ninst✝⁴ : Category.{?u.40215, u_2} D\ninst✝³ : MonoidalCategory C\ninst✝² : MonoidalCategory D\nF : MonoidalFunctor C D\ninst✝¹ : Faithful F.toFunctor\ninst✝ : BraidedCategory D\nβ : (X Y : C) → X ⊗ Y ≅ Y ⊗ X\nw :\n  ∀ (X Y : C),\n    LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor X Y ≫ F.map (β X Y).hom =\n      (β_ (F.obj X) (F.obj Y)).hom ≫ LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor Y X\nX✝ Y✝ Z✝ : C\n⊢ (α_ X✝ Y✝ Z✝).inv ≫ (β (X✝ ⊗ Y✝) Z✝).hom ≫ (α_ Z✝ X✝ Y✝).inv =\n    (𝟙 X✝ ⊗ (β Y✝ Z✝).hom) ≫ (α_ X✝ Z✝ Y✝).inv ≫ ((β X✝ Z✝).hom ⊗ 𝟙 Y✝)\n[PROOFSTEP]\napply F.toFunctor.map_injective\n[GOAL]\ncase a\nC : Type u_1\nD : Type u_2\ninst✝⁵ : Category.{?u.40211, u_1} C\ninst✝⁴ : Category.{?u.40215, u_2} D\ninst✝³ : MonoidalCategory C\ninst✝² : MonoidalCategory D\nF : MonoidalFunctor C D\ninst✝¹ : Faithful F.toFunctor\ninst✝ : BraidedCategory D\nβ : (X Y : C) → X ⊗ Y ≅ Y ⊗ X\nw :\n  ∀ (X Y : C),\n    LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor X Y ≫ F.map (β X Y).hom =\n      (β_ (F.obj X) (F.obj Y)).hom ≫ LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor Y X\nX✝ Y✝ Z✝ : C\n⊢ F.map ((α_ X✝ Y✝ Z✝).inv ≫ (β (X✝ ⊗ Y✝) Z✝).hom ≫ (α_ Z✝ X✝ Y✝).inv) =\n    F.map ((𝟙 X✝ ⊗ (β Y✝ Z✝).hom) ≫ (α_ X✝ Z✝ Y✝).inv ≫ ((β X✝ Z✝).hom ⊗ 𝟙 Y✝))\n[PROOFSTEP]\nrefine (cancel_epi (F.μ _ _)).1 ?_\n[GOAL]\ncase a\nC : Type u_1\nD : Type u_2\ninst✝⁵ : Category.{?u.40211, u_1} C\ninst✝⁴ : Category.{?u.40215, u_2} D\ninst✝³ : MonoidalCategory C\ninst✝² : MonoidalCategory D\nF : MonoidalFunctor C D\ninst✝¹ : Faithful F.toFunctor\ninst✝ : BraidedCategory D\nβ : (X Y : C) → X ⊗ Y ≅ Y ⊗ X\nw :\n  ∀ (X Y : C),\n    LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor X Y ≫ F.map (β X Y).hom =\n      (β_ (F.obj X) (F.obj Y)).hom ≫ LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor Y X\nX✝ Y✝ Z✝ : C\n⊢ LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor X✝ (Y✝ ⊗ Z✝) ≫\n      F.map ((α_ X✝ Y✝ Z✝).inv ≫ (β (X✝ ⊗ Y✝) Z✝).hom ≫ (α_ Z✝ X✝ Y✝).inv) =\n    LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor X✝ (Y✝ ⊗ Z✝) ≫\n      F.map ((𝟙 X✝ ⊗ (β Y✝ Z✝).hom) ≫ (α_ X✝ Z✝ Y✝).inv ≫ ((β X✝ Z✝).hom ⊗ 𝟙 Y✝))\n[PROOFSTEP]\nrefine (cancel_epi (𝟙 _ ⊗ F.μ _ _)).1 ?_\n[GOAL]\ncase a\nC : Type u_1\nD : Type u_2\ninst✝⁵ : Category.{?u.40211, u_1} C\ninst✝⁴ : Category.{?u.40215, u_2} D\ninst✝³ : MonoidalCategory C\ninst✝² : MonoidalCategory D\nF : MonoidalFunctor C D\ninst✝¹ : Faithful F.toFunctor\ninst✝ : BraidedCategory D\nβ : (X Y : C) → X ⊗ Y ≅ Y ⊗ X\nw :\n  ∀ (X Y : C),\n    LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor X Y ≫ F.map (β X Y).hom =\n      (β_ (F.obj X) (F.obj Y)).hom ≫ LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor Y X\nX✝ Y✝ Z✝ : C\n⊢ (𝟙 (F.obj X✝) ⊗ LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor Y✝ Z✝) ≫\n      LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor X✝ (Y✝ ⊗ Z✝) ≫\n        F.map ((α_ X✝ Y✝ Z✝).inv ≫ (β (X✝ ⊗ Y✝) Z✝).hom ≫ (α_ Z✝ X✝ Y✝).inv) =\n    (𝟙 (F.obj X✝) ⊗ LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor Y✝ Z✝) ≫\n      LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor X✝ (Y✝ ⊗ Z✝) ≫\n        F.map ((𝟙 X✝ ⊗ (β Y✝ Z✝).hom) ≫ (α_ X✝ Z✝ Y✝).inv ≫ ((β X✝ Z✝).hom ⊗ 𝟙 Y✝))\n[PROOFSTEP]\nrw [Functor.map_comp, Functor.map_comp, Functor.map_comp, Functor.map_comp, ← LaxMonoidalFunctor.μ_natural_assoc,\n  Functor.map_id, ← id_tensor_comp_assoc, w, id_tensor_comp_assoc, LaxMonoidalFunctor.associativity_inv_assoc,\n  LaxMonoidalFunctor.associativity_inv_assoc, ← LaxMonoidalFunctor.μ_natural, Functor.map_id, ← comp_tensor_id_assoc, w,\n  comp_tensor_id_assoc, reassoc_of% w, braiding_naturality_assoc, LaxMonoidalFunctor.associativity_inv,\n  hexagon_reverse_assoc]\n[GOAL]\nC : Type u_1\nD : Type u_2\ninst✝⁶ : Category.{?u.78484, u_1} C\ninst✝⁵ : Category.{?u.78488, u_2} D\ninst✝⁴ : MonoidalCategory C\ninst✝³ : MonoidalCategory D\nF : MonoidalFunctor C D\ninst✝² : Full F.toFunctor\ninst✝¹ : Faithful F.toFunctor\ninst✝ : BraidedCategory D\n⊢ ∀ (X Y : C),\n    LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor X Y ≫\n        F.map\n          ((fun X Y =>\n                Functor.preimageIso F.toFunctor\n                  ((asIso (LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor X Y)).symm ≪≫\n                    β_ (F.obj X) (F.obj Y) ≪≫ asIso (LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor Y X)))\n              X Y).hom =\n      (β_ (F.obj X) (F.obj Y)).hom ≫ LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor Y X\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n⊢ (α_ (𝟙_ C) (𝟙_ C) X).hom ≫ (𝟙 (𝟙_ C) ⊗ (β_ X (𝟙_ C)).inv) ≫ (α_ (𝟙_ C) X (𝟙_ C)).inv ≫ ((λ_ X).hom ⊗ 𝟙 (𝟙_ C)) =\n    ((λ_ (𝟙_ C)).hom ⊗ 𝟙 X) ≫ (β_ X (𝟙_ C)).inv\n[PROOFSTEP]\nrw [← leftUnitor_tensor, leftUnitor_naturality]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n⊢ (α_ (𝟙_ C) (𝟙_ C) X).hom ≫ (λ_ (𝟙_ C ⊗ X)).hom ≫ (β_ X (𝟙_ C)).inv = ((λ_ (𝟙_ C)).hom ⊗ 𝟙 X) ≫ (β_ X (𝟙_ C)).inv\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n⊢ ((β_ X (𝟙_ C)).hom ⊗ 𝟙 (𝟙_ C)) ≫ ((λ_ X).hom ⊗ 𝟙 (𝟙_ C)) =\n    ((β_ X (𝟙_ C)).hom ⊗ 𝟙 (𝟙_ C)) ≫ (α_ (𝟙_ C) X (𝟙_ C)).hom ≫ (α_ (𝟙_ C) X (𝟙_ C)).inv ≫ ((λ_ X).hom ⊗ 𝟙 (𝟙_ C))\n[PROOFSTEP]\ncoherence\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n⊢ ((β_ X (𝟙_ C)).hom ⊗ 𝟙 (𝟙_ C)) ≫ (α_ (𝟙_ C) X (𝟙_ C)).hom ≫ (α_ (𝟙_ C) X (𝟙_ C)).inv ≫ ((λ_ X).hom ⊗ 𝟙 (𝟙_ C)) =\n    ((β_ X (𝟙_ C)).hom ⊗ 𝟙 (𝟙_ C)) ≫\n      (α_ (𝟙_ C) X (𝟙_ C)).hom ≫\n        (𝟙 (𝟙_ C) ⊗ (β_ X (𝟙_ C)).hom) ≫\n          (𝟙 (𝟙_ C) ⊗ (β_ X (𝟙_ C)).inv) ≫ (α_ (𝟙_ C) X (𝟙_ C)).inv ≫ ((λ_ X).hom ⊗ 𝟙 (𝟙_ C))\n[PROOFSTEP]\nslice_rhs 3 4 => rw [← id_tensor_comp, Iso.hom_inv_id, tensor_id]\n[GOAL]\ncase a.a.a.a\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n| (𝟙 (𝟙_ C) ⊗ (β_ X (𝟙_ C)).hom) ≫ (𝟙 (𝟙_ C) ⊗ (β_ X (𝟙_ C)).inv)\ncase a.a.a.a\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n| (α_ (𝟙_ C) X (𝟙_ C)).inv\ncase a.a.a\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n| (λ_ X).hom ⊗ 𝟙 (𝟙_ C)\ncase a\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n| (β_ X (𝟙_ C)).hom ⊗ 𝟙 (𝟙_ C)\ncase a.a\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n| (α_ (𝟙_ C) X (𝟙_ C)).hom\n[PROOFSTEP]\nrw [← id_tensor_comp, Iso.hom_inv_id, tensor_id]\n[GOAL]\ncase a.a.a.a\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n| (𝟙 (𝟙_ C) ⊗ (β_ X (𝟙_ C)).hom) ≫ (𝟙 (𝟙_ C) ⊗ (β_ X (𝟙_ C)).inv)\ncase a.a.a.a\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n| (α_ (𝟙_ C) X (𝟙_ C)).inv\ncase a.a.a\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n| (λ_ X).hom ⊗ 𝟙 (𝟙_ C)\ncase a\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n| (β_ X (𝟙_ C)).hom ⊗ 𝟙 (𝟙_ C)\ncase a.a\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n| (α_ (𝟙_ C) X (𝟙_ C)).hom\n[PROOFSTEP]\nrw [← id_tensor_comp, Iso.hom_inv_id, tensor_id]\n[GOAL]\ncase a.a.a.a\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n| (𝟙 (𝟙_ C) ⊗ (β_ X (𝟙_ C)).hom) ≫ (𝟙 (𝟙_ C) ⊗ (β_ X (𝟙_ C)).inv)\ncase a.a.a.a\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n| (α_ (𝟙_ C) X (𝟙_ C)).inv\ncase a.a.a\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n| (λ_ X).hom ⊗ 𝟙 (𝟙_ C)\ncase a\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n| (β_ X (𝟙_ C)).hom ⊗ 𝟙 (𝟙_ C)\ncase a.a\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n| (α_ (𝟙_ C) X (𝟙_ C)).hom\n[PROOFSTEP]\nrw [← id_tensor_comp, Iso.hom_inv_id, tensor_id]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n⊢ ((β_ X (𝟙_ C)).hom ⊗ 𝟙 (𝟙_ C)) ≫ (α_ (𝟙_ C) X (𝟙_ C)).hom ≫ (α_ (𝟙_ C) X (𝟙_ C)).inv ≫ ((λ_ X).hom ⊗ 𝟙 (𝟙_ C)) =\n    ((β_ X (𝟙_ C)).hom ⊗ 𝟙 (𝟙_ C)) ≫\n      (α_ (𝟙_ C) X (𝟙_ C)).hom ≫ (𝟙 (𝟙_ C ⊗ X ⊗ 𝟙_ C) ≫ (α_ (𝟙_ C) X (𝟙_ C)).inv) ≫ ((λ_ X).hom ⊗ 𝟙 (𝟙_ C))\n[PROOFSTEP]\nrw [id_comp]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n⊢ ((β_ X (𝟙_ C)).hom ⊗ 𝟙 (𝟙_ C)) ≫\n      (α_ (𝟙_ C) X (𝟙_ C)).hom ≫\n        (𝟙 (𝟙_ C) ⊗ (β_ X (𝟙_ C)).hom) ≫\n          (𝟙 (𝟙_ C) ⊗ (β_ X (𝟙_ C)).inv) ≫ (α_ (𝟙_ C) X (𝟙_ C)).inv ≫ ((λ_ X).hom ⊗ 𝟙 (𝟙_ C)) =\n    (α_ X tensorUnit' (𝟙_ C)).hom ≫\n      (β_ X (tensorUnit' ⊗ 𝟙_ C)).hom ≫\n        (α_ tensorUnit' (𝟙_ C) X).hom ≫\n          (𝟙 tensorUnit' ⊗ (β_ X (𝟙_ C)).inv) ≫ (α_ tensorUnit' X (𝟙_ C)).inv ≫ ((λ_ X).hom ⊗ 𝟙 (𝟙_ C))\n[PROOFSTEP]\nslice_lhs 1 3 => rw [← hexagon_forward]\n[GOAL]\ncase a.a.a\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n| ((β_ X (𝟙_ C)).hom ⊗ 𝟙 (𝟙_ C)) ≫ (α_ (𝟙_ C) X (𝟙_ C)).hom ≫ (𝟙 (𝟙_ C) ⊗ (β_ X (𝟙_ C)).hom)\ncase a.a.a\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n| 𝟙 (𝟙_ C) ⊗ (β_ X (𝟙_ C)).inv\ncase a.a\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n| (α_ (𝟙_ C) X (𝟙_ C)).inv\ncase a\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n| (λ_ X).hom ⊗ 𝟙 (𝟙_ C)\n[PROOFSTEP]\nrw [← hexagon_forward]\n[GOAL]\ncase a.a.a\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n| ((β_ X (𝟙_ C)).hom ⊗ 𝟙 (𝟙_ C)) ≫ (α_ (𝟙_ C) X (𝟙_ C)).hom ≫ (𝟙 (𝟙_ C) ⊗ (β_ X (𝟙_ C)).hom)\ncase a.a.a\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n| 𝟙 (𝟙_ C) ⊗ (β_ X (𝟙_ C)).inv\ncase a.a\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n| (α_ (𝟙_ C) X (𝟙_ C)).inv\ncase a\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n| (λ_ X).hom ⊗ 𝟙 (𝟙_ C)\n[PROOFSTEP]\nrw [← hexagon_forward]\n[GOAL]\ncase a.a.a\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n| ((β_ X (𝟙_ C)).hom ⊗ 𝟙 (𝟙_ C)) ≫ (α_ (𝟙_ C) X (𝟙_ C)).hom ≫ (𝟙 (𝟙_ C) ⊗ (β_ X (𝟙_ C)).hom)\ncase a.a.a\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n| 𝟙 (𝟙_ C) ⊗ (β_ X (𝟙_ C)).inv\ncase a.a\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n| (α_ (𝟙_ C) X (𝟙_ C)).inv\ncase a\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n| (λ_ X).hom ⊗ 𝟙 (𝟙_ C)\n[PROOFSTEP]\nrw [← hexagon_forward]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n⊢ ((((α_ X (𝟙_ C) (𝟙_ C)).hom ≫ (β_ X (𝟙_ C ⊗ 𝟙_ C)).hom ≫ (α_ (𝟙_ C) (𝟙_ C) X).hom) ≫ (𝟙 (𝟙_ C) ⊗ (β_ X (𝟙_ C)).inv)) ≫\n        (α_ (𝟙_ C) X (𝟙_ C)).inv) ≫\n      ((λ_ X).hom ⊗ 𝟙 (𝟙_ C)) =\n    (α_ X tensorUnit' (𝟙_ C)).hom ≫\n      (β_ X (tensorUnit' ⊗ 𝟙_ C)).hom ≫\n        (α_ tensorUnit' (𝟙_ C) X).hom ≫\n          (𝟙 tensorUnit' ⊗ (β_ X (𝟙_ C)).inv) ≫ (α_ tensorUnit' X (𝟙_ C)).inv ≫ ((λ_ X).hom ⊗ 𝟙 (𝟙_ C))\n[PROOFSTEP]\nsimp only [assoc]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n⊢ (α_ X tensorUnit' (𝟙_ C)).hom ≫\n      (β_ X (tensorUnit' ⊗ 𝟙_ C)).hom ≫\n        (α_ tensorUnit' (𝟙_ C) X).hom ≫\n          (𝟙 tensorUnit' ⊗ (β_ X (𝟙_ C)).inv) ≫ (α_ tensorUnit' X (𝟙_ C)).inv ≫ ((λ_ X).hom ⊗ 𝟙 (𝟙_ C)) =\n    (α_ X tensorUnit' (𝟙_ C)).hom ≫ (β_ X (tensorUnit' ⊗ 𝟙_ C)).hom ≫ ((λ_ (𝟙_ C)).hom ⊗ 𝟙 X) ≫ (β_ X (𝟙_ C)).inv\n[PROOFSTEP]\nrw [braiding_leftUnitor_aux₁]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n⊢ (α_ X tensorUnit' (𝟙_ C)).hom ≫ (β_ X (tensorUnit' ⊗ 𝟙_ C)).hom ≫ ((λ_ (𝟙_ C)).hom ⊗ 𝟙 X) ≫ (β_ X (𝟙_ C)).inv =\n    (α_ X tensorUnit' (𝟙_ C)).hom ≫ (𝟙 X ⊗ (λ_ (𝟙_ C)).hom) ≫ (β_ X (𝟙_ C)).hom ≫ (β_ X (𝟙_ C)).inv\n[PROOFSTEP]\nslice_lhs 2 3 => rw [← braiding_naturality]\n[GOAL]\ncase a.a\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n| (β_ X (tensorUnit' ⊗ 𝟙_ C)).hom ≫ ((λ_ (𝟙_ C)).hom ⊗ 𝟙 X)\ncase a.a\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n| (β_ X (𝟙_ C)).inv\ncase a\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n| (α_ X tensorUnit' (𝟙_ C)).hom\n[PROOFSTEP]\nrw [← braiding_naturality]\n[GOAL]\ncase a.a\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n| (β_ X (tensorUnit' ⊗ 𝟙_ C)).hom ≫ ((λ_ (𝟙_ C)).hom ⊗ 𝟙 X)\ncase a.a\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n| (β_ X (𝟙_ C)).inv\ncase a\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n| (α_ X tensorUnit' (𝟙_ C)).hom\n[PROOFSTEP]\nrw [← braiding_naturality]\n[GOAL]\ncase a.a\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n| (β_ X (tensorUnit' ⊗ 𝟙_ C)).hom ≫ ((λ_ (𝟙_ C)).hom ⊗ 𝟙 X)\ncase a.a\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n| (β_ X (𝟙_ C)).inv\ncase a\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n| (α_ X tensorUnit' (𝟙_ C)).hom\n[PROOFSTEP]\nrw [← braiding_naturality]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n⊢ (α_ X tensorUnit' (𝟙_ C)).hom ≫ ((𝟙 X ⊗ (λ_ (𝟙_ C)).hom) ≫ (β_ X (𝟙_ C)).hom) ≫ (β_ X (𝟙_ C)).inv =\n    (α_ X tensorUnit' (𝟙_ C)).hom ≫ (𝟙 X ⊗ (λ_ (𝟙_ C)).hom) ≫ (β_ X (𝟙_ C)).hom ≫ (β_ X (𝟙_ C)).inv\n[PROOFSTEP]\nsimp only [assoc]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n⊢ (α_ X tensorUnit' (𝟙_ C)).hom ≫ (𝟙 X ⊗ (λ_ (𝟙_ C)).hom) ≫ (β_ X (𝟙_ C)).hom ≫ (β_ X (𝟙_ C)).inv =\n    (α_ X tensorUnit' (𝟙_ C)).hom ≫ (𝟙 X ⊗ (λ_ (𝟙_ C)).hom)\n[PROOFSTEP]\nrw [Iso.hom_inv_id, comp_id]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n⊢ (α_ X tensorUnit' (𝟙_ C)).hom ≫ (𝟙 X ⊗ (λ_ (𝟙_ C)).hom) = (ρ_ X).hom ⊗ 𝟙 (𝟙_ C)\n[PROOFSTEP]\nrw [triangle]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n⊢ (β_ X (𝟙_ C)).hom ≫ (λ_ X).hom = (ρ_ X).hom\n[PROOFSTEP]\nrw [← tensor_right_iff, comp_tensor_id, braiding_leftUnitor_aux₂]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n⊢ (α_ X (𝟙_ C) (𝟙_ C)).inv ≫ ((β_ (𝟙_ C) X).inv ⊗ 𝟙 (𝟙_ C)) ≫ (α_ (𝟙_ C) X (𝟙_ C)).hom ≫ (𝟙 (𝟙_ C) ⊗ (ρ_ X).hom) =\n    (𝟙 X ⊗ (ρ_ (𝟙_ C)).hom) ≫ (β_ (𝟙_ C) X).inv\n[PROOFSTEP]\nrw [← rightUnitor_tensor, rightUnitor_naturality]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n⊢ (α_ X (𝟙_ C) (𝟙_ C)).inv ≫ (ρ_ (X ⊗ 𝟙_ C)).hom ≫ (β_ (𝟙_ C) X).inv = (𝟙 X ⊗ (ρ_ (𝟙_ C)).hom) ≫ (β_ (𝟙_ C) X).inv\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n⊢ (𝟙 (𝟙_ C) ⊗ (β_ (𝟙_ C) X).hom) ≫ (𝟙 (𝟙_ C) ⊗ (ρ_ X).hom) =\n    (𝟙 (𝟙_ C) ⊗ (β_ (𝟙_ C) X).hom) ≫ (α_ (𝟙_ C) X (𝟙_ C)).inv ≫ (α_ (𝟙_ C) X (𝟙_ C)).hom ≫ (𝟙 (𝟙_ C) ⊗ (ρ_ X).hom)\n[PROOFSTEP]\ncoherence\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n⊢ (𝟙 (𝟙_ C) ⊗ (β_ (𝟙_ C) X).hom) ≫ (α_ (𝟙_ C) X (𝟙_ C)).inv ≫ (α_ (𝟙_ C) X (𝟙_ C)).hom ≫ (𝟙 (𝟙_ C) ⊗ (ρ_ X).hom) =\n    (𝟙 (𝟙_ C) ⊗ (β_ (𝟙_ C) X).hom) ≫\n      (α_ (𝟙_ C) X (𝟙_ C)).inv ≫\n        ((β_ (𝟙_ C) X).hom ⊗ 𝟙 (𝟙_ C)) ≫\n          ((β_ (𝟙_ C) X).inv ⊗ 𝟙 (𝟙_ C)) ≫ (α_ (𝟙_ C) X (𝟙_ C)).hom ≫ (𝟙 (𝟙_ C) ⊗ (ρ_ X).hom)\n[PROOFSTEP]\nslice_rhs 3 4 => rw [← comp_tensor_id, Iso.hom_inv_id, tensor_id]\n[GOAL]\ncase a.a.a.a\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n| ((β_ (𝟙_ C) X).hom ⊗ 𝟙 (𝟙_ C)) ≫ ((β_ (𝟙_ C) X).inv ⊗ 𝟙 (𝟙_ C))\ncase a.a.a.a\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n| (α_ (𝟙_ C) X (𝟙_ C)).hom\ncase a.a.a\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n| 𝟙 (𝟙_ C) ⊗ (ρ_ X).hom\ncase a\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n| 𝟙 (𝟙_ C) ⊗ (β_ (𝟙_ C) X).hom\ncase a.a\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n| (α_ (𝟙_ C) X (𝟙_ C)).inv\n[PROOFSTEP]\nrw [← comp_tensor_id, Iso.hom_inv_id, tensor_id]\n[GOAL]\ncase a.a.a.a\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n| ((β_ (𝟙_ C) X).hom ⊗ 𝟙 (𝟙_ C)) ≫ ((β_ (𝟙_ C) X).inv ⊗ 𝟙 (𝟙_ C))\ncase a.a.a.a\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n| (α_ (𝟙_ C) X (𝟙_ C)).hom\ncase a.a.a\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n| 𝟙 (𝟙_ C) ⊗ (ρ_ X).hom\ncase a\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n| 𝟙 (𝟙_ C) ⊗ (β_ (𝟙_ C) X).hom\ncase a.a\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n| (α_ (𝟙_ C) X (𝟙_ C)).inv\n[PROOFSTEP]\nrw [← comp_tensor_id, Iso.hom_inv_id, tensor_id]\n[GOAL]\ncase a.a.a.a\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n| ((β_ (𝟙_ C) X).hom ⊗ 𝟙 (𝟙_ C)) ≫ ((β_ (𝟙_ C) X).inv ⊗ 𝟙 (𝟙_ C))\ncase a.a.a.a\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n| (α_ (𝟙_ C) X (𝟙_ C)).hom\ncase a.a.a\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n| 𝟙 (𝟙_ C) ⊗ (ρ_ X).hom\ncase a\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n| 𝟙 (𝟙_ C) ⊗ (β_ (𝟙_ C) X).hom\ncase a.a\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n| (α_ (𝟙_ C) X (𝟙_ C)).inv\n[PROOFSTEP]\nrw [← comp_tensor_id, Iso.hom_inv_id, tensor_id]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n⊢ (𝟙 (𝟙_ C) ⊗ (β_ (𝟙_ C) X).hom) ≫ (α_ (𝟙_ C) X (𝟙_ C)).inv ≫ (α_ (𝟙_ C) X (𝟙_ C)).hom ≫ (𝟙 (𝟙_ C) ⊗ (ρ_ X).hom) =\n    (𝟙 (𝟙_ C) ⊗ (β_ (𝟙_ C) X).hom) ≫\n      (α_ (𝟙_ C) X (𝟙_ C)).inv ≫ (𝟙 ((𝟙_ C ⊗ X) ⊗ 𝟙_ C) ≫ (α_ (𝟙_ C) X (𝟙_ C)).hom) ≫ (𝟙 (𝟙_ C) ⊗ (ρ_ X).hom)\n[PROOFSTEP]\nrw [id_comp]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n⊢ (𝟙 (𝟙_ C) ⊗ (β_ (𝟙_ C) X).hom) ≫\n      (α_ (𝟙_ C) X (𝟙_ C)).inv ≫\n        ((β_ (𝟙_ C) X).hom ⊗ 𝟙 (𝟙_ C)) ≫\n          ((β_ (𝟙_ C) X).inv ⊗ 𝟙 (𝟙_ C)) ≫ (α_ (𝟙_ C) X (𝟙_ C)).hom ≫ (𝟙 (𝟙_ C) ⊗ (ρ_ X).hom) =\n    (α_ (𝟙_ C) tensorUnit' X).inv ≫\n      (β_ (𝟙_ C ⊗ tensorUnit') X).hom ≫\n        (α_ X (𝟙_ C) tensorUnit').inv ≫\n          ((β_ (𝟙_ C) X).inv ⊗ 𝟙 tensorUnit') ≫ (α_ (𝟙_ C) X tensorUnit').hom ≫ (𝟙 (𝟙_ C) ⊗ (ρ_ X).hom)\n[PROOFSTEP]\nslice_lhs 1 3 => rw [← hexagon_reverse]\n[GOAL]\ncase a.a.a\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n| (𝟙 (𝟙_ C) ⊗ (β_ (𝟙_ C) X).hom) ≫ (α_ (𝟙_ C) X (𝟙_ C)).inv ≫ ((β_ (𝟙_ C) X).hom ⊗ 𝟙 (𝟙_ C))\ncase a.a.a\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n| (β_ (𝟙_ C) X).inv ⊗ 𝟙 (𝟙_ C)\ncase a.a\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n| (α_ (𝟙_ C) X (𝟙_ C)).hom\ncase a\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n| 𝟙 (𝟙_ C) ⊗ (ρ_ X).hom\n[PROOFSTEP]\nrw [← hexagon_reverse]\n[GOAL]\ncase a.a.a\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n| (𝟙 (𝟙_ C) ⊗ (β_ (𝟙_ C) X).hom) ≫ (α_ (𝟙_ C) X (𝟙_ C)).inv ≫ ((β_ (𝟙_ C) X).hom ⊗ 𝟙 (𝟙_ C))\ncase a.a.a\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n| (β_ (𝟙_ C) X).inv ⊗ 𝟙 (𝟙_ C)\ncase a.a\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n| (α_ (𝟙_ C) X (𝟙_ C)).hom\ncase a\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n| 𝟙 (𝟙_ C) ⊗ (ρ_ X).hom\n[PROOFSTEP]\nrw [← hexagon_reverse]\n[GOAL]\ncase a.a.a\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n| (𝟙 (𝟙_ C) ⊗ (β_ (𝟙_ C) X).hom) ≫ (α_ (𝟙_ C) X (𝟙_ C)).inv ≫ ((β_ (𝟙_ C) X).hom ⊗ 𝟙 (𝟙_ C))\ncase a.a.a\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n| (β_ (𝟙_ C) X).inv ⊗ 𝟙 (𝟙_ C)\ncase a.a\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n| (α_ (𝟙_ C) X (𝟙_ C)).hom\ncase a\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n| 𝟙 (𝟙_ C) ⊗ (ρ_ X).hom\n[PROOFSTEP]\nrw [← hexagon_reverse]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n⊢ ((((α_ (𝟙_ C) (𝟙_ C) X).inv ≫ (β_ (𝟙_ C ⊗ 𝟙_ C) X).hom ≫ (α_ X (𝟙_ C) (𝟙_ C)).inv) ≫ ((β_ (𝟙_ C) X).inv ⊗ 𝟙 (𝟙_ C))) ≫\n        (α_ (𝟙_ C) X (𝟙_ C)).hom) ≫\n      (𝟙 (𝟙_ C) ⊗ (ρ_ X).hom) =\n    (α_ (𝟙_ C) tensorUnit' X).inv ≫\n      (β_ (𝟙_ C ⊗ tensorUnit') X).hom ≫\n        (α_ X (𝟙_ C) tensorUnit').inv ≫\n          ((β_ (𝟙_ C) X).inv ⊗ 𝟙 tensorUnit') ≫ (α_ (𝟙_ C) X tensorUnit').hom ≫ (𝟙 (𝟙_ C) ⊗ (ρ_ X).hom)\n[PROOFSTEP]\nsimp only [assoc]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n⊢ (α_ (𝟙_ C) tensorUnit' X).inv ≫\n      (β_ (𝟙_ C ⊗ tensorUnit') X).hom ≫\n        (α_ X (𝟙_ C) tensorUnit').inv ≫\n          ((β_ (𝟙_ C) X).inv ⊗ 𝟙 tensorUnit') ≫ (α_ (𝟙_ C) X tensorUnit').hom ≫ (𝟙 (𝟙_ C) ⊗ (ρ_ X).hom) =\n    (α_ (𝟙_ C) tensorUnit' X).inv ≫ (β_ (𝟙_ C ⊗ tensorUnit') X).hom ≫ (𝟙 X ⊗ (ρ_ (𝟙_ C)).hom) ≫ (β_ (𝟙_ C) X).inv\n[PROOFSTEP]\nrw [braiding_rightUnitor_aux₁]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n⊢ (α_ (𝟙_ C) tensorUnit' X).inv ≫ (β_ (𝟙_ C ⊗ tensorUnit') X).hom ≫ (𝟙 X ⊗ (ρ_ (𝟙_ C)).hom) ≫ (β_ (𝟙_ C) X).inv =\n    (α_ (𝟙_ C) tensorUnit' X).inv ≫ ((ρ_ (𝟙_ C)).hom ⊗ 𝟙 X) ≫ (β_ (𝟙_ C) X).hom ≫ (β_ (𝟙_ C) X).inv\n[PROOFSTEP]\nslice_lhs 2 3 => rw [← braiding_naturality]\n[GOAL]\ncase a.a\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n| (β_ (𝟙_ C ⊗ tensorUnit') X).hom ≫ (𝟙 X ⊗ (ρ_ (𝟙_ C)).hom)\ncase a.a\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n| (β_ (𝟙_ C) X).inv\ncase a\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n| (α_ (𝟙_ C) tensorUnit' X).inv\n[PROOFSTEP]\nrw [← braiding_naturality]\n[GOAL]\ncase a.a\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n| (β_ (𝟙_ C ⊗ tensorUnit') X).hom ≫ (𝟙 X ⊗ (ρ_ (𝟙_ C)).hom)\ncase a.a\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n| (β_ (𝟙_ C) X).inv\ncase a\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n| (α_ (𝟙_ C) tensorUnit' X).inv\n[PROOFSTEP]\nrw [← braiding_naturality]\n[GOAL]\ncase a.a\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n| (β_ (𝟙_ C ⊗ tensorUnit') X).hom ≫ (𝟙 X ⊗ (ρ_ (𝟙_ C)).hom)\ncase a.a\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n| (β_ (𝟙_ C) X).inv\ncase a\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n| (α_ (𝟙_ C) tensorUnit' X).inv\n[PROOFSTEP]\nrw [← braiding_naturality]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n⊢ (α_ (𝟙_ C) tensorUnit' X).inv ≫ (((ρ_ (𝟙_ C)).hom ⊗ 𝟙 X) ≫ (β_ (𝟙_ C) X).hom) ≫ (β_ (𝟙_ C) X).inv =\n    (α_ (𝟙_ C) tensorUnit' X).inv ≫ ((ρ_ (𝟙_ C)).hom ⊗ 𝟙 X) ≫ (β_ (𝟙_ C) X).hom ≫ (β_ (𝟙_ C) X).inv\n[PROOFSTEP]\nsimp only [assoc]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n⊢ (α_ (𝟙_ C) tensorUnit' X).inv ≫ ((ρ_ (𝟙_ C)).hom ⊗ 𝟙 X) ≫ (β_ (𝟙_ C) X).hom ≫ (β_ (𝟙_ C) X).inv =\n    (α_ (𝟙_ C) tensorUnit' X).inv ≫ ((ρ_ (𝟙_ C)).hom ⊗ 𝟙 X)\n[PROOFSTEP]\nrw [Iso.hom_inv_id, comp_id]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n⊢ (α_ (𝟙_ C) tensorUnit' X).inv ≫ ((ρ_ (𝟙_ C)).hom ⊗ 𝟙 X) = 𝟙 (𝟙_ C) ⊗ (λ_ X).hom\n[PROOFSTEP]\nrw [triangle_assoc_comp_right]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n⊢ (β_ (𝟙_ C) X).hom ≫ (ρ_ X).hom = (λ_ X).hom\n[PROOFSTEP]\nrw [← tensor_left_iff, id_tensor_comp, braiding_rightUnitor_aux₂]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n⊢ (λ_ X).inv ≫ (β_ (𝟙_ C) X).hom = (ρ_ X).inv\n[PROOFSTEP]\napply (cancel_mono (ρ_ X).hom).1\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n⊢ ((λ_ X).inv ≫ (β_ (𝟙_ C) X).hom) ≫ (ρ_ X).hom = (ρ_ X).inv ≫ (ρ_ X).hom\n[PROOFSTEP]\nsimp only [assoc, braiding_rightUnitor, Iso.inv_hom_id]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n⊢ (ρ_ X).inv ≫ (β_ X (𝟙_ C)).hom = (λ_ X).inv\n[PROOFSTEP]\napply (cancel_mono (λ_ X).hom).1\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : MonoidalCategory C\ninst✝ : BraidedCategory C\nX : C\n⊢ ((ρ_ X).inv ≫ (β_ X (𝟙_ C)).hom) ≫ (λ_ X).hom = (λ_ X).inv ≫ (λ_ X).hom\n[PROOFSTEP]\nsimp only [assoc, braiding_leftUnitor, Iso.inv_hom_id]\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nF : LaxBraidedFunctor C D\nG : LaxBraidedFunctor D E\nsrc✝ : LaxMonoidalFunctor C E := F.toLaxMonoidalFunctor ⊗⋙ G.toLaxMonoidalFunctor\nX Y : C\n⊢ LaxMonoidalFunctor.μ (LaxMonoidalFunctor.mk src✝.toFunctor src✝.ε src✝.μ) X Y ≫\n      (LaxMonoidalFunctor.mk src✝.toFunctor src✝.ε src✝.μ).toFunctor.map (β_ X Y).hom =\n    (β_ ((LaxMonoidalFunctor.mk src✝.toFunctor src✝.ε src✝.μ).toFunctor.obj X)\n          ((LaxMonoidalFunctor.mk src✝.toFunctor src✝.ε src✝.μ).toFunctor.obj Y)).hom ≫\n      LaxMonoidalFunctor.μ (LaxMonoidalFunctor.mk src✝.toFunctor src✝.ε src✝.μ) Y X\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nF : LaxBraidedFunctor C D\nG : LaxBraidedFunctor D E\nsrc✝ : LaxMonoidalFunctor C E := F.toLaxMonoidalFunctor ⊗⋙ G.toLaxMonoidalFunctor\nX Y : C\n⊢ (LaxMonoidalFunctor.μ G.toLaxMonoidalFunctor (F.obj X) (F.obj Y) ≫\n        G.map (LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor X Y)) ≫\n      G.map (F.map (β_ X Y).hom) =\n    (β_ (G.obj (F.obj X)) (G.obj (F.obj Y))).hom ≫\n      LaxMonoidalFunctor.μ G.toLaxMonoidalFunctor (F.obj Y) (F.obj X) ≫\n        G.map (LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor Y X)\n[PROOFSTEP]\nslice_lhs 2 3 => rw [← CategoryTheory.Functor.map_comp, F.braided, CategoryTheory.Functor.map_comp]\n[GOAL]\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nF : LaxBraidedFunctor C D\nG : LaxBraidedFunctor D E\nsrc✝ : LaxMonoidalFunctor C E := F.toLaxMonoidalFunctor ⊗⋙ G.toLaxMonoidalFunctor\nX Y : C\n| G.map (LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor X Y) ≫ G.map (F.map (β_ X Y).hom)\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nF : LaxBraidedFunctor C D\nG : LaxBraidedFunctor D E\nsrc✝ : LaxMonoidalFunctor C E := F.toLaxMonoidalFunctor ⊗⋙ G.toLaxMonoidalFunctor\nX Y : C\n| LaxMonoidalFunctor.μ G.toLaxMonoidalFunctor (F.obj X) (F.obj Y)\n[PROOFSTEP]\nrw [← CategoryTheory.Functor.map_comp, F.braided, CategoryTheory.Functor.map_comp]\n[GOAL]\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nF : LaxBraidedFunctor C D\nG : LaxBraidedFunctor D E\nsrc✝ : LaxMonoidalFunctor C E := F.toLaxMonoidalFunctor ⊗⋙ G.toLaxMonoidalFunctor\nX Y : C\n| G.map (LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor X Y) ≫ G.map (F.map (β_ X Y).hom)\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nF : LaxBraidedFunctor C D\nG : LaxBraidedFunctor D E\nsrc✝ : LaxMonoidalFunctor C E := F.toLaxMonoidalFunctor ⊗⋙ G.toLaxMonoidalFunctor\nX Y : C\n| LaxMonoidalFunctor.μ G.toLaxMonoidalFunctor (F.obj X) (F.obj Y)\n[PROOFSTEP]\nrw [← CategoryTheory.Functor.map_comp, F.braided, CategoryTheory.Functor.map_comp]\n[GOAL]\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nF : LaxBraidedFunctor C D\nG : LaxBraidedFunctor D E\nsrc✝ : LaxMonoidalFunctor C E := F.toLaxMonoidalFunctor ⊗⋙ G.toLaxMonoidalFunctor\nX Y : C\n| G.map (LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor X Y) ≫ G.map (F.map (β_ X Y).hom)\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nF : LaxBraidedFunctor C D\nG : LaxBraidedFunctor D E\nsrc✝ : LaxMonoidalFunctor C E := F.toLaxMonoidalFunctor ⊗⋙ G.toLaxMonoidalFunctor\nX Y : C\n| LaxMonoidalFunctor.μ G.toLaxMonoidalFunctor (F.obj X) (F.obj Y)\n[PROOFSTEP]\nrw [← CategoryTheory.Functor.map_comp, F.braided, CategoryTheory.Functor.map_comp]\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nF : LaxBraidedFunctor C D\nG : LaxBraidedFunctor D E\nsrc✝ : LaxMonoidalFunctor C E := F.toLaxMonoidalFunctor ⊗⋙ G.toLaxMonoidalFunctor\nX Y : C\n⊢ LaxMonoidalFunctor.μ G.toLaxMonoidalFunctor (F.obj X) (F.obj Y) ≫\n      G.map (β_ (F.obj X) (F.obj Y)).hom ≫ G.map (LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor Y X) =\n    (β_ (G.obj (F.obj X)) (G.obj (F.obj Y))).hom ≫\n      LaxMonoidalFunctor.μ G.toLaxMonoidalFunctor (F.obj Y) (F.obj X) ≫\n        G.map (LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor Y X)\n[PROOFSTEP]\nslice_lhs 1 2 => rw [G.braided]\n[GOAL]\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nF : LaxBraidedFunctor C D\nG : LaxBraidedFunctor D E\nsrc✝ : LaxMonoidalFunctor C E := F.toLaxMonoidalFunctor ⊗⋙ G.toLaxMonoidalFunctor\nX Y : C\n| LaxMonoidalFunctor.μ G.toLaxMonoidalFunctor (F.obj X) (F.obj Y) ≫ G.map (β_ (F.obj X) (F.obj Y)).hom\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nF : LaxBraidedFunctor C D\nG : LaxBraidedFunctor D E\nsrc✝ : LaxMonoidalFunctor C E := F.toLaxMonoidalFunctor ⊗⋙ G.toLaxMonoidalFunctor\nX Y : C\n| G.map (LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor Y X)\n[PROOFSTEP]\nrw [G.braided]\n[GOAL]\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nF : LaxBraidedFunctor C D\nG : LaxBraidedFunctor D E\nsrc✝ : LaxMonoidalFunctor C E := F.toLaxMonoidalFunctor ⊗⋙ G.toLaxMonoidalFunctor\nX Y : C\n| LaxMonoidalFunctor.μ G.toLaxMonoidalFunctor (F.obj X) (F.obj Y) ≫ G.map (β_ (F.obj X) (F.obj Y)).hom\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nF : LaxBraidedFunctor C D\nG : LaxBraidedFunctor D E\nsrc✝ : LaxMonoidalFunctor C E := F.toLaxMonoidalFunctor ⊗⋙ G.toLaxMonoidalFunctor\nX Y : C\n| G.map (LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor Y X)\n[PROOFSTEP]\nrw [G.braided]\n[GOAL]\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nF : LaxBraidedFunctor C D\nG : LaxBraidedFunctor D E\nsrc✝ : LaxMonoidalFunctor C E := F.toLaxMonoidalFunctor ⊗⋙ G.toLaxMonoidalFunctor\nX Y : C\n| LaxMonoidalFunctor.μ G.toLaxMonoidalFunctor (F.obj X) (F.obj Y) ≫ G.map (β_ (F.obj X) (F.obj Y)).hom\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nF : LaxBraidedFunctor C D\nG : LaxBraidedFunctor D E\nsrc✝ : LaxMonoidalFunctor C E := F.toLaxMonoidalFunctor ⊗⋙ G.toLaxMonoidalFunctor\nX Y : C\n| G.map (LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor Y X)\n[PROOFSTEP]\nrw [G.braided]\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nF : LaxBraidedFunctor C D\nG : LaxBraidedFunctor D E\nsrc✝ : LaxMonoidalFunctor C E := F.toLaxMonoidalFunctor ⊗⋙ G.toLaxMonoidalFunctor\nX Y : C\n⊢ ((β_ (G.obj (F.obj X)) (G.obj (F.obj Y))).hom ≫ LaxMonoidalFunctor.μ G.toLaxMonoidalFunctor (F.obj Y) (F.obj X)) ≫\n      G.map (LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor Y X) =\n    (β_ (G.obj (F.obj X)) (G.obj (F.obj Y))).hom ≫\n      LaxMonoidalFunctor.μ G.toLaxMonoidalFunctor (F.obj Y) (F.obj X) ≫\n        G.map (LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor Y X)\n[PROOFSTEP]\nsimp only [Category.assoc]\n[GOAL]\nC✝ : Type u₁\ninst✝¹⁵ : Category.{v₁, u₁} C✝\ninst✝¹⁴ : MonoidalCategory C✝\ninst✝¹³ : BraidedCategory C✝\nD✝ : Type u₂\ninst✝¹² : Category.{v₂, u₂} D✝\ninst✝¹¹ : MonoidalCategory D✝\ninst✝¹⁰ : BraidedCategory D✝\nE : Type u₃\ninst✝⁹ : Category.{v₃, u₃} E\ninst✝⁸ : MonoidalCategory E\ninst✝⁷ : BraidedCategory E\nC : Type u_1\nD : Type u_2\ninst✝⁶ : Category.{?u.308379, u_1} C\ninst✝⁵ : Category.{?u.308383, u_2} D\ninst✝⁴ : MonoidalCategory C\ninst✝³ : MonoidalCategory D\ninst✝² : BraidedCategory C\ninst✝¹ : SymmetricCategory D\nF : BraidedFunctor C D\ninst✝ : Faithful F.toFunctor\nX Y : C\n⊢ F.map ((β_ X Y).hom ≫ (β_ Y X).hom) = F.map (𝟙 (X ⊗ Y))\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nF : BraidedFunctor C D\nX Y : C\n⊢ LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor X Y ≫ F.map (β_ X Y).hom =\n    (β_ (F.obj X) (F.obj Y)).hom ≫ LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor Y X\n[PROOFSTEP]\nrw [F.braided]\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nF : BraidedFunctor C D\nX Y : C\n⊢ LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor X Y ≫\n      inv (LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor X Y) ≫\n        (β_ (F.obj X) (F.obj Y)).hom ≫ LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor Y X =\n    (β_ (F.obj X) (F.obj Y)).hom ≫ LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor Y X\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ : C\n⊢ tensor_μ C (X₁, X₂) (Y₁, Y₂) ≫ (α_ X₁ Y₁ (X₂ ⊗ Y₂)).hom ≫ (𝟙 X₁ ⊗ (α_ Y₁ X₂ Y₂).inv) =\n    (α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ≫ (𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ≫ (𝟙 X₁ ⊗ (β_ X₂ Y₁).hom ⊗ 𝟙 Y₂)\n[PROOFSTEP]\ndsimp [tensor_μ]\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ : C\n⊢ ((α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ≫\n        (𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ≫\n          (𝟙 X₁ ⊗ (β_ X₂ Y₁).hom ⊗ 𝟙 Y₂) ≫ (𝟙 X₁ ⊗ (α_ Y₁ X₂ Y₂).hom) ≫ (α_ X₁ Y₁ (X₂ ⊗ Y₂)).inv) ≫\n      (α_ X₁ Y₁ (X₂ ⊗ Y₂)).hom ≫ (𝟙 X₁ ⊗ (α_ Y₁ X₂ Y₂).inv) =\n    (α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ≫ (𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ≫ (𝟙 X₁ ⊗ (β_ X₂ Y₁).hom ⊗ 𝟙 Y₂)\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ : C\n⊢ (𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).hom) ≫ (α_ X₁ X₂ (Y₁ ⊗ Y₂)).inv ≫ tensor_μ C (X₁, X₂) (Y₁, Y₂) =\n    (𝟙 X₁ ⊗ (β_ X₂ Y₁).hom ⊗ 𝟙 Y₂) ≫ (𝟙 X₁ ⊗ (α_ Y₁ X₂ Y₂).hom) ≫ (α_ X₁ Y₁ (X₂ ⊗ Y₂)).inv\n[PROOFSTEP]\ndsimp [tensor_μ]\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ : C\n⊢ (𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).hom) ≫\n      (α_ X₁ X₂ (Y₁ ⊗ Y₂)).inv ≫\n        (α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ≫\n          (𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ≫\n            (𝟙 X₁ ⊗ (β_ X₂ Y₁).hom ⊗ 𝟙 Y₂) ≫ (𝟙 X₁ ⊗ (α_ Y₁ X₂ Y₂).hom) ≫ (α_ X₁ Y₁ (X₂ ⊗ Y₂)).inv =\n    (𝟙 X₁ ⊗ (β_ X₂ Y₁).hom ⊗ 𝟙 Y₂) ≫ (𝟙 X₁ ⊗ (α_ Y₁ X₂ Y₂).hom) ≫ (α_ X₁ Y₁ (X₂ ⊗ Y₂)).inv\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ U₁ U₂ V₁ V₂ : C\nf₁ : X₁ ⟶ Y₁\nf₂ : X₂ ⟶ Y₂\ng₁ : U₁ ⟶ V₁\ng₂ : U₂ ⟶ V₂\n⊢ ((f₁ ⊗ f₂) ⊗ g₁ ⊗ g₂) ≫ tensor_μ C (Y₁, Y₂) (V₁, V₂) = tensor_μ C (X₁, X₂) (U₁, U₂) ≫ ((f₁ ⊗ g₁) ⊗ f₂ ⊗ g₂)\n[PROOFSTEP]\ndsimp [tensor_μ]\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ U₁ U₂ V₁ V₂ : C\nf₁ : X₁ ⟶ Y₁\nf₂ : X₂ ⟶ Y₂\ng₁ : U₁ ⟶ V₁\ng₂ : U₂ ⟶ V₂\n⊢ ((f₁ ⊗ f₂) ⊗ g₁ ⊗ g₂) ≫\n      (α_ Y₁ Y₂ (V₁ ⊗ V₂)).hom ≫\n        (𝟙 Y₁ ⊗ (α_ Y₂ V₁ V₂).inv) ≫\n          (𝟙 Y₁ ⊗ (β_ Y₂ V₁).hom ⊗ 𝟙 V₂) ≫ (𝟙 Y₁ ⊗ (α_ V₁ Y₂ V₂).hom) ≫ (α_ Y₁ V₁ (Y₂ ⊗ V₂)).inv =\n    ((α_ X₁ X₂ (U₁ ⊗ U₂)).hom ≫\n        (𝟙 X₁ ⊗ (α_ X₂ U₁ U₂).inv) ≫\n          (𝟙 X₁ ⊗ (β_ X₂ U₁).hom ⊗ 𝟙 U₂) ≫ (𝟙 X₁ ⊗ (α_ U₁ X₂ U₂).hom) ≫ (α_ X₁ U₁ (X₂ ⊗ U₂)).inv) ≫\n      ((f₁ ⊗ g₁) ⊗ f₂ ⊗ g₂)\n[PROOFSTEP]\nslice_lhs 1 2 => rw [associator_naturality]\n[GOAL]\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ U₁ U₂ V₁ V₂ : C\nf₁ : X₁ ⟶ Y₁\nf₂ : X₂ ⟶ Y₂\ng₁ : U₁ ⟶ V₁\ng₂ : U₂ ⟶ V₂\n| ((f₁ ⊗ f₂) ⊗ g₁ ⊗ g₂) ≫ (α_ Y₁ Y₂ (V₁ ⊗ V₂)).hom\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ U₁ U₂ V₁ V₂ : C\nf₁ : X₁ ⟶ Y₁\nf₂ : X₂ ⟶ Y₂\ng₁ : U₁ ⟶ V₁\ng₂ : U₂ ⟶ V₂\n| 𝟙 Y₁ ⊗ (α_ Y₂ V₁ V₂).inv\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ U₁ U₂ V₁ V₂ : C\nf₁ : X₁ ⟶ Y₁\nf₂ : X₂ ⟶ Y₂\ng₁ : U₁ ⟶ V₁\ng₂ : U₂ ⟶ V₂\n| 𝟙 Y₁ ⊗ (β_ Y₂ V₁).hom ⊗ 𝟙 V₂\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ U₁ U₂ V₁ V₂ : C\nf₁ : X₁ ⟶ Y₁\nf₂ : X₂ ⟶ Y₂\ng₁ : U₁ ⟶ V₁\ng₂ : U₂ ⟶ V₂\n| 𝟙 Y₁ ⊗ (α_ V₁ Y₂ V₂).hom\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ U₁ U₂ V₁ V₂ : C\nf₁ : X₁ ⟶ Y₁\nf₂ : X₂ ⟶ Y₂\ng₁ : U₁ ⟶ V₁\ng₂ : U₂ ⟶ V₂\n| (α_ Y₁ V₁ (Y₂ ⊗ V₂)).inv\n[PROOFSTEP]\nrw [associator_naturality]\n[GOAL]\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ U₁ U₂ V₁ V₂ : C\nf₁ : X₁ ⟶ Y₁\nf₂ : X₂ ⟶ Y₂\ng₁ : U₁ ⟶ V₁\ng₂ : U₂ ⟶ V₂\n| ((f₁ ⊗ f₂) ⊗ g₁ ⊗ g₂) ≫ (α_ Y₁ Y₂ (V₁ ⊗ V₂)).hom\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ U₁ U₂ V₁ V₂ : C\nf₁ : X₁ ⟶ Y₁\nf₂ : X₂ ⟶ Y₂\ng₁ : U₁ ⟶ V₁\ng₂ : U₂ ⟶ V₂\n| 𝟙 Y₁ ⊗ (α_ Y₂ V₁ V₂).inv\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ U₁ U₂ V₁ V₂ : C\nf₁ : X₁ ⟶ Y₁\nf₂ : X₂ ⟶ Y₂\ng₁ : U₁ ⟶ V₁\ng₂ : U₂ ⟶ V₂\n| 𝟙 Y₁ ⊗ (β_ Y₂ V₁).hom ⊗ 𝟙 V₂\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ U₁ U₂ V₁ V₂ : C\nf₁ : X₁ ⟶ Y₁\nf₂ : X₂ ⟶ Y₂\ng₁ : U₁ ⟶ V₁\ng₂ : U₂ ⟶ V₂\n| 𝟙 Y₁ ⊗ (α_ V₁ Y₂ V₂).hom\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ U₁ U₂ V₁ V₂ : C\nf₁ : X₁ ⟶ Y₁\nf₂ : X₂ ⟶ Y₂\ng₁ : U₁ ⟶ V₁\ng₂ : U₂ ⟶ V₂\n| (α_ Y₁ V₁ (Y₂ ⊗ V₂)).inv\n[PROOFSTEP]\nrw [associator_naturality]\n[GOAL]\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ U₁ U₂ V₁ V₂ : C\nf₁ : X₁ ⟶ Y₁\nf₂ : X₂ ⟶ Y₂\ng₁ : U₁ ⟶ V₁\ng₂ : U₂ ⟶ V₂\n| ((f₁ ⊗ f₂) ⊗ g₁ ⊗ g₂) ≫ (α_ Y₁ Y₂ (V₁ ⊗ V₂)).hom\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ U₁ U₂ V₁ V₂ : C\nf₁ : X₁ ⟶ Y₁\nf₂ : X₂ ⟶ Y₂\ng₁ : U₁ ⟶ V₁\ng₂ : U₂ ⟶ V₂\n| 𝟙 Y₁ ⊗ (α_ Y₂ V₁ V₂).inv\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ U₁ U₂ V₁ V₂ : C\nf₁ : X₁ ⟶ Y₁\nf₂ : X₂ ⟶ Y₂\ng₁ : U₁ ⟶ V₁\ng₂ : U₂ ⟶ V₂\n| 𝟙 Y₁ ⊗ (β_ Y₂ V₁).hom ⊗ 𝟙 V₂\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ U₁ U₂ V₁ V₂ : C\nf₁ : X₁ ⟶ Y₁\nf₂ : X₂ ⟶ Y₂\ng₁ : U₁ ⟶ V₁\ng₂ : U₂ ⟶ V₂\n| 𝟙 Y₁ ⊗ (α_ V₁ Y₂ V₂).hom\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ U₁ U₂ V₁ V₂ : C\nf₁ : X₁ ⟶ Y₁\nf₂ : X₂ ⟶ Y₂\ng₁ : U₁ ⟶ V₁\ng₂ : U₂ ⟶ V₂\n| (α_ Y₁ V₁ (Y₂ ⊗ V₂)).inv\n[PROOFSTEP]\nrw [associator_naturality]\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ U₁ U₂ V₁ V₂ : C\nf₁ : X₁ ⟶ Y₁\nf₂ : X₂ ⟶ Y₂\ng₁ : U₁ ⟶ V₁\ng₂ : U₂ ⟶ V₂\n⊢ (((((α_ X₁ X₂ (U₁ ⊗ U₂)).hom ≫ (f₁ ⊗ f₂ ⊗ g₁ ⊗ g₂)) ≫ (𝟙 Y₁ ⊗ (α_ Y₂ V₁ V₂).inv)) ≫ (𝟙 Y₁ ⊗ (β_ Y₂ V₁).hom ⊗ 𝟙 V₂)) ≫\n        (𝟙 Y₁ ⊗ (α_ V₁ Y₂ V₂).hom)) ≫\n      (α_ Y₁ V₁ (Y₂ ⊗ V₂)).inv =\n    ((α_ X₁ X₂ (U₁ ⊗ U₂)).hom ≫\n        (𝟙 X₁ ⊗ (α_ X₂ U₁ U₂).inv) ≫\n          (𝟙 X₁ ⊗ (β_ X₂ U₁).hom ⊗ 𝟙 U₂) ≫ (𝟙 X₁ ⊗ (α_ U₁ X₂ U₂).hom) ≫ (α_ X₁ U₁ (X₂ ⊗ U₂)).inv) ≫\n      ((f₁ ⊗ g₁) ⊗ f₂ ⊗ g₂)\n[PROOFSTEP]\nslice_lhs 2 3 => rw [← tensor_comp, comp_id f₁, ← id_comp f₁, associator_inv_naturality, tensor_comp]\n[GOAL]\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ U₁ U₂ V₁ V₂ : C\nf₁ : X₁ ⟶ Y₁\nf₂ : X₂ ⟶ Y₂\ng₁ : U₁ ⟶ V₁\ng₂ : U₂ ⟶ V₂\n| (f₁ ⊗ f₂ ⊗ g₁ ⊗ g₂) ≫ (𝟙 Y₁ ⊗ (α_ Y₂ V₁ V₂).inv)\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ U₁ U₂ V₁ V₂ : C\nf₁ : X₁ ⟶ Y₁\nf₂ : X₂ ⟶ Y₂\ng₁ : U₁ ⟶ V₁\ng₂ : U₂ ⟶ V₂\n| 𝟙 Y₁ ⊗ (β_ Y₂ V₁).hom ⊗ 𝟙 V₂\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ U₁ U₂ V₁ V₂ : C\nf₁ : X₁ ⟶ Y₁\nf₂ : X₂ ⟶ Y₂\ng₁ : U₁ ⟶ V₁\ng₂ : U₂ ⟶ V₂\n| 𝟙 Y₁ ⊗ (α_ V₁ Y₂ V₂).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ U₁ U₂ V₁ V₂ : C\nf₁ : X₁ ⟶ Y₁\nf₂ : X₂ ⟶ Y₂\ng₁ : U₁ ⟶ V₁\ng₂ : U₂ ⟶ V₂\n| (α_ Y₁ V₁ (Y₂ ⊗ V₂)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ U₁ U₂ V₁ V₂ : C\nf₁ : X₁ ⟶ Y₁\nf₂ : X₂ ⟶ Y₂\ng₁ : U₁ ⟶ V₁\ng₂ : U₂ ⟶ V₂\n| (α_ X₁ X₂ (U₁ ⊗ U₂)).hom\n[PROOFSTEP]\nrw [← tensor_comp, comp_id f₁, ← id_comp f₁, associator_inv_naturality, tensor_comp]\n[GOAL]\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ U₁ U₂ V₁ V₂ : C\nf₁ : X₁ ⟶ Y₁\nf₂ : X₂ ⟶ Y₂\ng₁ : U₁ ⟶ V₁\ng₂ : U₂ ⟶ V₂\n| (f₁ ⊗ f₂ ⊗ g₁ ⊗ g₂) ≫ (𝟙 Y₁ ⊗ (α_ Y₂ V₁ V₂).inv)\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ U₁ U₂ V₁ V₂ : C\nf₁ : X₁ ⟶ Y₁\nf₂ : X₂ ⟶ Y₂\ng₁ : U₁ ⟶ V₁\ng₂ : U₂ ⟶ V₂\n| 𝟙 Y₁ ⊗ (β_ Y₂ V₁).hom ⊗ 𝟙 V₂\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ U₁ U₂ V₁ V₂ : C\nf₁ : X₁ ⟶ Y₁\nf₂ : X₂ ⟶ Y₂\ng₁ : U₁ ⟶ V₁\ng₂ : U₂ ⟶ V₂\n| 𝟙 Y₁ ⊗ (α_ V₁ Y₂ V₂).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ U₁ U₂ V₁ V₂ : C\nf₁ : X₁ ⟶ Y₁\nf₂ : X₂ ⟶ Y₂\ng₁ : U₁ ⟶ V₁\ng₂ : U₂ ⟶ V₂\n| (α_ Y₁ V₁ (Y₂ ⊗ V₂)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ U₁ U₂ V₁ V₂ : C\nf₁ : X₁ ⟶ Y₁\nf₂ : X₂ ⟶ Y₂\ng₁ : U₁ ⟶ V₁\ng₂ : U₂ ⟶ V₂\n| (α_ X₁ X₂ (U₁ ⊗ U₂)).hom\n[PROOFSTEP]\nrw [← tensor_comp, comp_id f₁, ← id_comp f₁, associator_inv_naturality, tensor_comp]\n[GOAL]\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ U₁ U₂ V₁ V₂ : C\nf₁ : X₁ ⟶ Y₁\nf₂ : X₂ ⟶ Y₂\ng₁ : U₁ ⟶ V₁\ng₂ : U₂ ⟶ V₂\n| (f₁ ⊗ f₂ ⊗ g₁ ⊗ g₂) ≫ (𝟙 Y₁ ⊗ (α_ Y₂ V₁ V₂).inv)\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ U₁ U₂ V₁ V₂ : C\nf₁ : X₁ ⟶ Y₁\nf₂ : X₂ ⟶ Y₂\ng₁ : U₁ ⟶ V₁\ng₂ : U₂ ⟶ V₂\n| 𝟙 Y₁ ⊗ (β_ Y₂ V₁).hom ⊗ 𝟙 V₂\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ U₁ U₂ V₁ V₂ : C\nf₁ : X₁ ⟶ Y₁\nf₂ : X₂ ⟶ Y₂\ng₁ : U₁ ⟶ V₁\ng₂ : U₂ ⟶ V₂\n| 𝟙 Y₁ ⊗ (α_ V₁ Y₂ V₂).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ U₁ U₂ V₁ V₂ : C\nf₁ : X₁ ⟶ Y₁\nf₂ : X₂ ⟶ Y₂\ng₁ : U₁ ⟶ V₁\ng₂ : U₂ ⟶ V₂\n| (α_ Y₁ V₁ (Y₂ ⊗ V₂)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ U₁ U₂ V₁ V₂ : C\nf₁ : X₁ ⟶ Y₁\nf₂ : X₂ ⟶ Y₂\ng₁ : U₁ ⟶ V₁\ng₂ : U₂ ⟶ V₂\n| (α_ X₁ X₂ (U₁ ⊗ U₂)).hom\n[PROOFSTEP]\nrw [← tensor_comp, comp_id f₁, ← id_comp f₁, associator_inv_naturality, tensor_comp]\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ U₁ U₂ V₁ V₂ : C\nf₁ : X₁ ⟶ Y₁\nf₂ : X₂ ⟶ Y₂\ng₁ : U₁ ⟶ V₁\ng₂ : U₂ ⟶ V₂\n⊢ (α_ X₁ X₂ (U₁ ⊗ U₂)).hom ≫\n      ((((𝟙 X₁ ⊗ (α_ X₂ U₁ U₂).inv) ≫ (f₁ ⊗ (f₂ ⊗ g₁) ⊗ g₂)) ≫ (𝟙 Y₁ ⊗ (β_ Y₂ V₁).hom ⊗ 𝟙 V₂)) ≫\n          (𝟙 Y₁ ⊗ (α_ V₁ Y₂ V₂).hom)) ≫\n        (α_ Y₁ V₁ (Y₂ ⊗ V₂)).inv =\n    ((α_ X₁ X₂ (U₁ ⊗ U₂)).hom ≫\n        (𝟙 X₁ ⊗ (α_ X₂ U₁ U₂).inv) ≫\n          (𝟙 X₁ ⊗ (β_ X₂ U₁).hom ⊗ 𝟙 U₂) ≫ (𝟙 X₁ ⊗ (α_ U₁ X₂ U₂).hom) ≫ (α_ X₁ U₁ (X₂ ⊗ U₂)).inv) ≫\n      ((f₁ ⊗ g₁) ⊗ f₂ ⊗ g₂)\n[PROOFSTEP]\nslice_lhs 3 4 =>\n  rw [← tensor_comp, ← tensor_comp, comp_id f₁, ← id_comp f₁, comp_id g₂, ← id_comp g₂, braiding_naturality,\n    tensor_comp, tensor_comp]\n[GOAL]\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ U₁ U₂ V₁ V₂ : C\nf₁ : X₁ ⟶ Y₁\nf₂ : X₂ ⟶ Y₂\ng₁ : U₁ ⟶ V₁\ng₂ : U₂ ⟶ V₂\n| (f₁ ⊗ (f₂ ⊗ g₁) ⊗ g₂) ≫ (𝟙 Y₁ ⊗ (β_ Y₂ V₁).hom ⊗ 𝟙 V₂)\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ U₁ U₂ V₁ V₂ : C\nf₁ : X₁ ⟶ Y₁\nf₂ : X₂ ⟶ Y₂\ng₁ : U₁ ⟶ V₁\ng₂ : U₂ ⟶ V₂\n| 𝟙 Y₁ ⊗ (α_ V₁ Y₂ V₂).hom\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ U₁ U₂ V₁ V₂ : C\nf₁ : X₁ ⟶ Y₁\nf₂ : X₂ ⟶ Y₂\ng₁ : U₁ ⟶ V₁\ng₂ : U₂ ⟶ V₂\n| (α_ Y₁ V₁ (Y₂ ⊗ V₂)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ U₁ U₂ V₁ V₂ : C\nf₁ : X₁ ⟶ Y₁\nf₂ : X₂ ⟶ Y₂\ng₁ : U₁ ⟶ V₁\ng₂ : U₂ ⟶ V₂\n| (α_ X₁ X₂ (U₁ ⊗ U₂)).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ U₁ U₂ V₁ V₂ : C\nf₁ : X₁ ⟶ Y₁\nf₂ : X₂ ⟶ Y₂\ng₁ : U₁ ⟶ V₁\ng₂ : U₂ ⟶ V₂\n| 𝟙 X₁ ⊗ (α_ X₂ U₁ U₂).inv\n[PROOFSTEP]\nrw [← tensor_comp, ← tensor_comp, comp_id f₁, ← id_comp f₁, comp_id g₂, ← id_comp g₂, braiding_naturality, tensor_comp,\n    tensor_comp]\n[GOAL]\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ U₁ U₂ V₁ V₂ : C\nf₁ : X₁ ⟶ Y₁\nf₂ : X₂ ⟶ Y₂\ng₁ : U₁ ⟶ V₁\ng₂ : U₂ ⟶ V₂\n| (f₁ ⊗ (f₂ ⊗ g₁) ⊗ g₂) ≫ (𝟙 Y₁ ⊗ (β_ Y₂ V₁).hom ⊗ 𝟙 V₂)\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ U₁ U₂ V₁ V₂ : C\nf₁ : X₁ ⟶ Y₁\nf₂ : X₂ ⟶ Y₂\ng₁ : U₁ ⟶ V₁\ng₂ : U₂ ⟶ V₂\n| 𝟙 Y₁ ⊗ (α_ V₁ Y₂ V₂).hom\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ U₁ U₂ V₁ V₂ : C\nf₁ : X₁ ⟶ Y₁\nf₂ : X₂ ⟶ Y₂\ng₁ : U₁ ⟶ V₁\ng₂ : U₂ ⟶ V₂\n| (α_ Y₁ V₁ (Y₂ ⊗ V₂)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ U₁ U₂ V₁ V₂ : C\nf₁ : X₁ ⟶ Y₁\nf₂ : X₂ ⟶ Y₂\ng₁ : U₁ ⟶ V₁\ng₂ : U₂ ⟶ V₂\n| (α_ X₁ X₂ (U₁ ⊗ U₂)).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ U₁ U₂ V₁ V₂ : C\nf₁ : X₁ ⟶ Y₁\nf₂ : X₂ ⟶ Y₂\ng₁ : U₁ ⟶ V₁\ng₂ : U₂ ⟶ V₂\n| 𝟙 X₁ ⊗ (α_ X₂ U₁ U₂).inv\n[PROOFSTEP]\nrw [← tensor_comp, ← tensor_comp, comp_id f₁, ← id_comp f₁, comp_id g₂, ← id_comp g₂, braiding_naturality, tensor_comp,\n    tensor_comp]\n[GOAL]\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ U₁ U₂ V₁ V₂ : C\nf₁ : X₁ ⟶ Y₁\nf₂ : X₂ ⟶ Y₂\ng₁ : U₁ ⟶ V₁\ng₂ : U₂ ⟶ V₂\n| (f₁ ⊗ (f₂ ⊗ g₁) ⊗ g₂) ≫ (𝟙 Y₁ ⊗ (β_ Y₂ V₁).hom ⊗ 𝟙 V₂)\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ U₁ U₂ V₁ V₂ : C\nf₁ : X₁ ⟶ Y₁\nf₂ : X₂ ⟶ Y₂\ng₁ : U₁ ⟶ V₁\ng₂ : U₂ ⟶ V₂\n| 𝟙 Y₁ ⊗ (α_ V₁ Y₂ V₂).hom\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ U₁ U₂ V₁ V₂ : C\nf₁ : X₁ ⟶ Y₁\nf₂ : X₂ ⟶ Y₂\ng₁ : U₁ ⟶ V₁\ng₂ : U₂ ⟶ V₂\n| (α_ Y₁ V₁ (Y₂ ⊗ V₂)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ U₁ U₂ V₁ V₂ : C\nf₁ : X₁ ⟶ Y₁\nf₂ : X₂ ⟶ Y₂\ng₁ : U₁ ⟶ V₁\ng₂ : U₂ ⟶ V₂\n| (α_ X₁ X₂ (U₁ ⊗ U₂)).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ U₁ U₂ V₁ V₂ : C\nf₁ : X₁ ⟶ Y₁\nf₂ : X₂ ⟶ Y₂\ng₁ : U₁ ⟶ V₁\ng₂ : U₂ ⟶ V₂\n| 𝟙 X₁ ⊗ (α_ X₂ U₁ U₂).inv\n[PROOFSTEP]\nrw [← tensor_comp, ← tensor_comp, comp_id f₁, ← id_comp f₁, comp_id g₂, ← id_comp g₂, braiding_naturality, tensor_comp,\n  tensor_comp]\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ U₁ U₂ V₁ V₂ : C\nf₁ : X₁ ⟶ Y₁\nf₂ : X₂ ⟶ Y₂\ng₁ : U₁ ⟶ V₁\ng₂ : U₂ ⟶ V₂\n⊢ (α_ X₁ X₂ (U₁ ⊗ U₂)).hom ≫\n      (𝟙 X₁ ⊗ (α_ X₂ U₁ U₂).inv) ≫\n        (((𝟙 X₁ ⊗ (β_ X₂ U₁).hom ⊗ 𝟙 U₂) ≫ (f₁ ⊗ (g₁ ⊗ f₂) ⊗ g₂)) ≫ (𝟙 Y₁ ⊗ (α_ V₁ Y₂ V₂).hom)) ≫\n          (α_ Y₁ V₁ (Y₂ ⊗ V₂)).inv =\n    ((α_ X₁ X₂ (U₁ ⊗ U₂)).hom ≫\n        (𝟙 X₁ ⊗ (α_ X₂ U₁ U₂).inv) ≫\n          (𝟙 X₁ ⊗ (β_ X₂ U₁).hom ⊗ 𝟙 U₂) ≫ (𝟙 X₁ ⊗ (α_ U₁ X₂ U₂).hom) ≫ (α_ X₁ U₁ (X₂ ⊗ U₂)).inv) ≫\n      ((f₁ ⊗ g₁) ⊗ f₂ ⊗ g₂)\n[PROOFSTEP]\nslice_lhs 4 5 => rw [← tensor_comp, comp_id f₁, ← id_comp f₁, associator_naturality, tensor_comp]\n[GOAL]\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ U₁ U₂ V₁ V₂ : C\nf₁ : X₁ ⟶ Y₁\nf₂ : X₂ ⟶ Y₂\ng₁ : U₁ ⟶ V₁\ng₂ : U₂ ⟶ V₂\n| (f₁ ⊗ (g₁ ⊗ f₂) ⊗ g₂) ≫ (𝟙 Y₁ ⊗ (α_ V₁ Y₂ V₂).hom)\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ U₁ U₂ V₁ V₂ : C\nf₁ : X₁ ⟶ Y₁\nf₂ : X₂ ⟶ Y₂\ng₁ : U₁ ⟶ V₁\ng₂ : U₂ ⟶ V₂\n| (α_ Y₁ V₁ (Y₂ ⊗ V₂)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ U₁ U₂ V₁ V₂ : C\nf₁ : X₁ ⟶ Y₁\nf₂ : X₂ ⟶ Y₂\ng₁ : U₁ ⟶ V₁\ng₂ : U₂ ⟶ V₂\n| (α_ X₁ X₂ (U₁ ⊗ U₂)).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ U₁ U₂ V₁ V₂ : C\nf₁ : X₁ ⟶ Y₁\nf₂ : X₂ ⟶ Y₂\ng₁ : U₁ ⟶ V₁\ng₂ : U₂ ⟶ V₂\n| 𝟙 X₁ ⊗ (α_ X₂ U₁ U₂).inv\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ U₁ U₂ V₁ V₂ : C\nf₁ : X₁ ⟶ Y₁\nf₂ : X₂ ⟶ Y₂\ng₁ : U₁ ⟶ V₁\ng₂ : U₂ ⟶ V₂\n| 𝟙 X₁ ⊗ (β_ X₂ U₁).hom ⊗ 𝟙 U₂\n[PROOFSTEP]\nrw [← tensor_comp, comp_id f₁, ← id_comp f₁, associator_naturality, tensor_comp]\n[GOAL]\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ U₁ U₂ V₁ V₂ : C\nf₁ : X₁ ⟶ Y₁\nf₂ : X₂ ⟶ Y₂\ng₁ : U₁ ⟶ V₁\ng₂ : U₂ ⟶ V₂\n| (f₁ ⊗ (g₁ ⊗ f₂) ⊗ g₂) ≫ (𝟙 Y₁ ⊗ (α_ V₁ Y₂ V₂).hom)\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ U₁ U₂ V₁ V₂ : C\nf₁ : X₁ ⟶ Y₁\nf₂ : X₂ ⟶ Y₂\ng₁ : U₁ ⟶ V₁\ng₂ : U₂ ⟶ V₂\n| (α_ Y₁ V₁ (Y₂ ⊗ V₂)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ U₁ U₂ V₁ V₂ : C\nf₁ : X₁ ⟶ Y₁\nf₂ : X₂ ⟶ Y₂\ng₁ : U₁ ⟶ V₁\ng₂ : U₂ ⟶ V₂\n| (α_ X₁ X₂ (U₁ ⊗ U₂)).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ U₁ U₂ V₁ V₂ : C\nf₁ : X₁ ⟶ Y₁\nf₂ : X₂ ⟶ Y₂\ng₁ : U₁ ⟶ V₁\ng₂ : U₂ ⟶ V₂\n| 𝟙 X₁ ⊗ (α_ X₂ U₁ U₂).inv\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ U₁ U₂ V₁ V₂ : C\nf₁ : X₁ ⟶ Y₁\nf₂ : X₂ ⟶ Y₂\ng₁ : U₁ ⟶ V₁\ng₂ : U₂ ⟶ V₂\n| 𝟙 X₁ ⊗ (β_ X₂ U₁).hom ⊗ 𝟙 U₂\n[PROOFSTEP]\nrw [← tensor_comp, comp_id f₁, ← id_comp f₁, associator_naturality, tensor_comp]\n[GOAL]\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ U₁ U₂ V₁ V₂ : C\nf₁ : X₁ ⟶ Y₁\nf₂ : X₂ ⟶ Y₂\ng₁ : U₁ ⟶ V₁\ng₂ : U₂ ⟶ V₂\n| (f₁ ⊗ (g₁ ⊗ f₂) ⊗ g₂) ≫ (𝟙 Y₁ ⊗ (α_ V₁ Y₂ V₂).hom)\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ U₁ U₂ V₁ V₂ : C\nf₁ : X₁ ⟶ Y₁\nf₂ : X₂ ⟶ Y₂\ng₁ : U₁ ⟶ V₁\ng₂ : U₂ ⟶ V₂\n| (α_ Y₁ V₁ (Y₂ ⊗ V₂)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ U₁ U₂ V₁ V₂ : C\nf₁ : X₁ ⟶ Y₁\nf₂ : X₂ ⟶ Y₂\ng₁ : U₁ ⟶ V₁\ng₂ : U₂ ⟶ V₂\n| (α_ X₁ X₂ (U₁ ⊗ U₂)).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ U₁ U₂ V₁ V₂ : C\nf₁ : X₁ ⟶ Y₁\nf₂ : X₂ ⟶ Y₂\ng₁ : U₁ ⟶ V₁\ng₂ : U₂ ⟶ V₂\n| 𝟙 X₁ ⊗ (α_ X₂ U₁ U₂).inv\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ U₁ U₂ V₁ V₂ : C\nf₁ : X₁ ⟶ Y₁\nf₂ : X₂ ⟶ Y₂\ng₁ : U₁ ⟶ V₁\ng₂ : U₂ ⟶ V₂\n| 𝟙 X₁ ⊗ (β_ X₂ U₁).hom ⊗ 𝟙 U₂\n[PROOFSTEP]\nrw [← tensor_comp, comp_id f₁, ← id_comp f₁, associator_naturality, tensor_comp]\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ U₁ U₂ V₁ V₂ : C\nf₁ : X₁ ⟶ Y₁\nf₂ : X₂ ⟶ Y₂\ng₁ : U₁ ⟶ V₁\ng₂ : U₂ ⟶ V₂\n⊢ (α_ X₁ X₂ (U₁ ⊗ U₂)).hom ≫\n      (𝟙 X₁ ⊗ (α_ X₂ U₁ U₂).inv) ≫\n        (𝟙 X₁ ⊗ (β_ X₂ U₁).hom ⊗ 𝟙 U₂) ≫ ((𝟙 X₁ ⊗ (α_ U₁ X₂ U₂).hom) ≫ (f₁ ⊗ g₁ ⊗ f₂ ⊗ g₂)) ≫ (α_ Y₁ V₁ (Y₂ ⊗ V₂)).inv =\n    ((α_ X₁ X₂ (U₁ ⊗ U₂)).hom ≫\n        (𝟙 X₁ ⊗ (α_ X₂ U₁ U₂).inv) ≫\n          (𝟙 X₁ ⊗ (β_ X₂ U₁).hom ⊗ 𝟙 U₂) ≫ (𝟙 X₁ ⊗ (α_ U₁ X₂ U₂).hom) ≫ (α_ X₁ U₁ (X₂ ⊗ U₂)).inv) ≫\n      ((f₁ ⊗ g₁) ⊗ f₂ ⊗ g₂)\n[PROOFSTEP]\nslice_lhs 5 6 => rw [associator_inv_naturality]\n[GOAL]\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ U₁ U₂ V₁ V₂ : C\nf₁ : X₁ ⟶ Y₁\nf₂ : X₂ ⟶ Y₂\ng₁ : U₁ ⟶ V₁\ng₂ : U₂ ⟶ V₂\n| (f₁ ⊗ g₁ ⊗ f₂ ⊗ g₂) ≫ (α_ Y₁ V₁ (Y₂ ⊗ V₂)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ U₁ U₂ V₁ V₂ : C\nf₁ : X₁ ⟶ Y₁\nf₂ : X₂ ⟶ Y₂\ng₁ : U₁ ⟶ V₁\ng₂ : U₂ ⟶ V₂\n| (α_ X₁ X₂ (U₁ ⊗ U₂)).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ U₁ U₂ V₁ V₂ : C\nf₁ : X₁ ⟶ Y₁\nf₂ : X₂ ⟶ Y₂\ng₁ : U₁ ⟶ V₁\ng₂ : U₂ ⟶ V₂\n| 𝟙 X₁ ⊗ (α_ X₂ U₁ U₂).inv\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ U₁ U₂ V₁ V₂ : C\nf₁ : X₁ ⟶ Y₁\nf₂ : X₂ ⟶ Y₂\ng₁ : U₁ ⟶ V₁\ng₂ : U₂ ⟶ V₂\n| 𝟙 X₁ ⊗ (β_ X₂ U₁).hom ⊗ 𝟙 U₂\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ U₁ U₂ V₁ V₂ : C\nf₁ : X₁ ⟶ Y₁\nf₂ : X₂ ⟶ Y₂\ng₁ : U₁ ⟶ V₁\ng₂ : U₂ ⟶ V₂\n| 𝟙 X₁ ⊗ (α_ U₁ X₂ U₂).hom\n[PROOFSTEP]\nrw [associator_inv_naturality]\n[GOAL]\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ U₁ U₂ V₁ V₂ : C\nf₁ : X₁ ⟶ Y₁\nf₂ : X₂ ⟶ Y₂\ng₁ : U₁ ⟶ V₁\ng₂ : U₂ ⟶ V₂\n| (f₁ ⊗ g₁ ⊗ f₂ ⊗ g₂) ≫ (α_ Y₁ V₁ (Y₂ ⊗ V₂)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ U₁ U₂ V₁ V₂ : C\nf₁ : X₁ ⟶ Y₁\nf₂ : X₂ ⟶ Y₂\ng₁ : U₁ ⟶ V₁\ng₂ : U₂ ⟶ V₂\n| (α_ X₁ X₂ (U₁ ⊗ U₂)).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ U₁ U₂ V₁ V₂ : C\nf₁ : X₁ ⟶ Y₁\nf₂ : X₂ ⟶ Y₂\ng₁ : U₁ ⟶ V₁\ng₂ : U₂ ⟶ V₂\n| 𝟙 X₁ ⊗ (α_ X₂ U₁ U₂).inv\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ U₁ U₂ V₁ V₂ : C\nf₁ : X₁ ⟶ Y₁\nf₂ : X₂ ⟶ Y₂\ng₁ : U₁ ⟶ V₁\ng₂ : U₂ ⟶ V₂\n| 𝟙 X₁ ⊗ (β_ X₂ U₁).hom ⊗ 𝟙 U₂\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ U₁ U₂ V₁ V₂ : C\nf₁ : X₁ ⟶ Y₁\nf₂ : X₂ ⟶ Y₂\ng₁ : U₁ ⟶ V₁\ng₂ : U₂ ⟶ V₂\n| 𝟙 X₁ ⊗ (α_ U₁ X₂ U₂).hom\n[PROOFSTEP]\nrw [associator_inv_naturality]\n[GOAL]\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ U₁ U₂ V₁ V₂ : C\nf₁ : X₁ ⟶ Y₁\nf₂ : X₂ ⟶ Y₂\ng₁ : U₁ ⟶ V₁\ng₂ : U₂ ⟶ V₂\n| (f₁ ⊗ g₁ ⊗ f₂ ⊗ g₂) ≫ (α_ Y₁ V₁ (Y₂ ⊗ V₂)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ U₁ U₂ V₁ V₂ : C\nf₁ : X₁ ⟶ Y₁\nf₂ : X₂ ⟶ Y₂\ng₁ : U₁ ⟶ V₁\ng₂ : U₂ ⟶ V₂\n| (α_ X₁ X₂ (U₁ ⊗ U₂)).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ U₁ U₂ V₁ V₂ : C\nf₁ : X₁ ⟶ Y₁\nf₂ : X₂ ⟶ Y₂\ng₁ : U₁ ⟶ V₁\ng₂ : U₂ ⟶ V₂\n| 𝟙 X₁ ⊗ (α_ X₂ U₁ U₂).inv\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ U₁ U₂ V₁ V₂ : C\nf₁ : X₁ ⟶ Y₁\nf₂ : X₂ ⟶ Y₂\ng₁ : U₁ ⟶ V₁\ng₂ : U₂ ⟶ V₂\n| 𝟙 X₁ ⊗ (β_ X₂ U₁).hom ⊗ 𝟙 U₂\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ U₁ U₂ V₁ V₂ : C\nf₁ : X₁ ⟶ Y₁\nf₂ : X₂ ⟶ Y₂\ng₁ : U₁ ⟶ V₁\ng₂ : U₂ ⟶ V₂\n| 𝟙 X₁ ⊗ (α_ U₁ X₂ U₂).hom\n[PROOFSTEP]\nrw [associator_inv_naturality]\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ U₁ U₂ V₁ V₂ : C\nf₁ : X₁ ⟶ Y₁\nf₂ : X₂ ⟶ Y₂\ng₁ : U₁ ⟶ V₁\ng₂ : U₂ ⟶ V₂\n⊢ (α_ X₁ X₂ (U₁ ⊗ U₂)).hom ≫\n      (𝟙 X₁ ⊗ (α_ X₂ U₁ U₂).inv) ≫\n        (𝟙 X₁ ⊗ (β_ X₂ U₁).hom ⊗ 𝟙 U₂) ≫ (𝟙 X₁ ⊗ (α_ U₁ X₂ U₂).hom) ≫ (α_ X₁ U₁ (X₂ ⊗ U₂)).inv ≫ ((f₁ ⊗ g₁) ⊗ f₂ ⊗ g₂) =\n    ((α_ X₁ X₂ (U₁ ⊗ U₂)).hom ≫\n        (𝟙 X₁ ⊗ (α_ X₂ U₁ U₂).inv) ≫\n          (𝟙 X₁ ⊗ (β_ X₂ U₁).hom ⊗ 𝟙 U₂) ≫ (𝟙 X₁ ⊗ (α_ U₁ X₂ U₂).hom) ≫ (α_ X₁ U₁ (X₂ ⊗ U₂)).inv) ≫\n      ((f₁ ⊗ g₁) ⊗ f₂ ⊗ g₂)\n[PROOFSTEP]\nsimp only [assoc]\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\n⊢ (λ_ (X₁ ⊗ X₂)).hom = ((λ_ (𝟙_ C)).inv ⊗ 𝟙 (X₁ ⊗ X₂)) ≫ tensor_μ C (𝟙_ C, 𝟙_ C) (X₁, X₂) ≫ ((λ_ X₁).hom ⊗ (λ_ X₂).hom)\n[PROOFSTEP]\ndsimp [tensor_μ]\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\n⊢ (λ_ (X₁ ⊗ X₂)).hom =\n    ((λ_ (𝟙_ C)).inv ⊗ 𝟙 (X₁ ⊗ X₂)) ≫\n      ((α_ (𝟙_ C) (𝟙_ C) (X₁ ⊗ X₂)).hom ≫\n          (𝟙 (𝟙_ C) ⊗ (α_ (𝟙_ C) X₁ X₂).inv) ≫\n            (𝟙 (𝟙_ C) ⊗ (β_ (𝟙_ C) X₁).hom ⊗ 𝟙 X₂) ≫\n              (𝟙 (𝟙_ C) ⊗ (α_ X₁ (𝟙_ C) X₂).hom) ≫ (α_ (𝟙_ C) X₁ (𝟙_ C ⊗ X₂)).inv) ≫\n        ((λ_ X₁).hom ⊗ (λ_ X₂).hom)\n[PROOFSTEP]\nhave :\n  ((λ_ (𝟙_ C)).inv ⊗ 𝟙 (X₁ ⊗ X₂)) ≫ (α_ (𝟙_ C) (𝟙_ C) (X₁ ⊗ X₂)).hom ≫ (𝟙 (𝟙_ C) ⊗ (α_ (𝟙_ C) X₁ X₂).inv) =\n    𝟙 (𝟙_ C) ⊗ (λ_ X₁).inv ⊗ 𝟙 X₂ :=\n  by pure_coherence\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\n⊢ ((λ_ (𝟙_ C)).inv ⊗ 𝟙 (X₁ ⊗ X₂)) ≫ (α_ (𝟙_ C) (𝟙_ C) (X₁ ⊗ X₂)).hom ≫ (𝟙 (𝟙_ C) ⊗ (α_ (𝟙_ C) X₁ X₂).inv) =\n    𝟙 (𝟙_ C) ⊗ (λ_ X₁).inv ⊗ 𝟙 X₂\n[PROOFSTEP]\npure_coherence\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\nthis :\n  ((λ_ (𝟙_ C)).inv ⊗ 𝟙 (X₁ ⊗ X₂)) ≫ (α_ (𝟙_ C) (𝟙_ C) (X₁ ⊗ X₂)).hom ≫ (𝟙 (𝟙_ C) ⊗ (α_ (𝟙_ C) X₁ X₂).inv) =\n    𝟙 (𝟙_ C) ⊗ (λ_ X₁).inv ⊗ 𝟙 X₂\n⊢ (λ_ (X₁ ⊗ X₂)).hom =\n    ((λ_ (𝟙_ C)).inv ⊗ 𝟙 (X₁ ⊗ X₂)) ≫\n      ((α_ (𝟙_ C) (𝟙_ C) (X₁ ⊗ X₂)).hom ≫\n          (𝟙 (𝟙_ C) ⊗ (α_ (𝟙_ C) X₁ X₂).inv) ≫\n            (𝟙 (𝟙_ C) ⊗ (β_ (𝟙_ C) X₁).hom ⊗ 𝟙 X₂) ≫\n              (𝟙 (𝟙_ C) ⊗ (α_ X₁ (𝟙_ C) X₂).hom) ≫ (α_ (𝟙_ C) X₁ (𝟙_ C ⊗ X₂)).inv) ≫\n        ((λ_ X₁).hom ⊗ (λ_ X₂).hom)\n[PROOFSTEP]\nslice_rhs 1 3 => rw [this]\n[GOAL]\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\nthis :\n  ((λ_ (𝟙_ C)).inv ⊗ 𝟙 (X₁ ⊗ X₂)) ≫ (α_ (𝟙_ C) (𝟙_ C) (X₁ ⊗ X₂)).hom ≫ (𝟙 (𝟙_ C) ⊗ (α_ (𝟙_ C) X₁ X₂).inv) =\n    𝟙 (𝟙_ C) ⊗ (λ_ X₁).inv ⊗ 𝟙 X₂\n| ((λ_ (𝟙_ C)).inv ⊗ 𝟙 (X₁ ⊗ X₂)) ≫ (α_ (𝟙_ C) (𝟙_ C) (X₁ ⊗ X₂)).hom ≫ (𝟙 (𝟙_ C) ⊗ (α_ (𝟙_ C) X₁ X₂).inv)\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\nthis :\n  ((λ_ (𝟙_ C)).inv ⊗ 𝟙 (X₁ ⊗ X₂)) ≫ (α_ (𝟙_ C) (𝟙_ C) (X₁ ⊗ X₂)).hom ≫ (𝟙 (𝟙_ C) ⊗ (α_ (𝟙_ C) X₁ X₂).inv) =\n    𝟙 (𝟙_ C) ⊗ (λ_ X₁).inv ⊗ 𝟙 X₂\n| 𝟙 (𝟙_ C) ⊗ (β_ (𝟙_ C) X₁).hom ⊗ 𝟙 X₂\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\nthis :\n  ((λ_ (𝟙_ C)).inv ⊗ 𝟙 (X₁ ⊗ X₂)) ≫ (α_ (𝟙_ C) (𝟙_ C) (X₁ ⊗ X₂)).hom ≫ (𝟙 (𝟙_ C) ⊗ (α_ (𝟙_ C) X₁ X₂).inv) =\n    𝟙 (𝟙_ C) ⊗ (λ_ X₁).inv ⊗ 𝟙 X₂\n| 𝟙 (𝟙_ C) ⊗ (α_ X₁ (𝟙_ C) X₂).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\nthis :\n  ((λ_ (𝟙_ C)).inv ⊗ 𝟙 (X₁ ⊗ X₂)) ≫ (α_ (𝟙_ C) (𝟙_ C) (X₁ ⊗ X₂)).hom ≫ (𝟙 (𝟙_ C) ⊗ (α_ (𝟙_ C) X₁ X₂).inv) =\n    𝟙 (𝟙_ C) ⊗ (λ_ X₁).inv ⊗ 𝟙 X₂\n| (α_ (𝟙_ C) X₁ (𝟙_ C ⊗ X₂)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\nthis :\n  ((λ_ (𝟙_ C)).inv ⊗ 𝟙 (X₁ ⊗ X₂)) ≫ (α_ (𝟙_ C) (𝟙_ C) (X₁ ⊗ X₂)).hom ≫ (𝟙 (𝟙_ C) ⊗ (α_ (𝟙_ C) X₁ X₂).inv) =\n    𝟙 (𝟙_ C) ⊗ (λ_ X₁).inv ⊗ 𝟙 X₂\n| (λ_ X₁).hom ⊗ (λ_ X₂).hom\n[PROOFSTEP]\nrw [this]\n[GOAL]\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\nthis :\n  ((λ_ (𝟙_ C)).inv ⊗ 𝟙 (X₁ ⊗ X₂)) ≫ (α_ (𝟙_ C) (𝟙_ C) (X₁ ⊗ X₂)).hom ≫ (𝟙 (𝟙_ C) ⊗ (α_ (𝟙_ C) X₁ X₂).inv) =\n    𝟙 (𝟙_ C) ⊗ (λ_ X₁).inv ⊗ 𝟙 X₂\n| ((λ_ (𝟙_ C)).inv ⊗ 𝟙 (X₁ ⊗ X₂)) ≫ (α_ (𝟙_ C) (𝟙_ C) (X₁ ⊗ X₂)).hom ≫ (𝟙 (𝟙_ C) ⊗ (α_ (𝟙_ C) X₁ X₂).inv)\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\nthis :\n  ((λ_ (𝟙_ C)).inv ⊗ 𝟙 (X₁ ⊗ X₂)) ≫ (α_ (𝟙_ C) (𝟙_ C) (X₁ ⊗ X₂)).hom ≫ (𝟙 (𝟙_ C) ⊗ (α_ (𝟙_ C) X₁ X₂).inv) =\n    𝟙 (𝟙_ C) ⊗ (λ_ X₁).inv ⊗ 𝟙 X₂\n| 𝟙 (𝟙_ C) ⊗ (β_ (𝟙_ C) X₁).hom ⊗ 𝟙 X₂\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\nthis :\n  ((λ_ (𝟙_ C)).inv ⊗ 𝟙 (X₁ ⊗ X₂)) ≫ (α_ (𝟙_ C) (𝟙_ C) (X₁ ⊗ X₂)).hom ≫ (𝟙 (𝟙_ C) ⊗ (α_ (𝟙_ C) X₁ X₂).inv) =\n    𝟙 (𝟙_ C) ⊗ (λ_ X₁).inv ⊗ 𝟙 X₂\n| 𝟙 (𝟙_ C) ⊗ (α_ X₁ (𝟙_ C) X₂).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\nthis :\n  ((λ_ (𝟙_ C)).inv ⊗ 𝟙 (X₁ ⊗ X₂)) ≫ (α_ (𝟙_ C) (𝟙_ C) (X₁ ⊗ X₂)).hom ≫ (𝟙 (𝟙_ C) ⊗ (α_ (𝟙_ C) X₁ X₂).inv) =\n    𝟙 (𝟙_ C) ⊗ (λ_ X₁).inv ⊗ 𝟙 X₂\n| (α_ (𝟙_ C) X₁ (𝟙_ C ⊗ X₂)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\nthis :\n  ((λ_ (𝟙_ C)).inv ⊗ 𝟙 (X₁ ⊗ X₂)) ≫ (α_ (𝟙_ C) (𝟙_ C) (X₁ ⊗ X₂)).hom ≫ (𝟙 (𝟙_ C) ⊗ (α_ (𝟙_ C) X₁ X₂).inv) =\n    𝟙 (𝟙_ C) ⊗ (λ_ X₁).inv ⊗ 𝟙 X₂\n| (λ_ X₁).hom ⊗ (λ_ X₂).hom\n[PROOFSTEP]\nrw [this]\n[GOAL]\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\nthis :\n  ((λ_ (𝟙_ C)).inv ⊗ 𝟙 (X₁ ⊗ X₂)) ≫ (α_ (𝟙_ C) (𝟙_ C) (X₁ ⊗ X₂)).hom ≫ (𝟙 (𝟙_ C) ⊗ (α_ (𝟙_ C) X₁ X₂).inv) =\n    𝟙 (𝟙_ C) ⊗ (λ_ X₁).inv ⊗ 𝟙 X₂\n| ((λ_ (𝟙_ C)).inv ⊗ 𝟙 (X₁ ⊗ X₂)) ≫ (α_ (𝟙_ C) (𝟙_ C) (X₁ ⊗ X₂)).hom ≫ (𝟙 (𝟙_ C) ⊗ (α_ (𝟙_ C) X₁ X₂).inv)\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\nthis :\n  ((λ_ (𝟙_ C)).inv ⊗ 𝟙 (X₁ ⊗ X₂)) ≫ (α_ (𝟙_ C) (𝟙_ C) (X₁ ⊗ X₂)).hom ≫ (𝟙 (𝟙_ C) ⊗ (α_ (𝟙_ C) X₁ X₂).inv) =\n    𝟙 (𝟙_ C) ⊗ (λ_ X₁).inv ⊗ 𝟙 X₂\n| 𝟙 (𝟙_ C) ⊗ (β_ (𝟙_ C) X₁).hom ⊗ 𝟙 X₂\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\nthis :\n  ((λ_ (𝟙_ C)).inv ⊗ 𝟙 (X₁ ⊗ X₂)) ≫ (α_ (𝟙_ C) (𝟙_ C) (X₁ ⊗ X₂)).hom ≫ (𝟙 (𝟙_ C) ⊗ (α_ (𝟙_ C) X₁ X₂).inv) =\n    𝟙 (𝟙_ C) ⊗ (λ_ X₁).inv ⊗ 𝟙 X₂\n| 𝟙 (𝟙_ C) ⊗ (α_ X₁ (𝟙_ C) X₂).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\nthis :\n  ((λ_ (𝟙_ C)).inv ⊗ 𝟙 (X₁ ⊗ X₂)) ≫ (α_ (𝟙_ C) (𝟙_ C) (X₁ ⊗ X₂)).hom ≫ (𝟙 (𝟙_ C) ⊗ (α_ (𝟙_ C) X₁ X₂).inv) =\n    𝟙 (𝟙_ C) ⊗ (λ_ X₁).inv ⊗ 𝟙 X₂\n| (α_ (𝟙_ C) X₁ (𝟙_ C ⊗ X₂)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\nthis :\n  ((λ_ (𝟙_ C)).inv ⊗ 𝟙 (X₁ ⊗ X₂)) ≫ (α_ (𝟙_ C) (𝟙_ C) (X₁ ⊗ X₂)).hom ≫ (𝟙 (𝟙_ C) ⊗ (α_ (𝟙_ C) X₁ X₂).inv) =\n    𝟙 (𝟙_ C) ⊗ (λ_ X₁).inv ⊗ 𝟙 X₂\n| (λ_ X₁).hom ⊗ (λ_ X₂).hom\n[PROOFSTEP]\nrw [this]\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\nthis :\n  ((λ_ (𝟙_ C)).inv ⊗ 𝟙 (X₁ ⊗ X₂)) ≫ (α_ (𝟙_ C) (𝟙_ C) (X₁ ⊗ X₂)).hom ≫ (𝟙 (𝟙_ C) ⊗ (α_ (𝟙_ C) X₁ X₂).inv) =\n    𝟙 (𝟙_ C) ⊗ (λ_ X₁).inv ⊗ 𝟙 X₂\n⊢ (λ_ (X₁ ⊗ X₂)).hom =\n    ((((𝟙 (𝟙_ C) ⊗ (λ_ X₁).inv ⊗ 𝟙 X₂) ≫ (𝟙 (𝟙_ C) ⊗ (β_ (𝟙_ C) X₁).hom ⊗ 𝟙 X₂)) ≫ (𝟙 (𝟙_ C) ⊗ (α_ X₁ (𝟙_ C) X₂).hom)) ≫\n        (α_ (𝟙_ C) X₁ (𝟙_ C ⊗ X₂)).inv) ≫\n      ((λ_ X₁).hom ⊗ (λ_ X₂).hom)\n[PROOFSTEP]\nclear this\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\n⊢ (λ_ (X₁ ⊗ X₂)).hom =\n    ((((𝟙 (𝟙_ C) ⊗ (λ_ X₁).inv ⊗ 𝟙 X₂) ≫ (𝟙 (𝟙_ C) ⊗ (β_ (𝟙_ C) X₁).hom ⊗ 𝟙 X₂)) ≫ (𝟙 (𝟙_ C) ⊗ (α_ X₁ (𝟙_ C) X₂).hom)) ≫\n        (α_ (𝟙_ C) X₁ (𝟙_ C ⊗ X₂)).inv) ≫\n      ((λ_ X₁).hom ⊗ (λ_ X₂).hom)\n[PROOFSTEP]\nslice_rhs 1 2 => rw [← tensor_comp, ← tensor_comp, comp_id, comp_id, leftUnitor_inv_braiding]\n[GOAL]\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\n| (𝟙 (𝟙_ C) ⊗ (λ_ X₁).inv ⊗ 𝟙 X₂) ≫ (𝟙 (𝟙_ C) ⊗ (β_ (𝟙_ C) X₁).hom ⊗ 𝟙 X₂)\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\n| 𝟙 (𝟙_ C) ⊗ (α_ X₁ (𝟙_ C) X₂).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\n| (α_ (𝟙_ C) X₁ (𝟙_ C ⊗ X₂)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\n| (λ_ X₁).hom ⊗ (λ_ X₂).hom\n[PROOFSTEP]\nrw [← tensor_comp, ← tensor_comp, comp_id, comp_id, leftUnitor_inv_braiding]\n[GOAL]\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\n| (𝟙 (𝟙_ C) ⊗ (λ_ X₁).inv ⊗ 𝟙 X₂) ≫ (𝟙 (𝟙_ C) ⊗ (β_ (𝟙_ C) X₁).hom ⊗ 𝟙 X₂)\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\n| 𝟙 (𝟙_ C) ⊗ (α_ X₁ (𝟙_ C) X₂).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\n| (α_ (𝟙_ C) X₁ (𝟙_ C ⊗ X₂)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\n| (λ_ X₁).hom ⊗ (λ_ X₂).hom\n[PROOFSTEP]\nrw [← tensor_comp, ← tensor_comp, comp_id, comp_id, leftUnitor_inv_braiding]\n[GOAL]\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\n| (𝟙 (𝟙_ C) ⊗ (λ_ X₁).inv ⊗ 𝟙 X₂) ≫ (𝟙 (𝟙_ C) ⊗ (β_ (𝟙_ C) X₁).hom ⊗ 𝟙 X₂)\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\n| 𝟙 (𝟙_ C) ⊗ (α_ X₁ (𝟙_ C) X₂).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\n| (α_ (𝟙_ C) X₁ (𝟙_ C ⊗ X₂)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\n| (λ_ X₁).hom ⊗ (λ_ X₂).hom\n[PROOFSTEP]\nrw [← tensor_comp, ← tensor_comp, comp_id, comp_id, leftUnitor_inv_braiding]\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\n⊢ (λ_ (X₁ ⊗ X₂)).hom =\n    (((𝟙 (𝟙_ C) ⊗ (ρ_ X₁).inv ⊗ 𝟙 X₂) ≫ (𝟙 (𝟙_ C) ⊗ (α_ X₁ (𝟙_ C) X₂).hom)) ≫ (α_ (𝟙_ C) X₁ (𝟙_ C ⊗ X₂)).inv) ≫\n      ((λ_ X₁).hom ⊗ (λ_ X₂).hom)\n[PROOFSTEP]\nsimp only [assoc]\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\n⊢ (λ_ (X₁ ⊗ X₂)).hom =\n    (𝟙 (𝟙_ C) ⊗ (ρ_ X₁).inv ⊗ 𝟙 X₂) ≫\n      (𝟙 (𝟙_ C) ⊗ (α_ X₁ (𝟙_ C) X₂).hom) ≫ (α_ (𝟙_ C) X₁ (𝟙_ C ⊗ X₂)).inv ≫ ((λ_ X₁).hom ⊗ (λ_ X₂).hom)\n[PROOFSTEP]\ncoherence\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\n⊢ (ρ_ (X₁ ⊗ X₂)).hom = (𝟙 (X₁ ⊗ X₂) ⊗ (λ_ (𝟙_ C)).inv) ≫ tensor_μ C (X₁, X₂) (𝟙_ C, 𝟙_ C) ≫ ((ρ_ X₁).hom ⊗ (ρ_ X₂).hom)\n[PROOFSTEP]\ndsimp [tensor_μ]\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\n⊢ (ρ_ (X₁ ⊗ X₂)).hom =\n    (𝟙 (X₁ ⊗ X₂) ⊗ (λ_ (𝟙_ C)).inv) ≫\n      ((α_ X₁ X₂ (𝟙_ C ⊗ 𝟙_ C)).hom ≫\n          (𝟙 X₁ ⊗ (α_ X₂ (𝟙_ C) (𝟙_ C)).inv) ≫\n            (𝟙 X₁ ⊗ (β_ X₂ (𝟙_ C)).hom ⊗ 𝟙 (𝟙_ C)) ≫\n              (𝟙 X₁ ⊗ (α_ (𝟙_ C) X₂ (𝟙_ C)).hom) ≫ (α_ X₁ (𝟙_ C) (X₂ ⊗ 𝟙_ C)).inv) ≫\n        ((ρ_ X₁).hom ⊗ (ρ_ X₂).hom)\n[PROOFSTEP]\nhave :\n  (𝟙 (X₁ ⊗ X₂) ⊗ (λ_ (𝟙_ C)).inv) ≫ (α_ X₁ X₂ (𝟙_ C ⊗ 𝟙_ C)).hom ≫ (𝟙 X₁ ⊗ (α_ X₂ (𝟙_ C) (𝟙_ C)).inv) =\n    (α_ X₁ X₂ (𝟙_ C)).hom ≫ (𝟙 X₁ ⊗ (ρ_ X₂).inv ⊗ 𝟙 (𝟙_ C)) :=\n  by pure_coherence\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\n⊢ (𝟙 (X₁ ⊗ X₂) ⊗ (λ_ (𝟙_ C)).inv) ≫ (α_ X₁ X₂ (𝟙_ C ⊗ 𝟙_ C)).hom ≫ (𝟙 X₁ ⊗ (α_ X₂ (𝟙_ C) (𝟙_ C)).inv) =\n    (α_ X₁ X₂ (𝟙_ C)).hom ≫ (𝟙 X₁ ⊗ (ρ_ X₂).inv ⊗ 𝟙 (𝟙_ C))\n[PROOFSTEP]\npure_coherence\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\nthis :\n  (𝟙 (X₁ ⊗ X₂) ⊗ (λ_ (𝟙_ C)).inv) ≫ (α_ X₁ X₂ (𝟙_ C ⊗ 𝟙_ C)).hom ≫ (𝟙 X₁ ⊗ (α_ X₂ (𝟙_ C) (𝟙_ C)).inv) =\n    (α_ X₁ X₂ (𝟙_ C)).hom ≫ (𝟙 X₁ ⊗ (ρ_ X₂).inv ⊗ 𝟙 (𝟙_ C))\n⊢ (ρ_ (X₁ ⊗ X₂)).hom =\n    (𝟙 (X₁ ⊗ X₂) ⊗ (λ_ (𝟙_ C)).inv) ≫\n      ((α_ X₁ X₂ (𝟙_ C ⊗ 𝟙_ C)).hom ≫\n          (𝟙 X₁ ⊗ (α_ X₂ (𝟙_ C) (𝟙_ C)).inv) ≫\n            (𝟙 X₁ ⊗ (β_ X₂ (𝟙_ C)).hom ⊗ 𝟙 (𝟙_ C)) ≫\n              (𝟙 X₁ ⊗ (α_ (𝟙_ C) X₂ (𝟙_ C)).hom) ≫ (α_ X₁ (𝟙_ C) (X₂ ⊗ 𝟙_ C)).inv) ≫\n        ((ρ_ X₁).hom ⊗ (ρ_ X₂).hom)\n[PROOFSTEP]\nslice_rhs 1 3 => rw [this]\n[GOAL]\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\nthis :\n  (𝟙 (X₁ ⊗ X₂) ⊗ (λ_ (𝟙_ C)).inv) ≫ (α_ X₁ X₂ (𝟙_ C ⊗ 𝟙_ C)).hom ≫ (𝟙 X₁ ⊗ (α_ X₂ (𝟙_ C) (𝟙_ C)).inv) =\n    (α_ X₁ X₂ (𝟙_ C)).hom ≫ (𝟙 X₁ ⊗ (ρ_ X₂).inv ⊗ 𝟙 (𝟙_ C))\n| (𝟙 (X₁ ⊗ X₂) ⊗ (λ_ (𝟙_ C)).inv) ≫ (α_ X₁ X₂ (𝟙_ C ⊗ 𝟙_ C)).hom ≫ (𝟙 X₁ ⊗ (α_ X₂ (𝟙_ C) (𝟙_ C)).inv)\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\nthis :\n  (𝟙 (X₁ ⊗ X₂) ⊗ (λ_ (𝟙_ C)).inv) ≫ (α_ X₁ X₂ (𝟙_ C ⊗ 𝟙_ C)).hom ≫ (𝟙 X₁ ⊗ (α_ X₂ (𝟙_ C) (𝟙_ C)).inv) =\n    (α_ X₁ X₂ (𝟙_ C)).hom ≫ (𝟙 X₁ ⊗ (ρ_ X₂).inv ⊗ 𝟙 (𝟙_ C))\n| 𝟙 X₁ ⊗ (β_ X₂ (𝟙_ C)).hom ⊗ 𝟙 (𝟙_ C)\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\nthis :\n  (𝟙 (X₁ ⊗ X₂) ⊗ (λ_ (𝟙_ C)).inv) ≫ (α_ X₁ X₂ (𝟙_ C ⊗ 𝟙_ C)).hom ≫ (𝟙 X₁ ⊗ (α_ X₂ (𝟙_ C) (𝟙_ C)).inv) =\n    (α_ X₁ X₂ (𝟙_ C)).hom ≫ (𝟙 X₁ ⊗ (ρ_ X₂).inv ⊗ 𝟙 (𝟙_ C))\n| 𝟙 X₁ ⊗ (α_ (𝟙_ C) X₂ (𝟙_ C)).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\nthis :\n  (𝟙 (X₁ ⊗ X₂) ⊗ (λ_ (𝟙_ C)).inv) ≫ (α_ X₁ X₂ (𝟙_ C ⊗ 𝟙_ C)).hom ≫ (𝟙 X₁ ⊗ (α_ X₂ (𝟙_ C) (𝟙_ C)).inv) =\n    (α_ X₁ X₂ (𝟙_ C)).hom ≫ (𝟙 X₁ ⊗ (ρ_ X₂).inv ⊗ 𝟙 (𝟙_ C))\n| (α_ X₁ (𝟙_ C) (X₂ ⊗ 𝟙_ C)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\nthis :\n  (𝟙 (X₁ ⊗ X₂) ⊗ (λ_ (𝟙_ C)).inv) ≫ (α_ X₁ X₂ (𝟙_ C ⊗ 𝟙_ C)).hom ≫ (𝟙 X₁ ⊗ (α_ X₂ (𝟙_ C) (𝟙_ C)).inv) =\n    (α_ X₁ X₂ (𝟙_ C)).hom ≫ (𝟙 X₁ ⊗ (ρ_ X₂).inv ⊗ 𝟙 (𝟙_ C))\n| (ρ_ X₁).hom ⊗ (ρ_ X₂).hom\n[PROOFSTEP]\nrw [this]\n[GOAL]\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\nthis :\n  (𝟙 (X₁ ⊗ X₂) ⊗ (λ_ (𝟙_ C)).inv) ≫ (α_ X₁ X₂ (𝟙_ C ⊗ 𝟙_ C)).hom ≫ (𝟙 X₁ ⊗ (α_ X₂ (𝟙_ C) (𝟙_ C)).inv) =\n    (α_ X₁ X₂ (𝟙_ C)).hom ≫ (𝟙 X₁ ⊗ (ρ_ X₂).inv ⊗ 𝟙 (𝟙_ C))\n| (𝟙 (X₁ ⊗ X₂) ⊗ (λ_ (𝟙_ C)).inv) ≫ (α_ X₁ X₂ (𝟙_ C ⊗ 𝟙_ C)).hom ≫ (𝟙 X₁ ⊗ (α_ X₂ (𝟙_ C) (𝟙_ C)).inv)\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\nthis :\n  (𝟙 (X₁ ⊗ X₂) ⊗ (λ_ (𝟙_ C)).inv) ≫ (α_ X₁ X₂ (𝟙_ C ⊗ 𝟙_ C)).hom ≫ (𝟙 X₁ ⊗ (α_ X₂ (𝟙_ C) (𝟙_ C)).inv) =\n    (α_ X₁ X₂ (𝟙_ C)).hom ≫ (𝟙 X₁ ⊗ (ρ_ X₂).inv ⊗ 𝟙 (𝟙_ C))\n| 𝟙 X₁ ⊗ (β_ X₂ (𝟙_ C)).hom ⊗ 𝟙 (𝟙_ C)\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\nthis :\n  (𝟙 (X₁ ⊗ X₂) ⊗ (λ_ (𝟙_ C)).inv) ≫ (α_ X₁ X₂ (𝟙_ C ⊗ 𝟙_ C)).hom ≫ (𝟙 X₁ ⊗ (α_ X₂ (𝟙_ C) (𝟙_ C)).inv) =\n    (α_ X₁ X₂ (𝟙_ C)).hom ≫ (𝟙 X₁ ⊗ (ρ_ X₂).inv ⊗ 𝟙 (𝟙_ C))\n| 𝟙 X₁ ⊗ (α_ (𝟙_ C) X₂ (𝟙_ C)).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\nthis :\n  (𝟙 (X₁ ⊗ X₂) ⊗ (λ_ (𝟙_ C)).inv) ≫ (α_ X₁ X₂ (𝟙_ C ⊗ 𝟙_ C)).hom ≫ (𝟙 X₁ ⊗ (α_ X₂ (𝟙_ C) (𝟙_ C)).inv) =\n    (α_ X₁ X₂ (𝟙_ C)).hom ≫ (𝟙 X₁ ⊗ (ρ_ X₂).inv ⊗ 𝟙 (𝟙_ C))\n| (α_ X₁ (𝟙_ C) (X₂ ⊗ 𝟙_ C)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\nthis :\n  (𝟙 (X₁ ⊗ X₂) ⊗ (λ_ (𝟙_ C)).inv) ≫ (α_ X₁ X₂ (𝟙_ C ⊗ 𝟙_ C)).hom ≫ (𝟙 X₁ ⊗ (α_ X₂ (𝟙_ C) (𝟙_ C)).inv) =\n    (α_ X₁ X₂ (𝟙_ C)).hom ≫ (𝟙 X₁ ⊗ (ρ_ X₂).inv ⊗ 𝟙 (𝟙_ C))\n| (ρ_ X₁).hom ⊗ (ρ_ X₂).hom\n[PROOFSTEP]\nrw [this]\n[GOAL]\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\nthis :\n  (𝟙 (X₁ ⊗ X₂) ⊗ (λ_ (𝟙_ C)).inv) ≫ (α_ X₁ X₂ (𝟙_ C ⊗ 𝟙_ C)).hom ≫ (𝟙 X₁ ⊗ (α_ X₂ (𝟙_ C) (𝟙_ C)).inv) =\n    (α_ X₁ X₂ (𝟙_ C)).hom ≫ (𝟙 X₁ ⊗ (ρ_ X₂).inv ⊗ 𝟙 (𝟙_ C))\n| (𝟙 (X₁ ⊗ X₂) ⊗ (λ_ (𝟙_ C)).inv) ≫ (α_ X₁ X₂ (𝟙_ C ⊗ 𝟙_ C)).hom ≫ (𝟙 X₁ ⊗ (α_ X₂ (𝟙_ C) (𝟙_ C)).inv)\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\nthis :\n  (𝟙 (X₁ ⊗ X₂) ⊗ (λ_ (𝟙_ C)).inv) ≫ (α_ X₁ X₂ (𝟙_ C ⊗ 𝟙_ C)).hom ≫ (𝟙 X₁ ⊗ (α_ X₂ (𝟙_ C) (𝟙_ C)).inv) =\n    (α_ X₁ X₂ (𝟙_ C)).hom ≫ (𝟙 X₁ ⊗ (ρ_ X₂).inv ⊗ 𝟙 (𝟙_ C))\n| 𝟙 X₁ ⊗ (β_ X₂ (𝟙_ C)).hom ⊗ 𝟙 (𝟙_ C)\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\nthis :\n  (𝟙 (X₁ ⊗ X₂) ⊗ (λ_ (𝟙_ C)).inv) ≫ (α_ X₁ X₂ (𝟙_ C ⊗ 𝟙_ C)).hom ≫ (𝟙 X₁ ⊗ (α_ X₂ (𝟙_ C) (𝟙_ C)).inv) =\n    (α_ X₁ X₂ (𝟙_ C)).hom ≫ (𝟙 X₁ ⊗ (ρ_ X₂).inv ⊗ 𝟙 (𝟙_ C))\n| 𝟙 X₁ ⊗ (α_ (𝟙_ C) X₂ (𝟙_ C)).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\nthis :\n  (𝟙 (X₁ ⊗ X₂) ⊗ (λ_ (𝟙_ C)).inv) ≫ (α_ X₁ X₂ (𝟙_ C ⊗ 𝟙_ C)).hom ≫ (𝟙 X₁ ⊗ (α_ X₂ (𝟙_ C) (𝟙_ C)).inv) =\n    (α_ X₁ X₂ (𝟙_ C)).hom ≫ (𝟙 X₁ ⊗ (ρ_ X₂).inv ⊗ 𝟙 (𝟙_ C))\n| (α_ X₁ (𝟙_ C) (X₂ ⊗ 𝟙_ C)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\nthis :\n  (𝟙 (X₁ ⊗ X₂) ⊗ (λ_ (𝟙_ C)).inv) ≫ (α_ X₁ X₂ (𝟙_ C ⊗ 𝟙_ C)).hom ≫ (𝟙 X₁ ⊗ (α_ X₂ (𝟙_ C) (𝟙_ C)).inv) =\n    (α_ X₁ X₂ (𝟙_ C)).hom ≫ (𝟙 X₁ ⊗ (ρ_ X₂).inv ⊗ 𝟙 (𝟙_ C))\n| (ρ_ X₁).hom ⊗ (ρ_ X₂).hom\n[PROOFSTEP]\nrw [this]\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\nthis :\n  (𝟙 (X₁ ⊗ X₂) ⊗ (λ_ (𝟙_ C)).inv) ≫ (α_ X₁ X₂ (𝟙_ C ⊗ 𝟙_ C)).hom ≫ (𝟙 X₁ ⊗ (α_ X₂ (𝟙_ C) (𝟙_ C)).inv) =\n    (α_ X₁ X₂ (𝟙_ C)).hom ≫ (𝟙 X₁ ⊗ (ρ_ X₂).inv ⊗ 𝟙 (𝟙_ C))\n⊢ (ρ_ (X₁ ⊗ X₂)).hom =\n    (((((α_ X₁ X₂ (𝟙_ C)).hom ≫ (𝟙 X₁ ⊗ (ρ_ X₂).inv ⊗ 𝟙 (𝟙_ C))) ≫ (𝟙 X₁ ⊗ (β_ X₂ (𝟙_ C)).hom ⊗ 𝟙 (𝟙_ C))) ≫\n          (𝟙 X₁ ⊗ (α_ (𝟙_ C) X₂ (𝟙_ C)).hom)) ≫\n        (α_ X₁ (𝟙_ C) (X₂ ⊗ 𝟙_ C)).inv) ≫\n      ((ρ_ X₁).hom ⊗ (ρ_ X₂).hom)\n[PROOFSTEP]\nclear this\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\n⊢ (ρ_ (X₁ ⊗ X₂)).hom =\n    (((((α_ X₁ X₂ (𝟙_ C)).hom ≫ (𝟙 X₁ ⊗ (ρ_ X₂).inv ⊗ 𝟙 (𝟙_ C))) ≫ (𝟙 X₁ ⊗ (β_ X₂ (𝟙_ C)).hom ⊗ 𝟙 (𝟙_ C))) ≫\n          (𝟙 X₁ ⊗ (α_ (𝟙_ C) X₂ (𝟙_ C)).hom)) ≫\n        (α_ X₁ (𝟙_ C) (X₂ ⊗ 𝟙_ C)).inv) ≫\n      ((ρ_ X₁).hom ⊗ (ρ_ X₂).hom)\n[PROOFSTEP]\nslice_rhs 2 3 => rw [← tensor_comp, ← tensor_comp, comp_id, comp_id, rightUnitor_inv_braiding]\n[GOAL]\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\n| (𝟙 X₁ ⊗ (ρ_ X₂).inv ⊗ 𝟙 (𝟙_ C)) ≫ (𝟙 X₁ ⊗ (β_ X₂ (𝟙_ C)).hom ⊗ 𝟙 (𝟙_ C))\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\n| 𝟙 X₁ ⊗ (α_ (𝟙_ C) X₂ (𝟙_ C)).hom\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\n| (α_ X₁ (𝟙_ C) (X₂ ⊗ 𝟙_ C)).inv\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\n| (ρ_ X₁).hom ⊗ (ρ_ X₂).hom\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\n| (α_ X₁ X₂ (𝟙_ C)).hom\n[PROOFSTEP]\nrw [← tensor_comp, ← tensor_comp, comp_id, comp_id, rightUnitor_inv_braiding]\n[GOAL]\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\n| (𝟙 X₁ ⊗ (ρ_ X₂).inv ⊗ 𝟙 (𝟙_ C)) ≫ (𝟙 X₁ ⊗ (β_ X₂ (𝟙_ C)).hom ⊗ 𝟙 (𝟙_ C))\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\n| 𝟙 X₁ ⊗ (α_ (𝟙_ C) X₂ (𝟙_ C)).hom\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\n| (α_ X₁ (𝟙_ C) (X₂ ⊗ 𝟙_ C)).inv\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\n| (ρ_ X₁).hom ⊗ (ρ_ X₂).hom\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\n| (α_ X₁ X₂ (𝟙_ C)).hom\n[PROOFSTEP]\nrw [← tensor_comp, ← tensor_comp, comp_id, comp_id, rightUnitor_inv_braiding]\n[GOAL]\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\n| (𝟙 X₁ ⊗ (ρ_ X₂).inv ⊗ 𝟙 (𝟙_ C)) ≫ (𝟙 X₁ ⊗ (β_ X₂ (𝟙_ C)).hom ⊗ 𝟙 (𝟙_ C))\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\n| 𝟙 X₁ ⊗ (α_ (𝟙_ C) X₂ (𝟙_ C)).hom\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\n| (α_ X₁ (𝟙_ C) (X₂ ⊗ 𝟙_ C)).inv\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\n| (ρ_ X₁).hom ⊗ (ρ_ X₂).hom\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\n| (α_ X₁ X₂ (𝟙_ C)).hom\n[PROOFSTEP]\nrw [← tensor_comp, ← tensor_comp, comp_id, comp_id, rightUnitor_inv_braiding]\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\n⊢ (ρ_ (X₁ ⊗ X₂)).hom =\n    (α_ X₁ X₂ (𝟙_ C)).hom ≫\n      (((𝟙 X₁ ⊗ (λ_ X₂).inv ⊗ 𝟙 (𝟙_ C)) ≫ (𝟙 X₁ ⊗ (α_ (𝟙_ C) X₂ (𝟙_ C)).hom)) ≫ (α_ X₁ (𝟙_ C) (X₂ ⊗ 𝟙_ C)).inv) ≫\n        ((ρ_ X₁).hom ⊗ (ρ_ X₂).hom)\n[PROOFSTEP]\nsimp only [assoc]\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\n⊢ (ρ_ (X₁ ⊗ X₂)).hom =\n    (α_ X₁ X₂ (𝟙_ C)).hom ≫\n      (𝟙 X₁ ⊗ (λ_ X₂).inv ⊗ 𝟙 (𝟙_ C)) ≫\n        (𝟙 X₁ ⊗ (α_ (𝟙_ C) X₂ (𝟙_ C)).hom) ≫ (α_ X₁ (𝟙_ C) (X₂ ⊗ 𝟙_ C)).inv ≫ ((ρ_ X₁).hom ⊗ (ρ_ X₂).hom)\n[PROOFSTEP]\ncoherence\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n⊢ ((β_ W X).hom ⊗ 𝟙 (Y ⊗ Z)) ≫\n      (α_ X W (Y ⊗ Z)).hom ≫ (𝟙 X ⊗ (α_ W Y Z).inv) ≫ (𝟙 X ⊗ (β_ (W ⊗ Y) Z).hom) ≫ (𝟙 X ⊗ (α_ Z W Y).inv) =\n    (𝟙 (W ⊗ X) ⊗ (β_ Y Z).hom) ≫\n      (α_ (W ⊗ X) Z Y).inv ≫\n        ((α_ W X Z).hom ⊗ 𝟙 Y) ≫ ((β_ W (X ⊗ Z)).hom ⊗ 𝟙 Y) ≫ ((α_ X Z W).hom ⊗ 𝟙 Y) ≫ (α_ X (Z ⊗ W) Y).hom\n[PROOFSTEP]\nslice_rhs 3 5 => rw [← tensor_comp, ← tensor_comp, hexagon_forward, tensor_comp, tensor_comp]\n[GOAL]\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| ((α_ W X Z).hom ⊗ 𝟙 Y) ≫ ((β_ W (X ⊗ Z)).hom ⊗ 𝟙 Y) ≫ ((α_ X Z W).hom ⊗ 𝟙 Y)\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (α_ X (Z ⊗ W) Y).hom\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| 𝟙 (W ⊗ X) ⊗ (β_ Y Z).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (α_ (W ⊗ X) Z Y).inv\n[PROOFSTEP]\nrw [← tensor_comp, ← tensor_comp, hexagon_forward, tensor_comp, tensor_comp]\n[GOAL]\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| ((α_ W X Z).hom ⊗ 𝟙 Y) ≫ ((β_ W (X ⊗ Z)).hom ⊗ 𝟙 Y) ≫ ((α_ X Z W).hom ⊗ 𝟙 Y)\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (α_ X (Z ⊗ W) Y).hom\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| 𝟙 (W ⊗ X) ⊗ (β_ Y Z).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (α_ (W ⊗ X) Z Y).inv\n[PROOFSTEP]\nrw [← tensor_comp, ← tensor_comp, hexagon_forward, tensor_comp, tensor_comp]\n[GOAL]\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| ((α_ W X Z).hom ⊗ 𝟙 Y) ≫ ((β_ W (X ⊗ Z)).hom ⊗ 𝟙 Y) ≫ ((α_ X Z W).hom ⊗ 𝟙 Y)\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (α_ X (Z ⊗ W) Y).hom\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| 𝟙 (W ⊗ X) ⊗ (β_ Y Z).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (α_ (W ⊗ X) Z Y).inv\n[PROOFSTEP]\nrw [← tensor_comp, ← tensor_comp, hexagon_forward, tensor_comp, tensor_comp]\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n⊢ ((β_ W X).hom ⊗ 𝟙 (Y ⊗ Z)) ≫\n      (α_ X W (Y ⊗ Z)).hom ≫ (𝟙 X ⊗ (α_ W Y Z).inv) ≫ (𝟙 X ⊗ (β_ (W ⊗ Y) Z).hom) ≫ (𝟙 X ⊗ (α_ Z W Y).inv) =\n    (𝟙 (W ⊗ X) ⊗ (β_ Y Z).hom) ≫\n      (α_ (W ⊗ X) Z Y).inv ≫\n        ((((β_ W X).hom ⊗ 𝟙 Z) ⊗ 𝟙 Y) ≫ ((α_ X W Z).hom ⊗ 𝟙 Y) ≫ ((𝟙 X ⊗ (β_ W Z).hom) ⊗ 𝟙 Y)) ≫ (α_ X (Z ⊗ W) Y).hom\n[PROOFSTEP]\nslice_rhs 5 6 => rw [associator_naturality]\n[GOAL]\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| ((𝟙 X ⊗ (β_ W Z).hom) ⊗ 𝟙 Y) ≫ (α_ X (Z ⊗ W) Y).hom\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| 𝟙 (W ⊗ X) ⊗ (β_ Y Z).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (α_ (W ⊗ X) Z Y).inv\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| ((β_ W X).hom ⊗ 𝟙 Z) ⊗ 𝟙 Y\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (α_ X W Z).hom ⊗ 𝟙 Y\n[PROOFSTEP]\nrw [associator_naturality]\n[GOAL]\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| ((𝟙 X ⊗ (β_ W Z).hom) ⊗ 𝟙 Y) ≫ (α_ X (Z ⊗ W) Y).hom\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| 𝟙 (W ⊗ X) ⊗ (β_ Y Z).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (α_ (W ⊗ X) Z Y).inv\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| ((β_ W X).hom ⊗ 𝟙 Z) ⊗ 𝟙 Y\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (α_ X W Z).hom ⊗ 𝟙 Y\n[PROOFSTEP]\nrw [associator_naturality]\n[GOAL]\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| ((𝟙 X ⊗ (β_ W Z).hom) ⊗ 𝟙 Y) ≫ (α_ X (Z ⊗ W) Y).hom\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| 𝟙 (W ⊗ X) ⊗ (β_ Y Z).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (α_ (W ⊗ X) Z Y).inv\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| ((β_ W X).hom ⊗ 𝟙 Z) ⊗ 𝟙 Y\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (α_ X W Z).hom ⊗ 𝟙 Y\n[PROOFSTEP]\nrw [associator_naturality]\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n⊢ ((β_ W X).hom ⊗ 𝟙 (Y ⊗ Z)) ≫\n      (α_ X W (Y ⊗ Z)).hom ≫ (𝟙 X ⊗ (α_ W Y Z).inv) ≫ (𝟙 X ⊗ (β_ (W ⊗ Y) Z).hom) ≫ (𝟙 X ⊗ (α_ Z W Y).inv) =\n    (𝟙 (W ⊗ X) ⊗ (β_ Y Z).hom) ≫\n      (α_ (W ⊗ X) Z Y).inv ≫\n        (((β_ W X).hom ⊗ 𝟙 Z) ⊗ 𝟙 Y) ≫ ((α_ X W Z).hom ⊗ 𝟙 Y) ≫ (α_ X (W ⊗ Z) Y).hom ≫ (𝟙 X ⊗ (β_ W Z).hom ⊗ 𝟙 Y)\n[PROOFSTEP]\nslice_rhs 2 3 => rw [← associator_inv_naturality]\n[GOAL]\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (α_ (W ⊗ X) Z Y).inv ≫ (((β_ W X).hom ⊗ 𝟙 Z) ⊗ 𝟙 Y)\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (α_ X W Z).hom ⊗ 𝟙 Y\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (α_ X (W ⊗ Z) Y).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| 𝟙 X ⊗ (β_ W Z).hom ⊗ 𝟙 Y\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| 𝟙 (W ⊗ X) ⊗ (β_ Y Z).hom\n[PROOFSTEP]\nrw [← associator_inv_naturality]\n[GOAL]\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (α_ (W ⊗ X) Z Y).inv ≫ (((β_ W X).hom ⊗ 𝟙 Z) ⊗ 𝟙 Y)\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (α_ X W Z).hom ⊗ 𝟙 Y\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (α_ X (W ⊗ Z) Y).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| 𝟙 X ⊗ (β_ W Z).hom ⊗ 𝟙 Y\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| 𝟙 (W ⊗ X) ⊗ (β_ Y Z).hom\n[PROOFSTEP]\nrw [← associator_inv_naturality]\n[GOAL]\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (α_ (W ⊗ X) Z Y).inv ≫ (((β_ W X).hom ⊗ 𝟙 Z) ⊗ 𝟙 Y)\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (α_ X W Z).hom ⊗ 𝟙 Y\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (α_ X (W ⊗ Z) Y).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| 𝟙 X ⊗ (β_ W Z).hom ⊗ 𝟙 Y\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| 𝟙 (W ⊗ X) ⊗ (β_ Y Z).hom\n[PROOFSTEP]\nrw [← associator_inv_naturality]\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n⊢ ((β_ W X).hom ⊗ 𝟙 (Y ⊗ Z)) ≫\n      (α_ X W (Y ⊗ Z)).hom ≫ (𝟙 X ⊗ (α_ W Y Z).inv) ≫ (𝟙 X ⊗ (β_ (W ⊗ Y) Z).hom) ≫ (𝟙 X ⊗ (α_ Z W Y).inv) =\n    (𝟙 (W ⊗ X) ⊗ (β_ Y Z).hom) ≫\n      (((((β_ W X).hom ⊗ 𝟙 Z ⊗ 𝟙 Y) ≫ (α_ (X ⊗ W) Z Y).inv) ≫ ((α_ X W Z).hom ⊗ 𝟙 Y)) ≫ (α_ X (W ⊗ Z) Y).hom) ≫\n        (𝟙 X ⊗ (β_ W Z).hom ⊗ 𝟙 Y)\n[PROOFSTEP]\nslice_rhs 3 5 => rw [← pentagon_hom_inv]\n[GOAL]\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (α_ (X ⊗ W) Z Y).inv ≫ ((α_ X W Z).hom ⊗ 𝟙 Y) ≫ (α_ X (W ⊗ Z) Y).hom\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| 𝟙 X ⊗ (β_ W Z).hom ⊗ 𝟙 Y\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| 𝟙 (W ⊗ X) ⊗ (β_ Y Z).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (β_ W X).hom ⊗ 𝟙 Z ⊗ 𝟙 Y\n[PROOFSTEP]\nrw [← pentagon_hom_inv]\n[GOAL]\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (α_ (X ⊗ W) Z Y).inv ≫ ((α_ X W Z).hom ⊗ 𝟙 Y) ≫ (α_ X (W ⊗ Z) Y).hom\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| 𝟙 X ⊗ (β_ W Z).hom ⊗ 𝟙 Y\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| 𝟙 (W ⊗ X) ⊗ (β_ Y Z).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (β_ W X).hom ⊗ 𝟙 Z ⊗ 𝟙 Y\n[PROOFSTEP]\nrw [← pentagon_hom_inv]\n[GOAL]\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (α_ (X ⊗ W) Z Y).inv ≫ ((α_ X W Z).hom ⊗ 𝟙 Y) ≫ (α_ X (W ⊗ Z) Y).hom\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| 𝟙 X ⊗ (β_ W Z).hom ⊗ 𝟙 Y\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| 𝟙 (W ⊗ X) ⊗ (β_ Y Z).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (β_ W X).hom ⊗ 𝟙 Z ⊗ 𝟙 Y\n[PROOFSTEP]\nrw [← pentagon_hom_inv]\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n⊢ ((β_ W X).hom ⊗ 𝟙 (Y ⊗ Z)) ≫\n      (α_ X W (Y ⊗ Z)).hom ≫ (𝟙 X ⊗ (α_ W Y Z).inv) ≫ (𝟙 X ⊗ (β_ (W ⊗ Y) Z).hom) ≫ (𝟙 X ⊗ (α_ Z W Y).inv) =\n    (𝟙 (W ⊗ X) ⊗ (β_ Y Z).hom) ≫\n      ((β_ W X).hom ⊗ 𝟙 Z ⊗ 𝟙 Y) ≫ ((α_ X W (Z ⊗ Y)).hom ≫ (𝟙 X ⊗ (α_ W Z Y).inv)) ≫ (𝟙 X ⊗ (β_ W Z).hom ⊗ 𝟙 Y)\n[PROOFSTEP]\nslice_rhs 1 2 => rw [tensor_id, id_tensor_comp_tensor_id, ← tensor_id_comp_id_tensor]\n[GOAL]\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (𝟙 (W ⊗ X) ⊗ (β_ Y Z).hom) ≫ ((β_ W X).hom ⊗ 𝟙 Z ⊗ 𝟙 Y)\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (α_ X W (Z ⊗ Y)).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| 𝟙 X ⊗ (α_ W Z Y).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| 𝟙 X ⊗ (β_ W Z).hom ⊗ 𝟙 Y\n[PROOFSTEP]\nrw [tensor_id, id_tensor_comp_tensor_id, ← tensor_id_comp_id_tensor]\n[GOAL]\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (𝟙 (W ⊗ X) ⊗ (β_ Y Z).hom) ≫ ((β_ W X).hom ⊗ 𝟙 Z ⊗ 𝟙 Y)\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (α_ X W (Z ⊗ Y)).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| 𝟙 X ⊗ (α_ W Z Y).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| 𝟙 X ⊗ (β_ W Z).hom ⊗ 𝟙 Y\n[PROOFSTEP]\nrw [tensor_id, id_tensor_comp_tensor_id, ← tensor_id_comp_id_tensor]\n[GOAL]\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (𝟙 (W ⊗ X) ⊗ (β_ Y Z).hom) ≫ ((β_ W X).hom ⊗ 𝟙 Z ⊗ 𝟙 Y)\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (α_ X W (Z ⊗ Y)).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| 𝟙 X ⊗ (α_ W Z Y).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| 𝟙 X ⊗ (β_ W Z).hom ⊗ 𝟙 Y\n[PROOFSTEP]\nrw [tensor_id, id_tensor_comp_tensor_id, ← tensor_id_comp_id_tensor]\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n⊢ ((β_ W X).hom ⊗ 𝟙 (Y ⊗ Z)) ≫\n      (α_ X W (Y ⊗ Z)).hom ≫ (𝟙 X ⊗ (α_ W Y Z).inv) ≫ (𝟙 X ⊗ (β_ (W ⊗ Y) Z).hom) ≫ (𝟙 X ⊗ (α_ Z W Y).inv) =\n    (((((β_ W X).hom ⊗ 𝟙 (Y ⊗ Z)) ≫ (𝟙 (X ⊗ W) ⊗ (β_ Y Z).hom)) ≫ (α_ X W (Z ⊗ Y)).hom) ≫ (𝟙 X ⊗ (α_ W Z Y).inv)) ≫\n      (𝟙 X ⊗ (β_ W Z).hom ⊗ 𝟙 Y)\n[PROOFSTEP]\nslice_rhs 2 3 => rw [← tensor_id, associator_naturality]\n[GOAL]\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (𝟙 (X ⊗ W) ⊗ (β_ Y Z).hom) ≫ (α_ X W (Z ⊗ Y)).hom\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| 𝟙 X ⊗ (α_ W Z Y).inv\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| 𝟙 X ⊗ (β_ W Z).hom ⊗ 𝟙 Y\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (β_ W X).hom ⊗ 𝟙 (Y ⊗ Z)\n[PROOFSTEP]\nrw [← tensor_id, associator_naturality]\n[GOAL]\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (𝟙 (X ⊗ W) ⊗ (β_ Y Z).hom) ≫ (α_ X W (Z ⊗ Y)).hom\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| 𝟙 X ⊗ (α_ W Z Y).inv\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| 𝟙 X ⊗ (β_ W Z).hom ⊗ 𝟙 Y\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (β_ W X).hom ⊗ 𝟙 (Y ⊗ Z)\n[PROOFSTEP]\nrw [← tensor_id, associator_naturality]\n[GOAL]\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (𝟙 (X ⊗ W) ⊗ (β_ Y Z).hom) ≫ (α_ X W (Z ⊗ Y)).hom\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| 𝟙 X ⊗ (α_ W Z Y).inv\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| 𝟙 X ⊗ (β_ W Z).hom ⊗ 𝟙 Y\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (β_ W X).hom ⊗ 𝟙 (Y ⊗ Z)\n[PROOFSTEP]\nrw [← tensor_id, associator_naturality]\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n⊢ ((β_ W X).hom ⊗ 𝟙 (Y ⊗ Z)) ≫\n      (α_ X W (Y ⊗ Z)).hom ≫ (𝟙 X ⊗ (α_ W Y Z).inv) ≫ (𝟙 X ⊗ (β_ (W ⊗ Y) Z).hom) ≫ (𝟙 X ⊗ (α_ Z W Y).inv) =\n    ((β_ W X).hom ⊗ 𝟙 (Y ⊗ Z)) ≫\n      (((α_ X W (Y ⊗ Z)).hom ≫ (𝟙 X ⊗ 𝟙 W ⊗ (β_ Y Z).hom)) ≫ (𝟙 X ⊗ (α_ W Z Y).inv)) ≫ (𝟙 X ⊗ (β_ W Z).hom ⊗ 𝟙 Y)\n[PROOFSTEP]\nslice_rhs 3 5 => rw [← tensor_comp, ← tensor_comp, ← hexagon_reverse, tensor_comp, tensor_comp]\n[GOAL]\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (𝟙 X ⊗ 𝟙 W ⊗ (β_ Y Z).hom) ≫ (𝟙 X ⊗ (α_ W Z Y).inv) ≫ (𝟙 X ⊗ (β_ W Z).hom ⊗ 𝟙 Y)\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (β_ W X).hom ⊗ 𝟙 (Y ⊗ Z)\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (α_ X W (Y ⊗ Z)).hom\n[PROOFSTEP]\nrw [← tensor_comp, ← tensor_comp, ← hexagon_reverse, tensor_comp, tensor_comp]\n[GOAL]\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (𝟙 X ⊗ 𝟙 W ⊗ (β_ Y Z).hom) ≫ (𝟙 X ⊗ (α_ W Z Y).inv) ≫ (𝟙 X ⊗ (β_ W Z).hom ⊗ 𝟙 Y)\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (β_ W X).hom ⊗ 𝟙 (Y ⊗ Z)\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (α_ X W (Y ⊗ Z)).hom\n[PROOFSTEP]\nrw [← tensor_comp, ← tensor_comp, ← hexagon_reverse, tensor_comp, tensor_comp]\n[GOAL]\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (𝟙 X ⊗ 𝟙 W ⊗ (β_ Y Z).hom) ≫ (𝟙 X ⊗ (α_ W Z Y).inv) ≫ (𝟙 X ⊗ (β_ W Z).hom ⊗ 𝟙 Y)\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (β_ W X).hom ⊗ 𝟙 (Y ⊗ Z)\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (α_ X W (Y ⊗ Z)).hom\n[PROOFSTEP]\nrw [← tensor_comp, ← tensor_comp, ← hexagon_reverse, tensor_comp, tensor_comp]\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n⊢ (tensor_μ C (X₁, X₂) (Y₁, Y₂) ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n      tensor_μ C (X₁ ⊗ Y₁, X₂ ⊗ Y₂) (Z₁, Z₂) ≫ ((α_ X₁ Y₁ Z₁).hom ⊗ (α_ X₂ Y₂ Z₂).hom) =\n    (α_ (X₁ ⊗ X₂) (Y₁ ⊗ Y₂) (Z₁ ⊗ Z₂)).hom ≫\n      (𝟙 (X₁ ⊗ X₂) ⊗ tensor_μ C (Y₁, Y₂) (Z₁, Z₂)) ≫ tensor_μ C (X₁, X₂) (Y₁ ⊗ Z₁, Y₂ ⊗ Z₂)\n[PROOFSTEP]\nhave :\n  (α_ X₁ Y₁ Z₁).hom ⊗ (α_ X₂ Y₂ Z₂).hom =\n    (α_ (X₁ ⊗ Y₁) Z₁ ((X₂ ⊗ Y₂) ⊗ Z₂)).hom ≫\n      (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ Z₁ (X₂ ⊗ Y₂) Z₂).inv) ≫\n        (α_ X₁ Y₁ ((Z₁ ⊗ X₂ ⊗ Y₂) ⊗ Z₂)).hom ≫\n          (𝟙 X₁ ⊗ (α_ Y₁ (Z₁ ⊗ X₂ ⊗ Y₂) Z₂).inv) ≫\n            (α_ X₁ (Y₁ ⊗ Z₁ ⊗ X₂ ⊗ Y₂) Z₂).inv ≫\n              ((𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ Z₁ X₂ Y₂).inv) ⊗ 𝟙 Z₂) ≫\n                ((𝟙 X₁ ⊗ (α_ Y₁ (Z₁ ⊗ X₂) Y₂).inv) ⊗ 𝟙 Z₂) ≫\n                  ((𝟙 X₁ ⊗ (α_ Y₁ Z₁ X₂).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂) ≫\n                    (α_ X₁ (((Y₁ ⊗ Z₁) ⊗ X₂) ⊗ Y₂) Z₂).hom ≫\n                      (𝟙 X₁ ⊗ (α_ ((Y₁ ⊗ Z₁) ⊗ X₂) Y₂ Z₂).hom) ≫\n                        (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ Z₁) X₂ (Y₂ ⊗ Z₂)).hom) ≫ (α_ X₁ (Y₁ ⊗ Z₁) (X₂ ⊗ Y₂ ⊗ Z₂)).inv :=\n  by pure_coherence\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n⊢ (α_ X₁ Y₁ Z₁).hom ⊗ (α_ X₂ Y₂ Z₂).hom =\n    (α_ (X₁ ⊗ Y₁) Z₁ ((X₂ ⊗ Y₂) ⊗ Z₂)).hom ≫\n      (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ Z₁ (X₂ ⊗ Y₂) Z₂).inv) ≫\n        (α_ X₁ Y₁ ((Z₁ ⊗ X₂ ⊗ Y₂) ⊗ Z₂)).hom ≫\n          (𝟙 X₁ ⊗ (α_ Y₁ (Z₁ ⊗ X₂ ⊗ Y₂) Z₂).inv) ≫\n            (α_ X₁ (Y₁ ⊗ Z₁ ⊗ X₂ ⊗ Y₂) Z₂).inv ≫\n              ((𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ Z₁ X₂ Y₂).inv) ⊗ 𝟙 Z₂) ≫\n                ((𝟙 X₁ ⊗ (α_ Y₁ (Z₁ ⊗ X₂) Y₂).inv) ⊗ 𝟙 Z₂) ≫\n                  ((𝟙 X₁ ⊗ (α_ Y₁ Z₁ X₂).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂) ≫\n                    (α_ X₁ (((Y₁ ⊗ Z₁) ⊗ X₂) ⊗ Y₂) Z₂).hom ≫\n                      (𝟙 X₁ ⊗ (α_ ((Y₁ ⊗ Z₁) ⊗ X₂) Y₂ Z₂).hom) ≫\n                        (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ Z₁) X₂ (Y₂ ⊗ Z₂)).hom) ≫ (α_ X₁ (Y₁ ⊗ Z₁) (X₂ ⊗ Y₂ ⊗ Z₂)).inv\n[PROOFSTEP]\npure_coherence\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\nthis :\n  (α_ X₁ Y₁ Z₁).hom ⊗ (α_ X₂ Y₂ Z₂).hom =\n    (α_ (X₁ ⊗ Y₁) Z₁ ((X₂ ⊗ Y₂) ⊗ Z₂)).hom ≫\n      (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ Z₁ (X₂ ⊗ Y₂) Z₂).inv) ≫\n        (α_ X₁ Y₁ ((Z₁ ⊗ X₂ ⊗ Y₂) ⊗ Z₂)).hom ≫\n          (𝟙 X₁ ⊗ (α_ Y₁ (Z₁ ⊗ X₂ ⊗ Y₂) Z₂).inv) ≫\n            (α_ X₁ (Y₁ ⊗ Z₁ ⊗ X₂ ⊗ Y₂) Z₂).inv ≫\n              ((𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ Z₁ X₂ Y₂).inv) ⊗ 𝟙 Z₂) ≫\n                ((𝟙 X₁ ⊗ (α_ Y₁ (Z₁ ⊗ X₂) Y₂).inv) ⊗ 𝟙 Z₂) ≫\n                  ((𝟙 X₁ ⊗ (α_ Y₁ Z₁ X₂).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂) ≫\n                    (α_ X₁ (((Y₁ ⊗ Z₁) ⊗ X₂) ⊗ Y₂) Z₂).hom ≫\n                      (𝟙 X₁ ⊗ (α_ ((Y₁ ⊗ Z₁) ⊗ X₂) Y₂ Z₂).hom) ≫\n                        (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ Z₁) X₂ (Y₂ ⊗ Z₂)).hom) ≫ (α_ X₁ (Y₁ ⊗ Z₁) (X₂ ⊗ Y₂ ⊗ Z₂)).inv\n⊢ (tensor_μ C (X₁, X₂) (Y₁, Y₂) ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n      tensor_μ C (X₁ ⊗ Y₁, X₂ ⊗ Y₂) (Z₁, Z₂) ≫ ((α_ X₁ Y₁ Z₁).hom ⊗ (α_ X₂ Y₂ Z₂).hom) =\n    (α_ (X₁ ⊗ X₂) (Y₁ ⊗ Y₂) (Z₁ ⊗ Z₂)).hom ≫\n      (𝟙 (X₁ ⊗ X₂) ⊗ tensor_μ C (Y₁, Y₂) (Z₁, Z₂)) ≫ tensor_μ C (X₁, X₂) (Y₁ ⊗ Z₁, Y₂ ⊗ Z₂)\n[PROOFSTEP]\nrw [this]\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\nthis :\n  (α_ X₁ Y₁ Z₁).hom ⊗ (α_ X₂ Y₂ Z₂).hom =\n    (α_ (X₁ ⊗ Y₁) Z₁ ((X₂ ⊗ Y₂) ⊗ Z₂)).hom ≫\n      (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ Z₁ (X₂ ⊗ Y₂) Z₂).inv) ≫\n        (α_ X₁ Y₁ ((Z₁ ⊗ X₂ ⊗ Y₂) ⊗ Z₂)).hom ≫\n          (𝟙 X₁ ⊗ (α_ Y₁ (Z₁ ⊗ X₂ ⊗ Y₂) Z₂).inv) ≫\n            (α_ X₁ (Y₁ ⊗ Z₁ ⊗ X₂ ⊗ Y₂) Z₂).inv ≫\n              ((𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ Z₁ X₂ Y₂).inv) ⊗ 𝟙 Z₂) ≫\n                ((𝟙 X₁ ⊗ (α_ Y₁ (Z₁ ⊗ X₂) Y₂).inv) ⊗ 𝟙 Z₂) ≫\n                  ((𝟙 X₁ ⊗ (α_ Y₁ Z₁ X₂).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂) ≫\n                    (α_ X₁ (((Y₁ ⊗ Z₁) ⊗ X₂) ⊗ Y₂) Z₂).hom ≫\n                      (𝟙 X₁ ⊗ (α_ ((Y₁ ⊗ Z₁) ⊗ X₂) Y₂ Z₂).hom) ≫\n                        (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ Z₁) X₂ (Y₂ ⊗ Z₂)).hom) ≫ (α_ X₁ (Y₁ ⊗ Z₁) (X₂ ⊗ Y₂ ⊗ Z₂)).inv\n⊢ (tensor_μ C (X₁, X₂) (Y₁, Y₂) ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n      tensor_μ C (X₁ ⊗ Y₁, X₂ ⊗ Y₂) (Z₁, Z₂) ≫\n        (α_ (X₁ ⊗ Y₁) Z₁ ((X₂ ⊗ Y₂) ⊗ Z₂)).hom ≫\n          (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ Z₁ (X₂ ⊗ Y₂) Z₂).inv) ≫\n            (α_ X₁ Y₁ ((Z₁ ⊗ X₂ ⊗ Y₂) ⊗ Z₂)).hom ≫\n              (𝟙 X₁ ⊗ (α_ Y₁ (Z₁ ⊗ X₂ ⊗ Y₂) Z₂).inv) ≫\n                (α_ X₁ (Y₁ ⊗ Z₁ ⊗ X₂ ⊗ Y₂) Z₂).inv ≫\n                  ((𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ Z₁ X₂ Y₂).inv) ⊗ 𝟙 Z₂) ≫\n                    ((𝟙 X₁ ⊗ (α_ Y₁ (Z₁ ⊗ X₂) Y₂).inv) ⊗ 𝟙 Z₂) ≫\n                      ((𝟙 X₁ ⊗ (α_ Y₁ Z₁ X₂).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂) ≫\n                        (α_ X₁ (((Y₁ ⊗ Z₁) ⊗ X₂) ⊗ Y₂) Z₂).hom ≫\n                          (𝟙 X₁ ⊗ (α_ ((Y₁ ⊗ Z₁) ⊗ X₂) Y₂ Z₂).hom) ≫\n                            (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ Z₁) X₂ (Y₂ ⊗ Z₂)).hom) ≫ (α_ X₁ (Y₁ ⊗ Z₁) (X₂ ⊗ Y₂ ⊗ Z₂)).inv =\n    (α_ (X₁ ⊗ X₂) (Y₁ ⊗ Y₂) (Z₁ ⊗ Z₂)).hom ≫\n      (𝟙 (X₁ ⊗ X₂) ⊗ tensor_μ C (Y₁, Y₂) (Z₁, Z₂)) ≫ tensor_μ C (X₁, X₂) (Y₁ ⊗ Z₁, Y₂ ⊗ Z₂)\n[PROOFSTEP]\nclear this\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n⊢ (tensor_μ C (X₁, X₂) (Y₁, Y₂) ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n      tensor_μ C (X₁ ⊗ Y₁, X₂ ⊗ Y₂) (Z₁, Z₂) ≫\n        (α_ (X₁ ⊗ Y₁) Z₁ ((X₂ ⊗ Y₂) ⊗ Z₂)).hom ≫\n          (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ Z₁ (X₂ ⊗ Y₂) Z₂).inv) ≫\n            (α_ X₁ Y₁ ((Z₁ ⊗ X₂ ⊗ Y₂) ⊗ Z₂)).hom ≫\n              (𝟙 X₁ ⊗ (α_ Y₁ (Z₁ ⊗ X₂ ⊗ Y₂) Z₂).inv) ≫\n                (α_ X₁ (Y₁ ⊗ Z₁ ⊗ X₂ ⊗ Y₂) Z₂).inv ≫\n                  ((𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ Z₁ X₂ Y₂).inv) ⊗ 𝟙 Z₂) ≫\n                    ((𝟙 X₁ ⊗ (α_ Y₁ (Z₁ ⊗ X₂) Y₂).inv) ⊗ 𝟙 Z₂) ≫\n                      ((𝟙 X₁ ⊗ (α_ Y₁ Z₁ X₂).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂) ≫\n                        (α_ X₁ (((Y₁ ⊗ Z₁) ⊗ X₂) ⊗ Y₂) Z₂).hom ≫\n                          (𝟙 X₁ ⊗ (α_ ((Y₁ ⊗ Z₁) ⊗ X₂) Y₂ Z₂).hom) ≫\n                            (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ Z₁) X₂ (Y₂ ⊗ Z₂)).hom) ≫ (α_ X₁ (Y₁ ⊗ Z₁) (X₂ ⊗ Y₂ ⊗ Z₂)).inv =\n    (α_ (X₁ ⊗ X₂) (Y₁ ⊗ Y₂) (Z₁ ⊗ Z₂)).hom ≫\n      (𝟙 (X₁ ⊗ X₂) ⊗ tensor_μ C (Y₁, Y₂) (Z₁, Z₂)) ≫ tensor_μ C (X₁, X₂) (Y₁ ⊗ Z₁, Y₂ ⊗ Z₂)\n[PROOFSTEP]\nslice_lhs 2 4 => rw [tensor_μ_def₁]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| tensor_μ C (X₁ ⊗ Y₁, X₂ ⊗ Y₂) (Z₁, Z₂) ≫\n    (α_ (X₁ ⊗ Y₁) Z₁ ((X₂ ⊗ Y₂) ⊗ Z₂)).hom ≫ (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ Z₁ (X₂ ⊗ Y₂) Z₂).inv)\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ Y₁ ((Z₁ ⊗ X₂ ⊗ Y₂) ⊗ Z₂)).hom\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ Y₁ (Z₁ ⊗ X₂ ⊗ Y₂) Z₂).inv\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ (Y₁ ⊗ Z₁ ⊗ X₂ ⊗ Y₂) Z₂).inv\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ Z₁ X₂ Y₂).inv) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ Y₁ (Z₁ ⊗ X₂) Y₂).inv) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ Y₁ Z₁ X₂).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ (((Y₁ ⊗ Z₁) ⊗ X₂) ⊗ Y₂) Z₂).hom\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ ((Y₁ ⊗ Z₁) ⊗ X₂) Y₂ Z₂).hom\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ (Y₁ ⊗ Z₁) X₂ (Y₂ ⊗ Z₂)).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ (Y₁ ⊗ Z₁) (X₂ ⊗ Y₂ ⊗ Z₂)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| tensor_μ C (X₁, X₂) (Y₁, Y₂) ⊗ 𝟙 (Z₁ ⊗ Z₂)\n[PROOFSTEP]\nrw [tensor_μ_def₁]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| tensor_μ C (X₁ ⊗ Y₁, X₂ ⊗ Y₂) (Z₁, Z₂) ≫\n    (α_ (X₁ ⊗ Y₁) Z₁ ((X₂ ⊗ Y₂) ⊗ Z₂)).hom ≫ (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ Z₁ (X₂ ⊗ Y₂) Z₂).inv)\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ Y₁ ((Z₁ ⊗ X₂ ⊗ Y₂) ⊗ Z₂)).hom\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ Y₁ (Z₁ ⊗ X₂ ⊗ Y₂) Z₂).inv\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ (Y₁ ⊗ Z₁ ⊗ X₂ ⊗ Y₂) Z₂).inv\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ Z₁ X₂ Y₂).inv) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ Y₁ (Z₁ ⊗ X₂) Y₂).inv) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ Y₁ Z₁ X₂).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ (((Y₁ ⊗ Z₁) ⊗ X₂) ⊗ Y₂) Z₂).hom\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ ((Y₁ ⊗ Z₁) ⊗ X₂) Y₂ Z₂).hom\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ (Y₁ ⊗ Z₁) X₂ (Y₂ ⊗ Z₂)).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ (Y₁ ⊗ Z₁) (X₂ ⊗ Y₂ ⊗ Z₂)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| tensor_μ C (X₁, X₂) (Y₁, Y₂) ⊗ 𝟙 (Z₁ ⊗ Z₂)\n[PROOFSTEP]\nrw [tensor_μ_def₁]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| tensor_μ C (X₁ ⊗ Y₁, X₂ ⊗ Y₂) (Z₁, Z₂) ≫\n    (α_ (X₁ ⊗ Y₁) Z₁ ((X₂ ⊗ Y₂) ⊗ Z₂)).hom ≫ (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ Z₁ (X₂ ⊗ Y₂) Z₂).inv)\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ Y₁ ((Z₁ ⊗ X₂ ⊗ Y₂) ⊗ Z₂)).hom\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ Y₁ (Z₁ ⊗ X₂ ⊗ Y₂) Z₂).inv\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ (Y₁ ⊗ Z₁ ⊗ X₂ ⊗ Y₂) Z₂).inv\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ Z₁ X₂ Y₂).inv) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ Y₁ (Z₁ ⊗ X₂) Y₂).inv) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ Y₁ Z₁ X₂).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ (((Y₁ ⊗ Z₁) ⊗ X₂) ⊗ Y₂) Z₂).hom\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ ((Y₁ ⊗ Z₁) ⊗ X₂) Y₂ Z₂).hom\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ (Y₁ ⊗ Z₁) X₂ (Y₂ ⊗ Z₂)).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ (Y₁ ⊗ Z₁) (X₂ ⊗ Y₂ ⊗ Z₂)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| tensor_μ C (X₁, X₂) (Y₁, Y₂) ⊗ 𝟙 (Z₁ ⊗ Z₂)\n[PROOFSTEP]\nrw [tensor_μ_def₁]\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n⊢ (tensor_μ C (X₁, X₂) (Y₁, Y₂) ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n      (((((((((((α_ (X₁ ⊗ Y₁) (X₂ ⊗ Y₂) (Z₁ ⊗ Z₂)).hom ≫\n                            (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ (X₂ ⊗ Y₂) Z₁ Z₂).inv) ≫ (𝟙 (X₁ ⊗ Y₁) ⊗ (β_ (X₂ ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂)) ≫\n                          (α_ X₁ Y₁ ((Z₁ ⊗ X₂ ⊗ Y₂) ⊗ Z₂)).hom) ≫\n                        (𝟙 X₁ ⊗ (α_ Y₁ (Z₁ ⊗ X₂ ⊗ Y₂) Z₂).inv)) ≫\n                      (α_ X₁ (Y₁ ⊗ Z₁ ⊗ X₂ ⊗ Y₂) Z₂).inv) ≫\n                    ((𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ Z₁ X₂ Y₂).inv) ⊗ 𝟙 Z₂)) ≫\n                  ((𝟙 X₁ ⊗ (α_ Y₁ (Z₁ ⊗ X₂) Y₂).inv) ⊗ 𝟙 Z₂)) ≫\n                ((𝟙 X₁ ⊗ (α_ Y₁ Z₁ X₂).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂)) ≫\n              (α_ X₁ (((Y₁ ⊗ Z₁) ⊗ X₂) ⊗ Y₂) Z₂).hom) ≫\n            (𝟙 X₁ ⊗ (α_ ((Y₁ ⊗ Z₁) ⊗ X₂) Y₂ Z₂).hom)) ≫\n          (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ Z₁) X₂ (Y₂ ⊗ Z₂)).hom)) ≫\n        (α_ X₁ (Y₁ ⊗ Z₁) (X₂ ⊗ Y₂ ⊗ Z₂)).inv =\n    (α_ (X₁ ⊗ X₂) (Y₁ ⊗ Y₂) (Z₁ ⊗ Z₂)).hom ≫\n      (𝟙 (X₁ ⊗ X₂) ⊗ tensor_μ C (Y₁, Y₂) (Z₁, Z₂)) ≫ tensor_μ C (X₁, X₂) (Y₁ ⊗ Z₁, Y₂ ⊗ Z₂)\n[PROOFSTEP]\nslice_lhs 4 5 => rw [← tensor_id, associator_naturality]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 (X₁ ⊗ Y₁) ⊗ (β_ (X₂ ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂) ≫ (α_ X₁ Y₁ ((Z₁ ⊗ X₂ ⊗ Y₂) ⊗ Z₂)).hom\ncase a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ Y₁ (Z₁ ⊗ X₂ ⊗ Y₂) Z₂).inv\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ (Y₁ ⊗ Z₁ ⊗ X₂ ⊗ Y₂) Z₂).inv\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ Z₁ X₂ Y₂).inv) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ Y₁ (Z₁ ⊗ X₂) Y₂).inv) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ Y₁ Z₁ X₂).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ (((Y₁ ⊗ Z₁) ⊗ X₂) ⊗ Y₂) Z₂).hom\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ ((Y₁ ⊗ Z₁) ⊗ X₂) Y₂ Z₂).hom\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ (Y₁ ⊗ Z₁) X₂ (Y₂ ⊗ Z₂)).hom\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ (Y₁ ⊗ Z₁) (X₂ ⊗ Y₂ ⊗ Z₂)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| tensor_μ C (X₁, X₂) (Y₁, Y₂) ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ (X₁ ⊗ Y₁) (X₂ ⊗ Y₂) (Z₁ ⊗ Z₂)).hom\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 (X₁ ⊗ Y₁) ⊗ (α_ (X₂ ⊗ Y₂) Z₁ Z₂).inv\n[PROOFSTEP]\nrw [← tensor_id, associator_naturality]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 (X₁ ⊗ Y₁) ⊗ (β_ (X₂ ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂) ≫ (α_ X₁ Y₁ ((Z₁ ⊗ X₂ ⊗ Y₂) ⊗ Z₂)).hom\ncase a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ Y₁ (Z₁ ⊗ X₂ ⊗ Y₂) Z₂).inv\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ (Y₁ ⊗ Z₁ ⊗ X₂ ⊗ Y₂) Z₂).inv\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ Z₁ X₂ Y₂).inv) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ Y₁ (Z₁ ⊗ X₂) Y₂).inv) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ Y₁ Z₁ X₂).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ (((Y₁ ⊗ Z₁) ⊗ X₂) ⊗ Y₂) Z₂).hom\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ ((Y₁ ⊗ Z₁) ⊗ X₂) Y₂ Z₂).hom\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ (Y₁ ⊗ Z₁) X₂ (Y₂ ⊗ Z₂)).hom\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ (Y₁ ⊗ Z₁) (X₂ ⊗ Y₂ ⊗ Z₂)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| tensor_μ C (X₁, X₂) (Y₁, Y₂) ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ (X₁ ⊗ Y₁) (X₂ ⊗ Y₂) (Z₁ ⊗ Z₂)).hom\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 (X₁ ⊗ Y₁) ⊗ (α_ (X₂ ⊗ Y₂) Z₁ Z₂).inv\n[PROOFSTEP]\nrw [← tensor_id, associator_naturality]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 (X₁ ⊗ Y₁) ⊗ (β_ (X₂ ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂) ≫ (α_ X₁ Y₁ ((Z₁ ⊗ X₂ ⊗ Y₂) ⊗ Z₂)).hom\ncase a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ Y₁ (Z₁ ⊗ X₂ ⊗ Y₂) Z₂).inv\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ (Y₁ ⊗ Z₁ ⊗ X₂ ⊗ Y₂) Z₂).inv\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ Z₁ X₂ Y₂).inv) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ Y₁ (Z₁ ⊗ X₂) Y₂).inv) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ Y₁ Z₁ X₂).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ (((Y₁ ⊗ Z₁) ⊗ X₂) ⊗ Y₂) Z₂).hom\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ ((Y₁ ⊗ Z₁) ⊗ X₂) Y₂ Z₂).hom\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ (Y₁ ⊗ Z₁) X₂ (Y₂ ⊗ Z₂)).hom\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ (Y₁ ⊗ Z₁) (X₂ ⊗ Y₂ ⊗ Z₂)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| tensor_μ C (X₁, X₂) (Y₁, Y₂) ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ (X₁ ⊗ Y₁) (X₂ ⊗ Y₂) (Z₁ ⊗ Z₂)).hom\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 (X₁ ⊗ Y₁) ⊗ (α_ (X₂ ⊗ Y₂) Z₁ Z₂).inv\n[PROOFSTEP]\nrw [← tensor_id, associator_naturality]\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n⊢ (tensor_μ C (X₁, X₂) (Y₁, Y₂) ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n      (α_ (X₁ ⊗ Y₁) (X₂ ⊗ Y₂) (Z₁ ⊗ Z₂)).hom ≫\n        (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ (X₂ ⊗ Y₂) Z₁ Z₂).inv) ≫\n          ((((((((((α_ X₁ Y₁ (((X₂ ⊗ Y₂) ⊗ Z₁) ⊗ Z₂)).hom ≫ (𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (β_ (X₂ ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂)) ≫\n                            (𝟙 X₁ ⊗ (α_ Y₁ (Z₁ ⊗ X₂ ⊗ Y₂) Z₂).inv)) ≫\n                          (α_ X₁ (Y₁ ⊗ Z₁ ⊗ X₂ ⊗ Y₂) Z₂).inv) ≫\n                        ((𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ Z₁ X₂ Y₂).inv) ⊗ 𝟙 Z₂)) ≫\n                      ((𝟙 X₁ ⊗ (α_ Y₁ (Z₁ ⊗ X₂) Y₂).inv) ⊗ 𝟙 Z₂)) ≫\n                    ((𝟙 X₁ ⊗ (α_ Y₁ Z₁ X₂).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂)) ≫\n                  (α_ X₁ (((Y₁ ⊗ Z₁) ⊗ X₂) ⊗ Y₂) Z₂).hom) ≫\n                (𝟙 X₁ ⊗ (α_ ((Y₁ ⊗ Z₁) ⊗ X₂) Y₂ Z₂).hom)) ≫\n              (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ Z₁) X₂ (Y₂ ⊗ Z₂)).hom)) ≫\n            (α_ X₁ (Y₁ ⊗ Z₁) (X₂ ⊗ Y₂ ⊗ Z₂)).inv =\n    (α_ (X₁ ⊗ X₂) (Y₁ ⊗ Y₂) (Z₁ ⊗ Z₂)).hom ≫\n      (𝟙 (X₁ ⊗ X₂) ⊗ tensor_μ C (Y₁, Y₂) (Z₁, Z₂)) ≫ tensor_μ C (X₁, X₂) (Y₁ ⊗ Z₁, Y₂ ⊗ Z₂)\n[PROOFSTEP]\nslice_lhs 5 6 => rw [← tensor_comp, associator_inv_naturality, tensor_comp]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (β_ (X₂ ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂) ≫ (𝟙 X₁ ⊗ (α_ Y₁ (Z₁ ⊗ X₂ ⊗ Y₂) Z₂).inv)\ncase a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ (Y₁ ⊗ Z₁ ⊗ X₂ ⊗ Y₂) Z₂).inv\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ Z₁ X₂ Y₂).inv) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ Y₁ (Z₁ ⊗ X₂) Y₂).inv) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ Y₁ Z₁ X₂).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ (((Y₁ ⊗ Z₁) ⊗ X₂) ⊗ Y₂) Z₂).hom\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ ((Y₁ ⊗ Z₁) ⊗ X₂) Y₂ Z₂).hom\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ (Y₁ ⊗ Z₁) X₂ (Y₂ ⊗ Z₂)).hom\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ (Y₁ ⊗ Z₁) (X₂ ⊗ Y₂ ⊗ Z₂)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| tensor_μ C (X₁, X₂) (Y₁, Y₂) ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ (X₁ ⊗ Y₁) (X₂ ⊗ Y₂) (Z₁ ⊗ Z₂)).hom\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 (X₁ ⊗ Y₁) ⊗ (α_ (X₂ ⊗ Y₂) Z₁ Z₂).inv\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ Y₁ (((X₂ ⊗ Y₂) ⊗ Z₁) ⊗ Z₂)).hom\n[PROOFSTEP]\nrw [← tensor_comp, associator_inv_naturality, tensor_comp]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (β_ (X₂ ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂) ≫ (𝟙 X₁ ⊗ (α_ Y₁ (Z₁ ⊗ X₂ ⊗ Y₂) Z₂).inv)\ncase a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ (Y₁ ⊗ Z₁ ⊗ X₂ ⊗ Y₂) Z₂).inv\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ Z₁ X₂ Y₂).inv) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ Y₁ (Z₁ ⊗ X₂) Y₂).inv) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ Y₁ Z₁ X₂).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ (((Y₁ ⊗ Z₁) ⊗ X₂) ⊗ Y₂) Z₂).hom\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ ((Y₁ ⊗ Z₁) ⊗ X₂) Y₂ Z₂).hom\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ (Y₁ ⊗ Z₁) X₂ (Y₂ ⊗ Z₂)).hom\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ (Y₁ ⊗ Z₁) (X₂ ⊗ Y₂ ⊗ Z₂)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| tensor_μ C (X₁, X₂) (Y₁, Y₂) ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ (X₁ ⊗ Y₁) (X₂ ⊗ Y₂) (Z₁ ⊗ Z₂)).hom\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 (X₁ ⊗ Y₁) ⊗ (α_ (X₂ ⊗ Y₂) Z₁ Z₂).inv\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ Y₁ (((X₂ ⊗ Y₂) ⊗ Z₁) ⊗ Z₂)).hom\n[PROOFSTEP]\nrw [← tensor_comp, associator_inv_naturality, tensor_comp]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (β_ (X₂ ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂) ≫ (𝟙 X₁ ⊗ (α_ Y₁ (Z₁ ⊗ X₂ ⊗ Y₂) Z₂).inv)\ncase a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ (Y₁ ⊗ Z₁ ⊗ X₂ ⊗ Y₂) Z₂).inv\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ Z₁ X₂ Y₂).inv) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ Y₁ (Z₁ ⊗ X₂) Y₂).inv) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ Y₁ Z₁ X₂).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ (((Y₁ ⊗ Z₁) ⊗ X₂) ⊗ Y₂) Z₂).hom\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ ((Y₁ ⊗ Z₁) ⊗ X₂) Y₂ Z₂).hom\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ (Y₁ ⊗ Z₁) X₂ (Y₂ ⊗ Z₂)).hom\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ (Y₁ ⊗ Z₁) (X₂ ⊗ Y₂ ⊗ Z₂)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| tensor_μ C (X₁, X₂) (Y₁, Y₂) ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ (X₁ ⊗ Y₁) (X₂ ⊗ Y₂) (Z₁ ⊗ Z₂)).hom\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 (X₁ ⊗ Y₁) ⊗ (α_ (X₂ ⊗ Y₂) Z₁ Z₂).inv\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ Y₁ (((X₂ ⊗ Y₂) ⊗ Z₁) ⊗ Z₂)).hom\n[PROOFSTEP]\nrw [← tensor_comp, associator_inv_naturality, tensor_comp]\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n⊢ (tensor_μ C (X₁, X₂) (Y₁, Y₂) ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n      (α_ (X₁ ⊗ Y₁) (X₂ ⊗ Y₂) (Z₁ ⊗ Z₂)).hom ≫\n        (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ (X₂ ⊗ Y₂) Z₁ Z₂).inv) ≫\n          (α_ X₁ Y₁ (((X₂ ⊗ Y₂) ⊗ Z₁) ⊗ Z₂)).hom ≫\n            (((((((((𝟙 X₁ ⊗ (α_ Y₁ ((X₂ ⊗ Y₂) ⊗ Z₁) Z₂).inv) ≫ (𝟙 X₁ ⊗ (𝟙 Y₁ ⊗ (β_ (X₂ ⊗ Y₂) Z₁).hom) ⊗ 𝟙 Z₂)) ≫\n                            (α_ X₁ (Y₁ ⊗ Z₁ ⊗ X₂ ⊗ Y₂) Z₂).inv) ≫\n                          ((𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ Z₁ X₂ Y₂).inv) ⊗ 𝟙 Z₂)) ≫\n                        ((𝟙 X₁ ⊗ (α_ Y₁ (Z₁ ⊗ X₂) Y₂).inv) ⊗ 𝟙 Z₂)) ≫\n                      ((𝟙 X₁ ⊗ (α_ Y₁ Z₁ X₂).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂)) ≫\n                    (α_ X₁ (((Y₁ ⊗ Z₁) ⊗ X₂) ⊗ Y₂) Z₂).hom) ≫\n                  (𝟙 X₁ ⊗ (α_ ((Y₁ ⊗ Z₁) ⊗ X₂) Y₂ Z₂).hom)) ≫\n                (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ Z₁) X₂ (Y₂ ⊗ Z₂)).hom)) ≫\n              (α_ X₁ (Y₁ ⊗ Z₁) (X₂ ⊗ Y₂ ⊗ Z₂)).inv =\n    (α_ (X₁ ⊗ X₂) (Y₁ ⊗ Y₂) (Z₁ ⊗ Z₂)).hom ≫\n      (𝟙 (X₁ ⊗ X₂) ⊗ tensor_μ C (Y₁, Y₂) (Z₁, Z₂)) ≫ tensor_μ C (X₁, X₂) (Y₁ ⊗ Z₁, Y₂ ⊗ Z₂)\n[PROOFSTEP]\nslice_lhs 6 7 => rw [associator_inv_naturality]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (𝟙 Y₁ ⊗ (β_ (X₂ ⊗ Y₂) Z₁).hom) ⊗ 𝟙 Z₂) ≫ (α_ X₁ (Y₁ ⊗ Z₁ ⊗ X₂ ⊗ Y₂) Z₂).inv\ncase a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ Z₁ X₂ Y₂).inv) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ Y₁ (Z₁ ⊗ X₂) Y₂).inv) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ Y₁ Z₁ X₂).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ (((Y₁ ⊗ Z₁) ⊗ X₂) ⊗ Y₂) Z₂).hom\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ ((Y₁ ⊗ Z₁) ⊗ X₂) Y₂ Z₂).hom\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ (Y₁ ⊗ Z₁) X₂ (Y₂ ⊗ Z₂)).hom\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ (Y₁ ⊗ Z₁) (X₂ ⊗ Y₂ ⊗ Z₂)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| tensor_μ C (X₁, X₂) (Y₁, Y₂) ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ (X₁ ⊗ Y₁) (X₂ ⊗ Y₂) (Z₁ ⊗ Z₂)).hom\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 (X₁ ⊗ Y₁) ⊗ (α_ (X₂ ⊗ Y₂) Z₁ Z₂).inv\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ Y₁ (((X₂ ⊗ Y₂) ⊗ Z₁) ⊗ Z₂)).hom\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ Y₁ ((X₂ ⊗ Y₂) ⊗ Z₁) Z₂).inv\n[PROOFSTEP]\nrw [associator_inv_naturality]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (𝟙 Y₁ ⊗ (β_ (X₂ ⊗ Y₂) Z₁).hom) ⊗ 𝟙 Z₂) ≫ (α_ X₁ (Y₁ ⊗ Z₁ ⊗ X₂ ⊗ Y₂) Z₂).inv\ncase a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ Z₁ X₂ Y₂).inv) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ Y₁ (Z₁ ⊗ X₂) Y₂).inv) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ Y₁ Z₁ X₂).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ (((Y₁ ⊗ Z₁) ⊗ X₂) ⊗ Y₂) Z₂).hom\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ ((Y₁ ⊗ Z₁) ⊗ X₂) Y₂ Z₂).hom\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ (Y₁ ⊗ Z₁) X₂ (Y₂ ⊗ Z₂)).hom\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ (Y₁ ⊗ Z₁) (X₂ ⊗ Y₂ ⊗ Z₂)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| tensor_μ C (X₁, X₂) (Y₁, Y₂) ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ (X₁ ⊗ Y₁) (X₂ ⊗ Y₂) (Z₁ ⊗ Z₂)).hom\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 (X₁ ⊗ Y₁) ⊗ (α_ (X₂ ⊗ Y₂) Z₁ Z₂).inv\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ Y₁ (((X₂ ⊗ Y₂) ⊗ Z₁) ⊗ Z₂)).hom\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ Y₁ ((X₂ ⊗ Y₂) ⊗ Z₁) Z₂).inv\n[PROOFSTEP]\nrw [associator_inv_naturality]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (𝟙 Y₁ ⊗ (β_ (X₂ ⊗ Y₂) Z₁).hom) ⊗ 𝟙 Z₂) ≫ (α_ X₁ (Y₁ ⊗ Z₁ ⊗ X₂ ⊗ Y₂) Z₂).inv\ncase a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ Z₁ X₂ Y₂).inv) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ Y₁ (Z₁ ⊗ X₂) Y₂).inv) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ Y₁ Z₁ X₂).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ (((Y₁ ⊗ Z₁) ⊗ X₂) ⊗ Y₂) Z₂).hom\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ ((Y₁ ⊗ Z₁) ⊗ X₂) Y₂ Z₂).hom\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ (Y₁ ⊗ Z₁) X₂ (Y₂ ⊗ Z₂)).hom\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ (Y₁ ⊗ Z₁) (X₂ ⊗ Y₂ ⊗ Z₂)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| tensor_μ C (X₁, X₂) (Y₁, Y₂) ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ (X₁ ⊗ Y₁) (X₂ ⊗ Y₂) (Z₁ ⊗ Z₂)).hom\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 (X₁ ⊗ Y₁) ⊗ (α_ (X₂ ⊗ Y₂) Z₁ Z₂).inv\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ Y₁ (((X₂ ⊗ Y₂) ⊗ Z₁) ⊗ Z₂)).hom\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ Y₁ ((X₂ ⊗ Y₂) ⊗ Z₁) Z₂).inv\n[PROOFSTEP]\nrw [associator_inv_naturality]\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n⊢ (tensor_μ C (X₁, X₂) (Y₁, Y₂) ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n      (α_ (X₁ ⊗ Y₁) (X₂ ⊗ Y₂) (Z₁ ⊗ Z₂)).hom ≫\n        (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ (X₂ ⊗ Y₂) Z₁ Z₂).inv) ≫\n          (α_ X₁ Y₁ (((X₂ ⊗ Y₂) ⊗ Z₁) ⊗ Z₂)).hom ≫\n            (𝟙 X₁ ⊗ (α_ Y₁ ((X₂ ⊗ Y₂) ⊗ Z₁) Z₂).inv) ≫\n              ((((((((α_ X₁ (Y₁ ⊗ (X₂ ⊗ Y₂) ⊗ Z₁) Z₂).inv ≫ ((𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (β_ (X₂ ⊗ Y₂) Z₁).hom) ⊗ 𝟙 Z₂)) ≫\n                            ((𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ Z₁ X₂ Y₂).inv) ⊗ 𝟙 Z₂)) ≫\n                          ((𝟙 X₁ ⊗ (α_ Y₁ (Z₁ ⊗ X₂) Y₂).inv) ⊗ 𝟙 Z₂)) ≫\n                        ((𝟙 X₁ ⊗ (α_ Y₁ Z₁ X₂).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂)) ≫\n                      (α_ X₁ (((Y₁ ⊗ Z₁) ⊗ X₂) ⊗ Y₂) Z₂).hom) ≫\n                    (𝟙 X₁ ⊗ (α_ ((Y₁ ⊗ Z₁) ⊗ X₂) Y₂ Z₂).hom)) ≫\n                  (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ Z₁) X₂ (Y₂ ⊗ Z₂)).hom)) ≫\n                (α_ X₁ (Y₁ ⊗ Z₁) (X₂ ⊗ Y₂ ⊗ Z₂)).inv =\n    (α_ (X₁ ⊗ X₂) (Y₁ ⊗ Y₂) (Z₁ ⊗ Z₂)).hom ≫\n      (𝟙 (X₁ ⊗ X₂) ⊗ tensor_μ C (Y₁, Y₂) (Z₁, Z₂)) ≫ tensor_μ C (X₁, X₂) (Y₁ ⊗ Z₁, Y₂ ⊗ Z₂)\n[PROOFSTEP]\nhave :\n  (α_ (X₁ ⊗ Y₁) (X₂ ⊗ Y₂) (Z₁ ⊗ Z₂)).hom ≫\n      (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ (X₂ ⊗ Y₂) Z₁ Z₂).inv) ≫\n        (α_ X₁ Y₁ (((X₂ ⊗ Y₂) ⊗ Z₁) ⊗ Z₂)).hom ≫\n          (𝟙 X₁ ⊗ (α_ Y₁ ((X₂ ⊗ Y₂) ⊗ Z₁) Z₂).inv) ≫ (α_ X₁ (Y₁ ⊗ (X₂ ⊗ Y₂) ⊗ Z₁) Z₂).inv =\n    ((α_ X₁ Y₁ (X₂ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n      ((𝟙 X₁ ⊗ (α_ Y₁ X₂ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n        (α_ (X₁ ⊗ (Y₁ ⊗ X₂) ⊗ Y₂) Z₁ Z₂).inv ≫\n          ((α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂) ≫\n            ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) Y₂ Z₁).hom) ⊗ 𝟙 Z₂) ≫\n              ((𝟙 X₁ ⊗ (α_ Y₁ X₂ (Y₂ ⊗ Z₁)).hom) ⊗ 𝟙 Z₂) ≫ ((𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ X₂ Y₂ Z₁).inv) ⊗ 𝟙 Z₂) :=\n  by pure_coherence\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n⊢ (α_ (X₁ ⊗ Y₁) (X₂ ⊗ Y₂) (Z₁ ⊗ Z₂)).hom ≫\n      (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ (X₂ ⊗ Y₂) Z₁ Z₂).inv) ≫\n        (α_ X₁ Y₁ (((X₂ ⊗ Y₂) ⊗ Z₁) ⊗ Z₂)).hom ≫\n          (𝟙 X₁ ⊗ (α_ Y₁ ((X₂ ⊗ Y₂) ⊗ Z₁) Z₂).inv) ≫ (α_ X₁ (Y₁ ⊗ (X₂ ⊗ Y₂) ⊗ Z₁) Z₂).inv =\n    ((α_ X₁ Y₁ (X₂ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n      ((𝟙 X₁ ⊗ (α_ Y₁ X₂ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n        (α_ (X₁ ⊗ (Y₁ ⊗ X₂) ⊗ Y₂) Z₁ Z₂).inv ≫\n          ((α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂) ≫\n            ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) Y₂ Z₁).hom) ⊗ 𝟙 Z₂) ≫\n              ((𝟙 X₁ ⊗ (α_ Y₁ X₂ (Y₂ ⊗ Z₁)).hom) ⊗ 𝟙 Z₂) ≫ ((𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ X₂ Y₂ Z₁).inv) ⊗ 𝟙 Z₂)\n[PROOFSTEP]\npure_coherence\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\nthis :\n  (α_ (X₁ ⊗ Y₁) (X₂ ⊗ Y₂) (Z₁ ⊗ Z₂)).hom ≫\n      (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ (X₂ ⊗ Y₂) Z₁ Z₂).inv) ≫\n        (α_ X₁ Y₁ (((X₂ ⊗ Y₂) ⊗ Z₁) ⊗ Z₂)).hom ≫\n          (𝟙 X₁ ⊗ (α_ Y₁ ((X₂ ⊗ Y₂) ⊗ Z₁) Z₂).inv) ≫ (α_ X₁ (Y₁ ⊗ (X₂ ⊗ Y₂) ⊗ Z₁) Z₂).inv =\n    ((α_ X₁ Y₁ (X₂ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n      ((𝟙 X₁ ⊗ (α_ Y₁ X₂ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n        (α_ (X₁ ⊗ (Y₁ ⊗ X₂) ⊗ Y₂) Z₁ Z₂).inv ≫\n          ((α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂) ≫\n            ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) Y₂ Z₁).hom) ⊗ 𝟙 Z₂) ≫\n              ((𝟙 X₁ ⊗ (α_ Y₁ X₂ (Y₂ ⊗ Z₁)).hom) ⊗ 𝟙 Z₂) ≫ ((𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ X₂ Y₂ Z₁).inv) ⊗ 𝟙 Z₂)\n⊢ (tensor_μ C (X₁, X₂) (Y₁, Y₂) ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n      (α_ (X₁ ⊗ Y₁) (X₂ ⊗ Y₂) (Z₁ ⊗ Z₂)).hom ≫\n        (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ (X₂ ⊗ Y₂) Z₁ Z₂).inv) ≫\n          (α_ X₁ Y₁ (((X₂ ⊗ Y₂) ⊗ Z₁) ⊗ Z₂)).hom ≫\n            (𝟙 X₁ ⊗ (α_ Y₁ ((X₂ ⊗ Y₂) ⊗ Z₁) Z₂).inv) ≫\n              ((((((((α_ X₁ (Y₁ ⊗ (X₂ ⊗ Y₂) ⊗ Z₁) Z₂).inv ≫ ((𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (β_ (X₂ ⊗ Y₂) Z₁).hom) ⊗ 𝟙 Z₂)) ≫\n                            ((𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ Z₁ X₂ Y₂).inv) ⊗ 𝟙 Z₂)) ≫\n                          ((𝟙 X₁ ⊗ (α_ Y₁ (Z₁ ⊗ X₂) Y₂).inv) ⊗ 𝟙 Z₂)) ≫\n                        ((𝟙 X₁ ⊗ (α_ Y₁ Z₁ X₂).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂)) ≫\n                      (α_ X₁ (((Y₁ ⊗ Z₁) ⊗ X₂) ⊗ Y₂) Z₂).hom) ≫\n                    (𝟙 X₁ ⊗ (α_ ((Y₁ ⊗ Z₁) ⊗ X₂) Y₂ Z₂).hom)) ≫\n                  (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ Z₁) X₂ (Y₂ ⊗ Z₂)).hom)) ≫\n                (α_ X₁ (Y₁ ⊗ Z₁) (X₂ ⊗ Y₂ ⊗ Z₂)).inv =\n    (α_ (X₁ ⊗ X₂) (Y₁ ⊗ Y₂) (Z₁ ⊗ Z₂)).hom ≫\n      (𝟙 (X₁ ⊗ X₂) ⊗ tensor_μ C (Y₁, Y₂) (Z₁, Z₂)) ≫ tensor_μ C (X₁, X₂) (Y₁ ⊗ Z₁, Y₂ ⊗ Z₂)\n[PROOFSTEP]\nslice_lhs 2 6 => rw [this]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\nthis :\n  (α_ (X₁ ⊗ Y₁) (X₂ ⊗ Y₂) (Z₁ ⊗ Z₂)).hom ≫\n      (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ (X₂ ⊗ Y₂) Z₁ Z₂).inv) ≫\n        (α_ X₁ Y₁ (((X₂ ⊗ Y₂) ⊗ Z₁) ⊗ Z₂)).hom ≫\n          (𝟙 X₁ ⊗ (α_ Y₁ ((X₂ ⊗ Y₂) ⊗ Z₁) Z₂).inv) ≫ (α_ X₁ (Y₁ ⊗ (X₂ ⊗ Y₂) ⊗ Z₁) Z₂).inv =\n    ((α_ X₁ Y₁ (X₂ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n      ((𝟙 X₁ ⊗ (α_ Y₁ X₂ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n        (α_ (X₁ ⊗ (Y₁ ⊗ X₂) ⊗ Y₂) Z₁ Z₂).inv ≫\n          ((α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂) ≫\n            ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) Y₂ Z₁).hom) ⊗ 𝟙 Z₂) ≫\n              ((𝟙 X₁ ⊗ (α_ Y₁ X₂ (Y₂ ⊗ Z₁)).hom) ⊗ 𝟙 Z₂) ≫ ((𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ X₂ Y₂ Z₁).inv) ⊗ 𝟙 Z₂)\n| (α_ (X₁ ⊗ Y₁) (X₂ ⊗ Y₂) (Z₁ ⊗ Z₂)).hom ≫\n    (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ (X₂ ⊗ Y₂) Z₁ Z₂).inv) ≫\n      (α_ X₁ Y₁ (((X₂ ⊗ Y₂) ⊗ Z₁) ⊗ Z₂)).hom ≫\n        (𝟙 X₁ ⊗ (α_ Y₁ ((X₂ ⊗ Y₂) ⊗ Z₁) Z₂).inv) ≫ (α_ X₁ (Y₁ ⊗ (X₂ ⊗ Y₂) ⊗ Z₁) Z₂).inv\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\nthis :\n  (α_ (X₁ ⊗ Y₁) (X₂ ⊗ Y₂) (Z₁ ⊗ Z₂)).hom ≫\n      (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ (X₂ ⊗ Y₂) Z₁ Z₂).inv) ≫\n        (α_ X₁ Y₁ (((X₂ ⊗ Y₂) ⊗ Z₁) ⊗ Z₂)).hom ≫\n          (𝟙 X₁ ⊗ (α_ Y₁ ((X₂ ⊗ Y₂) ⊗ Z₁) Z₂).inv) ≫ (α_ X₁ (Y₁ ⊗ (X₂ ⊗ Y₂) ⊗ Z₁) Z₂).inv =\n    ((α_ X₁ Y₁ (X₂ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n      ((𝟙 X₁ ⊗ (α_ Y₁ X₂ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n        (α_ (X₁ ⊗ (Y₁ ⊗ X₂) ⊗ Y₂) Z₁ Z₂).inv ≫\n          ((α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂) ≫\n            ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) Y₂ Z₁).hom) ⊗ 𝟙 Z₂) ≫\n              ((𝟙 X₁ ⊗ (α_ Y₁ X₂ (Y₂ ⊗ Z₁)).hom) ⊗ 𝟙 Z₂) ≫ ((𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ X₂ Y₂ Z₁).inv) ⊗ 𝟙 Z₂)\n| (𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (β_ (X₂ ⊗ Y₂) Z₁).hom) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\nthis :\n  (α_ (X₁ ⊗ Y₁) (X₂ ⊗ Y₂) (Z₁ ⊗ Z₂)).hom ≫\n      (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ (X₂ ⊗ Y₂) Z₁ Z₂).inv) ≫\n        (α_ X₁ Y₁ (((X₂ ⊗ Y₂) ⊗ Z₁) ⊗ Z₂)).hom ≫\n          (𝟙 X₁ ⊗ (α_ Y₁ ((X₂ ⊗ Y₂) ⊗ Z₁) Z₂).inv) ≫ (α_ X₁ (Y₁ ⊗ (X₂ ⊗ Y₂) ⊗ Z₁) Z₂).inv =\n    ((α_ X₁ Y₁ (X₂ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n      ((𝟙 X₁ ⊗ (α_ Y₁ X₂ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n        (α_ (X₁ ⊗ (Y₁ ⊗ X₂) ⊗ Y₂) Z₁ Z₂).inv ≫\n          ((α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂) ≫\n            ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) Y₂ Z₁).hom) ⊗ 𝟙 Z₂) ≫\n              ((𝟙 X₁ ⊗ (α_ Y₁ X₂ (Y₂ ⊗ Z₁)).hom) ⊗ 𝟙 Z₂) ≫ ((𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ X₂ Y₂ Z₁).inv) ⊗ 𝟙 Z₂)\n| (𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ Z₁ X₂ Y₂).inv) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\nthis :\n  (α_ (X₁ ⊗ Y₁) (X₂ ⊗ Y₂) (Z₁ ⊗ Z₂)).hom ≫\n      (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ (X₂ ⊗ Y₂) Z₁ Z₂).inv) ≫\n        (α_ X₁ Y₁ (((X₂ ⊗ Y₂) ⊗ Z₁) ⊗ Z₂)).hom ≫\n          (𝟙 X₁ ⊗ (α_ Y₁ ((X₂ ⊗ Y₂) ⊗ Z₁) Z₂).inv) ≫ (α_ X₁ (Y₁ ⊗ (X₂ ⊗ Y₂) ⊗ Z₁) Z₂).inv =\n    ((α_ X₁ Y₁ (X₂ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n      ((𝟙 X₁ ⊗ (α_ Y₁ X₂ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n        (α_ (X₁ ⊗ (Y₁ ⊗ X₂) ⊗ Y₂) Z₁ Z₂).inv ≫\n          ((α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂) ≫\n            ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) Y₂ Z₁).hom) ⊗ 𝟙 Z₂) ≫\n              ((𝟙 X₁ ⊗ (α_ Y₁ X₂ (Y₂ ⊗ Z₁)).hom) ⊗ 𝟙 Z₂) ≫ ((𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ X₂ Y₂ Z₁).inv) ⊗ 𝟙 Z₂)\n| (𝟙 X₁ ⊗ (α_ Y₁ (Z₁ ⊗ X₂) Y₂).inv) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\nthis :\n  (α_ (X₁ ⊗ Y₁) (X₂ ⊗ Y₂) (Z₁ ⊗ Z₂)).hom ≫\n      (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ (X₂ ⊗ Y₂) Z₁ Z₂).inv) ≫\n        (α_ X₁ Y₁ (((X₂ ⊗ Y₂) ⊗ Z₁) ⊗ Z₂)).hom ≫\n          (𝟙 X₁ ⊗ (α_ Y₁ ((X₂ ⊗ Y₂) ⊗ Z₁) Z₂).inv) ≫ (α_ X₁ (Y₁ ⊗ (X₂ ⊗ Y₂) ⊗ Z₁) Z₂).inv =\n    ((α_ X₁ Y₁ (X₂ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n      ((𝟙 X₁ ⊗ (α_ Y₁ X₂ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n        (α_ (X₁ ⊗ (Y₁ ⊗ X₂) ⊗ Y₂) Z₁ Z₂).inv ≫\n          ((α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂) ≫\n            ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) Y₂ Z₁).hom) ⊗ 𝟙 Z₂) ≫\n              ((𝟙 X₁ ⊗ (α_ Y₁ X₂ (Y₂ ⊗ Z₁)).hom) ⊗ 𝟙 Z₂) ≫ ((𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ X₂ Y₂ Z₁).inv) ⊗ 𝟙 Z₂)\n| (𝟙 X₁ ⊗ (α_ Y₁ Z₁ X₂).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\nthis :\n  (α_ (X₁ ⊗ Y₁) (X₂ ⊗ Y₂) (Z₁ ⊗ Z₂)).hom ≫\n      (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ (X₂ ⊗ Y₂) Z₁ Z₂).inv) ≫\n        (α_ X₁ Y₁ (((X₂ ⊗ Y₂) ⊗ Z₁) ⊗ Z₂)).hom ≫\n          (𝟙 X₁ ⊗ (α_ Y₁ ((X₂ ⊗ Y₂) ⊗ Z₁) Z₂).inv) ≫ (α_ X₁ (Y₁ ⊗ (X₂ ⊗ Y₂) ⊗ Z₁) Z₂).inv =\n    ((α_ X₁ Y₁ (X₂ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n      ((𝟙 X₁ ⊗ (α_ Y₁ X₂ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n        (α_ (X₁ ⊗ (Y₁ ⊗ X₂) ⊗ Y₂) Z₁ Z₂).inv ≫\n          ((α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂) ≫\n            ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) Y₂ Z₁).hom) ⊗ 𝟙 Z₂) ≫\n              ((𝟙 X₁ ⊗ (α_ Y₁ X₂ (Y₂ ⊗ Z₁)).hom) ⊗ 𝟙 Z₂) ≫ ((𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ X₂ Y₂ Z₁).inv) ⊗ 𝟙 Z₂)\n| (α_ X₁ (((Y₁ ⊗ Z₁) ⊗ X₂) ⊗ Y₂) Z₂).hom\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\nthis :\n  (α_ (X₁ ⊗ Y₁) (X₂ ⊗ Y₂) (Z₁ ⊗ Z₂)).hom ≫\n      (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ (X₂ ⊗ Y₂) Z₁ Z₂).inv) ≫\n        (α_ X₁ Y₁ (((X₂ ⊗ Y₂) ⊗ Z₁) ⊗ Z₂)).hom ≫\n          (𝟙 X₁ ⊗ (α_ Y₁ ((X₂ ⊗ Y₂) ⊗ Z₁) Z₂).inv) ≫ (α_ X₁ (Y₁ ⊗ (X₂ ⊗ Y₂) ⊗ Z₁) Z₂).inv =\n    ((α_ X₁ Y₁ (X₂ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n      ((𝟙 X₁ ⊗ (α_ Y₁ X₂ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n        (α_ (X₁ ⊗ (Y₁ ⊗ X₂) ⊗ Y₂) Z₁ Z₂).inv ≫\n          ((α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂) ≫\n            ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) Y₂ Z₁).hom) ⊗ 𝟙 Z₂) ≫\n              ((𝟙 X₁ ⊗ (α_ Y₁ X₂ (Y₂ ⊗ Z₁)).hom) ⊗ 𝟙 Z₂) ≫ ((𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ X₂ Y₂ Z₁).inv) ⊗ 𝟙 Z₂)\n| 𝟙 X₁ ⊗ (α_ ((Y₁ ⊗ Z₁) ⊗ X₂) Y₂ Z₂).hom\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\nthis :\n  (α_ (X₁ ⊗ Y₁) (X₂ ⊗ Y₂) (Z₁ ⊗ Z₂)).hom ≫\n      (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ (X₂ ⊗ Y₂) Z₁ Z₂).inv) ≫\n        (α_ X₁ Y₁ (((X₂ ⊗ Y₂) ⊗ Z₁) ⊗ Z₂)).hom ≫\n          (𝟙 X₁ ⊗ (α_ Y₁ ((X₂ ⊗ Y₂) ⊗ Z₁) Z₂).inv) ≫ (α_ X₁ (Y₁ ⊗ (X₂ ⊗ Y₂) ⊗ Z₁) Z₂).inv =\n    ((α_ X₁ Y₁ (X₂ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n      ((𝟙 X₁ ⊗ (α_ Y₁ X₂ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n        (α_ (X₁ ⊗ (Y₁ ⊗ X₂) ⊗ Y₂) Z₁ Z₂).inv ≫\n          ((α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂) ≫\n            ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) Y₂ Z₁).hom) ⊗ 𝟙 Z₂) ≫\n              ((𝟙 X₁ ⊗ (α_ Y₁ X₂ (Y₂ ⊗ Z₁)).hom) ⊗ 𝟙 Z₂) ≫ ((𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ X₂ Y₂ Z₁).inv) ⊗ 𝟙 Z₂)\n| 𝟙 X₁ ⊗ (α_ (Y₁ ⊗ Z₁) X₂ (Y₂ ⊗ Z₂)).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\nthis :\n  (α_ (X₁ ⊗ Y₁) (X₂ ⊗ Y₂) (Z₁ ⊗ Z₂)).hom ≫\n      (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ (X₂ ⊗ Y₂) Z₁ Z₂).inv) ≫\n        (α_ X₁ Y₁ (((X₂ ⊗ Y₂) ⊗ Z₁) ⊗ Z₂)).hom ≫\n          (𝟙 X₁ ⊗ (α_ Y₁ ((X₂ ⊗ Y₂) ⊗ Z₁) Z₂).inv) ≫ (α_ X₁ (Y₁ ⊗ (X₂ ⊗ Y₂) ⊗ Z₁) Z₂).inv =\n    ((α_ X₁ Y₁ (X₂ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n      ((𝟙 X₁ ⊗ (α_ Y₁ X₂ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n        (α_ (X₁ ⊗ (Y₁ ⊗ X₂) ⊗ Y₂) Z₁ Z₂).inv ≫\n          ((α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂) ≫\n            ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) Y₂ Z₁).hom) ⊗ 𝟙 Z₂) ≫\n              ((𝟙 X₁ ⊗ (α_ Y₁ X₂ (Y₂ ⊗ Z₁)).hom) ⊗ 𝟙 Z₂) ≫ ((𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ X₂ Y₂ Z₁).inv) ⊗ 𝟙 Z₂)\n| (α_ X₁ (Y₁ ⊗ Z₁) (X₂ ⊗ Y₂ ⊗ Z₂)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\nthis :\n  (α_ (X₁ ⊗ Y₁) (X₂ ⊗ Y₂) (Z₁ ⊗ Z₂)).hom ≫\n      (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ (X₂ ⊗ Y₂) Z₁ Z₂).inv) ≫\n        (α_ X₁ Y₁ (((X₂ ⊗ Y₂) ⊗ Z₁) ⊗ Z₂)).hom ≫\n          (𝟙 X₁ ⊗ (α_ Y₁ ((X₂ ⊗ Y₂) ⊗ Z₁) Z₂).inv) ≫ (α_ X₁ (Y₁ ⊗ (X₂ ⊗ Y₂) ⊗ Z₁) Z₂).inv =\n    ((α_ X₁ Y₁ (X₂ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n      ((𝟙 X₁ ⊗ (α_ Y₁ X₂ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n        (α_ (X₁ ⊗ (Y₁ ⊗ X₂) ⊗ Y₂) Z₁ Z₂).inv ≫\n          ((α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂) ≫\n            ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) Y₂ Z₁).hom) ⊗ 𝟙 Z₂) ≫\n              ((𝟙 X₁ ⊗ (α_ Y₁ X₂ (Y₂ ⊗ Z₁)).hom) ⊗ 𝟙 Z₂) ≫ ((𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ X₂ Y₂ Z₁).inv) ⊗ 𝟙 Z₂)\n| tensor_μ C (X₁, X₂) (Y₁, Y₂) ⊗ 𝟙 (Z₁ ⊗ Z₂)\n[PROOFSTEP]\nrw [this]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\nthis :\n  (α_ (X₁ ⊗ Y₁) (X₂ ⊗ Y₂) (Z₁ ⊗ Z₂)).hom ≫\n      (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ (X₂ ⊗ Y₂) Z₁ Z₂).inv) ≫\n        (α_ X₁ Y₁ (((X₂ ⊗ Y₂) ⊗ Z₁) ⊗ Z₂)).hom ≫\n          (𝟙 X₁ ⊗ (α_ Y₁ ((X₂ ⊗ Y₂) ⊗ Z₁) Z₂).inv) ≫ (α_ X₁ (Y₁ ⊗ (X₂ ⊗ Y₂) ⊗ Z₁) Z₂).inv =\n    ((α_ X₁ Y₁ (X₂ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n      ((𝟙 X₁ ⊗ (α_ Y₁ X₂ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n        (α_ (X₁ ⊗ (Y₁ ⊗ X₂) ⊗ Y₂) Z₁ Z₂).inv ≫\n          ((α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂) ≫\n            ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) Y₂ Z₁).hom) ⊗ 𝟙 Z₂) ≫\n              ((𝟙 X₁ ⊗ (α_ Y₁ X₂ (Y₂ ⊗ Z₁)).hom) ⊗ 𝟙 Z₂) ≫ ((𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ X₂ Y₂ Z₁).inv) ⊗ 𝟙 Z₂)\n| (α_ (X₁ ⊗ Y₁) (X₂ ⊗ Y₂) (Z₁ ⊗ Z₂)).hom ≫\n    (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ (X₂ ⊗ Y₂) Z₁ Z₂).inv) ≫\n      (α_ X₁ Y₁ (((X₂ ⊗ Y₂) ⊗ Z₁) ⊗ Z₂)).hom ≫\n        (𝟙 X₁ ⊗ (α_ Y₁ ((X₂ ⊗ Y₂) ⊗ Z₁) Z₂).inv) ≫ (α_ X₁ (Y₁ ⊗ (X₂ ⊗ Y₂) ⊗ Z₁) Z₂).inv\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\nthis :\n  (α_ (X₁ ⊗ Y₁) (X₂ ⊗ Y₂) (Z₁ ⊗ Z₂)).hom ≫\n      (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ (X₂ ⊗ Y₂) Z₁ Z₂).inv) ≫\n        (α_ X₁ Y₁ (((X₂ ⊗ Y₂) ⊗ Z₁) ⊗ Z₂)).hom ≫\n          (𝟙 X₁ ⊗ (α_ Y₁ ((X₂ ⊗ Y₂) ⊗ Z₁) Z₂).inv) ≫ (α_ X₁ (Y₁ ⊗ (X₂ ⊗ Y₂) ⊗ Z₁) Z₂).inv =\n    ((α_ X₁ Y₁ (X₂ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n      ((𝟙 X₁ ⊗ (α_ Y₁ X₂ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n        (α_ (X₁ ⊗ (Y₁ ⊗ X₂) ⊗ Y₂) Z₁ Z₂).inv ≫\n          ((α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂) ≫\n            ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) Y₂ Z₁).hom) ⊗ 𝟙 Z₂) ≫\n              ((𝟙 X₁ ⊗ (α_ Y₁ X₂ (Y₂ ⊗ Z₁)).hom) ⊗ 𝟙 Z₂) ≫ ((𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ X₂ Y₂ Z₁).inv) ⊗ 𝟙 Z₂)\n| (𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (β_ (X₂ ⊗ Y₂) Z₁).hom) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\nthis :\n  (α_ (X₁ ⊗ Y₁) (X₂ ⊗ Y₂) (Z₁ ⊗ Z₂)).hom ≫\n      (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ (X₂ ⊗ Y₂) Z₁ Z₂).inv) ≫\n        (α_ X₁ Y₁ (((X₂ ⊗ Y₂) ⊗ Z₁) ⊗ Z₂)).hom ≫\n          (𝟙 X₁ ⊗ (α_ Y₁ ((X₂ ⊗ Y₂) ⊗ Z₁) Z₂).inv) ≫ (α_ X₁ (Y₁ ⊗ (X₂ ⊗ Y₂) ⊗ Z₁) Z₂).inv =\n    ((α_ X₁ Y₁ (X₂ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n      ((𝟙 X₁ ⊗ (α_ Y₁ X₂ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n        (α_ (X₁ ⊗ (Y₁ ⊗ X₂) ⊗ Y₂) Z₁ Z₂).inv ≫\n          ((α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂) ≫\n            ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) Y₂ Z₁).hom) ⊗ 𝟙 Z₂) ≫\n              ((𝟙 X₁ ⊗ (α_ Y₁ X₂ (Y₂ ⊗ Z₁)).hom) ⊗ 𝟙 Z₂) ≫ ((𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ X₂ Y₂ Z₁).inv) ⊗ 𝟙 Z₂)\n| (𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ Z₁ X₂ Y₂).inv) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\nthis :\n  (α_ (X₁ ⊗ Y₁) (X₂ ⊗ Y₂) (Z₁ ⊗ Z₂)).hom ≫\n      (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ (X₂ ⊗ Y₂) Z₁ Z₂).inv) ≫\n        (α_ X₁ Y₁ (((X₂ ⊗ Y₂) ⊗ Z₁) ⊗ Z₂)).hom ≫\n          (𝟙 X₁ ⊗ (α_ Y₁ ((X₂ ⊗ Y₂) ⊗ Z₁) Z₂).inv) ≫ (α_ X₁ (Y₁ ⊗ (X₂ ⊗ Y₂) ⊗ Z₁) Z₂).inv =\n    ((α_ X₁ Y₁ (X₂ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n      ((𝟙 X₁ ⊗ (α_ Y₁ X₂ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n        (α_ (X₁ ⊗ (Y₁ ⊗ X₂) ⊗ Y₂) Z₁ Z₂).inv ≫\n          ((α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂) ≫\n            ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) Y₂ Z₁).hom) ⊗ 𝟙 Z₂) ≫\n              ((𝟙 X₁ ⊗ (α_ Y₁ X₂ (Y₂ ⊗ Z₁)).hom) ⊗ 𝟙 Z₂) ≫ ((𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ X₂ Y₂ Z₁).inv) ⊗ 𝟙 Z₂)\n| (𝟙 X₁ ⊗ (α_ Y₁ (Z₁ ⊗ X₂) Y₂).inv) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\nthis :\n  (α_ (X₁ ⊗ Y₁) (X₂ ⊗ Y₂) (Z₁ ⊗ Z₂)).hom ≫\n      (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ (X₂ ⊗ Y₂) Z₁ Z₂).inv) ≫\n        (α_ X₁ Y₁ (((X₂ ⊗ Y₂) ⊗ Z₁) ⊗ Z₂)).hom ≫\n          (𝟙 X₁ ⊗ (α_ Y₁ ((X₂ ⊗ Y₂) ⊗ Z₁) Z₂).inv) ≫ (α_ X₁ (Y₁ ⊗ (X₂ ⊗ Y₂) ⊗ Z₁) Z₂).inv =\n    ((α_ X₁ Y₁ (X₂ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n      ((𝟙 X₁ ⊗ (α_ Y₁ X₂ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n        (α_ (X₁ ⊗ (Y₁ ⊗ X₂) ⊗ Y₂) Z₁ Z₂).inv ≫\n          ((α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂) ≫\n            ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) Y₂ Z₁).hom) ⊗ 𝟙 Z₂) ≫\n              ((𝟙 X₁ ⊗ (α_ Y₁ X₂ (Y₂ ⊗ Z₁)).hom) ⊗ 𝟙 Z₂) ≫ ((𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ X₂ Y₂ Z₁).inv) ⊗ 𝟙 Z₂)\n| (𝟙 X₁ ⊗ (α_ Y₁ Z₁ X₂).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\nthis :\n  (α_ (X₁ ⊗ Y₁) (X₂ ⊗ Y₂) (Z₁ ⊗ Z₂)).hom ≫\n      (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ (X₂ ⊗ Y₂) Z₁ Z₂).inv) ≫\n        (α_ X₁ Y₁ (((X₂ ⊗ Y₂) ⊗ Z₁) ⊗ Z₂)).hom ≫\n          (𝟙 X₁ ⊗ (α_ Y₁ ((X₂ ⊗ Y₂) ⊗ Z₁) Z₂).inv) ≫ (α_ X₁ (Y₁ ⊗ (X₂ ⊗ Y₂) ⊗ Z₁) Z₂).inv =\n    ((α_ X₁ Y₁ (X₂ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n      ((𝟙 X₁ ⊗ (α_ Y₁ X₂ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n        (α_ (X₁ ⊗ (Y₁ ⊗ X₂) ⊗ Y₂) Z₁ Z₂).inv ≫\n          ((α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂) ≫\n            ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) Y₂ Z₁).hom) ⊗ 𝟙 Z₂) ≫\n              ((𝟙 X₁ ⊗ (α_ Y₁ X₂ (Y₂ ⊗ Z₁)).hom) ⊗ 𝟙 Z₂) ≫ ((𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ X₂ Y₂ Z₁).inv) ⊗ 𝟙 Z₂)\n| (α_ X₁ (((Y₁ ⊗ Z₁) ⊗ X₂) ⊗ Y₂) Z₂).hom\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\nthis :\n  (α_ (X₁ ⊗ Y₁) (X₂ ⊗ Y₂) (Z₁ ⊗ Z₂)).hom ≫\n      (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ (X₂ ⊗ Y₂) Z₁ Z₂).inv) ≫\n        (α_ X₁ Y₁ (((X₂ ⊗ Y₂) ⊗ Z₁) ⊗ Z₂)).hom ≫\n          (𝟙 X₁ ⊗ (α_ Y₁ ((X₂ ⊗ Y₂) ⊗ Z₁) Z₂).inv) ≫ (α_ X₁ (Y₁ ⊗ (X₂ ⊗ Y₂) ⊗ Z₁) Z₂).inv =\n    ((α_ X₁ Y₁ (X₂ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n      ((𝟙 X₁ ⊗ (α_ Y₁ X₂ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n        (α_ (X₁ ⊗ (Y₁ ⊗ X₂) ⊗ Y₂) Z₁ Z₂).inv ≫\n          ((α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂) ≫\n            ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) Y₂ Z₁).hom) ⊗ 𝟙 Z₂) ≫\n              ((𝟙 X₁ ⊗ (α_ Y₁ X₂ (Y₂ ⊗ Z₁)).hom) ⊗ 𝟙 Z₂) ≫ ((𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ X₂ Y₂ Z₁).inv) ⊗ 𝟙 Z₂)\n| 𝟙 X₁ ⊗ (α_ ((Y₁ ⊗ Z₁) ⊗ X₂) Y₂ Z₂).hom\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\nthis :\n  (α_ (X₁ ⊗ Y₁) (X₂ ⊗ Y₂) (Z₁ ⊗ Z₂)).hom ≫\n      (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ (X₂ ⊗ Y₂) Z₁ Z₂).inv) ≫\n        (α_ X₁ Y₁ (((X₂ ⊗ Y₂) ⊗ Z₁) ⊗ Z₂)).hom ≫\n          (𝟙 X₁ ⊗ (α_ Y₁ ((X₂ ⊗ Y₂) ⊗ Z₁) Z₂).inv) ≫ (α_ X₁ (Y₁ ⊗ (X₂ ⊗ Y₂) ⊗ Z₁) Z₂).inv =\n    ((α_ X₁ Y₁ (X₂ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n      ((𝟙 X₁ ⊗ (α_ Y₁ X₂ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n        (α_ (X₁ ⊗ (Y₁ ⊗ X₂) ⊗ Y₂) Z₁ Z₂).inv ≫\n          ((α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂) ≫\n            ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) Y₂ Z₁).hom) ⊗ 𝟙 Z₂) ≫\n              ((𝟙 X₁ ⊗ (α_ Y₁ X₂ (Y₂ ⊗ Z₁)).hom) ⊗ 𝟙 Z₂) ≫ ((𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ X₂ Y₂ Z₁).inv) ⊗ 𝟙 Z₂)\n| 𝟙 X₁ ⊗ (α_ (Y₁ ⊗ Z₁) X₂ (Y₂ ⊗ Z₂)).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\nthis :\n  (α_ (X₁ ⊗ Y₁) (X₂ ⊗ Y₂) (Z₁ ⊗ Z₂)).hom ≫\n      (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ (X₂ ⊗ Y₂) Z₁ Z₂).inv) ≫\n        (α_ X₁ Y₁ (((X₂ ⊗ Y₂) ⊗ Z₁) ⊗ Z₂)).hom ≫\n          (𝟙 X₁ ⊗ (α_ Y₁ ((X₂ ⊗ Y₂) ⊗ Z₁) Z₂).inv) ≫ (α_ X₁ (Y₁ ⊗ (X₂ ⊗ Y₂) ⊗ Z₁) Z₂).inv =\n    ((α_ X₁ Y₁ (X₂ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n      ((𝟙 X₁ ⊗ (α_ Y₁ X₂ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n        (α_ (X₁ ⊗ (Y₁ ⊗ X₂) ⊗ Y₂) Z₁ Z₂).inv ≫\n          ((α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂) ≫\n            ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) Y₂ Z₁).hom) ⊗ 𝟙 Z₂) ≫\n              ((𝟙 X₁ ⊗ (α_ Y₁ X₂ (Y₂ ⊗ Z₁)).hom) ⊗ 𝟙 Z₂) ≫ ((𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ X₂ Y₂ Z₁).inv) ⊗ 𝟙 Z₂)\n| (α_ X₁ (Y₁ ⊗ Z₁) (X₂ ⊗ Y₂ ⊗ Z₂)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\nthis :\n  (α_ (X₁ ⊗ Y₁) (X₂ ⊗ Y₂) (Z₁ ⊗ Z₂)).hom ≫\n      (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ (X₂ ⊗ Y₂) Z₁ Z₂).inv) ≫\n        (α_ X₁ Y₁ (((X₂ ⊗ Y₂) ⊗ Z₁) ⊗ Z₂)).hom ≫\n          (𝟙 X₁ ⊗ (α_ Y₁ ((X₂ ⊗ Y₂) ⊗ Z₁) Z₂).inv) ≫ (α_ X₁ (Y₁ ⊗ (X₂ ⊗ Y₂) ⊗ Z₁) Z₂).inv =\n    ((α_ X₁ Y₁ (X₂ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n      ((𝟙 X₁ ⊗ (α_ Y₁ X₂ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n        (α_ (X₁ ⊗ (Y₁ ⊗ X₂) ⊗ Y₂) Z₁ Z₂).inv ≫\n          ((α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂) ≫\n            ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) Y₂ Z₁).hom) ⊗ 𝟙 Z₂) ≫\n              ((𝟙 X₁ ⊗ (α_ Y₁ X₂ (Y₂ ⊗ Z₁)).hom) ⊗ 𝟙 Z₂) ≫ ((𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ X₂ Y₂ Z₁).inv) ⊗ 𝟙 Z₂)\n| tensor_μ C (X₁, X₂) (Y₁, Y₂) ⊗ 𝟙 (Z₁ ⊗ Z₂)\n[PROOFSTEP]\nrw [this]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\nthis :\n  (α_ (X₁ ⊗ Y₁) (X₂ ⊗ Y₂) (Z₁ ⊗ Z₂)).hom ≫\n      (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ (X₂ ⊗ Y₂) Z₁ Z₂).inv) ≫\n        (α_ X₁ Y₁ (((X₂ ⊗ Y₂) ⊗ Z₁) ⊗ Z₂)).hom ≫\n          (𝟙 X₁ ⊗ (α_ Y₁ ((X₂ ⊗ Y₂) ⊗ Z₁) Z₂).inv) ≫ (α_ X₁ (Y₁ ⊗ (X₂ ⊗ Y₂) ⊗ Z₁) Z₂).inv =\n    ((α_ X₁ Y₁ (X₂ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n      ((𝟙 X₁ ⊗ (α_ Y₁ X₂ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n        (α_ (X₁ ⊗ (Y₁ ⊗ X₂) ⊗ Y₂) Z₁ Z₂).inv ≫\n          ((α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂) ≫\n            ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) Y₂ Z₁).hom) ⊗ 𝟙 Z₂) ≫\n              ((𝟙 X₁ ⊗ (α_ Y₁ X₂ (Y₂ ⊗ Z₁)).hom) ⊗ 𝟙 Z₂) ≫ ((𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ X₂ Y₂ Z₁).inv) ⊗ 𝟙 Z₂)\n| (α_ (X₁ ⊗ Y₁) (X₂ ⊗ Y₂) (Z₁ ⊗ Z₂)).hom ≫\n    (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ (X₂ ⊗ Y₂) Z₁ Z₂).inv) ≫\n      (α_ X₁ Y₁ (((X₂ ⊗ Y₂) ⊗ Z₁) ⊗ Z₂)).hom ≫\n        (𝟙 X₁ ⊗ (α_ Y₁ ((X₂ ⊗ Y₂) ⊗ Z₁) Z₂).inv) ≫ (α_ X₁ (Y₁ ⊗ (X₂ ⊗ Y₂) ⊗ Z₁) Z₂).inv\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\nthis :\n  (α_ (X₁ ⊗ Y₁) (X₂ ⊗ Y₂) (Z₁ ⊗ Z₂)).hom ≫\n      (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ (X₂ ⊗ Y₂) Z₁ Z₂).inv) ≫\n        (α_ X₁ Y₁ (((X₂ ⊗ Y₂) ⊗ Z₁) ⊗ Z₂)).hom ≫\n          (𝟙 X₁ ⊗ (α_ Y₁ ((X₂ ⊗ Y₂) ⊗ Z₁) Z₂).inv) ≫ (α_ X₁ (Y₁ ⊗ (X₂ ⊗ Y₂) ⊗ Z₁) Z₂).inv =\n    ((α_ X₁ Y₁ (X₂ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n      ((𝟙 X₁ ⊗ (α_ Y₁ X₂ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n        (α_ (X₁ ⊗ (Y₁ ⊗ X₂) ⊗ Y₂) Z₁ Z₂).inv ≫\n          ((α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂) ≫\n            ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) Y₂ Z₁).hom) ⊗ 𝟙 Z₂) ≫\n              ((𝟙 X₁ ⊗ (α_ Y₁ X₂ (Y₂ ⊗ Z₁)).hom) ⊗ 𝟙 Z₂) ≫ ((𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ X₂ Y₂ Z₁).inv) ⊗ 𝟙 Z₂)\n| (𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (β_ (X₂ ⊗ Y₂) Z₁).hom) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\nthis :\n  (α_ (X₁ ⊗ Y₁) (X₂ ⊗ Y₂) (Z₁ ⊗ Z₂)).hom ≫\n      (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ (X₂ ⊗ Y₂) Z₁ Z₂).inv) ≫\n        (α_ X₁ Y₁ (((X₂ ⊗ Y₂) ⊗ Z₁) ⊗ Z₂)).hom ≫\n          (𝟙 X₁ ⊗ (α_ Y₁ ((X₂ ⊗ Y₂) ⊗ Z₁) Z₂).inv) ≫ (α_ X₁ (Y₁ ⊗ (X₂ ⊗ Y₂) ⊗ Z₁) Z₂).inv =\n    ((α_ X₁ Y₁ (X₂ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n      ((𝟙 X₁ ⊗ (α_ Y₁ X₂ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n        (α_ (X₁ ⊗ (Y₁ ⊗ X₂) ⊗ Y₂) Z₁ Z₂).inv ≫\n          ((α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂) ≫\n            ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) Y₂ Z₁).hom) ⊗ 𝟙 Z₂) ≫\n              ((𝟙 X₁ ⊗ (α_ Y₁ X₂ (Y₂ ⊗ Z₁)).hom) ⊗ 𝟙 Z₂) ≫ ((𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ X₂ Y₂ Z₁).inv) ⊗ 𝟙 Z₂)\n| (𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ Z₁ X₂ Y₂).inv) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\nthis :\n  (α_ (X₁ ⊗ Y₁) (X₂ ⊗ Y₂) (Z₁ ⊗ Z₂)).hom ≫\n      (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ (X₂ ⊗ Y₂) Z₁ Z₂).inv) ≫\n        (α_ X₁ Y₁ (((X₂ ⊗ Y₂) ⊗ Z₁) ⊗ Z₂)).hom ≫\n          (𝟙 X₁ ⊗ (α_ Y₁ ((X₂ ⊗ Y₂) ⊗ Z₁) Z₂).inv) ≫ (α_ X₁ (Y₁ ⊗ (X₂ ⊗ Y₂) ⊗ Z₁) Z₂).inv =\n    ((α_ X₁ Y₁ (X₂ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n      ((𝟙 X₁ ⊗ (α_ Y₁ X₂ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n        (α_ (X₁ ⊗ (Y₁ ⊗ X₂) ⊗ Y₂) Z₁ Z₂).inv ≫\n          ((α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂) ≫\n            ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) Y₂ Z₁).hom) ⊗ 𝟙 Z₂) ≫\n              ((𝟙 X₁ ⊗ (α_ Y₁ X₂ (Y₂ ⊗ Z₁)).hom) ⊗ 𝟙 Z₂) ≫ ((𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ X₂ Y₂ Z₁).inv) ⊗ 𝟙 Z₂)\n| (𝟙 X₁ ⊗ (α_ Y₁ (Z₁ ⊗ X₂) Y₂).inv) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\nthis :\n  (α_ (X₁ ⊗ Y₁) (X₂ ⊗ Y₂) (Z₁ ⊗ Z₂)).hom ≫\n      (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ (X₂ ⊗ Y₂) Z₁ Z₂).inv) ≫\n        (α_ X₁ Y₁ (((X₂ ⊗ Y₂) ⊗ Z₁) ⊗ Z₂)).hom ≫\n          (𝟙 X₁ ⊗ (α_ Y₁ ((X₂ ⊗ Y₂) ⊗ Z₁) Z₂).inv) ≫ (α_ X₁ (Y₁ ⊗ (X₂ ⊗ Y₂) ⊗ Z₁) Z₂).inv =\n    ((α_ X₁ Y₁ (X₂ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n      ((𝟙 X₁ ⊗ (α_ Y₁ X₂ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n        (α_ (X₁ ⊗ (Y₁ ⊗ X₂) ⊗ Y₂) Z₁ Z₂).inv ≫\n          ((α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂) ≫\n            ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) Y₂ Z₁).hom) ⊗ 𝟙 Z₂) ≫\n              ((𝟙 X₁ ⊗ (α_ Y₁ X₂ (Y₂ ⊗ Z₁)).hom) ⊗ 𝟙 Z₂) ≫ ((𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ X₂ Y₂ Z₁).inv) ⊗ 𝟙 Z₂)\n| (𝟙 X₁ ⊗ (α_ Y₁ Z₁ X₂).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\nthis :\n  (α_ (X₁ ⊗ Y₁) (X₂ ⊗ Y₂) (Z₁ ⊗ Z₂)).hom ≫\n      (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ (X₂ ⊗ Y₂) Z₁ Z₂).inv) ≫\n        (α_ X₁ Y₁ (((X₂ ⊗ Y₂) ⊗ Z₁) ⊗ Z₂)).hom ≫\n          (𝟙 X₁ ⊗ (α_ Y₁ ((X₂ ⊗ Y₂) ⊗ Z₁) Z₂).inv) ≫ (α_ X₁ (Y₁ ⊗ (X₂ ⊗ Y₂) ⊗ Z₁) Z₂).inv =\n    ((α_ X₁ Y₁ (X₂ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n      ((𝟙 X₁ ⊗ (α_ Y₁ X₂ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n        (α_ (X₁ ⊗ (Y₁ ⊗ X₂) ⊗ Y₂) Z₁ Z₂).inv ≫\n          ((α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂) ≫\n            ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) Y₂ Z₁).hom) ⊗ 𝟙 Z₂) ≫\n              ((𝟙 X₁ ⊗ (α_ Y₁ X₂ (Y₂ ⊗ Z₁)).hom) ⊗ 𝟙 Z₂) ≫ ((𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ X₂ Y₂ Z₁).inv) ⊗ 𝟙 Z₂)\n| (α_ X₁ (((Y₁ ⊗ Z₁) ⊗ X₂) ⊗ Y₂) Z₂).hom\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\nthis :\n  (α_ (X₁ ⊗ Y₁) (X₂ ⊗ Y₂) (Z₁ ⊗ Z₂)).hom ≫\n      (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ (X₂ ⊗ Y₂) Z₁ Z₂).inv) ≫\n        (α_ X₁ Y₁ (((X₂ ⊗ Y₂) ⊗ Z₁) ⊗ Z₂)).hom ≫\n          (𝟙 X₁ ⊗ (α_ Y₁ ((X₂ ⊗ Y₂) ⊗ Z₁) Z₂).inv) ≫ (α_ X₁ (Y₁ ⊗ (X₂ ⊗ Y₂) ⊗ Z₁) Z₂).inv =\n    ((α_ X₁ Y₁ (X₂ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n      ((𝟙 X₁ ⊗ (α_ Y₁ X₂ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n        (α_ (X₁ ⊗ (Y₁ ⊗ X₂) ⊗ Y₂) Z₁ Z₂).inv ≫\n          ((α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂) ≫\n            ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) Y₂ Z₁).hom) ⊗ 𝟙 Z₂) ≫\n              ((𝟙 X₁ ⊗ (α_ Y₁ X₂ (Y₂ ⊗ Z₁)).hom) ⊗ 𝟙 Z₂) ≫ ((𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ X₂ Y₂ Z₁).inv) ⊗ 𝟙 Z₂)\n| 𝟙 X₁ ⊗ (α_ ((Y₁ ⊗ Z₁) ⊗ X₂) Y₂ Z₂).hom\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\nthis :\n  (α_ (X₁ ⊗ Y₁) (X₂ ⊗ Y₂) (Z₁ ⊗ Z₂)).hom ≫\n      (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ (X₂ ⊗ Y₂) Z₁ Z₂).inv) ≫\n        (α_ X₁ Y₁ (((X₂ ⊗ Y₂) ⊗ Z₁) ⊗ Z₂)).hom ≫\n          (𝟙 X₁ ⊗ (α_ Y₁ ((X₂ ⊗ Y₂) ⊗ Z₁) Z₂).inv) ≫ (α_ X₁ (Y₁ ⊗ (X₂ ⊗ Y₂) ⊗ Z₁) Z₂).inv =\n    ((α_ X₁ Y₁ (X₂ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n      ((𝟙 X₁ ⊗ (α_ Y₁ X₂ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n        (α_ (X₁ ⊗ (Y₁ ⊗ X₂) ⊗ Y₂) Z₁ Z₂).inv ≫\n          ((α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂) ≫\n            ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) Y₂ Z₁).hom) ⊗ 𝟙 Z₂) ≫\n              ((𝟙 X₁ ⊗ (α_ Y₁ X₂ (Y₂ ⊗ Z₁)).hom) ⊗ 𝟙 Z₂) ≫ ((𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ X₂ Y₂ Z₁).inv) ⊗ 𝟙 Z₂)\n| 𝟙 X₁ ⊗ (α_ (Y₁ ⊗ Z₁) X₂ (Y₂ ⊗ Z₂)).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\nthis :\n  (α_ (X₁ ⊗ Y₁) (X₂ ⊗ Y₂) (Z₁ ⊗ Z₂)).hom ≫\n      (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ (X₂ ⊗ Y₂) Z₁ Z₂).inv) ≫\n        (α_ X₁ Y₁ (((X₂ ⊗ Y₂) ⊗ Z₁) ⊗ Z₂)).hom ≫\n          (𝟙 X₁ ⊗ (α_ Y₁ ((X₂ ⊗ Y₂) ⊗ Z₁) Z₂).inv) ≫ (α_ X₁ (Y₁ ⊗ (X₂ ⊗ Y₂) ⊗ Z₁) Z₂).inv =\n    ((α_ X₁ Y₁ (X₂ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n      ((𝟙 X₁ ⊗ (α_ Y₁ X₂ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n        (α_ (X₁ ⊗ (Y₁ ⊗ X₂) ⊗ Y₂) Z₁ Z₂).inv ≫\n          ((α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂) ≫\n            ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) Y₂ Z₁).hom) ⊗ 𝟙 Z₂) ≫\n              ((𝟙 X₁ ⊗ (α_ Y₁ X₂ (Y₂ ⊗ Z₁)).hom) ⊗ 𝟙 Z₂) ≫ ((𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ X₂ Y₂ Z₁).inv) ⊗ 𝟙 Z₂)\n| (α_ X₁ (Y₁ ⊗ Z₁) (X₂ ⊗ Y₂ ⊗ Z₂)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\nthis :\n  (α_ (X₁ ⊗ Y₁) (X₂ ⊗ Y₂) (Z₁ ⊗ Z₂)).hom ≫\n      (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ (X₂ ⊗ Y₂) Z₁ Z₂).inv) ≫\n        (α_ X₁ Y₁ (((X₂ ⊗ Y₂) ⊗ Z₁) ⊗ Z₂)).hom ≫\n          (𝟙 X₁ ⊗ (α_ Y₁ ((X₂ ⊗ Y₂) ⊗ Z₁) Z₂).inv) ≫ (α_ X₁ (Y₁ ⊗ (X₂ ⊗ Y₂) ⊗ Z₁) Z₂).inv =\n    ((α_ X₁ Y₁ (X₂ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n      ((𝟙 X₁ ⊗ (α_ Y₁ X₂ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n        (α_ (X₁ ⊗ (Y₁ ⊗ X₂) ⊗ Y₂) Z₁ Z₂).inv ≫\n          ((α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂) ≫\n            ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) Y₂ Z₁).hom) ⊗ 𝟙 Z₂) ≫\n              ((𝟙 X₁ ⊗ (α_ Y₁ X₂ (Y₂ ⊗ Z₁)).hom) ⊗ 𝟙 Z₂) ≫ ((𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ X₂ Y₂ Z₁).inv) ⊗ 𝟙 Z₂)\n| tensor_μ C (X₁, X₂) (Y₁, Y₂) ⊗ 𝟙 (Z₁ ⊗ Z₂)\n[PROOFSTEP]\nrw [this]\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\nthis :\n  (α_ (X₁ ⊗ Y₁) (X₂ ⊗ Y₂) (Z₁ ⊗ Z₂)).hom ≫\n      (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ (X₂ ⊗ Y₂) Z₁ Z₂).inv) ≫\n        (α_ X₁ Y₁ (((X₂ ⊗ Y₂) ⊗ Z₁) ⊗ Z₂)).hom ≫\n          (𝟙 X₁ ⊗ (α_ Y₁ ((X₂ ⊗ Y₂) ⊗ Z₁) Z₂).inv) ≫ (α_ X₁ (Y₁ ⊗ (X₂ ⊗ Y₂) ⊗ Z₁) Z₂).inv =\n    ((α_ X₁ Y₁ (X₂ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n      ((𝟙 X₁ ⊗ (α_ Y₁ X₂ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n        (α_ (X₁ ⊗ (Y₁ ⊗ X₂) ⊗ Y₂) Z₁ Z₂).inv ≫\n          ((α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂) ≫\n            ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) Y₂ Z₁).hom) ⊗ 𝟙 Z₂) ≫\n              ((𝟙 X₁ ⊗ (α_ Y₁ X₂ (Y₂ ⊗ Z₁)).hom) ⊗ 𝟙 Z₂) ≫ ((𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ X₂ Y₂ Z₁).inv) ⊗ 𝟙 Z₂)\n⊢ (tensor_μ C (X₁, X₂) (Y₁, Y₂) ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n      ((((((((((α_ X₁ Y₁ (X₂ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n                        ((𝟙 X₁ ⊗ (α_ Y₁ X₂ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n                          (α_ (X₁ ⊗ (Y₁ ⊗ X₂) ⊗ Y₂) Z₁ Z₂).inv ≫\n                            ((α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂) ≫\n                              ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) Y₂ Z₁).hom) ⊗ 𝟙 Z₂) ≫\n                                ((𝟙 X₁ ⊗ (α_ Y₁ X₂ (Y₂ ⊗ Z₁)).hom) ⊗ 𝟙 Z₂) ≫\n                                  ((𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ X₂ Y₂ Z₁).inv) ⊗ 𝟙 Z₂)) ≫\n                      ((𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (β_ (X₂ ⊗ Y₂) Z₁).hom) ⊗ 𝟙 Z₂)) ≫\n                    ((𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ Z₁ X₂ Y₂).inv) ⊗ 𝟙 Z₂)) ≫\n                  ((𝟙 X₁ ⊗ (α_ Y₁ (Z₁ ⊗ X₂) Y₂).inv) ⊗ 𝟙 Z₂)) ≫\n                ((𝟙 X₁ ⊗ (α_ Y₁ Z₁ X₂).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂)) ≫\n              (α_ X₁ (((Y₁ ⊗ Z₁) ⊗ X₂) ⊗ Y₂) Z₂).hom) ≫\n            (𝟙 X₁ ⊗ (α_ ((Y₁ ⊗ Z₁) ⊗ X₂) Y₂ Z₂).hom)) ≫\n          (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ Z₁) X₂ (Y₂ ⊗ Z₂)).hom)) ≫\n        (α_ X₁ (Y₁ ⊗ Z₁) (X₂ ⊗ Y₂ ⊗ Z₂)).inv =\n    (α_ (X₁ ⊗ X₂) (Y₁ ⊗ Y₂) (Z₁ ⊗ Z₂)).hom ≫\n      (𝟙 (X₁ ⊗ X₂) ⊗ tensor_μ C (Y₁, Y₂) (Z₁, Z₂)) ≫ tensor_μ C (X₁, X₂) (Y₁ ⊗ Z₁, Y₂ ⊗ Z₂)\n[PROOFSTEP]\nclear this\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n⊢ (tensor_μ C (X₁, X₂) (Y₁, Y₂) ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n      ((((((((((α_ X₁ Y₁ (X₂ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n                        ((𝟙 X₁ ⊗ (α_ Y₁ X₂ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n                          (α_ (X₁ ⊗ (Y₁ ⊗ X₂) ⊗ Y₂) Z₁ Z₂).inv ≫\n                            ((α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂) ≫\n                              ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) Y₂ Z₁).hom) ⊗ 𝟙 Z₂) ≫\n                                ((𝟙 X₁ ⊗ (α_ Y₁ X₂ (Y₂ ⊗ Z₁)).hom) ⊗ 𝟙 Z₂) ≫\n                                  ((𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ X₂ Y₂ Z₁).inv) ⊗ 𝟙 Z₂)) ≫\n                      ((𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (β_ (X₂ ⊗ Y₂) Z₁).hom) ⊗ 𝟙 Z₂)) ≫\n                    ((𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ Z₁ X₂ Y₂).inv) ⊗ 𝟙 Z₂)) ≫\n                  ((𝟙 X₁ ⊗ (α_ Y₁ (Z₁ ⊗ X₂) Y₂).inv) ⊗ 𝟙 Z₂)) ≫\n                ((𝟙 X₁ ⊗ (α_ Y₁ Z₁ X₂).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂)) ≫\n              (α_ X₁ (((Y₁ ⊗ Z₁) ⊗ X₂) ⊗ Y₂) Z₂).hom) ≫\n            (𝟙 X₁ ⊗ (α_ ((Y₁ ⊗ Z₁) ⊗ X₂) Y₂ Z₂).hom)) ≫\n          (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ Z₁) X₂ (Y₂ ⊗ Z₂)).hom)) ≫\n        (α_ X₁ (Y₁ ⊗ Z₁) (X₂ ⊗ Y₂ ⊗ Z₂)).inv =\n    (α_ (X₁ ⊗ X₂) (Y₁ ⊗ Y₂) (Z₁ ⊗ Z₂)).hom ≫\n      (𝟙 (X₁ ⊗ X₂) ⊗ tensor_μ C (Y₁, Y₂) (Z₁, Z₂)) ≫ tensor_μ C (X₁, X₂) (Y₁ ⊗ Z₁, Y₂ ⊗ Z₂)\n[PROOFSTEP]\nslice_lhs 1 3 => rw [← tensor_comp, ← tensor_comp, tensor_μ_def₁, tensor_comp, tensor_comp]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (tensor_μ C (X₁, X₂) (Y₁, Y₂) ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n    ((α_ X₁ Y₁ (X₂ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫ ((𝟙 X₁ ⊗ (α_ Y₁ X₂ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂))\ncase a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ (X₁ ⊗ (Y₁ ⊗ X₂) ⊗ Y₂) Z₁ Z₂).inv\ncase a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) Y₂ Z₁).hom) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ Y₁ X₂ (Y₂ ⊗ Z₁)).hom) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ X₂ Y₂ Z₁).inv) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (β_ (X₂ ⊗ Y₂) Z₁).hom) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ Z₁ X₂ Y₂).inv) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ Y₁ (Z₁ ⊗ X₂) Y₂).inv) ⊗ 𝟙 Z₂\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ Y₁ Z₁ X₂).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ (((Y₁ ⊗ Z₁) ⊗ X₂) ⊗ Y₂) Z₂).hom\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ ((Y₁ ⊗ Z₁) ⊗ X₂) Y₂ Z₂).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ (Y₁ ⊗ Z₁) X₂ (Y₂ ⊗ Z₂)).hom\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ (Y₁ ⊗ Z₁) (X₂ ⊗ Y₂ ⊗ Z₂)).inv\n[PROOFSTEP]\nrw [← tensor_comp, ← tensor_comp, tensor_μ_def₁, tensor_comp, tensor_comp]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (tensor_μ C (X₁, X₂) (Y₁, Y₂) ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n    ((α_ X₁ Y₁ (X₂ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫ ((𝟙 X₁ ⊗ (α_ Y₁ X₂ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂))\ncase a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ (X₁ ⊗ (Y₁ ⊗ X₂) ⊗ Y₂) Z₁ Z₂).inv\ncase a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) Y₂ Z₁).hom) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ Y₁ X₂ (Y₂ ⊗ Z₁)).hom) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ X₂ Y₂ Z₁).inv) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (β_ (X₂ ⊗ Y₂) Z₁).hom) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ Z₁ X₂ Y₂).inv) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ Y₁ (Z₁ ⊗ X₂) Y₂).inv) ⊗ 𝟙 Z₂\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ Y₁ Z₁ X₂).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ (((Y₁ ⊗ Z₁) ⊗ X₂) ⊗ Y₂) Z₂).hom\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ ((Y₁ ⊗ Z₁) ⊗ X₂) Y₂ Z₂).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ (Y₁ ⊗ Z₁) X₂ (Y₂ ⊗ Z₂)).hom\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ (Y₁ ⊗ Z₁) (X₂ ⊗ Y₂ ⊗ Z₂)).inv\n[PROOFSTEP]\nrw [← tensor_comp, ← tensor_comp, tensor_μ_def₁, tensor_comp, tensor_comp]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (tensor_μ C (X₁, X₂) (Y₁, Y₂) ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n    ((α_ X₁ Y₁ (X₂ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫ ((𝟙 X₁ ⊗ (α_ Y₁ X₂ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂))\ncase a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ (X₁ ⊗ (Y₁ ⊗ X₂) ⊗ Y₂) Z₁ Z₂).inv\ncase a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) Y₂ Z₁).hom) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ Y₁ X₂ (Y₂ ⊗ Z₁)).hom) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ X₂ Y₂ Z₁).inv) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (β_ (X₂ ⊗ Y₂) Z₁).hom) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ Z₁ X₂ Y₂).inv) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ Y₁ (Z₁ ⊗ X₂) Y₂).inv) ⊗ 𝟙 Z₂\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ Y₁ Z₁ X₂).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ (((Y₁ ⊗ Z₁) ⊗ X₂) ⊗ Y₂) Z₂).hom\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ ((Y₁ ⊗ Z₁) ⊗ X₂) Y₂ Z₂).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ (Y₁ ⊗ Z₁) X₂ (Y₂ ⊗ Z₂)).hom\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ (Y₁ ⊗ Z₁) (X₂ ⊗ Y₂ ⊗ Z₂)).inv\n[PROOFSTEP]\nrw [← tensor_comp, ← tensor_comp, tensor_μ_def₁, tensor_comp, tensor_comp]\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n⊢ (((((((((((((((α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n                                ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n                                  ((𝟙 X₁ ⊗ (β_ X₂ Y₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 (Z₁ ⊗ Z₂))) ≫\n                              (α_ (X₁ ⊗ (Y₁ ⊗ X₂) ⊗ Y₂) Z₁ Z₂).inv) ≫\n                            ((α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂)) ≫\n                          ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) Y₂ Z₁).hom) ⊗ 𝟙 Z₂)) ≫\n                        ((𝟙 X₁ ⊗ (α_ Y₁ X₂ (Y₂ ⊗ Z₁)).hom) ⊗ 𝟙 Z₂)) ≫\n                      ((𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ X₂ Y₂ Z₁).inv) ⊗ 𝟙 Z₂)) ≫\n                    ((𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (β_ (X₂ ⊗ Y₂) Z₁).hom) ⊗ 𝟙 Z₂)) ≫\n                  ((𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ Z₁ X₂ Y₂).inv) ⊗ 𝟙 Z₂)) ≫\n                ((𝟙 X₁ ⊗ (α_ Y₁ (Z₁ ⊗ X₂) Y₂).inv) ⊗ 𝟙 Z₂)) ≫\n              ((𝟙 X₁ ⊗ (α_ Y₁ Z₁ X₂).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂)) ≫\n            (α_ X₁ (((Y₁ ⊗ Z₁) ⊗ X₂) ⊗ Y₂) Z₂).hom) ≫\n          (𝟙 X₁ ⊗ (α_ ((Y₁ ⊗ Z₁) ⊗ X₂) Y₂ Z₂).hom)) ≫\n        (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ Z₁) X₂ (Y₂ ⊗ Z₂)).hom)) ≫\n      (α_ X₁ (Y₁ ⊗ Z₁) (X₂ ⊗ Y₂ ⊗ Z₂)).inv =\n    (α_ (X₁ ⊗ X₂) (Y₁ ⊗ Y₂) (Z₁ ⊗ Z₂)).hom ≫\n      (𝟙 (X₁ ⊗ X₂) ⊗ tensor_μ C (Y₁, Y₂) (Z₁, Z₂)) ≫ tensor_μ C (X₁, X₂) (Y₁ ⊗ Z₁, Y₂ ⊗ Z₂)\n[PROOFSTEP]\nslice_lhs 3 4 => rw [← tensor_id, associator_inv_naturality]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| ((𝟙 X₁ ⊗ (β_ X₂ Y₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫ (α_ (X₁ ⊗ (Y₁ ⊗ X₂) ⊗ Y₂) Z₁ Z₂).inv\ncase a.a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) Y₂ Z₁).hom) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ Y₁ X₂ (Y₂ ⊗ Z₁)).hom) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ X₂ Y₂ Z₁).inv) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (β_ (X₂ ⊗ Y₂) Z₁).hom) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ Z₁ X₂ Y₂).inv) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ Y₁ (Z₁ ⊗ X₂) Y₂).inv) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ Y₁ Z₁ X₂).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ (((Y₁ ⊗ Z₁) ⊗ X₂) ⊗ Y₂) Z₂).hom\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ ((Y₁ ⊗ Z₁) ⊗ X₂) Y₂ Z₂).hom\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ (Y₁ ⊗ Z₁) X₂ (Y₂ ⊗ Z₂)).hom\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ (Y₁ ⊗ Z₁) (X₂ ⊗ Y₂ ⊗ Z₂)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)\n[PROOFSTEP]\nrw [← tensor_id, associator_inv_naturality]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| ((𝟙 X₁ ⊗ (β_ X₂ Y₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫ (α_ (X₁ ⊗ (Y₁ ⊗ X₂) ⊗ Y₂) Z₁ Z₂).inv\ncase a.a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) Y₂ Z₁).hom) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ Y₁ X₂ (Y₂ ⊗ Z₁)).hom) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ X₂ Y₂ Z₁).inv) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (β_ (X₂ ⊗ Y₂) Z₁).hom) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ Z₁ X₂ Y₂).inv) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ Y₁ (Z₁ ⊗ X₂) Y₂).inv) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ Y₁ Z₁ X₂).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ (((Y₁ ⊗ Z₁) ⊗ X₂) ⊗ Y₂) Z₂).hom\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ ((Y₁ ⊗ Z₁) ⊗ X₂) Y₂ Z₂).hom\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ (Y₁ ⊗ Z₁) X₂ (Y₂ ⊗ Z₂)).hom\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ (Y₁ ⊗ Z₁) (X₂ ⊗ Y₂ ⊗ Z₂)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)\n[PROOFSTEP]\nrw [← tensor_id, associator_inv_naturality]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| ((𝟙 X₁ ⊗ (β_ X₂ Y₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫ (α_ (X₁ ⊗ (Y₁ ⊗ X₂) ⊗ Y₂) Z₁ Z₂).inv\ncase a.a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) Y₂ Z₁).hom) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ Y₁ X₂ (Y₂ ⊗ Z₁)).hom) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ X₂ Y₂ Z₁).inv) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (β_ (X₂ ⊗ Y₂) Z₁).hom) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ Z₁ X₂ Y₂).inv) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ Y₁ (Z₁ ⊗ X₂) Y₂).inv) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ Y₁ Z₁ X₂).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ (((Y₁ ⊗ Z₁) ⊗ X₂) ⊗ Y₂) Z₂).hom\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ ((Y₁ ⊗ Z₁) ⊗ X₂) Y₂ Z₂).hom\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ (Y₁ ⊗ Z₁) X₂ (Y₂ ⊗ Z₂)).hom\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ (Y₁ ⊗ Z₁) (X₂ ⊗ Y₂ ⊗ Z₂)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)\n[PROOFSTEP]\nrw [← tensor_id, associator_inv_naturality]\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n⊢ ((α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n      ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n        (((((((((((((α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) Z₁ Z₂).inv ≫ (((𝟙 X₁ ⊗ (β_ X₂ Y₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₁) ⊗ 𝟙 Z₂)) ≫\n                                ((α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂)) ≫\n                              ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) Y₂ Z₁).hom) ⊗ 𝟙 Z₂)) ≫\n                            ((𝟙 X₁ ⊗ (α_ Y₁ X₂ (Y₂ ⊗ Z₁)).hom) ⊗ 𝟙 Z₂)) ≫\n                          ((𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ X₂ Y₂ Z₁).inv) ⊗ 𝟙 Z₂)) ≫\n                        ((𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (β_ (X₂ ⊗ Y₂) Z₁).hom) ⊗ 𝟙 Z₂)) ≫\n                      ((𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ Z₁ X₂ Y₂).inv) ⊗ 𝟙 Z₂)) ≫\n                    ((𝟙 X₁ ⊗ (α_ Y₁ (Z₁ ⊗ X₂) Y₂).inv) ⊗ 𝟙 Z₂)) ≫\n                  ((𝟙 X₁ ⊗ (α_ Y₁ Z₁ X₂).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂)) ≫\n                (α_ X₁ (((Y₁ ⊗ Z₁) ⊗ X₂) ⊗ Y₂) Z₂).hom) ≫\n              (𝟙 X₁ ⊗ (α_ ((Y₁ ⊗ Z₁) ⊗ X₂) Y₂ Z₂).hom)) ≫\n            (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ Z₁) X₂ (Y₂ ⊗ Z₂)).hom)) ≫\n          (α_ X₁ (Y₁ ⊗ Z₁) (X₂ ⊗ Y₂ ⊗ Z₂)).inv =\n    (α_ (X₁ ⊗ X₂) (Y₁ ⊗ Y₂) (Z₁ ⊗ Z₂)).hom ≫\n      (𝟙 (X₁ ⊗ X₂) ⊗ tensor_μ C (Y₁, Y₂) (Z₁, Z₂)) ≫ tensor_μ C (X₁, X₂) (Y₁ ⊗ Z₁, Y₂ ⊗ Z₂)\n[PROOFSTEP]\nslice_lhs 4 5 => rw [← tensor_comp, associator_naturality, tensor_comp]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (((𝟙 X₁ ⊗ (β_ X₂ Y₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₁) ⊗ 𝟙 Z₂) ≫ ((α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂)\ncase a.a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) Y₂ Z₁).hom) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ Y₁ X₂ (Y₂ ⊗ Z₁)).hom) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ X₂ Y₂ Z₁).inv) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (β_ (X₂ ⊗ Y₂) Z₁).hom) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ Z₁ X₂ Y₂).inv) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ Y₁ (Z₁ ⊗ X₂) Y₂).inv) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ Y₁ Z₁ X₂).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ (((Y₁ ⊗ Z₁) ⊗ X₂) ⊗ Y₂) Z₂).hom\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ ((Y₁ ⊗ Z₁) ⊗ X₂) Y₂ Z₂).hom\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ (Y₁ ⊗ Z₁) X₂ (Y₂ ⊗ Z₂)).hom\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ (Y₁ ⊗ Z₁) (X₂ ⊗ Y₂ ⊗ Z₂)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) Z₁ Z₂).inv\n[PROOFSTEP]\nrw [← tensor_comp, associator_naturality, tensor_comp]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (((𝟙 X₁ ⊗ (β_ X₂ Y₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₁) ⊗ 𝟙 Z₂) ≫ ((α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂)\ncase a.a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) Y₂ Z₁).hom) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ Y₁ X₂ (Y₂ ⊗ Z₁)).hom) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ X₂ Y₂ Z₁).inv) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (β_ (X₂ ⊗ Y₂) Z₁).hom) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ Z₁ X₂ Y₂).inv) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ Y₁ (Z₁ ⊗ X₂) Y₂).inv) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ Y₁ Z₁ X₂).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ (((Y₁ ⊗ Z₁) ⊗ X₂) ⊗ Y₂) Z₂).hom\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ ((Y₁ ⊗ Z₁) ⊗ X₂) Y₂ Z₂).hom\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ (Y₁ ⊗ Z₁) X₂ (Y₂ ⊗ Z₂)).hom\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ (Y₁ ⊗ Z₁) (X₂ ⊗ Y₂ ⊗ Z₂)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) Z₁ Z₂).inv\n[PROOFSTEP]\nrw [← tensor_comp, associator_naturality, tensor_comp]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (((𝟙 X₁ ⊗ (β_ X₂ Y₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₁) ⊗ 𝟙 Z₂) ≫ ((α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂)\ncase a.a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) Y₂ Z₁).hom) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ Y₁ X₂ (Y₂ ⊗ Z₁)).hom) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ X₂ Y₂ Z₁).inv) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (β_ (X₂ ⊗ Y₂) Z₁).hom) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ Z₁ X₂ Y₂).inv) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ Y₁ (Z₁ ⊗ X₂) Y₂).inv) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ Y₁ Z₁ X₂).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ (((Y₁ ⊗ Z₁) ⊗ X₂) ⊗ Y₂) Z₂).hom\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ ((Y₁ ⊗ Z₁) ⊗ X₂) Y₂ Z₂).hom\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ (Y₁ ⊗ Z₁) X₂ (Y₂ ⊗ Z₂)).hom\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ (Y₁ ⊗ Z₁) (X₂ ⊗ Y₂ ⊗ Z₂)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) Z₁ Z₂).inv\n[PROOFSTEP]\nrw [← tensor_comp, associator_naturality, tensor_comp]\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n⊢ ((α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n      ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n        (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) Z₁ Z₂).inv ≫\n          (((((((((((((α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂) ≫ ((𝟙 X₁ ⊗ ((β_ X₂ Y₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₁) ⊗ 𝟙 Z₂)) ≫\n                                ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) Y₂ Z₁).hom) ⊗ 𝟙 Z₂)) ≫\n                              ((𝟙 X₁ ⊗ (α_ Y₁ X₂ (Y₂ ⊗ Z₁)).hom) ⊗ 𝟙 Z₂)) ≫\n                            ((𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ X₂ Y₂ Z₁).inv) ⊗ 𝟙 Z₂)) ≫\n                          ((𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (β_ (X₂ ⊗ Y₂) Z₁).hom) ⊗ 𝟙 Z₂)) ≫\n                        ((𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ Z₁ X₂ Y₂).inv) ⊗ 𝟙 Z₂)) ≫\n                      ((𝟙 X₁ ⊗ (α_ Y₁ (Z₁ ⊗ X₂) Y₂).inv) ⊗ 𝟙 Z₂)) ≫\n                    ((𝟙 X₁ ⊗ (α_ Y₁ Z₁ X₂).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂)) ≫\n                  (α_ X₁ (((Y₁ ⊗ Z₁) ⊗ X₂) ⊗ Y₂) Z₂).hom) ≫\n                (𝟙 X₁ ⊗ (α_ ((Y₁ ⊗ Z₁) ⊗ X₂) Y₂ Z₂).hom)) ≫\n              (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ Z₁) X₂ (Y₂ ⊗ Z₂)).hom)) ≫\n            (α_ X₁ (Y₁ ⊗ Z₁) (X₂ ⊗ Y₂ ⊗ Z₂)).inv =\n    (α_ (X₁ ⊗ X₂) (Y₁ ⊗ Y₂) (Z₁ ⊗ Z₂)).hom ≫\n      (𝟙 (X₁ ⊗ X₂) ⊗ tensor_μ C (Y₁, Y₂) (Z₁, Z₂)) ≫ tensor_μ C (X₁, X₂) (Y₁ ⊗ Z₁, Y₂ ⊗ Z₂)\n[PROOFSTEP]\nslice_lhs 5 6 => rw [← tensor_comp, ← tensor_comp, associator_naturality, tensor_comp, tensor_comp]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| ((𝟙 X₁ ⊗ ((β_ X₂ Y₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₁) ⊗ 𝟙 Z₂) ≫ ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) Y₂ Z₁).hom) ⊗ 𝟙 Z₂)\ncase a.a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ Y₁ X₂ (Y₂ ⊗ Z₁)).hom) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ X₂ Y₂ Z₁).inv) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (β_ (X₂ ⊗ Y₂) Z₁).hom) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ Z₁ X₂ Y₂).inv) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ Y₁ (Z₁ ⊗ X₂) Y₂).inv) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ Y₁ Z₁ X₂).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ (((Y₁ ⊗ Z₁) ⊗ X₂) ⊗ Y₂) Z₂).hom\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ ((Y₁ ⊗ Z₁) ⊗ X₂) Y₂ Z₂).hom\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ (Y₁ ⊗ Z₁) X₂ (Y₂ ⊗ Z₂)).hom\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ (Y₁ ⊗ Z₁) (X₂ ⊗ Y₂ ⊗ Z₂)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) Z₁ Z₂).inv\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂\n[PROOFSTEP]\nrw [← tensor_comp, ← tensor_comp, associator_naturality, tensor_comp, tensor_comp]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| ((𝟙 X₁ ⊗ ((β_ X₂ Y₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₁) ⊗ 𝟙 Z₂) ≫ ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) Y₂ Z₁).hom) ⊗ 𝟙 Z₂)\ncase a.a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ Y₁ X₂ (Y₂ ⊗ Z₁)).hom) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ X₂ Y₂ Z₁).inv) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (β_ (X₂ ⊗ Y₂) Z₁).hom) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ Z₁ X₂ Y₂).inv) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ Y₁ (Z₁ ⊗ X₂) Y₂).inv) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ Y₁ Z₁ X₂).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ (((Y₁ ⊗ Z₁) ⊗ X₂) ⊗ Y₂) Z₂).hom\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ ((Y₁ ⊗ Z₁) ⊗ X₂) Y₂ Z₂).hom\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ (Y₁ ⊗ Z₁) X₂ (Y₂ ⊗ Z₂)).hom\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ (Y₁ ⊗ Z₁) (X₂ ⊗ Y₂ ⊗ Z₂)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) Z₁ Z₂).inv\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂\n[PROOFSTEP]\nrw [← tensor_comp, ← tensor_comp, associator_naturality, tensor_comp, tensor_comp]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| ((𝟙 X₁ ⊗ ((β_ X₂ Y₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₁) ⊗ 𝟙 Z₂) ≫ ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) Y₂ Z₁).hom) ⊗ 𝟙 Z₂)\ncase a.a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ Y₁ X₂ (Y₂ ⊗ Z₁)).hom) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ X₂ Y₂ Z₁).inv) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (β_ (X₂ ⊗ Y₂) Z₁).hom) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ Z₁ X₂ Y₂).inv) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ Y₁ (Z₁ ⊗ X₂) Y₂).inv) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ Y₁ Z₁ X₂).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ (((Y₁ ⊗ Z₁) ⊗ X₂) ⊗ Y₂) Z₂).hom\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ ((Y₁ ⊗ Z₁) ⊗ X₂) Y₂ Z₂).hom\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ (Y₁ ⊗ Z₁) X₂ (Y₂ ⊗ Z₂)).hom\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ (Y₁ ⊗ Z₁) (X₂ ⊗ Y₂ ⊗ Z₂)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) Z₁ Z₂).inv\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂\n[PROOFSTEP]\nrw [← tensor_comp, ← tensor_comp, associator_naturality, tensor_comp, tensor_comp]\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n⊢ ((α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n      ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n        (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) Z₁ Z₂).inv ≫\n          ((α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂) ≫\n            ((((((((((((𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Y₂ Z₁).hom) ⊗ 𝟙 Z₂) ≫ ((𝟙 X₁ ⊗ (β_ X₂ Y₁).hom ⊗ 𝟙 Y₂ ⊗ 𝟙 Z₁) ⊗ 𝟙 Z₂)) ≫\n                                ((𝟙 X₁ ⊗ (α_ Y₁ X₂ (Y₂ ⊗ Z₁)).hom) ⊗ 𝟙 Z₂)) ≫\n                              ((𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ X₂ Y₂ Z₁).inv) ⊗ 𝟙 Z₂)) ≫\n                            ((𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (β_ (X₂ ⊗ Y₂) Z₁).hom) ⊗ 𝟙 Z₂)) ≫\n                          ((𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ Z₁ X₂ Y₂).inv) ⊗ 𝟙 Z₂)) ≫\n                        ((𝟙 X₁ ⊗ (α_ Y₁ (Z₁ ⊗ X₂) Y₂).inv) ⊗ 𝟙 Z₂)) ≫\n                      ((𝟙 X₁ ⊗ (α_ Y₁ Z₁ X₂).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂)) ≫\n                    (α_ X₁ (((Y₁ ⊗ Z₁) ⊗ X₂) ⊗ Y₂) Z₂).hom) ≫\n                  (𝟙 X₁ ⊗ (α_ ((Y₁ ⊗ Z₁) ⊗ X₂) Y₂ Z₂).hom)) ≫\n                (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ Z₁) X₂ (Y₂ ⊗ Z₂)).hom)) ≫\n              (α_ X₁ (Y₁ ⊗ Z₁) (X₂ ⊗ Y₂ ⊗ Z₂)).inv =\n    (α_ (X₁ ⊗ X₂) (Y₁ ⊗ Y₂) (Z₁ ⊗ Z₂)).hom ≫\n      (𝟙 (X₁ ⊗ X₂) ⊗ tensor_μ C (Y₁, Y₂) (Z₁, Z₂)) ≫ tensor_μ C (X₁, X₂) (Y₁ ⊗ Z₁, Y₂ ⊗ Z₂)\n[PROOFSTEP]\nslice_lhs 6 10 =>\n  rw [← tensor_comp, ← tensor_comp, ← tensor_comp, ← tensor_comp, ← tensor_comp, ← tensor_comp, ← tensor_comp, ←\n    tensor_comp, tensor_id, tensor_associativity_aux, ← tensor_id, ← id_comp (𝟙 X₁ ≫ 𝟙 X₁ ≫ 𝟙 X₁ ≫ 𝟙 X₁ ≫ 𝟙 X₁), ←\n    id_comp (𝟙 Z₂ ≫ 𝟙 Z₂ ≫ 𝟙 Z₂ ≫ 𝟙 Z₂ ≫ 𝟙 Z₂), tensor_comp, tensor_comp, tensor_comp, tensor_comp, tensor_comp,\n    tensor_comp, tensor_comp, tensor_comp, tensor_comp, tensor_comp]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| ((𝟙 X₁ ⊗ (β_ X₂ Y₁).hom ⊗ 𝟙 Y₂ ⊗ 𝟙 Z₁) ⊗ 𝟙 Z₂) ≫\n    ((𝟙 X₁ ⊗ (α_ Y₁ X₂ (Y₂ ⊗ Z₁)).hom) ⊗ 𝟙 Z₂) ≫\n      ((𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ X₂ Y₂ Z₁).inv) ⊗ 𝟙 Z₂) ≫\n        ((𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (β_ (X₂ ⊗ Y₂) Z₁).hom) ⊗ 𝟙 Z₂) ≫ ((𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ Z₁ X₂ Y₂).inv) ⊗ 𝟙 Z₂)\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ Y₁ (Z₁ ⊗ X₂) Y₂).inv) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ Y₁ Z₁ X₂).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ (((Y₁ ⊗ Z₁) ⊗ X₂) ⊗ Y₂) Z₂).hom\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ ((Y₁ ⊗ Z₁) ⊗ X₂) Y₂ Z₂).hom\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ (Y₁ ⊗ Z₁) X₂ (Y₂ ⊗ Z₂)).hom\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ (Y₁ ⊗ Z₁) (X₂ ⊗ Y₂ ⊗ Z₂)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) Z₁ Z₂).inv\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Y₂ Z₁).hom) ⊗ 𝟙 Z₂\n[PROOFSTEP]\nrw [← tensor_comp, ← tensor_comp, ← tensor_comp, ← tensor_comp, ← tensor_comp, ← tensor_comp, ← tensor_comp, ←\n    tensor_comp, tensor_id, tensor_associativity_aux, ← tensor_id, ← id_comp (𝟙 X₁ ≫ 𝟙 X₁ ≫ 𝟙 X₁ ≫ 𝟙 X₁ ≫ 𝟙 X₁), ←\n    id_comp (𝟙 Z₂ ≫ 𝟙 Z₂ ≫ 𝟙 Z₂ ≫ 𝟙 Z₂ ≫ 𝟙 Z₂), tensor_comp, tensor_comp, tensor_comp, tensor_comp, tensor_comp,\n    tensor_comp, tensor_comp, tensor_comp, tensor_comp, tensor_comp]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| ((𝟙 X₁ ⊗ (β_ X₂ Y₁).hom ⊗ 𝟙 Y₂ ⊗ 𝟙 Z₁) ⊗ 𝟙 Z₂) ≫\n    ((𝟙 X₁ ⊗ (α_ Y₁ X₂ (Y₂ ⊗ Z₁)).hom) ⊗ 𝟙 Z₂) ≫\n      ((𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ X₂ Y₂ Z₁).inv) ⊗ 𝟙 Z₂) ≫\n        ((𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (β_ (X₂ ⊗ Y₂) Z₁).hom) ⊗ 𝟙 Z₂) ≫ ((𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ Z₁ X₂ Y₂).inv) ⊗ 𝟙 Z₂)\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ Y₁ (Z₁ ⊗ X₂) Y₂).inv) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ Y₁ Z₁ X₂).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ (((Y₁ ⊗ Z₁) ⊗ X₂) ⊗ Y₂) Z₂).hom\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ ((Y₁ ⊗ Z₁) ⊗ X₂) Y₂ Z₂).hom\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ (Y₁ ⊗ Z₁) X₂ (Y₂ ⊗ Z₂)).hom\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ (Y₁ ⊗ Z₁) (X₂ ⊗ Y₂ ⊗ Z₂)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) Z₁ Z₂).inv\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Y₂ Z₁).hom) ⊗ 𝟙 Z₂\n[PROOFSTEP]\nrw [← tensor_comp, ← tensor_comp, ← tensor_comp, ← tensor_comp, ← tensor_comp, ← tensor_comp, ← tensor_comp, ←\n    tensor_comp, tensor_id, tensor_associativity_aux, ← tensor_id, ← id_comp (𝟙 X₁ ≫ 𝟙 X₁ ≫ 𝟙 X₁ ≫ 𝟙 X₁ ≫ 𝟙 X₁), ←\n    id_comp (𝟙 Z₂ ≫ 𝟙 Z₂ ≫ 𝟙 Z₂ ≫ 𝟙 Z₂ ≫ 𝟙 Z₂), tensor_comp, tensor_comp, tensor_comp, tensor_comp, tensor_comp,\n    tensor_comp, tensor_comp, tensor_comp, tensor_comp, tensor_comp]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| ((𝟙 X₁ ⊗ (β_ X₂ Y₁).hom ⊗ 𝟙 Y₂ ⊗ 𝟙 Z₁) ⊗ 𝟙 Z₂) ≫\n    ((𝟙 X₁ ⊗ (α_ Y₁ X₂ (Y₂ ⊗ Z₁)).hom) ⊗ 𝟙 Z₂) ≫\n      ((𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ X₂ Y₂ Z₁).inv) ⊗ 𝟙 Z₂) ≫\n        ((𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (β_ (X₂ ⊗ Y₂) Z₁).hom) ⊗ 𝟙 Z₂) ≫ ((𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ (α_ Z₁ X₂ Y₂).inv) ⊗ 𝟙 Z₂)\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ Y₁ (Z₁ ⊗ X₂) Y₂).inv) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ Y₁ Z₁ X₂).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ (((Y₁ ⊗ Z₁) ⊗ X₂) ⊗ Y₂) Z₂).hom\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ ((Y₁ ⊗ Z₁) ⊗ X₂) Y₂ Z₂).hom\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ (Y₁ ⊗ Z₁) X₂ (Y₂ ⊗ Z₂)).hom\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ (Y₁ ⊗ Z₁) (X₂ ⊗ Y₂ ⊗ Z₂)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) Z₁ Z₂).inv\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Y₂ Z₁).hom) ⊗ 𝟙 Z₂\n[PROOFSTEP]\nrw [← tensor_comp, ← tensor_comp, ← tensor_comp, ← tensor_comp, ← tensor_comp, ← tensor_comp, ← tensor_comp, ←\n  tensor_comp, tensor_id, tensor_associativity_aux, ← tensor_id, ← id_comp (𝟙 X₁ ≫ 𝟙 X₁ ≫ 𝟙 X₁ ≫ 𝟙 X₁ ≫ 𝟙 X₁), ←\n  id_comp (𝟙 Z₂ ≫ 𝟙 Z₂ ≫ 𝟙 Z₂ ≫ 𝟙 Z₂ ≫ 𝟙 Z₂), tensor_comp, tensor_comp, tensor_comp, tensor_comp, tensor_comp,\n  tensor_comp, tensor_comp, tensor_comp, tensor_comp, tensor_comp]\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n⊢ ((α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n      ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n        (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) Z₁ Z₂).inv ≫\n          ((α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂) ≫\n            ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Y₂ Z₁).hom) ⊗ 𝟙 Z₂) ≫\n              ((((((((𝟙 X₁ ⊗ (𝟙 X₂ ⊗ 𝟙 Y₁) ⊗ (β_ Y₂ Z₁).hom) ⊗ 𝟙 Z₂) ≫\n                            ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Z₁ Y₂).inv) ⊗ 𝟙 Z₂) ≫\n                              ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Z₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂) ≫\n                                ((𝟙 X₁ ⊗ (β_ X₂ (Y₁ ⊗ Z₁)).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂) ≫\n                                  ((𝟙 X₁ ⊗ (α_ Y₁ Z₁ X₂).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂) ≫\n                                    ((𝟙 X₁ ⊗ (α_ Y₁ (Z₁ ⊗ X₂) Y₂).hom) ⊗ 𝟙 Z₂)) ≫\n                          ((𝟙 X₁ ⊗ (α_ Y₁ (Z₁ ⊗ X₂) Y₂).inv) ⊗ 𝟙 Z₂)) ≫\n                        ((𝟙 X₁ ⊗ (α_ Y₁ Z₁ X₂).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂)) ≫\n                      (α_ X₁ (((Y₁ ⊗ Z₁) ⊗ X₂) ⊗ Y₂) Z₂).hom) ≫\n                    (𝟙 X₁ ⊗ (α_ ((Y₁ ⊗ Z₁) ⊗ X₂) Y₂ Z₂).hom)) ≫\n                  (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ Z₁) X₂ (Y₂ ⊗ Z₂)).hom)) ≫\n                (α_ X₁ (Y₁ ⊗ Z₁) (X₂ ⊗ Y₂ ⊗ Z₂)).inv =\n    (α_ (X₁ ⊗ X₂) (Y₁ ⊗ Y₂) (Z₁ ⊗ Z₂)).hom ≫\n      (𝟙 (X₁ ⊗ X₂) ⊗ tensor_μ C (Y₁, Y₂) (Z₁, Z₂)) ≫ tensor_μ C (X₁, X₂) (Y₁ ⊗ Z₁, Y₂ ⊗ Z₂)\n[PROOFSTEP]\nslice_lhs 11 12 =>\n  rw [← tensor_comp, ← tensor_comp, Iso.hom_inv_id]\n  simp\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| ((𝟙 X₁ ⊗ (α_ Y₁ (Z₁ ⊗ X₂) Y₂).hom) ⊗ 𝟙 Z₂) ≫ ((𝟙 X₁ ⊗ (α_ Y₁ (Z₁ ⊗ X₂) Y₂).inv) ⊗ 𝟙 Z₂)\ncase a.a.a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ Y₁ Z₁ X₂).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ (((Y₁ ⊗ Z₁) ⊗ X₂) ⊗ Y₂) Z₂).hom\ncase a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ ((Y₁ ⊗ Z₁) ⊗ X₂) Y₂ Z₂).hom\ncase a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ (Y₁ ⊗ Z₁) X₂ (Y₂ ⊗ Z₂)).hom\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ (Y₁ ⊗ Z₁) (X₂ ⊗ Y₂ ⊗ Z₂)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) Z₁ Z₂).inv\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Y₂ Z₁).hom) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (𝟙 X₂ ⊗ 𝟙 Y₁) ⊗ (β_ Y₂ Z₁).hom) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Z₁ Y₂).inv) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ X₂ Y₁ Z₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (β_ X₂ (Y₁ ⊗ Z₁)).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ Y₁ Z₁ X₂).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂\n[PROOFSTEP]\n  rw [← tensor_comp, ← tensor_comp, Iso.hom_inv_id]\n  simp\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| ((𝟙 X₁ ⊗ (α_ Y₁ (Z₁ ⊗ X₂) Y₂).hom) ⊗ 𝟙 Z₂) ≫ ((𝟙 X₁ ⊗ (α_ Y₁ (Z₁ ⊗ X₂) Y₂).inv) ⊗ 𝟙 Z₂)\ncase a.a.a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ Y₁ Z₁ X₂).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ (((Y₁ ⊗ Z₁) ⊗ X₂) ⊗ Y₂) Z₂).hom\ncase a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ ((Y₁ ⊗ Z₁) ⊗ X₂) Y₂ Z₂).hom\ncase a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ (Y₁ ⊗ Z₁) X₂ (Y₂ ⊗ Z₂)).hom\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ (Y₁ ⊗ Z₁) (X₂ ⊗ Y₂ ⊗ Z₂)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) Z₁ Z₂).inv\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Y₂ Z₁).hom) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (𝟙 X₂ ⊗ 𝟙 Y₁) ⊗ (β_ Y₂ Z₁).hom) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Z₁ Y₂).inv) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ X₂ Y₁ Z₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (β_ X₂ (Y₁ ⊗ Z₁)).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ Y₁ Z₁ X₂).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂\n[PROOFSTEP]\n  rw [← tensor_comp, ← tensor_comp, Iso.hom_inv_id]\n  simp\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| ((𝟙 X₁ ⊗ (α_ Y₁ (Z₁ ⊗ X₂) Y₂).hom) ⊗ 𝟙 Z₂) ≫ ((𝟙 X₁ ⊗ (α_ Y₁ (Z₁ ⊗ X₂) Y₂).inv) ⊗ 𝟙 Z₂)\ncase a.a.a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ Y₁ Z₁ X₂).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ (((Y₁ ⊗ Z₁) ⊗ X₂) ⊗ Y₂) Z₂).hom\ncase a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ ((Y₁ ⊗ Z₁) ⊗ X₂) Y₂ Z₂).hom\ncase a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ (Y₁ ⊗ Z₁) X₂ (Y₂ ⊗ Z₂)).hom\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ (Y₁ ⊗ Z₁) (X₂ ⊗ Y₂ ⊗ Z₂)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) Z₁ Z₂).inv\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Y₂ Z₁).hom) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (𝟙 X₂ ⊗ 𝟙 Y₁) ⊗ (β_ Y₂ Z₁).hom) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Z₁ Y₂).inv) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ X₂ Y₁ Z₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (β_ X₂ (Y₁ ⊗ Z₁)).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ Y₁ Z₁ X₂).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂\n[PROOFSTEP]\nrw [← tensor_comp, ← tensor_comp, Iso.hom_inv_id]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ≫ 𝟙 X₁ ⊗ 𝟙 ((Y₁ ⊗ Z₁ ⊗ X₂) ⊗ Y₂)) ⊗ 𝟙 Z₂ ≫ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ Y₁ Z₁ X₂).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ (((Y₁ ⊗ Z₁) ⊗ X₂) ⊗ Y₂) Z₂).hom\ncase a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ ((Y₁ ⊗ Z₁) ⊗ X₂) Y₂ Z₂).hom\ncase a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ (Y₁ ⊗ Z₁) X₂ (Y₂ ⊗ Z₂)).hom\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ (Y₁ ⊗ Z₁) (X₂ ⊗ Y₂ ⊗ Z₂)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) Z₁ Z₂).inv\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Y₂ Z₁).hom) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (𝟙 X₂ ⊗ 𝟙 Y₁) ⊗ (β_ Y₂ Z₁).hom) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Z₁ Y₂).inv) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ X₂ Y₁ Z₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (β_ X₂ (Y₁ ⊗ Z₁)).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ Y₁ Z₁ X₂).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n⊢ ((α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n      ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n        (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) Z₁ Z₂).inv ≫\n          ((α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂) ≫\n            ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Y₂ Z₁).hom) ⊗ 𝟙 Z₂) ≫\n              ((𝟙 X₁ ⊗ (𝟙 X₂ ⊗ 𝟙 Y₁) ⊗ (β_ Y₂ Z₁).hom) ⊗ 𝟙 Z₂) ≫\n                ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Z₁ Y₂).inv) ⊗ 𝟙 Z₂) ≫\n                  ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Z₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂) ≫\n                    ((𝟙 X₁ ⊗ (β_ X₂ (Y₁ ⊗ Z₁)).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂) ≫\n                      ((𝟙 X₁ ⊗ (α_ Y₁ Z₁ X₂).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂) ≫\n                        ((((𝟙 ((X₁ ⊗ (Y₁ ⊗ Z₁ ⊗ X₂) ⊗ Y₂) ⊗ Z₂) ≫ ((𝟙 X₁ ⊗ (α_ Y₁ Z₁ X₂).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂)) ≫\n                                (α_ X₁ (((Y₁ ⊗ Z₁) ⊗ X₂) ⊗ Y₂) Z₂).hom) ≫\n                              (𝟙 X₁ ⊗ (α_ ((Y₁ ⊗ Z₁) ⊗ X₂) Y₂ Z₂).hom)) ≫\n                            (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ Z₁) X₂ (Y₂ ⊗ Z₂)).hom)) ≫\n                          (α_ X₁ (Y₁ ⊗ Z₁) (X₂ ⊗ Y₂ ⊗ Z₂)).inv =\n    (α_ (X₁ ⊗ X₂) (Y₁ ⊗ Y₂) (Z₁ ⊗ Z₂)).hom ≫\n      (𝟙 (X₁ ⊗ X₂) ⊗ tensor_μ C (Y₁, Y₂) (Z₁, Z₂)) ≫ tensor_μ C (X₁, X₂) (Y₁ ⊗ Z₁, Y₂ ⊗ Z₂)\n[PROOFSTEP]\nsimp only [assoc, id_comp]\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n⊢ ((α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n      ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n        (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) Z₁ Z₂).inv ≫\n          ((α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂) ≫\n            ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Y₂ Z₁).hom) ⊗ 𝟙 Z₂) ≫\n              ((𝟙 X₁ ⊗ (𝟙 X₂ ⊗ 𝟙 Y₁) ⊗ (β_ Y₂ Z₁).hom) ⊗ 𝟙 Z₂) ≫\n                ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Z₁ Y₂).inv) ⊗ 𝟙 Z₂) ≫\n                  ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Z₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂) ≫\n                    ((𝟙 X₁ ⊗ (β_ X₂ (Y₁ ⊗ Z₁)).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂) ≫\n                      ((𝟙 X₁ ⊗ (α_ Y₁ Z₁ X₂).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂) ≫\n                        ((𝟙 X₁ ⊗ (α_ Y₁ Z₁ X₂).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂) ≫\n                          (α_ X₁ (((Y₁ ⊗ Z₁) ⊗ X₂) ⊗ Y₂) Z₂).hom ≫\n                            (𝟙 X₁ ⊗ (α_ ((Y₁ ⊗ Z₁) ⊗ X₂) Y₂ Z₂).hom) ≫\n                              (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ Z₁) X₂ (Y₂ ⊗ Z₂)).hom) ≫ (α_ X₁ (Y₁ ⊗ Z₁) (X₂ ⊗ Y₂ ⊗ Z₂)).inv =\n    (α_ (X₁ ⊗ X₂) (Y₁ ⊗ Y₂) (Z₁ ⊗ Z₂)).hom ≫\n      (𝟙 (X₁ ⊗ X₂) ⊗ tensor_μ C (Y₁, Y₂) (Z₁, Z₂)) ≫ tensor_μ C (X₁, X₂) (Y₁ ⊗ Z₁, Y₂ ⊗ Z₂)\n[PROOFSTEP]\nslice_lhs 10 11 =>\n  rw [← tensor_comp, ← tensor_comp, ← tensor_comp, Iso.hom_inv_id]\n  simp\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| ((𝟙 X₁ ⊗ (α_ Y₁ Z₁ X₂).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂) ≫ ((𝟙 X₁ ⊗ (α_ Y₁ Z₁ X₂).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂)\ncase a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ (((Y₁ ⊗ Z₁) ⊗ X₂) ⊗ Y₂) Z₂).hom\ncase a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ ((Y₁ ⊗ Z₁) ⊗ X₂) Y₂ Z₂).hom\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ (Y₁ ⊗ Z₁) X₂ (Y₂ ⊗ Z₂)).hom\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ (Y₁ ⊗ Z₁) (X₂ ⊗ Y₂ ⊗ Z₂)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) Z₁ Z₂).inv\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Y₂ Z₁).hom) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (𝟙 X₂ ⊗ 𝟙 Y₁) ⊗ (β_ Y₂ Z₁).hom) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Z₁ Y₂).inv) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ X₂ Y₁ Z₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (β_ X₂ (Y₁ ⊗ Z₁)).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂\n[PROOFSTEP]\n  rw [← tensor_comp, ← tensor_comp, ← tensor_comp, Iso.hom_inv_id]\n  simp\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| ((𝟙 X₁ ⊗ (α_ Y₁ Z₁ X₂).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂) ≫ ((𝟙 X₁ ⊗ (α_ Y₁ Z₁ X₂).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂)\ncase a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ (((Y₁ ⊗ Z₁) ⊗ X₂) ⊗ Y₂) Z₂).hom\ncase a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ ((Y₁ ⊗ Z₁) ⊗ X₂) Y₂ Z₂).hom\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ (Y₁ ⊗ Z₁) X₂ (Y₂ ⊗ Z₂)).hom\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ (Y₁ ⊗ Z₁) (X₂ ⊗ Y₂ ⊗ Z₂)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) Z₁ Z₂).inv\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Y₂ Z₁).hom) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (𝟙 X₂ ⊗ 𝟙 Y₁) ⊗ (β_ Y₂ Z₁).hom) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Z₁ Y₂).inv) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ X₂ Y₁ Z₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (β_ X₂ (Y₁ ⊗ Z₁)).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂\n[PROOFSTEP]\n  rw [← tensor_comp, ← tensor_comp, ← tensor_comp, Iso.hom_inv_id]\n  simp\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| ((𝟙 X₁ ⊗ (α_ Y₁ Z₁ X₂).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂) ≫ ((𝟙 X₁ ⊗ (α_ Y₁ Z₁ X₂).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂)\ncase a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ (((Y₁ ⊗ Z₁) ⊗ X₂) ⊗ Y₂) Z₂).hom\ncase a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ ((Y₁ ⊗ Z₁) ⊗ X₂) Y₂ Z₂).hom\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ (Y₁ ⊗ Z₁) X₂ (Y₂ ⊗ Z₂)).hom\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ (Y₁ ⊗ Z₁) (X₂ ⊗ Y₂ ⊗ Z₂)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) Z₁ Z₂).inv\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Y₂ Z₁).hom) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (𝟙 X₂ ⊗ 𝟙 Y₁) ⊗ (β_ Y₂ Z₁).hom) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Z₁ Y₂).inv) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ X₂ Y₁ Z₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (β_ X₂ (Y₁ ⊗ Z₁)).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂\n[PROOFSTEP]\nrw [← tensor_comp, ← tensor_comp, ← tensor_comp, Iso.hom_inv_id]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ≫ 𝟙 X₁ ⊗ 𝟙 ((Y₁ ⊗ Z₁) ⊗ X₂) ⊗ 𝟙 Y₂ ≫ 𝟙 Y₂) ⊗ 𝟙 Z₂ ≫ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ (((Y₁ ⊗ Z₁) ⊗ X₂) ⊗ Y₂) Z₂).hom\ncase a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ ((Y₁ ⊗ Z₁) ⊗ X₂) Y₂ Z₂).hom\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ (Y₁ ⊗ Z₁) X₂ (Y₂ ⊗ Z₂)).hom\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ (Y₁ ⊗ Z₁) (X₂ ⊗ Y₂ ⊗ Z₂)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) Z₁ Z₂).inv\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Y₂ Z₁).hom) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (𝟙 X₂ ⊗ 𝟙 Y₁) ⊗ (β_ Y₂ Z₁).hom) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Z₁ Y₂).inv) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ X₂ Y₁ Z₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (β_ X₂ (Y₁ ⊗ Z₁)).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n⊢ ((α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n      ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n        (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) Z₁ Z₂).inv ≫\n          ((α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂) ≫\n            ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Y₂ Z₁).hom) ⊗ 𝟙 Z₂) ≫\n              ((𝟙 X₁ ⊗ (𝟙 X₂ ⊗ 𝟙 Y₁) ⊗ (β_ Y₂ Z₁).hom) ⊗ 𝟙 Z₂) ≫\n                ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Z₁ Y₂).inv) ⊗ 𝟙 Z₂) ≫\n                  ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Z₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂) ≫\n                    ((𝟙 X₁ ⊗ (β_ X₂ (Y₁ ⊗ Z₁)).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂) ≫\n                      (((𝟙 ((X₁ ⊗ ((Y₁ ⊗ Z₁) ⊗ X₂) ⊗ Y₂) ⊗ Z₂) ≫ (α_ X₁ (((Y₁ ⊗ Z₁) ⊗ X₂) ⊗ Y₂) Z₂).hom) ≫\n                            (𝟙 X₁ ⊗ (α_ ((Y₁ ⊗ Z₁) ⊗ X₂) Y₂ Z₂).hom)) ≫\n                          (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ Z₁) X₂ (Y₂ ⊗ Z₂)).hom)) ≫\n                        (α_ X₁ (Y₁ ⊗ Z₁) (X₂ ⊗ Y₂ ⊗ Z₂)).inv =\n    (α_ (X₁ ⊗ X₂) (Y₁ ⊗ Y₂) (Z₁ ⊗ Z₂)).hom ≫\n      (𝟙 (X₁ ⊗ X₂) ⊗ tensor_μ C (Y₁, Y₂) (Z₁, Z₂)) ≫ tensor_μ C (X₁, X₂) (Y₁ ⊗ Z₁, Y₂ ⊗ Z₂)\n[PROOFSTEP]\nsimp only [assoc, id_comp]\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n⊢ ((α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n      ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n        (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) Z₁ Z₂).inv ≫\n          ((α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂) ≫\n            ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Y₂ Z₁).hom) ⊗ 𝟙 Z₂) ≫\n              ((𝟙 X₁ ⊗ (𝟙 X₂ ⊗ 𝟙 Y₁) ⊗ (β_ Y₂ Z₁).hom) ⊗ 𝟙 Z₂) ≫\n                ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Z₁ Y₂).inv) ⊗ 𝟙 Z₂) ≫\n                  ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Z₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂) ≫\n                    ((𝟙 X₁ ⊗ (β_ X₂ (Y₁ ⊗ Z₁)).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂) ≫\n                      (α_ X₁ (((Y₁ ⊗ Z₁) ⊗ X₂) ⊗ Y₂) Z₂).hom ≫\n                        (𝟙 X₁ ⊗ (α_ ((Y₁ ⊗ Z₁) ⊗ X₂) Y₂ Z₂).hom) ≫\n                          (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ Z₁) X₂ (Y₂ ⊗ Z₂)).hom) ≫ (α_ X₁ (Y₁ ⊗ Z₁) (X₂ ⊗ Y₂ ⊗ Z₂)).inv =\n    (α_ (X₁ ⊗ X₂) (Y₁ ⊗ Y₂) (Z₁ ⊗ Z₂)).hom ≫\n      (𝟙 (X₁ ⊗ X₂) ⊗ tensor_μ C (Y₁, Y₂) (Z₁, Z₂)) ≫ tensor_μ C (X₁, X₂) (Y₁ ⊗ Z₁, Y₂ ⊗ Z₂)\n[PROOFSTEP]\nslice_lhs 9 10 => rw [associator_naturality]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| ((𝟙 X₁ ⊗ (β_ X₂ (Y₁ ⊗ Z₁)).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂) ≫ (α_ X₁ (((Y₁ ⊗ Z₁) ⊗ X₂) ⊗ Y₂) Z₂).hom\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ ((Y₁ ⊗ Z₁) ⊗ X₂) Y₂ Z₂).hom\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ (Y₁ ⊗ Z₁) X₂ (Y₂ ⊗ Z₂)).hom\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ (Y₁ ⊗ Z₁) (X₂ ⊗ Y₂ ⊗ Z₂)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) Z₁ Z₂).inv\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Y₂ Z₁).hom) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (𝟙 X₂ ⊗ 𝟙 Y₁) ⊗ (β_ Y₂ Z₁).hom) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Z₁ Y₂).inv) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ X₂ Y₁ Z₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂\n[PROOFSTEP]\nrw [associator_naturality]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| ((𝟙 X₁ ⊗ (β_ X₂ (Y₁ ⊗ Z₁)).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂) ≫ (α_ X₁ (((Y₁ ⊗ Z₁) ⊗ X₂) ⊗ Y₂) Z₂).hom\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ ((Y₁ ⊗ Z₁) ⊗ X₂) Y₂ Z₂).hom\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ (Y₁ ⊗ Z₁) X₂ (Y₂ ⊗ Z₂)).hom\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ (Y₁ ⊗ Z₁) (X₂ ⊗ Y₂ ⊗ Z₂)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) Z₁ Z₂).inv\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Y₂ Z₁).hom) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (𝟙 X₂ ⊗ 𝟙 Y₁) ⊗ (β_ Y₂ Z₁).hom) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Z₁ Y₂).inv) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ X₂ Y₁ Z₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂\n[PROOFSTEP]\nrw [associator_naturality]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| ((𝟙 X₁ ⊗ (β_ X₂ (Y₁ ⊗ Z₁)).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂) ≫ (α_ X₁ (((Y₁ ⊗ Z₁) ⊗ X₂) ⊗ Y₂) Z₂).hom\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ ((Y₁ ⊗ Z₁) ⊗ X₂) Y₂ Z₂).hom\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ (Y₁ ⊗ Z₁) X₂ (Y₂ ⊗ Z₂)).hom\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ (Y₁ ⊗ Z₁) (X₂ ⊗ Y₂ ⊗ Z₂)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) Z₁ Z₂).inv\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Y₂ Z₁).hom) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (𝟙 X₂ ⊗ 𝟙 Y₁) ⊗ (β_ Y₂ Z₁).hom) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Z₁ Y₂).inv) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ X₂ Y₁ Z₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂\n[PROOFSTEP]\nrw [associator_naturality]\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n⊢ ((α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n      ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n        (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) Z₁ Z₂).inv ≫\n          ((α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂) ≫\n            ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Y₂ Z₁).hom) ⊗ 𝟙 Z₂) ≫\n              ((𝟙 X₁ ⊗ (𝟙 X₂ ⊗ 𝟙 Y₁) ⊗ (β_ Y₂ Z₁).hom) ⊗ 𝟙 Z₂) ≫\n                ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Z₁ Y₂).inv) ⊗ 𝟙 Z₂) ≫\n                  ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Z₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂) ≫\n                    ((((α_ X₁ ((X₂ ⊗ Y₁ ⊗ Z₁) ⊗ Y₂) Z₂).hom ≫ (𝟙 X₁ ⊗ ((β_ X₂ (Y₁ ⊗ Z₁)).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂)) ≫\n                          (𝟙 X₁ ⊗ (α_ ((Y₁ ⊗ Z₁) ⊗ X₂) Y₂ Z₂).hom)) ≫\n                        (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ Z₁) X₂ (Y₂ ⊗ Z₂)).hom)) ≫\n                      (α_ X₁ (Y₁ ⊗ Z₁) (X₂ ⊗ Y₂ ⊗ Z₂)).inv =\n    (α_ (X₁ ⊗ X₂) (Y₁ ⊗ Y₂) (Z₁ ⊗ Z₂)).hom ≫\n      (𝟙 (X₁ ⊗ X₂) ⊗ tensor_μ C (Y₁, Y₂) (Z₁, Z₂)) ≫ tensor_μ C (X₁, X₂) (Y₁ ⊗ Z₁, Y₂ ⊗ Z₂)\n[PROOFSTEP]\nslice_lhs 10 11 => rw [← tensor_comp, associator_naturality, tensor_comp]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ ((β_ X₂ (Y₁ ⊗ Z₁)).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂) ≫ (𝟙 X₁ ⊗ (α_ ((Y₁ ⊗ Z₁) ⊗ X₂) Y₂ Z₂).hom)\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ (Y₁ ⊗ Z₁) X₂ (Y₂ ⊗ Z₂)).hom\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ (Y₁ ⊗ Z₁) (X₂ ⊗ Y₂ ⊗ Z₂)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) Z₁ Z₂).inv\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Y₂ Z₁).hom) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (𝟙 X₂ ⊗ 𝟙 Y₁) ⊗ (β_ Y₂ Z₁).hom) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Z₁ Y₂).inv) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ X₂ Y₁ Z₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ ((X₂ ⊗ Y₁ ⊗ Z₁) ⊗ Y₂) Z₂).hom\n[PROOFSTEP]\nrw [← tensor_comp, associator_naturality, tensor_comp]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ ((β_ X₂ (Y₁ ⊗ Z₁)).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂) ≫ (𝟙 X₁ ⊗ (α_ ((Y₁ ⊗ Z₁) ⊗ X₂) Y₂ Z₂).hom)\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ (Y₁ ⊗ Z₁) X₂ (Y₂ ⊗ Z₂)).hom\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ (Y₁ ⊗ Z₁) (X₂ ⊗ Y₂ ⊗ Z₂)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) Z₁ Z₂).inv\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Y₂ Z₁).hom) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (𝟙 X₂ ⊗ 𝟙 Y₁) ⊗ (β_ Y₂ Z₁).hom) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Z₁ Y₂).inv) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ X₂ Y₁ Z₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ ((X₂ ⊗ Y₁ ⊗ Z₁) ⊗ Y₂) Z₂).hom\n[PROOFSTEP]\nrw [← tensor_comp, associator_naturality, tensor_comp]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ ((β_ X₂ (Y₁ ⊗ Z₁)).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂) ≫ (𝟙 X₁ ⊗ (α_ ((Y₁ ⊗ Z₁) ⊗ X₂) Y₂ Z₂).hom)\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ (Y₁ ⊗ Z₁) X₂ (Y₂ ⊗ Z₂)).hom\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ (Y₁ ⊗ Z₁) (X₂ ⊗ Y₂ ⊗ Z₂)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) Z₁ Z₂).inv\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Y₂ Z₁).hom) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (𝟙 X₂ ⊗ 𝟙 Y₁) ⊗ (β_ Y₂ Z₁).hom) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Z₁ Y₂).inv) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ X₂ Y₁ Z₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ ((X₂ ⊗ Y₁ ⊗ Z₁) ⊗ Y₂) Z₂).hom\n[PROOFSTEP]\nrw [← tensor_comp, associator_naturality, tensor_comp]\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n⊢ ((α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n      ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n        (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) Z₁ Z₂).inv ≫\n          ((α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂) ≫\n            ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Y₂ Z₁).hom) ⊗ 𝟙 Z₂) ≫\n              ((𝟙 X₁ ⊗ (𝟙 X₂ ⊗ 𝟙 Y₁) ⊗ (β_ Y₂ Z₁).hom) ⊗ 𝟙 Z₂) ≫\n                ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Z₁ Y₂).inv) ⊗ 𝟙 Z₂) ≫\n                  ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Z₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂) ≫\n                    (α_ X₁ ((X₂ ⊗ Y₁ ⊗ Z₁) ⊗ Y₂) Z₂).hom ≫\n                      (((𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁ ⊗ Z₁) Y₂ Z₂).hom) ≫ (𝟙 X₁ ⊗ (β_ X₂ (Y₁ ⊗ Z₁)).hom ⊗ 𝟙 Y₂ ⊗ 𝟙 Z₂)) ≫\n                          (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ Z₁) X₂ (Y₂ ⊗ Z₂)).hom)) ≫\n                        (α_ X₁ (Y₁ ⊗ Z₁) (X₂ ⊗ Y₂ ⊗ Z₂)).inv =\n    (α_ (X₁ ⊗ X₂) (Y₁ ⊗ Y₂) (Z₁ ⊗ Z₂)).hom ≫\n      (𝟙 (X₁ ⊗ X₂) ⊗ tensor_μ C (Y₁, Y₂) (Z₁, Z₂)) ≫ tensor_μ C (X₁, X₂) (Y₁ ⊗ Z₁, Y₂ ⊗ Z₂)\n[PROOFSTEP]\nslice_lhs 11 13 => rw [tensor_id, ← tensor_μ_def₂]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (β_ X₂ (Y₁ ⊗ Z₁)).hom ⊗ 𝟙 Y₂ ⊗ 𝟙 Z₂) ≫\n    (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ Z₁) X₂ (Y₂ ⊗ Z₂)).hom) ≫ (α_ X₁ (Y₁ ⊗ Z₁) (X₂ ⊗ Y₂ ⊗ Z₂)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) Z₁ Z₂).inv\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Y₂ Z₁).hom) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (𝟙 X₂ ⊗ 𝟙 Y₁) ⊗ (β_ Y₂ Z₁).hom) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Z₁ Y₂).inv) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ X₂ Y₁ Z₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ ((X₂ ⊗ Y₁ ⊗ Z₁) ⊗ Y₂) Z₂).hom\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁ ⊗ Z₁) Y₂ Z₂).hom\n[PROOFSTEP]\nrw [tensor_id, ← tensor_μ_def₂]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (β_ X₂ (Y₁ ⊗ Z₁)).hom ⊗ 𝟙 Y₂ ⊗ 𝟙 Z₂) ≫\n    (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ Z₁) X₂ (Y₂ ⊗ Z₂)).hom) ≫ (α_ X₁ (Y₁ ⊗ Z₁) (X₂ ⊗ Y₂ ⊗ Z₂)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) Z₁ Z₂).inv\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Y₂ Z₁).hom) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (𝟙 X₂ ⊗ 𝟙 Y₁) ⊗ (β_ Y₂ Z₁).hom) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Z₁ Y₂).inv) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ X₂ Y₁ Z₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ ((X₂ ⊗ Y₁ ⊗ Z₁) ⊗ Y₂) Z₂).hom\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁ ⊗ Z₁) Y₂ Z₂).hom\n[PROOFSTEP]\nrw [tensor_id, ← tensor_μ_def₂]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (β_ X₂ (Y₁ ⊗ Z₁)).hom ⊗ 𝟙 Y₂ ⊗ 𝟙 Z₂) ≫\n    (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ Z₁) X₂ (Y₂ ⊗ Z₂)).hom) ≫ (α_ X₁ (Y₁ ⊗ Z₁) (X₂ ⊗ Y₂ ⊗ Z₂)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) Z₁ Z₂).inv\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Y₂ Z₁).hom) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (𝟙 X₂ ⊗ 𝟙 Y₁) ⊗ (β_ Y₂ Z₁).hom) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Z₁ Y₂).inv) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ X₂ Y₁ Z₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ ((X₂ ⊗ Y₁ ⊗ Z₁) ⊗ Y₂) Z₂).hom\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁ ⊗ Z₁) Y₂ Z₂).hom\n[PROOFSTEP]\nrw [tensor_id, ← tensor_μ_def₂]\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n⊢ ((α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n      ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n        (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) Z₁ Z₂).inv ≫\n          ((α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂) ≫\n            ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Y₂ Z₁).hom) ⊗ 𝟙 Z₂) ≫\n              ((𝟙 X₁ ⊗ (𝟙 X₂ ⊗ 𝟙 Y₁) ⊗ (β_ Y₂ Z₁).hom) ⊗ 𝟙 Z₂) ≫\n                ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Z₁ Y₂).inv) ⊗ 𝟙 Z₂) ≫\n                  ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Z₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂) ≫\n                    (α_ X₁ ((X₂ ⊗ Y₁ ⊗ Z₁) ⊗ Y₂) Z₂).hom ≫\n                      (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁ ⊗ Z₁) Y₂ Z₂).hom) ≫\n                        (𝟙 X₁ ⊗ (α_ X₂ (Y₁ ⊗ Z₁) (Y₂ ⊗ Z₂)).hom) ≫\n                          (α_ X₁ X₂ ((Y₁ ⊗ Z₁) ⊗ Y₂ ⊗ Z₂)).inv ≫ tensor_μ C (X₁, X₂) (Y₁ ⊗ Z₁, Y₂ ⊗ Z₂) =\n    (α_ (X₁ ⊗ X₂) (Y₁ ⊗ Y₂) (Z₁ ⊗ Z₂)).hom ≫\n      (𝟙 (X₁ ⊗ X₂) ⊗ tensor_μ C (Y₁, Y₂) (Z₁, Z₂)) ≫ tensor_μ C (X₁, X₂) (Y₁ ⊗ Z₁, Y₂ ⊗ Z₂)\n[PROOFSTEP]\nhave :\n  ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Z₁ Y₂).inv) ⊗ 𝟙 Z₂) ≫\n      ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Z₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂) ≫\n        (α_ X₁ ((X₂ ⊗ Y₁ ⊗ Z₁) ⊗ Y₂) Z₂).hom ≫\n          (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁ ⊗ Z₁) Y₂ Z₂).hom) ≫\n            (𝟙 X₁ ⊗ (α_ X₂ (Y₁ ⊗ Z₁) (Y₂ ⊗ Z₂)).hom) ≫ (α_ X₁ X₂ ((Y₁ ⊗ Z₁) ⊗ Y₂ ⊗ Z₂)).inv =\n    (α_ X₁ ((X₂ ⊗ Y₁) ⊗ Z₁ ⊗ Y₂) Z₂).hom ≫\n      (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) (Z₁ ⊗ Y₂) Z₂).hom) ≫\n        (𝟙 X₁ ⊗ (α_ X₂ Y₁ ((Z₁ ⊗ Y₂) ⊗ Z₂)).hom) ≫\n          (α_ X₁ X₂ (Y₁ ⊗ (Z₁ ⊗ Y₂) ⊗ Z₂)).inv ≫\n            (𝟙 (X₁ ⊗ X₂) ⊗ 𝟙 Y₁ ⊗ (α_ Z₁ Y₂ Z₂).hom) ≫ (𝟙 (X₁ ⊗ X₂) ⊗ (α_ Y₁ Z₁ (Y₂ ⊗ Z₂)).inv) :=\n  by pure_coherence\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n⊢ ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Z₁ Y₂).inv) ⊗ 𝟙 Z₂) ≫\n      ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Z₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂) ≫\n        (α_ X₁ ((X₂ ⊗ Y₁ ⊗ Z₁) ⊗ Y₂) Z₂).hom ≫\n          (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁ ⊗ Z₁) Y₂ Z₂).hom) ≫\n            (𝟙 X₁ ⊗ (α_ X₂ (Y₁ ⊗ Z₁) (Y₂ ⊗ Z₂)).hom) ≫ (α_ X₁ X₂ ((Y₁ ⊗ Z₁) ⊗ Y₂ ⊗ Z₂)).inv =\n    (α_ X₁ ((X₂ ⊗ Y₁) ⊗ Z₁ ⊗ Y₂) Z₂).hom ≫\n      (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) (Z₁ ⊗ Y₂) Z₂).hom) ≫\n        (𝟙 X₁ ⊗ (α_ X₂ Y₁ ((Z₁ ⊗ Y₂) ⊗ Z₂)).hom) ≫\n          (α_ X₁ X₂ (Y₁ ⊗ (Z₁ ⊗ Y₂) ⊗ Z₂)).inv ≫\n            (𝟙 (X₁ ⊗ X₂) ⊗ 𝟙 Y₁ ⊗ (α_ Z₁ Y₂ Z₂).hom) ≫ (𝟙 (X₁ ⊗ X₂) ⊗ (α_ Y₁ Z₁ (Y₂ ⊗ Z₂)).inv)\n[PROOFSTEP]\npure_coherence\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\nthis :\n  ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Z₁ Y₂).inv) ⊗ 𝟙 Z₂) ≫\n      ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Z₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂) ≫\n        (α_ X₁ ((X₂ ⊗ Y₁ ⊗ Z₁) ⊗ Y₂) Z₂).hom ≫\n          (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁ ⊗ Z₁) Y₂ Z₂).hom) ≫\n            (𝟙 X₁ ⊗ (α_ X₂ (Y₁ ⊗ Z₁) (Y₂ ⊗ Z₂)).hom) ≫ (α_ X₁ X₂ ((Y₁ ⊗ Z₁) ⊗ Y₂ ⊗ Z₂)).inv =\n    (α_ X₁ ((X₂ ⊗ Y₁) ⊗ Z₁ ⊗ Y₂) Z₂).hom ≫\n      (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) (Z₁ ⊗ Y₂) Z₂).hom) ≫\n        (𝟙 X₁ ⊗ (α_ X₂ Y₁ ((Z₁ ⊗ Y₂) ⊗ Z₂)).hom) ≫\n          (α_ X₁ X₂ (Y₁ ⊗ (Z₁ ⊗ Y₂) ⊗ Z₂)).inv ≫\n            (𝟙 (X₁ ⊗ X₂) ⊗ 𝟙 Y₁ ⊗ (α_ Z₁ Y₂ Z₂).hom) ≫ (𝟙 (X₁ ⊗ X₂) ⊗ (α_ Y₁ Z₁ (Y₂ ⊗ Z₂)).inv)\n⊢ ((α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n      ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n        (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) Z₁ Z₂).inv ≫\n          ((α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂) ≫\n            ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Y₂ Z₁).hom) ⊗ 𝟙 Z₂) ≫\n              ((𝟙 X₁ ⊗ (𝟙 X₂ ⊗ 𝟙 Y₁) ⊗ (β_ Y₂ Z₁).hom) ⊗ 𝟙 Z₂) ≫\n                ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Z₁ Y₂).inv) ⊗ 𝟙 Z₂) ≫\n                  ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Z₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂) ≫\n                    (α_ X₁ ((X₂ ⊗ Y₁ ⊗ Z₁) ⊗ Y₂) Z₂).hom ≫\n                      (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁ ⊗ Z₁) Y₂ Z₂).hom) ≫\n                        (𝟙 X₁ ⊗ (α_ X₂ (Y₁ ⊗ Z₁) (Y₂ ⊗ Z₂)).hom) ≫\n                          (α_ X₁ X₂ ((Y₁ ⊗ Z₁) ⊗ Y₂ ⊗ Z₂)).inv ≫ tensor_μ C (X₁, X₂) (Y₁ ⊗ Z₁, Y₂ ⊗ Z₂) =\n    (α_ (X₁ ⊗ X₂) (Y₁ ⊗ Y₂) (Z₁ ⊗ Z₂)).hom ≫\n      (𝟙 (X₁ ⊗ X₂) ⊗ tensor_μ C (Y₁, Y₂) (Z₁, Z₂)) ≫ tensor_μ C (X₁, X₂) (Y₁ ⊗ Z₁, Y₂ ⊗ Z₂)\n[PROOFSTEP]\nslice_lhs 7 12 => rw [this]\n[GOAL]\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\nthis :\n  ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Z₁ Y₂).inv) ⊗ 𝟙 Z₂) ≫\n      ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Z₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂) ≫\n        (α_ X₁ ((X₂ ⊗ Y₁ ⊗ Z₁) ⊗ Y₂) Z₂).hom ≫\n          (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁ ⊗ Z₁) Y₂ Z₂).hom) ≫\n            (𝟙 X₁ ⊗ (α_ X₂ (Y₁ ⊗ Z₁) (Y₂ ⊗ Z₂)).hom) ≫ (α_ X₁ X₂ ((Y₁ ⊗ Z₁) ⊗ Y₂ ⊗ Z₂)).inv =\n    (α_ X₁ ((X₂ ⊗ Y₁) ⊗ Z₁ ⊗ Y₂) Z₂).hom ≫\n      (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) (Z₁ ⊗ Y₂) Z₂).hom) ≫\n        (𝟙 X₁ ⊗ (α_ X₂ Y₁ ((Z₁ ⊗ Y₂) ⊗ Z₂)).hom) ≫\n          (α_ X₁ X₂ (Y₁ ⊗ (Z₁ ⊗ Y₂) ⊗ Z₂)).inv ≫\n            (𝟙 (X₁ ⊗ X₂) ⊗ 𝟙 Y₁ ⊗ (α_ Z₁ Y₂ Z₂).hom) ≫ (𝟙 (X₁ ⊗ X₂) ⊗ (α_ Y₁ Z₁ (Y₂ ⊗ Z₂)).inv)\n| ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Z₁ Y₂).inv) ⊗ 𝟙 Z₂) ≫\n    ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Z₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂) ≫\n      (α_ X₁ ((X₂ ⊗ Y₁ ⊗ Z₁) ⊗ Y₂) Z₂).hom ≫\n        (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁ ⊗ Z₁) Y₂ Z₂).hom) ≫\n          (𝟙 X₁ ⊗ (α_ X₂ (Y₁ ⊗ Z₁) (Y₂ ⊗ Z₂)).hom) ≫ (α_ X₁ X₂ ((Y₁ ⊗ Z₁) ⊗ Y₂ ⊗ Z₂)).inv\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\nthis :\n  ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Z₁ Y₂).inv) ⊗ 𝟙 Z₂) ≫\n      ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Z₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂) ≫\n        (α_ X₁ ((X₂ ⊗ Y₁ ⊗ Z₁) ⊗ Y₂) Z₂).hom ≫\n          (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁ ⊗ Z₁) Y₂ Z₂).hom) ≫\n            (𝟙 X₁ ⊗ (α_ X₂ (Y₁ ⊗ Z₁) (Y₂ ⊗ Z₂)).hom) ≫ (α_ X₁ X₂ ((Y₁ ⊗ Z₁) ⊗ Y₂ ⊗ Z₂)).inv =\n    (α_ X₁ ((X₂ ⊗ Y₁) ⊗ Z₁ ⊗ Y₂) Z₂).hom ≫\n      (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) (Z₁ ⊗ Y₂) Z₂).hom) ≫\n        (𝟙 X₁ ⊗ (α_ X₂ Y₁ ((Z₁ ⊗ Y₂) ⊗ Z₂)).hom) ≫\n          (α_ X₁ X₂ (Y₁ ⊗ (Z₁ ⊗ Y₂) ⊗ Z₂)).inv ≫\n            (𝟙 (X₁ ⊗ X₂) ⊗ 𝟙 Y₁ ⊗ (α_ Z₁ Y₂ Z₂).hom) ≫ (𝟙 (X₁ ⊗ X₂) ⊗ (α_ Y₁ Z₁ (Y₂ ⊗ Z₂)).inv)\n| tensor_μ C (X₁, X₂) (Y₁ ⊗ Z₁, Y₂ ⊗ Z₂)\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\nthis :\n  ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Z₁ Y₂).inv) ⊗ 𝟙 Z₂) ≫\n      ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Z₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂) ≫\n        (α_ X₁ ((X₂ ⊗ Y₁ ⊗ Z₁) ⊗ Y₂) Z₂).hom ≫\n          (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁ ⊗ Z₁) Y₂ Z₂).hom) ≫\n            (𝟙 X₁ ⊗ (α_ X₂ (Y₁ ⊗ Z₁) (Y₂ ⊗ Z₂)).hom) ≫ (α_ X₁ X₂ ((Y₁ ⊗ Z₁) ⊗ Y₂ ⊗ Z₂)).inv =\n    (α_ X₁ ((X₂ ⊗ Y₁) ⊗ Z₁ ⊗ Y₂) Z₂).hom ≫\n      (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) (Z₁ ⊗ Y₂) Z₂).hom) ≫\n        (𝟙 X₁ ⊗ (α_ X₂ Y₁ ((Z₁ ⊗ Y₂) ⊗ Z₂)).hom) ≫\n          (α_ X₁ X₂ (Y₁ ⊗ (Z₁ ⊗ Y₂) ⊗ Z₂)).inv ≫\n            (𝟙 (X₁ ⊗ X₂) ⊗ 𝟙 Y₁ ⊗ (α_ Z₁ Y₂ Z₂).hom) ≫ (𝟙 (X₁ ⊗ X₂) ⊗ (α_ Y₁ Z₁ (Y₂ ⊗ Z₂)).inv)\n| (α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\nthis :\n  ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Z₁ Y₂).inv) ⊗ 𝟙 Z₂) ≫\n      ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Z₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂) ≫\n        (α_ X₁ ((X₂ ⊗ Y₁ ⊗ Z₁) ⊗ Y₂) Z₂).hom ≫\n          (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁ ⊗ Z₁) Y₂ Z₂).hom) ≫\n            (𝟙 X₁ ⊗ (α_ X₂ (Y₁ ⊗ Z₁) (Y₂ ⊗ Z₂)).hom) ≫ (α_ X₁ X₂ ((Y₁ ⊗ Z₁) ⊗ Y₂ ⊗ Z₂)).inv =\n    (α_ X₁ ((X₂ ⊗ Y₁) ⊗ Z₁ ⊗ Y₂) Z₂).hom ≫\n      (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) (Z₁ ⊗ Y₂) Z₂).hom) ≫\n        (𝟙 X₁ ⊗ (α_ X₂ Y₁ ((Z₁ ⊗ Y₂) ⊗ Z₂)).hom) ≫\n          (α_ X₁ X₂ (Y₁ ⊗ (Z₁ ⊗ Y₂) ⊗ Z₂)).inv ≫\n            (𝟙 (X₁ ⊗ X₂) ⊗ 𝟙 Y₁ ⊗ (α_ Z₁ Y₂ Z₂).hom) ≫ (𝟙 (X₁ ⊗ X₂) ⊗ (α_ Y₁ Z₁ (Y₂ ⊗ Z₂)).inv)\n| (𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\nthis :\n  ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Z₁ Y₂).inv) ⊗ 𝟙 Z₂) ≫\n      ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Z₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂) ≫\n        (α_ X₁ ((X₂ ⊗ Y₁ ⊗ Z₁) ⊗ Y₂) Z₂).hom ≫\n          (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁ ⊗ Z₁) Y₂ Z₂).hom) ≫\n            (𝟙 X₁ ⊗ (α_ X₂ (Y₁ ⊗ Z₁) (Y₂ ⊗ Z₂)).hom) ≫ (α_ X₁ X₂ ((Y₁ ⊗ Z₁) ⊗ Y₂ ⊗ Z₂)).inv =\n    (α_ X₁ ((X₂ ⊗ Y₁) ⊗ Z₁ ⊗ Y₂) Z₂).hom ≫\n      (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) (Z₁ ⊗ Y₂) Z₂).hom) ≫\n        (𝟙 X₁ ⊗ (α_ X₂ Y₁ ((Z₁ ⊗ Y₂) ⊗ Z₂)).hom) ≫\n          (α_ X₁ X₂ (Y₁ ⊗ (Z₁ ⊗ Y₂) ⊗ Z₂)).inv ≫\n            (𝟙 (X₁ ⊗ X₂) ⊗ 𝟙 Y₁ ⊗ (α_ Z₁ Y₂ Z₂).hom) ≫ (𝟙 (X₁ ⊗ X₂) ⊗ (α_ Y₁ Z₁ (Y₂ ⊗ Z₂)).inv)\n| (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) Z₁ Z₂).inv\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\nthis :\n  ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Z₁ Y₂).inv) ⊗ 𝟙 Z₂) ≫\n      ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Z₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂) ≫\n        (α_ X₁ ((X₂ ⊗ Y₁ ⊗ Z₁) ⊗ Y₂) Z₂).hom ≫\n          (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁ ⊗ Z₁) Y₂ Z₂).hom) ≫\n            (𝟙 X₁ ⊗ (α_ X₂ (Y₁ ⊗ Z₁) (Y₂ ⊗ Z₂)).hom) ≫ (α_ X₁ X₂ ((Y₁ ⊗ Z₁) ⊗ Y₂ ⊗ Z₂)).inv =\n    (α_ X₁ ((X₂ ⊗ Y₁) ⊗ Z₁ ⊗ Y₂) Z₂).hom ≫\n      (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) (Z₁ ⊗ Y₂) Z₂).hom) ≫\n        (𝟙 X₁ ⊗ (α_ X₂ Y₁ ((Z₁ ⊗ Y₂) ⊗ Z₂)).hom) ≫\n          (α_ X₁ X₂ (Y₁ ⊗ (Z₁ ⊗ Y₂) ⊗ Z₂)).inv ≫\n            (𝟙 (X₁ ⊗ X₂) ⊗ 𝟙 Y₁ ⊗ (α_ Z₁ Y₂ Z₂).hom) ≫ (𝟙 (X₁ ⊗ X₂) ⊗ (α_ Y₁ Z₁ (Y₂ ⊗ Z₂)).inv)\n| (α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\nthis :\n  ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Z₁ Y₂).inv) ⊗ 𝟙 Z₂) ≫\n      ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Z₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂) ≫\n        (α_ X₁ ((X₂ ⊗ Y₁ ⊗ Z₁) ⊗ Y₂) Z₂).hom ≫\n          (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁ ⊗ Z₁) Y₂ Z₂).hom) ≫\n            (𝟙 X₁ ⊗ (α_ X₂ (Y₁ ⊗ Z₁) (Y₂ ⊗ Z₂)).hom) ≫ (α_ X₁ X₂ ((Y₁ ⊗ Z₁) ⊗ Y₂ ⊗ Z₂)).inv =\n    (α_ X₁ ((X₂ ⊗ Y₁) ⊗ Z₁ ⊗ Y₂) Z₂).hom ≫\n      (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) (Z₁ ⊗ Y₂) Z₂).hom) ≫\n        (𝟙 X₁ ⊗ (α_ X₂ Y₁ ((Z₁ ⊗ Y₂) ⊗ Z₂)).hom) ≫\n          (α_ X₁ X₂ (Y₁ ⊗ (Z₁ ⊗ Y₂) ⊗ Z₂)).inv ≫\n            (𝟙 (X₁ ⊗ X₂) ⊗ 𝟙 Y₁ ⊗ (α_ Z₁ Y₂ Z₂).hom) ≫ (𝟙 (X₁ ⊗ X₂) ⊗ (α_ Y₁ Z₁ (Y₂ ⊗ Z₂)).inv)\n| (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Y₂ Z₁).hom) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\nthis :\n  ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Z₁ Y₂).inv) ⊗ 𝟙 Z₂) ≫\n      ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Z₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂) ≫\n        (α_ X₁ ((X₂ ⊗ Y₁ ⊗ Z₁) ⊗ Y₂) Z₂).hom ≫\n          (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁ ⊗ Z₁) Y₂ Z₂).hom) ≫\n            (𝟙 X₁ ⊗ (α_ X₂ (Y₁ ⊗ Z₁) (Y₂ ⊗ Z₂)).hom) ≫ (α_ X₁ X₂ ((Y₁ ⊗ Z₁) ⊗ Y₂ ⊗ Z₂)).inv =\n    (α_ X₁ ((X₂ ⊗ Y₁) ⊗ Z₁ ⊗ Y₂) Z₂).hom ≫\n      (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) (Z₁ ⊗ Y₂) Z₂).hom) ≫\n        (𝟙 X₁ ⊗ (α_ X₂ Y₁ ((Z₁ ⊗ Y₂) ⊗ Z₂)).hom) ≫\n          (α_ X₁ X₂ (Y₁ ⊗ (Z₁ ⊗ Y₂) ⊗ Z₂)).inv ≫\n            (𝟙 (X₁ ⊗ X₂) ⊗ 𝟙 Y₁ ⊗ (α_ Z₁ Y₂ Z₂).hom) ≫ (𝟙 (X₁ ⊗ X₂) ⊗ (α_ Y₁ Z₁ (Y₂ ⊗ Z₂)).inv)\n| (𝟙 X₁ ⊗ (𝟙 X₂ ⊗ 𝟙 Y₁) ⊗ (β_ Y₂ Z₁).hom) ⊗ 𝟙 Z₂\n[PROOFSTEP]\nrw [this]\n[GOAL]\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\nthis :\n  ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Z₁ Y₂).inv) ⊗ 𝟙 Z₂) ≫\n      ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Z₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂) ≫\n        (α_ X₁ ((X₂ ⊗ Y₁ ⊗ Z₁) ⊗ Y₂) Z₂).hom ≫\n          (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁ ⊗ Z₁) Y₂ Z₂).hom) ≫\n            (𝟙 X₁ ⊗ (α_ X₂ (Y₁ ⊗ Z₁) (Y₂ ⊗ Z₂)).hom) ≫ (α_ X₁ X₂ ((Y₁ ⊗ Z₁) ⊗ Y₂ ⊗ Z₂)).inv =\n    (α_ X₁ ((X₂ ⊗ Y₁) ⊗ Z₁ ⊗ Y₂) Z₂).hom ≫\n      (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) (Z₁ ⊗ Y₂) Z₂).hom) ≫\n        (𝟙 X₁ ⊗ (α_ X₂ Y₁ ((Z₁ ⊗ Y₂) ⊗ Z₂)).hom) ≫\n          (α_ X₁ X₂ (Y₁ ⊗ (Z₁ ⊗ Y₂) ⊗ Z₂)).inv ≫\n            (𝟙 (X₁ ⊗ X₂) ⊗ 𝟙 Y₁ ⊗ (α_ Z₁ Y₂ Z₂).hom) ≫ (𝟙 (X₁ ⊗ X₂) ⊗ (α_ Y₁ Z₁ (Y₂ ⊗ Z₂)).inv)\n| ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Z₁ Y₂).inv) ⊗ 𝟙 Z₂) ≫\n    ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Z₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂) ≫\n      (α_ X₁ ((X₂ ⊗ Y₁ ⊗ Z₁) ⊗ Y₂) Z₂).hom ≫\n        (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁ ⊗ Z₁) Y₂ Z₂).hom) ≫\n          (𝟙 X₁ ⊗ (α_ X₂ (Y₁ ⊗ Z₁) (Y₂ ⊗ Z₂)).hom) ≫ (α_ X₁ X₂ ((Y₁ ⊗ Z₁) ⊗ Y₂ ⊗ Z₂)).inv\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\nthis :\n  ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Z₁ Y₂).inv) ⊗ 𝟙 Z₂) ≫\n      ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Z₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂) ≫\n        (α_ X₁ ((X₂ ⊗ Y₁ ⊗ Z₁) ⊗ Y₂) Z₂).hom ≫\n          (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁ ⊗ Z₁) Y₂ Z₂).hom) ≫\n            (𝟙 X₁ ⊗ (α_ X₂ (Y₁ ⊗ Z₁) (Y₂ ⊗ Z₂)).hom) ≫ (α_ X₁ X₂ ((Y₁ ⊗ Z₁) ⊗ Y₂ ⊗ Z₂)).inv =\n    (α_ X₁ ((X₂ ⊗ Y₁) ⊗ Z₁ ⊗ Y₂) Z₂).hom ≫\n      (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) (Z₁ ⊗ Y₂) Z₂).hom) ≫\n        (𝟙 X₁ ⊗ (α_ X₂ Y₁ ((Z₁ ⊗ Y₂) ⊗ Z₂)).hom) ≫\n          (α_ X₁ X₂ (Y₁ ⊗ (Z₁ ⊗ Y₂) ⊗ Z₂)).inv ≫\n            (𝟙 (X₁ ⊗ X₂) ⊗ 𝟙 Y₁ ⊗ (α_ Z₁ Y₂ Z₂).hom) ≫ (𝟙 (X₁ ⊗ X₂) ⊗ (α_ Y₁ Z₁ (Y₂ ⊗ Z₂)).inv)\n| tensor_μ C (X₁, X₂) (Y₁ ⊗ Z₁, Y₂ ⊗ Z₂)\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\nthis :\n  ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Z₁ Y₂).inv) ⊗ 𝟙 Z₂) ≫\n      ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Z₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂) ≫\n        (α_ X₁ ((X₂ ⊗ Y₁ ⊗ Z₁) ⊗ Y₂) Z₂).hom ≫\n          (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁ ⊗ Z₁) Y₂ Z₂).hom) ≫\n            (𝟙 X₁ ⊗ (α_ X₂ (Y₁ ⊗ Z₁) (Y₂ ⊗ Z₂)).hom) ≫ (α_ X₁ X₂ ((Y₁ ⊗ Z₁) ⊗ Y₂ ⊗ Z₂)).inv =\n    (α_ X₁ ((X₂ ⊗ Y₁) ⊗ Z₁ ⊗ Y₂) Z₂).hom ≫\n      (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) (Z₁ ⊗ Y₂) Z₂).hom) ≫\n        (𝟙 X₁ ⊗ (α_ X₂ Y₁ ((Z₁ ⊗ Y₂) ⊗ Z₂)).hom) ≫\n          (α_ X₁ X₂ (Y₁ ⊗ (Z₁ ⊗ Y₂) ⊗ Z₂)).inv ≫\n            (𝟙 (X₁ ⊗ X₂) ⊗ 𝟙 Y₁ ⊗ (α_ Z₁ Y₂ Z₂).hom) ≫ (𝟙 (X₁ ⊗ X₂) ⊗ (α_ Y₁ Z₁ (Y₂ ⊗ Z₂)).inv)\n| (α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\nthis :\n  ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Z₁ Y₂).inv) ⊗ 𝟙 Z₂) ≫\n      ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Z₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂) ≫\n        (α_ X₁ ((X₂ ⊗ Y₁ ⊗ Z₁) ⊗ Y₂) Z₂).hom ≫\n          (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁ ⊗ Z₁) Y₂ Z₂).hom) ≫\n            (𝟙 X₁ ⊗ (α_ X₂ (Y₁ ⊗ Z₁) (Y₂ ⊗ Z₂)).hom) ≫ (α_ X₁ X₂ ((Y₁ ⊗ Z₁) ⊗ Y₂ ⊗ Z₂)).inv =\n    (α_ X₁ ((X₂ ⊗ Y₁) ⊗ Z₁ ⊗ Y₂) Z₂).hom ≫\n      (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) (Z₁ ⊗ Y₂) Z₂).hom) ≫\n        (𝟙 X₁ ⊗ (α_ X₂ Y₁ ((Z₁ ⊗ Y₂) ⊗ Z₂)).hom) ≫\n          (α_ X₁ X₂ (Y₁ ⊗ (Z₁ ⊗ Y₂) ⊗ Z₂)).inv ≫\n            (𝟙 (X₁ ⊗ X₂) ⊗ 𝟙 Y₁ ⊗ (α_ Z₁ Y₂ Z₂).hom) ≫ (𝟙 (X₁ ⊗ X₂) ⊗ (α_ Y₁ Z₁ (Y₂ ⊗ Z₂)).inv)\n| (𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\nthis :\n  ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Z₁ Y₂).inv) ⊗ 𝟙 Z₂) ≫\n      ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Z₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂) ≫\n        (α_ X₁ ((X₂ ⊗ Y₁ ⊗ Z₁) ⊗ Y₂) Z₂).hom ≫\n          (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁ ⊗ Z₁) Y₂ Z₂).hom) ≫\n            (𝟙 X₁ ⊗ (α_ X₂ (Y₁ ⊗ Z₁) (Y₂ ⊗ Z₂)).hom) ≫ (α_ X₁ X₂ ((Y₁ ⊗ Z₁) ⊗ Y₂ ⊗ Z₂)).inv =\n    (α_ X₁ ((X₂ ⊗ Y₁) ⊗ Z₁ ⊗ Y₂) Z₂).hom ≫\n      (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) (Z₁ ⊗ Y₂) Z₂).hom) ≫\n        (𝟙 X₁ ⊗ (α_ X₂ Y₁ ((Z₁ ⊗ Y₂) ⊗ Z₂)).hom) ≫\n          (α_ X₁ X₂ (Y₁ ⊗ (Z₁ ⊗ Y₂) ⊗ Z₂)).inv ≫\n            (𝟙 (X₁ ⊗ X₂) ⊗ 𝟙 Y₁ ⊗ (α_ Z₁ Y₂ Z₂).hom) ≫ (𝟙 (X₁ ⊗ X₂) ⊗ (α_ Y₁ Z₁ (Y₂ ⊗ Z₂)).inv)\n| (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) Z₁ Z₂).inv\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\nthis :\n  ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Z₁ Y₂).inv) ⊗ 𝟙 Z₂) ≫\n      ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Z₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂) ≫\n        (α_ X₁ ((X₂ ⊗ Y₁ ⊗ Z₁) ⊗ Y₂) Z₂).hom ≫\n          (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁ ⊗ Z₁) Y₂ Z₂).hom) ≫\n            (𝟙 X₁ ⊗ (α_ X₂ (Y₁ ⊗ Z₁) (Y₂ ⊗ Z₂)).hom) ≫ (α_ X₁ X₂ ((Y₁ ⊗ Z₁) ⊗ Y₂ ⊗ Z₂)).inv =\n    (α_ X₁ ((X₂ ⊗ Y₁) ⊗ Z₁ ⊗ Y₂) Z₂).hom ≫\n      (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) (Z₁ ⊗ Y₂) Z₂).hom) ≫\n        (𝟙 X₁ ⊗ (α_ X₂ Y₁ ((Z₁ ⊗ Y₂) ⊗ Z₂)).hom) ≫\n          (α_ X₁ X₂ (Y₁ ⊗ (Z₁ ⊗ Y₂) ⊗ Z₂)).inv ≫\n            (𝟙 (X₁ ⊗ X₂) ⊗ 𝟙 Y₁ ⊗ (α_ Z₁ Y₂ Z₂).hom) ≫ (𝟙 (X₁ ⊗ X₂) ⊗ (α_ Y₁ Z₁ (Y₂ ⊗ Z₂)).inv)\n| (α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\nthis :\n  ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Z₁ Y₂).inv) ⊗ 𝟙 Z₂) ≫\n      ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Z₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂) ≫\n        (α_ X₁ ((X₂ ⊗ Y₁ ⊗ Z₁) ⊗ Y₂) Z₂).hom ≫\n          (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁ ⊗ Z₁) Y₂ Z₂).hom) ≫\n            (𝟙 X₁ ⊗ (α_ X₂ (Y₁ ⊗ Z₁) (Y₂ ⊗ Z₂)).hom) ≫ (α_ X₁ X₂ ((Y₁ ⊗ Z₁) ⊗ Y₂ ⊗ Z₂)).inv =\n    (α_ X₁ ((X₂ ⊗ Y₁) ⊗ Z₁ ⊗ Y₂) Z₂).hom ≫\n      (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) (Z₁ ⊗ Y₂) Z₂).hom) ≫\n        (𝟙 X₁ ⊗ (α_ X₂ Y₁ ((Z₁ ⊗ Y₂) ⊗ Z₂)).hom) ≫\n          (α_ X₁ X₂ (Y₁ ⊗ (Z₁ ⊗ Y₂) ⊗ Z₂)).inv ≫\n            (𝟙 (X₁ ⊗ X₂) ⊗ 𝟙 Y₁ ⊗ (α_ Z₁ Y₂ Z₂).hom) ≫ (𝟙 (X₁ ⊗ X₂) ⊗ (α_ Y₁ Z₁ (Y₂ ⊗ Z₂)).inv)\n| (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Y₂ Z₁).hom) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\nthis :\n  ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Z₁ Y₂).inv) ⊗ 𝟙 Z₂) ≫\n      ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Z₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂) ≫\n        (α_ X₁ ((X₂ ⊗ Y₁ ⊗ Z₁) ⊗ Y₂) Z₂).hom ≫\n          (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁ ⊗ Z₁) Y₂ Z₂).hom) ≫\n            (𝟙 X₁ ⊗ (α_ X₂ (Y₁ ⊗ Z₁) (Y₂ ⊗ Z₂)).hom) ≫ (α_ X₁ X₂ ((Y₁ ⊗ Z₁) ⊗ Y₂ ⊗ Z₂)).inv =\n    (α_ X₁ ((X₂ ⊗ Y₁) ⊗ Z₁ ⊗ Y₂) Z₂).hom ≫\n      (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) (Z₁ ⊗ Y₂) Z₂).hom) ≫\n        (𝟙 X₁ ⊗ (α_ X₂ Y₁ ((Z₁ ⊗ Y₂) ⊗ Z₂)).hom) ≫\n          (α_ X₁ X₂ (Y₁ ⊗ (Z₁ ⊗ Y₂) ⊗ Z₂)).inv ≫\n            (𝟙 (X₁ ⊗ X₂) ⊗ 𝟙 Y₁ ⊗ (α_ Z₁ Y₂ Z₂).hom) ≫ (𝟙 (X₁ ⊗ X₂) ⊗ (α_ Y₁ Z₁ (Y₂ ⊗ Z₂)).inv)\n| (𝟙 X₁ ⊗ (𝟙 X₂ ⊗ 𝟙 Y₁) ⊗ (β_ Y₂ Z₁).hom) ⊗ 𝟙 Z₂\n[PROOFSTEP]\nrw [this]\n[GOAL]\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\nthis :\n  ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Z₁ Y₂).inv) ⊗ 𝟙 Z₂) ≫\n      ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Z₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂) ≫\n        (α_ X₁ ((X₂ ⊗ Y₁ ⊗ Z₁) ⊗ Y₂) Z₂).hom ≫\n          (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁ ⊗ Z₁) Y₂ Z₂).hom) ≫\n            (𝟙 X₁ ⊗ (α_ X₂ (Y₁ ⊗ Z₁) (Y₂ ⊗ Z₂)).hom) ≫ (α_ X₁ X₂ ((Y₁ ⊗ Z₁) ⊗ Y₂ ⊗ Z₂)).inv =\n    (α_ X₁ ((X₂ ⊗ Y₁) ⊗ Z₁ ⊗ Y₂) Z₂).hom ≫\n      (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) (Z₁ ⊗ Y₂) Z₂).hom) ≫\n        (𝟙 X₁ ⊗ (α_ X₂ Y₁ ((Z₁ ⊗ Y₂) ⊗ Z₂)).hom) ≫\n          (α_ X₁ X₂ (Y₁ ⊗ (Z₁ ⊗ Y₂) ⊗ Z₂)).inv ≫\n            (𝟙 (X₁ ⊗ X₂) ⊗ 𝟙 Y₁ ⊗ (α_ Z₁ Y₂ Z₂).hom) ≫ (𝟙 (X₁ ⊗ X₂) ⊗ (α_ Y₁ Z₁ (Y₂ ⊗ Z₂)).inv)\n| ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Z₁ Y₂).inv) ⊗ 𝟙 Z₂) ≫\n    ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Z₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂) ≫\n      (α_ X₁ ((X₂ ⊗ Y₁ ⊗ Z₁) ⊗ Y₂) Z₂).hom ≫\n        (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁ ⊗ Z₁) Y₂ Z₂).hom) ≫\n          (𝟙 X₁ ⊗ (α_ X₂ (Y₁ ⊗ Z₁) (Y₂ ⊗ Z₂)).hom) ≫ (α_ X₁ X₂ ((Y₁ ⊗ Z₁) ⊗ Y₂ ⊗ Z₂)).inv\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\nthis :\n  ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Z₁ Y₂).inv) ⊗ 𝟙 Z₂) ≫\n      ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Z₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂) ≫\n        (α_ X₁ ((X₂ ⊗ Y₁ ⊗ Z₁) ⊗ Y₂) Z₂).hom ≫\n          (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁ ⊗ Z₁) Y₂ Z₂).hom) ≫\n            (𝟙 X₁ ⊗ (α_ X₂ (Y₁ ⊗ Z₁) (Y₂ ⊗ Z₂)).hom) ≫ (α_ X₁ X₂ ((Y₁ ⊗ Z₁) ⊗ Y₂ ⊗ Z₂)).inv =\n    (α_ X₁ ((X₂ ⊗ Y₁) ⊗ Z₁ ⊗ Y₂) Z₂).hom ≫\n      (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) (Z₁ ⊗ Y₂) Z₂).hom) ≫\n        (𝟙 X₁ ⊗ (α_ X₂ Y₁ ((Z₁ ⊗ Y₂) ⊗ Z₂)).hom) ≫\n          (α_ X₁ X₂ (Y₁ ⊗ (Z₁ ⊗ Y₂) ⊗ Z₂)).inv ≫\n            (𝟙 (X₁ ⊗ X₂) ⊗ 𝟙 Y₁ ⊗ (α_ Z₁ Y₂ Z₂).hom) ≫ (𝟙 (X₁ ⊗ X₂) ⊗ (α_ Y₁ Z₁ (Y₂ ⊗ Z₂)).inv)\n| tensor_μ C (X₁, X₂) (Y₁ ⊗ Z₁, Y₂ ⊗ Z₂)\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\nthis :\n  ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Z₁ Y₂).inv) ⊗ 𝟙 Z₂) ≫\n      ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Z₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂) ≫\n        (α_ X₁ ((X₂ ⊗ Y₁ ⊗ Z₁) ⊗ Y₂) Z₂).hom ≫\n          (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁ ⊗ Z₁) Y₂ Z₂).hom) ≫\n            (𝟙 X₁ ⊗ (α_ X₂ (Y₁ ⊗ Z₁) (Y₂ ⊗ Z₂)).hom) ≫ (α_ X₁ X₂ ((Y₁ ⊗ Z₁) ⊗ Y₂ ⊗ Z₂)).inv =\n    (α_ X₁ ((X₂ ⊗ Y₁) ⊗ Z₁ ⊗ Y₂) Z₂).hom ≫\n      (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) (Z₁ ⊗ Y₂) Z₂).hom) ≫\n        (𝟙 X₁ ⊗ (α_ X₂ Y₁ ((Z₁ ⊗ Y₂) ⊗ Z₂)).hom) ≫\n          (α_ X₁ X₂ (Y₁ ⊗ (Z₁ ⊗ Y₂) ⊗ Z₂)).inv ≫\n            (𝟙 (X₁ ⊗ X₂) ⊗ 𝟙 Y₁ ⊗ (α_ Z₁ Y₂ Z₂).hom) ≫ (𝟙 (X₁ ⊗ X₂) ⊗ (α_ Y₁ Z₁ (Y₂ ⊗ Z₂)).inv)\n| (α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\nthis :\n  ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Z₁ Y₂).inv) ⊗ 𝟙 Z₂) ≫\n      ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Z₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂) ≫\n        (α_ X₁ ((X₂ ⊗ Y₁ ⊗ Z₁) ⊗ Y₂) Z₂).hom ≫\n          (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁ ⊗ Z₁) Y₂ Z₂).hom) ≫\n            (𝟙 X₁ ⊗ (α_ X₂ (Y₁ ⊗ Z₁) (Y₂ ⊗ Z₂)).hom) ≫ (α_ X₁ X₂ ((Y₁ ⊗ Z₁) ⊗ Y₂ ⊗ Z₂)).inv =\n    (α_ X₁ ((X₂ ⊗ Y₁) ⊗ Z₁ ⊗ Y₂) Z₂).hom ≫\n      (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) (Z₁ ⊗ Y₂) Z₂).hom) ≫\n        (𝟙 X₁ ⊗ (α_ X₂ Y₁ ((Z₁ ⊗ Y₂) ⊗ Z₂)).hom) ≫\n          (α_ X₁ X₂ (Y₁ ⊗ (Z₁ ⊗ Y₂) ⊗ Z₂)).inv ≫\n            (𝟙 (X₁ ⊗ X₂) ⊗ 𝟙 Y₁ ⊗ (α_ Z₁ Y₂ Z₂).hom) ≫ (𝟙 (X₁ ⊗ X₂) ⊗ (α_ Y₁ Z₁ (Y₂ ⊗ Z₂)).inv)\n| (𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\nthis :\n  ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Z₁ Y₂).inv) ⊗ 𝟙 Z₂) ≫\n      ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Z₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂) ≫\n        (α_ X₁ ((X₂ ⊗ Y₁ ⊗ Z₁) ⊗ Y₂) Z₂).hom ≫\n          (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁ ⊗ Z₁) Y₂ Z₂).hom) ≫\n            (𝟙 X₁ ⊗ (α_ X₂ (Y₁ ⊗ Z₁) (Y₂ ⊗ Z₂)).hom) ≫ (α_ X₁ X₂ ((Y₁ ⊗ Z₁) ⊗ Y₂ ⊗ Z₂)).inv =\n    (α_ X₁ ((X₂ ⊗ Y₁) ⊗ Z₁ ⊗ Y₂) Z₂).hom ≫\n      (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) (Z₁ ⊗ Y₂) Z₂).hom) ≫\n        (𝟙 X₁ ⊗ (α_ X₂ Y₁ ((Z₁ ⊗ Y₂) ⊗ Z₂)).hom) ≫\n          (α_ X₁ X₂ (Y₁ ⊗ (Z₁ ⊗ Y₂) ⊗ Z₂)).inv ≫\n            (𝟙 (X₁ ⊗ X₂) ⊗ 𝟙 Y₁ ⊗ (α_ Z₁ Y₂ Z₂).hom) ≫ (𝟙 (X₁ ⊗ X₂) ⊗ (α_ Y₁ Z₁ (Y₂ ⊗ Z₂)).inv)\n| (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) Z₁ Z₂).inv\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\nthis :\n  ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Z₁ Y₂).inv) ⊗ 𝟙 Z₂) ≫\n      ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Z₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂) ≫\n        (α_ X₁ ((X₂ ⊗ Y₁ ⊗ Z₁) ⊗ Y₂) Z₂).hom ≫\n          (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁ ⊗ Z₁) Y₂ Z₂).hom) ≫\n            (𝟙 X₁ ⊗ (α_ X₂ (Y₁ ⊗ Z₁) (Y₂ ⊗ Z₂)).hom) ≫ (α_ X₁ X₂ ((Y₁ ⊗ Z₁) ⊗ Y₂ ⊗ Z₂)).inv =\n    (α_ X₁ ((X₂ ⊗ Y₁) ⊗ Z₁ ⊗ Y₂) Z₂).hom ≫\n      (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) (Z₁ ⊗ Y₂) Z₂).hom) ≫\n        (𝟙 X₁ ⊗ (α_ X₂ Y₁ ((Z₁ ⊗ Y₂) ⊗ Z₂)).hom) ≫\n          (α_ X₁ X₂ (Y₁ ⊗ (Z₁ ⊗ Y₂) ⊗ Z₂)).inv ≫\n            (𝟙 (X₁ ⊗ X₂) ⊗ 𝟙 Y₁ ⊗ (α_ Z₁ Y₂ Z₂).hom) ≫ (𝟙 (X₁ ⊗ X₂) ⊗ (α_ Y₁ Z₁ (Y₂ ⊗ Z₂)).inv)\n| (α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\nthis :\n  ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Z₁ Y₂).inv) ⊗ 𝟙 Z₂) ≫\n      ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Z₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂) ≫\n        (α_ X₁ ((X₂ ⊗ Y₁ ⊗ Z₁) ⊗ Y₂) Z₂).hom ≫\n          (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁ ⊗ Z₁) Y₂ Z₂).hom) ≫\n            (𝟙 X₁ ⊗ (α_ X₂ (Y₁ ⊗ Z₁) (Y₂ ⊗ Z₂)).hom) ≫ (α_ X₁ X₂ ((Y₁ ⊗ Z₁) ⊗ Y₂ ⊗ Z₂)).inv =\n    (α_ X₁ ((X₂ ⊗ Y₁) ⊗ Z₁ ⊗ Y₂) Z₂).hom ≫\n      (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) (Z₁ ⊗ Y₂) Z₂).hom) ≫\n        (𝟙 X₁ ⊗ (α_ X₂ Y₁ ((Z₁ ⊗ Y₂) ⊗ Z₂)).hom) ≫\n          (α_ X₁ X₂ (Y₁ ⊗ (Z₁ ⊗ Y₂) ⊗ Z₂)).inv ≫\n            (𝟙 (X₁ ⊗ X₂) ⊗ 𝟙 Y₁ ⊗ (α_ Z₁ Y₂ Z₂).hom) ≫ (𝟙 (X₁ ⊗ X₂) ⊗ (α_ Y₁ Z₁ (Y₂ ⊗ Z₂)).inv)\n| (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Y₂ Z₁).hom) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\nthis :\n  ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Z₁ Y₂).inv) ⊗ 𝟙 Z₂) ≫\n      ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Z₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂) ≫\n        (α_ X₁ ((X₂ ⊗ Y₁ ⊗ Z₁) ⊗ Y₂) Z₂).hom ≫\n          (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁ ⊗ Z₁) Y₂ Z₂).hom) ≫\n            (𝟙 X₁ ⊗ (α_ X₂ (Y₁ ⊗ Z₁) (Y₂ ⊗ Z₂)).hom) ≫ (α_ X₁ X₂ ((Y₁ ⊗ Z₁) ⊗ Y₂ ⊗ Z₂)).inv =\n    (α_ X₁ ((X₂ ⊗ Y₁) ⊗ Z₁ ⊗ Y₂) Z₂).hom ≫\n      (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) (Z₁ ⊗ Y₂) Z₂).hom) ≫\n        (𝟙 X₁ ⊗ (α_ X₂ Y₁ ((Z₁ ⊗ Y₂) ⊗ Z₂)).hom) ≫\n          (α_ X₁ X₂ (Y₁ ⊗ (Z₁ ⊗ Y₂) ⊗ Z₂)).inv ≫\n            (𝟙 (X₁ ⊗ X₂) ⊗ 𝟙 Y₁ ⊗ (α_ Z₁ Y₂ Z₂).hom) ≫ (𝟙 (X₁ ⊗ X₂) ⊗ (α_ Y₁ Z₁ (Y₂ ⊗ Z₂)).inv)\n| (𝟙 X₁ ⊗ (𝟙 X₂ ⊗ 𝟙 Y₁) ⊗ (β_ Y₂ Z₁).hom) ⊗ 𝟙 Z₂\n[PROOFSTEP]\nrw [this]\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\nthis :\n  ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Z₁ Y₂).inv) ⊗ 𝟙 Z₂) ≫\n      ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Z₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Z₂) ≫\n        (α_ X₁ ((X₂ ⊗ Y₁ ⊗ Z₁) ⊗ Y₂) Z₂).hom ≫\n          (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁ ⊗ Z₁) Y₂ Z₂).hom) ≫\n            (𝟙 X₁ ⊗ (α_ X₂ (Y₁ ⊗ Z₁) (Y₂ ⊗ Z₂)).hom) ≫ (α_ X₁ X₂ ((Y₁ ⊗ Z₁) ⊗ Y₂ ⊗ Z₂)).inv =\n    (α_ X₁ ((X₂ ⊗ Y₁) ⊗ Z₁ ⊗ Y₂) Z₂).hom ≫\n      (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) (Z₁ ⊗ Y₂) Z₂).hom) ≫\n        (𝟙 X₁ ⊗ (α_ X₂ Y₁ ((Z₁ ⊗ Y₂) ⊗ Z₂)).hom) ≫\n          (α_ X₁ X₂ (Y₁ ⊗ (Z₁ ⊗ Y₂) ⊗ Z₂)).inv ≫\n            (𝟙 (X₁ ⊗ X₂) ⊗ 𝟙 Y₁ ⊗ (α_ Z₁ Y₂ Z₂).hom) ≫ (𝟙 (X₁ ⊗ X₂) ⊗ (α_ Y₁ Z₁ (Y₂ ⊗ Z₂)).inv)\n⊢ ((α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n      ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n        (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) Z₁ Z₂).inv ≫\n          ((α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂) ≫\n            ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Y₂ Z₁).hom) ⊗ 𝟙 Z₂) ≫\n              ((𝟙 X₁ ⊗ (𝟙 X₂ ⊗ 𝟙 Y₁) ⊗ (β_ Y₂ Z₁).hom) ⊗ 𝟙 Z₂) ≫\n                ((α_ X₁ ((X₂ ⊗ Y₁) ⊗ Z₁ ⊗ Y₂) Z₂).hom ≫\n                    (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) (Z₁ ⊗ Y₂) Z₂).hom) ≫\n                      (𝟙 X₁ ⊗ (α_ X₂ Y₁ ((Z₁ ⊗ Y₂) ⊗ Z₂)).hom) ≫\n                        (α_ X₁ X₂ (Y₁ ⊗ (Z₁ ⊗ Y₂) ⊗ Z₂)).inv ≫\n                          (𝟙 (X₁ ⊗ X₂) ⊗ 𝟙 Y₁ ⊗ (α_ Z₁ Y₂ Z₂).hom) ≫ (𝟙 (X₁ ⊗ X₂) ⊗ (α_ Y₁ Z₁ (Y₂ ⊗ Z₂)).inv)) ≫\n                  tensor_μ C (X₁, X₂) (Y₁ ⊗ Z₁, Y₂ ⊗ Z₂) =\n    (α_ (X₁ ⊗ X₂) (Y₁ ⊗ Y₂) (Z₁ ⊗ Z₂)).hom ≫\n      (𝟙 (X₁ ⊗ X₂) ⊗ tensor_μ C (Y₁, Y₂) (Z₁, Z₂)) ≫ tensor_μ C (X₁, X₂) (Y₁ ⊗ Z₁, Y₂ ⊗ Z₂)\n[PROOFSTEP]\nclear this\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n⊢ ((α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n      ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n        (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) Z₁ Z₂).inv ≫\n          ((α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂) ≫\n            ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Y₂ Z₁).hom) ⊗ 𝟙 Z₂) ≫\n              ((𝟙 X₁ ⊗ (𝟙 X₂ ⊗ 𝟙 Y₁) ⊗ (β_ Y₂ Z₁).hom) ⊗ 𝟙 Z₂) ≫\n                ((α_ X₁ ((X₂ ⊗ Y₁) ⊗ Z₁ ⊗ Y₂) Z₂).hom ≫\n                    (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) (Z₁ ⊗ Y₂) Z₂).hom) ≫\n                      (𝟙 X₁ ⊗ (α_ X₂ Y₁ ((Z₁ ⊗ Y₂) ⊗ Z₂)).hom) ≫\n                        (α_ X₁ X₂ (Y₁ ⊗ (Z₁ ⊗ Y₂) ⊗ Z₂)).inv ≫\n                          (𝟙 (X₁ ⊗ X₂) ⊗ 𝟙 Y₁ ⊗ (α_ Z₁ Y₂ Z₂).hom) ≫ (𝟙 (X₁ ⊗ X₂) ⊗ (α_ Y₁ Z₁ (Y₂ ⊗ Z₂)).inv)) ≫\n                  tensor_μ C (X₁, X₂) (Y₁ ⊗ Z₁, Y₂ ⊗ Z₂) =\n    (α_ (X₁ ⊗ X₂) (Y₁ ⊗ Y₂) (Z₁ ⊗ Z₂)).hom ≫\n      (𝟙 (X₁ ⊗ X₂) ⊗ tensor_μ C (Y₁, Y₂) (Z₁, Z₂)) ≫ tensor_μ C (X₁, X₂) (Y₁ ⊗ Z₁, Y₂ ⊗ Z₂)\n[PROOFSTEP]\nslice_lhs 6 7 => rw [associator_naturality]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| ((𝟙 X₁ ⊗ (𝟙 X₂ ⊗ 𝟙 Y₁) ⊗ (β_ Y₂ Z₁).hom) ⊗ 𝟙 Z₂) ≫ (α_ X₁ ((X₂ ⊗ Y₁) ⊗ Z₁ ⊗ Y₂) Z₂).hom\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) (Z₁ ⊗ Y₂) Z₂).hom\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ X₂ Y₁ ((Z₁ ⊗ Y₂) ⊗ Z₂)).hom\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ X₂ (Y₁ ⊗ (Z₁ ⊗ Y₂) ⊗ Z₂)).inv\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 (X₁ ⊗ X₂) ⊗ 𝟙 Y₁ ⊗ (α_ Z₁ Y₂ Z₂).hom\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 (X₁ ⊗ X₂) ⊗ (α_ Y₁ Z₁ (Y₂ ⊗ Z₂)).inv\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| tensor_μ C (X₁, X₂) (Y₁ ⊗ Z₁, Y₂ ⊗ Z₂)\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) Z₁ Z₂).inv\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Y₂ Z₁).hom) ⊗ 𝟙 Z₂\n[PROOFSTEP]\nrw [associator_naturality]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| ((𝟙 X₁ ⊗ (𝟙 X₂ ⊗ 𝟙 Y₁) ⊗ (β_ Y₂ Z₁).hom) ⊗ 𝟙 Z₂) ≫ (α_ X₁ ((X₂ ⊗ Y₁) ⊗ Z₁ ⊗ Y₂) Z₂).hom\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) (Z₁ ⊗ Y₂) Z₂).hom\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ X₂ Y₁ ((Z₁ ⊗ Y₂) ⊗ Z₂)).hom\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ X₂ (Y₁ ⊗ (Z₁ ⊗ Y₂) ⊗ Z₂)).inv\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 (X₁ ⊗ X₂) ⊗ 𝟙 Y₁ ⊗ (α_ Z₁ Y₂ Z₂).hom\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 (X₁ ⊗ X₂) ⊗ (α_ Y₁ Z₁ (Y₂ ⊗ Z₂)).inv\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| tensor_μ C (X₁, X₂) (Y₁ ⊗ Z₁, Y₂ ⊗ Z₂)\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) Z₁ Z₂).inv\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Y₂ Z₁).hom) ⊗ 𝟙 Z₂\n[PROOFSTEP]\nrw [associator_naturality]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| ((𝟙 X₁ ⊗ (𝟙 X₂ ⊗ 𝟙 Y₁) ⊗ (β_ Y₂ Z₁).hom) ⊗ 𝟙 Z₂) ≫ (α_ X₁ ((X₂ ⊗ Y₁) ⊗ Z₁ ⊗ Y₂) Z₂).hom\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) (Z₁ ⊗ Y₂) Z₂).hom\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ X₂ Y₁ ((Z₁ ⊗ Y₂) ⊗ Z₂)).hom\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ X₂ (Y₁ ⊗ (Z₁ ⊗ Y₂) ⊗ Z₂)).inv\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 (X₁ ⊗ X₂) ⊗ 𝟙 Y₁ ⊗ (α_ Z₁ Y₂ Z₂).hom\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 (X₁ ⊗ X₂) ⊗ (α_ Y₁ Z₁ (Y₂ ⊗ Z₂)).inv\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| tensor_μ C (X₁, X₂) (Y₁ ⊗ Z₁, Y₂ ⊗ Z₂)\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) Z₁ Z₂).inv\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Y₂ Z₁).hom) ⊗ 𝟙 Z₂\n[PROOFSTEP]\nrw [associator_naturality]\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n⊢ ((α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n      ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n        (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) Z₁ Z₂).inv ≫\n          ((α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂) ≫\n            ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Y₂ Z₁).hom) ⊗ 𝟙 Z₂) ≫\n              (((((((α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂ ⊗ Z₁) Z₂).hom ≫ (𝟙 X₁ ⊗ ((𝟙 X₂ ⊗ 𝟙 Y₁) ⊗ (β_ Y₂ Z₁).hom) ⊗ 𝟙 Z₂)) ≫\n                          (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) (Z₁ ⊗ Y₂) Z₂).hom)) ≫\n                        (𝟙 X₁ ⊗ (α_ X₂ Y₁ ((Z₁ ⊗ Y₂) ⊗ Z₂)).hom)) ≫\n                      (α_ X₁ X₂ (Y₁ ⊗ (Z₁ ⊗ Y₂) ⊗ Z₂)).inv) ≫\n                    (𝟙 (X₁ ⊗ X₂) ⊗ 𝟙 Y₁ ⊗ (α_ Z₁ Y₂ Z₂).hom)) ≫\n                  (𝟙 (X₁ ⊗ X₂) ⊗ (α_ Y₁ Z₁ (Y₂ ⊗ Z₂)).inv)) ≫\n                tensor_μ C (X₁, X₂) (Y₁ ⊗ Z₁, Y₂ ⊗ Z₂) =\n    (α_ (X₁ ⊗ X₂) (Y₁ ⊗ Y₂) (Z₁ ⊗ Z₂)).hom ≫\n      (𝟙 (X₁ ⊗ X₂) ⊗ tensor_μ C (Y₁, Y₂) (Z₁, Z₂)) ≫ tensor_μ C (X₁, X₂) (Y₁ ⊗ Z₁, Y₂ ⊗ Z₂)\n[PROOFSTEP]\nslice_lhs 7 8 => rw [← tensor_comp, associator_naturality, tensor_comp]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ ((𝟙 X₂ ⊗ 𝟙 Y₁) ⊗ (β_ Y₂ Z₁).hom) ⊗ 𝟙 Z₂) ≫ (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) (Z₁ ⊗ Y₂) Z₂).hom)\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ X₂ Y₁ ((Z₁ ⊗ Y₂) ⊗ Z₂)).hom\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ X₂ (Y₁ ⊗ (Z₁ ⊗ Y₂) ⊗ Z₂)).inv\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 (X₁ ⊗ X₂) ⊗ 𝟙 Y₁ ⊗ (α_ Z₁ Y₂ Z₂).hom\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 (X₁ ⊗ X₂) ⊗ (α_ Y₁ Z₁ (Y₂ ⊗ Z₂)).inv\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| tensor_μ C (X₁, X₂) (Y₁ ⊗ Z₁, Y₂ ⊗ Z₂)\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) Z₁ Z₂).inv\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Y₂ Z₁).hom) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂ ⊗ Z₁) Z₂).hom\n[PROOFSTEP]\nrw [← tensor_comp, associator_naturality, tensor_comp]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ ((𝟙 X₂ ⊗ 𝟙 Y₁) ⊗ (β_ Y₂ Z₁).hom) ⊗ 𝟙 Z₂) ≫ (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) (Z₁ ⊗ Y₂) Z₂).hom)\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ X₂ Y₁ ((Z₁ ⊗ Y₂) ⊗ Z₂)).hom\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ X₂ (Y₁ ⊗ (Z₁ ⊗ Y₂) ⊗ Z₂)).inv\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 (X₁ ⊗ X₂) ⊗ 𝟙 Y₁ ⊗ (α_ Z₁ Y₂ Z₂).hom\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 (X₁ ⊗ X₂) ⊗ (α_ Y₁ Z₁ (Y₂ ⊗ Z₂)).inv\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| tensor_μ C (X₁, X₂) (Y₁ ⊗ Z₁, Y₂ ⊗ Z₂)\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) Z₁ Z₂).inv\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Y₂ Z₁).hom) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂ ⊗ Z₁) Z₂).hom\n[PROOFSTEP]\nrw [← tensor_comp, associator_naturality, tensor_comp]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ ((𝟙 X₂ ⊗ 𝟙 Y₁) ⊗ (β_ Y₂ Z₁).hom) ⊗ 𝟙 Z₂) ≫ (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) (Z₁ ⊗ Y₂) Z₂).hom)\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ X₂ Y₁ ((Z₁ ⊗ Y₂) ⊗ Z₂)).hom\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ X₂ (Y₁ ⊗ (Z₁ ⊗ Y₂) ⊗ Z₂)).inv\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 (X₁ ⊗ X₂) ⊗ 𝟙 Y₁ ⊗ (α_ Z₁ Y₂ Z₂).hom\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 (X₁ ⊗ X₂) ⊗ (α_ Y₁ Z₁ (Y₂ ⊗ Z₂)).inv\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| tensor_μ C (X₁, X₂) (Y₁ ⊗ Z₁, Y₂ ⊗ Z₂)\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) Z₁ Z₂).inv\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Y₂ Z₁).hom) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂ ⊗ Z₁) Z₂).hom\n[PROOFSTEP]\nrw [← tensor_comp, associator_naturality, tensor_comp]\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n⊢ ((α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n      ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n        (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) Z₁ Z₂).inv ≫\n          ((α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂) ≫\n            ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Y₂ Z₁).hom) ⊗ 𝟙 Z₂) ≫\n              (α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂ ⊗ Z₁) Z₂).hom ≫\n                ((((((𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) (Y₂ ⊗ Z₁) Z₂).hom) ≫ (𝟙 X₁ ⊗ (𝟙 X₂ ⊗ 𝟙 Y₁) ⊗ (β_ Y₂ Z₁).hom ⊗ 𝟙 Z₂)) ≫\n                          (𝟙 X₁ ⊗ (α_ X₂ Y₁ ((Z₁ ⊗ Y₂) ⊗ Z₂)).hom)) ≫\n                        (α_ X₁ X₂ (Y₁ ⊗ (Z₁ ⊗ Y₂) ⊗ Z₂)).inv) ≫\n                      (𝟙 (X₁ ⊗ X₂) ⊗ 𝟙 Y₁ ⊗ (α_ Z₁ Y₂ Z₂).hom)) ≫\n                    (𝟙 (X₁ ⊗ X₂) ⊗ (α_ Y₁ Z₁ (Y₂ ⊗ Z₂)).inv)) ≫\n                  tensor_μ C (X₁, X₂) (Y₁ ⊗ Z₁, Y₂ ⊗ Z₂) =\n    (α_ (X₁ ⊗ X₂) (Y₁ ⊗ Y₂) (Z₁ ⊗ Z₂)).hom ≫\n      (𝟙 (X₁ ⊗ X₂) ⊗ tensor_μ C (Y₁, Y₂) (Z₁, Z₂)) ≫ tensor_μ C (X₁, X₂) (Y₁ ⊗ Z₁, Y₂ ⊗ Z₂)\n[PROOFSTEP]\nslice_lhs 8 9 => rw [← tensor_comp, associator_naturality, tensor_comp]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (𝟙 X₂ ⊗ 𝟙 Y₁) ⊗ (β_ Y₂ Z₁).hom ⊗ 𝟙 Z₂) ≫ (𝟙 X₁ ⊗ (α_ X₂ Y₁ ((Z₁ ⊗ Y₂) ⊗ Z₂)).hom)\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ X₂ (Y₁ ⊗ (Z₁ ⊗ Y₂) ⊗ Z₂)).inv\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 (X₁ ⊗ X₂) ⊗ 𝟙 Y₁ ⊗ (α_ Z₁ Y₂ Z₂).hom\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 (X₁ ⊗ X₂) ⊗ (α_ Y₁ Z₁ (Y₂ ⊗ Z₂)).inv\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| tensor_μ C (X₁, X₂) (Y₁ ⊗ Z₁, Y₂ ⊗ Z₂)\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) Z₁ Z₂).inv\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Y₂ Z₁).hom) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂ ⊗ Z₁) Z₂).hom\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) (Y₂ ⊗ Z₁) Z₂).hom\n[PROOFSTEP]\nrw [← tensor_comp, associator_naturality, tensor_comp]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (𝟙 X₂ ⊗ 𝟙 Y₁) ⊗ (β_ Y₂ Z₁).hom ⊗ 𝟙 Z₂) ≫ (𝟙 X₁ ⊗ (α_ X₂ Y₁ ((Z₁ ⊗ Y₂) ⊗ Z₂)).hom)\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ X₂ (Y₁ ⊗ (Z₁ ⊗ Y₂) ⊗ Z₂)).inv\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 (X₁ ⊗ X₂) ⊗ 𝟙 Y₁ ⊗ (α_ Z₁ Y₂ Z₂).hom\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 (X₁ ⊗ X₂) ⊗ (α_ Y₁ Z₁ (Y₂ ⊗ Z₂)).inv\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| tensor_μ C (X₁, X₂) (Y₁ ⊗ Z₁, Y₂ ⊗ Z₂)\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) Z₁ Z₂).inv\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Y₂ Z₁).hom) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂ ⊗ Z₁) Z₂).hom\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) (Y₂ ⊗ Z₁) Z₂).hom\n[PROOFSTEP]\nrw [← tensor_comp, associator_naturality, tensor_comp]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (𝟙 X₂ ⊗ 𝟙 Y₁) ⊗ (β_ Y₂ Z₁).hom ⊗ 𝟙 Z₂) ≫ (𝟙 X₁ ⊗ (α_ X₂ Y₁ ((Z₁ ⊗ Y₂) ⊗ Z₂)).hom)\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ X₂ (Y₁ ⊗ (Z₁ ⊗ Y₂) ⊗ Z₂)).inv\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 (X₁ ⊗ X₂) ⊗ 𝟙 Y₁ ⊗ (α_ Z₁ Y₂ Z₂).hom\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 (X₁ ⊗ X₂) ⊗ (α_ Y₁ Z₁ (Y₂ ⊗ Z₂)).inv\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| tensor_μ C (X₁, X₂) (Y₁ ⊗ Z₁, Y₂ ⊗ Z₂)\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) Z₁ Z₂).inv\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Y₂ Z₁).hom) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂ ⊗ Z₁) Z₂).hom\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) (Y₂ ⊗ Z₁) Z₂).hom\n[PROOFSTEP]\nrw [← tensor_comp, associator_naturality, tensor_comp]\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n⊢ ((α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n      ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n        (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) Z₁ Z₂).inv ≫\n          ((α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂) ≫\n            ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Y₂ Z₁).hom) ⊗ 𝟙 Z₂) ≫\n              (α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂ ⊗ Z₁) Z₂).hom ≫\n                (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) (Y₂ ⊗ Z₁) Z₂).hom) ≫\n                  (((((𝟙 X₁ ⊗ (α_ X₂ Y₁ ((Y₂ ⊗ Z₁) ⊗ Z₂)).hom) ≫ (𝟙 X₁ ⊗ 𝟙 X₂ ⊗ 𝟙 Y₁ ⊗ (β_ Y₂ Z₁).hom ⊗ 𝟙 Z₂)) ≫\n                          (α_ X₁ X₂ (Y₁ ⊗ (Z₁ ⊗ Y₂) ⊗ Z₂)).inv) ≫\n                        (𝟙 (X₁ ⊗ X₂) ⊗ 𝟙 Y₁ ⊗ (α_ Z₁ Y₂ Z₂).hom)) ≫\n                      (𝟙 (X₁ ⊗ X₂) ⊗ (α_ Y₁ Z₁ (Y₂ ⊗ Z₂)).inv)) ≫\n                    tensor_μ C (X₁, X₂) (Y₁ ⊗ Z₁, Y₂ ⊗ Z₂) =\n    (α_ (X₁ ⊗ X₂) (Y₁ ⊗ Y₂) (Z₁ ⊗ Z₂)).hom ≫\n      (𝟙 (X₁ ⊗ X₂) ⊗ tensor_μ C (Y₁, Y₂) (Z₁, Z₂)) ≫ tensor_μ C (X₁, X₂) (Y₁ ⊗ Z₁, Y₂ ⊗ Z₂)\n[PROOFSTEP]\nslice_lhs 9 10 => rw [associator_inv_naturality]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ 𝟙 X₂ ⊗ 𝟙 Y₁ ⊗ (β_ Y₂ Z₁).hom ⊗ 𝟙 Z₂) ≫ (α_ X₁ X₂ (Y₁ ⊗ (Z₁ ⊗ Y₂) ⊗ Z₂)).inv\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 (X₁ ⊗ X₂) ⊗ 𝟙 Y₁ ⊗ (α_ Z₁ Y₂ Z₂).hom\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 (X₁ ⊗ X₂) ⊗ (α_ Y₁ Z₁ (Y₂ ⊗ Z₂)).inv\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| tensor_μ C (X₁, X₂) (Y₁ ⊗ Z₁, Y₂ ⊗ Z₂)\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) Z₁ Z₂).inv\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Y₂ Z₁).hom) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂ ⊗ Z₁) Z₂).hom\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) (Y₂ ⊗ Z₁) Z₂).hom\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ X₂ Y₁ ((Y₂ ⊗ Z₁) ⊗ Z₂)).hom\n[PROOFSTEP]\nrw [associator_inv_naturality]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ 𝟙 X₂ ⊗ 𝟙 Y₁ ⊗ (β_ Y₂ Z₁).hom ⊗ 𝟙 Z₂) ≫ (α_ X₁ X₂ (Y₁ ⊗ (Z₁ ⊗ Y₂) ⊗ Z₂)).inv\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 (X₁ ⊗ X₂) ⊗ 𝟙 Y₁ ⊗ (α_ Z₁ Y₂ Z₂).hom\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 (X₁ ⊗ X₂) ⊗ (α_ Y₁ Z₁ (Y₂ ⊗ Z₂)).inv\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| tensor_μ C (X₁, X₂) (Y₁ ⊗ Z₁, Y₂ ⊗ Z₂)\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) Z₁ Z₂).inv\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Y₂ Z₁).hom) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂ ⊗ Z₁) Z₂).hom\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) (Y₂ ⊗ Z₁) Z₂).hom\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ X₂ Y₁ ((Y₂ ⊗ Z₁) ⊗ Z₂)).hom\n[PROOFSTEP]\nrw [associator_inv_naturality]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ 𝟙 X₂ ⊗ 𝟙 Y₁ ⊗ (β_ Y₂ Z₁).hom ⊗ 𝟙 Z₂) ≫ (α_ X₁ X₂ (Y₁ ⊗ (Z₁ ⊗ Y₂) ⊗ Z₂)).inv\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 (X₁ ⊗ X₂) ⊗ 𝟙 Y₁ ⊗ (α_ Z₁ Y₂ Z₂).hom\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 (X₁ ⊗ X₂) ⊗ (α_ Y₁ Z₁ (Y₂ ⊗ Z₂)).inv\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| tensor_μ C (X₁, X₂) (Y₁ ⊗ Z₁, Y₂ ⊗ Z₂)\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) Z₁ Z₂).inv\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Y₂ Z₁).hom) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂ ⊗ Z₁) Z₂).hom\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) (Y₂ ⊗ Z₁) Z₂).hom\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ X₂ Y₁ ((Y₂ ⊗ Z₁) ⊗ Z₂)).hom\n[PROOFSTEP]\nrw [associator_inv_naturality]\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n⊢ ((α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n      ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n        (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) Z₁ Z₂).inv ≫\n          ((α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂) ≫\n            ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Y₂ Z₁).hom) ⊗ 𝟙 Z₂) ≫\n              (α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂ ⊗ Z₁) Z₂).hom ≫\n                (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) (Y₂ ⊗ Z₁) Z₂).hom) ≫\n                  (𝟙 X₁ ⊗ (α_ X₂ Y₁ ((Y₂ ⊗ Z₁) ⊗ Z₂)).hom) ≫\n                    ((((α_ X₁ X₂ (Y₁ ⊗ (Y₂ ⊗ Z₁) ⊗ Z₂)).inv ≫ ((𝟙 X₁ ⊗ 𝟙 X₂) ⊗ 𝟙 Y₁ ⊗ (β_ Y₂ Z₁).hom ⊗ 𝟙 Z₂)) ≫\n                          (𝟙 (X₁ ⊗ X₂) ⊗ 𝟙 Y₁ ⊗ (α_ Z₁ Y₂ Z₂).hom)) ≫\n                        (𝟙 (X₁ ⊗ X₂) ⊗ (α_ Y₁ Z₁ (Y₂ ⊗ Z₂)).inv)) ≫\n                      tensor_μ C (X₁, X₂) (Y₁ ⊗ Z₁, Y₂ ⊗ Z₂) =\n    (α_ (X₁ ⊗ X₂) (Y₁ ⊗ Y₂) (Z₁ ⊗ Z₂)).hom ≫\n      (𝟙 (X₁ ⊗ X₂) ⊗ tensor_μ C (Y₁, Y₂) (Z₁, Z₂)) ≫ tensor_μ C (X₁, X₂) (Y₁ ⊗ Z₁, Y₂ ⊗ Z₂)\n[PROOFSTEP]\nslice_lhs 10 12 => rw [← tensor_comp, ← tensor_comp, ← tensor_μ_def₂, tensor_comp, tensor_comp]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| ((𝟙 X₁ ⊗ 𝟙 X₂) ⊗ 𝟙 Y₁ ⊗ (β_ Y₂ Z₁).hom ⊗ 𝟙 Z₂) ≫\n    (𝟙 (X₁ ⊗ X₂) ⊗ 𝟙 Y₁ ⊗ (α_ Z₁ Y₂ Z₂).hom) ≫ (𝟙 (X₁ ⊗ X₂) ⊗ (α_ Y₁ Z₁ (Y₂ ⊗ Z₂)).inv)\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| tensor_μ C (X₁, X₂) (Y₁ ⊗ Z₁, Y₂ ⊗ Z₂)\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) Z₁ Z₂).inv\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Y₂ Z₁).hom) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂ ⊗ Z₁) Z₂).hom\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) (Y₂ ⊗ Z₁) Z₂).hom\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ X₂ Y₁ ((Y₂ ⊗ Z₁) ⊗ Z₂)).hom\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ X₂ (Y₁ ⊗ (Y₂ ⊗ Z₁) ⊗ Z₂)).inv\n[PROOFSTEP]\nrw [← tensor_comp, ← tensor_comp, ← tensor_μ_def₂, tensor_comp, tensor_comp]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| ((𝟙 X₁ ⊗ 𝟙 X₂) ⊗ 𝟙 Y₁ ⊗ (β_ Y₂ Z₁).hom ⊗ 𝟙 Z₂) ≫\n    (𝟙 (X₁ ⊗ X₂) ⊗ 𝟙 Y₁ ⊗ (α_ Z₁ Y₂ Z₂).hom) ≫ (𝟙 (X₁ ⊗ X₂) ⊗ (α_ Y₁ Z₁ (Y₂ ⊗ Z₂)).inv)\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| tensor_μ C (X₁, X₂) (Y₁ ⊗ Z₁, Y₂ ⊗ Z₂)\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) Z₁ Z₂).inv\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Y₂ Z₁).hom) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂ ⊗ Z₁) Z₂).hom\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) (Y₂ ⊗ Z₁) Z₂).hom\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ X₂ Y₁ ((Y₂ ⊗ Z₁) ⊗ Z₂)).hom\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ X₂ (Y₁ ⊗ (Y₂ ⊗ Z₁) ⊗ Z₂)).inv\n[PROOFSTEP]\nrw [← tensor_comp, ← tensor_comp, ← tensor_μ_def₂, tensor_comp, tensor_comp]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| ((𝟙 X₁ ⊗ 𝟙 X₂) ⊗ 𝟙 Y₁ ⊗ (β_ Y₂ Z₁).hom ⊗ 𝟙 Z₂) ≫\n    (𝟙 (X₁ ⊗ X₂) ⊗ 𝟙 Y₁ ⊗ (α_ Z₁ Y₂ Z₂).hom) ≫ (𝟙 (X₁ ⊗ X₂) ⊗ (α_ Y₁ Z₁ (Y₂ ⊗ Z₂)).inv)\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| tensor_μ C (X₁, X₂) (Y₁ ⊗ Z₁, Y₂ ⊗ Z₂)\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) Z₁ Z₂).inv\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Y₂ Z₁).hom) ⊗ 𝟙 Z₂\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂ ⊗ Z₁) Z₂).hom\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) (Y₂ ⊗ Z₁) Z₂).hom\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| 𝟙 X₁ ⊗ (α_ X₂ Y₁ ((Y₂ ⊗ Z₁) ⊗ Z₂)).hom\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n| (α_ X₁ X₂ (Y₁ ⊗ (Y₂ ⊗ Z₁) ⊗ Z₂)).inv\n[PROOFSTEP]\nrw [← tensor_comp, ← tensor_comp, ← tensor_μ_def₂, tensor_comp, tensor_comp]\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n⊢ ((α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n      ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n        (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) Z₁ Z₂).inv ≫\n          ((α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂) ≫\n            ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Y₂ Z₁).hom) ⊗ 𝟙 Z₂) ≫\n              (α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂ ⊗ Z₁) Z₂).hom ≫\n                (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) (Y₂ ⊗ Z₁) Z₂).hom) ≫\n                  (𝟙 X₁ ⊗ (α_ X₂ Y₁ ((Y₂ ⊗ Z₁) ⊗ Z₂)).hom) ≫\n                    (α_ X₁ X₂ (Y₁ ⊗ (Y₂ ⊗ Z₁) ⊗ Z₂)).inv ≫\n                      (((𝟙 X₁ ⊗ 𝟙 X₂) ⊗ 𝟙 Y₁ ⊗ (α_ Y₂ Z₁ Z₂).hom) ≫\n                          (𝟙 (X₁ ⊗ X₂) ⊗ (α_ Y₁ Y₂ (Z₁ ⊗ Z₂)).inv) ≫ (𝟙 (X₁ ⊗ X₂) ⊗ tensor_μ C (Y₁, Y₂) (Z₁, Z₂))) ≫\n                        tensor_μ C (X₁, X₂) (Y₁ ⊗ Z₁, Y₂ ⊗ Z₂) =\n    (α_ (X₁ ⊗ X₂) (Y₁ ⊗ Y₂) (Z₁ ⊗ Z₂)).hom ≫\n      (𝟙 (X₁ ⊗ X₂) ⊗ tensor_μ C (Y₁, Y₂) (Z₁, Z₂)) ≫ tensor_μ C (X₁, X₂) (Y₁ ⊗ Z₁, Y₂ ⊗ Z₂)\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ Y₁ Y₂ Z₁ Z₂ : C\n⊢ ((α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n      ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (Z₁ ⊗ Z₂)) ≫\n        (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) Z₁ Z₂).inv ≫\n          ((α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) Z₁).hom ⊗ 𝟙 Z₂) ≫\n            ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Y₂ Z₁).hom) ⊗ 𝟙 Z₂) ≫\n              (α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂ ⊗ Z₁) Z₂).hom ≫\n                (𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) (Y₂ ⊗ Z₁) Z₂).hom) ≫\n                  (𝟙 X₁ ⊗ (α_ X₂ Y₁ ((Y₂ ⊗ Z₁) ⊗ Z₂)).hom) ≫\n                    (α_ X₁ X₂ (Y₁ ⊗ (Y₂ ⊗ Z₁) ⊗ Z₂)).inv ≫\n                      (((𝟙 X₁ ⊗ 𝟙 X₂) ⊗ 𝟙 Y₁ ⊗ (α_ Y₂ Z₁ Z₂).hom) ≫\n                          (𝟙 (X₁ ⊗ X₂) ⊗ (α_ Y₁ Y₂ (Z₁ ⊗ Z₂)).inv) ≫ (𝟙 (X₁ ⊗ X₂) ⊗ tensor_μ C (Y₁, Y₂) (Z₁, Z₂))) ≫\n                        tensor_μ C (X₁, X₂) (Y₁ ⊗ Z₁, Y₂ ⊗ Z₂) =\n    (α_ (X₁ ⊗ X₂) (Y₁ ⊗ Y₂) (Z₁ ⊗ Z₂)).hom ≫\n      (𝟙 (X₁ ⊗ X₂) ⊗ tensor_μ C (Y₁, Y₂) (Z₁, Z₂)) ≫ tensor_μ C (X₁, X₂) (Y₁ ⊗ Z₁, Y₂ ⊗ Z₂)\n[PROOFSTEP]\ncoherence\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nsrc✝ : C × C ⥤ C := tensor C\n⊢ ∀ (X Y : C × C),\n    IsIso\n      (LaxMonoidalFunctor.μ\n        (LaxMonoidalFunctor.mk (Functor.mk src✝.toPrefunctor) (λ_ (𝟙_ C)).inv fun X Y => tensor_μ C X Y) X Y)\n[PROOFSTEP]\ndsimp [tensor_μ]\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nsrc✝ : C × C ⥤ C := tensor C\n⊢ ∀ (X Y : C × C),\n    IsIso\n      ((α_ X.fst X.snd (Y.fst ⊗ Y.snd)).hom ≫\n        (𝟙 X.fst ⊗ (α_ X.snd Y.fst Y.snd).inv) ≫\n          (𝟙 X.fst ⊗ (β_ X.snd Y.fst).hom ⊗ 𝟙 Y.snd) ≫\n            (𝟙 X.fst ⊗ (α_ Y.fst X.snd Y.snd).hom) ≫ (α_ X.fst Y.fst (X.snd ⊗ Y.snd)).inv)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\n⊢ (λ_ X₁).hom ⊗ (λ_ X₂).hom = tensor_μ C (𝟙_ C, X₁) (𝟙_ C, X₂) ≫ ((λ_ (𝟙_ C)).hom ⊗ 𝟙 (X₁ ⊗ X₂)) ≫ (λ_ (X₁ ⊗ X₂)).hom\n[PROOFSTEP]\ndsimp [tensor_μ]\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\n⊢ (λ_ X₁).hom ⊗ (λ_ X₂).hom =\n    ((α_ (𝟙_ C) X₁ (𝟙_ C ⊗ X₂)).hom ≫\n        (𝟙 (𝟙_ C) ⊗ (α_ X₁ (𝟙_ C) X₂).inv) ≫\n          (𝟙 (𝟙_ C) ⊗ (β_ X₁ (𝟙_ C)).hom ⊗ 𝟙 X₂) ≫\n            (𝟙 (𝟙_ C) ⊗ (α_ (𝟙_ C) X₁ X₂).hom) ≫ (α_ (𝟙_ C) (𝟙_ C) (X₁ ⊗ X₂)).inv) ≫\n      ((λ_ (𝟙_ C)).hom ⊗ 𝟙 (X₁ ⊗ X₂)) ≫ (λ_ (X₁ ⊗ X₂)).hom\n[PROOFSTEP]\nhave :\n  (λ_ X₁).hom ⊗ (λ_ X₂).hom =\n    (α_ (𝟙_ C) X₁ (𝟙_ C ⊗ X₂)).hom ≫\n      (𝟙 (𝟙_ C) ⊗ (α_ X₁ (𝟙_ C) X₂).inv) ≫ (λ_ ((X₁ ⊗ 𝟙_ C) ⊗ X₂)).hom ≫ ((ρ_ X₁).hom ⊗ 𝟙 X₂) :=\n  by pure_coherence\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\n⊢ (λ_ X₁).hom ⊗ (λ_ X₂).hom =\n    (α_ (𝟙_ C) X₁ (𝟙_ C ⊗ X₂)).hom ≫\n      (𝟙 (𝟙_ C) ⊗ (α_ X₁ (𝟙_ C) X₂).inv) ≫ (λ_ ((X₁ ⊗ 𝟙_ C) ⊗ X₂)).hom ≫ ((ρ_ X₁).hom ⊗ 𝟙 X₂)\n[PROOFSTEP]\npure_coherence\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\nthis :\n  (λ_ X₁).hom ⊗ (λ_ X₂).hom =\n    (α_ (𝟙_ C) X₁ (𝟙_ C ⊗ X₂)).hom ≫\n      (𝟙 (𝟙_ C) ⊗ (α_ X₁ (𝟙_ C) X₂).inv) ≫ (λ_ ((X₁ ⊗ 𝟙_ C) ⊗ X₂)).hom ≫ ((ρ_ X₁).hom ⊗ 𝟙 X₂)\n⊢ (λ_ X₁).hom ⊗ (λ_ X₂).hom =\n    ((α_ (𝟙_ C) X₁ (𝟙_ C ⊗ X₂)).hom ≫\n        (𝟙 (𝟙_ C) ⊗ (α_ X₁ (𝟙_ C) X₂).inv) ≫\n          (𝟙 (𝟙_ C) ⊗ (β_ X₁ (𝟙_ C)).hom ⊗ 𝟙 X₂) ≫\n            (𝟙 (𝟙_ C) ⊗ (α_ (𝟙_ C) X₁ X₂).hom) ≫ (α_ (𝟙_ C) (𝟙_ C) (X₁ ⊗ X₂)).inv) ≫\n      ((λ_ (𝟙_ C)).hom ⊗ 𝟙 (X₁ ⊗ X₂)) ≫ (λ_ (X₁ ⊗ X₂)).hom\n[PROOFSTEP]\nrw [this]\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\nthis :\n  (λ_ X₁).hom ⊗ (λ_ X₂).hom =\n    (α_ (𝟙_ C) X₁ (𝟙_ C ⊗ X₂)).hom ≫\n      (𝟙 (𝟙_ C) ⊗ (α_ X₁ (𝟙_ C) X₂).inv) ≫ (λ_ ((X₁ ⊗ 𝟙_ C) ⊗ X₂)).hom ≫ ((ρ_ X₁).hom ⊗ 𝟙 X₂)\n⊢ (α_ (𝟙_ C) X₁ (𝟙_ C ⊗ X₂)).hom ≫\n      (𝟙 (𝟙_ C) ⊗ (α_ X₁ (𝟙_ C) X₂).inv) ≫ (λ_ ((X₁ ⊗ 𝟙_ C) ⊗ X₂)).hom ≫ ((ρ_ X₁).hom ⊗ 𝟙 X₂) =\n    ((α_ (𝟙_ C) X₁ (𝟙_ C ⊗ X₂)).hom ≫\n        (𝟙 (𝟙_ C) ⊗ (α_ X₁ (𝟙_ C) X₂).inv) ≫\n          (𝟙 (𝟙_ C) ⊗ (β_ X₁ (𝟙_ C)).hom ⊗ 𝟙 X₂) ≫\n            (𝟙 (𝟙_ C) ⊗ (α_ (𝟙_ C) X₁ X₂).hom) ≫ (α_ (𝟙_ C) (𝟙_ C) (X₁ ⊗ X₂)).inv) ≫\n      ((λ_ (𝟙_ C)).hom ⊗ 𝟙 (X₁ ⊗ X₂)) ≫ (λ_ (X₁ ⊗ X₂)).hom\n[PROOFSTEP]\nclear this\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\n⊢ (α_ (𝟙_ C) X₁ (𝟙_ C ⊗ X₂)).hom ≫\n      (𝟙 (𝟙_ C) ⊗ (α_ X₁ (𝟙_ C) X₂).inv) ≫ (λ_ ((X₁ ⊗ 𝟙_ C) ⊗ X₂)).hom ≫ ((ρ_ X₁).hom ⊗ 𝟙 X₂) =\n    ((α_ (𝟙_ C) X₁ (𝟙_ C ⊗ X₂)).hom ≫\n        (𝟙 (𝟙_ C) ⊗ (α_ X₁ (𝟙_ C) X₂).inv) ≫\n          (𝟙 (𝟙_ C) ⊗ (β_ X₁ (𝟙_ C)).hom ⊗ 𝟙 X₂) ≫\n            (𝟙 (𝟙_ C) ⊗ (α_ (𝟙_ C) X₁ X₂).hom) ≫ (α_ (𝟙_ C) (𝟙_ C) (X₁ ⊗ X₂)).inv) ≫\n      ((λ_ (𝟙_ C)).hom ⊗ 𝟙 (X₁ ⊗ X₂)) ≫ (λ_ (X₁ ⊗ X₂)).hom\n[PROOFSTEP]\nrw [← braiding_leftUnitor]\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\n⊢ (α_ (𝟙_ C) X₁ (𝟙_ C ⊗ X₂)).hom ≫\n      (𝟙 (𝟙_ C) ⊗ (α_ X₁ (𝟙_ C) X₂).inv) ≫ (λ_ ((X₁ ⊗ 𝟙_ C) ⊗ X₂)).hom ≫ ((β_ X₁ (𝟙_ C)).hom ≫ (λ_ X₁).hom ⊗ 𝟙 X₂) =\n    ((α_ (𝟙_ C) X₁ (𝟙_ C ⊗ X₂)).hom ≫\n        (𝟙 (𝟙_ C) ⊗ (α_ X₁ (𝟙_ C) X₂).inv) ≫\n          (𝟙 (𝟙_ C) ⊗ (β_ X₁ (𝟙_ C)).hom ⊗ 𝟙 X₂) ≫\n            (𝟙 (𝟙_ C) ⊗ (α_ (𝟙_ C) X₁ X₂).hom) ≫ (α_ (𝟙_ C) (𝟙_ C) (X₁ ⊗ X₂)).inv) ≫\n      ((λ_ (𝟙_ C)).hom ⊗ 𝟙 (X₁ ⊗ X₂)) ≫ (λ_ (X₁ ⊗ X₂)).hom\n[PROOFSTEP]\nslice_lhs 3 4 => rw [← id_comp (𝟙 X₂), tensor_comp]\n[GOAL]\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\n| (λ_ ((X₁ ⊗ 𝟙_ C) ⊗ X₂)).hom ≫ ((β_ X₁ (𝟙_ C)).hom ≫ (λ_ X₁).hom ⊗ 𝟙 X₂)\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\n| (α_ (𝟙_ C) X₁ (𝟙_ C ⊗ X₂)).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\n| 𝟙 (𝟙_ C) ⊗ (α_ X₁ (𝟙_ C) X₂).inv\n[PROOFSTEP]\nrw [← id_comp (𝟙 X₂), tensor_comp]\n[GOAL]\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\n| (λ_ ((X₁ ⊗ 𝟙_ C) ⊗ X₂)).hom ≫ ((β_ X₁ (𝟙_ C)).hom ≫ (λ_ X₁).hom ⊗ 𝟙 X₂)\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\n| (α_ (𝟙_ C) X₁ (𝟙_ C ⊗ X₂)).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\n| 𝟙 (𝟙_ C) ⊗ (α_ X₁ (𝟙_ C) X₂).inv\n[PROOFSTEP]\nrw [← id_comp (𝟙 X₂), tensor_comp]\n[GOAL]\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\n| (λ_ ((X₁ ⊗ 𝟙_ C) ⊗ X₂)).hom ≫ ((β_ X₁ (𝟙_ C)).hom ≫ (λ_ X₁).hom ⊗ 𝟙 X₂)\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\n| (α_ (𝟙_ C) X₁ (𝟙_ C ⊗ X₂)).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\n| 𝟙 (𝟙_ C) ⊗ (α_ X₁ (𝟙_ C) X₂).inv\n[PROOFSTEP]\nrw [← id_comp (𝟙 X₂), tensor_comp]\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\n⊢ (α_ (𝟙_ C) X₁ (𝟙_ C ⊗ X₂)).hom ≫\n      (𝟙 (𝟙_ C) ⊗ (α_ X₁ (𝟙_ C) X₂).inv) ≫\n        (λ_ ((X₁ ⊗ 𝟙_ C) ⊗ X₂)).hom ≫ ((β_ X₁ (𝟙_ C)).hom ⊗ 𝟙 X₂) ≫ ((λ_ X₁).hom ⊗ 𝟙 X₂) =\n    ((α_ (𝟙_ C) X₁ (𝟙_ C ⊗ X₂)).hom ≫\n        (𝟙 (𝟙_ C) ⊗ (α_ X₁ (𝟙_ C) X₂).inv) ≫\n          (𝟙 (𝟙_ C) ⊗ (β_ X₁ (𝟙_ C)).hom ⊗ 𝟙 X₂) ≫\n            (𝟙 (𝟙_ C) ⊗ (α_ (𝟙_ C) X₁ X₂).hom) ≫ (α_ (𝟙_ C) (𝟙_ C) (X₁ ⊗ X₂)).inv) ≫\n      ((λ_ (𝟙_ C)).hom ⊗ 𝟙 (X₁ ⊗ X₂)) ≫ (λ_ (X₁ ⊗ X₂)).hom\n[PROOFSTEP]\nslice_lhs 3 4 => rw [← leftUnitor_naturality]\n[GOAL]\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\n| (λ_ ((X₁ ⊗ 𝟙_ C) ⊗ X₂)).hom ≫ ((β_ X₁ (𝟙_ C)).hom ⊗ 𝟙 X₂)\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\n| (λ_ X₁).hom ⊗ 𝟙 X₂\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\n| (α_ (𝟙_ C) X₁ (𝟙_ C ⊗ X₂)).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\n| 𝟙 (𝟙_ C) ⊗ (α_ X₁ (𝟙_ C) X₂).inv\n[PROOFSTEP]\nrw [← leftUnitor_naturality]\n[GOAL]\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\n| (λ_ ((X₁ ⊗ 𝟙_ C) ⊗ X₂)).hom ≫ ((β_ X₁ (𝟙_ C)).hom ⊗ 𝟙 X₂)\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\n| (λ_ X₁).hom ⊗ 𝟙 X₂\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\n| (α_ (𝟙_ C) X₁ (𝟙_ C ⊗ X₂)).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\n| 𝟙 (𝟙_ C) ⊗ (α_ X₁ (𝟙_ C) X₂).inv\n[PROOFSTEP]\nrw [← leftUnitor_naturality]\n[GOAL]\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\n| (λ_ ((X₁ ⊗ 𝟙_ C) ⊗ X₂)).hom ≫ ((β_ X₁ (𝟙_ C)).hom ⊗ 𝟙 X₂)\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\n| (λ_ X₁).hom ⊗ 𝟙 X₂\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\n| (α_ (𝟙_ C) X₁ (𝟙_ C ⊗ X₂)).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\n| 𝟙 (𝟙_ C) ⊗ (α_ X₁ (𝟙_ C) X₂).inv\n[PROOFSTEP]\nrw [← leftUnitor_naturality]\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\n⊢ (α_ (𝟙_ C) X₁ (𝟙_ C ⊗ X₂)).hom ≫\n      (𝟙 (𝟙_ C) ⊗ (α_ X₁ (𝟙_ C) X₂).inv) ≫\n        ((𝟙 tensorUnit' ⊗ (β_ X₁ (𝟙_ C)).hom ⊗ 𝟙 X₂) ≫ (λ_ ((𝟙_ C ⊗ X₁) ⊗ X₂)).hom) ≫ ((λ_ X₁).hom ⊗ 𝟙 X₂) =\n    ((α_ (𝟙_ C) X₁ (𝟙_ C ⊗ X₂)).hom ≫\n        (𝟙 (𝟙_ C) ⊗ (α_ X₁ (𝟙_ C) X₂).inv) ≫\n          (𝟙 (𝟙_ C) ⊗ (β_ X₁ (𝟙_ C)).hom ⊗ 𝟙 X₂) ≫\n            (𝟙 (𝟙_ C) ⊗ (α_ (𝟙_ C) X₁ X₂).hom) ≫ (α_ (𝟙_ C) (𝟙_ C) (X₁ ⊗ X₂)).inv) ≫\n      ((λ_ (𝟙_ C)).hom ⊗ 𝟙 (X₁ ⊗ X₂)) ≫ (λ_ (X₁ ⊗ X₂)).hom\n[PROOFSTEP]\ncoherence\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\n⊢ (ρ_ X₁).hom ⊗ (ρ_ X₂).hom = tensor_μ C (X₁, 𝟙_ C) (X₂, 𝟙_ C) ≫ (𝟙 (X₁ ⊗ X₂) ⊗ (λ_ (𝟙_ C)).hom) ≫ (ρ_ (X₁ ⊗ X₂)).hom\n[PROOFSTEP]\ndsimp [tensor_μ]\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\n⊢ (ρ_ X₁).hom ⊗ (ρ_ X₂).hom =\n    ((α_ X₁ (𝟙_ C) (X₂ ⊗ 𝟙_ C)).hom ≫\n        (𝟙 X₁ ⊗ (α_ (𝟙_ C) X₂ (𝟙_ C)).inv) ≫\n          (𝟙 X₁ ⊗ (β_ (𝟙_ C) X₂).hom ⊗ 𝟙 (𝟙_ C)) ≫ (𝟙 X₁ ⊗ (α_ X₂ (𝟙_ C) (𝟙_ C)).hom) ≫ (α_ X₁ X₂ (𝟙_ C ⊗ 𝟙_ C)).inv) ≫\n      (𝟙 (X₁ ⊗ X₂) ⊗ (λ_ (𝟙_ C)).hom) ≫ (ρ_ (X₁ ⊗ X₂)).hom\n[PROOFSTEP]\nhave :\n  (ρ_ X₁).hom ⊗ (ρ_ X₂).hom =\n    (α_ X₁ (𝟙_ C) (X₂ ⊗ 𝟙_ C)).hom ≫\n      (𝟙 X₁ ⊗ (α_ (𝟙_ C) X₂ (𝟙_ C)).inv) ≫ (𝟙 X₁ ⊗ (ρ_ (𝟙_ C ⊗ X₂)).hom) ≫ (𝟙 X₁ ⊗ (λ_ X₂).hom) :=\n  by pure_coherence\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\n⊢ (ρ_ X₁).hom ⊗ (ρ_ X₂).hom =\n    (α_ X₁ (𝟙_ C) (X₂ ⊗ 𝟙_ C)).hom ≫\n      (𝟙 X₁ ⊗ (α_ (𝟙_ C) X₂ (𝟙_ C)).inv) ≫ (𝟙 X₁ ⊗ (ρ_ (𝟙_ C ⊗ X₂)).hom) ≫ (𝟙 X₁ ⊗ (λ_ X₂).hom)\n[PROOFSTEP]\npure_coherence\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\nthis :\n  (ρ_ X₁).hom ⊗ (ρ_ X₂).hom =\n    (α_ X₁ (𝟙_ C) (X₂ ⊗ 𝟙_ C)).hom ≫\n      (𝟙 X₁ ⊗ (α_ (𝟙_ C) X₂ (𝟙_ C)).inv) ≫ (𝟙 X₁ ⊗ (ρ_ (𝟙_ C ⊗ X₂)).hom) ≫ (𝟙 X₁ ⊗ (λ_ X₂).hom)\n⊢ (ρ_ X₁).hom ⊗ (ρ_ X₂).hom =\n    ((α_ X₁ (𝟙_ C) (X₂ ⊗ 𝟙_ C)).hom ≫\n        (𝟙 X₁ ⊗ (α_ (𝟙_ C) X₂ (𝟙_ C)).inv) ≫\n          (𝟙 X₁ ⊗ (β_ (𝟙_ C) X₂).hom ⊗ 𝟙 (𝟙_ C)) ≫ (𝟙 X₁ ⊗ (α_ X₂ (𝟙_ C) (𝟙_ C)).hom) ≫ (α_ X₁ X₂ (𝟙_ C ⊗ 𝟙_ C)).inv) ≫\n      (𝟙 (X₁ ⊗ X₂) ⊗ (λ_ (𝟙_ C)).hom) ≫ (ρ_ (X₁ ⊗ X₂)).hom\n[PROOFSTEP]\nrw [this]\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\nthis :\n  (ρ_ X₁).hom ⊗ (ρ_ X₂).hom =\n    (α_ X₁ (𝟙_ C) (X₂ ⊗ 𝟙_ C)).hom ≫\n      (𝟙 X₁ ⊗ (α_ (𝟙_ C) X₂ (𝟙_ C)).inv) ≫ (𝟙 X₁ ⊗ (ρ_ (𝟙_ C ⊗ X₂)).hom) ≫ (𝟙 X₁ ⊗ (λ_ X₂).hom)\n⊢ (α_ X₁ (𝟙_ C) (X₂ ⊗ 𝟙_ C)).hom ≫\n      (𝟙 X₁ ⊗ (α_ (𝟙_ C) X₂ (𝟙_ C)).inv) ≫ (𝟙 X₁ ⊗ (ρ_ (𝟙_ C ⊗ X₂)).hom) ≫ (𝟙 X₁ ⊗ (λ_ X₂).hom) =\n    ((α_ X₁ (𝟙_ C) (X₂ ⊗ 𝟙_ C)).hom ≫\n        (𝟙 X₁ ⊗ (α_ (𝟙_ C) X₂ (𝟙_ C)).inv) ≫\n          (𝟙 X₁ ⊗ (β_ (𝟙_ C) X₂).hom ⊗ 𝟙 (𝟙_ C)) ≫ (𝟙 X₁ ⊗ (α_ X₂ (𝟙_ C) (𝟙_ C)).hom) ≫ (α_ X₁ X₂ (𝟙_ C ⊗ 𝟙_ C)).inv) ≫\n      (𝟙 (X₁ ⊗ X₂) ⊗ (λ_ (𝟙_ C)).hom) ≫ (ρ_ (X₁ ⊗ X₂)).hom\n[PROOFSTEP]\nclear this\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\n⊢ (α_ X₁ (𝟙_ C) (X₂ ⊗ 𝟙_ C)).hom ≫\n      (𝟙 X₁ ⊗ (α_ (𝟙_ C) X₂ (𝟙_ C)).inv) ≫ (𝟙 X₁ ⊗ (ρ_ (𝟙_ C ⊗ X₂)).hom) ≫ (𝟙 X₁ ⊗ (λ_ X₂).hom) =\n    ((α_ X₁ (𝟙_ C) (X₂ ⊗ 𝟙_ C)).hom ≫\n        (𝟙 X₁ ⊗ (α_ (𝟙_ C) X₂ (𝟙_ C)).inv) ≫\n          (𝟙 X₁ ⊗ (β_ (𝟙_ C) X₂).hom ⊗ 𝟙 (𝟙_ C)) ≫ (𝟙 X₁ ⊗ (α_ X₂ (𝟙_ C) (𝟙_ C)).hom) ≫ (α_ X₁ X₂ (𝟙_ C ⊗ 𝟙_ C)).inv) ≫\n      (𝟙 (X₁ ⊗ X₂) ⊗ (λ_ (𝟙_ C)).hom) ≫ (ρ_ (X₁ ⊗ X₂)).hom\n[PROOFSTEP]\nrw [← braiding_rightUnitor]\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\n⊢ (α_ X₁ (𝟙_ C) (X₂ ⊗ 𝟙_ C)).hom ≫\n      (𝟙 X₁ ⊗ (α_ (𝟙_ C) X₂ (𝟙_ C)).inv) ≫ (𝟙 X₁ ⊗ (ρ_ (𝟙_ C ⊗ X₂)).hom) ≫ (𝟙 X₁ ⊗ (β_ (𝟙_ C) X₂).hom ≫ (ρ_ X₂).hom) =\n    ((α_ X₁ (𝟙_ C) (X₂ ⊗ 𝟙_ C)).hom ≫\n        (𝟙 X₁ ⊗ (α_ (𝟙_ C) X₂ (𝟙_ C)).inv) ≫\n          (𝟙 X₁ ⊗ (β_ (𝟙_ C) X₂).hom ⊗ 𝟙 (𝟙_ C)) ≫ (𝟙 X₁ ⊗ (α_ X₂ (𝟙_ C) (𝟙_ C)).hom) ≫ (α_ X₁ X₂ (𝟙_ C ⊗ 𝟙_ C)).inv) ≫\n      (𝟙 (X₁ ⊗ X₂) ⊗ (λ_ (𝟙_ C)).hom) ≫ (ρ_ (X₁ ⊗ X₂)).hom\n[PROOFSTEP]\nslice_lhs 3 4 => rw [← id_comp (𝟙 X₁), tensor_comp, id_comp]\n[GOAL]\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\n| (𝟙 X₁ ⊗ (ρ_ (𝟙_ C ⊗ X₂)).hom) ≫ (𝟙 X₁ ⊗ (β_ (𝟙_ C) X₂).hom ≫ (ρ_ X₂).hom)\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\n| (α_ X₁ (𝟙_ C) (X₂ ⊗ 𝟙_ C)).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\n| 𝟙 X₁ ⊗ (α_ (𝟙_ C) X₂ (𝟙_ C)).inv\n[PROOFSTEP]\nrw [← id_comp (𝟙 X₁), tensor_comp, id_comp]\n[GOAL]\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\n| (𝟙 X₁ ⊗ (ρ_ (𝟙_ C ⊗ X₂)).hom) ≫ (𝟙 X₁ ⊗ (β_ (𝟙_ C) X₂).hom ≫ (ρ_ X₂).hom)\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\n| (α_ X₁ (𝟙_ C) (X₂ ⊗ 𝟙_ C)).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\n| 𝟙 X₁ ⊗ (α_ (𝟙_ C) X₂ (𝟙_ C)).inv\n[PROOFSTEP]\nrw [← id_comp (𝟙 X₁), tensor_comp, id_comp]\n[GOAL]\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\n| (𝟙 X₁ ⊗ (ρ_ (𝟙_ C ⊗ X₂)).hom) ≫ (𝟙 X₁ ⊗ (β_ (𝟙_ C) X₂).hom ≫ (ρ_ X₂).hom)\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\n| (α_ X₁ (𝟙_ C) (X₂ ⊗ 𝟙_ C)).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\n| 𝟙 X₁ ⊗ (α_ (𝟙_ C) X₂ (𝟙_ C)).inv\n[PROOFSTEP]\nrw [← id_comp (𝟙 X₁), tensor_comp, id_comp]\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\n⊢ (α_ X₁ (𝟙_ C) (X₂ ⊗ 𝟙_ C)).hom ≫\n      (𝟙 X₁ ⊗ (α_ (𝟙_ C) X₂ (𝟙_ C)).inv) ≫\n        (𝟙 X₁ ⊗ (ρ_ (𝟙_ C ⊗ X₂)).hom) ≫ (𝟙 X₁ ⊗ (β_ (𝟙_ C) X₂).hom) ≫ (𝟙 X₁ ⊗ (ρ_ X₂).hom) =\n    ((α_ X₁ (𝟙_ C) (X₂ ⊗ 𝟙_ C)).hom ≫\n        (𝟙 X₁ ⊗ (α_ (𝟙_ C) X₂ (𝟙_ C)).inv) ≫\n          (𝟙 X₁ ⊗ (β_ (𝟙_ C) X₂).hom ⊗ 𝟙 (𝟙_ C)) ≫ (𝟙 X₁ ⊗ (α_ X₂ (𝟙_ C) (𝟙_ C)).hom) ≫ (α_ X₁ X₂ (𝟙_ C ⊗ 𝟙_ C)).inv) ≫\n      (𝟙 (X₁ ⊗ X₂) ⊗ (λ_ (𝟙_ C)).hom) ≫ (ρ_ (X₁ ⊗ X₂)).hom\n[PROOFSTEP]\nslice_lhs 3 4 => rw [← tensor_comp, ← rightUnitor_naturality, tensor_comp]\n[GOAL]\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\n| (𝟙 X₁ ⊗ (ρ_ (𝟙_ C ⊗ X₂)).hom) ≫ (𝟙 X₁ ⊗ (β_ (𝟙_ C) X₂).hom)\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\n| 𝟙 X₁ ⊗ (ρ_ X₂).hom\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\n| (α_ X₁ (𝟙_ C) (X₂ ⊗ 𝟙_ C)).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\n| 𝟙 X₁ ⊗ (α_ (𝟙_ C) X₂ (𝟙_ C)).inv\n[PROOFSTEP]\nrw [← tensor_comp, ← rightUnitor_naturality, tensor_comp]\n[GOAL]\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\n| (𝟙 X₁ ⊗ (ρ_ (𝟙_ C ⊗ X₂)).hom) ≫ (𝟙 X₁ ⊗ (β_ (𝟙_ C) X₂).hom)\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\n| 𝟙 X₁ ⊗ (ρ_ X₂).hom\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\n| (α_ X₁ (𝟙_ C) (X₂ ⊗ 𝟙_ C)).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\n| 𝟙 X₁ ⊗ (α_ (𝟙_ C) X₂ (𝟙_ C)).inv\n[PROOFSTEP]\nrw [← tensor_comp, ← rightUnitor_naturality, tensor_comp]\n[GOAL]\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\n| (𝟙 X₁ ⊗ (ρ_ (𝟙_ C ⊗ X₂)).hom) ≫ (𝟙 X₁ ⊗ (β_ (𝟙_ C) X₂).hom)\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\n| 𝟙 X₁ ⊗ (ρ_ X₂).hom\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\n| (α_ X₁ (𝟙_ C) (X₂ ⊗ 𝟙_ C)).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\n| 𝟙 X₁ ⊗ (α_ (𝟙_ C) X₂ (𝟙_ C)).inv\n[PROOFSTEP]\nrw [← tensor_comp, ← rightUnitor_naturality, tensor_comp]\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ : C\n⊢ (α_ X₁ (𝟙_ C) (X₂ ⊗ 𝟙_ C)).hom ≫\n      (𝟙 X₁ ⊗ (α_ (𝟙_ C) X₂ (𝟙_ C)).inv) ≫\n        ((𝟙 X₁ ⊗ (β_ (𝟙_ C) X₂).hom ⊗ 𝟙 tensorUnit') ≫ (𝟙 X₁ ⊗ (ρ_ (X₂ ⊗ 𝟙_ C)).hom)) ≫ (𝟙 X₁ ⊗ (ρ_ X₂).hom) =\n    ((α_ X₁ (𝟙_ C) (X₂ ⊗ 𝟙_ C)).hom ≫\n        (𝟙 X₁ ⊗ (α_ (𝟙_ C) X₂ (𝟙_ C)).inv) ≫\n          (𝟙 X₁ ⊗ (β_ (𝟙_ C) X₂).hom ⊗ 𝟙 (𝟙_ C)) ≫ (𝟙 X₁ ⊗ (α_ X₂ (𝟙_ C) (𝟙_ C)).hom) ≫ (α_ X₁ X₂ (𝟙_ C ⊗ 𝟙_ C)).inv) ≫\n      (𝟙 (X₁ ⊗ X₂) ⊗ (λ_ (𝟙_ C)).hom) ≫ (ρ_ (X₁ ⊗ X₂)).hom\n[PROOFSTEP]\ncoherence\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n⊢ (𝟙 W ⊗ (β_ X (Y ⊗ Z)).hom) ≫ (𝟙 W ⊗ (α_ Y Z X).hom) ≫ (α_ W Y (Z ⊗ X)).inv ≫ ((β_ W Y).hom ⊗ 𝟙 (Z ⊗ X)) =\n    (α_ W X (Y ⊗ Z)).inv ≫\n      (α_ (W ⊗ X) Y Z).inv ≫\n        ((β_ (W ⊗ X) Y).hom ⊗ 𝟙 Z) ≫ ((α_ Y W X).inv ⊗ 𝟙 Z) ≫ (α_ (Y ⊗ W) X Z).hom ≫ (𝟙 (Y ⊗ W) ⊗ (β_ X Z).hom)\n[PROOFSTEP]\nslice_rhs 1 2 => rw [← pentagon_inv]\n[GOAL]\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (α_ W X (Y ⊗ Z)).inv ≫ (α_ (W ⊗ X) Y Z).inv\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (β_ (W ⊗ X) Y).hom ⊗ 𝟙 Z\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (α_ Y W X).inv ⊗ 𝟙 Z\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (α_ (Y ⊗ W) X Z).hom\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| 𝟙 (Y ⊗ W) ⊗ (β_ X Z).hom\n[PROOFSTEP]\nrw [← pentagon_inv]\n[GOAL]\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (α_ W X (Y ⊗ Z)).inv ≫ (α_ (W ⊗ X) Y Z).inv\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (β_ (W ⊗ X) Y).hom ⊗ 𝟙 Z\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (α_ Y W X).inv ⊗ 𝟙 Z\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (α_ (Y ⊗ W) X Z).hom\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| 𝟙 (Y ⊗ W) ⊗ (β_ X Z).hom\n[PROOFSTEP]\nrw [← pentagon_inv]\n[GOAL]\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (α_ W X (Y ⊗ Z)).inv ≫ (α_ (W ⊗ X) Y Z).inv\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (β_ (W ⊗ X) Y).hom ⊗ 𝟙 Z\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (α_ Y W X).inv ⊗ 𝟙 Z\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (α_ (Y ⊗ W) X Z).hom\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| 𝟙 (Y ⊗ W) ⊗ (β_ X Z).hom\n[PROOFSTEP]\nrw [← pentagon_inv]\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n⊢ (𝟙 W ⊗ (β_ X (Y ⊗ Z)).hom) ≫ (𝟙 W ⊗ (α_ Y Z X).hom) ≫ (α_ W Y (Z ⊗ X)).inv ≫ ((β_ W Y).hom ⊗ 𝟙 (Z ⊗ X)) =\n    (((((𝟙 W ⊗ (α_ X Y Z).inv) ≫ (α_ W (X ⊗ Y) Z).inv ≫ ((α_ W X Y).inv ⊗ 𝟙 Z)) ≫ ((β_ (W ⊗ X) Y).hom ⊗ 𝟙 Z)) ≫\n          ((α_ Y W X).inv ⊗ 𝟙 Z)) ≫\n        (α_ (Y ⊗ W) X Z).hom) ≫\n      (𝟙 (Y ⊗ W) ⊗ (β_ X Z).hom)\n[PROOFSTEP]\nslice_rhs 3 5 => rw [← tensor_comp, ← tensor_comp, hexagon_reverse, tensor_comp, tensor_comp]\n[GOAL]\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| ((α_ W X Y).inv ⊗ 𝟙 Z) ≫ ((β_ (W ⊗ X) Y).hom ⊗ 𝟙 Z) ≫ ((α_ Y W X).inv ⊗ 𝟙 Z)\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (α_ (Y ⊗ W) X Z).hom\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| 𝟙 (Y ⊗ W) ⊗ (β_ X Z).hom\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| 𝟙 W ⊗ (α_ X Y Z).inv\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (α_ W (X ⊗ Y) Z).inv\n[PROOFSTEP]\nrw [← tensor_comp, ← tensor_comp, hexagon_reverse, tensor_comp, tensor_comp]\n[GOAL]\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| ((α_ W X Y).inv ⊗ 𝟙 Z) ≫ ((β_ (W ⊗ X) Y).hom ⊗ 𝟙 Z) ≫ ((α_ Y W X).inv ⊗ 𝟙 Z)\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (α_ (Y ⊗ W) X Z).hom\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| 𝟙 (Y ⊗ W) ⊗ (β_ X Z).hom\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| 𝟙 W ⊗ (α_ X Y Z).inv\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (α_ W (X ⊗ Y) Z).inv\n[PROOFSTEP]\nrw [← tensor_comp, ← tensor_comp, hexagon_reverse, tensor_comp, tensor_comp]\n[GOAL]\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| ((α_ W X Y).inv ⊗ 𝟙 Z) ≫ ((β_ (W ⊗ X) Y).hom ⊗ 𝟙 Z) ≫ ((α_ Y W X).inv ⊗ 𝟙 Z)\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (α_ (Y ⊗ W) X Z).hom\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| 𝟙 (Y ⊗ W) ⊗ (β_ X Z).hom\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| 𝟙 W ⊗ (α_ X Y Z).inv\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (α_ W (X ⊗ Y) Z).inv\n[PROOFSTEP]\nrw [← tensor_comp, ← tensor_comp, hexagon_reverse, tensor_comp, tensor_comp]\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n⊢ (𝟙 W ⊗ (β_ X (Y ⊗ Z)).hom) ≫ (𝟙 W ⊗ (α_ Y Z X).hom) ≫ (α_ W Y (Z ⊗ X)).inv ≫ ((β_ W Y).hom ⊗ 𝟙 (Z ⊗ X)) =\n    (𝟙 W ⊗ (α_ X Y Z).inv) ≫\n      (α_ W (X ⊗ Y) Z).inv ≫\n        ((((𝟙 W ⊗ (β_ X Y).hom) ⊗ 𝟙 Z) ≫ ((α_ W Y X).inv ⊗ 𝟙 Z) ≫ (((β_ W Y).hom ⊗ 𝟙 X) ⊗ 𝟙 Z)) ≫\n            (α_ (Y ⊗ W) X Z).hom) ≫\n          (𝟙 (Y ⊗ W) ⊗ (β_ X Z).hom)\n[PROOFSTEP]\nslice_rhs 5 6 => rw [associator_naturality]\n[GOAL]\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (((β_ W Y).hom ⊗ 𝟙 X) ⊗ 𝟙 Z) ≫ (α_ (Y ⊗ W) X Z).hom\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| 𝟙 (Y ⊗ W) ⊗ (β_ X Z).hom\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| 𝟙 W ⊗ (α_ X Y Z).inv\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (α_ W (X ⊗ Y) Z).inv\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (𝟙 W ⊗ (β_ X Y).hom) ⊗ 𝟙 Z\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (α_ W Y X).inv ⊗ 𝟙 Z\n[PROOFSTEP]\nrw [associator_naturality]\n[GOAL]\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (((β_ W Y).hom ⊗ 𝟙 X) ⊗ 𝟙 Z) ≫ (α_ (Y ⊗ W) X Z).hom\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| 𝟙 (Y ⊗ W) ⊗ (β_ X Z).hom\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| 𝟙 W ⊗ (α_ X Y Z).inv\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (α_ W (X ⊗ Y) Z).inv\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (𝟙 W ⊗ (β_ X Y).hom) ⊗ 𝟙 Z\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (α_ W Y X).inv ⊗ 𝟙 Z\n[PROOFSTEP]\nrw [associator_naturality]\n[GOAL]\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (((β_ W Y).hom ⊗ 𝟙 X) ⊗ 𝟙 Z) ≫ (α_ (Y ⊗ W) X Z).hom\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| 𝟙 (Y ⊗ W) ⊗ (β_ X Z).hom\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| 𝟙 W ⊗ (α_ X Y Z).inv\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (α_ W (X ⊗ Y) Z).inv\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (𝟙 W ⊗ (β_ X Y).hom) ⊗ 𝟙 Z\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (α_ W Y X).inv ⊗ 𝟙 Z\n[PROOFSTEP]\nrw [associator_naturality]\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n⊢ (𝟙 W ⊗ (β_ X (Y ⊗ Z)).hom) ≫ (𝟙 W ⊗ (α_ Y Z X).hom) ≫ (α_ W Y (Z ⊗ X)).inv ≫ ((β_ W Y).hom ⊗ 𝟙 (Z ⊗ X)) =\n    (𝟙 W ⊗ (α_ X Y Z).inv) ≫\n      (α_ W (X ⊗ Y) Z).inv ≫\n        ((𝟙 W ⊗ (β_ X Y).hom) ⊗ 𝟙 Z) ≫\n          ((α_ W Y X).inv ⊗ 𝟙 Z) ≫ ((α_ (W ⊗ Y) X Z).hom ≫ ((β_ W Y).hom ⊗ 𝟙 X ⊗ 𝟙 Z)) ≫ (𝟙 (Y ⊗ W) ⊗ (β_ X Z).hom)\n[PROOFSTEP]\nslice_rhs 6 7 => rw [tensor_id, tensor_id_comp_id_tensor, ← id_tensor_comp_tensor_id]\n[GOAL]\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| ((β_ W Y).hom ⊗ 𝟙 X ⊗ 𝟙 Z) ≫ (𝟙 (Y ⊗ W) ⊗ (β_ X Z).hom)\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| 𝟙 W ⊗ (α_ X Y Z).inv\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (α_ W (X ⊗ Y) Z).inv\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (𝟙 W ⊗ (β_ X Y).hom) ⊗ 𝟙 Z\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (α_ W Y X).inv ⊗ 𝟙 Z\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (α_ (W ⊗ Y) X Z).hom\n[PROOFSTEP]\nrw [tensor_id, tensor_id_comp_id_tensor, ← id_tensor_comp_tensor_id]\n[GOAL]\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| ((β_ W Y).hom ⊗ 𝟙 X ⊗ 𝟙 Z) ≫ (𝟙 (Y ⊗ W) ⊗ (β_ X Z).hom)\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| 𝟙 W ⊗ (α_ X Y Z).inv\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (α_ W (X ⊗ Y) Z).inv\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (𝟙 W ⊗ (β_ X Y).hom) ⊗ 𝟙 Z\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (α_ W Y X).inv ⊗ 𝟙 Z\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (α_ (W ⊗ Y) X Z).hom\n[PROOFSTEP]\nrw [tensor_id, tensor_id_comp_id_tensor, ← id_tensor_comp_tensor_id]\n[GOAL]\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| ((β_ W Y).hom ⊗ 𝟙 X ⊗ 𝟙 Z) ≫ (𝟙 (Y ⊗ W) ⊗ (β_ X Z).hom)\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| 𝟙 W ⊗ (α_ X Y Z).inv\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (α_ W (X ⊗ Y) Z).inv\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (𝟙 W ⊗ (β_ X Y).hom) ⊗ 𝟙 Z\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (α_ W Y X).inv ⊗ 𝟙 Z\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (α_ (W ⊗ Y) X Z).hom\n[PROOFSTEP]\nrw [tensor_id, tensor_id_comp_id_tensor, ← id_tensor_comp_tensor_id]\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n⊢ (𝟙 W ⊗ (β_ X (Y ⊗ Z)).hom) ≫ (𝟙 W ⊗ (α_ Y Z X).hom) ≫ (α_ W Y (Z ⊗ X)).inv ≫ ((β_ W Y).hom ⊗ 𝟙 (Z ⊗ X)) =\n    (𝟙 W ⊗ (α_ X Y Z).inv) ≫\n      (α_ W (X ⊗ Y) Z).inv ≫\n        ((𝟙 W ⊗ (β_ X Y).hom) ⊗ 𝟙 Z) ≫\n          ((α_ W Y X).inv ⊗ 𝟙 Z) ≫ (α_ (W ⊗ Y) X Z).hom ≫ (𝟙 (W ⊗ Y) ⊗ (β_ X Z).hom) ≫ ((β_ W Y).hom ⊗ 𝟙 (Z ⊗ X))\n[PROOFSTEP]\nslice_rhs 2 3 => rw [← associator_inv_naturality]\n[GOAL]\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (α_ W (X ⊗ Y) Z).inv ≫ ((𝟙 W ⊗ (β_ X Y).hom) ⊗ 𝟙 Z)\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (α_ W Y X).inv ⊗ 𝟙 Z\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (α_ (W ⊗ Y) X Z).hom\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| 𝟙 (W ⊗ Y) ⊗ (β_ X Z).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (β_ W Y).hom ⊗ 𝟙 (Z ⊗ X)\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| 𝟙 W ⊗ (α_ X Y Z).inv\n[PROOFSTEP]\nrw [← associator_inv_naturality]\n[GOAL]\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (α_ W (X ⊗ Y) Z).inv ≫ ((𝟙 W ⊗ (β_ X Y).hom) ⊗ 𝟙 Z)\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (α_ W Y X).inv ⊗ 𝟙 Z\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (α_ (W ⊗ Y) X Z).hom\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| 𝟙 (W ⊗ Y) ⊗ (β_ X Z).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (β_ W Y).hom ⊗ 𝟙 (Z ⊗ X)\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| 𝟙 W ⊗ (α_ X Y Z).inv\n[PROOFSTEP]\nrw [← associator_inv_naturality]\n[GOAL]\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (α_ W (X ⊗ Y) Z).inv ≫ ((𝟙 W ⊗ (β_ X Y).hom) ⊗ 𝟙 Z)\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (α_ W Y X).inv ⊗ 𝟙 Z\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (α_ (W ⊗ Y) X Z).hom\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| 𝟙 (W ⊗ Y) ⊗ (β_ X Z).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (β_ W Y).hom ⊗ 𝟙 (Z ⊗ X)\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| 𝟙 W ⊗ (α_ X Y Z).inv\n[PROOFSTEP]\nrw [← associator_inv_naturality]\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n⊢ (𝟙 W ⊗ (β_ X (Y ⊗ Z)).hom) ≫ (𝟙 W ⊗ (α_ Y Z X).hom) ≫ (α_ W Y (Z ⊗ X)).inv ≫ ((β_ W Y).hom ⊗ 𝟙 (Z ⊗ X)) =\n    (𝟙 W ⊗ (α_ X Y Z).inv) ≫\n      (((((𝟙 W ⊗ (β_ X Y).hom ⊗ 𝟙 Z) ≫ (α_ W (Y ⊗ X) Z).inv) ≫ ((α_ W Y X).inv ⊗ 𝟙 Z)) ≫ (α_ (W ⊗ Y) X Z).hom) ≫\n          (𝟙 (W ⊗ Y) ⊗ (β_ X Z).hom)) ≫\n        ((β_ W Y).hom ⊗ 𝟙 (Z ⊗ X))\n[PROOFSTEP]\nslice_rhs 3 5 => rw [pentagon_inv_inv_hom]\n[GOAL]\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (α_ W (Y ⊗ X) Z).inv ≫ ((α_ W Y X).inv ⊗ 𝟙 Z) ≫ (α_ (W ⊗ Y) X Z).hom\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| 𝟙 (W ⊗ Y) ⊗ (β_ X Z).hom\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (β_ W Y).hom ⊗ 𝟙 (Z ⊗ X)\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| 𝟙 W ⊗ (α_ X Y Z).inv\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| 𝟙 W ⊗ (β_ X Y).hom ⊗ 𝟙 Z\n[PROOFSTEP]\nrw [pentagon_inv_inv_hom]\n[GOAL]\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (α_ W (Y ⊗ X) Z).inv ≫ ((α_ W Y X).inv ⊗ 𝟙 Z) ≫ (α_ (W ⊗ Y) X Z).hom\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| 𝟙 (W ⊗ Y) ⊗ (β_ X Z).hom\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (β_ W Y).hom ⊗ 𝟙 (Z ⊗ X)\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| 𝟙 W ⊗ (α_ X Y Z).inv\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| 𝟙 W ⊗ (β_ X Y).hom ⊗ 𝟙 Z\n[PROOFSTEP]\nrw [pentagon_inv_inv_hom]\n[GOAL]\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (α_ W (Y ⊗ X) Z).inv ≫ ((α_ W Y X).inv ⊗ 𝟙 Z) ≫ (α_ (W ⊗ Y) X Z).hom\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| 𝟙 (W ⊗ Y) ⊗ (β_ X Z).hom\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (β_ W Y).hom ⊗ 𝟙 (Z ⊗ X)\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| 𝟙 W ⊗ (α_ X Y Z).inv\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| 𝟙 W ⊗ (β_ X Y).hom ⊗ 𝟙 Z\n[PROOFSTEP]\nrw [pentagon_inv_inv_hom]\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n⊢ (𝟙 W ⊗ (β_ X (Y ⊗ Z)).hom) ≫ (𝟙 W ⊗ (α_ Y Z X).hom) ≫ (α_ W Y (Z ⊗ X)).inv ≫ ((β_ W Y).hom ⊗ 𝟙 (Z ⊗ X)) =\n    (𝟙 W ⊗ (α_ X Y Z).inv) ≫\n      (𝟙 W ⊗ (β_ X Y).hom ⊗ 𝟙 Z) ≫\n        (((𝟙 W ⊗ (α_ Y X Z).hom) ≫ (α_ W Y (X ⊗ Z)).inv) ≫ (𝟙 (W ⊗ Y) ⊗ (β_ X Z).hom)) ≫ ((β_ W Y).hom ⊗ 𝟙 (Z ⊗ X))\n[PROOFSTEP]\nslice_rhs 4 5 => rw [← tensor_id, ← associator_inv_naturality]\n[GOAL]\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (α_ W Y (X ⊗ Z)).inv ≫ (𝟙 (W ⊗ Y) ⊗ (β_ X Z).hom)\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (β_ W Y).hom ⊗ 𝟙 (Z ⊗ X)\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| 𝟙 W ⊗ (α_ X Y Z).inv\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| 𝟙 W ⊗ (β_ X Y).hom ⊗ 𝟙 Z\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| 𝟙 W ⊗ (α_ Y X Z).hom\n[PROOFSTEP]\nrw [← tensor_id, ← associator_inv_naturality]\n[GOAL]\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (α_ W Y (X ⊗ Z)).inv ≫ (𝟙 (W ⊗ Y) ⊗ (β_ X Z).hom)\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (β_ W Y).hom ⊗ 𝟙 (Z ⊗ X)\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| 𝟙 W ⊗ (α_ X Y Z).inv\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| 𝟙 W ⊗ (β_ X Y).hom ⊗ 𝟙 Z\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| 𝟙 W ⊗ (α_ Y X Z).hom\n[PROOFSTEP]\nrw [← tensor_id, ← associator_inv_naturality]\n[GOAL]\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (α_ W Y (X ⊗ Z)).inv ≫ (𝟙 (W ⊗ Y) ⊗ (β_ X Z).hom)\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (β_ W Y).hom ⊗ 𝟙 (Z ⊗ X)\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| 𝟙 W ⊗ (α_ X Y Z).inv\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| 𝟙 W ⊗ (β_ X Y).hom ⊗ 𝟙 Z\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| 𝟙 W ⊗ (α_ Y X Z).hom\n[PROOFSTEP]\nrw [← tensor_id, ← associator_inv_naturality]\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n⊢ (𝟙 W ⊗ (β_ X (Y ⊗ Z)).hom) ≫ (𝟙 W ⊗ (α_ Y Z X).hom) ≫ (α_ W Y (Z ⊗ X)).inv ≫ ((β_ W Y).hom ⊗ 𝟙 (Z ⊗ X)) =\n    (𝟙 W ⊗ (α_ X Y Z).inv) ≫\n      (𝟙 W ⊗ (β_ X Y).hom ⊗ 𝟙 Z) ≫\n        (𝟙 W ⊗ (α_ Y X Z).hom) ≫ ((𝟙 W ⊗ 𝟙 Y ⊗ (β_ X Z).hom) ≫ (α_ W Y (Z ⊗ X)).inv) ≫ ((β_ W Y).hom ⊗ 𝟙 (Z ⊗ X))\n[PROOFSTEP]\nslice_rhs 2 4 => rw [← tensor_comp, ← tensor_comp, ← hexagon_forward, tensor_comp, tensor_comp]\n[GOAL]\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (𝟙 W ⊗ (β_ X Y).hom ⊗ 𝟙 Z) ≫ (𝟙 W ⊗ (α_ Y X Z).hom) ≫ (𝟙 W ⊗ 𝟙 Y ⊗ (β_ X Z).hom)\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (α_ W Y (Z ⊗ X)).inv\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (β_ W Y).hom ⊗ 𝟙 (Z ⊗ X)\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| 𝟙 W ⊗ (α_ X Y Z).inv\n[PROOFSTEP]\nrw [← tensor_comp, ← tensor_comp, ← hexagon_forward, tensor_comp, tensor_comp]\n[GOAL]\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (𝟙 W ⊗ (β_ X Y).hom ⊗ 𝟙 Z) ≫ (𝟙 W ⊗ (α_ Y X Z).hom) ≫ (𝟙 W ⊗ 𝟙 Y ⊗ (β_ X Z).hom)\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (α_ W Y (Z ⊗ X)).inv\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (β_ W Y).hom ⊗ 𝟙 (Z ⊗ X)\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| 𝟙 W ⊗ (α_ X Y Z).inv\n[PROOFSTEP]\nrw [← tensor_comp, ← tensor_comp, ← hexagon_forward, tensor_comp, tensor_comp]\n[GOAL]\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (𝟙 W ⊗ (β_ X Y).hom ⊗ 𝟙 Z) ≫ (𝟙 W ⊗ (α_ Y X Z).hom) ≫ (𝟙 W ⊗ 𝟙 Y ⊗ (β_ X Z).hom)\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (α_ W Y (Z ⊗ X)).inv\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| (β_ W Y).hom ⊗ 𝟙 (Z ⊗ X)\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n| 𝟙 W ⊗ (α_ X Y Z).inv\n[PROOFSTEP]\nrw [← tensor_comp, ← tensor_comp, ← hexagon_forward, tensor_comp, tensor_comp]\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nW X Y Z : C\n⊢ (𝟙 W ⊗ (β_ X (Y ⊗ Z)).hom) ≫ (𝟙 W ⊗ (α_ Y Z X).hom) ≫ (α_ W Y (Z ⊗ X)).inv ≫ ((β_ W Y).hom ⊗ 𝟙 (Z ⊗ X)) =\n    (𝟙 W ⊗ (α_ X Y Z).inv) ≫\n      (((𝟙 W ⊗ (α_ X Y Z).hom) ≫ (𝟙 W ⊗ (β_ X (Y ⊗ Z)).hom) ≫ (𝟙 W ⊗ (α_ Y Z X).hom)) ≫ (α_ W Y (Z ⊗ X)).inv) ≫\n        ((β_ W Y).hom ⊗ 𝟙 (Z ⊗ X))\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n⊢ tensor_μ C (X₁ ⊗ X₂, X₃) (Y₁ ⊗ Y₂, Y₃) ≫\n      (tensor_μ C (X₁, X₂) (Y₁, Y₂) ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫ (α_ (X₁ ⊗ Y₁) (X₂ ⊗ Y₂) (X₃ ⊗ Y₃)).hom =\n    ((α_ X₁ X₂ X₃).hom ⊗ (α_ Y₁ Y₂ Y₃).hom) ≫\n      tensor_μ C (X₁, X₂ ⊗ X₃) (Y₁, Y₂ ⊗ Y₃) ≫ (𝟙 (X₁ ⊗ Y₁) ⊗ tensor_μ C (X₂, X₃) (Y₂, Y₃))\n[PROOFSTEP]\nhave :\n  (α_ (X₁ ⊗ Y₁) (X₂ ⊗ Y₂) (X₃ ⊗ Y₃)).hom =\n    ((α_ X₁ Y₁ (X₂ ⊗ Y₂)).hom ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫\n      ((𝟙 X₁ ⊗ (α_ Y₁ X₂ Y₂).inv) ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫\n        (α_ (X₁ ⊗ (Y₁ ⊗ X₂) ⊗ Y₂) X₃ Y₃).inv ≫\n          ((α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂) X₃).hom ⊗ 𝟙 Y₃) ≫\n            ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) Y₂ X₃).hom) ⊗ 𝟙 Y₃) ≫\n              (α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂ ⊗ X₃) Y₃).hom ≫\n                (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (Y₂ ⊗ X₃) Y₃).hom) ≫\n                  (𝟙 X₁ ⊗ (α_ Y₁ X₂ ((Y₂ ⊗ X₃) ⊗ Y₃)).hom) ≫\n                    (α_ X₁ Y₁ (X₂ ⊗ (Y₂ ⊗ X₃) ⊗ Y₃)).inv ≫\n                      (𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ Y₂ X₃ Y₃).hom) ≫ (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ Y₂ (X₃ ⊗ Y₃)).inv) :=\n  by pure_coherence\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n⊢ (α_ (X₁ ⊗ Y₁) (X₂ ⊗ Y₂) (X₃ ⊗ Y₃)).hom =\n    ((α_ X₁ Y₁ (X₂ ⊗ Y₂)).hom ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫\n      ((𝟙 X₁ ⊗ (α_ Y₁ X₂ Y₂).inv) ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫\n        (α_ (X₁ ⊗ (Y₁ ⊗ X₂) ⊗ Y₂) X₃ Y₃).inv ≫\n          ((α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂) X₃).hom ⊗ 𝟙 Y₃) ≫\n            ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) Y₂ X₃).hom) ⊗ 𝟙 Y₃) ≫\n              (α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂ ⊗ X₃) Y₃).hom ≫\n                (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (Y₂ ⊗ X₃) Y₃).hom) ≫\n                  (𝟙 X₁ ⊗ (α_ Y₁ X₂ ((Y₂ ⊗ X₃) ⊗ Y₃)).hom) ≫\n                    (α_ X₁ Y₁ (X₂ ⊗ (Y₂ ⊗ X₃) ⊗ Y₃)).inv ≫\n                      (𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ Y₂ X₃ Y₃).hom) ≫ (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ Y₂ (X₃ ⊗ Y₃)).inv)\n[PROOFSTEP]\npure_coherence\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\nthis :\n  (α_ (X₁ ⊗ Y₁) (X₂ ⊗ Y₂) (X₃ ⊗ Y₃)).hom =\n    ((α_ X₁ Y₁ (X₂ ⊗ Y₂)).hom ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫\n      ((𝟙 X₁ ⊗ (α_ Y₁ X₂ Y₂).inv) ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫\n        (α_ (X₁ ⊗ (Y₁ ⊗ X₂) ⊗ Y₂) X₃ Y₃).inv ≫\n          ((α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂) X₃).hom ⊗ 𝟙 Y₃) ≫\n            ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) Y₂ X₃).hom) ⊗ 𝟙 Y₃) ≫\n              (α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂ ⊗ X₃) Y₃).hom ≫\n                (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (Y₂ ⊗ X₃) Y₃).hom) ≫\n                  (𝟙 X₁ ⊗ (α_ Y₁ X₂ ((Y₂ ⊗ X₃) ⊗ Y₃)).hom) ≫\n                    (α_ X₁ Y₁ (X₂ ⊗ (Y₂ ⊗ X₃) ⊗ Y₃)).inv ≫\n                      (𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ Y₂ X₃ Y₃).hom) ≫ (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ Y₂ (X₃ ⊗ Y₃)).inv)\n⊢ tensor_μ C (X₁ ⊗ X₂, X₃) (Y₁ ⊗ Y₂, Y₃) ≫\n      (tensor_μ C (X₁, X₂) (Y₁, Y₂) ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫ (α_ (X₁ ⊗ Y₁) (X₂ ⊗ Y₂) (X₃ ⊗ Y₃)).hom =\n    ((α_ X₁ X₂ X₃).hom ⊗ (α_ Y₁ Y₂ Y₃).hom) ≫\n      tensor_μ C (X₁, X₂ ⊗ X₃) (Y₁, Y₂ ⊗ Y₃) ≫ (𝟙 (X₁ ⊗ Y₁) ⊗ tensor_μ C (X₂, X₃) (Y₂, Y₃))\n[PROOFSTEP]\nrw [this]\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\nthis :\n  (α_ (X₁ ⊗ Y₁) (X₂ ⊗ Y₂) (X₃ ⊗ Y₃)).hom =\n    ((α_ X₁ Y₁ (X₂ ⊗ Y₂)).hom ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫\n      ((𝟙 X₁ ⊗ (α_ Y₁ X₂ Y₂).inv) ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫\n        (α_ (X₁ ⊗ (Y₁ ⊗ X₂) ⊗ Y₂) X₃ Y₃).inv ≫\n          ((α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂) X₃).hom ⊗ 𝟙 Y₃) ≫\n            ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) Y₂ X₃).hom) ⊗ 𝟙 Y₃) ≫\n              (α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂ ⊗ X₃) Y₃).hom ≫\n                (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (Y₂ ⊗ X₃) Y₃).hom) ≫\n                  (𝟙 X₁ ⊗ (α_ Y₁ X₂ ((Y₂ ⊗ X₃) ⊗ Y₃)).hom) ≫\n                    (α_ X₁ Y₁ (X₂ ⊗ (Y₂ ⊗ X₃) ⊗ Y₃)).inv ≫\n                      (𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ Y₂ X₃ Y₃).hom) ≫ (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ Y₂ (X₃ ⊗ Y₃)).inv)\n⊢ tensor_μ C (X₁ ⊗ X₂, X₃) (Y₁ ⊗ Y₂, Y₃) ≫\n      (tensor_μ C (X₁, X₂) (Y₁, Y₂) ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫\n        ((α_ X₁ Y₁ (X₂ ⊗ Y₂)).hom ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫\n          ((𝟙 X₁ ⊗ (α_ Y₁ X₂ Y₂).inv) ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫\n            (α_ (X₁ ⊗ (Y₁ ⊗ X₂) ⊗ Y₂) X₃ Y₃).inv ≫\n              ((α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂) X₃).hom ⊗ 𝟙 Y₃) ≫\n                ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) Y₂ X₃).hom) ⊗ 𝟙 Y₃) ≫\n                  (α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂ ⊗ X₃) Y₃).hom ≫\n                    (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (Y₂ ⊗ X₃) Y₃).hom) ≫\n                      (𝟙 X₁ ⊗ (α_ Y₁ X₂ ((Y₂ ⊗ X₃) ⊗ Y₃)).hom) ≫\n                        (α_ X₁ Y₁ (X₂ ⊗ (Y₂ ⊗ X₃) ⊗ Y₃)).inv ≫\n                          (𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ Y₂ X₃ Y₃).hom) ≫ (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ Y₂ (X₃ ⊗ Y₃)).inv) =\n    ((α_ X₁ X₂ X₃).hom ⊗ (α_ Y₁ Y₂ Y₃).hom) ≫\n      tensor_μ C (X₁, X₂ ⊗ X₃) (Y₁, Y₂ ⊗ Y₃) ≫ (𝟙 (X₁ ⊗ Y₁) ⊗ tensor_μ C (X₂, X₃) (Y₂, Y₃))\n[PROOFSTEP]\nclear this\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n⊢ tensor_μ C (X₁ ⊗ X₂, X₃) (Y₁ ⊗ Y₂, Y₃) ≫\n      (tensor_μ C (X₁, X₂) (Y₁, Y₂) ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫\n        ((α_ X₁ Y₁ (X₂ ⊗ Y₂)).hom ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫\n          ((𝟙 X₁ ⊗ (α_ Y₁ X₂ Y₂).inv) ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫\n            (α_ (X₁ ⊗ (Y₁ ⊗ X₂) ⊗ Y₂) X₃ Y₃).inv ≫\n              ((α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂) X₃).hom ⊗ 𝟙 Y₃) ≫\n                ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) Y₂ X₃).hom) ⊗ 𝟙 Y₃) ≫\n                  (α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂ ⊗ X₃) Y₃).hom ≫\n                    (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (Y₂ ⊗ X₃) Y₃).hom) ≫\n                      (𝟙 X₁ ⊗ (α_ Y₁ X₂ ((Y₂ ⊗ X₃) ⊗ Y₃)).hom) ≫\n                        (α_ X₁ Y₁ (X₂ ⊗ (Y₂ ⊗ X₃) ⊗ Y₃)).inv ≫\n                          (𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ Y₂ X₃ Y₃).hom) ≫ (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ Y₂ (X₃ ⊗ Y₃)).inv) =\n    ((α_ X₁ X₂ X₃).hom ⊗ (α_ Y₁ Y₂ Y₃).hom) ≫\n      tensor_μ C (X₁, X₂ ⊗ X₃) (Y₁, Y₂ ⊗ Y₃) ≫ (𝟙 (X₁ ⊗ Y₁) ⊗ tensor_μ C (X₂, X₃) (Y₂, Y₃))\n[PROOFSTEP]\nslice_lhs 2 4 => rw [← tensor_comp, ← tensor_comp, tensor_μ_def₁, tensor_comp, tensor_comp]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (tensor_μ C (X₁, X₂) (Y₁, Y₂) ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫\n    ((α_ X₁ Y₁ (X₂ ⊗ Y₂)).hom ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫ ((𝟙 X₁ ⊗ (α_ Y₁ X₂ Y₂).inv) ⊗ 𝟙 (X₃ ⊗ Y₃))\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ (X₁ ⊗ (Y₁ ⊗ X₂) ⊗ Y₂) X₃ Y₃).inv\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂) X₃).hom ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) Y₂ X₃).hom) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂ ⊗ X₃) Y₃).hom\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (Y₂ ⊗ X₃) Y₃).hom\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ Y₁ X₂ ((Y₂ ⊗ X₃) ⊗ Y₃)).hom\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ Y₁ (X₂ ⊗ (Y₂ ⊗ X₃) ⊗ Y₃)).inv\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ Y₂ X₃ Y₃).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ Y₂ (X₃ ⊗ Y₃)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| tensor_μ C (X₁ ⊗ X₂, X₃) (Y₁ ⊗ Y₂, Y₃)\n[PROOFSTEP]\nrw [← tensor_comp, ← tensor_comp, tensor_μ_def₁, tensor_comp, tensor_comp]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (tensor_μ C (X₁, X₂) (Y₁, Y₂) ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫\n    ((α_ X₁ Y₁ (X₂ ⊗ Y₂)).hom ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫ ((𝟙 X₁ ⊗ (α_ Y₁ X₂ Y₂).inv) ⊗ 𝟙 (X₃ ⊗ Y₃))\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ (X₁ ⊗ (Y₁ ⊗ X₂) ⊗ Y₂) X₃ Y₃).inv\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂) X₃).hom ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) Y₂ X₃).hom) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂ ⊗ X₃) Y₃).hom\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (Y₂ ⊗ X₃) Y₃).hom\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ Y₁ X₂ ((Y₂ ⊗ X₃) ⊗ Y₃)).hom\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ Y₁ (X₂ ⊗ (Y₂ ⊗ X₃) ⊗ Y₃)).inv\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ Y₂ X₃ Y₃).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ Y₂ (X₃ ⊗ Y₃)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| tensor_μ C (X₁ ⊗ X₂, X₃) (Y₁ ⊗ Y₂, Y₃)\n[PROOFSTEP]\nrw [← tensor_comp, ← tensor_comp, tensor_μ_def₁, tensor_comp, tensor_comp]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (tensor_μ C (X₁, X₂) (Y₁, Y₂) ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫\n    ((α_ X₁ Y₁ (X₂ ⊗ Y₂)).hom ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫ ((𝟙 X₁ ⊗ (α_ Y₁ X₂ Y₂).inv) ⊗ 𝟙 (X₃ ⊗ Y₃))\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ (X₁ ⊗ (Y₁ ⊗ X₂) ⊗ Y₂) X₃ Y₃).inv\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂) X₃).hom ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) Y₂ X₃).hom) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂ ⊗ X₃) Y₃).hom\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (Y₂ ⊗ X₃) Y₃).hom\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ Y₁ X₂ ((Y₂ ⊗ X₃) ⊗ Y₃)).hom\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ Y₁ (X₂ ⊗ (Y₂ ⊗ X₃) ⊗ Y₃)).inv\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ Y₂ X₃ Y₃).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ Y₂ (X₃ ⊗ Y₃)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| tensor_μ C (X₁ ⊗ X₂, X₃) (Y₁ ⊗ Y₂, Y₃)\n[PROOFSTEP]\nrw [← tensor_comp, ← tensor_comp, tensor_μ_def₁, tensor_comp, tensor_comp]\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n⊢ tensor_μ C (X₁ ⊗ X₂, X₃) (Y₁ ⊗ Y₂, Y₃) ≫\n      (((((((((((α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫\n                          ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫ ((𝟙 X₁ ⊗ (β_ X₂ Y₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 (X₃ ⊗ Y₃))) ≫\n                        (α_ (X₁ ⊗ (Y₁ ⊗ X₂) ⊗ Y₂) X₃ Y₃).inv) ≫\n                      ((α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂) X₃).hom ⊗ 𝟙 Y₃)) ≫\n                    ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) Y₂ X₃).hom) ⊗ 𝟙 Y₃)) ≫\n                  (α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂ ⊗ X₃) Y₃).hom) ≫\n                (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (Y₂ ⊗ X₃) Y₃).hom)) ≫\n              (𝟙 X₁ ⊗ (α_ Y₁ X₂ ((Y₂ ⊗ X₃) ⊗ Y₃)).hom)) ≫\n            (α_ X₁ Y₁ (X₂ ⊗ (Y₂ ⊗ X₃) ⊗ Y₃)).inv) ≫\n          (𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ Y₂ X₃ Y₃).hom)) ≫\n        (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ Y₂ (X₃ ⊗ Y₃)).inv) =\n    ((α_ X₁ X₂ X₃).hom ⊗ (α_ Y₁ Y₂ Y₃).hom) ≫\n      tensor_μ C (X₁, X₂ ⊗ X₃) (Y₁, Y₂ ⊗ Y₃) ≫ (𝟙 (X₁ ⊗ Y₁) ⊗ tensor_μ C (X₂, X₃) (Y₂, Y₃))\n[PROOFSTEP]\nslice_lhs 4 5 => rw [← tensor_id, associator_inv_naturality]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| ((𝟙 X₁ ⊗ (β_ X₂ Y₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫ (α_ (X₁ ⊗ (Y₁ ⊗ X₂) ⊗ Y₂) X₃ Y₃).inv\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂) X₃).hom ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) Y₂ X₃).hom) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂ ⊗ X₃) Y₃).hom\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (Y₂ ⊗ X₃) Y₃).hom\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ Y₁ X₂ ((Y₂ ⊗ X₃) ⊗ Y₃)).hom\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ Y₁ (X₂ ⊗ (Y₂ ⊗ X₃) ⊗ Y₃)).inv\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ Y₂ X₃ Y₃).hom\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ Y₂ (X₃ ⊗ Y₃)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| tensor_μ C (X₁ ⊗ X₂, X₃) (Y₁ ⊗ Y₂, Y₃)\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (X₃ ⊗ Y₃)\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (X₃ ⊗ Y₃)\n[PROOFSTEP]\nrw [← tensor_id, associator_inv_naturality]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| ((𝟙 X₁ ⊗ (β_ X₂ Y₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫ (α_ (X₁ ⊗ (Y₁ ⊗ X₂) ⊗ Y₂) X₃ Y₃).inv\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂) X₃).hom ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) Y₂ X₃).hom) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂ ⊗ X₃) Y₃).hom\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (Y₂ ⊗ X₃) Y₃).hom\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ Y₁ X₂ ((Y₂ ⊗ X₃) ⊗ Y₃)).hom\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ Y₁ (X₂ ⊗ (Y₂ ⊗ X₃) ⊗ Y₃)).inv\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ Y₂ X₃ Y₃).hom\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ Y₂ (X₃ ⊗ Y₃)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| tensor_μ C (X₁ ⊗ X₂, X₃) (Y₁ ⊗ Y₂, Y₃)\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (X₃ ⊗ Y₃)\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (X₃ ⊗ Y₃)\n[PROOFSTEP]\nrw [← tensor_id, associator_inv_naturality]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| ((𝟙 X₁ ⊗ (β_ X₂ Y₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫ (α_ (X₁ ⊗ (Y₁ ⊗ X₂) ⊗ Y₂) X₃ Y₃).inv\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂) X₃).hom ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) Y₂ X₃).hom) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂ ⊗ X₃) Y₃).hom\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (Y₂ ⊗ X₃) Y₃).hom\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ Y₁ X₂ ((Y₂ ⊗ X₃) ⊗ Y₃)).hom\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ Y₁ (X₂ ⊗ (Y₂ ⊗ X₃) ⊗ Y₃)).inv\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ Y₂ X₃ Y₃).hom\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ Y₂ (X₃ ⊗ Y₃)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| tensor_μ C (X₁ ⊗ X₂, X₃) (Y₁ ⊗ Y₂, Y₃)\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (X₃ ⊗ Y₃)\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (X₃ ⊗ Y₃)\n[PROOFSTEP]\nrw [← tensor_id, associator_inv_naturality]\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n⊢ tensor_μ C (X₁ ⊗ X₂, X₃) (Y₁ ⊗ Y₂, Y₃) ≫\n      ((α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫\n        ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫\n          (((((((((α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) X₃ Y₃).inv ≫ (((𝟙 X₁ ⊗ (β_ X₂ Y₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 X₃) ⊗ 𝟙 Y₃)) ≫\n                          ((α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂) X₃).hom ⊗ 𝟙 Y₃)) ≫\n                        ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) Y₂ X₃).hom) ⊗ 𝟙 Y₃)) ≫\n                      (α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂ ⊗ X₃) Y₃).hom) ≫\n                    (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (Y₂ ⊗ X₃) Y₃).hom)) ≫\n                  (𝟙 X₁ ⊗ (α_ Y₁ X₂ ((Y₂ ⊗ X₃) ⊗ Y₃)).hom)) ≫\n                (α_ X₁ Y₁ (X₂ ⊗ (Y₂ ⊗ X₃) ⊗ Y₃)).inv) ≫\n              (𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ Y₂ X₃ Y₃).hom)) ≫\n            (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ Y₂ (X₃ ⊗ Y₃)).inv) =\n    ((α_ X₁ X₂ X₃).hom ⊗ (α_ Y₁ Y₂ Y₃).hom) ≫\n      tensor_μ C (X₁, X₂ ⊗ X₃) (Y₁, Y₂ ⊗ Y₃) ≫ (𝟙 (X₁ ⊗ Y₁) ⊗ tensor_μ C (X₂, X₃) (Y₂, Y₃))\n[PROOFSTEP]\nslice_lhs 5 6 => rw [← tensor_comp, associator_naturality, tensor_comp]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (((𝟙 X₁ ⊗ (β_ X₂ Y₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 X₃) ⊗ 𝟙 Y₃) ≫ ((α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂) X₃).hom ⊗ 𝟙 Y₃)\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) Y₂ X₃).hom) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂ ⊗ X₃) Y₃).hom\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (Y₂ ⊗ X₃) Y₃).hom\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ Y₁ X₂ ((Y₂ ⊗ X₃) ⊗ Y₃)).hom\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ Y₁ (X₂ ⊗ (Y₂ ⊗ X₃) ⊗ Y₃)).inv\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ Y₂ X₃ Y₃).hom\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ Y₂ (X₃ ⊗ Y₃)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| tensor_μ C (X₁ ⊗ X₂, X₃) (Y₁ ⊗ Y₂, Y₃)\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (X₃ ⊗ Y₃)\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (X₃ ⊗ Y₃)\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) X₃ Y₃).inv\n[PROOFSTEP]\nrw [← tensor_comp, associator_naturality, tensor_comp]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (((𝟙 X₁ ⊗ (β_ X₂ Y₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 X₃) ⊗ 𝟙 Y₃) ≫ ((α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂) X₃).hom ⊗ 𝟙 Y₃)\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) Y₂ X₃).hom) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂ ⊗ X₃) Y₃).hom\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (Y₂ ⊗ X₃) Y₃).hom\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ Y₁ X₂ ((Y₂ ⊗ X₃) ⊗ Y₃)).hom\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ Y₁ (X₂ ⊗ (Y₂ ⊗ X₃) ⊗ Y₃)).inv\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ Y₂ X₃ Y₃).hom\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ Y₂ (X₃ ⊗ Y₃)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| tensor_μ C (X₁ ⊗ X₂, X₃) (Y₁ ⊗ Y₂, Y₃)\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (X₃ ⊗ Y₃)\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (X₃ ⊗ Y₃)\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) X₃ Y₃).inv\n[PROOFSTEP]\nrw [← tensor_comp, associator_naturality, tensor_comp]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (((𝟙 X₁ ⊗ (β_ X₂ Y₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 X₃) ⊗ 𝟙 Y₃) ≫ ((α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂) X₃).hom ⊗ 𝟙 Y₃)\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) Y₂ X₃).hom) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂ ⊗ X₃) Y₃).hom\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (Y₂ ⊗ X₃) Y₃).hom\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ Y₁ X₂ ((Y₂ ⊗ X₃) ⊗ Y₃)).hom\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ Y₁ (X₂ ⊗ (Y₂ ⊗ X₃) ⊗ Y₃)).inv\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ Y₂ X₃ Y₃).hom\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ Y₂ (X₃ ⊗ Y₃)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| tensor_μ C (X₁ ⊗ X₂, X₃) (Y₁ ⊗ Y₂, Y₃)\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (X₃ ⊗ Y₃)\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (X₃ ⊗ Y₃)\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) X₃ Y₃).inv\n[PROOFSTEP]\nrw [← tensor_comp, associator_naturality, tensor_comp]\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n⊢ tensor_μ C (X₁ ⊗ X₂, X₃) (Y₁ ⊗ Y₂, Y₃) ≫\n      ((α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫\n        ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫\n          (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) X₃ Y₃).inv ≫\n            (((((((((α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) X₃).hom ⊗ 𝟙 Y₃) ≫ ((𝟙 X₁ ⊗ ((β_ X₂ Y₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 X₃) ⊗ 𝟙 Y₃)) ≫\n                          ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) Y₂ X₃).hom) ⊗ 𝟙 Y₃)) ≫\n                        (α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂ ⊗ X₃) Y₃).hom) ≫\n                      (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (Y₂ ⊗ X₃) Y₃).hom)) ≫\n                    (𝟙 X₁ ⊗ (α_ Y₁ X₂ ((Y₂ ⊗ X₃) ⊗ Y₃)).hom)) ≫\n                  (α_ X₁ Y₁ (X₂ ⊗ (Y₂ ⊗ X₃) ⊗ Y₃)).inv) ≫\n                (𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ Y₂ X₃ Y₃).hom)) ≫\n              (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ Y₂ (X₃ ⊗ Y₃)).inv) =\n    ((α_ X₁ X₂ X₃).hom ⊗ (α_ Y₁ Y₂ Y₃).hom) ≫\n      tensor_μ C (X₁, X₂ ⊗ X₃) (Y₁, Y₂ ⊗ Y₃) ≫ (𝟙 (X₁ ⊗ Y₁) ⊗ tensor_μ C (X₂, X₃) (Y₂, Y₃))\n[PROOFSTEP]\nslice_lhs 6 7 => rw [← tensor_comp, ← tensor_comp, associator_naturality, tensor_comp, tensor_comp]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| ((𝟙 X₁ ⊗ ((β_ X₂ Y₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 X₃) ⊗ 𝟙 Y₃) ≫ ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) Y₂ X₃).hom) ⊗ 𝟙 Y₃)\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂ ⊗ X₃) Y₃).hom\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (Y₂ ⊗ X₃) Y₃).hom\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ Y₁ X₂ ((Y₂ ⊗ X₃) ⊗ Y₃)).hom\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ Y₁ (X₂ ⊗ (Y₂ ⊗ X₃) ⊗ Y₃)).inv\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ Y₂ X₃ Y₃).hom\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ Y₂ (X₃ ⊗ Y₃)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| tensor_μ C (X₁ ⊗ X₂, X₃) (Y₁ ⊗ Y₂, Y₃)\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (X₃ ⊗ Y₃)\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (X₃ ⊗ Y₃)\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) X₃ Y₃).inv\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) X₃).hom ⊗ 𝟙 Y₃\n[PROOFSTEP]\nrw [← tensor_comp, ← tensor_comp, associator_naturality, tensor_comp, tensor_comp]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| ((𝟙 X₁ ⊗ ((β_ X₂ Y₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 X₃) ⊗ 𝟙 Y₃) ≫ ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) Y₂ X₃).hom) ⊗ 𝟙 Y₃)\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂ ⊗ X₃) Y₃).hom\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (Y₂ ⊗ X₃) Y₃).hom\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ Y₁ X₂ ((Y₂ ⊗ X₃) ⊗ Y₃)).hom\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ Y₁ (X₂ ⊗ (Y₂ ⊗ X₃) ⊗ Y₃)).inv\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ Y₂ X₃ Y₃).hom\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ Y₂ (X₃ ⊗ Y₃)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| tensor_μ C (X₁ ⊗ X₂, X₃) (Y₁ ⊗ Y₂, Y₃)\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (X₃ ⊗ Y₃)\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (X₃ ⊗ Y₃)\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) X₃ Y₃).inv\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) X₃).hom ⊗ 𝟙 Y₃\n[PROOFSTEP]\nrw [← tensor_comp, ← tensor_comp, associator_naturality, tensor_comp, tensor_comp]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| ((𝟙 X₁ ⊗ ((β_ X₂ Y₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 X₃) ⊗ 𝟙 Y₃) ≫ ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) Y₂ X₃).hom) ⊗ 𝟙 Y₃)\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂ ⊗ X₃) Y₃).hom\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (Y₂ ⊗ X₃) Y₃).hom\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ Y₁ X₂ ((Y₂ ⊗ X₃) ⊗ Y₃)).hom\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ Y₁ (X₂ ⊗ (Y₂ ⊗ X₃) ⊗ Y₃)).inv\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ Y₂ X₃ Y₃).hom\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ Y₂ (X₃ ⊗ Y₃)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| tensor_μ C (X₁ ⊗ X₂, X₃) (Y₁ ⊗ Y₂, Y₃)\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (X₃ ⊗ Y₃)\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (X₃ ⊗ Y₃)\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) X₃ Y₃).inv\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) X₃).hom ⊗ 𝟙 Y₃\n[PROOFSTEP]\nrw [← tensor_comp, ← tensor_comp, associator_naturality, tensor_comp, tensor_comp]\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n⊢ tensor_μ C (X₁ ⊗ X₂, X₃) (Y₁ ⊗ Y₂, Y₃) ≫\n      ((α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫\n        ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫\n          (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) X₃ Y₃).inv ≫\n            ((α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) X₃).hom ⊗ 𝟙 Y₃) ≫\n              ((((((((𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Y₂ X₃).hom) ⊗ 𝟙 Y₃) ≫ ((𝟙 X₁ ⊗ (β_ X₂ Y₁).hom ⊗ 𝟙 Y₂ ⊗ 𝟙 X₃) ⊗ 𝟙 Y₃)) ≫\n                          (α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂ ⊗ X₃) Y₃).hom) ≫\n                        (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (Y₂ ⊗ X₃) Y₃).hom)) ≫\n                      (𝟙 X₁ ⊗ (α_ Y₁ X₂ ((Y₂ ⊗ X₃) ⊗ Y₃)).hom)) ≫\n                    (α_ X₁ Y₁ (X₂ ⊗ (Y₂ ⊗ X₃) ⊗ Y₃)).inv) ≫\n                  (𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ Y₂ X₃ Y₃).hom)) ≫\n                (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ Y₂ (X₃ ⊗ Y₃)).inv) =\n    ((α_ X₁ X₂ X₃).hom ⊗ (α_ Y₁ Y₂ Y₃).hom) ≫\n      tensor_μ C (X₁, X₂ ⊗ X₃) (Y₁, Y₂ ⊗ Y₃) ≫ (𝟙 (X₁ ⊗ Y₁) ⊗ tensor_μ C (X₂, X₃) (Y₂, Y₃))\n[PROOFSTEP]\nhave :\n  ((α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫\n      ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫\n        (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) X₃ Y₃).inv ≫\n          ((α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) X₃).hom ⊗ 𝟙 Y₃) ≫ ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Y₂ X₃).hom) ⊗ 𝟙 Y₃) =\n    (α_ (X₁ ⊗ X₂) (Y₁ ⊗ Y₂) (X₃ ⊗ Y₃)).hom ≫\n      (𝟙 (X₁ ⊗ X₂) ⊗ (α_ (Y₁ ⊗ Y₂) X₃ Y₃).inv) ≫\n        (α_ X₁ X₂ (((Y₁ ⊗ Y₂) ⊗ X₃) ⊗ Y₃)).hom ≫\n          (𝟙 X₁ ⊗ (α_ X₂ ((Y₁ ⊗ Y₂) ⊗ X₃) Y₃).inv) ≫\n            (α_ X₁ (X₂ ⊗ (Y₁ ⊗ Y₂) ⊗ X₃) Y₃).inv ≫\n              ((𝟙 X₁ ⊗ 𝟙 X₂ ⊗ (α_ Y₁ Y₂ X₃).hom) ⊗ 𝟙 Y₃) ≫ ((𝟙 X₁ ⊗ (α_ X₂ Y₁ (Y₂ ⊗ X₃)).inv) ⊗ 𝟙 Y₃) :=\n  by pure_coherence\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n⊢ ((α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫\n      ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫\n        (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) X₃ Y₃).inv ≫\n          ((α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) X₃).hom ⊗ 𝟙 Y₃) ≫ ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Y₂ X₃).hom) ⊗ 𝟙 Y₃) =\n    (α_ (X₁ ⊗ X₂) (Y₁ ⊗ Y₂) (X₃ ⊗ Y₃)).hom ≫\n      (𝟙 (X₁ ⊗ X₂) ⊗ (α_ (Y₁ ⊗ Y₂) X₃ Y₃).inv) ≫\n        (α_ X₁ X₂ (((Y₁ ⊗ Y₂) ⊗ X₃) ⊗ Y₃)).hom ≫\n          (𝟙 X₁ ⊗ (α_ X₂ ((Y₁ ⊗ Y₂) ⊗ X₃) Y₃).inv) ≫\n            (α_ X₁ (X₂ ⊗ (Y₁ ⊗ Y₂) ⊗ X₃) Y₃).inv ≫\n              ((𝟙 X₁ ⊗ 𝟙 X₂ ⊗ (α_ Y₁ Y₂ X₃).hom) ⊗ 𝟙 Y₃) ≫ ((𝟙 X₁ ⊗ (α_ X₂ Y₁ (Y₂ ⊗ X₃)).inv) ⊗ 𝟙 Y₃)\n[PROOFSTEP]\npure_coherence\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\nthis :\n  ((α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫\n      ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫\n        (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) X₃ Y₃).inv ≫\n          ((α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) X₃).hom ⊗ 𝟙 Y₃) ≫ ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Y₂ X₃).hom) ⊗ 𝟙 Y₃) =\n    (α_ (X₁ ⊗ X₂) (Y₁ ⊗ Y₂) (X₃ ⊗ Y₃)).hom ≫\n      (𝟙 (X₁ ⊗ X₂) ⊗ (α_ (Y₁ ⊗ Y₂) X₃ Y₃).inv) ≫\n        (α_ X₁ X₂ (((Y₁ ⊗ Y₂) ⊗ X₃) ⊗ Y₃)).hom ≫\n          (𝟙 X₁ ⊗ (α_ X₂ ((Y₁ ⊗ Y₂) ⊗ X₃) Y₃).inv) ≫\n            (α_ X₁ (X₂ ⊗ (Y₁ ⊗ Y₂) ⊗ X₃) Y₃).inv ≫\n              ((𝟙 X₁ ⊗ 𝟙 X₂ ⊗ (α_ Y₁ Y₂ X₃).hom) ⊗ 𝟙 Y₃) ≫ ((𝟙 X₁ ⊗ (α_ X₂ Y₁ (Y₂ ⊗ X₃)).inv) ⊗ 𝟙 Y₃)\n⊢ tensor_μ C (X₁ ⊗ X₂, X₃) (Y₁ ⊗ Y₂, Y₃) ≫\n      ((α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫\n        ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫\n          (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) X₃ Y₃).inv ≫\n            ((α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) X₃).hom ⊗ 𝟙 Y₃) ≫\n              ((((((((𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Y₂ X₃).hom) ⊗ 𝟙 Y₃) ≫ ((𝟙 X₁ ⊗ (β_ X₂ Y₁).hom ⊗ 𝟙 Y₂ ⊗ 𝟙 X₃) ⊗ 𝟙 Y₃)) ≫\n                          (α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂ ⊗ X₃) Y₃).hom) ≫\n                        (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (Y₂ ⊗ X₃) Y₃).hom)) ≫\n                      (𝟙 X₁ ⊗ (α_ Y₁ X₂ ((Y₂ ⊗ X₃) ⊗ Y₃)).hom)) ≫\n                    (α_ X₁ Y₁ (X₂ ⊗ (Y₂ ⊗ X₃) ⊗ Y₃)).inv) ≫\n                  (𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ Y₂ X₃ Y₃).hom)) ≫\n                (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ Y₂ (X₃ ⊗ Y₃)).inv) =\n    ((α_ X₁ X₂ X₃).hom ⊗ (α_ Y₁ Y₂ Y₃).hom) ≫\n      tensor_μ C (X₁, X₂ ⊗ X₃) (Y₁, Y₂ ⊗ Y₃) ≫ (𝟙 (X₁ ⊗ Y₁) ⊗ tensor_μ C (X₂, X₃) (Y₂, Y₃))\n[PROOFSTEP]\nslice_lhs 2 6 => rw [this]\n[GOAL]\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\nthis :\n  ((α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫\n      ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫\n        (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) X₃ Y₃).inv ≫\n          ((α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) X₃).hom ⊗ 𝟙 Y₃) ≫ ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Y₂ X₃).hom) ⊗ 𝟙 Y₃) =\n    (α_ (X₁ ⊗ X₂) (Y₁ ⊗ Y₂) (X₃ ⊗ Y₃)).hom ≫\n      (𝟙 (X₁ ⊗ X₂) ⊗ (α_ (Y₁ ⊗ Y₂) X₃ Y₃).inv) ≫\n        (α_ X₁ X₂ (((Y₁ ⊗ Y₂) ⊗ X₃) ⊗ Y₃)).hom ≫\n          (𝟙 X₁ ⊗ (α_ X₂ ((Y₁ ⊗ Y₂) ⊗ X₃) Y₃).inv) ≫\n            (α_ X₁ (X₂ ⊗ (Y₁ ⊗ Y₂) ⊗ X₃) Y₃).inv ≫\n              ((𝟙 X₁ ⊗ 𝟙 X₂ ⊗ (α_ Y₁ Y₂ X₃).hom) ⊗ 𝟙 Y₃) ≫ ((𝟙 X₁ ⊗ (α_ X₂ Y₁ (Y₂ ⊗ X₃)).inv) ⊗ 𝟙 Y₃)\n| ((α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫\n    ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫\n      (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) X₃ Y₃).inv ≫\n        ((α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) X₃).hom ⊗ 𝟙 Y₃) ≫ ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Y₂ X₃).hom) ⊗ 𝟙 Y₃)\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\nthis :\n  ((α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫\n      ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫\n        (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) X₃ Y₃).inv ≫\n          ((α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) X₃).hom ⊗ 𝟙 Y₃) ≫ ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Y₂ X₃).hom) ⊗ 𝟙 Y₃) =\n    (α_ (X₁ ⊗ X₂) (Y₁ ⊗ Y₂) (X₃ ⊗ Y₃)).hom ≫\n      (𝟙 (X₁ ⊗ X₂) ⊗ (α_ (Y₁ ⊗ Y₂) X₃ Y₃).inv) ≫\n        (α_ X₁ X₂ (((Y₁ ⊗ Y₂) ⊗ X₃) ⊗ Y₃)).hom ≫\n          (𝟙 X₁ ⊗ (α_ X₂ ((Y₁ ⊗ Y₂) ⊗ X₃) Y₃).inv) ≫\n            (α_ X₁ (X₂ ⊗ (Y₁ ⊗ Y₂) ⊗ X₃) Y₃).inv ≫\n              ((𝟙 X₁ ⊗ 𝟙 X₂ ⊗ (α_ Y₁ Y₂ X₃).hom) ⊗ 𝟙 Y₃) ≫ ((𝟙 X₁ ⊗ (α_ X₂ Y₁ (Y₂ ⊗ X₃)).inv) ⊗ 𝟙 Y₃)\n| (𝟙 X₁ ⊗ (β_ X₂ Y₁).hom ⊗ 𝟙 Y₂ ⊗ 𝟙 X₃) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\nthis :\n  ((α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫\n      ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫\n        (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) X₃ Y₃).inv ≫\n          ((α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) X₃).hom ⊗ 𝟙 Y₃) ≫ ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Y₂ X₃).hom) ⊗ 𝟙 Y₃) =\n    (α_ (X₁ ⊗ X₂) (Y₁ ⊗ Y₂) (X₃ ⊗ Y₃)).hom ≫\n      (𝟙 (X₁ ⊗ X₂) ⊗ (α_ (Y₁ ⊗ Y₂) X₃ Y₃).inv) ≫\n        (α_ X₁ X₂ (((Y₁ ⊗ Y₂) ⊗ X₃) ⊗ Y₃)).hom ≫\n          (𝟙 X₁ ⊗ (α_ X₂ ((Y₁ ⊗ Y₂) ⊗ X₃) Y₃).inv) ≫\n            (α_ X₁ (X₂ ⊗ (Y₁ ⊗ Y₂) ⊗ X₃) Y₃).inv ≫\n              ((𝟙 X₁ ⊗ 𝟙 X₂ ⊗ (α_ Y₁ Y₂ X₃).hom) ⊗ 𝟙 Y₃) ≫ ((𝟙 X₁ ⊗ (α_ X₂ Y₁ (Y₂ ⊗ X₃)).inv) ⊗ 𝟙 Y₃)\n| (α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂ ⊗ X₃) Y₃).hom\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\nthis :\n  ((α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫\n      ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫\n        (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) X₃ Y₃).inv ≫\n          ((α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) X₃).hom ⊗ 𝟙 Y₃) ≫ ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Y₂ X₃).hom) ⊗ 𝟙 Y₃) =\n    (α_ (X₁ ⊗ X₂) (Y₁ ⊗ Y₂) (X₃ ⊗ Y₃)).hom ≫\n      (𝟙 (X₁ ⊗ X₂) ⊗ (α_ (Y₁ ⊗ Y₂) X₃ Y₃).inv) ≫\n        (α_ X₁ X₂ (((Y₁ ⊗ Y₂) ⊗ X₃) ⊗ Y₃)).hom ≫\n          (𝟙 X₁ ⊗ (α_ X₂ ((Y₁ ⊗ Y₂) ⊗ X₃) Y₃).inv) ≫\n            (α_ X₁ (X₂ ⊗ (Y₁ ⊗ Y₂) ⊗ X₃) Y₃).inv ≫\n              ((𝟙 X₁ ⊗ 𝟙 X₂ ⊗ (α_ Y₁ Y₂ X₃).hom) ⊗ 𝟙 Y₃) ≫ ((𝟙 X₁ ⊗ (α_ X₂ Y₁ (Y₂ ⊗ X₃)).inv) ⊗ 𝟙 Y₃)\n| 𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (Y₂ ⊗ X₃) Y₃).hom\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\nthis :\n  ((α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫\n      ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫\n        (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) X₃ Y₃).inv ≫\n          ((α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) X₃).hom ⊗ 𝟙 Y₃) ≫ ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Y₂ X₃).hom) ⊗ 𝟙 Y₃) =\n    (α_ (X₁ ⊗ X₂) (Y₁ ⊗ Y₂) (X₃ ⊗ Y₃)).hom ≫\n      (𝟙 (X₁ ⊗ X₂) ⊗ (α_ (Y₁ ⊗ Y₂) X₃ Y₃).inv) ≫\n        (α_ X₁ X₂ (((Y₁ ⊗ Y₂) ⊗ X₃) ⊗ Y₃)).hom ≫\n          (𝟙 X₁ ⊗ (α_ X₂ ((Y₁ ⊗ Y₂) ⊗ X₃) Y₃).inv) ≫\n            (α_ X₁ (X₂ ⊗ (Y₁ ⊗ Y₂) ⊗ X₃) Y₃).inv ≫\n              ((𝟙 X₁ ⊗ 𝟙 X₂ ⊗ (α_ Y₁ Y₂ X₃).hom) ⊗ 𝟙 Y₃) ≫ ((𝟙 X₁ ⊗ (α_ X₂ Y₁ (Y₂ ⊗ X₃)).inv) ⊗ 𝟙 Y₃)\n| 𝟙 X₁ ⊗ (α_ Y₁ X₂ ((Y₂ ⊗ X₃) ⊗ Y₃)).hom\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\nthis :\n  ((α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫\n      ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫\n        (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) X₃ Y₃).inv ≫\n          ((α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) X₃).hom ⊗ 𝟙 Y₃) ≫ ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Y₂ X₃).hom) ⊗ 𝟙 Y₃) =\n    (α_ (X₁ ⊗ X₂) (Y₁ ⊗ Y₂) (X₃ ⊗ Y₃)).hom ≫\n      (𝟙 (X₁ ⊗ X₂) ⊗ (α_ (Y₁ ⊗ Y₂) X₃ Y₃).inv) ≫\n        (α_ X₁ X₂ (((Y₁ ⊗ Y₂) ⊗ X₃) ⊗ Y₃)).hom ≫\n          (𝟙 X₁ ⊗ (α_ X₂ ((Y₁ ⊗ Y₂) ⊗ X₃) Y₃).inv) ≫\n            (α_ X₁ (X₂ ⊗ (Y₁ ⊗ Y₂) ⊗ X₃) Y₃).inv ≫\n              ((𝟙 X₁ ⊗ 𝟙 X₂ ⊗ (α_ Y₁ Y₂ X₃).hom) ⊗ 𝟙 Y₃) ≫ ((𝟙 X₁ ⊗ (α_ X₂ Y₁ (Y₂ ⊗ X₃)).inv) ⊗ 𝟙 Y₃)\n| (α_ X₁ Y₁ (X₂ ⊗ (Y₂ ⊗ X₃) ⊗ Y₃)).inv\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\nthis :\n  ((α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫\n      ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫\n        (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) X₃ Y₃).inv ≫\n          ((α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) X₃).hom ⊗ 𝟙 Y₃) ≫ ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Y₂ X₃).hom) ⊗ 𝟙 Y₃) =\n    (α_ (X₁ ⊗ X₂) (Y₁ ⊗ Y₂) (X₃ ⊗ Y₃)).hom ≫\n      (𝟙 (X₁ ⊗ X₂) ⊗ (α_ (Y₁ ⊗ Y₂) X₃ Y₃).inv) ≫\n        (α_ X₁ X₂ (((Y₁ ⊗ Y₂) ⊗ X₃) ⊗ Y₃)).hom ≫\n          (𝟙 X₁ ⊗ (α_ X₂ ((Y₁ ⊗ Y₂) ⊗ X₃) Y₃).inv) ≫\n            (α_ X₁ (X₂ ⊗ (Y₁ ⊗ Y₂) ⊗ X₃) Y₃).inv ≫\n              ((𝟙 X₁ ⊗ 𝟙 X₂ ⊗ (α_ Y₁ Y₂ X₃).hom) ⊗ 𝟙 Y₃) ≫ ((𝟙 X₁ ⊗ (α_ X₂ Y₁ (Y₂ ⊗ X₃)).inv) ⊗ 𝟙 Y₃)\n| 𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ Y₂ X₃ Y₃).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\nthis :\n  ((α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫\n      ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫\n        (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) X₃ Y₃).inv ≫\n          ((α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) X₃).hom ⊗ 𝟙 Y₃) ≫ ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Y₂ X₃).hom) ⊗ 𝟙 Y₃) =\n    (α_ (X₁ ⊗ X₂) (Y₁ ⊗ Y₂) (X₃ ⊗ Y₃)).hom ≫\n      (𝟙 (X₁ ⊗ X₂) ⊗ (α_ (Y₁ ⊗ Y₂) X₃ Y₃).inv) ≫\n        (α_ X₁ X₂ (((Y₁ ⊗ Y₂) ⊗ X₃) ⊗ Y₃)).hom ≫\n          (𝟙 X₁ ⊗ (α_ X₂ ((Y₁ ⊗ Y₂) ⊗ X₃) Y₃).inv) ≫\n            (α_ X₁ (X₂ ⊗ (Y₁ ⊗ Y₂) ⊗ X₃) Y₃).inv ≫\n              ((𝟙 X₁ ⊗ 𝟙 X₂ ⊗ (α_ Y₁ Y₂ X₃).hom) ⊗ 𝟙 Y₃) ≫ ((𝟙 X₁ ⊗ (α_ X₂ Y₁ (Y₂ ⊗ X₃)).inv) ⊗ 𝟙 Y₃)\n| 𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ Y₂ (X₃ ⊗ Y₃)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\nthis :\n  ((α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫\n      ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫\n        (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) X₃ Y₃).inv ≫\n          ((α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) X₃).hom ⊗ 𝟙 Y₃) ≫ ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Y₂ X₃).hom) ⊗ 𝟙 Y₃) =\n    (α_ (X₁ ⊗ X₂) (Y₁ ⊗ Y₂) (X₃ ⊗ Y₃)).hom ≫\n      (𝟙 (X₁ ⊗ X₂) ⊗ (α_ (Y₁ ⊗ Y₂) X₃ Y₃).inv) ≫\n        (α_ X₁ X₂ (((Y₁ ⊗ Y₂) ⊗ X₃) ⊗ Y₃)).hom ≫\n          (𝟙 X₁ ⊗ (α_ X₂ ((Y₁ ⊗ Y₂) ⊗ X₃) Y₃).inv) ≫\n            (α_ X₁ (X₂ ⊗ (Y₁ ⊗ Y₂) ⊗ X₃) Y₃).inv ≫\n              ((𝟙 X₁ ⊗ 𝟙 X₂ ⊗ (α_ Y₁ Y₂ X₃).hom) ⊗ 𝟙 Y₃) ≫ ((𝟙 X₁ ⊗ (α_ X₂ Y₁ (Y₂ ⊗ X₃)).inv) ⊗ 𝟙 Y₃)\n| tensor_μ C (X₁ ⊗ X₂, X₃) (Y₁ ⊗ Y₂, Y₃)\n[PROOFSTEP]\nrw [this]\n[GOAL]\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\nthis :\n  ((α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫\n      ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫\n        (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) X₃ Y₃).inv ≫\n          ((α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) X₃).hom ⊗ 𝟙 Y₃) ≫ ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Y₂ X₃).hom) ⊗ 𝟙 Y₃) =\n    (α_ (X₁ ⊗ X₂) (Y₁ ⊗ Y₂) (X₃ ⊗ Y₃)).hom ≫\n      (𝟙 (X₁ ⊗ X₂) ⊗ (α_ (Y₁ ⊗ Y₂) X₃ Y₃).inv) ≫\n        (α_ X₁ X₂ (((Y₁ ⊗ Y₂) ⊗ X₃) ⊗ Y₃)).hom ≫\n          (𝟙 X₁ ⊗ (α_ X₂ ((Y₁ ⊗ Y₂) ⊗ X₃) Y₃).inv) ≫\n            (α_ X₁ (X₂ ⊗ (Y₁ ⊗ Y₂) ⊗ X₃) Y₃).inv ≫\n              ((𝟙 X₁ ⊗ 𝟙 X₂ ⊗ (α_ Y₁ Y₂ X₃).hom) ⊗ 𝟙 Y₃) ≫ ((𝟙 X₁ ⊗ (α_ X₂ Y₁ (Y₂ ⊗ X₃)).inv) ⊗ 𝟙 Y₃)\n| ((α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫\n    ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫\n      (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) X₃ Y₃).inv ≫\n        ((α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) X₃).hom ⊗ 𝟙 Y₃) ≫ ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Y₂ X₃).hom) ⊗ 𝟙 Y₃)\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\nthis :\n  ((α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫\n      ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫\n        (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) X₃ Y₃).inv ≫\n          ((α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) X₃).hom ⊗ 𝟙 Y₃) ≫ ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Y₂ X₃).hom) ⊗ 𝟙 Y₃) =\n    (α_ (X₁ ⊗ X₂) (Y₁ ⊗ Y₂) (X₃ ⊗ Y₃)).hom ≫\n      (𝟙 (X₁ ⊗ X₂) ⊗ (α_ (Y₁ ⊗ Y₂) X₃ Y₃).inv) ≫\n        (α_ X₁ X₂ (((Y₁ ⊗ Y₂) ⊗ X₃) ⊗ Y₃)).hom ≫\n          (𝟙 X₁ ⊗ (α_ X₂ ((Y₁ ⊗ Y₂) ⊗ X₃) Y₃).inv) ≫\n            (α_ X₁ (X₂ ⊗ (Y₁ ⊗ Y₂) ⊗ X₃) Y₃).inv ≫\n              ((𝟙 X₁ ⊗ 𝟙 X₂ ⊗ (α_ Y₁ Y₂ X₃).hom) ⊗ 𝟙 Y₃) ≫ ((𝟙 X₁ ⊗ (α_ X₂ Y₁ (Y₂ ⊗ X₃)).inv) ⊗ 𝟙 Y₃)\n| (𝟙 X₁ ⊗ (β_ X₂ Y₁).hom ⊗ 𝟙 Y₂ ⊗ 𝟙 X₃) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\nthis :\n  ((α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫\n      ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫\n        (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) X₃ Y₃).inv ≫\n          ((α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) X₃).hom ⊗ 𝟙 Y₃) ≫ ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Y₂ X₃).hom) ⊗ 𝟙 Y₃) =\n    (α_ (X₁ ⊗ X₂) (Y₁ ⊗ Y₂) (X₃ ⊗ Y₃)).hom ≫\n      (𝟙 (X₁ ⊗ X₂) ⊗ (α_ (Y₁ ⊗ Y₂) X₃ Y₃).inv) ≫\n        (α_ X₁ X₂ (((Y₁ ⊗ Y₂) ⊗ X₃) ⊗ Y₃)).hom ≫\n          (𝟙 X₁ ⊗ (α_ X₂ ((Y₁ ⊗ Y₂) ⊗ X₃) Y₃).inv) ≫\n            (α_ X₁ (X₂ ⊗ (Y₁ ⊗ Y₂) ⊗ X₃) Y₃).inv ≫\n              ((𝟙 X₁ ⊗ 𝟙 X₂ ⊗ (α_ Y₁ Y₂ X₃).hom) ⊗ 𝟙 Y₃) ≫ ((𝟙 X₁ ⊗ (α_ X₂ Y₁ (Y₂ ⊗ X₃)).inv) ⊗ 𝟙 Y₃)\n| (α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂ ⊗ X₃) Y₃).hom\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\nthis :\n  ((α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫\n      ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫\n        (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) X₃ Y₃).inv ≫\n          ((α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) X₃).hom ⊗ 𝟙 Y₃) ≫ ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Y₂ X₃).hom) ⊗ 𝟙 Y₃) =\n    (α_ (X₁ ⊗ X₂) (Y₁ ⊗ Y₂) (X₃ ⊗ Y₃)).hom ≫\n      (𝟙 (X₁ ⊗ X₂) ⊗ (α_ (Y₁ ⊗ Y₂) X₃ Y₃).inv) ≫\n        (α_ X₁ X₂ (((Y₁ ⊗ Y₂) ⊗ X₃) ⊗ Y₃)).hom ≫\n          (𝟙 X₁ ⊗ (α_ X₂ ((Y₁ ⊗ Y₂) ⊗ X₃) Y₃).inv) ≫\n            (α_ X₁ (X₂ ⊗ (Y₁ ⊗ Y₂) ⊗ X₃) Y₃).inv ≫\n              ((𝟙 X₁ ⊗ 𝟙 X₂ ⊗ (α_ Y₁ Y₂ X₃).hom) ⊗ 𝟙 Y₃) ≫ ((𝟙 X₁ ⊗ (α_ X₂ Y₁ (Y₂ ⊗ X₃)).inv) ⊗ 𝟙 Y₃)\n| 𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (Y₂ ⊗ X₃) Y₃).hom\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\nthis :\n  ((α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫\n      ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫\n        (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) X₃ Y₃).inv ≫\n          ((α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) X₃).hom ⊗ 𝟙 Y₃) ≫ ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Y₂ X₃).hom) ⊗ 𝟙 Y₃) =\n    (α_ (X₁ ⊗ X₂) (Y₁ ⊗ Y₂) (X₃ ⊗ Y₃)).hom ≫\n      (𝟙 (X₁ ⊗ X₂) ⊗ (α_ (Y₁ ⊗ Y₂) X₃ Y₃).inv) ≫\n        (α_ X₁ X₂ (((Y₁ ⊗ Y₂) ⊗ X₃) ⊗ Y₃)).hom ≫\n          (𝟙 X₁ ⊗ (α_ X₂ ((Y₁ ⊗ Y₂) ⊗ X₃) Y₃).inv) ≫\n            (α_ X₁ (X₂ ⊗ (Y₁ ⊗ Y₂) ⊗ X₃) Y₃).inv ≫\n              ((𝟙 X₁ ⊗ 𝟙 X₂ ⊗ (α_ Y₁ Y₂ X₃).hom) ⊗ 𝟙 Y₃) ≫ ((𝟙 X₁ ⊗ (α_ X₂ Y₁ (Y₂ ⊗ X₃)).inv) ⊗ 𝟙 Y₃)\n| 𝟙 X₁ ⊗ (α_ Y₁ X₂ ((Y₂ ⊗ X₃) ⊗ Y₃)).hom\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\nthis :\n  ((α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫\n      ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫\n        (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) X₃ Y₃).inv ≫\n          ((α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) X₃).hom ⊗ 𝟙 Y₃) ≫ ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Y₂ X₃).hom) ⊗ 𝟙 Y₃) =\n    (α_ (X₁ ⊗ X₂) (Y₁ ⊗ Y₂) (X₃ ⊗ Y₃)).hom ≫\n      (𝟙 (X₁ ⊗ X₂) ⊗ (α_ (Y₁ ⊗ Y₂) X₃ Y₃).inv) ≫\n        (α_ X₁ X₂ (((Y₁ ⊗ Y₂) ⊗ X₃) ⊗ Y₃)).hom ≫\n          (𝟙 X₁ ⊗ (α_ X₂ ((Y₁ ⊗ Y₂) ⊗ X₃) Y₃).inv) ≫\n            (α_ X₁ (X₂ ⊗ (Y₁ ⊗ Y₂) ⊗ X₃) Y₃).inv ≫\n              ((𝟙 X₁ ⊗ 𝟙 X₂ ⊗ (α_ Y₁ Y₂ X₃).hom) ⊗ 𝟙 Y₃) ≫ ((𝟙 X₁ ⊗ (α_ X₂ Y₁ (Y₂ ⊗ X₃)).inv) ⊗ 𝟙 Y₃)\n| (α_ X₁ Y₁ (X₂ ⊗ (Y₂ ⊗ X₃) ⊗ Y₃)).inv\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\nthis :\n  ((α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫\n      ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫\n        (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) X₃ Y₃).inv ≫\n          ((α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) X₃).hom ⊗ 𝟙 Y₃) ≫ ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Y₂ X₃).hom) ⊗ 𝟙 Y₃) =\n    (α_ (X₁ ⊗ X₂) (Y₁ ⊗ Y₂) (X₃ ⊗ Y₃)).hom ≫\n      (𝟙 (X₁ ⊗ X₂) ⊗ (α_ (Y₁ ⊗ Y₂) X₃ Y₃).inv) ≫\n        (α_ X₁ X₂ (((Y₁ ⊗ Y₂) ⊗ X₃) ⊗ Y₃)).hom ≫\n          (𝟙 X₁ ⊗ (α_ X₂ ((Y₁ ⊗ Y₂) ⊗ X₃) Y₃).inv) ≫\n            (α_ X₁ (X₂ ⊗ (Y₁ ⊗ Y₂) ⊗ X₃) Y₃).inv ≫\n              ((𝟙 X₁ ⊗ 𝟙 X₂ ⊗ (α_ Y₁ Y₂ X₃).hom) ⊗ 𝟙 Y₃) ≫ ((𝟙 X₁ ⊗ (α_ X₂ Y₁ (Y₂ ⊗ X₃)).inv) ⊗ 𝟙 Y₃)\n| 𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ Y₂ X₃ Y₃).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\nthis :\n  ((α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫\n      ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫\n        (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) X₃ Y₃).inv ≫\n          ((α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) X₃).hom ⊗ 𝟙 Y₃) ≫ ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Y₂ X₃).hom) ⊗ 𝟙 Y₃) =\n    (α_ (X₁ ⊗ X₂) (Y₁ ⊗ Y₂) (X₃ ⊗ Y₃)).hom ≫\n      (𝟙 (X₁ ⊗ X₂) ⊗ (α_ (Y₁ ⊗ Y₂) X₃ Y₃).inv) ≫\n        (α_ X₁ X₂ (((Y₁ ⊗ Y₂) ⊗ X₃) ⊗ Y₃)).hom ≫\n          (𝟙 X₁ ⊗ (α_ X₂ ((Y₁ ⊗ Y₂) ⊗ X₃) Y₃).inv) ≫\n            (α_ X₁ (X₂ ⊗ (Y₁ ⊗ Y₂) ⊗ X₃) Y₃).inv ≫\n              ((𝟙 X₁ ⊗ 𝟙 X₂ ⊗ (α_ Y₁ Y₂ X₃).hom) ⊗ 𝟙 Y₃) ≫ ((𝟙 X₁ ⊗ (α_ X₂ Y₁ (Y₂ ⊗ X₃)).inv) ⊗ 𝟙 Y₃)\n| 𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ Y₂ (X₃ ⊗ Y₃)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\nthis :\n  ((α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫\n      ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫\n        (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) X₃ Y₃).inv ≫\n          ((α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) X₃).hom ⊗ 𝟙 Y₃) ≫ ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Y₂ X₃).hom) ⊗ 𝟙 Y₃) =\n    (α_ (X₁ ⊗ X₂) (Y₁ ⊗ Y₂) (X₃ ⊗ Y₃)).hom ≫\n      (𝟙 (X₁ ⊗ X₂) ⊗ (α_ (Y₁ ⊗ Y₂) X₃ Y₃).inv) ≫\n        (α_ X₁ X₂ (((Y₁ ⊗ Y₂) ⊗ X₃) ⊗ Y₃)).hom ≫\n          (𝟙 X₁ ⊗ (α_ X₂ ((Y₁ ⊗ Y₂) ⊗ X₃) Y₃).inv) ≫\n            (α_ X₁ (X₂ ⊗ (Y₁ ⊗ Y₂) ⊗ X₃) Y₃).inv ≫\n              ((𝟙 X₁ ⊗ 𝟙 X₂ ⊗ (α_ Y₁ Y₂ X₃).hom) ⊗ 𝟙 Y₃) ≫ ((𝟙 X₁ ⊗ (α_ X₂ Y₁ (Y₂ ⊗ X₃)).inv) ⊗ 𝟙 Y₃)\n| tensor_μ C (X₁ ⊗ X₂, X₃) (Y₁ ⊗ Y₂, Y₃)\n[PROOFSTEP]\nrw [this]\n[GOAL]\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\nthis :\n  ((α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫\n      ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫\n        (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) X₃ Y₃).inv ≫\n          ((α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) X₃).hom ⊗ 𝟙 Y₃) ≫ ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Y₂ X₃).hom) ⊗ 𝟙 Y₃) =\n    (α_ (X₁ ⊗ X₂) (Y₁ ⊗ Y₂) (X₃ ⊗ Y₃)).hom ≫\n      (𝟙 (X₁ ⊗ X₂) ⊗ (α_ (Y₁ ⊗ Y₂) X₃ Y₃).inv) ≫\n        (α_ X₁ X₂ (((Y₁ ⊗ Y₂) ⊗ X₃) ⊗ Y₃)).hom ≫\n          (𝟙 X₁ ⊗ (α_ X₂ ((Y₁ ⊗ Y₂) ⊗ X₃) Y₃).inv) ≫\n            (α_ X₁ (X₂ ⊗ (Y₁ ⊗ Y₂) ⊗ X₃) Y₃).inv ≫\n              ((𝟙 X₁ ⊗ 𝟙 X₂ ⊗ (α_ Y₁ Y₂ X₃).hom) ⊗ 𝟙 Y₃) ≫ ((𝟙 X₁ ⊗ (α_ X₂ Y₁ (Y₂ ⊗ X₃)).inv) ⊗ 𝟙 Y₃)\n| ((α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫\n    ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫\n      (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) X₃ Y₃).inv ≫\n        ((α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) X₃).hom ⊗ 𝟙 Y₃) ≫ ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Y₂ X₃).hom) ⊗ 𝟙 Y₃)\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\nthis :\n  ((α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫\n      ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫\n        (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) X₃ Y₃).inv ≫\n          ((α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) X₃).hom ⊗ 𝟙 Y₃) ≫ ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Y₂ X₃).hom) ⊗ 𝟙 Y₃) =\n    (α_ (X₁ ⊗ X₂) (Y₁ ⊗ Y₂) (X₃ ⊗ Y₃)).hom ≫\n      (𝟙 (X₁ ⊗ X₂) ⊗ (α_ (Y₁ ⊗ Y₂) X₃ Y₃).inv) ≫\n        (α_ X₁ X₂ (((Y₁ ⊗ Y₂) ⊗ X₃) ⊗ Y₃)).hom ≫\n          (𝟙 X₁ ⊗ (α_ X₂ ((Y₁ ⊗ Y₂) ⊗ X₃) Y₃).inv) ≫\n            (α_ X₁ (X₂ ⊗ (Y₁ ⊗ Y₂) ⊗ X₃) Y₃).inv ≫\n              ((𝟙 X₁ ⊗ 𝟙 X₂ ⊗ (α_ Y₁ Y₂ X₃).hom) ⊗ 𝟙 Y₃) ≫ ((𝟙 X₁ ⊗ (α_ X₂ Y₁ (Y₂ ⊗ X₃)).inv) ⊗ 𝟙 Y₃)\n| (𝟙 X₁ ⊗ (β_ X₂ Y₁).hom ⊗ 𝟙 Y₂ ⊗ 𝟙 X₃) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\nthis :\n  ((α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫\n      ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫\n        (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) X₃ Y₃).inv ≫\n          ((α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) X₃).hom ⊗ 𝟙 Y₃) ≫ ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Y₂ X₃).hom) ⊗ 𝟙 Y₃) =\n    (α_ (X₁ ⊗ X₂) (Y₁ ⊗ Y₂) (X₃ ⊗ Y₃)).hom ≫\n      (𝟙 (X₁ ⊗ X₂) ⊗ (α_ (Y₁ ⊗ Y₂) X₃ Y₃).inv) ≫\n        (α_ X₁ X₂ (((Y₁ ⊗ Y₂) ⊗ X₃) ⊗ Y₃)).hom ≫\n          (𝟙 X₁ ⊗ (α_ X₂ ((Y₁ ⊗ Y₂) ⊗ X₃) Y₃).inv) ≫\n            (α_ X₁ (X₂ ⊗ (Y₁ ⊗ Y₂) ⊗ X₃) Y₃).inv ≫\n              ((𝟙 X₁ ⊗ 𝟙 X₂ ⊗ (α_ Y₁ Y₂ X₃).hom) ⊗ 𝟙 Y₃) ≫ ((𝟙 X₁ ⊗ (α_ X₂ Y₁ (Y₂ ⊗ X₃)).inv) ⊗ 𝟙 Y₃)\n| (α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂ ⊗ X₃) Y₃).hom\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\nthis :\n  ((α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫\n      ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫\n        (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) X₃ Y₃).inv ≫\n          ((α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) X₃).hom ⊗ 𝟙 Y₃) ≫ ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Y₂ X₃).hom) ⊗ 𝟙 Y₃) =\n    (α_ (X₁ ⊗ X₂) (Y₁ ⊗ Y₂) (X₃ ⊗ Y₃)).hom ≫\n      (𝟙 (X₁ ⊗ X₂) ⊗ (α_ (Y₁ ⊗ Y₂) X₃ Y₃).inv) ≫\n        (α_ X₁ X₂ (((Y₁ ⊗ Y₂) ⊗ X₃) ⊗ Y₃)).hom ≫\n          (𝟙 X₁ ⊗ (α_ X₂ ((Y₁ ⊗ Y₂) ⊗ X₃) Y₃).inv) ≫\n            (α_ X₁ (X₂ ⊗ (Y₁ ⊗ Y₂) ⊗ X₃) Y₃).inv ≫\n              ((𝟙 X₁ ⊗ 𝟙 X₂ ⊗ (α_ Y₁ Y₂ X₃).hom) ⊗ 𝟙 Y₃) ≫ ((𝟙 X₁ ⊗ (α_ X₂ Y₁ (Y₂ ⊗ X₃)).inv) ⊗ 𝟙 Y₃)\n| 𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (Y₂ ⊗ X₃) Y₃).hom\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\nthis :\n  ((α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫\n      ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫\n        (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) X₃ Y₃).inv ≫\n          ((α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) X₃).hom ⊗ 𝟙 Y₃) ≫ ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Y₂ X₃).hom) ⊗ 𝟙 Y₃) =\n    (α_ (X₁ ⊗ X₂) (Y₁ ⊗ Y₂) (X₃ ⊗ Y₃)).hom ≫\n      (𝟙 (X₁ ⊗ X₂) ⊗ (α_ (Y₁ ⊗ Y₂) X₃ Y₃).inv) ≫\n        (α_ X₁ X₂ (((Y₁ ⊗ Y₂) ⊗ X₃) ⊗ Y₃)).hom ≫\n          (𝟙 X₁ ⊗ (α_ X₂ ((Y₁ ⊗ Y₂) ⊗ X₃) Y₃).inv) ≫\n            (α_ X₁ (X₂ ⊗ (Y₁ ⊗ Y₂) ⊗ X₃) Y₃).inv ≫\n              ((𝟙 X₁ ⊗ 𝟙 X₂ ⊗ (α_ Y₁ Y₂ X₃).hom) ⊗ 𝟙 Y₃) ≫ ((𝟙 X₁ ⊗ (α_ X₂ Y₁ (Y₂ ⊗ X₃)).inv) ⊗ 𝟙 Y₃)\n| 𝟙 X₁ ⊗ (α_ Y₁ X₂ ((Y₂ ⊗ X₃) ⊗ Y₃)).hom\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\nthis :\n  ((α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫\n      ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫\n        (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) X₃ Y₃).inv ≫\n          ((α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) X₃).hom ⊗ 𝟙 Y₃) ≫ ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Y₂ X₃).hom) ⊗ 𝟙 Y₃) =\n    (α_ (X₁ ⊗ X₂) (Y₁ ⊗ Y₂) (X₃ ⊗ Y₃)).hom ≫\n      (𝟙 (X₁ ⊗ X₂) ⊗ (α_ (Y₁ ⊗ Y₂) X₃ Y₃).inv) ≫\n        (α_ X₁ X₂ (((Y₁ ⊗ Y₂) ⊗ X₃) ⊗ Y₃)).hom ≫\n          (𝟙 X₁ ⊗ (α_ X₂ ((Y₁ ⊗ Y₂) ⊗ X₃) Y₃).inv) ≫\n            (α_ X₁ (X₂ ⊗ (Y₁ ⊗ Y₂) ⊗ X₃) Y₃).inv ≫\n              ((𝟙 X₁ ⊗ 𝟙 X₂ ⊗ (α_ Y₁ Y₂ X₃).hom) ⊗ 𝟙 Y₃) ≫ ((𝟙 X₁ ⊗ (α_ X₂ Y₁ (Y₂ ⊗ X₃)).inv) ⊗ 𝟙 Y₃)\n| (α_ X₁ Y₁ (X₂ ⊗ (Y₂ ⊗ X₃) ⊗ Y₃)).inv\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\nthis :\n  ((α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫\n      ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫\n        (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) X₃ Y₃).inv ≫\n          ((α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) X₃).hom ⊗ 𝟙 Y₃) ≫ ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Y₂ X₃).hom) ⊗ 𝟙 Y₃) =\n    (α_ (X₁ ⊗ X₂) (Y₁ ⊗ Y₂) (X₃ ⊗ Y₃)).hom ≫\n      (𝟙 (X₁ ⊗ X₂) ⊗ (α_ (Y₁ ⊗ Y₂) X₃ Y₃).inv) ≫\n        (α_ X₁ X₂ (((Y₁ ⊗ Y₂) ⊗ X₃) ⊗ Y₃)).hom ≫\n          (𝟙 X₁ ⊗ (α_ X₂ ((Y₁ ⊗ Y₂) ⊗ X₃) Y₃).inv) ≫\n            (α_ X₁ (X₂ ⊗ (Y₁ ⊗ Y₂) ⊗ X₃) Y₃).inv ≫\n              ((𝟙 X₁ ⊗ 𝟙 X₂ ⊗ (α_ Y₁ Y₂ X₃).hom) ⊗ 𝟙 Y₃) ≫ ((𝟙 X₁ ⊗ (α_ X₂ Y₁ (Y₂ ⊗ X₃)).inv) ⊗ 𝟙 Y₃)\n| 𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ Y₂ X₃ Y₃).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\nthis :\n  ((α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫\n      ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫\n        (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) X₃ Y₃).inv ≫\n          ((α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) X₃).hom ⊗ 𝟙 Y₃) ≫ ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Y₂ X₃).hom) ⊗ 𝟙 Y₃) =\n    (α_ (X₁ ⊗ X₂) (Y₁ ⊗ Y₂) (X₃ ⊗ Y₃)).hom ≫\n      (𝟙 (X₁ ⊗ X₂) ⊗ (α_ (Y₁ ⊗ Y₂) X₃ Y₃).inv) ≫\n        (α_ X₁ X₂ (((Y₁ ⊗ Y₂) ⊗ X₃) ⊗ Y₃)).hom ≫\n          (𝟙 X₁ ⊗ (α_ X₂ ((Y₁ ⊗ Y₂) ⊗ X₃) Y₃).inv) ≫\n            (α_ X₁ (X₂ ⊗ (Y₁ ⊗ Y₂) ⊗ X₃) Y₃).inv ≫\n              ((𝟙 X₁ ⊗ 𝟙 X₂ ⊗ (α_ Y₁ Y₂ X₃).hom) ⊗ 𝟙 Y₃) ≫ ((𝟙 X₁ ⊗ (α_ X₂ Y₁ (Y₂ ⊗ X₃)).inv) ⊗ 𝟙 Y₃)\n| 𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ Y₂ (X₃ ⊗ Y₃)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\nthis :\n  ((α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫\n      ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫\n        (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) X₃ Y₃).inv ≫\n          ((α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) X₃).hom ⊗ 𝟙 Y₃) ≫ ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Y₂ X₃).hom) ⊗ 𝟙 Y₃) =\n    (α_ (X₁ ⊗ X₂) (Y₁ ⊗ Y₂) (X₃ ⊗ Y₃)).hom ≫\n      (𝟙 (X₁ ⊗ X₂) ⊗ (α_ (Y₁ ⊗ Y₂) X₃ Y₃).inv) ≫\n        (α_ X₁ X₂ (((Y₁ ⊗ Y₂) ⊗ X₃) ⊗ Y₃)).hom ≫\n          (𝟙 X₁ ⊗ (α_ X₂ ((Y₁ ⊗ Y₂) ⊗ X₃) Y₃).inv) ≫\n            (α_ X₁ (X₂ ⊗ (Y₁ ⊗ Y₂) ⊗ X₃) Y₃).inv ≫\n              ((𝟙 X₁ ⊗ 𝟙 X₂ ⊗ (α_ Y₁ Y₂ X₃).hom) ⊗ 𝟙 Y₃) ≫ ((𝟙 X₁ ⊗ (α_ X₂ Y₁ (Y₂ ⊗ X₃)).inv) ⊗ 𝟙 Y₃)\n| tensor_μ C (X₁ ⊗ X₂, X₃) (Y₁ ⊗ Y₂, Y₃)\n[PROOFSTEP]\nrw [this]\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\nthis :\n  ((α_ X₁ X₂ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫\n      ((𝟙 X₁ ⊗ (α_ X₂ Y₁ Y₂).inv) ⊗ 𝟙 (X₃ ⊗ Y₃)) ≫\n        (α_ (X₁ ⊗ (X₂ ⊗ Y₁) ⊗ Y₂) X₃ Y₃).inv ≫\n          ((α_ X₁ ((X₂ ⊗ Y₁) ⊗ Y₂) X₃).hom ⊗ 𝟙 Y₃) ≫ ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ Y₁) Y₂ X₃).hom) ⊗ 𝟙 Y₃) =\n    (α_ (X₁ ⊗ X₂) (Y₁ ⊗ Y₂) (X₃ ⊗ Y₃)).hom ≫\n      (𝟙 (X₁ ⊗ X₂) ⊗ (α_ (Y₁ ⊗ Y₂) X₃ Y₃).inv) ≫\n        (α_ X₁ X₂ (((Y₁ ⊗ Y₂) ⊗ X₃) ⊗ Y₃)).hom ≫\n          (𝟙 X₁ ⊗ (α_ X₂ ((Y₁ ⊗ Y₂) ⊗ X₃) Y₃).inv) ≫\n            (α_ X₁ (X₂ ⊗ (Y₁ ⊗ Y₂) ⊗ X₃) Y₃).inv ≫\n              ((𝟙 X₁ ⊗ 𝟙 X₂ ⊗ (α_ Y₁ Y₂ X₃).hom) ⊗ 𝟙 Y₃) ≫ ((𝟙 X₁ ⊗ (α_ X₂ Y₁ (Y₂ ⊗ X₃)).inv) ⊗ 𝟙 Y₃)\n⊢ tensor_μ C (X₁ ⊗ X₂, X₃) (Y₁ ⊗ Y₂, Y₃) ≫\n      ((((((((α_ (X₁ ⊗ X₂) (Y₁ ⊗ Y₂) (X₃ ⊗ Y₃)).hom ≫\n                      (𝟙 (X₁ ⊗ X₂) ⊗ (α_ (Y₁ ⊗ Y₂) X₃ Y₃).inv) ≫\n                        (α_ X₁ X₂ (((Y₁ ⊗ Y₂) ⊗ X₃) ⊗ Y₃)).hom ≫\n                          (𝟙 X₁ ⊗ (α_ X₂ ((Y₁ ⊗ Y₂) ⊗ X₃) Y₃).inv) ≫\n                            (α_ X₁ (X₂ ⊗ (Y₁ ⊗ Y₂) ⊗ X₃) Y₃).inv ≫\n                              ((𝟙 X₁ ⊗ 𝟙 X₂ ⊗ (α_ Y₁ Y₂ X₃).hom) ⊗ 𝟙 Y₃) ≫ ((𝟙 X₁ ⊗ (α_ X₂ Y₁ (Y₂ ⊗ X₃)).inv) ⊗ 𝟙 Y₃)) ≫\n                    ((𝟙 X₁ ⊗ (β_ X₂ Y₁).hom ⊗ 𝟙 Y₂ ⊗ 𝟙 X₃) ⊗ 𝟙 Y₃)) ≫\n                  (α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂ ⊗ X₃) Y₃).hom) ≫\n                (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (Y₂ ⊗ X₃) Y₃).hom)) ≫\n              (𝟙 X₁ ⊗ (α_ Y₁ X₂ ((Y₂ ⊗ X₃) ⊗ Y₃)).hom)) ≫\n            (α_ X₁ Y₁ (X₂ ⊗ (Y₂ ⊗ X₃) ⊗ Y₃)).inv) ≫\n          (𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ Y₂ X₃ Y₃).hom)) ≫\n        (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ Y₂ (X₃ ⊗ Y₃)).inv) =\n    ((α_ X₁ X₂ X₃).hom ⊗ (α_ Y₁ Y₂ Y₃).hom) ≫\n      tensor_μ C (X₁, X₂ ⊗ X₃) (Y₁, Y₂ ⊗ Y₃) ≫ (𝟙 (X₁ ⊗ Y₁) ⊗ tensor_μ C (X₂, X₃) (Y₂, Y₃))\n[PROOFSTEP]\nclear this\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n⊢ tensor_μ C (X₁ ⊗ X₂, X₃) (Y₁ ⊗ Y₂, Y₃) ≫\n      ((((((((α_ (X₁ ⊗ X₂) (Y₁ ⊗ Y₂) (X₃ ⊗ Y₃)).hom ≫\n                      (𝟙 (X₁ ⊗ X₂) ⊗ (α_ (Y₁ ⊗ Y₂) X₃ Y₃).inv) ≫\n                        (α_ X₁ X₂ (((Y₁ ⊗ Y₂) ⊗ X₃) ⊗ Y₃)).hom ≫\n                          (𝟙 X₁ ⊗ (α_ X₂ ((Y₁ ⊗ Y₂) ⊗ X₃) Y₃).inv) ≫\n                            (α_ X₁ (X₂ ⊗ (Y₁ ⊗ Y₂) ⊗ X₃) Y₃).inv ≫\n                              ((𝟙 X₁ ⊗ 𝟙 X₂ ⊗ (α_ Y₁ Y₂ X₃).hom) ⊗ 𝟙 Y₃) ≫ ((𝟙 X₁ ⊗ (α_ X₂ Y₁ (Y₂ ⊗ X₃)).inv) ⊗ 𝟙 Y₃)) ≫\n                    ((𝟙 X₁ ⊗ (β_ X₂ Y₁).hom ⊗ 𝟙 Y₂ ⊗ 𝟙 X₃) ⊗ 𝟙 Y₃)) ≫\n                  (α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂ ⊗ X₃) Y₃).hom) ≫\n                (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (Y₂ ⊗ X₃) Y₃).hom)) ≫\n              (𝟙 X₁ ⊗ (α_ Y₁ X₂ ((Y₂ ⊗ X₃) ⊗ Y₃)).hom)) ≫\n            (α_ X₁ Y₁ (X₂ ⊗ (Y₂ ⊗ X₃) ⊗ Y₃)).inv) ≫\n          (𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ Y₂ X₃ Y₃).hom)) ≫\n        (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ Y₂ (X₃ ⊗ Y₃)).inv) =\n    ((α_ X₁ X₂ X₃).hom ⊗ (α_ Y₁ Y₂ Y₃).hom) ≫\n      tensor_μ C (X₁, X₂ ⊗ X₃) (Y₁, Y₂ ⊗ Y₃) ≫ (𝟙 (X₁ ⊗ Y₁) ⊗ tensor_μ C (X₂, X₃) (Y₂, Y₃))\n[PROOFSTEP]\nslice_lhs 1 3 => rw [tensor_μ_def₁]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| tensor_μ C (X₁ ⊗ X₂, X₃) (Y₁ ⊗ Y₂, Y₃) ≫\n    (α_ (X₁ ⊗ X₂) (Y₁ ⊗ Y₂) (X₃ ⊗ Y₃)).hom ≫ (𝟙 (X₁ ⊗ X₂) ⊗ (α_ (Y₁ ⊗ Y₂) X₃ Y₃).inv)\ncase a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ X₂ (((Y₁ ⊗ Y₂) ⊗ X₃) ⊗ Y₃)).hom\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ X₂ ((Y₁ ⊗ Y₂) ⊗ X₃) Y₃).inv\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ (X₂ ⊗ (Y₁ ⊗ Y₂) ⊗ X₃) Y₃).inv\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ 𝟙 X₂ ⊗ (α_ Y₁ Y₂ X₃).hom) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ X₂ Y₁ (Y₂ ⊗ X₃)).inv) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (β_ X₂ Y₁).hom ⊗ 𝟙 Y₂ ⊗ 𝟙 X₃) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂ ⊗ X₃) Y₃).hom\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (Y₂ ⊗ X₃) Y₃).hom\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ Y₁ X₂ ((Y₂ ⊗ X₃) ⊗ Y₃)).hom\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ Y₁ (X₂ ⊗ (Y₂ ⊗ X₃) ⊗ Y₃)).inv\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ Y₂ X₃ Y₃).hom\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ Y₂ (X₃ ⊗ Y₃)).inv\n[PROOFSTEP]\nrw [tensor_μ_def₁]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| tensor_μ C (X₁ ⊗ X₂, X₃) (Y₁ ⊗ Y₂, Y₃) ≫\n    (α_ (X₁ ⊗ X₂) (Y₁ ⊗ Y₂) (X₃ ⊗ Y₃)).hom ≫ (𝟙 (X₁ ⊗ X₂) ⊗ (α_ (Y₁ ⊗ Y₂) X₃ Y₃).inv)\ncase a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ X₂ (((Y₁ ⊗ Y₂) ⊗ X₃) ⊗ Y₃)).hom\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ X₂ ((Y₁ ⊗ Y₂) ⊗ X₃) Y₃).inv\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ (X₂ ⊗ (Y₁ ⊗ Y₂) ⊗ X₃) Y₃).inv\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ 𝟙 X₂ ⊗ (α_ Y₁ Y₂ X₃).hom) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ X₂ Y₁ (Y₂ ⊗ X₃)).inv) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (β_ X₂ Y₁).hom ⊗ 𝟙 Y₂ ⊗ 𝟙 X₃) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂ ⊗ X₃) Y₃).hom\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (Y₂ ⊗ X₃) Y₃).hom\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ Y₁ X₂ ((Y₂ ⊗ X₃) ⊗ Y₃)).hom\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ Y₁ (X₂ ⊗ (Y₂ ⊗ X₃) ⊗ Y₃)).inv\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ Y₂ X₃ Y₃).hom\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ Y₂ (X₃ ⊗ Y₃)).inv\n[PROOFSTEP]\nrw [tensor_μ_def₁]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| tensor_μ C (X₁ ⊗ X₂, X₃) (Y₁ ⊗ Y₂, Y₃) ≫\n    (α_ (X₁ ⊗ X₂) (Y₁ ⊗ Y₂) (X₃ ⊗ Y₃)).hom ≫ (𝟙 (X₁ ⊗ X₂) ⊗ (α_ (Y₁ ⊗ Y₂) X₃ Y₃).inv)\ncase a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ X₂ (((Y₁ ⊗ Y₂) ⊗ X₃) ⊗ Y₃)).hom\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ X₂ ((Y₁ ⊗ Y₂) ⊗ X₃) Y₃).inv\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ (X₂ ⊗ (Y₁ ⊗ Y₂) ⊗ X₃) Y₃).inv\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ 𝟙 X₂ ⊗ (α_ Y₁ Y₂ X₃).hom) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ X₂ Y₁ (Y₂ ⊗ X₃)).inv) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (β_ X₂ Y₁).hom ⊗ 𝟙 Y₂ ⊗ 𝟙 X₃) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂ ⊗ X₃) Y₃).hom\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (Y₂ ⊗ X₃) Y₃).hom\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ Y₁ X₂ ((Y₂ ⊗ X₃) ⊗ Y₃)).hom\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ Y₁ (X₂ ⊗ (Y₂ ⊗ X₃) ⊗ Y₃)).inv\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ Y₂ X₃ Y₃).hom\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ Y₂ (X₃ ⊗ Y₃)).inv\n[PROOFSTEP]\nrw [tensor_μ_def₁]\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n⊢ (((((((((((((α_ (X₁ ⊗ X₂) X₃ ((Y₁ ⊗ Y₂) ⊗ Y₃)).hom ≫\n                              (𝟙 (X₁ ⊗ X₂) ⊗ (α_ X₃ (Y₁ ⊗ Y₂) Y₃).inv) ≫ (𝟙 (X₁ ⊗ X₂) ⊗ (β_ X₃ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 Y₃)) ≫\n                            (α_ X₁ X₂ (((Y₁ ⊗ Y₂) ⊗ X₃) ⊗ Y₃)).hom) ≫\n                          (𝟙 X₁ ⊗ (α_ X₂ ((Y₁ ⊗ Y₂) ⊗ X₃) Y₃).inv)) ≫\n                        (α_ X₁ (X₂ ⊗ (Y₁ ⊗ Y₂) ⊗ X₃) Y₃).inv) ≫\n                      ((𝟙 X₁ ⊗ 𝟙 X₂ ⊗ (α_ Y₁ Y₂ X₃).hom) ⊗ 𝟙 Y₃)) ≫\n                    ((𝟙 X₁ ⊗ (α_ X₂ Y₁ (Y₂ ⊗ X₃)).inv) ⊗ 𝟙 Y₃)) ≫\n                  ((𝟙 X₁ ⊗ (β_ X₂ Y₁).hom ⊗ 𝟙 Y₂ ⊗ 𝟙 X₃) ⊗ 𝟙 Y₃)) ≫\n                (α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂ ⊗ X₃) Y₃).hom) ≫\n              (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (Y₂ ⊗ X₃) Y₃).hom)) ≫\n            (𝟙 X₁ ⊗ (α_ Y₁ X₂ ((Y₂ ⊗ X₃) ⊗ Y₃)).hom)) ≫\n          (α_ X₁ Y₁ (X₂ ⊗ (Y₂ ⊗ X₃) ⊗ Y₃)).inv) ≫\n        (𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ Y₂ X₃ Y₃).hom)) ≫\n      (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ Y₂ (X₃ ⊗ Y₃)).inv) =\n    ((α_ X₁ X₂ X₃).hom ⊗ (α_ Y₁ Y₂ Y₃).hom) ≫\n      tensor_μ C (X₁, X₂ ⊗ X₃) (Y₁, Y₂ ⊗ Y₃) ≫ (𝟙 (X₁ ⊗ Y₁) ⊗ tensor_μ C (X₂, X₃) (Y₂, Y₃))\n[PROOFSTEP]\nslice_lhs 3 4 => rw [← tensor_id, associator_naturality]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 (X₁ ⊗ X₂) ⊗ (β_ X₃ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 Y₃) ≫ (α_ X₁ X₂ (((Y₁ ⊗ Y₂) ⊗ X₃) ⊗ Y₃)).hom\ncase a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ X₂ ((Y₁ ⊗ Y₂) ⊗ X₃) Y₃).inv\ncase a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ (X₂ ⊗ (Y₁ ⊗ Y₂) ⊗ X₃) Y₃).inv\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ 𝟙 X₂ ⊗ (α_ Y₁ Y₂ X₃).hom) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ X₂ Y₁ (Y₂ ⊗ X₃)).inv) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (β_ X₂ Y₁).hom ⊗ 𝟙 Y₂ ⊗ 𝟙 X₃) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂ ⊗ X₃) Y₃).hom\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (Y₂ ⊗ X₃) Y₃).hom\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ Y₁ X₂ ((Y₂ ⊗ X₃) ⊗ Y₃)).hom\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ Y₁ (X₂ ⊗ (Y₂ ⊗ X₃) ⊗ Y₃)).inv\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ Y₂ X₃ Y₃).hom\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ Y₂ (X₃ ⊗ Y₃)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ (X₁ ⊗ X₂) X₃ ((Y₁ ⊗ Y₂) ⊗ Y₃)).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ X₂) ⊗ (α_ X₃ (Y₁ ⊗ Y₂) Y₃).inv\n[PROOFSTEP]\nrw [← tensor_id, associator_naturality]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 (X₁ ⊗ X₂) ⊗ (β_ X₃ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 Y₃) ≫ (α_ X₁ X₂ (((Y₁ ⊗ Y₂) ⊗ X₃) ⊗ Y₃)).hom\ncase a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ X₂ ((Y₁ ⊗ Y₂) ⊗ X₃) Y₃).inv\ncase a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ (X₂ ⊗ (Y₁ ⊗ Y₂) ⊗ X₃) Y₃).inv\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ 𝟙 X₂ ⊗ (α_ Y₁ Y₂ X₃).hom) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ X₂ Y₁ (Y₂ ⊗ X₃)).inv) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (β_ X₂ Y₁).hom ⊗ 𝟙 Y₂ ⊗ 𝟙 X₃) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂ ⊗ X₃) Y₃).hom\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (Y₂ ⊗ X₃) Y₃).hom\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ Y₁ X₂ ((Y₂ ⊗ X₃) ⊗ Y₃)).hom\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ Y₁ (X₂ ⊗ (Y₂ ⊗ X₃) ⊗ Y₃)).inv\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ Y₂ X₃ Y₃).hom\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ Y₂ (X₃ ⊗ Y₃)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ (X₁ ⊗ X₂) X₃ ((Y₁ ⊗ Y₂) ⊗ Y₃)).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ X₂) ⊗ (α_ X₃ (Y₁ ⊗ Y₂) Y₃).inv\n[PROOFSTEP]\nrw [← tensor_id, associator_naturality]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 (X₁ ⊗ X₂) ⊗ (β_ X₃ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 Y₃) ≫ (α_ X₁ X₂ (((Y₁ ⊗ Y₂) ⊗ X₃) ⊗ Y₃)).hom\ncase a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ X₂ ((Y₁ ⊗ Y₂) ⊗ X₃) Y₃).inv\ncase a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ (X₂ ⊗ (Y₁ ⊗ Y₂) ⊗ X₃) Y₃).inv\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ 𝟙 X₂ ⊗ (α_ Y₁ Y₂ X₃).hom) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ X₂ Y₁ (Y₂ ⊗ X₃)).inv) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (β_ X₂ Y₁).hom ⊗ 𝟙 Y₂ ⊗ 𝟙 X₃) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂ ⊗ X₃) Y₃).hom\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (Y₂ ⊗ X₃) Y₃).hom\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ Y₁ X₂ ((Y₂ ⊗ X₃) ⊗ Y₃)).hom\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ Y₁ (X₂ ⊗ (Y₂ ⊗ X₃) ⊗ Y₃)).inv\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ Y₂ X₃ Y₃).hom\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ Y₂ (X₃ ⊗ Y₃)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ (X₁ ⊗ X₂) X₃ ((Y₁ ⊗ Y₂) ⊗ Y₃)).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ X₂) ⊗ (α_ X₃ (Y₁ ⊗ Y₂) Y₃).inv\n[PROOFSTEP]\nrw [← tensor_id, associator_naturality]\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n⊢ (α_ (X₁ ⊗ X₂) X₃ ((Y₁ ⊗ Y₂) ⊗ Y₃)).hom ≫\n      (𝟙 (X₁ ⊗ X₂) ⊗ (α_ X₃ (Y₁ ⊗ Y₂) Y₃).inv) ≫\n        ((((((((((((α_ X₁ X₂ ((X₃ ⊗ Y₁ ⊗ Y₂) ⊗ Y₃)).hom ≫ (𝟙 X₁ ⊗ 𝟙 X₂ ⊗ (β_ X₃ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 Y₃)) ≫\n                              (𝟙 X₁ ⊗ (α_ X₂ ((Y₁ ⊗ Y₂) ⊗ X₃) Y₃).inv)) ≫\n                            (α_ X₁ (X₂ ⊗ (Y₁ ⊗ Y₂) ⊗ X₃) Y₃).inv) ≫\n                          ((𝟙 X₁ ⊗ 𝟙 X₂ ⊗ (α_ Y₁ Y₂ X₃).hom) ⊗ 𝟙 Y₃)) ≫\n                        ((𝟙 X₁ ⊗ (α_ X₂ Y₁ (Y₂ ⊗ X₃)).inv) ⊗ 𝟙 Y₃)) ≫\n                      ((𝟙 X₁ ⊗ (β_ X₂ Y₁).hom ⊗ 𝟙 Y₂ ⊗ 𝟙 X₃) ⊗ 𝟙 Y₃)) ≫\n                    (α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂ ⊗ X₃) Y₃).hom) ≫\n                  (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (Y₂ ⊗ X₃) Y₃).hom)) ≫\n                (𝟙 X₁ ⊗ (α_ Y₁ X₂ ((Y₂ ⊗ X₃) ⊗ Y₃)).hom)) ≫\n              (α_ X₁ Y₁ (X₂ ⊗ (Y₂ ⊗ X₃) ⊗ Y₃)).inv) ≫\n            (𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ Y₂ X₃ Y₃).hom)) ≫\n          (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ Y₂ (X₃ ⊗ Y₃)).inv) =\n    ((α_ X₁ X₂ X₃).hom ⊗ (α_ Y₁ Y₂ Y₃).hom) ≫\n      tensor_μ C (X₁, X₂ ⊗ X₃) (Y₁, Y₂ ⊗ Y₃) ≫ (𝟙 (X₁ ⊗ Y₁) ⊗ tensor_μ C (X₂, X₃) (Y₂, Y₃))\n[PROOFSTEP]\nslice_lhs 4 5 => rw [← tensor_comp, associator_inv_naturality, tensor_comp]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ 𝟙 X₂ ⊗ (β_ X₃ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 Y₃) ≫ (𝟙 X₁ ⊗ (α_ X₂ ((Y₁ ⊗ Y₂) ⊗ X₃) Y₃).inv)\ncase a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ (X₂ ⊗ (Y₁ ⊗ Y₂) ⊗ X₃) Y₃).inv\ncase a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ 𝟙 X₂ ⊗ (α_ Y₁ Y₂ X₃).hom) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ X₂ Y₁ (Y₂ ⊗ X₃)).inv) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (β_ X₂ Y₁).hom ⊗ 𝟙 Y₂ ⊗ 𝟙 X₃) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂ ⊗ X₃) Y₃).hom\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (Y₂ ⊗ X₃) Y₃).hom\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ Y₁ X₂ ((Y₂ ⊗ X₃) ⊗ Y₃)).hom\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ Y₁ (X₂ ⊗ (Y₂ ⊗ X₃) ⊗ Y₃)).inv\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ Y₂ X₃ Y₃).hom\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ Y₂ (X₃ ⊗ Y₃)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ (X₁ ⊗ X₂) X₃ ((Y₁ ⊗ Y₂) ⊗ Y₃)).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ X₂) ⊗ (α_ X₃ (Y₁ ⊗ Y₂) Y₃).inv\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ X₂ ((X₃ ⊗ Y₁ ⊗ Y₂) ⊗ Y₃)).hom\n[PROOFSTEP]\nrw [← tensor_comp, associator_inv_naturality, tensor_comp]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ 𝟙 X₂ ⊗ (β_ X₃ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 Y₃) ≫ (𝟙 X₁ ⊗ (α_ X₂ ((Y₁ ⊗ Y₂) ⊗ X₃) Y₃).inv)\ncase a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ (X₂ ⊗ (Y₁ ⊗ Y₂) ⊗ X₃) Y₃).inv\ncase a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ 𝟙 X₂ ⊗ (α_ Y₁ Y₂ X₃).hom) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ X₂ Y₁ (Y₂ ⊗ X₃)).inv) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (β_ X₂ Y₁).hom ⊗ 𝟙 Y₂ ⊗ 𝟙 X₃) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂ ⊗ X₃) Y₃).hom\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (Y₂ ⊗ X₃) Y₃).hom\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ Y₁ X₂ ((Y₂ ⊗ X₃) ⊗ Y₃)).hom\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ Y₁ (X₂ ⊗ (Y₂ ⊗ X₃) ⊗ Y₃)).inv\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ Y₂ X₃ Y₃).hom\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ Y₂ (X₃ ⊗ Y₃)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ (X₁ ⊗ X₂) X₃ ((Y₁ ⊗ Y₂) ⊗ Y₃)).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ X₂) ⊗ (α_ X₃ (Y₁ ⊗ Y₂) Y₃).inv\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ X₂ ((X₃ ⊗ Y₁ ⊗ Y₂) ⊗ Y₃)).hom\n[PROOFSTEP]\nrw [← tensor_comp, associator_inv_naturality, tensor_comp]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ 𝟙 X₂ ⊗ (β_ X₃ (Y₁ ⊗ Y₂)).hom ⊗ 𝟙 Y₃) ≫ (𝟙 X₁ ⊗ (α_ X₂ ((Y₁ ⊗ Y₂) ⊗ X₃) Y₃).inv)\ncase a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ (X₂ ⊗ (Y₁ ⊗ Y₂) ⊗ X₃) Y₃).inv\ncase a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ 𝟙 X₂ ⊗ (α_ Y₁ Y₂ X₃).hom) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ X₂ Y₁ (Y₂ ⊗ X₃)).inv) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (β_ X₂ Y₁).hom ⊗ 𝟙 Y₂ ⊗ 𝟙 X₃) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂ ⊗ X₃) Y₃).hom\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (Y₂ ⊗ X₃) Y₃).hom\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ Y₁ X₂ ((Y₂ ⊗ X₃) ⊗ Y₃)).hom\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ Y₁ (X₂ ⊗ (Y₂ ⊗ X₃) ⊗ Y₃)).inv\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ Y₂ X₃ Y₃).hom\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ Y₂ (X₃ ⊗ Y₃)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ (X₁ ⊗ X₂) X₃ ((Y₁ ⊗ Y₂) ⊗ Y₃)).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ X₂) ⊗ (α_ X₃ (Y₁ ⊗ Y₂) Y₃).inv\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ X₂ ((X₃ ⊗ Y₁ ⊗ Y₂) ⊗ Y₃)).hom\n[PROOFSTEP]\nrw [← tensor_comp, associator_inv_naturality, tensor_comp]\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n⊢ (α_ (X₁ ⊗ X₂) X₃ ((Y₁ ⊗ Y₂) ⊗ Y₃)).hom ≫\n      (𝟙 (X₁ ⊗ X₂) ⊗ (α_ X₃ (Y₁ ⊗ Y₂) Y₃).inv) ≫\n        (α_ X₁ X₂ ((X₃ ⊗ Y₁ ⊗ Y₂) ⊗ Y₃)).hom ≫\n          (((((((((((𝟙 X₁ ⊗ (α_ X₂ (X₃ ⊗ Y₁ ⊗ Y₂) Y₃).inv) ≫ (𝟙 X₁ ⊗ (𝟙 X₂ ⊗ (β_ X₃ (Y₁ ⊗ Y₂)).hom) ⊗ 𝟙 Y₃)) ≫\n                              (α_ X₁ (X₂ ⊗ (Y₁ ⊗ Y₂) ⊗ X₃) Y₃).inv) ≫\n                            ((𝟙 X₁ ⊗ 𝟙 X₂ ⊗ (α_ Y₁ Y₂ X₃).hom) ⊗ 𝟙 Y₃)) ≫\n                          ((𝟙 X₁ ⊗ (α_ X₂ Y₁ (Y₂ ⊗ X₃)).inv) ⊗ 𝟙 Y₃)) ≫\n                        ((𝟙 X₁ ⊗ (β_ X₂ Y₁).hom ⊗ 𝟙 Y₂ ⊗ 𝟙 X₃) ⊗ 𝟙 Y₃)) ≫\n                      (α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂ ⊗ X₃) Y₃).hom) ≫\n                    (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (Y₂ ⊗ X₃) Y₃).hom)) ≫\n                  (𝟙 X₁ ⊗ (α_ Y₁ X₂ ((Y₂ ⊗ X₃) ⊗ Y₃)).hom)) ≫\n                (α_ X₁ Y₁ (X₂ ⊗ (Y₂ ⊗ X₃) ⊗ Y₃)).inv) ≫\n              (𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ Y₂ X₃ Y₃).hom)) ≫\n            (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ Y₂ (X₃ ⊗ Y₃)).inv) =\n    ((α_ X₁ X₂ X₃).hom ⊗ (α_ Y₁ Y₂ Y₃).hom) ≫\n      tensor_μ C (X₁, X₂ ⊗ X₃) (Y₁, Y₂ ⊗ Y₃) ≫ (𝟙 (X₁ ⊗ Y₁) ⊗ tensor_μ C (X₂, X₃) (Y₂, Y₃))\n[PROOFSTEP]\nslice_lhs 5 6 => rw [associator_inv_naturality]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (𝟙 X₂ ⊗ (β_ X₃ (Y₁ ⊗ Y₂)).hom) ⊗ 𝟙 Y₃) ≫ (α_ X₁ (X₂ ⊗ (Y₁ ⊗ Y₂) ⊗ X₃) Y₃).inv\ncase a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ 𝟙 X₂ ⊗ (α_ Y₁ Y₂ X₃).hom) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ X₂ Y₁ (Y₂ ⊗ X₃)).inv) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (β_ X₂ Y₁).hom ⊗ 𝟙 Y₂ ⊗ 𝟙 X₃) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂ ⊗ X₃) Y₃).hom\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (Y₂ ⊗ X₃) Y₃).hom\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ Y₁ X₂ ((Y₂ ⊗ X₃) ⊗ Y₃)).hom\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ Y₁ (X₂ ⊗ (Y₂ ⊗ X₃) ⊗ Y₃)).inv\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ Y₂ X₃ Y₃).hom\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ Y₂ (X₃ ⊗ Y₃)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ (X₁ ⊗ X₂) X₃ ((Y₁ ⊗ Y₂) ⊗ Y₃)).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ X₂) ⊗ (α_ X₃ (Y₁ ⊗ Y₂) Y₃).inv\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ X₂ ((X₃ ⊗ Y₁ ⊗ Y₂) ⊗ Y₃)).hom\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ X₂ (X₃ ⊗ Y₁ ⊗ Y₂) Y₃).inv\n[PROOFSTEP]\nrw [associator_inv_naturality]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (𝟙 X₂ ⊗ (β_ X₃ (Y₁ ⊗ Y₂)).hom) ⊗ 𝟙 Y₃) ≫ (α_ X₁ (X₂ ⊗ (Y₁ ⊗ Y₂) ⊗ X₃) Y₃).inv\ncase a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ 𝟙 X₂ ⊗ (α_ Y₁ Y₂ X₃).hom) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ X₂ Y₁ (Y₂ ⊗ X₃)).inv) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (β_ X₂ Y₁).hom ⊗ 𝟙 Y₂ ⊗ 𝟙 X₃) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂ ⊗ X₃) Y₃).hom\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (Y₂ ⊗ X₃) Y₃).hom\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ Y₁ X₂ ((Y₂ ⊗ X₃) ⊗ Y₃)).hom\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ Y₁ (X₂ ⊗ (Y₂ ⊗ X₃) ⊗ Y₃)).inv\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ Y₂ X₃ Y₃).hom\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ Y₂ (X₃ ⊗ Y₃)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ (X₁ ⊗ X₂) X₃ ((Y₁ ⊗ Y₂) ⊗ Y₃)).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ X₂) ⊗ (α_ X₃ (Y₁ ⊗ Y₂) Y₃).inv\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ X₂ ((X₃ ⊗ Y₁ ⊗ Y₂) ⊗ Y₃)).hom\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ X₂ (X₃ ⊗ Y₁ ⊗ Y₂) Y₃).inv\n[PROOFSTEP]\nrw [associator_inv_naturality]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (𝟙 X₂ ⊗ (β_ X₃ (Y₁ ⊗ Y₂)).hom) ⊗ 𝟙 Y₃) ≫ (α_ X₁ (X₂ ⊗ (Y₁ ⊗ Y₂) ⊗ X₃) Y₃).inv\ncase a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ 𝟙 X₂ ⊗ (α_ Y₁ Y₂ X₃).hom) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ X₂ Y₁ (Y₂ ⊗ X₃)).inv) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (β_ X₂ Y₁).hom ⊗ 𝟙 Y₂ ⊗ 𝟙 X₃) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂ ⊗ X₃) Y₃).hom\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (Y₂ ⊗ X₃) Y₃).hom\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ Y₁ X₂ ((Y₂ ⊗ X₃) ⊗ Y₃)).hom\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ Y₁ (X₂ ⊗ (Y₂ ⊗ X₃) ⊗ Y₃)).inv\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ Y₂ X₃ Y₃).hom\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ Y₂ (X₃ ⊗ Y₃)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ (X₁ ⊗ X₂) X₃ ((Y₁ ⊗ Y₂) ⊗ Y₃)).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ X₂) ⊗ (α_ X₃ (Y₁ ⊗ Y₂) Y₃).inv\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ X₂ ((X₃ ⊗ Y₁ ⊗ Y₂) ⊗ Y₃)).hom\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ X₂ (X₃ ⊗ Y₁ ⊗ Y₂) Y₃).inv\n[PROOFSTEP]\nrw [associator_inv_naturality]\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n⊢ (α_ (X₁ ⊗ X₂) X₃ ((Y₁ ⊗ Y₂) ⊗ Y₃)).hom ≫\n      (𝟙 (X₁ ⊗ X₂) ⊗ (α_ X₃ (Y₁ ⊗ Y₂) Y₃).inv) ≫\n        (α_ X₁ X₂ ((X₃ ⊗ Y₁ ⊗ Y₂) ⊗ Y₃)).hom ≫\n          (𝟙 X₁ ⊗ (α_ X₂ (X₃ ⊗ Y₁ ⊗ Y₂) Y₃).inv) ≫\n            ((((((((((α_ X₁ (X₂ ⊗ X₃ ⊗ Y₁ ⊗ Y₂) Y₃).inv ≫ ((𝟙 X₁ ⊗ 𝟙 X₂ ⊗ (β_ X₃ (Y₁ ⊗ Y₂)).hom) ⊗ 𝟙 Y₃)) ≫\n                              ((𝟙 X₁ ⊗ 𝟙 X₂ ⊗ (α_ Y₁ Y₂ X₃).hom) ⊗ 𝟙 Y₃)) ≫\n                            ((𝟙 X₁ ⊗ (α_ X₂ Y₁ (Y₂ ⊗ X₃)).inv) ⊗ 𝟙 Y₃)) ≫\n                          ((𝟙 X₁ ⊗ (β_ X₂ Y₁).hom ⊗ 𝟙 Y₂ ⊗ 𝟙 X₃) ⊗ 𝟙 Y₃)) ≫\n                        (α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂ ⊗ X₃) Y₃).hom) ≫\n                      (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (Y₂ ⊗ X₃) Y₃).hom)) ≫\n                    (𝟙 X₁ ⊗ (α_ Y₁ X₂ ((Y₂ ⊗ X₃) ⊗ Y₃)).hom)) ≫\n                  (α_ X₁ Y₁ (X₂ ⊗ (Y₂ ⊗ X₃) ⊗ Y₃)).inv) ≫\n                (𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ Y₂ X₃ Y₃).hom)) ≫\n              (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ Y₂ (X₃ ⊗ Y₃)).inv) =\n    ((α_ X₁ X₂ X₃).hom ⊗ (α_ Y₁ Y₂ Y₃).hom) ≫\n      tensor_μ C (X₁, X₂ ⊗ X₃) (Y₁, Y₂ ⊗ Y₃) ≫ (𝟙 (X₁ ⊗ Y₁) ⊗ tensor_μ C (X₂, X₃) (Y₂, Y₃))\n[PROOFSTEP]\nslice_lhs 6 9 =>\n  rw [← tensor_comp, ← tensor_comp, ← tensor_comp, ← tensor_comp, ← tensor_comp, ← tensor_comp, tensor_id,\n    associator_monoidal_aux, ← id_comp (𝟙 X₁ ≫ 𝟙 X₁ ≫ 𝟙 X₁ ≫ 𝟙 X₁), ← id_comp (𝟙 X₁ ≫ 𝟙 X₁ ≫ 𝟙 X₁ ≫ 𝟙 X₁ ≫ 𝟙 X₁), ←\n    id_comp (𝟙 Y₃ ≫ 𝟙 Y₃ ≫ 𝟙 Y₃ ≫ 𝟙 Y₃), ← id_comp (𝟙 Y₃ ≫ 𝟙 Y₃ ≫ 𝟙 Y₃ ≫ 𝟙 Y₃ ≫ 𝟙 Y₃), tensor_comp, tensor_comp,\n    tensor_comp, tensor_comp, tensor_comp, tensor_comp, tensor_comp, tensor_comp, tensor_comp, tensor_comp]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| ((𝟙 X₁ ⊗ 𝟙 X₂ ⊗ (β_ X₃ (Y₁ ⊗ Y₂)).hom) ⊗ 𝟙 Y₃) ≫\n    ((𝟙 X₁ ⊗ 𝟙 X₂ ⊗ (α_ Y₁ Y₂ X₃).hom) ⊗ 𝟙 Y₃) ≫\n      ((𝟙 X₁ ⊗ (α_ X₂ Y₁ (Y₂ ⊗ X₃)).inv) ⊗ 𝟙 Y₃) ≫ ((𝟙 X₁ ⊗ (β_ X₂ Y₁).hom ⊗ 𝟙 Y₂ ⊗ 𝟙 X₃) ⊗ 𝟙 Y₃)\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂ ⊗ X₃) Y₃).hom\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (Y₂ ⊗ X₃) Y₃).hom\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ Y₁ X₂ ((Y₂ ⊗ X₃) ⊗ Y₃)).hom\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ Y₁ (X₂ ⊗ (Y₂ ⊗ X₃) ⊗ Y₃)).inv\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ Y₂ X₃ Y₃).hom\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ Y₂ (X₃ ⊗ Y₃)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ (X₁ ⊗ X₂) X₃ ((Y₁ ⊗ Y₂) ⊗ Y₃)).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ X₂) ⊗ (α_ X₃ (Y₁ ⊗ Y₂) Y₃).inv\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ X₂ ((X₃ ⊗ Y₁ ⊗ Y₂) ⊗ Y₃)).hom\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ X₂ (X₃ ⊗ Y₁ ⊗ Y₂) Y₃).inv\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ (X₂ ⊗ X₃ ⊗ Y₁ ⊗ Y₂) Y₃).inv\n[PROOFSTEP]\nrw [← tensor_comp, ← tensor_comp, ← tensor_comp, ← tensor_comp, ← tensor_comp, ← tensor_comp, tensor_id,\n    associator_monoidal_aux, ← id_comp (𝟙 X₁ ≫ 𝟙 X₁ ≫ 𝟙 X₁ ≫ 𝟙 X₁), ← id_comp (𝟙 X₁ ≫ 𝟙 X₁ ≫ 𝟙 X₁ ≫ 𝟙 X₁ ≫ 𝟙 X₁), ←\n    id_comp (𝟙 Y₃ ≫ 𝟙 Y₃ ≫ 𝟙 Y₃ ≫ 𝟙 Y₃), ← id_comp (𝟙 Y₃ ≫ 𝟙 Y₃ ≫ 𝟙 Y₃ ≫ 𝟙 Y₃ ≫ 𝟙 Y₃), tensor_comp, tensor_comp,\n    tensor_comp, tensor_comp, tensor_comp, tensor_comp, tensor_comp, tensor_comp, tensor_comp, tensor_comp]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| ((𝟙 X₁ ⊗ 𝟙 X₂ ⊗ (β_ X₃ (Y₁ ⊗ Y₂)).hom) ⊗ 𝟙 Y₃) ≫\n    ((𝟙 X₁ ⊗ 𝟙 X₂ ⊗ (α_ Y₁ Y₂ X₃).hom) ⊗ 𝟙 Y₃) ≫\n      ((𝟙 X₁ ⊗ (α_ X₂ Y₁ (Y₂ ⊗ X₃)).inv) ⊗ 𝟙 Y₃) ≫ ((𝟙 X₁ ⊗ (β_ X₂ Y₁).hom ⊗ 𝟙 Y₂ ⊗ 𝟙 X₃) ⊗ 𝟙 Y₃)\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂ ⊗ X₃) Y₃).hom\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (Y₂ ⊗ X₃) Y₃).hom\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ Y₁ X₂ ((Y₂ ⊗ X₃) ⊗ Y₃)).hom\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ Y₁ (X₂ ⊗ (Y₂ ⊗ X₃) ⊗ Y₃)).inv\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ Y₂ X₃ Y₃).hom\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ Y₂ (X₃ ⊗ Y₃)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ (X₁ ⊗ X₂) X₃ ((Y₁ ⊗ Y₂) ⊗ Y₃)).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ X₂) ⊗ (α_ X₃ (Y₁ ⊗ Y₂) Y₃).inv\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ X₂ ((X₃ ⊗ Y₁ ⊗ Y₂) ⊗ Y₃)).hom\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ X₂ (X₃ ⊗ Y₁ ⊗ Y₂) Y₃).inv\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ (X₂ ⊗ X₃ ⊗ Y₁ ⊗ Y₂) Y₃).inv\n[PROOFSTEP]\nrw [← tensor_comp, ← tensor_comp, ← tensor_comp, ← tensor_comp, ← tensor_comp, ← tensor_comp, tensor_id,\n    associator_monoidal_aux, ← id_comp (𝟙 X₁ ≫ 𝟙 X₁ ≫ 𝟙 X₁ ≫ 𝟙 X₁), ← id_comp (𝟙 X₁ ≫ 𝟙 X₁ ≫ 𝟙 X₁ ≫ 𝟙 X₁ ≫ 𝟙 X₁), ←\n    id_comp (𝟙 Y₃ ≫ 𝟙 Y₃ ≫ 𝟙 Y₃ ≫ 𝟙 Y₃), ← id_comp (𝟙 Y₃ ≫ 𝟙 Y₃ ≫ 𝟙 Y₃ ≫ 𝟙 Y₃ ≫ 𝟙 Y₃), tensor_comp, tensor_comp,\n    tensor_comp, tensor_comp, tensor_comp, tensor_comp, tensor_comp, tensor_comp, tensor_comp, tensor_comp]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| ((𝟙 X₁ ⊗ 𝟙 X₂ ⊗ (β_ X₃ (Y₁ ⊗ Y₂)).hom) ⊗ 𝟙 Y₃) ≫\n    ((𝟙 X₁ ⊗ 𝟙 X₂ ⊗ (α_ Y₁ Y₂ X₃).hom) ⊗ 𝟙 Y₃) ≫\n      ((𝟙 X₁ ⊗ (α_ X₂ Y₁ (Y₂ ⊗ X₃)).inv) ⊗ 𝟙 Y₃) ≫ ((𝟙 X₁ ⊗ (β_ X₂ Y₁).hom ⊗ 𝟙 Y₂ ⊗ 𝟙 X₃) ⊗ 𝟙 Y₃)\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂ ⊗ X₃) Y₃).hom\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (Y₂ ⊗ X₃) Y₃).hom\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ Y₁ X₂ ((Y₂ ⊗ X₃) ⊗ Y₃)).hom\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ Y₁ (X₂ ⊗ (Y₂ ⊗ X₃) ⊗ Y₃)).inv\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ Y₂ X₃ Y₃).hom\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ Y₂ (X₃ ⊗ Y₃)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ (X₁ ⊗ X₂) X₃ ((Y₁ ⊗ Y₂) ⊗ Y₃)).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ X₂) ⊗ (α_ X₃ (Y₁ ⊗ Y₂) Y₃).inv\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ X₂ ((X₃ ⊗ Y₁ ⊗ Y₂) ⊗ Y₃)).hom\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ X₂ (X₃ ⊗ Y₁ ⊗ Y₂) Y₃).inv\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ (X₂ ⊗ X₃ ⊗ Y₁ ⊗ Y₂) Y₃).inv\n[PROOFSTEP]\nrw [← tensor_comp, ← tensor_comp, ← tensor_comp, ← tensor_comp, ← tensor_comp, ← tensor_comp, tensor_id,\n  associator_monoidal_aux, ← id_comp (𝟙 X₁ ≫ 𝟙 X₁ ≫ 𝟙 X₁ ≫ 𝟙 X₁), ← id_comp (𝟙 X₁ ≫ 𝟙 X₁ ≫ 𝟙 X₁ ≫ 𝟙 X₁ ≫ 𝟙 X₁), ←\n  id_comp (𝟙 Y₃ ≫ 𝟙 Y₃ ≫ 𝟙 Y₃ ≫ 𝟙 Y₃), ← id_comp (𝟙 Y₃ ≫ 𝟙 Y₃ ≫ 𝟙 Y₃ ≫ 𝟙 Y₃ ≫ 𝟙 Y₃), tensor_comp, tensor_comp,\n  tensor_comp, tensor_comp, tensor_comp, tensor_comp, tensor_comp, tensor_comp, tensor_comp, tensor_comp]\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n⊢ (α_ (X₁ ⊗ X₂) X₃ ((Y₁ ⊗ Y₂) ⊗ Y₃)).hom ≫\n      (𝟙 (X₁ ⊗ X₂) ⊗ (α_ X₃ (Y₁ ⊗ Y₂) Y₃).inv) ≫\n        (α_ X₁ X₂ ((X₃ ⊗ Y₁ ⊗ Y₂) ⊗ Y₃)).hom ≫\n          (𝟙 X₁ ⊗ (α_ X₂ (X₃ ⊗ Y₁ ⊗ Y₂) Y₃).inv) ≫\n            (α_ X₁ (X₂ ⊗ X₃ ⊗ Y₁ ⊗ Y₂) Y₃).inv ≫\n              ((((((((𝟙 X₁ ⊗ (α_ X₂ X₃ (Y₁ ⊗ Y₂)).inv) ⊗ 𝟙 Y₃) ≫\n                            ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ X₃) Y₁ Y₂).inv) ⊗ 𝟙 Y₃) ≫\n                              ((𝟙 X₁ ⊗ (β_ (X₂ ⊗ X₃) Y₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Y₃) ≫\n                                ((𝟙 X₁ ⊗ (α_ Y₁ X₂ X₃).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Y₃) ≫\n                                  ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) X₃ Y₂).hom) ⊗ 𝟙 Y₃) ≫\n                                    ((𝟙 X₁ ⊗ 𝟙 (Y₁ ⊗ X₂) ⊗ (β_ X₃ Y₂).hom) ⊗ 𝟙 Y₃)) ≫\n                          (α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂ ⊗ X₃) Y₃).hom) ≫\n                        (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (Y₂ ⊗ X₃) Y₃).hom)) ≫\n                      (𝟙 X₁ ⊗ (α_ Y₁ X₂ ((Y₂ ⊗ X₃) ⊗ Y₃)).hom)) ≫\n                    (α_ X₁ Y₁ (X₂ ⊗ (Y₂ ⊗ X₃) ⊗ Y₃)).inv) ≫\n                  (𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ Y₂ X₃ Y₃).hom)) ≫\n                (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ Y₂ (X₃ ⊗ Y₃)).inv) =\n    ((α_ X₁ X₂ X₃).hom ⊗ (α_ Y₁ Y₂ Y₃).hom) ≫\n      tensor_μ C (X₁, X₂ ⊗ X₃) (Y₁, Y₂ ⊗ Y₃) ≫ (𝟙 (X₁ ⊗ Y₁) ⊗ tensor_μ C (X₂, X₃) (Y₂, Y₃))\n[PROOFSTEP]\nslice_lhs 11 12 => rw [associator_naturality]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| ((𝟙 X₁ ⊗ 𝟙 (Y₁ ⊗ X₂) ⊗ (β_ X₃ Y₂).hom) ⊗ 𝟙 Y₃) ≫ (α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂ ⊗ X₃) Y₃).hom\ncase a.a.a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (Y₂ ⊗ X₃) Y₃).hom\ncase a.a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ Y₁ X₂ ((Y₂ ⊗ X₃) ⊗ Y₃)).hom\ncase a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ Y₁ (X₂ ⊗ (Y₂ ⊗ X₃) ⊗ Y₃)).inv\ncase a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ Y₂ X₃ Y₃).hom\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ Y₂ (X₃ ⊗ Y₃)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ (X₁ ⊗ X₂) X₃ ((Y₁ ⊗ Y₂) ⊗ Y₃)).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ X₂) ⊗ (α_ X₃ (Y₁ ⊗ Y₂) Y₃).inv\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ X₂ ((X₃ ⊗ Y₁ ⊗ Y₂) ⊗ Y₃)).hom\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ X₂ (X₃ ⊗ Y₁ ⊗ Y₂) Y₃).inv\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ (X₂ ⊗ X₃ ⊗ Y₁ ⊗ Y₂) Y₃).inv\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ X₂ X₃ (Y₁ ⊗ Y₂)).inv) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ (X₂ ⊗ X₃) Y₁ Y₂).inv) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (β_ (X₂ ⊗ X₃) Y₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ Y₁ X₂ X₃).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) X₃ Y₂).hom) ⊗ 𝟙 Y₃\n[PROOFSTEP]\nrw [associator_naturality]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| ((𝟙 X₁ ⊗ 𝟙 (Y₁ ⊗ X₂) ⊗ (β_ X₃ Y₂).hom) ⊗ 𝟙 Y₃) ≫ (α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂ ⊗ X₃) Y₃).hom\ncase a.a.a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (Y₂ ⊗ X₃) Y₃).hom\ncase a.a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ Y₁ X₂ ((Y₂ ⊗ X₃) ⊗ Y₃)).hom\ncase a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ Y₁ (X₂ ⊗ (Y₂ ⊗ X₃) ⊗ Y₃)).inv\ncase a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ Y₂ X₃ Y₃).hom\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ Y₂ (X₃ ⊗ Y₃)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ (X₁ ⊗ X₂) X₃ ((Y₁ ⊗ Y₂) ⊗ Y₃)).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ X₂) ⊗ (α_ X₃ (Y₁ ⊗ Y₂) Y₃).inv\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ X₂ ((X₃ ⊗ Y₁ ⊗ Y₂) ⊗ Y₃)).hom\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ X₂ (X₃ ⊗ Y₁ ⊗ Y₂) Y₃).inv\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ (X₂ ⊗ X₃ ⊗ Y₁ ⊗ Y₂) Y₃).inv\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ X₂ X₃ (Y₁ ⊗ Y₂)).inv) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ (X₂ ⊗ X₃) Y₁ Y₂).inv) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (β_ (X₂ ⊗ X₃) Y₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ Y₁ X₂ X₃).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) X₃ Y₂).hom) ⊗ 𝟙 Y₃\n[PROOFSTEP]\nrw [associator_naturality]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| ((𝟙 X₁ ⊗ 𝟙 (Y₁ ⊗ X₂) ⊗ (β_ X₃ Y₂).hom) ⊗ 𝟙 Y₃) ≫ (α_ X₁ ((Y₁ ⊗ X₂) ⊗ Y₂ ⊗ X₃) Y₃).hom\ncase a.a.a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (Y₂ ⊗ X₃) Y₃).hom\ncase a.a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ Y₁ X₂ ((Y₂ ⊗ X₃) ⊗ Y₃)).hom\ncase a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ Y₁ (X₂ ⊗ (Y₂ ⊗ X₃) ⊗ Y₃)).inv\ncase a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ Y₂ X₃ Y₃).hom\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ Y₂ (X₃ ⊗ Y₃)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ (X₁ ⊗ X₂) X₃ ((Y₁ ⊗ Y₂) ⊗ Y₃)).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ X₂) ⊗ (α_ X₃ (Y₁ ⊗ Y₂) Y₃).inv\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ X₂ ((X₃ ⊗ Y₁ ⊗ Y₂) ⊗ Y₃)).hom\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ X₂ (X₃ ⊗ Y₁ ⊗ Y₂) Y₃).inv\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ (X₂ ⊗ X₃ ⊗ Y₁ ⊗ Y₂) Y₃).inv\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ X₂ X₃ (Y₁ ⊗ Y₂)).inv) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ (X₂ ⊗ X₃) Y₁ Y₂).inv) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (β_ (X₂ ⊗ X₃) Y₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ Y₁ X₂ X₃).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) X₃ Y₂).hom) ⊗ 𝟙 Y₃\n[PROOFSTEP]\nrw [associator_naturality]\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n⊢ (α_ (X₁ ⊗ X₂) X₃ ((Y₁ ⊗ Y₂) ⊗ Y₃)).hom ≫\n      (𝟙 (X₁ ⊗ X₂) ⊗ (α_ X₃ (Y₁ ⊗ Y₂) Y₃).inv) ≫\n        (α_ X₁ X₂ ((X₃ ⊗ Y₁ ⊗ Y₂) ⊗ Y₃)).hom ≫\n          (𝟙 X₁ ⊗ (α_ X₂ (X₃ ⊗ Y₁ ⊗ Y₂) Y₃).inv) ≫\n            (α_ X₁ (X₂ ⊗ X₃ ⊗ Y₁ ⊗ Y₂) Y₃).inv ≫\n              ((𝟙 X₁ ⊗ (α_ X₂ X₃ (Y₁ ⊗ Y₂)).inv) ⊗ 𝟙 Y₃) ≫\n                ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ X₃) Y₁ Y₂).inv) ⊗ 𝟙 Y₃) ≫\n                  ((𝟙 X₁ ⊗ (β_ (X₂ ⊗ X₃) Y₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Y₃) ≫\n                    ((𝟙 X₁ ⊗ (α_ Y₁ X₂ X₃).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Y₃) ≫\n                      ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) X₃ Y₂).hom) ⊗ 𝟙 Y₃) ≫\n                        ((((((α_ X₁ ((Y₁ ⊗ X₂) ⊗ X₃ ⊗ Y₂) Y₃).hom ≫ (𝟙 X₁ ⊗ (𝟙 (Y₁ ⊗ X₂) ⊗ (β_ X₃ Y₂).hom) ⊗ 𝟙 Y₃)) ≫\n                                  (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (Y₂ ⊗ X₃) Y₃).hom)) ≫\n                                (𝟙 X₁ ⊗ (α_ Y₁ X₂ ((Y₂ ⊗ X₃) ⊗ Y₃)).hom)) ≫\n                              (α_ X₁ Y₁ (X₂ ⊗ (Y₂ ⊗ X₃) ⊗ Y₃)).inv) ≫\n                            (𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ Y₂ X₃ Y₃).hom)) ≫\n                          (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ Y₂ (X₃ ⊗ Y₃)).inv) =\n    ((α_ X₁ X₂ X₃).hom ⊗ (α_ Y₁ Y₂ Y₃).hom) ≫\n      tensor_μ C (X₁, X₂ ⊗ X₃) (Y₁, Y₂ ⊗ Y₃) ≫ (𝟙 (X₁ ⊗ Y₁) ⊗ tensor_μ C (X₂, X₃) (Y₂, Y₃))\n[PROOFSTEP]\nslice_lhs 12 13 => rw [← tensor_comp, associator_naturality, tensor_comp]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (𝟙 (Y₁ ⊗ X₂) ⊗ (β_ X₃ Y₂).hom) ⊗ 𝟙 Y₃) ≫ (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (Y₂ ⊗ X₃) Y₃).hom)\ncase a.a.a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ Y₁ X₂ ((Y₂ ⊗ X₃) ⊗ Y₃)).hom\ncase a.a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ Y₁ (X₂ ⊗ (Y₂ ⊗ X₃) ⊗ Y₃)).inv\ncase a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ Y₂ X₃ Y₃).hom\ncase a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ Y₂ (X₃ ⊗ Y₃)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ (X₁ ⊗ X₂) X₃ ((Y₁ ⊗ Y₂) ⊗ Y₃)).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ X₂) ⊗ (α_ X₃ (Y₁ ⊗ Y₂) Y₃).inv\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ X₂ ((X₃ ⊗ Y₁ ⊗ Y₂) ⊗ Y₃)).hom\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ X₂ (X₃ ⊗ Y₁ ⊗ Y₂) Y₃).inv\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ (X₂ ⊗ X₃ ⊗ Y₁ ⊗ Y₂) Y₃).inv\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ X₂ X₃ (Y₁ ⊗ Y₂)).inv) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ (X₂ ⊗ X₃) Y₁ Y₂).inv) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (β_ (X₂ ⊗ X₃) Y₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ Y₁ X₂ X₃).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) X₃ Y₂).hom) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ ((Y₁ ⊗ X₂) ⊗ X₃ ⊗ Y₂) Y₃).hom\n[PROOFSTEP]\nrw [← tensor_comp, associator_naturality, tensor_comp]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (𝟙 (Y₁ ⊗ X₂) ⊗ (β_ X₃ Y₂).hom) ⊗ 𝟙 Y₃) ≫ (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (Y₂ ⊗ X₃) Y₃).hom)\ncase a.a.a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ Y₁ X₂ ((Y₂ ⊗ X₃) ⊗ Y₃)).hom\ncase a.a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ Y₁ (X₂ ⊗ (Y₂ ⊗ X₃) ⊗ Y₃)).inv\ncase a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ Y₂ X₃ Y₃).hom\ncase a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ Y₂ (X₃ ⊗ Y₃)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ (X₁ ⊗ X₂) X₃ ((Y₁ ⊗ Y₂) ⊗ Y₃)).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ X₂) ⊗ (α_ X₃ (Y₁ ⊗ Y₂) Y₃).inv\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ X₂ ((X₃ ⊗ Y₁ ⊗ Y₂) ⊗ Y₃)).hom\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ X₂ (X₃ ⊗ Y₁ ⊗ Y₂) Y₃).inv\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ (X₂ ⊗ X₃ ⊗ Y₁ ⊗ Y₂) Y₃).inv\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ X₂ X₃ (Y₁ ⊗ Y₂)).inv) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ (X₂ ⊗ X₃) Y₁ Y₂).inv) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (β_ (X₂ ⊗ X₃) Y₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ Y₁ X₂ X₃).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) X₃ Y₂).hom) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ ((Y₁ ⊗ X₂) ⊗ X₃ ⊗ Y₂) Y₃).hom\n[PROOFSTEP]\nrw [← tensor_comp, associator_naturality, tensor_comp]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (𝟙 (Y₁ ⊗ X₂) ⊗ (β_ X₃ Y₂).hom) ⊗ 𝟙 Y₃) ≫ (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (Y₂ ⊗ X₃) Y₃).hom)\ncase a.a.a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ Y₁ X₂ ((Y₂ ⊗ X₃) ⊗ Y₃)).hom\ncase a.a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ Y₁ (X₂ ⊗ (Y₂ ⊗ X₃) ⊗ Y₃)).inv\ncase a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ Y₂ X₃ Y₃).hom\ncase a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ Y₂ (X₃ ⊗ Y₃)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ (X₁ ⊗ X₂) X₃ ((Y₁ ⊗ Y₂) ⊗ Y₃)).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ X₂) ⊗ (α_ X₃ (Y₁ ⊗ Y₂) Y₃).inv\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ X₂ ((X₃ ⊗ Y₁ ⊗ Y₂) ⊗ Y₃)).hom\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ X₂ (X₃ ⊗ Y₁ ⊗ Y₂) Y₃).inv\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ (X₂ ⊗ X₃ ⊗ Y₁ ⊗ Y₂) Y₃).inv\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ X₂ X₃ (Y₁ ⊗ Y₂)).inv) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ (X₂ ⊗ X₃) Y₁ Y₂).inv) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (β_ (X₂ ⊗ X₃) Y₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ Y₁ X₂ X₃).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) X₃ Y₂).hom) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ ((Y₁ ⊗ X₂) ⊗ X₃ ⊗ Y₂) Y₃).hom\n[PROOFSTEP]\nrw [← tensor_comp, associator_naturality, tensor_comp]\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n⊢ (α_ (X₁ ⊗ X₂) X₃ ((Y₁ ⊗ Y₂) ⊗ Y₃)).hom ≫\n      (𝟙 (X₁ ⊗ X₂) ⊗ (α_ X₃ (Y₁ ⊗ Y₂) Y₃).inv) ≫\n        (α_ X₁ X₂ ((X₃ ⊗ Y₁ ⊗ Y₂) ⊗ Y₃)).hom ≫\n          (𝟙 X₁ ⊗ (α_ X₂ (X₃ ⊗ Y₁ ⊗ Y₂) Y₃).inv) ≫\n            (α_ X₁ (X₂ ⊗ X₃ ⊗ Y₁ ⊗ Y₂) Y₃).inv ≫\n              ((𝟙 X₁ ⊗ (α_ X₂ X₃ (Y₁ ⊗ Y₂)).inv) ⊗ 𝟙 Y₃) ≫\n                ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ X₃) Y₁ Y₂).inv) ⊗ 𝟙 Y₃) ≫\n                  ((𝟙 X₁ ⊗ (β_ (X₂ ⊗ X₃) Y₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Y₃) ≫\n                    ((𝟙 X₁ ⊗ (α_ Y₁ X₂ X₃).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Y₃) ≫\n                      ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) X₃ Y₂).hom) ⊗ 𝟙 Y₃) ≫\n                        (α_ X₁ ((Y₁ ⊗ X₂) ⊗ X₃ ⊗ Y₂) Y₃).hom ≫\n                          (((((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (X₃ ⊗ Y₂) Y₃).hom) ≫ (𝟙 X₁ ⊗ 𝟙 (Y₁ ⊗ X₂) ⊗ (β_ X₃ Y₂).hom ⊗ 𝟙 Y₃)) ≫\n                                  (𝟙 X₁ ⊗ (α_ Y₁ X₂ ((Y₂ ⊗ X₃) ⊗ Y₃)).hom)) ≫\n                                (α_ X₁ Y₁ (X₂ ⊗ (Y₂ ⊗ X₃) ⊗ Y₃)).inv) ≫\n                              (𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ Y₂ X₃ Y₃).hom)) ≫\n                            (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ Y₂ (X₃ ⊗ Y₃)).inv) =\n    ((α_ X₁ X₂ X₃).hom ⊗ (α_ Y₁ Y₂ Y₃).hom) ≫\n      tensor_μ C (X₁, X₂ ⊗ X₃) (Y₁, Y₂ ⊗ Y₃) ≫ (𝟙 (X₁ ⊗ Y₁) ⊗ tensor_μ C (X₂, X₃) (Y₂, Y₃))\n[PROOFSTEP]\nslice_lhs 13 14 => rw [← tensor_comp, ← tensor_id, associator_naturality, tensor_comp]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ 𝟙 (Y₁ ⊗ X₂) ⊗ (β_ X₃ Y₂).hom ⊗ 𝟙 Y₃) ≫ (𝟙 X₁ ⊗ (α_ Y₁ X₂ ((Y₂ ⊗ X₃) ⊗ Y₃)).hom)\ncase a.a.a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ Y₁ (X₂ ⊗ (Y₂ ⊗ X₃) ⊗ Y₃)).inv\ncase a.a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ Y₂ X₃ Y₃).hom\ncase a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ Y₂ (X₃ ⊗ Y₃)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ (X₁ ⊗ X₂) X₃ ((Y₁ ⊗ Y₂) ⊗ Y₃)).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ X₂) ⊗ (α_ X₃ (Y₁ ⊗ Y₂) Y₃).inv\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ X₂ ((X₃ ⊗ Y₁ ⊗ Y₂) ⊗ Y₃)).hom\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ X₂ (X₃ ⊗ Y₁ ⊗ Y₂) Y₃).inv\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ (X₂ ⊗ X₃ ⊗ Y₁ ⊗ Y₂) Y₃).inv\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ X₂ X₃ (Y₁ ⊗ Y₂)).inv) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ (X₂ ⊗ X₃) Y₁ Y₂).inv) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (β_ (X₂ ⊗ X₃) Y₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ Y₁ X₂ X₃).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) X₃ Y₂).hom) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ ((Y₁ ⊗ X₂) ⊗ X₃ ⊗ Y₂) Y₃).hom\ncase a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (X₃ ⊗ Y₂) Y₃).hom\n[PROOFSTEP]\nrw [← tensor_comp, ← tensor_id, associator_naturality, tensor_comp]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ 𝟙 (Y₁ ⊗ X₂) ⊗ (β_ X₃ Y₂).hom ⊗ 𝟙 Y₃) ≫ (𝟙 X₁ ⊗ (α_ Y₁ X₂ ((Y₂ ⊗ X₃) ⊗ Y₃)).hom)\ncase a.a.a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ Y₁ (X₂ ⊗ (Y₂ ⊗ X₃) ⊗ Y₃)).inv\ncase a.a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ Y₂ X₃ Y₃).hom\ncase a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ Y₂ (X₃ ⊗ Y₃)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ (X₁ ⊗ X₂) X₃ ((Y₁ ⊗ Y₂) ⊗ Y₃)).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ X₂) ⊗ (α_ X₃ (Y₁ ⊗ Y₂) Y₃).inv\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ X₂ ((X₃ ⊗ Y₁ ⊗ Y₂) ⊗ Y₃)).hom\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ X₂ (X₃ ⊗ Y₁ ⊗ Y₂) Y₃).inv\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ (X₂ ⊗ X₃ ⊗ Y₁ ⊗ Y₂) Y₃).inv\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ X₂ X₃ (Y₁ ⊗ Y₂)).inv) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ (X₂ ⊗ X₃) Y₁ Y₂).inv) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (β_ (X₂ ⊗ X₃) Y₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ Y₁ X₂ X₃).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) X₃ Y₂).hom) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ ((Y₁ ⊗ X₂) ⊗ X₃ ⊗ Y₂) Y₃).hom\ncase a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (X₃ ⊗ Y₂) Y₃).hom\n[PROOFSTEP]\nrw [← tensor_comp, ← tensor_id, associator_naturality, tensor_comp]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ 𝟙 (Y₁ ⊗ X₂) ⊗ (β_ X₃ Y₂).hom ⊗ 𝟙 Y₃) ≫ (𝟙 X₁ ⊗ (α_ Y₁ X₂ ((Y₂ ⊗ X₃) ⊗ Y₃)).hom)\ncase a.a.a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ Y₁ (X₂ ⊗ (Y₂ ⊗ X₃) ⊗ Y₃)).inv\ncase a.a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ Y₂ X₃ Y₃).hom\ncase a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ Y₂ (X₃ ⊗ Y₃)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ (X₁ ⊗ X₂) X₃ ((Y₁ ⊗ Y₂) ⊗ Y₃)).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ X₂) ⊗ (α_ X₃ (Y₁ ⊗ Y₂) Y₃).inv\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ X₂ ((X₃ ⊗ Y₁ ⊗ Y₂) ⊗ Y₃)).hom\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ X₂ (X₃ ⊗ Y₁ ⊗ Y₂) Y₃).inv\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ (X₂ ⊗ X₃ ⊗ Y₁ ⊗ Y₂) Y₃).inv\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ X₂ X₃ (Y₁ ⊗ Y₂)).inv) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ (X₂ ⊗ X₃) Y₁ Y₂).inv) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (β_ (X₂ ⊗ X₃) Y₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ Y₁ X₂ X₃).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) X₃ Y₂).hom) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ ((Y₁ ⊗ X₂) ⊗ X₃ ⊗ Y₂) Y₃).hom\ncase a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (X₃ ⊗ Y₂) Y₃).hom\n[PROOFSTEP]\nrw [← tensor_comp, ← tensor_id, associator_naturality, tensor_comp]\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n⊢ (α_ (X₁ ⊗ X₂) X₃ ((Y₁ ⊗ Y₂) ⊗ Y₃)).hom ≫\n      (𝟙 (X₁ ⊗ X₂) ⊗ (α_ X₃ (Y₁ ⊗ Y₂) Y₃).inv) ≫\n        (α_ X₁ X₂ ((X₃ ⊗ Y₁ ⊗ Y₂) ⊗ Y₃)).hom ≫\n          (𝟙 X₁ ⊗ (α_ X₂ (X₃ ⊗ Y₁ ⊗ Y₂) Y₃).inv) ≫\n            (α_ X₁ (X₂ ⊗ X₃ ⊗ Y₁ ⊗ Y₂) Y₃).inv ≫\n              ((𝟙 X₁ ⊗ (α_ X₂ X₃ (Y₁ ⊗ Y₂)).inv) ⊗ 𝟙 Y₃) ≫\n                ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ X₃) Y₁ Y₂).inv) ⊗ 𝟙 Y₃) ≫\n                  ((𝟙 X₁ ⊗ (β_ (X₂ ⊗ X₃) Y₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Y₃) ≫\n                    ((𝟙 X₁ ⊗ (α_ Y₁ X₂ X₃).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Y₃) ≫\n                      ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) X₃ Y₂).hom) ⊗ 𝟙 Y₃) ≫\n                        (α_ X₁ ((Y₁ ⊗ X₂) ⊗ X₃ ⊗ Y₂) Y₃).hom ≫\n                          (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (X₃ ⊗ Y₂) Y₃).hom) ≫\n                            ((((𝟙 X₁ ⊗ (α_ Y₁ X₂ ((X₃ ⊗ Y₂) ⊗ Y₃)).hom) ≫\n                                    (𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ 𝟙 X₂ ⊗ (β_ X₃ Y₂).hom ⊗ 𝟙 Y₃)) ≫\n                                  (α_ X₁ Y₁ (X₂ ⊗ (Y₂ ⊗ X₃) ⊗ Y₃)).inv) ≫\n                                (𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ Y₂ X₃ Y₃).hom)) ≫\n                              (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ Y₂ (X₃ ⊗ Y₃)).inv) =\n    ((α_ X₁ X₂ X₃).hom ⊗ (α_ Y₁ Y₂ Y₃).hom) ≫\n      tensor_μ C (X₁, X₂ ⊗ X₃) (Y₁, Y₂ ⊗ Y₃) ≫ (𝟙 (X₁ ⊗ Y₁) ⊗ tensor_μ C (X₂, X₃) (Y₂, Y₃))\n[PROOFSTEP]\nslice_lhs 14 15 => rw [associator_inv_naturality]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ 𝟙 X₂ ⊗ (β_ X₃ Y₂).hom ⊗ 𝟙 Y₃) ≫ (α_ X₁ Y₁ (X₂ ⊗ (Y₂ ⊗ X₃) ⊗ Y₃)).inv\ncase a.a.a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ Y₂ X₃ Y₃).hom\ncase a.a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ Y₂ (X₃ ⊗ Y₃)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ (X₁ ⊗ X₂) X₃ ((Y₁ ⊗ Y₂) ⊗ Y₃)).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ X₂) ⊗ (α_ X₃ (Y₁ ⊗ Y₂) Y₃).inv\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ X₂ ((X₃ ⊗ Y₁ ⊗ Y₂) ⊗ Y₃)).hom\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ X₂ (X₃ ⊗ Y₁ ⊗ Y₂) Y₃).inv\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ (X₂ ⊗ X₃ ⊗ Y₁ ⊗ Y₂) Y₃).inv\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ X₂ X₃ (Y₁ ⊗ Y₂)).inv) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ (X₂ ⊗ X₃) Y₁ Y₂).inv) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (β_ (X₂ ⊗ X₃) Y₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ Y₁ X₂ X₃).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) X₃ Y₂).hom) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ ((Y₁ ⊗ X₂) ⊗ X₃ ⊗ Y₂) Y₃).hom\ncase a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (X₃ ⊗ Y₂) Y₃).hom\ncase a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ Y₁ X₂ ((X₃ ⊗ Y₂) ⊗ Y₃)).hom\n[PROOFSTEP]\nrw [associator_inv_naturality]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ 𝟙 X₂ ⊗ (β_ X₃ Y₂).hom ⊗ 𝟙 Y₃) ≫ (α_ X₁ Y₁ (X₂ ⊗ (Y₂ ⊗ X₃) ⊗ Y₃)).inv\ncase a.a.a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ Y₂ X₃ Y₃).hom\ncase a.a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ Y₂ (X₃ ⊗ Y₃)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ (X₁ ⊗ X₂) X₃ ((Y₁ ⊗ Y₂) ⊗ Y₃)).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ X₂) ⊗ (α_ X₃ (Y₁ ⊗ Y₂) Y₃).inv\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ X₂ ((X₃ ⊗ Y₁ ⊗ Y₂) ⊗ Y₃)).hom\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ X₂ (X₃ ⊗ Y₁ ⊗ Y₂) Y₃).inv\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ (X₂ ⊗ X₃ ⊗ Y₁ ⊗ Y₂) Y₃).inv\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ X₂ X₃ (Y₁ ⊗ Y₂)).inv) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ (X₂ ⊗ X₃) Y₁ Y₂).inv) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (β_ (X₂ ⊗ X₃) Y₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ Y₁ X₂ X₃).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) X₃ Y₂).hom) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ ((Y₁ ⊗ X₂) ⊗ X₃ ⊗ Y₂) Y₃).hom\ncase a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (X₃ ⊗ Y₂) Y₃).hom\ncase a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ Y₁ X₂ ((X₃ ⊗ Y₂) ⊗ Y₃)).hom\n[PROOFSTEP]\nrw [associator_inv_naturality]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ 𝟙 Y₁ ⊗ 𝟙 X₂ ⊗ (β_ X₃ Y₂).hom ⊗ 𝟙 Y₃) ≫ (α_ X₁ Y₁ (X₂ ⊗ (Y₂ ⊗ X₃) ⊗ Y₃)).inv\ncase a.a.a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ Y₂ X₃ Y₃).hom\ncase a.a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ Y₂ (X₃ ⊗ Y₃)).inv\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ (X₁ ⊗ X₂) X₃ ((Y₁ ⊗ Y₂) ⊗ Y₃)).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ X₂) ⊗ (α_ X₃ (Y₁ ⊗ Y₂) Y₃).inv\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ X₂ ((X₃ ⊗ Y₁ ⊗ Y₂) ⊗ Y₃)).hom\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ X₂ (X₃ ⊗ Y₁ ⊗ Y₂) Y₃).inv\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ (X₂ ⊗ X₃ ⊗ Y₁ ⊗ Y₂) Y₃).inv\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ X₂ X₃ (Y₁ ⊗ Y₂)).inv) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ (X₂ ⊗ X₃) Y₁ Y₂).inv) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (β_ (X₂ ⊗ X₃) Y₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ Y₁ X₂ X₃).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) X₃ Y₂).hom) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ ((Y₁ ⊗ X₂) ⊗ X₃ ⊗ Y₂) Y₃).hom\ncase a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (X₃ ⊗ Y₂) Y₃).hom\ncase a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ Y₁ X₂ ((X₃ ⊗ Y₂) ⊗ Y₃)).hom\n[PROOFSTEP]\nrw [associator_inv_naturality]\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n⊢ (α_ (X₁ ⊗ X₂) X₃ ((Y₁ ⊗ Y₂) ⊗ Y₃)).hom ≫\n      (𝟙 (X₁ ⊗ X₂) ⊗ (α_ X₃ (Y₁ ⊗ Y₂) Y₃).inv) ≫\n        (α_ X₁ X₂ ((X₃ ⊗ Y₁ ⊗ Y₂) ⊗ Y₃)).hom ≫\n          (𝟙 X₁ ⊗ (α_ X₂ (X₃ ⊗ Y₁ ⊗ Y₂) Y₃).inv) ≫\n            (α_ X₁ (X₂ ⊗ X₃ ⊗ Y₁ ⊗ Y₂) Y₃).inv ≫\n              ((𝟙 X₁ ⊗ (α_ X₂ X₃ (Y₁ ⊗ Y₂)).inv) ⊗ 𝟙 Y₃) ≫\n                ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ X₃) Y₁ Y₂).inv) ⊗ 𝟙 Y₃) ≫\n                  ((𝟙 X₁ ⊗ (β_ (X₂ ⊗ X₃) Y₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Y₃) ≫\n                    ((𝟙 X₁ ⊗ (α_ Y₁ X₂ X₃).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Y₃) ≫\n                      ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) X₃ Y₂).hom) ⊗ 𝟙 Y₃) ≫\n                        (α_ X₁ ((Y₁ ⊗ X₂) ⊗ X₃ ⊗ Y₂) Y₃).hom ≫\n                          (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (X₃ ⊗ Y₂) Y₃).hom) ≫\n                            (𝟙 X₁ ⊗ (α_ Y₁ X₂ ((X₃ ⊗ Y₂) ⊗ Y₃)).hom) ≫\n                              (((α_ X₁ Y₁ (X₂ ⊗ (X₃ ⊗ Y₂) ⊗ Y₃)).inv ≫ ((𝟙 X₁ ⊗ 𝟙 Y₁) ⊗ 𝟙 X₂ ⊗ (β_ X₃ Y₂).hom ⊗ 𝟙 Y₃)) ≫\n                                  (𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ Y₂ X₃ Y₃).hom)) ≫\n                                (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ Y₂ (X₃ ⊗ Y₃)).inv) =\n    ((α_ X₁ X₂ X₃).hom ⊗ (α_ Y₁ Y₂ Y₃).hom) ≫\n      tensor_μ C (X₁, X₂ ⊗ X₃) (Y₁, Y₂ ⊗ Y₃) ≫ (𝟙 (X₁ ⊗ Y₁) ⊗ tensor_μ C (X₂, X₃) (Y₂, Y₃))\n[PROOFSTEP]\nslice_lhs 15 17 => rw [tensor_id, ← tensor_comp, ← tensor_comp, ← tensor_μ_def₂, tensor_comp, tensor_comp]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| ((𝟙 X₁ ⊗ 𝟙 Y₁) ⊗ 𝟙 X₂ ⊗ (β_ X₃ Y₂).hom ⊗ 𝟙 Y₃) ≫\n    (𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ Y₂ X₃ Y₃).hom) ≫ (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ Y₂ (X₃ ⊗ Y₃)).inv)\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ (X₁ ⊗ X₂) X₃ ((Y₁ ⊗ Y₂) ⊗ Y₃)).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ X₂) ⊗ (α_ X₃ (Y₁ ⊗ Y₂) Y₃).inv\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ X₂ ((X₃ ⊗ Y₁ ⊗ Y₂) ⊗ Y₃)).hom\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ X₂ (X₃ ⊗ Y₁ ⊗ Y₂) Y₃).inv\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ (X₂ ⊗ X₃ ⊗ Y₁ ⊗ Y₂) Y₃).inv\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ X₂ X₃ (Y₁ ⊗ Y₂)).inv) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ (X₂ ⊗ X₃) Y₁ Y₂).inv) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (β_ (X₂ ⊗ X₃) Y₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ Y₁ X₂ X₃).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) X₃ Y₂).hom) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ ((Y₁ ⊗ X₂) ⊗ X₃ ⊗ Y₂) Y₃).hom\ncase a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (X₃ ⊗ Y₂) Y₃).hom\ncase a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ Y₁ X₂ ((X₃ ⊗ Y₂) ⊗ Y₃)).hom\ncase a.a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ Y₁ (X₂ ⊗ (X₃ ⊗ Y₂) ⊗ Y₃)).inv\n[PROOFSTEP]\nrw [tensor_id, ← tensor_comp, ← tensor_comp, ← tensor_μ_def₂, tensor_comp, tensor_comp]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| ((𝟙 X₁ ⊗ 𝟙 Y₁) ⊗ 𝟙 X₂ ⊗ (β_ X₃ Y₂).hom ⊗ 𝟙 Y₃) ≫\n    (𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ Y₂ X₃ Y₃).hom) ≫ (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ Y₂ (X₃ ⊗ Y₃)).inv)\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ (X₁ ⊗ X₂) X₃ ((Y₁ ⊗ Y₂) ⊗ Y₃)).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ X₂) ⊗ (α_ X₃ (Y₁ ⊗ Y₂) Y₃).inv\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ X₂ ((X₃ ⊗ Y₁ ⊗ Y₂) ⊗ Y₃)).hom\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ X₂ (X₃ ⊗ Y₁ ⊗ Y₂) Y₃).inv\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ (X₂ ⊗ X₃ ⊗ Y₁ ⊗ Y₂) Y₃).inv\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ X₂ X₃ (Y₁ ⊗ Y₂)).inv) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ (X₂ ⊗ X₃) Y₁ Y₂).inv) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (β_ (X₂ ⊗ X₃) Y₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ Y₁ X₂ X₃).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) X₃ Y₂).hom) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ ((Y₁ ⊗ X₂) ⊗ X₃ ⊗ Y₂) Y₃).hom\ncase a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (X₃ ⊗ Y₂) Y₃).hom\ncase a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ Y₁ X₂ ((X₃ ⊗ Y₂) ⊗ Y₃)).hom\ncase a.a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ Y₁ (X₂ ⊗ (X₃ ⊗ Y₂) ⊗ Y₃)).inv\n[PROOFSTEP]\nrw [tensor_id, ← tensor_comp, ← tensor_comp, ← tensor_μ_def₂, tensor_comp, tensor_comp]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| ((𝟙 X₁ ⊗ 𝟙 Y₁) ⊗ 𝟙 X₂ ⊗ (β_ X₃ Y₂).hom ⊗ 𝟙 Y₃) ≫\n    (𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ Y₂ X₃ Y₃).hom) ≫ (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ Y₂ (X₃ ⊗ Y₃)).inv)\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ (X₁ ⊗ X₂) X₃ ((Y₁ ⊗ Y₂) ⊗ Y₃)).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ X₂) ⊗ (α_ X₃ (Y₁ ⊗ Y₂) Y₃).inv\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ X₂ ((X₃ ⊗ Y₁ ⊗ Y₂) ⊗ Y₃)).hom\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ X₂ (X₃ ⊗ Y₁ ⊗ Y₂) Y₃).inv\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ (X₂ ⊗ X₃ ⊗ Y₁ ⊗ Y₂) Y₃).inv\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ X₂ X₃ (Y₁ ⊗ Y₂)).inv) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ (X₂ ⊗ X₃) Y₁ Y₂).inv) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (β_ (X₂ ⊗ X₃) Y₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ Y₁ X₂ X₃).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) X₃ Y₂).hom) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ ((Y₁ ⊗ X₂) ⊗ X₃ ⊗ Y₂) Y₃).hom\ncase a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (X₃ ⊗ Y₂) Y₃).hom\ncase a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ Y₁ X₂ ((X₃ ⊗ Y₂) ⊗ Y₃)).hom\ncase a.a.a.a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ Y₁ (X₂ ⊗ (X₃ ⊗ Y₂) ⊗ Y₃)).inv\n[PROOFSTEP]\nrw [tensor_id, ← tensor_comp, ← tensor_comp, ← tensor_μ_def₂, tensor_comp, tensor_comp]\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n⊢ (α_ (X₁ ⊗ X₂) X₃ ((Y₁ ⊗ Y₂) ⊗ Y₃)).hom ≫\n      (𝟙 (X₁ ⊗ X₂) ⊗ (α_ X₃ (Y₁ ⊗ Y₂) Y₃).inv) ≫\n        (α_ X₁ X₂ ((X₃ ⊗ Y₁ ⊗ Y₂) ⊗ Y₃)).hom ≫\n          (𝟙 X₁ ⊗ (α_ X₂ (X₃ ⊗ Y₁ ⊗ Y₂) Y₃).inv) ≫\n            (α_ X₁ (X₂ ⊗ X₃ ⊗ Y₁ ⊗ Y₂) Y₃).inv ≫\n              ((𝟙 X₁ ⊗ (α_ X₂ X₃ (Y₁ ⊗ Y₂)).inv) ⊗ 𝟙 Y₃) ≫\n                ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ X₃) Y₁ Y₂).inv) ⊗ 𝟙 Y₃) ≫\n                  ((𝟙 X₁ ⊗ (β_ (X₂ ⊗ X₃) Y₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Y₃) ≫\n                    ((𝟙 X₁ ⊗ (α_ Y₁ X₂ X₃).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Y₃) ≫\n                      ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) X₃ Y₂).hom) ⊗ 𝟙 Y₃) ≫\n                        (α_ X₁ ((Y₁ ⊗ X₂) ⊗ X₃ ⊗ Y₂) Y₃).hom ≫\n                          (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (X₃ ⊗ Y₂) Y₃).hom) ≫\n                            (𝟙 X₁ ⊗ (α_ Y₁ X₂ ((X₃ ⊗ Y₂) ⊗ Y₃)).hom) ≫\n                              (α_ X₁ Y₁ (X₂ ⊗ (X₃ ⊗ Y₂) ⊗ Y₃)).inv ≫\n                                (𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ X₃ Y₂ Y₃).hom) ≫\n                                  (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ X₃ (Y₂ ⊗ Y₃)).inv) ≫\n                                    (𝟙 (X₁ ⊗ Y₁) ⊗ tensor_μ C (X₂, X₃) (Y₂, Y₃)) =\n    ((α_ X₁ X₂ X₃).hom ⊗ (α_ Y₁ Y₂ Y₃).hom) ≫\n      tensor_μ C (X₁, X₂ ⊗ X₃) (Y₁, Y₂ ⊗ Y₃) ≫ (𝟙 (X₁ ⊗ Y₁) ⊗ tensor_μ C (X₂, X₃) (Y₂, Y₃))\n[PROOFSTEP]\nhave :\n  ((𝟙 X₁ ⊗ (α_ Y₁ X₂ X₃).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Y₃) ≫\n      ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) X₃ Y₂).hom) ⊗ 𝟙 Y₃) ≫\n        (α_ X₁ ((Y₁ ⊗ X₂) ⊗ X₃ ⊗ Y₂) Y₃).hom ≫\n          (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (X₃ ⊗ Y₂) Y₃).hom) ≫\n            (𝟙 X₁ ⊗ (α_ Y₁ X₂ ((X₃ ⊗ Y₂) ⊗ Y₃)).hom) ≫\n              (α_ X₁ Y₁ (X₂ ⊗ (X₃ ⊗ Y₂) ⊗ Y₃)).inv ≫\n                (𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ X₃ Y₂ Y₃).hom) ≫ (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ X₃ (Y₂ ⊗ Y₃)).inv) =\n    (α_ X₁ ((Y₁ ⊗ X₂ ⊗ X₃) ⊗ Y₂) Y₃).hom ≫\n      (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂ ⊗ X₃) Y₂ Y₃).hom) ≫\n        (𝟙 X₁ ⊗ (α_ Y₁ (X₂ ⊗ X₃) (Y₂ ⊗ Y₃)).hom) ≫ (α_ X₁ Y₁ ((X₂ ⊗ X₃) ⊗ Y₂ ⊗ Y₃)).inv :=\n  by pure_coherence\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n⊢ ((𝟙 X₁ ⊗ (α_ Y₁ X₂ X₃).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Y₃) ≫\n      ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) X₃ Y₂).hom) ⊗ 𝟙 Y₃) ≫\n        (α_ X₁ ((Y₁ ⊗ X₂) ⊗ X₃ ⊗ Y₂) Y₃).hom ≫\n          (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (X₃ ⊗ Y₂) Y₃).hom) ≫\n            (𝟙 X₁ ⊗ (α_ Y₁ X₂ ((X₃ ⊗ Y₂) ⊗ Y₃)).hom) ≫\n              (α_ X₁ Y₁ (X₂ ⊗ (X₃ ⊗ Y₂) ⊗ Y₃)).inv ≫\n                (𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ X₃ Y₂ Y₃).hom) ≫ (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ X₃ (Y₂ ⊗ Y₃)).inv) =\n    (α_ X₁ ((Y₁ ⊗ X₂ ⊗ X₃) ⊗ Y₂) Y₃).hom ≫\n      (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂ ⊗ X₃) Y₂ Y₃).hom) ≫\n        (𝟙 X₁ ⊗ (α_ Y₁ (X₂ ⊗ X₃) (Y₂ ⊗ Y₃)).hom) ≫ (α_ X₁ Y₁ ((X₂ ⊗ X₃) ⊗ Y₂ ⊗ Y₃)).inv\n[PROOFSTEP]\npure_coherence\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\nthis :\n  ((𝟙 X₁ ⊗ (α_ Y₁ X₂ X₃).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Y₃) ≫\n      ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) X₃ Y₂).hom) ⊗ 𝟙 Y₃) ≫\n        (α_ X₁ ((Y₁ ⊗ X₂) ⊗ X₃ ⊗ Y₂) Y₃).hom ≫\n          (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (X₃ ⊗ Y₂) Y₃).hom) ≫\n            (𝟙 X₁ ⊗ (α_ Y₁ X₂ ((X₃ ⊗ Y₂) ⊗ Y₃)).hom) ≫\n              (α_ X₁ Y₁ (X₂ ⊗ (X₃ ⊗ Y₂) ⊗ Y₃)).inv ≫\n                (𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ X₃ Y₂ Y₃).hom) ≫ (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ X₃ (Y₂ ⊗ Y₃)).inv) =\n    (α_ X₁ ((Y₁ ⊗ X₂ ⊗ X₃) ⊗ Y₂) Y₃).hom ≫\n      (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂ ⊗ X₃) Y₂ Y₃).hom) ≫\n        (𝟙 X₁ ⊗ (α_ Y₁ (X₂ ⊗ X₃) (Y₂ ⊗ Y₃)).hom) ≫ (α_ X₁ Y₁ ((X₂ ⊗ X₃) ⊗ Y₂ ⊗ Y₃)).inv\n⊢ (α_ (X₁ ⊗ X₂) X₃ ((Y₁ ⊗ Y₂) ⊗ Y₃)).hom ≫\n      (𝟙 (X₁ ⊗ X₂) ⊗ (α_ X₃ (Y₁ ⊗ Y₂) Y₃).inv) ≫\n        (α_ X₁ X₂ ((X₃ ⊗ Y₁ ⊗ Y₂) ⊗ Y₃)).hom ≫\n          (𝟙 X₁ ⊗ (α_ X₂ (X₃ ⊗ Y₁ ⊗ Y₂) Y₃).inv) ≫\n            (α_ X₁ (X₂ ⊗ X₃ ⊗ Y₁ ⊗ Y₂) Y₃).inv ≫\n              ((𝟙 X₁ ⊗ (α_ X₂ X₃ (Y₁ ⊗ Y₂)).inv) ⊗ 𝟙 Y₃) ≫\n                ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ X₃) Y₁ Y₂).inv) ⊗ 𝟙 Y₃) ≫\n                  ((𝟙 X₁ ⊗ (β_ (X₂ ⊗ X₃) Y₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Y₃) ≫\n                    ((𝟙 X₁ ⊗ (α_ Y₁ X₂ X₃).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Y₃) ≫\n                      ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) X₃ Y₂).hom) ⊗ 𝟙 Y₃) ≫\n                        (α_ X₁ ((Y₁ ⊗ X₂) ⊗ X₃ ⊗ Y₂) Y₃).hom ≫\n                          (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (X₃ ⊗ Y₂) Y₃).hom) ≫\n                            (𝟙 X₁ ⊗ (α_ Y₁ X₂ ((X₃ ⊗ Y₂) ⊗ Y₃)).hom) ≫\n                              (α_ X₁ Y₁ (X₂ ⊗ (X₃ ⊗ Y₂) ⊗ Y₃)).inv ≫\n                                (𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ X₃ Y₂ Y₃).hom) ≫\n                                  (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ X₃ (Y₂ ⊗ Y₃)).inv) ≫\n                                    (𝟙 (X₁ ⊗ Y₁) ⊗ tensor_μ C (X₂, X₃) (Y₂, Y₃)) =\n    ((α_ X₁ X₂ X₃).hom ⊗ (α_ Y₁ Y₂ Y₃).hom) ≫\n      tensor_μ C (X₁, X₂ ⊗ X₃) (Y₁, Y₂ ⊗ Y₃) ≫ (𝟙 (X₁ ⊗ Y₁) ⊗ tensor_μ C (X₂, X₃) (Y₂, Y₃))\n[PROOFSTEP]\nslice_lhs 9 16 => rw [this]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\nthis :\n  ((𝟙 X₁ ⊗ (α_ Y₁ X₂ X₃).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Y₃) ≫\n      ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) X₃ Y₂).hom) ⊗ 𝟙 Y₃) ≫\n        (α_ X₁ ((Y₁ ⊗ X₂) ⊗ X₃ ⊗ Y₂) Y₃).hom ≫\n          (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (X₃ ⊗ Y₂) Y₃).hom) ≫\n            (𝟙 X₁ ⊗ (α_ Y₁ X₂ ((X₃ ⊗ Y₂) ⊗ Y₃)).hom) ≫\n              (α_ X₁ Y₁ (X₂ ⊗ (X₃ ⊗ Y₂) ⊗ Y₃)).inv ≫\n                (𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ X₃ Y₂ Y₃).hom) ≫ (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ X₃ (Y₂ ⊗ Y₃)).inv) =\n    (α_ X₁ ((Y₁ ⊗ X₂ ⊗ X₃) ⊗ Y₂) Y₃).hom ≫\n      (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂ ⊗ X₃) Y₂ Y₃).hom) ≫\n        (𝟙 X₁ ⊗ (α_ Y₁ (X₂ ⊗ X₃) (Y₂ ⊗ Y₃)).hom) ≫ (α_ X₁ Y₁ ((X₂ ⊗ X₃) ⊗ Y₂ ⊗ Y₃)).inv\n| ((𝟙 X₁ ⊗ (α_ Y₁ X₂ X₃).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Y₃) ≫\n    ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) X₃ Y₂).hom) ⊗ 𝟙 Y₃) ≫\n      (α_ X₁ ((Y₁ ⊗ X₂) ⊗ X₃ ⊗ Y₂) Y₃).hom ≫\n        (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (X₃ ⊗ Y₂) Y₃).hom) ≫\n          (𝟙 X₁ ⊗ (α_ Y₁ X₂ ((X₃ ⊗ Y₂) ⊗ Y₃)).hom) ≫\n            (α_ X₁ Y₁ (X₂ ⊗ (X₃ ⊗ Y₂) ⊗ Y₃)).inv ≫\n              (𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ X₃ Y₂ Y₃).hom) ≫ (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ X₃ (Y₂ ⊗ Y₃)).inv)\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\nthis :\n  ((𝟙 X₁ ⊗ (α_ Y₁ X₂ X₃).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Y₃) ≫\n      ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) X₃ Y₂).hom) ⊗ 𝟙 Y₃) ≫\n        (α_ X₁ ((Y₁ ⊗ X₂) ⊗ X₃ ⊗ Y₂) Y₃).hom ≫\n          (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (X₃ ⊗ Y₂) Y₃).hom) ≫\n            (𝟙 X₁ ⊗ (α_ Y₁ X₂ ((X₃ ⊗ Y₂) ⊗ Y₃)).hom) ≫\n              (α_ X₁ Y₁ (X₂ ⊗ (X₃ ⊗ Y₂) ⊗ Y₃)).inv ≫\n                (𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ X₃ Y₂ Y₃).hom) ≫ (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ X₃ (Y₂ ⊗ Y₃)).inv) =\n    (α_ X₁ ((Y₁ ⊗ X₂ ⊗ X₃) ⊗ Y₂) Y₃).hom ≫\n      (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂ ⊗ X₃) Y₂ Y₃).hom) ≫\n        (𝟙 X₁ ⊗ (α_ Y₁ (X₂ ⊗ X₃) (Y₂ ⊗ Y₃)).hom) ≫ (α_ X₁ Y₁ ((X₂ ⊗ X₃) ⊗ Y₂ ⊗ Y₃)).inv\n| 𝟙 (X₁ ⊗ Y₁) ⊗ tensor_μ C (X₂, X₃) (Y₂, Y₃)\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\nthis :\n  ((𝟙 X₁ ⊗ (α_ Y₁ X₂ X₃).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Y₃) ≫\n      ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) X₃ Y₂).hom) ⊗ 𝟙 Y₃) ≫\n        (α_ X₁ ((Y₁ ⊗ X₂) ⊗ X₃ ⊗ Y₂) Y₃).hom ≫\n          (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (X₃ ⊗ Y₂) Y₃).hom) ≫\n            (𝟙 X₁ ⊗ (α_ Y₁ X₂ ((X₃ ⊗ Y₂) ⊗ Y₃)).hom) ≫\n              (α_ X₁ Y₁ (X₂ ⊗ (X₃ ⊗ Y₂) ⊗ Y₃)).inv ≫\n                (𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ X₃ Y₂ Y₃).hom) ≫ (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ X₃ (Y₂ ⊗ Y₃)).inv) =\n    (α_ X₁ ((Y₁ ⊗ X₂ ⊗ X₃) ⊗ Y₂) Y₃).hom ≫\n      (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂ ⊗ X₃) Y₂ Y₃).hom) ≫\n        (𝟙 X₁ ⊗ (α_ Y₁ (X₂ ⊗ X₃) (Y₂ ⊗ Y₃)).hom) ≫ (α_ X₁ Y₁ ((X₂ ⊗ X₃) ⊗ Y₂ ⊗ Y₃)).inv\n| (α_ (X₁ ⊗ X₂) X₃ ((Y₁ ⊗ Y₂) ⊗ Y₃)).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\nthis :\n  ((𝟙 X₁ ⊗ (α_ Y₁ X₂ X₃).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Y₃) ≫\n      ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) X₃ Y₂).hom) ⊗ 𝟙 Y₃) ≫\n        (α_ X₁ ((Y₁ ⊗ X₂) ⊗ X₃ ⊗ Y₂) Y₃).hom ≫\n          (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (X₃ ⊗ Y₂) Y₃).hom) ≫\n            (𝟙 X₁ ⊗ (α_ Y₁ X₂ ((X₃ ⊗ Y₂) ⊗ Y₃)).hom) ≫\n              (α_ X₁ Y₁ (X₂ ⊗ (X₃ ⊗ Y₂) ⊗ Y₃)).inv ≫\n                (𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ X₃ Y₂ Y₃).hom) ≫ (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ X₃ (Y₂ ⊗ Y₃)).inv) =\n    (α_ X₁ ((Y₁ ⊗ X₂ ⊗ X₃) ⊗ Y₂) Y₃).hom ≫\n      (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂ ⊗ X₃) Y₂ Y₃).hom) ≫\n        (𝟙 X₁ ⊗ (α_ Y₁ (X₂ ⊗ X₃) (Y₂ ⊗ Y₃)).hom) ≫ (α_ X₁ Y₁ ((X₂ ⊗ X₃) ⊗ Y₂ ⊗ Y₃)).inv\n| 𝟙 (X₁ ⊗ X₂) ⊗ (α_ X₃ (Y₁ ⊗ Y₂) Y₃).inv\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\nthis :\n  ((𝟙 X₁ ⊗ (α_ Y₁ X₂ X₃).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Y₃) ≫\n      ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) X₃ Y₂).hom) ⊗ 𝟙 Y₃) ≫\n        (α_ X₁ ((Y₁ ⊗ X₂) ⊗ X₃ ⊗ Y₂) Y₃).hom ≫\n          (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (X₃ ⊗ Y₂) Y₃).hom) ≫\n            (𝟙 X₁ ⊗ (α_ Y₁ X₂ ((X₃ ⊗ Y₂) ⊗ Y₃)).hom) ≫\n              (α_ X₁ Y₁ (X₂ ⊗ (X₃ ⊗ Y₂) ⊗ Y₃)).inv ≫\n                (𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ X₃ Y₂ Y₃).hom) ≫ (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ X₃ (Y₂ ⊗ Y₃)).inv) =\n    (α_ X₁ ((Y₁ ⊗ X₂ ⊗ X₃) ⊗ Y₂) Y₃).hom ≫\n      (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂ ⊗ X₃) Y₂ Y₃).hom) ≫\n        (𝟙 X₁ ⊗ (α_ Y₁ (X₂ ⊗ X₃) (Y₂ ⊗ Y₃)).hom) ≫ (α_ X₁ Y₁ ((X₂ ⊗ X₃) ⊗ Y₂ ⊗ Y₃)).inv\n| (α_ X₁ X₂ ((X₃ ⊗ Y₁ ⊗ Y₂) ⊗ Y₃)).hom\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\nthis :\n  ((𝟙 X₁ ⊗ (α_ Y₁ X₂ X₃).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Y₃) ≫\n      ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) X₃ Y₂).hom) ⊗ 𝟙 Y₃) ≫\n        (α_ X₁ ((Y₁ ⊗ X₂) ⊗ X₃ ⊗ Y₂) Y₃).hom ≫\n          (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (X₃ ⊗ Y₂) Y₃).hom) ≫\n            (𝟙 X₁ ⊗ (α_ Y₁ X₂ ((X₃ ⊗ Y₂) ⊗ Y₃)).hom) ≫\n              (α_ X₁ Y₁ (X₂ ⊗ (X₃ ⊗ Y₂) ⊗ Y₃)).inv ≫\n                (𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ X₃ Y₂ Y₃).hom) ≫ (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ X₃ (Y₂ ⊗ Y₃)).inv) =\n    (α_ X₁ ((Y₁ ⊗ X₂ ⊗ X₃) ⊗ Y₂) Y₃).hom ≫\n      (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂ ⊗ X₃) Y₂ Y₃).hom) ≫\n        (𝟙 X₁ ⊗ (α_ Y₁ (X₂ ⊗ X₃) (Y₂ ⊗ Y₃)).hom) ≫ (α_ X₁ Y₁ ((X₂ ⊗ X₃) ⊗ Y₂ ⊗ Y₃)).inv\n| 𝟙 X₁ ⊗ (α_ X₂ (X₃ ⊗ Y₁ ⊗ Y₂) Y₃).inv\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\nthis :\n  ((𝟙 X₁ ⊗ (α_ Y₁ X₂ X₃).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Y₃) ≫\n      ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) X₃ Y₂).hom) ⊗ 𝟙 Y₃) ≫\n        (α_ X₁ ((Y₁ ⊗ X₂) ⊗ X₃ ⊗ Y₂) Y₃).hom ≫\n          (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (X₃ ⊗ Y₂) Y₃).hom) ≫\n            (𝟙 X₁ ⊗ (α_ Y₁ X₂ ((X₃ ⊗ Y₂) ⊗ Y₃)).hom) ≫\n              (α_ X₁ Y₁ (X₂ ⊗ (X₃ ⊗ Y₂) ⊗ Y₃)).inv ≫\n                (𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ X₃ Y₂ Y₃).hom) ≫ (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ X₃ (Y₂ ⊗ Y₃)).inv) =\n    (α_ X₁ ((Y₁ ⊗ X₂ ⊗ X₃) ⊗ Y₂) Y₃).hom ≫\n      (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂ ⊗ X₃) Y₂ Y₃).hom) ≫\n        (𝟙 X₁ ⊗ (α_ Y₁ (X₂ ⊗ X₃) (Y₂ ⊗ Y₃)).hom) ≫ (α_ X₁ Y₁ ((X₂ ⊗ X₃) ⊗ Y₂ ⊗ Y₃)).inv\n| (α_ X₁ (X₂ ⊗ X₃ ⊗ Y₁ ⊗ Y₂) Y₃).inv\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\nthis :\n  ((𝟙 X₁ ⊗ (α_ Y₁ X₂ X₃).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Y₃) ≫\n      ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) X₃ Y₂).hom) ⊗ 𝟙 Y₃) ≫\n        (α_ X₁ ((Y₁ ⊗ X₂) ⊗ X₃ ⊗ Y₂) Y₃).hom ≫\n          (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (X₃ ⊗ Y₂) Y₃).hom) ≫\n            (𝟙 X₁ ⊗ (α_ Y₁ X₂ ((X₃ ⊗ Y₂) ⊗ Y₃)).hom) ≫\n              (α_ X₁ Y₁ (X₂ ⊗ (X₃ ⊗ Y₂) ⊗ Y₃)).inv ≫\n                (𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ X₃ Y₂ Y₃).hom) ≫ (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ X₃ (Y₂ ⊗ Y₃)).inv) =\n    (α_ X₁ ((Y₁ ⊗ X₂ ⊗ X₃) ⊗ Y₂) Y₃).hom ≫\n      (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂ ⊗ X₃) Y₂ Y₃).hom) ≫\n        (𝟙 X₁ ⊗ (α_ Y₁ (X₂ ⊗ X₃) (Y₂ ⊗ Y₃)).hom) ≫ (α_ X₁ Y₁ ((X₂ ⊗ X₃) ⊗ Y₂ ⊗ Y₃)).inv\n| (𝟙 X₁ ⊗ (α_ X₂ X₃ (Y₁ ⊗ Y₂)).inv) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\nthis :\n  ((𝟙 X₁ ⊗ (α_ Y₁ X₂ X₃).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Y₃) ≫\n      ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) X₃ Y₂).hom) ⊗ 𝟙 Y₃) ≫\n        (α_ X₁ ((Y₁ ⊗ X₂) ⊗ X₃ ⊗ Y₂) Y₃).hom ≫\n          (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (X₃ ⊗ Y₂) Y₃).hom) ≫\n            (𝟙 X₁ ⊗ (α_ Y₁ X₂ ((X₃ ⊗ Y₂) ⊗ Y₃)).hom) ≫\n              (α_ X₁ Y₁ (X₂ ⊗ (X₃ ⊗ Y₂) ⊗ Y₃)).inv ≫\n                (𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ X₃ Y₂ Y₃).hom) ≫ (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ X₃ (Y₂ ⊗ Y₃)).inv) =\n    (α_ X₁ ((Y₁ ⊗ X₂ ⊗ X₃) ⊗ Y₂) Y₃).hom ≫\n      (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂ ⊗ X₃) Y₂ Y₃).hom) ≫\n        (𝟙 X₁ ⊗ (α_ Y₁ (X₂ ⊗ X₃) (Y₂ ⊗ Y₃)).hom) ≫ (α_ X₁ Y₁ ((X₂ ⊗ X₃) ⊗ Y₂ ⊗ Y₃)).inv\n| (𝟙 X₁ ⊗ (α_ (X₂ ⊗ X₃) Y₁ Y₂).inv) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\nthis :\n  ((𝟙 X₁ ⊗ (α_ Y₁ X₂ X₃).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Y₃) ≫\n      ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) X₃ Y₂).hom) ⊗ 𝟙 Y₃) ≫\n        (α_ X₁ ((Y₁ ⊗ X₂) ⊗ X₃ ⊗ Y₂) Y₃).hom ≫\n          (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (X₃ ⊗ Y₂) Y₃).hom) ≫\n            (𝟙 X₁ ⊗ (α_ Y₁ X₂ ((X₃ ⊗ Y₂) ⊗ Y₃)).hom) ≫\n              (α_ X₁ Y₁ (X₂ ⊗ (X₃ ⊗ Y₂) ⊗ Y₃)).inv ≫\n                (𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ X₃ Y₂ Y₃).hom) ≫ (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ X₃ (Y₂ ⊗ Y₃)).inv) =\n    (α_ X₁ ((Y₁ ⊗ X₂ ⊗ X₃) ⊗ Y₂) Y₃).hom ≫\n      (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂ ⊗ X₃) Y₂ Y₃).hom) ≫\n        (𝟙 X₁ ⊗ (α_ Y₁ (X₂ ⊗ X₃) (Y₂ ⊗ Y₃)).hom) ≫ (α_ X₁ Y₁ ((X₂ ⊗ X₃) ⊗ Y₂ ⊗ Y₃)).inv\n| (𝟙 X₁ ⊗ (β_ (X₂ ⊗ X₃) Y₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Y₃\n[PROOFSTEP]\nrw [this]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\nthis :\n  ((𝟙 X₁ ⊗ (α_ Y₁ X₂ X₃).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Y₃) ≫\n      ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) X₃ Y₂).hom) ⊗ 𝟙 Y₃) ≫\n        (α_ X₁ ((Y₁ ⊗ X₂) ⊗ X₃ ⊗ Y₂) Y₃).hom ≫\n          (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (X₃ ⊗ Y₂) Y₃).hom) ≫\n            (𝟙 X₁ ⊗ (α_ Y₁ X₂ ((X₃ ⊗ Y₂) ⊗ Y₃)).hom) ≫\n              (α_ X₁ Y₁ (X₂ ⊗ (X₃ ⊗ Y₂) ⊗ Y₃)).inv ≫\n                (𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ X₃ Y₂ Y₃).hom) ≫ (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ X₃ (Y₂ ⊗ Y₃)).inv) =\n    (α_ X₁ ((Y₁ ⊗ X₂ ⊗ X₃) ⊗ Y₂) Y₃).hom ≫\n      (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂ ⊗ X₃) Y₂ Y₃).hom) ≫\n        (𝟙 X₁ ⊗ (α_ Y₁ (X₂ ⊗ X₃) (Y₂ ⊗ Y₃)).hom) ≫ (α_ X₁ Y₁ ((X₂ ⊗ X₃) ⊗ Y₂ ⊗ Y₃)).inv\n| ((𝟙 X₁ ⊗ (α_ Y₁ X₂ X₃).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Y₃) ≫\n    ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) X₃ Y₂).hom) ⊗ 𝟙 Y₃) ≫\n      (α_ X₁ ((Y₁ ⊗ X₂) ⊗ X₃ ⊗ Y₂) Y₃).hom ≫\n        (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (X₃ ⊗ Y₂) Y₃).hom) ≫\n          (𝟙 X₁ ⊗ (α_ Y₁ X₂ ((X₃ ⊗ Y₂) ⊗ Y₃)).hom) ≫\n            (α_ X₁ Y₁ (X₂ ⊗ (X₃ ⊗ Y₂) ⊗ Y₃)).inv ≫\n              (𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ X₃ Y₂ Y₃).hom) ≫ (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ X₃ (Y₂ ⊗ Y₃)).inv)\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\nthis :\n  ((𝟙 X₁ ⊗ (α_ Y₁ X₂ X₃).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Y₃) ≫\n      ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) X₃ Y₂).hom) ⊗ 𝟙 Y₃) ≫\n        (α_ X₁ ((Y₁ ⊗ X₂) ⊗ X₃ ⊗ Y₂) Y₃).hom ≫\n          (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (X₃ ⊗ Y₂) Y₃).hom) ≫\n            (𝟙 X₁ ⊗ (α_ Y₁ X₂ ((X₃ ⊗ Y₂) ⊗ Y₃)).hom) ≫\n              (α_ X₁ Y₁ (X₂ ⊗ (X₃ ⊗ Y₂) ⊗ Y₃)).inv ≫\n                (𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ X₃ Y₂ Y₃).hom) ≫ (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ X₃ (Y₂ ⊗ Y₃)).inv) =\n    (α_ X₁ ((Y₁ ⊗ X₂ ⊗ X₃) ⊗ Y₂) Y₃).hom ≫\n      (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂ ⊗ X₃) Y₂ Y₃).hom) ≫\n        (𝟙 X₁ ⊗ (α_ Y₁ (X₂ ⊗ X₃) (Y₂ ⊗ Y₃)).hom) ≫ (α_ X₁ Y₁ ((X₂ ⊗ X₃) ⊗ Y₂ ⊗ Y₃)).inv\n| 𝟙 (X₁ ⊗ Y₁) ⊗ tensor_μ C (X₂, X₃) (Y₂, Y₃)\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\nthis :\n  ((𝟙 X₁ ⊗ (α_ Y₁ X₂ X₃).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Y₃) ≫\n      ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) X₃ Y₂).hom) ⊗ 𝟙 Y₃) ≫\n        (α_ X₁ ((Y₁ ⊗ X₂) ⊗ X₃ ⊗ Y₂) Y₃).hom ≫\n          (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (X₃ ⊗ Y₂) Y₃).hom) ≫\n            (𝟙 X₁ ⊗ (α_ Y₁ X₂ ((X₃ ⊗ Y₂) ⊗ Y₃)).hom) ≫\n              (α_ X₁ Y₁ (X₂ ⊗ (X₃ ⊗ Y₂) ⊗ Y₃)).inv ≫\n                (𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ X₃ Y₂ Y₃).hom) ≫ (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ X₃ (Y₂ ⊗ Y₃)).inv) =\n    (α_ X₁ ((Y₁ ⊗ X₂ ⊗ X₃) ⊗ Y₂) Y₃).hom ≫\n      (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂ ⊗ X₃) Y₂ Y₃).hom) ≫\n        (𝟙 X₁ ⊗ (α_ Y₁ (X₂ ⊗ X₃) (Y₂ ⊗ Y₃)).hom) ≫ (α_ X₁ Y₁ ((X₂ ⊗ X₃) ⊗ Y₂ ⊗ Y₃)).inv\n| (α_ (X₁ ⊗ X₂) X₃ ((Y₁ ⊗ Y₂) ⊗ Y₃)).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\nthis :\n  ((𝟙 X₁ ⊗ (α_ Y₁ X₂ X₃).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Y₃) ≫\n      ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) X₃ Y₂).hom) ⊗ 𝟙 Y₃) ≫\n        (α_ X₁ ((Y₁ ⊗ X₂) ⊗ X₃ ⊗ Y₂) Y₃).hom ≫\n          (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (X₃ ⊗ Y₂) Y₃).hom) ≫\n            (𝟙 X₁ ⊗ (α_ Y₁ X₂ ((X₃ ⊗ Y₂) ⊗ Y₃)).hom) ≫\n              (α_ X₁ Y₁ (X₂ ⊗ (X₃ ⊗ Y₂) ⊗ Y₃)).inv ≫\n                (𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ X₃ Y₂ Y₃).hom) ≫ (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ X₃ (Y₂ ⊗ Y₃)).inv) =\n    (α_ X₁ ((Y₁ ⊗ X₂ ⊗ X₃) ⊗ Y₂) Y₃).hom ≫\n      (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂ ⊗ X₃) Y₂ Y₃).hom) ≫\n        (𝟙 X₁ ⊗ (α_ Y₁ (X₂ ⊗ X₃) (Y₂ ⊗ Y₃)).hom) ≫ (α_ X₁ Y₁ ((X₂ ⊗ X₃) ⊗ Y₂ ⊗ Y₃)).inv\n| 𝟙 (X₁ ⊗ X₂) ⊗ (α_ X₃ (Y₁ ⊗ Y₂) Y₃).inv\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\nthis :\n  ((𝟙 X₁ ⊗ (α_ Y₁ X₂ X₃).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Y₃) ≫\n      ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) X₃ Y₂).hom) ⊗ 𝟙 Y₃) ≫\n        (α_ X₁ ((Y₁ ⊗ X₂) ⊗ X₃ ⊗ Y₂) Y₃).hom ≫\n          (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (X₃ ⊗ Y₂) Y₃).hom) ≫\n            (𝟙 X₁ ⊗ (α_ Y₁ X₂ ((X₃ ⊗ Y₂) ⊗ Y₃)).hom) ≫\n              (α_ X₁ Y₁ (X₂ ⊗ (X₃ ⊗ Y₂) ⊗ Y₃)).inv ≫\n                (𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ X₃ Y₂ Y₃).hom) ≫ (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ X₃ (Y₂ ⊗ Y₃)).inv) =\n    (α_ X₁ ((Y₁ ⊗ X₂ ⊗ X₃) ⊗ Y₂) Y₃).hom ≫\n      (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂ ⊗ X₃) Y₂ Y₃).hom) ≫\n        (𝟙 X₁ ⊗ (α_ Y₁ (X₂ ⊗ X₃) (Y₂ ⊗ Y₃)).hom) ≫ (α_ X₁ Y₁ ((X₂ ⊗ X₃) ⊗ Y₂ ⊗ Y₃)).inv\n| (α_ X₁ X₂ ((X₃ ⊗ Y₁ ⊗ Y₂) ⊗ Y₃)).hom\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\nthis :\n  ((𝟙 X₁ ⊗ (α_ Y₁ X₂ X₃).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Y₃) ≫\n      ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) X₃ Y₂).hom) ⊗ 𝟙 Y₃) ≫\n        (α_ X₁ ((Y₁ ⊗ X₂) ⊗ X₃ ⊗ Y₂) Y₃).hom ≫\n          (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (X₃ ⊗ Y₂) Y₃).hom) ≫\n            (𝟙 X₁ ⊗ (α_ Y₁ X₂ ((X₃ ⊗ Y₂) ⊗ Y₃)).hom) ≫\n              (α_ X₁ Y₁ (X₂ ⊗ (X₃ ⊗ Y₂) ⊗ Y₃)).inv ≫\n                (𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ X₃ Y₂ Y₃).hom) ≫ (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ X₃ (Y₂ ⊗ Y₃)).inv) =\n    (α_ X₁ ((Y₁ ⊗ X₂ ⊗ X₃) ⊗ Y₂) Y₃).hom ≫\n      (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂ ⊗ X₃) Y₂ Y₃).hom) ≫\n        (𝟙 X₁ ⊗ (α_ Y₁ (X₂ ⊗ X₃) (Y₂ ⊗ Y₃)).hom) ≫ (α_ X₁ Y₁ ((X₂ ⊗ X₃) ⊗ Y₂ ⊗ Y₃)).inv\n| 𝟙 X₁ ⊗ (α_ X₂ (X₃ ⊗ Y₁ ⊗ Y₂) Y₃).inv\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\nthis :\n  ((𝟙 X₁ ⊗ (α_ Y₁ X₂ X₃).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Y₃) ≫\n      ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) X₃ Y₂).hom) ⊗ 𝟙 Y₃) ≫\n        (α_ X₁ ((Y₁ ⊗ X₂) ⊗ X₃ ⊗ Y₂) Y₃).hom ≫\n          (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (X₃ ⊗ Y₂) Y₃).hom) ≫\n            (𝟙 X₁ ⊗ (α_ Y₁ X₂ ((X₃ ⊗ Y₂) ⊗ Y₃)).hom) ≫\n              (α_ X₁ Y₁ (X₂ ⊗ (X₃ ⊗ Y₂) ⊗ Y₃)).inv ≫\n                (𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ X₃ Y₂ Y₃).hom) ≫ (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ X₃ (Y₂ ⊗ Y₃)).inv) =\n    (α_ X₁ ((Y₁ ⊗ X₂ ⊗ X₃) ⊗ Y₂) Y₃).hom ≫\n      (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂ ⊗ X₃) Y₂ Y₃).hom) ≫\n        (𝟙 X₁ ⊗ (α_ Y₁ (X₂ ⊗ X₃) (Y₂ ⊗ Y₃)).hom) ≫ (α_ X₁ Y₁ ((X₂ ⊗ X₃) ⊗ Y₂ ⊗ Y₃)).inv\n| (α_ X₁ (X₂ ⊗ X₃ ⊗ Y₁ ⊗ Y₂) Y₃).inv\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\nthis :\n  ((𝟙 X₁ ⊗ (α_ Y₁ X₂ X₃).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Y₃) ≫\n      ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) X₃ Y₂).hom) ⊗ 𝟙 Y₃) ≫\n        (α_ X₁ ((Y₁ ⊗ X₂) ⊗ X₃ ⊗ Y₂) Y₃).hom ≫\n          (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (X₃ ⊗ Y₂) Y₃).hom) ≫\n            (𝟙 X₁ ⊗ (α_ Y₁ X₂ ((X₃ ⊗ Y₂) ⊗ Y₃)).hom) ≫\n              (α_ X₁ Y₁ (X₂ ⊗ (X₃ ⊗ Y₂) ⊗ Y₃)).inv ≫\n                (𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ X₃ Y₂ Y₃).hom) ≫ (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ X₃ (Y₂ ⊗ Y₃)).inv) =\n    (α_ X₁ ((Y₁ ⊗ X₂ ⊗ X₃) ⊗ Y₂) Y₃).hom ≫\n      (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂ ⊗ X₃) Y₂ Y₃).hom) ≫\n        (𝟙 X₁ ⊗ (α_ Y₁ (X₂ ⊗ X₃) (Y₂ ⊗ Y₃)).hom) ≫ (α_ X₁ Y₁ ((X₂ ⊗ X₃) ⊗ Y₂ ⊗ Y₃)).inv\n| (𝟙 X₁ ⊗ (α_ X₂ X₃ (Y₁ ⊗ Y₂)).inv) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\nthis :\n  ((𝟙 X₁ ⊗ (α_ Y₁ X₂ X₃).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Y₃) ≫\n      ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) X₃ Y₂).hom) ⊗ 𝟙 Y₃) ≫\n        (α_ X₁ ((Y₁ ⊗ X₂) ⊗ X₃ ⊗ Y₂) Y₃).hom ≫\n          (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (X₃ ⊗ Y₂) Y₃).hom) ≫\n            (𝟙 X₁ ⊗ (α_ Y₁ X₂ ((X₃ ⊗ Y₂) ⊗ Y₃)).hom) ≫\n              (α_ X₁ Y₁ (X₂ ⊗ (X₃ ⊗ Y₂) ⊗ Y₃)).inv ≫\n                (𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ X₃ Y₂ Y₃).hom) ≫ (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ X₃ (Y₂ ⊗ Y₃)).inv) =\n    (α_ X₁ ((Y₁ ⊗ X₂ ⊗ X₃) ⊗ Y₂) Y₃).hom ≫\n      (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂ ⊗ X₃) Y₂ Y₃).hom) ≫\n        (𝟙 X₁ ⊗ (α_ Y₁ (X₂ ⊗ X₃) (Y₂ ⊗ Y₃)).hom) ≫ (α_ X₁ Y₁ ((X₂ ⊗ X₃) ⊗ Y₂ ⊗ Y₃)).inv\n| (𝟙 X₁ ⊗ (α_ (X₂ ⊗ X₃) Y₁ Y₂).inv) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\nthis :\n  ((𝟙 X₁ ⊗ (α_ Y₁ X₂ X₃).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Y₃) ≫\n      ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) X₃ Y₂).hom) ⊗ 𝟙 Y₃) ≫\n        (α_ X₁ ((Y₁ ⊗ X₂) ⊗ X₃ ⊗ Y₂) Y₃).hom ≫\n          (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (X₃ ⊗ Y₂) Y₃).hom) ≫\n            (𝟙 X₁ ⊗ (α_ Y₁ X₂ ((X₃ ⊗ Y₂) ⊗ Y₃)).hom) ≫\n              (α_ X₁ Y₁ (X₂ ⊗ (X₃ ⊗ Y₂) ⊗ Y₃)).inv ≫\n                (𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ X₃ Y₂ Y₃).hom) ≫ (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ X₃ (Y₂ ⊗ Y₃)).inv) =\n    (α_ X₁ ((Y₁ ⊗ X₂ ⊗ X₃) ⊗ Y₂) Y₃).hom ≫\n      (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂ ⊗ X₃) Y₂ Y₃).hom) ≫\n        (𝟙 X₁ ⊗ (α_ Y₁ (X₂ ⊗ X₃) (Y₂ ⊗ Y₃)).hom) ≫ (α_ X₁ Y₁ ((X₂ ⊗ X₃) ⊗ Y₂ ⊗ Y₃)).inv\n| (𝟙 X₁ ⊗ (β_ (X₂ ⊗ X₃) Y₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Y₃\n[PROOFSTEP]\nrw [this]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\nthis :\n  ((𝟙 X₁ ⊗ (α_ Y₁ X₂ X₃).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Y₃) ≫\n      ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) X₃ Y₂).hom) ⊗ 𝟙 Y₃) ≫\n        (α_ X₁ ((Y₁ ⊗ X₂) ⊗ X₃ ⊗ Y₂) Y₃).hom ≫\n          (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (X₃ ⊗ Y₂) Y₃).hom) ≫\n            (𝟙 X₁ ⊗ (α_ Y₁ X₂ ((X₃ ⊗ Y₂) ⊗ Y₃)).hom) ≫\n              (α_ X₁ Y₁ (X₂ ⊗ (X₃ ⊗ Y₂) ⊗ Y₃)).inv ≫\n                (𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ X₃ Y₂ Y₃).hom) ≫ (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ X₃ (Y₂ ⊗ Y₃)).inv) =\n    (α_ X₁ ((Y₁ ⊗ X₂ ⊗ X₃) ⊗ Y₂) Y₃).hom ≫\n      (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂ ⊗ X₃) Y₂ Y₃).hom) ≫\n        (𝟙 X₁ ⊗ (α_ Y₁ (X₂ ⊗ X₃) (Y₂ ⊗ Y₃)).hom) ≫ (α_ X₁ Y₁ ((X₂ ⊗ X₃) ⊗ Y₂ ⊗ Y₃)).inv\n| ((𝟙 X₁ ⊗ (α_ Y₁ X₂ X₃).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Y₃) ≫\n    ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) X₃ Y₂).hom) ⊗ 𝟙 Y₃) ≫\n      (α_ X₁ ((Y₁ ⊗ X₂) ⊗ X₃ ⊗ Y₂) Y₃).hom ≫\n        (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (X₃ ⊗ Y₂) Y₃).hom) ≫\n          (𝟙 X₁ ⊗ (α_ Y₁ X₂ ((X₃ ⊗ Y₂) ⊗ Y₃)).hom) ≫\n            (α_ X₁ Y₁ (X₂ ⊗ (X₃ ⊗ Y₂) ⊗ Y₃)).inv ≫\n              (𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ X₃ Y₂ Y₃).hom) ≫ (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ X₃ (Y₂ ⊗ Y₃)).inv)\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\nthis :\n  ((𝟙 X₁ ⊗ (α_ Y₁ X₂ X₃).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Y₃) ≫\n      ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) X₃ Y₂).hom) ⊗ 𝟙 Y₃) ≫\n        (α_ X₁ ((Y₁ ⊗ X₂) ⊗ X₃ ⊗ Y₂) Y₃).hom ≫\n          (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (X₃ ⊗ Y₂) Y₃).hom) ≫\n            (𝟙 X₁ ⊗ (α_ Y₁ X₂ ((X₃ ⊗ Y₂) ⊗ Y₃)).hom) ≫\n              (α_ X₁ Y₁ (X₂ ⊗ (X₃ ⊗ Y₂) ⊗ Y₃)).inv ≫\n                (𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ X₃ Y₂ Y₃).hom) ≫ (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ X₃ (Y₂ ⊗ Y₃)).inv) =\n    (α_ X₁ ((Y₁ ⊗ X₂ ⊗ X₃) ⊗ Y₂) Y₃).hom ≫\n      (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂ ⊗ X₃) Y₂ Y₃).hom) ≫\n        (𝟙 X₁ ⊗ (α_ Y₁ (X₂ ⊗ X₃) (Y₂ ⊗ Y₃)).hom) ≫ (α_ X₁ Y₁ ((X₂ ⊗ X₃) ⊗ Y₂ ⊗ Y₃)).inv\n| 𝟙 (X₁ ⊗ Y₁) ⊗ tensor_μ C (X₂, X₃) (Y₂, Y₃)\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\nthis :\n  ((𝟙 X₁ ⊗ (α_ Y₁ X₂ X₃).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Y₃) ≫\n      ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) X₃ Y₂).hom) ⊗ 𝟙 Y₃) ≫\n        (α_ X₁ ((Y₁ ⊗ X₂) ⊗ X₃ ⊗ Y₂) Y₃).hom ≫\n          (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (X₃ ⊗ Y₂) Y₃).hom) ≫\n            (𝟙 X₁ ⊗ (α_ Y₁ X₂ ((X₃ ⊗ Y₂) ⊗ Y₃)).hom) ≫\n              (α_ X₁ Y₁ (X₂ ⊗ (X₃ ⊗ Y₂) ⊗ Y₃)).inv ≫\n                (𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ X₃ Y₂ Y₃).hom) ≫ (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ X₃ (Y₂ ⊗ Y₃)).inv) =\n    (α_ X₁ ((Y₁ ⊗ X₂ ⊗ X₃) ⊗ Y₂) Y₃).hom ≫\n      (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂ ⊗ X₃) Y₂ Y₃).hom) ≫\n        (𝟙 X₁ ⊗ (α_ Y₁ (X₂ ⊗ X₃) (Y₂ ⊗ Y₃)).hom) ≫ (α_ X₁ Y₁ ((X₂ ⊗ X₃) ⊗ Y₂ ⊗ Y₃)).inv\n| (α_ (X₁ ⊗ X₂) X₃ ((Y₁ ⊗ Y₂) ⊗ Y₃)).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\nthis :\n  ((𝟙 X₁ ⊗ (α_ Y₁ X₂ X₃).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Y₃) ≫\n      ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) X₃ Y₂).hom) ⊗ 𝟙 Y₃) ≫\n        (α_ X₁ ((Y₁ ⊗ X₂) ⊗ X₃ ⊗ Y₂) Y₃).hom ≫\n          (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (X₃ ⊗ Y₂) Y₃).hom) ≫\n            (𝟙 X₁ ⊗ (α_ Y₁ X₂ ((X₃ ⊗ Y₂) ⊗ Y₃)).hom) ≫\n              (α_ X₁ Y₁ (X₂ ⊗ (X₃ ⊗ Y₂) ⊗ Y₃)).inv ≫\n                (𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ X₃ Y₂ Y₃).hom) ≫ (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ X₃ (Y₂ ⊗ Y₃)).inv) =\n    (α_ X₁ ((Y₁ ⊗ X₂ ⊗ X₃) ⊗ Y₂) Y₃).hom ≫\n      (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂ ⊗ X₃) Y₂ Y₃).hom) ≫\n        (𝟙 X₁ ⊗ (α_ Y₁ (X₂ ⊗ X₃) (Y₂ ⊗ Y₃)).hom) ≫ (α_ X₁ Y₁ ((X₂ ⊗ X₃) ⊗ Y₂ ⊗ Y₃)).inv\n| 𝟙 (X₁ ⊗ X₂) ⊗ (α_ X₃ (Y₁ ⊗ Y₂) Y₃).inv\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\nthis :\n  ((𝟙 X₁ ⊗ (α_ Y₁ X₂ X₃).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Y₃) ≫\n      ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) X₃ Y₂).hom) ⊗ 𝟙 Y₃) ≫\n        (α_ X₁ ((Y₁ ⊗ X₂) ⊗ X₃ ⊗ Y₂) Y₃).hom ≫\n          (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (X₃ ⊗ Y₂) Y₃).hom) ≫\n            (𝟙 X₁ ⊗ (α_ Y₁ X₂ ((X₃ ⊗ Y₂) ⊗ Y₃)).hom) ≫\n              (α_ X₁ Y₁ (X₂ ⊗ (X₃ ⊗ Y₂) ⊗ Y₃)).inv ≫\n                (𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ X₃ Y₂ Y₃).hom) ≫ (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ X₃ (Y₂ ⊗ Y₃)).inv) =\n    (α_ X₁ ((Y₁ ⊗ X₂ ⊗ X₃) ⊗ Y₂) Y₃).hom ≫\n      (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂ ⊗ X₃) Y₂ Y₃).hom) ≫\n        (𝟙 X₁ ⊗ (α_ Y₁ (X₂ ⊗ X₃) (Y₂ ⊗ Y₃)).hom) ≫ (α_ X₁ Y₁ ((X₂ ⊗ X₃) ⊗ Y₂ ⊗ Y₃)).inv\n| (α_ X₁ X₂ ((X₃ ⊗ Y₁ ⊗ Y₂) ⊗ Y₃)).hom\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\nthis :\n  ((𝟙 X₁ ⊗ (α_ Y₁ X₂ X₃).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Y₃) ≫\n      ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) X₃ Y₂).hom) ⊗ 𝟙 Y₃) ≫\n        (α_ X₁ ((Y₁ ⊗ X₂) ⊗ X₃ ⊗ Y₂) Y₃).hom ≫\n          (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (X₃ ⊗ Y₂) Y₃).hom) ≫\n            (𝟙 X₁ ⊗ (α_ Y₁ X₂ ((X₃ ⊗ Y₂) ⊗ Y₃)).hom) ≫\n              (α_ X₁ Y₁ (X₂ ⊗ (X₃ ⊗ Y₂) ⊗ Y₃)).inv ≫\n                (𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ X₃ Y₂ Y₃).hom) ≫ (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ X₃ (Y₂ ⊗ Y₃)).inv) =\n    (α_ X₁ ((Y₁ ⊗ X₂ ⊗ X₃) ⊗ Y₂) Y₃).hom ≫\n      (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂ ⊗ X₃) Y₂ Y₃).hom) ≫\n        (𝟙 X₁ ⊗ (α_ Y₁ (X₂ ⊗ X₃) (Y₂ ⊗ Y₃)).hom) ≫ (α_ X₁ Y₁ ((X₂ ⊗ X₃) ⊗ Y₂ ⊗ Y₃)).inv\n| 𝟙 X₁ ⊗ (α_ X₂ (X₃ ⊗ Y₁ ⊗ Y₂) Y₃).inv\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\nthis :\n  ((𝟙 X₁ ⊗ (α_ Y₁ X₂ X₃).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Y₃) ≫\n      ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) X₃ Y₂).hom) ⊗ 𝟙 Y₃) ≫\n        (α_ X₁ ((Y₁ ⊗ X₂) ⊗ X₃ ⊗ Y₂) Y₃).hom ≫\n          (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (X₃ ⊗ Y₂) Y₃).hom) ≫\n            (𝟙 X₁ ⊗ (α_ Y₁ X₂ ((X₃ ⊗ Y₂) ⊗ Y₃)).hom) ≫\n              (α_ X₁ Y₁ (X₂ ⊗ (X₃ ⊗ Y₂) ⊗ Y₃)).inv ≫\n                (𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ X₃ Y₂ Y₃).hom) ≫ (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ X₃ (Y₂ ⊗ Y₃)).inv) =\n    (α_ X₁ ((Y₁ ⊗ X₂ ⊗ X₃) ⊗ Y₂) Y₃).hom ≫\n      (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂ ⊗ X₃) Y₂ Y₃).hom) ≫\n        (𝟙 X₁ ⊗ (α_ Y₁ (X₂ ⊗ X₃) (Y₂ ⊗ Y₃)).hom) ≫ (α_ X₁ Y₁ ((X₂ ⊗ X₃) ⊗ Y₂ ⊗ Y₃)).inv\n| (α_ X₁ (X₂ ⊗ X₃ ⊗ Y₁ ⊗ Y₂) Y₃).inv\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\nthis :\n  ((𝟙 X₁ ⊗ (α_ Y₁ X₂ X₃).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Y₃) ≫\n      ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) X₃ Y₂).hom) ⊗ 𝟙 Y₃) ≫\n        (α_ X₁ ((Y₁ ⊗ X₂) ⊗ X₃ ⊗ Y₂) Y₃).hom ≫\n          (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (X₃ ⊗ Y₂) Y₃).hom) ≫\n            (𝟙 X₁ ⊗ (α_ Y₁ X₂ ((X₃ ⊗ Y₂) ⊗ Y₃)).hom) ≫\n              (α_ X₁ Y₁ (X₂ ⊗ (X₃ ⊗ Y₂) ⊗ Y₃)).inv ≫\n                (𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ X₃ Y₂ Y₃).hom) ≫ (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ X₃ (Y₂ ⊗ Y₃)).inv) =\n    (α_ X₁ ((Y₁ ⊗ X₂ ⊗ X₃) ⊗ Y₂) Y₃).hom ≫\n      (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂ ⊗ X₃) Y₂ Y₃).hom) ≫\n        (𝟙 X₁ ⊗ (α_ Y₁ (X₂ ⊗ X₃) (Y₂ ⊗ Y₃)).hom) ≫ (α_ X₁ Y₁ ((X₂ ⊗ X₃) ⊗ Y₂ ⊗ Y₃)).inv\n| (𝟙 X₁ ⊗ (α_ X₂ X₃ (Y₁ ⊗ Y₂)).inv) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\nthis :\n  ((𝟙 X₁ ⊗ (α_ Y₁ X₂ X₃).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Y₃) ≫\n      ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) X₃ Y₂).hom) ⊗ 𝟙 Y₃) ≫\n        (α_ X₁ ((Y₁ ⊗ X₂) ⊗ X₃ ⊗ Y₂) Y₃).hom ≫\n          (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (X₃ ⊗ Y₂) Y₃).hom) ≫\n            (𝟙 X₁ ⊗ (α_ Y₁ X₂ ((X₃ ⊗ Y₂) ⊗ Y₃)).hom) ≫\n              (α_ X₁ Y₁ (X₂ ⊗ (X₃ ⊗ Y₂) ⊗ Y₃)).inv ≫\n                (𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ X₃ Y₂ Y₃).hom) ≫ (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ X₃ (Y₂ ⊗ Y₃)).inv) =\n    (α_ X₁ ((Y₁ ⊗ X₂ ⊗ X₃) ⊗ Y₂) Y₃).hom ≫\n      (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂ ⊗ X₃) Y₂ Y₃).hom) ≫\n        (𝟙 X₁ ⊗ (α_ Y₁ (X₂ ⊗ X₃) (Y₂ ⊗ Y₃)).hom) ≫ (α_ X₁ Y₁ ((X₂ ⊗ X₃) ⊗ Y₂ ⊗ Y₃)).inv\n| (𝟙 X₁ ⊗ (α_ (X₂ ⊗ X₃) Y₁ Y₂).inv) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\nthis :\n  ((𝟙 X₁ ⊗ (α_ Y₁ X₂ X₃).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Y₃) ≫\n      ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) X₃ Y₂).hom) ⊗ 𝟙 Y₃) ≫\n        (α_ X₁ ((Y₁ ⊗ X₂) ⊗ X₃ ⊗ Y₂) Y₃).hom ≫\n          (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (X₃ ⊗ Y₂) Y₃).hom) ≫\n            (𝟙 X₁ ⊗ (α_ Y₁ X₂ ((X₃ ⊗ Y₂) ⊗ Y₃)).hom) ≫\n              (α_ X₁ Y₁ (X₂ ⊗ (X₃ ⊗ Y₂) ⊗ Y₃)).inv ≫\n                (𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ X₃ Y₂ Y₃).hom) ≫ (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ X₃ (Y₂ ⊗ Y₃)).inv) =\n    (α_ X₁ ((Y₁ ⊗ X₂ ⊗ X₃) ⊗ Y₂) Y₃).hom ≫\n      (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂ ⊗ X₃) Y₂ Y₃).hom) ≫\n        (𝟙 X₁ ⊗ (α_ Y₁ (X₂ ⊗ X₃) (Y₂ ⊗ Y₃)).hom) ≫ (α_ X₁ Y₁ ((X₂ ⊗ X₃) ⊗ Y₂ ⊗ Y₃)).inv\n| (𝟙 X₁ ⊗ (β_ (X₂ ⊗ X₃) Y₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Y₃\n[PROOFSTEP]\nrw [this]\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\nthis :\n  ((𝟙 X₁ ⊗ (α_ Y₁ X₂ X₃).inv ⊗ 𝟙 Y₂) ⊗ 𝟙 Y₃) ≫\n      ((𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) X₃ Y₂).hom) ⊗ 𝟙 Y₃) ≫\n        (α_ X₁ ((Y₁ ⊗ X₂) ⊗ X₃ ⊗ Y₂) Y₃).hom ≫\n          (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂) (X₃ ⊗ Y₂) Y₃).hom) ≫\n            (𝟙 X₁ ⊗ (α_ Y₁ X₂ ((X₃ ⊗ Y₂) ⊗ Y₃)).hom) ≫\n              (α_ X₁ Y₁ (X₂ ⊗ (X₃ ⊗ Y₂) ⊗ Y₃)).inv ≫\n                (𝟙 (X₁ ⊗ Y₁) ⊗ 𝟙 X₂ ⊗ (α_ X₃ Y₂ Y₃).hom) ≫ (𝟙 (X₁ ⊗ Y₁) ⊗ (α_ X₂ X₃ (Y₂ ⊗ Y₃)).inv) =\n    (α_ X₁ ((Y₁ ⊗ X₂ ⊗ X₃) ⊗ Y₂) Y₃).hom ≫\n      (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂ ⊗ X₃) Y₂ Y₃).hom) ≫\n        (𝟙 X₁ ⊗ (α_ Y₁ (X₂ ⊗ X₃) (Y₂ ⊗ Y₃)).hom) ≫ (α_ X₁ Y₁ ((X₂ ⊗ X₃) ⊗ Y₂ ⊗ Y₃)).inv\n⊢ (α_ (X₁ ⊗ X₂) X₃ ((Y₁ ⊗ Y₂) ⊗ Y₃)).hom ≫\n      (𝟙 (X₁ ⊗ X₂) ⊗ (α_ X₃ (Y₁ ⊗ Y₂) Y₃).inv) ≫\n        (α_ X₁ X₂ ((X₃ ⊗ Y₁ ⊗ Y₂) ⊗ Y₃)).hom ≫\n          (𝟙 X₁ ⊗ (α_ X₂ (X₃ ⊗ Y₁ ⊗ Y₂) Y₃).inv) ≫\n            (α_ X₁ (X₂ ⊗ X₃ ⊗ Y₁ ⊗ Y₂) Y₃).inv ≫\n              ((𝟙 X₁ ⊗ (α_ X₂ X₃ (Y₁ ⊗ Y₂)).inv) ⊗ 𝟙 Y₃) ≫\n                ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ X₃) Y₁ Y₂).inv) ⊗ 𝟙 Y₃) ≫\n                  ((𝟙 X₁ ⊗ (β_ (X₂ ⊗ X₃) Y₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Y₃) ≫\n                    ((α_ X₁ ((Y₁ ⊗ X₂ ⊗ X₃) ⊗ Y₂) Y₃).hom ≫\n                        (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂ ⊗ X₃) Y₂ Y₃).hom) ≫\n                          (𝟙 X₁ ⊗ (α_ Y₁ (X₂ ⊗ X₃) (Y₂ ⊗ Y₃)).hom) ≫ (α_ X₁ Y₁ ((X₂ ⊗ X₃) ⊗ Y₂ ⊗ Y₃)).inv) ≫\n                      (𝟙 (X₁ ⊗ Y₁) ⊗ tensor_μ C (X₂, X₃) (Y₂, Y₃)) =\n    ((α_ X₁ X₂ X₃).hom ⊗ (α_ Y₁ Y₂ Y₃).hom) ≫\n      tensor_μ C (X₁, X₂ ⊗ X₃) (Y₁, Y₂ ⊗ Y₃) ≫ (𝟙 (X₁ ⊗ Y₁) ⊗ tensor_μ C (X₂, X₃) (Y₂, Y₃))\n[PROOFSTEP]\nclear this\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n⊢ (α_ (X₁ ⊗ X₂) X₃ ((Y₁ ⊗ Y₂) ⊗ Y₃)).hom ≫\n      (𝟙 (X₁ ⊗ X₂) ⊗ (α_ X₃ (Y₁ ⊗ Y₂) Y₃).inv) ≫\n        (α_ X₁ X₂ ((X₃ ⊗ Y₁ ⊗ Y₂) ⊗ Y₃)).hom ≫\n          (𝟙 X₁ ⊗ (α_ X₂ (X₃ ⊗ Y₁ ⊗ Y₂) Y₃).inv) ≫\n            (α_ X₁ (X₂ ⊗ X₃ ⊗ Y₁ ⊗ Y₂) Y₃).inv ≫\n              ((𝟙 X₁ ⊗ (α_ X₂ X₃ (Y₁ ⊗ Y₂)).inv) ⊗ 𝟙 Y₃) ≫\n                ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ X₃) Y₁ Y₂).inv) ⊗ 𝟙 Y₃) ≫\n                  ((𝟙 X₁ ⊗ (β_ (X₂ ⊗ X₃) Y₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Y₃) ≫\n                    ((α_ X₁ ((Y₁ ⊗ X₂ ⊗ X₃) ⊗ Y₂) Y₃).hom ≫\n                        (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂ ⊗ X₃) Y₂ Y₃).hom) ≫\n                          (𝟙 X₁ ⊗ (α_ Y₁ (X₂ ⊗ X₃) (Y₂ ⊗ Y₃)).hom) ≫ (α_ X₁ Y₁ ((X₂ ⊗ X₃) ⊗ Y₂ ⊗ Y₃)).inv) ≫\n                      (𝟙 (X₁ ⊗ Y₁) ⊗ tensor_μ C (X₂, X₃) (Y₂, Y₃)) =\n    ((α_ X₁ X₂ X₃).hom ⊗ (α_ Y₁ Y₂ Y₃).hom) ≫\n      tensor_μ C (X₁, X₂ ⊗ X₃) (Y₁, Y₂ ⊗ Y₃) ≫ (𝟙 (X₁ ⊗ Y₁) ⊗ tensor_μ C (X₂, X₃) (Y₂, Y₃))\n[PROOFSTEP]\nslice_lhs 8 9 => rw [associator_naturality]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| ((𝟙 X₁ ⊗ (β_ (X₂ ⊗ X₃) Y₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Y₃) ≫ (α_ X₁ ((Y₁ ⊗ X₂ ⊗ X₃) ⊗ Y₂) Y₃).hom\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂ ⊗ X₃) Y₂ Y₃).hom\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ Y₁ (X₂ ⊗ X₃) (Y₂ ⊗ Y₃)).hom\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ Y₁ ((X₂ ⊗ X₃) ⊗ Y₂ ⊗ Y₃)).inv\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ Y₁) ⊗ tensor_μ C (X₂, X₃) (Y₂, Y₃)\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ (X₁ ⊗ X₂) X₃ ((Y₁ ⊗ Y₂) ⊗ Y₃)).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ X₂) ⊗ (α_ X₃ (Y₁ ⊗ Y₂) Y₃).inv\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ X₂ ((X₃ ⊗ Y₁ ⊗ Y₂) ⊗ Y₃)).hom\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ X₂ (X₃ ⊗ Y₁ ⊗ Y₂) Y₃).inv\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ (X₂ ⊗ X₃ ⊗ Y₁ ⊗ Y₂) Y₃).inv\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ X₂ X₃ (Y₁ ⊗ Y₂)).inv) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ (X₂ ⊗ X₃) Y₁ Y₂).inv) ⊗ 𝟙 Y₃\n[PROOFSTEP]\nrw [associator_naturality]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| ((𝟙 X₁ ⊗ (β_ (X₂ ⊗ X₃) Y₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Y₃) ≫ (α_ X₁ ((Y₁ ⊗ X₂ ⊗ X₃) ⊗ Y₂) Y₃).hom\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂ ⊗ X₃) Y₂ Y₃).hom\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ Y₁ (X₂ ⊗ X₃) (Y₂ ⊗ Y₃)).hom\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ Y₁ ((X₂ ⊗ X₃) ⊗ Y₂ ⊗ Y₃)).inv\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ Y₁) ⊗ tensor_μ C (X₂, X₃) (Y₂, Y₃)\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ (X₁ ⊗ X₂) X₃ ((Y₁ ⊗ Y₂) ⊗ Y₃)).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ X₂) ⊗ (α_ X₃ (Y₁ ⊗ Y₂) Y₃).inv\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ X₂ ((X₃ ⊗ Y₁ ⊗ Y₂) ⊗ Y₃)).hom\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ X₂ (X₃ ⊗ Y₁ ⊗ Y₂) Y₃).inv\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ (X₂ ⊗ X₃ ⊗ Y₁ ⊗ Y₂) Y₃).inv\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ X₂ X₃ (Y₁ ⊗ Y₂)).inv) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ (X₂ ⊗ X₃) Y₁ Y₂).inv) ⊗ 𝟙 Y₃\n[PROOFSTEP]\nrw [associator_naturality]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| ((𝟙 X₁ ⊗ (β_ (X₂ ⊗ X₃) Y₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Y₃) ≫ (α_ X₁ ((Y₁ ⊗ X₂ ⊗ X₃) ⊗ Y₂) Y₃).hom\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂ ⊗ X₃) Y₂ Y₃).hom\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ Y₁ (X₂ ⊗ X₃) (Y₂ ⊗ Y₃)).hom\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ Y₁ ((X₂ ⊗ X₃) ⊗ Y₂ ⊗ Y₃)).inv\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ Y₁) ⊗ tensor_μ C (X₂, X₃) (Y₂, Y₃)\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ (X₁ ⊗ X₂) X₃ ((Y₁ ⊗ Y₂) ⊗ Y₃)).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ X₂) ⊗ (α_ X₃ (Y₁ ⊗ Y₂) Y₃).inv\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ X₂ ((X₃ ⊗ Y₁ ⊗ Y₂) ⊗ Y₃)).hom\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ X₂ (X₃ ⊗ Y₁ ⊗ Y₂) Y₃).inv\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ (X₂ ⊗ X₃ ⊗ Y₁ ⊗ Y₂) Y₃).inv\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ X₂ X₃ (Y₁ ⊗ Y₂)).inv) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ (X₂ ⊗ X₃) Y₁ Y₂).inv) ⊗ 𝟙 Y₃\n[PROOFSTEP]\nrw [associator_naturality]\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n⊢ (α_ (X₁ ⊗ X₂) X₃ ((Y₁ ⊗ Y₂) ⊗ Y₃)).hom ≫\n      (𝟙 (X₁ ⊗ X₂) ⊗ (α_ X₃ (Y₁ ⊗ Y₂) Y₃).inv) ≫\n        (α_ X₁ X₂ ((X₃ ⊗ Y₁ ⊗ Y₂) ⊗ Y₃)).hom ≫\n          (𝟙 X₁ ⊗ (α_ X₂ (X₃ ⊗ Y₁ ⊗ Y₂) Y₃).inv) ≫\n            (α_ X₁ (X₂ ⊗ X₃ ⊗ Y₁ ⊗ Y₂) Y₃).inv ≫\n              ((𝟙 X₁ ⊗ (α_ X₂ X₃ (Y₁ ⊗ Y₂)).inv) ⊗ 𝟙 Y₃) ≫\n                ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ X₃) Y₁ Y₂).inv) ⊗ 𝟙 Y₃) ≫\n                  (((((α_ X₁ (((X₂ ⊗ X₃) ⊗ Y₁) ⊗ Y₂) Y₃).hom ≫ (𝟙 X₁ ⊗ ((β_ (X₂ ⊗ X₃) Y₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Y₃)) ≫\n                          (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂ ⊗ X₃) Y₂ Y₃).hom)) ≫\n                        (𝟙 X₁ ⊗ (α_ Y₁ (X₂ ⊗ X₃) (Y₂ ⊗ Y₃)).hom)) ≫\n                      (α_ X₁ Y₁ ((X₂ ⊗ X₃) ⊗ Y₂ ⊗ Y₃)).inv) ≫\n                    (𝟙 (X₁ ⊗ Y₁) ⊗ tensor_μ C (X₂, X₃) (Y₂, Y₃)) =\n    ((α_ X₁ X₂ X₃).hom ⊗ (α_ Y₁ Y₂ Y₃).hom) ≫\n      tensor_μ C (X₁, X₂ ⊗ X₃) (Y₁, Y₂ ⊗ Y₃) ≫ (𝟙 (X₁ ⊗ Y₁) ⊗ tensor_μ C (X₂, X₃) (Y₂, Y₃))\n[PROOFSTEP]\nslice_lhs 9 10 => rw [← tensor_comp, associator_naturality, tensor_comp]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ ((β_ (X₂ ⊗ X₃) Y₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Y₃) ≫ (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂ ⊗ X₃) Y₂ Y₃).hom)\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ Y₁ (X₂ ⊗ X₃) (Y₂ ⊗ Y₃)).hom\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ Y₁ ((X₂ ⊗ X₃) ⊗ Y₂ ⊗ Y₃)).inv\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ Y₁) ⊗ tensor_μ C (X₂, X₃) (Y₂, Y₃)\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ (X₁ ⊗ X₂) X₃ ((Y₁ ⊗ Y₂) ⊗ Y₃)).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ X₂) ⊗ (α_ X₃ (Y₁ ⊗ Y₂) Y₃).inv\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ X₂ ((X₃ ⊗ Y₁ ⊗ Y₂) ⊗ Y₃)).hom\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ X₂ (X₃ ⊗ Y₁ ⊗ Y₂) Y₃).inv\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ (X₂ ⊗ X₃ ⊗ Y₁ ⊗ Y₂) Y₃).inv\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ X₂ X₃ (Y₁ ⊗ Y₂)).inv) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ (X₂ ⊗ X₃) Y₁ Y₂).inv) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ (((X₂ ⊗ X₃) ⊗ Y₁) ⊗ Y₂) Y₃).hom\n[PROOFSTEP]\nrw [← tensor_comp, associator_naturality, tensor_comp]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ ((β_ (X₂ ⊗ X₃) Y₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Y₃) ≫ (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂ ⊗ X₃) Y₂ Y₃).hom)\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ Y₁ (X₂ ⊗ X₃) (Y₂ ⊗ Y₃)).hom\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ Y₁ ((X₂ ⊗ X₃) ⊗ Y₂ ⊗ Y₃)).inv\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ Y₁) ⊗ tensor_μ C (X₂, X₃) (Y₂, Y₃)\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ (X₁ ⊗ X₂) X₃ ((Y₁ ⊗ Y₂) ⊗ Y₃)).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ X₂) ⊗ (α_ X₃ (Y₁ ⊗ Y₂) Y₃).inv\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ X₂ ((X₃ ⊗ Y₁ ⊗ Y₂) ⊗ Y₃)).hom\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ X₂ (X₃ ⊗ Y₁ ⊗ Y₂) Y₃).inv\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ (X₂ ⊗ X₃ ⊗ Y₁ ⊗ Y₂) Y₃).inv\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ X₂ X₃ (Y₁ ⊗ Y₂)).inv) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ (X₂ ⊗ X₃) Y₁ Y₂).inv) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ (((X₂ ⊗ X₃) ⊗ Y₁) ⊗ Y₂) Y₃).hom\n[PROOFSTEP]\nrw [← tensor_comp, associator_naturality, tensor_comp]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ ((β_ (X₂ ⊗ X₃) Y₁).hom ⊗ 𝟙 Y₂) ⊗ 𝟙 Y₃) ≫ (𝟙 X₁ ⊗ (α_ (Y₁ ⊗ X₂ ⊗ X₃) Y₂ Y₃).hom)\ncase a.a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ Y₁ (X₂ ⊗ X₃) (Y₂ ⊗ Y₃)).hom\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ Y₁ ((X₂ ⊗ X₃) ⊗ Y₂ ⊗ Y₃)).inv\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ Y₁) ⊗ tensor_μ C (X₂, X₃) (Y₂, Y₃)\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ (X₁ ⊗ X₂) X₃ ((Y₁ ⊗ Y₂) ⊗ Y₃)).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ X₂) ⊗ (α_ X₃ (Y₁ ⊗ Y₂) Y₃).inv\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ X₂ ((X₃ ⊗ Y₁ ⊗ Y₂) ⊗ Y₃)).hom\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ X₂ (X₃ ⊗ Y₁ ⊗ Y₂) Y₃).inv\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ (X₂ ⊗ X₃ ⊗ Y₁ ⊗ Y₂) Y₃).inv\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ X₂ X₃ (Y₁ ⊗ Y₂)).inv) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ (X₂ ⊗ X₃) Y₁ Y₂).inv) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ (((X₂ ⊗ X₃) ⊗ Y₁) ⊗ Y₂) Y₃).hom\n[PROOFSTEP]\nrw [← tensor_comp, associator_naturality, tensor_comp]\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n⊢ (α_ (X₁ ⊗ X₂) X₃ ((Y₁ ⊗ Y₂) ⊗ Y₃)).hom ≫\n      (𝟙 (X₁ ⊗ X₂) ⊗ (α_ X₃ (Y₁ ⊗ Y₂) Y₃).inv) ≫\n        (α_ X₁ X₂ ((X₃ ⊗ Y₁ ⊗ Y₂) ⊗ Y₃)).hom ≫\n          (𝟙 X₁ ⊗ (α_ X₂ (X₃ ⊗ Y₁ ⊗ Y₂) Y₃).inv) ≫\n            (α_ X₁ (X₂ ⊗ X₃ ⊗ Y₁ ⊗ Y₂) Y₃).inv ≫\n              ((𝟙 X₁ ⊗ (α_ X₂ X₃ (Y₁ ⊗ Y₂)).inv) ⊗ 𝟙 Y₃) ≫\n                ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ X₃) Y₁ Y₂).inv) ⊗ 𝟙 Y₃) ≫\n                  (α_ X₁ (((X₂ ⊗ X₃) ⊗ Y₁) ⊗ Y₂) Y₃).hom ≫\n                    ((((𝟙 X₁ ⊗ (α_ ((X₂ ⊗ X₃) ⊗ Y₁) Y₂ Y₃).hom) ≫ (𝟙 X₁ ⊗ (β_ (X₂ ⊗ X₃) Y₁).hom ⊗ 𝟙 Y₂ ⊗ 𝟙 Y₃)) ≫\n                          (𝟙 X₁ ⊗ (α_ Y₁ (X₂ ⊗ X₃) (Y₂ ⊗ Y₃)).hom)) ≫\n                        (α_ X₁ Y₁ ((X₂ ⊗ X₃) ⊗ Y₂ ⊗ Y₃)).inv) ≫\n                      (𝟙 (X₁ ⊗ Y₁) ⊗ tensor_μ C (X₂, X₃) (Y₂, Y₃)) =\n    ((α_ X₁ X₂ X₃).hom ⊗ (α_ Y₁ Y₂ Y₃).hom) ≫\n      tensor_μ C (X₁, X₂ ⊗ X₃) (Y₁, Y₂ ⊗ Y₃) ≫ (𝟙 (X₁ ⊗ Y₁) ⊗ tensor_μ C (X₂, X₃) (Y₂, Y₃))\n[PROOFSTEP]\nslice_lhs 10 12 => rw [tensor_id, ← tensor_μ_def₂]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (β_ (X₂ ⊗ X₃) Y₁).hom ⊗ 𝟙 Y₂ ⊗ 𝟙 Y₃) ≫\n    (𝟙 X₁ ⊗ (α_ Y₁ (X₂ ⊗ X₃) (Y₂ ⊗ Y₃)).hom) ≫ (α_ X₁ Y₁ ((X₂ ⊗ X₃) ⊗ Y₂ ⊗ Y₃)).inv\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ Y₁) ⊗ tensor_μ C (X₂, X₃) (Y₂, Y₃)\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ (X₁ ⊗ X₂) X₃ ((Y₁ ⊗ Y₂) ⊗ Y₃)).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ X₂) ⊗ (α_ X₃ (Y₁ ⊗ Y₂) Y₃).inv\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ X₂ ((X₃ ⊗ Y₁ ⊗ Y₂) ⊗ Y₃)).hom\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ X₂ (X₃ ⊗ Y₁ ⊗ Y₂) Y₃).inv\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ (X₂ ⊗ X₃ ⊗ Y₁ ⊗ Y₂) Y₃).inv\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ X₂ X₃ (Y₁ ⊗ Y₂)).inv) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ (X₂ ⊗ X₃) Y₁ Y₂).inv) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ (((X₂ ⊗ X₃) ⊗ Y₁) ⊗ Y₂) Y₃).hom\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ ((X₂ ⊗ X₃) ⊗ Y₁) Y₂ Y₃).hom\n[PROOFSTEP]\nrw [tensor_id, ← tensor_μ_def₂]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (β_ (X₂ ⊗ X₃) Y₁).hom ⊗ 𝟙 Y₂ ⊗ 𝟙 Y₃) ≫\n    (𝟙 X₁ ⊗ (α_ Y₁ (X₂ ⊗ X₃) (Y₂ ⊗ Y₃)).hom) ≫ (α_ X₁ Y₁ ((X₂ ⊗ X₃) ⊗ Y₂ ⊗ Y₃)).inv\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ Y₁) ⊗ tensor_μ C (X₂, X₃) (Y₂, Y₃)\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ (X₁ ⊗ X₂) X₃ ((Y₁ ⊗ Y₂) ⊗ Y₃)).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ X₂) ⊗ (α_ X₃ (Y₁ ⊗ Y₂) Y₃).inv\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ X₂ ((X₃ ⊗ Y₁ ⊗ Y₂) ⊗ Y₃)).hom\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ X₂ (X₃ ⊗ Y₁ ⊗ Y₂) Y₃).inv\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ (X₂ ⊗ X₃ ⊗ Y₁ ⊗ Y₂) Y₃).inv\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ X₂ X₃ (Y₁ ⊗ Y₂)).inv) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ (X₂ ⊗ X₃) Y₁ Y₂).inv) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ (((X₂ ⊗ X₃) ⊗ Y₁) ⊗ Y₂) Y₃).hom\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ ((X₂ ⊗ X₃) ⊗ Y₁) Y₂ Y₃).hom\n[PROOFSTEP]\nrw [tensor_id, ← tensor_μ_def₂]\n[GOAL]\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (β_ (X₂ ⊗ X₃) Y₁).hom ⊗ 𝟙 Y₂ ⊗ 𝟙 Y₃) ≫\n    (𝟙 X₁ ⊗ (α_ Y₁ (X₂ ⊗ X₃) (Y₂ ⊗ Y₃)).hom) ≫ (α_ X₁ Y₁ ((X₂ ⊗ X₃) ⊗ Y₂ ⊗ Y₃)).inv\ncase a.a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ Y₁) ⊗ tensor_μ C (X₂, X₃) (Y₂, Y₃)\ncase a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ (X₁ ⊗ X₂) X₃ ((Y₁ ⊗ Y₂) ⊗ Y₃)).hom\ncase a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 (X₁ ⊗ X₂) ⊗ (α_ X₃ (Y₁ ⊗ Y₂) Y₃).inv\ncase a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ X₂ ((X₃ ⊗ Y₁ ⊗ Y₂) ⊗ Y₃)).hom\ncase a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ X₂ (X₃ ⊗ Y₁ ⊗ Y₂) Y₃).inv\ncase a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ (X₂ ⊗ X₃ ⊗ Y₁ ⊗ Y₂) Y₃).inv\ncase a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ X₂ X₃ (Y₁ ⊗ Y₂)).inv) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (𝟙 X₁ ⊗ (α_ (X₂ ⊗ X₃) Y₁ Y₂).inv) ⊗ 𝟙 Y₃\ncase a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| (α_ X₁ (((X₂ ⊗ X₃) ⊗ Y₁) ⊗ Y₂) Y₃).hom\ncase a.a.a.a.a.a.a.a.a\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n| 𝟙 X₁ ⊗ (α_ ((X₂ ⊗ X₃) ⊗ Y₁) Y₂ Y₃).hom\n[PROOFSTEP]\nrw [tensor_id, ← tensor_μ_def₂]\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n⊢ (α_ (X₁ ⊗ X₂) X₃ ((Y₁ ⊗ Y₂) ⊗ Y₃)).hom ≫\n      (𝟙 (X₁ ⊗ X₂) ⊗ (α_ X₃ (Y₁ ⊗ Y₂) Y₃).inv) ≫\n        (α_ X₁ X₂ ((X₃ ⊗ Y₁ ⊗ Y₂) ⊗ Y₃)).hom ≫\n          (𝟙 X₁ ⊗ (α_ X₂ (X₃ ⊗ Y₁ ⊗ Y₂) Y₃).inv) ≫\n            (α_ X₁ (X₂ ⊗ X₃ ⊗ Y₁ ⊗ Y₂) Y₃).inv ≫\n              ((𝟙 X₁ ⊗ (α_ X₂ X₃ (Y₁ ⊗ Y₂)).inv) ⊗ 𝟙 Y₃) ≫\n                ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ X₃) Y₁ Y₂).inv) ⊗ 𝟙 Y₃) ≫\n                  (α_ X₁ (((X₂ ⊗ X₃) ⊗ Y₁) ⊗ Y₂) Y₃).hom ≫\n                    (𝟙 X₁ ⊗ (α_ ((X₂ ⊗ X₃) ⊗ Y₁) Y₂ Y₃).hom) ≫\n                      ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ X₃) Y₁ (Y₂ ⊗ Y₃)).hom) ≫\n                          (α_ X₁ (X₂ ⊗ X₃) (Y₁ ⊗ Y₂ ⊗ Y₃)).inv ≫ tensor_μ C (X₁, X₂ ⊗ X₃) (Y₁, Y₂ ⊗ Y₃)) ≫\n                        (𝟙 (X₁ ⊗ Y₁) ⊗ tensor_μ C (X₂, X₃) (Y₂, Y₃)) =\n    ((α_ X₁ X₂ X₃).hom ⊗ (α_ Y₁ Y₂ Y₃).hom) ≫\n      tensor_μ C (X₁, X₂ ⊗ X₃) (Y₁, Y₂ ⊗ Y₃) ≫ (𝟙 (X₁ ⊗ Y₁) ⊗ tensor_μ C (X₂, X₃) (Y₂, Y₃))\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v₁, u₁} C\ninst✝⁷ : MonoidalCategory C\ninst✝⁶ : BraidedCategory C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : MonoidalCategory D\ninst✝³ : BraidedCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\ninst✝ : BraidedCategory E\nX₁ X₂ X₃ Y₁ Y₂ Y₃ : C\n⊢ (α_ (X₁ ⊗ X₂) X₃ ((Y₁ ⊗ Y₂) ⊗ Y₃)).hom ≫\n      (𝟙 (X₁ ⊗ X₂) ⊗ (α_ X₃ (Y₁ ⊗ Y₂) Y₃).inv) ≫\n        (α_ X₁ X₂ ((X₃ ⊗ Y₁ ⊗ Y₂) ⊗ Y₃)).hom ≫\n          (𝟙 X₁ ⊗ (α_ X₂ (X₃ ⊗ Y₁ ⊗ Y₂) Y₃).inv) ≫\n            (α_ X₁ (X₂ ⊗ X₃ ⊗ Y₁ ⊗ Y₂) Y₃).inv ≫\n              ((𝟙 X₁ ⊗ (α_ X₂ X₃ (Y₁ ⊗ Y₂)).inv) ⊗ 𝟙 Y₃) ≫\n                ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ X₃) Y₁ Y₂).inv) ⊗ 𝟙 Y₃) ≫\n                  (α_ X₁ (((X₂ ⊗ X₃) ⊗ Y₁) ⊗ Y₂) Y₃).hom ≫\n                    (𝟙 X₁ ⊗ (α_ ((X₂ ⊗ X₃) ⊗ Y₁) Y₂ Y₃).hom) ≫\n                      ((𝟙 X₁ ⊗ (α_ (X₂ ⊗ X₃) Y₁ (Y₂ ⊗ Y₃)).hom) ≫\n                          (α_ X₁ (X₂ ⊗ X₃) (Y₁ ⊗ Y₂ ⊗ Y₃)).inv ≫ tensor_μ C (X₁, X₂ ⊗ X₃) (Y₁, Y₂ ⊗ Y₃)) ≫\n                        (𝟙 (X₁ ⊗ Y₁) ⊗ tensor_μ C (X₂, X₃) (Y₂, Y₃)) =\n    ((α_ X₁ X₂ X₃).hom ⊗ (α_ Y₁ Y₂ Y₃).hom) ≫\n      tensor_μ C (X₁, X₂ ⊗ X₃) (Y₁, Y₂ ⊗ Y₃) ≫ (𝟙 (X₁ ⊗ Y₁) ⊗ tensor_μ C (X₂, X₃) (Y₂, Y₃))\n[PROOFSTEP]\ncoherence\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Monoidal.Braided", "llama_tokens": 566469, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8333245911726382, "lm_q2_score": 0.6370308013713525, "lm_q1q2_score": 0.5308534321171604}}
{"text": "[GOAL]\nE : Type u_1\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : UniformConvexSpace E\nε : ℝ\ninst✝ : NormedSpace ℝ E\nhε : 0 < ε\n⊢ ∃ δ, 0 < δ ∧ ∀ ⦃x : E⦄, ‖x‖ ≤ 1 → ∀ ⦃y : E⦄, ‖y‖ ≤ 1 → ε ≤ ‖x - y‖ → ‖x + y‖ ≤ 2 - δ\n[PROOFSTEP]\nhave hε' : 0 < ε / 3 := div_pos hε zero_lt_three\n[GOAL]\nE : Type u_1\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : UniformConvexSpace E\nε : ℝ\ninst✝ : NormedSpace ℝ E\nhε : 0 < ε\nhε' : 0 < ε / 3\n⊢ ∃ δ, 0 < δ ∧ ∀ ⦃x : E⦄, ‖x‖ ≤ 1 → ∀ ⦃y : E⦄, ‖y‖ ≤ 1 → ε ≤ ‖x - y‖ → ‖x + y‖ ≤ 2 - δ\n[PROOFSTEP]\nobtain ⟨δ, hδ, h⟩ := exists_forall_sphere_dist_add_le_two_sub E hε'\n[GOAL]\ncase intro.intro\nE : Type u_1\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : UniformConvexSpace E\nε : ℝ\ninst✝ : NormedSpace ℝ E\nhε : 0 < ε\nhε' : 0 < ε / 3\nδ : ℝ\nhδ : 0 < δ\nh : ∀ ⦃x : E⦄, ‖x‖ = 1 → ∀ ⦃y : E⦄, ‖y‖ = 1 → ε / 3 ≤ ‖x - y‖ → ‖x + y‖ ≤ 2 - δ\n⊢ ∃ δ, 0 < δ ∧ ∀ ⦃x : E⦄, ‖x‖ ≤ 1 → ∀ ⦃y : E⦄, ‖y‖ ≤ 1 → ε ≤ ‖x - y‖ → ‖x + y‖ ≤ 2 - δ\n[PROOFSTEP]\nset δ' := min (1 / 2) (min (ε / 3) <| δ / 3)\n[GOAL]\ncase intro.intro\nE : Type u_1\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : UniformConvexSpace E\nε : ℝ\ninst✝ : NormedSpace ℝ E\nhε : 0 < ε\nhε' : 0 < ε / 3\nδ : ℝ\nhδ : 0 < δ\nh : ∀ ⦃x : E⦄, ‖x‖ = 1 → ∀ ⦃y : E⦄, ‖y‖ = 1 → ε / 3 ≤ ‖x - y‖ → ‖x + y‖ ≤ 2 - δ\nδ' : ℝ := min (1 / 2) (min (ε / 3) (δ / 3))\n⊢ ∃ δ, 0 < δ ∧ ∀ ⦃x : E⦄, ‖x‖ ≤ 1 → ∀ ⦃y : E⦄, ‖y‖ ≤ 1 → ε ≤ ‖x - y‖ → ‖x + y‖ ≤ 2 - δ\n[PROOFSTEP]\nrefine' ⟨δ', lt_min one_half_pos <| lt_min hε' (div_pos hδ zero_lt_three), fun x hx y hy hxy => _⟩\n[GOAL]\ncase intro.intro\nE : Type u_1\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : UniformConvexSpace E\nε : ℝ\ninst✝ : NormedSpace ℝ E\nhε : 0 < ε\nhε' : 0 < ε / 3\nδ : ℝ\nhδ : 0 < δ\nh : ∀ ⦃x : E⦄, ‖x‖ = 1 → ∀ ⦃y : E⦄, ‖y‖ = 1 → ε / 3 ≤ ‖x - y‖ → ‖x + y‖ ≤ 2 - δ\nδ' : ℝ := min (1 / 2) (min (ε / 3) (δ / 3))\nx : E\nhx : ‖x‖ ≤ 1\ny : E\nhy : ‖y‖ ≤ 1\nhxy : ε ≤ ‖x - y‖\n⊢ ‖x + y‖ ≤ 2 - δ'\n[PROOFSTEP]\nobtain hx' | hx' := le_or_lt ‖x‖ (1 - δ')\n[GOAL]\ncase intro.intro.inl\nE : Type u_1\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : UniformConvexSpace E\nε : ℝ\ninst✝ : NormedSpace ℝ E\nhε : 0 < ε\nhε' : 0 < ε / 3\nδ : ℝ\nhδ : 0 < δ\nh : ∀ ⦃x : E⦄, ‖x‖ = 1 → ∀ ⦃y : E⦄, ‖y‖ = 1 → ε / 3 ≤ ‖x - y‖ → ‖x + y‖ ≤ 2 - δ\nδ' : ℝ := min (1 / 2) (min (ε / 3) (δ / 3))\nx : E\nhx : ‖x‖ ≤ 1\ny : E\nhy : ‖y‖ ≤ 1\nhxy : ε ≤ ‖x - y‖\nhx' : ‖x‖ ≤ 1 - δ'\n⊢ ‖x + y‖ ≤ 2 - δ'\n[PROOFSTEP]\nrw [← one_add_one_eq_two]\n[GOAL]\ncase intro.intro.inl\nE : Type u_1\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : UniformConvexSpace E\nε : ℝ\ninst✝ : NormedSpace ℝ E\nhε : 0 < ε\nhε' : 0 < ε / 3\nδ : ℝ\nhδ : 0 < δ\nh : ∀ ⦃x : E⦄, ‖x‖ = 1 → ∀ ⦃y : E⦄, ‖y‖ = 1 → ε / 3 ≤ ‖x - y‖ → ‖x + y‖ ≤ 2 - δ\nδ' : ℝ := min (1 / 2) (min (ε / 3) (δ / 3))\nx : E\nhx : ‖x‖ ≤ 1\ny : E\nhy : ‖y‖ ≤ 1\nhxy : ε ≤ ‖x - y‖\nhx' : ‖x‖ ≤ 1 - δ'\n⊢ ‖x + y‖ ≤ 1 + 1 - δ'\n[PROOFSTEP]\nexact (norm_add_le_of_le hx' hy).trans (sub_add_eq_add_sub _ _ _).le\n[GOAL]\ncase intro.intro.inr\nE : Type u_1\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : UniformConvexSpace E\nε : ℝ\ninst✝ : NormedSpace ℝ E\nhε : 0 < ε\nhε' : 0 < ε / 3\nδ : ℝ\nhδ : 0 < δ\nh : ∀ ⦃x : E⦄, ‖x‖ = 1 → ∀ ⦃y : E⦄, ‖y‖ = 1 → ε / 3 ≤ ‖x - y‖ → ‖x + y‖ ≤ 2 - δ\nδ' : ℝ := min (1 / 2) (min (ε / 3) (δ / 3))\nx : E\nhx : ‖x‖ ≤ 1\ny : E\nhy : ‖y‖ ≤ 1\nhxy : ε ≤ ‖x - y‖\nhx' : 1 - δ' < ‖x‖\n⊢ ‖x + y‖ ≤ 2 - δ'\n[PROOFSTEP]\nobtain hy' | hy' := le_or_lt ‖y‖ (1 - δ')\n[GOAL]\ncase intro.intro.inr.inl\nE : Type u_1\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : UniformConvexSpace E\nε : ℝ\ninst✝ : NormedSpace ℝ E\nhε : 0 < ε\nhε' : 0 < ε / 3\nδ : ℝ\nhδ : 0 < δ\nh : ∀ ⦃x : E⦄, ‖x‖ = 1 → ∀ ⦃y : E⦄, ‖y‖ = 1 → ε / 3 ≤ ‖x - y‖ → ‖x + y‖ ≤ 2 - δ\nδ' : ℝ := min (1 / 2) (min (ε / 3) (δ / 3))\nx : E\nhx : ‖x‖ ≤ 1\ny : E\nhy : ‖y‖ ≤ 1\nhxy : ε ≤ ‖x - y‖\nhx' : 1 - δ' < ‖x‖\nhy' : ‖y‖ ≤ 1 - δ'\n⊢ ‖x + y‖ ≤ 2 - δ'\n[PROOFSTEP]\nrw [← one_add_one_eq_two]\n[GOAL]\ncase intro.intro.inr.inl\nE : Type u_1\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : UniformConvexSpace E\nε : ℝ\ninst✝ : NormedSpace ℝ E\nhε : 0 < ε\nhε' : 0 < ε / 3\nδ : ℝ\nhδ : 0 < δ\nh : ∀ ⦃x : E⦄, ‖x‖ = 1 → ∀ ⦃y : E⦄, ‖y‖ = 1 → ε / 3 ≤ ‖x - y‖ → ‖x + y‖ ≤ 2 - δ\nδ' : ℝ := min (1 / 2) (min (ε / 3) (δ / 3))\nx : E\nhx : ‖x‖ ≤ 1\ny : E\nhy : ‖y‖ ≤ 1\nhxy : ε ≤ ‖x - y‖\nhx' : 1 - δ' < ‖x‖\nhy' : ‖y‖ ≤ 1 - δ'\n⊢ ‖x + y‖ ≤ 1 + 1 - δ'\n[PROOFSTEP]\nexact (norm_add_le_of_le hx hy').trans (add_sub_assoc _ _ _).ge\n[GOAL]\ncase intro.intro.inr.inr\nE : Type u_1\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : UniformConvexSpace E\nε : ℝ\ninst✝ : NormedSpace ℝ E\nhε : 0 < ε\nhε' : 0 < ε / 3\nδ : ℝ\nhδ : 0 < δ\nh : ∀ ⦃x : E⦄, ‖x‖ = 1 → ∀ ⦃y : E⦄, ‖y‖ = 1 → ε / 3 ≤ ‖x - y‖ → ‖x + y‖ ≤ 2 - δ\nδ' : ℝ := min (1 / 2) (min (ε / 3) (δ / 3))\nx : E\nhx : ‖x‖ ≤ 1\ny : E\nhy : ‖y‖ ≤ 1\nhxy : ε ≤ ‖x - y‖\nhx' : 1 - δ' < ‖x‖\nhy' : 1 - δ' < ‖y‖\n⊢ ‖x + y‖ ≤ 2 - δ'\n[PROOFSTEP]\nhave hδ' : 0 < 1 - δ' := sub_pos_of_lt (min_lt_of_left_lt one_half_lt_one)\n[GOAL]\ncase intro.intro.inr.inr\nE : Type u_1\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : UniformConvexSpace E\nε : ℝ\ninst✝ : NormedSpace ℝ E\nhε : 0 < ε\nhε' : 0 < ε / 3\nδ : ℝ\nhδ : 0 < δ\nh : ∀ ⦃x : E⦄, ‖x‖ = 1 → ∀ ⦃y : E⦄, ‖y‖ = 1 → ε / 3 ≤ ‖x - y‖ → ‖x + y‖ ≤ 2 - δ\nδ' : ℝ := min (1 / 2) (min (ε / 3) (δ / 3))\nx : E\nhx : ‖x‖ ≤ 1\ny : E\nhy : ‖y‖ ≤ 1\nhxy : ε ≤ ‖x - y‖\nhx' : 1 - δ' < ‖x‖\nhy' : 1 - δ' < ‖y‖\nhδ' : 0 < 1 - δ'\n⊢ ‖x + y‖ ≤ 2 - δ'\n[PROOFSTEP]\nhave h₁ : ∀ z : E, 1 - δ' < ‖z‖ → ‖‖z‖⁻¹ • z‖ = 1 := by\n  rintro z hz\n  rw [norm_smul_of_nonneg (inv_nonneg.2 <| norm_nonneg _), inv_mul_cancel (hδ'.trans hz).ne']\n[GOAL]\nE : Type u_1\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : UniformConvexSpace E\nε : ℝ\ninst✝ : NormedSpace ℝ E\nhε : 0 < ε\nhε' : 0 < ε / 3\nδ : ℝ\nhδ : 0 < δ\nh : ∀ ⦃x : E⦄, ‖x‖ = 1 → ∀ ⦃y : E⦄, ‖y‖ = 1 → ε / 3 ≤ ‖x - y‖ → ‖x + y‖ ≤ 2 - δ\nδ' : ℝ := min (1 / 2) (min (ε / 3) (δ / 3))\nx : E\nhx : ‖x‖ ≤ 1\ny : E\nhy : ‖y‖ ≤ 1\nhxy : ε ≤ ‖x - y‖\nhx' : 1 - δ' < ‖x‖\nhy' : 1 - δ' < ‖y‖\nhδ' : 0 < 1 - δ'\n⊢ ∀ (z : E), 1 - δ' < ‖z‖ → ‖‖z‖⁻¹ • z‖ = 1\n[PROOFSTEP]\nrintro z hz\n[GOAL]\nE : Type u_1\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : UniformConvexSpace E\nε : ℝ\ninst✝ : NormedSpace ℝ E\nhε : 0 < ε\nhε' : 0 < ε / 3\nδ : ℝ\nhδ : 0 < δ\nh : ∀ ⦃x : E⦄, ‖x‖ = 1 → ∀ ⦃y : E⦄, ‖y‖ = 1 → ε / 3 ≤ ‖x - y‖ → ‖x + y‖ ≤ 2 - δ\nδ' : ℝ := min (1 / 2) (min (ε / 3) (δ / 3))\nx : E\nhx : ‖x‖ ≤ 1\ny : E\nhy : ‖y‖ ≤ 1\nhxy : ε ≤ ‖x - y‖\nhx' : 1 - δ' < ‖x‖\nhy' : 1 - δ' < ‖y‖\nhδ' : 0 < 1 - δ'\nz : E\nhz : 1 - δ' < ‖z‖\n⊢ ‖‖z‖⁻¹ • z‖ = 1\n[PROOFSTEP]\nrw [norm_smul_of_nonneg (inv_nonneg.2 <| norm_nonneg _), inv_mul_cancel (hδ'.trans hz).ne']\n[GOAL]\ncase intro.intro.inr.inr\nE : Type u_1\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : UniformConvexSpace E\nε : ℝ\ninst✝ : NormedSpace ℝ E\nhε : 0 < ε\nhε' : 0 < ε / 3\nδ : ℝ\nhδ : 0 < δ\nh : ∀ ⦃x : E⦄, ‖x‖ = 1 → ∀ ⦃y : E⦄, ‖y‖ = 1 → ε / 3 ≤ ‖x - y‖ → ‖x + y‖ ≤ 2 - δ\nδ' : ℝ := min (1 / 2) (min (ε / 3) (δ / 3))\nx : E\nhx : ‖x‖ ≤ 1\ny : E\nhy : ‖y‖ ≤ 1\nhxy : ε ≤ ‖x - y‖\nhx' : 1 - δ' < ‖x‖\nhy' : 1 - δ' < ‖y‖\nhδ' : 0 < 1 - δ'\nh₁ : ∀ (z : E), 1 - δ' < ‖z‖ → ‖‖z‖⁻¹ • z‖ = 1\n⊢ ‖x + y‖ ≤ 2 - δ'\n[PROOFSTEP]\nhave h₂ : ∀ z : E, ‖z‖ ≤ 1 → 1 - δ' ≤ ‖z‖ → ‖‖z‖⁻¹ • z - z‖ ≤ δ' :=\n  by\n  rintro z hz hδz\n  nth_rw 3 [← one_smul ℝ z]\n  rwa [← sub_smul, norm_smul_of_nonneg (sub_nonneg_of_le <| one_le_inv (hδ'.trans_le hδz) hz), sub_mul,\n    inv_mul_cancel (hδ'.trans_le hδz).ne', one_mul, sub_le_comm]\n[GOAL]\nE : Type u_1\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : UniformConvexSpace E\nε : ℝ\ninst✝ : NormedSpace ℝ E\nhε : 0 < ε\nhε' : 0 < ε / 3\nδ : ℝ\nhδ : 0 < δ\nh : ∀ ⦃x : E⦄, ‖x‖ = 1 → ∀ ⦃y : E⦄, ‖y‖ = 1 → ε / 3 ≤ ‖x - y‖ → ‖x + y‖ ≤ 2 - δ\nδ' : ℝ := min (1 / 2) (min (ε / 3) (δ / 3))\nx : E\nhx : ‖x‖ ≤ 1\ny : E\nhy : ‖y‖ ≤ 1\nhxy : ε ≤ ‖x - y‖\nhx' : 1 - δ' < ‖x‖\nhy' : 1 - δ' < ‖y‖\nhδ' : 0 < 1 - δ'\nh₁ : ∀ (z : E), 1 - δ' < ‖z‖ → ‖‖z‖⁻¹ • z‖ = 1\n⊢ ∀ (z : E), ‖z‖ ≤ 1 → 1 - δ' ≤ ‖z‖ → ‖‖z‖⁻¹ • z - z‖ ≤ δ'\n[PROOFSTEP]\nrintro z hz hδz\n[GOAL]\nE : Type u_1\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : UniformConvexSpace E\nε : ℝ\ninst✝ : NormedSpace ℝ E\nhε : 0 < ε\nhε' : 0 < ε / 3\nδ : ℝ\nhδ : 0 < δ\nh : ∀ ⦃x : E⦄, ‖x‖ = 1 → ∀ ⦃y : E⦄, ‖y‖ = 1 → ε / 3 ≤ ‖x - y‖ → ‖x + y‖ ≤ 2 - δ\nδ' : ℝ := min (1 / 2) (min (ε / 3) (δ / 3))\nx : E\nhx : ‖x‖ ≤ 1\ny : E\nhy : ‖y‖ ≤ 1\nhxy : ε ≤ ‖x - y‖\nhx' : 1 - δ' < ‖x‖\nhy' : 1 - δ' < ‖y‖\nhδ' : 0 < 1 - δ'\nh₁ : ∀ (z : E), 1 - δ' < ‖z‖ → ‖‖z‖⁻¹ • z‖ = 1\nz : E\nhz : ‖z‖ ≤ 1\nhδz : 1 - δ' ≤ ‖z‖\n⊢ ‖‖z‖⁻¹ • z - z‖ ≤ δ'\n[PROOFSTEP]\nnth_rw 3 [← one_smul ℝ z]\n[GOAL]\nE : Type u_1\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : UniformConvexSpace E\nε : ℝ\ninst✝ : NormedSpace ℝ E\nhε : 0 < ε\nhε' : 0 < ε / 3\nδ : ℝ\nhδ : 0 < δ\nh : ∀ ⦃x : E⦄, ‖x‖ = 1 → ∀ ⦃y : E⦄, ‖y‖ = 1 → ε / 3 ≤ ‖x - y‖ → ‖x + y‖ ≤ 2 - δ\nδ' : ℝ := min (1 / 2) (min (ε / 3) (δ / 3))\nx : E\nhx : ‖x‖ ≤ 1\ny : E\nhy : ‖y‖ ≤ 1\nhxy : ε ≤ ‖x - y‖\nhx' : 1 - δ' < ‖x‖\nhy' : 1 - δ' < ‖y‖\nhδ' : 0 < 1 - δ'\nh₁ : ∀ (z : E), 1 - δ' < ‖z‖ → ‖‖z‖⁻¹ • z‖ = 1\nz : E\nhz : ‖z‖ ≤ 1\nhδz : 1 - δ' ≤ ‖z‖\n⊢ ‖‖z‖⁻¹ • z - 1 • z‖ ≤ δ'\n[PROOFSTEP]\nrwa [← sub_smul, norm_smul_of_nonneg (sub_nonneg_of_le <| one_le_inv (hδ'.trans_le hδz) hz), sub_mul,\n  inv_mul_cancel (hδ'.trans_le hδz).ne', one_mul, sub_le_comm]\n[GOAL]\ncase intro.intro.inr.inr\nE : Type u_1\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : UniformConvexSpace E\nε : ℝ\ninst✝ : NormedSpace ℝ E\nhε : 0 < ε\nhε' : 0 < ε / 3\nδ : ℝ\nhδ : 0 < δ\nh : ∀ ⦃x : E⦄, ‖x‖ = 1 → ∀ ⦃y : E⦄, ‖y‖ = 1 → ε / 3 ≤ ‖x - y‖ → ‖x + y‖ ≤ 2 - δ\nδ' : ℝ := min (1 / 2) (min (ε / 3) (δ / 3))\nx : E\nhx : ‖x‖ ≤ 1\ny : E\nhy : ‖y‖ ≤ 1\nhxy : ε ≤ ‖x - y‖\nhx' : 1 - δ' < ‖x‖\nhy' : 1 - δ' < ‖y‖\nhδ' : 0 < 1 - δ'\nh₁ : ∀ (z : E), 1 - δ' < ‖z‖ → ‖‖z‖⁻¹ • z‖ = 1\nh₂ : ∀ (z : E), ‖z‖ ≤ 1 → 1 - δ' ≤ ‖z‖ → ‖‖z‖⁻¹ • z - z‖ ≤ δ'\n⊢ ‖x + y‖ ≤ 2 - δ'\n[PROOFSTEP]\nset x' := ‖x‖⁻¹ • x\n[GOAL]\ncase intro.intro.inr.inr\nE : Type u_1\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : UniformConvexSpace E\nε : ℝ\ninst✝ : NormedSpace ℝ E\nhε : 0 < ε\nhε' : 0 < ε / 3\nδ : ℝ\nhδ : 0 < δ\nh : ∀ ⦃x : E⦄, ‖x‖ = 1 → ∀ ⦃y : E⦄, ‖y‖ = 1 → ε / 3 ≤ ‖x - y‖ → ‖x + y‖ ≤ 2 - δ\nδ' : ℝ := min (1 / 2) (min (ε / 3) (δ / 3))\nx : E\nhx : ‖x‖ ≤ 1\ny : E\nhy : ‖y‖ ≤ 1\nhxy : ε ≤ ‖x - y‖\nhx' : 1 - δ' < ‖x‖\nhy' : 1 - δ' < ‖y‖\nhδ' : 0 < 1 - δ'\nh₁ : ∀ (z : E), 1 - δ' < ‖z‖ → ‖‖z‖⁻¹ • z‖ = 1\nh₂ : ∀ (z : E), ‖z‖ ≤ 1 → 1 - δ' ≤ ‖z‖ → ‖‖z‖⁻¹ • z - z‖ ≤ δ'\nx' : E := ‖x‖⁻¹ • x\n⊢ ‖x + y‖ ≤ 2 - δ'\n[PROOFSTEP]\nset y' := ‖y‖⁻¹ • y\n[GOAL]\ncase intro.intro.inr.inr\nE : Type u_1\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : UniformConvexSpace E\nε : ℝ\ninst✝ : NormedSpace ℝ E\nhε : 0 < ε\nhε' : 0 < ε / 3\nδ : ℝ\nhδ : 0 < δ\nh : ∀ ⦃x : E⦄, ‖x‖ = 1 → ∀ ⦃y : E⦄, ‖y‖ = 1 → ε / 3 ≤ ‖x - y‖ → ‖x + y‖ ≤ 2 - δ\nδ' : ℝ := min (1 / 2) (min (ε / 3) (δ / 3))\nx : E\nhx : ‖x‖ ≤ 1\ny : E\nhy : ‖y‖ ≤ 1\nhxy : ε ≤ ‖x - y‖\nhx' : 1 - δ' < ‖x‖\nhy' : 1 - δ' < ‖y‖\nhδ' : 0 < 1 - δ'\nh₁ : ∀ (z : E), 1 - δ' < ‖z‖ → ‖‖z‖⁻¹ • z‖ = 1\nh₂ : ∀ (z : E), ‖z‖ ≤ 1 → 1 - δ' ≤ ‖z‖ → ‖‖z‖⁻¹ • z - z‖ ≤ δ'\nx' : E := ‖x‖⁻¹ • x\ny' : E := ‖y‖⁻¹ • y\n⊢ ‖x + y‖ ≤ 2 - δ'\n[PROOFSTEP]\nhave hxy' : ε / 3 ≤ ‖x' - y'‖ :=\n  calc\n    ε / 3 = ε - (ε / 3 + ε / 3) := by ring\n    _ ≤ ‖x - y‖ - (‖x' - x‖ + ‖y' - y‖) := by\n      gcongr\n      · exact (h₂ _ hx hx'.le).trans <| min_le_of_right_le <| min_le_left _ _\n      · exact (h₂ _ hy hy'.le).trans <| min_le_of_right_le <| min_le_left _ _\n    _ ≤ _ := by\n      have : ∀ x' y', x - y = x' - y' + (x - x') + (y' - y) := fun _ _ => by abel\n      rw [sub_le_iff_le_add, norm_sub_rev _ x, ← add_assoc, this]\n      exact norm_add₃_le _ _ _\n[GOAL]\nE : Type u_1\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : UniformConvexSpace E\nε : ℝ\ninst✝ : NormedSpace ℝ E\nhε : 0 < ε\nhε' : 0 < ε / 3\nδ : ℝ\nhδ : 0 < δ\nh : ∀ ⦃x : E⦄, ‖x‖ = 1 → ∀ ⦃y : E⦄, ‖y‖ = 1 → ε / 3 ≤ ‖x - y‖ → ‖x + y‖ ≤ 2 - δ\nδ' : ℝ := min (1 / 2) (min (ε / 3) (δ / 3))\nx : E\nhx : ‖x‖ ≤ 1\ny : E\nhy : ‖y‖ ≤ 1\nhxy : ε ≤ ‖x - y‖\nhx' : 1 - δ' < ‖x‖\nhy' : 1 - δ' < ‖y‖\nhδ' : 0 < 1 - δ'\nh₁ : ∀ (z : E), 1 - δ' < ‖z‖ → ‖‖z‖⁻¹ • z‖ = 1\nh₂ : ∀ (z : E), ‖z‖ ≤ 1 → 1 - δ' ≤ ‖z‖ → ‖‖z‖⁻¹ • z - z‖ ≤ δ'\nx' : E := ‖x‖⁻¹ • x\ny' : E := ‖y‖⁻¹ • y\n⊢ ε / 3 = ε - (ε / 3 + ε / 3)\n[PROOFSTEP]\nring\n[GOAL]\nE : Type u_1\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : UniformConvexSpace E\nε : ℝ\ninst✝ : NormedSpace ℝ E\nhε : 0 < ε\nhε' : 0 < ε / 3\nδ : ℝ\nhδ : 0 < δ\nh : ∀ ⦃x : E⦄, ‖x‖ = 1 → ∀ ⦃y : E⦄, ‖y‖ = 1 → ε / 3 ≤ ‖x - y‖ → ‖x + y‖ ≤ 2 - δ\nδ' : ℝ := min (1 / 2) (min (ε / 3) (δ / 3))\nx : E\nhx : ‖x‖ ≤ 1\ny : E\nhy : ‖y‖ ≤ 1\nhxy : ε ≤ ‖x - y‖\nhx' : 1 - δ' < ‖x‖\nhy' : 1 - δ' < ‖y‖\nhδ' : 0 < 1 - δ'\nh₁ : ∀ (z : E), 1 - δ' < ‖z‖ → ‖‖z‖⁻¹ • z‖ = 1\nh₂ : ∀ (z : E), ‖z‖ ≤ 1 → 1 - δ' ≤ ‖z‖ → ‖‖z‖⁻¹ • z - z‖ ≤ δ'\nx' : E := ‖x‖⁻¹ • x\ny' : E := ‖y‖⁻¹ • y\n⊢ ε - (ε / 3 + ε / 3) ≤ ‖x - y‖ - (‖x' - x‖ + ‖y' - y‖)\n[PROOFSTEP]\ngcongr\n[GOAL]\ncase hcd.h₁\nE : Type u_1\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : UniformConvexSpace E\nε : ℝ\ninst✝ : NormedSpace ℝ E\nhε : 0 < ε\nhε' : 0 < ε / 3\nδ : ℝ\nhδ : 0 < δ\nh : ∀ ⦃x : E⦄, ‖x‖ = 1 → ∀ ⦃y : E⦄, ‖y‖ = 1 → ε / 3 ≤ ‖x - y‖ → ‖x + y‖ ≤ 2 - δ\nδ' : ℝ := min (1 / 2) (min (ε / 3) (δ / 3))\nx : E\nhx : ‖x‖ ≤ 1\ny : E\nhy : ‖y‖ ≤ 1\nhxy : ε ≤ ‖x - y‖\nhx' : 1 - δ' < ‖x‖\nhy' : 1 - δ' < ‖y‖\nhδ' : 0 < 1 - δ'\nh₁ : ∀ (z : E), 1 - δ' < ‖z‖ → ‖‖z‖⁻¹ • z‖ = 1\nh₂ : ∀ (z : E), ‖z‖ ≤ 1 → 1 - δ' ≤ ‖z‖ → ‖‖z‖⁻¹ • z - z‖ ≤ δ'\nx' : E := ‖x‖⁻¹ • x\ny' : E := ‖y‖⁻¹ • y\n⊢ ‖x' - x‖ ≤ ε / 3\n[PROOFSTEP]\nexact (h₂ _ hx hx'.le).trans <| min_le_of_right_le <| min_le_left _ _\n[GOAL]\ncase hcd.h₂\nE : Type u_1\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : UniformConvexSpace E\nε : ℝ\ninst✝ : NormedSpace ℝ E\nhε : 0 < ε\nhε' : 0 < ε / 3\nδ : ℝ\nhδ : 0 < δ\nh : ∀ ⦃x : E⦄, ‖x‖ = 1 → ∀ ⦃y : E⦄, ‖y‖ = 1 → ε / 3 ≤ ‖x - y‖ → ‖x + y‖ ≤ 2 - δ\nδ' : ℝ := min (1 / 2) (min (ε / 3) (δ / 3))\nx : E\nhx : ‖x‖ ≤ 1\ny : E\nhy : ‖y‖ ≤ 1\nhxy : ε ≤ ‖x - y‖\nhx' : 1 - δ' < ‖x‖\nhy' : 1 - δ' < ‖y‖\nhδ' : 0 < 1 - δ'\nh₁ : ∀ (z : E), 1 - δ' < ‖z‖ → ‖‖z‖⁻¹ • z‖ = 1\nh₂ : ∀ (z : E), ‖z‖ ≤ 1 → 1 - δ' ≤ ‖z‖ → ‖‖z‖⁻¹ • z - z‖ ≤ δ'\nx' : E := ‖x‖⁻¹ • x\ny' : E := ‖y‖⁻¹ • y\n⊢ ‖y' - y‖ ≤ ε / 3\n[PROOFSTEP]\nexact (h₂ _ hy hy'.le).trans <| min_le_of_right_le <| min_le_left _ _\n[GOAL]\nE : Type u_1\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : UniformConvexSpace E\nε : ℝ\ninst✝ : NormedSpace ℝ E\nhε : 0 < ε\nhε' : 0 < ε / 3\nδ : ℝ\nhδ : 0 < δ\nh : ∀ ⦃x : E⦄, ‖x‖ = 1 → ∀ ⦃y : E⦄, ‖y‖ = 1 → ε / 3 ≤ ‖x - y‖ → ‖x + y‖ ≤ 2 - δ\nδ' : ℝ := min (1 / 2) (min (ε / 3) (δ / 3))\nx : E\nhx : ‖x‖ ≤ 1\ny : E\nhy : ‖y‖ ≤ 1\nhxy : ε ≤ ‖x - y‖\nhx' : 1 - δ' < ‖x‖\nhy' : 1 - δ' < ‖y‖\nhδ' : 0 < 1 - δ'\nh₁ : ∀ (z : E), 1 - δ' < ‖z‖ → ‖‖z‖⁻¹ • z‖ = 1\nh₂ : ∀ (z : E), ‖z‖ ≤ 1 → 1 - δ' ≤ ‖z‖ → ‖‖z‖⁻¹ • z - z‖ ≤ δ'\nx' : E := ‖x‖⁻¹ • x\ny' : E := ‖y‖⁻¹ • y\n⊢ ‖x - y‖ - (‖x' - x‖ + ‖y' - y‖) ≤ ‖x' - y'‖\n[PROOFSTEP]\nhave : ∀ x' y', x - y = x' - y' + (x - x') + (y' - y) := fun _ _ => by abel\n[GOAL]\nE : Type u_1\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : UniformConvexSpace E\nε : ℝ\ninst✝ : NormedSpace ℝ E\nhε : 0 < ε\nhε' : 0 < ε / 3\nδ : ℝ\nhδ : 0 < δ\nh : ∀ ⦃x : E⦄, ‖x‖ = 1 → ∀ ⦃y : E⦄, ‖y‖ = 1 → ε / 3 ≤ ‖x - y‖ → ‖x + y‖ ≤ 2 - δ\nδ' : ℝ := min (1 / 2) (min (ε / 3) (δ / 3))\nx : E\nhx : ‖x‖ ≤ 1\ny : E\nhy : ‖y‖ ≤ 1\nhxy : ε ≤ ‖x - y‖\nhx' : 1 - δ' < ‖x‖\nhy' : 1 - δ' < ‖y‖\nhδ' : 0 < 1 - δ'\nh₁ : ∀ (z : E), 1 - δ' < ‖z‖ → ‖‖z‖⁻¹ • z‖ = 1\nh₂ : ∀ (z : E), ‖z‖ ≤ 1 → 1 - δ' ≤ ‖z‖ → ‖‖z‖⁻¹ • z - z‖ ≤ δ'\nx' : E := ‖x‖⁻¹ • x\ny' : E := ‖y‖⁻¹ • y\nx✝¹ x✝ : E\n⊢ x - y = x✝¹ - x✝ + (x - x✝¹) + (x✝ - y)\n[PROOFSTEP]\nabel\n[GOAL]\nE : Type u_1\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : UniformConvexSpace E\nε : ℝ\ninst✝ : NormedSpace ℝ E\nhε : 0 < ε\nhε' : 0 < ε / 3\nδ : ℝ\nhδ : 0 < δ\nh : ∀ ⦃x : E⦄, ‖x‖ = 1 → ∀ ⦃y : E⦄, ‖y‖ = 1 → ε / 3 ≤ ‖x - y‖ → ‖x + y‖ ≤ 2 - δ\nδ' : ℝ := min (1 / 2) (min (ε / 3) (δ / 3))\nx : E\nhx : ‖x‖ ≤ 1\ny : E\nhy : ‖y‖ ≤ 1\nhxy : ε ≤ ‖x - y‖\nhx' : 1 - δ' < ‖x‖\nhy' : 1 - δ' < ‖y‖\nhδ' : 0 < 1 - δ'\nh₁ : ∀ (z : E), 1 - δ' < ‖z‖ → ‖‖z‖⁻¹ • z‖ = 1\nh₂ : ∀ (z : E), ‖z‖ ≤ 1 → 1 - δ' ≤ ‖z‖ → ‖‖z‖⁻¹ • z - z‖ ≤ δ'\nx' : E := ‖x‖⁻¹ • x\ny' : E := ‖y‖⁻¹ • y\nx✝¹ x✝ : E\n⊢ x - y = x✝¹ - x✝ + (x - x✝¹) + (x✝ - y)\n[PROOFSTEP]\nabel\n[GOAL]\nE : Type u_1\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : UniformConvexSpace E\nε : ℝ\ninst✝ : NormedSpace ℝ E\nhε : 0 < ε\nhε' : 0 < ε / 3\nδ : ℝ\nhδ : 0 < δ\nh : ∀ ⦃x : E⦄, ‖x‖ = 1 → ∀ ⦃y : E⦄, ‖y‖ = 1 → ε / 3 ≤ ‖x - y‖ → ‖x + y‖ ≤ 2 - δ\nδ' : ℝ := min (1 / 2) (min (ε / 3) (δ / 3))\nx : E\nhx : ‖x‖ ≤ 1\ny : E\nhy : ‖y‖ ≤ 1\nhxy : ε ≤ ‖x - y‖\nhx' : 1 - δ' < ‖x‖\nhy' : 1 - δ' < ‖y‖\nhδ' : 0 < 1 - δ'\nh₁ : ∀ (z : E), 1 - δ' < ‖z‖ → ‖‖z‖⁻¹ • z‖ = 1\nh₂ : ∀ (z : E), ‖z‖ ≤ 1 → 1 - δ' ≤ ‖z‖ → ‖‖z‖⁻¹ • z - z‖ ≤ δ'\nx' : E := ‖x‖⁻¹ • x\ny' : E := ‖y‖⁻¹ • y\nthis : ∀ (x' y' : E), x - y = x' - y' + (x - x') + (y' - y)\n⊢ ‖x - y‖ - (‖x' - x‖ + ‖y' - y‖) ≤ ‖x' - y'‖\n[PROOFSTEP]\nrw [sub_le_iff_le_add, norm_sub_rev _ x, ← add_assoc, this]\n[GOAL]\nE : Type u_1\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : UniformConvexSpace E\nε : ℝ\ninst✝ : NormedSpace ℝ E\nhε : 0 < ε\nhε' : 0 < ε / 3\nδ : ℝ\nhδ : 0 < δ\nh : ∀ ⦃x : E⦄, ‖x‖ = 1 → ∀ ⦃y : E⦄, ‖y‖ = 1 → ε / 3 ≤ ‖x - y‖ → ‖x + y‖ ≤ 2 - δ\nδ' : ℝ := min (1 / 2) (min (ε / 3) (δ / 3))\nx : E\nhx : ‖x‖ ≤ 1\ny : E\nhy : ‖y‖ ≤ 1\nhxy : ε ≤ ‖x - y‖\nhx' : 1 - δ' < ‖x‖\nhy' : 1 - δ' < ‖y‖\nhδ' : 0 < 1 - δ'\nh₁ : ∀ (z : E), 1 - δ' < ‖z‖ → ‖‖z‖⁻¹ • z‖ = 1\nh₂ : ∀ (z : E), ‖z‖ ≤ 1 → 1 - δ' ≤ ‖z‖ → ‖‖z‖⁻¹ • z - z‖ ≤ δ'\nx' : E := ‖x‖⁻¹ • x\ny' : E := ‖y‖⁻¹ • y\nthis : ∀ (x' y' : E), x - y = x' - y' + (x - x') + (y' - y)\n⊢ ‖?x' - ?y' + (x - ?x') + (?y' - y)‖ ≤ ‖x' - y'‖ + ‖x - x'‖ + ‖y' - y‖\ncase x'\nE : Type u_1\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : UniformConvexSpace E\nε : ℝ\ninst✝ : NormedSpace ℝ E\nhε : 0 < ε\nhε' : 0 < ε / 3\nδ : ℝ\nhδ : 0 < δ\nh : ∀ ⦃x : E⦄, ‖x‖ = 1 → ∀ ⦃y : E⦄, ‖y‖ = 1 → ε / 3 ≤ ‖x - y‖ → ‖x + y‖ ≤ 2 - δ\nδ' : ℝ := min (1 / 2) (min (ε / 3) (δ / 3))\nx : E\nhx : ‖x‖ ≤ 1\ny : E\nhy : ‖y‖ ≤ 1\nhxy : ε ≤ ‖x - y‖\nhx' : 1 - δ' < ‖x‖\nhy' : 1 - δ' < ‖y‖\nhδ' : 0 < 1 - δ'\nh₁ : ∀ (z : E), 1 - δ' < ‖z‖ → ‖‖z‖⁻¹ • z‖ = 1\nh₂ : ∀ (z : E), ‖z‖ ≤ 1 → 1 - δ' ≤ ‖z‖ → ‖‖z‖⁻¹ • z - z‖ ≤ δ'\nx' : E := ‖x‖⁻¹ • x\ny' : E := ‖y‖⁻¹ • y\nthis : ∀ (x' y' : E), x - y = x' - y' + (x - x') + (y' - y)\n⊢ E\ncase y'\nE : Type u_1\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : UniformConvexSpace E\nε : ℝ\ninst✝ : NormedSpace ℝ E\nhε : 0 < ε\nhε' : 0 < ε / 3\nδ : ℝ\nhδ : 0 < δ\nh : ∀ ⦃x : E⦄, ‖x‖ = 1 → ∀ ⦃y : E⦄, ‖y‖ = 1 → ε / 3 ≤ ‖x - y‖ → ‖x + y‖ ≤ 2 - δ\nδ' : ℝ := min (1 / 2) (min (ε / 3) (δ / 3))\nx : E\nhx : ‖x‖ ≤ 1\ny : E\nhy : ‖y‖ ≤ 1\nhxy : ε ≤ ‖x - y‖\nhx' : 1 - δ' < ‖x‖\nhy' : 1 - δ' < ‖y‖\nhδ' : 0 < 1 - δ'\nh₁ : ∀ (z : E), 1 - δ' < ‖z‖ → ‖‖z‖⁻¹ • z‖ = 1\nh₂ : ∀ (z : E), ‖z‖ ≤ 1 → 1 - δ' ≤ ‖z‖ → ‖‖z‖⁻¹ • z - z‖ ≤ δ'\nx' : E := ‖x‖⁻¹ • x\ny' : E := ‖y‖⁻¹ • y\nthis : ∀ (x' y' : E), x - y = x' - y' + (x - x') + (y' - y)\n⊢ E\n[PROOFSTEP]\nexact norm_add₃_le _ _ _\n[GOAL]\ncase intro.intro.inr.inr\nE : Type u_1\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : UniformConvexSpace E\nε : ℝ\ninst✝ : NormedSpace ℝ E\nhε : 0 < ε\nhε' : 0 < ε / 3\nδ : ℝ\nhδ : 0 < δ\nh : ∀ ⦃x : E⦄, ‖x‖ = 1 → ∀ ⦃y : E⦄, ‖y‖ = 1 → ε / 3 ≤ ‖x - y‖ → ‖x + y‖ ≤ 2 - δ\nδ' : ℝ := min (1 / 2) (min (ε / 3) (δ / 3))\nx : E\nhx : ‖x‖ ≤ 1\ny : E\nhy : ‖y‖ ≤ 1\nhxy : ε ≤ ‖x - y‖\nhx' : 1 - δ' < ‖x‖\nhy' : 1 - δ' < ‖y‖\nhδ' : 0 < 1 - δ'\nh₁ : ∀ (z : E), 1 - δ' < ‖z‖ → ‖‖z‖⁻¹ • z‖ = 1\nh₂ : ∀ (z : E), ‖z‖ ≤ 1 → 1 - δ' ≤ ‖z‖ → ‖‖z‖⁻¹ • z - z‖ ≤ δ'\nx' : E := ‖x‖⁻¹ • x\ny' : E := ‖y‖⁻¹ • y\nhxy' : ε / 3 ≤ ‖x' - y'‖\n⊢ ‖x + y‖ ≤ 2 - δ'\n[PROOFSTEP]\ncalc\n  ‖x + y‖ ≤ ‖x' + y'‖ + ‖x' - x‖ + ‖y' - y‖ :=\n    by\n    have : ∀ x' y', x + y = x' + y' + (x - x') + (y - y') := fun _ _ => by abel\n    rw [norm_sub_rev, norm_sub_rev y', this]\n    exact norm_add₃_le _ _ _\n  _ ≤ 2 - δ + δ' + δ' := (add_le_add_three (h (h₁ _ hx') (h₁ _ hy') hxy') (h₂ _ hx hx'.le) (h₂ _ hy hy'.le))\n  _ ≤ 2 - δ' := by\n    rw [← le_sub_iff_add_le, ← le_sub_iff_add_le, sub_sub, sub_sub]\n    refine' sub_le_sub_left _ _\n    ring_nf\n    rw [← mul_div_cancel' δ three_ne_zero]\n    norm_num\n      -- Porting note: these three extra lines needed to make `exact` work\n    have : 3 * (δ / 3) * (1 / 3) = δ / 3 := by linarith\n    rw [this, mul_comm]\n    gcongr\n    exact min_le_of_right_le <| min_le_right _ _\n[GOAL]\nE : Type u_1\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : UniformConvexSpace E\nε : ℝ\ninst✝ : NormedSpace ℝ E\nhε : 0 < ε\nhε' : 0 < ε / 3\nδ : ℝ\nhδ : 0 < δ\nh : ∀ ⦃x : E⦄, ‖x‖ = 1 → ∀ ⦃y : E⦄, ‖y‖ = 1 → ε / 3 ≤ ‖x - y‖ → ‖x + y‖ ≤ 2 - δ\nδ' : ℝ := min (1 / 2) (min (ε / 3) (δ / 3))\nx : E\nhx : ‖x‖ ≤ 1\ny : E\nhy : ‖y‖ ≤ 1\nhxy : ε ≤ ‖x - y‖\nhx' : 1 - δ' < ‖x‖\nhy' : 1 - δ' < ‖y‖\nhδ' : 0 < 1 - δ'\nh₁ : ∀ (z : E), 1 - δ' < ‖z‖ → ‖‖z‖⁻¹ • z‖ = 1\nh₂ : ∀ (z : E), ‖z‖ ≤ 1 → 1 - δ' ≤ ‖z‖ → ‖‖z‖⁻¹ • z - z‖ ≤ δ'\nx' : E := ‖x‖⁻¹ • x\ny' : E := ‖y‖⁻¹ • y\nhxy' : ε / 3 ≤ ‖x' - y'‖\n⊢ ‖x + y‖ ≤ ‖x' + y'‖ + ‖x' - x‖ + ‖y' - y‖\n[PROOFSTEP]\nhave : ∀ x' y', x + y = x' + y' + (x - x') + (y - y') := fun _ _ => by abel\n[GOAL]\nE : Type u_1\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : UniformConvexSpace E\nε : ℝ\ninst✝ : NormedSpace ℝ E\nhε : 0 < ε\nhε' : 0 < ε / 3\nδ : ℝ\nhδ : 0 < δ\nh : ∀ ⦃x : E⦄, ‖x‖ = 1 → ∀ ⦃y : E⦄, ‖y‖ = 1 → ε / 3 ≤ ‖x - y‖ → ‖x + y‖ ≤ 2 - δ\nδ' : ℝ := min (1 / 2) (min (ε / 3) (δ / 3))\nx : E\nhx : ‖x‖ ≤ 1\ny : E\nhy : ‖y‖ ≤ 1\nhxy : ε ≤ ‖x - y‖\nhx' : 1 - δ' < ‖x‖\nhy' : 1 - δ' < ‖y‖\nhδ' : 0 < 1 - δ'\nh₁ : ∀ (z : E), 1 - δ' < ‖z‖ → ‖‖z‖⁻¹ • z‖ = 1\nh₂ : ∀ (z : E), ‖z‖ ≤ 1 → 1 - δ' ≤ ‖z‖ → ‖‖z‖⁻¹ • z - z‖ ≤ δ'\nx' : E := ‖x‖⁻¹ • x\ny' : E := ‖y‖⁻¹ • y\nhxy' : ε / 3 ≤ ‖x' - y'‖\nx✝¹ x✝ : E\n⊢ x + y = x✝¹ + x✝ + (x - x✝¹) + (y - x✝)\n[PROOFSTEP]\nabel\n[GOAL]\nE : Type u_1\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : UniformConvexSpace E\nε : ℝ\ninst✝ : NormedSpace ℝ E\nhε : 0 < ε\nhε' : 0 < ε / 3\nδ : ℝ\nhδ : 0 < δ\nh : ∀ ⦃x : E⦄, ‖x‖ = 1 → ∀ ⦃y : E⦄, ‖y‖ = 1 → ε / 3 ≤ ‖x - y‖ → ‖x + y‖ ≤ 2 - δ\nδ' : ℝ := min (1 / 2) (min (ε / 3) (δ / 3))\nx : E\nhx : ‖x‖ ≤ 1\ny : E\nhy : ‖y‖ ≤ 1\nhxy : ε ≤ ‖x - y‖\nhx' : 1 - δ' < ‖x‖\nhy' : 1 - δ' < ‖y‖\nhδ' : 0 < 1 - δ'\nh₁ : ∀ (z : E), 1 - δ' < ‖z‖ → ‖‖z‖⁻¹ • z‖ = 1\nh₂ : ∀ (z : E), ‖z‖ ≤ 1 → 1 - δ' ≤ ‖z‖ → ‖‖z‖⁻¹ • z - z‖ ≤ δ'\nx' : E := ‖x‖⁻¹ • x\ny' : E := ‖y‖⁻¹ • y\nhxy' : ε / 3 ≤ ‖x' - y'‖\nx✝¹ x✝ : E\n⊢ x + y = x✝¹ + x✝ + (x - x✝¹) + (y - x✝)\n[PROOFSTEP]\nabel\n[GOAL]\nE : Type u_1\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : UniformConvexSpace E\nε : ℝ\ninst✝ : NormedSpace ℝ E\nhε : 0 < ε\nhε' : 0 < ε / 3\nδ : ℝ\nhδ : 0 < δ\nh : ∀ ⦃x : E⦄, ‖x‖ = 1 → ∀ ⦃y : E⦄, ‖y‖ = 1 → ε / 3 ≤ ‖x - y‖ → ‖x + y‖ ≤ 2 - δ\nδ' : ℝ := min (1 / 2) (min (ε / 3) (δ / 3))\nx : E\nhx : ‖x‖ ≤ 1\ny : E\nhy : ‖y‖ ≤ 1\nhxy : ε ≤ ‖x - y‖\nhx' : 1 - δ' < ‖x‖\nhy' : 1 - δ' < ‖y‖\nhδ' : 0 < 1 - δ'\nh₁ : ∀ (z : E), 1 - δ' < ‖z‖ → ‖‖z‖⁻¹ • z‖ = 1\nh₂ : ∀ (z : E), ‖z‖ ≤ 1 → 1 - δ' ≤ ‖z‖ → ‖‖z‖⁻¹ • z - z‖ ≤ δ'\nx' : E := ‖x‖⁻¹ • x\ny' : E := ‖y‖⁻¹ • y\nhxy' : ε / 3 ≤ ‖x' - y'‖\nthis : ∀ (x' y' : E), x + y = x' + y' + (x - x') + (y - y')\n⊢ ‖x + y‖ ≤ ‖x' + y'‖ + ‖x' - x‖ + ‖y' - y‖\n[PROOFSTEP]\nrw [norm_sub_rev, norm_sub_rev y', this]\n[GOAL]\nE : Type u_1\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : UniformConvexSpace E\nε : ℝ\ninst✝ : NormedSpace ℝ E\nhε : 0 < ε\nhε' : 0 < ε / 3\nδ : ℝ\nhδ : 0 < δ\nh : ∀ ⦃x : E⦄, ‖x‖ = 1 → ∀ ⦃y : E⦄, ‖y‖ = 1 → ε / 3 ≤ ‖x - y‖ → ‖x + y‖ ≤ 2 - δ\nδ' : ℝ := min (1 / 2) (min (ε / 3) (δ / 3))\nx : E\nhx : ‖x‖ ≤ 1\ny : E\nhy : ‖y‖ ≤ 1\nhxy : ε ≤ ‖x - y‖\nhx' : 1 - δ' < ‖x‖\nhy' : 1 - δ' < ‖y‖\nhδ' : 0 < 1 - δ'\nh₁ : ∀ (z : E), 1 - δ' < ‖z‖ → ‖‖z‖⁻¹ • z‖ = 1\nh₂ : ∀ (z : E), ‖z‖ ≤ 1 → 1 - δ' ≤ ‖z‖ → ‖‖z‖⁻¹ • z - z‖ ≤ δ'\nx' : E := ‖x‖⁻¹ • x\ny' : E := ‖y‖⁻¹ • y\nhxy' : ε / 3 ≤ ‖x' - y'‖\nthis : ∀ (x' y' : E), x + y = x' + y' + (x - x') + (y - y')\n⊢ ‖?x' + ?y' + (x - ?x') + (y - ?y')‖ ≤ ‖x' + y'‖ + ‖x - x'‖ + ‖y - y'‖\ncase x'\nE : Type u_1\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : UniformConvexSpace E\nε : ℝ\ninst✝ : NormedSpace ℝ E\nhε : 0 < ε\nhε' : 0 < ε / 3\nδ : ℝ\nhδ : 0 < δ\nh : ∀ ⦃x : E⦄, ‖x‖ = 1 → ∀ ⦃y : E⦄, ‖y‖ = 1 → ε / 3 ≤ ‖x - y‖ → ‖x + y‖ ≤ 2 - δ\nδ' : ℝ := min (1 / 2) (min (ε / 3) (δ / 3))\nx : E\nhx : ‖x‖ ≤ 1\ny : E\nhy : ‖y‖ ≤ 1\nhxy : ε ≤ ‖x - y‖\nhx' : 1 - δ' < ‖x‖\nhy' : 1 - δ' < ‖y‖\nhδ' : 0 < 1 - δ'\nh₁ : ∀ (z : E), 1 - δ' < ‖z‖ → ‖‖z‖⁻¹ • z‖ = 1\nh₂ : ∀ (z : E), ‖z‖ ≤ 1 → 1 - δ' ≤ ‖z‖ → ‖‖z‖⁻¹ • z - z‖ ≤ δ'\nx' : E := ‖x‖⁻¹ • x\ny' : E := ‖y‖⁻¹ • y\nhxy' : ε / 3 ≤ ‖x' - y'‖\nthis : ∀ (x' y' : E), x + y = x' + y' + (x - x') + (y - y')\n⊢ E\ncase y'\nE : Type u_1\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : UniformConvexSpace E\nε : ℝ\ninst✝ : NormedSpace ℝ E\nhε : 0 < ε\nhε' : 0 < ε / 3\nδ : ℝ\nhδ : 0 < δ\nh : ∀ ⦃x : E⦄, ‖x‖ = 1 → ∀ ⦃y : E⦄, ‖y‖ = 1 → ε / 3 ≤ ‖x - y‖ → ‖x + y‖ ≤ 2 - δ\nδ' : ℝ := min (1 / 2) (min (ε / 3) (δ / 3))\nx : E\nhx : ‖x‖ ≤ 1\ny : E\nhy : ‖y‖ ≤ 1\nhxy : ε ≤ ‖x - y‖\nhx' : 1 - δ' < ‖x‖\nhy' : 1 - δ' < ‖y‖\nhδ' : 0 < 1 - δ'\nh₁ : ∀ (z : E), 1 - δ' < ‖z‖ → ‖‖z‖⁻¹ • z‖ = 1\nh₂ : ∀ (z : E), ‖z‖ ≤ 1 → 1 - δ' ≤ ‖z‖ → ‖‖z‖⁻¹ • z - z‖ ≤ δ'\nx' : E := ‖x‖⁻¹ • x\ny' : E := ‖y‖⁻¹ • y\nhxy' : ε / 3 ≤ ‖x' - y'‖\nthis : ∀ (x' y' : E), x + y = x' + y' + (x - x') + (y - y')\n⊢ E\n[PROOFSTEP]\nexact norm_add₃_le _ _ _\n[GOAL]\nE : Type u_1\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : UniformConvexSpace E\nε : ℝ\ninst✝ : NormedSpace ℝ E\nhε : 0 < ε\nhε' : 0 < ε / 3\nδ : ℝ\nhδ : 0 < δ\nh : ∀ ⦃x : E⦄, ‖x‖ = 1 → ∀ ⦃y : E⦄, ‖y‖ = 1 → ε / 3 ≤ ‖x - y‖ → ‖x + y‖ ≤ 2 - δ\nδ' : ℝ := min (1 / 2) (min (ε / 3) (δ / 3))\nx : E\nhx : ‖x‖ ≤ 1\ny : E\nhy : ‖y‖ ≤ 1\nhxy : ε ≤ ‖x - y‖\nhx' : 1 - δ' < ‖x‖\nhy' : 1 - δ' < ‖y‖\nhδ' : 0 < 1 - δ'\nh₁ : ∀ (z : E), 1 - δ' < ‖z‖ → ‖‖z‖⁻¹ • z‖ = 1\nh₂ : ∀ (z : E), ‖z‖ ≤ 1 → 1 - δ' ≤ ‖z‖ → ‖‖z‖⁻¹ • z - z‖ ≤ δ'\nx' : E := ‖x‖⁻¹ • x\ny' : E := ‖y‖⁻¹ • y\nhxy' : ε / 3 ≤ ‖x' - y'‖\n⊢ 2 - δ + δ' + δ' ≤ 2 - δ'\n[PROOFSTEP]\nrw [← le_sub_iff_add_le, ← le_sub_iff_add_le, sub_sub, sub_sub]\n[GOAL]\nE : Type u_1\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : UniformConvexSpace E\nε : ℝ\ninst✝ : NormedSpace ℝ E\nhε : 0 < ε\nhε' : 0 < ε / 3\nδ : ℝ\nhδ : 0 < δ\nh : ∀ ⦃x : E⦄, ‖x‖ = 1 → ∀ ⦃y : E⦄, ‖y‖ = 1 → ε / 3 ≤ ‖x - y‖ → ‖x + y‖ ≤ 2 - δ\nδ' : ℝ := min (1 / 2) (min (ε / 3) (δ / 3))\nx : E\nhx : ‖x‖ ≤ 1\ny : E\nhy : ‖y‖ ≤ 1\nhxy : ε ≤ ‖x - y‖\nhx' : 1 - δ' < ‖x‖\nhy' : 1 - δ' < ‖y‖\nhδ' : 0 < 1 - δ'\nh₁ : ∀ (z : E), 1 - δ' < ‖z‖ → ‖‖z‖⁻¹ • z‖ = 1\nh₂ : ∀ (z : E), ‖z‖ ≤ 1 → 1 - δ' ≤ ‖z‖ → ‖‖z‖⁻¹ • z - z‖ ≤ δ'\nx' : E := ‖x‖⁻¹ • x\ny' : E := ‖y‖⁻¹ • y\nhxy' : ε / 3 ≤ ‖x' - y'‖\n⊢ 2 - δ ≤ 2 - (δ' + (δ' + δ'))\n[PROOFSTEP]\nrefine' sub_le_sub_left _ _\n[GOAL]\nE : Type u_1\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : UniformConvexSpace E\nε : ℝ\ninst✝ : NormedSpace ℝ E\nhε : 0 < ε\nhε' : 0 < ε / 3\nδ : ℝ\nhδ : 0 < δ\nh : ∀ ⦃x : E⦄, ‖x‖ = 1 → ∀ ⦃y : E⦄, ‖y‖ = 1 → ε / 3 ≤ ‖x - y‖ → ‖x + y‖ ≤ 2 - δ\nδ' : ℝ := min (1 / 2) (min (ε / 3) (δ / 3))\nx : E\nhx : ‖x‖ ≤ 1\ny : E\nhy : ‖y‖ ≤ 1\nhxy : ε ≤ ‖x - y‖\nhx' : 1 - δ' < ‖x‖\nhy' : 1 - δ' < ‖y‖\nhδ' : 0 < 1 - δ'\nh₁ : ∀ (z : E), 1 - δ' < ‖z‖ → ‖‖z‖⁻¹ • z‖ = 1\nh₂ : ∀ (z : E), ‖z‖ ≤ 1 → 1 - δ' ≤ ‖z‖ → ‖‖z‖⁻¹ • z - z‖ ≤ δ'\nx' : E := ‖x‖⁻¹ • x\ny' : E := ‖y‖⁻¹ • y\nhxy' : ε / 3 ≤ ‖x' - y'‖\n⊢ δ' + (δ' + δ') ≤ δ\n[PROOFSTEP]\nring_nf\n[GOAL]\nE : Type u_1\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : UniformConvexSpace E\nε : ℝ\ninst✝ : NormedSpace ℝ E\nhε : 0 < ε\nhε' : 0 < ε / 3\nδ : ℝ\nhδ : 0 < δ\nh : ∀ ⦃x : E⦄, ‖x‖ = 1 → ∀ ⦃y : E⦄, ‖y‖ = 1 → ε / 3 ≤ ‖x - y‖ → ‖x + y‖ ≤ 2 - δ\nδ' : ℝ := min (1 / 2) (min (ε / 3) (δ / 3))\nx : E\nhx : ‖x‖ ≤ 1\ny : E\nhy : ‖y‖ ≤ 1\nhxy : ε ≤ ‖x - y‖\nhx' : 1 - δ' < ‖x‖\nhy' : 1 - δ' < ‖y‖\nhδ' : 0 < 1 - δ'\nh₁ : ∀ (z : E), 1 - δ' < ‖z‖ → ‖‖z‖⁻¹ • z‖ = 1\nh₂ : ∀ (z : E), ‖z‖ ≤ 1 → 1 - δ' ≤ ‖z‖ → ‖‖z‖⁻¹ • z - z‖ ≤ δ'\nx' : E := ‖x‖⁻¹ • x\ny' : E := ‖y‖⁻¹ • y\nhxy' : ε / 3 ≤ ‖x' - y'‖\n⊢ min (↑(Int.ofNat 1) / ↑2) (min (ε * (↑(Int.ofNat 1) / ↑3)) (δ * (↑(Int.ofNat 1) / ↑3))) * 3 ≤ δ\n[PROOFSTEP]\nrw [← mul_div_cancel' δ three_ne_zero]\n[GOAL]\nE : Type u_1\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : UniformConvexSpace E\nε : ℝ\ninst✝ : NormedSpace ℝ E\nhε : 0 < ε\nhε' : 0 < ε / 3\nδ : ℝ\nhδ : 0 < δ\nh : ∀ ⦃x : E⦄, ‖x‖ = 1 → ∀ ⦃y : E⦄, ‖y‖ = 1 → ε / 3 ≤ ‖x - y‖ → ‖x + y‖ ≤ 2 - δ\nδ' : ℝ := min (1 / 2) (min (ε / 3) (δ / 3))\nx : E\nhx : ‖x‖ ≤ 1\ny : E\nhy : ‖y‖ ≤ 1\nhxy : ε ≤ ‖x - y‖\nhx' : 1 - δ' < ‖x‖\nhy' : 1 - δ' < ‖y‖\nhδ' : 0 < 1 - δ'\nh₁ : ∀ (z : E), 1 - δ' < ‖z‖ → ‖‖z‖⁻¹ • z‖ = 1\nh₂ : ∀ (z : E), ‖z‖ ≤ 1 → 1 - δ' ≤ ‖z‖ → ‖‖z‖⁻¹ • z - z‖ ≤ δ'\nx' : E := ‖x‖⁻¹ • x\ny' : E := ‖y‖⁻¹ • y\nhxy' : ε / 3 ≤ ‖x' - y'‖\n⊢ min (↑(Int.ofNat 1) / ↑2) (min (ε * (↑(Int.ofNat 1) / ↑3)) (3 * (δ / 3) * (↑(Int.ofNat 1) / ↑3))) * 3 ≤ 3 * (δ / 3)\n[PROOFSTEP]\nnorm_num\n  -- Porting note: these three extra lines needed to make `exact` work\n[GOAL]\nE : Type u_1\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : UniformConvexSpace E\nε : ℝ\ninst✝ : NormedSpace ℝ E\nhε : 0 < ε\nhε' : 0 < ε / 3\nδ : ℝ\nhδ : 0 < δ\nh : ∀ ⦃x : E⦄, ‖x‖ = 1 → ∀ ⦃y : E⦄, ‖y‖ = 1 → ε / 3 ≤ ‖x - y‖ → ‖x + y‖ ≤ 2 - δ\nδ' : ℝ := min (1 / 2) (min (ε / 3) (δ / 3))\nx : E\nhx : ‖x‖ ≤ 1\ny : E\nhy : ‖y‖ ≤ 1\nhxy : ε ≤ ‖x - y‖\nhx' : 1 - δ' < ‖x‖\nhy' : 1 - δ' < ‖y‖\nhδ' : 0 < 1 - δ'\nh₁ : ∀ (z : E), 1 - δ' < ‖z‖ → ‖‖z‖⁻¹ • z‖ = 1\nh₂ : ∀ (z : E), ‖z‖ ≤ 1 → 1 - δ' ≤ ‖z‖ → ‖‖z‖⁻¹ • z - z‖ ≤ δ'\nx' : E := ‖x‖⁻¹ • x\ny' : E := ‖y‖⁻¹ • y\nhxy' : ε / 3 ≤ ‖x' - y'‖\n⊢ min (1 / 2) (min (ε * (1 / 3)) (3 * (δ / 3) * (1 / 3))) * 3 ≤ 3 * (δ / 3)\n[PROOFSTEP]\nhave : 3 * (δ / 3) * (1 / 3) = δ / 3 := by linarith\n[GOAL]\nE : Type u_1\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : UniformConvexSpace E\nε : ℝ\ninst✝ : NormedSpace ℝ E\nhε : 0 < ε\nhε' : 0 < ε / 3\nδ : ℝ\nhδ : 0 < δ\nh : ∀ ⦃x : E⦄, ‖x‖ = 1 → ∀ ⦃y : E⦄, ‖y‖ = 1 → ε / 3 ≤ ‖x - y‖ → ‖x + y‖ ≤ 2 - δ\nδ' : ℝ := min (1 / 2) (min (ε / 3) (δ / 3))\nx : E\nhx : ‖x‖ ≤ 1\ny : E\nhy : ‖y‖ ≤ 1\nhxy : ε ≤ ‖x - y‖\nhx' : 1 - δ' < ‖x‖\nhy' : 1 - δ' < ‖y‖\nhδ' : 0 < 1 - δ'\nh₁ : ∀ (z : E), 1 - δ' < ‖z‖ → ‖‖z‖⁻¹ • z‖ = 1\nh₂ : ∀ (z : E), ‖z‖ ≤ 1 → 1 - δ' ≤ ‖z‖ → ‖‖z‖⁻¹ • z - z‖ ≤ δ'\nx' : E := ‖x‖⁻¹ • x\ny' : E := ‖y‖⁻¹ • y\nhxy' : ε / 3 ≤ ‖x' - y'‖\n⊢ 3 * (δ / 3) * (1 / 3) = δ / 3\n[PROOFSTEP]\nlinarith\n[GOAL]\nE : Type u_1\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : UniformConvexSpace E\nε : ℝ\ninst✝ : NormedSpace ℝ E\nhε : 0 < ε\nhε' : 0 < ε / 3\nδ : ℝ\nhδ : 0 < δ\nh : ∀ ⦃x : E⦄, ‖x‖ = 1 → ∀ ⦃y : E⦄, ‖y‖ = 1 → ε / 3 ≤ ‖x - y‖ → ‖x + y‖ ≤ 2 - δ\nδ' : ℝ := min (1 / 2) (min (ε / 3) (δ / 3))\nx : E\nhx : ‖x‖ ≤ 1\ny : E\nhy : ‖y‖ ≤ 1\nhxy : ε ≤ ‖x - y‖\nhx' : 1 - δ' < ‖x‖\nhy' : 1 - δ' < ‖y‖\nhδ' : 0 < 1 - δ'\nh₁ : ∀ (z : E), 1 - δ' < ‖z‖ → ‖‖z‖⁻¹ • z‖ = 1\nh₂ : ∀ (z : E), ‖z‖ ≤ 1 → 1 - δ' ≤ ‖z‖ → ‖‖z‖⁻¹ • z - z‖ ≤ δ'\nx' : E := ‖x‖⁻¹ • x\ny' : E := ‖y‖⁻¹ • y\nhxy' : ε / 3 ≤ ‖x' - y'‖\nthis : 3 * (δ / 3) * (1 / 3) = δ / 3\n⊢ min (1 / 2) (min (ε * (1 / 3)) (3 * (δ / 3) * (1 / 3))) * 3 ≤ 3 * (δ / 3)\n[PROOFSTEP]\nrw [this, mul_comm]\n[GOAL]\nE : Type u_1\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : UniformConvexSpace E\nε : ℝ\ninst✝ : NormedSpace ℝ E\nhε : 0 < ε\nhε' : 0 < ε / 3\nδ : ℝ\nhδ : 0 < δ\nh : ∀ ⦃x : E⦄, ‖x‖ = 1 → ∀ ⦃y : E⦄, ‖y‖ = 1 → ε / 3 ≤ ‖x - y‖ → ‖x + y‖ ≤ 2 - δ\nδ' : ℝ := min (1 / 2) (min (ε / 3) (δ / 3))\nx : E\nhx : ‖x‖ ≤ 1\ny : E\nhy : ‖y‖ ≤ 1\nhxy : ε ≤ ‖x - y‖\nhx' : 1 - δ' < ‖x‖\nhy' : 1 - δ' < ‖y‖\nhδ' : 0 < 1 - δ'\nh₁ : ∀ (z : E), 1 - δ' < ‖z‖ → ‖‖z‖⁻¹ • z‖ = 1\nh₂ : ∀ (z : E), ‖z‖ ≤ 1 → 1 - δ' ≤ ‖z‖ → ‖‖z‖⁻¹ • z - z‖ ≤ δ'\nx' : E := ‖x‖⁻¹ • x\ny' : E := ‖y‖⁻¹ • y\nhxy' : ε / 3 ≤ ‖x' - y'‖\nthis : 3 * (δ / 3) * (1 / 3) = δ / 3\n⊢ 3 * min (1 / 2) (min (ε * (1 / 3)) (δ / 3)) ≤ 3 * (δ / 3)\n[PROOFSTEP]\ngcongr\n[GOAL]\ncase h\nE : Type u_1\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : UniformConvexSpace E\nε : ℝ\ninst✝ : NormedSpace ℝ E\nhε : 0 < ε\nhε' : 0 < ε / 3\nδ : ℝ\nhδ : 0 < δ\nh : ∀ ⦃x : E⦄, ‖x‖ = 1 → ∀ ⦃y : E⦄, ‖y‖ = 1 → ε / 3 ≤ ‖x - y‖ → ‖x + y‖ ≤ 2 - δ\nδ' : ℝ := min (1 / 2) (min (ε / 3) (δ / 3))\nx : E\nhx : ‖x‖ ≤ 1\ny : E\nhy : ‖y‖ ≤ 1\nhxy : ε ≤ ‖x - y‖\nhx' : 1 - δ' < ‖x‖\nhy' : 1 - δ' < ‖y‖\nhδ' : 0 < 1 - δ'\nh₁ : ∀ (z : E), 1 - δ' < ‖z‖ → ‖‖z‖⁻¹ • z‖ = 1\nh₂ : ∀ (z : E), ‖z‖ ≤ 1 → 1 - δ' ≤ ‖z‖ → ‖‖z‖⁻¹ • z - z‖ ≤ δ'\nx' : E := ‖x‖⁻¹ • x\ny' : E := ‖y‖⁻¹ • y\nhxy' : ε / 3 ≤ ‖x' - y'‖\nthis : 3 * (δ / 3) * (1 / 3) = δ / 3\n⊢ min (1 / 2) (min (ε * (1 / 3)) (δ / 3)) ≤ δ / 3\n[PROOFSTEP]\nexact min_le_of_right_le <| min_le_right _ _\n[GOAL]\nE : Type u_1\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : UniformConvexSpace E\nε : ℝ\ninst✝ : NormedSpace ℝ E\nhε : 0 < ε\nr : ℝ\n⊢ ∃ δ, 0 < δ ∧ ∀ ⦃x : E⦄, ‖x‖ ≤ r → ∀ ⦃y : E⦄, ‖y‖ ≤ r → ε ≤ ‖x - y‖ → ‖x + y‖ ≤ 2 * r - δ\n[PROOFSTEP]\nobtain hr | hr := le_or_lt r 0\n[GOAL]\ncase inl\nE : Type u_1\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : UniformConvexSpace E\nε : ℝ\ninst✝ : NormedSpace ℝ E\nhε : 0 < ε\nr : ℝ\nhr : r ≤ 0\n⊢ ∃ δ, 0 < δ ∧ ∀ ⦃x : E⦄, ‖x‖ ≤ r → ∀ ⦃y : E⦄, ‖y‖ ≤ r → ε ≤ ‖x - y‖ → ‖x + y‖ ≤ 2 * r - δ\n[PROOFSTEP]\nexact\n  ⟨1, one_pos, fun x hx y hy h =>\n    (hε.not_le <| h.trans <| (norm_sub_le _ _).trans <| add_nonpos (hx.trans hr) (hy.trans hr)).elim⟩\n[GOAL]\ncase inr\nE : Type u_1\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : UniformConvexSpace E\nε : ℝ\ninst✝ : NormedSpace ℝ E\nhε : 0 < ε\nr : ℝ\nhr : 0 < r\n⊢ ∃ δ, 0 < δ ∧ ∀ ⦃x : E⦄, ‖x‖ ≤ r → ∀ ⦃y : E⦄, ‖y‖ ≤ r → ε ≤ ‖x - y‖ → ‖x + y‖ ≤ 2 * r - δ\n[PROOFSTEP]\nobtain ⟨δ, hδ, h⟩ := exists_forall_closed_ball_dist_add_le_two_sub E (div_pos hε hr)\n[GOAL]\ncase inr.intro.intro\nE : Type u_1\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : UniformConvexSpace E\nε : ℝ\ninst✝ : NormedSpace ℝ E\nhε : 0 < ε\nr : ℝ\nhr : 0 < r\nδ : ℝ\nhδ : 0 < δ\nh : ∀ ⦃x : E⦄, ‖x‖ ≤ 1 → ∀ ⦃y : E⦄, ‖y‖ ≤ 1 → ε / r ≤ ‖x - y‖ → ‖x + y‖ ≤ 2 - δ\n⊢ ∃ δ, 0 < δ ∧ ∀ ⦃x : E⦄, ‖x‖ ≤ r → ∀ ⦃y : E⦄, ‖y‖ ≤ r → ε ≤ ‖x - y‖ → ‖x + y‖ ≤ 2 * r - δ\n[PROOFSTEP]\nrefine' ⟨δ * r, mul_pos hδ hr, fun x hx y hy hxy => _⟩\n[GOAL]\ncase inr.intro.intro\nE : Type u_1\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : UniformConvexSpace E\nε : ℝ\ninst✝ : NormedSpace ℝ E\nhε : 0 < ε\nr : ℝ\nhr : 0 < r\nδ : ℝ\nhδ : 0 < δ\nh : ∀ ⦃x : E⦄, ‖x‖ ≤ 1 → ∀ ⦃y : E⦄, ‖y‖ ≤ 1 → ε / r ≤ ‖x - y‖ → ‖x + y‖ ≤ 2 - δ\nx : E\nhx : ‖x‖ ≤ r\ny : E\nhy : ‖y‖ ≤ r\nhxy : ε ≤ ‖x - y‖\n⊢ ‖x + y‖ ≤ 2 * r - δ * r\n[PROOFSTEP]\nrw [← div_le_one hr, div_eq_inv_mul, ← norm_smul_of_nonneg (inv_nonneg.2 hr.le)] at hx hy \n[GOAL]\ncase inr.intro.intro\nE : Type u_1\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : UniformConvexSpace E\nε : ℝ\ninst✝ : NormedSpace ℝ E\nhε : 0 < ε\nr : ℝ\nhr : 0 < r\nδ : ℝ\nhδ : 0 < δ\nh : ∀ ⦃x : E⦄, ‖x‖ ≤ 1 → ∀ ⦃y : E⦄, ‖y‖ ≤ 1 → ε / r ≤ ‖x - y‖ → ‖x + y‖ ≤ 2 - δ\nx : E\nhx✝ : r⁻¹ * ‖x‖ ≤ 1\nhx : ‖r⁻¹ • x‖ ≤ 1\ny : E\nhy✝ : r⁻¹ * ‖y‖ ≤ 1\nhy : ‖r⁻¹ • y‖ ≤ 1\nhxy : ε ≤ ‖x - y‖\n⊢ ‖x + y‖ ≤ 2 * r - δ * r\n[PROOFSTEP]\ntry infer_instance\n[GOAL]\ncase inr.intro.intro\nE : Type u_1\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : UniformConvexSpace E\nε : ℝ\ninst✝ : NormedSpace ℝ E\nhε : 0 < ε\nr : ℝ\nhr : 0 < r\nδ : ℝ\nhδ : 0 < δ\nh : ∀ ⦃x : E⦄, ‖x‖ ≤ 1 → ∀ ⦃y : E⦄, ‖y‖ ≤ 1 → ε / r ≤ ‖x - y‖ → ‖x + y‖ ≤ 2 - δ\nx : E\nhx✝ : r⁻¹ * ‖x‖ ≤ 1\nhx : ‖r⁻¹ • x‖ ≤ 1\ny : E\nhy✝ : r⁻¹ * ‖y‖ ≤ 1\nhy : ‖r⁻¹ • y‖ ≤ 1\nhxy : ε ≤ ‖x - y‖\n⊢ ‖x + y‖ ≤ 2 * r - δ * r\n[PROOFSTEP]\ninfer_instance\n[GOAL]\ncase inr.intro.intro\nE : Type u_1\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : UniformConvexSpace E\nε : ℝ\ninst✝ : NormedSpace ℝ E\nhε : 0 < ε\nr : ℝ\nhr : 0 < r\nδ : ℝ\nhδ : 0 < δ\nh : ∀ ⦃x : E⦄, ‖x‖ ≤ 1 → ∀ ⦃y : E⦄, ‖y‖ ≤ 1 → ε / r ≤ ‖x - y‖ → ‖x + y‖ ≤ 2 - δ\nx : E\nhx✝ : r⁻¹ * ‖x‖ ≤ 1\nhx : ‖r⁻¹ • x‖ ≤ 1\ny : E\nhy✝ : r⁻¹ * ‖y‖ ≤ 1\nhy : ‖r⁻¹ • y‖ ≤ 1\nhxy : ε ≤ ‖x - y‖\n⊢ ‖x + y‖ ≤ 2 * r - δ * r\n[PROOFSTEP]\nhave := h hx hy\n[GOAL]\ncase inr.intro.intro\nE : Type u_1\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : UniformConvexSpace E\nε : ℝ\ninst✝ : NormedSpace ℝ E\nhε : 0 < ε\nr : ℝ\nhr : 0 < r\nδ : ℝ\nhδ : 0 < δ\nh : ∀ ⦃x : E⦄, ‖x‖ ≤ 1 → ∀ ⦃y : E⦄, ‖y‖ ≤ 1 → ε / r ≤ ‖x - y‖ → ‖x + y‖ ≤ 2 - δ\nx : E\nhx✝ : r⁻¹ * ‖x‖ ≤ 1\nhx : ‖r⁻¹ • x‖ ≤ 1\ny : E\nhy✝ : r⁻¹ * ‖y‖ ≤ 1\nhy : ‖r⁻¹ • y‖ ≤ 1\nhxy : ε ≤ ‖x - y‖\nthis : ε / r ≤ ‖r⁻¹ • x - r⁻¹ • y‖ → ‖r⁻¹ • x + r⁻¹ • y‖ ≤ 2 - δ\n⊢ ‖x + y‖ ≤ 2 * r - δ * r\n[PROOFSTEP]\nsimp_rw [← smul_add, ← smul_sub, norm_smul_of_nonneg (inv_nonneg.2 hr.le), ← div_eq_inv_mul, div_le_div_right hr,\n  div_le_iff hr, sub_mul] at this \n[GOAL]\ncase inr.intro.intro\nE : Type u_1\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : UniformConvexSpace E\nε : ℝ\ninst✝ : NormedSpace ℝ E\nhε : 0 < ε\nr : ℝ\nhr : 0 < r\nδ : ℝ\nhδ : 0 < δ\nh : ∀ ⦃x : E⦄, ‖x‖ ≤ 1 → ∀ ⦃y : E⦄, ‖y‖ ≤ 1 → ε / r ≤ ‖x - y‖ → ‖x + y‖ ≤ 2 - δ\nx : E\nhx✝ : r⁻¹ * ‖x‖ ≤ 1\nhx : ‖r⁻¹ • x‖ ≤ 1\ny : E\nhy✝ : r⁻¹ * ‖y‖ ≤ 1\nhy : ‖r⁻¹ • y‖ ≤ 1\nhxy : ε ≤ ‖x - y‖\nthis : ε ≤ ‖x - y‖ → ‖x + y‖ ≤ 2 * r - δ * r\n⊢ ‖x + y‖ ≤ 2 * r - δ * r\n[PROOFSTEP]\nexact this hxy\n", "meta": {"mathlib_filename": "Mathlib.Analysis.Convex.Uniform", "llama_tokens": 24574, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8056321796478255, "lm_q2_score": 0.6584175072643413, "lm_q1q2_score": 0.5304423314956593}}
{"text": "[GOAL]\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\n⊢ (kernel.ι g ≫ cokernel.π f) ≫ cokernel.desc f g w = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\n⊢ kernel.lift g f w ≫\n      kernel.lift (cokernel.desc f g w) (kernel.ι g ≫ cokernel.π f)\n        (_ : (kernel.ι g ≫ cokernel.π f) ≫ cokernel.desc f g w = 0) =\n    0\n[PROOFSTEP]\next\n[GOAL]\ncase h\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\n⊢ (kernel.lift g f w ≫\n        kernel.lift (cokernel.desc f g w) (kernel.ι g ≫ cokernel.π f)\n          (_ : (kernel.ι g ≫ cokernel.π f) ≫ cokernel.desc f g w = 0)) ≫\n      equalizer.ι (cokernel.desc f g w) 0 =\n    0 ≫ equalizer.ι (cokernel.desc f g w) 0\n[PROOFSTEP]\nsimp\n[GOAL]\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\n⊢ Mono (homologyCToK f g w)\n[PROOFSTEP]\napply Pseudoelement.mono_of_zero_of_map_zero\n[GOAL]\ncase a\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\n⊢ ∀ (a : Pseudoelement (homologyC f g w)), Pseudoelement.pseudoApply (homologyCToK f g w) a = 0 → a = 0\n[PROOFSTEP]\nintro a ha\n[GOAL]\ncase a\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\na : Pseudoelement (homologyC f g w)\nha : Pseudoelement.pseudoApply (homologyCToK f g w) a = 0\n⊢ a = 0\n[PROOFSTEP]\nobtain ⟨a, rfl⟩ := Pseudoelement.pseudo_surjective_of_epi (cokernel.π (kernel.lift g f w)) a\n[GOAL]\ncase a.intro\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\na : Pseudoelement (kernel g)\nha : Pseudoelement.pseudoApply (homologyCToK f g w) (Pseudoelement.pseudoApply (cokernel.π (kernel.lift g f w)) a) = 0\n⊢ Pseudoelement.pseudoApply (cokernel.π (kernel.lift g f w)) a = 0\n[PROOFSTEP]\napply_fun kernel.ι (cokernel.desc f g w) at ha \n[GOAL]\ncase a.intro\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\na : Pseudoelement (kernel g)\nha :\n  Pseudoelement.pseudoApply (kernel.ι (cokernel.desc f g w))\n      (Pseudoelement.pseudoApply (homologyCToK f g w) (Pseudoelement.pseudoApply (cokernel.π (kernel.lift g f w)) a)) =\n    Pseudoelement.pseudoApply (kernel.ι (cokernel.desc f g w)) 0\n⊢ Pseudoelement.pseudoApply (cokernel.π (kernel.lift g f w)) a = 0\n[PROOFSTEP]\nsimp only [← Pseudoelement.comp_apply, cokernel.π_desc, kernel.lift_ι, Pseudoelement.apply_zero] at ha \n[GOAL]\ncase a.intro\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\na : Pseudoelement (kernel g)\nha : Pseudoelement.pseudoApply (kernel.ι g ≫ cokernel.π f) a = 0\n⊢ Pseudoelement.pseudoApply (cokernel.π (kernel.lift g f w)) a = 0\n[PROOFSTEP]\nsimp only [Pseudoelement.comp_apply] at ha \n[GOAL]\ncase a.intro\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\na : Pseudoelement (kernel g)\nha : Pseudoelement.pseudoApply (cokernel.π f) (Pseudoelement.pseudoApply (kernel.ι g) a) = 0\n⊢ Pseudoelement.pseudoApply (cokernel.π (kernel.lift g f w)) a = 0\n[PROOFSTEP]\nobtain ⟨b, hb⟩ : ∃ b, f b = _ := (Pseudoelement.pseudo_exact_of_exact (exact_cokernel f)).2 _ ha\n[GOAL]\ncase a.intro.intro\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\na : Pseudoelement (kernel g)\nha : Pseudoelement.pseudoApply (cokernel.π f) (Pseudoelement.pseudoApply (kernel.ι g) a) = 0\nb : Pseudoelement X\nhb : Pseudoelement.pseudoApply f b = Pseudoelement.pseudoApply (kernel.ι g) a\n⊢ Pseudoelement.pseudoApply (cokernel.π (kernel.lift g f w)) a = 0\n[PROOFSTEP]\nrsuffices ⟨c, rfl⟩ : ∃ c, kernel.lift g f w c = a\n[GOAL]\ncase a.intro.intro.intro\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nb c : Pseudoelement X\nha :\n  Pseudoelement.pseudoApply (cokernel.π f)\n      (Pseudoelement.pseudoApply (kernel.ι g) (Pseudoelement.pseudoApply (kernel.lift g f w) c)) =\n    0\nhb :\n  Pseudoelement.pseudoApply f b =\n    Pseudoelement.pseudoApply (kernel.ι g) (Pseudoelement.pseudoApply (kernel.lift g f w) c)\n⊢ Pseudoelement.pseudoApply (cokernel.π (kernel.lift g f w)) (Pseudoelement.pseudoApply (kernel.lift g f w) c) = 0\n[PROOFSTEP]\nsimp [← Pseudoelement.comp_apply]\n[GOAL]\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\na : Pseudoelement (kernel g)\nha : Pseudoelement.pseudoApply (cokernel.π f) (Pseudoelement.pseudoApply (kernel.ι g) a) = 0\nb : Pseudoelement X\nhb : Pseudoelement.pseudoApply f b = Pseudoelement.pseudoApply (kernel.ι g) a\n⊢ ∃ c, Pseudoelement.pseudoApply (kernel.lift g f w) c = a\n[PROOFSTEP]\nuse b\n[GOAL]\ncase h\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\na : Pseudoelement (kernel g)\nha : Pseudoelement.pseudoApply (cokernel.π f) (Pseudoelement.pseudoApply (kernel.ι g) a) = 0\nb : Pseudoelement X\nhb : Pseudoelement.pseudoApply f b = Pseudoelement.pseudoApply (kernel.ι g) a\n⊢ Pseudoelement.pseudoApply (kernel.lift g f w) b = a\n[PROOFSTEP]\napply_fun kernel.ι g\n[GOAL]\ncase h\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\na : Pseudoelement (kernel g)\nha : Pseudoelement.pseudoApply (cokernel.π f) (Pseudoelement.pseudoApply (kernel.ι g) a) = 0\nb : Pseudoelement X\nhb : Pseudoelement.pseudoApply f b = Pseudoelement.pseudoApply (kernel.ι g) a\n⊢ Pseudoelement.pseudoApply (kernel.ι g) (Pseudoelement.pseudoApply (kernel.lift g f w) b) =\n    Pseudoelement.pseudoApply (kernel.ι g) a\ncase h.inj\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\na : Pseudoelement (kernel g)\nha : Pseudoelement.pseudoApply (cokernel.π f) (Pseudoelement.pseudoApply (kernel.ι g) a) = 0\nb : Pseudoelement X\nhb : Pseudoelement.pseudoApply f b = Pseudoelement.pseudoApply (kernel.ι g) a\n⊢ Function.Injective (Pseudoelement.pseudoApply (kernel.ι g))\n[PROOFSTEP]\nswap\n[GOAL]\ncase h.inj\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\na : Pseudoelement (kernel g)\nha : Pseudoelement.pseudoApply (cokernel.π f) (Pseudoelement.pseudoApply (kernel.ι g) a) = 0\nb : Pseudoelement X\nhb : Pseudoelement.pseudoApply f b = Pseudoelement.pseudoApply (kernel.ι g) a\n⊢ Function.Injective (Pseudoelement.pseudoApply (kernel.ι g))\n[PROOFSTEP]\napply Pseudoelement.pseudo_injective_of_mono\n[GOAL]\ncase h\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\na : Pseudoelement (kernel g)\nha : Pseudoelement.pseudoApply (cokernel.π f) (Pseudoelement.pseudoApply (kernel.ι g) a) = 0\nb : Pseudoelement X\nhb : Pseudoelement.pseudoApply f b = Pseudoelement.pseudoApply (kernel.ι g) a\n⊢ Pseudoelement.pseudoApply (kernel.ι g) (Pseudoelement.pseudoApply (kernel.lift g f w) b) =\n    Pseudoelement.pseudoApply (kernel.ι g) a\n[PROOFSTEP]\nsimpa [← Pseudoelement.comp_apply]\n[GOAL]\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\n⊢ Epi (homologyCToK f g w)\n[PROOFSTEP]\napply Pseudoelement.epi_of_pseudo_surjective\n[GOAL]\ncase a\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\n⊢ Function.Surjective (Pseudoelement.pseudoApply (homologyCToK f g w))\n[PROOFSTEP]\nintro a\n[GOAL]\ncase a\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\na : Pseudoelement (homologyK f g w)\n⊢ ∃ a_1, Pseudoelement.pseudoApply (homologyCToK f g w) a_1 = a\n[PROOFSTEP]\nlet b := kernel.ι (cokernel.desc f g w) a\n[GOAL]\ncase a\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\na : Pseudoelement (homologyK f g w)\nb : Pseudoelement (cokernel f) := Pseudoelement.pseudoApply (kernel.ι (cokernel.desc f g w)) a\n⊢ ∃ a_1, Pseudoelement.pseudoApply (homologyCToK f g w) a_1 = a\n[PROOFSTEP]\nobtain ⟨c, hc⟩ : ∃ c, cokernel.π f c = b\n[GOAL]\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\na : Pseudoelement (homologyK f g w)\nb : Pseudoelement (cokernel f) := Pseudoelement.pseudoApply (kernel.ι (cokernel.desc f g w)) a\n⊢ ∃ c, Pseudoelement.pseudoApply (cokernel.π f) c = b\ncase a.intro\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\na : Pseudoelement (homologyK f g w)\nb : Pseudoelement (cokernel f) := Pseudoelement.pseudoApply (kernel.ι (cokernel.desc f g w)) a\nc : Pseudoelement Y\nhc : Pseudoelement.pseudoApply (cokernel.π f) c = b\n⊢ ∃ a_1, Pseudoelement.pseudoApply (homologyCToK f g w) a_1 = a\n[PROOFSTEP]\napply Pseudoelement.pseudo_surjective_of_epi (cokernel.π f)\n[GOAL]\ncase a.intro\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\na : Pseudoelement (homologyK f g w)\nb : Pseudoelement (cokernel f) := Pseudoelement.pseudoApply (kernel.ι (cokernel.desc f g w)) a\nc : Pseudoelement Y\nhc : Pseudoelement.pseudoApply (cokernel.π f) c = b\n⊢ ∃ a_1, Pseudoelement.pseudoApply (homologyCToK f g w) a_1 = a\n[PROOFSTEP]\nhave : g c = 0 :=\n  by\n  rw [show g = cokernel.π f ≫ cokernel.desc f g w by simp, Pseudoelement.comp_apply, hc]\n  simp [← Pseudoelement.comp_apply]\n[GOAL]\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\na : Pseudoelement (homologyK f g w)\nb : Pseudoelement (cokernel f) := Pseudoelement.pseudoApply (kernel.ι (cokernel.desc f g w)) a\nc : Pseudoelement Y\nhc : Pseudoelement.pseudoApply (cokernel.π f) c = b\n⊢ Pseudoelement.pseudoApply g c = 0\n[PROOFSTEP]\nrw [show g = cokernel.π f ≫ cokernel.desc f g w by simp, Pseudoelement.comp_apply, hc]\n[GOAL]\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\na : Pseudoelement (homologyK f g w)\nb : Pseudoelement (cokernel f) := Pseudoelement.pseudoApply (kernel.ι (cokernel.desc f g w)) a\nc : Pseudoelement Y\nhc : Pseudoelement.pseudoApply (cokernel.π f) c = b\n⊢ g = cokernel.π f ≫ cokernel.desc f g w\n[PROOFSTEP]\nsimp\n[GOAL]\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\na : Pseudoelement (homologyK f g w)\nb : Pseudoelement (cokernel f) := Pseudoelement.pseudoApply (kernel.ι (cokernel.desc f g w)) a\nc : Pseudoelement Y\nhc : Pseudoelement.pseudoApply (cokernel.π f) c = b\n⊢ Pseudoelement.pseudoApply (cokernel.desc f g w) b = 0\n[PROOFSTEP]\nsimp [← Pseudoelement.comp_apply]\n[GOAL]\ncase a.intro\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\na : Pseudoelement (homologyK f g w)\nb : Pseudoelement (cokernel f) := Pseudoelement.pseudoApply (kernel.ι (cokernel.desc f g w)) a\nc : Pseudoelement Y\nhc : Pseudoelement.pseudoApply (cokernel.π f) c = b\nthis : Pseudoelement.pseudoApply g c = 0\n⊢ ∃ a_1, Pseudoelement.pseudoApply (homologyCToK f g w) a_1 = a\n[PROOFSTEP]\nobtain ⟨d, hd⟩ : ∃ d, kernel.ι g d = c := by apply (Pseudoelement.pseudo_exact_of_exact exact_kernel_ι).2 _ this\n[GOAL]\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\na : Pseudoelement (homologyK f g w)\nb : Pseudoelement (cokernel f) := Pseudoelement.pseudoApply (kernel.ι (cokernel.desc f g w)) a\nc : Pseudoelement Y\nhc : Pseudoelement.pseudoApply (cokernel.π f) c = b\nthis : Pseudoelement.pseudoApply g c = 0\n⊢ ∃ d, Pseudoelement.pseudoApply (kernel.ι g) d = c\n[PROOFSTEP]\napply (Pseudoelement.pseudo_exact_of_exact exact_kernel_ι).2 _ this\n[GOAL]\ncase a.intro.intro\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\na : Pseudoelement (homologyK f g w)\nb : Pseudoelement (cokernel f) := Pseudoelement.pseudoApply (kernel.ι (cokernel.desc f g w)) a\nc : Pseudoelement Y\nhc : Pseudoelement.pseudoApply (cokernel.π f) c = b\nthis : Pseudoelement.pseudoApply g c = 0\nd : Pseudoelement (kernel g)\nhd : Pseudoelement.pseudoApply (kernel.ι g) d = c\n⊢ ∃ a_1, Pseudoelement.pseudoApply (homologyCToK f g w) a_1 = a\n[PROOFSTEP]\nuse cokernel.π (kernel.lift g f w) d\n[GOAL]\ncase h\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\na : Pseudoelement (homologyK f g w)\nb : Pseudoelement (cokernel f) := Pseudoelement.pseudoApply (kernel.ι (cokernel.desc f g w)) a\nc : Pseudoelement Y\nhc : Pseudoelement.pseudoApply (cokernel.π f) c = b\nthis : Pseudoelement.pseudoApply g c = 0\nd : Pseudoelement (kernel g)\nhd : Pseudoelement.pseudoApply (kernel.ι g) d = c\n⊢ Pseudoelement.pseudoApply (homologyCToK f g w) (Pseudoelement.pseudoApply (cokernel.π (kernel.lift g f w)) d) = a\n[PROOFSTEP]\napply_fun kernel.ι (cokernel.desc f g w)\n[GOAL]\ncase h\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\na : Pseudoelement (homologyK f g w)\nb : Pseudoelement (cokernel f) := Pseudoelement.pseudoApply (kernel.ι (cokernel.desc f g w)) a\nc : Pseudoelement Y\nhc : Pseudoelement.pseudoApply (cokernel.π f) c = b\nthis : Pseudoelement.pseudoApply g c = 0\nd : Pseudoelement (kernel g)\nhd : Pseudoelement.pseudoApply (kernel.ι g) d = c\n⊢ Pseudoelement.pseudoApply (kernel.ι (cokernel.desc f g w))\n      (Pseudoelement.pseudoApply (homologyCToK f g w) (Pseudoelement.pseudoApply (cokernel.π (kernel.lift g f w)) d)) =\n    Pseudoelement.pseudoApply (kernel.ι (cokernel.desc f g w)) a\ncase h.inj\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\na : Pseudoelement (homologyK f g w)\nb : Pseudoelement (cokernel f) := Pseudoelement.pseudoApply (kernel.ι (cokernel.desc f g w)) a\nc : Pseudoelement Y\nhc : Pseudoelement.pseudoApply (cokernel.π f) c = b\nthis : Pseudoelement.pseudoApply g c = 0\nd : Pseudoelement (kernel g)\nhd : Pseudoelement.pseudoApply (kernel.ι g) d = c\n⊢ Function.Injective (Pseudoelement.pseudoApply (kernel.ι (cokernel.desc f g w)))\n[PROOFSTEP]\nswap\n[GOAL]\ncase h.inj\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\na : Pseudoelement (homologyK f g w)\nb : Pseudoelement (cokernel f) := Pseudoelement.pseudoApply (kernel.ι (cokernel.desc f g w)) a\nc : Pseudoelement Y\nhc : Pseudoelement.pseudoApply (cokernel.π f) c = b\nthis : Pseudoelement.pseudoApply g c = 0\nd : Pseudoelement (kernel g)\nhd : Pseudoelement.pseudoApply (kernel.ι g) d = c\n⊢ Function.Injective (Pseudoelement.pseudoApply (kernel.ι (cokernel.desc f g w)))\n[PROOFSTEP]\napply Pseudoelement.pseudo_injective_of_mono\n[GOAL]\ncase h\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\na : Pseudoelement (homologyK f g w)\nb : Pseudoelement (cokernel f) := Pseudoelement.pseudoApply (kernel.ι (cokernel.desc f g w)) a\nc : Pseudoelement Y\nhc : Pseudoelement.pseudoApply (cokernel.π f) c = b\nthis : Pseudoelement.pseudoApply g c = 0\nd : Pseudoelement (kernel g)\nhd : Pseudoelement.pseudoApply (kernel.ι g) d = c\n⊢ Pseudoelement.pseudoApply (kernel.ι (cokernel.desc f g w))\n      (Pseudoelement.pseudoApply (homologyCToK f g w) (Pseudoelement.pseudoApply (cokernel.π (kernel.lift g f w)) d)) =\n    Pseudoelement.pseudoApply (kernel.ι (cokernel.desc f g w)) a\n[PROOFSTEP]\nsimp only [← Pseudoelement.comp_apply, cokernel.π_desc, kernel.lift_ι]\n[GOAL]\ncase h\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\na : Pseudoelement (homologyK f g w)\nb : Pseudoelement (cokernel f) := Pseudoelement.pseudoApply (kernel.ι (cokernel.desc f g w)) a\nc : Pseudoelement Y\nhc : Pseudoelement.pseudoApply (cokernel.π f) c = b\nthis : Pseudoelement.pseudoApply g c = 0\nd : Pseudoelement (kernel g)\nhd : Pseudoelement.pseudoApply (kernel.ι g) d = c\n⊢ Pseudoelement.pseudoApply (kernel.ι g ≫ cokernel.π f) d = Pseudoelement.pseudoApply (kernel.ι (cokernel.desc f g w)) a\n[PROOFSTEP]\nsimp only [Pseudoelement.comp_apply, hd, hc]\n[GOAL]\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nW : A\ne : kernel g ⟶ W\nhe : kernel.lift g f w ≫ e = 0\n⊢ π' f g w ≫ desc' f g w e he = e\n[PROOFSTEP]\ndsimp [π', desc']\n[GOAL]\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nW : A\ne : kernel g ⟶ W\nhe : kernel.lift g f w ≫ e = 0\n⊢ (cokernel.π (kernel.lift g f w) ≫ (homologyIsoCokernelLift f g w).inv) ≫\n      (homologyIsoCokernelLift f g w).hom ≫ cokernel.desc (kernel.lift g f w) e he =\n    e\n[PROOFSTEP]\nsimp\n[GOAL]\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nW : A\ne : W ⟶ cokernel f\nhe : e ≫ cokernel.desc f g w = 0\n⊢ lift f g w e he ≫ ι f g w = e\n[PROOFSTEP]\ndsimp [ι, lift]\n[GOAL]\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nW : A\ne : W ⟶ cokernel f\nhe : e ≫ cokernel.desc f g w = 0\n⊢ (kernel.lift (cokernel.desc f g w) e he ≫ (homologyIsoKernelDesc f g w).inv) ≫\n      (homologyIsoKernelDesc f g w).hom ≫ kernel.ι (cokernel.desc f g w) =\n    e\n[PROOFSTEP]\nsimp\n[GOAL]\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\n⊢ kernel.lift g f w ≫ π' f g w = 0\n[PROOFSTEP]\ndsimp [π']\n[GOAL]\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\n⊢ kernel.lift g f w ≫ cokernel.π (kernel.lift g f w) ≫ (homologyIsoCokernelLift f g w).inv = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\n⊢ ι f g w ≫ cokernel.desc f g w = 0\n[PROOFSTEP]\ndsimp [ι]\n[GOAL]\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\n⊢ ((homologyIsoKernelDesc f g w).hom ≫ kernel.ι (cokernel.desc f g w)) ≫ cokernel.desc f g w = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nW : A\na b : homology f g w ⟶ W\nh : π' f g w ≫ a = π' f g w ≫ b\n⊢ a = b\n[PROOFSTEP]\ndsimp [π'] at h \n[GOAL]\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nW : A\na b : homology f g w ⟶ W\nh :\n  (cokernel.π (kernel.lift g f w) ≫ (homologyIsoCokernelLift f g w).inv) ≫ a =\n    (cokernel.π (kernel.lift g f w) ≫ (homologyIsoCokernelLift f g w).inv) ≫ b\n⊢ a = b\n[PROOFSTEP]\napply_fun fun e => (homologyIsoCokernelLift f g w).inv ≫ e\n[GOAL]\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nW : A\na b : homology f g w ⟶ W\nh :\n  (cokernel.π (kernel.lift g f w) ≫ (homologyIsoCokernelLift f g w).inv) ≫ a =\n    (cokernel.π (kernel.lift g f w) ≫ (homologyIsoCokernelLift f g w).inv) ≫ b\n⊢ (fun e => (homologyIsoCokernelLift f g w).inv ≫ e) a = (fun e => (homologyIsoCokernelLift f g w).inv ≫ e) b\ncase inj\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nW : A\na b : homology f g w ⟶ W\nh :\n  (cokernel.π (kernel.lift g f w) ≫ (homologyIsoCokernelLift f g w).inv) ≫ a =\n    (cokernel.π (kernel.lift g f w) ≫ (homologyIsoCokernelLift f g w).inv) ≫ b\n⊢ Function.Injective fun e => (homologyIsoCokernelLift f g w).inv ≫ e\n[PROOFSTEP]\nswap\n[GOAL]\ncase inj\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nW : A\na b : homology f g w ⟶ W\nh :\n  (cokernel.π (kernel.lift g f w) ≫ (homologyIsoCokernelLift f g w).inv) ≫ a =\n    (cokernel.π (kernel.lift g f w) ≫ (homologyIsoCokernelLift f g w).inv) ≫ b\n⊢ Function.Injective fun e => (homologyIsoCokernelLift f g w).inv ≫ e\n[PROOFSTEP]\nintro i j hh\n[GOAL]\ncase inj\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nW : A\na b : homology f g w ⟶ W\nh :\n  (cokernel.π (kernel.lift g f w) ≫ (homologyIsoCokernelLift f g w).inv) ≫ a =\n    (cokernel.π (kernel.lift g f w) ≫ (homologyIsoCokernelLift f g w).inv) ≫ b\ni j : homology f g w ⟶ W\nhh : (fun e => (homologyIsoCokernelLift f g w).inv ≫ e) i = (fun e => (homologyIsoCokernelLift f g w).inv ≫ e) j\n⊢ i = j\n[PROOFSTEP]\napply_fun fun e => (homologyIsoCokernelLift f g w).hom ≫ e at hh \n[GOAL]\ncase inj\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nW : A\na b : homology f g w ⟶ W\nh :\n  (cokernel.π (kernel.lift g f w) ≫ (homologyIsoCokernelLift f g w).inv) ≫ a =\n    (cokernel.π (kernel.lift g f w) ≫ (homologyIsoCokernelLift f g w).inv) ≫ b\ni j : homology f g w ⟶ W\nhh :\n  (homologyIsoCokernelLift f g w).hom ≫ (fun e => (homologyIsoCokernelLift f g w).inv ≫ e) i =\n    (homologyIsoCokernelLift f g w).hom ≫ (fun e => (homologyIsoCokernelLift f g w).inv ≫ e) j\n⊢ i = j\n[PROOFSTEP]\nsimpa using hh\n[GOAL]\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nW : A\na b : homology f g w ⟶ W\nh :\n  (cokernel.π (kernel.lift g f w) ≫ (homologyIsoCokernelLift f g w).inv) ≫ a =\n    (cokernel.π (kernel.lift g f w) ≫ (homologyIsoCokernelLift f g w).inv) ≫ b\n⊢ (fun e => (homologyIsoCokernelLift f g w).inv ≫ e) a = (fun e => (homologyIsoCokernelLift f g w).inv ≫ e) b\n[PROOFSTEP]\nsimp only [Category.assoc] at h \n[GOAL]\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nW : A\na b : homology f g w ⟶ W\nh :\n  cokernel.π (kernel.lift g f w) ≫ (homologyIsoCokernelLift f g w).inv ≫ a =\n    cokernel.π (kernel.lift g f w) ≫ (homologyIsoCokernelLift f g w).inv ≫ b\n⊢ (fun e => (homologyIsoCokernelLift f g w).inv ≫ e) a = (fun e => (homologyIsoCokernelLift f g w).inv ≫ e) b\n[PROOFSTEP]\nexact coequalizer.hom_ext h\n[GOAL]\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nW : A\na b : W ⟶ homology f g w\nh : a ≫ ι f g w = b ≫ ι f g w\n⊢ a = b\n[PROOFSTEP]\ndsimp [ι] at h \n[GOAL]\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nW : A\na b : W ⟶ homology f g w\nh :\n  a ≫ (homologyIsoKernelDesc f g w).hom ≫ kernel.ι (cokernel.desc f g w) =\n    b ≫ (homologyIsoKernelDesc f g w).hom ≫ kernel.ι (cokernel.desc f g w)\n⊢ a = b\n[PROOFSTEP]\napply_fun fun e => e ≫ (homologyIsoKernelDesc f g w).hom\n[GOAL]\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nW : A\na b : W ⟶ homology f g w\nh :\n  a ≫ (homologyIsoKernelDesc f g w).hom ≫ kernel.ι (cokernel.desc f g w) =\n    b ≫ (homologyIsoKernelDesc f g w).hom ≫ kernel.ι (cokernel.desc f g w)\n⊢ (fun e => e ≫ (homologyIsoKernelDesc f g w).hom) a = (fun e => e ≫ (homologyIsoKernelDesc f g w).hom) b\ncase inj\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nW : A\na b : W ⟶ homology f g w\nh :\n  a ≫ (homologyIsoKernelDesc f g w).hom ≫ kernel.ι (cokernel.desc f g w) =\n    b ≫ (homologyIsoKernelDesc f g w).hom ≫ kernel.ι (cokernel.desc f g w)\n⊢ Function.Injective fun e => e ≫ (homologyIsoKernelDesc f g w).hom\n[PROOFSTEP]\nswap\n[GOAL]\ncase inj\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nW : A\na b : W ⟶ homology f g w\nh :\n  a ≫ (homologyIsoKernelDesc f g w).hom ≫ kernel.ι (cokernel.desc f g w) =\n    b ≫ (homologyIsoKernelDesc f g w).hom ≫ kernel.ι (cokernel.desc f g w)\n⊢ Function.Injective fun e => e ≫ (homologyIsoKernelDesc f g w).hom\n[PROOFSTEP]\nintro i j hh\n[GOAL]\ncase inj\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nW : A\na b : W ⟶ homology f g w\nh :\n  a ≫ (homologyIsoKernelDesc f g w).hom ≫ kernel.ι (cokernel.desc f g w) =\n    b ≫ (homologyIsoKernelDesc f g w).hom ≫ kernel.ι (cokernel.desc f g w)\ni j : W ⟶ homology f g w\nhh : (fun e => e ≫ (homologyIsoKernelDesc f g w).hom) i = (fun e => e ≫ (homologyIsoKernelDesc f g w).hom) j\n⊢ i = j\n[PROOFSTEP]\napply_fun fun e => e ≫ (homologyIsoKernelDesc f g w).inv at hh \n[GOAL]\ncase inj\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nW : A\na b : W ⟶ homology f g w\nh :\n  a ≫ (homologyIsoKernelDesc f g w).hom ≫ kernel.ι (cokernel.desc f g w) =\n    b ≫ (homologyIsoKernelDesc f g w).hom ≫ kernel.ι (cokernel.desc f g w)\ni j : W ⟶ homology f g w\nhh :\n  (fun e => e ≫ (homologyIsoKernelDesc f g w).hom) i ≫ (homologyIsoKernelDesc f g w).inv =\n    (fun e => e ≫ (homologyIsoKernelDesc f g w).hom) j ≫ (homologyIsoKernelDesc f g w).inv\n⊢ i = j\n[PROOFSTEP]\nsimpa using hh\n[GOAL]\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nW : A\na b : W ⟶ homology f g w\nh :\n  a ≫ (homologyIsoKernelDesc f g w).hom ≫ kernel.ι (cokernel.desc f g w) =\n    b ≫ (homologyIsoKernelDesc f g w).hom ≫ kernel.ι (cokernel.desc f g w)\n⊢ (fun e => e ≫ (homologyIsoKernelDesc f g w).hom) a = (fun e => e ≫ (homologyIsoKernelDesc f g w).hom) b\n[PROOFSTEP]\nsimp only [← Category.assoc] at h \n[GOAL]\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nW : A\na b : W ⟶ homology f g w\nh :\n  (a ≫ (homologyIsoKernelDesc f g w).hom) ≫ kernel.ι (cokernel.desc f g w) =\n    (b ≫ (homologyIsoKernelDesc f g w).hom) ≫ kernel.ι (cokernel.desc f g w)\n⊢ (fun e => e ≫ (homologyIsoKernelDesc f g w).hom) a = (fun e => e ≫ (homologyIsoKernelDesc f g w).hom) b\n[PROOFSTEP]\nexact equalizer.hom_ext h\n[GOAL]\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\n⊢ π' f g w ≫ ι f g w = kernel.ι g ≫ cokernel.π f\n[PROOFSTEP]\ndsimp [π', ι, homologyIsoKernelDesc]\n[GOAL]\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\n⊢ (cokernel.π (kernel.lift g f w) ≫ (homologyIsoCokernelLift f g w).inv) ≫\n      ((homologyIsoCokernelLift f g w).hom ≫ Abelian.homologyCToK f g w) ≫ kernel.ι (cokernel.desc f g w) =\n    kernel.ι g ≫ cokernel.π f\n[PROOFSTEP]\nsimp\n[GOAL]\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\n⊢ (kernelSubobjectIso g).hom ≫ π' f g w = π f g w\n[PROOFSTEP]\ndsimp [π', homologyIsoCokernelLift]\n[GOAL]\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\n⊢ (kernelSubobjectIso g).hom ≫\n      cokernel.π (kernel.lift g f w) ≫\n        ((cokernelIsoOfEq (_ : factorThruImage f ≫ imageToKernel' f g w = kernel.lift g f w)).inv ≫\n            cokernel.desc (factorThruImage f ≫ imageToKernel' f g w) (cokernel.π (imageToKernel' f g w))\n              (_ : (factorThruImage f ≫ imageToKernel' f g w) ≫ cokernel.π (imageToKernel' f g w) = 0)) ≫\n          (homologyIsoCokernelImageToKernel' f g w).inv =\n    π f g w\n[PROOFSTEP]\nsimp only [← Category.assoc]\n[GOAL]\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\n⊢ ((((kernelSubobjectIso g).hom ≫ cokernel.π (kernel.lift g f w)) ≫\n          (cokernelIsoOfEq (_ : factorThruImage f ≫ imageToKernel' f g w = kernel.lift g f w)).inv) ≫\n        cokernel.desc (factorThruImage f ≫ imageToKernel' f g w) (cokernel.π (imageToKernel' f g w))\n          (_ : (factorThruImage f ≫ imageToKernel' f g w) ≫ cokernel.π (imageToKernel' f g w) = 0)) ≫\n      (homologyIsoCokernelImageToKernel' f g w).inv =\n    π f g w\n[PROOFSTEP]\nrw [Iso.comp_inv_eq]\n[GOAL]\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\n⊢ (((kernelSubobjectIso g).hom ≫ cokernel.π (kernel.lift g f w)) ≫\n        (cokernelIsoOfEq (_ : factorThruImage f ≫ imageToKernel' f g w = kernel.lift g f w)).inv) ≫\n      cokernel.desc (factorThruImage f ≫ imageToKernel' f g w) (cokernel.π (imageToKernel' f g w))\n        (_ : (factorThruImage f ≫ imageToKernel' f g w) ≫ cokernel.π (imageToKernel' f g w) = 0) =\n    π f g w ≫ (homologyIsoCokernelImageToKernel' f g w).hom\n[PROOFSTEP]\ndsimp [π, homologyIsoCokernelImageToKernel']\n[GOAL]\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\n⊢ (((kernelSubobjectIso g).hom ≫ cokernel.π (kernel.lift g f w)) ≫\n        (cokernelIsoOfEq (_ : factorThruImage f ≫ imageToKernel' f g w = kernel.lift g f w)).inv) ≫\n      cokernel.desc (factorThruImage f ≫ imageToKernel' f g w) (cokernel.π (imageToKernel' f g w))\n        (_ : (factorThruImage f ≫ imageToKernel' f g w) ≫ cokernel.π (imageToKernel' f g w) = 0) =\n    cokernel.π (imageToKernel f g w) ≫\n      cokernel.map (imageToKernel f g w) (imageToKernel' f g w) (imageSubobjectIso f).hom (kernelSubobjectIso g).hom\n        (_ : imageToKernel f g w ≫ (kernelSubobjectIso g).hom = (imageSubobjectIso f).hom ≫ imageToKernel' f g w)\n[PROOFSTEP]\nsimp\n[GOAL]\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nX' Y' Z' : A\nf' : X' ⟶ Y'\ng' : Y' ⟶ Z'\nw' : f' ≫ g' = 0\nα : Arrow.mk f ⟶ Arrow.mk f'\nβ : Arrow.mk g ⟶ Arrow.mk g'\nh : α.right = β.left\n⊢ g ≫ β.right = α.right ≫ g'\n[PROOFSTEP]\nsimp [h, β.w.symm]\n[GOAL]\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nX' Y' Z' : A\nf' : X' ⟶ Y'\ng' : Y' ⟶ Z'\nw' : f' ≫ g' = 0\nα : Arrow.mk f ⟶ Arrow.mk f'\nβ : Arrow.mk g ⟶ Arrow.mk g'\nh : α.right = β.left\n⊢ π' f g w ≫ map w w' α β h = kernel.map g g' α.right β.right (_ : g ≫ β.right = α.right ≫ g') ≫ π' f' g' w'\n[PROOFSTEP]\napply_fun fun e => (kernelSubobjectIso _).hom ≫ e\n[GOAL]\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nX' Y' Z' : A\nf' : X' ⟶ Y'\ng' : Y' ⟶ Z'\nw' : f' ≫ g' = 0\nα : Arrow.mk f ⟶ Arrow.mk f'\nβ : Arrow.mk g ⟶ Arrow.mk g'\nh : α.right = β.left\n⊢ (fun e => (kernelSubobjectIso g).hom ≫ e) (π' f g w ≫ map w w' α β h) =\n    (fun e => (kernelSubobjectIso g).hom ≫ e)\n      (kernel.map g g' α.right β.right (_ : g ≫ β.right = α.right ≫ g') ≫ π' f' g' w')\ncase inj\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nX' Y' Z' : A\nf' : X' ⟶ Y'\ng' : Y' ⟶ Z'\nw' : f' ≫ g' = 0\nα : Arrow.mk f ⟶ Arrow.mk f'\nβ : Arrow.mk g ⟶ Arrow.mk g'\nh : α.right = β.left\n⊢ Function.Injective fun e => (kernelSubobjectIso g).hom ≫ e\n[PROOFSTEP]\nswap\n[GOAL]\ncase inj\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nX' Y' Z' : A\nf' : X' ⟶ Y'\ng' : Y' ⟶ Z'\nw' : f' ≫ g' = 0\nα : Arrow.mk f ⟶ Arrow.mk f'\nβ : Arrow.mk g ⟶ Arrow.mk g'\nh : α.right = β.left\n⊢ Function.Injective fun e => (kernelSubobjectIso g).hom ≫ e\n[PROOFSTEP]\nintro i j hh\n[GOAL]\ncase inj\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nX' Y' Z' : A\nf' : X' ⟶ Y'\ng' : Y' ⟶ Z'\nw' : f' ≫ g' = 0\nα : Arrow.mk f ⟶ Arrow.mk f'\nβ : Arrow.mk g ⟶ Arrow.mk g'\nh : α.right = β.left\ni j : kernel g ⟶ homology f' g' w'\nhh : (fun e => (kernelSubobjectIso g).hom ≫ e) i = (fun e => (kernelSubobjectIso g).hom ≫ e) j\n⊢ i = j\n[PROOFSTEP]\napply_fun fun e => (kernelSubobjectIso _).inv ≫ e at hh \n[GOAL]\ncase inj\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nX' Y' Z' : A\nf' : X' ⟶ Y'\ng' : Y' ⟶ Z'\nw' : f' ≫ g' = 0\nα : Arrow.mk f ⟶ Arrow.mk f'\nβ : Arrow.mk g ⟶ Arrow.mk g'\nh : α.right = β.left\ni j : kernel g ⟶ homology f' g' w'\nhh :\n  (kernelSubobjectIso g).inv ≫ (fun e => (kernelSubobjectIso g).hom ≫ e) i =\n    (kernelSubobjectIso g).inv ≫ (fun e => (kernelSubobjectIso g).hom ≫ e) j\n⊢ i = j\n[PROOFSTEP]\nsimpa using hh\n[GOAL]\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nX' Y' Z' : A\nf' : X' ⟶ Y'\ng' : Y' ⟶ Z'\nw' : f' ≫ g' = 0\nα : Arrow.mk f ⟶ Arrow.mk f'\nβ : Arrow.mk g ⟶ Arrow.mk g'\nh : α.right = β.left\n⊢ (fun e => (kernelSubobjectIso g).hom ≫ e) (π' f g w ≫ map w w' α β h) =\n    (fun e => (kernelSubobjectIso g).hom ≫ e)\n      (kernel.map g g' α.right β.right (_ : g ≫ β.right = α.right ≫ g') ≫ π' f' g' w')\n[PROOFSTEP]\ndsimp [map]\n[GOAL]\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nX' Y' Z' : A\nf' : X' ⟶ Y'\ng' : Y' ⟶ Z'\nw' : f' ≫ g' = 0\nα : Arrow.mk f ⟶ Arrow.mk f'\nβ : Arrow.mk g ⟶ Arrow.mk g'\nh : α.right = β.left\n⊢ (kernelSubobjectIso g).hom ≫\n      π' f g w ≫\n        cokernel.desc (imageToKernel f g w) (kernelSubobjectMap β ≫ cokernel.π (imageToKernel f' g' w'))\n          (_ : imageToKernel f g w ≫ kernelSubobjectMap β ≫ cokernel.π (imageToKernel f' g' w') = 0) =\n    (kernelSubobjectIso g).hom ≫ kernel.map g g' α.right β.right (_ : g ≫ β.right = α.right ≫ g') ≫ π' f' g' w'\n[PROOFSTEP]\nsimp only [π'_eq_π_assoc]\n[GOAL]\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nX' Y' Z' : A\nf' : X' ⟶ Y'\ng' : Y' ⟶ Z'\nw' : f' ≫ g' = 0\nα : Arrow.mk f ⟶ Arrow.mk f'\nβ : Arrow.mk g ⟶ Arrow.mk g'\nh : α.right = β.left\n⊢ π f g w ≫\n      cokernel.desc (imageToKernel f g w) (kernelSubobjectMap β ≫ cokernel.π (imageToKernel f' g' w'))\n        (_ : imageToKernel f g w ≫ kernelSubobjectMap β ≫ cokernel.π (imageToKernel f' g' w') = 0) =\n    (kernelSubobjectIso g).hom ≫ kernel.map g g' α.right β.right (_ : g ≫ β.right = α.right ≫ g') ≫ π' f' g' w'\n[PROOFSTEP]\ndsimp [π]\n[GOAL]\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nX' Y' Z' : A\nf' : X' ⟶ Y'\ng' : Y' ⟶ Z'\nw' : f' ≫ g' = 0\nα : Arrow.mk f ⟶ Arrow.mk f'\nβ : Arrow.mk g ⟶ Arrow.mk g'\nh : α.right = β.left\n⊢ cokernel.π (imageToKernel f g w) ≫\n      cokernel.desc (imageToKernel f g w) (kernelSubobjectMap β ≫ cokernel.π (imageToKernel f' g' w'))\n        (_ : imageToKernel f g w ≫ kernelSubobjectMap β ≫ cokernel.π (imageToKernel f' g' w') = 0) =\n    (kernelSubobjectIso g).hom ≫ kernel.map g g' α.right β.right (_ : g ≫ β.right = α.right ≫ g') ≫ π' f' g' w'\n[PROOFSTEP]\nsimp only [cokernel.π_desc]\n[GOAL]\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nX' Y' Z' : A\nf' : X' ⟶ Y'\ng' : Y' ⟶ Z'\nw' : f' ≫ g' = 0\nα : Arrow.mk f ⟶ Arrow.mk f'\nβ : Arrow.mk g ⟶ Arrow.mk g'\nh : α.right = β.left\n⊢ kernelSubobjectMap β ≫ cokernel.π (imageToKernel f' g' w') =\n    (kernelSubobjectIso g).hom ≫ kernel.map g g' α.right β.right (_ : g ≫ β.right = α.right ≫ g') ≫ π' f' g' w'\n[PROOFSTEP]\nrw [← Iso.inv_comp_eq, ← Category.assoc]\n[GOAL]\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nX' Y' Z' : A\nf' : X' ⟶ Y'\ng' : Y' ⟶ Z'\nw' : f' ≫ g' = 0\nα : Arrow.mk f ⟶ Arrow.mk f'\nβ : Arrow.mk g ⟶ Arrow.mk g'\nh : α.right = β.left\n⊢ ((kernelSubobjectIso g).inv ≫ kernelSubobjectMap β) ≫ cokernel.π (imageToKernel f' g' w') =\n    kernel.map g g' α.right β.right (_ : g ≫ β.right = α.right ≫ g') ≫ π' f' g' w'\n[PROOFSTEP]\nhave :\n  (kernelSubobjectIso g).inv ≫ kernelSubobjectMap β =\n    kernel.map _ _ β.left β.right β.w.symm ≫ (kernelSubobjectIso _).inv :=\n  by\n  rw [Iso.inv_comp_eq, ← Category.assoc, Iso.eq_comp_inv]\n  ext\n  dsimp\n  simp\n[GOAL]\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nX' Y' Z' : A\nf' : X' ⟶ Y'\ng' : Y' ⟶ Z'\nw' : f' ≫ g' = 0\nα : Arrow.mk f ⟶ Arrow.mk f'\nβ : Arrow.mk g ⟶ Arrow.mk g'\nh : α.right = β.left\n⊢ (kernelSubobjectIso g).inv ≫ kernelSubobjectMap β =\n    kernel.map (Arrow.mk g).hom (Arrow.mk g').hom β.left β.right\n        (_ : (Arrow.mk g).hom ≫ (𝟭 A).map β.right = (𝟭 A).map β.left ≫ (Arrow.mk g').hom) ≫\n      (kernelSubobjectIso (Arrow.mk g').hom).inv\n[PROOFSTEP]\nrw [Iso.inv_comp_eq, ← Category.assoc, Iso.eq_comp_inv]\n[GOAL]\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nX' Y' Z' : A\nf' : X' ⟶ Y'\ng' : Y' ⟶ Z'\nw' : f' ≫ g' = 0\nα : Arrow.mk f ⟶ Arrow.mk f'\nβ : Arrow.mk g ⟶ Arrow.mk g'\nh : α.right = β.left\n⊢ kernelSubobjectMap β ≫ (kernelSubobjectIso (Arrow.mk g').hom).hom =\n    (kernelSubobjectIso g).hom ≫\n      kernel.map (Arrow.mk g).hom (Arrow.mk g').hom β.left β.right\n        (_ : (Arrow.mk g).hom ≫ (𝟭 A).map β.right = (𝟭 A).map β.left ≫ (Arrow.mk g').hom)\n[PROOFSTEP]\next\n[GOAL]\ncase h\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nX' Y' Z' : A\nf' : X' ⟶ Y'\ng' : Y' ⟶ Z'\nw' : f' ≫ g' = 0\nα : Arrow.mk f ⟶ Arrow.mk f'\nβ : Arrow.mk g ⟶ Arrow.mk g'\nh : α.right = β.left\n⊢ (kernelSubobjectMap β ≫ (kernelSubobjectIso (Arrow.mk g').hom).hom) ≫ equalizer.ι (Arrow.mk g').hom 0 =\n    ((kernelSubobjectIso g).hom ≫\n        kernel.map (Arrow.mk g).hom (Arrow.mk g').hom β.left β.right\n          (_ : (Arrow.mk g).hom ≫ (𝟭 A).map β.right = (𝟭 A).map β.left ≫ (Arrow.mk g').hom)) ≫\n      equalizer.ι (Arrow.mk g').hom 0\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nX' Y' Z' : A\nf' : X' ⟶ Y'\ng' : Y' ⟶ Z'\nw' : f' ≫ g' = 0\nα : Arrow.mk f ⟶ Arrow.mk f'\nβ : Arrow.mk g ⟶ Arrow.mk g'\nh : α.right = β.left\n⊢ (kernelSubobjectMap β ≫ (kernelSubobjectIso g').hom) ≫ kernel.ι g' =\n    ((kernelSubobjectIso g).hom ≫ kernel.map g g' β.left β.right (_ : g ≫ β.right = β.left ≫ g')) ≫ kernel.ι g'\n[PROOFSTEP]\nsimp\n[GOAL]\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nX' Y' Z' : A\nf' : X' ⟶ Y'\ng' : Y' ⟶ Z'\nw' : f' ≫ g' = 0\nα : Arrow.mk f ⟶ Arrow.mk f'\nβ : Arrow.mk g ⟶ Arrow.mk g'\nh : α.right = β.left\nthis :\n  (kernelSubobjectIso g).inv ≫ kernelSubobjectMap β =\n    kernel.map (Arrow.mk g).hom (Arrow.mk g').hom β.left β.right\n        (_ : (Arrow.mk g).hom ≫ (𝟭 A).map β.right = (𝟭 A).map β.left ≫ (Arrow.mk g').hom) ≫\n      (kernelSubobjectIso (Arrow.mk g').hom).inv\n⊢ ((kernelSubobjectIso g).inv ≫ kernelSubobjectMap β) ≫ cokernel.π (imageToKernel f' g' w') =\n    kernel.map g g' α.right β.right (_ : g ≫ β.right = α.right ≫ g') ≫ π' f' g' w'\n[PROOFSTEP]\nrw [this]\n[GOAL]\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nX' Y' Z' : A\nf' : X' ⟶ Y'\ng' : Y' ⟶ Z'\nw' : f' ≫ g' = 0\nα : Arrow.mk f ⟶ Arrow.mk f'\nβ : Arrow.mk g ⟶ Arrow.mk g'\nh : α.right = β.left\nthis :\n  (kernelSubobjectIso g).inv ≫ kernelSubobjectMap β =\n    kernel.map (Arrow.mk g).hom (Arrow.mk g').hom β.left β.right\n        (_ : (Arrow.mk g).hom ≫ (𝟭 A).map β.right = (𝟭 A).map β.left ≫ (Arrow.mk g').hom) ≫\n      (kernelSubobjectIso (Arrow.mk g').hom).inv\n⊢ (kernel.map (Arrow.mk g).hom (Arrow.mk g').hom β.left β.right\n          (_ : (Arrow.mk g).hom ≫ (𝟭 A).map β.right = (𝟭 A).map β.left ≫ (Arrow.mk g').hom) ≫\n        (kernelSubobjectIso (Arrow.mk g').hom).inv) ≫\n      cokernel.π (imageToKernel f' g' w') =\n    kernel.map g g' α.right β.right (_ : g ≫ β.right = α.right ≫ g') ≫ π' f' g' w'\n[PROOFSTEP]\nsimp only [Category.assoc]\n[GOAL]\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nX' Y' Z' : A\nf' : X' ⟶ Y'\ng' : Y' ⟶ Z'\nw' : f' ≫ g' = 0\nα : Arrow.mk f ⟶ Arrow.mk f'\nβ : Arrow.mk g ⟶ Arrow.mk g'\nh : α.right = β.left\nthis :\n  (kernelSubobjectIso g).inv ≫ kernelSubobjectMap β =\n    kernel.map (Arrow.mk g).hom (Arrow.mk g').hom β.left β.right\n        (_ : (Arrow.mk g).hom ≫ (𝟭 A).map β.right = (𝟭 A).map β.left ≫ (Arrow.mk g').hom) ≫\n      (kernelSubobjectIso (Arrow.mk g').hom).inv\n⊢ kernel.map (Arrow.mk g).hom (Arrow.mk g').hom β.left β.right\n        (_ : (Arrow.mk g).hom ≫ (𝟭 A).map β.right = (𝟭 A).map β.left ≫ (Arrow.mk g').hom) ≫\n      (kernelSubobjectIso (Arrow.mk g').hom).inv ≫ cokernel.π (imageToKernel f' g' w') =\n    kernel.map g g' α.right β.right (_ : g ≫ β.right = α.right ≫ g') ≫ π' f' g' w'\n[PROOFSTEP]\ndsimp [π', homologyIsoCokernelLift]\n[GOAL]\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nX' Y' Z' : A\nf' : X' ⟶ Y'\ng' : Y' ⟶ Z'\nw' : f' ≫ g' = 0\nα : Arrow.mk f ⟶ Arrow.mk f'\nβ : Arrow.mk g ⟶ Arrow.mk g'\nh : α.right = β.left\nthis :\n  (kernelSubobjectIso g).inv ≫ kernelSubobjectMap β =\n    kernel.map (Arrow.mk g).hom (Arrow.mk g').hom β.left β.right\n        (_ : (Arrow.mk g).hom ≫ (𝟭 A).map β.right = (𝟭 A).map β.left ≫ (Arrow.mk g').hom) ≫\n      (kernelSubobjectIso (Arrow.mk g').hom).inv\n⊢ kernel.map g g' β.left β.right (_ : g ≫ β.right = β.left ≫ g') ≫\n      (kernelSubobjectIso g').inv ≫ cokernel.π (imageToKernel f' g' w') =\n    kernel.map g g' α.right β.right (_ : g ≫ β.right = α.right ≫ g') ≫\n      cokernel.π (kernel.lift g' f' w') ≫\n        ((cokernelIsoOfEq (_ : factorThruImage f' ≫ imageToKernel' f' g' w' = kernel.lift g' f' w')).inv ≫\n            cokernel.desc (factorThruImage f' ≫ imageToKernel' f' g' w') (cokernel.π (imageToKernel' f' g' w'))\n              (_ : (factorThruImage f' ≫ imageToKernel' f' g' w') ≫ cokernel.π (imageToKernel' f' g' w') = 0)) ≫\n          (homologyIsoCokernelImageToKernel' f' g' w').inv\n[PROOFSTEP]\nsimp only [cokernelIsoOfEq_inv_comp_desc, cokernel.π_desc_assoc]\n[GOAL]\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nX' Y' Z' : A\nf' : X' ⟶ Y'\ng' : Y' ⟶ Z'\nw' : f' ≫ g' = 0\nα : Arrow.mk f ⟶ Arrow.mk f'\nβ : Arrow.mk g ⟶ Arrow.mk g'\nh : α.right = β.left\nthis :\n  (kernelSubobjectIso g).inv ≫ kernelSubobjectMap β =\n    kernel.map (Arrow.mk g).hom (Arrow.mk g').hom β.left β.right\n        (_ : (Arrow.mk g).hom ≫ (𝟭 A).map β.right = (𝟭 A).map β.left ≫ (Arrow.mk g').hom) ≫\n      (kernelSubobjectIso (Arrow.mk g').hom).inv\n⊢ kernel.map g g' β.left β.right (_ : g ≫ β.right = β.left ≫ g') ≫\n      (kernelSubobjectIso g').inv ≫ cokernel.π (imageToKernel f' g' w') =\n    kernel.map g g' α.right β.right (_ : g ≫ β.right = α.right ≫ g') ≫\n      cokernel.π (imageToKernel' f' g' w') ≫ (homologyIsoCokernelImageToKernel' f' g' w').inv\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_a\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nX' Y' Z' : A\nf' : X' ⟶ Y'\ng' : Y' ⟶ Z'\nw' : f' ≫ g' = 0\nα : Arrow.mk f ⟶ Arrow.mk f'\nβ : Arrow.mk g ⟶ Arrow.mk g'\nh : α.right = β.left\nthis :\n  (kernelSubobjectIso g).inv ≫ kernelSubobjectMap β =\n    kernel.map (Arrow.mk g).hom (Arrow.mk g').hom β.left β.right\n        (_ : (Arrow.mk g).hom ≫ (𝟭 A).map β.right = (𝟭 A).map β.left ≫ (Arrow.mk g').hom) ≫\n      (kernelSubobjectIso (Arrow.mk g').hom).inv\n⊢ kernel.map g g' β.left β.right (_ : g ≫ β.right = β.left ≫ g') =\n    kernel.map g g' α.right β.right (_ : g ≫ β.right = α.right ≫ g')\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_a.e_p\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nX' Y' Z' : A\nf' : X' ⟶ Y'\ng' : Y' ⟶ Z'\nw' : f' ≫ g' = 0\nα : Arrow.mk f ⟶ Arrow.mk f'\nβ : Arrow.mk g ⟶ Arrow.mk g'\nh : α.right = β.left\nthis :\n  (kernelSubobjectIso g).inv ≫ kernelSubobjectMap β =\n    kernel.map (Arrow.mk g).hom (Arrow.mk g').hom β.left β.right\n        (_ : (Arrow.mk g).hom ≫ (𝟭 A).map β.right = (𝟭 A).map β.left ≫ (Arrow.mk g').hom) ≫\n      (kernelSubobjectIso (Arrow.mk g').hom).inv\n⊢ β.left = α.right\n[PROOFSTEP]\nexact h.symm\n[GOAL]\ncase e_a\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nX' Y' Z' : A\nf' : X' ⟶ Y'\ng' : Y' ⟶ Z'\nw' : f' ≫ g' = 0\nα : Arrow.mk f ⟶ Arrow.mk f'\nβ : Arrow.mk g ⟶ Arrow.mk g'\nh : α.right = β.left\nthis :\n  (kernelSubobjectIso g).inv ≫ kernelSubobjectMap β =\n    kernel.map (Arrow.mk g).hom (Arrow.mk g').hom β.left β.right\n        (_ : (Arrow.mk g).hom ≫ (𝟭 A).map β.right = (𝟭 A).map β.left ≫ (Arrow.mk g').hom) ≫\n      (kernelSubobjectIso (Arrow.mk g').hom).inv\n⊢ (kernelSubobjectIso g').inv ≫ cokernel.π (imageToKernel f' g' w') =\n    cokernel.π (imageToKernel' f' g' w') ≫ (homologyIsoCokernelImageToKernel' f' g' w').inv\n[PROOFSTEP]\nrw [Iso.inv_comp_eq, ← Category.assoc, Iso.eq_comp_inv]\n[GOAL]\ncase e_a\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nX' Y' Z' : A\nf' : X' ⟶ Y'\ng' : Y' ⟶ Z'\nw' : f' ≫ g' = 0\nα : Arrow.mk f ⟶ Arrow.mk f'\nβ : Arrow.mk g ⟶ Arrow.mk g'\nh : α.right = β.left\nthis :\n  (kernelSubobjectIso g).inv ≫ kernelSubobjectMap β =\n    kernel.map (Arrow.mk g).hom (Arrow.mk g').hom β.left β.right\n        (_ : (Arrow.mk g).hom ≫ (𝟭 A).map β.right = (𝟭 A).map β.left ≫ (Arrow.mk g').hom) ≫\n      (kernelSubobjectIso (Arrow.mk g').hom).inv\n⊢ cokernel.π (imageToKernel f' g' w') ≫ (homologyIsoCokernelImageToKernel' f' g' w').hom =\n    (kernelSubobjectIso g').hom ≫ cokernel.π (imageToKernel' f' g' w')\n[PROOFSTEP]\ndsimp [homologyIsoCokernelImageToKernel']\n[GOAL]\ncase e_a\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nX' Y' Z' : A\nf' : X' ⟶ Y'\ng' : Y' ⟶ Z'\nw' : f' ≫ g' = 0\nα : Arrow.mk f ⟶ Arrow.mk f'\nβ : Arrow.mk g ⟶ Arrow.mk g'\nh : α.right = β.left\nthis :\n  (kernelSubobjectIso g).inv ≫ kernelSubobjectMap β =\n    kernel.map (Arrow.mk g).hom (Arrow.mk g').hom β.left β.right\n        (_ : (Arrow.mk g).hom ≫ (𝟭 A).map β.right = (𝟭 A).map β.left ≫ (Arrow.mk g').hom) ≫\n      (kernelSubobjectIso (Arrow.mk g').hom).inv\n⊢ cokernel.π (imageToKernel f' g' w') ≫\n      cokernel.map (imageToKernel f' g' w') (imageToKernel' f' g' w') (imageSubobjectIso f').hom\n        (kernelSubobjectIso g').hom\n        (_ :\n          imageToKernel f' g' w' ≫ (kernelSubobjectIso g').hom = (imageSubobjectIso f').hom ≫ imageToKernel' f' g' w') =\n    (kernelSubobjectIso g').hom ≫ cokernel.π (imageToKernel' f' g' w')\n[PROOFSTEP]\nsimp\n[GOAL]\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nX' Y' Z' : A\nf' : X' ⟶ Y'\ng' : Y' ⟶ Z'\nw' : f' ≫ g' = 0\nα : Arrow.mk f ⟶ Arrow.mk f'\nβ : Arrow.mk g ⟶ Arrow.mk g'\nh : α.right = β.left\n⊢ (kernel.ι g ≫ β.left ≫ cokernel.π f') ≫ cokernel.desc f' g' w' = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nX' Y' Z' : A\nf' : X' ⟶ Y'\ng' : Y' ⟶ Z'\nw' : f' ≫ g' = 0\nα : Arrow.mk f ⟶ Arrow.mk f'\nβ : Arrow.mk g ⟶ Arrow.mk g'\nh : α.right = β.left\n⊢ kernel.lift g f w ≫\n      lift f' g' w' (kernel.ι g ≫ β.left ≫ cokernel.π f')\n        (_ : (kernel.ι g ≫ β.left ≫ cokernel.π f') ≫ cokernel.desc f' g' w' = 0) =\n    0\n[PROOFSTEP]\next\n[GOAL]\ncase h\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nX' Y' Z' : A\nf' : X' ⟶ Y'\ng' : Y' ⟶ Z'\nw' : f' ≫ g' = 0\nα : Arrow.mk f ⟶ Arrow.mk f'\nβ : Arrow.mk g ⟶ Arrow.mk g'\nh : α.right = β.left\n⊢ (kernel.lift g f w ≫\n        lift f' g' w' (kernel.ι g ≫ β.left ≫ cokernel.π f')\n          (_ : (kernel.ι g ≫ β.left ≫ cokernel.π f') ≫ cokernel.desc f' g' w' = 0)) ≫\n      ι f' g' w' =\n    0 ≫ ι f' g' w'\n[PROOFSTEP]\nsimp only [← h, Category.assoc, zero_comp, lift_ι, kernel.lift_ι_assoc]\n[GOAL]\ncase h\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nX' Y' Z' : A\nf' : X' ⟶ Y'\ng' : Y' ⟶ Z'\nw' : f' ≫ g' = 0\nα : Arrow.mk f ⟶ Arrow.mk f'\nβ : Arrow.mk g ⟶ Arrow.mk g'\nh : α.right = β.left\n⊢ f ≫ α.right ≫ cokernel.π f' = 0\n[PROOFSTEP]\nerw [← reassoc_of% α.w]\n[GOAL]\ncase h\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nX' Y' Z' : A\nf' : X' ⟶ Y'\ng' : Y' ⟶ Z'\nw' : f' ≫ g' = 0\nα : Arrow.mk f ⟶ Arrow.mk f'\nβ : Arrow.mk g ⟶ Arrow.mk g'\nh : α.right = β.left\n⊢ α.left ≫ (Arrow.mk f').hom ≫ cokernel.π f' = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nX' Y' Z' : A\nf' : X' ⟶ Y'\ng' : Y' ⟶ Z'\nw' : f' ≫ g' = 0\nα : Arrow.mk f ⟶ Arrow.mk f'\nβ : Arrow.mk g ⟶ Arrow.mk g'\nh : α.right = β.left\n⊢ map w w' α β h =\n    desc' f g w\n      (lift f' g' w' (kernel.ι g ≫ β.left ≫ cokernel.π f')\n        (_ : (kernel.ι g ≫ β.left ≫ cokernel.π f') ≫ cokernel.desc f' g' w' = 0))\n      (_ :\n        kernel.lift g f w ≫\n            lift f' g' w' (kernel.ι g ≫ β.left ≫ cokernel.π f')\n              (_ : (kernel.ι g ≫ β.left ≫ cokernel.π f') ≫ cokernel.desc f' g' w' = 0) =\n          0)\n[PROOFSTEP]\napply homology.hom_from_ext\n[GOAL]\ncase h\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nX' Y' Z' : A\nf' : X' ⟶ Y'\ng' : Y' ⟶ Z'\nw' : f' ≫ g' = 0\nα : Arrow.mk f ⟶ Arrow.mk f'\nβ : Arrow.mk g ⟶ Arrow.mk g'\nh : α.right = β.left\n⊢ π' f g w ≫ map w w' α β h =\n    π' f g w ≫\n      desc' f g w\n        (lift f' g' w' (kernel.ι g ≫ β.left ≫ cokernel.π f')\n          (_ : (kernel.ι g ≫ β.left ≫ cokernel.π f') ≫ cokernel.desc f' g' w' = 0))\n        (_ :\n          kernel.lift g f w ≫\n              lift f' g' w' (kernel.ι g ≫ β.left ≫ cokernel.π f')\n                (_ : (kernel.ι g ≫ β.left ≫ cokernel.π f') ≫ cokernel.desc f' g' w' = 0) =\n            0)\n[PROOFSTEP]\nsimp only [π'_map, π'_desc']\n[GOAL]\ncase h\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nX' Y' Z' : A\nf' : X' ⟶ Y'\ng' : Y' ⟶ Z'\nw' : f' ≫ g' = 0\nα : Arrow.mk f ⟶ Arrow.mk f'\nβ : Arrow.mk g ⟶ Arrow.mk g'\nh : α.right = β.left\n⊢ kernel.map g g' α.right β.right (_ : g ≫ β.right = α.right ≫ g') ≫ π' f' g' w' =\n    lift f' g' w' (kernel.ι g ≫ β.left ≫ cokernel.π f')\n      (_ : (kernel.ι g ≫ β.left ≫ cokernel.π f') ≫ cokernel.desc f' g' w' = 0)\n[PROOFSTEP]\ndsimp [π', lift]\n[GOAL]\ncase h\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nX' Y' Z' : A\nf' : X' ⟶ Y'\ng' : Y' ⟶ Z'\nw' : f' ≫ g' = 0\nα : Arrow.mk f ⟶ Arrow.mk f'\nβ : Arrow.mk g ⟶ Arrow.mk g'\nh : α.right = β.left\n⊢ kernel.map g g' α.right β.right (_ : g ≫ β.right = α.right ≫ g') ≫\n      cokernel.π (kernel.lift g' f' w') ≫ (homologyIsoCokernelLift f' g' w').inv =\n    kernel.lift (cokernel.desc f' g' w') (kernel.ι g ≫ β.left ≫ cokernel.π f')\n        (_ : (kernel.ι g ≫ β.left ≫ cokernel.π f') ≫ cokernel.desc f' g' w' = 0) ≫\n      (homologyIsoKernelDesc f' g' w').inv\n[PROOFSTEP]\nrw [Iso.eq_comp_inv]\n[GOAL]\ncase h\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nX' Y' Z' : A\nf' : X' ⟶ Y'\ng' : Y' ⟶ Z'\nw' : f' ≫ g' = 0\nα : Arrow.mk f ⟶ Arrow.mk f'\nβ : Arrow.mk g ⟶ Arrow.mk g'\nh : α.right = β.left\n⊢ (kernel.map g g' α.right β.right (_ : g ≫ β.right = α.right ≫ g') ≫\n        cokernel.π (kernel.lift g' f' w') ≫ (homologyIsoCokernelLift f' g' w').inv) ≫\n      (homologyIsoKernelDesc f' g' w').hom =\n    kernel.lift (cokernel.desc f' g' w') (kernel.ι g ≫ β.left ≫ cokernel.π f')\n      (_ : (kernel.ι g ≫ β.left ≫ cokernel.π f') ≫ cokernel.desc f' g' w' = 0)\n[PROOFSTEP]\ndsimp [homologyIsoKernelDesc]\n[GOAL]\ncase h\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nX' Y' Z' : A\nf' : X' ⟶ Y'\ng' : Y' ⟶ Z'\nw' : f' ≫ g' = 0\nα : Arrow.mk f ⟶ Arrow.mk f'\nβ : Arrow.mk g ⟶ Arrow.mk g'\nh : α.right = β.left\n⊢ (kernel.map g g' α.right β.right (_ : g ≫ β.right = α.right ≫ g') ≫\n        cokernel.π (kernel.lift g' f' w') ≫ (homologyIsoCokernelLift f' g' w').inv) ≫\n      (homologyIsoCokernelLift f' g' w').hom ≫ Abelian.homologyCToK f' g' w' =\n    kernel.lift (cokernel.desc f' g' w') (kernel.ι g ≫ β.left ≫ cokernel.π f')\n      (_ : (kernel.ι g ≫ β.left ≫ cokernel.π f') ≫ cokernel.desc f' g' w' = 0)\n[PROOFSTEP]\next\n[GOAL]\ncase h.h\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nX' Y' Z' : A\nf' : X' ⟶ Y'\ng' : Y' ⟶ Z'\nw' : f' ≫ g' = 0\nα : Arrow.mk f ⟶ Arrow.mk f'\nβ : Arrow.mk g ⟶ Arrow.mk g'\nh : α.right = β.left\n⊢ ((kernel.map g g' α.right β.right (_ : g ≫ β.right = α.right ≫ g') ≫\n          cokernel.π (kernel.lift g' f' w') ≫ (homologyIsoCokernelLift f' g' w').inv) ≫\n        (homologyIsoCokernelLift f' g' w').hom ≫ Abelian.homologyCToK f' g' w') ≫\n      equalizer.ι (cokernel.desc f' g' w') 0 =\n    kernel.lift (cokernel.desc f' g' w') (kernel.ι g ≫ β.left ≫ cokernel.π f')\n        (_ : (kernel.ι g ≫ β.left ≫ cokernel.π f') ≫ cokernel.desc f' g' w' = 0) ≫\n      equalizer.ι (cokernel.desc f' g' w') 0\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nX' Y' Z' : A\nf' : X' ⟶ Y'\ng' : Y' ⟶ Z'\nw' : f' ≫ g' = 0\nα : Arrow.mk f ⟶ Arrow.mk f'\nβ : Arrow.mk g ⟶ Arrow.mk g'\nh : α.right = β.left\n⊢ kernel.lift g f w ≫ kernel.ι g ≫ β.left ≫ cokernel.π f' = 0\n[PROOFSTEP]\nsimp only [kernel.lift_ι_assoc, ← h]\n[GOAL]\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nX' Y' Z' : A\nf' : X' ⟶ Y'\ng' : Y' ⟶ Z'\nw' : f' ≫ g' = 0\nα : Arrow.mk f ⟶ Arrow.mk f'\nβ : Arrow.mk g ⟶ Arrow.mk g'\nh : α.right = β.left\n⊢ f ≫ α.right ≫ cokernel.π f' = 0\n[PROOFSTEP]\nerw [← reassoc_of% α.w]\n[GOAL]\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nX' Y' Z' : A\nf' : X' ⟶ Y'\ng' : Y' ⟶ Z'\nw' : f' ≫ g' = 0\nα : Arrow.mk f ⟶ Arrow.mk f'\nβ : Arrow.mk g ⟶ Arrow.mk g'\nh : α.right = β.left\n⊢ α.left ≫ (Arrow.mk f').hom ≫ cokernel.π f' = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nX' Y' Z' : A\nf' : X' ⟶ Y'\ng' : Y' ⟶ Z'\nw' : f' ≫ g' = 0\nα : Arrow.mk f ⟶ Arrow.mk f'\nβ : Arrow.mk g ⟶ Arrow.mk g'\nh : α.right = β.left\n⊢ desc' f g w (kernel.ι g ≫ β.left ≫ cokernel.π f') (_ : kernel.lift g f w ≫ kernel.ι g ≫ β.left ≫ cokernel.π f' = 0) ≫\n      cokernel.desc f' g' w' =\n    0\n[PROOFSTEP]\napply homology.hom_from_ext\n[GOAL]\ncase h\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nX' Y' Z' : A\nf' : X' ⟶ Y'\ng' : Y' ⟶ Z'\nw' : f' ≫ g' = 0\nα : Arrow.mk f ⟶ Arrow.mk f'\nβ : Arrow.mk g ⟶ Arrow.mk g'\nh : α.right = β.left\n⊢ π' f g w ≫\n      desc' f g w (kernel.ι g ≫ β.left ≫ cokernel.π f')\n          (_ : kernel.lift g f w ≫ kernel.ι g ≫ β.left ≫ cokernel.π f' = 0) ≫\n        cokernel.desc f' g' w' =\n    π' f g w ≫ 0\n[PROOFSTEP]\nsimp\n[GOAL]\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nX' Y' Z' : A\nf' : X' ⟶ Y'\ng' : Y' ⟶ Z'\nw' : f' ≫ g' = 0\nα : Arrow.mk f ⟶ Arrow.mk f'\nβ : Arrow.mk g ⟶ Arrow.mk g'\nh : α.right = β.left\n⊢ map w w' α β h =\n    lift f' g' w'\n      (desc' f g w (kernel.ι g ≫ β.left ≫ cokernel.π f')\n        (_ : kernel.lift g f w ≫ kernel.ι g ≫ β.left ≫ cokernel.π f' = 0))\n      (_ :\n        desc' f g w (kernel.ι g ≫ β.left ≫ cokernel.π f')\n              (_ : kernel.lift g f w ≫ kernel.ι g ≫ β.left ≫ cokernel.π f' = 0) ≫\n            cokernel.desc f' g' w' =\n          0)\n[PROOFSTEP]\nrw [map_eq_desc'_lift_left]\n  -- Porting note: once was known as ext\n[GOAL]\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nX' Y' Z' : A\nf' : X' ⟶ Y'\ng' : Y' ⟶ Z'\nw' : f' ≫ g' = 0\nα : Arrow.mk f ⟶ Arrow.mk f'\nβ : Arrow.mk g ⟶ Arrow.mk g'\nh : α.right = β.left\n⊢ desc' f g w\n      (lift f' g' w' (kernel.ι g ≫ β.left ≫ cokernel.π f')\n        (_ : (kernel.ι g ≫ β.left ≫ cokernel.π f') ≫ cokernel.desc f' g' w' = 0))\n      (_ :\n        kernel.lift g f w ≫\n            lift f' g' w' (kernel.ι g ≫ β.left ≫ cokernel.π f')\n              (_ : (kernel.ι g ≫ β.left ≫ cokernel.π f') ≫ cokernel.desc f' g' w' = 0) =\n          0) =\n    lift f' g' w'\n      (desc' f g w (kernel.ι g ≫ β.left ≫ cokernel.π f')\n        (_ : kernel.lift g f w ≫ kernel.ι g ≫ β.left ≫ cokernel.π f' = 0))\n      (_ :\n        desc' f g w (kernel.ι g ≫ β.left ≫ cokernel.π f')\n              (_ : kernel.lift g f w ≫ kernel.ι g ≫ β.left ≫ cokernel.π f' = 0) ≫\n            cokernel.desc f' g' w' =\n          0)\n[PROOFSTEP]\napply homology.hom_to_ext\n[GOAL]\ncase h\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nX' Y' Z' : A\nf' : X' ⟶ Y'\ng' : Y' ⟶ Z'\nw' : f' ≫ g' = 0\nα : Arrow.mk f ⟶ Arrow.mk f'\nβ : Arrow.mk g ⟶ Arrow.mk g'\nh : α.right = β.left\n⊢ desc' f g w\n        (lift f' g' w' (kernel.ι g ≫ β.left ≫ cokernel.π f')\n          (_ : (kernel.ι g ≫ β.left ≫ cokernel.π f') ≫ cokernel.desc f' g' w' = 0))\n        (_ :\n          kernel.lift g f w ≫\n              lift f' g' w' (kernel.ι g ≫ β.left ≫ cokernel.π f')\n                (_ : (kernel.ι g ≫ β.left ≫ cokernel.π f') ≫ cokernel.desc f' g' w' = 0) =\n            0) ≫\n      ι f' g' w' =\n    lift f' g' w'\n        (desc' f g w (kernel.ι g ≫ β.left ≫ cokernel.π f')\n          (_ : kernel.lift g f w ≫ kernel.ι g ≫ β.left ≫ cokernel.π f' = 0))\n        (_ :\n          desc' f g w (kernel.ι g ≫ β.left ≫ cokernel.π f')\n                (_ : kernel.lift g f w ≫ kernel.ι g ≫ β.left ≫ cokernel.π f' = 0) ≫\n              cokernel.desc f' g' w' =\n            0) ≫\n      ι f' g' w'\n[PROOFSTEP]\napply homology.hom_from_ext\n[GOAL]\ncase h.h\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nX' Y' Z' : A\nf' : X' ⟶ Y'\ng' : Y' ⟶ Z'\nw' : f' ≫ g' = 0\nα : Arrow.mk f ⟶ Arrow.mk f'\nβ : Arrow.mk g ⟶ Arrow.mk g'\nh : α.right = β.left\n⊢ π' f g w ≫\n      desc' f g w\n          (lift f' g' w' (kernel.ι g ≫ β.left ≫ cokernel.π f')\n            (_ : (kernel.ι g ≫ β.left ≫ cokernel.π f') ≫ cokernel.desc f' g' w' = 0))\n          (_ :\n            kernel.lift g f w ≫\n                lift f' g' w' (kernel.ι g ≫ β.left ≫ cokernel.π f')\n                  (_ : (kernel.ι g ≫ β.left ≫ cokernel.π f') ≫ cokernel.desc f' g' w' = 0) =\n              0) ≫\n        ι f' g' w' =\n    π' f g w ≫\n      lift f' g' w'\n          (desc' f g w (kernel.ι g ≫ β.left ≫ cokernel.π f')\n            (_ : kernel.lift g f w ≫ kernel.ι g ≫ β.left ≫ cokernel.π f' = 0))\n          (_ :\n            desc' f g w (kernel.ι g ≫ β.left ≫ cokernel.π f')\n                  (_ : kernel.lift g f w ≫ kernel.ι g ≫ β.left ≫ cokernel.π f' = 0) ≫\n                cokernel.desc f' g' w' =\n              0) ≫\n        ι f' g' w'\n[PROOFSTEP]\nsimp\n[GOAL]\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nX' Y' Z' : A\nf' : X' ⟶ Y'\ng' : Y' ⟶ Z'\nw' : f' ≫ g' = 0\nα : Arrow.mk f ⟶ Arrow.mk f'\nβ : Arrow.mk g ⟶ Arrow.mk g'\nh : α.right = β.left\n⊢ (kernel.ι g ≫ α.right ≫ cokernel.π f') ≫ cokernel.desc f' g' w' = 0\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nX' Y' Z' : A\nf' : X' ⟶ Y'\ng' : Y' ⟶ Z'\nw' : f' ≫ g' = 0\nα : Arrow.mk f ⟶ Arrow.mk f'\nβ : Arrow.mk g ⟶ Arrow.mk g'\nh : α.right = β.left\n⊢ kernel.lift g f w ≫\n      lift f' g' w' (kernel.ι g ≫ α.right ≫ cokernel.π f')\n        (_ : (kernel.ι g ≫ α.right ≫ cokernel.π f') ≫ cokernel.desc f' g' w' = 0) =\n    0\n[PROOFSTEP]\next\n[GOAL]\ncase h\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nX' Y' Z' : A\nf' : X' ⟶ Y'\ng' : Y' ⟶ Z'\nw' : f' ≫ g' = 0\nα : Arrow.mk f ⟶ Arrow.mk f'\nβ : Arrow.mk g ⟶ Arrow.mk g'\nh : α.right = β.left\n⊢ (kernel.lift g f w ≫\n        lift f' g' w' (kernel.ι g ≫ α.right ≫ cokernel.π f')\n          (_ : (kernel.ι g ≫ α.right ≫ cokernel.π f') ≫ cokernel.desc f' g' w' = 0)) ≫\n      ι f' g' w' =\n    0 ≫ ι f' g' w'\n[PROOFSTEP]\nsimp only [Category.assoc, zero_comp, lift_ι, kernel.lift_ι_assoc]\n[GOAL]\ncase h\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nX' Y' Z' : A\nf' : X' ⟶ Y'\ng' : Y' ⟶ Z'\nw' : f' ≫ g' = 0\nα : Arrow.mk f ⟶ Arrow.mk f'\nβ : Arrow.mk g ⟶ Arrow.mk g'\nh : α.right = β.left\n⊢ f ≫ α.right ≫ cokernel.π f' = 0\n[PROOFSTEP]\nerw [← reassoc_of% α.w]\n[GOAL]\ncase h\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nX' Y' Z' : A\nf' : X' ⟶ Y'\ng' : Y' ⟶ Z'\nw' : f' ≫ g' = 0\nα : Arrow.mk f ⟶ Arrow.mk f'\nβ : Arrow.mk g ⟶ Arrow.mk g'\nh : α.right = β.left\n⊢ α.left ≫ (Arrow.mk f').hom ≫ cokernel.π f' = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nX' Y' Z' : A\nf' : X' ⟶ Y'\ng' : Y' ⟶ Z'\nw' : f' ≫ g' = 0\nα : Arrow.mk f ⟶ Arrow.mk f'\nβ : Arrow.mk g ⟶ Arrow.mk g'\nh : α.right = β.left\n⊢ map w w' α β h =\n    desc' f g w\n      (lift f' g' w' (kernel.ι g ≫ α.right ≫ cokernel.π f')\n        (_ : (kernel.ι g ≫ α.right ≫ cokernel.π f') ≫ cokernel.desc f' g' w' = 0))\n      (_ :\n        kernel.lift g f w ≫\n            lift f' g' w' (kernel.ι g ≫ α.right ≫ cokernel.π f')\n              (_ : (kernel.ι g ≫ α.right ≫ cokernel.π f') ≫ cokernel.desc f' g' w' = 0) =\n          0)\n[PROOFSTEP]\nrw [map_eq_desc'_lift_left]\n[GOAL]\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nX' Y' Z' : A\nf' : X' ⟶ Y'\ng' : Y' ⟶ Z'\nw' : f' ≫ g' = 0\nα : Arrow.mk f ⟶ Arrow.mk f'\nβ : Arrow.mk g ⟶ Arrow.mk g'\nh : α.right = β.left\n⊢ desc' f g w\n      (lift f' g' w' (kernel.ι g ≫ β.left ≫ cokernel.π f')\n        (_ : (kernel.ι g ≫ β.left ≫ cokernel.π f') ≫ cokernel.desc f' g' w' = 0))\n      (_ :\n        kernel.lift g f w ≫\n            lift f' g' w' (kernel.ι g ≫ β.left ≫ cokernel.π f')\n              (_ : (kernel.ι g ≫ β.left ≫ cokernel.π f') ≫ cokernel.desc f' g' w' = 0) =\n          0) =\n    desc' f g w\n      (lift f' g' w' (kernel.ι g ≫ α.right ≫ cokernel.π f')\n        (_ : (kernel.ι g ≫ α.right ≫ cokernel.π f') ≫ cokernel.desc f' g' w' = 0))\n      (_ :\n        kernel.lift g f w ≫\n            lift f' g' w' (kernel.ι g ≫ α.right ≫ cokernel.π f')\n              (_ : (kernel.ι g ≫ α.right ≫ cokernel.π f') ≫ cokernel.desc f' g' w' = 0) =\n          0)\n[PROOFSTEP]\next\n[GOAL]\ncase h.h\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nX' Y' Z' : A\nf' : X' ⟶ Y'\ng' : Y' ⟶ Z'\nw' : f' ≫ g' = 0\nα : Arrow.mk f ⟶ Arrow.mk f'\nβ : Arrow.mk g ⟶ Arrow.mk g'\nh : α.right = β.left\n⊢ (π' f g w ≫\n        desc' f g w\n          (lift f' g' w' (kernel.ι g ≫ β.left ≫ cokernel.π f')\n            (_ : (kernel.ι g ≫ β.left ≫ cokernel.π f') ≫ cokernel.desc f' g' w' = 0))\n          (_ :\n            kernel.lift g f w ≫\n                lift f' g' w' (kernel.ι g ≫ β.left ≫ cokernel.π f')\n                  (_ : (kernel.ι g ≫ β.left ≫ cokernel.π f') ≫ cokernel.desc f' g' w' = 0) =\n              0)) ≫\n      ι f' g' w' =\n    (π' f g w ≫\n        desc' f g w\n          (lift f' g' w' (kernel.ι g ≫ α.right ≫ cokernel.π f')\n            (_ : (kernel.ι g ≫ α.right ≫ cokernel.π f') ≫ cokernel.desc f' g' w' = 0))\n          (_ :\n            kernel.lift g f w ≫\n                lift f' g' w' (kernel.ι g ≫ α.right ≫ cokernel.π f')\n                  (_ : (kernel.ι g ≫ α.right ≫ cokernel.π f') ≫ cokernel.desc f' g' w' = 0) =\n              0)) ≫\n      ι f' g' w'\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nX' Y' Z' : A\nf' : X' ⟶ Y'\ng' : Y' ⟶ Z'\nw' : f' ≫ g' = 0\nα : Arrow.mk f ⟶ Arrow.mk f'\nβ : Arrow.mk g ⟶ Arrow.mk g'\nh : α.right = β.left\n⊢ kernel.lift g f w ≫ kernel.ι g ≫ α.right ≫ cokernel.π f' = 0\n[PROOFSTEP]\nsimp only [kernel.lift_ι_assoc]\n[GOAL]\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nX' Y' Z' : A\nf' : X' ⟶ Y'\ng' : Y' ⟶ Z'\nw' : f' ≫ g' = 0\nα : Arrow.mk f ⟶ Arrow.mk f'\nβ : Arrow.mk g ⟶ Arrow.mk g'\nh : α.right = β.left\n⊢ f ≫ α.right ≫ cokernel.π f' = 0\n[PROOFSTEP]\nerw [← reassoc_of% α.w]\n[GOAL]\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nX' Y' Z' : A\nf' : X' ⟶ Y'\ng' : Y' ⟶ Z'\nw' : f' ≫ g' = 0\nα : Arrow.mk f ⟶ Arrow.mk f'\nβ : Arrow.mk g ⟶ Arrow.mk g'\nh : α.right = β.left\n⊢ α.left ≫ (Arrow.mk f').hom ≫ cokernel.π f' = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nX' Y' Z' : A\nf' : X' ⟶ Y'\ng' : Y' ⟶ Z'\nw' : f' ≫ g' = 0\nα : Arrow.mk f ⟶ Arrow.mk f'\nβ : Arrow.mk g ⟶ Arrow.mk g'\nh : α.right = β.left\n⊢ desc' f g w (kernel.ι g ≫ α.right ≫ cokernel.π f')\n        (_ : kernel.lift g f w ≫ kernel.ι g ≫ α.right ≫ cokernel.π f' = 0) ≫\n      cokernel.desc f' g' w' =\n    0\n[PROOFSTEP]\napply homology.hom_from_ext\n[GOAL]\ncase h\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nX' Y' Z' : A\nf' : X' ⟶ Y'\ng' : Y' ⟶ Z'\nw' : f' ≫ g' = 0\nα : Arrow.mk f ⟶ Arrow.mk f'\nβ : Arrow.mk g ⟶ Arrow.mk g'\nh : α.right = β.left\n⊢ π' f g w ≫\n      desc' f g w (kernel.ι g ≫ α.right ≫ cokernel.π f')\n          (_ : kernel.lift g f w ≫ kernel.ι g ≫ α.right ≫ cokernel.π f' = 0) ≫\n        cokernel.desc f' g' w' =\n    π' f g w ≫ 0\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nX' Y' Z' : A\nf' : X' ⟶ Y'\ng' : Y' ⟶ Z'\nw' : f' ≫ g' = 0\nα : Arrow.mk f ⟶ Arrow.mk f'\nβ : Arrow.mk g ⟶ Arrow.mk g'\nh : α.right = β.left\n⊢ map w w' α β h =\n    lift f' g' w'\n      (desc' f g w (kernel.ι g ≫ α.right ≫ cokernel.π f')\n        (_ : kernel.lift g f w ≫ kernel.ι g ≫ α.right ≫ cokernel.π f' = 0))\n      (_ :\n        desc' f g w (kernel.ι g ≫ α.right ≫ cokernel.π f')\n              (_ : kernel.lift g f w ≫ kernel.ι g ≫ α.right ≫ cokernel.π f' = 0) ≫\n            cokernel.desc f' g' w' =\n          0)\n[PROOFSTEP]\nrw [map_eq_desc'_lift_right]\n  -- Porting note: once was known as ext\n[GOAL]\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nX' Y' Z' : A\nf' : X' ⟶ Y'\ng' : Y' ⟶ Z'\nw' : f' ≫ g' = 0\nα : Arrow.mk f ⟶ Arrow.mk f'\nβ : Arrow.mk g ⟶ Arrow.mk g'\nh : α.right = β.left\n⊢ desc' f g w\n      (lift f' g' w' (kernel.ι g ≫ α.right ≫ cokernel.π f')\n        (_ : (kernel.ι g ≫ α.right ≫ cokernel.π f') ≫ cokernel.desc f' g' w' = 0))\n      (_ :\n        kernel.lift g f w ≫\n            lift f' g' w' (kernel.ι g ≫ α.right ≫ cokernel.π f')\n              (_ : (kernel.ι g ≫ α.right ≫ cokernel.π f') ≫ cokernel.desc f' g' w' = 0) =\n          0) =\n    lift f' g' w'\n      (desc' f g w (kernel.ι g ≫ α.right ≫ cokernel.π f')\n        (_ : kernel.lift g f w ≫ kernel.ι g ≫ α.right ≫ cokernel.π f' = 0))\n      (_ :\n        desc' f g w (kernel.ι g ≫ α.right ≫ cokernel.π f')\n              (_ : kernel.lift g f w ≫ kernel.ι g ≫ α.right ≫ cokernel.π f' = 0) ≫\n            cokernel.desc f' g' w' =\n          0)\n[PROOFSTEP]\napply homology.hom_to_ext\n[GOAL]\ncase h\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nX' Y' Z' : A\nf' : X' ⟶ Y'\ng' : Y' ⟶ Z'\nw' : f' ≫ g' = 0\nα : Arrow.mk f ⟶ Arrow.mk f'\nβ : Arrow.mk g ⟶ Arrow.mk g'\nh : α.right = β.left\n⊢ desc' f g w\n        (lift f' g' w' (kernel.ι g ≫ α.right ≫ cokernel.π f')\n          (_ : (kernel.ι g ≫ α.right ≫ cokernel.π f') ≫ cokernel.desc f' g' w' = 0))\n        (_ :\n          kernel.lift g f w ≫\n              lift f' g' w' (kernel.ι g ≫ α.right ≫ cokernel.π f')\n                (_ : (kernel.ι g ≫ α.right ≫ cokernel.π f') ≫ cokernel.desc f' g' w' = 0) =\n            0) ≫\n      ι f' g' w' =\n    lift f' g' w'\n        (desc' f g w (kernel.ι g ≫ α.right ≫ cokernel.π f')\n          (_ : kernel.lift g f w ≫ kernel.ι g ≫ α.right ≫ cokernel.π f' = 0))\n        (_ :\n          desc' f g w (kernel.ι g ≫ α.right ≫ cokernel.π f')\n                (_ : kernel.lift g f w ≫ kernel.ι g ≫ α.right ≫ cokernel.π f' = 0) ≫\n              cokernel.desc f' g' w' =\n            0) ≫\n      ι f' g' w'\n[PROOFSTEP]\napply homology.hom_from_ext\n[GOAL]\ncase h.h\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nX' Y' Z' : A\nf' : X' ⟶ Y'\ng' : Y' ⟶ Z'\nw' : f' ≫ g' = 0\nα : Arrow.mk f ⟶ Arrow.mk f'\nβ : Arrow.mk g ⟶ Arrow.mk g'\nh : α.right = β.left\n⊢ π' f g w ≫\n      desc' f g w\n          (lift f' g' w' (kernel.ι g ≫ α.right ≫ cokernel.π f')\n            (_ : (kernel.ι g ≫ α.right ≫ cokernel.π f') ≫ cokernel.desc f' g' w' = 0))\n          (_ :\n            kernel.lift g f w ≫\n                lift f' g' w' (kernel.ι g ≫ α.right ≫ cokernel.π f')\n                  (_ : (kernel.ι g ≫ α.right ≫ cokernel.π f') ≫ cokernel.desc f' g' w' = 0) =\n              0) ≫\n        ι f' g' w' =\n    π' f g w ≫\n      lift f' g' w'\n          (desc' f g w (kernel.ι g ≫ α.right ≫ cokernel.π f')\n            (_ : kernel.lift g f w ≫ kernel.ι g ≫ α.right ≫ cokernel.π f' = 0))\n          (_ :\n            desc' f g w (kernel.ι g ≫ α.right ≫ cokernel.π f')\n                  (_ : kernel.lift g f w ≫ kernel.ι g ≫ α.right ≫ cokernel.π f' = 0) ≫\n                cokernel.desc f' g' w' =\n              0) ≫\n        ι f' g' w'\n[PROOFSTEP]\nsimp\n[GOAL]\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nX' Y' Z' : A\nf' : X' ⟶ Y'\ng' : Y' ⟶ Z'\nw' : f' ≫ g' = 0\nα : Arrow.mk f ⟶ Arrow.mk f'\nβ : Arrow.mk g ⟶ Arrow.mk g'\nh : α.right = β.left\n⊢ f ≫ β.left = α.left ≫ f'\n[PROOFSTEP]\nsimp [h, β.w.symm]\n[GOAL]\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nX' Y' Z' : A\nf' : X' ⟶ Y'\ng' : Y' ⟶ Z'\nw' : f' ≫ g' = 0\nα : Arrow.mk f ⟶ Arrow.mk f'\nβ : Arrow.mk g ⟶ Arrow.mk g'\nh : α.right = β.left\n⊢ map w w' α β h ≫ ι f' g' w' = ι f g w ≫ cokernel.map f f' α.left β.left (_ : f ≫ β.left = α.left ≫ f')\n[PROOFSTEP]\nrw [map_eq_lift_desc'_left, lift_ι]\n  -- Porting note: once was known as ext\n[GOAL]\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nX' Y' Z' : A\nf' : X' ⟶ Y'\ng' : Y' ⟶ Z'\nw' : f' ≫ g' = 0\nα : Arrow.mk f ⟶ Arrow.mk f'\nβ : Arrow.mk g ⟶ Arrow.mk g'\nh : α.right = β.left\n⊢ desc' f g w (kernel.ι g ≫ β.left ≫ cokernel.π f') (_ : kernel.lift g f w ≫ kernel.ι g ≫ β.left ≫ cokernel.π f' = 0) =\n    ι f g w ≫ cokernel.map f f' α.left β.left (_ : f ≫ β.left = α.left ≫ f')\n[PROOFSTEP]\napply homology.hom_from_ext\n[GOAL]\ncase h\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nX' Y' Z' : A\nf' : X' ⟶ Y'\ng' : Y' ⟶ Z'\nw' : f' ≫ g' = 0\nα : Arrow.mk f ⟶ Arrow.mk f'\nβ : Arrow.mk g ⟶ Arrow.mk g'\nh : α.right = β.left\n⊢ π' f g w ≫\n      desc' f g w (kernel.ι g ≫ β.left ≫ cokernel.π f')\n        (_ : kernel.lift g f w ≫ kernel.ι g ≫ β.left ≫ cokernel.π f' = 0) =\n    π' f g w ≫ ι f g w ≫ cokernel.map f f' α.left β.left (_ : f ≫ β.left = α.left ≫ f')\n[PROOFSTEP]\nsimp only [← Category.assoc]\n[GOAL]\ncase h\nA : Type u\ninst✝¹ : Category.{v, u} A\ninst✝ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nX' Y' Z' : A\nf' : X' ⟶ Y'\ng' : Y' ⟶ Z'\nw' : f' ≫ g' = 0\nα : Arrow.mk f ⟶ Arrow.mk f'\nβ : Arrow.mk g ⟶ Arrow.mk g'\nh : α.right = β.left\n⊢ π' f g w ≫\n      desc' f g w ((kernel.ι g ≫ β.left) ≫ cokernel.π f')\n        (_ : kernel.lift g f w ≫ (kernel.ι g ≫ β.left) ≫ cokernel.π f' = 0) =\n    (π' f g w ≫ ι f g w) ≫ cokernel.map f f' α.left β.left (_ : f ≫ β.left = α.left ≫ f')\n[PROOFSTEP]\nrw [π'_ι, π'_desc', Category.assoc, Category.assoc, cokernel.π_desc]\n[GOAL]\nA : Type u\ninst✝⁶ : Category.{v, u} A\ninst✝⁵ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nι : Type u_1\nc : ComplexShape ι\nB : Type u_2\ninst✝⁴ : Category.{?u.196788, u_2} B\ninst✝³ : Abelian B\nF : A ⥤ B\ninst✝² : Additive F\ninst✝¹ : PreservesFiniteLimits F\ninst✝ : PreservesFiniteColimits F\nC : HomologicalComplex A c\nj : ι\n⊢ F.map\n        (imageToKernel (HomologicalComplex.dTo C j) (HomologicalComplex.dFrom C j)\n          (_ : HomologicalComplex.dTo C j ≫ HomologicalComplex.dFrom C j = 0)) ≫\n      (F.mapIso (kernelSubobjectIso (HomologicalComplex.dFrom C j)) ≪≫\n          PreservesKernel.iso F (HomologicalComplex.dFrom C j) ≪≫\n            (kernelSubobjectIso (F.map (HomologicalComplex.dFrom C j))).symm).hom =\n    (F.mapIso (imageSubobjectIso (HomologicalComplex.dTo C j)) ≪≫\n          (PreservesImage.iso F (HomologicalComplex.dTo C j)).symm ≪≫\n            (imageSubobjectIso (F.map (HomologicalComplex.dTo C j))).symm).hom ≫\n      imageToKernel (HomologicalComplex.dTo ((mapHomologicalComplex F c).obj C) j)\n        (HomologicalComplex.dFrom ((mapHomologicalComplex F c).obj C) j)\n        (_ :\n          HomologicalComplex.dTo ((mapHomologicalComplex F c).obj C) j ≫\n              HomologicalComplex.dFrom ((mapHomologicalComplex F c).obj C) j =\n            0)\n[PROOFSTEP]\ndsimp\n[GOAL]\nA : Type u\ninst✝⁶ : Category.{v, u} A\ninst✝⁵ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nι : Type u_1\nc : ComplexShape ι\nB : Type u_2\ninst✝⁴ : Category.{?u.196788, u_2} B\ninst✝³ : Abelian B\nF : A ⥤ B\ninst✝² : Additive F\ninst✝¹ : PreservesFiniteLimits F\ninst✝ : PreservesFiniteColimits F\nC : HomologicalComplex A c\nj : ι\n⊢ F.map\n        (imageToKernel (HomologicalComplex.dTo C j) (HomologicalComplex.dFrom C j)\n          (_ : HomologicalComplex.dTo C j ≫ HomologicalComplex.dFrom C j = 0)) ≫\n      F.map (kernelSubobjectIso (HomologicalComplex.dFrom C j)).hom ≫\n        (PreservesKernel.iso F (HomologicalComplex.dFrom C j)).hom ≫\n          (kernelSubobjectIso (F.map (HomologicalComplex.dFrom C j))).inv =\n    (F.map (imageSubobjectIso (HomologicalComplex.dTo C j)).hom ≫\n        IsImage.lift\n            (StrongEpiMonoFactorisation.toMonoIsImage\n              (StrongEpiMonoFactorisation.mk\n                (MonoFactorisation.mk (F.obj (image (HomologicalComplex.dTo C j)))\n                  (F.map (image.ι (HomologicalComplex.dTo C j)))\n                  (F.map (factorThruImage (HomologicalComplex.dTo C j))))))\n            (Image.monoFactorisation (F.map (HomologicalComplex.dTo C j))) ≫\n          (imageSubobjectIso (F.map (HomologicalComplex.dTo C j))).inv) ≫\n      imageToKernel (F.map (HomologicalComplex.d C (ComplexShape.prev c j) j))\n        (F.map (HomologicalComplex.d C j (ComplexShape.next c j)))\n        (_ :\n          HomologicalComplex.dTo ((mapHomologicalComplex F c).obj C) j ≫\n              HomologicalComplex.dFrom ((mapHomologicalComplex F c).obj C) j =\n            0)\n[PROOFSTEP]\next\n[GOAL]\ncase h\nA : Type u\ninst✝⁶ : Category.{v, u} A\ninst✝⁵ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nι : Type u_1\nc : ComplexShape ι\nB : Type u_2\ninst✝⁴ : Category.{?u.196788, u_2} B\ninst✝³ : Abelian B\nF : A ⥤ B\ninst✝² : Additive F\ninst✝¹ : PreservesFiniteLimits F\ninst✝ : PreservesFiniteColimits F\nC : HomologicalComplex A c\nj : ι\n⊢ (F.map\n          (imageToKernel (HomologicalComplex.dTo C j) (HomologicalComplex.dFrom C j)\n            (_ : HomologicalComplex.dTo C j ≫ HomologicalComplex.dFrom C j = 0)) ≫\n        F.map (kernelSubobjectIso (HomologicalComplex.dFrom C j)).hom ≫\n          (PreservesKernel.iso F (HomologicalComplex.dFrom C j)).hom ≫\n            (kernelSubobjectIso (F.map (HomologicalComplex.dFrom C j))).inv) ≫\n      Subobject.arrow (kernelSubobject (F.map (HomologicalComplex.d C j (ComplexShape.next c j)))) =\n    ((F.map (imageSubobjectIso (HomologicalComplex.dTo C j)).hom ≫\n          IsImage.lift\n              (StrongEpiMonoFactorisation.toMonoIsImage\n                (StrongEpiMonoFactorisation.mk\n                  (MonoFactorisation.mk (F.obj (image (HomologicalComplex.dTo C j)))\n                    (F.map (image.ι (HomologicalComplex.dTo C j)))\n                    (F.map (factorThruImage (HomologicalComplex.dTo C j))))))\n              (Image.monoFactorisation (F.map (HomologicalComplex.dTo C j))) ≫\n            (imageSubobjectIso (F.map (HomologicalComplex.dTo C j))).inv) ≫\n        imageToKernel (F.map (HomologicalComplex.d C (ComplexShape.prev c j) j))\n          (F.map (HomologicalComplex.d C j (ComplexShape.next c j)))\n          (_ :\n            HomologicalComplex.dTo ((mapHomologicalComplex F c).obj C) j ≫\n                HomologicalComplex.dFrom ((mapHomologicalComplex F c).obj C) j =\n              0)) ≫\n      Subobject.arrow (kernelSubobject (F.map (HomologicalComplex.d C j (ComplexShape.next c j))))\n[PROOFSTEP]\nsimp only [Category.assoc, imageToKernel_arrow]\n[GOAL]\ncase h\nA : Type u\ninst✝⁶ : Category.{v, u} A\ninst✝⁵ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nι : Type u_1\nc : ComplexShape ι\nB : Type u_2\ninst✝⁴ : Category.{?u.196788, u_2} B\ninst✝³ : Abelian B\nF : A ⥤ B\ninst✝² : Additive F\ninst✝¹ : PreservesFiniteLimits F\ninst✝ : PreservesFiniteColimits F\nC : HomologicalComplex A c\nj : ι\n⊢ F.map\n        (imageToKernel (HomologicalComplex.dTo C j) (HomologicalComplex.dFrom C j)\n          (_ : HomologicalComplex.dTo C j ≫ HomologicalComplex.dFrom C j = 0)) ≫\n      F.map (kernelSubobjectIso (HomologicalComplex.dFrom C j)).hom ≫\n        (PreservesKernel.iso F (HomologicalComplex.dFrom C j)).hom ≫\n          (kernelSubobjectIso (F.map (HomologicalComplex.dFrom C j))).inv ≫\n            Subobject.arrow (kernelSubobject (F.map (HomologicalComplex.d C j (ComplexShape.next c j)))) =\n    F.map (imageSubobjectIso (HomologicalComplex.dTo C j)).hom ≫\n      IsImage.lift\n          (StrongEpiMonoFactorisation.toMonoIsImage\n            (StrongEpiMonoFactorisation.mk\n              (MonoFactorisation.mk (F.obj (image (HomologicalComplex.dTo C j)))\n                (F.map (image.ι (HomologicalComplex.dTo C j))) (F.map (factorThruImage (HomologicalComplex.dTo C j))))))\n          (Image.monoFactorisation (F.map (HomologicalComplex.dTo C j))) ≫\n        (imageSubobjectIso (F.map (HomologicalComplex.dTo C j))).inv ≫\n          Subobject.arrow (imageSubobject (F.map (HomologicalComplex.d C (ComplexShape.prev c j) j)))\n[PROOFSTEP]\nerw [kernelSubobject_arrow', imageSubobject_arrow']\n[GOAL]\ncase h\nA : Type u\ninst✝⁶ : Category.{v, u} A\ninst✝⁵ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nι : Type u_1\nc : ComplexShape ι\nB : Type u_2\ninst✝⁴ : Category.{?u.196788, u_2} B\ninst✝³ : Abelian B\nF : A ⥤ B\ninst✝² : Additive F\ninst✝¹ : PreservesFiniteLimits F\ninst✝ : PreservesFiniteColimits F\nC : HomologicalComplex A c\nj : ι\n⊢ F.map\n        (imageToKernel (HomologicalComplex.dTo C j) (HomologicalComplex.dFrom C j)\n          (_ : HomologicalComplex.dTo C j ≫ HomologicalComplex.dFrom C j = 0)) ≫\n      F.map (kernelSubobjectIso (HomologicalComplex.dFrom C j)).hom ≫\n        (PreservesKernel.iso F (HomologicalComplex.dFrom C j)).hom ≫ kernel.ι (F.map (HomologicalComplex.dFrom C j)) =\n    F.map (imageSubobjectIso (HomologicalComplex.dTo C j)).hom ≫\n      IsImage.lift\n          (StrongEpiMonoFactorisation.toMonoIsImage\n            (StrongEpiMonoFactorisation.mk\n              (MonoFactorisation.mk (F.obj (image (HomologicalComplex.dTo C j)))\n                (F.map (image.ι (HomologicalComplex.dTo C j))) (F.map (factorThruImage (HomologicalComplex.dTo C j))))))\n          (Image.monoFactorisation (F.map (HomologicalComplex.dTo C j))) ≫\n        image.ι (F.map (HomologicalComplex.dTo C j))\n[PROOFSTEP]\nsimp [← F.map_comp]\n[GOAL]\nA : Type u\ninst✝⁶ : Category.{v, u} A\ninst✝⁵ : Abelian A\nX Y Z : A\nf : X ⟶ Y\ng : Y ⟶ Z\nw : f ≫ g = 0\nι : Type u_1\nc : ComplexShape ι\nB : Type u_2\ninst✝⁴ : Category.{?u.214307, u_2} B\ninst✝³ : Abelian B\nF : A ⥤ B\ninst✝² : Additive F\ninst✝¹ : PreservesFiniteLimits F\ninst✝ : PreservesFiniteColimits F\ni : ι\n⊢ ∀ {X Y : HomologicalComplex A c} (f : X ⟶ Y),\n    (homologyFunctor A c i ⋙ F).map f ≫ ((fun X => homologyIso F X i) Y).hom =\n      ((fun X => homologyIso F X i) X).hom ≫ (mapHomologicalComplex F c ⋙ homologyFunctor B c i).map f\n[PROOFSTEP]\nintro X Y f\n[GOAL]\nA : Type u\ninst✝⁶ : Category.{v, u} A\ninst✝⁵ : Abelian A\nX✝ Y✝ Z : A\nf✝ : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z\nw : f✝ ≫ g = 0\nι : Type u_1\nc : ComplexShape ι\nB : Type u_2\ninst✝⁴ : Category.{?u.214307, u_2} B\ninst✝³ : Abelian B\nF : A ⥤ B\ninst✝² : Additive F\ninst✝¹ : PreservesFiniteLimits F\ninst✝ : PreservesFiniteColimits F\ni : ι\nX Y : HomologicalComplex A c\nf : X ⟶ Y\n⊢ (homologyFunctor A c i ⋙ F).map f ≫ ((fun X => homologyIso F X i) Y).hom =\n    ((fun X => homologyIso F X i) X).hom ≫ (mapHomologicalComplex F c ⋙ homologyFunctor B c i).map f\n[PROOFSTEP]\ndsimp\n[GOAL]\nA : Type u\ninst✝⁶ : Category.{v, u} A\ninst✝⁵ : Abelian A\nX✝ Y✝ Z : A\nf✝ : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z\nw : f✝ ≫ g = 0\nι : Type u_1\nc : ComplexShape ι\nB : Type u_2\ninst✝⁴ : Category.{?u.214307, u_2} B\ninst✝³ : Abelian B\nF : A ⥤ B\ninst✝² : Additive F\ninst✝¹ : PreservesFiniteLimits F\ninst✝ : PreservesFiniteColimits F\ni : ι\nX Y : HomologicalComplex A c\nf : X ⟶ Y\n⊢ F.map\n        (homology.map (_ : HomologicalComplex.dTo X i ≫ HomologicalComplex.dFrom X i = 0)\n          (_ : HomologicalComplex.dTo Y i ≫ HomologicalComplex.dFrom Y i = 0) (HomologicalComplex.Hom.sqTo f i)\n          (HomologicalComplex.Hom.sqFrom f i)\n          (_ : (HomologicalComplex.Hom.sqTo f i).right = (HomologicalComplex.Hom.sqTo f i).right)) ≫\n      (homologyIso F Y i).hom =\n    (homologyIso F X i).hom ≫\n      homology.map\n        (_ :\n          HomologicalComplex.dTo ((mapHomologicalComplex F c).obj X) i ≫\n              HomologicalComplex.dFrom ((mapHomologicalComplex F c).obj X) i =\n            0)\n        (_ :\n          HomologicalComplex.dTo ((mapHomologicalComplex F c).obj Y) i ≫\n              HomologicalComplex.dFrom ((mapHomologicalComplex F c).obj Y) i =\n            0)\n        (HomologicalComplex.Hom.sqTo ((mapHomologicalComplex F c).map f) i)\n        (HomologicalComplex.Hom.sqFrom ((mapHomologicalComplex F c).map f) i)\n        (_ :\n          (HomologicalComplex.Hom.sqTo ((mapHomologicalComplex F c).map f) i).right =\n            (HomologicalComplex.Hom.sqTo ((mapHomologicalComplex F c).map f) i).right)\n[PROOFSTEP]\nrw [← Iso.inv_comp_eq, ← Category.assoc, ← Iso.eq_comp_inv]\n[GOAL]\nA : Type u\ninst✝⁶ : Category.{v, u} A\ninst✝⁵ : Abelian A\nX✝ Y✝ Z : A\nf✝ : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z\nw : f✝ ≫ g = 0\nι : Type u_1\nc : ComplexShape ι\nB : Type u_2\ninst✝⁴ : Category.{?u.214307, u_2} B\ninst✝³ : Abelian B\nF : A ⥤ B\ninst✝² : Additive F\ninst✝¹ : PreservesFiniteLimits F\ninst✝ : PreservesFiniteColimits F\ni : ι\nX Y : HomologicalComplex A c\nf : X ⟶ Y\n⊢ (homologyIso F X i).inv ≫\n      F.map\n        (homology.map (_ : HomologicalComplex.dTo X i ≫ HomologicalComplex.dFrom X i = 0)\n          (_ : HomologicalComplex.dTo Y i ≫ HomologicalComplex.dFrom Y i = 0) (HomologicalComplex.Hom.sqTo f i)\n          (HomologicalComplex.Hom.sqFrom f i)\n          (_ : (HomologicalComplex.Hom.sqTo f i).right = (HomologicalComplex.Hom.sqTo f i).right)) =\n    homology.map\n        (_ :\n          HomologicalComplex.dTo ((mapHomologicalComplex F c).obj X) i ≫\n              HomologicalComplex.dFrom ((mapHomologicalComplex F c).obj X) i =\n            0)\n        (_ :\n          HomologicalComplex.dTo ((mapHomologicalComplex F c).obj Y) i ≫\n              HomologicalComplex.dFrom ((mapHomologicalComplex F c).obj Y) i =\n            0)\n        (HomologicalComplex.Hom.sqTo ((mapHomologicalComplex F c).map f) i)\n        (HomologicalComplex.Hom.sqFrom ((mapHomologicalComplex F c).map f) i)\n        (_ :\n          (HomologicalComplex.Hom.sqTo ((mapHomologicalComplex F c).map f) i).right =\n            (HomologicalComplex.Hom.sqTo ((mapHomologicalComplex F c).map f) i).right) ≫\n      (homologyIso F Y i).inv\n[PROOFSTEP]\nrefine' coequalizer.hom_ext _\n[GOAL]\nA : Type u\ninst✝⁶ : Category.{v, u} A\ninst✝⁵ : Abelian A\nX✝ Y✝ Z : A\nf✝ : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z\nw : f✝ ≫ g = 0\nι : Type u_1\nc : ComplexShape ι\nB : Type u_2\ninst✝⁴ : Category.{?u.214307, u_2} B\ninst✝³ : Abelian B\nF : A ⥤ B\ninst✝² : Additive F\ninst✝¹ : PreservesFiniteLimits F\ninst✝ : PreservesFiniteColimits F\ni : ι\nX Y : HomologicalComplex A c\nf : X ⟶ Y\n⊢ coequalizer.π\n        (imageToKernel (HomologicalComplex.dTo ((mapHomologicalComplex F c).obj X) i)\n          (HomologicalComplex.dFrom ((mapHomologicalComplex F c).obj X) i)\n          (_ :\n            HomologicalComplex.dTo ((mapHomologicalComplex F c).obj X) i ≫\n                HomologicalComplex.dFrom ((mapHomologicalComplex F c).obj X) i =\n              0))\n        0 ≫\n      (homologyIso F X i).inv ≫\n        F.map\n          (homology.map (_ : HomologicalComplex.dTo X i ≫ HomologicalComplex.dFrom X i = 0)\n            (_ : HomologicalComplex.dTo Y i ≫ HomologicalComplex.dFrom Y i = 0) (HomologicalComplex.Hom.sqTo f i)\n            (HomologicalComplex.Hom.sqFrom f i)\n            (_ : (HomologicalComplex.Hom.sqTo f i).right = (HomologicalComplex.Hom.sqTo f i).right)) =\n    coequalizer.π\n        (imageToKernel (HomologicalComplex.dTo ((mapHomologicalComplex F c).obj X) i)\n          (HomologicalComplex.dFrom ((mapHomologicalComplex F c).obj X) i)\n          (_ :\n            HomologicalComplex.dTo ((mapHomologicalComplex F c).obj X) i ≫\n                HomologicalComplex.dFrom ((mapHomologicalComplex F c).obj X) i =\n              0))\n        0 ≫\n      homology.map\n          (_ :\n            HomologicalComplex.dTo ((mapHomologicalComplex F c).obj X) i ≫\n                HomologicalComplex.dFrom ((mapHomologicalComplex F c).obj X) i =\n              0)\n          (_ :\n            HomologicalComplex.dTo ((mapHomologicalComplex F c).obj Y) i ≫\n                HomologicalComplex.dFrom ((mapHomologicalComplex F c).obj Y) i =\n              0)\n          (HomologicalComplex.Hom.sqTo ((mapHomologicalComplex F c).map f) i)\n          (HomologicalComplex.Hom.sqFrom ((mapHomologicalComplex F c).map f) i)\n          (_ :\n            (HomologicalComplex.Hom.sqTo ((mapHomologicalComplex F c).map f) i).right =\n              (HomologicalComplex.Hom.sqTo ((mapHomologicalComplex F c).map f) i).right) ≫\n        (homologyIso F Y i).inv\n[PROOFSTEP]\ndsimp [homologyIso]\n[GOAL]\nA : Type u\ninst✝⁶ : Category.{v, u} A\ninst✝⁵ : Abelian A\nX✝ Y✝ Z : A\nf✝ : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z\nw : f✝ ≫ g = 0\nι : Type u_1\nc : ComplexShape ι\nB : Type u_2\ninst✝⁴ : Category.{?u.214307, u_2} B\ninst✝³ : Abelian B\nF : A ⥤ B\ninst✝² : Additive F\ninst✝¹ : PreservesFiniteLimits F\ninst✝ : PreservesFiniteColimits F\ni : ι\nX Y : HomologicalComplex A c\nf : X ⟶ Y\n⊢ cokernel.π\n        (imageToKernel (F.map (HomologicalComplex.d X (ComplexShape.prev c i) i))\n          (F.map (HomologicalComplex.d X i (ComplexShape.next c i)))\n          (_ :\n            HomologicalComplex.dTo ((mapHomologicalComplex F c).obj X) i ≫\n                HomologicalComplex.dFrom ((mapHomologicalComplex F c).obj X) i =\n              0)) ≫\n      (cokernel.map\n            (imageToKernel (F.map (HomologicalComplex.d X (ComplexShape.prev c i) i))\n              (F.map (HomologicalComplex.d X i (ComplexShape.next c i)))\n              (_ :\n                HomologicalComplex.dTo ((mapHomologicalComplex F c).obj X) i ≫\n                    HomologicalComplex.dFrom ((mapHomologicalComplex F c).obj X) i =\n                  0))\n            (F.map\n              (imageToKernel (HomologicalComplex.dTo X i) (HomologicalComplex.dFrom X i)\n                (_ : HomologicalComplex.dTo X i ≫ HomologicalComplex.dFrom X i = 0)))\n            (((imageSubobjectIso (F.map (HomologicalComplex.dTo X i))).hom ≫\n                image.lift\n                  (MonoFactorisation.mk (F.obj (image (HomologicalComplex.dTo X i)))\n                    (F.map (image.ι (HomologicalComplex.dTo X i)))\n                    (F.map (factorThruImage (HomologicalComplex.dTo X i))))) ≫\n              F.map (imageSubobjectIso (HomologicalComplex.dTo X i)).inv)\n            (((kernelSubobjectIso (F.map (HomologicalComplex.dFrom X i))).hom ≫\n                (PreservesKernel.iso F (HomologicalComplex.dFrom X i)).inv) ≫\n              F.map (kernelSubobjectIso (HomologicalComplex.dFrom X i)).inv)\n            (_ :\n              imageToKernel (F.map (HomologicalComplex.d X (ComplexShape.prev c i) i))\n                    (F.map (HomologicalComplex.d X i (ComplexShape.next c i)))\n                    (_ :\n                      HomologicalComplex.dTo ((mapHomologicalComplex F c).obj X) i ≫\n                          HomologicalComplex.dFrom ((mapHomologicalComplex F c).obj X) i =\n                        0) ≫\n                  (F.mapIso (kernelSubobjectIso (HomologicalComplex.dFrom X i)) ≪≫\n                      PreservesKernel.iso F (HomologicalComplex.dFrom X i) ≪≫\n                        (kernelSubobjectIso (F.map (HomologicalComplex.dFrom X i))).symm).inv =\n                (F.mapIso (imageSubobjectIso (HomologicalComplex.dTo X i)) ≪≫\n                      (PreservesImage.iso F (HomologicalComplex.dTo X i)).symm ≪≫\n                        (imageSubobjectIso (F.map (HomologicalComplex.dTo X i))).symm).inv ≫\n                  F.map\n                    (imageToKernel (HomologicalComplex.dTo X i) (HomologicalComplex.dFrom X i)\n                      (_ : HomologicalComplex.dTo X i ≫ HomologicalComplex.dFrom X i = 0))) ≫\n          (PreservesCokernel.iso F\n              (imageToKernel (HomologicalComplex.dTo X i) (HomologicalComplex.dFrom X i)\n                (_ : HomologicalComplex.dTo X i ≫ HomologicalComplex.dFrom X i = 0))).inv) ≫\n        F.map\n          (homology.map (_ : HomologicalComplex.dTo X i ≫ HomologicalComplex.dFrom X i = 0)\n            (_ : HomologicalComplex.dTo Y i ≫ HomologicalComplex.dFrom Y i = 0) (HomologicalComplex.Hom.sqTo f i)\n            (HomologicalComplex.Hom.sqFrom f i)\n            (_ : (HomologicalComplex.Hom.sqTo f i).right = (HomologicalComplex.Hom.sqTo f i).right)) =\n    cokernel.π\n        (imageToKernel (F.map (HomologicalComplex.d X (ComplexShape.prev c i) i))\n          (F.map (HomologicalComplex.d X i (ComplexShape.next c i)))\n          (_ :\n            HomologicalComplex.dTo ((mapHomologicalComplex F c).obj X) i ≫\n                HomologicalComplex.dFrom ((mapHomologicalComplex F c).obj X) i =\n              0)) ≫\n      homology.map\n          (_ :\n            HomologicalComplex.dTo ((mapHomologicalComplex F c).obj X) i ≫\n                HomologicalComplex.dFrom ((mapHomologicalComplex F c).obj X) i =\n              0)\n          (_ :\n            HomologicalComplex.dTo ((mapHomologicalComplex F c).obj Y) i ≫\n                HomologicalComplex.dFrom ((mapHomologicalComplex F c).obj Y) i =\n              0)\n          (HomologicalComplex.Hom.sqTo ((mapHomologicalComplex F c).map f) i)\n          (HomologicalComplex.Hom.sqFrom ((mapHomologicalComplex F c).map f) i)\n          (_ :\n            (HomologicalComplex.Hom.sqTo ((mapHomologicalComplex F c).map f) i).right =\n              (HomologicalComplex.Hom.sqTo ((mapHomologicalComplex F c).map f) i).right) ≫\n        cokernel.map\n            (imageToKernel (F.map (HomologicalComplex.d Y (ComplexShape.prev c i) i))\n              (F.map (HomologicalComplex.d Y i (ComplexShape.next c i)))\n              (_ :\n                HomologicalComplex.dTo ((mapHomologicalComplex F c).obj Y) i ≫\n                    HomologicalComplex.dFrom ((mapHomologicalComplex F c).obj Y) i =\n                  0))\n            (F.map\n              (imageToKernel (HomologicalComplex.dTo Y i) (HomologicalComplex.dFrom Y i)\n                (_ : HomologicalComplex.dTo Y i ≫ HomologicalComplex.dFrom Y i = 0)))\n            (((imageSubobjectIso (F.map (HomologicalComplex.dTo Y i))).hom ≫\n                image.lift\n                  (MonoFactorisation.mk (F.obj (image (HomologicalComplex.dTo Y i)))\n                    (F.map (image.ι (HomologicalComplex.dTo Y i)))\n                    (F.map (factorThruImage (HomologicalComplex.dTo Y i))))) ≫\n              F.map (imageSubobjectIso (HomologicalComplex.dTo Y i)).inv)\n            (((kernelSubobjectIso (F.map (HomologicalComplex.dFrom Y i))).hom ≫\n                (PreservesKernel.iso F (HomologicalComplex.dFrom Y i)).inv) ≫\n              F.map (kernelSubobjectIso (HomologicalComplex.dFrom Y i)).inv)\n            (_ :\n              imageToKernel (F.map (HomologicalComplex.d Y (ComplexShape.prev c i) i))\n                    (F.map (HomologicalComplex.d Y i (ComplexShape.next c i)))\n                    (_ :\n                      HomologicalComplex.dTo ((mapHomologicalComplex F c).obj Y) i ≫\n                          HomologicalComplex.dFrom ((mapHomologicalComplex F c).obj Y) i =\n                        0) ≫\n                  (F.mapIso (kernelSubobjectIso (HomologicalComplex.dFrom Y i)) ≪≫\n                      PreservesKernel.iso F (HomologicalComplex.dFrom Y i) ≪≫\n                        (kernelSubobjectIso (F.map (HomologicalComplex.dFrom Y i))).symm).inv =\n                (F.mapIso (imageSubobjectIso (HomologicalComplex.dTo Y i)) ≪≫\n                      (PreservesImage.iso F (HomologicalComplex.dTo Y i)).symm ≪≫\n                        (imageSubobjectIso (F.map (HomologicalComplex.dTo Y i))).symm).inv ≫\n                  F.map\n                    (imageToKernel (HomologicalComplex.dTo Y i) (HomologicalComplex.dFrom Y i)\n                      (_ : HomologicalComplex.dTo Y i ≫ HomologicalComplex.dFrom Y i = 0))) ≫\n          (PreservesCokernel.iso F\n              (imageToKernel (HomologicalComplex.dTo Y i) (HomologicalComplex.dFrom Y i)\n                (_ : HomologicalComplex.dTo Y i ≫ HomologicalComplex.dFrom Y i = 0))).inv\n[PROOFSTEP]\nsimp only [PreservesCokernel.iso_inv]\n[GOAL]\nA : Type u\ninst✝⁶ : Category.{v, u} A\ninst✝⁵ : Abelian A\nX✝ Y✝ Z : A\nf✝ : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z\nw : f✝ ≫ g = 0\nι : Type u_1\nc : ComplexShape ι\nB : Type u_2\ninst✝⁴ : Category.{?u.214307, u_2} B\ninst✝³ : Abelian B\nF : A ⥤ B\ninst✝² : Additive F\ninst✝¹ : PreservesFiniteLimits F\ninst✝ : PreservesFiniteColimits F\ni : ι\nX Y : HomologicalComplex A c\nf : X ⟶ Y\n⊢ cokernel.π\n        (imageToKernel (F.map (HomologicalComplex.d X (ComplexShape.prev c i) i))\n          (F.map (HomologicalComplex.d X i (ComplexShape.next c i)))\n          (_ :\n            HomologicalComplex.dTo ((mapHomologicalComplex F c).obj X) i ≫\n                HomologicalComplex.dFrom ((mapHomologicalComplex F c).obj X) i =\n              0)) ≫\n      (cokernel.map\n            (imageToKernel (F.map (HomologicalComplex.d X (ComplexShape.prev c i) i))\n              (F.map (HomologicalComplex.d X i (ComplexShape.next c i)))\n              (_ :\n                HomologicalComplex.dTo ((mapHomologicalComplex F c).obj X) i ≫\n                    HomologicalComplex.dFrom ((mapHomologicalComplex F c).obj X) i =\n                  0))\n            (F.map\n              (imageToKernel (HomologicalComplex.dTo X i) (HomologicalComplex.dFrom X i)\n                (_ : HomologicalComplex.dTo X i ≫ HomologicalComplex.dFrom X i = 0)))\n            (((imageSubobjectIso (F.map (HomologicalComplex.dTo X i))).hom ≫\n                image.lift\n                  (MonoFactorisation.mk (F.obj (image (HomologicalComplex.dTo X i)))\n                    (F.map (image.ι (HomologicalComplex.dTo X i)))\n                    (F.map (factorThruImage (HomologicalComplex.dTo X i))))) ≫\n              F.map (imageSubobjectIso (HomologicalComplex.dTo X i)).inv)\n            (((kernelSubobjectIso (F.map (HomologicalComplex.dFrom X i))).hom ≫\n                (PreservesKernel.iso F (HomologicalComplex.dFrom X i)).inv) ≫\n              F.map (kernelSubobjectIso (HomologicalComplex.dFrom X i)).inv)\n            (_ :\n              imageToKernel (F.map (HomologicalComplex.d X (ComplexShape.prev c i) i))\n                    (F.map (HomologicalComplex.d X i (ComplexShape.next c i)))\n                    (_ :\n                      HomologicalComplex.dTo ((mapHomologicalComplex F c).obj X) i ≫\n                          HomologicalComplex.dFrom ((mapHomologicalComplex F c).obj X) i =\n                        0) ≫\n                  (F.mapIso (kernelSubobjectIso (HomologicalComplex.dFrom X i)) ≪≫\n                      PreservesKernel.iso F (HomologicalComplex.dFrom X i) ≪≫\n                        (kernelSubobjectIso (F.map (HomologicalComplex.dFrom X i))).symm).inv =\n                (F.mapIso (imageSubobjectIso (HomologicalComplex.dTo X i)) ≪≫\n                      (PreservesImage.iso F (HomologicalComplex.dTo X i)).symm ≪≫\n                        (imageSubobjectIso (F.map (HomologicalComplex.dTo X i))).symm).inv ≫\n                  F.map\n                    (imageToKernel (HomologicalComplex.dTo X i) (HomologicalComplex.dFrom X i)\n                      (_ : HomologicalComplex.dTo X i ≫ HomologicalComplex.dFrom X i = 0))) ≫\n          cokernelComparison\n            (imageToKernel (HomologicalComplex.dTo X i) (HomologicalComplex.dFrom X i)\n              (_ : HomologicalComplex.dTo X i ≫ HomologicalComplex.dFrom X i = 0))\n            F) ≫\n        F.map\n          (homology.map (_ : HomologicalComplex.dTo X i ≫ HomologicalComplex.dFrom X i = 0)\n            (_ : HomologicalComplex.dTo Y i ≫ HomologicalComplex.dFrom Y i = 0) (HomologicalComplex.Hom.sqTo f i)\n            (HomologicalComplex.Hom.sqFrom f i)\n            (_ : (HomologicalComplex.Hom.sqTo f i).right = (HomologicalComplex.Hom.sqTo f i).right)) =\n    cokernel.π\n        (imageToKernel (F.map (HomologicalComplex.d X (ComplexShape.prev c i) i))\n          (F.map (HomologicalComplex.d X i (ComplexShape.next c i)))\n          (_ :\n            HomologicalComplex.dTo ((mapHomologicalComplex F c).obj X) i ≫\n                HomologicalComplex.dFrom ((mapHomologicalComplex F c).obj X) i =\n              0)) ≫\n      homology.map\n          (_ :\n            HomologicalComplex.dTo ((mapHomologicalComplex F c).obj X) i ≫\n                HomologicalComplex.dFrom ((mapHomologicalComplex F c).obj X) i =\n              0)\n          (_ :\n            HomologicalComplex.dTo ((mapHomologicalComplex F c).obj Y) i ≫\n                HomologicalComplex.dFrom ((mapHomologicalComplex F c).obj Y) i =\n              0)\n          (HomologicalComplex.Hom.sqTo ((mapHomologicalComplex F c).map f) i)\n          (HomologicalComplex.Hom.sqFrom ((mapHomologicalComplex F c).map f) i)\n          (_ :\n            (HomologicalComplex.Hom.sqTo ((mapHomologicalComplex F c).map f) i).right =\n              (HomologicalComplex.Hom.sqTo ((mapHomologicalComplex F c).map f) i).right) ≫\n        cokernel.map\n            (imageToKernel (F.map (HomologicalComplex.d Y (ComplexShape.prev c i) i))\n              (F.map (HomologicalComplex.d Y i (ComplexShape.next c i)))\n              (_ :\n                HomologicalComplex.dTo ((mapHomologicalComplex F c).obj Y) i ≫\n                    HomologicalComplex.dFrom ((mapHomologicalComplex F c).obj Y) i =\n                  0))\n            (F.map\n              (imageToKernel (HomologicalComplex.dTo Y i) (HomologicalComplex.dFrom Y i)\n                (_ : HomologicalComplex.dTo Y i ≫ HomologicalComplex.dFrom Y i = 0)))\n            (((imageSubobjectIso (F.map (HomologicalComplex.dTo Y i))).hom ≫\n                image.lift\n                  (MonoFactorisation.mk (F.obj (image (HomologicalComplex.dTo Y i)))\n                    (F.map (image.ι (HomologicalComplex.dTo Y i)))\n                    (F.map (factorThruImage (HomologicalComplex.dTo Y i))))) ≫\n              F.map (imageSubobjectIso (HomologicalComplex.dTo Y i)).inv)\n            (((kernelSubobjectIso (F.map (HomologicalComplex.dFrom Y i))).hom ≫\n                (PreservesKernel.iso F (HomologicalComplex.dFrom Y i)).inv) ≫\n              F.map (kernelSubobjectIso (HomologicalComplex.dFrom Y i)).inv)\n            (_ :\n              imageToKernel (F.map (HomologicalComplex.d Y (ComplexShape.prev c i) i))\n                    (F.map (HomologicalComplex.d Y i (ComplexShape.next c i)))\n                    (_ :\n                      HomologicalComplex.dTo ((mapHomologicalComplex F c).obj Y) i ≫\n                          HomologicalComplex.dFrom ((mapHomologicalComplex F c).obj Y) i =\n                        0) ≫\n                  (F.mapIso (kernelSubobjectIso (HomologicalComplex.dFrom Y i)) ≪≫\n                      PreservesKernel.iso F (HomologicalComplex.dFrom Y i) ≪≫\n                        (kernelSubobjectIso (F.map (HomologicalComplex.dFrom Y i))).symm).inv =\n                (F.mapIso (imageSubobjectIso (HomologicalComplex.dTo Y i)) ≪≫\n                      (PreservesImage.iso F (HomologicalComplex.dTo Y i)).symm ≪≫\n                        (imageSubobjectIso (F.map (HomologicalComplex.dTo Y i))).symm).inv ≫\n                  F.map\n                    (imageToKernel (HomologicalComplex.dTo Y i) (HomologicalComplex.dFrom Y i)\n                      (_ : HomologicalComplex.dTo Y i ≫ HomologicalComplex.dFrom Y i = 0))) ≫\n          cokernelComparison\n            (imageToKernel (HomologicalComplex.dTo Y i) (HomologicalComplex.dFrom Y i)\n              (_ : HomologicalComplex.dTo Y i ≫ HomologicalComplex.dFrom Y i = 0))\n            F\n[PROOFSTEP]\ndsimp [homology.map]\n[GOAL]\nA : Type u\ninst✝⁶ : Category.{v, u} A\ninst✝⁵ : Abelian A\nX✝ Y✝ Z : A\nf✝ : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z\nw : f✝ ≫ g = 0\nι : Type u_1\nc : ComplexShape ι\nB : Type u_2\ninst✝⁴ : Category.{?u.214307, u_2} B\ninst✝³ : Abelian B\nF : A ⥤ B\ninst✝² : Additive F\ninst✝¹ : PreservesFiniteLimits F\ninst✝ : PreservesFiniteColimits F\ni : ι\nX Y : HomologicalComplex A c\nf : X ⟶ Y\n⊢ cokernel.π\n        (imageToKernel (F.map (HomologicalComplex.d X (ComplexShape.prev c i) i))\n          (F.map (HomologicalComplex.d X i (ComplexShape.next c i)))\n          (_ :\n            HomologicalComplex.dTo ((mapHomologicalComplex F c).obj X) i ≫\n                HomologicalComplex.dFrom ((mapHomologicalComplex F c).obj X) i =\n              0)) ≫\n      (cokernel.map\n            (imageToKernel (F.map (HomologicalComplex.d X (ComplexShape.prev c i) i))\n              (F.map (HomologicalComplex.d X i (ComplexShape.next c i)))\n              (_ :\n                HomologicalComplex.dTo ((mapHomologicalComplex F c).obj X) i ≫\n                    HomologicalComplex.dFrom ((mapHomologicalComplex F c).obj X) i =\n                  0))\n            (F.map\n              (imageToKernel (HomologicalComplex.dTo X i) (HomologicalComplex.dFrom X i)\n                (_ : HomologicalComplex.dTo X i ≫ HomologicalComplex.dFrom X i = 0)))\n            (((imageSubobjectIso (F.map (HomologicalComplex.dTo X i))).hom ≫\n                image.lift\n                  (MonoFactorisation.mk (F.obj (image (HomologicalComplex.dTo X i)))\n                    (F.map (image.ι (HomologicalComplex.dTo X i)))\n                    (F.map (factorThruImage (HomologicalComplex.dTo X i))))) ≫\n              F.map (imageSubobjectIso (HomologicalComplex.dTo X i)).inv)\n            (((kernelSubobjectIso (F.map (HomologicalComplex.dFrom X i))).hom ≫\n                (PreservesKernel.iso F (HomologicalComplex.dFrom X i)).inv) ≫\n              F.map (kernelSubobjectIso (HomologicalComplex.dFrom X i)).inv)\n            (_ :\n              imageToKernel (F.map (HomologicalComplex.d X (ComplexShape.prev c i) i))\n                    (F.map (HomologicalComplex.d X i (ComplexShape.next c i)))\n                    (_ :\n                      HomologicalComplex.dTo ((mapHomologicalComplex F c).obj X) i ≫\n                          HomologicalComplex.dFrom ((mapHomologicalComplex F c).obj X) i =\n                        0) ≫\n                  (F.mapIso (kernelSubobjectIso (HomologicalComplex.dFrom X i)) ≪≫\n                      PreservesKernel.iso F (HomologicalComplex.dFrom X i) ≪≫\n                        (kernelSubobjectIso (F.map (HomologicalComplex.dFrom X i))).symm).inv =\n                (F.mapIso (imageSubobjectIso (HomologicalComplex.dTo X i)) ≪≫\n                      (PreservesImage.iso F (HomologicalComplex.dTo X i)).symm ≪≫\n                        (imageSubobjectIso (F.map (HomologicalComplex.dTo X i))).symm).inv ≫\n                  F.map\n                    (imageToKernel (HomologicalComplex.dTo X i) (HomologicalComplex.dFrom X i)\n                      (_ : HomologicalComplex.dTo X i ≫ HomologicalComplex.dFrom X i = 0))) ≫\n          cokernelComparison\n            (imageToKernel (HomologicalComplex.dTo X i) (HomologicalComplex.dFrom X i)\n              (_ : HomologicalComplex.dTo X i ≫ HomologicalComplex.dFrom X i = 0))\n            F) ≫\n        F.map\n          (cokernel.desc\n            (imageToKernel (HomologicalComplex.dTo X i) (HomologicalComplex.dFrom X i)\n              (_ : HomologicalComplex.dTo X i ≫ HomologicalComplex.dFrom X i = 0))\n            (kernelSubobjectMap (HomologicalComplex.Hom.sqFrom f i) ≫\n              cokernel.π\n                (imageToKernel (HomologicalComplex.dTo Y i) (HomologicalComplex.dFrom Y i)\n                  (_ : HomologicalComplex.dTo Y i ≫ HomologicalComplex.dFrom Y i = 0)))\n            (_ :\n              imageToKernel (HomologicalComplex.dTo X i) (HomologicalComplex.dFrom X i)\n                    (_ : HomologicalComplex.dTo X i ≫ HomologicalComplex.dFrom X i = 0) ≫\n                  kernelSubobjectMap (HomologicalComplex.Hom.sqFrom f i) ≫\n                    cokernel.π\n                      (imageToKernel (HomologicalComplex.dTo Y i) (HomologicalComplex.dFrom Y i)\n                        (_ : HomologicalComplex.dTo Y i ≫ HomologicalComplex.dFrom Y i = 0)) =\n                0)) =\n    cokernel.π\n        (imageToKernel (F.map (HomologicalComplex.d X (ComplexShape.prev c i) i))\n          (F.map (HomologicalComplex.d X i (ComplexShape.next c i)))\n          (_ :\n            HomologicalComplex.dTo ((mapHomologicalComplex F c).obj X) i ≫\n                HomologicalComplex.dFrom ((mapHomologicalComplex F c).obj X) i =\n              0)) ≫\n      cokernel.desc\n          (imageToKernel (F.map (HomologicalComplex.d X (ComplexShape.prev c i) i))\n            (F.map (HomologicalComplex.d X i (ComplexShape.next c i)))\n            (_ :\n              HomologicalComplex.dTo ((mapHomologicalComplex F c).obj X) i ≫\n                  HomologicalComplex.dFrom ((mapHomologicalComplex F c).obj X) i =\n                0))\n          (kernelSubobjectMap (HomologicalComplex.Hom.sqFrom ((mapHomologicalComplex F c).map f) i) ≫\n            cokernel.π\n              (imageToKernel (F.map (HomologicalComplex.d Y (ComplexShape.prev c i) i))\n                (F.map (HomologicalComplex.d Y i (ComplexShape.next c i)))\n                (_ :\n                  HomologicalComplex.dTo ((mapHomologicalComplex F c).obj Y) i ≫\n                      HomologicalComplex.dFrom ((mapHomologicalComplex F c).obj Y) i =\n                    0)))\n          (_ :\n            imageToKernel (F.map (HomologicalComplex.d X (ComplexShape.prev c i) i))\n                  (F.map (HomologicalComplex.d X i (ComplexShape.next c i)))\n                  (_ :\n                    HomologicalComplex.dTo ((mapHomologicalComplex F c).obj X) i ≫\n                        HomologicalComplex.dFrom ((mapHomologicalComplex F c).obj X) i =\n                      0) ≫\n                kernelSubobjectMap (HomologicalComplex.Hom.sqFrom ((mapHomologicalComplex F c).map f) i) ≫\n                  cokernel.π\n                    (imageToKernel (F.map (HomologicalComplex.d Y (ComplexShape.prev c i) i))\n                      (F.map (HomologicalComplex.d Y i (ComplexShape.next c i)))\n                      (_ :\n                        HomologicalComplex.dTo ((mapHomologicalComplex F c).obj Y) i ≫\n                            HomologicalComplex.dFrom ((mapHomologicalComplex F c).obj Y) i =\n                          0)) =\n              0) ≫\n        cokernel.map\n            (imageToKernel (F.map (HomologicalComplex.d Y (ComplexShape.prev c i) i))\n              (F.map (HomologicalComplex.d Y i (ComplexShape.next c i)))\n              (_ :\n                HomologicalComplex.dTo ((mapHomologicalComplex F c).obj Y) i ≫\n                    HomologicalComplex.dFrom ((mapHomologicalComplex F c).obj Y) i =\n                  0))\n            (F.map\n              (imageToKernel (HomologicalComplex.dTo Y i) (HomologicalComplex.dFrom Y i)\n                (_ : HomologicalComplex.dTo Y i ≫ HomologicalComplex.dFrom Y i = 0)))\n            (((imageSubobjectIso (F.map (HomologicalComplex.dTo Y i))).hom ≫\n                image.lift\n                  (MonoFactorisation.mk (F.obj (image (HomologicalComplex.dTo Y i)))\n                    (F.map (image.ι (HomologicalComplex.dTo Y i)))\n                    (F.map (factorThruImage (HomologicalComplex.dTo Y i))))) ≫\n              F.map (imageSubobjectIso (HomologicalComplex.dTo Y i)).inv)\n            (((kernelSubobjectIso (F.map (HomologicalComplex.dFrom Y i))).hom ≫\n                (PreservesKernel.iso F (HomologicalComplex.dFrom Y i)).inv) ≫\n              F.map (kernelSubobjectIso (HomologicalComplex.dFrom Y i)).inv)\n            (_ :\n              imageToKernel (F.map (HomologicalComplex.d Y (ComplexShape.prev c i) i))\n                    (F.map (HomologicalComplex.d Y i (ComplexShape.next c i)))\n                    (_ :\n                      HomologicalComplex.dTo ((mapHomologicalComplex F c).obj Y) i ≫\n                          HomologicalComplex.dFrom ((mapHomologicalComplex F c).obj Y) i =\n                        0) ≫\n                  (F.mapIso (kernelSubobjectIso (HomologicalComplex.dFrom Y i)) ≪≫\n                      PreservesKernel.iso F (HomologicalComplex.dFrom Y i) ≪≫\n                        (kernelSubobjectIso (F.map (HomologicalComplex.dFrom Y i))).symm).inv =\n                (F.mapIso (imageSubobjectIso (HomologicalComplex.dTo Y i)) ≪≫\n                      (PreservesImage.iso F (HomologicalComplex.dTo Y i)).symm ≪≫\n                        (imageSubobjectIso (F.map (HomologicalComplex.dTo Y i))).symm).inv ≫\n                  F.map\n                    (imageToKernel (HomologicalComplex.dTo Y i) (HomologicalComplex.dFrom Y i)\n                      (_ : HomologicalComplex.dTo Y i ≫ HomologicalComplex.dFrom Y i = 0))) ≫\n          cokernelComparison\n            (imageToKernel (HomologicalComplex.dTo Y i) (HomologicalComplex.dFrom Y i)\n              (_ : HomologicalComplex.dTo Y i ≫ HomologicalComplex.dFrom Y i = 0))\n            F\n[PROOFSTEP]\nsimp only [← Category.assoc, cokernel.π_desc]\n[GOAL]\nA : Type u\ninst✝⁶ : Category.{v, u} A\ninst✝⁵ : Abelian A\nX✝ Y✝ Z : A\nf✝ : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z\nw : f✝ ≫ g = 0\nι : Type u_1\nc : ComplexShape ι\nB : Type u_2\ninst✝⁴ : Category.{?u.214307, u_2} B\ninst✝³ : Abelian B\nF : A ⥤ B\ninst✝² : Additive F\ninst✝¹ : PreservesFiniteLimits F\ninst✝ : PreservesFiniteColimits F\ni : ι\nX Y : HomologicalComplex A c\nf : X ⟶ Y\n⊢ (((((kernelSubobjectIso (F.map (HomologicalComplex.dFrom X i))).hom ≫\n              (PreservesKernel.iso F (HomologicalComplex.dFrom X i)).inv) ≫\n            F.map (kernelSubobjectIso (HomologicalComplex.dFrom X i)).inv) ≫\n          cokernel.π\n            (F.map\n              (imageToKernel (HomologicalComplex.dTo X i) (HomologicalComplex.dFrom X i)\n                (_ : HomologicalComplex.dTo X i ≫ HomologicalComplex.dFrom X i = 0)))) ≫\n        cokernelComparison\n          (imageToKernel (HomologicalComplex.dTo X i) (HomologicalComplex.dFrom X i)\n            (_ : HomologicalComplex.dTo X i ≫ HomologicalComplex.dFrom X i = 0))\n          F) ≫\n      F.map\n        (cokernel.desc\n          (imageToKernel (HomologicalComplex.dTo X i) (HomologicalComplex.dFrom X i)\n            (_ : HomologicalComplex.dTo X i ≫ HomologicalComplex.dFrom X i = 0))\n          (kernelSubobjectMap (HomologicalComplex.Hom.sqFrom f i) ≫\n            cokernel.π\n              (imageToKernel (HomologicalComplex.dTo Y i) (HomologicalComplex.dFrom Y i)\n                (_ : HomologicalComplex.dTo Y i ≫ HomologicalComplex.dFrom Y i = 0)))\n          (_ :\n            imageToKernel (HomologicalComplex.dTo X i) (HomologicalComplex.dFrom X i)\n                  (_ : HomologicalComplex.dTo X i ≫ HomologicalComplex.dFrom X i = 0) ≫\n                kernelSubobjectMap (HomologicalComplex.Hom.sqFrom f i) ≫\n                  cokernel.π\n                    (imageToKernel (HomologicalComplex.dTo Y i) (HomologicalComplex.dFrom Y i)\n                      (_ : HomologicalComplex.dTo Y i ≫ HomologicalComplex.dFrom Y i = 0)) =\n              0)) =\n    ((kernelSubobjectMap (HomologicalComplex.Hom.sqFrom ((mapHomologicalComplex F c).map f) i) ≫\n          cokernel.π\n            (imageToKernel (F.map (HomologicalComplex.d Y (ComplexShape.prev c i) i))\n              (F.map (HomologicalComplex.d Y i (ComplexShape.next c i)))\n              (_ :\n                HomologicalComplex.dTo ((mapHomologicalComplex F c).obj Y) i ≫\n                    HomologicalComplex.dFrom ((mapHomologicalComplex F c).obj Y) i =\n                  0))) ≫\n        cokernel.map\n          (imageToKernel (F.map (HomologicalComplex.d Y (ComplexShape.prev c i) i))\n            (F.map (HomologicalComplex.d Y i (ComplexShape.next c i)))\n            (_ :\n              HomologicalComplex.dTo ((mapHomologicalComplex F c).obj Y) i ≫\n                  HomologicalComplex.dFrom ((mapHomologicalComplex F c).obj Y) i =\n                0))\n          (F.map\n            (imageToKernel (HomologicalComplex.dTo Y i) (HomologicalComplex.dFrom Y i)\n              (_ : HomologicalComplex.dTo Y i ≫ HomologicalComplex.dFrom Y i = 0)))\n          (((imageSubobjectIso (F.map (HomologicalComplex.dTo Y i))).hom ≫\n              image.lift\n                (MonoFactorisation.mk (F.obj (image (HomologicalComplex.dTo Y i)))\n                  (F.map (image.ι (HomologicalComplex.dTo Y i)))\n                  (F.map (factorThruImage (HomologicalComplex.dTo Y i))))) ≫\n            F.map (imageSubobjectIso (HomologicalComplex.dTo Y i)).inv)\n          (((kernelSubobjectIso (F.map (HomologicalComplex.dFrom Y i))).hom ≫\n              (PreservesKernel.iso F (HomologicalComplex.dFrom Y i)).inv) ≫\n            F.map (kernelSubobjectIso (HomologicalComplex.dFrom Y i)).inv)\n          (_ :\n            imageToKernel (F.map (HomologicalComplex.d Y (ComplexShape.prev c i) i))\n                  (F.map (HomologicalComplex.d Y i (ComplexShape.next c i)))\n                  (_ :\n                    HomologicalComplex.dTo ((mapHomologicalComplex F c).obj Y) i ≫\n                        HomologicalComplex.dFrom ((mapHomologicalComplex F c).obj Y) i =\n                      0) ≫\n                (F.mapIso (kernelSubobjectIso (HomologicalComplex.dFrom Y i)) ≪≫\n                    PreservesKernel.iso F (HomologicalComplex.dFrom Y i) ≪≫\n                      (kernelSubobjectIso (F.map (HomologicalComplex.dFrom Y i))).symm).inv =\n              (F.mapIso (imageSubobjectIso (HomologicalComplex.dTo Y i)) ≪≫\n                    (PreservesImage.iso F (HomologicalComplex.dTo Y i)).symm ≪≫\n                      (imageSubobjectIso (F.map (HomologicalComplex.dTo Y i))).symm).inv ≫\n                F.map\n                  (imageToKernel (HomologicalComplex.dTo Y i) (HomologicalComplex.dFrom Y i)\n                    (_ : HomologicalComplex.dTo Y i ≫ HomologicalComplex.dFrom Y i = 0)))) ≫\n      cokernelComparison\n        (imageToKernel (HomologicalComplex.dTo Y i) (HomologicalComplex.dFrom Y i)\n          (_ : HomologicalComplex.dTo Y i ≫ HomologicalComplex.dFrom Y i = 0))\n        F\n[PROOFSTEP]\nsimp only [Category.assoc, cokernelComparison_map_desc, cokernel.π_desc]\n[GOAL]\nA : Type u\ninst✝⁶ : Category.{v, u} A\ninst✝⁵ : Abelian A\nX✝ Y✝ Z : A\nf✝ : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z\nw : f✝ ≫ g = 0\nι : Type u_1\nc : ComplexShape ι\nB : Type u_2\ninst✝⁴ : Category.{?u.214307, u_2} B\ninst✝³ : Abelian B\nF : A ⥤ B\ninst✝² : Additive F\ninst✝¹ : PreservesFiniteLimits F\ninst✝ : PreservesFiniteColimits F\ni : ι\nX Y : HomologicalComplex A c\nf : X ⟶ Y\n⊢ (kernelSubobjectIso (F.map (HomologicalComplex.dFrom X i))).hom ≫\n      (PreservesKernel.iso F (HomologicalComplex.dFrom X i)).inv ≫\n        F.map (kernelSubobjectIso (HomologicalComplex.dFrom X i)).inv ≫\n          F.map\n            (kernelSubobjectMap (HomologicalComplex.Hom.sqFrom f i) ≫\n              cokernel.π\n                (imageToKernel (HomologicalComplex.dTo Y i) (HomologicalComplex.dFrom Y i)\n                  (_ : HomologicalComplex.dTo Y i ≫ HomologicalComplex.dFrom Y i = 0))) =\n    kernelSubobjectMap (HomologicalComplex.Hom.sqFrom ((mapHomologicalComplex F c).map f) i) ≫\n      (kernelSubobjectIso (F.map (HomologicalComplex.dFrom Y i))).hom ≫\n        (PreservesKernel.iso F (HomologicalComplex.dFrom Y i)).inv ≫\n          F.map (kernelSubobjectIso (HomologicalComplex.dFrom Y i)).inv ≫\n            cokernel.π\n                (F.map\n                  (imageToKernel (HomologicalComplex.dTo Y i) (HomologicalComplex.dFrom Y i)\n                    (_ : HomologicalComplex.dTo Y i ≫ HomologicalComplex.dFrom Y i = 0))) ≫\n              cokernelComparison\n                (imageToKernel (HomologicalComplex.dTo Y i) (HomologicalComplex.dFrom Y i)\n                  (_ : HomologicalComplex.dTo Y i ≫ HomologicalComplex.dFrom Y i = 0))\n                F\n[PROOFSTEP]\nsimp only [π_comp_cokernelComparison, ← F.map_comp]\n[GOAL]\nA : Type u\ninst✝⁶ : Category.{v, u} A\ninst✝⁵ : Abelian A\nX✝ Y✝ Z : A\nf✝ : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z\nw : f✝ ≫ g = 0\nι : Type u_1\nc : ComplexShape ι\nB : Type u_2\ninst✝⁴ : Category.{?u.214307, u_2} B\ninst✝³ : Abelian B\nF : A ⥤ B\ninst✝² : Additive F\ninst✝¹ : PreservesFiniteLimits F\ninst✝ : PreservesFiniteColimits F\ni : ι\nX Y : HomologicalComplex A c\nf : X ⟶ Y\n⊢ (kernelSubobjectIso (F.map (HomologicalComplex.dFrom X i))).hom ≫\n      (PreservesKernel.iso F (HomologicalComplex.dFrom X i)).inv ≫\n        F.map\n          ((kernelSubobjectIso (HomologicalComplex.dFrom X i)).inv ≫\n            kernelSubobjectMap (HomologicalComplex.Hom.sqFrom f i) ≫\n              cokernel.π\n                (imageToKernel (HomologicalComplex.dTo Y i) (HomologicalComplex.dFrom Y i)\n                  (_ : HomologicalComplex.dTo Y i ≫ HomologicalComplex.dFrom Y i = 0))) =\n    kernelSubobjectMap (HomologicalComplex.Hom.sqFrom ((mapHomologicalComplex F c).map f) i) ≫\n      (kernelSubobjectIso (F.map (HomologicalComplex.dFrom Y i))).hom ≫\n        (PreservesKernel.iso F (HomologicalComplex.dFrom Y i)).inv ≫\n          F.map\n            ((kernelSubobjectIso (HomologicalComplex.dFrom Y i)).inv ≫\n              cokernel.π\n                (imageToKernel (HomologicalComplex.dTo Y i) (HomologicalComplex.dFrom Y i)\n                  (_ : HomologicalComplex.dTo Y i ≫ HomologicalComplex.dFrom Y i = 0)))\n[PROOFSTEP]\nerw [← kernelSubobjectIso_comp_kernel_map_assoc]\n[GOAL]\nA : Type u\ninst✝⁶ : Category.{v, u} A\ninst✝⁵ : Abelian A\nX✝ Y✝ Z : A\nf✝ : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z\nw : f✝ ≫ g = 0\nι : Type u_1\nc : ComplexShape ι\nB : Type u_2\ninst✝⁴ : Category.{?u.214307, u_2} B\ninst✝³ : Abelian B\nF : A ⥤ B\ninst✝² : Additive F\ninst✝¹ : PreservesFiniteLimits F\ninst✝ : PreservesFiniteColimits F\ni : ι\nX Y : HomologicalComplex A c\nf : X ⟶ Y\n⊢ (kernelSubobjectIso (F.map (HomologicalComplex.dFrom X i))).hom ≫\n      (PreservesKernel.iso F (HomologicalComplex.dFrom X i)).inv ≫\n        F.map\n          ((kernelSubobjectIso (HomologicalComplex.dFrom X i)).inv ≫\n            kernelSubobjectMap (HomologicalComplex.Hom.sqFrom f i) ≫\n              cokernel.π\n                (imageToKernel (HomologicalComplex.dTo Y i) (HomologicalComplex.dFrom Y i)\n                  (_ : HomologicalComplex.dTo Y i ≫ HomologicalComplex.dFrom Y i = 0))) =\n    (kernelSubobjectIso (F.map (HomologicalComplex.d X i (ComplexShape.next c i)))).hom ≫\n      kernel.map (F.map (HomologicalComplex.d X i (ComplexShape.next c i)))\n          (F.map (HomologicalComplex.d Y i (ComplexShape.next c i)))\n          (HomologicalComplex.Hom.sqFrom ((mapHomologicalComplex F c).map f) i).left\n          (HomologicalComplex.Hom.sqFrom ((mapHomologicalComplex F c).map f) i).right\n          (_ :\n            (Arrow.mk (F.map (HomologicalComplex.d X i (ComplexShape.next c i)))).hom ≫\n                (𝟭 B).map (HomologicalComplex.Hom.sqFrom ((mapHomologicalComplex F c).map f) i).right =\n              (𝟭 B).map (HomologicalComplex.Hom.sqFrom ((mapHomologicalComplex F c).map f) i).left ≫\n                (Arrow.mk (F.map (HomologicalComplex.d Y i (ComplexShape.next c i)))).hom) ≫\n        (PreservesKernel.iso F (HomologicalComplex.dFrom Y i)).inv ≫\n          F.map\n            ((kernelSubobjectIso (HomologicalComplex.dFrom Y i)).inv ≫\n              cokernel.π\n                (imageToKernel (HomologicalComplex.dTo Y i) (HomologicalComplex.dFrom Y i)\n                  (_ : HomologicalComplex.dTo Y i ≫ HomologicalComplex.dFrom Y i = 0)))\n[PROOFSTEP]\nsimp only [HomologicalComplex.Hom.sqFrom_right, HomologicalComplex.Hom.sqFrom_left, F.mapHomologicalComplex_map_f,\n  F.map_comp]\n[GOAL]\nA : Type u\ninst✝⁶ : Category.{v, u} A\ninst✝⁵ : Abelian A\nX✝ Y✝ Z : A\nf✝ : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z\nw : f✝ ≫ g = 0\nι : Type u_1\nc : ComplexShape ι\nB : Type u_2\ninst✝⁴ : Category.{?u.214307, u_2} B\ninst✝³ : Abelian B\nF : A ⥤ B\ninst✝² : Additive F\ninst✝¹ : PreservesFiniteLimits F\ninst✝ : PreservesFiniteColimits F\ni : ι\nX Y : HomologicalComplex A c\nf : X ⟶ Y\n⊢ (kernelSubobjectIso (F.map (HomologicalComplex.dFrom X i))).hom ≫\n      (PreservesKernel.iso F (HomologicalComplex.dFrom X i)).inv ≫\n        F.map (kernelSubobjectIso (HomologicalComplex.dFrom X i)).inv ≫\n          F.map (kernelSubobjectMap (HomologicalComplex.Hom.sqFrom f i)) ≫\n            F.map\n              (cokernel.π\n                (imageToKernel (HomologicalComplex.dTo Y i) (HomologicalComplex.dFrom Y i)\n                  (_ : HomologicalComplex.dTo Y i ≫ HomologicalComplex.dFrom Y i = 0))) =\n    (kernelSubobjectIso (F.map (HomologicalComplex.d X i (ComplexShape.next c i)))).hom ≫\n      kernel.map (F.map (HomologicalComplex.d X i (ComplexShape.next c i)))\n          (F.map (HomologicalComplex.d Y i (ComplexShape.next c i))) (F.map (HomologicalComplex.Hom.f f i))\n          (F.map (HomologicalComplex.Hom.f f (ComplexShape.next c i)))\n          (_ :\n            F.map (HomologicalComplex.d X i (ComplexShape.next c i)) ≫\n                F.map (HomologicalComplex.Hom.f f (ComplexShape.next c i)) =\n              F.map (HomologicalComplex.Hom.f f i) ≫ F.map (HomologicalComplex.d Y i (ComplexShape.next c i))) ≫\n        (PreservesKernel.iso F (HomologicalComplex.dFrom Y i)).inv ≫\n          F.map (kernelSubobjectIso (HomologicalComplex.dFrom Y i)).inv ≫\n            F.map\n              (cokernel.π\n                (imageToKernel (HomologicalComplex.dTo Y i) (HomologicalComplex.dFrom Y i)\n                  (_ : HomologicalComplex.dTo Y i ≫ HomologicalComplex.dFrom Y i = 0)))\n[PROOFSTEP]\ndsimp [HomologicalComplex.dFrom, HomologicalComplex.Hom.next]\n[GOAL]\nA : Type u\ninst✝⁶ : Category.{v, u} A\ninst✝⁵ : Abelian A\nX✝ Y✝ Z : A\nf✝ : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z\nw : f✝ ≫ g = 0\nι : Type u_1\nc : ComplexShape ι\nB : Type u_2\ninst✝⁴ : Category.{?u.214307, u_2} B\ninst✝³ : Abelian B\nF : A ⥤ B\ninst✝² : Additive F\ninst✝¹ : PreservesFiniteLimits F\ninst✝ : PreservesFiniteColimits F\ni : ι\nX Y : HomologicalComplex A c\nf : X ⟶ Y\n⊢ (kernelSubobjectIso (F.map (HomologicalComplex.d X i (ComplexShape.next c i)))).hom ≫\n      (PreservesKernel.iso F (HomologicalComplex.d X i (ComplexShape.next c i))).inv ≫\n        F.map (kernelSubobjectIso (HomologicalComplex.d X i (ComplexShape.next c i))).inv ≫\n          F.map (kernelSubobjectMap (HomologicalComplex.Hom.sqFrom f i)) ≫\n            F.map\n              (cokernel.π\n                (imageToKernel (HomologicalComplex.dTo Y i) (HomologicalComplex.d Y i (ComplexShape.next c i))\n                  (_ : HomologicalComplex.dTo Y i ≫ HomologicalComplex.dFrom Y i = 0))) =\n    (kernelSubobjectIso (F.map (HomologicalComplex.d X i (ComplexShape.next c i)))).hom ≫\n      kernel.map (F.map (HomologicalComplex.d X i (ComplexShape.next c i)))\n          (F.map (HomologicalComplex.d Y i (ComplexShape.next c i))) (F.map (HomologicalComplex.Hom.f f i))\n          (F.map (HomologicalComplex.Hom.f f (ComplexShape.next c i)))\n          (_ :\n            F.map (HomologicalComplex.d X i (ComplexShape.next c i)) ≫\n                F.map (HomologicalComplex.Hom.f f (ComplexShape.next c i)) =\n              F.map (HomologicalComplex.Hom.f f i) ≫ F.map (HomologicalComplex.d Y i (ComplexShape.next c i))) ≫\n        (PreservesKernel.iso F (HomologicalComplex.d Y i (ComplexShape.next c i))).inv ≫\n          F.map (kernelSubobjectIso (HomologicalComplex.d Y i (ComplexShape.next c i))).inv ≫\n            F.map\n              (cokernel.π\n                (imageToKernel (HomologicalComplex.dTo Y i) (HomologicalComplex.d Y i (ComplexShape.next c i))\n                  (_ : HomologicalComplex.dTo Y i ≫ HomologicalComplex.dFrom Y i = 0)))\n[PROOFSTEP]\nrw [kernel_map_comp_preserves_kernel_iso_inv_assoc]\n[GOAL]\nA : Type u\ninst✝⁶ : Category.{v, u} A\ninst✝⁵ : Abelian A\nX✝ Y✝ Z : A\nf✝ : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z\nw : f✝ ≫ g = 0\nι : Type u_1\nc : ComplexShape ι\nB : Type u_2\ninst✝⁴ : Category.{?u.214307, u_2} B\ninst✝³ : Abelian B\nF : A ⥤ B\ninst✝² : Additive F\ninst✝¹ : PreservesFiniteLimits F\ninst✝ : PreservesFiniteColimits F\ni : ι\nX Y : HomologicalComplex A c\nf : X ⟶ Y\n⊢ (kernelSubobjectIso (F.map (HomologicalComplex.d X i (ComplexShape.next c i)))).hom ≫\n      (PreservesKernel.iso F (HomologicalComplex.d X i (ComplexShape.next c i))).inv ≫\n        F.map (kernelSubobjectIso (HomologicalComplex.d X i (ComplexShape.next c i))).inv ≫\n          F.map (kernelSubobjectMap (HomologicalComplex.Hom.sqFrom f i)) ≫\n            F.map\n              (cokernel.π\n                (imageToKernel (HomologicalComplex.dTo Y i) (HomologicalComplex.d Y i (ComplexShape.next c i))\n                  (_ : HomologicalComplex.dTo Y i ≫ HomologicalComplex.dFrom Y i = 0))) =\n    (kernelSubobjectIso (F.map (HomologicalComplex.d X i (ComplexShape.next c i)))).hom ≫\n      (PreservesKernel.iso F (HomologicalComplex.d X i (ComplexShape.next c i))).inv ≫\n        F.map\n            (kernel.map (HomologicalComplex.d X i (ComplexShape.next c i))\n              (HomologicalComplex.d Y i (ComplexShape.next c i)) (HomologicalComplex.Hom.f f i)\n              (HomologicalComplex.Hom.f f (ComplexShape.next c i)) ?hpq) ≫\n          F.map (kernelSubobjectIso (HomologicalComplex.d Y i (ComplexShape.next c i))).inv ≫\n            F.map\n              (cokernel.π\n                (imageToKernel (HomologicalComplex.dTo Y i) (HomologicalComplex.d Y i (ComplexShape.next c i))\n                  (_ : HomologicalComplex.dTo Y i ≫ HomologicalComplex.dFrom Y i = 0)))\ncase hpq\nA : Type u\ninst✝⁶ : Category.{v, u} A\ninst✝⁵ : Abelian A\nX✝ Y✝ Z : A\nf✝ : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z\nw : f✝ ≫ g = 0\nι : Type u_1\nc : ComplexShape ι\nB : Type u_2\ninst✝⁴ : Category.{?u.214307, u_2} B\ninst✝³ : Abelian B\nF : A ⥤ B\ninst✝² : Additive F\ninst✝¹ : PreservesFiniteLimits F\ninst✝ : PreservesFiniteColimits F\ni : ι\nX Y : HomologicalComplex A c\nf : X ⟶ Y\n⊢ HomologicalComplex.d X i (ComplexShape.next c i) ≫ HomologicalComplex.Hom.f f (ComplexShape.next c i) =\n    HomologicalComplex.Hom.f f i ≫ HomologicalComplex.d Y i (ComplexShape.next c i)\n[PROOFSTEP]\nconv_lhs => erw [← F.map_comp_assoc]\n[GOAL]\nA : Type u\ninst✝⁶ : Category.{v, u} A\ninst✝⁵ : Abelian A\nX✝ Y✝ Z : A\nf✝ : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z\nw : f✝ ≫ g = 0\nι : Type u_1\nc : ComplexShape ι\nB : Type u_2\ninst✝⁴ : Category.{?u.214307, u_2} B\ninst✝³ : Abelian B\nF : A ⥤ B\ninst✝² : Additive F\ninst✝¹ : PreservesFiniteLimits F\ninst✝ : PreservesFiniteColimits F\ni : ι\nX Y : HomologicalComplex A c\nf : X ⟶ Y\n| (kernelSubobjectIso (F.map (HomologicalComplex.d X i (ComplexShape.next c i)))).hom ≫\n    (PreservesKernel.iso F (HomologicalComplex.d X i (ComplexShape.next c i))).inv ≫\n      F.map (kernelSubobjectIso (HomologicalComplex.d X i (ComplexShape.next c i))).inv ≫\n        F.map (kernelSubobjectMap (HomologicalComplex.Hom.sqFrom f i)) ≫\n          F.map\n            (cokernel.π\n              (imageToKernel (HomologicalComplex.dTo Y i) (HomologicalComplex.d Y i (ComplexShape.next c i))\n                (_ : HomologicalComplex.dTo Y i ≫ HomologicalComplex.dFrom Y i = 0)))\n[PROOFSTEP]\nerw [← F.map_comp_assoc]\n[GOAL]\nA : Type u\ninst✝⁶ : Category.{v, u} A\ninst✝⁵ : Abelian A\nX✝ Y✝ Z : A\nf✝ : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z\nw : f✝ ≫ g = 0\nι : Type u_1\nc : ComplexShape ι\nB : Type u_2\ninst✝⁴ : Category.{?u.214307, u_2} B\ninst✝³ : Abelian B\nF : A ⥤ B\ninst✝² : Additive F\ninst✝¹ : PreservesFiniteLimits F\ninst✝ : PreservesFiniteColimits F\ni : ι\nX Y : HomologicalComplex A c\nf : X ⟶ Y\n| (kernelSubobjectIso (F.map (HomologicalComplex.d X i (ComplexShape.next c i)))).hom ≫\n    (PreservesKernel.iso F (HomologicalComplex.d X i (ComplexShape.next c i))).inv ≫\n      F.map (kernelSubobjectIso (HomologicalComplex.d X i (ComplexShape.next c i))).inv ≫\n        F.map (kernelSubobjectMap (HomologicalComplex.Hom.sqFrom f i)) ≫\n          F.map\n            (cokernel.π\n              (imageToKernel (HomologicalComplex.dTo Y i) (HomologicalComplex.d Y i (ComplexShape.next c i))\n                (_ : HomologicalComplex.dTo Y i ≫ HomologicalComplex.dFrom Y i = 0)))\n[PROOFSTEP]\nerw [← F.map_comp_assoc]\n[GOAL]\nA : Type u\ninst✝⁶ : Category.{v, u} A\ninst✝⁵ : Abelian A\nX✝ Y✝ Z : A\nf✝ : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z\nw : f✝ ≫ g = 0\nι : Type u_1\nc : ComplexShape ι\nB : Type u_2\ninst✝⁴ : Category.{?u.214307, u_2} B\ninst✝³ : Abelian B\nF : A ⥤ B\ninst✝² : Additive F\ninst✝¹ : PreservesFiniteLimits F\ninst✝ : PreservesFiniteColimits F\ni : ι\nX Y : HomologicalComplex A c\nf : X ⟶ Y\n| (kernelSubobjectIso (F.map (HomologicalComplex.d X i (ComplexShape.next c i)))).hom ≫\n    (PreservesKernel.iso F (HomologicalComplex.d X i (ComplexShape.next c i))).inv ≫\n      F.map (kernelSubobjectIso (HomologicalComplex.d X i (ComplexShape.next c i))).inv ≫\n        F.map (kernelSubobjectMap (HomologicalComplex.Hom.sqFrom f i)) ≫\n          F.map\n            (cokernel.π\n              (imageToKernel (HomologicalComplex.dTo Y i) (HomologicalComplex.d Y i (ComplexShape.next c i))\n                (_ : HomologicalComplex.dTo Y i ≫ HomologicalComplex.dFrom Y i = 0)))\n[PROOFSTEP]\nerw [← F.map_comp_assoc]\n[GOAL]\nA : Type u\ninst✝⁶ : Category.{v, u} A\ninst✝⁵ : Abelian A\nX✝ Y✝ Z : A\nf✝ : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z\nw : f✝ ≫ g = 0\nι : Type u_1\nc : ComplexShape ι\nB : Type u_2\ninst✝⁴ : Category.{?u.214307, u_2} B\ninst✝³ : Abelian B\nF : A ⥤ B\ninst✝² : Additive F\ninst✝¹ : PreservesFiniteLimits F\ninst✝ : PreservesFiniteColimits F\ni : ι\nX Y : HomologicalComplex A c\nf : X ⟶ Y\n⊢ (kernelSubobjectIso (F.map (HomologicalComplex.d X i (ComplexShape.next c i)))).hom ≫\n      (PreservesKernel.iso F (HomologicalComplex.d X i (ComplexShape.next c i))).inv ≫\n        F.map\n            ((kernelSubobjectIso (HomologicalComplex.d X i (ComplexShape.next c i))).inv ≫\n              kernelSubobjectMap (HomologicalComplex.Hom.sqFrom f i)) ≫\n          F.map\n            (cokernel.π\n              (imageToKernel (HomologicalComplex.dTo Y i) (HomologicalComplex.d Y i (ComplexShape.next c i))\n                (_ : HomologicalComplex.dTo Y i ≫ HomologicalComplex.dFrom Y i = 0))) =\n    (kernelSubobjectIso (F.map (HomologicalComplex.d X i (ComplexShape.next c i)))).hom ≫\n      (PreservesKernel.iso F (HomologicalComplex.d X i (ComplexShape.next c i))).inv ≫\n        F.map\n            (kernel.map (HomologicalComplex.d X i (ComplexShape.next c i))\n              (HomologicalComplex.d Y i (ComplexShape.next c i)) (HomologicalComplex.Hom.f f i)\n              (HomologicalComplex.Hom.f f (ComplexShape.next c i)) ?hpq) ≫\n          F.map (kernelSubobjectIso (HomologicalComplex.d Y i (ComplexShape.next c i))).inv ≫\n            F.map\n              (cokernel.π\n                (imageToKernel (HomologicalComplex.dTo Y i) (HomologicalComplex.d Y i (ComplexShape.next c i))\n                  (_ : HomologicalComplex.dTo Y i ≫ HomologicalComplex.dFrom Y i = 0)))\ncase hpq\nA : Type u\ninst✝⁶ : Category.{v, u} A\ninst✝⁵ : Abelian A\nX✝ Y✝ Z : A\nf✝ : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z\nw : f✝ ≫ g = 0\nι : Type u_1\nc : ComplexShape ι\nB : Type u_2\ninst✝⁴ : Category.{?u.214307, u_2} B\ninst✝³ : Abelian B\nF : A ⥤ B\ninst✝² : Additive F\ninst✝¹ : PreservesFiniteLimits F\ninst✝ : PreservesFiniteColimits F\ni : ι\nX Y : HomologicalComplex A c\nf : X ⟶ Y\n⊢ HomologicalComplex.d X i (ComplexShape.next c i) ≫ HomologicalComplex.Hom.f f (ComplexShape.next c i) =\n    HomologicalComplex.Hom.f f i ≫ HomologicalComplex.d Y i (ComplexShape.next c i)\n[PROOFSTEP]\nrotate_right\n[GOAL]\ncase hpq\nA : Type u\ninst✝⁶ : Category.{v, u} A\ninst✝⁵ : Abelian A\nX✝ Y✝ Z : A\nf✝ : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z\nw : f✝ ≫ g = 0\nι : Type u_1\nc : ComplexShape ι\nB : Type u_2\ninst✝⁴ : Category.{?u.214307, u_2} B\ninst✝³ : Abelian B\nF : A ⥤ B\ninst✝² : Additive F\ninst✝¹ : PreservesFiniteLimits F\ninst✝ : PreservesFiniteColimits F\ni : ι\nX Y : HomologicalComplex A c\nf : X ⟶ Y\n⊢ HomologicalComplex.d X i (ComplexShape.next c i) ≫ HomologicalComplex.Hom.f f (ComplexShape.next c i) =\n    HomologicalComplex.Hom.f f i ≫ HomologicalComplex.d Y i (ComplexShape.next c i)\nA : Type u\ninst✝⁶ : Category.{v, u} A\ninst✝⁵ : Abelian A\nX✝ Y✝ Z : A\nf✝ : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z\nw : f✝ ≫ g = 0\nι : Type u_1\nc : ComplexShape ι\nB : Type u_2\ninst✝⁴ : Category.{?u.214307, u_2} B\ninst✝³ : Abelian B\nF : A ⥤ B\ninst✝² : Additive F\ninst✝¹ : PreservesFiniteLimits F\ninst✝ : PreservesFiniteColimits F\ni : ι\nX Y : HomologicalComplex A c\nf : X ⟶ Y\n⊢ (kernelSubobjectIso (F.map (HomologicalComplex.d X i (ComplexShape.next c i)))).hom ≫\n      (PreservesKernel.iso F (HomologicalComplex.d X i (ComplexShape.next c i))).inv ≫\n        F.map\n            ((kernelSubobjectIso (HomologicalComplex.d X i (ComplexShape.next c i))).inv ≫\n              kernelSubobjectMap (HomologicalComplex.Hom.sqFrom f i)) ≫\n          F.map\n            (cokernel.π\n              (imageToKernel (HomologicalComplex.dTo Y i) (HomologicalComplex.d Y i (ComplexShape.next c i))\n                (_ : HomologicalComplex.dTo Y i ≫ HomologicalComplex.dFrom Y i = 0))) =\n    (kernelSubobjectIso (F.map (HomologicalComplex.d X i (ComplexShape.next c i)))).hom ≫\n      (PreservesKernel.iso F (HomologicalComplex.d X i (ComplexShape.next c i))).inv ≫\n        F.map\n            (kernel.map (HomologicalComplex.d X i (ComplexShape.next c i))\n              (HomologicalComplex.d Y i (ComplexShape.next c i)) (HomologicalComplex.Hom.f f i)\n              (HomologicalComplex.Hom.f f (ComplexShape.next c i)) ?hpq) ≫\n          F.map (kernelSubobjectIso (HomologicalComplex.d Y i (ComplexShape.next c i))).inv ≫\n            F.map\n              (cokernel.π\n                (imageToKernel (HomologicalComplex.dTo Y i) (HomologicalComplex.d Y i (ComplexShape.next c i))\n                  (_ : HomologicalComplex.dTo Y i ≫ HomologicalComplex.dFrom Y i = 0)))\n[PROOFSTEP]\nsimp\n[GOAL]\nA : Type u\ninst✝⁶ : Category.{v, u} A\ninst✝⁵ : Abelian A\nX✝ Y✝ Z : A\nf✝ : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z\nw : f✝ ≫ g = 0\nι : Type u_1\nc : ComplexShape ι\nB : Type u_2\ninst✝⁴ : Category.{?u.214307, u_2} B\ninst✝³ : Abelian B\nF : A ⥤ B\ninst✝² : Additive F\ninst✝¹ : PreservesFiniteLimits F\ninst✝ : PreservesFiniteColimits F\ni : ι\nX Y : HomologicalComplex A c\nf : X ⟶ Y\n⊢ (kernelSubobjectIso (F.map (HomologicalComplex.d X i (ComplexShape.next c i)))).hom ≫\n      (PreservesKernel.iso F (HomologicalComplex.d X i (ComplexShape.next c i))).inv ≫\n        F.map\n            ((kernelSubobjectIso (HomologicalComplex.d X i (ComplexShape.next c i))).inv ≫\n              kernelSubobjectMap (HomologicalComplex.Hom.sqFrom f i)) ≫\n          F.map\n            (cokernel.π\n              (imageToKernel (HomologicalComplex.dTo Y i) (HomologicalComplex.d Y i (ComplexShape.next c i))\n                (_ : HomologicalComplex.dTo Y i ≫ HomologicalComplex.dFrom Y i = 0))) =\n    (kernelSubobjectIso (F.map (HomologicalComplex.d X i (ComplexShape.next c i)))).hom ≫\n      (PreservesKernel.iso F (HomologicalComplex.d X i (ComplexShape.next c i))).inv ≫\n        F.map\n            (kernel.map (HomologicalComplex.d X i (ComplexShape.next c i))\n              (HomologicalComplex.d Y i (ComplexShape.next c i)) (HomologicalComplex.Hom.f f i)\n              (HomologicalComplex.Hom.f f (ComplexShape.next c i))\n              (_ :\n                HomologicalComplex.d X i (ComplexShape.next c i) ≫ HomologicalComplex.Hom.f f (ComplexShape.next c i) =\n                  HomologicalComplex.Hom.f f i ≫ HomologicalComplex.d Y i (ComplexShape.next c i))) ≫\n          F.map (kernelSubobjectIso (HomologicalComplex.d Y i (ComplexShape.next c i))).inv ≫\n            F.map\n              (cokernel.π\n                (imageToKernel (HomologicalComplex.dTo Y i) (HomologicalComplex.d Y i (ComplexShape.next c i))\n                  (_ : HomologicalComplex.dTo Y i ≫ HomologicalComplex.dFrom Y i = 0)))\n[PROOFSTEP]\nrw [← kernel_map_comp_kernelSubobjectIso_inv]\n[GOAL]\nA : Type u\ninst✝⁶ : Category.{v, u} A\ninst✝⁵ : Abelian A\nX✝ Y✝ Z : A\nf✝ : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z\nw : f✝ ≫ g = 0\nι : Type u_1\nc : ComplexShape ι\nB : Type u_2\ninst✝⁴ : Category.{?u.214307, u_2} B\ninst✝³ : Abelian B\nF : A ⥤ B\ninst✝² : Additive F\ninst✝¹ : PreservesFiniteLimits F\ninst✝ : PreservesFiniteColimits F\ni : ι\nX Y : HomologicalComplex A c\nf : X ⟶ Y\n⊢ (kernelSubobjectIso (F.map (HomologicalComplex.d X i (ComplexShape.next c i)))).hom ≫\n      (PreservesKernel.iso F (HomologicalComplex.d X i (ComplexShape.next c i))).inv ≫\n        F.map\n            (kernel.map (HomologicalComplex.d X i (ComplexShape.next c i))\n                (HomologicalComplex.d Y i (ComplexShape.next c i)) (HomologicalComplex.Hom.sqFrom f i).left\n                (HomologicalComplex.Hom.sqFrom f i).right\n                (_ :\n                  (Arrow.mk (HomologicalComplex.d X i (ComplexShape.next c i))).hom ≫\n                      (𝟭 A).map (HomologicalComplex.Hom.sqFrom f i).right =\n                    (𝟭 A).map (HomologicalComplex.Hom.sqFrom f i).left ≫\n                      (Arrow.mk (HomologicalComplex.d Y i (ComplexShape.next c i))).hom) ≫\n              (kernelSubobjectIso (HomologicalComplex.d Y i (ComplexShape.next c i))).inv) ≫\n          F.map\n            (cokernel.π\n              (imageToKernel (HomologicalComplex.dTo Y i) (HomologicalComplex.d Y i (ComplexShape.next c i))\n                (_ : HomologicalComplex.dTo Y i ≫ HomologicalComplex.dFrom Y i = 0))) =\n    (kernelSubobjectIso (F.map (HomologicalComplex.d X i (ComplexShape.next c i)))).hom ≫\n      (PreservesKernel.iso F (HomologicalComplex.d X i (ComplexShape.next c i))).inv ≫\n        F.map\n            (kernel.map (HomologicalComplex.d X i (ComplexShape.next c i))\n              (HomologicalComplex.d Y i (ComplexShape.next c i)) (HomologicalComplex.Hom.f f i)\n              (HomologicalComplex.Hom.f f (ComplexShape.next c i))\n              (_ :\n                HomologicalComplex.d X i (ComplexShape.next c i) ≫ HomologicalComplex.Hom.f f (ComplexShape.next c i) =\n                  HomologicalComplex.Hom.f f i ≫ HomologicalComplex.d Y i (ComplexShape.next c i))) ≫\n          F.map (kernelSubobjectIso (HomologicalComplex.d Y i (ComplexShape.next c i))).inv ≫\n            F.map\n              (cokernel.π\n                (imageToKernel (HomologicalComplex.dTo Y i) (HomologicalComplex.d Y i (ComplexShape.next c i))\n                  (_ : HomologicalComplex.dTo Y i ≫ HomologicalComplex.dFrom Y i = 0)))\n[PROOFSTEP]\nany_goals simp\n[GOAL]\nA : Type u\ninst✝⁶ : Category.{v, u} A\ninst✝⁵ : Abelian A\nX✝ Y✝ Z : A\nf✝ : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z\nw : f✝ ≫ g = 0\nι : Type u_1\nc : ComplexShape ι\nB : Type u_2\ninst✝⁴ : Category.{?u.214307, u_2} B\ninst✝³ : Abelian B\nF : A ⥤ B\ninst✝² : Additive F\ninst✝¹ : PreservesFiniteLimits F\ninst✝ : PreservesFiniteColimits F\ni : ι\nX Y : HomologicalComplex A c\nf : X ⟶ Y\n⊢ (kernelSubobjectIso (F.map (HomologicalComplex.d X i (ComplexShape.next c i)))).hom ≫\n      (PreservesKernel.iso F (HomologicalComplex.d X i (ComplexShape.next c i))).inv ≫\n        F.map\n            (kernel.map (HomologicalComplex.d X i (ComplexShape.next c i))\n                (HomologicalComplex.d Y i (ComplexShape.next c i)) (HomologicalComplex.Hom.sqFrom f i).left\n                (HomologicalComplex.Hom.sqFrom f i).right\n                (_ :\n                  (Arrow.mk (HomologicalComplex.d X i (ComplexShape.next c i))).hom ≫\n                      (𝟭 A).map (HomologicalComplex.Hom.sqFrom f i).right =\n                    (𝟭 A).map (HomologicalComplex.Hom.sqFrom f i).left ≫\n                      (Arrow.mk (HomologicalComplex.d Y i (ComplexShape.next c i))).hom) ≫\n              (kernelSubobjectIso (HomologicalComplex.d Y i (ComplexShape.next c i))).inv) ≫\n          F.map\n            (cokernel.π\n              (imageToKernel (HomologicalComplex.dTo Y i) (HomologicalComplex.d Y i (ComplexShape.next c i))\n                (_ : HomologicalComplex.dTo Y i ≫ HomologicalComplex.dFrom Y i = 0))) =\n    (kernelSubobjectIso (F.map (HomologicalComplex.d X i (ComplexShape.next c i)))).hom ≫\n      (PreservesKernel.iso F (HomologicalComplex.d X i (ComplexShape.next c i))).inv ≫\n        F.map\n            (kernel.map (HomologicalComplex.d X i (ComplexShape.next c i))\n              (HomologicalComplex.d Y i (ComplexShape.next c i)) (HomologicalComplex.Hom.f f i)\n              (HomologicalComplex.Hom.f f (ComplexShape.next c i))\n              (_ :\n                HomologicalComplex.d X i (ComplexShape.next c i) ≫ HomologicalComplex.Hom.f f (ComplexShape.next c i) =\n                  HomologicalComplex.Hom.f f i ≫ HomologicalComplex.d Y i (ComplexShape.next c i))) ≫\n          F.map (kernelSubobjectIso (HomologicalComplex.d Y i (ComplexShape.next c i))).inv ≫\n            F.map\n              (cokernel.π\n                (imageToKernel (HomologicalComplex.dTo Y i) (HomologicalComplex.d Y i (ComplexShape.next c i))\n                  (_ : HomologicalComplex.dTo Y i ≫ HomologicalComplex.dFrom Y i = 0)))\n[PROOFSTEP]\nsimp\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Abelian.Homology", "llama_tokens": 61383, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8056321889812553, "lm_q2_score": 0.6584174938590246, "lm_q1q2_score": 0.5304423268411982}}
{"text": "[GOAL]\nM : Type ?u.4198\nN : Type ?u.4201\nα : Type ?u.4204\nβ : Type ?u.4214\ninst✝⁸ : MeasurableSpace M\ninst✝⁷ : MeasurableSpace N\ninst✝⁶ : MeasurableSpace α\nμ : Measure α\ninst✝⁵ : TopologicalSpace β\ninst✝⁴ : SMul M α\ninst✝³ : MeasurableSMul M α\ninst✝² : SMulInvariantMeasure M α μ\ninst✝¹ : SMul N β\ninst✝ : ContinuousConstSMul N β\n⊢ ∀ (m : Mᵈᵐᵃ) (n : N) (a : α →ₘ[μ] β), m • n • a = n • m • a\n[PROOFSTEP]\nrintro _ _ ⟨_⟩\n[GOAL]\ncase mk\nM : Type ?u.4198\nN : Type ?u.4201\nα : Type ?u.4204\nβ : Type ?u.4214\ninst✝⁸ : MeasurableSpace M\ninst✝⁷ : MeasurableSpace N\ninst✝⁶ : MeasurableSpace α\nμ : Measure α\ninst✝⁵ : TopologicalSpace β\ninst✝⁴ : SMul M α\ninst✝³ : MeasurableSMul M α\ninst✝² : SMulInvariantMeasure M α μ\ninst✝¹ : SMul N β\ninst✝ : ContinuousConstSMul N β\nm✝ : Mᵈᵐᵃ\nn✝ : N\na✝¹ : α →ₘ[μ] β\na✝ : { f // AEStronglyMeasurable f μ }\n⊢ m✝ • n✝ • Quot.mk Setoid.r a✝ = n✝ • m✝ • Quot.mk Setoid.r a✝\n[PROOFSTEP]\nrfl\n[GOAL]\nM : Type ?u.8732\nN : Type ?u.8735\nα : Type ?u.8738\nβ : Type ?u.8748\ninst✝⁸ : MeasurableSpace M\ninst✝⁷ : MeasurableSpace N\ninst✝⁶ : MeasurableSpace α\nμ : Measure α\ninst✝⁵ : TopologicalSpace β\ninst✝⁴ : SMul M α\ninst✝³ : MeasurableSMul M α\ninst✝² : SMulInvariantMeasure M α μ\ninst✝¹ : AddMonoid β\ninst✝ : ContinuousAdd β\n⊢ ∀ (a : Mᵈᵐᵃ) (x y : α →ₘ[μ] β), a • (x + y) = a • x + a • y\n[PROOFSTEP]\nrintro _ ⟨⟩ ⟨⟩\n[GOAL]\ncase mk.mk\nM : Type ?u.8732\nN : Type ?u.8735\nα : Type ?u.8738\nβ : Type ?u.8748\ninst✝⁸ : MeasurableSpace M\ninst✝⁷ : MeasurableSpace N\ninst✝⁶ : MeasurableSpace α\nμ : Measure α\ninst✝⁵ : TopologicalSpace β\ninst✝⁴ : SMul M α\ninst✝³ : MeasurableSMul M α\ninst✝² : SMulInvariantMeasure M α μ\ninst✝¹ : AddMonoid β\ninst✝ : ContinuousAdd β\na✝² : Mᵈᵐᵃ\nx✝ : α →ₘ[μ] β\na✝¹ : { f // AEStronglyMeasurable f μ }\ny✝ : α →ₘ[μ] β\na✝ : { f // AEStronglyMeasurable f μ }\n⊢ a✝² • (Quot.mk Setoid.r a✝¹ + Quot.mk Setoid.r a✝) = a✝² • Quot.mk Setoid.r a✝¹ + a✝² • Quot.mk Setoid.r a✝\n[PROOFSTEP]\nrfl\n[GOAL]\nM : Type ?u.19747\nN : Type ?u.19750\nα : Type ?u.19753\nβ : Type ?u.19763\ninst✝⁹ : MeasurableSpace M\ninst✝⁸ : MeasurableSpace N\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\ninst✝⁶ : TopologicalSpace β\ninst✝⁵ : Monoid M\ninst✝⁴ : MulAction M α\ninst✝³ : MeasurableSMul M α\ninst✝² : SMulInvariantMeasure M α μ\ninst✝¹ : Monoid β\ninst✝ : ContinuousMul β\n⊢ ∀ (r : Mᵈᵐᵃ) (x y : α →ₘ[μ] β), r • (x * y) = r • x * r • y\n[PROOFSTEP]\nrintro _ ⟨⟩ ⟨⟩\n[GOAL]\ncase mk.mk\nM : Type ?u.19747\nN : Type ?u.19750\nα : Type ?u.19753\nβ : Type ?u.19763\ninst✝⁹ : MeasurableSpace M\ninst✝⁸ : MeasurableSpace N\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\ninst✝⁶ : TopologicalSpace β\ninst✝⁵ : Monoid M\ninst✝⁴ : MulAction M α\ninst✝³ : MeasurableSMul M α\ninst✝² : SMulInvariantMeasure M α μ\ninst✝¹ : Monoid β\ninst✝ : ContinuousMul β\nr✝ : Mᵈᵐᵃ\nx✝ : α →ₘ[μ] β\na✝¹ : { f // AEStronglyMeasurable f μ }\ny✝ : α →ₘ[μ] β\na✝ : { f // AEStronglyMeasurable f μ }\n⊢ r✝ • (Quot.mk Setoid.r a✝¹ * Quot.mk Setoid.r a✝) = r✝ • Quot.mk Setoid.r a✝¹ * r✝ • Quot.mk Setoid.r a✝\n[PROOFSTEP]\nrfl\n", "meta": {"mathlib_filename": "Mathlib.MeasureTheory.Function.AEEqFun.DomAct", "llama_tokens": 1725, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.851952809486198, "lm_q2_score": 0.6224593312018545, "lm_q1q2_score": 0.5303059760083197}}
{"text": "[GOAL]\nE : Type u_1\ninst✝ : SeminormedGroup E\nε δ : ℝ\ns t : Set E\nx y : E\nhs : Bounded s\nht : Bounded t\n⊢ Bounded (s * t)\n[PROOFSTEP]\nobtain ⟨Rs, hRs⟩ : ∃ R, ∀ x ∈ s, ‖x‖ ≤ R := hs.exists_norm_le'\n[GOAL]\ncase intro\nE : Type u_1\ninst✝ : SeminormedGroup E\nε δ : ℝ\ns t : Set E\nx y : E\nhs : Bounded s\nht : Bounded t\nRs : ℝ\nhRs : ∀ (x : E), x ∈ s → ‖x‖ ≤ Rs\n⊢ Bounded (s * t)\n[PROOFSTEP]\nobtain ⟨Rt, hRt⟩ : ∃ R, ∀ x ∈ t, ‖x‖ ≤ R := ht.exists_norm_le'\n[GOAL]\ncase intro.intro\nE : Type u_1\ninst✝ : SeminormedGroup E\nε δ : ℝ\ns t : Set E\nx y : E\nhs : Bounded s\nht : Bounded t\nRs : ℝ\nhRs : ∀ (x : E), x ∈ s → ‖x‖ ≤ Rs\nRt : ℝ\nhRt : ∀ (x : E), x ∈ t → ‖x‖ ≤ Rt\n⊢ Bounded (s * t)\n[PROOFSTEP]\nrefine' bounded_iff_forall_norm_le'.2 ⟨Rs + Rt, _⟩\n[GOAL]\ncase intro.intro\nE : Type u_1\ninst✝ : SeminormedGroup E\nε δ : ℝ\ns t : Set E\nx y : E\nhs : Bounded s\nht : Bounded t\nRs : ℝ\nhRs : ∀ (x : E), x ∈ s → ‖x‖ ≤ Rs\nRt : ℝ\nhRt : ∀ (x : E), x ∈ t → ‖x‖ ≤ Rt\n⊢ ∀ (x : E), x ∈ s * t → ‖x‖ ≤ Rs + Rt\n[PROOFSTEP]\nrintro z ⟨x, y, hx, hy, rfl⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nE : Type u_1\ninst✝ : SeminormedGroup E\nε δ : ℝ\ns t : Set E\nx✝ y✝ : E\nhs : Bounded s\nht : Bounded t\nRs : ℝ\nhRs : ∀ (x : E), x ∈ s → ‖x‖ ≤ Rs\nRt : ℝ\nhRt : ∀ (x : E), x ∈ t → ‖x‖ ≤ Rt\nx y : E\nhx : x ∈ s\nhy : y ∈ t\n⊢ ‖(fun x x_1 => x * x_1) x y‖ ≤ Rs + Rt\n[PROOFSTEP]\nexact norm_mul_le_of_le (hRs x hx) (hRt y hy)\n[GOAL]\nE : Type u_1\ninst✝ : SeminormedGroup E\nε δ : ℝ\ns t : Set E\nx y : E\n⊢ Bounded s → Bounded s⁻¹\n[PROOFSTEP]\nsimp_rw [bounded_iff_forall_norm_le', ← image_inv, ball_image_iff, norm_inv']\n[GOAL]\nE : Type u_1\ninst✝ : SeminormedGroup E\nε δ : ℝ\ns t : Set E\nx y : E\n⊢ (∃ C, ∀ (x : E), x ∈ s → ‖x‖ ≤ C) → ∃ C, ∀ (x : E), x ∈ s → ‖x‖ ≤ C\n[PROOFSTEP]\nexact id\n[GOAL]\nE : Type u_1\ninst✝ : SeminormedCommGroup E\nε δ : ℝ\ns✝ t : Set E\nx✝ y x : E\ns : Set E\n⊢ infEdist x⁻¹ s⁻¹ = infEdist x s\n[PROOFSTEP]\nrw [← image_inv, infEdist_image isometry_inv]\n[GOAL]\nE : Type u_1\ninst✝ : SeminormedCommGroup E\nε δ : ℝ\ns✝ t : Set E\nx✝ y x : E\ns : Set E\n⊢ infEdist x⁻¹ s = infEdist x s⁻¹\n[PROOFSTEP]\nrw [← infEdist_inv_inv, inv_inv]\n[GOAL]\nE : Type u_1\ninst✝ : SeminormedCommGroup E\nε δ : ℝ\ns t : Set E\nx y : E\n⊢ (thickening δ s)⁻¹ = thickening δ s⁻¹\n[PROOFSTEP]\nsimp_rw [thickening, ← infEdist_inv]\n[GOAL]\nE : Type u_1\ninst✝ : SeminormedCommGroup E\nε δ : ℝ\ns t : Set E\nx y : E\n⊢ {x | EMetric.infEdist x s < ENNReal.ofReal δ}⁻¹ = {x | EMetric.infEdist x⁻¹ s < ENNReal.ofReal δ}\n[PROOFSTEP]\nrfl\n[GOAL]\nE : Type u_1\ninst✝ : SeminormedCommGroup E\nε δ : ℝ\ns t : Set E\nx y : E\n⊢ (cthickening δ s)⁻¹ = cthickening δ s⁻¹\n[PROOFSTEP]\nsimp_rw [cthickening, ← infEdist_inv]\n[GOAL]\nE : Type u_1\ninst✝ : SeminormedCommGroup E\nε δ : ℝ\ns t : Set E\nx y : E\n⊢ {x | EMetric.infEdist x s ≤ ENNReal.ofReal δ}⁻¹ = {x | EMetric.infEdist x⁻¹ s ≤ ENNReal.ofReal δ}\n[PROOFSTEP]\nrfl\n[GOAL]\nE : Type u_1\ninst✝ : SeminormedCommGroup E\nε δ : ℝ\ns t : Set E\nx y : E\n⊢ {x} * ball y δ = ball (x * y) δ\n[PROOFSTEP]\nsimp only [preimage_mul_ball, image_mul_left, singleton_mul, div_inv_eq_mul, mul_comm y x]\n[GOAL]\nE : Type u_1\ninst✝ : SeminormedCommGroup E\nε δ : ℝ\ns t : Set E\nx y : E\n⊢ {x} / ball y δ = ball (x / y) δ\n[PROOFSTEP]\nsimp_rw [div_eq_mul_inv, inv_ball, singleton_mul_ball]\n[GOAL]\nE : Type u_1\ninst✝ : SeminormedCommGroup E\nε δ : ℝ\ns t : Set E\nx y : E\n⊢ ball x δ * {y} = ball (x * y) δ\n[PROOFSTEP]\nrw [mul_comm, singleton_mul_ball, mul_comm y]\n[GOAL]\nE : Type u_1\ninst✝ : SeminormedCommGroup E\nε δ : ℝ\ns t : Set E\nx y : E\n⊢ ball x δ / {y} = ball (x / y) δ\n[PROOFSTEP]\nsimp_rw [div_eq_mul_inv, inv_singleton, ball_mul_singleton]\n[GOAL]\nE : Type u_1\ninst✝ : SeminormedCommGroup E\nε δ : ℝ\ns t : Set E\nx y : E\n⊢ {x} * ball 1 δ = ball x δ\n[PROOFSTEP]\nsimp\n[GOAL]\nE : Type u_1\ninst✝ : SeminormedCommGroup E\nε δ : ℝ\ns t : Set E\nx y : E\n⊢ {x} / ball 1 δ = ball x δ\n[PROOFSTEP]\nrw [singleton_div_ball, div_one]\n[GOAL]\nE : Type u_1\ninst✝ : SeminormedCommGroup E\nε δ : ℝ\ns t : Set E\nx y : E\n⊢ ball 1 δ * {x} = ball x δ\n[PROOFSTEP]\nsimp [ball_mul_singleton]\n[GOAL]\nE : Type u_1\ninst✝ : SeminormedCommGroup E\nε δ : ℝ\ns t : Set E\nx y : E\n⊢ ball 1 δ / {x} = ball x⁻¹ δ\n[PROOFSTEP]\nrw [ball_div_singleton, one_div]\n[GOAL]\nE : Type u_1\ninst✝ : SeminormedCommGroup E\nε δ : ℝ\ns t : Set E\nx y : E\n⊢ x • ball 1 δ = ball x δ\n[PROOFSTEP]\nrw [smul_ball, smul_eq_mul, mul_one]\n[GOAL]\nE : Type u_1\ninst✝ : SeminormedCommGroup E\nε δ : ℝ\ns t : Set E\nx y : E\n⊢ {x} * closedBall y δ = closedBall (x * y) δ\n[PROOFSTEP]\nsimp_rw [singleton_mul, ← smul_eq_mul, image_smul, smul_closedBall]\n[GOAL]\nE : Type u_1\ninst✝ : SeminormedCommGroup E\nε δ : ℝ\ns t : Set E\nx y : E\n⊢ {x} / closedBall y δ = closedBall (x / y) δ\n[PROOFSTEP]\nsimp_rw [div_eq_mul_inv, inv_closedBall, singleton_mul_closedBall]\n[GOAL]\nE : Type u_1\ninst✝ : SeminormedCommGroup E\nε δ : ℝ\ns t : Set E\nx y : E\n⊢ closedBall x δ * {y} = closedBall (x * y) δ\n[PROOFSTEP]\nsimp [mul_comm _ { y }, mul_comm y]\n[GOAL]\nE : Type u_1\ninst✝ : SeminormedCommGroup E\nε δ : ℝ\ns t : Set E\nx y : E\n⊢ closedBall x δ / {y} = closedBall (x / y) δ\n[PROOFSTEP]\nsimp [div_eq_mul_inv]\n[GOAL]\nE : Type u_1\ninst✝ : SeminormedCommGroup E\nε δ : ℝ\ns t : Set E\nx y : E\n⊢ {x} * closedBall 1 δ = closedBall x δ\n[PROOFSTEP]\nsimp\n[GOAL]\nE : Type u_1\ninst✝ : SeminormedCommGroup E\nε δ : ℝ\ns t : Set E\nx y : E\n⊢ {x} / closedBall 1 δ = closedBall x δ\n[PROOFSTEP]\nrw [singleton_div_closedBall, div_one]\n[GOAL]\nE : Type u_1\ninst✝ : SeminormedCommGroup E\nε δ : ℝ\ns t : Set E\nx y : E\n⊢ closedBall 1 δ * {x} = closedBall x δ\n[PROOFSTEP]\nsimp\n[GOAL]\nE : Type u_1\ninst✝ : SeminormedCommGroup E\nε δ : ℝ\ns t : Set E\nx y : E\n⊢ closedBall 1 δ / {x} = closedBall x⁻¹ δ\n[PROOFSTEP]\nsimp\n[GOAL]\nE : Type u_1\ninst✝ : SeminormedCommGroup E\nε δ : ℝ\ns t : Set E\nx y : E\n⊢ x • closedBall 1 δ = closedBall x δ\n[PROOFSTEP]\nsimp\n[GOAL]\nE : Type u_1\ninst✝ : SeminormedCommGroup E\nε δ : ℝ\ns t : Set E\nx y : E\n⊢ s * ball 1 δ = thickening δ s\n[PROOFSTEP]\nrw [thickening_eq_biUnion_ball]\n[GOAL]\nE : Type u_1\ninst✝ : SeminormedCommGroup E\nε δ : ℝ\ns t : Set E\nx y : E\n⊢ s * ball 1 δ = ⋃ (x : E) (_ : x ∈ s), ball x δ\n[PROOFSTEP]\nconvert iUnion₂_mul (fun x (_ : x ∈ s) => { x }) (ball (1 : E) δ)\n[GOAL]\ncase h.e'_2.h.e'_5\nE : Type u_1\ninst✝ : SeminormedCommGroup E\nε δ : ℝ\ns t : Set E\nx y : E\n⊢ s = ⋃ (i : E) (_ : i ∈ s), {i}\ncase h.e'_3.h.e'_3.h.f\nE : Type u_1\ninst✝ : SeminormedCommGroup E\nε δ : ℝ\ns t : Set E\nx y x✝¹ : E\nx✝ : x✝¹ ∈ s\n⊢ ball x✝¹ δ = {x✝¹} * ball 1 δ\n[PROOFSTEP]\nexact s.biUnion_of_singleton.symm\n[GOAL]\ncase h.e'_3.h.e'_3.h.f\nE : Type u_1\ninst✝ : SeminormedCommGroup E\nε δ : ℝ\ns t : Set E\nx y x✝¹ : E\nx✝ : x✝¹ ∈ s\n⊢ ball x✝¹ δ = {x✝¹} * ball 1 δ\n[PROOFSTEP]\next x\n[GOAL]\ncase h.e'_3.h.e'_3.h.f.h\nE : Type u_1\ninst✝ : SeminormedCommGroup E\nε δ : ℝ\ns t : Set E\nx✝² y x✝¹ : E\nx✝ : x✝¹ ∈ s\nx : E\n⊢ x ∈ ball x✝¹ δ ↔ x ∈ {x✝¹} * ball 1 δ\n[PROOFSTEP]\nsimp_rw [singleton_mul_ball, mul_one]\n[GOAL]\nE : Type u_1\ninst✝ : SeminormedCommGroup E\nε δ : ℝ\ns t : Set E\nx y : E\n⊢ s / ball 1 δ = thickening δ s\n[PROOFSTEP]\nsimp [div_eq_mul_inv, mul_ball_one]\n[GOAL]\nE : Type u_1\ninst✝ : SeminormedCommGroup E\nε δ : ℝ\ns t : Set E\nx y : E\n⊢ ball 1 δ * s = thickening δ s\n[PROOFSTEP]\nrw [mul_comm, mul_ball_one]\n[GOAL]\nE : Type u_1\ninst✝ : SeminormedCommGroup E\nε δ : ℝ\ns t : Set E\nx y : E\n⊢ ball 1 δ / s = thickening δ s⁻¹\n[PROOFSTEP]\nsimp [div_eq_mul_inv, ball_mul_one]\n[GOAL]\nE : Type u_1\ninst✝ : SeminormedCommGroup E\nε δ : ℝ\ns t : Set E\nx y : E\n⊢ s * ball x δ = x • thickening δ s\n[PROOFSTEP]\nrw [← smul_ball_one, mul_smul_comm, mul_ball_one]\n[GOAL]\nE : Type u_1\ninst✝ : SeminormedCommGroup E\nε δ : ℝ\ns t : Set E\nx y : E\n⊢ s / ball x δ = x⁻¹ • thickening δ s\n[PROOFSTEP]\nsimp [div_eq_mul_inv]\n[GOAL]\nE : Type u_1\ninst✝ : SeminormedCommGroup E\nε δ : ℝ\ns t : Set E\nx y : E\n⊢ ball x δ * s = x • thickening δ s\n[PROOFSTEP]\nrw [mul_comm, mul_ball]\n[GOAL]\nE : Type u_1\ninst✝ : SeminormedCommGroup E\nε δ : ℝ\ns t : Set E\nx y : E\n⊢ ball x δ / s = x • thickening δ s⁻¹\n[PROOFSTEP]\nsimp [div_eq_mul_inv]\n[GOAL]\nE : Type u_1\ninst✝ : SeminormedCommGroup E\nε δ : ℝ\ns t : Set E\nx y : E\nhs : IsCompact s\nhδ : 0 ≤ δ\n⊢ s * closedBall 1 δ = cthickening δ s\n[PROOFSTEP]\nrw [hs.cthickening_eq_biUnion_closedBall hδ]\n[GOAL]\nE : Type u_1\ninst✝ : SeminormedCommGroup E\nε δ : ℝ\ns t : Set E\nx y : E\nhs : IsCompact s\nhδ : 0 ≤ δ\n⊢ s * closedBall 1 δ = ⋃ (x : E) (_ : x ∈ s), closedBall x δ\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nE : Type u_1\ninst✝ : SeminormedCommGroup E\nε δ : ℝ\ns t : Set E\nx✝ y : E\nhs : IsCompact s\nhδ : 0 ≤ δ\nx : E\n⊢ x ∈ s * closedBall 1 δ ↔ x ∈ ⋃ (x : E) (_ : x ∈ s), closedBall x δ\n[PROOFSTEP]\nsimp only [mem_mul, dist_eq_norm_div, exists_prop, mem_iUnion, mem_closedBall, exists_and_left, mem_closedBall_one_iff,\n  ← eq_div_iff_mul_eq'', div_one, exists_eq_right]\n[GOAL]\nE : Type u_1\ninst✝ : SeminormedCommGroup E\nε δ : ℝ\ns t : Set E\nx y : E\nhs : IsCompact s\nhδ : 0 ≤ δ\n⊢ s / closedBall 1 δ = cthickening δ s\n[PROOFSTEP]\nsimp [div_eq_mul_inv, hs.mul_closedBall_one hδ]\n[GOAL]\nE : Type u_1\ninst✝ : SeminormedCommGroup E\nε δ : ℝ\ns t : Set E\nx y : E\nhs : IsCompact s\nhδ : 0 ≤ δ\n⊢ closedBall 1 δ * s = cthickening δ s\n[PROOFSTEP]\nrw [mul_comm, hs.mul_closedBall_one hδ]\n[GOAL]\nE : Type u_1\ninst✝ : SeminormedCommGroup E\nε δ : ℝ\ns t : Set E\nx y : E\nhs : IsCompact s\nhδ : 0 ≤ δ\n⊢ closedBall 1 δ / s = cthickening δ s⁻¹\n[PROOFSTEP]\nsimp [div_eq_mul_inv, mul_comm, hs.inv.mul_closedBall_one hδ]\n[GOAL]\nE : Type u_1\ninst✝ : SeminormedCommGroup E\nε δ : ℝ\ns t : Set E\nx✝ y : E\nhs : IsCompact s\nhδ : 0 ≤ δ\nx : E\n⊢ s * closedBall x δ = x • cthickening δ s\n[PROOFSTEP]\nrw [← smul_closedBall_one, mul_smul_comm, hs.mul_closedBall_one hδ]\n[GOAL]\nE : Type u_1\ninst✝ : SeminormedCommGroup E\nε δ : ℝ\ns t : Set E\nx✝ y : E\nhs : IsCompact s\nhδ : 0 ≤ δ\nx : E\n⊢ s / closedBall x δ = x⁻¹ • cthickening δ s\n[PROOFSTEP]\nsimp [div_eq_mul_inv, mul_comm, hs.mul_closedBall hδ]\n[GOAL]\nE : Type u_1\ninst✝ : SeminormedCommGroup E\nε δ : ℝ\ns t : Set E\nx✝ y : E\nhs : IsCompact s\nhδ : 0 ≤ δ\nx : E\n⊢ closedBall x δ * s = x • cthickening δ s\n[PROOFSTEP]\nrw [mul_comm, hs.mul_closedBall hδ]\n[GOAL]\nE : Type u_1\ninst✝ : SeminormedCommGroup E\nε δ : ℝ\ns t : Set E\nx✝ y : E\nhs : IsCompact s\nhδ : 0 ≤ δ\nx : E\n⊢ closedBall x δ * s = x • cthickening δ s\n[PROOFSTEP]\nsimp [div_eq_mul_inv, hs.closedBall_mul hδ]\n", "meta": {"mathlib_filename": "Mathlib.Analysis.Normed.Group.Pointwise", "llama_tokens": 5510, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7690802370707283, "lm_q2_score": 0.6893056295505783, "lm_q1q2_score": 0.5301313369889463}}
{"text": "[GOAL]\n⊢ riemannZeta 0 = -1 / 2\n[PROOFSTEP]\nrw [riemannZeta_def]\n[GOAL]\n⊢ Function.update (fun s => ↑π ^ (s / 2) * riemannCompletedZeta s / Complex.Gamma (s / 2)) 0 (-1 / 2) 0 = -1 / 2\n[PROOFSTEP]\nexact Function.update_same _ _ _\n[GOAL]\nt : ℝ\nht : 0 < t\n⊢ Summable fun n => rexp (-π * t * (↑n + 1) ^ 2)\n[PROOFSTEP]\nhave : 0 < (↑t * I).im := by rwa [ofReal_mul_im, I_im, mul_one]\n[GOAL]\nt : ℝ\nht : 0 < t\n⊢ 0 < (↑t * I).im\n[PROOFSTEP]\nrwa [ofReal_mul_im, I_im, mul_one]\n[GOAL]\nt : ℝ\nht : 0 < t\nthis : 0 < (↑t * I).im\n⊢ Summable fun n => rexp (-π * t * (↑n + 1) ^ 2)\n[PROOFSTEP]\nconvert summable_norm_iff.mpr (hasSum_nat_jacobiTheta this).summable using 1\n[GOAL]\ncase h.e'_5\nt : ℝ\nht : 0 < t\nthis : 0 < (↑t * I).im\n⊢ (fun n => rexp (-π * t * (↑n + 1) ^ 2)) = fun x => ‖cexp (↑π * I * (↑x + 1) ^ 2 * (↑t * I))‖\n[PROOFSTEP]\next1 n\n[GOAL]\ncase h.e'_5.h\nt : ℝ\nht : 0 < t\nthis : 0 < (↑t * I).im\nn : ℕ\n⊢ rexp (-π * t * (↑n + 1) ^ 2) = ‖cexp (↑π * I * (↑n + 1) ^ 2 * (↑t * I))‖\n[PROOFSTEP]\nrw [Complex.norm_eq_abs, Complex.abs_exp]\n[GOAL]\ncase h.e'_5.h\nt : ℝ\nht : 0 < t\nthis : 0 < (↑t * I).im\nn : ℕ\n⊢ rexp (-π * t * (↑n + 1) ^ 2) = rexp (↑π * I * (↑n + 1) ^ 2 * (↑t * I)).re\n[PROOFSTEP]\nrw [show ↑π * I * ((n : ℂ) + 1) ^ 2 * (↑t * I) = ((π * t * ((n : ℝ) + 1) ^ 2) : ℝ) * I ^ 2 by push_cast ; ring]\n[GOAL]\nt : ℝ\nht : 0 < t\nthis : 0 < (↑t * I).im\nn : ℕ\n⊢ ↑π * I * (↑n + 1) ^ 2 * (↑t * I) = ↑(π * t * (↑n + 1) ^ 2) * I ^ 2\n[PROOFSTEP]\npush_cast\n[GOAL]\nt : ℝ\nht : 0 < t\nthis : 0 < (↑t * I).im\nn : ℕ\n⊢ ↑π * I * (↑n + 1) ^ 2 * (↑t * I) = ↑π * ↑t * (↑n + 1) ^ 2 * I ^ 2\n[PROOFSTEP]\nring\n[GOAL]\ncase h.e'_5.h\nt : ℝ\nht : 0 < t\nthis : 0 < (↑t * I).im\nn : ℕ\n⊢ rexp (-π * t * (↑n + 1) ^ 2) = rexp (↑(π * t * (↑n + 1) ^ 2) * I ^ 2).re\n[PROOFSTEP]\nrw [I_sq, mul_neg_one, ← ofReal_neg, ofReal_re, neg_mul, neg_mul]\n[GOAL]\nt : ℝ\nht : 0 < t\n⊢ zetaKernel₁ t = (jacobiTheta (↑t * I) - 1) / 2\n[PROOFSTEP]\nrw [jacobiTheta_eq_tsum_nat ((mul_I_im t).symm ▸ ht : 0 < (↑t * I).im), add_comm, add_sub_cancel,\n  mul_div_cancel_left _ (two_ne_zero' ℂ), zetaKernel₁]\n[GOAL]\nt : ℝ\nht : 0 < t\n⊢ ∑' (n : ℕ), ↑(rexp (-π * t * (↑n + 1) ^ 2)) = ∑' (n : ℕ), cexp (↑π * I * (↑n + 1) ^ 2 * (↑t * I))\n[PROOFSTEP]\ncongr 1 with n : 1\n[GOAL]\ncase e_f.h\nt : ℝ\nht : 0 < t\nn : ℕ\n⊢ ↑(rexp (-π * t * (↑n + 1) ^ 2)) = cexp (↑π * I * (↑n + 1) ^ 2 * (↑t * I))\n[PROOFSTEP]\npush_cast\n[GOAL]\ncase e_f.h\nt : ℝ\nht : 0 < t\nn : ℕ\n⊢ cexp (-↑π * ↑t * (↑n + 1) ^ 2) = cexp (↑π * I * (↑n + 1) ^ 2 * (↑t * I))\n[PROOFSTEP]\nrw [(by ring : ↑π * I * ((n : ℂ) + 1) ^ 2 * (t * I) = I ^ 2 * π * t * ((n : ℂ) + 1) ^ 2), I_sq, neg_one_mul]\n[GOAL]\nt : ℝ\nht : 0 < t\nn : ℕ\n⊢ ↑π * I * (↑n + 1) ^ 2 * (↑t * I) = I ^ 2 * ↑π * ↑t * (↑n + 1) ^ 2\n[PROOFSTEP]\nring\n[GOAL]\nt : ℝ\nht : 0 < t\n⊢ ContinuousAt zetaKernel₁ t\n[PROOFSTEP]\nhave : ContinuousAt (fun u : ℝ => (jacobiTheta (u * I) - 1) / 2) t :=\n  by\n  refine' (ContinuousAt.sub _ continuousAt_const).div_const _\n  refine' (continuousAt_jacobiTheta _).comp (ContinuousAt.mul _ continuousAt_const)\n  · rwa [mul_I_im, ofReal_re]\n  · exact continuous_ofReal.continuousAt\n[GOAL]\nt : ℝ\nht : 0 < t\n⊢ ContinuousAt (fun u => (jacobiTheta (↑u * I) - 1) / 2) t\n[PROOFSTEP]\nrefine' (ContinuousAt.sub _ continuousAt_const).div_const _\n[GOAL]\nt : ℝ\nht : 0 < t\n⊢ ContinuousAt (fun u => jacobiTheta (↑u * I)) t\n[PROOFSTEP]\nrefine' (continuousAt_jacobiTheta _).comp (ContinuousAt.mul _ continuousAt_const)\n[GOAL]\ncase refine'_1\nt : ℝ\nht : 0 < t\n⊢ 0 < (↑t * I).im\n[PROOFSTEP]\nrwa [mul_I_im, ofReal_re]\n[GOAL]\ncase refine'_2\nt : ℝ\nht : 0 < t\n⊢ ContinuousAt (fun u => ↑u) t\n[PROOFSTEP]\nexact continuous_ofReal.continuousAt\n[GOAL]\nt : ℝ\nht : 0 < t\nthis : ContinuousAt (fun u => (jacobiTheta (↑u * I) - 1) / 2) t\n⊢ ContinuousAt zetaKernel₁ t\n[PROOFSTEP]\nrefine' this.congr (eventually_of_mem (Ioi_mem_nhds ht) fun u hu => _)\n[GOAL]\nt : ℝ\nht : 0 < t\nthis : ContinuousAt (fun u => (jacobiTheta (↑u * I) - 1) / 2) t\nu : ℝ\nhu : u ∈ Ioi 0\n⊢ (fun u => (jacobiTheta (↑u * I) - 1) / 2) u = zetaKernel₁ u\n[PROOFSTEP]\nrw [zetaKernel₁_eq_jacobiTheta hu]\n[GOAL]\n⊢ LocallyIntegrableOn zetaKernel₂ (Ioi 0)\n[PROOFSTEP]\nrefine (locallyIntegrableOn_iff (Or.inr isOpen_Ioi)).mpr fun k hk hk' => Integrable.add ?_ ?_\n[GOAL]\ncase refine_1\nk : Set ℝ\nhk : k ⊆ Ioi 0\nhk' : IsCompact k\n⊢ Integrable zetaKernel₁\n[PROOFSTEP]\nrefine ContinuousOn.integrableOn_compact hk' ?_\n[GOAL]\ncase refine_1\nk : Set ℝ\nhk : k ⊆ Ioi 0\nhk' : IsCompact k\n⊢ ContinuousOn zetaKernel₁ k\n[PROOFSTEP]\nexact ContinuousAt.continuousOn fun x hx => continuousAt_zetaKernel₁ (hk hx)\n[GOAL]\ncase refine_2\nk : Set ℝ\nhk : k ⊆ Ioi 0\nhk' : IsCompact k\n⊢ Integrable (indicator (Ioc 0 1) fun t => (1 - 1 / ↑(sqrt t)) / 2)\n[PROOFSTEP]\nrefine (integrable_indicator_iff measurableSet_Ioc).mpr ?_\n[GOAL]\ncase refine_2\nk : Set ℝ\nhk : k ⊆ Ioi 0\nhk' : IsCompact k\n⊢ IntegrableOn (fun t => (1 - 1 / ↑(sqrt t)) / 2) (Ioc 0 1)\n[PROOFSTEP]\nrw [IntegrableOn, Measure.restrict_restrict, ← IntegrableOn]\n[GOAL]\ncase refine_2\nk : Set ℝ\nhk : k ⊆ Ioi 0\nhk' : IsCompact k\n⊢ IntegrableOn (fun t => (1 - 1 / ↑(sqrt t)) / 2) (Ioc 0 1 ∩ k)\ncase refine_2 k : Set ℝ hk : k ⊆ Ioi 0 hk' : IsCompact k ⊢ MeasurableSet (Ioc 0 1)\n[PROOFSTEP]\nswap\n[GOAL]\ncase refine_2\nk : Set ℝ\nhk : k ⊆ Ioi 0\nhk' : IsCompact k\n⊢ MeasurableSet (Ioc 0 1)\n[PROOFSTEP]\nexact measurableSet_Ioc\n[GOAL]\ncase refine_2\nk : Set ℝ\nhk : k ⊆ Ioi 0\nhk' : IsCompact k\n⊢ IntegrableOn (fun t => (1 - 1 / ↑(sqrt t)) / 2) (Ioc 0 1 ∩ k)\n[PROOFSTEP]\napply ContinuousOn.integrableOn_compact\n[GOAL]\ncase refine_2.hK\nk : Set ℝ\nhk : k ⊆ Ioi 0\nhk' : IsCompact k\n⊢ IsCompact (Ioc 0 1 ∩ k)\n[PROOFSTEP]\nconvert (isCompact_Icc : IsCompact <| Icc (0 : ℝ) 1).inter hk' using 1\n[GOAL]\ncase h.e'_3\nk : Set ℝ\nhk : k ⊆ Ioi 0\nhk' : IsCompact k\n⊢ Ioc 0 1 ∩ k = Icc 0 1 ∩ k\n[PROOFSTEP]\nexact Set.ext fun t => ⟨fun h => ⟨Ioc_subset_Icc_self h.1, h.2⟩, fun h => ⟨⟨hk h.2, h.1.2⟩, h.2⟩⟩\n[GOAL]\ncase refine_2.hf\nk : Set ℝ\nhk : k ⊆ Ioi 0\nhk' : IsCompact k\n⊢ ContinuousOn (fun t => (1 - 1 / ↑(sqrt t)) / 2) (Ioc 0 1 ∩ k)\n[PROOFSTEP]\nrefine ContinuousOn.mono ?_ ((inter_subset_right _ _).trans hk)\n[GOAL]\ncase refine_2.hf\nk : Set ℝ\nhk : k ⊆ Ioi 0\nhk' : IsCompact k\n⊢ ContinuousOn (fun t => (1 - 1 / ↑(sqrt t)) / 2) (Ioi 0)\n[PROOFSTEP]\nrefine (continuousOn_const.sub ?_).div_const _\n[GOAL]\ncase refine_2.hf\nk : Set ℝ\nhk : k ⊆ Ioi 0\nhk' : IsCompact k\n⊢ ContinuousOn (fun t => 1 / ↑(sqrt t)) (Ioi 0)\n[PROOFSTEP]\nrefine ContinuousOn.div continuousOn_const ?_ fun x hx => ?_\n[GOAL]\ncase refine_2.hf.refine_1\nk : Set ℝ\nhk : k ⊆ Ioi 0\nhk' : IsCompact k\n⊢ ContinuousOn (fun t => ↑(sqrt t)) (Ioi 0)\n[PROOFSTEP]\nexact (continuous_ofReal.comp continuous_sqrt).continuousOn\n[GOAL]\ncase refine_2.hf.refine_2\nk : Set ℝ\nhk : k ⊆ Ioi 0\nhk' : IsCompact k\nx : ℝ\nhx : x ∈ Ioi 0\n⊢ ↑(sqrt x) ≠ 0\n[PROOFSTEP]\nexact ofReal_ne_zero.mpr (sqrt_ne_zero'.mpr hx)\n[GOAL]\nt : ℝ\nht : 0 < t\n⊢ zetaKernel₂ (1 / t) = ↑(sqrt t) * zetaKernel₂ t\n[PROOFSTEP]\nhave aux : ∀ {u : ℝ} (_ : 1 < u), zetaKernel₂ (1 / u) = sqrt u * zetaKernel₂ u :=\n  by\n  intro u hu\n  simp_rw [zetaKernel₂, Pi.add_apply]\n  rw [indicator_of_mem, indicator_of_not_mem (not_mem_Ioc_of_gt hu), add_zero]\n  swap; · exact ⟨one_div_pos.mpr (zero_lt_one.trans hu), (one_div u).symm ▸ inv_le_one hu.le⟩\n  rw [zetaKernel₁_eq_jacobiTheta (one_div_pos.mpr <| zero_lt_one.trans hu),\n    zetaKernel₁_eq_jacobiTheta (zero_lt_one.trans hu), ← add_div, ← mul_div_assoc, add_sub, sub_add_cancel,\n    sqrt_div zero_le_one, sqrt_one, one_div (sqrt _), ofReal_inv, ← one_div, one_div_one_div, mul_sub, mul_one]\n  congr 2\n  let τ : UpperHalfPlane := .mk (u * I) ((mul_I_im u).symm ▸ zero_lt_one.trans hu)\n  convert jacobiTheta_S_smul τ using 2\n  ·\n    rw [UpperHalfPlane.modular_S_smul, UpperHalfPlane.coe_mk, UpperHalfPlane.coe_mk, ← neg_inv, mul_inv, inv_I, mul_neg,\n      neg_neg, one_div, ofReal_inv]\n  · rw [UpperHalfPlane.coe_mk, mul_comm, mul_assoc, mul_neg, I_mul_I, neg_neg, mul_one, sqrt_eq_rpow,\n      ofReal_cpow (zero_lt_one.trans hu).le]\n    push_cast\n    rfl\n[GOAL]\nt : ℝ\nht : 0 < t\n⊢ ∀ {u : ℝ}, 1 < u → zetaKernel₂ (1 / u) = ↑(sqrt u) * zetaKernel₂ u\n[PROOFSTEP]\nintro u hu\n[GOAL]\nt : ℝ\nht : 0 < t\nu : ℝ\nhu : 1 < u\n⊢ zetaKernel₂ (1 / u) = ↑(sqrt u) * zetaKernel₂ u\n[PROOFSTEP]\nsimp_rw [zetaKernel₂, Pi.add_apply]\n[GOAL]\nt : ℝ\nht : 0 < t\nu : ℝ\nhu : 1 < u\n⊢ zetaKernel₁ (1 / u) + indicator (Ioc 0 1) (fun t => (1 - 1 / ↑(sqrt t)) / 2) (1 / u) =\n    ↑(sqrt u) * (zetaKernel₁ u + indicator (Ioc 0 1) (fun t => (1 - 1 / ↑(sqrt t)) / 2) u)\n[PROOFSTEP]\nrw [indicator_of_mem, indicator_of_not_mem (not_mem_Ioc_of_gt hu), add_zero]\n[GOAL]\nt : ℝ\nht : 0 < t\nu : ℝ\nhu : 1 < u\n⊢ zetaKernel₁ (1 / u) + (1 - 1 / ↑(sqrt (1 / u))) / 2 = ↑(sqrt u) * zetaKernel₁ u\ncase h t : ℝ ht : 0 < t u : ℝ hu : 1 < u ⊢ 1 / u ∈ Ioc 0 1\n[PROOFSTEP]\nswap\n[GOAL]\ncase h\nt : ℝ\nht : 0 < t\nu : ℝ\nhu : 1 < u\n⊢ 1 / u ∈ Ioc 0 1\n[PROOFSTEP]\nexact ⟨one_div_pos.mpr (zero_lt_one.trans hu), (one_div u).symm ▸ inv_le_one hu.le⟩\n[GOAL]\nt : ℝ\nht : 0 < t\nu : ℝ\nhu : 1 < u\n⊢ zetaKernel₁ (1 / u) + (1 - 1 / ↑(sqrt (1 / u))) / 2 = ↑(sqrt u) * zetaKernel₁ u\n[PROOFSTEP]\nrw [zetaKernel₁_eq_jacobiTheta (one_div_pos.mpr <| zero_lt_one.trans hu),\n  zetaKernel₁_eq_jacobiTheta (zero_lt_one.trans hu), ← add_div, ← mul_div_assoc, add_sub, sub_add_cancel,\n  sqrt_div zero_le_one, sqrt_one, one_div (sqrt _), ofReal_inv, ← one_div, one_div_one_div, mul_sub, mul_one]\n[GOAL]\nt : ℝ\nht : 0 < t\nu : ℝ\nhu : 1 < u\n⊢ (jacobiTheta (↑(1 / u) * I) - ↑(sqrt u)) / 2 = (↑(sqrt u) * jacobiTheta (↑u * I) - ↑(sqrt u)) / 2\n[PROOFSTEP]\ncongr 2\n[GOAL]\ncase e_a.e_a\nt : ℝ\nht : 0 < t\nu : ℝ\nhu : 1 < u\n⊢ jacobiTheta (↑(1 / u) * I) = ↑(sqrt u) * jacobiTheta (↑u * I)\n[PROOFSTEP]\nlet τ : UpperHalfPlane := .mk (u * I) ((mul_I_im u).symm ▸ zero_lt_one.trans hu)\n[GOAL]\ncase e_a.e_a\nt : ℝ\nht : 0 < t\nu : ℝ\nhu : 1 < u\nτ : UpperHalfPlane := UpperHalfPlane.mk (↑u * I) (_ : 0 < (↑u * I).im)\n⊢ jacobiTheta (↑(1 / u) * I) = ↑(sqrt u) * jacobiTheta (↑u * I)\n[PROOFSTEP]\nconvert jacobiTheta_S_smul τ using 2\n[GOAL]\ncase h.e'_2.h.e'_1\nt : ℝ\nht : 0 < t\nu : ℝ\nhu : 1 < u\nτ : UpperHalfPlane := UpperHalfPlane.mk (↑u * I) (_ : 0 < (↑u * I).im)\n⊢ ↑(1 / u) * I = ↑(ModularGroup.S • τ)\n[PROOFSTEP]\nrw [UpperHalfPlane.modular_S_smul, UpperHalfPlane.coe_mk, UpperHalfPlane.coe_mk, ← neg_inv, mul_inv, inv_I, mul_neg,\n  neg_neg, one_div, ofReal_inv]\n[GOAL]\ncase h.e'_3.h.e'_5\nt : ℝ\nht : 0 < t\nu : ℝ\nhu : 1 < u\nτ : UpperHalfPlane := UpperHalfPlane.mk (↑u * I) (_ : 0 < (↑u * I).im)\n⊢ ↑(sqrt u) = (-I * ↑τ) ^ (1 / 2)\n[PROOFSTEP]\nrw [UpperHalfPlane.coe_mk, mul_comm, mul_assoc, mul_neg, I_mul_I, neg_neg, mul_one, sqrt_eq_rpow,\n  ofReal_cpow (zero_lt_one.trans hu).le]\n[GOAL]\ncase h.e'_3.h.e'_5\nt : ℝ\nht : 0 < t\nu : ℝ\nhu : 1 < u\nτ : UpperHalfPlane := UpperHalfPlane.mk (↑u * I) (_ : 0 < (↑u * I).im)\n⊢ ↑u ^ ↑(1 / 2) = ↑u ^ (1 / 2)\n[PROOFSTEP]\npush_cast\n[GOAL]\ncase h.e'_3.h.e'_5\nt : ℝ\nht : 0 < t\nu : ℝ\nhu : 1 < u\nτ : UpperHalfPlane := UpperHalfPlane.mk (↑u * I) (_ : 0 < (↑u * I).im)\n⊢ ↑u ^ (1 / 2) = ↑u ^ (1 / 2)\n[PROOFSTEP]\nrfl\n[GOAL]\nt : ℝ\nht : 0 < t\naux : ∀ {u : ℝ}, 1 < u → zetaKernel₂ (1 / u) = ↑(sqrt u) * zetaKernel₂ u\n⊢ zetaKernel₂ (1 / t) = ↑(sqrt t) * zetaKernel₂ t\n[PROOFSTEP]\nrcases lt_trichotomy 1 t with (h | h | h)\n[GOAL]\ncase inl\nt : ℝ\nht : 0 < t\naux : ∀ {u : ℝ}, 1 < u → zetaKernel₂ (1 / u) = ↑(sqrt u) * zetaKernel₂ u\nh : 1 < t\n⊢ zetaKernel₂ (1 / t) = ↑(sqrt t) * zetaKernel₂ t\n[PROOFSTEP]\nexact aux h\n[GOAL]\ncase inr.inl\nt : ℝ\nht : 0 < t\naux : ∀ {u : ℝ}, 1 < u → zetaKernel₂ (1 / u) = ↑(sqrt u) * zetaKernel₂ u\nh : 1 = t\n⊢ zetaKernel₂ (1 / t) = ↑(sqrt t) * zetaKernel₂ t\n[PROOFSTEP]\nsimp only [← h, div_self, Ne.def, one_ne_zero, not_false_iff, sqrt_one, ofReal_one, one_mul]\n[GOAL]\ncase inr.inr\nt : ℝ\nht : 0 < t\naux : ∀ {u : ℝ}, 1 < u → zetaKernel₂ (1 / u) = ↑(sqrt u) * zetaKernel₂ u\nh : t < 1\n⊢ zetaKernel₂ (1 / t) = ↑(sqrt t) * zetaKernel₂ t\n[PROOFSTEP]\nhave := aux (show 1 < 1 / t by rwa [lt_one_div (zero_lt_one' ℝ) ht, div_one])\n[GOAL]\nt : ℝ\nht : 0 < t\naux : ∀ {u : ℝ}, 1 < u → zetaKernel₂ (1 / u) = ↑(sqrt u) * zetaKernel₂ u\nh : t < 1\n⊢ 1 < 1 / t\n[PROOFSTEP]\nrwa [lt_one_div (zero_lt_one' ℝ) ht, div_one]\n[GOAL]\ncase inr.inr\nt : ℝ\nht : 0 < t\naux : ∀ {u : ℝ}, 1 < u → zetaKernel₂ (1 / u) = ↑(sqrt u) * zetaKernel₂ u\nh : t < 1\nthis : zetaKernel₂ (1 / (1 / t)) = ↑(sqrt (1 / t)) * zetaKernel₂ (1 / t)\n⊢ zetaKernel₂ (1 / t) = ↑(sqrt t) * zetaKernel₂ t\n[PROOFSTEP]\nrw [one_div_one_div] at this \n[GOAL]\ncase inr.inr\nt : ℝ\nht : 0 < t\naux : ∀ {u : ℝ}, 1 < u → zetaKernel₂ (1 / u) = ↑(sqrt u) * zetaKernel₂ u\nh : t < 1\nthis : zetaKernel₂ t = ↑(sqrt (1 / t)) * zetaKernel₂ (1 / t)\n⊢ zetaKernel₂ (1 / t) = ↑(sqrt t) * zetaKernel₂ t\n[PROOFSTEP]\nrw [this, ← mul_assoc, ← ofReal_mul, ← sqrt_mul ht.le, mul_one_div_cancel ht.ne', sqrt_one, ofReal_one, one_mul]\n[GOAL]\n⊢ zetaKernel₁ =O[atTop] fun t => rexp (-π * t)\n[PROOFSTEP]\nhave h := isBigO_at_im_infty_jacobiTheta_sub_one.const_mul_left (1 / 2)\n[GOAL]\nh : (fun x => 1 / 2 * (jacobiTheta x - 1)) =O[comap im atTop] fun τ => rexp (-π * τ.im)\n⊢ zetaKernel₁ =O[atTop] fun t => rexp (-π * t)\n[PROOFSTEP]\nsimp_rw [mul_comm (1 / 2 : ℂ) _, mul_one_div] at h \n[GOAL]\nh : (fun x => (jacobiTheta x - 1) / 2) =O[comap im atTop] fun τ => rexp (-π * τ.im)\n⊢ zetaKernel₁ =O[atTop] fun t => rexp (-π * t)\n[PROOFSTEP]\nhave h' : Tendsto (fun t : ℝ => ↑t * I) atTop (comap im atTop) :=\n  by\n  rw [tendsto_comap_iff]\n  convert tendsto_id\n  ext1 t\n  rw [Function.comp_apply, mul_I_im, ofReal_re, id.def]\n[GOAL]\nh : (fun x => (jacobiTheta x - 1) / 2) =O[comap im atTop] fun τ => rexp (-π * τ.im)\n⊢ Tendsto (fun t => ↑t * I) atTop (comap im atTop)\n[PROOFSTEP]\nrw [tendsto_comap_iff]\n[GOAL]\nh : (fun x => (jacobiTheta x - 1) / 2) =O[comap im atTop] fun τ => rexp (-π * τ.im)\n⊢ Tendsto (im ∘ fun t => ↑t * I) atTop atTop\n[PROOFSTEP]\nconvert tendsto_id\n[GOAL]\ncase h.e'_3\nh : (fun x => (jacobiTheta x - 1) / 2) =O[comap im atTop] fun τ => rexp (-π * τ.im)\n⊢ (im ∘ fun t => ↑t * I) = id\n[PROOFSTEP]\next1 t\n[GOAL]\ncase h.e'_3.h\nh : (fun x => (jacobiTheta x - 1) / 2) =O[comap im atTop] fun τ => rexp (-π * τ.im)\nt : ℝ\n⊢ (im ∘ fun t => ↑t * I) t = id t\n[PROOFSTEP]\nrw [Function.comp_apply, mul_I_im, ofReal_re, id.def]\n[GOAL]\nh : (fun x => (jacobiTheta x - 1) / 2) =O[comap im atTop] fun τ => rexp (-π * τ.im)\nh' : Tendsto (fun t => ↑t * I) atTop (comap im atTop)\n⊢ zetaKernel₁ =O[atTop] fun t => rexp (-π * t)\n[PROOFSTEP]\nconvert\n  ((h.norm_left.comp_tendsto h').congr' (eventually_of_mem (Ioi_mem_atTop 0) fun t ht => _)\n        (eventually_of_mem (Ioi_mem_atTop 0) fun t _ => _)).of_norm_left\n    (E' := ℂ)\n[GOAL]\ncase convert_1\nh : (fun x => (jacobiTheta x - 1) / 2) =O[comap im atTop] fun τ => rexp (-π * τ.im)\nh' : Tendsto (fun t => ↑t * I) atTop (comap im atTop)\nt : ℝ\nht : t ∈ Ioi 0\n⊢ ((fun x => ‖(jacobiTheta x - 1) / 2‖) ∘ fun t => ↑t * I) t = ‖zetaKernel₁ t‖\n[PROOFSTEP]\nrw [Function.comp_apply, ← zetaKernel₁_eq_jacobiTheta ht]\n[GOAL]\ncase convert_2\nh : (fun x => (jacobiTheta x - 1) / 2) =O[comap im atTop] fun τ => rexp (-π * τ.im)\nh' : Tendsto (fun t => ↑t * I) atTop (comap im atTop)\nt : ℝ\nx✝ : t ∈ Ioi 0\n⊢ ((fun τ => rexp (-π * τ.im)) ∘ fun t => ↑t * I) t = rexp (-π * t)\n[PROOFSTEP]\nrw [Function.comp_apply, mul_I_im, ofReal_re]\n[GOAL]\n⊢ zetaKernel₂ =O[atTop] fun t => rexp (-π * t)\n[PROOFSTEP]\nrefine' (eventuallyEq_of_mem (Ioi_mem_atTop (1 : ℝ)) fun t ht => _).trans_isBigO isBigO_atTop_zetaKernel₁\n[GOAL]\nt : ℝ\nht : t ∈ Ioi 1\n⊢ zetaKernel₂ t = zetaKernel₁ t\n[PROOFSTEP]\nrw [zetaKernel₂, Pi.add_apply, indicator_of_not_mem (not_mem_Ioc_of_gt (Set.mem_Iio.mp ht)), add_zero]\n[GOAL]\n⊢ zetaKernel₂ =O[𝓝[Ioi 0] 0] fun t => rexp (-π / t) / sqrt t\n[PROOFSTEP]\nhave h1 := isBigO_atTop_zetaKernel₂.comp_tendsto tendsto_inv_zero_atTop\n[GOAL]\nh1 : (zetaKernel₂ ∘ fun x => x⁻¹) =O[𝓝[Ioi 0] 0] ((fun t => rexp (-π * t)) ∘ fun x => x⁻¹)\n⊢ zetaKernel₂ =O[𝓝[Ioi 0] 0] fun t => rexp (-π / t) / sqrt t\n[PROOFSTEP]\nsimp_rw [← one_div] at h1 \n[GOAL]\nh1 : (zetaKernel₂ ∘ fun x => 1 / x) =O[𝓝[Ioi 0] 0] ((fun t => rexp (-π * t)) ∘ fun x => 1 / x)\n⊢ zetaKernel₂ =O[𝓝[Ioi 0] 0] fun t => rexp (-π / t) / sqrt t\n[PROOFSTEP]\nhave h2 : zetaKernel₂ ∘ Div.div 1 =ᶠ[𝓝[>] 0] fun t => sqrt t * zetaKernel₂ t :=\n  eventually_of_mem self_mem_nhdsWithin fun t ht => by dsimp only; rw [← zetaKernel₂_one_div ht]; rfl\n[GOAL]\nh1 : (zetaKernel₂ ∘ fun x => 1 / x) =O[𝓝[Ioi 0] 0] ((fun t => rexp (-π * t)) ∘ fun x => 1 / x)\nt : ℝ\nht : t ∈ Ioi 0\n⊢ (zetaKernel₂ ∘ Div.div 1) t = (fun t => ↑(sqrt t) * zetaKernel₂ t) t\n[PROOFSTEP]\ndsimp only\n[GOAL]\nh1 : (zetaKernel₂ ∘ fun x => 1 / x) =O[𝓝[Ioi 0] 0] ((fun t => rexp (-π * t)) ∘ fun x => 1 / x)\nt : ℝ\nht : t ∈ Ioi 0\n⊢ (zetaKernel₂ ∘ Div.div 1) t = ↑(sqrt t) * zetaKernel₂ t\n[PROOFSTEP]\nrw [← zetaKernel₂_one_div ht]\n[GOAL]\nh1 : (zetaKernel₂ ∘ fun x => 1 / x) =O[𝓝[Ioi 0] 0] ((fun t => rexp (-π * t)) ∘ fun x => 1 / x)\nt : ℝ\nht : t ∈ Ioi 0\n⊢ (zetaKernel₂ ∘ Div.div 1) t = zetaKernel₂ (1 / t)\n[PROOFSTEP]\nrfl\n[GOAL]\nh1 : (zetaKernel₂ ∘ fun x => 1 / x) =O[𝓝[Ioi 0] 0] ((fun t => rexp (-π * t)) ∘ fun x => 1 / x)\nh2 : zetaKernel₂ ∘ Div.div 1 =ᶠ[𝓝[Ioi 0] 0] fun t => ↑(sqrt t) * zetaKernel₂ t\n⊢ zetaKernel₂ =O[𝓝[Ioi 0] 0] fun t => rexp (-π / t) / sqrt t\n[PROOFSTEP]\nhave h3 := h1.congr' h2 (EventuallyEq.refl _ _)\n[GOAL]\nh1 : (zetaKernel₂ ∘ fun x => 1 / x) =O[𝓝[Ioi 0] 0] ((fun t => rexp (-π * t)) ∘ fun x => 1 / x)\nh2 : zetaKernel₂ ∘ Div.div 1 =ᶠ[𝓝[Ioi 0] 0] fun t => ↑(sqrt t) * zetaKernel₂ t\nh3 : (fun t => ↑(sqrt t) * zetaKernel₂ t) =O[𝓝[Ioi 0] 0] ((fun t => rexp (-π * t)) ∘ fun x => 1 / x)\n⊢ zetaKernel₂ =O[𝓝[Ioi 0] 0] fun t => rexp (-π / t) / sqrt t\n[PROOFSTEP]\nhave h4 := h3.mul (isBigO_refl (fun t : ℝ => 1 / (sqrt t : ℂ)) (𝓝[>] 0)).norm_right\n[GOAL]\nh1 : (zetaKernel₂ ∘ fun x => 1 / x) =O[𝓝[Ioi 0] 0] ((fun t => rexp (-π * t)) ∘ fun x => 1 / x)\nh2 : zetaKernel₂ ∘ Div.div 1 =ᶠ[𝓝[Ioi 0] 0] fun t => ↑(sqrt t) * zetaKernel₂ t\nh3 : (fun t => ↑(sqrt t) * zetaKernel₂ t) =O[𝓝[Ioi 0] 0] ((fun t => rexp (-π * t)) ∘ fun x => 1 / x)\nh4 :\n  (fun x => ↑(sqrt x) * zetaKernel₂ x * (1 / ↑(sqrt x))) =O[𝓝[Ioi 0] 0] fun x =>\n    ((fun t => rexp (-π * t)) ∘ fun x => 1 / x) x * ‖1 / ↑(sqrt x)‖\n⊢ zetaKernel₂ =O[𝓝[Ioi 0] 0] fun t => rexp (-π / t) / sqrt t\n[PROOFSTEP]\nrefine h4.congr' ?_ ?_\n[GOAL]\ncase refine_1\nh1 : (zetaKernel₂ ∘ fun x => 1 / x) =O[𝓝[Ioi 0] 0] ((fun t => rexp (-π * t)) ∘ fun x => 1 / x)\nh2 : zetaKernel₂ ∘ Div.div 1 =ᶠ[𝓝[Ioi 0] 0] fun t => ↑(sqrt t) * zetaKernel₂ t\nh3 : (fun t => ↑(sqrt t) * zetaKernel₂ t) =O[𝓝[Ioi 0] 0] ((fun t => rexp (-π * t)) ∘ fun x => 1 / x)\nh4 :\n  (fun x => ↑(sqrt x) * zetaKernel₂ x * (1 / ↑(sqrt x))) =O[𝓝[Ioi 0] 0] fun x =>\n    ((fun t => rexp (-π * t)) ∘ fun x => 1 / x) x * ‖1 / ↑(sqrt x)‖\n⊢ (fun x => ↑(sqrt x) * zetaKernel₂ x * (1 / ↑(sqrt x))) =ᶠ[𝓝[Ioi 0] 0] zetaKernel₂\n[PROOFSTEP]\nrefine eventually_of_mem self_mem_nhdsWithin fun x hx => ?_\n[GOAL]\ncase refine_1\nh1 : (zetaKernel₂ ∘ fun x => 1 / x) =O[𝓝[Ioi 0] 0] ((fun t => rexp (-π * t)) ∘ fun x => 1 / x)\nh2 : zetaKernel₂ ∘ Div.div 1 =ᶠ[𝓝[Ioi 0] 0] fun t => ↑(sqrt t) * zetaKernel₂ t\nh3 : (fun t => ↑(sqrt t) * zetaKernel₂ t) =O[𝓝[Ioi 0] 0] ((fun t => rexp (-π * t)) ∘ fun x => 1 / x)\nh4 :\n  (fun x => ↑(sqrt x) * zetaKernel₂ x * (1 / ↑(sqrt x))) =O[𝓝[Ioi 0] 0] fun x =>\n    ((fun t => rexp (-π * t)) ∘ fun x => 1 / x) x * ‖1 / ↑(sqrt x)‖\nx : ℝ\nhx : x ∈ Ioi 0\n⊢ (fun x => ↑(sqrt x) * zetaKernel₂ x * (1 / ↑(sqrt x))) x = zetaKernel₂ x\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase refine_1\nh1 : (zetaKernel₂ ∘ fun x => 1 / x) =O[𝓝[Ioi 0] 0] ((fun t => rexp (-π * t)) ∘ fun x => 1 / x)\nh2 : zetaKernel₂ ∘ Div.div 1 =ᶠ[𝓝[Ioi 0] 0] fun t => ↑(sqrt t) * zetaKernel₂ t\nh3 : (fun t => ↑(sqrt t) * zetaKernel₂ t) =O[𝓝[Ioi 0] 0] ((fun t => rexp (-π * t)) ∘ fun x => 1 / x)\nh4 :\n  (fun x => ↑(sqrt x) * zetaKernel₂ x * (1 / ↑(sqrt x))) =O[𝓝[Ioi 0] 0] fun x =>\n    ((fun t => rexp (-π * t)) ∘ fun x => 1 / x) x * ‖1 / ↑(sqrt x)‖\nx : ℝ\nhx : x ∈ Ioi 0\n⊢ ↑(sqrt x) * zetaKernel₂ x * (1 / ↑(sqrt x)) = zetaKernel₂ x\n[PROOFSTEP]\nrw [mul_comm, ← mul_assoc, one_div_mul_cancel, one_mul]\n[GOAL]\ncase refine_1\nh1 : (zetaKernel₂ ∘ fun x => 1 / x) =O[𝓝[Ioi 0] 0] ((fun t => rexp (-π * t)) ∘ fun x => 1 / x)\nh2 : zetaKernel₂ ∘ Div.div 1 =ᶠ[𝓝[Ioi 0] 0] fun t => ↑(sqrt t) * zetaKernel₂ t\nh3 : (fun t => ↑(sqrt t) * zetaKernel₂ t) =O[𝓝[Ioi 0] 0] ((fun t => rexp (-π * t)) ∘ fun x => 1 / x)\nh4 :\n  (fun x => ↑(sqrt x) * zetaKernel₂ x * (1 / ↑(sqrt x))) =O[𝓝[Ioi 0] 0] fun x =>\n    ((fun t => rexp (-π * t)) ∘ fun x => 1 / x) x * ‖1 / ↑(sqrt x)‖\nx : ℝ\nhx : x ∈ Ioi 0\n⊢ ↑(sqrt x) ≠ 0\n[PROOFSTEP]\nexact ofReal_ne_zero.mpr ((sqrt_ne_zero <| le_of_lt hx).mpr (ne_of_gt hx))\n[GOAL]\ncase refine_2\nh1 : (zetaKernel₂ ∘ fun x => 1 / x) =O[𝓝[Ioi 0] 0] ((fun t => rexp (-π * t)) ∘ fun x => 1 / x)\nh2 : zetaKernel₂ ∘ Div.div 1 =ᶠ[𝓝[Ioi 0] 0] fun t => ↑(sqrt t) * zetaKernel₂ t\nh3 : (fun t => ↑(sqrt t) * zetaKernel₂ t) =O[𝓝[Ioi 0] 0] ((fun t => rexp (-π * t)) ∘ fun x => 1 / x)\nh4 :\n  (fun x => ↑(sqrt x) * zetaKernel₂ x * (1 / ↑(sqrt x))) =O[𝓝[Ioi 0] 0] fun x =>\n    ((fun t => rexp (-π * t)) ∘ fun x => 1 / x) x * ‖1 / ↑(sqrt x)‖\n⊢ (fun x => ((fun t => rexp (-π * t)) ∘ fun x => 1 / x) x * ‖1 / ↑(sqrt x)‖) =ᶠ[𝓝[Ioi 0] 0] fun t =>\n    rexp (-π / t) / sqrt t\n[PROOFSTEP]\nrefine eventually_of_mem self_mem_nhdsWithin fun x _ => ?_\n[GOAL]\ncase refine_2\nh1 : (zetaKernel₂ ∘ fun x => 1 / x) =O[𝓝[Ioi 0] 0] ((fun t => rexp (-π * t)) ∘ fun x => 1 / x)\nh2 : zetaKernel₂ ∘ Div.div 1 =ᶠ[𝓝[Ioi 0] 0] fun t => ↑(sqrt t) * zetaKernel₂ t\nh3 : (fun t => ↑(sqrt t) * zetaKernel₂ t) =O[𝓝[Ioi 0] 0] ((fun t => rexp (-π * t)) ∘ fun x => 1 / x)\nh4 :\n  (fun x => ↑(sqrt x) * zetaKernel₂ x * (1 / ↑(sqrt x))) =O[𝓝[Ioi 0] 0] fun x =>\n    ((fun t => rexp (-π * t)) ∘ fun x => 1 / x) x * ‖1 / ↑(sqrt x)‖\nx : ℝ\nx✝ : x ∈ Ioi 0\n⊢ (fun x => ((fun t => rexp (-π * t)) ∘ fun x => 1 / x) x * ‖1 / ↑(sqrt x)‖) x = (fun t => rexp (-π / t) / sqrt t) x\n[PROOFSTEP]\ndsimp only\n[GOAL]\ncase refine_2\nh1 : (zetaKernel₂ ∘ fun x => 1 / x) =O[𝓝[Ioi 0] 0] ((fun t => rexp (-π * t)) ∘ fun x => 1 / x)\nh2 : zetaKernel₂ ∘ Div.div 1 =ᶠ[𝓝[Ioi 0] 0] fun t => ↑(sqrt t) * zetaKernel₂ t\nh3 : (fun t => ↑(sqrt t) * zetaKernel₂ t) =O[𝓝[Ioi 0] 0] ((fun t => rexp (-π * t)) ∘ fun x => 1 / x)\nh4 :\n  (fun x => ↑(sqrt x) * zetaKernel₂ x * (1 / ↑(sqrt x))) =O[𝓝[Ioi 0] 0] fun x =>\n    ((fun t => rexp (-π * t)) ∘ fun x => 1 / x) x * ‖1 / ↑(sqrt x)‖\nx : ℝ\nx✝ : x ∈ Ioi 0\n⊢ ((fun t => rexp (-π * t)) ∘ fun x => 1 / x) x * ‖1 / ↑(sqrt x)‖ = rexp (-π / x) / sqrt x\n[PROOFSTEP]\nrw [Function.comp_apply, mul_one_div, one_div (sqrt x : ℂ), norm_inv, Complex.norm_eq_abs, abs_ofReal,\n  abs_of_nonneg (sqrt_nonneg _), ← div_eq_mul_inv]\n[GOAL]\na : ℝ\n⊢ zetaKernel₂ =O[𝓝[Ioi 0] 0] fun t => t ^ a\n[PROOFSTEP]\nhave aux1 : IsBigO atTop (fun t => exp (-π * t)) fun t => t ^ (-a - 1 / 2) :=\n  (isLittleO_exp_neg_mul_rpow_atTop pi_pos _).isBigO\n[GOAL]\na : ℝ\naux1 : (fun t => rexp (-π * t)) =O[atTop] fun t => t ^ (-a - 1 / 2)\n⊢ zetaKernel₂ =O[𝓝[Ioi 0] 0] fun t => t ^ a\n[PROOFSTEP]\nhave aux2 : IsBigO atTop (fun t => exp (-π * t) * sqrt t) fun t => t ^ (-a) :=\n  by\n  refine (aux1.mul (isBigO_refl sqrt _)).congr' (EventuallyEq.refl _ _) ?_\n  refine (eventually_gt_atTop 0).mp (eventually_of_forall fun t ht => ?_)\n  simp_rw [sqrt_eq_rpow, ← rpow_add ht, sub_add_cancel]\n[GOAL]\na : ℝ\naux1 : (fun t => rexp (-π * t)) =O[atTop] fun t => t ^ (-a - 1 / 2)\n⊢ (fun t => rexp (-π * t) * sqrt t) =O[atTop] fun t => t ^ (-a)\n[PROOFSTEP]\nrefine (aux1.mul (isBigO_refl sqrt _)).congr' (EventuallyEq.refl _ _) ?_\n[GOAL]\na : ℝ\naux1 : (fun t => rexp (-π * t)) =O[atTop] fun t => t ^ (-a - 1 / 2)\n⊢ (fun x => x ^ (-a - 1 / 2) * sqrt x) =ᶠ[atTop] fun t => t ^ (-a)\n[PROOFSTEP]\nrefine (eventually_gt_atTop 0).mp (eventually_of_forall fun t ht => ?_)\n[GOAL]\na : ℝ\naux1 : (fun t => rexp (-π * t)) =O[atTop] fun t => t ^ (-a - 1 / 2)\nt : ℝ\nht : 0 < t\n⊢ (fun x => x ^ (-a - 1 / 2) * sqrt x) t = (fun t => t ^ (-a)) t\n[PROOFSTEP]\nsimp_rw [sqrt_eq_rpow, ← rpow_add ht, sub_add_cancel]\n[GOAL]\na : ℝ\naux1 : (fun t => rexp (-π * t)) =O[atTop] fun t => t ^ (-a - 1 / 2)\naux2 : (fun t => rexp (-π * t) * sqrt t) =O[atTop] fun t => t ^ (-a)\n⊢ zetaKernel₂ =O[𝓝[Ioi 0] 0] fun t => t ^ a\n[PROOFSTEP]\nrefine isBigO_zero_zetaKernel₂.trans ((aux2.comp_tendsto tendsto_inv_zero_atTop).congr' ?_ ?_)\n[GOAL]\ncase refine_1\na : ℝ\naux1 : (fun t => rexp (-π * t)) =O[atTop] fun t => t ^ (-a - 1 / 2)\naux2 : (fun t => rexp (-π * t) * sqrt t) =O[atTop] fun t => t ^ (-a)\n⊢ ((fun t => rexp (-π * t) * sqrt t) ∘ fun x => x⁻¹) =ᶠ[𝓝[Ioi 0] 0] fun t => rexp (-π / t) / sqrt t\n[PROOFSTEP]\nrefine eventually_of_mem self_mem_nhdsWithin fun x _ => ?_\n[GOAL]\ncase refine_1\na : ℝ\naux1 : (fun t => rexp (-π * t)) =O[atTop] fun t => t ^ (-a - 1 / 2)\naux2 : (fun t => rexp (-π * t) * sqrt t) =O[atTop] fun t => t ^ (-a)\nx : ℝ\nx✝ : x ∈ Ioi 0\n⊢ ((fun t => rexp (-π * t) * sqrt t) ∘ fun x => x⁻¹) x = (fun t => rexp (-π / t) / sqrt t) x\n[PROOFSTEP]\nsimp_rw [Function.comp_apply, sqrt_inv, ← div_eq_mul_inv]\n[GOAL]\ncase refine_2\na : ℝ\naux1 : (fun t => rexp (-π * t)) =O[atTop] fun t => t ^ (-a - 1 / 2)\naux2 : (fun t => rexp (-π * t) * sqrt t) =O[atTop] fun t => t ^ (-a)\n⊢ ((fun t => t ^ (-a)) ∘ fun x => x⁻¹) =ᶠ[𝓝[Ioi 0] 0] fun t => t ^ a\n[PROOFSTEP]\nrefine eventually_of_mem self_mem_nhdsWithin fun x hx => ?_\n[GOAL]\ncase refine_2\na : ℝ\naux1 : (fun t => rexp (-π * t)) =O[atTop] fun t => t ^ (-a - 1 / 2)\naux2 : (fun t => rexp (-π * t) * sqrt t) =O[atTop] fun t => t ^ (-a)\nx : ℝ\nhx : x ∈ Ioi 0\n⊢ ((fun t => t ^ (-a)) ∘ fun x => x⁻¹) x = (fun t => t ^ a) x\n[PROOFSTEP]\nsimp_rw [Function.comp_apply, inv_rpow (le_of_lt hx), rpow_neg (le_of_lt hx), inv_inv]\n[GOAL]\n⊢ zetaKernel₁ =O[𝓝[Ioi 0] 0] fun t => t ^ (-(1 / 2))\n[PROOFSTEP]\nhave : zetaKernel₁ =ᶠ[𝓝[>] 0] zetaKernel₂ + fun t => ((1 / sqrt t - 1) / 2 : ℂ) :=\n  by\n  refine eventuallyEq_of_mem (Ioc_mem_nhdsWithin_Ioi <| left_mem_Ico.mpr zero_lt_one) fun t h => ?_\n  rw [Pi.add_apply, zetaKernel₂, Pi.add_apply, indicator_of_mem h]\n  ring\n[GOAL]\n⊢ zetaKernel₁ =ᶠ[𝓝[Ioi 0] 0] zetaKernel₂ + fun t => (1 / ↑(sqrt t) - 1) / 2\n[PROOFSTEP]\nrefine eventuallyEq_of_mem (Ioc_mem_nhdsWithin_Ioi <| left_mem_Ico.mpr zero_lt_one) fun t h => ?_\n[GOAL]\nt : ℝ\nh : t ∈ Ioc 0 1\n⊢ zetaKernel₁ t = (zetaKernel₂ + fun t => (1 / ↑(sqrt t) - 1) / 2) t\n[PROOFSTEP]\nrw [Pi.add_apply, zetaKernel₂, Pi.add_apply, indicator_of_mem h]\n[GOAL]\nt : ℝ\nh : t ∈ Ioc 0 1\n⊢ zetaKernel₁ t = zetaKernel₁ t + (1 - 1 / ↑(sqrt t)) / 2 + (1 / ↑(sqrt t) - 1) / 2\n[PROOFSTEP]\nring\n[GOAL]\nthis : zetaKernel₁ =ᶠ[𝓝[Ioi 0] 0] zetaKernel₂ + fun t => (1 / ↑(sqrt t) - 1) / 2\n⊢ zetaKernel₁ =O[𝓝[Ioi 0] 0] fun t => t ^ (-(1 / 2))\n[PROOFSTEP]\nrefine ((isBigO_zero_zetaKernel₂_rpow _).add ?_).congr' this.symm (EventuallyEq.refl _ _)\n[GOAL]\nthis : zetaKernel₁ =ᶠ[𝓝[Ioi 0] 0] zetaKernel₂ + fun t => (1 / ↑(sqrt t) - 1) / 2\n⊢ (fun x => (fun t => (1 / ↑(sqrt t) - 1) / 2) x) =O[𝓝[Ioi 0] 0] fun t => t ^ (-(1 / 2))\n[PROOFSTEP]\nsimp_rw [sub_div]\n[GOAL]\nthis : zetaKernel₁ =ᶠ[𝓝[Ioi 0] 0] zetaKernel₂ + fun t => (1 / ↑(sqrt t) - 1) / 2\n⊢ (fun x => 1 / ↑(sqrt x) / 2 - 1 / 2) =O[𝓝[Ioi 0] 0] fun t => t ^ (-(1 / 2))\n[PROOFSTEP]\napply IsBigO.sub\n[GOAL]\ncase h₁\nthis : zetaKernel₁ =ᶠ[𝓝[Ioi 0] 0] zetaKernel₂ + fun t => (1 / ↑(sqrt t) - 1) / 2\n⊢ (fun x => 1 / ↑(sqrt x) / 2) =O[𝓝[Ioi 0] 0] fun t => t ^ (-(1 / 2))\n[PROOFSTEP]\napply IsBigO.of_norm_left\n[GOAL]\ncase h₁.a\nthis : zetaKernel₁ =ᶠ[𝓝[Ioi 0] 0] zetaKernel₂ + fun t => (1 / ↑(sqrt t) - 1) / 2\n⊢ (fun x => ‖1 / ↑(sqrt x) / 2‖) =O[𝓝[Ioi 0] 0] fun t => t ^ (-(1 / 2))\n[PROOFSTEP]\nsimp_rw [norm_div, norm_one, div_eq_mul_inv, one_mul, mul_comm _ ‖(2 : ℂ)‖⁻¹]\n[GOAL]\ncase h₁.a\nthis : zetaKernel₁ =ᶠ[𝓝[Ioi 0] 0] zetaKernel₂ + fun t => (1 / ↑(sqrt t) - 1) / 2\n⊢ (fun x => ‖2‖⁻¹ * ‖↑(sqrt x)‖⁻¹) =O[𝓝[Ioi 0] 0] fun t => t ^ (-2⁻¹)\n[PROOFSTEP]\nrefine\n  ((isBigO_refl _ _).congr' (EventuallyEq.refl _ _)\n        (eventuallyEq_of_mem self_mem_nhdsWithin fun x hx => ?_)).const_mul_left\n    _\n[GOAL]\ncase h₁.a\nthis : zetaKernel₁ =ᶠ[𝓝[Ioi 0] 0] zetaKernel₂ + fun t => (1 / ↑(sqrt t) - 1) / 2\nx : ℝ\nhx : x ∈ Ioi 0\n⊢ ‖↑(sqrt x)‖⁻¹ = x ^ (-2⁻¹)\n[PROOFSTEP]\nrw [Complex.norm_eq_abs, abs_ofReal, abs_of_nonneg (sqrt_nonneg _), sqrt_eq_rpow, rpow_neg (le_of_lt hx), one_div]\n[GOAL]\ncase h₂\nthis : zetaKernel₁ =ᶠ[𝓝[Ioi 0] 0] zetaKernel₂ + fun t => (1 / ↑(sqrt t) - 1) / 2\n⊢ (fun x => 1 / 2) =O[𝓝[Ioi 0] 0] fun t => t ^ (-(1 / 2))\n[PROOFSTEP]\nrefine isBigO_iff.mpr ⟨‖(1 / 2 : ℂ)‖, ?_⟩\n[GOAL]\ncase h₂\nthis : zetaKernel₁ =ᶠ[𝓝[Ioi 0] 0] zetaKernel₂ + fun t => (1 / ↑(sqrt t) - 1) / 2\n⊢ ∀ᶠ (x : ℝ) in 𝓝[Ioi 0] 0, ‖1 / 2‖ ≤ ‖1 / 2‖ * ‖x ^ (-(1 / 2))‖\n[PROOFSTEP]\nrefine eventually_of_mem (Ioc_mem_nhdsWithin_Ioi <| left_mem_Ico.mpr zero_lt_one) fun t ht => ?_\n[GOAL]\ncase h₂\nthis : zetaKernel₁ =ᶠ[𝓝[Ioi 0] 0] zetaKernel₂ + fun t => (1 / ↑(sqrt t) - 1) / 2\nt : ℝ\nht : t ∈ Ioc 0 1\n⊢ ‖1 / 2‖ ≤ ‖1 / 2‖ * ‖t ^ (-(1 / 2))‖\n[PROOFSTEP]\nrefine le_mul_of_one_le_right (norm_nonneg _) ?_\n[GOAL]\ncase h₂\nthis : zetaKernel₁ =ᶠ[𝓝[Ioi 0] 0] zetaKernel₂ + fun t => (1 / ↑(sqrt t) - 1) / 2\nt : ℝ\nht : t ∈ Ioc 0 1\n⊢ 1 ≤ ‖t ^ (-(1 / 2))‖\n[PROOFSTEP]\nrw [norm_of_nonneg (rpow_nonneg_of_nonneg ht.1.le _), rpow_neg ht.1.le]\n[GOAL]\ncase h₂\nthis : zetaKernel₁ =ᶠ[𝓝[Ioi 0] 0] zetaKernel₂ + fun t => (1 / ↑(sqrt t) - 1) / 2\nt : ℝ\nht : t ∈ Ioc 0 1\n⊢ 1 ≤ (t ^ (1 / 2))⁻¹\n[PROOFSTEP]\nexact one_le_inv (rpow_pos_of_pos ht.1 _) (rpow_le_one ht.1.le ht.2 one_half_pos.le)\n[GOAL]\ns : ℂ\nhs : s ≠ 0\nhs' : s ≠ 1\n⊢ DifferentiableAt ℂ riemannCompletedZeta s\n[PROOFSTEP]\nrefine (differentiable_completed_zeta₀.differentiableAt.sub ?_).add ?_\n[GOAL]\ncase refine_1\ns : ℂ\nhs : s ≠ 0\nhs' : s ≠ 1\n⊢ DifferentiableAt ℂ (fun y => 1 / y) s\n[PROOFSTEP]\nexact (Differentiable.differentiableAt (differentiable_const _)).div differentiableAt_id hs\n[GOAL]\ncase refine_2\ns : ℂ\nhs : s ≠ 0\nhs' : s ≠ 1\n⊢ DifferentiableAt ℂ (fun y => 1 / (y - 1)) s\n[PROOFSTEP]\nrefine (differentiable_const _).differentiableAt.div ?_ (sub_ne_zero.mpr hs')\n[GOAL]\ncase refine_2\ns : ℂ\nhs : s ≠ 0\nhs' : s ≠ 1\n⊢ DifferentiableAt ℂ (fun y => y - 1) s\n[PROOFSTEP]\nexact differentiableAt_id.sub (differentiableAt_const _)\n[GOAL]\ns : ℂ\nhs' : s ≠ 1\n⊢ DifferentiableAt ℂ riemannZeta s\n[PROOFSTEP]\nhave c1 :\n  ∀ (t : ℂ) (_ : t ≠ 0) (_ : t ≠ 1),\n    DifferentiableAt ℂ (fun u : ℂ => (π : ℂ) ^ (u / 2) * riemannCompletedZeta u / Gamma (u / 2)) t :=\n  by\n  intro t ht ht'\n  apply DifferentiableAt.mul\n  · refine (DifferentiableAt.const_cpow ?_ ?_).mul (differentiableAt_completed_zeta ht ht')\n    · exact DifferentiableAt.div_const differentiableAt_id _\n    · exact Or.inl (ofReal_ne_zero.mpr pi_pos.ne')\n  · refine differentiable_one_div_Gamma.differentiableAt.comp t ?_\n    exact\n      DifferentiableAt.div_const differentiableAt_id\n        _\n          -- Second claim: the limit at `s = 0` exists and is equal to `-1 / 2`.\n[GOAL]\ns : ℂ\nhs' : s ≠ 1\n⊢ ∀ (t : ℂ),\n    t ≠ 0 → t ≠ 1 → DifferentiableAt ℂ (fun u => ↑π ^ (u / 2) * riemannCompletedZeta u / Complex.Gamma (u / 2)) t\n[PROOFSTEP]\nintro t ht ht'\n[GOAL]\ns : ℂ\nhs' : s ≠ 1\nt : ℂ\nht : t ≠ 0\nht' : t ≠ 1\n⊢ DifferentiableAt ℂ (fun u => ↑π ^ (u / 2) * riemannCompletedZeta u / Complex.Gamma (u / 2)) t\n[PROOFSTEP]\napply DifferentiableAt.mul\n[GOAL]\ncase ha\ns : ℂ\nhs' : s ≠ 1\nt : ℂ\nht : t ≠ 0\nht' : t ≠ 1\n⊢ DifferentiableAt ℂ (fun y => ↑π ^ (y / 2) * riemannCompletedZeta y) t\n[PROOFSTEP]\nrefine (DifferentiableAt.const_cpow ?_ ?_).mul (differentiableAt_completed_zeta ht ht')\n[GOAL]\ncase ha.refine_1\ns : ℂ\nhs' : s ≠ 1\nt : ℂ\nht : t ≠ 0\nht' : t ≠ 1\n⊢ DifferentiableAt ℂ (fun y => y / 2) t\n[PROOFSTEP]\nexact DifferentiableAt.div_const differentiableAt_id _\n[GOAL]\ncase ha.refine_2\ns : ℂ\nhs' : s ≠ 1\nt : ℂ\nht : t ≠ 0\nht' : t ≠ 1\n⊢ ↑π ≠ 0 ∨ t / 2 ≠ 0\n[PROOFSTEP]\nexact Or.inl (ofReal_ne_zero.mpr pi_pos.ne')\n[GOAL]\ncase hb\ns : ℂ\nhs' : s ≠ 1\nt : ℂ\nht : t ≠ 0\nht' : t ≠ 1\n⊢ DifferentiableAt ℂ (fun y => (Complex.Gamma (y / 2))⁻¹) t\n[PROOFSTEP]\nrefine differentiable_one_div_Gamma.differentiableAt.comp t ?_\n[GOAL]\ncase hb\ns : ℂ\nhs' : s ≠ 1\nt : ℂ\nht : t ≠ 0\nht' : t ≠ 1\n⊢ DifferentiableAt ℂ (fun y => y / 2) t\n[PROOFSTEP]\nexact\n  DifferentiableAt.div_const differentiableAt_id\n    _\n      -- Second claim: the limit at `s = 0` exists and is equal to `-1 / 2`.\n[GOAL]\ns : ℂ\nhs' : s ≠ 1\nc1 :\n  ∀ (t : ℂ),\n    t ≠ 0 → t ≠ 1 → DifferentiableAt ℂ (fun u => ↑π ^ (u / 2) * riemannCompletedZeta u / Complex.Gamma (u / 2)) t\n⊢ DifferentiableAt ℂ riemannZeta s\n[PROOFSTEP]\nhave c2 : Tendsto (fun s : ℂ => (π : ℂ) ^ (s / 2) * riemannCompletedZeta s / Gamma (s / 2)) (𝓝[≠] 0) (𝓝 <| -1 / 2) :=\n  by\n  have h1 : Tendsto (fun z : ℂ => (π : ℂ) ^ (z / 2)) (𝓝 0) (𝓝 1) :=\n    by\n    convert\n      (ContinuousAt.comp (f := fun z => z / 2) (continuousAt_const_cpow (ofReal_ne_zero.mpr pi_pos.ne'))\n          ?_).tendsto using\n      2\n    · simp_rw [Function.comp_apply, zero_div, cpow_zero]\n    · exact continuousAt_id.div continuousAt_const two_ne_zero\n  suffices h2 : Tendsto (fun z => riemannCompletedZeta z / Gamma (z / 2)) (𝓝[≠] 0) (𝓝 <| -1 / 2)\n  · convert (h1.mono_left nhdsWithin_le_nhds).mul h2 using 1\n    · ext1 x; rw [mul_div]\n    · simp only [one_mul]\n  suffices h3 : Tendsto (fun z => riemannCompletedZeta z * (z / 2) / (z / 2 * Gamma (z / 2))) (𝓝[≠] 0) (𝓝 <| -1 / 2)\n  · refine Tendsto.congr' (eventuallyEq_of_mem self_mem_nhdsWithin fun z hz => ?_) h3\n    rw [← div_div, mul_div_cancel _ (div_ne_zero hz two_ne_zero)]\n  have h4 : Tendsto (fun z : ℂ => z / 2 * Gamma (z / 2)) (𝓝[≠] 0) (𝓝 1) :=\n    by\n    refine tendsto_self_mul_Gamma_nhds_zero.comp ?_\n    rw [tendsto_nhdsWithin_iff, (by simp : 𝓝 (0 : ℂ) = 𝓝 (0 / 2))]\n    exact\n      ⟨(tendsto_id.div_const _).mono_left nhdsWithin_le_nhds,\n        eventually_of_mem self_mem_nhdsWithin fun x hx => div_ne_zero hx two_ne_zero⟩\n  suffices Tendsto (fun z => riemannCompletedZeta z * z / 2) (𝓝[≠] 0) (𝓝 (-1 / 2 : ℂ))\n    by\n    have := this.div h4 one_ne_zero\n    simp_rw [div_one, mul_div_assoc] at this \n    exact this\n  refine Tendsto.div ?_ tendsto_const_nhds two_ne_zero\n  simp_rw [riemannCompletedZeta, add_mul, sub_mul]\n  rw [show 𝓝 (-1 : ℂ) = 𝓝 (0 - 1 + 0) by rw [zero_sub, add_zero]]\n  refine (Tendsto.sub ?_ ?_).add ?_\n  · refine Tendsto.mono_left ?_ nhdsWithin_le_nhds\n    have : ContinuousAt riemannCompletedZeta₀ 0 := differentiable_completed_zeta₀.continuous.continuousAt\n    simpa only [id.def, mul_zero] using Tendsto.mul this tendsto_id\n  · refine tendsto_const_nhds.congr' (eventuallyEq_of_mem self_mem_nhdsWithin fun t ht => ?_)\n    simp_rw [one_div_mul_cancel ht]\n  · refine Tendsto.mono_left ?_ nhdsWithin_le_nhds\n    suffices ContinuousAt (fun z : ℂ => 1 / (z - 1)) 0 by\n      simpa only [id.def, mul_zero] using Tendsto.mul this tendsto_id\n    refine continuousAt_const.div (continuousAt_id.sub continuousAt_const) ?_\n    simpa only [zero_sub] using neg_ne_zero.mpr one_ne_zero\n[GOAL]\ns : ℂ\nhs' : s ≠ 1\nc1 :\n  ∀ (t : ℂ),\n    t ≠ 0 → t ≠ 1 → DifferentiableAt ℂ (fun u => ↑π ^ (u / 2) * riemannCompletedZeta u / Complex.Gamma (u / 2)) t\n⊢ Tendsto (fun s => ↑π ^ (s / 2) * riemannCompletedZeta s / Complex.Gamma (s / 2)) (𝓝[{0}ᶜ] 0) (𝓝 (-1 / 2))\n[PROOFSTEP]\nhave h1 : Tendsto (fun z : ℂ => (π : ℂ) ^ (z / 2)) (𝓝 0) (𝓝 1) :=\n  by\n  convert\n    (ContinuousAt.comp (f := fun z => z / 2) (continuousAt_const_cpow (ofReal_ne_zero.mpr pi_pos.ne')) ?_).tendsto using\n    2\n  · simp_rw [Function.comp_apply, zero_div, cpow_zero]\n  · exact continuousAt_id.div continuousAt_const two_ne_zero\n[GOAL]\ns : ℂ\nhs' : s ≠ 1\nc1 :\n  ∀ (t : ℂ),\n    t ≠ 0 → t ≠ 1 → DifferentiableAt ℂ (fun u => ↑π ^ (u / 2) * riemannCompletedZeta u / Complex.Gamma (u / 2)) t\n⊢ Tendsto (fun z => ↑π ^ (z / 2)) (𝓝 0) (𝓝 1)\n[PROOFSTEP]\nconvert\n  (ContinuousAt.comp (f := fun z => z / 2) (continuousAt_const_cpow (ofReal_ne_zero.mpr pi_pos.ne')) ?_).tendsto using 2\n[GOAL]\ncase h.e'_5.h.e'_3\ns : ℂ\nhs' : s ≠ 1\nc1 :\n  ∀ (t : ℂ),\n    t ≠ 0 → t ≠ 1 → DifferentiableAt ℂ (fun u => ↑π ^ (u / 2) * riemannCompletedZeta u / Complex.Gamma (u / 2)) t\n⊢ 1 = ((fun x => ↑π ^ x) ∘ fun z => z / 2) 0\n[PROOFSTEP]\nsimp_rw [Function.comp_apply, zero_div, cpow_zero]\n[GOAL]\ncase convert_1\ns : ℂ\nhs' : s ≠ 1\nc1 :\n  ∀ (t : ℂ),\n    t ≠ 0 → t ≠ 1 → DifferentiableAt ℂ (fun u => ↑π ^ (u / 2) * riemannCompletedZeta u / Complex.Gamma (u / 2)) t\n⊢ ContinuousAt (fun z => z / 2) 0\n[PROOFSTEP]\nexact continuousAt_id.div continuousAt_const two_ne_zero\n[GOAL]\ns : ℂ\nhs' : s ≠ 1\nc1 :\n  ∀ (t : ℂ),\n    t ≠ 0 → t ≠ 1 → DifferentiableAt ℂ (fun u => ↑π ^ (u / 2) * riemannCompletedZeta u / Complex.Gamma (u / 2)) t\nh1 : Tendsto (fun z => ↑π ^ (z / 2)) (𝓝 0) (𝓝 1)\n⊢ Tendsto (fun s => ↑π ^ (s / 2) * riemannCompletedZeta s / Complex.Gamma (s / 2)) (𝓝[{0}ᶜ] 0) (𝓝 (-1 / 2))\n[PROOFSTEP]\nsuffices h2 : Tendsto (fun z => riemannCompletedZeta z / Gamma (z / 2)) (𝓝[≠] 0) (𝓝 <| -1 / 2)\n[GOAL]\ns : ℂ\nhs' : s ≠ 1\nc1 :\n  ∀ (t : ℂ),\n    t ≠ 0 → t ≠ 1 → DifferentiableAt ℂ (fun u => ↑π ^ (u / 2) * riemannCompletedZeta u / Complex.Gamma (u / 2)) t\nh1 : Tendsto (fun z => ↑π ^ (z / 2)) (𝓝 0) (𝓝 1)\nh2 : Tendsto (fun z => riemannCompletedZeta z / Complex.Gamma (z / 2)) (𝓝[{0}ᶜ] 0) (𝓝 (-1 / 2))\n⊢ Tendsto (fun s => ↑π ^ (s / 2) * riemannCompletedZeta s / Complex.Gamma (s / 2)) (𝓝[{0}ᶜ] 0) (𝓝 (-1 / 2))\n[PROOFSTEP]\nconvert (h1.mono_left nhdsWithin_le_nhds).mul h2 using 1\n[GOAL]\ncase h.e'_3\ns : ℂ\nhs' : s ≠ 1\nc1 :\n  ∀ (t : ℂ),\n    t ≠ 0 → t ≠ 1 → DifferentiableAt ℂ (fun u => ↑π ^ (u / 2) * riemannCompletedZeta u / Complex.Gamma (u / 2)) t\nh1 : Tendsto (fun z => ↑π ^ (z / 2)) (𝓝 0) (𝓝 1)\nh2 : Tendsto (fun z => riemannCompletedZeta z / Complex.Gamma (z / 2)) (𝓝[{0}ᶜ] 0) (𝓝 (-1 / 2))\n⊢ (fun s => ↑π ^ (s / 2) * riemannCompletedZeta s / Complex.Gamma (s / 2)) = fun x =>\n    ↑π ^ (x / 2) * (riemannCompletedZeta x / Complex.Gamma (x / 2))\n[PROOFSTEP]\next1 x\n[GOAL]\ncase h.e'_3.h\ns : ℂ\nhs' : s ≠ 1\nc1 :\n  ∀ (t : ℂ),\n    t ≠ 0 → t ≠ 1 → DifferentiableAt ℂ (fun u => ↑π ^ (u / 2) * riemannCompletedZeta u / Complex.Gamma (u / 2)) t\nh1 : Tendsto (fun z => ↑π ^ (z / 2)) (𝓝 0) (𝓝 1)\nh2 : Tendsto (fun z => riemannCompletedZeta z / Complex.Gamma (z / 2)) (𝓝[{0}ᶜ] 0) (𝓝 (-1 / 2))\nx : ℂ\n⊢ ↑π ^ (x / 2) * riemannCompletedZeta x / Complex.Gamma (x / 2) =\n    ↑π ^ (x / 2) * (riemannCompletedZeta x / Complex.Gamma (x / 2))\n[PROOFSTEP]\nrw [mul_div]\n[GOAL]\ncase h.e'_5\ns : ℂ\nhs' : s ≠ 1\nc1 :\n  ∀ (t : ℂ),\n    t ≠ 0 → t ≠ 1 → DifferentiableAt ℂ (fun u => ↑π ^ (u / 2) * riemannCompletedZeta u / Complex.Gamma (u / 2)) t\nh1 : Tendsto (fun z => ↑π ^ (z / 2)) (𝓝 0) (𝓝 1)\nh2 : Tendsto (fun z => riemannCompletedZeta z / Complex.Gamma (z / 2)) (𝓝[{0}ᶜ] 0) (𝓝 (-1 / 2))\n⊢ 𝓝 (-1 / 2) = 𝓝 (1 * (-1 / 2))\n[PROOFSTEP]\nsimp only [one_mul]\n[GOAL]\ncase h2\ns : ℂ\nhs' : s ≠ 1\nc1 :\n  ∀ (t : ℂ),\n    t ≠ 0 → t ≠ 1 → DifferentiableAt ℂ (fun u => ↑π ^ (u / 2) * riemannCompletedZeta u / Complex.Gamma (u / 2)) t\nh1 : Tendsto (fun z => ↑π ^ (z / 2)) (𝓝 0) (𝓝 1)\n⊢ Tendsto (fun z => riemannCompletedZeta z / Complex.Gamma (z / 2)) (𝓝[{0}ᶜ] 0) (𝓝 (-1 / 2))\n[PROOFSTEP]\nsuffices h3 : Tendsto (fun z => riemannCompletedZeta z * (z / 2) / (z / 2 * Gamma (z / 2))) (𝓝[≠] 0) (𝓝 <| -1 / 2)\n[GOAL]\ncase h2\ns : ℂ\nhs' : s ≠ 1\nc1 :\n  ∀ (t : ℂ),\n    t ≠ 0 → t ≠ 1 → DifferentiableAt ℂ (fun u => ↑π ^ (u / 2) * riemannCompletedZeta u / Complex.Gamma (u / 2)) t\nh1 : Tendsto (fun z => ↑π ^ (z / 2)) (𝓝 0) (𝓝 1)\nh3 : Tendsto (fun z => riemannCompletedZeta z * (z / 2) / (z / 2 * Complex.Gamma (z / 2))) (𝓝[{0}ᶜ] 0) (𝓝 (-1 / 2))\n⊢ Tendsto (fun z => riemannCompletedZeta z / Complex.Gamma (z / 2)) (𝓝[{0}ᶜ] 0) (𝓝 (-1 / 2))\n[PROOFSTEP]\nrefine Tendsto.congr' (eventuallyEq_of_mem self_mem_nhdsWithin fun z hz => ?_) h3\n[GOAL]\ncase h2\ns : ℂ\nhs' : s ≠ 1\nc1 :\n  ∀ (t : ℂ),\n    t ≠ 0 → t ≠ 1 → DifferentiableAt ℂ (fun u => ↑π ^ (u / 2) * riemannCompletedZeta u / Complex.Gamma (u / 2)) t\nh1 : Tendsto (fun z => ↑π ^ (z / 2)) (𝓝 0) (𝓝 1)\nh3 : Tendsto (fun z => riemannCompletedZeta z * (z / 2) / (z / 2 * Complex.Gamma (z / 2))) (𝓝[{0}ᶜ] 0) (𝓝 (-1 / 2))\nz : ℂ\nhz : z ∈ {0}ᶜ\n⊢ riemannCompletedZeta z * (z / 2) / (z / 2 * Complex.Gamma (z / 2)) = riemannCompletedZeta z / Complex.Gamma (z / 2)\n[PROOFSTEP]\nrw [← div_div, mul_div_cancel _ (div_ne_zero hz two_ne_zero)]\n[GOAL]\ncase h3\ns : ℂ\nhs' : s ≠ 1\nc1 :\n  ∀ (t : ℂ),\n    t ≠ 0 → t ≠ 1 → DifferentiableAt ℂ (fun u => ↑π ^ (u / 2) * riemannCompletedZeta u / Complex.Gamma (u / 2)) t\nh1 : Tendsto (fun z => ↑π ^ (z / 2)) (𝓝 0) (𝓝 1)\n⊢ Tendsto (fun z => riemannCompletedZeta z * (z / 2) / (z / 2 * Complex.Gamma (z / 2))) (𝓝[{0}ᶜ] 0) (𝓝 (-1 / 2))\n[PROOFSTEP]\nhave h4 : Tendsto (fun z : ℂ => z / 2 * Gamma (z / 2)) (𝓝[≠] 0) (𝓝 1) :=\n  by\n  refine tendsto_self_mul_Gamma_nhds_zero.comp ?_\n  rw [tendsto_nhdsWithin_iff, (by simp : 𝓝 (0 : ℂ) = 𝓝 (0 / 2))]\n  exact\n    ⟨(tendsto_id.div_const _).mono_left nhdsWithin_le_nhds,\n      eventually_of_mem self_mem_nhdsWithin fun x hx => div_ne_zero hx two_ne_zero⟩\n[GOAL]\ns : ℂ\nhs' : s ≠ 1\nc1 :\n  ∀ (t : ℂ),\n    t ≠ 0 → t ≠ 1 → DifferentiableAt ℂ (fun u => ↑π ^ (u / 2) * riemannCompletedZeta u / Complex.Gamma (u / 2)) t\nh1 : Tendsto (fun z => ↑π ^ (z / 2)) (𝓝 0) (𝓝 1)\n⊢ Tendsto (fun z => z / 2 * Complex.Gamma (z / 2)) (𝓝[{0}ᶜ] 0) (𝓝 1)\n[PROOFSTEP]\nrefine tendsto_self_mul_Gamma_nhds_zero.comp ?_\n[GOAL]\ns : ℂ\nhs' : s ≠ 1\nc1 :\n  ∀ (t : ℂ),\n    t ≠ 0 → t ≠ 1 → DifferentiableAt ℂ (fun u => ↑π ^ (u / 2) * riemannCompletedZeta u / Complex.Gamma (u / 2)) t\nh1 : Tendsto (fun z => ↑π ^ (z / 2)) (𝓝 0) (𝓝 1)\n⊢ Tendsto (fun z => z / 2) (𝓝[{0}ᶜ] 0) (𝓝[{0}ᶜ] 0)\n[PROOFSTEP]\nrw [tendsto_nhdsWithin_iff, (by simp : 𝓝 (0 : ℂ) = 𝓝 (0 / 2))]\n[GOAL]\ns : ℂ\nhs' : s ≠ 1\nc1 :\n  ∀ (t : ℂ),\n    t ≠ 0 → t ≠ 1 → DifferentiableAt ℂ (fun u => ↑π ^ (u / 2) * riemannCompletedZeta u / Complex.Gamma (u / 2)) t\nh1 : Tendsto (fun z => ↑π ^ (z / 2)) (𝓝 0) (𝓝 1)\n⊢ 𝓝 0 = 𝓝 (0 / 2)\n[PROOFSTEP]\nsimp\n[GOAL]\ns : ℂ\nhs' : s ≠ 1\nc1 :\n  ∀ (t : ℂ),\n    t ≠ 0 → t ≠ 1 → DifferentiableAt ℂ (fun u => ↑π ^ (u / 2) * riemannCompletedZeta u / Complex.Gamma (u / 2)) t\nh1 : Tendsto (fun z => ↑π ^ (z / 2)) (𝓝 0) (𝓝 1)\n⊢ Tendsto (fun z => z / 2) (𝓝[{0}ᶜ] 0) (𝓝 (0 / 2)) ∧ ∀ᶠ (n : ℂ) in 𝓝[{0}ᶜ] 0, n / 2 ∈ {0}ᶜ\n[PROOFSTEP]\nexact\n  ⟨(tendsto_id.div_const _).mono_left nhdsWithin_le_nhds,\n    eventually_of_mem self_mem_nhdsWithin fun x hx => div_ne_zero hx two_ne_zero⟩\n[GOAL]\ncase h3\ns : ℂ\nhs' : s ≠ 1\nc1 :\n  ∀ (t : ℂ),\n    t ≠ 0 → t ≠ 1 → DifferentiableAt ℂ (fun u => ↑π ^ (u / 2) * riemannCompletedZeta u / Complex.Gamma (u / 2)) t\nh1 : Tendsto (fun z => ↑π ^ (z / 2)) (𝓝 0) (𝓝 1)\nh4 : Tendsto (fun z => z / 2 * Complex.Gamma (z / 2)) (𝓝[{0}ᶜ] 0) (𝓝 1)\n⊢ Tendsto (fun z => riemannCompletedZeta z * (z / 2) / (z / 2 * Complex.Gamma (z / 2))) (𝓝[{0}ᶜ] 0) (𝓝 (-1 / 2))\n[PROOFSTEP]\nsuffices Tendsto (fun z => riemannCompletedZeta z * z / 2) (𝓝[≠] 0) (𝓝 (-1 / 2 : ℂ))\n  by\n  have := this.div h4 one_ne_zero\n  simp_rw [div_one, mul_div_assoc] at this \n  exact this\n[GOAL]\ns : ℂ\nhs' : s ≠ 1\nc1 :\n  ∀ (t : ℂ),\n    t ≠ 0 → t ≠ 1 → DifferentiableAt ℂ (fun u => ↑π ^ (u / 2) * riemannCompletedZeta u / Complex.Gamma (u / 2)) t\nh1 : Tendsto (fun z => ↑π ^ (z / 2)) (𝓝 0) (𝓝 1)\nh4 : Tendsto (fun z => z / 2 * Complex.Gamma (z / 2)) (𝓝[{0}ᶜ] 0) (𝓝 1)\nthis : Tendsto (fun z => riemannCompletedZeta z * z / 2) (𝓝[{0}ᶜ] 0) (𝓝 (-1 / 2))\n⊢ Tendsto (fun z => riemannCompletedZeta z * (z / 2) / (z / 2 * Complex.Gamma (z / 2))) (𝓝[{0}ᶜ] 0) (𝓝 (-1 / 2))\n[PROOFSTEP]\nhave := this.div h4 one_ne_zero\n[GOAL]\ns : ℂ\nhs' : s ≠ 1\nc1 :\n  ∀ (t : ℂ),\n    t ≠ 0 → t ≠ 1 → DifferentiableAt ℂ (fun u => ↑π ^ (u / 2) * riemannCompletedZeta u / Complex.Gamma (u / 2)) t\nh1 : Tendsto (fun z => ↑π ^ (z / 2)) (𝓝 0) (𝓝 1)\nh4 : Tendsto (fun z => z / 2 * Complex.Gamma (z / 2)) (𝓝[{0}ᶜ] 0) (𝓝 1)\nthis✝ : Tendsto (fun z => riemannCompletedZeta z * z / 2) (𝓝[{0}ᶜ] 0) (𝓝 (-1 / 2))\nthis :\n  Tendsto ((fun z => riemannCompletedZeta z * z / 2) / fun z => z / 2 * Complex.Gamma (z / 2)) (𝓝[{0}ᶜ] 0)\n    (𝓝 (-1 / 2 / 1))\n⊢ Tendsto (fun z => riemannCompletedZeta z * (z / 2) / (z / 2 * Complex.Gamma (z / 2))) (𝓝[{0}ᶜ] 0) (𝓝 (-1 / 2))\n[PROOFSTEP]\nsimp_rw [div_one, mul_div_assoc] at this \n[GOAL]\ns : ℂ\nhs' : s ≠ 1\nc1 :\n  ∀ (t : ℂ),\n    t ≠ 0 → t ≠ 1 → DifferentiableAt ℂ (fun u => ↑π ^ (u / 2) * riemannCompletedZeta u / Complex.Gamma (u / 2)) t\nh1 : Tendsto (fun z => ↑π ^ (z / 2)) (𝓝 0) (𝓝 1)\nh4 : Tendsto (fun z => z / 2 * Complex.Gamma (z / 2)) (𝓝[{0}ᶜ] 0) (𝓝 1)\nthis✝ : Tendsto (fun z => riemannCompletedZeta z * z / 2) (𝓝[{0}ᶜ] 0) (𝓝 (-1 / 2))\nthis :\n  Tendsto ((fun z => riemannCompletedZeta z * (z / 2)) / fun z => z / 2 * Complex.Gamma (z / 2)) (𝓝[{0}ᶜ] 0)\n    (𝓝 (-1 / 2))\n⊢ Tendsto (fun z => riemannCompletedZeta z * (z / 2) / (z / 2 * Complex.Gamma (z / 2))) (𝓝[{0}ᶜ] 0) (𝓝 (-1 / 2))\n[PROOFSTEP]\nexact this\n[GOAL]\ncase h3\ns : ℂ\nhs' : s ≠ 1\nc1 :\n  ∀ (t : ℂ),\n    t ≠ 0 → t ≠ 1 → DifferentiableAt ℂ (fun u => ↑π ^ (u / 2) * riemannCompletedZeta u / Complex.Gamma (u / 2)) t\nh1 : Tendsto (fun z => ↑π ^ (z / 2)) (𝓝 0) (𝓝 1)\nh4 : Tendsto (fun z => z / 2 * Complex.Gamma (z / 2)) (𝓝[{0}ᶜ] 0) (𝓝 1)\n⊢ Tendsto (fun z => riemannCompletedZeta z * z / 2) (𝓝[{0}ᶜ] 0) (𝓝 (-1 / 2))\n[PROOFSTEP]\nrefine Tendsto.div ?_ tendsto_const_nhds two_ne_zero\n[GOAL]\ncase h3\ns : ℂ\nhs' : s ≠ 1\nc1 :\n  ∀ (t : ℂ),\n    t ≠ 0 → t ≠ 1 → DifferentiableAt ℂ (fun u => ↑π ^ (u / 2) * riemannCompletedZeta u / Complex.Gamma (u / 2)) t\nh1 : Tendsto (fun z => ↑π ^ (z / 2)) (𝓝 0) (𝓝 1)\nh4 : Tendsto (fun z => z / 2 * Complex.Gamma (z / 2)) (𝓝[{0}ᶜ] 0) (𝓝 1)\n⊢ Tendsto (fun z => riemannCompletedZeta z * z) (𝓝[{0}ᶜ] 0) (𝓝 (-1))\n[PROOFSTEP]\nsimp_rw [riemannCompletedZeta, add_mul, sub_mul]\n[GOAL]\ncase h3\ns : ℂ\nhs' : s ≠ 1\nc1 :\n  ∀ (t : ℂ),\n    t ≠ 0 → t ≠ 1 → DifferentiableAt ℂ (fun u => ↑π ^ (u / 2) * riemannCompletedZeta u / Complex.Gamma (u / 2)) t\nh1 : Tendsto (fun z => ↑π ^ (z / 2)) (𝓝 0) (𝓝 1)\nh4 : Tendsto (fun z => z / 2 * Complex.Gamma (z / 2)) (𝓝[{0}ᶜ] 0) (𝓝 1)\n⊢ Tendsto (fun z => riemannCompletedZeta₀ z * z - 1 / z * z + 1 / (z - 1) * z) (𝓝[{0}ᶜ] 0) (𝓝 (-1))\n[PROOFSTEP]\nrw [show 𝓝 (-1 : ℂ) = 𝓝 (0 - 1 + 0) by rw [zero_sub, add_zero]]\n[GOAL]\ns : ℂ\nhs' : s ≠ 1\nc1 :\n  ∀ (t : ℂ),\n    t ≠ 0 → t ≠ 1 → DifferentiableAt ℂ (fun u => ↑π ^ (u / 2) * riemannCompletedZeta u / Complex.Gamma (u / 2)) t\nh1 : Tendsto (fun z => ↑π ^ (z / 2)) (𝓝 0) (𝓝 1)\nh4 : Tendsto (fun z => z / 2 * Complex.Gamma (z / 2)) (𝓝[{0}ᶜ] 0) (𝓝 1)\n⊢ 𝓝 (-1) = 𝓝 (0 - 1 + 0)\n[PROOFSTEP]\nrw [zero_sub, add_zero]\n[GOAL]\ncase h3\ns : ℂ\nhs' : s ≠ 1\nc1 :\n  ∀ (t : ℂ),\n    t ≠ 0 → t ≠ 1 → DifferentiableAt ℂ (fun u => ↑π ^ (u / 2) * riemannCompletedZeta u / Complex.Gamma (u / 2)) t\nh1 : Tendsto (fun z => ↑π ^ (z / 2)) (𝓝 0) (𝓝 1)\nh4 : Tendsto (fun z => z / 2 * Complex.Gamma (z / 2)) (𝓝[{0}ᶜ] 0) (𝓝 1)\n⊢ Tendsto (fun z => riemannCompletedZeta₀ z * z - 1 / z * z + 1 / (z - 1) * z) (𝓝[{0}ᶜ] 0) (𝓝 (0 - 1 + 0))\n[PROOFSTEP]\nrefine (Tendsto.sub ?_ ?_).add ?_\n[GOAL]\ncase h3.refine_1\ns : ℂ\nhs' : s ≠ 1\nc1 :\n  ∀ (t : ℂ),\n    t ≠ 0 → t ≠ 1 → DifferentiableAt ℂ (fun u => ↑π ^ (u / 2) * riemannCompletedZeta u / Complex.Gamma (u / 2)) t\nh1 : Tendsto (fun z => ↑π ^ (z / 2)) (𝓝 0) (𝓝 1)\nh4 : Tendsto (fun z => z / 2 * Complex.Gamma (z / 2)) (𝓝[{0}ᶜ] 0) (𝓝 1)\n⊢ Tendsto (fun z => riemannCompletedZeta₀ z * z) (𝓝[{0}ᶜ] 0) (𝓝 0)\n[PROOFSTEP]\nrefine Tendsto.mono_left ?_ nhdsWithin_le_nhds\n[GOAL]\ncase h3.refine_1\ns : ℂ\nhs' : s ≠ 1\nc1 :\n  ∀ (t : ℂ),\n    t ≠ 0 → t ≠ 1 → DifferentiableAt ℂ (fun u => ↑π ^ (u / 2) * riemannCompletedZeta u / Complex.Gamma (u / 2)) t\nh1 : Tendsto (fun z => ↑π ^ (z / 2)) (𝓝 0) (𝓝 1)\nh4 : Tendsto (fun z => z / 2 * Complex.Gamma (z / 2)) (𝓝[{0}ᶜ] 0) (𝓝 1)\n⊢ Tendsto (fun z => riemannCompletedZeta₀ z * z) (𝓝 0) (𝓝 0)\n[PROOFSTEP]\nhave : ContinuousAt riemannCompletedZeta₀ 0 := differentiable_completed_zeta₀.continuous.continuousAt\n[GOAL]\ncase h3.refine_1\ns : ℂ\nhs' : s ≠ 1\nc1 :\n  ∀ (t : ℂ),\n    t ≠ 0 → t ≠ 1 → DifferentiableAt ℂ (fun u => ↑π ^ (u / 2) * riemannCompletedZeta u / Complex.Gamma (u / 2)) t\nh1 : Tendsto (fun z => ↑π ^ (z / 2)) (𝓝 0) (𝓝 1)\nh4 : Tendsto (fun z => z / 2 * Complex.Gamma (z / 2)) (𝓝[{0}ᶜ] 0) (𝓝 1)\nthis : ContinuousAt riemannCompletedZeta₀ 0\n⊢ Tendsto (fun z => riemannCompletedZeta₀ z * z) (𝓝 0) (𝓝 0)\n[PROOFSTEP]\nsimpa only [id.def, mul_zero] using Tendsto.mul this tendsto_id\n[GOAL]\ncase h3.refine_2\ns : ℂ\nhs' : s ≠ 1\nc1 :\n  ∀ (t : ℂ),\n    t ≠ 0 → t ≠ 1 → DifferentiableAt ℂ (fun u => ↑π ^ (u / 2) * riemannCompletedZeta u / Complex.Gamma (u / 2)) t\nh1 : Tendsto (fun z => ↑π ^ (z / 2)) (𝓝 0) (𝓝 1)\nh4 : Tendsto (fun z => z / 2 * Complex.Gamma (z / 2)) (𝓝[{0}ᶜ] 0) (𝓝 1)\n⊢ Tendsto (fun z => 1 / z * z) (𝓝[{0}ᶜ] 0) (𝓝 1)\n[PROOFSTEP]\nrefine tendsto_const_nhds.congr' (eventuallyEq_of_mem self_mem_nhdsWithin fun t ht => ?_)\n[GOAL]\ncase h3.refine_2\ns : ℂ\nhs' : s ≠ 1\nc1 :\n  ∀ (t : ℂ),\n    t ≠ 0 → t ≠ 1 → DifferentiableAt ℂ (fun u => ↑π ^ (u / 2) * riemannCompletedZeta u / Complex.Gamma (u / 2)) t\nh1 : Tendsto (fun z => ↑π ^ (z / 2)) (𝓝 0) (𝓝 1)\nh4 : Tendsto (fun z => z / 2 * Complex.Gamma (z / 2)) (𝓝[{0}ᶜ] 0) (𝓝 1)\nt : ℂ\nht : t ∈ {0}ᶜ\n⊢ 1 = 1 / t * t\n[PROOFSTEP]\nsimp_rw [one_div_mul_cancel ht]\n[GOAL]\ncase h3.refine_3\ns : ℂ\nhs' : s ≠ 1\nc1 :\n  ∀ (t : ℂ),\n    t ≠ 0 → t ≠ 1 → DifferentiableAt ℂ (fun u => ↑π ^ (u / 2) * riemannCompletedZeta u / Complex.Gamma (u / 2)) t\nh1 : Tendsto (fun z => ↑π ^ (z / 2)) (𝓝 0) (𝓝 1)\nh4 : Tendsto (fun z => z / 2 * Complex.Gamma (z / 2)) (𝓝[{0}ᶜ] 0) (𝓝 1)\n⊢ Tendsto (fun z => 1 / (z - 1) * z) (𝓝[{0}ᶜ] 0) (𝓝 0)\n[PROOFSTEP]\nrefine Tendsto.mono_left ?_ nhdsWithin_le_nhds\n[GOAL]\ncase h3.refine_3\ns : ℂ\nhs' : s ≠ 1\nc1 :\n  ∀ (t : ℂ),\n    t ≠ 0 → t ≠ 1 → DifferentiableAt ℂ (fun u => ↑π ^ (u / 2) * riemannCompletedZeta u / Complex.Gamma (u / 2)) t\nh1 : Tendsto (fun z => ↑π ^ (z / 2)) (𝓝 0) (𝓝 1)\nh4 : Tendsto (fun z => z / 2 * Complex.Gamma (z / 2)) (𝓝[{0}ᶜ] 0) (𝓝 1)\n⊢ Tendsto (fun z => 1 / (z - 1) * z) (𝓝 0) (𝓝 0)\n[PROOFSTEP]\nsuffices ContinuousAt (fun z : ℂ => 1 / (z - 1)) 0 by simpa only [id.def, mul_zero] using Tendsto.mul this tendsto_id\n[GOAL]\ns : ℂ\nhs' : s ≠ 1\nc1 :\n  ∀ (t : ℂ),\n    t ≠ 0 → t ≠ 1 → DifferentiableAt ℂ (fun u => ↑π ^ (u / 2) * riemannCompletedZeta u / Complex.Gamma (u / 2)) t\nh1 : Tendsto (fun z => ↑π ^ (z / 2)) (𝓝 0) (𝓝 1)\nh4 : Tendsto (fun z => z / 2 * Complex.Gamma (z / 2)) (𝓝[{0}ᶜ] 0) (𝓝 1)\nthis : ContinuousAt (fun z => 1 / (z - 1)) 0\n⊢ Tendsto (fun z => 1 / (z - 1) * z) (𝓝 0) (𝓝 0)\n[PROOFSTEP]\nsimpa only [id.def, mul_zero] using Tendsto.mul this tendsto_id\n[GOAL]\ncase h3.refine_3\ns : ℂ\nhs' : s ≠ 1\nc1 :\n  ∀ (t : ℂ),\n    t ≠ 0 → t ≠ 1 → DifferentiableAt ℂ (fun u => ↑π ^ (u / 2) * riemannCompletedZeta u / Complex.Gamma (u / 2)) t\nh1 : Tendsto (fun z => ↑π ^ (z / 2)) (𝓝 0) (𝓝 1)\nh4 : Tendsto (fun z => z / 2 * Complex.Gamma (z / 2)) (𝓝[{0}ᶜ] 0) (𝓝 1)\n⊢ ContinuousAt (fun z => 1 / (z - 1)) 0\n[PROOFSTEP]\nrefine continuousAt_const.div (continuousAt_id.sub continuousAt_const) ?_\n[GOAL]\ncase h3.refine_3\ns : ℂ\nhs' : s ≠ 1\nc1 :\n  ∀ (t : ℂ),\n    t ≠ 0 → t ≠ 1 → DifferentiableAt ℂ (fun u => ↑π ^ (u / 2) * riemannCompletedZeta u / Complex.Gamma (u / 2)) t\nh1 : Tendsto (fun z => ↑π ^ (z / 2)) (𝓝 0) (𝓝 1)\nh4 : Tendsto (fun z => z / 2 * Complex.Gamma (z / 2)) (𝓝[{0}ᶜ] 0) (𝓝 1)\n⊢ 0 - 1 ≠ 0\n[PROOFSTEP]\nsimpa only [zero_sub] using neg_ne_zero.mpr one_ne_zero\n[GOAL]\ns : ℂ\nhs' : s ≠ 1\nc1 :\n  ∀ (t : ℂ),\n    t ≠ 0 → t ≠ 1 → DifferentiableAt ℂ (fun u => ↑π ^ (u / 2) * riemannCompletedZeta u / Complex.Gamma (u / 2)) t\nc2 : Tendsto (fun s => ↑π ^ (s / 2) * riemannCompletedZeta s / Complex.Gamma (s / 2)) (𝓝[{0}ᶜ] 0) (𝓝 (-1 / 2))\n⊢ DifferentiableAt ℂ riemannZeta s\n[PROOFSTEP]\nrcases ne_or_eq s 0 with (hs | rfl)\n[GOAL]\ncase inl\ns : ℂ\nhs' : s ≠ 1\nc1 :\n  ∀ (t : ℂ),\n    t ≠ 0 → t ≠ 1 → DifferentiableAt ℂ (fun u => ↑π ^ (u / 2) * riemannCompletedZeta u / Complex.Gamma (u / 2)) t\nc2 : Tendsto (fun s => ↑π ^ (s / 2) * riemannCompletedZeta s / Complex.Gamma (s / 2)) (𝓝[{0}ᶜ] 0) (𝓝 (-1 / 2))\nhs : s ≠ 0\n⊢ DifferentiableAt ℂ riemannZeta s\n[PROOFSTEP]\nhave : {(0 : ℂ)}ᶜ ∈ 𝓝 s := isOpen_compl_singleton.mem_nhds hs\n[GOAL]\ncase inl\ns : ℂ\nhs' : s ≠ 1\nc1 :\n  ∀ (t : ℂ),\n    t ≠ 0 → t ≠ 1 → DifferentiableAt ℂ (fun u => ↑π ^ (u / 2) * riemannCompletedZeta u / Complex.Gamma (u / 2)) t\nc2 : Tendsto (fun s => ↑π ^ (s / 2) * riemannCompletedZeta s / Complex.Gamma (s / 2)) (𝓝[{0}ᶜ] 0) (𝓝 (-1 / 2))\nhs : s ≠ 0\nthis : {0}ᶜ ∈ 𝓝 s\n⊢ DifferentiableAt ℂ riemannZeta s\n[PROOFSTEP]\nrefine (c1 s hs hs').congr_of_eventuallyEq (eventuallyEq_of_mem this fun x hx => ?_)\n[GOAL]\ncase inl\ns : ℂ\nhs' : s ≠ 1\nc1 :\n  ∀ (t : ℂ),\n    t ≠ 0 → t ≠ 1 → DifferentiableAt ℂ (fun u => ↑π ^ (u / 2) * riemannCompletedZeta u / Complex.Gamma (u / 2)) t\nc2 : Tendsto (fun s => ↑π ^ (s / 2) * riemannCompletedZeta s / Complex.Gamma (s / 2)) (𝓝[{0}ᶜ] 0) (𝓝 (-1 / 2))\nhs : s ≠ 0\nthis : {0}ᶜ ∈ 𝓝 s\nx : ℂ\nhx : x ∈ {0}ᶜ\n⊢ riemannZeta x = ↑π ^ (x / 2) * riemannCompletedZeta x / Complex.Gamma (x / 2)\n[PROOFSTEP]\nrw [riemannZeta_def]\n[GOAL]\ncase inl\ns : ℂ\nhs' : s ≠ 1\nc1 :\n  ∀ (t : ℂ),\n    t ≠ 0 → t ≠ 1 → DifferentiableAt ℂ (fun u => ↑π ^ (u / 2) * riemannCompletedZeta u / Complex.Gamma (u / 2)) t\nc2 : Tendsto (fun s => ↑π ^ (s / 2) * riemannCompletedZeta s / Complex.Gamma (s / 2)) (𝓝[{0}ᶜ] 0) (𝓝 (-1 / 2))\nhs : s ≠ 0\nthis : {0}ᶜ ∈ 𝓝 s\nx : ℂ\nhx : x ∈ {0}ᶜ\n⊢ Function.update (fun s => ↑π ^ (s / 2) * riemannCompletedZeta s / Complex.Gamma (s / 2)) 0 (-1 / 2) x =\n    ↑π ^ (x / 2) * riemannCompletedZeta x / Complex.Gamma (x / 2)\n[PROOFSTEP]\napply Function.update_noteq hx\n[GOAL]\ncase inr\nc1 :\n  ∀ (t : ℂ),\n    t ≠ 0 → t ≠ 1 → DifferentiableAt ℂ (fun u => ↑π ^ (u / 2) * riemannCompletedZeta u / Complex.Gamma (u / 2)) t\nc2 : Tendsto (fun s => ↑π ^ (s / 2) * riemannCompletedZeta s / Complex.Gamma (s / 2)) (𝓝[{0}ᶜ] 0) (𝓝 (-1 / 2))\nhs' : 0 ≠ 1\n⊢ DifferentiableAt ℂ riemannZeta 0\n[PROOFSTEP]\nrw [riemannZeta, ← (lim_eq_iff ⟨-1 / 2, c2⟩).mpr c2]\n[GOAL]\ncase inr\nc1 :\n  ∀ (t : ℂ),\n    t ≠ 0 → t ≠ 1 → DifferentiableAt ℂ (fun u => ↑π ^ (u / 2) * riemannCompletedZeta u / Complex.Gamma (u / 2)) t\nc2 : Tendsto (fun s => ↑π ^ (s / 2) * riemannCompletedZeta s / Complex.Gamma (s / 2)) (𝓝[{0}ᶜ] 0) (𝓝 (-1 / 2))\nhs' : 0 ≠ 1\n⊢ DifferentiableAt ℂ\n    (Function.update (fun s => ↑π ^ (s / 2) * riemannCompletedZeta s / Complex.Gamma (s / 2)) 0\n      (lim (map (fun s => ↑π ^ (s / 2) * riemannCompletedZeta s / Complex.Gamma (s / 2)) (𝓝[{0}ᶜ] 0))))\n    0\n[PROOFSTEP]\nhave S_nhds : {(1 : ℂ)}ᶜ ∈ 𝓝 (0 : ℂ) := isOpen_compl_singleton.mem_nhds hs'\n[GOAL]\ncase inr\nc1 :\n  ∀ (t : ℂ),\n    t ≠ 0 → t ≠ 1 → DifferentiableAt ℂ (fun u => ↑π ^ (u / 2) * riemannCompletedZeta u / Complex.Gamma (u / 2)) t\nc2 : Tendsto (fun s => ↑π ^ (s / 2) * riemannCompletedZeta s / Complex.Gamma (s / 2)) (𝓝[{0}ᶜ] 0) (𝓝 (-1 / 2))\nhs' : 0 ≠ 1\nS_nhds : {1}ᶜ ∈ 𝓝 0\n⊢ DifferentiableAt ℂ\n    (Function.update (fun s => ↑π ^ (s / 2) * riemannCompletedZeta s / Complex.Gamma (s / 2)) 0\n      (lim (map (fun s => ↑π ^ (s / 2) * riemannCompletedZeta s / Complex.Gamma (s / 2)) (𝓝[{0}ᶜ] 0))))\n    0\n[PROOFSTEP]\nrefine\n  ((Complex.differentiableOn_update_limUnder_of_isLittleO S_nhds (fun t ht => (c1 t ht.2 ht.1).differentiableWithinAt)\n          ?_)\n        0 hs').differentiableAt\n    S_nhds\n[GOAL]\ncase inr\nc1 :\n  ∀ (t : ℂ),\n    t ≠ 0 → t ≠ 1 → DifferentiableAt ℂ (fun u => ↑π ^ (u / 2) * riemannCompletedZeta u / Complex.Gamma (u / 2)) t\nc2 : Tendsto (fun s => ↑π ^ (s / 2) * riemannCompletedZeta s / Complex.Gamma (s / 2)) (𝓝[{0}ᶜ] 0) (𝓝 (-1 / 2))\nhs' : 0 ≠ 1\nS_nhds : {1}ᶜ ∈ 𝓝 0\n⊢ (fun z =>\n      ↑π ^ (z / 2) * riemannCompletedZeta z / Complex.Gamma (z / 2) -\n        ↑π ^ (0 / 2) * riemannCompletedZeta 0 / Complex.Gamma (0 / 2)) =o[𝓝[{0}ᶜ] 0]\n    fun z => (z - 0)⁻¹\n[PROOFSTEP]\nsimp only [zero_div, div_zero, Complex.Gamma_zero, mul_zero, cpow_zero, sub_zero]\n  -- Remains to show completed zeta is `o (s ^ (-1))` near 0.\n[GOAL]\ncase inr\nc1 :\n  ∀ (t : ℂ),\n    t ≠ 0 → t ≠ 1 → DifferentiableAt ℂ (fun u => ↑π ^ (u / 2) * riemannCompletedZeta u / Complex.Gamma (u / 2)) t\nc2 : Tendsto (fun s => ↑π ^ (s / 2) * riemannCompletedZeta s / Complex.Gamma (s / 2)) (𝓝[{0}ᶜ] 0) (𝓝 (-1 / 2))\nhs' : 0 ≠ 1\nS_nhds : {1}ᶜ ∈ 𝓝 0\n⊢ (fun z => ↑π ^ (z / 2) * riemannCompletedZeta z / Complex.Gamma (z / 2)) =o[𝓝[{0}ᶜ] 0] fun z => z⁻¹\n[PROOFSTEP]\nrefine (isBigO_const_of_tendsto c2 <| one_ne_zero' ℂ).trans_isLittleO ?_\n[GOAL]\ncase inr\nc1 :\n  ∀ (t : ℂ),\n    t ≠ 0 → t ≠ 1 → DifferentiableAt ℂ (fun u => ↑π ^ (u / 2) * riemannCompletedZeta u / Complex.Gamma (u / 2)) t\nc2 : Tendsto (fun s => ↑π ^ (s / 2) * riemannCompletedZeta s / Complex.Gamma (s / 2)) (𝓝[{0}ᶜ] 0) (𝓝 (-1 / 2))\nhs' : 0 ≠ 1\nS_nhds : {1}ᶜ ∈ 𝓝 0\n⊢ (fun _x => 1) =o[𝓝[{0}ᶜ] 0] fun z => z⁻¹\n[PROOFSTEP]\nrw [isLittleO_iff_tendsto']\n[GOAL]\ncase inr\nc1 :\n  ∀ (t : ℂ),\n    t ≠ 0 → t ≠ 1 → DifferentiableAt ℂ (fun u => ↑π ^ (u / 2) * riemannCompletedZeta u / Complex.Gamma (u / 2)) t\nc2 : Tendsto (fun s => ↑π ^ (s / 2) * riemannCompletedZeta s / Complex.Gamma (s / 2)) (𝓝[{0}ᶜ] 0) (𝓝 (-1 / 2))\nhs' : 0 ≠ 1\nS_nhds : {1}ᶜ ∈ 𝓝 0\n⊢ Tendsto (fun x => 1 / x⁻¹) (𝓝[{0}ᶜ] 0) (𝓝 0)\n[PROOFSTEP]\nexact Tendsto.congr (fun x => by rw [← one_div, one_div_one_div]) nhdsWithin_le_nhds\n[GOAL]\nc1 :\n  ∀ (t : ℂ),\n    t ≠ 0 → t ≠ 1 → DifferentiableAt ℂ (fun u => ↑π ^ (u / 2) * riemannCompletedZeta u / Complex.Gamma (u / 2)) t\nc2 : Tendsto (fun s => ↑π ^ (s / 2) * riemannCompletedZeta s / Complex.Gamma (s / 2)) (𝓝[{0}ᶜ] 0) (𝓝 (-1 / 2))\nhs' : 0 ≠ 1\nS_nhds : {1}ᶜ ∈ 𝓝 0\nx : ℂ\n⊢ x = 1 / x⁻¹\n[PROOFSTEP]\nrw [← one_div, one_div_one_div]\n[GOAL]\ncase inr\nc1 :\n  ∀ (t : ℂ),\n    t ≠ 0 → t ≠ 1 → DifferentiableAt ℂ (fun u => ↑π ^ (u / 2) * riemannCompletedZeta u / Complex.Gamma (u / 2)) t\nc2 : Tendsto (fun s => ↑π ^ (s / 2) * riemannCompletedZeta s / Complex.Gamma (s / 2)) (𝓝[{0}ᶜ] 0) (𝓝 (-1 / 2))\nhs' : 0 ≠ 1\nS_nhds : {1}ᶜ ∈ 𝓝 0\n⊢ ∀ᶠ (x : ℂ) in 𝓝[{0}ᶜ] 0, x⁻¹ = 0 → 1 = 0\n[PROOFSTEP]\nexact eventually_of_mem self_mem_nhdsWithin fun x hx hx' => (hx <| inv_eq_zero.mp hx').elim\n[GOAL]\nn : ℕ\n⊢ riemannZeta (-2 * (↑n + 1)) = 0\n[PROOFSTEP]\nhave : (-2 : ℂ) * (n + 1) ≠ 0 := mul_ne_zero (neg_ne_zero.mpr two_ne_zero) (Nat.cast_add_one_ne_zero n)\n[GOAL]\nn : ℕ\nthis : -2 * (↑n + 1) ≠ 0\n⊢ riemannZeta (-2 * (↑n + 1)) = 0\n[PROOFSTEP]\nrw [riemannZeta, Function.update_noteq this, show -2 * ((n : ℂ) + 1) / 2 = -↑(n + 1) by push_cast ; ring,\n  Complex.Gamma_neg_nat_eq_zero, div_zero]\n[GOAL]\nn : ℕ\nthis : -2 * (↑n + 1) ≠ 0\n⊢ -2 * (↑n + 1) / 2 = -↑(n + 1)\n[PROOFSTEP]\npush_cast\n[GOAL]\nn : ℕ\nthis : -2 * (↑n + 1) ≠ 0\n⊢ -2 * (↑n + 1) / 2 = -(↑n + 1)\n[PROOFSTEP]\nring\n[GOAL]\ns : ℂ\nhs : 1 / 2 < s.re\n⊢ HasMellin (indicator (Ioc 0 1) fun t => 1 / ↑(sqrt t)) s (1 / (s - 1 / 2))\n[PROOFSTEP]\nhave h1 : EqOn (fun t => 1 / ↑(sqrt t) : ℝ → ℂ) (fun t => (t : ℂ) ^ (-1 / 2 : ℂ)) (Ioc 0 1) :=\n  by\n  intro t ht\n  simp_rw [neg_div, cpow_neg, ← one_div, sqrt_eq_rpow, ofReal_cpow ht.1.le]\n  norm_num\n[GOAL]\ns : ℂ\nhs : 1 / 2 < s.re\n⊢ EqOn (fun t => 1 / ↑(sqrt t)) (fun t => ↑t ^ (-1 / 2)) (Ioc 0 1)\n[PROOFSTEP]\nintro t ht\n[GOAL]\ns : ℂ\nhs : 1 / 2 < s.re\nt : ℝ\nht : t ∈ Ioc 0 1\n⊢ (fun t => 1 / ↑(sqrt t)) t = (fun t => ↑t ^ (-1 / 2)) t\n[PROOFSTEP]\nsimp_rw [neg_div, cpow_neg, ← one_div, sqrt_eq_rpow, ofReal_cpow ht.1.le]\n[GOAL]\ns : ℂ\nhs : 1 / 2 < s.re\nt : ℝ\nht : t ∈ Ioc 0 1\n⊢ 1 / ↑t ^ ↑(1 / 2) = 1 / ↑t ^ (1 / 2)\n[PROOFSTEP]\nnorm_num\n[GOAL]\ns : ℂ\nhs : 1 / 2 < s.re\nh1 : EqOn (fun t => 1 / ↑(sqrt t)) (fun t => ↑t ^ (-1 / 2)) (Ioc 0 1)\n⊢ HasMellin (indicator (Ioc 0 1) fun t => 1 / ↑(sqrt t)) s (1 / (s - 1 / 2))\n[PROOFSTEP]\nsimp_rw [indicator_congr h1, (by ring : s - 1 / 2 = s + -1 / 2)]\n[GOAL]\ns : ℂ\nhs : 1 / 2 < s.re\nh1 : EqOn (fun t => 1 / ↑(sqrt t)) (fun t => ↑t ^ (-1 / 2)) (Ioc 0 1)\n⊢ s - 1 / 2 = s + -1 / 2\n[PROOFSTEP]\nring\n[GOAL]\ns : ℂ\nhs : 1 / 2 < s.re\nh1 : EqOn (fun t => 1 / ↑(sqrt t)) (fun t => ↑t ^ (-1 / 2)) (Ioc 0 1)\n⊢ HasMellin (indicator (Ioc 0 1) fun t => ↑t ^ (-1 / 2)) s (1 / (s + -1 / 2))\n[PROOFSTEP]\nconvert hasMellin_cpow_Ioc (-1 / 2) _\n[GOAL]\ncase convert_2\ns : ℂ\nhs : 1 / 2 < s.re\nh1 : EqOn (fun t => 1 / ↑(sqrt t)) (fun t => ↑t ^ (-1 / 2)) (Ioc 0 1)\n⊢ 0 < s.re + (-1 / 2).re\n[PROOFSTEP]\nrwa [(by norm_num : (-1 / 2 : ℂ) = (-1 / 2 : ℝ)), ofReal_re, neg_div, ← sub_eq_add_neg, sub_pos]\n[GOAL]\ns : ℂ\nhs : 1 / 2 < s.re\nh1 : EqOn (fun t => 1 / ↑(sqrt t)) (fun t => ↑t ^ (-1 / 2)) (Ioc 0 1)\n⊢ -1 / 2 = ↑(-1 / 2)\n[PROOFSTEP]\nnorm_num\n[GOAL]\ns : ℂ\nhs : 1 / 2 < s.re\n⊢ HasMellin (indicator (Ioc 0 1) fun t => (1 - 1 / ↑(sqrt t)) / 2) s (1 / (2 * s) - 1 / (2 * s - 1))\n[PROOFSTEP]\nhave step1 : HasMellin (indicator (Ioc 0 1) (fun t => 1 - 1 / ↑(sqrt t) : ℝ → ℂ)) s (1 / s - 1 / (s - 1 / 2)) :=\n  by\n  have a := hasMellin_one_Ioc (one_half_pos.trans hs)\n  have b := hasMellin_one_div_sqrt_Ioc hs\n  simpa only [a.2, b.2, ← indicator_sub] using\n    hasMellin_sub a.1\n      b.1\n        -- todo: implement something like \"indicator.const_div\" (blocked by the port for now)\n[GOAL]\ns : ℂ\nhs : 1 / 2 < s.re\n⊢ HasMellin (indicator (Ioc 0 1) fun t => 1 - 1 / ↑(sqrt t)) s (1 / s - 1 / (s - 1 / 2))\n[PROOFSTEP]\nhave a := hasMellin_one_Ioc (one_half_pos.trans hs)\n[GOAL]\ns : ℂ\nhs : 1 / 2 < s.re\na : HasMellin (indicator (Ioc 0 1) fun x => 1) s (1 / s)\n⊢ HasMellin (indicator (Ioc 0 1) fun t => 1 - 1 / ↑(sqrt t)) s (1 / s - 1 / (s - 1 / 2))\n[PROOFSTEP]\nhave b := hasMellin_one_div_sqrt_Ioc hs\n[GOAL]\ns : ℂ\nhs : 1 / 2 < s.re\na : HasMellin (indicator (Ioc 0 1) fun x => 1) s (1 / s)\nb : HasMellin (indicator (Ioc 0 1) fun t => 1 / ↑(sqrt t)) s (1 / (s - 1 / 2))\n⊢ HasMellin (indicator (Ioc 0 1) fun t => 1 - 1 / ↑(sqrt t)) s (1 / s - 1 / (s - 1 / 2))\n[PROOFSTEP]\nsimpa only [a.2, b.2, ← indicator_sub] using\n  hasMellin_sub a.1\n    b.1\n      -- todo: implement something like \"indicator.const_div\" (blocked by the port for now)\n[GOAL]\ns : ℂ\nhs : 1 / 2 < s.re\nstep1 : HasMellin (indicator (Ioc 0 1) fun t => 1 - 1 / ↑(sqrt t)) s (1 / s - 1 / (s - 1 / 2))\n⊢ HasMellin (indicator (Ioc 0 1) fun t => (1 - 1 / ↑(sqrt t)) / 2) s (1 / (2 * s) - 1 / (2 * s - 1))\n[PROOFSTEP]\nrw [show\n    ((Ioc 0 1).indicator fun t => (1 - 1 / (sqrt t : ℂ)) / 2) = fun t =>\n      (Ioc 0 1).indicator (fun t => 1 - 1 / (sqrt t : ℂ)) t / 2\n    by ext1 t; simp_rw [div_eq_inv_mul, indicator_mul_right]]\n[GOAL]\ns : ℂ\nhs : 1 / 2 < s.re\nstep1 : HasMellin (indicator (Ioc 0 1) fun t => 1 - 1 / ↑(sqrt t)) s (1 / s - 1 / (s - 1 / 2))\n⊢ (indicator (Ioc 0 1) fun t => (1 - 1 / ↑(sqrt t)) / 2) = fun t =>\n    indicator (Ioc 0 1) (fun t => 1 - 1 / ↑(sqrt t)) t / 2\n[PROOFSTEP]\next1 t\n[GOAL]\ncase h\ns : ℂ\nhs : 1 / 2 < s.re\nstep1 : HasMellin (indicator (Ioc 0 1) fun t => 1 - 1 / ↑(sqrt t)) s (1 / s - 1 / (s - 1 / 2))\nt : ℝ\n⊢ indicator (Ioc 0 1) (fun t => (1 - 1 / ↑(sqrt t)) / 2) t = indicator (Ioc 0 1) (fun t => 1 - 1 / ↑(sqrt t)) t / 2\n[PROOFSTEP]\nsimp_rw [div_eq_inv_mul, indicator_mul_right]\n[GOAL]\ns : ℂ\nhs : 1 / 2 < s.re\nstep1 : HasMellin (indicator (Ioc 0 1) fun t => 1 - 1 / ↑(sqrt t)) s (1 / s - 1 / (s - 1 / 2))\n⊢ HasMellin (fun t => indicator (Ioc 0 1) (fun t => 1 - 1 / ↑(sqrt t)) t / 2) s (1 / (2 * s) - 1 / (2 * s - 1))\n[PROOFSTEP]\nsimp_rw [HasMellin, mellin_div_const, step1.2, sub_div, div_div]\n[GOAL]\ns : ℂ\nhs : 1 / 2 < s.re\nstep1 : HasMellin (indicator (Ioc 0 1) fun t => 1 - 1 / ↑(sqrt t)) s (1 / s - 1 / (s - 1 / 2))\n⊢ MellinConvergent (fun t => indicator (Ioc 0 1) (fun t => 1 - 1 / ↑(sqrt t)) t / 2) s ∧\n    1 / (s * 2) - 1 / ((s - 1 / 2) * 2) = 1 / (2 * s) - 1 / (2 * s - 1)\n[PROOFSTEP]\nrefine ⟨step1.1.div_const _, ?_⟩\n[GOAL]\ns : ℂ\nhs : 1 / 2 < s.re\nstep1 : HasMellin (indicator (Ioc 0 1) fun t => 1 - 1 / ↑(sqrt t)) s (1 / s - 1 / (s - 1 / 2))\n⊢ 1 / (s * 2) - 1 / ((s - 1 / 2) * 2) = 1 / (2 * s) - 1 / (2 * s - 1)\n[PROOFSTEP]\nrw [mul_comm, sub_mul, div_mul_cancel _ (two_ne_zero' ℂ), mul_comm s 2]\n[GOAL]\ns : ℂ\nhs : 1 / 2 < s.re\n⊢ mellin zetaKernel₂ s = mellin zetaKernel₁ s + 1 / (2 * s) - 1 / (2 * s - 1)\n[PROOFSTEP]\nhave h :=\n  mellinConvergent_of_isBigO_rpow_exp pi_pos locally_integrable_zetaKernel₁ isBigO_atTop_zetaKernel₁\n    isBigO_zero_zetaKernel₁ hs\n[GOAL]\ns : ℂ\nhs : 1 / 2 < s.re\nh : MellinConvergent zetaKernel₁ s\n⊢ mellin zetaKernel₂ s = mellin zetaKernel₁ s + 1 / (2 * s) - 1 / (2 * s - 1)\n[PROOFSTEP]\nhave h' := hasMellin_one_div_sqrt_sub_one_div_two_Ioc hs\n[GOAL]\ns : ℂ\nhs : 1 / 2 < s.re\nh : MellinConvergent zetaKernel₁ s\nh' : HasMellin (indicator (Ioc 0 1) fun t => (1 - 1 / ↑(sqrt t)) / 2) s (1 / (2 * s) - 1 / (2 * s - 1))\n⊢ mellin zetaKernel₂ s = mellin zetaKernel₁ s + 1 / (2 * s) - 1 / (2 * s - 1)\n[PROOFSTEP]\nsimp_rw [zetaKernel₂, Pi.add_def, add_sub_assoc, (hasMellin_add h h'.1).2, h'.2]\n[GOAL]\ns : ℂ\nhs : 1 < s.re\n⊢ riemannCompletedZeta s = mellin zetaKernel₁ (s / 2)\n[PROOFSTEP]\nhave : 1 / 2 < (s / 2).re :=\n  by\n  rw [show s / 2 = ↑(2⁻¹ : ℝ) * s by push_cast ; rw [mul_comm]; rfl]\n  rwa [ofReal_mul_re, ← div_eq_inv_mul, div_lt_div_right (zero_lt_two' ℝ)]\n[GOAL]\ns : ℂ\nhs : 1 < s.re\n⊢ 1 / 2 < (s / 2).re\n[PROOFSTEP]\nrw [show s / 2 = ↑(2⁻¹ : ℝ) * s by push_cast ; rw [mul_comm]; rfl]\n[GOAL]\ns : ℂ\nhs : 1 < s.re\n⊢ s / 2 = ↑2⁻¹ * s\n[PROOFSTEP]\npush_cast\n[GOAL]\ns : ℂ\nhs : 1 < s.re\n⊢ s / 2 = 2⁻¹ * s\n[PROOFSTEP]\nrw [mul_comm]\n[GOAL]\ns : ℂ\nhs : 1 < s.re\n⊢ s / 2 = s * 2⁻¹\n[PROOFSTEP]\nrfl\n[GOAL]\ns : ℂ\nhs : 1 < s.re\n⊢ 1 / 2 < (↑2⁻¹ * s).re\n[PROOFSTEP]\nrwa [ofReal_mul_re, ← div_eq_inv_mul, div_lt_div_right (zero_lt_two' ℝ)]\n[GOAL]\ns : ℂ\nhs : 1 < s.re\nthis : 1 / 2 < (s / 2).re\n⊢ riemannCompletedZeta s = mellin zetaKernel₁ (s / 2)\n[PROOFSTEP]\nrw [riemannCompletedZeta, riemannCompletedZeta₀, mellin_zetaKernel₂_eq_of_lt_re this, sub_add, sub_sub, ← add_sub]\n[GOAL]\ns : ℂ\nhs : 1 < s.re\nthis : 1 / 2 < (s / 2).re\n⊢ mellin zetaKernel₁ (s / 2) + (1 / (2 * (s / 2)) - (1 / (2 * (s / 2) - 1) + (1 / s - 1 / (s - 1)))) =\n    mellin zetaKernel₁ (s / 2)\n[PROOFSTEP]\nconv_rhs => rw [← add_zero (mellin zetaKernel₁ <| s / 2)]\n[GOAL]\ns : ℂ\nhs : 1 < s.re\nthis : 1 / 2 < (s / 2).re\n| mellin zetaKernel₁ (s / 2)\n[PROOFSTEP]\nrw [← add_zero (mellin zetaKernel₁ <| s / 2)]\n[GOAL]\ns : ℂ\nhs : 1 < s.re\nthis : 1 / 2 < (s / 2).re\n| mellin zetaKernel₁ (s / 2)\n[PROOFSTEP]\nrw [← add_zero (mellin zetaKernel₁ <| s / 2)]\n[GOAL]\ns : ℂ\nhs : 1 < s.re\nthis : 1 / 2 < (s / 2).re\n| mellin zetaKernel₁ (s / 2)\n[PROOFSTEP]\nrw [← add_zero (mellin zetaKernel₁ <| s / 2)]\n[GOAL]\ns : ℂ\nhs : 1 < s.re\nthis : 1 / 2 < (s / 2).re\n⊢ mellin zetaKernel₁ (s / 2) + (1 / (2 * (s / 2)) - (1 / (2 * (s / 2) - 1) + (1 / s - 1 / (s - 1)))) =\n    mellin zetaKernel₁ (s / 2) + 0\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_a\ns : ℂ\nhs : 1 < s.re\nthis : 1 / 2 < (s / 2).re\n⊢ 1 / (2 * (s / 2)) - (1 / (2 * (s / 2) - 1) + (1 / s - 1 / (s - 1))) = 0\n[PROOFSTEP]\nrw [mul_div_cancel' _ (two_ne_zero' ℂ)]\n[GOAL]\ncase e_a\ns : ℂ\nhs : 1 < s.re\nthis : 1 / 2 < (s / 2).re\n⊢ 1 / s - (1 / (s - 1) + (1 / s - 1 / (s - 1))) = 0\n[PROOFSTEP]\nabel\n[GOAL]\ncase e_a\ns : ℂ\nhs : 1 < s.re\nthis : 1 / 2 < (s / 2).re\n⊢ 1 / s - (1 / (s - 1) + (1 / s - 1 / (s - 1))) = 0\n[PROOFSTEP]\nabel\n[GOAL]\ns : ℂ\nhs : 0 < s.re\nn : ℕ\n⊢ ∫ (t : ℝ) in Ioi 0, ↑t ^ (s - 1) * ↑(rexp (-π * t * (↑n + 1) ^ 2)) =\n    ↑π ^ (-s) * Complex.Gamma s * (1 / (↑n + 1) ^ (2 * s))\n[PROOFSTEP]\nrw [Complex.Gamma_eq_integral hs, GammaIntegral_eq_mellin]\n[GOAL]\ns : ℂ\nhs : 0 < s.re\nn : ℕ\n⊢ ∫ (t : ℝ) in Ioi 0, ↑t ^ (s - 1) * ↑(rexp (-π * t * (↑n + 1) ^ 2)) =\n    ↑π ^ (-s) * mellin (fun x => ↑(rexp (-x))) s * (1 / (↑n + 1) ^ (2 * s))\n[PROOFSTEP]\nconv_rhs =>\n  congr\n  rw [← smul_eq_mul, ← mellin_comp_mul_left _ _ pi_pos]\n[GOAL]\ns : ℂ\nhs : 0 < s.re\nn : ℕ\n| ↑π ^ (-s) * mellin (fun x => ↑(rexp (-x))) s * (1 / (↑n + 1) ^ (2 * s))\n[PROOFSTEP]\n  congr\n  rw [← smul_eq_mul, ← mellin_comp_mul_left _ _ pi_pos]\n[GOAL]\ns : ℂ\nhs : 0 < s.re\nn : ℕ\n| ↑π ^ (-s) * mellin (fun x => ↑(rexp (-x))) s * (1 / (↑n + 1) ^ (2 * s))\n[PROOFSTEP]\n  congr\n  rw [← smul_eq_mul, ← mellin_comp_mul_left _ _ pi_pos]\n[GOAL]\ns : ℂ\nhs : 0 < s.re\nn : ℕ\n| ↑π ^ (-s) * mellin (fun x => ↑(rexp (-x))) s * (1 / (↑n + 1) ^ (2 * s))\n[PROOFSTEP]\ncongr\n[GOAL]\ncase a\ns : ℂ\nhs : 0 < s.re\nn : ℕ\n| ↑π ^ (-s) * mellin (fun x => ↑(rexp (-x))) s\ncase a s : ℂ hs : 0 < s.re n : ℕ | 1 / (↑n + 1) ^ (2 * s)\n[PROOFSTEP]\nrw [← smul_eq_mul, ← mellin_comp_mul_left _ _ pi_pos]\n[GOAL]\ns : ℂ\nhs : 0 < s.re\nn : ℕ\n⊢ ∫ (t : ℝ) in Ioi 0, ↑t ^ (s - 1) * ↑(rexp (-π * t * (↑n + 1) ^ 2)) =\n    mellin (fun t => ↑(rexp (-(π * t)))) s * (1 / (↑n + 1) ^ (2 * s))\n[PROOFSTEP]\nhave : 1 / ((n : ℂ) + 1) ^ (2 * s) = (((n : ℝ) + 1) ^ (2 : ℝ) : ℂ) ^ (-s) :=\n  by\n  rw [(by norm_num : (n : ℂ) + 1 = ↑((n : ℝ) + 1)), (by norm_num : 2 * s = ↑(2 : ℝ) * s), cpow_mul_ofReal_nonneg,\n    one_div, cpow_neg]\n  rw [← Nat.cast_succ]\n  exact Nat.cast_nonneg _\n[GOAL]\ns : ℂ\nhs : 0 < s.re\nn : ℕ\n⊢ 1 / (↑n + 1) ^ (2 * s) = ↑((↑n + 1) ^ 2) ^ (-s)\n[PROOFSTEP]\nrw [(by norm_num : (n : ℂ) + 1 = ↑((n : ℝ) + 1)), (by norm_num : 2 * s = ↑(2 : ℝ) * s), cpow_mul_ofReal_nonneg, one_div,\n  cpow_neg]\n[GOAL]\ns : ℂ\nhs : 0 < s.re\nn : ℕ\n⊢ ↑n + 1 = ↑(↑n + 1)\n[PROOFSTEP]\nnorm_num\n[GOAL]\ns : ℂ\nhs : 0 < s.re\nn : ℕ\n⊢ 2 * s = ↑2 * s\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase hx\ns : ℂ\nhs : 0 < s.re\nn : ℕ\n⊢ 0 ≤ ↑n + 1\n[PROOFSTEP]\nrw [← Nat.cast_succ]\n[GOAL]\ncase hx\ns : ℂ\nhs : 0 < s.re\nn : ℕ\n⊢ 0 ≤ ↑(Nat.succ n)\n[PROOFSTEP]\nexact Nat.cast_nonneg _\n[GOAL]\ns : ℂ\nhs : 0 < s.re\nn : ℕ\nthis : 1 / (↑n + 1) ^ (2 * s) = ↑((↑n + 1) ^ 2) ^ (-s)\n⊢ ∫ (t : ℝ) in Ioi 0, ↑t ^ (s - 1) * ↑(rexp (-π * t * (↑n + 1) ^ 2)) =\n    mellin (fun t => ↑(rexp (-(π * t)))) s * (1 / (↑n + 1) ^ (2 * s))\n[PROOFSTEP]\nconv_rhs => rw [this, mul_comm, ← smul_eq_mul]\n[GOAL]\ns : ℂ\nhs : 0 < s.re\nn : ℕ\nthis : 1 / (↑n + 1) ^ (2 * s) = ↑((↑n + 1) ^ 2) ^ (-s)\n| mellin (fun t => ↑(rexp (-(π * t)))) s * (1 / (↑n + 1) ^ (2 * s))\n[PROOFSTEP]\nrw [this, mul_comm, ← smul_eq_mul]\n[GOAL]\ns : ℂ\nhs : 0 < s.re\nn : ℕ\nthis : 1 / (↑n + 1) ^ (2 * s) = ↑((↑n + 1) ^ 2) ^ (-s)\n| mellin (fun t => ↑(rexp (-(π * t)))) s * (1 / (↑n + 1) ^ (2 * s))\n[PROOFSTEP]\nrw [this, mul_comm, ← smul_eq_mul]\n[GOAL]\ns : ℂ\nhs : 0 < s.re\nn : ℕ\nthis : 1 / (↑n + 1) ^ (2 * s) = ↑((↑n + 1) ^ 2) ^ (-s)\n| mellin (fun t => ↑(rexp (-(π * t)))) s * (1 / (↑n + 1) ^ (2 * s))\n[PROOFSTEP]\nrw [this, mul_comm, ← smul_eq_mul]\n[GOAL]\ns : ℂ\nhs : 0 < s.re\nn : ℕ\nthis : 1 / (↑n + 1) ^ (2 * s) = ↑((↑n + 1) ^ 2) ^ (-s)\n⊢ ∫ (t : ℝ) in Ioi 0, ↑t ^ (s - 1) * ↑(rexp (-π * t * (↑n + 1) ^ 2)) =\n    ↑((↑n + 1) ^ 2) ^ (-s) • mellin (fun t => ↑(rexp (-(π * t)))) s\n[PROOFSTEP]\nrw [← mellin_comp_mul_right _ _ (show 0 < ((n : ℝ) + 1) ^ (2 : ℝ) by positivity)]\n[GOAL]\ns : ℂ\nhs : 0 < s.re\nn : ℕ\nthis : 1 / (↑n + 1) ^ (2 * s) = ↑((↑n + 1) ^ 2) ^ (-s)\n⊢ 0 < (↑n + 1) ^ 2\n[PROOFSTEP]\npositivity\n[GOAL]\ns : ℂ\nhs : 0 < s.re\nn : ℕ\nthis : 1 / (↑n + 1) ^ (2 * s) = ↑((↑n + 1) ^ 2) ^ (-s)\n⊢ ∫ (t : ℝ) in Ioi 0, ↑t ^ (s - 1) * ↑(rexp (-π * t * (↑n + 1) ^ 2)) =\n    mellin (fun t => ↑(rexp (-(π * (t * (↑n + 1) ^ 2))))) s\n[PROOFSTEP]\nrefine set_integral_congr measurableSet_Ioi fun t _ => ?_\n[GOAL]\ns : ℂ\nhs : 0 < s.re\nn : ℕ\nthis : 1 / (↑n + 1) ^ (2 * s) = ↑((↑n + 1) ^ 2) ^ (-s)\nt : ℝ\nx✝ : t ∈ Ioi 0\n⊢ ↑t ^ (s - 1) * ↑(rexp (-π * t * (↑n + 1) ^ 2)) = ↑t ^ (s - 1) • (fun t => ↑(rexp (-(π * (t * (↑n + 1) ^ 2))))) t\n[PROOFSTEP]\nsimp_rw [smul_eq_mul]\n[GOAL]\ns : ℂ\nhs : 0 < s.re\nn : ℕ\nthis : 1 / (↑n + 1) ^ (2 * s) = ↑((↑n + 1) ^ 2) ^ (-s)\nt : ℝ\nx✝ : t ∈ Ioi 0\n⊢ ↑t ^ (s - 1) * ↑(rexp (-π * t * (↑n + 1) ^ 2)) = ↑t ^ (s - 1) * ↑(rexp (-(π * (t * (↑n + 1) ^ 2))))\n[PROOFSTEP]\ncongr 3\n[GOAL]\ncase e_a.e_r.e_x\ns : ℂ\nhs : 0 < s.re\nn : ℕ\nthis : 1 / (↑n + 1) ^ (2 * s) = ↑((↑n + 1) ^ 2) ^ (-s)\nt : ℝ\nx✝ : t ∈ Ioi 0\n⊢ -π * t * (↑n + 1) ^ 2 = -(π * (t * (↑n + 1) ^ 2))\n[PROOFSTEP]\nconv_rhs => rw [← Nat.cast_two, rpow_nat_cast]\n[GOAL]\ns : ℂ\nhs : 0 < s.re\nn : ℕ\nthis : 1 / (↑n + 1) ^ (2 * s) = ↑((↑n + 1) ^ 2) ^ (-s)\nt : ℝ\nx✝ : t ∈ Ioi 0\n| -(π * (t * (↑n + 1) ^ 2))\n[PROOFSTEP]\nrw [← Nat.cast_two, rpow_nat_cast]\n[GOAL]\ns : ℂ\nhs : 0 < s.re\nn : ℕ\nthis : 1 / (↑n + 1) ^ (2 * s) = ↑((↑n + 1) ^ 2) ^ (-s)\nt : ℝ\nx✝ : t ∈ Ioi 0\n| -(π * (t * (↑n + 1) ^ 2))\n[PROOFSTEP]\nrw [← Nat.cast_two, rpow_nat_cast]\n[GOAL]\ns : ℂ\nhs : 0 < s.re\nn : ℕ\nthis : 1 / (↑n + 1) ^ (2 * s) = ↑((↑n + 1) ^ 2) ^ (-s)\nt : ℝ\nx✝ : t ∈ Ioi 0\n| -(π * (t * (↑n + 1) ^ 2))\n[PROOFSTEP]\nrw [← Nat.cast_two, rpow_nat_cast]\n[GOAL]\ncase e_a.e_r.e_x\ns : ℂ\nhs : 0 < s.re\nn : ℕ\nthis : 1 / (↑n + 1) ^ (2 * s) = ↑((↑n + 1) ^ 2) ^ (-s)\nt : ℝ\nx✝ : t ∈ Ioi 0\n⊢ -π * t * (↑n + 1) ^ 2 = -(π * (t * (↑n + 1) ^ 2))\n[PROOFSTEP]\nring\n[GOAL]\ns : ℂ\nhs : 1 / 2 < s.re\n⊢ mellin zetaKernel₁ s = ↑π ^ (-s) * Complex.Gamma s * ∑' (n : ℕ), 1 / (↑n + 1) ^ (2 * s)\n[PROOFSTEP]\nlet bd : ℕ → ℝ → ℝ := fun n t => t ^ (s.re - 1) * exp (-π * t * ((n : ℝ) + 1) ^ 2)\n[GOAL]\ns : ℂ\nhs : 1 / 2 < s.re\nbd : ℕ → ℝ → ℝ := fun n t => t ^ (s.re - 1) * rexp (-π * t * (↑n + 1) ^ 2)\n⊢ mellin zetaKernel₁ s = ↑π ^ (-s) * Complex.Gamma s * ∑' (n : ℕ), 1 / (↑n + 1) ^ (2 * s)\n[PROOFSTEP]\nlet f : ℕ → ℝ → ℂ := fun n t => (t : ℂ) ^ (s - 1) * exp (-π * t * ((n : ℝ) + 1) ^ 2)\n[GOAL]\ns : ℂ\nhs : 1 / 2 < s.re\nbd : ℕ → ℝ → ℝ := fun n t => t ^ (s.re - 1) * rexp (-π * t * (↑n + 1) ^ 2)\nf : ℕ → ℝ → ℂ := fun n t => ↑t ^ (s - 1) * ↑(rexp (-π * t * (↑n + 1) ^ 2))\n⊢ mellin zetaKernel₁ s = ↑π ^ (-s) * Complex.Gamma s * ∑' (n : ℕ), 1 / (↑n + 1) ^ (2 * s)\n[PROOFSTEP]\nhave hm : MeasurableSet (Ioi (0 : ℝ)) := measurableSet_Ioi\n[GOAL]\ns : ℂ\nhs : 1 / 2 < s.re\nbd : ℕ → ℝ → ℝ := fun n t => t ^ (s.re - 1) * rexp (-π * t * (↑n + 1) ^ 2)\nf : ℕ → ℝ → ℂ := fun n t => ↑t ^ (s - 1) * ↑(rexp (-π * t * (↑n + 1) ^ 2))\nhm : MeasurableSet (Ioi 0)\n⊢ mellin zetaKernel₁ s = ↑π ^ (-s) * Complex.Gamma s * ∑' (n : ℕ), 1 / (↑n + 1) ^ (2 * s)\n[PROOFSTEP]\nhave h_norm : ∀ (n : ℕ) {t : ℝ} (_ : 0 < t), ‖f n t‖ = bd n t :=\n  by\n  intro n t ht\n  rw [norm_mul, Complex.norm_eq_abs, Complex.norm_eq_abs, Complex.abs_of_nonneg (exp_pos _).le,\n    abs_cpow_eq_rpow_re_of_pos ht, sub_re, one_re]\n[GOAL]\ns : ℂ\nhs : 1 / 2 < s.re\nbd : ℕ → ℝ → ℝ := fun n t => t ^ (s.re - 1) * rexp (-π * t * (↑n + 1) ^ 2)\nf : ℕ → ℝ → ℂ := fun n t => ↑t ^ (s - 1) * ↑(rexp (-π * t * (↑n + 1) ^ 2))\nhm : MeasurableSet (Ioi 0)\n⊢ ∀ (n : ℕ) {t : ℝ}, 0 < t → ‖f n t‖ = bd n t\n[PROOFSTEP]\nintro n t ht\n[GOAL]\ns : ℂ\nhs : 1 / 2 < s.re\nbd : ℕ → ℝ → ℝ := fun n t => t ^ (s.re - 1) * rexp (-π * t * (↑n + 1) ^ 2)\nf : ℕ → ℝ → ℂ := fun n t => ↑t ^ (s - 1) * ↑(rexp (-π * t * (↑n + 1) ^ 2))\nhm : MeasurableSet (Ioi 0)\nn : ℕ\nt : ℝ\nht : 0 < t\n⊢ ‖f n t‖ = bd n t\n[PROOFSTEP]\nrw [norm_mul, Complex.norm_eq_abs, Complex.norm_eq_abs, Complex.abs_of_nonneg (exp_pos _).le,\n  abs_cpow_eq_rpow_re_of_pos ht, sub_re, one_re]\n[GOAL]\ns : ℂ\nhs : 1 / 2 < s.re\nbd : ℕ → ℝ → ℝ := fun n t => t ^ (s.re - 1) * rexp (-π * t * (↑n + 1) ^ 2)\nf : ℕ → ℝ → ℂ := fun n t => ↑t ^ (s - 1) * ↑(rexp (-π * t * (↑n + 1) ^ 2))\nhm : MeasurableSet (Ioi 0)\nh_norm : ∀ (n : ℕ) {t : ℝ}, 0 < t → ‖f n t‖ = bd n t\n⊢ mellin zetaKernel₁ s = ↑π ^ (-s) * Complex.Gamma s * ∑' (n : ℕ), 1 / (↑n + 1) ^ (2 * s)\n[PROOFSTEP]\nhave hf_meas : ∀ n : ℕ, AEStronglyMeasurable (f n) (volume.restrict <| Ioi 0) :=\n  by\n  intro n\n  refine (ContinuousOn.mul ?_ ?_).aestronglyMeasurable hm\n  · exact ContinuousAt.continuousOn fun x hx => continuousAt_ofReal_cpow_const _ _ <| Or.inr <| ne_of_gt hx\n  · apply Continuous.continuousOn\n    exact continuous_ofReal.comp (continuous_exp.comp ((continuous_const.mul continuous_id').mul continuous_const))\n[GOAL]\ns : ℂ\nhs : 1 / 2 < s.re\nbd : ℕ → ℝ → ℝ := fun n t => t ^ (s.re - 1) * rexp (-π * t * (↑n + 1) ^ 2)\nf : ℕ → ℝ → ℂ := fun n t => ↑t ^ (s - 1) * ↑(rexp (-π * t * (↑n + 1) ^ 2))\nhm : MeasurableSet (Ioi 0)\nh_norm : ∀ (n : ℕ) {t : ℝ}, 0 < t → ‖f n t‖ = bd n t\n⊢ ∀ (n : ℕ), AEStronglyMeasurable (f n) (Measure.restrict volume (Ioi 0))\n[PROOFSTEP]\nintro n\n[GOAL]\ns : ℂ\nhs : 1 / 2 < s.re\nbd : ℕ → ℝ → ℝ := fun n t => t ^ (s.re - 1) * rexp (-π * t * (↑n + 1) ^ 2)\nf : ℕ → ℝ → ℂ := fun n t => ↑t ^ (s - 1) * ↑(rexp (-π * t * (↑n + 1) ^ 2))\nhm : MeasurableSet (Ioi 0)\nh_norm : ∀ (n : ℕ) {t : ℝ}, 0 < t → ‖f n t‖ = bd n t\nn : ℕ\n⊢ AEStronglyMeasurable (f n) (Measure.restrict volume (Ioi 0))\n[PROOFSTEP]\nrefine (ContinuousOn.mul ?_ ?_).aestronglyMeasurable hm\n[GOAL]\ncase refine_1\ns : ℂ\nhs : 1 / 2 < s.re\nbd : ℕ → ℝ → ℝ := fun n t => t ^ (s.re - 1) * rexp (-π * t * (↑n + 1) ^ 2)\nf : ℕ → ℝ → ℂ := fun n t => ↑t ^ (s - 1) * ↑(rexp (-π * t * (↑n + 1) ^ 2))\nhm : MeasurableSet (Ioi 0)\nh_norm : ∀ (n : ℕ) {t : ℝ}, 0 < t → ‖f n t‖ = bd n t\nn : ℕ\n⊢ ContinuousOn (fun t => ↑t ^ (s - 1)) (Ioi 0)\n[PROOFSTEP]\nexact ContinuousAt.continuousOn fun x hx => continuousAt_ofReal_cpow_const _ _ <| Or.inr <| ne_of_gt hx\n[GOAL]\ncase refine_2\ns : ℂ\nhs : 1 / 2 < s.re\nbd : ℕ → ℝ → ℝ := fun n t => t ^ (s.re - 1) * rexp (-π * t * (↑n + 1) ^ 2)\nf : ℕ → ℝ → ℂ := fun n t => ↑t ^ (s - 1) * ↑(rexp (-π * t * (↑n + 1) ^ 2))\nhm : MeasurableSet (Ioi 0)\nh_norm : ∀ (n : ℕ) {t : ℝ}, 0 < t → ‖f n t‖ = bd n t\nn : ℕ\n⊢ ContinuousOn (fun t => ↑(rexp (-π * t * (↑n + 1) ^ 2))) (Ioi 0)\n[PROOFSTEP]\napply Continuous.continuousOn\n[GOAL]\ncase refine_2.h\ns : ℂ\nhs : 1 / 2 < s.re\nbd : ℕ → ℝ → ℝ := fun n t => t ^ (s.re - 1) * rexp (-π * t * (↑n + 1) ^ 2)\nf : ℕ → ℝ → ℂ := fun n t => ↑t ^ (s - 1) * ↑(rexp (-π * t * (↑n + 1) ^ 2))\nhm : MeasurableSet (Ioi 0)\nh_norm : ∀ (n : ℕ) {t : ℝ}, 0 < t → ‖f n t‖ = bd n t\nn : ℕ\n⊢ Continuous fun t => ↑(rexp (-π * t * (↑n + 1) ^ 2))\n[PROOFSTEP]\nexact continuous_ofReal.comp (continuous_exp.comp ((continuous_const.mul continuous_id').mul continuous_const))\n[GOAL]\ns : ℂ\nhs : 1 / 2 < s.re\nbd : ℕ → ℝ → ℝ := fun n t => t ^ (s.re - 1) * rexp (-π * t * (↑n + 1) ^ 2)\nf : ℕ → ℝ → ℂ := fun n t => ↑t ^ (s - 1) * ↑(rexp (-π * t * (↑n + 1) ^ 2))\nhm : MeasurableSet (Ioi 0)\nh_norm : ∀ (n : ℕ) {t : ℝ}, 0 < t → ‖f n t‖ = bd n t\nhf_meas : ∀ (n : ℕ), AEStronglyMeasurable (f n) (Measure.restrict volume (Ioi 0))\n⊢ mellin zetaKernel₁ s = ↑π ^ (-s) * Complex.Gamma s * ∑' (n : ℕ), 1 / (↑n + 1) ^ (2 * s)\n[PROOFSTEP]\nhave h_le : ∀ n : ℕ, ∀ᵐ t : ℝ ∂volume.restrict (Ioi 0), ‖f n t‖ ≤ bd n t := fun n =>\n  (ae_restrict_iff' hm).mpr (ae_of_all _ fun t ht => le_of_eq (h_norm n ht))\n[GOAL]\ns : ℂ\nhs : 1 / 2 < s.re\nbd : ℕ → ℝ → ℝ := fun n t => t ^ (s.re - 1) * rexp (-π * t * (↑n + 1) ^ 2)\nf : ℕ → ℝ → ℂ := fun n t => ↑t ^ (s - 1) * ↑(rexp (-π * t * (↑n + 1) ^ 2))\nhm : MeasurableSet (Ioi 0)\nh_norm : ∀ (n : ℕ) {t : ℝ}, 0 < t → ‖f n t‖ = bd n t\nhf_meas : ∀ (n : ℕ), AEStronglyMeasurable (f n) (Measure.restrict volume (Ioi 0))\nh_le : ∀ (n : ℕ), ∀ᵐ (t : ℝ) ∂Measure.restrict volume (Ioi 0), ‖f n t‖ ≤ bd n t\n⊢ mellin zetaKernel₁ s = ↑π ^ (-s) * Complex.Gamma s * ∑' (n : ℕ), 1 / (↑n + 1) ^ (2 * s)\n[PROOFSTEP]\nhave h_sum0 : ∀ {t : ℝ} (_ : 0 < t), HasSum (fun n => f n t) ((t : ℂ) ^ (s - 1) * zetaKernel₁ t) :=\n  by\n  intro t ht\n  rw [zetaKernel₁]\n  convert (hasSum_ofReal.mpr (summable_exp_neg_pi_mul_nat_sq ht).hasSum).mul_left ((t : ℂ) ^ (s - 1))\n  simp only [neg_mul, ofReal_exp, ofReal_neg, ofReal_mul, ofReal_pow, ofReal_add, ofReal_nat_cast, ofReal_one,\n    ofReal_tsum]\n[GOAL]\ns : ℂ\nhs : 1 / 2 < s.re\nbd : ℕ → ℝ → ℝ := fun n t => t ^ (s.re - 1) * rexp (-π * t * (↑n + 1) ^ 2)\nf : ℕ → ℝ → ℂ := fun n t => ↑t ^ (s - 1) * ↑(rexp (-π * t * (↑n + 1) ^ 2))\nhm : MeasurableSet (Ioi 0)\nh_norm : ∀ (n : ℕ) {t : ℝ}, 0 < t → ‖f n t‖ = bd n t\nhf_meas : ∀ (n : ℕ), AEStronglyMeasurable (f n) (Measure.restrict volume (Ioi 0))\nh_le : ∀ (n : ℕ), ∀ᵐ (t : ℝ) ∂Measure.restrict volume (Ioi 0), ‖f n t‖ ≤ bd n t\n⊢ ∀ {t : ℝ}, 0 < t → HasSum (fun n => f n t) (↑t ^ (s - 1) * zetaKernel₁ t)\n[PROOFSTEP]\nintro t ht\n[GOAL]\ns : ℂ\nhs : 1 / 2 < s.re\nbd : ℕ → ℝ → ℝ := fun n t => t ^ (s.re - 1) * rexp (-π * t * (↑n + 1) ^ 2)\nf : ℕ → ℝ → ℂ := fun n t => ↑t ^ (s - 1) * ↑(rexp (-π * t * (↑n + 1) ^ 2))\nhm : MeasurableSet (Ioi 0)\nh_norm : ∀ (n : ℕ) {t : ℝ}, 0 < t → ‖f n t‖ = bd n t\nhf_meas : ∀ (n : ℕ), AEStronglyMeasurable (f n) (Measure.restrict volume (Ioi 0))\nh_le : ∀ (n : ℕ), ∀ᵐ (t : ℝ) ∂Measure.restrict volume (Ioi 0), ‖f n t‖ ≤ bd n t\nt : ℝ\nht : 0 < t\n⊢ HasSum (fun n => f n t) (↑t ^ (s - 1) * zetaKernel₁ t)\n[PROOFSTEP]\nrw [zetaKernel₁]\n[GOAL]\ns : ℂ\nhs : 1 / 2 < s.re\nbd : ℕ → ℝ → ℝ := fun n t => t ^ (s.re - 1) * rexp (-π * t * (↑n + 1) ^ 2)\nf : ℕ → ℝ → ℂ := fun n t => ↑t ^ (s - 1) * ↑(rexp (-π * t * (↑n + 1) ^ 2))\nhm : MeasurableSet (Ioi 0)\nh_norm : ∀ (n : ℕ) {t : ℝ}, 0 < t → ‖f n t‖ = bd n t\nhf_meas : ∀ (n : ℕ), AEStronglyMeasurable (f n) (Measure.restrict volume (Ioi 0))\nh_le : ∀ (n : ℕ), ∀ᵐ (t : ℝ) ∂Measure.restrict volume (Ioi 0), ‖f n t‖ ≤ bd n t\nt : ℝ\nht : 0 < t\n⊢ HasSum (fun n => f n t) (↑t ^ (s - 1) * ∑' (n : ℕ), ↑(rexp (-π * t * (↑n + 1) ^ 2)))\n[PROOFSTEP]\nconvert (hasSum_ofReal.mpr (summable_exp_neg_pi_mul_nat_sq ht).hasSum).mul_left ((t : ℂ) ^ (s - 1))\n[GOAL]\ncase h.e'_6.h.e'_6\ns : ℂ\nhs : 1 / 2 < s.re\nbd : ℕ → ℝ → ℝ := fun n t => t ^ (s.re - 1) * rexp (-π * t * (↑n + 1) ^ 2)\nf : ℕ → ℝ → ℂ := fun n t => ↑t ^ (s - 1) * ↑(rexp (-π * t * (↑n + 1) ^ 2))\nhm : MeasurableSet (Ioi 0)\nh_norm : ∀ (n : ℕ) {t : ℝ}, 0 < t → ‖f n t‖ = bd n t\nhf_meas : ∀ (n : ℕ), AEStronglyMeasurable (f n) (Measure.restrict volume (Ioi 0))\nh_le : ∀ (n : ℕ), ∀ᵐ (t : ℝ) ∂Measure.restrict volume (Ioi 0), ‖f n t‖ ≤ bd n t\nt : ℝ\nht : 0 < t\n⊢ ∑' (n : ℕ), ↑(rexp (-π * t * (↑n + 1) ^ 2)) = ↑(∑' (b : ℕ), rexp (-π * t * (↑b + 1) ^ 2))\n[PROOFSTEP]\nsimp only [neg_mul, ofReal_exp, ofReal_neg, ofReal_mul, ofReal_pow, ofReal_add, ofReal_nat_cast, ofReal_one,\n  ofReal_tsum]\n[GOAL]\ns : ℂ\nhs : 1 / 2 < s.re\nbd : ℕ → ℝ → ℝ := fun n t => t ^ (s.re - 1) * rexp (-π * t * (↑n + 1) ^ 2)\nf : ℕ → ℝ → ℂ := fun n t => ↑t ^ (s - 1) * ↑(rexp (-π * t * (↑n + 1) ^ 2))\nhm : MeasurableSet (Ioi 0)\nh_norm : ∀ (n : ℕ) {t : ℝ}, 0 < t → ‖f n t‖ = bd n t\nhf_meas : ∀ (n : ℕ), AEStronglyMeasurable (f n) (Measure.restrict volume (Ioi 0))\nh_le : ∀ (n : ℕ), ∀ᵐ (t : ℝ) ∂Measure.restrict volume (Ioi 0), ‖f n t‖ ≤ bd n t\nh_sum0 : ∀ {t : ℝ}, 0 < t → HasSum (fun n => f n t) (↑t ^ (s - 1) * zetaKernel₁ t)\n⊢ mellin zetaKernel₁ s = ↑π ^ (-s) * Complex.Gamma s * ∑' (n : ℕ), 1 / (↑n + 1) ^ (2 * s)\n[PROOFSTEP]\nhave h_sum' : ∀ᵐ t : ℝ ∂volume.restrict (Ioi 0), HasSum (fun n : ℕ => f n t) ((t : ℂ) ^ (s - 1) * zetaKernel₁ t) :=\n  (ae_restrict_iff' hm).mpr (ae_of_all _ fun t ht => h_sum0 ht)\n[GOAL]\ns : ℂ\nhs : 1 / 2 < s.re\nbd : ℕ → ℝ → ℝ := fun n t => t ^ (s.re - 1) * rexp (-π * t * (↑n + 1) ^ 2)\nf : ℕ → ℝ → ℂ := fun n t => ↑t ^ (s - 1) * ↑(rexp (-π * t * (↑n + 1) ^ 2))\nhm : MeasurableSet (Ioi 0)\nh_norm : ∀ (n : ℕ) {t : ℝ}, 0 < t → ‖f n t‖ = bd n t\nhf_meas : ∀ (n : ℕ), AEStronglyMeasurable (f n) (Measure.restrict volume (Ioi 0))\nh_le : ∀ (n : ℕ), ∀ᵐ (t : ℝ) ∂Measure.restrict volume (Ioi 0), ‖f n t‖ ≤ bd n t\nh_sum0 : ∀ {t : ℝ}, 0 < t → HasSum (fun n => f n t) (↑t ^ (s - 1) * zetaKernel₁ t)\nh_sum' : ∀ᵐ (t : ℝ) ∂Measure.restrict volume (Ioi 0), HasSum (fun n => f n t) (↑t ^ (s - 1) * zetaKernel₁ t)\n⊢ mellin zetaKernel₁ s = ↑π ^ (-s) * Complex.Gamma s * ∑' (n : ℕ), 1 / (↑n + 1) ^ (2 * s)\n[PROOFSTEP]\nhave h_sum : ∀ᵐ t : ℝ ∂volume.restrict (Ioi 0), Summable fun n : ℕ => bd n t :=\n  by\n  refine (ae_restrict_iff' hm).mpr (ae_of_all _ fun t ht => ?_)\n  simpa only [fun n => h_norm n ht] using summable_norm_iff.mpr (h_sum0 ht).summable\n[GOAL]\ns : ℂ\nhs : 1 / 2 < s.re\nbd : ℕ → ℝ → ℝ := fun n t => t ^ (s.re - 1) * rexp (-π * t * (↑n + 1) ^ 2)\nf : ℕ → ℝ → ℂ := fun n t => ↑t ^ (s - 1) * ↑(rexp (-π * t * (↑n + 1) ^ 2))\nhm : MeasurableSet (Ioi 0)\nh_norm : ∀ (n : ℕ) {t : ℝ}, 0 < t → ‖f n t‖ = bd n t\nhf_meas : ∀ (n : ℕ), AEStronglyMeasurable (f n) (Measure.restrict volume (Ioi 0))\nh_le : ∀ (n : ℕ), ∀ᵐ (t : ℝ) ∂Measure.restrict volume (Ioi 0), ‖f n t‖ ≤ bd n t\nh_sum0 : ∀ {t : ℝ}, 0 < t → HasSum (fun n => f n t) (↑t ^ (s - 1) * zetaKernel₁ t)\nh_sum' : ∀ᵐ (t : ℝ) ∂Measure.restrict volume (Ioi 0), HasSum (fun n => f n t) (↑t ^ (s - 1) * zetaKernel₁ t)\n⊢ ∀ᵐ (t : ℝ) ∂Measure.restrict volume (Ioi 0), Summable fun n => bd n t\n[PROOFSTEP]\nrefine (ae_restrict_iff' hm).mpr (ae_of_all _ fun t ht => ?_)\n[GOAL]\ns : ℂ\nhs : 1 / 2 < s.re\nbd : ℕ → ℝ → ℝ := fun n t => t ^ (s.re - 1) * rexp (-π * t * (↑n + 1) ^ 2)\nf : ℕ → ℝ → ℂ := fun n t => ↑t ^ (s - 1) * ↑(rexp (-π * t * (↑n + 1) ^ 2))\nhm : MeasurableSet (Ioi 0)\nh_norm : ∀ (n : ℕ) {t : ℝ}, 0 < t → ‖f n t‖ = bd n t\nhf_meas : ∀ (n : ℕ), AEStronglyMeasurable (f n) (Measure.restrict volume (Ioi 0))\nh_le : ∀ (n : ℕ), ∀ᵐ (t : ℝ) ∂Measure.restrict volume (Ioi 0), ‖f n t‖ ≤ bd n t\nh_sum0 : ∀ {t : ℝ}, 0 < t → HasSum (fun n => f n t) (↑t ^ (s - 1) * zetaKernel₁ t)\nh_sum' : ∀ᵐ (t : ℝ) ∂Measure.restrict volume (Ioi 0), HasSum (fun n => f n t) (↑t ^ (s - 1) * zetaKernel₁ t)\nt : ℝ\nht : t ∈ Ioi 0\n⊢ Summable fun n => bd n t\n[PROOFSTEP]\nsimpa only [fun n => h_norm n ht] using summable_norm_iff.mpr (h_sum0 ht).summable\n[GOAL]\ns : ℂ\nhs : 1 / 2 < s.re\nbd : ℕ → ℝ → ℝ := fun n t => t ^ (s.re - 1) * rexp (-π * t * (↑n + 1) ^ 2)\nf : ℕ → ℝ → ℂ := fun n t => ↑t ^ (s - 1) * ↑(rexp (-π * t * (↑n + 1) ^ 2))\nhm : MeasurableSet (Ioi 0)\nh_norm : ∀ (n : ℕ) {t : ℝ}, 0 < t → ‖f n t‖ = bd n t\nhf_meas : ∀ (n : ℕ), AEStronglyMeasurable (f n) (Measure.restrict volume (Ioi 0))\nh_le : ∀ (n : ℕ), ∀ᵐ (t : ℝ) ∂Measure.restrict volume (Ioi 0), ‖f n t‖ ≤ bd n t\nh_sum0 : ∀ {t : ℝ}, 0 < t → HasSum (fun n => f n t) (↑t ^ (s - 1) * zetaKernel₁ t)\nh_sum' : ∀ᵐ (t : ℝ) ∂Measure.restrict volume (Ioi 0), HasSum (fun n => f n t) (↑t ^ (s - 1) * zetaKernel₁ t)\nh_sum : ∀ᵐ (t : ℝ) ∂Measure.restrict volume (Ioi 0), Summable fun n => bd n t\n⊢ mellin zetaKernel₁ s = ↑π ^ (-s) * Complex.Gamma s * ∑' (n : ℕ), 1 / (↑n + 1) ^ (2 * s)\n[PROOFSTEP]\nhave h_int : Integrable (fun t : ℝ => ∑' n : ℕ, bd n t) (volume.restrict (Ioi 0)) :=\n  by\n  refine\n    IntegrableOn.congr_fun\n      (mellinConvergent_of_isBigO_rpow_exp pi_pos locally_integrable_zetaKernel₁ isBigO_atTop_zetaKernel₁\n          isBigO_zero_zetaKernel₁ hs).norm\n      (fun t ht => ?_) hm\n  rw [tsum_mul_left, norm_smul, Complex.norm_eq_abs, abs_cpow_eq_rpow_re_of_pos ht, sub_re, one_re, zetaKernel₁, ←\n    ofReal_tsum, Complex.norm_eq_abs, Complex.abs_of_nonneg]\n  exact tsum_nonneg fun n => (exp_pos _).le\n[GOAL]\ns : ℂ\nhs : 1 / 2 < s.re\nbd : ℕ → ℝ → ℝ := fun n t => t ^ (s.re - 1) * rexp (-π * t * (↑n + 1) ^ 2)\nf : ℕ → ℝ → ℂ := fun n t => ↑t ^ (s - 1) * ↑(rexp (-π * t * (↑n + 1) ^ 2))\nhm : MeasurableSet (Ioi 0)\nh_norm : ∀ (n : ℕ) {t : ℝ}, 0 < t → ‖f n t‖ = bd n t\nhf_meas : ∀ (n : ℕ), AEStronglyMeasurable (f n) (Measure.restrict volume (Ioi 0))\nh_le : ∀ (n : ℕ), ∀ᵐ (t : ℝ) ∂Measure.restrict volume (Ioi 0), ‖f n t‖ ≤ bd n t\nh_sum0 : ∀ {t : ℝ}, 0 < t → HasSum (fun n => f n t) (↑t ^ (s - 1) * zetaKernel₁ t)\nh_sum' : ∀ᵐ (t : ℝ) ∂Measure.restrict volume (Ioi 0), HasSum (fun n => f n t) (↑t ^ (s - 1) * zetaKernel₁ t)\nh_sum : ∀ᵐ (t : ℝ) ∂Measure.restrict volume (Ioi 0), Summable fun n => bd n t\n⊢ Integrable fun t => ∑' (n : ℕ), bd n t\n[PROOFSTEP]\nrefine\n  IntegrableOn.congr_fun\n    (mellinConvergent_of_isBigO_rpow_exp pi_pos locally_integrable_zetaKernel₁ isBigO_atTop_zetaKernel₁\n        isBigO_zero_zetaKernel₁ hs).norm\n    (fun t ht => ?_) hm\n[GOAL]\ns : ℂ\nhs : 1 / 2 < s.re\nbd : ℕ → ℝ → ℝ := fun n t => t ^ (s.re - 1) * rexp (-π * t * (↑n + 1) ^ 2)\nf : ℕ → ℝ → ℂ := fun n t => ↑t ^ (s - 1) * ↑(rexp (-π * t * (↑n + 1) ^ 2))\nhm : MeasurableSet (Ioi 0)\nh_norm : ∀ (n : ℕ) {t : ℝ}, 0 < t → ‖f n t‖ = bd n t\nhf_meas : ∀ (n : ℕ), AEStronglyMeasurable (f n) (Measure.restrict volume (Ioi 0))\nh_le : ∀ (n : ℕ), ∀ᵐ (t : ℝ) ∂Measure.restrict volume (Ioi 0), ‖f n t‖ ≤ bd n t\nh_sum0 : ∀ {t : ℝ}, 0 < t → HasSum (fun n => f n t) (↑t ^ (s - 1) * zetaKernel₁ t)\nh_sum' : ∀ᵐ (t : ℝ) ∂Measure.restrict volume (Ioi 0), HasSum (fun n => f n t) (↑t ^ (s - 1) * zetaKernel₁ t)\nh_sum : ∀ᵐ (t : ℝ) ∂Measure.restrict volume (Ioi 0), Summable fun n => bd n t\nt : ℝ\nht : t ∈ Ioi 0\n⊢ ‖↑t ^ (s - 1) • zetaKernel₁ t‖ = ∑' (n : ℕ), bd n t\n[PROOFSTEP]\nrw [tsum_mul_left, norm_smul, Complex.norm_eq_abs, abs_cpow_eq_rpow_re_of_pos ht, sub_re, one_re, zetaKernel₁, ←\n  ofReal_tsum, Complex.norm_eq_abs, Complex.abs_of_nonneg]\n[GOAL]\ns : ℂ\nhs : 1 / 2 < s.re\nbd : ℕ → ℝ → ℝ := fun n t => t ^ (s.re - 1) * rexp (-π * t * (↑n + 1) ^ 2)\nf : ℕ → ℝ → ℂ := fun n t => ↑t ^ (s - 1) * ↑(rexp (-π * t * (↑n + 1) ^ 2))\nhm : MeasurableSet (Ioi 0)\nh_norm : ∀ (n : ℕ) {t : ℝ}, 0 < t → ‖f n t‖ = bd n t\nhf_meas : ∀ (n : ℕ), AEStronglyMeasurable (f n) (Measure.restrict volume (Ioi 0))\nh_le : ∀ (n : ℕ), ∀ᵐ (t : ℝ) ∂Measure.restrict volume (Ioi 0), ‖f n t‖ ≤ bd n t\nh_sum0 : ∀ {t : ℝ}, 0 < t → HasSum (fun n => f n t) (↑t ^ (s - 1) * zetaKernel₁ t)\nh_sum' : ∀ᵐ (t : ℝ) ∂Measure.restrict volume (Ioi 0), HasSum (fun n => f n t) (↑t ^ (s - 1) * zetaKernel₁ t)\nh_sum : ∀ᵐ (t : ℝ) ∂Measure.restrict volume (Ioi 0), Summable fun n => bd n t\nt : ℝ\nht : t ∈ Ioi 0\n⊢ 0 ≤ ∑' (a : ℕ), rexp (-π * t * (↑a + 1) ^ 2)\n[PROOFSTEP]\nexact tsum_nonneg fun n => (exp_pos _).le\n[GOAL]\ns : ℂ\nhs : 1 / 2 < s.re\nbd : ℕ → ℝ → ℝ := fun n t => t ^ (s.re - 1) * rexp (-π * t * (↑n + 1) ^ 2)\nf : ℕ → ℝ → ℂ := fun n t => ↑t ^ (s - 1) * ↑(rexp (-π * t * (↑n + 1) ^ 2))\nhm : MeasurableSet (Ioi 0)\nh_norm : ∀ (n : ℕ) {t : ℝ}, 0 < t → ‖f n t‖ = bd n t\nhf_meas : ∀ (n : ℕ), AEStronglyMeasurable (f n) (Measure.restrict volume (Ioi 0))\nh_le : ∀ (n : ℕ), ∀ᵐ (t : ℝ) ∂Measure.restrict volume (Ioi 0), ‖f n t‖ ≤ bd n t\nh_sum0 : ∀ {t : ℝ}, 0 < t → HasSum (fun n => f n t) (↑t ^ (s - 1) * zetaKernel₁ t)\nh_sum' : ∀ᵐ (t : ℝ) ∂Measure.restrict volume (Ioi 0), HasSum (fun n => f n t) (↑t ^ (s - 1) * zetaKernel₁ t)\nh_sum : ∀ᵐ (t : ℝ) ∂Measure.restrict volume (Ioi 0), Summable fun n => bd n t\nh_int : Integrable fun t => ∑' (n : ℕ), bd n t\n⊢ mellin zetaKernel₁ s = ↑π ^ (-s) * Complex.Gamma s * ∑' (n : ℕ), 1 / (↑n + 1) ^ (2 * s)\n[PROOFSTEP]\nrw [← tsum_mul_left]\n[GOAL]\ns : ℂ\nhs : 1 / 2 < s.re\nbd : ℕ → ℝ → ℝ := fun n t => t ^ (s.re - 1) * rexp (-π * t * (↑n + 1) ^ 2)\nf : ℕ → ℝ → ℂ := fun n t => ↑t ^ (s - 1) * ↑(rexp (-π * t * (↑n + 1) ^ 2))\nhm : MeasurableSet (Ioi 0)\nh_norm : ∀ (n : ℕ) {t : ℝ}, 0 < t → ‖f n t‖ = bd n t\nhf_meas : ∀ (n : ℕ), AEStronglyMeasurable (f n) (Measure.restrict volume (Ioi 0))\nh_le : ∀ (n : ℕ), ∀ᵐ (t : ℝ) ∂Measure.restrict volume (Ioi 0), ‖f n t‖ ≤ bd n t\nh_sum0 : ∀ {t : ℝ}, 0 < t → HasSum (fun n => f n t) (↑t ^ (s - 1) * zetaKernel₁ t)\nh_sum' : ∀ᵐ (t : ℝ) ∂Measure.restrict volume (Ioi 0), HasSum (fun n => f n t) (↑t ^ (s - 1) * zetaKernel₁ t)\nh_sum : ∀ᵐ (t : ℝ) ∂Measure.restrict volume (Ioi 0), Summable fun n => bd n t\nh_int : Integrable fun t => ∑' (n : ℕ), bd n t\n⊢ mellin zetaKernel₁ s = ∑' (x : ℕ), ↑π ^ (-s) * Complex.Gamma s * (1 / (↑x + 1) ^ (2 * s))\n[PROOFSTEP]\nsimp_rw [← integral_cpow_mul_exp_neg_pi_mul_sq (one_half_pos.trans hs)]\n[GOAL]\ns : ℂ\nhs : 1 / 2 < s.re\nbd : ℕ → ℝ → ℝ := fun n t => t ^ (s.re - 1) * rexp (-π * t * (↑n + 1) ^ 2)\nf : ℕ → ℝ → ℂ := fun n t => ↑t ^ (s - 1) * ↑(rexp (-π * t * (↑n + 1) ^ 2))\nhm : MeasurableSet (Ioi 0)\nh_norm : ∀ (n : ℕ) {t : ℝ}, 0 < t → ‖f n t‖ = bd n t\nhf_meas : ∀ (n : ℕ), AEStronglyMeasurable (f n) (Measure.restrict volume (Ioi 0))\nh_le : ∀ (n : ℕ), ∀ᵐ (t : ℝ) ∂Measure.restrict volume (Ioi 0), ‖f n t‖ ≤ bd n t\nh_sum0 : ∀ {t : ℝ}, 0 < t → HasSum (fun n => f n t) (↑t ^ (s - 1) * zetaKernel₁ t)\nh_sum' : ∀ᵐ (t : ℝ) ∂Measure.restrict volume (Ioi 0), HasSum (fun n => f n t) (↑t ^ (s - 1) * zetaKernel₁ t)\nh_sum : ∀ᵐ (t : ℝ) ∂Measure.restrict volume (Ioi 0), Summable fun n => bd n t\nh_int : Integrable fun t => ∑' (n : ℕ), bd n t\n⊢ mellin zetaKernel₁ s = ∑' (x : ℕ), ∫ (t : ℝ) in Ioi 0, ↑t ^ (s - 1) * ↑(rexp (-π * t * (↑x + 1) ^ 2))\n[PROOFSTEP]\nrw [← (hasSum_integral_of_dominated_convergence bd hf_meas h_le h_sum h_int h_sum').tsum_eq.symm]\n[GOAL]\ns : ℂ\nhs : 1 / 2 < s.re\nbd : ℕ → ℝ → ℝ := fun n t => t ^ (s.re - 1) * rexp (-π * t * (↑n + 1) ^ 2)\nf : ℕ → ℝ → ℂ := fun n t => ↑t ^ (s - 1) * ↑(rexp (-π * t * (↑n + 1) ^ 2))\nhm : MeasurableSet (Ioi 0)\nh_norm : ∀ (n : ℕ) {t : ℝ}, 0 < t → ‖f n t‖ = bd n t\nhf_meas : ∀ (n : ℕ), AEStronglyMeasurable (f n) (Measure.restrict volume (Ioi 0))\nh_le : ∀ (n : ℕ), ∀ᵐ (t : ℝ) ∂Measure.restrict volume (Ioi 0), ‖f n t‖ ≤ bd n t\nh_sum0 : ∀ {t : ℝ}, 0 < t → HasSum (fun n => f n t) (↑t ^ (s - 1) * zetaKernel₁ t)\nh_sum' : ∀ᵐ (t : ℝ) ∂Measure.restrict volume (Ioi 0), HasSum (fun n => f n t) (↑t ^ (s - 1) * zetaKernel₁ t)\nh_sum : ∀ᵐ (t : ℝ) ∂Measure.restrict volume (Ioi 0), Summable fun n => bd n t\nh_int : Integrable fun t => ∑' (n : ℕ), bd n t\n⊢ mellin zetaKernel₁ s = ∫ (a : ℝ) in Ioi 0, ↑a ^ (s - 1) * zetaKernel₁ a\n[PROOFSTEP]\nrfl\n[GOAL]\ns : ℂ\nhs : 1 < s.re\n⊢ riemannCompletedZeta s = ↑π ^ (-s / 2) * Complex.Gamma (s / 2) * ∑' (n : ℕ), 1 / (↑n + 1) ^ s\n[PROOFSTEP]\nrw [completed_zeta_eq_mellin_of_one_lt_re hs, mellin_zetaKernel₁_eq_tsum, neg_div, mul_div_cancel' _ (two_ne_zero' ℂ)]\n[GOAL]\ns : ℂ\nhs : 1 < s.re\n⊢ 1 / 2 < (s / 2).re\n[PROOFSTEP]\nrw [show s / 2 = ↑(2⁻¹ : ℝ) * s by push_cast ; rw [mul_comm]; rfl]\n[GOAL]\ns : ℂ\nhs : 1 < s.re\n⊢ s / 2 = ↑2⁻¹ * s\n[PROOFSTEP]\npush_cast\n[GOAL]\ns : ℂ\nhs : 1 < s.re\n⊢ s / 2 = 2⁻¹ * s\n[PROOFSTEP]\nrw [mul_comm]\n[GOAL]\ns : ℂ\nhs : 1 < s.re\n⊢ s / 2 = s * 2⁻¹\n[PROOFSTEP]\nrfl\n[GOAL]\ns : ℂ\nhs : 1 < s.re\n⊢ 1 / 2 < (↑2⁻¹ * s).re\n[PROOFSTEP]\nrwa [ofReal_mul_re, ← div_eq_inv_mul, div_lt_div_right (zero_lt_two' ℝ)]\n[GOAL]\ns : ℂ\nhs : 1 < s.re\n⊢ riemannZeta s = ∑' (n : ℕ), 1 / (↑n + 1) ^ s\n[PROOFSTEP]\nhave : s ≠ 0 := by contrapose! hs; rw [hs, zero_re]; exact zero_le_one\n[GOAL]\ns : ℂ\nhs : 1 < s.re\n⊢ s ≠ 0\n[PROOFSTEP]\ncontrapose! hs\n[GOAL]\ns : ℂ\nhs : s = 0\n⊢ s.re ≤ 1\n[PROOFSTEP]\nrw [hs, zero_re]\n[GOAL]\ns : ℂ\nhs : s = 0\n⊢ 0 ≤ 1\n[PROOFSTEP]\nexact zero_le_one\n[GOAL]\ns : ℂ\nhs : 1 < s.re\nthis : s ≠ 0\n⊢ riemannZeta s = ∑' (n : ℕ), 1 / (↑n + 1) ^ s\n[PROOFSTEP]\nrw [riemannZeta, Function.update_noteq this, completed_zeta_eq_tsum_of_one_lt_re hs, ← mul_assoc, neg_div, cpow_neg,\n  mul_inv_cancel_left₀, mul_div_cancel_left]\n[GOAL]\ncase ha\ns : ℂ\nhs : 1 < s.re\nthis : s ≠ 0\n⊢ Complex.Gamma (s / 2) ≠ 0\n[PROOFSTEP]\napply Gamma_ne_zero_of_re_pos\n[GOAL]\ncase ha.hs\ns : ℂ\nhs : 1 < s.re\nthis : s ≠ 0\n⊢ 0 < (s / 2).re\n[PROOFSTEP]\nrw [div_eq_mul_inv, mul_comm, show (2⁻¹ : ℂ) = (2⁻¹ : ℝ) by norm_num, ofReal_mul_re]\n[GOAL]\ns : ℂ\nhs : 1 < s.re\nthis : s ≠ 0\n⊢ 2⁻¹ = ↑2⁻¹\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase ha.hs\ns : ℂ\nhs : 1 < s.re\nthis : s ≠ 0\n⊢ 0 < 2⁻¹ * s.re\n[PROOFSTEP]\nexact mul_pos (inv_pos_of_pos two_pos) (zero_lt_one.trans hs)\n[GOAL]\ncase h\ns : ℂ\nhs : 1 < s.re\nthis : s ≠ 0\n⊢ ↑π ^ (s / 2) ≠ 0\n[PROOFSTEP]\nrw [Ne.def, cpow_eq_zero_iff, not_and_or, ← Ne.def, ofReal_ne_zero]\n[GOAL]\ncase h\ns : ℂ\nhs : 1 < s.re\nthis : s ≠ 0\n⊢ π ≠ 0 ∨ ¬s / 2 ≠ 0\n[PROOFSTEP]\nexact Or.inl pi_pos.ne'\n[GOAL]\ns : ℂ\nhs : 1 < s.re\n⊢ riemannZeta s = ∑' (n : ℕ), 1 / ↑n ^ s\n[PROOFSTEP]\nhave hs' : s ≠ 0 := by contrapose! hs; rw [hs, zero_re]; exact zero_le_one\n[GOAL]\ns : ℂ\nhs : 1 < s.re\n⊢ s ≠ 0\n[PROOFSTEP]\ncontrapose! hs\n[GOAL]\ns : ℂ\nhs : s = 0\n⊢ s.re ≤ 1\n[PROOFSTEP]\nrw [hs, zero_re]\n[GOAL]\ns : ℂ\nhs : s = 0\n⊢ 0 ≤ 1\n[PROOFSTEP]\nexact zero_le_one\n[GOAL]\ns : ℂ\nhs : 1 < s.re\nhs' : s ≠ 0\n⊢ riemannZeta s = ∑' (n : ℕ), 1 / ↑n ^ s\n[PROOFSTEP]\nrw [tsum_eq_zero_add]\n[GOAL]\ns : ℂ\nhs : 1 < s.re\nhs' : s ≠ 0\n⊢ riemannZeta s = 1 / ↑0 ^ s + ∑' (b : ℕ), 1 / ↑(b + 1) ^ s\n[PROOFSTEP]\nsimp_rw [Nat.cast_zero, zero_cpow hs', div_zero, zero_add, zeta_eq_tsum_one_div_nat_add_one_cpow hs, Nat.cast_add,\n  Nat.cast_one]\n[GOAL]\ns : ℂ\nhs : 1 < s.re\nhs' : s ≠ 0\n⊢ Summable fun n => 1 / ↑n ^ s\n[PROOFSTEP]\nrw [← summable_norm_iff]\n[GOAL]\ns : ℂ\nhs : 1 < s.re\nhs' : s ≠ 0\n⊢ Summable fun x => ‖1 / ↑x ^ s‖\n[PROOFSTEP]\nsimp_rw [norm_div, norm_one, Complex.norm_eq_abs, ← ofReal_nat_cast,\n  abs_cpow_eq_rpow_re_of_nonneg (Nat.cast_nonneg _) (zero_lt_one.trans hs).ne', summable_one_div_nat_rpow]\n[GOAL]\ns : ℂ\nhs : 1 < s.re\nhs' : s ≠ 0\n⊢ 1 < s.re\n[PROOFSTEP]\nassumption\n[GOAL]\nk : ℕ\nhk : 1 < k\n⊢ riemannZeta ↑k = ∑' (n : ℕ), 1 / ↑n ^ k\n[PROOFSTEP]\nsimp only [zeta_eq_tsum_one_div_nat_cpow\n    (by rwa [← ofReal_nat_cast, ofReal_re, ← Nat.cast_one, Nat.cast_lt] : 1 < re k),\n  cpow_nat_cast]\n[GOAL]\nk : ℕ\nhk : 1 < k\n⊢ 1 < (↑k).re\n[PROOFSTEP]\nrwa [← ofReal_nat_cast, ofReal_re, ← Nat.cast_one, Nat.cast_lt]\n[GOAL]\nk : ℕ\nhk : k ≠ 0\n⊢ riemannZeta (2 * ↑k) = (-1) ^ (k + 1) * 2 ^ (2 * k - 1) * ↑π ^ (2 * k) * ↑(bernoulli (2 * k)) / ↑(2 * k)!\n[PROOFSTEP]\nconvert congr_arg ((↑) : ℝ → ℂ) (hasSum_zeta_nat hk).tsum_eq\n[GOAL]\ncase h.e'_2\nk : ℕ\nhk : k ≠ 0\n⊢ riemannZeta (2 * ↑k) = ↑(∑' (b : ℕ), 1 / ↑b ^ (2 * k))\n[PROOFSTEP]\nrw [← Nat.cast_two, ← Nat.cast_mul, zeta_nat_eq_tsum_of_gt_one]\n[GOAL]\ncase h.e'_2\nk : ℕ\nhk : k ≠ 0\n⊢ ∑' (n : ℕ), 1 / ↑n ^ (2 * k) = ↑(∑' (b : ℕ), 1 / ↑b ^ (2 * k))\n[PROOFSTEP]\nrw [ofReal_tsum]\n[GOAL]\ncase h.e'_2\nk : ℕ\nhk : k ≠ 0\n⊢ ∑' (n : ℕ), 1 / ↑n ^ (2 * k) = ∑' (a : ℕ), ↑(1 / ↑a ^ (2 * k))\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase h.e'_2\nk : ℕ\nhk : k ≠ 0\n⊢ 1 < 2 * k\n[PROOFSTEP]\nrefine one_lt_two.trans_le ?_\n[GOAL]\ncase h.e'_2\nk : ℕ\nhk : k ≠ 0\n⊢ 2 ≤ 2 * k\n[PROOFSTEP]\nconv_lhs => rw [← mul_one 2]\n[GOAL]\nk : ℕ\nhk : k ≠ 0\n| 2\n[PROOFSTEP]\nrw [← mul_one 2]\n[GOAL]\nk : ℕ\nhk : k ≠ 0\n| 2\n[PROOFSTEP]\nrw [← mul_one 2]\n[GOAL]\nk : ℕ\nhk : k ≠ 0\n| 2\n[PROOFSTEP]\nrw [← mul_one 2]\n[GOAL]\ncase h.e'_2\nk : ℕ\nhk : k ≠ 0\n⊢ 2 * 1 ≤ 2 * k\n[PROOFSTEP]\nrwa [mul_le_mul_left (zero_lt_two' ℕ), Nat.one_le_iff_ne_zero]\n[GOAL]\ncase h.e'_3\nk : ℕ\nhk : k ≠ 0\n⊢ (-1) ^ (k + 1) * 2 ^ (2 * k - 1) * ↑π ^ (2 * k) * ↑(bernoulli (2 * k)) / ↑(2 * k)! =\n    ↑((-1) ^ (k + 1) * 2 ^ (2 * k - 1) * π ^ (2 * k) * ↑(bernoulli (2 * k)) / ↑(2 * k)!)\n[PROOFSTEP]\nnorm_num\n[GOAL]\n⊢ riemannZeta 2 = ↑π ^ 2 / 6\n[PROOFSTEP]\nconvert congr_arg ((↑) : ℝ → ℂ) hasSum_zeta_two.tsum_eq\n[GOAL]\ncase h.e'_2\n⊢ riemannZeta 2 = ↑(∑' (b : ℕ), 1 / ↑b ^ 2)\n[PROOFSTEP]\nrw [← Nat.cast_two, zeta_nat_eq_tsum_of_gt_one one_lt_two, ofReal_tsum]\n[GOAL]\ncase h.e'_2\n⊢ ∑' (n : ℕ), 1 / ↑n ^ 2 = ∑' (a : ℕ), ↑(1 / ↑a ^ 2)\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase h.e'_3\n⊢ ↑π ^ 2 / 6 = ↑(π ^ 2 / 6)\n[PROOFSTEP]\nnorm_num\n[GOAL]\n⊢ riemannZeta 4 = ↑(π ^ 4) / 90\n[PROOFSTEP]\nconvert congr_arg ((↑) : ℝ → ℂ) hasSum_zeta_four.tsum_eq\n[GOAL]\ncase h.e'_2\n⊢ riemannZeta 4 = ↑(∑' (b : ℕ), 1 / ↑b ^ 4)\n[PROOFSTEP]\nrw [← Nat.cast_one, show (4 : ℂ) = (4 : ℕ) by norm_num, zeta_nat_eq_tsum_of_gt_one (by norm_num : 1 < 4), ofReal_tsum]\n[GOAL]\n⊢ 4 = ↑4\n[PROOFSTEP]\nnorm_num\n[GOAL]\n⊢ 1 < 4\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase h.e'_2\n⊢ ∑' (n : ℕ), 1 / ↑n ^ 4 = ∑' (a : ℕ), ↑(↑1 / ↑a ^ 4)\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase h.e'_3\n⊢ ↑(π ^ 4) / 90 = ↑(π ^ 4 / 90)\n[PROOFSTEP]\nnorm_num\n[GOAL]\ns : ℂ\n⊢ riemannCompletedZeta₀ (1 - s) = riemannCompletedZeta₀ s\n[PROOFSTEP]\nhave := mellin_comp_rpow zetaKernel₂ (s / 2 - 1 / 2) neg_one_lt_zero.ne\n[GOAL]\ns : ℂ\nthis :\n  mellin (fun t => zetaKernel₂ (t ^ (-1))) (s / 2 - 1 / 2) = |(-1)|⁻¹ • mellin zetaKernel₂ ((s / 2 - 1 / 2) / ↑(-1))\n⊢ riemannCompletedZeta₀ (1 - s) = riemannCompletedZeta₀ s\n[PROOFSTEP]\nsimp_rw [rpow_neg_one, ← one_div, abs_neg, abs_one, div_one, one_smul, ofReal_neg, ofReal_one, div_neg, div_one,\n  neg_sub] at this \n[GOAL]\ns : ℂ\nthis : mellin (fun t => zetaKernel₂ (1 / t)) (s / 2 - 1 / 2) = mellin zetaKernel₂ (1 / 2 - s / 2)\n⊢ riemannCompletedZeta₀ (1 - s) = riemannCompletedZeta₀ s\n[PROOFSTEP]\nconv_lhs => rw [riemannCompletedZeta₀, sub_div, ← this]\n[GOAL]\ns : ℂ\nthis : mellin (fun t => zetaKernel₂ (1 / t)) (s / 2 - 1 / 2) = mellin zetaKernel₂ (1 / 2 - s / 2)\n| riemannCompletedZeta₀ (1 - s)\n[PROOFSTEP]\nrw [riemannCompletedZeta₀, sub_div, ← this]\n[GOAL]\ns : ℂ\nthis : mellin (fun t => zetaKernel₂ (1 / t)) (s / 2 - 1 / 2) = mellin zetaKernel₂ (1 / 2 - s / 2)\n| riemannCompletedZeta₀ (1 - s)\n[PROOFSTEP]\nrw [riemannCompletedZeta₀, sub_div, ← this]\n[GOAL]\ns : ℂ\nthis : mellin (fun t => zetaKernel₂ (1 / t)) (s / 2 - 1 / 2) = mellin zetaKernel₂ (1 / 2 - s / 2)\n| riemannCompletedZeta₀ (1 - s)\n[PROOFSTEP]\nrw [riemannCompletedZeta₀, sub_div, ← this]\n[GOAL]\ns : ℂ\nthis : mellin (fun t => zetaKernel₂ (1 / t)) (s / 2 - 1 / 2) = mellin zetaKernel₂ (1 / 2 - s / 2)\n⊢ mellin (fun t => zetaKernel₂ (1 / t)) (s / 2 - 1 / 2) = riemannCompletedZeta₀ s\n[PROOFSTEP]\nrefine set_integral_congr measurableSet_Ioi fun t ht => ?_\n[GOAL]\ns : ℂ\nthis : mellin (fun t => zetaKernel₂ (1 / t)) (s / 2 - 1 / 2) = mellin zetaKernel₂ (1 / 2 - s / 2)\nt : ℝ\nht : t ∈ Ioi 0\n⊢ ↑t ^ (s / 2 - 1 / 2 - 1) • (fun t => zetaKernel₂ (1 / t)) t = ↑t ^ (s / 2 - 1) • zetaKernel₂ t\n[PROOFSTEP]\nsimp_rw [zetaKernel₂_one_div ht, smul_eq_mul, ← mul_assoc, sqrt_eq_rpow, ofReal_cpow (le_of_lt ht), ←\n  cpow_add _ _ (ofReal_ne_zero.mpr <| ne_of_gt ht)]\n[GOAL]\ns : ℂ\nthis : mellin (fun t => zetaKernel₂ (1 / t)) (s / 2 - 1 / 2) = mellin zetaKernel₂ (1 / 2 - s / 2)\nt : ℝ\nht : t ∈ Ioi 0\n⊢ ↑t ^ (s / 2 - 1 / 2 - 1 + ↑(1 / 2)) * zetaKernel₂ t = ↑t ^ (s / 2 - 1) * zetaKernel₂ t\n[PROOFSTEP]\ncongr 2\n[GOAL]\ncase e_a.e_a\ns : ℂ\nthis : mellin (fun t => zetaKernel₂ (1 / t)) (s / 2 - 1 / 2) = mellin zetaKernel₂ (1 / 2 - s / 2)\nt : ℝ\nht : t ∈ Ioi 0\n⊢ s / 2 - 1 / 2 - 1 + ↑(1 / 2) = s / 2 - 1\n[PROOFSTEP]\npush_cast\n[GOAL]\ncase e_a.e_a\ns : ℂ\nthis : mellin (fun t => zetaKernel₂ (1 / t)) (s / 2 - 1 / 2) = mellin zetaKernel₂ (1 / 2 - s / 2)\nt : ℝ\nht : t ∈ Ioi 0\n⊢ s / 2 - 1 / 2 - 1 + 1 / 2 = s / 2 - 1\n[PROOFSTEP]\nring\n[GOAL]\ns : ℂ\n⊢ riemannCompletedZeta (1 - s) = riemannCompletedZeta s\n[PROOFSTEP]\nsimp_rw [riemannCompletedZeta, riemannCompletedZeta₀_one_sub, sub_add, (by abel : 1 - s - 1 = -s),\n  (by abel : 1 - s = -(s - 1)), div_neg, neg_sub_neg]\n[GOAL]\ns : ℂ\n⊢ 1 - s - 1 = -s\n[PROOFSTEP]\nabel\n[GOAL]\ns : ℂ\n⊢ 1 - s - 1 = -s\n[PROOFSTEP]\nabel\n[GOAL]\ns : ℂ\n⊢ 1 - s = -(s - 1)\n[PROOFSTEP]\nabel\n[GOAL]\ns : ℂ\n⊢ 1 - s = -(s - 1)\n[PROOFSTEP]\nabel\n[GOAL]\ns : ℂ\nhs : ∀ (n : ℕ), s ≠ -↑n\nhs' : s ≠ 1\n⊢ riemannZeta (1 - s) = 2 ^ (1 - s) * ↑π ^ (-s) * Complex.Gamma s * Complex.sin (↑π * (1 - s) / 2) * riemannZeta s\n[PROOFSTEP]\nhave hs_ne : s ≠ 0 := by contrapose! hs; rw [hs]; exact ⟨0, by rw [Nat.cast_zero, neg_zero]⟩\n[GOAL]\ns : ℂ\nhs : ∀ (n : ℕ), s ≠ -↑n\nhs' : s ≠ 1\n⊢ s ≠ 0\n[PROOFSTEP]\ncontrapose! hs\n[GOAL]\ns : ℂ\nhs' : s ≠ 1\nhs : s = 0\n⊢ ∃ n, s = -↑n\n[PROOFSTEP]\nrw [hs]\n[GOAL]\ns : ℂ\nhs' : s ≠ 1\nhs : s = 0\n⊢ ∃ n, 0 = -↑n\n[PROOFSTEP]\nexact ⟨0, by rw [Nat.cast_zero, neg_zero]⟩\n[GOAL]\ns : ℂ\nhs' : s ≠ 1\nhs : s = 0\n⊢ 0 = -↑0\n[PROOFSTEP]\nrw [Nat.cast_zero, neg_zero]\n[GOAL]\ns : ℂ\nhs : ∀ (n : ℕ), s ≠ -↑n\nhs' : s ≠ 1\nhs_ne : s ≠ 0\n⊢ riemannZeta (1 - s) = 2 ^ (1 - s) * ↑π ^ (-s) * Complex.Gamma s * Complex.sin (↑π * (1 - s) / 2) * riemannZeta s\n[PROOFSTEP]\nhave h_sqrt : (sqrt π : ℂ) ≠ 0 := ofReal_ne_zero.mpr (sqrt_ne_zero'.mpr pi_pos)\n[GOAL]\ns : ℂ\nhs : ∀ (n : ℕ), s ≠ -↑n\nhs' : s ≠ 1\nhs_ne : s ≠ 0\nh_sqrt : ↑(sqrt π) ≠ 0\n⊢ riemannZeta (1 - s) = 2 ^ (1 - s) * ↑π ^ (-s) * Complex.Gamma s * Complex.sin (↑π * (1 - s) / 2) * riemannZeta s\n[PROOFSTEP]\nhave h_pow : (2 : ℂ) ^ (s - 1) ≠ 0 := by\n  rw [Ne.def, cpow_eq_zero_iff, not_and_or]\n  exact Or.inl two_ne_zero\n[GOAL]\ns : ℂ\nhs : ∀ (n : ℕ), s ≠ -↑n\nhs' : s ≠ 1\nhs_ne : s ≠ 0\nh_sqrt : ↑(sqrt π) ≠ 0\n⊢ 2 ^ (s - 1) ≠ 0\n[PROOFSTEP]\nrw [Ne.def, cpow_eq_zero_iff, not_and_or]\n[GOAL]\ns : ℂ\nhs : ∀ (n : ℕ), s ≠ -↑n\nhs' : s ≠ 1\nhs_ne : s ≠ 0\nh_sqrt : ↑(sqrt π) ≠ 0\n⊢ ¬2 = 0 ∨ ¬s - 1 ≠ 0\n[PROOFSTEP]\nexact Or.inl two_ne_zero\n[GOAL]\ns : ℂ\nhs : ∀ (n : ℕ), s ≠ -↑n\nhs' : s ≠ 1\nhs_ne : s ≠ 0\nh_sqrt : ↑(sqrt π) ≠ 0\nh_pow : 2 ^ (s - 1) ≠ 0\n⊢ riemannZeta (1 - s) = 2 ^ (1 - s) * ↑π ^ (-s) * Complex.Gamma s * Complex.sin (↑π * (1 - s) / 2) * riemannZeta s\n[PROOFSTEP]\nhave h_Ga_ne1 : Gamma (s / 2) ≠ 0 := by\n  rw [Ne.def, Complex.Gamma_eq_zero_iff]\n  contrapose! hs\n  obtain ⟨m, hm⟩ := hs\n  rw [div_eq_iff (two_ne_zero' ℂ), ← Nat.cast_two, neg_mul, ← Nat.cast_mul] at hm \n  exact ⟨m * 2, by rw [hm]⟩\n[GOAL]\ns : ℂ\nhs : ∀ (n : ℕ), s ≠ -↑n\nhs' : s ≠ 1\nhs_ne : s ≠ 0\nh_sqrt : ↑(sqrt π) ≠ 0\nh_pow : 2 ^ (s - 1) ≠ 0\n⊢ Complex.Gamma (s / 2) ≠ 0\n[PROOFSTEP]\nrw [Ne.def, Complex.Gamma_eq_zero_iff]\n[GOAL]\ns : ℂ\nhs : ∀ (n : ℕ), s ≠ -↑n\nhs' : s ≠ 1\nhs_ne : s ≠ 0\nh_sqrt : ↑(sqrt π) ≠ 0\nh_pow : 2 ^ (s - 1) ≠ 0\n⊢ ¬∃ m, s / 2 = -↑m\n[PROOFSTEP]\ncontrapose! hs\n[GOAL]\ns : ℂ\nhs' : s ≠ 1\nhs_ne : s ≠ 0\nh_sqrt : ↑(sqrt π) ≠ 0\nh_pow : 2 ^ (s - 1) ≠ 0\nhs : ∃ m, s / 2 = -↑m\n⊢ ∃ n, s = -↑n\n[PROOFSTEP]\nobtain ⟨m, hm⟩ := hs\n[GOAL]\ncase intro\ns : ℂ\nhs' : s ≠ 1\nhs_ne : s ≠ 0\nh_sqrt : ↑(sqrt π) ≠ 0\nh_pow : 2 ^ (s - 1) ≠ 0\nm : ℕ\nhm : s / 2 = -↑m\n⊢ ∃ n, s = -↑n\n[PROOFSTEP]\nrw [div_eq_iff (two_ne_zero' ℂ), ← Nat.cast_two, neg_mul, ← Nat.cast_mul] at hm \n[GOAL]\ncase intro\ns : ℂ\nhs' : s ≠ 1\nhs_ne : s ≠ 0\nh_sqrt : ↑(sqrt π) ≠ 0\nh_pow : 2 ^ (s - 1) ≠ 0\nm : ℕ\nhm : s = -↑(m * 2)\n⊢ ∃ n, s = -↑n\n[PROOFSTEP]\nexact ⟨m * 2, by rw [hm]⟩\n[GOAL]\ns : ℂ\nhs' : s ≠ 1\nhs_ne : s ≠ 0\nh_sqrt : ↑(sqrt π) ≠ 0\nh_pow : 2 ^ (s - 1) ≠ 0\nm : ℕ\nhm : s = -↑(m * 2)\n⊢ s = -↑(m * 2)\n[PROOFSTEP]\nrw [hm]\n[GOAL]\ns : ℂ\nhs : ∀ (n : ℕ), s ≠ -↑n\nhs' : s ≠ 1\nhs_ne : s ≠ 0\nh_sqrt : ↑(sqrt π) ≠ 0\nh_pow : 2 ^ (s - 1) ≠ 0\nh_Ga_ne1 : Complex.Gamma (s / 2) ≠ 0\n⊢ riemannZeta (1 - s) = 2 ^ (1 - s) * ↑π ^ (-s) * Complex.Gamma s * Complex.sin (↑π * (1 - s) / 2) * riemannZeta s\n[PROOFSTEP]\nhave h_Ga_eq : Gamma s = Gamma (s / 2) * Gamma ((s + 1) / 2) * (2 : ℂ) ^ (s - 1) / sqrt π := by\n  rw [add_div, Complex.Gamma_mul_Gamma_add_half, mul_div_cancel' _ (two_ne_zero' ℂ), (by ring : 1 - s = -(s - 1)),\n    cpow_neg, ← div_eq_mul_inv, eq_div_iff h_sqrt, div_mul_eq_mul_div₀, div_mul_cancel _ h_pow]\n[GOAL]\ns : ℂ\nhs : ∀ (n : ℕ), s ≠ -↑n\nhs' : s ≠ 1\nhs_ne : s ≠ 0\nh_sqrt : ↑(sqrt π) ≠ 0\nh_pow : 2 ^ (s - 1) ≠ 0\nh_Ga_ne1 : Complex.Gamma (s / 2) ≠ 0\n⊢ Complex.Gamma s = Complex.Gamma (s / 2) * Complex.Gamma ((s + 1) / 2) * 2 ^ (s - 1) / ↑(sqrt π)\n[PROOFSTEP]\nrw [add_div, Complex.Gamma_mul_Gamma_add_half, mul_div_cancel' _ (two_ne_zero' ℂ), (by ring : 1 - s = -(s - 1)),\n  cpow_neg, ← div_eq_mul_inv, eq_div_iff h_sqrt, div_mul_eq_mul_div₀, div_mul_cancel _ h_pow]\n[GOAL]\ns : ℂ\nhs : ∀ (n : ℕ), s ≠ -↑n\nhs' : s ≠ 1\nhs_ne : s ≠ 0\nh_sqrt : ↑(sqrt π) ≠ 0\nh_pow : 2 ^ (s - 1) ≠ 0\nh_Ga_ne1 : Complex.Gamma (s / 2) ≠ 0\n⊢ 1 - s = -(s - 1)\n[PROOFSTEP]\nring\n[GOAL]\ns : ℂ\nhs : ∀ (n : ℕ), s ≠ -↑n\nhs' : s ≠ 1\nhs_ne : s ≠ 0\nh_sqrt : ↑(sqrt π) ≠ 0\nh_pow : 2 ^ (s - 1) ≠ 0\nh_Ga_ne1 : Complex.Gamma (s / 2) ≠ 0\nh_Ga_eq : Complex.Gamma s = Complex.Gamma (s / 2) * Complex.Gamma ((s + 1) / 2) * 2 ^ (s - 1) / ↑(sqrt π)\n⊢ riemannZeta (1 - s) = 2 ^ (1 - s) * ↑π ^ (-s) * Complex.Gamma s * Complex.sin (↑π * (1 - s) / 2) * riemannZeta s\n[PROOFSTEP]\nhave h_Ga_ne3 : Gamma ((s + 1) / 2) ≠ 0 :=\n  by\n  have h_Ga_aux : Gamma s ≠ 0 := Complex.Gamma_ne_zero hs\n  contrapose! h_Ga_aux\n  rw [h_Ga_eq, h_Ga_aux, mul_zero, zero_mul, zero_div]\n[GOAL]\ns : ℂ\nhs : ∀ (n : ℕ), s ≠ -↑n\nhs' : s ≠ 1\nhs_ne : s ≠ 0\nh_sqrt : ↑(sqrt π) ≠ 0\nh_pow : 2 ^ (s - 1) ≠ 0\nh_Ga_ne1 : Complex.Gamma (s / 2) ≠ 0\nh_Ga_eq : Complex.Gamma s = Complex.Gamma (s / 2) * Complex.Gamma ((s + 1) / 2) * 2 ^ (s - 1) / ↑(sqrt π)\n⊢ Complex.Gamma ((s + 1) / 2) ≠ 0\n[PROOFSTEP]\nhave h_Ga_aux : Gamma s ≠ 0 := Complex.Gamma_ne_zero hs\n[GOAL]\ns : ℂ\nhs : ∀ (n : ℕ), s ≠ -↑n\nhs' : s ≠ 1\nhs_ne : s ≠ 0\nh_sqrt : ↑(sqrt π) ≠ 0\nh_pow : 2 ^ (s - 1) ≠ 0\nh_Ga_ne1 : Complex.Gamma (s / 2) ≠ 0\nh_Ga_eq : Complex.Gamma s = Complex.Gamma (s / 2) * Complex.Gamma ((s + 1) / 2) * 2 ^ (s - 1) / ↑(sqrt π)\nh_Ga_aux : Complex.Gamma s ≠ 0\n⊢ Complex.Gamma ((s + 1) / 2) ≠ 0\n[PROOFSTEP]\ncontrapose! h_Ga_aux\n[GOAL]\ns : ℂ\nhs : ∀ (n : ℕ), s ≠ -↑n\nhs' : s ≠ 1\nhs_ne : s ≠ 0\nh_sqrt : ↑(sqrt π) ≠ 0\nh_pow : 2 ^ (s - 1) ≠ 0\nh_Ga_ne1 : Complex.Gamma (s / 2) ≠ 0\nh_Ga_eq : Complex.Gamma s = Complex.Gamma (s / 2) * Complex.Gamma ((s + 1) / 2) * 2 ^ (s - 1) / ↑(sqrt π)\nh_Ga_aux : Complex.Gamma ((s + 1) / 2) = 0\n⊢ Complex.Gamma s = 0\n[PROOFSTEP]\nrw [h_Ga_eq, h_Ga_aux, mul_zero, zero_mul, zero_div]\n[GOAL]\ns : ℂ\nhs : ∀ (n : ℕ), s ≠ -↑n\nhs' : s ≠ 1\nhs_ne : s ≠ 0\nh_sqrt : ↑(sqrt π) ≠ 0\nh_pow : 2 ^ (s - 1) ≠ 0\nh_Ga_ne1 : Complex.Gamma (s / 2) ≠ 0\nh_Ga_eq : Complex.Gamma s = Complex.Gamma (s / 2) * Complex.Gamma ((s + 1) / 2) * 2 ^ (s - 1) / ↑(sqrt π)\nh_Ga_ne3 : Complex.Gamma ((s + 1) / 2) ≠ 0\n⊢ riemannZeta (1 - s) = 2 ^ (1 - s) * ↑π ^ (-s) * Complex.Gamma s * Complex.sin (↑π * (1 - s) / 2) * riemannZeta s\n[PROOFSTEP]\nrw [riemannZeta, Function.update_noteq (by rwa [sub_ne_zero, ne_comm] : 1 - s ≠ 0), Function.update_noteq hs_ne,\n  riemannCompletedZeta_one_sub, mul_div, eq_div_iff h_Ga_ne1, mul_comm, ← mul_div_assoc]\n  -- Now rule out case of s = positive odd integer & deduce further non-vanishing statements\n[GOAL]\ns : ℂ\nhs : ∀ (n : ℕ), s ≠ -↑n\nhs' : s ≠ 1\nhs_ne : s ≠ 0\nh_sqrt : ↑(sqrt π) ≠ 0\nh_pow : 2 ^ (s - 1) ≠ 0\nh_Ga_ne1 : Complex.Gamma (s / 2) ≠ 0\nh_Ga_eq : Complex.Gamma s = Complex.Gamma (s / 2) * Complex.Gamma ((s + 1) / 2) * 2 ^ (s - 1) / ↑(sqrt π)\nh_Ga_ne3 : Complex.Gamma ((s + 1) / 2) ≠ 0\n⊢ 1 - s ≠ 0\n[PROOFSTEP]\nrwa [sub_ne_zero, ne_comm]\n[GOAL]\ns : ℂ\nhs : ∀ (n : ℕ), s ≠ -↑n\nhs' : s ≠ 1\nhs_ne : s ≠ 0\nh_sqrt : ↑(sqrt π) ≠ 0\nh_pow : 2 ^ (s - 1) ≠ 0\nh_Ga_ne1 : Complex.Gamma (s / 2) ≠ 0\nh_Ga_eq : Complex.Gamma s = Complex.Gamma (s / 2) * Complex.Gamma ((s + 1) / 2) * 2 ^ (s - 1) / ↑(sqrt π)\nh_Ga_ne3 : Complex.Gamma ((s + 1) / 2) ≠ 0\n⊢ Complex.Gamma (s / 2) * (↑π ^ ((1 - s) / 2) * riemannCompletedZeta s) / Complex.Gamma ((1 - s) / 2) =\n    2 ^ (1 - s) * ↑π ^ (-s) * Complex.Gamma s * Complex.sin (↑π * (1 - s) / 2) * (↑π ^ (s / 2) * riemannCompletedZeta s)\n[PROOFSTEP]\nby_cases hs_pos_odd : ∃ n : ℕ, s = 1 + 2 * n\n[GOAL]\ncase pos\ns : ℂ\nhs : ∀ (n : ℕ), s ≠ -↑n\nhs' : s ≠ 1\nhs_ne : s ≠ 0\nh_sqrt : ↑(sqrt π) ≠ 0\nh_pow : 2 ^ (s - 1) ≠ 0\nh_Ga_ne1 : Complex.Gamma (s / 2) ≠ 0\nh_Ga_eq : Complex.Gamma s = Complex.Gamma (s / 2) * Complex.Gamma ((s + 1) / 2) * 2 ^ (s - 1) / ↑(sqrt π)\nh_Ga_ne3 : Complex.Gamma ((s + 1) / 2) ≠ 0\nhs_pos_odd : ∃ n, s = 1 + 2 * ↑n\n⊢ Complex.Gamma (s / 2) * (↑π ^ ((1 - s) / 2) * riemannCompletedZeta s) / Complex.Gamma ((1 - s) / 2) =\n    2 ^ (1 - s) * ↑π ^ (-s) * Complex.Gamma s * Complex.sin (↑π * (1 - s) / 2) * (↑π ^ (s / 2) * riemannCompletedZeta s)\n[PROOFSTEP]\nobtain ⟨n, rfl⟩ := hs_pos_odd\n[GOAL]\ncase pos.intro\nh_sqrt : ↑(sqrt π) ≠ 0\nn : ℕ\nhs : ∀ (n_1 : ℕ), 1 + 2 * ↑n ≠ -↑n_1\nhs' : 1 + 2 * ↑n ≠ 1\nhs_ne : 1 + 2 * ↑n ≠ 0\nh_pow : 2 ^ (1 + 2 * ↑n - 1) ≠ 0\nh_Ga_ne1 : Complex.Gamma ((1 + 2 * ↑n) / 2) ≠ 0\nh_Ga_eq :\n  Complex.Gamma (1 + 2 * ↑n) =\n    Complex.Gamma ((1 + 2 * ↑n) / 2) * Complex.Gamma ((1 + 2 * ↑n + 1) / 2) * 2 ^ (1 + 2 * ↑n - 1) / ↑(sqrt π)\nh_Ga_ne3 : Complex.Gamma ((1 + 2 * ↑n + 1) / 2) ≠ 0\n⊢ Complex.Gamma ((1 + 2 * ↑n) / 2) * (↑π ^ ((1 - (1 + 2 * ↑n)) / 2) * riemannCompletedZeta (1 + 2 * ↑n)) /\n      Complex.Gamma ((1 - (1 + 2 * ↑n)) / 2) =\n    2 ^ (1 - (1 + 2 * ↑n)) * ↑π ^ (-(1 + 2 * ↑n)) * Complex.Gamma (1 + 2 * ↑n) *\n        Complex.sin (↑π * (1 - (1 + 2 * ↑n)) / 2) *\n      (↑π ^ ((1 + 2 * ↑n) / 2) * riemannCompletedZeta (1 + 2 * ↑n))\n[PROOFSTEP]\nhave : (1 - (1 + 2 * (n : ℂ))) / 2 = -↑n := by\n  rw [← sub_sub, sub_self, zero_sub, neg_div, mul_div_cancel_left _ (two_ne_zero' ℂ)]\n[GOAL]\nh_sqrt : ↑(sqrt π) ≠ 0\nn : ℕ\nhs : ∀ (n_1 : ℕ), 1 + 2 * ↑n ≠ -↑n_1\nhs' : 1 + 2 * ↑n ≠ 1\nhs_ne : 1 + 2 * ↑n ≠ 0\nh_pow : 2 ^ (1 + 2 * ↑n - 1) ≠ 0\nh_Ga_ne1 : Complex.Gamma ((1 + 2 * ↑n) / 2) ≠ 0\nh_Ga_eq :\n  Complex.Gamma (1 + 2 * ↑n) =\n    Complex.Gamma ((1 + 2 * ↑n) / 2) * Complex.Gamma ((1 + 2 * ↑n + 1) / 2) * 2 ^ (1 + 2 * ↑n - 1) / ↑(sqrt π)\nh_Ga_ne3 : Complex.Gamma ((1 + 2 * ↑n + 1) / 2) ≠ 0\n⊢ (1 - (1 + 2 * ↑n)) / 2 = -↑n\n[PROOFSTEP]\nrw [← sub_sub, sub_self, zero_sub, neg_div, mul_div_cancel_left _ (two_ne_zero' ℂ)]\n[GOAL]\ncase pos.intro\nh_sqrt : ↑(sqrt π) ≠ 0\nn : ℕ\nhs : ∀ (n_1 : ℕ), 1 + 2 * ↑n ≠ -↑n_1\nhs' : 1 + 2 * ↑n ≠ 1\nhs_ne : 1 + 2 * ↑n ≠ 0\nh_pow : 2 ^ (1 + 2 * ↑n - 1) ≠ 0\nh_Ga_ne1 : Complex.Gamma ((1 + 2 * ↑n) / 2) ≠ 0\nh_Ga_eq :\n  Complex.Gamma (1 + 2 * ↑n) =\n    Complex.Gamma ((1 + 2 * ↑n) / 2) * Complex.Gamma ((1 + 2 * ↑n + 1) / 2) * 2 ^ (1 + 2 * ↑n - 1) / ↑(sqrt π)\nh_Ga_ne3 : Complex.Gamma ((1 + 2 * ↑n + 1) / 2) ≠ 0\nthis : (1 - (1 + 2 * ↑n)) / 2 = -↑n\n⊢ Complex.Gamma ((1 + 2 * ↑n) / 2) * (↑π ^ ((1 - (1 + 2 * ↑n)) / 2) * riemannCompletedZeta (1 + 2 * ↑n)) /\n      Complex.Gamma ((1 - (1 + 2 * ↑n)) / 2) =\n    2 ^ (1 - (1 + 2 * ↑n)) * ↑π ^ (-(1 + 2 * ↑n)) * Complex.Gamma (1 + 2 * ↑n) *\n        Complex.sin (↑π * (1 - (1 + 2 * ↑n)) / 2) *\n      (↑π ^ ((1 + 2 * ↑n) / 2) * riemannCompletedZeta (1 + 2 * ↑n))\n[PROOFSTEP]\nrw [this, Complex.Gamma_neg_nat_eq_zero, div_zero]\n[GOAL]\ncase pos.intro\nh_sqrt : ↑(sqrt π) ≠ 0\nn : ℕ\nhs : ∀ (n_1 : ℕ), 1 + 2 * ↑n ≠ -↑n_1\nhs' : 1 + 2 * ↑n ≠ 1\nhs_ne : 1 + 2 * ↑n ≠ 0\nh_pow : 2 ^ (1 + 2 * ↑n - 1) ≠ 0\nh_Ga_ne1 : Complex.Gamma ((1 + 2 * ↑n) / 2) ≠ 0\nh_Ga_eq :\n  Complex.Gamma (1 + 2 * ↑n) =\n    Complex.Gamma ((1 + 2 * ↑n) / 2) * Complex.Gamma ((1 + 2 * ↑n + 1) / 2) * 2 ^ (1 + 2 * ↑n - 1) / ↑(sqrt π)\nh_Ga_ne3 : Complex.Gamma ((1 + 2 * ↑n + 1) / 2) ≠ 0\nthis : (1 - (1 + 2 * ↑n)) / 2 = -↑n\n⊢ 0 =\n    2 ^ (1 - (1 + 2 * ↑n)) * ↑π ^ (-(1 + 2 * ↑n)) * Complex.Gamma (1 + 2 * ↑n) *\n        Complex.sin (↑π * (1 - (1 + 2 * ↑n)) / 2) *\n      (↑π ^ ((1 + 2 * ↑n) / 2) * riemannCompletedZeta (1 + 2 * ↑n))\n[PROOFSTEP]\nhave : (π : ℂ) * (1 - (1 + 2 * ↑n)) / 2 = ↑(-n : ℤ) * π := by push_cast ; field_simp; ring\n[GOAL]\nh_sqrt : ↑(sqrt π) ≠ 0\nn : ℕ\nhs : ∀ (n_1 : ℕ), 1 + 2 * ↑n ≠ -↑n_1\nhs' : 1 + 2 * ↑n ≠ 1\nhs_ne : 1 + 2 * ↑n ≠ 0\nh_pow : 2 ^ (1 + 2 * ↑n - 1) ≠ 0\nh_Ga_ne1 : Complex.Gamma ((1 + 2 * ↑n) / 2) ≠ 0\nh_Ga_eq :\n  Complex.Gamma (1 + 2 * ↑n) =\n    Complex.Gamma ((1 + 2 * ↑n) / 2) * Complex.Gamma ((1 + 2 * ↑n + 1) / 2) * 2 ^ (1 + 2 * ↑n - 1) / ↑(sqrt π)\nh_Ga_ne3 : Complex.Gamma ((1 + 2 * ↑n + 1) / 2) ≠ 0\nthis : (1 - (1 + 2 * ↑n)) / 2 = -↑n\n⊢ ↑π * (1 - (1 + 2 * ↑n)) / 2 = ↑(-↑n) * ↑π\n[PROOFSTEP]\npush_cast\n[GOAL]\nh_sqrt : ↑(sqrt π) ≠ 0\nn : ℕ\nhs : ∀ (n_1 : ℕ), 1 + 2 * ↑n ≠ -↑n_1\nhs' : 1 + 2 * ↑n ≠ 1\nhs_ne : 1 + 2 * ↑n ≠ 0\nh_pow : 2 ^ (1 + 2 * ↑n - 1) ≠ 0\nh_Ga_ne1 : Complex.Gamma ((1 + 2 * ↑n) / 2) ≠ 0\nh_Ga_eq :\n  Complex.Gamma (1 + 2 * ↑n) =\n    Complex.Gamma ((1 + 2 * ↑n) / 2) * Complex.Gamma ((1 + 2 * ↑n + 1) / 2) * 2 ^ (1 + 2 * ↑n - 1) / ↑(sqrt π)\nh_Ga_ne3 : Complex.Gamma ((1 + 2 * ↑n + 1) / 2) ≠ 0\nthis : (1 - (1 + 2 * ↑n)) / 2 = -↑n\n⊢ ↑π * (1 - (1 + 2 * ↑n)) / 2 = -↑n * ↑π\n[PROOFSTEP]\nfield_simp\n[GOAL]\nh_sqrt : ↑(sqrt π) ≠ 0\nn : ℕ\nhs : ∀ (n_1 : ℕ), 1 + 2 * ↑n ≠ -↑n_1\nhs' : 1 + 2 * ↑n ≠ 1\nhs_ne : 1 + 2 * ↑n ≠ 0\nh_pow : 2 ^ (1 + 2 * ↑n - 1) ≠ 0\nh_Ga_ne1 : Complex.Gamma ((1 + 2 * ↑n) / 2) ≠ 0\nh_Ga_eq :\n  Complex.Gamma (1 + 2 * ↑n) =\n    Complex.Gamma ((1 + 2 * ↑n) / 2) * Complex.Gamma ((1 + 2 * ↑n + 1) / 2) * 2 ^ (1 + 2 * ↑n - 1) / ↑(sqrt π)\nh_Ga_ne3 : Complex.Gamma ((1 + 2 * ↑n + 1) / 2) ≠ 0\nthis : (1 - (1 + 2 * ↑n)) / 2 = -↑n\n⊢ ↑π * (2 * ↑n) = ↑n * ↑π * 2\n[PROOFSTEP]\nring\n[GOAL]\ncase pos.intro\nh_sqrt : ↑(sqrt π) ≠ 0\nn : ℕ\nhs : ∀ (n_1 : ℕ), 1 + 2 * ↑n ≠ -↑n_1\nhs' : 1 + 2 * ↑n ≠ 1\nhs_ne : 1 + 2 * ↑n ≠ 0\nh_pow : 2 ^ (1 + 2 * ↑n - 1) ≠ 0\nh_Ga_ne1 : Complex.Gamma ((1 + 2 * ↑n) / 2) ≠ 0\nh_Ga_eq :\n  Complex.Gamma (1 + 2 * ↑n) =\n    Complex.Gamma ((1 + 2 * ↑n) / 2) * Complex.Gamma ((1 + 2 * ↑n + 1) / 2) * 2 ^ (1 + 2 * ↑n - 1) / ↑(sqrt π)\nh_Ga_ne3 : Complex.Gamma ((1 + 2 * ↑n + 1) / 2) ≠ 0\nthis✝ : (1 - (1 + 2 * ↑n)) / 2 = -↑n\nthis : ↑π * (1 - (1 + 2 * ↑n)) / 2 = ↑(-↑n) * ↑π\n⊢ 0 =\n    2 ^ (1 - (1 + 2 * ↑n)) * ↑π ^ (-(1 + 2 * ↑n)) * Complex.Gamma (1 + 2 * ↑n) *\n        Complex.sin (↑π * (1 - (1 + 2 * ↑n)) / 2) *\n      (↑π ^ ((1 + 2 * ↑n) / 2) * riemannCompletedZeta (1 + 2 * ↑n))\n[PROOFSTEP]\nrw [this, Complex.sin_int_mul_pi, mul_zero, zero_mul]\n[GOAL]\ncase neg\ns : ℂ\nhs : ∀ (n : ℕ), s ≠ -↑n\nhs' : s ≠ 1\nhs_ne : s ≠ 0\nh_sqrt : ↑(sqrt π) ≠ 0\nh_pow : 2 ^ (s - 1) ≠ 0\nh_Ga_ne1 : Complex.Gamma (s / 2) ≠ 0\nh_Ga_eq : Complex.Gamma s = Complex.Gamma (s / 2) * Complex.Gamma ((s + 1) / 2) * 2 ^ (s - 1) / ↑(sqrt π)\nh_Ga_ne3 : Complex.Gamma ((s + 1) / 2) ≠ 0\nhs_pos_odd : ¬∃ n, s = 1 + 2 * ↑n\n⊢ Complex.Gamma (s / 2) * (↑π ^ ((1 - s) / 2) * riemannCompletedZeta s) / Complex.Gamma ((1 - s) / 2) =\n    2 ^ (1 - s) * ↑π ^ (-s) * Complex.Gamma s * Complex.sin (↑π * (1 - s) / 2) * (↑π ^ (s / 2) * riemannCompletedZeta s)\n[PROOFSTEP]\nhave h_Ga_ne4 : Gamma ((1 - s) / 2) ≠ 0 :=\n  by\n  rw [Ne.def, Complex.Gamma_eq_zero_iff]\n  contrapose! hs_pos_odd\n  obtain ⟨m, hm⟩ := hs_pos_odd\n  rw [div_eq_iff (two_ne_zero' ℂ), sub_eq_iff_eq_add, neg_mul, ← sub_eq_neg_add, eq_sub_iff_add_eq] at hm \n  exact\n    ⟨m, by rw [← hm, mul_comm]⟩\n      -- At last the main proof\n[GOAL]\ns : ℂ\nhs : ∀ (n : ℕ), s ≠ -↑n\nhs' : s ≠ 1\nhs_ne : s ≠ 0\nh_sqrt : ↑(sqrt π) ≠ 0\nh_pow : 2 ^ (s - 1) ≠ 0\nh_Ga_ne1 : Complex.Gamma (s / 2) ≠ 0\nh_Ga_eq : Complex.Gamma s = Complex.Gamma (s / 2) * Complex.Gamma ((s + 1) / 2) * 2 ^ (s - 1) / ↑(sqrt π)\nh_Ga_ne3 : Complex.Gamma ((s + 1) / 2) ≠ 0\nhs_pos_odd : ¬∃ n, s = 1 + 2 * ↑n\n⊢ Complex.Gamma ((1 - s) / 2) ≠ 0\n[PROOFSTEP]\nrw [Ne.def, Complex.Gamma_eq_zero_iff]\n[GOAL]\ns : ℂ\nhs : ∀ (n : ℕ), s ≠ -↑n\nhs' : s ≠ 1\nhs_ne : s ≠ 0\nh_sqrt : ↑(sqrt π) ≠ 0\nh_pow : 2 ^ (s - 1) ≠ 0\nh_Ga_ne1 : Complex.Gamma (s / 2) ≠ 0\nh_Ga_eq : Complex.Gamma s = Complex.Gamma (s / 2) * Complex.Gamma ((s + 1) / 2) * 2 ^ (s - 1) / ↑(sqrt π)\nh_Ga_ne3 : Complex.Gamma ((s + 1) / 2) ≠ 0\nhs_pos_odd : ¬∃ n, s = 1 + 2 * ↑n\n⊢ ¬∃ m, (1 - s) / 2 = -↑m\n[PROOFSTEP]\ncontrapose! hs_pos_odd\n[GOAL]\ns : ℂ\nhs : ∀ (n : ℕ), s ≠ -↑n\nhs' : s ≠ 1\nhs_ne : s ≠ 0\nh_sqrt : ↑(sqrt π) ≠ 0\nh_pow : 2 ^ (s - 1) ≠ 0\nh_Ga_ne1 : Complex.Gamma (s / 2) ≠ 0\nh_Ga_eq : Complex.Gamma s = Complex.Gamma (s / 2) * Complex.Gamma ((s + 1) / 2) * 2 ^ (s - 1) / ↑(sqrt π)\nh_Ga_ne3 : Complex.Gamma ((s + 1) / 2) ≠ 0\nhs_pos_odd : ∃ m, (1 - s) / 2 = -↑m\n⊢ ∃ n, s = 1 + 2 * ↑n\n[PROOFSTEP]\nobtain ⟨m, hm⟩ := hs_pos_odd\n[GOAL]\ncase intro\ns : ℂ\nhs : ∀ (n : ℕ), s ≠ -↑n\nhs' : s ≠ 1\nhs_ne : s ≠ 0\nh_sqrt : ↑(sqrt π) ≠ 0\nh_pow : 2 ^ (s - 1) ≠ 0\nh_Ga_ne1 : Complex.Gamma (s / 2) ≠ 0\nh_Ga_eq : Complex.Gamma s = Complex.Gamma (s / 2) * Complex.Gamma ((s + 1) / 2) * 2 ^ (s - 1) / ↑(sqrt π)\nh_Ga_ne3 : Complex.Gamma ((s + 1) / 2) ≠ 0\nm : ℕ\nhm : (1 - s) / 2 = -↑m\n⊢ ∃ n, s = 1 + 2 * ↑n\n[PROOFSTEP]\nrw [div_eq_iff (two_ne_zero' ℂ), sub_eq_iff_eq_add, neg_mul, ← sub_eq_neg_add, eq_sub_iff_add_eq] at hm \n[GOAL]\ncase intro\ns : ℂ\nhs : ∀ (n : ℕ), s ≠ -↑n\nhs' : s ≠ 1\nhs_ne : s ≠ 0\nh_sqrt : ↑(sqrt π) ≠ 0\nh_pow : 2 ^ (s - 1) ≠ 0\nh_Ga_ne1 : Complex.Gamma (s / 2) ≠ 0\nh_Ga_eq : Complex.Gamma s = Complex.Gamma (s / 2) * Complex.Gamma ((s + 1) / 2) * 2 ^ (s - 1) / ↑(sqrt π)\nh_Ga_ne3 : Complex.Gamma ((s + 1) / 2) ≠ 0\nm : ℕ\nhm : 1 + ↑m * 2 = s\n⊢ ∃ n, s = 1 + 2 * ↑n\n[PROOFSTEP]\nexact\n  ⟨m, by rw [← hm, mul_comm]⟩\n    -- At last the main proof\n[GOAL]\ns : ℂ\nhs : ∀ (n : ℕ), s ≠ -↑n\nhs' : s ≠ 1\nhs_ne : s ≠ 0\nh_sqrt : ↑(sqrt π) ≠ 0\nh_pow : 2 ^ (s - 1) ≠ 0\nh_Ga_ne1 : Complex.Gamma (s / 2) ≠ 0\nh_Ga_eq : Complex.Gamma s = Complex.Gamma (s / 2) * Complex.Gamma ((s + 1) / 2) * 2 ^ (s - 1) / ↑(sqrt π)\nh_Ga_ne3 : Complex.Gamma ((s + 1) / 2) ≠ 0\nm : ℕ\nhm : 1 + ↑m * 2 = s\n⊢ s = 1 + 2 * ↑m\n[PROOFSTEP]\nrw [← hm, mul_comm]\n[GOAL]\ncase neg\ns : ℂ\nhs : ∀ (n : ℕ), s ≠ -↑n\nhs' : s ≠ 1\nhs_ne : s ≠ 0\nh_sqrt : ↑(sqrt π) ≠ 0\nh_pow : 2 ^ (s - 1) ≠ 0\nh_Ga_ne1 : Complex.Gamma (s / 2) ≠ 0\nh_Ga_eq : Complex.Gamma s = Complex.Gamma (s / 2) * Complex.Gamma ((s + 1) / 2) * 2 ^ (s - 1) / ↑(sqrt π)\nh_Ga_ne3 : Complex.Gamma ((s + 1) / 2) ≠ 0\nhs_pos_odd : ¬∃ n, s = 1 + 2 * ↑n\nh_Ga_ne4 : Complex.Gamma ((1 - s) / 2) ≠ 0\n⊢ Complex.Gamma (s / 2) * (↑π ^ ((1 - s) / 2) * riemannCompletedZeta s) / Complex.Gamma ((1 - s) / 2) =\n    2 ^ (1 - s) * ↑π ^ (-s) * Complex.Gamma s * Complex.sin (↑π * (1 - s) / 2) * (↑π ^ (s / 2) * riemannCompletedZeta s)\n[PROOFSTEP]\nrw [show sin (↑π * (1 - s) / 2) = π * (Gamma ((1 - s) / 2) * Gamma (s / 2 + 1 / 2))⁻¹\n    by\n    have := congr_arg Inv.inv (Complex.Gamma_mul_Gamma_one_sub ((1 - s) / 2)).symm\n    rwa [(by ring : 1 - (1 - s) / 2 = s / 2 + 1 / 2), inv_div, div_eq_iff (ofReal_ne_zero.mpr pi_pos.ne'),\n      mul_comm _ (π : ℂ), mul_div_assoc'] at this ]\n[GOAL]\ns : ℂ\nhs : ∀ (n : ℕ), s ≠ -↑n\nhs' : s ≠ 1\nhs_ne : s ≠ 0\nh_sqrt : ↑(sqrt π) ≠ 0\nh_pow : 2 ^ (s - 1) ≠ 0\nh_Ga_ne1 : Complex.Gamma (s / 2) ≠ 0\nh_Ga_eq : Complex.Gamma s = Complex.Gamma (s / 2) * Complex.Gamma ((s + 1) / 2) * 2 ^ (s - 1) / ↑(sqrt π)\nh_Ga_ne3 : Complex.Gamma ((s + 1) / 2) ≠ 0\nhs_pos_odd : ¬∃ n, s = 1 + 2 * ↑n\nh_Ga_ne4 : Complex.Gamma ((1 - s) / 2) ≠ 0\n⊢ Complex.sin (↑π * (1 - s) / 2) = ↑π * (Complex.Gamma ((1 - s) / 2) * Complex.Gamma (s / 2 + 1 / 2))⁻¹\n[PROOFSTEP]\nhave := congr_arg Inv.inv (Complex.Gamma_mul_Gamma_one_sub ((1 - s) / 2)).symm\n[GOAL]\ns : ℂ\nhs : ∀ (n : ℕ), s ≠ -↑n\nhs' : s ≠ 1\nhs_ne : s ≠ 0\nh_sqrt : ↑(sqrt π) ≠ 0\nh_pow : 2 ^ (s - 1) ≠ 0\nh_Ga_ne1 : Complex.Gamma (s / 2) ≠ 0\nh_Ga_eq : Complex.Gamma s = Complex.Gamma (s / 2) * Complex.Gamma ((s + 1) / 2) * 2 ^ (s - 1) / ↑(sqrt π)\nh_Ga_ne3 : Complex.Gamma ((s + 1) / 2) ≠ 0\nhs_pos_odd : ¬∃ n, s = 1 + 2 * ↑n\nh_Ga_ne4 : Complex.Gamma ((1 - s) / 2) ≠ 0\nthis : (↑π / Complex.sin (↑π * ((1 - s) / 2)))⁻¹ = (Complex.Gamma ((1 - s) / 2) * Complex.Gamma (1 - (1 - s) / 2))⁻¹\n⊢ Complex.sin (↑π * (1 - s) / 2) = ↑π * (Complex.Gamma ((1 - s) / 2) * Complex.Gamma (s / 2 + 1 / 2))⁻¹\n[PROOFSTEP]\nrwa [(by ring : 1 - (1 - s) / 2 = s / 2 + 1 / 2), inv_div, div_eq_iff (ofReal_ne_zero.mpr pi_pos.ne'),\n  mul_comm _ (π : ℂ), mul_div_assoc'] at this \n[GOAL]\ns : ℂ\nhs : ∀ (n : ℕ), s ≠ -↑n\nhs' : s ≠ 1\nhs_ne : s ≠ 0\nh_sqrt : ↑(sqrt π) ≠ 0\nh_pow : 2 ^ (s - 1) ≠ 0\nh_Ga_ne1 : Complex.Gamma (s / 2) ≠ 0\nh_Ga_eq : Complex.Gamma s = Complex.Gamma (s / 2) * Complex.Gamma ((s + 1) / 2) * 2 ^ (s - 1) / ↑(sqrt π)\nh_Ga_ne3 : Complex.Gamma ((s + 1) / 2) ≠ 0\nhs_pos_odd : ¬∃ n, s = 1 + 2 * ↑n\nh_Ga_ne4 : Complex.Gamma ((1 - s) / 2) ≠ 0\nthis : (↑π / Complex.sin (↑π * ((1 - s) / 2)))⁻¹ = (Complex.Gamma ((1 - s) / 2) * Complex.Gamma (1 - (1 - s) / 2))⁻¹\n⊢ 1 - (1 - s) / 2 = s / 2 + 1 / 2\n[PROOFSTEP]\nring\n[GOAL]\ncase neg\ns : ℂ\nhs : ∀ (n : ℕ), s ≠ -↑n\nhs' : s ≠ 1\nhs_ne : s ≠ 0\nh_sqrt : ↑(sqrt π) ≠ 0\nh_pow : 2 ^ (s - 1) ≠ 0\nh_Ga_ne1 : Complex.Gamma (s / 2) ≠ 0\nh_Ga_eq : Complex.Gamma s = Complex.Gamma (s / 2) * Complex.Gamma ((s + 1) / 2) * 2 ^ (s - 1) / ↑(sqrt π)\nh_Ga_ne3 : Complex.Gamma ((s + 1) / 2) ≠ 0\nhs_pos_odd : ¬∃ n, s = 1 + 2 * ↑n\nh_Ga_ne4 : Complex.Gamma ((1 - s) / 2) ≠ 0\n⊢ Complex.Gamma (s / 2) * (↑π ^ ((1 - s) / 2) * riemannCompletedZeta s) / Complex.Gamma ((1 - s) / 2) =\n    2 ^ (1 - s) * ↑π ^ (-s) * Complex.Gamma s * (↑π * (Complex.Gamma ((1 - s) / 2) * Complex.Gamma (s / 2 + 1 / 2))⁻¹) *\n      (↑π ^ (s / 2) * riemannCompletedZeta s)\n[PROOFSTEP]\nrw [(by rw [← neg_sub] : (2 : ℂ) ^ (1 - s) = (2 : ℂ) ^ (-(s - 1))), cpow_neg, h_Ga_eq]\n[GOAL]\ns : ℂ\nhs : ∀ (n : ℕ), s ≠ -↑n\nhs' : s ≠ 1\nhs_ne : s ≠ 0\nh_sqrt : ↑(sqrt π) ≠ 0\nh_pow : 2 ^ (s - 1) ≠ 0\nh_Ga_ne1 : Complex.Gamma (s / 2) ≠ 0\nh_Ga_eq : Complex.Gamma s = Complex.Gamma (s / 2) * Complex.Gamma ((s + 1) / 2) * 2 ^ (s - 1) / ↑(sqrt π)\nh_Ga_ne3 : Complex.Gamma ((s + 1) / 2) ≠ 0\nhs_pos_odd : ¬∃ n, s = 1 + 2 * ↑n\nh_Ga_ne4 : Complex.Gamma ((1 - s) / 2) ≠ 0\n⊢ 2 ^ (1 - s) = 2 ^ (-(s - 1))\n[PROOFSTEP]\nrw [← neg_sub]\n[GOAL]\ncase neg\ns : ℂ\nhs : ∀ (n : ℕ), s ≠ -↑n\nhs' : s ≠ 1\nhs_ne : s ≠ 0\nh_sqrt : ↑(sqrt π) ≠ 0\nh_pow : 2 ^ (s - 1) ≠ 0\nh_Ga_ne1 : Complex.Gamma (s / 2) ≠ 0\nh_Ga_eq : Complex.Gamma s = Complex.Gamma (s / 2) * Complex.Gamma ((s + 1) / 2) * 2 ^ (s - 1) / ↑(sqrt π)\nh_Ga_ne3 : Complex.Gamma ((s + 1) / 2) ≠ 0\nhs_pos_odd : ¬∃ n, s = 1 + 2 * ↑n\nh_Ga_ne4 : Complex.Gamma ((1 - s) / 2) ≠ 0\n⊢ Complex.Gamma (s / 2) * (↑π ^ ((1 - s) / 2) * riemannCompletedZeta s) / Complex.Gamma ((1 - s) / 2) =\n    (2 ^ (s - 1))⁻¹ * ↑π ^ (-s) * (Complex.Gamma (s / 2) * Complex.Gamma ((s + 1) / 2) * 2 ^ (s - 1) / ↑(sqrt π)) *\n        (↑π * (Complex.Gamma ((1 - s) / 2) * Complex.Gamma (s / 2 + 1 / 2))⁻¹) *\n      (↑π ^ (s / 2) * riemannCompletedZeta s)\n[PROOFSTEP]\nsuffices (π : ℂ) ^ ((1 - s) / 2) = (π : ℂ) ^ (-s) * sqrt π * (π : ℂ) ^ (s / 2) by rw [this]; field_simp; ring_nf;\n  rw [← ofReal_pow, sq_sqrt pi_pos.le]; ring\n[GOAL]\ns : ℂ\nhs : ∀ (n : ℕ), s ≠ -↑n\nhs' : s ≠ 1\nhs_ne : s ≠ 0\nh_sqrt : ↑(sqrt π) ≠ 0\nh_pow : 2 ^ (s - 1) ≠ 0\nh_Ga_ne1 : Complex.Gamma (s / 2) ≠ 0\nh_Ga_eq : Complex.Gamma s = Complex.Gamma (s / 2) * Complex.Gamma ((s + 1) / 2) * 2 ^ (s - 1) / ↑(sqrt π)\nh_Ga_ne3 : Complex.Gamma ((s + 1) / 2) ≠ 0\nhs_pos_odd : ¬∃ n, s = 1 + 2 * ↑n\nh_Ga_ne4 : Complex.Gamma ((1 - s) / 2) ≠ 0\nthis : ↑π ^ ((1 - s) / 2) = ↑π ^ (-s) * ↑(sqrt π) * ↑π ^ (s / 2)\n⊢ Complex.Gamma (s / 2) * (↑π ^ ((1 - s) / 2) * riemannCompletedZeta s) / Complex.Gamma ((1 - s) / 2) =\n    (2 ^ (s - 1))⁻¹ * ↑π ^ (-s) * (Complex.Gamma (s / 2) * Complex.Gamma ((s + 1) / 2) * 2 ^ (s - 1) / ↑(sqrt π)) *\n        (↑π * (Complex.Gamma ((1 - s) / 2) * Complex.Gamma (s / 2 + 1 / 2))⁻¹) *\n      (↑π ^ (s / 2) * riemannCompletedZeta s)\n[PROOFSTEP]\nrw [this]\n[GOAL]\ns : ℂ\nhs : ∀ (n : ℕ), s ≠ -↑n\nhs' : s ≠ 1\nhs_ne : s ≠ 0\nh_sqrt : ↑(sqrt π) ≠ 0\nh_pow : 2 ^ (s - 1) ≠ 0\nh_Ga_ne1 : Complex.Gamma (s / 2) ≠ 0\nh_Ga_eq : Complex.Gamma s = Complex.Gamma (s / 2) * Complex.Gamma ((s + 1) / 2) * 2 ^ (s - 1) / ↑(sqrt π)\nh_Ga_ne3 : Complex.Gamma ((s + 1) / 2) ≠ 0\nhs_pos_odd : ¬∃ n, s = 1 + 2 * ↑n\nh_Ga_ne4 : Complex.Gamma ((1 - s) / 2) ≠ 0\nthis : ↑π ^ ((1 - s) / 2) = ↑π ^ (-s) * ↑(sqrt π) * ↑π ^ (s / 2)\n⊢ Complex.Gamma (s / 2) * (↑π ^ (-s) * ↑(sqrt π) * ↑π ^ (s / 2) * riemannCompletedZeta s) /\n      Complex.Gamma ((1 - s) / 2) =\n    (2 ^ (s - 1))⁻¹ * ↑π ^ (-s) * (Complex.Gamma (s / 2) * Complex.Gamma ((s + 1) / 2) * 2 ^ (s - 1) / ↑(sqrt π)) *\n        (↑π * (Complex.Gamma ((1 - s) / 2) * Complex.Gamma (s / 2 + 1 / 2))⁻¹) *\n      (↑π ^ (s / 2) * riemannCompletedZeta s)\n[PROOFSTEP]\nfield_simp\n[GOAL]\ns : ℂ\nhs : ∀ (n : ℕ), s ≠ -↑n\nhs' : s ≠ 1\nhs_ne : s ≠ 0\nh_sqrt : ↑(sqrt π) ≠ 0\nh_pow : 2 ^ (s - 1) ≠ 0\nh_Ga_ne1 : Complex.Gamma (s / 2) ≠ 0\nh_Ga_eq : Complex.Gamma s = Complex.Gamma (s / 2) * Complex.Gamma ((s + 1) / 2) * 2 ^ (s - 1) / ↑(sqrt π)\nh_Ga_ne3 : Complex.Gamma ((s + 1) / 2) ≠ 0\nhs_pos_odd : ¬∃ n, s = 1 + 2 * ↑n\nh_Ga_ne4 : Complex.Gamma ((1 - s) / 2) ≠ 0\nthis : ↑π ^ ((1 - s) / 2) = ↑π ^ (-s) * ↑(sqrt π) * ↑π ^ (s / 2)\n⊢ Complex.Gamma (s / 2) * (↑π ^ (-s) * ↑(sqrt π) * ↑π ^ (s / 2) * riemannCompletedZeta s) *\n      (2 ^ (s - 1) * ↑(sqrt π) * (Complex.Gamma ((1 - s) / 2) * Complex.Gamma ((s + 1) / 2))) =\n    ↑π ^ (-s) * (Complex.Gamma (s / 2) * Complex.Gamma ((s + 1) / 2) * 2 ^ (s - 1)) * ↑π *\n        (↑π ^ (s / 2) * riemannCompletedZeta s) *\n      Complex.Gamma ((1 - s) / 2)\n[PROOFSTEP]\nring_nf\n[GOAL]\ns : ℂ\nhs : ∀ (n : ℕ), s ≠ -↑n\nhs' : s ≠ 1\nhs_ne : s ≠ 0\nh_sqrt : ↑(sqrt π) ≠ 0\nh_pow : 2 ^ (s - 1) ≠ 0\nh_Ga_ne1 : Complex.Gamma (s / 2) ≠ 0\nh_Ga_eq : Complex.Gamma s = Complex.Gamma (s / 2) * Complex.Gamma ((s + 1) / 2) * 2 ^ (s - 1) / ↑(sqrt π)\nh_Ga_ne3 : Complex.Gamma ((s + 1) / 2) ≠ 0\nhs_pos_odd : ¬∃ n, s = 1 + 2 * ↑n\nh_Ga_ne4 : Complex.Gamma ((1 - s) / 2) ≠ 0\nthis : ↑π ^ ((1 - s) / 2) = ↑π ^ (-s) * ↑(sqrt π) * ↑π ^ (s / 2)\n⊢ Complex.Gamma (s * (↑(Int.ofNat 1) / ↑2)) * ↑π ^ (-s) * ↑(sqrt π) ^ 2 * ↑π ^ (s * (↑(Int.ofNat 1) / ↑2)) *\n            riemannCompletedZeta s *\n          2 ^ (-1 + s) *\n        Complex.Gamma (↑(Int.ofNat 1) / ↑2 + s * ↑(Int.negOfNat 1) * (↑(Int.ofNat 1) / ↑2)) *\n      Complex.Gamma (↑(Int.ofNat 1) / ↑2 + s * (↑(Int.ofNat 1) / ↑2)) =\n    Complex.Gamma (s * (↑(Int.ofNat 1) / ↑2)) * ↑π ^ (-s) * ↑π ^ (s * (↑(Int.ofNat 1) / ↑2)) * riemannCompletedZeta s *\n            2 ^ (-1 + s) *\n          Complex.Gamma (↑(Int.ofNat 1) / ↑2 + s * ↑(Int.negOfNat 1) * (↑(Int.ofNat 1) / ↑2)) *\n        Complex.Gamma (↑(Int.ofNat 1) / ↑2 + s * (↑(Int.ofNat 1) / ↑2)) *\n      ↑π\n[PROOFSTEP]\nrw [← ofReal_pow, sq_sqrt pi_pos.le]\n[GOAL]\ns : ℂ\nhs : ∀ (n : ℕ), s ≠ -↑n\nhs' : s ≠ 1\nhs_ne : s ≠ 0\nh_sqrt : ↑(sqrt π) ≠ 0\nh_pow : 2 ^ (s - 1) ≠ 0\nh_Ga_ne1 : Complex.Gamma (s / 2) ≠ 0\nh_Ga_eq : Complex.Gamma s = Complex.Gamma (s / 2) * Complex.Gamma ((s + 1) / 2) * 2 ^ (s - 1) / ↑(sqrt π)\nh_Ga_ne3 : Complex.Gamma ((s + 1) / 2) ≠ 0\nhs_pos_odd : ¬∃ n, s = 1 + 2 * ↑n\nh_Ga_ne4 : Complex.Gamma ((1 - s) / 2) ≠ 0\nthis : ↑π ^ ((1 - s) / 2) = ↑π ^ (-s) * ↑(sqrt π) * ↑π ^ (s / 2)\n⊢ Complex.Gamma (s * (↑(Int.ofNat 1) / ↑2)) * ↑π ^ (-s) * ↑π * ↑π ^ (s * (↑(Int.ofNat 1) / ↑2)) *\n            riemannCompletedZeta s *\n          2 ^ (-1 + s) *\n        Complex.Gamma (↑(Int.ofNat 1) / ↑2 + s * ↑(Int.negOfNat 1) * (↑(Int.ofNat 1) / ↑2)) *\n      Complex.Gamma (↑(Int.ofNat 1) / ↑2 + s * (↑(Int.ofNat 1) / ↑2)) =\n    Complex.Gamma (s * (↑(Int.ofNat 1) / ↑2)) * ↑π ^ (-s) * ↑π ^ (s * (↑(Int.ofNat 1) / ↑2)) * riemannCompletedZeta s *\n            2 ^ (-1 + s) *\n          Complex.Gamma (↑(Int.ofNat 1) / ↑2 + s * ↑(Int.negOfNat 1) * (↑(Int.ofNat 1) / ↑2)) *\n        Complex.Gamma (↑(Int.ofNat 1) / ↑2 + s * (↑(Int.ofNat 1) / ↑2)) *\n      ↑π\n[PROOFSTEP]\nring\n[GOAL]\ncase neg\ns : ℂ\nhs : ∀ (n : ℕ), s ≠ -↑n\nhs' : s ≠ 1\nhs_ne : s ≠ 0\nh_sqrt : ↑(sqrt π) ≠ 0\nh_pow : 2 ^ (s - 1) ≠ 0\nh_Ga_ne1 : Complex.Gamma (s / 2) ≠ 0\nh_Ga_eq : Complex.Gamma s = Complex.Gamma (s / 2) * Complex.Gamma ((s + 1) / 2) * 2 ^ (s - 1) / ↑(sqrt π)\nh_Ga_ne3 : Complex.Gamma ((s + 1) / 2) ≠ 0\nhs_pos_odd : ¬∃ n, s = 1 + 2 * ↑n\nh_Ga_ne4 : Complex.Gamma ((1 - s) / 2) ≠ 0\n⊢ ↑π ^ ((1 - s) / 2) = ↑π ^ (-s) * ↑(sqrt π) * ↑π ^ (s / 2)\n[PROOFSTEP]\nsimp_rw [sqrt_eq_rpow, ofReal_cpow pi_pos.le, ← cpow_add _ _ (ofReal_ne_zero.mpr pi_pos.ne')]\n[GOAL]\ncase neg\ns : ℂ\nhs : ∀ (n : ℕ), s ≠ -↑n\nhs' : s ≠ 1\nhs_ne : s ≠ 0\nh_sqrt : ↑(sqrt π) ≠ 0\nh_pow : 2 ^ (s - 1) ≠ 0\nh_Ga_ne1 : Complex.Gamma (s / 2) ≠ 0\nh_Ga_eq : Complex.Gamma s = Complex.Gamma (s / 2) * Complex.Gamma ((s + 1) / 2) * 2 ^ (s - 1) / ↑(sqrt π)\nh_Ga_ne3 : Complex.Gamma ((s + 1) / 2) ≠ 0\nhs_pos_odd : ¬∃ n, s = 1 + 2 * ↑n\nh_Ga_ne4 : Complex.Gamma ((1 - s) / 2) ≠ 0\n⊢ ↑π ^ ((1 - s) / 2) = ↑π ^ (-s + ↑(1 / 2) + s / 2)\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase neg.e_a\ns : ℂ\nhs : ∀ (n : ℕ), s ≠ -↑n\nhs' : s ≠ 1\nhs_ne : s ≠ 0\nh_sqrt : ↑(sqrt π) ≠ 0\nh_pow : 2 ^ (s - 1) ≠ 0\nh_Ga_ne1 : Complex.Gamma (s / 2) ≠ 0\nh_Ga_eq : Complex.Gamma s = Complex.Gamma (s / 2) * Complex.Gamma ((s + 1) / 2) * 2 ^ (s - 1) / ↑(sqrt π)\nh_Ga_ne3 : Complex.Gamma ((s + 1) / 2) ≠ 0\nhs_pos_odd : ¬∃ n, s = 1 + 2 * ↑n\nh_Ga_ne4 : Complex.Gamma ((1 - s) / 2) ≠ 0\n⊢ (1 - s) / 2 = -s + ↑(1 / 2) + s / 2\n[PROOFSTEP]\npush_cast\n[GOAL]\ncase neg.e_a\ns : ℂ\nhs : ∀ (n : ℕ), s ≠ -↑n\nhs' : s ≠ 1\nhs_ne : s ≠ 0\nh_sqrt : ↑(sqrt π) ≠ 0\nh_pow : 2 ^ (s - 1) ≠ 0\nh_Ga_ne1 : Complex.Gamma (s / 2) ≠ 0\nh_Ga_eq : Complex.Gamma s = Complex.Gamma (s / 2) * Complex.Gamma ((s + 1) / 2) * 2 ^ (s - 1) / ↑(sqrt π)\nh_Ga_ne3 : Complex.Gamma ((s + 1) / 2) ≠ 0\nhs_pos_odd : ¬∃ n, s = 1 + 2 * ↑n\nh_Ga_ne4 : Complex.Gamma ((1 - s) / 2) ≠ 0\n⊢ (1 - s) / 2 = -s + 1 / 2 + s / 2\n[PROOFSTEP]\nfield_simp\n[GOAL]\ncase neg.e_a\ns : ℂ\nhs : ∀ (n : ℕ), s ≠ -↑n\nhs' : s ≠ 1\nhs_ne : s ≠ 0\nh_sqrt : ↑(sqrt π) ≠ 0\nh_pow : 2 ^ (s - 1) ≠ 0\nh_Ga_ne1 : Complex.Gamma (s / 2) ≠ 0\nh_Ga_eq : Complex.Gamma s = Complex.Gamma (s / 2) * Complex.Gamma ((s + 1) / 2) * 2 ^ (s - 1) / ↑(sqrt π)\nh_Ga_ne3 : Complex.Gamma ((s + 1) / 2) ≠ 0\nhs_pos_odd : ¬∃ n, s = 1 + 2 * ↑n\nh_Ga_ne4 : Complex.Gamma ((1 - s) / 2) ≠ 0\n⊢ 1 - s = -(s * 2) + 1 + s\n[PROOFSTEP]\nring\n[GOAL]\nk : ℕ\n⊢ riemannZeta (-↑k) = (-1) ^ k * ↑(bernoulli (k + 1)) / (↑k + 1)\n[PROOFSTEP]\nrcases Nat.even_or_odd' k with ⟨m, rfl | rfl⟩\n[GOAL]\ncase intro.inl\nm : ℕ\n⊢ riemannZeta (-↑(2 * m)) = (-1) ^ (2 * m) * ↑(bernoulli (2 * m + 1)) / (↑(2 * m) + 1)\n[PROOFSTEP]\ncases' m with m m\n[GOAL]\ncase intro.inl.zero\n⊢ riemannZeta (-↑(2 * Nat.zero)) = (-1) ^ (2 * Nat.zero) * ↑(bernoulli (2 * Nat.zero + 1)) / (↑(2 * Nat.zero) + 1)\n[PROOFSTEP]\nrw [Nat.zero_eq, mul_zero, Nat.cast_zero, pow_zero, one_mul, zero_add, neg_zero, zero_add, div_one, bernoulli_one,\n  riemannZeta_zero]\n[GOAL]\ncase intro.inl.zero\n⊢ -1 / 2 = ↑(-1 / 2)\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase intro.inl.succ\nm : ℕ\n⊢ riemannZeta (-↑(2 * Nat.succ m)) =\n    (-1) ^ (2 * Nat.succ m) * ↑(bernoulli (2 * Nat.succ m + 1)) / (↑(2 * Nat.succ m) + 1)\n[PROOFSTEP]\nrw [Nat.cast_mul, ← neg_mul, Nat.cast_two, Nat.cast_succ, riemannZeta_neg_two_mul_nat_add_one,\n  bernoulli_eq_bernoulli'_of_ne_one]\n[GOAL]\ncase intro.inl.succ\nm : ℕ\n⊢ 0 = (-1) ^ (2 * Nat.succ m) * ↑(bernoulli' (2 * Nat.succ m + 1)) / (2 * (↑m + 1) + 1)\ncase intro.inl.succ m : ℕ ⊢ 2 * Nat.succ m + 1 ≠ 1\n[PROOFSTEP]\nswap\n[GOAL]\ncase intro.inl.succ\nm : ℕ\n⊢ 2 * Nat.succ m + 1 ≠ 1\n[PROOFSTEP]\napply ne_of_gt\n[GOAL]\ncase intro.inl.succ.h\nm : ℕ\n⊢ 1 < 2 * Nat.succ m + 1\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase intro.inl.succ\nm : ℕ\n⊢ 0 = (-1) ^ (2 * Nat.succ m) * ↑(bernoulli' (2 * Nat.succ m + 1)) / (2 * (↑m + 1) + 1)\n[PROOFSTEP]\nrw [bernoulli'_odd_eq_zero ⟨m + 1, rfl⟩ (by norm_num), Rat.cast_zero, mul_zero, zero_div]\n[GOAL]\nm : ℕ\n⊢ 1 < 2 * (m + 1) + 1\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase intro.inr\nm : ℕ\n⊢ riemannZeta (-↑(2 * m + 1)) = (-1) ^ (2 * m + 1) * ↑(bernoulli (2 * m + 1 + 1)) / (↑(2 * m + 1) + 1)\n[PROOFSTEP]\nrw [Odd.neg_one_pow ⟨m, rfl⟩]\n[GOAL]\ncase intro.inr\nm : ℕ\n⊢ riemannZeta (-↑(2 * m + 1)) = -1 * ↑(bernoulli (2 * m + 1 + 1)) / (↑(2 * m + 1) + 1)\n[PROOFSTEP]\nrw [show -(↑(2 * m + 1) : ℂ) = 1 - (2 * m + 2) by push_cast ; ring]\n[GOAL]\nm : ℕ\n⊢ -↑(2 * m + 1) = 1 - (2 * ↑m + 2)\n[PROOFSTEP]\npush_cast\n[GOAL]\nm : ℕ\n⊢ -(2 * ↑m + 1) = 1 - (2 * ↑m + 2)\n[PROOFSTEP]\nring\n[GOAL]\ncase intro.inr\nm : ℕ\n⊢ riemannZeta (1 - (2 * ↑m + 2)) = -1 * ↑(bernoulli (2 * m + 1 + 1)) / (↑(2 * m + 1) + 1)\n[PROOFSTEP]\nrw [riemannZeta_one_sub]\n[GOAL]\ncase intro.inr\nm : ℕ\n⊢ 2 ^ (1 - (2 * ↑m + 2)) * ↑π ^ (-(2 * ↑m + 2)) * Complex.Gamma (2 * ↑m + 2) *\n        Complex.sin (↑π * (1 - (2 * ↑m + 2)) / 2) *\n      riemannZeta (2 * ↑m + 2) =\n    -1 * ↑(bernoulli (2 * m + 1 + 1)) / (↑(2 * m + 1) + 1)\ncase intro.inr.hs\nm : ℕ\n⊢ ∀ (n : ℕ), 2 * ↑m + 2 ≠ -↑n\ncase intro.inr.hs' m : ℕ ⊢ 2 * ↑m + 2 ≠ 1\n[PROOFSTEP]\nrotate_left\n[GOAL]\ncase intro.inr.hs\nm : ℕ\n⊢ ∀ (n : ℕ), 2 * ↑m + 2 ≠ -↑n\n[PROOFSTEP]\nintro n\n[GOAL]\ncase intro.inr.hs\nm n : ℕ\n⊢ 2 * ↑m + 2 ≠ -↑n\n[PROOFSTEP]\nrw [(by norm_cast : 2 * (m : ℂ) + 2 = ↑(2 * m + 2)), ← Int.cast_neg_natCast, ← Int.cast_ofNat, Ne.def, Int.cast_inj]\n[GOAL]\nm n : ℕ\n⊢ 2 * ↑m + 2 = ↑(2 * m + 2)\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase intro.inr.hs\nm n : ℕ\n⊢ ¬↑(2 * m + 2) = -↑n\n[PROOFSTEP]\napply ne_of_gt\n[GOAL]\ncase intro.inr.hs.h\nm n : ℕ\n⊢ -↑n < ↑(2 * m + 2)\n[PROOFSTEP]\nexact lt_of_le_of_lt (by norm_num : (-n : ℤ) ≤ 0) (by positivity)\n[GOAL]\nm n : ℕ\n⊢ -↑n ≤ 0\n[PROOFSTEP]\nnorm_num\n[GOAL]\nm n : ℕ\n⊢ 0 < ↑(2 * m + 2)\n[PROOFSTEP]\npositivity\n[GOAL]\ncase intro.inr.hs'\nm : ℕ\n⊢ 2 * ↑m + 2 ≠ 1\n[PROOFSTEP]\nrw [(by norm_cast : 2 * (m : ℂ) + 2 = ↑(2 * m + 2)), Ne.def, Nat.cast_eq_one]\n[GOAL]\nm : ℕ\n⊢ 2 * ↑m + 2 = ↑(2 * m + 2)\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase intro.inr.hs'\nm : ℕ\n⊢ ¬2 * m + 2 = 1\n[PROOFSTEP]\nnorm_num\n  -- get rid of sine term\n[GOAL]\ncase intro.inr\nm : ℕ\n⊢ 2 ^ (1 - (2 * ↑m + 2)) * ↑π ^ (-(2 * ↑m + 2)) * Complex.Gamma (2 * ↑m + 2) *\n        Complex.sin (↑π * (1 - (2 * ↑m + 2)) / 2) *\n      riemannZeta (2 * ↑m + 2) =\n    -1 * ↑(bernoulli (2 * m + 1 + 1)) / (↑(2 * m + 1) + 1)\n[PROOFSTEP]\nrw [show Complex.sin (↑π * (1 - (2 * ↑m + 2)) / 2) = -(-1 : ℂ) ^ m\n    by\n    rw [(by field_simp; ring : (π : ℂ) * (1 - (2 * ↑m + 2)) / 2 = π / 2 - (π * m + π))]\n    rw [Complex.sin_pi_div_two_sub, Complex.cos_add_pi, neg_inj]\n    rcases Nat.even_or_odd' m with ⟨t, rfl | rfl⟩\n    · rw [pow_mul, neg_one_sq, one_pow]\n      convert Complex.cos_nat_mul_two_pi t using 2\n      push_cast ; ring_nf\n    · rw [pow_add, pow_one, pow_mul, neg_one_sq, one_pow, one_mul]\n      convert Complex.cos_nat_mul_two_pi_add_pi t using 2\n      push_cast ; ring_nf]\n  -- substitute in what we know about zeta values at positive integers\n[GOAL]\nm : ℕ\n⊢ Complex.sin (↑π * (1 - (2 * ↑m + 2)) / 2) = -(-1) ^ m\n[PROOFSTEP]\nrw [(by field_simp; ring : (π : ℂ) * (1 - (2 * ↑m + 2)) / 2 = π / 2 - (π * m + π))]\n[GOAL]\nm : ℕ\n⊢ ↑π * (1 - (2 * ↑m + 2)) / 2 = ↑π / 2 - (↑π * ↑m + ↑π)\n[PROOFSTEP]\nfield_simp\n[GOAL]\nm : ℕ\n⊢ ↑π * (1 - (2 * ↑m + 2)) = ↑π - 2 * (↑π * ↑m + ↑π)\n[PROOFSTEP]\nring\n[GOAL]\nm : ℕ\n⊢ Complex.sin (↑π / 2 - (↑π * ↑m + ↑π)) = -(-1) ^ m\n[PROOFSTEP]\nrw [Complex.sin_pi_div_two_sub, Complex.cos_add_pi, neg_inj]\n[GOAL]\nm : ℕ\n⊢ Complex.cos (↑π * ↑m) = (-1) ^ m\n[PROOFSTEP]\nrcases Nat.even_or_odd' m with ⟨t, rfl | rfl⟩\n[GOAL]\ncase intro.inl\nt : ℕ\n⊢ Complex.cos (↑π * ↑(2 * t)) = (-1) ^ (2 * t)\n[PROOFSTEP]\nrw [pow_mul, neg_one_sq, one_pow]\n[GOAL]\ncase intro.inl\nt : ℕ\n⊢ Complex.cos (↑π * ↑(2 * t)) = 1\n[PROOFSTEP]\nconvert Complex.cos_nat_mul_two_pi t using 2\n[GOAL]\ncase h.e'_2.h.e'_1\nt : ℕ\n⊢ ↑π * ↑(2 * t) = ↑t * (2 * ↑π)\n[PROOFSTEP]\npush_cast\n[GOAL]\ncase h.e'_2.h.e'_1\nt : ℕ\n⊢ ↑π * (2 * ↑t) = ↑t * (2 * ↑π)\n[PROOFSTEP]\nring_nf\n[GOAL]\ncase intro.inr\nt : ℕ\n⊢ Complex.cos (↑π * ↑(2 * t + 1)) = (-1) ^ (2 * t + 1)\n[PROOFSTEP]\nrw [pow_add, pow_one, pow_mul, neg_one_sq, one_pow, one_mul]\n[GOAL]\ncase intro.inr\nt : ℕ\n⊢ Complex.cos (↑π * ↑(2 * t + 1)) = -1\n[PROOFSTEP]\nconvert Complex.cos_nat_mul_two_pi_add_pi t using 2\n[GOAL]\ncase h.e'_2.h.e'_1\nt : ℕ\n⊢ ↑π * ↑(2 * t + 1) = ↑t * (2 * ↑π) + ↑π\n[PROOFSTEP]\npush_cast\n[GOAL]\ncase h.e'_2.h.e'_1\nt : ℕ\n⊢ ↑π * (2 * ↑t + 1) = ↑t * (2 * ↑π) + ↑π\n[PROOFSTEP]\nring_nf\n[GOAL]\ncase intro.inr\nm : ℕ\n⊢ 2 ^ (1 - (2 * ↑m + 2)) * ↑π ^ (-(2 * ↑m + 2)) * Complex.Gamma (2 * ↑m + 2) * -(-1) ^ m * riemannZeta (2 * ↑m + 2) =\n    -1 * ↑(bernoulli (2 * m + 1 + 1)) / (↑(2 * m + 1) + 1)\n[PROOFSTEP]\nhave step1 := congr_arg ((↑) : ℝ → ℂ) (hasSum_zeta_nat (by norm_num : m + 1 ≠ 0)).tsum_eq\n[GOAL]\nm : ℕ\n⊢ m + 1 ≠ 0\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase intro.inr\nm : ℕ\nstep1 :\n  ↑(∑' (b : ℕ), 1 / ↑b ^ (2 * (m + 1))) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1))) / ↑(2 * (m + 1))!)\n⊢ 2 ^ (1 - (2 * ↑m + 2)) * ↑π ^ (-(2 * ↑m + 2)) * Complex.Gamma (2 * ↑m + 2) * -(-1) ^ m * riemannZeta (2 * ↑m + 2) =\n    -1 * ↑(bernoulli (2 * m + 1 + 1)) / (↑(2 * m + 1) + 1)\n[PROOFSTEP]\nhave step2 := zeta_nat_eq_tsum_of_gt_one (by rw [mul_add]; norm_num : 1 < 2 * (m + 1))\n[GOAL]\nm : ℕ\nstep1 :\n  ↑(∑' (b : ℕ), 1 / ↑b ^ (2 * (m + 1))) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1))) / ↑(2 * (m + 1))!)\n⊢ 1 < 2 * (m + 1)\n[PROOFSTEP]\nrw [mul_add]\n[GOAL]\nm : ℕ\nstep1 :\n  ↑(∑' (b : ℕ), 1 / ↑b ^ (2 * (m + 1))) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1))) / ↑(2 * (m + 1))!)\n⊢ 1 < 2 * m + 2 * 1\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase intro.inr\nm : ℕ\nstep1 :\n  ↑(∑' (b : ℕ), 1 / ↑b ^ (2 * (m + 1))) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1))) / ↑(2 * (m + 1))!)\nstep2 : riemannZeta ↑(2 * (m + 1)) = ∑' (n : ℕ), 1 / ↑n ^ (2 * (m + 1))\n⊢ 2 ^ (1 - (2 * ↑m + 2)) * ↑π ^ (-(2 * ↑m + 2)) * Complex.Gamma (2 * ↑m + 2) * -(-1) ^ m * riemannZeta (2 * ↑m + 2) =\n    -1 * ↑(bernoulli (2 * m + 1 + 1)) / (↑(2 * m + 1) + 1)\n[PROOFSTEP]\nsimp_rw [ofReal_tsum, ofReal_div, ofReal_one, ofReal_pow, ofReal_nat_cast] at step1 \n[GOAL]\ncase intro.inr\nm : ℕ\nstep2 : riemannZeta ↑(2 * (m + 1)) = ∑' (n : ℕ), 1 / ↑n ^ (2 * (m + 1))\nstep1 :\n  ∑' (a : ℕ), 1 / ↑a ^ (2 * (m + 1)) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) / ↑(2 * (m + 1))!\n⊢ 2 ^ (1 - (2 * ↑m + 2)) * ↑π ^ (-(2 * ↑m + 2)) * Complex.Gamma (2 * ↑m + 2) * -(-1) ^ m * riemannZeta (2 * ↑m + 2) =\n    -1 * ↑(bernoulli (2 * m + 1 + 1)) / (↑(2 * m + 1) + 1)\n[PROOFSTEP]\nrw [step1, (by norm_cast : (↑(2 * (m + 1)) : ℂ) = 2 * ↑m + 2)] at step2 \n[GOAL]\nm : ℕ\nstep2 :\n  riemannZeta ↑(2 * (m + 1)) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) / ↑(2 * (m + 1))!\nstep1 :\n  ∑' (a : ℕ), 1 / ↑a ^ (2 * (m + 1)) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) / ↑(2 * (m + 1))!\n⊢ ↑(2 * (m + 1)) = 2 * ↑m + 2\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase intro.inr\nm : ℕ\nstep2 :\n  riemannZeta (2 * ↑m + 2) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) / ↑(2 * (m + 1))!\nstep1 :\n  ∑' (a : ℕ), 1 / ↑a ^ (2 * (m + 1)) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) / ↑(2 * (m + 1))!\n⊢ 2 ^ (1 - (2 * ↑m + 2)) * ↑π ^ (-(2 * ↑m + 2)) * Complex.Gamma (2 * ↑m + 2) * -(-1) ^ m * riemannZeta (2 * ↑m + 2) =\n    -1 * ↑(bernoulli (2 * m + 1 + 1)) / (↑(2 * m + 1) + 1)\n[PROOFSTEP]\nrw [step2, mul_div]\n  -- now the rest is just a lengthy but elementary rearrangement\n[GOAL]\ncase intro.inr\nm : ℕ\nstep2 :\n  riemannZeta (2 * ↑m + 2) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) / ↑(2 * (m + 1))!\nstep1 :\n  ∑' (a : ℕ), 1 / ↑a ^ (2 * (m + 1)) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) / ↑(2 * (m + 1))!\n⊢ 2 ^ (1 - (2 * ↑m + 2)) * ↑π ^ (-(2 * ↑m + 2)) * Complex.Gamma (2 * ↑m + 2) * -(-1) ^ m *\n        ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) /\n      ↑(2 * (m + 1))! =\n    -1 * ↑(bernoulli (2 * m + 1 + 1)) / (↑(2 * m + 1) + 1)\n[PROOFSTEP]\nrw [show ((2 * (m + 1))! : ℂ) = Complex.Gamma (2 * m + 2) * (↑(2 * m + 1) + 1)\n    by\n    rw [(by push_cast ; ring : (2 * m + 2 : ℂ) = ↑(2 * m + 1) + 1), Complex.Gamma_nat_eq_factorial,\n      (by ring : 2 * (m + 1) = 2 * m + 1 + 1), Nat.factorial_succ, Nat.cast_mul, mul_comm]\n    norm_num]\n[GOAL]\nm : ℕ\nstep2 :\n  riemannZeta (2 * ↑m + 2) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) / ↑(2 * (m + 1))!\nstep1 :\n  ∑' (a : ℕ), 1 / ↑a ^ (2 * (m + 1)) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) / ↑(2 * (m + 1))!\n⊢ ↑(2 * (m + 1))! = Complex.Gamma (2 * ↑m + 2) * (↑(2 * m + 1) + 1)\n[PROOFSTEP]\nrw [(by push_cast ; ring : (2 * m + 2 : ℂ) = ↑(2 * m + 1) + 1), Complex.Gamma_nat_eq_factorial,\n  (by ring : 2 * (m + 1) = 2 * m + 1 + 1), Nat.factorial_succ, Nat.cast_mul, mul_comm]\n[GOAL]\nm : ℕ\nstep2 :\n  riemannZeta (2 * ↑m + 2) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) / ↑(2 * (m + 1))!\nstep1 :\n  ∑' (a : ℕ), 1 / ↑a ^ (2 * (m + 1)) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) / ↑(2 * (m + 1))!\n⊢ 2 * ↑m + 2 = ↑(2 * m + 1) + 1\n[PROOFSTEP]\npush_cast\n[GOAL]\nm : ℕ\nstep2 :\n  riemannZeta (2 * ↑m + 2) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) / ↑(2 * (m + 1))!\nstep1 :\n  ∑' (a : ℕ), 1 / ↑a ^ (2 * (m + 1)) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) / ↑(2 * (m + 1))!\n⊢ 2 * ↑m + 2 = 2 * ↑m + 1 + 1\n[PROOFSTEP]\nring\n[GOAL]\nm : ℕ\nstep2 :\n  riemannZeta (2 * ↑m + 2) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) / ↑(2 * (m + 1))!\nstep1 :\n  ∑' (a : ℕ), 1 / ↑a ^ (2 * (m + 1)) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) / ↑(2 * (m + 1))!\n⊢ 2 * (m + 1) = 2 * m + 1 + 1\n[PROOFSTEP]\nring\n[GOAL]\nm : ℕ\nstep2 :\n  riemannZeta (2 * ↑m + 2) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) / ↑(2 * (m + 1))!\nstep1 :\n  ∑' (a : ℕ), 1 / ↑a ^ (2 * (m + 1)) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) / ↑(2 * (m + 1))!\n⊢ ↑(2 * m + 1)! * ↑(2 * m + 1 + 1) = ↑(2 * m + 1)! * (↑(2 * m + 1) + 1)\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase intro.inr\nm : ℕ\nstep2 :\n  riemannZeta (2 * ↑m + 2) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) / ↑(2 * (m + 1))!\nstep1 :\n  ∑' (a : ℕ), 1 / ↑a ^ (2 * (m + 1)) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) / ↑(2 * (m + 1))!\n⊢ 2 ^ (1 - (2 * ↑m + 2)) * ↑π ^ (-(2 * ↑m + 2)) * Complex.Gamma (2 * ↑m + 2) * -(-1) ^ m *\n        ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) /\n      (Complex.Gamma (2 * ↑m + 2) * (↑(2 * m + 1) + 1)) =\n    -1 * ↑(bernoulli (2 * m + 1 + 1)) / (↑(2 * m + 1) + 1)\n[PROOFSTEP]\nrw [← div_div, neg_one_mul]\n[GOAL]\ncase intro.inr\nm : ℕ\nstep2 :\n  riemannZeta (2 * ↑m + 2) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) / ↑(2 * (m + 1))!\nstep1 :\n  ∑' (a : ℕ), 1 / ↑a ^ (2 * (m + 1)) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) / ↑(2 * (m + 1))!\n⊢ 2 ^ (1 - (2 * ↑m + 2)) * ↑π ^ (-(2 * ↑m + 2)) * Complex.Gamma (2 * ↑m + 2) * -(-1) ^ m *\n          ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) /\n        Complex.Gamma (2 * ↑m + 2) /\n      (↑(2 * m + 1) + 1) =\n    -↑(bernoulli (2 * m + 1 + 1)) / (↑(2 * m + 1) + 1)\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase intro.inr.e_a\nm : ℕ\nstep2 :\n  riemannZeta (2 * ↑m + 2) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) / ↑(2 * (m + 1))!\nstep1 :\n  ∑' (a : ℕ), 1 / ↑a ^ (2 * (m + 1)) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) / ↑(2 * (m + 1))!\n⊢ 2 ^ (1 - (2 * ↑m + 2)) * ↑π ^ (-(2 * ↑m + 2)) * Complex.Gamma (2 * ↑m + 2) * -(-1) ^ m *\n        ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) /\n      Complex.Gamma (2 * ↑m + 2) =\n    -↑(bernoulli (2 * m + 1 + 1))\n[PROOFSTEP]\nrw [div_eq_iff (Gamma_ne_zero_of_re_pos _)]\n[GOAL]\ncase intro.inr.e_a\nm : ℕ\nstep2 :\n  riemannZeta (2 * ↑m + 2) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) / ↑(2 * (m + 1))!\nstep1 :\n  ∑' (a : ℕ), 1 / ↑a ^ (2 * (m + 1)) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) / ↑(2 * (m + 1))!\n⊢ 2 ^ (1 - (2 * ↑m + 2)) * ↑π ^ (-(2 * ↑m + 2)) * Complex.Gamma (2 * ↑m + 2) * -(-1) ^ m *\n      ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) =\n    -↑(bernoulli (2 * m + 1 + 1)) * Complex.Gamma (2 * ↑m + 2)\nm : ℕ\nstep2 :\n  riemannZeta (2 * ↑m + 2) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) / ↑(2 * (m + 1))!\nstep1 :\n  ∑' (a : ℕ), 1 / ↑a ^ (2 * (m + 1)) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) / ↑(2 * (m + 1))!\n⊢ 0 < (2 * ↑m + 2).re\n[PROOFSTEP]\nswap\n[GOAL]\nm : ℕ\nstep2 :\n  riemannZeta (2 * ↑m + 2) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) / ↑(2 * (m + 1))!\nstep1 :\n  ∑' (a : ℕ), 1 / ↑a ^ (2 * (m + 1)) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) / ↑(2 * (m + 1))!\n⊢ 0 < (2 * ↑m + 2).re\n[PROOFSTEP]\nrw [(by norm_num : 2 * (m : ℂ) + 2 = ↑(2 * (m : ℝ) + 2)), ofReal_re]\n[GOAL]\nm : ℕ\nstep2 :\n  riemannZeta (2 * ↑m + 2) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) / ↑(2 * (m + 1))!\nstep1 :\n  ∑' (a : ℕ), 1 / ↑a ^ (2 * (m + 1)) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) / ↑(2 * (m + 1))!\n⊢ 2 * ↑m + 2 = ↑(2 * ↑m + 2)\n[PROOFSTEP]\nnorm_num\n[GOAL]\nm : ℕ\nstep2 :\n  riemannZeta (2 * ↑m + 2) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) / ↑(2 * (m + 1))!\nstep1 :\n  ∑' (a : ℕ), 1 / ↑a ^ (2 * (m + 1)) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) / ↑(2 * (m + 1))!\n⊢ 0 < 2 * ↑m + 2\n[PROOFSTEP]\npositivity\n[GOAL]\ncase intro.inr.e_a\nm : ℕ\nstep2 :\n  riemannZeta (2 * ↑m + 2) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) / ↑(2 * (m + 1))!\nstep1 :\n  ∑' (a : ℕ), 1 / ↑a ^ (2 * (m + 1)) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) / ↑(2 * (m + 1))!\n⊢ 2 ^ (1 - (2 * ↑m + 2)) * ↑π ^ (-(2 * ↑m + 2)) * Complex.Gamma (2 * ↑m + 2) * -(-1) ^ m *\n      ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) =\n    -↑(bernoulli (2 * m + 1 + 1)) * Complex.Gamma (2 * ↑m + 2)\n[PROOFSTEP]\nsimp_rw [ofReal_mul, ← mul_assoc, ofReal_rat_cast, mul_add, Nat.add_assoc, mul_one, one_add_one_eq_two, mul_neg,\n  neg_mul, neg_inj]\n[GOAL]\ncase intro.inr.e_a\nm : ℕ\nstep2 :\n  riemannZeta (2 * ↑m + 2) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) / ↑(2 * (m + 1))!\nstep1 :\n  ∑' (a : ℕ), 1 / ↑a ^ (2 * (m + 1)) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) / ↑(2 * (m + 1))!\n⊢ 2 ^ (1 - (2 * ↑m + 2)) * ↑π ^ (-(2 * ↑m + 2)) * Complex.Gamma (2 * ↑m + 2) * (-1) ^ m * ↑((-1) ^ (m + 2)) *\n          ↑(2 ^ (2 * m + 2 - 1)) *\n        ↑(π ^ (2 * m + 2)) *\n      ↑(bernoulli (2 * m + 2)) =\n    ↑(bernoulli (2 * m + 2)) * Complex.Gamma (2 * ↑m + 2)\n[PROOFSTEP]\nconv_rhs => rw [mul_comm]\n[GOAL]\nm : ℕ\nstep2 :\n  riemannZeta (2 * ↑m + 2) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) / ↑(2 * (m + 1))!\nstep1 :\n  ∑' (a : ℕ), 1 / ↑a ^ (2 * (m + 1)) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) / ↑(2 * (m + 1))!\n| ↑(bernoulli (2 * m + 2)) * Complex.Gamma (2 * ↑m + 2)\n[PROOFSTEP]\nrw [mul_comm]\n[GOAL]\nm : ℕ\nstep2 :\n  riemannZeta (2 * ↑m + 2) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) / ↑(2 * (m + 1))!\nstep1 :\n  ∑' (a : ℕ), 1 / ↑a ^ (2 * (m + 1)) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) / ↑(2 * (m + 1))!\n| ↑(bernoulli (2 * m + 2)) * Complex.Gamma (2 * ↑m + 2)\n[PROOFSTEP]\nrw [mul_comm]\n[GOAL]\nm : ℕ\nstep2 :\n  riemannZeta (2 * ↑m + 2) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) / ↑(2 * (m + 1))!\nstep1 :\n  ∑' (a : ℕ), 1 / ↑a ^ (2 * (m + 1)) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) / ↑(2 * (m + 1))!\n| ↑(bernoulli (2 * m + 2)) * Complex.Gamma (2 * ↑m + 2)\n[PROOFSTEP]\nrw [mul_comm]\n[GOAL]\ncase intro.inr.e_a\nm : ℕ\nstep2 :\n  riemannZeta (2 * ↑m + 2) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) / ↑(2 * (m + 1))!\nstep1 :\n  ∑' (a : ℕ), 1 / ↑a ^ (2 * (m + 1)) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) / ↑(2 * (m + 1))!\n⊢ 2 ^ (1 - (2 * ↑m + 2)) * ↑π ^ (-(2 * ↑m + 2)) * Complex.Gamma (2 * ↑m + 2) * (-1) ^ m * ↑((-1) ^ (m + 2)) *\n          ↑(2 ^ (2 * m + 2 - 1)) *\n        ↑(π ^ (2 * m + 2)) *\n      ↑(bernoulli (2 * m + 2)) =\n    Complex.Gamma (2 * ↑m + 2) * ↑(bernoulli (2 * m + 2))\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase intro.inr.e_a.e_a\nm : ℕ\nstep2 :\n  riemannZeta (2 * ↑m + 2) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) / ↑(2 * (m + 1))!\nstep1 :\n  ∑' (a : ℕ), 1 / ↑a ^ (2 * (m + 1)) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) / ↑(2 * (m + 1))!\n⊢ 2 ^ (1 - (2 * ↑m + 2)) * ↑π ^ (-(2 * ↑m + 2)) * Complex.Gamma (2 * ↑m + 2) * (-1) ^ m * ↑((-1) ^ (m + 2)) *\n        ↑(2 ^ (2 * m + 2 - 1)) *\n      ↑(π ^ (2 * m + 2)) =\n    Complex.Gamma (2 * ↑m + 2)\n[PROOFSTEP]\nrw [ofReal_pow, ofReal_neg, ofReal_one, pow_add, neg_one_sq, mul_one]\n[GOAL]\ncase intro.inr.e_a.e_a\nm : ℕ\nstep2 :\n  riemannZeta (2 * ↑m + 2) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) / ↑(2 * (m + 1))!\nstep1 :\n  ∑' (a : ℕ), 1 / ↑a ^ (2 * (m + 1)) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) / ↑(2 * (m + 1))!\n⊢ 2 ^ (1 - (2 * ↑m + 2)) * ↑π ^ (-(2 * ↑m + 2)) * Complex.Gamma (2 * ↑m + 2) * (-1) ^ m * (-1) ^ m *\n        ↑(2 ^ (2 * m + 2 - 1)) *\n      ↑(π ^ (2 * m + 2)) =\n    Complex.Gamma (2 * ↑m + 2)\n[PROOFSTEP]\nconv_lhs =>\n  congr\n  congr\n  rw [mul_assoc, ← pow_add, ← two_mul, pow_mul, neg_one_sq, one_pow, mul_one]\n[GOAL]\nm : ℕ\nstep2 :\n  riemannZeta (2 * ↑m + 2) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) / ↑(2 * (m + 1))!\nstep1 :\n  ∑' (a : ℕ), 1 / ↑a ^ (2 * (m + 1)) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) / ↑(2 * (m + 1))!\n| 2 ^ (1 - (2 * ↑m + 2)) * ↑π ^ (-(2 * ↑m + 2)) * Complex.Gamma (2 * ↑m + 2) * (-1) ^ m * (-1) ^ m *\n      ↑(2 ^ (2 * m + 2 - 1)) *\n    ↑(π ^ (2 * m + 2))\n[PROOFSTEP]\n  congr\n  congr\n  rw [mul_assoc, ← pow_add, ← two_mul, pow_mul, neg_one_sq, one_pow, mul_one]\n[GOAL]\nm : ℕ\nstep2 :\n  riemannZeta (2 * ↑m + 2) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) / ↑(2 * (m + 1))!\nstep1 :\n  ∑' (a : ℕ), 1 / ↑a ^ (2 * (m + 1)) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) / ↑(2 * (m + 1))!\n| 2 ^ (1 - (2 * ↑m + 2)) * ↑π ^ (-(2 * ↑m + 2)) * Complex.Gamma (2 * ↑m + 2) * (-1) ^ m * (-1) ^ m *\n      ↑(2 ^ (2 * m + 2 - 1)) *\n    ↑(π ^ (2 * m + 2))\n[PROOFSTEP]\n  congr\n  congr\n  rw [mul_assoc, ← pow_add, ← two_mul, pow_mul, neg_one_sq, one_pow, mul_one]\n[GOAL]\nm : ℕ\nstep2 :\n  riemannZeta (2 * ↑m + 2) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) / ↑(2 * (m + 1))!\nstep1 :\n  ∑' (a : ℕ), 1 / ↑a ^ (2 * (m + 1)) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) / ↑(2 * (m + 1))!\n| 2 ^ (1 - (2 * ↑m + 2)) * ↑π ^ (-(2 * ↑m + 2)) * Complex.Gamma (2 * ↑m + 2) * (-1) ^ m * (-1) ^ m *\n      ↑(2 ^ (2 * m + 2 - 1)) *\n    ↑(π ^ (2 * m + 2))\n[PROOFSTEP]\ncongr\n[GOAL]\ncase a\nm : ℕ\nstep2 :\n  riemannZeta (2 * ↑m + 2) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) / ↑(2 * (m + 1))!\nstep1 :\n  ∑' (a : ℕ), 1 / ↑a ^ (2 * (m + 1)) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) / ↑(2 * (m + 1))!\n| 2 ^ (1 - (2 * ↑m + 2)) * ↑π ^ (-(2 * ↑m + 2)) * Complex.Gamma (2 * ↑m + 2) * (-1) ^ m * (-1) ^ m *\n    ↑(2 ^ (2 * m + 2 - 1))\ncase a\nm : ℕ\nstep2 :\n  riemannZeta (2 * ↑m + 2) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) / ↑(2 * (m + 1))!\nstep1 :\n  ∑' (a : ℕ), 1 / ↑a ^ (2 * (m + 1)) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) / ↑(2 * (m + 1))!\n| ↑(π ^ (2 * m + 2))\n[PROOFSTEP]\ncongr\n[GOAL]\ncase a.a\nm : ℕ\nstep2 :\n  riemannZeta (2 * ↑m + 2) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) / ↑(2 * (m + 1))!\nstep1 :\n  ∑' (a : ℕ), 1 / ↑a ^ (2 * (m + 1)) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) / ↑(2 * (m + 1))!\n| 2 ^ (1 - (2 * ↑m + 2)) * ↑π ^ (-(2 * ↑m + 2)) * Complex.Gamma (2 * ↑m + 2) * (-1) ^ m * (-1) ^ m\ncase a.a\nm : ℕ\nstep2 :\n  riemannZeta (2 * ↑m + 2) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) / ↑(2 * (m + 1))!\nstep1 :\n  ∑' (a : ℕ), 1 / ↑a ^ (2 * (m + 1)) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) / ↑(2 * (m + 1))!\n| ↑(2 ^ (2 * m + 2 - 1))\ncase a\nm : ℕ\nstep2 :\n  riemannZeta (2 * ↑m + 2) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) / ↑(2 * (m + 1))!\nstep1 :\n  ∑' (a : ℕ), 1 / ↑a ^ (2 * (m + 1)) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) / ↑(2 * (m + 1))!\n| ↑(π ^ (2 * m + 2))\n[PROOFSTEP]\nrw [mul_assoc, ← pow_add, ← two_mul, pow_mul, neg_one_sq, one_pow, mul_one]\n[GOAL]\ncase intro.inr.e_a.e_a\nm : ℕ\nstep2 :\n  riemannZeta (2 * ↑m + 2) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) / ↑(2 * (m + 1))!\nstep1 :\n  ∑' (a : ℕ), 1 / ↑a ^ (2 * (m + 1)) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) / ↑(2 * (m + 1))!\n⊢ 2 ^ (1 - (2 * ↑m + 2)) * ↑π ^ (-(2 * ↑m + 2)) * Complex.Gamma (2 * ↑m + 2) * ↑(2 ^ (2 * m + 2 - 1)) *\n      ↑(π ^ (2 * m + 2)) =\n    Complex.Gamma (2 * ↑m + 2)\n[PROOFSTEP]\nrw [show (2 : ℂ) ^ (1 - (2 * (m : ℂ) + 2)) = (↑((2 : ℝ) ^ (2 * m + 2 - 1)))⁻¹\n    by\n    rw [ofReal_pow, ← cpow_nat_cast, ← cpow_neg, show (2 : ℝ) = (2 : ℂ) by norm_num]\n    congr 1\n    rw [Nat.add_sub_assoc one_le_two, Nat.cast_add, Nat.cast_mul, Nat.cast_two, (by norm_num : 2 - 1 = 1)]\n    push_cast ; ring]\n[GOAL]\nm : ℕ\nstep2 :\n  riemannZeta (2 * ↑m + 2) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) / ↑(2 * (m + 1))!\nstep1 :\n  ∑' (a : ℕ), 1 / ↑a ^ (2 * (m + 1)) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) / ↑(2 * (m + 1))!\n⊢ 2 ^ (1 - (2 * ↑m + 2)) = (↑(2 ^ (2 * m + 2 - 1)))⁻¹\n[PROOFSTEP]\nrw [ofReal_pow, ← cpow_nat_cast, ← cpow_neg, show (2 : ℝ) = (2 : ℂ) by norm_num]\n[GOAL]\nm : ℕ\nstep2 :\n  riemannZeta (2 * ↑m + 2) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) / ↑(2 * (m + 1))!\nstep1 :\n  ∑' (a : ℕ), 1 / ↑a ^ (2 * (m + 1)) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) / ↑(2 * (m + 1))!\n⊢ ↑2 = 2\n[PROOFSTEP]\nnorm_num\n[GOAL]\nm : ℕ\nstep2 :\n  riemannZeta (2 * ↑m + 2) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) / ↑(2 * (m + 1))!\nstep1 :\n  ∑' (a : ℕ), 1 / ↑a ^ (2 * (m + 1)) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) / ↑(2 * (m + 1))!\n⊢ 2 ^ (1 - (2 * ↑m + 2)) = 2 ^ (-↑(2 * m + 2 - 1))\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_a\nm : ℕ\nstep2 :\n  riemannZeta (2 * ↑m + 2) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) / ↑(2 * (m + 1))!\nstep1 :\n  ∑' (a : ℕ), 1 / ↑a ^ (2 * (m + 1)) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) / ↑(2 * (m + 1))!\n⊢ 1 - (2 * ↑m + 2) = -↑(2 * m + 2 - 1)\n[PROOFSTEP]\nrw [Nat.add_sub_assoc one_le_two, Nat.cast_add, Nat.cast_mul, Nat.cast_two, (by norm_num : 2 - 1 = 1)]\n[GOAL]\nm : ℕ\nstep2 :\n  riemannZeta (2 * ↑m + 2) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) / ↑(2 * (m + 1))!\nstep1 :\n  ∑' (a : ℕ), 1 / ↑a ^ (2 * (m + 1)) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) / ↑(2 * (m + 1))!\n⊢ 2 - 1 = 1\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase e_a\nm : ℕ\nstep2 :\n  riemannZeta (2 * ↑m + 2) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) / ↑(2 * (m + 1))!\nstep1 :\n  ∑' (a : ℕ), 1 / ↑a ^ (2 * (m + 1)) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) / ↑(2 * (m + 1))!\n⊢ 1 - (2 * ↑m + 2) = -(2 * ↑m + ↑1)\n[PROOFSTEP]\npush_cast\n[GOAL]\ncase e_a\nm : ℕ\nstep2 :\n  riemannZeta (2 * ↑m + 2) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) / ↑(2 * (m + 1))!\nstep1 :\n  ∑' (a : ℕ), 1 / ↑a ^ (2 * (m + 1)) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) / ↑(2 * (m + 1))!\n⊢ 1 - (2 * ↑m + 2) = -(2 * ↑m + 1)\n[PROOFSTEP]\nring\n[GOAL]\ncase intro.inr.e_a.e_a\nm : ℕ\nstep2 :\n  riemannZeta (2 * ↑m + 2) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) / ↑(2 * (m + 1))!\nstep1 :\n  ∑' (a : ℕ), 1 / ↑a ^ (2 * (m + 1)) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) / ↑(2 * (m + 1))!\n⊢ (↑(2 ^ (2 * m + 2 - 1)))⁻¹ * ↑π ^ (-(2 * ↑m + 2)) * Complex.Gamma (2 * ↑m + 2) * ↑(2 ^ (2 * m + 2 - 1)) *\n      ↑(π ^ (2 * m + 2)) =\n    Complex.Gamma (2 * ↑m + 2)\n[PROOFSTEP]\nrw [show (π : ℂ) ^ (-(2 * (m : ℂ) + 2)) = (↑(π ^ (2 * m + 2)))⁻¹ by\n    rw [ofReal_pow, ← cpow_nat_cast, ← cpow_neg, Nat.cast_add, Nat.cast_mul, Nat.cast_two]]\n[GOAL]\nm : ℕ\nstep2 :\n  riemannZeta (2 * ↑m + 2) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) / ↑(2 * (m + 1))!\nstep1 :\n  ∑' (a : ℕ), 1 / ↑a ^ (2 * (m + 1)) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) / ↑(2 * (m + 1))!\n⊢ ↑π ^ (-(2 * ↑m + 2)) = (↑(π ^ (2 * m + 2)))⁻¹\n[PROOFSTEP]\nrw [ofReal_pow, ← cpow_nat_cast, ← cpow_neg, Nat.cast_add, Nat.cast_mul, Nat.cast_two]\n[GOAL]\ncase intro.inr.e_a.e_a\nm : ℕ\nstep2 :\n  riemannZeta (2 * ↑m + 2) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) / ↑(2 * (m + 1))!\nstep1 :\n  ∑' (a : ℕ), 1 / ↑a ^ (2 * (m + 1)) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) / ↑(2 * (m + 1))!\n⊢ (↑(2 ^ (2 * m + 2 - 1)))⁻¹ * (↑(π ^ (2 * m + 2)))⁻¹ * Complex.Gamma (2 * ↑m + 2) * ↑(2 ^ (2 * m + 2 - 1)) *\n      ↑(π ^ (2 * m + 2)) =\n    Complex.Gamma (2 * ↑m + 2)\n[PROOFSTEP]\nrw [(by intros; ring : ∀ a b c d e : ℂ, a * b * c * d * e = a * d * (b * e) * c)]\n[GOAL]\nm : ℕ\nstep2 :\n  riemannZeta (2 * ↑m + 2) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) / ↑(2 * (m + 1))!\nstep1 :\n  ∑' (a : ℕ), 1 / ↑a ^ (2 * (m + 1)) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) / ↑(2 * (m + 1))!\n⊢ ∀ (a b c d e : ℂ), a * b * c * d * e = a * d * (b * e) * c\n[PROOFSTEP]\nintros\n[GOAL]\nm : ℕ\nstep2 :\n  riemannZeta (2 * ↑m + 2) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) / ↑(2 * (m + 1))!\nstep1 :\n  ∑' (a : ℕ), 1 / ↑a ^ (2 * (m + 1)) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) / ↑(2 * (m + 1))!\na✝ b✝ c✝ d✝ e✝ : ℂ\n⊢ a✝ * b✝ * c✝ * d✝ * e✝ = a✝ * d✝ * (b✝ * e✝) * c✝\n[PROOFSTEP]\nring\n[GOAL]\ncase intro.inr.e_a.e_a\nm : ℕ\nstep2 :\n  riemannZeta (2 * ↑m + 2) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) / ↑(2 * (m + 1))!\nstep1 :\n  ∑' (a : ℕ), 1 / ↑a ^ (2 * (m + 1)) =\n    ↑((-1) ^ (m + 1 + 1) * 2 ^ (2 * (m + 1) - 1) * π ^ (2 * (m + 1)) * ↑(bernoulli (2 * (m + 1)))) / ↑(2 * (m + 1))!\n⊢ (↑(2 ^ (2 * m + 2 - 1)))⁻¹ * ↑(2 ^ (2 * m + 2 - 1)) * ((↑(π ^ (2 * m + 2)))⁻¹ * ↑(π ^ (2 * m + 2))) *\n      Complex.Gamma (2 * ↑m + 2) =\n    Complex.Gamma (2 * ↑m + 2)\n[PROOFSTEP]\nrw [inv_mul_cancel (ofReal_ne_zero.mpr <| pow_ne_zero _ pi_pos.ne'),\n  inv_mul_cancel (ofReal_ne_zero.mpr <| pow_ne_zero _ two_ne_zero), one_mul, one_mul]\n", "meta": {"mathlib_filename": "Mathlib.NumberTheory.ZetaFunction", "llama_tokens": 91325, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8006920020959545, "lm_q2_score": 0.6619228625116081, "lm_q1q2_score": 0.5299963420175048}}
{"text": "[GOAL]\nι : Type u_1\nM : Type u_2\ninst✝¹ : DecidableEq ι\ninst✝ : AddMonoid M\nl : List (ι →₀ M)\n⊢ (sum l).support ⊆ foldr ((fun x x_1 => x ⊔ x_1) ∘ Finsupp.support) ∅ l\n[PROOFSTEP]\ninduction' l with hd tl IH\n[GOAL]\ncase nil\nι : Type u_1\nM : Type u_2\ninst✝¹ : DecidableEq ι\ninst✝ : AddMonoid M\n⊢ (sum []).support ⊆ foldr ((fun x x_1 => x ⊔ x_1) ∘ Finsupp.support) ∅ []\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\nι : Type u_1\nM : Type u_2\ninst✝¹ : DecidableEq ι\ninst✝ : AddMonoid M\nhd : ι →₀ M\ntl : List (ι →₀ M)\nIH : (sum tl).support ⊆ foldr ((fun x x_1 => x ⊔ x_1) ∘ Finsupp.support) ∅ tl\n⊢ (sum (hd :: tl)).support ⊆ foldr ((fun x x_1 => x ⊔ x_1) ∘ Finsupp.support) ∅ (hd :: tl)\n[PROOFSTEP]\nsimp only [List.sum_cons, Finset.union_comm]\n[GOAL]\ncase cons\nι : Type u_1\nM : Type u_2\ninst✝¹ : DecidableEq ι\ninst✝ : AddMonoid M\nhd : ι →₀ M\ntl : List (ι →₀ M)\nIH : (sum tl).support ⊆ foldr ((fun x x_1 => x ⊔ x_1) ∘ Finsupp.support) ∅ tl\n⊢ (hd + sum tl).support ⊆ foldr ((fun x x_1 => x ⊔ x_1) ∘ Finsupp.support) ∅ (hd :: tl)\n[PROOFSTEP]\nrefine' Finsupp.support_add.trans (Finset.union_subset_union _ IH)\n[GOAL]\ncase cons\nι : Type u_1\nM : Type u_2\ninst✝¹ : DecidableEq ι\ninst✝ : AddMonoid M\nhd : ι →₀ M\ntl : List (ι →₀ M)\nIH : (sum tl).support ⊆ foldr ((fun x x_1 => x ⊔ x_1) ∘ Finsupp.support) ∅ tl\n⊢ hd.support ⊆ hd.support\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\nM : Type u_2\ninst✝¹ : DecidableEq ι\ninst✝ : AddCommMonoid M\ns : Multiset (ι →₀ M)\n⊢ (sum s).support ⊆ sup (map Finsupp.support s)\n[PROOFSTEP]\ninduction s using Quot.inductionOn\n[GOAL]\ncase h\nι : Type u_1\nM : Type u_2\ninst✝¹ : DecidableEq ι\ninst✝ : AddCommMonoid M\na✝ : List (ι →₀ M)\n⊢ (sum (Quot.mk Setoid.r a✝)).support ⊆ sup (map Finsupp.support (Quot.mk Setoid.r a✝))\n[PROOFSTEP]\nsimpa only [Multiset.quot_mk_to_coe'', Multiset.coe_sum, Multiset.coe_map, Multiset.sup_coe, List.foldr_map] using\n  List.support_sum_subset _\n[GOAL]\nι : Type u_1\nM : Type u_2\ninst✝¹ : DecidableEq ι\ninst✝ : AddCommMonoid M\ns : Finset (ι →₀ M)\n⊢ (Finset.sum s id).support ⊆ sup s Finsupp.support\n[PROOFSTEP]\nclassical convert Multiset.support_sum_subset s.1; simp\n[GOAL]\nι : Type u_1\nM : Type u_2\ninst✝¹ : DecidableEq ι\ninst✝ : AddCommMonoid M\ns : Finset (ι →₀ M)\n⊢ (Finset.sum s id).support ⊆ sup s Finsupp.support\n[PROOFSTEP]\nconvert Multiset.support_sum_subset s.1\n[GOAL]\ncase h.e'_3.h.e'_4\nι : Type u_1\nM : Type u_2\ninst✝¹ : DecidableEq ι\ninst✝ : AddCommMonoid M\ns : Finset (ι →₀ M)\n⊢ Finset.sum s id = Multiset.sum s.val\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nM : Type u_2\ninst✝¹ : DecidableEq ι\ninst✝ : Zero M\nl : List (ι →₀ M)\nx : ι\n⊢ x ∈ foldr ((fun x x_1 => x ⊔ x_1) ∘ Finsupp.support) ∅ l ↔ ∃ f x_1, x ∈ f.support\n[PROOFSTEP]\nsimp only [Finset.sup_eq_union, List.foldr_map, Finsupp.mem_support_iff, exists_prop]\n[GOAL]\nι : Type u_1\nM : Type u_2\ninst✝¹ : DecidableEq ι\ninst✝ : Zero M\nl : List (ι →₀ M)\nx : ι\n⊢ x ∈ foldr ((fun x x_1 => x ∪ x_1) ∘ Finsupp.support) ∅ l ↔ ∃ f, f ∈ l ∧ ↑f x ≠ 0\n[PROOFSTEP]\ninduction' l with hd tl IH\n[GOAL]\ncase nil\nι : Type u_1\nM : Type u_2\ninst✝¹ : DecidableEq ι\ninst✝ : Zero M\nx : ι\n⊢ x ∈ foldr ((fun x x_1 => x ∪ x_1) ∘ Finsupp.support) ∅ [] ↔ ∃ f, f ∈ [] ∧ ↑f x ≠ 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\nι : Type u_1\nM : Type u_2\ninst✝¹ : DecidableEq ι\ninst✝ : Zero M\nx : ι\nhd : ι →₀ M\ntl : List (ι →₀ M)\nIH : x ∈ foldr ((fun x x_1 => x ∪ x_1) ∘ Finsupp.support) ∅ tl ↔ ∃ f, f ∈ tl ∧ ↑f x ≠ 0\n⊢ x ∈ foldr ((fun x x_1 => x ∪ x_1) ∘ Finsupp.support) ∅ (hd :: tl) ↔ ∃ f, f ∈ hd :: tl ∧ ↑f x ≠ 0\n[PROOFSTEP]\nsimp only [foldr, Function.comp_apply, Finset.mem_union, Finsupp.mem_support_iff, ne_eq, IH, find?, mem_cons,\n  exists_eq_or_imp]\n[GOAL]\nι : Type u_1\nM : Type u_2\ninst✝¹ : DecidableEq ι\ninst✝ : Zero M\ns : Multiset (ι →₀ M)\nx : ι\nx✝ : List (ι →₀ M)\n⊢ x ∈ sup (map Finsupp.support (Quot.mk Setoid.r x✝)) ↔ ∃ f x_1, x ∈ f.support\n[PROOFSTEP]\nsimpa only [Multiset.quot_mk_to_coe'', Multiset.coe_map, Multiset.sup_coe, List.foldr_map] using\n  List.mem_foldr_sup_support_iff\n[GOAL]\nι : Type u_1\nM : Type u_2\ninst✝¹ : DecidableEq ι\ninst✝ : AddMonoid M\nl : List (ι →₀ M)\nhl : Pairwise (_root_.Disjoint on Finsupp.support) l\n⊢ (sum l).support = foldr ((fun x x_1 => x ⊔ x_1) ∘ Finsupp.support) ∅ l\n[PROOFSTEP]\ninduction' l with hd tl IH\n[GOAL]\ncase nil\nι : Type u_1\nM : Type u_2\ninst✝¹ : DecidableEq ι\ninst✝ : AddMonoid M\nl : List (ι →₀ M)\nhl✝ : Pairwise (_root_.Disjoint on Finsupp.support) l\nhl : Pairwise (_root_.Disjoint on Finsupp.support) []\n⊢ (sum []).support = foldr ((fun x x_1 => x ⊔ x_1) ∘ Finsupp.support) ∅ []\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\nι : Type u_1\nM : Type u_2\ninst✝¹ : DecidableEq ι\ninst✝ : AddMonoid M\nl : List (ι →₀ M)\nhl✝ : Pairwise (_root_.Disjoint on Finsupp.support) l\nhd : ι →₀ M\ntl : List (ι →₀ M)\nIH :\n  Pairwise (_root_.Disjoint on Finsupp.support) tl →\n    (sum tl).support = foldr ((fun x x_1 => x ⊔ x_1) ∘ Finsupp.support) ∅ tl\nhl : Pairwise (_root_.Disjoint on Finsupp.support) (hd :: tl)\n⊢ (sum (hd :: tl)).support = foldr ((fun x x_1 => x ⊔ x_1) ∘ Finsupp.support) ∅ (hd :: tl)\n[PROOFSTEP]\nsimp only [List.pairwise_cons] at hl \n[GOAL]\ncase cons\nι : Type u_1\nM : Type u_2\ninst✝¹ : DecidableEq ι\ninst✝ : AddMonoid M\nl : List (ι →₀ M)\nhl✝ : Pairwise (_root_.Disjoint on Finsupp.support) l\nhd : ι →₀ M\ntl : List (ι →₀ M)\nIH :\n  Pairwise (_root_.Disjoint on Finsupp.support) tl →\n    (sum tl).support = foldr ((fun x x_1 => x ⊔ x_1) ∘ Finsupp.support) ∅ tl\nhl :\n  (∀ (a' : ι →₀ M), a' ∈ tl → (_root_.Disjoint on Finsupp.support) hd a') ∧\n    Pairwise (_root_.Disjoint on Finsupp.support) tl\n⊢ (sum (hd :: tl)).support = foldr ((fun x x_1 => x ⊔ x_1) ∘ Finsupp.support) ∅ (hd :: tl)\n[PROOFSTEP]\nsimp only [List.sum_cons, List.foldr_cons, Function.comp_apply]\n[GOAL]\ncase cons\nι : Type u_1\nM : Type u_2\ninst✝¹ : DecidableEq ι\ninst✝ : AddMonoid M\nl : List (ι →₀ M)\nhl✝ : Pairwise (_root_.Disjoint on Finsupp.support) l\nhd : ι →₀ M\ntl : List (ι →₀ M)\nIH :\n  Pairwise (_root_.Disjoint on Finsupp.support) tl →\n    (sum tl).support = foldr ((fun x x_1 => x ⊔ x_1) ∘ Finsupp.support) ∅ tl\nhl :\n  (∀ (a' : ι →₀ M), a' ∈ tl → (_root_.Disjoint on Finsupp.support) hd a') ∧\n    Pairwise (_root_.Disjoint on Finsupp.support) tl\n⊢ (hd + sum tl).support = hd.support ⊔ foldr ((fun x x_1 => x ⊔ x_1) ∘ Finsupp.support) ∅ tl\n[PROOFSTEP]\nrw [Finsupp.support_add_eq, IH hl.right, Finset.sup_eq_union]\n[GOAL]\ncase cons\nι : Type u_1\nM : Type u_2\ninst✝¹ : DecidableEq ι\ninst✝ : AddMonoid M\nl : List (ι →₀ M)\nhl✝ : Pairwise (_root_.Disjoint on Finsupp.support) l\nhd : ι →₀ M\ntl : List (ι →₀ M)\nIH :\n  Pairwise (_root_.Disjoint on Finsupp.support) tl →\n    (sum tl).support = foldr ((fun x x_1 => x ⊔ x_1) ∘ Finsupp.support) ∅ tl\nhl :\n  (∀ (a' : ι →₀ M), a' ∈ tl → (_root_.Disjoint on Finsupp.support) hd a') ∧\n    Pairwise (_root_.Disjoint on Finsupp.support) tl\n⊢ _root_.Disjoint hd.support (sum tl).support\n[PROOFSTEP]\nsuffices _root_.Disjoint hd.support (tl.foldr (fun x y ↦ (Finsupp.support x ⊔ y)) ∅) by\n  exact Finset.disjoint_of_subset_right (List.support_sum_subset _) this\n[GOAL]\nι : Type u_1\nM : Type u_2\ninst✝¹ : DecidableEq ι\ninst✝ : AddMonoid M\nl : List (ι →₀ M)\nhl✝ : Pairwise (_root_.Disjoint on Finsupp.support) l\nhd : ι →₀ M\ntl : List (ι →₀ M)\nIH :\n  Pairwise (_root_.Disjoint on Finsupp.support) tl →\n    (sum tl).support = foldr ((fun x x_1 => x ⊔ x_1) ∘ Finsupp.support) ∅ tl\nhl :\n  (∀ (a' : ι →₀ M), a' ∈ tl → (_root_.Disjoint on Finsupp.support) hd a') ∧\n    Pairwise (_root_.Disjoint on Finsupp.support) tl\nthis : _root_.Disjoint hd.support (foldr (fun x y => x.support ⊔ y) ∅ tl)\n⊢ _root_.Disjoint hd.support (sum tl).support\n[PROOFSTEP]\nexact Finset.disjoint_of_subset_right (List.support_sum_subset _) this\n[GOAL]\ncase cons\nι : Type u_1\nM : Type u_2\ninst✝¹ : DecidableEq ι\ninst✝ : AddMonoid M\nl : List (ι →₀ M)\nhl✝ : Pairwise (_root_.Disjoint on Finsupp.support) l\nhd : ι →₀ M\ntl : List (ι →₀ M)\nIH :\n  Pairwise (_root_.Disjoint on Finsupp.support) tl →\n    (sum tl).support = foldr ((fun x x_1 => x ⊔ x_1) ∘ Finsupp.support) ∅ tl\nhl :\n  (∀ (a' : ι →₀ M), a' ∈ tl → (_root_.Disjoint on Finsupp.support) hd a') ∧\n    Pairwise (_root_.Disjoint on Finsupp.support) tl\n⊢ _root_.Disjoint hd.support (foldr (fun x y => x.support ⊔ y) ∅ tl)\n[PROOFSTEP]\nrw [← List.foldr_map, ← Finset.bot_eq_empty, List.foldr_sup_eq_sup_toFinset, Finset.disjoint_sup_right]\n[GOAL]\ncase cons\nι : Type u_1\nM : Type u_2\ninst✝¹ : DecidableEq ι\ninst✝ : AddMonoid M\nl : List (ι →₀ M)\nhl✝ : Pairwise (_root_.Disjoint on Finsupp.support) l\nhd : ι →₀ M\ntl : List (ι →₀ M)\nIH :\n  Pairwise (_root_.Disjoint on Finsupp.support) tl →\n    (sum tl).support = foldr ((fun x x_1 => x ⊔ x_1) ∘ Finsupp.support) ∅ tl\nhl :\n  (∀ (a' : ι →₀ M), a' ∈ tl → (_root_.Disjoint on Finsupp.support) hd a') ∧\n    Pairwise (_root_.Disjoint on Finsupp.support) tl\n⊢ ∀ ⦃i : Finset ι⦄, i ∈ toFinset (map (fun x => x.support) tl) → _root_.Disjoint hd.support (id i)\n[PROOFSTEP]\nintro f hf\n[GOAL]\ncase cons\nι : Type u_1\nM : Type u_2\ninst✝¹ : DecidableEq ι\ninst✝ : AddMonoid M\nl : List (ι →₀ M)\nhl✝ : Pairwise (_root_.Disjoint on Finsupp.support) l\nhd : ι →₀ M\ntl : List (ι →₀ M)\nIH :\n  Pairwise (_root_.Disjoint on Finsupp.support) tl →\n    (sum tl).support = foldr ((fun x x_1 => x ⊔ x_1) ∘ Finsupp.support) ∅ tl\nhl :\n  (∀ (a' : ι →₀ M), a' ∈ tl → (_root_.Disjoint on Finsupp.support) hd a') ∧\n    Pairwise (_root_.Disjoint on Finsupp.support) tl\nf : Finset ι\nhf : f ∈ toFinset (map (fun x => x.support) tl)\n⊢ _root_.Disjoint hd.support (id f)\n[PROOFSTEP]\nsimp only [List.mem_toFinset, List.mem_map] at hf \n[GOAL]\ncase cons\nι : Type u_1\nM : Type u_2\ninst✝¹ : DecidableEq ι\ninst✝ : AddMonoid M\nl : List (ι →₀ M)\nhl✝ : Pairwise (_root_.Disjoint on Finsupp.support) l\nhd : ι →₀ M\ntl : List (ι →₀ M)\nIH :\n  Pairwise (_root_.Disjoint on Finsupp.support) tl →\n    (sum tl).support = foldr ((fun x x_1 => x ⊔ x_1) ∘ Finsupp.support) ∅ tl\nhl :\n  (∀ (a' : ι →₀ M), a' ∈ tl → (_root_.Disjoint on Finsupp.support) hd a') ∧\n    Pairwise (_root_.Disjoint on Finsupp.support) tl\nf : Finset ι\nhf : ∃ a, a ∈ tl ∧ a.support = f\n⊢ _root_.Disjoint hd.support (id f)\n[PROOFSTEP]\nobtain ⟨f, hf, rfl⟩ := hf\n[GOAL]\ncase cons.intro.intro\nι : Type u_1\nM : Type u_2\ninst✝¹ : DecidableEq ι\ninst✝ : AddMonoid M\nl : List (ι →₀ M)\nhl✝ : Pairwise (_root_.Disjoint on Finsupp.support) l\nhd : ι →₀ M\ntl : List (ι →₀ M)\nIH :\n  Pairwise (_root_.Disjoint on Finsupp.support) tl →\n    (sum tl).support = foldr ((fun x x_1 => x ⊔ x_1) ∘ Finsupp.support) ∅ tl\nhl :\n  (∀ (a' : ι →₀ M), a' ∈ tl → (_root_.Disjoint on Finsupp.support) hd a') ∧\n    Pairwise (_root_.Disjoint on Finsupp.support) tl\nf : ι →₀ M\nhf : f ∈ tl\n⊢ _root_.Disjoint hd.support (id f.support)\n[PROOFSTEP]\nexact hl.left _ hf\n[GOAL]\nι : Type u_1\nM : Type u_2\ninst✝¹ : DecidableEq ι\ninst✝ : AddCommMonoid M\ns : Multiset (ι →₀ M)\nhs : Pairwise (_root_.Disjoint on Finsupp.support) s\n⊢ (sum s).support = sup (map Finsupp.support s)\n[PROOFSTEP]\ninduction' s using Quot.inductionOn with a\n[GOAL]\ncase h\nι : Type u_1\nM : Type u_2\ninst✝¹ : DecidableEq ι\ninst✝ : AddCommMonoid M\ns : Multiset (ι →₀ M)\nhs✝ : Pairwise (_root_.Disjoint on Finsupp.support) s\na : List (ι →₀ M)\nhs : Pairwise (_root_.Disjoint on Finsupp.support) (Quot.mk Setoid.r a)\n⊢ (sum (Quot.mk Setoid.r a)).support = sup (map Finsupp.support (Quot.mk Setoid.r a))\n[PROOFSTEP]\nobtain ⟨l, hl, hd⟩ := hs\n[GOAL]\ncase h.intro.intro\nι : Type u_1\nM : Type u_2\ninst✝¹ : DecidableEq ι\ninst✝ : AddCommMonoid M\ns : Multiset (ι →₀ M)\nhs : Pairwise (_root_.Disjoint on Finsupp.support) s\na l : List (ι →₀ M)\nhl : Quot.mk Setoid.r a = ↑l\nhd : List.Pairwise (_root_.Disjoint on Finsupp.support) l\n⊢ (sum (Quot.mk Setoid.r a)).support = sup (map Finsupp.support (Quot.mk Setoid.r a))\n[PROOFSTEP]\nsuffices : a.Pairwise (_root_.Disjoint on Finsupp.support)\n[GOAL]\ncase h.intro.intro\nι : Type u_1\nM : Type u_2\ninst✝¹ : DecidableEq ι\ninst✝ : AddCommMonoid M\ns : Multiset (ι →₀ M)\nhs : Pairwise (_root_.Disjoint on Finsupp.support) s\na l : List (ι →₀ M)\nhl : Quot.mk Setoid.r a = ↑l\nhd : List.Pairwise (_root_.Disjoint on Finsupp.support) l\nthis : List.Pairwise (_root_.Disjoint on Finsupp.support) a\n⊢ (sum (Quot.mk Setoid.r a)).support = sup (map Finsupp.support (Quot.mk Setoid.r a))\n[PROOFSTEP]\nconvert List.support_sum_eq a this\n[GOAL]\ncase h.e'_2.h.e'_4\nι : Type u_1\nM : Type u_2\ninst✝¹ : DecidableEq ι\ninst✝ : AddCommMonoid M\ns : Multiset (ι →₀ M)\nhs : Pairwise (_root_.Disjoint on Finsupp.support) s\na l : List (ι →₀ M)\nhl : Quot.mk Setoid.r a = ↑l\nhd : List.Pairwise (_root_.Disjoint on Finsupp.support) l\nthis : List.Pairwise (_root_.Disjoint on Finsupp.support) a\n⊢ sum (Quot.mk Setoid.r a) = List.sum a\n[PROOFSTEP]\nsimp only [Multiset.quot_mk_to_coe'', Multiset.coe_sum]\n[GOAL]\ncase h.e'_3\nι : Type u_1\nM : Type u_2\ninst✝¹ : DecidableEq ι\ninst✝ : AddCommMonoid M\ns : Multiset (ι →₀ M)\nhs : Pairwise (_root_.Disjoint on Finsupp.support) s\na l : List (ι →₀ M)\nhl : Quot.mk Setoid.r a = ↑l\nhd : List.Pairwise (_root_.Disjoint on Finsupp.support) l\nthis : List.Pairwise (_root_.Disjoint on Finsupp.support) a\n⊢ sup (map Finsupp.support (Quot.mk Setoid.r a)) = List.foldr ((fun x x_1 => x ⊔ x_1) ∘ Finsupp.support) ∅ a\n[PROOFSTEP]\ndsimp only [Function.comp]\n[GOAL]\ncase h.e'_3\nι : Type u_1\nM : Type u_2\ninst✝¹ : DecidableEq ι\ninst✝ : AddCommMonoid M\ns : Multiset (ι →₀ M)\nhs : Pairwise (_root_.Disjoint on Finsupp.support) s\na l : List (ι →₀ M)\nhl : Quot.mk Setoid.r a = ↑l\nhd : List.Pairwise (_root_.Disjoint on Finsupp.support) l\nthis : List.Pairwise (_root_.Disjoint on Finsupp.support) a\n⊢ sup (map Finsupp.support (Quot.mk Setoid.r a)) = List.foldr (fun x x_1 => x.support ⊔ x_1) ∅ a\n[PROOFSTEP]\nsimp only [quot_mk_to_coe'', coe_map, sup_coe, ge_iff_le, Finset.le_eq_subset, Finset.sup_eq_union, Finset.bot_eq_empty,\n  List.foldr_map]\n[GOAL]\ncase this\nι : Type u_1\nM : Type u_2\ninst✝¹ : DecidableEq ι\ninst✝ : AddCommMonoid M\ns : Multiset (ι →₀ M)\nhs : Pairwise (_root_.Disjoint on Finsupp.support) s\na l : List (ι →₀ M)\nhl : Quot.mk Setoid.r a = ↑l\nhd : List.Pairwise (_root_.Disjoint on Finsupp.support) l\n⊢ List.Pairwise (_root_.Disjoint on Finsupp.support) a\n[PROOFSTEP]\nsimp only [Multiset.quot_mk_to_coe'', Multiset.coe_map, Multiset.coe_eq_coe] at hl \n[GOAL]\ncase this\nι : Type u_1\nM : Type u_2\ninst✝¹ : DecidableEq ι\ninst✝ : AddCommMonoid M\ns : Multiset (ι →₀ M)\nhs : Pairwise (_root_.Disjoint on Finsupp.support) s\na l : List (ι →₀ M)\nhd : List.Pairwise (_root_.Disjoint on Finsupp.support) l\nhl : a ~ l\n⊢ List.Pairwise (_root_.Disjoint on Finsupp.support) a\n[PROOFSTEP]\nexact hl.symm.pairwise hd fun _ _ h ↦ _root_.Disjoint.symm h\n[GOAL]\nι : Type u_1\nM : Type u_2\ninst✝¹ : DecidableEq ι\ninst✝ : AddCommMonoid M\ns : Finset (ι →₀ M)\nhs : Set.PairwiseDisjoint (↑s) Finsupp.support\n⊢ (Finset.sum s id).support = sup s Finsupp.support\n[PROOFSTEP]\nclassical\nsuffices : s.1.Pairwise (_root_.Disjoint on Finsupp.support)\n· convert Multiset.support_sum_eq s.1 this\n  · exact (Finset.sum_val _).symm\n· obtain ⟨l, hl, hn⟩ : ∃ l : List (ι →₀ M), l.toFinset = s ∧ l.Nodup :=\n    by\n    refine' ⟨s.toList, _, Finset.nodup_toList _⟩\n    simp\n  subst hl\n  rwa [List.toFinset_val, List.dedup_eq_self.mpr hn, Multiset.pairwise_coe_iff_pairwise, ←\n    List.pairwiseDisjoint_iff_coe_toFinset_pairwise_disjoint hn]\n  intro x y hxy\n  exact symmetric_disjoint hxy\n[GOAL]\nι : Type u_1\nM : Type u_2\ninst✝¹ : DecidableEq ι\ninst✝ : AddCommMonoid M\ns : Finset (ι →₀ M)\nhs : Set.PairwiseDisjoint (↑s) Finsupp.support\n⊢ (Finset.sum s id).support = sup s Finsupp.support\n[PROOFSTEP]\nsuffices : s.1.Pairwise (_root_.Disjoint on Finsupp.support)\n[GOAL]\nι : Type u_1\nM : Type u_2\ninst✝¹ : DecidableEq ι\ninst✝ : AddCommMonoid M\ns : Finset (ι →₀ M)\nhs : Set.PairwiseDisjoint (↑s) Finsupp.support\nthis : Multiset.Pairwise (Disjoint on Finsupp.support) s.val\n⊢ (Finset.sum s id).support = sup s Finsupp.support\n[PROOFSTEP]\nconvert Multiset.support_sum_eq s.1 this\n[GOAL]\ncase h.e'_2.h.e'_4\nι : Type u_1\nM : Type u_2\ninst✝¹ : DecidableEq ι\ninst✝ : AddCommMonoid M\ns : Finset (ι →₀ M)\nhs : Set.PairwiseDisjoint (↑s) Finsupp.support\nthis : Multiset.Pairwise (Disjoint on Finsupp.support) s.val\n⊢ Finset.sum s id = Multiset.sum s.val\n[PROOFSTEP]\nexact (Finset.sum_val _).symm\n[GOAL]\ncase this\nι : Type u_1\nM : Type u_2\ninst✝¹ : DecidableEq ι\ninst✝ : AddCommMonoid M\ns : Finset (ι →₀ M)\nhs : Set.PairwiseDisjoint (↑s) Finsupp.support\n⊢ Multiset.Pairwise (Disjoint on Finsupp.support) s.val\n[PROOFSTEP]\nobtain ⟨l, hl, hn⟩ : ∃ l : List (ι →₀ M), l.toFinset = s ∧ l.Nodup :=\n  by\n  refine' ⟨s.toList, _, Finset.nodup_toList _⟩\n  simp\n[GOAL]\nι : Type u_1\nM : Type u_2\ninst✝¹ : DecidableEq ι\ninst✝ : AddCommMonoid M\ns : Finset (ι →₀ M)\nhs : Set.PairwiseDisjoint (↑s) Finsupp.support\n⊢ ∃ l, List.toFinset l = s ∧ List.Nodup l\n[PROOFSTEP]\nrefine' ⟨s.toList, _, Finset.nodup_toList _⟩\n[GOAL]\nι : Type u_1\nM : Type u_2\ninst✝¹ : DecidableEq ι\ninst✝ : AddCommMonoid M\ns : Finset (ι →₀ M)\nhs : Set.PairwiseDisjoint (↑s) Finsupp.support\n⊢ List.toFinset (toList s) = s\n[PROOFSTEP]\nsimp\n[GOAL]\ncase this.intro.intro\nι : Type u_1\nM : Type u_2\ninst✝¹ : DecidableEq ι\ninst✝ : AddCommMonoid M\ns : Finset (ι →₀ M)\nhs : Set.PairwiseDisjoint (↑s) Finsupp.support\nl : List (ι →₀ M)\nhl : List.toFinset l = s\nhn : List.Nodup l\n⊢ Multiset.Pairwise (Disjoint on Finsupp.support) s.val\n[PROOFSTEP]\nsubst hl\n[GOAL]\ncase this.intro.intro\nι : Type u_1\nM : Type u_2\ninst✝¹ : DecidableEq ι\ninst✝ : AddCommMonoid M\nl : List (ι →₀ M)\nhn : List.Nodup l\nhs : Set.PairwiseDisjoint (↑(List.toFinset l)) Finsupp.support\n⊢ Multiset.Pairwise (Disjoint on Finsupp.support) (List.toFinset l).val\n[PROOFSTEP]\nrwa [List.toFinset_val, List.dedup_eq_self.mpr hn, Multiset.pairwise_coe_iff_pairwise, ←\n  List.pairwiseDisjoint_iff_coe_toFinset_pairwise_disjoint hn]\n[GOAL]\ncase this.intro.intro.hr\nι : Type u_1\nM : Type u_2\ninst✝¹ : DecidableEq ι\ninst✝ : AddCommMonoid M\nl : List (ι →₀ M)\nhn : List.Nodup l\nhs : Set.PairwiseDisjoint (↑(List.toFinset l)) Finsupp.support\n⊢ Symmetric (Disjoint on Finsupp.support)\n[PROOFSTEP]\nintro x y hxy\n[GOAL]\ncase this.intro.intro.hr\nι : Type u_1\nM : Type u_2\ninst✝¹ : DecidableEq ι\ninst✝ : AddCommMonoid M\nl : List (ι →₀ M)\nhn : List.Nodup l\nhs : Set.PairwiseDisjoint (↑(List.toFinset l)) Finsupp.support\nx y : ι →₀ M\nhxy : (Disjoint on Finsupp.support) x y\n⊢ (Disjoint on Finsupp.support) y x\n[PROOFSTEP]\nexact symmetric_disjoint hxy\n", "meta": {"mathlib_filename": "Mathlib.Data.Finsupp.BigOperators", "llama_tokens": 8706, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7879311956428946, "lm_q2_score": 0.672331699179286, "lm_q1q2_score": 0.5297511196029537}}
{"text": "[GOAL]\nM : Type u_1\ninst✝¹ : OrderedCancelAddCommMonoid M\ninst✝ : ExistsAddOfLE M\na b c d : M\n⊢ BijOn (fun x => x + d) (Ici a) (Ici (a + d))\n[PROOFSTEP]\nrefine' ⟨fun x h => add_le_add_right (mem_Ici.mp h) _, (add_left_injective d).injOn _, fun _ h => _⟩\n[GOAL]\nM : Type u_1\ninst✝¹ : OrderedCancelAddCommMonoid M\ninst✝ : ExistsAddOfLE M\na b c d x✝ : M\nh : x✝ ∈ Ici (a + d)\n⊢ x✝ ∈ (fun x => x + d) '' Ici a\n[PROOFSTEP]\nobtain ⟨c, rfl⟩ := exists_add_of_le (mem_Ici.mp h)\n[GOAL]\ncase intro\nM : Type u_1\ninst✝¹ : OrderedCancelAddCommMonoid M\ninst✝ : ExistsAddOfLE M\na b c✝ d c : M\nh : a + d + c ∈ Ici (a + d)\n⊢ a + d + c ∈ (fun x => x + d) '' Ici a\n[PROOFSTEP]\nrw [mem_Ici, add_right_comm, add_le_add_iff_right] at h \n[GOAL]\ncase intro\nM : Type u_1\ninst✝¹ : OrderedCancelAddCommMonoid M\ninst✝ : ExistsAddOfLE M\na b c✝ d c : M\nh : a ≤ a + c\n⊢ a + d + c ∈ (fun x => x + d) '' Ici a\n[PROOFSTEP]\nexact ⟨a + c, h, by rw [add_right_comm]⟩\n[GOAL]\nM : Type u_1\ninst✝¹ : OrderedCancelAddCommMonoid M\ninst✝ : ExistsAddOfLE M\na b c✝ d c : M\nh : a ≤ a + c\n⊢ (fun x => x + d) (a + c) = a + d + c\n[PROOFSTEP]\nrw [add_right_comm]\n[GOAL]\nM : Type u_1\ninst✝¹ : OrderedCancelAddCommMonoid M\ninst✝ : ExistsAddOfLE M\na b c d : M\n⊢ BijOn (fun x => x + d) (Ioi a) (Ioi (a + d))\n[PROOFSTEP]\nrefine' ⟨fun x h => add_lt_add_right (mem_Ioi.mp h) _, fun _ _ _ _ h => add_right_cancel h, fun _ h => _⟩\n[GOAL]\nM : Type u_1\ninst✝¹ : OrderedCancelAddCommMonoid M\ninst✝ : ExistsAddOfLE M\na b c d x✝ : M\nh : x✝ ∈ Ioi (a + d)\n⊢ x✝ ∈ (fun x => x + d) '' Ioi a\n[PROOFSTEP]\nobtain ⟨c, rfl⟩ := exists_add_of_le (mem_Ioi.mp h).le\n[GOAL]\ncase intro\nM : Type u_1\ninst✝¹ : OrderedCancelAddCommMonoid M\ninst✝ : ExistsAddOfLE M\na b c✝ d c : M\nh : a + d + c ∈ Ioi (a + d)\n⊢ a + d + c ∈ (fun x => x + d) '' Ioi a\n[PROOFSTEP]\nrw [mem_Ioi, add_right_comm, add_lt_add_iff_right] at h \n[GOAL]\ncase intro\nM : Type u_1\ninst✝¹ : OrderedCancelAddCommMonoid M\ninst✝ : ExistsAddOfLE M\na b c✝ d c : M\nh : a < a + c\n⊢ a + d + c ∈ (fun x => x + d) '' Ioi a\n[PROOFSTEP]\nexact ⟨a + c, h, by rw [add_right_comm]⟩\n[GOAL]\nM : Type u_1\ninst✝¹ : OrderedCancelAddCommMonoid M\ninst✝ : ExistsAddOfLE M\na b c✝ d c : M\nh : a < a + c\n⊢ (fun x => x + d) (a + c) = a + d + c\n[PROOFSTEP]\nrw [add_right_comm]\n[GOAL]\nM : Type u_1\ninst✝¹ : OrderedCancelAddCommMonoid M\ninst✝ : ExistsAddOfLE M\na b c d : M\n⊢ BijOn (fun x => x + d) (Icc a b) (Icc (a + d) (b + d))\n[PROOFSTEP]\nrw [← Ici_inter_Iic, ← Ici_inter_Iic]\n[GOAL]\nM : Type u_1\ninst✝¹ : OrderedCancelAddCommMonoid M\ninst✝ : ExistsAddOfLE M\na b c d : M\n⊢ BijOn (fun x => x + d) (Ici a ∩ Iic b) (Ici (a + d) ∩ Iic (b + d))\n[PROOFSTEP]\nexact (Ici_add_bij a d).inter_mapsTo (fun x hx => add_le_add_right hx _) fun x hx => le_of_add_le_add_right hx.2\n[GOAL]\nM : Type u_1\ninst✝¹ : OrderedCancelAddCommMonoid M\ninst✝ : ExistsAddOfLE M\na b c d : M\n⊢ BijOn (fun x => x + d) (Ioo a b) (Ioo (a + d) (b + d))\n[PROOFSTEP]\nrw [← Ioi_inter_Iio, ← Ioi_inter_Iio]\n[GOAL]\nM : Type u_1\ninst✝¹ : OrderedCancelAddCommMonoid M\ninst✝ : ExistsAddOfLE M\na b c d : M\n⊢ BijOn (fun x => x + d) (Ioi a ∩ Iio b) (Ioi (a + d) ∩ Iio (b + d))\n[PROOFSTEP]\nexact (Ioi_add_bij a d).inter_mapsTo (fun x hx => add_lt_add_right hx _) fun x hx => lt_of_add_lt_add_right hx.2\n[GOAL]\nM : Type u_1\ninst✝¹ : OrderedCancelAddCommMonoid M\ninst✝ : ExistsAddOfLE M\na b c d : M\n⊢ BijOn (fun x => x + d) (Ioc a b) (Ioc (a + d) (b + d))\n[PROOFSTEP]\nrw [← Ioi_inter_Iic, ← Ioi_inter_Iic]\n[GOAL]\nM : Type u_1\ninst✝¹ : OrderedCancelAddCommMonoid M\ninst✝ : ExistsAddOfLE M\na b c d : M\n⊢ BijOn (fun x => x + d) (Ioi a ∩ Iic b) (Ioi (a + d) ∩ Iic (b + d))\n[PROOFSTEP]\nexact (Ioi_add_bij a d).inter_mapsTo (fun x hx => add_le_add_right hx _) fun x hx => le_of_add_le_add_right hx.2\n[GOAL]\nM : Type u_1\ninst✝¹ : OrderedCancelAddCommMonoid M\ninst✝ : ExistsAddOfLE M\na b c d : M\n⊢ BijOn (fun x => x + d) (Ico a b) (Ico (a + d) (b + d))\n[PROOFSTEP]\nrw [← Ici_inter_Iio, ← Ici_inter_Iio]\n[GOAL]\nM : Type u_1\ninst✝¹ : OrderedCancelAddCommMonoid M\ninst✝ : ExistsAddOfLE M\na b c d : M\n⊢ BijOn (fun x => x + d) (Ici a ∩ Iio b) (Ici (a + d) ∩ Iio (b + d))\n[PROOFSTEP]\nexact (Ici_add_bij a d).inter_mapsTo (fun x hx => add_lt_add_right hx _) fun x hx => lt_of_add_lt_add_right hx.2\n[GOAL]\nM : Type u_1\ninst✝¹ : OrderedCancelAddCommMonoid M\ninst✝ : ExistsAddOfLE M\na b c d : M\n⊢ (fun x => a + x) '' Ici b = Ici (a + b)\n[PROOFSTEP]\nsimp only [add_comm a, image_add_const_Ici]\n[GOAL]\nM : Type u_1\ninst✝¹ : OrderedCancelAddCommMonoid M\ninst✝ : ExistsAddOfLE M\na b c d : M\n⊢ (fun x => a + x) '' Ioi b = Ioi (a + b)\n[PROOFSTEP]\nsimp only [add_comm a, image_add_const_Ioi]\n[GOAL]\nM : Type u_1\ninst✝¹ : OrderedCancelAddCommMonoid M\ninst✝ : ExistsAddOfLE M\na b c d : M\n⊢ (fun x => a + x) '' Icc b c = Icc (a + b) (a + c)\n[PROOFSTEP]\nsimp only [add_comm a, image_add_const_Icc]\n[GOAL]\nM : Type u_1\ninst✝¹ : OrderedCancelAddCommMonoid M\ninst✝ : ExistsAddOfLE M\na b c d : M\n⊢ (fun x => a + x) '' Ico b c = Ico (a + b) (a + c)\n[PROOFSTEP]\nsimp only [add_comm a, image_add_const_Ico]\n[GOAL]\nM : Type u_1\ninst✝¹ : OrderedCancelAddCommMonoid M\ninst✝ : ExistsAddOfLE M\na b c d : M\n⊢ (fun x => a + x) '' Ioc b c = Ioc (a + b) (a + c)\n[PROOFSTEP]\nsimp only [add_comm a, image_add_const_Ioc]\n[GOAL]\nM : Type u_1\ninst✝¹ : OrderedCancelAddCommMonoid M\ninst✝ : ExistsAddOfLE M\na b c d : M\n⊢ (fun x => a + x) '' Ioo b c = Ioo (a + b) (a + c)\n[PROOFSTEP]\nsimp only [add_comm a, image_add_const_Ioo]\n", "meta": {"mathlib_filename": "Mathlib.Data.Set.Intervals.Monoid", "llama_tokens": 2766, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7879311956428946, "lm_q2_score": 0.6723316860482763, "lm_q1q2_score": 0.5297511092566216}}
{"text": "[GOAL]\nR : Type u_1\na b : R\ninst✝ : Monoid R\nn : ℕ\nrla : IsLeftRegular a\n⊢ IsLeftRegular (a ^ n)\n[PROOFSTEP]\nsimp only [IsLeftRegular, ← mul_left_iterate, rla.iterate n]\n[GOAL]\nR : Type u_1\na b : R\ninst✝ : Monoid R\nn : ℕ\nrra : IsRightRegular a\n⊢ IsRightRegular (a ^ n)\n[PROOFSTEP]\nrw [IsRightRegular, ← mul_right_iterate]\n[GOAL]\nR : Type u_1\na b : R\ninst✝ : Monoid R\nn : ℕ\nrra : IsRightRegular a\n⊢ Function.Injective (fun x => x * a)^[n]\n[PROOFSTEP]\nexact rra.iterate n\n[GOAL]\nR : Type u_1\na b : R\ninst✝ : Monoid R\nn : ℕ\nn0 : 0 < n\n⊢ IsLeftRegular (a ^ n) ↔ IsLeftRegular a\n[PROOFSTEP]\nrefine' ⟨_, IsLeftRegular.pow n⟩\n[GOAL]\nR : Type u_1\na b : R\ninst✝ : Monoid R\nn : ℕ\nn0 : 0 < n\n⊢ IsLeftRegular (a ^ n) → IsLeftRegular a\n[PROOFSTEP]\nrw [← Nat.succ_pred_eq_of_pos n0, pow_succ']\n[GOAL]\nR : Type u_1\na b : R\ninst✝ : Monoid R\nn : ℕ\nn0 : 0 < n\n⊢ IsLeftRegular (a ^ Nat.pred n * a) → IsLeftRegular a\n[PROOFSTEP]\nexact IsLeftRegular.of_mul\n[GOAL]\nR : Type u_1\na b : R\ninst✝ : Monoid R\nn : ℕ\nn0 : 0 < n\n⊢ IsRightRegular (a ^ n) ↔ IsRightRegular a\n[PROOFSTEP]\nrefine' ⟨_, IsRightRegular.pow n⟩\n[GOAL]\nR : Type u_1\na b : R\ninst✝ : Monoid R\nn : ℕ\nn0 : 0 < n\n⊢ IsRightRegular (a ^ n) → IsRightRegular a\n[PROOFSTEP]\nrw [← Nat.succ_pred_eq_of_pos n0, pow_succ]\n[GOAL]\nR : Type u_1\na b : R\ninst✝ : Monoid R\nn : ℕ\nn0 : 0 < n\n⊢ IsRightRegular (a * a ^ Nat.pred n) → IsRightRegular a\n[PROOFSTEP]\nexact IsRightRegular.of_mul\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Regular.Pow", "llama_tokens": 721, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7401743505760727, "lm_q2_score": 0.7154239897159439, "lm_q1q2_score": 0.5295384869745418}}
{"text": "[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RespectsIso P\nR S T : CommRingCat\nf : R ⟶ S\ng : S ⟶ T\ninst✝ : IsIso f\nH : P (f ≫ g)\n⊢ P g\n[PROOFSTEP]\nconvert hP.2 (f ≫ g) (asIso f).symm.commRingCatIsoToRingEquiv H\n[GOAL]\ncase h.e'_5\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RespectsIso P\nR S T : CommRingCat\nf : R ⟶ S\ng : S ⟶ T\ninst✝ : IsIso f\nH : P (f ≫ g)\n⊢ g = comp (f ≫ g) (RingEquiv.toRingHom (Iso.commRingCatIsoToRingEquiv (asIso f).symm))\n[PROOFSTEP]\nexact (IsIso.inv_hom_id_assoc _ _).symm\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RespectsIso P\nR S T : CommRingCat\nf : R ⟶ S\ng : S ⟶ T\ninst✝ : IsIso g\nH : P (f ≫ g)\n⊢ P f\n[PROOFSTEP]\nconvert hP.1 (f ≫ g) (asIso g).symm.commRingCatIsoToRingEquiv H\n[GOAL]\ncase h.e'_5\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RespectsIso P\nR S T : CommRingCat\nf : R ⟶ S\ng : S ⟶ T\ninst✝ : IsIso g\nH : P (f ≫ g)\n⊢ f = comp (RingEquiv.toRingHom (Iso.commRingCatIsoToRingEquiv (asIso g).symm)) (f ≫ g)\n[PROOFSTEP]\nchange f = f ≫ g ≫ inv g\n[GOAL]\ncase h.e'_5\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RespectsIso P\nR S T : CommRingCat\nf : R ⟶ S\ng : S ⟶ T\ninst✝ : IsIso g\nH : P (f ≫ g)\n⊢ f = f ≫ g ≫ inv g\n[PROOFSTEP]\nsimp\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RespectsIso P\nR S R' S' : Type u\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing S\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\ninst✝³ : Algebra R R'\ninst✝² : Algebra S S'\nf : R →+* S\nr : R\ninst✝¹ : IsLocalization.Away r R'\ninst✝ : IsLocalization.Away (↑f r) S'\n⊢ P (Localization.awayMap f r) ↔ P (IsLocalization.Away.map R' S' f r)\n[PROOFSTEP]\nlet e₁ : R' ≃+* Localization.Away r := (IsLocalization.algEquiv (Submonoid.powers r) _ _).toRingEquiv\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RespectsIso P\nR S R' S' : Type u\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing S\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\ninst✝³ : Algebra R R'\ninst✝² : Algebra S S'\nf : R →+* S\nr : R\ninst✝¹ : IsLocalization.Away r R'\ninst✝ : IsLocalization.Away (↑f r) S'\ne₁ : R' ≃+* Localization.Away r :=\n  AlgEquiv.toRingEquiv (IsLocalization.algEquiv (Submonoid.powers r) R' (Localization.Away r))\n⊢ P (Localization.awayMap f r) ↔ P (IsLocalization.Away.map R' S' f r)\n[PROOFSTEP]\nlet e₂ : Localization.Away (f r) ≃+* S' := (IsLocalization.algEquiv (Submonoid.powers (f r)) _ _).toRingEquiv\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RespectsIso P\nR S R' S' : Type u\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing S\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\ninst✝³ : Algebra R R'\ninst✝² : Algebra S S'\nf : R →+* S\nr : R\ninst✝¹ : IsLocalization.Away r R'\ninst✝ : IsLocalization.Away (↑f r) S'\ne₁ : R' ≃+* Localization.Away r :=\n  AlgEquiv.toRingEquiv (IsLocalization.algEquiv (Submonoid.powers r) R' (Localization.Away r))\ne₂ : Localization.Away (↑f r) ≃+* S' :=\n  AlgEquiv.toRingEquiv (IsLocalization.algEquiv (Submonoid.powers (↑f r)) (Localization.Away (↑f r)) S')\n⊢ P (Localization.awayMap f r) ↔ P (IsLocalization.Away.map R' S' f r)\n[PROOFSTEP]\nrefine' (hP.cancel_left_isIso e₁.toCommRingCatIso.hom (CommRingCat.ofHom _)).symm.trans _\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RespectsIso P\nR S R' S' : Type u\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing S\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\ninst✝³ : Algebra R R'\ninst✝² : Algebra S S'\nf : R →+* S\nr : R\ninst✝¹ : IsLocalization.Away r R'\ninst✝ : IsLocalization.Away (↑f r) S'\ne₁ : R' ≃+* Localization.Away r :=\n  AlgEquiv.toRingEquiv (IsLocalization.algEquiv (Submonoid.powers r) R' (Localization.Away r))\ne₂ : Localization.Away (↑f r) ≃+* S' :=\n  AlgEquiv.toRingEquiv (IsLocalization.algEquiv (Submonoid.powers (↑f r)) (Localization.Away (↑f r)) S')\n⊢ P\n      ((RingEquiv.toCommRingCatIso e₁).hom ≫\n        CommRingCat.ofHom\n          (IsLocalization.map (Localization.Away (↑f r)) f\n            (_ : Submonoid.powers r ≤ Submonoid.comap f (Submonoid.powers (↑f r))))) ↔\n    P (IsLocalization.Away.map R' S' f r)\n[PROOFSTEP]\nrefine' (hP.cancel_right_isIso (CommRingCat.ofHom _) e₂.toCommRingCatIso.hom).symm.trans _\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RespectsIso P\nR S R' S' : Type u\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing S\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\ninst✝³ : Algebra R R'\ninst✝² : Algebra S S'\nf : R →+* S\nr : R\ninst✝¹ : IsLocalization.Away r R'\ninst✝ : IsLocalization.Away (↑f r) S'\ne₁ : R' ≃+* Localization.Away r :=\n  AlgEquiv.toRingEquiv (IsLocalization.algEquiv (Submonoid.powers r) R' (Localization.Away r))\ne₂ : Localization.Away (↑f r) ≃+* S' :=\n  AlgEquiv.toRingEquiv (IsLocalization.algEquiv (Submonoid.powers (↑f r)) (Localization.Away (↑f r)) S')\n⊢ P\n      (CommRingCat.ofHom\n          ((RingEquiv.toCommRingCatIso e₁).hom ≫\n            CommRingCat.ofHom\n              (IsLocalization.map (Localization.Away (↑f r)) f\n                (_ : Submonoid.powers r ≤ Submonoid.comap f (Submonoid.powers (↑f r))))) ≫\n        (RingEquiv.toCommRingCatIso e₂).hom) ↔\n    P (IsLocalization.Away.map R' S' f r)\n[PROOFSTEP]\nrw [← eq_iff_iff]\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RespectsIso P\nR S R' S' : Type u\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing S\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\ninst✝³ : Algebra R R'\ninst✝² : Algebra S S'\nf : R →+* S\nr : R\ninst✝¹ : IsLocalization.Away r R'\ninst✝ : IsLocalization.Away (↑f r) S'\ne₁ : R' ≃+* Localization.Away r :=\n  AlgEquiv.toRingEquiv (IsLocalization.algEquiv (Submonoid.powers r) R' (Localization.Away r))\ne₂ : Localization.Away (↑f r) ≃+* S' :=\n  AlgEquiv.toRingEquiv (IsLocalization.algEquiv (Submonoid.powers (↑f r)) (Localization.Away (↑f r)) S')\n⊢ P\n      (CommRingCat.ofHom\n          ((RingEquiv.toCommRingCatIso e₁).hom ≫\n            CommRingCat.ofHom\n              (IsLocalization.map (Localization.Away (↑f r)) f\n                (_ : Submonoid.powers r ≤ Submonoid.comap f (Submonoid.powers (↑f r))))) ≫\n        (RingEquiv.toCommRingCatIso e₂).hom) =\n    P (IsLocalization.Away.map R' S' f r)\n[PROOFSTEP]\ncongr 1\n  -- Porting Note : Here, the proof used to have a huge `simp` involving `[anonymous]`, which didn't\n    -- work out anymore. The issue seemed to be that it couldn't handle a term in which Ring\n    -- homomorphisms were repeatedly casted to the bundled category and back. Here we resolve the\n    -- problem by converting the goal to a more straightforward form.\n[GOAL]\ncase e_x\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RespectsIso P\nR S R' S' : Type u\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing S\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\ninst✝³ : Algebra R R'\ninst✝² : Algebra S S'\nf : R →+* S\nr : R\ninst✝¹ : IsLocalization.Away r R'\ninst✝ : IsLocalization.Away (↑f r) S'\ne₁ : R' ≃+* Localization.Away r :=\n  AlgEquiv.toRingEquiv (IsLocalization.algEquiv (Submonoid.powers r) R' (Localization.Away r))\ne₂ : Localization.Away (↑f r) ≃+* S' :=\n  AlgEquiv.toRingEquiv (IsLocalization.algEquiv (Submonoid.powers (↑f r)) (Localization.Away (↑f r)) S')\n⊢ CommRingCat.ofHom\n        ((RingEquiv.toCommRingCatIso e₁).hom ≫\n          CommRingCat.ofHom\n            (IsLocalization.map (Localization.Away (↑f r)) f\n              (_ : Submonoid.powers r ≤ Submonoid.comap f (Submonoid.powers (↑f r))))) ≫\n      (RingEquiv.toCommRingCatIso e₂).hom =\n    IsLocalization.Away.map R' S' f r\n[PROOFSTEP]\nlet e :=\n  (e₂ : Localization.Away (f r) →+* S').comp\n    (((IsLocalization.map (Localization.Away (f r)) f\n            (by rintro x ⟨n, rfl⟩; use n; simp : Submonoid.powers r ≤ Submonoid.comap f (Submonoid.powers (f r)))) :\n          Localization.Away r →+* Localization.Away (f r)).comp\n      (e₁ : R' →+* Localization.Away r))\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RespectsIso P\nR S R' S' : Type u\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing S\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\ninst✝³ : Algebra R R'\ninst✝² : Algebra S S'\nf : R →+* S\nr : R\ninst✝¹ : IsLocalization.Away r R'\ninst✝ : IsLocalization.Away (↑f r) S'\ne₁ : R' ≃+* Localization.Away r :=\n  AlgEquiv.toRingEquiv (IsLocalization.algEquiv (Submonoid.powers r) R' (Localization.Away r))\ne₂ : Localization.Away (↑f r) ≃+* S' :=\n  AlgEquiv.toRingEquiv (IsLocalization.algEquiv (Submonoid.powers (↑f r)) (Localization.Away (↑f r)) S')\n⊢ Submonoid.powers r ≤ Submonoid.comap f (Submonoid.powers (↑f r))\n[PROOFSTEP]\nrintro x ⟨n, rfl⟩\n[GOAL]\ncase intro\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RespectsIso P\nR S R' S' : Type u\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing S\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\ninst✝³ : Algebra R R'\ninst✝² : Algebra S S'\nf : R →+* S\nr : R\ninst✝¹ : IsLocalization.Away r R'\ninst✝ : IsLocalization.Away (↑f r) S'\ne₁ : R' ≃+* Localization.Away r :=\n  AlgEquiv.toRingEquiv (IsLocalization.algEquiv (Submonoid.powers r) R' (Localization.Away r))\ne₂ : Localization.Away (↑f r) ≃+* S' :=\n  AlgEquiv.toRingEquiv (IsLocalization.algEquiv (Submonoid.powers (↑f r)) (Localization.Away (↑f r)) S')\nn : ℕ\n⊢ (fun x x_1 => x ^ x_1) r n ∈ Submonoid.comap f (Submonoid.powers (↑f r))\n[PROOFSTEP]\nuse n\n[GOAL]\ncase h\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RespectsIso P\nR S R' S' : Type u\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing S\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\ninst✝³ : Algebra R R'\ninst✝² : Algebra S S'\nf : R →+* S\nr : R\ninst✝¹ : IsLocalization.Away r R'\ninst✝ : IsLocalization.Away (↑f r) S'\ne₁ : R' ≃+* Localization.Away r :=\n  AlgEquiv.toRingEquiv (IsLocalization.algEquiv (Submonoid.powers r) R' (Localization.Away r))\ne₂ : Localization.Away (↑f r) ≃+* S' :=\n  AlgEquiv.toRingEquiv (IsLocalization.algEquiv (Submonoid.powers (↑f r)) (Localization.Away (↑f r)) S')\nn : ℕ\n⊢ (fun x x_1 => x ^ x_1) (↑f r) n = ↑f ((fun x x_1 => x ^ x_1) r n)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase e_x\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RespectsIso P\nR S R' S' : Type u\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing S\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\ninst✝³ : Algebra R R'\ninst✝² : Algebra S S'\nf : R →+* S\nr : R\ninst✝¹ : IsLocalization.Away r R'\ninst✝ : IsLocalization.Away (↑f r) S'\ne₁ : R' ≃+* Localization.Away r :=\n  AlgEquiv.toRingEquiv (IsLocalization.algEquiv (Submonoid.powers r) R' (Localization.Away r))\ne₂ : Localization.Away (↑f r) ≃+* S' :=\n  AlgEquiv.toRingEquiv (IsLocalization.algEquiv (Submonoid.powers (↑f r)) (Localization.Away (↑f r)) S')\ne : R' →+* S' :=\n  comp (↑e₂)\n    (comp\n      (IsLocalization.map (Localization.Away (↑f r)) f\n        (_ : ∀ ⦃x : R⦄, x ∈ Submonoid.powers r → x ∈ Submonoid.comap f (Submonoid.powers (↑f r))))\n      ↑e₁)\n⊢ CommRingCat.ofHom\n        ((RingEquiv.toCommRingCatIso e₁).hom ≫\n          CommRingCat.ofHom\n            (IsLocalization.map (Localization.Away (↑f r)) f\n              (_ : Submonoid.powers r ≤ Submonoid.comap f (Submonoid.powers (↑f r))))) ≫\n      (RingEquiv.toCommRingCatIso e₂).hom =\n    IsLocalization.Away.map R' S' f r\n[PROOFSTEP]\nsuffices e = IsLocalization.Away.map R' S' f r by convert this\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RespectsIso P\nR S R' S' : Type u\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing S\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\ninst✝³ : Algebra R R'\ninst✝² : Algebra S S'\nf : R →+* S\nr : R\ninst✝¹ : IsLocalization.Away r R'\ninst✝ : IsLocalization.Away (↑f r) S'\ne₁ : R' ≃+* Localization.Away r :=\n  AlgEquiv.toRingEquiv (IsLocalization.algEquiv (Submonoid.powers r) R' (Localization.Away r))\ne₂ : Localization.Away (↑f r) ≃+* S' :=\n  AlgEquiv.toRingEquiv (IsLocalization.algEquiv (Submonoid.powers (↑f r)) (Localization.Away (↑f r)) S')\ne : R' →+* S' :=\n  comp (↑e₂)\n    (comp\n      (IsLocalization.map (Localization.Away (↑f r)) f\n        (_ : ∀ ⦃x : R⦄, x ∈ Submonoid.powers r → x ∈ Submonoid.comap f (Submonoid.powers (↑f r))))\n      ↑e₁)\nthis : e = IsLocalization.Away.map R' S' f r\n⊢ CommRingCat.ofHom\n        ((RingEquiv.toCommRingCatIso e₁).hom ≫\n          CommRingCat.ofHom\n            (IsLocalization.map (Localization.Away (↑f r)) f\n              (_ : Submonoid.powers r ≤ Submonoid.comap f (Submonoid.powers (↑f r))))) ≫\n      (RingEquiv.toCommRingCatIso e₂).hom =\n    IsLocalization.Away.map R' S' f r\n[PROOFSTEP]\nconvert this\n[GOAL]\ncase e_x\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RespectsIso P\nR S R' S' : Type u\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing S\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\ninst✝³ : Algebra R R'\ninst✝² : Algebra S S'\nf : R →+* S\nr : R\ninst✝¹ : IsLocalization.Away r R'\ninst✝ : IsLocalization.Away (↑f r) S'\ne₁ : R' ≃+* Localization.Away r :=\n  AlgEquiv.toRingEquiv (IsLocalization.algEquiv (Submonoid.powers r) R' (Localization.Away r))\ne₂ : Localization.Away (↑f r) ≃+* S' :=\n  AlgEquiv.toRingEquiv (IsLocalization.algEquiv (Submonoid.powers (↑f r)) (Localization.Away (↑f r)) S')\ne : R' →+* S' :=\n  comp (↑e₂)\n    (comp\n      (IsLocalization.map (Localization.Away (↑f r)) f\n        (_ : ∀ ⦃x : R⦄, x ∈ Submonoid.powers r → x ∈ Submonoid.comap f (Submonoid.powers (↑f r))))\n      ↑e₁)\n⊢ e = IsLocalization.Away.map R' S' f r\n[PROOFSTEP]\napply IsLocalization.ringHom_ext (Submonoid.powers r) _\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RespectsIso P\nR S R' S' : Type u\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing S\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\ninst✝³ : Algebra R R'\ninst✝² : Algebra S S'\nf : R →+* S\nr : R\ninst✝¹ : IsLocalization.Away r R'\ninst✝ : IsLocalization.Away (↑f r) S'\ne₁ : R' ≃+* Localization.Away r :=\n  AlgEquiv.toRingEquiv (IsLocalization.algEquiv (Submonoid.powers r) R' (Localization.Away r))\ne₂ : Localization.Away (↑f r) ≃+* S' :=\n  AlgEquiv.toRingEquiv (IsLocalization.algEquiv (Submonoid.powers (↑f r)) (Localization.Away (↑f r)) S')\ne : R' →+* S' :=\n  comp (↑e₂)\n    (comp\n      (IsLocalization.map (Localization.Away (↑f r)) f\n        (_ : ∀ ⦃x : R⦄, x ∈ Submonoid.powers r → x ∈ Submonoid.comap f (Submonoid.powers (↑f r))))\n      ↑e₁)\n⊢ comp e (algebraMap R R') = comp (IsLocalization.Away.map R' S' f r) (algebraMap R R')\n[PROOFSTEP]\next1 x\n[GOAL]\ncase a\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RespectsIso P\nR S R' S' : Type u\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing S\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\ninst✝³ : Algebra R R'\ninst✝² : Algebra S S'\nf : R →+* S\nr : R\ninst✝¹ : IsLocalization.Away r R'\ninst✝ : IsLocalization.Away (↑f r) S'\ne₁ : R' ≃+* Localization.Away r :=\n  AlgEquiv.toRingEquiv (IsLocalization.algEquiv (Submonoid.powers r) R' (Localization.Away r))\ne₂ : Localization.Away (↑f r) ≃+* S' :=\n  AlgEquiv.toRingEquiv (IsLocalization.algEquiv (Submonoid.powers (↑f r)) (Localization.Away (↑f r)) S')\ne : R' →+* S' :=\n  comp (↑e₂)\n    (comp\n      (IsLocalization.map (Localization.Away (↑f r)) f\n        (_ : ∀ ⦃x : R⦄, x ∈ Submonoid.powers r → x ∈ Submonoid.comap f (Submonoid.powers (↑f r))))\n      ↑e₁)\nx : R\n⊢ ↑(comp e (algebraMap R R')) x = ↑(comp (IsLocalization.Away.map R' S' f r) (algebraMap R R')) x\n[PROOFSTEP]\ndsimp [IsLocalization.Away.map]\n[GOAL]\ncase a\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : RespectsIso P\nR S R' S' : Type u\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing S\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\ninst✝³ : Algebra R R'\ninst✝² : Algebra S S'\nf : R →+* S\nr : R\ninst✝¹ : IsLocalization.Away r R'\ninst✝ : IsLocalization.Away (↑f r) S'\ne₁ : R' ≃+* Localization.Away r :=\n  AlgEquiv.toRingEquiv (IsLocalization.algEquiv (Submonoid.powers r) R' (Localization.Away r))\ne₂ : Localization.Away (↑f r) ≃+* S' :=\n  AlgEquiv.toRingEquiv (IsLocalization.algEquiv (Submonoid.powers (↑f r)) (Localization.Away (↑f r)) S')\ne : R' →+* S' :=\n  comp (↑e₂)\n    (comp\n      (IsLocalization.map (Localization.Away (↑f r)) f\n        (_ : ∀ ⦃x : R⦄, x ∈ Submonoid.powers r → x ∈ Submonoid.comap f (Submonoid.powers (↑f r))))\n      ↑e₁)\nx : R\n⊢ ↑(IsLocalization.map S' (id S) (_ : Submonoid.powers (↑f r) ≤ Submonoid.comap (id S) (Submonoid.powers (↑f r))))\n      (↑(IsLocalization.map (Localization.Away (↑f r)) f\n            (_ : ∀ ⦃x : R⦄, x ∈ Submonoid.powers r → x ∈ Submonoid.comap f (Submonoid.powers (↑f r))))\n        (↑(IsLocalization.map (Localization.Away r) (id R)\n              (_ : Submonoid.powers r ≤ Submonoid.comap (id R) (Submonoid.powers r)))\n          (↑(algebraMap R R') x))) =\n    ↑(IsLocalization.map S' f (_ : Submonoid.powers r ≤ Submonoid.comap f (Submonoid.powers (↑f r))))\n      (↑(algebraMap R R') x)\n[PROOFSTEP]\nsimp only [IsLocalization.map_eq, id_apply, RingHomCompTriple.comp_apply]\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : StableUnderComposition P\nhP' : ∀ {R S : Type u} [inst : CommRing R] [inst_1 : CommRing S] (e : R ≃+* S), P (RingEquiv.toRingHom e)\n⊢ RespectsIso P\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase left\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : StableUnderComposition P\nhP' : ∀ {R S : Type u} [inst : CommRing R] [inst_1 : CommRing S] (e : R ≃+* S), P (RingEquiv.toRingHom e)\n⊢ ∀ {R S T : Type u} [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing T] (f : R →+* S) (e : S ≃+* T),\n    P f → P (comp (RingEquiv.toRingHom e) f)\n[PROOFSTEP]\nintrov H\n[GOAL]\ncase left\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : StableUnderComposition P\nhP' : ∀ {R S : Type u} [inst : CommRing R] [inst_1 : CommRing S] (e : R ≃+* S), P (RingEquiv.toRingHom e)\nR S T : Type u\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : CommRing T\nf : R →+* S\ne : S ≃+* T\nH : P f\n⊢ P (comp (RingEquiv.toRingHom e) f)\n[PROOFSTEP]\nskip\n[GOAL]\ncase left\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : StableUnderComposition P\nhP' : ∀ {R S : Type u} [inst : CommRing R] [inst_1 : CommRing S] (e : R ≃+* S), P (RingEquiv.toRingHom e)\nR S T : Type u\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : CommRing T\nf : R →+* S\ne : S ≃+* T\nH : P f\n⊢ P (comp (RingEquiv.toRingHom e) f)\n[PROOFSTEP]\napply hP\n[GOAL]\ncase left.x\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : StableUnderComposition P\nhP' : ∀ {R S : Type u} [inst : CommRing R] [inst_1 : CommRing S] (e : R ≃+* S), P (RingEquiv.toRingHom e)\nR S T : Type u\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : CommRing T\nf : R →+* S\ne : S ≃+* T\nH : P f\n⊢ P f\ncase left.x\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : StableUnderComposition P\nhP' : ∀ {R S : Type u} [inst : CommRing R] [inst_1 : CommRing S] (e : R ≃+* S), P (RingEquiv.toRingHom e)\nR S T : Type u\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : CommRing T\nf : R →+* S\ne : S ≃+* T\nH : P f\n⊢ P (RingEquiv.toRingHom e)\n[PROOFSTEP]\nexacts [H, hP' e]\n[GOAL]\ncase right\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : StableUnderComposition P\nhP' : ∀ {R S : Type u} [inst : CommRing R] [inst_1 : CommRing S] (e : R ≃+* S), P (RingEquiv.toRingHom e)\n⊢ ∀ {R S T : Type u} [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing T] (f : S →+* T) (e : R ≃+* S),\n    P f → P (comp f (RingEquiv.toRingHom e))\n[PROOFSTEP]\nintrov H\n[GOAL]\ncase right\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : StableUnderComposition P\nhP' : ∀ {R S : Type u} [inst : CommRing R] [inst_1 : CommRing S] (e : R ≃+* S), P (RingEquiv.toRingHom e)\nR S T : Type u\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : CommRing T\nf : S →+* T\ne : R ≃+* S\nH : P f\n⊢ P (comp f (RingEquiv.toRingHom e))\n[PROOFSTEP]\nskip\n[GOAL]\ncase right\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : StableUnderComposition P\nhP' : ∀ {R S : Type u} [inst : CommRing R] [inst_1 : CommRing S] (e : R ≃+* S), P (RingEquiv.toRingHom e)\nR S T : Type u\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : CommRing T\nf : S →+* T\ne : R ≃+* S\nH : P f\n⊢ P (comp f (RingEquiv.toRingHom e))\n[PROOFSTEP]\napply hP\n[GOAL]\ncase right.x\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : StableUnderComposition P\nhP' : ∀ {R S : Type u} [inst : CommRing R] [inst_1 : CommRing S] (e : R ≃+* S), P (RingEquiv.toRingHom e)\nR S T : Type u\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : CommRing T\nf : S →+* T\ne : R ≃+* S\nH : P f\n⊢ P (RingEquiv.toRingHom e)\ncase right.x\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : StableUnderComposition P\nhP' : ∀ {R S : Type u} [inst : CommRing R] [inst_1 : CommRing S] (e : R ≃+* S), P (RingEquiv.toRingHom e)\nR S T : Type u\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : CommRing T\nf : S →+* T\ne : R ≃+* S\nH : P f\n⊢ P f\n[PROOFSTEP]\nexacts [hP' e, H]\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nh₁ : RespectsIso P\nh₂ :\n  ∀ ⦃R S T : Type u⦄ [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing T] [inst_3 : Algebra R S]\n    [inst_4 : Algebra R T], P (algebraMap R T) → P Algebra.TensorProduct.includeLeftRingHom\n⊢ StableUnderBaseChange P\n[PROOFSTEP]\nintrov R h H\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nh₁ : RespectsIso P\nh₂ :\n  ∀ ⦃R S T : Type u⦄ [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing T] [inst_3 : Algebra R S]\n    [inst_4 : Algebra R T], P (algebraMap R T) → P Algebra.TensorProduct.includeLeftRingHom\nR S R' S' : Type u\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing S\ninst✝⁸ : CommRing R'\ninst✝⁷ : CommRing S'\ninst✝⁶ : Algebra R S\ninst✝⁵ : Algebra R R'\ninst✝⁴ : Algebra R S'\ninst✝³ : Algebra S S'\ninst✝² : Algebra R' S'\ninst✝¹ : IsScalarTower R S S'\ninst✝ : IsScalarTower R R' S'\nh : Algebra.IsPushout R S R' S'\nH : P (algebraMap R S)\n⊢ P (algebraMap R' S')\n[PROOFSTEP]\nlet e := h.symm.1.equiv\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nh₁ : RespectsIso P\nh₂ :\n  ∀ ⦃R S T : Type u⦄ [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing T] [inst_3 : Algebra R S]\n    [inst_4 : Algebra R T], P (algebraMap R T) → P Algebra.TensorProduct.includeLeftRingHom\nR S R' S' : Type u\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing S\ninst✝⁸ : CommRing R'\ninst✝⁷ : CommRing S'\ninst✝⁶ : Algebra R S\ninst✝⁵ : Algebra R R'\ninst✝⁴ : Algebra R S'\ninst✝³ : Algebra S S'\ninst✝² : Algebra R' S'\ninst✝¹ : IsScalarTower R S S'\ninst✝ : IsScalarTower R R' S'\nh : Algebra.IsPushout R S R' S'\nH : P (algebraMap R S)\ne : TensorProduct R R' S ≃ₛₗ[id R'] S' :=\n  IsBaseChange.equiv (_ : IsBaseChange R' (AlgHom.toLinearMap (IsScalarTower.toAlgHom R S S')))\n⊢ P (algebraMap R' S')\n[PROOFSTEP]\nlet f' := Algebra.TensorProduct.productMap (IsScalarTower.toAlgHom R R' S') (IsScalarTower.toAlgHom R S S')\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nh₁ : RespectsIso P\nh₂ :\n  ∀ ⦃R S T : Type u⦄ [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing T] [inst_3 : Algebra R S]\n    [inst_4 : Algebra R T], P (algebraMap R T) → P Algebra.TensorProduct.includeLeftRingHom\nR S R' S' : Type u\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing S\ninst✝⁸ : CommRing R'\ninst✝⁷ : CommRing S'\ninst✝⁶ : Algebra R S\ninst✝⁵ : Algebra R R'\ninst✝⁴ : Algebra R S'\ninst✝³ : Algebra S S'\ninst✝² : Algebra R' S'\ninst✝¹ : IsScalarTower R S S'\ninst✝ : IsScalarTower R R' S'\nh : Algebra.IsPushout R S R' S'\nH : P (algebraMap R S)\ne : TensorProduct R R' S ≃ₛₗ[id R'] S' :=\n  IsBaseChange.equiv (_ : IsBaseChange R' (AlgHom.toLinearMap (IsScalarTower.toAlgHom R S S')))\nf' : TensorProduct R R' S →ₐ[R] S' :=\n  Algebra.TensorProduct.productMap (IsScalarTower.toAlgHom R R' S') (IsScalarTower.toAlgHom R S S')\n⊢ P (algebraMap R' S')\n[PROOFSTEP]\nhave : ∀ x, e x = f' x := by\n  intro x\n  change e.toLinearMap.restrictScalars R x = f'.toLinearMap x\n  congr 1\n  apply TensorProduct.ext'\n  intro x y\n  simp [IsBaseChange.equiv_tmul, Algebra.smul_def]\n    -- Porting Note: This had a lot of implicit inferences which didn't resolve anymore.\n      -- Added those in\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nh₁ : RespectsIso P\nh₂ :\n  ∀ ⦃R S T : Type u⦄ [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing T] [inst_3 : Algebra R S]\n    [inst_4 : Algebra R T], P (algebraMap R T) → P Algebra.TensorProduct.includeLeftRingHom\nR S R' S' : Type u\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing S\ninst✝⁸ : CommRing R'\ninst✝⁷ : CommRing S'\ninst✝⁶ : Algebra R S\ninst✝⁵ : Algebra R R'\ninst✝⁴ : Algebra R S'\ninst✝³ : Algebra S S'\ninst✝² : Algebra R' S'\ninst✝¹ : IsScalarTower R S S'\ninst✝ : IsScalarTower R R' S'\nh : Algebra.IsPushout R S R' S'\nH : P (algebraMap R S)\ne : TensorProduct R R' S ≃ₛₗ[id R'] S' :=\n  IsBaseChange.equiv (_ : IsBaseChange R' (AlgHom.toLinearMap (IsScalarTower.toAlgHom R S S')))\nf' : TensorProduct R R' S →ₐ[R] S' :=\n  Algebra.TensorProduct.productMap (IsScalarTower.toAlgHom R R' S') (IsScalarTower.toAlgHom R S S')\n⊢ ∀ (x : TensorProduct R R' S), ↑e x = ↑f' x\n[PROOFSTEP]\nintro x\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nh₁ : RespectsIso P\nh₂ :\n  ∀ ⦃R S T : Type u⦄ [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing T] [inst_3 : Algebra R S]\n    [inst_4 : Algebra R T], P (algebraMap R T) → P Algebra.TensorProduct.includeLeftRingHom\nR S R' S' : Type u\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing S\ninst✝⁸ : CommRing R'\ninst✝⁷ : CommRing S'\ninst✝⁶ : Algebra R S\ninst✝⁵ : Algebra R R'\ninst✝⁴ : Algebra R S'\ninst✝³ : Algebra S S'\ninst✝² : Algebra R' S'\ninst✝¹ : IsScalarTower R S S'\ninst✝ : IsScalarTower R R' S'\nh : Algebra.IsPushout R S R' S'\nH : P (algebraMap R S)\ne : TensorProduct R R' S ≃ₛₗ[id R'] S' :=\n  IsBaseChange.equiv (_ : IsBaseChange R' (AlgHom.toLinearMap (IsScalarTower.toAlgHom R S S')))\nf' : TensorProduct R R' S →ₐ[R] S' :=\n  Algebra.TensorProduct.productMap (IsScalarTower.toAlgHom R R' S') (IsScalarTower.toAlgHom R S S')\nx : TensorProduct R R' S\n⊢ ↑e x = ↑f' x\n[PROOFSTEP]\nchange e.toLinearMap.restrictScalars R x = f'.toLinearMap x\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nh₁ : RespectsIso P\nh₂ :\n  ∀ ⦃R S T : Type u⦄ [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing T] [inst_3 : Algebra R S]\n    [inst_4 : Algebra R T], P (algebraMap R T) → P Algebra.TensorProduct.includeLeftRingHom\nR S R' S' : Type u\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing S\ninst✝⁸ : CommRing R'\ninst✝⁷ : CommRing S'\ninst✝⁶ : Algebra R S\ninst✝⁵ : Algebra R R'\ninst✝⁴ : Algebra R S'\ninst✝³ : Algebra S S'\ninst✝² : Algebra R' S'\ninst✝¹ : IsScalarTower R S S'\ninst✝ : IsScalarTower R R' S'\nh : Algebra.IsPushout R S R' S'\nH : P (algebraMap R S)\ne : TensorProduct R R' S ≃ₛₗ[id R'] S' :=\n  IsBaseChange.equiv (_ : IsBaseChange R' (AlgHom.toLinearMap (IsScalarTower.toAlgHom R S S')))\nf' : TensorProduct R R' S →ₐ[R] S' :=\n  Algebra.TensorProduct.productMap (IsScalarTower.toAlgHom R R' S') (IsScalarTower.toAlgHom R S S')\nx : TensorProduct R R' S\n⊢ ↑(↑R ↑e) x = ↑(AlgHom.toLinearMap f') x\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_a\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nh₁ : RespectsIso P\nh₂ :\n  ∀ ⦃R S T : Type u⦄ [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing T] [inst_3 : Algebra R S]\n    [inst_4 : Algebra R T], P (algebraMap R T) → P Algebra.TensorProduct.includeLeftRingHom\nR S R' S' : Type u\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing S\ninst✝⁸ : CommRing R'\ninst✝⁷ : CommRing S'\ninst✝⁶ : Algebra R S\ninst✝⁵ : Algebra R R'\ninst✝⁴ : Algebra R S'\ninst✝³ : Algebra S S'\ninst✝² : Algebra R' S'\ninst✝¹ : IsScalarTower R S S'\ninst✝ : IsScalarTower R R' S'\nh : Algebra.IsPushout R S R' S'\nH : P (algebraMap R S)\ne : TensorProduct R R' S ≃ₛₗ[id R'] S' :=\n  IsBaseChange.equiv (_ : IsBaseChange R' (AlgHom.toLinearMap (IsScalarTower.toAlgHom R S S')))\nf' : TensorProduct R R' S →ₐ[R] S' :=\n  Algebra.TensorProduct.productMap (IsScalarTower.toAlgHom R R' S') (IsScalarTower.toAlgHom R S S')\nx : TensorProduct R R' S\n⊢ ↑R ↑e = AlgHom.toLinearMap f'\n[PROOFSTEP]\napply TensorProduct.ext'\n[GOAL]\ncase e_a.H\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nh₁ : RespectsIso P\nh₂ :\n  ∀ ⦃R S T : Type u⦄ [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing T] [inst_3 : Algebra R S]\n    [inst_4 : Algebra R T], P (algebraMap R T) → P Algebra.TensorProduct.includeLeftRingHom\nR S R' S' : Type u\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing S\ninst✝⁸ : CommRing R'\ninst✝⁷ : CommRing S'\ninst✝⁶ : Algebra R S\ninst✝⁵ : Algebra R R'\ninst✝⁴ : Algebra R S'\ninst✝³ : Algebra S S'\ninst✝² : Algebra R' S'\ninst✝¹ : IsScalarTower R S S'\ninst✝ : IsScalarTower R R' S'\nh : Algebra.IsPushout R S R' S'\nH : P (algebraMap R S)\ne : TensorProduct R R' S ≃ₛₗ[id R'] S' :=\n  IsBaseChange.equiv (_ : IsBaseChange R' (AlgHom.toLinearMap (IsScalarTower.toAlgHom R S S')))\nf' : TensorProduct R R' S →ₐ[R] S' :=\n  Algebra.TensorProduct.productMap (IsScalarTower.toAlgHom R R' S') (IsScalarTower.toAlgHom R S S')\nx : TensorProduct R R' S\n⊢ ∀ (x : R') (y : S), ↑(↑R ↑e) (x ⊗ₜ[R] y) = ↑(AlgHom.toLinearMap f') (x ⊗ₜ[R] y)\n[PROOFSTEP]\nintro x y\n[GOAL]\ncase e_a.H\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nh₁ : RespectsIso P\nh₂ :\n  ∀ ⦃R S T : Type u⦄ [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing T] [inst_3 : Algebra R S]\n    [inst_4 : Algebra R T], P (algebraMap R T) → P Algebra.TensorProduct.includeLeftRingHom\nR S R' S' : Type u\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing S\ninst✝⁸ : CommRing R'\ninst✝⁷ : CommRing S'\ninst✝⁶ : Algebra R S\ninst✝⁵ : Algebra R R'\ninst✝⁴ : Algebra R S'\ninst✝³ : Algebra S S'\ninst✝² : Algebra R' S'\ninst✝¹ : IsScalarTower R S S'\ninst✝ : IsScalarTower R R' S'\nh : Algebra.IsPushout R S R' S'\nH : P (algebraMap R S)\ne : TensorProduct R R' S ≃ₛₗ[id R'] S' :=\n  IsBaseChange.equiv (_ : IsBaseChange R' (AlgHom.toLinearMap (IsScalarTower.toAlgHom R S S')))\nf' : TensorProduct R R' S →ₐ[R] S' :=\n  Algebra.TensorProduct.productMap (IsScalarTower.toAlgHom R R' S') (IsScalarTower.toAlgHom R S S')\nx✝ : TensorProduct R R' S\nx : R'\ny : S\n⊢ ↑(↑R ↑e) (x ⊗ₜ[R] y) = ↑(AlgHom.toLinearMap f') (x ⊗ₜ[R] y)\n[PROOFSTEP]\nsimp [IsBaseChange.equiv_tmul, Algebra.smul_def]\n  -- Porting Note: This had a lot of implicit inferences which didn't resolve anymore.\n    -- Added those in\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nh₁ : RespectsIso P\nh₂ :\n  ∀ ⦃R S T : Type u⦄ [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing T] [inst_3 : Algebra R S]\n    [inst_4 : Algebra R T], P (algebraMap R T) → P Algebra.TensorProduct.includeLeftRingHom\nR S R' S' : Type u\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing S\ninst✝⁸ : CommRing R'\ninst✝⁷ : CommRing S'\ninst✝⁶ : Algebra R S\ninst✝⁵ : Algebra R R'\ninst✝⁴ : Algebra R S'\ninst✝³ : Algebra S S'\ninst✝² : Algebra R' S'\ninst✝¹ : IsScalarTower R S S'\ninst✝ : IsScalarTower R R' S'\nh : Algebra.IsPushout R S R' S'\nH : P (algebraMap R S)\ne : TensorProduct R R' S ≃ₛₗ[id R'] S' :=\n  IsBaseChange.equiv (_ : IsBaseChange R' (AlgHom.toLinearMap (IsScalarTower.toAlgHom R S S')))\nf' : TensorProduct R R' S →ₐ[R] S' :=\n  Algebra.TensorProduct.productMap (IsScalarTower.toAlgHom R R' S') (IsScalarTower.toAlgHom R S S')\nthis : ∀ (x : TensorProduct R R' S), ↑e x = ↑f' x\n⊢ P (algebraMap R' S')\n[PROOFSTEP]\nconvert\n  h₁.1 (_ : R' →+* TensorProduct R R' S) (_ : TensorProduct R R' S ≃+* S') (h₂ H : P (_ : R' →+* TensorProduct R R' S))\n[GOAL]\ncase h.e'_5\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nh₁ : RespectsIso P\nh₂ :\n  ∀ ⦃R S T : Type u⦄ [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing T] [inst_3 : Algebra R S]\n    [inst_4 : Algebra R T], P (algebraMap R T) → P Algebra.TensorProduct.includeLeftRingHom\nR S R' S' : Type u\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing S\ninst✝⁸ : CommRing R'\ninst✝⁷ : CommRing S'\ninst✝⁶ : Algebra R S\ninst✝⁵ : Algebra R R'\ninst✝⁴ : Algebra R S'\ninst✝³ : Algebra S S'\ninst✝² : Algebra R' S'\ninst✝¹ : IsScalarTower R S S'\ninst✝ : IsScalarTower R R' S'\nh : Algebra.IsPushout R S R' S'\nH : P (algebraMap R S)\ne : TensorProduct R R' S ≃ₛₗ[id R'] S' :=\n  IsBaseChange.equiv (_ : IsBaseChange R' (AlgHom.toLinearMap (IsScalarTower.toAlgHom R S S')))\nf' : TensorProduct R R' S →ₐ[R] S' :=\n  Algebra.TensorProduct.productMap (IsScalarTower.toAlgHom R R' S') (IsScalarTower.toAlgHom R S S')\nthis : ∀ (x : TensorProduct R R' S), ↑e x = ↑f' x\n⊢ algebraMap R' S' = comp (RingEquiv.toRingHom ?m.221851) Algebra.TensorProduct.includeLeftRingHom\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nh₁ : RespectsIso P\nh₂ :\n  ∀ ⦃R S T : Type u⦄ [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing T] [inst_3 : Algebra R S]\n    [inst_4 : Algebra R T], P (algebraMap R T) → P Algebra.TensorProduct.includeLeftRingHom\nR S R' S' : Type u\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing S\ninst✝⁸ : CommRing R'\ninst✝⁷ : CommRing S'\ninst✝⁶ : Algebra R S\ninst✝⁵ : Algebra R R'\ninst✝⁴ : Algebra R S'\ninst✝³ : Algebra S S'\ninst✝² : Algebra R' S'\ninst✝¹ : IsScalarTower R S S'\ninst✝ : IsScalarTower R R' S'\nh : Algebra.IsPushout R S R' S'\nH : P (algebraMap R S)\ne : TensorProduct R R' S ≃ₛₗ[id R'] S' :=\n  IsBaseChange.equiv (_ : IsBaseChange R' (AlgHom.toLinearMap (IsScalarTower.toAlgHom R S S')))\nf' : TensorProduct R R' S →ₐ[R] S' :=\n  Algebra.TensorProduct.productMap (IsScalarTower.toAlgHom R R' S') (IsScalarTower.toAlgHom R S S')\nthis : ∀ (x : TensorProduct R R' S), ↑e x = ↑f' x\n⊢ TensorProduct R R' S ≃+* S'\n[PROOFSTEP]\nswap\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nh₁ : RespectsIso P\nh₂ :\n  ∀ ⦃R S T : Type u⦄ [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing T] [inst_3 : Algebra R S]\n    [inst_4 : Algebra R T], P (algebraMap R T) → P Algebra.TensorProduct.includeLeftRingHom\nR S R' S' : Type u\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing S\ninst✝⁸ : CommRing R'\ninst✝⁷ : CommRing S'\ninst✝⁶ : Algebra R S\ninst✝⁵ : Algebra R R'\ninst✝⁴ : Algebra R S'\ninst✝³ : Algebra S S'\ninst✝² : Algebra R' S'\ninst✝¹ : IsScalarTower R S S'\ninst✝ : IsScalarTower R R' S'\nh : Algebra.IsPushout R S R' S'\nH : P (algebraMap R S)\ne : TensorProduct R R' S ≃ₛₗ[id R'] S' :=\n  IsBaseChange.equiv (_ : IsBaseChange R' (AlgHom.toLinearMap (IsScalarTower.toAlgHom R S S')))\nf' : TensorProduct R R' S →ₐ[R] S' :=\n  Algebra.TensorProduct.productMap (IsScalarTower.toAlgHom R R' S') (IsScalarTower.toAlgHom R S S')\nthis : ∀ (x : TensorProduct R R' S), ↑e x = ↑f' x\n⊢ TensorProduct R R' S ≃+* S'\n[PROOFSTEP]\nrefine' { e with map_mul' := fun x y => _ }\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nh₁ : RespectsIso P\nh₂ :\n  ∀ ⦃R S T : Type u⦄ [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing T] [inst_3 : Algebra R S]\n    [inst_4 : Algebra R T], P (algebraMap R T) → P Algebra.TensorProduct.includeLeftRingHom\nR S R' S' : Type u\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing S\ninst✝⁸ : CommRing R'\ninst✝⁷ : CommRing S'\ninst✝⁶ : Algebra R S\ninst✝⁵ : Algebra R R'\ninst✝⁴ : Algebra R S'\ninst✝³ : Algebra S S'\ninst✝² : Algebra R' S'\ninst✝¹ : IsScalarTower R S S'\ninst✝ : IsScalarTower R R' S'\nh : Algebra.IsPushout R S R' S'\nH : P (algebraMap R S)\ne : TensorProduct R R' S ≃ₛₗ[id R'] S' :=\n  IsBaseChange.equiv (_ : IsBaseChange R' (AlgHom.toLinearMap (IsScalarTower.toAlgHom R S S')))\nf' : TensorProduct R R' S →ₐ[R] S' :=\n  Algebra.TensorProduct.productMap (IsScalarTower.toAlgHom R R' S') (IsScalarTower.toAlgHom R S S')\nthis : ∀ (x : TensorProduct R R' S), ↑e x = ↑f' x\nx y : TensorProduct R R' S\n⊢ Equiv.toFun\n      { toFun := e.toFun, invFun := e.invFun, left_inv := (_ : Function.LeftInverse e.invFun e.toFun),\n        right_inv := (_ : Function.RightInverse e.invFun e.toFun) }\n      (x * y) =\n    Equiv.toFun\n        { toFun := e.toFun, invFun := e.invFun, left_inv := (_ : Function.LeftInverse e.invFun e.toFun),\n          right_inv := (_ : Function.RightInverse e.invFun e.toFun) }\n        x *\n      Equiv.toFun\n        { toFun := e.toFun, invFun := e.invFun, left_inv := (_ : Function.LeftInverse e.invFun e.toFun),\n          right_inv := (_ : Function.RightInverse e.invFun e.toFun) }\n        y\n[PROOFSTEP]\nchange e (x * y) = e x * e y\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nh₁ : RespectsIso P\nh₂ :\n  ∀ ⦃R S T : Type u⦄ [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing T] [inst_3 : Algebra R S]\n    [inst_4 : Algebra R T], P (algebraMap R T) → P Algebra.TensorProduct.includeLeftRingHom\nR S R' S' : Type u\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing S\ninst✝⁸ : CommRing R'\ninst✝⁷ : CommRing S'\ninst✝⁶ : Algebra R S\ninst✝⁵ : Algebra R R'\ninst✝⁴ : Algebra R S'\ninst✝³ : Algebra S S'\ninst✝² : Algebra R' S'\ninst✝¹ : IsScalarTower R S S'\ninst✝ : IsScalarTower R R' S'\nh : Algebra.IsPushout R S R' S'\nH : P (algebraMap R S)\ne : TensorProduct R R' S ≃ₛₗ[id R'] S' :=\n  IsBaseChange.equiv (_ : IsBaseChange R' (AlgHom.toLinearMap (IsScalarTower.toAlgHom R S S')))\nf' : TensorProduct R R' S →ₐ[R] S' :=\n  Algebra.TensorProduct.productMap (IsScalarTower.toAlgHom R R' S') (IsScalarTower.toAlgHom R S S')\nthis : ∀ (x : TensorProduct R R' S), ↑e x = ↑f' x\nx y : TensorProduct R R' S\n⊢ ↑e (x * y) = ↑e x * ↑e y\n[PROOFSTEP]\nsimp_rw [this]\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nh₁ : RespectsIso P\nh₂ :\n  ∀ ⦃R S T : Type u⦄ [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing T] [inst_3 : Algebra R S]\n    [inst_4 : Algebra R T], P (algebraMap R T) → P Algebra.TensorProduct.includeLeftRingHom\nR S R' S' : Type u\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing S\ninst✝⁸ : CommRing R'\ninst✝⁷ : CommRing S'\ninst✝⁶ : Algebra R S\ninst✝⁵ : Algebra R R'\ninst✝⁴ : Algebra R S'\ninst✝³ : Algebra S S'\ninst✝² : Algebra R' S'\ninst✝¹ : IsScalarTower R S S'\ninst✝ : IsScalarTower R R' S'\nh : Algebra.IsPushout R S R' S'\nH : P (algebraMap R S)\ne : TensorProduct R R' S ≃ₛₗ[id R'] S' :=\n  IsBaseChange.equiv (_ : IsBaseChange R' (AlgHom.toLinearMap (IsScalarTower.toAlgHom R S S')))\nf' : TensorProduct R R' S →ₐ[R] S' :=\n  Algebra.TensorProduct.productMap (IsScalarTower.toAlgHom R R' S') (IsScalarTower.toAlgHom R S S')\nthis : ∀ (x : TensorProduct R R' S), ↑e x = ↑f' x\nx y : TensorProduct R R' S\n⊢ ↑(Algebra.TensorProduct.productMap (IsScalarTower.toAlgHom R R' S') (IsScalarTower.toAlgHom R S S')) (x * y) =\n    ↑(Algebra.TensorProduct.productMap (IsScalarTower.toAlgHom R R' S') (IsScalarTower.toAlgHom R S S')) x *\n      ↑(Algebra.TensorProduct.productMap (IsScalarTower.toAlgHom R R' S') (IsScalarTower.toAlgHom R S S')) y\n[PROOFSTEP]\nexact map_mul f' _ _\n[GOAL]\ncase h.e'_5\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nh₁ : RespectsIso P\nh₂ :\n  ∀ ⦃R S T : Type u⦄ [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing T] [inst_3 : Algebra R S]\n    [inst_4 : Algebra R T], P (algebraMap R T) → P Algebra.TensorProduct.includeLeftRingHom\nR S R' S' : Type u\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing S\ninst✝⁸ : CommRing R'\ninst✝⁷ : CommRing S'\ninst✝⁶ : Algebra R S\ninst✝⁵ : Algebra R R'\ninst✝⁴ : Algebra R S'\ninst✝³ : Algebra S S'\ninst✝² : Algebra R' S'\ninst✝¹ : IsScalarTower R S S'\ninst✝ : IsScalarTower R R' S'\nh : Algebra.IsPushout R S R' S'\nH : P (algebraMap R S)\ne : TensorProduct R R' S ≃ₛₗ[id R'] S' :=\n  IsBaseChange.equiv (_ : IsBaseChange R' (AlgHom.toLinearMap (IsScalarTower.toAlgHom R S S')))\nf' : TensorProduct R R' S →ₐ[R] S' :=\n  Algebra.TensorProduct.productMap (IsScalarTower.toAlgHom R R' S') (IsScalarTower.toAlgHom R S S')\nthis : ∀ (x : TensorProduct R R' S), ↑e x = ↑f' x\n⊢ algebraMap R' S' =\n    comp\n      (RingEquiv.toRingHom\n        {\n          toEquiv :=\n            { toFun := e.toFun, invFun := e.invFun, left_inv := (_ : Function.LeftInverse e.invFun e.toFun),\n              right_inv := (_ : Function.RightInverse e.invFun e.toFun) },\n          map_mul' := (_ : ∀ (x y : TensorProduct R R' S), ↑e (x * y) = ↑e x * ↑e y),\n          map_add' :=\n            (_ :\n              ∀ (x y : TensorProduct R R' S),\n                AddHom.toFun e.toAddHom (x + y) = AddHom.toFun e.toAddHom x + AddHom.toFun e.toAddHom y) })\n      Algebra.TensorProduct.includeLeftRingHom\n[PROOFSTEP]\next x\n[GOAL]\ncase h.e'_5.a\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nh₁ : RespectsIso P\nh₂ :\n  ∀ ⦃R S T : Type u⦄ [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing T] [inst_3 : Algebra R S]\n    [inst_4 : Algebra R T], P (algebraMap R T) → P Algebra.TensorProduct.includeLeftRingHom\nR S R' S' : Type u\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing S\ninst✝⁸ : CommRing R'\ninst✝⁷ : CommRing S'\ninst✝⁶ : Algebra R S\ninst✝⁵ : Algebra R R'\ninst✝⁴ : Algebra R S'\ninst✝³ : Algebra S S'\ninst✝² : Algebra R' S'\ninst✝¹ : IsScalarTower R S S'\ninst✝ : IsScalarTower R R' S'\nh : Algebra.IsPushout R S R' S'\nH : P (algebraMap R S)\ne : TensorProduct R R' S ≃ₛₗ[id R'] S' :=\n  IsBaseChange.equiv (_ : IsBaseChange R' (AlgHom.toLinearMap (IsScalarTower.toAlgHom R S S')))\nf' : TensorProduct R R' S →ₐ[R] S' :=\n  Algebra.TensorProduct.productMap (IsScalarTower.toAlgHom R R' S') (IsScalarTower.toAlgHom R S S')\nthis : ∀ (x : TensorProduct R R' S), ↑e x = ↑f' x\nx : R'\n⊢ ↑(algebraMap R' S') x =\n    ↑(comp\n          (RingEquiv.toRingHom\n            {\n              toEquiv :=\n                { toFun := e.toFun, invFun := e.invFun, left_inv := (_ : Function.LeftInverse e.invFun e.toFun),\n                  right_inv := (_ : Function.RightInverse e.invFun e.toFun) },\n              map_mul' := (_ : ∀ (x y : TensorProduct R R' S), ↑e (x * y) = ↑e x * ↑e y),\n              map_add' :=\n                (_ :\n                  ∀ (x y : TensorProduct R R' S),\n                    AddHom.toFun e.toAddHom (x + y) = AddHom.toFun e.toAddHom x + AddHom.toFun e.toAddHom y) })\n          Algebra.TensorProduct.includeLeftRingHom)\n      x\n[PROOFSTEP]\nchange\n  _ =\n    e\n      (x ⊗ₜ[R] 1)\n        --Porting note: Had `dsimp only [e]` here, which didn't work anymore\n[GOAL]\ncase h.e'_5.a\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nh₁ : RespectsIso P\nh₂ :\n  ∀ ⦃R S T : Type u⦄ [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing T] [inst_3 : Algebra R S]\n    [inst_4 : Algebra R T], P (algebraMap R T) → P Algebra.TensorProduct.includeLeftRingHom\nR S R' S' : Type u\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing S\ninst✝⁸ : CommRing R'\ninst✝⁷ : CommRing S'\ninst✝⁶ : Algebra R S\ninst✝⁵ : Algebra R R'\ninst✝⁴ : Algebra R S'\ninst✝³ : Algebra S S'\ninst✝² : Algebra R' S'\ninst✝¹ : IsScalarTower R S S'\ninst✝ : IsScalarTower R R' S'\nh : Algebra.IsPushout R S R' S'\nH : P (algebraMap R S)\ne : TensorProduct R R' S ≃ₛₗ[id R'] S' :=\n  IsBaseChange.equiv (_ : IsBaseChange R' (AlgHom.toLinearMap (IsScalarTower.toAlgHom R S S')))\nf' : TensorProduct R R' S →ₐ[R] S' :=\n  Algebra.TensorProduct.productMap (IsScalarTower.toAlgHom R R' S') (IsScalarTower.toAlgHom R S S')\nthis : ∀ (x : TensorProduct R R' S), ↑e x = ↑f' x\nx : R'\n⊢ ↑(algebraMap R' S') x = ↑e (x ⊗ₜ[R] 1)\n[PROOFSTEP]\nrw [h.symm.1.equiv_tmul, Algebra.smul_def, AlgHom.toLinearMap_apply, map_one, mul_one]\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : StableUnderBaseChange P\nhP' : RespectsIso P\nR S T : CommRingCat\nf : R ⟶ S\ng : R ⟶ T\nH : P g\n⊢ P pushout.inl\n[PROOFSTEP]\nrw [←\n  show _ = pushout.inl from colimit.isoColimitCocone_ι_inv ⟨_, CommRingCat.pushoutCoconeIsColimit f g⟩ WalkingSpan.left,\n  hP'.cancel_right_isIso]\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : StableUnderBaseChange P\nhP' : RespectsIso P\nR S T : CommRingCat\nf : R ⟶ S\ng : R ⟶ T\nH : P g\n⊢ P\n    (NatTrans.app\n      { cocone := CommRingCat.pushoutCocone f g, isColimit := CommRingCat.pushoutCoconeIsColimit f g }.cocone.ι\n      WalkingSpan.left)\n[PROOFSTEP]\nletI := f.toAlgebra\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : StableUnderBaseChange P\nhP' : RespectsIso P\nR S T : CommRingCat\nf : R ⟶ S\ng : R ⟶ T\nH : P g\nthis : Algebra ↑R ↑S := toAlgebra f\n⊢ P\n    (NatTrans.app\n      { cocone := CommRingCat.pushoutCocone f g, isColimit := CommRingCat.pushoutCoconeIsColimit f g }.cocone.ι\n      WalkingSpan.left)\n[PROOFSTEP]\nletI := g.toAlgebra\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : StableUnderBaseChange P\nhP' : RespectsIso P\nR S T : CommRingCat\nf : R ⟶ S\ng : R ⟶ T\nH : P g\nthis✝ : Algebra ↑R ↑S := toAlgebra f\nthis : Algebra ↑R ↑T := toAlgebra g\n⊢ P\n    (NatTrans.app\n      { cocone := CommRingCat.pushoutCocone f g, isColimit := CommRingCat.pushoutCoconeIsColimit f g }.cocone.ι\n      WalkingSpan.left)\n[PROOFSTEP]\ndsimp only [CommRingCat.pushoutCocone_inl, PushoutCocone.ι_app_left]\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : StableUnderBaseChange P\nhP' : RespectsIso P\nR S T : CommRingCat\nf : R ⟶ S\ng : R ⟶ T\nH : P g\nthis✝ : Algebra ↑R ↑S := toAlgebra f\nthis : Algebra ↑R ↑T := toAlgebra g\n⊢ P Algebra.TensorProduct.includeLeftRingHom\n[PROOFSTEP]\napply hP R T S (TensorProduct R S T)\n[GOAL]\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : StableUnderBaseChange P\nhP' : RespectsIso P\nR S T : CommRingCat\nf : R ⟶ S\ng : R ⟶ T\nH : P g\nthis✝ : Algebra ↑R ↑S := toAlgebra f\nthis : Algebra ↑R ↑T := toAlgebra g\n⊢ P (algebraMap ↑R ↑T)\n[PROOFSTEP]\nexact H\n", "meta": {"mathlib_filename": "Mathlib.RingTheory.RingHomProperties", "llama_tokens": 21794, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8128673087708699, "lm_q2_score": 0.6513548511303336, "lm_q1q2_score": 0.5294650648931649}}
{"text": "[GOAL]\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ (x : H), x ∈ ball x₀ ε → AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nh_lipsch : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → ‖F x a - F x₀ a‖ ≤ bound a * ‖x - x₀‖\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀\n⊢ Integrable F' ∧ HasFDerivAt (fun x => ∫ (a : α), F x a ∂μ) (∫ (a : α), F' a ∂μ) x₀\n[PROOFSTEP]\nhave x₀_in : x₀ ∈ ball x₀ ε := mem_ball_self ε_pos\n[GOAL]\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ (x : H), x ∈ ball x₀ ε → AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nh_lipsch : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → ‖F x a - F x₀ a‖ ≤ bound a * ‖x - x₀‖\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀\nx₀_in : x₀ ∈ ball x₀ ε\n⊢ Integrable F' ∧ HasFDerivAt (fun x => ∫ (a : α), F x a ∂μ) (∫ (a : α), F' a ∂μ) x₀\n[PROOFSTEP]\nhave nneg : ∀ x, 0 ≤ ‖x - x₀‖⁻¹ := fun x => inv_nonneg.mpr (norm_nonneg _)\n[GOAL]\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ (x : H), x ∈ ball x₀ ε → AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nh_lipsch : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → ‖F x a - F x₀ a‖ ≤ bound a * ‖x - x₀‖\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀\nx₀_in : x₀ ∈ ball x₀ ε\nnneg : ∀ (x : H), 0 ≤ ‖x - x₀‖⁻¹\n⊢ Integrable F' ∧ HasFDerivAt (fun x => ∫ (a : α), F x a ∂μ) (∫ (a : α), F' a ∂μ) x₀\n[PROOFSTEP]\nset b : α → ℝ := fun a => |bound a|\n[GOAL]\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ (x : H), x ∈ ball x₀ ε → AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nh_lipsch : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → ‖F x a - F x₀ a‖ ≤ bound a * ‖x - x₀‖\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀\nx₀_in : x₀ ∈ ball x₀ ε\nnneg : ∀ (x : H), 0 ≤ ‖x - x₀‖⁻¹\nb : α → ℝ := fun a => |bound a|\n⊢ Integrable F' ∧ HasFDerivAt (fun x => ∫ (a : α), F x a ∂μ) (∫ (a : α), F' a ∂μ) x₀\n[PROOFSTEP]\nhave b_int : Integrable b μ := bound_integrable.norm\n[GOAL]\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ (x : H), x ∈ ball x₀ ε → AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nh_lipsch : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → ‖F x a - F x₀ a‖ ≤ bound a * ‖x - x₀‖\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀\nx₀_in : x₀ ∈ ball x₀ ε\nnneg : ∀ (x : H), 0 ≤ ‖x - x₀‖⁻¹\nb : α → ℝ := fun a => |bound a|\nb_int : Integrable b\n⊢ Integrable F' ∧ HasFDerivAt (fun x => ∫ (a : α), F x a ∂μ) (∫ (a : α), F' a ∂μ) x₀\n[PROOFSTEP]\nhave b_nonneg : ∀ a, 0 ≤ b a := fun a => abs_nonneg _\n[GOAL]\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ (x : H), x ∈ ball x₀ ε → AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nh_lipsch : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → ‖F x a - F x₀ a‖ ≤ bound a * ‖x - x₀‖\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀\nx₀_in : x₀ ∈ ball x₀ ε\nnneg : ∀ (x : H), 0 ≤ ‖x - x₀‖⁻¹\nb : α → ℝ := fun a => |bound a|\nb_int : Integrable b\nb_nonneg : ∀ (a : α), 0 ≤ b a\n⊢ Integrable F' ∧ HasFDerivAt (fun x => ∫ (a : α), F x a ∂μ) (∫ (a : α), F' a ∂μ) x₀\n[PROOFSTEP]\nreplace h_lipsch : ∀ᵐ a ∂μ, ∀ x ∈ ball x₀ ε, ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\n[GOAL]\ncase h_lipsch\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ (x : H), x ∈ ball x₀ ε → AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nh_lipsch : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → ‖F x a - F x₀ a‖ ≤ bound a * ‖x - x₀‖\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀\nx₀_in : x₀ ∈ ball x₀ ε\nnneg : ∀ (x : H), 0 ≤ ‖x - x₀‖⁻¹\nb : α → ℝ := fun a => |bound a|\nb_int : Integrable b\nb_nonneg : ∀ (a : α), 0 ≤ b a\n⊢ ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ (x : H), x ∈ ball x₀ ε → AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀\nx₀_in : x₀ ∈ ball x₀ ε\nnneg : ∀ (x : H), 0 ≤ ‖x - x₀‖⁻¹\nb : α → ℝ := fun a => |bound a|\nb_int : Integrable b\nb_nonneg : ∀ (a : α), 0 ≤ b a\nh_lipsch : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\n⊢ Integrable F' ∧ HasFDerivAt (fun x => ∫ (a : α), F x a ∂μ) (∫ (a : α), F' a ∂μ) x₀\n[PROOFSTEP]\nexact h_lipsch.mono fun a ha x hx => (ha x hx).trans <| mul_le_mul_of_nonneg_right (le_abs_self _) (norm_nonneg _)\n[GOAL]\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ (x : H), x ∈ ball x₀ ε → AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀\nx₀_in : x₀ ∈ ball x₀ ε\nnneg : ∀ (x : H), 0 ≤ ‖x - x₀‖⁻¹\nb : α → ℝ := fun a => |bound a|\nb_int : Integrable b\nb_nonneg : ∀ (a : α), 0 ≤ b a\nh_lipsch : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\n⊢ Integrable F' ∧ HasFDerivAt (fun x => ∫ (a : α), F x a ∂μ) (∫ (a : α), F' a ∂μ) x₀\n[PROOFSTEP]\nhave hF_int' : ∀ x ∈ ball x₀ ε, Integrable (F x) μ := fun x x_in ↦\n  by\n  have : ∀ᵐ a ∂μ, ‖F x₀ a - F x a‖ ≤ ε * b a :=\n    by\n    simp only [norm_sub_rev (F x₀ _)]\n    refine' h_lipsch.mono fun a ha => (ha x x_in).trans _\n    rw [mul_comm ε]\n    rw [mem_ball, dist_eq_norm] at x_in \n    exact mul_le_mul_of_nonneg_left x_in.le (b_nonneg _)\n  exact integrable_of_norm_sub_le (hF_meas x x_in) hF_int (bound_integrable.norm.const_mul ε) this\n[GOAL]\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ (x : H), x ∈ ball x₀ ε → AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀\nx₀_in : x₀ ∈ ball x₀ ε\nnneg : ∀ (x : H), 0 ≤ ‖x - x₀‖⁻¹\nb : α → ℝ := fun a => |bound a|\nb_int : Integrable b\nb_nonneg : ∀ (a : α), 0 ≤ b a\nh_lipsch : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\nx : H\nx_in : x ∈ ball x₀ ε\n⊢ Integrable (F x)\n[PROOFSTEP]\nhave : ∀ᵐ a ∂μ, ‖F x₀ a - F x a‖ ≤ ε * b a :=\n  by\n  simp only [norm_sub_rev (F x₀ _)]\n  refine' h_lipsch.mono fun a ha => (ha x x_in).trans _\n  rw [mul_comm ε]\n  rw [mem_ball, dist_eq_norm] at x_in \n  exact mul_le_mul_of_nonneg_left x_in.le (b_nonneg _)\n[GOAL]\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ (x : H), x ∈ ball x₀ ε → AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀\nx₀_in : x₀ ∈ ball x₀ ε\nnneg : ∀ (x : H), 0 ≤ ‖x - x₀‖⁻¹\nb : α → ℝ := fun a => |bound a|\nb_int : Integrable b\nb_nonneg : ∀ (a : α), 0 ≤ b a\nh_lipsch : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\nx : H\nx_in : x ∈ ball x₀ ε\n⊢ ∀ᵐ (a : α) ∂μ, ‖F x₀ a - F x a‖ ≤ ε * b a\n[PROOFSTEP]\nsimp only [norm_sub_rev (F x₀ _)]\n[GOAL]\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ (x : H), x ∈ ball x₀ ε → AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀\nx₀_in : x₀ ∈ ball x₀ ε\nnneg : ∀ (x : H), 0 ≤ ‖x - x₀‖⁻¹\nb : α → ℝ := fun a => |bound a|\nb_int : Integrable b\nb_nonneg : ∀ (a : α), 0 ≤ b a\nh_lipsch : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\nx : H\nx_in : x ∈ ball x₀ ε\n⊢ ∀ᵐ (a : α) ∂μ, ‖F x a - F x₀ a‖ ≤ ε * |bound a|\n[PROOFSTEP]\nrefine' h_lipsch.mono fun a ha => (ha x x_in).trans _\n[GOAL]\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ (x : H), x ∈ ball x₀ ε → AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀\nx₀_in : x₀ ∈ ball x₀ ε\nnneg : ∀ (x : H), 0 ≤ ‖x - x₀‖⁻¹\nb : α → ℝ := fun a => |bound a|\nb_int : Integrable b\nb_nonneg : ∀ (a : α), 0 ≤ b a\nh_lipsch : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\nx : H\nx_in : x ∈ ball x₀ ε\na : α\nha : ∀ (x : H), x ∈ ball x₀ ε → ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\n⊢ b a * ‖x - x₀‖ ≤ ε * |bound a|\n[PROOFSTEP]\nrw [mul_comm ε]\n[GOAL]\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ (x : H), x ∈ ball x₀ ε → AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀\nx₀_in : x₀ ∈ ball x₀ ε\nnneg : ∀ (x : H), 0 ≤ ‖x - x₀‖⁻¹\nb : α → ℝ := fun a => |bound a|\nb_int : Integrable b\nb_nonneg : ∀ (a : α), 0 ≤ b a\nh_lipsch : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\nx : H\nx_in : x ∈ ball x₀ ε\na : α\nha : ∀ (x : H), x ∈ ball x₀ ε → ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\n⊢ b a * ‖x - x₀‖ ≤ |bound a| * ε\n[PROOFSTEP]\nrw [mem_ball, dist_eq_norm] at x_in \n[GOAL]\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ (x : H), x ∈ ball x₀ ε → AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀\nx₀_in : x₀ ∈ ball x₀ ε\nnneg : ∀ (x : H), 0 ≤ ‖x - x₀‖⁻¹\nb : α → ℝ := fun a => |bound a|\nb_int : Integrable b\nb_nonneg : ∀ (a : α), 0 ≤ b a\nh_lipsch : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\nx : H\nx_in : ‖x - x₀‖ < ε\na : α\nha : ∀ (x : H), x ∈ ball x₀ ε → ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\n⊢ b a * ‖x - x₀‖ ≤ |bound a| * ε\n[PROOFSTEP]\nexact mul_le_mul_of_nonneg_left x_in.le (b_nonneg _)\n[GOAL]\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ (x : H), x ∈ ball x₀ ε → AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀\nx₀_in : x₀ ∈ ball x₀ ε\nnneg : ∀ (x : H), 0 ≤ ‖x - x₀‖⁻¹\nb : α → ℝ := fun a => |bound a|\nb_int : Integrable b\nb_nonneg : ∀ (a : α), 0 ≤ b a\nh_lipsch : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\nx : H\nx_in : x ∈ ball x₀ ε\nthis : ∀ᵐ (a : α) ∂μ, ‖F x₀ a - F x a‖ ≤ ε * b a\n⊢ Integrable (F x)\n[PROOFSTEP]\nexact integrable_of_norm_sub_le (hF_meas x x_in) hF_int (bound_integrable.norm.const_mul ε) this\n[GOAL]\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ (x : H), x ∈ ball x₀ ε → AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀\nx₀_in : x₀ ∈ ball x₀ ε\nnneg : ∀ (x : H), 0 ≤ ‖x - x₀‖⁻¹\nb : α → ℝ := fun a => |bound a|\nb_int : Integrable b\nb_nonneg : ∀ (a : α), 0 ≤ b a\nh_lipsch : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\nhF_int' : ∀ (x : H), x ∈ ball x₀ ε → Integrable (F x)\n⊢ Integrable F' ∧ HasFDerivAt (fun x => ∫ (a : α), F x a ∂μ) (∫ (a : α), F' a ∂μ) x₀\n[PROOFSTEP]\nhave hF'_int : Integrable F' μ :=\n  have : ∀ᵐ a ∂μ, ‖F' a‖ ≤ b a := by\n    apply (h_diff.and h_lipsch).mono\n    rintro a ⟨ha_diff, ha_lip⟩\n    refine' ha_diff.le_of_lip' (b_nonneg a) (mem_of_superset (ball_mem_nhds _ ε_pos) <| ha_lip)\n  b_int.mono' hF'_meas this\n[GOAL]\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ (x : H), x ∈ ball x₀ ε → AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀\nx₀_in : x₀ ∈ ball x₀ ε\nnneg : ∀ (x : H), 0 ≤ ‖x - x₀‖⁻¹\nb : α → ℝ := fun a => |bound a|\nb_int : Integrable b\nb_nonneg : ∀ (a : α), 0 ≤ b a\nh_lipsch : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\nhF_int' : ∀ (x : H), x ∈ ball x₀ ε → Integrable (F x)\n⊢ ∀ᵐ (a : α) ∂μ, ‖F' a‖ ≤ b a\n[PROOFSTEP]\napply (h_diff.and h_lipsch).mono\n[GOAL]\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ (x : H), x ∈ ball x₀ ε → AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀\nx₀_in : x₀ ∈ ball x₀ ε\nnneg : ∀ (x : H), 0 ≤ ‖x - x₀‖⁻¹\nb : α → ℝ := fun a => |bound a|\nb_int : Integrable b\nb_nonneg : ∀ (a : α), 0 ≤ b a\nh_lipsch : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\nhF_int' : ∀ (x : H), x ∈ ball x₀ ε → Integrable (F x)\n⊢ ∀ (x : α),\n    (HasFDerivAt (fun x_1 => F x_1 x) (F' x) x₀ ∧\n        ∀ (x_1 : H), x_1 ∈ ball x₀ ε → ‖F x_1 x - F x₀ x‖ ≤ b x * ‖x_1 - x₀‖) →\n      ‖F' x‖ ≤ b x\n[PROOFSTEP]\nrintro a ⟨ha_diff, ha_lip⟩\n[GOAL]\ncase intro\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ (x : H), x ∈ ball x₀ ε → AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀\nx₀_in : x₀ ∈ ball x₀ ε\nnneg : ∀ (x : H), 0 ≤ ‖x - x₀‖⁻¹\nb : α → ℝ := fun a => |bound a|\nb_int : Integrable b\nb_nonneg : ∀ (a : α), 0 ≤ b a\nh_lipsch : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\nhF_int' : ∀ (x : H), x ∈ ball x₀ ε → Integrable (F x)\na : α\nha_diff : HasFDerivAt (fun x => F x a) (F' a) x₀\nha_lip : ∀ (x : H), x ∈ ball x₀ ε → ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\n⊢ ‖F' a‖ ≤ b a\n[PROOFSTEP]\nrefine' ha_diff.le_of_lip' (b_nonneg a) (mem_of_superset (ball_mem_nhds _ ε_pos) <| ha_lip)\n[GOAL]\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ (x : H), x ∈ ball x₀ ε → AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀\nx₀_in : x₀ ∈ ball x₀ ε\nnneg : ∀ (x : H), 0 ≤ ‖x - x₀‖⁻¹\nb : α → ℝ := fun a => |bound a|\nb_int : Integrable b\nb_nonneg : ∀ (a : α), 0 ≤ b a\nh_lipsch : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\nhF_int' : ∀ (x : H), x ∈ ball x₀ ε → Integrable (F x)\nhF'_int : Integrable F'\n⊢ Integrable F' ∧ HasFDerivAt (fun x => ∫ (a : α), F x a ∂μ) (∫ (a : α), F' a ∂μ) x₀\n[PROOFSTEP]\nrefine' ⟨hF'_int, _⟩\n[GOAL]\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ (x : H), x ∈ ball x₀ ε → AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀\nx₀_in : x₀ ∈ ball x₀ ε\nnneg : ∀ (x : H), 0 ≤ ‖x - x₀‖⁻¹\nb : α → ℝ := fun a => |bound a|\nb_int : Integrable b\nb_nonneg : ∀ (a : α), 0 ≤ b a\nh_lipsch : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\nhF_int' : ∀ (x : H), x ∈ ball x₀ ε → Integrable (F x)\nhF'_int : Integrable F'\n⊢ HasFDerivAt (fun x => ∫ (a : α), F x a ∂μ) (∫ (a : α), F' a ∂μ) x₀\n[PROOFSTEP]\nhave h_ball : ball x₀ ε ∈ 𝓝 x₀ := ball_mem_nhds x₀ ε_pos\n[GOAL]\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ (x : H), x ∈ ball x₀ ε → AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀\nx₀_in : x₀ ∈ ball x₀ ε\nnneg : ∀ (x : H), 0 ≤ ‖x - x₀‖⁻¹\nb : α → ℝ := fun a => |bound a|\nb_int : Integrable b\nb_nonneg : ∀ (a : α), 0 ≤ b a\nh_lipsch : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\nhF_int' : ∀ (x : H), x ∈ ball x₀ ε → Integrable (F x)\nhF'_int : Integrable F'\nh_ball : ball x₀ ε ∈ 𝓝 x₀\n⊢ HasFDerivAt (fun x => ∫ (a : α), F x a ∂μ) (∫ (a : α), F' a ∂μ) x₀\n[PROOFSTEP]\nhave :\n  ∀ᶠ x in 𝓝 x₀,\n    ‖x - x₀‖⁻¹ * ‖((∫ a, F x a ∂μ) - ∫ a, F x₀ a ∂μ) - (∫ a, F' a ∂μ) (x - x₀)‖ =\n      ‖∫ a, ‖x - x₀‖⁻¹ • (F x a - F x₀ a - F' a (x - x₀)) ∂μ‖ :=\n  by\n  apply mem_of_superset (ball_mem_nhds _ ε_pos)\n  intro x x_in; simp only\n  rw [Set.mem_setOf_eq, ← norm_smul_of_nonneg (nneg _), integral_smul, integral_sub, integral_sub, ←\n    ContinuousLinearMap.integral_apply hF'_int]\n  exacts [hF_int' x x_in, hF_int, (hF_int' x x_in).sub hF_int, hF'_int.apply_continuousLinearMap _]\n[GOAL]\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ (x : H), x ∈ ball x₀ ε → AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀\nx₀_in : x₀ ∈ ball x₀ ε\nnneg : ∀ (x : H), 0 ≤ ‖x - x₀‖⁻¹\nb : α → ℝ := fun a => |bound a|\nb_int : Integrable b\nb_nonneg : ∀ (a : α), 0 ≤ b a\nh_lipsch : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\nhF_int' : ∀ (x : H), x ∈ ball x₀ ε → Integrable (F x)\nhF'_int : Integrable F'\nh_ball : ball x₀ ε ∈ 𝓝 x₀\n⊢ ∀ᶠ (x : H) in 𝓝 x₀,\n    ‖x - x₀‖⁻¹ * ‖∫ (a : α), F x a ∂μ - ∫ (a : α), F x₀ a ∂μ - ↑(∫ (a : α), F' a ∂μ) (x - x₀)‖ =\n      ‖∫ (a : α), ‖x - x₀‖⁻¹ • (F x a - F x₀ a - ↑(F' a) (x - x₀)) ∂μ‖\n[PROOFSTEP]\napply mem_of_superset (ball_mem_nhds _ ε_pos)\n[GOAL]\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ (x : H), x ∈ ball x₀ ε → AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀\nx₀_in : x₀ ∈ ball x₀ ε\nnneg : ∀ (x : H), 0 ≤ ‖x - x₀‖⁻¹\nb : α → ℝ := fun a => |bound a|\nb_int : Integrable b\nb_nonneg : ∀ (a : α), 0 ≤ b a\nh_lipsch : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\nhF_int' : ∀ (x : H), x ∈ ball x₀ ε → Integrable (F x)\nhF'_int : Integrable F'\nh_ball : ball x₀ ε ∈ 𝓝 x₀\n⊢ ball x₀ ε ⊆\n    {x |\n      (fun x =>\n          ‖x - x₀‖⁻¹ * ‖∫ (a : α), F x a ∂μ - ∫ (a : α), F x₀ a ∂μ - ↑(∫ (a : α), F' a ∂μ) (x - x₀)‖ =\n            ‖∫ (a : α), ‖x - x₀‖⁻¹ • (F x a - F x₀ a - ↑(F' a) (x - x₀)) ∂μ‖)\n        x}\n[PROOFSTEP]\nintro x x_in\n[GOAL]\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ (x : H), x ∈ ball x₀ ε → AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀\nx₀_in : x₀ ∈ ball x₀ ε\nnneg : ∀ (x : H), 0 ≤ ‖x - x₀‖⁻¹\nb : α → ℝ := fun a => |bound a|\nb_int : Integrable b\nb_nonneg : ∀ (a : α), 0 ≤ b a\nh_lipsch : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\nhF_int' : ∀ (x : H), x ∈ ball x₀ ε → Integrable (F x)\nhF'_int : Integrable F'\nh_ball : ball x₀ ε ∈ 𝓝 x₀\nx : H\nx_in : x ∈ ball x₀ ε\n⊢ x ∈\n    {x |\n      (fun x =>\n          ‖x - x₀‖⁻¹ * ‖∫ (a : α), F x a ∂μ - ∫ (a : α), F x₀ a ∂μ - ↑(∫ (a : α), F' a ∂μ) (x - x₀)‖ =\n            ‖∫ (a : α), ‖x - x₀‖⁻¹ • (F x a - F x₀ a - ↑(F' a) (x - x₀)) ∂μ‖)\n        x}\n[PROOFSTEP]\nsimp only\n[GOAL]\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ (x : H), x ∈ ball x₀ ε → AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀\nx₀_in : x₀ ∈ ball x₀ ε\nnneg : ∀ (x : H), 0 ≤ ‖x - x₀‖⁻¹\nb : α → ℝ := fun a => |bound a|\nb_int : Integrable b\nb_nonneg : ∀ (a : α), 0 ≤ b a\nh_lipsch : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\nhF_int' : ∀ (x : H), x ∈ ball x₀ ε → Integrable (F x)\nhF'_int : Integrable F'\nh_ball : ball x₀ ε ∈ 𝓝 x₀\nx : H\nx_in : x ∈ ball x₀ ε\n⊢ x ∈\n    {x |\n      ‖x - x₀‖⁻¹ * ‖∫ (a : α), F x a ∂μ - ∫ (a : α), F x₀ a ∂μ - ↑(∫ (a : α), F' a ∂μ) (x - x₀)‖ =\n        ‖∫ (a : α), ‖x - x₀‖⁻¹ • (F x a - F x₀ a - ↑(F' a) (x - x₀)) ∂μ‖}\n[PROOFSTEP]\nrw [Set.mem_setOf_eq, ← norm_smul_of_nonneg (nneg _), integral_smul, integral_sub, integral_sub, ←\n  ContinuousLinearMap.integral_apply hF'_int]\n[GOAL]\ncase hf\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ (x : H), x ∈ ball x₀ ε → AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀\nx₀_in : x₀ ∈ ball x₀ ε\nnneg : ∀ (x : H), 0 ≤ ‖x - x₀‖⁻¹\nb : α → ℝ := fun a => |bound a|\nb_int : Integrable b\nb_nonneg : ∀ (a : α), 0 ≤ b a\nh_lipsch : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\nhF_int' : ∀ (x : H), x ∈ ball x₀ ε → Integrable (F x)\nhF'_int : Integrable F'\nh_ball : ball x₀ ε ∈ 𝓝 x₀\nx : H\nx_in : x ∈ ball x₀ ε\n⊢ Integrable fun a => F x a\ncase hg\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ (x : H), x ∈ ball x₀ ε → AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀\nx₀_in : x₀ ∈ ball x₀ ε\nnneg : ∀ (x : H), 0 ≤ ‖x - x₀‖⁻¹\nb : α → ℝ := fun a => |bound a|\nb_int : Integrable b\nb_nonneg : ∀ (a : α), 0 ≤ b a\nh_lipsch : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\nhF_int' : ∀ (x : H), x ∈ ball x₀ ε → Integrable (F x)\nhF'_int : Integrable F'\nh_ball : ball x₀ ε ∈ 𝓝 x₀\nx : H\nx_in : x ∈ ball x₀ ε\n⊢ Integrable fun a => F x₀ a\ncase hf\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ (x : H), x ∈ ball x₀ ε → AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀\nx₀_in : x₀ ∈ ball x₀ ε\nnneg : ∀ (x : H), 0 ≤ ‖x - x₀‖⁻¹\nb : α → ℝ := fun a => |bound a|\nb_int : Integrable b\nb_nonneg : ∀ (a : α), 0 ≤ b a\nh_lipsch : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\nhF_int' : ∀ (x : H), x ∈ ball x₀ ε → Integrable (F x)\nhF'_int : Integrable F'\nh_ball : ball x₀ ε ∈ 𝓝 x₀\nx : H\nx_in : x ∈ ball x₀ ε\n⊢ Integrable fun a => F x a - F x₀ a\ncase hg\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ (x : H), x ∈ ball x₀ ε → AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀\nx₀_in : x₀ ∈ ball x₀ ε\nnneg : ∀ (x : H), 0 ≤ ‖x - x₀‖⁻¹\nb : α → ℝ := fun a => |bound a|\nb_int : Integrable b\nb_nonneg : ∀ (a : α), 0 ≤ b a\nh_lipsch : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\nhF_int' : ∀ (x : H), x ∈ ball x₀ ε → Integrable (F x)\nhF'_int : Integrable F'\nh_ball : ball x₀ ε ∈ 𝓝 x₀\nx : H\nx_in : x ∈ ball x₀ ε\n⊢ Integrable fun a => ↑(F' a) (x - x₀)\n[PROOFSTEP]\nexacts [hF_int' x x_in, hF_int, (hF_int' x x_in).sub hF_int, hF'_int.apply_continuousLinearMap _]\n[GOAL]\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ (x : H), x ∈ ball x₀ ε → AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀\nx₀_in : x₀ ∈ ball x₀ ε\nnneg : ∀ (x : H), 0 ≤ ‖x - x₀‖⁻¹\nb : α → ℝ := fun a => |bound a|\nb_int : Integrable b\nb_nonneg : ∀ (a : α), 0 ≤ b a\nh_lipsch : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\nhF_int' : ∀ (x : H), x ∈ ball x₀ ε → Integrable (F x)\nhF'_int : Integrable F'\nh_ball : ball x₀ ε ∈ 𝓝 x₀\nthis :\n  ∀ᶠ (x : H) in 𝓝 x₀,\n    ‖x - x₀‖⁻¹ * ‖∫ (a : α), F x a ∂μ - ∫ (a : α), F x₀ a ∂μ - ↑(∫ (a : α), F' a ∂μ) (x - x₀)‖ =\n      ‖∫ (a : α), ‖x - x₀‖⁻¹ • (F x a - F x₀ a - ↑(F' a) (x - x₀)) ∂μ‖\n⊢ HasFDerivAt (fun x => ∫ (a : α), F x a ∂μ) (∫ (a : α), F' a ∂μ) x₀\n[PROOFSTEP]\nrw [hasFDerivAt_iff_tendsto, tendsto_congr' this, ← tendsto_zero_iff_norm_tendsto_zero, ←\n  show (∫ a : α, ‖x₀ - x₀‖⁻¹ • (F x₀ a - F x₀ a - (F' a) (x₀ - x₀)) ∂μ) = 0 by simp]\n[GOAL]\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ (x : H), x ∈ ball x₀ ε → AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀\nx₀_in : x₀ ∈ ball x₀ ε\nnneg : ∀ (x : H), 0 ≤ ‖x - x₀‖⁻¹\nb : α → ℝ := fun a => |bound a|\nb_int : Integrable b\nb_nonneg : ∀ (a : α), 0 ≤ b a\nh_lipsch : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\nhF_int' : ∀ (x : H), x ∈ ball x₀ ε → Integrable (F x)\nhF'_int : Integrable F'\nh_ball : ball x₀ ε ∈ 𝓝 x₀\nthis :\n  ∀ᶠ (x : H) in 𝓝 x₀,\n    ‖x - x₀‖⁻¹ * ‖∫ (a : α), F x a ∂μ - ∫ (a : α), F x₀ a ∂μ - ↑(∫ (a : α), F' a ∂μ) (x - x₀)‖ =\n      ‖∫ (a : α), ‖x - x₀‖⁻¹ • (F x a - F x₀ a - ↑(F' a) (x - x₀)) ∂μ‖\n⊢ ∫ (a : α), ‖x₀ - x₀‖⁻¹ • (F x₀ a - F x₀ a - ↑(F' a) (x₀ - x₀)) ∂μ = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ (x : H), x ∈ ball x₀ ε → AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀\nx₀_in : x₀ ∈ ball x₀ ε\nnneg : ∀ (x : H), 0 ≤ ‖x - x₀‖⁻¹\nb : α → ℝ := fun a => |bound a|\nb_int : Integrable b\nb_nonneg : ∀ (a : α), 0 ≤ b a\nh_lipsch : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\nhF_int' : ∀ (x : H), x ∈ ball x₀ ε → Integrable (F x)\nhF'_int : Integrable F'\nh_ball : ball x₀ ε ∈ 𝓝 x₀\nthis :\n  ∀ᶠ (x : H) in 𝓝 x₀,\n    ‖x - x₀‖⁻¹ * ‖∫ (a : α), F x a ∂μ - ∫ (a : α), F x₀ a ∂μ - ↑(∫ (a : α), F' a ∂μ) (x - x₀)‖ =\n      ‖∫ (a : α), ‖x - x₀‖⁻¹ • (F x a - F x₀ a - ↑(F' a) (x - x₀)) ∂μ‖\n⊢ Tendsto (fun x => ∫ (a : α), ‖x - x₀‖⁻¹ • (F x a - F x₀ a - ↑(F' a) (x - x₀)) ∂μ) (𝓝 x₀)\n    (𝓝 (∫ (a : α), ‖x₀ - x₀‖⁻¹ • (F x₀ a - F x₀ a - ↑(F' a) (x₀ - x₀)) ∂μ))\n[PROOFSTEP]\napply tendsto_integral_filter_of_dominated_convergence\n[GOAL]\ncase hF_meas\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ (x : H), x ∈ ball x₀ ε → AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀\nx₀_in : x₀ ∈ ball x₀ ε\nnneg : ∀ (x : H), 0 ≤ ‖x - x₀‖⁻¹\nb : α → ℝ := fun a => |bound a|\nb_int : Integrable b\nb_nonneg : ∀ (a : α), 0 ≤ b a\nh_lipsch : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\nhF_int' : ∀ (x : H), x ∈ ball x₀ ε → Integrable (F x)\nhF'_int : Integrable F'\nh_ball : ball x₀ ε ∈ 𝓝 x₀\nthis :\n  ∀ᶠ (x : H) in 𝓝 x₀,\n    ‖x - x₀‖⁻¹ * ‖∫ (a : α), F x a ∂μ - ∫ (a : α), F x₀ a ∂μ - ↑(∫ (a : α), F' a ∂μ) (x - x₀)‖ =\n      ‖∫ (a : α), ‖x - x₀‖⁻¹ • (F x a - F x₀ a - ↑(F' a) (x - x₀)) ∂μ‖\n⊢ ∀ᶠ (n : H) in 𝓝 x₀, AEStronglyMeasurable (fun a => ‖n - x₀‖⁻¹ • (F n a - F x₀ a - ↑(F' a) (n - x₀))) μ\n[PROOFSTEP]\nfilter_upwards [h_ball] with _ x_in\n[GOAL]\ncase h\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ (x : H), x ∈ ball x₀ ε → AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀\nx₀_in : x₀ ∈ ball x₀ ε\nnneg : ∀ (x : H), 0 ≤ ‖x - x₀‖⁻¹\nb : α → ℝ := fun a => |bound a|\nb_int : Integrable b\nb_nonneg : ∀ (a : α), 0 ≤ b a\nh_lipsch : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\nhF_int' : ∀ (x : H), x ∈ ball x₀ ε → Integrable (F x)\nhF'_int : Integrable F'\nh_ball : ball x₀ ε ∈ 𝓝 x₀\nthis :\n  ∀ᶠ (x : H) in 𝓝 x₀,\n    ‖x - x₀‖⁻¹ * ‖∫ (a : α), F x a ∂μ - ∫ (a : α), F x₀ a ∂μ - ↑(∫ (a : α), F' a ∂μ) (x - x₀)‖ =\n      ‖∫ (a : α), ‖x - x₀‖⁻¹ • (F x a - F x₀ a - ↑(F' a) (x - x₀)) ∂μ‖\na✝ : H\nx_in : a✝ ∈ ball x₀ ε\n⊢ AEStronglyMeasurable (fun a => ‖a✝ - x₀‖⁻¹ • (F a✝ a - F x₀ a - ↑(F' a) (a✝ - x₀))) μ\n[PROOFSTEP]\napply AEStronglyMeasurable.const_smul\n[GOAL]\ncase h.hf\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ (x : H), x ∈ ball x₀ ε → AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀\nx₀_in : x₀ ∈ ball x₀ ε\nnneg : ∀ (x : H), 0 ≤ ‖x - x₀‖⁻¹\nb : α → ℝ := fun a => |bound a|\nb_int : Integrable b\nb_nonneg : ∀ (a : α), 0 ≤ b a\nh_lipsch : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\nhF_int' : ∀ (x : H), x ∈ ball x₀ ε → Integrable (F x)\nhF'_int : Integrable F'\nh_ball : ball x₀ ε ∈ 𝓝 x₀\nthis :\n  ∀ᶠ (x : H) in 𝓝 x₀,\n    ‖x - x₀‖⁻¹ * ‖∫ (a : α), F x a ∂μ - ∫ (a : α), F x₀ a ∂μ - ↑(∫ (a : α), F' a ∂μ) (x - x₀)‖ =\n      ‖∫ (a : α), ‖x - x₀‖⁻¹ • (F x a - F x₀ a - ↑(F' a) (x - x₀)) ∂μ‖\na✝ : H\nx_in : a✝ ∈ ball x₀ ε\n⊢ AEStronglyMeasurable (fun a => F a✝ a - F x₀ a - ↑(F' a) (a✝ - x₀)) μ\n[PROOFSTEP]\nexact ((hF_meas _ x_in).sub (hF_meas _ x₀_in)).sub (hF'_meas.apply_continuousLinearMap _)\n[GOAL]\ncase h_bound\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ (x : H), x ∈ ball x₀ ε → AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀\nx₀_in : x₀ ∈ ball x₀ ε\nnneg : ∀ (x : H), 0 ≤ ‖x - x₀‖⁻¹\nb : α → ℝ := fun a => |bound a|\nb_int : Integrable b\nb_nonneg : ∀ (a : α), 0 ≤ b a\nh_lipsch : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\nhF_int' : ∀ (x : H), x ∈ ball x₀ ε → Integrable (F x)\nhF'_int : Integrable F'\nh_ball : ball x₀ ε ∈ 𝓝 x₀\nthis :\n  ∀ᶠ (x : H) in 𝓝 x₀,\n    ‖x - x₀‖⁻¹ * ‖∫ (a : α), F x a ∂μ - ∫ (a : α), F x₀ a ∂μ - ↑(∫ (a : α), F' a ∂μ) (x - x₀)‖ =\n      ‖∫ (a : α), ‖x - x₀‖⁻¹ • (F x a - F x₀ a - ↑(F' a) (x - x₀)) ∂μ‖\n⊢ ∀ᶠ (n : H) in 𝓝 x₀, ∀ᵐ (a : α) ∂μ, ‖‖n - x₀‖⁻¹ • (F n a - F x₀ a - ↑(F' a) (n - x₀))‖ ≤ ?bound a\n[PROOFSTEP]\nrefine mem_of_superset h_ball fun x hx ↦ ?_\n[GOAL]\ncase h_bound\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ (x : H), x ∈ ball x₀ ε → AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀\nx₀_in : x₀ ∈ ball x₀ ε\nnneg : ∀ (x : H), 0 ≤ ‖x - x₀‖⁻¹\nb : α → ℝ := fun a => |bound a|\nb_int : Integrable b\nb_nonneg : ∀ (a : α), 0 ≤ b a\nh_lipsch : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\nhF_int' : ∀ (x : H), x ∈ ball x₀ ε → Integrable (F x)\nhF'_int : Integrable F'\nh_ball : ball x₀ ε ∈ 𝓝 x₀\nthis :\n  ∀ᶠ (x : H) in 𝓝 x₀,\n    ‖x - x₀‖⁻¹ * ‖∫ (a : α), F x a ∂μ - ∫ (a : α), F x₀ a ∂μ - ↑(∫ (a : α), F' a ∂μ) (x - x₀)‖ =\n      ‖∫ (a : α), ‖x - x₀‖⁻¹ • (F x a - F x₀ a - ↑(F' a) (x - x₀)) ∂μ‖\nx : H\nhx : x ∈ ball x₀ ε\n⊢ x ∈ {x | (fun n => ∀ᵐ (a : α) ∂μ, ‖‖n - x₀‖⁻¹ • (F n a - F x₀ a - ↑(F' a) (n - x₀))‖ ≤ ?bound a) x}\n[PROOFSTEP]\napply (h_diff.and h_lipsch).mono\n[GOAL]\ncase h_bound\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ (x : H), x ∈ ball x₀ ε → AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀\nx₀_in : x₀ ∈ ball x₀ ε\nnneg : ∀ (x : H), 0 ≤ ‖x - x₀‖⁻¹\nb : α → ℝ := fun a => |bound a|\nb_int : Integrable b\nb_nonneg : ∀ (a : α), 0 ≤ b a\nh_lipsch : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\nhF_int' : ∀ (x : H), x ∈ ball x₀ ε → Integrable (F x)\nhF'_int : Integrable F'\nh_ball : ball x₀ ε ∈ 𝓝 x₀\nthis :\n  ∀ᶠ (x : H) in 𝓝 x₀,\n    ‖x - x₀‖⁻¹ * ‖∫ (a : α), F x a ∂μ - ∫ (a : α), F x₀ a ∂μ - ↑(∫ (a : α), F' a ∂μ) (x - x₀)‖ =\n      ‖∫ (a : α), ‖x - x₀‖⁻¹ • (F x a - F x₀ a - ↑(F' a) (x - x₀)) ∂μ‖\nx : H\nhx : x ∈ ball x₀ ε\n⊢ ∀ (x_1 : α),\n    (HasFDerivAt (fun x => F x x_1) (F' x_1) x₀ ∧ ∀ (x : H), x ∈ ball x₀ ε → ‖F x x_1 - F x₀ x_1‖ ≤ b x_1 * ‖x - x₀‖) →\n      ‖‖x - x₀‖⁻¹ • (F x x_1 - F x₀ x_1 - ↑(F' x_1) (x - x₀))‖ ≤ ?bound x_1\ncase bound\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ (x : H), x ∈ ball x₀ ε → AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀\nx₀_in : x₀ ∈ ball x₀ ε\nnneg : ∀ (x : H), 0 ≤ ‖x - x₀‖⁻¹\nb : α → ℝ := fun a => |bound a|\nb_int : Integrable b\nb_nonneg : ∀ (a : α), 0 ≤ b a\nh_lipsch : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\nhF_int' : ∀ (x : H), x ∈ ball x₀ ε → Integrable (F x)\nhF'_int : Integrable F'\nh_ball : ball x₀ ε ∈ 𝓝 x₀\nthis :\n  ∀ᶠ (x : H) in 𝓝 x₀,\n    ‖x - x₀‖⁻¹ * ‖∫ (a : α), F x a ∂μ - ∫ (a : α), F x₀ a ∂μ - ↑(∫ (a : α), F' a ∂μ) (x - x₀)‖ =\n      ‖∫ (a : α), ‖x - x₀‖⁻¹ • (F x a - F x₀ a - ↑(F' a) (x - x₀)) ∂μ‖\n⊢ α → ℝ\n[PROOFSTEP]\nrintro a ⟨-, ha_bound⟩\n[GOAL]\ncase h_bound.intro\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ (x : H), x ∈ ball x₀ ε → AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀\nx₀_in : x₀ ∈ ball x₀ ε\nnneg : ∀ (x : H), 0 ≤ ‖x - x₀‖⁻¹\nb : α → ℝ := fun a => |bound a|\nb_int : Integrable b\nb_nonneg : ∀ (a : α), 0 ≤ b a\nh_lipsch : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\nhF_int' : ∀ (x : H), x ∈ ball x₀ ε → Integrable (F x)\nhF'_int : Integrable F'\nh_ball : ball x₀ ε ∈ 𝓝 x₀\nthis :\n  ∀ᶠ (x : H) in 𝓝 x₀,\n    ‖x - x₀‖⁻¹ * ‖∫ (a : α), F x a ∂μ - ∫ (a : α), F x₀ a ∂μ - ↑(∫ (a : α), F' a ∂μ) (x - x₀)‖ =\n      ‖∫ (a : α), ‖x - x₀‖⁻¹ • (F x a - F x₀ a - ↑(F' a) (x - x₀)) ∂μ‖\nx : H\nhx : x ∈ ball x₀ ε\na : α\nha_bound : ∀ (x : H), x ∈ ball x₀ ε → ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\n⊢ ‖‖x - x₀‖⁻¹ • (F x a - F x₀ a - ↑(F' a) (x - x₀))‖ ≤ ?bound a\ncase bound\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ (x : H), x ∈ ball x₀ ε → AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀\nx₀_in : x₀ ∈ ball x₀ ε\nnneg : ∀ (x : H), 0 ≤ ‖x - x₀‖⁻¹\nb : α → ℝ := fun a => |bound a|\nb_int : Integrable b\nb_nonneg : ∀ (a : α), 0 ≤ b a\nh_lipsch : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\nhF_int' : ∀ (x : H), x ∈ ball x₀ ε → Integrable (F x)\nhF'_int : Integrable F'\nh_ball : ball x₀ ε ∈ 𝓝 x₀\nthis :\n  ∀ᶠ (x : H) in 𝓝 x₀,\n    ‖x - x₀‖⁻¹ * ‖∫ (a : α), F x a ∂μ - ∫ (a : α), F x₀ a ∂μ - ↑(∫ (a : α), F' a ∂μ) (x - x₀)‖ =\n      ‖∫ (a : α), ‖x - x₀‖⁻¹ • (F x a - F x₀ a - ↑(F' a) (x - x₀)) ∂μ‖\n⊢ α → ℝ\n[PROOFSTEP]\nshow ‖‖x - x₀‖⁻¹ • (F x a - F x₀ a - F' a (x - x₀))‖ ≤ b a + ‖F' a‖\n[GOAL]\ncase h_bound.intro\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ (x : H), x ∈ ball x₀ ε → AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀\nx₀_in : x₀ ∈ ball x₀ ε\nnneg : ∀ (x : H), 0 ≤ ‖x - x₀‖⁻¹\nb : α → ℝ := fun a => |bound a|\nb_int : Integrable b\nb_nonneg : ∀ (a : α), 0 ≤ b a\nh_lipsch : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\nhF_int' : ∀ (x : H), x ∈ ball x₀ ε → Integrable (F x)\nhF'_int : Integrable F'\nh_ball : ball x₀ ε ∈ 𝓝 x₀\nthis :\n  ∀ᶠ (x : H) in 𝓝 x₀,\n    ‖x - x₀‖⁻¹ * ‖∫ (a : α), F x a ∂μ - ∫ (a : α), F x₀ a ∂μ - ↑(∫ (a : α), F' a ∂μ) (x - x₀)‖ =\n      ‖∫ (a : α), ‖x - x₀‖⁻¹ • (F x a - F x₀ a - ↑(F' a) (x - x₀)) ∂μ‖\nx : H\nhx : x ∈ ball x₀ ε\na : α\nha_bound : ∀ (x : H), x ∈ ball x₀ ε → ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\n⊢ ‖‖x - x₀‖⁻¹ • (F x a - F x₀ a - ↑(F' a) (x - x₀))‖ ≤ b a + ‖F' a‖\n[PROOFSTEP]\nreplace ha_bound : ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖ := ha_bound x hx\n[GOAL]\ncase h_bound.intro\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ (x : H), x ∈ ball x₀ ε → AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀\nx₀_in : x₀ ∈ ball x₀ ε\nnneg : ∀ (x : H), 0 ≤ ‖x - x₀‖⁻¹\nb : α → ℝ := fun a => |bound a|\nb_int : Integrable b\nb_nonneg : ∀ (a : α), 0 ≤ b a\nh_lipsch : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\nhF_int' : ∀ (x : H), x ∈ ball x₀ ε → Integrable (F x)\nhF'_int : Integrable F'\nh_ball : ball x₀ ε ∈ 𝓝 x₀\nthis :\n  ∀ᶠ (x : H) in 𝓝 x₀,\n    ‖x - x₀‖⁻¹ * ‖∫ (a : α), F x a ∂μ - ∫ (a : α), F x₀ a ∂μ - ↑(∫ (a : α), F' a ∂μ) (x - x₀)‖ =\n      ‖∫ (a : α), ‖x - x₀‖⁻¹ • (F x a - F x₀ a - ↑(F' a) (x - x₀)) ∂μ‖\nx : H\nhx : x ∈ ball x₀ ε\na : α\nha_bound : ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\n⊢ ‖‖x - x₀‖⁻¹ • (F x a - F x₀ a - ↑(F' a) (x - x₀))‖ ≤ b a + ‖F' a‖\n[PROOFSTEP]\ncalc\n  ‖‖x - x₀‖⁻¹ • (F x a - F x₀ a - F' a (x - x₀))‖ = ‖‖x - x₀‖⁻¹ • (F x a - F x₀ a) - ‖x - x₀‖⁻¹ • F' a (x - x₀)‖ := by\n    rw [smul_sub]\n  _ ≤ ‖‖x - x₀‖⁻¹ • (F x a - F x₀ a)‖ + ‖‖x - x₀‖⁻¹ • F' a (x - x₀)‖ := (norm_sub_le _ _)\n  _ = ‖x - x₀‖⁻¹ * ‖F x a - F x₀ a‖ + ‖x - x₀‖⁻¹ * ‖F' a (x - x₀)‖ := by\n    rw [norm_smul_of_nonneg, norm_smul_of_nonneg] <;> exact nneg _\n  _ ≤ ‖x - x₀‖⁻¹ * (b a * ‖x - x₀‖) + ‖x - x₀‖⁻¹ * (‖F' a‖ * ‖x - x₀‖) := by gcongr; exact (F' a).le_op_norm _\n  _ ≤ b a + ‖F' a‖ := ?_\n[GOAL]\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ (x : H), x ∈ ball x₀ ε → AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀\nx₀_in : x₀ ∈ ball x₀ ε\nnneg : ∀ (x : H), 0 ≤ ‖x - x₀‖⁻¹\nb : α → ℝ := fun a => |bound a|\nb_int : Integrable b\nb_nonneg : ∀ (a : α), 0 ≤ b a\nh_lipsch : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\nhF_int' : ∀ (x : H), x ∈ ball x₀ ε → Integrable (F x)\nhF'_int : Integrable F'\nh_ball : ball x₀ ε ∈ 𝓝 x₀\nthis :\n  ∀ᶠ (x : H) in 𝓝 x₀,\n    ‖x - x₀‖⁻¹ * ‖∫ (a : α), F x a ∂μ - ∫ (a : α), F x₀ a ∂μ - ↑(∫ (a : α), F' a ∂μ) (x - x₀)‖ =\n      ‖∫ (a : α), ‖x - x₀‖⁻¹ • (F x a - F x₀ a - ↑(F' a) (x - x₀)) ∂μ‖\nx : H\nhx : x ∈ ball x₀ ε\na : α\nha_bound : ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\n⊢ ‖‖x - x₀‖⁻¹ • (F x a - F x₀ a - ↑(F' a) (x - x₀))‖ = ‖‖x - x₀‖⁻¹ • (F x a - F x₀ a) - ‖x - x₀‖⁻¹ • ↑(F' a) (x - x₀)‖\n[PROOFSTEP]\nrw [smul_sub]\n[GOAL]\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ (x : H), x ∈ ball x₀ ε → AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀\nx₀_in : x₀ ∈ ball x₀ ε\nnneg : ∀ (x : H), 0 ≤ ‖x - x₀‖⁻¹\nb : α → ℝ := fun a => |bound a|\nb_int : Integrable b\nb_nonneg : ∀ (a : α), 0 ≤ b a\nh_lipsch : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\nhF_int' : ∀ (x : H), x ∈ ball x₀ ε → Integrable (F x)\nhF'_int : Integrable F'\nh_ball : ball x₀ ε ∈ 𝓝 x₀\nthis :\n  ∀ᶠ (x : H) in 𝓝 x₀,\n    ‖x - x₀‖⁻¹ * ‖∫ (a : α), F x a ∂μ - ∫ (a : α), F x₀ a ∂μ - ↑(∫ (a : α), F' a ∂μ) (x - x₀)‖ =\n      ‖∫ (a : α), ‖x - x₀‖⁻¹ • (F x a - F x₀ a - ↑(F' a) (x - x₀)) ∂μ‖\nx : H\nhx : x ∈ ball x₀ ε\na : α\nha_bound : ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\n⊢ ‖‖x - x₀‖⁻¹ • (F x a - F x₀ a)‖ + ‖‖x - x₀‖⁻¹ • ↑(F' a) (x - x₀)‖ =\n    ‖x - x₀‖⁻¹ * ‖F x a - F x₀ a‖ + ‖x - x₀‖⁻¹ * ‖↑(F' a) (x - x₀)‖\n[PROOFSTEP]\nrw [norm_smul_of_nonneg, norm_smul_of_nonneg]\n[GOAL]\ncase ht\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ (x : H), x ∈ ball x₀ ε → AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀\nx₀_in : x₀ ∈ ball x₀ ε\nnneg : ∀ (x : H), 0 ≤ ‖x - x₀‖⁻¹\nb : α → ℝ := fun a => |bound a|\nb_int : Integrable b\nb_nonneg : ∀ (a : α), 0 ≤ b a\nh_lipsch : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\nhF_int' : ∀ (x : H), x ∈ ball x₀ ε → Integrable (F x)\nhF'_int : Integrable F'\nh_ball : ball x₀ ε ∈ 𝓝 x₀\nthis :\n  ∀ᶠ (x : H) in 𝓝 x₀,\n    ‖x - x₀‖⁻¹ * ‖∫ (a : α), F x a ∂μ - ∫ (a : α), F x₀ a ∂μ - ↑(∫ (a : α), F' a ∂μ) (x - x₀)‖ =\n      ‖∫ (a : α), ‖x - x₀‖⁻¹ • (F x a - F x₀ a - ↑(F' a) (x - x₀)) ∂μ‖\nx : H\nhx : x ∈ ball x₀ ε\na : α\nha_bound : ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\n⊢ 0 ≤ ‖x - x₀‖⁻¹\n[PROOFSTEP]\nexact nneg _\n[GOAL]\ncase ht\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ (x : H), x ∈ ball x₀ ε → AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀\nx₀_in : x₀ ∈ ball x₀ ε\nnneg : ∀ (x : H), 0 ≤ ‖x - x₀‖⁻¹\nb : α → ℝ := fun a => |bound a|\nb_int : Integrable b\nb_nonneg : ∀ (a : α), 0 ≤ b a\nh_lipsch : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\nhF_int' : ∀ (x : H), x ∈ ball x₀ ε → Integrable (F x)\nhF'_int : Integrable F'\nh_ball : ball x₀ ε ∈ 𝓝 x₀\nthis :\n  ∀ᶠ (x : H) in 𝓝 x₀,\n    ‖x - x₀‖⁻¹ * ‖∫ (a : α), F x a ∂μ - ∫ (a : α), F x₀ a ∂μ - ↑(∫ (a : α), F' a ∂μ) (x - x₀)‖ =\n      ‖∫ (a : α), ‖x - x₀‖⁻¹ • (F x a - F x₀ a - ↑(F' a) (x - x₀)) ∂μ‖\nx : H\nhx : x ∈ ball x₀ ε\na : α\nha_bound : ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\n⊢ 0 ≤ ‖x - x₀‖⁻¹\n[PROOFSTEP]\nexact nneg _\n[GOAL]\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ (x : H), x ∈ ball x₀ ε → AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀\nx₀_in : x₀ ∈ ball x₀ ε\nnneg : ∀ (x : H), 0 ≤ ‖x - x₀‖⁻¹\nb : α → ℝ := fun a => |bound a|\nb_int : Integrable b\nb_nonneg : ∀ (a : α), 0 ≤ b a\nh_lipsch : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\nhF_int' : ∀ (x : H), x ∈ ball x₀ ε → Integrable (F x)\nhF'_int : Integrable F'\nh_ball : ball x₀ ε ∈ 𝓝 x₀\nthis :\n  ∀ᶠ (x : H) in 𝓝 x₀,\n    ‖x - x₀‖⁻¹ * ‖∫ (a : α), F x a ∂μ - ∫ (a : α), F x₀ a ∂μ - ↑(∫ (a : α), F' a ∂μ) (x - x₀)‖ =\n      ‖∫ (a : α), ‖x - x₀‖⁻¹ • (F x a - F x₀ a - ↑(F' a) (x - x₀)) ∂μ‖\nx : H\nhx : x ∈ ball x₀ ε\na : α\nha_bound : ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\n⊢ ‖x - x₀‖⁻¹ * ‖F x a - F x₀ a‖ + ‖x - x₀‖⁻¹ * ‖↑(F' a) (x - x₀)‖ ≤\n    ‖x - x₀‖⁻¹ * (b a * ‖x - x₀‖) + ‖x - x₀‖⁻¹ * (‖F' a‖ * ‖x - x₀‖)\n[PROOFSTEP]\ngcongr\n[GOAL]\ncase h₂.h\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ (x : H), x ∈ ball x₀ ε → AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀\nx₀_in : x₀ ∈ ball x₀ ε\nnneg : ∀ (x : H), 0 ≤ ‖x - x₀‖⁻¹\nb : α → ℝ := fun a => |bound a|\nb_int : Integrable b\nb_nonneg : ∀ (a : α), 0 ≤ b a\nh_lipsch : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\nhF_int' : ∀ (x : H), x ∈ ball x₀ ε → Integrable (F x)\nhF'_int : Integrable F'\nh_ball : ball x₀ ε ∈ 𝓝 x₀\nthis :\n  ∀ᶠ (x : H) in 𝓝 x₀,\n    ‖x - x₀‖⁻¹ * ‖∫ (a : α), F x a ∂μ - ∫ (a : α), F x₀ a ∂μ - ↑(∫ (a : α), F' a ∂μ) (x - x₀)‖ =\n      ‖∫ (a : α), ‖x - x₀‖⁻¹ • (F x a - F x₀ a - ↑(F' a) (x - x₀)) ∂μ‖\nx : H\nhx : x ∈ ball x₀ ε\na : α\nha_bound : ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\n⊢ ‖↑(F' a) (x - x₀)‖ ≤ ‖F' a‖ * ‖x - x₀‖\n[PROOFSTEP]\nexact (F' a).le_op_norm _\n[GOAL]\ncase h_bound.intro\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ (x : H), x ∈ ball x₀ ε → AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀\nx₀_in : x₀ ∈ ball x₀ ε\nnneg : ∀ (x : H), 0 ≤ ‖x - x₀‖⁻¹\nb : α → ℝ := fun a => |bound a|\nb_int : Integrable b\nb_nonneg : ∀ (a : α), 0 ≤ b a\nh_lipsch : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\nhF_int' : ∀ (x : H), x ∈ ball x₀ ε → Integrable (F x)\nhF'_int : Integrable F'\nh_ball : ball x₀ ε ∈ 𝓝 x₀\nthis :\n  ∀ᶠ (x : H) in 𝓝 x₀,\n    ‖x - x₀‖⁻¹ * ‖∫ (a : α), F x a ∂μ - ∫ (a : α), F x₀ a ∂μ - ↑(∫ (a : α), F' a ∂μ) (x - x₀)‖ =\n      ‖∫ (a : α), ‖x - x₀‖⁻¹ • (F x a - F x₀ a - ↑(F' a) (x - x₀)) ∂μ‖\nx : H\nhx : x ∈ ball x₀ ε\na : α\nha_bound : ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\n⊢ ‖x - x₀‖⁻¹ * (b a * ‖x - x₀‖) + ‖x - x₀‖⁻¹ * (‖F' a‖ * ‖x - x₀‖) ≤ b a + ‖F' a‖\n[PROOFSTEP]\nsimp only [← div_eq_inv_mul]\n[GOAL]\ncase h_bound.intro\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ (x : H), x ∈ ball x₀ ε → AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀\nx₀_in : x₀ ∈ ball x₀ ε\nnneg : ∀ (x : H), 0 ≤ ‖x - x₀‖⁻¹\nb : α → ℝ := fun a => |bound a|\nb_int : Integrable b\nb_nonneg : ∀ (a : α), 0 ≤ b a\nh_lipsch : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\nhF_int' : ∀ (x : H), x ∈ ball x₀ ε → Integrable (F x)\nhF'_int : Integrable F'\nh_ball : ball x₀ ε ∈ 𝓝 x₀\nthis :\n  ∀ᶠ (x : H) in 𝓝 x₀,\n    ‖x - x₀‖⁻¹ * ‖∫ (a : α), F x a ∂μ - ∫ (a : α), F x₀ a ∂μ - ↑(∫ (a : α), F' a ∂μ) (x - x₀)‖ =\n      ‖∫ (a : α), ‖x - x₀‖⁻¹ • (F x a - F x₀ a - ↑(F' a) (x - x₀)) ∂μ‖\nx : H\nhx : x ∈ ball x₀ ε\na : α\nha_bound : ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\n⊢ |bound a| * ‖x - x₀‖ / ‖x - x₀‖ + ‖F' a‖ * ‖x - x₀‖ / ‖x - x₀‖ ≤ |bound a| + ‖F' a‖\n[PROOFSTEP]\napply_rules [add_le_add, div_le_of_nonneg_of_le_mul]\n[GOAL]\ncase h_bound.intro.h₁.hb\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ (x : H), x ∈ ball x₀ ε → AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀\nx₀_in : x₀ ∈ ball x₀ ε\nnneg : ∀ (x : H), 0 ≤ ‖x - x₀‖⁻¹\nb : α → ℝ := fun a => |bound a|\nb_int : Integrable b\nb_nonneg : ∀ (a : α), 0 ≤ b a\nh_lipsch : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\nhF_int' : ∀ (x : H), x ∈ ball x₀ ε → Integrable (F x)\nhF'_int : Integrable F'\nh_ball : ball x₀ ε ∈ 𝓝 x₀\nthis :\n  ∀ᶠ (x : H) in 𝓝 x₀,\n    ‖x - x₀‖⁻¹ * ‖∫ (a : α), F x a ∂μ - ∫ (a : α), F x₀ a ∂μ - ↑(∫ (a : α), F' a ∂μ) (x - x₀)‖ =\n      ‖∫ (a : α), ‖x - x₀‖⁻¹ • (F x a - F x₀ a - ↑(F' a) (x - x₀)) ∂μ‖\nx : H\nhx : x ∈ ball x₀ ε\na : α\nha_bound : ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\n⊢ 0 ≤ ‖x - x₀‖\n[PROOFSTEP]\nfirst\n| rfl\n| positivity\n[GOAL]\ncase h_bound.intro.h₁.hb\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ (x : H), x ∈ ball x₀ ε → AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀\nx₀_in : x₀ ∈ ball x₀ ε\nnneg : ∀ (x : H), 0 ≤ ‖x - x₀‖⁻¹\nb : α → ℝ := fun a => |bound a|\nb_int : Integrable b\nb_nonneg : ∀ (a : α), 0 ≤ b a\nh_lipsch : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\nhF_int' : ∀ (x : H), x ∈ ball x₀ ε → Integrable (F x)\nhF'_int : Integrable F'\nh_ball : ball x₀ ε ∈ 𝓝 x₀\nthis :\n  ∀ᶠ (x : H) in 𝓝 x₀,\n    ‖x - x₀‖⁻¹ * ‖∫ (a : α), F x a ∂μ - ∫ (a : α), F x₀ a ∂μ - ↑(∫ (a : α), F' a ∂μ) (x - x₀)‖ =\n      ‖∫ (a : α), ‖x - x₀‖⁻¹ • (F x a - F x₀ a - ↑(F' a) (x - x₀)) ∂μ‖\nx : H\nhx : x ∈ ball x₀ ε\na : α\nha_bound : ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\n⊢ 0 ≤ ‖x - x₀‖\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h_bound.intro.h₁.hb\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ (x : H), x ∈ ball x₀ ε → AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀\nx₀_in : x₀ ∈ ball x₀ ε\nnneg : ∀ (x : H), 0 ≤ ‖x - x₀‖⁻¹\nb : α → ℝ := fun a => |bound a|\nb_int : Integrable b\nb_nonneg : ∀ (a : α), 0 ≤ b a\nh_lipsch : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\nhF_int' : ∀ (x : H), x ∈ ball x₀ ε → Integrable (F x)\nhF'_int : Integrable F'\nh_ball : ball x₀ ε ∈ 𝓝 x₀\nthis :\n  ∀ᶠ (x : H) in 𝓝 x₀,\n    ‖x - x₀‖⁻¹ * ‖∫ (a : α), F x a ∂μ - ∫ (a : α), F x₀ a ∂μ - ↑(∫ (a : α), F' a ∂μ) (x - x₀)‖ =\n      ‖∫ (a : α), ‖x - x₀‖⁻¹ • (F x a - F x₀ a - ↑(F' a) (x - x₀)) ∂μ‖\nx : H\nhx : x ∈ ball x₀ ε\na : α\nha_bound : ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\n⊢ 0 ≤ ‖x - x₀‖\n[PROOFSTEP]\npositivity\n[GOAL]\ncase h_bound.intro.h₁.h\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ (x : H), x ∈ ball x₀ ε → AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀\nx₀_in : x₀ ∈ ball x₀ ε\nnneg : ∀ (x : H), 0 ≤ ‖x - x₀‖⁻¹\nb : α → ℝ := fun a => |bound a|\nb_int : Integrable b\nb_nonneg : ∀ (a : α), 0 ≤ b a\nh_lipsch : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\nhF_int' : ∀ (x : H), x ∈ ball x₀ ε → Integrable (F x)\nhF'_int : Integrable F'\nh_ball : ball x₀ ε ∈ 𝓝 x₀\nthis :\n  ∀ᶠ (x : H) in 𝓝 x₀,\n    ‖x - x₀‖⁻¹ * ‖∫ (a : α), F x a ∂μ - ∫ (a : α), F x₀ a ∂μ - ↑(∫ (a : α), F' a ∂μ) (x - x₀)‖ =\n      ‖∫ (a : α), ‖x - x₀‖⁻¹ • (F x a - F x₀ a - ↑(F' a) (x - x₀)) ∂μ‖\nx : H\nhx : x ∈ ball x₀ ε\na : α\nha_bound : ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\n⊢ |bound a| * ‖x - x₀‖ ≤ |bound a| * ‖x - x₀‖\n[PROOFSTEP]\nfirst\n| rfl\n| positivity\n[GOAL]\ncase h_bound.intro.h₁.h\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ (x : H), x ∈ ball x₀ ε → AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀\nx₀_in : x₀ ∈ ball x₀ ε\nnneg : ∀ (x : H), 0 ≤ ‖x - x₀‖⁻¹\nb : α → ℝ := fun a => |bound a|\nb_int : Integrable b\nb_nonneg : ∀ (a : α), 0 ≤ b a\nh_lipsch : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\nhF_int' : ∀ (x : H), x ∈ ball x₀ ε → Integrable (F x)\nhF'_int : Integrable F'\nh_ball : ball x₀ ε ∈ 𝓝 x₀\nthis :\n  ∀ᶠ (x : H) in 𝓝 x₀,\n    ‖x - x₀‖⁻¹ * ‖∫ (a : α), F x a ∂μ - ∫ (a : α), F x₀ a ∂μ - ↑(∫ (a : α), F' a ∂μ) (x - x₀)‖ =\n      ‖∫ (a : α), ‖x - x₀‖⁻¹ • (F x a - F x₀ a - ↑(F' a) (x - x₀)) ∂μ‖\nx : H\nhx : x ∈ ball x₀ ε\na : α\nha_bound : ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\n⊢ |bound a| * ‖x - x₀‖ ≤ |bound a| * ‖x - x₀‖\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h_bound.intro.h₂.hb\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ (x : H), x ∈ ball x₀ ε → AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀\nx₀_in : x₀ ∈ ball x₀ ε\nnneg : ∀ (x : H), 0 ≤ ‖x - x₀‖⁻¹\nb : α → ℝ := fun a => |bound a|\nb_int : Integrable b\nb_nonneg : ∀ (a : α), 0 ≤ b a\nh_lipsch : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\nhF_int' : ∀ (x : H), x ∈ ball x₀ ε → Integrable (F x)\nhF'_int : Integrable F'\nh_ball : ball x₀ ε ∈ 𝓝 x₀\nthis :\n  ∀ᶠ (x : H) in 𝓝 x₀,\n    ‖x - x₀‖⁻¹ * ‖∫ (a : α), F x a ∂μ - ∫ (a : α), F x₀ a ∂μ - ↑(∫ (a : α), F' a ∂μ) (x - x₀)‖ =\n      ‖∫ (a : α), ‖x - x₀‖⁻¹ • (F x a - F x₀ a - ↑(F' a) (x - x₀)) ∂μ‖\nx : H\nhx : x ∈ ball x₀ ε\na : α\nha_bound : ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\n⊢ 0 ≤ ‖x - x₀‖\n[PROOFSTEP]\nfirst\n| rfl\n| positivity\n[GOAL]\ncase h_bound.intro.h₂.hb\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ (x : H), x ∈ ball x₀ ε → AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀\nx₀_in : x₀ ∈ ball x₀ ε\nnneg : ∀ (x : H), 0 ≤ ‖x - x₀‖⁻¹\nb : α → ℝ := fun a => |bound a|\nb_int : Integrable b\nb_nonneg : ∀ (a : α), 0 ≤ b a\nh_lipsch : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\nhF_int' : ∀ (x : H), x ∈ ball x₀ ε → Integrable (F x)\nhF'_int : Integrable F'\nh_ball : ball x₀ ε ∈ 𝓝 x₀\nthis :\n  ∀ᶠ (x : H) in 𝓝 x₀,\n    ‖x - x₀‖⁻¹ * ‖∫ (a : α), F x a ∂μ - ∫ (a : α), F x₀ a ∂μ - ↑(∫ (a : α), F' a ∂μ) (x - x₀)‖ =\n      ‖∫ (a : α), ‖x - x₀‖⁻¹ • (F x a - F x₀ a - ↑(F' a) (x - x₀)) ∂μ‖\nx : H\nhx : x ∈ ball x₀ ε\na : α\nha_bound : ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\n⊢ 0 ≤ ‖x - x₀‖\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h_bound.intro.h₂.hb\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ (x : H), x ∈ ball x₀ ε → AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀\nx₀_in : x₀ ∈ ball x₀ ε\nnneg : ∀ (x : H), 0 ≤ ‖x - x₀‖⁻¹\nb : α → ℝ := fun a => |bound a|\nb_int : Integrable b\nb_nonneg : ∀ (a : α), 0 ≤ b a\nh_lipsch : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\nhF_int' : ∀ (x : H), x ∈ ball x₀ ε → Integrable (F x)\nhF'_int : Integrable F'\nh_ball : ball x₀ ε ∈ 𝓝 x₀\nthis :\n  ∀ᶠ (x : H) in 𝓝 x₀,\n    ‖x - x₀‖⁻¹ * ‖∫ (a : α), F x a ∂μ - ∫ (a : α), F x₀ a ∂μ - ↑(∫ (a : α), F' a ∂μ) (x - x₀)‖ =\n      ‖∫ (a : α), ‖x - x₀‖⁻¹ • (F x a - F x₀ a - ↑(F' a) (x - x₀)) ∂μ‖\nx : H\nhx : x ∈ ball x₀ ε\na : α\nha_bound : ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\n⊢ 0 ≤ ‖x - x₀‖\n[PROOFSTEP]\npositivity\n[GOAL]\ncase h_bound.intro.h₂.hc\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ (x : H), x ∈ ball x₀ ε → AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀\nx₀_in : x₀ ∈ ball x₀ ε\nnneg : ∀ (x : H), 0 ≤ ‖x - x₀‖⁻¹\nb : α → ℝ := fun a => |bound a|\nb_int : Integrable b\nb_nonneg : ∀ (a : α), 0 ≤ b a\nh_lipsch : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\nhF_int' : ∀ (x : H), x ∈ ball x₀ ε → Integrable (F x)\nhF'_int : Integrable F'\nh_ball : ball x₀ ε ∈ 𝓝 x₀\nthis :\n  ∀ᶠ (x : H) in 𝓝 x₀,\n    ‖x - x₀‖⁻¹ * ‖∫ (a : α), F x a ∂μ - ∫ (a : α), F x₀ a ∂μ - ↑(∫ (a : α), F' a ∂μ) (x - x₀)‖ =\n      ‖∫ (a : α), ‖x - x₀‖⁻¹ • (F x a - F x₀ a - ↑(F' a) (x - x₀)) ∂μ‖\nx : H\nhx : x ∈ ball x₀ ε\na : α\nha_bound : ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\n⊢ 0 ≤ ‖F' a‖\n[PROOFSTEP]\nfirst\n| rfl\n| positivity\n[GOAL]\ncase h_bound.intro.h₂.hc\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ (x : H), x ∈ ball x₀ ε → AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀\nx₀_in : x₀ ∈ ball x₀ ε\nnneg : ∀ (x : H), 0 ≤ ‖x - x₀‖⁻¹\nb : α → ℝ := fun a => |bound a|\nb_int : Integrable b\nb_nonneg : ∀ (a : α), 0 ≤ b a\nh_lipsch : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\nhF_int' : ∀ (x : H), x ∈ ball x₀ ε → Integrable (F x)\nhF'_int : Integrable F'\nh_ball : ball x₀ ε ∈ 𝓝 x₀\nthis :\n  ∀ᶠ (x : H) in 𝓝 x₀,\n    ‖x - x₀‖⁻¹ * ‖∫ (a : α), F x a ∂μ - ∫ (a : α), F x₀ a ∂μ - ↑(∫ (a : α), F' a ∂μ) (x - x₀)‖ =\n      ‖∫ (a : α), ‖x - x₀‖⁻¹ • (F x a - F x₀ a - ↑(F' a) (x - x₀)) ∂μ‖\nx : H\nhx : x ∈ ball x₀ ε\na : α\nha_bound : ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\n⊢ 0 ≤ ‖F' a‖\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h_bound.intro.h₂.hc\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ (x : H), x ∈ ball x₀ ε → AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀\nx₀_in : x₀ ∈ ball x₀ ε\nnneg : ∀ (x : H), 0 ≤ ‖x - x₀‖⁻¹\nb : α → ℝ := fun a => |bound a|\nb_int : Integrable b\nb_nonneg : ∀ (a : α), 0 ≤ b a\nh_lipsch : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\nhF_int' : ∀ (x : H), x ∈ ball x₀ ε → Integrable (F x)\nhF'_int : Integrable F'\nh_ball : ball x₀ ε ∈ 𝓝 x₀\nthis :\n  ∀ᶠ (x : H) in 𝓝 x₀,\n    ‖x - x₀‖⁻¹ * ‖∫ (a : α), F x a ∂μ - ∫ (a : α), F x₀ a ∂μ - ↑(∫ (a : α), F' a ∂μ) (x - x₀)‖ =\n      ‖∫ (a : α), ‖x - x₀‖⁻¹ • (F x a - F x₀ a - ↑(F' a) (x - x₀)) ∂μ‖\nx : H\nhx : x ∈ ball x₀ ε\na : α\nha_bound : ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\n⊢ 0 ≤ ‖F' a‖\n[PROOFSTEP]\npositivity\n[GOAL]\ncase h_bound.intro.h₂.h\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ (x : H), x ∈ ball x₀ ε → AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀\nx₀_in : x₀ ∈ ball x₀ ε\nnneg : ∀ (x : H), 0 ≤ ‖x - x₀‖⁻¹\nb : α → ℝ := fun a => |bound a|\nb_int : Integrable b\nb_nonneg : ∀ (a : α), 0 ≤ b a\nh_lipsch : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\nhF_int' : ∀ (x : H), x ∈ ball x₀ ε → Integrable (F x)\nhF'_int : Integrable F'\nh_ball : ball x₀ ε ∈ 𝓝 x₀\nthis :\n  ∀ᶠ (x : H) in 𝓝 x₀,\n    ‖x - x₀‖⁻¹ * ‖∫ (a : α), F x a ∂μ - ∫ (a : α), F x₀ a ∂μ - ↑(∫ (a : α), F' a ∂μ) (x - x₀)‖ =\n      ‖∫ (a : α), ‖x - x₀‖⁻¹ • (F x a - F x₀ a - ↑(F' a) (x - x₀)) ∂μ‖\nx : H\nhx : x ∈ ball x₀ ε\na : α\nha_bound : ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\n⊢ ‖F' a‖ * ‖x - x₀‖ ≤ ‖F' a‖ * ‖x - x₀‖\n[PROOFSTEP]\nfirst\n| rfl\n| positivity\n[GOAL]\ncase h_bound.intro.h₂.h\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ (x : H), x ∈ ball x₀ ε → AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀\nx₀_in : x₀ ∈ ball x₀ ε\nnneg : ∀ (x : H), 0 ≤ ‖x - x₀‖⁻¹\nb : α → ℝ := fun a => |bound a|\nb_int : Integrable b\nb_nonneg : ∀ (a : α), 0 ≤ b a\nh_lipsch : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\nhF_int' : ∀ (x : H), x ∈ ball x₀ ε → Integrable (F x)\nhF'_int : Integrable F'\nh_ball : ball x₀ ε ∈ 𝓝 x₀\nthis :\n  ∀ᶠ (x : H) in 𝓝 x₀,\n    ‖x - x₀‖⁻¹ * ‖∫ (a : α), F x a ∂μ - ∫ (a : α), F x₀ a ∂μ - ↑(∫ (a : α), F' a ∂μ) (x - x₀)‖ =\n      ‖∫ (a : α), ‖x - x₀‖⁻¹ • (F x a - F x₀ a - ↑(F' a) (x - x₀)) ∂μ‖\nx : H\nhx : x ∈ ball x₀ ε\na : α\nha_bound : ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\n⊢ ‖F' a‖ * ‖x - x₀‖ ≤ ‖F' a‖ * ‖x - x₀‖\n[PROOFSTEP]\nrfl\n[GOAL]\ncase bound_integrable\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ (x : H), x ∈ ball x₀ ε → AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀\nx₀_in : x₀ ∈ ball x₀ ε\nnneg : ∀ (x : H), 0 ≤ ‖x - x₀‖⁻¹\nb : α → ℝ := fun a => |bound a|\nb_int : Integrable b\nb_nonneg : ∀ (a : α), 0 ≤ b a\nh_lipsch : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\nhF_int' : ∀ (x : H), x ∈ ball x₀ ε → Integrable (F x)\nhF'_int : Integrable F'\nh_ball : ball x₀ ε ∈ 𝓝 x₀\nthis :\n  ∀ᶠ (x : H) in 𝓝 x₀,\n    ‖x - x₀‖⁻¹ * ‖∫ (a : α), F x a ∂μ - ∫ (a : α), F x₀ a ∂μ - ↑(∫ (a : α), F' a ∂μ) (x - x₀)‖ =\n      ‖∫ (a : α), ‖x - x₀‖⁻¹ • (F x a - F x₀ a - ↑(F' a) (x - x₀)) ∂μ‖\n⊢ Integrable fun a => b a + ‖F' a‖\n[PROOFSTEP]\nexact b_int.add hF'_int.norm\n[GOAL]\ncase h_lim\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ (x : H), x ∈ ball x₀ ε → AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀\nx₀_in : x₀ ∈ ball x₀ ε\nnneg : ∀ (x : H), 0 ≤ ‖x - x₀‖⁻¹\nb : α → ℝ := fun a => |bound a|\nb_int : Integrable b\nb_nonneg : ∀ (a : α), 0 ≤ b a\nh_lipsch : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\nhF_int' : ∀ (x : H), x ∈ ball x₀ ε → Integrable (F x)\nhF'_int : Integrable F'\nh_ball : ball x₀ ε ∈ 𝓝 x₀\nthis :\n  ∀ᶠ (x : H) in 𝓝 x₀,\n    ‖x - x₀‖⁻¹ * ‖∫ (a : α), F x a ∂μ - ∫ (a : α), F x₀ a ∂μ - ↑(∫ (a : α), F' a ∂μ) (x - x₀)‖ =\n      ‖∫ (a : α), ‖x - x₀‖⁻¹ • (F x a - F x₀ a - ↑(F' a) (x - x₀)) ∂μ‖\n⊢ ∀ᵐ (a : α) ∂μ,\n    Tendsto (fun n => ‖n - x₀‖⁻¹ • (F n a - F x₀ a - ↑(F' a) (n - x₀))) (𝓝 x₀)\n      (𝓝 (‖x₀ - x₀‖⁻¹ • (F x₀ a - F x₀ a - ↑(F' a) (x₀ - x₀))))\n[PROOFSTEP]\napply h_diff.mono\n[GOAL]\ncase h_lim\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ (x : H), x ∈ ball x₀ ε → AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀\nx₀_in : x₀ ∈ ball x₀ ε\nnneg : ∀ (x : H), 0 ≤ ‖x - x₀‖⁻¹\nb : α → ℝ := fun a => |bound a|\nb_int : Integrable b\nb_nonneg : ∀ (a : α), 0 ≤ b a\nh_lipsch : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\nhF_int' : ∀ (x : H), x ∈ ball x₀ ε → Integrable (F x)\nhF'_int : Integrable F'\nh_ball : ball x₀ ε ∈ 𝓝 x₀\nthis :\n  ∀ᶠ (x : H) in 𝓝 x₀,\n    ‖x - x₀‖⁻¹ * ‖∫ (a : α), F x a ∂μ - ∫ (a : α), F x₀ a ∂μ - ↑(∫ (a : α), F' a ∂μ) (x - x₀)‖ =\n      ‖∫ (a : α), ‖x - x₀‖⁻¹ • (F x a - F x₀ a - ↑(F' a) (x - x₀)) ∂μ‖\n⊢ ∀ (x : α),\n    HasFDerivAt (fun x_1 => F x_1 x) (F' x) x₀ →\n      Tendsto (fun n => ‖n - x₀‖⁻¹ • (F n x - F x₀ x - ↑(F' x) (n - x₀))) (𝓝 x₀)\n        (𝓝 (‖x₀ - x₀‖⁻¹ • (F x₀ x - F x₀ x - ↑(F' x) (x₀ - x₀))))\n[PROOFSTEP]\nintro a ha\n[GOAL]\ncase h_lim\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ (x : H), x ∈ ball x₀ ε → AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀\nx₀_in : x₀ ∈ ball x₀ ε\nnneg : ∀ (x : H), 0 ≤ ‖x - x₀‖⁻¹\nb : α → ℝ := fun a => |bound a|\nb_int : Integrable b\nb_nonneg : ∀ (a : α), 0 ≤ b a\nh_lipsch : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\nhF_int' : ∀ (x : H), x ∈ ball x₀ ε → Integrable (F x)\nhF'_int : Integrable F'\nh_ball : ball x₀ ε ∈ 𝓝 x₀\nthis :\n  ∀ᶠ (x : H) in 𝓝 x₀,\n    ‖x - x₀‖⁻¹ * ‖∫ (a : α), F x a ∂μ - ∫ (a : α), F x₀ a ∂μ - ↑(∫ (a : α), F' a ∂μ) (x - x₀)‖ =\n      ‖∫ (a : α), ‖x - x₀‖⁻¹ • (F x a - F x₀ a - ↑(F' a) (x - x₀)) ∂μ‖\na : α\nha : HasFDerivAt (fun x => F x a) (F' a) x₀\n⊢ Tendsto (fun n => ‖n - x₀‖⁻¹ • (F n a - F x₀ a - ↑(F' a) (n - x₀))) (𝓝 x₀)\n    (𝓝 (‖x₀ - x₀‖⁻¹ • (F x₀ a - F x₀ a - ↑(F' a) (x₀ - x₀))))\n[PROOFSTEP]\nsuffices Tendsto (fun x => ‖x - x₀‖⁻¹ • (F x a - F x₀ a - F' a (x - x₀))) (𝓝 x₀) (𝓝 0) by simpa\n[GOAL]\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ (x : H), x ∈ ball x₀ ε → AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀\nx₀_in : x₀ ∈ ball x₀ ε\nnneg : ∀ (x : H), 0 ≤ ‖x - x₀‖⁻¹\nb : α → ℝ := fun a => |bound a|\nb_int : Integrable b\nb_nonneg : ∀ (a : α), 0 ≤ b a\nh_lipsch : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\nhF_int' : ∀ (x : H), x ∈ ball x₀ ε → Integrable (F x)\nhF'_int : Integrable F'\nh_ball : ball x₀ ε ∈ 𝓝 x₀\nthis✝ :\n  ∀ᶠ (x : H) in 𝓝 x₀,\n    ‖x - x₀‖⁻¹ * ‖∫ (a : α), F x a ∂μ - ∫ (a : α), F x₀ a ∂μ - ↑(∫ (a : α), F' a ∂μ) (x - x₀)‖ =\n      ‖∫ (a : α), ‖x - x₀‖⁻¹ • (F x a - F x₀ a - ↑(F' a) (x - x₀)) ∂μ‖\na : α\nha : HasFDerivAt (fun x => F x a) (F' a) x₀\nthis : Tendsto (fun x => ‖x - x₀‖⁻¹ • (F x a - F x₀ a - ↑(F' a) (x - x₀))) (𝓝 x₀) (𝓝 0)\n⊢ Tendsto (fun n => ‖n - x₀‖⁻¹ • (F n a - F x₀ a - ↑(F' a) (n - x₀))) (𝓝 x₀)\n    (𝓝 (‖x₀ - x₀‖⁻¹ • (F x₀ a - F x₀ a - ↑(F' a) (x₀ - x₀))))\n[PROOFSTEP]\nsimpa\n[GOAL]\ncase h_lim\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ (x : H), x ∈ ball x₀ ε → AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀\nx₀_in : x₀ ∈ ball x₀ ε\nnneg : ∀ (x : H), 0 ≤ ‖x - x₀‖⁻¹\nb : α → ℝ := fun a => |bound a|\nb_int : Integrable b\nb_nonneg : ∀ (a : α), 0 ≤ b a\nh_lipsch : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\nhF_int' : ∀ (x : H), x ∈ ball x₀ ε → Integrable (F x)\nhF'_int : Integrable F'\nh_ball : ball x₀ ε ∈ 𝓝 x₀\nthis :\n  ∀ᶠ (x : H) in 𝓝 x₀,\n    ‖x - x₀‖⁻¹ * ‖∫ (a : α), F x a ∂μ - ∫ (a : α), F x₀ a ∂μ - ↑(∫ (a : α), F' a ∂μ) (x - x₀)‖ =\n      ‖∫ (a : α), ‖x - x₀‖⁻¹ • (F x a - F x₀ a - ↑(F' a) (x - x₀)) ∂μ‖\na : α\nha : HasFDerivAt (fun x => F x a) (F' a) x₀\n⊢ Tendsto (fun x => ‖x - x₀‖⁻¹ • (F x a - F x₀ a - ↑(F' a) (x - x₀))) (𝓝 x₀) (𝓝 0)\n[PROOFSTEP]\nrw [tendsto_zero_iff_norm_tendsto_zero]\n[GOAL]\ncase h_lim\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ (x : H), x ∈ ball x₀ ε → AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀\nx₀_in : x₀ ∈ ball x₀ ε\nnneg : ∀ (x : H), 0 ≤ ‖x - x₀‖⁻¹\nb : α → ℝ := fun a => |bound a|\nb_int : Integrable b\nb_nonneg : ∀ (a : α), 0 ≤ b a\nh_lipsch : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\nhF_int' : ∀ (x : H), x ∈ ball x₀ ε → Integrable (F x)\nhF'_int : Integrable F'\nh_ball : ball x₀ ε ∈ 𝓝 x₀\nthis :\n  ∀ᶠ (x : H) in 𝓝 x₀,\n    ‖x - x₀‖⁻¹ * ‖∫ (a : α), F x a ∂μ - ∫ (a : α), F x₀ a ∂μ - ↑(∫ (a : α), F' a ∂μ) (x - x₀)‖ =\n      ‖∫ (a : α), ‖x - x₀‖⁻¹ • (F x a - F x₀ a - ↑(F' a) (x - x₀)) ∂μ‖\na : α\nha : HasFDerivAt (fun x => F x a) (F' a) x₀\n⊢ Tendsto (fun e => ‖‖e - x₀‖⁻¹ • (F e a - F x₀ a - ↑(F' a) (e - x₀))‖) (𝓝 x₀) (𝓝 0)\n[PROOFSTEP]\nhave :\n  (fun x => ‖x - x₀‖⁻¹ * ‖F x a - F x₀ a - F' a (x - x₀)‖) = fun x => ‖‖x - x₀‖⁻¹ • (F x a - F x₀ a - F' a (x - x₀))‖ :=\n  by\n  ext x\n  rw [norm_smul_of_nonneg (nneg _)]\n[GOAL]\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ (x : H), x ∈ ball x₀ ε → AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀\nx₀_in : x₀ ∈ ball x₀ ε\nnneg : ∀ (x : H), 0 ≤ ‖x - x₀‖⁻¹\nb : α → ℝ := fun a => |bound a|\nb_int : Integrable b\nb_nonneg : ∀ (a : α), 0 ≤ b a\nh_lipsch : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\nhF_int' : ∀ (x : H), x ∈ ball x₀ ε → Integrable (F x)\nhF'_int : Integrable F'\nh_ball : ball x₀ ε ∈ 𝓝 x₀\nthis :\n  ∀ᶠ (x : H) in 𝓝 x₀,\n    ‖x - x₀‖⁻¹ * ‖∫ (a : α), F x a ∂μ - ∫ (a : α), F x₀ a ∂μ - ↑(∫ (a : α), F' a ∂μ) (x - x₀)‖ =\n      ‖∫ (a : α), ‖x - x₀‖⁻¹ • (F x a - F x₀ a - ↑(F' a) (x - x₀)) ∂μ‖\na : α\nha : HasFDerivAt (fun x => F x a) (F' a) x₀\n⊢ (fun x => ‖x - x₀‖⁻¹ * ‖F x a - F x₀ a - ↑(F' a) (x - x₀)‖) = fun x =>\n    ‖‖x - x₀‖⁻¹ • (F x a - F x₀ a - ↑(F' a) (x - x₀))‖\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ (x : H), x ∈ ball x₀ ε → AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀\nx₀_in : x₀ ∈ ball x₀ ε\nnneg : ∀ (x : H), 0 ≤ ‖x - x₀‖⁻¹\nb : α → ℝ := fun a => |bound a|\nb_int : Integrable b\nb_nonneg : ∀ (a : α), 0 ≤ b a\nh_lipsch : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\nhF_int' : ∀ (x : H), x ∈ ball x₀ ε → Integrable (F x)\nhF'_int : Integrable F'\nh_ball : ball x₀ ε ∈ 𝓝 x₀\nthis :\n  ∀ᶠ (x : H) in 𝓝 x₀,\n    ‖x - x₀‖⁻¹ * ‖∫ (a : α), F x a ∂μ - ∫ (a : α), F x₀ a ∂μ - ↑(∫ (a : α), F' a ∂μ) (x - x₀)‖ =\n      ‖∫ (a : α), ‖x - x₀‖⁻¹ • (F x a - F x₀ a - ↑(F' a) (x - x₀)) ∂μ‖\na : α\nha : HasFDerivAt (fun x => F x a) (F' a) x₀\nx : H\n⊢ ‖x - x₀‖⁻¹ * ‖F x a - F x₀ a - ↑(F' a) (x - x₀)‖ = ‖‖x - x₀‖⁻¹ • (F x a - F x₀ a - ↑(F' a) (x - x₀))‖\n[PROOFSTEP]\nrw [norm_smul_of_nonneg (nneg _)]\n[GOAL]\ncase h_lim\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ (x : H), x ∈ ball x₀ ε → AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀\nx₀_in : x₀ ∈ ball x₀ ε\nnneg : ∀ (x : H), 0 ≤ ‖x - x₀‖⁻¹\nb : α → ℝ := fun a => |bound a|\nb_int : Integrable b\nb_nonneg : ∀ (a : α), 0 ≤ b a\nh_lipsch : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → ‖F x a - F x₀ a‖ ≤ b a * ‖x - x₀‖\nhF_int' : ∀ (x : H), x ∈ ball x₀ ε → Integrable (F x)\nhF'_int : Integrable F'\nh_ball : ball x₀ ε ∈ 𝓝 x₀\nthis✝ :\n  ∀ᶠ (x : H) in 𝓝 x₀,\n    ‖x - x₀‖⁻¹ * ‖∫ (a : α), F x a ∂μ - ∫ (a : α), F x₀ a ∂μ - ↑(∫ (a : α), F' a ∂μ) (x - x₀)‖ =\n      ‖∫ (a : α), ‖x - x₀‖⁻¹ • (F x a - F x₀ a - ↑(F' a) (x - x₀)) ∂μ‖\na : α\nha : HasFDerivAt (fun x => F x a) (F' a) x₀\nthis :\n  (fun x => ‖x - x₀‖⁻¹ * ‖F x a - F x₀ a - ↑(F' a) (x - x₀)‖) = fun x =>\n    ‖‖x - x₀‖⁻¹ • (F x a - F x₀ a - ↑(F' a) (x - x₀))‖\n⊢ Tendsto (fun e => ‖‖e - x₀‖⁻¹ • (F e a - F x₀ a - ↑(F' a) (e - x₀))‖) (𝓝 x₀) (𝓝 0)\n[PROOFSTEP]\nrwa [hasFDerivAt_iff_tendsto, this] at ha \n[GOAL]\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ᶠ (x : H) in 𝓝 x₀, AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nh_lip : ∀ᵐ (a : α) ∂μ, LipschitzOnWith (↑Real.nnabs (bound a)) (fun x => F x a) (ball x₀ ε)\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀\n⊢ Integrable F' ∧ HasFDerivAt (fun x => ∫ (a : α), F x a ∂μ) (∫ (a : α), F' a ∂μ) x₀\n[PROOFSTEP]\nobtain ⟨δ, δ_pos, hδ⟩ : ∃ δ > 0, ∀ x ∈ ball x₀ δ, AEStronglyMeasurable (F x) μ ∧ x ∈ ball x₀ ε\n[GOAL]\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ᶠ (x : H) in 𝓝 x₀, AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nh_lip : ∀ᵐ (a : α) ∂μ, LipschitzOnWith (↑Real.nnabs (bound a)) (fun x => F x a) (ball x₀ ε)\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀\n⊢ ∃ δ, δ > 0 ∧ ∀ (x : H), x ∈ ball x₀ δ → AEStronglyMeasurable (F x) μ ∧ x ∈ ball x₀ ε\ncase intro.intro\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ᶠ (x : H) in 𝓝 x₀, AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nh_lip : ∀ᵐ (a : α) ∂μ, LipschitzOnWith (↑Real.nnabs (bound a)) (fun x => F x a) (ball x₀ ε)\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀\nδ : ℝ\nδ_pos : δ > 0\nhδ : ∀ (x : H), x ∈ ball x₀ δ → AEStronglyMeasurable (F x) μ ∧ x ∈ ball x₀ ε\n⊢ Integrable F' ∧ HasFDerivAt (fun x => ∫ (a : α), F x a ∂μ) (∫ (a : α), F' a ∂μ) x₀\n[PROOFSTEP]\nexact eventually_nhds_iff_ball.mp (hF_meas.and (ball_mem_nhds x₀ ε_pos))\n[GOAL]\ncase intro.intro\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ᶠ (x : H) in 𝓝 x₀, AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nh_lip : ∀ᵐ (a : α) ∂μ, LipschitzOnWith (↑Real.nnabs (bound a)) (fun x => F x a) (ball x₀ ε)\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀\nδ : ℝ\nδ_pos : δ > 0\nhδ : ∀ (x : H), x ∈ ball x₀ δ → AEStronglyMeasurable (F x) μ ∧ x ∈ ball x₀ ε\n⊢ Integrable F' ∧ HasFDerivAt (fun x => ∫ (a : α), F x a ∂μ) (∫ (a : α), F' a ∂μ) x₀\n[PROOFSTEP]\nchoose hδ_meas hδε using hδ\n[GOAL]\ncase intro.intro\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ᶠ (x : H) in 𝓝 x₀, AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nh_lip : ∀ᵐ (a : α) ∂μ, LipschitzOnWith (↑Real.nnabs (bound a)) (fun x => F x a) (ball x₀ ε)\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀\nδ : ℝ\nδ_pos : δ > 0\nhδ_meas : ∀ (x : H), x ∈ ball x₀ δ → AEStronglyMeasurable (F x) μ\nhδε : ∀ (x : H), x ∈ ball x₀ δ → x ∈ ball x₀ ε\n⊢ Integrable F' ∧ HasFDerivAt (fun x => ∫ (a : α), F x a ∂μ) (∫ (a : α), F' a ∂μ) x₀\n[PROOFSTEP]\nreplace h_lip : ∀ᵐ a : α ∂μ, ∀ x ∈ ball x₀ δ, ‖F x a - F x₀ a‖ ≤ |bound a| * ‖x - x₀‖\n[GOAL]\ncase h_lip\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ᶠ (x : H) in 𝓝 x₀, AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nh_lip : ∀ᵐ (a : α) ∂μ, LipschitzOnWith (↑Real.nnabs (bound a)) (fun x => F x a) (ball x₀ ε)\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀\nδ : ℝ\nδ_pos : δ > 0\nhδ_meas : ∀ (x : H), x ∈ ball x₀ δ → AEStronglyMeasurable (F x) μ\nhδε : ∀ (x : H), x ∈ ball x₀ δ → x ∈ ball x₀ ε\n⊢ ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ δ → ‖F x a - F x₀ a‖ ≤ |bound a| * ‖x - x₀‖\ncase intro.intro\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ᶠ (x : H) in 𝓝 x₀, AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀\nδ : ℝ\nδ_pos : δ > 0\nhδ_meas : ∀ (x : H), x ∈ ball x₀ δ → AEStronglyMeasurable (F x) μ\nhδε : ∀ (x : H), x ∈ ball x₀ δ → x ∈ ball x₀ ε\nh_lip : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ δ → ‖F x a - F x₀ a‖ ≤ |bound a| * ‖x - x₀‖\n⊢ Integrable F' ∧ HasFDerivAt (fun x => ∫ (a : α), F x a ∂μ) (∫ (a : α), F' a ∂μ) x₀\n[PROOFSTEP]\nexact h_lip.mono fun a lip x hx => lip.norm_sub_le (hδε x hx) (mem_ball_self ε_pos)\n[GOAL]\ncase intro.intro\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ᶠ (x : H) in 𝓝 x₀, AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀\nδ : ℝ\nδ_pos : δ > 0\nhδ_meas : ∀ (x : H), x ∈ ball x₀ δ → AEStronglyMeasurable (F x) μ\nhδε : ∀ (x : H), x ∈ ball x₀ δ → x ∈ ball x₀ ε\nh_lip : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ δ → ‖F x a - F x₀ a‖ ≤ |bound a| * ‖x - x₀‖\n⊢ Integrable F' ∧ HasFDerivAt (fun x => ∫ (a : α), F x a ∂μ) (∫ (a : α), F' a ∂μ) x₀\n[PROOFSTEP]\nreplace bound_integrable := bound_integrable.norm\n[GOAL]\ncase intro.intro\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ᶠ (x : H) in 𝓝 x₀, AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀\nδ : ℝ\nδ_pos : δ > 0\nhδ_meas : ∀ (x : H), x ∈ ball x₀ δ → AEStronglyMeasurable (F x) μ\nhδε : ∀ (x : H), x ∈ ball x₀ δ → x ∈ ball x₀ ε\nh_lip : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ δ → ‖F x a - F x₀ a‖ ≤ |bound a| * ‖x - x₀‖\nbound_integrable : Integrable fun a => ‖bound a‖\n⊢ Integrable F' ∧ HasFDerivAt (fun x => ∫ (a : α), F x a ∂μ) (∫ (a : α), F' a ∂μ) x₀\n[PROOFSTEP]\napply hasFDerivAt_integral_of_dominated_loc_of_lip' δ_pos\n[GOAL]\ncase intro.intro.hF_meas\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ᶠ (x : H) in 𝓝 x₀, AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀\nδ : ℝ\nδ_pos : δ > 0\nhδ_meas : ∀ (x : H), x ∈ ball x₀ δ → AEStronglyMeasurable (F x) μ\nhδε : ∀ (x : H), x ∈ ball x₀ δ → x ∈ ball x₀ ε\nh_lip : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ δ → ‖F x a - F x₀ a‖ ≤ |bound a| * ‖x - x₀‖\nbound_integrable : Integrable fun a => ‖bound a‖\n⊢ ∀ (x : H), x ∈ ball x₀ δ → AEStronglyMeasurable (fun a => F x a) μ\n[PROOFSTEP]\nassumption\n[GOAL]\ncase intro.intro.hF_int\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ᶠ (x : H) in 𝓝 x₀, AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀\nδ : ℝ\nδ_pos : δ > 0\nhδ_meas : ∀ (x : H), x ∈ ball x₀ δ → AEStronglyMeasurable (F x) μ\nhδε : ∀ (x : H), x ∈ ball x₀ δ → x ∈ ball x₀ ε\nh_lip : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ δ → ‖F x a - F x₀ a‖ ≤ |bound a| * ‖x - x₀‖\nbound_integrable : Integrable fun a => ‖bound a‖\n⊢ Integrable fun a => F x₀ a\n[PROOFSTEP]\nassumption\n[GOAL]\ncase intro.intro.hF'_meas\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ᶠ (x : H) in 𝓝 x₀, AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀\nδ : ℝ\nδ_pos : δ > 0\nhδ_meas : ∀ (x : H), x ∈ ball x₀ δ → AEStronglyMeasurable (F x) μ\nhδε : ∀ (x : H), x ∈ ball x₀ δ → x ∈ ball x₀ ε\nh_lip : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ δ → ‖F x a - F x₀ a‖ ≤ |bound a| * ‖x - x₀‖\nbound_integrable : Integrable fun a => ‖bound a‖\n⊢ AEStronglyMeasurable F' μ\n[PROOFSTEP]\nassumption\n[GOAL]\ncase intro.intro.h_lipsch\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ᶠ (x : H) in 𝓝 x₀, AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀\nδ : ℝ\nδ_pos : δ > 0\nhδ_meas : ∀ (x : H), x ∈ ball x₀ δ → AEStronglyMeasurable (F x) μ\nhδε : ∀ (x : H), x ∈ ball x₀ δ → x ∈ ball x₀ ε\nh_lip : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ δ → ‖F x a - F x₀ a‖ ≤ |bound a| * ‖x - x₀‖\nbound_integrable : Integrable fun a => ‖bound a‖\n⊢ ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ δ → ‖F x a - F x₀ a‖ ≤ ?m.181944 a * ‖x - x₀‖\n[PROOFSTEP]\nassumption\n[GOAL]\ncase intro.intro.bound_integrable\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ᶠ (x : H) in 𝓝 x₀, AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀\nδ : ℝ\nδ_pos : δ > 0\nhδ_meas : ∀ (x : H), x ∈ ball x₀ δ → AEStronglyMeasurable (F x) μ\nhδε : ∀ (x : H), x ∈ ball x₀ δ → x ∈ ball x₀ ε\nh_lip : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ δ → ‖F x a - F x₀ a‖ ≤ |bound a| * ‖x - x₀‖\nbound_integrable : Integrable fun a => ‖bound a‖\n⊢ Integrable fun a => |bound a|\n[PROOFSTEP]\nassumption\n[GOAL]\ncase intro.intro.h_diff\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ᶠ (x : H) in 𝓝 x₀, AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀\nδ : ℝ\nδ_pos : δ > 0\nhδ_meas : ∀ (x : H), x ∈ ball x₀ δ → AEStronglyMeasurable (F x) μ\nhδε : ∀ (x : H), x ∈ ball x₀ δ → x ∈ ball x₀ ε\nh_lip : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ δ → ‖F x a - F x₀ a‖ ≤ |bound a| * ‖x - x₀‖\nbound_integrable : Integrable fun a => ‖bound a‖\n⊢ ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' a) x₀\n[PROOFSTEP]\nassumption\n[GOAL]\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : H → α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ᶠ (x : H) in 𝓝 x₀, AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable (F' x₀) μ\nh_bound : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → ‖F' x a‖ ≤ bound a\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → HasFDerivAt (fun x => F x a) (F' x a) x\n⊢ HasFDerivAt (fun x => ∫ (a : α), F x a ∂μ) (∫ (a : α), F' x₀ a ∂μ) x₀\n[PROOFSTEP]\nletI : NormedSpace ℝ H := NormedSpace.restrictScalars ℝ 𝕜 H\n[GOAL]\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : H → α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ᶠ (x : H) in 𝓝 x₀, AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable (F' x₀) μ\nh_bound : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → ‖F' x a‖ ≤ bound a\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → HasFDerivAt (fun x => F x a) (F' x a) x\nthis : NormedSpace ℝ H := NormedSpace.restrictScalars ℝ 𝕜 H\n⊢ HasFDerivAt (fun x => ∫ (a : α), F x a ∂μ) (∫ (a : α), F' x₀ a ∂μ) x₀\n[PROOFSTEP]\nhave x₀_in : x₀ ∈ ball x₀ ε := mem_ball_self ε_pos\n[GOAL]\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : H → α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ᶠ (x : H) in 𝓝 x₀, AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable (F' x₀) μ\nh_bound : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → ‖F' x a‖ ≤ bound a\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → HasFDerivAt (fun x => F x a) (F' x a) x\nthis : NormedSpace ℝ H := NormedSpace.restrictScalars ℝ 𝕜 H\nx₀_in : x₀ ∈ ball x₀ ε\n⊢ HasFDerivAt (fun x => ∫ (a : α), F x a ∂μ) (∫ (a : α), F' x₀ a ∂μ) x₀\n[PROOFSTEP]\nhave diff_x₀ : ∀ᵐ a ∂μ, HasFDerivAt (fun x => F x a) (F' x₀ a) x₀ := h_diff.mono fun a ha => ha x₀ x₀_in\n[GOAL]\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : H → α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ᶠ (x : H) in 𝓝 x₀, AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable (F' x₀) μ\nh_bound : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → ‖F' x a‖ ≤ bound a\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → HasFDerivAt (fun x => F x a) (F' x a) x\nthis : NormedSpace ℝ H := NormedSpace.restrictScalars ℝ 𝕜 H\nx₀_in : x₀ ∈ ball x₀ ε\ndiff_x₀ : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' x₀ a) x₀\n⊢ HasFDerivAt (fun x => ∫ (a : α), F x a ∂μ) (∫ (a : α), F' x₀ a ∂μ) x₀\n[PROOFSTEP]\nhave : ∀ᵐ a ∂μ, LipschitzOnWith (Real.nnabs (bound a)) (fun x => F x a) (ball x₀ ε) :=\n  by\n  apply (h_diff.and h_bound).mono\n  rintro a ⟨ha_deriv, ha_bound⟩\n  refine'\n    (convex_ball _ _).lipschitzOnWith_of_nnnorm_hasFDerivWithin_le (fun x x_in => (ha_deriv x x_in).hasFDerivWithinAt)\n      fun x x_in => _\n  rw [← NNReal.coe_le_coe, coe_nnnorm, Real.coe_nnabs]\n  exact (ha_bound x x_in).trans (le_abs_self _)\n[GOAL]\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : H → α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ᶠ (x : H) in 𝓝 x₀, AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable (F' x₀) μ\nh_bound : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → ‖F' x a‖ ≤ bound a\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → HasFDerivAt (fun x => F x a) (F' x a) x\nthis : NormedSpace ℝ H := NormedSpace.restrictScalars ℝ 𝕜 H\nx₀_in : x₀ ∈ ball x₀ ε\ndiff_x₀ : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' x₀ a) x₀\n⊢ ∀ᵐ (a : α) ∂μ, LipschitzOnWith (↑Real.nnabs (bound a)) (fun x => F x a) (ball x₀ ε)\n[PROOFSTEP]\napply (h_diff.and h_bound).mono\n[GOAL]\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : H → α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ᶠ (x : H) in 𝓝 x₀, AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable (F' x₀) μ\nh_bound : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → ‖F' x a‖ ≤ bound a\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → HasFDerivAt (fun x => F x a) (F' x a) x\nthis : NormedSpace ℝ H := NormedSpace.restrictScalars ℝ 𝕜 H\nx₀_in : x₀ ∈ ball x₀ ε\ndiff_x₀ : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' x₀ a) x₀\n⊢ ∀ (x : α),\n    ((∀ (x_1 : H), x_1 ∈ ball x₀ ε → HasFDerivAt (fun x_2 => F x_2 x) (F' x_1 x) x_1) ∧\n        ∀ (x_1 : H), x_1 ∈ ball x₀ ε → ‖F' x_1 x‖ ≤ bound x) →\n      LipschitzOnWith (↑Real.nnabs (bound x)) (fun x_1 => F x_1 x) (ball x₀ ε)\n[PROOFSTEP]\nrintro a ⟨ha_deriv, ha_bound⟩\n[GOAL]\ncase intro\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : H → α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ᶠ (x : H) in 𝓝 x₀, AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable (F' x₀) μ\nh_bound : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → ‖F' x a‖ ≤ bound a\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → HasFDerivAt (fun x => F x a) (F' x a) x\nthis : NormedSpace ℝ H := NormedSpace.restrictScalars ℝ 𝕜 H\nx₀_in : x₀ ∈ ball x₀ ε\ndiff_x₀ : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' x₀ a) x₀\na : α\nha_deriv : ∀ (x : H), x ∈ ball x₀ ε → HasFDerivAt (fun x => F x a) (F' x a) x\nha_bound : ∀ (x : H), x ∈ ball x₀ ε → ‖F' x a‖ ≤ bound a\n⊢ LipschitzOnWith (↑Real.nnabs (bound a)) (fun x => F x a) (ball x₀ ε)\n[PROOFSTEP]\nrefine'\n  (convex_ball _ _).lipschitzOnWith_of_nnnorm_hasFDerivWithin_le (fun x x_in => (ha_deriv x x_in).hasFDerivWithinAt)\n    fun x x_in => _\n[GOAL]\ncase intro\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : H → α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ᶠ (x : H) in 𝓝 x₀, AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable (F' x₀) μ\nh_bound : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → ‖F' x a‖ ≤ bound a\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → HasFDerivAt (fun x => F x a) (F' x a) x\nthis : NormedSpace ℝ H := NormedSpace.restrictScalars ℝ 𝕜 H\nx₀_in : x₀ ∈ ball x₀ ε\ndiff_x₀ : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' x₀ a) x₀\na : α\nha_deriv : ∀ (x : H), x ∈ ball x₀ ε → HasFDerivAt (fun x => F x a) (F' x a) x\nha_bound : ∀ (x : H), x ∈ ball x₀ ε → ‖F' x a‖ ≤ bound a\nx : H\nx_in : x ∈ ball x₀ ε\n⊢ ‖F' x a‖₊ ≤ ↑Real.nnabs (bound a)\n[PROOFSTEP]\nrw [← NNReal.coe_le_coe, coe_nnnorm, Real.coe_nnabs]\n[GOAL]\ncase intro\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : H → α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ᶠ (x : H) in 𝓝 x₀, AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable (F' x₀) μ\nh_bound : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → ‖F' x a‖ ≤ bound a\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → HasFDerivAt (fun x => F x a) (F' x a) x\nthis : NormedSpace ℝ H := NormedSpace.restrictScalars ℝ 𝕜 H\nx₀_in : x₀ ∈ ball x₀ ε\ndiff_x₀ : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' x₀ a) x₀\na : α\nha_deriv : ∀ (x : H), x ∈ ball x₀ ε → HasFDerivAt (fun x => F x a) (F' x a) x\nha_bound : ∀ (x : H), x ∈ ball x₀ ε → ‖F' x a‖ ≤ bound a\nx : H\nx_in : x ∈ ball x₀ ε\n⊢ ‖F' x a‖ ≤ |bound a|\n[PROOFSTEP]\nexact (ha_bound x x_in).trans (le_abs_self _)\n[GOAL]\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : H → α → E\nF' : H → α → H →L[𝕜] E\nx₀ : H\nbound : α → ℝ\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ᶠ (x : H) in 𝓝 x₀, AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable (F' x₀) μ\nh_bound : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → ‖F' x a‖ ≤ bound a\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, ∀ (x : H), x ∈ ball x₀ ε → HasFDerivAt (fun x => F x a) (F' x a) x\nthis✝ : NormedSpace ℝ H := NormedSpace.restrictScalars ℝ 𝕜 H\nx₀_in : x₀ ∈ ball x₀ ε\ndiff_x₀ : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (F' x₀ a) x₀\nthis : ∀ᵐ (a : α) ∂μ, LipschitzOnWith (↑Real.nnabs (bound a)) (fun x => F x a) (ball x₀ ε)\n⊢ HasFDerivAt (fun x => ∫ (a : α), F x a ∂μ) (∫ (a : α), F' x₀ a ∂μ) x₀\n[PROOFSTEP]\nexact (hasFDerivAt_integral_of_dominated_loc_of_lip ε_pos hF_meas hF_int hF'_meas this bound_integrable diff_x₀).2\n[GOAL]\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : 𝕜 → α → E\nF' : α → E\nx₀ : 𝕜\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ᶠ (x : 𝕜) in 𝓝 x₀, AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nbound : α → ℝ\nh_lipsch : ∀ᵐ (a : α) ∂μ, LipschitzOnWith (↑Real.nnabs (bound a)) (fun x => F x a) (ball x₀ ε)\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, HasDerivAt (fun x => F x a) (F' a) x₀\n⊢ Integrable F' ∧ HasDerivAt (fun x => ∫ (a : α), F x a ∂μ) (∫ (a : α), F' a ∂μ) x₀\n[PROOFSTEP]\nset L : E →L[𝕜] 𝕜 →L[𝕜] E := ContinuousLinearMap.smulRightL 𝕜 𝕜 E 1\n[GOAL]\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : 𝕜 → α → E\nF' : α → E\nx₀ : 𝕜\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ᶠ (x : 𝕜) in 𝓝 x₀, AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nbound : α → ℝ\nh_lipsch : ∀ᵐ (a : α) ∂μ, LipschitzOnWith (↑Real.nnabs (bound a)) (fun x => F x a) (ball x₀ ε)\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, HasDerivAt (fun x => F x a) (F' a) x₀\nL : E →L[𝕜] 𝕜 →L[𝕜] E := ↑(ContinuousLinearMap.smulRightL 𝕜 𝕜 E) 1\n⊢ Integrable F' ∧ HasDerivAt (fun x => ∫ (a : α), F x a ∂μ) (∫ (a : α), F' a ∂μ) x₀\n[PROOFSTEP]\nreplace h_diff : ∀ᵐ a ∂μ, HasFDerivAt (fun x => F x a) (L (F' a)) x₀ := h_diff.mono fun x hx => hx.hasFDerivAt\n[GOAL]\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : 𝕜 → α → E\nF' : α → E\nx₀ : 𝕜\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ᶠ (x : 𝕜) in 𝓝 x₀, AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nbound : α → ℝ\nh_lipsch : ∀ᵐ (a : α) ∂μ, LipschitzOnWith (↑Real.nnabs (bound a)) (fun x => F x a) (ball x₀ ε)\nbound_integrable : Integrable bound\nL : E →L[𝕜] 𝕜 →L[𝕜] E := ↑(ContinuousLinearMap.smulRightL 𝕜 𝕜 E) 1\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (↑L (F' a)) x₀\n⊢ Integrable F' ∧ HasDerivAt (fun x => ∫ (a : α), F x a ∂μ) (∫ (a : α), F' a ∂μ) x₀\n[PROOFSTEP]\nhave hm : AEStronglyMeasurable (L ∘ F') μ := L.continuous.comp_aestronglyMeasurable hF'_meas\n[GOAL]\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : 𝕜 → α → E\nF' : α → E\nx₀ : 𝕜\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ᶠ (x : 𝕜) in 𝓝 x₀, AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nbound : α → ℝ\nh_lipsch : ∀ᵐ (a : α) ∂μ, LipschitzOnWith (↑Real.nnabs (bound a)) (fun x => F x a) (ball x₀ ε)\nbound_integrable : Integrable bound\nL : E →L[𝕜] 𝕜 →L[𝕜] E := ↑(ContinuousLinearMap.smulRightL 𝕜 𝕜 E) 1\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (↑L (F' a)) x₀\nhm : AEStronglyMeasurable (↑L ∘ F') μ\n⊢ Integrable F' ∧ HasDerivAt (fun x => ∫ (a : α), F x a ∂μ) (∫ (a : α), F' a ∂μ) x₀\n[PROOFSTEP]\ncases' hasFDerivAt_integral_of_dominated_loc_of_lip ε_pos hF_meas hF_int hm h_lipsch bound_integrable h_diff with\n  hF'_int key\n[GOAL]\ncase intro\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : 𝕜 → α → E\nF' : α → E\nx₀ : 𝕜\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ᶠ (x : 𝕜) in 𝓝 x₀, AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nbound : α → ℝ\nh_lipsch : ∀ᵐ (a : α) ∂μ, LipschitzOnWith (↑Real.nnabs (bound a)) (fun x => F x a) (ball x₀ ε)\nbound_integrable : Integrable bound\nL : E →L[𝕜] 𝕜 →L[𝕜] E := ↑(ContinuousLinearMap.smulRightL 𝕜 𝕜 E) 1\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (↑L (F' a)) x₀\nhm : AEStronglyMeasurable (↑L ∘ F') μ\nhF'_int : Integrable (↑L ∘ F')\nkey : HasFDerivAt (fun x => ∫ (a : α), F x a ∂μ) (∫ (a : α), (↑L ∘ F') a ∂μ) x₀\n⊢ Integrable F' ∧ HasDerivAt (fun x => ∫ (a : α), F x a ∂μ) (∫ (a : α), F' a ∂μ) x₀\n[PROOFSTEP]\nreplace hF'_int : Integrable F' μ\n[GOAL]\ncase hF'_int\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : 𝕜 → α → E\nF' : α → E\nx₀ : 𝕜\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ᶠ (x : 𝕜) in 𝓝 x₀, AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nbound : α → ℝ\nh_lipsch : ∀ᵐ (a : α) ∂μ, LipschitzOnWith (↑Real.nnabs (bound a)) (fun x => F x a) (ball x₀ ε)\nbound_integrable : Integrable bound\nL : E →L[𝕜] 𝕜 →L[𝕜] E := ↑(ContinuousLinearMap.smulRightL 𝕜 𝕜 E) 1\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (↑L (F' a)) x₀\nhm : AEStronglyMeasurable (↑L ∘ F') μ\nhF'_int : Integrable (↑L ∘ F')\nkey : HasFDerivAt (fun x => ∫ (a : α), F x a ∂μ) (∫ (a : α), (↑L ∘ F') a ∂μ) x₀\n⊢ Integrable F'\n[PROOFSTEP]\nrw [← integrable_norm_iff hm] at hF'_int \n[GOAL]\ncase hF'_int\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : 𝕜 → α → E\nF' : α → E\nx₀ : 𝕜\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ᶠ (x : 𝕜) in 𝓝 x₀, AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nbound : α → ℝ\nh_lipsch : ∀ᵐ (a : α) ∂μ, LipschitzOnWith (↑Real.nnabs (bound a)) (fun x => F x a) (ball x₀ ε)\nbound_integrable : Integrable bound\nL : E →L[𝕜] 𝕜 →L[𝕜] E := ↑(ContinuousLinearMap.smulRightL 𝕜 𝕜 E) 1\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (↑L (F' a)) x₀\nhm : AEStronglyMeasurable (↑L ∘ F') μ\nhF'_int : Integrable fun a => ‖(↑L ∘ F') a‖\nkey : HasFDerivAt (fun x => ∫ (a : α), F x a ∂μ) (∫ (a : α), (↑L ∘ F') a ∂μ) x₀\n⊢ Integrable F'\n[PROOFSTEP]\nsimpa only [(· ∘ ·), integrable_norm_iff, hF'_meas, one_mul, norm_one, ContinuousLinearMap.comp_apply,\n  ContinuousLinearMap.coe_restrict_scalarsL', ContinuousLinearMap.norm_restrictScalars,\n  ContinuousLinearMap.norm_smulRightL_apply] using hF'_int\n[GOAL]\ncase intro\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : 𝕜 → α → E\nF' : α → E\nx₀ : 𝕜\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ᶠ (x : 𝕜) in 𝓝 x₀, AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nbound : α → ℝ\nh_lipsch : ∀ᵐ (a : α) ∂μ, LipschitzOnWith (↑Real.nnabs (bound a)) (fun x => F x a) (ball x₀ ε)\nbound_integrable : Integrable bound\nL : E →L[𝕜] 𝕜 →L[𝕜] E := ↑(ContinuousLinearMap.smulRightL 𝕜 𝕜 E) 1\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (↑L (F' a)) x₀\nhm : AEStronglyMeasurable (↑L ∘ F') μ\nkey : HasFDerivAt (fun x => ∫ (a : α), F x a ∂μ) (∫ (a : α), (↑L ∘ F') a ∂μ) x₀\nhF'_int : Integrable F'\n⊢ Integrable F' ∧ HasDerivAt (fun x => ∫ (a : α), F x a ∂μ) (∫ (a : α), F' a ∂μ) x₀\n[PROOFSTEP]\nrefine' ⟨hF'_int, _⟩\n[GOAL]\ncase intro\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : 𝕜 → α → E\nF' : α → E\nx₀ : 𝕜\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ᶠ (x : 𝕜) in 𝓝 x₀, AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nbound : α → ℝ\nh_lipsch : ∀ᵐ (a : α) ∂μ, LipschitzOnWith (↑Real.nnabs (bound a)) (fun x => F x a) (ball x₀ ε)\nbound_integrable : Integrable bound\nL : E →L[𝕜] 𝕜 →L[𝕜] E := ↑(ContinuousLinearMap.smulRightL 𝕜 𝕜 E) 1\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (↑L (F' a)) x₀\nhm : AEStronglyMeasurable (↑L ∘ F') μ\nkey : HasFDerivAt (fun x => ∫ (a : α), F x a ∂μ) (∫ (a : α), (↑L ∘ F') a ∂μ) x₀\nhF'_int : Integrable F'\n⊢ HasDerivAt (fun x => ∫ (a : α), F x a ∂μ) (∫ (a : α), F' a ∂μ) x₀\n[PROOFSTEP]\nsimp_rw [hasDerivAt_iff_hasFDerivAt] at h_diff ⊢\n[GOAL]\ncase intro\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF : 𝕜 → α → E\nF' : α → E\nx₀ : 𝕜\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ᶠ (x : 𝕜) in 𝓝 x₀, AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable F' μ\nbound : α → ℝ\nh_lipsch : ∀ᵐ (a : α) ∂μ, LipschitzOnWith (↑Real.nnabs (bound a)) (fun x => F x a) (ball x₀ ε)\nbound_integrable : Integrable bound\nL : E →L[𝕜] 𝕜 →L[𝕜] E := ↑(ContinuousLinearMap.smulRightL 𝕜 𝕜 E) 1\nh_diff : ∀ᵐ (a : α) ∂μ, HasFDerivAt (fun x => F x a) (↑(↑(ContinuousLinearMap.smulRightL 𝕜 𝕜 E) 1) (F' a)) x₀\nhm : AEStronglyMeasurable (↑L ∘ F') μ\nkey : HasFDerivAt (fun x => ∫ (a : α), F x a ∂μ) (∫ (a : α), (↑L ∘ F') a ∂μ) x₀\nhF'_int : Integrable F'\n⊢ HasFDerivAt (fun x => ∫ (a : α), F x a ∂μ) (ContinuousLinearMap.smulRight 1 (∫ (a : α), F' a ∂μ)) x₀\n[PROOFSTEP]\nsimpa only [(· ∘ ·), ContinuousLinearMap.integral_comp_comm _ hF'_int] using key\n[GOAL]\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF F' : 𝕜 → α → E\nx₀ : 𝕜\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ᶠ (x : 𝕜) in 𝓝 x₀, AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable (F' x₀) μ\nbound : α → ℝ\nh_bound : ∀ᵐ (a : α) ∂μ, ∀ (x : 𝕜), x ∈ ball x₀ ε → ‖F' x a‖ ≤ bound a\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, ∀ (x : 𝕜), x ∈ ball x₀ ε → HasDerivAt (fun x => F x a) (F' x a) x\n⊢ Integrable (F' x₀) ∧ HasDerivAt (fun n => ∫ (a : α), F n a ∂μ) (∫ (a : α), F' x₀ a ∂μ) x₀\n[PROOFSTEP]\nhave x₀_in : x₀ ∈ ball x₀ ε := mem_ball_self ε_pos\n[GOAL]\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF F' : 𝕜 → α → E\nx₀ : 𝕜\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ᶠ (x : 𝕜) in 𝓝 x₀, AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable (F' x₀) μ\nbound : α → ℝ\nh_bound : ∀ᵐ (a : α) ∂μ, ∀ (x : 𝕜), x ∈ ball x₀ ε → ‖F' x a‖ ≤ bound a\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, ∀ (x : 𝕜), x ∈ ball x₀ ε → HasDerivAt (fun x => F x a) (F' x a) x\nx₀_in : x₀ ∈ ball x₀ ε\n⊢ Integrable (F' x₀) ∧ HasDerivAt (fun n => ∫ (a : α), F n a ∂μ) (∫ (a : α), F' x₀ a ∂μ) x₀\n[PROOFSTEP]\nhave diff_x₀ : ∀ᵐ a ∂μ, HasDerivAt (fun x => F x a) (F' x₀ a) x₀ := h_diff.mono fun a ha => ha x₀ x₀_in\n[GOAL]\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF F' : 𝕜 → α → E\nx₀ : 𝕜\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ᶠ (x : 𝕜) in 𝓝 x₀, AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable (F' x₀) μ\nbound : α → ℝ\nh_bound : ∀ᵐ (a : α) ∂μ, ∀ (x : 𝕜), x ∈ ball x₀ ε → ‖F' x a‖ ≤ bound a\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, ∀ (x : 𝕜), x ∈ ball x₀ ε → HasDerivAt (fun x => F x a) (F' x a) x\nx₀_in : x₀ ∈ ball x₀ ε\ndiff_x₀ : ∀ᵐ (a : α) ∂μ, HasDerivAt (fun x => F x a) (F' x₀ a) x₀\n⊢ Integrable (F' x₀) ∧ HasDerivAt (fun n => ∫ (a : α), F n a ∂μ) (∫ (a : α), F' x₀ a ∂μ) x₀\n[PROOFSTEP]\nhave : ∀ᵐ a ∂μ, LipschitzOnWith (Real.nnabs (bound a)) (fun x : 𝕜 => F x a) (ball x₀ ε) :=\n  by\n  apply (h_diff.and h_bound).mono\n  rintro a ⟨ha_deriv, ha_bound⟩\n  refine'\n    (convex_ball _ _).lipschitzOnWith_of_nnnorm_hasDerivWithin_le (fun x x_in => (ha_deriv x x_in).hasDerivWithinAt)\n      fun x x_in => _\n  rw [← NNReal.coe_le_coe, coe_nnnorm, Real.coe_nnabs]\n  exact (ha_bound x x_in).trans (le_abs_self _)\n[GOAL]\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF F' : 𝕜 → α → E\nx₀ : 𝕜\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ᶠ (x : 𝕜) in 𝓝 x₀, AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable (F' x₀) μ\nbound : α → ℝ\nh_bound : ∀ᵐ (a : α) ∂μ, ∀ (x : 𝕜), x ∈ ball x₀ ε → ‖F' x a‖ ≤ bound a\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, ∀ (x : 𝕜), x ∈ ball x₀ ε → HasDerivAt (fun x => F x a) (F' x a) x\nx₀_in : x₀ ∈ ball x₀ ε\ndiff_x₀ : ∀ᵐ (a : α) ∂μ, HasDerivAt (fun x => F x a) (F' x₀ a) x₀\n⊢ ∀ᵐ (a : α) ∂μ, LipschitzOnWith (↑Real.nnabs (bound a)) (fun x => F x a) (ball x₀ ε)\n[PROOFSTEP]\napply (h_diff.and h_bound).mono\n[GOAL]\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF F' : 𝕜 → α → E\nx₀ : 𝕜\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ᶠ (x : 𝕜) in 𝓝 x₀, AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable (F' x₀) μ\nbound : α → ℝ\nh_bound : ∀ᵐ (a : α) ∂μ, ∀ (x : 𝕜), x ∈ ball x₀ ε → ‖F' x a‖ ≤ bound a\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, ∀ (x : 𝕜), x ∈ ball x₀ ε → HasDerivAt (fun x => F x a) (F' x a) x\nx₀_in : x₀ ∈ ball x₀ ε\ndiff_x₀ : ∀ᵐ (a : α) ∂μ, HasDerivAt (fun x => F x a) (F' x₀ a) x₀\n⊢ ∀ (x : α),\n    ((∀ (x_1 : 𝕜), x_1 ∈ ball x₀ ε → HasDerivAt (fun x_2 => F x_2 x) (F' x_1 x) x_1) ∧\n        ∀ (x_1 : 𝕜), x_1 ∈ ball x₀ ε → ‖F' x_1 x‖ ≤ bound x) →\n      LipschitzOnWith (↑Real.nnabs (bound x)) (fun x_1 => F x_1 x) (ball x₀ ε)\n[PROOFSTEP]\nrintro a ⟨ha_deriv, ha_bound⟩\n[GOAL]\ncase intro\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF F' : 𝕜 → α → E\nx₀ : 𝕜\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ᶠ (x : 𝕜) in 𝓝 x₀, AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable (F' x₀) μ\nbound : α → ℝ\nh_bound : ∀ᵐ (a : α) ∂μ, ∀ (x : 𝕜), x ∈ ball x₀ ε → ‖F' x a‖ ≤ bound a\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, ∀ (x : 𝕜), x ∈ ball x₀ ε → HasDerivAt (fun x => F x a) (F' x a) x\nx₀_in : x₀ ∈ ball x₀ ε\ndiff_x₀ : ∀ᵐ (a : α) ∂μ, HasDerivAt (fun x => F x a) (F' x₀ a) x₀\na : α\nha_deriv : ∀ (x : 𝕜), x ∈ ball x₀ ε → HasDerivAt (fun x => F x a) (F' x a) x\nha_bound : ∀ (x : 𝕜), x ∈ ball x₀ ε → ‖F' x a‖ ≤ bound a\n⊢ LipschitzOnWith (↑Real.nnabs (bound a)) (fun x => F x a) (ball x₀ ε)\n[PROOFSTEP]\nrefine'\n  (convex_ball _ _).lipschitzOnWith_of_nnnorm_hasDerivWithin_le (fun x x_in => (ha_deriv x x_in).hasDerivWithinAt)\n    fun x x_in => _\n[GOAL]\ncase intro\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF F' : 𝕜 → α → E\nx₀ : 𝕜\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ᶠ (x : 𝕜) in 𝓝 x₀, AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable (F' x₀) μ\nbound : α → ℝ\nh_bound : ∀ᵐ (a : α) ∂μ, ∀ (x : 𝕜), x ∈ ball x₀ ε → ‖F' x a‖ ≤ bound a\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, ∀ (x : 𝕜), x ∈ ball x₀ ε → HasDerivAt (fun x => F x a) (F' x a) x\nx₀_in : x₀ ∈ ball x₀ ε\ndiff_x₀ : ∀ᵐ (a : α) ∂μ, HasDerivAt (fun x => F x a) (F' x₀ a) x₀\na : α\nha_deriv : ∀ (x : 𝕜), x ∈ ball x₀ ε → HasDerivAt (fun x => F x a) (F' x a) x\nha_bound : ∀ (x : 𝕜), x ∈ ball x₀ ε → ‖F' x a‖ ≤ bound a\nx : 𝕜\nx_in : x ∈ ball x₀ ε\n⊢ ‖F' x a‖₊ ≤ ↑Real.nnabs (bound a)\n[PROOFSTEP]\nrw [← NNReal.coe_le_coe, coe_nnnorm, Real.coe_nnabs]\n[GOAL]\ncase intro\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF F' : 𝕜 → α → E\nx₀ : 𝕜\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ᶠ (x : 𝕜) in 𝓝 x₀, AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable (F' x₀) μ\nbound : α → ℝ\nh_bound : ∀ᵐ (a : α) ∂μ, ∀ (x : 𝕜), x ∈ ball x₀ ε → ‖F' x a‖ ≤ bound a\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, ∀ (x : 𝕜), x ∈ ball x₀ ε → HasDerivAt (fun x => F x a) (F' x a) x\nx₀_in : x₀ ∈ ball x₀ ε\ndiff_x₀ : ∀ᵐ (a : α) ∂μ, HasDerivAt (fun x => F x a) (F' x₀ a) x₀\na : α\nha_deriv : ∀ (x : 𝕜), x ∈ ball x₀ ε → HasDerivAt (fun x => F x a) (F' x a) x\nha_bound : ∀ (x : 𝕜), x ∈ ball x₀ ε → ‖F' x a‖ ≤ bound a\nx : 𝕜\nx_in : x ∈ ball x₀ ε\n⊢ ‖F' x a‖ ≤ |bound a|\n[PROOFSTEP]\nexact (ha_bound x x_in).trans (le_abs_self _)\n[GOAL]\nα : Type u_1\ninst✝⁷ : MeasurableSpace α\nμ : Measure α\n𝕜 : Type u_2\ninst✝⁶ : IsROrC 𝕜\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : NormedSpace 𝕜 E\ninst✝² : CompleteSpace E\nH : Type u_4\ninst✝¹ : NormedAddCommGroup H\ninst✝ : NormedSpace 𝕜 H\nF F' : 𝕜 → α → E\nx₀ : 𝕜\nε : ℝ\nε_pos : 0 < ε\nhF_meas : ∀ᶠ (x : 𝕜) in 𝓝 x₀, AEStronglyMeasurable (F x) μ\nhF_int : Integrable (F x₀)\nhF'_meas : AEStronglyMeasurable (F' x₀) μ\nbound : α → ℝ\nh_bound : ∀ᵐ (a : α) ∂μ, ∀ (x : 𝕜), x ∈ ball x₀ ε → ‖F' x a‖ ≤ bound a\nbound_integrable : Integrable bound\nh_diff : ∀ᵐ (a : α) ∂μ, ∀ (x : 𝕜), x ∈ ball x₀ ε → HasDerivAt (fun x => F x a) (F' x a) x\nx₀_in : x₀ ∈ ball x₀ ε\ndiff_x₀ : ∀ᵐ (a : α) ∂μ, HasDerivAt (fun x => F x a) (F' x₀ a) x₀\nthis : ∀ᵐ (a : α) ∂μ, LipschitzOnWith (↑Real.nnabs (bound a)) (fun x => F x a) (ball x₀ ε)\n⊢ Integrable (F' x₀) ∧ HasDerivAt (fun n => ∫ (a : α), F n a ∂μ) (∫ (a : α), F' x₀ a ∂μ) x₀\n[PROOFSTEP]\nexact hasDerivAt_integral_of_dominated_loc_of_lip ε_pos hF_meas hF_int hF'_meas this bound_integrable diff_x₀\n", "meta": {"mathlib_filename": "Mathlib.Analysis.Calculus.ParametricIntegral", "llama_tokens": 76183, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8311430394931456, "lm_q2_score": 0.6370308082623217, "lm_q1q2_score": 0.5294637222299213}}
{"text": "[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nα : Type u_3\nx : ℝ\n⊢ ‖x⋆ * x‖ = ‖x‖ * ‖x‖\n[PROOFSTEP]\nsimp only [star, id.def, norm_mul]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nα : Type u_3\ninst✝² : NonUnitalNormedRing E\ninst✝¹ : StarRing E\ninst✝ : CstarRing E\n⊢ ∀ (x : E), ‖x⋆‖ = ‖x‖\n[PROOFSTEP]\nintro x\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nα : Type u_3\ninst✝² : NonUnitalNormedRing E\ninst✝¹ : StarRing E\ninst✝ : CstarRing E\nx : E\n⊢ ‖x⋆‖ = ‖x‖\n[PROOFSTEP]\nby_cases htriv : x = 0\n[GOAL]\ncase pos\n𝕜 : Type u_1\nE : Type u_2\nα : Type u_3\ninst✝² : NonUnitalNormedRing E\ninst✝¹ : StarRing E\ninst✝ : CstarRing E\nx : E\nhtriv : x = 0\n⊢ ‖x⋆‖ = ‖x‖\n[PROOFSTEP]\nsimp only [htriv, star_zero]\n[GOAL]\ncase neg\n𝕜 : Type u_1\nE : Type u_2\nα : Type u_3\ninst✝² : NonUnitalNormedRing E\ninst✝¹ : StarRing E\ninst✝ : CstarRing E\nx : E\nhtriv : ¬x = 0\n⊢ ‖x⋆‖ = ‖x‖\n[PROOFSTEP]\nhave hnt : 0 < ‖x‖ := norm_pos_iff.mpr htriv\n[GOAL]\ncase neg\n𝕜 : Type u_1\nE : Type u_2\nα : Type u_3\ninst✝² : NonUnitalNormedRing E\ninst✝¹ : StarRing E\ninst✝ : CstarRing E\nx : E\nhtriv : ¬x = 0\nhnt : 0 < ‖x‖\n⊢ ‖x⋆‖ = ‖x‖\n[PROOFSTEP]\nhave hnt_star : 0 < ‖x⋆‖ := norm_pos_iff.mpr ((AddEquiv.map_ne_zero_iff starAddEquiv (M := E)).mpr htriv)\n[GOAL]\ncase neg\n𝕜 : Type u_1\nE : Type u_2\nα : Type u_3\ninst✝² : NonUnitalNormedRing E\ninst✝¹ : StarRing E\ninst✝ : CstarRing E\nx : E\nhtriv : ¬x = 0\nhnt : 0 < ‖x‖\nhnt_star : 0 < ‖x⋆‖\n⊢ ‖x⋆‖ = ‖x‖\n[PROOFSTEP]\nhave h₁ :=\n  calc\n    ‖x‖ * ‖x‖ = ‖x⋆ * x‖ := norm_star_mul_self.symm\n    _ ≤ ‖x⋆‖ * ‖x‖ := norm_mul_le _ _\n[GOAL]\ncase neg\n𝕜 : Type u_1\nE : Type u_2\nα : Type u_3\ninst✝² : NonUnitalNormedRing E\ninst✝¹ : StarRing E\ninst✝ : CstarRing E\nx : E\nhtriv : ¬x = 0\nhnt : 0 < ‖x‖\nhnt_star : 0 < ‖x⋆‖\nh₁ : ‖x‖ * ‖x‖ ≤ ‖x⋆‖ * ‖x‖\n⊢ ‖x⋆‖ = ‖x‖\n[PROOFSTEP]\nhave h₂ :=\n  calc\n    ‖x⋆‖ * ‖x⋆‖ = ‖x * x⋆‖ := by rw [← norm_star_mul_self, star_star]\n    _ ≤ ‖x‖ * ‖x⋆‖ := norm_mul_le _ _\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nα : Type u_3\ninst✝² : NonUnitalNormedRing E\ninst✝¹ : StarRing E\ninst✝ : CstarRing E\nx : E\nhtriv : ¬x = 0\nhnt : 0 < ‖x‖\nhnt_star : 0 < ‖x⋆‖\nh₁ : ‖x‖ * ‖x‖ ≤ ‖x⋆‖ * ‖x‖\n⊢ ‖x⋆‖ * ‖x⋆‖ = ‖x * x⋆‖\n[PROOFSTEP]\nrw [← norm_star_mul_self, star_star]\n[GOAL]\ncase neg\n𝕜 : Type u_1\nE : Type u_2\nα : Type u_3\ninst✝² : NonUnitalNormedRing E\ninst✝¹ : StarRing E\ninst✝ : CstarRing E\nx : E\nhtriv : ¬x = 0\nhnt : 0 < ‖x‖\nhnt_star : 0 < ‖x⋆‖\nh₁ : ‖x‖ * ‖x‖ ≤ ‖x⋆‖ * ‖x‖\nh₂ : ‖x⋆‖ * ‖x⋆‖ ≤ ‖x‖ * ‖x⋆‖\n⊢ ‖x⋆‖ = ‖x‖\n[PROOFSTEP]\nexact le_antisymm (le_of_mul_le_mul_right h₂ hnt_star) (le_of_mul_le_mul_right h₁ hnt)\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nα : Type u_3\ninst✝² : NonUnitalNormedRing E\ninst✝¹ : StarRing E\ninst✝ : CstarRing E\nx : E\n⊢ ‖x * x⋆‖ = ‖x‖ * ‖x‖\n[PROOFSTEP]\nnth_rw 1 [← star_star x]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nα : Type u_3\ninst✝² : NonUnitalNormedRing E\ninst✝¹ : StarRing E\ninst✝ : CstarRing E\nx : E\n⊢ ‖x⋆⋆ * x⋆‖ = ‖x‖ * ‖x‖\n[PROOFSTEP]\nsimp only [norm_star_mul_self, norm_star]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nα : Type u_3\ninst✝² : NonUnitalNormedRing E\ninst✝¹ : StarRing E\ninst✝ : CstarRing E\nx : E\n⊢ ‖x⋆ * x‖ = ‖x⋆‖ * ‖x‖\n[PROOFSTEP]\nrw [norm_star_mul_self, norm_star]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nα : Type u_3\ninst✝² : NonUnitalNormedRing E\ninst✝¹ : StarRing E\ninst✝ : CstarRing E\nx : E\n⊢ x⋆ * x = 0 ↔ x = 0\n[PROOFSTEP]\nrw [← norm_eq_zero, norm_star_mul_self]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nα : Type u_3\ninst✝² : NonUnitalNormedRing E\ninst✝¹ : StarRing E\ninst✝ : CstarRing E\nx : E\n⊢ ‖x‖ * ‖x‖ = 0 ↔ x = 0\n[PROOFSTEP]\nexact mul_self_eq_zero.trans norm_eq_zero\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nα : Type u_3\ninst✝² : NonUnitalNormedRing E\ninst✝¹ : StarRing E\ninst✝ : CstarRing E\nx : E\n⊢ x⋆ * x ≠ 0 ↔ x ≠ 0\n[PROOFSTEP]\nsimp only [Ne.def, star_mul_self_eq_zero_iff]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nα : Type u_3\ninst✝² : NonUnitalNormedRing E\ninst✝¹ : StarRing E\ninst✝ : CstarRing E\nx : E\n⊢ x * x⋆ = 0 ↔ x = 0\n[PROOFSTEP]\nsimpa only [star_eq_zero, star_star] using @star_mul_self_eq_zero_iff _ _ _ _ (star x)\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nα : Type u_3\ninst✝² : NonUnitalNormedRing E\ninst✝¹ : StarRing E\ninst✝ : CstarRing E\nx : E\n⊢ x * x⋆ ≠ 0 ↔ x ≠ 0\n[PROOFSTEP]\nsimp only [Ne.def, mul_star_self_eq_zero_iff]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nα : Type u_3\nι : Type u_4\nR₁ : Type u_5\nR₂ : Type u_6\nR : ι → Type u_7\ninst✝⁹ : NonUnitalNormedRing R₁\ninst✝⁸ : StarRing R₁\ninst✝⁷ : CstarRing R₁\ninst✝⁶ : NonUnitalNormedRing R₂\ninst✝⁵ : StarRing R₂\ninst✝⁴ : CstarRing R₂\ninst✝³ : (i : ι) → NonUnitalNormedRing (R i)\ninst✝² : (i : ι) → StarRing (R i)\ninst✝¹ : Fintype ι\ninst✝ : ∀ (i : ι), CstarRing (R i)\nx : R₁ × R₂\n⊢ ‖x⋆ * x‖ = ‖x‖ * ‖x‖\n[PROOFSTEP]\ndsimp only [norm]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nα : Type u_3\nι : Type u_4\nR₁ : Type u_5\nR₂ : Type u_6\nR : ι → Type u_7\ninst✝⁹ : NonUnitalNormedRing R₁\ninst✝⁸ : StarRing R₁\ninst✝⁷ : CstarRing R₁\ninst✝⁶ : NonUnitalNormedRing R₂\ninst✝⁵ : StarRing R₂\ninst✝⁴ : CstarRing R₂\ninst✝³ : (i : ι) → NonUnitalNormedRing (R i)\ninst✝² : (i : ι) → StarRing (R i)\ninst✝¹ : Fintype ι\ninst✝ : ∀ (i : ι), CstarRing (R i)\nx : R₁ × R₂\n⊢ ‖(x⋆ * x).fst‖ ⊔ ‖(x⋆ * x).snd‖ = (‖x.fst‖ ⊔ ‖x.snd‖) * (‖x.fst‖ ⊔ ‖x.snd‖)\n[PROOFSTEP]\nsimp only [Prod.fst_mul, Prod.fst_star, Prod.snd_mul, Prod.snd_star, norm_star_mul_self, ← sq]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nα : Type u_3\nι : Type u_4\nR₁ : Type u_5\nR₂ : Type u_6\nR : ι → Type u_7\ninst✝⁹ : NonUnitalNormedRing R₁\ninst✝⁸ : StarRing R₁\ninst✝⁷ : CstarRing R₁\ninst✝⁶ : NonUnitalNormedRing R₂\ninst✝⁵ : StarRing R₂\ninst✝⁴ : CstarRing R₂\ninst✝³ : (i : ι) → NonUnitalNormedRing (R i)\ninst✝² : (i : ι) → StarRing (R i)\ninst✝¹ : Fintype ι\ninst✝ : ∀ (i : ι), CstarRing (R i)\nx : R₁ × R₂\n⊢ ‖x.fst‖ ^ 2 ⊔ ‖x.snd‖ ^ 2 = (‖x.fst‖ ⊔ ‖x.snd‖) ^ 2\n[PROOFSTEP]\nrefine' le_antisymm _ _\n[GOAL]\ncase refine'_1\n𝕜 : Type u_1\nE : Type u_2\nα : Type u_3\nι : Type u_4\nR₁ : Type u_5\nR₂ : Type u_6\nR : ι → Type u_7\ninst✝⁹ : NonUnitalNormedRing R₁\ninst✝⁸ : StarRing R₁\ninst✝⁷ : CstarRing R₁\ninst✝⁶ : NonUnitalNormedRing R₂\ninst✝⁵ : StarRing R₂\ninst✝⁴ : CstarRing R₂\ninst✝³ : (i : ι) → NonUnitalNormedRing (R i)\ninst✝² : (i : ι) → StarRing (R i)\ninst✝¹ : Fintype ι\ninst✝ : ∀ (i : ι), CstarRing (R i)\nx : R₁ × R₂\n⊢ ‖x.fst‖ ^ 2 ⊔ ‖x.snd‖ ^ 2 ≤ (‖x.fst‖ ⊔ ‖x.snd‖) ^ 2\n[PROOFSTEP]\nrefine' max_le _ _\n[GOAL]\ncase refine'_1.refine'_1\n𝕜 : Type u_1\nE : Type u_2\nα : Type u_3\nι : Type u_4\nR₁ : Type u_5\nR₂ : Type u_6\nR : ι → Type u_7\ninst✝⁹ : NonUnitalNormedRing R₁\ninst✝⁸ : StarRing R₁\ninst✝⁷ : CstarRing R₁\ninst✝⁶ : NonUnitalNormedRing R₂\ninst✝⁵ : StarRing R₂\ninst✝⁴ : CstarRing R₂\ninst✝³ : (i : ι) → NonUnitalNormedRing (R i)\ninst✝² : (i : ι) → StarRing (R i)\ninst✝¹ : Fintype ι\ninst✝ : ∀ (i : ι), CstarRing (R i)\nx : R₁ × R₂\n⊢ ‖x.fst‖ ^ 2 ≤ (‖x.fst‖ ⊔ ‖x.snd‖) ^ 2\n[PROOFSTEP]\nrw [sq_le_sq, abs_of_nonneg (norm_nonneg _)]\n[GOAL]\ncase refine'_1.refine'_2\n𝕜 : Type u_1\nE : Type u_2\nα : Type u_3\nι : Type u_4\nR₁ : Type u_5\nR₂ : Type u_6\nR : ι → Type u_7\ninst✝⁹ : NonUnitalNormedRing R₁\ninst✝⁸ : StarRing R₁\ninst✝⁷ : CstarRing R₁\ninst✝⁶ : NonUnitalNormedRing R₂\ninst✝⁵ : StarRing R₂\ninst✝⁴ : CstarRing R₂\ninst✝³ : (i : ι) → NonUnitalNormedRing (R i)\ninst✝² : (i : ι) → StarRing (R i)\ninst✝¹ : Fintype ι\ninst✝ : ∀ (i : ι), CstarRing (R i)\nx : R₁ × R₂\n⊢ ‖x.snd‖ ^ 2 ≤ (‖x.fst‖ ⊔ ‖x.snd‖) ^ 2\n[PROOFSTEP]\nrw [sq_le_sq, abs_of_nonneg (norm_nonneg _)]\n[GOAL]\ncase refine'_1.refine'_1\n𝕜 : Type u_1\nE : Type u_2\nα : Type u_3\nι : Type u_4\nR₁ : Type u_5\nR₂ : Type u_6\nR : ι → Type u_7\ninst✝⁹ : NonUnitalNormedRing R₁\ninst✝⁸ : StarRing R₁\ninst✝⁷ : CstarRing R₁\ninst✝⁶ : NonUnitalNormedRing R₂\ninst✝⁵ : StarRing R₂\ninst✝⁴ : CstarRing R₂\ninst✝³ : (i : ι) → NonUnitalNormedRing (R i)\ninst✝² : (i : ι) → StarRing (R i)\ninst✝¹ : Fintype ι\ninst✝ : ∀ (i : ι), CstarRing (R i)\nx : R₁ × R₂\n⊢ ‖x.fst‖ ≤ |‖x.fst‖ ⊔ ‖x.snd‖|\ncase refine'_1.refine'_2\n𝕜 : Type u_1\nE : Type u_2\nα : Type u_3\nι : Type u_4\nR₁ : Type u_5\nR₂ : Type u_6\nR : ι → Type u_7\ninst✝⁹ : NonUnitalNormedRing R₁\ninst✝⁸ : StarRing R₁\ninst✝⁷ : CstarRing R₁\ninst✝⁶ : NonUnitalNormedRing R₂\ninst✝⁵ : StarRing R₂\ninst✝⁴ : CstarRing R₂\ninst✝³ : (i : ι) → NonUnitalNormedRing (R i)\ninst✝² : (i : ι) → StarRing (R i)\ninst✝¹ : Fintype ι\ninst✝ : ∀ (i : ι), CstarRing (R i)\nx : R₁ × R₂\n⊢ ‖x.snd‖ ≤ |‖x.fst‖ ⊔ ‖x.snd‖|\n[PROOFSTEP]\nexact (le_max_left _ _).trans (le_abs_self _)\n[GOAL]\ncase refine'_1.refine'_2\n𝕜 : Type u_1\nE : Type u_2\nα : Type u_3\nι : Type u_4\nR₁ : Type u_5\nR₂ : Type u_6\nR : ι → Type u_7\ninst✝⁹ : NonUnitalNormedRing R₁\ninst✝⁸ : StarRing R₁\ninst✝⁷ : CstarRing R₁\ninst✝⁶ : NonUnitalNormedRing R₂\ninst✝⁵ : StarRing R₂\ninst✝⁴ : CstarRing R₂\ninst✝³ : (i : ι) → NonUnitalNormedRing (R i)\ninst✝² : (i : ι) → StarRing (R i)\ninst✝¹ : Fintype ι\ninst✝ : ∀ (i : ι), CstarRing (R i)\nx : R₁ × R₂\n⊢ ‖x.snd‖ ≤ |‖x.fst‖ ⊔ ‖x.snd‖|\n[PROOFSTEP]\nexact (le_max_right _ _).trans (le_abs_self _)\n[GOAL]\ncase refine'_2\n𝕜 : Type u_1\nE : Type u_2\nα : Type u_3\nι : Type u_4\nR₁ : Type u_5\nR₂ : Type u_6\nR : ι → Type u_7\ninst✝⁹ : NonUnitalNormedRing R₁\ninst✝⁸ : StarRing R₁\ninst✝⁷ : CstarRing R₁\ninst✝⁶ : NonUnitalNormedRing R₂\ninst✝⁵ : StarRing R₂\ninst✝⁴ : CstarRing R₂\ninst✝³ : (i : ι) → NonUnitalNormedRing (R i)\ninst✝² : (i : ι) → StarRing (R i)\ninst✝¹ : Fintype ι\ninst✝ : ∀ (i : ι), CstarRing (R i)\nx : R₁ × R₂\n⊢ (‖x.fst‖ ⊔ ‖x.snd‖) ^ 2 ≤ ‖x.fst‖ ^ 2 ⊔ ‖x.snd‖ ^ 2\n[PROOFSTEP]\nrw [le_sup_iff]\n[GOAL]\ncase refine'_2\n𝕜 : Type u_1\nE : Type u_2\nα : Type u_3\nι : Type u_4\nR₁ : Type u_5\nR₂ : Type u_6\nR : ι → Type u_7\ninst✝⁹ : NonUnitalNormedRing R₁\ninst✝⁸ : StarRing R₁\ninst✝⁷ : CstarRing R₁\ninst✝⁶ : NonUnitalNormedRing R₂\ninst✝⁵ : StarRing R₂\ninst✝⁴ : CstarRing R₂\ninst✝³ : (i : ι) → NonUnitalNormedRing (R i)\ninst✝² : (i : ι) → StarRing (R i)\ninst✝¹ : Fintype ι\ninst✝ : ∀ (i : ι), CstarRing (R i)\nx : R₁ × R₂\n⊢ (‖x.fst‖ ⊔ ‖x.snd‖) ^ 2 ≤ ‖x.fst‖ ^ 2 ∨ (‖x.fst‖ ⊔ ‖x.snd‖) ^ 2 ≤ ‖x.snd‖ ^ 2\n[PROOFSTEP]\nrcases le_total ‖x.fst‖ ‖x.snd‖ with (h | h)\n[GOAL]\ncase refine'_2.inl\n𝕜 : Type u_1\nE : Type u_2\nα : Type u_3\nι : Type u_4\nR₁ : Type u_5\nR₂ : Type u_6\nR : ι → Type u_7\ninst✝⁹ : NonUnitalNormedRing R₁\ninst✝⁸ : StarRing R₁\ninst✝⁷ : CstarRing R₁\ninst✝⁶ : NonUnitalNormedRing R₂\ninst✝⁵ : StarRing R₂\ninst✝⁴ : CstarRing R₂\ninst✝³ : (i : ι) → NonUnitalNormedRing (R i)\ninst✝² : (i : ι) → StarRing (R i)\ninst✝¹ : Fintype ι\ninst✝ : ∀ (i : ι), CstarRing (R i)\nx : R₁ × R₂\nh : ‖x.fst‖ ≤ ‖x.snd‖\n⊢ (‖x.fst‖ ⊔ ‖x.snd‖) ^ 2 ≤ ‖x.fst‖ ^ 2 ∨ (‖x.fst‖ ⊔ ‖x.snd‖) ^ 2 ≤ ‖x.snd‖ ^ 2\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase refine'_2.inr\n𝕜 : Type u_1\nE : Type u_2\nα : Type u_3\nι : Type u_4\nR₁ : Type u_5\nR₂ : Type u_6\nR : ι → Type u_7\ninst✝⁹ : NonUnitalNormedRing R₁\ninst✝⁸ : StarRing R₁\ninst✝⁷ : CstarRing R₁\ninst✝⁶ : NonUnitalNormedRing R₂\ninst✝⁵ : StarRing R₂\ninst✝⁴ : CstarRing R₂\ninst✝³ : (i : ι) → NonUnitalNormedRing (R i)\ninst✝² : (i : ι) → StarRing (R i)\ninst✝¹ : Fintype ι\ninst✝ : ∀ (i : ι), CstarRing (R i)\nx : R₁ × R₂\nh : ‖x.snd‖ ≤ ‖x.fst‖\n⊢ (‖x.fst‖ ⊔ ‖x.snd‖) ^ 2 ≤ ‖x.fst‖ ^ 2 ∨ (‖x.fst‖ ⊔ ‖x.snd‖) ^ 2 ≤ ‖x.snd‖ ^ 2\n[PROOFSTEP]\nsimp [h]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nα : Type u_3\nι : Type u_4\nR₁ : Type u_5\nR₂ : Type u_6\nR : ι → Type u_7\ninst✝⁹ : NonUnitalNormedRing R₁\ninst✝⁸ : StarRing R₁\ninst✝⁷ : CstarRing R₁\ninst✝⁶ : NonUnitalNormedRing R₂\ninst✝⁵ : StarRing R₂\ninst✝⁴ : CstarRing R₂\ninst✝³ : (i : ι) → NonUnitalNormedRing (R i)\ninst✝² : (i : ι) → StarRing (R i)\ninst✝¹ : Fintype ι\ninst✝ : ∀ (i : ι), CstarRing (R i)\nx : (i : ι) → R i\n⊢ ‖x⋆ * x‖ = ‖x‖ * ‖x‖\n[PROOFSTEP]\nsimp only [norm, Pi.mul_apply, Pi.star_apply, nnnorm_star_mul_self, ← sq]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nα : Type u_3\nι : Type u_4\nR₁ : Type u_5\nR₂ : Type u_6\nR : ι → Type u_7\ninst✝⁹ : NonUnitalNormedRing R₁\ninst✝⁸ : StarRing R₁\ninst✝⁷ : CstarRing R₁\ninst✝⁶ : NonUnitalNormedRing R₂\ninst✝⁵ : StarRing R₂\ninst✝⁴ : CstarRing R₂\ninst✝³ : (i : ι) → NonUnitalNormedRing (R i)\ninst✝² : (i : ι) → StarRing (R i)\ninst✝¹ : Fintype ι\ninst✝ : ∀ (i : ι), CstarRing (R i)\nx : (i : ι) → R i\n⊢ ↑(Finset.sup Finset.univ fun b => ‖x b‖₊ ^ 2) = ↑(Finset.sup Finset.univ fun b => ‖x b‖₊) ^ 2\n[PROOFSTEP]\nnorm_cast\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nα : Type u_3\nι : Type u_4\nR₁ : Type u_5\nR₂ : Type u_6\nR : ι → Type u_7\ninst✝⁹ : NonUnitalNormedRing R₁\ninst✝⁸ : StarRing R₁\ninst✝⁷ : CstarRing R₁\ninst✝⁶ : NonUnitalNormedRing R₂\ninst✝⁵ : StarRing R₂\ninst✝⁴ : CstarRing R₂\ninst✝³ : (i : ι) → NonUnitalNormedRing (R i)\ninst✝² : (i : ι) → StarRing (R i)\ninst✝¹ : Fintype ι\ninst✝ : ∀ (i : ι), CstarRing (R i)\nx : (i : ι) → R i\n⊢ (Finset.sup Finset.univ fun b => ‖x b‖₊ ^ 2) = (Finset.sup Finset.univ fun b => ‖x b‖₊) ^ 2\n[PROOFSTEP]\nexact\n  (Finset.comp_sup_eq_sup_comp_of_is_total (fun x : NNReal => x ^ 2)\n      (fun x y h => by simpa only [sq] using mul_le_mul' h h) (by simp)).symm\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nα : Type u_3\nι : Type u_4\nR₁ : Type u_5\nR₂ : Type u_6\nR : ι → Type u_7\ninst✝⁹ : NonUnitalNormedRing R₁\ninst✝⁸ : StarRing R₁\ninst✝⁷ : CstarRing R₁\ninst✝⁶ : NonUnitalNormedRing R₂\ninst✝⁵ : StarRing R₂\ninst✝⁴ : CstarRing R₂\ninst✝³ : (i : ι) → NonUnitalNormedRing (R i)\ninst✝² : (i : ι) → StarRing (R i)\ninst✝¹ : Fintype ι\ninst✝ : ∀ (i : ι), CstarRing (R i)\nx✝ : (i : ι) → R i\nx y : NNReal\nh : x ≤ y\n⊢ (fun x => x ^ 2) x ≤ (fun x => x ^ 2) y\n[PROOFSTEP]\nsimpa only [sq] using mul_le_mul' h h\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nα : Type u_3\nι : Type u_4\nR₁ : Type u_5\nR₂ : Type u_6\nR : ι → Type u_7\ninst✝⁹ : NonUnitalNormedRing R₁\ninst✝⁸ : StarRing R₁\ninst✝⁷ : CstarRing R₁\ninst✝⁶ : NonUnitalNormedRing R₂\ninst✝⁵ : StarRing R₂\ninst✝⁴ : CstarRing R₂\ninst✝³ : (i : ι) → NonUnitalNormedRing (R i)\ninst✝² : (i : ι) → StarRing (R i)\ninst✝¹ : Fintype ι\ninst✝ : ∀ (i : ι), CstarRing (R i)\nx : (i : ι) → R i\n⊢ (fun x => x ^ 2) ⊥ = ⊥\n[PROOFSTEP]\nsimp\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nα : Type u_3\ninst✝³ : NormedRing E\ninst✝² : StarRing E\ninst✝¹ : CstarRing E\ninst✝ : Nontrivial E\n⊢ ‖1‖ = 1\n[PROOFSTEP]\nhave : 0 < ‖(1 : E)‖ := norm_pos_iff.mpr one_ne_zero\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nα : Type u_3\ninst✝³ : NormedRing E\ninst✝² : StarRing E\ninst✝¹ : CstarRing E\ninst✝ : Nontrivial E\nthis : 0 < ‖1‖\n⊢ ‖1‖ = 1\n[PROOFSTEP]\nrw [← mul_left_inj' this.ne', ← norm_star_mul_self, mul_one, star_one, one_mul]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nα : Type u_3\ninst✝³ : NormedRing E\ninst✝² : StarRing E\ninst✝¹ : CstarRing E\ninst✝ : Nontrivial E\nU : { x // x ∈ unitary E }\n⊢ ‖↑U‖ = 1\n[PROOFSTEP]\nrw [← sq_eq_sq (norm_nonneg _) zero_le_one, one_pow 2, sq, ← CstarRing.norm_star_mul_self, unitary.coe_star_mul_self,\n  CstarRing.norm_one]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nα : Type u_3\ninst✝² : NormedRing E\ninst✝¹ : StarRing E\ninst✝ : CstarRing E\nU : { x // x ∈ unitary E }\nA : E\n⊢ ‖↑U * A‖ = ‖A‖\n[PROOFSTEP]\nnontriviality E\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nα : Type u_3\ninst✝² : NormedRing E\ninst✝¹ : StarRing E\ninst✝ : CstarRing E\nU : { x // x ∈ unitary E }\nA : E\n✝ : Nontrivial E\n⊢ ‖↑U * A‖ = ‖A‖\n[PROOFSTEP]\nrefine' le_antisymm _ _\n[GOAL]\ncase refine'_1\n𝕜 : Type u_1\nE : Type u_2\nα : Type u_3\ninst✝² : NormedRing E\ninst✝¹ : StarRing E\ninst✝ : CstarRing E\nU : { x // x ∈ unitary E }\nA : E\n✝ : Nontrivial E\n⊢ ‖↑U * A‖ ≤ ‖A‖\n[PROOFSTEP]\ncalc\n  _ ≤ ‖(U : E)‖ * ‖A‖ := norm_mul_le _ _\n  _ = ‖A‖ := by rw [norm_coe_unitary, one_mul]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nα : Type u_3\ninst✝² : NormedRing E\ninst✝¹ : StarRing E\ninst✝ : CstarRing E\nU : { x // x ∈ unitary E }\nA : E\n✝ : Nontrivial E\n⊢ ‖↑U‖ * ‖A‖ = ‖A‖\n[PROOFSTEP]\nrw [norm_coe_unitary, one_mul]\n[GOAL]\ncase refine'_2\n𝕜 : Type u_1\nE : Type u_2\nα : Type u_3\ninst✝² : NormedRing E\ninst✝¹ : StarRing E\ninst✝ : CstarRing E\nU : { x // x ∈ unitary E }\nA : E\n✝ : Nontrivial E\n⊢ ‖A‖ ≤ ‖↑U * A‖\n[PROOFSTEP]\ncalc\n  _ = ‖(U : E)⋆ * U * A‖ := by rw [unitary.coe_star_mul_self U, one_mul]\n  _ ≤ ‖(U : E)⋆‖ * ‖(U : E) * A‖ := by\n    rw [mul_assoc]\n    exact norm_mul_le _ _\n  _ = ‖(U : E) * A‖ := by rw [norm_star, norm_coe_unitary, one_mul]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nα : Type u_3\ninst✝² : NormedRing E\ninst✝¹ : StarRing E\ninst✝ : CstarRing E\nU : { x // x ∈ unitary E }\nA : E\n✝ : Nontrivial E\n⊢ ‖A‖ = ‖(↑U)⋆ * ↑U * A‖\n[PROOFSTEP]\nrw [unitary.coe_star_mul_self U, one_mul]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nα : Type u_3\ninst✝² : NormedRing E\ninst✝¹ : StarRing E\ninst✝ : CstarRing E\nU : { x // x ∈ unitary E }\nA : E\n✝ : Nontrivial E\n⊢ ‖(↑U)⋆ * ↑U * A‖ ≤ ‖(↑U)⋆‖ * ‖↑U * A‖\n[PROOFSTEP]\nrw [mul_assoc]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nα : Type u_3\ninst✝² : NormedRing E\ninst✝¹ : StarRing E\ninst✝ : CstarRing E\nU : { x // x ∈ unitary E }\nA : E\n✝ : Nontrivial E\n⊢ ‖(↑U)⋆ * (↑U * A)‖ ≤ ‖(↑U)⋆‖ * ‖↑U * A‖\n[PROOFSTEP]\nexact norm_mul_le _ _\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nα : Type u_3\ninst✝² : NormedRing E\ninst✝¹ : StarRing E\ninst✝ : CstarRing E\nU : { x // x ∈ unitary E }\nA : E\n✝ : Nontrivial E\n⊢ ‖(↑U)⋆‖ * ‖↑U * A‖ = ‖↑U * A‖\n[PROOFSTEP]\nrw [norm_star, norm_coe_unitary, one_mul]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nα : Type u_3\ninst✝² : NormedRing E\ninst✝¹ : StarRing E\ninst✝ : CstarRing E\nA : E\nU : { x // x ∈ unitary E }\n⊢ ‖A * ↑U‖ = ‖((↑U)⋆ * A⋆)⋆‖\n[PROOFSTEP]\nsimp only [star_star, star_mul]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nα : Type u_3\ninst✝² : NormedRing E\ninst✝¹ : StarRing E\ninst✝ : CstarRing E\nA : E\nU : { x // x ∈ unitary E }\n⊢ ‖((↑U)⋆ * A⋆)⋆‖ = ‖(↑U)⋆ * A⋆‖\n[PROOFSTEP]\nrw [norm_star]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nα : Type u_3\ninst✝² : NormedRing E\ninst✝¹ : StarRing E\ninst✝ : CstarRing E\nx : E\nhx : IsSelfAdjoint x\nn : ℕ\n⊢ ‖x ^ 2 ^ n‖₊ = ‖x‖₊ ^ 2 ^ n\n[PROOFSTEP]\ninduction' n with k hk\n[GOAL]\ncase zero\n𝕜 : Type u_1\nE : Type u_2\nα : Type u_3\ninst✝² : NormedRing E\ninst✝¹ : StarRing E\ninst✝ : CstarRing E\nx : E\nhx : IsSelfAdjoint x\n⊢ ‖x ^ 2 ^ Nat.zero‖₊ = ‖x‖₊ ^ 2 ^ Nat.zero\n[PROOFSTEP]\nsimp only [pow_zero, pow_one, Nat.zero_eq]\n[GOAL]\ncase succ\n𝕜 : Type u_1\nE : Type u_2\nα : Type u_3\ninst✝² : NormedRing E\ninst✝¹ : StarRing E\ninst✝ : CstarRing E\nx : E\nhx : IsSelfAdjoint x\nk : ℕ\nhk : ‖x ^ 2 ^ k‖₊ = ‖x‖₊ ^ 2 ^ k\n⊢ ‖x ^ 2 ^ Nat.succ k‖₊ = ‖x‖₊ ^ 2 ^ Nat.succ k\n[PROOFSTEP]\nrw [pow_succ, pow_mul', sq]\n[GOAL]\ncase succ\n𝕜 : Type u_1\nE : Type u_2\nα : Type u_3\ninst✝² : NormedRing E\ninst✝¹ : StarRing E\ninst✝ : CstarRing E\nx : E\nhx : IsSelfAdjoint x\nk : ℕ\nhk : ‖x ^ 2 ^ k‖₊ = ‖x‖₊ ^ 2 ^ k\n⊢ ‖x ^ 2 ^ k * x ^ 2 ^ k‖₊ = ‖x‖₊ ^ (2 * 2 ^ k)\n[PROOFSTEP]\nnth_rw 1 [← selfAdjoint.mem_iff.mp hx]\n[GOAL]\ncase succ\n𝕜 : Type u_1\nE : Type u_2\nα : Type u_3\ninst✝² : NormedRing E\ninst✝¹ : StarRing E\ninst✝ : CstarRing E\nx : E\nhx : IsSelfAdjoint x\nk : ℕ\nhk : ‖x ^ 2 ^ k‖₊ = ‖x‖₊ ^ 2 ^ k\n⊢ ‖x⋆ ^ 2 ^ k * x ^ 2 ^ k‖₊ = ‖x‖₊ ^ (2 * 2 ^ k)\n[PROOFSTEP]\nrw [← star_pow, CstarRing.nnnorm_star_mul_self, ← sq, hk, pow_mul']\n", "meta": {"mathlib_filename": "Mathlib.Analysis.NormedSpace.Star.Basic", "llama_tokens": 10779, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8311430562234877, "lm_q2_score": 0.6370307806984444, "lm_q1q2_score": 0.5294637099781395}}
{"text": "[GOAL]\nα : Sort u_1\nβ : Sort u_2\nγ : Sort u_3\nh : Nonempty α\ninst✝ : IsEmpty β\n⊢ IsEmpty (α → β)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Sort u_1\nβ : Sort u_2\nγ : Sort u_3\np : Prop\n⊢ IsEmpty p ↔ ¬p\n[PROOFSTEP]\nsimp only [← not_nonempty_iff, nonempty_Prop]\n[GOAL]\nα : Sort u_1\nβ : Sort u_2\nγ : Sort u_3\nπ : α → Sort u_4\n⊢ IsEmpty ((a : α) → π a) ↔ ∃ a, IsEmpty (π a)\n[PROOFSTEP]\nsimp only [← not_nonempty_iff, Classical.nonempty_pi, not_forall]\n[GOAL]\nα✝ : Sort u_1\nβ : Sort u_2\nγ : Sort u_3\nα : Type u_5\nE : α → Type u_4\n⊢ IsEmpty (Sigma E) ↔ ∀ (a : α), IsEmpty (E a)\n[PROOFSTEP]\nsimp only [← not_nonempty_iff, nonempty_sigma, not_exists]\n[GOAL]\nα✝ : Sort u_1\nβ : Sort u_2\nγ : Sort u_3\nα : Sort u_5\nE : α → Sort u_4\n⊢ IsEmpty (PSigma E) ↔ ∀ (a : α), IsEmpty (E a)\n[PROOFSTEP]\nsimp only [← not_nonempty_iff, nonempty_psigma, not_exists]\n[GOAL]\nα : Sort u_1\nβ : Sort u_2\nγ : Sort u_3\np : α → Prop\n⊢ IsEmpty (Subtype p) ↔ ∀ (x : α), ¬p x\n[PROOFSTEP]\nsimp only [← not_nonempty_iff, nonempty_subtype, not_exists]\n[GOAL]\nα✝ : Sort u_1\nβ✝ : Sort u_2\nγ : Sort u_3\nα : Type u_4\nβ : Type u_5\n⊢ IsEmpty (α × β) ↔ IsEmpty α ∨ IsEmpty β\n[PROOFSTEP]\nsimp only [← not_nonempty_iff, nonempty_prod, not_and_or]\n[GOAL]\nα : Sort u_1\nβ : Sort u_2\nγ : Sort u_3\n⊢ IsEmpty (PProd α β) ↔ IsEmpty α ∨ IsEmpty β\n[PROOFSTEP]\nsimp only [← not_nonempty_iff, nonempty_pprod, not_and_or]\n[GOAL]\nα✝ : Sort u_1\nβ✝ : Sort u_2\nγ : Sort u_3\nα : Type u_4\nβ : Type u_5\n⊢ IsEmpty (α ⊕ β) ↔ IsEmpty α ∧ IsEmpty β\n[PROOFSTEP]\nsimp only [← not_nonempty_iff, nonempty_sum, not_or]\n[GOAL]\nα✝ : Sort u_1\nβ✝ : Sort u_2\nγ : Sort u_3\nα : Sort u_4\nβ : Sort u_5\n⊢ IsEmpty (α ⊕' β) ↔ IsEmpty α ∧ IsEmpty β\n[PROOFSTEP]\nsimp only [← not_nonempty_iff, nonempty_psum, not_or]\n[GOAL]\nα✝ : Sort u_1\nβ : Sort u_2\nγ : Sort u_3\nα : Type u_4\n⊢ IsEmpty (ULift α) ↔ IsEmpty α\n[PROOFSTEP]\nsimp only [← not_nonempty_iff, nonempty_ulift]\n[GOAL]\nα✝ : Sort u_1\nβ : Sort u_2\nγ : Sort u_3\nα : Sort u_4\n⊢ IsEmpty (PLift α) ↔ IsEmpty α\n[PROOFSTEP]\nsimp only [← not_nonempty_iff, nonempty_plift]\n", "meta": {"mathlib_filename": "Mathlib.Logic.IsEmpty", "llama_tokens": 1017, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.795658090372256, "lm_q2_score": 0.665410558746814, "lm_q1q2_score": 0.5294392944860259}}
{"text": "[GOAL]\nα : Type u_1\ninst✝⁵ : AddCommSemigroup α\ninst✝⁴ : PartialOrder α\ninst✝³ : ExistsAddOfLE α\ninst✝² : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na b c d : α\nh : a ≤ b\n⊢ a + (b - a) = b\n[PROOFSTEP]\nrefine' le_antisymm _ le_add_tsub\n[GOAL]\nα : Type u_1\ninst✝⁵ : AddCommSemigroup α\ninst✝⁴ : PartialOrder α\ninst✝³ : ExistsAddOfLE α\ninst✝² : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na b c d : α\nh : a ≤ b\n⊢ a + (b - a) ≤ b\n[PROOFSTEP]\nobtain ⟨c, rfl⟩ := exists_add_of_le h\n[GOAL]\ncase intro\nα : Type u_1\ninst✝⁵ : AddCommSemigroup α\ninst✝⁴ : PartialOrder α\ninst✝³ : ExistsAddOfLE α\ninst✝² : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na c✝ d c : α\nh : a ≤ a + c\n⊢ a + (a + c - a) ≤ a + c\n[PROOFSTEP]\nexact add_le_add_left add_tsub_le_left a\n[GOAL]\nα : Type u_1\ninst✝⁵ : AddCommSemigroup α\ninst✝⁴ : PartialOrder α\ninst✝³ : ExistsAddOfLE α\ninst✝² : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na b c d : α\nh : a ≤ b\n⊢ b - a + a = b\n[PROOFSTEP]\nrw [add_comm]\n[GOAL]\nα : Type u_1\ninst✝⁵ : AddCommSemigroup α\ninst✝⁴ : PartialOrder α\ninst✝³ : ExistsAddOfLE α\ninst✝² : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na b c d : α\nh : a ≤ b\n⊢ a + (b - a) = b\n[PROOFSTEP]\nexact add_tsub_cancel_of_le h\n[GOAL]\nα : Type u_1\ninst✝⁵ : AddCommSemigroup α\ninst✝⁴ : PartialOrder α\ninst✝³ : ExistsAddOfLE α\ninst✝² : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na b c d : α\nh : c ≤ b\n⊢ a - c ≤ b - c ↔ a ≤ b\n[PROOFSTEP]\nrw [tsub_le_iff_right, tsub_add_cancel_of_le h]\n[GOAL]\nα : Type u_1\ninst✝⁵ : AddCommSemigroup α\ninst✝⁴ : PartialOrder α\ninst✝³ : ExistsAddOfLE α\ninst✝² : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na b c d : α\nh1 : c ≤ a\nh2 : c ≤ b\n⊢ a - c = b - c ↔ a = b\n[PROOFSTEP]\nsimp_rw [le_antisymm_iff, tsub_le_tsub_iff_right h1, tsub_le_tsub_iff_right h2]\n[GOAL]\nα : Type u_1\ninst✝⁵ : AddCommSemigroup α\ninst✝⁴ : PartialOrder α\ninst✝³ : ExistsAddOfLE α\ninst✝² : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na b c d : α\nh : c ≤ b\nh2 : a - c < b - c\n⊢ a < b\n[PROOFSTEP]\nrefine' ((tsub_le_tsub_iff_right h).mp h2.le).lt_of_ne _\n[GOAL]\nα : Type u_1\ninst✝⁵ : AddCommSemigroup α\ninst✝⁴ : PartialOrder α\ninst✝³ : ExistsAddOfLE α\ninst✝² : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na b c d : α\nh : c ≤ b\nh2 : a - c < b - c\n⊢ a ≠ b\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nα : Type u_1\ninst✝⁵ : AddCommSemigroup α\ninst✝⁴ : PartialOrder α\ninst✝³ : ExistsAddOfLE α\ninst✝² : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na c d : α\nh : c ≤ a\nh2 : a - c < a - c\n⊢ False\n[PROOFSTEP]\nexact h2.false\n[GOAL]\nα : Type u_1\ninst✝⁵ : AddCommSemigroup α\ninst✝⁴ : PartialOrder α\ninst✝³ : ExistsAddOfLE α\ninst✝² : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na b c d : α\nhab : b ≤ a\nhcb : c ≤ b\n⊢ a - b + (b - c) = a - c\n[PROOFSTEP]\nconvert tsub_add_cancel_of_le (tsub_le_tsub_right hab c) using 2\n[GOAL]\ncase h.e'_2.h.e'_5\nα : Type u_1\ninst✝⁵ : AddCommSemigroup α\ninst✝⁴ : PartialOrder α\ninst✝³ : ExistsAddOfLE α\ninst✝² : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na b c d : α\nhab : b ≤ a\nhcb : c ≤ b\n⊢ a - b = a - c - (b - c)\n[PROOFSTEP]\nrw [tsub_tsub, add_tsub_cancel_of_le hcb]\n[GOAL]\nα : Type u_1\ninst✝⁵ : AddCommSemigroup α\ninst✝⁴ : PartialOrder α\ninst✝³ : ExistsAddOfLE α\ninst✝² : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na b c d : α\nh : c ≤ b\n⊢ a - c - (b - c) = a - b\n[PROOFSTEP]\nrw [tsub_tsub, add_tsub_cancel_of_le h]\n[GOAL]\nα : Type u_1\ninst✝⁵ : AddCommSemigroup α\ninst✝⁴ : PartialOrder α\ninst✝³ : ExistsAddOfLE α\ninst✝² : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na b c d : α\nhc : AddLECancellable c\nh : c ≤ b\n⊢ a = b - c → a + c = b\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nα : Type u_1\ninst✝⁵ : AddCommSemigroup α\ninst✝⁴ : PartialOrder α\ninst✝³ : ExistsAddOfLE α\ninst✝² : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\nb c d : α\nhc : AddLECancellable c\nh : c ≤ b\n⊢ b - c + c = b\n[PROOFSTEP]\nexact tsub_add_cancel_of_le h\n[GOAL]\nα : Type u_1\ninst✝⁵ : AddCommSemigroup α\ninst✝⁴ : PartialOrder α\ninst✝³ : ExistsAddOfLE α\ninst✝² : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na b c d : α\nhb : AddLECancellable b\nh : b ≤ a\n⊢ a - b = c ↔ a = c + b\n[PROOFSTEP]\nrw [eq_comm, hb.eq_tsub_iff_add_eq_of_le h, eq_comm]\n[GOAL]\nα : Type u_1\ninst✝⁵ : AddCommSemigroup α\ninst✝⁴ : PartialOrder α\ninst✝³ : ExistsAddOfLE α\ninst✝² : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na✝ b c d : α\nhc : AddLECancellable c\nh : c ≤ b\na : α\n⊢ a + b - c = a + (b - c)\n[PROOFSTEP]\nconv_lhs => rw [← add_tsub_cancel_of_le h, add_comm c, ← add_assoc, hc.add_tsub_cancel_right]\n[GOAL]\nα : Type u_1\ninst✝⁵ : AddCommSemigroup α\ninst✝⁴ : PartialOrder α\ninst✝³ : ExistsAddOfLE α\ninst✝² : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na✝ b c d : α\nhc : AddLECancellable c\nh : c ≤ b\na : α\n| a + b - c\n[PROOFSTEP]\nrw [← add_tsub_cancel_of_le h, add_comm c, ← add_assoc, hc.add_tsub_cancel_right]\n[GOAL]\nα : Type u_1\ninst✝⁵ : AddCommSemigroup α\ninst✝⁴ : PartialOrder α\ninst✝³ : ExistsAddOfLE α\ninst✝² : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na✝ b c d : α\nhc : AddLECancellable c\nh : c ≤ b\na : α\n| a + b - c\n[PROOFSTEP]\nrw [← add_tsub_cancel_of_le h, add_comm c, ← add_assoc, hc.add_tsub_cancel_right]\n[GOAL]\nα : Type u_1\ninst✝⁵ : AddCommSemigroup α\ninst✝⁴ : PartialOrder α\ninst✝³ : ExistsAddOfLE α\ninst✝² : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na✝ b c d : α\nhc : AddLECancellable c\nh : c ≤ b\na : α\n| a + b - c\n[PROOFSTEP]\nrw [← add_tsub_cancel_of_le h, add_comm c, ← add_assoc, hc.add_tsub_cancel_right]\n[GOAL]\nα : Type u_1\ninst✝⁵ : AddCommSemigroup α\ninst✝⁴ : PartialOrder α\ninst✝³ : ExistsAddOfLE α\ninst✝² : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na b c d : α\nhb : AddLECancellable b\nh : b ≤ a\n⊢ a - b + c = a + c - b\n[PROOFSTEP]\nrw [add_comm a, hb.add_tsub_assoc_of_le h, add_comm]\n[GOAL]\nα : Type u_1\ninst✝⁵ : AddCommSemigroup α\ninst✝⁴ : PartialOrder α\ninst✝³ : ExistsAddOfLE α\ninst✝² : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na b c d : α\nhbc : AddLECancellable (b - c)\nh₁ : b ≤ a\nh₂ : c ≤ b\n⊢ a = a - b + c + (b - c)\n[PROOFSTEP]\nrw [add_assoc, add_tsub_cancel_of_le h₂, tsub_add_cancel_of_le h₁]\n[GOAL]\nα : Type u_1\ninst✝⁵ : AddCommSemigroup α\ninst✝⁴ : PartialOrder α\ninst✝³ : ExistsAddOfLE α\ninst✝² : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na b c d : α\nhb : AddLECancellable b\nhd : AddLECancellable d\nhba : b ≤ a\nhdc : d ≤ c\n⊢ a - b + (c - d) = a + c - (b + d)\n[PROOFSTEP]\nrw [hb.tsub_add_eq_add_tsub hba, ← hd.add_tsub_assoc_of_le hdc, tsub_tsub, add_comm d]\n[GOAL]\nα : Type u_1\ninst✝⁵ : AddCommSemigroup α\ninst✝⁴ : PartialOrder α\ninst✝³ : ExistsAddOfLE α\ninst✝² : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na b c d : α\nha : AddLECancellable a\nh : a ≤ c\n⊢ b ≤ c - a ↔ b + a ≤ c\n[PROOFSTEP]\nrw [add_comm]\n[GOAL]\nα : Type u_1\ninst✝⁵ : AddCommSemigroup α\ninst✝⁴ : PartialOrder α\ninst✝³ : ExistsAddOfLE α\ninst✝² : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na b c d : α\nha : AddLECancellable a\nh : a ≤ c\n⊢ b ≤ c - a ↔ a + b ≤ c\n[PROOFSTEP]\nexact ha.le_tsub_iff_left h\n[GOAL]\nα : Type u_1\ninst✝⁵ : AddCommSemigroup α\ninst✝⁴ : PartialOrder α\ninst✝³ : ExistsAddOfLE α\ninst✝² : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na b c d : α\nhb : AddLECancellable b\nhba : b ≤ a\n⊢ a - b < c ↔ a < b + c\n[PROOFSTEP]\nrefine' ⟨hb.lt_add_of_tsub_lt_left, _⟩\n[GOAL]\nα : Type u_1\ninst✝⁵ : AddCommSemigroup α\ninst✝⁴ : PartialOrder α\ninst✝³ : ExistsAddOfLE α\ninst✝² : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na b c d : α\nhb : AddLECancellable b\nhba : b ≤ a\n⊢ a < b + c → a - b < c\n[PROOFSTEP]\nintro h\n[GOAL]\nα : Type u_1\ninst✝⁵ : AddCommSemigroup α\ninst✝⁴ : PartialOrder α\ninst✝³ : ExistsAddOfLE α\ninst✝² : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na b c d : α\nhb : AddLECancellable b\nhba : b ≤ a\nh : a < b + c\n⊢ a - b < c\n[PROOFSTEP]\nrefine' (tsub_le_iff_left.mpr h.le).lt_of_ne _\n[GOAL]\nα : Type u_1\ninst✝⁵ : AddCommSemigroup α\ninst✝⁴ : PartialOrder α\ninst✝³ : ExistsAddOfLE α\ninst✝² : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na b c d : α\nhb : AddLECancellable b\nhba : b ≤ a\nh : a < b + c\n⊢ a - b ≠ c\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nα : Type u_1\ninst✝⁵ : AddCommSemigroup α\ninst✝⁴ : PartialOrder α\ninst✝³ : ExistsAddOfLE α\ninst✝² : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na b d : α\nhb : AddLECancellable b\nhba : b ≤ a\nh : a < b + (a - b)\n⊢ False\n[PROOFSTEP]\nexact h.ne' (add_tsub_cancel_of_le hba)\n[GOAL]\nα : Type u_1\ninst✝⁵ : AddCommSemigroup α\ninst✝⁴ : PartialOrder α\ninst✝³ : ExistsAddOfLE α\ninst✝² : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na b c d : α\nhb : AddLECancellable b\nhba : b ≤ a\n⊢ a - b < c ↔ a < c + b\n[PROOFSTEP]\nrw [add_comm]\n[GOAL]\nα : Type u_1\ninst✝⁵ : AddCommSemigroup α\ninst✝⁴ : PartialOrder α\ninst✝³ : ExistsAddOfLE α\ninst✝² : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na b c d : α\nhb : AddLECancellable b\nhba : b ≤ a\n⊢ a - b < c ↔ a < b + c\n[PROOFSTEP]\nexact hb.tsub_lt_iff_left hba\n[GOAL]\nα : Type u_1\ninst✝⁵ : AddCommSemigroup α\ninst✝⁴ : PartialOrder α\ninst✝³ : ExistsAddOfLE α\ninst✝² : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na b c d : α\nhb : AddLECancellable b\nhc : AddLECancellable c\nh₁ : b ≤ a\nh₂ : c ≤ a\n⊢ a - b < c ↔ a - c < b\n[PROOFSTEP]\nrw [hb.tsub_lt_iff_left h₁, hc.tsub_lt_iff_right h₂]\n[GOAL]\nα : Type u_1\ninst✝⁵ : AddCommSemigroup α\ninst✝⁴ : PartialOrder α\ninst✝³ : ExistsAddOfLE α\ninst✝² : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na b c d : α\nha : AddLECancellable a\nhc : AddLECancellable c\nh₁ : a ≤ b\nh₂ : c ≤ b\n⊢ a ≤ b - c ↔ c ≤ b - a\n[PROOFSTEP]\nrw [ha.le_tsub_iff_left h₁, hc.le_tsub_iff_right h₂]\n[GOAL]\nα : Type u_1\ninst✝⁵ : AddCommSemigroup α\ninst✝⁴ : PartialOrder α\ninst✝³ : ExistsAddOfLE α\ninst✝² : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na b c d : α\nhc : AddLECancellable c\nh : c ≤ b\n⊢ a < b - c ↔ a + c < b\n[PROOFSTEP]\nrefine' ⟨fun h' => (add_le_of_le_tsub_right_of_le h h'.le).lt_of_ne _, hc.lt_tsub_of_add_lt_right⟩\n[GOAL]\nα : Type u_1\ninst✝⁵ : AddCommSemigroup α\ninst✝⁴ : PartialOrder α\ninst✝³ : ExistsAddOfLE α\ninst✝² : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na b c d : α\nhc : AddLECancellable c\nh : c ≤ b\nh' : a < b - c\n⊢ a + c ≠ b\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nα : Type u_1\ninst✝⁵ : AddCommSemigroup α\ninst✝⁴ : PartialOrder α\ninst✝³ : ExistsAddOfLE α\ninst✝² : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na c d : α\nhc : AddLECancellable c\nh : c ≤ a + c\nh' : a < a + c - c\n⊢ False\n[PROOFSTEP]\nexact h'.ne' hc.add_tsub_cancel_right\n[GOAL]\nα : Type u_1\ninst✝⁵ : AddCommSemigroup α\ninst✝⁴ : PartialOrder α\ninst✝³ : ExistsAddOfLE α\ninst✝² : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na b c d : α\nhc : AddLECancellable c\nh : c ≤ b\n⊢ a < b - c ↔ c + a < b\n[PROOFSTEP]\nrw [add_comm]\n[GOAL]\nα : Type u_1\ninst✝⁵ : AddCommSemigroup α\ninst✝⁴ : PartialOrder α\ninst✝³ : ExistsAddOfLE α\ninst✝² : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na b c d : α\nhc : AddLECancellable c\nh : c ≤ b\n⊢ a < b - c ↔ a + c < b\n[PROOFSTEP]\nexact hc.lt_tsub_iff_right_of_le h\n[GOAL]\nα : Type u_1\ninst✝⁵ : AddCommSemigroup α\ninst✝⁴ : PartialOrder α\ninst✝³ : ExistsAddOfLE α\ninst✝² : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na b c d : α\nhab : AddLECancellable (a - b)\nh₁ : b ≤ a\nh₂ : c ≤ a\nh₃ : a - b = a - c\n⊢ b = c\n[PROOFSTEP]\nrw [← hab.inj]\n[GOAL]\nα : Type u_1\ninst✝⁵ : AddCommSemigroup α\ninst✝⁴ : PartialOrder α\ninst✝³ : ExistsAddOfLE α\ninst✝² : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na b c d : α\nhab : AddLECancellable (a - b)\nh₁ : b ≤ a\nh₂ : c ≤ a\nh₃ : a - b = a - c\n⊢ a - b + b = a - b + c\n[PROOFSTEP]\nrw [tsub_add_cancel_of_le h₁, h₃, tsub_add_cancel_of_le h₂]\n[GOAL]\nα : Type u_1\ninst✝⁶ : AddCommSemigroup α\ninst✝⁵ : PartialOrder α\ninst✝⁴ : ExistsAddOfLE α\ninst✝³ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\ninst✝² : Sub α\ninst✝¹ : OrderedSub α\na b c d : α\ninst✝ : ContravariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x < x_1\nhb : AddLECancellable b\nhca : c ≤ a\nh : a - b < a - c\n⊢ c < b\n[PROOFSTEP]\nconv_lhs at h => rw [← tsub_add_cancel_of_le hca]\n[GOAL]\nα : Type u_1\ninst✝⁶ : AddCommSemigroup α\ninst✝⁵ : PartialOrder α\ninst✝⁴ : ExistsAddOfLE α\ninst✝³ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\ninst✝² : Sub α\ninst✝¹ : OrderedSub α\na b c d : α\ninst✝ : ContravariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x < x_1\nhb : AddLECancellable b\nhca : c ≤ a\nh : a - b < a - c\n| a - b\n[PROOFSTEP]\nrw [← tsub_add_cancel_of_le hca]\n[GOAL]\nα : Type u_1\ninst✝⁶ : AddCommSemigroup α\ninst✝⁵ : PartialOrder α\ninst✝⁴ : ExistsAddOfLE α\ninst✝³ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\ninst✝² : Sub α\ninst✝¹ : OrderedSub α\na b c d : α\ninst✝ : ContravariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x < x_1\nhb : AddLECancellable b\nhca : c ≤ a\nh : a - b < a - c\n| a - b\n[PROOFSTEP]\nrw [← tsub_add_cancel_of_le hca]\n[GOAL]\nα : Type u_1\ninst✝⁶ : AddCommSemigroup α\ninst✝⁵ : PartialOrder α\ninst✝⁴ : ExistsAddOfLE α\ninst✝³ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\ninst✝² : Sub α\ninst✝¹ : OrderedSub α\na b c d : α\ninst✝ : ContravariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x < x_1\nhb : AddLECancellable b\nhca : c ≤ a\nh : a - b < a - c\n| a - b\n[PROOFSTEP]\nrw [← tsub_add_cancel_of_le hca]\n[GOAL]\nα : Type u_1\ninst✝⁶ : AddCommSemigroup α\ninst✝⁵ : PartialOrder α\ninst✝⁴ : ExistsAddOfLE α\ninst✝³ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\ninst✝² : Sub α\ninst✝¹ : OrderedSub α\na b c d : α\ninst✝ : ContravariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x < x_1\nhb : AddLECancellable b\nhca : c ≤ a\nh : a - c + c - b < a - c\n⊢ c < b\n[PROOFSTEP]\nexact lt_of_add_lt_add_left (hb.lt_add_of_tsub_lt_right h)\n[GOAL]\nα : Type u_1\ninst✝⁵ : AddCommSemigroup α\ninst✝⁴ : PartialOrder α\ninst✝³ : ExistsAddOfLE α\ninst✝² : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na b c d : α\nhc : AddLECancellable c\nh : c ≤ a\nh2 : a < b\n⊢ a - c < b - c\n[PROOFSTEP]\napply hc.lt_tsub_of_add_lt_left\n[GOAL]\nα : Type u_1\ninst✝⁵ : AddCommSemigroup α\ninst✝⁴ : PartialOrder α\ninst✝³ : ExistsAddOfLE α\ninst✝² : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na b c d : α\nhc : AddLECancellable c\nh : c ≤ a\nh2 : a < b\n⊢ c + (a - c) < b\n[PROOFSTEP]\nrwa [add_tsub_cancel_of_le h]\n[GOAL]\nα : Type u_1\ninst✝⁵ : AddCommSemigroup α\ninst✝⁴ : PartialOrder α\ninst✝³ : ExistsAddOfLE α\ninst✝² : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na b c d : α\nhac : AddLECancellable (a - c)\nh : c ≤ a\n⊢ a + b = b + c + (a - c)\n[PROOFSTEP]\nrw [add_assoc, add_tsub_cancel_of_le h, add_comm]\n[GOAL]\nα : Type u_1\ninst✝⁵ : AddCommSemigroup α\ninst✝⁴ : PartialOrder α\ninst✝³ : ExistsAddOfLE α\ninst✝² : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na b c d : α\nhab : AddLECancellable (a - b)\nh : b ≤ a\n⊢ a - c - (a - b) = b - c\n[PROOFSTEP]\nrw [tsub_right_comm, hab.tsub_tsub_cancel_of_le h]\n[GOAL]\nα : Type u_1\ninst✝² : CanonicallyOrderedAddMonoid α\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na b c d : α\n⊢ b - a + a = b ↔ a ≤ b\n[PROOFSTEP]\nrw [add_comm]\n[GOAL]\nα : Type u_1\ninst✝² : CanonicallyOrderedAddMonoid α\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na b c d : α\n⊢ a + (b - a) = b ↔ a ≤ b\n[PROOFSTEP]\nexact add_tsub_cancel_iff_le\n[GOAL]\nα : Type u_1\ninst✝² : CanonicallyOrderedAddMonoid α\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na b c d : α\n⊢ a - b = 0 ↔ a ≤ b\n[PROOFSTEP]\nrw [← nonpos_iff_eq_zero, tsub_le_iff_left, add_zero]\n[GOAL]\nα : Type u_1\ninst✝² : CanonicallyOrderedAddMonoid α\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na b c d : α\n⊢ 0 < a - b ↔ ¬a ≤ b\n[PROOFSTEP]\nrw [pos_iff_ne_zero, Ne.def, tsub_eq_zero_iff_le]\n[GOAL]\nα : Type u_1\ninst✝² : CanonicallyOrderedAddMonoid α\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na b c d : α\nha : AddLECancellable a\nhc : AddLECancellable c\nh : c ≤ a\n⊢ a - b ≤ a - c ↔ c ≤ b\n[PROOFSTEP]\nrefine' ⟨_, fun h => tsub_le_tsub_left h a⟩\n[GOAL]\nα : Type u_1\ninst✝² : CanonicallyOrderedAddMonoid α\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na b c d : α\nha : AddLECancellable a\nhc : AddLECancellable c\nh : c ≤ a\n⊢ a - b ≤ a - c → c ≤ b\n[PROOFSTEP]\nrw [tsub_le_iff_left, ← hc.add_tsub_assoc_of_le h, hc.le_tsub_iff_right (h.trans le_add_self), add_comm b]\n[GOAL]\nα : Type u_1\ninst✝² : CanonicallyOrderedAddMonoid α\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na b c d : α\nha : AddLECancellable a\nhc : AddLECancellable c\nh : c ≤ a\n⊢ a + c ≤ a + b → c ≤ b\n[PROOFSTEP]\napply ha\n[GOAL]\nα : Type u_1\ninst✝² : CanonicallyOrderedAddMonoid α\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na b c d : α\nha : AddLECancellable a\nhb : AddLECancellable b\nhc : AddLECancellable c\nhba : b ≤ a\nhca : c ≤ a\n⊢ a - b = a - c ↔ b = c\n[PROOFSTEP]\nsimp_rw [le_antisymm_iff, ha.tsub_le_tsub_iff_left hb hba, ha.tsub_le_tsub_iff_left hc hca, and_comm]\n[GOAL]\nα : Type u_1\ninst✝³ : CanonicallyOrderedAddMonoid α\ninst✝² : Sub α\ninst✝¹ : OrderedSub α\na b c d : α\ninst✝ : ContravariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\n⊢ AddCommMonoid α\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u_1\ninst✝³ : CanonicallyOrderedAddMonoid α\ninst✝² : Sub α\ninst✝¹ : OrderedSub α\na✝ b✝ c✝ d : α\ninst✝ : ContravariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\nsrc✝ : AddCommMonoid α := inferInstance\na b c : α\nh : a + b = a + c\n⊢ b = c\n[PROOFSTEP]\nsimpa only [add_tsub_cancel_left] using congr_arg (fun x => x - a) h\n[GOAL]\nα : Type u_1\ninst✝² : CanonicallyLinearOrderedAddMonoid α\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na b c d : α\n⊢ 0 < a - b ↔ b < a\n[PROOFSTEP]\nrw [tsub_pos_iff_not_le, not_le]\n[GOAL]\nα : Type u_1\ninst✝² : CanonicallyLinearOrderedAddMonoid α\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na✝ b✝ c d a b : α\n⊢ a - b = a - min a b\n[PROOFSTEP]\ncases' le_total a b with h h\n[GOAL]\ncase inl\nα : Type u_1\ninst✝² : CanonicallyLinearOrderedAddMonoid α\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na✝ b✝ c d a b : α\nh : a ≤ b\n⊢ a - b = a - min a b\n[PROOFSTEP]\nrw [min_eq_left h, tsub_self, tsub_eq_zero_of_le h]\n[GOAL]\ncase inr\nα : Type u_1\ninst✝² : CanonicallyLinearOrderedAddMonoid α\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na✝ b✝ c d a b : α\nh : b ≤ a\n⊢ a - b = a - min a b\n[PROOFSTEP]\nrw [min_eq_right h]\n[GOAL]\nα : Type u_1\ninst✝² : CanonicallyLinearOrderedAddMonoid α\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na b c d : α\nhc : AddLECancellable c\nh : c ≤ a\n⊢ a - c < b - c ↔ a < b\n[PROOFSTEP]\nrw [hc.lt_tsub_iff_left, add_tsub_cancel_of_le h]\n[GOAL]\nα : Type u_1\ninst✝² : CanonicallyLinearOrderedAddMonoid α\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na b c d : α\nha : AddLECancellable a\nh₁ : 0 < a\nh₂ : 0 < b\n⊢ a - b < a\n[PROOFSTEP]\nrefine' tsub_le_self.lt_of_ne fun h => _\n[GOAL]\nα : Type u_1\ninst✝² : CanonicallyLinearOrderedAddMonoid α\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na b c d : α\nha : AddLECancellable a\nh₁ : 0 < a\nh₂ : 0 < b\nh : a - b = a\n⊢ False\n[PROOFSTEP]\nrw [← h, tsub_pos_iff_lt] at h₁ \n[GOAL]\nα : Type u_1\ninst✝² : CanonicallyLinearOrderedAddMonoid α\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na b c d : α\nha : AddLECancellable a\nh₁ : b < a\nh₂ : 0 < b\nh : a - b = a\n⊢ False\n[PROOFSTEP]\nexact h₂.not_le (ha.add_le_iff_nonpos_left.1 <| add_le_of_le_tsub_left_of_le h₁.le h.ge)\n[GOAL]\nα : Type u_1\ninst✝² : CanonicallyLinearOrderedAddMonoid α\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na b c d : α\nha : AddLECancellable a\n⊢ a - b < a ↔ 0 < a ∧ 0 < b\n[PROOFSTEP]\nrefine' ⟨fun h => ⟨(zero_le _).trans_lt h, (zero_le b).lt_of_ne _⟩, fun h => ha.tsub_lt_self h.1 h.2⟩\n[GOAL]\nα : Type u_1\ninst✝² : CanonicallyLinearOrderedAddMonoid α\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na b c d : α\nha : AddLECancellable a\nh : a - b < a\n⊢ 0 ≠ b\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nα : Type u_1\ninst✝² : CanonicallyLinearOrderedAddMonoid α\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na c d : α\nha : AddLECancellable a\nh : a - 0 < a\n⊢ False\n[PROOFSTEP]\nrw [tsub_zero] at h \n[GOAL]\nα : Type u_1\ninst✝² : CanonicallyLinearOrderedAddMonoid α\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na c d : α\nha : AddLECancellable a\nh : a < a\n⊢ False\n[PROOFSTEP]\nexact h.false\n[GOAL]\nα : Type u_1\ninst✝² : CanonicallyLinearOrderedAddMonoid α\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na b c d : α\n⊢ a - b + b = max a b\n[PROOFSTEP]\ncases' le_total a b with h h\n[GOAL]\ncase inl\nα : Type u_1\ninst✝² : CanonicallyLinearOrderedAddMonoid α\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na b c d : α\nh : a ≤ b\n⊢ a - b + b = max a b\n[PROOFSTEP]\nrw [max_eq_right h, tsub_eq_zero_of_le h, zero_add]\n[GOAL]\ncase inr\nα : Type u_1\ninst✝² : CanonicallyLinearOrderedAddMonoid α\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na b c d : α\nh : b ≤ a\n⊢ a - b + b = max a b\n[PROOFSTEP]\nrw [max_eq_left h, tsub_add_cancel_of_le h]\n[GOAL]\nα : Type u_1\ninst✝² : CanonicallyLinearOrderedAddMonoid α\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na b c d : α\n⊢ a + (b - a) = max a b\n[PROOFSTEP]\nrw [add_comm, max_comm, tsub_add_eq_max]\n[GOAL]\nα : Type u_1\ninst✝² : CanonicallyLinearOrderedAddMonoid α\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na b c d : α\n⊢ a - min a b = a - b\n[PROOFSTEP]\ncases' le_total a b with h h\n[GOAL]\ncase inl\nα : Type u_1\ninst✝² : CanonicallyLinearOrderedAddMonoid α\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na b c d : α\nh : a ≤ b\n⊢ a - min a b = a - b\n[PROOFSTEP]\nrw [min_eq_left h, tsub_self, tsub_eq_zero_of_le h]\n[GOAL]\ncase inr\nα : Type u_1\ninst✝² : CanonicallyLinearOrderedAddMonoid α\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na b c d : α\nh : b ≤ a\n⊢ a - min a b = a - b\n[PROOFSTEP]\nrw [min_eq_right h]\n[GOAL]\nα : Type u_1\ninst✝² : CanonicallyLinearOrderedAddMonoid α\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na b c d : α\n⊢ a - b + min a b = a\n[PROOFSTEP]\nrw [← tsub_min, @tsub_add_cancel_of_le]\n[GOAL]\ncase h\nα : Type u_1\ninst✝² : CanonicallyLinearOrderedAddMonoid α\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na b c d : α\n⊢ min a b ≤ a\n[PROOFSTEP]\napply min_le_left\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Order.Sub.Canonical", "llama_tokens": 12336, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7431680086124811, "lm_q2_score": 0.7122321781307374, "lm_q1q2_score": 0.52930816949115}}
{"text": "[GOAL]\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝ : CommRing R\nn : ℕ\nx : 𝕎 R\nk : ℕ\n⊢ coeff (x * ↑n) k = ↑(aeval x.coeff) (wittMulN p n k)\n[PROOFSTEP]\ninduction' n with n ih generalizing k\n[GOAL]\ncase zero\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝ : CommRing R\nx : 𝕎 R\nk✝ k : ℕ\n⊢ coeff (x * ↑Nat.zero) k = ↑(aeval x.coeff) (wittMulN p Nat.zero k)\n[PROOFSTEP]\nsimp only [Nat.zero_eq, Nat.cast_zero, mul_zero, zero_coeff, wittMulN, AlgHom.map_zero, Pi.zero_apply]\n[GOAL]\ncase succ\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝ : CommRing R\nx : 𝕎 R\nk✝ n : ℕ\nih : ∀ (k : ℕ), coeff (x * ↑n) k = ↑(aeval x.coeff) (wittMulN p n k)\nk : ℕ\n⊢ coeff (x * ↑(Nat.succ n)) k = ↑(aeval x.coeff) (wittMulN p (Nat.succ n) k)\n[PROOFSTEP]\nrw [wittMulN, Nat.succ_eq_add_one, Nat.cast_add, Nat.cast_one, mul_add, mul_one, aeval_bind₁, add_coeff]\n[GOAL]\ncase succ\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝ : CommRing R\nx : 𝕎 R\nk✝ n : ℕ\nih : ∀ (k : ℕ), coeff (x * ↑n) k = ↑(aeval x.coeff) (wittMulN p n k)\nk : ℕ\n⊢ peval (wittAdd p k) ![(x * ↑n).coeff, x.coeff] =\n    ↑(aeval fun i => ↑(aeval x.coeff) (Function.uncurry ![wittMulN p n, X] i)) (wittAdd p k)\n[PROOFSTEP]\napply eval₂Hom_congr (RingHom.ext_int _ _) _ rfl\n[GOAL]\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝ : CommRing R\nx : 𝕎 R\nk✝ n : ℕ\nih : ∀ (k : ℕ), coeff (x * ↑n) k = ↑(aeval x.coeff) (wittMulN p n k)\nk : ℕ\n⊢ Function.uncurry ![(x * ↑n).coeff, x.coeff] = fun i => ↑(aeval x.coeff) (Function.uncurry ![wittMulN p n, X] i)\n[PROOFSTEP]\next1 ⟨b, i⟩\n[GOAL]\ncase h.mk\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝ : CommRing R\nx : 𝕎 R\nk✝ n : ℕ\nih : ∀ (k : ℕ), coeff (x * ↑n) k = ↑(aeval x.coeff) (wittMulN p n k)\nk : ℕ\nb : Fin 2\ni : ℕ\n⊢ Function.uncurry ![(x * ↑n).coeff, x.coeff] (b, i) = ↑(aeval x.coeff) (Function.uncurry ![wittMulN p n, X] (b, i))\n[PROOFSTEP]\nfin_cases b\n[GOAL]\ncase h.mk.head\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝ : CommRing R\nx : 𝕎 R\nk✝ n : ℕ\nih : ∀ (k : ℕ), coeff (x * ↑n) k = ↑(aeval x.coeff) (wittMulN p n k)\nk i : ℕ\n⊢ Function.uncurry ![(x * ↑n).coeff, x.coeff] ({ val := 0, isLt := (_ : 0 < 2) }, i) =\n    ↑(aeval x.coeff) (Function.uncurry ![wittMulN p n, X] ({ val := 0, isLt := (_ : 0 < 2) }, i))\n[PROOFSTEP]\nsimp [Function.uncurry, Matrix.cons_val_zero, ih]\n[GOAL]\ncase h.mk.tail.head\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝ : CommRing R\nx : 𝕎 R\nk✝ n : ℕ\nih : ∀ (k : ℕ), coeff (x * ↑n) k = ↑(aeval x.coeff) (wittMulN p n k)\nk i : ℕ\n⊢ Function.uncurry ![(x * ↑n).coeff, x.coeff] ({ val := 1, isLt := (_ : (fun a => a < 2) 1) }, i) =\n    ↑(aeval x.coeff) (Function.uncurry ![wittMulN p n, X] ({ val := 1, isLt := (_ : (fun a => a < 2) 1) }, i))\n[PROOFSTEP]\nsimp [Function.uncurry, Matrix.cons_val_one, Matrix.head_cons, aeval_X]\n[GOAL]\np : ℕ\nR✝ : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝ : CommRing R✝\nn : ℕ\nR : Type u_2\n_Rcr : CommRing R\nx : 𝕎 R\n⊢ (x * ↑n).coeff = fun n_1 => ↑(aeval x.coeff) (wittMulN p n n_1)\n[PROOFSTEP]\nfunext k\n[GOAL]\ncase h\np : ℕ\nR✝ : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝ : CommRing R✝\nn : ℕ\nR : Type u_2\n_Rcr : CommRing R\nx : 𝕎 R\nk : ℕ\n⊢ coeff (x * ↑n) k = ↑(aeval x.coeff) (wittMulN p n k)\n[PROOFSTEP]\nexact mulN_coeff n x k\n[GOAL]\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝ : CommRing R\nn k : ℕ\n⊢ ↑(bind₁ (wittMulN p n)) (wittPolynomial p ℤ k) = ↑n * wittPolynomial p ℤ k\n[PROOFSTEP]\ninduction' n with n ih\n[GOAL]\ncase zero\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝ : CommRing R\nk : ℕ\n⊢ ↑(bind₁ (wittMulN p Nat.zero)) (wittPolynomial p ℤ k) = ↑Nat.zero * wittPolynomial p ℤ k\n[PROOFSTEP]\nsimp [wittMulN, Nat.cast_zero, zero_mul, bind₁_zero_wittPolynomial]\n[GOAL]\ncase succ\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝ : CommRing R\nk n : ℕ\nih : ↑(bind₁ (wittMulN p n)) (wittPolynomial p ℤ k) = ↑n * wittPolynomial p ℤ k\n⊢ ↑(bind₁ (wittMulN p (Nat.succ n))) (wittPolynomial p ℤ k) = ↑(Nat.succ n) * wittPolynomial p ℤ k\n[PROOFSTEP]\nrw [wittMulN, ← bind₁_bind₁, wittAdd, wittStructureInt_prop]\n[GOAL]\ncase succ\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝ : CommRing R\nk n : ℕ\nih : ↑(bind₁ (wittMulN p n)) (wittPolynomial p ℤ k) = ↑n * wittPolynomial p ℤ k\n⊢ ↑(bind₁ (Function.uncurry ![wittMulN p n, X]))\n      (↑(bind₁ fun i => ↑(rename (Prod.mk i)) (wittPolynomial p ℤ k)) (X 0 + X 1)) =\n    ↑(Nat.succ n) * wittPolynomial p ℤ k\n[PROOFSTEP]\nsimp only [AlgHom.map_add, Nat.cast_succ, bind₁_X_right]\n[GOAL]\ncase succ\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝ : CommRing R\nk n : ℕ\nih : ↑(bind₁ (wittMulN p n)) (wittPolynomial p ℤ k) = ↑n * wittPolynomial p ℤ k\n⊢ ↑(bind₁ (Function.uncurry ![wittMulN p n, X])) (↑(rename (Prod.mk 0)) (wittPolynomial p ℤ k)) +\n      ↑(bind₁ (Function.uncurry ![wittMulN p n, X])) (↑(rename (Prod.mk 1)) (wittPolynomial p ℤ k)) =\n    (↑n + 1) * wittPolynomial p ℤ k\n[PROOFSTEP]\nrw [add_mul, one_mul, bind₁_rename, bind₁_rename]\n[GOAL]\ncase succ\np : ℕ\nR : Type u_1\nhp : Fact (Nat.Prime p)\ninst✝ : CommRing R\nk n : ℕ\nih : ↑(bind₁ (wittMulN p n)) (wittPolynomial p ℤ k) = ↑n * wittPolynomial p ℤ k\n⊢ ↑(bind₁ (Function.uncurry ![wittMulN p n, X] ∘ Prod.mk 0)) (wittPolynomial p ℤ k) +\n      ↑(bind₁ (Function.uncurry ![wittMulN p n, X] ∘ Prod.mk 1)) (wittPolynomial p ℤ k) =\n    ↑n * wittPolynomial p ℤ k + wittPolynomial p ℤ k\n[PROOFSTEP]\nsimp only [ih, Function.uncurry, Function.comp, bind₁_X_left, AlgHom.id_apply, Matrix.cons_val_zero, Matrix.head_cons,\n  Matrix.cons_val_one]\n", "meta": {"mathlib_filename": "Mathlib.RingTheory.WittVector.MulP", "llama_tokens": 2900, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8354835330070839, "lm_q2_score": 0.6334102636778401, "lm_q1q2_score": 0.5292038449405104}}
{"text": "[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\n⊢ 1 ∈\n    { carrier := {x | ‖x‖ ≤ 1},\n        mul_mem' := (_ : ∀ {a b : ℚ_[p]}, a ∈ {x | ‖x‖ ≤ 1} → b ∈ {x | ‖x‖ ≤ 1} → ‖a * b‖ ≤ 1) }.carrier\n[PROOFSTEP]\nnorm_num\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\n⊢ 0 ∈\n    {\n          toSubsemigroup :=\n            { carrier := {x | ‖x‖ ≤ 1},\n              mul_mem' := (_ : ∀ {a b : ℚ_[p]}, a ∈ {x | ‖x‖ ≤ 1} → b ∈ {x | ‖x‖ ≤ 1} → ‖a * b‖ ≤ 1) },\n          one_mem' := (_ : ‖1‖ ≤ 1) }.toSubsemigroup.carrier\n[PROOFSTEP]\nnorm_num\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\n⊢ Add { x // x ∈ subring p }\n[PROOFSTEP]\ninfer_instance\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\n⊢ Mul { x // x ∈ subring p }\n[PROOFSTEP]\ninfer_instance\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\n⊢ Neg { x // x ∈ subring p }\n[PROOFSTEP]\ninfer_instance\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\n⊢ Sub { x // x ∈ subring p }\n[PROOFSTEP]\ninfer_instance\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\n⊢ Zero { x // x ∈ subring p }\n[PROOFSTEP]\ninfer_instance\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\n⊢ ‖1‖ ≤ 1\n[PROOFSTEP]\nnorm_num\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nz : ℤ_[p]\n⊢ ↑z = 0 ↔ z = 0\n[PROOFSTEP]\nrw [← coe_zero, Subtype.coe_inj]\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\n⊢ AddCommGroup { x // x ∈ subring p }\n[PROOFSTEP]\ninfer_instance\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\n⊢ CommRing { x // x ∈ subring p }\n[PROOFSTEP]\ninfer_instance\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nk : ℚ_[p]\nproperty✝ : ‖k‖ ≤ 1\nh : ‖k‖ = 1\n⊢ ‖k⁻¹‖ ≤ 1\n[PROOFSTEP]\nsimp [h]\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nm n : ℕ\nh : ↑m = ↑n\n⊢ ↑m = ↑n\n[PROOFSTEP]\nrw [Subtype.ext_iff] at h \n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nm n : ℕ\nh✝ : ↑m = ↑n\nh : ↑↑m = ↑↑n\n⊢ ↑m = ↑n\n[PROOFSTEP]\nnorm_cast at h \n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nz1 z2 : ℤ\n⊢ ↑z1 = ↑z2 ↔ z1 = z2\n[PROOFSTEP]\nsuffices (z1 : ℚ_[p]) = z2 ↔ z1 = z2 from Iff.trans (by norm_cast) this\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nz1 z2 : ℤ\nthis : ↑z1 = ↑z2 ↔ z1 = z2\n⊢ ↑z1 = ↑z2 ↔ ↑z1 = ↑z2\n[PROOFSTEP]\nnorm_cast\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nz1 z2 : ℤ\n⊢ ↑z1 = ↑z2 ↔ z1 = z2\n[PROOFSTEP]\nnorm_cast\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nseq : ℕ → ℤ\nh : IsCauSeq (padicNorm p) fun n => ↑(seq n)\n⊢ ↑(PadicSeq.norm { val := fun n => ↑(seq n), property := h }) ≤ 1\n[PROOFSTEP]\nrw [PadicSeq.norm]\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nseq : ℕ → ℤ\nh : IsCauSeq (padicNorm p) fun n => ↑(seq n)\n⊢ ↑(if hf : { val := fun n => ↑(seq n), property := h } ≈ 0 then 0\n      else padicNorm p (↑{ val := fun n => ↑(seq n), property := h } (PadicSeq.stationaryPoint hf))) ≤\n    1\n[PROOFSTEP]\nsplit_ifs with hne\n[GOAL]\ncase pos\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nseq : ℕ → ℤ\nh : IsCauSeq (padicNorm p) fun n => ↑(seq n)\nhne : { val := fun n => ↑(seq n), property := h } ≈ 0\n⊢ ↑0 ≤ 1\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase neg\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nseq : ℕ → ℤ\nh : IsCauSeq (padicNorm p) fun n => ↑(seq n)\nhne : ¬{ val := fun n => ↑(seq n), property := h } ≈ 0\n⊢ ↑(padicNorm p (↑{ val := fun n => ↑(seq n), property := h } (PadicSeq.stationaryPoint hne))) ≤ 1\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase neg\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nseq : ℕ → ℤ\nh : IsCauSeq (padicNorm p) fun n => ↑(seq n)\nhne : ¬{ val := fun n => ↑(seq n), property := h } ≈ 0\n⊢ padicNorm p (↑{ val := fun n => ↑(seq n), property := h } (PadicSeq.stationaryPoint hne)) ≤ 1\n[PROOFSTEP]\napply padicNorm.of_int\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nsrc✝ : CommRing ℤ_[p] := instCommRing\n⊢ ∀ (a b : ℤ_[p]), ‖a * b‖ ≤ ‖a‖ * ‖b‖\n[PROOFSTEP]\nsimp [norm_def]\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\n⊢ ∀ {x : ℤ_[p]}, ‖x‖ = 0 ↔ x = 0\n[PROOFSTEP]\nsimp [norm_eq_zero]\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nx✝¹ x✝ : ℤ_[p]\n⊢ ‖x✝¹ * x✝‖ = ‖x✝¹‖ * ‖x✝‖\n[PROOFSTEP]\nsimp only [norm_def, padicNormE.mul, PadicInt.coe_mul]\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nz1 z2 : ℤ_[p]\n⊢ ‖z1 * z2‖ = ‖z1‖ * ‖z2‖\n[PROOFSTEP]\nsimp [norm_def]\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nz : ℤ_[p]\n⊢ ‖z ^ 0‖ = ‖z‖ ^ 0\n[PROOFSTEP]\nsimp\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nz : ℤ_[p]\nk : ℕ\n⊢ ‖z ^ (k + 1)‖ = ‖z‖ ^ (k + 1)\n[PROOFSTEP]\nrw [pow_succ, pow_succ, norm_mul]\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nz : ℤ_[p]\nk : ℕ\n⊢ ‖z‖ * ‖z ^ k‖ = ‖z‖ * ‖z‖ ^ k\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_a\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nz : ℤ_[p]\nk : ℕ\n⊢ ‖z ^ k‖ = ‖z‖ ^ k\n[PROOFSTEP]\napply norm_pow\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nz1 z2 : ℤ_[p]\nh : ‖z1 + z2‖ < ‖z2‖\nhne : ¬‖z1‖ = ‖z2‖\n⊢ ‖z1 + z2‖ ≥ ‖z2‖\n[PROOFSTEP]\nrw [norm_add_eq_max_of_ne hne]\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nz1 z2 : ℤ_[p]\nh : ‖z1 + z2‖ < ‖z2‖\nhne : ¬‖z1‖ = ‖z2‖\n⊢ max ‖z1‖ ‖z2‖ ≥ ‖z2‖\n[PROOFSTEP]\napply le_max_right\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nz1 z2 : ℤ_[p]\nh : ‖z1 + z2‖ < ‖z1‖\nhne : ¬‖z1‖ = ‖z2‖\n⊢ ‖z1 + z2‖ ≥ ‖z1‖\n[PROOFSTEP]\nrw [norm_add_eq_max_of_ne hne]\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nz1 z2 : ℤ_[p]\nh : ‖z1 + z2‖ < ‖z1‖\nhne : ¬‖z1‖ = ‖z2‖\n⊢ max ‖z1‖ ‖z2‖ ≥ ‖z1‖\n[PROOFSTEP]\napply le_max_left\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nz : ℤ_[p]\n⊢ ‖↑z‖ = ‖z‖\n[PROOFSTEP]\nsimp [norm_def]\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nz : ℤ\n⊢ ‖↑z‖ = ‖↑z‖\n[PROOFSTEP]\nsimp [norm_def]\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : CauSeq ℤ_[p] norm\nx✝ : ℝ\nhε : x✝ > 0\n⊢ ∃ i, ∀ (j : ℕ), j ≥ i → (fun a => ‖a‖) ((fun n => ↑(↑f n)) j - (fun n => ↑(↑f n)) i) < x✝\n[PROOFSTEP]\nsimpa [norm, norm_def] using f.cauchy hε\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nf : CauSeq ℤ_[p] norm\nhqn : ‖CauSeq.lim (PadicInt.cauSeq_to_rat_cauSeq f)‖ ≤ 1\nε : ℝ\n⊢ ε > 0 →\n    ∃ i,\n      ∀ (j : ℕ),\n        j ≥ i →\n          ‖↑(f - CauSeq.const norm { val := CauSeq.lim (PadicInt.cauSeq_to_rat_cauSeq f), property := hqn }) j‖ < ε\n[PROOFSTEP]\nsimpa [norm, norm_def] using CauSeq.equiv_lim (cauSeq_to_rat_cauSeq f) ε\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nε : ℝ\nhε : 0 < ε\n⊢ ∃ k, ↑p ^ (-↑k) < ε\n[PROOFSTEP]\nobtain ⟨k, hk⟩ := exists_nat_gt ε⁻¹\n[GOAL]\ncase intro\np : ℕ\nhp : Fact (Nat.Prime p)\nε : ℝ\nhε : 0 < ε\nk : ℕ\nhk : ε⁻¹ < ↑k\n⊢ ∃ k, ↑p ^ (-↑k) < ε\n[PROOFSTEP]\nuse k\n[GOAL]\ncase h\np : ℕ\nhp : Fact (Nat.Prime p)\nε : ℝ\nhε : 0 < ε\nk : ℕ\nhk : ε⁻¹ < ↑k\n⊢ ↑p ^ (-↑k) < ε\n[PROOFSTEP]\nrw [← inv_lt_inv hε (_root_.zpow_pos_of_pos _ _)]\n[GOAL]\ncase h\np : ℕ\nhp : Fact (Nat.Prime p)\nε : ℝ\nhε : 0 < ε\nk : ℕ\nhk : ε⁻¹ < ↑k\n⊢ ε⁻¹ < (↑p ^ (-↑k))⁻¹\n[PROOFSTEP]\nrw [zpow_neg, inv_inv, zpow_ofNat]\n[GOAL]\ncase h\np : ℕ\nhp : Fact (Nat.Prime p)\nε : ℝ\nhε : 0 < ε\nk : ℕ\nhk : ε⁻¹ < ↑k\n⊢ ε⁻¹ < ↑p ^ k\n[PROOFSTEP]\napply lt_of_lt_of_le hk\n[GOAL]\ncase h\np : ℕ\nhp : Fact (Nat.Prime p)\nε : ℝ\nhε : 0 < ε\nk : ℕ\nhk : ε⁻¹ < ↑k\n⊢ ↑k ≤ ↑p ^ k\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase h\np : ℕ\nhp : Fact (Nat.Prime p)\nε : ℝ\nhε : 0 < ε\nk : ℕ\nhk : ε⁻¹ < ↑k\n⊢ k ≤ p ^ k\n[PROOFSTEP]\napply le_of_lt\n[GOAL]\ncase h.a\np : ℕ\nhp : Fact (Nat.Prime p)\nε : ℝ\nhε : 0 < ε\nk : ℕ\nhk : ε⁻¹ < ↑k\n⊢ k < p ^ k\n[PROOFSTEP]\nconvert Nat.lt_pow_self _ _ using 1\n[GOAL]\ncase h.a.convert_2\np : ℕ\nhp : Fact (Nat.Prime p)\nε : ℝ\nhε : 0 < ε\nk : ℕ\nhk : ε⁻¹ < ↑k\n⊢ 1 < p\n[PROOFSTEP]\nexact hp.1.one_lt\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nε : ℝ\nhε : 0 < ε\nk : ℕ\nhk : ε⁻¹ < ↑k\n⊢ 0 < ↑p\n[PROOFSTEP]\nexact_mod_cast hp.1.pos\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nε : ℚ\nhε : 0 < ε\n⊢ ∃ k, ↑p ^ (-↑k) < ε\n[PROOFSTEP]\nobtain ⟨k, hk⟩ := @exists_pow_neg_lt p _ ε (by exact_mod_cast hε)\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nε : ℚ\nhε : 0 < ε\n⊢ 0 < ↑ε\n[PROOFSTEP]\nexact_mod_cast hε\n[GOAL]\ncase intro\np : ℕ\nhp : Fact (Nat.Prime p)\nε : ℚ\nhε : 0 < ε\nk : ℕ\nhk : ↑p ^ (-↑k) < ↑ε\n⊢ ∃ k, ↑p ^ (-↑k) < ε\n[PROOFSTEP]\nuse k\n[GOAL]\ncase h\np : ℕ\nhp : Fact (Nat.Prime p)\nε : ℚ\nhε : 0 < ε\nk : ℕ\nhk : ↑p ^ (-↑k) < ↑ε\n⊢ ↑p ^ (-↑k) < ε\n[PROOFSTEP]\nrw [show (p : ℝ) = (p : ℚ) by simp] at hk \n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nε : ℚ\nhε : 0 < ε\nk : ℕ\nhk : ↑p ^ (-↑k) < ↑ε\n⊢ ↑p = ↑↑p\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h\np : ℕ\nhp : Fact (Nat.Prime p)\nε : ℚ\nhε : 0 < ε\nk : ℕ\nhk : ↑↑p ^ (-↑k) < ↑ε\n⊢ ↑p ^ (-↑k) < ε\n[PROOFSTEP]\nexact_mod_cast hk\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : ℤ\nthis : ‖↑k‖ < 1 ↔ ↑p ∣ k\n⊢ ‖↑k‖ < 1 ↔ ↑p ∣ k\n[PROOFSTEP]\nrwa [norm_int_cast_eq_padic_norm]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : ℤ\nn : ℕ\nthis : ‖↑k‖ ≤ ↑p ^ (-↑n) ↔ ↑(p ^ n) ∣ k\n⊢ ‖↑k‖ ≤ ↑p ^ (-↑n) ↔ ↑(p ^ n) ∣ k\n[PROOFSTEP]\nsimpa [norm_int_cast_eq_padic_norm]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℤ_[p]\nhx : x ≠ 0\n⊢ ‖x‖ = ↑p ^ (-valuation x)\n[PROOFSTEP]\nrefine @Padic.norm_eq_pow_val p hp x ?_\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℤ_[p]\nhx : x ≠ 0\n⊢ ↑x ≠ 0\n[PROOFSTEP]\ncontrapose! hx\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℤ_[p]\nhx : ↑x = 0\n⊢ x = 0\n[PROOFSTEP]\nexact Subtype.val_injective hx\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\n⊢ valuation ↑p = 1\n[PROOFSTEP]\nsimp [valuation]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℤ_[p]\n⊢ 0 ≤ valuation x\n[PROOFSTEP]\nby_cases hx : x = 0\n[GOAL]\ncase pos\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℤ_[p]\nhx : x = 0\n⊢ 0 ≤ valuation x\n[PROOFSTEP]\nsimp [hx]\n[GOAL]\ncase neg\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℤ_[p]\nhx : ¬x = 0\n⊢ 0 ≤ valuation x\n[PROOFSTEP]\nhave h : (1 : ℝ) < p := by exact_mod_cast hp.1.one_lt\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℤ_[p]\nhx : ¬x = 0\n⊢ 1 < ↑p\n[PROOFSTEP]\nexact_mod_cast hp.1.one_lt\n[GOAL]\ncase neg\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℤ_[p]\nhx : ¬x = 0\nh : 1 < ↑p\n⊢ 0 ≤ valuation x\n[PROOFSTEP]\nrw [← neg_nonpos, ← (zpow_strictMono h).le_iff_le]\n[GOAL]\ncase neg\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℤ_[p]\nhx : ¬x = 0\nh : 1 < ↑p\n⊢ (fun x x_1 => x ^ x_1) (↑p) (-valuation x) ≤ (fun x x_1 => x ^ x_1) (↑p) 0\n[PROOFSTEP]\nshow (p : ℝ) ^ (-valuation x) ≤ (p : ℝ) ^ (0 : ℤ)\n[GOAL]\ncase neg\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℤ_[p]\nhx : ¬x = 0\nh : 1 < ↑p\n⊢ ↑p ^ (-valuation x) ≤ ↑p ^ 0\n[PROOFSTEP]\nrw [← norm_eq_pow_val hx]\n[GOAL]\ncase neg\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℤ_[p]\nhx : ¬x = 0\nh : 1 < ↑p\n⊢ ‖x‖ ≤ ↑p ^ 0\n[PROOFSTEP]\nsimpa using x.property\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nn : ℕ\nc : ℤ_[p]\nhc : c ≠ 0\n⊢ valuation (↑p ^ n * c) = ↑n + valuation c\n[PROOFSTEP]\nhave : ‖(p : ℤ_[p]) ^ n * c‖ = ‖(p : ℤ_[p]) ^ n‖ * ‖c‖ := norm_mul _ _\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nn : ℕ\nc : ℤ_[p]\nhc : c ≠ 0\nthis : ‖↑p ^ n * c‖ = ‖↑p ^ n‖ * ‖c‖\n⊢ valuation (↑p ^ n * c) = ↑n + valuation c\n[PROOFSTEP]\nhave aux : (p : ℤ_[p]) ^ n * c ≠ 0 := by\n  contrapose! hc\n  rw [mul_eq_zero] at hc \n  cases' hc with hc hc\n  · refine (hp.1.ne_zero ?_).elim\n    exact_mod_cast pow_eq_zero hc\n  · exact hc\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nn : ℕ\nc : ℤ_[p]\nhc : c ≠ 0\nthis : ‖↑p ^ n * c‖ = ‖↑p ^ n‖ * ‖c‖\n⊢ ↑p ^ n * c ≠ 0\n[PROOFSTEP]\ncontrapose! hc\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nn : ℕ\nc : ℤ_[p]\nthis : ‖↑p ^ n * c‖ = ‖↑p ^ n‖ * ‖c‖\nhc : ↑p ^ n * c = 0\n⊢ c = 0\n[PROOFSTEP]\nrw [mul_eq_zero] at hc \n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nn : ℕ\nc : ℤ_[p]\nthis : ‖↑p ^ n * c‖ = ‖↑p ^ n‖ * ‖c‖\nhc : ↑p ^ n = 0 ∨ c = 0\n⊢ c = 0\n[PROOFSTEP]\ncases' hc with hc hc\n[GOAL]\ncase inl\np : ℕ\nhp : Fact (Nat.Prime p)\nn : ℕ\nc : ℤ_[p]\nthis : ‖↑p ^ n * c‖ = ‖↑p ^ n‖ * ‖c‖\nhc : ↑p ^ n = 0\n⊢ c = 0\n[PROOFSTEP]\nrefine (hp.1.ne_zero ?_).elim\n[GOAL]\ncase inl\np : ℕ\nhp : Fact (Nat.Prime p)\nn : ℕ\nc : ℤ_[p]\nthis : ‖↑p ^ n * c‖ = ‖↑p ^ n‖ * ‖c‖\nhc : ↑p ^ n = 0\n⊢ p = 0\n[PROOFSTEP]\nexact_mod_cast pow_eq_zero hc\n[GOAL]\ncase inr\np : ℕ\nhp : Fact (Nat.Prime p)\nn : ℕ\nc : ℤ_[p]\nthis : ‖↑p ^ n * c‖ = ‖↑p ^ n‖ * ‖c‖\nhc : c = 0\n⊢ c = 0\n[PROOFSTEP]\nexact hc\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nn : ℕ\nc : ℤ_[p]\nhc : c ≠ 0\nthis : ‖↑p ^ n * c‖ = ‖↑p ^ n‖ * ‖c‖\naux : ↑p ^ n * c ≠ 0\n⊢ valuation (↑p ^ n * c) = ↑n + valuation c\n[PROOFSTEP]\nrwa [norm_eq_pow_val aux, norm_p_pow, norm_eq_pow_val hc, ← zpow_add₀, ← neg_add, zpow_inj, neg_inj] at this \n[GOAL]\ncase h₀\np : ℕ\nhp : Fact (Nat.Prime p)\nn : ℕ\nc : ℤ_[p]\nhc : c ≠ 0\nthis : ↑p ^ (-valuation (↑p ^ n * c)) = ↑p ^ (-(↑n + valuation c))\naux : ↑p ^ n * c ≠ 0\n⊢ 0 < ↑p\n[PROOFSTEP]\nexact_mod_cast hp.1.pos\n[GOAL]\ncase h₁\np : ℕ\nhp : Fact (Nat.Prime p)\nn : ℕ\nc : ℤ_[p]\nhc : c ≠ 0\nthis : ↑p ^ (-valuation (↑p ^ n * c)) = ↑p ^ (-(↑n + valuation c))\naux : ↑p ^ n * c ≠ 0\n⊢ ↑p ≠ 1\n[PROOFSTEP]\nexact_mod_cast hp.1.ne_one\n[GOAL]\ncase ha\np : ℕ\nhp : Fact (Nat.Prime p)\nn : ℕ\nc : ℤ_[p]\nhc : c ≠ 0\nthis : ↑p ^ (-valuation (↑p ^ n * c)) = ↑p ^ (-↑n) * ↑p ^ (-valuation c)\naux : ↑p ^ n * c ≠ 0\n⊢ ↑p ≠ 0\n[PROOFSTEP]\nexact_mod_cast hp.1.ne_zero\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : ℚ_[p]\nproperty✝ : ‖k‖ ≤ 1\nh : ‖{ val := k, property := property✝ }‖ = 1\n⊢ { val := k, property := property✝ } * inv { val := k, property := property✝ } = 1\n[PROOFSTEP]\nhave hk : k ≠ 0 := fun h' => zero_ne_one' ℚ_[p] (by simp [h'] at h )\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : ℚ_[p]\nproperty✝ : ‖k‖ ≤ 1\nh : ‖{ val := k, property := property✝ }‖ = 1\nh' : k = 0\n⊢ 0 = 1\n[PROOFSTEP]\nsimp [h'] at h \n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : ℚ_[p]\nproperty✝ : ‖k‖ ≤ 1\nh : ‖{ val := k, property := property✝ }‖ = 1\nhk : k ≠ 0\n⊢ { val := k, property := property✝ } * inv { val := k, property := property✝ } = 1\n[PROOFSTEP]\nunfold PadicInt.inv\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : ℚ_[p]\nproperty✝ : ‖k‖ ≤ 1\nh : ‖{ val := k, property := property✝ }‖ = 1\nhk : k ≠ 0\n⊢ ({ val := k, property := property✝ } *\n      match { val := k, property := property✝ } with\n      | { val := k, property := property } => if h : ‖k‖ = 1 then { val := k⁻¹, property := (_ : ‖k⁻¹‖ ≤ 1) } else 0) =\n    1\n[PROOFSTEP]\nrw [norm_eq_padic_norm] at h \n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : ℚ_[p]\nproperty✝ : ‖k‖ ≤ 1\nh : ‖k‖ = 1\nhk : k ≠ 0\n⊢ ({ val := k, property := property✝ } *\n      match { val := k, property := property✝ } with\n      | { val := k, property := property } => if h : ‖k‖ = 1 then { val := k⁻¹, property := (_ : ‖k⁻¹‖ ≤ 1) } else 0) =\n    1\n[PROOFSTEP]\ndsimp only\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : ℚ_[p]\nproperty✝ : ‖k‖ ≤ 1\nh : ‖k‖ = 1\nhk : k ≠ 0\n⊢ ({ val := k, property := property✝ } * if h : ‖k‖ = 1 then { val := k⁻¹, property := (_ : ‖k⁻¹‖ ≤ 1) } else 0) = 1\n[PROOFSTEP]\nrw [dif_pos h]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : ℚ_[p]\nproperty✝ : ‖k‖ ≤ 1\nh : ‖k‖ = 1\nhk : k ≠ 0\n⊢ { val := k, property := property✝ } * { val := k⁻¹, property := (_ : ‖k⁻¹‖ ≤ 1) } = 1\n[PROOFSTEP]\napply Subtype.ext_iff_val.2\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nk : ℚ_[p]\nproperty✝ : ‖k‖ ≤ 1\nh : ‖k‖ = 1\nhk : k ≠ 0\n⊢ ↑({ val := k, property := property✝ } * { val := k⁻¹, property := (_ : ‖k⁻¹‖ ≤ 1) }) = ↑1\n[PROOFSTEP]\nsimp [mul_inv_cancel hk]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nz : ℤ_[p]\nhz : ‖z‖ = 1\n⊢ inv z * z = 1\n[PROOFSTEP]\nrw [mul_comm, mul_inv hz]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nz : ℤ_[p]\nh : IsUnit z\n⊢ ‖z‖ = 1\n[PROOFSTEP]\nrcases isUnit_iff_dvd_one.1 h with ⟨w, eq⟩\n[GOAL]\ncase intro\np : ℕ\nhp : Fact (Nat.Prime p)\nz : ℤ_[p]\nh : IsUnit z\nw : ℤ_[p]\neq : 1 = z * w\n⊢ ‖z‖ = 1\n[PROOFSTEP]\nrefine' le_antisymm (norm_le_one _) _\n[GOAL]\ncase intro\np : ℕ\nhp : Fact (Nat.Prime p)\nz : ℤ_[p]\nh : IsUnit z\nw : ℤ_[p]\neq : 1 = z * w\n⊢ 1 ≤ ‖z‖\n[PROOFSTEP]\nhave := mul_le_mul_of_nonneg_left (norm_le_one w) (norm_nonneg z)\n[GOAL]\ncase intro\np : ℕ\nhp : Fact (Nat.Prime p)\nz : ℤ_[p]\nh : IsUnit z\nw : ℤ_[p]\neq : 1 = z * w\nthis : ‖z‖ * ‖w‖ ≤ ‖z‖ * 1\n⊢ 1 ≤ ‖z‖\n[PROOFSTEP]\nrwa [mul_one, ← norm_mul, ← eq, norm_one] at this \n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nz1 z2 : ℤ_[p]\nhz2 : ‖z2‖ < 1\n⊢ ‖z1 * z2‖ = ‖z1‖ * ‖z2‖\n[PROOFSTEP]\nsimp\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nz : ℤ_[p]\n⊢ z ∈ nonunits ℤ_[p] ↔ ‖z‖ < 1\n[PROOFSTEP]\nrw [lt_iff_le_and_ne]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nz : ℤ_[p]\n⊢ z ∈ nonunits ℤ_[p] ↔ ‖z‖ ≤ 1 ∧ ‖z‖ ≠ 1\n[PROOFSTEP]\nsimp [norm_le_one z, nonunits, isUnit_iff]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nu : ℤ_[p]ˣ\n⊢ IsUnit ↑u\n[PROOFSTEP]\nsimp\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℤ_[p]\nhx : x ≠ 0\nu : ℚ_[p] := ↑x * ↑p ^ (-valuation x)\n⊢ ‖u‖ = 1\n[PROOFSTEP]\nsimp [hx, Nat.zpow_ne_zero_of_pos (by exact_mod_cast hp.1.pos) x.valuation, norm_eq_pow_val, zpow_neg, inv_mul_cancel]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℤ_[p]\nhx : x ≠ 0\nu : ℚ_[p] := ↑x * ↑p ^ (-valuation x)\n⊢ 0 < ?m.493673\n[PROOFSTEP]\nexact_mod_cast hp.1.pos\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℤ_[p]\nhx : x ≠ 0\n⊢ x = ↑(unitCoeff hx) * ↑p ^ Int.natAbs (valuation x)\n[PROOFSTEP]\napply Subtype.coe_injective\n[GOAL]\ncase a\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℤ_[p]\nhx : x ≠ 0\n⊢ (fun a => ↑a) x = (fun a => ↑a) (↑(unitCoeff hx) * ↑p ^ Int.natAbs (valuation x))\n[PROOFSTEP]\npush_cast\n[GOAL]\ncase a\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℤ_[p]\nhx : x ≠ 0\n⊢ ↑x = ↑↑(unitCoeff hx) * ↑p ^ Int.natAbs (valuation x)\n[PROOFSTEP]\nhave repr : (x : ℚ_[p]) = unitCoeff hx * (p : ℚ_[p]) ^ x.valuation :=\n  by\n  rw [unitCoeff_coe, mul_assoc, ← zpow_add₀]\n  · simp\n  · exact_mod_cast hp.1.ne_zero\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℤ_[p]\nhx : x ≠ 0\n⊢ ↑x = ↑↑(unitCoeff hx) * ↑p ^ valuation x\n[PROOFSTEP]\nrw [unitCoeff_coe, mul_assoc, ← zpow_add₀]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℤ_[p]\nhx : x ≠ 0\n⊢ ↑x = ↑x * ↑p ^ (-valuation x + valuation x)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase ha\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℤ_[p]\nhx : x ≠ 0\n⊢ ↑p ≠ 0\n[PROOFSTEP]\nexact_mod_cast hp.1.ne_zero\n[GOAL]\ncase a\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℤ_[p]\nhx : x ≠ 0\nrepr : ↑x = ↑↑(unitCoeff hx) * ↑p ^ valuation x\n⊢ ↑x = ↑↑(unitCoeff hx) * ↑p ^ Int.natAbs (valuation x)\n[PROOFSTEP]\nconvert repr using 2\n[GOAL]\ncase h.e'_3.h.e'_6\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℤ_[p]\nhx : x ≠ 0\nrepr : ↑x = ↑↑(unitCoeff hx) * ↑p ^ valuation x\n⊢ ↑p ^ Int.natAbs (valuation x) = ↑p ^ valuation x\n[PROOFSTEP]\nrw [← zpow_ofNat, Int.natAbs_of_nonneg (valuation_nonneg x)]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℤ_[p]\nhx : x ≠ 0\nn : ℕ\n⊢ ‖x‖ ≤ ↑p ^ (-↑n) ↔ ↑n ≤ valuation x\n[PROOFSTEP]\nrw [norm_eq_pow_val hx]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℤ_[p]\nhx : x ≠ 0\nn : ℕ\n⊢ ↑p ^ (-valuation x) ≤ ↑p ^ (-↑n) ↔ ↑n ≤ valuation x\n[PROOFSTEP]\nlift x.valuation to ℕ using x.valuation_nonneg with k\n[GOAL]\ncase intro\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℤ_[p]\nhx : x ≠ 0\nn k : ℕ\n⊢ ↑p ^ (-↑k) ≤ ↑p ^ (-↑n) ↔ ↑n ≤ ↑k\n[PROOFSTEP]\nsimp only [Int.ofNat_le, zpow_neg, zpow_ofNat]\n[GOAL]\ncase intro\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℤ_[p]\nhx : x ≠ 0\nn k : ℕ\n⊢ (↑p ^ k)⁻¹ ≤ (↑p ^ n)⁻¹ ↔ n ≤ k\n[PROOFSTEP]\nhave aux : ∀ m : ℕ, 0 < (p : ℝ) ^ m := by\n  intro m\n  refine pow_pos ?_ m\n  exact_mod_cast hp.1.pos\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℤ_[p]\nhx : x ≠ 0\nn k : ℕ\n⊢ ∀ (m : ℕ), 0 < ↑p ^ m\n[PROOFSTEP]\nintro m\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℤ_[p]\nhx : x ≠ 0\nn k m : ℕ\n⊢ 0 < ↑p ^ m\n[PROOFSTEP]\nrefine pow_pos ?_ m\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℤ_[p]\nhx : x ≠ 0\nn k m : ℕ\n⊢ 0 < ↑p\n[PROOFSTEP]\nexact_mod_cast hp.1.pos\n[GOAL]\ncase intro\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℤ_[p]\nhx : x ≠ 0\nn k : ℕ\naux : ∀ (m : ℕ), 0 < ↑p ^ m\n⊢ (↑p ^ k)⁻¹ ≤ (↑p ^ n)⁻¹ ↔ n ≤ k\n[PROOFSTEP]\nrw [inv_le_inv (aux _) (aux _)]\n[GOAL]\ncase intro\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℤ_[p]\nhx : x ≠ 0\nn k : ℕ\naux : ∀ (m : ℕ), 0 < ↑p ^ m\n⊢ ↑p ^ n ≤ ↑p ^ k ↔ n ≤ k\n[PROOFSTEP]\nhave : p ^ n ≤ p ^ k ↔ n ≤ k := (pow_strictMono_right hp.1.one_lt).le_iff_le\n[GOAL]\ncase intro\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℤ_[p]\nhx : x ≠ 0\nn k : ℕ\naux : ∀ (m : ℕ), 0 < ↑p ^ m\nthis : p ^ n ≤ p ^ k ↔ n ≤ k\n⊢ ↑p ^ n ≤ ↑p ^ k ↔ n ≤ k\n[PROOFSTEP]\nrw [← this]\n[GOAL]\ncase intro\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℤ_[p]\nhx : x ≠ 0\nn k : ℕ\naux : ∀ (m : ℕ), 0 < ↑p ^ m\nthis : p ^ n ≤ p ^ k ↔ n ≤ k\n⊢ ↑p ^ n ≤ ↑p ^ k ↔ p ^ n ≤ p ^ k\n[PROOFSTEP]\nnorm_cast\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℤ_[p]\nhx : x ≠ 0\nn : ℕ\n⊢ x ∈ Ideal.span {↑p ^ n} ↔ ↑n ≤ valuation x\n[PROOFSTEP]\nrw [Ideal.mem_span_singleton]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℤ_[p]\nhx : x ≠ 0\nn : ℕ\n⊢ ↑p ^ n ∣ x ↔ ↑n ≤ valuation x\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℤ_[p]\nhx : x ≠ 0\nn : ℕ\n⊢ ↑p ^ n ∣ x → ↑n ≤ valuation x\n[PROOFSTEP]\nrintro ⟨c, rfl⟩\n[GOAL]\ncase mp.intro\np : ℕ\nhp : Fact (Nat.Prime p)\nn : ℕ\nc : ℤ_[p]\nhx : ↑p ^ n * c ≠ 0\n⊢ ↑n ≤ valuation (↑p ^ n * c)\n[PROOFSTEP]\nsuffices c ≠ 0 by\n  rw [valuation_p_pow_mul _ _ this, le_add_iff_nonneg_right]\n  apply valuation_nonneg\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nn : ℕ\nc : ℤ_[p]\nhx : ↑p ^ n * c ≠ 0\nthis : c ≠ 0\n⊢ ↑n ≤ valuation (↑p ^ n * c)\n[PROOFSTEP]\nrw [valuation_p_pow_mul _ _ this, le_add_iff_nonneg_right]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nn : ℕ\nc : ℤ_[p]\nhx : ↑p ^ n * c ≠ 0\nthis : c ≠ 0\n⊢ 0 ≤ valuation c\n[PROOFSTEP]\napply valuation_nonneg\n[GOAL]\ncase mp.intro\np : ℕ\nhp : Fact (Nat.Prime p)\nn : ℕ\nc : ℤ_[p]\nhx : ↑p ^ n * c ≠ 0\n⊢ c ≠ 0\n[PROOFSTEP]\ncontrapose! hx\n[GOAL]\ncase mp.intro\np : ℕ\nhp : Fact (Nat.Prime p)\nn : ℕ\nc : ℤ_[p]\nhx : c = 0\n⊢ ↑p ^ n * c = 0\n[PROOFSTEP]\nrw [hx, mul_zero]\n[GOAL]\ncase mpr\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℤ_[p]\nhx : x ≠ 0\nn : ℕ\n⊢ ↑n ≤ valuation x → ↑p ^ n ∣ x\n[PROOFSTEP]\nnth_rewrite 2 [unitCoeff_spec hx]\n[GOAL]\ncase mpr\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℤ_[p]\nhx : x ≠ 0\nn : ℕ\n⊢ ↑n ≤ valuation x → ↑p ^ n ∣ ↑(unitCoeff hx) * ↑p ^ Int.natAbs (valuation x)\n[PROOFSTEP]\nlift x.valuation to ℕ using x.valuation_nonneg with k\n[GOAL]\ncase mpr.intro\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℤ_[p]\nhx : x ≠ 0\nn k : ℕ\n⊢ ↑n ≤ ↑k → ↑p ^ n ∣ ↑(unitCoeff hx) * ↑p ^ Int.natAbs ↑k\n[PROOFSTEP]\nsimp only [Int.natAbs_ofNat, Units.isUnit, IsUnit.dvd_mul_left, Int.ofNat_le]\n[GOAL]\ncase mpr.intro\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℤ_[p]\nhx : x ≠ 0\nn k : ℕ\n⊢ n ≤ k → ↑p ^ n ∣ ↑p ^ k\n[PROOFSTEP]\nintro H\n[GOAL]\ncase mpr.intro\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℤ_[p]\nhx : x ≠ 0\nn k : ℕ\nH : n ≤ k\n⊢ ↑p ^ n ∣ ↑p ^ k\n[PROOFSTEP]\nobtain ⟨k, rfl⟩ := Nat.exists_eq_add_of_le H\n[GOAL]\ncase mpr.intro.intro\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℤ_[p]\nhx : x ≠ 0\nn k : ℕ\nH : n ≤ n + k\n⊢ ↑p ^ n ∣ ↑p ^ (n + k)\n[PROOFSTEP]\nsimp only [pow_add, dvd_mul_right]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℤ_[p]\nn : ℕ\n⊢ ‖x‖ ≤ ↑p ^ (-↑n) ↔ x ∈ Ideal.span {↑p ^ n}\n[PROOFSTEP]\nby_cases hx : x = 0\n[GOAL]\ncase pos\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℤ_[p]\nn : ℕ\nhx : x = 0\n⊢ ‖x‖ ≤ ↑p ^ (-↑n) ↔ x ∈ Ideal.span {↑p ^ n}\n[PROOFSTEP]\nsubst hx\n[GOAL]\ncase pos\np : ℕ\nhp : Fact (Nat.Prime p)\nn : ℕ\n⊢ ‖0‖ ≤ ↑p ^ (-↑n) ↔ 0 ∈ Ideal.span {↑p ^ n}\n[PROOFSTEP]\nsimp only [norm_zero, zpow_neg, zpow_ofNat, inv_nonneg, iff_true_iff, Submodule.zero_mem]\n[GOAL]\ncase pos\np : ℕ\nhp : Fact (Nat.Prime p)\nn : ℕ\n⊢ 0 ≤ ↑p ^ n\n[PROOFSTEP]\nexact_mod_cast Nat.zero_le _\n[GOAL]\ncase neg\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℤ_[p]\nn : ℕ\nhx : ¬x = 0\n⊢ ‖x‖ ≤ ↑p ^ (-↑n) ↔ x ∈ Ideal.span {↑p ^ n}\n[PROOFSTEP]\nrw [norm_le_pow_iff_le_valuation x hx, mem_span_pow_iff_le_valuation x hx]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℤ_[p]\nn : ℤ\n⊢ ‖x‖ ≤ ↑p ^ n ↔ ‖x‖ < ↑p ^ (n + 1)\n[PROOFSTEP]\nrw [norm_def]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℤ_[p]\nn : ℤ\n⊢ ‖↑x‖ ≤ ↑p ^ n ↔ ‖↑x‖ < ↑p ^ (n + 1)\n[PROOFSTEP]\nexact Padic.norm_le_pow_iff_norm_lt_pow_add_one _ _\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℤ_[p]\nn : ℤ\n⊢ ‖x‖ < ↑p ^ n ↔ ‖x‖ ≤ ↑p ^ (n - 1)\n[PROOFSTEP]\nrw [norm_le_pow_iff_norm_lt_pow_add_one, sub_add_cancel]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℤ_[p]\n⊢ ‖x‖ < 1 ↔ ↑p ∣ x\n[PROOFSTEP]\nhave := norm_le_pow_iff_mem_span_pow x 1\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℤ_[p]\nthis : ‖x‖ ≤ ↑p ^ (-↑1) ↔ x ∈ Ideal.span {↑p ^ 1}\n⊢ ‖x‖ < 1 ↔ ↑p ∣ x\n[PROOFSTEP]\nrw [Ideal.mem_span_singleton, pow_one] at this \n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℤ_[p]\nthis : ‖x‖ ≤ ↑p ^ (-↑1) ↔ ↑p ∣ x\n⊢ ‖x‖ < 1 ↔ ↑p ∣ x\n[PROOFSTEP]\nrw [← this, norm_le_pow_iff_norm_lt_pow_add_one]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℤ_[p]\nthis : ‖x‖ ≤ ↑p ^ (-↑1) ↔ ↑p ∣ x\n⊢ ‖x‖ < 1 ↔ ‖x‖ < ↑p ^ (-↑1 + 1)\n[PROOFSTEP]\nsimp only [zpow_zero, Int.ofNat_zero, Int.ofNat_succ, add_left_neg, zero_add]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nn : ℕ\na : ℤ\n⊢ ↑p ^ n ∣ ↑a ↔ ↑(p ^ n) ∣ a\n[PROOFSTEP]\nrw [← Nat.cast_pow, ← norm_int_le_pow_iff_dvd, norm_le_pow_iff_mem_span_pow, Ideal.mem_span_singleton, Nat.cast_pow]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\n⊢ ∀ (a b : ℤ_[p]), a ∈ nonunits ℤ_[p] → b ∈ nonunits ℤ_[p] → a + b ∈ nonunits ℤ_[p]\n[PROOFSTEP]\nsimp only [mem_nonunits]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\n⊢ ∀ (a b : ℤ_[p]), ‖a‖ < 1 → ‖b‖ < 1 → ‖a + b‖ < 1\n[PROOFSTEP]\nexact fun x y => norm_lt_one_add\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\n⊢ ↑p ∈ nonunits ℤ_[p]\n[PROOFSTEP]\nhave : (p : ℝ)⁻¹ < 1 := inv_lt_one <| by exact_mod_cast hp.1.one_lt\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\n⊢ 1 < ↑p\n[PROOFSTEP]\nexact_mod_cast hp.1.one_lt\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nthis : (↑p)⁻¹ < 1\n⊢ ↑p ∈ nonunits ℤ_[p]\n[PROOFSTEP]\nrwa [← norm_p, ← mem_nonunits] at this \n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\n⊢ maximalIdeal ℤ_[p] = Ideal.span {↑p}\n[PROOFSTEP]\napply le_antisymm\n[GOAL]\ncase a\np : ℕ\nhp : Fact (Nat.Prime p)\n⊢ maximalIdeal ℤ_[p] ≤ Ideal.span {↑p}\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase a\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℤ_[p]\nhx : x ∈ maximalIdeal ℤ_[p]\n⊢ x ∈ Ideal.span {↑p}\n[PROOFSTEP]\nsimp only [LocalRing.mem_maximalIdeal, mem_nonunits] at hx \n[GOAL]\ncase a\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℤ_[p]\nhx : ‖x‖ < 1\n⊢ x ∈ Ideal.span {↑p}\n[PROOFSTEP]\nrwa [Ideal.mem_span_singleton, ← norm_lt_one_iff_dvd]\n[GOAL]\ncase a\np : ℕ\nhp : Fact (Nat.Prime p)\n⊢ Ideal.span {↑p} ≤ maximalIdeal ℤ_[p]\n[PROOFSTEP]\nrw [Ideal.span_le, Set.singleton_subset_iff]\n[GOAL]\ncase a\np : ℕ\nhp : Fact (Nat.Prime p)\n⊢ ↑p ∈ ↑(maximalIdeal ℤ_[p])\n[PROOFSTEP]\nexact p_nonnunit\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\n⊢ Prime ↑p\n[PROOFSTEP]\nrw [← Ideal.span_singleton_prime, ← maximalIdeal_eq_span_p]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\n⊢ Ideal.IsPrime (maximalIdeal ℤ_[p])\n[PROOFSTEP]\ninfer_instance\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\n⊢ ↑p ≠ 0\n[PROOFSTEP]\nexact_mod_cast hp.1.ne_zero\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℤ_[p]\nhx : x ≠ 0\n⊢ ↑p ^ Int.natAbs (valuation x) * ↑(unitCoeff hx) = x\n[PROOFSTEP]\nrw [mul_comm, ← unitCoeff_spec hx]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℕ → ℤ_[p]\nhx : ∀ {m n : ℕ}, m ≤ n → x m ≡ x n [SMOD maximalIdeal ℤ_[p] ^ m • ⊤]\n⊢ ∃ L, ∀ (n : ℕ), x n ≡ L [SMOD maximalIdeal ℤ_[p] ^ n • ⊤]\n[PROOFSTEP]\nsimp only [← Ideal.one_eq_top, smul_eq_mul, mul_one, SModEq.sub_mem, maximalIdeal_eq_span_p, Ideal.span_singleton_pow, ←\n  norm_le_pow_iff_mem_span_pow] at hx ⊢\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℕ → ℤ_[p]\nhx : ∀ {m n : ℕ}, m ≤ n → ‖x m - x n‖ ≤ ↑p ^ (-↑m)\n⊢ ∃ L, ∀ (n : ℕ), ‖x n - L‖ ≤ ↑p ^ (-↑n)\n[PROOFSTEP]\nlet x' : CauSeq ℤ_[p] norm := ⟨x, ?_⟩\n[GOAL]\ncase refine_2\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℕ → ℤ_[p]\nhx : ∀ {m n : ℕ}, m ≤ n → ‖x m - x n‖ ≤ ↑p ^ (-↑m)\nx' : CauSeq ℤ_[p] norm := { val := x, property := ?refine_1 }\n⊢ ∃ L, ∀ (n : ℕ), ‖x n - L‖ ≤ ↑p ^ (-↑n)\ncase refine_1\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℕ → ℤ_[p]\nhx : ∀ {m n : ℕ}, m ≤ n → ‖x m - x n‖ ≤ ↑p ^ (-↑m)\n⊢ IsCauSeq norm x\n[PROOFSTEP]\nswap\n[GOAL]\ncase refine_1\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℕ → ℤ_[p]\nhx : ∀ {m n : ℕ}, m ≤ n → ‖x m - x n‖ ≤ ↑p ^ (-↑m)\n⊢ IsCauSeq norm x\n[PROOFSTEP]\nintro ε hε\n[GOAL]\ncase refine_1\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℕ → ℤ_[p]\nhx : ∀ {m n : ℕ}, m ≤ n → ‖x m - x n‖ ≤ ↑p ^ (-↑m)\nε : ℝ\nhε : ε > 0\n⊢ ∃ i, ∀ (j : ℕ), j ≥ i → ‖x j - x i‖ < ε\n[PROOFSTEP]\nobtain ⟨m, hm⟩ := exists_pow_neg_lt p hε\n[GOAL]\ncase refine_1.intro\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℕ → ℤ_[p]\nhx : ∀ {m n : ℕ}, m ≤ n → ‖x m - x n‖ ≤ ↑p ^ (-↑m)\nε : ℝ\nhε : ε > 0\nm : ℕ\nhm : ↑p ^ (-↑m) < ε\n⊢ ∃ i, ∀ (j : ℕ), j ≥ i → ‖x j - x i‖ < ε\n[PROOFSTEP]\nrefine ⟨m, fun n hn => lt_of_le_of_lt ?_ hm⟩\n[GOAL]\ncase refine_1.intro\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℕ → ℤ_[p]\nhx : ∀ {m n : ℕ}, m ≤ n → ‖x m - x n‖ ≤ ↑p ^ (-↑m)\nε : ℝ\nhε : ε > 0\nm : ℕ\nhm : ↑p ^ (-↑m) < ε\nn : ℕ\nhn : n ≥ m\n⊢ ‖x n - x m‖ ≤ ↑p ^ (-↑m)\n[PROOFSTEP]\nrw [← neg_sub, norm_neg]\n[GOAL]\ncase refine_1.intro\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℕ → ℤ_[p]\nhx : ∀ {m n : ℕ}, m ≤ n → ‖x m - x n‖ ≤ ↑p ^ (-↑m)\nε : ℝ\nhε : ε > 0\nm : ℕ\nhm : ↑p ^ (-↑m) < ε\nn : ℕ\nhn : n ≥ m\n⊢ ‖x m - x n‖ ≤ ↑p ^ (-↑m)\n[PROOFSTEP]\nexact hx hn\n[GOAL]\ncase refine_2\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℕ → ℤ_[p]\nhx : ∀ {m n : ℕ}, m ≤ n → ‖x m - x n‖ ≤ ↑p ^ (-↑m)\nx' : CauSeq ℤ_[p] norm := { val := x, property := (_ : ∀ (ε : ℝ), ε > 0 → ∃ i, ∀ (j : ℕ), j ≥ i → ‖x j - x i‖ < ε) }\n⊢ ∃ L, ∀ (n : ℕ), ‖x n - L‖ ≤ ↑p ^ (-↑n)\n[PROOFSTEP]\nrefine ⟨x'.lim, fun n => ?_⟩\n[GOAL]\ncase refine_2\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℕ → ℤ_[p]\nhx : ∀ {m n : ℕ}, m ≤ n → ‖x m - x n‖ ≤ ↑p ^ (-↑m)\nx' : CauSeq ℤ_[p] norm := { val := x, property := (_ : ∀ (ε : ℝ), ε > 0 → ∃ i, ∀ (j : ℕ), j ≥ i → ‖x j - x i‖ < ε) }\nn : ℕ\n⊢ ‖x n - CauSeq.lim x'‖ ≤ ↑p ^ (-↑n)\n[PROOFSTEP]\nhave : (0 : ℝ) < (p : ℝ) ^ (-n : ℤ) := by\n  apply zpow_pos_of_pos\n  exact_mod_cast hp.1.pos\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℕ → ℤ_[p]\nhx : ∀ {m n : ℕ}, m ≤ n → ‖x m - x n‖ ≤ ↑p ^ (-↑m)\nx' : CauSeq ℤ_[p] norm := { val := x, property := (_ : ∀ (ε : ℝ), ε > 0 → ∃ i, ∀ (j : ℕ), j ≥ i → ‖x j - x i‖ < ε) }\nn : ℕ\n⊢ 0 < ↑p ^ (-↑n)\n[PROOFSTEP]\napply zpow_pos_of_pos\n[GOAL]\ncase ha\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℕ → ℤ_[p]\nhx : ∀ {m n : ℕ}, m ≤ n → ‖x m - x n‖ ≤ ↑p ^ (-↑m)\nx' : CauSeq ℤ_[p] norm := { val := x, property := (_ : ∀ (ε : ℝ), ε > 0 → ∃ i, ∀ (j : ℕ), j ≥ i → ‖x j - x i‖ < ε) }\nn : ℕ\n⊢ 0 < ↑p\n[PROOFSTEP]\nexact_mod_cast hp.1.pos\n[GOAL]\ncase refine_2\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℕ → ℤ_[p]\nhx : ∀ {m n : ℕ}, m ≤ n → ‖x m - x n‖ ≤ ↑p ^ (-↑m)\nx' : CauSeq ℤ_[p] norm := { val := x, property := (_ : ∀ (ε : ℝ), ε > 0 → ∃ i, ∀ (j : ℕ), j ≥ i → ‖x j - x i‖ < ε) }\nn : ℕ\nthis : 0 < ↑p ^ (-↑n)\n⊢ ‖x n - CauSeq.lim x'‖ ≤ ↑p ^ (-↑n)\n[PROOFSTEP]\nobtain ⟨i, hi⟩ := equiv_def₃ (equiv_lim x') this\n[GOAL]\ncase refine_2.intro\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℕ → ℤ_[p]\nhx : ∀ {m n : ℕ}, m ≤ n → ‖x m - x n‖ ≤ ↑p ^ (-↑m)\nx' : CauSeq ℤ_[p] norm := { val := x, property := (_ : ∀ (ε : ℝ), ε > 0 → ∃ i, ∀ (j : ℕ), j ≥ i → ‖x j - x i‖ < ε) }\nn : ℕ\nthis : 0 < ↑p ^ (-↑n)\ni : ℕ\nhi : ∀ (j : ℕ), j ≥ i → ∀ (k : ℕ), k ≥ j → ‖↑x' k - ↑(const norm (CauSeq.lim x')) j‖ < ↑p ^ (-↑n)\n⊢ ‖x n - CauSeq.lim x'‖ ≤ ↑p ^ (-↑n)\n[PROOFSTEP]\nby_cases hin : i ≤ n\n[GOAL]\ncase pos\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℕ → ℤ_[p]\nhx : ∀ {m n : ℕ}, m ≤ n → ‖x m - x n‖ ≤ ↑p ^ (-↑m)\nx' : CauSeq ℤ_[p] norm := { val := x, property := (_ : ∀ (ε : ℝ), ε > 0 → ∃ i, ∀ (j : ℕ), j ≥ i → ‖x j - x i‖ < ε) }\nn : ℕ\nthis : 0 < ↑p ^ (-↑n)\ni : ℕ\nhi : ∀ (j : ℕ), j ≥ i → ∀ (k : ℕ), k ≥ j → ‖↑x' k - ↑(const norm (CauSeq.lim x')) j‖ < ↑p ^ (-↑n)\nhin : i ≤ n\n⊢ ‖x n - CauSeq.lim x'‖ ≤ ↑p ^ (-↑n)\n[PROOFSTEP]\nexact (hi i le_rfl n hin).le\n[GOAL]\ncase neg\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℕ → ℤ_[p]\nhx : ∀ {m n : ℕ}, m ≤ n → ‖x m - x n‖ ≤ ↑p ^ (-↑m)\nx' : CauSeq ℤ_[p] norm := { val := x, property := (_ : ∀ (ε : ℝ), ε > 0 → ∃ i, ∀ (j : ℕ), j ≥ i → ‖x j - x i‖ < ε) }\nn : ℕ\nthis : 0 < ↑p ^ (-↑n)\ni : ℕ\nhi : ∀ (j : ℕ), j ≥ i → ∀ (k : ℕ), k ≥ j → ‖↑x' k - ↑(const norm (CauSeq.lim x')) j‖ < ↑p ^ (-↑n)\nhin : ¬i ≤ n\n⊢ ‖x n - CauSeq.lim x'‖ ≤ ↑p ^ (-↑n)\n[PROOFSTEP]\npush_neg at hin \n[GOAL]\ncase neg\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℕ → ℤ_[p]\nhx : ∀ {m n : ℕ}, m ≤ n → ‖x m - x n‖ ≤ ↑p ^ (-↑m)\nx' : CauSeq ℤ_[p] norm := { val := x, property := (_ : ∀ (ε : ℝ), ε > 0 → ∃ i, ∀ (j : ℕ), j ≥ i → ‖x j - x i‖ < ε) }\nn : ℕ\nthis : 0 < ↑p ^ (-↑n)\ni : ℕ\nhi : ∀ (j : ℕ), j ≥ i → ∀ (k : ℕ), k ≥ j → ‖↑x' k - ↑(const norm (CauSeq.lim x')) j‖ < ↑p ^ (-↑n)\nhin : n < i\n⊢ ‖x n - CauSeq.lim x'‖ ≤ ↑p ^ (-↑n)\n[PROOFSTEP]\nspecialize hi i le_rfl i le_rfl\n[GOAL]\ncase neg\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℕ → ℤ_[p]\nhx : ∀ {m n : ℕ}, m ≤ n → ‖x m - x n‖ ≤ ↑p ^ (-↑m)\nx' : CauSeq ℤ_[p] norm := { val := x, property := (_ : ∀ (ε : ℝ), ε > 0 → ∃ i, ∀ (j : ℕ), j ≥ i → ‖x j - x i‖ < ε) }\nn : ℕ\nthis : 0 < ↑p ^ (-↑n)\ni : ℕ\nhin : n < i\nhi : ‖↑x' i - ↑(const norm (CauSeq.lim x')) i‖ < ↑p ^ (-↑n)\n⊢ ‖x n - CauSeq.lim x'‖ ≤ ↑p ^ (-↑n)\n[PROOFSTEP]\nspecialize hx hin.le\n[GOAL]\ncase neg\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℕ → ℤ_[p]\nhx✝ : ∀ {m n : ℕ}, m ≤ n → ‖x m - x n‖ ≤ ↑p ^ (-↑m)\nx' : CauSeq ℤ_[p] norm := { val := x, property := (_ : ∀ (ε : ℝ), ε > 0 → ∃ i, ∀ (j : ℕ), j ≥ i → ‖x j - x i‖ < ε) }\nn : ℕ\nthis : 0 < ↑p ^ (-↑n)\ni : ℕ\nhin : n < i\nhi : ‖↑x' i - ↑(const norm (CauSeq.lim x')) i‖ < ↑p ^ (-↑n)\nhx : ‖x n - x i‖ ≤ ↑p ^ (-↑n)\n⊢ ‖x n - CauSeq.lim x'‖ ≤ ↑p ^ (-↑n)\n[PROOFSTEP]\nhave := nonarchimedean (x n - x i : ℤ_[p]) (x i - x'.lim)\n[GOAL]\ncase neg\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℕ → ℤ_[p]\nhx✝ : ∀ {m n : ℕ}, m ≤ n → ‖x m - x n‖ ≤ ↑p ^ (-↑m)\nx' : CauSeq ℤ_[p] norm := { val := x, property := (_ : ∀ (ε : ℝ), ε > 0 → ∃ i, ∀ (j : ℕ), j ≥ i → ‖x j - x i‖ < ε) }\nn : ℕ\nthis✝ : 0 < ↑p ^ (-↑n)\ni : ℕ\nhin : n < i\nhi : ‖↑x' i - ↑(const norm (CauSeq.lim x')) i‖ < ↑p ^ (-↑n)\nhx : ‖x n - x i‖ ≤ ↑p ^ (-↑n)\nthis : ‖x n - x i + (x i - CauSeq.lim x')‖ ≤ max ‖x n - x i‖ ‖x i - CauSeq.lim x'‖\n⊢ ‖x n - CauSeq.lim x'‖ ≤ ↑p ^ (-↑n)\n[PROOFSTEP]\nrw [sub_add_sub_cancel] at this \n[GOAL]\ncase neg\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℕ → ℤ_[p]\nhx✝ : ∀ {m n : ℕ}, m ≤ n → ‖x m - x n‖ ≤ ↑p ^ (-↑m)\nx' : CauSeq ℤ_[p] norm := { val := x, property := (_ : ∀ (ε : ℝ), ε > 0 → ∃ i, ∀ (j : ℕ), j ≥ i → ‖x j - x i‖ < ε) }\nn : ℕ\nthis✝ : 0 < ↑p ^ (-↑n)\ni : ℕ\nhin : n < i\nhi : ‖↑x' i - ↑(const norm (CauSeq.lim x')) i‖ < ↑p ^ (-↑n)\nhx : ‖x n - x i‖ ≤ ↑p ^ (-↑n)\nthis : ‖x n - CauSeq.lim x'‖ ≤ max ‖x n - x i‖ ‖x i - CauSeq.lim x'‖\n⊢ ‖x n - CauSeq.lim x'‖ ≤ ↑p ^ (-↑n)\n[PROOFSTEP]\nrefine' this.trans (max_le_iff.mpr ⟨hx, hi.le⟩)\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nx✝ : { x // x ∈ nonZeroDivisors ℤ_[p] }\nx : ℤ_[p]\nhx : x ∈ nonZeroDivisors ℤ_[p]\n⊢ IsUnit (↑(algebraMap ℤ_[p] ℚ_[p]) ↑{ val := x, property := hx })\n[PROOFSTEP]\nrwa [algebraMap_apply, isUnit_iff_ne_zero, PadicInt.coe_ne_zero, ← mem_nonZeroDivisors_iff_ne_zero]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℚ_[p]\n⊢ ∃ x_1, x * ↑(algebraMap ℤ_[p] ℚ_[p]) ↑x_1.snd = ↑(algebraMap ℤ_[p] ℚ_[p]) x_1.fst\n[PROOFSTEP]\nby_cases hx : ‖x‖ ≤ 1\n[GOAL]\ncase pos\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℚ_[p]\nhx : ‖x‖ ≤ 1\n⊢ ∃ x_1, x * ↑(algebraMap ℤ_[p] ℚ_[p]) ↑x_1.snd = ↑(algebraMap ℤ_[p] ℚ_[p]) x_1.fst\n[PROOFSTEP]\nuse(⟨x, hx⟩, 1)\n[GOAL]\ncase h\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℚ_[p]\nhx : ‖x‖ ≤ 1\n⊢ x * ↑(algebraMap ℤ_[p] ℚ_[p]) ↑({ val := x, property := hx }, 1).snd =\n    ↑(algebraMap ℤ_[p] ℚ_[p]) ({ val := x, property := hx }, 1).fst\n[PROOFSTEP]\nrw [Submonoid.coe_one, map_one, mul_one, PadicInt.algebraMap_apply, Subtype.coe_mk]\n[GOAL]\ncase neg\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℚ_[p]\nhx : ¬‖x‖ ≤ 1\n⊢ ∃ x_1, x * ↑(algebraMap ℤ_[p] ℚ_[p]) ↑x_1.snd = ↑(algebraMap ℤ_[p] ℚ_[p]) x_1.fst\n[PROOFSTEP]\nset n := Int.toNat (-x.valuation) with hn\n[GOAL]\ncase neg\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℚ_[p]\nhx : ¬‖x‖ ≤ 1\nn : ℕ := Int.toNat (-Padic.valuation x)\nhn : n = Int.toNat (-Padic.valuation x)\n⊢ ∃ x_1, x * ↑(algebraMap ℤ_[p] ℚ_[p]) ↑x_1.snd = ↑(algebraMap ℤ_[p] ℚ_[p]) x_1.fst\n[PROOFSTEP]\nhave hn_coe : (n : ℤ) = -x.valuation := by\n  rw [hn, Int.toNat_of_nonneg]\n  rw [Right.nonneg_neg_iff]\n  rw [Padic.norm_le_one_iff_val_nonneg, not_le] at hx \n  exact hx.le\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℚ_[p]\nhx : ¬‖x‖ ≤ 1\nn : ℕ := Int.toNat (-Padic.valuation x)\nhn : n = Int.toNat (-Padic.valuation x)\n⊢ ↑n = -Padic.valuation x\n[PROOFSTEP]\nrw [hn, Int.toNat_of_nonneg]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℚ_[p]\nhx : ¬‖x‖ ≤ 1\nn : ℕ := Int.toNat (-Padic.valuation x)\nhn : n = Int.toNat (-Padic.valuation x)\n⊢ 0 ≤ -Padic.valuation x\n[PROOFSTEP]\nrw [Right.nonneg_neg_iff]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℚ_[p]\nhx : ¬‖x‖ ≤ 1\nn : ℕ := Int.toNat (-Padic.valuation x)\nhn : n = Int.toNat (-Padic.valuation x)\n⊢ Padic.valuation x ≤ 0\n[PROOFSTEP]\nrw [Padic.norm_le_one_iff_val_nonneg, not_le] at hx \n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℚ_[p]\nhx : Padic.valuation x < 0\nn : ℕ := Int.toNat (-Padic.valuation x)\nhn : n = Int.toNat (-Padic.valuation x)\n⊢ Padic.valuation x ≤ 0\n[PROOFSTEP]\nexact hx.le\n[GOAL]\ncase neg\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℚ_[p]\nhx : ¬‖x‖ ≤ 1\nn : ℕ := Int.toNat (-Padic.valuation x)\nhn : n = Int.toNat (-Padic.valuation x)\nhn_coe : ↑n = -Padic.valuation x\n⊢ ∃ x_1, x * ↑(algebraMap ℤ_[p] ℚ_[p]) ↑x_1.snd = ↑(algebraMap ℤ_[p] ℚ_[p]) x_1.fst\n[PROOFSTEP]\nset a := x * (p : ℚ_[p]) ^ n with ha\n[GOAL]\ncase neg\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℚ_[p]\nhx : ¬‖x‖ ≤ 1\nn : ℕ := Int.toNat (-Padic.valuation x)\nhn : n = Int.toNat (-Padic.valuation x)\nhn_coe : ↑n = -Padic.valuation x\na : ℚ_[p] := x * ↑p ^ n\nha : a = x * ↑p ^ n\n⊢ ∃ x_1, x * ↑(algebraMap ℤ_[p] ℚ_[p]) ↑x_1.snd = ↑(algebraMap ℤ_[p] ℚ_[p]) x_1.fst\n[PROOFSTEP]\nhave ha_norm : ‖a‖ = 1 :=\n  by\n  have hx : x ≠ 0 := by\n    intro h0\n    rw [h0, norm_zero] at hx \n    exact hx zero_le_one\n  rw [ha, padicNormE.mul, padicNormE.norm_p_pow, Padic.norm_eq_pow_val hx, ← zpow_add', hn_coe, neg_neg, add_left_neg,\n    zpow_zero]\n  exact Or.inl (Nat.cast_ne_zero.mpr (NeZero.ne p))\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℚ_[p]\nhx : ¬‖x‖ ≤ 1\nn : ℕ := Int.toNat (-Padic.valuation x)\nhn : n = Int.toNat (-Padic.valuation x)\nhn_coe : ↑n = -Padic.valuation x\na : ℚ_[p] := x * ↑p ^ n\nha : a = x * ↑p ^ n\n⊢ ‖a‖ = 1\n[PROOFSTEP]\nhave hx : x ≠ 0 := by\n  intro h0\n  rw [h0, norm_zero] at hx \n  exact hx zero_le_one\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℚ_[p]\nhx : ¬‖x‖ ≤ 1\nn : ℕ := Int.toNat (-Padic.valuation x)\nhn : n = Int.toNat (-Padic.valuation x)\nhn_coe : ↑n = -Padic.valuation x\na : ℚ_[p] := x * ↑p ^ n\nha : a = x * ↑p ^ n\n⊢ x ≠ 0\n[PROOFSTEP]\nintro h0\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℚ_[p]\nhx : ¬‖x‖ ≤ 1\nn : ℕ := Int.toNat (-Padic.valuation x)\nhn : n = Int.toNat (-Padic.valuation x)\nhn_coe : ↑n = -Padic.valuation x\na : ℚ_[p] := x * ↑p ^ n\nha : a = x * ↑p ^ n\nh0 : x = 0\n⊢ False\n[PROOFSTEP]\nrw [h0, norm_zero] at hx \n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℚ_[p]\nhx : ¬0 ≤ 1\nn : ℕ := Int.toNat (-Padic.valuation x)\nhn : n = Int.toNat (-Padic.valuation x)\nhn_coe : ↑n = -Padic.valuation x\na : ℚ_[p] := x * ↑p ^ n\nha : a = x * ↑p ^ n\nh0 : x = 0\n⊢ False\n[PROOFSTEP]\nexact hx zero_le_one\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℚ_[p]\nhx✝ : ¬‖x‖ ≤ 1\nn : ℕ := Int.toNat (-Padic.valuation x)\nhn : n = Int.toNat (-Padic.valuation x)\nhn_coe : ↑n = -Padic.valuation x\na : ℚ_[p] := x * ↑p ^ n\nha : a = x * ↑p ^ n\nhx : x ≠ 0\n⊢ ‖a‖ = 1\n[PROOFSTEP]\nrw [ha, padicNormE.mul, padicNormE.norm_p_pow, Padic.norm_eq_pow_val hx, ← zpow_add', hn_coe, neg_neg, add_left_neg,\n  zpow_zero]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℚ_[p]\nhx✝ : ¬‖x‖ ≤ 1\nn : ℕ := Int.toNat (-Padic.valuation x)\nhn : n = Int.toNat (-Padic.valuation x)\nhn_coe : ↑n = -Padic.valuation x\na : ℚ_[p] := x * ↑p ^ n\nha : a = x * ↑p ^ n\nhx : x ≠ 0\n⊢ ↑p ≠ 0 ∨ -Padic.valuation x + -↑n ≠ 0 ∨ -Padic.valuation x = 0 ∧ -↑n = 0\n[PROOFSTEP]\nexact Or.inl (Nat.cast_ne_zero.mpr (NeZero.ne p))\n[GOAL]\ncase neg\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℚ_[p]\nhx : ¬‖x‖ ≤ 1\nn : ℕ := Int.toNat (-Padic.valuation x)\nhn : n = Int.toNat (-Padic.valuation x)\nhn_coe : ↑n = -Padic.valuation x\na : ℚ_[p] := x * ↑p ^ n\nha : a = x * ↑p ^ n\nha_norm : ‖a‖ = 1\n⊢ ∃ x_1, x * ↑(algebraMap ℤ_[p] ℚ_[p]) ↑x_1.snd = ↑(algebraMap ℤ_[p] ℚ_[p]) x_1.fst\n[PROOFSTEP]\nuse(⟨a, le_of_eq ha_norm⟩, ⟨(p ^ n : ℤ_[p]), mem_nonZeroDivisors_iff_ne_zero.mpr (NeZero.ne _)⟩)\n[GOAL]\ncase h\np : ℕ\nhp : Fact (Nat.Prime p)\nx : ℚ_[p]\nhx : ¬‖x‖ ≤ 1\nn : ℕ := Int.toNat (-Padic.valuation x)\nhn : n = Int.toNat (-Padic.valuation x)\nhn_coe : ↑n = -Padic.valuation x\na : ℚ_[p] := x * ↑p ^ n\nha : a = x * ↑p ^ n\nha_norm : ‖a‖ = 1\n⊢ x *\n      ↑(algebraMap ℤ_[p] ℚ_[p])\n        ↑({ val := a, property := (_ : ‖a‖ ≤ 1) },\n              { val := ↑(p ^ n), property := (_ : ↑(p ^ n) ∈ nonZeroDivisors ℤ_[p]) }).snd =\n    ↑(algebraMap ℤ_[p] ℚ_[p])\n      ({ val := a, property := (_ : ‖a‖ ≤ 1) },\n          { val := ↑(p ^ n), property := (_ : ↑(p ^ n) ∈ nonZeroDivisors ℤ_[p]) }).fst\n[PROOFSTEP]\nsimp only [map_pow, map_natCast, algebraMap_apply, PadicInt.coe_pow, PadicInt.coe_nat_cast, Subtype.coe_mk,\n  Nat.cast_pow]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\n⊢ ∀ {x y : ℤ_[p]}, ↑(algebraMap ℤ_[p] ℚ_[p]) x = ↑(algebraMap ℤ_[p] ℚ_[p]) y ↔ ∃ c, ↑c * x = ↑c * y\n[PROOFSTEP]\nsimp_rw [algebraMap_apply, Subtype.coe_inj]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\n⊢ ∀ {x y : ℤ_[p]}, x = y ↔ ∃ c, ↑c * x = ↑c * y\n[PROOFSTEP]\nrefine ⟨fun h => ⟨1, by rw [h]⟩, ?_⟩\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nx✝ y✝ : ℤ_[p]\nh : x✝ = y✝\n⊢ ↑1 * x✝ = ↑1 * y✝\n[PROOFSTEP]\nrw [h]\n[GOAL]\np : ℕ\nhp : Fact (Nat.Prime p)\nx✝ y✝ : ℤ_[p]\n⊢ (∃ c, ↑c * x✝ = ↑c * y✝) → x✝ = y✝\n[PROOFSTEP]\nrintro ⟨⟨c, hc⟩, h⟩\n[GOAL]\ncase intro.mk\np : ℕ\nhp : Fact (Nat.Prime p)\nx✝ y✝ c : ℤ_[p]\nhc : c ∈ nonZeroDivisors ℤ_[p]\nh : ↑{ val := c, property := hc } * x✝ = ↑{ val := c, property := hc } * y✝\n⊢ x✝ = y✝\n[PROOFSTEP]\nexact (mul_eq_mul_left_iff.mp h).resolve_right (mem_nonZeroDivisors_iff_ne_zero.mp hc)\n", "meta": {"mathlib_filename": "Mathlib.NumberTheory.Padics.PadicIntegers", "llama_tokens": 23922, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8080672135527632, "lm_q2_score": 0.6548947425132315, "lm_q1q2_score": 0.5291989697530214}}
{"text": "[GOAL]\nn : ℕ+\nK : Type u\ninst✝¹ : Field K\ninst✝ : CharZero K\nζ : K\nce : IsCyclotomicExtension {n} ℚ K\nhζ : IsPrimitiveRoot ζ ↑n\n⊢ discr ℚ ↑(IsPrimitiveRoot.powerBasis ℚ hζ).basis = discr ℚ ↑(subOnePowerBasis ℚ hζ).basis\n[PROOFSTEP]\nhaveI : NumberField K := @NumberField.mk _ _ _ (IsCyclotomicExtension.finiteDimensional { n } ℚ K)\n[GOAL]\nn : ℕ+\nK : Type u\ninst✝¹ : Field K\ninst✝ : CharZero K\nζ : K\nce : IsCyclotomicExtension {n} ℚ K\nhζ : IsPrimitiveRoot ζ ↑n\nthis : NumberField K\n⊢ discr ℚ ↑(IsPrimitiveRoot.powerBasis ℚ hζ).basis = discr ℚ ↑(subOnePowerBasis ℚ hζ).basis\n[PROOFSTEP]\nhave H₁ : (aeval (hζ.powerBasis ℚ).gen) (X - 1 : ℤ[X]) = (hζ.subOnePowerBasis ℚ).gen := by simp\n[GOAL]\nn : ℕ+\nK : Type u\ninst✝¹ : Field K\ninst✝ : CharZero K\nζ : K\nce : IsCyclotomicExtension {n} ℚ K\nhζ : IsPrimitiveRoot ζ ↑n\nthis : NumberField K\n⊢ ↑(aeval (IsPrimitiveRoot.powerBasis ℚ hζ).gen) (X - 1) = (subOnePowerBasis ℚ hζ).gen\n[PROOFSTEP]\nsimp\n[GOAL]\nn : ℕ+\nK : Type u\ninst✝¹ : Field K\ninst✝ : CharZero K\nζ : K\nce : IsCyclotomicExtension {n} ℚ K\nhζ : IsPrimitiveRoot ζ ↑n\nthis : NumberField K\nH₁ : ↑(aeval (IsPrimitiveRoot.powerBasis ℚ hζ).gen) (X - 1) = (subOnePowerBasis ℚ hζ).gen\n⊢ discr ℚ ↑(IsPrimitiveRoot.powerBasis ℚ hζ).basis = discr ℚ ↑(subOnePowerBasis ℚ hζ).basis\n[PROOFSTEP]\nhave H₂ : (aeval (hζ.subOnePowerBasis ℚ).gen) (X + 1 : ℤ[X]) = (hζ.powerBasis ℚ).gen := by simp\n[GOAL]\nn : ℕ+\nK : Type u\ninst✝¹ : Field K\ninst✝ : CharZero K\nζ : K\nce : IsCyclotomicExtension {n} ℚ K\nhζ : IsPrimitiveRoot ζ ↑n\nthis : NumberField K\nH₁ : ↑(aeval (IsPrimitiveRoot.powerBasis ℚ hζ).gen) (X - 1) = (subOnePowerBasis ℚ hζ).gen\n⊢ ↑(aeval (subOnePowerBasis ℚ hζ).gen) (X + 1) = (IsPrimitiveRoot.powerBasis ℚ hζ).gen\n[PROOFSTEP]\nsimp\n[GOAL]\nn : ℕ+\nK : Type u\ninst✝¹ : Field K\ninst✝ : CharZero K\nζ : K\nce : IsCyclotomicExtension {n} ℚ K\nhζ : IsPrimitiveRoot ζ ↑n\nthis : NumberField K\nH₁ : ↑(aeval (IsPrimitiveRoot.powerBasis ℚ hζ).gen) (X - 1) = (subOnePowerBasis ℚ hζ).gen\nH₂ : ↑(aeval (subOnePowerBasis ℚ hζ).gen) (X + 1) = (IsPrimitiveRoot.powerBasis ℚ hζ).gen\n⊢ discr ℚ ↑(IsPrimitiveRoot.powerBasis ℚ hζ).basis = discr ℚ ↑(subOnePowerBasis ℚ hζ).basis\n[PROOFSTEP]\nrefine'\n  discr_eq_discr_of_toMatrix_coeff_isIntegral _ (fun i j => toMatrix_isIntegral H₁ _ _ _ _) fun i j =>\n    toMatrix_isIntegral H₂ _ _ _ _\n[GOAL]\ncase refine'_1\nn : ℕ+\nK : Type u\ninst✝¹ : Field K\ninst✝ : CharZero K\nζ : K\nce : IsCyclotomicExtension {n} ℚ K\nhζ : IsPrimitiveRoot ζ ↑n\nthis : NumberField K\nH₁ : ↑(aeval (IsPrimitiveRoot.powerBasis ℚ hζ).gen) (X - 1) = (subOnePowerBasis ℚ hζ).gen\nH₂ : ↑(aeval (subOnePowerBasis ℚ hζ).gen) (X + 1) = (IsPrimitiveRoot.powerBasis ℚ hζ).gen\ni : Fin (IsPrimitiveRoot.powerBasis ℚ hζ).dim\nj : Fin (subOnePowerBasis ℚ hζ).dim\n⊢ IsIntegral ℤ (IsPrimitiveRoot.powerBasis ℚ hζ).gen\n[PROOFSTEP]\nexact hζ.isIntegral n.pos\n[GOAL]\ncase refine'_2\nn : ℕ+\nK : Type u\ninst✝¹ : Field K\ninst✝ : CharZero K\nζ : K\nce : IsCyclotomicExtension {n} ℚ K\nhζ : IsPrimitiveRoot ζ ↑n\nthis : NumberField K\nH₁ : ↑(aeval (IsPrimitiveRoot.powerBasis ℚ hζ).gen) (X - 1) = (subOnePowerBasis ℚ hζ).gen\nH₂ : ↑(aeval (subOnePowerBasis ℚ hζ).gen) (X + 1) = (IsPrimitiveRoot.powerBasis ℚ hζ).gen\ni : Fin (IsPrimitiveRoot.powerBasis ℚ hζ).dim\nj : Fin (subOnePowerBasis ℚ hζ).dim\n⊢ minpoly ℚ (IsPrimitiveRoot.powerBasis ℚ hζ).gen =\n    Polynomial.map (algebraMap ℤ ℚ) (minpoly ℤ (IsPrimitiveRoot.powerBasis ℚ hζ).gen)\n[PROOFSTEP]\nrefine' minpoly.isIntegrallyClosed_eq_field_fractions' (K := ℚ) (hζ.isIntegral n.pos)\n[GOAL]\ncase refine'_3\nn : ℕ+\nK : Type u\ninst✝¹ : Field K\ninst✝ : CharZero K\nζ : K\nce : IsCyclotomicExtension {n} ℚ K\nhζ : IsPrimitiveRoot ζ ↑n\nthis : NumberField K\nH₁ : ↑(aeval (IsPrimitiveRoot.powerBasis ℚ hζ).gen) (X - 1) = (subOnePowerBasis ℚ hζ).gen\nH₂ : ↑(aeval (subOnePowerBasis ℚ hζ).gen) (X + 1) = (IsPrimitiveRoot.powerBasis ℚ hζ).gen\ni : Fin (subOnePowerBasis ℚ hζ).dim\nj : Fin (IsPrimitiveRoot.powerBasis ℚ hζ).dim\n⊢ IsIntegral ℤ (subOnePowerBasis ℚ hζ).gen\n[PROOFSTEP]\nexact isIntegral_sub (hζ.isIntegral n.pos) isIntegral_one\n[GOAL]\ncase refine'_4\nn : ℕ+\nK : Type u\ninst✝¹ : Field K\ninst✝ : CharZero K\nζ : K\nce : IsCyclotomicExtension {n} ℚ K\nhζ : IsPrimitiveRoot ζ ↑n\nthis : NumberField K\nH₁ : ↑(aeval (IsPrimitiveRoot.powerBasis ℚ hζ).gen) (X - 1) = (subOnePowerBasis ℚ hζ).gen\nH₂ : ↑(aeval (subOnePowerBasis ℚ hζ).gen) (X + 1) = (IsPrimitiveRoot.powerBasis ℚ hζ).gen\ni : Fin (subOnePowerBasis ℚ hζ).dim\nj : Fin (IsPrimitiveRoot.powerBasis ℚ hζ).dim\n⊢ minpoly ℚ (subOnePowerBasis ℚ hζ).gen = Polynomial.map (algebraMap ℤ ℚ) (minpoly ℤ (subOnePowerBasis ℚ hζ).gen)\n[PROOFSTEP]\nrefine' minpoly.isIntegrallyClosed_eq_field_fractions' (K := ℚ) _\n[GOAL]\ncase refine'_4\nn : ℕ+\nK : Type u\ninst✝¹ : Field K\ninst✝ : CharZero K\nζ : K\nce : IsCyclotomicExtension {n} ℚ K\nhζ : IsPrimitiveRoot ζ ↑n\nthis : NumberField K\nH₁ : ↑(aeval (IsPrimitiveRoot.powerBasis ℚ hζ).gen) (X - 1) = (subOnePowerBasis ℚ hζ).gen\nH₂ : ↑(aeval (subOnePowerBasis ℚ hζ).gen) (X + 1) = (IsPrimitiveRoot.powerBasis ℚ hζ).gen\ni : Fin (subOnePowerBasis ℚ hζ).dim\nj : Fin (IsPrimitiveRoot.powerBasis ℚ hζ).dim\n⊢ IsIntegral ℤ (subOnePowerBasis ℚ hζ).gen\n[PROOFSTEP]\nexact isIntegral_sub (hζ.isIntegral n.pos) isIntegral_one\n[GOAL]\np : ℕ+\nk : ℕ\nK : Type u\nL : Type v\nζ : L\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhp : Fact (Nat.Prime ↑p)\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhk : p ^ (k + 1) ≠ 2\n⊢ discr K ↑(IsPrimitiveRoot.powerBasis K hζ).basis =\n    ↑((-1) ^ (φ ↑(p ^ (k + 1)) / 2)) * ↑↑(p ^ (↑p ^ k * ((↑p - 1) * (k + 1) - 1)))\n[PROOFSTEP]\nhaveI hne := IsCyclotomicExtension.neZero' (p ^ (k + 1)) K L\n[GOAL]\np : ℕ+\nk : ℕ\nK : Type u\nL : Type v\nζ : L\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhp : Fact (Nat.Prime ↑p)\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhk : p ^ (k + 1) ≠ 2\nhne : NeZero ↑↑(p ^ (k + 1))\n⊢ discr K ↑(IsPrimitiveRoot.powerBasis K hζ).basis =\n    ↑((-1) ^ (φ ↑(p ^ (k + 1)) / 2)) * ↑↑(p ^ (↑p ^ k * ((↑p - 1) * (k + 1) - 1)))\n[PROOFSTEP]\nhaveI mf : Module.Finite K L := finiteDimensional {p ^ (k + 1)} K L\n[GOAL]\np : ℕ+\nk : ℕ\nK : Type u\nL : Type v\nζ : L\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhp : Fact (Nat.Prime ↑p)\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhk : p ^ (k + 1) ≠ 2\nhne : NeZero ↑↑(p ^ (k + 1))\nmf : Module.Finite K L\n⊢ discr K ↑(IsPrimitiveRoot.powerBasis K hζ).basis =\n    ↑((-1) ^ (φ ↑(p ^ (k + 1)) / 2)) * ↑↑(p ^ (↑p ^ k * ((↑p - 1) * (k + 1) - 1)))\n[PROOFSTEP]\nhaveI se : IsSeparable K L := (isGalois (p ^ (k + 1)) K L).to_isSeparable\n[GOAL]\np : ℕ+\nk : ℕ\nK : Type u\nL : Type v\nζ : L\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhp : Fact (Nat.Prime ↑p)\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhk : p ^ (k + 1) ≠ 2\nhne : NeZero ↑↑(p ^ (k + 1))\nmf : Module.Finite K L\nse : IsSeparable K L\n⊢ discr K ↑(IsPrimitiveRoot.powerBasis K hζ).basis =\n    ↑((-1) ^ (φ ↑(p ^ (k + 1)) / 2)) * ↑↑(p ^ (↑p ^ k * ((↑p - 1) * (k + 1) - 1)))\n[PROOFSTEP]\nrw [discr_powerBasis_eq_norm, finrank L hirr, hζ.powerBasis_gen _, ← hζ.minpoly_eq_cyclotomic_of_irreducible hirr,\n  PNat.pow_coe, totient_prime_pow hp.out (succ_pos k), succ_sub_one]\n[GOAL]\np : ℕ+\nk : ℕ\nK : Type u\nL : Type v\nζ : L\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhp : Fact (Nat.Prime ↑p)\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhk : p ^ (k + 1) ≠ 2\nhne : NeZero ↑↑(p ^ (k + 1))\nmf : Module.Finite K L\nse : IsSeparable K L\n⊢ (-1) ^ (↑p ^ k * (↑p - 1) * (↑p ^ k * (↑p - 1) - 1) / 2) *\n      ↑(Algebra.norm K) (↑(aeval ζ) (↑derivative (cyclotomic (↑p ^ (k + 1)) K))) =\n    ↑((-1) ^ (↑p ^ k * (↑p - 1) / 2)) * ↑↑(p ^ (↑p ^ k * ((↑p - 1) * (k + 1) - 1)))\n[PROOFSTEP]\nhave coe_two : ((2 : ℕ+) : ℕ) = 2 := rfl\n[GOAL]\np : ℕ+\nk : ℕ\nK : Type u\nL : Type v\nζ : L\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhp : Fact (Nat.Prime ↑p)\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhk : p ^ (k + 1) ≠ 2\nhne : NeZero ↑↑(p ^ (k + 1))\nmf : Module.Finite K L\nse : IsSeparable K L\ncoe_two : ↑2 = 2\n⊢ (-1) ^ (↑p ^ k * (↑p - 1) * (↑p ^ k * (↑p - 1) - 1) / 2) *\n      ↑(Algebra.norm K) (↑(aeval ζ) (↑derivative (cyclotomic (↑p ^ (k + 1)) K))) =\n    ↑((-1) ^ (↑p ^ k * (↑p - 1) / 2)) * ↑↑(p ^ (↑p ^ k * ((↑p - 1) * (k + 1) - 1)))\n[PROOFSTEP]\nhave hp2 : p = 2 → k ≠ 0 := by\n  rintro rfl rfl\n  exact absurd rfl hk\n[GOAL]\np : ℕ+\nk : ℕ\nK : Type u\nL : Type v\nζ : L\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhp : Fact (Nat.Prime ↑p)\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhk : p ^ (k + 1) ≠ 2\nhne : NeZero ↑↑(p ^ (k + 1))\nmf : Module.Finite K L\nse : IsSeparable K L\ncoe_two : ↑2 = 2\n⊢ p = 2 → k ≠ 0\n[PROOFSTEP]\nrintro rfl rfl\n[GOAL]\nK : Type u\nL : Type v\nζ : L\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra K L\nmf : Module.Finite K L\nse : IsSeparable K L\ncoe_two : ↑2 = 2\nhp : Fact (Nat.Prime ↑2)\ninst✝ : IsCyclotomicExtension {2 ^ (0 + 1)} K L\nhζ : IsPrimitiveRoot ζ ↑(2 ^ (0 + 1))\nhirr : Irreducible (cyclotomic (↑(2 ^ (0 + 1))) K)\nhk : 2 ^ (0 + 1) ≠ 2\nhne : NeZero ↑↑(2 ^ (0 + 1))\n⊢ False\n[PROOFSTEP]\nexact absurd rfl hk\n[GOAL]\np : ℕ+\nk : ℕ\nK : Type u\nL : Type v\nζ : L\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhp : Fact (Nat.Prime ↑p)\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhk : p ^ (k + 1) ≠ 2\nhne : NeZero ↑↑(p ^ (k + 1))\nmf : Module.Finite K L\nse : IsSeparable K L\ncoe_two : ↑2 = 2\nhp2 : p = 2 → k ≠ 0\n⊢ (-1) ^ (↑p ^ k * (↑p - 1) * (↑p ^ k * (↑p - 1) - 1) / 2) *\n      ↑(Algebra.norm K) (↑(aeval ζ) (↑derivative (cyclotomic (↑p ^ (k + 1)) K))) =\n    ↑((-1) ^ (↑p ^ k * (↑p - 1) / 2)) * ↑↑(p ^ (↑p ^ k * ((↑p - 1) * (k + 1) - 1)))\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_a\np : ℕ+\nk : ℕ\nK : Type u\nL : Type v\nζ : L\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhp : Fact (Nat.Prime ↑p)\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhk : p ^ (k + 1) ≠ 2\nhne : NeZero ↑↑(p ^ (k + 1))\nmf : Module.Finite K L\nse : IsSeparable K L\ncoe_two : ↑2 = 2\nhp2 : p = 2 → k ≠ 0\n⊢ (-1) ^ (↑p ^ k * (↑p - 1) * (↑p ^ k * (↑p - 1) - 1) / 2) = ↑((-1) ^ (↑p ^ k * (↑p - 1) / 2))\n[PROOFSTEP]\nrcases eq_or_ne p 2 with (rfl | hp2)\n[GOAL]\ncase e_a.inl\nk : ℕ\nK : Type u\nL : Type v\nζ : L\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra K L\nmf : Module.Finite K L\nse : IsSeparable K L\ncoe_two : ↑2 = 2\ninst✝ : IsCyclotomicExtension {2 ^ (k + 1)} K L\nhp : Fact (Nat.Prime ↑2)\nhζ : IsPrimitiveRoot ζ ↑(2 ^ (k + 1))\nhirr : Irreducible (cyclotomic (↑(2 ^ (k + 1))) K)\nhk : 2 ^ (k + 1) ≠ 2\nhne : NeZero ↑↑(2 ^ (k + 1))\nhp2 : 2 = 2 → k ≠ 0\n⊢ (-1) ^ (↑2 ^ k * (↑2 - 1) * (↑2 ^ k * (↑2 - 1) - 1) / 2) = ↑((-1) ^ (↑2 ^ k * (↑2 - 1) / 2))\n[PROOFSTEP]\nrcases Nat.exists_eq_succ_of_ne_zero (hp2 rfl) with ⟨k, rfl⟩\n[GOAL]\ncase e_a.inl.intro\nK : Type u\nL : Type v\nζ : L\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra K L\nmf : Module.Finite K L\nse : IsSeparable K L\ncoe_two : ↑2 = 2\nhp : Fact (Nat.Prime ↑2)\nk : ℕ\ninst✝ : IsCyclotomicExtension {2 ^ (succ k + 1)} K L\nhζ : IsPrimitiveRoot ζ ↑(2 ^ (succ k + 1))\nhirr : Irreducible (cyclotomic (↑(2 ^ (succ k + 1))) K)\nhk : 2 ^ (succ k + 1) ≠ 2\nhne : NeZero ↑↑(2 ^ (succ k + 1))\nhp2 : 2 = 2 → succ k ≠ 0\n⊢ (-1) ^ (↑2 ^ succ k * (↑2 - 1) * (↑2 ^ succ k * (↑2 - 1) - 1) / 2) = ↑((-1) ^ (↑2 ^ succ k * (↑2 - 1) / 2))\n[PROOFSTEP]\nrw [coe_two, succ_sub_succ_eq_sub, tsub_zero, mul_one]\n[GOAL]\ncase e_a.inl.intro\nK : Type u\nL : Type v\nζ : L\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra K L\nmf : Module.Finite K L\nse : IsSeparable K L\ncoe_two : ↑2 = 2\nhp : Fact (Nat.Prime ↑2)\nk : ℕ\ninst✝ : IsCyclotomicExtension {2 ^ (succ k + 1)} K L\nhζ : IsPrimitiveRoot ζ ↑(2 ^ (succ k + 1))\nhirr : Irreducible (cyclotomic (↑(2 ^ (succ k + 1))) K)\nhk : 2 ^ (succ k + 1) ≠ 2\nhne : NeZero ↑↑(2 ^ (succ k + 1))\nhp2 : 2 = 2 → succ k ≠ 0\n⊢ (-1) ^ (2 ^ succ k * (2 ^ succ k - 1) / 2) = ↑((-1) ^ (2 ^ succ k / 2))\n[PROOFSTEP]\nsimp only [_root_.pow_succ]\n[GOAL]\ncase e_a.inl.intro\nK : Type u\nL : Type v\nζ : L\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra K L\nmf : Module.Finite K L\nse : IsSeparable K L\ncoe_two : ↑2 = 2\nhp : Fact (Nat.Prime ↑2)\nk : ℕ\ninst✝ : IsCyclotomicExtension {2 ^ (succ k + 1)} K L\nhζ : IsPrimitiveRoot ζ ↑(2 ^ (succ k + 1))\nhirr : Irreducible (cyclotomic (↑(2 ^ (succ k + 1))) K)\nhk : 2 ^ (succ k + 1) ≠ 2\nhne : NeZero ↑↑(2 ^ (succ k + 1))\nhp2 : 2 = 2 → succ k ≠ 0\n⊢ (-1) ^ (2 * 2 ^ k * (2 * 2 ^ k - 1) / 2) = ↑((-1) ^ (2 * 2 ^ k / 2))\n[PROOFSTEP]\nrw [mul_assoc, Nat.mul_div_cancel_left _ zero_lt_two, Nat.mul_div_cancel_left _ zero_lt_two]\n[GOAL]\ncase e_a.inl.intro\nK : Type u\nL : Type v\nζ : L\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra K L\nmf : Module.Finite K L\nse : IsSeparable K L\ncoe_two : ↑2 = 2\nhp : Fact (Nat.Prime ↑2)\nk : ℕ\ninst✝ : IsCyclotomicExtension {2 ^ (succ k + 1)} K L\nhζ : IsPrimitiveRoot ζ ↑(2 ^ (succ k + 1))\nhirr : Irreducible (cyclotomic (↑(2 ^ (succ k + 1))) K)\nhk : 2 ^ (succ k + 1) ≠ 2\nhne : NeZero ↑↑(2 ^ (succ k + 1))\nhp2 : 2 = 2 → succ k ≠ 0\n⊢ (-1) ^ (2 ^ k * (2 * 2 ^ k - 1)) = ↑((-1) ^ 2 ^ k)\n[PROOFSTEP]\ncases k\n[GOAL]\ncase e_a.inl.intro.zero\nK : Type u\nL : Type v\nζ : L\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra K L\nmf : Module.Finite K L\nse : IsSeparable K L\ncoe_two : ↑2 = 2\nhp : Fact (Nat.Prime ↑2)\ninst✝ : IsCyclotomicExtension {2 ^ (succ Nat.zero + 1)} K L\nhζ : IsPrimitiveRoot ζ ↑(2 ^ (succ Nat.zero + 1))\nhirr : Irreducible (cyclotomic (↑(2 ^ (succ Nat.zero + 1))) K)\nhk : 2 ^ (succ Nat.zero + 1) ≠ 2\nhne : NeZero ↑↑(2 ^ (succ Nat.zero + 1))\nhp2 : 2 = 2 → succ Nat.zero ≠ 0\n⊢ (-1) ^ (2 ^ Nat.zero * (2 * 2 ^ Nat.zero - 1)) = ↑((-1) ^ 2 ^ Nat.zero)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase e_a.inl.intro.succ\nK : Type u\nL : Type v\nζ : L\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra K L\nmf : Module.Finite K L\nse : IsSeparable K L\ncoe_two : ↑2 = 2\nhp : Fact (Nat.Prime ↑2)\nn✝ : ℕ\ninst✝ : IsCyclotomicExtension {2 ^ (succ (succ n✝) + 1)} K L\nhζ : IsPrimitiveRoot ζ ↑(2 ^ (succ (succ n✝) + 1))\nhirr : Irreducible (cyclotomic (↑(2 ^ (succ (succ n✝) + 1))) K)\nhk : 2 ^ (succ (succ n✝) + 1) ≠ 2\nhne : NeZero ↑↑(2 ^ (succ (succ n✝) + 1))\nhp2 : 2 = 2 → succ (succ n✝) ≠ 0\n⊢ (-1) ^ (2 ^ succ n✝ * (2 * 2 ^ succ n✝ - 1)) = ↑((-1) ^ 2 ^ succ n✝)\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase e_a.inl.intro.succ\nK : Type u\nL : Type v\nζ : L\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra K L\nmf : Module.Finite K L\nse : IsSeparable K L\ncoe_two : ↑2 = 2\nhp : Fact (Nat.Prime ↑2)\nn✝ : ℕ\ninst✝ : IsCyclotomicExtension {2 ^ (succ (succ n✝) + 1)} K L\nhζ : IsPrimitiveRoot ζ ↑(2 ^ (succ (succ n✝) + 1))\nhirr : Irreducible (cyclotomic (↑(2 ^ (succ (succ n✝) + 1))) K)\nhk : 2 ^ (succ (succ n✝) + 1) ≠ 2\nhne : NeZero ↑↑(2 ^ (succ (succ n✝) + 1))\nhp2 : 2 = 2 → succ (succ n✝) ≠ 0\n⊢ (-1) ^ (2 ^ succ n✝ * (2 * 2 ^ succ n✝ - 1)) = (-1) ^ 2 ^ succ n✝\n[PROOFSTEP]\nsimp_rw [_root_.pow_succ, (even_two.mul_right _).neg_one_pow, ((even_two.mul_right _).mul_right _).neg_one_pow]\n[GOAL]\ncase e_a.inr\np : ℕ+\nk : ℕ\nK : Type u\nL : Type v\nζ : L\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhp : Fact (Nat.Prime ↑p)\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhk : p ^ (k + 1) ≠ 2\nhne : NeZero ↑↑(p ^ (k + 1))\nmf : Module.Finite K L\nse : IsSeparable K L\ncoe_two : ↑2 = 2\nhp2✝ : p = 2 → k ≠ 0\nhp2 : p ≠ 2\n⊢ (-1) ^ (↑p ^ k * (↑p - 1) * (↑p ^ k * (↑p - 1) - 1) / 2) = ↑((-1) ^ (↑p ^ k * (↑p - 1) / 2))\n[PROOFSTEP]\nreplace hp2 : (p : ℕ) ≠ 2\n[GOAL]\ncase hp2\np : ℕ+\nk : ℕ\nK : Type u\nL : Type v\nζ : L\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhp : Fact (Nat.Prime ↑p)\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhk : p ^ (k + 1) ≠ 2\nhne : NeZero ↑↑(p ^ (k + 1))\nmf : Module.Finite K L\nse : IsSeparable K L\ncoe_two : ↑2 = 2\nhp2✝ : p = 2 → k ≠ 0\nhp2 : p ≠ 2\n⊢ ↑p ≠ 2\n[PROOFSTEP]\nrwa [Ne.def, ← coe_two, PNat.coe_inj]\n[GOAL]\ncase e_a.inr\np : ℕ+\nk : ℕ\nK : Type u\nL : Type v\nζ : L\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhp : Fact (Nat.Prime ↑p)\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhk : p ^ (k + 1) ≠ 2\nhne : NeZero ↑↑(p ^ (k + 1))\nmf : Module.Finite K L\nse : IsSeparable K L\ncoe_two : ↑2 = 2\nhp2✝ : p = 2 → k ≠ 0\nhp2 : ↑p ≠ 2\n⊢ (-1) ^ (↑p ^ k * (↑p - 1) * (↑p ^ k * (↑p - 1) - 1) / 2) = ↑((-1) ^ (↑p ^ k * (↑p - 1) / 2))\n[PROOFSTEP]\nhave hpo : Odd (p : ℕ) := hp.out.odd_of_ne_two hp2\n[GOAL]\ncase e_a.inr\np : ℕ+\nk : ℕ\nK : Type u\nL : Type v\nζ : L\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhp : Fact (Nat.Prime ↑p)\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhk : p ^ (k + 1) ≠ 2\nhne : NeZero ↑↑(p ^ (k + 1))\nmf : Module.Finite K L\nse : IsSeparable K L\ncoe_two : ↑2 = 2\nhp2✝ : p = 2 → k ≠ 0\nhp2 : ↑p ≠ 2\nhpo : Odd ↑p\n⊢ (-1) ^ (↑p ^ k * (↑p - 1) * (↑p ^ k * (↑p - 1) - 1) / 2) = ↑((-1) ^ (↑p ^ k * (↑p - 1) / 2))\n[PROOFSTEP]\nobtain ⟨a, ha⟩ := (hp.out.even_sub_one hp2).two_dvd\n[GOAL]\ncase e_a.inr.intro\np : ℕ+\nk : ℕ\nK : Type u\nL : Type v\nζ : L\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhp : Fact (Nat.Prime ↑p)\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhk : p ^ (k + 1) ≠ 2\nhne : NeZero ↑↑(p ^ (k + 1))\nmf : Module.Finite K L\nse : IsSeparable K L\ncoe_two : ↑2 = 2\nhp2✝ : p = 2 → k ≠ 0\nhp2 : ↑p ≠ 2\nhpo : Odd ↑p\na : ℕ\nha : ↑p - 1 = 2 * a\n⊢ (-1) ^ (↑p ^ k * (↑p - 1) * (↑p ^ k * (↑p - 1) - 1) / 2) = ↑((-1) ^ (↑p ^ k * (↑p - 1) / 2))\n[PROOFSTEP]\nrw [ha, mul_left_comm, mul_assoc, Nat.mul_div_cancel_left _ two_pos, Nat.mul_div_cancel_left _ two_pos, mul_right_comm,\n  pow_mul, (hpo.pow.mul _).neg_one_pow, pow_mul, hpo.pow.neg_one_pow]\n[GOAL]\ncase e_a.inr.intro\np : ℕ+\nk : ℕ\nK : Type u\nL : Type v\nζ : L\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhp : Fact (Nat.Prime ↑p)\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhk : p ^ (k + 1) ≠ 2\nhne : NeZero ↑↑(p ^ (k + 1))\nmf : Module.Finite K L\nse : IsSeparable K L\ncoe_two : ↑2 = 2\nhp2✝ : p = 2 → k ≠ 0\nhp2 : ↑p ≠ 2\nhpo : Odd ↑p\na : ℕ\nha : ↑p - 1 = 2 * a\n⊢ (-1) ^ a = ↑((-1) ^ a)\n[PROOFSTEP]\nnorm_cast\n[GOAL]\np : ℕ+\nk : ℕ\nK : Type u\nL : Type v\nζ : L\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhp : Fact (Nat.Prime ↑p)\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhk : p ^ (k + 1) ≠ 2\nhne : NeZero ↑↑(p ^ (k + 1))\nmf : Module.Finite K L\nse : IsSeparable K L\ncoe_two : ↑2 = 2\nhp2✝ : p = 2 → k ≠ 0\nhp2 : ↑p ≠ 2\nhpo : Odd ↑p\na : ℕ\nha : ↑p - 1 = 2 * a\n⊢ Odd (2 * (↑p ^ k * a) - 1)\n[PROOFSTEP]\nrefine' Nat.Even.sub_odd _ (even_two_mul _) odd_one\n[GOAL]\np : ℕ+\nk : ℕ\nK : Type u\nL : Type v\nζ : L\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhp : Fact (Nat.Prime ↑p)\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhk : p ^ (k + 1) ≠ 2\nhne : NeZero ↑↑(p ^ (k + 1))\nmf : Module.Finite K L\nse : IsSeparable K L\ncoe_two : ↑2 = 2\nhp2✝ : p = 2 → k ≠ 0\nhp2 : ↑p ≠ 2\nhpo : Odd ↑p\na : ℕ\nha : ↑p - 1 = 2 * a\n⊢ 1 ≤ 2 * (↑p ^ k * a)\n[PROOFSTEP]\nrw [mul_left_comm, ← ha]\n[GOAL]\np : ℕ+\nk : ℕ\nK : Type u\nL : Type v\nζ : L\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhp : Fact (Nat.Prime ↑p)\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhk : p ^ (k + 1) ≠ 2\nhne : NeZero ↑↑(p ^ (k + 1))\nmf : Module.Finite K L\nse : IsSeparable K L\ncoe_two : ↑2 = 2\nhp2✝ : p = 2 → k ≠ 0\nhp2 : ↑p ≠ 2\nhpo : Odd ↑p\na : ℕ\nha : ↑p - 1 = 2 * a\n⊢ 1 ≤ ↑p ^ k * (↑p - 1)\n[PROOFSTEP]\nexact one_le_mul (one_le_pow _ _ hp.1.pos) (succ_le_iff.2 <| tsub_pos_of_lt hp.1.one_lt)\n[GOAL]\ncase e_a\np : ℕ+\nk : ℕ\nK : Type u\nL : Type v\nζ : L\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhp : Fact (Nat.Prime ↑p)\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhk : p ^ (k + 1) ≠ 2\nhne : NeZero ↑↑(p ^ (k + 1))\nmf : Module.Finite K L\nse : IsSeparable K L\ncoe_two : ↑2 = 2\nhp2 : p = 2 → k ≠ 0\n⊢ ↑(Algebra.norm K) (↑(aeval ζ) (↑derivative (cyclotomic (↑p ^ (k + 1)) K))) =\n    ↑↑(p ^ (↑p ^ k * ((↑p - 1) * (k + 1) - 1)))\n[PROOFSTEP]\nhave H := congr_arg (@derivative K _) (cyclotomic_prime_pow_mul_X_pow_sub_one K p k)\n[GOAL]\ncase e_a\np : ℕ+\nk : ℕ\nK : Type u\nL : Type v\nζ : L\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhp : Fact (Nat.Prime ↑p)\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhk : p ^ (k + 1) ≠ 2\nhne : NeZero ↑↑(p ^ (k + 1))\nmf : Module.Finite K L\nse : IsSeparable K L\ncoe_two : ↑2 = 2\nhp2 : p = 2 → k ≠ 0\nH : ↑derivative (cyclotomic (↑p ^ (k + 1)) K * (X ^ ↑p ^ k - 1)) = ↑derivative (X ^ ↑p ^ (k + 1) - 1)\n⊢ ↑(Algebra.norm K) (↑(aeval ζ) (↑derivative (cyclotomic (↑p ^ (k + 1)) K))) =\n    ↑↑(p ^ (↑p ^ k * ((↑p - 1) * (k + 1) - 1)))\n[PROOFSTEP]\nrw [derivative_mul, derivative_sub, derivative_one, sub_zero, derivative_X_pow, C_eq_nat_cast, derivative_sub,\n  derivative_one, sub_zero, derivative_X_pow, C_eq_nat_cast, ← PNat.pow_coe,\n  hζ.minpoly_eq_cyclotomic_of_irreducible hirr] at H \n[GOAL]\ncase e_a\np : ℕ+\nk : ℕ\nK : Type u\nL : Type v\nζ : L\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhp : Fact (Nat.Prime ↑p)\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhk : p ^ (k + 1) ≠ 2\nhne : NeZero ↑↑(p ^ (k + 1))\nmf : Module.Finite K L\nse : IsSeparable K L\ncoe_two : ↑2 = 2\nhp2 : p = 2 → k ≠ 0\nH :\n  ↑derivative (minpoly K ζ) * (X ^ ↑p ^ k - 1) + minpoly K ζ * (↑(↑p ^ k) * X ^ (↑p ^ k - 1)) =\n    ↑↑(p ^ (k + 1)) * X ^ (↑(p ^ (k + 1)) - 1)\n⊢ ↑(Algebra.norm K) (↑(aeval ζ) (↑derivative (cyclotomic (↑p ^ (k + 1)) K))) =\n    ↑↑(p ^ (↑p ^ k * ((↑p - 1) * (k + 1) - 1)))\n[PROOFSTEP]\nreplace H := congr_arg (fun P => aeval ζ P) H\n[GOAL]\ncase e_a\np : ℕ+\nk : ℕ\nK : Type u\nL : Type v\nζ : L\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhp : Fact (Nat.Prime ↑p)\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhk : p ^ (k + 1) ≠ 2\nhne : NeZero ↑↑(p ^ (k + 1))\nmf : Module.Finite K L\nse : IsSeparable K L\ncoe_two : ↑2 = 2\nhp2 : p = 2 → k ≠ 0\nH :\n  (fun P => ↑(aeval ζ) P)\n      (↑derivative (minpoly K ζ) * (X ^ ↑p ^ k - 1) + minpoly K ζ * (↑(↑p ^ k) * X ^ (↑p ^ k - 1))) =\n    (fun P => ↑(aeval ζ) P) (↑↑(p ^ (k + 1)) * X ^ (↑(p ^ (k + 1)) - 1))\n⊢ ↑(Algebra.norm K) (↑(aeval ζ) (↑derivative (cyclotomic (↑p ^ (k + 1)) K))) =\n    ↑↑(p ^ (↑p ^ k * ((↑p - 1) * (k + 1) - 1)))\n[PROOFSTEP]\nsimp only [aeval_add, aeval_mul, minpoly.aeval, zero_mul, add_zero, aeval_nat_cast, _root_.map_sub, aeval_one,\n  aeval_X_pow] at H \n[GOAL]\ncase e_a\np : ℕ+\nk : ℕ\nK : Type u\nL : Type v\nζ : L\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhp : Fact (Nat.Prime ↑p)\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhk : p ^ (k + 1) ≠ 2\nhne : NeZero ↑↑(p ^ (k + 1))\nmf : Module.Finite K L\nse : IsSeparable K L\ncoe_two : ↑2 = 2\nhp2 : p = 2 → k ≠ 0\nH : ↑(aeval ζ) (↑derivative (minpoly K ζ)) * (ζ ^ ↑p ^ k - 1) = ↑↑(p ^ (k + 1)) * ζ ^ (↑(p ^ (k + 1)) - 1)\n⊢ ↑(Algebra.norm K) (↑(aeval ζ) (↑derivative (cyclotomic (↑p ^ (k + 1)) K))) =\n    ↑↑(p ^ (↑p ^ k * ((↑p - 1) * (k + 1) - 1)))\n[PROOFSTEP]\nreplace H := congr_arg (Algebra.norm K) H\n[GOAL]\ncase e_a\np : ℕ+\nk : ℕ\nK : Type u\nL : Type v\nζ : L\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhp : Fact (Nat.Prime ↑p)\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhk : p ^ (k + 1) ≠ 2\nhne : NeZero ↑↑(p ^ (k + 1))\nmf : Module.Finite K L\nse : IsSeparable K L\ncoe_two : ↑2 = 2\nhp2 : p = 2 → k ≠ 0\nH :\n  ↑(Algebra.norm K) (↑(aeval ζ) (↑derivative (minpoly K ζ)) * (ζ ^ ↑p ^ k - 1)) =\n    ↑(Algebra.norm K) (↑↑(p ^ (k + 1)) * ζ ^ (↑(p ^ (k + 1)) - 1))\n⊢ ↑(Algebra.norm K) (↑(aeval ζ) (↑derivative (cyclotomic (↑p ^ (k + 1)) K))) =\n    ↑↑(p ^ (↑p ^ k * ((↑p - 1) * (k + 1) - 1)))\n[PROOFSTEP]\nhave hnorm : (norm K) (ζ ^ (p : ℕ) ^ k - 1) = (p : K) ^ (p : ℕ) ^ k :=\n  by\n  by_cases hp : p = 2\n  · exact_mod_cast hζ.pow_sub_one_norm_prime_pow_of_ne_zero hirr le_rfl (hp2 hp)\n  · exact_mod_cast hζ.pow_sub_one_norm_prime_ne_two hirr le_rfl hp\n[GOAL]\np : ℕ+\nk : ℕ\nK : Type u\nL : Type v\nζ : L\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhp : Fact (Nat.Prime ↑p)\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhk : p ^ (k + 1) ≠ 2\nhne : NeZero ↑↑(p ^ (k + 1))\nmf : Module.Finite K L\nse : IsSeparable K L\ncoe_two : ↑2 = 2\nhp2 : p = 2 → k ≠ 0\nH :\n  ↑(Algebra.norm K) (↑(aeval ζ) (↑derivative (minpoly K ζ)) * (ζ ^ ↑p ^ k - 1)) =\n    ↑(Algebra.norm K) (↑↑(p ^ (k + 1)) * ζ ^ (↑(p ^ (k + 1)) - 1))\n⊢ ↑(Algebra.norm K) (ζ ^ ↑p ^ k - 1) = ↑↑p ^ ↑p ^ k\n[PROOFSTEP]\nby_cases hp : p = 2\n[GOAL]\ncase pos\np : ℕ+\nk : ℕ\nK : Type u\nL : Type v\nζ : L\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhp✝ : Fact (Nat.Prime ↑p)\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhk : p ^ (k + 1) ≠ 2\nhne : NeZero ↑↑(p ^ (k + 1))\nmf : Module.Finite K L\nse : IsSeparable K L\ncoe_two : ↑2 = 2\nhp2 : p = 2 → k ≠ 0\nH :\n  ↑(Algebra.norm K) (↑(aeval ζ) (↑derivative (minpoly K ζ)) * (ζ ^ ↑p ^ k - 1)) =\n    ↑(Algebra.norm K) (↑↑(p ^ (k + 1)) * ζ ^ (↑(p ^ (k + 1)) - 1))\nhp : p = 2\n⊢ ↑(Algebra.norm K) (ζ ^ ↑p ^ k - 1) = ↑↑p ^ ↑p ^ k\n[PROOFSTEP]\nexact_mod_cast hζ.pow_sub_one_norm_prime_pow_of_ne_zero hirr le_rfl (hp2 hp)\n[GOAL]\ncase neg\np : ℕ+\nk : ℕ\nK : Type u\nL : Type v\nζ : L\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhp✝ : Fact (Nat.Prime ↑p)\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhk : p ^ (k + 1) ≠ 2\nhne : NeZero ↑↑(p ^ (k + 1))\nmf : Module.Finite K L\nse : IsSeparable K L\ncoe_two : ↑2 = 2\nhp2 : p = 2 → k ≠ 0\nH :\n  ↑(Algebra.norm K) (↑(aeval ζ) (↑derivative (minpoly K ζ)) * (ζ ^ ↑p ^ k - 1)) =\n    ↑(Algebra.norm K) (↑↑(p ^ (k + 1)) * ζ ^ (↑(p ^ (k + 1)) - 1))\nhp : ¬p = 2\n⊢ ↑(Algebra.norm K) (ζ ^ ↑p ^ k - 1) = ↑↑p ^ ↑p ^ k\n[PROOFSTEP]\nexact_mod_cast hζ.pow_sub_one_norm_prime_ne_two hirr le_rfl hp\n[GOAL]\ncase e_a\np : ℕ+\nk : ℕ\nK : Type u\nL : Type v\nζ : L\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhp : Fact (Nat.Prime ↑p)\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhk : p ^ (k + 1) ≠ 2\nhne : NeZero ↑↑(p ^ (k + 1))\nmf : Module.Finite K L\nse : IsSeparable K L\ncoe_two : ↑2 = 2\nhp2 : p = 2 → k ≠ 0\nH :\n  ↑(Algebra.norm K) (↑(aeval ζ) (↑derivative (minpoly K ζ)) * (ζ ^ ↑p ^ k - 1)) =\n    ↑(Algebra.norm K) (↑↑(p ^ (k + 1)) * ζ ^ (↑(p ^ (k + 1)) - 1))\nhnorm : ↑(Algebra.norm K) (ζ ^ ↑p ^ k - 1) = ↑↑p ^ ↑p ^ k\n⊢ ↑(Algebra.norm K) (↑(aeval ζ) (↑derivative (cyclotomic (↑p ^ (k + 1)) K))) =\n    ↑↑(p ^ (↑p ^ k * ((↑p - 1) * (k + 1) - 1)))\n[PROOFSTEP]\nrw [MonoidHom.map_mul, hnorm, MonoidHom.map_mul, ← map_natCast (algebraMap K L), Algebra.norm_algebraMap,\n  finrank L hirr] at H \n[GOAL]\ncase e_a\np : ℕ+\nk : ℕ\nK : Type u\nL : Type v\nζ : L\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhp : Fact (Nat.Prime ↑p)\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhk : p ^ (k + 1) ≠ 2\nhne : NeZero ↑↑(p ^ (k + 1))\nmf : Module.Finite K L\nse : IsSeparable K L\ncoe_two : ↑2 = 2\nhp2 : p = 2 → k ≠ 0\nH :\n  ↑(Algebra.norm K) (↑(aeval ζ) (↑derivative (minpoly K ζ))) * ↑↑p ^ ↑p ^ k =\n    ↑↑(p ^ (k + 1)) ^ φ ↑(p ^ (k + 1)) * ↑(Algebra.norm K) (ζ ^ (↑(p ^ (k + 1)) - 1))\nhnorm : ↑(Algebra.norm K) (ζ ^ ↑p ^ k - 1) = ↑↑p ^ ↑p ^ k\n⊢ ↑(Algebra.norm K) (↑(aeval ζ) (↑derivative (cyclotomic (↑p ^ (k + 1)) K))) =\n    ↑↑(p ^ (↑p ^ k * ((↑p - 1) * (k + 1) - 1)))\n[PROOFSTEP]\nconv_rhs at H =>\n  -- Porting note: need to drill down to successfully rewrite the totient\n  enter [1, 2]\n  rw [PNat.pow_coe, ← succ_eq_add_one, totient_prime_pow hp.out (succ_pos k), Nat.sub_one, Nat.pred_succ]\n[GOAL]\np : ℕ+\nk : ℕ\nK : Type u\nL : Type v\nζ : L\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhp : Fact (Nat.Prime ↑p)\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhk : p ^ (k + 1) ≠ 2\nhne : NeZero ↑↑(p ^ (k + 1))\nmf : Module.Finite K L\nse : IsSeparable K L\ncoe_two : ↑2 = 2\nhp2 : p = 2 → k ≠ 0\nH :\n  ↑(Algebra.norm K) (↑(aeval ζ) (↑derivative (minpoly K ζ))) * ↑↑p ^ ↑p ^ k =\n    ↑↑(p ^ (k + 1)) ^ φ ↑(p ^ (k + 1)) * ↑(Algebra.norm K) (ζ ^ (↑(p ^ (k + 1)) - 1))\nhnorm : ↑(Algebra.norm K) (ζ ^ ↑p ^ k - 1) = ↑↑p ^ ↑p ^ k\n| ↑↑(p ^ (k + 1)) ^ φ ↑(p ^ (k + 1)) * ↑(Algebra.norm K) (ζ ^ (↑(p ^ (k + 1)) - 1))\n[PROOFSTEP]\n  enter [1, 2]\n  rw [PNat.pow_coe, ← succ_eq_add_one, totient_prime_pow hp.out (succ_pos k), Nat.sub_one, Nat.pred_succ]\n[GOAL]\np : ℕ+\nk : ℕ\nK : Type u\nL : Type v\nζ : L\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhp : Fact (Nat.Prime ↑p)\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhk : p ^ (k + 1) ≠ 2\nhne : NeZero ↑↑(p ^ (k + 1))\nmf : Module.Finite K L\nse : IsSeparable K L\ncoe_two : ↑2 = 2\nhp2 : p = 2 → k ≠ 0\nH :\n  ↑(Algebra.norm K) (↑(aeval ζ) (↑derivative (minpoly K ζ))) * ↑↑p ^ ↑p ^ k =\n    ↑↑(p ^ (k + 1)) ^ φ ↑(p ^ (k + 1)) * ↑(Algebra.norm K) (ζ ^ (↑(p ^ (k + 1)) - 1))\nhnorm : ↑(Algebra.norm K) (ζ ^ ↑p ^ k - 1) = ↑↑p ^ ↑p ^ k\n| ↑↑(p ^ (k + 1)) ^ φ ↑(p ^ (k + 1)) * ↑(Algebra.norm K) (ζ ^ (↑(p ^ (k + 1)) - 1))\n[PROOFSTEP]\n  enter [1, 2]\n  rw [PNat.pow_coe, ← succ_eq_add_one, totient_prime_pow hp.out (succ_pos k), Nat.sub_one, Nat.pred_succ]\n[GOAL]\np : ℕ+\nk : ℕ\nK : Type u\nL : Type v\nζ : L\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhp : Fact (Nat.Prime ↑p)\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhk : p ^ (k + 1) ≠ 2\nhne : NeZero ↑↑(p ^ (k + 1))\nmf : Module.Finite K L\nse : IsSeparable K L\ncoe_two : ↑2 = 2\nhp2 : p = 2 → k ≠ 0\nH :\n  ↑(Algebra.norm K) (↑(aeval ζ) (↑derivative (minpoly K ζ))) * ↑↑p ^ ↑p ^ k =\n    ↑↑(p ^ (k + 1)) ^ φ ↑(p ^ (k + 1)) * ↑(Algebra.norm K) (ζ ^ (↑(p ^ (k + 1)) - 1))\nhnorm : ↑(Algebra.norm K) (ζ ^ ↑p ^ k - 1) = ↑↑p ^ ↑p ^ k\n| ↑↑(p ^ (k + 1)) ^ φ ↑(p ^ (k + 1)) * ↑(Algebra.norm K) (ζ ^ (↑(p ^ (k + 1)) - 1))\n[PROOFSTEP]\nenter [1, 2]\n[GOAL]\np : ℕ+\nk : ℕ\nK : Type u\nL : Type v\nζ : L\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhp : Fact (Nat.Prime ↑p)\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhk : p ^ (k + 1) ≠ 2\nhne : NeZero ↑↑(p ^ (k + 1))\nmf : Module.Finite K L\nse : IsSeparable K L\ncoe_two : ↑2 = 2\nhp2 : p = 2 → k ≠ 0\nH :\n  ↑(Algebra.norm K) (↑(aeval ζ) (↑derivative (minpoly K ζ))) * ↑↑p ^ ↑p ^ k =\n    ↑↑(p ^ (k + 1)) ^ φ ↑(p ^ (k + 1)) * ↑(Algebra.norm K) (ζ ^ (↑(p ^ (k + 1)) - 1))\nhnorm : ↑(Algebra.norm K) (ζ ^ ↑p ^ k - 1) = ↑↑p ^ ↑p ^ k\n| φ ↑(p ^ (k + 1))\n[PROOFSTEP]\nrw [PNat.pow_coe, ← succ_eq_add_one, totient_prime_pow hp.out (succ_pos k), Nat.sub_one, Nat.pred_succ]\n[GOAL]\ncase e_a\np : ℕ+\nk : ℕ\nK : Type u\nL : Type v\nζ : L\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhp : Fact (Nat.Prime ↑p)\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhk : p ^ (k + 1) ≠ 2\nhne : NeZero ↑↑(p ^ (k + 1))\nmf : Module.Finite K L\nse : IsSeparable K L\ncoe_two : ↑2 = 2\nhp2 : p = 2 → k ≠ 0\nH :\n  ↑(Algebra.norm K) (↑(aeval ζ) (↑derivative (minpoly K ζ))) * ↑↑p ^ ↑p ^ k =\n    ↑↑(p ^ (k + 1)) ^ (↑p ^ k * (↑p - 1)) * ↑(Algebra.norm K) (ζ ^ (↑(p ^ (k + 1)) - 1))\nhnorm : ↑(Algebra.norm K) (ζ ^ ↑p ^ k - 1) = ↑↑p ^ ↑p ^ k\n⊢ ↑(Algebra.norm K) (↑(aeval ζ) (↑derivative (cyclotomic (↑p ^ (k + 1)) K))) =\n    ↑↑(p ^ (↑p ^ k * ((↑p - 1) * (k + 1) - 1)))\n[PROOFSTEP]\nrw [← hζ.minpoly_eq_cyclotomic_of_irreducible hirr, map_pow, hζ.norm_eq_one hk hirr, one_pow, mul_one, PNat.pow_coe,\n  cast_pow, ← pow_mul, ← mul_assoc, mul_comm (k + 1), mul_assoc] at H \n[GOAL]\ncase e_a\np : ℕ+\nk : ℕ\nK : Type u\nL : Type v\nζ : L\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhp : Fact (Nat.Prime ↑p)\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhk : p ^ (k + 1) ≠ 2\nhne : NeZero ↑↑(p ^ (k + 1))\nmf : Module.Finite K L\nse : IsSeparable K L\ncoe_two : ↑2 = 2\nhp2 : p = 2 → k ≠ 0\nH :\n  ↑(Algebra.norm K) (↑(aeval ζ) (↑derivative (cyclotomic (↑p ^ (k + 1)) K))) * ↑↑p ^ ↑p ^ k =\n    ↑↑p ^ (↑p ^ k * ((k + 1) * (↑p - 1)))\nhnorm : ↑(Algebra.norm K) (ζ ^ ↑p ^ k - 1) = ↑↑p ^ ↑p ^ k\n⊢ ↑(Algebra.norm K) (↑(aeval ζ) (↑derivative (cyclotomic (↑p ^ (k + 1)) K))) =\n    ↑↑(p ^ (↑p ^ k * ((↑p - 1) * (k + 1) - 1)))\n[PROOFSTEP]\nhave := mul_pos (succ_pos k) (tsub_pos_of_lt hp.out.one_lt)\n[GOAL]\ncase e_a\np : ℕ+\nk : ℕ\nK : Type u\nL : Type v\nζ : L\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhp : Fact (Nat.Prime ↑p)\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhk : p ^ (k + 1) ≠ 2\nhne : NeZero ↑↑(p ^ (k + 1))\nmf : Module.Finite K L\nse : IsSeparable K L\ncoe_two : ↑2 = 2\nhp2 : p = 2 → k ≠ 0\nH :\n  ↑(Algebra.norm K) (↑(aeval ζ) (↑derivative (cyclotomic (↑p ^ (k + 1)) K))) * ↑↑p ^ ↑p ^ k =\n    ↑↑p ^ (↑p ^ k * ((k + 1) * (↑p - 1)))\nhnorm : ↑(Algebra.norm K) (ζ ^ ↑p ^ k - 1) = ↑↑p ^ ↑p ^ k\nthis : 0 < succ k * (↑p - 1)\n⊢ ↑(Algebra.norm K) (↑(aeval ζ) (↑derivative (cyclotomic (↑p ^ (k + 1)) K))) =\n    ↑↑(p ^ (↑p ^ k * ((↑p - 1) * (k + 1) - 1)))\n[PROOFSTEP]\nrw [← succ_pred_eq_of_pos this, mul_succ, pow_add _ _ ((p : ℕ) ^ k)] at H \n[GOAL]\ncase e_a\np : ℕ+\nk : ℕ\nK : Type u\nL : Type v\nζ : L\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhp : Fact (Nat.Prime ↑p)\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhk : p ^ (k + 1) ≠ 2\nhne : NeZero ↑↑(p ^ (k + 1))\nmf : Module.Finite K L\nse : IsSeparable K L\ncoe_two : ↑2 = 2\nhp2 : p = 2 → k ≠ 0\nH :\n  ↑(Algebra.norm K) (↑(aeval ζ) (↑derivative (cyclotomic (↑p ^ (k + 1)) K))) * ↑↑p ^ ↑p ^ k =\n    ↑↑p ^ (↑p ^ k * pred (succ k * (↑p - 1))) * ↑↑p ^ ↑p ^ k\nhnorm : ↑(Algebra.norm K) (ζ ^ ↑p ^ k - 1) = ↑↑p ^ ↑p ^ k\nthis : 0 < succ k * (↑p - 1)\n⊢ ↑(Algebra.norm K) (↑(aeval ζ) (↑derivative (cyclotomic (↑p ^ (k + 1)) K))) =\n    ↑↑(p ^ (↑p ^ k * ((↑p - 1) * (k + 1) - 1)))\n[PROOFSTEP]\nreplace H := (mul_left_inj' fun h => ?_).1 H\n[GOAL]\ncase e_a.refine_2\np : ℕ+\nk : ℕ\nK : Type u\nL : Type v\nζ : L\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhp : Fact (Nat.Prime ↑p)\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhk : p ^ (k + 1) ≠ 2\nhne : NeZero ↑↑(p ^ (k + 1))\nmf : Module.Finite K L\nse : IsSeparable K L\ncoe_two : ↑2 = 2\nhp2 : p = 2 → k ≠ 0\nhnorm : ↑(Algebra.norm K) (ζ ^ ↑p ^ k - 1) = ↑↑p ^ ↑p ^ k\nthis : 0 < succ k * (↑p - 1)\nH :\n  ↑(Algebra.norm K) (↑(aeval ζ) (↑derivative (cyclotomic (↑p ^ (k + 1)) K))) = ↑↑p ^ (↑p ^ k * pred (succ k * (↑p - 1)))\n⊢ ↑(Algebra.norm K) (↑(aeval ζ) (↑derivative (cyclotomic (↑p ^ (k + 1)) K))) =\n    ↑↑(p ^ (↑p ^ k * ((↑p - 1) * (k + 1) - 1)))\n[PROOFSTEP]\nsimp only [H, mul_comm _ (k + 1)]\n[GOAL]\ncase e_a.refine_2\np : ℕ+\nk : ℕ\nK : Type u\nL : Type v\nζ : L\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhp : Fact (Nat.Prime ↑p)\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhk : p ^ (k + 1) ≠ 2\nhne : NeZero ↑↑(p ^ (k + 1))\nmf : Module.Finite K L\nse : IsSeparable K L\ncoe_two : ↑2 = 2\nhp2 : p = 2 → k ≠ 0\nhnorm : ↑(Algebra.norm K) (ζ ^ ↑p ^ k - 1) = ↑↑p ^ ↑p ^ k\nthis : 0 < succ k * (↑p - 1)\nH :\n  ↑(Algebra.norm K) (↑(aeval ζ) (↑derivative (cyclotomic (↑p ^ (k + 1)) K))) = ↑↑p ^ (↑p ^ k * pred (succ k * (↑p - 1)))\n⊢ ↑↑p ^ (↑p ^ k * pred (succ k * (↑p - 1))) = ↑↑(p ^ (↑p ^ k * ((k + 1) * (↑p - 1) - 1)))\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase e_a.refine_1\np : ℕ+\nk : ℕ\nK : Type u\nL : Type v\nζ : L\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhp : Fact (Nat.Prime ↑p)\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhk : p ^ (k + 1) ≠ 2\nhne : NeZero ↑↑(p ^ (k + 1))\nmf : Module.Finite K L\nse : IsSeparable K L\ncoe_two : ↑2 = 2\nhp2 : p = 2 → k ≠ 0\nH :\n  ↑(Algebra.norm K) (↑(aeval ζ) (↑derivative (cyclotomic (↑p ^ (k + 1)) K))) * ↑↑p ^ ↑p ^ k =\n    ↑↑p ^ (↑p ^ k * pred (succ k * (↑p - 1))) * ↑↑p ^ ↑p ^ k\nhnorm : ↑(Algebra.norm K) (ζ ^ ↑p ^ k - 1) = ↑↑p ^ ↑p ^ k\nthis : 0 < succ k * (↑p - 1)\nh : ↑↑p ^ ↑p ^ k = 0\n⊢ False\n[PROOFSTEP]\nhave := hne.1\n[GOAL]\ncase e_a.refine_1\np : ℕ+\nk : ℕ\nK : Type u\nL : Type v\nζ : L\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhp : Fact (Nat.Prime ↑p)\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhk : p ^ (k + 1) ≠ 2\nhne : NeZero ↑↑(p ^ (k + 1))\nmf : Module.Finite K L\nse : IsSeparable K L\ncoe_two : ↑2 = 2\nhp2 : p = 2 → k ≠ 0\nH :\n  ↑(Algebra.norm K) (↑(aeval ζ) (↑derivative (cyclotomic (↑p ^ (k + 1)) K))) * ↑↑p ^ ↑p ^ k =\n    ↑↑p ^ (↑p ^ k * pred (succ k * (↑p - 1))) * ↑↑p ^ ↑p ^ k\nhnorm : ↑(Algebra.norm K) (ζ ^ ↑p ^ k - 1) = ↑↑p ^ ↑p ^ k\nthis✝ : 0 < succ k * (↑p - 1)\nh : ↑↑p ^ ↑p ^ k = 0\nthis : ↑↑(p ^ (k + 1)) ≠ 0\n⊢ False\n[PROOFSTEP]\nrw [PNat.pow_coe, Nat.cast_pow, Ne.def, pow_eq_zero_iff (by linarith)] at this \n[GOAL]\np : ℕ+\nk : ℕ\nK : Type u\nL : Type v\nζ : L\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhp : Fact (Nat.Prime ↑p)\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhk : p ^ (k + 1) ≠ 2\nhne : NeZero ↑↑(p ^ (k + 1))\nmf : Module.Finite K L\nse : IsSeparable K L\ncoe_two : ↑2 = 2\nhp2 : p = 2 → k ≠ 0\nH :\n  ↑(Algebra.norm K) (↑(aeval ζ) (↑derivative (cyclotomic (↑p ^ (k + 1)) K))) * ↑↑p ^ ↑p ^ k =\n    ↑↑p ^ (↑p ^ k * pred (succ k * (↑p - 1))) * ↑↑p ^ ↑p ^ k\nhnorm : ↑(Algebra.norm K) (ζ ^ ↑p ^ k - 1) = ↑↑p ^ ↑p ^ k\nthis✝ : 0 < succ k * (↑p - 1)\nh : ↑↑p ^ ↑p ^ k = 0\nthis : ¬↑↑p ^ (k + 1) = 0\n⊢ 0 < k + 1\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase e_a.refine_1\np : ℕ+\nk : ℕ\nK : Type u\nL : Type v\nζ : L\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhp : Fact (Nat.Prime ↑p)\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhk : p ^ (k + 1) ≠ 2\nhne : NeZero ↑↑(p ^ (k + 1))\nmf : Module.Finite K L\nse : IsSeparable K L\ncoe_two : ↑2 = 2\nhp2 : p = 2 → k ≠ 0\nH :\n  ↑(Algebra.norm K) (↑(aeval ζ) (↑derivative (cyclotomic (↑p ^ (k + 1)) K))) * ↑↑p ^ ↑p ^ k =\n    ↑↑p ^ (↑p ^ k * pred (succ k * (↑p - 1))) * ↑↑p ^ ↑p ^ k\nhnorm : ↑(Algebra.norm K) (ζ ^ ↑p ^ k - 1) = ↑↑p ^ ↑p ^ k\nthis✝ : 0 < succ k * (↑p - 1)\nh : ↑↑p ^ ↑p ^ k = 0\nthis : ¬↑↑p = 0\n⊢ False\n[PROOFSTEP]\nexact absurd (pow_eq_zero h) this\n[GOAL]\np : ℕ+\nk : ℕ\nK : Type u\nL : Type v\nζ : L\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {p ^ (k + 1)} K L\nhp : Fact (Nat.Prime ↑p)\nhζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))\nhirr : Irreducible (cyclotomic (↑(p ^ (k + 1))) K)\nhk : p ^ (k + 1) ≠ 2\n⊢ discr K ↑(IsPrimitiveRoot.powerBasis K hζ).basis =\n    ↑((-1) ^ (↑p ^ k * (↑p - 1) / 2)) * ↑↑(p ^ (↑p ^ k * ((↑p - 1) * (k + 1) - 1)))\n[PROOFSTEP]\nsimpa [totient_prime_pow hp.out (succ_pos k)] using discr_prime_pow_ne_two hζ hirr hk\n[GOAL]\np : ℕ+\nk : ℕ\nK : Type u\nL : Type v\nζ : L\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Algebra K L\nhcycl : IsCyclotomicExtension {p ^ k} K L\nhp : Fact (Nat.Prime ↑p)\nhζ : IsPrimitiveRoot ζ ↑(p ^ k)\nhirr : Irreducible (cyclotomic (↑(p ^ k)) K)\n⊢ discr K ↑(IsPrimitiveRoot.powerBasis K hζ).basis =\n    ↑((-1) ^ (φ ↑(p ^ k) / 2)) * ↑↑(p ^ (↑p ^ (k - 1) * ((↑p - 1) * k - 1)))\n[PROOFSTEP]\ncases' k with k k\n[GOAL]\ncase zero\np : ℕ+\nK : Type u\nL : Type v\nζ : L\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Algebra K L\nhp : Fact (Nat.Prime ↑p)\nhcycl : IsCyclotomicExtension {p ^ Nat.zero} K L\nhζ : IsPrimitiveRoot ζ ↑(p ^ Nat.zero)\nhirr : Irreducible (cyclotomic (↑(p ^ Nat.zero)) K)\n⊢ discr K ↑(IsPrimitiveRoot.powerBasis K hζ).basis =\n    ↑((-1) ^ (φ ↑(p ^ Nat.zero) / 2)) * ↑↑(p ^ (↑p ^ (Nat.zero - 1) * ((↑p - 1) * Nat.zero - 1)))\n[PROOFSTEP]\nsimp only [coe_basis, _root_.pow_zero, powerBasis_gen _ hζ, totient_one, mul_zero, mul_one, show 1 / 2 = 0 by rfl,\n  discr, traceMatrix]\n[GOAL]\np : ℕ+\nK : Type u\nL : Type v\nζ : L\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Algebra K L\nhp : Fact (Nat.Prime ↑p)\nhcycl : IsCyclotomicExtension {p ^ Nat.zero} K L\nhζ : IsPrimitiveRoot ζ ↑(p ^ Nat.zero)\nhirr : Irreducible (cyclotomic (↑(p ^ Nat.zero)) K)\n⊢ 1 / 2 = 0\n[PROOFSTEP]\nrfl\n[GOAL]\ncase zero\np : ℕ+\nK : Type u\nL : Type v\nζ : L\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Algebra K L\nhp : Fact (Nat.Prime ↑p)\nhcycl : IsCyclotomicExtension {p ^ Nat.zero} K L\nhζ : IsPrimitiveRoot ζ ↑(p ^ Nat.zero)\nhirr : Irreducible (cyclotomic (↑(p ^ Nat.zero)) K)\n⊢ Matrix.det (↑Matrix.of fun i j => BilinForm.bilin (traceForm K L) (ζ ^ ↑i) (ζ ^ ↑j)) =\n    ↑((-1) ^ (φ ↑1 / 2)) * ↑↑(p ^ (↑p ^ (Nat.zero - 1) * ((↑p - 1) * Nat.zero - 1)))\n[PROOFSTEP]\nhave hζone : ζ = 1 := by simpa using hζ\n[GOAL]\np : ℕ+\nK : Type u\nL : Type v\nζ : L\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Algebra K L\nhp : Fact (Nat.Prime ↑p)\nhcycl : IsCyclotomicExtension {p ^ Nat.zero} K L\nhζ : IsPrimitiveRoot ζ ↑(p ^ Nat.zero)\nhirr : Irreducible (cyclotomic (↑(p ^ Nat.zero)) K)\n⊢ ζ = 1\n[PROOFSTEP]\nsimpa using hζ\n[GOAL]\ncase zero\np : ℕ+\nK : Type u\nL : Type v\nζ : L\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Algebra K L\nhp : Fact (Nat.Prime ↑p)\nhcycl : IsCyclotomicExtension {p ^ Nat.zero} K L\nhζ : IsPrimitiveRoot ζ ↑(p ^ Nat.zero)\nhirr : Irreducible (cyclotomic (↑(p ^ Nat.zero)) K)\nhζone : ζ = 1\n⊢ Matrix.det (↑Matrix.of fun i j => BilinForm.bilin (traceForm K L) (ζ ^ ↑i) (ζ ^ ↑j)) =\n    ↑((-1) ^ (φ ↑1 / 2)) * ↑↑(p ^ (↑p ^ (Nat.zero - 1) * ((↑p - 1) * Nat.zero - 1)))\n[PROOFSTEP]\nrw [hζ.powerBasis_dim _, hζone, ← (algebraMap K L).map_one,\n  minpoly.eq_X_sub_C_of_algebraMap_inj _ (algebraMap K L).injective, natDegree_X_sub_C]\n[GOAL]\ncase zero\np : ℕ+\nK : Type u\nL : Type v\nζ : L\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Algebra K L\nhp : Fact (Nat.Prime ↑p)\nhcycl : IsCyclotomicExtension {p ^ Nat.zero} K L\nhζ : IsPrimitiveRoot ζ ↑(p ^ Nat.zero)\nhirr : Irreducible (cyclotomic (↑(p ^ Nat.zero)) K)\nhζone : ζ = 1\n⊢ Matrix.det\n      (↑Matrix.of fun i j => BilinForm.bilin (traceForm K L) (↑(algebraMap K L) 1 ^ ↑i) (↑(algebraMap K L) 1 ^ ↑j)) =\n    ↑((-1) ^ (φ ↑1 / 2)) * ↑↑(p ^ (↑p ^ (Nat.zero - 1) * ((↑p - 1) * Nat.zero - 1)))\n[PROOFSTEP]\nsimp only [traceMatrix, map_one, one_pow, Matrix.det_unique, traceForm_apply, mul_one]\n[GOAL]\ncase zero\np : ℕ+\nK : Type u\nL : Type v\nζ : L\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Algebra K L\nhp : Fact (Nat.Prime ↑p)\nhcycl : IsCyclotomicExtension {p ^ Nat.zero} K L\nhζ : IsPrimitiveRoot ζ ↑(p ^ Nat.zero)\nhirr : Irreducible (cyclotomic (↑(p ^ Nat.zero)) K)\nhζone : ζ = 1\n⊢ ↑Matrix.of (fun i j => ↑(trace K L) 1) default default =\n    ↑((-1) ^ (φ ↑1 / 2)) * ↑↑(p ^ (↑p ^ (Nat.zero - 1) * ((↑p - 1) * Nat.zero - 1)))\n[PROOFSTEP]\nrw [← (algebraMap K L).map_one, trace_algebraMap, finrank _ hirr]\n[GOAL]\ncase zero\np : ℕ+\nK : Type u\nL : Type v\nζ : L\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Algebra K L\nhp : Fact (Nat.Prime ↑p)\nhcycl : IsCyclotomicExtension {p ^ Nat.zero} K L\nhζ : IsPrimitiveRoot ζ ↑(p ^ Nat.zero)\nhirr : Irreducible (cyclotomic (↑(p ^ Nat.zero)) K)\nhζone : ζ = 1\n⊢ ↑Matrix.of (fun i j => φ ↑(p ^ Nat.zero) • 1) default default =\n    ↑((-1) ^ (φ ↑1 / 2)) * ↑↑(p ^ (↑p ^ (Nat.zero - 1) * ((↑p - 1) * Nat.zero - 1)))\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase succ\np : ℕ+\nK : Type u\nL : Type v\nζ : L\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Algebra K L\nhp : Fact (Nat.Prime ↑p)\nk : ℕ\nhcycl : IsCyclotomicExtension {p ^ succ k} K L\nhζ : IsPrimitiveRoot ζ ↑(p ^ succ k)\nhirr : Irreducible (cyclotomic (↑(p ^ succ k)) K)\n⊢ discr K ↑(IsPrimitiveRoot.powerBasis K hζ).basis =\n    ↑((-1) ^ (φ ↑(p ^ succ k) / 2)) * ↑↑(p ^ (↑p ^ (succ k - 1) * ((↑p - 1) * succ k - 1)))\n[PROOFSTEP]\nby_cases hk : p ^ (k + 1) = 2\n[GOAL]\ncase pos\np : ℕ+\nK : Type u\nL : Type v\nζ : L\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Algebra K L\nhp : Fact (Nat.Prime ↑p)\nk : ℕ\nhcycl : IsCyclotomicExtension {p ^ succ k} K L\nhζ : IsPrimitiveRoot ζ ↑(p ^ succ k)\nhirr : Irreducible (cyclotomic (↑(p ^ succ k)) K)\nhk : p ^ (k + 1) = 2\n⊢ discr K ↑(IsPrimitiveRoot.powerBasis K hζ).basis =\n    ↑((-1) ^ (φ ↑(p ^ succ k) / 2)) * ↑↑(p ^ (↑p ^ (succ k - 1) * ((↑p - 1) * succ k - 1)))\n[PROOFSTEP]\nhave coe_two : 2 = ((2 : ℕ+) : ℕ) := rfl\n[GOAL]\ncase pos\np : ℕ+\nK : Type u\nL : Type v\nζ : L\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Algebra K L\nhp : Fact (Nat.Prime ↑p)\nk : ℕ\nhcycl : IsCyclotomicExtension {p ^ succ k} K L\nhζ : IsPrimitiveRoot ζ ↑(p ^ succ k)\nhirr : Irreducible (cyclotomic (↑(p ^ succ k)) K)\nhk : p ^ (k + 1) = 2\ncoe_two : 2 = ↑2\n⊢ discr K ↑(IsPrimitiveRoot.powerBasis K hζ).basis =\n    ↑((-1) ^ (φ ↑(p ^ succ k) / 2)) * ↑↑(p ^ (↑p ^ (succ k - 1) * ((↑p - 1) * succ k - 1)))\n[PROOFSTEP]\nhave hp : p = 2 := by\n  rw [← PNat.coe_inj, PNat.pow_coe, ← pow_one 2] at hk \n  replace hk := eq_of_prime_pow_eq (prime_iff.1 hp.out) (prime_iff.1 Nat.prime_two) (succ_pos _) hk\n  rwa [coe_two, PNat.coe_inj] at hk \n[GOAL]\np : ℕ+\nK : Type u\nL : Type v\nζ : L\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Algebra K L\nhp : Fact (Nat.Prime ↑p)\nk : ℕ\nhcycl : IsCyclotomicExtension {p ^ succ k} K L\nhζ : IsPrimitiveRoot ζ ↑(p ^ succ k)\nhirr : Irreducible (cyclotomic (↑(p ^ succ k)) K)\nhk : p ^ (k + 1) = 2\ncoe_two : 2 = ↑2\n⊢ p = 2\n[PROOFSTEP]\nrw [← PNat.coe_inj, PNat.pow_coe, ← pow_one 2] at hk \n[GOAL]\np : ℕ+\nK : Type u\nL : Type v\nζ : L\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Algebra K L\nhp : Fact (Nat.Prime ↑p)\nk : ℕ\nhcycl : IsCyclotomicExtension {p ^ succ k} K L\nhζ : IsPrimitiveRoot ζ ↑(p ^ succ k)\nhirr : Irreducible (cyclotomic (↑(p ^ succ k)) K)\nhk✝ : ↑p ^ (k + 1) = ↑2\nhk : ↑p ^ (k + 1) = ↑(2 ^ 1)\ncoe_two : 2 = ↑2\n⊢ p = 2\n[PROOFSTEP]\nreplace hk := eq_of_prime_pow_eq (prime_iff.1 hp.out) (prime_iff.1 Nat.prime_two) (succ_pos _) hk\n[GOAL]\np : ℕ+\nK : Type u\nL : Type v\nζ : L\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Algebra K L\nhp : Fact (Nat.Prime ↑p)\nk : ℕ\nhcycl : IsCyclotomicExtension {p ^ succ k} K L\nhζ : IsPrimitiveRoot ζ ↑(p ^ succ k)\nhirr : Irreducible (cyclotomic (↑(p ^ succ k)) K)\nhk✝ : ↑p ^ (k + 1) = ↑2\ncoe_two : 2 = ↑2\nhk : ↑p = 2\n⊢ p = 2\n[PROOFSTEP]\nrwa [coe_two, PNat.coe_inj] at hk \n[GOAL]\ncase pos\np : ℕ+\nK : Type u\nL : Type v\nζ : L\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Algebra K L\nhp✝ : Fact (Nat.Prime ↑p)\nk : ℕ\nhcycl : IsCyclotomicExtension {p ^ succ k} K L\nhζ : IsPrimitiveRoot ζ ↑(p ^ succ k)\nhirr : Irreducible (cyclotomic (↑(p ^ succ k)) K)\nhk : p ^ (k + 1) = 2\ncoe_two : 2 = ↑2\nhp : p = 2\n⊢ discr K ↑(IsPrimitiveRoot.powerBasis K hζ).basis =\n    ↑((-1) ^ (φ ↑(p ^ succ k) / 2)) * ↑↑(p ^ (↑p ^ (succ k - 1) * ((↑p - 1) * succ k - 1)))\n[PROOFSTEP]\nrw [hp, ← PNat.coe_inj, PNat.pow_coe] at hk \n[GOAL]\ncase pos\np : ℕ+\nK : Type u\nL : Type v\nζ : L\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Algebra K L\nhp✝ : Fact (Nat.Prime ↑p)\nk : ℕ\nhcycl : IsCyclotomicExtension {p ^ succ k} K L\nhζ : IsPrimitiveRoot ζ ↑(p ^ succ k)\nhirr : Irreducible (cyclotomic (↑(p ^ succ k)) K)\nhk : ↑2 ^ (k + 1) = ↑2\ncoe_two : 2 = ↑2\nhp : p = 2\n⊢ discr K ↑(IsPrimitiveRoot.powerBasis K hζ).basis =\n    ↑((-1) ^ (φ ↑(p ^ succ k) / 2)) * ↑↑(p ^ (↑p ^ (succ k - 1) * ((↑p - 1) * succ k - 1)))\n[PROOFSTEP]\nnth_rw 2 [← pow_one 2] at hk \n[GOAL]\ncase pos\np : ℕ+\nK : Type u\nL : Type v\nζ : L\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Algebra K L\nhp✝ : Fact (Nat.Prime ↑p)\nk : ℕ\nhcycl : IsCyclotomicExtension {p ^ succ k} K L\nhζ : IsPrimitiveRoot ζ ↑(p ^ succ k)\nhirr : Irreducible (cyclotomic (↑(p ^ succ k)) K)\nhk✝ : ↑2 ^ (k + 1) = ↑2\nhk : ↑2 ^ (k + 1) = ↑(2 ^ 1)\ncoe_two : 2 = ↑2\nhp : p = 2\n⊢ discr K ↑(IsPrimitiveRoot.powerBasis K hζ).basis =\n    ↑((-1) ^ (φ ↑(p ^ succ k) / 2)) * ↑↑(p ^ (↑p ^ (succ k - 1) * ((↑p - 1) * succ k - 1)))\n[PROOFSTEP]\nreplace hk := Nat.pow_right_injective rfl.le hk\n[GOAL]\ncase pos\np : ℕ+\nK : Type u\nL : Type v\nζ : L\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Algebra K L\nhp✝ : Fact (Nat.Prime ↑p)\nk : ℕ\nhcycl : IsCyclotomicExtension {p ^ succ k} K L\nhζ : IsPrimitiveRoot ζ ↑(p ^ succ k)\nhirr : Irreducible (cyclotomic (↑(p ^ succ k)) K)\nhk✝ : ↑2 ^ (k + 1) = ↑2\ncoe_two : 2 = ↑2\nhp : p = 2\nhk : k + 1 = 1\n⊢ discr K ↑(IsPrimitiveRoot.powerBasis K hζ).basis =\n    ↑((-1) ^ (φ ↑(p ^ succ k) / 2)) * ↑↑(p ^ (↑p ^ (succ k - 1) * ((↑p - 1) * succ k - 1)))\n[PROOFSTEP]\nrw [add_left_eq_self] at hk \n[GOAL]\ncase pos\np : ℕ+\nK : Type u\nL : Type v\nζ : L\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Algebra K L\nhp✝ : Fact (Nat.Prime ↑p)\nk : ℕ\nhcycl : IsCyclotomicExtension {p ^ succ k} K L\nhζ : IsPrimitiveRoot ζ ↑(p ^ succ k)\nhirr : Irreducible (cyclotomic (↑(p ^ succ k)) K)\nhk✝ : ↑2 ^ (k + 1) = ↑2\ncoe_two : 2 = ↑2\nhp : p = 2\nhk : k = 0\n⊢ discr K ↑(IsPrimitiveRoot.powerBasis K hζ).basis =\n    ↑((-1) ^ (φ ↑(p ^ succ k) / 2)) * ↑↑(p ^ (↑p ^ (succ k - 1) * ((↑p - 1) * succ k - 1)))\n[PROOFSTEP]\nrw [hp, hk] at hζ \n[GOAL]\ncase pos\np : ℕ+\nK : Type u\nL : Type v\nζ : L\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Algebra K L\nhp✝ : Fact (Nat.Prime ↑p)\nk : ℕ\nhcycl : IsCyclotomicExtension {p ^ succ k} K L\nhζ✝ : IsPrimitiveRoot ζ ↑(p ^ succ k)\nhζ : IsPrimitiveRoot ζ ↑(2 ^ succ 0)\nhirr : Irreducible (cyclotomic (↑(p ^ succ k)) K)\nhk✝ : ↑2 ^ (k + 1) = ↑2\ncoe_two : 2 = ↑2\nhp : p = 2\nhk : k = 0\n⊢ discr K ↑(IsPrimitiveRoot.powerBasis K hζ✝).basis =\n    ↑((-1) ^ (φ ↑(p ^ succ k) / 2)) * ↑↑(p ^ (↑p ^ (succ k - 1) * ((↑p - 1) * succ k - 1)))\n[PROOFSTEP]\nnorm_num at hζ \n[GOAL]\ncase pos\np : ℕ+\nK : Type u\nL : Type v\nζ : L\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Algebra K L\nhp✝ : Fact (Nat.Prime ↑p)\nk : ℕ\nhcycl : IsCyclotomicExtension {p ^ succ k} K L\nhζ✝ : IsPrimitiveRoot ζ ↑(p ^ succ k)\nhirr : Irreducible (cyclotomic (↑(p ^ succ k)) K)\nhk✝ : ↑2 ^ (k + 1) = ↑2\ncoe_two : 2 = ↑2\nhp : p = 2\nhk : k = 0\nhζ : IsPrimitiveRoot ζ ↑2\n⊢ discr K ↑(IsPrimitiveRoot.powerBasis K hζ✝).basis =\n    ↑((-1) ^ (φ ↑(p ^ succ k) / 2)) * ↑↑(p ^ (↑p ^ (succ k - 1) * ((↑p - 1) * succ k - 1)))\n[PROOFSTEP]\nrw [← coe_two] at hζ \n[GOAL]\ncase pos\np : ℕ+\nK : Type u\nL : Type v\nζ : L\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Algebra K L\nhp✝ : Fact (Nat.Prime ↑p)\nk : ℕ\nhcycl : IsCyclotomicExtension {p ^ succ k} K L\nhζ✝ : IsPrimitiveRoot ζ ↑(p ^ succ k)\nhirr : Irreducible (cyclotomic (↑(p ^ succ k)) K)\nhk✝ : ↑2 ^ (k + 1) = ↑2\ncoe_two : 2 = ↑2\nhp : p = 2\nhk : k = 0\nhζ : IsPrimitiveRoot ζ 2\n⊢ discr K ↑(IsPrimitiveRoot.powerBasis K hζ✝).basis =\n    ↑((-1) ^ (φ ↑(p ^ succ k) / 2)) * ↑↑(p ^ (↑p ^ (succ k - 1) * ((↑p - 1) * succ k - 1)))\n[PROOFSTEP]\nrw [coe_basis, powerBasis_gen]\n[GOAL]\ncase pos\np : ℕ+\nK : Type u\nL : Type v\nζ : L\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Algebra K L\nhp✝ : Fact (Nat.Prime ↑p)\nk : ℕ\nhcycl : IsCyclotomicExtension {p ^ succ k} K L\nhζ✝ : IsPrimitiveRoot ζ ↑(p ^ succ k)\nhirr : Irreducible (cyclotomic (↑(p ^ succ k)) K)\nhk✝ : ↑2 ^ (k + 1) = ↑2\ncoe_two : 2 = ↑2\nhp : p = 2\nhk : k = 0\nhζ : IsPrimitiveRoot ζ 2\n⊢ (discr K fun i => ζ ^ ↑i) = ↑((-1) ^ (φ ↑(p ^ succ k) / 2)) * ↑↑(p ^ (↑p ^ (succ k - 1) * ((↑p - 1) * succ k - 1)))\n[PROOFSTEP]\nsimp only [hp, hk]\n[GOAL]\ncase pos\np : ℕ+\nK : Type u\nL : Type v\nζ : L\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Algebra K L\nhp✝ : Fact (Nat.Prime ↑p)\nk : ℕ\nhcycl : IsCyclotomicExtension {p ^ succ k} K L\nhζ✝ : IsPrimitiveRoot ζ ↑(p ^ succ k)\nhirr : Irreducible (cyclotomic (↑(p ^ succ k)) K)\nhk✝ : ↑2 ^ (k + 1) = ↑2\ncoe_two : 2 = ↑2\nhp : p = 2\nhk : k = 0\nhζ : IsPrimitiveRoot ζ 2\n⊢ (discr K fun i => ζ ^ ↑i) = ↑((-1) ^ (φ ↑(2 ^ succ 0) / 2)) * ↑↑(2 ^ (↑2 ^ (succ 0 - 1) * ((↑2 - 1) * succ 0 - 1)))\n[PROOFSTEP]\nnorm_num\n  -- Porting note: the goal at this point is `(discr K fun i ↦ ζ ^ ↑i) = 1`.\n        -- This `simp_rw` is needed so the next `rw` can rewrite the type of `i` from\n        -- `Fin (natDegree (minpoly K ζ))` to `Fin 1`\n[GOAL]\ncase pos\np : ℕ+\nK : Type u\nL : Type v\nζ : L\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Algebra K L\nhp✝ : Fact (Nat.Prime ↑p)\nk : ℕ\nhcycl : IsCyclotomicExtension {p ^ succ k} K L\nhζ✝ : IsPrimitiveRoot ζ ↑(p ^ succ k)\nhirr : Irreducible (cyclotomic (↑(p ^ succ k)) K)\nhk✝ : ↑2 ^ (k + 1) = ↑2\ncoe_two : 2 = ↑2\nhp : p = 2\nhk : k = 0\nhζ : IsPrimitiveRoot ζ 2\n⊢ (discr K fun i => ζ ^ ↑i) = 1\n[PROOFSTEP]\nsimp_rw [hζ.eq_neg_one_of_two_right, show (-1 : L) = algebraMap K L (-1) by simp]\n[GOAL]\np : ℕ+\nK : Type u\nL : Type v\nζ : L\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Algebra K L\nhp✝ : Fact (Nat.Prime ↑p)\nk : ℕ\nhcycl : IsCyclotomicExtension {p ^ succ k} K L\nhζ✝ : IsPrimitiveRoot ζ ↑(p ^ succ k)\nhirr : Irreducible (cyclotomic (↑(p ^ succ k)) K)\nhk✝ : ↑2 ^ (k + 1) = ↑2\ncoe_two : 2 = ↑2\nhp : p = 2\nhk : k = 0\nhζ : IsPrimitiveRoot ζ 2\n⊢ -1 = ↑(algebraMap K L) (-1)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase pos\np : ℕ+\nK : Type u\nL : Type v\nζ : L\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Algebra K L\nhp✝ : Fact (Nat.Prime ↑p)\nk : ℕ\nhcycl : IsCyclotomicExtension {p ^ succ k} K L\nhζ✝ : IsPrimitiveRoot ζ ↑(p ^ succ k)\nhirr : Irreducible (cyclotomic (↑(p ^ succ k)) K)\nhk✝ : ↑2 ^ (k + 1) = ↑2\ncoe_two : 2 = ↑2\nhp : p = 2\nhk : k = 0\nhζ : IsPrimitiveRoot ζ 2\n⊢ (discr K fun i => ↑(algebraMap K L) (-1) ^ ↑i) = 1\n[PROOFSTEP]\nrw [hζ.eq_neg_one_of_two_right, show (-1 : L) = algebraMap K L (-1) by simp,\n  minpoly.eq_X_sub_C_of_algebraMap_inj _ (algebraMap K L).injective, natDegree_X_sub_C]\n[GOAL]\np : ℕ+\nK : Type u\nL : Type v\nζ : L\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Algebra K L\nhp✝ : Fact (Nat.Prime ↑p)\nk : ℕ\nhcycl : IsCyclotomicExtension {p ^ succ k} K L\nhζ✝ : IsPrimitiveRoot ζ ↑(p ^ succ k)\nhirr : Irreducible (cyclotomic (↑(p ^ succ k)) K)\nhk✝ : ↑2 ^ (k + 1) = ↑2\ncoe_two : 2 = ↑2\nhp : p = 2\nhk : k = 0\nhζ : IsPrimitiveRoot ζ 2\n⊢ -1 = ↑(algebraMap K L) (-1)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase pos\np : ℕ+\nK : Type u\nL : Type v\nζ : L\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Algebra K L\nhp✝ : Fact (Nat.Prime ↑p)\nk : ℕ\nhcycl : IsCyclotomicExtension {p ^ succ k} K L\nhζ✝ : IsPrimitiveRoot ζ ↑(p ^ succ k)\nhirr : Irreducible (cyclotomic (↑(p ^ succ k)) K)\nhk✝ : ↑2 ^ (k + 1) = ↑2\ncoe_two : 2 = ↑2\nhp : p = 2\nhk : k = 0\nhζ : IsPrimitiveRoot ζ 2\n⊢ (discr K fun i => ↑(algebraMap K L) (-1) ^ ↑i) = 1\n[PROOFSTEP]\nsimp only [discr, traceMatrix_apply, Matrix.det_unique, Fin.default_eq_zero, Fin.val_zero, _root_.pow_zero,\n  traceForm_apply, mul_one]\n[GOAL]\ncase pos\np : ℕ+\nK : Type u\nL : Type v\nζ : L\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Algebra K L\nhp✝ : Fact (Nat.Prime ↑p)\nk : ℕ\nhcycl : IsCyclotomicExtension {p ^ succ k} K L\nhζ✝ : IsPrimitiveRoot ζ ↑(p ^ succ k)\nhirr : Irreducible (cyclotomic (↑(p ^ succ k)) K)\nhk✝ : ↑2 ^ (k + 1) = ↑2\ncoe_two : 2 = ↑2\nhp : p = 2\nhk : k = 0\nhζ : IsPrimitiveRoot ζ 2\n⊢ ↑(trace K L) 1 = 1\n[PROOFSTEP]\nrw [← (algebraMap K L).map_one, trace_algebraMap, finrank _ hirr, hp, hk]\n[GOAL]\ncase pos\np : ℕ+\nK : Type u\nL : Type v\nζ : L\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Algebra K L\nhp✝ : Fact (Nat.Prime ↑p)\nk : ℕ\nhcycl : IsCyclotomicExtension {p ^ succ k} K L\nhζ✝ : IsPrimitiveRoot ζ ↑(p ^ succ k)\nhirr : Irreducible (cyclotomic (↑(p ^ succ k)) K)\nhk✝ : ↑2 ^ (k + 1) = ↑2\ncoe_two : 2 = ↑2\nhp : p = 2\nhk : k = 0\nhζ : IsPrimitiveRoot ζ 2\n⊢ φ ↑(2 ^ succ 0) • 1 = 1\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase pos\np : ℕ+\nK : Type u\nL : Type v\nζ : L\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Algebra K L\nhp✝ : Fact (Nat.Prime ↑p)\nk : ℕ\nhcycl : IsCyclotomicExtension {p ^ succ k} K L\nhζ✝ : IsPrimitiveRoot ζ ↑(p ^ succ k)\nhirr : Irreducible (cyclotomic (↑(p ^ succ k)) K)\nhk✝ : ↑2 ^ (k + 1) = ↑2\ncoe_two : 2 = ↑2\nhp : p = 2\nhk : k = 0\nhζ : IsPrimitiveRoot ζ 2\n⊢ ↑(φ ↑2) = 1\n[PROOFSTEP]\nsimp [← coe_two]\n[GOAL]\ncase neg\np : ℕ+\nK : Type u\nL : Type v\nζ : L\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Algebra K L\nhp : Fact (Nat.Prime ↑p)\nk : ℕ\nhcycl : IsCyclotomicExtension {p ^ succ k} K L\nhζ : IsPrimitiveRoot ζ ↑(p ^ succ k)\nhirr : Irreducible (cyclotomic (↑(p ^ succ k)) K)\nhk : ¬p ^ (k + 1) = 2\n⊢ discr K ↑(IsPrimitiveRoot.powerBasis K hζ).basis =\n    ↑((-1) ^ (φ ↑(p ^ succ k) / 2)) * ↑↑(p ^ (↑p ^ (succ k - 1) * ((↑p - 1) * succ k - 1)))\n[PROOFSTEP]\nexact discr_prime_pow_ne_two hζ hirr hk\n[GOAL]\np : ℕ+\nk : ℕ\nK : Type u\nL : Type v\nζ : L\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {p ^ k} K L\nhp : Fact (Nat.Prime ↑p)\nhζ : IsPrimitiveRoot ζ ↑(p ^ k)\nhirr : Irreducible (cyclotomic (↑(p ^ k)) K)\n⊢ ∃ u n, discr K ↑(IsPrimitiveRoot.powerBasis K hζ).basis = ↑↑u * ↑↑(p ^ n)\n[PROOFSTEP]\nrw [discr_prime_pow hζ hirr]\n[GOAL]\np : ℕ+\nk : ℕ\nK : Type u\nL : Type v\nζ : L\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {p ^ k} K L\nhp : Fact (Nat.Prime ↑p)\nhζ : IsPrimitiveRoot ζ ↑(p ^ k)\nhirr : Irreducible (cyclotomic (↑(p ^ k)) K)\n⊢ ∃ u n, ↑((-1) ^ (φ ↑(p ^ k) / 2)) * ↑↑(p ^ (↑p ^ (k - 1) * ((↑p - 1) * k - 1))) = ↑↑u * ↑↑(p ^ n)\n[PROOFSTEP]\nby_cases heven : Even ((p ^ k : ℕ).totient / 2)\n[GOAL]\ncase pos\np : ℕ+\nk : ℕ\nK : Type u\nL : Type v\nζ : L\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {p ^ k} K L\nhp : Fact (Nat.Prime ↑p)\nhζ : IsPrimitiveRoot ζ ↑(p ^ k)\nhirr : Irreducible (cyclotomic (↑(p ^ k)) K)\nheven : Even (φ ↑(p ^ k) / 2)\n⊢ ∃ u n, ↑((-1) ^ (φ ↑(p ^ k) / 2)) * ↑↑(p ^ (↑p ^ (k - 1) * ((↑p - 1) * k - 1))) = ↑↑u * ↑↑(p ^ n)\n[PROOFSTEP]\nrefine' ⟨1, (p : ℕ) ^ (k - 1) * ((p - 1) * k - 1), by rw [heven.neg_one_pow]; norm_num⟩\n[GOAL]\np : ℕ+\nk : ℕ\nK : Type u\nL : Type v\nζ : L\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {p ^ k} K L\nhp : Fact (Nat.Prime ↑p)\nhζ : IsPrimitiveRoot ζ ↑(p ^ k)\nhirr : Irreducible (cyclotomic (↑(p ^ k)) K)\nheven : Even (φ ↑(p ^ k) / 2)\n⊢ ↑((-1) ^ (φ ↑(p ^ k) / 2)) * ↑↑(p ^ (↑p ^ (k - 1) * ((↑p - 1) * k - 1))) =\n    ↑↑1 * ↑↑(p ^ (↑p ^ (k - 1) * ((↑p - 1) * k - 1)))\n[PROOFSTEP]\nrw [heven.neg_one_pow]\n[GOAL]\np : ℕ+\nk : ℕ\nK : Type u\nL : Type v\nζ : L\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {p ^ k} K L\nhp : Fact (Nat.Prime ↑p)\nhζ : IsPrimitiveRoot ζ ↑(p ^ k)\nhirr : Irreducible (cyclotomic (↑(p ^ k)) K)\nheven : Even (φ ↑(p ^ k) / 2)\n⊢ ↑1 * ↑↑(p ^ (↑p ^ (k - 1) * ((↑p - 1) * k - 1))) = ↑↑1 * ↑↑(p ^ (↑p ^ (k - 1) * ((↑p - 1) * k - 1)))\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase neg\np : ℕ+\nk : ℕ\nK : Type u\nL : Type v\nζ : L\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {p ^ k} K L\nhp : Fact (Nat.Prime ↑p)\nhζ : IsPrimitiveRoot ζ ↑(p ^ k)\nhirr : Irreducible (cyclotomic (↑(p ^ k)) K)\nheven : ¬Even (φ ↑(p ^ k) / 2)\n⊢ ∃ u n, ↑((-1) ^ (φ ↑(p ^ k) / 2)) * ↑↑(p ^ (↑p ^ (k - 1) * ((↑p - 1) * k - 1))) = ↑↑u * ↑↑(p ^ n)\n[PROOFSTEP]\nexact ⟨-1, (p : ℕ) ^ (k - 1) * ((p - 1) * k - 1), by rw [(odd_iff_not_even.2 heven).neg_one_pow]; norm_num⟩\n[GOAL]\np : ℕ+\nk : ℕ\nK : Type u\nL : Type v\nζ : L\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {p ^ k} K L\nhp : Fact (Nat.Prime ↑p)\nhζ : IsPrimitiveRoot ζ ↑(p ^ k)\nhirr : Irreducible (cyclotomic (↑(p ^ k)) K)\nheven : ¬Even (φ ↑(p ^ k) / 2)\n⊢ ↑((-1) ^ (φ ↑(p ^ k) / 2)) * ↑↑(p ^ (↑p ^ (k - 1) * ((↑p - 1) * k - 1))) =\n    ↑↑(-1) * ↑↑(p ^ (↑p ^ (k - 1) * ((↑p - 1) * k - 1)))\n[PROOFSTEP]\nrw [(odd_iff_not_even.2 heven).neg_one_pow]\n[GOAL]\np : ℕ+\nk : ℕ\nK : Type u\nL : Type v\nζ : L\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {p ^ k} K L\nhp : Fact (Nat.Prime ↑p)\nhζ : IsPrimitiveRoot ζ ↑(p ^ k)\nhirr : Irreducible (cyclotomic (↑(p ^ k)) K)\nheven : ¬Even (φ ↑(p ^ k) / 2)\n⊢ ↑(-1) * ↑↑(p ^ (↑p ^ (k - 1) * ((↑p - 1) * k - 1))) = ↑↑(-1) * ↑↑(p ^ (↑p ^ (k - 1) * ((↑p - 1) * k - 1)))\n[PROOFSTEP]\nnorm_num\n[GOAL]\np : ℕ+\nk : ℕ\nK : Type u\nL : Type v\nζ : L\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {p} K L\nhp : Fact (Nat.Prime ↑p)\nhζ : IsPrimitiveRoot ζ ↑p\nhirr : Irreducible (cyclotomic (↑p) K)\nhodd : p ≠ 2\n⊢ discr K ↑(IsPrimitiveRoot.powerBasis K hζ).basis = ↑((-1) ^ ((↑p - 1) / 2)) * ↑↑(p ^ (↑p - 2))\n[PROOFSTEP]\nhave : IsCyclotomicExtension {p ^ (0 + 1)} K L :=\n  by\n  rw [zero_add, pow_one]\n  infer_instance\n[GOAL]\np : ℕ+\nk : ℕ\nK : Type u\nL : Type v\nζ : L\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {p} K L\nhp : Fact (Nat.Prime ↑p)\nhζ : IsPrimitiveRoot ζ ↑p\nhirr : Irreducible (cyclotomic (↑p) K)\nhodd : p ≠ 2\n⊢ IsCyclotomicExtension {p ^ (0 + 1)} K L\n[PROOFSTEP]\nrw [zero_add, pow_one]\n[GOAL]\np : ℕ+\nk : ℕ\nK : Type u\nL : Type v\nζ : L\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {p} K L\nhp : Fact (Nat.Prime ↑p)\nhζ : IsPrimitiveRoot ζ ↑p\nhirr : Irreducible (cyclotomic (↑p) K)\nhodd : p ≠ 2\n⊢ IsCyclotomicExtension {p} K L\n[PROOFSTEP]\ninfer_instance\n[GOAL]\np : ℕ+\nk : ℕ\nK : Type u\nL : Type v\nζ : L\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {p} K L\nhp : Fact (Nat.Prime ↑p)\nhζ : IsPrimitiveRoot ζ ↑p\nhirr : Irreducible (cyclotomic (↑p) K)\nhodd : p ≠ 2\nthis : IsCyclotomicExtension {p ^ (0 + 1)} K L\n⊢ discr K ↑(IsPrimitiveRoot.powerBasis K hζ).basis = ↑((-1) ^ ((↑p - 1) / 2)) * ↑↑(p ^ (↑p - 2))\n[PROOFSTEP]\nhave hζ' : IsPrimitiveRoot ζ ↑(p ^ (0 + 1)) := by simpa using hζ\n[GOAL]\np : ℕ+\nk : ℕ\nK : Type u\nL : Type v\nζ : L\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {p} K L\nhp : Fact (Nat.Prime ↑p)\nhζ : IsPrimitiveRoot ζ ↑p\nhirr : Irreducible (cyclotomic (↑p) K)\nhodd : p ≠ 2\nthis : IsCyclotomicExtension {p ^ (0 + 1)} K L\n⊢ IsPrimitiveRoot ζ ↑(p ^ (0 + 1))\n[PROOFSTEP]\nsimpa using hζ\n[GOAL]\np : ℕ+\nk : ℕ\nK : Type u\nL : Type v\nζ : L\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {p} K L\nhp : Fact (Nat.Prime ↑p)\nhζ : IsPrimitiveRoot ζ ↑p\nhirr : Irreducible (cyclotomic (↑p) K)\nhodd : p ≠ 2\nthis : IsCyclotomicExtension {p ^ (0 + 1)} K L\nhζ' : IsPrimitiveRoot ζ ↑(p ^ (0 + 1))\n⊢ discr K ↑(IsPrimitiveRoot.powerBasis K hζ).basis = ↑((-1) ^ ((↑p - 1) / 2)) * ↑↑(p ^ (↑p - 2))\n[PROOFSTEP]\nconvert discr_prime_pow_ne_two hζ' (by simpa [hirr]) (by simp [hodd]) using 2\n[GOAL]\np : ℕ+\nk : ℕ\nK : Type u\nL : Type v\nζ : L\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {p} K L\nhp : Fact (Nat.Prime ↑p)\nhζ : IsPrimitiveRoot ζ ↑p\nhirr : Irreducible (cyclotomic (↑p) K)\nhodd : p ≠ 2\nthis : IsCyclotomicExtension {p ^ (0 + 1)} K L\nhζ' : IsPrimitiveRoot ζ ↑(p ^ (0 + 1))\n⊢ Irreducible (cyclotomic ↑(p ^ (0 + 1)) ?m.954125)\n[PROOFSTEP]\nsimpa [hirr]\n[GOAL]\np : ℕ+\nk : ℕ\nK : Type u\nL : Type v\nζ : L\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {p} K L\nhp : Fact (Nat.Prime ↑p)\nhζ : IsPrimitiveRoot ζ ↑p\nhirr : Irreducible (cyclotomic (↑p) K)\nhodd : p ≠ 2\nthis : IsCyclotomicExtension {p ^ (0 + 1)} K L\nhζ' : IsPrimitiveRoot ζ ↑(p ^ (0 + 1))\n⊢ p ^ (0 + 1) ≠ 2\n[PROOFSTEP]\nsimp [hodd]\n[GOAL]\ncase h.e'_3.h.e'_5\np : ℕ+\nk : ℕ\nK : Type u\nL : Type v\nζ : L\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {p} K L\nhp : Fact (Nat.Prime ↑p)\nhζ : IsPrimitiveRoot ζ ↑p\nhirr : Irreducible (cyclotomic (↑p) K)\nhodd : p ≠ 2\nthis : IsCyclotomicExtension {p ^ (0 + 1)} K L\nhζ' : IsPrimitiveRoot ζ ↑(p ^ (0 + 1))\n⊢ ↑((-1) ^ ((↑p - 1) / 2)) = ↑((-1) ^ (φ ↑(p ^ (0 + 1)) / 2))\n[PROOFSTEP]\nrw [zero_add, pow_one, totient_prime hp.out]\n[GOAL]\ncase h.e'_3.h.e'_6\np : ℕ+\nk : ℕ\nK : Type u\nL : Type v\nζ : L\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {p} K L\nhp : Fact (Nat.Prime ↑p)\nhζ : IsPrimitiveRoot ζ ↑p\nhirr : Irreducible (cyclotomic (↑p) K)\nhodd : p ≠ 2\nthis : IsCyclotomicExtension {p ^ (0 + 1)} K L\nhζ' : IsPrimitiveRoot ζ ↑(p ^ (0 + 1))\n⊢ ↑↑(p ^ (↑p - 2)) = ↑↑(p ^ (↑p ^ 0 * ((↑p - 1) * (0 + 1) - 1)))\n[PROOFSTEP]\nrw [_root_.pow_zero, one_mul, zero_add, mul_one, Nat.sub_sub]\n", "meta": {"mathlib_filename": "Mathlib.NumberTheory.Cyclotomic.Discriminant", "llama_tokens": 35697, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8080672227971211, "lm_q2_score": 0.6548947223065755, "lm_q1q2_score": 0.5291989594787663}}
{"text": "[GOAL]\nx y : ℍ\n⊢ ↑(starRingEnd ℝ) (inner y x) = inner x y\n[PROOFSTEP]\nsimp [inner_def, mul_comm]\n[GOAL]\nx y z : ℍ\n⊢ inner (x + y) z = inner x z + inner y z\n[PROOFSTEP]\nsimp only [inner_def, add_mul, add_re]\n[GOAL]\nx y : ℍ\nr : ℝ\n⊢ inner (r • x) y = ↑(starRingEnd ℝ) r * inner x y\n[PROOFSTEP]\nsimp [inner_def]\n[GOAL]\na : ℍ\n⊢ ↑normSq a = ‖a‖ * ‖a‖\n[PROOFSTEP]\nrw [← inner_self, real_inner_self_eq_norm_mul_norm]\n[GOAL]\n⊢ ‖1‖ = 1\n[PROOFSTEP]\nrw [norm_eq_sqrt_real_inner, inner_self, normSq.map_one, Real.sqrt_one]\n[GOAL]\na : ℝ\n⊢ ‖↑a‖ = ‖a‖\n[PROOFSTEP]\nrw [norm_eq_sqrt_real_inner, inner_self, normSq_coe, Real.sqrt_sq_eq_abs, Real.norm_eq_abs]\n[GOAL]\na : ℍ\n⊢ ‖star a‖ = ‖a‖\n[PROOFSTEP]\nsimp_rw [norm_eq_sqrt_real_inner, inner_self, normSq_star]\n[GOAL]\na b : ℍ\n⊢ ‖a * b‖ = ‖a‖ * ‖b‖\n[PROOFSTEP]\nsimp only [norm_eq_sqrt_real_inner, inner_self, normSq.map_mul]\n[GOAL]\na b : ℍ\n⊢ Real.sqrt (↑normSq a * ↑normSq b) = Real.sqrt (↑normSq a) * Real.sqrt (↑normSq b)\n[PROOFSTEP]\nexact\n  Real.sqrt_mul normSq_nonneg\n    _\n      -- porting note: added `noncomputable`\n[GOAL]\nz w : ℂ\n⊢ ↑(z + w) = ↑z + ↑w\n[PROOFSTEP]\next\n[GOAL]\ncase a\nz w : ℂ\n⊢ (↑(z + w)).re = (↑z + ↑w).re\n[PROOFSTEP]\nsimp\n[GOAL]\ncase a\nz w : ℂ\n⊢ (↑(z + w)).imI = (↑z + ↑w).imI\n[PROOFSTEP]\nsimp\n[GOAL]\ncase a\nz w : ℂ\n⊢ (↑(z + w)).imJ = (↑z + ↑w).imJ\n[PROOFSTEP]\nsimp\n[GOAL]\ncase a\nz w : ℂ\n⊢ (↑(z + w)).imK = (↑z + ↑w).imK\n[PROOFSTEP]\nsimp\n[GOAL]\nz w : ℂ\n⊢ ↑(z * w) = ↑z * ↑w\n[PROOFSTEP]\next\n[GOAL]\ncase a\nz w : ℂ\n⊢ (↑(z * w)).re = (↑z * ↑w).re\n[PROOFSTEP]\nsimp\n[GOAL]\ncase a\nz w : ℂ\n⊢ (↑(z * w)).imI = (↑z * ↑w).imI\n[PROOFSTEP]\nsimp\n[GOAL]\ncase a\nz w : ℂ\n⊢ (↑(z * w)).imJ = (↑z * ↑w).imJ\n[PROOFSTEP]\nsimp\n[GOAL]\ncase a\nz w : ℂ\n⊢ (↑(z * w)).imK = (↑z * ↑w).imK\n[PROOFSTEP]\nsimp\n[GOAL]\nr : ℝ\nz : ℂ\n⊢ ↑(r • z) = ↑r * ↑z\n[PROOFSTEP]\next\n[GOAL]\ncase a\nr : ℝ\nz : ℂ\n⊢ (↑(r • z)).re = (↑r * ↑z).re\n[PROOFSTEP]\nsimp\n[GOAL]\ncase a\nr : ℝ\nz : ℂ\n⊢ (↑(r • z)).imI = (↑r * ↑z).imI\n[PROOFSTEP]\nsimp\n[GOAL]\ncase a\nr : ℝ\nz : ℂ\n⊢ (↑(r • z)).imJ = (↑r * ↑z).imJ\n[PROOFSTEP]\nsimp\n[GOAL]\ncase a\nr : ℝ\nz : ℂ\n⊢ (↑(r • z)).imK = (↑r * ↑z).imK\n[PROOFSTEP]\nsimp\n[GOAL]\nx : ℍ\n⊢ ‖↑(PiLp.equiv 2 fun x => ℝ).symm (↑(equivTuple ℝ) x)‖ = ‖x‖\n[PROOFSTEP]\nrw [norm_eq_sqrt_real_inner, norm_eq_sqrt_real_inner, inner_self, normSq_def', PiLp.inner_apply, Fin.sum_univ_four]\n[GOAL]\nx : ℍ\n⊢ Real.sqrt\n      (inner (↑(PiLp.equiv 2 fun x => ℝ).symm (↑(equivTuple ℝ) x) 0)\n              (↑(PiLp.equiv 2 fun x => ℝ).symm (↑(equivTuple ℝ) x) 0) +\n            inner (↑(PiLp.equiv 2 fun x => ℝ).symm (↑(equivTuple ℝ) x) 1)\n              (↑(PiLp.equiv 2 fun x => ℝ).symm (↑(equivTuple ℝ) x) 1) +\n          inner (↑(PiLp.equiv 2 fun x => ℝ).symm (↑(equivTuple ℝ) x) 2)\n            (↑(PiLp.equiv 2 fun x => ℝ).symm (↑(equivTuple ℝ) x) 2) +\n        inner (↑(PiLp.equiv 2 fun x => ℝ).symm (↑(equivTuple ℝ) x) 3)\n          (↑(PiLp.equiv 2 fun x => ℝ).symm (↑(equivTuple ℝ) x) 3)) =\n    Real.sqrt (x.re ^ 2 + x.imI ^ 2 + x.imJ ^ 2 + x.imK ^ 2)\n[PROOFSTEP]\nsimp_rw [IsROrC.inner_apply, starRingEnd_apply, star_trivial, ← sq]\n[GOAL]\nx : ℍ\n⊢ Real.sqrt\n      (↑(PiLp.equiv 2 fun x => ℝ).symm (↑(equivTuple ℝ) x) 0 ^ 2 +\n            ↑(PiLp.equiv 2 fun x => ℝ).symm (↑(equivTuple ℝ) x) 1 ^ 2 +\n          ↑(PiLp.equiv 2 fun x => ℝ).symm (↑(equivTuple ℝ) x) 2 ^ 2 +\n        ↑(PiLp.equiv 2 fun x => ℝ).symm (↑(equivTuple ℝ) x) 3 ^ 2) =\n    Real.sqrt (x.re ^ 2 + x.imI ^ 2 + x.imJ ^ 2 + x.imK ^ 2)\n[PROOFSTEP]\nrfl\n[GOAL]\n⊢ Continuous ↑normSq\n[PROOFSTEP]\nsimpa [← normSq_eq_norm_mul_self] using (continuous_norm.mul continuous_norm : Continuous fun q : ℍ => ‖q‖ * ‖q‖)\n[GOAL]\n⊢ Continuous fun q => im q\n[PROOFSTEP]\nsimpa only [← sub_self_re] using continuous_id.sub (continuous_coe.comp continuous_re)\n[GOAL]\nthis : UniformEmbedding ↑(LinearEquiv.toEquiv linearIsometryEquivTuple.toLinearEquiv).symm\n⊢ CompleteSpace (EuclideanSpace ℝ (Fin 4))\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u_1\nf : α → ℝ\nr : ℝ\nh : HasSum (fun a => ↑(f a)) ↑r\n⊢ HasSum f r\n[PROOFSTEP]\nsimpa only using h.map (show ℍ →ₗ[ℝ] ℝ from QuaternionAlgebra.reₗ _ _) continuous_re\n[GOAL]\nα : Type u_1\nf : α → ℝ\nr : ℝ\nh : HasSum f r\n⊢ HasSum (fun a => ↑(f a)) ↑r\n[PROOFSTEP]\nsimpa only using h.map (algebraMap ℝ ℍ) (continuous_algebraMap _ _)\n[GOAL]\nα : Type u_1\nf : α → ℝ\n⊢ (Summable fun a => ↑(f a)) ↔ Summable f\n[PROOFSTEP]\nsimpa only using\n  Summable.map_iff_of_leftInverse (algebraMap ℝ ℍ) (show ℍ →ₗ[ℝ] ℝ from QuaternionAlgebra.reₗ _ _)\n    (continuous_algebraMap _ _) continuous_re coe_re\n[GOAL]\nα : Type u_1\nf : α → ℝ\n⊢ ∑' (a : α), ↑(f a) = ↑(∑' (a : α), f a)\n[PROOFSTEP]\nby_cases hf : Summable f\n[GOAL]\ncase pos\nα : Type u_1\nf : α → ℝ\nhf : Summable f\n⊢ ∑' (a : α), ↑(f a) = ↑(∑' (a : α), f a)\n[PROOFSTEP]\nexact (hasSum_coe.mpr hf.hasSum).tsum_eq\n[GOAL]\ncase neg\nα : Type u_1\nf : α → ℝ\nhf : ¬Summable f\n⊢ ∑' (a : α), ↑(f a) = ↑(∑' (a : α), f a)\n[PROOFSTEP]\nsimp [tsum_eq_zero_of_not_summable hf, tsum_eq_zero_of_not_summable (summable_coe.not.mpr hf)]\n", "meta": {"mathlib_filename": "Mathlib.Analysis.Quaternion", "llama_tokens": 2665, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8397339676722393, "lm_q2_score": 0.6297745935070808, "lm_q1q2_score": 0.5288431181448726}}
{"text": "[GOAL]\nM₀ : Type u_1\nG₀ : Type u_2\nM₀' : Type u_3\nG₀' : Type u_4\ninst✝² : MulZeroClass M₀\na✝ b : M₀\ninst✝¹ : Mul M₀'\ninst✝ : Zero M₀'\nf : M₀' → M₀\nhf : Injective f\nzero : f 0 = 0\nmul : ∀ (a b : M₀'), f (a * b) = f a * f b\na : M₀'\n⊢ f (0 * a) = f 0\n[PROOFSTEP]\nsimp only [mul, zero, zero_mul]\n[GOAL]\nM₀ : Type u_1\nG₀ : Type u_2\nM₀' : Type u_3\nG₀' : Type u_4\ninst✝² : MulZeroClass M₀\na✝ b : M₀\ninst✝¹ : Mul M₀'\ninst✝ : Zero M₀'\nf : M₀' → M₀\nhf : Injective f\nzero : f 0 = 0\nmul : ∀ (a b : M₀'), f (a * b) = f a * f b\na : M₀'\n⊢ f (a * 0) = f 0\n[PROOFSTEP]\nsimp only [mul, zero, mul_zero]\n[GOAL]\nM₀ : Type u_1\nG₀ : Type u_2\nM₀' : Type u_3\nG₀' : Type u_4\ninst✝² : MulZeroClass M₀\na b : M₀\ninst✝¹ : Mul M₀'\ninst✝ : Zero M₀'\nf : M₀ → M₀'\nhf : Surjective f\nzero : f 0 = 0\nmul : ∀ (a b : M₀), f (a * b) = f a * f b\nx : M₀\n⊢ 0 * f x = 0\n[PROOFSTEP]\nsimp only [← zero, ← mul, zero_mul]\n[GOAL]\nM₀ : Type u_1\nG₀ : Type u_2\nM₀' : Type u_3\nG₀' : Type u_4\ninst✝² : MulZeroClass M₀\na b : M₀\ninst✝¹ : Mul M₀'\ninst✝ : Zero M₀'\nf : M₀ → M₀'\nhf : Surjective f\nzero : f 0 = 0\nmul : ∀ (a b : M₀), f (a * b) = f a * f b\nx : M₀\n⊢ f x * 0 = 0\n[PROOFSTEP]\nsimp only [← zero, ← mul, mul_zero]\n[GOAL]\nM₀ : Type u_1\nG₀ : Type u_2\nM₀' : Type u_3\nG₀' : Type u_4\ninst✝⁴ : Mul M₀\ninst✝³ : Zero M₀\ninst✝² : Mul M₀'\ninst✝¹ : Zero M₀'\nf : M₀ → M₀'\nhf : Injective f\nzero : f 0 = 0\nmul : ∀ (x y : M₀), f (x * y) = f x * f y\ninst✝ : NoZeroDivisors M₀'\na✝ b✝ : M₀\nH : a✝ * b✝ = 0\n⊢ f (?m.2223 H) * f (?m.2224 H) = 0\n[PROOFSTEP]\nrw [← mul, H, zero]\n[GOAL]\nM₀ : Type u_1\nG₀ : Type u_2\nM₀' : Type u_3\nG₀' : Type u_4\ninst✝⁴ : Mul M₀\ninst✝³ : Zero M₀\ninst✝² : Mul M₀'\ninst✝¹ : Zero M₀'\nf : M₀ → M₀'\nhf : Injective f\nzero : f 0 = 0\nmul : ∀ (x y : M₀), f (x * y) = f x * f y\ninst✝ : NoZeroDivisors M₀'\na✝ b✝ : M₀\nH✝ : a✝ * b✝ = 0\nthis : f a✝ * f b✝ = 0\nH : f a✝ = 0\n⊢ f a✝ = f 0\n[PROOFSTEP]\nrwa [zero]\n[GOAL]\nM₀ : Type u_1\nG₀ : Type u_2\nM₀' : Type u_3\nG₀' : Type u_4\ninst✝⁴ : Mul M₀\ninst✝³ : Zero M₀\ninst✝² : Mul M₀'\ninst✝¹ : Zero M₀'\nf : M₀ → M₀'\nhf : Injective f\nzero : f 0 = 0\nmul : ∀ (x y : M₀), f (x * y) = f x * f y\ninst✝ : NoZeroDivisors M₀'\na✝ b✝ : M₀\nH✝ : a✝ * b✝ = 0\nthis : f a✝ * f b✝ = 0\nH : f b✝ = 0\n⊢ f b✝ = f 0\n[PROOFSTEP]\nrwa [zero]\n[GOAL]\nM₀ : Type u_1\nG₀ : Type u_2\nM₀' : Type u_3\nG₀' : Type u_4\ninst✝⁴ : Mul M₀\ninst✝³ : Zero M₀\ninst✝² : Mul M₀'\ninst✝¹ : Zero M₀'\nf : M₀ → M₀'\nhf : Injective f\nzero : f 0 = 0\nmul : ∀ (x y : M₀), f (x * y) = f x * f y\ninst✝ : IsLeftCancelMulZero M₀'\na✝ b✝ c✝ : M₀\nHne : a✝ ≠ 0\nHe : a✝ * b✝ = a✝ * c✝\n⊢ b✝ = c✝\n[PROOFSTEP]\nhave := congr_arg f He\n[GOAL]\nM₀ : Type u_1\nG₀ : Type u_2\nM₀' : Type u_3\nG₀' : Type u_4\ninst✝⁴ : Mul M₀\ninst✝³ : Zero M₀\ninst✝² : Mul M₀'\ninst✝¹ : Zero M₀'\nf : M₀ → M₀'\nhf : Injective f\nzero : f 0 = 0\nmul : ∀ (x y : M₀), f (x * y) = f x * f y\ninst✝ : IsLeftCancelMulZero M₀'\na✝ b✝ c✝ : M₀\nHne : a✝ ≠ 0\nHe : a✝ * b✝ = a✝ * c✝\nthis : f (a✝ * b✝) = f (a✝ * c✝)\n⊢ b✝ = c✝\n[PROOFSTEP]\nrw [mul, mul] at this \n[GOAL]\nM₀ : Type u_1\nG₀ : Type u_2\nM₀' : Type u_3\nG₀' : Type u_4\ninst✝⁴ : Mul M₀\ninst✝³ : Zero M₀\ninst✝² : Mul M₀'\ninst✝¹ : Zero M₀'\nf : M₀ → M₀'\nhf : Injective f\nzero : f 0 = 0\nmul : ∀ (x y : M₀), f (x * y) = f x * f y\ninst✝ : IsLeftCancelMulZero M₀'\na✝ b✝ c✝ : M₀\nHne : a✝ ≠ 0\nHe : a✝ * b✝ = a✝ * c✝\nthis : f a✝ * f b✝ = f a✝ * f c✝\n⊢ b✝ = c✝\n[PROOFSTEP]\nexact hf (mul_left_cancel₀ (fun Hfa => Hne <| hf <| by rw [Hfa, zero]) this)\n[GOAL]\nM₀ : Type u_1\nG₀ : Type u_2\nM₀' : Type u_3\nG₀' : Type u_4\ninst✝⁴ : Mul M₀\ninst✝³ : Zero M₀\ninst✝² : Mul M₀'\ninst✝¹ : Zero M₀'\nf : M₀ → M₀'\nhf : Injective f\nzero : f 0 = 0\nmul : ∀ (x y : M₀), f (x * y) = f x * f y\ninst✝ : IsLeftCancelMulZero M₀'\na✝ b✝ c✝ : M₀\nHne : a✝ ≠ 0\nHe : a✝ * b✝ = a✝ * c✝\nthis : f a✝ * f b✝ = f a✝ * f c✝\nHfa : f a✝ = 0\n⊢ f a✝ = f 0\n[PROOFSTEP]\nrw [Hfa, zero]\n[GOAL]\nM₀ : Type u_1\nG₀ : Type u_2\nM₀' : Type u_3\nG₀' : Type u_4\ninst✝⁴ : Mul M₀\ninst✝³ : Zero M₀\ninst✝² : Mul M₀'\ninst✝¹ : Zero M₀'\nf : M₀ → M₀'\nhf : Injective f\nzero : f 0 = 0\nmul : ∀ (x y : M₀), f (x * y) = f x * f y\ninst✝ : IsRightCancelMulZero M₀'\na✝ b✝ c✝ : M₀\nHne : b✝ ≠ 0\nHe : a✝ * b✝ = c✝ * b✝\n⊢ a✝ = c✝\n[PROOFSTEP]\nhave := congr_arg f He\n[GOAL]\nM₀ : Type u_1\nG₀ : Type u_2\nM₀' : Type u_3\nG₀' : Type u_4\ninst✝⁴ : Mul M₀\ninst✝³ : Zero M₀\ninst✝² : Mul M₀'\ninst✝¹ : Zero M₀'\nf : M₀ → M₀'\nhf : Injective f\nzero : f 0 = 0\nmul : ∀ (x y : M₀), f (x * y) = f x * f y\ninst✝ : IsRightCancelMulZero M₀'\na✝ b✝ c✝ : M₀\nHne : b✝ ≠ 0\nHe : a✝ * b✝ = c✝ * b✝\nthis : f (a✝ * b✝) = f (c✝ * b✝)\n⊢ a✝ = c✝\n[PROOFSTEP]\nrw [mul, mul] at this \n[GOAL]\nM₀ : Type u_1\nG₀ : Type u_2\nM₀' : Type u_3\nG₀' : Type u_4\ninst✝⁴ : Mul M₀\ninst✝³ : Zero M₀\ninst✝² : Mul M₀'\ninst✝¹ : Zero M₀'\nf : M₀ → M₀'\nhf : Injective f\nzero : f 0 = 0\nmul : ∀ (x y : M₀), f (x * y) = f x * f y\ninst✝ : IsRightCancelMulZero M₀'\na✝ b✝ c✝ : M₀\nHne : b✝ ≠ 0\nHe : a✝ * b✝ = c✝ * b✝\nthis : f a✝ * f b✝ = f c✝ * f b✝\n⊢ a✝ = c✝\n[PROOFSTEP]\nexact hf (mul_right_cancel₀ (fun Hfa => Hne <| hf <| by rw [Hfa, zero]) this)\n[GOAL]\nM₀ : Type u_1\nG₀ : Type u_2\nM₀' : Type u_3\nG₀' : Type u_4\ninst✝⁴ : Mul M₀\ninst✝³ : Zero M₀\ninst✝² : Mul M₀'\ninst✝¹ : Zero M₀'\nf : M₀ → M₀'\nhf : Injective f\nzero : f 0 = 0\nmul : ∀ (x y : M₀), f (x * y) = f x * f y\ninst✝ : IsRightCancelMulZero M₀'\na✝ b✝ c✝ : M₀\nHne : b✝ ≠ 0\nHe : a✝ * b✝ = c✝ * b✝\nthis : f a✝ * f b✝ = f c✝ * f b✝\nHfa : f b✝ = 0\n⊢ f b✝ = f 0\n[PROOFSTEP]\nrw [Hfa, zero]\n[GOAL]\nM₀ : Type u_1\nG₀ : Type u_2\nM₀' : Type u_3\nG₀' : Type u_4\ninst✝⁴ : CancelMonoidWithZero M₀\na b c : M₀\ninst✝³ : Zero M₀'\ninst✝² : Mul M₀'\ninst✝¹ : One M₀'\ninst✝ : Pow M₀' ℕ\nf : M₀' → M₀\nhf : Injective f\nzero : f 0 = 0\none : f 1 = 1\nmul : ∀ (x y : M₀'), f (x * y) = f x * f y\nnpow : ∀ (x : M₀') (n : ℕ), f (x ^ n) = f x ^ n\nsrc✝¹ : Monoid M₀' := Injective.monoid f hf one mul npow\nsrc✝ : MulZeroClass M₀' := Injective.mulZeroClass f hf zero mul\na✝ b✝ c✝ : M₀'\nhx : a✝ ≠ 0\nH : a✝ * b✝ = a✝ * c✝\n⊢ f a✝ * f b✝ = f a✝ * f c✝\n[PROOFSTEP]\nerw [← mul, ← mul, H]\n[GOAL]\nM₀ : Type u_1\nG₀ : Type u_2\nM₀' : Type u_3\nG₀' : Type u_4\ninst✝⁴ : CancelMonoidWithZero M₀\na b c : M₀\ninst✝³ : Zero M₀'\ninst✝² : Mul M₀'\ninst✝¹ : One M₀'\ninst✝ : Pow M₀' ℕ\nf : M₀' → M₀\nhf : Injective f\nzero : f 0 = 0\none : f 1 = 1\nmul : ∀ (x y : M₀'), f (x * y) = f x * f y\nnpow : ∀ (x : M₀') (n : ℕ), f (x ^ n) = f x ^ n\nsrc✝¹ : Monoid M₀' := Injective.monoid f hf one mul npow\nsrc✝ : MulZeroClass M₀' := Injective.mulZeroClass f hf zero mul\na✝ b✝ c✝ : M₀'\nhx : b✝ ≠ 0\nH : a✝ * b✝ = c✝ * b✝\n⊢ f a✝ * f b✝ = f c✝ * f b✝\n[PROOFSTEP]\nerw [← mul, ← mul, H]\n[GOAL]\nM₀ : Type u_1\nG₀ : Type u_2\nM₀' : Type u_3\nG₀' : Type u_4\ninst✝⁷ : GroupWithZero G₀\na b c g h x : G₀\ninst✝⁶ : Zero G₀'\ninst✝⁵ : Mul G₀'\ninst✝⁴ : One G₀'\ninst✝³ : Inv G₀'\ninst✝² : Div G₀'\ninst✝¹ : Pow G₀' ℕ\ninst✝ : Pow G₀' ℤ\nf : G₀' → G₀\nhf : Injective f\nzero : f 0 = 0\none : f 1 = 1\nmul : ∀ (x y : G₀'), f (x * y) = f x * f y\ninv : ∀ (x : G₀'), f x⁻¹ = (f x)⁻¹\ndiv : ∀ (x y : G₀'), f (x / y) = f x / f y\nnpow : ∀ (x : G₀') (n : ℕ), f (x ^ n) = f x ^ n\nzpow : ∀ (x : G₀') (n : ℤ), f (x ^ n) = f x ^ n\nsrc✝² : MonoidWithZero G₀' := Injective.monoidWithZero f hf zero one mul npow\nsrc✝¹ : DivInvMonoid G₀' := Injective.divInvMonoid f hf one mul inv div npow zpow\nsrc✝ : Nontrivial G₀' := pullback_nonzero f zero one\n⊢ f 0⁻¹ = f 0\n[PROOFSTEP]\nerw [inv, zero, inv_zero]\n[GOAL]\nM₀ : Type u_1\nG₀ : Type u_2\nM₀' : Type u_3\nG₀' : Type u_4\ninst✝⁷ : GroupWithZero G₀\na b c g h x✝ : G₀\ninst✝⁶ : Zero G₀'\ninst✝⁵ : Mul G₀'\ninst✝⁴ : One G₀'\ninst✝³ : Inv G₀'\ninst✝² : Div G₀'\ninst✝¹ : Pow G₀' ℕ\ninst✝ : Pow G₀' ℤ\nf : G₀' → G₀\nhf : Injective f\nzero : f 0 = 0\none : f 1 = 1\nmul : ∀ (x y : G₀'), f (x * y) = f x * f y\ninv : ∀ (x : G₀'), f x⁻¹ = (f x)⁻¹\ndiv : ∀ (x y : G₀'), f (x / y) = f x / f y\nnpow : ∀ (x : G₀') (n : ℕ), f (x ^ n) = f x ^ n\nzpow : ∀ (x : G₀') (n : ℤ), f (x ^ n) = f x ^ n\nsrc✝² : MonoidWithZero G₀' := Injective.monoidWithZero f hf zero one mul npow\nsrc✝¹ : DivInvMonoid G₀' := Injective.divInvMonoid f hf one mul inv div npow zpow\nsrc✝ : Nontrivial G₀' := pullback_nonzero f zero one\nx : G₀'\nhx : x ≠ 0\n⊢ f (x * x⁻¹) = f 1\n[PROOFSTEP]\nerw [one, mul, inv, mul_inv_cancel ((hf.ne_iff' zero).2 hx)]\n[GOAL]\nM₀ : Type u_1\nG₀ : Type u_2\nM₀' : Type u_3\nG₀' : Type u_4\ninst✝⁷ : GroupWithZero G₀\na b c g h x : G₀\ninst✝⁶ : Zero G₀'\ninst✝⁵ : Mul G₀'\ninst✝⁴ : One G₀'\ninst✝³ : Inv G₀'\ninst✝² : Div G₀'\ninst✝¹ : Pow G₀' ℕ\ninst✝ : Pow G₀' ℤ\nh01 : 0 ≠ 1\nf : G₀ → G₀'\nhf : Surjective f\nzero : f 0 = 0\none : f 1 = 1\nmul : ∀ (x y : G₀), f (x * y) = f x * f y\ninv : ∀ (x : G₀), f x⁻¹ = (f x)⁻¹\ndiv : ∀ (x y : G₀), f (x / y) = f x / f y\nnpow : ∀ (x : G₀) (n : ℕ), f (x ^ n) = f x ^ n\nzpow : ∀ (x : G₀) (n : ℤ), f (x ^ n) = f x ^ n\nsrc✝¹ : MonoidWithZero G₀' := Surjective.monoidWithZero f hf zero one mul npow\nsrc✝ : DivInvMonoid G₀' := Surjective.divInvMonoid f hf one mul inv div npow zpow\n⊢ 0⁻¹ = 0\n[PROOFSTEP]\nerw [← zero, ← inv, inv_zero]\n[GOAL]\nM₀ : Type u_1\nG₀ : Type u_2\nM₀' : Type u_3\nG₀' : Type u_4\ninst✝⁷ : GroupWithZero G₀\na b c g h x✝ : G₀\ninst✝⁶ : Zero G₀'\ninst✝⁵ : Mul G₀'\ninst✝⁴ : One G₀'\ninst✝³ : Inv G₀'\ninst✝² : Div G₀'\ninst✝¹ : Pow G₀' ℕ\ninst✝ : Pow G₀' ℤ\nh01 : 0 ≠ 1\nf : G₀ → G₀'\nhf : Surjective f\nzero : f 0 = 0\none : f 1 = 1\nmul : ∀ (x y : G₀), f (x * y) = f x * f y\ninv : ∀ (x : G₀), f x⁻¹ = (f x)⁻¹\ndiv : ∀ (x y : G₀), f (x / y) = f x / f y\nnpow : ∀ (x : G₀) (n : ℕ), f (x ^ n) = f x ^ n\nzpow : ∀ (x : G₀) (n : ℤ), f (x ^ n) = f x ^ n\nsrc✝¹ : MonoidWithZero G₀' := Surjective.monoidWithZero f hf zero one mul npow\nsrc✝ : DivInvMonoid G₀' := Surjective.divInvMonoid f hf one mul inv div npow zpow\nx : G₀\nhx : f x ≠ 0\n⊢ f x * (f x)⁻¹ = 1\n[PROOFSTEP]\nerw [← inv, ← mul, mul_inv_cancel (mt (congr_arg f) <| fun h ↦ hx (h.trans zero)), one]\n", "meta": {"mathlib_filename": "Mathlib.Algebra.GroupWithZero.InjSurj", "llama_tokens": 5772, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7490872131147276, "lm_q2_score": 0.7057850278370112, "lm_q1q2_score": 0.5286945395605271}}
{"text": "[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Ioo a b → g' x ≠ 0\nhfa : Tendsto f (𝓝[Ioi a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Ioi a] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Ioi a] a) l\n⊢ Tendsto (fun x => f x / g x) (𝓝[Ioi a] a) l\n[PROOFSTEP]\nhave sub : ∀ x ∈ Ioo a b, Ioo a x ⊆ Ioo a b := fun x hx => Ioo_subset_Ioo (le_refl a) (le_of_lt hx.2)\n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Ioo a b → g' x ≠ 0\nhfa : Tendsto f (𝓝[Ioi a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Ioi a] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Ioi a] a) l\nsub : ∀ (x : ℝ), x ∈ Ioo a b → Ioo a x ⊆ Ioo a b\n⊢ Tendsto (fun x => f x / g x) (𝓝[Ioi a] a) l\n[PROOFSTEP]\nhave hg : ∀ x ∈ Ioo a b, g x ≠ 0 := by\n  intro x hx h\n  have : Tendsto g (𝓝[<] x) (𝓝 0) :=\n    by\n    rw [← h, ← nhdsWithin_Ioo_eq_nhdsWithin_Iio hx.1]\n    exact ((hgg' x hx).continuousAt.continuousWithinAt.mono <| sub x hx).tendsto\n  obtain ⟨y, hyx, hy⟩ : ∃ c ∈ Ioo a x, g' c = 0\n  exact exists_hasDerivAt_eq_zero' hx.1 hga this fun y hy => hgg' y <| sub x hx hy\n  exact hg' y (sub x hx hyx) hy\n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Ioo a b → g' x ≠ 0\nhfa : Tendsto f (𝓝[Ioi a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Ioi a] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Ioi a] a) l\nsub : ∀ (x : ℝ), x ∈ Ioo a b → Ioo a x ⊆ Ioo a b\n⊢ ∀ (x : ℝ), x ∈ Ioo a b → g x ≠ 0\n[PROOFSTEP]\nintro x hx h\n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Ioo a b → g' x ≠ 0\nhfa : Tendsto f (𝓝[Ioi a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Ioi a] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Ioi a] a) l\nsub : ∀ (x : ℝ), x ∈ Ioo a b → Ioo a x ⊆ Ioo a b\nx : ℝ\nhx : x ∈ Ioo a b\nh : g x = 0\n⊢ False\n[PROOFSTEP]\nhave : Tendsto g (𝓝[<] x) (𝓝 0) := by\n  rw [← h, ← nhdsWithin_Ioo_eq_nhdsWithin_Iio hx.1]\n  exact ((hgg' x hx).continuousAt.continuousWithinAt.mono <| sub x hx).tendsto\n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Ioo a b → g' x ≠ 0\nhfa : Tendsto f (𝓝[Ioi a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Ioi a] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Ioi a] a) l\nsub : ∀ (x : ℝ), x ∈ Ioo a b → Ioo a x ⊆ Ioo a b\nx : ℝ\nhx : x ∈ Ioo a b\nh : g x = 0\n⊢ Tendsto g (𝓝[Iio x] x) (𝓝 0)\n[PROOFSTEP]\nrw [← h, ← nhdsWithin_Ioo_eq_nhdsWithin_Iio hx.1]\n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Ioo a b → g' x ≠ 0\nhfa : Tendsto f (𝓝[Ioi a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Ioi a] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Ioi a] a) l\nsub : ∀ (x : ℝ), x ∈ Ioo a b → Ioo a x ⊆ Ioo a b\nx : ℝ\nhx : x ∈ Ioo a b\nh : g x = 0\n⊢ Tendsto g (𝓝[Ioo a x] x) (𝓝 (g x))\n[PROOFSTEP]\nexact ((hgg' x hx).continuousAt.continuousWithinAt.mono <| sub x hx).tendsto\n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Ioo a b → g' x ≠ 0\nhfa : Tendsto f (𝓝[Ioi a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Ioi a] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Ioi a] a) l\nsub : ∀ (x : ℝ), x ∈ Ioo a b → Ioo a x ⊆ Ioo a b\nx : ℝ\nhx : x ∈ Ioo a b\nh : g x = 0\nthis : Tendsto g (𝓝[Iio x] x) (𝓝 0)\n⊢ False\n[PROOFSTEP]\nobtain ⟨y, hyx, hy⟩ : ∃ c ∈ Ioo a x, g' c = 0\n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Ioo a b → g' x ≠ 0\nhfa : Tendsto f (𝓝[Ioi a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Ioi a] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Ioi a] a) l\nsub : ∀ (x : ℝ), x ∈ Ioo a b → Ioo a x ⊆ Ioo a b\nx : ℝ\nhx : x ∈ Ioo a b\nh : g x = 0\nthis : Tendsto g (𝓝[Iio x] x) (𝓝 0)\n⊢ ∃ c, c ∈ Ioo a x ∧ g' c = 0\ncase intro.intro\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Ioo a b → g' x ≠ 0\nhfa : Tendsto f (𝓝[Ioi a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Ioi a] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Ioi a] a) l\nsub : ∀ (x : ℝ), x ∈ Ioo a b → Ioo a x ⊆ Ioo a b\nx : ℝ\nhx : x ∈ Ioo a b\nh : g x = 0\nthis : Tendsto g (𝓝[Iio x] x) (𝓝 0)\ny : ℝ\nhyx : y ∈ Ioo a x\nhy : g' y = 0\n⊢ False\n[PROOFSTEP]\nexact exists_hasDerivAt_eq_zero' hx.1 hga this fun y hy => hgg' y <| sub x hx hy\n[GOAL]\ncase intro.intro\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Ioo a b → g' x ≠ 0\nhfa : Tendsto f (𝓝[Ioi a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Ioi a] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Ioi a] a) l\nsub : ∀ (x : ℝ), x ∈ Ioo a b → Ioo a x ⊆ Ioo a b\nx : ℝ\nhx : x ∈ Ioo a b\nh : g x = 0\nthis : Tendsto g (𝓝[Iio x] x) (𝓝 0)\ny : ℝ\nhyx : y ∈ Ioo a x\nhy : g' y = 0\n⊢ False\n[PROOFSTEP]\nexact hg' y (sub x hx hyx) hy\n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Ioo a b → g' x ≠ 0\nhfa : Tendsto f (𝓝[Ioi a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Ioi a] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Ioi a] a) l\nsub : ∀ (x : ℝ), x ∈ Ioo a b → Ioo a x ⊆ Ioo a b\nhg : ∀ (x : ℝ), x ∈ Ioo a b → g x ≠ 0\n⊢ Tendsto (fun x => f x / g x) (𝓝[Ioi a] a) l\n[PROOFSTEP]\nhave : ∀ x ∈ Ioo a b, ∃ c ∈ Ioo a x, f x * g' c = g x * f' c :=\n  by\n  intro x hx\n  rw [← sub_zero (f x), ← sub_zero (g x)]\n  exact\n    exists_ratio_hasDerivAt_eq_ratio_slope' g g' hx.1 f f' (fun y hy => hgg' y <| sub x hx hy)\n      (fun y hy => hff' y <| sub x hx hy) hga hfa (tendsto_nhdsWithin_of_tendsto_nhds (hgg' x hx).continuousAt.tendsto)\n      (tendsto_nhdsWithin_of_tendsto_nhds (hff' x hx).continuousAt.tendsto)\n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Ioo a b → g' x ≠ 0\nhfa : Tendsto f (𝓝[Ioi a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Ioi a] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Ioi a] a) l\nsub : ∀ (x : ℝ), x ∈ Ioo a b → Ioo a x ⊆ Ioo a b\nhg : ∀ (x : ℝ), x ∈ Ioo a b → g x ≠ 0\n⊢ ∀ (x : ℝ), x ∈ Ioo a b → ∃ c, c ∈ Ioo a x ∧ f x * g' c = g x * f' c\n[PROOFSTEP]\nintro x hx\n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Ioo a b → g' x ≠ 0\nhfa : Tendsto f (𝓝[Ioi a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Ioi a] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Ioi a] a) l\nsub : ∀ (x : ℝ), x ∈ Ioo a b → Ioo a x ⊆ Ioo a b\nhg : ∀ (x : ℝ), x ∈ Ioo a b → g x ≠ 0\nx : ℝ\nhx : x ∈ Ioo a b\n⊢ ∃ c, c ∈ Ioo a x ∧ f x * g' c = g x * f' c\n[PROOFSTEP]\nrw [← sub_zero (f x), ← sub_zero (g x)]\n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Ioo a b → g' x ≠ 0\nhfa : Tendsto f (𝓝[Ioi a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Ioi a] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Ioi a] a) l\nsub : ∀ (x : ℝ), x ∈ Ioo a b → Ioo a x ⊆ Ioo a b\nhg : ∀ (x : ℝ), x ∈ Ioo a b → g x ≠ 0\nx : ℝ\nhx : x ∈ Ioo a b\n⊢ ∃ c, c ∈ Ioo a x ∧ (f x - 0) * g' c = (g x - 0) * f' c\n[PROOFSTEP]\nexact\n  exists_ratio_hasDerivAt_eq_ratio_slope' g g' hx.1 f f' (fun y hy => hgg' y <| sub x hx hy)\n    (fun y hy => hff' y <| sub x hx hy) hga hfa (tendsto_nhdsWithin_of_tendsto_nhds (hgg' x hx).continuousAt.tendsto)\n    (tendsto_nhdsWithin_of_tendsto_nhds (hff' x hx).continuousAt.tendsto)\n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Ioo a b → g' x ≠ 0\nhfa : Tendsto f (𝓝[Ioi a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Ioi a] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Ioi a] a) l\nsub : ∀ (x : ℝ), x ∈ Ioo a b → Ioo a x ⊆ Ioo a b\nhg : ∀ (x : ℝ), x ∈ Ioo a b → g x ≠ 0\nthis : ∀ (x : ℝ), x ∈ Ioo a b → ∃ c, c ∈ Ioo a x ∧ f x * g' c = g x * f' c\n⊢ Tendsto (fun x => f x / g x) (𝓝[Ioi a] a) l\n[PROOFSTEP]\nchoose! c hc using this\n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Ioo a b → g' x ≠ 0\nhfa : Tendsto f (𝓝[Ioi a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Ioi a] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Ioi a] a) l\nsub : ∀ (x : ℝ), x ∈ Ioo a b → Ioo a x ⊆ Ioo a b\nhg : ∀ (x : ℝ), x ∈ Ioo a b → g x ≠ 0\nc : ℝ → ℝ\nhc : ∀ (x : ℝ), x ∈ Ioo a b → c x ∈ Ioo a x ∧ f x * g' (c x) = g x * f' (c x)\n⊢ Tendsto (fun x => f x / g x) (𝓝[Ioi a] a) l\n[PROOFSTEP]\nhave : ∀ x ∈ Ioo a b, ((fun x' => f' x' / g' x') ∘ c) x = f x / g x :=\n  by\n  intro x hx\n  rcases hc x hx with ⟨h₁, h₂⟩\n  field_simp [hg x hx, hg' (c x) ((sub x hx) h₁)]\n  simp only [h₂]\n  rw [mul_comm]\n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Ioo a b → g' x ≠ 0\nhfa : Tendsto f (𝓝[Ioi a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Ioi a] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Ioi a] a) l\nsub : ∀ (x : ℝ), x ∈ Ioo a b → Ioo a x ⊆ Ioo a b\nhg : ∀ (x : ℝ), x ∈ Ioo a b → g x ≠ 0\nc : ℝ → ℝ\nhc : ∀ (x : ℝ), x ∈ Ioo a b → c x ∈ Ioo a x ∧ f x * g' (c x) = g x * f' (c x)\n⊢ ∀ (x : ℝ), x ∈ Ioo a b → ((fun x' => f' x' / g' x') ∘ c) x = f x / g x\n[PROOFSTEP]\nintro x hx\n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Ioo a b → g' x ≠ 0\nhfa : Tendsto f (𝓝[Ioi a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Ioi a] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Ioi a] a) l\nsub : ∀ (x : ℝ), x ∈ Ioo a b → Ioo a x ⊆ Ioo a b\nhg : ∀ (x : ℝ), x ∈ Ioo a b → g x ≠ 0\nc : ℝ → ℝ\nhc : ∀ (x : ℝ), x ∈ Ioo a b → c x ∈ Ioo a x ∧ f x * g' (c x) = g x * f' (c x)\nx : ℝ\nhx : x ∈ Ioo a b\n⊢ ((fun x' => f' x' / g' x') ∘ c) x = f x / g x\n[PROOFSTEP]\nrcases hc x hx with ⟨h₁, h₂⟩\n[GOAL]\ncase intro\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Ioo a b → g' x ≠ 0\nhfa : Tendsto f (𝓝[Ioi a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Ioi a] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Ioi a] a) l\nsub : ∀ (x : ℝ), x ∈ Ioo a b → Ioo a x ⊆ Ioo a b\nhg : ∀ (x : ℝ), x ∈ Ioo a b → g x ≠ 0\nc : ℝ → ℝ\nhc : ∀ (x : ℝ), x ∈ Ioo a b → c x ∈ Ioo a x ∧ f x * g' (c x) = g x * f' (c x)\nx : ℝ\nhx : x ∈ Ioo a b\nh₁ : c x ∈ Ioo a x\nh₂ : f x * g' (c x) = g x * f' (c x)\n⊢ ((fun x' => f' x' / g' x') ∘ c) x = f x / g x\n[PROOFSTEP]\nfield_simp [hg x hx, hg' (c x) ((sub x hx) h₁)]\n[GOAL]\ncase intro\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Ioo a b → g' x ≠ 0\nhfa : Tendsto f (𝓝[Ioi a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Ioi a] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Ioi a] a) l\nsub : ∀ (x : ℝ), x ∈ Ioo a b → Ioo a x ⊆ Ioo a b\nhg : ∀ (x : ℝ), x ∈ Ioo a b → g x ≠ 0\nc : ℝ → ℝ\nhc : ∀ (x : ℝ), x ∈ Ioo a b → c x ∈ Ioo a x ∧ f x * g' (c x) = g x * f' (c x)\nx : ℝ\nhx : x ∈ Ioo a b\nh₁ : c x ∈ Ioo a x\nh₂ : f x * g' (c x) = g x * f' (c x)\n⊢ f' (c x) * g x = f x * g' (c x)\n[PROOFSTEP]\nsimp only [h₂]\n[GOAL]\ncase intro\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Ioo a b → g' x ≠ 0\nhfa : Tendsto f (𝓝[Ioi a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Ioi a] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Ioi a] a) l\nsub : ∀ (x : ℝ), x ∈ Ioo a b → Ioo a x ⊆ Ioo a b\nhg : ∀ (x : ℝ), x ∈ Ioo a b → g x ≠ 0\nc : ℝ → ℝ\nhc : ∀ (x : ℝ), x ∈ Ioo a b → c x ∈ Ioo a x ∧ f x * g' (c x) = g x * f' (c x)\nx : ℝ\nhx : x ∈ Ioo a b\nh₁ : c x ∈ Ioo a x\nh₂ : f x * g' (c x) = g x * f' (c x)\n⊢ f' (c x) * g x = g x * f' (c x)\n[PROOFSTEP]\nrw [mul_comm]\n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Ioo a b → g' x ≠ 0\nhfa : Tendsto f (𝓝[Ioi a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Ioi a] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Ioi a] a) l\nsub : ∀ (x : ℝ), x ∈ Ioo a b → Ioo a x ⊆ Ioo a b\nhg : ∀ (x : ℝ), x ∈ Ioo a b → g x ≠ 0\nc : ℝ → ℝ\nhc : ∀ (x : ℝ), x ∈ Ioo a b → c x ∈ Ioo a x ∧ f x * g' (c x) = g x * f' (c x)\nthis : ∀ (x : ℝ), x ∈ Ioo a b → ((fun x' => f' x' / g' x') ∘ c) x = f x / g x\n⊢ Tendsto (fun x => f x / g x) (𝓝[Ioi a] a) l\n[PROOFSTEP]\nhave cmp : ∀ x ∈ Ioo a b, a < c x ∧ c x < x := fun x hx => (hc x hx).1\n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Ioo a b → g' x ≠ 0\nhfa : Tendsto f (𝓝[Ioi a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Ioi a] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Ioi a] a) l\nsub : ∀ (x : ℝ), x ∈ Ioo a b → Ioo a x ⊆ Ioo a b\nhg : ∀ (x : ℝ), x ∈ Ioo a b → g x ≠ 0\nc : ℝ → ℝ\nhc : ∀ (x : ℝ), x ∈ Ioo a b → c x ∈ Ioo a x ∧ f x * g' (c x) = g x * f' (c x)\nthis : ∀ (x : ℝ), x ∈ Ioo a b → ((fun x' => f' x' / g' x') ∘ c) x = f x / g x\ncmp : ∀ (x : ℝ), x ∈ Ioo a b → a < c x ∧ c x < x\n⊢ Tendsto (fun x => f x / g x) (𝓝[Ioi a] a) l\n[PROOFSTEP]\nrw [← nhdsWithin_Ioo_eq_nhdsWithin_Ioi hab]\n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Ioo a b → g' x ≠ 0\nhfa : Tendsto f (𝓝[Ioi a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Ioi a] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Ioi a] a) l\nsub : ∀ (x : ℝ), x ∈ Ioo a b → Ioo a x ⊆ Ioo a b\nhg : ∀ (x : ℝ), x ∈ Ioo a b → g x ≠ 0\nc : ℝ → ℝ\nhc : ∀ (x : ℝ), x ∈ Ioo a b → c x ∈ Ioo a x ∧ f x * g' (c x) = g x * f' (c x)\nthis : ∀ (x : ℝ), x ∈ Ioo a b → ((fun x' => f' x' / g' x') ∘ c) x = f x / g x\ncmp : ∀ (x : ℝ), x ∈ Ioo a b → a < c x ∧ c x < x\n⊢ Tendsto (fun x => f x / g x) (𝓝[Ioo a b] a) l\n[PROOFSTEP]\napply tendsto_nhdsWithin_congr this\n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Ioo a b → g' x ≠ 0\nhfa : Tendsto f (𝓝[Ioi a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Ioi a] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Ioi a] a) l\nsub : ∀ (x : ℝ), x ∈ Ioo a b → Ioo a x ⊆ Ioo a b\nhg : ∀ (x : ℝ), x ∈ Ioo a b → g x ≠ 0\nc : ℝ → ℝ\nhc : ∀ (x : ℝ), x ∈ Ioo a b → c x ∈ Ioo a x ∧ f x * g' (c x) = g x * f' (c x)\nthis : ∀ (x : ℝ), x ∈ Ioo a b → ((fun x' => f' x' / g' x') ∘ c) x = f x / g x\ncmp : ∀ (x : ℝ), x ∈ Ioo a b → a < c x ∧ c x < x\n⊢ Tendsto (fun x => ((fun x' => f' x' / g' x') ∘ c) x) (𝓝[Ioo a b] a) l\n[PROOFSTEP]\napply hdiv.comp\n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Ioo a b → g' x ≠ 0\nhfa : Tendsto f (𝓝[Ioi a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Ioi a] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Ioi a] a) l\nsub : ∀ (x : ℝ), x ∈ Ioo a b → Ioo a x ⊆ Ioo a b\nhg : ∀ (x : ℝ), x ∈ Ioo a b → g x ≠ 0\nc : ℝ → ℝ\nhc : ∀ (x : ℝ), x ∈ Ioo a b → c x ∈ Ioo a x ∧ f x * g' (c x) = g x * f' (c x)\nthis : ∀ (x : ℝ), x ∈ Ioo a b → ((fun x' => f' x' / g' x') ∘ c) x = f x / g x\ncmp : ∀ (x : ℝ), x ∈ Ioo a b → a < c x ∧ c x < x\n⊢ Tendsto c (𝓝[Ioo a b] a) (𝓝[Ioi a] a)\n[PROOFSTEP]\nrefine'\n  tendsto_nhdsWithin_of_tendsto_nhds_of_eventually_within _\n    (tendsto_of_tendsto_of_tendsto_of_le_of_le' tendsto_const_nhds (tendsto_nhdsWithin_of_tendsto_nhds tendsto_id) _ _)\n    _\n[GOAL]\ncase refine'_1\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Ioo a b → g' x ≠ 0\nhfa : Tendsto f (𝓝[Ioi a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Ioi a] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Ioi a] a) l\nsub : ∀ (x : ℝ), x ∈ Ioo a b → Ioo a x ⊆ Ioo a b\nhg : ∀ (x : ℝ), x ∈ Ioo a b → g x ≠ 0\nc : ℝ → ℝ\nhc : ∀ (x : ℝ), x ∈ Ioo a b → c x ∈ Ioo a x ∧ f x * g' (c x) = g x * f' (c x)\nthis : ∀ (x : ℝ), x ∈ Ioo a b → ((fun x' => f' x' / g' x') ∘ c) x = f x / g x\ncmp : ∀ (x : ℝ), x ∈ Ioo a b → a < c x ∧ c x < x\n⊢ ∀ᶠ (b : ℝ) in 𝓝[Ioo a b] a, a ≤ c b\ncase refine'_2\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Ioo a b → g' x ≠ 0\nhfa : Tendsto f (𝓝[Ioi a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Ioi a] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Ioi a] a) l\nsub : ∀ (x : ℝ), x ∈ Ioo a b → Ioo a x ⊆ Ioo a b\nhg : ∀ (x : ℝ), x ∈ Ioo a b → g x ≠ 0\nc : ℝ → ℝ\nhc : ∀ (x : ℝ), x ∈ Ioo a b → c x ∈ Ioo a x ∧ f x * g' (c x) = g x * f' (c x)\nthis : ∀ (x : ℝ), x ∈ Ioo a b → ((fun x' => f' x' / g' x') ∘ c) x = f x / g x\ncmp : ∀ (x : ℝ), x ∈ Ioo a b → a < c x ∧ c x < x\n⊢ ∀ᶠ (b : ℝ) in 𝓝[Ioo a b] a, c b ≤ id b\ncase refine'_3\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Ioo a b → g' x ≠ 0\nhfa : Tendsto f (𝓝[Ioi a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Ioi a] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Ioi a] a) l\nsub : ∀ (x : ℝ), x ∈ Ioo a b → Ioo a x ⊆ Ioo a b\nhg : ∀ (x : ℝ), x ∈ Ioo a b → g x ≠ 0\nc : ℝ → ℝ\nhc : ∀ (x : ℝ), x ∈ Ioo a b → c x ∈ Ioo a x ∧ f x * g' (c x) = g x * f' (c x)\nthis : ∀ (x : ℝ), x ∈ Ioo a b → ((fun x' => f' x' / g' x') ∘ c) x = f x / g x\ncmp : ∀ (x : ℝ), x ∈ Ioo a b → a < c x ∧ c x < x\n⊢ ∀ᶠ (x : ℝ) in 𝓝[Ioo a b] a, c x ∈ Ioi a\n[PROOFSTEP]\nall_goals\n  apply eventually_nhdsWithin_of_forall\n  intro x hx\n  have := cmp x hx\n  try simp\n  linarith [this]\n[GOAL]\ncase refine'_1\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Ioo a b → g' x ≠ 0\nhfa : Tendsto f (𝓝[Ioi a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Ioi a] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Ioi a] a) l\nsub : ∀ (x : ℝ), x ∈ Ioo a b → Ioo a x ⊆ Ioo a b\nhg : ∀ (x : ℝ), x ∈ Ioo a b → g x ≠ 0\nc : ℝ → ℝ\nhc : ∀ (x : ℝ), x ∈ Ioo a b → c x ∈ Ioo a x ∧ f x * g' (c x) = g x * f' (c x)\nthis : ∀ (x : ℝ), x ∈ Ioo a b → ((fun x' => f' x' / g' x') ∘ c) x = f x / g x\ncmp : ∀ (x : ℝ), x ∈ Ioo a b → a < c x ∧ c x < x\n⊢ ∀ᶠ (b : ℝ) in 𝓝[Ioo a b] a, a ≤ c b\n[PROOFSTEP]\napply eventually_nhdsWithin_of_forall\n[GOAL]\ncase refine'_1.h\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Ioo a b → g' x ≠ 0\nhfa : Tendsto f (𝓝[Ioi a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Ioi a] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Ioi a] a) l\nsub : ∀ (x : ℝ), x ∈ Ioo a b → Ioo a x ⊆ Ioo a b\nhg : ∀ (x : ℝ), x ∈ Ioo a b → g x ≠ 0\nc : ℝ → ℝ\nhc : ∀ (x : ℝ), x ∈ Ioo a b → c x ∈ Ioo a x ∧ f x * g' (c x) = g x * f' (c x)\nthis : ∀ (x : ℝ), x ∈ Ioo a b → ((fun x' => f' x' / g' x') ∘ c) x = f x / g x\ncmp : ∀ (x : ℝ), x ∈ Ioo a b → a < c x ∧ c x < x\n⊢ ∀ (x : ℝ), x ∈ Ioo a b → a ≤ c x\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase refine'_1.h\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Ioo a b → g' x ≠ 0\nhfa : Tendsto f (𝓝[Ioi a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Ioi a] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Ioi a] a) l\nsub : ∀ (x : ℝ), x ∈ Ioo a b → Ioo a x ⊆ Ioo a b\nhg : ∀ (x : ℝ), x ∈ Ioo a b → g x ≠ 0\nc : ℝ → ℝ\nhc : ∀ (x : ℝ), x ∈ Ioo a b → c x ∈ Ioo a x ∧ f x * g' (c x) = g x * f' (c x)\nthis : ∀ (x : ℝ), x ∈ Ioo a b → ((fun x' => f' x' / g' x') ∘ c) x = f x / g x\ncmp : ∀ (x : ℝ), x ∈ Ioo a b → a < c x ∧ c x < x\nx : ℝ\nhx : x ∈ Ioo a b\n⊢ a ≤ c x\n[PROOFSTEP]\nhave := cmp x hx\n[GOAL]\ncase refine'_1.h\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Ioo a b → g' x ≠ 0\nhfa : Tendsto f (𝓝[Ioi a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Ioi a] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Ioi a] a) l\nsub : ∀ (x : ℝ), x ∈ Ioo a b → Ioo a x ⊆ Ioo a b\nhg : ∀ (x : ℝ), x ∈ Ioo a b → g x ≠ 0\nc : ℝ → ℝ\nhc : ∀ (x : ℝ), x ∈ Ioo a b → c x ∈ Ioo a x ∧ f x * g' (c x) = g x * f' (c x)\nthis✝ : ∀ (x : ℝ), x ∈ Ioo a b → ((fun x' => f' x' / g' x') ∘ c) x = f x / g x\ncmp : ∀ (x : ℝ), x ∈ Ioo a b → a < c x ∧ c x < x\nx : ℝ\nhx : x ∈ Ioo a b\nthis : a < c x ∧ c x < x\n⊢ a ≤ c x\n[PROOFSTEP]\ntry simp\n[GOAL]\ncase refine'_1.h\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Ioo a b → g' x ≠ 0\nhfa : Tendsto f (𝓝[Ioi a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Ioi a] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Ioi a] a) l\nsub : ∀ (x : ℝ), x ∈ Ioo a b → Ioo a x ⊆ Ioo a b\nhg : ∀ (x : ℝ), x ∈ Ioo a b → g x ≠ 0\nc : ℝ → ℝ\nhc : ∀ (x : ℝ), x ∈ Ioo a b → c x ∈ Ioo a x ∧ f x * g' (c x) = g x * f' (c x)\nthis✝ : ∀ (x : ℝ), x ∈ Ioo a b → ((fun x' => f' x' / g' x') ∘ c) x = f x / g x\ncmp : ∀ (x : ℝ), x ∈ Ioo a b → a < c x ∧ c x < x\nx : ℝ\nhx : x ∈ Ioo a b\nthis : a < c x ∧ c x < x\n⊢ a ≤ c x\n[PROOFSTEP]\nsimp\n[GOAL]\ncase refine'_1.h\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Ioo a b → g' x ≠ 0\nhfa : Tendsto f (𝓝[Ioi a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Ioi a] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Ioi a] a) l\nsub : ∀ (x : ℝ), x ∈ Ioo a b → Ioo a x ⊆ Ioo a b\nhg : ∀ (x : ℝ), x ∈ Ioo a b → g x ≠ 0\nc : ℝ → ℝ\nhc : ∀ (x : ℝ), x ∈ Ioo a b → c x ∈ Ioo a x ∧ f x * g' (c x) = g x * f' (c x)\nthis✝ : ∀ (x : ℝ), x ∈ Ioo a b → ((fun x' => f' x' / g' x') ∘ c) x = f x / g x\ncmp : ∀ (x : ℝ), x ∈ Ioo a b → a < c x ∧ c x < x\nx : ℝ\nhx : x ∈ Ioo a b\nthis : a < c x ∧ c x < x\n⊢ a ≤ c x\n[PROOFSTEP]\nlinarith [this]\n[GOAL]\ncase refine'_2\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Ioo a b → g' x ≠ 0\nhfa : Tendsto f (𝓝[Ioi a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Ioi a] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Ioi a] a) l\nsub : ∀ (x : ℝ), x ∈ Ioo a b → Ioo a x ⊆ Ioo a b\nhg : ∀ (x : ℝ), x ∈ Ioo a b → g x ≠ 0\nc : ℝ → ℝ\nhc : ∀ (x : ℝ), x ∈ Ioo a b → c x ∈ Ioo a x ∧ f x * g' (c x) = g x * f' (c x)\nthis : ∀ (x : ℝ), x ∈ Ioo a b → ((fun x' => f' x' / g' x') ∘ c) x = f x / g x\ncmp : ∀ (x : ℝ), x ∈ Ioo a b → a < c x ∧ c x < x\n⊢ ∀ᶠ (b : ℝ) in 𝓝[Ioo a b] a, c b ≤ id b\n[PROOFSTEP]\napply eventually_nhdsWithin_of_forall\n[GOAL]\ncase refine'_2.h\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Ioo a b → g' x ≠ 0\nhfa : Tendsto f (𝓝[Ioi a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Ioi a] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Ioi a] a) l\nsub : ∀ (x : ℝ), x ∈ Ioo a b → Ioo a x ⊆ Ioo a b\nhg : ∀ (x : ℝ), x ∈ Ioo a b → g x ≠ 0\nc : ℝ → ℝ\nhc : ∀ (x : ℝ), x ∈ Ioo a b → c x ∈ Ioo a x ∧ f x * g' (c x) = g x * f' (c x)\nthis : ∀ (x : ℝ), x ∈ Ioo a b → ((fun x' => f' x' / g' x') ∘ c) x = f x / g x\ncmp : ∀ (x : ℝ), x ∈ Ioo a b → a < c x ∧ c x < x\n⊢ ∀ (x : ℝ), x ∈ Ioo a b → c x ≤ id x\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase refine'_2.h\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Ioo a b → g' x ≠ 0\nhfa : Tendsto f (𝓝[Ioi a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Ioi a] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Ioi a] a) l\nsub : ∀ (x : ℝ), x ∈ Ioo a b → Ioo a x ⊆ Ioo a b\nhg : ∀ (x : ℝ), x ∈ Ioo a b → g x ≠ 0\nc : ℝ → ℝ\nhc : ∀ (x : ℝ), x ∈ Ioo a b → c x ∈ Ioo a x ∧ f x * g' (c x) = g x * f' (c x)\nthis : ∀ (x : ℝ), x ∈ Ioo a b → ((fun x' => f' x' / g' x') ∘ c) x = f x / g x\ncmp : ∀ (x : ℝ), x ∈ Ioo a b → a < c x ∧ c x < x\nx : ℝ\nhx : x ∈ Ioo a b\n⊢ c x ≤ id x\n[PROOFSTEP]\nhave := cmp x hx\n[GOAL]\ncase refine'_2.h\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Ioo a b → g' x ≠ 0\nhfa : Tendsto f (𝓝[Ioi a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Ioi a] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Ioi a] a) l\nsub : ∀ (x : ℝ), x ∈ Ioo a b → Ioo a x ⊆ Ioo a b\nhg : ∀ (x : ℝ), x ∈ Ioo a b → g x ≠ 0\nc : ℝ → ℝ\nhc : ∀ (x : ℝ), x ∈ Ioo a b → c x ∈ Ioo a x ∧ f x * g' (c x) = g x * f' (c x)\nthis✝ : ∀ (x : ℝ), x ∈ Ioo a b → ((fun x' => f' x' / g' x') ∘ c) x = f x / g x\ncmp : ∀ (x : ℝ), x ∈ Ioo a b → a < c x ∧ c x < x\nx : ℝ\nhx : x ∈ Ioo a b\nthis : a < c x ∧ c x < x\n⊢ c x ≤ id x\n[PROOFSTEP]\ntry simp\n[GOAL]\ncase refine'_2.h\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Ioo a b → g' x ≠ 0\nhfa : Tendsto f (𝓝[Ioi a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Ioi a] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Ioi a] a) l\nsub : ∀ (x : ℝ), x ∈ Ioo a b → Ioo a x ⊆ Ioo a b\nhg : ∀ (x : ℝ), x ∈ Ioo a b → g x ≠ 0\nc : ℝ → ℝ\nhc : ∀ (x : ℝ), x ∈ Ioo a b → c x ∈ Ioo a x ∧ f x * g' (c x) = g x * f' (c x)\nthis✝ : ∀ (x : ℝ), x ∈ Ioo a b → ((fun x' => f' x' / g' x') ∘ c) x = f x / g x\ncmp : ∀ (x : ℝ), x ∈ Ioo a b → a < c x ∧ c x < x\nx : ℝ\nhx : x ∈ Ioo a b\nthis : a < c x ∧ c x < x\n⊢ c x ≤ id x\n[PROOFSTEP]\nsimp\n[GOAL]\ncase refine'_2.h\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Ioo a b → g' x ≠ 0\nhfa : Tendsto f (𝓝[Ioi a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Ioi a] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Ioi a] a) l\nsub : ∀ (x : ℝ), x ∈ Ioo a b → Ioo a x ⊆ Ioo a b\nhg : ∀ (x : ℝ), x ∈ Ioo a b → g x ≠ 0\nc : ℝ → ℝ\nhc : ∀ (x : ℝ), x ∈ Ioo a b → c x ∈ Ioo a x ∧ f x * g' (c x) = g x * f' (c x)\nthis✝ : ∀ (x : ℝ), x ∈ Ioo a b → ((fun x' => f' x' / g' x') ∘ c) x = f x / g x\ncmp : ∀ (x : ℝ), x ∈ Ioo a b → a < c x ∧ c x < x\nx : ℝ\nhx : x ∈ Ioo a b\nthis : a < c x ∧ c x < x\n⊢ c x ≤ x\n[PROOFSTEP]\nlinarith [this]\n[GOAL]\ncase refine'_3\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Ioo a b → g' x ≠ 0\nhfa : Tendsto f (𝓝[Ioi a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Ioi a] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Ioi a] a) l\nsub : ∀ (x : ℝ), x ∈ Ioo a b → Ioo a x ⊆ Ioo a b\nhg : ∀ (x : ℝ), x ∈ Ioo a b → g x ≠ 0\nc : ℝ → ℝ\nhc : ∀ (x : ℝ), x ∈ Ioo a b → c x ∈ Ioo a x ∧ f x * g' (c x) = g x * f' (c x)\nthis : ∀ (x : ℝ), x ∈ Ioo a b → ((fun x' => f' x' / g' x') ∘ c) x = f x / g x\ncmp : ∀ (x : ℝ), x ∈ Ioo a b → a < c x ∧ c x < x\n⊢ ∀ᶠ (x : ℝ) in 𝓝[Ioo a b] a, c x ∈ Ioi a\n[PROOFSTEP]\napply eventually_nhdsWithin_of_forall\n[GOAL]\ncase refine'_3.h\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Ioo a b → g' x ≠ 0\nhfa : Tendsto f (𝓝[Ioi a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Ioi a] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Ioi a] a) l\nsub : ∀ (x : ℝ), x ∈ Ioo a b → Ioo a x ⊆ Ioo a b\nhg : ∀ (x : ℝ), x ∈ Ioo a b → g x ≠ 0\nc : ℝ → ℝ\nhc : ∀ (x : ℝ), x ∈ Ioo a b → c x ∈ Ioo a x ∧ f x * g' (c x) = g x * f' (c x)\nthis : ∀ (x : ℝ), x ∈ Ioo a b → ((fun x' => f' x' / g' x') ∘ c) x = f x / g x\ncmp : ∀ (x : ℝ), x ∈ Ioo a b → a < c x ∧ c x < x\n⊢ ∀ (x : ℝ), x ∈ Ioo a b → c x ∈ Ioi a\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase refine'_3.h\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Ioo a b → g' x ≠ 0\nhfa : Tendsto f (𝓝[Ioi a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Ioi a] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Ioi a] a) l\nsub : ∀ (x : ℝ), x ∈ Ioo a b → Ioo a x ⊆ Ioo a b\nhg : ∀ (x : ℝ), x ∈ Ioo a b → g x ≠ 0\nc : ℝ → ℝ\nhc : ∀ (x : ℝ), x ∈ Ioo a b → c x ∈ Ioo a x ∧ f x * g' (c x) = g x * f' (c x)\nthis : ∀ (x : ℝ), x ∈ Ioo a b → ((fun x' => f' x' / g' x') ∘ c) x = f x / g x\ncmp : ∀ (x : ℝ), x ∈ Ioo a b → a < c x ∧ c x < x\nx : ℝ\nhx : x ∈ Ioo a b\n⊢ c x ∈ Ioi a\n[PROOFSTEP]\nhave := cmp x hx\n[GOAL]\ncase refine'_3.h\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Ioo a b → g' x ≠ 0\nhfa : Tendsto f (𝓝[Ioi a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Ioi a] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Ioi a] a) l\nsub : ∀ (x : ℝ), x ∈ Ioo a b → Ioo a x ⊆ Ioo a b\nhg : ∀ (x : ℝ), x ∈ Ioo a b → g x ≠ 0\nc : ℝ → ℝ\nhc : ∀ (x : ℝ), x ∈ Ioo a b → c x ∈ Ioo a x ∧ f x * g' (c x) = g x * f' (c x)\nthis✝ : ∀ (x : ℝ), x ∈ Ioo a b → ((fun x' => f' x' / g' x') ∘ c) x = f x / g x\ncmp : ∀ (x : ℝ), x ∈ Ioo a b → a < c x ∧ c x < x\nx : ℝ\nhx : x ∈ Ioo a b\nthis : a < c x ∧ c x < x\n⊢ c x ∈ Ioi a\n[PROOFSTEP]\ntry simp\n[GOAL]\ncase refine'_3.h\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Ioo a b → g' x ≠ 0\nhfa : Tendsto f (𝓝[Ioi a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Ioi a] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Ioi a] a) l\nsub : ∀ (x : ℝ), x ∈ Ioo a b → Ioo a x ⊆ Ioo a b\nhg : ∀ (x : ℝ), x ∈ Ioo a b → g x ≠ 0\nc : ℝ → ℝ\nhc : ∀ (x : ℝ), x ∈ Ioo a b → c x ∈ Ioo a x ∧ f x * g' (c x) = g x * f' (c x)\nthis✝ : ∀ (x : ℝ), x ∈ Ioo a b → ((fun x' => f' x' / g' x') ∘ c) x = f x / g x\ncmp : ∀ (x : ℝ), x ∈ Ioo a b → a < c x ∧ c x < x\nx : ℝ\nhx : x ∈ Ioo a b\nthis : a < c x ∧ c x < x\n⊢ c x ∈ Ioi a\n[PROOFSTEP]\nsimp\n[GOAL]\ncase refine'_3.h\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Ioo a b → g' x ≠ 0\nhfa : Tendsto f (𝓝[Ioi a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Ioi a] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Ioi a] a) l\nsub : ∀ (x : ℝ), x ∈ Ioo a b → Ioo a x ⊆ Ioo a b\nhg : ∀ (x : ℝ), x ∈ Ioo a b → g x ≠ 0\nc : ℝ → ℝ\nhc : ∀ (x : ℝ), x ∈ Ioo a b → c x ∈ Ioo a x ∧ f x * g' (c x) = g x * f' (c x)\nthis✝ : ∀ (x : ℝ), x ∈ Ioo a b → ((fun x' => f' x' / g' x') ∘ c) x = f x / g x\ncmp : ∀ (x : ℝ), x ∈ Ioo a b → a < c x ∧ c x < x\nx : ℝ\nhx : x ∈ Ioo a b\nthis : a < c x ∧ c x < x\n⊢ a < c x\n[PROOFSTEP]\nlinarith [this]\n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhcf : ContinuousOn f (Ico a b)\nhcg : ContinuousOn g (Ico a b)\nhg' : ∀ (x : ℝ), x ∈ Ioo a b → g' x ≠ 0\nhfa : f a = 0\nhga : g a = 0\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Ioi a] a) l\n⊢ Tendsto (fun x => f x / g x) (𝓝[Ioi a] a) l\n[PROOFSTEP]\nrefine' lhopital_zero_right_on_Ioo hab hff' hgg' hg' _ _ hdiv\n[GOAL]\ncase refine'_1\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhcf : ContinuousOn f (Ico a b)\nhcg : ContinuousOn g (Ico a b)\nhg' : ∀ (x : ℝ), x ∈ Ioo a b → g' x ≠ 0\nhfa : f a = 0\nhga : g a = 0\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Ioi a] a) l\n⊢ Tendsto (fun x => f x) (𝓝[Ioi a] a) (𝓝 0)\n[PROOFSTEP]\nrw [← hfa, ← nhdsWithin_Ioo_eq_nhdsWithin_Ioi hab]\n[GOAL]\ncase refine'_1\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhcf : ContinuousOn f (Ico a b)\nhcg : ContinuousOn g (Ico a b)\nhg' : ∀ (x : ℝ), x ∈ Ioo a b → g' x ≠ 0\nhfa : f a = 0\nhga : g a = 0\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Ioi a] a) l\n⊢ Tendsto (fun x => f x) (𝓝[Ioo a b] a) (𝓝 (f a))\n[PROOFSTEP]\nexact ((hcf a <| left_mem_Ico.mpr hab).mono Ioo_subset_Ico_self).tendsto\n[GOAL]\ncase refine'_2\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhcf : ContinuousOn f (Ico a b)\nhcg : ContinuousOn g (Ico a b)\nhg' : ∀ (x : ℝ), x ∈ Ioo a b → g' x ≠ 0\nhfa : f a = 0\nhga : g a = 0\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Ioi a] a) l\n⊢ Tendsto (fun x => g x) (𝓝[Ioi a] a) (𝓝 0)\n[PROOFSTEP]\nrw [← hga, ← nhdsWithin_Ioo_eq_nhdsWithin_Ioi hab]\n[GOAL]\ncase refine'_2\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhcf : ContinuousOn f (Ico a b)\nhcg : ContinuousOn g (Ico a b)\nhg' : ∀ (x : ℝ), x ∈ Ioo a b → g' x ≠ 0\nhfa : f a = 0\nhga : g a = 0\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Ioi a] a) l\n⊢ Tendsto (fun x => g x) (𝓝[Ioo a b] a) (𝓝 (g a))\n[PROOFSTEP]\nexact ((hcg a <| left_mem_Ico.mpr hab).mono Ioo_subset_Ico_self).tendsto\n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Ioo a b → g' x ≠ 0\nhfb : Tendsto f (𝓝[Iio b] b) (𝓝 0)\nhgb : Tendsto g (𝓝[Iio b] b) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Iio b] b) l\n⊢ Tendsto (fun x => f x / g x) (𝓝[Iio b] b) l\n[PROOFSTEP]\nhave hdnf : ∀ x ∈ -Ioo a b, HasDerivAt (f ∘ Neg.neg) (f' (-x) * -1) x := fun x hx =>\n  comp x (hff' (-x) hx) (hasDerivAt_neg x)\n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Ioo a b → g' x ≠ 0\nhfb : Tendsto f (𝓝[Iio b] b) (𝓝 0)\nhgb : Tendsto g (𝓝[Iio b] b) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Iio b] b) l\nhdnf : ∀ (x : ℝ), x ∈ -Ioo a b → HasDerivAt (f ∘ Neg.neg) (f' (-x) * -1) x\n⊢ Tendsto (fun x => f x / g x) (𝓝[Iio b] b) l\n[PROOFSTEP]\nhave hdng : ∀ x ∈ -Ioo a b, HasDerivAt (g ∘ Neg.neg) (g' (-x) * -1) x := fun x hx =>\n  comp x (hgg' (-x) hx) (hasDerivAt_neg x)\n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Ioo a b → g' x ≠ 0\nhfb : Tendsto f (𝓝[Iio b] b) (𝓝 0)\nhgb : Tendsto g (𝓝[Iio b] b) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Iio b] b) l\nhdnf : ∀ (x : ℝ), x ∈ -Ioo a b → HasDerivAt (f ∘ Neg.neg) (f' (-x) * -1) x\nhdng : ∀ (x : ℝ), x ∈ -Ioo a b → HasDerivAt (g ∘ Neg.neg) (g' (-x) * -1) x\n⊢ Tendsto (fun x => f x / g x) (𝓝[Iio b] b) l\n[PROOFSTEP]\nrw [preimage_neg_Ioo] at hdnf \n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Ioo a b → g' x ≠ 0\nhfb : Tendsto f (𝓝[Iio b] b) (𝓝 0)\nhgb : Tendsto g (𝓝[Iio b] b) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Iio b] b) l\nhdnf : ∀ (x : ℝ), x ∈ Ioo (-b) (-a) → HasDerivAt (f ∘ Neg.neg) (f' (-x) * -1) x\nhdng : ∀ (x : ℝ), x ∈ -Ioo a b → HasDerivAt (g ∘ Neg.neg) (g' (-x) * -1) x\n⊢ Tendsto (fun x => f x / g x) (𝓝[Iio b] b) l\n[PROOFSTEP]\nrw [preimage_neg_Ioo] at hdng \n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Ioo a b → g' x ≠ 0\nhfb : Tendsto f (𝓝[Iio b] b) (𝓝 0)\nhgb : Tendsto g (𝓝[Iio b] b) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Iio b] b) l\nhdnf : ∀ (x : ℝ), x ∈ Ioo (-b) (-a) → HasDerivAt (f ∘ Neg.neg) (f' (-x) * -1) x\nhdng : ∀ (x : ℝ), x ∈ Ioo (-b) (-a) → HasDerivAt (g ∘ Neg.neg) (g' (-x) * -1) x\n⊢ Tendsto (fun x => f x / g x) (𝓝[Iio b] b) l\n[PROOFSTEP]\nhave :=\n  lhopital_zero_right_on_Ioo (neg_lt_neg hab) hdnf hdng\n    (by\n      intro x hx h\n      apply hg' _ (by rw [← preimage_neg_Ioo] at hx ; exact hx)\n      rwa [mul_comm, ← neg_eq_neg_one_mul, neg_eq_zero] at h )\n    (hfb.comp tendsto_neg_nhdsWithin_Ioi_neg) (hgb.comp tendsto_neg_nhdsWithin_Ioi_neg)\n    (by\n      simp only [neg_div_neg_eq, mul_one, mul_neg]\n      exact (tendsto_congr fun x => rfl).mp (hdiv.comp tendsto_neg_nhdsWithin_Ioi_neg))\n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Ioo a b → g' x ≠ 0\nhfb : Tendsto f (𝓝[Iio b] b) (𝓝 0)\nhgb : Tendsto g (𝓝[Iio b] b) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Iio b] b) l\nhdnf : ∀ (x : ℝ), x ∈ Ioo (-b) (-a) → HasDerivAt (f ∘ Neg.neg) (f' (-x) * -1) x\nhdng : ∀ (x : ℝ), x ∈ Ioo (-b) (-a) → HasDerivAt (g ∘ Neg.neg) (g' (-x) * -1) x\n⊢ ∀ (x : ℝ), x ∈ Ioo (-b) (-a) → g' (-x) * -1 ≠ 0\n[PROOFSTEP]\nintro x hx h\n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Ioo a b → g' x ≠ 0\nhfb : Tendsto f (𝓝[Iio b] b) (𝓝 0)\nhgb : Tendsto g (𝓝[Iio b] b) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Iio b] b) l\nhdnf : ∀ (x : ℝ), x ∈ Ioo (-b) (-a) → HasDerivAt (f ∘ Neg.neg) (f' (-x) * -1) x\nhdng : ∀ (x : ℝ), x ∈ Ioo (-b) (-a) → HasDerivAt (g ∘ Neg.neg) (g' (-x) * -1) x\nx : ℝ\nhx : x ∈ Ioo (-b) (-a)\nh : g' (-x) * -1 = 0\n⊢ False\n[PROOFSTEP]\napply hg' _ (by rw [← preimage_neg_Ioo] at hx ; exact hx)\n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Ioo a b → g' x ≠ 0\nhfb : Tendsto f (𝓝[Iio b] b) (𝓝 0)\nhgb : Tendsto g (𝓝[Iio b] b) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Iio b] b) l\nhdnf : ∀ (x : ℝ), x ∈ Ioo (-b) (-a) → HasDerivAt (f ∘ Neg.neg) (f' (-x) * -1) x\nhdng : ∀ (x : ℝ), x ∈ Ioo (-b) (-a) → HasDerivAt (g ∘ Neg.neg) (g' (-x) * -1) x\nx : ℝ\nhx : x ∈ Ioo (-b) (-a)\nh : g' (-x) * -1 = 0\n⊢ ?m.13460 ∈ Ioo a b\n[PROOFSTEP]\nrw [← preimage_neg_Ioo] at hx \n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Ioo a b → g' x ≠ 0\nhfb : Tendsto f (𝓝[Iio b] b) (𝓝 0)\nhgb : Tendsto g (𝓝[Iio b] b) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Iio b] b) l\nhdnf : ∀ (x : ℝ), x ∈ Ioo (-b) (-a) → HasDerivAt (f ∘ Neg.neg) (f' (-x) * -1) x\nhdng : ∀ (x : ℝ), x ∈ Ioo (-b) (-a) → HasDerivAt (g ∘ Neg.neg) (g' (-x) * -1) x\nx : ℝ\nhx✝ : x ∈ Ioo (-b) (-a)\nhx : x ∈ -Ioo a b\nh : g' (-x) * -1 = 0\n⊢ ?m.13535 h ∈ Ioo a b\n[PROOFSTEP]\nexact hx\n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Ioo a b → g' x ≠ 0\nhfb : Tendsto f (𝓝[Iio b] b) (𝓝 0)\nhgb : Tendsto g (𝓝[Iio b] b) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Iio b] b) l\nhdnf : ∀ (x : ℝ), x ∈ Ioo (-b) (-a) → HasDerivAt (f ∘ Neg.neg) (f' (-x) * -1) x\nhdng : ∀ (x : ℝ), x ∈ Ioo (-b) (-a) → HasDerivAt (g ∘ Neg.neg) (g' (-x) * -1) x\nx : ℝ\nhx : x ∈ Ioo (-b) (-a)\nh : g' (-x) * -1 = 0\n⊢ g' (-x) = 0\n[PROOFSTEP]\nrwa [mul_comm, ← neg_eq_neg_one_mul, neg_eq_zero] at h \n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Ioo a b → g' x ≠ 0\nhfb : Tendsto f (𝓝[Iio b] b) (𝓝 0)\nhgb : Tendsto g (𝓝[Iio b] b) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Iio b] b) l\nhdnf : ∀ (x : ℝ), x ∈ Ioo (-b) (-a) → HasDerivAt (f ∘ Neg.neg) (f' (-x) * -1) x\nhdng : ∀ (x : ℝ), x ∈ Ioo (-b) (-a) → HasDerivAt (g ∘ Neg.neg) (g' (-x) * -1) x\n⊢ Tendsto (fun x => f' (-x) * -1 / (g' (-x) * -1)) (𝓝[Ioi (-b)] (-b)) ?m.13087\n[PROOFSTEP]\nsimp only [neg_div_neg_eq, mul_one, mul_neg]\n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Ioo a b → g' x ≠ 0\nhfb : Tendsto f (𝓝[Iio b] b) (𝓝 0)\nhgb : Tendsto g (𝓝[Iio b] b) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Iio b] b) l\nhdnf : ∀ (x : ℝ), x ∈ Ioo (-b) (-a) → HasDerivAt (f ∘ Neg.neg) (f' (-x) * -1) x\nhdng : ∀ (x : ℝ), x ∈ Ioo (-b) (-a) → HasDerivAt (g ∘ Neg.neg) (g' (-x) * -1) x\n⊢ Tendsto (fun x => f' (-x) / g' (-x)) (𝓝[Ioi (-b)] (-b)) ?m.13087\n[PROOFSTEP]\nexact (tendsto_congr fun x => rfl).mp (hdiv.comp tendsto_neg_nhdsWithin_Ioi_neg)\n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Ioo a b → g' x ≠ 0\nhfb : Tendsto f (𝓝[Iio b] b) (𝓝 0)\nhgb : Tendsto g (𝓝[Iio b] b) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Iio b] b) l\nhdnf : ∀ (x : ℝ), x ∈ Ioo (-b) (-a) → HasDerivAt (f ∘ Neg.neg) (f' (-x) * -1) x\nhdng : ∀ (x : ℝ), x ∈ Ioo (-b) (-a) → HasDerivAt (g ∘ Neg.neg) (g' (-x) * -1) x\nthis : Tendsto (fun x => (f ∘ Neg.neg) x / (g ∘ Neg.neg) x) (𝓝[Ioi (-b)] (-b)) l\n⊢ Tendsto (fun x => f x / g x) (𝓝[Iio b] b) l\n[PROOFSTEP]\nhave := this.comp tendsto_neg_nhdsWithin_Iio\n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Ioo a b → g' x ≠ 0\nhfb : Tendsto f (𝓝[Iio b] b) (𝓝 0)\nhgb : Tendsto g (𝓝[Iio b] b) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Iio b] b) l\nhdnf : ∀ (x : ℝ), x ∈ Ioo (-b) (-a) → HasDerivAt (f ∘ Neg.neg) (f' (-x) * -1) x\nhdng : ∀ (x : ℝ), x ∈ Ioo (-b) (-a) → HasDerivAt (g ∘ Neg.neg) (g' (-x) * -1) x\nthis✝ : Tendsto (fun x => (f ∘ Neg.neg) x / (g ∘ Neg.neg) x) (𝓝[Ioi (-b)] (-b)) l\nthis : Tendsto ((fun x => (f ∘ Neg.neg) x / (g ∘ Neg.neg) x) ∘ Neg.neg) (𝓝[Iio b] b) l\n⊢ Tendsto (fun x => f x / g x) (𝓝[Iio b] b) l\n[PROOFSTEP]\nunfold Function.comp at this \n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Ioo a b → g' x ≠ 0\nhfb : Tendsto f (𝓝[Iio b] b) (𝓝 0)\nhgb : Tendsto g (𝓝[Iio b] b) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Iio b] b) l\nhdnf : ∀ (x : ℝ), x ∈ Ioo (-b) (-a) → HasDerivAt (f ∘ Neg.neg) (f' (-x) * -1) x\nhdng : ∀ (x : ℝ), x ∈ Ioo (-b) (-a) → HasDerivAt (g ∘ Neg.neg) (g' (-x) * -1) x\nthis✝ : Tendsto (fun x => (f ∘ Neg.neg) x / (g ∘ Neg.neg) x) (𝓝[Ioi (-b)] (-b)) l\nthis : Tendsto (fun x => (fun x => f (-x) / g (-x)) (-x)) (𝓝[Iio b] b) l\n⊢ Tendsto (fun x => f x / g x) (𝓝[Iio b] b) l\n[PROOFSTEP]\nsimpa only [neg_neg]\n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhcf : ContinuousOn f (Ioc a b)\nhcg : ContinuousOn g (Ioc a b)\nhg' : ∀ (x : ℝ), x ∈ Ioo a b → g' x ≠ 0\nhfb : f b = 0\nhgb : g b = 0\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Iio b] b) l\n⊢ Tendsto (fun x => f x / g x) (𝓝[Iio b] b) l\n[PROOFSTEP]\nrefine' lhopital_zero_left_on_Ioo hab hff' hgg' hg' _ _ hdiv\n[GOAL]\ncase refine'_1\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhcf : ContinuousOn f (Ioc a b)\nhcg : ContinuousOn g (Ioc a b)\nhg' : ∀ (x : ℝ), x ∈ Ioo a b → g' x ≠ 0\nhfb : f b = 0\nhgb : g b = 0\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Iio b] b) l\n⊢ Tendsto (fun x => f x) (𝓝[Iio b] b) (𝓝 0)\n[PROOFSTEP]\nrw [← hfb, ← nhdsWithin_Ioo_eq_nhdsWithin_Iio hab]\n[GOAL]\ncase refine'_1\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhcf : ContinuousOn f (Ioc a b)\nhcg : ContinuousOn g (Ioc a b)\nhg' : ∀ (x : ℝ), x ∈ Ioo a b → g' x ≠ 0\nhfb : f b = 0\nhgb : g b = 0\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Iio b] b) l\n⊢ Tendsto (fun x => f x) (𝓝[Ioo a b] b) (𝓝 (f b))\n[PROOFSTEP]\nexact ((hcf b <| right_mem_Ioc.mpr hab).mono Ioo_subset_Ioc_self).tendsto\n[GOAL]\ncase refine'_2\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhcf : ContinuousOn f (Ioc a b)\nhcg : ContinuousOn g (Ioc a b)\nhg' : ∀ (x : ℝ), x ∈ Ioo a b → g' x ≠ 0\nhfb : f b = 0\nhgb : g b = 0\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Iio b] b) l\n⊢ Tendsto (fun x => g x) (𝓝[Iio b] b) (𝓝 0)\n[PROOFSTEP]\nrw [← hgb, ← nhdsWithin_Ioo_eq_nhdsWithin_Iio hab]\n[GOAL]\ncase refine'_2\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioo a b → HasDerivAt g (g' x) x\nhcf : ContinuousOn f (Ioc a b)\nhcg : ContinuousOn g (Ioc a b)\nhg' : ∀ (x : ℝ), x ∈ Ioo a b → g' x ≠ 0\nhfb : f b = 0\nhgb : g b = 0\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Iio b] b) l\n⊢ Tendsto (fun x => g x) (𝓝[Ioo a b] b) (𝓝 (g b))\n[PROOFSTEP]\nexact ((hcg b <| right_mem_Ioc.mpr hab).mono Ioo_subset_Ioc_self).tendsto\n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioi a → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioi a → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Ioi a → g' x ≠ 0\nhftop : Tendsto f atTop (𝓝 0)\nhgtop : Tendsto g atTop (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) atTop l\n⊢ Tendsto (fun x => f x / g x) atTop l\n[PROOFSTEP]\nobtain ⟨a', haa', ha'⟩ : ∃ a', a < a' ∧ 0 < a' :=\n  ⟨1 + max a 0, ⟨lt_of_le_of_lt (le_max_left a 0) (lt_one_add _), lt_of_le_of_lt (le_max_right a 0) (lt_one_add _)⟩⟩\n[GOAL]\ncase intro.intro\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioi a → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioi a → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Ioi a → g' x ≠ 0\nhftop : Tendsto f atTop (𝓝 0)\nhgtop : Tendsto g atTop (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) atTop l\na' : ℝ\nhaa' : a < a'\nha' : 0 < a'\n⊢ Tendsto (fun x => f x / g x) atTop l\n[PROOFSTEP]\nhave fact1 : ∀ x : ℝ, x ∈ Ioo 0 a'⁻¹ → x ≠ 0 := fun _ hx => (ne_of_lt hx.1).symm\n[GOAL]\ncase intro.intro\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioi a → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioi a → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Ioi a → g' x ≠ 0\nhftop : Tendsto f atTop (𝓝 0)\nhgtop : Tendsto g atTop (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) atTop l\na' : ℝ\nhaa' : a < a'\nha' : 0 < a'\nfact1 : ∀ (x : ℝ), x ∈ Ioo 0 a'⁻¹ → x ≠ 0\n⊢ Tendsto (fun x => f x / g x) atTop l\n[PROOFSTEP]\nhave fact2 : ∀ x ∈ Ioo 0 a'⁻¹, a < x⁻¹ := fun _ hx => lt_trans haa' ((lt_inv ha' hx.1).mpr hx.2)\n[GOAL]\ncase intro.intro\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioi a → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioi a → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Ioi a → g' x ≠ 0\nhftop : Tendsto f atTop (𝓝 0)\nhgtop : Tendsto g atTop (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) atTop l\na' : ℝ\nhaa' : a < a'\nha' : 0 < a'\nfact1 : ∀ (x : ℝ), x ∈ Ioo 0 a'⁻¹ → x ≠ 0\nfact2 : ∀ (x : ℝ), x ∈ Ioo 0 a'⁻¹ → a < x⁻¹\n⊢ Tendsto (fun x => f x / g x) atTop l\n[PROOFSTEP]\nhave hdnf : ∀ x ∈ Ioo 0 a'⁻¹, HasDerivAt (f ∘ Inv.inv) (f' x⁻¹ * -(x ^ 2)⁻¹) x := fun x hx =>\n  comp x (hff' x⁻¹ <| fact2 x hx) (hasDerivAt_inv <| fact1 x hx)\n[GOAL]\ncase intro.intro\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioi a → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioi a → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Ioi a → g' x ≠ 0\nhftop : Tendsto f atTop (𝓝 0)\nhgtop : Tendsto g atTop (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) atTop l\na' : ℝ\nhaa' : a < a'\nha' : 0 < a'\nfact1 : ∀ (x : ℝ), x ∈ Ioo 0 a'⁻¹ → x ≠ 0\nfact2 : ∀ (x : ℝ), x ∈ Ioo 0 a'⁻¹ → a < x⁻¹\nhdnf : ∀ (x : ℝ), x ∈ Ioo 0 a'⁻¹ → HasDerivAt (f ∘ Inv.inv) (f' x⁻¹ * -(x ^ 2)⁻¹) x\n⊢ Tendsto (fun x => f x / g x) atTop l\n[PROOFSTEP]\nhave hdng : ∀ x ∈ Ioo 0 a'⁻¹, HasDerivAt (g ∘ Inv.inv) (g' x⁻¹ * -(x ^ 2)⁻¹) x := fun x hx =>\n  comp x (hgg' x⁻¹ <| fact2 x hx) (hasDerivAt_inv <| fact1 x hx)\n[GOAL]\ncase intro.intro\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioi a → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioi a → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Ioi a → g' x ≠ 0\nhftop : Tendsto f atTop (𝓝 0)\nhgtop : Tendsto g atTop (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) atTop l\na' : ℝ\nhaa' : a < a'\nha' : 0 < a'\nfact1 : ∀ (x : ℝ), x ∈ Ioo 0 a'⁻¹ → x ≠ 0\nfact2 : ∀ (x : ℝ), x ∈ Ioo 0 a'⁻¹ → a < x⁻¹\nhdnf : ∀ (x : ℝ), x ∈ Ioo 0 a'⁻¹ → HasDerivAt (f ∘ Inv.inv) (f' x⁻¹ * -(x ^ 2)⁻¹) x\nhdng : ∀ (x : ℝ), x ∈ Ioo 0 a'⁻¹ → HasDerivAt (g ∘ Inv.inv) (g' x⁻¹ * -(x ^ 2)⁻¹) x\n⊢ Tendsto (fun x => f x / g x) atTop l\n[PROOFSTEP]\nhave :=\n  lhopital_zero_right_on_Ioo (inv_pos.mpr ha') hdnf hdng\n    (by\n      intro x hx\n      refine' mul_ne_zero _ (neg_ne_zero.mpr <| inv_ne_zero <| pow_ne_zero _ <| fact1 x hx)\n      exact hg' _ (fact2 x hx))\n    (hftop.comp tendsto_inv_zero_atTop) (hgtop.comp tendsto_inv_zero_atTop)\n    (by\n      refine' (tendsto_congr' _).mp (hdiv.comp tendsto_inv_zero_atTop)\n      rw [eventuallyEq_iff_exists_mem]\n      use Ioi 0, self_mem_nhdsWithin\n      intro x hx\n      unfold Function.comp\n      simp only\n      erw [mul_div_mul_right]\n      refine' neg_ne_zero.mpr (inv_ne_zero <| pow_ne_zero _ <| ne_of_gt hx))\n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioi a → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioi a → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Ioi a → g' x ≠ 0\nhftop : Tendsto f atTop (𝓝 0)\nhgtop : Tendsto g atTop (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) atTop l\na' : ℝ\nhaa' : a < a'\nha' : 0 < a'\nfact1 : ∀ (x : ℝ), x ∈ Ioo 0 a'⁻¹ → x ≠ 0\nfact2 : ∀ (x : ℝ), x ∈ Ioo 0 a'⁻¹ → a < x⁻¹\nhdnf : ∀ (x : ℝ), x ∈ Ioo 0 a'⁻¹ → HasDerivAt (f ∘ Inv.inv) (f' x⁻¹ * -(x ^ 2)⁻¹) x\nhdng : ∀ (x : ℝ), x ∈ Ioo 0 a'⁻¹ → HasDerivAt (g ∘ Inv.inv) (g' x⁻¹ * -(x ^ 2)⁻¹) x\n⊢ ∀ (x : ℝ), x ∈ Ioo 0 a'⁻¹ → g' x⁻¹ * -(x ^ 2)⁻¹ ≠ 0\n[PROOFSTEP]\nintro x hx\n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioi a → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioi a → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Ioi a → g' x ≠ 0\nhftop : Tendsto f atTop (𝓝 0)\nhgtop : Tendsto g atTop (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) atTop l\na' : ℝ\nhaa' : a < a'\nha' : 0 < a'\nfact1 : ∀ (x : ℝ), x ∈ Ioo 0 a'⁻¹ → x ≠ 0\nfact2 : ∀ (x : ℝ), x ∈ Ioo 0 a'⁻¹ → a < x⁻¹\nhdnf : ∀ (x : ℝ), x ∈ Ioo 0 a'⁻¹ → HasDerivAt (f ∘ Inv.inv) (f' x⁻¹ * -(x ^ 2)⁻¹) x\nhdng : ∀ (x : ℝ), x ∈ Ioo 0 a'⁻¹ → HasDerivAt (g ∘ Inv.inv) (g' x⁻¹ * -(x ^ 2)⁻¹) x\nx : ℝ\nhx : x ∈ Ioo 0 a'⁻¹\n⊢ g' x⁻¹ * -(x ^ 2)⁻¹ ≠ 0\n[PROOFSTEP]\nrefine' mul_ne_zero _ (neg_ne_zero.mpr <| inv_ne_zero <| pow_ne_zero _ <| fact1 x hx)\n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioi a → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioi a → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Ioi a → g' x ≠ 0\nhftop : Tendsto f atTop (𝓝 0)\nhgtop : Tendsto g atTop (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) atTop l\na' : ℝ\nhaa' : a < a'\nha' : 0 < a'\nfact1 : ∀ (x : ℝ), x ∈ Ioo 0 a'⁻¹ → x ≠ 0\nfact2 : ∀ (x : ℝ), x ∈ Ioo 0 a'⁻¹ → a < x⁻¹\nhdnf : ∀ (x : ℝ), x ∈ Ioo 0 a'⁻¹ → HasDerivAt (f ∘ Inv.inv) (f' x⁻¹ * -(x ^ 2)⁻¹) x\nhdng : ∀ (x : ℝ), x ∈ Ioo 0 a'⁻¹ → HasDerivAt (g ∘ Inv.inv) (g' x⁻¹ * -(x ^ 2)⁻¹) x\nx : ℝ\nhx : x ∈ Ioo 0 a'⁻¹\n⊢ g' x⁻¹ ≠ 0\n[PROOFSTEP]\nexact hg' _ (fact2 x hx)\n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioi a → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioi a → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Ioi a → g' x ≠ 0\nhftop : Tendsto f atTop (𝓝 0)\nhgtop : Tendsto g atTop (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) atTop l\na' : ℝ\nhaa' : a < a'\nha' : 0 < a'\nfact1 : ∀ (x : ℝ), x ∈ Ioo 0 a'⁻¹ → x ≠ 0\nfact2 : ∀ (x : ℝ), x ∈ Ioo 0 a'⁻¹ → a < x⁻¹\nhdnf : ∀ (x : ℝ), x ∈ Ioo 0 a'⁻¹ → HasDerivAt (f ∘ Inv.inv) (f' x⁻¹ * -(x ^ 2)⁻¹) x\nhdng : ∀ (x : ℝ), x ∈ Ioo 0 a'⁻¹ → HasDerivAt (g ∘ Inv.inv) (g' x⁻¹ * -(x ^ 2)⁻¹) x\n⊢ Tendsto (fun x => f' x⁻¹ * -(x ^ 2)⁻¹ / (g' x⁻¹ * -(x ^ 2)⁻¹)) (𝓝[Ioi 0] 0) ?m.21930\n[PROOFSTEP]\nrefine' (tendsto_congr' _).mp (hdiv.comp tendsto_inv_zero_atTop)\n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioi a → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioi a → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Ioi a → g' x ≠ 0\nhftop : Tendsto f atTop (𝓝 0)\nhgtop : Tendsto g atTop (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) atTop l\na' : ℝ\nhaa' : a < a'\nha' : 0 < a'\nfact1 : ∀ (x : ℝ), x ∈ Ioo 0 a'⁻¹ → x ≠ 0\nfact2 : ∀ (x : ℝ), x ∈ Ioo 0 a'⁻¹ → a < x⁻¹\nhdnf : ∀ (x : ℝ), x ∈ Ioo 0 a'⁻¹ → HasDerivAt (f ∘ Inv.inv) (f' x⁻¹ * -(x ^ 2)⁻¹) x\nhdng : ∀ (x : ℝ), x ∈ Ioo 0 a'⁻¹ → HasDerivAt (g ∘ Inv.inv) (g' x⁻¹ * -(x ^ 2)⁻¹) x\n⊢ ((fun x => f' x / g' x) ∘ fun x => x⁻¹) =ᶠ[𝓝[Ioi 0] 0] fun x => f' x⁻¹ * -(x ^ 2)⁻¹ / (g' x⁻¹ * -(x ^ 2)⁻¹)\n[PROOFSTEP]\nrw [eventuallyEq_iff_exists_mem]\n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioi a → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioi a → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Ioi a → g' x ≠ 0\nhftop : Tendsto f atTop (𝓝 0)\nhgtop : Tendsto g atTop (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) atTop l\na' : ℝ\nhaa' : a < a'\nha' : 0 < a'\nfact1 : ∀ (x : ℝ), x ∈ Ioo 0 a'⁻¹ → x ≠ 0\nfact2 : ∀ (x : ℝ), x ∈ Ioo 0 a'⁻¹ → a < x⁻¹\nhdnf : ∀ (x : ℝ), x ∈ Ioo 0 a'⁻¹ → HasDerivAt (f ∘ Inv.inv) (f' x⁻¹ * -(x ^ 2)⁻¹) x\nhdng : ∀ (x : ℝ), x ∈ Ioo 0 a'⁻¹ → HasDerivAt (g ∘ Inv.inv) (g' x⁻¹ * -(x ^ 2)⁻¹) x\n⊢ ∃ s,\n    s ∈ 𝓝[Ioi 0] 0 ∧\n      EqOn ((fun x => f' x / g' x) ∘ fun x => x⁻¹) (fun x => f' x⁻¹ * -(x ^ 2)⁻¹ / (g' x⁻¹ * -(x ^ 2)⁻¹)) s\n[PROOFSTEP]\nuse Ioi 0, self_mem_nhdsWithin\n[GOAL]\ncase right\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioi a → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioi a → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Ioi a → g' x ≠ 0\nhftop : Tendsto f atTop (𝓝 0)\nhgtop : Tendsto g atTop (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) atTop l\na' : ℝ\nhaa' : a < a'\nha' : 0 < a'\nfact1 : ∀ (x : ℝ), x ∈ Ioo 0 a'⁻¹ → x ≠ 0\nfact2 : ∀ (x : ℝ), x ∈ Ioo 0 a'⁻¹ → a < x⁻¹\nhdnf : ∀ (x : ℝ), x ∈ Ioo 0 a'⁻¹ → HasDerivAt (f ∘ Inv.inv) (f' x⁻¹ * -(x ^ 2)⁻¹) x\nhdng : ∀ (x : ℝ), x ∈ Ioo 0 a'⁻¹ → HasDerivAt (g ∘ Inv.inv) (g' x⁻¹ * -(x ^ 2)⁻¹) x\n⊢ EqOn ((fun x => f' x / g' x) ∘ fun x => x⁻¹) (fun x => f' x⁻¹ * -(x ^ 2)⁻¹ / (g' x⁻¹ * -(x ^ 2)⁻¹)) (Ioi 0)\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase right\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioi a → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioi a → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Ioi a → g' x ≠ 0\nhftop : Tendsto f atTop (𝓝 0)\nhgtop : Tendsto g atTop (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) atTop l\na' : ℝ\nhaa' : a < a'\nha' : 0 < a'\nfact1 : ∀ (x : ℝ), x ∈ Ioo 0 a'⁻¹ → x ≠ 0\nfact2 : ∀ (x : ℝ), x ∈ Ioo 0 a'⁻¹ → a < x⁻¹\nhdnf : ∀ (x : ℝ), x ∈ Ioo 0 a'⁻¹ → HasDerivAt (f ∘ Inv.inv) (f' x⁻¹ * -(x ^ 2)⁻¹) x\nhdng : ∀ (x : ℝ), x ∈ Ioo 0 a'⁻¹ → HasDerivAt (g ∘ Inv.inv) (g' x⁻¹ * -(x ^ 2)⁻¹) x\nx : ℝ\nhx : x ∈ Ioi 0\n⊢ ((fun x => f' x / g' x) ∘ fun x => x⁻¹) x = (fun x => f' x⁻¹ * -(x ^ 2)⁻¹ / (g' x⁻¹ * -(x ^ 2)⁻¹)) x\n[PROOFSTEP]\nunfold Function.comp\n[GOAL]\ncase right\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioi a → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioi a → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Ioi a → g' x ≠ 0\nhftop : Tendsto f atTop (𝓝 0)\nhgtop : Tendsto g atTop (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) atTop l\na' : ℝ\nhaa' : a < a'\nha' : 0 < a'\nfact1 : ∀ (x : ℝ), x ∈ Ioo 0 a'⁻¹ → x ≠ 0\nfact2 : ∀ (x : ℝ), x ∈ Ioo 0 a'⁻¹ → a < x⁻¹\nhdnf : ∀ (x : ℝ), x ∈ Ioo 0 a'⁻¹ → HasDerivAt (f ∘ Inv.inv) (f' x⁻¹ * -(x ^ 2)⁻¹) x\nhdng : ∀ (x : ℝ), x ∈ Ioo 0 a'⁻¹ → HasDerivAt (g ∘ Inv.inv) (g' x⁻¹ * -(x ^ 2)⁻¹) x\nx : ℝ\nhx : x ∈ Ioi 0\n⊢ (fun x => f' x / g' x) ((fun x => x⁻¹) x) = (fun x => f' x⁻¹ * -(x ^ 2)⁻¹ / (g' x⁻¹ * -(x ^ 2)⁻¹)) x\n[PROOFSTEP]\nsimp only\n[GOAL]\ncase right\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioi a → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioi a → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Ioi a → g' x ≠ 0\nhftop : Tendsto f atTop (𝓝 0)\nhgtop : Tendsto g atTop (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) atTop l\na' : ℝ\nhaa' : a < a'\nha' : 0 < a'\nfact1 : ∀ (x : ℝ), x ∈ Ioo 0 a'⁻¹ → x ≠ 0\nfact2 : ∀ (x : ℝ), x ∈ Ioo 0 a'⁻¹ → a < x⁻¹\nhdnf : ∀ (x : ℝ), x ∈ Ioo 0 a'⁻¹ → HasDerivAt (f ∘ Inv.inv) (f' x⁻¹ * -(x ^ 2)⁻¹) x\nhdng : ∀ (x : ℝ), x ∈ Ioo 0 a'⁻¹ → HasDerivAt (g ∘ Inv.inv) (g' x⁻¹ * -(x ^ 2)⁻¹) x\nx : ℝ\nhx : x ∈ Ioi 0\n⊢ f' x⁻¹ / g' x⁻¹ = f' x⁻¹ * -(x ^ 2)⁻¹ / (g' x⁻¹ * -(x ^ 2)⁻¹)\n[PROOFSTEP]\nerw [mul_div_mul_right]\n[GOAL]\ncase right.hc\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioi a → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioi a → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Ioi a → g' x ≠ 0\nhftop : Tendsto f atTop (𝓝 0)\nhgtop : Tendsto g atTop (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) atTop l\na' : ℝ\nhaa' : a < a'\nha' : 0 < a'\nfact1 : ∀ (x : ℝ), x ∈ Ioo 0 a'⁻¹ → x ≠ 0\nfact2 : ∀ (x : ℝ), x ∈ Ioo 0 a'⁻¹ → a < x⁻¹\nhdnf : ∀ (x : ℝ), x ∈ Ioo 0 a'⁻¹ → HasDerivAt (f ∘ Inv.inv) (f' x⁻¹ * -(x ^ 2)⁻¹) x\nhdng : ∀ (x : ℝ), x ∈ Ioo 0 a'⁻¹ → HasDerivAt (g ∘ Inv.inv) (g' x⁻¹ * -(x ^ 2)⁻¹) x\nx : ℝ\nhx : x ∈ Ioi 0\n⊢ -(x ^ 2)⁻¹ ≠ 0\n[PROOFSTEP]\nrefine' neg_ne_zero.mpr (inv_ne_zero <| pow_ne_zero _ <| ne_of_gt hx)\n[GOAL]\ncase intro.intro\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioi a → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioi a → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Ioi a → g' x ≠ 0\nhftop : Tendsto f atTop (𝓝 0)\nhgtop : Tendsto g atTop (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) atTop l\na' : ℝ\nhaa' : a < a'\nha' : 0 < a'\nfact1 : ∀ (x : ℝ), x ∈ Ioo 0 a'⁻¹ → x ≠ 0\nfact2 : ∀ (x : ℝ), x ∈ Ioo 0 a'⁻¹ → a < x⁻¹\nhdnf : ∀ (x : ℝ), x ∈ Ioo 0 a'⁻¹ → HasDerivAt (f ∘ Inv.inv) (f' x⁻¹ * -(x ^ 2)⁻¹) x\nhdng : ∀ (x : ℝ), x ∈ Ioo 0 a'⁻¹ → HasDerivAt (g ∘ Inv.inv) (g' x⁻¹ * -(x ^ 2)⁻¹) x\nthis : Tendsto (fun x => (f ∘ Inv.inv) x / (g ∘ Inv.inv) x) (𝓝[Ioi 0] 0) l\n⊢ Tendsto (fun x => f x / g x) atTop l\n[PROOFSTEP]\nhave := this.comp tendsto_inv_atTop_zero'\n[GOAL]\ncase intro.intro\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioi a → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioi a → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Ioi a → g' x ≠ 0\nhftop : Tendsto f atTop (𝓝 0)\nhgtop : Tendsto g atTop (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) atTop l\na' : ℝ\nhaa' : a < a'\nha' : 0 < a'\nfact1 : ∀ (x : ℝ), x ∈ Ioo 0 a'⁻¹ → x ≠ 0\nfact2 : ∀ (x : ℝ), x ∈ Ioo 0 a'⁻¹ → a < x⁻¹\nhdnf : ∀ (x : ℝ), x ∈ Ioo 0 a'⁻¹ → HasDerivAt (f ∘ Inv.inv) (f' x⁻¹ * -(x ^ 2)⁻¹) x\nhdng : ∀ (x : ℝ), x ∈ Ioo 0 a'⁻¹ → HasDerivAt (g ∘ Inv.inv) (g' x⁻¹ * -(x ^ 2)⁻¹) x\nthis✝ : Tendsto (fun x => (f ∘ Inv.inv) x / (g ∘ Inv.inv) x) (𝓝[Ioi 0] 0) l\nthis : Tendsto ((fun x => (f ∘ Inv.inv) x / (g ∘ Inv.inv) x) ∘ fun r => r⁻¹) atTop l\n⊢ Tendsto (fun x => f x / g x) atTop l\n[PROOFSTEP]\nunfold Function.comp at this \n[GOAL]\ncase intro.intro\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Ioi a → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Ioi a → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Ioi a → g' x ≠ 0\nhftop : Tendsto f atTop (𝓝 0)\nhgtop : Tendsto g atTop (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) atTop l\na' : ℝ\nhaa' : a < a'\nha' : 0 < a'\nfact1 : ∀ (x : ℝ), x ∈ Ioo 0 a'⁻¹ → x ≠ 0\nfact2 : ∀ (x : ℝ), x ∈ Ioo 0 a'⁻¹ → a < x⁻¹\nhdnf : ∀ (x : ℝ), x ∈ Ioo 0 a'⁻¹ → HasDerivAt (f ∘ Inv.inv) (f' x⁻¹ * -(x ^ 2)⁻¹) x\nhdng : ∀ (x : ℝ), x ∈ Ioo 0 a'⁻¹ → HasDerivAt (g ∘ Inv.inv) (g' x⁻¹ * -(x ^ 2)⁻¹) x\nthis✝ : Tendsto (fun x => (f ∘ Inv.inv) x / (g ∘ Inv.inv) x) (𝓝[Ioi 0] 0) l\nthis : Tendsto (fun x => (fun x => f x⁻¹ / g x⁻¹) ((fun r => r⁻¹) x)) atTop l\n⊢ Tendsto (fun x => f x / g x) atTop l\n[PROOFSTEP]\nsimpa only [inv_inv]\n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Iio a → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Iio a → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Iio a → g' x ≠ 0\nhfbot : Tendsto f atBot (𝓝 0)\nhgbot : Tendsto g atBot (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) atBot l\n⊢ Tendsto (fun x => f x / g x) atBot l\n[PROOFSTEP]\nhave hdnf : ∀ x ∈ -Iio a, HasDerivAt (f ∘ Neg.neg) (f' (-x) * -1) x := fun x hx =>\n  comp x (hff' (-x) hx) (hasDerivAt_neg x)\n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Iio a → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Iio a → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Iio a → g' x ≠ 0\nhfbot : Tendsto f atBot (𝓝 0)\nhgbot : Tendsto g atBot (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) atBot l\nhdnf : ∀ (x : ℝ), x ∈ -Iio a → HasDerivAt (f ∘ Neg.neg) (f' (-x) * -1) x\n⊢ Tendsto (fun x => f x / g x) atBot l\n[PROOFSTEP]\nhave hdng : ∀ x ∈ -Iio a, HasDerivAt (g ∘ Neg.neg) (g' (-x) * -1) x := fun x hx =>\n  comp x (hgg' (-x) hx) (hasDerivAt_neg x)\n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Iio a → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Iio a → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Iio a → g' x ≠ 0\nhfbot : Tendsto f atBot (𝓝 0)\nhgbot : Tendsto g atBot (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) atBot l\nhdnf : ∀ (x : ℝ), x ∈ -Iio a → HasDerivAt (f ∘ Neg.neg) (f' (-x) * -1) x\nhdng : ∀ (x : ℝ), x ∈ -Iio a → HasDerivAt (g ∘ Neg.neg) (g' (-x) * -1) x\n⊢ Tendsto (fun x => f x / g x) atBot l\n[PROOFSTEP]\nrw [preimage_neg_Iio] at hdnf \n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Iio a → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Iio a → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Iio a → g' x ≠ 0\nhfbot : Tendsto f atBot (𝓝 0)\nhgbot : Tendsto g atBot (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) atBot l\nhdnf : ∀ (x : ℝ), x ∈ Ioi (-a) → HasDerivAt (f ∘ Neg.neg) (f' (-x) * -1) x\nhdng : ∀ (x : ℝ), x ∈ -Iio a → HasDerivAt (g ∘ Neg.neg) (g' (-x) * -1) x\n⊢ Tendsto (fun x => f x / g x) atBot l\n[PROOFSTEP]\nrw [preimage_neg_Iio] at hdng \n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Iio a → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Iio a → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Iio a → g' x ≠ 0\nhfbot : Tendsto f atBot (𝓝 0)\nhgbot : Tendsto g atBot (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) atBot l\nhdnf : ∀ (x : ℝ), x ∈ Ioi (-a) → HasDerivAt (f ∘ Neg.neg) (f' (-x) * -1) x\nhdng : ∀ (x : ℝ), x ∈ Ioi (-a) → HasDerivAt (g ∘ Neg.neg) (g' (-x) * -1) x\n⊢ Tendsto (fun x => f x / g x) atBot l\n[PROOFSTEP]\nhave :=\n  lhopital_zero_atTop_on_Ioi hdnf hdng\n    (by\n      intro x hx h\n      apply hg' _ (by rw [← preimage_neg_Iio] at hx ; exact hx)\n      rwa [mul_comm, ← neg_eq_neg_one_mul, neg_eq_zero] at h )\n    (hfbot.comp tendsto_neg_atTop_atBot) (hgbot.comp tendsto_neg_atTop_atBot)\n    (by\n      simp only [mul_one, mul_neg, neg_div_neg_eq]\n      exact (tendsto_congr fun x => rfl).mp (hdiv.comp tendsto_neg_atTop_atBot))\n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Iio a → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Iio a → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Iio a → g' x ≠ 0\nhfbot : Tendsto f atBot (𝓝 0)\nhgbot : Tendsto g atBot (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) atBot l\nhdnf : ∀ (x : ℝ), x ∈ Ioi (-a) → HasDerivAt (f ∘ Neg.neg) (f' (-x) * -1) x\nhdng : ∀ (x : ℝ), x ∈ Ioi (-a) → HasDerivAt (g ∘ Neg.neg) (g' (-x) * -1) x\n⊢ ∀ (x : ℝ), x ∈ Ioi (-a) → g' (-x) * -1 ≠ 0\n[PROOFSTEP]\nintro x hx h\n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Iio a → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Iio a → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Iio a → g' x ≠ 0\nhfbot : Tendsto f atBot (𝓝 0)\nhgbot : Tendsto g atBot (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) atBot l\nhdnf : ∀ (x : ℝ), x ∈ Ioi (-a) → HasDerivAt (f ∘ Neg.neg) (f' (-x) * -1) x\nhdng : ∀ (x : ℝ), x ∈ Ioi (-a) → HasDerivAt (g ∘ Neg.neg) (g' (-x) * -1) x\nx : ℝ\nhx : x ∈ Ioi (-a)\nh : g' (-x) * -1 = 0\n⊢ False\n[PROOFSTEP]\napply hg' _ (by rw [← preimage_neg_Iio] at hx ; exact hx)\n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Iio a → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Iio a → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Iio a → g' x ≠ 0\nhfbot : Tendsto f atBot (𝓝 0)\nhgbot : Tendsto g atBot (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) atBot l\nhdnf : ∀ (x : ℝ), x ∈ Ioi (-a) → HasDerivAt (f ∘ Neg.neg) (f' (-x) * -1) x\nhdng : ∀ (x : ℝ), x ∈ Ioi (-a) → HasDerivAt (g ∘ Neg.neg) (g' (-x) * -1) x\nx : ℝ\nhx : x ∈ Ioi (-a)\nh : g' (-x) * -1 = 0\n⊢ ?m.26788 ∈ Iio a\n[PROOFSTEP]\nrw [← preimage_neg_Iio] at hx \n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Iio a → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Iio a → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Iio a → g' x ≠ 0\nhfbot : Tendsto f atBot (𝓝 0)\nhgbot : Tendsto g atBot (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) atBot l\nhdnf : ∀ (x : ℝ), x ∈ Ioi (-a) → HasDerivAt (f ∘ Neg.neg) (f' (-x) * -1) x\nhdng : ∀ (x : ℝ), x ∈ Ioi (-a) → HasDerivAt (g ∘ Neg.neg) (g' (-x) * -1) x\nx : ℝ\nhx✝ : x ∈ Ioi (-a)\nhx : x ∈ -Iio a\nh : g' (-x) * -1 = 0\n⊢ ?m.26876 h ∈ Iio a\n[PROOFSTEP]\nexact hx\n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Iio a → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Iio a → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Iio a → g' x ≠ 0\nhfbot : Tendsto f atBot (𝓝 0)\nhgbot : Tendsto g atBot (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) atBot l\nhdnf : ∀ (x : ℝ), x ∈ Ioi (-a) → HasDerivAt (f ∘ Neg.neg) (f' (-x) * -1) x\nhdng : ∀ (x : ℝ), x ∈ Ioi (-a) → HasDerivAt (g ∘ Neg.neg) (g' (-x) * -1) x\nx : ℝ\nhx : x ∈ Ioi (-a)\nh : g' (-x) * -1 = 0\n⊢ g' (-x) = 0\n[PROOFSTEP]\nrwa [mul_comm, ← neg_eq_neg_one_mul, neg_eq_zero] at h \n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Iio a → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Iio a → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Iio a → g' x ≠ 0\nhfbot : Tendsto f atBot (𝓝 0)\nhgbot : Tendsto g atBot (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) atBot l\nhdnf : ∀ (x : ℝ), x ∈ Ioi (-a) → HasDerivAt (f ∘ Neg.neg) (f' (-x) * -1) x\nhdng : ∀ (x : ℝ), x ∈ Ioi (-a) → HasDerivAt (g ∘ Neg.neg) (g' (-x) * -1) x\n⊢ Tendsto (fun x => f' (-x) * -1 / (g' (-x) * -1)) atTop ?m.26621\n[PROOFSTEP]\nsimp only [mul_one, mul_neg, neg_div_neg_eq]\n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Iio a → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Iio a → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Iio a → g' x ≠ 0\nhfbot : Tendsto f atBot (𝓝 0)\nhgbot : Tendsto g atBot (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) atBot l\nhdnf : ∀ (x : ℝ), x ∈ Ioi (-a) → HasDerivAt (f ∘ Neg.neg) (f' (-x) * -1) x\nhdng : ∀ (x : ℝ), x ∈ Ioi (-a) → HasDerivAt (g ∘ Neg.neg) (g' (-x) * -1) x\n⊢ Tendsto (fun x => f' (-x) / g' (-x)) atTop ?m.26621\n[PROOFSTEP]\nexact (tendsto_congr fun x => rfl).mp (hdiv.comp tendsto_neg_atTop_atBot)\n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Iio a → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Iio a → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Iio a → g' x ≠ 0\nhfbot : Tendsto f atBot (𝓝 0)\nhgbot : Tendsto g atBot (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) atBot l\nhdnf : ∀ (x : ℝ), x ∈ Ioi (-a) → HasDerivAt (f ∘ Neg.neg) (f' (-x) * -1) x\nhdng : ∀ (x : ℝ), x ∈ Ioi (-a) → HasDerivAt (g ∘ Neg.neg) (g' (-x) * -1) x\nthis : Tendsto (fun x => (f ∘ Neg.neg) x / (g ∘ Neg.neg) x) atTop l\n⊢ Tendsto (fun x => f x / g x) atBot l\n[PROOFSTEP]\nhave := this.comp tendsto_neg_atBot_atTop\n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Iio a → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Iio a → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Iio a → g' x ≠ 0\nhfbot : Tendsto f atBot (𝓝 0)\nhgbot : Tendsto g atBot (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) atBot l\nhdnf : ∀ (x : ℝ), x ∈ Ioi (-a) → HasDerivAt (f ∘ Neg.neg) (f' (-x) * -1) x\nhdng : ∀ (x : ℝ), x ∈ Ioi (-a) → HasDerivAt (g ∘ Neg.neg) (g' (-x) * -1) x\nthis✝ : Tendsto (fun x => (f ∘ Neg.neg) x / (g ∘ Neg.neg) x) atTop l\nthis : Tendsto ((fun x => (f ∘ Neg.neg) x / (g ∘ Neg.neg) x) ∘ Neg.neg) atBot l\n⊢ Tendsto (fun x => f x / g x) atBot l\n[PROOFSTEP]\nunfold Function.comp at this \n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ (x : ℝ), x ∈ Iio a → HasDerivAt f (f' x) x\nhgg' : ∀ (x : ℝ), x ∈ Iio a → HasDerivAt g (g' x) x\nhg' : ∀ (x : ℝ), x ∈ Iio a → g' x ≠ 0\nhfbot : Tendsto f atBot (𝓝 0)\nhgbot : Tendsto g atBot (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) atBot l\nhdnf : ∀ (x : ℝ), x ∈ Ioi (-a) → HasDerivAt (f ∘ Neg.neg) (f' (-x) * -1) x\nhdng : ∀ (x : ℝ), x ∈ Ioi (-a) → HasDerivAt (g ∘ Neg.neg) (g' (-x) * -1) x\nthis✝ : Tendsto (fun x => (f ∘ Neg.neg) x / (g ∘ Neg.neg) x) atTop l\nthis : Tendsto (fun x => (fun x => f (-x) / g (-x)) (-x)) atBot l\n⊢ Tendsto (fun x => f x / g x) atBot l\n[PROOFSTEP]\nsimpa only [neg_neg]\n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhdf : DifferentiableOn ℝ f (Ioo a b)\nhg' : ∀ (x : ℝ), x ∈ Ioo a b → deriv g x ≠ 0\nhfa : Tendsto f (𝓝[Ioi a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Ioi a] a) (𝓝 0)\nhdiv : Tendsto (fun x => deriv f x / deriv g x) (𝓝[Ioi a] a) l\n⊢ Tendsto (fun x => f x / g x) (𝓝[Ioi a] a) l\n[PROOFSTEP]\nhave hdf : ∀ x ∈ Ioo a b, DifferentiableAt ℝ f x := fun x hx => (hdf x hx).differentiableAt (Ioo_mem_nhds hx.1 hx.2)\n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhdf✝ : DifferentiableOn ℝ f (Ioo a b)\nhg' : ∀ (x : ℝ), x ∈ Ioo a b → deriv g x ≠ 0\nhfa : Tendsto f (𝓝[Ioi a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Ioi a] a) (𝓝 0)\nhdiv : Tendsto (fun x => deriv f x / deriv g x) (𝓝[Ioi a] a) l\nhdf : ∀ (x : ℝ), x ∈ Ioo a b → DifferentiableAt ℝ f x\n⊢ Tendsto (fun x => f x / g x) (𝓝[Ioi a] a) l\n[PROOFSTEP]\nhave hdg : ∀ x ∈ Ioo a b, DifferentiableAt ℝ g x := fun x hx =>\n  by_contradiction fun h => hg' x hx (deriv_zero_of_not_differentiableAt h)\n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhdf✝ : DifferentiableOn ℝ f (Ioo a b)\nhg' : ∀ (x : ℝ), x ∈ Ioo a b → deriv g x ≠ 0\nhfa : Tendsto f (𝓝[Ioi a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Ioi a] a) (𝓝 0)\nhdiv : Tendsto (fun x => deriv f x / deriv g x) (𝓝[Ioi a] a) l\nhdf : ∀ (x : ℝ), x ∈ Ioo a b → DifferentiableAt ℝ f x\nhdg : ∀ (x : ℝ), x ∈ Ioo a b → DifferentiableAt ℝ g x\n⊢ Tendsto (fun x => f x / g x) (𝓝[Ioi a] a) l\n[PROOFSTEP]\nexact\n  HasDerivAt.lhopital_zero_right_on_Ioo hab (fun x hx => (hdf x hx).hasDerivAt) (fun x hx => (hdg x hx).hasDerivAt) hg'\n    hfa hga hdiv\n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhdf : DifferentiableOn ℝ f (Ioo a b)\nhcf : ContinuousOn f (Ico a b)\nhcg : ContinuousOn g (Ico a b)\nhg' : ∀ (x : ℝ), x ∈ Ioo a b → deriv g x ≠ 0\nhfa : f a = 0\nhga : g a = 0\nhdiv : Tendsto (fun x => deriv f x / deriv g x) (𝓝[Ioi a] a) l\n⊢ Tendsto (fun x => f x / g x) (𝓝[Ioi a] a) l\n[PROOFSTEP]\nrefine' lhopital_zero_right_on_Ioo hab hdf hg' _ _ hdiv\n[GOAL]\ncase refine'_1\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhdf : DifferentiableOn ℝ f (Ioo a b)\nhcf : ContinuousOn f (Ico a b)\nhcg : ContinuousOn g (Ico a b)\nhg' : ∀ (x : ℝ), x ∈ Ioo a b → deriv g x ≠ 0\nhfa : f a = 0\nhga : g a = 0\nhdiv : Tendsto (fun x => deriv f x / deriv g x) (𝓝[Ioi a] a) l\n⊢ Tendsto (fun x => f x) (𝓝[Ioi a] a) (𝓝 0)\n[PROOFSTEP]\nrw [← hfa, ← nhdsWithin_Ioo_eq_nhdsWithin_Ioi hab]\n[GOAL]\ncase refine'_1\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhdf : DifferentiableOn ℝ f (Ioo a b)\nhcf : ContinuousOn f (Ico a b)\nhcg : ContinuousOn g (Ico a b)\nhg' : ∀ (x : ℝ), x ∈ Ioo a b → deriv g x ≠ 0\nhfa : f a = 0\nhga : g a = 0\nhdiv : Tendsto (fun x => deriv f x / deriv g x) (𝓝[Ioi a] a) l\n⊢ Tendsto (fun x => f x) (𝓝[Ioo a b] a) (𝓝 (f a))\n[PROOFSTEP]\nexact ((hcf a <| left_mem_Ico.mpr hab).mono Ioo_subset_Ico_self).tendsto\n[GOAL]\ncase refine'_2\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhdf : DifferentiableOn ℝ f (Ioo a b)\nhcf : ContinuousOn f (Ico a b)\nhcg : ContinuousOn g (Ico a b)\nhg' : ∀ (x : ℝ), x ∈ Ioo a b → deriv g x ≠ 0\nhfa : f a = 0\nhga : g a = 0\nhdiv : Tendsto (fun x => deriv f x / deriv g x) (𝓝[Ioi a] a) l\n⊢ Tendsto (fun x => g x) (𝓝[Ioi a] a) (𝓝 0)\n[PROOFSTEP]\nrw [← hga, ← nhdsWithin_Ioo_eq_nhdsWithin_Ioi hab]\n[GOAL]\ncase refine'_2\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhdf : DifferentiableOn ℝ f (Ioo a b)\nhcf : ContinuousOn f (Ico a b)\nhcg : ContinuousOn g (Ico a b)\nhg' : ∀ (x : ℝ), x ∈ Ioo a b → deriv g x ≠ 0\nhfa : f a = 0\nhga : g a = 0\nhdiv : Tendsto (fun x => deriv f x / deriv g x) (𝓝[Ioi a] a) l\n⊢ Tendsto (fun x => g x) (𝓝[Ioo a b] a) (𝓝 (g a))\n[PROOFSTEP]\nexact ((hcg a <| left_mem_Ico.mpr hab).mono Ioo_subset_Ico_self).tendsto\n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhdf : DifferentiableOn ℝ f (Ioo a b)\nhg' : ∀ (x : ℝ), x ∈ Ioo a b → deriv g x ≠ 0\nhfb : Tendsto f (𝓝[Iio b] b) (𝓝 0)\nhgb : Tendsto g (𝓝[Iio b] b) (𝓝 0)\nhdiv : Tendsto (fun x => deriv f x / deriv g x) (𝓝[Iio b] b) l\n⊢ Tendsto (fun x => f x / g x) (𝓝[Iio b] b) l\n[PROOFSTEP]\nhave hdf : ∀ x ∈ Ioo a b, DifferentiableAt ℝ f x := fun x hx => (hdf x hx).differentiableAt (Ioo_mem_nhds hx.1 hx.2)\n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhdf✝ : DifferentiableOn ℝ f (Ioo a b)\nhg' : ∀ (x : ℝ), x ∈ Ioo a b → deriv g x ≠ 0\nhfb : Tendsto f (𝓝[Iio b] b) (𝓝 0)\nhgb : Tendsto g (𝓝[Iio b] b) (𝓝 0)\nhdiv : Tendsto (fun x => deriv f x / deriv g x) (𝓝[Iio b] b) l\nhdf : ∀ (x : ℝ), x ∈ Ioo a b → DifferentiableAt ℝ f x\n⊢ Tendsto (fun x => f x / g x) (𝓝[Iio b] b) l\n[PROOFSTEP]\nhave hdg : ∀ x ∈ Ioo a b, DifferentiableAt ℝ g x := fun x hx =>\n  by_contradiction fun h => hg' x hx (deriv_zero_of_not_differentiableAt h)\n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhdf✝ : DifferentiableOn ℝ f (Ioo a b)\nhg' : ∀ (x : ℝ), x ∈ Ioo a b → deriv g x ≠ 0\nhfb : Tendsto f (𝓝[Iio b] b) (𝓝 0)\nhgb : Tendsto g (𝓝[Iio b] b) (𝓝 0)\nhdiv : Tendsto (fun x => deriv f x / deriv g x) (𝓝[Iio b] b) l\nhdf : ∀ (x : ℝ), x ∈ Ioo a b → DifferentiableAt ℝ f x\nhdg : ∀ (x : ℝ), x ∈ Ioo a b → DifferentiableAt ℝ g x\n⊢ Tendsto (fun x => f x / g x) (𝓝[Iio b] b) l\n[PROOFSTEP]\nexact\n  HasDerivAt.lhopital_zero_left_on_Ioo hab (fun x hx => (hdf x hx).hasDerivAt) (fun x hx => (hdg x hx).hasDerivAt) hg'\n    hfb hgb hdiv\n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhdf : DifferentiableOn ℝ f (Ioi a)\nhg' : ∀ (x : ℝ), x ∈ Ioi a → deriv g x ≠ 0\nhftop : Tendsto f atTop (𝓝 0)\nhgtop : Tendsto g atTop (𝓝 0)\nhdiv : Tendsto (fun x => deriv f x / deriv g x) atTop l\n⊢ Tendsto (fun x => f x / g x) atTop l\n[PROOFSTEP]\nhave hdf : ∀ x ∈ Ioi a, DifferentiableAt ℝ f x := fun x hx => (hdf x hx).differentiableAt (Ioi_mem_nhds hx)\n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhdf✝ : DifferentiableOn ℝ f (Ioi a)\nhg' : ∀ (x : ℝ), x ∈ Ioi a → deriv g x ≠ 0\nhftop : Tendsto f atTop (𝓝 0)\nhgtop : Tendsto g atTop (𝓝 0)\nhdiv : Tendsto (fun x => deriv f x / deriv g x) atTop l\nhdf : ∀ (x : ℝ), x ∈ Ioi a → DifferentiableAt ℝ f x\n⊢ Tendsto (fun x => f x / g x) atTop l\n[PROOFSTEP]\nhave hdg : ∀ x ∈ Ioi a, DifferentiableAt ℝ g x := fun x hx =>\n  by_contradiction fun h => hg' x hx (deriv_zero_of_not_differentiableAt h)\n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhdf✝ : DifferentiableOn ℝ f (Ioi a)\nhg' : ∀ (x : ℝ), x ∈ Ioi a → deriv g x ≠ 0\nhftop : Tendsto f atTop (𝓝 0)\nhgtop : Tendsto g atTop (𝓝 0)\nhdiv : Tendsto (fun x => deriv f x / deriv g x) atTop l\nhdf : ∀ (x : ℝ), x ∈ Ioi a → DifferentiableAt ℝ f x\nhdg : ∀ (x : ℝ), x ∈ Ioi a → DifferentiableAt ℝ g x\n⊢ Tendsto (fun x => f x / g x) atTop l\n[PROOFSTEP]\nexact\n  HasDerivAt.lhopital_zero_atTop_on_Ioi (fun x hx => (hdf x hx).hasDerivAt) (fun x hx => (hdg x hx).hasDerivAt) hg'\n    hftop hgtop hdiv\n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhdf : DifferentiableOn ℝ f (Iio a)\nhg' : ∀ (x : ℝ), x ∈ Iio a → deriv g x ≠ 0\nhfbot : Tendsto f atBot (𝓝 0)\nhgbot : Tendsto g atBot (𝓝 0)\nhdiv : Tendsto (fun x => deriv f x / deriv g x) atBot l\n⊢ Tendsto (fun x => f x / g x) atBot l\n[PROOFSTEP]\nhave hdf : ∀ x ∈ Iio a, DifferentiableAt ℝ f x := fun x hx => (hdf x hx).differentiableAt (Iio_mem_nhds hx)\n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhdf✝ : DifferentiableOn ℝ f (Iio a)\nhg' : ∀ (x : ℝ), x ∈ Iio a → deriv g x ≠ 0\nhfbot : Tendsto f atBot (𝓝 0)\nhgbot : Tendsto g atBot (𝓝 0)\nhdiv : Tendsto (fun x => deriv f x / deriv g x) atBot l\nhdf : ∀ (x : ℝ), x ∈ Iio a → DifferentiableAt ℝ f x\n⊢ Tendsto (fun x => f x / g x) atBot l\n[PROOFSTEP]\nhave hdg : ∀ x ∈ Iio a, DifferentiableAt ℝ g x := fun x hx =>\n  by_contradiction fun h => hg' x hx (deriv_zero_of_not_differentiableAt h)\n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhdf✝ : DifferentiableOn ℝ f (Iio a)\nhg' : ∀ (x : ℝ), x ∈ Iio a → deriv g x ≠ 0\nhfbot : Tendsto f atBot (𝓝 0)\nhgbot : Tendsto g atBot (𝓝 0)\nhdiv : Tendsto (fun x => deriv f x / deriv g x) atBot l\nhdf : ∀ (x : ℝ), x ∈ Iio a → DifferentiableAt ℝ f x\nhdg : ∀ (x : ℝ), x ∈ Iio a → DifferentiableAt ℝ g x\n⊢ Tendsto (fun x => f x / g x) atBot l\n[PROOFSTEP]\nexact\n  HasDerivAt.lhopital_zero_atBot_on_Iio (fun x hx => (hdf x hx).hasDerivAt) (fun x hx => (hdg x hx).hasDerivAt) hg'\n    hfbot hgbot hdiv\n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ᶠ (x : ℝ) in 𝓝[Ioi a] a, HasDerivAt f (f' x) x\nhgg' : ∀ᶠ (x : ℝ) in 𝓝[Ioi a] a, HasDerivAt g (g' x) x\nhg' : ∀ᶠ (x : ℝ) in 𝓝[Ioi a] a, g' x ≠ 0\nhfa : Tendsto f (𝓝[Ioi a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Ioi a] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Ioi a] a) l\n⊢ Tendsto (fun x => f x / g x) (𝓝[Ioi a] a) l\n[PROOFSTEP]\nrw [eventually_iff_exists_mem] at *\n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∃ v, v ∈ 𝓝[Ioi a] a ∧ ∀ (y : ℝ), y ∈ v → HasDerivAt f (f' y) y\nhgg' : ∃ v, v ∈ 𝓝[Ioi a] a ∧ ∀ (y : ℝ), y ∈ v → HasDerivAt g (g' y) y\nhg' : ∃ v, v ∈ 𝓝[Ioi a] a ∧ ∀ (y : ℝ), y ∈ v → g' y ≠ 0\nhfa : Tendsto f (𝓝[Ioi a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Ioi a] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Ioi a] a) l\n⊢ Tendsto (fun x => f x / g x) (𝓝[Ioi a] a) l\n[PROOFSTEP]\nrcases hff' with ⟨s₁, hs₁, hff'⟩\n[GOAL]\ncase intro.intro\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhgg' : ∃ v, v ∈ 𝓝[Ioi a] a ∧ ∀ (y : ℝ), y ∈ v → HasDerivAt g (g' y) y\nhg' : ∃ v, v ∈ 𝓝[Ioi a] a ∧ ∀ (y : ℝ), y ∈ v → g' y ≠ 0\nhfa : Tendsto f (𝓝[Ioi a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Ioi a] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Ioi a] a) l\ns₁ : Set ℝ\nhs₁ : s₁ ∈ 𝓝[Ioi a] a\nhff' : ∀ (y : ℝ), y ∈ s₁ → HasDerivAt f (f' y) y\n⊢ Tendsto (fun x => f x / g x) (𝓝[Ioi a] a) l\n[PROOFSTEP]\nrcases hgg' with ⟨s₂, hs₂, hgg'⟩\n[GOAL]\ncase intro.intro.intro.intro\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhg' : ∃ v, v ∈ 𝓝[Ioi a] a ∧ ∀ (y : ℝ), y ∈ v → g' y ≠ 0\nhfa : Tendsto f (𝓝[Ioi a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Ioi a] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Ioi a] a) l\ns₁ : Set ℝ\nhs₁ : s₁ ∈ 𝓝[Ioi a] a\nhff' : ∀ (y : ℝ), y ∈ s₁ → HasDerivAt f (f' y) y\ns₂ : Set ℝ\nhs₂ : s₂ ∈ 𝓝[Ioi a] a\nhgg' : ∀ (y : ℝ), y ∈ s₂ → HasDerivAt g (g' y) y\n⊢ Tendsto (fun x => f x / g x) (𝓝[Ioi a] a) l\n[PROOFSTEP]\nrcases hg' with ⟨s₃, hs₃, hg'⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhfa : Tendsto f (𝓝[Ioi a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Ioi a] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Ioi a] a) l\ns₁ : Set ℝ\nhs₁ : s₁ ∈ 𝓝[Ioi a] a\nhff' : ∀ (y : ℝ), y ∈ s₁ → HasDerivAt f (f' y) y\ns₂ : Set ℝ\nhs₂ : s₂ ∈ 𝓝[Ioi a] a\nhgg' : ∀ (y : ℝ), y ∈ s₂ → HasDerivAt g (g' y) y\ns₃ : Set ℝ\nhs₃ : s₃ ∈ 𝓝[Ioi a] a\nhg' : ∀ (y : ℝ), y ∈ s₃ → g' y ≠ 0\n⊢ Tendsto (fun x => f x / g x) (𝓝[Ioi a] a) l\n[PROOFSTEP]\nlet s := s₁ ∩ s₂ ∩ s₃\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhfa : Tendsto f (𝓝[Ioi a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Ioi a] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Ioi a] a) l\ns₁ : Set ℝ\nhs₁ : s₁ ∈ 𝓝[Ioi a] a\nhff' : ∀ (y : ℝ), y ∈ s₁ → HasDerivAt f (f' y) y\ns₂ : Set ℝ\nhs₂ : s₂ ∈ 𝓝[Ioi a] a\nhgg' : ∀ (y : ℝ), y ∈ s₂ → HasDerivAt g (g' y) y\ns₃ : Set ℝ\nhs₃ : s₃ ∈ 𝓝[Ioi a] a\nhg' : ∀ (y : ℝ), y ∈ s₃ → g' y ≠ 0\ns : Set ℝ := s₁ ∩ s₂ ∩ s₃\n⊢ Tendsto (fun x => f x / g x) (𝓝[Ioi a] a) l\n[PROOFSTEP]\nhave hs : s ∈ 𝓝[>] a := inter_mem (inter_mem hs₁ hs₂) hs₃\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhfa : Tendsto f (𝓝[Ioi a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Ioi a] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Ioi a] a) l\ns₁ : Set ℝ\nhs₁ : s₁ ∈ 𝓝[Ioi a] a\nhff' : ∀ (y : ℝ), y ∈ s₁ → HasDerivAt f (f' y) y\ns₂ : Set ℝ\nhs₂ : s₂ ∈ 𝓝[Ioi a] a\nhgg' : ∀ (y : ℝ), y ∈ s₂ → HasDerivAt g (g' y) y\ns₃ : Set ℝ\nhs₃ : s₃ ∈ 𝓝[Ioi a] a\nhg' : ∀ (y : ℝ), y ∈ s₃ → g' y ≠ 0\ns : Set ℝ := s₁ ∩ s₂ ∩ s₃\nhs : s ∈ 𝓝[Ioi a] a\n⊢ Tendsto (fun x => f x / g x) (𝓝[Ioi a] a) l\n[PROOFSTEP]\nrw [mem_nhdsWithin_Ioi_iff_exists_Ioo_subset] at hs \n[GOAL]\ncase intro.intro.intro.intro.intro.intro\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhfa : Tendsto f (𝓝[Ioi a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Ioi a] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Ioi a] a) l\ns₁ : Set ℝ\nhs₁ : s₁ ∈ 𝓝[Ioi a] a\nhff' : ∀ (y : ℝ), y ∈ s₁ → HasDerivAt f (f' y) y\ns₂ : Set ℝ\nhs₂ : s₂ ∈ 𝓝[Ioi a] a\nhgg' : ∀ (y : ℝ), y ∈ s₂ → HasDerivAt g (g' y) y\ns₃ : Set ℝ\nhs₃ : s₃ ∈ 𝓝[Ioi a] a\nhg' : ∀ (y : ℝ), y ∈ s₃ → g' y ≠ 0\ns : Set ℝ := s₁ ∩ s₂ ∩ s₃\nhs : ∃ u, u ∈ Ioi a ∧ Ioo a u ⊆ s\n⊢ Tendsto (fun x => f x / g x) (𝓝[Ioi a] a) l\n[PROOFSTEP]\nrcases hs with ⟨u, hau, hu⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhfa : Tendsto f (𝓝[Ioi a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Ioi a] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Ioi a] a) l\ns₁ : Set ℝ\nhs₁ : s₁ ∈ 𝓝[Ioi a] a\nhff' : ∀ (y : ℝ), y ∈ s₁ → HasDerivAt f (f' y) y\ns₂ : Set ℝ\nhs₂ : s₂ ∈ 𝓝[Ioi a] a\nhgg' : ∀ (y : ℝ), y ∈ s₂ → HasDerivAt g (g' y) y\ns₃ : Set ℝ\nhs₃ : s₃ ∈ 𝓝[Ioi a] a\nhg' : ∀ (y : ℝ), y ∈ s₃ → g' y ≠ 0\ns : Set ℝ := s₁ ∩ s₂ ∩ s₃\nu : ℝ\nhau : u ∈ Ioi a\nhu : Ioo a u ⊆ s\n⊢ Tendsto (fun x => f x / g x) (𝓝[Ioi a] a) l\n[PROOFSTEP]\nrefine' lhopital_zero_right_on_Ioo hau _ _ _ hfa hga hdiv\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.refine'_1\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhfa : Tendsto f (𝓝[Ioi a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Ioi a] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Ioi a] a) l\ns₁ : Set ℝ\nhs₁ : s₁ ∈ 𝓝[Ioi a] a\nhff' : ∀ (y : ℝ), y ∈ s₁ → HasDerivAt f (f' y) y\ns₂ : Set ℝ\nhs₂ : s₂ ∈ 𝓝[Ioi a] a\nhgg' : ∀ (y : ℝ), y ∈ s₂ → HasDerivAt g (g' y) y\ns₃ : Set ℝ\nhs₃ : s₃ ∈ 𝓝[Ioi a] a\nhg' : ∀ (y : ℝ), y ∈ s₃ → g' y ≠ 0\ns : Set ℝ := s₁ ∩ s₂ ∩ s₃\nu : ℝ\nhau : u ∈ Ioi a\nhu : Ioo a u ⊆ s\n⊢ ∀ (x : ℝ), x ∈ Ioo a u → HasDerivAt (fun x => f x) (f' x) x\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.refine'_2\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhfa : Tendsto f (𝓝[Ioi a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Ioi a] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Ioi a] a) l\ns₁ : Set ℝ\nhs₁ : s₁ ∈ 𝓝[Ioi a] a\nhff' : ∀ (y : ℝ), y ∈ s₁ → HasDerivAt f (f' y) y\ns₂ : Set ℝ\nhs₂ : s₂ ∈ 𝓝[Ioi a] a\nhgg' : ∀ (y : ℝ), y ∈ s₂ → HasDerivAt g (g' y) y\ns₃ : Set ℝ\nhs₃ : s₃ ∈ 𝓝[Ioi a] a\nhg' : ∀ (y : ℝ), y ∈ s₃ → g' y ≠ 0\ns : Set ℝ := s₁ ∩ s₂ ∩ s₃\nu : ℝ\nhau : u ∈ Ioi a\nhu : Ioo a u ⊆ s\n⊢ ∀ (x : ℝ), x ∈ Ioo a u → HasDerivAt (fun x => g x) (g' x) x\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.refine'_3\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhfa : Tendsto f (𝓝[Ioi a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Ioi a] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Ioi a] a) l\ns₁ : Set ℝ\nhs₁ : s₁ ∈ 𝓝[Ioi a] a\nhff' : ∀ (y : ℝ), y ∈ s₁ → HasDerivAt f (f' y) y\ns₂ : Set ℝ\nhs₂ : s₂ ∈ 𝓝[Ioi a] a\nhgg' : ∀ (y : ℝ), y ∈ s₂ → HasDerivAt g (g' y) y\ns₃ : Set ℝ\nhs₃ : s₃ ∈ 𝓝[Ioi a] a\nhg' : ∀ (y : ℝ), y ∈ s₃ → g' y ≠ 0\ns : Set ℝ := s₁ ∩ s₂ ∩ s₃\nu : ℝ\nhau : u ∈ Ioi a\nhu : Ioo a u ⊆ s\n⊢ ∀ (x : ℝ), x ∈ Ioo a u → g' x ≠ 0\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.refine'_1\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhfa : Tendsto f (𝓝[Ioi a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Ioi a] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Ioi a] a) l\ns₁ : Set ℝ\nhs₁ : s₁ ∈ 𝓝[Ioi a] a\nhff' : ∀ (y : ℝ), y ∈ s₁ → HasDerivAt f (f' y) y\ns₂ : Set ℝ\nhs₂ : s₂ ∈ 𝓝[Ioi a] a\nhgg' : ∀ (y : ℝ), y ∈ s₂ → HasDerivAt g (g' y) y\ns₃ : Set ℝ\nhs₃ : s₃ ∈ 𝓝[Ioi a] a\nhg' : ∀ (y : ℝ), y ∈ s₃ → g' y ≠ 0\ns : Set ℝ := s₁ ∩ s₂ ∩ s₃\nu : ℝ\nhau : u ∈ Ioi a\nhu : Ioo a u ⊆ s\nx : ℝ\nhx : x ∈ Ioo a u\n⊢ HasDerivAt (fun x => f x) (f' x) x\n[PROOFSTEP]\napply_assumption\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.refine'_2\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhfa : Tendsto f (𝓝[Ioi a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Ioi a] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Ioi a] a) l\ns₁ : Set ℝ\nhs₁ : s₁ ∈ 𝓝[Ioi a] a\nhff' : ∀ (y : ℝ), y ∈ s₁ → HasDerivAt f (f' y) y\ns₂ : Set ℝ\nhs₂ : s₂ ∈ 𝓝[Ioi a] a\nhgg' : ∀ (y : ℝ), y ∈ s₂ → HasDerivAt g (g' y) y\ns₃ : Set ℝ\nhs₃ : s₃ ∈ 𝓝[Ioi a] a\nhg' : ∀ (y : ℝ), y ∈ s₃ → g' y ≠ 0\ns : Set ℝ := s₁ ∩ s₂ ∩ s₃\nu : ℝ\nhau : u ∈ Ioi a\nhu : Ioo a u ⊆ s\nx : ℝ\nhx : x ∈ Ioo a u\n⊢ HasDerivAt (fun x => g x) (g' x) x\n[PROOFSTEP]\napply_assumption\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.refine'_3\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhfa : Tendsto f (𝓝[Ioi a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Ioi a] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Ioi a] a) l\ns₁ : Set ℝ\nhs₁ : s₁ ∈ 𝓝[Ioi a] a\nhff' : ∀ (y : ℝ), y ∈ s₁ → HasDerivAt f (f' y) y\ns₂ : Set ℝ\nhs₂ : s₂ ∈ 𝓝[Ioi a] a\nhgg' : ∀ (y : ℝ), y ∈ s₂ → HasDerivAt g (g' y) y\ns₃ : Set ℝ\nhs₃ : s₃ ∈ 𝓝[Ioi a] a\nhg' : ∀ (y : ℝ), y ∈ s₃ → g' y ≠ 0\ns : Set ℝ := s₁ ∩ s₂ ∩ s₃\nu : ℝ\nhau : u ∈ Ioi a\nhu : Ioo a u ⊆ s\nx : ℝ\nhx : x ∈ Ioo a u\n⊢ g' x ≠ 0\n[PROOFSTEP]\napply_assumption\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.refine'_1.a\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhfa : Tendsto f (𝓝[Ioi a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Ioi a] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Ioi a] a) l\ns₁ : Set ℝ\nhs₁ : s₁ ∈ 𝓝[Ioi a] a\nhff' : ∀ (y : ℝ), y ∈ s₁ → HasDerivAt f (f' y) y\ns₂ : Set ℝ\nhs₂ : s₂ ∈ 𝓝[Ioi a] a\nhgg' : ∀ (y : ℝ), y ∈ s₂ → HasDerivAt g (g' y) y\ns₃ : Set ℝ\nhs₃ : s₃ ∈ 𝓝[Ioi a] a\nhg' : ∀ (y : ℝ), y ∈ s₃ → g' y ≠ 0\ns : Set ℝ := s₁ ∩ s₂ ∩ s₃\nu : ℝ\nhau : u ∈ Ioi a\nhu : Ioo a u ⊆ s\nx : ℝ\nhx : x ∈ Ioo a u\n⊢ x ∈ s₁\n[PROOFSTEP]\nfirst\n| exact (hu hx).1.1\n| exact (hu hx).1.2\n| exact (hu hx).2\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.refine'_1.a\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhfa : Tendsto f (𝓝[Ioi a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Ioi a] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Ioi a] a) l\ns₁ : Set ℝ\nhs₁ : s₁ ∈ 𝓝[Ioi a] a\nhff' : ∀ (y : ℝ), y ∈ s₁ → HasDerivAt f (f' y) y\ns₂ : Set ℝ\nhs₂ : s₂ ∈ 𝓝[Ioi a] a\nhgg' : ∀ (y : ℝ), y ∈ s₂ → HasDerivAt g (g' y) y\ns₃ : Set ℝ\nhs₃ : s₃ ∈ 𝓝[Ioi a] a\nhg' : ∀ (y : ℝ), y ∈ s₃ → g' y ≠ 0\ns : Set ℝ := s₁ ∩ s₂ ∩ s₃\nu : ℝ\nhau : u ∈ Ioi a\nhu : Ioo a u ⊆ s\nx : ℝ\nhx : x ∈ Ioo a u\n⊢ x ∈ s₁\n[PROOFSTEP]\nexact (hu hx).1.1\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.refine'_2.a\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhfa : Tendsto f (𝓝[Ioi a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Ioi a] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Ioi a] a) l\ns₁ : Set ℝ\nhs₁ : s₁ ∈ 𝓝[Ioi a] a\nhff' : ∀ (y : ℝ), y ∈ s₁ → HasDerivAt f (f' y) y\ns₂ : Set ℝ\nhs₂ : s₂ ∈ 𝓝[Ioi a] a\nhgg' : ∀ (y : ℝ), y ∈ s₂ → HasDerivAt g (g' y) y\ns₃ : Set ℝ\nhs₃ : s₃ ∈ 𝓝[Ioi a] a\nhg' : ∀ (y : ℝ), y ∈ s₃ → g' y ≠ 0\ns : Set ℝ := s₁ ∩ s₂ ∩ s₃\nu : ℝ\nhau : u ∈ Ioi a\nhu : Ioo a u ⊆ s\nx : ℝ\nhx : x ∈ Ioo a u\n⊢ x ∈ s₂\n[PROOFSTEP]\nfirst\n| exact (hu hx).1.1\n| exact (hu hx).1.2\n| exact (hu hx).2\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.refine'_2.a\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhfa : Tendsto f (𝓝[Ioi a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Ioi a] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Ioi a] a) l\ns₁ : Set ℝ\nhs₁ : s₁ ∈ 𝓝[Ioi a] a\nhff' : ∀ (y : ℝ), y ∈ s₁ → HasDerivAt f (f' y) y\ns₂ : Set ℝ\nhs₂ : s₂ ∈ 𝓝[Ioi a] a\nhgg' : ∀ (y : ℝ), y ∈ s₂ → HasDerivAt g (g' y) y\ns₃ : Set ℝ\nhs₃ : s₃ ∈ 𝓝[Ioi a] a\nhg' : ∀ (y : ℝ), y ∈ s₃ → g' y ≠ 0\ns : Set ℝ := s₁ ∩ s₂ ∩ s₃\nu : ℝ\nhau : u ∈ Ioi a\nhu : Ioo a u ⊆ s\nx : ℝ\nhx : x ∈ Ioo a u\n⊢ x ∈ s₂\n[PROOFSTEP]\nexact (hu hx).1.1\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.refine'_2.a\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhfa : Tendsto f (𝓝[Ioi a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Ioi a] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Ioi a] a) l\ns₁ : Set ℝ\nhs₁ : s₁ ∈ 𝓝[Ioi a] a\nhff' : ∀ (y : ℝ), y ∈ s₁ → HasDerivAt f (f' y) y\ns₂ : Set ℝ\nhs₂ : s₂ ∈ 𝓝[Ioi a] a\nhgg' : ∀ (y : ℝ), y ∈ s₂ → HasDerivAt g (g' y) y\ns₃ : Set ℝ\nhs₃ : s₃ ∈ 𝓝[Ioi a] a\nhg' : ∀ (y : ℝ), y ∈ s₃ → g' y ≠ 0\ns : Set ℝ := s₁ ∩ s₂ ∩ s₃\nu : ℝ\nhau : u ∈ Ioi a\nhu : Ioo a u ⊆ s\nx : ℝ\nhx : x ∈ Ioo a u\n⊢ x ∈ s₂\n[PROOFSTEP]\nexact (hu hx).1.2\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.refine'_3.a\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhfa : Tendsto f (𝓝[Ioi a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Ioi a] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Ioi a] a) l\ns₁ : Set ℝ\nhs₁ : s₁ ∈ 𝓝[Ioi a] a\nhff' : ∀ (y : ℝ), y ∈ s₁ → HasDerivAt f (f' y) y\ns₂ : Set ℝ\nhs₂ : s₂ ∈ 𝓝[Ioi a] a\nhgg' : ∀ (y : ℝ), y ∈ s₂ → HasDerivAt g (g' y) y\ns₃ : Set ℝ\nhs₃ : s₃ ∈ 𝓝[Ioi a] a\nhg' : ∀ (y : ℝ), y ∈ s₃ → g' y ≠ 0\ns : Set ℝ := s₁ ∩ s₂ ∩ s₃\nu : ℝ\nhau : u ∈ Ioi a\nhu : Ioo a u ⊆ s\nx : ℝ\nhx : x ∈ Ioo a u\n⊢ x ∈ s₃\n[PROOFSTEP]\nfirst\n| exact (hu hx).1.1\n| exact (hu hx).1.2\n| exact (hu hx).2\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.refine'_3.a\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhfa : Tendsto f (𝓝[Ioi a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Ioi a] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Ioi a] a) l\ns₁ : Set ℝ\nhs₁ : s₁ ∈ 𝓝[Ioi a] a\nhff' : ∀ (y : ℝ), y ∈ s₁ → HasDerivAt f (f' y) y\ns₂ : Set ℝ\nhs₂ : s₂ ∈ 𝓝[Ioi a] a\nhgg' : ∀ (y : ℝ), y ∈ s₂ → HasDerivAt g (g' y) y\ns₃ : Set ℝ\nhs₃ : s₃ ∈ 𝓝[Ioi a] a\nhg' : ∀ (y : ℝ), y ∈ s₃ → g' y ≠ 0\ns : Set ℝ := s₁ ∩ s₂ ∩ s₃\nu : ℝ\nhau : u ∈ Ioi a\nhu : Ioo a u ⊆ s\nx : ℝ\nhx : x ∈ Ioo a u\n⊢ x ∈ s₃\n[PROOFSTEP]\nexact (hu hx).1.1\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.refine'_3.a\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhfa : Tendsto f (𝓝[Ioi a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Ioi a] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Ioi a] a) l\ns₁ : Set ℝ\nhs₁ : s₁ ∈ 𝓝[Ioi a] a\nhff' : ∀ (y : ℝ), y ∈ s₁ → HasDerivAt f (f' y) y\ns₂ : Set ℝ\nhs₂ : s₂ ∈ 𝓝[Ioi a] a\nhgg' : ∀ (y : ℝ), y ∈ s₂ → HasDerivAt g (g' y) y\ns₃ : Set ℝ\nhs₃ : s₃ ∈ 𝓝[Ioi a] a\nhg' : ∀ (y : ℝ), y ∈ s₃ → g' y ≠ 0\ns : Set ℝ := s₁ ∩ s₂ ∩ s₃\nu : ℝ\nhau : u ∈ Ioi a\nhu : Ioo a u ⊆ s\nx : ℝ\nhx : x ∈ Ioo a u\n⊢ x ∈ s₃\n[PROOFSTEP]\nexact (hu hx).1.2\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.refine'_3.a\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhfa : Tendsto f (𝓝[Ioi a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Ioi a] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Ioi a] a) l\ns₁ : Set ℝ\nhs₁ : s₁ ∈ 𝓝[Ioi a] a\nhff' : ∀ (y : ℝ), y ∈ s₁ → HasDerivAt f (f' y) y\ns₂ : Set ℝ\nhs₂ : s₂ ∈ 𝓝[Ioi a] a\nhgg' : ∀ (y : ℝ), y ∈ s₂ → HasDerivAt g (g' y) y\ns₃ : Set ℝ\nhs₃ : s₃ ∈ 𝓝[Ioi a] a\nhg' : ∀ (y : ℝ), y ∈ s₃ → g' y ≠ 0\ns : Set ℝ := s₁ ∩ s₂ ∩ s₃\nu : ℝ\nhau : u ∈ Ioi a\nhu : Ioo a u ⊆ s\nx : ℝ\nhx : x ∈ Ioo a u\n⊢ x ∈ s₃\n[PROOFSTEP]\nexact (hu hx).2\n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ᶠ (x : ℝ) in 𝓝[Iio a] a, HasDerivAt f (f' x) x\nhgg' : ∀ᶠ (x : ℝ) in 𝓝[Iio a] a, HasDerivAt g (g' x) x\nhg' : ∀ᶠ (x : ℝ) in 𝓝[Iio a] a, g' x ≠ 0\nhfa : Tendsto f (𝓝[Iio a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Iio a] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Iio a] a) l\n⊢ Tendsto (fun x => f x / g x) (𝓝[Iio a] a) l\n[PROOFSTEP]\nrw [eventually_iff_exists_mem] at *\n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∃ v, v ∈ 𝓝[Iio a] a ∧ ∀ (y : ℝ), y ∈ v → HasDerivAt f (f' y) y\nhgg' : ∃ v, v ∈ 𝓝[Iio a] a ∧ ∀ (y : ℝ), y ∈ v → HasDerivAt g (g' y) y\nhg' : ∃ v, v ∈ 𝓝[Iio a] a ∧ ∀ (y : ℝ), y ∈ v → g' y ≠ 0\nhfa : Tendsto f (𝓝[Iio a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Iio a] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Iio a] a) l\n⊢ Tendsto (fun x => f x / g x) (𝓝[Iio a] a) l\n[PROOFSTEP]\nrcases hff' with ⟨s₁, hs₁, hff'⟩\n[GOAL]\ncase intro.intro\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhgg' : ∃ v, v ∈ 𝓝[Iio a] a ∧ ∀ (y : ℝ), y ∈ v → HasDerivAt g (g' y) y\nhg' : ∃ v, v ∈ 𝓝[Iio a] a ∧ ∀ (y : ℝ), y ∈ v → g' y ≠ 0\nhfa : Tendsto f (𝓝[Iio a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Iio a] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Iio a] a) l\ns₁ : Set ℝ\nhs₁ : s₁ ∈ 𝓝[Iio a] a\nhff' : ∀ (y : ℝ), y ∈ s₁ → HasDerivAt f (f' y) y\n⊢ Tendsto (fun x => f x / g x) (𝓝[Iio a] a) l\n[PROOFSTEP]\nrcases hgg' with ⟨s₂, hs₂, hgg'⟩\n[GOAL]\ncase intro.intro.intro.intro\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhg' : ∃ v, v ∈ 𝓝[Iio a] a ∧ ∀ (y : ℝ), y ∈ v → g' y ≠ 0\nhfa : Tendsto f (𝓝[Iio a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Iio a] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Iio a] a) l\ns₁ : Set ℝ\nhs₁ : s₁ ∈ 𝓝[Iio a] a\nhff' : ∀ (y : ℝ), y ∈ s₁ → HasDerivAt f (f' y) y\ns₂ : Set ℝ\nhs₂ : s₂ ∈ 𝓝[Iio a] a\nhgg' : ∀ (y : ℝ), y ∈ s₂ → HasDerivAt g (g' y) y\n⊢ Tendsto (fun x => f x / g x) (𝓝[Iio a] a) l\n[PROOFSTEP]\nrcases hg' with ⟨s₃, hs₃, hg'⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhfa : Tendsto f (𝓝[Iio a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Iio a] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Iio a] a) l\ns₁ : Set ℝ\nhs₁ : s₁ ∈ 𝓝[Iio a] a\nhff' : ∀ (y : ℝ), y ∈ s₁ → HasDerivAt f (f' y) y\ns₂ : Set ℝ\nhs₂ : s₂ ∈ 𝓝[Iio a] a\nhgg' : ∀ (y : ℝ), y ∈ s₂ → HasDerivAt g (g' y) y\ns₃ : Set ℝ\nhs₃ : s₃ ∈ 𝓝[Iio a] a\nhg' : ∀ (y : ℝ), y ∈ s₃ → g' y ≠ 0\n⊢ Tendsto (fun x => f x / g x) (𝓝[Iio a] a) l\n[PROOFSTEP]\nlet s := s₁ ∩ s₂ ∩ s₃\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhfa : Tendsto f (𝓝[Iio a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Iio a] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Iio a] a) l\ns₁ : Set ℝ\nhs₁ : s₁ ∈ 𝓝[Iio a] a\nhff' : ∀ (y : ℝ), y ∈ s₁ → HasDerivAt f (f' y) y\ns₂ : Set ℝ\nhs₂ : s₂ ∈ 𝓝[Iio a] a\nhgg' : ∀ (y : ℝ), y ∈ s₂ → HasDerivAt g (g' y) y\ns₃ : Set ℝ\nhs₃ : s₃ ∈ 𝓝[Iio a] a\nhg' : ∀ (y : ℝ), y ∈ s₃ → g' y ≠ 0\ns : Set ℝ := s₁ ∩ s₂ ∩ s₃\n⊢ Tendsto (fun x => f x / g x) (𝓝[Iio a] a) l\n[PROOFSTEP]\nhave hs : s ∈ 𝓝[<] a := inter_mem (inter_mem hs₁ hs₂) hs₃\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhfa : Tendsto f (𝓝[Iio a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Iio a] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Iio a] a) l\ns₁ : Set ℝ\nhs₁ : s₁ ∈ 𝓝[Iio a] a\nhff' : ∀ (y : ℝ), y ∈ s₁ → HasDerivAt f (f' y) y\ns₂ : Set ℝ\nhs₂ : s₂ ∈ 𝓝[Iio a] a\nhgg' : ∀ (y : ℝ), y ∈ s₂ → HasDerivAt g (g' y) y\ns₃ : Set ℝ\nhs₃ : s₃ ∈ 𝓝[Iio a] a\nhg' : ∀ (y : ℝ), y ∈ s₃ → g' y ≠ 0\ns : Set ℝ := s₁ ∩ s₂ ∩ s₃\nhs : s ∈ 𝓝[Iio a] a\n⊢ Tendsto (fun x => f x / g x) (𝓝[Iio a] a) l\n[PROOFSTEP]\nrw [mem_nhdsWithin_Iio_iff_exists_Ioo_subset] at hs \n[GOAL]\ncase intro.intro.intro.intro.intro.intro\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhfa : Tendsto f (𝓝[Iio a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Iio a] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Iio a] a) l\ns₁ : Set ℝ\nhs₁ : s₁ ∈ 𝓝[Iio a] a\nhff' : ∀ (y : ℝ), y ∈ s₁ → HasDerivAt f (f' y) y\ns₂ : Set ℝ\nhs₂ : s₂ ∈ 𝓝[Iio a] a\nhgg' : ∀ (y : ℝ), y ∈ s₂ → HasDerivAt g (g' y) y\ns₃ : Set ℝ\nhs₃ : s₃ ∈ 𝓝[Iio a] a\nhg' : ∀ (y : ℝ), y ∈ s₃ → g' y ≠ 0\ns : Set ℝ := s₁ ∩ s₂ ∩ s₃\nhs : ∃ l, l ∈ Iio a ∧ Ioo l a ⊆ s\n⊢ Tendsto (fun x => f x / g x) (𝓝[Iio a] a) l\n[PROOFSTEP]\nrcases hs with ⟨l, hal, hl⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\na b : ℝ\nhab : a < b\nl✝ : Filter ℝ\nf f' g g' : ℝ → ℝ\nhfa : Tendsto f (𝓝[Iio a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Iio a] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Iio a] a) l✝\ns₁ : Set ℝ\nhs₁ : s₁ ∈ 𝓝[Iio a] a\nhff' : ∀ (y : ℝ), y ∈ s₁ → HasDerivAt f (f' y) y\ns₂ : Set ℝ\nhs₂ : s₂ ∈ 𝓝[Iio a] a\nhgg' : ∀ (y : ℝ), y ∈ s₂ → HasDerivAt g (g' y) y\ns₃ : Set ℝ\nhs₃ : s₃ ∈ 𝓝[Iio a] a\nhg' : ∀ (y : ℝ), y ∈ s₃ → g' y ≠ 0\ns : Set ℝ := s₁ ∩ s₂ ∩ s₃\nl : ℝ\nhal : l ∈ Iio a\nhl : Ioo l a ⊆ s\n⊢ Tendsto (fun x => f x / g x) (𝓝[Iio a] a) l✝\n[PROOFSTEP]\nrefine' lhopital_zero_left_on_Ioo hal _ _ _ hfa hga hdiv\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.refine'_1\na b : ℝ\nhab : a < b\nl✝ : Filter ℝ\nf f' g g' : ℝ → ℝ\nhfa : Tendsto f (𝓝[Iio a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Iio a] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Iio a] a) l✝\ns₁ : Set ℝ\nhs₁ : s₁ ∈ 𝓝[Iio a] a\nhff' : ∀ (y : ℝ), y ∈ s₁ → HasDerivAt f (f' y) y\ns₂ : Set ℝ\nhs₂ : s₂ ∈ 𝓝[Iio a] a\nhgg' : ∀ (y : ℝ), y ∈ s₂ → HasDerivAt g (g' y) y\ns₃ : Set ℝ\nhs₃ : s₃ ∈ 𝓝[Iio a] a\nhg' : ∀ (y : ℝ), y ∈ s₃ → g' y ≠ 0\ns : Set ℝ := s₁ ∩ s₂ ∩ s₃\nl : ℝ\nhal : l ∈ Iio a\nhl : Ioo l a ⊆ s\n⊢ ∀ (x : ℝ), x ∈ Ioo l a → HasDerivAt (fun x => f x) (f' x) x\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.refine'_2\na b : ℝ\nhab : a < b\nl✝ : Filter ℝ\nf f' g g' : ℝ → ℝ\nhfa : Tendsto f (𝓝[Iio a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Iio a] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Iio a] a) l✝\ns₁ : Set ℝ\nhs₁ : s₁ ∈ 𝓝[Iio a] a\nhff' : ∀ (y : ℝ), y ∈ s₁ → HasDerivAt f (f' y) y\ns₂ : Set ℝ\nhs₂ : s₂ ∈ 𝓝[Iio a] a\nhgg' : ∀ (y : ℝ), y ∈ s₂ → HasDerivAt g (g' y) y\ns₃ : Set ℝ\nhs₃ : s₃ ∈ 𝓝[Iio a] a\nhg' : ∀ (y : ℝ), y ∈ s₃ → g' y ≠ 0\ns : Set ℝ := s₁ ∩ s₂ ∩ s₃\nl : ℝ\nhal : l ∈ Iio a\nhl : Ioo l a ⊆ s\n⊢ ∀ (x : ℝ), x ∈ Ioo l a → HasDerivAt (fun x => g x) (g' x) x\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.refine'_3\na b : ℝ\nhab : a < b\nl✝ : Filter ℝ\nf f' g g' : ℝ → ℝ\nhfa : Tendsto f (𝓝[Iio a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Iio a] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Iio a] a) l✝\ns₁ : Set ℝ\nhs₁ : s₁ ∈ 𝓝[Iio a] a\nhff' : ∀ (y : ℝ), y ∈ s₁ → HasDerivAt f (f' y) y\ns₂ : Set ℝ\nhs₂ : s₂ ∈ 𝓝[Iio a] a\nhgg' : ∀ (y : ℝ), y ∈ s₂ → HasDerivAt g (g' y) y\ns₃ : Set ℝ\nhs₃ : s₃ ∈ 𝓝[Iio a] a\nhg' : ∀ (y : ℝ), y ∈ s₃ → g' y ≠ 0\ns : Set ℝ := s₁ ∩ s₂ ∩ s₃\nl : ℝ\nhal : l ∈ Iio a\nhl : Ioo l a ⊆ s\n⊢ ∀ (x : ℝ), x ∈ Ioo l a → g' x ≠ 0\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.refine'_1\na b : ℝ\nhab : a < b\nl✝ : Filter ℝ\nf f' g g' : ℝ → ℝ\nhfa : Tendsto f (𝓝[Iio a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Iio a] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Iio a] a) l✝\ns₁ : Set ℝ\nhs₁ : s₁ ∈ 𝓝[Iio a] a\nhff' : ∀ (y : ℝ), y ∈ s₁ → HasDerivAt f (f' y) y\ns₂ : Set ℝ\nhs₂ : s₂ ∈ 𝓝[Iio a] a\nhgg' : ∀ (y : ℝ), y ∈ s₂ → HasDerivAt g (g' y) y\ns₃ : Set ℝ\nhs₃ : s₃ ∈ 𝓝[Iio a] a\nhg' : ∀ (y : ℝ), y ∈ s₃ → g' y ≠ 0\ns : Set ℝ := s₁ ∩ s₂ ∩ s₃\nl : ℝ\nhal : l ∈ Iio a\nhl : Ioo l a ⊆ s\nx : ℝ\nhx : x ∈ Ioo l a\n⊢ HasDerivAt (fun x => f x) (f' x) x\n[PROOFSTEP]\napply_assumption\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.refine'_2\na b : ℝ\nhab : a < b\nl✝ : Filter ℝ\nf f' g g' : ℝ → ℝ\nhfa : Tendsto f (𝓝[Iio a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Iio a] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Iio a] a) l✝\ns₁ : Set ℝ\nhs₁ : s₁ ∈ 𝓝[Iio a] a\nhff' : ∀ (y : ℝ), y ∈ s₁ → HasDerivAt f (f' y) y\ns₂ : Set ℝ\nhs₂ : s₂ ∈ 𝓝[Iio a] a\nhgg' : ∀ (y : ℝ), y ∈ s₂ → HasDerivAt g (g' y) y\ns₃ : Set ℝ\nhs₃ : s₃ ∈ 𝓝[Iio a] a\nhg' : ∀ (y : ℝ), y ∈ s₃ → g' y ≠ 0\ns : Set ℝ := s₁ ∩ s₂ ∩ s₃\nl : ℝ\nhal : l ∈ Iio a\nhl : Ioo l a ⊆ s\nx : ℝ\nhx : x ∈ Ioo l a\n⊢ HasDerivAt (fun x => g x) (g' x) x\n[PROOFSTEP]\napply_assumption\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.refine'_3\na b : ℝ\nhab : a < b\nl✝ : Filter ℝ\nf f' g g' : ℝ → ℝ\nhfa : Tendsto f (𝓝[Iio a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Iio a] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Iio a] a) l✝\ns₁ : Set ℝ\nhs₁ : s₁ ∈ 𝓝[Iio a] a\nhff' : ∀ (y : ℝ), y ∈ s₁ → HasDerivAt f (f' y) y\ns₂ : Set ℝ\nhs₂ : s₂ ∈ 𝓝[Iio a] a\nhgg' : ∀ (y : ℝ), y ∈ s₂ → HasDerivAt g (g' y) y\ns₃ : Set ℝ\nhs₃ : s₃ ∈ 𝓝[Iio a] a\nhg' : ∀ (y : ℝ), y ∈ s₃ → g' y ≠ 0\ns : Set ℝ := s₁ ∩ s₂ ∩ s₃\nl : ℝ\nhal : l ∈ Iio a\nhl : Ioo l a ⊆ s\nx : ℝ\nhx : x ∈ Ioo l a\n⊢ g' x ≠ 0\n[PROOFSTEP]\napply_assumption\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.refine'_1.a\na b : ℝ\nhab : a < b\nl✝ : Filter ℝ\nf f' g g' : ℝ → ℝ\nhfa : Tendsto f (𝓝[Iio a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Iio a] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Iio a] a) l✝\ns₁ : Set ℝ\nhs₁ : s₁ ∈ 𝓝[Iio a] a\nhff' : ∀ (y : ℝ), y ∈ s₁ → HasDerivAt f (f' y) y\ns₂ : Set ℝ\nhs₂ : s₂ ∈ 𝓝[Iio a] a\nhgg' : ∀ (y : ℝ), y ∈ s₂ → HasDerivAt g (g' y) y\ns₃ : Set ℝ\nhs₃ : s₃ ∈ 𝓝[Iio a] a\nhg' : ∀ (y : ℝ), y ∈ s₃ → g' y ≠ 0\ns : Set ℝ := s₁ ∩ s₂ ∩ s₃\nl : ℝ\nhal : l ∈ Iio a\nhl : Ioo l a ⊆ s\nx : ℝ\nhx : x ∈ Ioo l a\n⊢ x ∈ s₁\n[PROOFSTEP]\nfirst\n| exact (hl hx).1.1\n| exact (hl hx).1.2\n| exact (hl hx).2\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.refine'_1.a\na b : ℝ\nhab : a < b\nl✝ : Filter ℝ\nf f' g g' : ℝ → ℝ\nhfa : Tendsto f (𝓝[Iio a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Iio a] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Iio a] a) l✝\ns₁ : Set ℝ\nhs₁ : s₁ ∈ 𝓝[Iio a] a\nhff' : ∀ (y : ℝ), y ∈ s₁ → HasDerivAt f (f' y) y\ns₂ : Set ℝ\nhs₂ : s₂ ∈ 𝓝[Iio a] a\nhgg' : ∀ (y : ℝ), y ∈ s₂ → HasDerivAt g (g' y) y\ns₃ : Set ℝ\nhs₃ : s₃ ∈ 𝓝[Iio a] a\nhg' : ∀ (y : ℝ), y ∈ s₃ → g' y ≠ 0\ns : Set ℝ := s₁ ∩ s₂ ∩ s₃\nl : ℝ\nhal : l ∈ Iio a\nhl : Ioo l a ⊆ s\nx : ℝ\nhx : x ∈ Ioo l a\n⊢ x ∈ s₁\n[PROOFSTEP]\nexact (hl hx).1.1\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.refine'_2.a\na b : ℝ\nhab : a < b\nl✝ : Filter ℝ\nf f' g g' : ℝ → ℝ\nhfa : Tendsto f (𝓝[Iio a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Iio a] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Iio a] a) l✝\ns₁ : Set ℝ\nhs₁ : s₁ ∈ 𝓝[Iio a] a\nhff' : ∀ (y : ℝ), y ∈ s₁ → HasDerivAt f (f' y) y\ns₂ : Set ℝ\nhs₂ : s₂ ∈ 𝓝[Iio a] a\nhgg' : ∀ (y : ℝ), y ∈ s₂ → HasDerivAt g (g' y) y\ns₃ : Set ℝ\nhs₃ : s₃ ∈ 𝓝[Iio a] a\nhg' : ∀ (y : ℝ), y ∈ s₃ → g' y ≠ 0\ns : Set ℝ := s₁ ∩ s₂ ∩ s₃\nl : ℝ\nhal : l ∈ Iio a\nhl : Ioo l a ⊆ s\nx : ℝ\nhx : x ∈ Ioo l a\n⊢ x ∈ s₂\n[PROOFSTEP]\nfirst\n| exact (hl hx).1.1\n| exact (hl hx).1.2\n| exact (hl hx).2\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.refine'_2.a\na b : ℝ\nhab : a < b\nl✝ : Filter ℝ\nf f' g g' : ℝ → ℝ\nhfa : Tendsto f (𝓝[Iio a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Iio a] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Iio a] a) l✝\ns₁ : Set ℝ\nhs₁ : s₁ ∈ 𝓝[Iio a] a\nhff' : ∀ (y : ℝ), y ∈ s₁ → HasDerivAt f (f' y) y\ns₂ : Set ℝ\nhs₂ : s₂ ∈ 𝓝[Iio a] a\nhgg' : ∀ (y : ℝ), y ∈ s₂ → HasDerivAt g (g' y) y\ns₃ : Set ℝ\nhs₃ : s₃ ∈ 𝓝[Iio a] a\nhg' : ∀ (y : ℝ), y ∈ s₃ → g' y ≠ 0\ns : Set ℝ := s₁ ∩ s₂ ∩ s₃\nl : ℝ\nhal : l ∈ Iio a\nhl : Ioo l a ⊆ s\nx : ℝ\nhx : x ∈ Ioo l a\n⊢ x ∈ s₂\n[PROOFSTEP]\nexact (hl hx).1.1\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.refine'_2.a\na b : ℝ\nhab : a < b\nl✝ : Filter ℝ\nf f' g g' : ℝ → ℝ\nhfa : Tendsto f (𝓝[Iio a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Iio a] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Iio a] a) l✝\ns₁ : Set ℝ\nhs₁ : s₁ ∈ 𝓝[Iio a] a\nhff' : ∀ (y : ℝ), y ∈ s₁ → HasDerivAt f (f' y) y\ns₂ : Set ℝ\nhs₂ : s₂ ∈ 𝓝[Iio a] a\nhgg' : ∀ (y : ℝ), y ∈ s₂ → HasDerivAt g (g' y) y\ns₃ : Set ℝ\nhs₃ : s₃ ∈ 𝓝[Iio a] a\nhg' : ∀ (y : ℝ), y ∈ s₃ → g' y ≠ 0\ns : Set ℝ := s₁ ∩ s₂ ∩ s₃\nl : ℝ\nhal : l ∈ Iio a\nhl : Ioo l a ⊆ s\nx : ℝ\nhx : x ∈ Ioo l a\n⊢ x ∈ s₂\n[PROOFSTEP]\nexact (hl hx).1.2\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.refine'_3.a\na b : ℝ\nhab : a < b\nl✝ : Filter ℝ\nf f' g g' : ℝ → ℝ\nhfa : Tendsto f (𝓝[Iio a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Iio a] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Iio a] a) l✝\ns₁ : Set ℝ\nhs₁ : s₁ ∈ 𝓝[Iio a] a\nhff' : ∀ (y : ℝ), y ∈ s₁ → HasDerivAt f (f' y) y\ns₂ : Set ℝ\nhs₂ : s₂ ∈ 𝓝[Iio a] a\nhgg' : ∀ (y : ℝ), y ∈ s₂ → HasDerivAt g (g' y) y\ns₃ : Set ℝ\nhs₃ : s₃ ∈ 𝓝[Iio a] a\nhg' : ∀ (y : ℝ), y ∈ s₃ → g' y ≠ 0\ns : Set ℝ := s₁ ∩ s₂ ∩ s₃\nl : ℝ\nhal : l ∈ Iio a\nhl : Ioo l a ⊆ s\nx : ℝ\nhx : x ∈ Ioo l a\n⊢ x ∈ s₃\n[PROOFSTEP]\nfirst\n| exact (hl hx).1.1\n| exact (hl hx).1.2\n| exact (hl hx).2\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.refine'_3.a\na b : ℝ\nhab : a < b\nl✝ : Filter ℝ\nf f' g g' : ℝ → ℝ\nhfa : Tendsto f (𝓝[Iio a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Iio a] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Iio a] a) l✝\ns₁ : Set ℝ\nhs₁ : s₁ ∈ 𝓝[Iio a] a\nhff' : ∀ (y : ℝ), y ∈ s₁ → HasDerivAt f (f' y) y\ns₂ : Set ℝ\nhs₂ : s₂ ∈ 𝓝[Iio a] a\nhgg' : ∀ (y : ℝ), y ∈ s₂ → HasDerivAt g (g' y) y\ns₃ : Set ℝ\nhs₃ : s₃ ∈ 𝓝[Iio a] a\nhg' : ∀ (y : ℝ), y ∈ s₃ → g' y ≠ 0\ns : Set ℝ := s₁ ∩ s₂ ∩ s₃\nl : ℝ\nhal : l ∈ Iio a\nhl : Ioo l a ⊆ s\nx : ℝ\nhx : x ∈ Ioo l a\n⊢ x ∈ s₃\n[PROOFSTEP]\nexact (hl hx).1.1\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.refine'_3.a\na b : ℝ\nhab : a < b\nl✝ : Filter ℝ\nf f' g g' : ℝ → ℝ\nhfa : Tendsto f (𝓝[Iio a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Iio a] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Iio a] a) l✝\ns₁ : Set ℝ\nhs₁ : s₁ ∈ 𝓝[Iio a] a\nhff' : ∀ (y : ℝ), y ∈ s₁ → HasDerivAt f (f' y) y\ns₂ : Set ℝ\nhs₂ : s₂ ∈ 𝓝[Iio a] a\nhgg' : ∀ (y : ℝ), y ∈ s₂ → HasDerivAt g (g' y) y\ns₃ : Set ℝ\nhs₃ : s₃ ∈ 𝓝[Iio a] a\nhg' : ∀ (y : ℝ), y ∈ s₃ → g' y ≠ 0\ns : Set ℝ := s₁ ∩ s₂ ∩ s₃\nl : ℝ\nhal : l ∈ Iio a\nhl : Ioo l a ⊆ s\nx : ℝ\nhx : x ∈ Ioo l a\n⊢ x ∈ s₃\n[PROOFSTEP]\nexact (hl hx).1.2\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.refine'_3.a\na b : ℝ\nhab : a < b\nl✝ : Filter ℝ\nf f' g g' : ℝ → ℝ\nhfa : Tendsto f (𝓝[Iio a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Iio a] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Iio a] a) l✝\ns₁ : Set ℝ\nhs₁ : s₁ ∈ 𝓝[Iio a] a\nhff' : ∀ (y : ℝ), y ∈ s₁ → HasDerivAt f (f' y) y\ns₂ : Set ℝ\nhs₂ : s₂ ∈ 𝓝[Iio a] a\nhgg' : ∀ (y : ℝ), y ∈ s₂ → HasDerivAt g (g' y) y\ns₃ : Set ℝ\nhs₃ : s₃ ∈ 𝓝[Iio a] a\nhg' : ∀ (y : ℝ), y ∈ s₃ → g' y ≠ 0\ns : Set ℝ := s₁ ∩ s₂ ∩ s₃\nl : ℝ\nhal : l ∈ Iio a\nhl : Ioo l a ⊆ s\nx : ℝ\nhx : x ∈ Ioo l a\n⊢ x ∈ s₃\n[PROOFSTEP]\nexact (hl hx).2\n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ᶠ (x : ℝ) in 𝓝[{a}ᶜ] a, HasDerivAt f (f' x) x\nhgg' : ∀ᶠ (x : ℝ) in 𝓝[{a}ᶜ] a, HasDerivAt g (g' x) x\nhg' : ∀ᶠ (x : ℝ) in 𝓝[{a}ᶜ] a, g' x ≠ 0\nhfa : Tendsto f (𝓝[{a}ᶜ] a) (𝓝 0)\nhga : Tendsto g (𝓝[{a}ᶜ] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[{a}ᶜ] a) l\n⊢ Tendsto (fun x => f x / g x) (𝓝[{a}ᶜ] a) l\n[PROOFSTEP]\nsimp only [← Iio_union_Ioi, nhdsWithin_union, tendsto_sup, eventually_sup] at *\n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : (∀ᶠ (x : ℝ) in 𝓝[Iio a] a, HasDerivAt f (f' x) x) ∧ ∀ᶠ (x : ℝ) in 𝓝[Ioi a] a, HasDerivAt f (f' x) x\nhgg' : (∀ᶠ (x : ℝ) in 𝓝[Iio a] a, HasDerivAt g (g' x) x) ∧ ∀ᶠ (x : ℝ) in 𝓝[Ioi a] a, HasDerivAt g (g' x) x\nhg' : (∀ᶠ (x : ℝ) in 𝓝[Iio a] a, g' x ≠ 0) ∧ ∀ᶠ (x : ℝ) in 𝓝[Ioi a] a, g' x ≠ 0\nhfa : Tendsto f (𝓝[Iio a] a) (𝓝 0) ∧ Tendsto f (𝓝[Ioi a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Iio a] a) (𝓝 0) ∧ Tendsto g (𝓝[Ioi a] a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝[Iio a] a) l ∧ Tendsto (fun x => f' x / g' x) (𝓝[Ioi a] a) l\n⊢ Tendsto (fun x => f x / g x) (𝓝[Iio a] a) l ∧ Tendsto (fun x => f x / g x) (𝓝[Ioi a] a) l\n[PROOFSTEP]\nexact\n  ⟨lhopital_zero_nhds_left hff'.1 hgg'.1 hg'.1 hfa.1 hga.1 hdiv.1,\n    lhopital_zero_nhds_right hff'.2 hgg'.2 hg'.2 hfa.2 hga.2 hdiv.2⟩\n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ᶠ (x : ℝ) in 𝓝 a, HasDerivAt f (f' x) x\nhgg' : ∀ᶠ (x : ℝ) in 𝓝 a, HasDerivAt g (g' x) x\nhg' : ∀ᶠ (x : ℝ) in 𝓝 a, g' x ≠ 0\nhfa : Tendsto f (𝓝 a) (𝓝 0)\nhga : Tendsto g (𝓝 a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝 a) l\n⊢ Tendsto (fun x => f x / g x) (𝓝[{a}ᶜ] a) l\n[PROOFSTEP]\napply @lhopital_zero_nhds' _ _ _ f' _ g'\n[GOAL]\ncase hff'\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ᶠ (x : ℝ) in 𝓝 a, HasDerivAt f (f' x) x\nhgg' : ∀ᶠ (x : ℝ) in 𝓝 a, HasDerivAt g (g' x) x\nhg' : ∀ᶠ (x : ℝ) in 𝓝 a, g' x ≠ 0\nhfa : Tendsto f (𝓝 a) (𝓝 0)\nhga : Tendsto g (𝓝 a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝 a) l\n⊢ ∀ᶠ (x : ℝ) in 𝓝[{a}ᶜ] a, HasDerivAt (fun x => f x) (f' x) x\n[PROOFSTEP]\nfirst\n| apply eventually_nhdsWithin_of_eventually_nhds\n| apply tendsto_nhdsWithin_of_tendsto_nhds\n[GOAL]\ncase hff'\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ᶠ (x : ℝ) in 𝓝 a, HasDerivAt f (f' x) x\nhgg' : ∀ᶠ (x : ℝ) in 𝓝 a, HasDerivAt g (g' x) x\nhg' : ∀ᶠ (x : ℝ) in 𝓝 a, g' x ≠ 0\nhfa : Tendsto f (𝓝 a) (𝓝 0)\nhga : Tendsto g (𝓝 a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝 a) l\n⊢ ∀ᶠ (x : ℝ) in 𝓝[{a}ᶜ] a, HasDerivAt (fun x => f x) (f' x) x\n[PROOFSTEP]\napply eventually_nhdsWithin_of_eventually_nhds\n[GOAL]\ncase hgg'\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ᶠ (x : ℝ) in 𝓝 a, HasDerivAt f (f' x) x\nhgg' : ∀ᶠ (x : ℝ) in 𝓝 a, HasDerivAt g (g' x) x\nhg' : ∀ᶠ (x : ℝ) in 𝓝 a, g' x ≠ 0\nhfa : Tendsto f (𝓝 a) (𝓝 0)\nhga : Tendsto g (𝓝 a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝 a) l\n⊢ ∀ᶠ (x : ℝ) in 𝓝[{a}ᶜ] a, HasDerivAt (fun x => g x) (g' x) x\n[PROOFSTEP]\nfirst\n| apply eventually_nhdsWithin_of_eventually_nhds\n| apply tendsto_nhdsWithin_of_tendsto_nhds\n[GOAL]\ncase hgg'\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ᶠ (x : ℝ) in 𝓝 a, HasDerivAt f (f' x) x\nhgg' : ∀ᶠ (x : ℝ) in 𝓝 a, HasDerivAt g (g' x) x\nhg' : ∀ᶠ (x : ℝ) in 𝓝 a, g' x ≠ 0\nhfa : Tendsto f (𝓝 a) (𝓝 0)\nhga : Tendsto g (𝓝 a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝 a) l\n⊢ ∀ᶠ (x : ℝ) in 𝓝[{a}ᶜ] a, HasDerivAt (fun x => g x) (g' x) x\n[PROOFSTEP]\napply eventually_nhdsWithin_of_eventually_nhds\n[GOAL]\ncase hg'\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ᶠ (x : ℝ) in 𝓝 a, HasDerivAt f (f' x) x\nhgg' : ∀ᶠ (x : ℝ) in 𝓝 a, HasDerivAt g (g' x) x\nhg' : ∀ᶠ (x : ℝ) in 𝓝 a, g' x ≠ 0\nhfa : Tendsto f (𝓝 a) (𝓝 0)\nhga : Tendsto g (𝓝 a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝 a) l\n⊢ ∀ᶠ (x : ℝ) in 𝓝[{a}ᶜ] a, g' x ≠ 0\n[PROOFSTEP]\nfirst\n| apply eventually_nhdsWithin_of_eventually_nhds\n| apply tendsto_nhdsWithin_of_tendsto_nhds\n[GOAL]\ncase hg'\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ᶠ (x : ℝ) in 𝓝 a, HasDerivAt f (f' x) x\nhgg' : ∀ᶠ (x : ℝ) in 𝓝 a, HasDerivAt g (g' x) x\nhg' : ∀ᶠ (x : ℝ) in 𝓝 a, g' x ≠ 0\nhfa : Tendsto f (𝓝 a) (𝓝 0)\nhga : Tendsto g (𝓝 a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝 a) l\n⊢ ∀ᶠ (x : ℝ) in 𝓝[{a}ᶜ] a, g' x ≠ 0\n[PROOFSTEP]\napply eventually_nhdsWithin_of_eventually_nhds\n[GOAL]\ncase hfa\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ᶠ (x : ℝ) in 𝓝 a, HasDerivAt f (f' x) x\nhgg' : ∀ᶠ (x : ℝ) in 𝓝 a, HasDerivAt g (g' x) x\nhg' : ∀ᶠ (x : ℝ) in 𝓝 a, g' x ≠ 0\nhfa : Tendsto f (𝓝 a) (𝓝 0)\nhga : Tendsto g (𝓝 a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝 a) l\n⊢ Tendsto (fun x => f x) (𝓝[{a}ᶜ] a) (𝓝 0)\n[PROOFSTEP]\nfirst\n| apply eventually_nhdsWithin_of_eventually_nhds\n| apply tendsto_nhdsWithin_of_tendsto_nhds\n[GOAL]\ncase hfa\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ᶠ (x : ℝ) in 𝓝 a, HasDerivAt f (f' x) x\nhgg' : ∀ᶠ (x : ℝ) in 𝓝 a, HasDerivAt g (g' x) x\nhg' : ∀ᶠ (x : ℝ) in 𝓝 a, g' x ≠ 0\nhfa : Tendsto f (𝓝 a) (𝓝 0)\nhga : Tendsto g (𝓝 a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝 a) l\n⊢ Tendsto (fun x => f x) (𝓝[{a}ᶜ] a) (𝓝 0)\n[PROOFSTEP]\napply eventually_nhdsWithin_of_eventually_nhds\n[GOAL]\ncase hfa\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ᶠ (x : ℝ) in 𝓝 a, HasDerivAt f (f' x) x\nhgg' : ∀ᶠ (x : ℝ) in 𝓝 a, HasDerivAt g (g' x) x\nhg' : ∀ᶠ (x : ℝ) in 𝓝 a, g' x ≠ 0\nhfa : Tendsto f (𝓝 a) (𝓝 0)\nhga : Tendsto g (𝓝 a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝 a) l\n⊢ Tendsto (fun x => f x) (𝓝[{a}ᶜ] a) (𝓝 0)\n[PROOFSTEP]\napply tendsto_nhdsWithin_of_tendsto_nhds\n[GOAL]\ncase hga\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ᶠ (x : ℝ) in 𝓝 a, HasDerivAt f (f' x) x\nhgg' : ∀ᶠ (x : ℝ) in 𝓝 a, HasDerivAt g (g' x) x\nhg' : ∀ᶠ (x : ℝ) in 𝓝 a, g' x ≠ 0\nhfa : Tendsto f (𝓝 a) (𝓝 0)\nhga : Tendsto g (𝓝 a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝 a) l\n⊢ Tendsto (fun x => g x) (𝓝[{a}ᶜ] a) (𝓝 0)\n[PROOFSTEP]\nfirst\n| apply eventually_nhdsWithin_of_eventually_nhds\n| apply tendsto_nhdsWithin_of_tendsto_nhds\n[GOAL]\ncase hga\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ᶠ (x : ℝ) in 𝓝 a, HasDerivAt f (f' x) x\nhgg' : ∀ᶠ (x : ℝ) in 𝓝 a, HasDerivAt g (g' x) x\nhg' : ∀ᶠ (x : ℝ) in 𝓝 a, g' x ≠ 0\nhfa : Tendsto f (𝓝 a) (𝓝 0)\nhga : Tendsto g (𝓝 a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝 a) l\n⊢ Tendsto (fun x => g x) (𝓝[{a}ᶜ] a) (𝓝 0)\n[PROOFSTEP]\napply eventually_nhdsWithin_of_eventually_nhds\n[GOAL]\ncase hga\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ᶠ (x : ℝ) in 𝓝 a, HasDerivAt f (f' x) x\nhgg' : ∀ᶠ (x : ℝ) in 𝓝 a, HasDerivAt g (g' x) x\nhg' : ∀ᶠ (x : ℝ) in 𝓝 a, g' x ≠ 0\nhfa : Tendsto f (𝓝 a) (𝓝 0)\nhga : Tendsto g (𝓝 a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝 a) l\n⊢ Tendsto (fun x => g x) (𝓝[{a}ᶜ] a) (𝓝 0)\n[PROOFSTEP]\napply tendsto_nhdsWithin_of_tendsto_nhds\n[GOAL]\ncase hdiv\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ᶠ (x : ℝ) in 𝓝 a, HasDerivAt f (f' x) x\nhgg' : ∀ᶠ (x : ℝ) in 𝓝 a, HasDerivAt g (g' x) x\nhg' : ∀ᶠ (x : ℝ) in 𝓝 a, g' x ≠ 0\nhfa : Tendsto f (𝓝 a) (𝓝 0)\nhga : Tendsto g (𝓝 a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝 a) l\n⊢ Tendsto (fun x => f' x / g' x) (𝓝[{a}ᶜ] a) l\n[PROOFSTEP]\nfirst\n| apply eventually_nhdsWithin_of_eventually_nhds\n| apply tendsto_nhdsWithin_of_tendsto_nhds\n[GOAL]\ncase hdiv\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ᶠ (x : ℝ) in 𝓝 a, HasDerivAt f (f' x) x\nhgg' : ∀ᶠ (x : ℝ) in 𝓝 a, HasDerivAt g (g' x) x\nhg' : ∀ᶠ (x : ℝ) in 𝓝 a, g' x ≠ 0\nhfa : Tendsto f (𝓝 a) (𝓝 0)\nhga : Tendsto g (𝓝 a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝 a) l\n⊢ Tendsto (fun x => f' x / g' x) (𝓝[{a}ᶜ] a) l\n[PROOFSTEP]\napply eventually_nhdsWithin_of_eventually_nhds\n[GOAL]\ncase hdiv\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ᶠ (x : ℝ) in 𝓝 a, HasDerivAt f (f' x) x\nhgg' : ∀ᶠ (x : ℝ) in 𝓝 a, HasDerivAt g (g' x) x\nhg' : ∀ᶠ (x : ℝ) in 𝓝 a, g' x ≠ 0\nhfa : Tendsto f (𝓝 a) (𝓝 0)\nhga : Tendsto g (𝓝 a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝 a) l\n⊢ Tendsto (fun x => f' x / g' x) (𝓝[{a}ᶜ] a) l\n[PROOFSTEP]\napply tendsto_nhdsWithin_of_tendsto_nhds\n[GOAL]\ncase hff'.h\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ᶠ (x : ℝ) in 𝓝 a, HasDerivAt f (f' x) x\nhgg' : ∀ᶠ (x : ℝ) in 𝓝 a, HasDerivAt g (g' x) x\nhg' : ∀ᶠ (x : ℝ) in 𝓝 a, g' x ≠ 0\nhfa : Tendsto f (𝓝 a) (𝓝 0)\nhga : Tendsto g (𝓝 a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝 a) l\n⊢ ∀ᶠ (x : ℝ) in 𝓝 a, HasDerivAt (fun x => f x) (f' x) x\n[PROOFSTEP]\nassumption\n[GOAL]\ncase hgg'.h\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ᶠ (x : ℝ) in 𝓝 a, HasDerivAt f (f' x) x\nhgg' : ∀ᶠ (x : ℝ) in 𝓝 a, HasDerivAt g (g' x) x\nhg' : ∀ᶠ (x : ℝ) in 𝓝 a, g' x ≠ 0\nhfa : Tendsto f (𝓝 a) (𝓝 0)\nhga : Tendsto g (𝓝 a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝 a) l\n⊢ ∀ᶠ (x : ℝ) in 𝓝 a, HasDerivAt (fun x => g x) (g' x) x\n[PROOFSTEP]\nassumption\n[GOAL]\ncase hg'.h\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ᶠ (x : ℝ) in 𝓝 a, HasDerivAt f (f' x) x\nhgg' : ∀ᶠ (x : ℝ) in 𝓝 a, HasDerivAt g (g' x) x\nhg' : ∀ᶠ (x : ℝ) in 𝓝 a, g' x ≠ 0\nhfa : Tendsto f (𝓝 a) (𝓝 0)\nhga : Tendsto g (𝓝 a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝 a) l\n⊢ ∀ᶠ (x : ℝ) in 𝓝 a, g' x ≠ 0\n[PROOFSTEP]\nassumption\n[GOAL]\ncase hfa.h\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ᶠ (x : ℝ) in 𝓝 a, HasDerivAt f (f' x) x\nhgg' : ∀ᶠ (x : ℝ) in 𝓝 a, HasDerivAt g (g' x) x\nhg' : ∀ᶠ (x : ℝ) in 𝓝 a, g' x ≠ 0\nhfa : Tendsto f (𝓝 a) (𝓝 0)\nhga : Tendsto g (𝓝 a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝 a) l\n⊢ Tendsto (fun x => f x) (𝓝 a) (𝓝 0)\n[PROOFSTEP]\nassumption\n[GOAL]\ncase hga.h\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ᶠ (x : ℝ) in 𝓝 a, HasDerivAt f (f' x) x\nhgg' : ∀ᶠ (x : ℝ) in 𝓝 a, HasDerivAt g (g' x) x\nhg' : ∀ᶠ (x : ℝ) in 𝓝 a, g' x ≠ 0\nhfa : Tendsto f (𝓝 a) (𝓝 0)\nhga : Tendsto g (𝓝 a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝 a) l\n⊢ Tendsto (fun x => g x) (𝓝 a) (𝓝 0)\n[PROOFSTEP]\nassumption\n[GOAL]\ncase hdiv.h\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ᶠ (x : ℝ) in 𝓝 a, HasDerivAt f (f' x) x\nhgg' : ∀ᶠ (x : ℝ) in 𝓝 a, HasDerivAt g (g' x) x\nhg' : ∀ᶠ (x : ℝ) in 𝓝 a, g' x ≠ 0\nhfa : Tendsto f (𝓝 a) (𝓝 0)\nhga : Tendsto g (𝓝 a) (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) (𝓝 a) l\n⊢ Tendsto (fun x => f' x / g' x) (𝓝 a) l\n[PROOFSTEP]\nassumption\n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ᶠ (x : ℝ) in atTop, HasDerivAt f (f' x) x\nhgg' : ∀ᶠ (x : ℝ) in atTop, HasDerivAt g (g' x) x\nhg' : ∀ᶠ (x : ℝ) in atTop, g' x ≠ 0\nhftop : Tendsto f atTop (𝓝 0)\nhgtop : Tendsto g atTop (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) atTop l\n⊢ Tendsto (fun x => f x / g x) atTop l\n[PROOFSTEP]\nrw [eventually_iff_exists_mem] at *\n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∃ v, v ∈ atTop ∧ ∀ (y : ℝ), y ∈ v → HasDerivAt f (f' y) y\nhgg' : ∃ v, v ∈ atTop ∧ ∀ (y : ℝ), y ∈ v → HasDerivAt g (g' y) y\nhg' : ∃ v, v ∈ atTop ∧ ∀ (y : ℝ), y ∈ v → g' y ≠ 0\nhftop : Tendsto f atTop (𝓝 0)\nhgtop : Tendsto g atTop (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) atTop l\n⊢ Tendsto (fun x => f x / g x) atTop l\n[PROOFSTEP]\nrcases hff' with ⟨s₁, hs₁, hff'⟩\n[GOAL]\ncase intro.intro\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhgg' : ∃ v, v ∈ atTop ∧ ∀ (y : ℝ), y ∈ v → HasDerivAt g (g' y) y\nhg' : ∃ v, v ∈ atTop ∧ ∀ (y : ℝ), y ∈ v → g' y ≠ 0\nhftop : Tendsto f atTop (𝓝 0)\nhgtop : Tendsto g atTop (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) atTop l\ns₁ : Set ℝ\nhs₁ : s₁ ∈ atTop\nhff' : ∀ (y : ℝ), y ∈ s₁ → HasDerivAt f (f' y) y\n⊢ Tendsto (fun x => f x / g x) atTop l\n[PROOFSTEP]\nrcases hgg' with ⟨s₂, hs₂, hgg'⟩\n[GOAL]\ncase intro.intro.intro.intro\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhg' : ∃ v, v ∈ atTop ∧ ∀ (y : ℝ), y ∈ v → g' y ≠ 0\nhftop : Tendsto f atTop (𝓝 0)\nhgtop : Tendsto g atTop (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) atTop l\ns₁ : Set ℝ\nhs₁ : s₁ ∈ atTop\nhff' : ∀ (y : ℝ), y ∈ s₁ → HasDerivAt f (f' y) y\ns₂ : Set ℝ\nhs₂ : s₂ ∈ atTop\nhgg' : ∀ (y : ℝ), y ∈ s₂ → HasDerivAt g (g' y) y\n⊢ Tendsto (fun x => f x / g x) atTop l\n[PROOFSTEP]\nrcases hg' with ⟨s₃, hs₃, hg'⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhftop : Tendsto f atTop (𝓝 0)\nhgtop : Tendsto g atTop (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) atTop l\ns₁ : Set ℝ\nhs₁ : s₁ ∈ atTop\nhff' : ∀ (y : ℝ), y ∈ s₁ → HasDerivAt f (f' y) y\ns₂ : Set ℝ\nhs₂ : s₂ ∈ atTop\nhgg' : ∀ (y : ℝ), y ∈ s₂ → HasDerivAt g (g' y) y\ns₃ : Set ℝ\nhs₃ : s₃ ∈ atTop\nhg' : ∀ (y : ℝ), y ∈ s₃ → g' y ≠ 0\n⊢ Tendsto (fun x => f x / g x) atTop l\n[PROOFSTEP]\nlet s := s₁ ∩ s₂ ∩ s₃\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhftop : Tendsto f atTop (𝓝 0)\nhgtop : Tendsto g atTop (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) atTop l\ns₁ : Set ℝ\nhs₁ : s₁ ∈ atTop\nhff' : ∀ (y : ℝ), y ∈ s₁ → HasDerivAt f (f' y) y\ns₂ : Set ℝ\nhs₂ : s₂ ∈ atTop\nhgg' : ∀ (y : ℝ), y ∈ s₂ → HasDerivAt g (g' y) y\ns₃ : Set ℝ\nhs₃ : s₃ ∈ atTop\nhg' : ∀ (y : ℝ), y ∈ s₃ → g' y ≠ 0\ns : Set ℝ := s₁ ∩ s₂ ∩ s₃\n⊢ Tendsto (fun x => f x / g x) atTop l\n[PROOFSTEP]\nhave hs : s ∈ atTop := inter_mem (inter_mem hs₁ hs₂) hs₃\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhftop : Tendsto f atTop (𝓝 0)\nhgtop : Tendsto g atTop (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) atTop l\ns₁ : Set ℝ\nhs₁ : s₁ ∈ atTop\nhff' : ∀ (y : ℝ), y ∈ s₁ → HasDerivAt f (f' y) y\ns₂ : Set ℝ\nhs₂ : s₂ ∈ atTop\nhgg' : ∀ (y : ℝ), y ∈ s₂ → HasDerivAt g (g' y) y\ns₃ : Set ℝ\nhs₃ : s₃ ∈ atTop\nhg' : ∀ (y : ℝ), y ∈ s₃ → g' y ≠ 0\ns : Set ℝ := s₁ ∩ s₂ ∩ s₃\nhs : s ∈ atTop\n⊢ Tendsto (fun x => f x / g x) atTop l\n[PROOFSTEP]\nrw [mem_atTop_sets] at hs \n[GOAL]\ncase intro.intro.intro.intro.intro.intro\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhftop : Tendsto f atTop (𝓝 0)\nhgtop : Tendsto g atTop (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) atTop l\ns₁ : Set ℝ\nhs₁ : s₁ ∈ atTop\nhff' : ∀ (y : ℝ), y ∈ s₁ → HasDerivAt f (f' y) y\ns₂ : Set ℝ\nhs₂ : s₂ ∈ atTop\nhgg' : ∀ (y : ℝ), y ∈ s₂ → HasDerivAt g (g' y) y\ns₃ : Set ℝ\nhs₃ : s₃ ∈ atTop\nhg' : ∀ (y : ℝ), y ∈ s₃ → g' y ≠ 0\ns : Set ℝ := s₁ ∩ s₂ ∩ s₃\nhs : ∃ a, ∀ (b : ℝ), b ≥ a → b ∈ s\n⊢ Tendsto (fun x => f x / g x) atTop l\n[PROOFSTEP]\nrcases hs with ⟨l, hl⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro\na b : ℝ\nhab : a < b\nl✝ : Filter ℝ\nf f' g g' : ℝ → ℝ\nhftop : Tendsto f atTop (𝓝 0)\nhgtop : Tendsto g atTop (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) atTop l✝\ns₁ : Set ℝ\nhs₁ : s₁ ∈ atTop\nhff' : ∀ (y : ℝ), y ∈ s₁ → HasDerivAt f (f' y) y\ns₂ : Set ℝ\nhs₂ : s₂ ∈ atTop\nhgg' : ∀ (y : ℝ), y ∈ s₂ → HasDerivAt g (g' y) y\ns₃ : Set ℝ\nhs₃ : s₃ ∈ atTop\nhg' : ∀ (y : ℝ), y ∈ s₃ → g' y ≠ 0\ns : Set ℝ := s₁ ∩ s₂ ∩ s₃\nl : ℝ\nhl : ∀ (b : ℝ), b ≥ l → b ∈ s\n⊢ Tendsto (fun x => f x / g x) atTop l✝\n[PROOFSTEP]\nhave hl' : Ioi l ⊆ s := fun x hx => hl x (le_of_lt hx)\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro\na b : ℝ\nhab : a < b\nl✝ : Filter ℝ\nf f' g g' : ℝ → ℝ\nhftop : Tendsto f atTop (𝓝 0)\nhgtop : Tendsto g atTop (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) atTop l✝\ns₁ : Set ℝ\nhs₁ : s₁ ∈ atTop\nhff' : ∀ (y : ℝ), y ∈ s₁ → HasDerivAt f (f' y) y\ns₂ : Set ℝ\nhs₂ : s₂ ∈ atTop\nhgg' : ∀ (y : ℝ), y ∈ s₂ → HasDerivAt g (g' y) y\ns₃ : Set ℝ\nhs₃ : s₃ ∈ atTop\nhg' : ∀ (y : ℝ), y ∈ s₃ → g' y ≠ 0\ns : Set ℝ := s₁ ∩ s₂ ∩ s₃\nl : ℝ\nhl : ∀ (b : ℝ), b ≥ l → b ∈ s\nhl' : Ioi l ⊆ s\n⊢ Tendsto (fun x => f x / g x) atTop l✝\n[PROOFSTEP]\nrefine' lhopital_zero_atTop_on_Ioi _ _ (fun x hx => hg' x <| (hl' hx).2) hftop hgtop hdiv\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.refine'_1\na b : ℝ\nhab : a < b\nl✝ : Filter ℝ\nf f' g g' : ℝ → ℝ\nhftop : Tendsto f atTop (𝓝 0)\nhgtop : Tendsto g atTop (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) atTop l✝\ns₁ : Set ℝ\nhs₁ : s₁ ∈ atTop\nhff' : ∀ (y : ℝ), y ∈ s₁ → HasDerivAt f (f' y) y\ns₂ : Set ℝ\nhs₂ : s₂ ∈ atTop\nhgg' : ∀ (y : ℝ), y ∈ s₂ → HasDerivAt g (g' y) y\ns₃ : Set ℝ\nhs₃ : s₃ ∈ atTop\nhg' : ∀ (y : ℝ), y ∈ s₃ → g' y ≠ 0\ns : Set ℝ := s₁ ∩ s₂ ∩ s₃\nl : ℝ\nhl : ∀ (b : ℝ), b ≥ l → b ∈ s\nhl' : Ioi l ⊆ s\n⊢ ∀ (x : ℝ), x ∈ Ioi l → HasDerivAt (fun x => f x) (f' x) x\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.refine'_2\na b : ℝ\nhab : a < b\nl✝ : Filter ℝ\nf f' g g' : ℝ → ℝ\nhftop : Tendsto f atTop (𝓝 0)\nhgtop : Tendsto g atTop (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) atTop l✝\ns₁ : Set ℝ\nhs₁ : s₁ ∈ atTop\nhff' : ∀ (y : ℝ), y ∈ s₁ → HasDerivAt f (f' y) y\ns₂ : Set ℝ\nhs₂ : s₂ ∈ atTop\nhgg' : ∀ (y : ℝ), y ∈ s₂ → HasDerivAt g (g' y) y\ns₃ : Set ℝ\nhs₃ : s₃ ∈ atTop\nhg' : ∀ (y : ℝ), y ∈ s₃ → g' y ≠ 0\ns : Set ℝ := s₁ ∩ s₂ ∩ s₃\nl : ℝ\nhl : ∀ (b : ℝ), b ≥ l → b ∈ s\nhl' : Ioi l ⊆ s\n⊢ ∀ (x : ℝ), x ∈ Ioi l → HasDerivAt (fun x => g x) (g' x) x\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.refine'_1\na b : ℝ\nhab : a < b\nl✝ : Filter ℝ\nf f' g g' : ℝ → ℝ\nhftop : Tendsto f atTop (𝓝 0)\nhgtop : Tendsto g atTop (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) atTop l✝\ns₁ : Set ℝ\nhs₁ : s₁ ∈ atTop\nhff' : ∀ (y : ℝ), y ∈ s₁ → HasDerivAt f (f' y) y\ns₂ : Set ℝ\nhs₂ : s₂ ∈ atTop\nhgg' : ∀ (y : ℝ), y ∈ s₂ → HasDerivAt g (g' y) y\ns₃ : Set ℝ\nhs₃ : s₃ ∈ atTop\nhg' : ∀ (y : ℝ), y ∈ s₃ → g' y ≠ 0\ns : Set ℝ := s₁ ∩ s₂ ∩ s₃\nl : ℝ\nhl : ∀ (b : ℝ), b ≥ l → b ∈ s\nhl' : Ioi l ⊆ s\nx : ℝ\nhx : x ∈ Ioi l\n⊢ HasDerivAt (fun x => f x) (f' x) x\n[PROOFSTEP]\napply_assumption\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.refine'_2\na b : ℝ\nhab : a < b\nl✝ : Filter ℝ\nf f' g g' : ℝ → ℝ\nhftop : Tendsto f atTop (𝓝 0)\nhgtop : Tendsto g atTop (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) atTop l✝\ns₁ : Set ℝ\nhs₁ : s₁ ∈ atTop\nhff' : ∀ (y : ℝ), y ∈ s₁ → HasDerivAt f (f' y) y\ns₂ : Set ℝ\nhs₂ : s₂ ∈ atTop\nhgg' : ∀ (y : ℝ), y ∈ s₂ → HasDerivAt g (g' y) y\ns₃ : Set ℝ\nhs₃ : s₃ ∈ atTop\nhg' : ∀ (y : ℝ), y ∈ s₃ → g' y ≠ 0\ns : Set ℝ := s₁ ∩ s₂ ∩ s₃\nl : ℝ\nhl : ∀ (b : ℝ), b ≥ l → b ∈ s\nhl' : Ioi l ⊆ s\nx : ℝ\nhx : x ∈ Ioi l\n⊢ HasDerivAt (fun x => g x) (g' x) x\n[PROOFSTEP]\napply_assumption\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.refine'_1.a\na b : ℝ\nhab : a < b\nl✝ : Filter ℝ\nf f' g g' : ℝ → ℝ\nhftop : Tendsto f atTop (𝓝 0)\nhgtop : Tendsto g atTop (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) atTop l✝\ns₁ : Set ℝ\nhs₁ : s₁ ∈ atTop\nhff' : ∀ (y : ℝ), y ∈ s₁ → HasDerivAt f (f' y) y\ns₂ : Set ℝ\nhs₂ : s₂ ∈ atTop\nhgg' : ∀ (y : ℝ), y ∈ s₂ → HasDerivAt g (g' y) y\ns₃ : Set ℝ\nhs₃ : s₃ ∈ atTop\nhg' : ∀ (y : ℝ), y ∈ s₃ → g' y ≠ 0\ns : Set ℝ := s₁ ∩ s₂ ∩ s₃\nl : ℝ\nhl : ∀ (b : ℝ), b ≥ l → b ∈ s\nhl' : Ioi l ⊆ s\nx : ℝ\nhx : x ∈ Ioi l\n⊢ x ∈ s₁\n[PROOFSTEP]\nfirst\n| exact (hl' hx).1.1\n| exact (hl' hx).1.2\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.refine'_1.a\na b : ℝ\nhab : a < b\nl✝ : Filter ℝ\nf f' g g' : ℝ → ℝ\nhftop : Tendsto f atTop (𝓝 0)\nhgtop : Tendsto g atTop (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) atTop l✝\ns₁ : Set ℝ\nhs₁ : s₁ ∈ atTop\nhff' : ∀ (y : ℝ), y ∈ s₁ → HasDerivAt f (f' y) y\ns₂ : Set ℝ\nhs₂ : s₂ ∈ atTop\nhgg' : ∀ (y : ℝ), y ∈ s₂ → HasDerivAt g (g' y) y\ns₃ : Set ℝ\nhs₃ : s₃ ∈ atTop\nhg' : ∀ (y : ℝ), y ∈ s₃ → g' y ≠ 0\ns : Set ℝ := s₁ ∩ s₂ ∩ s₃\nl : ℝ\nhl : ∀ (b : ℝ), b ≥ l → b ∈ s\nhl' : Ioi l ⊆ s\nx : ℝ\nhx : x ∈ Ioi l\n⊢ x ∈ s₁\n[PROOFSTEP]\nexact (hl' hx).1.1\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.refine'_2.a\na b : ℝ\nhab : a < b\nl✝ : Filter ℝ\nf f' g g' : ℝ → ℝ\nhftop : Tendsto f atTop (𝓝 0)\nhgtop : Tendsto g atTop (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) atTop l✝\ns₁ : Set ℝ\nhs₁ : s₁ ∈ atTop\nhff' : ∀ (y : ℝ), y ∈ s₁ → HasDerivAt f (f' y) y\ns₂ : Set ℝ\nhs₂ : s₂ ∈ atTop\nhgg' : ∀ (y : ℝ), y ∈ s₂ → HasDerivAt g (g' y) y\ns₃ : Set ℝ\nhs₃ : s₃ ∈ atTop\nhg' : ∀ (y : ℝ), y ∈ s₃ → g' y ≠ 0\ns : Set ℝ := s₁ ∩ s₂ ∩ s₃\nl : ℝ\nhl : ∀ (b : ℝ), b ≥ l → b ∈ s\nhl' : Ioi l ⊆ s\nx : ℝ\nhx : x ∈ Ioi l\n⊢ x ∈ s₂\n[PROOFSTEP]\nfirst\n| exact (hl' hx).1.1\n| exact (hl' hx).1.2\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.refine'_2.a\na b : ℝ\nhab : a < b\nl✝ : Filter ℝ\nf f' g g' : ℝ → ℝ\nhftop : Tendsto f atTop (𝓝 0)\nhgtop : Tendsto g atTop (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) atTop l✝\ns₁ : Set ℝ\nhs₁ : s₁ ∈ atTop\nhff' : ∀ (y : ℝ), y ∈ s₁ → HasDerivAt f (f' y) y\ns₂ : Set ℝ\nhs₂ : s₂ ∈ atTop\nhgg' : ∀ (y : ℝ), y ∈ s₂ → HasDerivAt g (g' y) y\ns₃ : Set ℝ\nhs₃ : s₃ ∈ atTop\nhg' : ∀ (y : ℝ), y ∈ s₃ → g' y ≠ 0\ns : Set ℝ := s₁ ∩ s₂ ∩ s₃\nl : ℝ\nhl : ∀ (b : ℝ), b ≥ l → b ∈ s\nhl' : Ioi l ⊆ s\nx : ℝ\nhx : x ∈ Ioi l\n⊢ x ∈ s₂\n[PROOFSTEP]\nexact (hl' hx).1.1\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.refine'_2.a\na b : ℝ\nhab : a < b\nl✝ : Filter ℝ\nf f' g g' : ℝ → ℝ\nhftop : Tendsto f atTop (𝓝 0)\nhgtop : Tendsto g atTop (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) atTop l✝\ns₁ : Set ℝ\nhs₁ : s₁ ∈ atTop\nhff' : ∀ (y : ℝ), y ∈ s₁ → HasDerivAt f (f' y) y\ns₂ : Set ℝ\nhs₂ : s₂ ∈ atTop\nhgg' : ∀ (y : ℝ), y ∈ s₂ → HasDerivAt g (g' y) y\ns₃ : Set ℝ\nhs₃ : s₃ ∈ atTop\nhg' : ∀ (y : ℝ), y ∈ s₃ → g' y ≠ 0\ns : Set ℝ := s₁ ∩ s₂ ∩ s₃\nl : ℝ\nhl : ∀ (b : ℝ), b ≥ l → b ∈ s\nhl' : Ioi l ⊆ s\nx : ℝ\nhx : x ∈ Ioi l\n⊢ x ∈ s₂\n[PROOFSTEP]\nexact (hl' hx).1.2\n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∀ᶠ (x : ℝ) in atBot, HasDerivAt f (f' x) x\nhgg' : ∀ᶠ (x : ℝ) in atBot, HasDerivAt g (g' x) x\nhg' : ∀ᶠ (x : ℝ) in atBot, g' x ≠ 0\nhfbot : Tendsto f atBot (𝓝 0)\nhgbot : Tendsto g atBot (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) atBot l\n⊢ Tendsto (fun x => f x / g x) atBot l\n[PROOFSTEP]\nrw [eventually_iff_exists_mem] at *\n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhff' : ∃ v, v ∈ atBot ∧ ∀ (y : ℝ), y ∈ v → HasDerivAt f (f' y) y\nhgg' : ∃ v, v ∈ atBot ∧ ∀ (y : ℝ), y ∈ v → HasDerivAt g (g' y) y\nhg' : ∃ v, v ∈ atBot ∧ ∀ (y : ℝ), y ∈ v → g' y ≠ 0\nhfbot : Tendsto f atBot (𝓝 0)\nhgbot : Tendsto g atBot (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) atBot l\n⊢ Tendsto (fun x => f x / g x) atBot l\n[PROOFSTEP]\nrcases hff' with ⟨s₁, hs₁, hff'⟩\n[GOAL]\ncase intro.intro\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhgg' : ∃ v, v ∈ atBot ∧ ∀ (y : ℝ), y ∈ v → HasDerivAt g (g' y) y\nhg' : ∃ v, v ∈ atBot ∧ ∀ (y : ℝ), y ∈ v → g' y ≠ 0\nhfbot : Tendsto f atBot (𝓝 0)\nhgbot : Tendsto g atBot (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) atBot l\ns₁ : Set ℝ\nhs₁ : s₁ ∈ atBot\nhff' : ∀ (y : ℝ), y ∈ s₁ → HasDerivAt f (f' y) y\n⊢ Tendsto (fun x => f x / g x) atBot l\n[PROOFSTEP]\nrcases hgg' with ⟨s₂, hs₂, hgg'⟩\n[GOAL]\ncase intro.intro.intro.intro\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhg' : ∃ v, v ∈ atBot ∧ ∀ (y : ℝ), y ∈ v → g' y ≠ 0\nhfbot : Tendsto f atBot (𝓝 0)\nhgbot : Tendsto g atBot (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) atBot l\ns₁ : Set ℝ\nhs₁ : s₁ ∈ atBot\nhff' : ∀ (y : ℝ), y ∈ s₁ → HasDerivAt f (f' y) y\ns₂ : Set ℝ\nhs₂ : s₂ ∈ atBot\nhgg' : ∀ (y : ℝ), y ∈ s₂ → HasDerivAt g (g' y) y\n⊢ Tendsto (fun x => f x / g x) atBot l\n[PROOFSTEP]\nrcases hg' with ⟨s₃, hs₃, hg'⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhfbot : Tendsto f atBot (𝓝 0)\nhgbot : Tendsto g atBot (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) atBot l\ns₁ : Set ℝ\nhs₁ : s₁ ∈ atBot\nhff' : ∀ (y : ℝ), y ∈ s₁ → HasDerivAt f (f' y) y\ns₂ : Set ℝ\nhs₂ : s₂ ∈ atBot\nhgg' : ∀ (y : ℝ), y ∈ s₂ → HasDerivAt g (g' y) y\ns₃ : Set ℝ\nhs₃ : s₃ ∈ atBot\nhg' : ∀ (y : ℝ), y ∈ s₃ → g' y ≠ 0\n⊢ Tendsto (fun x => f x / g x) atBot l\n[PROOFSTEP]\nlet s := s₁ ∩ s₂ ∩ s₃\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhfbot : Tendsto f atBot (𝓝 0)\nhgbot : Tendsto g atBot (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) atBot l\ns₁ : Set ℝ\nhs₁ : s₁ ∈ atBot\nhff' : ∀ (y : ℝ), y ∈ s₁ → HasDerivAt f (f' y) y\ns₂ : Set ℝ\nhs₂ : s₂ ∈ atBot\nhgg' : ∀ (y : ℝ), y ∈ s₂ → HasDerivAt g (g' y) y\ns₃ : Set ℝ\nhs₃ : s₃ ∈ atBot\nhg' : ∀ (y : ℝ), y ∈ s₃ → g' y ≠ 0\ns : Set ℝ := s₁ ∩ s₂ ∩ s₃\n⊢ Tendsto (fun x => f x / g x) atBot l\n[PROOFSTEP]\nhave hs : s ∈ atBot := inter_mem (inter_mem hs₁ hs₂) hs₃\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhfbot : Tendsto f atBot (𝓝 0)\nhgbot : Tendsto g atBot (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) atBot l\ns₁ : Set ℝ\nhs₁ : s₁ ∈ atBot\nhff' : ∀ (y : ℝ), y ∈ s₁ → HasDerivAt f (f' y) y\ns₂ : Set ℝ\nhs₂ : s₂ ∈ atBot\nhgg' : ∀ (y : ℝ), y ∈ s₂ → HasDerivAt g (g' y) y\ns₃ : Set ℝ\nhs₃ : s₃ ∈ atBot\nhg' : ∀ (y : ℝ), y ∈ s₃ → g' y ≠ 0\ns : Set ℝ := s₁ ∩ s₂ ∩ s₃\nhs : s ∈ atBot\n⊢ Tendsto (fun x => f x / g x) atBot l\n[PROOFSTEP]\nrw [mem_atBot_sets] at hs \n[GOAL]\ncase intro.intro.intro.intro.intro.intro\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhfbot : Tendsto f atBot (𝓝 0)\nhgbot : Tendsto g atBot (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) atBot l\ns₁ : Set ℝ\nhs₁ : s₁ ∈ atBot\nhff' : ∀ (y : ℝ), y ∈ s₁ → HasDerivAt f (f' y) y\ns₂ : Set ℝ\nhs₂ : s₂ ∈ atBot\nhgg' : ∀ (y : ℝ), y ∈ s₂ → HasDerivAt g (g' y) y\ns₃ : Set ℝ\nhs₃ : s₃ ∈ atBot\nhg' : ∀ (y : ℝ), y ∈ s₃ → g' y ≠ 0\ns : Set ℝ := s₁ ∩ s₂ ∩ s₃\nhs : ∃ a, ∀ (b : ℝ), b ≤ a → b ∈ s\n⊢ Tendsto (fun x => f x / g x) atBot l\n[PROOFSTEP]\nrcases hs with ⟨l, hl⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro\na b : ℝ\nhab : a < b\nl✝ : Filter ℝ\nf f' g g' : ℝ → ℝ\nhfbot : Tendsto f atBot (𝓝 0)\nhgbot : Tendsto g atBot (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) atBot l✝\ns₁ : Set ℝ\nhs₁ : s₁ ∈ atBot\nhff' : ∀ (y : ℝ), y ∈ s₁ → HasDerivAt f (f' y) y\ns₂ : Set ℝ\nhs₂ : s₂ ∈ atBot\nhgg' : ∀ (y : ℝ), y ∈ s₂ → HasDerivAt g (g' y) y\ns₃ : Set ℝ\nhs₃ : s₃ ∈ atBot\nhg' : ∀ (y : ℝ), y ∈ s₃ → g' y ≠ 0\ns : Set ℝ := s₁ ∩ s₂ ∩ s₃\nl : ℝ\nhl : ∀ (b : ℝ), b ≤ l → b ∈ s\n⊢ Tendsto (fun x => f x / g x) atBot l✝\n[PROOFSTEP]\nhave hl' : Iio l ⊆ s := fun x hx => hl x (le_of_lt hx)\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro\na b : ℝ\nhab : a < b\nl✝ : Filter ℝ\nf f' g g' : ℝ → ℝ\nhfbot : Tendsto f atBot (𝓝 0)\nhgbot : Tendsto g atBot (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) atBot l✝\ns₁ : Set ℝ\nhs₁ : s₁ ∈ atBot\nhff' : ∀ (y : ℝ), y ∈ s₁ → HasDerivAt f (f' y) y\ns₂ : Set ℝ\nhs₂ : s₂ ∈ atBot\nhgg' : ∀ (y : ℝ), y ∈ s₂ → HasDerivAt g (g' y) y\ns₃ : Set ℝ\nhs₃ : s₃ ∈ atBot\nhg' : ∀ (y : ℝ), y ∈ s₃ → g' y ≠ 0\ns : Set ℝ := s₁ ∩ s₂ ∩ s₃\nl : ℝ\nhl : ∀ (b : ℝ), b ≤ l → b ∈ s\nhl' : Iio l ⊆ s\n⊢ Tendsto (fun x => f x / g x) atBot l✝\n[PROOFSTEP]\nrefine' lhopital_zero_atBot_on_Iio _ _ (fun x hx => hg' x <| (hl' hx).2) hfbot hgbot hdiv\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.refine'_1\na b : ℝ\nhab : a < b\nl✝ : Filter ℝ\nf f' g g' : ℝ → ℝ\nhfbot : Tendsto f atBot (𝓝 0)\nhgbot : Tendsto g atBot (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) atBot l✝\ns₁ : Set ℝ\nhs₁ : s₁ ∈ atBot\nhff' : ∀ (y : ℝ), y ∈ s₁ → HasDerivAt f (f' y) y\ns₂ : Set ℝ\nhs₂ : s₂ ∈ atBot\nhgg' : ∀ (y : ℝ), y ∈ s₂ → HasDerivAt g (g' y) y\ns₃ : Set ℝ\nhs₃ : s₃ ∈ atBot\nhg' : ∀ (y : ℝ), y ∈ s₃ → g' y ≠ 0\ns : Set ℝ := s₁ ∩ s₂ ∩ s₃\nl : ℝ\nhl : ∀ (b : ℝ), b ≤ l → b ∈ s\nhl' : Iio l ⊆ s\n⊢ ∀ (x : ℝ), x ∈ Iio l → HasDerivAt (fun x => f x) (f' x) x\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.refine'_2\na b : ℝ\nhab : a < b\nl✝ : Filter ℝ\nf f' g g' : ℝ → ℝ\nhfbot : Tendsto f atBot (𝓝 0)\nhgbot : Tendsto g atBot (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) atBot l✝\ns₁ : Set ℝ\nhs₁ : s₁ ∈ atBot\nhff' : ∀ (y : ℝ), y ∈ s₁ → HasDerivAt f (f' y) y\ns₂ : Set ℝ\nhs₂ : s₂ ∈ atBot\nhgg' : ∀ (y : ℝ), y ∈ s₂ → HasDerivAt g (g' y) y\ns₃ : Set ℝ\nhs₃ : s₃ ∈ atBot\nhg' : ∀ (y : ℝ), y ∈ s₃ → g' y ≠ 0\ns : Set ℝ := s₁ ∩ s₂ ∩ s₃\nl : ℝ\nhl : ∀ (b : ℝ), b ≤ l → b ∈ s\nhl' : Iio l ⊆ s\n⊢ ∀ (x : ℝ), x ∈ Iio l → HasDerivAt (fun x => g x) (g' x) x\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.refine'_1\na b : ℝ\nhab : a < b\nl✝ : Filter ℝ\nf f' g g' : ℝ → ℝ\nhfbot : Tendsto f atBot (𝓝 0)\nhgbot : Tendsto g atBot (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) atBot l✝\ns₁ : Set ℝ\nhs₁ : s₁ ∈ atBot\nhff' : ∀ (y : ℝ), y ∈ s₁ → HasDerivAt f (f' y) y\ns₂ : Set ℝ\nhs₂ : s₂ ∈ atBot\nhgg' : ∀ (y : ℝ), y ∈ s₂ → HasDerivAt g (g' y) y\ns₃ : Set ℝ\nhs₃ : s₃ ∈ atBot\nhg' : ∀ (y : ℝ), y ∈ s₃ → g' y ≠ 0\ns : Set ℝ := s₁ ∩ s₂ ∩ s₃\nl : ℝ\nhl : ∀ (b : ℝ), b ≤ l → b ∈ s\nhl' : Iio l ⊆ s\nx : ℝ\nhx : x ∈ Iio l\n⊢ HasDerivAt (fun x => f x) (f' x) x\n[PROOFSTEP]\napply_assumption\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.refine'_2\na b : ℝ\nhab : a < b\nl✝ : Filter ℝ\nf f' g g' : ℝ → ℝ\nhfbot : Tendsto f atBot (𝓝 0)\nhgbot : Tendsto g atBot (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) atBot l✝\ns₁ : Set ℝ\nhs₁ : s₁ ∈ atBot\nhff' : ∀ (y : ℝ), y ∈ s₁ → HasDerivAt f (f' y) y\ns₂ : Set ℝ\nhs₂ : s₂ ∈ atBot\nhgg' : ∀ (y : ℝ), y ∈ s₂ → HasDerivAt g (g' y) y\ns₃ : Set ℝ\nhs₃ : s₃ ∈ atBot\nhg' : ∀ (y : ℝ), y ∈ s₃ → g' y ≠ 0\ns : Set ℝ := s₁ ∩ s₂ ∩ s₃\nl : ℝ\nhl : ∀ (b : ℝ), b ≤ l → b ∈ s\nhl' : Iio l ⊆ s\nx : ℝ\nhx : x ∈ Iio l\n⊢ HasDerivAt (fun x => g x) (g' x) x\n[PROOFSTEP]\napply_assumption\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.refine'_1.a\na b : ℝ\nhab : a < b\nl✝ : Filter ℝ\nf f' g g' : ℝ → ℝ\nhfbot : Tendsto f atBot (𝓝 0)\nhgbot : Tendsto g atBot (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) atBot l✝\ns₁ : Set ℝ\nhs₁ : s₁ ∈ atBot\nhff' : ∀ (y : ℝ), y ∈ s₁ → HasDerivAt f (f' y) y\ns₂ : Set ℝ\nhs₂ : s₂ ∈ atBot\nhgg' : ∀ (y : ℝ), y ∈ s₂ → HasDerivAt g (g' y) y\ns₃ : Set ℝ\nhs₃ : s₃ ∈ atBot\nhg' : ∀ (y : ℝ), y ∈ s₃ → g' y ≠ 0\ns : Set ℝ := s₁ ∩ s₂ ∩ s₃\nl : ℝ\nhl : ∀ (b : ℝ), b ≤ l → b ∈ s\nhl' : Iio l ⊆ s\nx : ℝ\nhx : x ∈ Iio l\n⊢ x ∈ s₁\n[PROOFSTEP]\nfirst\n| exact (hl' hx).1.1\n| exact (hl' hx).1.2\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.refine'_1.a\na b : ℝ\nhab : a < b\nl✝ : Filter ℝ\nf f' g g' : ℝ → ℝ\nhfbot : Tendsto f atBot (𝓝 0)\nhgbot : Tendsto g atBot (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) atBot l✝\ns₁ : Set ℝ\nhs₁ : s₁ ∈ atBot\nhff' : ∀ (y : ℝ), y ∈ s₁ → HasDerivAt f (f' y) y\ns₂ : Set ℝ\nhs₂ : s₂ ∈ atBot\nhgg' : ∀ (y : ℝ), y ∈ s₂ → HasDerivAt g (g' y) y\ns₃ : Set ℝ\nhs₃ : s₃ ∈ atBot\nhg' : ∀ (y : ℝ), y ∈ s₃ → g' y ≠ 0\ns : Set ℝ := s₁ ∩ s₂ ∩ s₃\nl : ℝ\nhl : ∀ (b : ℝ), b ≤ l → b ∈ s\nhl' : Iio l ⊆ s\nx : ℝ\nhx : x ∈ Iio l\n⊢ x ∈ s₁\n[PROOFSTEP]\nexact (hl' hx).1.1\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.refine'_2.a\na b : ℝ\nhab : a < b\nl✝ : Filter ℝ\nf f' g g' : ℝ → ℝ\nhfbot : Tendsto f atBot (𝓝 0)\nhgbot : Tendsto g atBot (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) atBot l✝\ns₁ : Set ℝ\nhs₁ : s₁ ∈ atBot\nhff' : ∀ (y : ℝ), y ∈ s₁ → HasDerivAt f (f' y) y\ns₂ : Set ℝ\nhs₂ : s₂ ∈ atBot\nhgg' : ∀ (y : ℝ), y ∈ s₂ → HasDerivAt g (g' y) y\ns₃ : Set ℝ\nhs₃ : s₃ ∈ atBot\nhg' : ∀ (y : ℝ), y ∈ s₃ → g' y ≠ 0\ns : Set ℝ := s₁ ∩ s₂ ∩ s₃\nl : ℝ\nhl : ∀ (b : ℝ), b ≤ l → b ∈ s\nhl' : Iio l ⊆ s\nx : ℝ\nhx : x ∈ Iio l\n⊢ x ∈ s₂\n[PROOFSTEP]\nfirst\n| exact (hl' hx).1.1\n| exact (hl' hx).1.2\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.refine'_2.a\na b : ℝ\nhab : a < b\nl✝ : Filter ℝ\nf f' g g' : ℝ → ℝ\nhfbot : Tendsto f atBot (𝓝 0)\nhgbot : Tendsto g atBot (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) atBot l✝\ns₁ : Set ℝ\nhs₁ : s₁ ∈ atBot\nhff' : ∀ (y : ℝ), y ∈ s₁ → HasDerivAt f (f' y) y\ns₂ : Set ℝ\nhs₂ : s₂ ∈ atBot\nhgg' : ∀ (y : ℝ), y ∈ s₂ → HasDerivAt g (g' y) y\ns₃ : Set ℝ\nhs₃ : s₃ ∈ atBot\nhg' : ∀ (y : ℝ), y ∈ s₃ → g' y ≠ 0\ns : Set ℝ := s₁ ∩ s₂ ∩ s₃\nl : ℝ\nhl : ∀ (b : ℝ), b ≤ l → b ∈ s\nhl' : Iio l ⊆ s\nx : ℝ\nhx : x ∈ Iio l\n⊢ x ∈ s₂\n[PROOFSTEP]\nexact (hl' hx).1.1\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.refine'_2.a\na b : ℝ\nhab : a < b\nl✝ : Filter ℝ\nf f' g g' : ℝ → ℝ\nhfbot : Tendsto f atBot (𝓝 0)\nhgbot : Tendsto g atBot (𝓝 0)\nhdiv : Tendsto (fun x => f' x / g' x) atBot l✝\ns₁ : Set ℝ\nhs₁ : s₁ ∈ atBot\nhff' : ∀ (y : ℝ), y ∈ s₁ → HasDerivAt f (f' y) y\ns₂ : Set ℝ\nhs₂ : s₂ ∈ atBot\nhgg' : ∀ (y : ℝ), y ∈ s₂ → HasDerivAt g (g' y) y\ns₃ : Set ℝ\nhs₃ : s₃ ∈ atBot\nhg' : ∀ (y : ℝ), y ∈ s₃ → g' y ≠ 0\ns : Set ℝ := s₁ ∩ s₂ ∩ s₃\nl : ℝ\nhl : ∀ (b : ℝ), b ≤ l → b ∈ s\nhl' : Iio l ⊆ s\nx : ℝ\nhx : x ∈ Iio l\n⊢ x ∈ s₂\n[PROOFSTEP]\nexact (hl' hx).1.2\n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhdf : ∀ᶠ (x : ℝ) in 𝓝[Ioi a] a, DifferentiableAt ℝ f x\nhg' : ∀ᶠ (x : ℝ) in 𝓝[Ioi a] a, deriv g x ≠ 0\nhfa : Tendsto f (𝓝[Ioi a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Ioi a] a) (𝓝 0)\nhdiv : Tendsto (fun x => deriv f x / deriv g x) (𝓝[Ioi a] a) l\n⊢ Tendsto (fun x => f x / g x) (𝓝[Ioi a] a) l\n[PROOFSTEP]\nhave hdg : ∀ᶠ x in 𝓝[>] a, DifferentiableAt ℝ g x :=\n  hg'.mp (eventually_of_forall fun _ hg' => by_contradiction fun h => hg' (deriv_zero_of_not_differentiableAt h))\n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhdf : ∀ᶠ (x : ℝ) in 𝓝[Ioi a] a, DifferentiableAt ℝ f x\nhg' : ∀ᶠ (x : ℝ) in 𝓝[Ioi a] a, deriv g x ≠ 0\nhfa : Tendsto f (𝓝[Ioi a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Ioi a] a) (𝓝 0)\nhdiv : Tendsto (fun x => deriv f x / deriv g x) (𝓝[Ioi a] a) l\nhdg : ∀ᶠ (x : ℝ) in 𝓝[Ioi a] a, DifferentiableAt ℝ g x\n⊢ Tendsto (fun x => f x / g x) (𝓝[Ioi a] a) l\n[PROOFSTEP]\nhave hdf' : ∀ᶠ x in 𝓝[>] a, HasDerivAt f (deriv f x) x :=\n  hdf.mp (eventually_of_forall fun _ => DifferentiableAt.hasDerivAt)\n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhdf : ∀ᶠ (x : ℝ) in 𝓝[Ioi a] a, DifferentiableAt ℝ f x\nhg' : ∀ᶠ (x : ℝ) in 𝓝[Ioi a] a, deriv g x ≠ 0\nhfa : Tendsto f (𝓝[Ioi a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Ioi a] a) (𝓝 0)\nhdiv : Tendsto (fun x => deriv f x / deriv g x) (𝓝[Ioi a] a) l\nhdg : ∀ᶠ (x : ℝ) in 𝓝[Ioi a] a, DifferentiableAt ℝ g x\nhdf' : ∀ᶠ (x : ℝ) in 𝓝[Ioi a] a, HasDerivAt f (deriv f x) x\n⊢ Tendsto (fun x => f x / g x) (𝓝[Ioi a] a) l\n[PROOFSTEP]\nhave hdg' : ∀ᶠ x in 𝓝[>] a, HasDerivAt g (deriv g x) x :=\n  hdg.mp (eventually_of_forall fun _ => DifferentiableAt.hasDerivAt)\n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhdf : ∀ᶠ (x : ℝ) in 𝓝[Ioi a] a, DifferentiableAt ℝ f x\nhg' : ∀ᶠ (x : ℝ) in 𝓝[Ioi a] a, deriv g x ≠ 0\nhfa : Tendsto f (𝓝[Ioi a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Ioi a] a) (𝓝 0)\nhdiv : Tendsto (fun x => deriv f x / deriv g x) (𝓝[Ioi a] a) l\nhdg : ∀ᶠ (x : ℝ) in 𝓝[Ioi a] a, DifferentiableAt ℝ g x\nhdf' : ∀ᶠ (x : ℝ) in 𝓝[Ioi a] a, HasDerivAt f (deriv f x) x\nhdg' : ∀ᶠ (x : ℝ) in 𝓝[Ioi a] a, HasDerivAt g (deriv g x) x\n⊢ Tendsto (fun x => f x / g x) (𝓝[Ioi a] a) l\n[PROOFSTEP]\nexact HasDerivAt.lhopital_zero_nhds_right hdf' hdg' hg' hfa hga hdiv\n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhdf : ∀ᶠ (x : ℝ) in 𝓝[Iio a] a, DifferentiableAt ℝ f x\nhg' : ∀ᶠ (x : ℝ) in 𝓝[Iio a] a, deriv g x ≠ 0\nhfa : Tendsto f (𝓝[Iio a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Iio a] a) (𝓝 0)\nhdiv : Tendsto (fun x => deriv f x / deriv g x) (𝓝[Iio a] a) l\n⊢ Tendsto (fun x => f x / g x) (𝓝[Iio a] a) l\n[PROOFSTEP]\nhave hdg : ∀ᶠ x in 𝓝[<] a, DifferentiableAt ℝ g x :=\n  hg'.mp (eventually_of_forall fun _ hg' => by_contradiction fun h => hg' (deriv_zero_of_not_differentiableAt h))\n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhdf : ∀ᶠ (x : ℝ) in 𝓝[Iio a] a, DifferentiableAt ℝ f x\nhg' : ∀ᶠ (x : ℝ) in 𝓝[Iio a] a, deriv g x ≠ 0\nhfa : Tendsto f (𝓝[Iio a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Iio a] a) (𝓝 0)\nhdiv : Tendsto (fun x => deriv f x / deriv g x) (𝓝[Iio a] a) l\nhdg : ∀ᶠ (x : ℝ) in 𝓝[Iio a] a, DifferentiableAt ℝ g x\n⊢ Tendsto (fun x => f x / g x) (𝓝[Iio a] a) l\n[PROOFSTEP]\nhave hdf' : ∀ᶠ x in 𝓝[<] a, HasDerivAt f (deriv f x) x :=\n  hdf.mp (eventually_of_forall fun _ => DifferentiableAt.hasDerivAt)\n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhdf : ∀ᶠ (x : ℝ) in 𝓝[Iio a] a, DifferentiableAt ℝ f x\nhg' : ∀ᶠ (x : ℝ) in 𝓝[Iio a] a, deriv g x ≠ 0\nhfa : Tendsto f (𝓝[Iio a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Iio a] a) (𝓝 0)\nhdiv : Tendsto (fun x => deriv f x / deriv g x) (𝓝[Iio a] a) l\nhdg : ∀ᶠ (x : ℝ) in 𝓝[Iio a] a, DifferentiableAt ℝ g x\nhdf' : ∀ᶠ (x : ℝ) in 𝓝[Iio a] a, HasDerivAt f (deriv f x) x\n⊢ Tendsto (fun x => f x / g x) (𝓝[Iio a] a) l\n[PROOFSTEP]\nhave hdg' : ∀ᶠ x in 𝓝[<] a, HasDerivAt g (deriv g x) x :=\n  hdg.mp (eventually_of_forall fun _ => DifferentiableAt.hasDerivAt)\n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhdf : ∀ᶠ (x : ℝ) in 𝓝[Iio a] a, DifferentiableAt ℝ f x\nhg' : ∀ᶠ (x : ℝ) in 𝓝[Iio a] a, deriv g x ≠ 0\nhfa : Tendsto f (𝓝[Iio a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Iio a] a) (𝓝 0)\nhdiv : Tendsto (fun x => deriv f x / deriv g x) (𝓝[Iio a] a) l\nhdg : ∀ᶠ (x : ℝ) in 𝓝[Iio a] a, DifferentiableAt ℝ g x\nhdf' : ∀ᶠ (x : ℝ) in 𝓝[Iio a] a, HasDerivAt f (deriv f x) x\nhdg' : ∀ᶠ (x : ℝ) in 𝓝[Iio a] a, HasDerivAt g (deriv g x) x\n⊢ Tendsto (fun x => f x / g x) (𝓝[Iio a] a) l\n[PROOFSTEP]\nexact HasDerivAt.lhopital_zero_nhds_left hdf' hdg' hg' hfa hga hdiv\n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhdf : ∀ᶠ (x : ℝ) in 𝓝[{a}ᶜ] a, DifferentiableAt ℝ f x\nhg' : ∀ᶠ (x : ℝ) in 𝓝[{a}ᶜ] a, deriv g x ≠ 0\nhfa : Tendsto f (𝓝[{a}ᶜ] a) (𝓝 0)\nhga : Tendsto g (𝓝[{a}ᶜ] a) (𝓝 0)\nhdiv : Tendsto (fun x => deriv f x / deriv g x) (𝓝[{a}ᶜ] a) l\n⊢ Tendsto (fun x => f x / g x) (𝓝[{a}ᶜ] a) l\n[PROOFSTEP]\nsimp only [← Iio_union_Ioi, nhdsWithin_union, tendsto_sup, eventually_sup] at *\n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhdf : (∀ᶠ (x : ℝ) in 𝓝[Iio a] a, DifferentiableAt ℝ f x) ∧ ∀ᶠ (x : ℝ) in 𝓝[Ioi a] a, DifferentiableAt ℝ f x\nhg' : (∀ᶠ (x : ℝ) in 𝓝[Iio a] a, deriv g x ≠ 0) ∧ ∀ᶠ (x : ℝ) in 𝓝[Ioi a] a, deriv g x ≠ 0\nhfa : Tendsto f (𝓝[Iio a] a) (𝓝 0) ∧ Tendsto f (𝓝[Ioi a] a) (𝓝 0)\nhga : Tendsto g (𝓝[Iio a] a) (𝓝 0) ∧ Tendsto g (𝓝[Ioi a] a) (𝓝 0)\nhdiv : Tendsto (fun x => deriv f x / deriv g x) (𝓝[Iio a] a) l ∧ Tendsto (fun x => deriv f x / deriv g x) (𝓝[Ioi a] a) l\n⊢ Tendsto (fun x => f x / g x) (𝓝[Iio a] a) l ∧ Tendsto (fun x => f x / g x) (𝓝[Ioi a] a) l\n[PROOFSTEP]\nexact ⟨lhopital_zero_nhds_left hdf.1 hg'.1 hfa.1 hga.1 hdiv.1, lhopital_zero_nhds_right hdf.2 hg'.2 hfa.2 hga.2 hdiv.2⟩\n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhdf : ∀ᶠ (x : ℝ) in 𝓝 a, DifferentiableAt ℝ f x\nhg' : ∀ᶠ (x : ℝ) in 𝓝 a, deriv g x ≠ 0\nhfa : Tendsto f (𝓝 a) (𝓝 0)\nhga : Tendsto g (𝓝 a) (𝓝 0)\nhdiv : Tendsto (fun x => deriv f x / deriv g x) (𝓝 a) l\n⊢ Tendsto (fun x => f x / g x) (𝓝[{a}ᶜ] a) l\n[PROOFSTEP]\napply lhopital_zero_nhds'\n[GOAL]\ncase hdf\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhdf : ∀ᶠ (x : ℝ) in 𝓝 a, DifferentiableAt ℝ f x\nhg' : ∀ᶠ (x : ℝ) in 𝓝 a, deriv g x ≠ 0\nhfa : Tendsto f (𝓝 a) (𝓝 0)\nhga : Tendsto g (𝓝 a) (𝓝 0)\nhdiv : Tendsto (fun x => deriv f x / deriv g x) (𝓝 a) l\n⊢ ∀ᶠ (x : ℝ) in 𝓝[{a}ᶜ] a, DifferentiableAt ℝ (fun x => f x) x\n[PROOFSTEP]\nfirst\n| apply eventually_nhdsWithin_of_eventually_nhds\n| apply tendsto_nhdsWithin_of_tendsto_nhds\n[GOAL]\ncase hdf\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhdf : ∀ᶠ (x : ℝ) in 𝓝 a, DifferentiableAt ℝ f x\nhg' : ∀ᶠ (x : ℝ) in 𝓝 a, deriv g x ≠ 0\nhfa : Tendsto f (𝓝 a) (𝓝 0)\nhga : Tendsto g (𝓝 a) (𝓝 0)\nhdiv : Tendsto (fun x => deriv f x / deriv g x) (𝓝 a) l\n⊢ ∀ᶠ (x : ℝ) in 𝓝[{a}ᶜ] a, DifferentiableAt ℝ (fun x => f x) x\n[PROOFSTEP]\napply eventually_nhdsWithin_of_eventually_nhds\n[GOAL]\ncase hg'\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhdf : ∀ᶠ (x : ℝ) in 𝓝 a, DifferentiableAt ℝ f x\nhg' : ∀ᶠ (x : ℝ) in 𝓝 a, deriv g x ≠ 0\nhfa : Tendsto f (𝓝 a) (𝓝 0)\nhga : Tendsto g (𝓝 a) (𝓝 0)\nhdiv : Tendsto (fun x => deriv f x / deriv g x) (𝓝 a) l\n⊢ ∀ᶠ (x : ℝ) in 𝓝[{a}ᶜ] a, deriv (fun x => g x) x ≠ 0\n[PROOFSTEP]\nfirst\n| apply eventually_nhdsWithin_of_eventually_nhds\n| apply tendsto_nhdsWithin_of_tendsto_nhds\n[GOAL]\ncase hg'\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhdf : ∀ᶠ (x : ℝ) in 𝓝 a, DifferentiableAt ℝ f x\nhg' : ∀ᶠ (x : ℝ) in 𝓝 a, deriv g x ≠ 0\nhfa : Tendsto f (𝓝 a) (𝓝 0)\nhga : Tendsto g (𝓝 a) (𝓝 0)\nhdiv : Tendsto (fun x => deriv f x / deriv g x) (𝓝 a) l\n⊢ ∀ᶠ (x : ℝ) in 𝓝[{a}ᶜ] a, deriv (fun x => g x) x ≠ 0\n[PROOFSTEP]\napply eventually_nhdsWithin_of_eventually_nhds\n[GOAL]\ncase hfa\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhdf : ∀ᶠ (x : ℝ) in 𝓝 a, DifferentiableAt ℝ f x\nhg' : ∀ᶠ (x : ℝ) in 𝓝 a, deriv g x ≠ 0\nhfa : Tendsto f (𝓝 a) (𝓝 0)\nhga : Tendsto g (𝓝 a) (𝓝 0)\nhdiv : Tendsto (fun x => deriv f x / deriv g x) (𝓝 a) l\n⊢ Tendsto (fun x => f x) (𝓝[{a}ᶜ] a) (𝓝 0)\n[PROOFSTEP]\nfirst\n| apply eventually_nhdsWithin_of_eventually_nhds\n| apply tendsto_nhdsWithin_of_tendsto_nhds\n[GOAL]\ncase hfa\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhdf : ∀ᶠ (x : ℝ) in 𝓝 a, DifferentiableAt ℝ f x\nhg' : ∀ᶠ (x : ℝ) in 𝓝 a, deriv g x ≠ 0\nhfa : Tendsto f (𝓝 a) (𝓝 0)\nhga : Tendsto g (𝓝 a) (𝓝 0)\nhdiv : Tendsto (fun x => deriv f x / deriv g x) (𝓝 a) l\n⊢ Tendsto (fun x => f x) (𝓝[{a}ᶜ] a) (𝓝 0)\n[PROOFSTEP]\napply eventually_nhdsWithin_of_eventually_nhds\n[GOAL]\ncase hfa\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhdf : ∀ᶠ (x : ℝ) in 𝓝 a, DifferentiableAt ℝ f x\nhg' : ∀ᶠ (x : ℝ) in 𝓝 a, deriv g x ≠ 0\nhfa : Tendsto f (𝓝 a) (𝓝 0)\nhga : Tendsto g (𝓝 a) (𝓝 0)\nhdiv : Tendsto (fun x => deriv f x / deriv g x) (𝓝 a) l\n⊢ Tendsto (fun x => f x) (𝓝[{a}ᶜ] a) (𝓝 0)\n[PROOFSTEP]\napply tendsto_nhdsWithin_of_tendsto_nhds\n[GOAL]\ncase hga\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhdf : ∀ᶠ (x : ℝ) in 𝓝 a, DifferentiableAt ℝ f x\nhg' : ∀ᶠ (x : ℝ) in 𝓝 a, deriv g x ≠ 0\nhfa : Tendsto f (𝓝 a) (𝓝 0)\nhga : Tendsto g (𝓝 a) (𝓝 0)\nhdiv : Tendsto (fun x => deriv f x / deriv g x) (𝓝 a) l\n⊢ Tendsto (fun x => g x) (𝓝[{a}ᶜ] a) (𝓝 0)\n[PROOFSTEP]\nfirst\n| apply eventually_nhdsWithin_of_eventually_nhds\n| apply tendsto_nhdsWithin_of_tendsto_nhds\n[GOAL]\ncase hga\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhdf : ∀ᶠ (x : ℝ) in 𝓝 a, DifferentiableAt ℝ f x\nhg' : ∀ᶠ (x : ℝ) in 𝓝 a, deriv g x ≠ 0\nhfa : Tendsto f (𝓝 a) (𝓝 0)\nhga : Tendsto g (𝓝 a) (𝓝 0)\nhdiv : Tendsto (fun x => deriv f x / deriv g x) (𝓝 a) l\n⊢ Tendsto (fun x => g x) (𝓝[{a}ᶜ] a) (𝓝 0)\n[PROOFSTEP]\napply eventually_nhdsWithin_of_eventually_nhds\n[GOAL]\ncase hga\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhdf : ∀ᶠ (x : ℝ) in 𝓝 a, DifferentiableAt ℝ f x\nhg' : ∀ᶠ (x : ℝ) in 𝓝 a, deriv g x ≠ 0\nhfa : Tendsto f (𝓝 a) (𝓝 0)\nhga : Tendsto g (𝓝 a) (𝓝 0)\nhdiv : Tendsto (fun x => deriv f x / deriv g x) (𝓝 a) l\n⊢ Tendsto (fun x => g x) (𝓝[{a}ᶜ] a) (𝓝 0)\n[PROOFSTEP]\napply tendsto_nhdsWithin_of_tendsto_nhds\n[GOAL]\ncase hdiv\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhdf : ∀ᶠ (x : ℝ) in 𝓝 a, DifferentiableAt ℝ f x\nhg' : ∀ᶠ (x : ℝ) in 𝓝 a, deriv g x ≠ 0\nhfa : Tendsto f (𝓝 a) (𝓝 0)\nhga : Tendsto g (𝓝 a) (𝓝 0)\nhdiv : Tendsto (fun x => deriv f x / deriv g x) (𝓝 a) l\n⊢ Tendsto (fun x => deriv (fun x => f x) x / deriv (fun x => g x) x) (𝓝[{a}ᶜ] a) l\n[PROOFSTEP]\nfirst\n| apply eventually_nhdsWithin_of_eventually_nhds\n| apply tendsto_nhdsWithin_of_tendsto_nhds\n[GOAL]\ncase hdiv\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhdf : ∀ᶠ (x : ℝ) in 𝓝 a, DifferentiableAt ℝ f x\nhg' : ∀ᶠ (x : ℝ) in 𝓝 a, deriv g x ≠ 0\nhfa : Tendsto f (𝓝 a) (𝓝 0)\nhga : Tendsto g (𝓝 a) (𝓝 0)\nhdiv : Tendsto (fun x => deriv f x / deriv g x) (𝓝 a) l\n⊢ Tendsto (fun x => deriv (fun x => f x) x / deriv (fun x => g x) x) (𝓝[{a}ᶜ] a) l\n[PROOFSTEP]\napply eventually_nhdsWithin_of_eventually_nhds\n[GOAL]\ncase hdiv\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhdf : ∀ᶠ (x : ℝ) in 𝓝 a, DifferentiableAt ℝ f x\nhg' : ∀ᶠ (x : ℝ) in 𝓝 a, deriv g x ≠ 0\nhfa : Tendsto f (𝓝 a) (𝓝 0)\nhga : Tendsto g (𝓝 a) (𝓝 0)\nhdiv : Tendsto (fun x => deriv f x / deriv g x) (𝓝 a) l\n⊢ Tendsto (fun x => deriv (fun x => f x) x / deriv (fun x => g x) x) (𝓝[{a}ᶜ] a) l\n[PROOFSTEP]\napply tendsto_nhdsWithin_of_tendsto_nhds\n[GOAL]\ncase hdf.h\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhdf : ∀ᶠ (x : ℝ) in 𝓝 a, DifferentiableAt ℝ f x\nhg' : ∀ᶠ (x : ℝ) in 𝓝 a, deriv g x ≠ 0\nhfa : Tendsto f (𝓝 a) (𝓝 0)\nhga : Tendsto g (𝓝 a) (𝓝 0)\nhdiv : Tendsto (fun x => deriv f x / deriv g x) (𝓝 a) l\n⊢ ∀ᶠ (x : ℝ) in 𝓝 a, DifferentiableAt ℝ (fun x => f x) x\n[PROOFSTEP]\nassumption\n[GOAL]\ncase hg'.h\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhdf : ∀ᶠ (x : ℝ) in 𝓝 a, DifferentiableAt ℝ f x\nhg' : ∀ᶠ (x : ℝ) in 𝓝 a, deriv g x ≠ 0\nhfa : Tendsto f (𝓝 a) (𝓝 0)\nhga : Tendsto g (𝓝 a) (𝓝 0)\nhdiv : Tendsto (fun x => deriv f x / deriv g x) (𝓝 a) l\n⊢ ∀ᶠ (x : ℝ) in 𝓝 a, deriv (fun x => g x) x ≠ 0\n[PROOFSTEP]\nassumption\n[GOAL]\ncase hfa.h\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhdf : ∀ᶠ (x : ℝ) in 𝓝 a, DifferentiableAt ℝ f x\nhg' : ∀ᶠ (x : ℝ) in 𝓝 a, deriv g x ≠ 0\nhfa : Tendsto f (𝓝 a) (𝓝 0)\nhga : Tendsto g (𝓝 a) (𝓝 0)\nhdiv : Tendsto (fun x => deriv f x / deriv g x) (𝓝 a) l\n⊢ Tendsto (fun x => f x) (𝓝 a) (𝓝 0)\n[PROOFSTEP]\nassumption\n[GOAL]\ncase hga.h\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhdf : ∀ᶠ (x : ℝ) in 𝓝 a, DifferentiableAt ℝ f x\nhg' : ∀ᶠ (x : ℝ) in 𝓝 a, deriv g x ≠ 0\nhfa : Tendsto f (𝓝 a) (𝓝 0)\nhga : Tendsto g (𝓝 a) (𝓝 0)\nhdiv : Tendsto (fun x => deriv f x / deriv g x) (𝓝 a) l\n⊢ Tendsto (fun x => g x) (𝓝 a) (𝓝 0)\n[PROOFSTEP]\nassumption\n[GOAL]\ncase hdiv.h\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhdf : ∀ᶠ (x : ℝ) in 𝓝 a, DifferentiableAt ℝ f x\nhg' : ∀ᶠ (x : ℝ) in 𝓝 a, deriv g x ≠ 0\nhfa : Tendsto f (𝓝 a) (𝓝 0)\nhga : Tendsto g (𝓝 a) (𝓝 0)\nhdiv : Tendsto (fun x => deriv f x / deriv g x) (𝓝 a) l\n⊢ Tendsto (fun x => deriv (fun x => f x) x / deriv (fun x => g x) x) (𝓝 a) l\n[PROOFSTEP]\nassumption\n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhdf : ∀ᶠ (x : ℝ) in atTop, DifferentiableAt ℝ f x\nhg' : ∀ᶠ (x : ℝ) in atTop, deriv g x ≠ 0\nhftop : Tendsto f atTop (𝓝 0)\nhgtop : Tendsto g atTop (𝓝 0)\nhdiv : Tendsto (fun x => deriv f x / deriv g x) atTop l\n⊢ Tendsto (fun x => f x / g x) atTop l\n[PROOFSTEP]\nhave hdg : ∀ᶠ x in atTop, DifferentiableAt ℝ g x :=\n  hg'.mp (eventually_of_forall fun _ hg' => by_contradiction fun h => hg' (deriv_zero_of_not_differentiableAt h))\n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhdf : ∀ᶠ (x : ℝ) in atTop, DifferentiableAt ℝ f x\nhg' : ∀ᶠ (x : ℝ) in atTop, deriv g x ≠ 0\nhftop : Tendsto f atTop (𝓝 0)\nhgtop : Tendsto g atTop (𝓝 0)\nhdiv : Tendsto (fun x => deriv f x / deriv g x) atTop l\nhdg : ∀ᶠ (x : ℝ) in atTop, DifferentiableAt ℝ g x\n⊢ Tendsto (fun x => f x / g x) atTop l\n[PROOFSTEP]\nhave hdf' : ∀ᶠ x in atTop, HasDerivAt f (deriv f x) x :=\n  hdf.mp (eventually_of_forall fun _ => DifferentiableAt.hasDerivAt)\n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhdf : ∀ᶠ (x : ℝ) in atTop, DifferentiableAt ℝ f x\nhg' : ∀ᶠ (x : ℝ) in atTop, deriv g x ≠ 0\nhftop : Tendsto f atTop (𝓝 0)\nhgtop : Tendsto g atTop (𝓝 0)\nhdiv : Tendsto (fun x => deriv f x / deriv g x) atTop l\nhdg : ∀ᶠ (x : ℝ) in atTop, DifferentiableAt ℝ g x\nhdf' : ∀ᶠ (x : ℝ) in atTop, HasDerivAt f (deriv f x) x\n⊢ Tendsto (fun x => f x / g x) atTop l\n[PROOFSTEP]\nhave hdg' : ∀ᶠ x in atTop, HasDerivAt g (deriv g x) x :=\n  hdg.mp (eventually_of_forall fun _ => DifferentiableAt.hasDerivAt)\n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhdf : ∀ᶠ (x : ℝ) in atTop, DifferentiableAt ℝ f x\nhg' : ∀ᶠ (x : ℝ) in atTop, deriv g x ≠ 0\nhftop : Tendsto f atTop (𝓝 0)\nhgtop : Tendsto g atTop (𝓝 0)\nhdiv : Tendsto (fun x => deriv f x / deriv g x) atTop l\nhdg : ∀ᶠ (x : ℝ) in atTop, DifferentiableAt ℝ g x\nhdf' : ∀ᶠ (x : ℝ) in atTop, HasDerivAt f (deriv f x) x\nhdg' : ∀ᶠ (x : ℝ) in atTop, HasDerivAt g (deriv g x) x\n⊢ Tendsto (fun x => f x / g x) atTop l\n[PROOFSTEP]\nexact HasDerivAt.lhopital_zero_atTop hdf' hdg' hg' hftop hgtop hdiv\n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhdf : ∀ᶠ (x : ℝ) in atBot, DifferentiableAt ℝ f x\nhg' : ∀ᶠ (x : ℝ) in atBot, deriv g x ≠ 0\nhfbot : Tendsto f atBot (𝓝 0)\nhgbot : Tendsto g atBot (𝓝 0)\nhdiv : Tendsto (fun x => deriv f x / deriv g x) atBot l\n⊢ Tendsto (fun x => f x / g x) atBot l\n[PROOFSTEP]\nhave hdg : ∀ᶠ x in atBot, DifferentiableAt ℝ g x :=\n  hg'.mp (eventually_of_forall fun _ hg' => by_contradiction fun h => hg' (deriv_zero_of_not_differentiableAt h))\n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhdf : ∀ᶠ (x : ℝ) in atBot, DifferentiableAt ℝ f x\nhg' : ∀ᶠ (x : ℝ) in atBot, deriv g x ≠ 0\nhfbot : Tendsto f atBot (𝓝 0)\nhgbot : Tendsto g atBot (𝓝 0)\nhdiv : Tendsto (fun x => deriv f x / deriv g x) atBot l\nhdg : ∀ᶠ (x : ℝ) in atBot, DifferentiableAt ℝ g x\n⊢ Tendsto (fun x => f x / g x) atBot l\n[PROOFSTEP]\nhave hdf' : ∀ᶠ x in atBot, HasDerivAt f (deriv f x) x :=\n  hdf.mp (eventually_of_forall fun _ => DifferentiableAt.hasDerivAt)\n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhdf : ∀ᶠ (x : ℝ) in atBot, DifferentiableAt ℝ f x\nhg' : ∀ᶠ (x : ℝ) in atBot, deriv g x ≠ 0\nhfbot : Tendsto f atBot (𝓝 0)\nhgbot : Tendsto g atBot (𝓝 0)\nhdiv : Tendsto (fun x => deriv f x / deriv g x) atBot l\nhdg : ∀ᶠ (x : ℝ) in atBot, DifferentiableAt ℝ g x\nhdf' : ∀ᶠ (x : ℝ) in atBot, HasDerivAt f (deriv f x) x\n⊢ Tendsto (fun x => f x / g x) atBot l\n[PROOFSTEP]\nhave hdg' : ∀ᶠ x in atBot, HasDerivAt g (deriv g x) x :=\n  hdg.mp (eventually_of_forall fun _ => DifferentiableAt.hasDerivAt)\n[GOAL]\na b : ℝ\nhab : a < b\nl : Filter ℝ\nf f' g g' : ℝ → ℝ\nhdf : ∀ᶠ (x : ℝ) in atBot, DifferentiableAt ℝ f x\nhg' : ∀ᶠ (x : ℝ) in atBot, deriv g x ≠ 0\nhfbot : Tendsto f atBot (𝓝 0)\nhgbot : Tendsto g atBot (𝓝 0)\nhdiv : Tendsto (fun x => deriv f x / deriv g x) atBot l\nhdg : ∀ᶠ (x : ℝ) in atBot, DifferentiableAt ℝ g x\nhdf' : ∀ᶠ (x : ℝ) in atBot, HasDerivAt f (deriv f x) x\nhdg' : ∀ᶠ (x : ℝ) in atBot, HasDerivAt g (deriv g x) x\n⊢ Tendsto (fun x => f x / g x) atBot l\n[PROOFSTEP]\nexact HasDerivAt.lhopital_zero_atBot hdf' hdg' hg' hfbot hgbot hdiv\n", "meta": {"mathlib_filename": "Mathlib.Analysis.Calculus.LHopital", "llama_tokens": 91399, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.885631476836816, "lm_q2_score": 0.5964331462646254, "lm_q1q2_score": 0.5282199681607689}}
{"text": "[GOAL]\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn✝ p : R\nk n : ℕ\nhn : IsPrimePow n\n⊢ Nat.minFac n ^ ↑(Nat.factorization n) (Nat.minFac n) = n\n[PROOFSTEP]\nobtain ⟨p, k, hp, hk, rfl⟩ := hn\n[GOAL]\ncase intro.intro.intro.intro\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn p✝ : R\nk✝ p k : ℕ\nhp : Prime p\nhk : 0 < k\n⊢ Nat.minFac (p ^ k) ^ ↑(Nat.factorization (p ^ k)) (Nat.minFac (p ^ k)) = p ^ k\n[PROOFSTEP]\nrw [← Nat.prime_iff] at hp \n[GOAL]\ncase intro.intro.intro.intro\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn p✝ : R\nk✝ p k : ℕ\nhp : Nat.Prime p\nhk : 0 < k\n⊢ Nat.minFac (p ^ k) ^ ↑(Nat.factorization (p ^ k)) (Nat.minFac (p ^ k)) = p ^ k\n[PROOFSTEP]\nrw [hp.pow_minFac hk.ne', hp.factorization_pow, Finsupp.single_eq_same]\n[GOAL]\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn✝ p : R\nk n : ℕ\nh : Nat.minFac n ^ ↑(Nat.factorization n) (Nat.minFac n) = n\nhn : n ≠ 1\n⊢ IsPrimePow n\n[PROOFSTEP]\nrcases eq_or_ne n 0 with (rfl | hn')\n[GOAL]\ncase inl\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn p : R\nk : ℕ\nh : Nat.minFac 0 ^ ↑(Nat.factorization 0) (Nat.minFac 0) = 0\nhn : 0 ≠ 1\n⊢ IsPrimePow 0\n[PROOFSTEP]\nsimp_all\n[GOAL]\ncase inr\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn✝ p : R\nk n : ℕ\nh : Nat.minFac n ^ ↑(Nat.factorization n) (Nat.minFac n) = n\nhn : n ≠ 1\nhn' : n ≠ 0\n⊢ IsPrimePow n\n[PROOFSTEP]\nrefine' ⟨_, _, (Nat.minFac_prime hn).prime, _, h⟩\n[GOAL]\ncase inr\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn✝ p : R\nk n : ℕ\nh : Nat.minFac n ^ ↑(Nat.factorization n) (Nat.minFac n) = n\nhn : n ≠ 1\nhn' : n ≠ 0\n⊢ 0 < ↑(Nat.factorization n) (Nat.minFac n)\n[PROOFSTEP]\nrw [pos_iff_ne_zero, ← Finsupp.mem_support_iff, Nat.factor_iff_mem_factorization,\n  Nat.mem_factors_iff_dvd hn' (Nat.minFac_prime hn)]\n[GOAL]\ncase inr\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn✝ p : R\nk n : ℕ\nh : Nat.minFac n ^ ↑(Nat.factorization n) (Nat.minFac n) = n\nhn : n ≠ 1\nhn' : n ≠ 0\n⊢ Nat.minFac n ∣ n\n[PROOFSTEP]\napply Nat.minFac_dvd\n[GOAL]\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn✝ p : R\nk n : ℕ\n⊢ IsPrimePow n ↔ ∃ p k, 0 < k ∧ Nat.factorization n = Finsupp.single p k\n[PROOFSTEP]\nrw [isPrimePow_nat_iff]\n[GOAL]\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn✝ p : R\nk n : ℕ\n⊢ (∃ p k, Nat.Prime p ∧ 0 < k ∧ p ^ k = n) ↔ ∃ p k, 0 < k ∧ Nat.factorization n = Finsupp.single p k\n[PROOFSTEP]\nrefine' exists₂_congr fun p k => _\n[GOAL]\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn✝ p✝ : R\nk✝ n p k : ℕ\n⊢ Nat.Prime p ∧ 0 < k ∧ p ^ k = n ↔ 0 < k ∧ Nat.factorization n = Finsupp.single p k\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn✝ p✝ : R\nk✝ n p k : ℕ\n⊢ Nat.Prime p ∧ 0 < k ∧ p ^ k = n → 0 < k ∧ Nat.factorization n = Finsupp.single p k\n[PROOFSTEP]\nrintro ⟨hp, hk, hn⟩\n[GOAL]\ncase mp.intro.intro\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn✝ p✝ : R\nk✝ n p k : ℕ\nhp : Nat.Prime p\nhk : 0 < k\nhn : p ^ k = n\n⊢ 0 < k ∧ Nat.factorization n = Finsupp.single p k\n[PROOFSTEP]\nexact ⟨hk, by rw [← hn, Nat.Prime.factorization_pow hp]⟩\n[GOAL]\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn✝ p✝ : R\nk✝ n p k : ℕ\nhp : Nat.Prime p\nhk : 0 < k\nhn : p ^ k = n\n⊢ Nat.factorization n = Finsupp.single p k\n[PROOFSTEP]\nrw [← hn, Nat.Prime.factorization_pow hp]\n[GOAL]\ncase mpr\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn✝ p✝ : R\nk✝ n p k : ℕ\n⊢ 0 < k ∧ Nat.factorization n = Finsupp.single p k → Nat.Prime p ∧ 0 < k ∧ p ^ k = n\n[PROOFSTEP]\nrintro ⟨hk, hn⟩\n[GOAL]\ncase mpr.intro\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn✝ p✝ : R\nk✝ n p k : ℕ\nhk : 0 < k\nhn : Nat.factorization n = Finsupp.single p k\n⊢ Nat.Prime p ∧ 0 < k ∧ p ^ k = n\n[PROOFSTEP]\nhave hn0 : n ≠ 0 := by\n  rintro rfl\n  simp_all only [Finsupp.single_eq_zero, eq_comm, Nat.factorization_zero, hk.ne']\n[GOAL]\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn✝ p✝ : R\nk✝ n p k : ℕ\nhk : 0 < k\nhn : Nat.factorization n = Finsupp.single p k\n⊢ n ≠ 0\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn p✝ : R\nk✝ p k : ℕ\nhk : 0 < k\nhn : Nat.factorization 0 = Finsupp.single p k\n⊢ False\n[PROOFSTEP]\nsimp_all only [Finsupp.single_eq_zero, eq_comm, Nat.factorization_zero, hk.ne']\n[GOAL]\ncase mpr.intro\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn✝ p✝ : R\nk✝ n p k : ℕ\nhk : 0 < k\nhn : Nat.factorization n = Finsupp.single p k\nhn0 : n ≠ 0\n⊢ Nat.Prime p ∧ 0 < k ∧ p ^ k = n\n[PROOFSTEP]\nrw [Nat.eq_pow_of_factorization_eq_single hn0 hn]\n[GOAL]\ncase mpr.intro\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn✝ p✝ : R\nk✝ n p k : ℕ\nhk : 0 < k\nhn : Nat.factorization n = Finsupp.single p k\nhn0 : n ≠ 0\n⊢ Nat.Prime p ∧ 0 < k ∧ p ^ k = p ^ k\n[PROOFSTEP]\nexact ⟨Nat.prime_of_mem_factorization (by simp [hn, hk.ne'] : p ∈ n.factorization.support), hk, rfl⟩\n[GOAL]\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn✝ p✝ : R\nk✝ n p k : ℕ\nhk : 0 < k\nhn : Nat.factorization n = Finsupp.single p k\nhn0 : n ≠ 0\n⊢ p ∈ (Nat.factorization n).support\n[PROOFSTEP]\nsimp [hn, hk.ne']\n[GOAL]\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn✝ p : R\nk n : ℕ\n⊢ IsPrimePow n ↔ Finset.card (Nat.factorization n).support = 1\n[PROOFSTEP]\nsimp_rw [isPrimePow_iff_factorization_eq_single, Finsupp.card_support_eq_one', exists_prop, pos_iff_ne_zero]\n[GOAL]\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn✝ p : R\nk n : ℕ\nh : IsPrimePow n\n⊢ ∃ p, Nat.Prime p ∧ n / p ^ ↑(Nat.factorization n) p = 1\n[PROOFSTEP]\nrcases eq_or_ne n 0 with (rfl | hn0)\n[GOAL]\ncase inl\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn p : R\nk : ℕ\nh : IsPrimePow 0\n⊢ ∃ p, Nat.Prime p ∧ 0 / p ^ ↑(Nat.factorization 0) p = 1\n[PROOFSTEP]\ncases not_isPrimePow_zero h\n[GOAL]\ncase inr\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn✝ p : R\nk n : ℕ\nh : IsPrimePow n\nhn0 : n ≠ 0\n⊢ ∃ p, Nat.Prime p ∧ n / p ^ ↑(Nat.factorization n) p = 1\n[PROOFSTEP]\nrcases isPrimePow_iff_factorization_eq_single.mp h with ⟨p, k, hk0, h1⟩\n[GOAL]\ncase inr.intro.intro.intro\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn✝ p✝ : R\nk✝ n : ℕ\nh : IsPrimePow n\nhn0 : n ≠ 0\np k : ℕ\nhk0 : 0 < k\nh1 : Nat.factorization n = Finsupp.single p k\n⊢ ∃ p, Nat.Prime p ∧ n / p ^ ↑(Nat.factorization n) p = 1\n[PROOFSTEP]\nrcases em' p.Prime with (pp | pp)\n[GOAL]\ncase inr.intro.intro.intro.inl\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn✝ p✝ : R\nk✝ n : ℕ\nh : IsPrimePow n\nhn0 : n ≠ 0\np k : ℕ\nhk0 : 0 < k\nh1 : Nat.factorization n = Finsupp.single p k\npp : ¬Nat.Prime p\n⊢ ∃ p, Nat.Prime p ∧ n / p ^ ↑(Nat.factorization n) p = 1\n[PROOFSTEP]\nrefine' absurd _ hk0.ne'\n[GOAL]\ncase inr.intro.intro.intro.inl\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn✝ p✝ : R\nk✝ n : ℕ\nh : IsPrimePow n\nhn0 : n ≠ 0\np k : ℕ\nhk0 : 0 < k\nh1 : Nat.factorization n = Finsupp.single p k\npp : ¬Nat.Prime p\n⊢ k = 0\n[PROOFSTEP]\nsimp [← Nat.factorization_eq_zero_of_non_prime n pp, h1]\n[GOAL]\ncase inr.intro.intro.intro.inr\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn✝ p✝ : R\nk✝ n : ℕ\nh : IsPrimePow n\nhn0 : n ≠ 0\np k : ℕ\nhk0 : 0 < k\nh1 : Nat.factorization n = Finsupp.single p k\npp : Nat.Prime p\n⊢ ∃ p, Nat.Prime p ∧ n / p ^ ↑(Nat.factorization n) p = 1\n[PROOFSTEP]\nrefine' ⟨p, pp, _⟩\n[GOAL]\ncase inr.intro.intro.intro.inr\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn✝ p✝ : R\nk✝ n : ℕ\nh : IsPrimePow n\nhn0 : n ≠ 0\np k : ℕ\nhk0 : 0 < k\nh1 : Nat.factorization n = Finsupp.single p k\npp : Nat.Prime p\n⊢ n / p ^ ↑(Nat.factorization n) p = 1\n[PROOFSTEP]\nrefine' Nat.eq_of_factorization_eq (Nat.ord_compl_pos p hn0).ne' (by simp) fun q => _\n[GOAL]\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn✝ p✝ : R\nk✝ n : ℕ\nh : IsPrimePow n\nhn0 : n ≠ 0\np k : ℕ\nhk0 : 0 < k\nh1 : Nat.factorization n = Finsupp.single p k\npp : Nat.Prime p\n⊢ 1 ≠ 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr.intro.intro.intro.inr\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn✝ p✝ : R\nk✝ n : ℕ\nh : IsPrimePow n\nhn0 : n ≠ 0\np k : ℕ\nhk0 : 0 < k\nh1 : Nat.factorization n = Finsupp.single p k\npp : Nat.Prime p\nq : ℕ\n⊢ ↑(Nat.factorization (n / p ^ ↑(Nat.factorization n) p)) q = ↑(Nat.factorization 1) q\n[PROOFSTEP]\nrw [Nat.factorization_ord_compl n p, h1]\n[GOAL]\ncase inr.intro.intro.intro.inr\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn✝ p✝ : R\nk✝ n : ℕ\nh : IsPrimePow n\nhn0 : n ≠ 0\np k : ℕ\nhk0 : 0 < k\nh1 : Nat.factorization n = Finsupp.single p k\npp : Nat.Prime p\nq : ℕ\n⊢ ↑(Finsupp.erase p (Finsupp.single p k)) q = ↑(Nat.factorization 1) q\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn✝ p : R\nk n : ℕ\nhn : n ≠ 1\n⊢ IsPrimePow n ↔ ∃ p, Nat.Prime p ∧ n / p ^ ↑(Nat.factorization n) p = 1\n[PROOFSTEP]\nrefine' ⟨fun h => IsPrimePow.exists_ord_compl_eq_one h, fun h => _⟩\n[GOAL]\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn✝ p : R\nk n : ℕ\nhn : n ≠ 1\nh : ∃ p, Nat.Prime p ∧ n / p ^ ↑(Nat.factorization n) p = 1\n⊢ IsPrimePow n\n[PROOFSTEP]\nrcases h with ⟨p, pp, h⟩\n[GOAL]\ncase intro.intro\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn✝ p✝ : R\nk n : ℕ\nhn : n ≠ 1\np : ℕ\npp : Nat.Prime p\nh : n / p ^ ↑(Nat.factorization n) p = 1\n⊢ IsPrimePow n\n[PROOFSTEP]\nrw [isPrimePow_nat_iff]\n[GOAL]\ncase intro.intro\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn✝ p✝ : R\nk n : ℕ\nhn : n ≠ 1\np : ℕ\npp : Nat.Prime p\nh : n / p ^ ↑(Nat.factorization n) p = 1\n⊢ ∃ p k, Nat.Prime p ∧ 0 < k ∧ p ^ k = n\n[PROOFSTEP]\nrw [← Nat.eq_of_dvd_of_div_eq_one (Nat.ord_proj_dvd n p) h] at hn ⊢\n[GOAL]\ncase intro.intro\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn✝ p✝ : R\nk n p : ℕ\nhn : p ^ ↑(Nat.factorization n) p ≠ 1\npp : Nat.Prime p\nh : n / p ^ ↑(Nat.factorization n) p = 1\n⊢ ∃ p_1 k, Nat.Prime p_1 ∧ 0 < k ∧ p_1 ^ k = p ^ ↑(Nat.factorization n) p\n[PROOFSTEP]\nrefine' ⟨p, n.factorization p, pp, _, by simp⟩\n[GOAL]\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn✝ p✝ : R\nk n p : ℕ\nhn : p ^ ↑(Nat.factorization n) p ≠ 1\npp : Nat.Prime p\nh : n / p ^ ↑(Nat.factorization n) p = 1\n⊢ p ^ ↑(Nat.factorization n) p = p ^ ↑(Nat.factorization n) p\n[PROOFSTEP]\nsimp\n[GOAL]\ncase intro.intro\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn✝ p✝ : R\nk n p : ℕ\nhn : p ^ ↑(Nat.factorization n) p ≠ 1\npp : Nat.Prime p\nh : n / p ^ ↑(Nat.factorization n) p = 1\n⊢ 0 < ↑(Nat.factorization n) p\n[PROOFSTEP]\ncontrapose! hn\n[GOAL]\ncase intro.intro\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn✝ p✝ : R\nk n p : ℕ\npp : Nat.Prime p\nh : n / p ^ ↑(Nat.factorization n) p = 1\nhn : ↑(Nat.factorization n) p ≤ 0\n⊢ p ^ ↑(Nat.factorization n) p = 1\n[PROOFSTEP]\nsimp [le_zero_iff.1 hn]\n[GOAL]\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn✝ p : R\nk n : ℕ\n⊢ IsPrimePow n ↔ ∃! p, Nat.Prime p ∧ p ∣ n\n[PROOFSTEP]\nrw [isPrimePow_nat_iff]\n[GOAL]\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn✝ p : R\nk n : ℕ\n⊢ (∃ p k, Nat.Prime p ∧ 0 < k ∧ p ^ k = n) ↔ ∃! p, Nat.Prime p ∧ p ∣ n\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn✝ p : R\nk n : ℕ\n⊢ (∃ p k, Nat.Prime p ∧ 0 < k ∧ p ^ k = n) → ∃! p, Nat.Prime p ∧ p ∣ n\n[PROOFSTEP]\nrintro ⟨p, k, hp, hk, rfl⟩\n[GOAL]\ncase mp.intro.intro.intro.intro\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn p✝ : R\nk✝ p k : ℕ\nhp : Nat.Prime p\nhk : 0 < k\n⊢ ∃! p_1, Nat.Prime p_1 ∧ p_1 ∣ p ^ k\n[PROOFSTEP]\nrefine' ⟨p, ⟨hp, dvd_pow_self _ hk.ne'⟩, _⟩\n[GOAL]\ncase mp.intro.intro.intro.intro\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn p✝ : R\nk✝ p k : ℕ\nhp : Nat.Prime p\nhk : 0 < k\n⊢ ∀ (y : ℕ), (fun p_1 => Nat.Prime p_1 ∧ p_1 ∣ p ^ k) y → y = p\n[PROOFSTEP]\nrintro q ⟨hq, hq'⟩\n[GOAL]\ncase mp.intro.intro.intro.intro.intro\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn p✝ : R\nk✝ p k : ℕ\nhp : Nat.Prime p\nhk : 0 < k\nq : ℕ\nhq : Nat.Prime q\nhq' : q ∣ p ^ k\n⊢ q = p\n[PROOFSTEP]\nexact (Nat.prime_dvd_prime_iff_eq hq hp).1 (hq.dvd_of_dvd_pow hq')\n[GOAL]\ncase mpr\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn✝ p : R\nk n : ℕ\n⊢ (∃! p, Nat.Prime p ∧ p ∣ n) → ∃ p k, Nat.Prime p ∧ 0 < k ∧ p ^ k = n\n[PROOFSTEP]\nrintro ⟨p, ⟨hp, hn⟩, hq⟩\n[GOAL]\ncase mpr.intro.intro.intro\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn✝ p✝ : R\nk n p : ℕ\nhq : ∀ (y : ℕ), (fun p => Nat.Prime p ∧ p ∣ n) y → y = p\nhp : Nat.Prime p\nhn : p ∣ n\n⊢ ∃ p k, Nat.Prime p ∧ 0 < k ∧ p ^ k = n\n[PROOFSTEP]\nrcases eq_or_ne n 0 with (rfl | hn₀)\n[GOAL]\ncase mpr.intro.intro.intro.inl\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn p✝ : R\nk p : ℕ\nhp : Nat.Prime p\nhq : ∀ (y : ℕ), (fun p => Nat.Prime p ∧ p ∣ 0) y → y = p\nhn : p ∣ 0\n⊢ ∃ p k, Nat.Prime p ∧ 0 < k ∧ p ^ k = 0\n[PROOFSTEP]\ncases (hq 2 ⟨Nat.prime_two, dvd_zero 2⟩).trans (hq 3 ⟨Nat.prime_three, dvd_zero 3⟩).symm\n[GOAL]\ncase mpr.intro.intro.intro.inr\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn✝ p✝ : R\nk n p : ℕ\nhq : ∀ (y : ℕ), (fun p => Nat.Prime p ∧ p ∣ n) y → y = p\nhp : Nat.Prime p\nhn : p ∣ n\nhn₀ : n ≠ 0\n⊢ ∃ p k, Nat.Prime p ∧ 0 < k ∧ p ^ k = n\n[PROOFSTEP]\nrefine' ⟨p, n.factorization p, hp, hp.factorization_pos_of_dvd hn₀ hn, _⟩\n[GOAL]\ncase mpr.intro.intro.intro.inr\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn✝ p✝ : R\nk n p : ℕ\nhq : ∀ (y : ℕ), (fun p => Nat.Prime p ∧ p ∣ n) y → y = p\nhp : Nat.Prime p\nhn : p ∣ n\nhn₀ : n ≠ 0\n⊢ p ^ ↑(Nat.factorization n) p = n\n[PROOFSTEP]\nsimp only [and_imp] at hq \n[GOAL]\ncase mpr.intro.intro.intro.inr\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn✝ p✝ : R\nk n p : ℕ\nhp : Nat.Prime p\nhn : p ∣ n\nhn₀ : n ≠ 0\nhq : ∀ (y : ℕ), Nat.Prime y → y ∣ n → y = p\n⊢ p ^ ↑(Nat.factorization n) p = n\n[PROOFSTEP]\napply\n  Nat.dvd_antisymm\n    (Nat.ord_proj_dvd _ _)\n      -- We need to show n ∣ p ^ n.factorization p\n[GOAL]\ncase mpr.intro.intro.intro.inr\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn✝ p✝ : R\nk n p : ℕ\nhp : Nat.Prime p\nhn : p ∣ n\nhn₀ : n ≠ 0\nhq : ∀ (y : ℕ), Nat.Prime y → y ∣ n → y = p\n⊢ n ∣ p ^ ↑(Nat.factorization n) p\n[PROOFSTEP]\napply Nat.dvd_of_factors_subperm hn₀\n[GOAL]\ncase mpr.intro.intro.intro.inr\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn✝ p✝ : R\nk n p : ℕ\nhp : Nat.Prime p\nhn : p ∣ n\nhn₀ : n ≠ 0\nhq : ∀ (y : ℕ), Nat.Prime y → y ∣ n → y = p\n⊢ Nat.factors n <+~ Nat.factors (p ^ ↑(Nat.factorization n) p)\n[PROOFSTEP]\nrw [hp.factors_pow, List.subperm_ext_iff]\n[GOAL]\ncase mpr.intro.intro.intro.inr\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn✝ p✝ : R\nk n p : ℕ\nhp : Nat.Prime p\nhn : p ∣ n\nhn₀ : n ≠ 0\nhq : ∀ (y : ℕ), Nat.Prime y → y ∣ n → y = p\n⊢ ∀ (x : ℕ),\n    x ∈ Nat.factors n → List.count x (Nat.factors n) ≤ List.count x (List.replicate (↑(Nat.factorization n) p) p)\n[PROOFSTEP]\nintro q hq'\n[GOAL]\ncase mpr.intro.intro.intro.inr\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn✝ p✝ : R\nk n p : ℕ\nhp : Nat.Prime p\nhn : p ∣ n\nhn₀ : n ≠ 0\nhq : ∀ (y : ℕ), Nat.Prime y → y ∣ n → y = p\nq : ℕ\nhq' : q ∈ Nat.factors n\n⊢ List.count q (Nat.factors n) ≤ List.count q (List.replicate (↑(Nat.factorization n) p) p)\n[PROOFSTEP]\nrw [Nat.mem_factors hn₀] at hq' \n[GOAL]\ncase mpr.intro.intro.intro.inr\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn✝ p✝ : R\nk n p : ℕ\nhp : Nat.Prime p\nhn : p ∣ n\nhn₀ : n ≠ 0\nhq : ∀ (y : ℕ), Nat.Prime y → y ∣ n → y = p\nq : ℕ\nhq' : Nat.Prime q ∧ q ∣ n\n⊢ List.count q (Nat.factors n) ≤ List.count q (List.replicate (↑(Nat.factorization n) p) p)\n[PROOFSTEP]\ncases hq _ hq'.1 hq'.2\n[GOAL]\ncase mpr.intro.intro.intro.inr.refl\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn✝ p✝ : R\nk n p : ℕ\nhp : Nat.Prime p\nhn : p ∣ n\nhn₀ : n ≠ 0\nhq : ∀ (y : ℕ), Nat.Prime y → y ∣ n → y = p\nhq' : Nat.Prime p ∧ p ∣ n\n⊢ List.count p (Nat.factors n) ≤ List.count p (List.replicate (↑(Nat.factorization n) p) p)\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn✝ p : R\nk✝ n k : ℕ\nhk : k ≠ 0\n⊢ IsPrimePow (n ^ k) ↔ IsPrimePow n\n[PROOFSTEP]\nsimp only [isPrimePow_iff_unique_prime_dvd]\n[GOAL]\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn✝ p : R\nk✝ n k : ℕ\nhk : k ≠ 0\n⊢ (∃! p, Nat.Prime p ∧ p ∣ n ^ k) ↔ ∃! p, Nat.Prime p ∧ p ∣ n\n[PROOFSTEP]\napply exists_unique_congr\n[GOAL]\ncase h\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn✝ p : R\nk✝ n k : ℕ\nhk : k ≠ 0\n⊢ ∀ (a : ℕ), Nat.Prime a ∧ a ∣ n ^ k ↔ Nat.Prime a ∧ a ∣ n\n[PROOFSTEP]\nsimp only [and_congr_right_iff]\n[GOAL]\ncase h\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn✝ p : R\nk✝ n k : ℕ\nhk : k ≠ 0\n⊢ ∀ (a : ℕ), Nat.Prime a → (a ∣ n ^ k ↔ a ∣ n)\n[PROOFSTEP]\nintro p hp\n[GOAL]\ncase h\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn✝ p✝ : R\nk✝ n k : ℕ\nhk : k ≠ 0\np : ℕ\nhp : Nat.Prime p\n⊢ p ∣ n ^ k ↔ p ∣ n\n[PROOFSTEP]\nexact ⟨hp.dvd_of_dvd_pow, fun t => t.trans (dvd_pow_self _ hk)⟩\n[GOAL]\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn✝ p : R\nk n a b : ℕ\nhab : coprime a b\nhn : IsPrimePow n\n⊢ n ∣ a * b ↔ n ∣ a ∨ n ∣ b\n[PROOFSTEP]\nrcases eq_or_ne a 0 with (rfl | ha)\n[GOAL]\ncase inl\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn✝ p : R\nk n b : ℕ\nhn : IsPrimePow n\nhab : coprime 0 b\n⊢ n ∣ 0 * b ↔ n ∣ 0 ∨ n ∣ b\n[PROOFSTEP]\nsimp only [Nat.coprime_zero_left] at hab \n[GOAL]\ncase inl\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn✝ p : R\nk n b : ℕ\nhn : IsPrimePow n\nhab : b = 1\n⊢ n ∣ 0 * b ↔ n ∣ 0 ∨ n ∣ b\n[PROOFSTEP]\nsimp [hab, Finset.filter_singleton, not_isPrimePow_one]\n[GOAL]\ncase inr\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn✝ p : R\nk n a b : ℕ\nhab : coprime a b\nhn : IsPrimePow n\nha : a ≠ 0\n⊢ n ∣ a * b ↔ n ∣ a ∨ n ∣ b\n[PROOFSTEP]\nrcases eq_or_ne b 0 with (rfl | hb)\n[GOAL]\ncase inr.inl\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn✝ p : R\nk n a : ℕ\nhn : IsPrimePow n\nha : a ≠ 0\nhab : coprime a 0\n⊢ n ∣ a * 0 ↔ n ∣ a ∨ n ∣ 0\n[PROOFSTEP]\nsimp only [Nat.coprime_zero_right] at hab \n[GOAL]\ncase inr.inl\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn✝ p : R\nk n a : ℕ\nhn : IsPrimePow n\nha : a ≠ 0\nhab : a = 1\n⊢ n ∣ a * 0 ↔ n ∣ a ∨ n ∣ 0\n[PROOFSTEP]\nsimp [hab, Finset.filter_singleton, not_isPrimePow_one]\n[GOAL]\ncase inr.inr\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn✝ p : R\nk n a b : ℕ\nhab : coprime a b\nhn : IsPrimePow n\nha : a ≠ 0\nhb : b ≠ 0\n⊢ n ∣ a * b ↔ n ∣ a ∨ n ∣ b\n[PROOFSTEP]\nrefine'\n  ⟨_, fun h =>\n    Or.elim h (fun i => i.trans ((@dvd_mul_right a b a hab).mpr (dvd_refl a))) fun i =>\n      i.trans ((@dvd_mul_left a b b hab.symm).mpr (dvd_refl b))⟩\n[GOAL]\ncase inr.inr\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn✝ p : R\nk n a b : ℕ\nhab : coprime a b\nhn : IsPrimePow n\nha : a ≠ 0\nhb : b ≠ 0\n⊢ n ∣ a * b → n ∣ a ∨ n ∣ b\n[PROOFSTEP]\nobtain ⟨p, k, hp, _, rfl⟩ := (isPrimePow_nat_iff _).1 hn\n[GOAL]\ncase inr.inr.intro.intro.intro.intro\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn p✝ : R\nk✝ a b : ℕ\nhab : coprime a b\nha : a ≠ 0\nhb : b ≠ 0\np k : ℕ\nhp : Prime p\nleft✝ : 0 < k\nhn : IsPrimePow (p ^ k)\n⊢ p ^ k ∣ a * b → p ^ k ∣ a ∨ p ^ k ∣ b\n[PROOFSTEP]\nsimp only [hp.pow_dvd_iff_le_factorization (mul_ne_zero ha hb), Nat.factorization_mul ha hb,\n  hp.pow_dvd_iff_le_factorization ha, hp.pow_dvd_iff_le_factorization hb, Pi.add_apply, Finsupp.coe_add]\n[GOAL]\ncase inr.inr.intro.intro.intro.intro\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn p✝ : R\nk✝ a b : ℕ\nhab : coprime a b\nha : a ≠ 0\nhb : b ≠ 0\np k : ℕ\nhp : Prime p\nleft✝ : 0 < k\nhn : IsPrimePow (p ^ k)\n⊢ k ≤ ↑(factorization a) p + ↑(factorization b) p → k ≤ ↑(factorization a) p ∨ k ≤ ↑(factorization b) p\n[PROOFSTEP]\nhave : a.factorization p = 0 ∨ b.factorization p = 0 :=\n  by\n  rw [← Finsupp.not_mem_support_iff, ← Finsupp.not_mem_support_iff, ← not_and_or, ← Finset.mem_inter]\n  intro t\n  simpa using (Nat.factorization_disjoint_of_coprime hab).le_bot t\n[GOAL]\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn p✝ : R\nk✝ a b : ℕ\nhab : coprime a b\nha : a ≠ 0\nhb : b ≠ 0\np k : ℕ\nhp : Prime p\nleft✝ : 0 < k\nhn : IsPrimePow (p ^ k)\n⊢ ↑(factorization a) p = 0 ∨ ↑(factorization b) p = 0\n[PROOFSTEP]\nrw [← Finsupp.not_mem_support_iff, ← Finsupp.not_mem_support_iff, ← not_and_or, ← Finset.mem_inter]\n[GOAL]\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn p✝ : R\nk✝ a b : ℕ\nhab : coprime a b\nha : a ≠ 0\nhb : b ≠ 0\np k : ℕ\nhp : Prime p\nleft✝ : 0 < k\nhn : IsPrimePow (p ^ k)\n⊢ ¬p ∈ (factorization a).support ∩ (factorization b).support\n[PROOFSTEP]\nintro t\n[GOAL]\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn p✝ : R\nk✝ a b : ℕ\nhab : coprime a b\nha : a ≠ 0\nhb : b ≠ 0\np k : ℕ\nhp : Prime p\nleft✝ : 0 < k\nhn : IsPrimePow (p ^ k)\nt : p ∈ (factorization a).support ∩ (factorization b).support\n⊢ False\n[PROOFSTEP]\nsimpa using (Nat.factorization_disjoint_of_coprime hab).le_bot t\n[GOAL]\ncase inr.inr.intro.intro.intro.intro\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn p✝ : R\nk✝ a b : ℕ\nhab : coprime a b\nha : a ≠ 0\nhb : b ≠ 0\np k : ℕ\nhp : Prime p\nleft✝ : 0 < k\nhn : IsPrimePow (p ^ k)\nthis : ↑(factorization a) p = 0 ∨ ↑(factorization b) p = 0\n⊢ k ≤ ↑(factorization a) p + ↑(factorization b) p → k ≤ ↑(factorization a) p ∨ k ≤ ↑(factorization b) p\n[PROOFSTEP]\ncases' this with h h\n[GOAL]\ncase inr.inr.intro.intro.intro.intro.inl\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn p✝ : R\nk✝ a b : ℕ\nhab : coprime a b\nha : a ≠ 0\nhb : b ≠ 0\np k : ℕ\nhp : Prime p\nleft✝ : 0 < k\nhn : IsPrimePow (p ^ k)\nh : ↑(factorization a) p = 0\n⊢ k ≤ ↑(factorization a) p + ↑(factorization b) p → k ≤ ↑(factorization a) p ∨ k ≤ ↑(factorization b) p\n[PROOFSTEP]\nsimp [h, imp_or]\n[GOAL]\ncase inr.inr.intro.intro.intro.intro.inr\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn p✝ : R\nk✝ a b : ℕ\nhab : coprime a b\nha : a ≠ 0\nhb : b ≠ 0\np k : ℕ\nhp : Prime p\nleft✝ : 0 < k\nhn : IsPrimePow (p ^ k)\nh : ↑(factorization b) p = 0\n⊢ k ≤ ↑(factorization a) p + ↑(factorization b) p → k ≤ ↑(factorization a) p ∨ k ≤ ↑(factorization b) p\n[PROOFSTEP]\nsimp [h, imp_or]\n[GOAL]\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn p : R\nk a b : ℕ\nhab : coprime a b\n⊢ Finset.filter IsPrimePow (divisors (a * b)) = Finset.filter IsPrimePow (divisors a ∪ divisors b)\n[PROOFSTEP]\nrcases eq_or_ne a 0 with (rfl | ha)\n[GOAL]\ncase inl\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn p : R\nk b : ℕ\nhab : coprime 0 b\n⊢ Finset.filter IsPrimePow (divisors (0 * b)) = Finset.filter IsPrimePow (divisors 0 ∪ divisors b)\n[PROOFSTEP]\nsimp only [Nat.coprime_zero_left] at hab \n[GOAL]\ncase inl\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn p : R\nk b : ℕ\nhab : b = 1\n⊢ Finset.filter IsPrimePow (divisors (0 * b)) = Finset.filter IsPrimePow (divisors 0 ∪ divisors b)\n[PROOFSTEP]\nsimp [hab, Finset.filter_singleton, not_isPrimePow_one]\n[GOAL]\ncase inr\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn p : R\nk a b : ℕ\nhab : coprime a b\nha : a ≠ 0\n⊢ Finset.filter IsPrimePow (divisors (a * b)) = Finset.filter IsPrimePow (divisors a ∪ divisors b)\n[PROOFSTEP]\nrcases eq_or_ne b 0 with (rfl | hb)\n[GOAL]\ncase inr.inl\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn p : R\nk a : ℕ\nha : a ≠ 0\nhab : coprime a 0\n⊢ Finset.filter IsPrimePow (divisors (a * 0)) = Finset.filter IsPrimePow (divisors a ∪ divisors 0)\n[PROOFSTEP]\nsimp only [Nat.coprime_zero_right] at hab \n[GOAL]\ncase inr.inl\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn p : R\nk a : ℕ\nha : a ≠ 0\nhab : a = 1\n⊢ Finset.filter IsPrimePow (divisors (a * 0)) = Finset.filter IsPrimePow (divisors a ∪ divisors 0)\n[PROOFSTEP]\nsimp [hab, Finset.filter_singleton, not_isPrimePow_one]\n[GOAL]\ncase inr.inr\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn p : R\nk a b : ℕ\nhab : coprime a b\nha : a ≠ 0\nhb : b ≠ 0\n⊢ Finset.filter IsPrimePow (divisors (a * b)) = Finset.filter IsPrimePow (divisors a ∪ divisors b)\n[PROOFSTEP]\next n\n[GOAL]\ncase inr.inr.a\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn✝ p : R\nk a b : ℕ\nhab : coprime a b\nha : a ≠ 0\nhb : b ≠ 0\nn : ℕ\n⊢ n ∈ Finset.filter IsPrimePow (divisors (a * b)) ↔ n ∈ Finset.filter IsPrimePow (divisors a ∪ divisors b)\n[PROOFSTEP]\nsimp only [ha, hb, Finset.mem_union, Finset.mem_filter, Nat.mul_eq_zero, and_true_iff, Ne.def, and_congr_left_iff,\n  not_false_iff, Nat.mem_divisors, or_self_iff]\n[GOAL]\ncase inr.inr.a\nR : Type u_1\ninst✝ : CommMonoidWithZero R\nn✝ p : R\nk a b : ℕ\nhab : coprime a b\nha : a ≠ 0\nhb : b ≠ 0\nn : ℕ\n⊢ IsPrimePow n → (n ∣ a * b ↔ n ∣ a ∨ n ∣ b)\n[PROOFSTEP]\napply hab.isPrimePow_dvd_mul\n", "meta": {"mathlib_filename": "Mathlib.Data.Nat.Factorization.PrimePow", "llama_tokens": 12394, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7662936324115011, "lm_q2_score": 0.6893056104028799, "lm_q1q2_score": 0.5282105000372498}}
{"text": "[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝⁸ : CommSemiring R\ninst✝⁷ : StarRing R\ninst✝⁶ : TrivialStar R\ninst✝⁵ : AddCommMonoid A\ninst✝⁴ : StarAddMonoid A\ninst✝³ : Module R A\ninst✝² : StarModule R A\ninst✝¹ : TopologicalSpace A\ninst✝ : ContinuousStar A\nsrc✝ : A ≃+ A := AddEquiv.refl A\nr : R\na : A\n⊢ AddHom.toFun\n      { toFun := src✝.toFun,\n        map_add' :=\n          (_ :\n            ∀ (x y : A), Equiv.toFun src✝.toEquiv (x + y) = Equiv.toFun src✝.toEquiv x + Equiv.toFun src✝.toEquiv y) }\n      (r • a) =\n    ↑(starRingEnd R) r •\n      AddHom.toFun\n        { toFun := src✝.toFun,\n          map_add' :=\n            (_ :\n              ∀ (x y : A), Equiv.toFun src✝.toEquiv (x + y) = Equiv.toFun src✝.toEquiv x + Equiv.toFun src✝.toEquiv y) }\n        a\n[PROOFSTEP]\nsimp [starRingEnd_apply]\n", "meta": {"mathlib_filename": "Mathlib.Topology.Algebra.Module.Star", "llama_tokens": 370, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8289388083214156, "lm_q2_score": 0.6370307944803832, "lm_q1q2_score": 0.5280595476406136}}
{"text": "[GOAL]\nF : Type u_1\nΓ : outParam (Subgroup SL(2, ℤ))\nk : outParam ℤ\nf g : SlashInvariantForm Γ k\nh : f.toFun = g.toFun\n⊢ f = g\n[PROOFSTEP]\ncases f\n[GOAL]\ncase mk\nF : Type u_1\nΓ : outParam (Subgroup SL(2, ℤ))\nk : outParam ℤ\ng : SlashInvariantForm Γ k\ntoFun✝ : ℍ → ℂ\nslash_action_eq'✝ : ∀ (γ : { x // x ∈ Γ }), toFun✝ ∣[k] γ = toFun✝\nh : { toFun := toFun✝, slash_action_eq' := slash_action_eq'✝ }.toFun = g.toFun\n⊢ { toFun := toFun✝, slash_action_eq' := slash_action_eq'✝ } = g\n[PROOFSTEP]\ncases g\n[GOAL]\ncase mk.mk\nF : Type u_1\nΓ : outParam (Subgroup SL(2, ℤ))\nk : outParam ℤ\ntoFun✝¹ : ℍ → ℂ\nslash_action_eq'✝¹ : ∀ (γ : { x // x ∈ Γ }), toFun✝¹ ∣[k] γ = toFun✝¹\ntoFun✝ : ℍ → ℂ\nslash_action_eq'✝ : ∀ (γ : { x // x ∈ Γ }), toFun✝ ∣[k] γ = toFun✝\nh :\n  { toFun := toFun✝¹, slash_action_eq' := slash_action_eq'✝¹ }.toFun =\n    { toFun := toFun✝, slash_action_eq' := slash_action_eq'✝ }.toFun\n⊢ { toFun := toFun✝¹, slash_action_eq' := slash_action_eq'✝¹ } =\n    { toFun := toFun✝, slash_action_eq' := slash_action_eq'✝ }\n[PROOFSTEP]\ncongr\n[GOAL]\nF : Type u_1\nΓ✝ : outParam (Subgroup SL(2, ℤ))\nk✝ : outParam ℤ\nk : ℤ\nΓ : Subgroup SL(2, ℤ)\ninst✝ : SlashInvariantFormClass F Γ k\nf : F\nγ : { x // x ∈ Γ }\nz : ℍ\n⊢ ↑f (γ • z) = (↑(↑↑↑γ 1 0) * ↑z + ↑(↑↑↑γ 1 1)) ^ k * ↑f z\n[PROOFSTEP]\nrw [← ModularForm.slash_action_eq'_iff, slash_action_eqn]\n[GOAL]\nF : Type u_1\nΓ : outParam (Subgroup SL(2, ℤ))\nk : outParam ℤ\nf g : SlashInvariantForm Γ k\nγ : { x // x ∈ Γ }\n⊢ (↑f + ↑g) ∣[k] γ = ↑f + ↑g\n[PROOFSTEP]\nrw [SlashAction.add_slash, slash_action_eqn, slash_action_eqn]\n[GOAL]\nF : Type u_1\nΓ : outParam (Subgroup SL(2, ℤ))\nk : outParam ℤ\nα : Type u_2\ninst✝¹ : SMul α ℂ\ninst✝ : IsScalarTower α ℂ ℂ\nc : α\nf : SlashInvariantForm Γ k\nγ : { x // x ∈ Γ }\n⊢ (c • ↑f) ∣[k] γ = c • ↑f\n[PROOFSTEP]\nrw [SlashAction.smul_slash_of_tower, slash_action_eqn]\n[GOAL]\nF : Type u_1\nΓ : outParam (Subgroup SL(2, ℤ))\nk : outParam ℤ\nf : SlashInvariantForm Γ k\nγ : { x // x ∈ Γ }\n⊢ (-↑f) ∣[k] γ = -↑f\n[PROOFSTEP]\nrw [SlashAction.neg_slash, slash_action_eqn]\n[GOAL]\nF : Type u_1\nΓ✝ : outParam (Subgroup SL(2, ℤ))\nk : outParam ℤ\nk₁ k₂ : ℤ\nΓ : Subgroup SL(2, ℤ)\nf : SlashInvariantForm Γ k₁\ng : SlashInvariantForm Γ k₂\nA : { x // x ∈ Γ }\n⊢ (↑f * ↑g) ∣[k₁ + k₂] A = ↑f * ↑g\n[PROOFSTEP]\nsimp_rw [ModularForm.mul_slash_subgroup, SlashInvariantFormClass.slash_action_eq]\n", "meta": {"mathlib_filename": "Mathlib.NumberTheory.ModularForms.SlashInvariantForms", "llama_tokens": 1246, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.785308580887758, "lm_q2_score": 0.6723316926137812, "lm_q1q2_score": 0.5279878474123929}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁵ : MeasurableSpace β\ninst✝⁴ : MeasurableSpace E\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\nq : ℝ\np : ℝ≥0∞\ninst✝¹ : OpensMeasurableSpace E\nf : β → E\nhf : Measurable f\ns : Set E\ny₀ : E\nh₀ : y₀ ∈ s\ninst✝ : SeparableSpace ↑s\nx : β\nn : ℕ\n⊢ ‖↑(approxOn f hf s y₀ h₀ n) x - f x‖₊ ≤ ‖f x - y₀‖₊\n[PROOFSTEP]\nhave := edist_approxOn_le hf h₀ x n\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁵ : MeasurableSpace β\ninst✝⁴ : MeasurableSpace E\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\nq : ℝ\np : ℝ≥0∞\ninst✝¹ : OpensMeasurableSpace E\nf : β → E\nhf : Measurable f\ns : Set E\ny₀ : E\nh₀ : y₀ ∈ s\ninst✝ : SeparableSpace ↑s\nx : β\nn : ℕ\nthis : edist (↑(approxOn f hf s y₀ h₀ n) x) (f x) ≤ edist y₀ (f x)\n⊢ ‖↑(approxOn f hf s y₀ h₀ n) x - f x‖₊ ≤ ‖f x - y₀‖₊\n[PROOFSTEP]\nrw [edist_comm y₀] at this \n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁵ : MeasurableSpace β\ninst✝⁴ : MeasurableSpace E\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\nq : ℝ\np : ℝ≥0∞\ninst✝¹ : OpensMeasurableSpace E\nf : β → E\nhf : Measurable f\ns : Set E\ny₀ : E\nh₀ : y₀ ∈ s\ninst✝ : SeparableSpace ↑s\nx : β\nn : ℕ\nthis : edist (↑(approxOn f hf s y₀ h₀ n) x) (f x) ≤ edist (f x) y₀\n⊢ ‖↑(approxOn f hf s y₀ h₀ n) x - f x‖₊ ≤ ‖f x - y₀‖₊\n[PROOFSTEP]\nsimp only [edist_nndist, nndist_eq_nnnorm] at this \n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁵ : MeasurableSpace β\ninst✝⁴ : MeasurableSpace E\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\nq : ℝ\np : ℝ≥0∞\ninst✝¹ : OpensMeasurableSpace E\nf : β → E\nhf : Measurable f\ns : Set E\ny₀ : E\nh₀ : y₀ ∈ s\ninst✝ : SeparableSpace ↑s\nx : β\nn : ℕ\nthis : ↑‖↑(approxOn f hf s y₀ h₀ n) x - f x‖₊ ≤ ↑‖f x - y₀‖₊\n⊢ ‖↑(approxOn f hf s y₀ h₀ n) x - f x‖₊ ≤ ‖f x - y₀‖₊\n[PROOFSTEP]\nexact_mod_cast this\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁵ : MeasurableSpace β\ninst✝⁴ : MeasurableSpace E\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\nq : ℝ\np : ℝ≥0∞\ninst✝¹ : OpensMeasurableSpace E\nf : β → E\nhf : Measurable f\ns : Set E\ny₀ : E\nh₀ : y₀ ∈ s\ninst✝ : SeparableSpace ↑s\nx : β\nn : ℕ\n⊢ ‖↑(approxOn f hf s y₀ h₀ n) x - y₀‖ ≤ ‖f x - y₀‖ + ‖f x - y₀‖\n[PROOFSTEP]\nhave := edist_approxOn_y0_le hf h₀ x n\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁵ : MeasurableSpace β\ninst✝⁴ : MeasurableSpace E\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\nq : ℝ\np : ℝ≥0∞\ninst✝¹ : OpensMeasurableSpace E\nf : β → E\nhf : Measurable f\ns : Set E\ny₀ : E\nh₀ : y₀ ∈ s\ninst✝ : SeparableSpace ↑s\nx : β\nn : ℕ\nthis : edist y₀ (↑(approxOn f hf s y₀ h₀ n) x) ≤ edist y₀ (f x) + edist y₀ (f x)\n⊢ ‖↑(approxOn f hf s y₀ h₀ n) x - y₀‖ ≤ ‖f x - y₀‖ + ‖f x - y₀‖\n[PROOFSTEP]\nrepeat' rw [edist_comm y₀, edist_eq_coe_nnnorm_sub] at this \n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁵ : MeasurableSpace β\ninst✝⁴ : MeasurableSpace E\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\nq : ℝ\np : ℝ≥0∞\ninst✝¹ : OpensMeasurableSpace E\nf : β → E\nhf : Measurable f\ns : Set E\ny₀ : E\nh₀ : y₀ ∈ s\ninst✝ : SeparableSpace ↑s\nx : β\nn : ℕ\nthis : edist y₀ (↑(approxOn f hf s y₀ h₀ n) x) ≤ edist y₀ (f x) + edist y₀ (f x)\n⊢ ‖↑(approxOn f hf s y₀ h₀ n) x - y₀‖ ≤ ‖f x - y₀‖ + ‖f x - y₀‖\n[PROOFSTEP]\nrw [edist_comm y₀, edist_eq_coe_nnnorm_sub] at this \n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁵ : MeasurableSpace β\ninst✝⁴ : MeasurableSpace E\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\nq : ℝ\np : ℝ≥0∞\ninst✝¹ : OpensMeasurableSpace E\nf : β → E\nhf : Measurable f\ns : Set E\ny₀ : E\nh₀ : y₀ ∈ s\ninst✝ : SeparableSpace ↑s\nx : β\nn : ℕ\nthis : ↑‖↑(approxOn f hf s y₀ h₀ n) x - y₀‖₊ ≤ edist y₀ (f x) + edist y₀ (f x)\n⊢ ‖↑(approxOn f hf s y₀ h₀ n) x - y₀‖ ≤ ‖f x - y₀‖ + ‖f x - y₀‖\n[PROOFSTEP]\nrw [edist_comm y₀, edist_eq_coe_nnnorm_sub] at this \n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁵ : MeasurableSpace β\ninst✝⁴ : MeasurableSpace E\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\nq : ℝ\np : ℝ≥0∞\ninst✝¹ : OpensMeasurableSpace E\nf : β → E\nhf : Measurable f\ns : Set E\ny₀ : E\nh₀ : y₀ ∈ s\ninst✝ : SeparableSpace ↑s\nx : β\nn : ℕ\nthis : ↑‖↑(approxOn f hf s y₀ h₀ n) x - y₀‖₊ ≤ ↑‖f x - y₀‖₊ + ↑‖f x - y₀‖₊\n⊢ ‖↑(approxOn f hf s y₀ h₀ n) x - y₀‖ ≤ ‖f x - y₀‖ + ‖f x - y₀‖\n[PROOFSTEP]\nrw [edist_comm y₀, edist_eq_coe_nnnorm_sub] at this \n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁵ : MeasurableSpace β\ninst✝⁴ : MeasurableSpace E\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\nq : ℝ\np : ℝ≥0∞\ninst✝¹ : OpensMeasurableSpace E\nf : β → E\nhf : Measurable f\ns : Set E\ny₀ : E\nh₀ : y₀ ∈ s\ninst✝ : SeparableSpace ↑s\nx : β\nn : ℕ\nthis : ↑‖↑(approxOn f hf s y₀ h₀ n) x - y₀‖₊ ≤ ↑‖f x - y₀‖₊ + ↑‖f x - y₀‖₊\n⊢ ‖↑(approxOn f hf s y₀ h₀ n) x - y₀‖ ≤ ‖f x - y₀‖ + ‖f x - y₀‖\n[PROOFSTEP]\nexact_mod_cast this\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁵ : MeasurableSpace β\ninst✝⁴ : MeasurableSpace E\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\nq : ℝ\np : ℝ≥0∞\ninst✝¹ : OpensMeasurableSpace E\nf : β → E\nhf : Measurable f\ns : Set E\nh₀ : 0 ∈ s\ninst✝ : SeparableSpace ↑s\nx : β\nn : ℕ\n⊢ ‖↑(approxOn f hf s 0 h₀ n) x‖ ≤ ‖f x‖ + ‖f x‖\n[PROOFSTEP]\nhave := edist_approxOn_y0_le hf h₀ x n\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁵ : MeasurableSpace β\ninst✝⁴ : MeasurableSpace E\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\nq : ℝ\np : ℝ≥0∞\ninst✝¹ : OpensMeasurableSpace E\nf : β → E\nhf : Measurable f\ns : Set E\nh₀ : 0 ∈ s\ninst✝ : SeparableSpace ↑s\nx : β\nn : ℕ\nthis : edist 0 (↑(approxOn f hf s 0 h₀ n) x) ≤ edist 0 (f x) + edist 0 (f x)\n⊢ ‖↑(approxOn f hf s 0 h₀ n) x‖ ≤ ‖f x‖ + ‖f x‖\n[PROOFSTEP]\nsimp [edist_comm (0 : E), edist_eq_coe_nnnorm] at this \n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁵ : MeasurableSpace β\ninst✝⁴ : MeasurableSpace E\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\nq : ℝ\np : ℝ≥0∞\ninst✝¹ : OpensMeasurableSpace E\nf : β → E\nhf : Measurable f\ns : Set E\nh₀ : 0 ∈ s\ninst✝ : SeparableSpace ↑s\nx : β\nn : ℕ\nthis : ↑‖↑(approxOn f hf s 0 h₀ n) x‖₊ ≤ ↑‖f x‖₊ + ↑‖f x‖₊\n⊢ ‖↑(approxOn f hf s 0 h₀ n) x‖ ≤ ‖f x‖ + ‖f x‖\n[PROOFSTEP]\nexact_mod_cast this\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁵ : MeasurableSpace β\ninst✝⁴ : MeasurableSpace E\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\nq : ℝ\np : ℝ≥0∞\ninst✝¹ : OpensMeasurableSpace E\nf : β → E\nhf : Measurable f\ns : Set E\ny₀ : E\nh₀ : y₀ ∈ s\ninst✝ : SeparableSpace ↑s\nhp_ne_top : p ≠ ⊤\nμ : Measure β\nhμ : ∀ᵐ (x : β) ∂μ, f x ∈ closure s\nhi : snorm (fun x => f x - y₀) p μ < ⊤\n⊢ Tendsto (fun n => snorm (↑(approxOn f hf s y₀ h₀ n) - f) p μ) atTop (𝓝 0)\n[PROOFSTEP]\nby_cases hp_zero : p = 0\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁵ : MeasurableSpace β\ninst✝⁴ : MeasurableSpace E\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\nq : ℝ\np : ℝ≥0∞\ninst✝¹ : OpensMeasurableSpace E\nf : β → E\nhf : Measurable f\ns : Set E\ny₀ : E\nh₀ : y₀ ∈ s\ninst✝ : SeparableSpace ↑s\nhp_ne_top : p ≠ ⊤\nμ : Measure β\nhμ : ∀ᵐ (x : β) ∂μ, f x ∈ closure s\nhi : snorm (fun x => f x - y₀) p μ < ⊤\nhp_zero : p = 0\n⊢ Tendsto (fun n => snorm (↑(approxOn f hf s y₀ h₀ n) - f) p μ) atTop (𝓝 0)\n[PROOFSTEP]\nsimpa only [hp_zero, snorm_exponent_zero] using tendsto_const_nhds\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁵ : MeasurableSpace β\ninst✝⁴ : MeasurableSpace E\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\nq : ℝ\np : ℝ≥0∞\ninst✝¹ : OpensMeasurableSpace E\nf : β → E\nhf : Measurable f\ns : Set E\ny₀ : E\nh₀ : y₀ ∈ s\ninst✝ : SeparableSpace ↑s\nhp_ne_top : p ≠ ⊤\nμ : Measure β\nhμ : ∀ᵐ (x : β) ∂μ, f x ∈ closure s\nhi : snorm (fun x => f x - y₀) p μ < ⊤\nhp_zero : ¬p = 0\n⊢ Tendsto (fun n => snorm (↑(approxOn f hf s y₀ h₀ n) - f) p μ) atTop (𝓝 0)\n[PROOFSTEP]\nhave hp : 0 < p.toReal := toReal_pos hp_zero hp_ne_top\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁵ : MeasurableSpace β\ninst✝⁴ : MeasurableSpace E\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\nq : ℝ\np : ℝ≥0∞\ninst✝¹ : OpensMeasurableSpace E\nf : β → E\nhf : Measurable f\ns : Set E\ny₀ : E\nh₀ : y₀ ∈ s\ninst✝ : SeparableSpace ↑s\nhp_ne_top : p ≠ ⊤\nμ : Measure β\nhμ : ∀ᵐ (x : β) ∂μ, f x ∈ closure s\nhi : snorm (fun x => f x - y₀) p μ < ⊤\nhp_zero : ¬p = 0\nhp : 0 < ENNReal.toReal p\n⊢ Tendsto (fun n => snorm (↑(approxOn f hf s y₀ h₀ n) - f) p μ) atTop (𝓝 0)\n[PROOFSTEP]\nsuffices Tendsto (fun n => ∫⁻ x, (‖approxOn f hf s y₀ h₀ n x - f x‖₊ : ℝ≥0∞) ^ p.toReal ∂μ) atTop (𝓝 0)\n  by\n  simp only [snorm_eq_lintegral_rpow_nnnorm hp_zero hp_ne_top]\n  convert continuous_rpow_const.continuousAt.tendsto.comp this\n  simp [zero_rpow_of_pos (_root_.inv_pos.mpr hp)]\n    -- We simply check the conditions of the Dominated Convergence Theorem:\n      -- (1) The function \"`p`-th power of distance between `f` and the approximation\" is measurable\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁵ : MeasurableSpace β\ninst✝⁴ : MeasurableSpace E\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\nq : ℝ\np : ℝ≥0∞\ninst✝¹ : OpensMeasurableSpace E\nf : β → E\nhf : Measurable f\ns : Set E\ny₀ : E\nh₀ : y₀ ∈ s\ninst✝ : SeparableSpace ↑s\nhp_ne_top : p ≠ ⊤\nμ : Measure β\nhμ : ∀ᵐ (x : β) ∂μ, f x ∈ closure s\nhi : snorm (fun x => f x - y₀) p μ < ⊤\nhp_zero : ¬p = 0\nhp : 0 < ENNReal.toReal p\nthis : Tendsto (fun n => ∫⁻ (x : β), ↑‖↑(approxOn f hf s y₀ h₀ n) x - f x‖₊ ^ ENNReal.toReal p ∂μ) atTop (𝓝 0)\n⊢ Tendsto (fun n => snorm (↑(approxOn f hf s y₀ h₀ n) - f) p μ) atTop (𝓝 0)\n[PROOFSTEP]\nsimp only [snorm_eq_lintegral_rpow_nnnorm hp_zero hp_ne_top]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁵ : MeasurableSpace β\ninst✝⁴ : MeasurableSpace E\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\nq : ℝ\np : ℝ≥0∞\ninst✝¹ : OpensMeasurableSpace E\nf : β → E\nhf : Measurable f\ns : Set E\ny₀ : E\nh₀ : y₀ ∈ s\ninst✝ : SeparableSpace ↑s\nhp_ne_top : p ≠ ⊤\nμ : Measure β\nhμ : ∀ᵐ (x : β) ∂μ, f x ∈ closure s\nhi : snorm (fun x => f x - y₀) p μ < ⊤\nhp_zero : ¬p = 0\nhp : 0 < ENNReal.toReal p\nthis : Tendsto (fun n => ∫⁻ (x : β), ↑‖↑(approxOn f hf s y₀ h₀ n) x - f x‖₊ ^ ENNReal.toReal p ∂μ) atTop (𝓝 0)\n⊢ Tendsto (fun n => (∫⁻ (x : β), ↑‖(↑(approxOn f hf s y₀ h₀ n) - f) x‖₊ ^ ENNReal.toReal p ∂μ) ^ (1 / ENNReal.toReal p))\n    atTop (𝓝 0)\n[PROOFSTEP]\nconvert continuous_rpow_const.continuousAt.tendsto.comp this\n[GOAL]\ncase h.e'_5.h.e'_3\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁵ : MeasurableSpace β\ninst✝⁴ : MeasurableSpace E\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\nq : ℝ\np : ℝ≥0∞\ninst✝¹ : OpensMeasurableSpace E\nf : β → E\nhf : Measurable f\ns : Set E\ny₀ : E\nh₀ : y₀ ∈ s\ninst✝ : SeparableSpace ↑s\nhp_ne_top : p ≠ ⊤\nμ : Measure β\nhμ : ∀ᵐ (x : β) ∂μ, f x ∈ closure s\nhi : snorm (fun x => f x - y₀) p μ < ⊤\nhp_zero : ¬p = 0\nhp : 0 < ENNReal.toReal p\nthis : Tendsto (fun n => ∫⁻ (x : β), ↑‖↑(approxOn f hf s y₀ h₀ n) x - f x‖₊ ^ ENNReal.toReal p ∂μ) atTop (𝓝 0)\n⊢ 0 = 0 ^ (1 / ENNReal.toReal p)\n[PROOFSTEP]\nsimp [zero_rpow_of_pos (_root_.inv_pos.mpr hp)]\n  -- We simply check the conditions of the Dominated Convergence Theorem:\n    -- (1) The function \"`p`-th power of distance between `f` and the approximation\" is measurable\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁵ : MeasurableSpace β\ninst✝⁴ : MeasurableSpace E\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\nq : ℝ\np : ℝ≥0∞\ninst✝¹ : OpensMeasurableSpace E\nf : β → E\nhf : Measurable f\ns : Set E\ny₀ : E\nh₀ : y₀ ∈ s\ninst✝ : SeparableSpace ↑s\nhp_ne_top : p ≠ ⊤\nμ : Measure β\nhμ : ∀ᵐ (x : β) ∂μ, f x ∈ closure s\nhi : snorm (fun x => f x - y₀) p μ < ⊤\nhp_zero : ¬p = 0\nhp : 0 < ENNReal.toReal p\n⊢ Tendsto (fun n => ∫⁻ (x : β), ↑‖↑(approxOn f hf s y₀ h₀ n) x - f x‖₊ ^ ENNReal.toReal p ∂μ) atTop (𝓝 0)\n[PROOFSTEP]\nhave hF_meas : ∀ n, Measurable fun x => (‖approxOn f hf s y₀ h₀ n x - f x‖₊ : ℝ≥0∞) ^ p.toReal := by\n  simpa only [← edist_eq_coe_nnnorm_sub] using fun n =>\n    (approxOn f hf s y₀ h₀ n).measurable_bind (fun y x => edist y (f x) ^ p.toReal) fun y =>\n      (measurable_edist_right.comp hf).pow_const p.toReal\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁵ : MeasurableSpace β\ninst✝⁴ : MeasurableSpace E\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\nq : ℝ\np : ℝ≥0∞\ninst✝¹ : OpensMeasurableSpace E\nf : β → E\nhf : Measurable f\ns : Set E\ny₀ : E\nh₀ : y₀ ∈ s\ninst✝ : SeparableSpace ↑s\nhp_ne_top : p ≠ ⊤\nμ : Measure β\nhμ : ∀ᵐ (x : β) ∂μ, f x ∈ closure s\nhi : snorm (fun x => f x - y₀) p μ < ⊤\nhp_zero : ¬p = 0\nhp : 0 < ENNReal.toReal p\n⊢ ∀ (n : ℕ), Measurable fun x => ↑‖↑(approxOn f hf s y₀ h₀ n) x - f x‖₊ ^ ENNReal.toReal p\n[PROOFSTEP]\nsimpa only [← edist_eq_coe_nnnorm_sub] using fun n =>\n  (approxOn f hf s y₀ h₀ n).measurable_bind (fun y x => edist y (f x) ^ p.toReal) fun y =>\n    (measurable_edist_right.comp hf).pow_const p.toReal\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁵ : MeasurableSpace β\ninst✝⁴ : MeasurableSpace E\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\nq : ℝ\np : ℝ≥0∞\ninst✝¹ : OpensMeasurableSpace E\nf : β → E\nhf : Measurable f\ns : Set E\ny₀ : E\nh₀ : y₀ ∈ s\ninst✝ : SeparableSpace ↑s\nhp_ne_top : p ≠ ⊤\nμ : Measure β\nhμ : ∀ᵐ (x : β) ∂μ, f x ∈ closure s\nhi : snorm (fun x => f x - y₀) p μ < ⊤\nhp_zero : ¬p = 0\nhp : 0 < ENNReal.toReal p\nhF_meas : ∀ (n : ℕ), Measurable fun x => ↑‖↑(approxOn f hf s y₀ h₀ n) x - f x‖₊ ^ ENNReal.toReal p\n⊢ Tendsto (fun n => ∫⁻ (x : β), ↑‖↑(approxOn f hf s y₀ h₀ n) x - f x‖₊ ^ ENNReal.toReal p ∂μ) atTop (𝓝 0)\n[PROOFSTEP]\nhave h_bound :\n  ∀ n,\n    (fun x => (‖approxOn f hf s y₀ h₀ n x - f x‖₊ : ℝ≥0∞) ^ p.toReal) ≤ᵐ[μ] fun x => (‖f x - y₀‖₊ : ℝ≥0∞) ^ p.toReal :=\n  fun n => eventually_of_forall fun x => rpow_le_rpow (coe_mono (nnnorm_approxOn_le hf h₀ x n)) toReal_nonneg\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁵ : MeasurableSpace β\ninst✝⁴ : MeasurableSpace E\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\nq : ℝ\np : ℝ≥0∞\ninst✝¹ : OpensMeasurableSpace E\nf : β → E\nhf : Measurable f\ns : Set E\ny₀ : E\nh₀ : y₀ ∈ s\ninst✝ : SeparableSpace ↑s\nhp_ne_top : p ≠ ⊤\nμ : Measure β\nhμ : ∀ᵐ (x : β) ∂μ, f x ∈ closure s\nhi : snorm (fun x => f x - y₀) p μ < ⊤\nhp_zero : ¬p = 0\nhp : 0 < ENNReal.toReal p\nhF_meas : ∀ (n : ℕ), Measurable fun x => ↑‖↑(approxOn f hf s y₀ h₀ n) x - f x‖₊ ^ ENNReal.toReal p\nh_bound :\n  ∀ (n : ℕ),\n    (fun x => ↑‖↑(approxOn f hf s y₀ h₀ n) x - f x‖₊ ^ ENNReal.toReal p) ≤ᵐ[μ] fun x => ↑‖f x - y₀‖₊ ^ ENNReal.toReal p\n⊢ Tendsto (fun n => ∫⁻ (x : β), ↑‖↑(approxOn f hf s y₀ h₀ n) x - f x‖₊ ^ ENNReal.toReal p ∂μ) atTop (𝓝 0)\n[PROOFSTEP]\nhave h_fin : (∫⁻ a : β, (‖f a - y₀‖₊ : ℝ≥0∞) ^ p.toReal ∂μ) ≠ ⊤ :=\n  (lintegral_rpow_nnnorm_lt_top_of_snorm_lt_top hp_zero hp_ne_top hi).ne\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁵ : MeasurableSpace β\ninst✝⁴ : MeasurableSpace E\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\nq : ℝ\np : ℝ≥0∞\ninst✝¹ : OpensMeasurableSpace E\nf : β → E\nhf : Measurable f\ns : Set E\ny₀ : E\nh₀ : y₀ ∈ s\ninst✝ : SeparableSpace ↑s\nhp_ne_top : p ≠ ⊤\nμ : Measure β\nhμ : ∀ᵐ (x : β) ∂μ, f x ∈ closure s\nhi : snorm (fun x => f x - y₀) p μ < ⊤\nhp_zero : ¬p = 0\nhp : 0 < ENNReal.toReal p\nhF_meas : ∀ (n : ℕ), Measurable fun x => ↑‖↑(approxOn f hf s y₀ h₀ n) x - f x‖₊ ^ ENNReal.toReal p\nh_bound :\n  ∀ (n : ℕ),\n    (fun x => ↑‖↑(approxOn f hf s y₀ h₀ n) x - f x‖₊ ^ ENNReal.toReal p) ≤ᵐ[μ] fun x => ↑‖f x - y₀‖₊ ^ ENNReal.toReal p\nh_fin : ∫⁻ (a : β), ↑‖f a - y₀‖₊ ^ ENNReal.toReal p ∂μ ≠ ⊤\n⊢ Tendsto (fun n => ∫⁻ (x : β), ↑‖↑(approxOn f hf s y₀ h₀ n) x - f x‖₊ ^ ENNReal.toReal p ∂μ) atTop (𝓝 0)\n[PROOFSTEP]\nhave h_lim : ∀ᵐ a : β ∂μ, Tendsto (fun n => (‖approxOn f hf s y₀ h₀ n a - f a‖₊ : ℝ≥0∞) ^ p.toReal) atTop (𝓝 0) :=\n  by\n  filter_upwards [hμ] with a ha\n  have : Tendsto (fun n => (approxOn f hf s y₀ h₀ n) a - f a) atTop (𝓝 (f a - f a)) :=\n    (tendsto_approxOn hf h₀ ha).sub tendsto_const_nhds\n  convert continuous_rpow_const.continuousAt.tendsto.comp (tendsto_coe.mpr this.nnnorm)\n  simp [zero_rpow_of_pos hp]\n    -- Then we apply the Dominated Convergence Theorem\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁵ : MeasurableSpace β\ninst✝⁴ : MeasurableSpace E\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\nq : ℝ\np : ℝ≥0∞\ninst✝¹ : OpensMeasurableSpace E\nf : β → E\nhf : Measurable f\ns : Set E\ny₀ : E\nh₀ : y₀ ∈ s\ninst✝ : SeparableSpace ↑s\nhp_ne_top : p ≠ ⊤\nμ : Measure β\nhμ : ∀ᵐ (x : β) ∂μ, f x ∈ closure s\nhi : snorm (fun x => f x - y₀) p μ < ⊤\nhp_zero : ¬p = 0\nhp : 0 < ENNReal.toReal p\nhF_meas : ∀ (n : ℕ), Measurable fun x => ↑‖↑(approxOn f hf s y₀ h₀ n) x - f x‖₊ ^ ENNReal.toReal p\nh_bound :\n  ∀ (n : ℕ),\n    (fun x => ↑‖↑(approxOn f hf s y₀ h₀ n) x - f x‖₊ ^ ENNReal.toReal p) ≤ᵐ[μ] fun x => ↑‖f x - y₀‖₊ ^ ENNReal.toReal p\nh_fin : ∫⁻ (a : β), ↑‖f a - y₀‖₊ ^ ENNReal.toReal p ∂μ ≠ ⊤\n⊢ ∀ᵐ (a : β) ∂μ, Tendsto (fun n => ↑‖↑(approxOn f hf s y₀ h₀ n) a - f a‖₊ ^ ENNReal.toReal p) atTop (𝓝 0)\n[PROOFSTEP]\nfilter_upwards [hμ] with a ha\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁵ : MeasurableSpace β\ninst✝⁴ : MeasurableSpace E\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\nq : ℝ\np : ℝ≥0∞\ninst✝¹ : OpensMeasurableSpace E\nf : β → E\nhf : Measurable f\ns : Set E\ny₀ : E\nh₀ : y₀ ∈ s\ninst✝ : SeparableSpace ↑s\nhp_ne_top : p ≠ ⊤\nμ : Measure β\nhμ : ∀ᵐ (x : β) ∂μ, f x ∈ closure s\nhi : snorm (fun x => f x - y₀) p μ < ⊤\nhp_zero : ¬p = 0\nhp : 0 < ENNReal.toReal p\nhF_meas : ∀ (n : ℕ), Measurable fun x => ↑‖↑(approxOn f hf s y₀ h₀ n) x - f x‖₊ ^ ENNReal.toReal p\nh_bound :\n  ∀ (n : ℕ),\n    (fun x => ↑‖↑(approxOn f hf s y₀ h₀ n) x - f x‖₊ ^ ENNReal.toReal p) ≤ᵐ[μ] fun x => ↑‖f x - y₀‖₊ ^ ENNReal.toReal p\nh_fin : ∫⁻ (a : β), ↑‖f a - y₀‖₊ ^ ENNReal.toReal p ∂μ ≠ ⊤\na : β\nha : f a ∈ closure s\n⊢ Tendsto (fun n => ↑‖↑(approxOn f hf s y₀ h₀ n) a - f a‖₊ ^ ENNReal.toReal p) atTop (𝓝 0)\n[PROOFSTEP]\nhave : Tendsto (fun n => (approxOn f hf s y₀ h₀ n) a - f a) atTop (𝓝 (f a - f a)) :=\n  (tendsto_approxOn hf h₀ ha).sub tendsto_const_nhds\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁵ : MeasurableSpace β\ninst✝⁴ : MeasurableSpace E\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\nq : ℝ\np : ℝ≥0∞\ninst✝¹ : OpensMeasurableSpace E\nf : β → E\nhf : Measurable f\ns : Set E\ny₀ : E\nh₀ : y₀ ∈ s\ninst✝ : SeparableSpace ↑s\nhp_ne_top : p ≠ ⊤\nμ : Measure β\nhμ : ∀ᵐ (x : β) ∂μ, f x ∈ closure s\nhi : snorm (fun x => f x - y₀) p μ < ⊤\nhp_zero : ¬p = 0\nhp : 0 < ENNReal.toReal p\nhF_meas : ∀ (n : ℕ), Measurable fun x => ↑‖↑(approxOn f hf s y₀ h₀ n) x - f x‖₊ ^ ENNReal.toReal p\nh_bound :\n  ∀ (n : ℕ),\n    (fun x => ↑‖↑(approxOn f hf s y₀ h₀ n) x - f x‖₊ ^ ENNReal.toReal p) ≤ᵐ[μ] fun x => ↑‖f x - y₀‖₊ ^ ENNReal.toReal p\nh_fin : ∫⁻ (a : β), ↑‖f a - y₀‖₊ ^ ENNReal.toReal p ∂μ ≠ ⊤\na : β\nha : f a ∈ closure s\nthis : Tendsto (fun n => ↑(approxOn f hf s y₀ h₀ n) a - f a) atTop (𝓝 (f a - f a))\n⊢ Tendsto (fun n => ↑‖↑(approxOn f hf s y₀ h₀ n) a - f a‖₊ ^ ENNReal.toReal p) atTop (𝓝 0)\n[PROOFSTEP]\nconvert continuous_rpow_const.continuousAt.tendsto.comp (tendsto_coe.mpr this.nnnorm)\n[GOAL]\ncase h.e'_5.h.e'_3\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁵ : MeasurableSpace β\ninst✝⁴ : MeasurableSpace E\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\nq : ℝ\np : ℝ≥0∞\ninst✝¹ : OpensMeasurableSpace E\nf : β → E\nhf : Measurable f\ns : Set E\ny₀ : E\nh₀ : y₀ ∈ s\ninst✝ : SeparableSpace ↑s\nhp_ne_top : p ≠ ⊤\nμ : Measure β\nhμ : ∀ᵐ (x : β) ∂μ, f x ∈ closure s\nhi : snorm (fun x => f x - y₀) p μ < ⊤\nhp_zero : ¬p = 0\nhp : 0 < ENNReal.toReal p\nhF_meas : ∀ (n : ℕ), Measurable fun x => ↑‖↑(approxOn f hf s y₀ h₀ n) x - f x‖₊ ^ ENNReal.toReal p\nh_bound :\n  ∀ (n : ℕ),\n    (fun x => ↑‖↑(approxOn f hf s y₀ h₀ n) x - f x‖₊ ^ ENNReal.toReal p) ≤ᵐ[μ] fun x => ↑‖f x - y₀‖₊ ^ ENNReal.toReal p\nh_fin : ∫⁻ (a : β), ↑‖f a - y₀‖₊ ^ ENNReal.toReal p ∂μ ≠ ⊤\na : β\nha : f a ∈ closure s\nthis : Tendsto (fun n => ↑(approxOn f hf s y₀ h₀ n) a - f a) atTop (𝓝 (f a - f a))\n⊢ 0 = ↑‖f a - f a‖₊ ^ ENNReal.toReal p\n[PROOFSTEP]\nsimp [zero_rpow_of_pos hp]\n  -- Then we apply the Dominated Convergence Theorem\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁵ : MeasurableSpace β\ninst✝⁴ : MeasurableSpace E\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\nq : ℝ\np : ℝ≥0∞\ninst✝¹ : OpensMeasurableSpace E\nf : β → E\nhf : Measurable f\ns : Set E\ny₀ : E\nh₀ : y₀ ∈ s\ninst✝ : SeparableSpace ↑s\nhp_ne_top : p ≠ ⊤\nμ : Measure β\nhμ : ∀ᵐ (x : β) ∂μ, f x ∈ closure s\nhi : snorm (fun x => f x - y₀) p μ < ⊤\nhp_zero : ¬p = 0\nhp : 0 < ENNReal.toReal p\nhF_meas : ∀ (n : ℕ), Measurable fun x => ↑‖↑(approxOn f hf s y₀ h₀ n) x - f x‖₊ ^ ENNReal.toReal p\nh_bound :\n  ∀ (n : ℕ),\n    (fun x => ↑‖↑(approxOn f hf s y₀ h₀ n) x - f x‖₊ ^ ENNReal.toReal p) ≤ᵐ[μ] fun x => ↑‖f x - y₀‖₊ ^ ENNReal.toReal p\nh_fin : ∫⁻ (a : β), ↑‖f a - y₀‖₊ ^ ENNReal.toReal p ∂μ ≠ ⊤\nh_lim : ∀ᵐ (a : β) ∂μ, Tendsto (fun n => ↑‖↑(approxOn f hf s y₀ h₀ n) a - f a‖₊ ^ ENNReal.toReal p) atTop (𝓝 0)\n⊢ Tendsto (fun n => ∫⁻ (x : β), ↑‖↑(approxOn f hf s y₀ h₀ n) x - f x‖₊ ^ ENNReal.toReal p ∂μ) atTop (𝓝 0)\n[PROOFSTEP]\nsimpa using tendsto_lintegral_of_dominated_convergence _ hF_meas h_bound h_fin h_lim\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁵ : MeasurableSpace β\ninst✝⁴ : MeasurableSpace E\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\nq : ℝ\np : ℝ≥0∞\ninst✝¹ : BorelSpace E\nf : β → E\nμ : Measure β\nfmeas : Measurable f\nhf : Memℒp f p\ns : Set E\ny₀ : E\nh₀ : y₀ ∈ s\ninst✝ : SeparableSpace ↑s\nhi₀ : Memℒp (fun x => y₀) p\nn : ℕ\n⊢ Memℒp (↑(approxOn f fmeas s y₀ h₀ n)) p\n[PROOFSTEP]\nrefine' ⟨(approxOn f fmeas s y₀ h₀ n).aestronglyMeasurable, _⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁵ : MeasurableSpace β\ninst✝⁴ : MeasurableSpace E\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\nq : ℝ\np : ℝ≥0∞\ninst✝¹ : BorelSpace E\nf : β → E\nμ : Measure β\nfmeas : Measurable f\nhf : Memℒp f p\ns : Set E\ny₀ : E\nh₀ : y₀ ∈ s\ninst✝ : SeparableSpace ↑s\nhi₀ : Memℒp (fun x => y₀) p\nn : ℕ\n⊢ snorm (↑(approxOn f fmeas s y₀ h₀ n)) p μ < ⊤\n[PROOFSTEP]\nsuffices snorm (fun x => approxOn f fmeas s y₀ h₀ n x - y₀) p μ < ⊤\n  by\n  have : Memℒp (fun x => approxOn f fmeas s y₀ h₀ n x - y₀) p μ :=\n    ⟨(approxOn f fmeas s y₀ h₀ n - const β y₀).aestronglyMeasurable, this⟩\n  convert snorm_add_lt_top this hi₀\n  ext x\n  simp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁵ : MeasurableSpace β\ninst✝⁴ : MeasurableSpace E\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\nq : ℝ\np : ℝ≥0∞\ninst✝¹ : BorelSpace E\nf : β → E\nμ : Measure β\nfmeas : Measurable f\nhf : Memℒp f p\ns : Set E\ny₀ : E\nh₀ : y₀ ∈ s\ninst✝ : SeparableSpace ↑s\nhi₀ : Memℒp (fun x => y₀) p\nn : ℕ\nthis : snorm (fun x => ↑(approxOn f fmeas s y₀ h₀ n) x - y₀) p μ < ⊤\n⊢ snorm (↑(approxOn f fmeas s y₀ h₀ n)) p μ < ⊤\n[PROOFSTEP]\nhave : Memℒp (fun x => approxOn f fmeas s y₀ h₀ n x - y₀) p μ :=\n  ⟨(approxOn f fmeas s y₀ h₀ n - const β y₀).aestronglyMeasurable, this⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁵ : MeasurableSpace β\ninst✝⁴ : MeasurableSpace E\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\nq : ℝ\np : ℝ≥0∞\ninst✝¹ : BorelSpace E\nf : β → E\nμ : Measure β\nfmeas : Measurable f\nhf : Memℒp f p\ns : Set E\ny₀ : E\nh₀ : y₀ ∈ s\ninst✝ : SeparableSpace ↑s\nhi₀ : Memℒp (fun x => y₀) p\nn : ℕ\nthis✝ : snorm (fun x => ↑(approxOn f fmeas s y₀ h₀ n) x - y₀) p μ < ⊤\nthis : Memℒp (fun x => ↑(approxOn f fmeas s y₀ h₀ n) x - y₀) p\n⊢ snorm (↑(approxOn f fmeas s y₀ h₀ n)) p μ < ⊤\n[PROOFSTEP]\nconvert snorm_add_lt_top this hi₀\n[GOAL]\ncase h.e'_3.h.e'_5\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁵ : MeasurableSpace β\ninst✝⁴ : MeasurableSpace E\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\nq : ℝ\np : ℝ≥0∞\ninst✝¹ : BorelSpace E\nf : β → E\nμ : Measure β\nfmeas : Measurable f\nhf : Memℒp f p\ns : Set E\ny₀ : E\nh₀ : y₀ ∈ s\ninst✝ : SeparableSpace ↑s\nhi₀ : Memℒp (fun x => y₀) p\nn : ℕ\nthis✝ : snorm (fun x => ↑(approxOn f fmeas s y₀ h₀ n) x - y₀) p μ < ⊤\nthis : Memℒp (fun x => ↑(approxOn f fmeas s y₀ h₀ n) x - y₀) p\n⊢ ↑(approxOn f fmeas s y₀ h₀ n) = (fun x => ↑(approxOn f fmeas s y₀ h₀ n) x - y₀) + fun x => y₀\n[PROOFSTEP]\next x\n[GOAL]\ncase h.e'_3.h.e'_5.h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁵ : MeasurableSpace β\ninst✝⁴ : MeasurableSpace E\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\nq : ℝ\np : ℝ≥0∞\ninst✝¹ : BorelSpace E\nf : β → E\nμ : Measure β\nfmeas : Measurable f\nhf : Memℒp f p\ns : Set E\ny₀ : E\nh₀ : y₀ ∈ s\ninst✝ : SeparableSpace ↑s\nhi₀ : Memℒp (fun x => y₀) p\nn : ℕ\nthis✝ : snorm (fun x => ↑(approxOn f fmeas s y₀ h₀ n) x - y₀) p μ < ⊤\nthis : Memℒp (fun x => ↑(approxOn f fmeas s y₀ h₀ n) x - y₀) p\nx : β\n⊢ ↑(approxOn f fmeas s y₀ h₀ n) x = ((fun x => ↑(approxOn f fmeas s y₀ h₀ n) x - y₀) + fun x => y₀) x\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁵ : MeasurableSpace β\ninst✝⁴ : MeasurableSpace E\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\nq : ℝ\np : ℝ≥0∞\ninst✝¹ : BorelSpace E\nf : β → E\nμ : Measure β\nfmeas : Measurable f\nhf : Memℒp f p\ns : Set E\ny₀ : E\nh₀ : y₀ ∈ s\ninst✝ : SeparableSpace ↑s\nhi₀ : Memℒp (fun x => y₀) p\nn : ℕ\n⊢ snorm (fun x => ↑(approxOn f fmeas s y₀ h₀ n) x - y₀) p μ < ⊤\n[PROOFSTEP]\nhave hf' : Memℒp (fun x => ‖f x - y₀‖) p μ :=\n  by\n  have h_meas : Measurable fun x => ‖f x - y₀‖ :=\n    by\n    simp only [← dist_eq_norm]\n    exact (continuous_id.dist continuous_const).measurable.comp fmeas\n  refine' ⟨h_meas.aemeasurable.aestronglyMeasurable, _⟩\n  rw [snorm_norm]\n  convert snorm_add_lt_top hf hi₀.neg with x\n  simp [sub_eq_add_neg]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁵ : MeasurableSpace β\ninst✝⁴ : MeasurableSpace E\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\nq : ℝ\np : ℝ≥0∞\ninst✝¹ : BorelSpace E\nf : β → E\nμ : Measure β\nfmeas : Measurable f\nhf : Memℒp f p\ns : Set E\ny₀ : E\nh₀ : y₀ ∈ s\ninst✝ : SeparableSpace ↑s\nhi₀ : Memℒp (fun x => y₀) p\nn : ℕ\n⊢ Memℒp (fun x => ‖f x - y₀‖) p\n[PROOFSTEP]\nhave h_meas : Measurable fun x => ‖f x - y₀‖ :=\n  by\n  simp only [← dist_eq_norm]\n  exact (continuous_id.dist continuous_const).measurable.comp fmeas\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁵ : MeasurableSpace β\ninst✝⁴ : MeasurableSpace E\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\nq : ℝ\np : ℝ≥0∞\ninst✝¹ : BorelSpace E\nf : β → E\nμ : Measure β\nfmeas : Measurable f\nhf : Memℒp f p\ns : Set E\ny₀ : E\nh₀ : y₀ ∈ s\ninst✝ : SeparableSpace ↑s\nhi₀ : Memℒp (fun x => y₀) p\nn : ℕ\n⊢ Measurable fun x => ‖f x - y₀‖\n[PROOFSTEP]\nsimp only [← dist_eq_norm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁵ : MeasurableSpace β\ninst✝⁴ : MeasurableSpace E\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\nq : ℝ\np : ℝ≥0∞\ninst✝¹ : BorelSpace E\nf : β → E\nμ : Measure β\nfmeas : Measurable f\nhf : Memℒp f p\ns : Set E\ny₀ : E\nh₀ : y₀ ∈ s\ninst✝ : SeparableSpace ↑s\nhi₀ : Memℒp (fun x => y₀) p\nn : ℕ\n⊢ Measurable fun x => dist (f x) y₀\n[PROOFSTEP]\nexact (continuous_id.dist continuous_const).measurable.comp fmeas\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁵ : MeasurableSpace β\ninst✝⁴ : MeasurableSpace E\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\nq : ℝ\np : ℝ≥0∞\ninst✝¹ : BorelSpace E\nf : β → E\nμ : Measure β\nfmeas : Measurable f\nhf : Memℒp f p\ns : Set E\ny₀ : E\nh₀ : y₀ ∈ s\ninst✝ : SeparableSpace ↑s\nhi₀ : Memℒp (fun x => y₀) p\nn : ℕ\nh_meas : Measurable fun x => ‖f x - y₀‖\n⊢ Memℒp (fun x => ‖f x - y₀‖) p\n[PROOFSTEP]\nrefine' ⟨h_meas.aemeasurable.aestronglyMeasurable, _⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁵ : MeasurableSpace β\ninst✝⁴ : MeasurableSpace E\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\nq : ℝ\np : ℝ≥0∞\ninst✝¹ : BorelSpace E\nf : β → E\nμ : Measure β\nfmeas : Measurable f\nhf : Memℒp f p\ns : Set E\ny₀ : E\nh₀ : y₀ ∈ s\ninst✝ : SeparableSpace ↑s\nhi₀ : Memℒp (fun x => y₀) p\nn : ℕ\nh_meas : Measurable fun x => ‖f x - y₀‖\n⊢ snorm (fun x => ‖f x - y₀‖) p μ < ⊤\n[PROOFSTEP]\nrw [snorm_norm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁵ : MeasurableSpace β\ninst✝⁴ : MeasurableSpace E\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\nq : ℝ\np : ℝ≥0∞\ninst✝¹ : BorelSpace E\nf : β → E\nμ : Measure β\nfmeas : Measurable f\nhf : Memℒp f p\ns : Set E\ny₀ : E\nh₀ : y₀ ∈ s\ninst✝ : SeparableSpace ↑s\nhi₀ : Memℒp (fun x => y₀) p\nn : ℕ\nh_meas : Measurable fun x => ‖f x - y₀‖\n⊢ snorm (fun x => f x - y₀) p μ < ⊤\n[PROOFSTEP]\nconvert snorm_add_lt_top hf hi₀.neg with x\n[GOAL]\ncase h.e'_3.h.e'_5.h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁵ : MeasurableSpace β\ninst✝⁴ : MeasurableSpace E\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\nq : ℝ\np : ℝ≥0∞\ninst✝¹ : BorelSpace E\nf : β → E\nμ : Measure β\nfmeas : Measurable f\nhf : Memℒp f p\ns : Set E\ny₀ : E\nh₀ : y₀ ∈ s\ninst✝ : SeparableSpace ↑s\nhi₀ : Memℒp (fun x => y₀) p\nn : ℕ\nh_meas : Measurable fun x => ‖f x - y₀‖\nx : β\n⊢ f x - y₀ = (f + -fun x => y₀) x\n[PROOFSTEP]\nsimp [sub_eq_add_neg]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁵ : MeasurableSpace β\ninst✝⁴ : MeasurableSpace E\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\nq : ℝ\np : ℝ≥0∞\ninst✝¹ : BorelSpace E\nf : β → E\nμ : Measure β\nfmeas : Measurable f\nhf : Memℒp f p\ns : Set E\ny₀ : E\nh₀ : y₀ ∈ s\ninst✝ : SeparableSpace ↑s\nhi₀ : Memℒp (fun x => y₀) p\nn : ℕ\nhf' : Memℒp (fun x => ‖f x - y₀‖) p\n⊢ snorm (fun x => ↑(approxOn f fmeas s y₀ h₀ n) x - y₀) p μ < ⊤\n[PROOFSTEP]\nhave : ∀ᵐ x ∂μ, ‖approxOn f fmeas s y₀ h₀ n x - y₀‖ ≤ ‖‖f x - y₀‖ + ‖f x - y₀‖‖ :=\n  by\n  refine' eventually_of_forall _\n  intro x\n  convert norm_approxOn_y₀_le fmeas h₀ x n using 1\n  rw [Real.norm_eq_abs, abs_of_nonneg]\n  exact add_nonneg (norm_nonneg _) (norm_nonneg _)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁵ : MeasurableSpace β\ninst✝⁴ : MeasurableSpace E\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\nq : ℝ\np : ℝ≥0∞\ninst✝¹ : BorelSpace E\nf : β → E\nμ : Measure β\nfmeas : Measurable f\nhf : Memℒp f p\ns : Set E\ny₀ : E\nh₀ : y₀ ∈ s\ninst✝ : SeparableSpace ↑s\nhi₀ : Memℒp (fun x => y₀) p\nn : ℕ\nhf' : Memℒp (fun x => ‖f x - y₀‖) p\n⊢ ∀ᵐ (x : β) ∂μ, ‖↑(approxOn f fmeas s y₀ h₀ n) x - y₀‖ ≤ ‖‖f x - y₀‖ + ‖f x - y₀‖‖\n[PROOFSTEP]\nrefine' eventually_of_forall _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁵ : MeasurableSpace β\ninst✝⁴ : MeasurableSpace E\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\nq : ℝ\np : ℝ≥0∞\ninst✝¹ : BorelSpace E\nf : β → E\nμ : Measure β\nfmeas : Measurable f\nhf : Memℒp f p\ns : Set E\ny₀ : E\nh₀ : y₀ ∈ s\ninst✝ : SeparableSpace ↑s\nhi₀ : Memℒp (fun x => y₀) p\nn : ℕ\nhf' : Memℒp (fun x => ‖f x - y₀‖) p\n⊢ ∀ (x : β), ‖↑(approxOn f fmeas s y₀ h₀ n) x - y₀‖ ≤ ‖‖f x - y₀‖ + ‖f x - y₀‖‖\n[PROOFSTEP]\nintro x\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁵ : MeasurableSpace β\ninst✝⁴ : MeasurableSpace E\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\nq : ℝ\np : ℝ≥0∞\ninst✝¹ : BorelSpace E\nf : β → E\nμ : Measure β\nfmeas : Measurable f\nhf : Memℒp f p\ns : Set E\ny₀ : E\nh₀ : y₀ ∈ s\ninst✝ : SeparableSpace ↑s\nhi₀ : Memℒp (fun x => y₀) p\nn : ℕ\nhf' : Memℒp (fun x => ‖f x - y₀‖) p\nx : β\n⊢ ‖↑(approxOn f fmeas s y₀ h₀ n) x - y₀‖ ≤ ‖‖f x - y₀‖ + ‖f x - y₀‖‖\n[PROOFSTEP]\nconvert norm_approxOn_y₀_le fmeas h₀ x n using 1\n[GOAL]\ncase h.e'_4\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁵ : MeasurableSpace β\ninst✝⁴ : MeasurableSpace E\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\nq : ℝ\np : ℝ≥0∞\ninst✝¹ : BorelSpace E\nf : β → E\nμ : Measure β\nfmeas : Measurable f\nhf : Memℒp f p\ns : Set E\ny₀ : E\nh₀ : y₀ ∈ s\ninst✝ : SeparableSpace ↑s\nhi₀ : Memℒp (fun x => y₀) p\nn : ℕ\nhf' : Memℒp (fun x => ‖f x - y₀‖) p\nx : β\n⊢ ‖‖f x - y₀‖ + ‖f x - y₀‖‖ = ‖f x - y₀‖ + ‖f x - y₀‖\n[PROOFSTEP]\nrw [Real.norm_eq_abs, abs_of_nonneg]\n[GOAL]\ncase h.e'_4\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁵ : MeasurableSpace β\ninst✝⁴ : MeasurableSpace E\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\nq : ℝ\np : ℝ≥0∞\ninst✝¹ : BorelSpace E\nf : β → E\nμ : Measure β\nfmeas : Measurable f\nhf : Memℒp f p\ns : Set E\ny₀ : E\nh₀ : y₀ ∈ s\ninst✝ : SeparableSpace ↑s\nhi₀ : Memℒp (fun x => y₀) p\nn : ℕ\nhf' : Memℒp (fun x => ‖f x - y₀‖) p\nx : β\n⊢ 0 ≤ ‖f x - y₀‖ + ‖f x - y₀‖\n[PROOFSTEP]\nexact add_nonneg (norm_nonneg _) (norm_nonneg _)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁵ : MeasurableSpace β\ninst✝⁴ : MeasurableSpace E\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\nq : ℝ\np : ℝ≥0∞\ninst✝¹ : BorelSpace E\nf : β → E\nμ : Measure β\nfmeas : Measurable f\nhf : Memℒp f p\ns : Set E\ny₀ : E\nh₀ : y₀ ∈ s\ninst✝ : SeparableSpace ↑s\nhi₀ : Memℒp (fun x => y₀) p\nn : ℕ\nhf' : Memℒp (fun x => ‖f x - y₀‖) p\nthis : ∀ᵐ (x : β) ∂μ, ‖↑(approxOn f fmeas s y₀ h₀ n) x - y₀‖ ≤ ‖‖f x - y₀‖ + ‖f x - y₀‖‖\n⊢ snorm (fun x => ↑(approxOn f fmeas s y₀ h₀ n) x - y₀) p μ < ⊤\n[PROOFSTEP]\ncalc\n  snorm (fun x => approxOn f fmeas s y₀ h₀ n x - y₀) p μ ≤ snorm (fun x => ‖f x - y₀‖ + ‖f x - y₀‖) p μ :=\n    snorm_mono_ae this\n  _ < ⊤ := snorm_add_lt_top hf' hf'\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁵ : MeasurableSpace β\ninst✝⁴ : MeasurableSpace E\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\nq : ℝ\np : ℝ≥0∞\ninst✝¹ : BorelSpace E\nf : β → E\nhp_ne_top : p ≠ ⊤\nμ : Measure β\nfmeas : Measurable f\ninst✝ : SeparableSpace ↑(Set.range f ∪ {0})\nhf : snorm f p μ < ⊤\nn : ℕ\n⊢ 0 ∈ Set.range f ∪ {0}\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁵ : MeasurableSpace β\ninst✝⁴ : MeasurableSpace E\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\nq : ℝ\np : ℝ≥0∞\ninst✝¹ : BorelSpace E\nf : β → E\nhp_ne_top : p ≠ ⊤\nμ : Measure β\nfmeas : Measurable f\ninst✝ : SeparableSpace ↑(Set.range f ∪ {0})\nhf : snorm f p μ < ⊤\n⊢ Tendsto (fun n => snorm (↑(approxOn f fmeas (Set.range f ∪ {0}) 0 (_ : 0 ∈ Set.range f ∪ {0}) n) - f) p μ) atTop (𝓝 0)\n[PROOFSTEP]\nrefine' tendsto_approxOn_Lp_snorm fmeas _ hp_ne_top _ _\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁵ : MeasurableSpace β\ninst✝⁴ : MeasurableSpace E\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\nq : ℝ\np : ℝ≥0∞\ninst✝¹ : BorelSpace E\nf : β → E\nhp_ne_top : p ≠ ⊤\nμ : Measure β\nfmeas : Measurable f\ninst✝ : SeparableSpace ↑(Set.range f ∪ {0})\nhf : snorm f p μ < ⊤\n⊢ ∀ᵐ (x : β) ∂μ, f x ∈ closure (Set.range f ∪ {0})\n[PROOFSTEP]\napply eventually_of_forall\n[GOAL]\ncase refine'_1.hp\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁵ : MeasurableSpace β\ninst✝⁴ : MeasurableSpace E\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\nq : ℝ\np : ℝ≥0∞\ninst✝¹ : BorelSpace E\nf : β → E\nhp_ne_top : p ≠ ⊤\nμ : Measure β\nfmeas : Measurable f\ninst✝ : SeparableSpace ↑(Set.range f ∪ {0})\nhf : snorm f p μ < ⊤\n⊢ ∀ (x : β), f x ∈ closure (Set.range f ∪ {0})\n[PROOFSTEP]\nintro x\n[GOAL]\ncase refine'_1.hp\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁵ : MeasurableSpace β\ninst✝⁴ : MeasurableSpace E\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\nq : ℝ\np : ℝ≥0∞\ninst✝¹ : BorelSpace E\nf : β → E\nhp_ne_top : p ≠ ⊤\nμ : Measure β\nfmeas : Measurable f\ninst✝ : SeparableSpace ↑(Set.range f ∪ {0})\nhf : snorm f p μ < ⊤\nx : β\n⊢ f x ∈ closure (Set.range f ∪ {0})\n[PROOFSTEP]\napply subset_closure\n[GOAL]\ncase refine'_1.hp.a\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁵ : MeasurableSpace β\ninst✝⁴ : MeasurableSpace E\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\nq : ℝ\np : ℝ≥0∞\ninst✝¹ : BorelSpace E\nf : β → E\nhp_ne_top : p ≠ ⊤\nμ : Measure β\nfmeas : Measurable f\ninst✝ : SeparableSpace ↑(Set.range f ∪ {0})\nhf : snorm f p μ < ⊤\nx : β\n⊢ f x ∈ Set.range f ∪ {0}\n[PROOFSTEP]\nsimp\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁵ : MeasurableSpace β\ninst✝⁴ : MeasurableSpace E\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\nq : ℝ\np : ℝ≥0∞\ninst✝¹ : BorelSpace E\nf : β → E\nhp_ne_top : p ≠ ⊤\nμ : Measure β\nfmeas : Measurable f\ninst✝ : SeparableSpace ↑(Set.range f ∪ {0})\nhf : snorm f p μ < ⊤\n⊢ snorm (fun x => f x - 0) p μ < ⊤\n[PROOFSTEP]\nsimpa using hf\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁵ : MeasurableSpace β\ninst✝⁴ : MeasurableSpace E\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\nq : ℝ\np : ℝ≥0∞\ninst✝¹ : BorelSpace E\nf : β → E\nμ : Measure β\nfmeas : Measurable f\ninst✝ : SeparableSpace ↑(Set.range f ∪ {0})\nhf : Memℒp f p\nn : ℕ\n⊢ 0 ∈ Set.range f ∪ {0}\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁵ : MeasurableSpace β\ninst✝⁴ : MeasurableSpace E\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\nq : ℝ\np : ℝ≥0∞\ninst✝¹ : BorelSpace E\nf : β → E\nμ : Measure β\nfmeas : Measurable f\ninst✝ : SeparableSpace ↑(Set.range f ∪ {0})\nhf : Memℒp f p\nn : ℕ\n⊢ 0 ∈ Set.range f ∪ {0}\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁵ : MeasurableSpace β\ninst✝⁴ : MeasurableSpace E\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\nq : ℝ\np : ℝ≥0∞\ninst✝¹ : BorelSpace E\nf : β → E\nhp : Fact (1 ≤ p)\nhp_ne_top : p ≠ ⊤\nμ : Measure β\nfmeas : Measurable f\ninst✝ : SeparableSpace ↑(Set.range f ∪ {0})\nhf : Memℒp f p\nn : ℕ\n⊢ 0 ∈ Set.range f ∪ {0}\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁵ : MeasurableSpace β\ninst✝⁴ : MeasurableSpace E\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedAddCommGroup F\nq : ℝ\np : ℝ≥0∞\ninst✝¹ : BorelSpace E\nf : β → E\nhp : Fact (1 ≤ p)\nhp_ne_top : p ≠ ⊤\nμ : Measure β\nfmeas : Measurable f\ninst✝ : SeparableSpace ↑(Set.range f ∪ {0})\nhf : Memℒp f p\n⊢ Tendsto\n    (fun n =>\n      Memℒp.toLp ↑(approxOn f fmeas (Set.range f ∪ {0}) 0 (_ : 0 ∈ Set.range f ∪ {0}) n)\n        (_ : Memℒp (↑(approxOn f fmeas (Set.range f ∪ {0}) 0 (_ : 0 ∈ Set.range f ∪ {0}) n)) p))\n    atTop (𝓝 (Memℒp.toLp f hf))\n[PROOFSTEP]\nsimpa only [Lp.tendsto_Lp_iff_tendsto_ℒp''] using tendsto_approxOn_range_Lp_snorm hp_ne_top fmeas hf.2\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE✝ : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁴ : MeasurableSpace β\ninst✝³ : MeasurableSpace E✝\ninst✝² : NormedAddCommGroup E✝\ninst✝¹ : NormedAddCommGroup F\nq : ℝ\np : ℝ≥0∞\nE : Type u_7\ninst✝ : NormedAddCommGroup E\nf : β → E\nμ : Measure β\nhf : Memℒp f p\nhp_ne_top : p ≠ ⊤\nε : ℝ≥0∞\nhε : ε ≠ 0\n⊢ ∃ g, snorm (f - ↑g) p μ < ε ∧ Memℒp (↑g) p\n[PROOFSTEP]\nborelize E\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE✝ : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁴ : MeasurableSpace β\ninst✝³ : MeasurableSpace E✝\ninst✝² : NormedAddCommGroup E✝\ninst✝¹ : NormedAddCommGroup F\nq : ℝ\np : ℝ≥0∞\nE : Type u_7\ninst✝ : NormedAddCommGroup E\nf : β → E\nμ : Measure β\nhf : Memℒp f p\nhp_ne_top : p ≠ ⊤\nε : ℝ≥0∞\nhε : ε ≠ 0\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\n⊢ ∃ g, snorm (f - ↑g) p μ < ε ∧ Memℒp (↑g) p\n[PROOFSTEP]\nlet f' := hf.1.mk f\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE✝ : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁴ : MeasurableSpace β\ninst✝³ : MeasurableSpace E✝\ninst✝² : NormedAddCommGroup E✝\ninst✝¹ : NormedAddCommGroup F\nq : ℝ\np : ℝ≥0∞\nE : Type u_7\ninst✝ : NormedAddCommGroup E\nf : β → E\nμ : Measure β\nhf : Memℒp f p\nhp_ne_top : p ≠ ⊤\nε : ℝ≥0∞\nhε : ε ≠ 0\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nf' : β → E := AEStronglyMeasurable.mk f (_ : AEStronglyMeasurable f μ)\n⊢ ∃ g, snorm (f - ↑g) p μ < ε ∧ Memℒp (↑g) p\n[PROOFSTEP]\nrsuffices ⟨g, hg, g_mem⟩ : ∃ g : β →ₛ E, snorm (f' - ⇑g) p μ < ε ∧ Memℒp g p μ\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE✝ : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁴ : MeasurableSpace β\ninst✝³ : MeasurableSpace E✝\ninst✝² : NormedAddCommGroup E✝\ninst✝¹ : NormedAddCommGroup F\nq : ℝ\np : ℝ≥0∞\nE : Type u_7\ninst✝ : NormedAddCommGroup E\nf : β → E\nμ : Measure β\nhf : Memℒp f p\nhp_ne_top : p ≠ ⊤\nε : ℝ≥0∞\nhε : ε ≠ 0\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nf' : β → E := AEStronglyMeasurable.mk f (_ : AEStronglyMeasurable f μ)\ng : β →ₛ E\nhg : snorm (f' - ↑g) p μ < ε\ng_mem : Memℒp (↑g) p\n⊢ ∃ g, snorm (f - ↑g) p μ < ε ∧ Memℒp (↑g) p\n[PROOFSTEP]\nrefine' ⟨g, _, g_mem⟩\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE✝ : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁴ : MeasurableSpace β\ninst✝³ : MeasurableSpace E✝\ninst✝² : NormedAddCommGroup E✝\ninst✝¹ : NormedAddCommGroup F\nq : ℝ\np : ℝ≥0∞\nE : Type u_7\ninst✝ : NormedAddCommGroup E\nf : β → E\nμ : Measure β\nhf : Memℒp f p\nhp_ne_top : p ≠ ⊤\nε : ℝ≥0∞\nhε : ε ≠ 0\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nf' : β → E := AEStronglyMeasurable.mk f (_ : AEStronglyMeasurable f μ)\ng : β →ₛ E\nhg : snorm (f' - ↑g) p μ < ε\ng_mem : Memℒp (↑g) p\n⊢ snorm (f - ↑g) p μ < ε\n[PROOFSTEP]\nsuffices snorm (f - ⇑g) p μ = snorm (f' - ⇑g) p μ by rwa [this]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE✝ : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁴ : MeasurableSpace β\ninst✝³ : MeasurableSpace E✝\ninst✝² : NormedAddCommGroup E✝\ninst✝¹ : NormedAddCommGroup F\nq : ℝ\np : ℝ≥0∞\nE : Type u_7\ninst✝ : NormedAddCommGroup E\nf : β → E\nμ : Measure β\nhf : Memℒp f p\nhp_ne_top : p ≠ ⊤\nε : ℝ≥0∞\nhε : ε ≠ 0\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nf' : β → E := AEStronglyMeasurable.mk f (_ : AEStronglyMeasurable f μ)\ng : β →ₛ E\nhg : snorm (f' - ↑g) p μ < ε\ng_mem : Memℒp (↑g) p\nthis : snorm (f - ↑g) p μ = snorm (f' - ↑g) p μ\n⊢ snorm (f - ↑g) p μ < ε\n[PROOFSTEP]\nrwa [this]\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE✝ : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁴ : MeasurableSpace β\ninst✝³ : MeasurableSpace E✝\ninst✝² : NormedAddCommGroup E✝\ninst✝¹ : NormedAddCommGroup F\nq : ℝ\np : ℝ≥0∞\nE : Type u_7\ninst✝ : NormedAddCommGroup E\nf : β → E\nμ : Measure β\nhf : Memℒp f p\nhp_ne_top : p ≠ ⊤\nε : ℝ≥0∞\nhε : ε ≠ 0\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nf' : β → E := AEStronglyMeasurable.mk f (_ : AEStronglyMeasurable f μ)\ng : β →ₛ E\nhg : snorm (f' - ↑g) p μ < ε\ng_mem : Memℒp (↑g) p\n⊢ snorm (f - ↑g) p μ = snorm (f' - ↑g) p μ\n[PROOFSTEP]\napply snorm_congr_ae\n[GOAL]\ncase intro.intro.hfg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE✝ : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁴ : MeasurableSpace β\ninst✝³ : MeasurableSpace E✝\ninst✝² : NormedAddCommGroup E✝\ninst✝¹ : NormedAddCommGroup F\nq : ℝ\np : ℝ≥0∞\nE : Type u_7\ninst✝ : NormedAddCommGroup E\nf : β → E\nμ : Measure β\nhf : Memℒp f p\nhp_ne_top : p ≠ ⊤\nε : ℝ≥0∞\nhε : ε ≠ 0\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nf' : β → E := AEStronglyMeasurable.mk f (_ : AEStronglyMeasurable f μ)\ng : β →ₛ E\nhg : snorm (f' - ↑g) p μ < ε\ng_mem : Memℒp (↑g) p\n⊢ f - ↑g =ᵐ[μ] f' - ↑g\n[PROOFSTEP]\nfilter_upwards [hf.1.ae_eq_mk] with x hx\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE✝ : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁴ : MeasurableSpace β\ninst✝³ : MeasurableSpace E✝\ninst✝² : NormedAddCommGroup E✝\ninst✝¹ : NormedAddCommGroup F\nq : ℝ\np : ℝ≥0∞\nE : Type u_7\ninst✝ : NormedAddCommGroup E\nf : β → E\nμ : Measure β\nhf : Memℒp f p\nhp_ne_top : p ≠ ⊤\nε : ℝ≥0∞\nhε : ε ≠ 0\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nf' : β → E := AEStronglyMeasurable.mk f (_ : AEStronglyMeasurable f μ)\ng : β →ₛ E\nhg : snorm (f' - ↑g) p μ < ε\ng_mem : Memℒp (↑g) p\nx : β\nhx : f x = AEStronglyMeasurable.mk f (_ : AEStronglyMeasurable f μ) x\n⊢ (f - ↑g) x = (AEStronglyMeasurable.mk f (_ : AEStronglyMeasurable f μ) - ↑g) x\n[PROOFSTEP]\nsimpa only [Pi.sub_apply, sub_left_inj] using hx\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE✝ : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁴ : MeasurableSpace β\ninst✝³ : MeasurableSpace E✝\ninst✝² : NormedAddCommGroup E✝\ninst✝¹ : NormedAddCommGroup F\nq : ℝ\np : ℝ≥0∞\nE : Type u_7\ninst✝ : NormedAddCommGroup E\nf : β → E\nμ : Measure β\nhf : Memℒp f p\nhp_ne_top : p ≠ ⊤\nε : ℝ≥0∞\nhε : ε ≠ 0\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nf' : β → E := AEStronglyMeasurable.mk f (_ : AEStronglyMeasurable f μ)\n⊢ ∃ g, snorm (f' - ↑g) p μ < ε ∧ Memℒp (↑g) p\n[PROOFSTEP]\nhave hf' : Memℒp f' p μ := hf.ae_eq hf.1.ae_eq_mk\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE✝ : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁴ : MeasurableSpace β\ninst✝³ : MeasurableSpace E✝\ninst✝² : NormedAddCommGroup E✝\ninst✝¹ : NormedAddCommGroup F\nq : ℝ\np : ℝ≥0∞\nE : Type u_7\ninst✝ : NormedAddCommGroup E\nf : β → E\nμ : Measure β\nhf : Memℒp f p\nhp_ne_top : p ≠ ⊤\nε : ℝ≥0∞\nhε : ε ≠ 0\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nf' : β → E := AEStronglyMeasurable.mk f (_ : AEStronglyMeasurable f μ)\nhf' : Memℒp f' p\n⊢ ∃ g, snorm (f' - ↑g) p μ < ε ∧ Memℒp (↑g) p\n[PROOFSTEP]\nhave f'meas : Measurable f' := hf.1.measurable_mk\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE✝ : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁴ : MeasurableSpace β\ninst✝³ : MeasurableSpace E✝\ninst✝² : NormedAddCommGroup E✝\ninst✝¹ : NormedAddCommGroup F\nq : ℝ\np : ℝ≥0∞\nE : Type u_7\ninst✝ : NormedAddCommGroup E\nf : β → E\nμ : Measure β\nhf : Memℒp f p\nhp_ne_top : p ≠ ⊤\nε : ℝ≥0∞\nhε : ε ≠ 0\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nf' : β → E := AEStronglyMeasurable.mk f (_ : AEStronglyMeasurable f μ)\nhf' : Memℒp f' p\nf'meas : Measurable f'\n⊢ ∃ g, snorm (f' - ↑g) p μ < ε ∧ Memℒp (↑g) p\n[PROOFSTEP]\nhave : SeparableSpace (range f' ∪ {0} : Set E) :=\n  StronglyMeasurable.separableSpace_range_union_singleton hf.1.stronglyMeasurable_mk\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE✝ : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁴ : MeasurableSpace β\ninst✝³ : MeasurableSpace E✝\ninst✝² : NormedAddCommGroup E✝\ninst✝¹ : NormedAddCommGroup F\nq : ℝ\np : ℝ≥0∞\nE : Type u_7\ninst✝ : NormedAddCommGroup E\nf : β → E\nμ : Measure β\nhf : Memℒp f p\nhp_ne_top : p ≠ ⊤\nε : ℝ≥0∞\nhε : ε ≠ 0\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nf' : β → E := AEStronglyMeasurable.mk f (_ : AEStronglyMeasurable f μ)\nhf' : Memℒp f' p\nf'meas : Measurable f'\nthis : SeparableSpace ↑(Set.range f' ∪ {0})\n⊢ ∃ g, snorm (f' - ↑g) p μ < ε ∧ Memℒp (↑g) p\n[PROOFSTEP]\nrcases((tendsto_approxOn_range_Lp_snorm hp_ne_top f'meas hf'.2).eventually <| gt_mem_nhds hε.bot_lt).exists with ⟨n, hn⟩\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE✝ : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁴ : MeasurableSpace β\ninst✝³ : MeasurableSpace E✝\ninst✝² : NormedAddCommGroup E✝\ninst✝¹ : NormedAddCommGroup F\nq : ℝ\np : ℝ≥0∞\nE : Type u_7\ninst✝ : NormedAddCommGroup E\nf : β → E\nμ : Measure β\nhf : Memℒp f p\nhp_ne_top : p ≠ ⊤\nε : ℝ≥0∞\nhε : ε ≠ 0\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nf' : β → E := AEStronglyMeasurable.mk f (_ : AEStronglyMeasurable f μ)\nhf' : Memℒp f' p\nf'meas : Measurable f'\nthis : SeparableSpace ↑(Set.range f' ∪ {0})\nn : ℕ\nhn : snorm (↑(approxOn f' f'meas (Set.range f' ∪ {0}) 0 (_ : 0 ∈ Set.range f' ∪ {0}) n) - f') p μ < ε\n⊢ ∃ g, snorm (f' - ↑g) p μ < ε ∧ Memℒp (↑g) p\n[PROOFSTEP]\nrw [← snorm_neg, neg_sub] at hn \n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE✝ : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁴ : MeasurableSpace β\ninst✝³ : MeasurableSpace E✝\ninst✝² : NormedAddCommGroup E✝\ninst✝¹ : NormedAddCommGroup F\nq : ℝ\np : ℝ≥0∞\nE : Type u_7\ninst✝ : NormedAddCommGroup E\nf : β → E\nμ : Measure β\nhf : Memℒp f p\nhp_ne_top : p ≠ ⊤\nε : ℝ≥0∞\nhε : ε ≠ 0\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nf' : β → E := AEStronglyMeasurable.mk f (_ : AEStronglyMeasurable f μ)\nhf' : Memℒp f' p\nf'meas : Measurable f'\nthis : SeparableSpace ↑(Set.range f' ∪ {0})\nn : ℕ\nhn : snorm (f' - ↑(approxOn f' f'meas (Set.range f' ∪ {0}) 0 (_ : 0 ∈ Set.range f' ∪ {0}) n)) p μ < ε\n⊢ ∃ g, snorm (f' - ↑g) p μ < ε ∧ Memℒp (↑g) p\n[PROOFSTEP]\nexact ⟨_, hn, memℒp_approxOn_range f'meas hf' _⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁴ : MeasurableSpace β\ninst✝³ : MeasurableSpace E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : OpensMeasurableSpace E\nf : β → E\nhf : Measurable f\ns : Set E\ny₀ : E\nh₀ : y₀ ∈ s\ninst✝ : SeparableSpace ↑s\nμ : Measure β\nhμ : ∀ᵐ (x : β) ∂μ, f x ∈ closure s\nhi : HasFiniteIntegral fun x => f x - y₀\n⊢ Tendsto (fun n => ∫⁻ (x : β), ↑‖↑(approxOn f hf s y₀ h₀ n) x - f x‖₊ ∂μ) atTop (𝓝 0)\n[PROOFSTEP]\nsimpa [snorm_one_eq_lintegral_nnnorm] using\n  tendsto_approxOn_Lp_snorm hf h₀ one_ne_top hμ (by simpa [snorm_one_eq_lintegral_nnnorm] using hi)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁴ : MeasurableSpace β\ninst✝³ : MeasurableSpace E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : OpensMeasurableSpace E\nf : β → E\nhf : Measurable f\ns : Set E\ny₀ : E\nh₀ : y₀ ∈ s\ninst✝ : SeparableSpace ↑s\nμ : Measure β\nhμ : ∀ᵐ (x : β) ∂μ, f x ∈ closure s\nhi : HasFiniteIntegral fun x => f x - y₀\n⊢ snorm (fun x => f x - y₀) 1 μ < ⊤\n[PROOFSTEP]\nsimpa [snorm_one_eq_lintegral_nnnorm] using hi\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁴ : MeasurableSpace β\ninst✝³ : MeasurableSpace E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : BorelSpace E\nf : β → E\nμ : Measure β\nfmeas : Measurable f\nhf : Integrable f\ns : Set E\ny₀ : E\nh₀ : y₀ ∈ s\ninst✝ : SeparableSpace ↑s\nhi₀ : Integrable fun x => y₀\nn : ℕ\n⊢ Integrable ↑(approxOn f fmeas s y₀ h₀ n)\n[PROOFSTEP]\nrw [← memℒp_one_iff_integrable] at hf hi₀ ⊢\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁴ : MeasurableSpace β\ninst✝³ : MeasurableSpace E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : BorelSpace E\nf : β → E\nμ : Measure β\nfmeas : Measurable f\nhf : Memℒp f 1\ns : Set E\ny₀ : E\nh₀ : y₀ ∈ s\ninst✝ : SeparableSpace ↑s\nhi₀ : Memℒp (fun x => y₀) 1\nn : ℕ\n⊢ Memℒp (↑(approxOn f fmeas s y₀ h₀ n)) 1\n[PROOFSTEP]\nexact memℒp_approxOn fmeas hf h₀ hi₀ n\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁴ : MeasurableSpace β\ninst✝³ : MeasurableSpace E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : OpensMeasurableSpace E\nf : β → E\nμ : Measure β\ninst✝ : SeparableSpace ↑(Set.range f ∪ {0})\nfmeas : Measurable f\nhf : Integrable f\nn : ℕ\nx : β\n⊢ 0 ∈ Set.range f ∪ {0}\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁴ : MeasurableSpace β\ninst✝³ : MeasurableSpace E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : OpensMeasurableSpace E\nf : β → E\nμ : Measure β\ninst✝ : SeparableSpace ↑(Set.range f ∪ {0})\nfmeas : Measurable f\nhf : Integrable f\n⊢ Tendsto (fun n => ∫⁻ (x : β), ↑‖↑(approxOn f fmeas (Set.range f ∪ {0}) 0 (_ : 0 ∈ Set.range f ∪ {0}) n) x - f x‖₊ ∂μ)\n    atTop (𝓝 0)\n[PROOFSTEP]\napply tendsto_approxOn_L1_nnnorm fmeas\n[GOAL]\ncase hμ\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁴ : MeasurableSpace β\ninst✝³ : MeasurableSpace E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : OpensMeasurableSpace E\nf : β → E\nμ : Measure β\ninst✝ : SeparableSpace ↑(Set.range f ∪ {0})\nfmeas : Measurable f\nhf : Integrable f\n⊢ ∀ᵐ (x : β) ∂μ, f x ∈ closure (Set.range f ∪ {0})\n[PROOFSTEP]\napply eventually_of_forall\n[GOAL]\ncase hμ.hp\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁴ : MeasurableSpace β\ninst✝³ : MeasurableSpace E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : OpensMeasurableSpace E\nf : β → E\nμ : Measure β\ninst✝ : SeparableSpace ↑(Set.range f ∪ {0})\nfmeas : Measurable f\nhf : Integrable f\n⊢ ∀ (x : β), f x ∈ closure (Set.range f ∪ {0})\n[PROOFSTEP]\nintro x\n[GOAL]\ncase hμ.hp\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁴ : MeasurableSpace β\ninst✝³ : MeasurableSpace E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : OpensMeasurableSpace E\nf : β → E\nμ : Measure β\ninst✝ : SeparableSpace ↑(Set.range f ∪ {0})\nfmeas : Measurable f\nhf : Integrable f\nx : β\n⊢ f x ∈ closure (Set.range f ∪ {0})\n[PROOFSTEP]\napply subset_closure\n[GOAL]\ncase hμ.hp.a\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁴ : MeasurableSpace β\ninst✝³ : MeasurableSpace E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : OpensMeasurableSpace E\nf : β → E\nμ : Measure β\ninst✝ : SeparableSpace ↑(Set.range f ∪ {0})\nfmeas : Measurable f\nhf : Integrable f\nx : β\n⊢ f x ∈ Set.range f ∪ {0}\n[PROOFSTEP]\nsimp\n[GOAL]\ncase hi\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁴ : MeasurableSpace β\ninst✝³ : MeasurableSpace E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : OpensMeasurableSpace E\nf : β → E\nμ : Measure β\ninst✝ : SeparableSpace ↑(Set.range f ∪ {0})\nfmeas : Measurable f\nhf : Integrable f\n⊢ HasFiniteIntegral fun x => f x - 0\n[PROOFSTEP]\nsimpa using hf.2\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁴ : MeasurableSpace β\ninst✝³ : MeasurableSpace E\ninst✝² : NormedAddCommGroup E\ninst✝¹ : BorelSpace E\nf : β → E\nμ : Measure β\nfmeas : Measurable f\ninst✝ : SeparableSpace ↑(Set.range f ∪ {0})\nhf : Integrable f\nn : ℕ\n⊢ 0 ∈ Set.range f ∪ {0}\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\nμ✝ : Measure α\np✝ : ℝ≥0∞\np : ℝ\nf : α →ₛ F\nμ : Measure α\n⊢ snorm' (↑f) p μ = (∑ y in SimpleFunc.range f, ↑‖y‖₊ ^ p * ↑↑μ (↑f ⁻¹' {y})) ^ (1 / p)\n[PROOFSTEP]\nhave h_map : (fun a => (‖f a‖₊ : ℝ≥0∞) ^ p) = f.map fun a : F => (‖a‖₊ : ℝ≥0∞) ^ p := by simp; rfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\nμ✝ : Measure α\np✝ : ℝ≥0∞\np : ℝ\nf : α →ₛ F\nμ : Measure α\n⊢ (fun a => ↑‖↑f a‖₊ ^ p) = ↑(map (fun a => ↑‖a‖₊ ^ p) f)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\nμ✝ : Measure α\np✝ : ℝ≥0∞\np : ℝ\nf : α →ₛ F\nμ : Measure α\n⊢ (fun a => ↑‖↑f a‖₊ ^ p) = (fun a => ↑‖a‖₊ ^ p) ∘ ↑f\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\nμ✝ : Measure α\np✝ : ℝ≥0∞\np : ℝ\nf : α →ₛ F\nμ : Measure α\nh_map : (fun a => ↑‖↑f a‖₊ ^ p) = ↑(map (fun a => ↑‖a‖₊ ^ p) f)\n⊢ snorm' (↑f) p μ = (∑ y in SimpleFunc.range f, ↑‖y‖₊ ^ p * ↑↑μ (↑f ⁻¹' {y})) ^ (1 / p)\n[PROOFSTEP]\nrw [snorm', h_map, lintegral_eq_lintegral, map_lintegral]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\nμ : Measure α\np : ℝ≥0∞\nhp_pos : p ≠ 0\nhp_ne_top : p ≠ ⊤\nf : α →ₛ E\nhf : Memℒp (↑f) p\ny : E\nhy_ne : y ≠ 0\n⊢ ↑↑μ (↑f ⁻¹' {y}) < ⊤\n[PROOFSTEP]\nhave hp_pos_real : 0 < p.toReal := ENNReal.toReal_pos hp_pos hp_ne_top\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\nμ : Measure α\np : ℝ≥0∞\nhp_pos : p ≠ 0\nhp_ne_top : p ≠ ⊤\nf : α →ₛ E\nhf : Memℒp (↑f) p\ny : E\nhy_ne : y ≠ 0\nhp_pos_real : 0 < ENNReal.toReal p\n⊢ ↑↑μ (↑f ⁻¹' {y}) < ⊤\n[PROOFSTEP]\nhave hf_snorm := Memℒp.snorm_lt_top hf\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\nμ : Measure α\np : ℝ≥0∞\nhp_pos : p ≠ 0\nhp_ne_top : p ≠ ⊤\nf : α →ₛ E\nhf : Memℒp (↑f) p\ny : E\nhy_ne : y ≠ 0\nhp_pos_real : 0 < ENNReal.toReal p\nhf_snorm : snorm (↑f) p μ < ⊤\n⊢ ↑↑μ (↑f ⁻¹' {y}) < ⊤\n[PROOFSTEP]\nrw [snorm_eq_snorm' hp_pos hp_ne_top, f.snorm'_eq, ←\n  @ENNReal.lt_rpow_one_div_iff _ _ (1 / p.toReal) (by simp [hp_pos_real]),\n  @ENNReal.top_rpow_of_pos (1 / (1 / p.toReal)) (by simp [hp_pos_real]), ENNReal.sum_lt_top_iff] at hf_snorm \n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\nμ : Measure α\np : ℝ≥0∞\nhp_pos : p ≠ 0\nhp_ne_top : p ≠ ⊤\nf : α →ₛ E\nhf : Memℒp (↑f) p\ny : E\nhy_ne : y ≠ 0\nhp_pos_real : 0 < ENNReal.toReal p\nhf_snorm : (∑ y in SimpleFunc.range f, ↑‖y‖₊ ^ ENNReal.toReal p * ↑↑μ (↑f ⁻¹' {y})) ^ (1 / ENNReal.toReal p) < ⊤\n⊢ 0 < 1 / ENNReal.toReal p\n[PROOFSTEP]\nsimp [hp_pos_real]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\nμ : Measure α\np : ℝ≥0∞\nhp_pos : p ≠ 0\nhp_ne_top : p ≠ ⊤\nf : α →ₛ E\nhf : Memℒp (↑f) p\ny : E\nhy_ne : y ≠ 0\nhp_pos_real : 0 < ENNReal.toReal p\nhf_snorm : ∑ y in SimpleFunc.range f, ↑‖y‖₊ ^ ENNReal.toReal p * ↑↑μ (↑f ⁻¹' {y}) < ⊤ ^ (1 / (1 / ENNReal.toReal p))\n⊢ 0 < 1 / (1 / ENNReal.toReal p)\n[PROOFSTEP]\nsimp [hp_pos_real]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\nμ : Measure α\np : ℝ≥0∞\nhp_pos : p ≠ 0\nhp_ne_top : p ≠ ⊤\nf : α →ₛ E\nhf : Memℒp (↑f) p\ny : E\nhy_ne : y ≠ 0\nhp_pos_real : 0 < ENNReal.toReal p\nhf_snorm : ∀ (a : E), a ∈ SimpleFunc.range f → ↑‖a‖₊ ^ ENNReal.toReal p * ↑↑μ (↑f ⁻¹' {a}) < ⊤\n⊢ ↑↑μ (↑f ⁻¹' {y}) < ⊤\n[PROOFSTEP]\nby_cases hyf : y ∈ f.range\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\nμ : Measure α\np : ℝ≥0∞\nhp_pos : p ≠ 0\nhp_ne_top : p ≠ ⊤\nf : α →ₛ E\nhf : Memℒp (↑f) p\ny : E\nhy_ne : y ≠ 0\nhp_pos_real : 0 < ENNReal.toReal p\nhf_snorm : ∀ (a : E), a ∈ SimpleFunc.range f → ↑‖a‖₊ ^ ENNReal.toReal p * ↑↑μ (↑f ⁻¹' {a}) < ⊤\nhyf : y ∈ SimpleFunc.range f\n⊢ ↑↑μ (↑f ⁻¹' {y}) < ⊤\ncase neg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\nμ : Measure α\np : ℝ≥0∞\nhp_pos : p ≠ 0\nhp_ne_top : p ≠ ⊤\nf : α →ₛ E\nhf : Memℒp (↑f) p\ny : E\nhy_ne : y ≠ 0\nhp_pos_real : 0 < ENNReal.toReal p\nhf_snorm : ∀ (a : E), a ∈ SimpleFunc.range f → ↑‖a‖₊ ^ ENNReal.toReal p * ↑↑μ (↑f ⁻¹' {a}) < ⊤\nhyf : ¬y ∈ SimpleFunc.range f\n⊢ ↑↑μ (↑f ⁻¹' {y}) < ⊤\n[PROOFSTEP]\nswap\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\nμ : Measure α\np : ℝ≥0∞\nhp_pos : p ≠ 0\nhp_ne_top : p ≠ ⊤\nf : α →ₛ E\nhf : Memℒp (↑f) p\ny : E\nhy_ne : y ≠ 0\nhp_pos_real : 0 < ENNReal.toReal p\nhf_snorm : ∀ (a : E), a ∈ SimpleFunc.range f → ↑‖a‖₊ ^ ENNReal.toReal p * ↑↑μ (↑f ⁻¹' {a}) < ⊤\nhyf : ¬y ∈ SimpleFunc.range f\n⊢ ↑↑μ (↑f ⁻¹' {y}) < ⊤\n[PROOFSTEP]\nsuffices h_empty : f ⁻¹' { y } = ∅\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\nμ : Measure α\np : ℝ≥0∞\nhp_pos : p ≠ 0\nhp_ne_top : p ≠ ⊤\nf : α →ₛ E\nhf : Memℒp (↑f) p\ny : E\nhy_ne : y ≠ 0\nhp_pos_real : 0 < ENNReal.toReal p\nhf_snorm : ∀ (a : E), a ∈ SimpleFunc.range f → ↑‖a‖₊ ^ ENNReal.toReal p * ↑↑μ (↑f ⁻¹' {a}) < ⊤\nhyf : ¬y ∈ SimpleFunc.range f\nh_empty : ↑f ⁻¹' {y} = ∅\n⊢ ↑↑μ (↑f ⁻¹' {y}) < ⊤\n[PROOFSTEP]\nrw [h_empty, measure_empty]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\nμ : Measure α\np : ℝ≥0∞\nhp_pos : p ≠ 0\nhp_ne_top : p ≠ ⊤\nf : α →ₛ E\nhf : Memℒp (↑f) p\ny : E\nhy_ne : y ≠ 0\nhp_pos_real : 0 < ENNReal.toReal p\nhf_snorm : ∀ (a : E), a ∈ SimpleFunc.range f → ↑‖a‖₊ ^ ENNReal.toReal p * ↑↑μ (↑f ⁻¹' {a}) < ⊤\nhyf : ¬y ∈ SimpleFunc.range f\nh_empty : ↑f ⁻¹' {y} = ∅\n⊢ 0 < ⊤\n[PROOFSTEP]\nexact ENNReal.coe_lt_top\n[GOAL]\ncase h_empty\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\nμ : Measure α\np : ℝ≥0∞\nhp_pos : p ≠ 0\nhp_ne_top : p ≠ ⊤\nf : α →ₛ E\nhf : Memℒp (↑f) p\ny : E\nhy_ne : y ≠ 0\nhp_pos_real : 0 < ENNReal.toReal p\nhf_snorm : ∀ (a : E), a ∈ SimpleFunc.range f → ↑‖a‖₊ ^ ENNReal.toReal p * ↑↑μ (↑f ⁻¹' {a}) < ⊤\nhyf : ¬y ∈ SimpleFunc.range f\n⊢ ↑f ⁻¹' {y} = ∅\n[PROOFSTEP]\next1 x\n[GOAL]\ncase h_empty.h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\nμ : Measure α\np : ℝ≥0∞\nhp_pos : p ≠ 0\nhp_ne_top : p ≠ ⊤\nf : α →ₛ E\nhf : Memℒp (↑f) p\ny : E\nhy_ne : y ≠ 0\nhp_pos_real : 0 < ENNReal.toReal p\nhf_snorm : ∀ (a : E), a ∈ SimpleFunc.range f → ↑‖a‖₊ ^ ENNReal.toReal p * ↑↑μ (↑f ⁻¹' {a}) < ⊤\nhyf : ¬y ∈ SimpleFunc.range f\nx : α\n⊢ x ∈ ↑f ⁻¹' {y} ↔ x ∈ ∅\n[PROOFSTEP]\nrw [Set.mem_preimage, Set.mem_singleton_iff, mem_empty_iff_false, iff_false_iff]\n[GOAL]\ncase h_empty.h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\nμ : Measure α\np : ℝ≥0∞\nhp_pos : p ≠ 0\nhp_ne_top : p ≠ ⊤\nf : α →ₛ E\nhf : Memℒp (↑f) p\ny : E\nhy_ne : y ≠ 0\nhp_pos_real : 0 < ENNReal.toReal p\nhf_snorm : ∀ (a : E), a ∈ SimpleFunc.range f → ↑‖a‖₊ ^ ENNReal.toReal p * ↑↑μ (↑f ⁻¹' {a}) < ⊤\nhyf : ¬y ∈ SimpleFunc.range f\nx : α\n⊢ ¬↑f x = y\n[PROOFSTEP]\nrefine' fun hxy => hyf _\n[GOAL]\ncase h_empty.h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\nμ : Measure α\np : ℝ≥0∞\nhp_pos : p ≠ 0\nhp_ne_top : p ≠ ⊤\nf : α →ₛ E\nhf : Memℒp (↑f) p\ny : E\nhy_ne : y ≠ 0\nhp_pos_real : 0 < ENNReal.toReal p\nhf_snorm : ∀ (a : E), a ∈ SimpleFunc.range f → ↑‖a‖₊ ^ ENNReal.toReal p * ↑↑μ (↑f ⁻¹' {a}) < ⊤\nhyf : ¬y ∈ SimpleFunc.range f\nx : α\nhxy : ↑f x = y\n⊢ y ∈ SimpleFunc.range f\n[PROOFSTEP]\nrw [mem_range, Set.mem_range]\n[GOAL]\ncase h_empty.h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\nμ : Measure α\np : ℝ≥0∞\nhp_pos : p ≠ 0\nhp_ne_top : p ≠ ⊤\nf : α →ₛ E\nhf : Memℒp (↑f) p\ny : E\nhy_ne : y ≠ 0\nhp_pos_real : 0 < ENNReal.toReal p\nhf_snorm : ∀ (a : E), a ∈ SimpleFunc.range f → ↑‖a‖₊ ^ ENNReal.toReal p * ↑↑μ (↑f ⁻¹' {a}) < ⊤\nhyf : ¬y ∈ SimpleFunc.range f\nx : α\nhxy : ↑f x = y\n⊢ ∃ y_1, ↑f y_1 = y\n[PROOFSTEP]\nexact ⟨x, hxy⟩\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\nμ : Measure α\np : ℝ≥0∞\nhp_pos : p ≠ 0\nhp_ne_top : p ≠ ⊤\nf : α →ₛ E\nhf : Memℒp (↑f) p\ny : E\nhy_ne : y ≠ 0\nhp_pos_real : 0 < ENNReal.toReal p\nhf_snorm : ∀ (a : E), a ∈ SimpleFunc.range f → ↑‖a‖₊ ^ ENNReal.toReal p * ↑↑μ (↑f ⁻¹' {a}) < ⊤\nhyf : y ∈ SimpleFunc.range f\n⊢ ↑↑μ (↑f ⁻¹' {y}) < ⊤\n[PROOFSTEP]\nspecialize hf_snorm y hyf\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\nμ : Measure α\np : ℝ≥0∞\nhp_pos : p ≠ 0\nhp_ne_top : p ≠ ⊤\nf : α →ₛ E\nhf : Memℒp (↑f) p\ny : E\nhy_ne : y ≠ 0\nhp_pos_real : 0 < ENNReal.toReal p\nhyf : y ∈ SimpleFunc.range f\nhf_snorm : ↑‖y‖₊ ^ ENNReal.toReal p * ↑↑μ (↑f ⁻¹' {y}) < ⊤\n⊢ ↑↑μ (↑f ⁻¹' {y}) < ⊤\n[PROOFSTEP]\nrw [ENNReal.mul_lt_top_iff] at hf_snorm \n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\nμ : Measure α\np : ℝ≥0∞\nhp_pos : p ≠ 0\nhp_ne_top : p ≠ ⊤\nf : α →ₛ E\nhf : Memℒp (↑f) p\ny : E\nhy_ne : y ≠ 0\nhp_pos_real : 0 < ENNReal.toReal p\nhyf : y ∈ SimpleFunc.range f\nhf_snorm : ↑‖y‖₊ ^ ENNReal.toReal p < ⊤ ∧ ↑↑μ (↑f ⁻¹' {y}) < ⊤ ∨ ↑‖y‖₊ ^ ENNReal.toReal p = 0 ∨ ↑↑μ (↑f ⁻¹' {y}) = 0\n⊢ ↑↑μ (↑f ⁻¹' {y}) < ⊤\n[PROOFSTEP]\ncases hf_snorm with\n| inl hf_snorm => exact hf_snorm.2\n| inr hf_snorm =>\n  cases hf_snorm with\n  | inl hf_snorm =>\n    refine' absurd _ hy_ne\n    simpa [hp_pos_real] using hf_snorm\n  | inr hf_snorm => simp [hf_snorm]\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\nμ : Measure α\np : ℝ≥0∞\nhp_pos : p ≠ 0\nhp_ne_top : p ≠ ⊤\nf : α →ₛ E\nhf : Memℒp (↑f) p\ny : E\nhy_ne : y ≠ 0\nhp_pos_real : 0 < ENNReal.toReal p\nhyf : y ∈ SimpleFunc.range f\nhf_snorm : ↑‖y‖₊ ^ ENNReal.toReal p < ⊤ ∧ ↑↑μ (↑f ⁻¹' {y}) < ⊤ ∨ ↑‖y‖₊ ^ ENNReal.toReal p = 0 ∨ ↑↑μ (↑f ⁻¹' {y}) = 0\n⊢ ↑↑μ (↑f ⁻¹' {y}) < ⊤\n[PROOFSTEP]\ncases hf_snorm with\n| inl hf_snorm => exact hf_snorm.2\n| inr hf_snorm =>\n  cases hf_snorm with\n  | inl hf_snorm =>\n    refine' absurd _ hy_ne\n    simpa [hp_pos_real] using hf_snorm\n  | inr hf_snorm => simp [hf_snorm]\n[GOAL]\ncase pos.inl\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\nμ : Measure α\np : ℝ≥0∞\nhp_pos : p ≠ 0\nhp_ne_top : p ≠ ⊤\nf : α →ₛ E\nhf : Memℒp (↑f) p\ny : E\nhy_ne : y ≠ 0\nhp_pos_real : 0 < ENNReal.toReal p\nhyf : y ∈ SimpleFunc.range f\nhf_snorm : ↑‖y‖₊ ^ ENNReal.toReal p < ⊤ ∧ ↑↑μ (↑f ⁻¹' {y}) < ⊤\n⊢ ↑↑μ (↑f ⁻¹' {y}) < ⊤\n[PROOFSTEP]\n\n| inl hf_snorm => exact hf_snorm.2\n[GOAL]\ncase pos.inl\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\nμ : Measure α\np : ℝ≥0∞\nhp_pos : p ≠ 0\nhp_ne_top : p ≠ ⊤\nf : α →ₛ E\nhf : Memℒp (↑f) p\ny : E\nhy_ne : y ≠ 0\nhp_pos_real : 0 < ENNReal.toReal p\nhyf : y ∈ SimpleFunc.range f\nhf_snorm : ↑‖y‖₊ ^ ENNReal.toReal p < ⊤ ∧ ↑↑μ (↑f ⁻¹' {y}) < ⊤\n⊢ ↑↑μ (↑f ⁻¹' {y}) < ⊤\n[PROOFSTEP]\nexact hf_snorm.2\n[GOAL]\ncase pos.inr\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\nμ : Measure α\np : ℝ≥0∞\nhp_pos : p ≠ 0\nhp_ne_top : p ≠ ⊤\nf : α →ₛ E\nhf : Memℒp (↑f) p\ny : E\nhy_ne : y ≠ 0\nhp_pos_real : 0 < ENNReal.toReal p\nhyf : y ∈ SimpleFunc.range f\nhf_snorm : ↑‖y‖₊ ^ ENNReal.toReal p = 0 ∨ ↑↑μ (↑f ⁻¹' {y}) = 0\n⊢ ↑↑μ (↑f ⁻¹' {y}) < ⊤\n[PROOFSTEP]\n\n| inr hf_snorm =>\n  cases hf_snorm with\n  | inl hf_snorm =>\n    refine' absurd _ hy_ne\n    simpa [hp_pos_real] using hf_snorm\n  | inr hf_snorm => simp [hf_snorm]\n[GOAL]\ncase pos.inr\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\nμ : Measure α\np : ℝ≥0∞\nhp_pos : p ≠ 0\nhp_ne_top : p ≠ ⊤\nf : α →ₛ E\nhf : Memℒp (↑f) p\ny : E\nhy_ne : y ≠ 0\nhp_pos_real : 0 < ENNReal.toReal p\nhyf : y ∈ SimpleFunc.range f\nhf_snorm : ↑‖y‖₊ ^ ENNReal.toReal p = 0 ∨ ↑↑μ (↑f ⁻¹' {y}) = 0\n⊢ ↑↑μ (↑f ⁻¹' {y}) < ⊤\n[PROOFSTEP]\ncases hf_snorm with\n| inl hf_snorm =>\n  refine' absurd _ hy_ne\n  simpa [hp_pos_real] using hf_snorm\n| inr hf_snorm => simp [hf_snorm]\n[GOAL]\ncase pos.inr\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\nμ : Measure α\np : ℝ≥0∞\nhp_pos : p ≠ 0\nhp_ne_top : p ≠ ⊤\nf : α →ₛ E\nhf : Memℒp (↑f) p\ny : E\nhy_ne : y ≠ 0\nhp_pos_real : 0 < ENNReal.toReal p\nhyf : y ∈ SimpleFunc.range f\nhf_snorm : ↑‖y‖₊ ^ ENNReal.toReal p = 0 ∨ ↑↑μ (↑f ⁻¹' {y}) = 0\n⊢ ↑↑μ (↑f ⁻¹' {y}) < ⊤\n[PROOFSTEP]\ncases hf_snorm with\n| inl hf_snorm =>\n  refine' absurd _ hy_ne\n  simpa [hp_pos_real] using hf_snorm\n| inr hf_snorm => simp [hf_snorm]\n[GOAL]\ncase pos.inr.inl\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\nμ : Measure α\np : ℝ≥0∞\nhp_pos : p ≠ 0\nhp_ne_top : p ≠ ⊤\nf : α →ₛ E\nhf : Memℒp (↑f) p\ny : E\nhy_ne : y ≠ 0\nhp_pos_real : 0 < ENNReal.toReal p\nhyf : y ∈ SimpleFunc.range f\nhf_snorm : ↑‖y‖₊ ^ ENNReal.toReal p = 0\n⊢ ↑↑μ (↑f ⁻¹' {y}) < ⊤\n[PROOFSTEP]\n\n| inl hf_snorm =>\n  refine' absurd _ hy_ne\n  simpa [hp_pos_real] using hf_snorm\n[GOAL]\ncase pos.inr.inl\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\nμ : Measure α\np : ℝ≥0∞\nhp_pos : p ≠ 0\nhp_ne_top : p ≠ ⊤\nf : α →ₛ E\nhf : Memℒp (↑f) p\ny : E\nhy_ne : y ≠ 0\nhp_pos_real : 0 < ENNReal.toReal p\nhyf : y ∈ SimpleFunc.range f\nhf_snorm : ↑‖y‖₊ ^ ENNReal.toReal p = 0\n⊢ ↑↑μ (↑f ⁻¹' {y}) < ⊤\n[PROOFSTEP]\nrefine' absurd _ hy_ne\n[GOAL]\ncase pos.inr.inl\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\nμ : Measure α\np : ℝ≥0∞\nhp_pos : p ≠ 0\nhp_ne_top : p ≠ ⊤\nf : α →ₛ E\nhf : Memℒp (↑f) p\ny : E\nhy_ne : y ≠ 0\nhp_pos_real : 0 < ENNReal.toReal p\nhyf : y ∈ SimpleFunc.range f\nhf_snorm : ↑‖y‖₊ ^ ENNReal.toReal p = 0\n⊢ y = 0\n[PROOFSTEP]\nsimpa [hp_pos_real] using hf_snorm\n[GOAL]\ncase pos.inr.inr\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\nμ : Measure α\np : ℝ≥0∞\nhp_pos : p ≠ 0\nhp_ne_top : p ≠ ⊤\nf : α →ₛ E\nhf : Memℒp (↑f) p\ny : E\nhy_ne : y ≠ 0\nhp_pos_real : 0 < ENNReal.toReal p\nhyf : y ∈ SimpleFunc.range f\nhf_snorm : ↑↑μ (↑f ⁻¹' {y}) = 0\n⊢ ↑↑μ (↑f ⁻¹' {y}) < ⊤\n[PROOFSTEP]\n\n| inr hf_snorm => simp [hf_snorm]\n[GOAL]\ncase pos.inr.inr\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\nμ : Measure α\np : ℝ≥0∞\nhp_pos : p ≠ 0\nhp_ne_top : p ≠ ⊤\nf : α →ₛ E\nhf : Memℒp (↑f) p\ny : E\nhy_ne : y ≠ 0\nhp_pos_real : 0 < ENNReal.toReal p\nhyf : y ∈ SimpleFunc.range f\nhf_snorm : ↑↑μ (↑f ⁻¹' {y}) = 0\n⊢ ↑↑μ (↑f ⁻¹' {y}) < ⊤\n[PROOFSTEP]\nsimp [hf_snorm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\nμ : Measure α\np✝ p : ℝ≥0∞\nf : α →ₛ E\nhf : ∀ (y : E), y ≠ 0 → ↑↑μ (↑f ⁻¹' {y}) < ⊤\n⊢ Memℒp (↑f) p\n[PROOFSTEP]\nby_cases hp0 : p = 0\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\nμ : Measure α\np✝ p : ℝ≥0∞\nf : α →ₛ E\nhf : ∀ (y : E), y ≠ 0 → ↑↑μ (↑f ⁻¹' {y}) < ⊤\nhp0 : p = 0\n⊢ Memℒp (↑f) p\n[PROOFSTEP]\nrw [hp0, memℒp_zero_iff_aestronglyMeasurable]\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\nμ : Measure α\np✝ p : ℝ≥0∞\nf : α →ₛ E\nhf : ∀ (y : E), y ≠ 0 → ↑↑μ (↑f ⁻¹' {y}) < ⊤\nhp0 : p = 0\n⊢ AEStronglyMeasurable (↑f) μ\n[PROOFSTEP]\nexact f.aestronglyMeasurable\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\nμ : Measure α\np✝ p : ℝ≥0∞\nf : α →ₛ E\nhf : ∀ (y : E), y ≠ 0 → ↑↑μ (↑f ⁻¹' {y}) < ⊤\nhp0 : ¬p = 0\n⊢ Memℒp (↑f) p\n[PROOFSTEP]\nby_cases hp_top : p = ∞\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\nμ : Measure α\np✝ p : ℝ≥0∞\nf : α →ₛ E\nhf : ∀ (y : E), y ≠ 0 → ↑↑μ (↑f ⁻¹' {y}) < ⊤\nhp0 : ¬p = 0\nhp_top : p = ⊤\n⊢ Memℒp (↑f) p\n[PROOFSTEP]\nrw [hp_top]\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\nμ : Measure α\np✝ p : ℝ≥0∞\nf : α →ₛ E\nhf : ∀ (y : E), y ≠ 0 → ↑↑μ (↑f ⁻¹' {y}) < ⊤\nhp0 : ¬p = 0\nhp_top : p = ⊤\n⊢ Memℒp ↑f ⊤\n[PROOFSTEP]\nexact memℒp_top f μ\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\nμ : Measure α\np✝ p : ℝ≥0∞\nf : α →ₛ E\nhf : ∀ (y : E), y ≠ 0 → ↑↑μ (↑f ⁻¹' {y}) < ⊤\nhp0 : ¬p = 0\nhp_top : ¬p = ⊤\n⊢ Memℒp (↑f) p\n[PROOFSTEP]\nrefine' ⟨f.aestronglyMeasurable, _⟩\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\nμ : Measure α\np✝ p : ℝ≥0∞\nf : α →ₛ E\nhf : ∀ (y : E), y ≠ 0 → ↑↑μ (↑f ⁻¹' {y}) < ⊤\nhp0 : ¬p = 0\nhp_top : ¬p = ⊤\n⊢ snorm (↑f) p μ < ⊤\n[PROOFSTEP]\nrw [snorm_eq_snorm' hp0 hp_top, f.snorm'_eq]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\nμ : Measure α\np✝ p : ℝ≥0∞\nf : α →ₛ E\nhf : ∀ (y : E), y ≠ 0 → ↑↑μ (↑f ⁻¹' {y}) < ⊤\nhp0 : ¬p = 0\nhp_top : ¬p = ⊤\n⊢ (∑ y in SimpleFunc.range f, ↑‖y‖₊ ^ ENNReal.toReal p * ↑↑μ (↑f ⁻¹' {y})) ^ (1 / ENNReal.toReal p) < ⊤\n[PROOFSTEP]\nrefine' ENNReal.rpow_lt_top_of_nonneg (by simp) (ENNReal.sum_lt_top_iff.mpr fun y _ => _).ne\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\nμ : Measure α\np✝ p : ℝ≥0∞\nf : α →ₛ E\nhf : ∀ (y : E), y ≠ 0 → ↑↑μ (↑f ⁻¹' {y}) < ⊤\nhp0 : ¬p = 0\nhp_top : ¬p = ⊤\n⊢ 0 ≤ 1 / ENNReal.toReal p\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\nμ : Measure α\np✝ p : ℝ≥0∞\nf : α →ₛ E\nhf : ∀ (y : E), y ≠ 0 → ↑↑μ (↑f ⁻¹' {y}) < ⊤\nhp0 : ¬p = 0\nhp_top : ¬p = ⊤\ny : E\nx✝ : y ∈ SimpleFunc.range f\n⊢ ↑‖y‖₊ ^ ENNReal.toReal p * ↑↑μ (↑f ⁻¹' {y}) < ⊤\n[PROOFSTEP]\nby_cases hy0 : y = 0\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\nμ : Measure α\np✝ p : ℝ≥0∞\nf : α →ₛ E\nhf : ∀ (y : E), y ≠ 0 → ↑↑μ (↑f ⁻¹' {y}) < ⊤\nhp0 : ¬p = 0\nhp_top : ¬p = ⊤\ny : E\nx✝ : y ∈ SimpleFunc.range f\nhy0 : y = 0\n⊢ ↑‖y‖₊ ^ ENNReal.toReal p * ↑↑μ (↑f ⁻¹' {y}) < ⊤\n[PROOFSTEP]\nsimp [hy0, ENNReal.toReal_pos hp0 hp_top]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\nμ : Measure α\np✝ p : ℝ≥0∞\nf : α →ₛ E\nhf : ∀ (y : E), y ≠ 0 → ↑↑μ (↑f ⁻¹' {y}) < ⊤\nhp0 : ¬p = 0\nhp_top : ¬p = ⊤\ny : E\nx✝ : y ∈ SimpleFunc.range f\nhy0 : ¬y = 0\n⊢ ↑‖y‖₊ ^ ENNReal.toReal p * ↑↑μ (↑f ⁻¹' {y}) < ⊤\n[PROOFSTEP]\nrefine' ENNReal.mul_lt_top _ (hf y hy0).ne\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\nμ : Measure α\np✝ p : ℝ≥0∞\nf : α →ₛ E\nhf : ∀ (y : E), y ≠ 0 → ↑↑μ (↑f ⁻¹' {y}) < ⊤\nhp0 : ¬p = 0\nhp_top : ¬p = ⊤\ny : E\nx✝ : y ∈ SimpleFunc.range f\nhy0 : ¬y = 0\n⊢ ↑‖y‖₊ ^ ENNReal.toReal p ≠ ⊤\n[PROOFSTEP]\nexact (ENNReal.rpow_lt_top_of_nonneg ENNReal.toReal_nonneg ENNReal.coe_ne_top).ne\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\nμ : Measure α\np : ℝ≥0∞\nf : α →ₛ E\ng : α →ₛ F\n⊢ Integrable ↑f → Integrable ↑g → Integrable ↑(pair f g)\n[PROOFSTEP]\nsimpa only [integrable_iff_finMeasSupp] using FinMeasSupp.pair\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\nμ : Measure α\np : ℝ≥0∞\ninst✝ : Zero β\nf : α →ₛ β\nhf : ∀ (y : β), y ≠ 0 → ↑↑μ (↑f ⁻¹' {y}) < ⊤\n⊢ ↑↑μ (support ↑f) < ⊤\n[PROOFSTEP]\nrw [support_eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\nμ : Measure α\np : ℝ≥0∞\ninst✝ : Zero β\nf : α →ₛ β\nhf : ∀ (y : β), y ≠ 0 → ↑↑μ (↑f ⁻¹' {y}) < ⊤\n⊢ ↑↑μ (⋃ (y : β) (_ : y ∈ filter (fun y => y ≠ 0) (SimpleFunc.range f)), ↑f ⁻¹' {y}) < ⊤\n[PROOFSTEP]\nrefine' (measure_biUnion_finset_le _ _).trans_lt (ENNReal.sum_lt_top_iff.mpr fun y hy => _)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\nμ : Measure α\np : ℝ≥0∞\ninst✝ : Zero β\nf : α →ₛ β\nhf : ∀ (y : β), y ≠ 0 → ↑↑μ (↑f ⁻¹' {y}) < ⊤\ny : β\nhy : y ∈ filter (fun y => y ≠ 0) (SimpleFunc.range f)\n⊢ ↑↑μ (↑f ⁻¹' {y}) < ⊤\n[PROOFSTEP]\nrw [Finset.mem_filter] at hy \n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\nμ : Measure α\np : ℝ≥0∞\ninst✝ : Zero β\nf : α →ₛ β\nhf : ∀ (y : β), y ≠ 0 → ↑↑μ (↑f ⁻¹' {y}) < ⊤\ny : β\nhy : y ∈ SimpleFunc.range f ∧ y ≠ 0\n⊢ ↑↑μ (↑f ⁻¹' {y}) < ⊤\n[PROOFSTEP]\nexact hf y hy.2\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\nμ : Measure α\np : ℝ≥0∞\nhp_pos : p ≠ 0\nhp_ne_top : p ≠ ⊤\nc : E\nhc : c ≠ 0\ns : Set α\nhs : MeasurableSet s\nhcs : Memℒp (↑(piecewise s hs (const α c) (const α 0))) p\n⊢ ↑↑μ s < ⊤\n[PROOFSTEP]\nhave : Function.support (const α c) = Set.univ := Function.support_const hc\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\nμ : Measure α\np : ℝ≥0∞\nhp_pos : p ≠ 0\nhp_ne_top : p ≠ ⊤\nc : E\nhc : c ≠ 0\ns : Set α\nhs : MeasurableSet s\nhcs : Memℒp (↑(piecewise s hs (const α c) (const α 0))) p\nthis : support ↑(const α c) = Set.univ\n⊢ ↑↑μ s < ⊤\n[PROOFSTEP]\nsimpa only [memℒp_iff_finMeasSupp hp_pos hp_ne_top, finMeasSupp_iff_support, support_indicator, Set.inter_univ,\n  this] using hcs\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\n⊢ ∀ {a b : { x // x ∈ Lp E p }},\n    a ∈ {f | ∃ s, AEEqFun.mk ↑s (_ : AEStronglyMeasurable (↑s) μ) = ↑f} →\n      b ∈ {f | ∃ s, AEEqFun.mk ↑s (_ : AEStronglyMeasurable (↑s) μ) = ↑f} →\n        a + b ∈ {f | ∃ s, AEEqFun.mk ↑s (_ : AEStronglyMeasurable (↑s) μ) = ↑f}\n[PROOFSTEP]\nrintro f g ⟨s, hs⟩ ⟨t, ht⟩\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nf g : { x // x ∈ Lp E p }\ns : α →ₛ E\nhs : AEEqFun.mk ↑s (_ : AEStronglyMeasurable (↑s) μ) = ↑f\nt : α →ₛ E\nht : AEEqFun.mk ↑t (_ : AEStronglyMeasurable (↑t) μ) = ↑g\n⊢ f + g ∈ {f | ∃ s, AEEqFun.mk ↑s (_ : AEStronglyMeasurable (↑s) μ) = ↑f}\n[PROOFSTEP]\nuse s + t\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nf g : { x // x ∈ Lp E p }\ns : α →ₛ E\nhs : AEEqFun.mk ↑s (_ : AEStronglyMeasurable (↑s) μ) = ↑f\nt : α →ₛ E\nht : AEEqFun.mk ↑t (_ : AEStronglyMeasurable (↑t) μ) = ↑g\n⊢ AEEqFun.mk ↑(s + t) (_ : AEStronglyMeasurable (↑(s + t)) μ) = ↑(f + g)\n[PROOFSTEP]\nsimp only [← hs, ← ht, AEEqFun.mk_add_mk, AddSubgroup.coe_add, AEEqFun.mk_eq_mk, SimpleFunc.coe_add]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\n⊢ ∀ {x : { x // x ∈ Lp E p }},\n    x ∈\n        {\n              toAddSubsemigroup :=\n                { carrier := {f | ∃ s, AEEqFun.mk ↑s (_ : AEStronglyMeasurable (↑s) μ) = ↑f},\n                  add_mem' :=\n                    (_ :\n                      ∀ {f g : { x // x ∈ Lp E p }},\n                        f ∈ {f | ∃ s, AEEqFun.mk ↑s (_ : AEStronglyMeasurable (↑s) μ) = ↑f} →\n                          g ∈ {f | ∃ s, AEEqFun.mk ↑s (_ : AEStronglyMeasurable (↑s) μ) = ↑f} →\n                            f + g ∈ {f | ∃ s, AEEqFun.mk ↑s (_ : AEStronglyMeasurable (↑s) μ) = ↑f}) },\n              zero_mem' := (_ : ∃ s, AEEqFun.mk ↑s (_ : AEStronglyMeasurable (↑s) μ) = ↑0) }.toAddSubsemigroup.carrier →\n      -x ∈\n        {\n              toAddSubsemigroup :=\n                { carrier := {f | ∃ s, AEEqFun.mk ↑s (_ : AEStronglyMeasurable (↑s) μ) = ↑f},\n                  add_mem' :=\n                    (_ :\n                      ∀ {f g : { x // x ∈ Lp E p }},\n                        f ∈ {f | ∃ s, AEEqFun.mk ↑s (_ : AEStronglyMeasurable (↑s) μ) = ↑f} →\n                          g ∈ {f | ∃ s, AEEqFun.mk ↑s (_ : AEStronglyMeasurable (↑s) μ) = ↑f} →\n                            f + g ∈ {f | ∃ s, AEEqFun.mk ↑s (_ : AEStronglyMeasurable (↑s) μ) = ↑f}) },\n              zero_mem' := (_ : ∃ s, AEEqFun.mk ↑s (_ : AEStronglyMeasurable (↑s) μ) = ↑0) }.toAddSubsemigroup.carrier\n[PROOFSTEP]\nrintro f ⟨s, hs⟩\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nf : { x // x ∈ Lp E p }\ns : α →ₛ E\nhs : AEEqFun.mk ↑s (_ : AEStronglyMeasurable (↑s) μ) = ↑f\n⊢ -f ∈\n    {\n          toAddSubsemigroup :=\n            { carrier := {f | ∃ s, AEEqFun.mk ↑s (_ : AEStronglyMeasurable (↑s) μ) = ↑f},\n              add_mem' :=\n                (_ :\n                  ∀ {f g : { x // x ∈ Lp E p }},\n                    f ∈ {f | ∃ s, AEEqFun.mk ↑s (_ : AEStronglyMeasurable (↑s) μ) = ↑f} →\n                      g ∈ {f | ∃ s, AEEqFun.mk ↑s (_ : AEStronglyMeasurable (↑s) μ) = ↑f} →\n                        f + g ∈ {f | ∃ s, AEEqFun.mk ↑s (_ : AEStronglyMeasurable (↑s) μ) = ↑f}) },\n          zero_mem' := (_ : ∃ s, AEEqFun.mk ↑s (_ : AEStronglyMeasurable (↑s) μ) = ↑0) }.toAddSubsemigroup.carrier\n[PROOFSTEP]\nuse-s\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nf : { x // x ∈ Lp E p }\ns : α →ₛ E\nhs : AEEqFun.mk ↑s (_ : AEStronglyMeasurable (↑s) μ) = ↑f\n⊢ AEEqFun.mk ↑(-s) (_ : AEStronglyMeasurable (↑(-s)) μ) = ↑(-f)\n[PROOFSTEP]\nsimp only [← hs, AEEqFun.neg_mk, SimpleFunc.coe_neg, AEEqFun.mk_eq_mk, AddSubgroup.coe_neg]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁵ : MeasurableSpace α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\ninst✝² : NormedRing 𝕜\ninst✝¹ : Module 𝕜 E\ninst✝ : BoundedSMul 𝕜 E\nk : 𝕜\nf : { x // x ∈ simpleFunc E p μ }\n⊢ k • ↑f ∈ simpleFunc E p μ\n[PROOFSTEP]\nrcases f with ⟨f, ⟨s, hs⟩⟩\n[GOAL]\ncase mk.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁵ : MeasurableSpace α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\ninst✝² : NormedRing 𝕜\ninst✝¹ : Module 𝕜 E\ninst✝ : BoundedSMul 𝕜 E\nk : 𝕜\nf : { x // x ∈ Lp E p }\ns : α →ₛ E\nhs : AEEqFun.mk ↑s (_ : AEStronglyMeasurable (↑s) μ) = ↑f\n⊢ k • ↑{ val := f, property := (_ : ∃ s, AEEqFun.mk ↑s (_ : AEStronglyMeasurable (↑s) μ) = ↑f) } ∈ simpleFunc E p μ\n[PROOFSTEP]\nuse k • s\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁵ : MeasurableSpace α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\ninst✝² : NormedRing 𝕜\ninst✝¹ : Module 𝕜 E\ninst✝ : BoundedSMul 𝕜 E\nk : 𝕜\nf : { x // x ∈ Lp E p }\ns : α →ₛ E\nhs : AEEqFun.mk ↑s (_ : AEStronglyMeasurable (↑s) μ) = ↑f\n⊢ AEEqFun.mk ↑(k • s) (_ : AEStronglyMeasurable (↑(k • s)) μ) =\n    ↑(k • ↑{ val := f, property := (_ : ∃ s, AEEqFun.mk ↑s (_ : AEStronglyMeasurable (↑s) μ) = ↑f) })\n[PROOFSTEP]\napply Eq.trans (AEEqFun.smul_mk k s s.aestronglyMeasurable).symm _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁵ : MeasurableSpace α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\ninst✝² : NormedRing 𝕜\ninst✝¹ : Module 𝕜 E\ninst✝ : BoundedSMul 𝕜 E\nk : 𝕜\nf : { x // x ∈ Lp E p }\ns : α →ₛ E\nhs : AEEqFun.mk ↑s (_ : AEStronglyMeasurable (↑s) μ) = ↑f\n⊢ k • AEEqFun.mk ↑s (_ : AEStronglyMeasurable (↑s) μ) =\n    ↑(k • ↑{ val := f, property := (_ : ∃ s, AEEqFun.mk ↑s (_ : AEStronglyMeasurable (↑s) μ) = ↑f) })\n[PROOFSTEP]\nrw [hs]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁵ : MeasurableSpace α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\ninst✝² : NormedRing 𝕜\ninst✝¹ : Module 𝕜 E\ninst✝ : BoundedSMul 𝕜 E\nk : 𝕜\nf : { x // x ∈ Lp E p }\ns : α →ₛ E\nhs : AEEqFun.mk ↑s (_ : AEStronglyMeasurable (↑s) μ) = ↑f\n⊢ k • ↑f = ↑(k • ↑{ val := f, property := (_ : ∃ s, AEEqFun.mk ↑s (_ : AEStronglyMeasurable (↑s) μ) = ↑f) })\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁵ : MeasurableSpace α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\ninst✝² : NormedRing 𝕜\ninst✝¹ : Module 𝕜 E\ninst✝ : BoundedSMul 𝕜 E\nf : { x // x ∈ simpleFunc E p μ }\n⊢ 1 • f = f\n[PROOFSTEP]\next1\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁵ : MeasurableSpace α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\ninst✝² : NormedRing 𝕜\ninst✝¹ : Module 𝕜 E\ninst✝ : BoundedSMul 𝕜 E\nf : { x // x ∈ simpleFunc E p μ }\n⊢ ↑(1 • f) = ↑f\n[PROOFSTEP]\nexact one_smul _ _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁵ : MeasurableSpace α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\ninst✝² : NormedRing 𝕜\ninst✝¹ : Module 𝕜 E\ninst✝ : BoundedSMul 𝕜 E\nx y : 𝕜\nf : { x // x ∈ simpleFunc E p μ }\n⊢ (x * y) • f = x • y • f\n[PROOFSTEP]\next1\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁵ : MeasurableSpace α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\ninst✝² : NormedRing 𝕜\ninst✝¹ : Module 𝕜 E\ninst✝ : BoundedSMul 𝕜 E\nx y : 𝕜\nf : { x // x ∈ simpleFunc E p μ }\n⊢ ↑((x * y) • f) = ↑(x • y • f)\n[PROOFSTEP]\nexact mul_smul _ _ _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁵ : MeasurableSpace α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\ninst✝² : NormedRing 𝕜\ninst✝¹ : Module 𝕜 E\ninst✝ : BoundedSMul 𝕜 E\nx : 𝕜\n⊢ x • 0 = 0\n[PROOFSTEP]\next1\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁵ : MeasurableSpace α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\ninst✝² : NormedRing 𝕜\ninst✝¹ : Module 𝕜 E\ninst✝ : BoundedSMul 𝕜 E\nx : 𝕜\n⊢ ↑(x • 0) = ↑0\n[PROOFSTEP]\nexact smul_zero _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁵ : MeasurableSpace α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\ninst✝² : NormedRing 𝕜\ninst✝¹ : Module 𝕜 E\ninst✝ : BoundedSMul 𝕜 E\nx : 𝕜\nf g : { x // x ∈ simpleFunc E p μ }\n⊢ x • (f + g) = x • f + x • g\n[PROOFSTEP]\next1\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁵ : MeasurableSpace α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\ninst✝² : NormedRing 𝕜\ninst✝¹ : Module 𝕜 E\ninst✝ : BoundedSMul 𝕜 E\nx : 𝕜\nf g : { x // x ∈ simpleFunc E p μ }\n⊢ ↑(x • (f + g)) = ↑(x • f + x • g)\n[PROOFSTEP]\nexact smul_add _ _ _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁵ : MeasurableSpace α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\ninst✝² : NormedRing 𝕜\ninst✝¹ : Module 𝕜 E\ninst✝ : BoundedSMul 𝕜 E\nx y : 𝕜\nf : { x // x ∈ simpleFunc E p μ }\n⊢ (x + y) • f = x • f + y • f\n[PROOFSTEP]\next1\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁵ : MeasurableSpace α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\ninst✝² : NormedRing 𝕜\ninst✝¹ : Module 𝕜 E\ninst✝ : BoundedSMul 𝕜 E\nx y : 𝕜\nf : { x // x ∈ simpleFunc E p μ }\n⊢ ↑((x + y) • f) = ↑(x • f + y • f)\n[PROOFSTEP]\nexact add_smul _ _ _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁵ : MeasurableSpace α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\ninst✝² : NormedRing 𝕜\ninst✝¹ : Module 𝕜 E\ninst✝ : BoundedSMul 𝕜 E\nf : { x // x ∈ simpleFunc E p μ }\n⊢ 0 • f = 0\n[PROOFSTEP]\next1\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁵ : MeasurableSpace α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\ninst✝² : NormedRing 𝕜\ninst✝¹ : Module 𝕜 E\ninst✝ : BoundedSMul 𝕜 E\nf : { x // x ∈ simpleFunc E p μ }\n⊢ ↑(0 • f) = ↑0\n[PROOFSTEP]\nexact zero_smul _ _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nf g : α →ₛ E\nhf : Memℒp (↑f) p\nhg : Memℒp (↑g) p\n⊢ toLp (f - g) (_ : Memℒp (↑f - fun a => ↑g a) p) = toLp f hf - toLp g hg\n[PROOFSTEP]\nsimp only [sub_eq_add_neg, ← toLp_neg, ← toLp_add]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nf : { x // x ∈ simpleFunc E p μ }\n⊢ ↑(toSimpleFunc f) =ᵐ[μ] ↑↑↑f\n[PROOFSTEP]\nconvert (AEEqFun.coeFn_mk (toSimpleFunc f) (toSimpleFunc f).aestronglyMeasurable).symm using 2\n[GOAL]\ncase h.e'_5.h.e'_6\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nf : { x // x ∈ simpleFunc E p μ }\n⊢ ↑↑f = AEEqFun.mk ↑(toSimpleFunc f) (_ : AEStronglyMeasurable (↑(toSimpleFunc f)) μ)\n[PROOFSTEP]\nexact (Classical.choose_spec f.2).symm\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nf : α →ₛ E\nhfi : Memℒp (↑f) p\n⊢ ↑(toSimpleFunc (toLp f hfi)) =ᵐ[μ] ↑f\n[PROOFSTEP]\nrw [← AEEqFun.mk_eq_mk]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nf : α →ₛ E\nhfi : Memℒp (↑f) p\n⊢ AEEqFun.mk ↑(toSimpleFunc (toLp f hfi)) ?m.1694293 = AEEqFun.mk ↑f ?m.1694294\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nf : α →ₛ E\nhfi : Memℒp (↑f) p\n⊢ AEStronglyMeasurable (↑(toSimpleFunc (toLp f hfi))) μ\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nf : α →ₛ E\nhfi : Memℒp (↑f) p\n⊢ AEStronglyMeasurable (↑f) μ\n[PROOFSTEP]\nexact Classical.choose_spec (toLp f hfi).2\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\n⊢ ↑(toSimpleFunc 0) =ᵐ[μ] 0\n[PROOFSTEP]\nfilter_upwards [toSimpleFunc_eq_toFun (0 : Lp.simpleFunc E p μ), Lp.coeFn_zero E 1 μ] with _ h₁ _\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\na✝¹ : α\nh₁ : ↑(toSimpleFunc 0) a✝¹ = ↑↑↑0 a✝¹\na✝ : ↑↑0 a✝¹ = OfNat.ofNat 0 a✝¹\n⊢ ↑(toSimpleFunc 0) a✝¹ = OfNat.ofNat 0 a✝¹\n[PROOFSTEP]\nrwa [h₁]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nf g : { x // x ∈ simpleFunc E p μ }\n⊢ ↑(toSimpleFunc (f + g)) =ᵐ[μ] ↑(toSimpleFunc f) + ↑(toSimpleFunc g)\n[PROOFSTEP]\nfilter_upwards [toSimpleFunc_eq_toFun (f + g), toSimpleFunc_eq_toFun f, toSimpleFunc_eq_toFun g,\n  Lp.coeFn_add (f : Lp E p μ) g] with _\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nf g : { x // x ∈ simpleFunc E p μ }\na✝ : α\n⊢ ↑(toSimpleFunc (f + g)) a✝ = ↑↑↑(f + g) a✝ →\n    ↑(toSimpleFunc f) a✝ = ↑↑↑f a✝ →\n      ↑(toSimpleFunc g) a✝ = ↑↑↑g a✝ →\n        ↑↑(↑f + ↑g) a✝ = (↑↑↑f + ↑↑↑g) a✝ → ↑(toSimpleFunc (f + g)) a✝ = (↑(toSimpleFunc f) + ↑(toSimpleFunc g)) a✝\n[PROOFSTEP]\nsimp only [AddSubgroup.coe_add, Pi.add_apply]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nf g : { x // x ∈ simpleFunc E p μ }\na✝ : α\n⊢ ↑(toSimpleFunc (f + g)) a✝ = ↑(↑↑f + ↑↑g) a✝ →\n    ↑(toSimpleFunc f) a✝ = ↑↑↑f a✝ →\n      ↑(toSimpleFunc g) a✝ = ↑↑↑g a✝ →\n        ↑(↑↑f + ↑↑g) a✝ = ↑↑↑f a✝ + ↑↑↑g a✝ → ↑(toSimpleFunc (f + g)) a✝ = ↑(toSimpleFunc f) a✝ + ↑(toSimpleFunc g) a✝\n[PROOFSTEP]\niterate 4 intro h; rw [h]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nf g : { x // x ∈ simpleFunc E p μ }\na✝ : α\n⊢ ↑(toSimpleFunc (f + g)) a✝ = ↑(↑↑f + ↑↑g) a✝ →\n    ↑(toSimpleFunc f) a✝ = ↑↑↑f a✝ →\n      ↑(toSimpleFunc g) a✝ = ↑↑↑g a✝ →\n        ↑(↑↑f + ↑↑g) a✝ = ↑↑↑f a✝ + ↑↑↑g a✝ → ↑(toSimpleFunc (f + g)) a✝ = ↑(toSimpleFunc f) a✝ + ↑(toSimpleFunc g) a✝\n[PROOFSTEP]\nintro h\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nf g : { x // x ∈ simpleFunc E p μ }\na✝ : α\nh : ↑(toSimpleFunc (f + g)) a✝ = ↑(↑↑f + ↑↑g) a✝\n⊢ ↑(toSimpleFunc f) a✝ = ↑↑↑f a✝ →\n    ↑(toSimpleFunc g) a✝ = ↑↑↑g a✝ →\n      ↑(↑↑f + ↑↑g) a✝ = ↑↑↑f a✝ + ↑↑↑g a✝ → ↑(toSimpleFunc (f + g)) a✝ = ↑(toSimpleFunc f) a✝ + ↑(toSimpleFunc g) a✝\n[PROOFSTEP]\nrw [h]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nf g : { x // x ∈ simpleFunc E p μ }\na✝ : α\nh : ↑(toSimpleFunc (f + g)) a✝ = ↑(↑↑f + ↑↑g) a✝\n⊢ ↑(toSimpleFunc f) a✝ = ↑↑↑f a✝ →\n    ↑(toSimpleFunc g) a✝ = ↑↑↑g a✝ →\n      ↑(↑↑f + ↑↑g) a✝ = ↑↑↑f a✝ + ↑↑↑g a✝ → ↑(↑↑f + ↑↑g) a✝ = ↑(toSimpleFunc f) a✝ + ↑(toSimpleFunc g) a✝\n[PROOFSTEP]\nintro h\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nf g : { x // x ∈ simpleFunc E p μ }\na✝ : α\nh✝ : ↑(toSimpleFunc (f + g)) a✝ = ↑(↑↑f + ↑↑g) a✝\nh : ↑(toSimpleFunc f) a✝ = ↑↑↑f a✝\n⊢ ↑(toSimpleFunc g) a✝ = ↑↑↑g a✝ →\n    ↑(↑↑f + ↑↑g) a✝ = ↑↑↑f a✝ + ↑↑↑g a✝ → ↑(↑↑f + ↑↑g) a✝ = ↑(toSimpleFunc f) a✝ + ↑(toSimpleFunc g) a✝\n[PROOFSTEP]\nrw [h]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nf g : { x // x ∈ simpleFunc E p μ }\na✝ : α\nh✝ : ↑(toSimpleFunc (f + g)) a✝ = ↑(↑↑f + ↑↑g) a✝\nh : ↑(toSimpleFunc f) a✝ = ↑↑↑f a✝\n⊢ ↑(toSimpleFunc g) a✝ = ↑↑↑g a✝ →\n    ↑(↑↑f + ↑↑g) a✝ = ↑↑↑f a✝ + ↑↑↑g a✝ → ↑(↑↑f + ↑↑g) a✝ = ↑↑↑f a✝ + ↑(toSimpleFunc g) a✝\n[PROOFSTEP]\nintro h\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nf g : { x // x ∈ simpleFunc E p μ }\na✝ : α\nh✝¹ : ↑(toSimpleFunc (f + g)) a✝ = ↑(↑↑f + ↑↑g) a✝\nh✝ : ↑(toSimpleFunc f) a✝ = ↑↑↑f a✝\nh : ↑(toSimpleFunc g) a✝ = ↑↑↑g a✝\n⊢ ↑(↑↑f + ↑↑g) a✝ = ↑↑↑f a✝ + ↑↑↑g a✝ → ↑(↑↑f + ↑↑g) a✝ = ↑↑↑f a✝ + ↑(toSimpleFunc g) a✝\n[PROOFSTEP]\nrw [h]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nf g : { x // x ∈ simpleFunc E p μ }\na✝ : α\nh✝¹ : ↑(toSimpleFunc (f + g)) a✝ = ↑(↑↑f + ↑↑g) a✝\nh✝ : ↑(toSimpleFunc f) a✝ = ↑↑↑f a✝\nh : ↑(toSimpleFunc g) a✝ = ↑↑↑g a✝\n⊢ ↑(↑↑f + ↑↑g) a✝ = ↑↑↑f a✝ + ↑↑↑g a✝ → ↑(↑↑f + ↑↑g) a✝ = ↑↑↑f a✝ + ↑↑↑g a✝\n[PROOFSTEP]\nintro h\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nf g : { x // x ∈ simpleFunc E p μ }\na✝ : α\nh✝² : ↑(toSimpleFunc (f + g)) a✝ = ↑(↑↑f + ↑↑g) a✝\nh✝¹ : ↑(toSimpleFunc f) a✝ = ↑↑↑f a✝\nh✝ : ↑(toSimpleFunc g) a✝ = ↑↑↑g a✝\nh : ↑(↑↑f + ↑↑g) a✝ = ↑↑↑f a✝ + ↑↑↑g a✝\n⊢ ↑(↑↑f + ↑↑g) a✝ = ↑↑↑f a✝ + ↑↑↑g a✝\n[PROOFSTEP]\nrw [h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nf : { x // x ∈ simpleFunc E p μ }\n⊢ ↑(toSimpleFunc (-f)) =ᵐ[μ] -↑(toSimpleFunc f)\n[PROOFSTEP]\nfilter_upwards [toSimpleFunc_eq_toFun (-f), toSimpleFunc_eq_toFun f, Lp.coeFn_neg (f : Lp E p μ)] with _\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nf : { x // x ∈ simpleFunc E p μ }\na✝ : α\n⊢ ↑(toSimpleFunc (-f)) a✝ = ↑↑↑(-f) a✝ →\n    ↑(toSimpleFunc f) a✝ = ↑↑↑f a✝ → ↑↑(-↑f) a✝ = (-↑↑↑f) a✝ → ↑(toSimpleFunc (-f)) a✝ = (-↑(toSimpleFunc f)) a✝\n[PROOFSTEP]\nsimp only [Pi.neg_apply, AddSubgroup.coe_neg]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nf : { x // x ∈ simpleFunc E p μ }\na✝ : α\n⊢ ↑(toSimpleFunc (-f)) a✝ = ↑(-↑↑f) a✝ →\n    ↑(toSimpleFunc f) a✝ = ↑↑↑f a✝ → ↑(-↑↑f) a✝ = -↑↑↑f a✝ → ↑(toSimpleFunc (-f)) a✝ = -↑(toSimpleFunc f) a✝\n[PROOFSTEP]\nrepeat intro h; rw [h]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nf : { x // x ∈ simpleFunc E p μ }\na✝ : α\n⊢ ↑(toSimpleFunc (-f)) a✝ = ↑(-↑↑f) a✝ →\n    ↑(toSimpleFunc f) a✝ = ↑↑↑f a✝ → ↑(-↑↑f) a✝ = -↑↑↑f a✝ → ↑(toSimpleFunc (-f)) a✝ = -↑(toSimpleFunc f) a✝\n[PROOFSTEP]\nintro h\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nf : { x // x ∈ simpleFunc E p μ }\na✝ : α\nh : ↑(toSimpleFunc (-f)) a✝ = ↑(-↑↑f) a✝\n⊢ ↑(toSimpleFunc f) a✝ = ↑↑↑f a✝ → ↑(-↑↑f) a✝ = -↑↑↑f a✝ → ↑(toSimpleFunc (-f)) a✝ = -↑(toSimpleFunc f) a✝\n[PROOFSTEP]\nrw [h]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nf : { x // x ∈ simpleFunc E p μ }\na✝ : α\nh : ↑(toSimpleFunc (-f)) a✝ = ↑(-↑↑f) a✝\n⊢ ↑(toSimpleFunc f) a✝ = ↑↑↑f a✝ → ↑(-↑↑f) a✝ = -↑↑↑f a✝ → ↑(-↑↑f) a✝ = -↑(toSimpleFunc f) a✝\n[PROOFSTEP]\nintro h\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nf : { x // x ∈ simpleFunc E p μ }\na✝ : α\nh✝ : ↑(toSimpleFunc (-f)) a✝ = ↑(-↑↑f) a✝\nh : ↑(toSimpleFunc f) a✝ = ↑↑↑f a✝\n⊢ ↑(-↑↑f) a✝ = -↑↑↑f a✝ → ↑(-↑↑f) a✝ = -↑(toSimpleFunc f) a✝\n[PROOFSTEP]\nrw [h]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nf : { x // x ∈ simpleFunc E p μ }\na✝ : α\nh✝ : ↑(toSimpleFunc (-f)) a✝ = ↑(-↑↑f) a✝\nh : ↑(toSimpleFunc f) a✝ = ↑↑↑f a✝\n⊢ ↑(-↑↑f) a✝ = -↑↑↑f a✝ → ↑(-↑↑f) a✝ = -↑↑↑f a✝\n[PROOFSTEP]\nintro h\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nf : { x // x ∈ simpleFunc E p μ }\na✝ : α\nh✝¹ : ↑(toSimpleFunc (-f)) a✝ = ↑(-↑↑f) a✝\nh✝ : ↑(toSimpleFunc f) a✝ = ↑↑↑f a✝\nh : ↑(-↑↑f) a✝ = -↑↑↑f a✝\n⊢ ↑(-↑↑f) a✝ = -↑↑↑f a✝\n[PROOFSTEP]\nrw [h]\n[GOAL]\n\n[PROOFSTEP]\nintro h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nf g : { x // x ∈ simpleFunc E p μ }\n⊢ ↑(toSimpleFunc (f - g)) =ᵐ[μ] ↑(toSimpleFunc f) - ↑(toSimpleFunc g)\n[PROOFSTEP]\nfilter_upwards [toSimpleFunc_eq_toFun (f - g), toSimpleFunc_eq_toFun f, toSimpleFunc_eq_toFun g,\n  Lp.coeFn_sub (f : Lp E p μ) g] with _\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nf g : { x // x ∈ simpleFunc E p μ }\na✝ : α\n⊢ ↑(toSimpleFunc (f - g)) a✝ = ↑↑↑(f - g) a✝ →\n    ↑(toSimpleFunc f) a✝ = ↑↑↑f a✝ →\n      ↑(toSimpleFunc g) a✝ = ↑↑↑g a✝ →\n        ↑↑(↑f - ↑g) a✝ = (↑↑↑f - ↑↑↑g) a✝ → ↑(toSimpleFunc (f - g)) a✝ = (↑(toSimpleFunc f) - ↑(toSimpleFunc g)) a✝\n[PROOFSTEP]\nsimp only [AddSubgroup.coe_sub, Pi.sub_apply]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nf g : { x // x ∈ simpleFunc E p μ }\na✝ : α\n⊢ ↑(toSimpleFunc (f - g)) a✝ = ↑(↑↑f - ↑↑g) a✝ →\n    ↑(toSimpleFunc f) a✝ = ↑↑↑f a✝ →\n      ↑(toSimpleFunc g) a✝ = ↑↑↑g a✝ →\n        ↑(↑↑f - ↑↑g) a✝ = ↑↑↑f a✝ - ↑↑↑g a✝ → ↑(toSimpleFunc (f - g)) a✝ = ↑(toSimpleFunc f) a✝ - ↑(toSimpleFunc g) a✝\n[PROOFSTEP]\nrepeat' intro h; rw [h]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nf g : { x // x ∈ simpleFunc E p μ }\na✝ : α\n⊢ ↑(toSimpleFunc (f - g)) a✝ = ↑(↑↑f - ↑↑g) a✝ →\n    ↑(toSimpleFunc f) a✝ = ↑↑↑f a✝ →\n      ↑(toSimpleFunc g) a✝ = ↑↑↑g a✝ →\n        ↑(↑↑f - ↑↑g) a✝ = ↑↑↑f a✝ - ↑↑↑g a✝ → ↑(toSimpleFunc (f - g)) a✝ = ↑(toSimpleFunc f) a✝ - ↑(toSimpleFunc g) a✝\n[PROOFSTEP]\nintro h\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nf g : { x // x ∈ simpleFunc E p μ }\na✝ : α\nh : ↑(toSimpleFunc (f - g)) a✝ = ↑(↑↑f - ↑↑g) a✝\n⊢ ↑(toSimpleFunc f) a✝ = ↑↑↑f a✝ →\n    ↑(toSimpleFunc g) a✝ = ↑↑↑g a✝ →\n      ↑(↑↑f - ↑↑g) a✝ = ↑↑↑f a✝ - ↑↑↑g a✝ → ↑(toSimpleFunc (f - g)) a✝ = ↑(toSimpleFunc f) a✝ - ↑(toSimpleFunc g) a✝\n[PROOFSTEP]\nrw [h]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nf g : { x // x ∈ simpleFunc E p μ }\na✝ : α\nh : ↑(toSimpleFunc (f - g)) a✝ = ↑(↑↑f - ↑↑g) a✝\n⊢ ↑(toSimpleFunc f) a✝ = ↑↑↑f a✝ →\n    ↑(toSimpleFunc g) a✝ = ↑↑↑g a✝ →\n      ↑(↑↑f - ↑↑g) a✝ = ↑↑↑f a✝ - ↑↑↑g a✝ → ↑(↑↑f - ↑↑g) a✝ = ↑(toSimpleFunc f) a✝ - ↑(toSimpleFunc g) a✝\n[PROOFSTEP]\nintro h\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nf g : { x // x ∈ simpleFunc E p μ }\na✝ : α\nh✝ : ↑(toSimpleFunc (f - g)) a✝ = ↑(↑↑f - ↑↑g) a✝\nh : ↑(toSimpleFunc f) a✝ = ↑↑↑f a✝\n⊢ ↑(toSimpleFunc g) a✝ = ↑↑↑g a✝ →\n    ↑(↑↑f - ↑↑g) a✝ = ↑↑↑f a✝ - ↑↑↑g a✝ → ↑(↑↑f - ↑↑g) a✝ = ↑(toSimpleFunc f) a✝ - ↑(toSimpleFunc g) a✝\n[PROOFSTEP]\nrw [h]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nf g : { x // x ∈ simpleFunc E p μ }\na✝ : α\nh✝ : ↑(toSimpleFunc (f - g)) a✝ = ↑(↑↑f - ↑↑g) a✝\nh : ↑(toSimpleFunc f) a✝ = ↑↑↑f a✝\n⊢ ↑(toSimpleFunc g) a✝ = ↑↑↑g a✝ →\n    ↑(↑↑f - ↑↑g) a✝ = ↑↑↑f a✝ - ↑↑↑g a✝ → ↑(↑↑f - ↑↑g) a✝ = ↑↑↑f a✝ - ↑(toSimpleFunc g) a✝\n[PROOFSTEP]\nintro h\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nf g : { x // x ∈ simpleFunc E p μ }\na✝ : α\nh✝¹ : ↑(toSimpleFunc (f - g)) a✝ = ↑(↑↑f - ↑↑g) a✝\nh✝ : ↑(toSimpleFunc f) a✝ = ↑↑↑f a✝\nh : ↑(toSimpleFunc g) a✝ = ↑↑↑g a✝\n⊢ ↑(↑↑f - ↑↑g) a✝ = ↑↑↑f a✝ - ↑↑↑g a✝ → ↑(↑↑f - ↑↑g) a✝ = ↑↑↑f a✝ - ↑(toSimpleFunc g) a✝\n[PROOFSTEP]\nrw [h]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nf g : { x // x ∈ simpleFunc E p μ }\na✝ : α\nh✝¹ : ↑(toSimpleFunc (f - g)) a✝ = ↑(↑↑f - ↑↑g) a✝\nh✝ : ↑(toSimpleFunc f) a✝ = ↑↑↑f a✝\nh : ↑(toSimpleFunc g) a✝ = ↑↑↑g a✝\n⊢ ↑(↑↑f - ↑↑g) a✝ = ↑↑↑f a✝ - ↑↑↑g a✝ → ↑(↑↑f - ↑↑g) a✝ = ↑↑↑f a✝ - ↑↑↑g a✝\n[PROOFSTEP]\nintro h\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nf g : { x // x ∈ simpleFunc E p μ }\na✝ : α\nh✝² : ↑(toSimpleFunc (f - g)) a✝ = ↑(↑↑f - ↑↑g) a✝\nh✝¹ : ↑(toSimpleFunc f) a✝ = ↑↑↑f a✝\nh✝ : ↑(toSimpleFunc g) a✝ = ↑↑↑g a✝\nh : ↑(↑↑f - ↑↑g) a✝ = ↑↑↑f a✝ - ↑↑↑g a✝\n⊢ ↑(↑↑f - ↑↑g) a✝ = ↑↑↑f a✝ - ↑↑↑g a✝\n[PROOFSTEP]\nrw [h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁵ : MeasurableSpace α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\ninst✝² : NormedRing 𝕜\ninst✝¹ : Module 𝕜 E\ninst✝ : BoundedSMul 𝕜 E\nk : 𝕜\nf : { x // x ∈ simpleFunc E p μ }\n⊢ ↑(toSimpleFunc (k • f)) =ᵐ[μ] k • ↑(toSimpleFunc f)\n[PROOFSTEP]\nfilter_upwards [toSimpleFunc_eq_toFun (k • f), toSimpleFunc_eq_toFun f, Lp.coeFn_smul k (f : Lp E p μ)] with _\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁵ : MeasurableSpace α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\ninst✝² : NormedRing 𝕜\ninst✝¹ : Module 𝕜 E\ninst✝ : BoundedSMul 𝕜 E\nk : 𝕜\nf : { x // x ∈ simpleFunc E p μ }\na✝ : α\n⊢ ↑(toSimpleFunc (k • f)) a✝ = ↑↑↑(k • f) a✝ →\n    ↑(toSimpleFunc f) a✝ = ↑↑↑f a✝ →\n      ↑↑(k • ↑f) a✝ = (k • ↑↑↑f) a✝ → ↑(toSimpleFunc (k • f)) a✝ = (k • ↑(toSimpleFunc f)) a✝\n[PROOFSTEP]\nsimp only [Pi.smul_apply, coe_smul]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁵ : MeasurableSpace α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\ninst✝² : NormedRing 𝕜\ninst✝¹ : Module 𝕜 E\ninst✝ : BoundedSMul 𝕜 E\nk : 𝕜\nf : { x // x ∈ simpleFunc E p μ }\na✝ : α\n⊢ ↑(toSimpleFunc (k • f)) a✝ = ↑↑(k • ↑f) a✝ →\n    ↑(toSimpleFunc f) a✝ = ↑↑↑f a✝ → ↑↑(k • ↑f) a✝ = k • ↑↑↑f a✝ → ↑(toSimpleFunc (k • f)) a✝ = k • ↑(toSimpleFunc f) a✝\n[PROOFSTEP]\nrepeat intro h; rw [h]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁵ : MeasurableSpace α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\ninst✝² : NormedRing 𝕜\ninst✝¹ : Module 𝕜 E\ninst✝ : BoundedSMul 𝕜 E\nk : 𝕜\nf : { x // x ∈ simpleFunc E p μ }\na✝ : α\n⊢ ↑(toSimpleFunc (k • f)) a✝ = ↑↑(k • ↑f) a✝ →\n    ↑(toSimpleFunc f) a✝ = ↑↑↑f a✝ → ↑↑(k • ↑f) a✝ = k • ↑↑↑f a✝ → ↑(toSimpleFunc (k • f)) a✝ = k • ↑(toSimpleFunc f) a✝\n[PROOFSTEP]\nintro h\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁵ : MeasurableSpace α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\ninst✝² : NormedRing 𝕜\ninst✝¹ : Module 𝕜 E\ninst✝ : BoundedSMul 𝕜 E\nk : 𝕜\nf : { x // x ∈ simpleFunc E p μ }\na✝ : α\nh : ↑(toSimpleFunc (k • f)) a✝ = ↑↑(k • ↑f) a✝\n⊢ ↑(toSimpleFunc f) a✝ = ↑↑↑f a✝ → ↑↑(k • ↑f) a✝ = k • ↑↑↑f a✝ → ↑(toSimpleFunc (k • f)) a✝ = k • ↑(toSimpleFunc f) a✝\n[PROOFSTEP]\nrw [h]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁵ : MeasurableSpace α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\ninst✝² : NormedRing 𝕜\ninst✝¹ : Module 𝕜 E\ninst✝ : BoundedSMul 𝕜 E\nk : 𝕜\nf : { x // x ∈ simpleFunc E p μ }\na✝ : α\nh : ↑(toSimpleFunc (k • f)) a✝ = ↑↑(k • ↑f) a✝\n⊢ ↑(toSimpleFunc f) a✝ = ↑↑↑f a✝ → ↑↑(k • ↑f) a✝ = k • ↑↑↑f a✝ → ↑↑(k • ↑f) a✝ = k • ↑(toSimpleFunc f) a✝\n[PROOFSTEP]\nintro h\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁵ : MeasurableSpace α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\ninst✝² : NormedRing 𝕜\ninst✝¹ : Module 𝕜 E\ninst✝ : BoundedSMul 𝕜 E\nk : 𝕜\nf : { x // x ∈ simpleFunc E p μ }\na✝ : α\nh✝ : ↑(toSimpleFunc (k • f)) a✝ = ↑↑(k • ↑f) a✝\nh : ↑(toSimpleFunc f) a✝ = ↑↑↑f a✝\n⊢ ↑↑(k • ↑f) a✝ = k • ↑↑↑f a✝ → ↑↑(k • ↑f) a✝ = k • ↑(toSimpleFunc f) a✝\n[PROOFSTEP]\nrw [h]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁵ : MeasurableSpace α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\ninst✝² : NormedRing 𝕜\ninst✝¹ : Module 𝕜 E\ninst✝ : BoundedSMul 𝕜 E\nk : 𝕜\nf : { x // x ∈ simpleFunc E p μ }\na✝ : α\nh✝ : ↑(toSimpleFunc (k • f)) a✝ = ↑↑(k • ↑f) a✝\nh : ↑(toSimpleFunc f) a✝ = ↑↑↑f a✝\n⊢ ↑↑(k • ↑f) a✝ = k • ↑↑↑f a✝ → ↑↑(k • ↑f) a✝ = k • ↑↑↑f a✝\n[PROOFSTEP]\nintro h\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁵ : MeasurableSpace α\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\ninst✝² : NormedRing 𝕜\ninst✝¹ : Module 𝕜 E\ninst✝ : BoundedSMul 𝕜 E\nk : 𝕜\nf : { x // x ∈ simpleFunc E p μ }\na✝ : α\nh✝¹ : ↑(toSimpleFunc (k • f)) a✝ = ↑↑(k • ↑f) a✝\nh✝ : ↑(toSimpleFunc f) a✝ = ↑↑↑f a✝\nh : ↑↑(k • ↑f) a✝ = k • ↑↑↑f a✝\n⊢ ↑↑(k • ↑f) a✝ = k • ↑↑↑f a✝\n[PROOFSTEP]\nrw [h]\n[GOAL]\n\n[PROOFSTEP]\nintro h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝⁶ : MeasurableSpace α\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\ninst✝³ : NormedRing 𝕜\ninst✝² : Module 𝕜 E\ninst✝¹ : BoundedSMul 𝕜 E\ninst✝ : Fact (1 ≤ p)\nf : { x // x ∈ simpleFunc E p μ }\n⊢ ‖f‖ = ENNReal.toReal (snorm (↑(toSimpleFunc f)) p μ)\n[PROOFSTEP]\nsimpa [toLp_toSimpleFunc] using norm_toLp (toSimpleFunc f) (simpleFunc.memℒp f)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nhp_pos : p ≠ 0\nhp_ne_top : p ≠ ⊤\nP : { x // x ∈ simpleFunc E p μ } → Prop\nh_ind : ∀ (c : E) {s : Set α} (hs : MeasurableSet s) (hμs : ↑↑μ s < ⊤), P (indicatorConst p hs (_ : ↑↑μ s ≠ ⊤) c)\nh_add :\n  ∀ ⦃f g : α →ₛ E⦄ (hf : Memℒp (↑f) p) (hg : Memℒp (↑g) p),\n    Disjoint (support ↑f) (support ↑g) → P (toLp f hf) → P (toLp g hg) → P (toLp f hf + toLp g hg)\nf : { x // x ∈ simpleFunc E p μ }\n⊢ P f\n[PROOFSTEP]\nsuffices ∀ f : α →ₛ E, ∀ hf : Memℒp f p μ, P (toLp f hf)\n  by\n  rw [← toLp_toSimpleFunc f]\n  apply this\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nhp_pos : p ≠ 0\nhp_ne_top : p ≠ ⊤\nP : { x // x ∈ simpleFunc E p μ } → Prop\nh_ind : ∀ (c : E) {s : Set α} (hs : MeasurableSet s) (hμs : ↑↑μ s < ⊤), P (indicatorConst p hs (_ : ↑↑μ s ≠ ⊤) c)\nh_add :\n  ∀ ⦃f g : α →ₛ E⦄ (hf : Memℒp (↑f) p) (hg : Memℒp (↑g) p),\n    Disjoint (support ↑f) (support ↑g) → P (toLp f hf) → P (toLp g hg) → P (toLp f hf + toLp g hg)\nf : { x // x ∈ simpleFunc E p μ }\nthis : ∀ (f : α →ₛ E) (hf : Memℒp (↑f) p), P (toLp f hf)\n⊢ P f\n[PROOFSTEP]\nrw [← toLp_toSimpleFunc f]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nhp_pos : p ≠ 0\nhp_ne_top : p ≠ ⊤\nP : { x // x ∈ simpleFunc E p μ } → Prop\nh_ind : ∀ (c : E) {s : Set α} (hs : MeasurableSet s) (hμs : ↑↑μ s < ⊤), P (indicatorConst p hs (_ : ↑↑μ s ≠ ⊤) c)\nh_add :\n  ∀ ⦃f g : α →ₛ E⦄ (hf : Memℒp (↑f) p) (hg : Memℒp (↑g) p),\n    Disjoint (support ↑f) (support ↑g) → P (toLp f hf) → P (toLp g hg) → P (toLp f hf + toLp g hg)\nf : { x // x ∈ simpleFunc E p μ }\nthis : ∀ (f : α →ₛ E) (hf : Memℒp (↑f) p), P (toLp f hf)\n⊢ P (toLp (toSimpleFunc f) (_ : Memℒp (↑(toSimpleFunc f)) p))\n[PROOFSTEP]\napply this\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nhp_pos : p ≠ 0\nhp_ne_top : p ≠ ⊤\nP : { x // x ∈ simpleFunc E p μ } → Prop\nh_ind : ∀ (c : E) {s : Set α} (hs : MeasurableSet s) (hμs : ↑↑μ s < ⊤), P (indicatorConst p hs (_ : ↑↑μ s ≠ ⊤) c)\nh_add :\n  ∀ ⦃f g : α →ₛ E⦄ (hf : Memℒp (↑f) p) (hg : Memℒp (↑g) p),\n    Disjoint (support ↑f) (support ↑g) → P (toLp f hf) → P (toLp g hg) → P (toLp f hf + toLp g hg)\nf : { x // x ∈ simpleFunc E p μ }\n⊢ ∀ (f : α →ₛ E) (hf : Memℒp (↑f) p), P (toLp f hf)\n[PROOFSTEP]\nclear f\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nhp_pos : p ≠ 0\nhp_ne_top : p ≠ ⊤\nP : { x // x ∈ simpleFunc E p μ } → Prop\nh_ind : ∀ (c : E) {s : Set α} (hs : MeasurableSet s) (hμs : ↑↑μ s < ⊤), P (indicatorConst p hs (_ : ↑↑μ s ≠ ⊤) c)\nh_add :\n  ∀ ⦃f g : α →ₛ E⦄ (hf : Memℒp (↑f) p) (hg : Memℒp (↑g) p),\n    Disjoint (support ↑f) (support ↑g) → P (toLp f hf) → P (toLp g hg) → P (toLp f hf + toLp g hg)\n⊢ ∀ (f : α →ₛ E) (hf : Memℒp (↑f) p), P (toLp f hf)\n[PROOFSTEP]\napply SimpleFunc.induction\n[GOAL]\ncase h_ind\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nhp_pos : p ≠ 0\nhp_ne_top : p ≠ ⊤\nP : { x // x ∈ simpleFunc E p μ } → Prop\nh_ind : ∀ (c : E) {s : Set α} (hs : MeasurableSet s) (hμs : ↑↑μ s < ⊤), P (indicatorConst p hs (_ : ↑↑μ s ≠ ⊤) c)\nh_add :\n  ∀ ⦃f g : α →ₛ E⦄ (hf : Memℒp (↑f) p) (hg : Memℒp (↑g) p),\n    Disjoint (support ↑f) (support ↑g) → P (toLp f hf) → P (toLp g hg) → P (toLp f hf + toLp g hg)\n⊢ ∀ (c : E) {s : Set α} (hs : MeasurableSet s)\n    (hf : Memℒp (↑(SimpleFunc.piecewise s hs (SimpleFunc.const α c) (SimpleFunc.const α 0))) p),\n    P (toLp (SimpleFunc.piecewise s hs (SimpleFunc.const α c) (SimpleFunc.const α 0)) hf)\n[PROOFSTEP]\nintro c s hs hf\n[GOAL]\ncase h_ind\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nhp_pos : p ≠ 0\nhp_ne_top : p ≠ ⊤\nP : { x // x ∈ simpleFunc E p μ } → Prop\nh_ind : ∀ (c : E) {s : Set α} (hs : MeasurableSet s) (hμs : ↑↑μ s < ⊤), P (indicatorConst p hs (_ : ↑↑μ s ≠ ⊤) c)\nh_add :\n  ∀ ⦃f g : α →ₛ E⦄ (hf : Memℒp (↑f) p) (hg : Memℒp (↑g) p),\n    Disjoint (support ↑f) (support ↑g) → P (toLp f hf) → P (toLp g hg) → P (toLp f hf + toLp g hg)\nc : E\ns : Set α\nhs : MeasurableSet s\nhf : Memℒp (↑(SimpleFunc.piecewise s hs (SimpleFunc.const α c) (SimpleFunc.const α 0))) p\n⊢ P (toLp (SimpleFunc.piecewise s hs (SimpleFunc.const α c) (SimpleFunc.const α 0)) hf)\n[PROOFSTEP]\nby_cases hc : c = 0\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nhp_pos : p ≠ 0\nhp_ne_top : p ≠ ⊤\nP : { x // x ∈ simpleFunc E p μ } → Prop\nh_ind : ∀ (c : E) {s : Set α} (hs : MeasurableSet s) (hμs : ↑↑μ s < ⊤), P (indicatorConst p hs (_ : ↑↑μ s ≠ ⊤) c)\nh_add :\n  ∀ ⦃f g : α →ₛ E⦄ (hf : Memℒp (↑f) p) (hg : Memℒp (↑g) p),\n    Disjoint (support ↑f) (support ↑g) → P (toLp f hf) → P (toLp g hg) → P (toLp f hf + toLp g hg)\nc : E\ns : Set α\nhs : MeasurableSet s\nhf : Memℒp (↑(SimpleFunc.piecewise s hs (SimpleFunc.const α c) (SimpleFunc.const α 0))) p\nhc : c = 0\n⊢ P (toLp (SimpleFunc.piecewise s hs (SimpleFunc.const α c) (SimpleFunc.const α 0)) hf)\n[PROOFSTEP]\nconvert h_ind 0 MeasurableSet.empty (by simp) using 1\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nhp_pos : p ≠ 0\nhp_ne_top : p ≠ ⊤\nP : { x // x ∈ simpleFunc E p μ } → Prop\nh_ind : ∀ (c : E) {s : Set α} (hs : MeasurableSet s) (hμs : ↑↑μ s < ⊤), P (indicatorConst p hs (_ : ↑↑μ s ≠ ⊤) c)\nh_add :\n  ∀ ⦃f g : α →ₛ E⦄ (hf : Memℒp (↑f) p) (hg : Memℒp (↑g) p),\n    Disjoint (support ↑f) (support ↑g) → P (toLp f hf) → P (toLp g hg) → P (toLp f hf + toLp g hg)\nc : E\ns : Set α\nhs : MeasurableSet s\nhf : Memℒp (↑(SimpleFunc.piecewise s hs (SimpleFunc.const α c) (SimpleFunc.const α 0))) p\nhc : c = 0\n⊢ ↑↑μ ∅ < ⊤\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.e'_1\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nhp_pos : p ≠ 0\nhp_ne_top : p ≠ ⊤\nP : { x // x ∈ simpleFunc E p μ } → Prop\nh_ind : ∀ (c : E) {s : Set α} (hs : MeasurableSet s) (hμs : ↑↑μ s < ⊤), P (indicatorConst p hs (_ : ↑↑μ s ≠ ⊤) c)\nh_add :\n  ∀ ⦃f g : α →ₛ E⦄ (hf : Memℒp (↑f) p) (hg : Memℒp (↑g) p),\n    Disjoint (support ↑f) (support ↑g) → P (toLp f hf) → P (toLp g hg) → P (toLp f hf + toLp g hg)\nc : E\ns : Set α\nhs : MeasurableSet s\nhf : Memℒp (↑(SimpleFunc.piecewise s hs (SimpleFunc.const α c) (SimpleFunc.const α 0))) p\nhc : c = 0\n⊢ toLp (SimpleFunc.piecewise s hs (SimpleFunc.const α c) (SimpleFunc.const α 0)) hf =\n    indicatorConst p (_ : MeasurableSet ∅) (_ : ↑↑μ ∅ ≠ ⊤) 0\n[PROOFSTEP]\next1\n[GOAL]\ncase h.e'_1.a\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nhp_pos : p ≠ 0\nhp_ne_top : p ≠ ⊤\nP : { x // x ∈ simpleFunc E p μ } → Prop\nh_ind : ∀ (c : E) {s : Set α} (hs : MeasurableSet s) (hμs : ↑↑μ s < ⊤), P (indicatorConst p hs (_ : ↑↑μ s ≠ ⊤) c)\nh_add :\n  ∀ ⦃f g : α →ₛ E⦄ (hf : Memℒp (↑f) p) (hg : Memℒp (↑g) p),\n    Disjoint (support ↑f) (support ↑g) → P (toLp f hf) → P (toLp g hg) → P (toLp f hf + toLp g hg)\nc : E\ns : Set α\nhs : MeasurableSet s\nhf : Memℒp (↑(SimpleFunc.piecewise s hs (SimpleFunc.const α c) (SimpleFunc.const α 0))) p\nhc : c = 0\n⊢ ↑(toLp (SimpleFunc.piecewise s hs (SimpleFunc.const α c) (SimpleFunc.const α 0)) hf) =\n    ↑(indicatorConst p (_ : MeasurableSet ∅) (_ : ↑↑μ ∅ ≠ ⊤) 0)\n[PROOFSTEP]\nsimp [hc]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nhp_pos : p ≠ 0\nhp_ne_top : p ≠ ⊤\nP : { x // x ∈ simpleFunc E p μ } → Prop\nh_ind : ∀ (c : E) {s : Set α} (hs : MeasurableSet s) (hμs : ↑↑μ s < ⊤), P (indicatorConst p hs (_ : ↑↑μ s ≠ ⊤) c)\nh_add :\n  ∀ ⦃f g : α →ₛ E⦄ (hf : Memℒp (↑f) p) (hg : Memℒp (↑g) p),\n    Disjoint (support ↑f) (support ↑g) → P (toLp f hf) → P (toLp g hg) → P (toLp f hf + toLp g hg)\nc : E\ns : Set α\nhs : MeasurableSet s\nhf : Memℒp (↑(SimpleFunc.piecewise s hs (SimpleFunc.const α c) (SimpleFunc.const α 0))) p\nhc : ¬c = 0\n⊢ P (toLp (SimpleFunc.piecewise s hs (SimpleFunc.const α c) (SimpleFunc.const α 0)) hf)\n[PROOFSTEP]\nexact h_ind c hs (SimpleFunc.measure_lt_top_of_memℒp_indicator hp_pos hp_ne_top hc hs hf)\n[GOAL]\ncase h_add\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nhp_pos : p ≠ 0\nhp_ne_top : p ≠ ⊤\nP : { x // x ∈ simpleFunc E p μ } → Prop\nh_ind : ∀ (c : E) {s : Set α} (hs : MeasurableSet s) (hμs : ↑↑μ s < ⊤), P (indicatorConst p hs (_ : ↑↑μ s ≠ ⊤) c)\nh_add :\n  ∀ ⦃f g : α →ₛ E⦄ (hf : Memℒp (↑f) p) (hg : Memℒp (↑g) p),\n    Disjoint (support ↑f) (support ↑g) → P (toLp f hf) → P (toLp g hg) → P (toLp f hf + toLp g hg)\n⊢ ∀ ⦃f g : α →ₛ E⦄,\n    Disjoint (support ↑f) (support ↑g) →\n      (∀ (hf : Memℒp (↑f) p), P (toLp f hf)) →\n        (∀ (hf : Memℒp (↑g) p), P (toLp g hf)) → ∀ (hf : Memℒp (↑(f + g)) p), P (toLp (f + g) hf)\n[PROOFSTEP]\nintro f g hfg hf hg hfg'\n[GOAL]\ncase h_add\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nhp_pos : p ≠ 0\nhp_ne_top : p ≠ ⊤\nP : { x // x ∈ simpleFunc E p μ } → Prop\nh_ind : ∀ (c : E) {s : Set α} (hs : MeasurableSet s) (hμs : ↑↑μ s < ⊤), P (indicatorConst p hs (_ : ↑↑μ s ≠ ⊤) c)\nh_add :\n  ∀ ⦃f g : α →ₛ E⦄ (hf : Memℒp (↑f) p) (hg : Memℒp (↑g) p),\n    Disjoint (support ↑f) (support ↑g) → P (toLp f hf) → P (toLp g hg) → P (toLp f hf + toLp g hg)\nf g : α →ₛ E\nhfg : Disjoint (support ↑f) (support ↑g)\nhf : ∀ (hf : Memℒp (↑f) p), P (toLp f hf)\nhg : ∀ (hf : Memℒp (↑g) p), P (toLp g hf)\nhfg' : Memℒp (↑(f + g)) p\n⊢ P (toLp (f + g) hfg')\n[PROOFSTEP]\nobtain ⟨hf', hg'⟩ : Memℒp f p μ ∧ Memℒp g p μ :=\n  (memℒp_add_of_disjoint hfg f.stronglyMeasurable g.stronglyMeasurable).mp hfg'\n[GOAL]\ncase h_add.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝² : MeasurableSpace α\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nhp_pos : p ≠ 0\nhp_ne_top : p ≠ ⊤\nP : { x // x ∈ simpleFunc E p μ } → Prop\nh_ind : ∀ (c : E) {s : Set α} (hs : MeasurableSet s) (hμs : ↑↑μ s < ⊤), P (indicatorConst p hs (_ : ↑↑μ s ≠ ⊤) c)\nh_add :\n  ∀ ⦃f g : α →ₛ E⦄ (hf : Memℒp (↑f) p) (hg : Memℒp (↑g) p),\n    Disjoint (support ↑f) (support ↑g) → P (toLp f hf) → P (toLp g hg) → P (toLp f hf + toLp g hg)\nf g : α →ₛ E\nhfg : Disjoint (support ↑f) (support ↑g)\nhf : ∀ (hf : Memℒp (↑f) p), P (toLp f hf)\nhg : ∀ (hf : Memℒp (↑g) p), P (toLp g hf)\nhfg' : Memℒp (↑(f + g)) p\nhf' : Memℒp (↑f) p\nhg' : Memℒp (↑g) p\n⊢ P (toLp (f + g) hfg')\n[PROOFSTEP]\nexact h_add hf' hg' hfg (hf hf') (hg hg')\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\ninst✝ : Fact (1 ≤ p)\nhp_ne_top : p ≠ ⊤\n⊢ DenseEmbedding Subtype.val\n[PROOFSTEP]\nborelize E\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\ninst✝ : Fact (1 ≤ p)\nhp_ne_top : p ≠ ⊤\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\n⊢ DenseEmbedding Subtype.val\n[PROOFSTEP]\napply simpleFunc.uniformEmbedding.denseEmbedding\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\ninst✝ : Fact (1 ≤ p)\nhp_ne_top : p ≠ ⊤\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\n⊢ DenseRange Subtype.val\n[PROOFSTEP]\nintro f\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\ninst✝ : Fact (1 ≤ p)\nhp_ne_top : p ≠ ⊤\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nf : { x // x ∈ Lp E p }\n⊢ f ∈ closure (Set.range Subtype.val)\n[PROOFSTEP]\nrw [mem_closure_iff_seq_limit]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\ninst✝ : Fact (1 ≤ p)\nhp_ne_top : p ≠ ⊤\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nf : { x // x ∈ Lp E p }\n⊢ ∃ x, (∀ (n : ℕ), x n ∈ Set.range Subtype.val) ∧ Tendsto x atTop (𝓝 f)\n[PROOFSTEP]\nhave hfi' : Memℒp f p μ := Lp.memℒp f\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\ninst✝ : Fact (1 ≤ p)\nhp_ne_top : p ≠ ⊤\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nf : { x // x ∈ Lp E p }\nhfi' : Memℒp (↑↑f) p\n⊢ ∃ x, (∀ (n : ℕ), x n ∈ Set.range Subtype.val) ∧ Tendsto x atTop (𝓝 f)\n[PROOFSTEP]\nhaveI : SeparableSpace (range f ∪ {0} : Set E) := (Lp.stronglyMeasurable f).separableSpace_range_union_singleton\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\ninst✝ : Fact (1 ≤ p)\nhp_ne_top : p ≠ ⊤\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nf : { x // x ∈ Lp E p }\nhfi' : Memℒp (↑↑f) p\nthis : SeparableSpace ↑(Set.range ↑↑f ∪ {0})\n⊢ ∃ x, (∀ (n : ℕ), x n ∈ Set.range Subtype.val) ∧ Tendsto x atTop (𝓝 f)\n[PROOFSTEP]\nrefine'\n  ⟨fun n =>\n    toLp (SimpleFunc.approxOn f (Lp.stronglyMeasurable f).measurable (range f ∪ {0}) 0 _ n)\n      (SimpleFunc.memℒp_approxOn_range (Lp.stronglyMeasurable f).measurable hfi' n),\n    fun n => mem_range_self _, _⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\ninst✝ : Fact (1 ≤ p)\nhp_ne_top : p ≠ ⊤\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nf : { x // x ∈ Lp E p }\nhfi' : Memℒp (↑↑f) p\nthis : SeparableSpace ↑(Set.range ↑↑f ∪ {0})\n⊢ Tendsto\n    (fun n =>\n      ↑(toLp (SimpleFunc.approxOn ↑↑f (_ : Measurable ↑↑f) (Set.range ↑↑f ∪ {0}) 0 (_ : 0 ∈ Set.range ↑↑f ∪ {0}) n)\n          (_ :\n            Memℒp\n              (↑(SimpleFunc.approxOn ↑↑f (_ : Measurable ↑↑f) (Set.range ↑↑f ∪ {0}) 0 (_ : 0 ∈ Set.range ↑↑f ∪ {0}) n))\n              p)))\n    atTop (𝓝 f)\n[PROOFSTEP]\nconvert SimpleFunc.tendsto_approxOn_range_Lp hp_ne_top (Lp.stronglyMeasurable f).measurable hfi'\n[GOAL]\ncase h.e'_5.h.e'_3\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\ninst✝ : Fact (1 ≤ p)\nhp_ne_top : p ≠ ⊤\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nf : { x // x ∈ Lp E p }\nhfi' : Memℒp (↑↑f) p\nthis : SeparableSpace ↑(Set.range ↑↑f ∪ {0})\n⊢ f = Memℒp.toLp (↑↑f) hfi'\n[PROOFSTEP]\nrw [toLp_coeFn f (Lp.memℒp f)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nG : Type u_7\ninst✝ : NormedLatticeAddCommGroup G\nf g : { x // x ∈ simpleFunc G p μ }\n⊢ ↑↑↑f ≤ᵐ[μ] ↑↑↑g ↔ f ≤ g\n[PROOFSTEP]\nrw [← Subtype.coe_le_coe, ← Lp.coeFn_le]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nG : Type u_7\ninst✝ : NormedLatticeAddCommGroup G\n⊢ CovariantClass { x // x ∈ simpleFunc G p μ } { x // x ∈ simpleFunc G p μ } (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\n[PROOFSTEP]\nrefine' ⟨fun f g₁ g₂ hg₁₂ => _⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nG : Type u_7\ninst✝ : NormedLatticeAddCommGroup G\nf g₁ g₂ : { x // x ∈ simpleFunc G p μ }\nhg₁₂ : g₁ ≤ g₂\n⊢ f + g₁ ≤ f + g₂\n[PROOFSTEP]\nrw [← Lp.simpleFunc.coeFn_le] at hg₁₂ ⊢\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nG : Type u_7\ninst✝ : NormedLatticeAddCommGroup G\nf g₁ g₂ : { x // x ∈ simpleFunc G p μ }\nhg₁₂ : ↑↑↑g₁ ≤ᵐ[μ] ↑↑↑g₂\n⊢ ↑↑↑(f + g₁) ≤ᵐ[μ] ↑↑↑(f + g₂)\n[PROOFSTEP]\nhave h_add_1 : ((f + g₁ : Lp.simpleFunc G p μ) : α → G) =ᵐ[μ] (f : α → G) + g₁ := Lp.coeFn_add _ _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nG : Type u_7\ninst✝ : NormedLatticeAddCommGroup G\nf g₁ g₂ : { x // x ∈ simpleFunc G p μ }\nhg₁₂ : ↑↑↑g₁ ≤ᵐ[μ] ↑↑↑g₂\nh_add_1 : ↑↑↑(f + g₁) =ᵐ[μ] ↑↑↑f + ↑↑↑g₁\n⊢ ↑↑↑(f + g₁) ≤ᵐ[μ] ↑↑↑(f + g₂)\n[PROOFSTEP]\nhave h_add_2 : ((f + g₂ : Lp.simpleFunc G p μ) : α → G) =ᵐ[μ] (f : α → G) + g₂ := Lp.coeFn_add _ _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nG : Type u_7\ninst✝ : NormedLatticeAddCommGroup G\nf g₁ g₂ : { x // x ∈ simpleFunc G p μ }\nhg₁₂ : ↑↑↑g₁ ≤ᵐ[μ] ↑↑↑g₂\nh_add_1 : ↑↑↑(f + g₁) =ᵐ[μ] ↑↑↑f + ↑↑↑g₁\nh_add_2 : ↑↑↑(f + g₂) =ᵐ[μ] ↑↑↑f + ↑↑↑g₂\n⊢ ↑↑↑(f + g₁) ≤ᵐ[μ] ↑↑↑(f + g₂)\n[PROOFSTEP]\nfilter_upwards [h_add_1, h_add_2, hg₁₂] with _ h1 h2 h3\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nG : Type u_7\ninst✝ : NormedLatticeAddCommGroup G\nf g₁ g₂ : { x // x ∈ simpleFunc G p μ }\nhg₁₂ : ↑↑↑g₁ ≤ᵐ[μ] ↑↑↑g₂\nh_add_1 : ↑↑↑(f + g₁) =ᵐ[μ] ↑↑↑f + ↑↑↑g₁\nh_add_2 : ↑↑↑(f + g₂) =ᵐ[μ] ↑↑↑f + ↑↑↑g₂\na✝ : α\nh1 : ↑↑↑(f + g₁) a✝ = (↑↑↑f + ↑↑↑g₁) a✝\nh2 : ↑↑↑(f + g₂) a✝ = (↑↑↑f + ↑↑↑g₂) a✝\nh3 : ↑↑↑g₁ a✝ ≤ ↑↑↑g₂ a✝\n⊢ ↑↑↑(f + g₁) a✝ ≤ ↑↑↑(f + g₂) a✝\n[PROOFSTEP]\nrw [h1, h2, Pi.add_apply, Pi.add_apply]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nG : Type u_7\ninst✝ : NormedLatticeAddCommGroup G\nf g₁ g₂ : { x // x ∈ simpleFunc G p μ }\nhg₁₂ : ↑↑↑g₁ ≤ᵐ[μ] ↑↑↑g₂\nh_add_1 : ↑↑↑(f + g₁) =ᵐ[μ] ↑↑↑f + ↑↑↑g₁\nh_add_2 : ↑↑↑(f + g₂) =ᵐ[μ] ↑↑↑f + ↑↑↑g₂\na✝ : α\nh1 : ↑↑↑(f + g₁) a✝ = (↑↑↑f + ↑↑↑g₁) a✝\nh2 : ↑↑↑(f + g₂) a✝ = (↑↑↑f + ↑↑↑g₂) a✝\nh3 : ↑↑↑g₁ a✝ ≤ ↑↑↑g₂ a✝\n⊢ ↑↑↑f a✝ + ↑↑↑g₁ a✝ ≤ ↑↑↑f a✝ + ↑↑↑g₂ a✝\n[PROOFSTEP]\nexact add_le_add le_rfl h3\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nG : Type u_7\ninst✝ : NormedLatticeAddCommGroup G\nf : { x // x ∈ simpleFunc G p μ }\n⊢ 0 ≤ᵐ[μ] ↑↑↑f ↔ 0 ≤ f\n[PROOFSTEP]\nrw [← Subtype.coe_le_coe, Lp.coeFn_nonneg, AddSubmonoid.coe_zero]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nG : Type u_7\ninst✝ : NormedLatticeAddCommGroup G\nf : { x // x ∈ simpleFunc G p μ }\nhf : 0 ≤ f\n⊢ ∃ f', 0 ≤ f' ∧ ↑↑↑f =ᵐ[μ] ↑f'\n[PROOFSTEP]\nrcases f with ⟨⟨f, hp⟩, g, (rfl : _ = f)⟩\n[GOAL]\ncase mk.mk.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nG : Type u_7\ninst✝ : NormedLatticeAddCommGroup G\ng : α →ₛ G\nhp : AEEqFun.mk ↑g (_ : AEStronglyMeasurable (↑g) μ) ∈ Lp G p\nhf :\n  0 ≤\n    { val := { val := AEEqFun.mk ↑g (_ : AEStronglyMeasurable (↑g) μ), property := hp },\n      property :=\n        (_ :\n          ∃ s,\n            AEEqFun.mk ↑s (_ : AEStronglyMeasurable (↑s) μ) =\n              ↑{ val := AEEqFun.mk ↑g (_ : AEStronglyMeasurable (↑g) μ), property := hp }) }\n⊢ ∃ f',\n    0 ≤ f' ∧\n      ↑↑↑{ val := { val := AEEqFun.mk ↑g (_ : AEStronglyMeasurable (↑g) μ), property := hp },\n                property :=\n                  (_ :\n                    ∃ s,\n                      AEEqFun.mk ↑s (_ : AEStronglyMeasurable (↑s) μ) =\n                        ↑{ val := AEEqFun.mk ↑g (_ : AEStronglyMeasurable (↑g) μ), property := hp }) } =ᵐ[μ]\n        ↑f'\n[PROOFSTEP]\nchange 0 ≤ᵐ[μ] g at hf \n[GOAL]\ncase mk.mk.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nG : Type u_7\ninst✝ : NormedLatticeAddCommGroup G\ng : α →ₛ G\nhp : AEEqFun.mk ↑g (_ : AEStronglyMeasurable (↑g) μ) ∈ Lp G p\nhf : 0 ≤ᵐ[μ] ↑g\n⊢ ∃ f',\n    0 ≤ f' ∧\n      ↑↑↑{ val := { val := AEEqFun.mk ↑g (_ : AEStronglyMeasurable (↑g) μ), property := hp },\n                property :=\n                  (_ :\n                    ∃ s,\n                      AEEqFun.mk ↑s (_ : AEStronglyMeasurable (↑s) μ) =\n                        ↑{ val := AEEqFun.mk ↑g (_ : AEStronglyMeasurable (↑g) μ), property := hp }) } =ᵐ[μ]\n        ↑f'\n[PROOFSTEP]\nrefine ⟨g ⊔ 0, le_sup_right, (AEEqFun.coeFn_mk _ _).trans ?_⟩\n[GOAL]\ncase mk.mk.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nG : Type u_7\ninst✝ : NormedLatticeAddCommGroup G\ng : α →ₛ G\nhp : AEEqFun.mk ↑g (_ : AEStronglyMeasurable (↑g) μ) ∈ Lp G p\nhf : 0 ≤ᵐ[μ] ↑g\n⊢ ↑g =ᵐ[μ] ↑(g ⊔ 0)\n[PROOFSTEP]\nexact hf.mono fun x hx ↦ (sup_of_le_left hx).symm\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nG : Type u_7\ninst✝ : NormedLatticeAddCommGroup G\nhp : Fact (1 ≤ p)\nhp_ne_top : p ≠ ⊤\ng : { g // 0 ≤ g }\n⊢ g ∈ closure (Set.range (coeSimpleFuncNonnegToLpNonneg p μ G))\n[PROOFSTEP]\nborelize G\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nG : Type u_7\ninst✝ : NormedLatticeAddCommGroup G\nhp : Fact (1 ≤ p)\nhp_ne_top : p ≠ ⊤\ng : { g // 0 ≤ g }\nthis✝¹ : MeasurableSpace G := borel G\nthis✝ : BorelSpace G\n⊢ g ∈ closure (Set.range (coeSimpleFuncNonnegToLpNonneg p μ G))\n[PROOFSTEP]\nrw [mem_closure_iff_seq_limit]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nG : Type u_7\ninst✝ : NormedLatticeAddCommGroup G\nhp : Fact (1 ≤ p)\nhp_ne_top : p ≠ ⊤\ng : { g // 0 ≤ g }\nthis✝¹ : MeasurableSpace G := borel G\nthis✝ : BorelSpace G\n⊢ ∃ x, (∀ (n : ℕ), x n ∈ Set.range (coeSimpleFuncNonnegToLpNonneg p μ G)) ∧ Tendsto x atTop (𝓝 g)\n[PROOFSTEP]\nhave hg_memℒp : Memℒp (g : α → G) p μ := Lp.memℒp (g : Lp G p μ)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nG : Type u_7\ninst✝ : NormedLatticeAddCommGroup G\nhp : Fact (1 ≤ p)\nhp_ne_top : p ≠ ⊤\ng : { g // 0 ≤ g }\nthis✝¹ : MeasurableSpace G := borel G\nthis✝ : BorelSpace G\nhg_memℒp : Memℒp (↑↑↑g) p\n⊢ ∃ x, (∀ (n : ℕ), x n ∈ Set.range (coeSimpleFuncNonnegToLpNonneg p μ G)) ∧ Tendsto x atTop (𝓝 g)\n[PROOFSTEP]\nhave zero_mem : (0 : G) ∈ (range (g : α → G) ∪ {0} : Set G) ∩ {y | 0 ≤ y} := by\n  simp only [union_singleton, mem_inter_iff, mem_insert_iff, eq_self_iff_true, true_or_iff, mem_setOf_eq, le_refl,\n    and_self_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nG : Type u_7\ninst✝ : NormedLatticeAddCommGroup G\nhp : Fact (1 ≤ p)\nhp_ne_top : p ≠ ⊤\ng : { g // 0 ≤ g }\nthis✝¹ : MeasurableSpace G := borel G\nthis✝ : BorelSpace G\nhg_memℒp : Memℒp (↑↑↑g) p\n⊢ 0 ∈ (Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y}\n[PROOFSTEP]\nsimp only [union_singleton, mem_inter_iff, mem_insert_iff, eq_self_iff_true, true_or_iff, mem_setOf_eq, le_refl,\n  and_self_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nG : Type u_7\ninst✝ : NormedLatticeAddCommGroup G\nhp : Fact (1 ≤ p)\nhp_ne_top : p ≠ ⊤\ng : { g // 0 ≤ g }\nthis✝¹ : MeasurableSpace G := borel G\nthis✝ : BorelSpace G\nhg_memℒp : Memℒp (↑↑↑g) p\nzero_mem : 0 ∈ (Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y}\n⊢ ∃ x, (∀ (n : ℕ), x n ∈ Set.range (coeSimpleFuncNonnegToLpNonneg p μ G)) ∧ Tendsto x atTop (𝓝 g)\n[PROOFSTEP]\nhave : SeparableSpace ((range (g : α → G) ∪ {0}) ∩ {y | 0 ≤ y} : Set G) :=\n  by\n  apply IsSeparable.separableSpace\n  apply IsSeparable.mono _ (Set.inter_subset_left _ _)\n  exact (Lp.stronglyMeasurable (g : Lp G p μ)).isSeparable_range.union (finite_singleton _).isSeparable\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nG : Type u_7\ninst✝ : NormedLatticeAddCommGroup G\nhp : Fact (1 ≤ p)\nhp_ne_top : p ≠ ⊤\ng : { g // 0 ≤ g }\nthis✝¹ : MeasurableSpace G := borel G\nthis✝ : BorelSpace G\nhg_memℒp : Memℒp (↑↑↑g) p\nzero_mem : 0 ∈ (Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y}\n⊢ SeparableSpace ↑((Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y})\n[PROOFSTEP]\napply IsSeparable.separableSpace\n[GOAL]\ncase hs\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nG : Type u_7\ninst✝ : NormedLatticeAddCommGroup G\nhp : Fact (1 ≤ p)\nhp_ne_top : p ≠ ⊤\ng : { g // 0 ≤ g }\nthis✝¹ : MeasurableSpace G := borel G\nthis✝ : BorelSpace G\nhg_memℒp : Memℒp (↑↑↑g) p\nzero_mem : 0 ∈ (Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y}\n⊢ IsSeparable ((Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y})\n[PROOFSTEP]\napply IsSeparable.mono _ (Set.inter_subset_left _ _)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nG : Type u_7\ninst✝ : NormedLatticeAddCommGroup G\nhp : Fact (1 ≤ p)\nhp_ne_top : p ≠ ⊤\ng : { g // 0 ≤ g }\nthis✝¹ : MeasurableSpace G := borel G\nthis✝ : BorelSpace G\nhg_memℒp : Memℒp (↑↑↑g) p\nzero_mem : 0 ∈ (Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y}\n⊢ IsSeparable (Set.range ↑↑↑g ∪ {0})\n[PROOFSTEP]\nexact (Lp.stronglyMeasurable (g : Lp G p μ)).isSeparable_range.union (finite_singleton _).isSeparable\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nG : Type u_7\ninst✝ : NormedLatticeAddCommGroup G\nhp : Fact (1 ≤ p)\nhp_ne_top : p ≠ ⊤\ng : { g // 0 ≤ g }\nthis✝¹ : MeasurableSpace G := borel G\nthis✝ : BorelSpace G\nhg_memℒp : Memℒp (↑↑↑g) p\nzero_mem : 0 ∈ (Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y}\nthis : SeparableSpace ↑((Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y})\n⊢ ∃ x, (∀ (n : ℕ), x n ∈ Set.range (coeSimpleFuncNonnegToLpNonneg p μ G)) ∧ Tendsto x atTop (𝓝 g)\n[PROOFSTEP]\nhave g_meas : Measurable (g : α → G) := (Lp.stronglyMeasurable (g : Lp G p μ)).measurable\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nG : Type u_7\ninst✝ : NormedLatticeAddCommGroup G\nhp : Fact (1 ≤ p)\nhp_ne_top : p ≠ ⊤\ng : { g // 0 ≤ g }\nthis✝¹ : MeasurableSpace G := borel G\nthis✝ : BorelSpace G\nhg_memℒp : Memℒp (↑↑↑g) p\nzero_mem : 0 ∈ (Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y}\nthis : SeparableSpace ↑((Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y})\ng_meas : Measurable ↑↑↑g\n⊢ ∃ x, (∀ (n : ℕ), x n ∈ Set.range (coeSimpleFuncNonnegToLpNonneg p μ G)) ∧ Tendsto x atTop (𝓝 g)\n[PROOFSTEP]\nlet x n := SimpleFunc.approxOn g g_meas ((range (g : α → G) ∪ {0}) ∩ {y | 0 ≤ y}) 0 zero_mem n\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nG : Type u_7\ninst✝ : NormedLatticeAddCommGroup G\nhp : Fact (1 ≤ p)\nhp_ne_top : p ≠ ⊤\ng : { g // 0 ≤ g }\nthis✝¹ : MeasurableSpace G := borel G\nthis✝ : BorelSpace G\nhg_memℒp : Memℒp (↑↑↑g) p\nzero_mem : 0 ∈ (Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y}\nthis : SeparableSpace ↑((Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y})\ng_meas : Measurable ↑↑↑g\nx : ℕ → α →ₛ G := fun n => SimpleFunc.approxOn (↑↑↑g) g_meas ((Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y}) 0 zero_mem n\n⊢ ∃ x, (∀ (n : ℕ), x n ∈ Set.range (coeSimpleFuncNonnegToLpNonneg p μ G)) ∧ Tendsto x atTop (𝓝 g)\n[PROOFSTEP]\nhave hx_nonneg : ∀ n, 0 ≤ x n := by\n  intro n a\n  change x n a ∈ {y : G | 0 ≤ y}\n  have A : (range (g : α → G) ∪ {0} : Set G) ∩ {y | 0 ≤ y} ⊆ {y | 0 ≤ y} := inter_subset_right _ _\n  apply A\n  exact SimpleFunc.approxOn_mem g_meas _ n a\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nG : Type u_7\ninst✝ : NormedLatticeAddCommGroup G\nhp : Fact (1 ≤ p)\nhp_ne_top : p ≠ ⊤\ng : { g // 0 ≤ g }\nthis✝¹ : MeasurableSpace G := borel G\nthis✝ : BorelSpace G\nhg_memℒp : Memℒp (↑↑↑g) p\nzero_mem : 0 ∈ (Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y}\nthis : SeparableSpace ↑((Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y})\ng_meas : Measurable ↑↑↑g\nx : ℕ → α →ₛ G := fun n => SimpleFunc.approxOn (↑↑↑g) g_meas ((Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y}) 0 zero_mem n\n⊢ ∀ (n : ℕ), 0 ≤ x n\n[PROOFSTEP]\nintro n a\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nG : Type u_7\ninst✝ : NormedLatticeAddCommGroup G\nhp : Fact (1 ≤ p)\nhp_ne_top : p ≠ ⊤\ng : { g // 0 ≤ g }\nthis✝¹ : MeasurableSpace G := borel G\nthis✝ : BorelSpace G\nhg_memℒp : Memℒp (↑↑↑g) p\nzero_mem : 0 ∈ (Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y}\nthis : SeparableSpace ↑((Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y})\ng_meas : Measurable ↑↑↑g\nx : ℕ → α →ₛ G := fun n => SimpleFunc.approxOn (↑↑↑g) g_meas ((Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y}) 0 zero_mem n\nn : ℕ\na : α\n⊢ ↑0 a ≤ ↑(x n) a\n[PROOFSTEP]\nchange x n a ∈ {y : G | 0 ≤ y}\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nG : Type u_7\ninst✝ : NormedLatticeAddCommGroup G\nhp : Fact (1 ≤ p)\nhp_ne_top : p ≠ ⊤\ng : { g // 0 ≤ g }\nthis✝¹ : MeasurableSpace G := borel G\nthis✝ : BorelSpace G\nhg_memℒp : Memℒp (↑↑↑g) p\nzero_mem : 0 ∈ (Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y}\nthis : SeparableSpace ↑((Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y})\ng_meas : Measurable ↑↑↑g\nx : ℕ → α →ₛ G := fun n => SimpleFunc.approxOn (↑↑↑g) g_meas ((Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y}) 0 zero_mem n\nn : ℕ\na : α\n⊢ ↑(x n) a ∈ {y | 0 ≤ y}\n[PROOFSTEP]\nhave A : (range (g : α → G) ∪ {0} : Set G) ∩ {y | 0 ≤ y} ⊆ {y | 0 ≤ y} := inter_subset_right _ _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nG : Type u_7\ninst✝ : NormedLatticeAddCommGroup G\nhp : Fact (1 ≤ p)\nhp_ne_top : p ≠ ⊤\ng : { g // 0 ≤ g }\nthis✝¹ : MeasurableSpace G := borel G\nthis✝ : BorelSpace G\nhg_memℒp : Memℒp (↑↑↑g) p\nzero_mem : 0 ∈ (Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y}\nthis : SeparableSpace ↑((Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y})\ng_meas : Measurable ↑↑↑g\nx : ℕ → α →ₛ G := fun n => SimpleFunc.approxOn (↑↑↑g) g_meas ((Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y}) 0 zero_mem n\nn : ℕ\na : α\nA : (Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y} ⊆ {y | 0 ≤ y}\n⊢ ↑(x n) a ∈ {y | 0 ≤ y}\n[PROOFSTEP]\napply A\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nG : Type u_7\ninst✝ : NormedLatticeAddCommGroup G\nhp : Fact (1 ≤ p)\nhp_ne_top : p ≠ ⊤\ng : { g // 0 ≤ g }\nthis✝¹ : MeasurableSpace G := borel G\nthis✝ : BorelSpace G\nhg_memℒp : Memℒp (↑↑↑g) p\nzero_mem : 0 ∈ (Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y}\nthis : SeparableSpace ↑((Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y})\ng_meas : Measurable ↑↑↑g\nx : ℕ → α →ₛ G := fun n => SimpleFunc.approxOn (↑↑↑g) g_meas ((Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y}) 0 zero_mem n\nn : ℕ\na : α\nA : (Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y} ⊆ {y | 0 ≤ y}\n⊢ ↑(x n) a ∈ (Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y}\n[PROOFSTEP]\nexact SimpleFunc.approxOn_mem g_meas _ n a\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nG : Type u_7\ninst✝ : NormedLatticeAddCommGroup G\nhp : Fact (1 ≤ p)\nhp_ne_top : p ≠ ⊤\ng : { g // 0 ≤ g }\nthis✝¹ : MeasurableSpace G := borel G\nthis✝ : BorelSpace G\nhg_memℒp : Memℒp (↑↑↑g) p\nzero_mem : 0 ∈ (Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y}\nthis : SeparableSpace ↑((Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y})\ng_meas : Measurable ↑↑↑g\nx : ℕ → α →ₛ G := fun n => SimpleFunc.approxOn (↑↑↑g) g_meas ((Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y}) 0 zero_mem n\nhx_nonneg : ∀ (n : ℕ), 0 ≤ x n\n⊢ ∃ x, (∀ (n : ℕ), x n ∈ Set.range (coeSimpleFuncNonnegToLpNonneg p μ G)) ∧ Tendsto x atTop (𝓝 g)\n[PROOFSTEP]\nhave hx_memℒp : ∀ n, Memℒp (x n) p μ := SimpleFunc.memℒp_approxOn _ hg_memℒp _ ⟨aestronglyMeasurable_const, by simp⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nG : Type u_7\ninst✝ : NormedLatticeAddCommGroup G\nhp : Fact (1 ≤ p)\nhp_ne_top : p ≠ ⊤\ng : { g // 0 ≤ g }\nthis✝¹ : MeasurableSpace G := borel G\nthis✝ : BorelSpace G\nhg_memℒp : Memℒp (↑↑↑g) p\nzero_mem : 0 ∈ (Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y}\nthis : SeparableSpace ↑((Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y})\ng_meas : Measurable ↑↑↑g\nx : ℕ → α →ₛ G := fun n => SimpleFunc.approxOn (↑↑↑g) g_meas ((Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y}) 0 zero_mem n\nhx_nonneg : ∀ (n : ℕ), 0 ≤ x n\n⊢ snorm (fun x => 0) p μ < ⊤\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nG : Type u_7\ninst✝ : NormedLatticeAddCommGroup G\nhp : Fact (1 ≤ p)\nhp_ne_top : p ≠ ⊤\ng : { g // 0 ≤ g }\nthis✝¹ : MeasurableSpace G := borel G\nthis✝ : BorelSpace G\nhg_memℒp : Memℒp (↑↑↑g) p\nzero_mem : 0 ∈ (Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y}\nthis : SeparableSpace ↑((Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y})\ng_meas : Measurable ↑↑↑g\nx : ℕ → α →ₛ G := fun n => SimpleFunc.approxOn (↑↑↑g) g_meas ((Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y}) 0 zero_mem n\nhx_nonneg : ∀ (n : ℕ), 0 ≤ x n\nhx_memℒp : ∀ (n : ℕ), Memℒp (↑(x n)) p\n⊢ ∃ x, (∀ (n : ℕ), x n ∈ Set.range (coeSimpleFuncNonnegToLpNonneg p μ G)) ∧ Tendsto x atTop (𝓝 g)\n[PROOFSTEP]\nhave h_toLp := fun n => Memℒp.coeFn_toLp (hx_memℒp n)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nG : Type u_7\ninst✝ : NormedLatticeAddCommGroup G\nhp : Fact (1 ≤ p)\nhp_ne_top : p ≠ ⊤\ng : { g // 0 ≤ g }\nthis✝¹ : MeasurableSpace G := borel G\nthis✝ : BorelSpace G\nhg_memℒp : Memℒp (↑↑↑g) p\nzero_mem : 0 ∈ (Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y}\nthis : SeparableSpace ↑((Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y})\ng_meas : Measurable ↑↑↑g\nx : ℕ → α →ₛ G := fun n => SimpleFunc.approxOn (↑↑↑g) g_meas ((Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y}) 0 zero_mem n\nhx_nonneg : ∀ (n : ℕ), 0 ≤ x n\nhx_memℒp : ∀ (n : ℕ), Memℒp (↑(x n)) p\nh_toLp : ∀ (n : ℕ), ↑↑(Memℒp.toLp ↑(x n) (_ : Memℒp (↑(x n)) p)) =ᵐ[μ] ↑(x n)\n⊢ ∃ x, (∀ (n : ℕ), x n ∈ Set.range (coeSimpleFuncNonnegToLpNonneg p μ G)) ∧ Tendsto x atTop (𝓝 g)\n[PROOFSTEP]\nhave hx_nonneg_Lp : ∀ n, 0 ≤ toLp (x n) (hx_memℒp n) := by\n  intro n\n  rw [← Lp.simpleFunc.coeFn_le, Lp.simpleFunc.toLp_eq_toLp]\n  filter_upwards [Lp.simpleFunc.coeFn_zero p μ G, h_toLp n] with a ha0 ha_toLp\n  rw [ha0, ha_toLp]\n  exact hx_nonneg n a\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nG : Type u_7\ninst✝ : NormedLatticeAddCommGroup G\nhp : Fact (1 ≤ p)\nhp_ne_top : p ≠ ⊤\ng : { g // 0 ≤ g }\nthis✝¹ : MeasurableSpace G := borel G\nthis✝ : BorelSpace G\nhg_memℒp : Memℒp (↑↑↑g) p\nzero_mem : 0 ∈ (Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y}\nthis : SeparableSpace ↑((Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y})\ng_meas : Measurable ↑↑↑g\nx : ℕ → α →ₛ G := fun n => SimpleFunc.approxOn (↑↑↑g) g_meas ((Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y}) 0 zero_mem n\nhx_nonneg : ∀ (n : ℕ), 0 ≤ x n\nhx_memℒp : ∀ (n : ℕ), Memℒp (↑(x n)) p\nh_toLp : ∀ (n : ℕ), ↑↑(Memℒp.toLp ↑(x n) (_ : Memℒp (↑(x n)) p)) =ᵐ[μ] ↑(x n)\n⊢ ∀ (n : ℕ), 0 ≤ toLp (x n) (_ : Memℒp (↑(x n)) p)\n[PROOFSTEP]\nintro n\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nG : Type u_7\ninst✝ : NormedLatticeAddCommGroup G\nhp : Fact (1 ≤ p)\nhp_ne_top : p ≠ ⊤\ng : { g // 0 ≤ g }\nthis✝¹ : MeasurableSpace G := borel G\nthis✝ : BorelSpace G\nhg_memℒp : Memℒp (↑↑↑g) p\nzero_mem : 0 ∈ (Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y}\nthis : SeparableSpace ↑((Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y})\ng_meas : Measurable ↑↑↑g\nx : ℕ → α →ₛ G := fun n => SimpleFunc.approxOn (↑↑↑g) g_meas ((Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y}) 0 zero_mem n\nhx_nonneg : ∀ (n : ℕ), 0 ≤ x n\nhx_memℒp : ∀ (n : ℕ), Memℒp (↑(x n)) p\nh_toLp : ∀ (n : ℕ), ↑↑(Memℒp.toLp ↑(x n) (_ : Memℒp (↑(x n)) p)) =ᵐ[μ] ↑(x n)\nn : ℕ\n⊢ 0 ≤ toLp (x n) (_ : Memℒp (↑(x n)) p)\n[PROOFSTEP]\nrw [← Lp.simpleFunc.coeFn_le, Lp.simpleFunc.toLp_eq_toLp]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nG : Type u_7\ninst✝ : NormedLatticeAddCommGroup G\nhp : Fact (1 ≤ p)\nhp_ne_top : p ≠ ⊤\ng : { g // 0 ≤ g }\nthis✝¹ : MeasurableSpace G := borel G\nthis✝ : BorelSpace G\nhg_memℒp : Memℒp (↑↑↑g) p\nzero_mem : 0 ∈ (Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y}\nthis : SeparableSpace ↑((Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y})\ng_meas : Measurable ↑↑↑g\nx : ℕ → α →ₛ G := fun n => SimpleFunc.approxOn (↑↑↑g) g_meas ((Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y}) 0 zero_mem n\nhx_nonneg : ∀ (n : ℕ), 0 ≤ x n\nhx_memℒp : ∀ (n : ℕ), Memℒp (↑(x n)) p\nh_toLp : ∀ (n : ℕ), ↑↑(Memℒp.toLp ↑(x n) (_ : Memℒp (↑(x n)) p)) =ᵐ[μ] ↑(x n)\nn : ℕ\n⊢ ↑↑↑0 ≤ᵐ[μ] ↑↑(Memℒp.toLp ↑(x n) (_ : Memℒp (↑(x n)) p))\n[PROOFSTEP]\nfilter_upwards [Lp.simpleFunc.coeFn_zero p μ G, h_toLp n] with a ha0 ha_toLp\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nG : Type u_7\ninst✝ : NormedLatticeAddCommGroup G\nhp : Fact (1 ≤ p)\nhp_ne_top : p ≠ ⊤\ng : { g // 0 ≤ g }\nthis✝¹ : MeasurableSpace G := borel G\nthis✝ : BorelSpace G\nhg_memℒp : Memℒp (↑↑↑g) p\nzero_mem : 0 ∈ (Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y}\nthis : SeparableSpace ↑((Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y})\ng_meas : Measurable ↑↑↑g\nx : ℕ → α →ₛ G := fun n => SimpleFunc.approxOn (↑↑↑g) g_meas ((Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y}) 0 zero_mem n\nhx_nonneg : ∀ (n : ℕ), 0 ≤ x n\nhx_memℒp : ∀ (n : ℕ), Memℒp (↑(x n)) p\nh_toLp : ∀ (n : ℕ), ↑↑(Memℒp.toLp ↑(x n) (_ : Memℒp (↑(x n)) p)) =ᵐ[μ] ↑(x n)\nn : ℕ\na : α\nha0 : ↑↑↑0 a = OfNat.ofNat 0 a\nha_toLp :\n  ↑↑(Memℒp.toLp ↑(SimpleFunc.approxOn (↑↑↑g) g_meas ((Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y}) 0 zero_mem n)\n            (_ : Memℒp (↑(x n)) p))\n      a =\n    ↑(SimpleFunc.approxOn (↑↑↑g) g_meas ((Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y}) 0 zero_mem n) a\n⊢ ↑↑↑0 a ≤\n    ↑↑(Memℒp.toLp ↑(SimpleFunc.approxOn (↑↑↑g) g_meas ((Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y}) 0 zero_mem n)\n            (_ : Memℒp (↑(x n)) p))\n      a\n[PROOFSTEP]\nrw [ha0, ha_toLp]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nG : Type u_7\ninst✝ : NormedLatticeAddCommGroup G\nhp : Fact (1 ≤ p)\nhp_ne_top : p ≠ ⊤\ng : { g // 0 ≤ g }\nthis✝¹ : MeasurableSpace G := borel G\nthis✝ : BorelSpace G\nhg_memℒp : Memℒp (↑↑↑g) p\nzero_mem : 0 ∈ (Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y}\nthis : SeparableSpace ↑((Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y})\ng_meas : Measurable ↑↑↑g\nx : ℕ → α →ₛ G := fun n => SimpleFunc.approxOn (↑↑↑g) g_meas ((Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y}) 0 zero_mem n\nhx_nonneg : ∀ (n : ℕ), 0 ≤ x n\nhx_memℒp : ∀ (n : ℕ), Memℒp (↑(x n)) p\nh_toLp : ∀ (n : ℕ), ↑↑(Memℒp.toLp ↑(x n) (_ : Memℒp (↑(x n)) p)) =ᵐ[μ] ↑(x n)\nn : ℕ\na : α\nha0 : ↑↑↑0 a = OfNat.ofNat 0 a\nha_toLp :\n  ↑↑(Memℒp.toLp ↑(SimpleFunc.approxOn (↑↑↑g) g_meas ((Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y}) 0 zero_mem n)\n            (_ : Memℒp (↑(x n)) p))\n      a =\n    ↑(SimpleFunc.approxOn (↑↑↑g) g_meas ((Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y}) 0 zero_mem n) a\n⊢ OfNat.ofNat 0 a ≤ ↑(SimpleFunc.approxOn (↑↑↑g) g_meas ((Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y}) 0 zero_mem n) a\n[PROOFSTEP]\nexact hx_nonneg n a\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nG : Type u_7\ninst✝ : NormedLatticeAddCommGroup G\nhp : Fact (1 ≤ p)\nhp_ne_top : p ≠ ⊤\ng : { g // 0 ≤ g }\nthis✝¹ : MeasurableSpace G := borel G\nthis✝ : BorelSpace G\nhg_memℒp : Memℒp (↑↑↑g) p\nzero_mem : 0 ∈ (Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y}\nthis : SeparableSpace ↑((Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y})\ng_meas : Measurable ↑↑↑g\nx : ℕ → α →ₛ G := fun n => SimpleFunc.approxOn (↑↑↑g) g_meas ((Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y}) 0 zero_mem n\nhx_nonneg : ∀ (n : ℕ), 0 ≤ x n\nhx_memℒp : ∀ (n : ℕ), Memℒp (↑(x n)) p\nh_toLp : ∀ (n : ℕ), ↑↑(Memℒp.toLp ↑(x n) (_ : Memℒp (↑(x n)) p)) =ᵐ[μ] ↑(x n)\nhx_nonneg_Lp : ∀ (n : ℕ), 0 ≤ toLp (x n) (_ : Memℒp (↑(x n)) p)\n⊢ ∃ x, (∀ (n : ℕ), x n ∈ Set.range (coeSimpleFuncNonnegToLpNonneg p μ G)) ∧ Tendsto x atTop (𝓝 g)\n[PROOFSTEP]\nhave hx_tendsto : Tendsto (fun n : ℕ => snorm ((x n : α → G) - (g : α → G)) p μ) atTop (𝓝 0) :=\n  by\n  apply SimpleFunc.tendsto_approxOn_Lp_snorm g_meas zero_mem hp_ne_top\n  · have hg_nonneg : (0 : α → G) ≤ᵐ[μ] g := (Lp.coeFn_nonneg _).mpr g.2\n    refine' hg_nonneg.mono fun a ha => subset_closure _\n    simpa using ha\n  · simp_rw [sub_zero]; exact hg_memℒp.snorm_lt_top\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nG : Type u_7\ninst✝ : NormedLatticeAddCommGroup G\nhp : Fact (1 ≤ p)\nhp_ne_top : p ≠ ⊤\ng : { g // 0 ≤ g }\nthis✝¹ : MeasurableSpace G := borel G\nthis✝ : BorelSpace G\nhg_memℒp : Memℒp (↑↑↑g) p\nzero_mem : 0 ∈ (Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y}\nthis : SeparableSpace ↑((Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y})\ng_meas : Measurable ↑↑↑g\nx : ℕ → α →ₛ G := fun n => SimpleFunc.approxOn (↑↑↑g) g_meas ((Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y}) 0 zero_mem n\nhx_nonneg : ∀ (n : ℕ), 0 ≤ x n\nhx_memℒp : ∀ (n : ℕ), Memℒp (↑(x n)) p\nh_toLp : ∀ (n : ℕ), ↑↑(Memℒp.toLp ↑(x n) (_ : Memℒp (↑(x n)) p)) =ᵐ[μ] ↑(x n)\nhx_nonneg_Lp : ∀ (n : ℕ), 0 ≤ toLp (x n) (_ : Memℒp (↑(x n)) p)\n⊢ Tendsto (fun n => snorm (↑(x n) - ↑↑↑g) p μ) atTop (𝓝 0)\n[PROOFSTEP]\napply SimpleFunc.tendsto_approxOn_Lp_snorm g_meas zero_mem hp_ne_top\n[GOAL]\ncase hμ\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nG : Type u_7\ninst✝ : NormedLatticeAddCommGroup G\nhp : Fact (1 ≤ p)\nhp_ne_top : p ≠ ⊤\ng : { g // 0 ≤ g }\nthis✝¹ : MeasurableSpace G := borel G\nthis✝ : BorelSpace G\nhg_memℒp : Memℒp (↑↑↑g) p\nzero_mem : 0 ∈ (Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y}\nthis : SeparableSpace ↑((Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y})\ng_meas : Measurable ↑↑↑g\nx : ℕ → α →ₛ G := fun n => SimpleFunc.approxOn (↑↑↑g) g_meas ((Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y}) 0 zero_mem n\nhx_nonneg : ∀ (n : ℕ), 0 ≤ x n\nhx_memℒp : ∀ (n : ℕ), Memℒp (↑(x n)) p\nh_toLp : ∀ (n : ℕ), ↑↑(Memℒp.toLp ↑(x n) (_ : Memℒp (↑(x n)) p)) =ᵐ[μ] ↑(x n)\nhx_nonneg_Lp : ∀ (n : ℕ), 0 ≤ toLp (x n) (_ : Memℒp (↑(x n)) p)\n⊢ ∀ᵐ (x : α) ∂μ, ↑↑↑g x ∈ closure ((Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y})\n[PROOFSTEP]\nhave hg_nonneg : (0 : α → G) ≤ᵐ[μ] g := (Lp.coeFn_nonneg _).mpr g.2\n[GOAL]\ncase hμ\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nG : Type u_7\ninst✝ : NormedLatticeAddCommGroup G\nhp : Fact (1 ≤ p)\nhp_ne_top : p ≠ ⊤\ng : { g // 0 ≤ g }\nthis✝¹ : MeasurableSpace G := borel G\nthis✝ : BorelSpace G\nhg_memℒp : Memℒp (↑↑↑g) p\nzero_mem : 0 ∈ (Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y}\nthis : SeparableSpace ↑((Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y})\ng_meas : Measurable ↑↑↑g\nx : ℕ → α →ₛ G := fun n => SimpleFunc.approxOn (↑↑↑g) g_meas ((Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y}) 0 zero_mem n\nhx_nonneg : ∀ (n : ℕ), 0 ≤ x n\nhx_memℒp : ∀ (n : ℕ), Memℒp (↑(x n)) p\nh_toLp : ∀ (n : ℕ), ↑↑(Memℒp.toLp ↑(x n) (_ : Memℒp (↑(x n)) p)) =ᵐ[μ] ↑(x n)\nhx_nonneg_Lp : ∀ (n : ℕ), 0 ≤ toLp (x n) (_ : Memℒp (↑(x n)) p)\nhg_nonneg : 0 ≤ᵐ[μ] ↑↑↑g\n⊢ ∀ᵐ (x : α) ∂μ, ↑↑↑g x ∈ closure ((Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y})\n[PROOFSTEP]\nrefine' hg_nonneg.mono fun a ha => subset_closure _\n[GOAL]\ncase hμ\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nG : Type u_7\ninst✝ : NormedLatticeAddCommGroup G\nhp : Fact (1 ≤ p)\nhp_ne_top : p ≠ ⊤\ng : { g // 0 ≤ g }\nthis✝¹ : MeasurableSpace G := borel G\nthis✝ : BorelSpace G\nhg_memℒp : Memℒp (↑↑↑g) p\nzero_mem : 0 ∈ (Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y}\nthis : SeparableSpace ↑((Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y})\ng_meas : Measurable ↑↑↑g\nx : ℕ → α →ₛ G := fun n => SimpleFunc.approxOn (↑↑↑g) g_meas ((Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y}) 0 zero_mem n\nhx_nonneg : ∀ (n : ℕ), 0 ≤ x n\nhx_memℒp : ∀ (n : ℕ), Memℒp (↑(x n)) p\nh_toLp : ∀ (n : ℕ), ↑↑(Memℒp.toLp ↑(x n) (_ : Memℒp (↑(x n)) p)) =ᵐ[μ] ↑(x n)\nhx_nonneg_Lp : ∀ (n : ℕ), 0 ≤ toLp (x n) (_ : Memℒp (↑(x n)) p)\nhg_nonneg : 0 ≤ᵐ[μ] ↑↑↑g\na : α\nha : OfNat.ofNat 0 a ≤ ↑↑↑g a\n⊢ ↑↑↑g a ∈ (Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y}\n[PROOFSTEP]\nsimpa using ha\n[GOAL]\ncase hi\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nG : Type u_7\ninst✝ : NormedLatticeAddCommGroup G\nhp : Fact (1 ≤ p)\nhp_ne_top : p ≠ ⊤\ng : { g // 0 ≤ g }\nthis✝¹ : MeasurableSpace G := borel G\nthis✝ : BorelSpace G\nhg_memℒp : Memℒp (↑↑↑g) p\nzero_mem : 0 ∈ (Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y}\nthis : SeparableSpace ↑((Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y})\ng_meas : Measurable ↑↑↑g\nx : ℕ → α →ₛ G := fun n => SimpleFunc.approxOn (↑↑↑g) g_meas ((Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y}) 0 zero_mem n\nhx_nonneg : ∀ (n : ℕ), 0 ≤ x n\nhx_memℒp : ∀ (n : ℕ), Memℒp (↑(x n)) p\nh_toLp : ∀ (n : ℕ), ↑↑(Memℒp.toLp ↑(x n) (_ : Memℒp (↑(x n)) p)) =ᵐ[μ] ↑(x n)\nhx_nonneg_Lp : ∀ (n : ℕ), 0 ≤ toLp (x n) (_ : Memℒp (↑(x n)) p)\n⊢ snorm (fun x => ↑↑↑g x - 0) p μ < ⊤\n[PROOFSTEP]\nsimp_rw [sub_zero]\n[GOAL]\ncase hi\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nG : Type u_7\ninst✝ : NormedLatticeAddCommGroup G\nhp : Fact (1 ≤ p)\nhp_ne_top : p ≠ ⊤\ng : { g // 0 ≤ g }\nthis✝¹ : MeasurableSpace G := borel G\nthis✝ : BorelSpace G\nhg_memℒp : Memℒp (↑↑↑g) p\nzero_mem : 0 ∈ (Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y}\nthis : SeparableSpace ↑((Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y})\ng_meas : Measurable ↑↑↑g\nx : ℕ → α →ₛ G := fun n => SimpleFunc.approxOn (↑↑↑g) g_meas ((Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y}) 0 zero_mem n\nhx_nonneg : ∀ (n : ℕ), 0 ≤ x n\nhx_memℒp : ∀ (n : ℕ), Memℒp (↑(x n)) p\nh_toLp : ∀ (n : ℕ), ↑↑(Memℒp.toLp ↑(x n) (_ : Memℒp (↑(x n)) p)) =ᵐ[μ] ↑(x n)\nhx_nonneg_Lp : ∀ (n : ℕ), 0 ≤ toLp (x n) (_ : Memℒp (↑(x n)) p)\n⊢ snorm (fun x => ↑↑↑g x) p μ < ⊤\n[PROOFSTEP]\nexact hg_memℒp.snorm_lt_top\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nG : Type u_7\ninst✝ : NormedLatticeAddCommGroup G\nhp : Fact (1 ≤ p)\nhp_ne_top : p ≠ ⊤\ng : { g // 0 ≤ g }\nthis✝¹ : MeasurableSpace G := borel G\nthis✝ : BorelSpace G\nhg_memℒp : Memℒp (↑↑↑g) p\nzero_mem : 0 ∈ (Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y}\nthis : SeparableSpace ↑((Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y})\ng_meas : Measurable ↑↑↑g\nx : ℕ → α →ₛ G := fun n => SimpleFunc.approxOn (↑↑↑g) g_meas ((Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y}) 0 zero_mem n\nhx_nonneg : ∀ (n : ℕ), 0 ≤ x n\nhx_memℒp : ∀ (n : ℕ), Memℒp (↑(x n)) p\nh_toLp : ∀ (n : ℕ), ↑↑(Memℒp.toLp ↑(x n) (_ : Memℒp (↑(x n)) p)) =ᵐ[μ] ↑(x n)\nhx_nonneg_Lp : ∀ (n : ℕ), 0 ≤ toLp (x n) (_ : Memℒp (↑(x n)) p)\nhx_tendsto : Tendsto (fun n => snorm (↑(x n) - ↑↑↑g) p μ) atTop (𝓝 0)\n⊢ ∃ x, (∀ (n : ℕ), x n ∈ Set.range (coeSimpleFuncNonnegToLpNonneg p μ G)) ∧ Tendsto x atTop (𝓝 g)\n[PROOFSTEP]\nrefine'\n  ⟨fun n => (coeSimpleFuncNonnegToLpNonneg p μ G) ⟨toLp (x n) (hx_memℒp n), hx_nonneg_Lp n⟩, fun n => mem_range_self _,\n    _⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nG : Type u_7\ninst✝ : NormedLatticeAddCommGroup G\nhp : Fact (1 ≤ p)\nhp_ne_top : p ≠ ⊤\ng : { g // 0 ≤ g }\nthis✝¹ : MeasurableSpace G := borel G\nthis✝ : BorelSpace G\nhg_memℒp : Memℒp (↑↑↑g) p\nzero_mem : 0 ∈ (Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y}\nthis : SeparableSpace ↑((Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y})\ng_meas : Measurable ↑↑↑g\nx : ℕ → α →ₛ G := fun n => SimpleFunc.approxOn (↑↑↑g) g_meas ((Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y}) 0 zero_mem n\nhx_nonneg : ∀ (n : ℕ), 0 ≤ x n\nhx_memℒp : ∀ (n : ℕ), Memℒp (↑(x n)) p\nh_toLp : ∀ (n : ℕ), ↑↑(Memℒp.toLp ↑(x n) (_ : Memℒp (↑(x n)) p)) =ᵐ[μ] ↑(x n)\nhx_nonneg_Lp : ∀ (n : ℕ), 0 ≤ toLp (x n) (_ : Memℒp (↑(x n)) p)\nhx_tendsto : Tendsto (fun n => snorm (↑(x n) - ↑↑↑g) p μ) atTop (𝓝 0)\n⊢ Tendsto\n    (fun n =>\n      coeSimpleFuncNonnegToLpNonneg p μ G\n        { val := toLp (x n) (_ : Memℒp (↑(x n)) p), property := (_ : 0 ≤ toLp (x n) (_ : Memℒp (↑(x n)) p)) })\n    atTop (𝓝 g)\n[PROOFSTEP]\nsuffices Tendsto (fun n : ℕ => (toLp (x n) (hx_memℒp n) : Lp G p μ)) atTop (𝓝 (g : Lp G p μ))\n  by\n  rw [tendsto_iff_dist_tendsto_zero] at this ⊢\n  simp_rw [Subtype.dist_eq]\n  exact this\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nG : Type u_7\ninst✝ : NormedLatticeAddCommGroup G\nhp : Fact (1 ≤ p)\nhp_ne_top : p ≠ ⊤\ng : { g // 0 ≤ g }\nthis✝² : MeasurableSpace G := borel G\nthis✝¹ : BorelSpace G\nhg_memℒp : Memℒp (↑↑↑g) p\nzero_mem : 0 ∈ (Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y}\nthis✝ : SeparableSpace ↑((Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y})\ng_meas : Measurable ↑↑↑g\nx : ℕ → α →ₛ G := fun n => SimpleFunc.approxOn (↑↑↑g) g_meas ((Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y}) 0 zero_mem n\nhx_nonneg : ∀ (n : ℕ), 0 ≤ x n\nhx_memℒp : ∀ (n : ℕ), Memℒp (↑(x n)) p\nh_toLp : ∀ (n : ℕ), ↑↑(Memℒp.toLp ↑(x n) (_ : Memℒp (↑(x n)) p)) =ᵐ[μ] ↑(x n)\nhx_nonneg_Lp : ∀ (n : ℕ), 0 ≤ toLp (x n) (_ : Memℒp (↑(x n)) p)\nhx_tendsto : Tendsto (fun n => snorm (↑(x n) - ↑↑↑g) p μ) atTop (𝓝 0)\nthis : Tendsto (fun n => ↑(toLp (x n) (_ : Memℒp (↑(x n)) p))) atTop (𝓝 ↑g)\n⊢ Tendsto\n    (fun n =>\n      coeSimpleFuncNonnegToLpNonneg p μ G\n        { val := toLp (x n) (_ : Memℒp (↑(x n)) p), property := (_ : 0 ≤ toLp (x n) (_ : Memℒp (↑(x n)) p)) })\n    atTop (𝓝 g)\n[PROOFSTEP]\nrw [tendsto_iff_dist_tendsto_zero] at this ⊢\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nG : Type u_7\ninst✝ : NormedLatticeAddCommGroup G\nhp : Fact (1 ≤ p)\nhp_ne_top : p ≠ ⊤\ng : { g // 0 ≤ g }\nthis✝² : MeasurableSpace G := borel G\nthis✝¹ : BorelSpace G\nhg_memℒp : Memℒp (↑↑↑g) p\nzero_mem : 0 ∈ (Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y}\nthis✝ : SeparableSpace ↑((Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y})\ng_meas : Measurable ↑↑↑g\nx : ℕ → α →ₛ G := fun n => SimpleFunc.approxOn (↑↑↑g) g_meas ((Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y}) 0 zero_mem n\nhx_nonneg : ∀ (n : ℕ), 0 ≤ x n\nhx_memℒp : ∀ (n : ℕ), Memℒp (↑(x n)) p\nh_toLp : ∀ (n : ℕ), ↑↑(Memℒp.toLp ↑(x n) (_ : Memℒp (↑(x n)) p)) =ᵐ[μ] ↑(x n)\nhx_nonneg_Lp : ∀ (n : ℕ), 0 ≤ toLp (x n) (_ : Memℒp (↑(x n)) p)\nhx_tendsto : Tendsto (fun n => snorm (↑(x n) - ↑↑↑g) p μ) atTop (𝓝 0)\nthis : Tendsto (fun b => dist ↑(toLp (x b) (_ : Memℒp (↑(x b)) p)) ↑g) atTop (𝓝 0)\n⊢ Tendsto\n    (fun b =>\n      dist\n        (coeSimpleFuncNonnegToLpNonneg p μ G\n          { val := toLp (x b) (_ : Memℒp (↑(x b)) p), property := (_ : 0 ≤ toLp (x b) (_ : Memℒp (↑(x b)) p)) })\n        g)\n    atTop (𝓝 0)\n[PROOFSTEP]\nsimp_rw [Subtype.dist_eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nG : Type u_7\ninst✝ : NormedLatticeAddCommGroup G\nhp : Fact (1 ≤ p)\nhp_ne_top : p ≠ ⊤\ng : { g // 0 ≤ g }\nthis✝² : MeasurableSpace G := borel G\nthis✝¹ : BorelSpace G\nhg_memℒp : Memℒp (↑↑↑g) p\nzero_mem : 0 ∈ (Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y}\nthis✝ : SeparableSpace ↑((Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y})\ng_meas : Measurable ↑↑↑g\nx : ℕ → α →ₛ G := fun n => SimpleFunc.approxOn (↑↑↑g) g_meas ((Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y}) 0 zero_mem n\nhx_nonneg : ∀ (n : ℕ), 0 ≤ x n\nhx_memℒp : ∀ (n : ℕ), Memℒp (↑(x n)) p\nh_toLp : ∀ (n : ℕ), ↑↑(Memℒp.toLp ↑(x n) (_ : Memℒp (↑(x n)) p)) =ᵐ[μ] ↑(x n)\nhx_nonneg_Lp : ∀ (n : ℕ), 0 ≤ toLp (x n) (_ : Memℒp (↑(x n)) p)\nhx_tendsto : Tendsto (fun n => snorm (↑(x n) - ↑↑↑g) p μ) atTop (𝓝 0)\nthis : Tendsto (fun b => dist ↑(toLp (x b) (_ : Memℒp (↑(x b)) p)) ↑g) atTop (𝓝 0)\n⊢ Tendsto\n    (fun b =>\n      dist\n        ↑(coeSimpleFuncNonnegToLpNonneg p μ G\n            {\n              val :=\n                toLp (SimpleFunc.approxOn (↑↑↑g) g_meas ((Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y}) 0 zero_mem b)\n                  (_ : Memℒp (↑(x b)) p),\n              property := (_ : 0 ≤ toLp (x b) (_ : Memℒp (↑(x b)) p)) })\n        ↑g)\n    atTop (𝓝 0)\n[PROOFSTEP]\nexact this\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nG : Type u_7\ninst✝ : NormedLatticeAddCommGroup G\nhp : Fact (1 ≤ p)\nhp_ne_top : p ≠ ⊤\ng : { g // 0 ≤ g }\nthis✝¹ : MeasurableSpace G := borel G\nthis✝ : BorelSpace G\nhg_memℒp : Memℒp (↑↑↑g) p\nzero_mem : 0 ∈ (Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y}\nthis : SeparableSpace ↑((Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y})\ng_meas : Measurable ↑↑↑g\nx : ℕ → α →ₛ G := fun n => SimpleFunc.approxOn (↑↑↑g) g_meas ((Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y}) 0 zero_mem n\nhx_nonneg : ∀ (n : ℕ), 0 ≤ x n\nhx_memℒp : ∀ (n : ℕ), Memℒp (↑(x n)) p\nh_toLp : ∀ (n : ℕ), ↑↑(Memℒp.toLp ↑(x n) (_ : Memℒp (↑(x n)) p)) =ᵐ[μ] ↑(x n)\nhx_nonneg_Lp : ∀ (n : ℕ), 0 ≤ toLp (x n) (_ : Memℒp (↑(x n)) p)\nhx_tendsto : Tendsto (fun n => snorm (↑(x n) - ↑↑↑g) p μ) atTop (𝓝 0)\n⊢ Tendsto (fun n => ↑(toLp (x n) (_ : Memℒp (↑(x n)) p))) atTop (𝓝 ↑g)\n[PROOFSTEP]\nrw [Lp.tendsto_Lp_iff_tendsto_ℒp']\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nG : Type u_7\ninst✝ : NormedLatticeAddCommGroup G\nhp : Fact (1 ≤ p)\nhp_ne_top : p ≠ ⊤\ng : { g // 0 ≤ g }\nthis✝¹ : MeasurableSpace G := borel G\nthis✝ : BorelSpace G\nhg_memℒp : Memℒp (↑↑↑g) p\nzero_mem : 0 ∈ (Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y}\nthis : SeparableSpace ↑((Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y})\ng_meas : Measurable ↑↑↑g\nx : ℕ → α →ₛ G := fun n => SimpleFunc.approxOn (↑↑↑g) g_meas ((Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y}) 0 zero_mem n\nhx_nonneg : ∀ (n : ℕ), 0 ≤ x n\nhx_memℒp : ∀ (n : ℕ), Memℒp (↑(x n)) p\nh_toLp : ∀ (n : ℕ), ↑↑(Memℒp.toLp ↑(x n) (_ : Memℒp (↑(x n)) p)) =ᵐ[μ] ↑(x n)\nhx_nonneg_Lp : ∀ (n : ℕ), 0 ≤ toLp (x n) (_ : Memℒp (↑(x n)) p)\nhx_tendsto : Tendsto (fun n => snorm (↑(x n) - ↑↑↑g) p μ) atTop (𝓝 0)\n⊢ Tendsto (fun n => snorm (↑↑↑(toLp (x n) (_ : Memℒp (↑(x n)) p)) - ↑↑↑g) p μ) atTop (𝓝 0)\n[PROOFSTEP]\nrefine Filter.Tendsto.congr (fun n => snorm_congr_ae (EventuallyEq.sub ?_ ?_)) hx_tendsto\n[GOAL]\ncase refine_1\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nG : Type u_7\ninst✝ : NormedLatticeAddCommGroup G\nhp : Fact (1 ≤ p)\nhp_ne_top : p ≠ ⊤\ng : { g // 0 ≤ g }\nthis✝¹ : MeasurableSpace G := borel G\nthis✝ : BorelSpace G\nhg_memℒp : Memℒp (↑↑↑g) p\nzero_mem : 0 ∈ (Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y}\nthis : SeparableSpace ↑((Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y})\ng_meas : Measurable ↑↑↑g\nx : ℕ → α →ₛ G := fun n => SimpleFunc.approxOn (↑↑↑g) g_meas ((Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y}) 0 zero_mem n\nhx_nonneg : ∀ (n : ℕ), 0 ≤ x n\nhx_memℒp : ∀ (n : ℕ), Memℒp (↑(x n)) p\nh_toLp : ∀ (n : ℕ), ↑↑(Memℒp.toLp ↑(x n) (_ : Memℒp (↑(x n)) p)) =ᵐ[μ] ↑(x n)\nhx_nonneg_Lp : ∀ (n : ℕ), 0 ≤ toLp (x n) (_ : Memℒp (↑(x n)) p)\nhx_tendsto : Tendsto (fun n => snorm (↑(x n) - ↑↑↑g) p μ) atTop (𝓝 0)\nn : ℕ\n⊢ (fun x_1 => ↑(x n) x_1) =ᵐ[μ] fun x_1 => ↑↑↑(toLp (x n) (_ : Memℒp (↑(x n)) p)) x_1\n[PROOFSTEP]\nsymm\n[GOAL]\ncase refine_1\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nG : Type u_7\ninst✝ : NormedLatticeAddCommGroup G\nhp : Fact (1 ≤ p)\nhp_ne_top : p ≠ ⊤\ng : { g // 0 ≤ g }\nthis✝¹ : MeasurableSpace G := borel G\nthis✝ : BorelSpace G\nhg_memℒp : Memℒp (↑↑↑g) p\nzero_mem : 0 ∈ (Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y}\nthis : SeparableSpace ↑((Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y})\ng_meas : Measurable ↑↑↑g\nx : ℕ → α →ₛ G := fun n => SimpleFunc.approxOn (↑↑↑g) g_meas ((Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y}) 0 zero_mem n\nhx_nonneg : ∀ (n : ℕ), 0 ≤ x n\nhx_memℒp : ∀ (n : ℕ), Memℒp (↑(x n)) p\nh_toLp : ∀ (n : ℕ), ↑↑(Memℒp.toLp ↑(x n) (_ : Memℒp (↑(x n)) p)) =ᵐ[μ] ↑(x n)\nhx_nonneg_Lp : ∀ (n : ℕ), 0 ≤ toLp (x n) (_ : Memℒp (↑(x n)) p)\nhx_tendsto : Tendsto (fun n => snorm (↑(x n) - ↑↑↑g) p μ) atTop (𝓝 0)\nn : ℕ\n⊢ (fun x_1 => ↑↑↑(toLp (x n) (_ : Memℒp (↑(x n)) p)) x_1) =ᵐ[μ] fun x_1 => ↑(x n) x_1\n[PROOFSTEP]\nrw [Lp.simpleFunc.toLp_eq_toLp]\n[GOAL]\ncase refine_1\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nG : Type u_7\ninst✝ : NormedLatticeAddCommGroup G\nhp : Fact (1 ≤ p)\nhp_ne_top : p ≠ ⊤\ng : { g // 0 ≤ g }\nthis✝¹ : MeasurableSpace G := borel G\nthis✝ : BorelSpace G\nhg_memℒp : Memℒp (↑↑↑g) p\nzero_mem : 0 ∈ (Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y}\nthis : SeparableSpace ↑((Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y})\ng_meas : Measurable ↑↑↑g\nx : ℕ → α →ₛ G := fun n => SimpleFunc.approxOn (↑↑↑g) g_meas ((Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y}) 0 zero_mem n\nhx_nonneg : ∀ (n : ℕ), 0 ≤ x n\nhx_memℒp : ∀ (n : ℕ), Memℒp (↑(x n)) p\nh_toLp : ∀ (n : ℕ), ↑↑(Memℒp.toLp ↑(x n) (_ : Memℒp (↑(x n)) p)) =ᵐ[μ] ↑(x n)\nhx_nonneg_Lp : ∀ (n : ℕ), 0 ≤ toLp (x n) (_ : Memℒp (↑(x n)) p)\nhx_tendsto : Tendsto (fun n => snorm (↑(x n) - ↑↑↑g) p μ) atTop (𝓝 0)\nn : ℕ\n⊢ (fun x_1 => ↑↑(Memℒp.toLp ↑(x n) (_ : Memℒp (↑(x n)) p)) x_1) =ᵐ[μ] fun x_1 => ↑(x n) x_1\n[PROOFSTEP]\nexact h_toLp n\n[GOAL]\ncase refine_2\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝³ : MeasurableSpace α\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedAddCommGroup F\np : ℝ≥0∞\nμ : Measure α\nG : Type u_7\ninst✝ : NormedLatticeAddCommGroup G\nhp : Fact (1 ≤ p)\nhp_ne_top : p ≠ ⊤\ng : { g // 0 ≤ g }\nthis✝¹ : MeasurableSpace G := borel G\nthis✝ : BorelSpace G\nhg_memℒp : Memℒp (↑↑↑g) p\nzero_mem : 0 ∈ (Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y}\nthis : SeparableSpace ↑((Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y})\ng_meas : Measurable ↑↑↑g\nx : ℕ → α →ₛ G := fun n => SimpleFunc.approxOn (↑↑↑g) g_meas ((Set.range ↑↑↑g ∪ {0}) ∩ {y | 0 ≤ y}) 0 zero_mem n\nhx_nonneg : ∀ (n : ℕ), 0 ≤ x n\nhx_memℒp : ∀ (n : ℕ), Memℒp (↑(x n)) p\nh_toLp : ∀ (n : ℕ), ↑↑(Memℒp.toLp ↑(x n) (_ : Memℒp (↑(x n)) p)) =ᵐ[μ] ↑(x n)\nhx_nonneg_Lp : ∀ (n : ℕ), 0 ≤ toLp (x n) (_ : Memℒp (↑(x n)) p)\nhx_tendsto : Tendsto (fun n => snorm (↑(x n) - ↑↑↑g) p μ) atTop (𝓝 0)\nn : ℕ\n⊢ (fun x => ↑↑↑g x) =ᵐ[μ] fun x => ↑↑↑g x\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf : α → E\np : ℝ≥0∞\nμ : Measure α\n_i : Fact (1 ≤ p)\nhp_ne_top : p ≠ ⊤\nP : { x // x ∈ Lp E p } → Prop\nh_ind :\n  ∀ (c : E) {s : Set α} (hs : MeasurableSet s) (hμs : ↑↑μ s < ⊤), P ↑(simpleFunc.indicatorConst p hs (_ : ↑↑μ s ≠ ⊤) c)\nh_add :\n  ∀ ⦃f g : α → E⦄ (hf : Memℒp f p) (hg : Memℒp g p),\n    Disjoint (support f) (support g) → P (Memℒp.toLp f hf) → P (Memℒp.toLp g hg) → P (Memℒp.toLp f hf + Memℒp.toLp g hg)\nh_closed : IsClosed {f | P f}\n⊢ ∀ (f : { x // x ∈ Lp E p }), P f\n[PROOFSTEP]\nrefine' fun f => (Lp.simpleFunc.denseRange hp_ne_top).induction_on f h_closed _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf✝ : α → E\np : ℝ≥0∞\nμ : Measure α\n_i : Fact (1 ≤ p)\nhp_ne_top : p ≠ ⊤\nP : { x // x ∈ Lp E p } → Prop\nh_ind :\n  ∀ (c : E) {s : Set α} (hs : MeasurableSet s) (hμs : ↑↑μ s < ⊤), P ↑(simpleFunc.indicatorConst p hs (_ : ↑↑μ s ≠ ⊤) c)\nh_add :\n  ∀ ⦃f g : α → E⦄ (hf : Memℒp f p) (hg : Memℒp g p),\n    Disjoint (support f) (support g) → P (Memℒp.toLp f hf) → P (Memℒp.toLp g hg) → P (Memℒp.toLp f hf + Memℒp.toLp g hg)\nh_closed : IsClosed {f | P f}\nf : { x // x ∈ Lp E p }\n⊢ ∀ (a : { x // x ∈ ↑(simpleFunc E p μ) }), P ↑a\n[PROOFSTEP]\nrefine' Lp.simpleFunc.induction (α := α) (E := E) (lt_of_lt_of_le zero_lt_one _i.elim).ne' hp_ne_top _ _\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf✝ : α → E\np : ℝ≥0∞\nμ : Measure α\n_i : Fact (1 ≤ p)\nhp_ne_top : p ≠ ⊤\nP : { x // x ∈ Lp E p } → Prop\nh_ind :\n  ∀ (c : E) {s : Set α} (hs : MeasurableSet s) (hμs : ↑↑μ s < ⊤), P ↑(simpleFunc.indicatorConst p hs (_ : ↑↑μ s ≠ ⊤) c)\nh_add :\n  ∀ ⦃f g : α → E⦄ (hf : Memℒp f p) (hg : Memℒp g p),\n    Disjoint (support f) (support g) → P (Memℒp.toLp f hf) → P (Memℒp.toLp g hg) → P (Memℒp.toLp f hf + Memℒp.toLp g hg)\nh_closed : IsClosed {f | P f}\nf : { x // x ∈ Lp E p }\n⊢ ∀ (c : E) {s : Set α} (hs : MeasurableSet s) (hμs : ↑↑μ s < ⊤), P ↑(simpleFunc.indicatorConst p hs (_ : ↑↑μ s ≠ ⊤) c)\n[PROOFSTEP]\nexact fun c s => h_ind c\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf✝ : α → E\np : ℝ≥0∞\nμ : Measure α\n_i : Fact (1 ≤ p)\nhp_ne_top : p ≠ ⊤\nP : { x // x ∈ Lp E p } → Prop\nh_ind :\n  ∀ (c : E) {s : Set α} (hs : MeasurableSet s) (hμs : ↑↑μ s < ⊤), P ↑(simpleFunc.indicatorConst p hs (_ : ↑↑μ s ≠ ⊤) c)\nh_add :\n  ∀ ⦃f g : α → E⦄ (hf : Memℒp f p) (hg : Memℒp g p),\n    Disjoint (support f) (support g) → P (Memℒp.toLp f hf) → P (Memℒp.toLp g hg) → P (Memℒp.toLp f hf + Memℒp.toLp g hg)\nh_closed : IsClosed {f | P f}\nf : { x // x ∈ Lp E p }\n⊢ ∀ ⦃f g : α →ₛ E⦄ (hf : Memℒp (↑f) p) (hg : Memℒp (↑g) p),\n    Disjoint (support ↑f) (support ↑g) →\n      P ↑(simpleFunc.toLp f hf) → P ↑(simpleFunc.toLp g hg) → P ↑(simpleFunc.toLp f hf + simpleFunc.toLp g hg)\n[PROOFSTEP]\nexact fun f g hf hg => h_add hf hg\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf : α → E\np : ℝ≥0∞\nμ : Measure α\n_i : Fact (1 ≤ p)\nhp_ne_top : p ≠ ⊤\nP : (α → E) → Prop\nh_ind : ∀ (c : E) ⦃s : Set α⦄, MeasurableSet s → ↑↑μ s < ⊤ → P (Set.indicator s fun x => c)\nh_add : ∀ ⦃f g : α → E⦄, Disjoint (support f) (support g) → Memℒp f p → Memℒp g p → P f → P g → P (f + g)\nh_closed : IsClosed {f | P ↑↑f}\nh_ae : ∀ ⦃f g : α → E⦄, f =ᵐ[μ] g → Memℒp f p → P f → P g\n⊢ ∀ ⦃f : α → E⦄, Memℒp f p → P f\n[PROOFSTEP]\nhave : ∀ f : SimpleFunc α E, Memℒp f p μ → P f :=\n  by\n  apply SimpleFunc.induction\n  · intro c s hs h\n    by_cases hc : c = 0\n    · subst hc; convert h_ind 0 MeasurableSet.empty (by simp) using 1; ext; simp [const]\n    have hp_pos : p ≠ 0 := (lt_of_lt_of_le zero_lt_one _i.elim).ne'\n    exact h_ind c hs (SimpleFunc.measure_lt_top_of_memℒp_indicator hp_pos hp_ne_top hc hs h)\n  · intro f g hfg hf hg int_fg\n    rw [SimpleFunc.coe_add, memℒp_add_of_disjoint hfg f.stronglyMeasurable g.stronglyMeasurable] at int_fg \n    refine' h_add hfg int_fg.1 int_fg.2 (hf int_fg.1) (hg int_fg.2)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf : α → E\np : ℝ≥0∞\nμ : Measure α\n_i : Fact (1 ≤ p)\nhp_ne_top : p ≠ ⊤\nP : (α → E) → Prop\nh_ind : ∀ (c : E) ⦃s : Set α⦄, MeasurableSet s → ↑↑μ s < ⊤ → P (Set.indicator s fun x => c)\nh_add : ∀ ⦃f g : α → E⦄, Disjoint (support f) (support g) → Memℒp f p → Memℒp g p → P f → P g → P (f + g)\nh_closed : IsClosed {f | P ↑↑f}\nh_ae : ∀ ⦃f g : α → E⦄, f =ᵐ[μ] g → Memℒp f p → P f → P g\n⊢ ∀ (f : α →ₛ E), Memℒp (↑f) p → P ↑f\n[PROOFSTEP]\napply SimpleFunc.induction\n[GOAL]\ncase h_ind\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf : α → E\np : ℝ≥0∞\nμ : Measure α\n_i : Fact (1 ≤ p)\nhp_ne_top : p ≠ ⊤\nP : (α → E) → Prop\nh_ind : ∀ (c : E) ⦃s : Set α⦄, MeasurableSet s → ↑↑μ s < ⊤ → P (Set.indicator s fun x => c)\nh_add : ∀ ⦃f g : α → E⦄, Disjoint (support f) (support g) → Memℒp f p → Memℒp g p → P f → P g → P (f + g)\nh_closed : IsClosed {f | P ↑↑f}\nh_ae : ∀ ⦃f g : α → E⦄, f =ᵐ[μ] g → Memℒp f p → P f → P g\n⊢ ∀ (c : E) {s : Set α} (hs : MeasurableSet s),\n    Memℒp (↑(SimpleFunc.piecewise s hs (SimpleFunc.const α c) (SimpleFunc.const α 0))) p →\n      P ↑(SimpleFunc.piecewise s hs (SimpleFunc.const α c) (SimpleFunc.const α 0))\n[PROOFSTEP]\nintro c s hs h\n[GOAL]\ncase h_ind\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf : α → E\np : ℝ≥0∞\nμ : Measure α\n_i : Fact (1 ≤ p)\nhp_ne_top : p ≠ ⊤\nP : (α → E) → Prop\nh_ind : ∀ (c : E) ⦃s : Set α⦄, MeasurableSet s → ↑↑μ s < ⊤ → P (Set.indicator s fun x => c)\nh_add : ∀ ⦃f g : α → E⦄, Disjoint (support f) (support g) → Memℒp f p → Memℒp g p → P f → P g → P (f + g)\nh_closed : IsClosed {f | P ↑↑f}\nh_ae : ∀ ⦃f g : α → E⦄, f =ᵐ[μ] g → Memℒp f p → P f → P g\nc : E\ns : Set α\nhs : MeasurableSet s\nh : Memℒp (↑(SimpleFunc.piecewise s hs (SimpleFunc.const α c) (SimpleFunc.const α 0))) p\n⊢ P ↑(SimpleFunc.piecewise s hs (SimpleFunc.const α c) (SimpleFunc.const α 0))\n[PROOFSTEP]\nby_cases hc : c = 0\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf : α → E\np : ℝ≥0∞\nμ : Measure α\n_i : Fact (1 ≤ p)\nhp_ne_top : p ≠ ⊤\nP : (α → E) → Prop\nh_ind : ∀ (c : E) ⦃s : Set α⦄, MeasurableSet s → ↑↑μ s < ⊤ → P (Set.indicator s fun x => c)\nh_add : ∀ ⦃f g : α → E⦄, Disjoint (support f) (support g) → Memℒp f p → Memℒp g p → P f → P g → P (f + g)\nh_closed : IsClosed {f | P ↑↑f}\nh_ae : ∀ ⦃f g : α → E⦄, f =ᵐ[μ] g → Memℒp f p → P f → P g\nc : E\ns : Set α\nhs : MeasurableSet s\nh : Memℒp (↑(SimpleFunc.piecewise s hs (SimpleFunc.const α c) (SimpleFunc.const α 0))) p\nhc : c = 0\n⊢ P ↑(SimpleFunc.piecewise s hs (SimpleFunc.const α c) (SimpleFunc.const α 0))\n[PROOFSTEP]\nsubst hc\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf : α → E\np : ℝ≥0∞\nμ : Measure α\n_i : Fact (1 ≤ p)\nhp_ne_top : p ≠ ⊤\nP : (α → E) → Prop\nh_ind : ∀ (c : E) ⦃s : Set α⦄, MeasurableSet s → ↑↑μ s < ⊤ → P (Set.indicator s fun x => c)\nh_add : ∀ ⦃f g : α → E⦄, Disjoint (support f) (support g) → Memℒp f p → Memℒp g p → P f → P g → P (f + g)\nh_closed : IsClosed {f | P ↑↑f}\nh_ae : ∀ ⦃f g : α → E⦄, f =ᵐ[μ] g → Memℒp f p → P f → P g\ns : Set α\nhs : MeasurableSet s\nh : Memℒp (↑(SimpleFunc.piecewise s hs (SimpleFunc.const α 0) (SimpleFunc.const α 0))) p\n⊢ P ↑(SimpleFunc.piecewise s hs (SimpleFunc.const α 0) (SimpleFunc.const α 0))\n[PROOFSTEP]\nconvert h_ind 0 MeasurableSet.empty (by simp) using 1\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf : α → E\np : ℝ≥0∞\nμ : Measure α\n_i : Fact (1 ≤ p)\nhp_ne_top : p ≠ ⊤\nP : (α → E) → Prop\nh_ind : ∀ (c : E) ⦃s : Set α⦄, MeasurableSet s → ↑↑μ s < ⊤ → P (Set.indicator s fun x => c)\nh_add : ∀ ⦃f g : α → E⦄, Disjoint (support f) (support g) → Memℒp f p → Memℒp g p → P f → P g → P (f + g)\nh_closed : IsClosed {f | P ↑↑f}\nh_ae : ∀ ⦃f g : α → E⦄, f =ᵐ[μ] g → Memℒp f p → P f → P g\ns : Set α\nhs : MeasurableSet s\nh : Memℒp (↑(SimpleFunc.piecewise s hs (SimpleFunc.const α 0) (SimpleFunc.const α 0))) p\n⊢ ↑↑μ ∅ < ⊤\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.e'_1\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf : α → E\np : ℝ≥0∞\nμ : Measure α\n_i : Fact (1 ≤ p)\nhp_ne_top : p ≠ ⊤\nP : (α → E) → Prop\nh_ind : ∀ (c : E) ⦃s : Set α⦄, MeasurableSet s → ↑↑μ s < ⊤ → P (Set.indicator s fun x => c)\nh_add : ∀ ⦃f g : α → E⦄, Disjoint (support f) (support g) → Memℒp f p → Memℒp g p → P f → P g → P (f + g)\nh_closed : IsClosed {f | P ↑↑f}\nh_ae : ∀ ⦃f g : α → E⦄, f =ᵐ[μ] g → Memℒp f p → P f → P g\ns : Set α\nhs : MeasurableSet s\nh : Memℒp (↑(SimpleFunc.piecewise s hs (SimpleFunc.const α 0) (SimpleFunc.const α 0))) p\n⊢ ↑(SimpleFunc.piecewise s hs (SimpleFunc.const α 0) (SimpleFunc.const α 0)) = Set.indicator ∅ fun x => 0\n[PROOFSTEP]\next\n[GOAL]\ncase h.e'_1.h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf : α → E\np : ℝ≥0∞\nμ : Measure α\n_i : Fact (1 ≤ p)\nhp_ne_top : p ≠ ⊤\nP : (α → E) → Prop\nh_ind : ∀ (c : E) ⦃s : Set α⦄, MeasurableSet s → ↑↑μ s < ⊤ → P (Set.indicator s fun x => c)\nh_add : ∀ ⦃f g : α → E⦄, Disjoint (support f) (support g) → Memℒp f p → Memℒp g p → P f → P g → P (f + g)\nh_closed : IsClosed {f | P ↑↑f}\nh_ae : ∀ ⦃f g : α → E⦄, f =ᵐ[μ] g → Memℒp f p → P f → P g\ns : Set α\nhs : MeasurableSet s\nh : Memℒp (↑(SimpleFunc.piecewise s hs (SimpleFunc.const α 0) (SimpleFunc.const α 0))) p\nx✝ : α\n⊢ ↑(SimpleFunc.piecewise s hs (SimpleFunc.const α 0) (SimpleFunc.const α 0)) x✝ = Set.indicator ∅ (fun x => 0) x✝\n[PROOFSTEP]\nsimp [const]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf : α → E\np : ℝ≥0∞\nμ : Measure α\n_i : Fact (1 ≤ p)\nhp_ne_top : p ≠ ⊤\nP : (α → E) → Prop\nh_ind : ∀ (c : E) ⦃s : Set α⦄, MeasurableSet s → ↑↑μ s < ⊤ → P (Set.indicator s fun x => c)\nh_add : ∀ ⦃f g : α → E⦄, Disjoint (support f) (support g) → Memℒp f p → Memℒp g p → P f → P g → P (f + g)\nh_closed : IsClosed {f | P ↑↑f}\nh_ae : ∀ ⦃f g : α → E⦄, f =ᵐ[μ] g → Memℒp f p → P f → P g\nc : E\ns : Set α\nhs : MeasurableSet s\nh : Memℒp (↑(SimpleFunc.piecewise s hs (SimpleFunc.const α c) (SimpleFunc.const α 0))) p\nhc : ¬c = 0\n⊢ P ↑(SimpleFunc.piecewise s hs (SimpleFunc.const α c) (SimpleFunc.const α 0))\n[PROOFSTEP]\nhave hp_pos : p ≠ 0 := (lt_of_lt_of_le zero_lt_one _i.elim).ne'\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf : α → E\np : ℝ≥0∞\nμ : Measure α\n_i : Fact (1 ≤ p)\nhp_ne_top : p ≠ ⊤\nP : (α → E) → Prop\nh_ind : ∀ (c : E) ⦃s : Set α⦄, MeasurableSet s → ↑↑μ s < ⊤ → P (Set.indicator s fun x => c)\nh_add : ∀ ⦃f g : α → E⦄, Disjoint (support f) (support g) → Memℒp f p → Memℒp g p → P f → P g → P (f + g)\nh_closed : IsClosed {f | P ↑↑f}\nh_ae : ∀ ⦃f g : α → E⦄, f =ᵐ[μ] g → Memℒp f p → P f → P g\nc : E\ns : Set α\nhs : MeasurableSet s\nh : Memℒp (↑(SimpleFunc.piecewise s hs (SimpleFunc.const α c) (SimpleFunc.const α 0))) p\nhc : ¬c = 0\nhp_pos : p ≠ 0\n⊢ P ↑(SimpleFunc.piecewise s hs (SimpleFunc.const α c) (SimpleFunc.const α 0))\n[PROOFSTEP]\nexact h_ind c hs (SimpleFunc.measure_lt_top_of_memℒp_indicator hp_pos hp_ne_top hc hs h)\n[GOAL]\ncase h_add\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf : α → E\np : ℝ≥0∞\nμ : Measure α\n_i : Fact (1 ≤ p)\nhp_ne_top : p ≠ ⊤\nP : (α → E) → Prop\nh_ind : ∀ (c : E) ⦃s : Set α⦄, MeasurableSet s → ↑↑μ s < ⊤ → P (Set.indicator s fun x => c)\nh_add : ∀ ⦃f g : α → E⦄, Disjoint (support f) (support g) → Memℒp f p → Memℒp g p → P f → P g → P (f + g)\nh_closed : IsClosed {f | P ↑↑f}\nh_ae : ∀ ⦃f g : α → E⦄, f =ᵐ[μ] g → Memℒp f p → P f → P g\n⊢ ∀ ⦃f g : α →ₛ E⦄,\n    Disjoint (support ↑f) (support ↑g) → (Memℒp (↑f) p → P ↑f) → (Memℒp (↑g) p → P ↑g) → Memℒp (↑(f + g)) p → P ↑(f + g)\n[PROOFSTEP]\nintro f g hfg hf hg int_fg\n[GOAL]\ncase h_add\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf✝ : α → E\np : ℝ≥0∞\nμ : Measure α\n_i : Fact (1 ≤ p)\nhp_ne_top : p ≠ ⊤\nP : (α → E) → Prop\nh_ind : ∀ (c : E) ⦃s : Set α⦄, MeasurableSet s → ↑↑μ s < ⊤ → P (Set.indicator s fun x => c)\nh_add : ∀ ⦃f g : α → E⦄, Disjoint (support f) (support g) → Memℒp f p → Memℒp g p → P f → P g → P (f + g)\nh_closed : IsClosed {f | P ↑↑f}\nh_ae : ∀ ⦃f g : α → E⦄, f =ᵐ[μ] g → Memℒp f p → P f → P g\nf g : α →ₛ E\nhfg : Disjoint (support ↑f) (support ↑g)\nhf : Memℒp (↑f) p → P ↑f\nhg : Memℒp (↑g) p → P ↑g\nint_fg : Memℒp (↑(f + g)) p\n⊢ P ↑(f + g)\n[PROOFSTEP]\nrw [SimpleFunc.coe_add, memℒp_add_of_disjoint hfg f.stronglyMeasurable g.stronglyMeasurable] at int_fg \n[GOAL]\ncase h_add\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf✝ : α → E\np : ℝ≥0∞\nμ : Measure α\n_i : Fact (1 ≤ p)\nhp_ne_top : p ≠ ⊤\nP : (α → E) → Prop\nh_ind : ∀ (c : E) ⦃s : Set α⦄, MeasurableSet s → ↑↑μ s < ⊤ → P (Set.indicator s fun x => c)\nh_add : ∀ ⦃f g : α → E⦄, Disjoint (support f) (support g) → Memℒp f p → Memℒp g p → P f → P g → P (f + g)\nh_closed : IsClosed {f | P ↑↑f}\nh_ae : ∀ ⦃f g : α → E⦄, f =ᵐ[μ] g → Memℒp f p → P f → P g\nf g : α →ₛ E\nhfg : Disjoint (support ↑f) (support ↑g)\nhf : Memℒp (↑f) p → P ↑f\nhg : Memℒp (↑g) p → P ↑g\nint_fg : Memℒp (↑f) p ∧ Memℒp (↑g) p\n⊢ P ↑(f + g)\n[PROOFSTEP]\nrefine' h_add hfg int_fg.1 int_fg.2 (hf int_fg.1) (hg int_fg.2)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf : α → E\np : ℝ≥0∞\nμ : Measure α\n_i : Fact (1 ≤ p)\nhp_ne_top : p ≠ ⊤\nP : (α → E) → Prop\nh_ind : ∀ (c : E) ⦃s : Set α⦄, MeasurableSet s → ↑↑μ s < ⊤ → P (Set.indicator s fun x => c)\nh_add : ∀ ⦃f g : α → E⦄, Disjoint (support f) (support g) → Memℒp f p → Memℒp g p → P f → P g → P (f + g)\nh_closed : IsClosed {f | P ↑↑f}\nh_ae : ∀ ⦃f g : α → E⦄, f =ᵐ[μ] g → Memℒp f p → P f → P g\nthis : ∀ (f : α →ₛ E), Memℒp (↑f) p → P ↑f\n⊢ ∀ ⦃f : α → E⦄, Memℒp f p → P f\n[PROOFSTEP]\nhave : ∀ f : Lp.simpleFunc E p μ, P f := by\n  intro f\n  exact\n    h_ae (Lp.simpleFunc.toSimpleFunc_eq_toFun f) (Lp.simpleFunc.memℒp f)\n      (this (Lp.simpleFunc.toSimpleFunc f) (Lp.simpleFunc.memℒp f))\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf : α → E\np : ℝ≥0∞\nμ : Measure α\n_i : Fact (1 ≤ p)\nhp_ne_top : p ≠ ⊤\nP : (α → E) → Prop\nh_ind : ∀ (c : E) ⦃s : Set α⦄, MeasurableSet s → ↑↑μ s < ⊤ → P (Set.indicator s fun x => c)\nh_add : ∀ ⦃f g : α → E⦄, Disjoint (support f) (support g) → Memℒp f p → Memℒp g p → P f → P g → P (f + g)\nh_closed : IsClosed {f | P ↑↑f}\nh_ae : ∀ ⦃f g : α → E⦄, f =ᵐ[μ] g → Memℒp f p → P f → P g\nthis : ∀ (f : α →ₛ E), Memℒp (↑f) p → P ↑f\n⊢ ∀ (f : { x // x ∈ Lp.simpleFunc E p μ }), P ↑↑↑f\n[PROOFSTEP]\nintro f\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf✝ : α → E\np : ℝ≥0∞\nμ : Measure α\n_i : Fact (1 ≤ p)\nhp_ne_top : p ≠ ⊤\nP : (α → E) → Prop\nh_ind : ∀ (c : E) ⦃s : Set α⦄, MeasurableSet s → ↑↑μ s < ⊤ → P (Set.indicator s fun x => c)\nh_add : ∀ ⦃f g : α → E⦄, Disjoint (support f) (support g) → Memℒp f p → Memℒp g p → P f → P g → P (f + g)\nh_closed : IsClosed {f | P ↑↑f}\nh_ae : ∀ ⦃f g : α → E⦄, f =ᵐ[μ] g → Memℒp f p → P f → P g\nthis : ∀ (f : α →ₛ E), Memℒp (↑f) p → P ↑f\nf : { x // x ∈ Lp.simpleFunc E p μ }\n⊢ P ↑↑↑f\n[PROOFSTEP]\nexact\n  h_ae (Lp.simpleFunc.toSimpleFunc_eq_toFun f) (Lp.simpleFunc.memℒp f)\n    (this (Lp.simpleFunc.toSimpleFunc f) (Lp.simpleFunc.memℒp f))\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf : α → E\np : ℝ≥0∞\nμ : Measure α\n_i : Fact (1 ≤ p)\nhp_ne_top : p ≠ ⊤\nP : (α → E) → Prop\nh_ind : ∀ (c : E) ⦃s : Set α⦄, MeasurableSet s → ↑↑μ s < ⊤ → P (Set.indicator s fun x => c)\nh_add : ∀ ⦃f g : α → E⦄, Disjoint (support f) (support g) → Memℒp f p → Memℒp g p → P f → P g → P (f + g)\nh_closed : IsClosed {f | P ↑↑f}\nh_ae : ∀ ⦃f g : α → E⦄, f =ᵐ[μ] g → Memℒp f p → P f → P g\nthis✝ : ∀ (f : α →ₛ E), Memℒp (↑f) p → P ↑f\nthis : ∀ (f : { x // x ∈ Lp.simpleFunc E p μ }), P ↑↑↑f\n⊢ ∀ ⦃f : α → E⦄, Memℒp f p → P f\n[PROOFSTEP]\nhave : ∀ f : Lp E p μ, P f := fun f => (Lp.simpleFunc.denseRange hp_ne_top).induction_on f h_closed this\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf : α → E\np : ℝ≥0∞\nμ : Measure α\n_i : Fact (1 ≤ p)\nhp_ne_top : p ≠ ⊤\nP : (α → E) → Prop\nh_ind : ∀ (c : E) ⦃s : Set α⦄, MeasurableSet s → ↑↑μ s < ⊤ → P (Set.indicator s fun x => c)\nh_add : ∀ ⦃f g : α → E⦄, Disjoint (support f) (support g) → Memℒp f p → Memℒp g p → P f → P g → P (f + g)\nh_closed : IsClosed {f | P ↑↑f}\nh_ae : ∀ ⦃f g : α → E⦄, f =ᵐ[μ] g → Memℒp f p → P f → P g\nthis✝¹ : ∀ (f : α →ₛ E), Memℒp (↑f) p → P ↑f\nthis✝ : ∀ (f : { x // x ∈ Lp.simpleFunc E p μ }), P ↑↑↑f\nthis : ∀ (f : { x // x ∈ Lp E p }), P ↑↑f\n⊢ ∀ ⦃f : α → E⦄, Memℒp f p → P f\n[PROOFSTEP]\nexact fun f hf => h_ae hf.coeFn_toLp (Lp.memℒp _) (this (hf.toLp f))\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf✝ : α → E\np : ℝ≥0∞\nμ : Measure α\nhp_ne_top : p ≠ ⊤\nP : (α → E) → Prop\nh0P :\n  ∀ (c : E) ⦃s : Set α⦄,\n    MeasurableSet s → ↑↑μ s < ⊤ → ∀ {ε : ℝ≥0∞}, ε ≠ 0 → ∃ g, snorm (g - Set.indicator s fun x => c) p μ ≤ ε ∧ P g\nh1P : ∀ (f g : α → E), P f → P g → P (f + g)\nh2P : ∀ (f : α → E), P f → AEStronglyMeasurable f μ\nf : α → E\nhf : Memℒp f p\nε : ℝ≥0∞\nhε : ε ≠ 0\n⊢ ∃ g, snorm (f - g) p μ ≤ ε ∧ P g\n[PROOFSTEP]\nrcases eq_or_ne p 0 with (rfl | hp_pos)\n[GOAL]\ncase inl\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf✝ : α → E\nμ : Measure α\nP : (α → E) → Prop\nh1P : ∀ (f g : α → E), P f → P g → P (f + g)\nh2P : ∀ (f : α → E), P f → AEStronglyMeasurable f μ\nf : α → E\nε : ℝ≥0∞\nhε : ε ≠ 0\nhp_ne_top : 0 ≠ ⊤\nh0P :\n  ∀ (c : E) ⦃s : Set α⦄,\n    MeasurableSet s → ↑↑μ s < ⊤ → ∀ {ε : ℝ≥0∞}, ε ≠ 0 → ∃ g, snorm (g - Set.indicator s fun x => c) 0 μ ≤ ε ∧ P g\nhf : Memℒp f 0\n⊢ ∃ g, snorm (f - g) 0 μ ≤ ε ∧ P g\n[PROOFSTEP]\nrcases h0P (0 : E) MeasurableSet.empty (by simp only [measure_empty, WithTop.zero_lt_top]) hε with ⟨g, _, Pg⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf✝ : α → E\nμ : Measure α\nP : (α → E) → Prop\nh1P : ∀ (f g : α → E), P f → P g → P (f + g)\nh2P : ∀ (f : α → E), P f → AEStronglyMeasurable f μ\nf : α → E\nε : ℝ≥0∞\nhε : ε ≠ 0\nhp_ne_top : 0 ≠ ⊤\nh0P :\n  ∀ (c : E) ⦃s : Set α⦄,\n    MeasurableSet s → ↑↑μ s < ⊤ → ∀ {ε : ℝ≥0∞}, ε ≠ 0 → ∃ g, snorm (g - Set.indicator s fun x => c) 0 μ ≤ ε ∧ P g\nhf : Memℒp f 0\n⊢ ↑↑μ ∅ < ⊤\n[PROOFSTEP]\nsimp only [measure_empty, WithTop.zero_lt_top]\n[GOAL]\ncase inl.intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf✝ : α → E\nμ : Measure α\nP : (α → E) → Prop\nh1P : ∀ (f g : α → E), P f → P g → P (f + g)\nh2P : ∀ (f : α → E), P f → AEStronglyMeasurable f μ\nf : α → E\nε : ℝ≥0∞\nhε : ε ≠ 0\nhp_ne_top : 0 ≠ ⊤\nh0P :\n  ∀ (c : E) ⦃s : Set α⦄,\n    MeasurableSet s → ↑↑μ s < ⊤ → ∀ {ε : ℝ≥0∞}, ε ≠ 0 → ∃ g, snorm (g - Set.indicator s fun x => c) 0 μ ≤ ε ∧ P g\nhf : Memℒp f 0\ng : α → E\nleft✝ : snorm (g - Set.indicator ∅ fun x => 0) 0 μ ≤ ε\nPg : P g\n⊢ ∃ g, snorm (f - g) 0 μ ≤ ε ∧ P g\n[PROOFSTEP]\nexact ⟨g, by simp only [snorm_exponent_zero, zero_le'], Pg⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf✝ : α → E\nμ : Measure α\nP : (α → E) → Prop\nh1P : ∀ (f g : α → E), P f → P g → P (f + g)\nh2P : ∀ (f : α → E), P f → AEStronglyMeasurable f μ\nf : α → E\nε : ℝ≥0∞\nhε : ε ≠ 0\nhp_ne_top : 0 ≠ ⊤\nh0P :\n  ∀ (c : E) ⦃s : Set α⦄,\n    MeasurableSet s → ↑↑μ s < ⊤ → ∀ {ε : ℝ≥0∞}, ε ≠ 0 → ∃ g, snorm (g - Set.indicator s fun x => c) 0 μ ≤ ε ∧ P g\nhf : Memℒp f 0\ng : α → E\nleft✝ : snorm (g - Set.indicator ∅ fun x => 0) 0 μ ≤ ε\nPg : P g\n⊢ snorm (f - g) 0 μ ≤ ε\n[PROOFSTEP]\nsimp only [snorm_exponent_zero, zero_le']\n[GOAL]\ncase inr\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf✝ : α → E\np : ℝ≥0∞\nμ : Measure α\nhp_ne_top : p ≠ ⊤\nP : (α → E) → Prop\nh0P :\n  ∀ (c : E) ⦃s : Set α⦄,\n    MeasurableSet s → ↑↑μ s < ⊤ → ∀ {ε : ℝ≥0∞}, ε ≠ 0 → ∃ g, snorm (g - Set.indicator s fun x => c) p μ ≤ ε ∧ P g\nh1P : ∀ (f g : α → E), P f → P g → P (f + g)\nh2P : ∀ (f : α → E), P f → AEStronglyMeasurable f μ\nf : α → E\nhf : Memℒp f p\nε : ℝ≥0∞\nhε : ε ≠ 0\nhp_pos : p ≠ 0\n⊢ ∃ g, snorm (f - g) p μ ≤ ε ∧ P g\n[PROOFSTEP]\nsuffices H : ∀ (f' : α →ₛ E) (δ : ℝ≥0∞) (hδ : δ ≠ 0), Memℒp f' p μ → ∃ g, snorm (⇑f' - g) p μ ≤ δ ∧ P g\n[GOAL]\ncase inr\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf✝ : α → E\np : ℝ≥0∞\nμ : Measure α\nhp_ne_top : p ≠ ⊤\nP : (α → E) → Prop\nh0P :\n  ∀ (c : E) ⦃s : Set α⦄,\n    MeasurableSet s → ↑↑μ s < ⊤ → ∀ {ε : ℝ≥0∞}, ε ≠ 0 → ∃ g, snorm (g - Set.indicator s fun x => c) p μ ≤ ε ∧ P g\nh1P : ∀ (f g : α → E), P f → P g → P (f + g)\nh2P : ∀ (f : α → E), P f → AEStronglyMeasurable f μ\nf : α → E\nhf : Memℒp f p\nε : ℝ≥0∞\nhε : ε ≠ 0\nhp_pos : p ≠ 0\nH : ∀ (f' : α →ₛ E) (δ : ℝ≥0∞), δ ≠ 0 → Memℒp (↑f') p → ∃ g, snorm (↑f' - g) p μ ≤ δ ∧ P g\n⊢ ∃ g, snorm (f - g) p μ ≤ ε ∧ P g\n[PROOFSTEP]\nobtain ⟨η, ηpos, hη⟩ := exists_Lp_half E μ p hε\n[GOAL]\ncase inr.intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf✝ : α → E\np : ℝ≥0∞\nμ : Measure α\nhp_ne_top : p ≠ ⊤\nP : (α → E) → Prop\nh0P :\n  ∀ (c : E) ⦃s : Set α⦄,\n    MeasurableSet s → ↑↑μ s < ⊤ → ∀ {ε : ℝ≥0∞}, ε ≠ 0 → ∃ g, snorm (g - Set.indicator s fun x => c) p μ ≤ ε ∧ P g\nh1P : ∀ (f g : α → E), P f → P g → P (f + g)\nh2P : ∀ (f : α → E), P f → AEStronglyMeasurable f μ\nf : α → E\nhf : Memℒp f p\nε : ℝ≥0∞\nhε : ε ≠ 0\nhp_pos : p ≠ 0\nH : ∀ (f' : α →ₛ E) (δ : ℝ≥0∞), δ ≠ 0 → Memℒp (↑f') p → ∃ g, snorm (↑f' - g) p μ ≤ δ ∧ P g\nη : ℝ≥0∞\nηpos : 0 < η\nhη :\n  ∀ (f g : α → E),\n    AEStronglyMeasurable f μ → AEStronglyMeasurable g μ → snorm f p μ ≤ η → snorm g p μ ≤ η → snorm (f + g) p μ < ε\n⊢ ∃ g, snorm (f - g) p μ ≤ ε ∧ P g\n[PROOFSTEP]\nrcases hf.exists_simpleFunc_snorm_sub_lt hp_ne_top ηpos.ne' with ⟨f', hf', f'_mem⟩\n[GOAL]\ncase inr.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf✝ : α → E\np : ℝ≥0∞\nμ : Measure α\nhp_ne_top : p ≠ ⊤\nP : (α → E) → Prop\nh0P :\n  ∀ (c : E) ⦃s : Set α⦄,\n    MeasurableSet s → ↑↑μ s < ⊤ → ∀ {ε : ℝ≥0∞}, ε ≠ 0 → ∃ g, snorm (g - Set.indicator s fun x => c) p μ ≤ ε ∧ P g\nh1P : ∀ (f g : α → E), P f → P g → P (f + g)\nh2P : ∀ (f : α → E), P f → AEStronglyMeasurable f μ\nf : α → E\nhf : Memℒp f p\nε : ℝ≥0∞\nhε : ε ≠ 0\nhp_pos : p ≠ 0\nH : ∀ (f' : α →ₛ E) (δ : ℝ≥0∞), δ ≠ 0 → Memℒp (↑f') p → ∃ g, snorm (↑f' - g) p μ ≤ δ ∧ P g\nη : ℝ≥0∞\nηpos : 0 < η\nhη :\n  ∀ (f g : α → E),\n    AEStronglyMeasurable f μ → AEStronglyMeasurable g μ → snorm f p μ ≤ η → snorm g p μ ≤ η → snorm (f + g) p μ < ε\nf' : α →ₛ E\nhf' : snorm (f - ↑f') p μ < η\nf'_mem : Memℒp (↑f') p\n⊢ ∃ g, snorm (f - g) p μ ≤ ε ∧ P g\n[PROOFSTEP]\nrcases H f' η ηpos.ne' f'_mem with ⟨g, hg, Pg⟩\n[GOAL]\ncase inr.intro.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf✝ : α → E\np : ℝ≥0∞\nμ : Measure α\nhp_ne_top : p ≠ ⊤\nP : (α → E) → Prop\nh0P :\n  ∀ (c : E) ⦃s : Set α⦄,\n    MeasurableSet s → ↑↑μ s < ⊤ → ∀ {ε : ℝ≥0∞}, ε ≠ 0 → ∃ g, snorm (g - Set.indicator s fun x => c) p μ ≤ ε ∧ P g\nh1P : ∀ (f g : α → E), P f → P g → P (f + g)\nh2P : ∀ (f : α → E), P f → AEStronglyMeasurable f μ\nf : α → E\nhf : Memℒp f p\nε : ℝ≥0∞\nhε : ε ≠ 0\nhp_pos : p ≠ 0\nH : ∀ (f' : α →ₛ E) (δ : ℝ≥0∞), δ ≠ 0 → Memℒp (↑f') p → ∃ g, snorm (↑f' - g) p μ ≤ δ ∧ P g\nη : ℝ≥0∞\nηpos : 0 < η\nhη :\n  ∀ (f g : α → E),\n    AEStronglyMeasurable f μ → AEStronglyMeasurable g μ → snorm f p μ ≤ η → snorm g p μ ≤ η → snorm (f + g) p μ < ε\nf' : α →ₛ E\nhf' : snorm (f - ↑f') p μ < η\nf'_mem : Memℒp (↑f') p\ng : α → E\nhg : snorm (↑f' - g) p μ ≤ η\nPg : P g\n⊢ ∃ g, snorm (f - g) p μ ≤ ε ∧ P g\n[PROOFSTEP]\nrefine' ⟨g, _, Pg⟩\n[GOAL]\ncase inr.intro.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf✝ : α → E\np : ℝ≥0∞\nμ : Measure α\nhp_ne_top : p ≠ ⊤\nP : (α → E) → Prop\nh0P :\n  ∀ (c : E) ⦃s : Set α⦄,\n    MeasurableSet s → ↑↑μ s < ⊤ → ∀ {ε : ℝ≥0∞}, ε ≠ 0 → ∃ g, snorm (g - Set.indicator s fun x => c) p μ ≤ ε ∧ P g\nh1P : ∀ (f g : α → E), P f → P g → P (f + g)\nh2P : ∀ (f : α → E), P f → AEStronglyMeasurable f μ\nf : α → E\nhf : Memℒp f p\nε : ℝ≥0∞\nhε : ε ≠ 0\nhp_pos : p ≠ 0\nH : ∀ (f' : α →ₛ E) (δ : ℝ≥0∞), δ ≠ 0 → Memℒp (↑f') p → ∃ g, snorm (↑f' - g) p μ ≤ δ ∧ P g\nη : ℝ≥0∞\nηpos : 0 < η\nhη :\n  ∀ (f g : α → E),\n    AEStronglyMeasurable f μ → AEStronglyMeasurable g μ → snorm f p μ ≤ η → snorm g p μ ≤ η → snorm (f + g) p μ < ε\nf' : α →ₛ E\nhf' : snorm (f - ↑f') p μ < η\nf'_mem : Memℒp (↑f') p\ng : α → E\nhg : snorm (↑f' - g) p μ ≤ η\nPg : P g\n⊢ snorm (f - g) p μ ≤ ε\n[PROOFSTEP]\nconvert\n  (hη _ _ (hf.aestronglyMeasurable.sub f'.aestronglyMeasurable) (f'.aestronglyMeasurable.sub (h2P g Pg)) hf'.le\n      hg).le using\n  2\n[GOAL]\ncase h.e'_3.h.e'_5\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf✝ : α → E\np : ℝ≥0∞\nμ : Measure α\nhp_ne_top : p ≠ ⊤\nP : (α → E) → Prop\nh0P :\n  ∀ (c : E) ⦃s : Set α⦄,\n    MeasurableSet s → ↑↑μ s < ⊤ → ∀ {ε : ℝ≥0∞}, ε ≠ 0 → ∃ g, snorm (g - Set.indicator s fun x => c) p μ ≤ ε ∧ P g\nh1P : ∀ (f g : α → E), P f → P g → P (f + g)\nh2P : ∀ (f : α → E), P f → AEStronglyMeasurable f μ\nf : α → E\nhf : Memℒp f p\nε : ℝ≥0∞\nhε : ε ≠ 0\nhp_pos : p ≠ 0\nH : ∀ (f' : α →ₛ E) (δ : ℝ≥0∞), δ ≠ 0 → Memℒp (↑f') p → ∃ g, snorm (↑f' - g) p μ ≤ δ ∧ P g\nη : ℝ≥0∞\nηpos : 0 < η\nhη :\n  ∀ (f g : α → E),\n    AEStronglyMeasurable f μ → AEStronglyMeasurable g μ → snorm f p μ ≤ η → snorm g p μ ≤ η → snorm (f + g) p μ < ε\nf' : α →ₛ E\nhf' : snorm (f - ↑f') p μ < η\nf'_mem : Memℒp (↑f') p\ng : α → E\nhg : snorm (↑f' - g) p μ ≤ η\nPg : P g\n⊢ f - g = f - ↑f' + (↑f' - g)\n[PROOFSTEP]\nsimp only [sub_add_sub_cancel]\n[GOAL]\ncase H\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf✝ : α → E\np : ℝ≥0∞\nμ : Measure α\nhp_ne_top : p ≠ ⊤\nP : (α → E) → Prop\nh0P :\n  ∀ (c : E) ⦃s : Set α⦄,\n    MeasurableSet s → ↑↑μ s < ⊤ → ∀ {ε : ℝ≥0∞}, ε ≠ 0 → ∃ g, snorm (g - Set.indicator s fun x => c) p μ ≤ ε ∧ P g\nh1P : ∀ (f g : α → E), P f → P g → P (f + g)\nh2P : ∀ (f : α → E), P f → AEStronglyMeasurable f μ\nf : α → E\nhf : Memℒp f p\nε : ℝ≥0∞\nhε : ε ≠ 0\nhp_pos : p ≠ 0\n⊢ ∀ (f' : α →ₛ E) (δ : ℝ≥0∞), δ ≠ 0 → Memℒp (↑f') p → ∃ g, snorm (↑f' - g) p μ ≤ δ ∧ P g\n[PROOFSTEP]\napply SimpleFunc.induction\n[GOAL]\ncase H.h_ind\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf✝ : α → E\np : ℝ≥0∞\nμ : Measure α\nhp_ne_top : p ≠ ⊤\nP : (α → E) → Prop\nh0P :\n  ∀ (c : E) ⦃s : Set α⦄,\n    MeasurableSet s → ↑↑μ s < ⊤ → ∀ {ε : ℝ≥0∞}, ε ≠ 0 → ∃ g, snorm (g - Set.indicator s fun x => c) p μ ≤ ε ∧ P g\nh1P : ∀ (f g : α → E), P f → P g → P (f + g)\nh2P : ∀ (f : α → E), P f → AEStronglyMeasurable f μ\nf : α → E\nhf : Memℒp f p\nε : ℝ≥0∞\nhε : ε ≠ 0\nhp_pos : p ≠ 0\n⊢ ∀ (c : E) {s : Set α} (hs : MeasurableSet s) (δ : ℝ≥0∞),\n    δ ≠ 0 →\n      Memℒp (↑(SimpleFunc.piecewise s hs (SimpleFunc.const α c) (SimpleFunc.const α 0))) p →\n        ∃ g, snorm (↑(SimpleFunc.piecewise s hs (SimpleFunc.const α c) (SimpleFunc.const α 0)) - g) p μ ≤ δ ∧ P g\n[PROOFSTEP]\nintro c s hs ε εpos Hs\n[GOAL]\ncase H.h_ind\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf✝ : α → E\np : ℝ≥0∞\nμ : Measure α\nhp_ne_top : p ≠ ⊤\nP : (α → E) → Prop\nh0P :\n  ∀ (c : E) ⦃s : Set α⦄,\n    MeasurableSet s → ↑↑μ s < ⊤ → ∀ {ε : ℝ≥0∞}, ε ≠ 0 → ∃ g, snorm (g - Set.indicator s fun x => c) p μ ≤ ε ∧ P g\nh1P : ∀ (f g : α → E), P f → P g → P (f + g)\nh2P : ∀ (f : α → E), P f → AEStronglyMeasurable f μ\nf : α → E\nhf : Memℒp f p\nε✝ : ℝ≥0∞\nhε : ε✝ ≠ 0\nhp_pos : p ≠ 0\nc : E\ns : Set α\nhs : MeasurableSet s\nε : ℝ≥0∞\nεpos : ε ≠ 0\nHs : Memℒp (↑(SimpleFunc.piecewise s hs (SimpleFunc.const α c) (SimpleFunc.const α 0))) p\n⊢ ∃ g, snorm (↑(SimpleFunc.piecewise s hs (SimpleFunc.const α c) (SimpleFunc.const α 0)) - g) p μ ≤ ε ∧ P g\n[PROOFSTEP]\nrcases eq_or_ne c 0 with (rfl | hc)\n[GOAL]\ncase H.h_ind.inl\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf✝ : α → E\np : ℝ≥0∞\nμ : Measure α\nhp_ne_top : p ≠ ⊤\nP : (α → E) → Prop\nh0P :\n  ∀ (c : E) ⦃s : Set α⦄,\n    MeasurableSet s → ↑↑μ s < ⊤ → ∀ {ε : ℝ≥0∞}, ε ≠ 0 → ∃ g, snorm (g - Set.indicator s fun x => c) p μ ≤ ε ∧ P g\nh1P : ∀ (f g : α → E), P f → P g → P (f + g)\nh2P : ∀ (f : α → E), P f → AEStronglyMeasurable f μ\nf : α → E\nhf : Memℒp f p\nε✝ : ℝ≥0∞\nhε : ε✝ ≠ 0\nhp_pos : p ≠ 0\ns : Set α\nhs : MeasurableSet s\nε : ℝ≥0∞\nεpos : ε ≠ 0\nHs : Memℒp (↑(SimpleFunc.piecewise s hs (SimpleFunc.const α 0) (SimpleFunc.const α 0))) p\n⊢ ∃ g, snorm (↑(SimpleFunc.piecewise s hs (SimpleFunc.const α 0) (SimpleFunc.const α 0)) - g) p μ ≤ ε ∧ P g\n[PROOFSTEP]\nrcases h0P (0 : E) MeasurableSet.empty (by simp only [measure_empty, WithTop.zero_lt_top]) εpos with ⟨g, hg, Pg⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf✝ : α → E\np : ℝ≥0∞\nμ : Measure α\nhp_ne_top : p ≠ ⊤\nP : (α → E) → Prop\nh0P :\n  ∀ (c : E) ⦃s : Set α⦄,\n    MeasurableSet s → ↑↑μ s < ⊤ → ∀ {ε : ℝ≥0∞}, ε ≠ 0 → ∃ g, snorm (g - Set.indicator s fun x => c) p μ ≤ ε ∧ P g\nh1P : ∀ (f g : α → E), P f → P g → P (f + g)\nh2P : ∀ (f : α → E), P f → AEStronglyMeasurable f μ\nf : α → E\nhf : Memℒp f p\nε✝ : ℝ≥0∞\nhε : ε✝ ≠ 0\nhp_pos : p ≠ 0\ns : Set α\nhs : MeasurableSet s\nε : ℝ≥0∞\nεpos : ε ≠ 0\nHs : Memℒp (↑(SimpleFunc.piecewise s hs (SimpleFunc.const α 0) (SimpleFunc.const α 0))) p\n⊢ ↑↑μ ∅ < ⊤\n[PROOFSTEP]\nsimp only [measure_empty, WithTop.zero_lt_top]\n[GOAL]\ncase H.h_ind.inl.intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf✝ : α → E\np : ℝ≥0∞\nμ : Measure α\nhp_ne_top : p ≠ ⊤\nP : (α → E) → Prop\nh0P :\n  ∀ (c : E) ⦃s : Set α⦄,\n    MeasurableSet s → ↑↑μ s < ⊤ → ∀ {ε : ℝ≥0∞}, ε ≠ 0 → ∃ g, snorm (g - Set.indicator s fun x => c) p μ ≤ ε ∧ P g\nh1P : ∀ (f g : α → E), P f → P g → P (f + g)\nh2P : ∀ (f : α → E), P f → AEStronglyMeasurable f μ\nf : α → E\nhf : Memℒp f p\nε✝ : ℝ≥0∞\nhε : ε✝ ≠ 0\nhp_pos : p ≠ 0\ns : Set α\nhs : MeasurableSet s\nε : ℝ≥0∞\nεpos : ε ≠ 0\nHs : Memℒp (↑(SimpleFunc.piecewise s hs (SimpleFunc.const α 0) (SimpleFunc.const α 0))) p\ng : α → E\nhg : snorm (g - Set.indicator ∅ fun x => 0) p μ ≤ ε\nPg : P g\n⊢ ∃ g, snorm (↑(SimpleFunc.piecewise s hs (SimpleFunc.const α 0) (SimpleFunc.const α 0)) - g) p μ ≤ ε ∧ P g\n[PROOFSTEP]\nrw [← snorm_neg, neg_sub] at hg \n[GOAL]\ncase H.h_ind.inl.intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf✝ : α → E\np : ℝ≥0∞\nμ : Measure α\nhp_ne_top : p ≠ ⊤\nP : (α → E) → Prop\nh0P :\n  ∀ (c : E) ⦃s : Set α⦄,\n    MeasurableSet s → ↑↑μ s < ⊤ → ∀ {ε : ℝ≥0∞}, ε ≠ 0 → ∃ g, snorm (g - Set.indicator s fun x => c) p μ ≤ ε ∧ P g\nh1P : ∀ (f g : α → E), P f → P g → P (f + g)\nh2P : ∀ (f : α → E), P f → AEStronglyMeasurable f μ\nf : α → E\nhf : Memℒp f p\nε✝ : ℝ≥0∞\nhε : ε✝ ≠ 0\nhp_pos : p ≠ 0\ns : Set α\nhs : MeasurableSet s\nε : ℝ≥0∞\nεpos : ε ≠ 0\nHs : Memℒp (↑(SimpleFunc.piecewise s hs (SimpleFunc.const α 0) (SimpleFunc.const α 0))) p\ng : α → E\nhg : snorm ((Set.indicator ∅ fun x => 0) - g) p μ ≤ ε\nPg : P g\n⊢ ∃ g, snorm (↑(SimpleFunc.piecewise s hs (SimpleFunc.const α 0) (SimpleFunc.const α 0)) - g) p μ ≤ ε ∧ P g\n[PROOFSTEP]\nrefine' ⟨g, _, Pg⟩\n[GOAL]\ncase H.h_ind.inl.intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf✝ : α → E\np : ℝ≥0∞\nμ : Measure α\nhp_ne_top : p ≠ ⊤\nP : (α → E) → Prop\nh0P :\n  ∀ (c : E) ⦃s : Set α⦄,\n    MeasurableSet s → ↑↑μ s < ⊤ → ∀ {ε : ℝ≥0∞}, ε ≠ 0 → ∃ g, snorm (g - Set.indicator s fun x => c) p μ ≤ ε ∧ P g\nh1P : ∀ (f g : α → E), P f → P g → P (f + g)\nh2P : ∀ (f : α → E), P f → AEStronglyMeasurable f μ\nf : α → E\nhf : Memℒp f p\nε✝ : ℝ≥0∞\nhε : ε✝ ≠ 0\nhp_pos : p ≠ 0\ns : Set α\nhs : MeasurableSet s\nε : ℝ≥0∞\nεpos : ε ≠ 0\nHs : Memℒp (↑(SimpleFunc.piecewise s hs (SimpleFunc.const α 0) (SimpleFunc.const α 0))) p\ng : α → E\nhg : snorm ((Set.indicator ∅ fun x => 0) - g) p μ ≤ ε\nPg : P g\n⊢ snorm (↑(SimpleFunc.piecewise s hs (SimpleFunc.const α 0) (SimpleFunc.const α 0)) - g) p μ ≤ ε\n[PROOFSTEP]\nconvert hg\n[GOAL]\ncase h.e'_3.h.e'_5.h.e'_5\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf✝ : α → E\np : ℝ≥0∞\nμ : Measure α\nhp_ne_top : p ≠ ⊤\nP : (α → E) → Prop\nh0P :\n  ∀ (c : E) ⦃s : Set α⦄,\n    MeasurableSet s → ↑↑μ s < ⊤ → ∀ {ε : ℝ≥0∞}, ε ≠ 0 → ∃ g, snorm (g - Set.indicator s fun x => c) p μ ≤ ε ∧ P g\nh1P : ∀ (f g : α → E), P f → P g → P (f + g)\nh2P : ∀ (f : α → E), P f → AEStronglyMeasurable f μ\nf : α → E\nhf : Memℒp f p\nε✝ : ℝ≥0∞\nhε : ε✝ ≠ 0\nhp_pos : p ≠ 0\ns : Set α\nhs : MeasurableSet s\nε : ℝ≥0∞\nεpos : ε ≠ 0\nHs : Memℒp (↑(SimpleFunc.piecewise s hs (SimpleFunc.const α 0) (SimpleFunc.const α 0))) p\ng : α → E\nhg : snorm ((Set.indicator ∅ fun x => 0) - g) p μ ≤ ε\nPg : P g\n⊢ ↑(SimpleFunc.piecewise s hs (SimpleFunc.const α 0) (SimpleFunc.const α 0)) = Set.indicator ∅ fun x => 0\n[PROOFSTEP]\next x\n[GOAL]\ncase h.e'_3.h.e'_5.h.e'_5.h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf✝ : α → E\np : ℝ≥0∞\nμ : Measure α\nhp_ne_top : p ≠ ⊤\nP : (α → E) → Prop\nh0P :\n  ∀ (c : E) ⦃s : Set α⦄,\n    MeasurableSet s → ↑↑μ s < ⊤ → ∀ {ε : ℝ≥0∞}, ε ≠ 0 → ∃ g, snorm (g - Set.indicator s fun x => c) p μ ≤ ε ∧ P g\nh1P : ∀ (f g : α → E), P f → P g → P (f + g)\nh2P : ∀ (f : α → E), P f → AEStronglyMeasurable f μ\nf : α → E\nhf : Memℒp f p\nε✝ : ℝ≥0∞\nhε : ε✝ ≠ 0\nhp_pos : p ≠ 0\ns : Set α\nhs : MeasurableSet s\nε : ℝ≥0∞\nεpos : ε ≠ 0\nHs : Memℒp (↑(SimpleFunc.piecewise s hs (SimpleFunc.const α 0) (SimpleFunc.const α 0))) p\ng : α → E\nhg : snorm ((Set.indicator ∅ fun x => 0) - g) p μ ≤ ε\nPg : P g\nx : α\n⊢ ↑(SimpleFunc.piecewise s hs (SimpleFunc.const α 0) (SimpleFunc.const α 0)) x = Set.indicator ∅ (fun x => 0) x\n[PROOFSTEP]\nsimp only [SimpleFunc.const_zero, SimpleFunc.coe_piecewise, SimpleFunc.coe_zero, piecewise_eq_indicator,\n  indicator_zero', Pi.zero_apply, indicator_zero]\n[GOAL]\ncase H.h_ind.inr\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf✝ : α → E\np : ℝ≥0∞\nμ : Measure α\nhp_ne_top : p ≠ ⊤\nP : (α → E) → Prop\nh0P :\n  ∀ (c : E) ⦃s : Set α⦄,\n    MeasurableSet s → ↑↑μ s < ⊤ → ∀ {ε : ℝ≥0∞}, ε ≠ 0 → ∃ g, snorm (g - Set.indicator s fun x => c) p μ ≤ ε ∧ P g\nh1P : ∀ (f g : α → E), P f → P g → P (f + g)\nh2P : ∀ (f : α → E), P f → AEStronglyMeasurable f μ\nf : α → E\nhf : Memℒp f p\nε✝ : ℝ≥0∞\nhε : ε✝ ≠ 0\nhp_pos : p ≠ 0\nc : E\ns : Set α\nhs : MeasurableSet s\nε : ℝ≥0∞\nεpos : ε ≠ 0\nHs : Memℒp (↑(SimpleFunc.piecewise s hs (SimpleFunc.const α c) (SimpleFunc.const α 0))) p\nhc : c ≠ 0\n⊢ ∃ g, snorm (↑(SimpleFunc.piecewise s hs (SimpleFunc.const α c) (SimpleFunc.const α 0)) - g) p μ ≤ ε ∧ P g\n[PROOFSTEP]\nhave : μ s < ∞ := SimpleFunc.measure_lt_top_of_memℒp_indicator hp_pos hp_ne_top hc hs Hs\n[GOAL]\ncase H.h_ind.inr\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf✝ : α → E\np : ℝ≥0∞\nμ : Measure α\nhp_ne_top : p ≠ ⊤\nP : (α → E) → Prop\nh0P :\n  ∀ (c : E) ⦃s : Set α⦄,\n    MeasurableSet s → ↑↑μ s < ⊤ → ∀ {ε : ℝ≥0∞}, ε ≠ 0 → ∃ g, snorm (g - Set.indicator s fun x => c) p μ ≤ ε ∧ P g\nh1P : ∀ (f g : α → E), P f → P g → P (f + g)\nh2P : ∀ (f : α → E), P f → AEStronglyMeasurable f μ\nf : α → E\nhf : Memℒp f p\nε✝ : ℝ≥0∞\nhε : ε✝ ≠ 0\nhp_pos : p ≠ 0\nc : E\ns : Set α\nhs : MeasurableSet s\nε : ℝ≥0∞\nεpos : ε ≠ 0\nHs : Memℒp (↑(SimpleFunc.piecewise s hs (SimpleFunc.const α c) (SimpleFunc.const α 0))) p\nhc : c ≠ 0\nthis : ↑↑μ s < ⊤\n⊢ ∃ g, snorm (↑(SimpleFunc.piecewise s hs (SimpleFunc.const α c) (SimpleFunc.const α 0)) - g) p μ ≤ ε ∧ P g\n[PROOFSTEP]\nrcases h0P c hs this εpos with ⟨g, hg, Pg⟩\n[GOAL]\ncase H.h_ind.inr.intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf✝ : α → E\np : ℝ≥0∞\nμ : Measure α\nhp_ne_top : p ≠ ⊤\nP : (α → E) → Prop\nh0P :\n  ∀ (c : E) ⦃s : Set α⦄,\n    MeasurableSet s → ↑↑μ s < ⊤ → ∀ {ε : ℝ≥0∞}, ε ≠ 0 → ∃ g, snorm (g - Set.indicator s fun x => c) p μ ≤ ε ∧ P g\nh1P : ∀ (f g : α → E), P f → P g → P (f + g)\nh2P : ∀ (f : α → E), P f → AEStronglyMeasurable f μ\nf : α → E\nhf : Memℒp f p\nε✝ : ℝ≥0∞\nhε : ε✝ ≠ 0\nhp_pos : p ≠ 0\nc : E\ns : Set α\nhs : MeasurableSet s\nε : ℝ≥0∞\nεpos : ε ≠ 0\nHs : Memℒp (↑(SimpleFunc.piecewise s hs (SimpleFunc.const α c) (SimpleFunc.const α 0))) p\nhc : c ≠ 0\nthis : ↑↑μ s < ⊤\ng : α → E\nhg : snorm (g - Set.indicator s fun x => c) p μ ≤ ε\nPg : P g\n⊢ ∃ g, snorm (↑(SimpleFunc.piecewise s hs (SimpleFunc.const α c) (SimpleFunc.const α 0)) - g) p μ ≤ ε ∧ P g\n[PROOFSTEP]\nrw [← snorm_neg, neg_sub] at hg \n[GOAL]\ncase H.h_ind.inr.intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf✝ : α → E\np : ℝ≥0∞\nμ : Measure α\nhp_ne_top : p ≠ ⊤\nP : (α → E) → Prop\nh0P :\n  ∀ (c : E) ⦃s : Set α⦄,\n    MeasurableSet s → ↑↑μ s < ⊤ → ∀ {ε : ℝ≥0∞}, ε ≠ 0 → ∃ g, snorm (g - Set.indicator s fun x => c) p μ ≤ ε ∧ P g\nh1P : ∀ (f g : α → E), P f → P g → P (f + g)\nh2P : ∀ (f : α → E), P f → AEStronglyMeasurable f μ\nf : α → E\nhf : Memℒp f p\nε✝ : ℝ≥0∞\nhε : ε✝ ≠ 0\nhp_pos : p ≠ 0\nc : E\ns : Set α\nhs : MeasurableSet s\nε : ℝ≥0∞\nεpos : ε ≠ 0\nHs : Memℒp (↑(SimpleFunc.piecewise s hs (SimpleFunc.const α c) (SimpleFunc.const α 0))) p\nhc : c ≠ 0\nthis : ↑↑μ s < ⊤\ng : α → E\nhg : snorm ((Set.indicator s fun x => c) - g) p μ ≤ ε\nPg : P g\n⊢ ∃ g, snorm (↑(SimpleFunc.piecewise s hs (SimpleFunc.const α c) (SimpleFunc.const α 0)) - g) p μ ≤ ε ∧ P g\n[PROOFSTEP]\nexact ⟨g, hg, Pg⟩\n[GOAL]\ncase H.h_add\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf✝ : α → E\np : ℝ≥0∞\nμ : Measure α\nhp_ne_top : p ≠ ⊤\nP : (α → E) → Prop\nh0P :\n  ∀ (c : E) ⦃s : Set α⦄,\n    MeasurableSet s → ↑↑μ s < ⊤ → ∀ {ε : ℝ≥0∞}, ε ≠ 0 → ∃ g, snorm (g - Set.indicator s fun x => c) p μ ≤ ε ∧ P g\nh1P : ∀ (f g : α → E), P f → P g → P (f + g)\nh2P : ∀ (f : α → E), P f → AEStronglyMeasurable f μ\nf : α → E\nhf : Memℒp f p\nε : ℝ≥0∞\nhε : ε ≠ 0\nhp_pos : p ≠ 0\n⊢ ∀ ⦃f g : α →ₛ E⦄,\n    Disjoint (support ↑f) (support ↑g) →\n      (∀ (δ : ℝ≥0∞), δ ≠ 0 → Memℒp (↑f) p → ∃ g, snorm (↑f - g) p μ ≤ δ ∧ P g) →\n        (∀ (δ : ℝ≥0∞), δ ≠ 0 → Memℒp (↑g) p → ∃ g_1, snorm (↑g - g_1) p μ ≤ δ ∧ P g_1) →\n          ∀ (δ : ℝ≥0∞), δ ≠ 0 → Memℒp (↑(f + g)) p → ∃ g_1, snorm (↑(f + g) - g_1) p μ ≤ δ ∧ P g_1\n[PROOFSTEP]\nintro f f' hff' hf hf' δ δpos int_ff'\n[GOAL]\ncase H.h_add\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf✝¹ : α → E\np : ℝ≥0∞\nμ : Measure α\nhp_ne_top : p ≠ ⊤\nP : (α → E) → Prop\nh0P :\n  ∀ (c : E) ⦃s : Set α⦄,\n    MeasurableSet s → ↑↑μ s < ⊤ → ∀ {ε : ℝ≥0∞}, ε ≠ 0 → ∃ g, snorm (g - Set.indicator s fun x => c) p μ ≤ ε ∧ P g\nh1P : ∀ (f g : α → E), P f → P g → P (f + g)\nh2P : ∀ (f : α → E), P f → AEStronglyMeasurable f μ\nf✝ : α → E\nhf✝ : Memℒp f✝ p\nε : ℝ≥0∞\nhε : ε ≠ 0\nhp_pos : p ≠ 0\nf f' : α →ₛ E\nhff' : Disjoint (support ↑f) (support ↑f')\nhf : ∀ (δ : ℝ≥0∞), δ ≠ 0 → Memℒp (↑f) p → ∃ g, snorm (↑f - g) p μ ≤ δ ∧ P g\nhf' : ∀ (δ : ℝ≥0∞), δ ≠ 0 → Memℒp (↑f') p → ∃ g, snorm (↑f' - g) p μ ≤ δ ∧ P g\nδ : ℝ≥0∞\nδpos : δ ≠ 0\nint_ff' : Memℒp (↑(f + f')) p\n⊢ ∃ g, snorm (↑(f + f') - g) p μ ≤ δ ∧ P g\n[PROOFSTEP]\nobtain ⟨η, ηpos, hη⟩ := exists_Lp_half E μ p δpos\n[GOAL]\ncase H.h_add.intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf✝¹ : α → E\np : ℝ≥0∞\nμ : Measure α\nhp_ne_top : p ≠ ⊤\nP : (α → E) → Prop\nh0P :\n  ∀ (c : E) ⦃s : Set α⦄,\n    MeasurableSet s → ↑↑μ s < ⊤ → ∀ {ε : ℝ≥0∞}, ε ≠ 0 → ∃ g, snorm (g - Set.indicator s fun x => c) p μ ≤ ε ∧ P g\nh1P : ∀ (f g : α → E), P f → P g → P (f + g)\nh2P : ∀ (f : α → E), P f → AEStronglyMeasurable f μ\nf✝ : α → E\nhf✝ : Memℒp f✝ p\nε : ℝ≥0∞\nhε : ε ≠ 0\nhp_pos : p ≠ 0\nf f' : α →ₛ E\nhff' : Disjoint (support ↑f) (support ↑f')\nhf : ∀ (δ : ℝ≥0∞), δ ≠ 0 → Memℒp (↑f) p → ∃ g, snorm (↑f - g) p μ ≤ δ ∧ P g\nhf' : ∀ (δ : ℝ≥0∞), δ ≠ 0 → Memℒp (↑f') p → ∃ g, snorm (↑f' - g) p μ ≤ δ ∧ P g\nδ : ℝ≥0∞\nδpos : δ ≠ 0\nint_ff' : Memℒp (↑(f + f')) p\nη : ℝ≥0∞\nηpos : 0 < η\nhη :\n  ∀ (f g : α → E),\n    AEStronglyMeasurable f μ → AEStronglyMeasurable g μ → snorm f p μ ≤ η → snorm g p μ ≤ η → snorm (f + g) p μ < δ\n⊢ ∃ g, snorm (↑(f + f') - g) p μ ≤ δ ∧ P g\n[PROOFSTEP]\nrw [SimpleFunc.coe_add, memℒp_add_of_disjoint hff' f.stronglyMeasurable f'.stronglyMeasurable] at int_ff' \n[GOAL]\ncase H.h_add.intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf✝¹ : α → E\np : ℝ≥0∞\nμ : Measure α\nhp_ne_top : p ≠ ⊤\nP : (α → E) → Prop\nh0P :\n  ∀ (c : E) ⦃s : Set α⦄,\n    MeasurableSet s → ↑↑μ s < ⊤ → ∀ {ε : ℝ≥0∞}, ε ≠ 0 → ∃ g, snorm (g - Set.indicator s fun x => c) p μ ≤ ε ∧ P g\nh1P : ∀ (f g : α → E), P f → P g → P (f + g)\nh2P : ∀ (f : α → E), P f → AEStronglyMeasurable f μ\nf✝ : α → E\nhf✝ : Memℒp f✝ p\nε : ℝ≥0∞\nhε : ε ≠ 0\nhp_pos : p ≠ 0\nf f' : α →ₛ E\nhff' : Disjoint (support ↑f) (support ↑f')\nhf : ∀ (δ : ℝ≥0∞), δ ≠ 0 → Memℒp (↑f) p → ∃ g, snorm (↑f - g) p μ ≤ δ ∧ P g\nhf' : ∀ (δ : ℝ≥0∞), δ ≠ 0 → Memℒp (↑f') p → ∃ g, snorm (↑f' - g) p μ ≤ δ ∧ P g\nδ : ℝ≥0∞\nδpos : δ ≠ 0\nint_ff' : Memℒp (↑f) p ∧ Memℒp (↑f') p\nη : ℝ≥0∞\nηpos : 0 < η\nhη :\n  ∀ (f g : α → E),\n    AEStronglyMeasurable f μ → AEStronglyMeasurable g μ → snorm f p μ ≤ η → snorm g p μ ≤ η → snorm (f + g) p μ < δ\n⊢ ∃ g, snorm (↑(f + f') - g) p μ ≤ δ ∧ P g\n[PROOFSTEP]\nrcases hf η ηpos.ne' int_ff'.1 with ⟨g, hg, Pg⟩\n[GOAL]\ncase H.h_add.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf✝¹ : α → E\np : ℝ≥0∞\nμ : Measure α\nhp_ne_top : p ≠ ⊤\nP : (α → E) → Prop\nh0P :\n  ∀ (c : E) ⦃s : Set α⦄,\n    MeasurableSet s → ↑↑μ s < ⊤ → ∀ {ε : ℝ≥0∞}, ε ≠ 0 → ∃ g, snorm (g - Set.indicator s fun x => c) p μ ≤ ε ∧ P g\nh1P : ∀ (f g : α → E), P f → P g → P (f + g)\nh2P : ∀ (f : α → E), P f → AEStronglyMeasurable f μ\nf✝ : α → E\nhf✝ : Memℒp f✝ p\nε : ℝ≥0∞\nhε : ε ≠ 0\nhp_pos : p ≠ 0\nf f' : α →ₛ E\nhff' : Disjoint (support ↑f) (support ↑f')\nhf : ∀ (δ : ℝ≥0∞), δ ≠ 0 → Memℒp (↑f) p → ∃ g, snorm (↑f - g) p μ ≤ δ ∧ P g\nhf' : ∀ (δ : ℝ≥0∞), δ ≠ 0 → Memℒp (↑f') p → ∃ g, snorm (↑f' - g) p μ ≤ δ ∧ P g\nδ : ℝ≥0∞\nδpos : δ ≠ 0\nint_ff' : Memℒp (↑f) p ∧ Memℒp (↑f') p\nη : ℝ≥0∞\nηpos : 0 < η\nhη :\n  ∀ (f g : α → E),\n    AEStronglyMeasurable f μ → AEStronglyMeasurable g μ → snorm f p μ ≤ η → snorm g p μ ≤ η → snorm (f + g) p μ < δ\ng : α → E\nhg : snorm (↑f - g) p μ ≤ η\nPg : P g\n⊢ ∃ g, snorm (↑(f + f') - g) p μ ≤ δ ∧ P g\n[PROOFSTEP]\nrcases hf' η ηpos.ne' int_ff'.2 with ⟨g', hg', Pg'⟩\n[GOAL]\ncase H.h_add.intro.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf✝¹ : α → E\np : ℝ≥0∞\nμ : Measure α\nhp_ne_top : p ≠ ⊤\nP : (α → E) → Prop\nh0P :\n  ∀ (c : E) ⦃s : Set α⦄,\n    MeasurableSet s → ↑↑μ s < ⊤ → ∀ {ε : ℝ≥0∞}, ε ≠ 0 → ∃ g, snorm (g - Set.indicator s fun x => c) p μ ≤ ε ∧ P g\nh1P : ∀ (f g : α → E), P f → P g → P (f + g)\nh2P : ∀ (f : α → E), P f → AEStronglyMeasurable f μ\nf✝ : α → E\nhf✝ : Memℒp f✝ p\nε : ℝ≥0∞\nhε : ε ≠ 0\nhp_pos : p ≠ 0\nf f' : α →ₛ E\nhff' : Disjoint (support ↑f) (support ↑f')\nhf : ∀ (δ : ℝ≥0∞), δ ≠ 0 → Memℒp (↑f) p → ∃ g, snorm (↑f - g) p μ ≤ δ ∧ P g\nhf' : ∀ (δ : ℝ≥0∞), δ ≠ 0 → Memℒp (↑f') p → ∃ g, snorm (↑f' - g) p μ ≤ δ ∧ P g\nδ : ℝ≥0∞\nδpos : δ ≠ 0\nint_ff' : Memℒp (↑f) p ∧ Memℒp (↑f') p\nη : ℝ≥0∞\nηpos : 0 < η\nhη :\n  ∀ (f g : α → E),\n    AEStronglyMeasurable f μ → AEStronglyMeasurable g μ → snorm f p μ ≤ η → snorm g p μ ≤ η → snorm (f + g) p μ < δ\ng : α → E\nhg : snorm (↑f - g) p μ ≤ η\nPg : P g\ng' : α → E\nhg' : snorm (↑f' - g') p μ ≤ η\nPg' : P g'\n⊢ ∃ g, snorm (↑(f + f') - g) p μ ≤ δ ∧ P g\n[PROOFSTEP]\nrefine' ⟨g + g', _, h1P g g' Pg Pg'⟩\n[GOAL]\ncase H.h_add.intro.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf✝¹ : α → E\np : ℝ≥0∞\nμ : Measure α\nhp_ne_top : p ≠ ⊤\nP : (α → E) → Prop\nh0P :\n  ∀ (c : E) ⦃s : Set α⦄,\n    MeasurableSet s → ↑↑μ s < ⊤ → ∀ {ε : ℝ≥0∞}, ε ≠ 0 → ∃ g, snorm (g - Set.indicator s fun x => c) p μ ≤ ε ∧ P g\nh1P : ∀ (f g : α → E), P f → P g → P (f + g)\nh2P : ∀ (f : α → E), P f → AEStronglyMeasurable f μ\nf✝ : α → E\nhf✝ : Memℒp f✝ p\nε : ℝ≥0∞\nhε : ε ≠ 0\nhp_pos : p ≠ 0\nf f' : α →ₛ E\nhff' : Disjoint (support ↑f) (support ↑f')\nhf : ∀ (δ : ℝ≥0∞), δ ≠ 0 → Memℒp (↑f) p → ∃ g, snorm (↑f - g) p μ ≤ δ ∧ P g\nhf' : ∀ (δ : ℝ≥0∞), δ ≠ 0 → Memℒp (↑f') p → ∃ g, snorm (↑f' - g) p μ ≤ δ ∧ P g\nδ : ℝ≥0∞\nδpos : δ ≠ 0\nint_ff' : Memℒp (↑f) p ∧ Memℒp (↑f') p\nη : ℝ≥0∞\nηpos : 0 < η\nhη :\n  ∀ (f g : α → E),\n    AEStronglyMeasurable f μ → AEStronglyMeasurable g μ → snorm f p μ ≤ η → snorm g p μ ≤ η → snorm (f + g) p μ < δ\ng : α → E\nhg : snorm (↑f - g) p μ ≤ η\nPg : P g\ng' : α → E\nhg' : snorm (↑f' - g') p μ ≤ η\nPg' : P g'\n⊢ snorm (↑(f + f') - (g + g')) p μ ≤ δ\n[PROOFSTEP]\nconvert (hη _ _ (f.aestronglyMeasurable.sub (h2P g Pg)) (f'.aestronglyMeasurable.sub (h2P g' Pg')) hg hg').le using 2\n[GOAL]\ncase h.e'_3.h.e'_5\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf✝¹ : α → E\np : ℝ≥0∞\nμ : Measure α\nhp_ne_top : p ≠ ⊤\nP : (α → E) → Prop\nh0P :\n  ∀ (c : E) ⦃s : Set α⦄,\n    MeasurableSet s → ↑↑μ s < ⊤ → ∀ {ε : ℝ≥0∞}, ε ≠ 0 → ∃ g, snorm (g - Set.indicator s fun x => c) p μ ≤ ε ∧ P g\nh1P : ∀ (f g : α → E), P f → P g → P (f + g)\nh2P : ∀ (f : α → E), P f → AEStronglyMeasurable f μ\nf✝ : α → E\nhf✝ : Memℒp f✝ p\nε : ℝ≥0∞\nhε : ε ≠ 0\nhp_pos : p ≠ 0\nf f' : α →ₛ E\nhff' : Disjoint (support ↑f) (support ↑f')\nhf : ∀ (δ : ℝ≥0∞), δ ≠ 0 → Memℒp (↑f) p → ∃ g, snorm (↑f - g) p μ ≤ δ ∧ P g\nhf' : ∀ (δ : ℝ≥0∞), δ ≠ 0 → Memℒp (↑f') p → ∃ g, snorm (↑f' - g) p μ ≤ δ ∧ P g\nδ : ℝ≥0∞\nδpos : δ ≠ 0\nint_ff' : Memℒp (↑f) p ∧ Memℒp (↑f') p\nη : ℝ≥0∞\nηpos : 0 < η\nhη :\n  ∀ (f g : α → E),\n    AEStronglyMeasurable f μ → AEStronglyMeasurable g μ → snorm f p μ ≤ η → snorm g p μ ≤ η → snorm (f + g) p μ < δ\ng : α → E\nhg : snorm (↑f - g) p μ ≤ η\nPg : P g\ng' : α → E\nhg' : snorm (↑f' - g') p μ ≤ η\nPg' : P g'\n⊢ ↑(f + f') - (g + g') = ↑f - g + (↑f' - g')\n[PROOFSTEP]\nrw [SimpleFunc.coe_add]\n[GOAL]\ncase h.e'_3.h.e'_5\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf✝¹ : α → E\np : ℝ≥0∞\nμ : Measure α\nhp_ne_top : p ≠ ⊤\nP : (α → E) → Prop\nh0P :\n  ∀ (c : E) ⦃s : Set α⦄,\n    MeasurableSet s → ↑↑μ s < ⊤ → ∀ {ε : ℝ≥0∞}, ε ≠ 0 → ∃ g, snorm (g - Set.indicator s fun x => c) p μ ≤ ε ∧ P g\nh1P : ∀ (f g : α → E), P f → P g → P (f + g)\nh2P : ∀ (f : α → E), P f → AEStronglyMeasurable f μ\nf✝ : α → E\nhf✝ : Memℒp f✝ p\nε : ℝ≥0∞\nhε : ε ≠ 0\nhp_pos : p ≠ 0\nf f' : α →ₛ E\nhff' : Disjoint (support ↑f) (support ↑f')\nhf : ∀ (δ : ℝ≥0∞), δ ≠ 0 → Memℒp (↑f) p → ∃ g, snorm (↑f - g) p μ ≤ δ ∧ P g\nhf' : ∀ (δ : ℝ≥0∞), δ ≠ 0 → Memℒp (↑f') p → ∃ g, snorm (↑f' - g) p μ ≤ δ ∧ P g\nδ : ℝ≥0∞\nδpos : δ ≠ 0\nint_ff' : Memℒp (↑f) p ∧ Memℒp (↑f') p\nη : ℝ≥0∞\nηpos : 0 < η\nhη :\n  ∀ (f g : α → E),\n    AEStronglyMeasurable f μ → AEStronglyMeasurable g μ → snorm f p μ ≤ η → snorm g p μ ≤ η → snorm (f + g) p μ < δ\ng : α → E\nhg : snorm (↑f - g) p μ ≤ η\nPg : P g\ng' : α → E\nhg' : snorm (↑f' - g') p μ ≤ η\nPg' : P g'\n⊢ ↑f + ↑f' - (g + g') = ↑f - g + (↑f' - g')\n[PROOFSTEP]\nabel\n[GOAL]\ncase h.e'_3.h.e'_5\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf✝¹ : α → E\np : ℝ≥0∞\nμ : Measure α\nhp_ne_top : p ≠ ⊤\nP : (α → E) → Prop\nh0P :\n  ∀ (c : E) ⦃s : Set α⦄,\n    MeasurableSet s → ↑↑μ s < ⊤ → ∀ {ε : ℝ≥0∞}, ε ≠ 0 → ∃ g, snorm (g - Set.indicator s fun x => c) p μ ≤ ε ∧ P g\nh1P : ∀ (f g : α → E), P f → P g → P (f + g)\nh2P : ∀ (f : α → E), P f → AEStronglyMeasurable f μ\nf✝ : α → E\nhf✝ : Memℒp f✝ p\nε : ℝ≥0∞\nhε : ε ≠ 0\nhp_pos : p ≠ 0\nf f' : α →ₛ E\nhff' : Disjoint (support ↑f) (support ↑f')\nhf : ∀ (δ : ℝ≥0∞), δ ≠ 0 → Memℒp (↑f) p → ∃ g, snorm (↑f - g) p μ ≤ δ ∧ P g\nhf' : ∀ (δ : ℝ≥0∞), δ ≠ 0 → Memℒp (↑f') p → ∃ g, snorm (↑f' - g) p μ ≤ δ ∧ P g\nδ : ℝ≥0∞\nδpos : δ ≠ 0\nint_ff' : Memℒp (↑f) p ∧ Memℒp (↑f') p\nη : ℝ≥0∞\nηpos : 0 < η\nhη :\n  ∀ (f g : α → E),\n    AEStronglyMeasurable f μ → AEStronglyMeasurable g μ → snorm f p μ ≤ η → snorm g p μ ≤ η → snorm (f + g) p μ < δ\ng : α → E\nhg : snorm (↑f - g) p μ ≤ η\nPg : P g\ng' : α → E\nhg' : snorm (↑f' - g') p μ ≤ η\nPg' : P g'\n⊢ ↑f + ↑f' - (g + g') = ↑f - g + (↑f' - g')\n[PROOFSTEP]\nabel\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf✝ : α → E\np : ℝ≥0∞\nμ : Measure α\nf : { x // x ∈ Lp.simpleFunc E 1 μ }\n⊢ Integrable ↑(Lp.simpleFunc.toSimpleFunc f)\n[PROOFSTEP]\nrw [← memℒp_one_iff_integrable]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf✝ : α → E\np : ℝ≥0∞\nμ : Measure α\nf : { x // x ∈ Lp.simpleFunc E 1 μ }\n⊢ Memℒp (↑(Lp.simpleFunc.toSimpleFunc f)) 1\n[PROOFSTEP]\nexact Lp.simpleFunc.memℒp f\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf : α → E\np : ℝ≥0∞\nμ : Measure α\nP : (α → E) → Prop\nh_ind : ∀ (c : E) ⦃s : Set α⦄, MeasurableSet s → ↑↑μ s < ⊤ → P (indicator s fun x => c)\nh_add : ∀ ⦃f g : α → E⦄, Disjoint (support f) (support g) → Integrable f → Integrable g → P f → P g → P (f + g)\nh_closed : IsClosed {f | P ↑↑f}\nh_ae : ∀ ⦃f g : α → E⦄, f =ᵐ[μ] g → Integrable f → P f → P g\n⊢ ∀ ⦃f : α → E⦄, Integrable f → P f\n[PROOFSTEP]\nsimp only [← memℒp_one_iff_integrable] at *\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\nE : Type u_4\nF : Type u_5\n𝕜 : Type u_6\ninst✝¹ : MeasurableSpace α\ninst✝ : NormedAddCommGroup E\nf : α → E\np : ℝ≥0∞\nμ : Measure α\nP : (α → E) → Prop\nh_ind : ∀ (c : E) ⦃s : Set α⦄, MeasurableSet s → ↑↑μ s < ⊤ → P (indicator s fun x => c)\nh_closed : IsClosed {f | P ↑↑f}\nh_add : ∀ ⦃f g : α → E⦄, Disjoint (support f) (support g) → Memℒp f 1 → Memℒp g 1 → P f → P g → P (f + g)\nh_ae : ∀ ⦃f g : α → E⦄, f =ᵐ[μ] g → Memℒp f 1 → P f → P g\n⊢ ∀ ⦃f : α → E⦄, Memℒp f 1 → P f\n[PROOFSTEP]\nexact Memℒp.induction one_ne_top (P := P) h_ind h_add h_closed h_ae\n", "meta": {"mathlib_filename": "Mathlib.MeasureTheory.Function.SimpleFuncDenseLp", "llama_tokens": 127915, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7549149978955811, "lm_q2_score": 0.6992544147913993, "lm_q1q2_score": 0.527877645070725}}
{"text": "[GOAL]\nK : Type u_1\nS : Type u_2\ninst✝² : Field K\ninst✝¹ : CommRing S\ninst✝ : Algebra K S\nx : S\nhx : IsIntegral K x\n⊢ Basis (Fin (natDegree (minpoly K x))) K { x_1 // x_1 ∈ adjoin K {x} }\n[PROOFSTEP]\nhave hST : Function.Injective (algebraMap (adjoin K ({ x } : Set S)) S) := Subtype.coe_injective\n[GOAL]\nK : Type u_1\nS : Type u_2\ninst✝² : Field K\ninst✝¹ : CommRing S\ninst✝ : Algebra K S\nx : S\nhx : IsIntegral K x\nhST : Function.Injective ↑(algebraMap { x_1 // x_1 ∈ adjoin K {x} } S)\n⊢ Basis (Fin (natDegree (minpoly K x))) K { x_1 // x_1 ∈ adjoin K {x} }\n[PROOFSTEP]\nhave hx' : IsIntegral K (⟨x, subset_adjoin (Set.mem_singleton x)⟩ : adjoin K ({ x } : Set S)) :=\n  by\n  apply (isIntegral_algebraMap_iff hST).mp\n  convert hx\n[GOAL]\nK : Type u_1\nS : Type u_2\ninst✝² : Field K\ninst✝¹ : CommRing S\ninst✝ : Algebra K S\nx : S\nhx : IsIntegral K x\nhST : Function.Injective ↑(algebraMap { x_1 // x_1 ∈ adjoin K {x} } S)\n⊢ IsIntegral K { val := x, property := (_ : x ∈ ↑(adjoin K {x})) }\n[PROOFSTEP]\napply (isIntegral_algebraMap_iff hST).mp\n[GOAL]\nK : Type u_1\nS : Type u_2\ninst✝² : Field K\ninst✝¹ : CommRing S\ninst✝ : Algebra K S\nx : S\nhx : IsIntegral K x\nhST : Function.Injective ↑(algebraMap { x_1 // x_1 ∈ adjoin K {x} } S)\n⊢ IsIntegral K (↑(algebraMap { x_1 // x_1 ∈ adjoin K {x} } S) { val := x, property := (_ : x ∈ ↑(adjoin K {x})) })\n[PROOFSTEP]\nconvert hx\n[GOAL]\nK : Type u_1\nS : Type u_2\ninst✝² : Field K\ninst✝¹ : CommRing S\ninst✝ : Algebra K S\nx : S\nhx : IsIntegral K x\nhST : Function.Injective ↑(algebraMap { x_1 // x_1 ∈ adjoin K {x} } S)\nhx' : IsIntegral K { val := x, property := (_ : x ∈ ↑(adjoin K {x})) }\n⊢ Basis (Fin (natDegree (minpoly K x))) K { x_1 // x_1 ∈ adjoin K {x} }\n[PROOFSTEP]\nhave minpoly_eq := minpoly.eq_of_algebraMap_eq hST hx' rfl\n[GOAL]\nK : Type u_1\nS : Type u_2\ninst✝² : Field K\ninst✝¹ : CommRing S\ninst✝ : Algebra K S\nx : S\nhx : IsIntegral K x\nhST : Function.Injective ↑(algebraMap { x_1 // x_1 ∈ adjoin K {x} } S)\nhx' : IsIntegral K { val := x, property := (_ : x ∈ ↑(adjoin K {x})) }\nminpoly_eq :\n  minpoly K { val := x, property := (_ : x ∈ ↑(adjoin K {x})) } =\n    minpoly K (↑(algebraMap { x_1 // x_1 ∈ adjoin K {x} } S) { val := x, property := (_ : x ∈ ↑(adjoin K {x})) })\n⊢ Basis (Fin (natDegree (minpoly K x))) K { x_1 // x_1 ∈ adjoin K {x} }\n[PROOFSTEP]\napply\n  @Basis.mk (Fin (minpoly K x).natDegree) _ (adjoin K { x }) fun i => ⟨x, subset_adjoin (Set.mem_singleton x)⟩ ^ (i : ℕ)\n[GOAL]\ncase hli\nK : Type u_1\nS : Type u_2\ninst✝² : Field K\ninst✝¹ : CommRing S\ninst✝ : Algebra K S\nx : S\nhx : IsIntegral K x\nhST : Function.Injective ↑(algebraMap { x_1 // x_1 ∈ adjoin K {x} } S)\nhx' : IsIntegral K { val := x, property := (_ : x ∈ ↑(adjoin K {x})) }\nminpoly_eq :\n  minpoly K { val := x, property := (_ : x ∈ ↑(adjoin K {x})) } =\n    minpoly K (↑(algebraMap { x_1 // x_1 ∈ adjoin K {x} } S) { val := x, property := (_ : x ∈ ↑(adjoin K {x})) })\n⊢ LinearIndependent K fun i => { val := x, property := (_ : x ∈ ↑(adjoin K {x})) } ^ ↑i\n[PROOFSTEP]\nhave : LinearIndependent K _ := linearIndependent_pow (⟨x, self_mem_adjoin_singleton _ _⟩ : adjoin K { x })\n[GOAL]\ncase hli\nK : Type u_1\nS : Type u_2\ninst✝² : Field K\ninst✝¹ : CommRing S\ninst✝ : Algebra K S\nx : S\nhx : IsIntegral K x\nhST : Function.Injective ↑(algebraMap { x_1 // x_1 ∈ adjoin K {x} } S)\nhx' : IsIntegral K { val := x, property := (_ : x ∈ ↑(adjoin K {x})) }\nminpoly_eq :\n  minpoly K { val := x, property := (_ : x ∈ ↑(adjoin K {x})) } =\n    minpoly K (↑(algebraMap { x_1 // x_1 ∈ adjoin K {x} } S) { val := x, property := (_ : x ∈ ↑(adjoin K {x})) })\nthis : LinearIndependent K fun i => { val := x, property := (_ : x ∈ adjoin K {x}) } ^ ↑i\n⊢ LinearIndependent K fun i => { val := x, property := (_ : x ∈ ↑(adjoin K {x})) } ^ ↑i\n[PROOFSTEP]\nrwa [minpoly_eq] at this \n[GOAL]\ncase hsp\nK : Type u_1\nS : Type u_2\ninst✝² : Field K\ninst✝¹ : CommRing S\ninst✝ : Algebra K S\nx : S\nhx : IsIntegral K x\nhST : Function.Injective ↑(algebraMap { x_1 // x_1 ∈ adjoin K {x} } S)\nhx' : IsIntegral K { val := x, property := (_ : x ∈ ↑(adjoin K {x})) }\nminpoly_eq :\n  minpoly K { val := x, property := (_ : x ∈ ↑(adjoin K {x})) } =\n    minpoly K (↑(algebraMap { x_1 // x_1 ∈ adjoin K {x} } S) { val := x, property := (_ : x ∈ ↑(adjoin K {x})) })\n⊢ ⊤ ≤ Submodule.span K (Set.range fun i => { val := x, property := (_ : x ∈ ↑(adjoin K {x})) } ^ ↑i)\n[PROOFSTEP]\nrintro ⟨y, hy⟩ _\n[GOAL]\ncase hsp.mk\nK : Type u_1\nS : Type u_2\ninst✝² : Field K\ninst✝¹ : CommRing S\ninst✝ : Algebra K S\nx : S\nhx : IsIntegral K x\nhST : Function.Injective ↑(algebraMap { x_1 // x_1 ∈ adjoin K {x} } S)\nhx' : IsIntegral K { val := x, property := (_ : x ∈ ↑(adjoin K {x})) }\nminpoly_eq :\n  minpoly K { val := x, property := (_ : x ∈ ↑(adjoin K {x})) } =\n    minpoly K (↑(algebraMap { x_1 // x_1 ∈ adjoin K {x} } S) { val := x, property := (_ : x ∈ ↑(adjoin K {x})) })\ny : S\nhy : y ∈ adjoin K {x}\na✝ : { val := y, property := hy } ∈ ⊤\n⊢ { val := y, property := hy } ∈\n    Submodule.span K (Set.range fun i => { val := x, property := (_ : x ∈ ↑(adjoin K {x})) } ^ ↑i)\n[PROOFSTEP]\nhave := hx'.mem_span_pow (y := ⟨y, hy⟩)\n[GOAL]\ncase hsp.mk\nK : Type u_1\nS : Type u_2\ninst✝² : Field K\ninst✝¹ : CommRing S\ninst✝ : Algebra K S\nx : S\nhx : IsIntegral K x\nhST : Function.Injective ↑(algebraMap { x_1 // x_1 ∈ adjoin K {x} } S)\nhx' : IsIntegral K { val := x, property := (_ : x ∈ ↑(adjoin K {x})) }\nminpoly_eq :\n  minpoly K { val := x, property := (_ : x ∈ ↑(adjoin K {x})) } =\n    minpoly K (↑(algebraMap { x_1 // x_1 ∈ adjoin K {x} } S) { val := x, property := (_ : x ∈ ↑(adjoin K {x})) })\ny : S\nhy : y ∈ adjoin K {x}\na✝ : { val := y, property := hy } ∈ ⊤\nthis :\n  (∃ f, { val := y, property := hy } = ↑(aeval { val := x, property := (_ : x ∈ ↑(adjoin K {x})) }) f) →\n    { val := y, property := hy } ∈\n      Submodule.span K (Set.range fun i => { val := x, property := (_ : x ∈ ↑(adjoin K {x})) } ^ ↑i)\n⊢ { val := y, property := hy } ∈\n    Submodule.span K (Set.range fun i => { val := x, property := (_ : x ∈ ↑(adjoin K {x})) } ^ ↑i)\n[PROOFSTEP]\nrw [minpoly_eq] at this \n[GOAL]\ncase hsp.mk\nK : Type u_1\nS : Type u_2\ninst✝² : Field K\ninst✝¹ : CommRing S\ninst✝ : Algebra K S\nx : S\nhx : IsIntegral K x\nhST : Function.Injective ↑(algebraMap { x_1 // x_1 ∈ adjoin K {x} } S)\nhx' : IsIntegral K { val := x, property := (_ : x ∈ ↑(adjoin K {x})) }\nminpoly_eq :\n  minpoly K { val := x, property := (_ : x ∈ ↑(adjoin K {x})) } =\n    minpoly K (↑(algebraMap { x_1 // x_1 ∈ adjoin K {x} } S) { val := x, property := (_ : x ∈ ↑(adjoin K {x})) })\ny : S\nhy : y ∈ adjoin K {x}\na✝ : { val := y, property := hy } ∈ ⊤\nthis :\n  (∃ f, { val := y, property := hy } = ↑(aeval { val := x, property := (_ : x ∈ ↑(adjoin K {x})) }) f) →\n    { val := y, property := hy } ∈\n      Submodule.span K (Set.range fun i => { val := x, property := (_ : x ∈ ↑(adjoin K {x})) } ^ ↑i)\n⊢ { val := y, property := hy } ∈\n    Submodule.span K (Set.range fun i => { val := x, property := (_ : x ∈ ↑(adjoin K {x})) } ^ ↑i)\n[PROOFSTEP]\napply this\n[GOAL]\ncase hsp.mk\nK : Type u_1\nS : Type u_2\ninst✝² : Field K\ninst✝¹ : CommRing S\ninst✝ : Algebra K S\nx : S\nhx : IsIntegral K x\nhST : Function.Injective ↑(algebraMap { x_1 // x_1 ∈ adjoin K {x} } S)\nhx' : IsIntegral K { val := x, property := (_ : x ∈ ↑(adjoin K {x})) }\nminpoly_eq :\n  minpoly K { val := x, property := (_ : x ∈ ↑(adjoin K {x})) } =\n    minpoly K (↑(algebraMap { x_1 // x_1 ∈ adjoin K {x} } S) { val := x, property := (_ : x ∈ ↑(adjoin K {x})) })\ny : S\nhy : y ∈ adjoin K {x}\na✝ : { val := y, property := hy } ∈ ⊤\nthis :\n  (∃ f, { val := y, property := hy } = ↑(aeval { val := x, property := (_ : x ∈ ↑(adjoin K {x})) }) f) →\n    { val := y, property := hy } ∈\n      Submodule.span K (Set.range fun i => { val := x, property := (_ : x ∈ ↑(adjoin K {x})) } ^ ↑i)\n⊢ ∃ f, { val := y, property := hy } = ↑(aeval { val := x, property := (_ : x ∈ ↑(adjoin K {x})) }) f\n[PROOFSTEP]\nrw [adjoin_singleton_eq_range_aeval] at hy \n[GOAL]\ncase hsp.mk\nK : Type u_1\nS : Type u_2\ninst✝² : Field K\ninst✝¹ : CommRing S\ninst✝ : Algebra K S\nx : S\nhx : IsIntegral K x\nhST : Function.Injective ↑(algebraMap { x_1 // x_1 ∈ adjoin K {x} } S)\nhx' : IsIntegral K { val := x, property := (_ : x ∈ ↑(adjoin K {x})) }\nminpoly_eq :\n  minpoly K { val := x, property := (_ : x ∈ ↑(adjoin K {x})) } =\n    minpoly K (↑(algebraMap { x_1 // x_1 ∈ adjoin K {x} } S) { val := x, property := (_ : x ∈ ↑(adjoin K {x})) })\ny : S\nhy✝ : y ∈ adjoin K {x}\nhy : y ∈ AlgHom.range (aeval x)\na✝ : { val := y, property := hy✝ } ∈ ⊤\nthis :\n  (∃ f, { val := y, property := hy✝ } = ↑(aeval { val := x, property := (_ : x ∈ ↑(adjoin K {x})) }) f) →\n    { val := y, property := hy✝ } ∈\n      Submodule.span K (Set.range fun i => { val := x, property := (_ : x ∈ ↑(adjoin K {x})) } ^ ↑i)\n⊢ ∃ f, { val := y, property := hy✝ } = ↑(aeval { val := x, property := (_ : x ∈ ↑(adjoin K {x})) }) f\n[PROOFSTEP]\nobtain ⟨f, rfl⟩ := (aeval x).mem_range.mp hy\n[GOAL]\ncase hsp.mk.intro\nK : Type u_1\nS : Type u_2\ninst✝² : Field K\ninst✝¹ : CommRing S\ninst✝ : Algebra K S\nx : S\nhx : IsIntegral K x\nhST : Function.Injective ↑(algebraMap { x_1 // x_1 ∈ adjoin K {x} } S)\nhx' : IsIntegral K { val := x, property := (_ : x ∈ ↑(adjoin K {x})) }\nminpoly_eq :\n  minpoly K { val := x, property := (_ : x ∈ ↑(adjoin K {x})) } =\n    minpoly K (↑(algebraMap { x_1 // x_1 ∈ adjoin K {x} } S) { val := x, property := (_ : x ∈ ↑(adjoin K {x})) })\nf : K[X]\nhy✝ : ↑(aeval x) f ∈ adjoin K {x}\nhy : ↑(aeval x) f ∈ AlgHom.range (aeval x)\na✝ : { val := ↑(aeval x) f, property := hy✝ } ∈ ⊤\nthis :\n  (∃ f_1, { val := ↑(aeval x) f, property := hy✝ } = ↑(aeval { val := x, property := (_ : x ∈ ↑(adjoin K {x})) }) f_1) →\n    { val := ↑(aeval x) f, property := hy✝ } ∈\n      Submodule.span K (Set.range fun i => { val := x, property := (_ : x ∈ ↑(adjoin K {x})) } ^ ↑i)\n⊢ ∃ f_1, { val := ↑(aeval x) f, property := hy✝ } = ↑(aeval { val := x, property := (_ : x ∈ ↑(adjoin K {x})) }) f_1\n[PROOFSTEP]\nuse f\n[GOAL]\ncase h\nK : Type u_1\nS : Type u_2\ninst✝² : Field K\ninst✝¹ : CommRing S\ninst✝ : Algebra K S\nx : S\nhx : IsIntegral K x\nhST : Function.Injective ↑(algebraMap { x_1 // x_1 ∈ adjoin K {x} } S)\nhx' : IsIntegral K { val := x, property := (_ : x ∈ ↑(adjoin K {x})) }\nminpoly_eq :\n  minpoly K { val := x, property := (_ : x ∈ ↑(adjoin K {x})) } =\n    minpoly K (↑(algebraMap { x_1 // x_1 ∈ adjoin K {x} } S) { val := x, property := (_ : x ∈ ↑(adjoin K {x})) })\nf : K[X]\nhy✝ : ↑(aeval x) f ∈ adjoin K {x}\nhy : ↑(aeval x) f ∈ AlgHom.range (aeval x)\na✝ : { val := ↑(aeval x) f, property := hy✝ } ∈ ⊤\nthis :\n  (∃ f_1, { val := ↑(aeval x) f, property := hy✝ } = ↑(aeval { val := x, property := (_ : x ∈ ↑(adjoin K {x})) }) f_1) →\n    { val := ↑(aeval x) f, property := hy✝ } ∈\n      Submodule.span K (Set.range fun i => { val := x, property := (_ : x ∈ ↑(adjoin K {x})) } ^ ↑i)\n⊢ { val := ↑(aeval x) f, property := hy✝ } = ↑(aeval { val := x, property := (_ : x ∈ ↑(adjoin K {x})) }) f\n[PROOFSTEP]\next\n[GOAL]\ncase h.a\nK : Type u_1\nS : Type u_2\ninst✝² : Field K\ninst✝¹ : CommRing S\ninst✝ : Algebra K S\nx : S\nhx : IsIntegral K x\nhST : Function.Injective ↑(algebraMap { x_1 // x_1 ∈ adjoin K {x} } S)\nhx' : IsIntegral K { val := x, property := (_ : x ∈ ↑(adjoin K {x})) }\nminpoly_eq :\n  minpoly K { val := x, property := (_ : x ∈ ↑(adjoin K {x})) } =\n    minpoly K (↑(algebraMap { x_1 // x_1 ∈ adjoin K {x} } S) { val := x, property := (_ : x ∈ ↑(adjoin K {x})) })\nf : K[X]\nhy✝ : ↑(aeval x) f ∈ adjoin K {x}\nhy : ↑(aeval x) f ∈ AlgHom.range (aeval x)\na✝ : { val := ↑(aeval x) f, property := hy✝ } ∈ ⊤\nthis :\n  (∃ f_1, { val := ↑(aeval x) f, property := hy✝ } = ↑(aeval { val := x, property := (_ : x ∈ ↑(adjoin K {x})) }) f_1) →\n    { val := ↑(aeval x) f, property := hy✝ } ∈\n      Submodule.span K (Set.range fun i => { val := x, property := (_ : x ∈ ↑(adjoin K {x})) } ^ ↑i)\n⊢ ↑{ val := ↑(aeval x) f, property := hy✝ } = ↑(↑(aeval { val := x, property := (_ : x ∈ ↑(adjoin K {x})) }) f)\n[PROOFSTEP]\nexact aeval_algebraMap_apply S (⟨x, _⟩ : adjoin K { x }) _\n[GOAL]\nK : Type u_1\nS : Type u_2\ninst✝² : Field K\ninst✝¹ : CommRing S\ninst✝ : Algebra K S\nx : S\nhx : IsIntegral K x\ni : Fin (natDegree (minpoly K x))\n⊢ ↑(powerBasisAux hx) i = { val := x, property := (_ : x ∈ ↑(adjoin K {x})) } ^ ↑i\n[PROOFSTEP]\nrw [adjoin.powerBasisAux, Basis.mk_apply]\n[GOAL]\nK : Type u_1\nS : Type u_2\ninst✝¹¹ : Field K\ninst✝¹⁰ : CommRing S\ninst✝⁹ : Algebra K S\nR : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Algebra R S\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsScalarTower R K S\nA : Type u_4\ninst✝⁴ : CommRing A\ninst✝³ : Algebra R A\ninst✝² : Algebra S A\ninst✝¹ : IsScalarTower R S A\nB : PowerBasis S A\nhB : IsIntegral R B.gen\ninst✝ : IsDomain S\nhmin : minpoly S B.gen = Polynomial.map (algebraMap R S) (minpoly R B.gen)\nn : ℕ\n⊢ ∀ (i : Fin B.dim), IsIntegral R (↑(↑B.basis.repr (B.gen ^ n)) i)\n[PROOFSTEP]\nintro i\n[GOAL]\nK : Type u_1\nS : Type u_2\ninst✝¹¹ : Field K\ninst✝¹⁰ : CommRing S\ninst✝⁹ : Algebra K S\nR : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Algebra R S\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsScalarTower R K S\nA : Type u_4\ninst✝⁴ : CommRing A\ninst✝³ : Algebra R A\ninst✝² : Algebra S A\ninst✝¹ : IsScalarTower R S A\nB : PowerBasis S A\nhB : IsIntegral R B.gen\ninst✝ : IsDomain S\nhmin : minpoly S B.gen = Polynomial.map (algebraMap R S) (minpoly R B.gen)\nn : ℕ\ni : Fin B.dim\n⊢ IsIntegral R (↑(↑B.basis.repr (B.gen ^ n)) i)\n[PROOFSTEP]\nlet Q := X ^ n %ₘ minpoly R B.gen\n[GOAL]\nK : Type u_1\nS : Type u_2\ninst✝¹¹ : Field K\ninst✝¹⁰ : CommRing S\ninst✝⁹ : Algebra K S\nR : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Algebra R S\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsScalarTower R K S\nA : Type u_4\ninst✝⁴ : CommRing A\ninst✝³ : Algebra R A\ninst✝² : Algebra S A\ninst✝¹ : IsScalarTower R S A\nB : PowerBasis S A\nhB : IsIntegral R B.gen\ninst✝ : IsDomain S\nhmin : minpoly S B.gen = Polynomial.map (algebraMap R S) (minpoly R B.gen)\nn : ℕ\ni : Fin B.dim\nQ : R[X] := X ^ n %ₘ minpoly R B.gen\n⊢ IsIntegral R (↑(↑B.basis.repr (B.gen ^ n)) i)\n[PROOFSTEP]\nhave : B.gen ^ n = aeval B.gen Q :=\n  by\n  rw [← @aeval_X_pow R _ _ _ _ B.gen, ← modByMonic_add_div (X ^ n) (minpoly.monic hB)]\n  simp\n[GOAL]\nK : Type u_1\nS : Type u_2\ninst✝¹¹ : Field K\ninst✝¹⁰ : CommRing S\ninst✝⁹ : Algebra K S\nR : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Algebra R S\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsScalarTower R K S\nA : Type u_4\ninst✝⁴ : CommRing A\ninst✝³ : Algebra R A\ninst✝² : Algebra S A\ninst✝¹ : IsScalarTower R S A\nB : PowerBasis S A\nhB : IsIntegral R B.gen\ninst✝ : IsDomain S\nhmin : minpoly S B.gen = Polynomial.map (algebraMap R S) (minpoly R B.gen)\nn : ℕ\ni : Fin B.dim\nQ : R[X] := X ^ n %ₘ minpoly R B.gen\n⊢ B.gen ^ n = ↑(aeval B.gen) Q\n[PROOFSTEP]\nrw [← @aeval_X_pow R _ _ _ _ B.gen, ← modByMonic_add_div (X ^ n) (minpoly.monic hB)]\n[GOAL]\nK : Type u_1\nS : Type u_2\ninst✝¹¹ : Field K\ninst✝¹⁰ : CommRing S\ninst✝⁹ : Algebra K S\nR : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Algebra R S\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsScalarTower R K S\nA : Type u_4\ninst✝⁴ : CommRing A\ninst✝³ : Algebra R A\ninst✝² : Algebra S A\ninst✝¹ : IsScalarTower R S A\nB : PowerBasis S A\nhB : IsIntegral R B.gen\ninst✝ : IsDomain S\nhmin : minpoly S B.gen = Polynomial.map (algebraMap R S) (minpoly R B.gen)\nn : ℕ\ni : Fin B.dim\nQ : R[X] := X ^ n %ₘ minpoly R B.gen\n⊢ ↑(aeval B.gen) (X ^ n %ₘ minpoly R B.gen + minpoly R B.gen * (X ^ n /ₘ minpoly R B.gen)) = ↑(aeval B.gen) Q\n[PROOFSTEP]\nsimp\n[GOAL]\nK : Type u_1\nS : Type u_2\ninst✝¹¹ : Field K\ninst✝¹⁰ : CommRing S\ninst✝⁹ : Algebra K S\nR : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Algebra R S\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsScalarTower R K S\nA : Type u_4\ninst✝⁴ : CommRing A\ninst✝³ : Algebra R A\ninst✝² : Algebra S A\ninst✝¹ : IsScalarTower R S A\nB : PowerBasis S A\nhB : IsIntegral R B.gen\ninst✝ : IsDomain S\nhmin : minpoly S B.gen = Polynomial.map (algebraMap R S) (minpoly R B.gen)\nn : ℕ\ni : Fin B.dim\nQ : R[X] := X ^ n %ₘ minpoly R B.gen\nthis : B.gen ^ n = ↑(aeval B.gen) Q\n⊢ IsIntegral R (↑(↑B.basis.repr (B.gen ^ n)) i)\n[PROOFSTEP]\nby_cases hQ : Q = 0\n[GOAL]\ncase pos\nK : Type u_1\nS : Type u_2\ninst✝¹¹ : Field K\ninst✝¹⁰ : CommRing S\ninst✝⁹ : Algebra K S\nR : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Algebra R S\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsScalarTower R K S\nA : Type u_4\ninst✝⁴ : CommRing A\ninst✝³ : Algebra R A\ninst✝² : Algebra S A\ninst✝¹ : IsScalarTower R S A\nB : PowerBasis S A\nhB : IsIntegral R B.gen\ninst✝ : IsDomain S\nhmin : minpoly S B.gen = Polynomial.map (algebraMap R S) (minpoly R B.gen)\nn : ℕ\ni : Fin B.dim\nQ : R[X] := X ^ n %ₘ minpoly R B.gen\nthis : B.gen ^ n = ↑(aeval B.gen) Q\nhQ : Q = 0\n⊢ IsIntegral R (↑(↑B.basis.repr (B.gen ^ n)) i)\n[PROOFSTEP]\nsimp [this, hQ, isIntegral_zero]\n[GOAL]\ncase neg\nK : Type u_1\nS : Type u_2\ninst✝¹¹ : Field K\ninst✝¹⁰ : CommRing S\ninst✝⁹ : Algebra K S\nR : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Algebra R S\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsScalarTower R K S\nA : Type u_4\ninst✝⁴ : CommRing A\ninst✝³ : Algebra R A\ninst✝² : Algebra S A\ninst✝¹ : IsScalarTower R S A\nB : PowerBasis S A\nhB : IsIntegral R B.gen\ninst✝ : IsDomain S\nhmin : minpoly S B.gen = Polynomial.map (algebraMap R S) (minpoly R B.gen)\nn : ℕ\ni : Fin B.dim\nQ : R[X] := X ^ n %ₘ minpoly R B.gen\nthis : B.gen ^ n = ↑(aeval B.gen) Q\nhQ : ¬Q = 0\n⊢ IsIntegral R (↑(↑B.basis.repr (B.gen ^ n)) i)\n[PROOFSTEP]\nhave hlt : Q.natDegree < B.dim :=\n  by\n  rw [← B.natDegree_minpoly, hmin, (minpoly.monic hB).natDegree_map, natDegree_lt_natDegree_iff hQ]\n  letI : Nontrivial R := Nontrivial.of_polynomial_ne hQ\n  exact degree_modByMonic_lt _ (minpoly.monic hB)\n[GOAL]\nK : Type u_1\nS : Type u_2\ninst✝¹¹ : Field K\ninst✝¹⁰ : CommRing S\ninst✝⁹ : Algebra K S\nR : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Algebra R S\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsScalarTower R K S\nA : Type u_4\ninst✝⁴ : CommRing A\ninst✝³ : Algebra R A\ninst✝² : Algebra S A\ninst✝¹ : IsScalarTower R S A\nB : PowerBasis S A\nhB : IsIntegral R B.gen\ninst✝ : IsDomain S\nhmin : minpoly S B.gen = Polynomial.map (algebraMap R S) (minpoly R B.gen)\nn : ℕ\ni : Fin B.dim\nQ : R[X] := X ^ n %ₘ minpoly R B.gen\nthis : B.gen ^ n = ↑(aeval B.gen) Q\nhQ : ¬Q = 0\n⊢ natDegree Q < B.dim\n[PROOFSTEP]\nrw [← B.natDegree_minpoly, hmin, (minpoly.monic hB).natDegree_map, natDegree_lt_natDegree_iff hQ]\n[GOAL]\nK : Type u_1\nS : Type u_2\ninst✝¹¹ : Field K\ninst✝¹⁰ : CommRing S\ninst✝⁹ : Algebra K S\nR : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Algebra R S\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsScalarTower R K S\nA : Type u_4\ninst✝⁴ : CommRing A\ninst✝³ : Algebra R A\ninst✝² : Algebra S A\ninst✝¹ : IsScalarTower R S A\nB : PowerBasis S A\nhB : IsIntegral R B.gen\ninst✝ : IsDomain S\nhmin : minpoly S B.gen = Polynomial.map (algebraMap R S) (minpoly R B.gen)\nn : ℕ\ni : Fin B.dim\nQ : R[X] := X ^ n %ₘ minpoly R B.gen\nthis : B.gen ^ n = ↑(aeval B.gen) Q\nhQ : ¬Q = 0\n⊢ degree Q < degree (minpoly R B.gen)\n[PROOFSTEP]\nletI : Nontrivial R := Nontrivial.of_polynomial_ne hQ\n[GOAL]\nK : Type u_1\nS : Type u_2\ninst✝¹¹ : Field K\ninst✝¹⁰ : CommRing S\ninst✝⁹ : Algebra K S\nR : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Algebra R S\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsScalarTower R K S\nA : Type u_4\ninst✝⁴ : CommRing A\ninst✝³ : Algebra R A\ninst✝² : Algebra S A\ninst✝¹ : IsScalarTower R S A\nB : PowerBasis S A\nhB : IsIntegral R B.gen\ninst✝ : IsDomain S\nhmin : minpoly S B.gen = Polynomial.map (algebraMap R S) (minpoly R B.gen)\nn : ℕ\ni : Fin B.dim\nQ : R[X] := X ^ n %ₘ minpoly R B.gen\nthis✝ : B.gen ^ n = ↑(aeval B.gen) Q\nhQ : ¬Q = 0\nthis : Nontrivial R := Nontrivial.of_polynomial_ne hQ\n⊢ degree Q < degree (minpoly R B.gen)\n[PROOFSTEP]\nexact degree_modByMonic_lt _ (minpoly.monic hB)\n[GOAL]\ncase neg\nK : Type u_1\nS : Type u_2\ninst✝¹¹ : Field K\ninst✝¹⁰ : CommRing S\ninst✝⁹ : Algebra K S\nR : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Algebra R S\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsScalarTower R K S\nA : Type u_4\ninst✝⁴ : CommRing A\ninst✝³ : Algebra R A\ninst✝² : Algebra S A\ninst✝¹ : IsScalarTower R S A\nB : PowerBasis S A\nhB : IsIntegral R B.gen\ninst✝ : IsDomain S\nhmin : minpoly S B.gen = Polynomial.map (algebraMap R S) (minpoly R B.gen)\nn : ℕ\ni : Fin B.dim\nQ : R[X] := X ^ n %ₘ minpoly R B.gen\nthis : B.gen ^ n = ↑(aeval B.gen) Q\nhQ : ¬Q = 0\nhlt : natDegree Q < B.dim\n⊢ IsIntegral R (↑(↑B.basis.repr (B.gen ^ n)) i)\n[PROOFSTEP]\nrw [this, aeval_eq_sum_range' hlt]\n[GOAL]\ncase neg\nK : Type u_1\nS : Type u_2\ninst✝¹¹ : Field K\ninst✝¹⁰ : CommRing S\ninst✝⁹ : Algebra K S\nR : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Algebra R S\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsScalarTower R K S\nA : Type u_4\ninst✝⁴ : CommRing A\ninst✝³ : Algebra R A\ninst✝² : Algebra S A\ninst✝¹ : IsScalarTower R S A\nB : PowerBasis S A\nhB : IsIntegral R B.gen\ninst✝ : IsDomain S\nhmin : minpoly S B.gen = Polynomial.map (algebraMap R S) (minpoly R B.gen)\nn : ℕ\ni : Fin B.dim\nQ : R[X] := X ^ n %ₘ minpoly R B.gen\nthis : B.gen ^ n = ↑(aeval B.gen) Q\nhQ : ¬Q = 0\nhlt : natDegree Q < B.dim\n⊢ IsIntegral R (↑(↑B.basis.repr (Finset.sum (Finset.range B.dim) fun i => coeff Q i • B.gen ^ i)) i)\n[PROOFSTEP]\nsimp only [LinearEquiv.map_sum, LinearEquiv.map_smulₛₗ, RingHom.id_apply, Finset.sum_apply']\n[GOAL]\ncase neg\nK : Type u_1\nS : Type u_2\ninst✝¹¹ : Field K\ninst✝¹⁰ : CommRing S\ninst✝⁹ : Algebra K S\nR : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Algebra R S\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsScalarTower R K S\nA : Type u_4\ninst✝⁴ : CommRing A\ninst✝³ : Algebra R A\ninst✝² : Algebra S A\ninst✝¹ : IsScalarTower R S A\nB : PowerBasis S A\nhB : IsIntegral R B.gen\ninst✝ : IsDomain S\nhmin : minpoly S B.gen = Polynomial.map (algebraMap R S) (minpoly R B.gen)\nn : ℕ\ni : Fin B.dim\nQ : R[X] := X ^ n %ₘ minpoly R B.gen\nthis : B.gen ^ n = ↑(aeval B.gen) Q\nhQ : ¬Q = 0\nhlt : natDegree Q < B.dim\n⊢ IsIntegral R\n    (Finset.sum (Finset.range B.dim) fun x => ↑(↑B.basis.repr (coeff (X ^ n %ₘ minpoly R B.gen) x • B.gen ^ x)) i)\n[PROOFSTEP]\nrefine' IsIntegral.sum _ fun j hj => _\n[GOAL]\ncase neg\nK : Type u_1\nS : Type u_2\ninst✝¹¹ : Field K\ninst✝¹⁰ : CommRing S\ninst✝⁹ : Algebra K S\nR : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Algebra R S\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsScalarTower R K S\nA : Type u_4\ninst✝⁴ : CommRing A\ninst✝³ : Algebra R A\ninst✝² : Algebra S A\ninst✝¹ : IsScalarTower R S A\nB : PowerBasis S A\nhB : IsIntegral R B.gen\ninst✝ : IsDomain S\nhmin : minpoly S B.gen = Polynomial.map (algebraMap R S) (minpoly R B.gen)\nn : ℕ\ni : Fin B.dim\nQ : R[X] := X ^ n %ₘ minpoly R B.gen\nthis : B.gen ^ n = ↑(aeval B.gen) Q\nhQ : ¬Q = 0\nhlt : natDegree Q < B.dim\nj : ℕ\nhj : j ∈ Finset.range B.dim\n⊢ IsIntegral R (↑(↑B.basis.repr (coeff (X ^ n %ₘ minpoly R B.gen) j • B.gen ^ j)) i)\n[PROOFSTEP]\nreplace hj := Finset.mem_range.1 hj\n[GOAL]\ncase neg\nK : Type u_1\nS : Type u_2\ninst✝¹¹ : Field K\ninst✝¹⁰ : CommRing S\ninst✝⁹ : Algebra K S\nR : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Algebra R S\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsScalarTower R K S\nA : Type u_4\ninst✝⁴ : CommRing A\ninst✝³ : Algebra R A\ninst✝² : Algebra S A\ninst✝¹ : IsScalarTower R S A\nB : PowerBasis S A\nhB : IsIntegral R B.gen\ninst✝ : IsDomain S\nhmin : minpoly S B.gen = Polynomial.map (algebraMap R S) (minpoly R B.gen)\nn : ℕ\ni : Fin B.dim\nQ : R[X] := X ^ n %ₘ minpoly R B.gen\nthis : B.gen ^ n = ↑(aeval B.gen) Q\nhQ : ¬Q = 0\nhlt : natDegree Q < B.dim\nj : ℕ\nhj : j < B.dim\n⊢ IsIntegral R (↑(↑B.basis.repr (coeff (X ^ n %ₘ minpoly R B.gen) j • B.gen ^ j)) i)\n[PROOFSTEP]\nrw [← Fin.val_mk hj, ← B.basis_eq_pow, Algebra.smul_def, IsScalarTower.algebraMap_apply R S A, ← Algebra.smul_def,\n  LinearEquiv.map_smul]\n[GOAL]\ncase neg\nK : Type u_1\nS : Type u_2\ninst✝¹¹ : Field K\ninst✝¹⁰ : CommRing S\ninst✝⁹ : Algebra K S\nR : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Algebra R S\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsScalarTower R K S\nA : Type u_4\ninst✝⁴ : CommRing A\ninst✝³ : Algebra R A\ninst✝² : Algebra S A\ninst✝¹ : IsScalarTower R S A\nB : PowerBasis S A\nhB : IsIntegral R B.gen\ninst✝ : IsDomain S\nhmin : minpoly S B.gen = Polynomial.map (algebraMap R S) (minpoly R B.gen)\nn : ℕ\ni : Fin B.dim\nQ : R[X] := X ^ n %ₘ minpoly R B.gen\nthis : B.gen ^ n = ↑(aeval B.gen) Q\nhQ : ¬Q = 0\nhlt : natDegree Q < B.dim\nj : ℕ\nhj : j < B.dim\n⊢ IsIntegral R\n    (↑(↑(algebraMap R S) (coeff (X ^ n %ₘ minpoly R B.gen) ↑{ val := j, isLt := hj }) •\n          ↑B.basis.repr (↑B.basis { val := j, isLt := hj }))\n      i)\n[PROOFSTEP]\nsimp only [algebraMap_smul, Finsupp.coe_smul, Pi.smul_apply, B.basis.repr_self_apply]\n[GOAL]\ncase neg\nK : Type u_1\nS : Type u_2\ninst✝¹¹ : Field K\ninst✝¹⁰ : CommRing S\ninst✝⁹ : Algebra K S\nR : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Algebra R S\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsScalarTower R K S\nA : Type u_4\ninst✝⁴ : CommRing A\ninst✝³ : Algebra R A\ninst✝² : Algebra S A\ninst✝¹ : IsScalarTower R S A\nB : PowerBasis S A\nhB : IsIntegral R B.gen\ninst✝ : IsDomain S\nhmin : minpoly S B.gen = Polynomial.map (algebraMap R S) (minpoly R B.gen)\nn : ℕ\ni : Fin B.dim\nQ : R[X] := X ^ n %ₘ minpoly R B.gen\nthis : B.gen ^ n = ↑(aeval B.gen) Q\nhQ : ¬Q = 0\nhlt : natDegree Q < B.dim\nj : ℕ\nhj : j < B.dim\n⊢ IsIntegral R (coeff (X ^ n %ₘ minpoly R B.gen) j • if { val := j, isLt := hj } = i then 1 else 0)\n[PROOFSTEP]\nby_cases hij : (⟨j, hj⟩ : Fin _) = i\n[GOAL]\ncase pos\nK : Type u_1\nS : Type u_2\ninst✝¹¹ : Field K\ninst✝¹⁰ : CommRing S\ninst✝⁹ : Algebra K S\nR : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Algebra R S\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsScalarTower R K S\nA : Type u_4\ninst✝⁴ : CommRing A\ninst✝³ : Algebra R A\ninst✝² : Algebra S A\ninst✝¹ : IsScalarTower R S A\nB : PowerBasis S A\nhB : IsIntegral R B.gen\ninst✝ : IsDomain S\nhmin : minpoly S B.gen = Polynomial.map (algebraMap R S) (minpoly R B.gen)\nn : ℕ\ni : Fin B.dim\nQ : R[X] := X ^ n %ₘ minpoly R B.gen\nthis : B.gen ^ n = ↑(aeval B.gen) Q\nhQ : ¬Q = 0\nhlt : natDegree Q < B.dim\nj : ℕ\nhj : j < B.dim\nhij : { val := j, isLt := hj } = i\n⊢ IsIntegral R (coeff (X ^ n %ₘ minpoly R B.gen) j • if { val := j, isLt := hj } = i then 1 else 0)\n[PROOFSTEP]\nsimp only [hij, eq_self_iff_true, if_true]\n[GOAL]\ncase pos\nK : Type u_1\nS : Type u_2\ninst✝¹¹ : Field K\ninst✝¹⁰ : CommRing S\ninst✝⁹ : Algebra K S\nR : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Algebra R S\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsScalarTower R K S\nA : Type u_4\ninst✝⁴ : CommRing A\ninst✝³ : Algebra R A\ninst✝² : Algebra S A\ninst✝¹ : IsScalarTower R S A\nB : PowerBasis S A\nhB : IsIntegral R B.gen\ninst✝ : IsDomain S\nhmin : minpoly S B.gen = Polynomial.map (algebraMap R S) (minpoly R B.gen)\nn : ℕ\ni : Fin B.dim\nQ : R[X] := X ^ n %ₘ minpoly R B.gen\nthis : B.gen ^ n = ↑(aeval B.gen) Q\nhQ : ¬Q = 0\nhlt : natDegree Q < B.dim\nj : ℕ\nhj : j < B.dim\nhij : { val := j, isLt := hj } = i\n⊢ IsIntegral R (coeff (X ^ n %ₘ minpoly R B.gen) j • 1)\n[PROOFSTEP]\nrw [Algebra.smul_def, mul_one]\n[GOAL]\ncase pos\nK : Type u_1\nS : Type u_2\ninst✝¹¹ : Field K\ninst✝¹⁰ : CommRing S\ninst✝⁹ : Algebra K S\nR : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Algebra R S\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsScalarTower R K S\nA : Type u_4\ninst✝⁴ : CommRing A\ninst✝³ : Algebra R A\ninst✝² : Algebra S A\ninst✝¹ : IsScalarTower R S A\nB : PowerBasis S A\nhB : IsIntegral R B.gen\ninst✝ : IsDomain S\nhmin : minpoly S B.gen = Polynomial.map (algebraMap R S) (minpoly R B.gen)\nn : ℕ\ni : Fin B.dim\nQ : R[X] := X ^ n %ₘ minpoly R B.gen\nthis : B.gen ^ n = ↑(aeval B.gen) Q\nhQ : ¬Q = 0\nhlt : natDegree Q < B.dim\nj : ℕ\nhj : j < B.dim\nhij : { val := j, isLt := hj } = i\n⊢ IsIntegral R (↑(algebraMap R S) (coeff (X ^ n %ₘ minpoly R B.gen) j))\n[PROOFSTEP]\nexact isIntegral_algebraMap\n[GOAL]\ncase neg\nK : Type u_1\nS : Type u_2\ninst✝¹¹ : Field K\ninst✝¹⁰ : CommRing S\ninst✝⁹ : Algebra K S\nR : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Algebra R S\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsScalarTower R K S\nA : Type u_4\ninst✝⁴ : CommRing A\ninst✝³ : Algebra R A\ninst✝² : Algebra S A\ninst✝¹ : IsScalarTower R S A\nB : PowerBasis S A\nhB : IsIntegral R B.gen\ninst✝ : IsDomain S\nhmin : minpoly S B.gen = Polynomial.map (algebraMap R S) (minpoly R B.gen)\nn : ℕ\ni : Fin B.dim\nQ : R[X] := X ^ n %ₘ minpoly R B.gen\nthis : B.gen ^ n = ↑(aeval B.gen) Q\nhQ : ¬Q = 0\nhlt : natDegree Q < B.dim\nj : ℕ\nhj : j < B.dim\nhij : ¬{ val := j, isLt := hj } = i\n⊢ IsIntegral R (coeff (X ^ n %ₘ minpoly R B.gen) j • if { val := j, isLt := hj } = i then 1 else 0)\n[PROOFSTEP]\nsimp [hij, isIntegral_zero]\n[GOAL]\nK : Type u_1\nS : Type u_2\ninst✝¹¹ : Field K\ninst✝¹⁰ : CommRing S\ninst✝⁹ : Algebra K S\nR : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Algebra R S\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsScalarTower R K S\nA : Type u_4\ninst✝⁴ : CommRing A\ninst✝³ : Algebra R A\ninst✝² : Algebra S A\ninst✝¹ : IsScalarTower R S A\nB : PowerBasis S A\nhB : IsIntegral R B.gen\ninst✝ : IsDomain S\nx y : A\nhx : ∀ (i : Fin B.dim), IsIntegral R (↑(↑B.basis.repr x) i)\nhy : ∀ (i : Fin B.dim), IsIntegral R (↑(↑B.basis.repr y) i)\nhmin : minpoly S B.gen = Polynomial.map (algebraMap R S) (minpoly R B.gen)\n⊢ ∀ (i : Fin B.dim), IsIntegral R (↑(↑B.basis.repr (x * y)) i)\n[PROOFSTEP]\nintro i\n[GOAL]\nK : Type u_1\nS : Type u_2\ninst✝¹¹ : Field K\ninst✝¹⁰ : CommRing S\ninst✝⁹ : Algebra K S\nR : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Algebra R S\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsScalarTower R K S\nA : Type u_4\ninst✝⁴ : CommRing A\ninst✝³ : Algebra R A\ninst✝² : Algebra S A\ninst✝¹ : IsScalarTower R S A\nB : PowerBasis S A\nhB : IsIntegral R B.gen\ninst✝ : IsDomain S\nx y : A\nhx : ∀ (i : Fin B.dim), IsIntegral R (↑(↑B.basis.repr x) i)\nhy : ∀ (i : Fin B.dim), IsIntegral R (↑(↑B.basis.repr y) i)\nhmin : minpoly S B.gen = Polynomial.map (algebraMap R S) (minpoly R B.gen)\ni : Fin B.dim\n⊢ IsIntegral R (↑(↑B.basis.repr (x * y)) i)\n[PROOFSTEP]\nrw [← B.basis.sum_repr x, ← B.basis.sum_repr y, Finset.sum_mul_sum, LinearEquiv.map_sum, Finset.sum_apply']\n[GOAL]\nK : Type u_1\nS : Type u_2\ninst✝¹¹ : Field K\ninst✝¹⁰ : CommRing S\ninst✝⁹ : Algebra K S\nR : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Algebra R S\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsScalarTower R K S\nA : Type u_4\ninst✝⁴ : CommRing A\ninst✝³ : Algebra R A\ninst✝² : Algebra S A\ninst✝¹ : IsScalarTower R S A\nB : PowerBasis S A\nhB : IsIntegral R B.gen\ninst✝ : IsDomain S\nx y : A\nhx : ∀ (i : Fin B.dim), IsIntegral R (↑(↑B.basis.repr x) i)\nhy : ∀ (i : Fin B.dim), IsIntegral R (↑(↑B.basis.repr y) i)\nhmin : minpoly S B.gen = Polynomial.map (algebraMap R S) (minpoly R B.gen)\ni : Fin B.dim\n⊢ IsIntegral R\n    (Finset.sum (Finset.univ ×ˢ Finset.univ) fun k =>\n      ↑(↑B.basis.repr (↑(↑B.basis.repr x) k.fst • ↑B.basis k.fst * ↑(↑B.basis.repr y) k.snd • ↑B.basis k.snd)) i)\n[PROOFSTEP]\nrefine' IsIntegral.sum _ fun I _ => _\n[GOAL]\nK : Type u_1\nS : Type u_2\ninst✝¹¹ : Field K\ninst✝¹⁰ : CommRing S\ninst✝⁹ : Algebra K S\nR : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Algebra R S\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsScalarTower R K S\nA : Type u_4\ninst✝⁴ : CommRing A\ninst✝³ : Algebra R A\ninst✝² : Algebra S A\ninst✝¹ : IsScalarTower R S A\nB : PowerBasis S A\nhB : IsIntegral R B.gen\ninst✝ : IsDomain S\nx y : A\nhx : ∀ (i : Fin B.dim), IsIntegral R (↑(↑B.basis.repr x) i)\nhy : ∀ (i : Fin B.dim), IsIntegral R (↑(↑B.basis.repr y) i)\nhmin : minpoly S B.gen = Polynomial.map (algebraMap R S) (minpoly R B.gen)\ni : Fin B.dim\nI : Fin B.dim × Fin B.dim\nx✝ : I ∈ Finset.univ ×ˢ Finset.univ\n⊢ IsIntegral R\n    (↑(↑B.basis.repr (↑(↑B.basis.repr x) I.fst • ↑B.basis I.fst * ↑(↑B.basis.repr y) I.snd • ↑B.basis I.snd)) i)\n[PROOFSTEP]\nsimp only [Algebra.smul_mul_assoc, Algebra.mul_smul_comm, LinearEquiv.map_smulₛₗ, RingHom.id_apply, Finsupp.coe_smul,\n  Pi.smul_apply, id.smul_eq_mul]\n[GOAL]\nK : Type u_1\nS : Type u_2\ninst✝¹¹ : Field K\ninst✝¹⁰ : CommRing S\ninst✝⁹ : Algebra K S\nR : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Algebra R S\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsScalarTower R K S\nA : Type u_4\ninst✝⁴ : CommRing A\ninst✝³ : Algebra R A\ninst✝² : Algebra S A\ninst✝¹ : IsScalarTower R S A\nB : PowerBasis S A\nhB : IsIntegral R B.gen\ninst✝ : IsDomain S\nx y : A\nhx : ∀ (i : Fin B.dim), IsIntegral R (↑(↑B.basis.repr x) i)\nhy : ∀ (i : Fin B.dim), IsIntegral R (↑(↑B.basis.repr y) i)\nhmin : minpoly S B.gen = Polynomial.map (algebraMap R S) (minpoly R B.gen)\ni : Fin B.dim\nI : Fin B.dim × Fin B.dim\nx✝ : I ∈ Finset.univ ×ˢ Finset.univ\n⊢ IsIntegral R\n    ((↑(↑B.basis.repr y) I.snd • ↑(↑B.basis.repr x) I.fst • ↑(↑B.basis.repr (↑B.basis I.fst * ↑B.basis I.snd))) i)\n[PROOFSTEP]\nrefine' isIntegral_mul (hy _) (isIntegral_mul (hx _) _)\n[GOAL]\nK : Type u_1\nS : Type u_2\ninst✝¹¹ : Field K\ninst✝¹⁰ : CommRing S\ninst✝⁹ : Algebra K S\nR : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Algebra R S\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsScalarTower R K S\nA : Type u_4\ninst✝⁴ : CommRing A\ninst✝³ : Algebra R A\ninst✝² : Algebra S A\ninst✝¹ : IsScalarTower R S A\nB : PowerBasis S A\nhB : IsIntegral R B.gen\ninst✝ : IsDomain S\nx y : A\nhx : ∀ (i : Fin B.dim), IsIntegral R (↑(↑B.basis.repr x) i)\nhy : ∀ (i : Fin B.dim), IsIntegral R (↑(↑B.basis.repr y) i)\nhmin : minpoly S B.gen = Polynomial.map (algebraMap R S) (minpoly R B.gen)\ni : Fin B.dim\nI : Fin B.dim × Fin B.dim\nx✝ : I ∈ Finset.univ ×ˢ Finset.univ\n⊢ IsIntegral R (↑(↑B.basis.repr (↑B.basis I.fst * ↑B.basis I.snd)) i)\n[PROOFSTEP]\nsimp only [coe_basis, ← pow_add]\n[GOAL]\nK : Type u_1\nS : Type u_2\ninst✝¹¹ : Field K\ninst✝¹⁰ : CommRing S\ninst✝⁹ : Algebra K S\nR : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Algebra R S\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsScalarTower R K S\nA : Type u_4\ninst✝⁴ : CommRing A\ninst✝³ : Algebra R A\ninst✝² : Algebra S A\ninst✝¹ : IsScalarTower R S A\nB : PowerBasis S A\nhB : IsIntegral R B.gen\ninst✝ : IsDomain S\nx y : A\nhx : ∀ (i : Fin B.dim), IsIntegral R (↑(↑B.basis.repr x) i)\nhy : ∀ (i : Fin B.dim), IsIntegral R (↑(↑B.basis.repr y) i)\nhmin : minpoly S B.gen = Polynomial.map (algebraMap R S) (minpoly R B.gen)\ni : Fin B.dim\nI : Fin B.dim × Fin B.dim\nx✝ : I ∈ Finset.univ ×ˢ Finset.univ\n⊢ IsIntegral R (↑(↑B.basis.repr (B.gen ^ (↑I.fst + ↑I.snd))) i)\n[PROOFSTEP]\nrefine' repr_gen_pow_isIntegral hB hmin _ _\n[GOAL]\nK : Type u_1\nS : Type u_2\ninst✝¹¹ : Field K\ninst✝¹⁰ : CommRing S\ninst✝⁹ : Algebra K S\nR : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Algebra R S\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsScalarTower R K S\nA : Type u_4\ninst✝⁴ : CommRing A\ninst✝³ : Algebra R A\ninst✝² : Algebra S A\ninst✝¹ : IsScalarTower R S A\nB : PowerBasis S A\nhB : IsIntegral R B.gen\ninst✝ : IsDomain S\nx : A\nhx : ∀ (i : Fin B.dim), IsIntegral R (↑(↑B.basis.repr x) i)\nhmin : minpoly S B.gen = Polynomial.map (algebraMap R S) (minpoly R B.gen)\nn : ℕ\n⊢ ∀ (i : Fin B.dim), IsIntegral R (↑(↑B.basis.repr (x ^ n)) i)\n[PROOFSTEP]\nnontriviality A using Subsingleton.elim (x ^ n) 0, isIntegral_zero\n[GOAL]\nK : Type u_1\nS : Type u_2\ninst✝¹¹ : Field K\ninst✝¹⁰ : CommRing S\ninst✝⁹ : Algebra K S\nR : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Algebra R S\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsScalarTower R K S\nA : Type u_4\ninst✝⁴ : CommRing A\ninst✝³ : Algebra R A\ninst✝² : Algebra S A\ninst✝¹ : IsScalarTower R S A\nB : PowerBasis S A\nhB : IsIntegral R B.gen\ninst✝ : IsDomain S\nx : A\nhx : ∀ (i : Fin B.dim), IsIntegral R (↑(↑B.basis.repr x) i)\nhmin : minpoly S B.gen = Polynomial.map (algebraMap R S) (minpoly R B.gen)\nn : ℕ\n✝ : Nontrivial A\n⊢ ∀ (i : Fin B.dim), IsIntegral R (↑(↑B.basis.repr (x ^ n)) i)\n[PROOFSTEP]\nrevert hx\n[GOAL]\nK : Type u_1\nS : Type u_2\ninst✝¹¹ : Field K\ninst✝¹⁰ : CommRing S\ninst✝⁹ : Algebra K S\nR : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Algebra R S\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsScalarTower R K S\nA : Type u_4\ninst✝⁴ : CommRing A\ninst✝³ : Algebra R A\ninst✝² : Algebra S A\ninst✝¹ : IsScalarTower R S A\nB : PowerBasis S A\nhB : IsIntegral R B.gen\ninst✝ : IsDomain S\nx : A\nhmin : minpoly S B.gen = Polynomial.map (algebraMap R S) (minpoly R B.gen)\nn : ℕ\n✝ : Nontrivial A\n⊢ (∀ (i : Fin B.dim), IsIntegral R (↑(↑B.basis.repr x) i)) →\n    ∀ (i : Fin B.dim), IsIntegral R (↑(↑B.basis.repr (x ^ n)) i)\n[PROOFSTEP]\nrefine'\n  Nat.case_strong_induction_on (p := fun n ↦ _ → ∀ (i : Fin B.dim), IsIntegral R (B.basis.repr (x ^ n) i)) n _\n    fun n hn => _\n[GOAL]\ncase refine'_1\nK : Type u_1\nS : Type u_2\ninst✝¹¹ : Field K\ninst✝¹⁰ : CommRing S\ninst✝⁹ : Algebra K S\nR : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Algebra R S\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsScalarTower R K S\nA : Type u_4\ninst✝⁴ : CommRing A\ninst✝³ : Algebra R A\ninst✝² : Algebra S A\ninst✝¹ : IsScalarTower R S A\nB : PowerBasis S A\nhB : IsIntegral R B.gen\ninst✝ : IsDomain S\nx : A\nhmin : minpoly S B.gen = Polynomial.map (algebraMap R S) (minpoly R B.gen)\nn : ℕ\n✝ : Nontrivial A\n⊢ (fun n =>\n      (∀ (i : Fin B.dim), IsIntegral R (↑(↑B.basis.repr x) i)) →\n        ∀ (i : Fin B.dim), IsIntegral R (↑(↑B.basis.repr (x ^ n)) i))\n    0\n[PROOFSTEP]\nintro _ i\n[GOAL]\ncase refine'_1\nK : Type u_1\nS : Type u_2\ninst✝¹¹ : Field K\ninst✝¹⁰ : CommRing S\ninst✝⁹ : Algebra K S\nR : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Algebra R S\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsScalarTower R K S\nA : Type u_4\ninst✝⁴ : CommRing A\ninst✝³ : Algebra R A\ninst✝² : Algebra S A\ninst✝¹ : IsScalarTower R S A\nB : PowerBasis S A\nhB : IsIntegral R B.gen\ninst✝ : IsDomain S\nx : A\nhmin : minpoly S B.gen = Polynomial.map (algebraMap R S) (minpoly R B.gen)\nn : ℕ\n✝ : Nontrivial A\na✝ : ∀ (i : Fin B.dim), IsIntegral R (↑(↑B.basis.repr x) i)\ni : Fin B.dim\n⊢ IsIntegral R (↑(↑B.basis.repr (x ^ 0)) i)\n[PROOFSTEP]\nrw [pow_zero, ← pow_zero B.gen, ← Fin.val_mk B.dim_pos, ← B.basis_eq_pow, B.basis.repr_self_apply]\n[GOAL]\ncase refine'_1\nK : Type u_1\nS : Type u_2\ninst✝¹¹ : Field K\ninst✝¹⁰ : CommRing S\ninst✝⁹ : Algebra K S\nR : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Algebra R S\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsScalarTower R K S\nA : Type u_4\ninst✝⁴ : CommRing A\ninst✝³ : Algebra R A\ninst✝² : Algebra S A\ninst✝¹ : IsScalarTower R S A\nB : PowerBasis S A\nhB : IsIntegral R B.gen\ninst✝ : IsDomain S\nx : A\nhmin : minpoly S B.gen = Polynomial.map (algebraMap R S) (minpoly R B.gen)\nn : ℕ\n✝ : Nontrivial A\na✝ : ∀ (i : Fin B.dim), IsIntegral R (↑(↑B.basis.repr x) i)\ni : Fin B.dim\n⊢ IsIntegral R (if { val := 0, isLt := (_ : 0 < B.dim) } = i then 1 else 0)\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nK : Type u_1\nS : Type u_2\ninst✝¹¹ : Field K\ninst✝¹⁰ : CommRing S\ninst✝⁹ : Algebra K S\nR : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Algebra R S\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsScalarTower R K S\nA : Type u_4\ninst✝⁴ : CommRing A\ninst✝³ : Algebra R A\ninst✝² : Algebra S A\ninst✝¹ : IsScalarTower R S A\nB : PowerBasis S A\nhB : IsIntegral R B.gen\ninst✝ : IsDomain S\nx : A\nhmin : minpoly S B.gen = Polynomial.map (algebraMap R S) (minpoly R B.gen)\nn : ℕ\n✝ : Nontrivial A\na✝ : ∀ (i : Fin B.dim), IsIntegral R (↑(↑B.basis.repr x) i)\ni : Fin B.dim\nh✝ : { val := 0, isLt := (_ : 0 < B.dim) } = i\n⊢ IsIntegral R 1\n[PROOFSTEP]\nexact isIntegral_one\n[GOAL]\ncase neg\nK : Type u_1\nS : Type u_2\ninst✝¹¹ : Field K\ninst✝¹⁰ : CommRing S\ninst✝⁹ : Algebra K S\nR : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Algebra R S\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsScalarTower R K S\nA : Type u_4\ninst✝⁴ : CommRing A\ninst✝³ : Algebra R A\ninst✝² : Algebra S A\ninst✝¹ : IsScalarTower R S A\nB : PowerBasis S A\nhB : IsIntegral R B.gen\ninst✝ : IsDomain S\nx : A\nhmin : minpoly S B.gen = Polynomial.map (algebraMap R S) (minpoly R B.gen)\nn : ℕ\n✝ : Nontrivial A\na✝ : ∀ (i : Fin B.dim), IsIntegral R (↑(↑B.basis.repr x) i)\ni : Fin B.dim\nh✝ : ¬{ val := 0, isLt := (_ : 0 < B.dim) } = i\n⊢ IsIntegral R 0\n[PROOFSTEP]\nexact isIntegral_zero\n[GOAL]\ncase refine'_2\nK : Type u_1\nS : Type u_2\ninst✝¹¹ : Field K\ninst✝¹⁰ : CommRing S\ninst✝⁹ : Algebra K S\nR : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Algebra R S\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsScalarTower R K S\nA : Type u_4\ninst✝⁴ : CommRing A\ninst✝³ : Algebra R A\ninst✝² : Algebra S A\ninst✝¹ : IsScalarTower R S A\nB : PowerBasis S A\nhB : IsIntegral R B.gen\ninst✝ : IsDomain S\nx : A\nhmin : minpoly S B.gen = Polynomial.map (algebraMap R S) (minpoly R B.gen)\nn✝ : ℕ\n✝ : Nontrivial A\nn : ℕ\nhn :\n  ∀ (m : ℕ),\n    m ≤ n →\n      (fun n =>\n          (∀ (i : Fin B.dim), IsIntegral R (↑(↑B.basis.repr x) i)) →\n            ∀ (i : Fin B.dim), IsIntegral R (↑(↑B.basis.repr (x ^ n)) i))\n        m\n⊢ (fun n =>\n      (∀ (i : Fin B.dim), IsIntegral R (↑(↑B.basis.repr x) i)) →\n        ∀ (i : Fin B.dim), IsIntegral R (↑(↑B.basis.repr (x ^ n)) i))\n    (Nat.succ n)\n[PROOFSTEP]\nintro hx\n[GOAL]\ncase refine'_2\nK : Type u_1\nS : Type u_2\ninst✝¹¹ : Field K\ninst✝¹⁰ : CommRing S\ninst✝⁹ : Algebra K S\nR : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Algebra R S\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsScalarTower R K S\nA : Type u_4\ninst✝⁴ : CommRing A\ninst✝³ : Algebra R A\ninst✝² : Algebra S A\ninst✝¹ : IsScalarTower R S A\nB : PowerBasis S A\nhB : IsIntegral R B.gen\ninst✝ : IsDomain S\nx : A\nhmin : minpoly S B.gen = Polynomial.map (algebraMap R S) (minpoly R B.gen)\nn✝ : ℕ\n✝ : Nontrivial A\nn : ℕ\nhn :\n  ∀ (m : ℕ),\n    m ≤ n →\n      (fun n =>\n          (∀ (i : Fin B.dim), IsIntegral R (↑(↑B.basis.repr x) i)) →\n            ∀ (i : Fin B.dim), IsIntegral R (↑(↑B.basis.repr (x ^ n)) i))\n        m\nhx : ∀ (i : Fin B.dim), IsIntegral R (↑(↑B.basis.repr x) i)\n⊢ ∀ (i : Fin B.dim), IsIntegral R (↑(↑B.basis.repr (x ^ Nat.succ n)) i)\n[PROOFSTEP]\nrw [pow_succ]\n[GOAL]\ncase refine'_2\nK : Type u_1\nS : Type u_2\ninst✝¹¹ : Field K\ninst✝¹⁰ : CommRing S\ninst✝⁹ : Algebra K S\nR : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Algebra R S\ninst✝⁶ : Algebra R K\ninst✝⁵ : IsScalarTower R K S\nA : Type u_4\ninst✝⁴ : CommRing A\ninst✝³ : Algebra R A\ninst✝² : Algebra S A\ninst✝¹ : IsScalarTower R S A\nB : PowerBasis S A\nhB : IsIntegral R B.gen\ninst✝ : IsDomain S\nx : A\nhmin : minpoly S B.gen = Polynomial.map (algebraMap R S) (minpoly R B.gen)\nn✝ : ℕ\n✝ : Nontrivial A\nn : ℕ\nhn :\n  ∀ (m : ℕ),\n    m ≤ n →\n      (fun n =>\n          (∀ (i : Fin B.dim), IsIntegral R (↑(↑B.basis.repr x) i)) →\n            ∀ (i : Fin B.dim), IsIntegral R (↑(↑B.basis.repr (x ^ n)) i))\n        m\nhx : ∀ (i : Fin B.dim), IsIntegral R (↑(↑B.basis.repr x) i)\n⊢ ∀ (i : Fin B.dim), IsIntegral R (↑(↑B.basis.repr (x * x ^ n)) i)\n[PROOFSTEP]\nexact repr_mul_isIntegral hB hx (fun _ => hn _ le_rfl (fun _ => hx _) _) hmin\n[GOAL]\nK : Type u_1\nS : Type u_2\ninst✝¹⁰ : Field K\ninst✝⁹ : CommRing S\ninst✝⁸ : Algebra K S\nR : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : Algebra R S\ninst✝⁵ : Algebra R K\ninst✝⁴ : IsScalarTower R K S\nA : Type u_4\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : Algebra S A\ninst✝ : IsScalarTower R S A\nB✝ : PowerBasis S A\nhB✝ : IsIntegral R B✝.gen\nB B' : PowerBasis K S\nP : R[X]\nh : ↑(aeval B.gen) P = B'.gen\nhB : IsIntegral R B.gen\nhmin : minpoly K B.gen = Polynomial.map (algebraMap R K) (minpoly R B.gen)\n⊢ ∀ (i : Fin B.dim) (j : Fin B'.dim), IsIntegral R (Basis.toMatrix B.basis (↑B'.basis) i j)\n[PROOFSTEP]\nintro i j\n[GOAL]\nK : Type u_1\nS : Type u_2\ninst✝¹⁰ : Field K\ninst✝⁹ : CommRing S\ninst✝⁸ : Algebra K S\nR : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : Algebra R S\ninst✝⁵ : Algebra R K\ninst✝⁴ : IsScalarTower R K S\nA : Type u_4\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : Algebra S A\ninst✝ : IsScalarTower R S A\nB✝ : PowerBasis S A\nhB✝ : IsIntegral R B✝.gen\nB B' : PowerBasis K S\nP : R[X]\nh : ↑(aeval B.gen) P = B'.gen\nhB : IsIntegral R B.gen\nhmin : minpoly K B.gen = Polynomial.map (algebraMap R K) (minpoly R B.gen)\ni : Fin B.dim\nj : Fin B'.dim\n⊢ IsIntegral R (Basis.toMatrix B.basis (↑B'.basis) i j)\n[PROOFSTEP]\nrw [B.basis.toMatrix_apply, B'.coe_basis]\n[GOAL]\nK : Type u_1\nS : Type u_2\ninst✝¹⁰ : Field K\ninst✝⁹ : CommRing S\ninst✝⁸ : Algebra K S\nR : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : Algebra R S\ninst✝⁵ : Algebra R K\ninst✝⁴ : IsScalarTower R K S\nA : Type u_4\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : Algebra S A\ninst✝ : IsScalarTower R S A\nB✝ : PowerBasis S A\nhB✝ : IsIntegral R B✝.gen\nB B' : PowerBasis K S\nP : R[X]\nh : ↑(aeval B.gen) P = B'.gen\nhB : IsIntegral R B.gen\nhmin : minpoly K B.gen = Polynomial.map (algebraMap R K) (minpoly R B.gen)\ni : Fin B.dim\nj : Fin B'.dim\n⊢ IsIntegral R (↑(↑B.basis.repr ((fun i => B'.gen ^ ↑i) j)) i)\n[PROOFSTEP]\nrefine' repr_pow_isIntegral hB (fun i => _) hmin _ _\n[GOAL]\nK : Type u_1\nS : Type u_2\ninst✝¹⁰ : Field K\ninst✝⁹ : CommRing S\ninst✝⁸ : Algebra K S\nR : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : Algebra R S\ninst✝⁵ : Algebra R K\ninst✝⁴ : IsScalarTower R K S\nA : Type u_4\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : Algebra S A\ninst✝ : IsScalarTower R S A\nB✝ : PowerBasis S A\nhB✝ : IsIntegral R B✝.gen\nB B' : PowerBasis K S\nP : R[X]\nh : ↑(aeval B.gen) P = B'.gen\nhB : IsIntegral R B.gen\nhmin : minpoly K B.gen = Polynomial.map (algebraMap R K) (minpoly R B.gen)\ni✝ : Fin B.dim\nj : Fin B'.dim\ni : Fin B.dim\n⊢ IsIntegral R (↑(↑B.basis.repr B'.gen) i)\n[PROOFSTEP]\nrw [← h, aeval_eq_sum_range, LinearEquiv.map_sum, Finset.sum_apply']\n[GOAL]\nK : Type u_1\nS : Type u_2\ninst✝¹⁰ : Field K\ninst✝⁹ : CommRing S\ninst✝⁸ : Algebra K S\nR : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : Algebra R S\ninst✝⁵ : Algebra R K\ninst✝⁴ : IsScalarTower R K S\nA : Type u_4\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : Algebra S A\ninst✝ : IsScalarTower R S A\nB✝ : PowerBasis S A\nhB✝ : IsIntegral R B✝.gen\nB B' : PowerBasis K S\nP : R[X]\nh : ↑(aeval B.gen) P = B'.gen\nhB : IsIntegral R B.gen\nhmin : minpoly K B.gen = Polynomial.map (algebraMap R K) (minpoly R B.gen)\ni✝ : Fin B.dim\nj : Fin B'.dim\ni : Fin B.dim\n⊢ IsIntegral R (Finset.sum (Finset.range (natDegree P + 1)) fun k => ↑(↑B.basis.repr (coeff P k • B.gen ^ k)) i)\n[PROOFSTEP]\nrefine' IsIntegral.sum _ fun n _ => _\n[GOAL]\nK : Type u_1\nS : Type u_2\ninst✝¹⁰ : Field K\ninst✝⁹ : CommRing S\ninst✝⁸ : Algebra K S\nR : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : Algebra R S\ninst✝⁵ : Algebra R K\ninst✝⁴ : IsScalarTower R K S\nA : Type u_4\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : Algebra S A\ninst✝ : IsScalarTower R S A\nB✝ : PowerBasis S A\nhB✝ : IsIntegral R B✝.gen\nB B' : PowerBasis K S\nP : R[X]\nh : ↑(aeval B.gen) P = B'.gen\nhB : IsIntegral R B.gen\nhmin : minpoly K B.gen = Polynomial.map (algebraMap R K) (minpoly R B.gen)\ni✝ : Fin B.dim\nj : Fin B'.dim\ni : Fin B.dim\nn : ℕ\nx✝ : n ∈ Finset.range (natDegree P + 1)\n⊢ IsIntegral R (↑(↑B.basis.repr (coeff P n • B.gen ^ n)) i)\n[PROOFSTEP]\nrw [Algebra.smul_def, IsScalarTower.algebraMap_apply R K S, ← Algebra.smul_def, LinearEquiv.map_smul, algebraMap_smul]\n[GOAL]\nK : Type u_1\nS : Type u_2\ninst✝¹⁰ : Field K\ninst✝⁹ : CommRing S\ninst✝⁸ : Algebra K S\nR : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : Algebra R S\ninst✝⁵ : Algebra R K\ninst✝⁴ : IsScalarTower R K S\nA : Type u_4\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : Algebra S A\ninst✝ : IsScalarTower R S A\nB✝ : PowerBasis S A\nhB✝ : IsIntegral R B✝.gen\nB B' : PowerBasis K S\nP : R[X]\nh : ↑(aeval B.gen) P = B'.gen\nhB : IsIntegral R B.gen\nhmin : minpoly K B.gen = Polynomial.map (algebraMap R K) (minpoly R B.gen)\ni✝ : Fin B.dim\nj : Fin B'.dim\ni : Fin B.dim\nn : ℕ\nx✝ : n ∈ Finset.range (natDegree P + 1)\n⊢ IsIntegral R (↑(coeff P n • ↑B.basis.repr (B.gen ^ n)) i)\n[PROOFSTEP]\nexact isIntegral_smul _ (repr_gen_pow_isIntegral hB hmin _ _)\n", "meta": {"mathlib_filename": "Mathlib.RingTheory.Adjoin.PowerBasis", "llama_tokens": 23014, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7931059511841119, "lm_q2_score": 0.6654105521116443, "lm_q1q2_score": 0.5277410688604507}}
{"text": "[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : InnerProductSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\ninst✝² : NormedSpace ℝ E\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nf✝ g✝ : G → E\nf'✝ g'✝ : G →L[ℝ] E\ns✝ : Set G\nx✝ : G\nn : ℕ∞\nf g : ℝ → E\nf' g' : E\ns : Set ℝ\nx : ℝ\nhf : HasDerivWithinAt f f' s x\nhg : HasDerivWithinAt g g' s x\n⊢ HasDerivWithinAt (fun t => Inner.inner (f t) (g t)) (Inner.inner (f x) g' + Inner.inner f' (g x)) s x\n[PROOFSTEP]\nsimpa using (hf.hasFDerivWithinAt.inner 𝕜 hg.hasFDerivWithinAt).hasDerivWithinAt\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : InnerProductSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\ninst✝² : NormedSpace ℝ E\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nf✝ g✝ : G → E\nf'✝ g'✝ : G →L[ℝ] E\ns : Set G\nx✝ : G\nn : ℕ∞\nf g : ℝ → E\nf' g' : E\nx : ℝ\n⊢ HasDerivAt f f' x →\n    HasDerivAt g g' x → HasDerivAt (fun t => Inner.inner (f t) (g t)) (Inner.inner (f x) g' + Inner.inner f' (g x)) x\n[PROOFSTEP]\nsimpa only [← hasDerivWithinAt_univ] using HasDerivWithinAt.inner 𝕜\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : InnerProductSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\ninst✝² : NormedSpace ℝ E\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nf g : G → E\nf' g' : G →L[ℝ] E\ns : Set G\nx : G\nn : ℕ∞\nhf : DifferentiableAt ℝ f x\nhg : DifferentiableAt ℝ g x\ny : G\n⊢ ↑(fderiv ℝ (fun t => inner (f t) (g t)) x) y = inner (f x) (↑(fderiv ℝ g x) y) + inner (↑(fderiv ℝ f x) y) (g x)\n[PROOFSTEP]\nrw [(hf.hasFDerivAt.inner 𝕜 hg.hasFDerivAt).fderiv]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : InnerProductSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\ninst✝² : NormedSpace ℝ E\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nf g : G → E\nf' g' : G →L[ℝ] E\ns : Set G\nx : G\nn : ℕ∞\nhf : DifferentiableAt ℝ f x\nhg : DifferentiableAt ℝ g x\ny : G\n⊢ ↑(ContinuousLinearMap.comp (fderivInnerClm 𝕜 (f x, g x)) (ContinuousLinearMap.prod (fderiv ℝ f x) (fderiv ℝ g x))) y =\n    inner (f x) (↑(fderiv ℝ g x) y) + inner (↑(fderiv ℝ f x) y) (g x)\n[PROOFSTEP]\nrfl\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : InnerProductSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\ninst✝² : NormedSpace ℝ E\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nf g : G → E\nf' g' : G →L[ℝ] E\ns : Set G\nx : G\nn : ℕ∞\n⊢ ContDiff ℝ n fun x => ‖x‖ ^ 2\n[PROOFSTEP]\nconvert (reClm : 𝕜 →L[ℝ] ℝ).contDiff.comp ((contDiff_id (E := E)).inner 𝕜 (contDiff_id (E := E)))\n[GOAL]\ncase h.e'_10.h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : InnerProductSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\ninst✝² : NormedSpace ℝ E\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nf g : G → E\nf' g' : G →L[ℝ] E\ns : Set G\nx : G\nn : ℕ∞\nx✝ : E\n⊢ ‖x✝‖ ^ 2 = (↑reClm ∘ fun x => inner (id x) (id x)) x✝\n[PROOFSTEP]\nexact (inner_self_eq_norm_sq _).symm\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : InnerProductSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\ninst✝² : NormedSpace ℝ E\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nf g : G → E\nf' g' : G →L[ℝ] E\ns : Set G\nx✝ : G\nn : ℕ∞\nx : E\nhx : x ≠ 0\n⊢ ContDiffAt ℝ n Norm.norm x\n[PROOFSTEP]\nhave : ‖id x‖ ^ 2 ≠ 0 := pow_ne_zero 2 (norm_pos_iff.2 hx).ne'\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : InnerProductSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\ninst✝² : NormedSpace ℝ E\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nf g : G → E\nf' g' : G →L[ℝ] E\ns : Set G\nx✝ : G\nn : ℕ∞\nx : E\nhx : x ≠ 0\nthis : ‖id x‖ ^ 2 ≠ 0\n⊢ ContDiffAt ℝ n Norm.norm x\n[PROOFSTEP]\nsimpa only [id, sqrt_sq, norm_nonneg] using (contDiffAt_id.norm_sq 𝕜).sqrt this\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : InnerProductSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\ninst✝² : NormedSpace ℝ E\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nf g : G → E\nf' g' : G →L[ℝ] E\ns : Set G\nx : G\nn : ℕ∞\nhf : ContDiffAt ℝ n f x\nhg : ContDiffAt ℝ n g x\nhne : f x ≠ g x\n⊢ ContDiffAt ℝ n (fun y => Dist.dist (f y) (g y)) x\n[PROOFSTEP]\nsimp only [dist_eq_norm]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : InnerProductSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\ninst✝² : NormedSpace ℝ E\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nf g : G → E\nf' g' : G →L[ℝ] E\ns : Set G\nx : G\nn : ℕ∞\nhf : ContDiffAt ℝ n f x\nhg : ContDiffAt ℝ n g x\nhne : f x ≠ g x\n⊢ ContDiffAt ℝ n (fun y => ‖f y - g y‖) x\n[PROOFSTEP]\nexact (hf.sub hg).norm 𝕜 (sub_ne_zero.2 hne)\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : InnerProductSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\ninst✝² : NormedSpace ℝ E\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nf g : G → E\nf' g' : G →L[ℝ] E\ns : Set G\nx : G\nn : ℕ∞\nhf : ContDiffWithinAt ℝ n f s x\nhg : ContDiffWithinAt ℝ n g s x\nhne : f x ≠ g x\n⊢ ContDiffWithinAt ℝ n (fun y => Dist.dist (f y) (g y)) s x\n[PROOFSTEP]\nsimp only [dist_eq_norm]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : InnerProductSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\ninst✝² : NormedSpace ℝ E\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nf g : G → E\nf' g' : G →L[ℝ] E\ns : Set G\nx : G\nn : ℕ∞\nhf : ContDiffWithinAt ℝ n f s x\nhg : ContDiffWithinAt ℝ n g s x\nhne : f x ≠ g x\n⊢ ContDiffWithinAt ℝ n (fun y => ‖f y - g y‖) s x\n[PROOFSTEP]\nexact (hf.sub hg).norm 𝕜 (sub_ne_zero.2 hne)\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : InnerProductSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\ninst✝² : NormedSpace ℝ E\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nf g : G → E\nf' g' : G →L[ℝ] E\ns : Set G\nx✝ : G\nn : ℕ∞\nx : F\n⊢ HasStrictFDerivAt (fun x => ‖x‖ ^ 2) (2 • ↑(innerSL ℝ) x) x\n[PROOFSTEP]\nsimp only [sq, ← @inner_self_eq_norm_mul_norm ℝ]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : InnerProductSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\ninst✝² : NormedSpace ℝ E\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nf g : G → E\nf' g' : G →L[ℝ] E\ns : Set G\nx✝ : G\nn : ℕ∞\nx : F\n⊢ HasStrictFDerivAt (fun x => ↑re (inner x x)) (2 • ↑(innerSL ℝ) x) x\n[PROOFSTEP]\nconvert (hasStrictFDerivAt_id x).inner ℝ (hasStrictFDerivAt_id x)\n[GOAL]\ncase h.e'_10.h.h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : InnerProductSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\ninst✝² : NormedSpace ℝ E\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nf g : G → E\nf' g' : G →L[ℝ] E\ns : Set G\nx✝ : G\nn : ℕ∞\nx : F\ne_7✝ : normedAddCommGroup = NonUnitalNormedRing.toNormedAddCommGroup\nhe✝ : InnerProductSpace.toNormedSpace = NormedAlgebra.toNormedSpace'\n⊢ 2 • ↑(innerSL ℝ) x =\n    ContinuousLinearMap.comp (fderivInnerClm ℝ (id x, id x))\n      (ContinuousLinearMap.prod (ContinuousLinearMap.id ℝ F) (ContinuousLinearMap.id ℝ F))\n[PROOFSTEP]\next y\n[GOAL]\ncase h.e'_10.h.h.h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : InnerProductSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\ninst✝² : NormedSpace ℝ E\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nf g : G → E\nf' g' : G →L[ℝ] E\ns : Set G\nx✝ : G\nn : ℕ∞\nx : F\ne_7✝ : normedAddCommGroup = NonUnitalNormedRing.toNormedAddCommGroup\nhe✝ : InnerProductSpace.toNormedSpace = NormedAlgebra.toNormedSpace'\ny : F\n⊢ ↑(2 • ↑(innerSL ℝ) x) y =\n    ↑(ContinuousLinearMap.comp (fderivInnerClm ℝ (id x, id x))\n          (ContinuousLinearMap.prod (ContinuousLinearMap.id ℝ F) (ContinuousLinearMap.id ℝ F)))\n      y\n[PROOFSTEP]\nsimp [two_smul, real_inner_comm]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : InnerProductSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\ninst✝² : NormedSpace ℝ E\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nf g : G → E\nf' g' : G →L[ℝ] E\ns : Set G\nx : G\nn : ℕ∞\nhf : DifferentiableAt ℝ f x\nhg : DifferentiableAt ℝ g x\nhne : f x ≠ g x\n⊢ DifferentiableAt ℝ (fun y => Dist.dist (f y) (g y)) x\n[PROOFSTEP]\nsimp only [dist_eq_norm]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : InnerProductSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\ninst✝² : NormedSpace ℝ E\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nf g : G → E\nf' g' : G →L[ℝ] E\ns : Set G\nx : G\nn : ℕ∞\nhf : DifferentiableAt ℝ f x\nhg : DifferentiableAt ℝ g x\nhne : f x ≠ g x\n⊢ DifferentiableAt ℝ (fun y => ‖f y - g y‖) x\n[PROOFSTEP]\nexact (hf.sub hg).norm 𝕜 (sub_ne_zero.2 hne)\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : InnerProductSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\ninst✝² : NormedSpace ℝ E\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nf g : G → E\nf' g' : G →L[ℝ] E\ns : Set G\nx : G\nn : ℕ∞\nhf : DifferentiableWithinAt ℝ f s x\nhg : DifferentiableWithinAt ℝ g s x\nhne : f x ≠ g x\n⊢ DifferentiableWithinAt ℝ (fun y => Dist.dist (f y) (g y)) s x\n[PROOFSTEP]\nsimp only [dist_eq_norm]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : InnerProductSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\ninst✝² : NormedSpace ℝ E\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nf g : G → E\nf' g' : G →L[ℝ] E\ns : Set G\nx : G\nn : ℕ∞\nhf : DifferentiableWithinAt ℝ f s x\nhg : DifferentiableWithinAt ℝ g s x\nhne : f x ≠ g x\n⊢ DifferentiableWithinAt ℝ (fun y => ‖f y - g y‖) s x\n[PROOFSTEP]\nexact (hf.sub hg).norm 𝕜 (sub_ne_zero.2 hne)\n[GOAL]\n𝕜 : Type u_1\nι : Type u_2\nH : Type u_3\ninst✝³ : IsROrC 𝕜\ninst✝² : NormedAddCommGroup H\ninst✝¹ : NormedSpace 𝕜 H\ninst✝ : Fintype ι\nf : H → EuclideanSpace 𝕜 ι\nf' : H →L[𝕜] EuclideanSpace 𝕜 ι\nt : Set H\ny : H\n⊢ DifferentiableWithinAt 𝕜 f t y ↔ ∀ (i : ι), DifferentiableWithinAt 𝕜 (fun x => f x i) t y\n[PROOFSTEP]\nrw [← (EuclideanSpace.equiv ι 𝕜).comp_differentiableWithinAt_iff, differentiableWithinAt_pi]\n[GOAL]\n𝕜 : Type u_1\nι : Type u_2\nH : Type u_3\ninst✝³ : IsROrC 𝕜\ninst✝² : NormedAddCommGroup H\ninst✝¹ : NormedSpace 𝕜 H\ninst✝ : Fintype ι\nf : H → EuclideanSpace 𝕜 ι\nf' : H →L[𝕜] EuclideanSpace 𝕜 ι\nt : Set H\ny : H\n⊢ (∀ (i : ι), DifferentiableWithinAt 𝕜 (fun x => (↑(EuclideanSpace.equiv ι 𝕜) ∘ f) x i) t y) ↔\n    ∀ (i : ι), DifferentiableWithinAt 𝕜 (fun x => f x i) t y\n[PROOFSTEP]\nrfl\n[GOAL]\n𝕜 : Type u_1\nι : Type u_2\nH : Type u_3\ninst✝³ : IsROrC 𝕜\ninst✝² : NormedAddCommGroup H\ninst✝¹ : NormedSpace 𝕜 H\ninst✝ : Fintype ι\nf : H → EuclideanSpace 𝕜 ι\nf' : H →L[𝕜] EuclideanSpace 𝕜 ι\nt : Set H\ny : H\n⊢ DifferentiableAt 𝕜 f y ↔ ∀ (i : ι), DifferentiableAt 𝕜 (fun x => f x i) y\n[PROOFSTEP]\nrw [← (EuclideanSpace.equiv ι 𝕜).comp_differentiableAt_iff, differentiableAt_pi]\n[GOAL]\n𝕜 : Type u_1\nι : Type u_2\nH : Type u_3\ninst✝³ : IsROrC 𝕜\ninst✝² : NormedAddCommGroup H\ninst✝¹ : NormedSpace 𝕜 H\ninst✝ : Fintype ι\nf : H → EuclideanSpace 𝕜 ι\nf' : H →L[𝕜] EuclideanSpace 𝕜 ι\nt : Set H\ny : H\n⊢ (∀ (i : ι), DifferentiableAt 𝕜 (fun x => (↑(EuclideanSpace.equiv ι 𝕜) ∘ f) x i) y) ↔\n    ∀ (i : ι), DifferentiableAt 𝕜 (fun x => f x i) y\n[PROOFSTEP]\nrfl\n[GOAL]\n𝕜 : Type u_1\nι : Type u_2\nH : Type u_3\ninst✝³ : IsROrC 𝕜\ninst✝² : NormedAddCommGroup H\ninst✝¹ : NormedSpace 𝕜 H\ninst✝ : Fintype ι\nf : H → EuclideanSpace 𝕜 ι\nf' : H →L[𝕜] EuclideanSpace 𝕜 ι\nt : Set H\ny : H\n⊢ DifferentiableOn 𝕜 f t ↔ ∀ (i : ι), DifferentiableOn 𝕜 (fun x => f x i) t\n[PROOFSTEP]\nrw [← (EuclideanSpace.equiv ι 𝕜).comp_differentiableOn_iff, differentiableOn_pi]\n[GOAL]\n𝕜 : Type u_1\nι : Type u_2\nH : Type u_3\ninst✝³ : IsROrC 𝕜\ninst✝² : NormedAddCommGroup H\ninst✝¹ : NormedSpace 𝕜 H\ninst✝ : Fintype ι\nf : H → EuclideanSpace 𝕜 ι\nf' : H →L[𝕜] EuclideanSpace 𝕜 ι\nt : Set H\ny : H\n⊢ (∀ (i : ι), DifferentiableOn 𝕜 (fun x => (↑(EuclideanSpace.equiv ι 𝕜) ∘ f) x i) t) ↔\n    ∀ (i : ι), DifferentiableOn 𝕜 (fun x => f x i) t\n[PROOFSTEP]\nrfl\n[GOAL]\n𝕜 : Type u_1\nι : Type u_2\nH : Type u_3\ninst✝³ : IsROrC 𝕜\ninst✝² : NormedAddCommGroup H\ninst✝¹ : NormedSpace 𝕜 H\ninst✝ : Fintype ι\nf : H → EuclideanSpace 𝕜 ι\nf' : H →L[𝕜] EuclideanSpace 𝕜 ι\nt : Set H\ny : H\n⊢ Differentiable 𝕜 f ↔ ∀ (i : ι), Differentiable 𝕜 fun x => f x i\n[PROOFSTEP]\nrw [← (EuclideanSpace.equiv ι 𝕜).comp_differentiable_iff, differentiable_pi]\n[GOAL]\n𝕜 : Type u_1\nι : Type u_2\nH : Type u_3\ninst✝³ : IsROrC 𝕜\ninst✝² : NormedAddCommGroup H\ninst✝¹ : NormedSpace 𝕜 H\ninst✝ : Fintype ι\nf : H → EuclideanSpace 𝕜 ι\nf' : H →L[𝕜] EuclideanSpace 𝕜 ι\nt : Set H\ny : H\n⊢ (∀ (i : ι), Differentiable 𝕜 fun x => (↑(EuclideanSpace.equiv ι 𝕜) ∘ f) x i) ↔\n    ∀ (i : ι), Differentiable 𝕜 fun x => f x i\n[PROOFSTEP]\nrfl\n[GOAL]\n𝕜 : Type u_1\nι : Type u_2\nH : Type u_3\ninst✝³ : IsROrC 𝕜\ninst✝² : NormedAddCommGroup H\ninst✝¹ : NormedSpace 𝕜 H\ninst✝ : Fintype ι\nf : H → EuclideanSpace 𝕜 ι\nf' : H →L[𝕜] EuclideanSpace 𝕜 ι\nt : Set H\ny : H\n⊢ HasStrictFDerivAt f f' y ↔ ∀ (i : ι), HasStrictFDerivAt (fun x => f x i) (comp (EuclideanSpace.proj i) f') y\n[PROOFSTEP]\nrw [← (EuclideanSpace.equiv ι 𝕜).comp_hasStrictFDerivAt_iff, hasStrictFDerivAt_pi']\n[GOAL]\n𝕜 : Type u_1\nι : Type u_2\nH : Type u_3\ninst✝³ : IsROrC 𝕜\ninst✝² : NormedAddCommGroup H\ninst✝¹ : NormedSpace 𝕜 H\ninst✝ : Fintype ι\nf : H → EuclideanSpace 𝕜 ι\nf' : H →L[𝕜] EuclideanSpace 𝕜 ι\nt : Set H\ny : H\n⊢ (∀ (i : ι),\n      HasStrictFDerivAt (fun x => (↑(EuclideanSpace.equiv ι 𝕜) ∘ f) x i)\n        (comp (proj i) (comp (↑(EuclideanSpace.equiv ι 𝕜)) f')) y) ↔\n    ∀ (i : ι), HasStrictFDerivAt (fun x => f x i) (comp (EuclideanSpace.proj i) f') y\n[PROOFSTEP]\nrfl\n[GOAL]\n𝕜 : Type u_1\nι : Type u_2\nH : Type u_3\ninst✝³ : IsROrC 𝕜\ninst✝² : NormedAddCommGroup H\ninst✝¹ : NormedSpace 𝕜 H\ninst✝ : Fintype ι\nf : H → EuclideanSpace 𝕜 ι\nf' : H →L[𝕜] EuclideanSpace 𝕜 ι\nt : Set H\ny : H\n⊢ HasFDerivWithinAt f f' t y ↔ ∀ (i : ι), HasFDerivWithinAt (fun x => f x i) (comp (EuclideanSpace.proj i) f') t y\n[PROOFSTEP]\nrw [← (EuclideanSpace.equiv ι 𝕜).comp_hasFDerivWithinAt_iff, hasFDerivWithinAt_pi']\n[GOAL]\n𝕜 : Type u_1\nι : Type u_2\nH : Type u_3\ninst✝³ : IsROrC 𝕜\ninst✝² : NormedAddCommGroup H\ninst✝¹ : NormedSpace 𝕜 H\ninst✝ : Fintype ι\nf : H → EuclideanSpace 𝕜 ι\nf' : H →L[𝕜] EuclideanSpace 𝕜 ι\nt : Set H\ny : H\n⊢ (∀ (i : ι),\n      HasFDerivWithinAt (fun x => (↑(EuclideanSpace.equiv ι 𝕜) ∘ f) x i)\n        (comp (proj i) (comp (↑(EuclideanSpace.equiv ι 𝕜)) f')) t y) ↔\n    ∀ (i : ι), HasFDerivWithinAt (fun x => f x i) (comp (EuclideanSpace.proj i) f') t y\n[PROOFSTEP]\nrfl\n[GOAL]\n𝕜 : Type u_1\nι : Type u_2\nH : Type u_3\ninst✝³ : IsROrC 𝕜\ninst✝² : NormedAddCommGroup H\ninst✝¹ : NormedSpace 𝕜 H\ninst✝ : Fintype ι\nf : H → EuclideanSpace 𝕜 ι\nf' : H →L[𝕜] EuclideanSpace 𝕜 ι\nt : Set H\ny : H\nn : ℕ∞\n⊢ ContDiffWithinAt 𝕜 n f t y ↔ ∀ (i : ι), ContDiffWithinAt 𝕜 n (fun x => f x i) t y\n[PROOFSTEP]\nrw [← (EuclideanSpace.equiv ι 𝕜).comp_contDiffWithinAt_iff, contDiffWithinAt_pi]\n[GOAL]\n𝕜 : Type u_1\nι : Type u_2\nH : Type u_3\ninst✝³ : IsROrC 𝕜\ninst✝² : NormedAddCommGroup H\ninst✝¹ : NormedSpace 𝕜 H\ninst✝ : Fintype ι\nf : H → EuclideanSpace 𝕜 ι\nf' : H →L[𝕜] EuclideanSpace 𝕜 ι\nt : Set H\ny : H\nn : ℕ∞\n⊢ (∀ (i : ι), ContDiffWithinAt 𝕜 n (fun x => (↑(EuclideanSpace.equiv ι 𝕜) ∘ f) x i) t y) ↔\n    ∀ (i : ι), ContDiffWithinAt 𝕜 n (fun x => f x i) t y\n[PROOFSTEP]\nrfl\n[GOAL]\n𝕜 : Type u_1\nι : Type u_2\nH : Type u_3\ninst✝³ : IsROrC 𝕜\ninst✝² : NormedAddCommGroup H\ninst✝¹ : NormedSpace 𝕜 H\ninst✝ : Fintype ι\nf : H → EuclideanSpace 𝕜 ι\nf' : H →L[𝕜] EuclideanSpace 𝕜 ι\nt : Set H\ny : H\nn : ℕ∞\n⊢ ContDiffAt 𝕜 n f y ↔ ∀ (i : ι), ContDiffAt 𝕜 n (fun x => f x i) y\n[PROOFSTEP]\nrw [← (EuclideanSpace.equiv ι 𝕜).comp_contDiffAt_iff, contDiffAt_pi]\n[GOAL]\n𝕜 : Type u_1\nι : Type u_2\nH : Type u_3\ninst✝³ : IsROrC 𝕜\ninst✝² : NormedAddCommGroup H\ninst✝¹ : NormedSpace 𝕜 H\ninst✝ : Fintype ι\nf : H → EuclideanSpace 𝕜 ι\nf' : H →L[𝕜] EuclideanSpace 𝕜 ι\nt : Set H\ny : H\nn : ℕ∞\n⊢ (∀ (i : ι), ContDiffAt 𝕜 n (fun x => (↑(EuclideanSpace.equiv ι 𝕜) ∘ f) x i) y) ↔\n    ∀ (i : ι), ContDiffAt 𝕜 n (fun x => f x i) y\n[PROOFSTEP]\nrfl\n[GOAL]\n𝕜 : Type u_1\nι : Type u_2\nH : Type u_3\ninst✝³ : IsROrC 𝕜\ninst✝² : NormedAddCommGroup H\ninst✝¹ : NormedSpace 𝕜 H\ninst✝ : Fintype ι\nf : H → EuclideanSpace 𝕜 ι\nf' : H →L[𝕜] EuclideanSpace 𝕜 ι\nt : Set H\ny : H\nn : ℕ∞\n⊢ ContDiffOn 𝕜 n f t ↔ ∀ (i : ι), ContDiffOn 𝕜 n (fun x => f x i) t\n[PROOFSTEP]\nrw [← (EuclideanSpace.equiv ι 𝕜).comp_contDiffOn_iff, contDiffOn_pi]\n[GOAL]\n𝕜 : Type u_1\nι : Type u_2\nH : Type u_3\ninst✝³ : IsROrC 𝕜\ninst✝² : NormedAddCommGroup H\ninst✝¹ : NormedSpace 𝕜 H\ninst✝ : Fintype ι\nf : H → EuclideanSpace 𝕜 ι\nf' : H →L[𝕜] EuclideanSpace 𝕜 ι\nt : Set H\ny : H\nn : ℕ∞\n⊢ (∀ (i : ι), ContDiffOn 𝕜 n (fun x => (↑(EuclideanSpace.equiv ι 𝕜) ∘ f) x i) t) ↔\n    ∀ (i : ι), ContDiffOn 𝕜 n (fun x => f x i) t\n[PROOFSTEP]\nrfl\n[GOAL]\n𝕜 : Type u_1\nι : Type u_2\nH : Type u_3\ninst✝³ : IsROrC 𝕜\ninst✝² : NormedAddCommGroup H\ninst✝¹ : NormedSpace 𝕜 H\ninst✝ : Fintype ι\nf : H → EuclideanSpace 𝕜 ι\nf' : H →L[𝕜] EuclideanSpace 𝕜 ι\nt : Set H\ny : H\nn : ℕ∞\n⊢ ContDiff 𝕜 n f ↔ ∀ (i : ι), ContDiff 𝕜 n fun x => f x i\n[PROOFSTEP]\nrw [← (EuclideanSpace.equiv ι 𝕜).comp_contDiff_iff, contDiff_pi]\n[GOAL]\n𝕜 : Type u_1\nι : Type u_2\nH : Type u_3\ninst✝³ : IsROrC 𝕜\ninst✝² : NormedAddCommGroup H\ninst✝¹ : NormedSpace 𝕜 H\ninst✝ : Fintype ι\nf : H → EuclideanSpace 𝕜 ι\nf' : H →L[𝕜] EuclideanSpace 𝕜 ι\nt : Set H\ny : H\nn : ℕ∞\n⊢ (∀ (i : ι), ContDiff 𝕜 n fun x => (↑(EuclideanSpace.equiv ι 𝕜) ∘ f) x i) ↔ ∀ (i : ι), ContDiff 𝕜 n fun x => f x i\n[PROOFSTEP]\nrfl\n[GOAL]\nn : ℕ∞\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\n⊢ ContDiff ℝ n ↑univUnitBall\n[PROOFSTEP]\nsuffices ContDiff ℝ n fun x : E => ((1 : ℝ) + ‖x‖ ^ 2).sqrt⁻¹ from this.smul contDiff_id\n[GOAL]\nn : ℕ∞\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\n⊢ ContDiff ℝ n fun x => (sqrt (1 + ‖x‖ ^ 2))⁻¹\n[PROOFSTEP]\nhave h : ∀ x : E, (0 : ℝ) < (1 : ℝ) + ‖x‖ ^ 2 := fun x => by positivity\n[GOAL]\nn : ℕ∞\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nx : E\n⊢ 0 < 1 + ‖x‖ ^ 2\n[PROOFSTEP]\npositivity\n[GOAL]\nn : ℕ∞\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nh : ∀ (x : E), 0 < 1 + ‖x‖ ^ 2\n⊢ ContDiff ℝ n fun x => (sqrt (1 + ‖x‖ ^ 2))⁻¹\n[PROOFSTEP]\nrefine' ContDiff.inv _ fun x => Real.sqrt_ne_zero'.mpr (h x)\n[GOAL]\nn : ℕ∞\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nh : ∀ (x : E), 0 < 1 + ‖x‖ ^ 2\n⊢ ContDiff ℝ n fun x => sqrt (1 + ‖x‖ ^ 2)\n[PROOFSTEP]\nexact (contDiff_const.add <| contDiff_norm_sq ℝ).sqrt fun x => (h x).ne'\n[GOAL]\nn : ℕ∞\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\ny : E\nhy : y ∈ ball 0 1\n⊢ ContDiffWithinAt ℝ n (↑(LocalHomeomorph.symm univUnitBall)) (ball 0 1) y\n[PROOFSTEP]\napply ContDiffAt.contDiffWithinAt\n[GOAL]\ncase h\nn : ℕ∞\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\ny : E\nhy : y ∈ ball 0 1\n⊢ ContDiffAt ℝ n (↑(LocalHomeomorph.symm univUnitBall)) y\n[PROOFSTEP]\nsuffices ContDiffAt ℝ n (fun y : E => ((1 : ℝ) - ‖y‖ ^ 2).sqrt⁻¹) y from this.smul contDiffAt_id\n[GOAL]\ncase h\nn : ℕ∞\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\ny : E\nhy : y ∈ ball 0 1\n⊢ ContDiffAt ℝ n (fun y => (sqrt (1 - ‖y‖ ^ 2))⁻¹) y\n[PROOFSTEP]\nhave h : (0 : ℝ) < (1 : ℝ) - ‖(y : E)‖ ^ 2 := by\n  rwa [mem_ball_zero_iff, ← _root_.abs_one, ← abs_norm, ← sq_lt_sq, one_pow, ← sub_pos] at hy \n[GOAL]\nn : ℕ∞\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\ny : E\nhy : y ∈ ball 0 1\n⊢ 0 < 1 - ‖y‖ ^ 2\n[PROOFSTEP]\nrwa [mem_ball_zero_iff, ← _root_.abs_one, ← abs_norm, ← sq_lt_sq, one_pow, ← sub_pos] at hy \n[GOAL]\ncase h\nn : ℕ∞\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\ny : E\nhy : y ∈ ball 0 1\nh : 0 < 1 - ‖y‖ ^ 2\n⊢ ContDiffAt ℝ n (fun y => (sqrt (1 - ‖y‖ ^ 2))⁻¹) y\n[PROOFSTEP]\nrefine' ContDiffAt.inv _ (Real.sqrt_ne_zero'.mpr h)\n[GOAL]\ncase h\nn : ℕ∞\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\ny : E\nhy : y ∈ ball 0 1\nh : 0 < 1 - ‖y‖ ^ 2\n⊢ ContDiffAt ℝ n (fun y => sqrt (1 - ‖y‖ ^ 2)) y\n[PROOFSTEP]\nrefine' (contDiffAt_sqrt h.ne').comp y _\n[GOAL]\ncase h\nn : ℕ∞\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\ny : E\nhy : y ∈ ball 0 1\nh : 0 < 1 - ‖y‖ ^ 2\n⊢ ContDiffAt ℝ n (fun y => 1 - ‖y‖ ^ 2) y\n[PROOFSTEP]\nexact contDiffAt_const.sub (contDiff_norm_sq ℝ).contDiffAt\n[GOAL]\nn : ℕ∞\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nc : E\nr : ℝ\n⊢ ContDiff ℝ n ↑(univBall c r)\n[PROOFSTEP]\nunfold univBall\n[GOAL]\nn : ℕ∞\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nc : E\nr : ℝ\n⊢ ContDiff ℝ n\n    ↑(if h : 0 < r then\n        LocalHomeomorph.trans' univUnitBall (unitBallBall c r h)\n          (_ : univUnitBall.toLocalEquiv.target = univUnitBall.toLocalEquiv.target)\n      else Homeomorph.toLocalHomeomorph (IsometryEquiv.toHomeomorph (IsometryEquiv.vaddConst c)))\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nn : ℕ∞\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nc : E\nr : ℝ\nh : 0 < r\n⊢ ContDiff ℝ n\n    ↑(LocalHomeomorph.trans' univUnitBall (unitBallBall c r h)\n        (_ : univUnitBall.toLocalEquiv.target = univUnitBall.toLocalEquiv.target))\n[PROOFSTEP]\nexact (contDiff_unitBallBall h).comp contDiff_univUnitBall\n[GOAL]\ncase neg\nn : ℕ∞\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nc : E\nr : ℝ\nh : ¬0 < r\n⊢ ContDiff ℝ n ↑(Homeomorph.toLocalHomeomorph (IsometryEquiv.toHomeomorph (IsometryEquiv.vaddConst c)))\n[PROOFSTEP]\nexact contDiff_id.add contDiff_const\n[GOAL]\nn : ℕ∞\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nc : E\nr : ℝ\n⊢ ContDiffOn ℝ n (↑(LocalHomeomorph.symm (univBall c r))) (ball c r)\n[PROOFSTEP]\nunfold univBall\n[GOAL]\nn : ℕ∞\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nc : E\nr : ℝ\n⊢ ContDiffOn ℝ n\n    (↑(LocalHomeomorph.symm\n        (if h : 0 < r then\n          LocalHomeomorph.trans' univUnitBall (unitBallBall c r h)\n            (_ : univUnitBall.toLocalEquiv.target = univUnitBall.toLocalEquiv.target)\n        else Homeomorph.toLocalHomeomorph (IsometryEquiv.toHomeomorph (IsometryEquiv.vaddConst c)))))\n    (ball c r)\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nn : ℕ∞\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nc : E\nr : ℝ\nh : 0 < r\n⊢ ContDiffOn ℝ n\n    (↑(LocalHomeomorph.symm\n        (LocalHomeomorph.trans' univUnitBall (unitBallBall c r h)\n          (_ : univUnitBall.toLocalEquiv.target = univUnitBall.toLocalEquiv.target))))\n    (ball c r)\n[PROOFSTEP]\nrefine contDiffOn_univUnitBall_symm.comp (contDiff_unitBallBall_symm h).contDiffOn ?_\n[GOAL]\ncase pos\nn : ℕ∞\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nc : E\nr : ℝ\nh : 0 < r\n⊢ ball c r ⊆ (fun x => ↑(LocalEquiv.symm (unitBallBall c r h).toLocalEquiv) x) ⁻¹' ball 0 1\n[PROOFSTEP]\nrw [← unitBallBall_source c r h, ← unitBallBall_target c r h]\n[GOAL]\ncase pos\nn : ℕ∞\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nc : E\nr : ℝ\nh : 0 < r\n⊢ (unitBallBall c r h).toLocalEquiv.target ⊆\n    (fun x => ↑(LocalEquiv.symm (unitBallBall c r h).toLocalEquiv) x) ⁻¹' (unitBallBall c r h).toLocalEquiv.source\n[PROOFSTEP]\napply LocalHomeomorph.symm_mapsTo\n[GOAL]\ncase neg\nn : ℕ∞\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : InnerProductSpace ℝ E\nc : E\nr : ℝ\nh : ¬0 < r\n⊢ ContDiffOn ℝ n\n    (↑(LocalHomeomorph.symm (Homeomorph.toLocalHomeomorph (IsometryEquiv.toHomeomorph (IsometryEquiv.vaddConst c)))))\n    (ball c r)\n[PROOFSTEP]\nexact contDiffOn_id.sub contDiffOn_const\n", "meta": {"mathlib_filename": "Mathlib.Analysis.InnerProductSpace.Calculus", "llama_tokens": 12361, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7931059511841119, "lm_q2_score": 0.6654105454764746, "lm_q1q2_score": 0.5277410635980582}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\ninst✝¹ : IsPreorder α r\ninst✝ : Inhabited α\n⊢ Inhabited (Antisymmetrization α r)\n[PROOFSTEP]\nunfold Antisymmetrization\n[GOAL]\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\ninst✝¹ : IsPreorder α r\ninst✝ : Inhabited α\n⊢ Inhabited (Quotient (AntisymmRel.setoid α r))\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Preorder α\ninst✝ : Preorder β\na b : α\n⊢ Relation.Fibration (fun x x_1 => x < x_1) (fun x x_1 => x < x_1) (toAntisymmetrization fun x x_1 => x ≤ x_1)\n[PROOFSTEP]\nrintro a ⟨b⟩ h\n[GOAL]\ncase mk\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Preorder α\ninst✝ : Preorder β\na✝ b✝¹ a : α\nb✝ : Antisymmetrization α fun x x_1 => x ≤ x_1\nb : α\nh : Quot.mk Setoid.r b < toAntisymmetrization (fun x x_1 => x ≤ x_1) a\n⊢ ∃ a', (fun x x_1 => x < x_1) a' a ∧ toAntisymmetrization (fun x x_1 => x ≤ x_1) a' = Quot.mk Setoid.r b\n[PROOFSTEP]\nexact ⟨b, h, rfl⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Preorder α\ninst✝ : Preorder β\na✝¹ b : α\na✝ : (Antisymmetrization α fun x x_1 => x ≤ x_1)ᵒᵈ\na : α\n⊢ Quotient.map' id\n      (_ :\n        ∀ (x x_1 : αᵒᵈ),\n          (fun x x_2 => x ≤ x_2) x x_1 ∧ (fun x x_2 => x ≤ x_2) x_1 x →\n            (fun x x_2 => x ≤ x_2) x_1 x ∧ (fun x x_2 => x ≤ x_2) x x_1)\n      (Quotient.map' id\n        (_ :\n          ∀ (x x_1 : α),\n            (fun x x_2 => x ≤ x_2) x x_1 ∧ (fun x x_2 => x ≤ x_2) x_1 x →\n              (fun x x_2 => x ≤ x_2) x_1 x ∧ (fun x x_2 => x ≤ x_2) x x_1)\n        (Quotient.mk'' a)) =\n    Quotient.mk'' a\n[PROOFSTEP]\nsimp_rw [Quotient.map'_mk'', id]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Preorder α\ninst✝ : Preorder β\na✝¹ b : α\na✝ : Antisymmetrization αᵒᵈ fun x x_1 => x ≤ x_1\na : αᵒᵈ\n⊢ Quotient.map' id\n      (_ :\n        ∀ (x x_1 : α),\n          (fun x x_2 => x ≤ x_2) x x_1 ∧ (fun x x_2 => x ≤ x_2) x_1 x →\n            (fun x x_2 => x ≤ x_2) x_1 x ∧ (fun x x_2 => x ≤ x_2) x x_1)\n      (Quotient.map' id\n        (_ :\n          ∀ (x x_1 : αᵒᵈ),\n            (fun x x_2 => x ≤ x_2) x x_1 ∧ (fun x x_2 => x ≤ x_2) x_1 x →\n              (fun x x_2 => x ≤ x_2) x_1 x ∧ (fun x x_2 => x ≤ x_2) x x_1)\n        (Quotient.mk'' a)) =\n    Quotient.mk'' a\n[PROOFSTEP]\nsimp_rw [Quotient.map'_mk'', id]\n", "meta": {"mathlib_filename": "Mathlib.Order.Antisymmetrization", "llama_tokens": 1171, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8056321889812554, "lm_q2_score": 0.6548947290421275, "lm_q1q2_score": 0.5276042741104954}}
{"text": "[GOAL]\nι : Type u_1\nR : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₂ : Type u_5\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring R₂\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : Module R₂ M₂\ninst✝³ : TopologicalSpace M\ninst✝² : TopologicalSpace M₂\nσ : R →+* R₂\nσ' : R₂ →+* R\ninst✝¹ : RingHomInvPair σ σ'\ninst✝ : RingHomInvPair σ' σ\nf : ι → M\nφ : M →SL[σ] M₂\nx : M\nhf : HasSum f x\n⊢ HasSum (fun b => ↑φ (f b)) (↑φ x)\n[PROOFSTEP]\nsimpa only using hf.map φ.toLinearMap.toAddMonoidHom φ.continuous\n[GOAL]\nι : Type u_1\nR : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₂ : Type u_5\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring R₂\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : Module R₂ M₂\ninst✝³ : TopologicalSpace M\ninst✝² : TopologicalSpace M₂\nσ : R →+* R₂\nσ' : R₂ →+* R\ninst✝¹ : RingHomInvPair σ σ'\ninst✝ : RingHomInvPair σ' σ\nf : ι → M\ne : M ≃SL[σ] M₂\ny : M₂\nh : HasSum (fun b => ↑e (f b)) y\n⊢ HasSum f (↑(ContinuousLinearEquiv.symm e) y)\n[PROOFSTEP]\nsimpa only [e.symm.coe_coe, e.symm_apply_apply] using h.mapL (e.symm : M₂ →SL[σ'] M)\n[GOAL]\nι : Type u_1\nR : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₂ : Type u_5\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring R₂\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : Module R₂ M₂\ninst✝³ : TopologicalSpace M\ninst✝² : TopologicalSpace M₂\nσ : R →+* R₂\nσ' : R₂ →+* R\ninst✝¹ : RingHomInvPair σ σ'\ninst✝ : RingHomInvPair σ' σ\nf : ι → M\ne : M ≃SL[σ] M₂\ny : M₂\nh : HasSum f (↑(ContinuousLinearEquiv.symm e) y)\n⊢ HasSum (fun b => ↑e (f b)) y\n[PROOFSTEP]\nsimpa only [e.coe_coe, e.apply_symm_apply] using (e : M →SL[σ] M₂).hasSum h\n[GOAL]\nι : Type u_1\nR : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₂ : Type u_5\ninst✝⁹ : Semiring R\ninst✝⁸ : Semiring R₂\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : Module R M\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : Module R₂ M₂\ninst✝³ : TopologicalSpace M\ninst✝² : TopologicalSpace M₂\nσ : R →+* R₂\nσ' : R₂ →+* R\ninst✝¹ : RingHomInvPair σ σ'\ninst✝ : RingHomInvPair σ' σ\nf : ι → M\ne : M ≃SL[σ] M₂\nx : M\n⊢ HasSum (fun b => ↑e (f b)) (↑e x) ↔ HasSum f x\n[PROOFSTEP]\nrw [e.hasSum, ContinuousLinearEquiv.symm_apply_apply]\n[GOAL]\nι : Type u_1\nR : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₂ : Type u_5\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : Semiring R₂\ninst✝⁹ : AddCommMonoid M\ninst✝⁸ : Module R M\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : Module R₂ M₂\ninst✝⁵ : TopologicalSpace M\ninst✝⁴ : TopologicalSpace M₂\nσ : R →+* R₂\nσ' : R₂ →+* R\ninst✝³ : RingHomInvPair σ σ'\ninst✝² : RingHomInvPair σ' σ\ninst✝¹ : T2Space M\ninst✝ : T2Space M₂\nf : ι → M\ne : M ≃SL[σ] M₂\ny : M₂\n⊢ ∑' (z : ι), ↑e (f z) = y ↔ ∑' (z : ι), f z = ↑(ContinuousLinearEquiv.symm e) y\n[PROOFSTEP]\nby_cases hf : Summable f\n[GOAL]\ncase pos\nι : Type u_1\nR : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₂ : Type u_5\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : Semiring R₂\ninst✝⁹ : AddCommMonoid M\ninst✝⁸ : Module R M\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : Module R₂ M₂\ninst✝⁵ : TopologicalSpace M\ninst✝⁴ : TopologicalSpace M₂\nσ : R →+* R₂\nσ' : R₂ →+* R\ninst✝³ : RingHomInvPair σ σ'\ninst✝² : RingHomInvPair σ' σ\ninst✝¹ : T2Space M\ninst✝ : T2Space M₂\nf : ι → M\ne : M ≃SL[σ] M₂\ny : M₂\nhf : Summable f\n⊢ ∑' (z : ι), ↑e (f z) = y ↔ ∑' (z : ι), f z = ↑(ContinuousLinearEquiv.symm e) y\n[PROOFSTEP]\nexact\n  ⟨fun h => (e.hasSum.mp ((e.summable.mpr hf).hasSum_iff.mpr h)).tsum_eq, fun h =>\n    (e.hasSum.mpr (hf.hasSum_iff.mpr h)).tsum_eq⟩\n[GOAL]\ncase neg\nι : Type u_1\nR : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₂ : Type u_5\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : Semiring R₂\ninst✝⁹ : AddCommMonoid M\ninst✝⁸ : Module R M\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : Module R₂ M₂\ninst✝⁵ : TopologicalSpace M\ninst✝⁴ : TopologicalSpace M₂\nσ : R →+* R₂\nσ' : R₂ →+* R\ninst✝³ : RingHomInvPair σ σ'\ninst✝² : RingHomInvPair σ' σ\ninst✝¹ : T2Space M\ninst✝ : T2Space M₂\nf : ι → M\ne : M ≃SL[σ] M₂\ny : M₂\nhf : ¬Summable f\n⊢ ∑' (z : ι), ↑e (f z) = y ↔ ∑' (z : ι), f z = ↑(ContinuousLinearEquiv.symm e) y\n[PROOFSTEP]\nhave hf' : ¬Summable fun z => e (f z) := fun h => hf (e.summable.mp h)\n[GOAL]\ncase neg\nι : Type u_1\nR : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₂ : Type u_5\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : Semiring R₂\ninst✝⁹ : AddCommMonoid M\ninst✝⁸ : Module R M\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : Module R₂ M₂\ninst✝⁵ : TopologicalSpace M\ninst✝⁴ : TopologicalSpace M₂\nσ : R →+* R₂\nσ' : R₂ →+* R\ninst✝³ : RingHomInvPair σ σ'\ninst✝² : RingHomInvPair σ' σ\ninst✝¹ : T2Space M\ninst✝ : T2Space M₂\nf : ι → M\ne : M ≃SL[σ] M₂\ny : M₂\nhf : ¬Summable f\nhf' : ¬Summable fun z => ↑e (f z)\n⊢ ∑' (z : ι), ↑e (f z) = y ↔ ∑' (z : ι), f z = ↑(ContinuousLinearEquiv.symm e) y\n[PROOFSTEP]\nrw [tsum_eq_zero_of_not_summable hf, tsum_eq_zero_of_not_summable hf']\n[GOAL]\ncase neg\nι : Type u_1\nR : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₂ : Type u_5\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : Semiring R₂\ninst✝⁹ : AddCommMonoid M\ninst✝⁸ : Module R M\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : Module R₂ M₂\ninst✝⁵ : TopologicalSpace M\ninst✝⁴ : TopologicalSpace M₂\nσ : R →+* R₂\nσ' : R₂ →+* R\ninst✝³ : RingHomInvPair σ σ'\ninst✝² : RingHomInvPair σ' σ\ninst✝¹ : T2Space M\ninst✝ : T2Space M₂\nf : ι → M\ne : M ≃SL[σ] M₂\ny : M₂\nhf : ¬Summable f\nhf' : ¬Summable fun z => ↑e (f z)\n⊢ 0 = y ↔ 0 = ↑(ContinuousLinearEquiv.symm e) y\n[PROOFSTEP]\nrefine ⟨?_, fun H => ?_⟩\n[GOAL]\ncase neg.refine_1\nι : Type u_1\nR : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₂ : Type u_5\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : Semiring R₂\ninst✝⁹ : AddCommMonoid M\ninst✝⁸ : Module R M\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : Module R₂ M₂\ninst✝⁵ : TopologicalSpace M\ninst✝⁴ : TopologicalSpace M₂\nσ : R →+* R₂\nσ' : R₂ →+* R\ninst✝³ : RingHomInvPair σ σ'\ninst✝² : RingHomInvPair σ' σ\ninst✝¹ : T2Space M\ninst✝ : T2Space M₂\nf : ι → M\ne : M ≃SL[σ] M₂\ny : M₂\nhf : ¬Summable f\nhf' : ¬Summable fun z => ↑e (f z)\n⊢ 0 = y → 0 = ↑(ContinuousLinearEquiv.symm e) y\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase neg.refine_1\nι : Type u_1\nR : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₂ : Type u_5\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : Semiring R₂\ninst✝⁹ : AddCommMonoid M\ninst✝⁸ : Module R M\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : Module R₂ M₂\ninst✝⁵ : TopologicalSpace M\ninst✝⁴ : TopologicalSpace M₂\nσ : R →+* R₂\nσ' : R₂ →+* R\ninst✝³ : RingHomInvPair σ σ'\ninst✝² : RingHomInvPair σ' σ\ninst✝¹ : T2Space M\ninst✝ : T2Space M₂\nf : ι → M\ne : M ≃SL[σ] M₂\nhf : ¬Summable f\nhf' : ¬Summable fun z => ↑e (f z)\n⊢ 0 = ↑(ContinuousLinearEquiv.symm e) 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg.refine_2\nι : Type u_1\nR : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₂ : Type u_5\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : Semiring R₂\ninst✝⁹ : AddCommMonoid M\ninst✝⁸ : Module R M\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : Module R₂ M₂\ninst✝⁵ : TopologicalSpace M\ninst✝⁴ : TopologicalSpace M₂\nσ : R →+* R₂\nσ' : R₂ →+* R\ninst✝³ : RingHomInvPair σ σ'\ninst✝² : RingHomInvPair σ' σ\ninst✝¹ : T2Space M\ninst✝ : T2Space M₂\nf : ι → M\ne : M ≃SL[σ] M₂\ny : M₂\nhf : ¬Summable f\nhf' : ¬Summable fun z => ↑e (f z)\nH : 0 = ↑(ContinuousLinearEquiv.symm e) y\n⊢ 0 = y\n[PROOFSTEP]\nsimpa using congr_arg (fun z => e z) H\n[GOAL]\nι : Type u_1\nR : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₂ : Type u_5\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : Semiring R₂\ninst✝⁹ : AddCommMonoid M\ninst✝⁸ : Module R M\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : Module R₂ M₂\ninst✝⁵ : TopologicalSpace M\ninst✝⁴ : TopologicalSpace M₂\nσ : R →+* R₂\nσ' : R₂ →+* R\ninst✝³ : RingHomInvPair σ σ'\ninst✝² : RingHomInvPair σ' σ\ninst✝¹ : T2Space M\ninst✝ : T2Space M₂\nf : ι → M\ne : M ≃SL[σ] M₂\n⊢ ↑e (∑' (z : ι), f z) = ∑' (z : ι), ↑e (f z)\n[PROOFSTEP]\nrefine' symm (e.tsum_eq_iff.mpr _)\n[GOAL]\nι : Type u_1\nR : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₂ : Type u_5\ninst✝¹¹ : Semiring R\ninst✝¹⁰ : Semiring R₂\ninst✝⁹ : AddCommMonoid M\ninst✝⁸ : Module R M\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : Module R₂ M₂\ninst✝⁵ : TopologicalSpace M\ninst✝⁴ : TopologicalSpace M₂\nσ : R →+* R₂\nσ' : R₂ →+* R\ninst✝³ : RingHomInvPair σ σ'\ninst✝² : RingHomInvPair σ' σ\ninst✝¹ : T2Space M\ninst✝ : T2Space M₂\nf : ι → M\ne : M ≃SL[σ] M₂\n⊢ ∑' (z : ι), f z = ↑(ContinuousLinearEquiv.symm e) (↑e (∑' (z : ι), f z))\n[PROOFSTEP]\nrw [e.symm_apply_apply _]\n", "meta": {"mathlib_filename": "Mathlib.Topology.Algebra.InfiniteSum.Module", "llama_tokens": 4318, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8056321889812553, "lm_q2_score": 0.6548947223065754, "lm_q1q2_score": 0.5276042686841177}}
{"text": "[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\nJ : Type u₁\ninst✝¹ : Category.{v₁, u₁} J\nK : Type u₂\ninst✝ : Category.{v₂, u₂} K\nF : J ⥤ K ⥤ C\nc : Cone F\nt : (k : K) → IsLimit (((evaluation K C).obj k).mapCone c)\ns : Cone F\nX Y : K\nf : X ⟶ Y\nj : J\n⊢ (s.pt.map f ≫ (fun k => IsLimit.lift (t k) { pt := s.pt.obj k, π := whiskerRight s.π ((evaluation K C).obj k) }) Y) ≫\n      NatTrans.app (((evaluation K C).obj Y).mapCone c).π j =\n    ((fun k => IsLimit.lift (t k) { pt := s.pt.obj k, π := whiskerRight s.π ((evaluation K C).obj k) }) X ≫\n        c.pt.map f) ≫\n      NatTrans.app (((evaluation K C).obj Y).mapCone c).π j\n[PROOFSTEP]\nrw [assoc, (t Y).fac _ j]\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\nJ : Type u₁\ninst✝¹ : Category.{v₁, u₁} J\nK : Type u₂\ninst✝ : Category.{v₂, u₂} K\nF : J ⥤ K ⥤ C\nc : Cone F\nt : (k : K) → IsLimit (((evaluation K C).obj k).mapCone c)\ns : Cone F\nX Y : K\nf : X ⟶ Y\nj : J\n⊢ s.pt.map f ≫ NatTrans.app { pt := s.pt.obj Y, π := whiskerRight s.π ((evaluation K C).obj Y) }.π j =\n    ((fun k => IsLimit.lift (t k) { pt := s.pt.obj k, π := whiskerRight s.π ((evaluation K C).obj k) }) X ≫\n        c.pt.map f) ≫\n      NatTrans.app (((evaluation K C).obj Y).mapCone c).π j\n[PROOFSTEP]\nsimpa using ((t X).fac_assoc ⟨s.pt.obj X, whiskerRight s.π ((evaluation K C).obj X)⟩ j _).symm\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\nJ : Type u₁\ninst✝¹ : Category.{v₁, u₁} J\nK : Type u₂\ninst✝ : Category.{v₂, u₂} K\nF : J ⥤ K ⥤ C\nc : Cone F\nt : (k : K) → IsLimit (((evaluation K C).obj k).mapCone c)\ns : Cone F\nj : J\n⊢ (fun s =>\n          NatTrans.mk fun k => IsLimit.lift (t k) { pt := s.pt.obj k, π := whiskerRight s.π ((evaluation K C).obj k) })\n        s ≫\n      NatTrans.app c.π j =\n    NatTrans.app s.π j\n[PROOFSTEP]\next k\n[GOAL]\ncase w.h\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\nJ : Type u₁\ninst✝¹ : Category.{v₁, u₁} J\nK : Type u₂\ninst✝ : Category.{v₂, u₂} K\nF : J ⥤ K ⥤ C\nc : Cone F\nt : (k : K) → IsLimit (((evaluation K C).obj k).mapCone c)\ns : Cone F\nj : J\nk : K\n⊢ NatTrans.app\n      ((fun s =>\n            NatTrans.mk fun k =>\n              IsLimit.lift (t k) { pt := s.pt.obj k, π := whiskerRight s.π ((evaluation K C).obj k) })\n          s ≫\n        NatTrans.app c.π j)\n      k =\n    NatTrans.app (NatTrans.app s.π j) k\n[PROOFSTEP]\nexact (t k).fac _ j\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\nJ : Type u₁\ninst✝¹ : Category.{v₁, u₁} J\nK : Type u₂\ninst✝ : Category.{v₂, u₂} K\nF : J ⥤ K ⥤ C\nc : Cone F\nt : (k : K) → IsLimit (((evaluation K C).obj k).mapCone c)\ns : Cone F\nm : s.pt ⟶ c.pt\nw : ∀ (j : J), m ≫ NatTrans.app c.π j = NatTrans.app s.π j\n⊢ m =\n    (fun s =>\n        NatTrans.mk fun k => IsLimit.lift (t k) { pt := s.pt.obj k, π := whiskerRight s.π ((evaluation K C).obj k) })\n      s\n[PROOFSTEP]\next x\n[GOAL]\ncase w.h\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\nJ : Type u₁\ninst✝¹ : Category.{v₁, u₁} J\nK : Type u₂\ninst✝ : Category.{v₂, u₂} K\nF : J ⥤ K ⥤ C\nc : Cone F\nt : (k : K) → IsLimit (((evaluation K C).obj k).mapCone c)\ns : Cone F\nm : s.pt ⟶ c.pt\nw : ∀ (j : J), m ≫ NatTrans.app c.π j = NatTrans.app s.π j\nx : K\n⊢ NatTrans.app m x =\n    NatTrans.app\n      ((fun s =>\n          NatTrans.mk fun k => IsLimit.lift (t k) { pt := s.pt.obj k, π := whiskerRight s.π ((evaluation K C).obj k) })\n        s)\n      x\n[PROOFSTEP]\nexact\n  (t x).hom_ext fun j =>\n    (congr_app (w j) x).trans ((t x).fac ⟨s.pt.obj _, whiskerRight s.π ((evaluation K C).obj _)⟩ j).symm\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\nJ : Type u₁\ninst✝¹ : Category.{v₁, u₁} J\nK : Type u₂\ninst✝ : Category.{v₂, u₂} K\nF : J ⥤ K ⥤ C\nc : (k : K) → LimitCone ((Functor.flip F).obj k)\nk : K\nj : J\n⊢ { obj := fun k => (c k).cone.pt,\n            map := fun {k₁ k₂} f =>\n              IsLimit.lift (c k₂).isLimit { pt := (c k₁).cone.pt, π := (c k₁).cone.π ≫ (Functor.flip F).map f } }.map\n        (𝟙 k) ≫\n      NatTrans.app (c k).cone.π j =\n    𝟙\n        ({ obj := fun k => (c k).cone.pt,\n              map := fun {k₁ k₂} f =>\n                IsLimit.lift (c k₂).isLimit { pt := (c k₁).cone.pt, π := (c k₁).cone.π ≫ (Functor.flip F).map f } }.obj\n          k) ≫\n      NatTrans.app (c k).cone.π j\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\nJ : Type u₁\ninst✝¹ : Category.{v₁, u₁} J\nK : Type u₂\ninst✝ : Category.{v₂, u₂} K\nF : J ⥤ K ⥤ C\nc : (k : K) → LimitCone ((Functor.flip F).obj k)\nk : K\nj : J\n⊢ IsLimit.lift (c k).isLimit { pt := (c k).cone.pt, π := (c k).cone.π ≫ (Functor.flip F).map (𝟙 k) } ≫\n      NatTrans.app (c k).cone.π j =\n    𝟙 (c k).cone.pt ≫ NatTrans.app (c k).cone.π j\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\nJ : Type u₁\ninst✝¹ : Category.{v₁, u₁} J\nK : Type u₂\ninst✝ : Category.{v₂, u₂} K\nF : J ⥤ K ⥤ C\nc : (k : K) → LimitCone ((Functor.flip F).obj k)\nk₁ k₂ k₃ : K\nf₁ : k₁ ⟶ k₂\nf₂ : k₂ ⟶ k₃\nj : J\n⊢ { obj := fun k => (c k).cone.pt,\n            map := fun {k₁ k₂} f =>\n              IsLimit.lift (c k₂).isLimit { pt := (c k₁).cone.pt, π := (c k₁).cone.π ≫ (Functor.flip F).map f } }.map\n        (f₁ ≫ f₂) ≫\n      NatTrans.app (c k₃).cone.π j =\n    ({ obj := fun k => (c k).cone.pt,\n              map := fun {k₁ k₂} f =>\n                IsLimit.lift (c k₂).isLimit { pt := (c k₁).cone.pt, π := (c k₁).cone.π ≫ (Functor.flip F).map f } }.map\n          f₁ ≫\n        { obj := fun k => (c k).cone.pt,\n              map := fun {k₁ k₂} f =>\n                IsLimit.lift (c k₂).isLimit { pt := (c k₁).cone.pt, π := (c k₁).cone.π ≫ (Functor.flip F).map f } }.map\n          f₂) ≫\n      NatTrans.app (c k₃).cone.π j\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\nJ : Type u₁\ninst✝¹ : Category.{v₁, u₁} J\nK : Type u₂\ninst✝ : Category.{v₂, u₂} K\nF : J ⥤ K ⥤ C\nc : (k : K) → LimitCone ((Functor.flip F).obj k)\nj₁ j₂ : J\ng : j₁ ⟶ j₂\n⊢ ((const J).obj\n            (Functor.mk\n              { obj := fun k => (c k).cone.pt,\n                map := fun {k₁ k₂} f =>\n                  IsLimit.lift (c k₂).isLimit\n                    { pt := (c k₁).cone.pt, π := (c k₁).cone.π ≫ (Functor.flip F).map f } })).map\n        g ≫\n      (fun j => NatTrans.mk fun k => NatTrans.app (c k).cone.π j) j₂ =\n    (fun j => NatTrans.mk fun k => NatTrans.app (c k).cone.π j) j₁ ≫ F.map g\n[PROOFSTEP]\next k\n[GOAL]\ncase w.h\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\nJ : Type u₁\ninst✝¹ : Category.{v₁, u₁} J\nK : Type u₂\ninst✝ : Category.{v₂, u₂} K\nF : J ⥤ K ⥤ C\nc : (k : K) → LimitCone ((Functor.flip F).obj k)\nj₁ j₂ : J\ng : j₁ ⟶ j₂\nk : K\n⊢ NatTrans.app\n      (((const J).obj\n              (Functor.mk\n                { obj := fun k => (c k).cone.pt,\n                  map := fun {k₁ k₂} f =>\n                    IsLimit.lift (c k₂).isLimit\n                      { pt := (c k₁).cone.pt, π := (c k₁).cone.π ≫ (Functor.flip F).map f } })).map\n          g ≫\n        (fun j => NatTrans.mk fun k => NatTrans.app (c k).cone.π j) j₂)\n      k =\n    NatTrans.app ((fun j => NatTrans.mk fun k => NatTrans.app (c k).cone.π j) j₁ ≫ F.map g) k\n[PROOFSTEP]\nexact (c k).cone.π.naturality g\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\nJ : Type u₁\ninst✝¹ : Category.{v₁, u₁} J\nK : Type u₂\ninst✝ : Category.{v₂, u₂} K\nF : J ⥤ K ⥤ C\nc : Cocone F\nt : (k : K) → IsColimit (((evaluation K C).obj k).mapCocone c)\ns : Cocone F\nX Y : K\nf : X ⟶ Y\nj : J\n⊢ NatTrans.app (((evaluation K C).obj X).mapCocone c).ι j ≫\n      c.pt.map f ≫\n        (fun k => IsColimit.desc (t k) { pt := s.pt.obj k, ι := whiskerRight s.ι ((evaluation K C).obj k) }) Y =\n    NatTrans.app (((evaluation K C).obj X).mapCocone c).ι j ≫\n      (fun k => IsColimit.desc (t k) { pt := s.pt.obj k, ι := whiskerRight s.ι ((evaluation K C).obj k) }) X ≫\n        s.pt.map f\n[PROOFSTEP]\nrw [(t X).fac_assoc _ j]\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\nJ : Type u₁\ninst✝¹ : Category.{v₁, u₁} J\nK : Type u₂\ninst✝ : Category.{v₂, u₂} K\nF : J ⥤ K ⥤ C\nc : Cocone F\nt : (k : K) → IsColimit (((evaluation K C).obj k).mapCocone c)\ns : Cocone F\nX Y : K\nf : X ⟶ Y\nj : J\n⊢ NatTrans.app (((evaluation K C).obj X).mapCocone c).ι j ≫\n      c.pt.map f ≫\n        (fun k => IsColimit.desc (t k) { pt := s.pt.obj k, ι := whiskerRight s.ι ((evaluation K C).obj k) }) Y =\n    NatTrans.app { pt := s.pt.obj X, ι := whiskerRight s.ι ((evaluation K C).obj X) }.ι j ≫ s.pt.map f\n[PROOFSTEP]\nerw [← (c.ι.app j).naturality_assoc f]\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\nJ : Type u₁\ninst✝¹ : Category.{v₁, u₁} J\nK : Type u₂\ninst✝ : Category.{v₂, u₂} K\nF : J ⥤ K ⥤ C\nc : Cocone F\nt : (k : K) → IsColimit (((evaluation K C).obj k).mapCocone c)\ns : Cocone F\nX Y : K\nf : X ⟶ Y\nj : J\n⊢ (F.obj j).map f ≫\n      NatTrans.app (NatTrans.app c.ι j) Y ≫\n        (fun k => IsColimit.desc (t k) { pt := s.pt.obj k, ι := whiskerRight s.ι ((evaluation K C).obj k) }) Y =\n    NatTrans.app { pt := s.pt.obj X, ι := whiskerRight s.ι ((evaluation K C).obj X) }.ι j ≫ s.pt.map f\n[PROOFSTEP]\nerw [(t Y).fac ⟨s.pt.obj _, whiskerRight s.ι _⟩ j]\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\nJ : Type u₁\ninst✝¹ : Category.{v₁, u₁} J\nK : Type u₂\ninst✝ : Category.{v₂, u₂} K\nF : J ⥤ K ⥤ C\nc : Cocone F\nt : (k : K) → IsColimit (((evaluation K C).obj k).mapCocone c)\ns : Cocone F\nX Y : K\nf : X ⟶ Y\nj : J\n⊢ (F.obj j).map f ≫ NatTrans.app { pt := s.pt.obj Y, ι := whiskerRight s.ι ((evaluation K C).obj Y) }.ι j =\n    NatTrans.app { pt := s.pt.obj X, ι := whiskerRight s.ι ((evaluation K C).obj X) }.ι j ≫ s.pt.map f\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\nJ : Type u₁\ninst✝¹ : Category.{v₁, u₁} J\nK : Type u₂\ninst✝ : Category.{v₂, u₂} K\nF : J ⥤ K ⥤ C\nc : Cocone F\nt : (k : K) → IsColimit (((evaluation K C).obj k).mapCocone c)\ns : Cocone F\nX Y : K\nf : X ⟶ Y\nj : J\n⊢ (F.obj j).map f ≫ NatTrans.app (NatTrans.app s.ι j) Y = NatTrans.app (NatTrans.app s.ι j) X ≫ s.pt.map f\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\nJ : Type u₁\ninst✝¹ : Category.{v₁, u₁} J\nK : Type u₂\ninst✝ : Category.{v₂, u₂} K\nF : J ⥤ K ⥤ C\nc : Cocone F\nt : (k : K) → IsColimit (((evaluation K C).obj k).mapCocone c)\ns : Cocone F\nj : J\n⊢ NatTrans.app c.ι j ≫\n      (fun s =>\n          NatTrans.mk fun k =>\n            IsColimit.desc (t k) { pt := s.pt.obj k, ι := whiskerRight s.ι ((evaluation K C).obj k) })\n        s =\n    NatTrans.app s.ι j\n[PROOFSTEP]\next k\n[GOAL]\ncase w.h\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\nJ : Type u₁\ninst✝¹ : Category.{v₁, u₁} J\nK : Type u₂\ninst✝ : Category.{v₂, u₂} K\nF : J ⥤ K ⥤ C\nc : Cocone F\nt : (k : K) → IsColimit (((evaluation K C).obj k).mapCocone c)\ns : Cocone F\nj : J\nk : K\n⊢ NatTrans.app\n      (NatTrans.app c.ι j ≫\n        (fun s =>\n            NatTrans.mk fun k =>\n              IsColimit.desc (t k) { pt := s.pt.obj k, ι := whiskerRight s.ι ((evaluation K C).obj k) })\n          s)\n      k =\n    NatTrans.app (NatTrans.app s.ι j) k\n[PROOFSTEP]\nexact (t k).fac _ j\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\nJ : Type u₁\ninst✝¹ : Category.{v₁, u₁} J\nK : Type u₂\ninst✝ : Category.{v₂, u₂} K\nF : J ⥤ K ⥤ C\nc : Cocone F\nt : (k : K) → IsColimit (((evaluation K C).obj k).mapCocone c)\ns : Cocone F\nm : c.pt ⟶ s.pt\nw : ∀ (j : J), NatTrans.app c.ι j ≫ m = NatTrans.app s.ι j\n⊢ m =\n    (fun s =>\n        NatTrans.mk fun k => IsColimit.desc (t k) { pt := s.pt.obj k, ι := whiskerRight s.ι ((evaluation K C).obj k) })\n      s\n[PROOFSTEP]\next x\n[GOAL]\ncase w.h\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\nJ : Type u₁\ninst✝¹ : Category.{v₁, u₁} J\nK : Type u₂\ninst✝ : Category.{v₂, u₂} K\nF : J ⥤ K ⥤ C\nc : Cocone F\nt : (k : K) → IsColimit (((evaluation K C).obj k).mapCocone c)\ns : Cocone F\nm : c.pt ⟶ s.pt\nw : ∀ (j : J), NatTrans.app c.ι j ≫ m = NatTrans.app s.ι j\nx : K\n⊢ NatTrans.app m x =\n    NatTrans.app\n      ((fun s =>\n          NatTrans.mk fun k =>\n            IsColimit.desc (t k) { pt := s.pt.obj k, ι := whiskerRight s.ι ((evaluation K C).obj k) })\n        s)\n      x\n[PROOFSTEP]\nexact\n  (t x).hom_ext fun j =>\n    (congr_app (w j) x).trans ((t x).fac ⟨s.pt.obj _, whiskerRight s.ι ((evaluation K C).obj _)⟩ j).symm\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\nJ : Type u₁\ninst✝¹ : Category.{v₁, u₁} J\nK : Type u₂\ninst✝ : Category.{v₂, u₂} K\nF : J ⥤ K ⥤ C\nc : (k : K) → ColimitCocone ((Functor.flip F).obj k)\nk : K\nj : J\n⊢ NatTrans.app (c k).cocone.ι j ≫\n      { obj := fun k => (c k).cocone.pt,\n            map := fun {k₁ k₂} f =>\n              IsColimit.desc (c k₁).isColimit\n                { pt := (c k₂).cocone.pt, ι := (Functor.flip F).map f ≫ (c k₂).cocone.ι } }.map\n        (𝟙 k) =\n    NatTrans.app (c k).cocone.ι j ≫\n      𝟙\n        ({ obj := fun k => (c k).cocone.pt,\n              map := fun {k₁ k₂} f =>\n                IsColimit.desc (c k₁).isColimit\n                  { pt := (c k₂).cocone.pt, ι := (Functor.flip F).map f ≫ (c k₂).cocone.ι } }.obj\n          k)\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\nJ : Type u₁\ninst✝¹ : Category.{v₁, u₁} J\nK : Type u₂\ninst✝ : Category.{v₂, u₂} K\nF : J ⥤ K ⥤ C\nc : (k : K) → ColimitCocone ((Functor.flip F).obj k)\nk : K\nj : J\n⊢ NatTrans.app (c k).cocone.ι j ≫\n      IsColimit.desc (c k).isColimit { pt := (c k).cocone.pt, ι := (Functor.flip F).map (𝟙 k) ≫ (c k).cocone.ι } =\n    NatTrans.app (c k).cocone.ι j ≫ 𝟙 (c k).cocone.pt\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\nJ : Type u₁\ninst✝¹ : Category.{v₁, u₁} J\nK : Type u₂\ninst✝ : Category.{v₂, u₂} K\nF : J ⥤ K ⥤ C\nc : (k : K) → ColimitCocone ((Functor.flip F).obj k)\nk₁ k₂ k₃ : K\nf₁ : k₁ ⟶ k₂\nf₂ : k₂ ⟶ k₃\nj : J\n⊢ NatTrans.app (c k₁).cocone.ι j ≫\n      { obj := fun k => (c k).cocone.pt,\n            map := fun {k₁ k₂} f =>\n              IsColimit.desc (c k₁).isColimit\n                { pt := (c k₂).cocone.pt, ι := (Functor.flip F).map f ≫ (c k₂).cocone.ι } }.map\n        (f₁ ≫ f₂) =\n    NatTrans.app (c k₁).cocone.ι j ≫\n      { obj := fun k => (c k).cocone.pt,\n              map := fun {k₁ k₂} f =>\n                IsColimit.desc (c k₁).isColimit\n                  { pt := (c k₂).cocone.pt, ι := (Functor.flip F).map f ≫ (c k₂).cocone.ι } }.map\n          f₁ ≫\n        { obj := fun k => (c k).cocone.pt,\n              map := fun {k₁ k₂} f =>\n                IsColimit.desc (c k₁).isColimit\n                  { pt := (c k₂).cocone.pt, ι := (Functor.flip F).map f ≫ (c k₂).cocone.ι } }.map\n          f₂\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\nJ : Type u₁\ninst✝¹ : Category.{v₁, u₁} J\nK : Type u₂\ninst✝ : Category.{v₂, u₂} K\nF : J ⥤ K ⥤ C\nc : (k : K) → ColimitCocone ((Functor.flip F).obj k)\nj₁ j₂ : J\ng : j₁ ⟶ j₂\n⊢ F.map g ≫ (fun j => NatTrans.mk fun k => NatTrans.app (c k).cocone.ι j) j₂ =\n    (fun j => NatTrans.mk fun k => NatTrans.app (c k).cocone.ι j) j₁ ≫\n      ((const J).obj\n            (Functor.mk\n              { obj := fun k => (c k).cocone.pt,\n                map := fun {k₁ k₂} f =>\n                  IsColimit.desc (c k₁).isColimit\n                    { pt := (c k₂).cocone.pt, ι := (Functor.flip F).map f ≫ (c k₂).cocone.ι } })).map\n        g\n[PROOFSTEP]\next k\n[GOAL]\ncase w.h\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\nJ : Type u₁\ninst✝¹ : Category.{v₁, u₁} J\nK : Type u₂\ninst✝ : Category.{v₂, u₂} K\nF : J ⥤ K ⥤ C\nc : (k : K) → ColimitCocone ((Functor.flip F).obj k)\nj₁ j₂ : J\ng : j₁ ⟶ j₂\nk : K\n⊢ NatTrans.app (F.map g ≫ (fun j => NatTrans.mk fun k => NatTrans.app (c k).cocone.ι j) j₂) k =\n    NatTrans.app\n      ((fun j => NatTrans.mk fun k => NatTrans.app (c k).cocone.ι j) j₁ ≫\n        ((const J).obj\n              (Functor.mk\n                { obj := fun k => (c k).cocone.pt,\n                  map := fun {k₁ k₂} f =>\n                    IsColimit.desc (c k₁).isColimit\n                      { pt := (c k₂).cocone.pt, ι := (Functor.flip F).map f ≫ (c k₂).cocone.ι } })).map\n          g)\n      k\n[PROOFSTEP]\nexact (c k).cocone.ι.naturality g\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\nD : Type u'\ninst✝³ : Category.{v', u'} D\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\ninst✝ : HasLimitsOfShape J C\nk : K\nF : J ⥤ K ⥤ C\n⊢ PreservesLimit F ((evaluation K C).obj k)\n[PROOFSTEP]\nlet X : (k : K) → LimitCone (Prefunctor.obj (Functor.flip F).toPrefunctor k) := fun k =>\n  getLimitCone (Prefunctor.obj (Functor.flip F).toPrefunctor k)\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\nD : Type u'\ninst✝³ : Category.{v', u'} D\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\ninst✝ : HasLimitsOfShape J C\nk : K\nF : J ⥤ K ⥤ C\nX : (k : K) → LimitCone ((Functor.flip F).obj k) := fun k => getLimitCone ((Functor.flip F).obj k)\n⊢ PreservesLimit F ((evaluation K C).obj k)\n[PROOFSTEP]\nexact\n  preservesLimitOfPreservesLimitCone (combinedIsLimit _ _) <|\n    IsLimit.ofIsoLimit (limit.isLimit _) (evaluateCombinedCones F X k).symm\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\nD : Type u'\ninst✝³ : Category.{v', u'} D\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\ninst✝ : HasLimitsOfShape J C\nF : J ⥤ K ⥤ C\nj : J\nk : K\n⊢ (limitObjIsoLimitCompEvaluation F k).hom ≫ limit.π (F ⋙ (evaluation K C).obj k) j = NatTrans.app (limit.π F j) k\n[PROOFSTEP]\ndsimp [limitObjIsoLimitCompEvaluation]\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\nD : Type u'\ninst✝³ : Category.{v', u'} D\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\ninst✝ : HasLimitsOfShape J C\nF : J ⥤ K ⥤ C\nj : J\nk : K\n⊢ (preservesLimitIso ((evaluation K C).obj k) F).hom ≫ limit.π (F ⋙ (evaluation K C).obj k) j =\n    NatTrans.app (limit.π F j) k\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\nD : Type u'\ninst✝³ : Category.{v', u'} D\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\ninst✝ : HasLimitsOfShape J C\nF : J ⥤ K ⥤ C\nj : J\nk : K\n⊢ (limitObjIsoLimitCompEvaluation F k).inv ≫ NatTrans.app (limit.π F j) k = limit.π (F ⋙ (evaluation K C).obj k) j\n[PROOFSTEP]\ndsimp [limitObjIsoLimitCompEvaluation]\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\nD : Type u'\ninst✝³ : Category.{v', u'} D\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\ninst✝ : HasLimitsOfShape J C\nF : J ⥤ K ⥤ C\nj : J\nk : K\n⊢ (preservesLimitIso ((evaluation K C).obj k) F).inv ≫ NatTrans.app (limit.π F j) k =\n    limit.π (F ⋙ (evaluation K C).obj k) j\n[PROOFSTEP]\nrw [Iso.inv_comp_eq]\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\nD : Type u'\ninst✝³ : Category.{v', u'} D\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\ninst✝ : HasLimitsOfShape J C\nF : J ⥤ K ⥤ C\nj : J\nk : K\n⊢ NatTrans.app (limit.π F j) k =\n    (preservesLimitIso ((evaluation K C).obj k) F).hom ≫ limit.π (F ⋙ (evaluation K C).obj k) j\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\nD : Type u'\ninst✝³ : Category.{v', u'} D\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\ninst✝ : HasLimitsOfShape J C\ni j : K\nF : J ⥤ K ⥤ C\nf : i ⟶ j\n⊢ (limit F).map f ≫ (limitObjIsoLimitCompEvaluation F j).hom =\n    (limitObjIsoLimitCompEvaluation F i).hom ≫ limMap (whiskerLeft F ((evaluation K C).map f))\n[PROOFSTEP]\next\n[GOAL]\ncase w\nC : Type u\ninst✝⁴ : Category.{v, u} C\nD : Type u'\ninst✝³ : Category.{v', u'} D\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\ninst✝ : HasLimitsOfShape J C\ni j : K\nF : J ⥤ K ⥤ C\nf : i ⟶ j\nj✝ : J\n⊢ ((limit F).map f ≫ (limitObjIsoLimitCompEvaluation F j).hom) ≫ limit.π (F ⋙ (evaluation K C).obj j) j✝ =\n    ((limitObjIsoLimitCompEvaluation F i).hom ≫ limMap (whiskerLeft F ((evaluation K C).map f))) ≫\n      limit.π (F ⋙ (evaluation K C).obj j) j✝\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase w\nC : Type u\ninst✝⁴ : Category.{v, u} C\nD : Type u'\ninst✝³ : Category.{v', u'} D\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\ninst✝ : HasLimitsOfShape J C\ni j : K\nF : J ⥤ K ⥤ C\nf : i ⟶ j\nj✝ : J\n⊢ ((limit F).map f ≫ (limitObjIsoLimitCompEvaluation F j).hom) ≫ limit.π (F ⋙ (evaluation K C).obj j) j✝ =\n    ((limitObjIsoLimitCompEvaluation F i).hom ≫ limMap (whiskerLeft F ((evaluation K C).map f))) ≫\n      limit.π (F ⋙ (evaluation K C).obj j) j✝\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\nD : Type u'\ninst✝³ : Category.{v', u'} D\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\ninst✝ : HasLimitsOfShape J C\ni j : K\nF : J ⥤ K ⥤ C\nf : i ⟶ j\n⊢ (limitObjIsoLimitCompEvaluation F i).inv ≫ (limit F).map f =\n    limMap (whiskerLeft F ((evaluation K C).map f)) ≫ (limitObjIsoLimitCompEvaluation F j).inv\n[PROOFSTEP]\nrw [Iso.inv_comp_eq, ← Category.assoc, Iso.eq_comp_inv, limit_map_limitObjIsoLimitCompEvaluation_hom]\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\nD : Type u'\ninst✝³ : Category.{v', u'} D\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nH : J ⥤ K ⥤ C\ninst✝ : HasLimitsOfShape J C\nk : K\nW : C\nf g : W ⟶ (limit H).obj k\nw : ∀ (j : J), f ≫ NatTrans.app (limit.π H j) k = g ≫ NatTrans.app (limit.π H j) k\n⊢ f = g\n[PROOFSTEP]\napply (cancel_mono (limitObjIsoLimitCompEvaluation H k).hom).1\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\nD : Type u'\ninst✝³ : Category.{v', u'} D\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nH : J ⥤ K ⥤ C\ninst✝ : HasLimitsOfShape J C\nk : K\nW : C\nf g : W ⟶ (limit H).obj k\nw : ∀ (j : J), f ≫ NatTrans.app (limit.π H j) k = g ≫ NatTrans.app (limit.π H j) k\n⊢ f ≫ (limitObjIsoLimitCompEvaluation H k).hom = g ≫ (limitObjIsoLimitCompEvaluation H k).hom\n[PROOFSTEP]\next j\n[GOAL]\ncase w\nC : Type u\ninst✝⁴ : Category.{v, u} C\nD : Type u'\ninst✝³ : Category.{v', u'} D\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nH : J ⥤ K ⥤ C\ninst✝ : HasLimitsOfShape J C\nk : K\nW : C\nf g : W ⟶ (limit H).obj k\nw : ∀ (j : J), f ≫ NatTrans.app (limit.π H j) k = g ≫ NatTrans.app (limit.π H j) k\nj : J\n⊢ (f ≫ (limitObjIsoLimitCompEvaluation H k).hom) ≫ limit.π (H ⋙ (evaluation K C).obj k) j =\n    (g ≫ (limitObjIsoLimitCompEvaluation H k).hom) ≫ limit.π (H ⋙ (evaluation K C).obj k) j\n[PROOFSTEP]\nsimpa using w j\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\nD : Type u'\ninst✝³ : Category.{v', u'} D\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\ninst✝ : HasColimitsOfShape J C\nk : K\nF : J ⥤ K ⥤ C\n⊢ PreservesColimit F ((evaluation K C).obj k)\n[PROOFSTEP]\nlet X : (k : K) → ColimitCocone (Prefunctor.obj (Functor.flip F).toPrefunctor k) := fun k =>\n  getColimitCocone (Prefunctor.obj (Functor.flip F).toPrefunctor k)\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\nD : Type u'\ninst✝³ : Category.{v', u'} D\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\ninst✝ : HasColimitsOfShape J C\nk : K\nF : J ⥤ K ⥤ C\nX : (k : K) → ColimitCocone ((Functor.flip F).obj k) := fun k => getColimitCocone ((Functor.flip F).obj k)\n⊢ PreservesColimit F ((evaluation K C).obj k)\n[PROOFSTEP]\nrefine\n  preservesColimitOfPreservesColimitCocone (combinedIsColimit _ _) <|\n    IsColimit.ofIsoColimit (colimit.isColimit _) (evaluateCombinedCocones F X k).symm\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\nD : Type u'\ninst✝³ : Category.{v', u'} D\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\ninst✝ : HasColimitsOfShape J C\nF : J ⥤ K ⥤ C\nj : J\nk : K\n⊢ colimit.ι (F ⋙ (evaluation K C).obj k) j ≫ (colimitObjIsoColimitCompEvaluation F k).inv =\n    NatTrans.app (colimit.ι F j) k\n[PROOFSTEP]\ndsimp [colimitObjIsoColimitCompEvaluation]\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\nD : Type u'\ninst✝³ : Category.{v', u'} D\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\ninst✝ : HasColimitsOfShape J C\nF : J ⥤ K ⥤ C\nj : J\nk : K\n⊢ colimit.ι (F ⋙ (evaluation K C).obj k) j ≫ (preservesColimitIso ((evaluation K C).obj k) F).inv =\n    NatTrans.app (colimit.ι F j) k\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\nD : Type u'\ninst✝³ : Category.{v', u'} D\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\ninst✝ : HasColimitsOfShape J C\nF : J ⥤ K ⥤ C\nj : J\nk : K\n⊢ NatTrans.app (colimit.ι F j) k ≫ (colimitObjIsoColimitCompEvaluation F k).hom =\n    colimit.ι (F ⋙ (evaluation K C).obj k) j\n[PROOFSTEP]\ndsimp [colimitObjIsoColimitCompEvaluation]\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\nD : Type u'\ninst✝³ : Category.{v', u'} D\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\ninst✝ : HasColimitsOfShape J C\nF : J ⥤ K ⥤ C\nj : J\nk : K\n⊢ NatTrans.app (colimit.ι F j) k ≫ (preservesColimitIso ((evaluation K C).obj k) F).hom =\n    colimit.ι (F ⋙ (evaluation K C).obj k) j\n[PROOFSTEP]\nrw [← Iso.eq_comp_inv]\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\nD : Type u'\ninst✝³ : Category.{v', u'} D\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\ninst✝ : HasColimitsOfShape J C\nF : J ⥤ K ⥤ C\nj : J\nk : K\n⊢ NatTrans.app (colimit.ι F j) k =\n    colimit.ι (F ⋙ (evaluation K C).obj k) j ≫ (preservesColimitIso ((evaluation K C).obj k) F).inv\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\nD : Type u'\ninst✝³ : Category.{v', u'} D\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\ninst✝ : HasColimitsOfShape J C\nF : J ⥤ K ⥤ C\ni j : K\nf : i ⟶ j\n⊢ (colimitObjIsoColimitCompEvaluation F i).inv ≫ (colimit F).map f =\n    colimMap (whiskerLeft F ((evaluation K C).map f)) ≫ (colimitObjIsoColimitCompEvaluation F j).inv\n[PROOFSTEP]\next\n[GOAL]\ncase w\nC : Type u\ninst✝⁴ : Category.{v, u} C\nD : Type u'\ninst✝³ : Category.{v', u'} D\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\ninst✝ : HasColimitsOfShape J C\nF : J ⥤ K ⥤ C\ni j : K\nf : i ⟶ j\nj✝ : J\n⊢ colimit.ι (F ⋙ (evaluation K C).obj i) j✝ ≫ (colimitObjIsoColimitCompEvaluation F i).inv ≫ (colimit F).map f =\n    colimit.ι (F ⋙ (evaluation K C).obj i) j✝ ≫\n      colimMap (whiskerLeft F ((evaluation K C).map f)) ≫ (colimitObjIsoColimitCompEvaluation F j).inv\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase w\nC : Type u\ninst✝⁴ : Category.{v, u} C\nD : Type u'\ninst✝³ : Category.{v', u'} D\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\ninst✝ : HasColimitsOfShape J C\nF : J ⥤ K ⥤ C\ni j : K\nf : i ⟶ j\nj✝ : J\n⊢ colimit.ι (F ⋙ (evaluation K C).obj i) j✝ ≫ (colimitObjIsoColimitCompEvaluation F i).inv ≫ (colimit F).map f =\n    colimit.ι (F ⋙ (evaluation K C).obj i) j✝ ≫\n      colimMap (whiskerLeft F ((evaluation K C).map f)) ≫ (colimitObjIsoColimitCompEvaluation F j).inv\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\nD : Type u'\ninst✝³ : Category.{v', u'} D\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\ninst✝ : HasColimitsOfShape J C\nF : J ⥤ K ⥤ C\ni j : K\nf : i ⟶ j\n⊢ (colimit F).map f ≫ (colimitObjIsoColimitCompEvaluation F j).hom =\n    (colimitObjIsoColimitCompEvaluation F i).hom ≫ colimMap (whiskerLeft F ((evaluation K C).map f))\n[PROOFSTEP]\nrw [← Iso.inv_comp_eq, ← Category.assoc, ← Iso.eq_comp_inv, colimitObjIsoColimitCompEvaluation_inv_colimit_map]\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\nD : Type u'\ninst✝³ : Category.{v', u'} D\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nH : J ⥤ K ⥤ C\ninst✝ : HasColimitsOfShape J C\nk : K\nW : C\nf g : (colimit H).obj k ⟶ W\nw : ∀ (j : J), NatTrans.app (colimit.ι H j) k ≫ f = NatTrans.app (colimit.ι H j) k ≫ g\n⊢ f = g\n[PROOFSTEP]\napply (cancel_epi (colimitObjIsoColimitCompEvaluation H k).inv).1\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\nD : Type u'\ninst✝³ : Category.{v', u'} D\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nH : J ⥤ K ⥤ C\ninst✝ : HasColimitsOfShape J C\nk : K\nW : C\nf g : (colimit H).obj k ⟶ W\nw : ∀ (j : J), NatTrans.app (colimit.ι H j) k ≫ f = NatTrans.app (colimit.ι H j) k ≫ g\n⊢ (colimitObjIsoColimitCompEvaluation H k).inv ≫ f = (colimitObjIsoColimitCompEvaluation H k).inv ≫ g\n[PROOFSTEP]\next j\n[GOAL]\ncase w\nC : Type u\ninst✝⁴ : Category.{v, u} C\nD : Type u'\ninst✝³ : Category.{v', u'} D\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\nH : J ⥤ K ⥤ C\ninst✝ : HasColimitsOfShape J C\nk : K\nW : C\nf g : (colimit H).obj k ⟶ W\nw : ∀ (j : J), NatTrans.app (colimit.ι H j) k ≫ f = NatTrans.app (colimit.ι H j) k ≫ g\nj : J\n⊢ colimit.ι (H ⋙ (evaluation K C).obj k) j ≫ (colimitObjIsoColimitCompEvaluation H k).inv ≫ f =\n    colimit.ι (H ⋙ (evaluation K C).obj k) j ≫ (colimitObjIsoColimitCompEvaluation H k).inv ≫ g\n[PROOFSTEP]\nsimpa using w j\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\nD : Type u'\ninst✝³ : Category.{v', u'} D\nJ✝ : Type u₁\ninst✝² : Category.{v₁, u₁} J✝\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\ninst✝ : HasLimits C\nk : K\nJ : Type v\n𝒥 : Category.{v, v} J\n⊢ PreservesLimitsOfShape J ((evaluation K C).obj k)\n[PROOFSTEP]\nskip\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\nD : Type u'\ninst✝³ : Category.{v', u'} D\nJ✝ : Type u₁\ninst✝² : Category.{v₁, u₁} J✝\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\ninst✝ : HasLimits C\nk : K\nJ : Type v\n𝒥 : Category.{v, v} J\n⊢ PreservesLimitsOfShape J ((evaluation K C).obj k)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\nJ : Type u₁\ninst✝¹ : Category.{v₁, u₁} J\nK : Type u₂\ninst✝ : Category.{v₂, u₂} K\nF : D ⥤ K ⥤ C\nG : J ⥤ D\nH : (k : K) → PreservesLimit G (F ⋙ (evaluation K C).obj k)\nc : Cone G\nhc : IsLimit c\n⊢ IsLimit (F.mapCone c)\n[PROOFSTEP]\napply evaluationJointlyReflectsLimits\n[GOAL]\ncase t\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\nJ : Type u₁\ninst✝¹ : Category.{v₁, u₁} J\nK : Type u₂\ninst✝ : Category.{v₂, u₂} K\nF : D ⥤ K ⥤ C\nG : J ⥤ D\nH : (k : K) → PreservesLimit G (F ⋙ (evaluation K C).obj k)\nc : Cone G\nhc : IsLimit c\n⊢ (k : K) → IsLimit (((evaluation K C).obj k).mapCone (F.mapCone c))\n[PROOFSTEP]\nintro X\n[GOAL]\ncase t\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\nJ : Type u₁\ninst✝¹ : Category.{v₁, u₁} J\nK : Type u₂\ninst✝ : Category.{v₂, u₂} K\nF : D ⥤ K ⥤ C\nG : J ⥤ D\nH : (k : K) → PreservesLimit G (F ⋙ (evaluation K C).obj k)\nc : Cone G\nhc : IsLimit c\nX : K\n⊢ IsLimit (((evaluation K C).obj X).mapCone (F.mapCone c))\n[PROOFSTEP]\nhaveI := H X\n[GOAL]\ncase t\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\nJ : Type u₁\ninst✝¹ : Category.{v₁, u₁} J\nK : Type u₂\ninst✝ : Category.{v₂, u₂} K\nF : D ⥤ K ⥤ C\nG : J ⥤ D\nH : (k : K) → PreservesLimit G (F ⋙ (evaluation K C).obj k)\nc : Cone G\nhc : IsLimit c\nX : K\nthis : PreservesLimit G (F ⋙ (evaluation K C).obj X)\n⊢ IsLimit (((evaluation K C).obj X).mapCone (F.mapCone c))\n[PROOFSTEP]\nchange IsLimit ((F ⋙ (evaluation K C).obj X).mapCone c)\n[GOAL]\ncase t\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\nJ : Type u₁\ninst✝¹ : Category.{v₁, u₁} J\nK : Type u₂\ninst✝ : Category.{v₂, u₂} K\nF : D ⥤ K ⥤ C\nG : J ⥤ D\nH : (k : K) → PreservesLimit G (F ⋙ (evaluation K C).obj k)\nc : Cone G\nhc : IsLimit c\nX : K\nthis : PreservesLimit G (F ⋙ (evaluation K C).obj X)\n⊢ IsLimit ((F ⋙ (evaluation K C).obj X).mapCone c)\n[PROOFSTEP]\nexact PreservesLimit.preserves hc\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\nD : Type u'\ninst✝³ : Category.{v', u'} D\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\ninst✝ : HasColimits C\nk : K\n⊢ {J : Type v} → [inst : Category.{v, v} J] → PreservesColimitsOfShape J ((evaluation K C).obj k)\n[PROOFSTEP]\nskip\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\nD : Type u'\ninst✝³ : Category.{v', u'} D\nJ : Type u₁\ninst✝² : Category.{v₁, u₁} J\nK : Type u₂\ninst✝¹ : Category.{v₂, u₂} K\ninst✝ : HasColimits C\nk : K\n⊢ {J : Type v} → [inst : Category.{v, v} J] → PreservesColimitsOfShape J ((evaluation K C).obj k)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\nJ : Type u₁\ninst✝¹ : Category.{v₁, u₁} J\nK : Type u₂\ninst✝ : Category.{v₂, u₂} K\nF : D ⥤ K ⥤ C\nG : J ⥤ D\nH : (k : K) → PreservesColimit G (F ⋙ (evaluation K C).obj k)\nc : Cocone G\nhc : IsColimit c\n⊢ IsColimit (F.mapCocone c)\n[PROOFSTEP]\napply evaluationJointlyReflectsColimits\n[GOAL]\ncase t\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\nJ : Type u₁\ninst✝¹ : Category.{v₁, u₁} J\nK : Type u₂\ninst✝ : Category.{v₂, u₂} K\nF : D ⥤ K ⥤ C\nG : J ⥤ D\nH : (k : K) → PreservesColimit G (F ⋙ (evaluation K C).obj k)\nc : Cocone G\nhc : IsColimit c\n⊢ (k : K) → IsColimit (((evaluation K C).obj k).mapCocone (F.mapCocone c))\n[PROOFSTEP]\nintro X\n[GOAL]\ncase t\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\nJ : Type u₁\ninst✝¹ : Category.{v₁, u₁} J\nK : Type u₂\ninst✝ : Category.{v₂, u₂} K\nF : D ⥤ K ⥤ C\nG : J ⥤ D\nH : (k : K) → PreservesColimit G (F ⋙ (evaluation K C).obj k)\nc : Cocone G\nhc : IsColimit c\nX : K\n⊢ IsColimit (((evaluation K C).obj X).mapCocone (F.mapCocone c))\n[PROOFSTEP]\nhaveI := H X\n[GOAL]\ncase t\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\nJ : Type u₁\ninst✝¹ : Category.{v₁, u₁} J\nK : Type u₂\ninst✝ : Category.{v₂, u₂} K\nF : D ⥤ K ⥤ C\nG : J ⥤ D\nH : (k : K) → PreservesColimit G (F ⋙ (evaluation K C).obj k)\nc : Cocone G\nhc : IsColimit c\nX : K\nthis : PreservesColimit G (F ⋙ (evaluation K C).obj X)\n⊢ IsColimit (((evaluation K C).obj X).mapCocone (F.mapCocone c))\n[PROOFSTEP]\nchange IsColimit ((F ⋙ (evaluation K C).obj X).mapCocone c)\n[GOAL]\ncase t\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\nJ : Type u₁\ninst✝¹ : Category.{v₁, u₁} J\nK : Type u₂\ninst✝ : Category.{v₂, u₂} K\nF : D ⥤ K ⥤ C\nG : J ⥤ D\nH : (k : K) → PreservesColimit G (F ⋙ (evaluation K C).obj k)\nc : Cocone G\nhc : IsColimit c\nX : K\nthis : PreservesColimit G (F ⋙ (evaluation K C).obj X)\n⊢ IsColimit ((F ⋙ (evaluation K C).obj X).mapCocone c)\n[PROOFSTEP]\nexact PreservesColimit.preserves hc\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Limits.FunctorCategory", "llama_tokens": 16930, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7577943712746406, "lm_q2_score": 0.6959583187272712, "lm_q1q2_score": 0.5273932965732884}}
{"text": "[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nx : E\nhs : s ∈ 𝓝 x\n⊢ ∃ f, tsupport f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 ∧ f x = 1\n[PROOFSTEP]\nobtain ⟨d : ℝ, d_pos : 0 < d, hd : Euclidean.closedBall x d ⊆ s⟩ := Euclidean.nhds_basis_closedBall.mem_iff.1 hs\n[GOAL]\ncase intro.intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nx : E\nhs : s ∈ 𝓝 x\nd : ℝ\nd_pos : 0 < d\nhd : Euclidean.closedBall x d ⊆ s\n⊢ ∃ f, tsupport f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 ∧ f x = 1\n[PROOFSTEP]\nlet c : ContDiffBump (toEuclidean x) :=\n  { rIn := d / 2\n    rOut := d\n    rIn_pos := half_pos d_pos\n    rIn_lt_rOut := half_lt_self d_pos }\n[GOAL]\ncase intro.intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nx : E\nhs : s ∈ 𝓝 x\nd : ℝ\nd_pos : 0 < d\nhd : Euclidean.closedBall x d ⊆ s\nc : ContDiffBump (↑toEuclidean x) :=\n  { rIn := d / 2, rOut := d, rIn_pos := (_ : 0 < d / 2), rIn_lt_rOut := (_ : d / 2 < d) }\n⊢ ∃ f, tsupport f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 ∧ f x = 1\n[PROOFSTEP]\nlet f : E → ℝ := c ∘ toEuclidean\n[GOAL]\ncase intro.intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nx : E\nhs : s ∈ 𝓝 x\nd : ℝ\nd_pos : 0 < d\nhd : Euclidean.closedBall x d ⊆ s\nc : ContDiffBump (↑toEuclidean x) :=\n  { rIn := d / 2, rOut := d, rIn_pos := (_ : 0 < d / 2), rIn_lt_rOut := (_ : d / 2 < d) }\nf : E → ℝ := ↑c ∘ ↑toEuclidean\n⊢ ∃ f, tsupport f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 ∧ f x = 1\n[PROOFSTEP]\nhave f_supp : f.support ⊆ Euclidean.ball x d := by\n  intro y hy\n  have : toEuclidean y ∈ Function.support c := by\n    simpa only [Function.mem_support, Function.comp_apply, Ne.def] using hy\n  rwa [c.support_eq] at this \n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nx : E\nhs : s ∈ 𝓝 x\nd : ℝ\nd_pos : 0 < d\nhd : Euclidean.closedBall x d ⊆ s\nc : ContDiffBump (↑toEuclidean x) :=\n  { rIn := d / 2, rOut := d, rIn_pos := (_ : 0 < d / 2), rIn_lt_rOut := (_ : d / 2 < d) }\nf : E → ℝ := ↑c ∘ ↑toEuclidean\n⊢ support f ⊆ Euclidean.ball x d\n[PROOFSTEP]\nintro y hy\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nx : E\nhs : s ∈ 𝓝 x\nd : ℝ\nd_pos : 0 < d\nhd : Euclidean.closedBall x d ⊆ s\nc : ContDiffBump (↑toEuclidean x) :=\n  { rIn := d / 2, rOut := d, rIn_pos := (_ : 0 < d / 2), rIn_lt_rOut := (_ : d / 2 < d) }\nf : E → ℝ := ↑c ∘ ↑toEuclidean\ny : E\nhy : y ∈ support f\n⊢ y ∈ Euclidean.ball x d\n[PROOFSTEP]\nhave : toEuclidean y ∈ Function.support c := by simpa only [Function.mem_support, Function.comp_apply, Ne.def] using hy\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nx : E\nhs : s ∈ 𝓝 x\nd : ℝ\nd_pos : 0 < d\nhd : Euclidean.closedBall x d ⊆ s\nc : ContDiffBump (↑toEuclidean x) :=\n  { rIn := d / 2, rOut := d, rIn_pos := (_ : 0 < d / 2), rIn_lt_rOut := (_ : d / 2 < d) }\nf : E → ℝ := ↑c ∘ ↑toEuclidean\ny : E\nhy : y ∈ support f\n⊢ ↑toEuclidean y ∈ support ↑c\n[PROOFSTEP]\nsimpa only [Function.mem_support, Function.comp_apply, Ne.def] using hy\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nx : E\nhs : s ∈ 𝓝 x\nd : ℝ\nd_pos : 0 < d\nhd : Euclidean.closedBall x d ⊆ s\nc : ContDiffBump (↑toEuclidean x) :=\n  { rIn := d / 2, rOut := d, rIn_pos := (_ : 0 < d / 2), rIn_lt_rOut := (_ : d / 2 < d) }\nf : E → ℝ := ↑c ∘ ↑toEuclidean\ny : E\nhy : y ∈ support f\nthis : ↑toEuclidean y ∈ support ↑c\n⊢ y ∈ Euclidean.ball x d\n[PROOFSTEP]\nrwa [c.support_eq] at this \n[GOAL]\ncase intro.intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nx : E\nhs : s ∈ 𝓝 x\nd : ℝ\nd_pos : 0 < d\nhd : Euclidean.closedBall x d ⊆ s\nc : ContDiffBump (↑toEuclidean x) :=\n  { rIn := d / 2, rOut := d, rIn_pos := (_ : 0 < d / 2), rIn_lt_rOut := (_ : d / 2 < d) }\nf : E → ℝ := ↑c ∘ ↑toEuclidean\nf_supp : support f ⊆ Euclidean.ball x d\n⊢ ∃ f, tsupport f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 ∧ f x = 1\n[PROOFSTEP]\nhave f_tsupp : tsupport f ⊆ Euclidean.closedBall x d :=\n  by\n  rw [tsupport, ← Euclidean.closure_ball _ d_pos.ne']\n  exact closure_mono f_supp\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nx : E\nhs : s ∈ 𝓝 x\nd : ℝ\nd_pos : 0 < d\nhd : Euclidean.closedBall x d ⊆ s\nc : ContDiffBump (↑toEuclidean x) :=\n  { rIn := d / 2, rOut := d, rIn_pos := (_ : 0 < d / 2), rIn_lt_rOut := (_ : d / 2 < d) }\nf : E → ℝ := ↑c ∘ ↑toEuclidean\nf_supp : support f ⊆ Euclidean.ball x d\n⊢ tsupport f ⊆ Euclidean.closedBall x d\n[PROOFSTEP]\nrw [tsupport, ← Euclidean.closure_ball _ d_pos.ne']\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nx : E\nhs : s ∈ 𝓝 x\nd : ℝ\nd_pos : 0 < d\nhd : Euclidean.closedBall x d ⊆ s\nc : ContDiffBump (↑toEuclidean x) :=\n  { rIn := d / 2, rOut := d, rIn_pos := (_ : 0 < d / 2), rIn_lt_rOut := (_ : d / 2 < d) }\nf : E → ℝ := ↑c ∘ ↑toEuclidean\nf_supp : support f ⊆ Euclidean.ball x d\n⊢ closure (support f) ⊆ closure (Euclidean.ball x d)\n[PROOFSTEP]\nexact closure_mono f_supp\n[GOAL]\ncase intro.intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nx : E\nhs : s ∈ 𝓝 x\nd : ℝ\nd_pos : 0 < d\nhd : Euclidean.closedBall x d ⊆ s\nc : ContDiffBump (↑toEuclidean x) :=\n  { rIn := d / 2, rOut := d, rIn_pos := (_ : 0 < d / 2), rIn_lt_rOut := (_ : d / 2 < d) }\nf : E → ℝ := ↑c ∘ ↑toEuclidean\nf_supp : support f ⊆ Euclidean.ball x d\nf_tsupp : tsupport f ⊆ Euclidean.closedBall x d\n⊢ ∃ f, tsupport f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 ∧ f x = 1\n[PROOFSTEP]\nrefine' ⟨f, f_tsupp.trans hd, _, _, _, _⟩\n[GOAL]\ncase intro.intro.refine'_1\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nx : E\nhs : s ∈ 𝓝 x\nd : ℝ\nd_pos : 0 < d\nhd : Euclidean.closedBall x d ⊆ s\nc : ContDiffBump (↑toEuclidean x) :=\n  { rIn := d / 2, rOut := d, rIn_pos := (_ : 0 < d / 2), rIn_lt_rOut := (_ : d / 2 < d) }\nf : E → ℝ := ↑c ∘ ↑toEuclidean\nf_supp : support f ⊆ Euclidean.ball x d\nf_tsupp : tsupport f ⊆ Euclidean.closedBall x d\n⊢ HasCompactSupport f\n[PROOFSTEP]\nrefine' isCompact_of_isClosed_bounded isClosed_closure _\n[GOAL]\ncase intro.intro.refine'_1\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nx : E\nhs : s ∈ 𝓝 x\nd : ℝ\nd_pos : 0 < d\nhd : Euclidean.closedBall x d ⊆ s\nc : ContDiffBump (↑toEuclidean x) :=\n  { rIn := d / 2, rOut := d, rIn_pos := (_ : 0 < d / 2), rIn_lt_rOut := (_ : d / 2 < d) }\nf : E → ℝ := ↑c ∘ ↑toEuclidean\nf_supp : support f ⊆ Euclidean.ball x d\nf_tsupp : tsupport f ⊆ Euclidean.closedBall x d\n⊢ Metric.Bounded (tsupport f)\n[PROOFSTEP]\nhave : Bounded (Euclidean.closedBall x d) := Euclidean.isCompact_closedBall.bounded\n[GOAL]\ncase intro.intro.refine'_1\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nx : E\nhs : s ∈ 𝓝 x\nd : ℝ\nd_pos : 0 < d\nhd : Euclidean.closedBall x d ⊆ s\nc : ContDiffBump (↑toEuclidean x) :=\n  { rIn := d / 2, rOut := d, rIn_pos := (_ : 0 < d / 2), rIn_lt_rOut := (_ : d / 2 < d) }\nf : E → ℝ := ↑c ∘ ↑toEuclidean\nf_supp : support f ⊆ Euclidean.ball x d\nf_tsupp : tsupport f ⊆ Euclidean.closedBall x d\nthis : Metric.Bounded (Euclidean.closedBall x d)\n⊢ Metric.Bounded (tsupport f)\n[PROOFSTEP]\napply this.mono _\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nx : E\nhs : s ∈ 𝓝 x\nd : ℝ\nd_pos : 0 < d\nhd : Euclidean.closedBall x d ⊆ s\nc : ContDiffBump (↑toEuclidean x) :=\n  { rIn := d / 2, rOut := d, rIn_pos := (_ : 0 < d / 2), rIn_lt_rOut := (_ : d / 2 < d) }\nf : E → ℝ := ↑c ∘ ↑toEuclidean\nf_supp : support f ⊆ Euclidean.ball x d\nf_tsupp : tsupport f ⊆ Euclidean.closedBall x d\nthis : Metric.Bounded (Euclidean.closedBall x d)\n⊢ tsupport f ⊆ Euclidean.closedBall x d\n[PROOFSTEP]\nrefine' (IsClosed.closure_subset_iff Euclidean.isClosed_closedBall).2 _\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nx : E\nhs : s ∈ 𝓝 x\nd : ℝ\nd_pos : 0 < d\nhd : Euclidean.closedBall x d ⊆ s\nc : ContDiffBump (↑toEuclidean x) :=\n  { rIn := d / 2, rOut := d, rIn_pos := (_ : 0 < d / 2), rIn_lt_rOut := (_ : d / 2 < d) }\nf : E → ℝ := ↑c ∘ ↑toEuclidean\nf_supp : support f ⊆ Euclidean.ball x d\nf_tsupp : tsupport f ⊆ Euclidean.closedBall x d\nthis : Metric.Bounded (Euclidean.closedBall x d)\n⊢ support f ⊆ Euclidean.closedBall x d\n[PROOFSTEP]\nexact f_supp.trans Euclidean.ball_subset_closedBall\n[GOAL]\ncase intro.intro.refine'_2\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nx : E\nhs : s ∈ 𝓝 x\nd : ℝ\nd_pos : 0 < d\nhd : Euclidean.closedBall x d ⊆ s\nc : ContDiffBump (↑toEuclidean x) :=\n  { rIn := d / 2, rOut := d, rIn_pos := (_ : 0 < d / 2), rIn_lt_rOut := (_ : d / 2 < d) }\nf : E → ℝ := ↑c ∘ ↑toEuclidean\nf_supp : support f ⊆ Euclidean.ball x d\nf_tsupp : tsupport f ⊆ Euclidean.closedBall x d\n⊢ ContDiff ℝ ⊤ f\n[PROOFSTEP]\napply c.contDiff.comp\n[GOAL]\ncase intro.intro.refine'_2\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nx : E\nhs : s ∈ 𝓝 x\nd : ℝ\nd_pos : 0 < d\nhd : Euclidean.closedBall x d ⊆ s\nc : ContDiffBump (↑toEuclidean x) :=\n  { rIn := d / 2, rOut := d, rIn_pos := (_ : 0 < d / 2), rIn_lt_rOut := (_ : d / 2 < d) }\nf : E → ℝ := ↑c ∘ ↑toEuclidean\nf_supp : support f ⊆ Euclidean.ball x d\nf_tsupp : tsupport f ⊆ Euclidean.closedBall x d\n⊢ ContDiff ℝ ⊤ ↑toEuclidean\n[PROOFSTEP]\nexact ContinuousLinearEquiv.contDiff _\n[GOAL]\ncase intro.intro.refine'_3\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nx : E\nhs : s ∈ 𝓝 x\nd : ℝ\nd_pos : 0 < d\nhd : Euclidean.closedBall x d ⊆ s\nc : ContDiffBump (↑toEuclidean x) :=\n  { rIn := d / 2, rOut := d, rIn_pos := (_ : 0 < d / 2), rIn_lt_rOut := (_ : d / 2 < d) }\nf : E → ℝ := ↑c ∘ ↑toEuclidean\nf_supp : support f ⊆ Euclidean.ball x d\nf_tsupp : tsupport f ⊆ Euclidean.closedBall x d\n⊢ range f ⊆ Icc 0 1\n[PROOFSTEP]\nrintro t ⟨y, rfl⟩\n[GOAL]\ncase intro.intro.refine'_3.intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nx : E\nhs : s ∈ 𝓝 x\nd : ℝ\nd_pos : 0 < d\nhd : Euclidean.closedBall x d ⊆ s\nc : ContDiffBump (↑toEuclidean x) :=\n  { rIn := d / 2, rOut := d, rIn_pos := (_ : 0 < d / 2), rIn_lt_rOut := (_ : d / 2 < d) }\nf : E → ℝ := ↑c ∘ ↑toEuclidean\nf_supp : support f ⊆ Euclidean.ball x d\nf_tsupp : tsupport f ⊆ Euclidean.closedBall x d\ny : E\n⊢ f y ∈ Icc 0 1\n[PROOFSTEP]\nexact ⟨c.nonneg, c.le_one⟩\n[GOAL]\ncase intro.intro.refine'_4\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nx : E\nhs : s ∈ 𝓝 x\nd : ℝ\nd_pos : 0 < d\nhd : Euclidean.closedBall x d ⊆ s\nc : ContDiffBump (↑toEuclidean x) :=\n  { rIn := d / 2, rOut := d, rIn_pos := (_ : 0 < d / 2), rIn_lt_rOut := (_ : d / 2 < d) }\nf : E → ℝ := ↑c ∘ ↑toEuclidean\nf_supp : support f ⊆ Euclidean.ball x d\nf_tsupp : tsupport f ⊆ Euclidean.closedBall x d\n⊢ f x = 1\n[PROOFSTEP]\napply c.one_of_mem_closedBall\n[GOAL]\ncase intro.intro.refine'_4\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nx : E\nhs : s ∈ 𝓝 x\nd : ℝ\nd_pos : 0 < d\nhd : Euclidean.closedBall x d ⊆ s\nc : ContDiffBump (↑toEuclidean x) :=\n  { rIn := d / 2, rOut := d, rIn_pos := (_ : 0 < d / 2), rIn_lt_rOut := (_ : d / 2 < d) }\nf : E → ℝ := ↑c ∘ ↑toEuclidean\nf_supp : support f ⊆ Euclidean.ball x d\nf_tsupp : tsupport f ⊆ Euclidean.closedBall x d\n⊢ ↑toEuclidean x ∈ closedBall (↑toEuclidean x) c.rIn\n[PROOFSTEP]\napply mem_closedBall_self\n[GOAL]\ncase intro.intro.refine'_4.h\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nx : E\nhs : s ∈ 𝓝 x\nd : ℝ\nd_pos : 0 < d\nhd : Euclidean.closedBall x d ⊆ s\nc : ContDiffBump (↑toEuclidean x) :=\n  { rIn := d / 2, rOut := d, rIn_pos := (_ : 0 < d / 2), rIn_lt_rOut := (_ : d / 2 < d) }\nf : E → ℝ := ↑c ∘ ↑toEuclidean\nf_supp : support f ⊆ Euclidean.ball x d\nf_tsupp : tsupport f ⊆ Euclidean.closedBall x d\n⊢ 0 ≤ c.rIn\n[PROOFSTEP]\nexact (half_pos d_pos).le\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\n⊢ ∃ f, support f = s ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1\n[PROOFSTEP]\nrcases eq_empty_or_nonempty s with (rfl | h's)\n[GOAL]\ncase inl\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nhs : IsOpen ∅\n⊢ ∃ f, support f = ∅ ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1\n[PROOFSTEP]\nexact\n  ⟨fun _ => 0, Function.support_zero, contDiff_const, by\n    simp only [range_const, singleton_subset_iff, left_mem_Icc, zero_le_one]⟩\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nhs : IsOpen ∅\n⊢ (range fun x => 0) ⊆ Icc 0 1\n[PROOFSTEP]\nsimp only [range_const, singleton_subset_iff, left_mem_Icc, zero_le_one]\n[GOAL]\ncase inr\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\n⊢ ∃ f, support f = s ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1\n[PROOFSTEP]\nlet ι := { f : E → ℝ // f.support ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\n[GOAL]\ncase inr\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\n⊢ ∃ f, support f = s ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1\n[PROOFSTEP]\nobtain ⟨T, T_count, hT⟩ : ∃ T : Set ι, T.Countable ∧ ⋃ f ∈ T, support (f : E → ℝ) = s :=\n  by\n  have : ⋃ f : ι, (f : E → ℝ).support = s :=\n    by\n    refine' Subset.antisymm (iUnion_subset fun f => f.2.1) _\n    intro x hx\n    rcases exists_smooth_tsupport_subset (hs.mem_nhds hx) with ⟨f, hf⟩\n    let g : ι := ⟨f, (subset_tsupport f).trans hf.1, hf.2.1, hf.2.2.1, hf.2.2.2.1⟩\n    have : x ∈ support (g : E → ℝ) := by\n      simp only [hf.2.2.2.2, Subtype.coe_mk, mem_support, Ne.def, one_ne_zero, not_false_iff]\n    exact mem_iUnion_of_mem _ this\n  simp_rw [← this]\n  apply isOpen_iUnion_countable\n  rintro ⟨f, hf⟩\n  exact hf.2.2.1.continuous.isOpen_support\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\n⊢ ∃ T, Set.Countable T ∧ ⋃ (f : ι) (_ : f ∈ T), support ↑f = s\n[PROOFSTEP]\nhave : ⋃ f : ι, (f : E → ℝ).support = s :=\n  by\n  refine' Subset.antisymm (iUnion_subset fun f => f.2.1) _\n  intro x hx\n  rcases exists_smooth_tsupport_subset (hs.mem_nhds hx) with ⟨f, hf⟩\n  let g : ι := ⟨f, (subset_tsupport f).trans hf.1, hf.2.1, hf.2.2.1, hf.2.2.2.1⟩\n  have : x ∈ support (g : E → ℝ) := by\n    simp only [hf.2.2.2.2, Subtype.coe_mk, mem_support, Ne.def, one_ne_zero, not_false_iff]\n  exact mem_iUnion_of_mem _ this\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\n⊢ ⋃ (f : ι), support ↑f = s\n[PROOFSTEP]\nrefine' Subset.antisymm (iUnion_subset fun f => f.2.1) _\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\n⊢ s ⊆ ⋃ (f : ι), support ↑f\n[PROOFSTEP]\nintro x hx\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\nx : E\nhx : x ∈ s\n⊢ x ∈ ⋃ (f : ι), support ↑f\n[PROOFSTEP]\nrcases exists_smooth_tsupport_subset (hs.mem_nhds hx) with ⟨f, hf⟩\n[GOAL]\ncase intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\nx : E\nhx : x ∈ s\nf : E → ℝ\nhf : tsupport f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 ∧ f x = 1\n⊢ x ∈ ⋃ (f : ι), support ↑f\n[PROOFSTEP]\nlet g : ι := ⟨f, (subset_tsupport f).trans hf.1, hf.2.1, hf.2.2.1, hf.2.2.2.1⟩\n[GOAL]\ncase intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\nx : E\nhx : x ∈ s\nf : E → ℝ\nhf : tsupport f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 ∧ f x = 1\ng : ι := { val := f, property := (_ : support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1) }\n⊢ x ∈ ⋃ (f : ι), support ↑f\n[PROOFSTEP]\nhave : x ∈ support (g : E → ℝ) := by\n  simp only [hf.2.2.2.2, Subtype.coe_mk, mem_support, Ne.def, one_ne_zero, not_false_iff]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\nx : E\nhx : x ∈ s\nf : E → ℝ\nhf : tsupport f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 ∧ f x = 1\ng : ι := { val := f, property := (_ : support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1) }\n⊢ x ∈ support ↑g\n[PROOFSTEP]\nsimp only [hf.2.2.2.2, Subtype.coe_mk, mem_support, Ne.def, one_ne_zero, not_false_iff]\n[GOAL]\ncase intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\nx : E\nhx : x ∈ s\nf : E → ℝ\nhf : tsupport f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 ∧ f x = 1\ng : ι := { val := f, property := (_ : support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1) }\nthis : x ∈ support ↑g\n⊢ x ∈ ⋃ (f : ι), support ↑f\n[PROOFSTEP]\nexact mem_iUnion_of_mem _ this\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\nthis : ⋃ (f : ι), support ↑f = s\n⊢ ∃ T, Set.Countable T ∧ ⋃ (f : ι) (_ : f ∈ T), support ↑f = s\n[PROOFSTEP]\nsimp_rw [← this]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\nthis : ⋃ (f : ι), support ↑f = s\n⊢ ∃ T,\n    Set.Countable T ∧\n      ⋃ (f : { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }) (_ : f ∈ T),\n          support ↑f =\n        ⋃ (f : { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }), support ↑f\n[PROOFSTEP]\napply isOpen_iUnion_countable\n[GOAL]\ncase H\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\nthis : ⋃ (f : ι), support ↑f = s\n⊢ ∀ (i : { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }), IsOpen (support ↑i)\n[PROOFSTEP]\nrintro ⟨f, hf⟩\n[GOAL]\ncase H.mk\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\nthis : ⋃ (f : ι), support ↑f = s\nf : E → ℝ\nhf : support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1\n⊢ IsOpen (support ↑{ val := f, property := hf })\n[PROOFSTEP]\nexact hf.2.2.1.continuous.isOpen_support\n[GOAL]\ncase inr.intro.intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\nT : Set ι\nT_count : Set.Countable T\nhT : ⋃ (f : ι) (_ : f ∈ T), support ↑f = s\n⊢ ∃ f, support f = s ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1\n[PROOFSTEP]\nobtain ⟨g0, hg⟩ : ∃ g0 : ℕ → ι, T = range g0 :=\n  by\n  apply Countable.exists_eq_range T_count\n  rcases eq_empty_or_nonempty T with (rfl | hT)\n  · simp only [iUnion_false, iUnion_empty] at hT \n    simp only [← hT, mem_empty_iff_false, iUnion_of_empty, iUnion_empty, Set.not_nonempty_empty] at h's \n  · exact hT\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\nT : Set ι\nT_count : Set.Countable T\nhT : ⋃ (f : ι) (_ : f ∈ T), support ↑f = s\n⊢ ∃ g0, T = range g0\n[PROOFSTEP]\napply Countable.exists_eq_range T_count\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\nT : Set ι\nT_count : Set.Countable T\nhT : ⋃ (f : ι) (_ : f ∈ T), support ↑f = s\n⊢ Set.Nonempty T\n[PROOFSTEP]\nrcases eq_empty_or_nonempty T with (rfl | hT)\n[GOAL]\ncase inl\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\nT_count : Set.Countable ∅\nhT : ⋃ (f : ι) (_ : f ∈ ∅), support ↑f = s\n⊢ Set.Nonempty ∅\n[PROOFSTEP]\nsimp only [iUnion_false, iUnion_empty] at hT \n[GOAL]\ncase inl\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\nT_count : Set.Countable ∅\nhT :\n  ⋃ (f : { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }) (_ : f ∈ ∅), support ↑f = s\n⊢ Set.Nonempty ∅\n[PROOFSTEP]\nsimp only [← hT, mem_empty_iff_false, iUnion_of_empty, iUnion_empty, Set.not_nonempty_empty] at h's \n[GOAL]\ncase inr\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\nT : Set ι\nT_count : Set.Countable T\nhT✝ : ⋃ (f : ι) (_ : f ∈ T), support ↑f = s\nhT : Set.Nonempty T\n⊢ Set.Nonempty T\n[PROOFSTEP]\nexact hT\n[GOAL]\ncase inr.intro.intro.intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\nT : Set ι\nT_count : Set.Countable T\nhT : ⋃ (f : ι) (_ : f ∈ T), support ↑f = s\ng0 : ℕ → ι\nhg : T = range g0\n⊢ ∃ f, support f = s ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1\n[PROOFSTEP]\nlet g : ℕ → E → ℝ := fun n => (g0 n).1\n[GOAL]\ncase inr.intro.intro.intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\nT : Set ι\nT_count : Set.Countable T\nhT : ⋃ (f : ι) (_ : f ∈ T), support ↑f = s\ng0 : ℕ → ι\nhg : T = range g0\ng : ℕ → E → ℝ := fun n => ↑(g0 n)\n⊢ ∃ f, support f = s ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1\n[PROOFSTEP]\nhave g_s : ∀ n, support (g n) ⊆ s := fun n => (g0 n).2.1\n[GOAL]\ncase inr.intro.intro.intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\nT : Set ι\nT_count : Set.Countable T\nhT : ⋃ (f : ι) (_ : f ∈ T), support ↑f = s\ng0 : ℕ → ι\nhg : T = range g0\ng : ℕ → E → ℝ := fun n => ↑(g0 n)\ng_s : ∀ (n : ℕ), support (g n) ⊆ s\n⊢ ∃ f, support f = s ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1\n[PROOFSTEP]\nhave s_g : ∀ x ∈ s, ∃ n, x ∈ support (g n) := by\n  intro x hx\n  rw [← hT] at hx \n  obtain ⟨i, iT, hi⟩ : ∃ (i : ι) (_ : i ∈ T), x ∈ support (i : E → ℝ) := by simpa only [mem_iUnion] using hx\n  rw [hg, mem_range] at iT \n  rcases iT with ⟨n, hn⟩\n  rw [← hn] at hi \n  exact ⟨n, hi⟩\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\nT : Set ι\nT_count : Set.Countable T\nhT : ⋃ (f : ι) (_ : f ∈ T), support ↑f = s\ng0 : ℕ → ι\nhg : T = range g0\ng : ℕ → E → ℝ := fun n => ↑(g0 n)\ng_s : ∀ (n : ℕ), support (g n) ⊆ s\n⊢ ∀ (x : E), x ∈ s → ∃ n, x ∈ support (g n)\n[PROOFSTEP]\nintro x hx\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\nT : Set ι\nT_count : Set.Countable T\nhT : ⋃ (f : ι) (_ : f ∈ T), support ↑f = s\ng0 : ℕ → ι\nhg : T = range g0\ng : ℕ → E → ℝ := fun n => ↑(g0 n)\ng_s : ∀ (n : ℕ), support (g n) ⊆ s\nx : E\nhx : x ∈ s\n⊢ ∃ n, x ∈ support (g n)\n[PROOFSTEP]\nrw [← hT] at hx \n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\nT : Set ι\nT_count : Set.Countable T\nhT : ⋃ (f : ι) (_ : f ∈ T), support ↑f = s\ng0 : ℕ → ι\nhg : T = range g0\ng : ℕ → E → ℝ := fun n => ↑(g0 n)\ng_s : ∀ (n : ℕ), support (g n) ⊆ s\nx : E\nhx : x ∈ ⋃ (f : ι) (_ : f ∈ T), support ↑f\n⊢ ∃ n, x ∈ support (g n)\n[PROOFSTEP]\nobtain ⟨i, iT, hi⟩ : ∃ (i : ι) (_ : i ∈ T), x ∈ support (i : E → ℝ) := by simpa only [mem_iUnion] using hx\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\nT : Set ι\nT_count : Set.Countable T\nhT : ⋃ (f : ι) (_ : f ∈ T), support ↑f = s\ng0 : ℕ → ι\nhg : T = range g0\ng : ℕ → E → ℝ := fun n => ↑(g0 n)\ng_s : ∀ (n : ℕ), support (g n) ⊆ s\nx : E\nhx : x ∈ ⋃ (f : ι) (_ : f ∈ T), support ↑f\n⊢ ∃ i x_1, x ∈ support ↑i\n[PROOFSTEP]\nsimpa only [mem_iUnion] using hx\n[GOAL]\ncase intro.intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\nT : Set ι\nT_count : Set.Countable T\nhT : ⋃ (f : ι) (_ : f ∈ T), support ↑f = s\ng0 : ℕ → ι\nhg : T = range g0\ng : ℕ → E → ℝ := fun n => ↑(g0 n)\ng_s : ∀ (n : ℕ), support (g n) ⊆ s\nx : E\nhx : x ∈ ⋃ (f : ι) (_ : f ∈ T), support ↑f\ni : ι\niT : i ∈ T\nhi : x ∈ support ↑i\n⊢ ∃ n, x ∈ support (g n)\n[PROOFSTEP]\nrw [hg, mem_range] at iT \n[GOAL]\ncase intro.intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\nT : Set ι\nT_count : Set.Countable T\nhT : ⋃ (f : ι) (_ : f ∈ T), support ↑f = s\ng0 : ℕ → ι\nhg : T = range g0\ng : ℕ → E → ℝ := fun n => ↑(g0 n)\ng_s : ∀ (n : ℕ), support (g n) ⊆ s\nx : E\nhx : x ∈ ⋃ (f : ι) (_ : f ∈ T), support ↑f\ni : ι\niT : ∃ y, g0 y = i\nhi : x ∈ support ↑i\n⊢ ∃ n, x ∈ support (g n)\n[PROOFSTEP]\nrcases iT with ⟨n, hn⟩\n[GOAL]\ncase intro.intro.intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\nT : Set ι\nT_count : Set.Countable T\nhT : ⋃ (f : ι) (_ : f ∈ T), support ↑f = s\ng0 : ℕ → ι\nhg : T = range g0\ng : ℕ → E → ℝ := fun n => ↑(g0 n)\ng_s : ∀ (n : ℕ), support (g n) ⊆ s\nx : E\nhx : x ∈ ⋃ (f : ι) (_ : f ∈ T), support ↑f\ni : ι\nhi : x ∈ support ↑i\nn : ℕ\nhn : g0 n = i\n⊢ ∃ n, x ∈ support (g n)\n[PROOFSTEP]\nrw [← hn] at hi \n[GOAL]\ncase intro.intro.intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\nT : Set ι\nT_count : Set.Countable T\nhT : ⋃ (f : ι) (_ : f ∈ T), support ↑f = s\ng0 : ℕ → ι\nhg : T = range g0\ng : ℕ → E → ℝ := fun n => ↑(g0 n)\ng_s : ∀ (n : ℕ), support (g n) ⊆ s\nx : E\nhx : x ∈ ⋃ (f : ι) (_ : f ∈ T), support ↑f\ni : ι\nn : ℕ\nhi : x ∈ support ↑(g0 n)\nhn : g0 n = i\n⊢ ∃ n, x ∈ support (g n)\n[PROOFSTEP]\nexact ⟨n, hi⟩\n[GOAL]\ncase inr.intro.intro.intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\nT : Set ι\nT_count : Set.Countable T\nhT : ⋃ (f : ι) (_ : f ∈ T), support ↑f = s\ng0 : ℕ → ι\nhg : T = range g0\ng : ℕ → E → ℝ := fun n => ↑(g0 n)\ng_s : ∀ (n : ℕ), support (g n) ⊆ s\ns_g : ∀ (x : E), x ∈ s → ∃ n, x ∈ support (g n)\n⊢ ∃ f, support f = s ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1\n[PROOFSTEP]\nhave g_smooth : ∀ n, ContDiff ℝ ⊤ (g n) := fun n => (g0 n).2.2.2.1\n[GOAL]\ncase inr.intro.intro.intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\nT : Set ι\nT_count : Set.Countable T\nhT : ⋃ (f : ι) (_ : f ∈ T), support ↑f = s\ng0 : ℕ → ι\nhg : T = range g0\ng : ℕ → E → ℝ := fun n => ↑(g0 n)\ng_s : ∀ (n : ℕ), support (g n) ⊆ s\ns_g : ∀ (x : E), x ∈ s → ∃ n, x ∈ support (g n)\ng_smooth : ∀ (n : ℕ), ContDiff ℝ ⊤ (g n)\n⊢ ∃ f, support f = s ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1\n[PROOFSTEP]\nhave g_comp_supp : ∀ n, HasCompactSupport (g n) := fun n => (g0 n).2.2.1\n[GOAL]\ncase inr.intro.intro.intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\nT : Set ι\nT_count : Set.Countable T\nhT : ⋃ (f : ι) (_ : f ∈ T), support ↑f = s\ng0 : ℕ → ι\nhg : T = range g0\ng : ℕ → E → ℝ := fun n => ↑(g0 n)\ng_s : ∀ (n : ℕ), support (g n) ⊆ s\ns_g : ∀ (x : E), x ∈ s → ∃ n, x ∈ support (g n)\ng_smooth : ∀ (n : ℕ), ContDiff ℝ ⊤ (g n)\ng_comp_supp : ∀ (n : ℕ), HasCompactSupport (g n)\n⊢ ∃ f, support f = s ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1\n[PROOFSTEP]\nhave g_nonneg : ∀ n x, 0 ≤ g n x := fun n x => ((g0 n).2.2.2.2 (mem_range_self x)).1\n[GOAL]\ncase inr.intro.intro.intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\nT : Set ι\nT_count : Set.Countable T\nhT : ⋃ (f : ι) (_ : f ∈ T), support ↑f = s\ng0 : ℕ → ι\nhg : T = range g0\ng : ℕ → E → ℝ := fun n => ↑(g0 n)\ng_s : ∀ (n : ℕ), support (g n) ⊆ s\ns_g : ∀ (x : E), x ∈ s → ∃ n, x ∈ support (g n)\ng_smooth : ∀ (n : ℕ), ContDiff ℝ ⊤ (g n)\ng_comp_supp : ∀ (n : ℕ), HasCompactSupport (g n)\ng_nonneg : ∀ (n : ℕ) (x : E), 0 ≤ g n x\n⊢ ∃ f, support f = s ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1\n[PROOFSTEP]\nobtain ⟨δ, δpos, c, δc, c_lt⟩ : ∃ δ : ℕ → ℝ≥0, (∀ i : ℕ, 0 < δ i) ∧ ∃ c : NNReal, HasSum δ c ∧ c < 1\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\nT : Set ι\nT_count : Set.Countable T\nhT : ⋃ (f : ι) (_ : f ∈ T), support ↑f = s\ng0 : ℕ → ι\nhg : T = range g0\ng : ℕ → E → ℝ := fun n => ↑(g0 n)\ng_s : ∀ (n : ℕ), support (g n) ⊆ s\ns_g : ∀ (x : E), x ∈ s → ∃ n, x ∈ support (g n)\ng_smooth : ∀ (n : ℕ), ContDiff ℝ ⊤ (g n)\ng_comp_supp : ∀ (n : ℕ), HasCompactSupport (g n)\ng_nonneg : ∀ (n : ℕ) (x : E), 0 ≤ g n x\n⊢ ∃ δ, (∀ (i : ℕ), 0 < δ i) ∧ ∃ c, HasSum δ c ∧ c < 1\ncase inr.intro.intro.intro.intro.intro.intro.intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\nT : Set ι\nT_count : Set.Countable T\nhT : ⋃ (f : ι) (_ : f ∈ T), support ↑f = s\ng0 : ℕ → ι\nhg : T = range g0\ng : ℕ → E → ℝ := fun n => ↑(g0 n)\ng_s : ∀ (n : ℕ), support (g n) ⊆ s\ns_g : ∀ (x : E), x ∈ s → ∃ n, x ∈ support (g n)\ng_smooth : ∀ (n : ℕ), ContDiff ℝ ⊤ (g n)\ng_comp_supp : ∀ (n : ℕ), HasCompactSupport (g n)\ng_nonneg : ∀ (n : ℕ) (x : E), 0 ≤ g n x\nδ : ℕ → ℝ≥0\nδpos : ∀ (i : ℕ), 0 < δ i\nc : ℝ≥0\nδc : HasSum δ c\nc_lt : c < 1\n⊢ ∃ f, support f = s ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1\n[PROOFSTEP]\nexact NNReal.exists_pos_sum_of_countable one_ne_zero ℕ\n[GOAL]\ncase inr.intro.intro.intro.intro.intro.intro.intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\nT : Set ι\nT_count : Set.Countable T\nhT : ⋃ (f : ι) (_ : f ∈ T), support ↑f = s\ng0 : ℕ → ι\nhg : T = range g0\ng : ℕ → E → ℝ := fun n => ↑(g0 n)\ng_s : ∀ (n : ℕ), support (g n) ⊆ s\ns_g : ∀ (x : E), x ∈ s → ∃ n, x ∈ support (g n)\ng_smooth : ∀ (n : ℕ), ContDiff ℝ ⊤ (g n)\ng_comp_supp : ∀ (n : ℕ), HasCompactSupport (g n)\ng_nonneg : ∀ (n : ℕ) (x : E), 0 ≤ g n x\nδ : ℕ → ℝ≥0\nδpos : ∀ (i : ℕ), 0 < δ i\nc : ℝ≥0\nδc : HasSum δ c\nc_lt : c < 1\n⊢ ∃ f, support f = s ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1\n[PROOFSTEP]\nhave : ∀ n : ℕ, ∃ r : ℝ, 0 < r ∧ ∀ i ≤ n, ∀ x, ‖iteratedFDeriv ℝ i (r • g n) x‖ ≤ δ n :=\n  by\n  intro n\n  have : ∀ i, ∃ R, ∀ x, ‖iteratedFDeriv ℝ i (fun x => g n x) x‖ ≤ R :=\n    by\n    intro i\n    have : BddAbove (range fun x => ‖iteratedFDeriv ℝ i (fun x : E => g n x) x‖) :=\n      by\n      apply ((g_smooth n).continuous_iteratedFDeriv le_top).norm.bddAbove_range_of_hasCompactSupport\n      apply HasCompactSupport.comp_left _ norm_zero\n      apply (g_comp_supp n).iteratedFDeriv\n    rcases this with ⟨R, hR⟩\n    exact ⟨R, fun x => hR (mem_range_self _)⟩\n  choose R hR using this\n  let M := max (((Finset.range (n + 1)).image R).max' (by simp)) 1\n  have M_pos : 0 < M := zero_lt_one.trans_le (le_max_right _ _)\n  have δnpos : 0 < δ n := δpos n\n  have IR : ∀ i ≤ n, R i ≤ M := by\n    intro i hi\n    refine' le_trans _ (le_max_left _ _)\n    apply Finset.le_max'\n    apply Finset.mem_image_of_mem\n    simpa only [Finset.mem_range, Nat.lt_add_one_iff]\n  refine' ⟨M⁻¹ * δ n, by positivity, fun i hi x => _⟩\n  calc\n    ‖iteratedFDeriv ℝ i ((M⁻¹ * δ n) • g n) x‖ = ‖(M⁻¹ * δ n) • iteratedFDeriv ℝ i (g n) x‖ := by\n      rw [iteratedFDeriv_const_smul_apply]; exact (g_smooth n).of_le le_top\n    _ = M⁻¹ * δ n * ‖iteratedFDeriv ℝ i (g n) x‖ := by rw [norm_smul, Real.norm_of_nonneg]; positivity\n    _ ≤ M⁻¹ * δ n * M := (mul_le_mul_of_nonneg_left ((hR i x).trans (IR i hi)) (by positivity))\n    _ = δ n := by field_simp [M_pos.ne']\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\nT : Set ι\nT_count : Set.Countable T\nhT : ⋃ (f : ι) (_ : f ∈ T), support ↑f = s\ng0 : ℕ → ι\nhg : T = range g0\ng : ℕ → E → ℝ := fun n => ↑(g0 n)\ng_s : ∀ (n : ℕ), support (g n) ⊆ s\ns_g : ∀ (x : E), x ∈ s → ∃ n, x ∈ support (g n)\ng_smooth : ∀ (n : ℕ), ContDiff ℝ ⊤ (g n)\ng_comp_supp : ∀ (n : ℕ), HasCompactSupport (g n)\ng_nonneg : ∀ (n : ℕ) (x : E), 0 ≤ g n x\nδ : ℕ → ℝ≥0\nδpos : ∀ (i : ℕ), 0 < δ i\nc : ℝ≥0\nδc : HasSum δ c\nc_lt : c < 1\n⊢ ∀ (n : ℕ), ∃ r, 0 < r ∧ ∀ (i : ℕ), i ≤ n → ∀ (x : E), ‖iteratedFDeriv ℝ i (r • g n) x‖ ≤ ↑(δ n)\n[PROOFSTEP]\nintro n\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\nT : Set ι\nT_count : Set.Countable T\nhT : ⋃ (f : ι) (_ : f ∈ T), support ↑f = s\ng0 : ℕ → ι\nhg : T = range g0\ng : ℕ → E → ℝ := fun n => ↑(g0 n)\ng_s : ∀ (n : ℕ), support (g n) ⊆ s\ns_g : ∀ (x : E), x ∈ s → ∃ n, x ∈ support (g n)\ng_smooth : ∀ (n : ℕ), ContDiff ℝ ⊤ (g n)\ng_comp_supp : ∀ (n : ℕ), HasCompactSupport (g n)\ng_nonneg : ∀ (n : ℕ) (x : E), 0 ≤ g n x\nδ : ℕ → ℝ≥0\nδpos : ∀ (i : ℕ), 0 < δ i\nc : ℝ≥0\nδc : HasSum δ c\nc_lt : c < 1\nn : ℕ\n⊢ ∃ r, 0 < r ∧ ∀ (i : ℕ), i ≤ n → ∀ (x : E), ‖iteratedFDeriv ℝ i (r • g n) x‖ ≤ ↑(δ n)\n[PROOFSTEP]\nhave : ∀ i, ∃ R, ∀ x, ‖iteratedFDeriv ℝ i (fun x => g n x) x‖ ≤ R :=\n  by\n  intro i\n  have : BddAbove (range fun x => ‖iteratedFDeriv ℝ i (fun x : E => g n x) x‖) :=\n    by\n    apply ((g_smooth n).continuous_iteratedFDeriv le_top).norm.bddAbove_range_of_hasCompactSupport\n    apply HasCompactSupport.comp_left _ norm_zero\n    apply (g_comp_supp n).iteratedFDeriv\n  rcases this with ⟨R, hR⟩\n  exact ⟨R, fun x => hR (mem_range_self _)⟩\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\nT : Set ι\nT_count : Set.Countable T\nhT : ⋃ (f : ι) (_ : f ∈ T), support ↑f = s\ng0 : ℕ → ι\nhg : T = range g0\ng : ℕ → E → ℝ := fun n => ↑(g0 n)\ng_s : ∀ (n : ℕ), support (g n) ⊆ s\ns_g : ∀ (x : E), x ∈ s → ∃ n, x ∈ support (g n)\ng_smooth : ∀ (n : ℕ), ContDiff ℝ ⊤ (g n)\ng_comp_supp : ∀ (n : ℕ), HasCompactSupport (g n)\ng_nonneg : ∀ (n : ℕ) (x : E), 0 ≤ g n x\nδ : ℕ → ℝ≥0\nδpos : ∀ (i : ℕ), 0 < δ i\nc : ℝ≥0\nδc : HasSum δ c\nc_lt : c < 1\nn : ℕ\n⊢ ∀ (i : ℕ), ∃ R, ∀ (x : E), ‖iteratedFDeriv ℝ i (fun x => g n x) x‖ ≤ R\n[PROOFSTEP]\nintro i\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\nT : Set ι\nT_count : Set.Countable T\nhT : ⋃ (f : ι) (_ : f ∈ T), support ↑f = s\ng0 : ℕ → ι\nhg : T = range g0\ng : ℕ → E → ℝ := fun n => ↑(g0 n)\ng_s : ∀ (n : ℕ), support (g n) ⊆ s\ns_g : ∀ (x : E), x ∈ s → ∃ n, x ∈ support (g n)\ng_smooth : ∀ (n : ℕ), ContDiff ℝ ⊤ (g n)\ng_comp_supp : ∀ (n : ℕ), HasCompactSupport (g n)\ng_nonneg : ∀ (n : ℕ) (x : E), 0 ≤ g n x\nδ : ℕ → ℝ≥0\nδpos : ∀ (i : ℕ), 0 < δ i\nc : ℝ≥0\nδc : HasSum δ c\nc_lt : c < 1\nn i : ℕ\n⊢ ∃ R, ∀ (x : E), ‖iteratedFDeriv ℝ i (fun x => g n x) x‖ ≤ R\n[PROOFSTEP]\nhave : BddAbove (range fun x => ‖iteratedFDeriv ℝ i (fun x : E => g n x) x‖) :=\n  by\n  apply ((g_smooth n).continuous_iteratedFDeriv le_top).norm.bddAbove_range_of_hasCompactSupport\n  apply HasCompactSupport.comp_left _ norm_zero\n  apply (g_comp_supp n).iteratedFDeriv\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\nT : Set ι\nT_count : Set.Countable T\nhT : ⋃ (f : ι) (_ : f ∈ T), support ↑f = s\ng0 : ℕ → ι\nhg : T = range g0\ng : ℕ → E → ℝ := fun n => ↑(g0 n)\ng_s : ∀ (n : ℕ), support (g n) ⊆ s\ns_g : ∀ (x : E), x ∈ s → ∃ n, x ∈ support (g n)\ng_smooth : ∀ (n : ℕ), ContDiff ℝ ⊤ (g n)\ng_comp_supp : ∀ (n : ℕ), HasCompactSupport (g n)\ng_nonneg : ∀ (n : ℕ) (x : E), 0 ≤ g n x\nδ : ℕ → ℝ≥0\nδpos : ∀ (i : ℕ), 0 < δ i\nc : ℝ≥0\nδc : HasSum δ c\nc_lt : c < 1\nn i : ℕ\n⊢ BddAbove (range fun x => ‖iteratedFDeriv ℝ i (fun x => g n x) x‖)\n[PROOFSTEP]\napply ((g_smooth n).continuous_iteratedFDeriv le_top).norm.bddAbove_range_of_hasCompactSupport\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\nT : Set ι\nT_count : Set.Countable T\nhT : ⋃ (f : ι) (_ : f ∈ T), support ↑f = s\ng0 : ℕ → ι\nhg : T = range g0\ng : ℕ → E → ℝ := fun n => ↑(g0 n)\ng_s : ∀ (n : ℕ), support (g n) ⊆ s\ns_g : ∀ (x : E), x ∈ s → ∃ n, x ∈ support (g n)\ng_smooth : ∀ (n : ℕ), ContDiff ℝ ⊤ (g n)\ng_comp_supp : ∀ (n : ℕ), HasCompactSupport (g n)\ng_nonneg : ∀ (n : ℕ) (x : E), 0 ≤ g n x\nδ : ℕ → ℝ≥0\nδpos : ∀ (i : ℕ), 0 < δ i\nc : ℝ≥0\nδc : HasSum δ c\nc_lt : c < 1\nn i : ℕ\n⊢ HasCompactSupport fun x => ‖iteratedFDeriv ℝ i (g n) x‖\n[PROOFSTEP]\napply HasCompactSupport.comp_left _ norm_zero\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\nT : Set ι\nT_count : Set.Countable T\nhT : ⋃ (f : ι) (_ : f ∈ T), support ↑f = s\ng0 : ℕ → ι\nhg : T = range g0\ng : ℕ → E → ℝ := fun n => ↑(g0 n)\ng_s : ∀ (n : ℕ), support (g n) ⊆ s\ns_g : ∀ (x : E), x ∈ s → ∃ n, x ∈ support (g n)\ng_smooth : ∀ (n : ℕ), ContDiff ℝ ⊤ (g n)\ng_comp_supp : ∀ (n : ℕ), HasCompactSupport (g n)\ng_nonneg : ∀ (n : ℕ) (x : E), 0 ≤ g n x\nδ : ℕ → ℝ≥0\nδpos : ∀ (i : ℕ), 0 < δ i\nc : ℝ≥0\nδc : HasSum δ c\nc_lt : c < 1\nn i : ℕ\n⊢ HasCompactSupport fun x => iteratedFDeriv ℝ i (g n) x\n[PROOFSTEP]\napply (g_comp_supp n).iteratedFDeriv\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\nT : Set ι\nT_count : Set.Countable T\nhT : ⋃ (f : ι) (_ : f ∈ T), support ↑f = s\ng0 : ℕ → ι\nhg : T = range g0\ng : ℕ → E → ℝ := fun n => ↑(g0 n)\ng_s : ∀ (n : ℕ), support (g n) ⊆ s\ns_g : ∀ (x : E), x ∈ s → ∃ n, x ∈ support (g n)\ng_smooth : ∀ (n : ℕ), ContDiff ℝ ⊤ (g n)\ng_comp_supp : ∀ (n : ℕ), HasCompactSupport (g n)\ng_nonneg : ∀ (n : ℕ) (x : E), 0 ≤ g n x\nδ : ℕ → ℝ≥0\nδpos : ∀ (i : ℕ), 0 < δ i\nc : ℝ≥0\nδc : HasSum δ c\nc_lt : c < 1\nn i : ℕ\nthis : BddAbove (range fun x => ‖iteratedFDeriv ℝ i (fun x => g n x) x‖)\n⊢ ∃ R, ∀ (x : E), ‖iteratedFDeriv ℝ i (fun x => g n x) x‖ ≤ R\n[PROOFSTEP]\nrcases this with ⟨R, hR⟩\n[GOAL]\ncase intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\nT : Set ι\nT_count : Set.Countable T\nhT : ⋃ (f : ι) (_ : f ∈ T), support ↑f = s\ng0 : ℕ → ι\nhg : T = range g0\ng : ℕ → E → ℝ := fun n => ↑(g0 n)\ng_s : ∀ (n : ℕ), support (g n) ⊆ s\ns_g : ∀ (x : E), x ∈ s → ∃ n, x ∈ support (g n)\ng_smooth : ∀ (n : ℕ), ContDiff ℝ ⊤ (g n)\ng_comp_supp : ∀ (n : ℕ), HasCompactSupport (g n)\ng_nonneg : ∀ (n : ℕ) (x : E), 0 ≤ g n x\nδ : ℕ → ℝ≥0\nδpos : ∀ (i : ℕ), 0 < δ i\nc : ℝ≥0\nδc : HasSum δ c\nc_lt : c < 1\nn i : ℕ\nR : ℝ\nhR : R ∈ upperBounds (range fun x => ‖iteratedFDeriv ℝ i (fun x => g n x) x‖)\n⊢ ∃ R, ∀ (x : E), ‖iteratedFDeriv ℝ i (fun x => g n x) x‖ ≤ R\n[PROOFSTEP]\nexact ⟨R, fun x => hR (mem_range_self _)⟩\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\nT : Set ι\nT_count : Set.Countable T\nhT : ⋃ (f : ι) (_ : f ∈ T), support ↑f = s\ng0 : ℕ → ι\nhg : T = range g0\ng : ℕ → E → ℝ := fun n => ↑(g0 n)\ng_s : ∀ (n : ℕ), support (g n) ⊆ s\ns_g : ∀ (x : E), x ∈ s → ∃ n, x ∈ support (g n)\ng_smooth : ∀ (n : ℕ), ContDiff ℝ ⊤ (g n)\ng_comp_supp : ∀ (n : ℕ), HasCompactSupport (g n)\ng_nonneg : ∀ (n : ℕ) (x : E), 0 ≤ g n x\nδ : ℕ → ℝ≥0\nδpos : ∀ (i : ℕ), 0 < δ i\nc : ℝ≥0\nδc : HasSum δ c\nc_lt : c < 1\nn : ℕ\nthis : ∀ (i : ℕ), ∃ R, ∀ (x : E), ‖iteratedFDeriv ℝ i (fun x => g n x) x‖ ≤ R\n⊢ ∃ r, 0 < r ∧ ∀ (i : ℕ), i ≤ n → ∀ (x : E), ‖iteratedFDeriv ℝ i (r • g n) x‖ ≤ ↑(δ n)\n[PROOFSTEP]\nchoose R hR using this\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\nT : Set ι\nT_count : Set.Countable T\nhT : ⋃ (f : ι) (_ : f ∈ T), support ↑f = s\ng0 : ℕ → ι\nhg : T = range g0\ng : ℕ → E → ℝ := fun n => ↑(g0 n)\ng_s : ∀ (n : ℕ), support (g n) ⊆ s\ns_g : ∀ (x : E), x ∈ s → ∃ n, x ∈ support (g n)\ng_smooth : ∀ (n : ℕ), ContDiff ℝ ⊤ (g n)\ng_comp_supp : ∀ (n : ℕ), HasCompactSupport (g n)\ng_nonneg : ∀ (n : ℕ) (x : E), 0 ≤ g n x\nδ : ℕ → ℝ≥0\nδpos : ∀ (i : ℕ), 0 < δ i\nc : ℝ≥0\nδc : HasSum δ c\nc_lt : c < 1\nn : ℕ\nR : ℕ → ℝ\nhR : ∀ (i : ℕ) (x : E), ‖iteratedFDeriv ℝ i (fun x => g n x) x‖ ≤ R i\n⊢ ∃ r, 0 < r ∧ ∀ (i : ℕ), i ≤ n → ∀ (x : E), ‖iteratedFDeriv ℝ i (r • g n) x‖ ≤ ↑(δ n)\n[PROOFSTEP]\nlet M := max (((Finset.range (n + 1)).image R).max' (by simp)) 1\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\nT : Set ι\nT_count : Set.Countable T\nhT : ⋃ (f : ι) (_ : f ∈ T), support ↑f = s\ng0 : ℕ → ι\nhg : T = range g0\ng : ℕ → E → ℝ := fun n => ↑(g0 n)\ng_s : ∀ (n : ℕ), support (g n) ⊆ s\ns_g : ∀ (x : E), x ∈ s → ∃ n, x ∈ support (g n)\ng_smooth : ∀ (n : ℕ), ContDiff ℝ ⊤ (g n)\ng_comp_supp : ∀ (n : ℕ), HasCompactSupport (g n)\ng_nonneg : ∀ (n : ℕ) (x : E), 0 ≤ g n x\nδ : ℕ → ℝ≥0\nδpos : ∀ (i : ℕ), 0 < δ i\nc : ℝ≥0\nδc : HasSum δ c\nc_lt : c < 1\nn : ℕ\nR : ℕ → ℝ\nhR : ∀ (i : ℕ) (x : E), ‖iteratedFDeriv ℝ i (fun x => g n x) x‖ ≤ R i\n⊢ Finset.Nonempty (Finset.image R (Finset.range (n + 1)))\n[PROOFSTEP]\nsimp\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\nT : Set ι\nT_count : Set.Countable T\nhT : ⋃ (f : ι) (_ : f ∈ T), support ↑f = s\ng0 : ℕ → ι\nhg : T = range g0\ng : ℕ → E → ℝ := fun n => ↑(g0 n)\ng_s : ∀ (n : ℕ), support (g n) ⊆ s\ns_g : ∀ (x : E), x ∈ s → ∃ n, x ∈ support (g n)\ng_smooth : ∀ (n : ℕ), ContDiff ℝ ⊤ (g n)\ng_comp_supp : ∀ (n : ℕ), HasCompactSupport (g n)\ng_nonneg : ∀ (n : ℕ) (x : E), 0 ≤ g n x\nδ : ℕ → ℝ≥0\nδpos : ∀ (i : ℕ), 0 < δ i\nc : ℝ≥0\nδc : HasSum δ c\nc_lt : c < 1\nn : ℕ\nR : ℕ → ℝ\nhR : ∀ (i : ℕ) (x : E), ‖iteratedFDeriv ℝ i (fun x => g n x) x‖ ≤ R i\nM : ℝ :=\n  max\n    (Finset.max' (Finset.image R (Finset.range (n + 1))) (_ : Finset.Nonempty (Finset.image R (Finset.range (n + 1)))))\n    1\n⊢ ∃ r, 0 < r ∧ ∀ (i : ℕ), i ≤ n → ∀ (x : E), ‖iteratedFDeriv ℝ i (r • g n) x‖ ≤ ↑(δ n)\n[PROOFSTEP]\nhave M_pos : 0 < M := zero_lt_one.trans_le (le_max_right _ _)\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\nT : Set ι\nT_count : Set.Countable T\nhT : ⋃ (f : ι) (_ : f ∈ T), support ↑f = s\ng0 : ℕ → ι\nhg : T = range g0\ng : ℕ → E → ℝ := fun n => ↑(g0 n)\ng_s : ∀ (n : ℕ), support (g n) ⊆ s\ns_g : ∀ (x : E), x ∈ s → ∃ n, x ∈ support (g n)\ng_smooth : ∀ (n : ℕ), ContDiff ℝ ⊤ (g n)\ng_comp_supp : ∀ (n : ℕ), HasCompactSupport (g n)\ng_nonneg : ∀ (n : ℕ) (x : E), 0 ≤ g n x\nδ : ℕ → ℝ≥0\nδpos : ∀ (i : ℕ), 0 < δ i\nc : ℝ≥0\nδc : HasSum δ c\nc_lt : c < 1\nn : ℕ\nR : ℕ → ℝ\nhR : ∀ (i : ℕ) (x : E), ‖iteratedFDeriv ℝ i (fun x => g n x) x‖ ≤ R i\nM : ℝ :=\n  max\n    (Finset.max' (Finset.image R (Finset.range (n + 1))) (_ : Finset.Nonempty (Finset.image R (Finset.range (n + 1)))))\n    1\nM_pos : 0 < M\n⊢ ∃ r, 0 < r ∧ ∀ (i : ℕ), i ≤ n → ∀ (x : E), ‖iteratedFDeriv ℝ i (r • g n) x‖ ≤ ↑(δ n)\n[PROOFSTEP]\nhave δnpos : 0 < δ n := δpos n\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\nT : Set ι\nT_count : Set.Countable T\nhT : ⋃ (f : ι) (_ : f ∈ T), support ↑f = s\ng0 : ℕ → ι\nhg : T = range g0\ng : ℕ → E → ℝ := fun n => ↑(g0 n)\ng_s : ∀ (n : ℕ), support (g n) ⊆ s\ns_g : ∀ (x : E), x ∈ s → ∃ n, x ∈ support (g n)\ng_smooth : ∀ (n : ℕ), ContDiff ℝ ⊤ (g n)\ng_comp_supp : ∀ (n : ℕ), HasCompactSupport (g n)\ng_nonneg : ∀ (n : ℕ) (x : E), 0 ≤ g n x\nδ : ℕ → ℝ≥0\nδpos : ∀ (i : ℕ), 0 < δ i\nc : ℝ≥0\nδc : HasSum δ c\nc_lt : c < 1\nn : ℕ\nR : ℕ → ℝ\nhR : ∀ (i : ℕ) (x : E), ‖iteratedFDeriv ℝ i (fun x => g n x) x‖ ≤ R i\nM : ℝ :=\n  max\n    (Finset.max' (Finset.image R (Finset.range (n + 1))) (_ : Finset.Nonempty (Finset.image R (Finset.range (n + 1)))))\n    1\nM_pos : 0 < M\nδnpos : 0 < δ n\n⊢ ∃ r, 0 < r ∧ ∀ (i : ℕ), i ≤ n → ∀ (x : E), ‖iteratedFDeriv ℝ i (r • g n) x‖ ≤ ↑(δ n)\n[PROOFSTEP]\nhave IR : ∀ i ≤ n, R i ≤ M := by\n  intro i hi\n  refine' le_trans _ (le_max_left _ _)\n  apply Finset.le_max'\n  apply Finset.mem_image_of_mem\n  simpa only [Finset.mem_range, Nat.lt_add_one_iff]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\nT : Set ι\nT_count : Set.Countable T\nhT : ⋃ (f : ι) (_ : f ∈ T), support ↑f = s\ng0 : ℕ → ι\nhg : T = range g0\ng : ℕ → E → ℝ := fun n => ↑(g0 n)\ng_s : ∀ (n : ℕ), support (g n) ⊆ s\ns_g : ∀ (x : E), x ∈ s → ∃ n, x ∈ support (g n)\ng_smooth : ∀ (n : ℕ), ContDiff ℝ ⊤ (g n)\ng_comp_supp : ∀ (n : ℕ), HasCompactSupport (g n)\ng_nonneg : ∀ (n : ℕ) (x : E), 0 ≤ g n x\nδ : ℕ → ℝ≥0\nδpos : ∀ (i : ℕ), 0 < δ i\nc : ℝ≥0\nδc : HasSum δ c\nc_lt : c < 1\nn : ℕ\nR : ℕ → ℝ\nhR : ∀ (i : ℕ) (x : E), ‖iteratedFDeriv ℝ i (fun x => g n x) x‖ ≤ R i\nM : ℝ :=\n  max\n    (Finset.max' (Finset.image R (Finset.range (n + 1))) (_ : Finset.Nonempty (Finset.image R (Finset.range (n + 1)))))\n    1\nM_pos : 0 < M\nδnpos : 0 < δ n\n⊢ ∀ (i : ℕ), i ≤ n → R i ≤ M\n[PROOFSTEP]\nintro i hi\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\nT : Set ι\nT_count : Set.Countable T\nhT : ⋃ (f : ι) (_ : f ∈ T), support ↑f = s\ng0 : ℕ → ι\nhg : T = range g0\ng : ℕ → E → ℝ := fun n => ↑(g0 n)\ng_s : ∀ (n : ℕ), support (g n) ⊆ s\ns_g : ∀ (x : E), x ∈ s → ∃ n, x ∈ support (g n)\ng_smooth : ∀ (n : ℕ), ContDiff ℝ ⊤ (g n)\ng_comp_supp : ∀ (n : ℕ), HasCompactSupport (g n)\ng_nonneg : ∀ (n : ℕ) (x : E), 0 ≤ g n x\nδ : ℕ → ℝ≥0\nδpos : ∀ (i : ℕ), 0 < δ i\nc : ℝ≥0\nδc : HasSum δ c\nc_lt : c < 1\nn : ℕ\nR : ℕ → ℝ\nhR : ∀ (i : ℕ) (x : E), ‖iteratedFDeriv ℝ i (fun x => g n x) x‖ ≤ R i\nM : ℝ :=\n  max\n    (Finset.max' (Finset.image R (Finset.range (n + 1))) (_ : Finset.Nonempty (Finset.image R (Finset.range (n + 1)))))\n    1\nM_pos : 0 < M\nδnpos : 0 < δ n\ni : ℕ\nhi : i ≤ n\n⊢ R i ≤ M\n[PROOFSTEP]\nrefine' le_trans _ (le_max_left _ _)\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\nT : Set ι\nT_count : Set.Countable T\nhT : ⋃ (f : ι) (_ : f ∈ T), support ↑f = s\ng0 : ℕ → ι\nhg : T = range g0\ng : ℕ → E → ℝ := fun n => ↑(g0 n)\ng_s : ∀ (n : ℕ), support (g n) ⊆ s\ns_g : ∀ (x : E), x ∈ s → ∃ n, x ∈ support (g n)\ng_smooth : ∀ (n : ℕ), ContDiff ℝ ⊤ (g n)\ng_comp_supp : ∀ (n : ℕ), HasCompactSupport (g n)\ng_nonneg : ∀ (n : ℕ) (x : E), 0 ≤ g n x\nδ : ℕ → ℝ≥0\nδpos : ∀ (i : ℕ), 0 < δ i\nc : ℝ≥0\nδc : HasSum δ c\nc_lt : c < 1\nn : ℕ\nR : ℕ → ℝ\nhR : ∀ (i : ℕ) (x : E), ‖iteratedFDeriv ℝ i (fun x => g n x) x‖ ≤ R i\nM : ℝ :=\n  max\n    (Finset.max' (Finset.image R (Finset.range (n + 1))) (_ : Finset.Nonempty (Finset.image R (Finset.range (n + 1)))))\n    1\nM_pos : 0 < M\nδnpos : 0 < δ n\ni : ℕ\nhi : i ≤ n\n⊢ R i ≤\n    Finset.max' (Finset.image R (Finset.range (n + 1))) (_ : Finset.Nonempty (Finset.image R (Finset.range (n + 1))))\n[PROOFSTEP]\napply Finset.le_max'\n[GOAL]\ncase H2\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\nT : Set ι\nT_count : Set.Countable T\nhT : ⋃ (f : ι) (_ : f ∈ T), support ↑f = s\ng0 : ℕ → ι\nhg : T = range g0\ng : ℕ → E → ℝ := fun n => ↑(g0 n)\ng_s : ∀ (n : ℕ), support (g n) ⊆ s\ns_g : ∀ (x : E), x ∈ s → ∃ n, x ∈ support (g n)\ng_smooth : ∀ (n : ℕ), ContDiff ℝ ⊤ (g n)\ng_comp_supp : ∀ (n : ℕ), HasCompactSupport (g n)\ng_nonneg : ∀ (n : ℕ) (x : E), 0 ≤ g n x\nδ : ℕ → ℝ≥0\nδpos : ∀ (i : ℕ), 0 < δ i\nc : ℝ≥0\nδc : HasSum δ c\nc_lt : c < 1\nn : ℕ\nR : ℕ → ℝ\nhR : ∀ (i : ℕ) (x : E), ‖iteratedFDeriv ℝ i (fun x => g n x) x‖ ≤ R i\nM : ℝ :=\n  max\n    (Finset.max' (Finset.image R (Finset.range (n + 1))) (_ : Finset.Nonempty (Finset.image R (Finset.range (n + 1)))))\n    1\nM_pos : 0 < M\nδnpos : 0 < δ n\ni : ℕ\nhi : i ≤ n\n⊢ R i ∈ Finset.image R (Finset.range (n + 1))\n[PROOFSTEP]\napply Finset.mem_image_of_mem\n[GOAL]\ncase H2.h\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\nT : Set ι\nT_count : Set.Countable T\nhT : ⋃ (f : ι) (_ : f ∈ T), support ↑f = s\ng0 : ℕ → ι\nhg : T = range g0\ng : ℕ → E → ℝ := fun n => ↑(g0 n)\ng_s : ∀ (n : ℕ), support (g n) ⊆ s\ns_g : ∀ (x : E), x ∈ s → ∃ n, x ∈ support (g n)\ng_smooth : ∀ (n : ℕ), ContDiff ℝ ⊤ (g n)\ng_comp_supp : ∀ (n : ℕ), HasCompactSupport (g n)\ng_nonneg : ∀ (n : ℕ) (x : E), 0 ≤ g n x\nδ : ℕ → ℝ≥0\nδpos : ∀ (i : ℕ), 0 < δ i\nc : ℝ≥0\nδc : HasSum δ c\nc_lt : c < 1\nn : ℕ\nR : ℕ → ℝ\nhR : ∀ (i : ℕ) (x : E), ‖iteratedFDeriv ℝ i (fun x => g n x) x‖ ≤ R i\nM : ℝ :=\n  max\n    (Finset.max' (Finset.image R (Finset.range (n + 1))) (_ : Finset.Nonempty (Finset.image R (Finset.range (n + 1)))))\n    1\nM_pos : 0 < M\nδnpos : 0 < δ n\ni : ℕ\nhi : i ≤ n\n⊢ i ∈ Finset.range (n + 1)\n[PROOFSTEP]\nsimpa only [Finset.mem_range, Nat.lt_add_one_iff]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\nT : Set ι\nT_count : Set.Countable T\nhT : ⋃ (f : ι) (_ : f ∈ T), support ↑f = s\ng0 : ℕ → ι\nhg : T = range g0\ng : ℕ → E → ℝ := fun n => ↑(g0 n)\ng_s : ∀ (n : ℕ), support (g n) ⊆ s\ns_g : ∀ (x : E), x ∈ s → ∃ n, x ∈ support (g n)\ng_smooth : ∀ (n : ℕ), ContDiff ℝ ⊤ (g n)\ng_comp_supp : ∀ (n : ℕ), HasCompactSupport (g n)\ng_nonneg : ∀ (n : ℕ) (x : E), 0 ≤ g n x\nδ : ℕ → ℝ≥0\nδpos : ∀ (i : ℕ), 0 < δ i\nc : ℝ≥0\nδc : HasSum δ c\nc_lt : c < 1\nn : ℕ\nR : ℕ → ℝ\nhR : ∀ (i : ℕ) (x : E), ‖iteratedFDeriv ℝ i (fun x => g n x) x‖ ≤ R i\nM : ℝ :=\n  max\n    (Finset.max' (Finset.image R (Finset.range (n + 1))) (_ : Finset.Nonempty (Finset.image R (Finset.range (n + 1)))))\n    1\nM_pos : 0 < M\nδnpos : 0 < δ n\nIR : ∀ (i : ℕ), i ≤ n → R i ≤ M\n⊢ ∃ r, 0 < r ∧ ∀ (i : ℕ), i ≤ n → ∀ (x : E), ‖iteratedFDeriv ℝ i (r • g n) x‖ ≤ ↑(δ n)\n[PROOFSTEP]\nrefine' ⟨M⁻¹ * δ n, by positivity, fun i hi x => _⟩\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\nT : Set ι\nT_count : Set.Countable T\nhT : ⋃ (f : ι) (_ : f ∈ T), support ↑f = s\ng0 : ℕ → ι\nhg : T = range g0\ng : ℕ → E → ℝ := fun n => ↑(g0 n)\ng_s : ∀ (n : ℕ), support (g n) ⊆ s\ns_g : ∀ (x : E), x ∈ s → ∃ n, x ∈ support (g n)\ng_smooth : ∀ (n : ℕ), ContDiff ℝ ⊤ (g n)\ng_comp_supp : ∀ (n : ℕ), HasCompactSupport (g n)\ng_nonneg : ∀ (n : ℕ) (x : E), 0 ≤ g n x\nδ : ℕ → ℝ≥0\nδpos : ∀ (i : ℕ), 0 < δ i\nc : ℝ≥0\nδc : HasSum δ c\nc_lt : c < 1\nn : ℕ\nR : ℕ → ℝ\nhR : ∀ (i : ℕ) (x : E), ‖iteratedFDeriv ℝ i (fun x => g n x) x‖ ≤ R i\nM : ℝ :=\n  max\n    (Finset.max' (Finset.image R (Finset.range (n + 1))) (_ : Finset.Nonempty (Finset.image R (Finset.range (n + 1)))))\n    1\nM_pos : 0 < M\nδnpos : 0 < δ n\nIR : ∀ (i : ℕ), i ≤ n → R i ≤ M\n⊢ 0 < M⁻¹ * ↑(δ n)\n[PROOFSTEP]\npositivity\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\nT : Set ι\nT_count : Set.Countable T\nhT : ⋃ (f : ι) (_ : f ∈ T), support ↑f = s\ng0 : ℕ → ι\nhg : T = range g0\ng : ℕ → E → ℝ := fun n => ↑(g0 n)\ng_s : ∀ (n : ℕ), support (g n) ⊆ s\ns_g : ∀ (x : E), x ∈ s → ∃ n, x ∈ support (g n)\ng_smooth : ∀ (n : ℕ), ContDiff ℝ ⊤ (g n)\ng_comp_supp : ∀ (n : ℕ), HasCompactSupport (g n)\ng_nonneg : ∀ (n : ℕ) (x : E), 0 ≤ g n x\nδ : ℕ → ℝ≥0\nδpos : ∀ (i : ℕ), 0 < δ i\nc : ℝ≥0\nδc : HasSum δ c\nc_lt : c < 1\nn : ℕ\nR : ℕ → ℝ\nhR : ∀ (i : ℕ) (x : E), ‖iteratedFDeriv ℝ i (fun x => g n x) x‖ ≤ R i\nM : ℝ :=\n  max\n    (Finset.max' (Finset.image R (Finset.range (n + 1))) (_ : Finset.Nonempty (Finset.image R (Finset.range (n + 1)))))\n    1\nM_pos : 0 < M\nδnpos : 0 < δ n\nIR : ∀ (i : ℕ), i ≤ n → R i ≤ M\ni : ℕ\nhi : i ≤ n\nx : E\n⊢ ‖iteratedFDeriv ℝ i ((M⁻¹ * ↑(δ n)) • g n) x‖ ≤ ↑(δ n)\n[PROOFSTEP]\ncalc\n  ‖iteratedFDeriv ℝ i ((M⁻¹ * δ n) • g n) x‖ = ‖(M⁻¹ * δ n) • iteratedFDeriv ℝ i (g n) x‖ := by\n    rw [iteratedFDeriv_const_smul_apply]; exact (g_smooth n).of_le le_top\n  _ = M⁻¹ * δ n * ‖iteratedFDeriv ℝ i (g n) x‖ := by rw [norm_smul, Real.norm_of_nonneg]; positivity\n  _ ≤ M⁻¹ * δ n * M := (mul_le_mul_of_nonneg_left ((hR i x).trans (IR i hi)) (by positivity))\n  _ = δ n := by field_simp [M_pos.ne']\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\nT : Set ι\nT_count : Set.Countable T\nhT : ⋃ (f : ι) (_ : f ∈ T), support ↑f = s\ng0 : ℕ → ι\nhg : T = range g0\ng : ℕ → E → ℝ := fun n => ↑(g0 n)\ng_s : ∀ (n : ℕ), support (g n) ⊆ s\ns_g : ∀ (x : E), x ∈ s → ∃ n, x ∈ support (g n)\ng_smooth : ∀ (n : ℕ), ContDiff ℝ ⊤ (g n)\ng_comp_supp : ∀ (n : ℕ), HasCompactSupport (g n)\ng_nonneg : ∀ (n : ℕ) (x : E), 0 ≤ g n x\nδ : ℕ → ℝ≥0\nδpos : ∀ (i : ℕ), 0 < δ i\nc : ℝ≥0\nδc : HasSum δ c\nc_lt : c < 1\nn : ℕ\nR : ℕ → ℝ\nhR : ∀ (i : ℕ) (x : E), ‖iteratedFDeriv ℝ i (fun x => g n x) x‖ ≤ R i\nM : ℝ :=\n  max\n    (Finset.max' (Finset.image R (Finset.range (n + 1))) (_ : Finset.Nonempty (Finset.image R (Finset.range (n + 1)))))\n    1\nM_pos : 0 < M\nδnpos : 0 < δ n\nIR : ∀ (i : ℕ), i ≤ n → R i ≤ M\ni : ℕ\nhi : i ≤ n\nx : E\n⊢ ‖iteratedFDeriv ℝ i ((M⁻¹ * ↑(δ n)) • g n) x‖ = ‖(M⁻¹ * ↑(δ n)) • iteratedFDeriv ℝ i (g n) x‖\n[PROOFSTEP]\nrw [iteratedFDeriv_const_smul_apply]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\nT : Set ι\nT_count : Set.Countable T\nhT : ⋃ (f : ι) (_ : f ∈ T), support ↑f = s\ng0 : ℕ → ι\nhg : T = range g0\ng : ℕ → E → ℝ := fun n => ↑(g0 n)\ng_s : ∀ (n : ℕ), support (g n) ⊆ s\ns_g : ∀ (x : E), x ∈ s → ∃ n, x ∈ support (g n)\ng_smooth : ∀ (n : ℕ), ContDiff ℝ ⊤ (g n)\ng_comp_supp : ∀ (n : ℕ), HasCompactSupport (g n)\ng_nonneg : ∀ (n : ℕ) (x : E), 0 ≤ g n x\nδ : ℕ → ℝ≥0\nδpos : ∀ (i : ℕ), 0 < δ i\nc : ℝ≥0\nδc : HasSum δ c\nc_lt : c < 1\nn : ℕ\nR : ℕ → ℝ\nhR : ∀ (i : ℕ) (x : E), ‖iteratedFDeriv ℝ i (fun x => g n x) x‖ ≤ R i\nM : ℝ :=\n  max\n    (Finset.max' (Finset.image R (Finset.range (n + 1))) (_ : Finset.Nonempty (Finset.image R (Finset.range (n + 1)))))\n    1\nM_pos : 0 < M\nδnpos : 0 < δ n\nIR : ∀ (i : ℕ), i ≤ n → R i ≤ M\ni : ℕ\nhi : i ≤ n\nx : E\n⊢ ContDiff ℝ (↑i) (g n)\n[PROOFSTEP]\nexact (g_smooth n).of_le le_top\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\nT : Set ι\nT_count : Set.Countable T\nhT : ⋃ (f : ι) (_ : f ∈ T), support ↑f = s\ng0 : ℕ → ι\nhg : T = range g0\ng : ℕ → E → ℝ := fun n => ↑(g0 n)\ng_s : ∀ (n : ℕ), support (g n) ⊆ s\ns_g : ∀ (x : E), x ∈ s → ∃ n, x ∈ support (g n)\ng_smooth : ∀ (n : ℕ), ContDiff ℝ ⊤ (g n)\ng_comp_supp : ∀ (n : ℕ), HasCompactSupport (g n)\ng_nonneg : ∀ (n : ℕ) (x : E), 0 ≤ g n x\nδ : ℕ → ℝ≥0\nδpos : ∀ (i : ℕ), 0 < δ i\nc : ℝ≥0\nδc : HasSum δ c\nc_lt : c < 1\nn : ℕ\nR : ℕ → ℝ\nhR : ∀ (i : ℕ) (x : E), ‖iteratedFDeriv ℝ i (fun x => g n x) x‖ ≤ R i\nM : ℝ :=\n  max\n    (Finset.max' (Finset.image R (Finset.range (n + 1))) (_ : Finset.Nonempty (Finset.image R (Finset.range (n + 1)))))\n    1\nM_pos : 0 < M\nδnpos : 0 < δ n\nIR : ∀ (i : ℕ), i ≤ n → R i ≤ M\ni : ℕ\nhi : i ≤ n\nx : E\n⊢ ‖(M⁻¹ * ↑(δ n)) • iteratedFDeriv ℝ i (g n) x‖ = M⁻¹ * ↑(δ n) * ‖iteratedFDeriv ℝ i (g n) x‖\n[PROOFSTEP]\nrw [norm_smul, Real.norm_of_nonneg]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\nT : Set ι\nT_count : Set.Countable T\nhT : ⋃ (f : ι) (_ : f ∈ T), support ↑f = s\ng0 : ℕ → ι\nhg : T = range g0\ng : ℕ → E → ℝ := fun n => ↑(g0 n)\ng_s : ∀ (n : ℕ), support (g n) ⊆ s\ns_g : ∀ (x : E), x ∈ s → ∃ n, x ∈ support (g n)\ng_smooth : ∀ (n : ℕ), ContDiff ℝ ⊤ (g n)\ng_comp_supp : ∀ (n : ℕ), HasCompactSupport (g n)\ng_nonneg : ∀ (n : ℕ) (x : E), 0 ≤ g n x\nδ : ℕ → ℝ≥0\nδpos : ∀ (i : ℕ), 0 < δ i\nc : ℝ≥0\nδc : HasSum δ c\nc_lt : c < 1\nn : ℕ\nR : ℕ → ℝ\nhR : ∀ (i : ℕ) (x : E), ‖iteratedFDeriv ℝ i (fun x => g n x) x‖ ≤ R i\nM : ℝ :=\n  max\n    (Finset.max' (Finset.image R (Finset.range (n + 1))) (_ : Finset.Nonempty (Finset.image R (Finset.range (n + 1)))))\n    1\nM_pos : 0 < M\nδnpos : 0 < δ n\nIR : ∀ (i : ℕ), i ≤ n → R i ≤ M\ni : ℕ\nhi : i ≤ n\nx : E\n⊢ 0 ≤ M⁻¹ * ↑(δ n)\n[PROOFSTEP]\npositivity\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\nT : Set ι\nT_count : Set.Countable T\nhT : ⋃ (f : ι) (_ : f ∈ T), support ↑f = s\ng0 : ℕ → ι\nhg : T = range g0\ng : ℕ → E → ℝ := fun n => ↑(g0 n)\ng_s : ∀ (n : ℕ), support (g n) ⊆ s\ns_g : ∀ (x : E), x ∈ s → ∃ n, x ∈ support (g n)\ng_smooth : ∀ (n : ℕ), ContDiff ℝ ⊤ (g n)\ng_comp_supp : ∀ (n : ℕ), HasCompactSupport (g n)\ng_nonneg : ∀ (n : ℕ) (x : E), 0 ≤ g n x\nδ : ℕ → ℝ≥0\nδpos : ∀ (i : ℕ), 0 < δ i\nc : ℝ≥0\nδc : HasSum δ c\nc_lt : c < 1\nn : ℕ\nR : ℕ → ℝ\nhR : ∀ (i : ℕ) (x : E), ‖iteratedFDeriv ℝ i (fun x => g n x) x‖ ≤ R i\nM : ℝ :=\n  max\n    (Finset.max' (Finset.image R (Finset.range (n + 1))) (_ : Finset.Nonempty (Finset.image R (Finset.range (n + 1)))))\n    1\nM_pos : 0 < M\nδnpos : 0 < δ n\nIR : ∀ (i : ℕ), i ≤ n → R i ≤ M\ni : ℕ\nhi : i ≤ n\nx : E\n⊢ 0 ≤ M⁻¹ * ↑(δ n)\n[PROOFSTEP]\npositivity\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\nT : Set ι\nT_count : Set.Countable T\nhT : ⋃ (f : ι) (_ : f ∈ T), support ↑f = s\ng0 : ℕ → ι\nhg : T = range g0\ng : ℕ → E → ℝ := fun n => ↑(g0 n)\ng_s : ∀ (n : ℕ), support (g n) ⊆ s\ns_g : ∀ (x : E), x ∈ s → ∃ n, x ∈ support (g n)\ng_smooth : ∀ (n : ℕ), ContDiff ℝ ⊤ (g n)\ng_comp_supp : ∀ (n : ℕ), HasCompactSupport (g n)\ng_nonneg : ∀ (n : ℕ) (x : E), 0 ≤ g n x\nδ : ℕ → ℝ≥0\nδpos : ∀ (i : ℕ), 0 < δ i\nc : ℝ≥0\nδc : HasSum δ c\nc_lt : c < 1\nn : ℕ\nR : ℕ → ℝ\nhR : ∀ (i : ℕ) (x : E), ‖iteratedFDeriv ℝ i (fun x => g n x) x‖ ≤ R i\nM : ℝ :=\n  max\n    (Finset.max' (Finset.image R (Finset.range (n + 1))) (_ : Finset.Nonempty (Finset.image R (Finset.range (n + 1)))))\n    1\nM_pos : 0 < M\nδnpos : 0 < δ n\nIR : ∀ (i : ℕ), i ≤ n → R i ≤ M\ni : ℕ\nhi : i ≤ n\nx : E\n⊢ M⁻¹ * ↑(δ n) * M = ↑(δ n)\n[PROOFSTEP]\nfield_simp [M_pos.ne']\n[GOAL]\ncase inr.intro.intro.intro.intro.intro.intro.intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\nT : Set ι\nT_count : Set.Countable T\nhT : ⋃ (f : ι) (_ : f ∈ T), support ↑f = s\ng0 : ℕ → ι\nhg : T = range g0\ng : ℕ → E → ℝ := fun n => ↑(g0 n)\ng_s : ∀ (n : ℕ), support (g n) ⊆ s\ns_g : ∀ (x : E), x ∈ s → ∃ n, x ∈ support (g n)\ng_smooth : ∀ (n : ℕ), ContDiff ℝ ⊤ (g n)\ng_comp_supp : ∀ (n : ℕ), HasCompactSupport (g n)\ng_nonneg : ∀ (n : ℕ) (x : E), 0 ≤ g n x\nδ : ℕ → ℝ≥0\nδpos : ∀ (i : ℕ), 0 < δ i\nc : ℝ≥0\nδc : HasSum δ c\nc_lt : c < 1\nthis : ∀ (n : ℕ), ∃ r, 0 < r ∧ ∀ (i : ℕ), i ≤ n → ∀ (x : E), ‖iteratedFDeriv ℝ i (r • g n) x‖ ≤ ↑(δ n)\n⊢ ∃ f, support f = s ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1\n[PROOFSTEP]\nchoose r rpos hr using this\n[GOAL]\ncase inr.intro.intro.intro.intro.intro.intro.intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\nT : Set ι\nT_count : Set.Countable T\nhT : ⋃ (f : ι) (_ : f ∈ T), support ↑f = s\ng0 : ℕ → ι\nhg : T = range g0\ng : ℕ → E → ℝ := fun n => ↑(g0 n)\ng_s : ∀ (n : ℕ), support (g n) ⊆ s\ns_g : ∀ (x : E), x ∈ s → ∃ n, x ∈ support (g n)\ng_smooth : ∀ (n : ℕ), ContDiff ℝ ⊤ (g n)\ng_comp_supp : ∀ (n : ℕ), HasCompactSupport (g n)\ng_nonneg : ∀ (n : ℕ) (x : E), 0 ≤ g n x\nδ : ℕ → ℝ≥0\nδpos : ∀ (i : ℕ), 0 < δ i\nc : ℝ≥0\nδc : HasSum δ c\nc_lt : c < 1\nr : ℕ → ℝ\nrpos : ∀ (n : ℕ), 0 < r n\nhr : ∀ (n i : ℕ), i ≤ n → ∀ (x : E), ‖iteratedFDeriv ℝ i (r n • g n) x‖ ≤ ↑(δ n)\n⊢ ∃ f, support f = s ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1\n[PROOFSTEP]\nhave S : ∀ x, Summable fun n => (r n • g n) x := by\n  intro x\n  refine' summable_of_nnnorm_bounded _ δc.summable fun n => _\n  rw [← NNReal.coe_le_coe, coe_nnnorm]\n  simpa only [norm_iteratedFDeriv_zero] using hr n 0 (zero_le n) x\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\nT : Set ι\nT_count : Set.Countable T\nhT : ⋃ (f : ι) (_ : f ∈ T), support ↑f = s\ng0 : ℕ → ι\nhg : T = range g0\ng : ℕ → E → ℝ := fun n => ↑(g0 n)\ng_s : ∀ (n : ℕ), support (g n) ⊆ s\ns_g : ∀ (x : E), x ∈ s → ∃ n, x ∈ support (g n)\ng_smooth : ∀ (n : ℕ), ContDiff ℝ ⊤ (g n)\ng_comp_supp : ∀ (n : ℕ), HasCompactSupport (g n)\ng_nonneg : ∀ (n : ℕ) (x : E), 0 ≤ g n x\nδ : ℕ → ℝ≥0\nδpos : ∀ (i : ℕ), 0 < δ i\nc : ℝ≥0\nδc : HasSum δ c\nc_lt : c < 1\nr : ℕ → ℝ\nrpos : ∀ (n : ℕ), 0 < r n\nhr : ∀ (n i : ℕ), i ≤ n → ∀ (x : E), ‖iteratedFDeriv ℝ i (r n • g n) x‖ ≤ ↑(δ n)\n⊢ ∀ (x : E), Summable fun n => (r n • g n) x\n[PROOFSTEP]\nintro x\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\nT : Set ι\nT_count : Set.Countable T\nhT : ⋃ (f : ι) (_ : f ∈ T), support ↑f = s\ng0 : ℕ → ι\nhg : T = range g0\ng : ℕ → E → ℝ := fun n => ↑(g0 n)\ng_s : ∀ (n : ℕ), support (g n) ⊆ s\ns_g : ∀ (x : E), x ∈ s → ∃ n, x ∈ support (g n)\ng_smooth : ∀ (n : ℕ), ContDiff ℝ ⊤ (g n)\ng_comp_supp : ∀ (n : ℕ), HasCompactSupport (g n)\ng_nonneg : ∀ (n : ℕ) (x : E), 0 ≤ g n x\nδ : ℕ → ℝ≥0\nδpos : ∀ (i : ℕ), 0 < δ i\nc : ℝ≥0\nδc : HasSum δ c\nc_lt : c < 1\nr : ℕ → ℝ\nrpos : ∀ (n : ℕ), 0 < r n\nhr : ∀ (n i : ℕ), i ≤ n → ∀ (x : E), ‖iteratedFDeriv ℝ i (r n • g n) x‖ ≤ ↑(δ n)\nx : E\n⊢ Summable fun n => (r n • g n) x\n[PROOFSTEP]\nrefine' summable_of_nnnorm_bounded _ δc.summable fun n => _\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\nT : Set ι\nT_count : Set.Countable T\nhT : ⋃ (f : ι) (_ : f ∈ T), support ↑f = s\ng0 : ℕ → ι\nhg : T = range g0\ng : ℕ → E → ℝ := fun n => ↑(g0 n)\ng_s : ∀ (n : ℕ), support (g n) ⊆ s\ns_g : ∀ (x : E), x ∈ s → ∃ n, x ∈ support (g n)\ng_smooth : ∀ (n : ℕ), ContDiff ℝ ⊤ (g n)\ng_comp_supp : ∀ (n : ℕ), HasCompactSupport (g n)\ng_nonneg : ∀ (n : ℕ) (x : E), 0 ≤ g n x\nδ : ℕ → ℝ≥0\nδpos : ∀ (i : ℕ), 0 < δ i\nc : ℝ≥0\nδc : HasSum δ c\nc_lt : c < 1\nr : ℕ → ℝ\nrpos : ∀ (n : ℕ), 0 < r n\nhr : ∀ (n i : ℕ), i ≤ n → ∀ (x : E), ‖iteratedFDeriv ℝ i (r n • g n) x‖ ≤ ↑(δ n)\nx : E\nn : ℕ\n⊢ ‖(r n • g n) x‖₊ ≤ δ n\n[PROOFSTEP]\nrw [← NNReal.coe_le_coe, coe_nnnorm]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\nT : Set ι\nT_count : Set.Countable T\nhT : ⋃ (f : ι) (_ : f ∈ T), support ↑f = s\ng0 : ℕ → ι\nhg : T = range g0\ng : ℕ → E → ℝ := fun n => ↑(g0 n)\ng_s : ∀ (n : ℕ), support (g n) ⊆ s\ns_g : ∀ (x : E), x ∈ s → ∃ n, x ∈ support (g n)\ng_smooth : ∀ (n : ℕ), ContDiff ℝ ⊤ (g n)\ng_comp_supp : ∀ (n : ℕ), HasCompactSupport (g n)\ng_nonneg : ∀ (n : ℕ) (x : E), 0 ≤ g n x\nδ : ℕ → ℝ≥0\nδpos : ∀ (i : ℕ), 0 < δ i\nc : ℝ≥0\nδc : HasSum δ c\nc_lt : c < 1\nr : ℕ → ℝ\nrpos : ∀ (n : ℕ), 0 < r n\nhr : ∀ (n i : ℕ), i ≤ n → ∀ (x : E), ‖iteratedFDeriv ℝ i (r n • g n) x‖ ≤ ↑(δ n)\nx : E\nn : ℕ\n⊢ ‖(r n • g n) x‖ ≤ ↑(δ n)\n[PROOFSTEP]\nsimpa only [norm_iteratedFDeriv_zero] using hr n 0 (zero_le n) x\n[GOAL]\ncase inr.intro.intro.intro.intro.intro.intro.intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\nT : Set ι\nT_count : Set.Countable T\nhT : ⋃ (f : ι) (_ : f ∈ T), support ↑f = s\ng0 : ℕ → ι\nhg : T = range g0\ng : ℕ → E → ℝ := fun n => ↑(g0 n)\ng_s : ∀ (n : ℕ), support (g n) ⊆ s\ns_g : ∀ (x : E), x ∈ s → ∃ n, x ∈ support (g n)\ng_smooth : ∀ (n : ℕ), ContDiff ℝ ⊤ (g n)\ng_comp_supp : ∀ (n : ℕ), HasCompactSupport (g n)\ng_nonneg : ∀ (n : ℕ) (x : E), 0 ≤ g n x\nδ : ℕ → ℝ≥0\nδpos : ∀ (i : ℕ), 0 < δ i\nc : ℝ≥0\nδc : HasSum δ c\nc_lt : c < 1\nr : ℕ → ℝ\nrpos : ∀ (n : ℕ), 0 < r n\nhr : ∀ (n i : ℕ), i ≤ n → ∀ (x : E), ‖iteratedFDeriv ℝ i (r n • g n) x‖ ≤ ↑(δ n)\nS : ∀ (x : E), Summable fun n => (r n • g n) x\n⊢ ∃ f, support f = s ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1\n[PROOFSTEP]\nrefine' ⟨fun x => ∑' n, (r n • g n) x, _, _, _⟩\n[GOAL]\ncase inr.intro.intro.intro.intro.intro.intro.intro.refine'_1\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\nT : Set ι\nT_count : Set.Countable T\nhT : ⋃ (f : ι) (_ : f ∈ T), support ↑f = s\ng0 : ℕ → ι\nhg : T = range g0\ng : ℕ → E → ℝ := fun n => ↑(g0 n)\ng_s : ∀ (n : ℕ), support (g n) ⊆ s\ns_g : ∀ (x : E), x ∈ s → ∃ n, x ∈ support (g n)\ng_smooth : ∀ (n : ℕ), ContDiff ℝ ⊤ (g n)\ng_comp_supp : ∀ (n : ℕ), HasCompactSupport (g n)\ng_nonneg : ∀ (n : ℕ) (x : E), 0 ≤ g n x\nδ : ℕ → ℝ≥0\nδpos : ∀ (i : ℕ), 0 < δ i\nc : ℝ≥0\nδc : HasSum δ c\nc_lt : c < 1\nr : ℕ → ℝ\nrpos : ∀ (n : ℕ), 0 < r n\nhr : ∀ (n i : ℕ), i ≤ n → ∀ (x : E), ‖iteratedFDeriv ℝ i (r n • g n) x‖ ≤ ↑(δ n)\nS : ∀ (x : E), Summable fun n => (r n • g n) x\n⊢ (support fun x => ∑' (n : ℕ), (r n • g n) x) = s\n[PROOFSTEP]\napply Subset.antisymm\n[GOAL]\ncase inr.intro.intro.intro.intro.intro.intro.intro.refine'_1.h₁\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\nT : Set ι\nT_count : Set.Countable T\nhT : ⋃ (f : ι) (_ : f ∈ T), support ↑f = s\ng0 : ℕ → ι\nhg : T = range g0\ng : ℕ → E → ℝ := fun n => ↑(g0 n)\ng_s : ∀ (n : ℕ), support (g n) ⊆ s\ns_g : ∀ (x : E), x ∈ s → ∃ n, x ∈ support (g n)\ng_smooth : ∀ (n : ℕ), ContDiff ℝ ⊤ (g n)\ng_comp_supp : ∀ (n : ℕ), HasCompactSupport (g n)\ng_nonneg : ∀ (n : ℕ) (x : E), 0 ≤ g n x\nδ : ℕ → ℝ≥0\nδpos : ∀ (i : ℕ), 0 < δ i\nc : ℝ≥0\nδc : HasSum δ c\nc_lt : c < 1\nr : ℕ → ℝ\nrpos : ∀ (n : ℕ), 0 < r n\nhr : ∀ (n i : ℕ), i ≤ n → ∀ (x : E), ‖iteratedFDeriv ℝ i (r n • g n) x‖ ≤ ↑(δ n)\nS : ∀ (x : E), Summable fun n => (r n • g n) x\n⊢ (support fun x => ∑' (n : ℕ), (r n • g n) x) ⊆ s\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase inr.intro.intro.intro.intro.intro.intro.intro.refine'_1.h₁\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\nT : Set ι\nT_count : Set.Countable T\nhT : ⋃ (f : ι) (_ : f ∈ T), support ↑f = s\ng0 : ℕ → ι\nhg : T = range g0\ng : ℕ → E → ℝ := fun n => ↑(g0 n)\ng_s : ∀ (n : ℕ), support (g n) ⊆ s\ns_g : ∀ (x : E), x ∈ s → ∃ n, x ∈ support (g n)\ng_smooth : ∀ (n : ℕ), ContDiff ℝ ⊤ (g n)\ng_comp_supp : ∀ (n : ℕ), HasCompactSupport (g n)\ng_nonneg : ∀ (n : ℕ) (x : E), 0 ≤ g n x\nδ : ℕ → ℝ≥0\nδpos : ∀ (i : ℕ), 0 < δ i\nc : ℝ≥0\nδc : HasSum δ c\nc_lt : c < 1\nr : ℕ → ℝ\nrpos : ∀ (n : ℕ), 0 < r n\nhr : ∀ (n i : ℕ), i ≤ n → ∀ (x : E), ‖iteratedFDeriv ℝ i (r n • g n) x‖ ≤ ↑(δ n)\nS : ∀ (x : E), Summable fun n => (r n • g n) x\nx : E\nhx : x ∈ support fun x => ∑' (n : ℕ), (r n • g n) x\n⊢ x ∈ s\n[PROOFSTEP]\nsimp only [Pi.smul_apply, Algebra.id.smul_eq_mul, mem_support, Ne.def] at hx \n[GOAL]\ncase inr.intro.intro.intro.intro.intro.intro.intro.refine'_1.h₁\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\nT : Set ι\nT_count : Set.Countable T\nhT : ⋃ (f : ι) (_ : f ∈ T), support ↑f = s\ng0 : ℕ → ι\nhg : T = range g0\ng : ℕ → E → ℝ := fun n => ↑(g0 n)\ng_s : ∀ (n : ℕ), support (g n) ⊆ s\ns_g : ∀ (x : E), x ∈ s → ∃ n, x ∈ support (g n)\ng_smooth : ∀ (n : ℕ), ContDiff ℝ ⊤ (g n)\ng_comp_supp : ∀ (n : ℕ), HasCompactSupport (g n)\ng_nonneg : ∀ (n : ℕ) (x : E), 0 ≤ g n x\nδ : ℕ → ℝ≥0\nδpos : ∀ (i : ℕ), 0 < δ i\nc : ℝ≥0\nδc : HasSum δ c\nc_lt : c < 1\nr : ℕ → ℝ\nrpos : ∀ (n : ℕ), 0 < r n\nhr : ∀ (n i : ℕ), i ≤ n → ∀ (x : E), ‖iteratedFDeriv ℝ i (r n • g n) x‖ ≤ ↑(δ n)\nS : ∀ (x : E), Summable fun n => (r n • g n) x\nx : E\nhx : ¬∑' (n : ℕ), r n * ↑(g0 n) x = 0\n⊢ x ∈ s\n[PROOFSTEP]\ncontrapose! hx\n[GOAL]\ncase inr.intro.intro.intro.intro.intro.intro.intro.refine'_1.h₁\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\nT : Set ι\nT_count : Set.Countable T\nhT : ⋃ (f : ι) (_ : f ∈ T), support ↑f = s\ng0 : ℕ → ι\nhg : T = range g0\ng : ℕ → E → ℝ := fun n => ↑(g0 n)\ng_s : ∀ (n : ℕ), support (g n) ⊆ s\ns_g : ∀ (x : E), x ∈ s → ∃ n, x ∈ support (g n)\ng_smooth : ∀ (n : ℕ), ContDiff ℝ ⊤ (g n)\ng_comp_supp : ∀ (n : ℕ), HasCompactSupport (g n)\ng_nonneg : ∀ (n : ℕ) (x : E), 0 ≤ g n x\nδ : ℕ → ℝ≥0\nδpos : ∀ (i : ℕ), 0 < δ i\nc : ℝ≥0\nδc : HasSum δ c\nc_lt : c < 1\nr : ℕ → ℝ\nrpos : ∀ (n : ℕ), 0 < r n\nhr : ∀ (n i : ℕ), i ≤ n → ∀ (x : E), ‖iteratedFDeriv ℝ i (r n • g n) x‖ ≤ ↑(δ n)\nS : ∀ (x : E), Summable fun n => (r n • g n) x\nx : E\nhx : ¬x ∈ s\n⊢ ∑' (n : ℕ), r n * ↑(g0 n) x = 0\n[PROOFSTEP]\nhave : ∀ n, g n x = 0 := by\n  intro n\n  contrapose! hx\n  exact g_s n hx\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\nT : Set ι\nT_count : Set.Countable T\nhT : ⋃ (f : ι) (_ : f ∈ T), support ↑f = s\ng0 : ℕ → ι\nhg : T = range g0\ng : ℕ → E → ℝ := fun n => ↑(g0 n)\ng_s : ∀ (n : ℕ), support (g n) ⊆ s\ns_g : ∀ (x : E), x ∈ s → ∃ n, x ∈ support (g n)\ng_smooth : ∀ (n : ℕ), ContDiff ℝ ⊤ (g n)\ng_comp_supp : ∀ (n : ℕ), HasCompactSupport (g n)\ng_nonneg : ∀ (n : ℕ) (x : E), 0 ≤ g n x\nδ : ℕ → ℝ≥0\nδpos : ∀ (i : ℕ), 0 < δ i\nc : ℝ≥0\nδc : HasSum δ c\nc_lt : c < 1\nr : ℕ → ℝ\nrpos : ∀ (n : ℕ), 0 < r n\nhr : ∀ (n i : ℕ), i ≤ n → ∀ (x : E), ‖iteratedFDeriv ℝ i (r n • g n) x‖ ≤ ↑(δ n)\nS : ∀ (x : E), Summable fun n => (r n • g n) x\nx : E\nhx : ¬x ∈ s\n⊢ ∀ (n : ℕ), g n x = 0\n[PROOFSTEP]\nintro n\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\nT : Set ι\nT_count : Set.Countable T\nhT : ⋃ (f : ι) (_ : f ∈ T), support ↑f = s\ng0 : ℕ → ι\nhg : T = range g0\ng : ℕ → E → ℝ := fun n => ↑(g0 n)\ng_s : ∀ (n : ℕ), support (g n) ⊆ s\ns_g : ∀ (x : E), x ∈ s → ∃ n, x ∈ support (g n)\ng_smooth : ∀ (n : ℕ), ContDiff ℝ ⊤ (g n)\ng_comp_supp : ∀ (n : ℕ), HasCompactSupport (g n)\ng_nonneg : ∀ (n : ℕ) (x : E), 0 ≤ g n x\nδ : ℕ → ℝ≥0\nδpos : ∀ (i : ℕ), 0 < δ i\nc : ℝ≥0\nδc : HasSum δ c\nc_lt : c < 1\nr : ℕ → ℝ\nrpos : ∀ (n : ℕ), 0 < r n\nhr : ∀ (n i : ℕ), i ≤ n → ∀ (x : E), ‖iteratedFDeriv ℝ i (r n • g n) x‖ ≤ ↑(δ n)\nS : ∀ (x : E), Summable fun n => (r n • g n) x\nx : E\nhx : ¬x ∈ s\nn : ℕ\n⊢ g n x = 0\n[PROOFSTEP]\ncontrapose! hx\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\nT : Set ι\nT_count : Set.Countable T\nhT : ⋃ (f : ι) (_ : f ∈ T), support ↑f = s\ng0 : ℕ → ι\nhg : T = range g0\ng : ℕ → E → ℝ := fun n => ↑(g0 n)\ng_s : ∀ (n : ℕ), support (g n) ⊆ s\ns_g : ∀ (x : E), x ∈ s → ∃ n, x ∈ support (g n)\ng_smooth : ∀ (n : ℕ), ContDiff ℝ ⊤ (g n)\ng_comp_supp : ∀ (n : ℕ), HasCompactSupport (g n)\ng_nonneg : ∀ (n : ℕ) (x : E), 0 ≤ g n x\nδ : ℕ → ℝ≥0\nδpos : ∀ (i : ℕ), 0 < δ i\nc : ℝ≥0\nδc : HasSum δ c\nc_lt : c < 1\nr : ℕ → ℝ\nrpos : ∀ (n : ℕ), 0 < r n\nhr : ∀ (n i : ℕ), i ≤ n → ∀ (x : E), ‖iteratedFDeriv ℝ i (r n • g n) x‖ ≤ ↑(δ n)\nS : ∀ (x : E), Summable fun n => (r n • g n) x\nx : E\nn : ℕ\nhx : (fun n => ↑(g0 n)) n x ≠ 0\n⊢ x ∈ s\n[PROOFSTEP]\nexact g_s n hx\n[GOAL]\ncase inr.intro.intro.intro.intro.intro.intro.intro.refine'_1.h₁\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\nT : Set ι\nT_count : Set.Countable T\nhT : ⋃ (f : ι) (_ : f ∈ T), support ↑f = s\ng0 : ℕ → ι\nhg : T = range g0\ng : ℕ → E → ℝ := fun n => ↑(g0 n)\ng_s : ∀ (n : ℕ), support (g n) ⊆ s\ns_g : ∀ (x : E), x ∈ s → ∃ n, x ∈ support (g n)\ng_smooth : ∀ (n : ℕ), ContDiff ℝ ⊤ (g n)\ng_comp_supp : ∀ (n : ℕ), HasCompactSupport (g n)\ng_nonneg : ∀ (n : ℕ) (x : E), 0 ≤ g n x\nδ : ℕ → ℝ≥0\nδpos : ∀ (i : ℕ), 0 < δ i\nc : ℝ≥0\nδc : HasSum δ c\nc_lt : c < 1\nr : ℕ → ℝ\nrpos : ∀ (n : ℕ), 0 < r n\nhr : ∀ (n i : ℕ), i ≤ n → ∀ (x : E), ‖iteratedFDeriv ℝ i (r n • g n) x‖ ≤ ↑(δ n)\nS : ∀ (x : E), Summable fun n => (r n • g n) x\nx : E\nhx : ¬x ∈ s\nthis : ∀ (n : ℕ), g n x = 0\n⊢ ∑' (n : ℕ), r n * ↑(g0 n) x = 0\n[PROOFSTEP]\nsimp only [this, mul_zero, tsum_zero]\n[GOAL]\ncase inr.intro.intro.intro.intro.intro.intro.intro.refine'_1.h₂\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\nT : Set ι\nT_count : Set.Countable T\nhT : ⋃ (f : ι) (_ : f ∈ T), support ↑f = s\ng0 : ℕ → ι\nhg : T = range g0\ng : ℕ → E → ℝ := fun n => ↑(g0 n)\ng_s : ∀ (n : ℕ), support (g n) ⊆ s\ns_g : ∀ (x : E), x ∈ s → ∃ n, x ∈ support (g n)\ng_smooth : ∀ (n : ℕ), ContDiff ℝ ⊤ (g n)\ng_comp_supp : ∀ (n : ℕ), HasCompactSupport (g n)\ng_nonneg : ∀ (n : ℕ) (x : E), 0 ≤ g n x\nδ : ℕ → ℝ≥0\nδpos : ∀ (i : ℕ), 0 < δ i\nc : ℝ≥0\nδc : HasSum δ c\nc_lt : c < 1\nr : ℕ → ℝ\nrpos : ∀ (n : ℕ), 0 < r n\nhr : ∀ (n i : ℕ), i ≤ n → ∀ (x : E), ‖iteratedFDeriv ℝ i (r n • g n) x‖ ≤ ↑(δ n)\nS : ∀ (x : E), Summable fun n => (r n • g n) x\n⊢ s ⊆ support fun x => ∑' (n : ℕ), (r n • g n) x\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase inr.intro.intro.intro.intro.intro.intro.intro.refine'_1.h₂\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\nT : Set ι\nT_count : Set.Countable T\nhT : ⋃ (f : ι) (_ : f ∈ T), support ↑f = s\ng0 : ℕ → ι\nhg : T = range g0\ng : ℕ → E → ℝ := fun n => ↑(g0 n)\ng_s : ∀ (n : ℕ), support (g n) ⊆ s\ns_g : ∀ (x : E), x ∈ s → ∃ n, x ∈ support (g n)\ng_smooth : ∀ (n : ℕ), ContDiff ℝ ⊤ (g n)\ng_comp_supp : ∀ (n : ℕ), HasCompactSupport (g n)\ng_nonneg : ∀ (n : ℕ) (x : E), 0 ≤ g n x\nδ : ℕ → ℝ≥0\nδpos : ∀ (i : ℕ), 0 < δ i\nc : ℝ≥0\nδc : HasSum δ c\nc_lt : c < 1\nr : ℕ → ℝ\nrpos : ∀ (n : ℕ), 0 < r n\nhr : ∀ (n i : ℕ), i ≤ n → ∀ (x : E), ‖iteratedFDeriv ℝ i (r n • g n) x‖ ≤ ↑(δ n)\nS : ∀ (x : E), Summable fun n => (r n • g n) x\nx : E\nhx : x ∈ s\n⊢ x ∈ support fun x => ∑' (n : ℕ), (r n • g n) x\n[PROOFSTEP]\nobtain ⟨n, hn⟩ : ∃ n, x ∈ support (g n)\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\nT : Set ι\nT_count : Set.Countable T\nhT : ⋃ (f : ι) (_ : f ∈ T), support ↑f = s\ng0 : ℕ → ι\nhg : T = range g0\ng : ℕ → E → ℝ := fun n => ↑(g0 n)\ng_s : ∀ (n : ℕ), support (g n) ⊆ s\ns_g : ∀ (x : E), x ∈ s → ∃ n, x ∈ support (g n)\ng_smooth : ∀ (n : ℕ), ContDiff ℝ ⊤ (g n)\ng_comp_supp : ∀ (n : ℕ), HasCompactSupport (g n)\ng_nonneg : ∀ (n : ℕ) (x : E), 0 ≤ g n x\nδ : ℕ → ℝ≥0\nδpos : ∀ (i : ℕ), 0 < δ i\nc : ℝ≥0\nδc : HasSum δ c\nc_lt : c < 1\nr : ℕ → ℝ\nrpos : ∀ (n : ℕ), 0 < r n\nhr : ∀ (n i : ℕ), i ≤ n → ∀ (x : E), ‖iteratedFDeriv ℝ i (r n • g n) x‖ ≤ ↑(δ n)\nS : ∀ (x : E), Summable fun n => (r n • g n) x\nx : E\nhx : x ∈ s\n⊢ ∃ n, x ∈ support (g n)\ncase inr.intro.intro.intro.intro.intro.intro.intro.refine'_1.h₂.intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\nT : Set ι\nT_count : Set.Countable T\nhT : ⋃ (f : ι) (_ : f ∈ T), support ↑f = s\ng0 : ℕ → ι\nhg : T = range g0\ng : ℕ → E → ℝ := fun n => ↑(g0 n)\ng_s : ∀ (n : ℕ), support (g n) ⊆ s\ns_g : ∀ (x : E), x ∈ s → ∃ n, x ∈ support (g n)\ng_smooth : ∀ (n : ℕ), ContDiff ℝ ⊤ (g n)\ng_comp_supp : ∀ (n : ℕ), HasCompactSupport (g n)\ng_nonneg : ∀ (n : ℕ) (x : E), 0 ≤ g n x\nδ : ℕ → ℝ≥0\nδpos : ∀ (i : ℕ), 0 < δ i\nc : ℝ≥0\nδc : HasSum δ c\nc_lt : c < 1\nr : ℕ → ℝ\nrpos : ∀ (n : ℕ), 0 < r n\nhr : ∀ (n i : ℕ), i ≤ n → ∀ (x : E), ‖iteratedFDeriv ℝ i (r n • g n) x‖ ≤ ↑(δ n)\nS : ∀ (x : E), Summable fun n => (r n • g n) x\nx : E\nhx : x ∈ s\nn : ℕ\nhn : x ∈ support (g n)\n⊢ x ∈ support fun x => ∑' (n : ℕ), (r n • g n) x\n[PROOFSTEP]\nexact s_g x hx\n[GOAL]\ncase inr.intro.intro.intro.intro.intro.intro.intro.refine'_1.h₂.intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\nT : Set ι\nT_count : Set.Countable T\nhT : ⋃ (f : ι) (_ : f ∈ T), support ↑f = s\ng0 : ℕ → ι\nhg : T = range g0\ng : ℕ → E → ℝ := fun n => ↑(g0 n)\ng_s : ∀ (n : ℕ), support (g n) ⊆ s\ns_g : ∀ (x : E), x ∈ s → ∃ n, x ∈ support (g n)\ng_smooth : ∀ (n : ℕ), ContDiff ℝ ⊤ (g n)\ng_comp_supp : ∀ (n : ℕ), HasCompactSupport (g n)\ng_nonneg : ∀ (n : ℕ) (x : E), 0 ≤ g n x\nδ : ℕ → ℝ≥0\nδpos : ∀ (i : ℕ), 0 < δ i\nc : ℝ≥0\nδc : HasSum δ c\nc_lt : c < 1\nr : ℕ → ℝ\nrpos : ∀ (n : ℕ), 0 < r n\nhr : ∀ (n i : ℕ), i ≤ n → ∀ (x : E), ‖iteratedFDeriv ℝ i (r n • g n) x‖ ≤ ↑(δ n)\nS : ∀ (x : E), Summable fun n => (r n • g n) x\nx : E\nhx : x ∈ s\nn : ℕ\nhn : x ∈ support (g n)\n⊢ x ∈ support fun x => ∑' (n : ℕ), (r n • g n) x\n[PROOFSTEP]\nhave I : 0 < r n * g n x := mul_pos (rpos n) (lt_of_le_of_ne (g_nonneg n x) (Ne.symm hn))\n[GOAL]\ncase inr.intro.intro.intro.intro.intro.intro.intro.refine'_1.h₂.intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\nT : Set ι\nT_count : Set.Countable T\nhT : ⋃ (f : ι) (_ : f ∈ T), support ↑f = s\ng0 : ℕ → ι\nhg : T = range g0\ng : ℕ → E → ℝ := fun n => ↑(g0 n)\ng_s : ∀ (n : ℕ), support (g n) ⊆ s\ns_g : ∀ (x : E), x ∈ s → ∃ n, x ∈ support (g n)\ng_smooth : ∀ (n : ℕ), ContDiff ℝ ⊤ (g n)\ng_comp_supp : ∀ (n : ℕ), HasCompactSupport (g n)\ng_nonneg : ∀ (n : ℕ) (x : E), 0 ≤ g n x\nδ : ℕ → ℝ≥0\nδpos : ∀ (i : ℕ), 0 < δ i\nc : ℝ≥0\nδc : HasSum δ c\nc_lt : c < 1\nr : ℕ → ℝ\nrpos : ∀ (n : ℕ), 0 < r n\nhr : ∀ (n i : ℕ), i ≤ n → ∀ (x : E), ‖iteratedFDeriv ℝ i (r n • g n) x‖ ≤ ↑(δ n)\nS : ∀ (x : E), Summable fun n => (r n • g n) x\nx : E\nhx : x ∈ s\nn : ℕ\nhn : x ∈ support (g n)\nI : 0 < r n * g n x\n⊢ x ∈ support fun x => ∑' (n : ℕ), (r n • g n) x\n[PROOFSTEP]\nexact ne_of_gt (tsum_pos (S x) (fun i => mul_nonneg (rpos i).le (g_nonneg i x)) n I)\n[GOAL]\ncase inr.intro.intro.intro.intro.intro.intro.intro.refine'_2\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\nT : Set ι\nT_count : Set.Countable T\nhT : ⋃ (f : ι) (_ : f ∈ T), support ↑f = s\ng0 : ℕ → ι\nhg : T = range g0\ng : ℕ → E → ℝ := fun n => ↑(g0 n)\ng_s : ∀ (n : ℕ), support (g n) ⊆ s\ns_g : ∀ (x : E), x ∈ s → ∃ n, x ∈ support (g n)\ng_smooth : ∀ (n : ℕ), ContDiff ℝ ⊤ (g n)\ng_comp_supp : ∀ (n : ℕ), HasCompactSupport (g n)\ng_nonneg : ∀ (n : ℕ) (x : E), 0 ≤ g n x\nδ : ℕ → ℝ≥0\nδpos : ∀ (i : ℕ), 0 < δ i\nc : ℝ≥0\nδc : HasSum δ c\nc_lt : c < 1\nr : ℕ → ℝ\nrpos : ∀ (n : ℕ), 0 < r n\nhr : ∀ (n i : ℕ), i ≤ n → ∀ (x : E), ‖iteratedFDeriv ℝ i (r n • g n) x‖ ≤ ↑(δ n)\nS : ∀ (x : E), Summable fun n => (r n • g n) x\n⊢ ContDiff ℝ ⊤ fun x => ∑' (n : ℕ), (r n • g n) x\n[PROOFSTEP]\nrefine'\n  contDiff_tsum_of_eventually (fun n => (g_smooth n).const_smul (r n)) (fun k _ => (NNReal.hasSum_coe.2 δc).summable) _\n[GOAL]\ncase inr.intro.intro.intro.intro.intro.intro.intro.refine'_2\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\nT : Set ι\nT_count : Set.Countable T\nhT : ⋃ (f : ι) (_ : f ∈ T), support ↑f = s\ng0 : ℕ → ι\nhg : T = range g0\ng : ℕ → E → ℝ := fun n => ↑(g0 n)\ng_s : ∀ (n : ℕ), support (g n) ⊆ s\ns_g : ∀ (x : E), x ∈ s → ∃ n, x ∈ support (g n)\ng_smooth : ∀ (n : ℕ), ContDiff ℝ ⊤ (g n)\ng_comp_supp : ∀ (n : ℕ), HasCompactSupport (g n)\ng_nonneg : ∀ (n : ℕ) (x : E), 0 ≤ g n x\nδ : ℕ → ℝ≥0\nδpos : ∀ (i : ℕ), 0 < δ i\nc : ℝ≥0\nδc : HasSum δ c\nc_lt : c < 1\nr : ℕ → ℝ\nrpos : ∀ (n : ℕ), 0 < r n\nhr : ∀ (n i : ℕ), i ≤ n → ∀ (x : E), ‖iteratedFDeriv ℝ i (r n • g n) x‖ ≤ ↑(δ n)\nS : ∀ (x : E), Summable fun n => (r n • g n) x\n⊢ ∀ (k : ℕ), ↑k ≤ ⊤ → ∀ᶠ (i : ℕ) in Filter.cofinite, ∀ (x : E), ‖iteratedFDeriv ℝ k (fun x => (r i • g i) x) x‖ ≤ ↑(δ i)\n[PROOFSTEP]\nintro i _\n[GOAL]\ncase inr.intro.intro.intro.intro.intro.intro.intro.refine'_2\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\nT : Set ι\nT_count : Set.Countable T\nhT : ⋃ (f : ι) (_ : f ∈ T), support ↑f = s\ng0 : ℕ → ι\nhg : T = range g0\ng : ℕ → E → ℝ := fun n => ↑(g0 n)\ng_s : ∀ (n : ℕ), support (g n) ⊆ s\ns_g : ∀ (x : E), x ∈ s → ∃ n, x ∈ support (g n)\ng_smooth : ∀ (n : ℕ), ContDiff ℝ ⊤ (g n)\ng_comp_supp : ∀ (n : ℕ), HasCompactSupport (g n)\ng_nonneg : ∀ (n : ℕ) (x : E), 0 ≤ g n x\nδ : ℕ → ℝ≥0\nδpos : ∀ (i : ℕ), 0 < δ i\nc : ℝ≥0\nδc : HasSum δ c\nc_lt : c < 1\nr : ℕ → ℝ\nrpos : ∀ (n : ℕ), 0 < r n\nhr : ∀ (n i : ℕ), i ≤ n → ∀ (x : E), ‖iteratedFDeriv ℝ i (r n • g n) x‖ ≤ ↑(δ n)\nS : ∀ (x : E), Summable fun n => (r n • g n) x\ni : ℕ\na✝ : ↑i ≤ ⊤\n⊢ ∀ᶠ (i_1 : ℕ) in Filter.cofinite, ∀ (x : E), ‖iteratedFDeriv ℝ i (fun x => (r i_1 • g i_1) x) x‖ ≤ ↑(δ i_1)\n[PROOFSTEP]\nsimp only [Nat.cofinite_eq_atTop, Pi.smul_apply, Algebra.id.smul_eq_mul, Filter.eventually_atTop, ge_iff_le]\n[GOAL]\ncase inr.intro.intro.intro.intro.intro.intro.intro.refine'_2\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\nT : Set ι\nT_count : Set.Countable T\nhT : ⋃ (f : ι) (_ : f ∈ T), support ↑f = s\ng0 : ℕ → ι\nhg : T = range g0\ng : ℕ → E → ℝ := fun n => ↑(g0 n)\ng_s : ∀ (n : ℕ), support (g n) ⊆ s\ns_g : ∀ (x : E), x ∈ s → ∃ n, x ∈ support (g n)\ng_smooth : ∀ (n : ℕ), ContDiff ℝ ⊤ (g n)\ng_comp_supp : ∀ (n : ℕ), HasCompactSupport (g n)\ng_nonneg : ∀ (n : ℕ) (x : E), 0 ≤ g n x\nδ : ℕ → ℝ≥0\nδpos : ∀ (i : ℕ), 0 < δ i\nc : ℝ≥0\nδc : HasSum δ c\nc_lt : c < 1\nr : ℕ → ℝ\nrpos : ∀ (n : ℕ), 0 < r n\nhr : ∀ (n i : ℕ), i ≤ n → ∀ (x : E), ‖iteratedFDeriv ℝ i (r n • g n) x‖ ≤ ↑(δ n)\nS : ∀ (x : E), Summable fun n => (r n • g n) x\ni : ℕ\na✝ : ↑i ≤ ⊤\n⊢ ∃ a, ∀ (b : ℕ), a ≤ b → ∀ (x : E), ‖iteratedFDeriv ℝ i (fun x => r b * ↑(g0 b) x) x‖ ≤ ↑(δ b)\n[PROOFSTEP]\nexact ⟨i, fun n hn x => hr _ _ hn _⟩\n[GOAL]\ncase inr.intro.intro.intro.intro.intro.intro.intro.refine'_3\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\nT : Set ι\nT_count : Set.Countable T\nhT : ⋃ (f : ι) (_ : f ∈ T), support ↑f = s\ng0 : ℕ → ι\nhg : T = range g0\ng : ℕ → E → ℝ := fun n => ↑(g0 n)\ng_s : ∀ (n : ℕ), support (g n) ⊆ s\ns_g : ∀ (x : E), x ∈ s → ∃ n, x ∈ support (g n)\ng_smooth : ∀ (n : ℕ), ContDiff ℝ ⊤ (g n)\ng_comp_supp : ∀ (n : ℕ), HasCompactSupport (g n)\ng_nonneg : ∀ (n : ℕ) (x : E), 0 ≤ g n x\nδ : ℕ → ℝ≥0\nδpos : ∀ (i : ℕ), 0 < δ i\nc : ℝ≥0\nδc : HasSum δ c\nc_lt : c < 1\nr : ℕ → ℝ\nrpos : ∀ (n : ℕ), 0 < r n\nhr : ∀ (n i : ℕ), i ≤ n → ∀ (x : E), ‖iteratedFDeriv ℝ i (r n • g n) x‖ ≤ ↑(δ n)\nS : ∀ (x : E), Summable fun n => (r n • g n) x\n⊢ (range fun x => ∑' (n : ℕ), (r n • g n) x) ⊆ Icc 0 1\n[PROOFSTEP]\nrintro - ⟨y, rfl⟩\n[GOAL]\ncase inr.intro.intro.intro.intro.intro.intro.intro.refine'_3.intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\nT : Set ι\nT_count : Set.Countable T\nhT : ⋃ (f : ι) (_ : f ∈ T), support ↑f = s\ng0 : ℕ → ι\nhg : T = range g0\ng : ℕ → E → ℝ := fun n => ↑(g0 n)\ng_s : ∀ (n : ℕ), support (g n) ⊆ s\ns_g : ∀ (x : E), x ∈ s → ∃ n, x ∈ support (g n)\ng_smooth : ∀ (n : ℕ), ContDiff ℝ ⊤ (g n)\ng_comp_supp : ∀ (n : ℕ), HasCompactSupport (g n)\ng_nonneg : ∀ (n : ℕ) (x : E), 0 ≤ g n x\nδ : ℕ → ℝ≥0\nδpos : ∀ (i : ℕ), 0 < δ i\nc : ℝ≥0\nδc : HasSum δ c\nc_lt : c < 1\nr : ℕ → ℝ\nrpos : ∀ (n : ℕ), 0 < r n\nhr : ∀ (n i : ℕ), i ≤ n → ∀ (x : E), ‖iteratedFDeriv ℝ i (r n • g n) x‖ ≤ ↑(δ n)\nS : ∀ (x : E), Summable fun n => (r n • g n) x\ny : E\n⊢ (fun x => ∑' (n : ℕ), (r n • g n) x) y ∈ Icc 0 1\n[PROOFSTEP]\nrefine' ⟨tsum_nonneg fun n => mul_nonneg (rpos n).le (g_nonneg n y), le_trans _ c_lt.le⟩\n[GOAL]\ncase inr.intro.intro.intro.intro.intro.intro.intro.refine'_3.intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\nT : Set ι\nT_count : Set.Countable T\nhT : ⋃ (f : ι) (_ : f ∈ T), support ↑f = s\ng0 : ℕ → ι\nhg : T = range g0\ng : ℕ → E → ℝ := fun n => ↑(g0 n)\ng_s : ∀ (n : ℕ), support (g n) ⊆ s\ns_g : ∀ (x : E), x ∈ s → ∃ n, x ∈ support (g n)\ng_smooth : ∀ (n : ℕ), ContDiff ℝ ⊤ (g n)\ng_comp_supp : ∀ (n : ℕ), HasCompactSupport (g n)\ng_nonneg : ∀ (n : ℕ) (x : E), 0 ≤ g n x\nδ : ℕ → ℝ≥0\nδpos : ∀ (i : ℕ), 0 < δ i\nc : ℝ≥0\nδc : HasSum δ c\nc_lt : c < 1\nr : ℕ → ℝ\nrpos : ∀ (n : ℕ), 0 < r n\nhr : ∀ (n i : ℕ), i ≤ n → ∀ (x : E), ‖iteratedFDeriv ℝ i (r n • g n) x‖ ≤ ↑(δ n)\nS : ∀ (x : E), Summable fun n => (r n • g n) x\ny : E\n⊢ (fun x => ∑' (n : ℕ), (r n • g n) x) y ≤ (fun a => ↑a) c\n[PROOFSTEP]\nhave A : HasSum (fun n => (δ n : ℝ)) c := NNReal.hasSum_coe.2 δc\n[GOAL]\ncase inr.intro.intro.intro.intro.intro.intro.intro.refine'_3.intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\nT : Set ι\nT_count : Set.Countable T\nhT : ⋃ (f : ι) (_ : f ∈ T), support ↑f = s\ng0 : ℕ → ι\nhg : T = range g0\ng : ℕ → E → ℝ := fun n => ↑(g0 n)\ng_s : ∀ (n : ℕ), support (g n) ⊆ s\ns_g : ∀ (x : E), x ∈ s → ∃ n, x ∈ support (g n)\ng_smooth : ∀ (n : ℕ), ContDiff ℝ ⊤ (g n)\ng_comp_supp : ∀ (n : ℕ), HasCompactSupport (g n)\ng_nonneg : ∀ (n : ℕ) (x : E), 0 ≤ g n x\nδ : ℕ → ℝ≥0\nδpos : ∀ (i : ℕ), 0 < δ i\nc : ℝ≥0\nδc : HasSum δ c\nc_lt : c < 1\nr : ℕ → ℝ\nrpos : ∀ (n : ℕ), 0 < r n\nhr : ∀ (n i : ℕ), i ≤ n → ∀ (x : E), ‖iteratedFDeriv ℝ i (r n • g n) x‖ ≤ ↑(δ n)\nS : ∀ (x : E), Summable fun n => (r n • g n) x\ny : E\nA : HasSum (fun n => ↑(δ n)) ↑c\n⊢ (fun x => ∑' (n : ℕ), (r n • g n) x) y ≤ (fun a => ↑a) c\n[PROOFSTEP]\nsimp only [Pi.smul_apply, smul_eq_mul, NNReal.val_eq_coe, ← A.tsum_eq, ge_iff_le]\n[GOAL]\ncase inr.intro.intro.intro.intro.intro.intro.intro.refine'_3.intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\nT : Set ι\nT_count : Set.Countable T\nhT : ⋃ (f : ι) (_ : f ∈ T), support ↑f = s\ng0 : ℕ → ι\nhg : T = range g0\ng : ℕ → E → ℝ := fun n => ↑(g0 n)\ng_s : ∀ (n : ℕ), support (g n) ⊆ s\ns_g : ∀ (x : E), x ∈ s → ∃ n, x ∈ support (g n)\ng_smooth : ∀ (n : ℕ), ContDiff ℝ ⊤ (g n)\ng_comp_supp : ∀ (n : ℕ), HasCompactSupport (g n)\ng_nonneg : ∀ (n : ℕ) (x : E), 0 ≤ g n x\nδ : ℕ → ℝ≥0\nδpos : ∀ (i : ℕ), 0 < δ i\nc : ℝ≥0\nδc : HasSum δ c\nc_lt : c < 1\nr : ℕ → ℝ\nrpos : ∀ (n : ℕ), 0 < r n\nhr : ∀ (n i : ℕ), i ≤ n → ∀ (x : E), ‖iteratedFDeriv ℝ i (r n • g n) x‖ ≤ ↑(δ n)\nS : ∀ (x : E), Summable fun n => (r n • g n) x\ny : E\nA : HasSum (fun n => ↑(δ n)) ↑c\n⊢ ∑' (n : ℕ), r n * ↑(g0 n) y ≤ ∑' (b : ℕ), ↑(δ b)\n[PROOFSTEP]\napply tsum_le_tsum _ (S y) A.summable\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\nT : Set ι\nT_count : Set.Countable T\nhT : ⋃ (f : ι) (_ : f ∈ T), support ↑f = s\ng0 : ℕ → ι\nhg : T = range g0\ng : ℕ → E → ℝ := fun n => ↑(g0 n)\ng_s : ∀ (n : ℕ), support (g n) ⊆ s\ns_g : ∀ (x : E), x ∈ s → ∃ n, x ∈ support (g n)\ng_smooth : ∀ (n : ℕ), ContDiff ℝ ⊤ (g n)\ng_comp_supp : ∀ (n : ℕ), HasCompactSupport (g n)\ng_nonneg : ∀ (n : ℕ) (x : E), 0 ≤ g n x\nδ : ℕ → ℝ≥0\nδpos : ∀ (i : ℕ), 0 < δ i\nc : ℝ≥0\nδc : HasSum δ c\nc_lt : c < 1\nr : ℕ → ℝ\nrpos : ∀ (n : ℕ), 0 < r n\nhr : ∀ (n i : ℕ), i ≤ n → ∀ (x : E), ‖iteratedFDeriv ℝ i (r n • g n) x‖ ≤ ↑(δ n)\nS : ∀ (x : E), Summable fun n => (r n • g n) x\ny : E\nA : HasSum (fun n => ↑(δ n)) ↑c\n⊢ ∀ (i : ℕ), (r i • g i) y ≤ ↑(δ i)\n[PROOFSTEP]\nintro n\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\nT : Set ι\nT_count : Set.Countable T\nhT : ⋃ (f : ι) (_ : f ∈ T), support ↑f = s\ng0 : ℕ → ι\nhg : T = range g0\ng : ℕ → E → ℝ := fun n => ↑(g0 n)\ng_s : ∀ (n : ℕ), support (g n) ⊆ s\ns_g : ∀ (x : E), x ∈ s → ∃ n, x ∈ support (g n)\ng_smooth : ∀ (n : ℕ), ContDiff ℝ ⊤ (g n)\ng_comp_supp : ∀ (n : ℕ), HasCompactSupport (g n)\ng_nonneg : ∀ (n : ℕ) (x : E), 0 ≤ g n x\nδ : ℕ → ℝ≥0\nδpos : ∀ (i : ℕ), 0 < δ i\nc : ℝ≥0\nδc : HasSum δ c\nc_lt : c < 1\nr : ℕ → ℝ\nrpos : ∀ (n : ℕ), 0 < r n\nhr : ∀ (n i : ℕ), i ≤ n → ∀ (x : E), ‖iteratedFDeriv ℝ i (r n • g n) x‖ ≤ ↑(δ n)\nS : ∀ (x : E), Summable fun n => (r n • g n) x\ny : E\nA : HasSum (fun n => ↑(δ n)) ↑c\nn : ℕ\n⊢ (r n • g n) y ≤ ↑(δ n)\n[PROOFSTEP]\napply (le_abs_self _).trans\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\ns : Set E\nhs : IsOpen s\nh's : Set.Nonempty s\nι : Type u_1 := { f // support f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 }\nT : Set ι\nT_count : Set.Countable T\nhT : ⋃ (f : ι) (_ : f ∈ T), support ↑f = s\ng0 : ℕ → ι\nhg : T = range g0\ng : ℕ → E → ℝ := fun n => ↑(g0 n)\ng_s : ∀ (n : ℕ), support (g n) ⊆ s\ns_g : ∀ (x : E), x ∈ s → ∃ n, x ∈ support (g n)\ng_smooth : ∀ (n : ℕ), ContDiff ℝ ⊤ (g n)\ng_comp_supp : ∀ (n : ℕ), HasCompactSupport (g n)\ng_nonneg : ∀ (n : ℕ) (x : E), 0 ≤ g n x\nδ : ℕ → ℝ≥0\nδpos : ∀ (i : ℕ), 0 < δ i\nc : ℝ≥0\nδc : HasSum δ c\nc_lt : c < 1\nr : ℕ → ℝ\nrpos : ∀ (n : ℕ), 0 < r n\nhr : ∀ (n i : ℕ), i ≤ n → ∀ (x : E), ‖iteratedFDeriv ℝ i (r n • g n) x‖ ≤ ↑(δ n)\nS : ∀ (x : E), Summable fun n => (r n • g n) x\ny : E\nA : HasSum (fun n => ↑(δ n)) ↑c\nn : ℕ\n⊢ |(r n • g n) y| ≤ ↑(δ n)\n[PROOFSTEP]\nsimpa only [norm_iteratedFDeriv_zero] using hr n 0 (zero_le n) y\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\n⊢ ∃ u, ContDiff ℝ ⊤ u ∧ (∀ (x : E), u x ∈ Icc 0 1) ∧ support u = ball 0 1 ∧ ∀ (x : E), u (-x) = u x\n[PROOFSTEP]\nhave A : IsOpen (ball (0 : E) 1) := isOpen_ball\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nA : IsOpen (ball 0 1)\n⊢ ∃ u, ContDiff ℝ ⊤ u ∧ (∀ (x : E), u x ∈ Icc 0 1) ∧ support u = ball 0 1 ∧ ∀ (x : E), u (-x) = u x\n[PROOFSTEP]\nobtain ⟨f, f_support, f_smooth, f_range⟩ :\n  ∃ f : E → ℝ, f.support = ball (0 : E) 1 ∧ ContDiff ℝ ⊤ f ∧ Set.range f ⊆ Set.Icc 0 1\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nA : IsOpen (ball 0 1)\n⊢ ∃ f, support f = ball 0 1 ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1\ncase intro.intro.intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nA : IsOpen (ball 0 1)\nf : E → ℝ\nf_support : support f = ball 0 1\nf_smooth : ContDiff ℝ ⊤ f\nf_range : range f ⊆ Icc 0 1\n⊢ ∃ u, ContDiff ℝ ⊤ u ∧ (∀ (x : E), u x ∈ Icc 0 1) ∧ support u = ball 0 1 ∧ ∀ (x : E), u (-x) = u x\n[PROOFSTEP]\nexact A.exists_smooth_support_eq\n[GOAL]\ncase intro.intro.intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nA : IsOpen (ball 0 1)\nf : E → ℝ\nf_support : support f = ball 0 1\nf_smooth : ContDiff ℝ ⊤ f\nf_range : range f ⊆ Icc 0 1\n⊢ ∃ u, ContDiff ℝ ⊤ u ∧ (∀ (x : E), u x ∈ Icc 0 1) ∧ support u = ball 0 1 ∧ ∀ (x : E), u (-x) = u x\n[PROOFSTEP]\nhave B : ∀ x, f x ∈ Icc (0 : ℝ) 1 := fun x => f_range (mem_range_self x)\n[GOAL]\ncase intro.intro.intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nA : IsOpen (ball 0 1)\nf : E → ℝ\nf_support : support f = ball 0 1\nf_smooth : ContDiff ℝ ⊤ f\nf_range : range f ⊆ Icc 0 1\nB : ∀ (x : E), f x ∈ Icc 0 1\n⊢ ∃ u, ContDiff ℝ ⊤ u ∧ (∀ (x : E), u x ∈ Icc 0 1) ∧ support u = ball 0 1 ∧ ∀ (x : E), u (-x) = u x\n[PROOFSTEP]\nrefine' ⟨fun x => (f x + f (-x)) / 2, _, _, _, _⟩\n[GOAL]\ncase intro.intro.intro.refine'_1\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nA : IsOpen (ball 0 1)\nf : E → ℝ\nf_support : support f = ball 0 1\nf_smooth : ContDiff ℝ ⊤ f\nf_range : range f ⊆ Icc 0 1\nB : ∀ (x : E), f x ∈ Icc 0 1\n⊢ ContDiff ℝ ⊤ fun x => (f x + f (-x)) / 2\n[PROOFSTEP]\nexact (f_smooth.add (f_smooth.comp contDiff_neg)).div_const _\n[GOAL]\ncase intro.intro.intro.refine'_2\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nA : IsOpen (ball 0 1)\nf : E → ℝ\nf_support : support f = ball 0 1\nf_smooth : ContDiff ℝ ⊤ f\nf_range : range f ⊆ Icc 0 1\nB : ∀ (x : E), f x ∈ Icc 0 1\n⊢ ∀ (x : E), (fun x => (f x + f (-x)) / 2) x ∈ Icc 0 1\n[PROOFSTEP]\nintro x\n[GOAL]\ncase intro.intro.intro.refine'_2\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nA : IsOpen (ball 0 1)\nf : E → ℝ\nf_support : support f = ball 0 1\nf_smooth : ContDiff ℝ ⊤ f\nf_range : range f ⊆ Icc 0 1\nB : ∀ (x : E), f x ∈ Icc 0 1\nx : E\n⊢ (fun x => (f x + f (-x)) / 2) x ∈ Icc 0 1\n[PROOFSTEP]\nsimp only [mem_Icc]\n[GOAL]\ncase intro.intro.intro.refine'_2\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nA : IsOpen (ball 0 1)\nf : E → ℝ\nf_support : support f = ball 0 1\nf_smooth : ContDiff ℝ ⊤ f\nf_range : range f ⊆ Icc 0 1\nB : ∀ (x : E), f x ∈ Icc 0 1\nx : E\n⊢ 0 ≤ (f x + f (-x)) / 2 ∧ (f x + f (-x)) / 2 ≤ 1\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase intro.intro.intro.refine'_2.left\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nA : IsOpen (ball 0 1)\nf : E → ℝ\nf_support : support f = ball 0 1\nf_smooth : ContDiff ℝ ⊤ f\nf_range : range f ⊆ Icc 0 1\nB : ∀ (x : E), f x ∈ Icc 0 1\nx : E\n⊢ 0 ≤ (f x + f (-x)) / 2\n[PROOFSTEP]\nlinarith [(B x).1, (B (-x)).1]\n[GOAL]\ncase intro.intro.intro.refine'_2.right\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nA : IsOpen (ball 0 1)\nf : E → ℝ\nf_support : support f = ball 0 1\nf_smooth : ContDiff ℝ ⊤ f\nf_range : range f ⊆ Icc 0 1\nB : ∀ (x : E), f x ∈ Icc 0 1\nx : E\n⊢ (f x + f (-x)) / 2 ≤ 1\n[PROOFSTEP]\nlinarith [(B x).2, (B (-x)).2]\n[GOAL]\ncase intro.intro.intro.refine'_3\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nA : IsOpen (ball 0 1)\nf : E → ℝ\nf_support : support f = ball 0 1\nf_smooth : ContDiff ℝ ⊤ f\nf_range : range f ⊆ Icc 0 1\nB : ∀ (x : E), f x ∈ Icc 0 1\n⊢ (support fun x => (f x + f (-x)) / 2) = ball 0 1\n[PROOFSTEP]\nrefine' support_eq_iff.2 ⟨fun x hx => _, fun x hx => _⟩\n[GOAL]\ncase intro.intro.intro.refine'_3.refine'_1\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nA : IsOpen (ball 0 1)\nf : E → ℝ\nf_support : support f = ball 0 1\nf_smooth : ContDiff ℝ ⊤ f\nf_range : range f ⊆ Icc 0 1\nB : ∀ (x : E), f x ∈ Icc 0 1\nx : E\nhx : x ∈ ball 0 1\n⊢ (f x + f (-x)) / 2 ≠ 0\n[PROOFSTEP]\napply ne_of_gt\n[GOAL]\ncase intro.intro.intro.refine'_3.refine'_1.h\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nA : IsOpen (ball 0 1)\nf : E → ℝ\nf_support : support f = ball 0 1\nf_smooth : ContDiff ℝ ⊤ f\nf_range : range f ⊆ Icc 0 1\nB : ∀ (x : E), f x ∈ Icc 0 1\nx : E\nhx : x ∈ ball 0 1\n⊢ 0 < (f x + f (-x)) / 2\n[PROOFSTEP]\nhave : 0 < f x := by\n  apply lt_of_le_of_ne (B x).1 (Ne.symm _)\n  rwa [← f_support] at hx \n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nA : IsOpen (ball 0 1)\nf : E → ℝ\nf_support : support f = ball 0 1\nf_smooth : ContDiff ℝ ⊤ f\nf_range : range f ⊆ Icc 0 1\nB : ∀ (x : E), f x ∈ Icc 0 1\nx : E\nhx : x ∈ ball 0 1\n⊢ 0 < f x\n[PROOFSTEP]\napply lt_of_le_of_ne (B x).1 (Ne.symm _)\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nA : IsOpen (ball 0 1)\nf : E → ℝ\nf_support : support f = ball 0 1\nf_smooth : ContDiff ℝ ⊤ f\nf_range : range f ⊆ Icc 0 1\nB : ∀ (x : E), f x ∈ Icc 0 1\nx : E\nhx : x ∈ ball 0 1\n⊢ f x ≠ 0\n[PROOFSTEP]\nrwa [← f_support] at hx \n[GOAL]\ncase intro.intro.intro.refine'_3.refine'_1.h\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nA : IsOpen (ball 0 1)\nf : E → ℝ\nf_support : support f = ball 0 1\nf_smooth : ContDiff ℝ ⊤ f\nf_range : range f ⊆ Icc 0 1\nB : ∀ (x : E), f x ∈ Icc 0 1\nx : E\nhx : x ∈ ball 0 1\nthis : 0 < f x\n⊢ 0 < (f x + f (-x)) / 2\n[PROOFSTEP]\nlinarith [(B (-x)).1]\n[GOAL]\ncase intro.intro.intro.refine'_3.refine'_2\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nA : IsOpen (ball 0 1)\nf : E → ℝ\nf_support : support f = ball 0 1\nf_smooth : ContDiff ℝ ⊤ f\nf_range : range f ⊆ Icc 0 1\nB : ∀ (x : E), f x ∈ Icc 0 1\nx : E\nhx : ¬x ∈ ball 0 1\n⊢ (f x + f (-x)) / 2 = 0\n[PROOFSTEP]\nhave I1 : x ∉ support f := by rwa [f_support]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nA : IsOpen (ball 0 1)\nf : E → ℝ\nf_support : support f = ball 0 1\nf_smooth : ContDiff ℝ ⊤ f\nf_range : range f ⊆ Icc 0 1\nB : ∀ (x : E), f x ∈ Icc 0 1\nx : E\nhx : ¬x ∈ ball 0 1\n⊢ ¬x ∈ support f\n[PROOFSTEP]\nrwa [f_support]\n[GOAL]\ncase intro.intro.intro.refine'_3.refine'_2\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nA : IsOpen (ball 0 1)\nf : E → ℝ\nf_support : support f = ball 0 1\nf_smooth : ContDiff ℝ ⊤ f\nf_range : range f ⊆ Icc 0 1\nB : ∀ (x : E), f x ∈ Icc 0 1\nx : E\nhx : ¬x ∈ ball 0 1\nI1 : ¬x ∈ support f\n⊢ (f x + f (-x)) / 2 = 0\n[PROOFSTEP]\nhave I2 : -x ∉ support f := by\n  rw [f_support]\n  simpa using hx\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nA : IsOpen (ball 0 1)\nf : E → ℝ\nf_support : support f = ball 0 1\nf_smooth : ContDiff ℝ ⊤ f\nf_range : range f ⊆ Icc 0 1\nB : ∀ (x : E), f x ∈ Icc 0 1\nx : E\nhx : ¬x ∈ ball 0 1\nI1 : ¬x ∈ support f\n⊢ ¬-x ∈ support f\n[PROOFSTEP]\nrw [f_support]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nA : IsOpen (ball 0 1)\nf : E → ℝ\nf_support : support f = ball 0 1\nf_smooth : ContDiff ℝ ⊤ f\nf_range : range f ⊆ Icc 0 1\nB : ∀ (x : E), f x ∈ Icc 0 1\nx : E\nhx : ¬x ∈ ball 0 1\nI1 : ¬x ∈ support f\n⊢ ¬-x ∈ ball 0 1\n[PROOFSTEP]\nsimpa using hx\n[GOAL]\ncase intro.intro.intro.refine'_3.refine'_2\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nA : IsOpen (ball 0 1)\nf : E → ℝ\nf_support : support f = ball 0 1\nf_smooth : ContDiff ℝ ⊤ f\nf_range : range f ⊆ Icc 0 1\nB : ∀ (x : E), f x ∈ Icc 0 1\nx : E\nhx : ¬x ∈ ball 0 1\nI1 : ¬x ∈ support f\nI2 : ¬-x ∈ support f\n⊢ (f x + f (-x)) / 2 = 0\n[PROOFSTEP]\nsimp only [mem_support, Classical.not_not] at I1 I2 \n[GOAL]\ncase intro.intro.intro.refine'_3.refine'_2\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nA : IsOpen (ball 0 1)\nf : E → ℝ\nf_support : support f = ball 0 1\nf_smooth : ContDiff ℝ ⊤ f\nf_range : range f ⊆ Icc 0 1\nB : ∀ (x : E), f x ∈ Icc 0 1\nx : E\nhx : ¬x ∈ ball 0 1\nI1 : f x = 0\nI2 : f (-x) = 0\n⊢ (f x + f (-x)) / 2 = 0\n[PROOFSTEP]\nsimp only [I1, I2, add_zero, zero_div]\n[GOAL]\ncase intro.intro.intro.refine'_4\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nA : IsOpen (ball 0 1)\nf : E → ℝ\nf_support : support f = ball 0 1\nf_smooth : ContDiff ℝ ⊤ f\nf_range : range f ⊆ Icc 0 1\nB : ∀ (x : E), f x ∈ Icc 0 1\n⊢ ∀ (x : E), (fun x => (f x + f (-x)) / 2) (-x) = (fun x => (f x + f (-x)) / 2) x\n[PROOFSTEP]\nintro x\n[GOAL]\ncase intro.intro.intro.refine'_4\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nA : IsOpen (ball 0 1)\nf : E → ℝ\nf_support : support f = ball 0 1\nf_smooth : ContDiff ℝ ⊤ f\nf_range : range f ⊆ Icc 0 1\nB : ∀ (x : E), f x ∈ Icc 0 1\nx : E\n⊢ (fun x => (f x + f (-x)) / 2) (-x) = (fun x => (f x + f (-x)) / 2) x\n[PROOFSTEP]\nsimp only [add_comm, neg_neg]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\n⊢ HasCompactSupport u\n[PROOFSTEP]\nrw [hasCompactSupport_def, u_support, closure_ball (0 : E) one_ne_zero]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\n⊢ IsCompact (closedBall 0 1)\n[PROOFSTEP]\nexact isCompact_closedBall _ _\n[GOAL]\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\n⊢ 0 < ∫ (x : E), u x ∂μ\n[PROOFSTEP]\nrefine' (integral_pos_iff_support_of_nonneg u_nonneg _).mpr _\n[GOAL]\ncase refine'_1\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\n⊢ Integrable fun i => u i\n[PROOFSTEP]\nexact (u_continuous E).integrable_of_hasCompactSupport (u_compact_support E)\n[GOAL]\ncase refine'_2\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\n⊢ 0 < ↑↑μ (support fun i => u i)\n[PROOFSTEP]\nrw [u_support]\n[GOAL]\ncase refine'_2\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\n⊢ 0 < ↑↑μ (ball 0 1)\n[PROOFSTEP]\nexact measure_ball_pos _ _ zero_lt_one\n[GOAL]\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\n⊢ w D = fun x => ((∫ (x : E), u x ∂μ) * |D| ^ ↑(finrank ℝ E))⁻¹ • u (D⁻¹ • x)\n[PROOFSTEP]\next1 x\n[GOAL]\ncase h\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\nx : E\n⊢ w D x = ((∫ (x : E), u x ∂μ) * |D| ^ ↑(finrank ℝ E))⁻¹ • u (D⁻¹ • x)\n[PROOFSTEP]\nrfl\n[GOAL]\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\nx : E\n⊢ 0 ≤ w D x\n[PROOFSTEP]\napply mul_nonneg _ (u_nonneg _)\n[GOAL]\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\nx : E\n⊢ 0 ≤ ((∫ (x : E), u x ∂μ) * |D| ^ ↑(finrank ℝ E))⁻¹\n[PROOFSTEP]\napply inv_nonneg.2\n[GOAL]\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\nx : E\n⊢ 0 ≤ (∫ (x : E), u x ∂μ) * |D| ^ ↑(finrank ℝ E)\n[PROOFSTEP]\napply mul_nonneg (u_int_pos E).le\n[GOAL]\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\nx : E\n⊢ 0 ≤ |D| ^ ↑(finrank ℝ E)\n[PROOFSTEP]\nnorm_cast\n[GOAL]\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\nx : E\n⊢ 0 ≤ |D| ^ finrank ℝ E\n[PROOFSTEP]\napply pow_nonneg (abs_nonneg D)\n[GOAL]\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\nx y : E\n⊢ ∀ (a : E), a ∈ closedBall 0 1 → 0 ≤ 1\n[PROOFSTEP]\nsimp only [zero_le_one, imp_true_iff]\n[GOAL]\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\nDpos : 0 < D\n⊢ ∫ (x : E), w D x ∂μ = 1\n[PROOFSTEP]\nsimp_rw [w, integral_smul]\n[GOAL]\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\nDpos : 0 < D\n⊢ ((∫ (x : E), u x ∂μ) * |D| ^ ↑(finrank ℝ E))⁻¹ • ∫ (a : E), u (D⁻¹ • a) ∂μ = 1\n[PROOFSTEP]\nrw [integral_comp_inv_smul_of_nonneg μ (u : E → ℝ) Dpos.le, abs_of_nonneg Dpos.le, mul_comm]\n[GOAL]\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\nDpos : 0 < D\n⊢ (D ^ ↑(finrank ℝ E) * ∫ (x : E), u x ∂μ)⁻¹ • D ^ finrank ℝ E • ∫ (x : E), u x ∂μ = 1\n[PROOFSTEP]\nfield_simp [Dpos.ne', (u_int_pos E).ne']\n[GOAL]\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\nDpos : 0 < D\n⊢ support (w D) = ball 0 D\n[PROOFSTEP]\nhave B : D • ball (0 : E) 1 = ball 0 D := by rw [smul_unitBall Dpos.ne', Real.norm_of_nonneg Dpos.le]\n[GOAL]\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\nDpos : 0 < D\n⊢ D • ball 0 1 = ball 0 D\n[PROOFSTEP]\nrw [smul_unitBall Dpos.ne', Real.norm_of_nonneg Dpos.le]\n[GOAL]\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\nDpos : 0 < D\nB : D • ball 0 1 = ball 0 D\n⊢ support (w D) = ball 0 D\n[PROOFSTEP]\nhave C : D ^ finrank ℝ E ≠ 0 := by\n  norm_cast\n  exact pow_ne_zero _ Dpos.ne'\n[GOAL]\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\nDpos : 0 < D\nB : D • ball 0 1 = ball 0 D\n⊢ D ^ ↑(finrank ℝ E) ≠ 0\n[PROOFSTEP]\nnorm_cast\n[GOAL]\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\nDpos : 0 < D\nB : D • ball 0 1 = ball 0 D\n⊢ ¬D ^ finrank ℝ E = 0\n[PROOFSTEP]\nexact pow_ne_zero _ Dpos.ne'\n[GOAL]\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\nDpos : 0 < D\nB : D • ball 0 1 = ball 0 D\nC : D ^ ↑(finrank ℝ E) ≠ 0\n⊢ support (w D) = ball 0 D\n[PROOFSTEP]\nsimp only [w_def, Algebra.id.smul_eq_mul, support_mul, support_inv, univ_inter, support_comp_inv_smul₀ Dpos.ne',\n  u_support, B, support_const (u_int_pos E).ne', support_const C, abs_of_nonneg Dpos.le]\n[GOAL]\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\nDpos : 0 < D\n⊢ HasCompactSupport (w D)\n[PROOFSTEP]\nrw [hasCompactSupport_def, w_support E Dpos, closure_ball (0 : E) Dpos.ne']\n[GOAL]\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\nDpos : 0 < D\n⊢ IsCompact (closedBall 0 D)\n[PROOFSTEP]\nexact isCompact_closedBall _ _\n[GOAL]\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\nx : E\n⊢ y D (-x) = y D x\n[PROOFSTEP]\napply convolution_neg_of_neg_eq\n[GOAL]\ncase h1\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\nx : E\n⊢ ∀ᵐ (x : E) ∂μ, w D (-x) = w D x\n[PROOFSTEP]\napply eventually_of_forall fun x => _\n[GOAL]\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\nx : E\n⊢ ∀ (x : E), w D (-x) = w D x\n[PROOFSTEP]\nsimp only [w_def, Real.rpow_nat_cast, mul_inv_rev, smul_neg, u_neg, smul_eq_mul, forall_const]\n[GOAL]\ncase h2\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\nx : E\n⊢ ∀ᵐ (x : E) ∂μ, φ (-x) = φ x\n[PROOFSTEP]\napply eventually_of_forall fun x => _\n[GOAL]\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\nx : E\n⊢ ∀ (x : E), φ (-x) = φ x\n[PROOFSTEP]\nsimp only [φ, indicator, mem_closedBall, dist_zero_right, norm_neg, forall_const]\n[GOAL]\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\nx : E\nDpos : 0 < D\nhx : x ∈ closedBall 0 (1 - D)\n⊢ y D x = 1\n[PROOFSTEP]\nchange (w D ⋆[lsmul ℝ ℝ, μ] φ) x = 1\n[GOAL]\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\nx : E\nDpos : 0 < D\nhx : x ∈ closedBall 0 (1 - D)\n⊢ w D ⋆[lsmul ℝ ℝ, x] φ = 1\n[PROOFSTEP]\nhave B : ∀ y : E, y ∈ ball x D → φ y = 1 :=\n  by\n  have C : ball x D ⊆ ball 0 1 := by\n    apply ball_subset_ball'\n    simp only [mem_closedBall] at hx \n    linarith only [hx]\n  intro y hy\n  simp only [φ, indicator, mem_closedBall, ite_eq_left_iff, not_le, zero_ne_one]\n  intro h'y\n  linarith only [mem_ball.1 (C hy), h'y]\n[GOAL]\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\nx : E\nDpos : 0 < D\nhx : x ∈ closedBall 0 (1 - D)\n⊢ ∀ (y : E), y ∈ ball x D → φ y = 1\n[PROOFSTEP]\nhave C : ball x D ⊆ ball 0 1 := by\n  apply ball_subset_ball'\n  simp only [mem_closedBall] at hx \n  linarith only [hx]\n[GOAL]\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\nx : E\nDpos : 0 < D\nhx : x ∈ closedBall 0 (1 - D)\n⊢ ball x D ⊆ ball 0 1\n[PROOFSTEP]\napply ball_subset_ball'\n[GOAL]\ncase h\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\nx : E\nDpos : 0 < D\nhx : x ∈ closedBall 0 (1 - D)\n⊢ D + dist x 0 ≤ 1\n[PROOFSTEP]\nsimp only [mem_closedBall] at hx \n[GOAL]\ncase h\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\nx : E\nDpos : 0 < D\nhx : dist x 0 ≤ 1 - D\n⊢ D + dist x 0 ≤ 1\n[PROOFSTEP]\nlinarith only [hx]\n[GOAL]\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\nx : E\nDpos : 0 < D\nhx : x ∈ closedBall 0 (1 - D)\nC : ball x D ⊆ ball 0 1\n⊢ ∀ (y : E), y ∈ ball x D → φ y = 1\n[PROOFSTEP]\nintro y hy\n[GOAL]\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\nx : E\nDpos : 0 < D\nhx : x ∈ closedBall 0 (1 - D)\nC : ball x D ⊆ ball 0 1\ny : E\nhy : y ∈ ball x D\n⊢ φ y = 1\n[PROOFSTEP]\nsimp only [φ, indicator, mem_closedBall, ite_eq_left_iff, not_le, zero_ne_one]\n[GOAL]\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\nx : E\nDpos : 0 < D\nhx : x ∈ closedBall 0 (1 - D)\nC : ball x D ⊆ ball 0 1\ny : E\nhy : y ∈ ball x D\n⊢ 1 < dist y 0 → False\n[PROOFSTEP]\nintro h'y\n[GOAL]\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\nx : E\nDpos : 0 < D\nhx : x ∈ closedBall 0 (1 - D)\nC : ball x D ⊆ ball 0 1\ny : E\nhy : y ∈ ball x D\nh'y : 1 < dist y 0\n⊢ False\n[PROOFSTEP]\nlinarith only [mem_ball.1 (C hy), h'y]\n[GOAL]\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\nx : E\nDpos : 0 < D\nhx : x ∈ closedBall 0 (1 - D)\nB : ∀ (y : E), y ∈ ball x D → φ y = 1\n⊢ w D ⋆[lsmul ℝ ℝ, x] φ = 1\n[PROOFSTEP]\nhave Bx : φ x = 1 := B _ (mem_ball_self Dpos)\n[GOAL]\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\nx : E\nDpos : 0 < D\nhx : x ∈ closedBall 0 (1 - D)\nB : ∀ (y : E), y ∈ ball x D → φ y = 1\nBx : φ x = 1\n⊢ w D ⋆[lsmul ℝ ℝ, x] φ = 1\n[PROOFSTEP]\nhave B' : ∀ y, y ∈ ball x D → φ y = φ x := by rw [Bx]; exact B\n[GOAL]\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\nx : E\nDpos : 0 < D\nhx : x ∈ closedBall 0 (1 - D)\nB : ∀ (y : E), y ∈ ball x D → φ y = 1\nBx : φ x = 1\n⊢ ∀ (y : E), y ∈ ball x D → φ y = φ x\n[PROOFSTEP]\nrw [Bx]\n[GOAL]\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\nx : E\nDpos : 0 < D\nhx : x ∈ closedBall 0 (1 - D)\nB : ∀ (y : E), y ∈ ball x D → φ y = 1\nBx : φ x = 1\n⊢ ∀ (y : E), y ∈ ball x D → φ y = 1\n[PROOFSTEP]\nexact B\n[GOAL]\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\nx : E\nDpos : 0 < D\nhx : x ∈ closedBall 0 (1 - D)\nB : ∀ (y : E), y ∈ ball x D → φ y = 1\nBx : φ x = 1\nB' : ∀ (y : E), y ∈ ball x D → φ y = φ x\n⊢ w D ⋆[lsmul ℝ ℝ, x] φ = 1\n[PROOFSTEP]\nrw [convolution_eq_right' _ (le_of_eq (w_support E Dpos)) B']\n[GOAL]\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\nx : E\nDpos : 0 < D\nhx : x ∈ closedBall 0 (1 - D)\nB : ∀ (y : E), y ∈ ball x D → φ y = 1\nBx : φ x = 1\nB' : ∀ (y : E), y ∈ ball x D → φ y = φ x\n⊢ ∫ (t : E), ↑(↑(lsmul ℝ ℝ) (w D t)) (φ x) ∂μ = 1\n[PROOFSTEP]\nsimp only [lsmul_apply, Algebra.id.smul_eq_mul, integral_mul_right, w_integral E Dpos, Bx, one_mul]\n[GOAL]\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\nx : E\nDpos : 0 < D\nhx : ¬x ∈ ball 0 (1 + D)\n⊢ y D x = 0\n[PROOFSTEP]\nchange (w D ⋆[lsmul ℝ ℝ, μ] φ) x = 0\n[GOAL]\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\nx : E\nDpos : 0 < D\nhx : ¬x ∈ ball 0 (1 + D)\n⊢ w D ⋆[lsmul ℝ ℝ, x] φ = 0\n[PROOFSTEP]\nhave B : ∀ y, y ∈ ball x D → φ y = 0 := by\n  intro y hy\n  simp only [φ, indicator, mem_closedBall_zero_iff, ite_eq_right_iff, one_ne_zero]\n  intro h'y\n  have C : ball y D ⊆ ball 0 (1 + D) := by\n    apply ball_subset_ball'\n    rw [← dist_zero_right] at h'y \n    linarith only [h'y]\n  exact hx (C (mem_ball_comm.1 hy))\n[GOAL]\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\nx : E\nDpos : 0 < D\nhx : ¬x ∈ ball 0 (1 + D)\n⊢ ∀ (y : E), y ∈ ball x D → φ y = 0\n[PROOFSTEP]\nintro y hy\n[GOAL]\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\nx : E\nDpos : 0 < D\nhx : ¬x ∈ ball 0 (1 + D)\ny : E\nhy : y ∈ ball x D\n⊢ φ y = 0\n[PROOFSTEP]\nsimp only [φ, indicator, mem_closedBall_zero_iff, ite_eq_right_iff, one_ne_zero]\n[GOAL]\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\nx : E\nDpos : 0 < D\nhx : ¬x ∈ ball 0 (1 + D)\ny : E\nhy : y ∈ ball x D\n⊢ ‖y‖ ≤ 1 → False\n[PROOFSTEP]\nintro h'y\n[GOAL]\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\nx : E\nDpos : 0 < D\nhx : ¬x ∈ ball 0 (1 + D)\ny : E\nhy : y ∈ ball x D\nh'y : ‖y‖ ≤ 1\n⊢ False\n[PROOFSTEP]\nhave C : ball y D ⊆ ball 0 (1 + D) := by\n  apply ball_subset_ball'\n  rw [← dist_zero_right] at h'y \n  linarith only [h'y]\n[GOAL]\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\nx : E\nDpos : 0 < D\nhx : ¬x ∈ ball 0 (1 + D)\ny : E\nhy : y ∈ ball x D\nh'y : ‖y‖ ≤ 1\n⊢ ball y D ⊆ ball 0 (1 + D)\n[PROOFSTEP]\napply ball_subset_ball'\n[GOAL]\ncase h\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\nx : E\nDpos : 0 < D\nhx : ¬x ∈ ball 0 (1 + D)\ny : E\nhy : y ∈ ball x D\nh'y : ‖y‖ ≤ 1\n⊢ D + dist y 0 ≤ 1 + D\n[PROOFSTEP]\nrw [← dist_zero_right] at h'y \n[GOAL]\ncase h\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\nx : E\nDpos : 0 < D\nhx : ¬x ∈ ball 0 (1 + D)\ny : E\nhy : y ∈ ball x D\nh'y : dist y 0 ≤ 1\n⊢ D + dist y 0 ≤ 1 + D\n[PROOFSTEP]\nlinarith only [h'y]\n[GOAL]\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\nx : E\nDpos : 0 < D\nhx : ¬x ∈ ball 0 (1 + D)\ny : E\nhy : y ∈ ball x D\nh'y : ‖y‖ ≤ 1\nC : ball y D ⊆ ball 0 (1 + D)\n⊢ False\n[PROOFSTEP]\nexact hx (C (mem_ball_comm.1 hy))\n[GOAL]\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\nx : E\nDpos : 0 < D\nhx : ¬x ∈ ball 0 (1 + D)\nB : ∀ (y : E), y ∈ ball x D → φ y = 0\n⊢ w D ⋆[lsmul ℝ ℝ, x] φ = 0\n[PROOFSTEP]\nhave Bx : φ x = 0 := B _ (mem_ball_self Dpos)\n[GOAL]\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\nx : E\nDpos : 0 < D\nhx : ¬x ∈ ball 0 (1 + D)\nB : ∀ (y : E), y ∈ ball x D → φ y = 0\nBx : φ x = 0\n⊢ w D ⋆[lsmul ℝ ℝ, x] φ = 0\n[PROOFSTEP]\nhave B' : ∀ y, y ∈ ball x D → φ y = φ x := by rw [Bx]; exact B\n[GOAL]\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\nx : E\nDpos : 0 < D\nhx : ¬x ∈ ball 0 (1 + D)\nB : ∀ (y : E), y ∈ ball x D → φ y = 0\nBx : φ x = 0\n⊢ ∀ (y : E), y ∈ ball x D → φ y = φ x\n[PROOFSTEP]\nrw [Bx]\n[GOAL]\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\nx : E\nDpos : 0 < D\nhx : ¬x ∈ ball 0 (1 + D)\nB : ∀ (y : E), y ∈ ball x D → φ y = 0\nBx : φ x = 0\n⊢ ∀ (y : E), y ∈ ball x D → φ y = 0\n[PROOFSTEP]\nexact B\n[GOAL]\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\nx : E\nDpos : 0 < D\nhx : ¬x ∈ ball 0 (1 + D)\nB : ∀ (y : E), y ∈ ball x D → φ y = 0\nBx : φ x = 0\nB' : ∀ (y : E), y ∈ ball x D → φ y = φ x\n⊢ w D ⋆[lsmul ℝ ℝ, x] φ = 0\n[PROOFSTEP]\nrw [convolution_eq_right' _ (le_of_eq (w_support E Dpos)) B']\n[GOAL]\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\nx : E\nDpos : 0 < D\nhx : ¬x ∈ ball 0 (1 + D)\nB : ∀ (y : E), y ∈ ball x D → φ y = 0\nBx : φ x = 0\nB' : ∀ (y : E), y ∈ ball x D → φ y = φ x\n⊢ ∫ (t : E), ↑(↑(lsmul ℝ ℝ) (w D t)) (φ x) ∂μ = 0\n[PROOFSTEP]\nsimp only [lsmul_apply, Algebra.id.smul_eq_mul, Bx, mul_zero, integral_const]\n[GOAL]\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\nx : E\nDpos : 0 < D\n⊢ y D x ≤ 1\n[PROOFSTEP]\nhave A : (w D ⋆[lsmul ℝ ℝ, μ] φ) x ≤ (w D ⋆[lsmul ℝ ℝ, μ] 1) x :=\n  by\n  apply convolution_mono_right_of_nonneg _ (w_nonneg D) (indicator_le_self' fun x _ => zero_le_one) fun _ => zero_le_one\n  refine'\n    (HasCompactSupport.convolutionExistsLeft _ (w_compact_support E Dpos) _ (locallyIntegrable_const (1 : ℝ))\n        x).integrable\n  exact continuous_const.mul ((u_continuous E).comp (continuous_id.const_smul _))\n[GOAL]\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\nx : E\nDpos : 0 < D\n⊢ w D ⋆[lsmul ℝ ℝ, x] φ ≤ w D ⋆[lsmul ℝ ℝ, x] 1\n[PROOFSTEP]\napply convolution_mono_right_of_nonneg _ (w_nonneg D) (indicator_le_self' fun x _ => zero_le_one) fun _ => zero_le_one\n[GOAL]\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\nx : E\nDpos : 0 < D\n⊢ ConvolutionExistsAt (fun x => w D x) (fun x => 1) x (lsmul ℝ ℝ)\n[PROOFSTEP]\nrefine'\n  (HasCompactSupport.convolutionExistsLeft _ (w_compact_support E Dpos) _ (locallyIntegrable_const (1 : ℝ))\n      x).integrable\n[GOAL]\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\nx : E\nDpos : 0 < D\n⊢ Continuous (w D)\n[PROOFSTEP]\nexact continuous_const.mul ((u_continuous E).comp (continuous_id.const_smul _))\n[GOAL]\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\nx : E\nDpos : 0 < D\nA : w D ⋆[lsmul ℝ ℝ, x] φ ≤ w D ⋆[lsmul ℝ ℝ, x] 1\n⊢ y D x ≤ 1\n[PROOFSTEP]\nhave B : (w D ⋆[lsmul ℝ ℝ, μ] fun _ => (1 : ℝ)) x = 1 := by\n  simp only [convolution, ContinuousLinearMap.map_smul, mul_inv_rev, coe_smul', mul_one, lsmul_apply,\n    Algebra.id.smul_eq_mul, integral_mul_left, w_integral E Dpos, Pi.smul_apply]\n[GOAL]\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\nx : E\nDpos : 0 < D\nA : w D ⋆[lsmul ℝ ℝ, x] φ ≤ w D ⋆[lsmul ℝ ℝ, x] 1\n⊢ (w D ⋆[lsmul ℝ ℝ, x] fun x => 1) = 1\n[PROOFSTEP]\nsimp only [convolution, ContinuousLinearMap.map_smul, mul_inv_rev, coe_smul', mul_one, lsmul_apply,\n  Algebra.id.smul_eq_mul, integral_mul_left, w_integral E Dpos, Pi.smul_apply]\n[GOAL]\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\nx : E\nDpos : 0 < D\nA : w D ⋆[lsmul ℝ ℝ, x] φ ≤ w D ⋆[lsmul ℝ ℝ, x] 1\nB : (w D ⋆[lsmul ℝ ℝ, x] fun x => 1) = 1\n⊢ y D x ≤ 1\n[PROOFSTEP]\nexact A.trans (le_of_eq B)\n[GOAL]\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\nx : E\nDpos : 0 < D\nD_lt_one : D < 1\nhx : x ∈ ball 0 (1 + D)\n⊢ 0 < y D x\n[PROOFSTEP]\nsimp only [mem_ball_zero_iff] at hx \n[GOAL]\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\nx : E\nDpos : 0 < D\nD_lt_one : D < 1\nhx : ‖x‖ < 1 + D\n⊢ 0 < y D x\n[PROOFSTEP]\nrefine' (integral_pos_iff_support_of_nonneg (w_mul_φ_nonneg D x) _).2 _\n[GOAL]\ncase refine'_1\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\nx : E\nDpos : 0 < D\nD_lt_one : D < 1\nhx : ‖x‖ < 1 + D\n⊢ Integrable fun i => w D i * φ (x - i)\n[PROOFSTEP]\nhave F_comp : HasCompactSupport (w D) := w_compact_support E Dpos\n[GOAL]\ncase refine'_1\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\nx : E\nDpos : 0 < D\nD_lt_one : D < 1\nhx : ‖x‖ < 1 + D\nF_comp : HasCompactSupport (w D)\n⊢ Integrable fun i => w D i * φ (x - i)\n[PROOFSTEP]\nhave B : LocallyIntegrable (φ : E → ℝ) μ := (locallyIntegrable_const _).indicator measurableSet_closedBall\n[GOAL]\ncase refine'_1\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\nx : E\nDpos : 0 < D\nD_lt_one : D < 1\nhx : ‖x‖ < 1 + D\nF_comp : HasCompactSupport (w D)\nB : LocallyIntegrable φ\n⊢ Integrable fun i => w D i * φ (x - i)\n[PROOFSTEP]\nhave C : Continuous (w D : E → ℝ) := continuous_const.mul ((u_continuous E).comp (continuous_id.const_smul _))\n[GOAL]\ncase refine'_1\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\nx : E\nDpos : 0 < D\nD_lt_one : D < 1\nhx : ‖x‖ < 1 + D\nF_comp : HasCompactSupport (w D)\nB : LocallyIntegrable φ\nC : Continuous (w D)\n⊢ Integrable fun i => w D i * φ (x - i)\n[PROOFSTEP]\nexact (HasCompactSupport.convolutionExistsLeft (lsmul ℝ ℝ : ℝ →L[ℝ] ℝ →L[ℝ] ℝ) F_comp C B x).integrable\n[GOAL]\ncase refine'_2\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\nx : E\nDpos : 0 < D\nD_lt_one : D < 1\nhx : ‖x‖ < 1 + D\n⊢ 0 < ↑↑μ (support fun i => w D i * φ (x - i))\n[PROOFSTEP]\nset z := (D / (1 + D)) • x with hz\n[GOAL]\ncase refine'_2\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\nx : E\nDpos : 0 < D\nD_lt_one : D < 1\nhx : ‖x‖ < 1 + D\nz : E := (D / (1 + D)) • x\nhz : z = (D / (1 + D)) • x\n⊢ 0 < ↑↑μ (support fun i => w D i * φ (x - i))\n[PROOFSTEP]\nhave B : 0 < 1 + D := by linarith\n[GOAL]\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\nx : E\nDpos : 0 < D\nD_lt_one : D < 1\nhx : ‖x‖ < 1 + D\nz : E := (D / (1 + D)) • x\nhz : z = (D / (1 + D)) • x\n⊢ 0 < 1 + D\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase refine'_2\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\nx : E\nDpos : 0 < D\nD_lt_one : D < 1\nhx : ‖x‖ < 1 + D\nz : E := (D / (1 + D)) • x\nhz : z = (D / (1 + D)) • x\nB : 0 < 1 + D\n⊢ 0 < ↑↑μ (support fun i => w D i * φ (x - i))\n[PROOFSTEP]\nhave C : ball z (D * (1 + D - ‖x‖) / (1 + D)) ⊆ support fun y : E => w D y * φ (x - y) :=\n  by\n  intro y hy\n  simp only [support_mul, w_support E Dpos]\n  simp only [φ, mem_inter_iff, mem_support, Ne.def, indicator_apply_eq_zero, mem_closedBall_zero_iff, one_ne_zero,\n    not_forall, not_false_iff, exists_prop, and_true_iff]\n  constructor\n  · apply ball_subset_ball' _ hy\n    simp only [hz, norm_smul, abs_of_nonneg Dpos.le, abs_of_nonneg B.le, dist_zero_right, Real.norm_eq_abs, abs_div]\n    simp only [div_le_iff B, field_simps]\n    ring_nf\n    rfl\n  · have ID : ‖D / (1 + D) - 1‖ = 1 / (1 + D) := by\n      rw [Real.norm_of_nonpos]\n      · simp only [B.ne', Ne.def, not_false_iff, mul_one, neg_sub, add_tsub_cancel_right, field_simps]\n      · simp only [B.ne', Ne.def, not_false_iff, mul_one, field_simps]\n        apply div_nonpos_of_nonpos_of_nonneg _ B.le\n        linarith only\n    rw [← mem_closedBall_iff_norm']\n    apply closedBall_subset_closedBall' _ (ball_subset_closedBall hy)\n    rw [← one_smul ℝ x, dist_eq_norm, hz, ← sub_smul, one_smul, norm_smul, ID]\n    simp only [B.ne', div_le_iff B, field_simps]\n    nlinarith only [hx, D_lt_one]\n[GOAL]\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\nx : E\nDpos : 0 < D\nD_lt_one : D < 1\nhx : ‖x‖ < 1 + D\nz : E := (D / (1 + D)) • x\nhz : z = (D / (1 + D)) • x\nB : 0 < 1 + D\n⊢ ball z (D * (1 + D - ‖x‖) / (1 + D)) ⊆ support fun y => w D y * φ (x - y)\n[PROOFSTEP]\nintro y hy\n[GOAL]\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\nx : E\nDpos : 0 < D\nD_lt_one : D < 1\nhx : ‖x‖ < 1 + D\nz : E := (D / (1 + D)) • x\nhz : z = (D / (1 + D)) • x\nB : 0 < 1 + D\ny : E\nhy : y ∈ ball z (D * (1 + D - ‖x‖) / (1 + D))\n⊢ y ∈ support fun y => w D y * φ (x - y)\n[PROOFSTEP]\nsimp only [support_mul, w_support E Dpos]\n[GOAL]\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\nx : E\nDpos : 0 < D\nD_lt_one : D < 1\nhx : ‖x‖ < 1 + D\nz : E := (D / (1 + D)) • x\nhz : z = (D / (1 + D)) • x\nB : 0 < 1 + D\ny : E\nhy : y ∈ ball z (D * (1 + D - ‖x‖) / (1 + D))\n⊢ y ∈ ball 0 D ∩ support fun x_1 => φ (x - x_1)\n[PROOFSTEP]\nsimp only [φ, mem_inter_iff, mem_support, Ne.def, indicator_apply_eq_zero, mem_closedBall_zero_iff, one_ne_zero,\n  not_forall, not_false_iff, exists_prop, and_true_iff]\n[GOAL]\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\nx : E\nDpos : 0 < D\nD_lt_one : D < 1\nhx : ‖x‖ < 1 + D\nz : E := (D / (1 + D)) • x\nhz : z = (D / (1 + D)) • x\nB : 0 < 1 + D\ny : E\nhy : y ∈ ball z (D * (1 + D - ‖x‖) / (1 + D))\n⊢ y ∈ ball 0 D ∧ ‖x - y‖ ≤ 1\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase left\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\nx : E\nDpos : 0 < D\nD_lt_one : D < 1\nhx : ‖x‖ < 1 + D\nz : E := (D / (1 + D)) • x\nhz : z = (D / (1 + D)) • x\nB : 0 < 1 + D\ny : E\nhy : y ∈ ball z (D * (1 + D - ‖x‖) / (1 + D))\n⊢ y ∈ ball 0 D\n[PROOFSTEP]\napply ball_subset_ball' _ hy\n[GOAL]\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\nx : E\nDpos : 0 < D\nD_lt_one : D < 1\nhx : ‖x‖ < 1 + D\nz : E := (D / (1 + D)) • x\nhz : z = (D / (1 + D)) • x\nB : 0 < 1 + D\ny : E\nhy : y ∈ ball z (D * (1 + D - ‖x‖) / (1 + D))\n⊢ D * (1 + D - ‖x‖) / (1 + D) + dist z 0 ≤ D\n[PROOFSTEP]\nsimp only [hz, norm_smul, abs_of_nonneg Dpos.le, abs_of_nonneg B.le, dist_zero_right, Real.norm_eq_abs, abs_div]\n[GOAL]\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\nx : E\nDpos : 0 < D\nD_lt_one : D < 1\nhx : ‖x‖ < 1 + D\nz : E := (D / (1 + D)) • x\nhz : z = (D / (1 + D)) • x\nB : 0 < 1 + D\ny : E\nhy : y ∈ ball z (D * (1 + D - ‖x‖) / (1 + D))\n⊢ D * (1 + D - ‖x‖) / (1 + D) + D / (1 + D) * ‖x‖ ≤ D\n[PROOFSTEP]\nsimp only [div_le_iff B, field_simps]\n[GOAL]\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\nx : E\nDpos : 0 < D\nD_lt_one : D < 1\nhx : ‖x‖ < 1 + D\nz : E := (D / (1 + D)) • x\nhz : z = (D / (1 + D)) • x\nB : 0 < 1 + D\ny : E\nhy : y ∈ ball z (D * (1 + D - ‖x‖) / (1 + D))\n⊢ D * (1 + D - ‖x‖) + D * ‖x‖ ≤ D * (1 + D)\n[PROOFSTEP]\nring_nf\n[GOAL]\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\nx : E\nDpos : 0 < D\nD_lt_one : D < 1\nhx : ‖x‖ < 1 + D\nz : E := (D / (1 + D)) • x\nhz : z = (D / (1 + D)) • x\nB : 0 < 1 + D\ny : E\nhy : y ∈ ball z (D * (1 + D - ‖x‖) / (1 + D))\n⊢ D + D ^ 2 ≤ D + D ^ 2\n[PROOFSTEP]\nrfl\n[GOAL]\ncase right\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\nx : E\nDpos : 0 < D\nD_lt_one : D < 1\nhx : ‖x‖ < 1 + D\nz : E := (D / (1 + D)) • x\nhz : z = (D / (1 + D)) • x\nB : 0 < 1 + D\ny : E\nhy : y ∈ ball z (D * (1 + D - ‖x‖) / (1 + D))\n⊢ ‖x - y‖ ≤ 1\n[PROOFSTEP]\nhave ID : ‖D / (1 + D) - 1‖ = 1 / (1 + D) := by\n  rw [Real.norm_of_nonpos]\n  · simp only [B.ne', Ne.def, not_false_iff, mul_one, neg_sub, add_tsub_cancel_right, field_simps]\n  · simp only [B.ne', Ne.def, not_false_iff, mul_one, field_simps]\n    apply div_nonpos_of_nonpos_of_nonneg _ B.le\n    linarith only\n[GOAL]\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\nx : E\nDpos : 0 < D\nD_lt_one : D < 1\nhx : ‖x‖ < 1 + D\nz : E := (D / (1 + D)) • x\nhz : z = (D / (1 + D)) • x\nB : 0 < 1 + D\ny : E\nhy : y ∈ ball z (D * (1 + D - ‖x‖) / (1 + D))\n⊢ ‖D / (1 + D) - 1‖ = 1 / (1 + D)\n[PROOFSTEP]\nrw [Real.norm_of_nonpos]\n[GOAL]\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\nx : E\nDpos : 0 < D\nD_lt_one : D < 1\nhx : ‖x‖ < 1 + D\nz : E := (D / (1 + D)) • x\nhz : z = (D / (1 + D)) • x\nB : 0 < 1 + D\ny : E\nhy : y ∈ ball z (D * (1 + D - ‖x‖) / (1 + D))\n⊢ -(D / (1 + D) - 1) = 1 / (1 + D)\n[PROOFSTEP]\nsimp only [B.ne', Ne.def, not_false_iff, mul_one, neg_sub, add_tsub_cancel_right, field_simps]\n[GOAL]\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\nx : E\nDpos : 0 < D\nD_lt_one : D < 1\nhx : ‖x‖ < 1 + D\nz : E := (D / (1 + D)) • x\nhz : z = (D / (1 + D)) • x\nB : 0 < 1 + D\ny : E\nhy : y ∈ ball z (D * (1 + D - ‖x‖) / (1 + D))\n⊢ D / (1 + D) - 1 ≤ 0\n[PROOFSTEP]\nsimp only [B.ne', Ne.def, not_false_iff, mul_one, field_simps]\n[GOAL]\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\nx : E\nDpos : 0 < D\nD_lt_one : D < 1\nhx : ‖x‖ < 1 + D\nz : E := (D / (1 + D)) • x\nhz : z = (D / (1 + D)) • x\nB : 0 < 1 + D\ny : E\nhy : y ∈ ball z (D * (1 + D - ‖x‖) / (1 + D))\n⊢ (D - (1 + D)) / (1 + D) ≤ 0\n[PROOFSTEP]\napply div_nonpos_of_nonpos_of_nonneg _ B.le\n[GOAL]\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\nx : E\nDpos : 0 < D\nD_lt_one : D < 1\nhx : ‖x‖ < 1 + D\nz : E := (D / (1 + D)) • x\nhz : z = (D / (1 + D)) • x\nB : 0 < 1 + D\ny : E\nhy : y ∈ ball z (D * (1 + D - ‖x‖) / (1 + D))\n⊢ D - (1 + D) ≤ 0\n[PROOFSTEP]\nlinarith only\n[GOAL]\ncase right\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\nx : E\nDpos : 0 < D\nD_lt_one : D < 1\nhx : ‖x‖ < 1 + D\nz : E := (D / (1 + D)) • x\nhz : z = (D / (1 + D)) • x\nB : 0 < 1 + D\ny : E\nhy : y ∈ ball z (D * (1 + D - ‖x‖) / (1 + D))\nID : ‖D / (1 + D) - 1‖ = 1 / (1 + D)\n⊢ ‖x - y‖ ≤ 1\n[PROOFSTEP]\nrw [← mem_closedBall_iff_norm']\n[GOAL]\ncase right\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\nx : E\nDpos : 0 < D\nD_lt_one : D < 1\nhx : ‖x‖ < 1 + D\nz : E := (D / (1 + D)) • x\nhz : z = (D / (1 + D)) • x\nB : 0 < 1 + D\ny : E\nhy : y ∈ ball z (D * (1 + D - ‖x‖) / (1 + D))\nID : ‖D / (1 + D) - 1‖ = 1 / (1 + D)\n⊢ y ∈ closedBall x 1\n[PROOFSTEP]\napply closedBall_subset_closedBall' _ (ball_subset_closedBall hy)\n[GOAL]\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\nx : E\nDpos : 0 < D\nD_lt_one : D < 1\nhx : ‖x‖ < 1 + D\nz : E := (D / (1 + D)) • x\nhz : z = (D / (1 + D)) • x\nB : 0 < 1 + D\ny : E\nhy : y ∈ ball z (D * (1 + D - ‖x‖) / (1 + D))\nID : ‖D / (1 + D) - 1‖ = 1 / (1 + D)\n⊢ D * (1 + D - ‖x‖) / (1 + D) + dist z x ≤ 1\n[PROOFSTEP]\nrw [← one_smul ℝ x, dist_eq_norm, hz, ← sub_smul, one_smul, norm_smul, ID]\n[GOAL]\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\nx : E\nDpos : 0 < D\nD_lt_one : D < 1\nhx : ‖x‖ < 1 + D\nz : E := (D / (1 + D)) • x\nhz : z = (D / (1 + D)) • x\nB : 0 < 1 + D\ny : E\nhy : y ∈ ball z (D * (1 + D - ‖x‖) / (1 + D))\nID : ‖D / (1 + D) - 1‖ = 1 / (1 + D)\n⊢ D * (1 + D - ‖x‖) / (1 + D) + 1 / (1 + D) * ‖x‖ ≤ 1\n[PROOFSTEP]\nsimp only [B.ne', div_le_iff B, field_simps]\n[GOAL]\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\nx : E\nDpos : 0 < D\nD_lt_one : D < 1\nhx : ‖x‖ < 1 + D\nz : E := (D / (1 + D)) • x\nhz : z = (D / (1 + D)) • x\nB : 0 < 1 + D\ny : E\nhy : y ∈ ball z (D * (1 + D - ‖x‖) / (1 + D))\nID : ‖D / (1 + D) - 1‖ = 1 / (1 + D)\n⊢ D * (1 + D - ‖x‖) + 1 * ‖x‖ ≤ 1 * (1 + D)\n[PROOFSTEP]\nnlinarith only [hx, D_lt_one]\n[GOAL]\ncase refine'_2\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\nx : E\nDpos : 0 < D\nD_lt_one : D < 1\nhx : ‖x‖ < 1 + D\nz : E := (D / (1 + D)) • x\nhz : z = (D / (1 + D)) • x\nB : 0 < 1 + D\nC : ball z (D * (1 + D - ‖x‖) / (1 + D)) ⊆ support fun y => w D y * φ (x - y)\n⊢ 0 < ↑↑μ (support fun i => w D i * φ (x - i))\n[PROOFSTEP]\napply lt_of_lt_of_le _ (measure_mono C)\n[GOAL]\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\nx : E\nDpos : 0 < D\nD_lt_one : D < 1\nhx : ‖x‖ < 1 + D\nz : E := (D / (1 + D)) • x\nhz : z = (D / (1 + D)) • x\nB : 0 < 1 + D\nC : ball z (D * (1 + D - ‖x‖) / (1 + D)) ⊆ support fun y => w D y * φ (x - y)\n⊢ 0 < ↑↑μ (ball z (D * (1 + D - ‖x‖) / (1 + D)))\n[PROOFSTEP]\napply measure_ball_pos\n[GOAL]\ncase hr\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\nx : E\nDpos : 0 < D\nD_lt_one : D < 1\nhx : ‖x‖ < 1 + D\nz : E := (D / (1 + D)) • x\nhz : z = (D / (1 + D)) • x\nB : 0 < 1 + D\nC : ball z (D * (1 + D - ‖x‖) / (1 + D)) ⊆ support fun y => w D y * φ (x - y)\n⊢ 0 < D * (1 + D - ‖x‖) / (1 + D)\n[PROOFSTEP]\nexact div_pos (mul_pos Dpos (by linarith only [hx])) B\n[GOAL]\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nD : ℝ\nx : E\nDpos : 0 < D\nD_lt_one : D < 1\nhx : ‖x‖ < 1 + D\nz : E := (D / (1 + D)) • x\nhz : z = (D / (1 + D)) • x\nB : 0 < 1 + D\nC : ball z (D * (1 + D - ‖x‖) / (1 + D)) ⊆ support fun y => w D y * φ (x - y)\n⊢ 0 < 1 + D - ‖x‖\n[PROOFSTEP]\nlinarith only [hx]\n[GOAL]\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\n⊢ ContDiffOn ℝ ⊤ (uncurry y) (Ioo 0 1 ×ˢ univ)\n[PROOFSTEP]\nhave hs : IsOpen (Ioo (0 : ℝ) (1 : ℝ)) := isOpen_Ioo\n[GOAL]\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nhs : IsOpen (Ioo 0 1)\n⊢ ContDiffOn ℝ ⊤ (uncurry y) (Ioo 0 1 ×ˢ univ)\n[PROOFSTEP]\nhave hk : IsCompact (closedBall (0 : E) 1) := ProperSpace.isCompact_closedBall _ _\n[GOAL]\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nhs : IsOpen (Ioo 0 1)\nhk : IsCompact (closedBall 0 1)\n⊢ ContDiffOn ℝ ⊤ (uncurry y) (Ioo 0 1 ×ˢ univ)\n[PROOFSTEP]\nrefine' contDiffOn_convolution_left_with_param (lsmul ℝ ℝ) hs hk _ _ _\n[GOAL]\ncase refine'_1\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nhs : IsOpen (Ioo 0 1)\nhk : IsCompact (closedBall 0 1)\n⊢ ∀ (p : ℝ) (x : E), p ∈ Ioo 0 1 → ¬x ∈ closedBall 0 1 → w p x = 0\n[PROOFSTEP]\nrintro p x hp hx\n[GOAL]\ncase refine'_1\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nhs : IsOpen (Ioo 0 1)\nhk : IsCompact (closedBall 0 1)\np : ℝ\nx : E\nhp : p ∈ Ioo 0 1\nhx : ¬x ∈ closedBall 0 1\n⊢ w p x = 0\n[PROOFSTEP]\nsimp only [w, mul_inv_rev, Algebra.id.smul_eq_mul, mul_eq_zero, inv_eq_zero]\n[GOAL]\ncase refine'_1\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nhs : IsOpen (Ioo 0 1)\nhk : IsCompact (closedBall 0 1)\np : ℝ\nx : E\nhp : p ∈ Ioo 0 1\nhx : ¬x ∈ closedBall 0 1\n⊢ (|p| ^ ↑(finrank ℝ E) = 0 ∨ ∫ (x : E), u x ∂μ = 0) ∨ u (p⁻¹ • x) = 0\n[PROOFSTEP]\nright\n[GOAL]\ncase refine'_1.h\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nhs : IsOpen (Ioo 0 1)\nhk : IsCompact (closedBall 0 1)\np : ℝ\nx : E\nhp : p ∈ Ioo 0 1\nhx : ¬x ∈ closedBall 0 1\n⊢ u (p⁻¹ • x) = 0\n[PROOFSTEP]\ncontrapose! hx\n[GOAL]\ncase refine'_1.h\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nhs : IsOpen (Ioo 0 1)\nhk : IsCompact (closedBall 0 1)\np : ℝ\nx : E\nhp : p ∈ Ioo 0 1\nhx : u (p⁻¹ • x) ≠ 0\n⊢ x ∈ closedBall 0 1\n[PROOFSTEP]\nhave : p⁻¹ • x ∈ support u := mem_support.2 hx\n[GOAL]\ncase refine'_1.h\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nhs : IsOpen (Ioo 0 1)\nhk : IsCompact (closedBall 0 1)\np : ℝ\nx : E\nhp : p ∈ Ioo 0 1\nhx : u (p⁻¹ • x) ≠ 0\nthis : p⁻¹ • x ∈ support u\n⊢ x ∈ closedBall 0 1\n[PROOFSTEP]\nsimp only [u_support, norm_smul, mem_ball_zero_iff, Real.norm_eq_abs, abs_inv, abs_of_nonneg hp.1.le, ← div_eq_inv_mul,\n  div_lt_one hp.1] at this \n[GOAL]\ncase refine'_1.h\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nhs : IsOpen (Ioo 0 1)\nhk : IsCompact (closedBall 0 1)\np : ℝ\nx : E\nhp : p ∈ Ioo 0 1\nhx : u (p⁻¹ • x) ≠ 0\nthis : ‖x‖ < p\n⊢ x ∈ closedBall 0 1\n[PROOFSTEP]\nrw [mem_closedBall_zero_iff]\n[GOAL]\ncase refine'_1.h\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nhs : IsOpen (Ioo 0 1)\nhk : IsCompact (closedBall 0 1)\np : ℝ\nx : E\nhp : p ∈ Ioo 0 1\nhx : u (p⁻¹ • x) ≠ 0\nthis : ‖x‖ < p\n⊢ ‖x‖ ≤ 1\n[PROOFSTEP]\nexact this.le.trans hp.2.le\n[GOAL]\ncase refine'_2\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nhs : IsOpen (Ioo 0 1)\nhk : IsCompact (closedBall 0 1)\n⊢ LocallyIntegrable φ\n[PROOFSTEP]\nexact (locallyIntegrable_const _).indicator measurableSet_closedBall\n[GOAL]\ncase refine'_3\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nhs : IsOpen (Ioo 0 1)\nhk : IsCompact (closedBall 0 1)\n⊢ ContDiffOn ℝ ⊤ (↿w) (Ioo 0 1 ×ˢ univ)\n[PROOFSTEP]\napply ContDiffOn.mul\n[GOAL]\ncase refine'_3.hf\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nhs : IsOpen (Ioo 0 1)\nhk : IsCompact (closedBall 0 1)\n⊢ ContDiffOn ℝ ⊤ (fun x => ((∫ (x : E), u x ∂μ) * |x.fst| ^ ↑(finrank ℝ E))⁻¹) (Ioo 0 1 ×ˢ univ)\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase refine'_3.hf\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nhs : IsOpen (Ioo 0 1)\nhk : IsCompact (closedBall 0 1)\n⊢ ContDiffOn ℝ ⊤ (fun x => ((∫ (x : E), u x ∂μ) * |x.fst| ^ finrank ℝ E)⁻¹) (Ioo 0 1 ×ˢ univ)\n[PROOFSTEP]\nrefine'\n  (contDiffOn_const.mul _).inv fun x hx =>\n    ne_of_gt (mul_pos (u_int_pos E) (pow_pos (abs_pos_of_pos hx.1.1) (finrank ℝ E)))\n[GOAL]\ncase refine'_3.hf\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nhs : IsOpen (Ioo 0 1)\nhk : IsCompact (closedBall 0 1)\n⊢ ContDiffOn ℝ ⊤ (fun x => |x.fst| ^ finrank ℝ E) (Ioo 0 1 ×ˢ univ)\n[PROOFSTEP]\napply ContDiffOn.pow\n[GOAL]\ncase refine'_3.hf.hf\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nhs : IsOpen (Ioo 0 1)\nhk : IsCompact (closedBall 0 1)\n⊢ ContDiffOn ℝ ⊤ (fun y => |y.fst|) (Ioo 0 1 ×ˢ univ)\n[PROOFSTEP]\nsimp_rw [← Real.norm_eq_abs]\n[GOAL]\ncase refine'_3.hf.hf\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nhs : IsOpen (Ioo 0 1)\nhk : IsCompact (closedBall 0 1)\n⊢ ContDiffOn ℝ ⊤ (fun y => ‖y.fst‖) (Ioo 0 1 ×ˢ univ)\n[PROOFSTEP]\napply @ContDiffOn.norm ℝ\n[GOAL]\ncase refine'_3.hf.hf.hf\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nhs : IsOpen (Ioo 0 1)\nhk : IsCompact (closedBall 0 1)\n⊢ ContDiffOn ℝ ⊤ (fun y => y.fst) (Ioo 0 1 ×ˢ univ)\n[PROOFSTEP]\nexact contDiffOn_fst\n[GOAL]\ncase refine'_3.hf.hf.h0\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nhs : IsOpen (Ioo 0 1)\nhk : IsCompact (closedBall 0 1)\n⊢ ∀ (x : ℝ × E), x ∈ Ioo 0 1 ×ˢ univ → x.fst ≠ 0\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase refine'_3.hf.hf.h0\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nhs : IsOpen (Ioo 0 1)\nhk : IsCompact (closedBall 0 1)\nx : ℝ × E\nhx : x ∈ Ioo 0 1 ×ˢ univ\n⊢ x.fst ≠ 0\n[PROOFSTEP]\nexact ne_of_gt hx.1.1\n[GOAL]\ncase refine'_3.hg\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nhs : IsOpen (Ioo 0 1)\nhk : IsCompact (closedBall 0 1)\n⊢ ContDiffOn ℝ ⊤ (fun x => u (x.fst⁻¹ • x.snd)) (Ioo 0 1 ×ˢ univ)\n[PROOFSTEP]\napply (u_smooth E).comp_contDiffOn\n[GOAL]\ncase refine'_3.hg\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace ℝ E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nhs : IsOpen (Ioo 0 1)\nhk : IsCompact (closedBall 0 1)\n⊢ ContDiffOn ℝ ⊤ (fun x => x.fst⁻¹ • x.snd) (Ioo 0 1 ×ˢ univ)\n[PROOFSTEP]\nexact ContDiffOn.smul (contDiffOn_fst.inv fun x hx => ne_of_gt hx.1.1) contDiffOn_snd\n[GOAL]\nE✝ : Type u_1\ninst✝⁵ : NormedAddCommGroup E✝\ninst✝⁴ : NormedSpace ℝ E✝\ninst✝³ : FiniteDimensional ℝ E✝\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\n⊢ HasContDiffBump E\n[PROOFSTEP]\nrefine' ⟨⟨_⟩⟩\n[GOAL]\nE✝ : Type u_1\ninst✝⁵ : NormedAddCommGroup E✝\ninst✝⁴ : NormedSpace ℝ E✝\ninst✝³ : FiniteDimensional ℝ E✝\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\n⊢ ContDiffBumpBase E\n[PROOFSTEP]\nborelize E\n[GOAL]\nE✝ : Type u_1\ninst✝⁵ : NormedAddCommGroup E✝\ninst✝⁴ : NormedSpace ℝ E✝\ninst✝³ : FiniteDimensional ℝ E✝\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\n⊢ ContDiffBumpBase E\n[PROOFSTEP]\nhave IR : ∀ R : ℝ, 1 < R → 0 < (R - 1) / (R + 1) := by intro R hR; apply div_pos <;> linarith\n[GOAL]\nE✝ : Type u_1\ninst✝⁵ : NormedAddCommGroup E✝\ninst✝⁴ : NormedSpace ℝ E✝\ninst✝³ : FiniteDimensional ℝ E✝\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\n⊢ ∀ (R : ℝ), 1 < R → 0 < (R - 1) / (R + 1)\n[PROOFSTEP]\nintro R hR\n[GOAL]\nE✝ : Type u_1\ninst✝⁵ : NormedAddCommGroup E✝\ninst✝⁴ : NormedSpace ℝ E✝\ninst✝³ : FiniteDimensional ℝ E✝\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nR : ℝ\nhR : 1 < R\n⊢ 0 < (R - 1) / (R + 1)\n[PROOFSTEP]\napply div_pos\n[GOAL]\ncase ha\nE✝ : Type u_1\ninst✝⁵ : NormedAddCommGroup E✝\ninst✝⁴ : NormedSpace ℝ E✝\ninst✝³ : FiniteDimensional ℝ E✝\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nR : ℝ\nhR : 1 < R\n⊢ 0 < R - 1\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase hb\nE✝ : Type u_1\ninst✝⁵ : NormedAddCommGroup E✝\ninst✝⁴ : NormedSpace ℝ E✝\ninst✝³ : FiniteDimensional ℝ E✝\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nR : ℝ\nhR : 1 < R\n⊢ 0 < R + 1\n[PROOFSTEP]\nlinarith\n[GOAL]\nE✝ : Type u_1\ninst✝⁵ : NormedAddCommGroup E✝\ninst✝⁴ : NormedSpace ℝ E✝\ninst✝³ : FiniteDimensional ℝ E✝\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nIR : ∀ (R : ℝ), 1 < R → 0 < (R - 1) / (R + 1)\n⊢ ContDiffBumpBase E\n[PROOFSTEP]\nexact\n  { toFun := fun R x => if 1 < R then y ((R - 1) / (R + 1)) (((R + 1) / 2)⁻¹ • x) else 0\n    mem_Icc := fun R x => by\n      simp only [mem_Icc]\n      split_ifs with h\n      · refine' ⟨y_nonneg _ _, y_le_one _ (IR R h)⟩\n      · simp only [le_refl, zero_le_one, and_self]\n    symmetric := fun R x => by\n      simp only\n      split_ifs\n      · simp only [y_neg, smul_neg]\n      · rfl\n    smooth :=\n      by\n      suffices\n        ContDiffOn ℝ ⊤ (uncurry y ∘ fun p : ℝ × E => ((p.1 - 1) / (p.1 + 1), ((p.1 + 1) / 2)⁻¹ • p.2)) (Ioi 1 ×ˢ univ)\n        by\n        apply this.congr\n        rintro ⟨R, x⟩ ⟨hR : 1 < R, _⟩\n        simp only [hR, uncurry_apply_pair, if_true, Function.comp_apply]\n      apply (y_smooth E).comp\n      · apply ContDiffOn.prod\n        · refine' (contDiffOn_fst.sub contDiffOn_const).div (contDiffOn_fst.add contDiffOn_const) _\n          rintro ⟨R, x⟩ ⟨hR : 1 < R, _⟩\n          apply ne_of_gt\n          dsimp only\n          linarith\n        · apply ContDiffOn.smul _ contDiffOn_snd\n          refine' ((contDiffOn_fst.add contDiffOn_const).div_const _).inv _\n          rintro ⟨R, x⟩ ⟨hR : 1 < R, _⟩\n          apply ne_of_gt\n          dsimp only\n          linarith\n      · rintro ⟨R, x⟩ ⟨hR : 1 < R, _⟩\n        have A : 0 < (R - 1) / (R + 1) := by apply div_pos <;> linarith\n        have B : (R - 1) / (R + 1) < 1 := by apply (div_lt_one _).2 <;> linarith\n        simp only [mem_preimage, prod_mk_mem_set_prod_eq, mem_Ioo, mem_univ, and_true_iff, A, B]\n    eq_one := fun R hR x hx => by\n      have A : 0 < R + 1 := by linarith\n      simp only [hR, if_true]\n      apply y_eq_one_of_mem_closedBall (IR R hR)\n      simp only [norm_smul, inv_div, mem_closedBall_zero_iff, Real.norm_eq_abs, abs_div, abs_two, abs_of_nonneg A.le]\n      calc\n        2 / (R + 1) * ‖x‖ ≤ 2 / (R + 1) * 1 := mul_le_mul_of_nonneg_left hx (div_nonneg zero_le_two A.le)\n        _ = 1 - (R - 1) / (R + 1) := by field_simp [A.ne']; ring\n    support := fun R hR => by\n      have A : 0 < (R + 1) / 2 := by linarith\n      have A' : 0 < R + 1 := by linarith\n      have C : (R - 1) / (R + 1) < 1 := by apply (div_lt_one _).2 <;> linarith\n      simp only [hR, if_true, support_comp_inv_smul₀ A.ne', y_support _ (IR R hR) C, _root_.smul_ball A.ne',\n        Real.norm_of_nonneg A.le, smul_zero]\n      refine' congr (congr_arg ball (Eq.refl 0)) _\n      field_simp [A'.ne']\n      ring }\n[GOAL]\nE✝ : Type u_1\ninst✝⁵ : NormedAddCommGroup E✝\ninst✝⁴ : NormedSpace ℝ E✝\ninst✝³ : FiniteDimensional ℝ E✝\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nIR : ∀ (R : ℝ), 1 < R → 0 < (R - 1) / (R + 1)\nR : ℝ\nx : E\n⊢ (fun R x => if 1 < R then y ((R - 1) / (R + 1)) (((R + 1) / 2)⁻¹ • x) else 0) R x ∈ Icc 0 1\n[PROOFSTEP]\nsimp only [mem_Icc]\n[GOAL]\nE✝ : Type u_1\ninst✝⁵ : NormedAddCommGroup E✝\ninst✝⁴ : NormedSpace ℝ E✝\ninst✝³ : FiniteDimensional ℝ E✝\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nIR : ∀ (R : ℝ), 1 < R → 0 < (R - 1) / (R + 1)\nR : ℝ\nx : E\n⊢ (0 ≤ if 1 < R then y ((R - 1) / (R + 1)) (((R + 1) / 2)⁻¹ • x) else 0) ∧\n    (if 1 < R then y ((R - 1) / (R + 1)) (((R + 1) / 2)⁻¹ • x) else 0) ≤ 1\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nE✝ : Type u_1\ninst✝⁵ : NormedAddCommGroup E✝\ninst✝⁴ : NormedSpace ℝ E✝\ninst✝³ : FiniteDimensional ℝ E✝\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nIR : ∀ (R : ℝ), 1 < R → 0 < (R - 1) / (R + 1)\nR : ℝ\nx : E\nh : 1 < R\n⊢ 0 ≤ y ((R - 1) / (R + 1)) (((R + 1) / 2)⁻¹ • x) ∧ y ((R - 1) / (R + 1)) (((R + 1) / 2)⁻¹ • x) ≤ 1\n[PROOFSTEP]\nrefine' ⟨y_nonneg _ _, y_le_one _ (IR R h)⟩\n[GOAL]\ncase neg\nE✝ : Type u_1\ninst✝⁵ : NormedAddCommGroup E✝\ninst✝⁴ : NormedSpace ℝ E✝\ninst✝³ : FiniteDimensional ℝ E✝\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nIR : ∀ (R : ℝ), 1 < R → 0 < (R - 1) / (R + 1)\nR : ℝ\nx : E\nh : ¬1 < R\n⊢ 0 ≤ 0 ∧ 0 ≤ 1\n[PROOFSTEP]\nsimp only [le_refl, zero_le_one, and_self]\n[GOAL]\nE✝ : Type u_1\ninst✝⁵ : NormedAddCommGroup E✝\ninst✝⁴ : NormedSpace ℝ E✝\ninst✝³ : FiniteDimensional ℝ E✝\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nIR : ∀ (R : ℝ), 1 < R → 0 < (R - 1) / (R + 1)\nR : ℝ\nx : E\n⊢ (fun R x => if 1 < R then y ((R - 1) / (R + 1)) (((R + 1) / 2)⁻¹ • x) else 0) R (-x) =\n    (fun R x => if 1 < R then y ((R - 1) / (R + 1)) (((R + 1) / 2)⁻¹ • x) else 0) R x\n[PROOFSTEP]\nsimp only\n[GOAL]\nE✝ : Type u_1\ninst✝⁵ : NormedAddCommGroup E✝\ninst✝⁴ : NormedSpace ℝ E✝\ninst✝³ : FiniteDimensional ℝ E✝\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nIR : ∀ (R : ℝ), 1 < R → 0 < (R - 1) / (R + 1)\nR : ℝ\nx : E\n⊢ (if 1 < R then y ((R - 1) / (R + 1)) (((R + 1) / 2)⁻¹ • -x) else 0) =\n    if 1 < R then y ((R - 1) / (R + 1)) (((R + 1) / 2)⁻¹ • x) else 0\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nE✝ : Type u_1\ninst✝⁵ : NormedAddCommGroup E✝\ninst✝⁴ : NormedSpace ℝ E✝\ninst✝³ : FiniteDimensional ℝ E✝\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nIR : ∀ (R : ℝ), 1 < R → 0 < (R - 1) / (R + 1)\nR : ℝ\nx : E\nh✝ : 1 < R\n⊢ y ((R - 1) / (R + 1)) (((R + 1) / 2)⁻¹ • -x) = y ((R - 1) / (R + 1)) (((R + 1) / 2)⁻¹ • x)\n[PROOFSTEP]\nsimp only [y_neg, smul_neg]\n[GOAL]\ncase neg\nE✝ : Type u_1\ninst✝⁵ : NormedAddCommGroup E✝\ninst✝⁴ : NormedSpace ℝ E✝\ninst✝³ : FiniteDimensional ℝ E✝\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nIR : ∀ (R : ℝ), 1 < R → 0 < (R - 1) / (R + 1)\nR : ℝ\nx : E\nh✝ : ¬1 < R\n⊢ 0 = 0\n[PROOFSTEP]\nrfl\n[GOAL]\nE✝ : Type u_1\ninst✝⁵ : NormedAddCommGroup E✝\ninst✝⁴ : NormedSpace ℝ E✝\ninst✝³ : FiniteDimensional ℝ E✝\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nIR : ∀ (R : ℝ), 1 < R → 0 < (R - 1) / (R + 1)\n⊢ ContDiffOn ℝ ⊤ (uncurry fun R x => if 1 < R then y ((R - 1) / (R + 1)) (((R + 1) / 2)⁻¹ • x) else 0) (Ioi 1 ×ˢ univ)\n[PROOFSTEP]\nsuffices ContDiffOn ℝ ⊤ (uncurry y ∘ fun p : ℝ × E => ((p.1 - 1) / (p.1 + 1), ((p.1 + 1) / 2)⁻¹ • p.2)) (Ioi 1 ×ˢ univ)\n  by\n  apply this.congr\n  rintro ⟨R, x⟩ ⟨hR : 1 < R, _⟩\n  simp only [hR, uncurry_apply_pair, if_true, Function.comp_apply]\n[GOAL]\nE✝ : Type u_1\ninst✝⁵ : NormedAddCommGroup E✝\ninst✝⁴ : NormedSpace ℝ E✝\ninst✝³ : FiniteDimensional ℝ E✝\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nIR : ∀ (R : ℝ), 1 < R → 0 < (R - 1) / (R + 1)\nthis : ContDiffOn ℝ ⊤ (uncurry y ∘ fun p => ((p.fst - 1) / (p.fst + 1), ((p.fst + 1) / 2)⁻¹ • p.snd)) (Ioi 1 ×ˢ univ)\n⊢ ContDiffOn ℝ ⊤ (uncurry fun R x => if 1 < R then y ((R - 1) / (R + 1)) (((R + 1) / 2)⁻¹ • x) else 0) (Ioi 1 ×ˢ univ)\n[PROOFSTEP]\napply this.congr\n[GOAL]\nE✝ : Type u_1\ninst✝⁵ : NormedAddCommGroup E✝\ninst✝⁴ : NormedSpace ℝ E✝\ninst✝³ : FiniteDimensional ℝ E✝\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nIR : ∀ (R : ℝ), 1 < R → 0 < (R - 1) / (R + 1)\nthis : ContDiffOn ℝ ⊤ (uncurry y ∘ fun p => ((p.fst - 1) / (p.fst + 1), ((p.fst + 1) / 2)⁻¹ • p.snd)) (Ioi 1 ×ˢ univ)\n⊢ ∀ (x : ℝ × E),\n    x ∈ Ioi 1 ×ˢ univ →\n      uncurry (fun R x => if 1 < R then y ((R - 1) / (R + 1)) (((R + 1) / 2)⁻¹ • x) else 0) x =\n        (uncurry y ∘ fun p => ((p.fst - 1) / (p.fst + 1), ((p.fst + 1) / 2)⁻¹ • p.snd)) x\n[PROOFSTEP]\nrintro ⟨R, x⟩ ⟨hR : 1 < R, _⟩\n[GOAL]\ncase mk.intro\nE✝ : Type u_1\ninst✝⁵ : NormedAddCommGroup E✝\ninst✝⁴ : NormedSpace ℝ E✝\ninst✝³ : FiniteDimensional ℝ E✝\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nIR : ∀ (R : ℝ), 1 < R → 0 < (R - 1) / (R + 1)\nthis : ContDiffOn ℝ ⊤ (uncurry y ∘ fun p => ((p.fst - 1) / (p.fst + 1), ((p.fst + 1) / 2)⁻¹ • p.snd)) (Ioi 1 ×ˢ univ)\nR : ℝ\nx : E\nhR : 1 < R\nright✝ : (R, x).snd ∈ univ\n⊢ uncurry (fun R x => if 1 < R then y ((R - 1) / (R + 1)) (((R + 1) / 2)⁻¹ • x) else 0) (R, x) =\n    (uncurry y ∘ fun p => ((p.fst - 1) / (p.fst + 1), ((p.fst + 1) / 2)⁻¹ • p.snd)) (R, x)\n[PROOFSTEP]\nsimp only [hR, uncurry_apply_pair, if_true, Function.comp_apply]\n[GOAL]\nE✝ : Type u_1\ninst✝⁵ : NormedAddCommGroup E✝\ninst✝⁴ : NormedSpace ℝ E✝\ninst✝³ : FiniteDimensional ℝ E✝\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nIR : ∀ (R : ℝ), 1 < R → 0 < (R - 1) / (R + 1)\n⊢ ContDiffOn ℝ ⊤ (uncurry y ∘ fun p => ((p.fst - 1) / (p.fst + 1), ((p.fst + 1) / 2)⁻¹ • p.snd)) (Ioi 1 ×ˢ univ)\n[PROOFSTEP]\napply (y_smooth E).comp\n[GOAL]\ncase hf\nE✝ : Type u_1\ninst✝⁵ : NormedAddCommGroup E✝\ninst✝⁴ : NormedSpace ℝ E✝\ninst✝³ : FiniteDimensional ℝ E✝\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nIR : ∀ (R : ℝ), 1 < R → 0 < (R - 1) / (R + 1)\n⊢ ContDiffOn ℝ ⊤ (fun p => ((p.fst - 1) / (p.fst + 1), ((p.fst + 1) / 2)⁻¹ • p.snd)) (Ioi 1 ×ˢ univ)\n[PROOFSTEP]\napply ContDiffOn.prod\n[GOAL]\ncase hf.hf\nE✝ : Type u_1\ninst✝⁵ : NormedAddCommGroup E✝\ninst✝⁴ : NormedSpace ℝ E✝\ninst✝³ : FiniteDimensional ℝ E✝\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nIR : ∀ (R : ℝ), 1 < R → 0 < (R - 1) / (R + 1)\n⊢ ContDiffOn ℝ ⊤ (fun x => (x.fst - 1) / (x.fst + 1)) (Ioi 1 ×ˢ univ)\n[PROOFSTEP]\nrefine' (contDiffOn_fst.sub contDiffOn_const).div (contDiffOn_fst.add contDiffOn_const) _\n[GOAL]\ncase hf.hf\nE✝ : Type u_1\ninst✝⁵ : NormedAddCommGroup E✝\ninst✝⁴ : NormedSpace ℝ E✝\ninst✝³ : FiniteDimensional ℝ E✝\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nIR : ∀ (R : ℝ), 1 < R → 0 < (R - 1) / (R + 1)\n⊢ ∀ (x : ℝ × E), x ∈ Ioi 1 ×ˢ univ → x.fst + 1 ≠ 0\n[PROOFSTEP]\nrintro ⟨R, x⟩ ⟨hR : 1 < R, _⟩\n[GOAL]\ncase hf.hf.mk.intro\nE✝ : Type u_1\ninst✝⁵ : NormedAddCommGroup E✝\ninst✝⁴ : NormedSpace ℝ E✝\ninst✝³ : FiniteDimensional ℝ E✝\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nIR : ∀ (R : ℝ), 1 < R → 0 < (R - 1) / (R + 1)\nR : ℝ\nx : E\nhR : 1 < R\nright✝ : (R, x).snd ∈ univ\n⊢ (R, x).fst + 1 ≠ 0\n[PROOFSTEP]\napply ne_of_gt\n[GOAL]\ncase hf.hf.mk.intro.h\nE✝ : Type u_1\ninst✝⁵ : NormedAddCommGroup E✝\ninst✝⁴ : NormedSpace ℝ E✝\ninst✝³ : FiniteDimensional ℝ E✝\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nIR : ∀ (R : ℝ), 1 < R → 0 < (R - 1) / (R + 1)\nR : ℝ\nx : E\nhR : 1 < R\nright✝ : (R, x).snd ∈ univ\n⊢ 0 < (R, x).fst + 1\n[PROOFSTEP]\ndsimp only\n[GOAL]\ncase hf.hf.mk.intro.h\nE✝ : Type u_1\ninst✝⁵ : NormedAddCommGroup E✝\ninst✝⁴ : NormedSpace ℝ E✝\ninst✝³ : FiniteDimensional ℝ E✝\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nIR : ∀ (R : ℝ), 1 < R → 0 < (R - 1) / (R + 1)\nR : ℝ\nx : E\nhR : 1 < R\nright✝ : (R, x).snd ∈ univ\n⊢ 0 < R + 1\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase hf.hg\nE✝ : Type u_1\ninst✝⁵ : NormedAddCommGroup E✝\ninst✝⁴ : NormedSpace ℝ E✝\ninst✝³ : FiniteDimensional ℝ E✝\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nIR : ∀ (R : ℝ), 1 < R → 0 < (R - 1) / (R + 1)\n⊢ ContDiffOn ℝ ⊤ (fun x => ((x.fst + 1) / 2)⁻¹ • x.snd) (Ioi 1 ×ˢ univ)\n[PROOFSTEP]\napply ContDiffOn.smul _ contDiffOn_snd\n[GOAL]\nE✝ : Type u_1\ninst✝⁵ : NormedAddCommGroup E✝\ninst✝⁴ : NormedSpace ℝ E✝\ninst✝³ : FiniteDimensional ℝ E✝\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nIR : ∀ (R : ℝ), 1 < R → 0 < (R - 1) / (R + 1)\n⊢ ContDiffOn ℝ ⊤ (fun x => ((x.fst + 1) / 2)⁻¹) (Ioi 1 ×ˢ univ)\n[PROOFSTEP]\nrefine' ((contDiffOn_fst.add contDiffOn_const).div_const _).inv _\n[GOAL]\nE✝ : Type u_1\ninst✝⁵ : NormedAddCommGroup E✝\ninst✝⁴ : NormedSpace ℝ E✝\ninst✝³ : FiniteDimensional ℝ E✝\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nIR : ∀ (R : ℝ), 1 < R → 0 < (R - 1) / (R + 1)\n⊢ ∀ (x : ℝ × E), x ∈ Ioi 1 ×ˢ univ → (x.fst + 1) / 2 ≠ 0\n[PROOFSTEP]\nrintro ⟨R, x⟩ ⟨hR : 1 < R, _⟩\n[GOAL]\ncase mk.intro\nE✝ : Type u_1\ninst✝⁵ : NormedAddCommGroup E✝\ninst✝⁴ : NormedSpace ℝ E✝\ninst✝³ : FiniteDimensional ℝ E✝\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nIR : ∀ (R : ℝ), 1 < R → 0 < (R - 1) / (R + 1)\nR : ℝ\nx : E\nhR : 1 < R\nright✝ : (R, x).snd ∈ univ\n⊢ ((R, x).fst + 1) / 2 ≠ 0\n[PROOFSTEP]\napply ne_of_gt\n[GOAL]\ncase mk.intro.h\nE✝ : Type u_1\ninst✝⁵ : NormedAddCommGroup E✝\ninst✝⁴ : NormedSpace ℝ E✝\ninst✝³ : FiniteDimensional ℝ E✝\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nIR : ∀ (R : ℝ), 1 < R → 0 < (R - 1) / (R + 1)\nR : ℝ\nx : E\nhR : 1 < R\nright✝ : (R, x).snd ∈ univ\n⊢ 0 < ((R, x).fst + 1) / 2\n[PROOFSTEP]\ndsimp only\n[GOAL]\ncase mk.intro.h\nE✝ : Type u_1\ninst✝⁵ : NormedAddCommGroup E✝\ninst✝⁴ : NormedSpace ℝ E✝\ninst✝³ : FiniteDimensional ℝ E✝\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nIR : ∀ (R : ℝ), 1 < R → 0 < (R - 1) / (R + 1)\nR : ℝ\nx : E\nhR : 1 < R\nright✝ : (R, x).snd ∈ univ\n⊢ 0 < (R + 1) / 2\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase st\nE✝ : Type u_1\ninst✝⁵ : NormedAddCommGroup E✝\ninst✝⁴ : NormedSpace ℝ E✝\ninst✝³ : FiniteDimensional ℝ E✝\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nIR : ∀ (R : ℝ), 1 < R → 0 < (R - 1) / (R + 1)\n⊢ Ioi 1 ×ˢ univ ⊆ (fun p => ((p.fst - 1) / (p.fst + 1), ((p.fst + 1) / 2)⁻¹ • p.snd)) ⁻¹' Ioo 0 1 ×ˢ univ\n[PROOFSTEP]\nrintro ⟨R, x⟩ ⟨hR : 1 < R, _⟩\n[GOAL]\ncase st.mk.intro\nE✝ : Type u_1\ninst✝⁵ : NormedAddCommGroup E✝\ninst✝⁴ : NormedSpace ℝ E✝\ninst✝³ : FiniteDimensional ℝ E✝\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nIR : ∀ (R : ℝ), 1 < R → 0 < (R - 1) / (R + 1)\nR : ℝ\nx : E\nhR : 1 < R\nright✝ : (R, x).snd ∈ univ\n⊢ (R, x) ∈ (fun p => ((p.fst - 1) / (p.fst + 1), ((p.fst + 1) / 2)⁻¹ • p.snd)) ⁻¹' Ioo 0 1 ×ˢ univ\n[PROOFSTEP]\nhave A : 0 < (R - 1) / (R + 1) := by apply div_pos <;> linarith\n[GOAL]\nE✝ : Type u_1\ninst✝⁵ : NormedAddCommGroup E✝\ninst✝⁴ : NormedSpace ℝ E✝\ninst✝³ : FiniteDimensional ℝ E✝\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nIR : ∀ (R : ℝ), 1 < R → 0 < (R - 1) / (R + 1)\nR : ℝ\nx : E\nhR : 1 < R\nright✝ : (R, x).snd ∈ univ\n⊢ 0 < (R - 1) / (R + 1)\n[PROOFSTEP]\napply div_pos\n[GOAL]\ncase ha\nE✝ : Type u_1\ninst✝⁵ : NormedAddCommGroup E✝\ninst✝⁴ : NormedSpace ℝ E✝\ninst✝³ : FiniteDimensional ℝ E✝\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nIR : ∀ (R : ℝ), 1 < R → 0 < (R - 1) / (R + 1)\nR : ℝ\nx : E\nhR : 1 < R\nright✝ : (R, x).snd ∈ univ\n⊢ 0 < R - 1\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase hb\nE✝ : Type u_1\ninst✝⁵ : NormedAddCommGroup E✝\ninst✝⁴ : NormedSpace ℝ E✝\ninst✝³ : FiniteDimensional ℝ E✝\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nIR : ∀ (R : ℝ), 1 < R → 0 < (R - 1) / (R + 1)\nR : ℝ\nx : E\nhR : 1 < R\nright✝ : (R, x).snd ∈ univ\n⊢ 0 < R + 1\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase st.mk.intro\nE✝ : Type u_1\ninst✝⁵ : NormedAddCommGroup E✝\ninst✝⁴ : NormedSpace ℝ E✝\ninst✝³ : FiniteDimensional ℝ E✝\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nIR : ∀ (R : ℝ), 1 < R → 0 < (R - 1) / (R + 1)\nR : ℝ\nx : E\nhR : 1 < R\nright✝ : (R, x).snd ∈ univ\nA : 0 < (R - 1) / (R + 1)\n⊢ (R, x) ∈ (fun p => ((p.fst - 1) / (p.fst + 1), ((p.fst + 1) / 2)⁻¹ • p.snd)) ⁻¹' Ioo 0 1 ×ˢ univ\n[PROOFSTEP]\nhave B : (R - 1) / (R + 1) < 1 := by apply (div_lt_one _).2 <;> linarith\n[GOAL]\nE✝ : Type u_1\ninst✝⁵ : NormedAddCommGroup E✝\ninst✝⁴ : NormedSpace ℝ E✝\ninst✝³ : FiniteDimensional ℝ E✝\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nIR : ∀ (R : ℝ), 1 < R → 0 < (R - 1) / (R + 1)\nR : ℝ\nx : E\nhR : 1 < R\nright✝ : (R, x).snd ∈ univ\nA : 0 < (R - 1) / (R + 1)\n⊢ (R - 1) / (R + 1) < 1\n[PROOFSTEP]\napply (div_lt_one _).2\n[GOAL]\nE✝ : Type u_1\ninst✝⁵ : NormedAddCommGroup E✝\ninst✝⁴ : NormedSpace ℝ E✝\ninst✝³ : FiniteDimensional ℝ E✝\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nIR : ∀ (R : ℝ), 1 < R → 0 < (R - 1) / (R + 1)\nR : ℝ\nx : E\nhR : 1 < R\nright✝ : (R, x).snd ∈ univ\nA : 0 < (R - 1) / (R + 1)\n⊢ R - 1 < R + 1\n[PROOFSTEP]\nlinarith\n[GOAL]\nE✝ : Type u_1\ninst✝⁵ : NormedAddCommGroup E✝\ninst✝⁴ : NormedSpace ℝ E✝\ninst✝³ : FiniteDimensional ℝ E✝\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nIR : ∀ (R : ℝ), 1 < R → 0 < (R - 1) / (R + 1)\nR : ℝ\nx : E\nhR : 1 < R\nright✝ : (R, x).snd ∈ univ\nA : 0 < (R - 1) / (R + 1)\n⊢ 0 < R + 1\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase st.mk.intro\nE✝ : Type u_1\ninst✝⁵ : NormedAddCommGroup E✝\ninst✝⁴ : NormedSpace ℝ E✝\ninst✝³ : FiniteDimensional ℝ E✝\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nIR : ∀ (R : ℝ), 1 < R → 0 < (R - 1) / (R + 1)\nR : ℝ\nx : E\nhR : 1 < R\nright✝ : (R, x).snd ∈ univ\nA : 0 < (R - 1) / (R + 1)\nB : (R - 1) / (R + 1) < 1\n⊢ (R, x) ∈ (fun p => ((p.fst - 1) / (p.fst + 1), ((p.fst + 1) / 2)⁻¹ • p.snd)) ⁻¹' Ioo 0 1 ×ˢ univ\n[PROOFSTEP]\nsimp only [mem_preimage, prod_mk_mem_set_prod_eq, mem_Ioo, mem_univ, and_true_iff, A, B]\n[GOAL]\nE✝ : Type u_1\ninst✝⁵ : NormedAddCommGroup E✝\ninst✝⁴ : NormedSpace ℝ E✝\ninst✝³ : FiniteDimensional ℝ E✝\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nIR : ∀ (R : ℝ), 1 < R → 0 < (R - 1) / (R + 1)\nR : ℝ\nhR : 1 < R\nx : E\nhx : ‖x‖ ≤ 1\n⊢ (fun R x => if 1 < R then y ((R - 1) / (R + 1)) (((R + 1) / 2)⁻¹ • x) else 0) R x = 1\n[PROOFSTEP]\nhave A : 0 < R + 1 := by linarith\n[GOAL]\nE✝ : Type u_1\ninst✝⁵ : NormedAddCommGroup E✝\ninst✝⁴ : NormedSpace ℝ E✝\ninst✝³ : FiniteDimensional ℝ E✝\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nIR : ∀ (R : ℝ), 1 < R → 0 < (R - 1) / (R + 1)\nR : ℝ\nhR : 1 < R\nx : E\nhx : ‖x‖ ≤ 1\n⊢ 0 < R + 1\n[PROOFSTEP]\nlinarith\n[GOAL]\nE✝ : Type u_1\ninst✝⁵ : NormedAddCommGroup E✝\ninst✝⁴ : NormedSpace ℝ E✝\ninst✝³ : FiniteDimensional ℝ E✝\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nIR : ∀ (R : ℝ), 1 < R → 0 < (R - 1) / (R + 1)\nR : ℝ\nhR : 1 < R\nx : E\nhx : ‖x‖ ≤ 1\nA : 0 < R + 1\n⊢ (fun R x => if 1 < R then y ((R - 1) / (R + 1)) (((R + 1) / 2)⁻¹ • x) else 0) R x = 1\n[PROOFSTEP]\nsimp only [hR, if_true]\n[GOAL]\nE✝ : Type u_1\ninst✝⁵ : NormedAddCommGroup E✝\ninst✝⁴ : NormedSpace ℝ E✝\ninst✝³ : FiniteDimensional ℝ E✝\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nIR : ∀ (R : ℝ), 1 < R → 0 < (R - 1) / (R + 1)\nR : ℝ\nhR : 1 < R\nx : E\nhx : ‖x‖ ≤ 1\nA : 0 < R + 1\n⊢ y ((R - 1) / (R + 1)) (((R + 1) / 2)⁻¹ • x) = 1\n[PROOFSTEP]\napply y_eq_one_of_mem_closedBall (IR R hR)\n[GOAL]\nE✝ : Type u_1\ninst✝⁵ : NormedAddCommGroup E✝\ninst✝⁴ : NormedSpace ℝ E✝\ninst✝³ : FiniteDimensional ℝ E✝\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nIR : ∀ (R : ℝ), 1 < R → 0 < (R - 1) / (R + 1)\nR : ℝ\nhR : 1 < R\nx : E\nhx : ‖x‖ ≤ 1\nA : 0 < R + 1\n⊢ ((R + 1) / 2)⁻¹ • x ∈ closedBall 0 (1 - (R - 1) / (R + 1))\n[PROOFSTEP]\nsimp only [norm_smul, inv_div, mem_closedBall_zero_iff, Real.norm_eq_abs, abs_div, abs_two, abs_of_nonneg A.le]\n[GOAL]\nE✝ : Type u_1\ninst✝⁵ : NormedAddCommGroup E✝\ninst✝⁴ : NormedSpace ℝ E✝\ninst✝³ : FiniteDimensional ℝ E✝\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nIR : ∀ (R : ℝ), 1 < R → 0 < (R - 1) / (R + 1)\nR : ℝ\nhR : 1 < R\nx : E\nhx : ‖x‖ ≤ 1\nA : 0 < R + 1\n⊢ 2 / (R + 1) * ‖x‖ ≤ 1 - (R - 1) / (R + 1)\n[PROOFSTEP]\ncalc\n  2 / (R + 1) * ‖x‖ ≤ 2 / (R + 1) * 1 := mul_le_mul_of_nonneg_left hx (div_nonneg zero_le_two A.le)\n  _ = 1 - (R - 1) / (R + 1) := by field_simp [A.ne']; ring\n[GOAL]\nE✝ : Type u_1\ninst✝⁵ : NormedAddCommGroup E✝\ninst✝⁴ : NormedSpace ℝ E✝\ninst✝³ : FiniteDimensional ℝ E✝\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nIR : ∀ (R : ℝ), 1 < R → 0 < (R - 1) / (R + 1)\nR : ℝ\nhR : 1 < R\nx : E\nhx : ‖x‖ ≤ 1\nA : 0 < R + 1\n⊢ 2 / (R + 1) * 1 = 1 - (R - 1) / (R + 1)\n[PROOFSTEP]\nfield_simp [A.ne']\n[GOAL]\nE✝ : Type u_1\ninst✝⁵ : NormedAddCommGroup E✝\ninst✝⁴ : NormedSpace ℝ E✝\ninst✝³ : FiniteDimensional ℝ E✝\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nIR : ∀ (R : ℝ), 1 < R → 0 < (R - 1) / (R + 1)\nR : ℝ\nhR : 1 < R\nx : E\nhx : ‖x‖ ≤ 1\nA : 0 < R + 1\n⊢ 2 = 1 + 1\n[PROOFSTEP]\nring\n[GOAL]\nE✝ : Type u_1\ninst✝⁵ : NormedAddCommGroup E✝\ninst✝⁴ : NormedSpace ℝ E✝\ninst✝³ : FiniteDimensional ℝ E✝\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nIR : ∀ (R : ℝ), 1 < R → 0 < (R - 1) / (R + 1)\nR : ℝ\nhR : 1 < R\n⊢ support ((fun R x => if 1 < R then y ((R - 1) / (R + 1)) (((R + 1) / 2)⁻¹ • x) else 0) R) = ball 0 R\n[PROOFSTEP]\nhave A : 0 < (R + 1) / 2 := by linarith\n[GOAL]\nE✝ : Type u_1\ninst✝⁵ : NormedAddCommGroup E✝\ninst✝⁴ : NormedSpace ℝ E✝\ninst✝³ : FiniteDimensional ℝ E✝\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nIR : ∀ (R : ℝ), 1 < R → 0 < (R - 1) / (R + 1)\nR : ℝ\nhR : 1 < R\n⊢ 0 < (R + 1) / 2\n[PROOFSTEP]\nlinarith\n[GOAL]\nE✝ : Type u_1\ninst✝⁵ : NormedAddCommGroup E✝\ninst✝⁴ : NormedSpace ℝ E✝\ninst✝³ : FiniteDimensional ℝ E✝\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nIR : ∀ (R : ℝ), 1 < R → 0 < (R - 1) / (R + 1)\nR : ℝ\nhR : 1 < R\nA : 0 < (R + 1) / 2\n⊢ support ((fun R x => if 1 < R then y ((R - 1) / (R + 1)) (((R + 1) / 2)⁻¹ • x) else 0) R) = ball 0 R\n[PROOFSTEP]\nhave A' : 0 < R + 1 := by linarith\n[GOAL]\nE✝ : Type u_1\ninst✝⁵ : NormedAddCommGroup E✝\ninst✝⁴ : NormedSpace ℝ E✝\ninst✝³ : FiniteDimensional ℝ E✝\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nIR : ∀ (R : ℝ), 1 < R → 0 < (R - 1) / (R + 1)\nR : ℝ\nhR : 1 < R\nA : 0 < (R + 1) / 2\n⊢ 0 < R + 1\n[PROOFSTEP]\nlinarith\n[GOAL]\nE✝ : Type u_1\ninst✝⁵ : NormedAddCommGroup E✝\ninst✝⁴ : NormedSpace ℝ E✝\ninst✝³ : FiniteDimensional ℝ E✝\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nIR : ∀ (R : ℝ), 1 < R → 0 < (R - 1) / (R + 1)\nR : ℝ\nhR : 1 < R\nA : 0 < (R + 1) / 2\nA' : 0 < R + 1\n⊢ support ((fun R x => if 1 < R then y ((R - 1) / (R + 1)) (((R + 1) / 2)⁻¹ • x) else 0) R) = ball 0 R\n[PROOFSTEP]\nhave C : (R - 1) / (R + 1) < 1 := by apply (div_lt_one _).2 <;> linarith\n[GOAL]\nE✝ : Type u_1\ninst✝⁵ : NormedAddCommGroup E✝\ninst✝⁴ : NormedSpace ℝ E✝\ninst✝³ : FiniteDimensional ℝ E✝\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nIR : ∀ (R : ℝ), 1 < R → 0 < (R - 1) / (R + 1)\nR : ℝ\nhR : 1 < R\nA : 0 < (R + 1) / 2\nA' : 0 < R + 1\n⊢ (R - 1) / (R + 1) < 1\n[PROOFSTEP]\napply (div_lt_one _).2\n[GOAL]\nE✝ : Type u_1\ninst✝⁵ : NormedAddCommGroup E✝\ninst✝⁴ : NormedSpace ℝ E✝\ninst✝³ : FiniteDimensional ℝ E✝\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nIR : ∀ (R : ℝ), 1 < R → 0 < (R - 1) / (R + 1)\nR : ℝ\nhR : 1 < R\nA : 0 < (R + 1) / 2\nA' : 0 < R + 1\n⊢ R - 1 < R + 1\n[PROOFSTEP]\nlinarith\n[GOAL]\nE✝ : Type u_1\ninst✝⁵ : NormedAddCommGroup E✝\ninst✝⁴ : NormedSpace ℝ E✝\ninst✝³ : FiniteDimensional ℝ E✝\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nIR : ∀ (R : ℝ), 1 < R → 0 < (R - 1) / (R + 1)\nR : ℝ\nhR : 1 < R\nA : 0 < (R + 1) / 2\nA' : 0 < R + 1\n⊢ 0 < R + 1\n[PROOFSTEP]\nlinarith\n[GOAL]\nE✝ : Type u_1\ninst✝⁵ : NormedAddCommGroup E✝\ninst✝⁴ : NormedSpace ℝ E✝\ninst✝³ : FiniteDimensional ℝ E✝\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nIR : ∀ (R : ℝ), 1 < R → 0 < (R - 1) / (R + 1)\nR : ℝ\nhR : 1 < R\nA : 0 < (R + 1) / 2\nA' : 0 < R + 1\nC : (R - 1) / (R + 1) < 1\n⊢ support ((fun R x => if 1 < R then y ((R - 1) / (R + 1)) (((R + 1) / 2)⁻¹ • x) else 0) R) = ball 0 R\n[PROOFSTEP]\nsimp only [hR, if_true, support_comp_inv_smul₀ A.ne', y_support _ (IR R hR) C, _root_.smul_ball A.ne',\n  Real.norm_of_nonneg A.le, smul_zero]\n[GOAL]\nE✝ : Type u_1\ninst✝⁵ : NormedAddCommGroup E✝\ninst✝⁴ : NormedSpace ℝ E✝\ninst✝³ : FiniteDimensional ℝ E✝\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nIR : ∀ (R : ℝ), 1 < R → 0 < (R - 1) / (R + 1)\nR : ℝ\nhR : 1 < R\nA : 0 < (R + 1) / 2\nA' : 0 < R + 1\nC : (R - 1) / (R + 1) < 1\n⊢ ball 0 ((R + 1) / 2 * (1 + (R - 1) / (R + 1))) = ball 0 R\n[PROOFSTEP]\nrefine' congr (congr_arg ball (Eq.refl 0)) _\n[GOAL]\nE✝ : Type u_1\ninst✝⁵ : NormedAddCommGroup E✝\ninst✝⁴ : NormedSpace ℝ E✝\ninst✝³ : FiniteDimensional ℝ E✝\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nIR : ∀ (R : ℝ), 1 < R → 0 < (R - 1) / (R + 1)\nR : ℝ\nhR : 1 < R\nA : 0 < (R + 1) / 2\nA' : 0 < R + 1\nC : (R - 1) / (R + 1) < 1\n⊢ (R + 1) / 2 * (1 + (R - 1) / (R + 1)) = R\n[PROOFSTEP]\nfield_simp [A'.ne']\n[GOAL]\nE✝ : Type u_1\ninst✝⁵ : NormedAddCommGroup E✝\ninst✝⁴ : NormedSpace ℝ E✝\ninst✝³ : FiniteDimensional ℝ E✝\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\nIR : ∀ (R : ℝ), 1 < R → 0 < (R - 1) / (R + 1)\nR : ℝ\nhR : 1 < R\nA : 0 < (R + 1) / 2\nA' : 0 < R + 1\nC : (R - 1) / (R + 1) < 1\n⊢ (R + 1) * (R + R) = R * (2 * (R + 1))\n[PROOFSTEP]\nring\n", "meta": {"mathlib_filename": "Mathlib.Analysis.Calculus.BumpFunction.FiniteDimension", "llama_tokens": 99482, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7401743620390163, "lm_q2_score": 0.7122321720225278, "lm_q1q2_score": 0.5271759935504374}}
{"text": "[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : Ring A\ninst✝² : Ring B\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nc₁ c₂ : R\nq₁ q₂ : Basis A c₁ c₂\nhi : q₁.i = q₂.i\nhj : q₁.j = q₂.j\n⊢ q₁ = q₂\n[PROOFSTEP]\ncases q₁\n[GOAL]\ncase mk\nR : Type u_1\nA : Type u_2\nB : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : Ring A\ninst✝² : Ring B\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nc₁ c₂ : R\nq₂ : Basis A c₁ c₂\ni✝ j✝ k✝ : A\ni_mul_i✝ : i✝ * i✝ = c₁ • 1\nj_mul_j✝ : j✝ * j✝ = c₂ • 1\ni_mul_j✝ : i✝ * j✝ = k✝\nj_mul_i✝ : j✝ * i✝ = -k✝\nhi :\n  { i := i✝, j := j✝, k := k✝, i_mul_i := i_mul_i✝, j_mul_j := j_mul_j✝, i_mul_j := i_mul_j✝, j_mul_i := j_mul_i✝ }.i =\n    q₂.i\nhj :\n  { i := i✝, j := j✝, k := k✝, i_mul_i := i_mul_i✝, j_mul_j := j_mul_j✝, i_mul_j := i_mul_j✝, j_mul_i := j_mul_i✝ }.j =\n    q₂.j\n⊢ { i := i✝, j := j✝, k := k✝, i_mul_i := i_mul_i✝, j_mul_j := j_mul_j✝, i_mul_j := i_mul_j✝, j_mul_i := j_mul_i✝ } = q₂\n[PROOFSTEP]\nrename_i q₁_i_mul_j _\n[GOAL]\ncase mk\nR : Type u_1\nA : Type u_2\nB : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : Ring A\ninst✝² : Ring B\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nc₁ c₂ : R\nq₂ : Basis A c₁ c₂\ni✝ j✝ k✝ : A\ni_mul_i✝ : i✝ * i✝ = c₁ • 1\nj_mul_j✝ : j✝ * j✝ = c₂ • 1\nq₁_i_mul_j : i✝ * j✝ = k✝\nj_mul_i✝ : j✝ * i✝ = -k✝\nhi :\n  { i := i✝, j := j✝, k := k✝, i_mul_i := i_mul_i✝, j_mul_j := j_mul_j✝, i_mul_j := q₁_i_mul_j,\n        j_mul_i := j_mul_i✝ }.i =\n    q₂.i\nhj :\n  { i := i✝, j := j✝, k := k✝, i_mul_i := i_mul_i✝, j_mul_j := j_mul_j✝, i_mul_j := q₁_i_mul_j,\n        j_mul_i := j_mul_i✝ }.j =\n    q₂.j\n⊢ { i := i✝, j := j✝, k := k✝, i_mul_i := i_mul_i✝, j_mul_j := j_mul_j✝, i_mul_j := q₁_i_mul_j, j_mul_i := j_mul_i✝ } =\n    q₂\n[PROOFSTEP]\ncases q₂\n[GOAL]\ncase mk.mk\nR : Type u_1\nA : Type u_2\nB : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : Ring A\ninst✝² : Ring B\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nc₁ c₂ : R\ni✝¹ j✝¹ k✝¹ : A\ni_mul_i✝¹ : i✝¹ * i✝¹ = c₁ • 1\nj_mul_j✝¹ : j✝¹ * j✝¹ = c₂ • 1\nq₁_i_mul_j : i✝¹ * j✝¹ = k✝¹\nj_mul_i✝¹ : j✝¹ * i✝¹ = -k✝¹\ni✝ j✝ k✝ : A\ni_mul_i✝ : i✝ * i✝ = c₁ • 1\nj_mul_j✝ : j✝ * j✝ = c₂ • 1\ni_mul_j✝ : i✝ * j✝ = k✝\nj_mul_i✝ : j✝ * i✝ = -k✝\nhi :\n  { i := i✝¹, j := j✝¹, k := k✝¹, i_mul_i := i_mul_i✝¹, j_mul_j := j_mul_j✝¹, i_mul_j := q₁_i_mul_j,\n        j_mul_i := j_mul_i✝¹ }.i =\n    { i := i✝, j := j✝, k := k✝, i_mul_i := i_mul_i✝, j_mul_j := j_mul_j✝, i_mul_j := i_mul_j✝, j_mul_i := j_mul_i✝ }.i\nhj :\n  { i := i✝¹, j := j✝¹, k := k✝¹, i_mul_i := i_mul_i✝¹, j_mul_j := j_mul_j✝¹, i_mul_j := q₁_i_mul_j,\n        j_mul_i := j_mul_i✝¹ }.j =\n    { i := i✝, j := j✝, k := k✝, i_mul_i := i_mul_i✝, j_mul_j := j_mul_j✝, i_mul_j := i_mul_j✝, j_mul_i := j_mul_i✝ }.j\n⊢ { i := i✝¹, j := j✝¹, k := k✝¹, i_mul_i := i_mul_i✝¹, j_mul_j := j_mul_j✝¹, i_mul_j := q₁_i_mul_j,\n      j_mul_i := j_mul_i✝¹ } =\n    { i := i✝, j := j✝, k := k✝, i_mul_i := i_mul_i✝, j_mul_j := j_mul_j✝, i_mul_j := i_mul_j✝, j_mul_i := j_mul_i✝ }\n[PROOFSTEP]\nrename_i q₂_i_mul_j _\n[GOAL]\ncase mk.mk\nR : Type u_1\nA : Type u_2\nB : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : Ring A\ninst✝² : Ring B\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nc₁ c₂ : R\ni✝¹ j✝¹ k✝¹ : A\ni_mul_i✝¹ : i✝¹ * i✝¹ = c₁ • 1\nj_mul_j✝¹ : j✝¹ * j✝¹ = c₂ • 1\nq₁_i_mul_j : i✝¹ * j✝¹ = k✝¹\nj_mul_i✝¹ : j✝¹ * i✝¹ = -k✝¹\ni✝ j✝ k✝ : A\ni_mul_i✝ : i✝ * i✝ = c₁ • 1\nj_mul_j✝ : j✝ * j✝ = c₂ • 1\nq₂_i_mul_j : i✝ * j✝ = k✝\nj_mul_i✝ : j✝ * i✝ = -k✝\nhi :\n  { i := i✝¹, j := j✝¹, k := k✝¹, i_mul_i := i_mul_i✝¹, j_mul_j := j_mul_j✝¹, i_mul_j := q₁_i_mul_j,\n        j_mul_i := j_mul_i✝¹ }.i =\n    { i := i✝, j := j✝, k := k✝, i_mul_i := i_mul_i✝, j_mul_j := j_mul_j✝, i_mul_j := q₂_i_mul_j,\n        j_mul_i := j_mul_i✝ }.i\nhj :\n  { i := i✝¹, j := j✝¹, k := k✝¹, i_mul_i := i_mul_i✝¹, j_mul_j := j_mul_j✝¹, i_mul_j := q₁_i_mul_j,\n        j_mul_i := j_mul_i✝¹ }.j =\n    { i := i✝, j := j✝, k := k✝, i_mul_i := i_mul_i✝, j_mul_j := j_mul_j✝, i_mul_j := q₂_i_mul_j,\n        j_mul_i := j_mul_i✝ }.j\n⊢ { i := i✝¹, j := j✝¹, k := k✝¹, i_mul_i := i_mul_i✝¹, j_mul_j := j_mul_j✝¹, i_mul_j := q₁_i_mul_j,\n      j_mul_i := j_mul_i✝¹ } =\n    { i := i✝, j := j✝, k := k✝, i_mul_i := i_mul_i✝, j_mul_j := j_mul_j✝, i_mul_j := q₂_i_mul_j, j_mul_i := j_mul_i✝ }\n[PROOFSTEP]\ncongr\n[GOAL]\ncase mk.mk.e_k\nR : Type u_1\nA : Type u_2\nB : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : Ring A\ninst✝² : Ring B\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nc₁ c₂ : R\ni✝¹ j✝¹ k✝¹ : A\ni_mul_i✝¹ : i✝¹ * i✝¹ = c₁ • 1\nj_mul_j✝¹ : j✝¹ * j✝¹ = c₂ • 1\nq₁_i_mul_j : i✝¹ * j✝¹ = k✝¹\nj_mul_i✝¹ : j✝¹ * i✝¹ = -k✝¹\ni✝ j✝ k✝ : A\ni_mul_i✝ : i✝ * i✝ = c₁ • 1\nj_mul_j✝ : j✝ * j✝ = c₂ • 1\nq₂_i_mul_j : i✝ * j✝ = k✝\nj_mul_i✝ : j✝ * i✝ = -k✝\nhi :\n  { i := i✝¹, j := j✝¹, k := k✝¹, i_mul_i := i_mul_i✝¹, j_mul_j := j_mul_j✝¹, i_mul_j := q₁_i_mul_j,\n        j_mul_i := j_mul_i✝¹ }.i =\n    { i := i✝, j := j✝, k := k✝, i_mul_i := i_mul_i✝, j_mul_j := j_mul_j✝, i_mul_j := q₂_i_mul_j,\n        j_mul_i := j_mul_i✝ }.i\nhj :\n  { i := i✝¹, j := j✝¹, k := k✝¹, i_mul_i := i_mul_i✝¹, j_mul_j := j_mul_j✝¹, i_mul_j := q₁_i_mul_j,\n        j_mul_i := j_mul_i✝¹ }.j =\n    { i := i✝, j := j✝, k := k✝, i_mul_i := i_mul_i✝, j_mul_j := j_mul_j✝, i_mul_j := q₂_i_mul_j,\n        j_mul_i := j_mul_i✝ }.j\n⊢ k✝¹ = k✝\n[PROOFSTEP]\nrw [← q₁_i_mul_j, ← q₂_i_mul_j]\n[GOAL]\ncase mk.mk.e_k\nR : Type u_1\nA : Type u_2\nB : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : Ring A\ninst✝² : Ring B\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nc₁ c₂ : R\ni✝¹ j✝¹ k✝¹ : A\ni_mul_i✝¹ : i✝¹ * i✝¹ = c₁ • 1\nj_mul_j✝¹ : j✝¹ * j✝¹ = c₂ • 1\nq₁_i_mul_j : i✝¹ * j✝¹ = k✝¹\nj_mul_i✝¹ : j✝¹ * i✝¹ = -k✝¹\ni✝ j✝ k✝ : A\ni_mul_i✝ : i✝ * i✝ = c₁ • 1\nj_mul_j✝ : j✝ * j✝ = c₂ • 1\nq₂_i_mul_j : i✝ * j✝ = k✝\nj_mul_i✝ : j✝ * i✝ = -k✝\nhi :\n  { i := i✝¹, j := j✝¹, k := k✝¹, i_mul_i := i_mul_i✝¹, j_mul_j := j_mul_j✝¹, i_mul_j := q₁_i_mul_j,\n        j_mul_i := j_mul_i✝¹ }.i =\n    { i := i✝, j := j✝, k := k✝, i_mul_i := i_mul_i✝, j_mul_j := j_mul_j✝, i_mul_j := q₂_i_mul_j,\n        j_mul_i := j_mul_i✝ }.i\nhj :\n  { i := i✝¹, j := j✝¹, k := k✝¹, i_mul_i := i_mul_i✝¹, j_mul_j := j_mul_j✝¹, i_mul_j := q₁_i_mul_j,\n        j_mul_i := j_mul_i✝¹ }.j =\n    { i := i✝, j := j✝, k := k✝, i_mul_i := i_mul_i✝, j_mul_j := j_mul_j✝, i_mul_j := q₂_i_mul_j,\n        j_mul_i := j_mul_i✝ }.j\n⊢ i✝¹ * j✝¹ = i✝ * j✝\n[PROOFSTEP]\ncongr\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : Ring A\ninst✝² : Ring B\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nc₁ c₂ : R\n⊢ { re := 0, imI := 1, imJ := 0, imK := 0 } * { re := 0, imI := 1, imJ := 0, imK := 0 } = c₁ • 1\n[PROOFSTEP]\next\n[GOAL]\ncase re\nR : Type u_1\nA : Type u_2\nB : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : Ring A\ninst✝² : Ring B\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nc₁ c₂ : R\n⊢ ({ re := 0, imI := 1, imJ := 0, imK := 0 } * { re := 0, imI := 1, imJ := 0, imK := 0 }).re = (c₁ • 1).re\n[PROOFSTEP]\nsimp\n[GOAL]\ncase imI\nR : Type u_1\nA : Type u_2\nB : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : Ring A\ninst✝² : Ring B\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nc₁ c₂ : R\n⊢ ({ re := 0, imI := 1, imJ := 0, imK := 0 } * { re := 0, imI := 1, imJ := 0, imK := 0 }).imI = (c₁ • 1).imI\n[PROOFSTEP]\nsimp\n[GOAL]\ncase imJ\nR : Type u_1\nA : Type u_2\nB : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : Ring A\ninst✝² : Ring B\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nc₁ c₂ : R\n⊢ ({ re := 0, imI := 1, imJ := 0, imK := 0 } * { re := 0, imI := 1, imJ := 0, imK := 0 }).imJ = (c₁ • 1).imJ\n[PROOFSTEP]\nsimp\n[GOAL]\ncase imK\nR : Type u_1\nA : Type u_2\nB : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : Ring A\ninst✝² : Ring B\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nc₁ c₂ : R\n⊢ ({ re := 0, imI := 1, imJ := 0, imK := 0 } * { re := 0, imI := 1, imJ := 0, imK := 0 }).imK = (c₁ • 1).imK\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : Ring A\ninst✝² : Ring B\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nc₁ c₂ : R\n⊢ { re := 0, imI := 0, imJ := 1, imK := 0 } * { re := 0, imI := 0, imJ := 1, imK := 0 } = c₂ • 1\n[PROOFSTEP]\next\n[GOAL]\ncase re\nR : Type u_1\nA : Type u_2\nB : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : Ring A\ninst✝² : Ring B\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nc₁ c₂ : R\n⊢ ({ re := 0, imI := 0, imJ := 1, imK := 0 } * { re := 0, imI := 0, imJ := 1, imK := 0 }).re = (c₂ • 1).re\n[PROOFSTEP]\nsimp\n[GOAL]\ncase imI\nR : Type u_1\nA : Type u_2\nB : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : Ring A\ninst✝² : Ring B\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nc₁ c₂ : R\n⊢ ({ re := 0, imI := 0, imJ := 1, imK := 0 } * { re := 0, imI := 0, imJ := 1, imK := 0 }).imI = (c₂ • 1).imI\n[PROOFSTEP]\nsimp\n[GOAL]\ncase imJ\nR : Type u_1\nA : Type u_2\nB : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : Ring A\ninst✝² : Ring B\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nc₁ c₂ : R\n⊢ ({ re := 0, imI := 0, imJ := 1, imK := 0 } * { re := 0, imI := 0, imJ := 1, imK := 0 }).imJ = (c₂ • 1).imJ\n[PROOFSTEP]\nsimp\n[GOAL]\ncase imK\nR : Type u_1\nA : Type u_2\nB : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : Ring A\ninst✝² : Ring B\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nc₁ c₂ : R\n⊢ ({ re := 0, imI := 0, imJ := 1, imK := 0 } * { re := 0, imI := 0, imJ := 1, imK := 0 }).imK = (c₂ • 1).imK\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : Ring A\ninst✝² : Ring B\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nc₁ c₂ : R\n⊢ { re := 0, imI := 1, imJ := 0, imK := 0 } * { re := 0, imI := 0, imJ := 1, imK := 0 } =\n    { re := 0, imI := 0, imJ := 0, imK := 1 }\n[PROOFSTEP]\next\n[GOAL]\ncase re\nR : Type u_1\nA : Type u_2\nB : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : Ring A\ninst✝² : Ring B\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nc₁ c₂ : R\n⊢ ({ re := 0, imI := 1, imJ := 0, imK := 0 } * { re := 0, imI := 0, imJ := 1, imK := 0 }).re =\n    { re := 0, imI := 0, imJ := 0, imK := 1 }.re\n[PROOFSTEP]\nsimp\n[GOAL]\ncase imI\nR : Type u_1\nA : Type u_2\nB : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : Ring A\ninst✝² : Ring B\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nc₁ c₂ : R\n⊢ ({ re := 0, imI := 1, imJ := 0, imK := 0 } * { re := 0, imI := 0, imJ := 1, imK := 0 }).imI =\n    { re := 0, imI := 0, imJ := 0, imK := 1 }.imI\n[PROOFSTEP]\nsimp\n[GOAL]\ncase imJ\nR : Type u_1\nA : Type u_2\nB : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : Ring A\ninst✝² : Ring B\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nc₁ c₂ : R\n⊢ ({ re := 0, imI := 1, imJ := 0, imK := 0 } * { re := 0, imI := 0, imJ := 1, imK := 0 }).imJ =\n    { re := 0, imI := 0, imJ := 0, imK := 1 }.imJ\n[PROOFSTEP]\nsimp\n[GOAL]\ncase imK\nR : Type u_1\nA : Type u_2\nB : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : Ring A\ninst✝² : Ring B\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nc₁ c₂ : R\n⊢ ({ re := 0, imI := 1, imJ := 0, imK := 0 } * { re := 0, imI := 0, imJ := 1, imK := 0 }).imK =\n    { re := 0, imI := 0, imJ := 0, imK := 1 }.imK\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : Ring A\ninst✝² : Ring B\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nc₁ c₂ : R\n⊢ { re := 0, imI := 0, imJ := 1, imK := 0 } * { re := 0, imI := 1, imJ := 0, imK := 0 } =\n    -{ re := 0, imI := 0, imJ := 0, imK := 1 }\n[PROOFSTEP]\next\n[GOAL]\ncase re\nR : Type u_1\nA : Type u_2\nB : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : Ring A\ninst✝² : Ring B\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nc₁ c₂ : R\n⊢ ({ re := 0, imI := 0, imJ := 1, imK := 0 } * { re := 0, imI := 1, imJ := 0, imK := 0 }).re =\n    (-{ re := 0, imI := 0, imJ := 0, imK := 1 }).re\n[PROOFSTEP]\nsimp\n[GOAL]\ncase imI\nR : Type u_1\nA : Type u_2\nB : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : Ring A\ninst✝² : Ring B\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nc₁ c₂ : R\n⊢ ({ re := 0, imI := 0, imJ := 1, imK := 0 } * { re := 0, imI := 1, imJ := 0, imK := 0 }).imI =\n    (-{ re := 0, imI := 0, imJ := 0, imK := 1 }).imI\n[PROOFSTEP]\nsimp\n[GOAL]\ncase imJ\nR : Type u_1\nA : Type u_2\nB : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : Ring A\ninst✝² : Ring B\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nc₁ c₂ : R\n⊢ ({ re := 0, imI := 0, imJ := 1, imK := 0 } * { re := 0, imI := 1, imJ := 0, imK := 0 }).imJ =\n    (-{ re := 0, imI := 0, imJ := 0, imK := 1 }).imJ\n[PROOFSTEP]\nsimp\n[GOAL]\ncase imK\nR : Type u_1\nA : Type u_2\nB : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : Ring A\ninst✝² : Ring B\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nc₁ c₂ : R\n⊢ ({ re := 0, imI := 0, imJ := 1, imK := 0 } * { re := 0, imI := 1, imJ := 0, imK := 0 }).imK =\n    (-{ re := 0, imI := 0, imJ := 0, imK := 1 }).imK\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : Ring A\ninst✝² : Ring B\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nc₁ c₂ : R\nq : Basis A c₁ c₂\n⊢ q.i * q.k = c₁ • q.j\n[PROOFSTEP]\nrw [← i_mul_j, ← mul_assoc, i_mul_i, smul_mul_assoc, one_mul]\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : Ring A\ninst✝² : Ring B\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nc₁ c₂ : R\nq : Basis A c₁ c₂\n⊢ q.k * q.i = -c₁ • q.j\n[PROOFSTEP]\nrw [← i_mul_j, mul_assoc, j_mul_i, mul_neg, i_mul_k, neg_smul]\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : Ring A\ninst✝² : Ring B\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nc₁ c₂ : R\nq : Basis A c₁ c₂\n⊢ q.k * q.j = c₂ • q.i\n[PROOFSTEP]\nrw [← i_mul_j, mul_assoc, j_mul_j, mul_smul_comm, mul_one]\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : Ring A\ninst✝² : Ring B\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nc₁ c₂ : R\nq : Basis A c₁ c₂\n⊢ q.j * q.k = -c₂ • q.i\n[PROOFSTEP]\nrw [← i_mul_j, ← mul_assoc, j_mul_i, neg_mul, k_mul_j, neg_smul]\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : Ring A\ninst✝² : Ring B\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nc₁ c₂ : R\nq : Basis A c₁ c₂\n⊢ q.k * q.k = -((c₁ * c₂) • 1)\n[PROOFSTEP]\nrw [← i_mul_j, mul_assoc, ← mul_assoc q.j _ _, j_mul_i, ← i_mul_j, ← mul_assoc, mul_neg, ← mul_assoc, i_mul_i,\n  smul_mul_assoc, one_mul, neg_mul, smul_mul_assoc, j_mul_j, smul_smul]\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : Ring A\ninst✝² : Ring B\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nc₁ c₂ : R\nq : Basis A c₁ c₂\n⊢ lift q 0 = 0\n[PROOFSTEP]\nsimp [lift]\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : Ring A\ninst✝² : Ring B\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nc₁ c₂ : R\nq : Basis A c₁ c₂\n⊢ lift q 1 = 1\n[PROOFSTEP]\nsimp [lift]\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : Ring A\ninst✝² : Ring B\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nc₁ c₂ : R\nq : Basis A c₁ c₂\nx y : ℍ[R,c₁,c₂]\n⊢ lift q (x + y) = lift q x + lift q y\n[PROOFSTEP]\nsimp [lift, add_smul]\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : Ring A\ninst✝² : Ring B\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nc₁ c₂ : R\nq : Basis A c₁ c₂\nx y : ℍ[R,c₁,c₂]\n⊢ ↑(algebraMap R A) x.re + ↑(algebraMap R A) y.re + (x.imI • q.i + y.imI • q.i) + (x.imJ • q.j + y.imJ • q.j) +\n      (x.imK • q.k + y.imK • q.k) =\n    ↑(algebraMap R A) x.re + x.imI • q.i + x.imJ • q.j + x.imK • q.k +\n      (↑(algebraMap R A) y.re + y.imI • q.i + y.imJ • q.j + y.imK • q.k)\n[PROOFSTEP]\nabel\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : Ring A\ninst✝² : Ring B\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nc₁ c₂ : R\nq : Basis A c₁ c₂\nx y : ℍ[R,c₁,c₂]\n⊢ ↑(algebraMap R A) x.re + ↑(algebraMap R A) y.re + (x.imI • q.i + y.imI • q.i) + (x.imJ • q.j + y.imJ • q.j) +\n      (x.imK • q.k + y.imK • q.k) =\n    ↑(algebraMap R A) x.re + x.imI • q.i + x.imJ • q.j + x.imK • q.k +\n      (↑(algebraMap R A) y.re + y.imI • q.i + y.imJ • q.j + y.imK • q.k)\n[PROOFSTEP]\nabel\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : Ring A\ninst✝² : Ring B\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nc₁ c₂ : R\nq : Basis A c₁ c₂\nx y : ℍ[R,c₁,c₂]\n⊢ lift q (x * y) = lift q x * lift q y\n[PROOFSTEP]\nsimp only [lift, Algebra.algebraMap_eq_smul_one]\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : Ring A\ninst✝² : Ring B\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nc₁ c₂ : R\nq : Basis A c₁ c₂\nx y : ℍ[R,c₁,c₂]\n⊢ (x * y).re • 1 + (x * y).imI • q.i + (x * y).imJ • q.j + (x * y).imK • q.k =\n    (x.re • 1 + x.imI • q.i + x.imJ • q.j + x.imK • q.k) * (y.re • 1 + y.imI • q.i + y.imJ • q.j + y.imK • q.k)\n[PROOFSTEP]\nsimp_rw [add_mul, mul_add, smul_mul_assoc, mul_smul_comm, one_mul, mul_one, smul_smul]\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : Ring A\ninst✝² : Ring B\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nc₁ c₂ : R\nq : Basis A c₁ c₂\nx y : ℍ[R,c₁,c₂]\n⊢ (x * y).re • 1 + (x * y).imI • q.i + (x * y).imJ • q.j + (x * y).imK • q.k =\n    (x.re * y.re) • 1 + (x.re * y.imI) • q.i + (x.re * y.imJ) • q.j + (x.re * y.imK) • q.k +\n          ((x.imI * y.re) • q.i + (x.imI * y.imI) • (q.i * q.i) + (x.imI * y.imJ) • (q.i * q.j) +\n            (x.imI * y.imK) • (q.i * q.k)) +\n        ((x.imJ * y.re) • q.j + (x.imJ * y.imI) • (q.j * q.i) + (x.imJ * y.imJ) • (q.j * q.j) +\n          (x.imJ * y.imK) • (q.j * q.k)) +\n      ((x.imK * y.re) • q.k + (x.imK * y.imI) • (q.k * q.i) + (x.imK * y.imJ) • (q.k * q.j) +\n        (x.imK * y.imK) • (q.k * q.k))\n[PROOFSTEP]\nsimp only [i_mul_i, j_mul_j, i_mul_j, j_mul_i, i_mul_k, k_mul_i, k_mul_j, j_mul_k, k_mul_k]\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : Ring A\ninst✝² : Ring B\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nc₁ c₂ : R\nq : Basis A c₁ c₂\nx y : ℍ[R,c₁,c₂]\n⊢ (x * y).re • 1 + (x * y).imI • q.i + (x * y).imJ • q.j + (x * y).imK • q.k =\n    (x.re * y.re) • 1 + (x.re * y.imI) • q.i + (x.re * y.imJ) • q.j + (x.re * y.imK) • q.k +\n          ((x.imI * y.re) • q.i + (x.imI * y.imI) • c₁ • 1 + (x.imI * y.imJ) • q.k + (x.imI * y.imK) • c₁ • q.j) +\n        ((x.imJ * y.re) • q.j + (x.imJ * y.imI) • -q.k + (x.imJ * y.imJ) • c₂ • 1 + (x.imJ * y.imK) • -c₂ • q.i) +\n      ((x.imK * y.re) • q.k + (x.imK * y.imI) • -c₁ • q.j + (x.imK * y.imJ) • c₂ • q.i +\n        (x.imK * y.imK) • -((c₁ * c₂) • 1))\n[PROOFSTEP]\nsimp only [smul_smul, smul_neg, sub_eq_add_neg, add_smul, ← add_assoc, mul_neg, neg_smul]\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : Ring A\ninst✝² : Ring B\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nc₁ c₂ : R\nq : Basis A c₁ c₂\nx y : ℍ[R,c₁,c₂]\n⊢ (x * y).re • 1 + (x * y).imI • q.i + (x * y).imJ • q.j + (x * y).imK • q.k =\n    (x.re * y.re) • 1 + (x.re * y.imI) • q.i + (x.re * y.imJ) • q.j + (x.re * y.imK) • q.k + (x.imI * y.re) • q.i +\n                          (x.imI * y.imI * c₁) • 1 +\n                        (x.imI * y.imJ) • q.k +\n                      (x.imI * y.imK * c₁) • q.j +\n                    (x.imJ * y.re) • q.j +\n                  -((x.imJ * y.imI) • q.k) +\n                (x.imJ * y.imJ * c₂) • 1 +\n              -((x.imJ * y.imK * c₂) • q.i) +\n            (x.imK * y.re) • q.k +\n          -((x.imK * y.imI * c₁) • q.j) +\n        (x.imK * y.imJ * c₂) • q.i +\n      -((x.imK * y.imK * (c₁ * c₂)) • 1)\n[PROOFSTEP]\nsimp only [mul_right_comm _ _ (c₁ * c₂), mul_comm _ (c₁ * c₂)]\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : Ring A\ninst✝² : Ring B\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nc₁ c₂ : R\nq : Basis A c₁ c₂\nx y : ℍ[R,c₁,c₂]\n⊢ (x * y).re • 1 + (x * y).imI • q.i + (x * y).imJ • q.j + (x * y).imK • q.k =\n    (x.re * y.re) • 1 + (x.re * y.imI) • q.i + (x.re * y.imJ) • q.j + (x.re * y.imK) • q.k + (x.imI * y.re) • q.i +\n                          (x.imI * y.imI * c₁) • 1 +\n                        (x.imI * y.imJ) • q.k +\n                      (x.imI * y.imK * c₁) • q.j +\n                    (x.imJ * y.re) • q.j +\n                  -((x.imJ * y.imI) • q.k) +\n                (x.imJ * y.imJ * c₂) • 1 +\n              -((x.imJ * y.imK * c₂) • q.i) +\n            (x.imK * y.re) • q.k +\n          -((x.imK * y.imI * c₁) • q.j) +\n        (x.imK * y.imJ * c₂) • q.i +\n      -((c₁ * c₂ * (x.imK * y.imK)) • 1)\n[PROOFSTEP]\nsimp only [mul_comm _ c₁, mul_right_comm _ _ c₁]\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : Ring A\ninst✝² : Ring B\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nc₁ c₂ : R\nq : Basis A c₁ c₂\nx y : ℍ[R,c₁,c₂]\n⊢ (x * y).re • 1 + (x * y).imI • q.i + (x * y).imJ • q.j + (x * y).imK • q.k =\n    (x.re * y.re) • 1 + (x.re * y.imI) • q.i + (x.re * y.imJ) • q.j + (x.re * y.imK) • q.k + (x.imI * y.re) • q.i +\n                          (c₁ * (x.imI * y.imI)) • 1 +\n                        (x.imI * y.imJ) • q.k +\n                      (c₁ * (x.imI * y.imK)) • q.j +\n                    (x.imJ * y.re) • q.j +\n                  -((x.imJ * y.imI) • q.k) +\n                (x.imJ * y.imJ * c₂) • 1 +\n              -((x.imJ * y.imK * c₂) • q.i) +\n            (x.imK * y.re) • q.k +\n          -((c₁ * (x.imK * y.imI)) • q.j) +\n        (x.imK * y.imJ * c₂) • q.i +\n      -((c₁ * c₂ * (x.imK * y.imK)) • 1)\n[PROOFSTEP]\nsimp only [mul_comm _ c₂, mul_right_comm _ _ c₂]\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : Ring A\ninst✝² : Ring B\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nc₁ c₂ : R\nq : Basis A c₁ c₂\nx y : ℍ[R,c₁,c₂]\n⊢ (x * y).re • 1 + (x * y).imI • q.i + (x * y).imJ • q.j + (x * y).imK • q.k =\n    (x.re * y.re) • 1 + (x.re * y.imI) • q.i + (x.re * y.imJ) • q.j + (x.re * y.imK) • q.k + (x.imI * y.re) • q.i +\n                          (c₁ * (x.imI * y.imI)) • 1 +\n                        (x.imI * y.imJ) • q.k +\n                      (c₁ * (x.imI * y.imK)) • q.j +\n                    (x.imJ * y.re) • q.j +\n                  -((x.imJ * y.imI) • q.k) +\n                (c₂ * (x.imJ * y.imJ)) • 1 +\n              -((c₂ * (x.imJ * y.imK)) • q.i) +\n            (x.imK * y.re) • q.k +\n          -((c₁ * (x.imK * y.imI)) • q.j) +\n        (c₂ * (x.imK * y.imJ)) • q.i +\n      -((c₂ * c₁ * (x.imK * y.imK)) • 1)\n[PROOFSTEP]\nsimp only [← mul_comm c₁ c₂, ← mul_assoc]\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : Ring A\ninst✝² : Ring B\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nc₁ c₂ : R\nq : Basis A c₁ c₂\nx y : ℍ[R,c₁,c₂]\n⊢ (x * y).re • 1 + (x * y).imI • q.i + (x * y).imJ • q.j + (x * y).imK • q.k =\n    (x.re * y.re) • 1 + (x.re * y.imI) • q.i + (x.re * y.imJ) • q.j + (x.re * y.imK) • q.k + (x.imI * y.re) • q.i +\n                          (c₁ * x.imI * y.imI) • 1 +\n                        (x.imI * y.imJ) • q.k +\n                      (c₁ * x.imI * y.imK) • q.j +\n                    (x.imJ * y.re) • q.j +\n                  -((x.imJ * y.imI) • q.k) +\n                (c₂ * x.imJ * y.imJ) • 1 +\n              -((c₂ * x.imJ * y.imK) • q.i) +\n            (x.imK * y.re) • q.k +\n          -((c₁ * x.imK * y.imI) • q.j) +\n        (c₂ * x.imK * y.imJ) • q.i +\n      -((c₁ * c₂ * x.imK * y.imK) • 1)\n[PROOFSTEP]\nsimp [sub_eq_add_neg, add_smul, ← add_assoc]\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : Ring A\ninst✝² : Ring B\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nc₁ c₂ : R\nq : Basis A c₁ c₂\nx y : ℍ[R,c₁,c₂]\n⊢ (x.re * y.re) • 1 + (c₁ * x.imI * y.imI) • 1 + (c₂ * x.imJ * y.imJ) • 1 + -((c₁ * c₂ * x.imK * y.imK) • 1) +\n                            (x.re * y.imI) • q.i +\n                          (x.imI * y.re) • q.i +\n                        -((c₂ * x.imJ * y.imK) • q.i) +\n                      (c₂ * x.imK * y.imJ) • q.i +\n                    (x.re * y.imJ) • q.j +\n                  (c₁ * x.imI * y.imK) • q.j +\n                (x.imJ * y.re) • q.j +\n              -((c₁ * x.imK * y.imI) • q.j) +\n            (x.re * y.imK) • q.k +\n          (x.imI * y.imJ) • q.k +\n        -((x.imJ * y.imI) • q.k) +\n      (x.imK * y.re) • q.k =\n    (x.re * y.re) • 1 + (x.re * y.imI) • q.i + (x.re * y.imJ) • q.j + (x.re * y.imK) • q.k + (x.imI * y.re) • q.i +\n                          (c₁ * x.imI * y.imI) • 1 +\n                        (x.imI * y.imJ) • q.k +\n                      (c₁ * x.imI * y.imK) • q.j +\n                    (x.imJ * y.re) • q.j +\n                  -((x.imJ * y.imI) • q.k) +\n                (c₂ * x.imJ * y.imJ) • 1 +\n              -((c₂ * x.imJ * y.imK) • q.i) +\n            (x.imK * y.re) • q.k +\n          -((c₁ * x.imK * y.imI) • q.j) +\n        (c₂ * x.imK * y.imJ) • q.i +\n      -((c₁ * c₂ * x.imK * y.imK) • 1)\n[PROOFSTEP]\nabel\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : Ring A\ninst✝² : Ring B\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nc₁ c₂ : R\nq : Basis A c₁ c₂\nx y : ℍ[R,c₁,c₂]\n⊢ (x.re * y.re) • 1 + (c₁ * x.imI * y.imI) • 1 + (c₂ * x.imJ * y.imJ) • 1 + -((c₁ * c₂ * x.imK * y.imK) • 1) +\n                            (x.re * y.imI) • q.i +\n                          (x.imI * y.re) • q.i +\n                        -((c₂ * x.imJ * y.imK) • q.i) +\n                      (c₂ * x.imK * y.imJ) • q.i +\n                    (x.re * y.imJ) • q.j +\n                  (c₁ * x.imI * y.imK) • q.j +\n                (x.imJ * y.re) • q.j +\n              -((c₁ * x.imK * y.imI) • q.j) +\n            (x.re * y.imK) • q.k +\n          (x.imI * y.imJ) • q.k +\n        -((x.imJ * y.imI) • q.k) +\n      (x.imK * y.re) • q.k =\n    (x.re * y.re) • 1 + (x.re * y.imI) • q.i + (x.re * y.imJ) • q.j + (x.re * y.imK) • q.k + (x.imI * y.re) • q.i +\n                          (c₁ * x.imI * y.imI) • 1 +\n                        (x.imI * y.imJ) • q.k +\n                      (c₁ * x.imI * y.imK) • q.j +\n                    (x.imJ * y.re) • q.j +\n                  -((x.imJ * y.imI) • q.k) +\n                (c₂ * x.imJ * y.imJ) • 1 +\n              -((c₂ * x.imJ * y.imK) • q.i) +\n            (x.imK * y.re) • q.k +\n          -((c₁ * x.imK * y.imI) • q.j) +\n        (c₂ * x.imK * y.imJ) • q.i +\n      -((c₁ * c₂ * x.imK * y.imK) • 1)\n[PROOFSTEP]\nabel\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : Ring A\ninst✝² : Ring B\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nc₁ c₂ : R\nq : Basis A c₁ c₂\nr : R\nx : ℍ[R,c₁,c₂]\n⊢ lift q (r • x) = r • lift q x\n[PROOFSTEP]\nsimp [lift, mul_smul, ← Algebra.smul_def]\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : Ring A\ninst✝² : Ring B\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nc₁ c₂ : R\nq : Basis A c₁ c₂\nF : A →ₐ[R] B\n⊢ ↑F q.i * ↑F q.i = c₁ • 1\n[PROOFSTEP]\nrw [← F.map_mul, q.i_mul_i, F.map_smul, F.map_one]\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : Ring A\ninst✝² : Ring B\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nc₁ c₂ : R\nq : Basis A c₁ c₂\nF : A →ₐ[R] B\n⊢ ↑F q.j * ↑F q.j = c₂ • 1\n[PROOFSTEP]\nrw [← F.map_mul, q.j_mul_j, F.map_smul, F.map_one]\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : Ring A\ninst✝² : Ring B\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nc₁ c₂ : R\nq : Basis A c₁ c₂\nF : A →ₐ[R] B\n⊢ ↑F q.i * ↑F q.j = ↑F q.k\n[PROOFSTEP]\nrw [← F.map_mul, q.i_mul_j]\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : Ring A\ninst✝² : Ring B\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nc₁ c₂ : R\nq : Basis A c₁ c₂\nF : A →ₐ[R] B\n⊢ ↑F q.j * ↑F q.i = -↑F q.k\n[PROOFSTEP]\nrw [← F.map_mul, q.j_mul_i, F.map_neg]\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : Ring A\ninst✝² : Ring B\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nc₁ c₂ : R\nq : Basis A c₁ c₂\n⊢ Basis.compHom (Basis.self R) (Basis.liftHom q) = q\n[PROOFSTEP]\next\n[GOAL]\ncase hi\nR : Type u_1\nA : Type u_2\nB : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : Ring A\ninst✝² : Ring B\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nc₁ c₂ : R\nq : Basis A c₁ c₂\n⊢ (Basis.compHom (Basis.self R) (Basis.liftHom q)).i = q.i\n[PROOFSTEP]\nsimp [Basis.lift]\n[GOAL]\ncase hj\nR : Type u_1\nA : Type u_2\nB : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : Ring A\ninst✝² : Ring B\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nc₁ c₂ : R\nq : Basis A c₁ c₂\n⊢ (Basis.compHom (Basis.self R) (Basis.liftHom q)).j = q.j\n[PROOFSTEP]\nsimp [Basis.lift]\n[GOAL]\nR : Type u_1\nA : Type u_2\nB : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : Ring A\ninst✝² : Ring B\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nc₁ c₂ : R\nF : ℍ[R,c₁,c₂] →ₐ[R] A\n⊢ Basis.liftHom (Basis.compHom (Basis.self R) F) = F\n[PROOFSTEP]\next\n[GOAL]\ncase H\nR : Type u_1\nA : Type u_2\nB : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : Ring A\ninst✝² : Ring B\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nc₁ c₂ : R\nF : ℍ[R,c₁,c₂] →ₐ[R] A\nx✝ : ℍ[R,c₁,c₂]\n⊢ ↑(Basis.liftHom (Basis.compHom (Basis.self R) F)) x✝ = ↑F x✝\n[PROOFSTEP]\ndsimp [Basis.lift]\n[GOAL]\ncase H\nR : Type u_1\nA : Type u_2\nB : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : Ring A\ninst✝² : Ring B\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nc₁ c₂ : R\nF : ℍ[R,c₁,c₂] →ₐ[R] A\nx✝ : ℍ[R,c₁,c₂]\n⊢ ↑(algebraMap R A) x✝.re + x✝.imI • ↑F { re := 0, imI := 1, imJ := 0, imK := 0 } +\n        x✝.imJ • ↑F { re := 0, imI := 0, imJ := 1, imK := 0 } +\n      x✝.imK • ↑F { re := 0, imI := 0, imJ := 0, imK := 1 } =\n    ↑F x✝\n[PROOFSTEP]\nrw [← F.commutes]\n[GOAL]\ncase H\nR : Type u_1\nA : Type u_2\nB : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : Ring A\ninst✝² : Ring B\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nc₁ c₂ : R\nF : ℍ[R,c₁,c₂] →ₐ[R] A\nx✝ : ℍ[R,c₁,c₂]\n⊢ ↑F (↑(algebraMap R ℍ[R,c₁,c₂]) x✝.re) + x✝.imI • ↑F { re := 0, imI := 1, imJ := 0, imK := 0 } +\n        x✝.imJ • ↑F { re := 0, imI := 0, imJ := 1, imK := 0 } +\n      x✝.imK • ↑F { re := 0, imI := 0, imJ := 0, imK := 1 } =\n    ↑F x✝\n[PROOFSTEP]\nsimp only [← F.commutes, ← F.map_smul, ← F.map_add, mk_add_mk, smul_mk, smul_zero, algebraMap_eq]\n[GOAL]\ncase H\nR : Type u_1\nA : Type u_2\nB : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : Ring A\ninst✝² : Ring B\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nc₁ c₂ : R\nF : ℍ[R,c₁,c₂] →ₐ[R] A\nx✝ : ℍ[R,c₁,c₂]\n⊢ ↑F\n      { re := x✝.re + 0 + 0 + 0, imI := 0 + x✝.imI • 1 + 0 + 0, imJ := 0 + 0 + x✝.imJ • 1 + 0,\n        imK := 0 + 0 + 0 + x✝.imK • 1 } =\n    ↑F x✝\n[PROOFSTEP]\ncongr\n[GOAL]\ncase H.h.e_6.h.e_re\nR : Type u_1\nA : Type u_2\nB : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : Ring A\ninst✝² : Ring B\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nc₁ c₂ : R\nF : ℍ[R,c₁,c₂] →ₐ[R] A\nx✝ : ℍ[R,c₁,c₂]\n⊢ x✝.re + 0 + 0 + 0 = x✝.re\n[PROOFSTEP]\nsimp\n[GOAL]\ncase H.h.e_6.h.e_imI\nR : Type u_1\nA : Type u_2\nB : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : Ring A\ninst✝² : Ring B\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nc₁ c₂ : R\nF : ℍ[R,c₁,c₂] →ₐ[R] A\nx✝ : ℍ[R,c₁,c₂]\n⊢ 0 + x✝.imI • 1 + 0 + 0 = x✝.imI\n[PROOFSTEP]\nsimp\n[GOAL]\ncase H.h.e_6.h.e_imJ\nR : Type u_1\nA : Type u_2\nB : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : Ring A\ninst✝² : Ring B\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nc₁ c₂ : R\nF : ℍ[R,c₁,c₂] →ₐ[R] A\nx✝ : ℍ[R,c₁,c₂]\n⊢ 0 + 0 + x✝.imJ • 1 + 0 = x✝.imJ\n[PROOFSTEP]\nsimp\n[GOAL]\ncase H.h.e_6.h.e_imK\nR : Type u_1\nA : Type u_2\nB : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : Ring A\ninst✝² : Ring B\ninst✝¹ : Algebra R A\ninst✝ : Algebra R B\nc₁ c₂ : R\nF : ℍ[R,c₁,c₂] →ₐ[R] A\nx✝ : ℍ[R,c₁,c₂]\n⊢ 0 + 0 + 0 + x✝.imK • 1 = x✝.imK\n[PROOFSTEP]\nsimp\n", "meta": {"mathlib_filename": "Mathlib.Algebra.QuaternionBasis", "llama_tokens": 18048, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8723473846343393, "lm_q2_score": 0.6039318337259583, "lm_q1q2_score": 0.5268383556482603}}
{"text": "[GOAL]\nk : Type u_1\nV1 : Type u_2\nP1 : Type u_3\nV2 : Type u_4\nP2 : Type u_5\ninst✝⁶ : Ring k\ninst✝⁵ : AddCommGroup V1\ninst✝⁴ : Module k V1\ninst✝³ : AffineSpace V1 P1\ninst✝² : AddCommGroup V2\ninst✝¹ : Module k V2\ninst✝ : AffineSpace V2 P2\nx✝¹ x✝ : P1 →ᵃ[k] P2\nf : P1 → P2\nf_linear : V1 →ₗ[k] V2\nf_add : ∀ (p : P1) (v : V1), f (v +ᵥ p) = ↑f_linear v +ᵥ f p\ng : P1 → P2\ng_linear : V1 →ₗ[k] V2\ng_add : ∀ (p : P1) (v : V1), g (v +ᵥ p) = ↑g_linear v +ᵥ g p\nh : f = g\n⊢ { toFun := f, linear := f_linear, map_vadd' := f_add } = { toFun := g, linear := g_linear, map_vadd' := g_add }\n[PROOFSTEP]\ncases' (AddTorsor.Nonempty : Nonempty P1) with p\n[GOAL]\ncase intro\nk : Type u_1\nV1 : Type u_2\nP1 : Type u_3\nV2 : Type u_4\nP2 : Type u_5\ninst✝⁶ : Ring k\ninst✝⁵ : AddCommGroup V1\ninst✝⁴ : Module k V1\ninst✝³ : AffineSpace V1 P1\ninst✝² : AddCommGroup V2\ninst✝¹ : Module k V2\ninst✝ : AffineSpace V2 P2\nx✝¹ x✝ : P1 →ᵃ[k] P2\nf : P1 → P2\nf_linear : V1 →ₗ[k] V2\nf_add : ∀ (p : P1) (v : V1), f (v +ᵥ p) = ↑f_linear v +ᵥ f p\ng : P1 → P2\ng_linear : V1 →ₗ[k] V2\ng_add : ∀ (p : P1) (v : V1), g (v +ᵥ p) = ↑g_linear v +ᵥ g p\nh : f = g\np : P1\n⊢ { toFun := f, linear := f_linear, map_vadd' := f_add } = { toFun := g, linear := g_linear, map_vadd' := g_add }\n[PROOFSTEP]\ncongr with v\n[GOAL]\ncase intro.e_linear.h\nk : Type u_1\nV1 : Type u_2\nP1 : Type u_3\nV2 : Type u_4\nP2 : Type u_5\ninst✝⁶ : Ring k\ninst✝⁵ : AddCommGroup V1\ninst✝⁴ : Module k V1\ninst✝³ : AffineSpace V1 P1\ninst✝² : AddCommGroup V2\ninst✝¹ : Module k V2\ninst✝ : AffineSpace V2 P2\nx✝¹ x✝ : P1 →ᵃ[k] P2\nf : P1 → P2\nf_linear : V1 →ₗ[k] V2\nf_add : ∀ (p : P1) (v : V1), f (v +ᵥ p) = ↑f_linear v +ᵥ f p\ng : P1 → P2\ng_linear : V1 →ₗ[k] V2\ng_add : ∀ (p : P1) (v : V1), g (v +ᵥ p) = ↑g_linear v +ᵥ g p\nh : f = g\np : P1\nv : V1\n⊢ ↑f_linear v = ↑g_linear v\n[PROOFSTEP]\napply vadd_right_cancel (f p)\n[GOAL]\ncase intro.e_linear.h\nk : Type u_1\nV1 : Type u_2\nP1 : Type u_3\nV2 : Type u_4\nP2 : Type u_5\ninst✝⁶ : Ring k\ninst✝⁵ : AddCommGroup V1\ninst✝⁴ : Module k V1\ninst✝³ : AffineSpace V1 P1\ninst✝² : AddCommGroup V2\ninst✝¹ : Module k V2\ninst✝ : AffineSpace V2 P2\nx✝¹ x✝ : P1 →ᵃ[k] P2\nf : P1 → P2\nf_linear : V1 →ₗ[k] V2\nf_add : ∀ (p : P1) (v : V1), f (v +ᵥ p) = ↑f_linear v +ᵥ f p\ng : P1 → P2\ng_linear : V1 →ₗ[k] V2\ng_add : ∀ (p : P1) (v : V1), g (v +ᵥ p) = ↑g_linear v +ᵥ g p\nh : f = g\np : P1\nv : V1\n⊢ ↑f_linear v +ᵥ f p = ↑g_linear v +ᵥ f p\n[PROOFSTEP]\nerw [← f_add, h, ← g_add]\n[GOAL]\nk : Type u_1\nV1 : Type u_2\nP1 : Type u_3\nV2 : Type u_4\nP2 : Type u_5\nV3 : Type u_6\nP3 : Type u_7\nV4 : Type u_8\nP4 : Type u_9\ninst✝¹² : Ring k\ninst✝¹¹ : AddCommGroup V1\ninst✝¹⁰ : Module k V1\ninst✝⁹ : AffineSpace V1 P1\ninst✝⁸ : AddCommGroup V2\ninst✝⁷ : Module k V2\ninst✝⁶ : AffineSpace V2 P2\ninst✝⁵ : AddCommGroup V3\ninst✝⁴ : Module k V3\ninst✝³ : AffineSpace V3 P3\ninst✝² : AddCommGroup V4\ninst✝¹ : Module k V4\ninst✝ : AffineSpace V4 P4\nf : P1 →ᵃ[k] P2\np1 p2 : P1\n⊢ ↑f.linear (p1 -ᵥ p2) = ↑f p1 -ᵥ ↑f p2\n[PROOFSTEP]\nconv_rhs => rw [← vsub_vadd p1 p2, map_vadd, vadd_vsub]\n[GOAL]\nk : Type u_1\nV1 : Type u_2\nP1 : Type u_3\nV2 : Type u_4\nP2 : Type u_5\nV3 : Type u_6\nP3 : Type u_7\nV4 : Type u_8\nP4 : Type u_9\ninst✝¹² : Ring k\ninst✝¹¹ : AddCommGroup V1\ninst✝¹⁰ : Module k V1\ninst✝⁹ : AffineSpace V1 P1\ninst✝⁸ : AddCommGroup V2\ninst✝⁷ : Module k V2\ninst✝⁶ : AffineSpace V2 P2\ninst✝⁵ : AddCommGroup V3\ninst✝⁴ : Module k V3\ninst✝³ : AffineSpace V3 P3\ninst✝² : AddCommGroup V4\ninst✝¹ : Module k V4\ninst✝ : AffineSpace V4 P4\nf : P1 →ᵃ[k] P2\np1 p2 : P1\n| ↑f p1 -ᵥ ↑f p2\n[PROOFSTEP]\nrw [← vsub_vadd p1 p2, map_vadd, vadd_vsub]\n[GOAL]\nk : Type u_1\nV1 : Type u_2\nP1 : Type u_3\nV2 : Type u_4\nP2 : Type u_5\nV3 : Type u_6\nP3 : Type u_7\nV4 : Type u_8\nP4 : Type u_9\ninst✝¹² : Ring k\ninst✝¹¹ : AddCommGroup V1\ninst✝¹⁰ : Module k V1\ninst✝⁹ : AffineSpace V1 P1\ninst✝⁸ : AddCommGroup V2\ninst✝⁷ : Module k V2\ninst✝⁶ : AffineSpace V2 P2\ninst✝⁵ : AddCommGroup V3\ninst✝⁴ : Module k V3\ninst✝³ : AffineSpace V3 P3\ninst✝² : AddCommGroup V4\ninst✝¹ : Module k V4\ninst✝ : AffineSpace V4 P4\nf : P1 →ᵃ[k] P2\np1 p2 : P1\n| ↑f p1 -ᵥ ↑f p2\n[PROOFSTEP]\nrw [← vsub_vadd p1 p2, map_vadd, vadd_vsub]\n[GOAL]\nk : Type u_1\nV1 : Type u_2\nP1 : Type u_3\nV2 : Type u_4\nP2 : Type u_5\nV3 : Type u_6\nP3 : Type u_7\nV4 : Type u_8\nP4 : Type u_9\ninst✝¹² : Ring k\ninst✝¹¹ : AddCommGroup V1\ninst✝¹⁰ : Module k V1\ninst✝⁹ : AffineSpace V1 P1\ninst✝⁸ : AddCommGroup V2\ninst✝⁷ : Module k V2\ninst✝⁶ : AffineSpace V2 P2\ninst✝⁵ : AddCommGroup V3\ninst✝⁴ : Module k V3\ninst✝³ : AffineSpace V3 P3\ninst✝² : AddCommGroup V4\ninst✝¹ : Module k V4\ninst✝ : AffineSpace V4 P4\nf : P1 →ᵃ[k] P2\np1 p2 : P1\n| ↑f p1 -ᵥ ↑f p2\n[PROOFSTEP]\nrw [← vsub_vadd p1 p2, map_vadd, vadd_vsub]\n[GOAL]\nk : Type u_1\nV1 : Type u_2\nP1 : Type u_3\nV2 : Type u_4\nP2 : Type u_5\nV3 : Type u_6\nP3 : Type u_7\nV4 : Type u_8\nP4 : Type u_9\ninst✝¹² : Ring k\ninst✝¹¹ : AddCommGroup V1\ninst✝¹⁰ : Module k V1\ninst✝⁹ : AffineSpace V1 P1\ninst✝⁸ : AddCommGroup V2\ninst✝⁷ : Module k V2\ninst✝⁶ : AffineSpace V2 P2\ninst✝⁵ : AddCommGroup V3\ninst✝⁴ : Module k V3\ninst✝³ : AffineSpace V3 P3\ninst✝² : AddCommGroup V4\ninst✝¹ : Module k V4\ninst✝ : AffineSpace V4 P4\np : P2\nx✝¹ : P1\nx✝ : V1\nthis : AddAction V2 P2 := inferInstance\n⊢ Function.const P1 p (x✝ +ᵥ x✝¹) = ↑0 x✝ +ᵥ Function.const P1 p x✝¹\n[PROOFSTEP]\nsimp\n[GOAL]\nk : Type u_1\nV1 : Type u_2\nP1 : Type u_3\nV2 : Type u_4\nP2 : Type u_5\nV3 : Type u_6\nP3 : Type u_7\nV4 : Type u_8\nP4 : Type u_9\ninst✝¹² : Ring k\ninst✝¹¹ : AddCommGroup V1\ninst✝¹⁰ : Module k V1\ninst✝⁹ : AffineSpace V1 P1\ninst✝⁸ : AddCommGroup V2\ninst✝⁷ : Module k V2\ninst✝⁶ : AffineSpace V2 P2\ninst✝⁵ : AddCommGroup V3\ninst✝⁴ : Module k V3\ninst✝³ : AffineSpace V3 P3\ninst✝² : AddCommGroup V4\ninst✝¹ : Module k V4\ninst✝ : AffineSpace V4 P4\nf : P1 →ᵃ[k] P2\n⊢ f.linear = 0 ↔ ∃ q, f = const k P1 q\n[PROOFSTEP]\nrefine' ⟨fun h => _, fun h => _⟩\n[GOAL]\ncase refine'_1\nk : Type u_1\nV1 : Type u_2\nP1 : Type u_3\nV2 : Type u_4\nP2 : Type u_5\nV3 : Type u_6\nP3 : Type u_7\nV4 : Type u_8\nP4 : Type u_9\ninst✝¹² : Ring k\ninst✝¹¹ : AddCommGroup V1\ninst✝¹⁰ : Module k V1\ninst✝⁹ : AffineSpace V1 P1\ninst✝⁸ : AddCommGroup V2\ninst✝⁷ : Module k V2\ninst✝⁶ : AffineSpace V2 P2\ninst✝⁵ : AddCommGroup V3\ninst✝⁴ : Module k V3\ninst✝³ : AffineSpace V3 P3\ninst✝² : AddCommGroup V4\ninst✝¹ : Module k V4\ninst✝ : AffineSpace V4 P4\nf : P1 →ᵃ[k] P2\nh : f.linear = 0\n⊢ ∃ q, f = const k P1 q\n[PROOFSTEP]\nuse f (Classical.arbitrary P1)\n[GOAL]\ncase h\nk : Type u_1\nV1 : Type u_2\nP1 : Type u_3\nV2 : Type u_4\nP2 : Type u_5\nV3 : Type u_6\nP3 : Type u_7\nV4 : Type u_8\nP4 : Type u_9\ninst✝¹² : Ring k\ninst✝¹¹ : AddCommGroup V1\ninst✝¹⁰ : Module k V1\ninst✝⁹ : AffineSpace V1 P1\ninst✝⁸ : AddCommGroup V2\ninst✝⁷ : Module k V2\ninst✝⁶ : AffineSpace V2 P2\ninst✝⁵ : AddCommGroup V3\ninst✝⁴ : Module k V3\ninst✝³ : AffineSpace V3 P3\ninst✝² : AddCommGroup V4\ninst✝¹ : Module k V4\ninst✝ : AffineSpace V4 P4\nf : P1 →ᵃ[k] P2\nh : f.linear = 0\n⊢ f = const k P1 (↑f (Classical.arbitrary P1))\n[PROOFSTEP]\next\n[GOAL]\ncase h.h\nk : Type u_1\nV1 : Type u_2\nP1 : Type u_3\nV2 : Type u_4\nP2 : Type u_5\nV3 : Type u_6\nP3 : Type u_7\nV4 : Type u_8\nP4 : Type u_9\ninst✝¹² : Ring k\ninst✝¹¹ : AddCommGroup V1\ninst✝¹⁰ : Module k V1\ninst✝⁹ : AffineSpace V1 P1\ninst✝⁸ : AddCommGroup V2\ninst✝⁷ : Module k V2\ninst✝⁶ : AffineSpace V2 P2\ninst✝⁵ : AddCommGroup V3\ninst✝⁴ : Module k V3\ninst✝³ : AffineSpace V3 P3\ninst✝² : AddCommGroup V4\ninst✝¹ : Module k V4\ninst✝ : AffineSpace V4 P4\nf : P1 →ᵃ[k] P2\nh : f.linear = 0\np✝ : P1\n⊢ ↑f p✝ = ↑(const k P1 (↑f (Classical.arbitrary P1))) p✝\n[PROOFSTEP]\nrw [coe_const, Function.const_apply, ← @vsub_eq_zero_iff_eq V2, ← f.linearMap_vsub, h, LinearMap.zero_apply]\n[GOAL]\ncase refine'_2\nk : Type u_1\nV1 : Type u_2\nP1 : Type u_3\nV2 : Type u_4\nP2 : Type u_5\nV3 : Type u_6\nP3 : Type u_7\nV4 : Type u_8\nP4 : Type u_9\ninst✝¹² : Ring k\ninst✝¹¹ : AddCommGroup V1\ninst✝¹⁰ : Module k V1\ninst✝⁹ : AffineSpace V1 P1\ninst✝⁸ : AddCommGroup V2\ninst✝⁷ : Module k V2\ninst✝⁶ : AffineSpace V2 P2\ninst✝⁵ : AddCommGroup V3\ninst✝⁴ : Module k V3\ninst✝³ : AffineSpace V3 P3\ninst✝² : AddCommGroup V4\ninst✝¹ : Module k V4\ninst✝ : AffineSpace V4 P4\nf : P1 →ᵃ[k] P2\nh : ∃ q, f = const k P1 q\n⊢ f.linear = 0\n[PROOFSTEP]\nrcases h with ⟨q, rfl⟩\n[GOAL]\ncase refine'_2.intro\nk : Type u_1\nV1 : Type u_2\nP1 : Type u_3\nV2 : Type u_4\nP2 : Type u_5\nV3 : Type u_6\nP3 : Type u_7\nV4 : Type u_8\nP4 : Type u_9\ninst✝¹² : Ring k\ninst✝¹¹ : AddCommGroup V1\ninst✝¹⁰ : Module k V1\ninst✝⁹ : AffineSpace V1 P1\ninst✝⁸ : AddCommGroup V2\ninst✝⁷ : Module k V2\ninst✝⁶ : AffineSpace V2 P2\ninst✝⁵ : AddCommGroup V3\ninst✝⁴ : Module k V3\ninst✝³ : AffineSpace V3 P3\ninst✝² : AddCommGroup V4\ninst✝¹ : Module k V4\ninst✝ : AffineSpace V4 P4\nq : P2\n⊢ (const k P1 q).linear = 0\n[PROOFSTEP]\nexact const_linear k P1 q\n[GOAL]\nk : Type u_1\nV1 : Type u_2\nP1 : Type u_3\nV2 : Type u_4\nP2 : Type u_5\nV3 : Type u_6\nP3 : Type u_7\nV4 : Type u_8\nP4 : Type u_9\ninst✝¹² : Ring k\ninst✝¹¹ : AddCommGroup V1\ninst✝¹⁰ : Module k V1\ninst✝⁹ : AffineSpace V1 P1\ninst✝⁸ : AddCommGroup V2\ninst✝⁷ : Module k V2\ninst✝⁶ : AffineSpace V2 P2\ninst✝⁵ : AddCommGroup V3\ninst✝⁴ : Module k V3\ninst✝³ : AffineSpace V3 P3\ninst✝² : AddCommGroup V4\ninst✝¹ : Module k V4\ninst✝ : AffineSpace V4 P4\nf : P1 → P2\nf' : V1 →ₗ[k] V2\np : P1\nh : ∀ (p' : P1), f p' = ↑f' (p' -ᵥ p) +ᵥ f p\np' : P1\nv : V1\n⊢ f (v +ᵥ p') = ↑f' v +ᵥ f p'\n[PROOFSTEP]\nrw [h, h p', vadd_vsub_assoc, f'.map_add, vadd_vadd]\n[GOAL]\nk : Type u_1\nV1 : Type u_2\nP1 : Type u_3\nV2 : Type u_4\nP2 : Type u_5\nV3 : Type u_6\nP3 : Type u_7\nV4 : Type u_8\nP4 : Type u_9\ninst✝¹⁵ : Ring k\ninst✝¹⁴ : AddCommGroup V1\ninst✝¹³ : Module k V1\ninst✝¹² : AffineSpace V1 P1\ninst✝¹¹ : AddCommGroup V2\ninst✝¹⁰ : Module k V2\ninst✝⁹ : AffineSpace V2 P2\ninst✝⁸ : AddCommGroup V3\ninst✝⁷ : Module k V3\ninst✝⁶ : AffineSpace V3 P3\ninst✝⁵ : AddCommGroup V4\ninst✝⁴ : Module k V4\ninst✝³ : AffineSpace V4 P4\nR : Type u_10\ninst✝² : Monoid R\ninst✝¹ : DistribMulAction R V2\ninst✝ : SMulCommClass k R V2\nc : R\nf : P1 →ᵃ[k] V2\np : P1\nv : V1\n⊢ (c • ↑f) (v +ᵥ p) = ↑(c • f.linear) v +ᵥ (c • ↑f) p\n[PROOFSTEP]\nsimp [smul_add, map_vadd f]\n[GOAL]\nk : Type u_1\nV1 : Type u_2\nP1 : Type u_3\nV2 : Type u_4\nP2 : Type u_5\nV3 : Type u_6\nP3 : Type u_7\nV4 : Type u_8\nP4 : Type u_9\ninst✝¹² : Ring k\ninst✝¹¹ : AddCommGroup V1\ninst✝¹⁰ : Module k V1\ninst✝⁹ : AffineSpace V1 P1\ninst✝⁸ : AddCommGroup V2\ninst✝⁷ : Module k V2\ninst✝⁶ : AffineSpace V2 P2\ninst✝⁵ : AddCommGroup V3\ninst✝⁴ : Module k V3\ninst✝³ : AffineSpace V3 P3\ninst✝² : AddCommGroup V4\ninst✝¹ : Module k V4\ninst✝ : AffineSpace V4 P4\nf g : P1 →ᵃ[k] V2\np : P1\nv : V1\n⊢ (↑f + ↑g) (v +ᵥ p) = ↑(f.linear + g.linear) v +ᵥ (↑f + ↑g) p\n[PROOFSTEP]\nsimp [add_add_add_comm, (map_vadd)]\n[GOAL]\nk : Type u_1\nV1 : Type u_2\nP1 : Type u_3\nV2 : Type u_4\nP2 : Type u_5\nV3 : Type u_6\nP3 : Type u_7\nV4 : Type u_8\nP4 : Type u_9\ninst✝¹² : Ring k\ninst✝¹¹ : AddCommGroup V1\ninst✝¹⁰ : Module k V1\ninst✝⁹ : AffineSpace V1 P1\ninst✝⁸ : AddCommGroup V2\ninst✝⁷ : Module k V2\ninst✝⁶ : AffineSpace V2 P2\ninst✝⁵ : AddCommGroup V3\ninst✝⁴ : Module k V3\ninst✝³ : AffineSpace V3 P3\ninst✝² : AddCommGroup V4\ninst✝¹ : Module k V4\ninst✝ : AffineSpace V4 P4\nf g : P1 →ᵃ[k] V2\np : P1\nv : V1\n⊢ (↑f - ↑g) (v +ᵥ p) = ↑(f.linear - g.linear) v +ᵥ (↑f - ↑g) p\n[PROOFSTEP]\nsimp [sub_add_sub_comm, (map_vadd)]\n[GOAL]\nk : Type u_1\nV1 : Type u_2\nP1 : Type u_3\nV2 : Type u_4\nP2 : Type u_5\nV3 : Type u_6\nP3 : Type u_7\nV4 : Type u_8\nP4 : Type u_9\ninst✝¹² : Ring k\ninst✝¹¹ : AddCommGroup V1\ninst✝¹⁰ : Module k V1\ninst✝⁹ : AffineSpace V1 P1\ninst✝⁸ : AddCommGroup V2\ninst✝⁷ : Module k V2\ninst✝⁶ : AffineSpace V2 P2\ninst✝⁵ : AddCommGroup V3\ninst✝⁴ : Module k V3\ninst✝³ : AffineSpace V3 P3\ninst✝² : AddCommGroup V4\ninst✝¹ : Module k V4\ninst✝ : AffineSpace V4 P4\nf : P1 →ᵃ[k] V2\np : P1\nv : V1\n⊢ (-↑f) (v +ᵥ p) = ↑(-f.linear) v +ᵥ (-↑f) p\n[PROOFSTEP]\nsimp [add_comm, map_vadd f]\n[GOAL]\nk : Type u_1\nV1 : Type u_2\nP1 : Type u_3\nV2 : Type u_4\nP2 : Type u_5\nV3 : Type u_6\nP3 : Type u_7\nV4 : Type u_8\nP4 : Type u_9\ninst✝¹² : Ring k\ninst✝¹¹ : AddCommGroup V1\ninst✝¹⁰ : Module k V1\ninst✝⁹ : AffineSpace V1 P1\ninst✝⁸ : AddCommGroup V2\ninst✝⁷ : Module k V2\ninst✝⁶ : AffineSpace V2 P2\ninst✝⁵ : AddCommGroup V3\ninst✝⁴ : Module k V3\ninst✝³ : AffineSpace V3 P3\ninst✝² : AddCommGroup V4\ninst✝¹ : Module k V4\ninst✝ : AffineSpace V4 P4\nf : P1 →ᵃ[k] V2\ng : P1 →ᵃ[k] P2\nthis : AddAction V2 P2 := inferInstance\np : P1\nv : V1\n⊢ (fun p => ↑f p +ᵥ ↑g p) (v +ᵥ p) = ↑(f.linear + g.linear) v +ᵥ (fun p => ↑f p +ᵥ ↑g p) p\n[PROOFSTEP]\nsimp [vadd_vadd, add_right_comm, (map_vadd)]\n[GOAL]\nk : Type u_1\nV1 : Type u_2\nP1 : Type u_3\nV2 : Type u_4\nP2 : Type u_5\nV3 : Type u_6\nP3 : Type u_7\nV4 : Type u_8\nP4 : Type u_9\ninst✝¹² : Ring k\ninst✝¹¹ : AddCommGroup V1\ninst✝¹⁰ : Module k V1\ninst✝⁹ : AffineSpace V1 P1\ninst✝⁸ : AddCommGroup V2\ninst✝⁷ : Module k V2\ninst✝⁶ : AffineSpace V2 P2\ninst✝⁵ : AddCommGroup V3\ninst✝⁴ : Module k V3\ninst✝³ : AffineSpace V3 P3\ninst✝² : AddCommGroup V4\ninst✝¹ : Module k V4\ninst✝ : AffineSpace V4 P4\nf g : P1 →ᵃ[k] P2\np : P1\nv : V1\n⊢ (fun p => ↑f p -ᵥ ↑g p) (v +ᵥ p) = ↑(f.linear - g.linear) v +ᵥ (fun p => ↑f p -ᵥ ↑g p) p\n[PROOFSTEP]\nsimp [(map_vadd), (vsub_vadd_eq_vsub_sub), (vadd_vsub_assoc), add_sub, sub_add_eq_add_sub]\n[GOAL]\nk : Type u_1\nV1 : Type u_2\nP1 : Type u_3\nV2 : Type u_4\nP2 : Type u_5\nV3 : Type u_6\nP3 : Type u_7\nV4 : Type u_8\nP4 : Type u_9\ninst✝¹² : Ring k\ninst✝¹¹ : AddCommGroup V1\ninst✝¹⁰ : Module k V1\ninst✝⁹ : AffineSpace V1 P1\ninst✝⁸ : AddCommGroup V2\ninst✝⁷ : Module k V2\ninst✝⁶ : AffineSpace V2 P2\ninst✝⁵ : AddCommGroup V3\ninst✝⁴ : Module k V3\ninst✝³ : AffineSpace V3 P3\ninst✝² : AddCommGroup V4\ninst✝¹ : Module k V4\ninst✝ : AffineSpace V4 P4\nf : P2 →ᵃ[k] P3\ng : P1 →ᵃ[k] P2\n⊢ ∀ (p : P1) (v : V1), (↑f ∘ ↑g) (v +ᵥ p) = ↑(LinearMap.comp f.linear g.linear) v +ᵥ (↑f ∘ ↑g) p\n[PROOFSTEP]\nintro p v\n[GOAL]\nk : Type u_1\nV1 : Type u_2\nP1 : Type u_3\nV2 : Type u_4\nP2 : Type u_5\nV3 : Type u_6\nP3 : Type u_7\nV4 : Type u_8\nP4 : Type u_9\ninst✝¹² : Ring k\ninst✝¹¹ : AddCommGroup V1\ninst✝¹⁰ : Module k V1\ninst✝⁹ : AffineSpace V1 P1\ninst✝⁸ : AddCommGroup V2\ninst✝⁷ : Module k V2\ninst✝⁶ : AffineSpace V2 P2\ninst✝⁵ : AddCommGroup V3\ninst✝⁴ : Module k V3\ninst✝³ : AffineSpace V3 P3\ninst✝² : AddCommGroup V4\ninst✝¹ : Module k V4\ninst✝ : AffineSpace V4 P4\nf : P2 →ᵃ[k] P3\ng : P1 →ᵃ[k] P2\np : P1\nv : V1\n⊢ (↑f ∘ ↑g) (v +ᵥ p) = ↑(LinearMap.comp f.linear g.linear) v +ᵥ (↑f ∘ ↑g) p\n[PROOFSTEP]\nrw [Function.comp_apply, g.map_vadd, f.map_vadd]\n[GOAL]\nk : Type u_1\nV1 : Type u_2\nP1 : Type u_3\nV2 : Type u_4\nP2 : Type u_5\nV3 : Type u_6\nP3 : Type u_7\nV4 : Type u_8\nP4 : Type u_9\ninst✝¹² : Ring k\ninst✝¹¹ : AddCommGroup V1\ninst✝¹⁰ : Module k V1\ninst✝⁹ : AffineSpace V1 P1\ninst✝⁸ : AddCommGroup V2\ninst✝⁷ : Module k V2\ninst✝⁶ : AffineSpace V2 P2\ninst✝⁵ : AddCommGroup V3\ninst✝⁴ : Module k V3\ninst✝³ : AffineSpace V3 P3\ninst✝² : AddCommGroup V4\ninst✝¹ : Module k V4\ninst✝ : AffineSpace V4 P4\nf : P2 →ᵃ[k] P3\ng : P1 →ᵃ[k] P2\np : P1\nv : V1\n⊢ ↑f.linear (↑g.linear v) +ᵥ ↑f (↑g p) = ↑(LinearMap.comp f.linear g.linear) v +ᵥ (↑f ∘ ↑g) p\n[PROOFSTEP]\nrfl\n[GOAL]\nk : Type u_1\nV1 : Type u_2\nP1 : Type u_3\nV2 : Type u_4\nP2 : Type u_5\nV3 : Type u_6\nP3 : Type u_7\nV4 : Type u_8\nP4 : Type u_9\ninst✝¹² : Ring k\ninst✝¹¹ : AddCommGroup V1\ninst✝¹⁰ : Module k V1\ninst✝⁹ : AffineSpace V1 P1\ninst✝⁸ : AddCommGroup V2\ninst✝⁷ : Module k V2\ninst✝⁶ : AffineSpace V2 P2\ninst✝⁵ : AddCommGroup V3\ninst✝⁴ : Module k V3\ninst✝³ : AffineSpace V3 P3\ninst✝² : AddCommGroup V4\ninst✝¹ : Module k V4\ninst✝ : AffineSpace V4 P4\nf : P1 →ᵃ[k] P2\n⊢ Function.Injective ↑f.linear ↔ Function.Injective ↑f\n[PROOFSTEP]\nobtain ⟨p⟩ := (inferInstance : Nonempty P1)\n[GOAL]\ncase intro\nk : Type u_1\nV1 : Type u_2\nP1 : Type u_3\nV2 : Type u_4\nP2 : Type u_5\nV3 : Type u_6\nP3 : Type u_7\nV4 : Type u_8\nP4 : Type u_9\ninst✝¹² : Ring k\ninst✝¹¹ : AddCommGroup V1\ninst✝¹⁰ : Module k V1\ninst✝⁹ : AffineSpace V1 P1\ninst✝⁸ : AddCommGroup V2\ninst✝⁷ : Module k V2\ninst✝⁶ : AffineSpace V2 P2\ninst✝⁵ : AddCommGroup V3\ninst✝⁴ : Module k V3\ninst✝³ : AffineSpace V3 P3\ninst✝² : AddCommGroup V4\ninst✝¹ : Module k V4\ninst✝ : AffineSpace V4 P4\nf : P1 →ᵃ[k] P2\np : P1\n⊢ Function.Injective ↑f.linear ↔ Function.Injective ↑f\n[PROOFSTEP]\nhave h : ⇑f.linear = (Equiv.vaddConst (f p)).symm ∘ f ∘ Equiv.vaddConst p :=\n  by\n  ext v\n  simp [f.map_vadd, vadd_vsub_assoc]\n[GOAL]\nk : Type u_1\nV1 : Type u_2\nP1 : Type u_3\nV2 : Type u_4\nP2 : Type u_5\nV3 : Type u_6\nP3 : Type u_7\nV4 : Type u_8\nP4 : Type u_9\ninst✝¹² : Ring k\ninst✝¹¹ : AddCommGroup V1\ninst✝¹⁰ : Module k V1\ninst✝⁹ : AffineSpace V1 P1\ninst✝⁸ : AddCommGroup V2\ninst✝⁷ : Module k V2\ninst✝⁶ : AffineSpace V2 P2\ninst✝⁵ : AddCommGroup V3\ninst✝⁴ : Module k V3\ninst✝³ : AffineSpace V3 P3\ninst✝² : AddCommGroup V4\ninst✝¹ : Module k V4\ninst✝ : AffineSpace V4 P4\nf : P1 →ᵃ[k] P2\np : P1\n⊢ ↑f.linear = ↑(Equiv.vaddConst (↑f p)).symm ∘ ↑f ∘ ↑(Equiv.vaddConst p)\n[PROOFSTEP]\next v\n[GOAL]\ncase h\nk : Type u_1\nV1 : Type u_2\nP1 : Type u_3\nV2 : Type u_4\nP2 : Type u_5\nV3 : Type u_6\nP3 : Type u_7\nV4 : Type u_8\nP4 : Type u_9\ninst✝¹² : Ring k\ninst✝¹¹ : AddCommGroup V1\ninst✝¹⁰ : Module k V1\ninst✝⁹ : AffineSpace V1 P1\ninst✝⁸ : AddCommGroup V2\ninst✝⁷ : Module k V2\ninst✝⁶ : AffineSpace V2 P2\ninst✝⁵ : AddCommGroup V3\ninst✝⁴ : Module k V3\ninst✝³ : AffineSpace V3 P3\ninst✝² : AddCommGroup V4\ninst✝¹ : Module k V4\ninst✝ : AffineSpace V4 P4\nf : P1 →ᵃ[k] P2\np : P1\nv : V1\n⊢ ↑f.linear v = (↑(Equiv.vaddConst (↑f p)).symm ∘ ↑f ∘ ↑(Equiv.vaddConst p)) v\n[PROOFSTEP]\nsimp [f.map_vadd, vadd_vsub_assoc]\n[GOAL]\ncase intro\nk : Type u_1\nV1 : Type u_2\nP1 : Type u_3\nV2 : Type u_4\nP2 : Type u_5\nV3 : Type u_6\nP3 : Type u_7\nV4 : Type u_8\nP4 : Type u_9\ninst✝¹² : Ring k\ninst✝¹¹ : AddCommGroup V1\ninst✝¹⁰ : Module k V1\ninst✝⁹ : AffineSpace V1 P1\ninst✝⁸ : AddCommGroup V2\ninst✝⁷ : Module k V2\ninst✝⁶ : AffineSpace V2 P2\ninst✝⁵ : AddCommGroup V3\ninst✝⁴ : Module k V3\ninst✝³ : AffineSpace V3 P3\ninst✝² : AddCommGroup V4\ninst✝¹ : Module k V4\ninst✝ : AffineSpace V4 P4\nf : P1 →ᵃ[k] P2\np : P1\nh : ↑f.linear = ↑(Equiv.vaddConst (↑f p)).symm ∘ ↑f ∘ ↑(Equiv.vaddConst p)\n⊢ Function.Injective ↑f.linear ↔ Function.Injective ↑f\n[PROOFSTEP]\nrw [h, Equiv.comp_injective, Equiv.injective_comp]\n[GOAL]\nk : Type u_1\nV1 : Type u_2\nP1 : Type u_3\nV2 : Type u_4\nP2 : Type u_5\nV3 : Type u_6\nP3 : Type u_7\nV4 : Type u_8\nP4 : Type u_9\ninst✝¹² : Ring k\ninst✝¹¹ : AddCommGroup V1\ninst✝¹⁰ : Module k V1\ninst✝⁹ : AffineSpace V1 P1\ninst✝⁸ : AddCommGroup V2\ninst✝⁷ : Module k V2\ninst✝⁶ : AffineSpace V2 P2\ninst✝⁵ : AddCommGroup V3\ninst✝⁴ : Module k V3\ninst✝³ : AffineSpace V3 P3\ninst✝² : AddCommGroup V4\ninst✝¹ : Module k V4\ninst✝ : AffineSpace V4 P4\nf : P1 →ᵃ[k] P2\n⊢ Function.Surjective ↑f.linear ↔ Function.Surjective ↑f\n[PROOFSTEP]\nobtain ⟨p⟩ := (inferInstance : Nonempty P1)\n[GOAL]\ncase intro\nk : Type u_1\nV1 : Type u_2\nP1 : Type u_3\nV2 : Type u_4\nP2 : Type u_5\nV3 : Type u_6\nP3 : Type u_7\nV4 : Type u_8\nP4 : Type u_9\ninst✝¹² : Ring k\ninst✝¹¹ : AddCommGroup V1\ninst✝¹⁰ : Module k V1\ninst✝⁹ : AffineSpace V1 P1\ninst✝⁸ : AddCommGroup V2\ninst✝⁷ : Module k V2\ninst✝⁶ : AffineSpace V2 P2\ninst✝⁵ : AddCommGroup V3\ninst✝⁴ : Module k V3\ninst✝³ : AffineSpace V3 P3\ninst✝² : AddCommGroup V4\ninst✝¹ : Module k V4\ninst✝ : AffineSpace V4 P4\nf : P1 →ᵃ[k] P2\np : P1\n⊢ Function.Surjective ↑f.linear ↔ Function.Surjective ↑f\n[PROOFSTEP]\nhave h : ⇑f.linear = (Equiv.vaddConst (f p)).symm ∘ f ∘ Equiv.vaddConst p :=\n  by\n  ext v\n  simp [f.map_vadd, vadd_vsub_assoc]\n[GOAL]\nk : Type u_1\nV1 : Type u_2\nP1 : Type u_3\nV2 : Type u_4\nP2 : Type u_5\nV3 : Type u_6\nP3 : Type u_7\nV4 : Type u_8\nP4 : Type u_9\ninst✝¹² : Ring k\ninst✝¹¹ : AddCommGroup V1\ninst✝¹⁰ : Module k V1\ninst✝⁹ : AffineSpace V1 P1\ninst✝⁸ : AddCommGroup V2\ninst✝⁷ : Module k V2\ninst✝⁶ : AffineSpace V2 P2\ninst✝⁵ : AddCommGroup V3\ninst✝⁴ : Module k V3\ninst✝³ : AffineSpace V3 P3\ninst✝² : AddCommGroup V4\ninst✝¹ : Module k V4\ninst✝ : AffineSpace V4 P4\nf : P1 →ᵃ[k] P2\np : P1\n⊢ ↑f.linear = ↑(Equiv.vaddConst (↑f p)).symm ∘ ↑f ∘ ↑(Equiv.vaddConst p)\n[PROOFSTEP]\next v\n[GOAL]\ncase h\nk : Type u_1\nV1 : Type u_2\nP1 : Type u_3\nV2 : Type u_4\nP2 : Type u_5\nV3 : Type u_6\nP3 : Type u_7\nV4 : Type u_8\nP4 : Type u_9\ninst✝¹² : Ring k\ninst✝¹¹ : AddCommGroup V1\ninst✝¹⁰ : Module k V1\ninst✝⁹ : AffineSpace V1 P1\ninst✝⁸ : AddCommGroup V2\ninst✝⁷ : Module k V2\ninst✝⁶ : AffineSpace V2 P2\ninst✝⁵ : AddCommGroup V3\ninst✝⁴ : Module k V3\ninst✝³ : AffineSpace V3 P3\ninst✝² : AddCommGroup V4\ninst✝¹ : Module k V4\ninst✝ : AffineSpace V4 P4\nf : P1 →ᵃ[k] P2\np : P1\nv : V1\n⊢ ↑f.linear v = (↑(Equiv.vaddConst (↑f p)).symm ∘ ↑f ∘ ↑(Equiv.vaddConst p)) v\n[PROOFSTEP]\nsimp [f.map_vadd, vadd_vsub_assoc]\n[GOAL]\ncase intro\nk : Type u_1\nV1 : Type u_2\nP1 : Type u_3\nV2 : Type u_4\nP2 : Type u_5\nV3 : Type u_6\nP3 : Type u_7\nV4 : Type u_8\nP4 : Type u_9\ninst✝¹² : Ring k\ninst✝¹¹ : AddCommGroup V1\ninst✝¹⁰ : Module k V1\ninst✝⁹ : AffineSpace V1 P1\ninst✝⁸ : AddCommGroup V2\ninst✝⁷ : Module k V2\ninst✝⁶ : AffineSpace V2 P2\ninst✝⁵ : AddCommGroup V3\ninst✝⁴ : Module k V3\ninst✝³ : AffineSpace V3 P3\ninst✝² : AddCommGroup V4\ninst✝¹ : Module k V4\ninst✝ : AffineSpace V4 P4\nf : P1 →ᵃ[k] P2\np : P1\nh : ↑f.linear = ↑(Equiv.vaddConst (↑f p)).symm ∘ ↑f ∘ ↑(Equiv.vaddConst p)\n⊢ Function.Surjective ↑f.linear ↔ Function.Surjective ↑f\n[PROOFSTEP]\nrw [h, Equiv.comp_surjective, Equiv.surjective_comp]\n[GOAL]\nk : Type u_1\nV1 : Type u_2\nP1 : Type u_3\nV2 : Type u_4\nP2 : Type u_5\nV3 : Type u_6\nP3 : Type u_7\nV4 : Type u_8\nP4 : Type u_9\ninst✝¹² : Ring k\ninst✝¹¹ : AddCommGroup V1\ninst✝¹⁰ : Module k V1\ninst✝⁹ : AffineSpace V1 P1\ninst✝⁸ : AddCommGroup V2\ninst✝⁷ : Module k V2\ninst✝⁶ : AffineSpace V2 P2\ninst✝⁵ : AddCommGroup V3\ninst✝⁴ : Module k V3\ninst✝³ : AffineSpace V3 P3\ninst✝² : AddCommGroup V4\ninst✝¹ : Module k V4\ninst✝ : AffineSpace V4 P4\ns t : Set P1\nf : P1 →ᵃ[k] P2\n⊢ ↑f '' s -ᵥ ↑f '' t = ↑f.linear '' (s -ᵥ t)\n[PROOFSTEP]\next v\n[GOAL]\ncase h\nk : Type u_1\nV1 : Type u_2\nP1 : Type u_3\nV2 : Type u_4\nP2 : Type u_5\nV3 : Type u_6\nP3 : Type u_7\nV4 : Type u_8\nP4 : Type u_9\ninst✝¹² : Ring k\ninst✝¹¹ : AddCommGroup V1\ninst✝¹⁰ : Module k V1\ninst✝⁹ : AffineSpace V1 P1\ninst✝⁸ : AddCommGroup V2\ninst✝⁷ : Module k V2\ninst✝⁶ : AffineSpace V2 P2\ninst✝⁵ : AddCommGroup V3\ninst✝⁴ : Module k V3\ninst✝³ : AffineSpace V3 P3\ninst✝² : AddCommGroup V4\ninst✝¹ : Module k V4\ninst✝ : AffineSpace V4 P4\ns t : Set P1\nf : P1 →ᵃ[k] P2\nv : V2\n⊢ v ∈ ↑f '' s -ᵥ ↑f '' t ↔ v ∈ ↑f.linear '' (s -ᵥ t)\n[PROOFSTEP]\nsimp only [(Set.mem_vsub), Set.mem_image, exists_exists_and_eq_and, exists_and_left, ← f.linearMap_vsub]\n[GOAL]\ncase h\nk : Type u_1\nV1 : Type u_2\nP1 : Type u_3\nV2 : Type u_4\nP2 : Type u_5\nV3 : Type u_6\nP3 : Type u_7\nV4 : Type u_8\nP4 : Type u_9\ninst✝¹² : Ring k\ninst✝¹¹ : AddCommGroup V1\ninst✝¹⁰ : Module k V1\ninst✝⁹ : AffineSpace V1 P1\ninst✝⁸ : AddCommGroup V2\ninst✝⁷ : Module k V2\ninst✝⁶ : AffineSpace V2 P2\ninst✝⁵ : AddCommGroup V3\ninst✝⁴ : Module k V3\ninst✝³ : AffineSpace V3 P3\ninst✝² : AddCommGroup V4\ninst✝¹ : Module k V4\ninst✝ : AffineSpace V4 P4\ns t : Set P1\nf : P1 →ᵃ[k] P2\nv : V2\n⊢ (∃ a, a ∈ s ∧ ∃ a_1, a_1 ∈ t ∧ ↑f.linear (a -ᵥ a_1) = v) ↔\n    ∃ x, (∃ x_1, x_1 ∈ s ∧ ∃ x_2, x_2 ∈ t ∧ x_1 -ᵥ x_2 = x) ∧ ↑f.linear x = v\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nk : Type u_1\nV1 : Type u_2\nP1 : Type u_3\nV2 : Type u_4\nP2 : Type u_5\nV3 : Type u_6\nP3 : Type u_7\nV4 : Type u_8\nP4 : Type u_9\ninst✝¹² : Ring k\ninst✝¹¹ : AddCommGroup V1\ninst✝¹⁰ : Module k V1\ninst✝⁹ : AffineSpace V1 P1\ninst✝⁸ : AddCommGroup V2\ninst✝⁷ : Module k V2\ninst✝⁶ : AffineSpace V2 P2\ninst✝⁵ : AddCommGroup V3\ninst✝⁴ : Module k V3\ninst✝³ : AffineSpace V3 P3\ninst✝² : AddCommGroup V4\ninst✝¹ : Module k V4\ninst✝ : AffineSpace V4 P4\ns t : Set P1\nf : P1 →ᵃ[k] P2\nv : V2\n⊢ (∃ a, a ∈ s ∧ ∃ a_1, a_1 ∈ t ∧ ↑f.linear (a -ᵥ a_1) = v) →\n    ∃ x, (∃ x_1, x_1 ∈ s ∧ ∃ x_2, x_2 ∈ t ∧ x_1 -ᵥ x_2 = x) ∧ ↑f.linear x = v\n[PROOFSTEP]\nrintro ⟨x, hx, y, hy, hv⟩\n[GOAL]\ncase h.mp.intro.intro.intro.intro\nk : Type u_1\nV1 : Type u_2\nP1 : Type u_3\nV2 : Type u_4\nP2 : Type u_5\nV3 : Type u_6\nP3 : Type u_7\nV4 : Type u_8\nP4 : Type u_9\ninst✝¹² : Ring k\ninst✝¹¹ : AddCommGroup V1\ninst✝¹⁰ : Module k V1\ninst✝⁹ : AffineSpace V1 P1\ninst✝⁸ : AddCommGroup V2\ninst✝⁷ : Module k V2\ninst✝⁶ : AffineSpace V2 P2\ninst✝⁵ : AddCommGroup V3\ninst✝⁴ : Module k V3\ninst✝³ : AffineSpace V3 P3\ninst✝² : AddCommGroup V4\ninst✝¹ : Module k V4\ninst✝ : AffineSpace V4 P4\ns t : Set P1\nf : P1 →ᵃ[k] P2\nv : V2\nx : P1\nhx : x ∈ s\ny : P1\nhy : y ∈ t\nhv : ↑f.linear (x -ᵥ y) = v\n⊢ ∃ x, (∃ x_1, x_1 ∈ s ∧ ∃ x_2, x_2 ∈ t ∧ x_1 -ᵥ x_2 = x) ∧ ↑f.linear x = v\n[PROOFSTEP]\nexact ⟨x -ᵥ y, ⟨x, hx, y, hy, rfl⟩, hv⟩\n[GOAL]\ncase h.mpr\nk : Type u_1\nV1 : Type u_2\nP1 : Type u_3\nV2 : Type u_4\nP2 : Type u_5\nV3 : Type u_6\nP3 : Type u_7\nV4 : Type u_8\nP4 : Type u_9\ninst✝¹² : Ring k\ninst✝¹¹ : AddCommGroup V1\ninst✝¹⁰ : Module k V1\ninst✝⁹ : AffineSpace V1 P1\ninst✝⁸ : AddCommGroup V2\ninst✝⁷ : Module k V2\ninst✝⁶ : AffineSpace V2 P2\ninst✝⁵ : AddCommGroup V3\ninst✝⁴ : Module k V3\ninst✝³ : AffineSpace V3 P3\ninst✝² : AddCommGroup V4\ninst✝¹ : Module k V4\ninst✝ : AffineSpace V4 P4\ns t : Set P1\nf : P1 →ᵃ[k] P2\nv : V2\n⊢ (∃ x, (∃ x_1, x_1 ∈ s ∧ ∃ x_2, x_2 ∈ t ∧ x_1 -ᵥ x_2 = x) ∧ ↑f.linear x = v) →\n    ∃ a, a ∈ s ∧ ∃ a_1, a_1 ∈ t ∧ ↑f.linear (a -ᵥ a_1) = v\n[PROOFSTEP]\nrintro ⟨-, ⟨x, hx, y, hy, rfl⟩, rfl⟩\n[GOAL]\ncase h.mpr.intro.intro.intro.intro.intro.intro\nk : Type u_1\nV1 : Type u_2\nP1 : Type u_3\nV2 : Type u_4\nP2 : Type u_5\nV3 : Type u_6\nP3 : Type u_7\nV4 : Type u_8\nP4 : Type u_9\ninst✝¹² : Ring k\ninst✝¹¹ : AddCommGroup V1\ninst✝¹⁰ : Module k V1\ninst✝⁹ : AffineSpace V1 P1\ninst✝⁸ : AddCommGroup V2\ninst✝⁷ : Module k V2\ninst✝⁶ : AffineSpace V2 P2\ninst✝⁵ : AddCommGroup V3\ninst✝⁴ : Module k V3\ninst✝³ : AffineSpace V3 P3\ninst✝² : AddCommGroup V4\ninst✝¹ : Module k V4\ninst✝ : AffineSpace V4 P4\ns t : Set P1\nf : P1 →ᵃ[k] P2\nx : P1\nhx : x ∈ s\ny : P1\nhy : y ∈ t\n⊢ ∃ a, a ∈ s ∧ ∃ a_1, a_1 ∈ t ∧ ↑f.linear (a -ᵥ a_1) = ↑f.linear (x -ᵥ y)\n[PROOFSTEP]\nexact ⟨x, hx, y, hy, rfl⟩\n[GOAL]\nk : Type u_1\nV1 : Type u_2\nP1 : Type u_3\nV2 : Type u_4\nP2 : Type u_5\nV3 : Type u_6\nP3 : Type u_7\nV4 : Type u_8\nP4 : Type u_9\ninst✝¹² : Ring k\ninst✝¹¹ : AddCommGroup V1\ninst✝¹⁰ : Module k V1\ninst✝⁹ : AffineSpace V1 P1\ninst✝⁸ : AddCommGroup V2\ninst✝⁷ : Module k V2\ninst✝⁶ : AffineSpace V2 P2\ninst✝⁵ : AddCommGroup V3\ninst✝⁴ : Module k V3\ninst✝³ : AffineSpace V3 P3\ninst✝² : AddCommGroup V4\ninst✝¹ : Module k V4\ninst✝ : AffineSpace V4 P4\np₀ p₁ : V1\nc : k\n⊢ ↑(lineMap p₀ p₁) c = (1 - c) • p₀ + c • p₁\n[PROOFSTEP]\nsimp [lineMap_apply_module', smul_sub, sub_smul]\n[GOAL]\nk : Type u_1\nV1 : Type u_2\nP1 : Type u_3\nV2 : Type u_4\nP2 : Type u_5\nV3 : Type u_6\nP3 : Type u_7\nV4 : Type u_8\nP4 : Type u_9\ninst✝¹² : Ring k\ninst✝¹¹ : AddCommGroup V1\ninst✝¹⁰ : Module k V1\ninst✝⁹ : AffineSpace V1 P1\ninst✝⁸ : AddCommGroup V2\ninst✝⁷ : Module k V2\ninst✝⁶ : AffineSpace V2 P2\ninst✝⁵ : AddCommGroup V3\ninst✝⁴ : Module k V3\ninst✝³ : AffineSpace V3 P3\ninst✝² : AddCommGroup V4\ninst✝¹ : Module k V4\ninst✝ : AffineSpace V4 P4\np₀ p₁ : V1\nc : k\n⊢ c • p₁ - c • p₀ + p₀ = p₀ - c • p₀ + c • p₁\n[PROOFSTEP]\nabel\n[GOAL]\nk : Type u_1\nV1 : Type u_2\nP1 : Type u_3\nV2 : Type u_4\nP2 : Type u_5\nV3 : Type u_6\nP3 : Type u_7\nV4 : Type u_8\nP4 : Type u_9\ninst✝¹² : Ring k\ninst✝¹¹ : AddCommGroup V1\ninst✝¹⁰ : Module k V1\ninst✝⁹ : AffineSpace V1 P1\ninst✝⁸ : AddCommGroup V2\ninst✝⁷ : Module k V2\ninst✝⁶ : AffineSpace V2 P2\ninst✝⁵ : AddCommGroup V3\ninst✝⁴ : Module k V3\ninst✝³ : AffineSpace V3 P3\ninst✝² : AddCommGroup V4\ninst✝¹ : Module k V4\ninst✝ : AffineSpace V4 P4\np₀ p₁ : V1\nc : k\n⊢ c • p₁ - c • p₀ + p₀ = p₀ - c • p₀ + c • p₁\n[PROOFSTEP]\nabel\n[GOAL]\nk : Type u_1\nV1 : Type u_2\nP1 : Type u_3\nV2 : Type u_4\nP2 : Type u_5\nV3 : Type u_6\nP3 : Type u_7\nV4 : Type u_8\nP4 : Type u_9\ninst✝¹² : Ring k\ninst✝¹¹ : AddCommGroup V1\ninst✝¹⁰ : Module k V1\ninst✝⁹ : AffineSpace V1 P1\ninst✝⁸ : AddCommGroup V2\ninst✝⁷ : Module k V2\ninst✝⁶ : AffineSpace V2 P2\ninst✝⁵ : AddCommGroup V3\ninst✝⁴ : Module k V3\ninst✝³ : AffineSpace V3 P3\ninst✝² : AddCommGroup V4\ninst✝¹ : Module k V4\ninst✝ : AffineSpace V4 P4\np : P1\nv : V1\nc : k\n⊢ ↑(lineMap p (v +ᵥ p)) c = c • v +ᵥ p\n[PROOFSTEP]\nrw [lineMap_apply, vadd_vsub]\n[GOAL]\nk : Type u_1\nV1 : Type u_2\nP1 : Type u_3\nV2 : Type u_4\nP2 : Type u_5\nV3 : Type u_6\nP3 : Type u_7\nV4 : Type u_8\nP4 : Type u_9\ninst✝¹² : Ring k\ninst✝¹¹ : AddCommGroup V1\ninst✝¹⁰ : Module k V1\ninst✝⁹ : AffineSpace V1 P1\ninst✝⁸ : AddCommGroup V2\ninst✝⁷ : Module k V2\ninst✝⁶ : AffineSpace V2 P2\ninst✝⁵ : AddCommGroup V3\ninst✝⁴ : Module k V3\ninst✝³ : AffineSpace V3 P3\ninst✝² : AddCommGroup V4\ninst✝¹ : Module k V4\ninst✝ : AffineSpace V4 P4\np : P1\nc : k\n⊢ ↑(lineMap p p) c = p\n[PROOFSTEP]\nletI : AddAction V1 P1 := inferInstance\n[GOAL]\nk : Type u_1\nV1 : Type u_2\nP1 : Type u_3\nV2 : Type u_4\nP2 : Type u_5\nV3 : Type u_6\nP3 : Type u_7\nV4 : Type u_8\nP4 : Type u_9\ninst✝¹² : Ring k\ninst✝¹¹ : AddCommGroup V1\ninst✝¹⁰ : Module k V1\ninst✝⁹ : AffineSpace V1 P1\ninst✝⁸ : AddCommGroup V2\ninst✝⁷ : Module k V2\ninst✝⁶ : AffineSpace V2 P2\ninst✝⁵ : AddCommGroup V3\ninst✝⁴ : Module k V3\ninst✝³ : AffineSpace V3 P3\ninst✝² : AddCommGroup V4\ninst✝¹ : Module k V4\ninst✝ : AffineSpace V4 P4\np : P1\nc : k\nthis : AddAction V1 P1 := inferInstance\n⊢ ↑(lineMap p p) c = p\n[PROOFSTEP]\nsimp [(lineMap_apply), (vsub_self)]\n[GOAL]\nk : Type u_1\nV1 : Type u_2\nP1 : Type u_3\nV2 : Type u_4\nP2 : Type u_5\nV3 : Type u_6\nP3 : Type u_7\nV4 : Type u_8\nP4 : Type u_9\ninst✝¹² : Ring k\ninst✝¹¹ : AddCommGroup V1\ninst✝¹⁰ : Module k V1\ninst✝⁹ : AffineSpace V1 P1\ninst✝⁸ : AddCommGroup V2\ninst✝⁷ : Module k V2\ninst✝⁶ : AffineSpace V2 P2\ninst✝⁵ : AddCommGroup V3\ninst✝⁴ : Module k V3\ninst✝³ : AffineSpace V3 P3\ninst✝² : AddCommGroup V4\ninst✝¹ : Module k V4\ninst✝ : AffineSpace V4 P4\np₀ p₁ : P1\n⊢ ↑(lineMap p₀ p₁) 0 = p₀\n[PROOFSTEP]\nletI : AddAction V1 P1 := inferInstance\n[GOAL]\nk : Type u_1\nV1 : Type u_2\nP1 : Type u_3\nV2 : Type u_4\nP2 : Type u_5\nV3 : Type u_6\nP3 : Type u_7\nV4 : Type u_8\nP4 : Type u_9\ninst✝¹² : Ring k\ninst✝¹¹ : AddCommGroup V1\ninst✝¹⁰ : Module k V1\ninst✝⁹ : AffineSpace V1 P1\ninst✝⁸ : AddCommGroup V2\ninst✝⁷ : Module k V2\ninst✝⁶ : AffineSpace V2 P2\ninst✝⁵ : AddCommGroup V3\ninst✝⁴ : Module k V3\ninst✝³ : AffineSpace V3 P3\ninst✝² : AddCommGroup V4\ninst✝¹ : Module k V4\ninst✝ : AffineSpace V4 P4\np₀ p₁ : P1\nthis : AddAction V1 P1 := inferInstance\n⊢ ↑(lineMap p₀ p₁) 0 = p₀\n[PROOFSTEP]\nsimp [(lineMap_apply)]\n[GOAL]\nk : Type u_1\nV1 : Type u_2\nP1 : Type u_3\nV2 : Type u_4\nP2 : Type u_5\nV3 : Type u_6\nP3 : Type u_7\nV4 : Type u_8\nP4 : Type u_9\ninst✝¹² : Ring k\ninst✝¹¹ : AddCommGroup V1\ninst✝¹⁰ : Module k V1\ninst✝⁹ : AffineSpace V1 P1\ninst✝⁸ : AddCommGroup V2\ninst✝⁷ : Module k V2\ninst✝⁶ : AffineSpace V2 P2\ninst✝⁵ : AddCommGroup V3\ninst✝⁴ : Module k V3\ninst✝³ : AffineSpace V3 P3\ninst✝² : AddCommGroup V4\ninst✝¹ : Module k V4\ninst✝ : AffineSpace V4 P4\np₀ p₁ : P1\n⊢ ↑(lineMap p₀ p₁) 1 = p₁\n[PROOFSTEP]\nsimp [(lineMap_apply), (vsub_vadd)]\n[GOAL]\nk : Type u_1\nV1 : Type u_2\nP1 : Type u_3\nV2 : Type u_4\nP2 : Type u_5\nV3 : Type u_6\nP3 : Type u_7\nV4 : Type u_8\nP4 : Type u_9\ninst✝¹³ : Ring k\ninst✝¹² : AddCommGroup V1\ninst✝¹¹ : Module k V1\ninst✝¹⁰ : AffineSpace V1 P1\ninst✝⁹ : AddCommGroup V2\ninst✝⁸ : Module k V2\ninst✝⁷ : AffineSpace V2 P2\ninst✝⁶ : AddCommGroup V3\ninst✝⁵ : Module k V3\ninst✝⁴ : AffineSpace V3 P3\ninst✝³ : AddCommGroup V4\ninst✝² : Module k V4\ninst✝¹ : AffineSpace V4 P4\ninst✝ : NoZeroSMulDivisors k V1\np₀ p₁ : P1\nc₁ c₂ : k\n⊢ ↑(lineMap p₀ p₁) c₁ = ↑(lineMap p₀ p₁) c₂ ↔ p₀ = p₁ ∨ c₁ = c₂\n[PROOFSTEP]\nrw [lineMap_apply, lineMap_apply, ← @vsub_eq_zero_iff_eq V1, vadd_vsub_vadd_cancel_right, ← sub_smul, smul_eq_zero,\n  sub_eq_zero, vsub_eq_zero_iff_eq, or_comm, eq_comm]\n[GOAL]\nk : Type u_1\nV1 : Type u_2\nP1 : Type u_3\nV2 : Type u_4\nP2 : Type u_5\nV3 : Type u_6\nP3 : Type u_7\nV4 : Type u_8\nP4 : Type u_9\ninst✝¹³ : Ring k\ninst✝¹² : AddCommGroup V1\ninst✝¹¹ : Module k V1\ninst✝¹⁰ : AffineSpace V1 P1\ninst✝⁹ : AddCommGroup V2\ninst✝⁸ : Module k V2\ninst✝⁷ : AffineSpace V2 P2\ninst✝⁶ : AddCommGroup V3\ninst✝⁵ : Module k V3\ninst✝⁴ : AffineSpace V3 P3\ninst✝³ : AddCommGroup V4\ninst✝² : Module k V4\ninst✝¹ : AffineSpace V4 P4\ninst✝ : NoZeroSMulDivisors k V1\np₀ p₁ : P1\nc : k\n⊢ ↑(lineMap p₀ p₁) c = p₀ ↔ p₀ = p₁ ∨ c = 0\n[PROOFSTEP]\nrw [← @lineMap_eq_lineMap_iff k V1, lineMap_apply_zero]\n[GOAL]\nk : Type u_1\nV1 : Type u_2\nP1 : Type u_3\nV2 : Type u_4\nP2 : Type u_5\nV3 : Type u_6\nP3 : Type u_7\nV4 : Type u_8\nP4 : Type u_9\ninst✝¹³ : Ring k\ninst✝¹² : AddCommGroup V1\ninst✝¹¹ : Module k V1\ninst✝¹⁰ : AffineSpace V1 P1\ninst✝⁹ : AddCommGroup V2\ninst✝⁸ : Module k V2\ninst✝⁷ : AffineSpace V2 P2\ninst✝⁶ : AddCommGroup V3\ninst✝⁵ : Module k V3\ninst✝⁴ : AffineSpace V3 P3\ninst✝³ : AddCommGroup V4\ninst✝² : Module k V4\ninst✝¹ : AffineSpace V4 P4\ninst✝ : NoZeroSMulDivisors k V1\np₀ p₁ : P1\nc : k\n⊢ ↑(lineMap p₀ p₁) c = p₁ ↔ p₀ = p₁ ∨ c = 1\n[PROOFSTEP]\nrw [← @lineMap_eq_lineMap_iff k V1, lineMap_apply_one]\n[GOAL]\nk : Type u_1\nV1 : Type u_2\nP1 : Type u_3\nV2 : Type u_4\nP2 : Type u_5\nV3 : Type u_6\nP3 : Type u_7\nV4 : Type u_8\nP4 : Type u_9\ninst✝¹² : Ring k\ninst✝¹¹ : AddCommGroup V1\ninst✝¹⁰ : Module k V1\ninst✝⁹ : AffineSpace V1 P1\ninst✝⁸ : AddCommGroup V2\ninst✝⁷ : Module k V2\ninst✝⁶ : AffineSpace V2 P2\ninst✝⁵ : AddCommGroup V3\ninst✝⁴ : Module k V3\ninst✝³ : AffineSpace V3 P3\ninst✝² : AddCommGroup V4\ninst✝¹ : Module k V4\ninst✝ : AffineSpace V4 P4\nf : P1 →ᵃ[k] P2\np₀ p₁ : P1\nc : k\n⊢ ↑f (↑(lineMap p₀ p₁) c) = ↑(lineMap (↑f p₀) (↑f p₁)) c\n[PROOFSTEP]\nsimp [(lineMap_apply), (map_vadd), (linearMap_vsub)]\n[GOAL]\nk : Type u_1\nV1 : Type u_2\nP1 : Type u_3\nV2 : Type u_4\nP2 : Type u_5\nV3 : Type u_6\nP3 : Type u_7\nV4 : Type u_8\nP4 : Type u_9\ninst✝¹² : Ring k\ninst✝¹¹ : AddCommGroup V1\ninst✝¹⁰ : Module k V1\ninst✝⁹ : AffineSpace V1 P1\ninst✝⁸ : AddCommGroup V2\ninst✝⁷ : Module k V2\ninst✝⁶ : AffineSpace V2 P2\ninst✝⁵ : AddCommGroup V3\ninst✝⁴ : Module k V3\ninst✝³ : AffineSpace V3 P3\ninst✝² : AddCommGroup V4\ninst✝¹ : Module k V4\ninst✝ : AffineSpace V4 P4\np₀ p₁ : P1\n⊢ lineMap p₀ p₁ = comp (lineMap p₁ p₀) (lineMap 1 0)\n[PROOFSTEP]\nrw [comp_lineMap]\n[GOAL]\nk : Type u_1\nV1 : Type u_2\nP1 : Type u_3\nV2 : Type u_4\nP2 : Type u_5\nV3 : Type u_6\nP3 : Type u_7\nV4 : Type u_8\nP4 : Type u_9\ninst✝¹² : Ring k\ninst✝¹¹ : AddCommGroup V1\ninst✝¹⁰ : Module k V1\ninst✝⁹ : AffineSpace V1 P1\ninst✝⁸ : AddCommGroup V2\ninst✝⁷ : Module k V2\ninst✝⁶ : AffineSpace V2 P2\ninst✝⁵ : AddCommGroup V3\ninst✝⁴ : Module k V3\ninst✝³ : AffineSpace V3 P3\ninst✝² : AddCommGroup V4\ninst✝¹ : Module k V4\ninst✝ : AffineSpace V4 P4\np₀ p₁ : P1\n⊢ lineMap p₀ p₁ = lineMap (↑(lineMap p₁ p₀) 1) (↑(lineMap p₁ p₀) 0)\n[PROOFSTEP]\nsimp\n[GOAL]\nk : Type u_1\nV1 : Type u_2\nP1 : Type u_3\nV2 : Type u_4\nP2 : Type u_5\nV3 : Type u_6\nP3 : Type u_7\nV4 : Type u_8\nP4 : Type u_9\ninst✝¹² : Ring k\ninst✝¹¹ : AddCommGroup V1\ninst✝¹⁰ : Module k V1\ninst✝⁹ : AffineSpace V1 P1\ninst✝⁸ : AddCommGroup V2\ninst✝⁷ : Module k V2\ninst✝⁶ : AffineSpace V2 P2\ninst✝⁵ : AddCommGroup V3\ninst✝⁴ : Module k V3\ninst✝³ : AffineSpace V3 P3\ninst✝² : AddCommGroup V4\ninst✝¹ : Module k V4\ninst✝ : AffineSpace V4 P4\np₀ p₁ : P1\nc : k\n⊢ ↑(lineMap p₀ p₁) (1 - c) = ↑(lineMap p₁ p₀) c\n[PROOFSTEP]\nrw [lineMap_symm p₀, comp_apply]\n[GOAL]\nk : Type u_1\nV1 : Type u_2\nP1 : Type u_3\nV2 : Type u_4\nP2 : Type u_5\nV3 : Type u_6\nP3 : Type u_7\nV4 : Type u_8\nP4 : Type u_9\ninst✝¹² : Ring k\ninst✝¹¹ : AddCommGroup V1\ninst✝¹⁰ : Module k V1\ninst✝⁹ : AffineSpace V1 P1\ninst✝⁸ : AddCommGroup V2\ninst✝⁷ : Module k V2\ninst✝⁶ : AffineSpace V2 P2\ninst✝⁵ : AddCommGroup V3\ninst✝⁴ : Module k V3\ninst✝³ : AffineSpace V3 P3\ninst✝² : AddCommGroup V4\ninst✝¹ : Module k V4\ninst✝ : AffineSpace V4 P4\np₀ p₁ : P1\nc : k\n⊢ ↑(lineMap p₁ p₀) (↑(lineMap 1 0) (1 - c)) = ↑(lineMap p₁ p₀) c\n[PROOFSTEP]\ncongr\n[GOAL]\ncase h.e_6.h\nk : Type u_1\nV1 : Type u_2\nP1 : Type u_3\nV2 : Type u_4\nP2 : Type u_5\nV3 : Type u_6\nP3 : Type u_7\nV4 : Type u_8\nP4 : Type u_9\ninst✝¹² : Ring k\ninst✝¹¹ : AddCommGroup V1\ninst✝¹⁰ : Module k V1\ninst✝⁹ : AffineSpace V1 P1\ninst✝⁸ : AddCommGroup V2\ninst✝⁷ : Module k V2\ninst✝⁶ : AffineSpace V2 P2\ninst✝⁵ : AddCommGroup V3\ninst✝⁴ : Module k V3\ninst✝³ : AffineSpace V3 P3\ninst✝² : AddCommGroup V4\ninst✝¹ : Module k V4\ninst✝ : AffineSpace V4 P4\np₀ p₁ : P1\nc : k\n⊢ ↑(lineMap 1 0) (1 - c) = c\n[PROOFSTEP]\nsimp [lineMap_apply]\n[GOAL]\nk : Type u_1\nV1 : Type u_2\nP1 : Type u_3\nV2 : Type u_4\nP2 : Type u_5\nV3 : Type u_6\nP3 : Type u_7\nV4 : Type u_8\nP4 : Type u_9\ninst✝¹² : Ring k\ninst✝¹¹ : AddCommGroup V1\ninst✝¹⁰ : Module k V1\ninst✝⁹ : AffineSpace V1 P1\ninst✝⁸ : AddCommGroup V2\ninst✝⁷ : Module k V2\ninst✝⁶ : AffineSpace V2 P2\ninst✝⁵ : AddCommGroup V3\ninst✝⁴ : Module k V3\ninst✝³ : AffineSpace V3 P3\ninst✝² : AddCommGroup V4\ninst✝¹ : Module k V4\ninst✝ : AffineSpace V4 P4\np₀ p₁ : P1\nc : k\n⊢ p₀ -ᵥ ↑(lineMap p₀ p₁) c = c • (p₀ -ᵥ p₁)\n[PROOFSTEP]\nrw [← neg_vsub_eq_vsub_rev, lineMap_vsub_left, ← smul_neg, neg_vsub_eq_vsub_rev]\n[GOAL]\nk : Type u_1\nV1 : Type u_2\nP1 : Type u_3\nV2 : Type u_4\nP2 : Type u_5\nV3 : Type u_6\nP3 : Type u_7\nV4 : Type u_8\nP4 : Type u_9\ninst✝¹² : Ring k\ninst✝¹¹ : AddCommGroup V1\ninst✝¹⁰ : Module k V1\ninst✝⁹ : AffineSpace V1 P1\ninst✝⁸ : AddCommGroup V2\ninst✝⁷ : Module k V2\ninst✝⁶ : AffineSpace V2 P2\ninst✝⁵ : AddCommGroup V3\ninst✝⁴ : Module k V3\ninst✝³ : AffineSpace V3 P3\ninst✝² : AddCommGroup V4\ninst✝¹ : Module k V4\ninst✝ : AffineSpace V4 P4\np₀ p₁ : P1\nc : k\n⊢ ↑(lineMap p₀ p₁) c -ᵥ p₁ = (1 - c) • (p₀ -ᵥ p₁)\n[PROOFSTEP]\nrw [← lineMap_apply_one_sub, lineMap_vsub_left]\n[GOAL]\nk : Type u_1\nV1 : Type u_2\nP1 : Type u_3\nV2 : Type u_4\nP2 : Type u_5\nV3 : Type u_6\nP3 : Type u_7\nV4 : Type u_8\nP4 : Type u_9\ninst✝¹² : Ring k\ninst✝¹¹ : AddCommGroup V1\ninst✝¹⁰ : Module k V1\ninst✝⁹ : AffineSpace V1 P1\ninst✝⁸ : AddCommGroup V2\ninst✝⁷ : Module k V2\ninst✝⁶ : AffineSpace V2 P2\ninst✝⁵ : AddCommGroup V3\ninst✝⁴ : Module k V3\ninst✝³ : AffineSpace V3 P3\ninst✝² : AddCommGroup V4\ninst✝¹ : Module k V4\ninst✝ : AffineSpace V4 P4\np₀ p₁ : P1\nc : k\n⊢ p₁ -ᵥ ↑(lineMap p₀ p₁) c = (1 - c) • (p₁ -ᵥ p₀)\n[PROOFSTEP]\nrw [← lineMap_apply_one_sub, left_vsub_lineMap]\n[GOAL]\nk : Type u_1\nV1 : Type u_2\nP1 : Type u_3\nV2 : Type u_4\nP2 : Type u_5\nV3 : Type u_6\nP3 : Type u_7\nV4 : Type u_8\nP4 : Type u_9\ninst✝¹² : Ring k\ninst✝¹¹ : AddCommGroup V1\ninst✝¹⁰ : Module k V1\ninst✝⁹ : AffineSpace V1 P1\ninst✝⁸ : AddCommGroup V2\ninst✝⁷ : Module k V2\ninst✝⁶ : AffineSpace V2 P2\ninst✝⁵ : AddCommGroup V3\ninst✝⁴ : Module k V3\ninst✝³ : AffineSpace V3 P3\ninst✝² : AddCommGroup V4\ninst✝¹ : Module k V4\ninst✝ : AffineSpace V4 P4\nf : V1 →ᵃ[k] V2\n⊢ ↑f = ↑f.linear + fun x => ↑f 0\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nk : Type u_1\nV1 : Type u_2\nP1 : Type u_3\nV2 : Type u_4\nP2 : Type u_5\nV3 : Type u_6\nP3 : Type u_7\nV4 : Type u_8\nP4 : Type u_9\ninst✝¹² : Ring k\ninst✝¹¹ : AddCommGroup V1\ninst✝¹⁰ : Module k V1\ninst✝⁹ : AffineSpace V1 P1\ninst✝⁸ : AddCommGroup V2\ninst✝⁷ : Module k V2\ninst✝⁶ : AffineSpace V2 P2\ninst✝⁵ : AddCommGroup V3\ninst✝⁴ : Module k V3\ninst✝³ : AffineSpace V3 P3\ninst✝² : AddCommGroup V4\ninst✝¹ : Module k V4\ninst✝ : AffineSpace V4 P4\nf : V1 →ᵃ[k] V2\nx : V1\n⊢ ↑f x = (↑f.linear + fun x => ↑f 0) x\n[PROOFSTEP]\ncalc\n  f x = f.linear x +ᵥ f 0 := by rw [← f.map_vadd, vadd_eq_add, add_zero]\n  _ = (f.linear + fun _ : V1 => f 0) x := rfl\n[GOAL]\nk : Type u_1\nV1 : Type u_2\nP1 : Type u_3\nV2 : Type u_4\nP2 : Type u_5\nV3 : Type u_6\nP3 : Type u_7\nV4 : Type u_8\nP4 : Type u_9\ninst✝¹² : Ring k\ninst✝¹¹ : AddCommGroup V1\ninst✝¹⁰ : Module k V1\ninst✝⁹ : AffineSpace V1 P1\ninst✝⁸ : AddCommGroup V2\ninst✝⁷ : Module k V2\ninst✝⁶ : AffineSpace V2 P2\ninst✝⁵ : AddCommGroup V3\ninst✝⁴ : Module k V3\ninst✝³ : AffineSpace V3 P3\ninst✝² : AddCommGroup V4\ninst✝¹ : Module k V4\ninst✝ : AffineSpace V4 P4\nf : V1 →ᵃ[k] V2\nx : V1\n⊢ ↑f x = ↑f.linear x +ᵥ ↑f 0\n[PROOFSTEP]\nrw [← f.map_vadd, vadd_eq_add, add_zero]\n[GOAL]\nk : Type u_1\nV1 : Type u_2\nP1 : Type u_3\nV2 : Type u_4\nP2 : Type u_5\nV3 : Type u_6\nP3 : Type u_7\nV4 : Type u_8\nP4 : Type u_9\ninst✝¹² : Ring k\ninst✝¹¹ : AddCommGroup V1\ninst✝¹⁰ : Module k V1\ninst✝⁹ : AffineSpace V1 P1\ninst✝⁸ : AddCommGroup V2\ninst✝⁷ : Module k V2\ninst✝⁶ : AffineSpace V2 P2\ninst✝⁵ : AddCommGroup V3\ninst✝⁴ : Module k V3\ninst✝³ : AffineSpace V3 P3\ninst✝² : AddCommGroup V4\ninst✝¹ : Module k V4\ninst✝ : AffineSpace V4 P4\nf : V1 →ᵃ[k] V2\n⊢ ↑f.linear = ↑f - fun x => ↑f 0\n[PROOFSTEP]\nrw [decomp]\n[GOAL]\nk : Type u_1\nV1 : Type u_2\nP1 : Type u_3\nV2 : Type u_4\nP2 : Type u_5\nV3 : Type u_6\nP3 : Type u_7\nV4 : Type u_8\nP4 : Type u_9\ninst✝¹² : Ring k\ninst✝¹¹ : AddCommGroup V1\ninst✝¹⁰ : Module k V1\ninst✝⁹ : AffineSpace V1 P1\ninst✝⁸ : AddCommGroup V2\ninst✝⁷ : Module k V2\ninst✝⁶ : AffineSpace V2 P2\ninst✝⁵ : AddCommGroup V3\ninst✝⁴ : Module k V3\ninst✝³ : AffineSpace V3 P3\ninst✝² : AddCommGroup V4\ninst✝¹ : Module k V4\ninst✝ : AffineSpace V4 P4\nf : V1 →ᵃ[k] V2\n⊢ ↑f.linear = (↑f.linear + fun x => ↑f 0) - fun x => (↑f.linear + fun x => ↑f 0) 0\n[PROOFSTEP]\nsimp only [LinearMap.map_zero, Pi.add_apply, add_sub_cancel, zero_add]\n[GOAL]\nk✝ : Type u_1\nV1 : Type u_2\nP1 : Type u_3\nV2 : Type u_4\nP2 : Type u_5\nV3 : Type u_6\nP3 : Type u_7\nV4 : Type u_8\nP4 : Type u_9\ninst✝¹³ : Ring k✝\ninst✝¹² : AddCommGroup V1\ninst✝¹¹ : Module k✝ V1\ninst✝¹⁰ : AffineSpace V1 P1\ninst✝⁹ : AddCommGroup V2\ninst✝⁸ : Module k✝ V2\ninst✝⁷ : AffineSpace V2 P2\ninst✝⁶ : AddCommGroup V3\ninst✝⁵ : Module k✝ V3\ninst✝⁴ : AffineSpace V3 P3\ninst✝³ : AddCommGroup V4\ninst✝² : Module k✝ V4\ninst✝¹ : AffineSpace V4 P4\nk : Type u_10\ninst✝ : LinearOrderedField k\nf : k →ᵃ[k] k\na b : k\n⊢ ↑f '' Set.uIcc a b = Set.uIcc (↑f a) (↑f b)\n[PROOFSTEP]\nhave : ⇑f = (fun x => x + f 0) ∘ fun x => x * (f 1 - f 0) :=\n  by\n  ext x\n  change f x = x • (f 1 -ᵥ f 0) +ᵥ f 0\n  rw [← f.linearMap_vsub, ← f.linear.map_smul, ← f.map_vadd]\n  simp only [vsub_eq_sub, add_zero, mul_one, vadd_eq_add, sub_zero, smul_eq_mul]\n[GOAL]\nk✝ : Type u_1\nV1 : Type u_2\nP1 : Type u_3\nV2 : Type u_4\nP2 : Type u_5\nV3 : Type u_6\nP3 : Type u_7\nV4 : Type u_8\nP4 : Type u_9\ninst✝¹³ : Ring k✝\ninst✝¹² : AddCommGroup V1\ninst✝¹¹ : Module k✝ V1\ninst✝¹⁰ : AffineSpace V1 P1\ninst✝⁹ : AddCommGroup V2\ninst✝⁸ : Module k✝ V2\ninst✝⁷ : AffineSpace V2 P2\ninst✝⁶ : AddCommGroup V3\ninst✝⁵ : Module k✝ V3\ninst✝⁴ : AffineSpace V3 P3\ninst✝³ : AddCommGroup V4\ninst✝² : Module k✝ V4\ninst✝¹ : AffineSpace V4 P4\nk : Type u_10\ninst✝ : LinearOrderedField k\nf : k →ᵃ[k] k\na b : k\n⊢ ↑f = (fun x => x + ↑f 0) ∘ fun x => x * (↑f 1 - ↑f 0)\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nk✝ : Type u_1\nV1 : Type u_2\nP1 : Type u_3\nV2 : Type u_4\nP2 : Type u_5\nV3 : Type u_6\nP3 : Type u_7\nV4 : Type u_8\nP4 : Type u_9\ninst✝¹³ : Ring k✝\ninst✝¹² : AddCommGroup V1\ninst✝¹¹ : Module k✝ V1\ninst✝¹⁰ : AffineSpace V1 P1\ninst✝⁹ : AddCommGroup V2\ninst✝⁸ : Module k✝ V2\ninst✝⁷ : AffineSpace V2 P2\ninst✝⁶ : AddCommGroup V3\ninst✝⁵ : Module k✝ V3\ninst✝⁴ : AffineSpace V3 P3\ninst✝³ : AddCommGroup V4\ninst✝² : Module k✝ V4\ninst✝¹ : AffineSpace V4 P4\nk : Type u_10\ninst✝ : LinearOrderedField k\nf : k →ᵃ[k] k\na b x : k\n⊢ ↑f x = ((fun x => x + ↑f 0) ∘ fun x => x * (↑f 1 - ↑f 0)) x\n[PROOFSTEP]\nchange f x = x • (f 1 -ᵥ f 0) +ᵥ f 0\n[GOAL]\ncase h\nk✝ : Type u_1\nV1 : Type u_2\nP1 : Type u_3\nV2 : Type u_4\nP2 : Type u_5\nV3 : Type u_6\nP3 : Type u_7\nV4 : Type u_8\nP4 : Type u_9\ninst✝¹³ : Ring k✝\ninst✝¹² : AddCommGroup V1\ninst✝¹¹ : Module k✝ V1\ninst✝¹⁰ : AffineSpace V1 P1\ninst✝⁹ : AddCommGroup V2\ninst✝⁸ : Module k✝ V2\ninst✝⁷ : AffineSpace V2 P2\ninst✝⁶ : AddCommGroup V3\ninst✝⁵ : Module k✝ V3\ninst✝⁴ : AffineSpace V3 P3\ninst✝³ : AddCommGroup V4\ninst✝² : Module k✝ V4\ninst✝¹ : AffineSpace V4 P4\nk : Type u_10\ninst✝ : LinearOrderedField k\nf : k →ᵃ[k] k\na b x : k\n⊢ ↑f x = x • (↑f 1 -ᵥ ↑f 0) +ᵥ ↑f 0\n[PROOFSTEP]\nrw [← f.linearMap_vsub, ← f.linear.map_smul, ← f.map_vadd]\n[GOAL]\ncase h\nk✝ : Type u_1\nV1 : Type u_2\nP1 : Type u_3\nV2 : Type u_4\nP2 : Type u_5\nV3 : Type u_6\nP3 : Type u_7\nV4 : Type u_8\nP4 : Type u_9\ninst✝¹³ : Ring k✝\ninst✝¹² : AddCommGroup V1\ninst✝¹¹ : Module k✝ V1\ninst✝¹⁰ : AffineSpace V1 P1\ninst✝⁹ : AddCommGroup V2\ninst✝⁸ : Module k✝ V2\ninst✝⁷ : AffineSpace V2 P2\ninst✝⁶ : AddCommGroup V3\ninst✝⁵ : Module k✝ V3\ninst✝⁴ : AffineSpace V3 P3\ninst✝³ : AddCommGroup V4\ninst✝² : Module k✝ V4\ninst✝¹ : AffineSpace V4 P4\nk : Type u_10\ninst✝ : LinearOrderedField k\nf : k →ᵃ[k] k\na b x : k\n⊢ ↑f x = ↑f (x • (1 -ᵥ 0) +ᵥ 0)\n[PROOFSTEP]\nsimp only [vsub_eq_sub, add_zero, mul_one, vadd_eq_add, sub_zero, smul_eq_mul]\n[GOAL]\nk✝ : Type u_1\nV1 : Type u_2\nP1 : Type u_3\nV2 : Type u_4\nP2 : Type u_5\nV3 : Type u_6\nP3 : Type u_7\nV4 : Type u_8\nP4 : Type u_9\ninst✝¹³ : Ring k✝\ninst✝¹² : AddCommGroup V1\ninst✝¹¹ : Module k✝ V1\ninst✝¹⁰ : AffineSpace V1 P1\ninst✝⁹ : AddCommGroup V2\ninst✝⁸ : Module k✝ V2\ninst✝⁷ : AffineSpace V2 P2\ninst✝⁶ : AddCommGroup V3\ninst✝⁵ : Module k✝ V3\ninst✝⁴ : AffineSpace V3 P3\ninst✝³ : AddCommGroup V4\ninst✝² : Module k✝ V4\ninst✝¹ : AffineSpace V4 P4\nk : Type u_10\ninst✝ : LinearOrderedField k\nf : k →ᵃ[k] k\na b : k\nthis : ↑f = (fun x => x + ↑f 0) ∘ fun x => x * (↑f 1 - ↑f 0)\n⊢ ↑f '' Set.uIcc a b = Set.uIcc (↑f a) (↑f b)\n[PROOFSTEP]\nrw [this, Set.image_comp]\n[GOAL]\nk✝ : Type u_1\nV1 : Type u_2\nP1 : Type u_3\nV2 : Type u_4\nP2 : Type u_5\nV3 : Type u_6\nP3 : Type u_7\nV4 : Type u_8\nP4 : Type u_9\ninst✝¹³ : Ring k✝\ninst✝¹² : AddCommGroup V1\ninst✝¹¹ : Module k✝ V1\ninst✝¹⁰ : AffineSpace V1 P1\ninst✝⁹ : AddCommGroup V2\ninst✝⁸ : Module k✝ V2\ninst✝⁷ : AffineSpace V2 P2\ninst✝⁶ : AddCommGroup V3\ninst✝⁵ : Module k✝ V3\ninst✝⁴ : AffineSpace V3 P3\ninst✝³ : AddCommGroup V4\ninst✝² : Module k✝ V4\ninst✝¹ : AffineSpace V4 P4\nk : Type u_10\ninst✝ : LinearOrderedField k\nf : k →ᵃ[k] k\na b : k\nthis : ↑f = (fun x => x + ↑f 0) ∘ fun x => x * (↑f 1 - ↑f 0)\n⊢ (fun x => x + ↑f 0) '' ((fun x => x * (↑f 1 - ↑f 0)) '' Set.uIcc a b) =\n    Set.uIcc (((fun x => x + ↑f 0) ∘ fun x => x * (↑f 1 - ↑f 0)) a)\n      (((fun x => x + ↑f 0) ∘ fun x => x * (↑f 1 - ↑f 0)) b)\n[PROOFSTEP]\nsimp only [Set.image_add_const_uIcc, Set.image_mul_const_uIcc, Function.comp_apply]\n[GOAL]\nR : Type u_1\nk : Type u_2\nV1 : Type u_3\nP1 : Type u_4\nV2 : Type u_5\ninst✝⁸ : Ring k\ninst✝⁷ : AddCommGroup V1\ninst✝⁶ : AffineSpace V1 P1\ninst✝⁵ : AddCommGroup V2\ninst✝⁴ : Module k V1\ninst✝³ : Module k V2\ninst✝² : Semiring R\ninst✝¹ : Module R V2\ninst✝ : SMulCommClass k R V2\n⊢ ∀ (x y : V1 →ᵃ[k] V2),\n    (fun f => (↑f 0, f.linear)) (x + y) = (fun f => (↑f 0, f.linear)) x + (fun f => (↑f 0, f.linear)) y\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\nk : Type u_2\nV1 : Type u_3\nP1 : Type u_4\nV2 : Type u_5\ninst✝⁸ : Ring k\ninst✝⁷ : AddCommGroup V1\ninst✝⁶ : AffineSpace V1 P1\ninst✝⁵ : AddCommGroup V2\ninst✝⁴ : Module k V1\ninst✝³ : Module k V2\ninst✝² : Semiring R\ninst✝¹ : Module R V2\ninst✝ : SMulCommClass k R V2\n⊢ ∀ (r : R) (x : V1 →ᵃ[k] V2),\n    AddHom.toFun\n        { toFun := fun f => (↑f 0, f.linear),\n          map_add' :=\n            (_ :\n              ∀ (a a_1 : V1 →ᵃ[k] V2),\n                (↑a 0 + ↑a_1 0, a.linear + a_1.linear) = (↑a 0 + ↑a_1 0, a.linear + a_1.linear)) }\n        (r • x) =\n      ↑(RingHom.id R) r •\n        AddHom.toFun\n          { toFun := fun f => (↑f 0, f.linear),\n            map_add' :=\n              (_ :\n                ∀ (a a_1 : V1 →ᵃ[k] V2),\n                  (↑a 0 + ↑a_1 0, a.linear + a_1.linear) = (↑a 0 + ↑a_1 0, a.linear + a_1.linear)) }\n          x\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\nk : Type u_2\nV1 : Type u_3\nP1 : Type u_4\nV2 : Type u_5\ninst✝⁸ : Ring k\ninst✝⁷ : AddCommGroup V1\ninst✝⁶ : AffineSpace V1 P1\ninst✝⁵ : AddCommGroup V2\ninst✝⁴ : Module k V1\ninst✝³ : Module k V2\ninst✝² : Semiring R\ninst✝¹ : Module R V2\ninst✝ : SMulCommClass k R V2\nf : V1 →ᵃ[k] V2\n⊢ (fun p => LinearMap.toAffineMap p.snd + const k V1 p.fst)\n      (AddHom.toFun\n        {\n            toAddHom :=\n              { toFun := fun f => (↑f 0, f.linear),\n                map_add' :=\n                  (_ :\n                    ∀ (a a_1 : V1 →ᵃ[k] V2),\n                      (↑a 0 + ↑a_1 0, a.linear + a_1.linear) = (↑a 0 + ↑a_1 0, a.linear + a_1.linear)) },\n            map_smul' :=\n              (_ :\n                ∀ (a : R) (a_1 : V1 →ᵃ[k] V2), (a • ↑a_1 0, a • a_1.linear) = (a • ↑a_1 0, a • a_1.linear)) }.toAddHom\n        f) =\n    f\n[PROOFSTEP]\next\n[GOAL]\ncase h\nR : Type u_1\nk : Type u_2\nV1 : Type u_3\nP1 : Type u_4\nV2 : Type u_5\ninst✝⁸ : Ring k\ninst✝⁷ : AddCommGroup V1\ninst✝⁶ : AffineSpace V1 P1\ninst✝⁵ : AddCommGroup V2\ninst✝⁴ : Module k V1\ninst✝³ : Module k V2\ninst✝² : Semiring R\ninst✝¹ : Module R V2\ninst✝ : SMulCommClass k R V2\nf : V1 →ᵃ[k] V2\np✝ : V1\n⊢ ↑((fun p => LinearMap.toAffineMap p.snd + const k V1 p.fst)\n          (AddHom.toFun\n            {\n                toAddHom :=\n                  { toFun := fun f => (↑f 0, f.linear),\n                    map_add' :=\n                      (_ :\n                        ∀ (a a_1 : V1 →ᵃ[k] V2),\n                          (↑a 0 + ↑a_1 0, a.linear + a_1.linear) = (↑a 0 + ↑a_1 0, a.linear + a_1.linear)) },\n                map_smul' :=\n                  (_ :\n                    ∀ (a : R) (a_1 : V1 →ᵃ[k] V2),\n                      (a • ↑a_1 0, a • a_1.linear) = (a • ↑a_1 0, a • a_1.linear)) }.toAddHom\n            f))\n      p✝ =\n    ↑f p✝\n[PROOFSTEP]\nrw [f.decomp]\n[GOAL]\ncase h\nR : Type u_1\nk : Type u_2\nV1 : Type u_3\nP1 : Type u_4\nV2 : Type u_5\ninst✝⁸ : Ring k\ninst✝⁷ : AddCommGroup V1\ninst✝⁶ : AffineSpace V1 P1\ninst✝⁵ : AddCommGroup V2\ninst✝⁴ : Module k V1\ninst✝³ : Module k V2\ninst✝² : Semiring R\ninst✝¹ : Module R V2\ninst✝ : SMulCommClass k R V2\nf : V1 →ᵃ[k] V2\np✝ : V1\n⊢ ↑((fun p => LinearMap.toAffineMap p.snd + const k V1 p.fst)\n          (AddHom.toFun\n            {\n                toAddHom :=\n                  { toFun := fun f => (↑f 0, f.linear),\n                    map_add' :=\n                      (_ :\n                        ∀ (a a_1 : V1 →ᵃ[k] V2),\n                          (↑a 0 + ↑a_1 0, a.linear + a_1.linear) = (↑a 0 + ↑a_1 0, a.linear + a_1.linear)) },\n                map_smul' :=\n                  (_ :\n                    ∀ (a : R) (a_1 : V1 →ᵃ[k] V2),\n                      (a • ↑a_1 0, a • a_1.linear) = (a • ↑a_1 0, a • a_1.linear)) }.toAddHom\n            f))\n      p✝ =\n    (↑f.linear + fun x => ↑f 0) p✝\n[PROOFSTEP]\nsimp [const_apply _ _]\n  -- porting note: `simp` needs `_`s to use this lemma\n[GOAL]\nR : Type u_1\nk : Type u_2\nV1 : Type u_3\nP1 : Type u_4\nV2 : Type u_5\ninst✝⁸ : Ring k\ninst✝⁷ : AddCommGroup V1\ninst✝⁶ : AffineSpace V1 P1\ninst✝⁵ : AddCommGroup V2\ninst✝⁴ : Module k V1\ninst✝³ : Module k V2\ninst✝² : Semiring R\ninst✝¹ : Module R V2\ninst✝ : SMulCommClass k R V2\n⊢ Function.RightInverse (fun p => LinearMap.toAffineMap p.snd + const k V1 p.fst)\n    {\n          toAddHom :=\n            { toFun := fun f => (↑f 0, f.linear),\n              map_add' :=\n                (_ :\n                  ∀ (a a_1 : V1 →ᵃ[k] V2),\n                    (↑a 0 + ↑a_1 0, a.linear + a_1.linear) = (↑a 0 + ↑a_1 0, a.linear + a_1.linear)) },\n          map_smul' :=\n            (_ :\n              ∀ (a : R) (a_1 : V1 →ᵃ[k] V2),\n                (a • ↑a_1 0, a • a_1.linear) = (a • ↑a_1 0, a • a_1.linear)) }.toAddHom.toFun\n[PROOFSTEP]\nrintro ⟨v, f⟩\n[GOAL]\ncase mk\nR : Type u_1\nk : Type u_2\nV1 : Type u_3\nP1 : Type u_4\nV2 : Type u_5\ninst✝⁸ : Ring k\ninst✝⁷ : AddCommGroup V1\ninst✝⁶ : AffineSpace V1 P1\ninst✝⁵ : AddCommGroup V2\ninst✝⁴ : Module k V1\ninst✝³ : Module k V2\ninst✝² : Semiring R\ninst✝¹ : Module R V2\ninst✝ : SMulCommClass k R V2\nv : V2\nf : V1 →ₗ[k] V2\n⊢ AddHom.toFun\n      {\n          toAddHom :=\n            { toFun := fun f => (↑f 0, f.linear),\n              map_add' :=\n                (_ :\n                  ∀ (a a_1 : V1 →ᵃ[k] V2),\n                    (↑a 0 + ↑a_1 0, a.linear + a_1.linear) = (↑a 0 + ↑a_1 0, a.linear + a_1.linear)) },\n          map_smul' :=\n            (_ : ∀ (a : R) (a_1 : V1 →ᵃ[k] V2), (a • ↑a_1 0, a • a_1.linear) = (a • ↑a_1 0, a • a_1.linear)) }.toAddHom\n      ((fun p => LinearMap.toAffineMap p.snd + const k V1 p.fst) (v, f)) =\n    (v, f)\n[PROOFSTEP]\next\n[GOAL]\ncase mk.h₁\nR : Type u_1\nk : Type u_2\nV1 : Type u_3\nP1 : Type u_4\nV2 : Type u_5\ninst✝⁸ : Ring k\ninst✝⁷ : AddCommGroup V1\ninst✝⁶ : AffineSpace V1 P1\ninst✝⁵ : AddCommGroup V2\ninst✝⁴ : Module k V1\ninst✝³ : Module k V2\ninst✝² : Semiring R\ninst✝¹ : Module R V2\ninst✝ : SMulCommClass k R V2\nv : V2\nf : V1 →ₗ[k] V2\n⊢ (AddHom.toFun\n        {\n            toAddHom :=\n              { toFun := fun f => (↑f 0, f.linear),\n                map_add' :=\n                  (_ :\n                    ∀ (a a_1 : V1 →ᵃ[k] V2),\n                      (↑a 0 + ↑a_1 0, a.linear + a_1.linear) = (↑a 0 + ↑a_1 0, a.linear + a_1.linear)) },\n            map_smul' :=\n              (_ :\n                ∀ (a : R) (a_1 : V1 →ᵃ[k] V2), (a • ↑a_1 0, a • a_1.linear) = (a • ↑a_1 0, a • a_1.linear)) }.toAddHom\n        ((fun p => LinearMap.toAffineMap p.snd + const k V1 p.fst) (v, f))).fst =\n    (v, f).fst\n[PROOFSTEP]\nsimp [const_apply _ _, const_linear _ _]\n  -- porting note: `simp` needs `_`s\n[GOAL]\ncase mk.h₂.h\nR : Type u_1\nk : Type u_2\nV1 : Type u_3\nP1 : Type u_4\nV2 : Type u_5\ninst✝⁸ : Ring k\ninst✝⁷ : AddCommGroup V1\ninst✝⁶ : AffineSpace V1 P1\ninst✝⁵ : AddCommGroup V2\ninst✝⁴ : Module k V1\ninst✝³ : Module k V2\ninst✝² : Semiring R\ninst✝¹ : Module R V2\ninst✝ : SMulCommClass k R V2\nv : V2\nf : V1 →ₗ[k] V2\nx✝ : V1\n⊢ ↑(AddHom.toFun\n            {\n                toAddHom :=\n                  { toFun := fun f => (↑f 0, f.linear),\n                    map_add' :=\n                      (_ :\n                        ∀ (a a_1 : V1 →ᵃ[k] V2),\n                          (↑a 0 + ↑a_1 0, a.linear + a_1.linear) = (↑a 0 + ↑a_1 0, a.linear + a_1.linear)) },\n                map_smul' :=\n                  (_ :\n                    ∀ (a : R) (a_1 : V1 →ᵃ[k] V2),\n                      (a • ↑a_1 0, a • a_1.linear) = (a • ↑a_1 0, a • a_1.linear)) }.toAddHom\n            ((fun p => LinearMap.toAffineMap p.snd + const k V1 p.fst) (v, f))).snd\n      x✝ =\n    ↑(v, f).snd x✝\n[PROOFSTEP]\nsimp [const_apply _ _, const_linear _ _]\n  -- porting note: `simp` needs `_`s\n[GOAL]\nR : Type u_1\nk : Type u_2\nV1 : Type u_3\nP1 : Type u_4\nV2 : Type u_5\ninst✝⁵ : CommRing k\ninst✝⁴ : AddCommGroup V1\ninst✝³ : AffineSpace V1 P1\ninst✝² : AddCommGroup V2\ninst✝¹ : Module k V1\ninst✝ : Module k V2\nc : P1\n⊢ homothety c 1 = id k P1\n[PROOFSTEP]\next p\n[GOAL]\ncase h\nR : Type u_1\nk : Type u_2\nV1 : Type u_3\nP1 : Type u_4\nV2 : Type u_5\ninst✝⁵ : CommRing k\ninst✝⁴ : AddCommGroup V1\ninst✝³ : AffineSpace V1 P1\ninst✝² : AddCommGroup V2\ninst✝¹ : Module k V1\ninst✝ : Module k V2\nc p : P1\n⊢ ↑(homothety c 1) p = ↑(id k P1) p\n[PROOFSTEP]\nsimp [homothety_apply]\n[GOAL]\nR : Type u_1\nk : Type u_2\nV1 : Type u_3\nP1 : Type u_4\nV2 : Type u_5\ninst✝⁵ : CommRing k\ninst✝⁴ : AddCommGroup V1\ninst✝³ : AffineSpace V1 P1\ninst✝² : AddCommGroup V2\ninst✝¹ : Module k V1\ninst✝ : Module k V2\nc : P1\nr₁ r₂ : k\np : P1\n⊢ ↑(homothety c (r₁ * r₂)) p = ↑(homothety c r₁) (↑(homothety c r₂) p)\n[PROOFSTEP]\nsimp only [homothety_apply, mul_smul, vadd_vsub]\n[GOAL]\nR : Type u_1\nk : Type u_2\nV1 : Type u_3\nP1 : Type u_4\nV2 : Type u_5\ninst✝⁵ : CommRing k\ninst✝⁴ : AddCommGroup V1\ninst✝³ : AffineSpace V1 P1\ninst✝² : AddCommGroup V2\ninst✝¹ : Module k V1\ninst✝ : Module k V2\nc : P1\n⊢ homothety c 0 = const k P1 c\n[PROOFSTEP]\next p\n[GOAL]\ncase h\nR : Type u_1\nk : Type u_2\nV1 : Type u_3\nP1 : Type u_4\nV2 : Type u_5\ninst✝⁵ : CommRing k\ninst✝⁴ : AddCommGroup V1\ninst✝³ : AffineSpace V1 P1\ninst✝² : AddCommGroup V2\ninst✝¹ : Module k V1\ninst✝ : Module k V2\nc p : P1\n⊢ ↑(homothety c 0) p = ↑(const k P1 c) p\n[PROOFSTEP]\nsimp [homothety_apply]\n[GOAL]\nR : Type u_1\nk : Type u_2\nV1 : Type u_3\nP1 : Type u_4\nV2 : Type u_5\ninst✝⁵ : CommRing k\ninst✝⁴ : AddCommGroup V1\ninst✝³ : AffineSpace V1 P1\ninst✝² : AddCommGroup V2\ninst✝¹ : Module k V1\ninst✝ : Module k V2\nc : P1\nr₁ r₂ : k\n⊢ homothety c (r₁ + r₂) = r₁ • (id k P1 -ᵥ const k P1 c) +ᵥ homothety c r₂\n[PROOFSTEP]\nsimp only [homothety_def, add_smul, vadd_vadd]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : Ring 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : AddCommGroup F\ninst✝¹ : Module 𝕜 E\ninst✝ : Module 𝕜 F\nx y : E\na b : 𝕜\nf : E →ᵃ[𝕜] F\nh : a + b = 1\n⊢ ↑f (a • x + b • y) = a • ↑f x + b • ↑f y\n[PROOFSTEP]\nsimp only [Convex.combo_eq_smul_sub_add h, ← vsub_eq_sub]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : Ring 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : AddCommGroup F\ninst✝¹ : Module 𝕜 E\ninst✝ : Module 𝕜 F\nx y : E\na b : 𝕜\nf : E →ᵃ[𝕜] F\nh : a + b = 1\n⊢ ↑f (b • (y -ᵥ x) + x) = b • (↑f y -ᵥ ↑f x) + ↑f x\n[PROOFSTEP]\nexact f.apply_lineMap _ _ _\n", "meta": {"mathlib_filename": "Mathlib.LinearAlgebra.AffineSpace.AffineMap", "llama_tokens": 29871, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8175744761936437, "lm_q2_score": 0.6442250996557036, "lm_q1q2_score": 0.5267019984018098}}
{"text": "[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : CharZero R\np : R[X]\nt : R\nhpt : IsRoot p t\n⊢ rootMultiplicity t (↑derivative p) = rootMultiplicity t p - 1\n[PROOFSTEP]\nrcases eq_or_ne p 0 with (rfl | hp)\n[GOAL]\ncase inl\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : CharZero R\nt : R\nhpt : IsRoot 0 t\n⊢ rootMultiplicity t (↑derivative 0) = rootMultiplicity t 0 - 1\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : CharZero R\np : R[X]\nt : R\nhpt : IsRoot p t\nhp : p ≠ 0\n⊢ rootMultiplicity t (↑derivative p) = rootMultiplicity t p - 1\n[PROOFSTEP]\nnth_rw 1 [← p.divByMonic_mul_pow_rootMultiplicity_eq t]\n[GOAL]\ncase inr\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : CharZero R\np : R[X]\nt : R\nhpt : IsRoot p t\nhp : p ≠ 0\n⊢ rootMultiplicity t (↑derivative (p /ₘ (X - ↑C t) ^ rootMultiplicity t p * (X - ↑C t) ^ rootMultiplicity t p)) =\n    rootMultiplicity t p - 1\n[PROOFSTEP]\nsimp only [derivative_pow, derivative_mul, derivative_sub, derivative_X, derivative_C, sub_zero, mul_one]\n[GOAL]\ncase inr\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : CharZero R\np : R[X]\nt : R\nhpt : IsRoot p t\nhp : p ≠ 0\n⊢ rootMultiplicity t\n      (↑derivative (p /ₘ (X - ↑C t) ^ rootMultiplicity t p) * (X - ↑C t) ^ rootMultiplicity t p +\n        p /ₘ (X - ↑C t) ^ rootMultiplicity t p *\n          (↑C ↑(rootMultiplicity t p) * (X - ↑C t) ^ (rootMultiplicity t p - 1))) =\n    rootMultiplicity t p - 1\n[PROOFSTEP]\nset n := p.rootMultiplicity t - 1\n[GOAL]\ncase inr\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : CharZero R\np : R[X]\nt : R\nhpt : IsRoot p t\nhp : p ≠ 0\nn : ℕ := rootMultiplicity t p - 1\n⊢ rootMultiplicity t\n      (↑derivative (p /ₘ (X - ↑C t) ^ rootMultiplicity t p) * (X - ↑C t) ^ rootMultiplicity t p +\n        p /ₘ (X - ↑C t) ^ rootMultiplicity t p * (↑C ↑(rootMultiplicity t p) * (X - ↑C t) ^ n)) =\n    n\n[PROOFSTEP]\nhave hn : n + 1 = _ := tsub_add_cancel_of_le ((rootMultiplicity_pos hp).mpr hpt)\n[GOAL]\ncase inr\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : CharZero R\np : R[X]\nt : R\nhpt : IsRoot p t\nhp : p ≠ 0\nn : ℕ := rootMultiplicity t p - 1\nhn : n + 1 = rootMultiplicity t p\n⊢ rootMultiplicity t\n      (↑derivative (p /ₘ (X - ↑C t) ^ rootMultiplicity t p) * (X - ↑C t) ^ rootMultiplicity t p +\n        p /ₘ (X - ↑C t) ^ rootMultiplicity t p * (↑C ↑(rootMultiplicity t p) * (X - ↑C t) ^ n)) =\n    n\n[PROOFSTEP]\nrw [← hn]\n[GOAL]\ncase inr\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : CharZero R\np : R[X]\nt : R\nhpt : IsRoot p t\nhp : p ≠ 0\nn : ℕ := rootMultiplicity t p - 1\nhn : n + 1 = rootMultiplicity t p\n⊢ rootMultiplicity t\n      (↑derivative (p /ₘ (X - ↑C t) ^ (n + 1)) * (X - ↑C t) ^ (n + 1) +\n        p /ₘ (X - ↑C t) ^ (n + 1) * (↑C ↑(n + 1) * (X - ↑C t) ^ n)) =\n    n\n[PROOFSTEP]\nset q := p /ₘ (X - C t) ^ (n + 1) with _hq\n[GOAL]\ncase inr\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : CharZero R\np : R[X]\nt : R\nhpt : IsRoot p t\nhp : p ≠ 0\nn : ℕ := rootMultiplicity t p - 1\nhn : n + 1 = rootMultiplicity t p\nq : R[X] := p /ₘ (X - ↑C t) ^ (n + 1)\n_hq : q = p /ₘ (X - ↑C t) ^ (n + 1)\n⊢ rootMultiplicity t (↑derivative q * (X - ↑C t) ^ (n + 1) + q * (↑C ↑(n + 1) * (X - ↑C t) ^ n)) = n\n[PROOFSTEP]\nconvert_to rootMultiplicity t ((X - C t) ^ n * (derivative q * (X - C t) + q * C ↑(n + 1))) = n\n[GOAL]\ncase h.e'_2\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : CharZero R\np : R[X]\nt : R\nhpt : IsRoot p t\nhp : p ≠ 0\nn : ℕ := rootMultiplicity t p - 1\nhn : n + 1 = rootMultiplicity t p\nq : R[X] := p /ₘ (X - ↑C t) ^ (n + 1)\n_hq : q = p /ₘ (X - ↑C t) ^ (n + 1)\n⊢ rootMultiplicity t (↑derivative q * (X - ↑C t) ^ (n + 1) + q * (↑C ↑(n + 1) * (X - ↑C t) ^ n)) =\n    rootMultiplicity t ((X - ↑C t) ^ n * (↑derivative q * (X - ↑C t) + q * ↑C ↑(n + 1)))\n[PROOFSTEP]\ncongr\n[GOAL]\ncase h.e'_2.e_p\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : CharZero R\np : R[X]\nt : R\nhpt : IsRoot p t\nhp : p ≠ 0\nn : ℕ := rootMultiplicity t p - 1\nhn : n + 1 = rootMultiplicity t p\nq : R[X] := p /ₘ (X - ↑C t) ^ (n + 1)\n_hq : q = p /ₘ (X - ↑C t) ^ (n + 1)\n⊢ ↑derivative q * (X - ↑C t) ^ (n + 1) + q * (↑C ↑(n + 1) * (X - ↑C t) ^ n) =\n    (X - ↑C t) ^ n * (↑derivative q * (X - ↑C t) + q * ↑C ↑(n + 1))\n[PROOFSTEP]\nrw [mul_add, mul_left_comm <| (X - C t) ^ n, ← pow_succ']\n[GOAL]\ncase h.e'_2.e_p\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : CharZero R\np : R[X]\nt : R\nhpt : IsRoot p t\nhp : p ≠ 0\nn : ℕ := rootMultiplicity t p - 1\nhn : n + 1 = rootMultiplicity t p\nq : R[X] := p /ₘ (X - ↑C t) ^ (n + 1)\n_hq : q = p /ₘ (X - ↑C t) ^ (n + 1)\n⊢ ↑derivative q * (X - ↑C t) ^ (n + 1) + q * (↑C ↑(n + 1) * (X - ↑C t) ^ n) =\n    ↑derivative q * (X - ↑C t) ^ (n + 1) + (X - ↑C t) ^ n * (q * ↑C ↑(n + 1))\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase h.e'_2.e_p.e_a\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : CharZero R\np : R[X]\nt : R\nhpt : IsRoot p t\nhp : p ≠ 0\nn : ℕ := rootMultiplicity t p - 1\nhn : n + 1 = rootMultiplicity t p\nq : R[X] := p /ₘ (X - ↑C t) ^ (n + 1)\n_hq : q = p /ₘ (X - ↑C t) ^ (n + 1)\n⊢ q * (↑C ↑(n + 1) * (X - ↑C t) ^ n) = (X - ↑C t) ^ n * (q * ↑C ↑(n + 1))\n[PROOFSTEP]\nrw [mul_left_comm <| (X - C t) ^ n, mul_comm <| (X - C t) ^ n]\n[GOAL]\ncase inr\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : CharZero R\np : R[X]\nt : R\nhpt : IsRoot p t\nhp : p ≠ 0\nn : ℕ := rootMultiplicity t p - 1\nhn : n + 1 = rootMultiplicity t p\nq : R[X] := p /ₘ (X - ↑C t) ^ (n + 1)\n_hq : q = p /ₘ (X - ↑C t) ^ (n + 1)\n⊢ rootMultiplicity t ((X - ↑C t) ^ n * (↑derivative q * (X - ↑C t) + q * ↑C ↑(n + 1))) = n\n[PROOFSTEP]\nhave h : eval t (derivative q * (X - C t) + q * C (R := R) ↑(n + 1)) ≠ 0 :=\n  by\n  suffices eval t q * ↑(n + 1) ≠ 0 by simpa\n  refine' mul_ne_zero _ (Nat.cast_ne_zero.mpr n.succ_ne_zero)\n  convert eval_divByMonic_pow_rootMultiplicity_ne_zero t hp\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : CharZero R\np : R[X]\nt : R\nhpt : IsRoot p t\nhp : p ≠ 0\nn : ℕ := rootMultiplicity t p - 1\nhn : n + 1 = rootMultiplicity t p\nq : R[X] := p /ₘ (X - ↑C t) ^ (n + 1)\n_hq : q = p /ₘ (X - ↑C t) ^ (n + 1)\n⊢ eval t (↑derivative q * (X - ↑C t) + q * ↑C ↑(n + 1)) ≠ 0\n[PROOFSTEP]\nsuffices eval t q * ↑(n + 1) ≠ 0 by simpa\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : CharZero R\np : R[X]\nt : R\nhpt : IsRoot p t\nhp : p ≠ 0\nn : ℕ := rootMultiplicity t p - 1\nhn : n + 1 = rootMultiplicity t p\nq : R[X] := p /ₘ (X - ↑C t) ^ (n + 1)\n_hq : q = p /ₘ (X - ↑C t) ^ (n + 1)\nthis : eval t q * ↑(n + 1) ≠ 0\n⊢ eval t (↑derivative q * (X - ↑C t) + q * ↑C ↑(n + 1)) ≠ 0\n[PROOFSTEP]\nsimpa\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : CharZero R\np : R[X]\nt : R\nhpt : IsRoot p t\nhp : p ≠ 0\nn : ℕ := rootMultiplicity t p - 1\nhn : n + 1 = rootMultiplicity t p\nq : R[X] := p /ₘ (X - ↑C t) ^ (n + 1)\n_hq : q = p /ₘ (X - ↑C t) ^ (n + 1)\n⊢ eval t q * ↑(n + 1) ≠ 0\n[PROOFSTEP]\nrefine' mul_ne_zero _ (Nat.cast_ne_zero.mpr n.succ_ne_zero)\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : CharZero R\np : R[X]\nt : R\nhpt : IsRoot p t\nhp : p ≠ 0\nn : ℕ := rootMultiplicity t p - 1\nhn : n + 1 = rootMultiplicity t p\nq : R[X] := p /ₘ (X - ↑C t) ^ (n + 1)\n_hq : q = p /ₘ (X - ↑C t) ^ (n + 1)\n⊢ eval t q ≠ 0\n[PROOFSTEP]\nconvert eval_divByMonic_pow_rootMultiplicity_ne_zero t hp\n[GOAL]\ncase inr\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : CharZero R\np : R[X]\nt : R\nhpt : IsRoot p t\nhp : p ≠ 0\nn : ℕ := rootMultiplicity t p - 1\nhn : n + 1 = rootMultiplicity t p\nq : R[X] := p /ₘ (X - ↑C t) ^ (n + 1)\n_hq : q = p /ₘ (X - ↑C t) ^ (n + 1)\nh : eval t (↑derivative q * (X - ↑C t) + q * ↑C ↑(n + 1)) ≠ 0\n⊢ rootMultiplicity t ((X - ↑C t) ^ n * (↑derivative q * (X - ↑C t) + q * ↑C ↑(n + 1))) = n\n[PROOFSTEP]\nrw [rootMultiplicity_mul, rootMultiplicity_X_sub_C_pow, rootMultiplicity_eq_zero h, add_zero]\n[GOAL]\ncase inr\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : CharZero R\np : R[X]\nt : R\nhpt : IsRoot p t\nhp : p ≠ 0\nn : ℕ := rootMultiplicity t p - 1\nhn : n + 1 = rootMultiplicity t p\nq : R[X] := p /ₘ (X - ↑C t) ^ (n + 1)\n_hq : q = p /ₘ (X - ↑C t) ^ (n + 1)\nh : eval t (↑derivative q * (X - ↑C t) + q * ↑C ↑(n + 1)) ≠ 0\n⊢ (X - ↑C t) ^ n * (↑derivative q * (X - ↑C t) + q * ↑C ↑(n + 1)) ≠ 0\n[PROOFSTEP]\nrefine' mul_ne_zero (pow_ne_zero n <| X_sub_C_ne_zero t) _\n[GOAL]\ncase inr\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : CharZero R\np : R[X]\nt : R\nhpt : IsRoot p t\nhp : p ≠ 0\nn : ℕ := rootMultiplicity t p - 1\nhn : n + 1 = rootMultiplicity t p\nq : R[X] := p /ₘ (X - ↑C t) ^ (n + 1)\n_hq : q = p /ₘ (X - ↑C t) ^ (n + 1)\nh : eval t (↑derivative q * (X - ↑C t) + q * ↑C ↑(n + 1)) ≠ 0\n⊢ ↑derivative q * (X - ↑C t) + q * ↑C ↑(n + 1) ≠ 0\n[PROOFSTEP]\ncontrapose! h\n[GOAL]\ncase inr\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : CharZero R\np : R[X]\nt : R\nhpt : IsRoot p t\nhp : p ≠ 0\nn : ℕ := rootMultiplicity t p - 1\nhn : n + 1 = rootMultiplicity t p\nq : R[X] := p /ₘ (X - ↑C t) ^ (n + 1)\n_hq : q = p /ₘ (X - ↑C t) ^ (n + 1)\nh :\n  ↑derivative (p /ₘ (X - ↑C t) ^ (n + 1)) * (X - ↑C t) +\n      p /ₘ (X - ↑C t) ^ (n + 1) * ↑C ↑(rootMultiplicity t p - 1 + 1) =\n    0\n⊢ eval t\n      (↑derivative (p /ₘ (X - ↑C t) ^ (n + 1)) * (X - ↑C t) +\n        p /ₘ (X - ↑C t) ^ (n + 1) * ↑C ↑(rootMultiplicity t p - 1 + 1)) =\n    0\n[PROOFSTEP]\nrw [h, eval_zero]\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : CharZero R\np : R[X]\nt : R\n⊢ rootMultiplicity t p - 1 ≤ rootMultiplicity t (↑derivative p)\n[PROOFSTEP]\nby_cases p.IsRoot t\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : CharZero R\np : R[X]\nt : R\n⊢ rootMultiplicity t p - 1 ≤ rootMultiplicity t (↑derivative p)\n[PROOFSTEP]\nby_cases p.IsRoot t\n[GOAL]\ncase pos\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : CharZero R\np : R[X]\nt : R\nh : IsRoot p t\n⊢ rootMultiplicity t p - 1 ≤ rootMultiplicity t (↑derivative p)\n[PROOFSTEP]\nexact (derivative_rootMultiplicity_of_root h).symm.le\n[GOAL]\ncase neg\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : CharZero R\np : R[X]\nt : R\nh : ¬IsRoot p t\n⊢ rootMultiplicity t p - 1 ≤ rootMultiplicity t (↑derivative p)\n[PROOFSTEP]\nrw [rootMultiplicity_eq_zero h, zero_tsub]\n[GOAL]\ncase neg\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : CharZero R\np : R[X]\nt : R\nh : ¬IsRoot p t\n⊢ 0 ≤ rootMultiplicity t (↑derivative p)\n[PROOFSTEP]\nexact zero_le _\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizationMonoid R\np : R[X]\n⊢ ↑C ↑(normUnit (leadingCoeff p)) * ↑C ↑(normUnit (leadingCoeff p))⁻¹ = 1\n[PROOFSTEP]\nrw [← RingHom.map_mul, Units.mul_inv, C_1]\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizationMonoid R\np : R[X]\n⊢ ↑C ↑(normUnit (leadingCoeff p))⁻¹ * ↑C ↑(normUnit (leadingCoeff p)) = 1\n[PROOFSTEP]\nrw [← RingHom.map_mul, Units.inv_mul, C_1]\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizationMonoid R\n⊢ ↑((fun p =>\n          { val := ↑C ↑(normUnit (leadingCoeff p)), inv := ↑C ↑(normUnit (leadingCoeff p))⁻¹,\n            val_inv := (_ : ↑C ↑(normUnit (leadingCoeff p)) * ↑C ↑(normUnit (leadingCoeff p))⁻¹ = 1),\n            inv_val := (_ : ↑C ↑(normUnit (leadingCoeff p))⁻¹ * ↑C ↑(normUnit (leadingCoeff p)) = 1) })\n        0) =\n    ↑1\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizationMonoid R\na✝ b✝ : R[X]\nhp0 : a✝ ≠ 0\nhq0 : b✝ ≠ 0\n⊢ ↑((fun p =>\n          { val := ↑C ↑(normUnit (leadingCoeff p)), inv := ↑C ↑(normUnit (leadingCoeff p))⁻¹,\n            val_inv := (_ : ↑C ↑(normUnit (leadingCoeff p)) * ↑C ↑(normUnit (leadingCoeff p))⁻¹ = 1),\n            inv_val := (_ : ↑C ↑(normUnit (leadingCoeff p))⁻¹ * ↑C ↑(normUnit (leadingCoeff p)) = 1) })\n        (a✝ * b✝)) =\n    ↑((fun p =>\n            { val := ↑C ↑(normUnit (leadingCoeff p)), inv := ↑C ↑(normUnit (leadingCoeff p))⁻¹,\n              val_inv := (_ : ↑C ↑(normUnit (leadingCoeff p)) * ↑C ↑(normUnit (leadingCoeff p))⁻¹ = 1),\n              inv_val := (_ : ↑C ↑(normUnit (leadingCoeff p))⁻¹ * ↑C ↑(normUnit (leadingCoeff p)) = 1) })\n          a✝ *\n        (fun p =>\n            { val := ↑C ↑(normUnit (leadingCoeff p)), inv := ↑C ↑(normUnit (leadingCoeff p))⁻¹,\n              val_inv := (_ : ↑C ↑(normUnit (leadingCoeff p)) * ↑C ↑(normUnit (leadingCoeff p))⁻¹ = 1),\n              inv_val := (_ : ↑C ↑(normUnit (leadingCoeff p))⁻¹ * ↑C ↑(normUnit (leadingCoeff p)) = 1) })\n          b✝)\n[PROOFSTEP]\ndsimp\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizationMonoid R\na✝ b✝ : R[X]\nhp0 : a✝ ≠ 0\nhq0 : b✝ ≠ 0\n⊢ ↑C ↑(normUnit (leadingCoeff (a✝ * b✝))) = ↑C ↑(normUnit (leadingCoeff a✝)) * ↑C ↑(normUnit (leadingCoeff b✝))\n[PROOFSTEP]\nrw [Ne.def, ← leadingCoeff_eq_zero] at *\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizationMonoid R\na✝ b✝ : R[X]\nhp0 : ¬leadingCoeff a✝ = 0\nhq0 : ¬leadingCoeff b✝ = 0\n⊢ ↑C ↑(normUnit (leadingCoeff (a✝ * b✝))) = ↑C ↑(normUnit (leadingCoeff a✝)) * ↑C ↑(normUnit (leadingCoeff b✝))\n[PROOFSTEP]\nrw [leadingCoeff_mul, normUnit_mul hp0 hq0, Units.val_mul, C_mul]\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizationMonoid R\nu : R[X]ˣ\n⊢ ↑((fun p =>\n          { val := ↑C ↑(normUnit (leadingCoeff p)), inv := ↑C ↑(normUnit (leadingCoeff p))⁻¹,\n            val_inv := (_ : ↑C ↑(normUnit (leadingCoeff p)) * ↑C ↑(normUnit (leadingCoeff p))⁻¹ = 1),\n            inv_val := (_ : ↑C ↑(normUnit (leadingCoeff p))⁻¹ * ↑C ↑(normUnit (leadingCoeff p)) = 1) })\n        ↑u) =\n    ↑u⁻¹\n[PROOFSTEP]\ndsimp\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizationMonoid R\nu : R[X]ˣ\n⊢ ↑C ↑(normUnit (leadingCoeff ↑u)) = ↑u⁻¹\n[PROOFSTEP]\nrw [← mul_one u⁻¹, Units.val_mul, Units.eq_inv_mul_iff_mul_eq]\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizationMonoid R\nu : R[X]ˣ\n⊢ ↑u * ↑C ↑(normUnit (leadingCoeff ↑u)) = ↑1\n[PROOFSTEP]\nrcases Polynomial.isUnit_iff.1 ⟨u, rfl⟩ with ⟨_, ⟨w, rfl⟩, h2⟩\n[GOAL]\ncase intro.intro.intro\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizationMonoid R\nu : R[X]ˣ\nw : Rˣ\nh2 : ↑C ↑w = ↑u\n⊢ ↑u * ↑C ↑(normUnit (leadingCoeff ↑u)) = ↑1\n[PROOFSTEP]\nrw [← h2, leadingCoeff_C, normUnit_coe_units, ← C_mul, Units.mul_inv, C_1]\n[GOAL]\ncase intro.intro.intro\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizationMonoid R\nu : R[X]ˣ\nw : Rˣ\nh2 : ↑C ↑w = ↑u\n⊢ 1 = ↑1\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizationMonoid R\np : R[X]\n⊢ ↑(normUnit p) = ↑C ↑(normUnit (leadingCoeff p))\n[PROOFSTEP]\nsimp [normUnit]\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizationMonoid R\np : R[X]\n⊢ leadingCoeff (↑normalize p) = ↑normalize (leadingCoeff p)\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizationMonoid R\np : R[X]\nhp : Monic p\n⊢ ↑normalize p = p\n[PROOFSTEP]\nsimp only [Polynomial.coe_normUnit, normalize_apply, hp.leadingCoeff, normUnit_one, Units.val_one, Polynomial.C.map_one,\n  mul_one]\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : NormalizationMonoid R\np : R[X]\n⊢ roots (↑normalize p) = roots p\n[PROOFSTEP]\nrw [normalize_apply, mul_comm, coe_normUnit, roots_C_mul _ (normUnit (leadingCoeff p)).ne_zero]\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : DivisionRing R\np q : R[X]\nhp0 : p ≠ 0\nhp : ¬IsUnit p\nh : 0 ≥ degree p\n⊢ False\n[PROOFSTEP]\nrw [eq_C_of_degree_le_zero h] at hp0 hp \n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : DivisionRing R\np q : R[X]\nhp0 : ↑C (coeff p 0) ≠ 0\nhp : ¬IsUnit (↑C (coeff p 0))\nh : 0 ≥ degree p\n⊢ False\n[PROOFSTEP]\nexact hp (IsUnit.map C (IsUnit.mk0 (coeff p 0) (mt C_inj.2 (by simpa using hp0))))\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : DivisionRing R\np q : R[X]\nhp0 : ↑C (coeff p 0) ≠ 0\nhp : ¬IsUnit (↑C (coeff p 0))\nh : 0 ≥ degree p\n⊢ ¬↑C (coeff p 0) = ↑C 0\n[PROOFSTEP]\nsimpa using hp0\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : DivisionRing R\np q : R[X]\nh : p ≠ 0\n⊢ Monic (p * ↑C (leadingCoeff p)⁻¹)\n[PROOFSTEP]\nrw [Monic, leadingCoeff_mul, leadingCoeff_C, mul_inv_cancel (show leadingCoeff p ≠ 0 from mt leadingCoeff_eq_zero.1 h)]\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : DivisionRing R\np✝ q p : R[X]\nh : q ≠ 0\n⊢ degree (p * ↑C (leadingCoeff q)⁻¹) = degree p\n[PROOFSTEP]\nhave h₁ : (leadingCoeff q)⁻¹ ≠ 0 := inv_ne_zero (mt leadingCoeff_eq_zero.1 h)\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : DivisionRing R\np✝ q p : R[X]\nh : q ≠ 0\nh₁ : (leadingCoeff q)⁻¹ ≠ 0\n⊢ degree (p * ↑C (leadingCoeff q)⁻¹) = degree p\n[PROOFSTEP]\nrw [degree_mul, degree_C h₁, add_zero]\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝² : DivisionRing R\np q : R[X]\ninst✝¹ : Semiring S\ninst✝ : Nontrivial S\nf : R →+* S\n⊢ map f p = 0 ↔ p = 0\n[PROOFSTEP]\nsimp only [Polynomial.ext_iff]\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝² : DivisionRing R\np q : R[X]\ninst✝¹ : Semiring S\ninst✝ : Nontrivial S\nf : R →+* S\n⊢ (∀ (n : ℕ), coeff (map f p) n = coeff 0 n) ↔ ∀ (n : ℕ), coeff p n = coeff 0 n\n[PROOFSTEP]\ncongr!\n[GOAL]\ncase a.h.a\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝² : DivisionRing R\np q : R[X]\ninst✝¹ : Semiring S\ninst✝ : Nontrivial S\nf : R →+* S\na✝ : ℕ\n⊢ coeff (map f p) a✝ = coeff 0 a✝ ↔ coeff p a✝ = coeff 0 a✝\n[PROOFSTEP]\nsimp [map_eq_zero, coeff_map, coeff_zero]\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝² : DivisionRing R\np q : R[X]\ninst✝¹ : Semiring S\ninst✝ : Nontrivial S\nf : R →+* S\n⊢ leadingCoeff (map f p) = ↑f (leadingCoeff p)\n[PROOFSTEP]\nsimp only [← coeff_natDegree, coeff_map f, natDegree_map]\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝² : DivisionRing R\np✝ q : R[X]\ninst✝¹ : Semiring S\ninst✝ : Nontrivial S\nf : R →+* S\np : R[X]\n⊢ Monic (map f p) ↔ Monic p\n[PROOFSTEP]\nrw [Monic, leadingCoeff_map, ← f.map_one, Function.Injective.eq_iff f.injective, Monic]\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Field R\np q : R[X]\nh : degree p = 0\n⊢ degree p ≤ 0\n[PROOFSTEP]\nsimp [*, le_refl]\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Field R\np q : R[X]\nh : degree p = 0\nthis : degree p ≤ 0\nhc : coeff p 0 = 0\n⊢ False\n[PROOFSTEP]\nrw [eq_C_of_degree_le_zero this, hc] at h \n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Field R\np q : R[X]\nh : degree (↑C 0) = 0\nthis : degree p ≤ 0\nhc : coeff p 0 = 0\n⊢ False\n[PROOFSTEP]\nsimp at h \n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Field R\np q : R[X]\nh : degree p = 0\nthis : degree p ≤ 0\nhc : coeff p 0 ≠ 0\n⊢ 1 = p * ↑C (coeff p 0)⁻¹\n[PROOFSTEP]\nconv in p => rw [eq_C_of_degree_le_zero this]\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Field R\np q : R[X]\nh : degree p = 0\nthis : degree p ≤ 0\nhc : coeff p 0 ≠ 0\n| p\n[PROOFSTEP]\nrw [eq_C_of_degree_le_zero this]\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Field R\np q : R[X]\nh : degree p = 0\nthis : degree p ≤ 0\nhc : coeff p 0 ≠ 0\n| p\n[PROOFSTEP]\nrw [eq_C_of_degree_le_zero this]\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Field R\np q : R[X]\nh : degree p = 0\nthis : degree p ≤ 0\nhc : coeff p 0 ≠ 0\n| p\n[PROOFSTEP]\nrw [eq_C_of_degree_le_zero this]\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Field R\np q : R[X]\nh : degree p = 0\nthis : degree p ≤ 0\nhc : coeff p 0 ≠ 0\n⊢ 1 = ↑C (coeff p 0) * ↑C (coeff p 0)⁻¹\n[PROOFSTEP]\nrw [← C_mul, _root_.mul_inv_cancel hc, C_1]\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Field R\np✝ q✝ p q : R[X]\n⊢ q * div p q + mod p q = p\n[PROOFSTEP]\nby_cases h : q = 0\n[GOAL]\ncase pos\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Field R\np✝ q✝ p q : R[X]\nh : q = 0\n⊢ q * div p q + mod p q = p\n[PROOFSTEP]\nsimp only [h, zero_mul, mod, modByMonic_zero, zero_add]\n[GOAL]\ncase neg\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Field R\np✝ q✝ p q : R[X]\nh : ¬q = 0\n⊢ q * div p q + mod p q = p\n[PROOFSTEP]\nconv =>\n  rhs\n  rw [← modByMonic_add_div p (monic_mul_leadingCoeff_inv h)]\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Field R\np✝ q✝ p q : R[X]\nh : ¬q = 0\n| q * div p q + mod p q = p\n[PROOFSTEP]\n  rhs\n  rw [← modByMonic_add_div p (monic_mul_leadingCoeff_inv h)]\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Field R\np✝ q✝ p q : R[X]\nh : ¬q = 0\n| q * div p q + mod p q = p\n[PROOFSTEP]\n  rhs\n  rw [← modByMonic_add_div p (monic_mul_leadingCoeff_inv h)]\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Field R\np✝ q✝ p q : R[X]\nh : ¬q = 0\n| q * div p q + mod p q = p\n[PROOFSTEP]\nrhs\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Field R\np✝ q✝ p q : R[X]\nh : ¬q = 0\n| p\n[PROOFSTEP]\nrw [← modByMonic_add_div p (monic_mul_leadingCoeff_inv h)]\n[GOAL]\ncase neg\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Field R\np✝ q✝ p q : R[X]\nh : ¬q = 0\n⊢ q * div p q + mod p q =\n    p %ₘ (q * ↑C (leadingCoeff q)⁻¹) + q * ↑C (leadingCoeff q)⁻¹ * (p /ₘ (q * ↑C (leadingCoeff q)⁻¹))\n[PROOFSTEP]\nrw [div, mod, add_comm, mul_assoc]\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Field R\np✝ q p : R[X]\nhq : q ≠ 0\n⊢ degree (mod p q) < degree q\n[PROOFSTEP]\nrw [← degree_mul_leadingCoeff_inv q hq]\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Field R\np✝ q p : R[X]\nhq : q ≠ 0\n⊢ degree (mod p q) < degree (q * ↑C (leadingCoeff q)⁻¹)\n[PROOFSTEP]\nexact degree_modByMonic_lt p (monic_mul_leadingCoeff_inv hq)\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Field R\np✝ q p : R[X]\nhq : Monic q\n⊢ p %ₘ q = p %ₘ (q * ↑C (leadingCoeff q)⁻¹)\n[PROOFSTEP]\nsimp only [Monic.def.1 hq, inv_one, mul_one, C_1]\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Field R\np✝ q p : R[X]\nhq : Monic q\n⊢ p /ₘ q = ↑C (leadingCoeff q)⁻¹ * (p /ₘ (q * ↑C (leadingCoeff q)⁻¹))\n[PROOFSTEP]\nsimp only [Monic.def.1 hq, inv_one, C_1, one_mul, mul_one]\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Field R\np q : R[X]\nsrc✝¹ : CommRing R[X] := commRing\nsrc✝ : Nontrivial R[X] := nontrivial\n⊢ ∀ (a : R[X]), (fun x x_1 => x / x_1) a 0 = 0\n[PROOFSTEP]\nsimp [div_def]\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Field R\np q : R[X]\nhq0 : q ≠ 0\nh : degree p < degree q\n⊢ p % q = p\n[PROOFSTEP]\nclassical\nhave : ¬degree (q * C (leadingCoeff q)⁻¹) ≤ degree p := not_le_of_gt <| by rwa [degree_mul_leadingCoeff_inv q hq0]\nrw [mod_def, modByMonic, dif_pos (monic_mul_leadingCoeff_inv hq0)]\nunfold divModByMonicAux\ndsimp\nsimp only [this, false_and_iff, if_false]\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Field R\np q : R[X]\nhq0 : q ≠ 0\nh : degree p < degree q\n⊢ p % q = p\n[PROOFSTEP]\nhave : ¬degree (q * C (leadingCoeff q)⁻¹) ≤ degree p := not_le_of_gt <| by rwa [degree_mul_leadingCoeff_inv q hq0]\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Field R\np q : R[X]\nhq0 : q ≠ 0\nh : degree p < degree q\n⊢ degree (q * ↑C (leadingCoeff q)⁻¹) > degree p\n[PROOFSTEP]\nrwa [degree_mul_leadingCoeff_inv q hq0]\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Field R\np q : R[X]\nhq0 : q ≠ 0\nh : degree p < degree q\nthis : ¬degree (q * ↑C (leadingCoeff q)⁻¹) ≤ degree p\n⊢ p % q = p\n[PROOFSTEP]\nrw [mod_def, modByMonic, dif_pos (monic_mul_leadingCoeff_inv hq0)]\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Field R\np q : R[X]\nhq0 : q ≠ 0\nh : degree p < degree q\nthis : ¬degree (q * ↑C (leadingCoeff q)⁻¹) ≤ degree p\n⊢ (divModByMonicAux p (_ : Monic (q * ↑C (leadingCoeff q)⁻¹))).snd = p\n[PROOFSTEP]\nunfold divModByMonicAux\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Field R\np q : R[X]\nhq0 : q ≠ 0\nh : degree p < degree q\nthis : ¬degree (q * ↑C (leadingCoeff q)⁻¹) ≤ degree p\n⊢ (if h : degree (q * ↑C (leadingCoeff q)⁻¹) ≤ degree p ∧ p ≠ 0 then\n        let z := ↑C (leadingCoeff p) * X ^ (natDegree p - natDegree (q * ↑C (leadingCoeff q)⁻¹));\n        let_fun _wf :=\n          (_ :\n            degree\n                (p -\n                  ↑C (leadingCoeff p) * X ^ (natDegree p - natDegree (q * ↑C (leadingCoeff q)⁻¹)) *\n                    (q * ↑C (leadingCoeff q)⁻¹)) <\n              degree p);\n        let dm := divModByMonicAux (p - z * (q * ↑C (leadingCoeff q)⁻¹)) (_ : Monic (q * ↑C (leadingCoeff q)⁻¹));\n        (z + dm.fst, dm.snd)\n      else (0, p)).snd =\n    p\n[PROOFSTEP]\ndsimp\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Field R\np q : R[X]\nhq0 : q ≠ 0\nh : degree p < degree q\nthis : ¬degree (q * ↑C (leadingCoeff q)⁻¹) ≤ degree p\n⊢ (if degree (q * ↑C (leadingCoeff q)⁻¹) ≤ degree p ∧ ¬p = 0 then\n        (↑C (leadingCoeff p) * X ^ (natDegree p - natDegree (q * ↑C (leadingCoeff q)⁻¹)) +\n            (divModByMonicAux\n                (p -\n                  ↑C (leadingCoeff p) * X ^ (natDegree p - natDegree (q * ↑C (leadingCoeff q)⁻¹)) *\n                    (q * ↑C (leadingCoeff q)⁻¹))\n                (_ : Monic (q * ↑C (leadingCoeff q)⁻¹))).fst,\n          (divModByMonicAux\n              (p -\n                ↑C (leadingCoeff p) * X ^ (natDegree p - natDegree (q * ↑C (leadingCoeff q)⁻¹)) *\n                  (q * ↑C (leadingCoeff q)⁻¹))\n              (_ : Monic (q * ↑C (leadingCoeff q)⁻¹))).snd)\n      else (0, p)).snd =\n    p\n[PROOFSTEP]\nsimp only [this, false_and_iff, if_false]\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Field R\np q : R[X]\nhq0 : q ≠ 0\nh : p / q = 0\n⊢ degree p < degree q\n[PROOFSTEP]\nhave := EuclideanDomain.div_add_mod p q\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Field R\np q : R[X]\nhq0 : q ≠ 0\nh : p / q = 0\nthis : q * (p / q) + p % q = p\n⊢ degree p < degree q\n[PROOFSTEP]\nrwa [h, mul_zero, zero_add, mod_eq_self_iff hq0] at this \n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Field R\np q : R[X]\nhq0 : q ≠ 0\nh : degree p < degree q\n⊢ p / q = 0\n[PROOFSTEP]\nhave hlt : degree p < degree (q * C (leadingCoeff q)⁻¹) := by rwa [degree_mul_leadingCoeff_inv q hq0]\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Field R\np q : R[X]\nhq0 : q ≠ 0\nh : degree p < degree q\n⊢ degree p < degree (q * ↑C (leadingCoeff q)⁻¹)\n[PROOFSTEP]\nrwa [degree_mul_leadingCoeff_inv q hq0]\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Field R\np q : R[X]\nhq0 : q ≠ 0\nh : degree p < degree q\nhlt : degree p < degree (q * ↑C (leadingCoeff q)⁻¹)\n⊢ p / q = 0\n[PROOFSTEP]\nhave hm : Monic (q * C (leadingCoeff q)⁻¹) := monic_mul_leadingCoeff_inv hq0\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Field R\np q : R[X]\nhq0 : q ≠ 0\nh : degree p < degree q\nhlt : degree p < degree (q * ↑C (leadingCoeff q)⁻¹)\nhm : Monic (q * ↑C (leadingCoeff q)⁻¹)\n⊢ p / q = 0\n[PROOFSTEP]\nrw [div_def, (divByMonic_eq_zero_iff hm).2 hlt, mul_zero]\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Field R\np q : R[X]\nhq0 : q ≠ 0\nhpq : degree q ≤ degree p\n⊢ degree q + degree (p / q) = degree p\n[PROOFSTEP]\nhave : degree (p % q) < degree (q * (p / q)) :=\n  calc\n    degree (p % q) < degree q := EuclideanDomain.mod_lt _ hq0\n    _ ≤ _ := degree_le_mul_left _ (mt (div_eq_zero_iff hq0).1 (not_lt_of_ge hpq))\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Field R\np q : R[X]\nhq0 : q ≠ 0\nhpq : degree q ≤ degree p\nthis : degree (p % q) < degree (q * (p / q))\n⊢ degree q + degree (p / q) = degree p\n[PROOFSTEP]\nconv_rhs => rw [← EuclideanDomain.div_add_mod p q, degree_add_eq_left_of_degree_lt this, degree_mul]\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Field R\np q : R[X]\nhq0 : q ≠ 0\nhpq : degree q ≤ degree p\nthis : degree (p % q) < degree (q * (p / q))\n| degree p\n[PROOFSTEP]\nrw [← EuclideanDomain.div_add_mod p q, degree_add_eq_left_of_degree_lt this, degree_mul]\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Field R\np q : R[X]\nhq0 : q ≠ 0\nhpq : degree q ≤ degree p\nthis : degree (p % q) < degree (q * (p / q))\n| degree p\n[PROOFSTEP]\nrw [← EuclideanDomain.div_add_mod p q, degree_add_eq_left_of_degree_lt this, degree_mul]\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Field R\np q : R[X]\nhq0 : q ≠ 0\nhpq : degree q ≤ degree p\nthis : degree (p % q) < degree (q * (p / q))\n| degree p\n[PROOFSTEP]\nrw [← EuclideanDomain.div_add_mod p q, degree_add_eq_left_of_degree_lt this, degree_mul]\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Field R\np✝ q✝ p q : R[X]\n⊢ degree (p / q) ≤ degree p\n[PROOFSTEP]\nby_cases hq : q = 0\n[GOAL]\ncase pos\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Field R\np✝ q✝ p q : R[X]\nhq : q = 0\n⊢ degree (p / q) ≤ degree p\n[PROOFSTEP]\nsimp [hq]\n[GOAL]\ncase neg\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Field R\np✝ q✝ p q : R[X]\nhq : ¬q = 0\n⊢ degree (p / q) ≤ degree p\n[PROOFSTEP]\nrw [div_def, mul_comm, degree_mul_leadingCoeff_inv _ hq]\n[GOAL]\ncase neg\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Field R\np✝ q✝ p q : R[X]\nhq : ¬q = 0\n⊢ degree (p /ₘ (q * ↑C (leadingCoeff q)⁻¹)) ≤ degree p\n[PROOFSTEP]\nexact degree_divByMonic_le _ _\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Field R\np q : R[X]\nhp : p ≠ 0\nhq : 0 < degree q\n⊢ degree (p / q) < degree p\n[PROOFSTEP]\nhave hq0 : q ≠ 0 := fun hq0 => by simp [hq0] at hq \n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Field R\np q : R[X]\nhp : p ≠ 0\nhq : 0 < degree q\nhq0 : q = 0\n⊢ False\n[PROOFSTEP]\nsimp [hq0] at hq \n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Field R\np q : R[X]\nhp : p ≠ 0\nhq : 0 < degree q\nhq0 : q ≠ 0\n⊢ degree (p / q) < degree p\n[PROOFSTEP]\nrw [div_def, mul_comm, degree_mul_leadingCoeff_inv _ hq0]\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Field R\np q : R[X]\nhp : p ≠ 0\nhq : 0 < degree q\nhq0 : q ≠ 0\n⊢ degree (p /ₘ (q * ↑C (leadingCoeff q)⁻¹)) < degree p\n[PROOFSTEP]\nexact degree_divByMonic_lt _ (monic_mul_leadingCoeff_inv hq0) hp (by rw [degree_mul_leadingCoeff_inv _ hq0]; exact hq)\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Field R\np q : R[X]\nhp : p ≠ 0\nhq : 0 < degree q\nhq0 : q ≠ 0\n⊢ 0 < degree (q * ↑C (leadingCoeff q)⁻¹)\n[PROOFSTEP]\nrw [degree_mul_leadingCoeff_inv _ hq0]\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Field R\np q : R[X]\nhp : p ≠ 0\nhq : 0 < degree q\nhq0 : q ≠ 0\n⊢ 0 < degree q\n[PROOFSTEP]\nexact hq\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝¹ : Field R\np q : R[X]\ninst✝ : Field k\nf : R →+* k\n⊢ IsUnit (map f p) ↔ IsUnit p\n[PROOFSTEP]\nsimp_rw [isUnit_iff_degree_eq_zero, degree_map]\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝¹ : Field R\np q : R[X]\ninst✝ : Field k\nf : R →+* k\n⊢ map f (p / q) = map f p / map f q\n[PROOFSTEP]\nif hq0 : q = 0 then simp [hq0]\nelse\n  rw [div_def, div_def, Polynomial.map_mul, map_divByMonic f (monic_mul_leadingCoeff_inv hq0), Polynomial.map_mul,\n    map_C, leadingCoeff_map, map_inv₀]\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝¹ : Field R\np q : R[X]\ninst✝ : Field k\nf : R →+* k\nhq0 : q = 0\n⊢ map f (p / q) = map f p / map f q\n[PROOFSTEP]\nsimp [hq0]\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝¹ : Field R\np q : R[X]\ninst✝ : Field k\nf : R →+* k\nhq0 : ¬q = 0\n⊢ map f (p / q) = map f p / map f q\n[PROOFSTEP]\nrw [div_def, div_def, Polynomial.map_mul, map_divByMonic f (monic_mul_leadingCoeff_inv hq0), Polynomial.map_mul, map_C,\n  leadingCoeff_map, map_inv₀]\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝¹ : Field R\np q : R[X]\ninst✝ : Field k\nf : R →+* k\n⊢ map f (p % q) = map f p % map f q\n[PROOFSTEP]\nby_cases hq0 : q = 0\n[GOAL]\ncase pos\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝¹ : Field R\np q : R[X]\ninst✝ : Field k\nf : R →+* k\nhq0 : q = 0\n⊢ map f (p % q) = map f p % map f q\n[PROOFSTEP]\nsimp [hq0]\n[GOAL]\ncase neg\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝¹ : Field R\np q : R[X]\ninst✝ : Field k\nf : R →+* k\nhq0 : ¬q = 0\n⊢ map f (p % q) = map f p % map f q\n[PROOFSTEP]\nrw [mod_def, mod_def, leadingCoeff_map f, ← map_inv₀ f, ← map_C f, ← Polynomial.map_mul f,\n  map_modByMonic f (monic_mul_leadingCoeff_inv hq0)]\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝³ : Field R\np q : R[X]\ninst✝² : Field k\ninst✝¹ : DecidableEq R\ninst✝ : DecidableEq k\nf : R →+* k\nx : R[X]\n⊢ EuclideanDomain.gcd (map f 0) (map f x) = map f (EuclideanDomain.gcd 0 x)\n[PROOFSTEP]\nsimp_rw [Polynomial.map_zero, EuclideanDomain.gcd_zero_left]\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝³ : Field R\np q : R[X]\ninst✝² : Field k\ninst✝¹ : DecidableEq R\ninst✝ : DecidableEq k\nf : R →+* k\nx y : R[X]\nx✝ : x ≠ 0\nih : EuclideanDomain.gcd (map f (y % x)) (map f x) = map f (EuclideanDomain.gcd (y % x) x)\n⊢ EuclideanDomain.gcd (map f x) (map f y) = map f (EuclideanDomain.gcd x y)\n[PROOFSTEP]\nrw [gcd_val, ← map_mod, ih, ← gcd_val]\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝² : Field R\np q : R[X]\ninst✝¹ : CommSemiring k\ninst✝ : DecidableEq R\nϕ : R →+* k\nf g : R[X]\nα : k\nhf : eval₂ ϕ α f = 0\nhg : eval₂ ϕ α g = 0\n⊢ eval₂ ϕ α (EuclideanDomain.gcd f g) = 0\n[PROOFSTEP]\nrw [EuclideanDomain.gcd_eq_gcd_ab f g, Polynomial.eval₂_add, Polynomial.eval₂_mul, Polynomial.eval₂_mul, hf, hg,\n  zero_mul, zero_mul, zero_add]\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝² : Field R\np q : R[X]\ninst✝¹ : CommSemiring k\ninst✝ : DecidableEq R\nϕ : R →+* k\nf g : R[X]\nα : k\nhα : eval₂ ϕ α (EuclideanDomain.gcd f g) = 0\n⊢ eval₂ ϕ α f = 0\n[PROOFSTEP]\ncases' EuclideanDomain.gcd_dvd_left f g with p hp\n[GOAL]\ncase intro\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝² : Field R\np✝ q : R[X]\ninst✝¹ : CommSemiring k\ninst✝ : DecidableEq R\nϕ : R →+* k\nf g : R[X]\nα : k\nhα : eval₂ ϕ α (EuclideanDomain.gcd f g) = 0\np : R[X]\nhp : f = EuclideanDomain.gcd f g * p\n⊢ eval₂ ϕ α f = 0\n[PROOFSTEP]\nrw [hp, Polynomial.eval₂_mul, hα, zero_mul]\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝² : Field R\np q : R[X]\ninst✝¹ : CommSemiring k\ninst✝ : DecidableEq R\nϕ : R →+* k\nf g : R[X]\nα : k\nhα : eval₂ ϕ α (EuclideanDomain.gcd f g) = 0\n⊢ eval₂ ϕ α g = 0\n[PROOFSTEP]\ncases' EuclideanDomain.gcd_dvd_right f g with p hp\n[GOAL]\ncase intro\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝² : Field R\np✝ q : R[X]\ninst✝¹ : CommSemiring k\ninst✝ : DecidableEq R\nϕ : R →+* k\nf g : R[X]\nα : k\nhα : eval₂ ϕ α (EuclideanDomain.gcd f g) = 0\np : R[X]\nhp : g = EuclideanDomain.gcd f g * p\n⊢ eval₂ ϕ α g = 0\n[PROOFSTEP]\nrw [hp, Polynomial.eval₂_mul, hα, zero_mul]\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝¹ : Field R\np q : R[X]\ninst✝ : Field k\nf : R →+* k\n⊢ IsCoprime (map f p) (map f q) ↔ IsCoprime p q\n[PROOFSTEP]\nclassical rw [← EuclideanDomain.gcd_isUnit_iff, ← EuclideanDomain.gcd_isUnit_iff, gcd_map, isUnit_map]\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝¹ : Field R\np q : R[X]\ninst✝ : Field k\nf : R →+* k\n⊢ IsCoprime (map f p) (map f q) ↔ IsCoprime p q\n[PROOFSTEP]\nrw [← EuclideanDomain.gcd_isUnit_iff, ← EuclideanDomain.gcd_isUnit_iff, gcd_map, isUnit_map]\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝² : Field R\np q : R[X]\ninst✝¹ : CommRing k\ninst✝ : IsDomain k\nf : R →+* k\nx : k\nhp : p ≠ 0\n⊢ x ∈ roots (map f p) ↔ eval₂ f x p = 0\n[PROOFSTEP]\nrw [mem_roots (map_ne_zero hp), IsRoot, Polynomial.eval_map]\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na✝ b : R\nn✝ : ℕ\ninst✝³ : Field R\np q : R[X]\ninst✝² : CommRing S\ninst✝¹ : IsDomain S\ninst✝ : Algebra R S\nn : ℕ\nhn : n ≠ 0\na : R\nha : a ≠ 0\n⊢ rootSet (↑(monomial n) a) S = {0}\n[PROOFSTEP]\nclassical rw [rootSet, map_monomial, roots_monomial ((_root_.map_ne_zero (algebraMap R S)).2 ha),\n  Multiset.toFinset_nsmul _ _ hn, Multiset.toFinset_singleton, Finset.coe_singleton]\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na✝ b : R\nn✝ : ℕ\ninst✝³ : Field R\np q : R[X]\ninst✝² : CommRing S\ninst✝¹ : IsDomain S\ninst✝ : Algebra R S\nn : ℕ\nhn : n ≠ 0\na : R\nha : a ≠ 0\n⊢ rootSet (↑(monomial n) a) S = {0}\n[PROOFSTEP]\nrw [rootSet, map_monomial, roots_monomial ((_root_.map_ne_zero (algebraMap R S)).2 ha), Multiset.toFinset_nsmul _ _ hn,\n  Multiset.toFinset_singleton, Finset.coe_singleton]\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na✝ b : R\nn✝ : ℕ\ninst✝³ : Field R\np q : R[X]\ninst✝² : CommRing S\ninst✝¹ : IsDomain S\ninst✝ : Algebra R S\nn : ℕ\nhn : n ≠ 0\na : R\nha : a ≠ 0\n⊢ rootSet (↑C a * X ^ n) S = {0}\n[PROOFSTEP]\nrw [C_mul_X_pow_eq_monomial, rootSet_monomial hn ha]\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝³ : Field R\np q : R[X]\ninst✝² : CommRing S\ninst✝¹ : IsDomain S\ninst✝ : Algebra R S\nn : ℕ\nhn : n ≠ 0\n⊢ rootSet (X ^ n) S = {0}\n[PROOFSTEP]\nrw [← one_mul (X ^ n : R[X]), ← C_1, rootSet_C_mul_X_pow hn]\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝³ : Field R\np q : R[X]\ninst✝² : CommRing S\ninst✝¹ : IsDomain S\ninst✝ : Algebra R S\nn : ℕ\nhn : n ≠ 0\n⊢ 1 ≠ 0\n[PROOFSTEP]\nexact one_ne_zero\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝³ : Field R\np q : R[X]\ninst✝² : CommRing S\ninst✝¹ : IsDomain S\ninst✝ : Algebra R S\nι : Type u_1\nf : ι → R[X]\ns : Finset ι\nh : Finset.prod s f ≠ 0\n⊢ rootSet (Finset.prod s f) S = ⋃ (i : ι) (_ : i ∈ s), rootSet (f i) S\n[PROOFSTEP]\nclassical\nsimp only [rootSet, ← Finset.mem_coe]\nrw [Polynomial.map_prod, roots_prod, Finset.bind_toFinset, s.val_toFinset, Finset.coe_biUnion]\nrwa [← Polynomial.map_prod, Ne, map_eq_zero]\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝³ : Field R\np q : R[X]\ninst✝² : CommRing S\ninst✝¹ : IsDomain S\ninst✝ : Algebra R S\nι : Type u_1\nf : ι → R[X]\ns : Finset ι\nh : Finset.prod s f ≠ 0\n⊢ rootSet (Finset.prod s f) S = ⋃ (i : ι) (_ : i ∈ s), rootSet (f i) S\n[PROOFSTEP]\nsimp only [rootSet, ← Finset.mem_coe]\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝³ : Field R\np q : R[X]\ninst✝² : CommRing S\ninst✝¹ : IsDomain S\ninst✝ : Algebra R S\nι : Type u_1\nf : ι → R[X]\ns : Finset ι\nh : Finset.prod s f ≠ 0\n⊢ ↑(Multiset.toFinset (roots (map (algebraMap R S) (Finset.prod s f)))) =\n    ⋃ (i : ι) (_ : i ∈ ↑s), ↑(Multiset.toFinset (roots (map (algebraMap R S) (f i))))\n[PROOFSTEP]\nrw [Polynomial.map_prod, roots_prod, Finset.bind_toFinset, s.val_toFinset, Finset.coe_biUnion]\n[GOAL]\ncase a\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝³ : Field R\np q : R[X]\ninst✝² : CommRing S\ninst✝¹ : IsDomain S\ninst✝ : Algebra R S\nι : Type u_1\nf : ι → R[X]\ns : Finset ι\nh : Finset.prod s f ≠ 0\n⊢ ∏ i in s, map (algebraMap R S) (f i) ≠ 0\n[PROOFSTEP]\nrwa [← Polynomial.map_prod, Ne, map_eq_zero]\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Field R\np q : R[X]\nh : degree p = 1\n⊢ IsRoot p (-(coeff p 0 / coeff p 1))\n[PROOFSTEP]\nhave : p.coeff 1 ≠ 0 := by\n  have h' := natDegree_eq_of_degree_eq_some h\n  change natDegree p = 1 at h' ; rw [← h']\n  exact mt leadingCoeff_eq_zero.1 fun h0 => by simp [h0] at h \n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Field R\np q : R[X]\nh : degree p = 1\n⊢ coeff p 1 ≠ 0\n[PROOFSTEP]\nhave h' := natDegree_eq_of_degree_eq_some h\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Field R\np q : R[X]\nh : degree p = 1\nh' : natDegree p = One.one\n⊢ coeff p 1 ≠ 0\n[PROOFSTEP]\nchange natDegree p = 1 at h' \n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Field R\np q : R[X]\nh : degree p = 1\nh' : natDegree p = 1\n⊢ coeff p 1 ≠ 0\n[PROOFSTEP]\nrw [← h']\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Field R\np q : R[X]\nh : degree p = 1\nh' : natDegree p = 1\n⊢ coeff p (natDegree p) ≠ 0\n[PROOFSTEP]\nexact mt leadingCoeff_eq_zero.1 fun h0 => by simp [h0] at h \n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Field R\np q : R[X]\nh : degree p = 1\nh' : natDegree p = 1\nh0 : p = 0\n⊢ False\n[PROOFSTEP]\nsimp [h0] at h \n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Field R\np q : R[X]\nh : degree p = 1\nthis : coeff p 1 ≠ 0\n⊢ IsRoot p (-(coeff p 0 / coeff p 1))\n[PROOFSTEP]\nconv in p => rw [eq_X_add_C_of_degree_le_one (show degree p ≤ 1 by rw [h])]\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Field R\np q : R[X]\nh : degree p = 1\nthis : coeff p 1 ≠ 0\n| p\n[PROOFSTEP]\nrw [eq_X_add_C_of_degree_le_one (show degree p ≤ 1 by rw [h])]\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Field R\np q : R[X]\nh : degree p = 1\nthis : coeff p 1 ≠ 0\n| p\n[PROOFSTEP]\nrw [eq_X_add_C_of_degree_le_one (show degree p ≤ 1 by rw [h])]\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Field R\np q : R[X]\nh : degree p = 1\nthis : coeff p 1 ≠ 0\n| p\n[PROOFSTEP]\nrw [eq_X_add_C_of_degree_le_one (show degree p ≤ 1 by rw [h])]\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Field R\np q : R[X]\nh : degree p = 1\nthis : coeff p 1 ≠ 0\n⊢ degree p ≤ 1\n[PROOFSTEP]\nrw [h]\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Field R\np q : R[X]\nh : degree p = 1\nthis : coeff p 1 ≠ 0\n⊢ IsRoot (↑C (coeff p 1) * X + ↑C (coeff p 0)) (-(coeff p 0 / coeff p 1))\n[PROOFSTEP]\nsimp [IsRoot, mul_div_cancel' _ this]\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝ : Field R\np q : R[X]\nu : R[X]ˣ\nn : ℕ\n⊢ (coeff (↑u) n)⁻¹ = coeff (↑u⁻¹) n\n[PROOFSTEP]\nrw [eq_C_of_degree_eq_zero (degree_coe_units u), eq_C_of_degree_eq_zero (degree_coe_units u⁻¹), coeff_C, coeff_C,\n  inv_eq_one_div]\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝ : Field R\np q : R[X]\nu : R[X]ˣ\nn : ℕ\n⊢ (1 / if n = 0 then coeff (↑u) 0 else 0) = if n = 0 then coeff (↑u⁻¹) 0 else 0\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝ : Field R\np q : R[X]\nu : R[X]ˣ\nn : ℕ\nh✝ : n = 0\n⊢ 1 / coeff (↑u) 0 = coeff (↑u⁻¹) 0\n[PROOFSTEP]\nrw [div_eq_iff_mul_eq (coeff_coe_units_zero_ne_zero u), coeff_zero_eq_eval_zero, coeff_zero_eq_eval_zero, ← eval_mul, ←\n  Units.val_mul, inv_mul_self]\n[GOAL]\ncase pos\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝ : Field R\np q : R[X]\nu : R[X]ˣ\nn : ℕ\nh✝ : n = 0\n⊢ eval 0 ↑1 = 1\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn✝ : ℕ\ninst✝ : Field R\np q : R[X]\nu : R[X]ˣ\nn : ℕ\nh✝ : ¬n = 0\n⊢ 1 / 0 = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝¹ : Field R\np q : R[X]\ninst✝ : DecidableEq R\nhp0 : p ≠ 0\n⊢ Monic (↑normalize p)\n[PROOFSTEP]\nrw [Ne.def, ← leadingCoeff_eq_zero, ← Ne.def, ← isUnit_iff_ne_zero] at hp0 \n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝¹ : Field R\np q : R[X]\ninst✝ : DecidableEq R\nhp0 : IsUnit (leadingCoeff p)\n⊢ Monic (↑normalize p)\n[PROOFSTEP]\nrw [Monic, leadingCoeff_normalize, normalize_eq_one]\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝¹ : Field R\np q : R[X]\ninst✝ : DecidableEq R\nhp0 : IsUnit (leadingCoeff p)\n⊢ IsUnit (leadingCoeff p)\n[PROOFSTEP]\napply hp0\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Field R\np q : R[X]\nhpq : degree q ≤ degree p\n⊢ leadingCoeff (p / q) = leadingCoeff p / leadingCoeff q\n[PROOFSTEP]\nby_cases hq : q = 0\n[GOAL]\ncase pos\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Field R\np q : R[X]\nhpq : degree q ≤ degree p\nhq : q = 0\n⊢ leadingCoeff (p / q) = leadingCoeff p / leadingCoeff q\n[PROOFSTEP]\nsimp [hq]\n[GOAL]\ncase neg\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Field R\np q : R[X]\nhpq : degree q ≤ degree p\nhq : ¬q = 0\n⊢ leadingCoeff (p / q) = leadingCoeff p / leadingCoeff q\n[PROOFSTEP]\nrw [div_def, leadingCoeff_mul, leadingCoeff_C, leadingCoeff_divByMonic_of_monic (monic_mul_leadingCoeff_inv hq) _,\n  mul_comm, div_eq_mul_inv]\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Field R\np q : R[X]\nhpq : degree q ≤ degree p\nhq : ¬q = 0\n⊢ degree (q * ↑C (leadingCoeff q)⁻¹) ≤ degree p\n[PROOFSTEP]\nrwa [degree_mul_leadingCoeff_inv q hq]\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Field R\np q : R[X]\n⊢ p / (↑C a * q) = ↑C a⁻¹ * (p / q)\n[PROOFSTEP]\nby_cases ha : a = 0\n[GOAL]\ncase pos\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Field R\np q : R[X]\nha : a = 0\n⊢ p / (↑C a * q) = ↑C a⁻¹ * (p / q)\n[PROOFSTEP]\nsimp [ha]\n[GOAL]\ncase neg\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Field R\np q : R[X]\nha : ¬a = 0\n⊢ p / (↑C a * q) = ↑C a⁻¹ * (p / q)\n[PROOFSTEP]\nsimp only [div_def, leadingCoeff_mul, mul_inv, leadingCoeff_C, C.map_mul, mul_assoc]\n[GOAL]\ncase neg\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Field R\np q : R[X]\nha : ¬a = 0\n⊢ ↑C a⁻¹ * (↑C (leadingCoeff q)⁻¹ * (p /ₘ (↑C a * (q * (↑C a⁻¹ * ↑C (leadingCoeff q)⁻¹))))) =\n    ↑C a⁻¹ * (↑C (leadingCoeff q)⁻¹ * (p /ₘ (q * ↑C (leadingCoeff q)⁻¹)))\n[PROOFSTEP]\ncongr 3\n[GOAL]\ncase neg.e_a.e_a.e_q\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Field R\np q : R[X]\nha : ¬a = 0\n⊢ ↑C a * (q * (↑C a⁻¹ * ↑C (leadingCoeff q)⁻¹)) = q * ↑C (leadingCoeff q)⁻¹\n[PROOFSTEP]\nrw [mul_left_comm q, ← mul_assoc, ← C.map_mul, mul_inv_cancel ha, C.map_one, one_mul]\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Field R\np q : R[X]\nha : a ≠ 0\nx✝ : p ∣ q\nr : R[X]\nhr : q = p * r\n⊢ q = ↑C a * p * (↑C a⁻¹ * r)\n[PROOFSTEP]\nrw [mul_assoc, mul_left_comm p, ← mul_assoc, ← C.map_mul, _root_.mul_inv_cancel ha, C.map_one, one_mul, hr]\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Field R\np q : R[X]\nha : a ≠ 0\nx✝ : p ∣ ↑C a * q\nr : R[X]\nhr : ↑C a * q = p * r\n⊢ q = p * (↑C a⁻¹ * r)\n[PROOFSTEP]\nrw [mul_left_comm p, ← hr, ← mul_assoc, ← C.map_mul, _root_.inv_mul_cancel ha, C.map_one, one_mul]\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝¹ : Field R\np q : R[X]\ninst✝ : DecidableEq R\nhp : p ≠ 0\n⊢ ↑(normUnit p) = ↑C (leadingCoeff p)⁻¹\n[PROOFSTEP]\nhave : p.leadingCoeff ≠ 0 := mt leadingCoeff_eq_zero.mp hp\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝¹ : Field R\np q : R[X]\ninst✝ : DecidableEq R\nhp : p ≠ 0\nthis : leadingCoeff p ≠ 0\n⊢ ↑(normUnit p) = ↑C (leadingCoeff p)⁻¹\n[PROOFSTEP]\nsimp [CommGroupWithZero.coe_normUnit _ this]\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝¹ : Field R\np q : R[X]\ninst✝ : DecidableEq R\nh : Monic p\n⊢ ↑normalize p = p\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝¹ : Field R\np q : R[X]\ninst✝ : Field k\nf : R →+* k\nx y : R[X]\n⊢ map f x ∣ map f y ↔ x ∣ y\n[PROOFSTEP]\nby_cases H : x = 0\n[GOAL]\ncase pos\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝¹ : Field R\np q : R[X]\ninst✝ : Field k\nf : R →+* k\nx y : R[X]\nH : x = 0\n⊢ map f x ∣ map f y ↔ x ∣ y\n[PROOFSTEP]\nrw [H, Polynomial.map_zero, zero_dvd_iff, zero_dvd_iff, map_eq_zero]\n[GOAL]\ncase neg\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝¹ : Field R\np q : R[X]\ninst✝ : Field k\nf : R →+* k\nx y : R[X]\nH : ¬x = 0\n⊢ map f x ∣ map f y ↔ x ∣ y\n[PROOFSTEP]\nclassical rw [← normalize_dvd_iff, ← @normalize_dvd_iff R[X], normalize_apply, normalize_apply,\n  coe_normUnit_of_ne_zero H, coe_normUnit_of_ne_zero (mt (map_eq_zero f).1 H), leadingCoeff_map, ← map_inv₀ f, ← map_C,\n  ← Polynomial.map_mul, map_dvd_map _ f.injective (monic_mul_leadingCoeff_inv H)]\n[GOAL]\ncase neg\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝¹ : Field R\np q : R[X]\ninst✝ : Field k\nf : R →+* k\nx y : R[X]\nH : ¬x = 0\n⊢ map f x ∣ map f y ↔ x ∣ y\n[PROOFSTEP]\nrw [← normalize_dvd_iff, ← @normalize_dvd_iff R[X], normalize_apply, normalize_apply, coe_normUnit_of_ne_zero H,\n  coe_normUnit_of_ne_zero (mt (map_eq_zero f).1 H), leadingCoeff_map, ← map_inv₀ f, ← map_C, ← Polynomial.map_mul,\n  map_dvd_map _ f.injective (monic_mul_leadingCoeff_inv H)]\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝¹ : Field R\np q : R[X]\ninst✝ : DecidableEq R\n⊢ degree (↑normalize p) = degree p\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Field R\np q : R[X]\nhp1 : degree p = 1\n⊢ Prime p\n[PROOFSTEP]\nclassical\nhave : Prime (normalize p) :=\n  Monic.prime_of_degree_eq_one (hp1 ▸ degree_normalize) (monic_normalize fun hp0 => absurd hp1 (hp0.symm ▸ by simp))\nexact (normalize_associated _).prime this\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Field R\np q : R[X]\nhp1 : degree p = 1\n⊢ Prime p\n[PROOFSTEP]\nhave : Prime (normalize p) :=\n  Monic.prime_of_degree_eq_one (hp1 ▸ degree_normalize) (monic_normalize fun hp0 => absurd hp1 (hp0.symm ▸ by simp))\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Field R\np q : R[X]\nhp1 : degree p = 1\nhp0 : p = 0\n⊢ ¬degree 0 = 1\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Field R\np q : R[X]\nhp1 : degree p = 1\nthis : Prime (↑normalize p)\n⊢ Prime p\n[PROOFSTEP]\nexact (normalize_associated _).prime this\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Field R\np q : R[X]\nx : R\n⊢ ¬Irreducible (↑C x)\n[PROOFSTEP]\nby_cases H : x = 0\n[GOAL]\ncase pos\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Field R\np q : R[X]\nx : R\nH : x = 0\n⊢ ¬Irreducible (↑C x)\n[PROOFSTEP]\nrw [H, C_0]\n[GOAL]\ncase pos\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Field R\np q : R[X]\nx : R\nH : x = 0\n⊢ ¬Irreducible 0\n[PROOFSTEP]\nexact not_irreducible_zero\n[GOAL]\ncase neg\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na b : R\nn : ℕ\ninst✝ : Field R\np q : R[X]\nx : R\nH : ¬x = 0\n⊢ ¬Irreducible (↑C x)\n[PROOFSTEP]\nexact fun hx => Irreducible.not_unit hx <| isUnit_C.2 <| isUnit_iff_ne_zero.2 H\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na✝ b : R\nn : ℕ\ninst✝¹ : Field R\np q : R[X]\nK : Type u_1\ninst✝ : Field K\nf : K[X]\na : K\n⊢ (X - ↑C a) * (f /ₘ (X - ↑C a)) = f - f %ₘ (X - ↑C a)\n[PROOFSTEP]\nrw [eq_sub_iff_add_eq, ← eq_sub_iff_add_eq', modByMonic_eq_sub_mul_div]\n[GOAL]\ncase _hq\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na✝ b : R\nn : ℕ\ninst✝¹ : Field R\np q : R[X]\nK : Type u_1\ninst✝ : Field K\nf : K[X]\na : K\n⊢ Monic (X - ↑C a)\n[PROOFSTEP]\nexact monic_X_sub_C a\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na✝ b : R\nn : ℕ\ninst✝¹ : Field R\np q : R[X]\nK : Type u_1\ninst✝ : Field K\nf : K[X]\na : K\n⊢ f /ₘ (X - ↑C a) + (X - ↑C a) * ↑derivative (f /ₘ (X - ↑C a)) = ↑derivative f\n[PROOFSTEP]\nhave key := by apply congrArg derivative <| X_sub_C_mul_divByMonic_eq_sub_modByMonic f a\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na✝ b : R\nn : ℕ\ninst✝¹ : Field R\np q : R[X]\nK : Type u_1\ninst✝ : Field K\nf : K[X]\na : K\n⊢ ?m.1574688\n[PROOFSTEP]\napply congrArg derivative <| X_sub_C_mul_divByMonic_eq_sub_modByMonic f a\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na✝ b : R\nn : ℕ\ninst✝¹ : Field R\np q : R[X]\nK : Type u_1\ninst✝ : Field K\nf : K[X]\na : K\nkey : ↑derivative ((X - ↑C a) * (f /ₘ (X - ↑C a))) = ↑derivative (f - f %ₘ (X - ↑C a))\n⊢ f /ₘ (X - ↑C a) + (X - ↑C a) * ↑derivative (f /ₘ (X - ↑C a)) = ↑derivative f\n[PROOFSTEP]\nrw [modByMonic_X_sub_C_eq_C_eval] at key \n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na✝ b : R\nn : ℕ\ninst✝¹ : Field R\np q : R[X]\nK : Type u_1\ninst✝ : Field K\nf : K[X]\na : K\nkey : ↑derivative ((X - ↑C a) * (f /ₘ (X - ↑C a))) = ↑derivative (f - ↑C (eval a f))\n⊢ f /ₘ (X - ↑C a) + (X - ↑C a) * ↑derivative (f /ₘ (X - ↑C a)) = ↑derivative f\n[PROOFSTEP]\nrw [derivative_mul, derivative_sub, derivative_X, derivative_sub] at key \n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na✝ b : R\nn : ℕ\ninst✝¹ : Field R\np q : R[X]\nK : Type u_1\ninst✝ : Field K\nf : K[X]\na : K\nkey :\n  (1 - ↑derivative (↑C a)) * (f /ₘ (X - ↑C a)) + (X - ↑C a) * ↑derivative (f /ₘ (X - ↑C a)) =\n    ↑derivative f - ↑derivative (↑C (eval a f))\n⊢ f /ₘ (X - ↑C a) + (X - ↑C a) * ↑derivative (f /ₘ (X - ↑C a)) = ↑derivative f\n[PROOFSTEP]\nrw [derivative_C, sub_zero, one_mul] at key \n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na✝ b : R\nn : ℕ\ninst✝¹ : Field R\np q : R[X]\nK : Type u_1\ninst✝ : Field K\nf : K[X]\na : K\nkey : f /ₘ (X - ↑C a) + (X - ↑C a) * ↑derivative (f /ₘ (X - ↑C a)) = ↑derivative f - ↑derivative (↑C (eval a f))\n⊢ f /ₘ (X - ↑C a) + (X - ↑C a) * ↑derivative (f /ₘ (X - ↑C a)) = ↑derivative f\n[PROOFSTEP]\nrw [derivative_C, sub_zero] at key \n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na✝ b : R\nn : ℕ\ninst✝¹ : Field R\np q : R[X]\nK : Type u_1\ninst✝ : Field K\nf : K[X]\na : K\nkey : f /ₘ (X - ↑C a) + (X - ↑C a) * ↑derivative (f /ₘ (X - ↑C a)) = ↑derivative f\n⊢ f /ₘ (X - ↑C a) + (X - ↑C a) * ↑derivative (f /ₘ (X - ↑C a)) = ↑derivative f\n[PROOFSTEP]\nassumption\n  /- Porting note: factored out another have statement from\n  isCoprime_of_is_root_of_eval_derivative_ne_zero because the original proof was timing out -/\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na✝ b : R\nn : ℕ\ninst✝¹ : Field R\np q : R[X]\nK : Type u_1\ninst✝ : Field K\nf : K[X]\na : K\nhf : X - ↑C a ∣ f /ₘ (X - ↑C a)\n⊢ X - ↑C a ∣ ↑derivative f\n[PROOFSTEP]\nhave key := divByMonic_add_X_sub_C_mul_derivate_divByMonic_eq_derivative f a\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na✝ b : R\nn : ℕ\ninst✝¹ : Field R\np q : R[X]\nK : Type u_1\ninst✝ : Field K\nf : K[X]\na : K\nhf : X - ↑C a ∣ f /ₘ (X - ↑C a)\nkey : f /ₘ (X - ↑C a) + (X - ↑C a) * ↑derivative (f /ₘ (X - ↑C a)) = ↑derivative f\n⊢ X - ↑C a ∣ ↑derivative f\n[PROOFSTEP]\nhave ⟨u, hu⟩ := hf\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na✝ b : R\nn : ℕ\ninst✝¹ : Field R\np q : R[X]\nK : Type u_1\ninst✝ : Field K\nf : K[X]\na : K\nhf : X - ↑C a ∣ f /ₘ (X - ↑C a)\nkey : f /ₘ (X - ↑C a) + (X - ↑C a) * ↑derivative (f /ₘ (X - ↑C a)) = ↑derivative f\nu : K[X]\nhu : f /ₘ (X - ↑C a) = (X - ↑C a) * u\n⊢ X - ↑C a ∣ ↑derivative f\n[PROOFSTEP]\nrw [← key, hu, ← mul_add (X - C a) u _]\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na✝ b : R\nn : ℕ\ninst✝¹ : Field R\np q : R[X]\nK : Type u_1\ninst✝ : Field K\nf : K[X]\na : K\nhf : X - ↑C a ∣ f /ₘ (X - ↑C a)\nkey : f /ₘ (X - ↑C a) + (X - ↑C a) * ↑derivative (f /ₘ (X - ↑C a)) = ↑derivative f\nu : K[X]\nhu : f /ₘ (X - ↑C a) = (X - ↑C a) * u\n⊢ X - ↑C a ∣ (X - ↑C a) * (u + ↑derivative ((X - ↑C a) * u))\n[PROOFSTEP]\nuse(u + derivative ((X - C a) * u))\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na✝ b : R\nn : ℕ\ninst✝¹ : Field R\np q : R[X]\nK : Type u_1\ninst✝ : Field K\nf : K[X]\na : K\nhf' : eval a (↑derivative f) ≠ 0\n⊢ IsCoprime (X - ↑C a) (f /ₘ (X - ↑C a))\n[PROOFSTEP]\nclassical\nrefine\n  Or.resolve_left\n    (EuclideanDomain.dvd_or_coprime (X - C a) (f /ₘ (X - C a))\n      (irreducible_of_degree_eq_one (Polynomial.degree_X_sub_C a)))\n    ?_\ncontrapose! hf' with h\nhave : X - C a ∣ derivative f := X_sub_C_dvd_derivative_of_X_sub_C_dvd_divByMonic f h\nrw [← dvd_iff_modByMonic_eq_zero (monic_X_sub_C _), modByMonic_X_sub_C_eq_C_eval] at this \nrwa [← C_inj, C_0]\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na✝ b : R\nn : ℕ\ninst✝¹ : Field R\np q : R[X]\nK : Type u_1\ninst✝ : Field K\nf : K[X]\na : K\nhf' : eval a (↑derivative f) ≠ 0\n⊢ IsCoprime (X - ↑C a) (f /ₘ (X - ↑C a))\n[PROOFSTEP]\nrefine\n  Or.resolve_left\n    (EuclideanDomain.dvd_or_coprime (X - C a) (f /ₘ (X - C a))\n      (irreducible_of_degree_eq_one (Polynomial.degree_X_sub_C a)))\n    ?_\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na✝ b : R\nn : ℕ\ninst✝¹ : Field R\np q : R[X]\nK : Type u_1\ninst✝ : Field K\nf : K[X]\na : K\nhf' : eval a (↑derivative f) ≠ 0\n⊢ ¬X - ↑C a ∣ f /ₘ (X - ↑C a)\n[PROOFSTEP]\ncontrapose! hf' with h\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na✝ b : R\nn : ℕ\ninst✝¹ : Field R\np q : R[X]\nK : Type u_1\ninst✝ : Field K\nf : K[X]\na : K\nh : X - ↑C a ∣ f /ₘ (X - ↑C a)\n⊢ eval a (↑derivative f) = 0\n[PROOFSTEP]\nhave : X - C a ∣ derivative f := X_sub_C_dvd_derivative_of_X_sub_C_dvd_divByMonic f h\n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na✝ b : R\nn : ℕ\ninst✝¹ : Field R\np q : R[X]\nK : Type u_1\ninst✝ : Field K\nf : K[X]\na : K\nh : X - ↑C a ∣ f /ₘ (X - ↑C a)\nthis : X - ↑C a ∣ ↑derivative f\n⊢ eval a (↑derivative f) = 0\n[PROOFSTEP]\nrw [← dvd_iff_modByMonic_eq_zero (monic_X_sub_C _), modByMonic_X_sub_C_eq_C_eval] at this \n[GOAL]\nR : Type u\nS : Type v\nk : Type y\nA : Type z\na✝ b : R\nn : ℕ\ninst✝¹ : Field R\np q : R[X]\nK : Type u_1\ninst✝ : Field K\nf : K[X]\na : K\nh : X - ↑C a ∣ f /ₘ (X - ↑C a)\nthis : ↑C (eval a (↑derivative f)) = 0\n⊢ eval a (↑derivative f) = 0\n[PROOFSTEP]\nrwa [← C_inj, C_0]\n", "meta": {"mathlib_filename": "Mathlib.Data.Polynomial.FieldDivision", "llama_tokens": 31271, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7956581000631541, "lm_q2_score": 0.6619228691808011, "lm_q1q2_score": 0.5266642924807479}}
{"text": "[GOAL]\nR : Type u_1\nS : Type u_2\nι : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : IsDomain R\ninst✝⁸ : IsPrincipalIdealRing R\ninst✝⁷ : CommRing S\ninst✝⁶ : IsDomain S\ninst✝⁵ : Algebra R S\nF : Type u_4\ninst✝⁴ : CommRing F\ninst✝³ : Algebra F R\ninst✝² : Algebra F S\ninst✝¹ : IsScalarTower F R S\ninst✝ : Fintype ι\nb : Basis ι R S\nf : S\nhf : f ≠ 0\n⊢ Associated (↑(Algebra.norm R) f) (∏ i : ι, smithCoeffs b (span {f}) (_ : ¬span {f} = ⊥) i)\n[PROOFSTEP]\nhave hI := span_singleton_eq_bot.not.2 hf\n[GOAL]\nR : Type u_1\nS : Type u_2\nι : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : IsDomain R\ninst✝⁸ : IsPrincipalIdealRing R\ninst✝⁷ : CommRing S\ninst✝⁶ : IsDomain S\ninst✝⁵ : Algebra R S\nF : Type u_4\ninst✝⁴ : CommRing F\ninst✝³ : Algebra F R\ninst✝² : Algebra F S\ninst✝¹ : IsScalarTower F R S\ninst✝ : Fintype ι\nb : Basis ι R S\nf : S\nhf : f ≠ 0\nhI : ¬span {f} = ⊥\n⊢ Associated (↑(Algebra.norm R) f) (∏ i : ι, smithCoeffs b (span {f}) (_ : ¬span {f} = ⊥) i)\n[PROOFSTEP]\nlet b' := ringBasis b (span { f }) hI\n[GOAL]\nR : Type u_1\nS : Type u_2\nι : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : IsDomain R\ninst✝⁸ : IsPrincipalIdealRing R\ninst✝⁷ : CommRing S\ninst✝⁶ : IsDomain S\ninst✝⁵ : Algebra R S\nF : Type u_4\ninst✝⁴ : CommRing F\ninst✝³ : Algebra F R\ninst✝² : Algebra F S\ninst✝¹ : IsScalarTower F R S\ninst✝ : Fintype ι\nb : Basis ι R S\nf : S\nhf : f ≠ 0\nhI : ¬span {f} = ⊥\nb' : Basis ι R S := ringBasis b (span {f}) hI\n⊢ Associated (↑(Algebra.norm R) f) (∏ i : ι, smithCoeffs b (span {f}) (_ : ¬span {f} = ⊥) i)\n[PROOFSTEP]\nclassical\nrw [← Matrix.det_diagonal, ← LinearMap.det_toLin b']\nlet e := (b'.equiv ((span { f }).selfBasis b hI) <| Equiv.refl _).trans ((LinearEquiv.coord S S f hf).restrictScalars R)\nrefine (LinearMap.associated_det_of_eq_comp e _ _ ?_).symm\ndsimp only [LinearEquiv.trans_apply]\nsimp_rw [← LinearEquiv.coe_toLinearMap, ← LinearMap.comp_apply, ← LinearMap.ext_iff]\nrefine b'.ext fun i => ?_\nsimp_rw [LinearMap.comp_apply, LinearEquiv.coe_toLinearMap, Matrix.toLin_apply, Basis.repr_self,\n  Finsupp.single_eq_pi_single, Matrix.diagonal_mulVec_single, Pi.single_apply, ite_smul, zero_smul, Finset.sum_ite_eq',\n  mul_one, if_pos (Finset.mem_univ _), b'.equiv_apply]\nchange _ = f * _\nrw [mul_comm, ← smul_eq_mul, LinearEquiv.restrictScalars_apply, LinearEquiv.coord_apply_smul, Ideal.selfBasis_def]\nrfl\n[GOAL]\nR : Type u_1\nS : Type u_2\nι : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : IsDomain R\ninst✝⁸ : IsPrincipalIdealRing R\ninst✝⁷ : CommRing S\ninst✝⁶ : IsDomain S\ninst✝⁵ : Algebra R S\nF : Type u_4\ninst✝⁴ : CommRing F\ninst✝³ : Algebra F R\ninst✝² : Algebra F S\ninst✝¹ : IsScalarTower F R S\ninst✝ : Fintype ι\nb : Basis ι R S\nf : S\nhf : f ≠ 0\nhI : ¬span {f} = ⊥\nb' : Basis ι R S := ringBasis b (span {f}) hI\n⊢ Associated (↑(Algebra.norm R) f) (∏ i : ι, smithCoeffs b (span {f}) (_ : ¬span {f} = ⊥) i)\n[PROOFSTEP]\nrw [← Matrix.det_diagonal, ← LinearMap.det_toLin b']\n[GOAL]\nR : Type u_1\nS : Type u_2\nι : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : IsDomain R\ninst✝⁸ : IsPrincipalIdealRing R\ninst✝⁷ : CommRing S\ninst✝⁶ : IsDomain S\ninst✝⁵ : Algebra R S\nF : Type u_4\ninst✝⁴ : CommRing F\ninst✝³ : Algebra F R\ninst✝² : Algebra F S\ninst✝¹ : IsScalarTower F R S\ninst✝ : Fintype ι\nb : Basis ι R S\nf : S\nhf : f ≠ 0\nhI : ¬span {f} = ⊥\nb' : Basis ι R S := ringBasis b (span {f}) hI\n⊢ Associated (↑(Algebra.norm R) f)\n    (↑LinearMap.det (↑(Matrix.toLin b' b') (Matrix.diagonal fun i => smithCoeffs b (span {f}) (_ : ¬span {f} = ⊥) i)))\n[PROOFSTEP]\nlet e := (b'.equiv ((span { f }).selfBasis b hI) <| Equiv.refl _).trans ((LinearEquiv.coord S S f hf).restrictScalars R)\n[GOAL]\nR : Type u_1\nS : Type u_2\nι : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : IsDomain R\ninst✝⁸ : IsPrincipalIdealRing R\ninst✝⁷ : CommRing S\ninst✝⁶ : IsDomain S\ninst✝⁵ : Algebra R S\nF : Type u_4\ninst✝⁴ : CommRing F\ninst✝³ : Algebra F R\ninst✝² : Algebra F S\ninst✝¹ : IsScalarTower F R S\ninst✝ : Fintype ι\nb : Basis ι R S\nf : S\nhf : f ≠ 0\nhI : ¬span {f} = ⊥\nb' : Basis ι R S := ringBasis b (span {f}) hI\ne : S ≃ₗ[R] S :=\n  LinearEquiv.trans (Basis.equiv b' (selfBasis b (span {f}) hI) (Equiv.refl ι))\n    (LinearEquiv.restrictScalars R (LinearEquiv.coord S S f hf))\n⊢ Associated (↑(Algebra.norm R) f)\n    (↑LinearMap.det (↑(Matrix.toLin b' b') (Matrix.diagonal fun i => smithCoeffs b (span {f}) (_ : ¬span {f} = ⊥) i)))\n[PROOFSTEP]\nrefine (LinearMap.associated_det_of_eq_comp e _ _ ?_).symm\n[GOAL]\nR : Type u_1\nS : Type u_2\nι : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : IsDomain R\ninst✝⁸ : IsPrincipalIdealRing R\ninst✝⁷ : CommRing S\ninst✝⁶ : IsDomain S\ninst✝⁵ : Algebra R S\nF : Type u_4\ninst✝⁴ : CommRing F\ninst✝³ : Algebra F R\ninst✝² : Algebra F S\ninst✝¹ : IsScalarTower F R S\ninst✝ : Fintype ι\nb : Basis ι R S\nf : S\nhf : f ≠ 0\nhI : ¬span {f} = ⊥\nb' : Basis ι R S := ringBasis b (span {f}) hI\ne : S ≃ₗ[R] S :=\n  LinearEquiv.trans (Basis.equiv b' (selfBasis b (span {f}) hI) (Equiv.refl ι))\n    (LinearEquiv.restrictScalars R (LinearEquiv.coord S S f hf))\n⊢ ∀ (x : S),\n    ↑(↑(Matrix.toLin b' b') (Matrix.diagonal fun i => smithCoeffs b (span {f}) (_ : ¬span {f} = ⊥) i)) x =\n      ↑(↑↑↑(Algebra.lmul R S) f) (↑e x)\n[PROOFSTEP]\ndsimp only [LinearEquiv.trans_apply]\n[GOAL]\nR : Type u_1\nS : Type u_2\nι : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : IsDomain R\ninst✝⁸ : IsPrincipalIdealRing R\ninst✝⁷ : CommRing S\ninst✝⁶ : IsDomain S\ninst✝⁵ : Algebra R S\nF : Type u_4\ninst✝⁴ : CommRing F\ninst✝³ : Algebra F R\ninst✝² : Algebra F S\ninst✝¹ : IsScalarTower F R S\ninst✝ : Fintype ι\nb : Basis ι R S\nf : S\nhf : f ≠ 0\nhI : ¬span {f} = ⊥\nb' : Basis ι R S := ringBasis b (span {f}) hI\ne : S ≃ₗ[R] S :=\n  LinearEquiv.trans (Basis.equiv b' (selfBasis b (span {f}) hI) (Equiv.refl ι))\n    (LinearEquiv.restrictScalars R (LinearEquiv.coord S S f hf))\n⊢ ∀ (x : S),\n    ↑(↑(Matrix.toLin (ringBasis b (span {f}) hI) (ringBasis b (span {f}) hI))\n            (Matrix.diagonal fun i => smithCoeffs b (span {f}) (_ : ¬span {f} = ⊥) i))\n        x =\n      ↑(↑↑↑(Algebra.lmul R S) f)\n        (↑(LinearEquiv.restrictScalars R (LinearEquiv.coord S S f hf))\n          (↑(Basis.equiv (ringBasis b (span {f}) hI) (selfBasis b (span {f}) hI) (Equiv.refl ι)) x))\n[PROOFSTEP]\nsimp_rw [← LinearEquiv.coe_toLinearMap, ← LinearMap.comp_apply, ← LinearMap.ext_iff]\n[GOAL]\nR : Type u_1\nS : Type u_2\nι : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : IsDomain R\ninst✝⁸ : IsPrincipalIdealRing R\ninst✝⁷ : CommRing S\ninst✝⁶ : IsDomain S\ninst✝⁵ : Algebra R S\nF : Type u_4\ninst✝⁴ : CommRing F\ninst✝³ : Algebra F R\ninst✝² : Algebra F S\ninst✝¹ : IsScalarTower F R S\ninst✝ : Fintype ι\nb : Basis ι R S\nf : S\nhf : f ≠ 0\nhI : ¬span {f} = ⊥\nb' : Basis ι R S := ringBasis b (span {f}) hI\ne : S ≃ₗ[R] S :=\n  LinearEquiv.trans (Basis.equiv b' (selfBasis b (span {f}) hI) (Equiv.refl ι))\n    (LinearEquiv.restrictScalars R (LinearEquiv.coord S S f hf))\n⊢ ↑↑(Matrix.toLin (ringBasis b (span {f}) hI) (ringBasis b (span {f}) hI))\n      (Matrix.diagonal fun i => smithCoeffs b (span {f}) (_ : ¬span {f} = ⊥) i) =\n    LinearMap.comp (↑↑↑(Algebra.lmul R S) f)\n      (LinearMap.comp ↑(LinearEquiv.restrictScalars R (LinearEquiv.coord S S f hf))\n        ↑(Basis.equiv (ringBasis b (span {f}) hI) (selfBasis b (span {f}) hI) (Equiv.refl ι)))\n[PROOFSTEP]\nrefine b'.ext fun i => ?_\n[GOAL]\nR : Type u_1\nS : Type u_2\nι : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : IsDomain R\ninst✝⁸ : IsPrincipalIdealRing R\ninst✝⁷ : CommRing S\ninst✝⁶ : IsDomain S\ninst✝⁵ : Algebra R S\nF : Type u_4\ninst✝⁴ : CommRing F\ninst✝³ : Algebra F R\ninst✝² : Algebra F S\ninst✝¹ : IsScalarTower F R S\ninst✝ : Fintype ι\nb : Basis ι R S\nf : S\nhf : f ≠ 0\nhI : ¬span {f} = ⊥\nb' : Basis ι R S := ringBasis b (span {f}) hI\ne : S ≃ₗ[R] S :=\n  LinearEquiv.trans (Basis.equiv b' (selfBasis b (span {f}) hI) (Equiv.refl ι))\n    (LinearEquiv.restrictScalars R (LinearEquiv.coord S S f hf))\ni : ι\n⊢ ↑(↑↑(Matrix.toLin (ringBasis b (span {f}) hI) (ringBasis b (span {f}) hI))\n          (Matrix.diagonal fun i => smithCoeffs b (span {f}) (_ : ¬span {f} = ⊥) i))\n      (↑b' i) =\n    ↑(LinearMap.comp (↑↑↑(Algebra.lmul R S) f)\n          (LinearMap.comp ↑(LinearEquiv.restrictScalars R (LinearEquiv.coord S S f hf))\n            ↑(Basis.equiv (ringBasis b (span {f}) hI) (selfBasis b (span {f}) hI) (Equiv.refl ι))))\n      (↑b' i)\n[PROOFSTEP]\nsimp_rw [LinearMap.comp_apply, LinearEquiv.coe_toLinearMap, Matrix.toLin_apply, Basis.repr_self,\n  Finsupp.single_eq_pi_single, Matrix.diagonal_mulVec_single, Pi.single_apply, ite_smul, zero_smul, Finset.sum_ite_eq',\n  mul_one, if_pos (Finset.mem_univ _), b'.equiv_apply]\n[GOAL]\nR : Type u_1\nS : Type u_2\nι : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : IsDomain R\ninst✝⁸ : IsPrincipalIdealRing R\ninst✝⁷ : CommRing S\ninst✝⁶ : IsDomain S\ninst✝⁵ : Algebra R S\nF : Type u_4\ninst✝⁴ : CommRing F\ninst✝³ : Algebra F R\ninst✝² : Algebra F S\ninst✝¹ : IsScalarTower F R S\ninst✝ : Fintype ι\nb : Basis ι R S\nf : S\nhf : f ≠ 0\nhI : ¬span {f} = ⊥\nb' : Basis ι R S := ringBasis b (span {f}) hI\ne : S ≃ₗ[R] S :=\n  LinearEquiv.trans (Basis.equiv b' (selfBasis b (span {f}) hI) (Equiv.refl ι))\n    (LinearEquiv.restrictScalars R (LinearEquiv.coord S S f hf))\ni : ι\n⊢ smithCoeffs b (span {f}) (_ : ¬span {f} = ⊥) i • ↑(ringBasis b (span {f}) hI) i =\n    ↑(↑↑↑(Algebra.lmul R S) f)\n      (↑(LinearEquiv.restrictScalars R (LinearEquiv.coord S S f hf)) (↑(selfBasis b (span {f}) hI) (↑(Equiv.refl ι) i)))\n[PROOFSTEP]\nchange _ = f * _\n[GOAL]\nR : Type u_1\nS : Type u_2\nι : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : IsDomain R\ninst✝⁸ : IsPrincipalIdealRing R\ninst✝⁷ : CommRing S\ninst✝⁶ : IsDomain S\ninst✝⁵ : Algebra R S\nF : Type u_4\ninst✝⁴ : CommRing F\ninst✝³ : Algebra F R\ninst✝² : Algebra F S\ninst✝¹ : IsScalarTower F R S\ninst✝ : Fintype ι\nb : Basis ι R S\nf : S\nhf : f ≠ 0\nhI : ¬span {f} = ⊥\nb' : Basis ι R S := ringBasis b (span {f}) hI\ne : S ≃ₗ[R] S :=\n  LinearEquiv.trans (Basis.equiv b' (selfBasis b (span {f}) hI) (Equiv.refl ι))\n    (LinearEquiv.restrictScalars R (LinearEquiv.coord S S f hf))\ni : ι\n⊢ smithCoeffs b (span {f}) (_ : ¬span {f} = ⊥) i • ↑(ringBasis b (span {f}) hI) i =\n    f * ↑(LinearEquiv.restrictScalars R (LinearEquiv.coord S S f hf)) (↑(selfBasis b (span {f}) hI) (↑(Equiv.refl ι) i))\n[PROOFSTEP]\nrw [mul_comm, ← smul_eq_mul, LinearEquiv.restrictScalars_apply, LinearEquiv.coord_apply_smul, Ideal.selfBasis_def]\n[GOAL]\nR : Type u_1\nS : Type u_2\nι : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : IsDomain R\ninst✝⁸ : IsPrincipalIdealRing R\ninst✝⁷ : CommRing S\ninst✝⁶ : IsDomain S\ninst✝⁵ : Algebra R S\nF : Type u_4\ninst✝⁴ : CommRing F\ninst✝³ : Algebra F R\ninst✝² : Algebra F S\ninst✝¹ : IsScalarTower F R S\ninst✝ : Fintype ι\nb : Basis ι R S\nf : S\nhf : f ≠ 0\nhI : ¬span {f} = ⊥\nb' : Basis ι R S := ringBasis b (span {f}) hI\ne : S ≃ₗ[R] S :=\n  LinearEquiv.trans (Basis.equiv b' (selfBasis b (span {f}) hI) (Equiv.refl ι))\n    (LinearEquiv.restrictScalars R (LinearEquiv.coord S S f hf))\ni : ι\n⊢ smithCoeffs b (span {f}) (_ : ¬span {f} = ⊥) i • ↑(ringBasis b (span {f}) hI) i =\n    smithCoeffs b (span {f}) hI (↑(Equiv.refl ι) i) • ↑(ringBasis b (span {f}) hI) (↑(Equiv.refl ι) i)\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u_1\nS : Type u_2\nι : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : IsDomain R\ninst✝⁶ : IsPrincipalIdealRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : IsDomain S\ninst✝³ : Algebra R S\nF : Type u_4\ninst✝² : Field F\ninst✝¹ : Algebra F[X] S\ninst✝ : Finite ι\nb : Basis ι F[X] S\nI : Ideal S\nhI : I ≠ ⊥\ni : ι\n⊢ FiniteDimensional F (F[X] ⧸ span {smithCoeffs b I hI i})\n[PROOFSTEP]\nrefine PowerBasis.finiteDimensional ?_\n[GOAL]\nR : Type u_1\nS : Type u_2\nι : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : IsDomain R\ninst✝⁶ : IsPrincipalIdealRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : IsDomain S\ninst✝³ : Algebra R S\nF : Type u_4\ninst✝² : Field F\ninst✝¹ : Algebra F[X] S\ninst✝ : Finite ι\nb : Basis ι F[X] S\nI : Ideal S\nhI : I ≠ ⊥\ni : ι\n⊢ PowerBasis F (F[X] ⧸ span {smithCoeffs b I hI i})\n[PROOFSTEP]\nrefine AdjoinRoot.powerBasis ?_\n[GOAL]\nR : Type u_1\nS : Type u_2\nι : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : IsDomain R\ninst✝⁶ : IsPrincipalIdealRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : IsDomain S\ninst✝³ : Algebra R S\nF : Type u_4\ninst✝² : Field F\ninst✝¹ : Algebra F[X] S\ninst✝ : Finite ι\nb : Basis ι F[X] S\nI : Ideal S\nhI : I ≠ ⊥\ni : ι\n⊢ smithCoeffs b I hI i ≠ 0\n[PROOFSTEP]\nrefine I.smithCoeffs_ne_zero b hI i\n[GOAL]\nR : Type u_1\nS : Type u_2\nι : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : IsDomain R\ninst✝⁸ : IsPrincipalIdealRing R\ninst✝⁷ : CommRing S\ninst✝⁶ : IsDomain S\ninst✝⁵ : Algebra R S\nF : Type u_4\ninst✝⁴ : Field F\ninst✝³ : Algebra F[X] S\ninst✝² : Finite ι\ninst✝¹ : Algebra F S\ninst✝ : IsScalarTower F F[X] S\nb : Basis ι F[X] S\nf : S\nhf : f ≠ 0\n⊢ FiniteDimensional.finrank F (S ⧸ span {f}) = natDegree (↑(Algebra.norm F[X]) f)\n[PROOFSTEP]\nhaveI := Fintype.ofFinite ι\n[GOAL]\nR : Type u_1\nS : Type u_2\nι : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : IsDomain R\ninst✝⁸ : IsPrincipalIdealRing R\ninst✝⁷ : CommRing S\ninst✝⁶ : IsDomain S\ninst✝⁵ : Algebra R S\nF : Type u_4\ninst✝⁴ : Field F\ninst✝³ : Algebra F[X] S\ninst✝² : Finite ι\ninst✝¹ : Algebra F S\ninst✝ : IsScalarTower F F[X] S\nb : Basis ι F[X] S\nf : S\nhf : f ≠ 0\nthis : Fintype ι\n⊢ FiniteDimensional.finrank F (S ⧸ span {f}) = natDegree (↑(Algebra.norm F[X]) f)\n[PROOFSTEP]\nhave h := span_singleton_eq_bot.not.2 hf\n[GOAL]\nR : Type u_1\nS : Type u_2\nι : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : IsDomain R\ninst✝⁸ : IsPrincipalIdealRing R\ninst✝⁷ : CommRing S\ninst✝⁶ : IsDomain S\ninst✝⁵ : Algebra R S\nF : Type u_4\ninst✝⁴ : Field F\ninst✝³ : Algebra F[X] S\ninst✝² : Finite ι\ninst✝¹ : Algebra F S\ninst✝ : IsScalarTower F F[X] S\nb : Basis ι F[X] S\nf : S\nhf : f ≠ 0\nthis : Fintype ι\nh : ¬span {f} = ⊥\n⊢ FiniteDimensional.finrank F (S ⧸ span {f}) = natDegree (↑(Algebra.norm F[X]) f)\n[PROOFSTEP]\nrw [natDegree_eq_of_degree_eq (degree_eq_degree_of_associated <| associated_norm_prod_smith b hf)]\n[GOAL]\nR : Type u_1\nS : Type u_2\nι : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : IsDomain R\ninst✝⁸ : IsPrincipalIdealRing R\ninst✝⁷ : CommRing S\ninst✝⁶ : IsDomain S\ninst✝⁵ : Algebra R S\nF : Type u_4\ninst✝⁴ : Field F\ninst✝³ : Algebra F[X] S\ninst✝² : Finite ι\ninst✝¹ : Algebra F S\ninst✝ : IsScalarTower F F[X] S\nb : Basis ι F[X] S\nf : S\nhf : f ≠ 0\nthis : Fintype ι\nh : ¬span {f} = ⊥\n⊢ FiniteDimensional.finrank F (S ⧸ span {f}) = natDegree (∏ i : ι, smithCoeffs b (span {f}) (_ : ¬span {f} = ⊥) i)\n[PROOFSTEP]\nrw [natDegree_prod _ _ fun i _ => smithCoeffs_ne_zero b _ h i, finrank_quotient_eq_sum F h b]\n  -- finrank_quotient_eq_sum slow\n[GOAL]\nR : Type u_1\nS : Type u_2\nι : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : IsDomain R\ninst✝⁸ : IsPrincipalIdealRing R\ninst✝⁷ : CommRing S\ninst✝⁶ : IsDomain S\ninst✝⁵ : Algebra R S\nF : Type u_4\ninst✝⁴ : Field F\ninst✝³ : Algebra F[X] S\ninst✝² : Finite ι\ninst✝¹ : Algebra F S\ninst✝ : IsScalarTower F F[X] S\nb : Basis ι F[X] S\nf : S\nhf : f ≠ 0\nthis : Fintype ι\nh : ¬span {f} = ⊥\n⊢ ∑ i : ι, FiniteDimensional.finrank F (F[X] ⧸ span {smithCoeffs b (span {f}) h i}) =\n    ∑ i : ι, natDegree (smithCoeffs b (span {f}) h i)\n[PROOFSTEP]\ncongr with i\n[GOAL]\ncase e_f.h\nR : Type u_1\nS : Type u_2\nι : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : IsDomain R\ninst✝⁸ : IsPrincipalIdealRing R\ninst✝⁷ : CommRing S\ninst✝⁶ : IsDomain S\ninst✝⁵ : Algebra R S\nF : Type u_4\ninst✝⁴ : Field F\ninst✝³ : Algebra F[X] S\ninst✝² : Finite ι\ninst✝¹ : Algebra F S\ninst✝ : IsScalarTower F F[X] S\nb : Basis ι F[X] S\nf : S\nhf : f ≠ 0\nthis : Fintype ι\nh : ¬span {f} = ⊥\ni : ι\n⊢ FiniteDimensional.finrank F (F[X] ⧸ span {smithCoeffs b (span {f}) h i}) = natDegree (smithCoeffs b (span {f}) h i)\n[PROOFSTEP]\nexact (AdjoinRoot.powerBasis <| smithCoeffs_ne_zero b _ h i).finrank\n", "meta": {"mathlib_filename": "Mathlib.LinearAlgebra.FreeModule.Norm", "llama_tokens": 7851, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8311430353105599, "lm_q2_score": 0.6334102775181399, "lm_q1q2_score": 0.526454540653331}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝ : CompleteSemilatticeSup α\ns✝ t : Set α\na b : α\ns : ι → α\n⊢ a ≤ iSup s ↔ ∀ (b : α), (∀ (i : ι), s i ≤ b) → a ≤ b\n[PROOFSTEP]\nsimp [iSup, le_sSup_iff, upperBounds]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝ : CompleteSemilatticeInf α\ns✝ t : Set α\na b : α\ns : ι → α\n⊢ iInf s ≤ a ↔ ∀ (b : α), (∀ (i : ι), b ≤ s i) → b ≤ a\n[PROOFSTEP]\nsimp [iInf, sInf_le_iff, lowerBounds]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝ : CompleteSemilatticeInf α\ns t : Set α\na b : α\nh : ∀ (x : α), x ∈ s → ∃ y, y ∈ t ∧ y ≤ x\n⊢ ∀ (c : α), c ≤ sInf t → c ≤ sInf s\n[PROOFSTEP]\nsimp only [le_sInf_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝ : CompleteSemilatticeInf α\ns t : Set α\na b : α\nh : ∀ (x : α), x ∈ s → ∃ y, y ∈ t ∧ y ≤ x\n⊢ ∀ (c : α), (∀ (b : α), b ∈ t → c ≤ b) → ∀ (b : α), b ∈ s → c ≤ b\n[PROOFSTEP]\nintrov h₀ h₁\n[GOAL]\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝ : CompleteSemilatticeInf α\ns t : Set α\na b✝ : α\nh : ∀ (x : α), x ∈ s → ∃ y, y ∈ t ∧ y ≤ x\nc : α\nh₀ : ∀ (b : α), b ∈ t → c ≤ b\nb : α\nh₁ : b ∈ s\n⊢ c ≤ b\n[PROOFSTEP]\nrcases h _ h₁ with ⟨y, hy, hy'⟩\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝ : CompleteSemilatticeInf α\ns t : Set α\na b✝ : α\nh : ∀ (x : α), x ∈ s → ∃ y, y ∈ t ∧ y ≤ x\nc : α\nh₀ : ∀ (b : α), b ∈ t → c ≤ b\nb : α\nh₁ : b ∈ s\ny : α\nhy : y ∈ t\nhy' : y ≤ b\n⊢ c ≤ b\n[PROOFSTEP]\nsolve_by_elim [le_trans _ hy']\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\nα : Type u_9\nH1 : PartialOrder α\nH2 : InfSet α\nisGLB_sInf : ∀ (s : Set α), IsGLB s (sInf s)\na b c : α\nhac : a ≤ c\nhbc : b ≤ c\n⊢ c ∈ {x | a ≤ x ∧ b ≤ x}\n[PROOFSTEP]\nsimp [*]\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\nα : Type u_9\nH1 : PartialOrder α\nH2 : InfSet α\nisGLB_sInf : ∀ (s : Set α), IsGLB s (sInf s)\na b c : α\nhab : a ≤ b\nhac : a ≤ c\n⊢ a ≤ b ⊓ c\n[PROOFSTEP]\napply (isGLB_sInf _).2\n[GOAL]\ncase a\nα✝ : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\nα : Type u_9\nH1 : PartialOrder α\nH2 : InfSet α\nisGLB_sInf : ∀ (s : Set α), IsGLB s (sInf s)\na b c : α\nhab : a ≤ b\nhac : a ≤ c\n⊢ a ∈ lowerBounds {b, c}\n[PROOFSTEP]\nsimp [*]\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\nα : Type u_9\nH1 : PartialOrder α\nH2 : InfSet α\nisGLB_sInf : ∀ (s : Set α), IsGLB s (sInf s)\na : α\n⊢ a ∈ lowerBounds ∅\n[PROOFSTEP]\nsimp\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\nα : Type u_9\nH1 : PartialOrder α\nH2 : SupSet α\nisLUB_sSup : ∀ (s : Set α), IsLUB s (sSup s)\na b c : α\nhac : a ≤ c\nhbc : b ≤ c\n⊢ c ∈ upperBounds {a, b}\n[PROOFSTEP]\nsimp [*]\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\nα : Type u_9\nH1 : PartialOrder α\nH2 : SupSet α\nisLUB_sSup : ∀ (s : Set α), IsLUB s (sSup s)\na b c : α\nhab : a ≤ b\nhac : a ≤ c\n⊢ a ∈ {x | x ≤ b ∧ x ≤ c}\n[PROOFSTEP]\nsimp [*]\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\nα : Type u_9\nH1 : PartialOrder α\nH2 : SupSet α\nisLUB_sSup : ∀ (s : Set α), IsLUB s (sSup s)\nx : α\n⊢ x ∈ upperBounds ∅\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ni : CompleteLinearOrder α\na b : α\n⊢ min a b = if a ≤ b then a else b\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ni : CompleteLinearOrder α\na b : α\nh : a ≤ b\n⊢ min a b = a\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ni : CompleteLinearOrder α\na b : α\nh : ¬a ≤ b\n⊢ min a b = b\n[PROOFSTEP]\nsimp [(CompleteLinearOrder.le_total a b).resolve_left h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ni : CompleteLinearOrder α\na b : α\n⊢ max a b = if a ≤ b then b else a\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ni : CompleteLinearOrder α\na b : α\nh : a ≤ b\n⊢ max a b = b\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ni : CompleteLinearOrder α\na b : α\nh : ¬a ≤ b\n⊢ max a b = a\n[PROOFSTEP]\nsimp [(CompleteLinearOrder.le_total a b).resolve_left h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝ : CompleteLattice α\ns✝ t : Set α\na b : α\ns : Set α\nh_sup : sSup s = ⊥\nhne : Set.Nonempty s\n⊢ s = {⊥}\n[PROOFSTEP]\nrw [Set.eq_singleton_iff_nonempty_unique_mem]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝ : CompleteLattice α\ns✝ t : Set α\na b : α\ns : Set α\nh_sup : sSup s = ⊥\nhne : Set.Nonempty s\n⊢ Set.Nonempty s ∧ ∀ (x : α), x ∈ s → x = ⊥\n[PROOFSTEP]\nrw [sSup_eq_bot] at h_sup \n[GOAL]\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝ : CompleteLattice α\ns✝ t : Set α\na b : α\ns : Set α\nh_sup : ∀ (a : α), a ∈ s → a = ⊥\nhne : Set.Nonempty s\n⊢ Set.Nonempty s ∧ ∀ (x : α), x ∈ s → x = ⊥\n[PROOFSTEP]\nexact ⟨hne, h_sup⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝ : SupSet α\nf g : ι → α\ns : Set α\n⊢ sSup s = ⨆ (a : ↑s), ↑a\n[PROOFSTEP]\nrw [iSup, Subtype.range_coe]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝ : SupSet α\nf✝ g✝ : ι → α\nf : ι → ι'\nhf : Surjective f\ng : ι' → α\n⊢ ⨆ (x : ι), g (f x) = ⨆ (y : ι'), g y\n[PROOFSTEP]\nsimp [iSup]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝ : SupSet α\nf✝ g✝ : ι → α\nf : ι → ι'\nhf : Surjective f\ng : ι' → α\n⊢ sSup (range fun x => g (f x)) = sSup (range fun y => g y)\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_a\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝ : SupSet α\nf✝ g✝ : ι → α\nf : ι → ι'\nhf : Surjective f\ng : ι' → α\n⊢ (range fun x => g (f x)) = range fun y => g y\n[PROOFSTEP]\nexact hf.range_comp g\n[GOAL]\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝ : SupSet α\nf g✝ : ι → α\ng : ι' → α\nh : ι → ι'\nh1 : Surjective h\nh2 : ∀ (x : ι), g (h x) = f x\n⊢ ⨆ (x : ι), f x = ⨆ (y : ι'), g y\n[PROOFSTEP]\nconvert h1.iSup_comp g\n[GOAL]\ncase h.e'_2.h.e'_4.h\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝ : SupSet α\nf g✝ : ι → α\ng : ι' → α\nh : ι → ι'\nh1 : Surjective h\nh2 : ∀ (x : ι), g (h x) = f x\nx✝ : ι\n⊢ f x✝ = g (h x✝)\n[PROOFSTEP]\nexact (h2 _).symm\n[GOAL]\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝ : SupSet α\nf✝ g : ι → α\np q : Prop\nf₁ : p → α\nf₂ : q → α\npq : p ↔ q\nf : ∀ (x : q), f₁ (_ : p) = f₂ x\n⊢ iSup f₁ = iSup f₂\n[PROOFSTEP]\nobtain rfl := propext pq\n[GOAL]\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝ : SupSet α\nf✝ g : ι → α\np : Prop\nf₁ f₂ : p → α\npq : p ↔ p\nf : ∀ (x : p), f₁ (_ : p) = f₂ x\n⊢ iSup f₁ = iSup f₂\n[PROOFSTEP]\ncongr with x\n[GOAL]\ncase e_s.h\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝ : SupSet α\nf✝ g : ι → α\np : Prop\nf₁ f₂ : p → α\npq : p ↔ p\nf : ∀ (x : p), f₁ (_ : p) = f₂ x\nx : p\n⊢ f₁ x = f₂ x\n[PROOFSTEP]\napply f\n[GOAL]\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝ : SupSet α\nf✝ g✝ : ι → α\ng : β → α\nf : ι → β\n⊢ ⨆ (b : ↑(range f)), g ↑b = ⨆ (i : ι), g (f i)\n[PROOFSTEP]\nrw [iSup, iSup, ← image_eq_range, ← range_comp]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝ : SupSet α\nf✝ g✝ : ι → α\ng : β → α\nf : ι → β\n⊢ sSup (range (g ∘ f)) = sSup (range fun i => g (f i))\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝ : SupSet α\nf✝ g : ι → α\ns : Set β\nf : β → α\n⊢ sSup (f '' s) = ⨆ (a : ↑s), f ↑a\n[PROOFSTEP]\nrw [iSup, image_eq_range]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝ : CompleteLattice α\nf✝ g s t : ι → α\na b : α\nf : (i : ι) → κ i → α\n⊢ ⨆ (i : ι) (j : κ i), f i j ≤ a ↔ ∀ (i : ι) (j : κ i), f i j ≤ a\n[PROOFSTEP]\nsimp_rw [iSup_le_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝ : CompleteLattice α\nf✝ g s t : ι → α\na b : α\nf : (i : ι) → κ i → α\n⊢ a ≤ ⨅ (i : ι) (j : κ i), f i j ↔ ∀ (i : ι) (j : κ i), a ≤ f i j\n[PROOFSTEP]\nsimp_rw [le_iInf_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝¹ : CompleteLattice α\nf✝ g s✝ t : ι → α\na b : α\ninst✝ : CompleteLattice β\ns : Set α\nf : α → β\nhf : Monotone f\n⊢ ⨆ (a : α) (_ : a ∈ s), f a ≤ f (sSup s)\n[PROOFSTEP]\nrw [sSup_eq_iSup]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝¹ : CompleteLattice α\nf✝ g s✝ t : ι → α\na b : α\ninst✝ : CompleteLattice β\ns : Set α\nf : α → β\nhf : Monotone f\n⊢ ⨆ (a : α) (_ : a ∈ s), f a ≤ f (⨆ (a : α) (_ : a ∈ s), a)\n[PROOFSTEP]\nexact hf.le_map_iSup₂ _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝¹ : CompleteLattice α\nf✝ g s t : ι → α\na b : α\ninst✝ : CompleteLattice β\nf : α ≃o β\nx✝ : ι → α\nx : α\n⊢ ↑f (⨆ (i : ι), x✝ i) ≤ ↑f x ↔ ⨆ (i : ι), ↑f (x✝ i) ≤ ↑f x\n[PROOFSTEP]\nsimp only [f.le_iff_le, iSup_le_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝¹ : CompleteLattice α\nf✝ g s✝ t : ι → α\na b : α\ninst✝ : CompleteLattice β\nf : α ≃o β\ns : Set α\n⊢ ↑f (sSup s) = ⨆ (a : α) (_ : a ∈ s), ↑f a\n[PROOFSTEP]\nsimp only [sSup_eq_iSup, OrderIso.map_iSup]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝¹ : CompleteLattice α\nf✝ g s✝ t : ι → α\na b : α\ninst✝ : CompleteLattice β\ns : Set α\nf : α → β\nhf : Antitone f\n⊢ f (sSup s) ≤ ⨅ (a : α) (_ : a ∈ s), f a\n[PROOFSTEP]\nrw [sSup_eq_iSup]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝¹ : CompleteLattice α\nf✝ g s✝ t : ι → α\na b : α\ninst✝ : CompleteLattice β\ns : Set α\nf : α → β\nhf : Antitone f\n⊢ f (⨆ (a : α) (_ : a ∈ s), a) ≤ ⨅ (a : α) (_ : a ∈ s), f a\n[PROOFSTEP]\nexact hf.map_iSup₂_le _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝¹ : CompleteLattice α\nf g s t : ι → α\na b : α\ninst✝ : Nonempty ι\n⊢ ⨆ (x : ι), a = a\n[PROOFSTEP]\nrw [iSup, range_const, sSup_singleton]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝ : CompleteLattice α\nf✝ g s t : ι → α\na b : α\nf : (i : ι) → κ i → α\n⊢ ⨆ (i : ι) (j : κ i), f i j = ⊥ ↔ ∀ (i : ι) (j : κ i), f i j = ⊥\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝ : CompleteLattice α\nf✝ g s t : ι → α\na b : α\nf : (i : ι) → κ i → α\n⊢ ⨅ (i : ι) (j : κ i), f i j = ⊤ ↔ ∀ (i : ι) (j : κ i), f i j = ⊤\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝¹ : CompleteLattice α\nf g s t : ι → α\na✝ b : α\np : Prop\ninst✝ : Decidable p\na : p → α\n⊢ ⨆ (h : p), a h = if h : p then a h else ⊥\n[PROOFSTEP]\nby_cases h : p\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝¹ : CompleteLattice α\nf g s t : ι → α\na✝ b : α\np : Prop\ninst✝ : Decidable p\na : p → α\nh : p\n⊢ ⨆ (h : p), a h = if h : p then a h else ⊥\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝¹ : CompleteLattice α\nf g s t : ι → α\na✝ b : α\np : Prop\ninst✝ : Decidable p\na : p → α\nh : ¬p\n⊢ ⨆ (h : p), a h = if h : p then a h else ⊥\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝ : CompleteLattice α\nf✝ g s t : ι → α\na b : α\nι₁ : Sort u_9\nι₂ : Sort u_10\nκ₁ : ι₁ → Sort u_11\nκ₂ : ι₂ → Sort u_12\nf : (i₁ : ι₁) → κ₁ i₁ → (i₂ : ι₂) → κ₂ i₂ → α\n⊢ ⨆ (i₁ : ι₁) (j₁ : κ₁ i₁) (i₂ : ι₂) (j₂ : κ₂ i₂), f i₁ j₁ i₂ j₂ =\n    ⨆ (i₂ : ι₂) (j₂ : κ₂ i₂) (i₁ : ι₁) (j₁ : κ₁ i₁), f i₁ j₁ i₂ j₂\n[PROOFSTEP]\nsimp only [@iSup_comm _ (κ₁ _), @iSup_comm _ ι₁]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝ : CompleteLattice α\nf✝ g s t : ι → α\na b : α\nι₁ : Sort u_9\nι₂ : Sort u_10\nκ₁ : ι₁ → Sort u_11\nκ₂ : ι₂ → Sort u_12\nf : (i₁ : ι₁) → κ₁ i₁ → (i₂ : ι₂) → κ₂ i₂ → α\n⊢ ⨅ (i₁ : ι₁) (j₁ : κ₁ i₁) (i₂ : ι₂) (j₂ : κ₂ i₂), f i₁ j₁ i₂ j₂ =\n    ⨅ (i₂ : ι₂) (j₂ : κ₂ i₂) (i₁ : ι₁) (j₁ : κ₁ i₁), f i₁ j₁ i₂ j₂\n[PROOFSTEP]\nsimp only [@iInf_comm _ (κ₁ _), @iInf_comm _ ι₁]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝ : CompleteLattice α\nf✝ g s t : ι → α\na b✝ : α\nb : β\nf : (x : β) → x = b → α\nc : β\n⊢ ∀ (i : c = b), f c i ≤ f b (_ : b = b)\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝ : CompleteLattice α\nf✝ g s t : ι → α\na b : α\nc : β\nf : (x : β) → x = c → α\n⊢ f c (_ : c = c) ≤ f c (_ : c = c)\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝ : CompleteLattice α\nf✝ g s t : ι → α\na b✝ : α\nb : β\nf : (x : β) → b = x → α\nc : β\n⊢ ∀ (j : b = c), f c j ≤ f b (_ : b = b)\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝ : CompleteLattice α\nf✝ g s t : ι → α\na b✝ : α\nb : β\nf : (x : β) → b = x → α\n⊢ f b (_ : b = b) ≤ f b (_ : b = b)\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι✝ : Sort u_5\nι' : Sort u_6\nκ : ι✝ → Sort u_7\nκ' : ι' → Sort u_8\ninst✝ : CompleteLattice α\nf g s✝ t : ι✝ → α\na✝ b : α\nι : Type u_9\na : α\ns : Set ι\nhs : Set.Nonempty s\n⊢ ⨆ (i : ι) (_ : i ∈ s), a = a\n[PROOFSTEP]\nhaveI : Nonempty s := Set.nonempty_coe_sort.mpr hs\n[GOAL]\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι✝ : Sort u_5\nι' : Sort u_6\nκ : ι✝ → Sort u_7\nκ' : ι' → Sort u_8\ninst✝ : CompleteLattice α\nf g s✝ t : ι✝ → α\na✝ b : α\nι : Type u_9\na : α\ns : Set ι\nhs : Set.Nonempty s\nthis : Nonempty ↑s\n⊢ ⨆ (i : ι) (_ : i ∈ s), a = a\n[PROOFSTEP]\nrw [← iSup_subtype'', iSup_const]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝¹ : CompleteLattice α\nf✝ g s t : ι → α\na✝ b : α\ninst✝ : Nonempty ι\nf : ι → α\na : α\n⊢ (⨆ (x : ι), f x) ⊔ a = ⨆ (x : ι), f x ⊔ a\n[PROOFSTEP]\nrw [iSup_sup_eq, iSup_const]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝¹ : CompleteLattice α\nf✝ g s t : ι → α\na✝ b : α\ninst✝ : Nonempty ι\nf : ι → α\na : α\n⊢ (⨅ (x : ι), f x) ⊓ a = ⨅ (x : ι), f x ⊓ a\n[PROOFSTEP]\nrw [iInf_inf_eq, iInf_const]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝¹ : CompleteLattice α\nf✝ g s t : ι → α\na✝ b : α\ninst✝ : Nonempty ι\nf : ι → α\na : α\n⊢ a ⊔ ⨆ (x : ι), f x = ⨆ (x : ι), a ⊔ f x\n[PROOFSTEP]\nrw [iSup_sup_eq, iSup_const]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝¹ : CompleteLattice α\nf✝ g s t : ι → α\na✝ b : α\ninst✝ : Nonempty ι\nf : ι → α\na : α\n⊢ a ⊓ ⨅ (x : ι), f x = ⨅ (x : ι), a ⊓ f x\n[PROOFSTEP]\nrw [iInf_inf_eq, iInf_const]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝ : CompleteLattice α\nf✝ g s t : ι → α\na✝ b : α\np : ι → Prop\nf : (i : ι) → p i → α\na : α\nh : ∃ i, p i\n⊢ (⨆ (i : ι) (h : p i), f i h) ⊔ a = ⨆ (i : ι) (h : p i), f i h ⊔ a\n[PROOFSTEP]\nhaveI : Nonempty { i // p i } :=\n  let ⟨i, hi⟩ := h\n  ⟨⟨i, hi⟩⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝ : CompleteLattice α\nf✝ g s t : ι → α\na✝ b : α\np : ι → Prop\nf : (i : ι) → p i → α\na : α\nh : ∃ i, p i\nthis : Nonempty { i // p i }\n⊢ (⨆ (i : ι) (h : p i), f i h) ⊔ a = ⨆ (i : ι) (h : p i), f i h ⊔ a\n[PROOFSTEP]\nrw [iSup_subtype', iSup_subtype', iSup_sup]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝ : CompleteLattice α\nf✝ g s t : ι → α\na✝ b : α\np : ι → Prop\nf : (i : ι) → p i → α\na : α\nh : ∃ i, p i\n⊢ a ⊔ ⨆ (i : ι) (h : p i), f i h = ⨆ (i : ι) (h : p i), a ⊔ f i h\n[PROOFSTEP]\nsimpa only [sup_comm] using @biSup_sup α _ _ p _ _ h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝ : CompleteLattice α\nf g s✝ t : ι → α\na b : α\ns : False → α\n⊢ iSup s = ⊥\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝ : CompleteLattice α\nf g s✝ t : ι → α\na b : α\ns : False → α\n⊢ iInf s = ⊤\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝¹ : CompleteLattice α\nf✝ g✝ s t : ι → α\na b : α\np : ι → Prop\ninst✝ : DecidablePred p\nf : (i : ι) → p i → α\ng : (i : ι) → ¬p i → α\n⊢ (⨆ (i : ι), if h : p i then f i h else g i h) = (⨆ (i : ι) (h : p i), f i h) ⊔ ⨆ (i : ι) (h : ¬p i), g i h\n[PROOFSTEP]\nrw [← iSup_sup_eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝¹ : CompleteLattice α\nf✝ g✝ s t : ι → α\na b : α\np : ι → Prop\ninst✝ : DecidablePred p\nf : (i : ι) → p i → α\ng : (i : ι) → ¬p i → α\n⊢ (⨆ (i : ι), if h : p i then f i h else g i h) = ⨆ (x : ι), (⨆ (h : p x), f x h) ⊔ ⨆ (h : ¬p x), g x h\n[PROOFSTEP]\ncongr 1 with i\n[GOAL]\ncase e_s.h\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝¹ : CompleteLattice α\nf✝ g✝ s t : ι → α\na b : α\np : ι → Prop\ninst✝ : DecidablePred p\nf : (i : ι) → p i → α\ng : (i : ι) → ¬p i → α\ni : ι\n⊢ (if h : p i then f i h else g i h) = (⨆ (h : p i), f i h) ⊔ ⨆ (h : ¬p i), g i h\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝¹ : CompleteLattice α\nf✝ g✝ s t : ι → α\na b : α\np : ι → Prop\ninst✝ : DecidablePred p\nf : (i : ι) → p i → α\ng : (i : ι) → ¬p i → α\ni : ι\nh : p i\n⊢ f i h = (⨆ (h : p i), f i h) ⊔ ⨆ (h : ¬p i), g i h\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝¹ : CompleteLattice α\nf✝ g✝ s t : ι → α\na b : α\np : ι → Prop\ninst✝ : DecidablePred p\nf : (i : ι) → p i → α\ng : (i : ι) → ¬p i → α\ni : ι\nh : ¬p i\n⊢ g i h = (⨆ (h : p i), f i h) ⊔ ⨆ (h : ¬p i), g i h\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝ : CompleteLattice α\nf✝ g✝ s t : ι → α\na b : α\ng : β → α\nf : ι → β\n⊢ ⨆ (b : β) (_ : b ∈ range f), g b = ⨆ (i : ι), g (f i)\n[PROOFSTEP]\nrw [← iSup_subtype'', iSup_range']\n[GOAL]\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝ : CompleteLattice α\nf✝ g s✝ t : ι → α\na b : α\ns : Set β\nf : β → α\n⊢ sSup (f '' s) = ⨆ (a : β) (_ : a ∈ s), f a\n[PROOFSTEP]\nrw [← iSup_subtype'', sSup_image']\n[GOAL]\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝ : CompleteLattice α\nf✝ g s t : ι → α\na b : α\nf : β → α\n⊢ ⨆ (x : β) (_ : x ∈ ∅), f x = ⊥\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝ : CompleteLattice α\nf✝ g s t : ι → α\na b : α\nf : β → α\n⊢ ⨅ (x : β) (_ : x ∈ ∅), f x = ⊤\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝ : CompleteLattice α\nf✝ g s t : ι → α\na b : α\nf : β → α\n⊢ ⨆ (x : β) (_ : x ∈ univ), f x = ⨆ (x : β), f x\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝ : CompleteLattice α\nf✝ g s t : ι → α\na b : α\nf : β → α\n⊢ ⨅ (x : β) (_ : x ∈ univ), f x = ⨅ (x : β), f x\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝ : CompleteLattice α\nf✝ g s✝ t✝ : ι → α\na b : α\nf : β → α\ns t : Set β\n⊢ ⨆ (x : β) (_ : x ∈ s ∪ t), f x = (⨆ (x : β) (_ : x ∈ s), f x) ⊔ ⨆ (x : β) (_ : x ∈ t), f x\n[PROOFSTEP]\nsimp_rw [mem_union, iSup_or, iSup_sup_eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝ : CompleteLattice α\nf✝ g s t : ι → α\na b : α\nf : β → α\np : β → Prop\n⊢ ⨆ (i : β), f i = (⨆ (i : β) (_ : p i), f i) ⊔ ⨆ (i : β) (_ : ¬p i), f i\n[PROOFSTEP]\nsimpa [Classical.em] using @iSup_union _ _ _ f {i | p i} {i | ¬p i}\n[GOAL]\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝ : CompleteLattice α\nf✝ g s t : ι → α\na b : α\nf : β → α\ni₀ : β\n⊢ ⨆ (i : β), f i = f i₀ ⊔ ⨆ (i : β) (_ : i ≠ i₀), f i\n[PROOFSTEP]\nconvert iSup_split f (fun i => i = i₀)\n[GOAL]\ncase h.e'_3.h.e'_3\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝ : CompleteLattice α\nf✝ g s t : ι → α\na b : α\nf : β → α\ni₀ : β\n⊢ f i₀ = ⨆ (i : β) (_ : i = i₀), f i\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝ : CompleteLattice α\nf✝ g s t : ι → α\na b✝ : α\nf : β → α\nb : β\n⊢ ⨆ (x : β) (_ : x ∈ {b}), f x = f b\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝ : CompleteLattice α\nf✝ g s t : ι → α\na b✝ : α\nf : β → α\nb : β\n⊢ ⨅ (x : β) (_ : x ∈ {b}), f x = f b\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝ : CompleteLattice α\nf✝ g s t : ι → α\na✝ b✝ : α\nf : β → α\na b : β\n⊢ ⨆ (x : β) (_ : x ∈ {a, b}), f x = f a ⊔ f b\n[PROOFSTEP]\nrw [iSup_insert, iSup_singleton]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝ : CompleteLattice α\nf✝ g s t : ι → α\na✝ b✝ : α\nf : β → α\na b : β\n⊢ ⨅ (x : β) (_ : x ∈ {a, b}), f x = f a ⊓ f b\n[PROOFSTEP]\nrw [iInf_insert, iInf_singleton]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ✝ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝ : CompleteLattice α\nf✝ g✝ s t✝ : ι → α\na b : α\nγ : Type u_9\nf : β → γ\ng : γ → α\nt : Set β\n⊢ ⨆ (c : γ) (_ : c ∈ f '' t), g c = ⨆ (b : β) (_ : b ∈ t), g (f b)\n[PROOFSTEP]\nrw [← sSup_image, ← sSup_image, ← image_comp]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ✝ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝ : CompleteLattice α\nf✝ g✝ s t✝ : ι → α\na b : α\nγ : Type u_9\nf : β → γ\ng : γ → α\nt : Set β\n⊢ sSup ((fun c => g c) ∘ f '' t) = sSup ((fun b => g (f b)) '' t)\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝ : CompleteLattice α\nf✝ g s t : ι → α\na b : α\ne : ι → β\nhe : Injective e\nf : ι → α\n⊢ ⨆ (j : β), extend e f ⊥ j = ⨆ (i : ι), f i\n[PROOFSTEP]\nrw [iSup_split _ fun j => ∃ i, e i = j]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝ : CompleteLattice α\nf✝ g s t : ι → α\na b : α\ne : ι → β\nhe : Injective e\nf : ι → α\n⊢ (⨆ (i : β) (_ : ∃ i_1, e i_1 = i), extend e f ⊥ i) ⊔ ⨆ (i : β) (_ : ¬∃ i_1, e i_1 = i), extend e f ⊥ i =\n    ⨆ (i : ι), f i\n[PROOFSTEP]\nsimp (config := { contextual := true }) [he.extend_apply, extend_apply', @iSup_comm _ β ι]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝ : CompleteLattice α\nf✝ g s t : ι → α\na b : α\nf : Bool → α\n⊢ ⨆ (b : Bool), f b = f true ⊔ f false\n[PROOFSTEP]\nrw [iSup, Bool.range_eq, sSup_pair, sup_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝ : CompleteLattice α\nf g s t : ι → α\na b x y : α\n⊢ x ⊔ y = ⨆ (b : Bool), bif b then x else y\n[PROOFSTEP]\nrw [iSup_bool_eq, Bool.cond_true, Bool.cond_false]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝ : CompleteLattice α\nf✝ g s✝ t : ι → α\na b : α\ns : Set β\nf : β → α\n⊢ IsGLB (f '' s) (⨅ (x : β) (_ : x ∈ s), f x)\n[PROOFSTEP]\nsimpa only [range_comp, Subtype.range_coe, iInf_subtype'] using @isGLB_iInf α s _ (f ∘ fun x => (x : β))\n[GOAL]\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝ : CompleteLattice α\nf✝ g s✝ t : ι → α\na b : α\ns : Set β\nf : β → α\n⊢ IsLUB (f '' s) (⨆ (x : β) (_ : x ∈ s), f x)\n[PROOFSTEP]\nsimpa only [range_comp, Subtype.range_coe, iSup_subtype'] using @isLUB_iSup α s _ (f ∘ fun x => (x : β))\n[GOAL]\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝ : CompleteLattice α\nf✝ g s t : ι → α\na b : α\np : β → Type u_9\nf : Sigma p → α\nc : α\n⊢ ⨆ (x : Sigma p), f x ≤ c ↔ ⨆ (i : β) (j : p i), f { fst := i, snd := j } ≤ c\n[PROOFSTEP]\nsimp only [iSup_le_iff, Sigma.forall]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝ : CompleteLattice α\nf✝ g s t : ι → α\na b : α\nf : β × γ → α\nc : α\n⊢ ⨆ (x : β × γ), f x ≤ c ↔ ⨆ (i : β) (j : γ), f (i, j) ≤ c\n[PROOFSTEP]\nsimp only [iSup_le_iff, Prod.forall]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝ : CompleteLattice α\nf✝ g s✝ t✝ : ι → α\na b : α\nf : β × γ → α\ns : Set β\nt : Set γ\n⊢ ⨆ (x : β × γ) (_ : x ∈ s ×ˢ t), f x = ⨆ (a : β) (_ : a ∈ s) (b : γ) (_ : b ∈ t), f (a, b)\n[PROOFSTEP]\nsimp_rw [iSup_prod, mem_prod, iSup_and]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝ : CompleteLattice α\nf✝ g s✝ t✝ : ι → α\na b : α\nf : β × γ → α\ns : Set β\nt : Set γ\n⊢ ⨆ (i : β) (j : γ) (_ : i ∈ s) (_ : j ∈ t), f (i, j) = ⨆ (a : β) (_ : a ∈ s) (b : γ) (_ : b ∈ t), f (a, b)\n[PROOFSTEP]\nexact iSup_congr fun _ => iSup_comm\n[GOAL]\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝ : CompleteLattice α\nf✝ g s t : ι → α\na b : α\nf : β ⊕ γ → α\nc : α\n⊢ ⨆ (x : β ⊕ γ), f x ≤ c ↔ (⨆ (i : β), f (Sum.inl i)) ⊔ ⨆ (j : γ), f (Sum.inr j) ≤ c\n[PROOFSTEP]\nsimp only [sup_le_iff, iSup_le_iff, Sum.forall]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝ : CompleteLattice α\nf✝ g s t : ι → α\na b : α\nf : Option β → α\nc : α\n⊢ ⨆ (o : Option β), f o ≤ c ↔ f none ⊔ ⨆ (b : β), f (some b) ≤ c\n[PROOFSTEP]\nsimp only [iSup_le_iff, sup_le_iff, Option.forall]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝ : CompleteLattice α\nf✝ g s t : ι → α\na✝ b a : α\nf : β → α\n⊢ ⨆ (o : Option β), Option.elim o a f = a ⊔ ⨆ (b : β), f b\n[PROOFSTEP]\nsimp [iSup_option]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝ : CompleteLattice α\nf✝ g s t : ι → α\na b : α\nf : ι → α\n⊢ ⨆ (i : { i // f i ≠ ⊥ }), f ↑i = ⨆ (i : ι), f i\n[PROOFSTEP]\nby_cases htriv : ∀ i, f i = ⊥\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝ : CompleteLattice α\nf✝ g s t : ι → α\na b : α\nf : ι → α\nhtriv : ∀ (i : ι), f i = ⊥\n⊢ ⨆ (i : { i // f i ≠ ⊥ }), f ↑i = ⨆ (i : ι), f i\n[PROOFSTEP]\nsimp only [iSup_bot, (funext htriv : f = _)]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝ : CompleteLattice α\nf✝ g s t : ι → α\na b : α\nf : ι → α\nhtriv : ¬∀ (i : ι), f i = ⊥\n⊢ ⨆ (i : { i // f i ≠ ⊥ }), f ↑i = ⨆ (i : ι), f i\n[PROOFSTEP]\nrefine' (iSup_comp_le f _).antisymm (iSup_mono' fun i => _)\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝ : CompleteLattice α\nf✝ g s t : ι → α\na b : α\nf : ι → α\nhtriv : ¬∀ (i : ι), f i = ⊥\ni : ι\n⊢ ∃ i', f i ≤ f ↑i'\n[PROOFSTEP]\nby_cases hi : f i = ⊥\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝ : CompleteLattice α\nf✝ g s t : ι → α\na b : α\nf : ι → α\nhtriv : ¬∀ (i : ι), f i = ⊥\ni : ι\nhi : f i = ⊥\n⊢ ∃ i', f i ≤ f ↑i'\n[PROOFSTEP]\nrw [hi]\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝ : CompleteLattice α\nf✝ g s t : ι → α\na b : α\nf : ι → α\nhtriv : ¬∀ (i : ι), f i = ⊥\ni : ι\nhi : f i = ⊥\n⊢ ∃ i', ⊥ ≤ f ↑i'\n[PROOFSTEP]\nobtain ⟨i₀, hi₀⟩ := not_forall.mp htriv\n[GOAL]\ncase pos.intro\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝ : CompleteLattice α\nf✝ g s t : ι → α\na b : α\nf : ι → α\nhtriv : ¬∀ (i : ι), f i = ⊥\ni : ι\nhi : f i = ⊥\ni₀ : ι\nhi₀ : ¬f i₀ = ⊥\n⊢ ∃ i', ⊥ ≤ f ↑i'\n[PROOFSTEP]\nexact ⟨⟨i₀, hi₀⟩, bot_le⟩\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝ : CompleteLattice α\nf✝ g s t : ι → α\na b : α\nf : ι → α\nhtriv : ¬∀ (i : ι), f i = ⊥\ni : ι\nhi : ¬f i = ⊥\n⊢ ∃ i', f i ≤ f ↑i'\n[PROOFSTEP]\nexact ⟨⟨i, hi⟩, rfl.le⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝ : CompleteLattice α\nf✝ g s✝ t✝ : ι → α\na b : α\nf : β → γ → α\ns : Set β\nt : Set γ\n⊢ sSup (image2 f s t) = ⨆ (a : β) (_ : a ∈ s) (b : γ) (_ : b ∈ t), f a b\n[PROOFSTEP]\nrw [← image_prod, sSup_image, biSup_prod]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝ : CompleteLattice α\nf✝ g s✝ t✝ : ι → α\na b : α\nf : β → γ → α\ns : Set β\nt : Set γ\n⊢ sInf (image2 f s t) = ⨅ (a : β) (_ : a ∈ s) (b : γ) (_ : b ∈ t), f a b\n[PROOFSTEP]\nrw [← image_prod, sInf_image, biInf_prod]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝ : CompleteLattice α\nf g s t : ι → α\na b : α\nu : ℕ → α\nn : ℕ\n⊢ ⨆ (i : ℕ) (_ : i ≥ n), u i = ⨆ (i : ℕ), u (i + n)\n[PROOFSTEP]\napply le_antisymm\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝ : CompleteLattice α\nf g s t : ι → α\na b : α\nu : ℕ → α\nn : ℕ\n⊢ ⨆ (i : ℕ) (_ : i ≥ n), u i ≤ ⨆ (i : ℕ), u (i + n)\n[PROOFSTEP]\nsimp only [iSup_le_iff]\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝ : CompleteLattice α\nf g s t : ι → α\na b : α\nu : ℕ → α\nn : ℕ\n⊢ ⨆ (i : ℕ), u (i + n) ≤ ⨆ (i : ℕ) (_ : i ≥ n), u i\n[PROOFSTEP]\nsimp only [iSup_le_iff]\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝ : CompleteLattice α\nf g s t : ι → α\na b : α\nu : ℕ → α\nn : ℕ\n⊢ ∀ (i : ℕ), i ≥ n → u i ≤ ⨆ (i : ℕ), u (i + n)\n[PROOFSTEP]\nrefine fun i hi => le_sSup ⟨i - n, ?_⟩\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝ : CompleteLattice α\nf g s t : ι → α\na b : α\nu : ℕ → α\nn i : ℕ\nhi : i ≥ n\n⊢ (fun i => u (i + n)) (i - n) = u i\n[PROOFSTEP]\ndsimp only\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝ : CompleteLattice α\nf g s t : ι → α\na b : α\nu : ℕ → α\nn i : ℕ\nhi : i ≥ n\n⊢ u (i - n + n) = u i\n[PROOFSTEP]\nrw [Nat.sub_add_cancel hi]\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝ : CompleteLattice α\nf g s t : ι → α\na b : α\nu : ℕ → α\nn : ℕ\n⊢ ∀ (i : ℕ), u (i + n) ≤ ⨆ (i : ℕ) (_ : i ≥ n), u i\n[PROOFSTEP]\nexact fun i => le_sSup ⟨i + n, iSup_pos (Nat.le_add_left _ _)⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝ : CompleteLattice α\nf✝ g s t : ι → α\na b : α\nf : ℕ → α\nk : ℕ\n⊢ ⨆ (n : ℕ), ⨅ (i : ℕ) (_ : i ≥ n), f (i + k) = ⨆ (n : ℕ), ⨅ (i : ℕ) (_ : i ≥ n), f i\n[PROOFSTEP]\nhave hf : Monotone fun n => ⨅ i ≥ n, f i := fun n m h => biInf_mono fun i => h.trans\n[GOAL]\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝ : CompleteLattice α\nf✝ g s t : ι → α\na b : α\nf : ℕ → α\nk : ℕ\nhf : Monotone fun n => ⨅ (i : ℕ) (_ : i ≥ n), f i\n⊢ ⨆ (n : ℕ), ⨅ (i : ℕ) (_ : i ≥ n), f (i + k) = ⨆ (n : ℕ), ⨅ (i : ℕ) (_ : i ≥ n), f i\n[PROOFSTEP]\nrw [← Monotone.iSup_nat_add hf k]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝ : CompleteLattice α\nf✝ g s t : ι → α\na b : α\nf : ℕ → α\nk : ℕ\nhf : Monotone fun n => ⨅ (i : ℕ) (_ : i ≥ n), f i\n⊢ ⨆ (n : ℕ), ⨅ (i : ℕ) (_ : i ≥ n), f (i + k) = ⨆ (n : ℕ), ⨅ (i : ℕ) (_ : i ≥ n + k), f i\n[PROOFSTEP]\nsimp_rw [iInf_ge_eq_iInf_nat_add, ← Nat.add_assoc]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝ : CompleteLattice α\nf g s t : ι → α\na b : α\nu : ℕ → α\n⊢ u 0 ⊔ ⨆ (i : ℕ), u (i + 1) = ⨆ (x : ℕ) (_ : x ∈ {0} ∪ range Nat.succ), u x\n[PROOFSTEP]\n{rw [iSup_union, iSup_singleton, iSup_range]\n}\n[GOAL]\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝ : CompleteLattice α\nf g s t : ι → α\na b : α\nu : ℕ → α\n⊢ u 0 ⊔ ⨆ (i : ℕ), u (i + 1) = ⨆ (x : ℕ) (_ : x ∈ {0} ∪ range Nat.succ), u x\n[PROOFSTEP]\nrw [iSup_union, iSup_singleton, iSup_range]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝ : CompleteLattice α\nf g s t : ι → α\na b : α\nu : ℕ → α\n⊢ ⨆ (x : ℕ) (_ : x ∈ {0} ∪ range Nat.succ), u x = ⨆ (i : ℕ), u i\n[PROOFSTEP]\nrw [Nat.zero_union_range_succ, iSup_univ]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝ : CompleteLattice α\nf✝ g s t : ι → α\na b : α\nf : ℕ → α\n⊢ ⨅ (i : ℕ) (_ : i > 0), f i = ⨅ (i : ℕ), f (i + 1)\n[PROOFSTEP]\nrw [← iInf_range, Nat.range_succ]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝ : CompleteLattice α\nf✝ g s t : ι → α\na b : α\nf : ℕ → α\n⊢ ⨅ (i : ℕ) (_ : i > 0), f i = ⨅ (b : ℕ) (_ : b ∈ {i | 0 < i}), f b\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝ : CompleteLinearOrder α\nf : ι → α\n⊢ iSup f = ⊤ ↔ ∀ (b : α), b < ⊤ → ∃ i, b < f i\n[PROOFSTEP]\nsimp only [← sSup_range, sSup_eq_top, Set.exists_range_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝ : CompleteLinearOrder α\nf : ι → α\n⊢ iInf f = ⊥ ↔ ∀ (b : α), b > ⊥ → ∃ i, f i < b\n[PROOFSTEP]\nsimp only [← sInf_range, sInf_eq_bot, Set.exists_range_iff]\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι✝ : Sort u_5\nι' : Sort u_6\nκ : ι✝ → Sort u_7\nκ' : ι' → Sort u_8\nα : Type u_9\nβ : α → Type u_10\nι : Sort u_11\ninst✝ : (i : α) → SupSet (β i)\nf : ι → (a : α) → β a\na : α\n⊢ iSup (fun i => f i) a = ⨆ (i : ι), f i a\n[PROOFSTEP]\nrw [iSup, sSup_apply, iSup, iSup, ← image_eq_range (fun f : ∀ i, β i => f a) (range f), ← range_comp]\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι✝ : Sort u_5\nι' : Sort u_6\nκ : ι✝ → Sort u_7\nκ' : ι' → Sort u_8\nα : Type u_9\nβ : α → Type u_10\nι : Sort u_11\ninst✝ : (i : α) → SupSet (β i)\nf : ι → (a : α) → β a\na : α\n⊢ sSup (range ((fun f => f a) ∘ f)) = sSup (range fun i => f i a)\n[PROOFSTEP]\nrfl\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\nα : Type u_9\ns : Set (α → Prop)\na : α\n⊢ sSup s a ↔ ∃ r, r ∈ s ∧ r a\n[PROOFSTEP]\nrw [sSup_apply]\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\nα : Type u_9\ns : Set (α → Prop)\na : α\n⊢ ⨆ (f : ↑s), ↑f a ↔ ∃ r, r ∈ s ∧ r a\n[PROOFSTEP]\nsimp [← eq_iff_iff]\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\nα : Type u_9\ns : Set (α → Prop)\na : α\n⊢ sInf s a ↔ ∀ (r : α → Prop), r ∈ s → r a\n[PROOFSTEP]\nrw [sInf_apply]\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\nα : Type u_9\ns : Set (α → Prop)\na : α\n⊢ ⨅ (f : ↑s), ↑f a ↔ ∀ (r : α → Prop), r ∈ s → r a\n[PROOFSTEP]\nsimp [← eq_iff_iff]\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\nα : Type u_9\nβ : Type u_10\ns : Set (α → β → Prop)\na : α\nb : β\n⊢ sSup s a b ↔ ∃ r, r ∈ s ∧ r a b\n[PROOFSTEP]\nrw [sSup_apply]\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\nα : Type u_9\nβ : Type u_10\ns : Set (α → β → Prop)\na : α\nb : β\n⊢ iSup (fun f => ↑f a) b ↔ ∃ r, r ∈ s ∧ r a b\n[PROOFSTEP]\nsimp [← eq_iff_iff]\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\nα : Type u_9\nβ : Type u_10\ns : Set (α → β → Prop)\na : α\nb : β\n⊢ sInf s a b ↔ ∀ (r : α → β → Prop), r ∈ s → r a b\n[PROOFSTEP]\nrw [sInf_apply]\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\nα : Type u_9\nβ : Type u_10\ns : Set (α → β → Prop)\na : α\nb : β\n⊢ iInf (fun f => ↑f a) b ↔ ∀ (r : α → β → Prop), r ∈ s → r a b\n[PROOFSTEP]\nsimp [← eq_iff_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝¹ : InfSet α\ninst✝ : InfSet β\nf : ι → α × β\n⊢ swap (iInf f) = ⨅ (i : ι), swap (f i)\n[PROOFSTEP]\nsimp_rw [iInf, swap_sInf, ← range_comp, Function.comp]\n  -- Porting note: need to unfold `∘`\n[GOAL]\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝¹ : SupSet α\ninst✝ : SupSet β\nf : ι → α × β\n⊢ swap (iSup f) = ⨆ (i : ι), swap (f i)\n[PROOFSTEP]\nsimp_rw [iSup, swap_sSup, ← range_comp, Function.comp]\n  -- Porting note: need to unfold `∘`\n[GOAL]\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝ : CompleteLattice α\ns : Set (ULift α)\n⊢ (sSup s).down = ⨆ (a : ULift α) (_ : a ∈ s), a.down\n[PROOFSTEP]\nrw [sSup_eq_iSup', down_iSup, iSup_subtype'']\n[GOAL]\nα : Type u_1\nβ : Type u_2\nβ₂ : Type u_3\nγ : Type u_4\nι : Sort u_5\nι' : Sort u_6\nκ : ι → Sort u_7\nκ' : ι' → Sort u_8\ninst✝ : CompleteLattice α\ns : Set (ULift α)\n⊢ (sInf s).down = ⨅ (a : ULift α) (_ : a ∈ s), a.down\n[PROOFSTEP]\nrw [sInf_eq_iInf', down_iInf, iInf_subtype'']\n", "meta": {"mathlib_filename": "Mathlib.Order.CompleteLattice", "llama_tokens": 24681, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8080672089305841, "lm_q2_score": 0.6513548714339145, "lm_q1q2_score": 0.5263385129829428}}
{"text": "[GOAL]\n𝕜 : Type u_1\ninst✝ : IsROrC 𝕜\n⊢ Tendsto (fun n => (↑n)⁻¹) atTop (nhds 0)\n[PROOFSTEP]\nconvert tendsto_algebraMap_inverse_atTop_nhds_0_nat 𝕜\n[GOAL]\ncase h.e'_3.h\n𝕜 : Type u_1\ninst✝ : IsROrC 𝕜\nx✝ : ℕ\n⊢ (↑x✝)⁻¹ = (↑(algebraMap ℝ 𝕜) ∘ fun n => (↑n)⁻¹) x✝\n[PROOFSTEP]\nsimp\n", "meta": {"mathlib_filename": "Mathlib.Analysis.SpecificLimits.IsROrC", "llama_tokens": 167, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES\n\n", "lm_q1_score": 0.782662489091802, "lm_q2_score": 0.6723317057447908, "lm_q1q2_score": 0.526208806313555}}
{"text": "[GOAL]\nK : Type u_1\ninst✝¹ : DivisionRing K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nv : Valuation K Γ₀\nx y : K\nγ : Γ₀ˣ\ny_ne : y ≠ 0\nh : ↑v (x - y) < min (↑γ * (↑v y * ↑v y)) (↑v y)\n⊢ ↑v (x⁻¹ - y⁻¹) < ↑γ\n[PROOFSTEP]\nhave hyp1 : v (x - y) < γ * (v y * v y) := lt_of_lt_of_le h (min_le_left _ _)\n[GOAL]\nK : Type u_1\ninst✝¹ : DivisionRing K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nv : Valuation K Γ₀\nx y : K\nγ : Γ₀ˣ\ny_ne : y ≠ 0\nh : ↑v (x - y) < min (↑γ * (↑v y * ↑v y)) (↑v y)\nhyp1 : ↑v (x - y) < ↑γ * (↑v y * ↑v y)\n⊢ ↑v (x⁻¹ - y⁻¹) < ↑γ\n[PROOFSTEP]\nhave hyp1' : v (x - y) * (v y * v y)⁻¹ < γ := mul_inv_lt_of_lt_mul₀ hyp1\n[GOAL]\nK : Type u_1\ninst✝¹ : DivisionRing K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nv : Valuation K Γ₀\nx y : K\nγ : Γ₀ˣ\ny_ne : y ≠ 0\nh : ↑v (x - y) < min (↑γ * (↑v y * ↑v y)) (↑v y)\nhyp1 : ↑v (x - y) < ↑γ * (↑v y * ↑v y)\nhyp1' : ↑v (x - y) * (↑v y * ↑v y)⁻¹ < ↑γ\n⊢ ↑v (x⁻¹ - y⁻¹) < ↑γ\n[PROOFSTEP]\nhave hyp2 : v (x - y) < v y := lt_of_lt_of_le h (min_le_right _ _)\n[GOAL]\nK : Type u_1\ninst✝¹ : DivisionRing K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nv : Valuation K Γ₀\nx y : K\nγ : Γ₀ˣ\ny_ne : y ≠ 0\nh : ↑v (x - y) < min (↑γ * (↑v y * ↑v y)) (↑v y)\nhyp1 : ↑v (x - y) < ↑γ * (↑v y * ↑v y)\nhyp1' : ↑v (x - y) * (↑v y * ↑v y)⁻¹ < ↑γ\nhyp2 : ↑v (x - y) < ↑v y\n⊢ ↑v (x⁻¹ - y⁻¹) < ↑γ\n[PROOFSTEP]\nhave key : v x = v y := Valuation.map_eq_of_sub_lt v hyp2\n[GOAL]\nK : Type u_1\ninst✝¹ : DivisionRing K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nv : Valuation K Γ₀\nx y : K\nγ : Γ₀ˣ\ny_ne : y ≠ 0\nh : ↑v (x - y) < min (↑γ * (↑v y * ↑v y)) (↑v y)\nhyp1 : ↑v (x - y) < ↑γ * (↑v y * ↑v y)\nhyp1' : ↑v (x - y) * (↑v y * ↑v y)⁻¹ < ↑γ\nhyp2 : ↑v (x - y) < ↑v y\nkey : ↑v x = ↑v y\n⊢ ↑v (x⁻¹ - y⁻¹) < ↑γ\n[PROOFSTEP]\nhave x_ne : x ≠ 0 := by\n  intro h\n  apply y_ne\n  rw [h, v.map_zero] at key \n  exact v.zero_iff.1 key.symm\n[GOAL]\nK : Type u_1\ninst✝¹ : DivisionRing K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nv : Valuation K Γ₀\nx y : K\nγ : Γ₀ˣ\ny_ne : y ≠ 0\nh : ↑v (x - y) < min (↑γ * (↑v y * ↑v y)) (↑v y)\nhyp1 : ↑v (x - y) < ↑γ * (↑v y * ↑v y)\nhyp1' : ↑v (x - y) * (↑v y * ↑v y)⁻¹ < ↑γ\nhyp2 : ↑v (x - y) < ↑v y\nkey : ↑v x = ↑v y\n⊢ x ≠ 0\n[PROOFSTEP]\nintro h\n[GOAL]\nK : Type u_1\ninst✝¹ : DivisionRing K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nv : Valuation K Γ₀\nx y : K\nγ : Γ₀ˣ\ny_ne : y ≠ 0\nh✝ : ↑v (x - y) < min (↑γ * (↑v y * ↑v y)) (↑v y)\nhyp1 : ↑v (x - y) < ↑γ * (↑v y * ↑v y)\nhyp1' : ↑v (x - y) * (↑v y * ↑v y)⁻¹ < ↑γ\nhyp2 : ↑v (x - y) < ↑v y\nkey : ↑v x = ↑v y\nh : x = 0\n⊢ False\n[PROOFSTEP]\napply y_ne\n[GOAL]\nK : Type u_1\ninst✝¹ : DivisionRing K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nv : Valuation K Γ₀\nx y : K\nγ : Γ₀ˣ\ny_ne : y ≠ 0\nh✝ : ↑v (x - y) < min (↑γ * (↑v y * ↑v y)) (↑v y)\nhyp1 : ↑v (x - y) < ↑γ * (↑v y * ↑v y)\nhyp1' : ↑v (x - y) * (↑v y * ↑v y)⁻¹ < ↑γ\nhyp2 : ↑v (x - y) < ↑v y\nkey : ↑v x = ↑v y\nh : x = 0\n⊢ y = 0\n[PROOFSTEP]\nrw [h, v.map_zero] at key \n[GOAL]\nK : Type u_1\ninst✝¹ : DivisionRing K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nv : Valuation K Γ₀\nx y : K\nγ : Γ₀ˣ\ny_ne : y ≠ 0\nh✝ : ↑v (x - y) < min (↑γ * (↑v y * ↑v y)) (↑v y)\nhyp1 : ↑v (x - y) < ↑γ * (↑v y * ↑v y)\nhyp1' : ↑v (x - y) * (↑v y * ↑v y)⁻¹ < ↑γ\nhyp2 : ↑v (x - y) < ↑v y\nkey : 0 = ↑v y\nh : x = 0\n⊢ y = 0\n[PROOFSTEP]\nexact v.zero_iff.1 key.symm\n[GOAL]\nK : Type u_1\ninst✝¹ : DivisionRing K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nv : Valuation K Γ₀\nx y : K\nγ : Γ₀ˣ\ny_ne : y ≠ 0\nh : ↑v (x - y) < min (↑γ * (↑v y * ↑v y)) (↑v y)\nhyp1 : ↑v (x - y) < ↑γ * (↑v y * ↑v y)\nhyp1' : ↑v (x - y) * (↑v y * ↑v y)⁻¹ < ↑γ\nhyp2 : ↑v (x - y) < ↑v y\nkey : ↑v x = ↑v y\nx_ne : x ≠ 0\n⊢ ↑v (x⁻¹ - y⁻¹) < ↑γ\n[PROOFSTEP]\nhave decomp : x⁻¹ - y⁻¹ = x⁻¹ * (y - x) * y⁻¹ := by\n  rw [mul_sub_left_distrib, sub_mul, mul_assoc, show y * y⁻¹ = 1 from mul_inv_cancel y_ne,\n    show x⁻¹ * x = 1 from inv_mul_cancel x_ne, mul_one, one_mul]\n[GOAL]\nK : Type u_1\ninst✝¹ : DivisionRing K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nv : Valuation K Γ₀\nx y : K\nγ : Γ₀ˣ\ny_ne : y ≠ 0\nh : ↑v (x - y) < min (↑γ * (↑v y * ↑v y)) (↑v y)\nhyp1 : ↑v (x - y) < ↑γ * (↑v y * ↑v y)\nhyp1' : ↑v (x - y) * (↑v y * ↑v y)⁻¹ < ↑γ\nhyp2 : ↑v (x - y) < ↑v y\nkey : ↑v x = ↑v y\nx_ne : x ≠ 0\n⊢ x⁻¹ - y⁻¹ = x⁻¹ * (y - x) * y⁻¹\n[PROOFSTEP]\nrw [mul_sub_left_distrib, sub_mul, mul_assoc, show y * y⁻¹ = 1 from mul_inv_cancel y_ne,\n  show x⁻¹ * x = 1 from inv_mul_cancel x_ne, mul_one, one_mul]\n[GOAL]\nK : Type u_1\ninst✝¹ : DivisionRing K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nv : Valuation K Γ₀\nx y : K\nγ : Γ₀ˣ\ny_ne : y ≠ 0\nh : ↑v (x - y) < min (↑γ * (↑v y * ↑v y)) (↑v y)\nhyp1 : ↑v (x - y) < ↑γ * (↑v y * ↑v y)\nhyp1' : ↑v (x - y) * (↑v y * ↑v y)⁻¹ < ↑γ\nhyp2 : ↑v (x - y) < ↑v y\nkey : ↑v x = ↑v y\nx_ne : x ≠ 0\ndecomp : x⁻¹ - y⁻¹ = x⁻¹ * (y - x) * y⁻¹\n⊢ ↑v (x⁻¹ - y⁻¹) < ↑γ\n[PROOFSTEP]\ncalc\n  v (x⁻¹ - y⁻¹) = v (x⁻¹ * (y - x) * y⁻¹) := by rw [decomp]\n  _ = v x⁻¹ * (v <| y - x) * v y⁻¹ := by repeat' rw [Valuation.map_mul]\n  _ = (v x)⁻¹ * (v <| y - x) * (v y)⁻¹ := by rw [map_inv₀, map_inv₀]\n  _ = (v <| y - x) * (v y * v y)⁻¹ := by rw [mul_assoc, mul_comm, key, mul_assoc, mul_inv_rev]\n  _ = (v <| y - x) * (v y * v y)⁻¹ := rfl\n  _ = (v <| x - y) * (v y * v y)⁻¹ := by rw [Valuation.map_sub_swap]\n  _ < γ := hyp1'\n[GOAL]\nK : Type u_1\ninst✝¹ : DivisionRing K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nv : Valuation K Γ₀\nx y : K\nγ : Γ₀ˣ\ny_ne : y ≠ 0\nh : ↑v (x - y) < min (↑γ * (↑v y * ↑v y)) (↑v y)\nhyp1 : ↑v (x - y) < ↑γ * (↑v y * ↑v y)\nhyp1' : ↑v (x - y) * (↑v y * ↑v y)⁻¹ < ↑γ\nhyp2 : ↑v (x - y) < ↑v y\nkey : ↑v x = ↑v y\nx_ne : x ≠ 0\ndecomp : x⁻¹ - y⁻¹ = x⁻¹ * (y - x) * y⁻¹\n⊢ ↑v (x⁻¹ - y⁻¹) = ↑v (x⁻¹ * (y - x) * y⁻¹)\n[PROOFSTEP]\nrw [decomp]\n[GOAL]\nK : Type u_1\ninst✝¹ : DivisionRing K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nv : Valuation K Γ₀\nx y : K\nγ : Γ₀ˣ\ny_ne : y ≠ 0\nh : ↑v (x - y) < min (↑γ * (↑v y * ↑v y)) (↑v y)\nhyp1 : ↑v (x - y) < ↑γ * (↑v y * ↑v y)\nhyp1' : ↑v (x - y) * (↑v y * ↑v y)⁻¹ < ↑γ\nhyp2 : ↑v (x - y) < ↑v y\nkey : ↑v x = ↑v y\nx_ne : x ≠ 0\ndecomp : x⁻¹ - y⁻¹ = x⁻¹ * (y - x) * y⁻¹\n⊢ ↑v (x⁻¹ * (y - x) * y⁻¹) = ↑v x⁻¹ * ↑v (y - x) * ↑v y⁻¹\n[PROOFSTEP]\nrepeat' rw [Valuation.map_mul]\n[GOAL]\nK : Type u_1\ninst✝¹ : DivisionRing K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nv : Valuation K Γ₀\nx y : K\nγ : Γ₀ˣ\ny_ne : y ≠ 0\nh : ↑v (x - y) < min (↑γ * (↑v y * ↑v y)) (↑v y)\nhyp1 : ↑v (x - y) < ↑γ * (↑v y * ↑v y)\nhyp1' : ↑v (x - y) * (↑v y * ↑v y)⁻¹ < ↑γ\nhyp2 : ↑v (x - y) < ↑v y\nkey : ↑v x = ↑v y\nx_ne : x ≠ 0\ndecomp : x⁻¹ - y⁻¹ = x⁻¹ * (y - x) * y⁻¹\n⊢ ↑v (x⁻¹ * (y - x) * y⁻¹) = ↑v x⁻¹ * ↑v (y - x) * ↑v y⁻¹\n[PROOFSTEP]\nrw [Valuation.map_mul]\n[GOAL]\nK : Type u_1\ninst✝¹ : DivisionRing K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nv : Valuation K Γ₀\nx y : K\nγ : Γ₀ˣ\ny_ne : y ≠ 0\nh : ↑v (x - y) < min (↑γ * (↑v y * ↑v y)) (↑v y)\nhyp1 : ↑v (x - y) < ↑γ * (↑v y * ↑v y)\nhyp1' : ↑v (x - y) * (↑v y * ↑v y)⁻¹ < ↑γ\nhyp2 : ↑v (x - y) < ↑v y\nkey : ↑v x = ↑v y\nx_ne : x ≠ 0\ndecomp : x⁻¹ - y⁻¹ = x⁻¹ * (y - x) * y⁻¹\n⊢ ↑v (x⁻¹ * (y - x)) * ↑v y⁻¹ = ↑v x⁻¹ * ↑v (y - x) * ↑v y⁻¹\n[PROOFSTEP]\nrw [Valuation.map_mul]\n[GOAL]\nK : Type u_1\ninst✝¹ : DivisionRing K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nv : Valuation K Γ₀\nx y : K\nγ : Γ₀ˣ\ny_ne : y ≠ 0\nh : ↑v (x - y) < min (↑γ * (↑v y * ↑v y)) (↑v y)\nhyp1 : ↑v (x - y) < ↑γ * (↑v y * ↑v y)\nhyp1' : ↑v (x - y) * (↑v y * ↑v y)⁻¹ < ↑γ\nhyp2 : ↑v (x - y) < ↑v y\nkey : ↑v x = ↑v y\nx_ne : x ≠ 0\ndecomp : x⁻¹ - y⁻¹ = x⁻¹ * (y - x) * y⁻¹\n⊢ ↑v x⁻¹ * ↑v (y - x) * ↑v y⁻¹ = (↑v x)⁻¹ * ↑v (y - x) * (↑v y)⁻¹\n[PROOFSTEP]\nrw [map_inv₀, map_inv₀]\n[GOAL]\nK : Type u_1\ninst✝¹ : DivisionRing K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nv : Valuation K Γ₀\nx y : K\nγ : Γ₀ˣ\ny_ne : y ≠ 0\nh : ↑v (x - y) < min (↑γ * (↑v y * ↑v y)) (↑v y)\nhyp1 : ↑v (x - y) < ↑γ * (↑v y * ↑v y)\nhyp1' : ↑v (x - y) * (↑v y * ↑v y)⁻¹ < ↑γ\nhyp2 : ↑v (x - y) < ↑v y\nkey : ↑v x = ↑v y\nx_ne : x ≠ 0\ndecomp : x⁻¹ - y⁻¹ = x⁻¹ * (y - x) * y⁻¹\n⊢ (↑v x)⁻¹ * ↑v (y - x) * (↑v y)⁻¹ = ↑v (y - x) * (↑v y * ↑v y)⁻¹\n[PROOFSTEP]\nrw [mul_assoc, mul_comm, key, mul_assoc, mul_inv_rev]\n[GOAL]\nK : Type u_1\ninst✝¹ : DivisionRing K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nv : Valuation K Γ₀\nx y : K\nγ : Γ₀ˣ\ny_ne : y ≠ 0\nh : ↑v (x - y) < min (↑γ * (↑v y * ↑v y)) (↑v y)\nhyp1 : ↑v (x - y) < ↑γ * (↑v y * ↑v y)\nhyp1' : ↑v (x - y) * (↑v y * ↑v y)⁻¹ < ↑γ\nhyp2 : ↑v (x - y) < ↑v y\nkey : ↑v x = ↑v y\nx_ne : x ≠ 0\ndecomp : x⁻¹ - y⁻¹ = x⁻¹ * (y - x) * y⁻¹\n⊢ ↑v (y - x) * (↑v y * ↑v y)⁻¹ = ↑v (x - y) * (↑v y * ↑v y)⁻¹\n[PROOFSTEP]\nrw [Valuation.map_sub_swap]\n[GOAL]\nK : Type u_1\ninst✝² : DivisionRing K\nΓ₀ : Type u_2\ninst✝¹ : LinearOrderedCommGroupWithZero Γ₀\ninst✝ : Valued K Γ₀\n⊢ TopologicalRing K\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nK : Type u_1\ninst✝² : DivisionRing K\nΓ₀ : Type u_2\ninst✝¹ : LinearOrderedCommGroupWithZero Γ₀\ninst✝ : Valued K Γ₀\nsrc✝ : TopologicalRing K := inferInstance\n⊢ ∀ ⦃x : K⦄, x ≠ 0 → ContinuousAt Inv.inv x\n[PROOFSTEP]\nintro x x_ne s s_in\n[GOAL]\nK : Type u_1\ninst✝² : DivisionRing K\nΓ₀ : Type u_2\ninst✝¹ : LinearOrderedCommGroupWithZero Γ₀\ninst✝ : Valued K Γ₀\nsrc✝ : TopologicalRing K := inferInstance\nx : K\nx_ne : x ≠ 0\ns : Set K\ns_in : s ∈ 𝓝 x⁻¹\n⊢ s ∈ map Inv.inv (𝓝 x)\n[PROOFSTEP]\ncases' Valued.mem_nhds.mp s_in with γ hs\n[GOAL]\ncase intro\nK : Type u_1\ninst✝² : DivisionRing K\nΓ₀ : Type u_2\ninst✝¹ : LinearOrderedCommGroupWithZero Γ₀\ninst✝ : Valued K Γ₀\nsrc✝ : TopologicalRing K := inferInstance\nx : K\nx_ne : x ≠ 0\ns : Set K\ns_in : s ∈ 𝓝 x⁻¹\nγ : Γ₀ˣ\nhs : {y | ↑v (y - x⁻¹) < ↑γ} ⊆ s\n⊢ s ∈ map Inv.inv (𝓝 x)\n[PROOFSTEP]\nclear s_in\n[GOAL]\ncase intro\nK : Type u_1\ninst✝² : DivisionRing K\nΓ₀ : Type u_2\ninst✝¹ : LinearOrderedCommGroupWithZero Γ₀\ninst✝ : Valued K Γ₀\nsrc✝ : TopologicalRing K := inferInstance\nx : K\nx_ne : x ≠ 0\ns : Set K\nγ : Γ₀ˣ\nhs : {y | ↑v (y - x⁻¹) < ↑γ} ⊆ s\n⊢ s ∈ map Inv.inv (𝓝 x)\n[PROOFSTEP]\nrw [mem_map, Valued.mem_nhds]\n[GOAL]\ncase intro\nK : Type u_1\ninst✝² : DivisionRing K\nΓ₀ : Type u_2\ninst✝¹ : LinearOrderedCommGroupWithZero Γ₀\ninst✝ : Valued K Γ₀\nsrc✝ : TopologicalRing K := inferInstance\nx : K\nx_ne : x ≠ 0\ns : Set K\nγ : Γ₀ˣ\nhs : {y | ↑v (y - x⁻¹) < ↑γ} ⊆ s\n⊢ ∃ γ, {y | ↑v (y - x) < ↑γ} ⊆ Inv.inv ⁻¹' s\n[PROOFSTEP]\nchange ∃ γ : Γ₀ˣ, {y : K | (v (y - x) : Γ₀) < γ} ⊆ {x : K | x⁻¹ ∈ s}\n[GOAL]\ncase intro\nK : Type u_1\ninst✝² : DivisionRing K\nΓ₀ : Type u_2\ninst✝¹ : LinearOrderedCommGroupWithZero Γ₀\ninst✝ : Valued K Γ₀\nsrc✝ : TopologicalRing K := inferInstance\nx : K\nx_ne : x ≠ 0\ns : Set K\nγ : Γ₀ˣ\nhs : {y | ↑v (y - x⁻¹) < ↑γ} ⊆ s\n⊢ ∃ γ, {y | ↑v (y - x) < ↑γ} ⊆ {x | x⁻¹ ∈ s}\n[PROOFSTEP]\nhave vx_ne := (Valuation.ne_zero_iff <| v).mpr x_ne\n[GOAL]\ncase intro\nK : Type u_1\ninst✝² : DivisionRing K\nΓ₀ : Type u_2\ninst✝¹ : LinearOrderedCommGroupWithZero Γ₀\ninst✝ : Valued K Γ₀\nsrc✝ : TopologicalRing K := inferInstance\nx : K\nx_ne : x ≠ 0\ns : Set K\nγ : Γ₀ˣ\nhs : {y | ↑v (y - x⁻¹) < ↑γ} ⊆ s\nvx_ne : ↑v x ≠ 0\n⊢ ∃ γ, {y | ↑v (y - x) < ↑γ} ⊆ {x | x⁻¹ ∈ s}\n[PROOFSTEP]\nlet γ' := Units.mk0 _ vx_ne\n[GOAL]\ncase intro\nK : Type u_1\ninst✝² : DivisionRing K\nΓ₀ : Type u_2\ninst✝¹ : LinearOrderedCommGroupWithZero Γ₀\ninst✝ : Valued K Γ₀\nsrc✝ : TopologicalRing K := inferInstance\nx : K\nx_ne : x ≠ 0\ns : Set K\nγ : Γ₀ˣ\nhs : {y | ↑v (y - x⁻¹) < ↑γ} ⊆ s\nvx_ne : ↑v x ≠ 0\nγ' : ((fun x => Γ₀) x)ˣ := Units.mk0 (↑v x) vx_ne\n⊢ ∃ γ, {y | ↑v (y - x) < ↑γ} ⊆ {x | x⁻¹ ∈ s}\n[PROOFSTEP]\nuse min (γ * (γ' * γ')) γ'\n[GOAL]\ncase h\nK : Type u_1\ninst✝² : DivisionRing K\nΓ₀ : Type u_2\ninst✝¹ : LinearOrderedCommGroupWithZero Γ₀\ninst✝ : Valued K Γ₀\nsrc✝ : TopologicalRing K := inferInstance\nx : K\nx_ne : x ≠ 0\ns : Set K\nγ : Γ₀ˣ\nhs : {y | ↑v (y - x⁻¹) < ↑γ} ⊆ s\nvx_ne : ↑v x ≠ 0\nγ' : ((fun x => Γ₀) x)ˣ := Units.mk0 (↑v x) vx_ne\n⊢ {y | ↑v (y - x) < ↑(min (γ * (γ' * γ')) γ')} ⊆ {x | x⁻¹ ∈ s}\n[PROOFSTEP]\nintro y y_in\n[GOAL]\ncase h\nK : Type u_1\ninst✝² : DivisionRing K\nΓ₀ : Type u_2\ninst✝¹ : LinearOrderedCommGroupWithZero Γ₀\ninst✝ : Valued K Γ₀\nsrc✝ : TopologicalRing K := inferInstance\nx : K\nx_ne : x ≠ 0\ns : Set K\nγ : Γ₀ˣ\nhs : {y | ↑v (y - x⁻¹) < ↑γ} ⊆ s\nvx_ne : ↑v x ≠ 0\nγ' : ((fun x => Γ₀) x)ˣ := Units.mk0 (↑v x) vx_ne\ny : K\ny_in : y ∈ {y | ↑v (y - x) < ↑(min (γ * (γ' * γ')) γ')}\n⊢ y ∈ {x | x⁻¹ ∈ s}\n[PROOFSTEP]\napply hs\n[GOAL]\ncase h.a\nK : Type u_1\ninst✝² : DivisionRing K\nΓ₀ : Type u_2\ninst✝¹ : LinearOrderedCommGroupWithZero Γ₀\ninst✝ : Valued K Γ₀\nsrc✝ : TopologicalRing K := inferInstance\nx : K\nx_ne : x ≠ 0\ns : Set K\nγ : Γ₀ˣ\nhs : {y | ↑v (y - x⁻¹) < ↑γ} ⊆ s\nvx_ne : ↑v x ≠ 0\nγ' : ((fun x => Γ₀) x)ˣ := Units.mk0 (↑v x) vx_ne\ny : K\ny_in : y ∈ {y | ↑v (y - x) < ↑(min (γ * (γ' * γ')) γ')}\n⊢ y⁻¹ ∈ {y | ↑v (y - x⁻¹) < ↑γ}\n[PROOFSTEP]\nsimp only [mem_setOf_eq] at y_in \n[GOAL]\ncase h.a\nK : Type u_1\ninst✝² : DivisionRing K\nΓ₀ : Type u_2\ninst✝¹ : LinearOrderedCommGroupWithZero Γ₀\ninst✝ : Valued K Γ₀\nsrc✝ : TopologicalRing K := inferInstance\nx : K\nx_ne : x ≠ 0\ns : Set K\nγ : Γ₀ˣ\nhs : {y | ↑v (y - x⁻¹) < ↑γ} ⊆ s\nvx_ne : ↑v x ≠ 0\nγ' : ((fun x => Γ₀) x)ˣ := Units.mk0 (↑v x) vx_ne\ny : K\ny_in : ↑v (y - x) < ↑(min (γ * (Units.mk0 (↑v x) vx_ne * Units.mk0 (↑v x) vx_ne)) (Units.mk0 (↑v x) vx_ne))\n⊢ y⁻¹ ∈ {y | ↑v (y - x⁻¹) < ↑γ}\n[PROOFSTEP]\nrw [Units.min_val, Units.val_mul, Units.val_mul] at y_in \n[GOAL]\ncase h.a\nK : Type u_1\ninst✝² : DivisionRing K\nΓ₀ : Type u_2\ninst✝¹ : LinearOrderedCommGroupWithZero Γ₀\ninst✝ : Valued K Γ₀\nsrc✝ : TopologicalRing K := inferInstance\nx : K\nx_ne : x ≠ 0\ns : Set K\nγ : Γ₀ˣ\nhs : {y | ↑v (y - x⁻¹) < ↑γ} ⊆ s\nvx_ne : ↑v x ≠ 0\nγ' : ((fun x => Γ₀) x)ˣ := Units.mk0 (↑v x) vx_ne\ny : K\ny_in : ↑v (y - x) < min (↑γ * (↑(Units.mk0 (↑v x) vx_ne) * ↑(Units.mk0 (↑v x) vx_ne))) ↑(Units.mk0 (↑v x) vx_ne)\n⊢ y⁻¹ ∈ {y | ↑v (y - x⁻¹) < ↑γ}\n[PROOFSTEP]\nexact Valuation.inversion_estimate _ x_ne y_in\n[GOAL]\nK : Type u_1\ninst✝² : DivisionRing K\nΓ₀ : Type u_2\ninst✝¹ : LinearOrderedCommGroupWithZero Γ₀\ninst✝ : Valued K Γ₀\n⊢ SeparatedSpace K\n[PROOFSTEP]\nrw [separated_iff_t2]\n[GOAL]\nK : Type u_1\ninst✝² : DivisionRing K\nΓ₀ : Type u_2\ninst✝¹ : LinearOrderedCommGroupWithZero Γ₀\ninst✝ : Valued K Γ₀\n⊢ T2Space K\n[PROOFSTEP]\napply TopologicalAddGroup.t2Space_of_zero_sep\n[GOAL]\ncase H\nK : Type u_1\ninst✝² : DivisionRing K\nΓ₀ : Type u_2\ninst✝¹ : LinearOrderedCommGroupWithZero Γ₀\ninst✝ : Valued K Γ₀\n⊢ ∀ (x : K), x ≠ 0 → ∃ U, U ∈ 𝓝 0 ∧ ¬x ∈ U\n[PROOFSTEP]\nintro x x_ne\n[GOAL]\ncase H\nK : Type u_1\ninst✝² : DivisionRing K\nΓ₀ : Type u_2\ninst✝¹ : LinearOrderedCommGroupWithZero Γ₀\ninst✝ : Valued K Γ₀\nx : K\nx_ne : x ≠ 0\n⊢ ∃ U, U ∈ 𝓝 0 ∧ ¬x ∈ U\n[PROOFSTEP]\nrefine' ⟨{k | v k < v x}, _, fun h => lt_irrefl _ h⟩\n[GOAL]\ncase H\nK : Type u_1\ninst✝² : DivisionRing K\nΓ₀ : Type u_2\ninst✝¹ : LinearOrderedCommGroupWithZero Γ₀\ninst✝ : Valued K Γ₀\nx : K\nx_ne : x ≠ 0\n⊢ {k | ↑v k < ↑v x} ∈ 𝓝 0\n[PROOFSTEP]\nrw [Valued.mem_nhds]\n[GOAL]\ncase H\nK : Type u_1\ninst✝² : DivisionRing K\nΓ₀ : Type u_2\ninst✝¹ : LinearOrderedCommGroupWithZero Γ₀\ninst✝ : Valued K Γ₀\nx : K\nx_ne : x ≠ 0\n⊢ ∃ γ, {y | ↑v (y - 0) < ↑γ} ⊆ {k | ↑v k < ↑v x}\n[PROOFSTEP]\nhave vx_ne := (Valuation.ne_zero_iff <| v).mpr x_ne\n[GOAL]\ncase H\nK : Type u_1\ninst✝² : DivisionRing K\nΓ₀ : Type u_2\ninst✝¹ : LinearOrderedCommGroupWithZero Γ₀\ninst✝ : Valued K Γ₀\nx : K\nx_ne : x ≠ 0\nvx_ne : ↑v x ≠ 0\n⊢ ∃ γ, {y | ↑v (y - 0) < ↑γ} ⊆ {k | ↑v k < ↑v x}\n[PROOFSTEP]\nlet γ' := Units.mk0 _ vx_ne\n[GOAL]\ncase H\nK : Type u_1\ninst✝² : DivisionRing K\nΓ₀ : Type u_2\ninst✝¹ : LinearOrderedCommGroupWithZero Γ₀\ninst✝ : Valued K Γ₀\nx : K\nx_ne : x ≠ 0\nvx_ne : ↑v x ≠ 0\nγ' : ((fun x => Γ₀) x)ˣ := Units.mk0 (↑v x) vx_ne\n⊢ ∃ γ, {y | ↑v (y - 0) < ↑γ} ⊆ {k | ↑v k < ↑v x}\n[PROOFSTEP]\nexact ⟨γ', fun y hy => by simpa using hy⟩\n[GOAL]\nK : Type u_1\ninst✝² : DivisionRing K\nΓ₀ : Type u_2\ninst✝¹ : LinearOrderedCommGroupWithZero Γ₀\ninst✝ : Valued K Γ₀\nx : K\nx_ne : x ≠ 0\nvx_ne : ↑v x ≠ 0\nγ' : ((fun x => Γ₀) x)ˣ := Units.mk0 (↑v x) vx_ne\ny : K\nhy : y ∈ {y | ↑v (y - 0) < ↑γ'}\n⊢ y ∈ {k | ↑v k < ↑v x}\n[PROOFSTEP]\nsimpa using hy\n[GOAL]\nK : Type u_1\ninst✝² : DivisionRing K\nΓ₀ : Type u_2\ninst✝¹ : LinearOrderedCommGroupWithZero Γ₀\ninst✝ : Valued K Γ₀\n⊢ Continuous ↑v\n[PROOFSTEP]\nrw [continuous_iff_continuousAt]\n[GOAL]\nK : Type u_1\ninst✝² : DivisionRing K\nΓ₀ : Type u_2\ninst✝¹ : LinearOrderedCommGroupWithZero Γ₀\ninst✝ : Valued K Γ₀\n⊢ ∀ (x : K), ContinuousAt (↑v) x\n[PROOFSTEP]\nintro x\n[GOAL]\nK : Type u_1\ninst✝² : DivisionRing K\nΓ₀ : Type u_2\ninst✝¹ : LinearOrderedCommGroupWithZero Γ₀\ninst✝ : Valued K Γ₀\nx : K\n⊢ ContinuousAt (↑v) x\n[PROOFSTEP]\nrcases eq_or_ne x 0 with (rfl | h)\n[GOAL]\ncase inl\nK : Type u_1\ninst✝² : DivisionRing K\nΓ₀ : Type u_2\ninst✝¹ : LinearOrderedCommGroupWithZero Γ₀\ninst✝ : Valued K Γ₀\n⊢ ContinuousAt (↑v) 0\n[PROOFSTEP]\nrw [ContinuousAt, map_zero, WithZeroTopology.tendsto_zero]\n[GOAL]\ncase inl\nK : Type u_1\ninst✝² : DivisionRing K\nΓ₀ : Type u_2\ninst✝¹ : LinearOrderedCommGroupWithZero Γ₀\ninst✝ : Valued K Γ₀\n⊢ ∀ (γ₀ : Γ₀), γ₀ ≠ 0 → ∀ᶠ (x : K) in 𝓝 0, ↑v x < γ₀\n[PROOFSTEP]\nintro γ hγ\n[GOAL]\ncase inl\nK : Type u_1\ninst✝² : DivisionRing K\nΓ₀ : Type u_2\ninst✝¹ : LinearOrderedCommGroupWithZero Γ₀\ninst✝ : Valued K Γ₀\nγ : Γ₀\nhγ : γ ≠ 0\n⊢ ∀ᶠ (x : K) in 𝓝 0, ↑v x < γ\n[PROOFSTEP]\nrw [Filter.Eventually, Valued.mem_nhds_zero]\n[GOAL]\ncase inl\nK : Type u_1\ninst✝² : DivisionRing K\nΓ₀ : Type u_2\ninst✝¹ : LinearOrderedCommGroupWithZero Γ₀\ninst✝ : Valued K Γ₀\nγ : Γ₀\nhγ : γ ≠ 0\n⊢ ∃ γ_1, {x | ↑v x < ↑γ_1} ⊆ {x | ↑v x < γ}\n[PROOFSTEP]\nuse Units.mk0 γ hγ\n[GOAL]\ncase h\nK : Type u_1\ninst✝² : DivisionRing K\nΓ₀ : Type u_2\ninst✝¹ : LinearOrderedCommGroupWithZero Γ₀\ninst✝ : Valued K Γ₀\nγ : Γ₀\nhγ : γ ≠ 0\n⊢ {x | ↑v x < ↑(Units.mk0 γ hγ)} ⊆ {x | ↑v x < γ}\n[PROOFSTEP]\nrfl\n[GOAL]\ncase inr\nK : Type u_1\ninst✝² : DivisionRing K\nΓ₀ : Type u_2\ninst✝¹ : LinearOrderedCommGroupWithZero Γ₀\ninst✝ : Valued K Γ₀\nx : K\nh : x ≠ 0\n⊢ ContinuousAt (↑v) x\n[PROOFSTEP]\nhave v_ne : (v x : Γ₀) ≠ 0 := (Valuation.ne_zero_iff _).mpr h\n[GOAL]\ncase inr\nK : Type u_1\ninst✝² : DivisionRing K\nΓ₀ : Type u_2\ninst✝¹ : LinearOrderedCommGroupWithZero Γ₀\ninst✝ : Valued K Γ₀\nx : K\nh : x ≠ 0\nv_ne : ↑v x ≠ 0\n⊢ ContinuousAt (↑v) x\n[PROOFSTEP]\nrw [ContinuousAt, WithZeroTopology.tendsto_of_ne_zero v_ne]\n[GOAL]\ncase inr\nK : Type u_1\ninst✝² : DivisionRing K\nΓ₀ : Type u_2\ninst✝¹ : LinearOrderedCommGroupWithZero Γ₀\ninst✝ : Valued K Γ₀\nx : K\nh : x ≠ 0\nv_ne : ↑v x ≠ 0\n⊢ ∀ᶠ (x_1 : K) in 𝓝 x, ↑v x_1 = ↑v x\n[PROOFSTEP]\napply Valued.loc_const v_ne\n[GOAL]\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nsrc✝ : SeparatedSpace K := ValuedRing.separated\n⊢ ∀ (F : Filter K), Cauchy F → 𝓝 0 ⊓ F = ⊥ → Cauchy (map (fun x => x⁻¹) F)\n[PROOFSTEP]\nrintro F hF h0\n[GOAL]\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nsrc✝ : SeparatedSpace K := ValuedRing.separated\nF : Filter K\nhF : Cauchy F\nh0 : 𝓝 0 ⊓ F = ⊥\n⊢ Cauchy (map (fun x => x⁻¹) F)\n[PROOFSTEP]\nhave : ∃ γ₀ : Γ₀ˣ, ∃ M ∈ F, ∀ x ∈ M, (γ₀ : Γ₀) ≤ v x :=\n  by\n  rcases Filter.inf_eq_bot_iff.mp h0 with ⟨U, U_in, M, M_in, H⟩\n  rcases Valued.mem_nhds_zero.mp U_in with ⟨γ₀, hU⟩\n  exists γ₀, M, M_in\n  intro x xM\n  apply le_of_not_lt _\n  intro hyp\n  have : x ∈ U ∩ M := ⟨hU hyp, xM⟩\n  rwa [H] at this \n[GOAL]\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nsrc✝ : SeparatedSpace K := ValuedRing.separated\nF : Filter K\nhF : Cauchy F\nh0 : 𝓝 0 ⊓ F = ⊥\n⊢ ∃ γ₀ M, M ∈ F ∧ ∀ (x : K), x ∈ M → ↑γ₀ ≤ ↑v x\n[PROOFSTEP]\nrcases Filter.inf_eq_bot_iff.mp h0 with ⟨U, U_in, M, M_in, H⟩\n[GOAL]\ncase intro.intro.intro.intro\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nsrc✝ : SeparatedSpace K := ValuedRing.separated\nF : Filter K\nhF : Cauchy F\nh0 : 𝓝 0 ⊓ F = ⊥\nU : Set K\nU_in : U ∈ 𝓝 0\nM : Set K\nM_in : M ∈ F\nH : U ∩ M = ∅\n⊢ ∃ γ₀ M, M ∈ F ∧ ∀ (x : K), x ∈ M → ↑γ₀ ≤ ↑v x\n[PROOFSTEP]\nrcases Valued.mem_nhds_zero.mp U_in with ⟨γ₀, hU⟩\n[GOAL]\ncase intro.intro.intro.intro.intro\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nsrc✝ : SeparatedSpace K := ValuedRing.separated\nF : Filter K\nhF : Cauchy F\nh0 : 𝓝 0 ⊓ F = ⊥\nU : Set K\nU_in : U ∈ 𝓝 0\nM : Set K\nM_in : M ∈ F\nH : U ∩ M = ∅\nγ₀ : Γ₀ˣ\nhU : {x | ↑v x < ↑γ₀} ⊆ U\n⊢ ∃ γ₀ M, M ∈ F ∧ ∀ (x : K), x ∈ M → ↑γ₀ ≤ ↑v x\n[PROOFSTEP]\nexists γ₀, M, M_in\n[GOAL]\ncase intro.intro.intro.intro.intro\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nsrc✝ : SeparatedSpace K := ValuedRing.separated\nF : Filter K\nhF : Cauchy F\nh0 : 𝓝 0 ⊓ F = ⊥\nU : Set K\nU_in : U ∈ 𝓝 0\nM : Set K\nM_in : M ∈ F\nH : U ∩ M = ∅\nγ₀ : Γ₀ˣ\nhU : {x | ↑v x < ↑γ₀} ⊆ U\n⊢ ∀ (x : K), x ∈ M → ↑γ₀ ≤ ↑v x\n[PROOFSTEP]\nintro x xM\n[GOAL]\ncase intro.intro.intro.intro.intro\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nsrc✝ : SeparatedSpace K := ValuedRing.separated\nF : Filter K\nhF : Cauchy F\nh0 : 𝓝 0 ⊓ F = ⊥\nU : Set K\nU_in : U ∈ 𝓝 0\nM : Set K\nM_in : M ∈ F\nH : U ∩ M = ∅\nγ₀ : Γ₀ˣ\nhU : {x | ↑v x < ↑γ₀} ⊆ U\nx : K\nxM : x ∈ M\n⊢ ↑γ₀ ≤ ↑v x\n[PROOFSTEP]\napply le_of_not_lt _\n[GOAL]\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nsrc✝ : SeparatedSpace K := ValuedRing.separated\nF : Filter K\nhF : Cauchy F\nh0 : 𝓝 0 ⊓ F = ⊥\nU : Set K\nU_in : U ∈ 𝓝 0\nM : Set K\nM_in : M ∈ F\nH : U ∩ M = ∅\nγ₀ : Γ₀ˣ\nhU : {x | ↑v x < ↑γ₀} ⊆ U\nx : K\nxM : x ∈ M\n⊢ ¬↑v x < ↑γ₀\n[PROOFSTEP]\nintro hyp\n[GOAL]\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nsrc✝ : SeparatedSpace K := ValuedRing.separated\nF : Filter K\nhF : Cauchy F\nh0 : 𝓝 0 ⊓ F = ⊥\nU : Set K\nU_in : U ∈ 𝓝 0\nM : Set K\nM_in : M ∈ F\nH : U ∩ M = ∅\nγ₀ : Γ₀ˣ\nhU : {x | ↑v x < ↑γ₀} ⊆ U\nx : K\nxM : x ∈ M\nhyp : ↑v x < ↑γ₀\n⊢ False\n[PROOFSTEP]\nhave : x ∈ U ∩ M := ⟨hU hyp, xM⟩\n[GOAL]\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nsrc✝ : SeparatedSpace K := ValuedRing.separated\nF : Filter K\nhF : Cauchy F\nh0 : 𝓝 0 ⊓ F = ⊥\nU : Set K\nU_in : U ∈ 𝓝 0\nM : Set K\nM_in : M ∈ F\nH : U ∩ M = ∅\nγ₀ : Γ₀ˣ\nhU : {x | ↑v x < ↑γ₀} ⊆ U\nx : K\nxM : x ∈ M\nhyp : ↑v x < ↑γ₀\nthis : x ∈ U ∩ M\n⊢ False\n[PROOFSTEP]\nrwa [H] at this \n[GOAL]\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nsrc✝ : SeparatedSpace K := ValuedRing.separated\nF : Filter K\nhF : Cauchy F\nh0 : 𝓝 0 ⊓ F = ⊥\nthis : ∃ γ₀ M, M ∈ F ∧ ∀ (x : K), x ∈ M → ↑γ₀ ≤ ↑v x\n⊢ Cauchy (map (fun x => x⁻¹) F)\n[PROOFSTEP]\nrcases this with ⟨γ₀, M₀, M₀_in, H₀⟩\n[GOAL]\ncase intro.intro.intro\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nsrc✝ : SeparatedSpace K := ValuedRing.separated\nF : Filter K\nhF : Cauchy F\nh0 : 𝓝 0 ⊓ F = ⊥\nγ₀ : Γ₀ˣ\nM₀ : Set K\nM₀_in : M₀ ∈ F\nH₀ : ∀ (x : K), x ∈ M₀ → ↑γ₀ ≤ ↑v x\n⊢ Cauchy (map (fun x => x⁻¹) F)\n[PROOFSTEP]\nrw [Valued.cauchy_iff] at hF ⊢\n[GOAL]\ncase intro.intro.intro\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nsrc✝ : SeparatedSpace K := ValuedRing.separated\nF : Filter K\nhF : NeBot F ∧ ∀ (γ : Γ₀ˣ), ∃ M, M ∈ F ∧ ∀ (x : K), x ∈ M → ∀ (y : K), y ∈ M → ↑v (y - x) < ↑γ\nh0 : 𝓝 0 ⊓ F = ⊥\nγ₀ : Γ₀ˣ\nM₀ : Set K\nM₀_in : M₀ ∈ F\nH₀ : ∀ (x : K), x ∈ M₀ → ↑γ₀ ≤ ↑v x\n⊢ NeBot (map (fun x => x⁻¹) F) ∧\n    ∀ (γ : Γ₀ˣ), ∃ M, M ∈ map (fun x => x⁻¹) F ∧ ∀ (x : K), x ∈ M → ∀ (y : K), y ∈ M → ↑v (y - x) < ↑γ\n[PROOFSTEP]\nrefine' ⟨hF.1.map _, _⟩\n[GOAL]\ncase intro.intro.intro\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nsrc✝ : SeparatedSpace K := ValuedRing.separated\nF : Filter K\nhF : NeBot F ∧ ∀ (γ : Γ₀ˣ), ∃ M, M ∈ F ∧ ∀ (x : K), x ∈ M → ∀ (y : K), y ∈ M → ↑v (y - x) < ↑γ\nh0 : 𝓝 0 ⊓ F = ⊥\nγ₀ : Γ₀ˣ\nM₀ : Set K\nM₀_in : M₀ ∈ F\nH₀ : ∀ (x : K), x ∈ M₀ → ↑γ₀ ≤ ↑v x\n⊢ ∀ (γ : Γ₀ˣ), ∃ M, M ∈ map (fun x => x⁻¹) F ∧ ∀ (x : K), x ∈ M → ∀ (y : K), y ∈ M → ↑v (y - x) < ↑γ\n[PROOFSTEP]\nreplace hF := hF.2\n[GOAL]\ncase intro.intro.intro\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nsrc✝ : SeparatedSpace K := ValuedRing.separated\nF : Filter K\nh0 : 𝓝 0 ⊓ F = ⊥\nγ₀ : Γ₀ˣ\nM₀ : Set K\nM₀_in : M₀ ∈ F\nH₀ : ∀ (x : K), x ∈ M₀ → ↑γ₀ ≤ ↑v x\nhF : ∀ (γ : Γ₀ˣ), ∃ M, M ∈ F ∧ ∀ (x : K), x ∈ M → ∀ (y : K), y ∈ M → ↑v (y - x) < ↑γ\n⊢ ∀ (γ : Γ₀ˣ), ∃ M, M ∈ map (fun x => x⁻¹) F ∧ ∀ (x : K), x ∈ M → ∀ (y : K), y ∈ M → ↑v (y - x) < ↑γ\n[PROOFSTEP]\nintro γ\n[GOAL]\ncase intro.intro.intro\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nsrc✝ : SeparatedSpace K := ValuedRing.separated\nF : Filter K\nh0 : 𝓝 0 ⊓ F = ⊥\nγ₀ : Γ₀ˣ\nM₀ : Set K\nM₀_in : M₀ ∈ F\nH₀ : ∀ (x : K), x ∈ M₀ → ↑γ₀ ≤ ↑v x\nhF : ∀ (γ : Γ₀ˣ), ∃ M, M ∈ F ∧ ∀ (x : K), x ∈ M → ∀ (y : K), y ∈ M → ↑v (y - x) < ↑γ\nγ : Γ₀ˣ\n⊢ ∃ M, M ∈ map (fun x => x⁻¹) F ∧ ∀ (x : K), x ∈ M → ∀ (y : K), y ∈ M → ↑v (y - x) < ↑γ\n[PROOFSTEP]\nrcases hF (min (γ * γ₀ * γ₀) γ₀) with ⟨M₁, M₁_in, H₁⟩\n[GOAL]\ncase intro.intro.intro.intro.intro\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nsrc✝ : SeparatedSpace K := ValuedRing.separated\nF : Filter K\nh0 : 𝓝 0 ⊓ F = ⊥\nγ₀ : Γ₀ˣ\nM₀ : Set K\nM₀_in : M₀ ∈ F\nH₀ : ∀ (x : K), x ∈ M₀ → ↑γ₀ ≤ ↑v x\nhF : ∀ (γ : Γ₀ˣ), ∃ M, M ∈ F ∧ ∀ (x : K), x ∈ M → ∀ (y : K), y ∈ M → ↑v (y - x) < ↑γ\nγ : Γ₀ˣ\nM₁ : Set K\nM₁_in : M₁ ∈ F\nH₁ : ∀ (x : K), x ∈ M₁ → ∀ (y : K), y ∈ M₁ → ↑v (y - x) < ↑(min (γ * γ₀ * γ₀) γ₀)\n⊢ ∃ M, M ∈ map (fun x => x⁻¹) F ∧ ∀ (x : K), x ∈ M → ∀ (y : K), y ∈ M → ↑v (y - x) < ↑γ\n[PROOFSTEP]\nclear hF\n[GOAL]\ncase intro.intro.intro.intro.intro\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nsrc✝ : SeparatedSpace K := ValuedRing.separated\nF : Filter K\nh0 : 𝓝 0 ⊓ F = ⊥\nγ₀ : Γ₀ˣ\nM₀ : Set K\nM₀_in : M₀ ∈ F\nH₀ : ∀ (x : K), x ∈ M₀ → ↑γ₀ ≤ ↑v x\nγ : Γ₀ˣ\nM₁ : Set K\nM₁_in : M₁ ∈ F\nH₁ : ∀ (x : K), x ∈ M₁ → ∀ (y : K), y ∈ M₁ → ↑v (y - x) < ↑(min (γ * γ₀ * γ₀) γ₀)\n⊢ ∃ M, M ∈ map (fun x => x⁻¹) F ∧ ∀ (x : K), x ∈ M → ∀ (y : K), y ∈ M → ↑v (y - x) < ↑γ\n[PROOFSTEP]\nuse(fun x : K => x⁻¹) '' (M₀ ∩ M₁)\n[GOAL]\ncase h\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nsrc✝ : SeparatedSpace K := ValuedRing.separated\nF : Filter K\nh0 : 𝓝 0 ⊓ F = ⊥\nγ₀ : Γ₀ˣ\nM₀ : Set K\nM₀_in : M₀ ∈ F\nH₀ : ∀ (x : K), x ∈ M₀ → ↑γ₀ ≤ ↑v x\nγ : Γ₀ˣ\nM₁ : Set K\nM₁_in : M₁ ∈ F\nH₁ : ∀ (x : K), x ∈ M₁ → ∀ (y : K), y ∈ M₁ → ↑v (y - x) < ↑(min (γ * γ₀ * γ₀) γ₀)\n⊢ (fun x => x⁻¹) '' (M₀ ∩ M₁) ∈ map (fun x => x⁻¹) F ∧\n    ∀ (x : K), x ∈ (fun x => x⁻¹) '' (M₀ ∩ M₁) → ∀ (y : K), y ∈ (fun x => x⁻¹) '' (M₀ ∩ M₁) → ↑v (y - x) < ↑γ\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.left\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nsrc✝ : SeparatedSpace K := ValuedRing.separated\nF : Filter K\nh0 : 𝓝 0 ⊓ F = ⊥\nγ₀ : Γ₀ˣ\nM₀ : Set K\nM₀_in : M₀ ∈ F\nH₀ : ∀ (x : K), x ∈ M₀ → ↑γ₀ ≤ ↑v x\nγ : Γ₀ˣ\nM₁ : Set K\nM₁_in : M₁ ∈ F\nH₁ : ∀ (x : K), x ∈ M₁ → ∀ (y : K), y ∈ M₁ → ↑v (y - x) < ↑(min (γ * γ₀ * γ₀) γ₀)\n⊢ (fun x => x⁻¹) '' (M₀ ∩ M₁) ∈ map (fun x => x⁻¹) F\n[PROOFSTEP]\nrw [mem_map]\n[GOAL]\ncase h.left\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nsrc✝ : SeparatedSpace K := ValuedRing.separated\nF : Filter K\nh0 : 𝓝 0 ⊓ F = ⊥\nγ₀ : Γ₀ˣ\nM₀ : Set K\nM₀_in : M₀ ∈ F\nH₀ : ∀ (x : K), x ∈ M₀ → ↑γ₀ ≤ ↑v x\nγ : Γ₀ˣ\nM₁ : Set K\nM₁_in : M₁ ∈ F\nH₁ : ∀ (x : K), x ∈ M₁ → ∀ (y : K), y ∈ M₁ → ↑v (y - x) < ↑(min (γ * γ₀ * γ₀) γ₀)\n⊢ (fun x => x⁻¹) ⁻¹' ((fun x => x⁻¹) '' (M₀ ∩ M₁)) ∈ F\n[PROOFSTEP]\napply mem_of_superset (Filter.inter_mem M₀_in M₁_in)\n[GOAL]\ncase h.left\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nsrc✝ : SeparatedSpace K := ValuedRing.separated\nF : Filter K\nh0 : 𝓝 0 ⊓ F = ⊥\nγ₀ : Γ₀ˣ\nM₀ : Set K\nM₀_in : M₀ ∈ F\nH₀ : ∀ (x : K), x ∈ M₀ → ↑γ₀ ≤ ↑v x\nγ : Γ₀ˣ\nM₁ : Set K\nM₁_in : M₁ ∈ F\nH₁ : ∀ (x : K), x ∈ M₁ → ∀ (y : K), y ∈ M₁ → ↑v (y - x) < ↑(min (γ * γ₀ * γ₀) γ₀)\n⊢ M₀ ∩ M₁ ⊆ (fun x => x⁻¹) ⁻¹' ((fun x => x⁻¹) '' (M₀ ∩ M₁))\n[PROOFSTEP]\nexact subset_preimage_image _ _\n[GOAL]\ncase h.right\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nsrc✝ : SeparatedSpace K := ValuedRing.separated\nF : Filter K\nh0 : 𝓝 0 ⊓ F = ⊥\nγ₀ : Γ₀ˣ\nM₀ : Set K\nM₀_in : M₀ ∈ F\nH₀ : ∀ (x : K), x ∈ M₀ → ↑γ₀ ≤ ↑v x\nγ : Γ₀ˣ\nM₁ : Set K\nM₁_in : M₁ ∈ F\nH₁ : ∀ (x : K), x ∈ M₁ → ∀ (y : K), y ∈ M₁ → ↑v (y - x) < ↑(min (γ * γ₀ * γ₀) γ₀)\n⊢ ∀ (x : K), x ∈ (fun x => x⁻¹) '' (M₀ ∩ M₁) → ∀ (y : K), y ∈ (fun x => x⁻¹) '' (M₀ ∩ M₁) → ↑v (y - x) < ↑γ\n[PROOFSTEP]\nrintro _ ⟨x, ⟨x_in₀, x_in₁⟩, rfl⟩ _ ⟨y, ⟨y_in₀, y_in₁⟩, rfl⟩\n[GOAL]\ncase h.right.intro.intro.intro.intro.intro.intro\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nsrc✝ : SeparatedSpace K := ValuedRing.separated\nF : Filter K\nh0 : 𝓝 0 ⊓ F = ⊥\nγ₀ : Γ₀ˣ\nM₀ : Set K\nM₀_in : M₀ ∈ F\nH₀ : ∀ (x : K), x ∈ M₀ → ↑γ₀ ≤ ↑v x\nγ : Γ₀ˣ\nM₁ : Set K\nM₁_in : M₁ ∈ F\nH₁ : ∀ (x : K), x ∈ M₁ → ∀ (y : K), y ∈ M₁ → ↑v (y - x) < ↑(min (γ * γ₀ * γ₀) γ₀)\nx : K\nx_in₀ : x ∈ M₀\nx_in₁ : x ∈ M₁\ny : K\ny_in₀ : y ∈ M₀\ny_in₁ : y ∈ M₁\n⊢ ↑v ((fun x => x⁻¹) y - (fun x => x⁻¹) x) < ↑γ\n[PROOFSTEP]\nsimp only [mem_setOf_eq]\n[GOAL]\ncase h.right.intro.intro.intro.intro.intro.intro\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nsrc✝ : SeparatedSpace K := ValuedRing.separated\nF : Filter K\nh0 : 𝓝 0 ⊓ F = ⊥\nγ₀ : Γ₀ˣ\nM₀ : Set K\nM₀_in : M₀ ∈ F\nH₀ : ∀ (x : K), x ∈ M₀ → ↑γ₀ ≤ ↑v x\nγ : Γ₀ˣ\nM₁ : Set K\nM₁_in : M₁ ∈ F\nH₁ : ∀ (x : K), x ∈ M₁ → ∀ (y : K), y ∈ M₁ → ↑v (y - x) < ↑(min (γ * γ₀ * γ₀) γ₀)\nx : K\nx_in₀ : x ∈ M₀\nx_in₁ : x ∈ M₁\ny : K\ny_in₀ : y ∈ M₀\ny_in₁ : y ∈ M₁\n⊢ ↑v (y⁻¹ - x⁻¹) < ↑γ\n[PROOFSTEP]\nspecialize H₁ x x_in₁ y y_in₁\n[GOAL]\ncase h.right.intro.intro.intro.intro.intro.intro\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nsrc✝ : SeparatedSpace K := ValuedRing.separated\nF : Filter K\nh0 : 𝓝 0 ⊓ F = ⊥\nγ₀ : Γ₀ˣ\nM₀ : Set K\nM₀_in : M₀ ∈ F\nH₀ : ∀ (x : K), x ∈ M₀ → ↑γ₀ ≤ ↑v x\nγ : Γ₀ˣ\nM₁ : Set K\nM₁_in : M₁ ∈ F\nx : K\nx_in₀ : x ∈ M₀\nx_in₁ : x ∈ M₁\ny : K\ny_in₀ : y ∈ M₀\ny_in₁ : y ∈ M₁\nH₁ : ↑v (y - x) < ↑(min (γ * γ₀ * γ₀) γ₀)\n⊢ ↑v (y⁻¹ - x⁻¹) < ↑γ\n[PROOFSTEP]\nreplace x_in₀ := H₀ x x_in₀\n[GOAL]\ncase h.right.intro.intro.intro.intro.intro.intro\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nsrc✝ : SeparatedSpace K := ValuedRing.separated\nF : Filter K\nh0 : 𝓝 0 ⊓ F = ⊥\nγ₀ : Γ₀ˣ\nM₀ : Set K\nM₀_in : M₀ ∈ F\nH₀ : ∀ (x : K), x ∈ M₀ → ↑γ₀ ≤ ↑v x\nγ : Γ₀ˣ\nM₁ : Set K\nM₁_in : M₁ ∈ F\nx : K\nx_in₁ : x ∈ M₁\ny : K\ny_in₀ : y ∈ M₀\ny_in₁ : y ∈ M₁\nH₁ : ↑v (y - x) < ↑(min (γ * γ₀ * γ₀) γ₀)\nx_in₀ : ↑γ₀ ≤ ↑v x\n⊢ ↑v (y⁻¹ - x⁻¹) < ↑γ\n[PROOFSTEP]\nreplace := H₀ y y_in₀\n[GOAL]\ncase h.right.intro.intro.intro.intro.intro.intro\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nsrc✝ : SeparatedSpace K := ValuedRing.separated\nF : Filter K\nh0 : 𝓝 0 ⊓ F = ⊥\nγ₀ : Γ₀ˣ\nM₀ : Set K\nM₀_in : M₀ ∈ F\nH₀ : ∀ (x : K), x ∈ M₀ → ↑γ₀ ≤ ↑v x\nγ : Γ₀ˣ\nM₁ : Set K\nM₁_in : M₁ ∈ F\nx : K\nx_in₁ : x ∈ M₁\ny : K\ny_in₀ : y ∈ M₀\ny_in₁ : y ∈ M₁\nH₁ : ↑v (y - x) < ↑(min (γ * γ₀ * γ₀) γ₀)\nx_in₀ : ↑γ₀ ≤ ↑v x\nthis : ↑γ₀ ≤ ↑v y\n⊢ ↑v (y⁻¹ - x⁻¹) < ↑γ\n[PROOFSTEP]\nclear H₀\n[GOAL]\ncase h.right.intro.intro.intro.intro.intro.intro\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nsrc✝ : SeparatedSpace K := ValuedRing.separated\nF : Filter K\nh0 : 𝓝 0 ⊓ F = ⊥\nγ₀ : Γ₀ˣ\nM₀ : Set K\nM₀_in : M₀ ∈ F\nγ : Γ₀ˣ\nM₁ : Set K\nM₁_in : M₁ ∈ F\nx : K\nx_in₁ : x ∈ M₁\ny : K\ny_in₀ : y ∈ M₀\ny_in₁ : y ∈ M₁\nH₁ : ↑v (y - x) < ↑(min (γ * γ₀ * γ₀) γ₀)\nx_in₀ : ↑γ₀ ≤ ↑v x\nthis : ↑γ₀ ≤ ↑v y\n⊢ ↑v (y⁻¹ - x⁻¹) < ↑γ\n[PROOFSTEP]\napply Valuation.inversion_estimate\n[GOAL]\ncase h.right.intro.intro.intro.intro.intro.intro.y_ne\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nsrc✝ : SeparatedSpace K := ValuedRing.separated\nF : Filter K\nh0 : 𝓝 0 ⊓ F = ⊥\nγ₀ : Γ₀ˣ\nM₀ : Set K\nM₀_in : M₀ ∈ F\nγ : Γ₀ˣ\nM₁ : Set K\nM₁_in : M₁ ∈ F\nx : K\nx_in₁ : x ∈ M₁\ny : K\ny_in₀ : y ∈ M₀\ny_in₁ : y ∈ M₁\nH₁ : ↑v (y - x) < ↑(min (γ * γ₀ * γ₀) γ₀)\nx_in₀ : ↑γ₀ ≤ ↑v x\nthis : ↑γ₀ ≤ ↑v y\n⊢ x ≠ 0\n[PROOFSTEP]\nhave : (v x : Γ₀) ≠ 0 := by\n  intro h\n  rw [h] at x_in₀ \n  simp at x_in₀ \n[GOAL]\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nsrc✝ : SeparatedSpace K := ValuedRing.separated\nF : Filter K\nh0 : 𝓝 0 ⊓ F = ⊥\nγ₀ : Γ₀ˣ\nM₀ : Set K\nM₀_in : M₀ ∈ F\nγ : Γ₀ˣ\nM₁ : Set K\nM₁_in : M₁ ∈ F\nx : K\nx_in₁ : x ∈ M₁\ny : K\ny_in₀ : y ∈ M₀\ny_in₁ : y ∈ M₁\nH₁ : ↑v (y - x) < ↑(min (γ * γ₀ * γ₀) γ₀)\nx_in₀ : ↑γ₀ ≤ ↑v x\nthis : ↑γ₀ ≤ ↑v y\n⊢ ↑v x ≠ 0\n[PROOFSTEP]\nintro h\n[GOAL]\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nsrc✝ : SeparatedSpace K := ValuedRing.separated\nF : Filter K\nh0 : 𝓝 0 ⊓ F = ⊥\nγ₀ : Γ₀ˣ\nM₀ : Set K\nM₀_in : M₀ ∈ F\nγ : Γ₀ˣ\nM₁ : Set K\nM₁_in : M₁ ∈ F\nx : K\nx_in₁ : x ∈ M₁\ny : K\ny_in₀ : y ∈ M₀\ny_in₁ : y ∈ M₁\nH₁ : ↑v (y - x) < ↑(min (γ * γ₀ * γ₀) γ₀)\nx_in₀ : ↑γ₀ ≤ ↑v x\nthis : ↑γ₀ ≤ ↑v y\nh : ↑v x = 0\n⊢ False\n[PROOFSTEP]\nrw [h] at x_in₀ \n[GOAL]\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nsrc✝ : SeparatedSpace K := ValuedRing.separated\nF : Filter K\nh0 : 𝓝 0 ⊓ F = ⊥\nγ₀ : Γ₀ˣ\nM₀ : Set K\nM₀_in : M₀ ∈ F\nγ : Γ₀ˣ\nM₁ : Set K\nM₁_in : M₁ ∈ F\nx : K\nx_in₁ : x ∈ M₁\ny : K\ny_in₀ : y ∈ M₀\ny_in₁ : y ∈ M₁\nH₁ : ↑v (y - x) < ↑(min (γ * γ₀ * γ₀) γ₀)\nx_in₀ : ↑γ₀ ≤ 0\nthis : ↑γ₀ ≤ ↑v y\nh : ↑v x = 0\n⊢ False\n[PROOFSTEP]\nsimp at x_in₀ \n[GOAL]\ncase h.right.intro.intro.intro.intro.intro.intro.y_ne\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nsrc✝ : SeparatedSpace K := ValuedRing.separated\nF : Filter K\nh0 : 𝓝 0 ⊓ F = ⊥\nγ₀ : Γ₀ˣ\nM₀ : Set K\nM₀_in : M₀ ∈ F\nγ : Γ₀ˣ\nM₁ : Set K\nM₁_in : M₁ ∈ F\nx : K\nx_in₁ : x ∈ M₁\ny : K\ny_in₀ : y ∈ M₀\ny_in₁ : y ∈ M₁\nH₁ : ↑v (y - x) < ↑(min (γ * γ₀ * γ₀) γ₀)\nx_in₀ : ↑γ₀ ≤ ↑v x\nthis✝ : ↑γ₀ ≤ ↑v y\nthis : ↑v x ≠ 0\n⊢ x ≠ 0\n[PROOFSTEP]\nexact (Valuation.ne_zero_iff _).mp this\n[GOAL]\ncase h.right.intro.intro.intro.intro.intro.intro.h\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nsrc✝ : SeparatedSpace K := ValuedRing.separated\nF : Filter K\nh0 : 𝓝 0 ⊓ F = ⊥\nγ₀ : Γ₀ˣ\nM₀ : Set K\nM₀_in : M₀ ∈ F\nγ : Γ₀ˣ\nM₁ : Set K\nM₁_in : M₁ ∈ F\nx : K\nx_in₁ : x ∈ M₁\ny : K\ny_in₀ : y ∈ M₀\ny_in₁ : y ∈ M₁\nH₁ : ↑v (y - x) < ↑(min (γ * γ₀ * γ₀) γ₀)\nx_in₀ : ↑γ₀ ≤ ↑v x\nthis : ↑γ₀ ≤ ↑v y\n⊢ ↑v (y - x) < min (↑γ * (↑v x * ↑v x)) (↑v x)\n[PROOFSTEP]\nrefine' lt_of_lt_of_le H₁ _\n[GOAL]\ncase h.right.intro.intro.intro.intro.intro.intro.h\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nsrc✝ : SeparatedSpace K := ValuedRing.separated\nF : Filter K\nh0 : 𝓝 0 ⊓ F = ⊥\nγ₀ : Γ₀ˣ\nM₀ : Set K\nM₀_in : M₀ ∈ F\nγ : Γ₀ˣ\nM₁ : Set K\nM₁_in : M₁ ∈ F\nx : K\nx_in₁ : x ∈ M₁\ny : K\ny_in₀ : y ∈ M₀\ny_in₁ : y ∈ M₁\nH₁ : ↑v (y - x) < ↑(min (γ * γ₀ * γ₀) γ₀)\nx_in₀ : ↑γ₀ ≤ ↑v x\nthis : ↑γ₀ ≤ ↑v y\n⊢ ↑(min (γ * γ₀ * γ₀) γ₀) ≤ min (↑γ * (↑v x * ↑v x)) (↑v x)\n[PROOFSTEP]\nrw [Units.min_val]\n[GOAL]\ncase h.right.intro.intro.intro.intro.intro.intro.h\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nsrc✝ : SeparatedSpace K := ValuedRing.separated\nF : Filter K\nh0 : 𝓝 0 ⊓ F = ⊥\nγ₀ : Γ₀ˣ\nM₀ : Set K\nM₀_in : M₀ ∈ F\nγ : Γ₀ˣ\nM₁ : Set K\nM₁_in : M₁ ∈ F\nx : K\nx_in₁ : x ∈ M₁\ny : K\ny_in₀ : y ∈ M₀\ny_in₁ : y ∈ M₁\nH₁ : ↑v (y - x) < ↑(min (γ * γ₀ * γ₀) γ₀)\nx_in₀ : ↑γ₀ ≤ ↑v x\nthis : ↑γ₀ ≤ ↑v y\n⊢ min ↑(γ * γ₀ * γ₀) ↑γ₀ ≤ min (↑γ * (↑v x * ↑v x)) (↑v x)\n[PROOFSTEP]\napply min_le_min _ x_in₀\n[GOAL]\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nsrc✝ : SeparatedSpace K := ValuedRing.separated\nF : Filter K\nh0 : 𝓝 0 ⊓ F = ⊥\nγ₀ : Γ₀ˣ\nM₀ : Set K\nM₀_in : M₀ ∈ F\nγ : Γ₀ˣ\nM₁ : Set K\nM₁_in : M₁ ∈ F\nx : K\nx_in₁ : x ∈ M₁\ny : K\ny_in₀ : y ∈ M₀\ny_in₁ : y ∈ M₁\nH₁ : ↑v (y - x) < ↑(min (γ * γ₀ * γ₀) γ₀)\nx_in₀ : ↑γ₀ ≤ ↑v x\nthis : ↑γ₀ ≤ ↑v y\n⊢ ↑(γ * γ₀ * γ₀) ≤ ↑γ * (↑v x * ↑v x)\n[PROOFSTEP]\nrw [mul_assoc]\n[GOAL]\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nsrc✝ : SeparatedSpace K := ValuedRing.separated\nF : Filter K\nh0 : 𝓝 0 ⊓ F = ⊥\nγ₀ : Γ₀ˣ\nM₀ : Set K\nM₀_in : M₀ ∈ F\nγ : Γ₀ˣ\nM₁ : Set K\nM₁_in : M₁ ∈ F\nx : K\nx_in₁ : x ∈ M₁\ny : K\ny_in₀ : y ∈ M₀\ny_in₁ : y ∈ M₁\nH₁ : ↑v (y - x) < ↑(min (γ * γ₀ * γ₀) γ₀)\nx_in₀ : ↑γ₀ ≤ ↑v x\nthis : ↑γ₀ ≤ ↑v y\n⊢ ↑(γ * (γ₀ * γ₀)) ≤ ↑γ * (↑v x * ↑v x)\n[PROOFSTEP]\nhave : ((γ₀ * γ₀ : Γ₀ˣ) : Γ₀) ≤ v x * v x :=\n  calc\n    ↑γ₀ * ↑γ₀ ≤ ↑γ₀ * v x := mul_le_mul_left' x_in₀ ↑γ₀\n    _ ≤ _ := mul_le_mul_right' x_in₀ (v x)\n[GOAL]\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nsrc✝ : SeparatedSpace K := ValuedRing.separated\nF : Filter K\nh0 : 𝓝 0 ⊓ F = ⊥\nγ₀ : Γ₀ˣ\nM₀ : Set K\nM₀_in : M₀ ∈ F\nγ : Γ₀ˣ\nM₁ : Set K\nM₁_in : M₁ ∈ F\nx : K\nx_in₁ : x ∈ M₁\ny : K\ny_in₀ : y ∈ M₀\ny_in₁ : y ∈ M₁\nH₁ : ↑v (y - x) < ↑(min (γ * γ₀ * γ₀) γ₀)\nx_in₀ : ↑γ₀ ≤ ↑v x\nthis✝ : ↑γ₀ ≤ ↑v y\nthis : ↑(γ₀ * γ₀) ≤ ↑v x * ↑v x\n⊢ ↑(γ * (γ₀ * γ₀)) ≤ ↑γ * (↑v x * ↑v x)\n[PROOFSTEP]\nrw [Units.val_mul]\n[GOAL]\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nsrc✝ : SeparatedSpace K := ValuedRing.separated\nF : Filter K\nh0 : 𝓝 0 ⊓ F = ⊥\nγ₀ : Γ₀ˣ\nM₀ : Set K\nM₀_in : M₀ ∈ F\nγ : Γ₀ˣ\nM₁ : Set K\nM₁_in : M₁ ∈ F\nx : K\nx_in₁ : x ∈ M₁\ny : K\ny_in₀ : y ∈ M₀\ny_in₁ : y ∈ M₁\nH₁ : ↑v (y - x) < ↑(min (γ * γ₀ * γ₀) γ₀)\nx_in₀ : ↑γ₀ ≤ ↑v x\nthis✝ : ↑γ₀ ≤ ↑v y\nthis : ↑(γ₀ * γ₀) ≤ ↑v x * ↑v x\n⊢ ↑γ * ↑(γ₀ * γ₀) ≤ ↑γ * (↑v x * ↑v x)\n[PROOFSTEP]\nexact mul_le_mul_left' this γ\n[GOAL]\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\n⊢ Continuous extension\n[PROOFSTEP]\nrefine' Completion.denseInducing_coe.continuous_extend _\n[GOAL]\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\n⊢ ∀ (b : hat K), ∃ c, Tendsto (↑v) (Filter.comap (↑K) (𝓝 b)) (𝓝 c)\n[PROOFSTEP]\nintro x₀\n[GOAL]\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nx₀ : hat K\n⊢ ∃ c, Tendsto (↑v) (Filter.comap (↑K) (𝓝 x₀)) (𝓝 c)\n[PROOFSTEP]\nrcases eq_or_ne x₀ 0 with (rfl | h)\n[GOAL]\ncase inl\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\n⊢ ∃ c, Tendsto (↑v) (Filter.comap (↑K) (𝓝 0)) (𝓝 c)\n[PROOFSTEP]\nrefine' ⟨0, _⟩\n[GOAL]\ncase inl\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\n⊢ Tendsto (↑v) (Filter.comap (↑K) (𝓝 0)) (𝓝 0)\n[PROOFSTEP]\nerw [← Completion.denseInducing_coe.toInducing.nhds_eq_comap]\n[GOAL]\ncase inl\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\n⊢ Tendsto (↑v) (𝓝 0) (𝓝 0)\n[PROOFSTEP]\nexact Valued.continuous_valuation.tendsto' 0 0 (map_zero v)\n[GOAL]\ncase inr\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nx₀ : hat K\nh : x₀ ≠ 0\n⊢ ∃ c, Tendsto (↑v) (Filter.comap (↑K) (𝓝 x₀)) (𝓝 c)\n[PROOFSTEP]\nhave preimage_one : v ⁻¹' {(1 : Γ₀)} ∈ 𝓝 (1 : K) :=\n  by\n  have : (v (1 : K) : Γ₀) ≠ 0 := by\n    rw [Valuation.map_one]\n    exact zero_ne_one.symm\n  convert Valued.loc_const this\n  ext x\n  rw [Valuation.map_one, mem_preimage, mem_singleton_iff, mem_setOf_eq]\n[GOAL]\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nx₀ : hat K\nh : x₀ ≠ 0\n⊢ ↑v ⁻¹' {1} ∈ 𝓝 1\n[PROOFSTEP]\nhave : (v (1 : K) : Γ₀) ≠ 0 := by\n  rw [Valuation.map_one]\n  exact zero_ne_one.symm\n[GOAL]\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nx₀ : hat K\nh : x₀ ≠ 0\n⊢ ↑v 1 ≠ 0\n[PROOFSTEP]\nrw [Valuation.map_one]\n[GOAL]\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nx₀ : hat K\nh : x₀ ≠ 0\n⊢ 1 ≠ 0\n[PROOFSTEP]\nexact zero_ne_one.symm\n[GOAL]\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nx₀ : hat K\nh : x₀ ≠ 0\nthis : ↑v 1 ≠ 0\n⊢ ↑v ⁻¹' {1} ∈ 𝓝 1\n[PROOFSTEP]\nconvert Valued.loc_const this\n[GOAL]\ncase h.e'_4\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nx₀ : hat K\nh : x₀ ≠ 0\nthis : ↑v 1 ≠ 0\n⊢ ↑v ⁻¹' {1} = {y | ↑v y = ↑v 1}\n[PROOFSTEP]\next x\n[GOAL]\ncase h.e'_4.h\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nx₀ : hat K\nh : x₀ ≠ 0\nthis : ↑v 1 ≠ 0\nx : K\n⊢ x ∈ ↑v ⁻¹' {1} ↔ x ∈ {y | ↑v y = ↑v 1}\n[PROOFSTEP]\nrw [Valuation.map_one, mem_preimage, mem_singleton_iff, mem_setOf_eq]\n[GOAL]\ncase inr\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nx₀ : hat K\nh : x₀ ≠ 0\npreimage_one : ↑v ⁻¹' {1} ∈ 𝓝 1\n⊢ ∃ c, Tendsto (↑v) (Filter.comap (↑K) (𝓝 x₀)) (𝓝 c)\n[PROOFSTEP]\nobtain ⟨V, V_in, hV⟩ : ∃ V ∈ 𝓝 (1 : hat K), ∀ x : K, (x : hat K) ∈ V → (v x : Γ₀) = 1 := by\n  rwa [Completion.denseInducing_coe.nhds_eq_comap, mem_comap] at preimage_one \n[GOAL]\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nx₀ : hat K\nh : x₀ ≠ 0\npreimage_one : ↑v ⁻¹' {1} ∈ 𝓝 1\n⊢ ∃ V, V ∈ 𝓝 1 ∧ ∀ (x : K), ↑K x ∈ V → ↑v x = 1\n[PROOFSTEP]\nrwa [Completion.denseInducing_coe.nhds_eq_comap, mem_comap] at preimage_one \n[GOAL]\ncase inr.intro.intro\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nx₀ : hat K\nh : x₀ ≠ 0\npreimage_one : ↑v ⁻¹' {1} ∈ 𝓝 1\nV : Set (hat K)\nV_in : V ∈ 𝓝 1\nhV : ∀ (x : K), ↑K x ∈ V → ↑v x = 1\n⊢ ∃ c, Tendsto (↑v) (Filter.comap (↑K) (𝓝 x₀)) (𝓝 c)\n[PROOFSTEP]\nhave : ∃ V' ∈ 𝓝 (1 : hat K), (0 : hat K) ∉ V' ∧ ∀ (x) (_ : x ∈ V') (y) (_ : y ∈ V'), x * y⁻¹ ∈ V :=\n  by\n  have : Tendsto (fun p : hat K × hat K => p.1 * p.2⁻¹) ((𝓝 1) ×ˢ (𝓝 1)) (𝓝 1) :=\n    by\n    rw [← nhds_prod_eq]\n    conv =>\n      congr\n      rfl\n      rfl\n      rw [← one_mul (1 : hat K)]\n    refine'\n      Tendsto.mul continuous_fst.continuousAt\n        (Tendsto.comp _ continuous_snd.continuousAt)\n          -- Porting note: Added `ContinuousAt.tendsto`\n    convert (continuousAt_inv₀ (zero_ne_one.symm : 1 ≠ (0 : hat K))).tendsto\n    exact inv_one.symm\n  rcases tendsto_prod_self_iff.mp this V V_in with ⟨U, U_in, hU⟩\n  let hatKstar := ({0}ᶜ : Set <| hat K)\n  have : hatKstar ∈ 𝓝 (1 : hat K) := compl_singleton_mem_nhds zero_ne_one.symm\n  use U ∩ hatKstar, Filter.inter_mem U_in this\n  constructor\n  · rintro ⟨_, h'⟩\n    rw [mem_compl_singleton_iff] at h' \n    exact h' rfl\n  · rintro x ⟨hx, _⟩ y ⟨hy, _⟩\n    apply hU <;> assumption\n[GOAL]\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nx₀ : hat K\nh : x₀ ≠ 0\npreimage_one : ↑v ⁻¹' {1} ∈ 𝓝 1\nV : Set (hat K)\nV_in : V ∈ 𝓝 1\nhV : ∀ (x : K), ↑K x ∈ V → ↑v x = 1\n⊢ ∃ V', V' ∈ 𝓝 1 ∧ ¬0 ∈ V' ∧ ∀ (x : hat K), x ∈ V' → ∀ (y : hat K), y ∈ V' → x * y⁻¹ ∈ V\n[PROOFSTEP]\nhave : Tendsto (fun p : hat K × hat K => p.1 * p.2⁻¹) ((𝓝 1) ×ˢ (𝓝 1)) (𝓝 1) :=\n  by\n  rw [← nhds_prod_eq]\n  conv =>\n    congr\n    rfl\n    rfl\n    rw [← one_mul (1 : hat K)]\n  refine'\n    Tendsto.mul continuous_fst.continuousAt\n      (Tendsto.comp _ continuous_snd.continuousAt)\n        -- Porting note: Added `ContinuousAt.tendsto`\n  convert (continuousAt_inv₀ (zero_ne_one.symm : 1 ≠ (0 : hat K))).tendsto\n  exact inv_one.symm\n[GOAL]\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nx₀ : hat K\nh : x₀ ≠ 0\npreimage_one : ↑v ⁻¹' {1} ∈ 𝓝 1\nV : Set (hat K)\nV_in : V ∈ 𝓝 1\nhV : ∀ (x : K), ↑K x ∈ V → ↑v x = 1\n⊢ Tendsto (fun p => p.fst * p.snd⁻¹) (𝓝 1 ×ˢ 𝓝 1) (𝓝 1)\n[PROOFSTEP]\nrw [← nhds_prod_eq]\n[GOAL]\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nx₀ : hat K\nh : x₀ ≠ 0\npreimage_one : ↑v ⁻¹' {1} ∈ 𝓝 1\nV : Set (hat K)\nV_in : V ∈ 𝓝 1\nhV : ∀ (x : K), ↑K x ∈ V → ↑v x = 1\n⊢ Tendsto (fun p => p.fst * p.snd⁻¹) (𝓝 (1, 1)) (𝓝 1)\n[PROOFSTEP]\nconv =>\n  congr\n  rfl\n  rfl\n  rw [← one_mul (1 : hat K)]\n[GOAL]\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nx₀ : hat K\nh : x₀ ≠ 0\npreimage_one : ↑v ⁻¹' {1} ∈ 𝓝 1\nV : Set (hat K)\nV_in : V ∈ 𝓝 1\nhV : ∀ (x : K), ↑K x ∈ V → ↑v x = 1\n| Tendsto (fun p => p.fst * p.snd⁻¹) (𝓝 (1, 1)) (𝓝 1)\n[PROOFSTEP]\n  congr\n  rfl\n  rfl\n  rw [← one_mul (1 : hat K)]\n[GOAL]\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nx₀ : hat K\nh : x₀ ≠ 0\npreimage_one : ↑v ⁻¹' {1} ∈ 𝓝 1\nV : Set (hat K)\nV_in : V ∈ 𝓝 1\nhV : ∀ (x : K), ↑K x ∈ V → ↑v x = 1\n| Tendsto (fun p => p.fst * p.snd⁻¹) (𝓝 (1, 1)) (𝓝 1)\n[PROOFSTEP]\n  congr\n  rfl\n  rfl\n  rw [← one_mul (1 : hat K)]\n[GOAL]\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nx₀ : hat K\nh : x₀ ≠ 0\npreimage_one : ↑v ⁻¹' {1} ∈ 𝓝 1\nV : Set (hat K)\nV_in : V ∈ 𝓝 1\nhV : ∀ (x : K), ↑K x ∈ V → ↑v x = 1\n| Tendsto (fun p => p.fst * p.snd⁻¹) (𝓝 (1, 1)) (𝓝 1)\n[PROOFSTEP]\ncongr\n[GOAL]\ncase f\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nx₀ : hat K\nh : x₀ ≠ 0\npreimage_one : ↑v ⁻¹' {1} ∈ 𝓝 1\nV : Set (hat K)\nV_in : V ∈ 𝓝 1\nhV : ∀ (x : K), ↑K x ∈ V → ↑v x = 1\n| fun p => p.fst * p.snd⁻¹\ncase l₁\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nx₀ : hat K\nh : x₀ ≠ 0\npreimage_one : ↑v ⁻¹' {1} ∈ 𝓝 1\nV : Set (hat K)\nV_in : V ∈ 𝓝 1\nhV : ∀ (x : K), ↑K x ∈ V → ↑v x = 1\n| 𝓝 (1, 1)\ncase l₂\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nx₀ : hat K\nh : x₀ ≠ 0\npreimage_one : ↑v ⁻¹' {1} ∈ 𝓝 1\nV : Set (hat K)\nV_in : V ∈ 𝓝 1\nhV : ∀ (x : K), ↑K x ∈ V → ↑v x = 1\n| 𝓝 1\n[PROOFSTEP]\nrfl\n[GOAL]\ncase l₁\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nx₀ : hat K\nh : x₀ ≠ 0\npreimage_one : ↑v ⁻¹' {1} ∈ 𝓝 1\nV : Set (hat K)\nV_in : V ∈ 𝓝 1\nhV : ∀ (x : K), ↑K x ∈ V → ↑v x = 1\n| 𝓝 (1, 1)\ncase l₂\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nx₀ : hat K\nh : x₀ ≠ 0\npreimage_one : ↑v ⁻¹' {1} ∈ 𝓝 1\nV : Set (hat K)\nV_in : V ∈ 𝓝 1\nhV : ∀ (x : K), ↑K x ∈ V → ↑v x = 1\n| 𝓝 1\n[PROOFSTEP]\nrfl\n[GOAL]\ncase l₂\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nx₀ : hat K\nh : x₀ ≠ 0\npreimage_one : ↑v ⁻¹' {1} ∈ 𝓝 1\nV : Set (hat K)\nV_in : V ∈ 𝓝 1\nhV : ∀ (x : K), ↑K x ∈ V → ↑v x = 1\n| 𝓝 1\n[PROOFSTEP]\nrw [← one_mul (1 : hat K)]\n[GOAL]\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nx₀ : hat K\nh : x₀ ≠ 0\npreimage_one : ↑v ⁻¹' {1} ∈ 𝓝 1\nV : Set (hat K)\nV_in : V ∈ 𝓝 1\nhV : ∀ (x : K), ↑K x ∈ V → ↑v x = 1\n⊢ Tendsto (fun p => p.fst * p.snd⁻¹) (𝓝 (1, 1)) (𝓝 (1 * 1))\n[PROOFSTEP]\nrefine'\n  Tendsto.mul continuous_fst.continuousAt\n    (Tendsto.comp _ continuous_snd.continuousAt)\n      -- Porting note: Added `ContinuousAt.tendsto`\n[GOAL]\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nx₀ : hat K\nh : x₀ ≠ 0\npreimage_one : ↑v ⁻¹' {1} ∈ 𝓝 1\nV : Set (hat K)\nV_in : V ∈ 𝓝 1\nhV : ∀ (x : K), ↑K x ∈ V → ↑v x = 1\n⊢ Tendsto Inv.inv (𝓝 (1, 1).snd) (𝓝 1)\n[PROOFSTEP]\nconvert (continuousAt_inv₀ (zero_ne_one.symm : 1 ≠ (0 : hat K))).tendsto\n[GOAL]\ncase h.e'_5.h.e'_3\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nx₀ : hat K\nh : x₀ ≠ 0\npreimage_one : ↑v ⁻¹' {1} ∈ 𝓝 1\nV : Set (hat K)\nV_in : V ∈ 𝓝 1\nhV : ∀ (x : K), ↑K x ∈ V → ↑v x = 1\n⊢ 1 = 1⁻¹\n[PROOFSTEP]\nexact inv_one.symm\n[GOAL]\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nx₀ : hat K\nh : x₀ ≠ 0\npreimage_one : ↑v ⁻¹' {1} ∈ 𝓝 1\nV : Set (hat K)\nV_in : V ∈ 𝓝 1\nhV : ∀ (x : K), ↑K x ∈ V → ↑v x = 1\nthis : Tendsto (fun p => p.fst * p.snd⁻¹) (𝓝 1 ×ˢ 𝓝 1) (𝓝 1)\n⊢ ∃ V', V' ∈ 𝓝 1 ∧ ¬0 ∈ V' ∧ ∀ (x : hat K), x ∈ V' → ∀ (y : hat K), y ∈ V' → x * y⁻¹ ∈ V\n[PROOFSTEP]\nrcases tendsto_prod_self_iff.mp this V V_in with ⟨U, U_in, hU⟩\n[GOAL]\ncase intro.intro\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nx₀ : hat K\nh : x₀ ≠ 0\npreimage_one : ↑v ⁻¹' {1} ∈ 𝓝 1\nV : Set (hat K)\nV_in : V ∈ 𝓝 1\nhV : ∀ (x : K), ↑K x ∈ V → ↑v x = 1\nthis : Tendsto (fun p => p.fst * p.snd⁻¹) (𝓝 1 ×ˢ 𝓝 1) (𝓝 1)\nU : Set (hat K)\nU_in : U ∈ 𝓝 1\nhU : ∀ (x x' : hat K), x ∈ U → x' ∈ U → (x, x').fst * (x, x').snd⁻¹ ∈ V\n⊢ ∃ V', V' ∈ 𝓝 1 ∧ ¬0 ∈ V' ∧ ∀ (x : hat K), x ∈ V' → ∀ (y : hat K), y ∈ V' → x * y⁻¹ ∈ V\n[PROOFSTEP]\nlet hatKstar := ({0}ᶜ : Set <| hat K)\n[GOAL]\ncase intro.intro\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nx₀ : hat K\nh : x₀ ≠ 0\npreimage_one : ↑v ⁻¹' {1} ∈ 𝓝 1\nV : Set (hat K)\nV_in : V ∈ 𝓝 1\nhV : ∀ (x : K), ↑K x ∈ V → ↑v x = 1\nthis : Tendsto (fun p => p.fst * p.snd⁻¹) (𝓝 1 ×ˢ 𝓝 1) (𝓝 1)\nU : Set (hat K)\nU_in : U ∈ 𝓝 1\nhU : ∀ (x x' : hat K), x ∈ U → x' ∈ U → (x, x').fst * (x, x').snd⁻¹ ∈ V\nhatKstar : Set (hat K) := {0}ᶜ\n⊢ ∃ V', V' ∈ 𝓝 1 ∧ ¬0 ∈ V' ∧ ∀ (x : hat K), x ∈ V' → ∀ (y : hat K), y ∈ V' → x * y⁻¹ ∈ V\n[PROOFSTEP]\nhave : hatKstar ∈ 𝓝 (1 : hat K) := compl_singleton_mem_nhds zero_ne_one.symm\n[GOAL]\ncase intro.intro\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nx₀ : hat K\nh : x₀ ≠ 0\npreimage_one : ↑v ⁻¹' {1} ∈ 𝓝 1\nV : Set (hat K)\nV_in : V ∈ 𝓝 1\nhV : ∀ (x : K), ↑K x ∈ V → ↑v x = 1\nthis✝ : Tendsto (fun p => p.fst * p.snd⁻¹) (𝓝 1 ×ˢ 𝓝 1) (𝓝 1)\nU : Set (hat K)\nU_in : U ∈ 𝓝 1\nhU : ∀ (x x' : hat K), x ∈ U → x' ∈ U → (x, x').fst * (x, x').snd⁻¹ ∈ V\nhatKstar : Set (hat K) := {0}ᶜ\nthis : hatKstar ∈ 𝓝 1\n⊢ ∃ V', V' ∈ 𝓝 1 ∧ ¬0 ∈ V' ∧ ∀ (x : hat K), x ∈ V' → ∀ (y : hat K), y ∈ V' → x * y⁻¹ ∈ V\n[PROOFSTEP]\nuse U ∩ hatKstar, Filter.inter_mem U_in this\n[GOAL]\ncase right\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nx₀ : hat K\nh : x₀ ≠ 0\npreimage_one : ↑v ⁻¹' {1} ∈ 𝓝 1\nV : Set (hat K)\nV_in : V ∈ 𝓝 1\nhV : ∀ (x : K), ↑K x ∈ V → ↑v x = 1\nthis✝ : Tendsto (fun p => p.fst * p.snd⁻¹) (𝓝 1 ×ˢ 𝓝 1) (𝓝 1)\nU : Set (hat K)\nU_in : U ∈ 𝓝 1\nhU : ∀ (x x' : hat K), x ∈ U → x' ∈ U → (x, x').fst * (x, x').snd⁻¹ ∈ V\nhatKstar : Set (hat K) := {0}ᶜ\nthis : hatKstar ∈ 𝓝 1\n⊢ ¬0 ∈ U ∩ hatKstar ∧ ∀ (x : hat K), x ∈ U ∩ hatKstar → ∀ (y : hat K), y ∈ U ∩ hatKstar → x * y⁻¹ ∈ V\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase right.left\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nx₀ : hat K\nh : x₀ ≠ 0\npreimage_one : ↑v ⁻¹' {1} ∈ 𝓝 1\nV : Set (hat K)\nV_in : V ∈ 𝓝 1\nhV : ∀ (x : K), ↑K x ∈ V → ↑v x = 1\nthis✝ : Tendsto (fun p => p.fst * p.snd⁻¹) (𝓝 1 ×ˢ 𝓝 1) (𝓝 1)\nU : Set (hat K)\nU_in : U ∈ 𝓝 1\nhU : ∀ (x x' : hat K), x ∈ U → x' ∈ U → (x, x').fst * (x, x').snd⁻¹ ∈ V\nhatKstar : Set (hat K) := {0}ᶜ\nthis : hatKstar ∈ 𝓝 1\n⊢ ¬0 ∈ U ∩ hatKstar\n[PROOFSTEP]\nrintro ⟨_, h'⟩\n[GOAL]\ncase right.left.intro\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nx₀ : hat K\nh : x₀ ≠ 0\npreimage_one : ↑v ⁻¹' {1} ∈ 𝓝 1\nV : Set (hat K)\nV_in : V ∈ 𝓝 1\nhV : ∀ (x : K), ↑K x ∈ V → ↑v x = 1\nthis✝ : Tendsto (fun p => p.fst * p.snd⁻¹) (𝓝 1 ×ˢ 𝓝 1) (𝓝 1)\nU : Set (hat K)\nU_in : U ∈ 𝓝 1\nhU : ∀ (x x' : hat K), x ∈ U → x' ∈ U → (x, x').fst * (x, x').snd⁻¹ ∈ V\nhatKstar : Set (hat K) := {0}ᶜ\nthis : hatKstar ∈ 𝓝 1\nleft✝ : 0 ∈ U\nh' : 0 ∈ hatKstar\n⊢ False\n[PROOFSTEP]\nrw [mem_compl_singleton_iff] at h' \n[GOAL]\ncase right.left.intro\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nx₀ : hat K\nh : x₀ ≠ 0\npreimage_one : ↑v ⁻¹' {1} ∈ 𝓝 1\nV : Set (hat K)\nV_in : V ∈ 𝓝 1\nhV : ∀ (x : K), ↑K x ∈ V → ↑v x = 1\nthis✝ : Tendsto (fun p => p.fst * p.snd⁻¹) (𝓝 1 ×ˢ 𝓝 1) (𝓝 1)\nU : Set (hat K)\nU_in : U ∈ 𝓝 1\nhU : ∀ (x x' : hat K), x ∈ U → x' ∈ U → (x, x').fst * (x, x').snd⁻¹ ∈ V\nhatKstar : Set (hat K) := {0}ᶜ\nthis : hatKstar ∈ 𝓝 1\nleft✝ : 0 ∈ U\nh' : 0 ≠ 0\n⊢ False\n[PROOFSTEP]\nexact h' rfl\n[GOAL]\ncase right.right\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nx₀ : hat K\nh : x₀ ≠ 0\npreimage_one : ↑v ⁻¹' {1} ∈ 𝓝 1\nV : Set (hat K)\nV_in : V ∈ 𝓝 1\nhV : ∀ (x : K), ↑K x ∈ V → ↑v x = 1\nthis✝ : Tendsto (fun p => p.fst * p.snd⁻¹) (𝓝 1 ×ˢ 𝓝 1) (𝓝 1)\nU : Set (hat K)\nU_in : U ∈ 𝓝 1\nhU : ∀ (x x' : hat K), x ∈ U → x' ∈ U → (x, x').fst * (x, x').snd⁻¹ ∈ V\nhatKstar : Set (hat K) := {0}ᶜ\nthis : hatKstar ∈ 𝓝 1\n⊢ ∀ (x : hat K), x ∈ U ∩ hatKstar → ∀ (y : hat K), y ∈ U ∩ hatKstar → x * y⁻¹ ∈ V\n[PROOFSTEP]\nrintro x ⟨hx, _⟩ y ⟨hy, _⟩\n[GOAL]\ncase right.right.intro.intro\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nx₀ : hat K\nh : x₀ ≠ 0\npreimage_one : ↑v ⁻¹' {1} ∈ 𝓝 1\nV : Set (hat K)\nV_in : V ∈ 𝓝 1\nhV : ∀ (x : K), ↑K x ∈ V → ↑v x = 1\nthis✝ : Tendsto (fun p => p.fst * p.snd⁻¹) (𝓝 1 ×ˢ 𝓝 1) (𝓝 1)\nU : Set (hat K)\nU_in : U ∈ 𝓝 1\nhU : ∀ (x x' : hat K), x ∈ U → x' ∈ U → (x, x').fst * (x, x').snd⁻¹ ∈ V\nhatKstar : Set (hat K) := {0}ᶜ\nthis : hatKstar ∈ 𝓝 1\nx : hat K\nhx : x ∈ U\nright✝¹ : x ∈ hatKstar\ny : hat K\nhy : y ∈ U\nright✝ : y ∈ hatKstar\n⊢ x * y⁻¹ ∈ V\n[PROOFSTEP]\napply hU\n[GOAL]\ncase right.right.intro.intro.a\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nx₀ : hat K\nh : x₀ ≠ 0\npreimage_one : ↑v ⁻¹' {1} ∈ 𝓝 1\nV : Set (hat K)\nV_in : V ∈ 𝓝 1\nhV : ∀ (x : K), ↑K x ∈ V → ↑v x = 1\nthis✝ : Tendsto (fun p => p.fst * p.snd⁻¹) (𝓝 1 ×ˢ 𝓝 1) (𝓝 1)\nU : Set (hat K)\nU_in : U ∈ 𝓝 1\nhU : ∀ (x x' : hat K), x ∈ U → x' ∈ U → (x, x').fst * (x, x').snd⁻¹ ∈ V\nhatKstar : Set (hat K) := {0}ᶜ\nthis : hatKstar ∈ 𝓝 1\nx : hat K\nhx : x ∈ U\nright✝¹ : x ∈ hatKstar\ny : hat K\nhy : y ∈ U\nright✝ : y ∈ hatKstar\n⊢ x ∈ U\n[PROOFSTEP]\nassumption\n[GOAL]\ncase right.right.intro.intro.a\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nx₀ : hat K\nh : x₀ ≠ 0\npreimage_one : ↑v ⁻¹' {1} ∈ 𝓝 1\nV : Set (hat K)\nV_in : V ∈ 𝓝 1\nhV : ∀ (x : K), ↑K x ∈ V → ↑v x = 1\nthis✝ : Tendsto (fun p => p.fst * p.snd⁻¹) (𝓝 1 ×ˢ 𝓝 1) (𝓝 1)\nU : Set (hat K)\nU_in : U ∈ 𝓝 1\nhU : ∀ (x x' : hat K), x ∈ U → x' ∈ U → (x, x').fst * (x, x').snd⁻¹ ∈ V\nhatKstar : Set (hat K) := {0}ᶜ\nthis : hatKstar ∈ 𝓝 1\nx : hat K\nhx : x ∈ U\nright✝¹ : x ∈ hatKstar\ny : hat K\nhy : y ∈ U\nright✝ : y ∈ hatKstar\n⊢ y ∈ U\n[PROOFSTEP]\nassumption\n[GOAL]\ncase inr.intro.intro\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nx₀ : hat K\nh : x₀ ≠ 0\npreimage_one : ↑v ⁻¹' {1} ∈ 𝓝 1\nV : Set (hat K)\nV_in : V ∈ 𝓝 1\nhV : ∀ (x : K), ↑K x ∈ V → ↑v x = 1\nthis : ∃ V', V' ∈ 𝓝 1 ∧ ¬0 ∈ V' ∧ ∀ (x : hat K), x ∈ V' → ∀ (y : hat K), y ∈ V' → x * y⁻¹ ∈ V\n⊢ ∃ c, Tendsto (↑v) (Filter.comap (↑K) (𝓝 x₀)) (𝓝 c)\n[PROOFSTEP]\nrcases this with ⟨V', V'_in, zeroV', hV'⟩\n[GOAL]\ncase inr.intro.intro.intro.intro.intro\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nx₀ : hat K\nh : x₀ ≠ 0\npreimage_one : ↑v ⁻¹' {1} ∈ 𝓝 1\nV : Set (hat K)\nV_in : V ∈ 𝓝 1\nhV : ∀ (x : K), ↑K x ∈ V → ↑v x = 1\nV' : Set (hat K)\nV'_in : V' ∈ 𝓝 1\nzeroV' : ¬0 ∈ V'\nhV' : ∀ (x : hat K), x ∈ V' → ∀ (y : hat K), y ∈ V' → x * y⁻¹ ∈ V\n⊢ ∃ c, Tendsto (↑v) (Filter.comap (↑K) (𝓝 x₀)) (𝓝 c)\n[PROOFSTEP]\nhave nhds_right : (fun x => x * x₀) '' V' ∈ 𝓝 x₀ :=\n  by\n  have l : Function.LeftInverse (fun x : hat K => x * x₀⁻¹) fun x : hat K => x * x₀ :=\n    by\n    intro x\n    simp only [mul_assoc, mul_inv_cancel h, mul_one]\n  have r : Function.RightInverse (fun x : hat K => x * x₀⁻¹) fun x : hat K => x * x₀ :=\n    by\n    intro x\n    simp only [mul_assoc, inv_mul_cancel h, mul_one]\n  have c : Continuous fun x : hat K => x * x₀⁻¹ := continuous_id.mul continuous_const\n  rw [image_eq_preimage_of_inverse l r]\n  rw [← mul_inv_cancel h] at V'_in \n  exact c.continuousAt V'_in\n[GOAL]\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nx₀ : hat K\nh : x₀ ≠ 0\npreimage_one : ↑v ⁻¹' {1} ∈ 𝓝 1\nV : Set (hat K)\nV_in : V ∈ 𝓝 1\nhV : ∀ (x : K), ↑K x ∈ V → ↑v x = 1\nV' : Set (hat K)\nV'_in : V' ∈ 𝓝 1\nzeroV' : ¬0 ∈ V'\nhV' : ∀ (x : hat K), x ∈ V' → ∀ (y : hat K), y ∈ V' → x * y⁻¹ ∈ V\n⊢ (fun x => x * x₀) '' V' ∈ 𝓝 x₀\n[PROOFSTEP]\nhave l : Function.LeftInverse (fun x : hat K => x * x₀⁻¹) fun x : hat K => x * x₀ :=\n  by\n  intro x\n  simp only [mul_assoc, mul_inv_cancel h, mul_one]\n[GOAL]\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nx₀ : hat K\nh : x₀ ≠ 0\npreimage_one : ↑v ⁻¹' {1} ∈ 𝓝 1\nV : Set (hat K)\nV_in : V ∈ 𝓝 1\nhV : ∀ (x : K), ↑K x ∈ V → ↑v x = 1\nV' : Set (hat K)\nV'_in : V' ∈ 𝓝 1\nzeroV' : ¬0 ∈ V'\nhV' : ∀ (x : hat K), x ∈ V' → ∀ (y : hat K), y ∈ V' → x * y⁻¹ ∈ V\n⊢ Function.LeftInverse (fun x => x * x₀⁻¹) fun x => x * x₀\n[PROOFSTEP]\nintro x\n[GOAL]\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nx₀ : hat K\nh : x₀ ≠ 0\npreimage_one : ↑v ⁻¹' {1} ∈ 𝓝 1\nV : Set (hat K)\nV_in : V ∈ 𝓝 1\nhV : ∀ (x : K), ↑K x ∈ V → ↑v x = 1\nV' : Set (hat K)\nV'_in : V' ∈ 𝓝 1\nzeroV' : ¬0 ∈ V'\nhV' : ∀ (x : hat K), x ∈ V' → ∀ (y : hat K), y ∈ V' → x * y⁻¹ ∈ V\nx : hat K\n⊢ (fun x => x * x₀⁻¹) ((fun x => x * x₀) x) = x\n[PROOFSTEP]\nsimp only [mul_assoc, mul_inv_cancel h, mul_one]\n[GOAL]\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nx₀ : hat K\nh : x₀ ≠ 0\npreimage_one : ↑v ⁻¹' {1} ∈ 𝓝 1\nV : Set (hat K)\nV_in : V ∈ 𝓝 1\nhV : ∀ (x : K), ↑K x ∈ V → ↑v x = 1\nV' : Set (hat K)\nV'_in : V' ∈ 𝓝 1\nzeroV' : ¬0 ∈ V'\nhV' : ∀ (x : hat K), x ∈ V' → ∀ (y : hat K), y ∈ V' → x * y⁻¹ ∈ V\nl : Function.LeftInverse (fun x => x * x₀⁻¹) fun x => x * x₀\n⊢ (fun x => x * x₀) '' V' ∈ 𝓝 x₀\n[PROOFSTEP]\nhave r : Function.RightInverse (fun x : hat K => x * x₀⁻¹) fun x : hat K => x * x₀ :=\n  by\n  intro x\n  simp only [mul_assoc, inv_mul_cancel h, mul_one]\n[GOAL]\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nx₀ : hat K\nh : x₀ ≠ 0\npreimage_one : ↑v ⁻¹' {1} ∈ 𝓝 1\nV : Set (hat K)\nV_in : V ∈ 𝓝 1\nhV : ∀ (x : K), ↑K x ∈ V → ↑v x = 1\nV' : Set (hat K)\nV'_in : V' ∈ 𝓝 1\nzeroV' : ¬0 ∈ V'\nhV' : ∀ (x : hat K), x ∈ V' → ∀ (y : hat K), y ∈ V' → x * y⁻¹ ∈ V\nl : Function.LeftInverse (fun x => x * x₀⁻¹) fun x => x * x₀\n⊢ Function.RightInverse (fun x => x * x₀⁻¹) fun x => x * x₀\n[PROOFSTEP]\nintro x\n[GOAL]\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nx₀ : hat K\nh : x₀ ≠ 0\npreimage_one : ↑v ⁻¹' {1} ∈ 𝓝 1\nV : Set (hat K)\nV_in : V ∈ 𝓝 1\nhV : ∀ (x : K), ↑K x ∈ V → ↑v x = 1\nV' : Set (hat K)\nV'_in : V' ∈ 𝓝 1\nzeroV' : ¬0 ∈ V'\nhV' : ∀ (x : hat K), x ∈ V' → ∀ (y : hat K), y ∈ V' → x * y⁻¹ ∈ V\nl : Function.LeftInverse (fun x => x * x₀⁻¹) fun x => x * x₀\nx : hat K\n⊢ (fun x => x * x₀) ((fun x => x * x₀⁻¹) x) = x\n[PROOFSTEP]\nsimp only [mul_assoc, inv_mul_cancel h, mul_one]\n[GOAL]\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nx₀ : hat K\nh : x₀ ≠ 0\npreimage_one : ↑v ⁻¹' {1} ∈ 𝓝 1\nV : Set (hat K)\nV_in : V ∈ 𝓝 1\nhV : ∀ (x : K), ↑K x ∈ V → ↑v x = 1\nV' : Set (hat K)\nV'_in : V' ∈ 𝓝 1\nzeroV' : ¬0 ∈ V'\nhV' : ∀ (x : hat K), x ∈ V' → ∀ (y : hat K), y ∈ V' → x * y⁻¹ ∈ V\nl : Function.LeftInverse (fun x => x * x₀⁻¹) fun x => x * x₀\nr : Function.RightInverse (fun x => x * x₀⁻¹) fun x => x * x₀\n⊢ (fun x => x * x₀) '' V' ∈ 𝓝 x₀\n[PROOFSTEP]\nhave c : Continuous fun x : hat K => x * x₀⁻¹ := continuous_id.mul continuous_const\n[GOAL]\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nx₀ : hat K\nh : x₀ ≠ 0\npreimage_one : ↑v ⁻¹' {1} ∈ 𝓝 1\nV : Set (hat K)\nV_in : V ∈ 𝓝 1\nhV : ∀ (x : K), ↑K x ∈ V → ↑v x = 1\nV' : Set (hat K)\nV'_in : V' ∈ 𝓝 1\nzeroV' : ¬0 ∈ V'\nhV' : ∀ (x : hat K), x ∈ V' → ∀ (y : hat K), y ∈ V' → x * y⁻¹ ∈ V\nl : Function.LeftInverse (fun x => x * x₀⁻¹) fun x => x * x₀\nr : Function.RightInverse (fun x => x * x₀⁻¹) fun x => x * x₀\nc : Continuous fun x => x * x₀⁻¹\n⊢ (fun x => x * x₀) '' V' ∈ 𝓝 x₀\n[PROOFSTEP]\nrw [image_eq_preimage_of_inverse l r]\n[GOAL]\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nx₀ : hat K\nh : x₀ ≠ 0\npreimage_one : ↑v ⁻¹' {1} ∈ 𝓝 1\nV : Set (hat K)\nV_in : V ∈ 𝓝 1\nhV : ∀ (x : K), ↑K x ∈ V → ↑v x = 1\nV' : Set (hat K)\nV'_in : V' ∈ 𝓝 1\nzeroV' : ¬0 ∈ V'\nhV' : ∀ (x : hat K), x ∈ V' → ∀ (y : hat K), y ∈ V' → x * y⁻¹ ∈ V\nl : Function.LeftInverse (fun x => x * x₀⁻¹) fun x => x * x₀\nr : Function.RightInverse (fun x => x * x₀⁻¹) fun x => x * x₀\nc : Continuous fun x => x * x₀⁻¹\n⊢ (fun x => x * x₀⁻¹) ⁻¹' V' ∈ 𝓝 x₀\n[PROOFSTEP]\nrw [← mul_inv_cancel h] at V'_in \n[GOAL]\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nx₀ : hat K\nh : x₀ ≠ 0\npreimage_one : ↑v ⁻¹' {1} ∈ 𝓝 1\nV : Set (hat K)\nV_in : V ∈ 𝓝 1\nhV : ∀ (x : K), ↑K x ∈ V → ↑v x = 1\nV' : Set (hat K)\nV'_in : V' ∈ 𝓝 (x₀ * x₀⁻¹)\nzeroV' : ¬0 ∈ V'\nhV' : ∀ (x : hat K), x ∈ V' → ∀ (y : hat K), y ∈ V' → x * y⁻¹ ∈ V\nl : Function.LeftInverse (fun x => x * x₀⁻¹) fun x => x * x₀\nr : Function.RightInverse (fun x => x * x₀⁻¹) fun x => x * x₀\nc : Continuous fun x => x * x₀⁻¹\n⊢ (fun x => x * x₀⁻¹) ⁻¹' V' ∈ 𝓝 x₀\n[PROOFSTEP]\nexact c.continuousAt V'_in\n[GOAL]\ncase inr.intro.intro.intro.intro.intro\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nx₀ : hat K\nh : x₀ ≠ 0\npreimage_one : ↑v ⁻¹' {1} ∈ 𝓝 1\nV : Set (hat K)\nV_in : V ∈ 𝓝 1\nhV : ∀ (x : K), ↑K x ∈ V → ↑v x = 1\nV' : Set (hat K)\nV'_in : V' ∈ 𝓝 1\nzeroV' : ¬0 ∈ V'\nhV' : ∀ (x : hat K), x ∈ V' → ∀ (y : hat K), y ∈ V' → x * y⁻¹ ∈ V\nnhds_right : (fun x => x * x₀) '' V' ∈ 𝓝 x₀\n⊢ ∃ c, Tendsto (↑v) (Filter.comap (↑K) (𝓝 x₀)) (𝓝 c)\n[PROOFSTEP]\nhave : ∃ z₀ : K, ∃ y₀ ∈ V', ↑z₀ = y₀ * x₀ ∧ z₀ ≠ 0 :=\n  by\n  rcases Completion.denseRange_coe.mem_nhds nhds_right with ⟨z₀, y₀, y₀_in, H : y₀ * x₀ = z₀⟩\n  refine' ⟨z₀, y₀, y₀_in, ⟨H.symm, _⟩⟩\n  rintro rfl\n  exact mul_ne_zero (ne_of_mem_of_not_mem y₀_in zeroV') h H\n[GOAL]\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nx₀ : hat K\nh : x₀ ≠ 0\npreimage_one : ↑v ⁻¹' {1} ∈ 𝓝 1\nV : Set (hat K)\nV_in : V ∈ 𝓝 1\nhV : ∀ (x : K), ↑K x ∈ V → ↑v x = 1\nV' : Set (hat K)\nV'_in : V' ∈ 𝓝 1\nzeroV' : ¬0 ∈ V'\nhV' : ∀ (x : hat K), x ∈ V' → ∀ (y : hat K), y ∈ V' → x * y⁻¹ ∈ V\nnhds_right : (fun x => x * x₀) '' V' ∈ 𝓝 x₀\n⊢ ∃ z₀ y₀, y₀ ∈ V' ∧ ↑K z₀ = y₀ * x₀ ∧ z₀ ≠ 0\n[PROOFSTEP]\nrcases Completion.denseRange_coe.mem_nhds nhds_right with ⟨z₀, y₀, y₀_in, H : y₀ * x₀ = z₀⟩\n[GOAL]\ncase intro.intro.intro\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nx₀ : hat K\nh : x₀ ≠ 0\npreimage_one : ↑v ⁻¹' {1} ∈ 𝓝 1\nV : Set (hat K)\nV_in : V ∈ 𝓝 1\nhV : ∀ (x : K), ↑K x ∈ V → ↑v x = 1\nV' : Set (hat K)\nV'_in : V' ∈ 𝓝 1\nzeroV' : ¬0 ∈ V'\nhV' : ∀ (x : hat K), x ∈ V' → ∀ (y : hat K), y ∈ V' → x * y⁻¹ ∈ V\nnhds_right : (fun x => x * x₀) '' V' ∈ 𝓝 x₀\nz₀ : K\ny₀ : hat K\ny₀_in : y₀ ∈ V'\nH : y₀ * x₀ = ↑K z₀\n⊢ ∃ z₀ y₀, y₀ ∈ V' ∧ ↑K z₀ = y₀ * x₀ ∧ z₀ ≠ 0\n[PROOFSTEP]\nrefine' ⟨z₀, y₀, y₀_in, ⟨H.symm, _⟩⟩\n[GOAL]\ncase intro.intro.intro\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nx₀ : hat K\nh : x₀ ≠ 0\npreimage_one : ↑v ⁻¹' {1} ∈ 𝓝 1\nV : Set (hat K)\nV_in : V ∈ 𝓝 1\nhV : ∀ (x : K), ↑K x ∈ V → ↑v x = 1\nV' : Set (hat K)\nV'_in : V' ∈ 𝓝 1\nzeroV' : ¬0 ∈ V'\nhV' : ∀ (x : hat K), x ∈ V' → ∀ (y : hat K), y ∈ V' → x * y⁻¹ ∈ V\nnhds_right : (fun x => x * x₀) '' V' ∈ 𝓝 x₀\nz₀ : K\ny₀ : hat K\ny₀_in : y₀ ∈ V'\nH : y₀ * x₀ = ↑K z₀\n⊢ z₀ ≠ 0\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase intro.intro.intro\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nx₀ : hat K\nh : x₀ ≠ 0\npreimage_one : ↑v ⁻¹' {1} ∈ 𝓝 1\nV : Set (hat K)\nV_in : V ∈ 𝓝 1\nhV : ∀ (x : K), ↑K x ∈ V → ↑v x = 1\nV' : Set (hat K)\nV'_in : V' ∈ 𝓝 1\nzeroV' : ¬0 ∈ V'\nhV' : ∀ (x : hat K), x ∈ V' → ∀ (y : hat K), y ∈ V' → x * y⁻¹ ∈ V\nnhds_right : (fun x => x * x₀) '' V' ∈ 𝓝 x₀\ny₀ : hat K\ny₀_in : y₀ ∈ V'\nH : y₀ * x₀ = ↑K 0\n⊢ False\n[PROOFSTEP]\nexact mul_ne_zero (ne_of_mem_of_not_mem y₀_in zeroV') h H\n[GOAL]\ncase inr.intro.intro.intro.intro.intro\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nx₀ : hat K\nh : x₀ ≠ 0\npreimage_one : ↑v ⁻¹' {1} ∈ 𝓝 1\nV : Set (hat K)\nV_in : V ∈ 𝓝 1\nhV : ∀ (x : K), ↑K x ∈ V → ↑v x = 1\nV' : Set (hat K)\nV'_in : V' ∈ 𝓝 1\nzeroV' : ¬0 ∈ V'\nhV' : ∀ (x : hat K), x ∈ V' → ∀ (y : hat K), y ∈ V' → x * y⁻¹ ∈ V\nnhds_right : (fun x => x * x₀) '' V' ∈ 𝓝 x₀\nthis : ∃ z₀ y₀, y₀ ∈ V' ∧ ↑K z₀ = y₀ * x₀ ∧ z₀ ≠ 0\n⊢ ∃ c, Tendsto (↑v) (Filter.comap (↑K) (𝓝 x₀)) (𝓝 c)\n[PROOFSTEP]\nrcases this with ⟨z₀, y₀, y₀_in, hz₀, z₀_ne⟩\n[GOAL]\ncase inr.intro.intro.intro.intro.intro.intro.intro.intro.intro\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nx₀ : hat K\nh : x₀ ≠ 0\npreimage_one : ↑v ⁻¹' {1} ∈ 𝓝 1\nV : Set (hat K)\nV_in : V ∈ 𝓝 1\nhV : ∀ (x : K), ↑K x ∈ V → ↑v x = 1\nV' : Set (hat K)\nV'_in : V' ∈ 𝓝 1\nzeroV' : ¬0 ∈ V'\nhV' : ∀ (x : hat K), x ∈ V' → ∀ (y : hat K), y ∈ V' → x * y⁻¹ ∈ V\nnhds_right : (fun x => x * x₀) '' V' ∈ 𝓝 x₀\nz₀ : K\ny₀ : hat K\ny₀_in : y₀ ∈ V'\nhz₀ : ↑K z₀ = y₀ * x₀\nz₀_ne : z₀ ≠ 0\n⊢ ∃ c, Tendsto (↑v) (Filter.comap (↑K) (𝓝 x₀)) (𝓝 c)\n[PROOFSTEP]\nhave vz₀_ne : (v z₀ : Γ₀) ≠ 0 := by rwa [Valuation.ne_zero_iff]\n[GOAL]\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nx₀ : hat K\nh : x₀ ≠ 0\npreimage_one : ↑v ⁻¹' {1} ∈ 𝓝 1\nV : Set (hat K)\nV_in : V ∈ 𝓝 1\nhV : ∀ (x : K), ↑K x ∈ V → ↑v x = 1\nV' : Set (hat K)\nV'_in : V' ∈ 𝓝 1\nzeroV' : ¬0 ∈ V'\nhV' : ∀ (x : hat K), x ∈ V' → ∀ (y : hat K), y ∈ V' → x * y⁻¹ ∈ V\nnhds_right : (fun x => x * x₀) '' V' ∈ 𝓝 x₀\nz₀ : K\ny₀ : hat K\ny₀_in : y₀ ∈ V'\nhz₀ : ↑K z₀ = y₀ * x₀\nz₀_ne : z₀ ≠ 0\n⊢ ↑v z₀ ≠ 0\n[PROOFSTEP]\nrwa [Valuation.ne_zero_iff]\n[GOAL]\ncase inr.intro.intro.intro.intro.intro.intro.intro.intro.intro\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nx₀ : hat K\nh : x₀ ≠ 0\npreimage_one : ↑v ⁻¹' {1} ∈ 𝓝 1\nV : Set (hat K)\nV_in : V ∈ 𝓝 1\nhV : ∀ (x : K), ↑K x ∈ V → ↑v x = 1\nV' : Set (hat K)\nV'_in : V' ∈ 𝓝 1\nzeroV' : ¬0 ∈ V'\nhV' : ∀ (x : hat K), x ∈ V' → ∀ (y : hat K), y ∈ V' → x * y⁻¹ ∈ V\nnhds_right : (fun x => x * x₀) '' V' ∈ 𝓝 x₀\nz₀ : K\ny₀ : hat K\ny₀_in : y₀ ∈ V'\nhz₀ : ↑K z₀ = y₀ * x₀\nz₀_ne : z₀ ≠ 0\nvz₀_ne : ↑v z₀ ≠ 0\n⊢ ∃ c, Tendsto (↑v) (Filter.comap (↑K) (𝓝 x₀)) (𝓝 c)\n[PROOFSTEP]\nrefine' ⟨v z₀, _⟩\n[GOAL]\ncase inr.intro.intro.intro.intro.intro.intro.intro.intro.intro\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nx₀ : hat K\nh : x₀ ≠ 0\npreimage_one : ↑v ⁻¹' {1} ∈ 𝓝 1\nV : Set (hat K)\nV_in : V ∈ 𝓝 1\nhV : ∀ (x : K), ↑K x ∈ V → ↑v x = 1\nV' : Set (hat K)\nV'_in : V' ∈ 𝓝 1\nzeroV' : ¬0 ∈ V'\nhV' : ∀ (x : hat K), x ∈ V' → ∀ (y : hat K), y ∈ V' → x * y⁻¹ ∈ V\nnhds_right : (fun x => x * x₀) '' V' ∈ 𝓝 x₀\nz₀ : K\ny₀ : hat K\ny₀_in : y₀ ∈ V'\nhz₀ : ↑K z₀ = y₀ * x₀\nz₀_ne : z₀ ≠ 0\nvz₀_ne : ↑v z₀ ≠ 0\n⊢ Tendsto (↑v) (Filter.comap (↑K) (𝓝 x₀)) (𝓝 (↑v z₀))\n[PROOFSTEP]\nrw [WithZeroTopology.tendsto_of_ne_zero vz₀_ne, eventually_comap]\n[GOAL]\ncase inr.intro.intro.intro.intro.intro.intro.intro.intro.intro\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nx₀ : hat K\nh : x₀ ≠ 0\npreimage_one : ↑v ⁻¹' {1} ∈ 𝓝 1\nV : Set (hat K)\nV_in : V ∈ 𝓝 1\nhV : ∀ (x : K), ↑K x ∈ V → ↑v x = 1\nV' : Set (hat K)\nV'_in : V' ∈ 𝓝 1\nzeroV' : ¬0 ∈ V'\nhV' : ∀ (x : hat K), x ∈ V' → ∀ (y : hat K), y ∈ V' → x * y⁻¹ ∈ V\nnhds_right : (fun x => x * x₀) '' V' ∈ 𝓝 x₀\nz₀ : K\ny₀ : hat K\ny₀_in : y₀ ∈ V'\nhz₀ : ↑K z₀ = y₀ * x₀\nz₀_ne : z₀ ≠ 0\nvz₀_ne : ↑v z₀ ≠ 0\n⊢ ∀ᶠ (b : hat K) in 𝓝 x₀, ∀ (a : K), ↑K a = b → ↑v a = ↑v z₀\n[PROOFSTEP]\nfilter_upwards [nhds_right] with x x_in a ha\n[GOAL]\ncase h\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nx₀ : hat K\nh : x₀ ≠ 0\npreimage_one : ↑v ⁻¹' {1} ∈ 𝓝 1\nV : Set (hat K)\nV_in : V ∈ 𝓝 1\nhV : ∀ (x : K), ↑K x ∈ V → ↑v x = 1\nV' : Set (hat K)\nV'_in : V' ∈ 𝓝 1\nzeroV' : ¬0 ∈ V'\nhV' : ∀ (x : hat K), x ∈ V' → ∀ (y : hat K), y ∈ V' → x * y⁻¹ ∈ V\nnhds_right : (fun x => x * x₀) '' V' ∈ 𝓝 x₀\nz₀ : K\ny₀ : hat K\ny₀_in : y₀ ∈ V'\nhz₀ : ↑K z₀ = y₀ * x₀\nz₀_ne : z₀ ≠ 0\nvz₀_ne : ↑v z₀ ≠ 0\nx : hat K\nx_in : x ∈ (fun x => x * x₀) '' V'\na : K\nha : ↑K a = x\n⊢ ↑v a = ↑v z₀\n[PROOFSTEP]\nrcases x_in with ⟨y, y_in, rfl⟩\n[GOAL]\ncase h.intro.intro\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nx₀ : hat K\nh : x₀ ≠ 0\npreimage_one : ↑v ⁻¹' {1} ∈ 𝓝 1\nV : Set (hat K)\nV_in : V ∈ 𝓝 1\nhV : ∀ (x : K), ↑K x ∈ V → ↑v x = 1\nV' : Set (hat K)\nV'_in : V' ∈ 𝓝 1\nzeroV' : ¬0 ∈ V'\nhV' : ∀ (x : hat K), x ∈ V' → ∀ (y : hat K), y ∈ V' → x * y⁻¹ ∈ V\nnhds_right : (fun x => x * x₀) '' V' ∈ 𝓝 x₀\nz₀ : K\ny₀ : hat K\ny₀_in : y₀ ∈ V'\nhz₀ : ↑K z₀ = y₀ * x₀\nz₀_ne : z₀ ≠ 0\nvz₀_ne : ↑v z₀ ≠ 0\na : K\ny : hat K\ny_in : y ∈ V'\nha : ↑K a = (fun x => x * x₀) y\n⊢ ↑v a = ↑v z₀\n[PROOFSTEP]\nhave : (v (a * z₀⁻¹) : Γ₀) = 1 := by\n  apply hV\n  have : (z₀⁻¹ : K) = (z₀ : hat K)⁻¹ := map_inv₀ (Completion.coeRingHom : K →+* hat K) z₀\n  rw [Completion.coe_mul, this, ha, hz₀, mul_inv, mul_comm y₀⁻¹, ← mul_assoc, mul_assoc y, mul_inv_cancel h, mul_one]\n  solve_by_elim\n[GOAL]\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nx₀ : hat K\nh : x₀ ≠ 0\npreimage_one : ↑v ⁻¹' {1} ∈ 𝓝 1\nV : Set (hat K)\nV_in : V ∈ 𝓝 1\nhV : ∀ (x : K), ↑K x ∈ V → ↑v x = 1\nV' : Set (hat K)\nV'_in : V' ∈ 𝓝 1\nzeroV' : ¬0 ∈ V'\nhV' : ∀ (x : hat K), x ∈ V' → ∀ (y : hat K), y ∈ V' → x * y⁻¹ ∈ V\nnhds_right : (fun x => x * x₀) '' V' ∈ 𝓝 x₀\nz₀ : K\ny₀ : hat K\ny₀_in : y₀ ∈ V'\nhz₀ : ↑K z₀ = y₀ * x₀\nz₀_ne : z₀ ≠ 0\nvz₀_ne : ↑v z₀ ≠ 0\na : K\ny : hat K\ny_in : y ∈ V'\nha : ↑K a = (fun x => x * x₀) y\n⊢ ↑v (a * z₀⁻¹) = 1\n[PROOFSTEP]\napply hV\n[GOAL]\ncase a\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nx₀ : hat K\nh : x₀ ≠ 0\npreimage_one : ↑v ⁻¹' {1} ∈ 𝓝 1\nV : Set (hat K)\nV_in : V ∈ 𝓝 1\nhV : ∀ (x : K), ↑K x ∈ V → ↑v x = 1\nV' : Set (hat K)\nV'_in : V' ∈ 𝓝 1\nzeroV' : ¬0 ∈ V'\nhV' : ∀ (x : hat K), x ∈ V' → ∀ (y : hat K), y ∈ V' → x * y⁻¹ ∈ V\nnhds_right : (fun x => x * x₀) '' V' ∈ 𝓝 x₀\nz₀ : K\ny₀ : hat K\ny₀_in : y₀ ∈ V'\nhz₀ : ↑K z₀ = y₀ * x₀\nz₀_ne : z₀ ≠ 0\nvz₀_ne : ↑v z₀ ≠ 0\na : K\ny : hat K\ny_in : y ∈ V'\nha : ↑K a = (fun x => x * x₀) y\n⊢ ↑K (a * z₀⁻¹) ∈ V\n[PROOFSTEP]\nhave : (z₀⁻¹ : K) = (z₀ : hat K)⁻¹ := map_inv₀ (Completion.coeRingHom : K →+* hat K) z₀\n[GOAL]\ncase a\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nx₀ : hat K\nh : x₀ ≠ 0\npreimage_one : ↑v ⁻¹' {1} ∈ 𝓝 1\nV : Set (hat K)\nV_in : V ∈ 𝓝 1\nhV : ∀ (x : K), ↑K x ∈ V → ↑v x = 1\nV' : Set (hat K)\nV'_in : V' ∈ 𝓝 1\nzeroV' : ¬0 ∈ V'\nhV' : ∀ (x : hat K), x ∈ V' → ∀ (y : hat K), y ∈ V' → x * y⁻¹ ∈ V\nnhds_right : (fun x => x * x₀) '' V' ∈ 𝓝 x₀\nz₀ : K\ny₀ : hat K\ny₀_in : y₀ ∈ V'\nhz₀ : ↑K z₀ = y₀ * x₀\nz₀_ne : z₀ ≠ 0\nvz₀_ne : ↑v z₀ ≠ 0\na : K\ny : hat K\ny_in : y ∈ V'\nha : ↑K a = (fun x => x * x₀) y\nthis : ↑K z₀⁻¹ = (↑K z₀)⁻¹\n⊢ ↑K (a * z₀⁻¹) ∈ V\n[PROOFSTEP]\nrw [Completion.coe_mul, this, ha, hz₀, mul_inv, mul_comm y₀⁻¹, ← mul_assoc, mul_assoc y, mul_inv_cancel h, mul_one]\n[GOAL]\ncase a\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nx₀ : hat K\nh : x₀ ≠ 0\npreimage_one : ↑v ⁻¹' {1} ∈ 𝓝 1\nV : Set (hat K)\nV_in : V ∈ 𝓝 1\nhV : ∀ (x : K), ↑K x ∈ V → ↑v x = 1\nV' : Set (hat K)\nV'_in : V' ∈ 𝓝 1\nzeroV' : ¬0 ∈ V'\nhV' : ∀ (x : hat K), x ∈ V' → ∀ (y : hat K), y ∈ V' → x * y⁻¹ ∈ V\nnhds_right : (fun x => x * x₀) '' V' ∈ 𝓝 x₀\nz₀ : K\ny₀ : hat K\ny₀_in : y₀ ∈ V'\nhz₀ : ↑K z₀ = y₀ * x₀\nz₀_ne : z₀ ≠ 0\nvz₀_ne : ↑v z₀ ≠ 0\na : K\ny : hat K\ny_in : y ∈ V'\nha : ↑K a = (fun x => x * x₀) y\nthis : ↑K z₀⁻¹ = (↑K z₀)⁻¹\n⊢ y * y₀⁻¹ ∈ V\n[PROOFSTEP]\nsolve_by_elim\n[GOAL]\ncase h.intro.intro\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nx₀ : hat K\nh : x₀ ≠ 0\npreimage_one : ↑v ⁻¹' {1} ∈ 𝓝 1\nV : Set (hat K)\nV_in : V ∈ 𝓝 1\nhV : ∀ (x : K), ↑K x ∈ V → ↑v x = 1\nV' : Set (hat K)\nV'_in : V' ∈ 𝓝 1\nzeroV' : ¬0 ∈ V'\nhV' : ∀ (x : hat K), x ∈ V' → ∀ (y : hat K), y ∈ V' → x * y⁻¹ ∈ V\nnhds_right : (fun x => x * x₀) '' V' ∈ 𝓝 x₀\nz₀ : K\ny₀ : hat K\ny₀_in : y₀ ∈ V'\nhz₀ : ↑K z₀ = y₀ * x₀\nz₀_ne : z₀ ≠ 0\nvz₀_ne : ↑v z₀ ≠ 0\na : K\ny : hat K\ny_in : y ∈ V'\nha : ↑K a = (fun x => x * x₀) y\nthis : ↑v (a * z₀⁻¹) = 1\n⊢ ↑v a = ↑v z₀\n[PROOFSTEP]\ncalc\n  v a = v (a * z₀⁻¹ * z₀) := by rw [mul_assoc, inv_mul_cancel z₀_ne, mul_one]\n  _ = v (a * z₀⁻¹) * v z₀ := (Valuation.map_mul _ _ _)\n  _ = v z₀ := by rw [this, one_mul]\n[GOAL]\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nx₀ : hat K\nh : x₀ ≠ 0\npreimage_one : ↑v ⁻¹' {1} ∈ 𝓝 1\nV : Set (hat K)\nV_in : V ∈ 𝓝 1\nhV : ∀ (x : K), ↑K x ∈ V → ↑v x = 1\nV' : Set (hat K)\nV'_in : V' ∈ 𝓝 1\nzeroV' : ¬0 ∈ V'\nhV' : ∀ (x : hat K), x ∈ V' → ∀ (y : hat K), y ∈ V' → x * y⁻¹ ∈ V\nnhds_right : (fun x => x * x₀) '' V' ∈ 𝓝 x₀\nz₀ : K\ny₀ : hat K\ny₀_in : y₀ ∈ V'\nhz₀ : ↑K z₀ = y₀ * x₀\nz₀_ne : z₀ ≠ 0\nvz₀_ne : ↑v z₀ ≠ 0\na : K\ny : hat K\ny_in : y ∈ V'\nha : ↑K a = (fun x => x * x₀) y\nthis : ↑v (a * z₀⁻¹) = 1\n⊢ ↑v a = ↑v (a * z₀⁻¹ * z₀)\n[PROOFSTEP]\nrw [mul_assoc, inv_mul_cancel z₀_ne, mul_one]\n[GOAL]\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nx₀ : hat K\nh : x₀ ≠ 0\npreimage_one : ↑v ⁻¹' {1} ∈ 𝓝 1\nV : Set (hat K)\nV_in : V ∈ 𝓝 1\nhV : ∀ (x : K), ↑K x ∈ V → ↑v x = 1\nV' : Set (hat K)\nV'_in : V' ∈ 𝓝 1\nzeroV' : ¬0 ∈ V'\nhV' : ∀ (x : hat K), x ∈ V' → ∀ (y : hat K), y ∈ V' → x * y⁻¹ ∈ V\nnhds_right : (fun x => x * x₀) '' V' ∈ 𝓝 x₀\nz₀ : K\ny₀ : hat K\ny₀_in : y₀ ∈ V'\nhz₀ : ↑K z₀ = y₀ * x₀\nz₀_ne : z₀ ≠ 0\nvz₀_ne : ↑v z₀ ≠ 0\na : K\ny : hat K\ny_in : y ∈ V'\nha : ↑K a = (fun x => x * x₀) y\nthis : ↑v (a * z₀⁻¹) = 1\n⊢ ↑v (a * z₀⁻¹) * ↑v z₀ = ↑v z₀\n[PROOFSTEP]\nrw [this, one_mul]\n[GOAL]\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nx : K\n⊢ extension (↑K x) = ↑v x\n[PROOFSTEP]\nrefine' Completion.denseInducing_coe.extend_eq_of_tendsto _\n[GOAL]\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nx : K\n⊢ Tendsto (↑v) (Filter.comap (↑K) (𝓝 (↑K x))) (𝓝 (↑v x))\n[PROOFSTEP]\nrw [← Completion.denseInducing_coe.nhds_eq_comap]\n[GOAL]\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nx : K\n⊢ Tendsto (↑v) (𝓝 x) (𝓝 (↑v x))\n[PROOFSTEP]\nexact Valued.continuous_valuation.continuousAt\n[GOAL]\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\n⊢ extension 0 = 0\n[PROOFSTEP]\nrw [← v.map_zero (R := K), ← Valued.extension_extends (0 : K)]\n[GOAL]\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\n⊢ extension 0 = extension (↑K 0)\n[PROOFSTEP]\nrfl\n[GOAL]\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\n⊢ ZeroHom.toFun { toFun := extension, map_zero' := (_ : extension 0 = 0) } 1 = 1\n[PROOFSTEP]\nsimp\n[GOAL]\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\n⊢ extension 1 = 1\n[PROOFSTEP]\nrw [← Completion.coe_one, Valued.extension_extends (1 : K)]\n[GOAL]\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\n⊢ ↑v 1 = 1\n[PROOFSTEP]\nexact Valuation.map_one _\n[GOAL]\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nx y : hat K\n⊢ ZeroHom.toFun { toFun := extension, map_zero' := (_ : extension 0 = 0) } (x * y) =\n    ZeroHom.toFun { toFun := extension, map_zero' := (_ : extension 0 = 0) } x *\n      ZeroHom.toFun { toFun := extension, map_zero' := (_ : extension 0 = 0) } y\n[PROOFSTEP]\napply Completion.induction_on₂ x y (p := fun x y => extension (x * y) = extension x * extension y)\n[GOAL]\ncase hp\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nx y : hat K\n⊢ IsClosed {x | extension (x.fst * x.snd) = extension x.fst * extension x.snd}\n[PROOFSTEP]\nhave c1 : Continuous fun x : hat K × hat K => Valued.extension (x.1 * x.2) :=\n  Valued.continuous_extension.comp (continuous_fst.mul continuous_snd)\n[GOAL]\ncase hp\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nx y : hat K\nc1 : Continuous fun x => extension (x.fst * x.snd)\n⊢ IsClosed {x | extension (x.fst * x.snd) = extension x.fst * extension x.snd}\n[PROOFSTEP]\nhave c2 : Continuous fun x : hat K × hat K => Valued.extension x.1 * Valued.extension x.2 :=\n  (Valued.continuous_extension.comp continuous_fst).mul (Valued.continuous_extension.comp continuous_snd)\n[GOAL]\ncase hp\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nx y : hat K\nc1 : Continuous fun x => extension (x.fst * x.snd)\nc2 : Continuous fun x => extension x.fst * extension x.snd\n⊢ IsClosed {x | extension (x.fst * x.snd) = extension x.fst * extension x.snd}\n[PROOFSTEP]\nexact isClosed_eq c1 c2\n[GOAL]\ncase ih\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nx y : hat K\n⊢ ∀ (a b : K), extension (↑K a * ↑K b) = extension (↑K a) * extension (↑K b)\n[PROOFSTEP]\nintro x y\n[GOAL]\ncase ih\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nx✝ y✝ : hat K\nx y : K\n⊢ extension (↑K x * ↑K y) = extension (↑K x) * extension (↑K y)\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase ih\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nx✝ y✝ : hat K\nx y : K\n⊢ ↑v (x * y) = ↑v x * ↑v y\n[PROOFSTEP]\nexact Valuation.map_mul _ _ _\n[GOAL]\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nx y : hat K\n⊢ ZeroHom.toFun\n      (↑{ toZeroHom := { toFun := extension, map_zero' := (_ : extension 0 = 0) },\n          map_one' := (_ : ZeroHom.toFun { toFun := extension, map_zero' := (_ : extension 0 = 0) } 1 = 1),\n          map_mul' := (_ : ∀ (x y : hat K), extension (x * y) = extension x * extension y) })\n      (x + y) ≤\n    max\n      (ZeroHom.toFun\n        (↑{ toZeroHom := { toFun := extension, map_zero' := (_ : extension 0 = 0) },\n            map_one' := (_ : ZeroHom.toFun { toFun := extension, map_zero' := (_ : extension 0 = 0) } 1 = 1),\n            map_mul' := (_ : ∀ (x y : hat K), extension (x * y) = extension x * extension y) })\n        x)\n      (ZeroHom.toFun\n        (↑{ toZeroHom := { toFun := extension, map_zero' := (_ : extension 0 = 0) },\n            map_one' := (_ : ZeroHom.toFun { toFun := extension, map_zero' := (_ : extension 0 = 0) } 1 = 1),\n            map_mul' := (_ : ∀ (x y : hat K), extension (x * y) = extension x * extension y) })\n        y)\n[PROOFSTEP]\nrw [le_max_iff]\n[GOAL]\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nx y : hat K\n⊢ ZeroHom.toFun\n        (↑{ toZeroHom := { toFun := extension, map_zero' := (_ : extension 0 = 0) },\n            map_one' := (_ : ZeroHom.toFun { toFun := extension, map_zero' := (_ : extension 0 = 0) } 1 = 1),\n            map_mul' := (_ : ∀ (x y : hat K), extension (x * y) = extension x * extension y) })\n        (x + y) ≤\n      ZeroHom.toFun\n        (↑{ toZeroHom := { toFun := extension, map_zero' := (_ : extension 0 = 0) },\n            map_one' := (_ : ZeroHom.toFun { toFun := extension, map_zero' := (_ : extension 0 = 0) } 1 = 1),\n            map_mul' := (_ : ∀ (x y : hat K), extension (x * y) = extension x * extension y) })\n        x ∨\n    ZeroHom.toFun\n        (↑{ toZeroHom := { toFun := extension, map_zero' := (_ : extension 0 = 0) },\n            map_one' := (_ : ZeroHom.toFun { toFun := extension, map_zero' := (_ : extension 0 = 0) } 1 = 1),\n            map_mul' := (_ : ∀ (x y : hat K), extension (x * y) = extension x * extension y) })\n        (x + y) ≤\n      ZeroHom.toFun\n        (↑{ toZeroHom := { toFun := extension, map_zero' := (_ : extension 0 = 0) },\n            map_one' := (_ : ZeroHom.toFun { toFun := extension, map_zero' := (_ : extension 0 = 0) } 1 = 1),\n            map_mul' := (_ : ∀ (x y : hat K), extension (x * y) = extension x * extension y) })\n        y\n[PROOFSTEP]\napply Completion.induction_on₂ x y (p := fun x y => extension (x + y) ≤ extension x ∨ extension (x + y) ≤ extension y)\n[GOAL]\ncase hp\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nx y : hat K\n⊢ IsClosed {x | extension (x.fst + x.snd) ≤ extension x.fst ∨ extension (x.fst + x.snd) ≤ extension x.snd}\n[PROOFSTEP]\nhave cont : Continuous (Valued.extension : hat K → Γ₀) := Valued.continuous_extension\n[GOAL]\ncase hp\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nx y : hat K\ncont : Continuous extension\n⊢ IsClosed {x | extension (x.fst + x.snd) ≤ extension x.fst ∨ extension (x.fst + x.snd) ≤ extension x.snd}\n[PROOFSTEP]\nexact\n  (isClosed_le (cont.comp continuous_add) <| cont.comp continuous_fst).union\n    (isClosed_le (cont.comp continuous_add) <| cont.comp continuous_snd)\n[GOAL]\ncase ih\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nx y : hat K\n⊢ ∀ (a b : K), extension (↑K a + ↑K b) ≤ extension (↑K a) ∨ extension (↑K a + ↑K b) ≤ extension (↑K b)\n[PROOFSTEP]\nintro x y\n[GOAL]\ncase ih\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nx✝ y✝ : hat K\nx y : K\n⊢ extension (↑K x + ↑K y) ≤ extension (↑K x) ∨ extension (↑K x + ↑K y) ≤ extension (↑K y)\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase ih\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nx✝ y✝ : hat K\nx y : K\n⊢ ↑v (x + y) ≤ ↑v x ∨ ↑v (x + y) ≤ ↑v y\n[PROOFSTEP]\nrw [← le_max_iff]\n[GOAL]\ncase ih\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nx✝ y✝ : hat K\nx y : K\n⊢ ↑v (x + y) ≤ max (↑v x) (↑v y)\n[PROOFSTEP]\nexact v.map_add x y\n[GOAL]\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nγ : Γ₀ˣ\n⊢ closure (↑K '' {x | ↑v x < ↑γ}) = {x | ↑extensionValuation x < ↑γ}\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nγ : Γ₀ˣ\nx : hat K\n⊢ x ∈ closure (↑K '' {x | ↑v x < ↑γ}) ↔ x ∈ {x | ↑extensionValuation x < ↑γ}\n[PROOFSTEP]\nlet γ₀ := extensionValuation x\n[GOAL]\ncase h\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nγ : Γ₀ˣ\nx : hat K\nγ₀ : (fun x => Γ₀) x := ↑extensionValuation x\n⊢ x ∈ closure (↑K '' {x | ↑v x < ↑γ}) ↔ x ∈ {x | ↑extensionValuation x < ↑γ}\n[PROOFSTEP]\nsuffices γ₀ ≠ 0 → (x ∈ closure ((↑) '' {x : K | v x < (γ : Γ₀)}) ↔ γ₀ < (γ : Γ₀))\n  by\n  cases' eq_or_ne γ₀ 0 with h h\n  · simp only [h, (Valuation.zero_iff _).mp h, mem_setOf_eq, Valuation.map_zero, Units.zero_lt, iff_true_iff]\n    apply subset_closure\n    exact ⟨0, by simp only [mem_setOf_eq, Valuation.map_zero, Units.zero_lt, true_and_iff]; rfl⟩\n  · exact this h\n[GOAL]\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nγ : Γ₀ˣ\nx : hat K\nγ₀ : (fun x => Γ₀) x := ↑extensionValuation x\nthis : γ₀ ≠ 0 → (x ∈ closure (↑K '' {x | ↑v x < ↑γ}) ↔ γ₀ < ↑γ)\n⊢ x ∈ closure (↑K '' {x | ↑v x < ↑γ}) ↔ x ∈ {x | ↑extensionValuation x < ↑γ}\n[PROOFSTEP]\ncases' eq_or_ne γ₀ 0 with h h\n[GOAL]\ncase inl\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nγ : Γ₀ˣ\nx : hat K\nγ₀ : (fun x => Γ₀) x := ↑extensionValuation x\nthis : γ₀ ≠ 0 → (x ∈ closure (↑K '' {x | ↑v x < ↑γ}) ↔ γ₀ < ↑γ)\nh : γ₀ = 0\n⊢ x ∈ closure (↑K '' {x | ↑v x < ↑γ}) ↔ x ∈ {x | ↑extensionValuation x < ↑γ}\n[PROOFSTEP]\nsimp only [h, (Valuation.zero_iff _).mp h, mem_setOf_eq, Valuation.map_zero, Units.zero_lt, iff_true_iff]\n[GOAL]\ncase inl\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nγ : Γ₀ˣ\nx : hat K\nγ₀ : (fun x => Γ₀) x := ↑extensionValuation x\nthis : γ₀ ≠ 0 → (x ∈ closure (↑K '' {x | ↑v x < ↑γ}) ↔ γ₀ < ↑γ)\nh : γ₀ = 0\n⊢ 0 ∈ closure (↑K '' {x | ↑v x < ↑γ})\n[PROOFSTEP]\napply subset_closure\n[GOAL]\ncase inl.a\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nγ : Γ₀ˣ\nx : hat K\nγ₀ : (fun x => Γ₀) x := ↑extensionValuation x\nthis : γ₀ ≠ 0 → (x ∈ closure (↑K '' {x | ↑v x < ↑γ}) ↔ γ₀ < ↑γ)\nh : γ₀ = 0\n⊢ 0 ∈ ↑K '' {x | ↑v x < ↑γ}\n[PROOFSTEP]\nexact ⟨0, by simp only [mem_setOf_eq, Valuation.map_zero, Units.zero_lt, true_and_iff]; rfl⟩\n[GOAL]\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nγ : Γ₀ˣ\nx : hat K\nγ₀ : (fun x => Γ₀) x := ↑extensionValuation x\nthis : γ₀ ≠ 0 → (x ∈ closure (↑K '' {x | ↑v x < ↑γ}) ↔ γ₀ < ↑γ)\nh : γ₀ = 0\n⊢ 0 ∈ {x | ↑v x < ↑γ} ∧ ↑K 0 = 0\n[PROOFSTEP]\nsimp only [mem_setOf_eq, Valuation.map_zero, Units.zero_lt, true_and_iff]\n[GOAL]\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nγ : Γ₀ˣ\nx : hat K\nγ₀ : (fun x => Γ₀) x := ↑extensionValuation x\nthis : γ₀ ≠ 0 → (x ∈ closure (↑K '' {x | ↑v x < ↑γ}) ↔ γ₀ < ↑γ)\nh : γ₀ = 0\n⊢ ↑K 0 = 0\n[PROOFSTEP]\nrfl\n[GOAL]\ncase inr\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nγ : Γ₀ˣ\nx : hat K\nγ₀ : (fun x => Γ₀) x := ↑extensionValuation x\nthis : γ₀ ≠ 0 → (x ∈ closure (↑K '' {x | ↑v x < ↑γ}) ↔ γ₀ < ↑γ)\nh : γ₀ ≠ 0\n⊢ x ∈ closure (↑K '' {x | ↑v x < ↑γ}) ↔ x ∈ {x | ↑extensionValuation x < ↑γ}\n[PROOFSTEP]\nexact this h\n[GOAL]\ncase h\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nγ : Γ₀ˣ\nx : hat K\nγ₀ : (fun x => Γ₀) x := ↑extensionValuation x\n⊢ γ₀ ≠ 0 → (x ∈ closure (↑K '' {x | ↑v x < ↑γ}) ↔ γ₀ < ↑γ)\n[PROOFSTEP]\nintro h\n[GOAL]\ncase h\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nγ : Γ₀ˣ\nx : hat K\nγ₀ : (fun x => Γ₀) x := ↑extensionValuation x\nh : γ₀ ≠ 0\n⊢ x ∈ closure (↑K '' {x | ↑v x < ↑γ}) ↔ γ₀ < ↑γ\n[PROOFSTEP]\nhave hγ₀ : extension ⁻¹' { γ₀ } ∈ 𝓝 x :=\n  continuous_extension.continuousAt.preimage_mem_nhds (WithZeroTopology.singleton_mem_nhds_of_ne_zero h)\n[GOAL]\ncase h\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nγ : Γ₀ˣ\nx : hat K\nγ₀ : (fun x => Γ₀) x := ↑extensionValuation x\nh : γ₀ ≠ 0\nhγ₀ : extension ⁻¹' {γ₀} ∈ 𝓝 x\n⊢ x ∈ closure (↑K '' {x | ↑v x < ↑γ}) ↔ γ₀ < ↑γ\n[PROOFSTEP]\nrw [mem_closure_iff_nhds']\n[GOAL]\ncase h\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nγ : Γ₀ˣ\nx : hat K\nγ₀ : (fun x => Γ₀) x := ↑extensionValuation x\nh : γ₀ ≠ 0\nhγ₀ : extension ⁻¹' {γ₀} ∈ 𝓝 x\n⊢ (∀ (t : Set (hat K)), t ∈ 𝓝 x → ∃ y, ↑y ∈ t) ↔ γ₀ < ↑γ\n[PROOFSTEP]\nrefine' ⟨fun hx => _, fun hx s hs => _⟩\n[GOAL]\ncase h.refine'_1\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nγ : Γ₀ˣ\nx : hat K\nγ₀ : (fun x => Γ₀) x := ↑extensionValuation x\nh : γ₀ ≠ 0\nhγ₀ : extension ⁻¹' {γ₀} ∈ 𝓝 x\nhx : ∀ (t : Set (hat K)), t ∈ 𝓝 x → ∃ y, ↑y ∈ t\n⊢ γ₀ < ↑γ\n[PROOFSTEP]\nobtain ⟨⟨-, y, hy₁ : v y < (γ : Γ₀), rfl⟩, hy₂⟩ := hx _ hγ₀\n[GOAL]\ncase h.refine'_1.intro.mk.intro.intro\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nγ : Γ₀ˣ\nx : hat K\nγ₀ : (fun x => Γ₀) x := ↑extensionValuation x\nh : γ₀ ≠ 0\nhγ₀ : extension ⁻¹' {γ₀} ∈ 𝓝 x\nhx : ∀ (t : Set (hat K)), t ∈ 𝓝 x → ∃ y, ↑y ∈ t\ny : K\nhy₁ : ↑v y < ↑γ\nhy₂ : ↑{ val := ↑K y, property := (_ : ∃ a, a ∈ {x | ↑v x < ↑γ} ∧ ↑K a = ↑K y) } ∈ extension ⁻¹' {γ₀}\n⊢ γ₀ < ↑γ\n[PROOFSTEP]\nreplace hy₂ : v y = γ₀\n[GOAL]\ncase hy₂\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nγ : Γ₀ˣ\nx : hat K\nγ₀ : (fun x => Γ₀) x := ↑extensionValuation x\nh : γ₀ ≠ 0\nhγ₀ : extension ⁻¹' {γ₀} ∈ 𝓝 x\nhx : ∀ (t : Set (hat K)), t ∈ 𝓝 x → ∃ y, ↑y ∈ t\ny : K\nhy₁ : ↑v y < ↑γ\nhy₂ : ↑{ val := ↑K y, property := (_ : ∃ a, a ∈ {x | ↑v x < ↑γ} ∧ ↑K a = ↑K y) } ∈ extension ⁻¹' {γ₀}\n⊢ ↑v y = γ₀\n[PROOFSTEP]\nsimpa using hy₂\n[GOAL]\ncase h.refine'_1.intro.mk.intro.intro\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nγ : Γ₀ˣ\nx : hat K\nγ₀ : (fun x => Γ₀) x := ↑extensionValuation x\nh : γ₀ ≠ 0\nhγ₀ : extension ⁻¹' {γ₀} ∈ 𝓝 x\nhx : ∀ (t : Set (hat K)), t ∈ 𝓝 x → ∃ y, ↑y ∈ t\ny : K\nhy₁ : ↑v y < ↑γ\nhy₂ : ↑v y = γ₀\n⊢ γ₀ < ↑γ\n[PROOFSTEP]\nrwa [← hy₂]\n[GOAL]\ncase h.refine'_2\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nγ : Γ₀ˣ\nx : hat K\nγ₀ : (fun x => Γ₀) x := ↑extensionValuation x\nh : γ₀ ≠ 0\nhγ₀ : extension ⁻¹' {γ₀} ∈ 𝓝 x\nhx : γ₀ < ↑γ\ns : Set (hat K)\nhs : s ∈ 𝓝 x\n⊢ ∃ y, ↑y ∈ s\n[PROOFSTEP]\nobtain ⟨y, hy₁, hy₂⟩ := Completion.denseRange_coe.mem_nhds (inter_mem hγ₀ hs)\n[GOAL]\ncase h.refine'_2.intro.intro\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nγ : Γ₀ˣ\nx : hat K\nγ₀ : (fun x => Γ₀) x := ↑extensionValuation x\nh : γ₀ ≠ 0\nhγ₀ : extension ⁻¹' {γ₀} ∈ 𝓝 x\nhx : γ₀ < ↑γ\ns : Set (hat K)\nhs : s ∈ 𝓝 x\ny : K\nhy₁ : ↑K y ∈ extension ⁻¹' {γ₀}\nhy₂ : ↑K y ∈ s\n⊢ ∃ y, ↑y ∈ s\n[PROOFSTEP]\nreplace hy₁ : v y = γ₀\n[GOAL]\ncase hy₁\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nγ : Γ₀ˣ\nx : hat K\nγ₀ : (fun x => Γ₀) x := ↑extensionValuation x\nh : γ₀ ≠ 0\nhγ₀ : extension ⁻¹' {γ₀} ∈ 𝓝 x\nhx : γ₀ < ↑γ\ns : Set (hat K)\nhs : s ∈ 𝓝 x\ny : K\nhy₁ : ↑K y ∈ extension ⁻¹' {γ₀}\nhy₂ : ↑K y ∈ s\n⊢ ↑v y = γ₀\n[PROOFSTEP]\nsimpa using hy₁\n[GOAL]\ncase h.refine'_2.intro.intro\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nγ : Γ₀ˣ\nx : hat K\nγ₀ : (fun x => Γ₀) x := ↑extensionValuation x\nh : γ₀ ≠ 0\nhγ₀ : extension ⁻¹' {γ₀} ∈ 𝓝 x\nhx : γ₀ < ↑γ\ns : Set (hat K)\nhs : s ∈ 𝓝 x\ny : K\nhy₂ : ↑K y ∈ s\nhy₁ : ↑v y = γ₀\n⊢ ∃ y, ↑y ∈ s\n[PROOFSTEP]\nrw [← hy₁] at hx \n[GOAL]\ncase h.refine'_2.intro.intro\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\nγ : Γ₀ˣ\nx : hat K\nγ₀ : (fun x => Γ₀) x := ↑extensionValuation x\nh : γ₀ ≠ 0\nhγ₀ : extension ⁻¹' {γ₀} ∈ 𝓝 x\ns : Set (hat K)\nhs : s ∈ 𝓝 x\ny : K\nhx : ↑v y < ↑γ\nhy₂ : ↑K y ∈ s\nhy₁ : ↑v y = γ₀\n⊢ ∃ y, ↑y ∈ s\n[PROOFSTEP]\nexact ⟨⟨y, ⟨y, hx, rfl⟩⟩, hy₂⟩\n[GOAL]\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\ns : Set (hat K)\n⊢ s ∈ 𝓝 0 ↔ ∃ γ, {x | ↑extensionValuation x < ↑γ} ⊆ s\n[PROOFSTEP]\nsuffices HasBasis (𝓝 (0 : hat K)) (fun _ => True) fun γ : Γ₀ˣ => {x | extensionValuation x < γ}\n  by\n  rw [this.mem_iff]\n  exact exists_congr fun γ => by simp\n[GOAL]\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\ns : Set (hat K)\nthis : HasBasis (𝓝 0) (fun x => True) fun γ => {x | ↑extensionValuation x < ↑γ}\n⊢ s ∈ 𝓝 0 ↔ ∃ γ, {x | ↑extensionValuation x < ↑γ} ⊆ s\n[PROOFSTEP]\nrw [this.mem_iff]\n[GOAL]\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\ns : Set (hat K)\nthis : HasBasis (𝓝 0) (fun x => True) fun γ => {x | ↑extensionValuation x < ↑γ}\n⊢ (∃ i, True ∧ {x | ↑extensionValuation x < ↑i} ⊆ s) ↔ ∃ γ, {x | ↑extensionValuation x < ↑γ} ⊆ s\n[PROOFSTEP]\nexact exists_congr fun γ => by simp\n[GOAL]\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\ns : Set (hat K)\nthis : HasBasis (𝓝 0) (fun x => True) fun γ => {x | ↑extensionValuation x < ↑γ}\nγ : Γ₀ˣ\n⊢ True ∧ {x | ↑extensionValuation x < ↑γ} ⊆ s ↔ {x | ↑extensionValuation x < ↑γ} ⊆ s\n[PROOFSTEP]\nsimp\n[GOAL]\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\ns : Set (hat K)\n⊢ HasBasis (𝓝 0) (fun x => True) fun γ => {x | ↑extensionValuation x < ↑γ}\n[PROOFSTEP]\nsimp_rw [← closure_coe_completion_v_lt]\n[GOAL]\nK : Type u_1\ninst✝¹ : Field K\nΓ₀ : Type u_2\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nhv : Valued K Γ₀\ns : Set (hat K)\n⊢ HasBasis (𝓝 0) (fun x => True) fun γ => closure (↑K '' {x | ↑v x < ↑γ})\n[PROOFSTEP]\nexact (hasBasis_nhds_zero K Γ₀).hasBasis_of_denseInducing Completion.denseInducing_coe\n", "meta": {"mathlib_filename": "Mathlib.Topology.Algebra.ValuedField", "llama_tokens": 52847, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8354835452961425, "lm_q2_score": 0.6297746213017459, "lm_q1q2_score": 0.5261663333427182}}
{"text": "[GOAL]\nl m✝ n✝ : ℕ\nα : Type u_1\nβ : Type u_2\nm n : ℕ\nP : Matrix (Fin (m + 1)) (Fin n) α → Prop\n⊢ Forall P ↔ ∀ (x : Matrix (Fin (m + 1)) (Fin n) α), P x\n[PROOFSTEP]\nsimp only [Forall, FinVec.forall_iff, forall_iff]\n[GOAL]\nl m✝ n✝ : ℕ\nα : Type u_1\nβ : Type u_2\nm n : ℕ\nP : Matrix (Fin (m + 1)) (Fin n) α → Prop\n⊢ (∀ (x : Fin n → α) (x_1 : Matrix (Fin (Nat.add m 0)) (Fin n) α), P (↑of (vecCons x x_1))) ↔\n    ∀ (x : Matrix (Fin (m + 1)) (Fin n) α), P x\n[PROOFSTEP]\nexact Iff.symm Fin.forall_fin_succ_pi\n[GOAL]\nl m✝ n✝ : ℕ\nα : Type u_1\nβ : Type u_2\nm n : ℕ\nP : Matrix (Fin (m + 1)) (Fin n) α → Prop\n⊢ Exists P ↔ ∃ x, P x\n[PROOFSTEP]\nsimp only [Exists, FinVec.exists_iff, exists_iff]\n[GOAL]\nl m✝ n✝ : ℕ\nα : Type u_1\nβ : Type u_2\nm n : ℕ\nP : Matrix (Fin (m + 1)) (Fin n) α → Prop\n⊢ (∃ x x_1, P (↑of (vecCons x x_1))) ↔ ∃ x, P x\n[PROOFSTEP]\nexact Iff.symm Fin.exists_fin_succ_pi\n[GOAL]\nl m✝ n✝ : ℕ\nα : Type u_1\nβ : Type u_2\nm n : ℕ\nA : Matrix (Fin m) (Fin (n + 1)) α\ni : Fin (n + 1)\nj : Fin m\n⊢ transposeᵣ A i j = Aᵀ i j\n[PROOFSTEP]\nsimp_rw [transposeᵣ, transposeᵣ_eq]\n[GOAL]\nl m✝ n✝ : ℕ\nα : Type u_1\nβ : Type u_2\nm n : ℕ\nA : Matrix (Fin m) (Fin (n + 1)) α\ni : Fin (n + 1)\nj : Fin m\n⊢ ↑of (vecCons (FinVec.map (fun v => v 0) A) (submatrix A id Fin.succ)ᵀ) i j = Aᵀ i j\n[PROOFSTEP]\nrefine' i.cases _ fun i => _\n[GOAL]\ncase refine'_1\nl m✝ n✝ : ℕ\nα : Type u_1\nβ : Type u_2\nm n : ℕ\nA : Matrix (Fin m) (Fin (n + 1)) α\ni : Fin (n + 1)\nj : Fin m\n⊢ ↑of (vecCons (FinVec.map (fun v => v 0) A) (submatrix A id Fin.succ)ᵀ) 0 j = Aᵀ 0 j\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase refine'_1\nl m✝ n✝ : ℕ\nα : Type u_1\nβ : Type u_2\nm n : ℕ\nA : Matrix (Fin m) (Fin (n + 1)) α\ni : Fin (n + 1)\nj : Fin m\n⊢ FinVec.map (fun v => v 0) A j = A j 0\n[PROOFSTEP]\nrw [FinVec.map_eq, Function.comp_apply]\n[GOAL]\ncase refine'_2\nl m✝ n✝ : ℕ\nα : Type u_1\nβ : Type u_2\nm n : ℕ\nA : Matrix (Fin m) (Fin (n + 1)) α\ni✝ : Fin (n + 1)\nj : Fin m\ni : Fin n\n⊢ ↑of (vecCons (FinVec.map (fun v => v 0) A) (submatrix A id Fin.succ)ᵀ) (Fin.succ i) j = Aᵀ (Fin.succ i) j\n[PROOFSTEP]\nsimp only [of_apply, Matrix.cons_val_succ]\n[GOAL]\ncase refine'_2\nl m✝ n✝ : ℕ\nα : Type u_1\nβ : Type u_2\nm n : ℕ\nA : Matrix (Fin m) (Fin (n + 1)) α\ni✝ : Fin (n + 1)\nj : Fin m\ni : Fin n\n⊢ (submatrix A id Fin.succ)ᵀ i j = Aᵀ (Fin.succ i) j\n[PROOFSTEP]\nrfl\n[GOAL]\nl m✝ n : ℕ\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Mul α\ninst✝ : AddCommMonoid α\nm : ℕ\na b : Fin m → α\n⊢ dotProductᵣ a b = a ⬝ᵥ b\n[PROOFSTEP]\nsimp_rw [dotProductᵣ, dotProduct, FinVec.sum_eq, FinVec.seq_eq, FinVec.map_eq, Function.comp_apply]\n[GOAL]\nl m n : ℕ\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Mul α\ninst✝ : AddCommMonoid α\nA : Matrix (Fin l) (Fin m) α\nB : Matrix (Fin m) (Fin n) α\n⊢ mulᵣ A B = A * B\n[PROOFSTEP]\nsimp [mulᵣ, Function.comp, Matrix.transpose]\n[GOAL]\nl m n : ℕ\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Mul α\ninst✝ : AddCommMonoid α\nA : Matrix (Fin l) (Fin m) α\nB : Matrix (Fin m) (Fin n) α\n⊢ (↑of fun x x_1 => A x ⬝ᵥ ↑of (fun x y => B y x) x_1) = A * B\n[PROOFSTEP]\nrfl\n[GOAL]\nl m n : ℕ\nα : Type u_1\nβ : Type u_2\ninst✝ : NonUnitalNonAssocSemiring α\nA : Matrix (Fin l) (Fin m) α\nv : Fin m → α\n⊢ mulVecᵣ A v = mulVec A v\n[PROOFSTEP]\nsimp [mulVecᵣ, Function.comp]\n[GOAL]\nl m n : ℕ\nα : Type u_1\nβ : Type u_2\ninst✝ : NonUnitalNonAssocSemiring α\nA : Matrix (Fin l) (Fin m) α\nv : Fin m → α\n⊢ (fun x => A x ⬝ᵥ v) = mulVec A v\n[PROOFSTEP]\nrfl\n[GOAL]\nl m n : ℕ\nα : Type u_1\nβ : Type u_2\ninst✝ : NonUnitalNonAssocSemiring α\nv : Fin l → α\nA : Matrix (Fin l) (Fin m) α\n⊢ vecMulᵣ v A = vecMul v A\n[PROOFSTEP]\nsimp [vecMulᵣ, Function.comp]\n[GOAL]\nl m n : ℕ\nα : Type u_1\nβ : Type u_2\ninst✝ : NonUnitalNonAssocSemiring α\nv : Fin l → α\nA : Matrix (Fin l) (Fin m) α\n⊢ (fun x => v ⬝ᵥ Aᵀ x) = vecMul v A\n[PROOFSTEP]\nrfl\n[GOAL]\nl m✝ n✝ : ℕ\nα : Type u_1\nβ : Type u_2\nm n : ℕ\nA : Matrix (Fin m) (Fin n) α\n⊢ etaExpand A = A\n[PROOFSTEP]\nsimp_rw [etaExpand, FinVec.etaExpand_eq, Matrix.of, Equiv.refl_apply]\n", "meta": {"mathlib_filename": "Mathlib.Data.Matrix.Reflection", "llama_tokens": 2101, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7745833841649232, "lm_q2_score": 0.6791787056691698, "lm_q1q2_score": 0.5260805402899779}}
{"text": "[GOAL]\nK : Type u\nV : Type v\ninst✝⁴ : Ring K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nV₂ : Type v'\ninst✝¹ : AddCommGroup V₂\ninst✝ : Module K V₂\nn : ℕ\nh : Module.rank K V = ↑n\n⊢ finrank K V = n\n[PROOFSTEP]\napply_fun toNat at h \n[GOAL]\nK : Type u\nV : Type v\ninst✝⁴ : Ring K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nV₂ : Type v'\ninst✝¹ : AddCommGroup V₂\ninst✝ : Module K V₂\nn : ℕ\nh : ↑toNat (Module.rank K V) = ↑toNat ↑n\n⊢ finrank K V = n\n[PROOFSTEP]\nrw [toNat_cast] at h \n[GOAL]\nK : Type u\nV : Type v\ninst✝⁴ : Ring K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nV₂ : Type v'\ninst✝¹ : AddCommGroup V₂\ninst✝ : Module K V₂\nn : ℕ\nh : ↑toNat (Module.rank K V) = n\n⊢ finrank K V = n\n[PROOFSTEP]\nexact_mod_cast h\n[GOAL]\nK : Type u\nV : Type v\ninst✝⁴ : Ring K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nV₂ : Type v'\ninst✝¹ : AddCommGroup V₂\ninst✝ : Module K V₂\nn : ℕ\nh : Module.rank K V ≤ ↑n\n⊢ finrank K V ≤ n\n[PROOFSTEP]\nrwa [← Cardinal.toNat_le_iff_le_of_lt_aleph0, toNat_cast] at h \n[GOAL]\ncase hc\nK : Type u\nV : Type v\ninst✝⁴ : Ring K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nV₂ : Type v'\ninst✝¹ : AddCommGroup V₂\ninst✝ : Module K V₂\nn : ℕ\nh : Module.rank K V ≤ ↑n\n⊢ Module.rank K V < ℵ₀\n[PROOFSTEP]\nexact h.trans_lt (nat_lt_aleph0 n)\n[GOAL]\ncase hd\nK : Type u\nV : Type v\ninst✝⁴ : Ring K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nV₂ : Type v'\ninst✝¹ : AddCommGroup V₂\ninst✝ : Module K V₂\nn : ℕ\nh : Module.rank K V ≤ ↑n\n⊢ ↑n < ℵ₀\n[PROOFSTEP]\nexact nat_lt_aleph0 n\n[GOAL]\nK : Type u\nV : Type v\ninst✝⁴ : Ring K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nV₂ : Type v'\ninst✝¹ : AddCommGroup V₂\ninst✝ : Module K V₂\nn : ℕ\nh : Module.rank K V < ↑n\n⊢ finrank K V < n\n[PROOFSTEP]\nrwa [← Cardinal.toNat_lt_iff_lt_of_lt_aleph0, toNat_cast] at h \n[GOAL]\ncase hc\nK : Type u\nV : Type v\ninst✝⁴ : Ring K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nV₂ : Type v'\ninst✝¹ : AddCommGroup V₂\ninst✝ : Module K V₂\nn : ℕ\nh : Module.rank K V < ↑n\n⊢ Module.rank K V < ℵ₀\n[PROOFSTEP]\nexact h.trans (nat_lt_aleph0 n)\n[GOAL]\ncase hd\nK : Type u\nV : Type v\ninst✝⁴ : Ring K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nV₂ : Type v'\ninst✝¹ : AddCommGroup V₂\ninst✝ : Module K V₂\nn : ℕ\nh : Module.rank K V < ↑n\n⊢ ↑n < ℵ₀\n[PROOFSTEP]\nexact nat_lt_aleph0 n\n[GOAL]\nK : Type u\nV : Type v\ninst✝⁴ : Ring K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nV₂ : Type v'\ninst✝¹ : AddCommGroup V₂\ninst✝ : Module K V₂\nn : ℕ\nh : n < finrank K V\n⊢ ↑n < Module.rank K V\n[PROOFSTEP]\nrwa [← Cardinal.toNat_lt_iff_lt_of_lt_aleph0, toNat_cast]\n[GOAL]\ncase hc\nK : Type u\nV : Type v\ninst✝⁴ : Ring K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nV₂ : Type v'\ninst✝¹ : AddCommGroup V₂\ninst✝ : Module K V₂\nn : ℕ\nh : n < finrank K V\n⊢ ↑n < ℵ₀\n[PROOFSTEP]\nexact nat_lt_aleph0 n\n[GOAL]\ncase hd\nK : Type u\nV : Type v\ninst✝⁴ : Ring K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nV₂ : Type v'\ninst✝¹ : AddCommGroup V₂\ninst✝ : Module K V₂\nn : ℕ\nh : n < finrank K V\n⊢ Module.rank K V < ℵ₀\n[PROOFSTEP]\ncontrapose! h\n[GOAL]\ncase hd\nK : Type u\nV : Type v\ninst✝⁴ : Ring K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nV₂ : Type v'\ninst✝¹ : AddCommGroup V₂\ninst✝ : Module K V₂\nn : ℕ\nh : ℵ₀ ≤ Module.rank K V\n⊢ finrank K V ≤ n\n[PROOFSTEP]\nrw [finrank, Cardinal.toNat_apply_of_aleph0_le h]\n[GOAL]\ncase hd\nK : Type u\nV : Type v\ninst✝⁴ : Ring K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nV₂ : Type v'\ninst✝¹ : AddCommGroup V₂\ninst✝ : Module K V₂\nn : ℕ\nh : ℵ₀ ≤ Module.rank K V\n⊢ 0 ≤ n\n[PROOFSTEP]\nexact n.zero_le\n[GOAL]\nK : Type u\nV : Type v\ninst✝⁴ : Ring K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nV₂ : Type v'\ninst✝¹ : AddCommGroup V₂\ninst✝ : Module K V₂\nh : 1 < finrank K V\n⊢ 1 < Module.rank K V\n[PROOFSTEP]\nsimpa using lt_rank_of_lt_finrank h\n[GOAL]\nK : Type u\nV : Type v\ninst✝⁴ : Ring K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nV₂ : Type v'\ninst✝¹ : AddCommGroup V₂\ninst✝ : Module K V₂\nh : lift (Module.rank K V) ≤ lift (Module.rank K V₂)\nh' : Module.rank K V₂ < ℵ₀\n⊢ finrank K V ≤ finrank K V₂\n[PROOFSTEP]\nsimpa only [toNat_lift] using toNat_le_of_le_of_lt_aleph0 (lift_lt_aleph0.mpr h') h\n[GOAL]\nK : Type u\nV : Type v\ninst✝⁶ : Ring K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module K V\nV₂ : Type v'\ninst✝³ : AddCommGroup V₂\ninst✝² : Module K V₂\ninst✝¹ : Nontrivial K\ninst✝ : NoZeroSMulDivisors K V\nn : ℕ\nhn : finrank K V = Nat.succ n\n⊢ 0 < finrank (?m.108424 hn) V\n[PROOFSTEP]\nrw [hn]\n[GOAL]\nK : Type u\nV : Type v\ninst✝⁶ : Ring K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module K V\nV₂ : Type v'\ninst✝³ : AddCommGroup V₂\ninst✝² : Module K V₂\ninst✝¹ : Nontrivial K\ninst✝ : NoZeroSMulDivisors K V\nn : ℕ\nhn : finrank K V = Nat.succ n\n⊢ 0 < Nat.succ n\n[PROOFSTEP]\nexact n.succ_pos\n[GOAL]\nK : Type u\nV : Type v\ninst✝⁶ : Ring K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module K V\nV₂ : Type v'\ninst✝³ : AddCommGroup V₂\ninst✝² : Module K V₂\ninst✝¹ : Nontrivial K\ninst✝ : NoZeroSMulDivisors K V\nh : Subsingleton V\n⊢ finrank K V = 0\n[PROOFSTEP]\nby_contra h0\n[GOAL]\nK : Type u\nV : Type v\ninst✝⁶ : Ring K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module K V\nV₂ : Type v'\ninst✝³ : AddCommGroup V₂\ninst✝² : Module K V₂\ninst✝¹ : Nontrivial K\ninst✝ : NoZeroSMulDivisors K V\nh : Subsingleton V\nh0 : ¬finrank K V = 0\n⊢ False\n[PROOFSTEP]\nobtain ⟨x, y, hxy⟩ := nontrivial_of_finrank_pos (Nat.pos_of_ne_zero h0)\n[GOAL]\ncase mk.intro.intro\nK : Type u\nV : Type v\ninst✝⁶ : Ring K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module K V\nV₂ : Type v'\ninst✝³ : AddCommGroup V₂\ninst✝² : Module K V₂\ninst✝¹ : Nontrivial K\ninst✝ : NoZeroSMulDivisors K V\nh : Subsingleton V\nh0 : ¬finrank K V = 0\nx y : V\nhxy : x ≠ y\n⊢ False\n[PROOFSTEP]\nexact hxy (Subsingleton.elim _ _)\n[GOAL]\nK : Type u\nV : Type v\ninst✝⁵ : Ring K\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module K V\nV₂ : Type v'\ninst✝² : AddCommGroup V₂\ninst✝¹ : Module K V₂\ninst✝ : StrongRankCondition K\nι : Type w\nb : Finset ι\nh : Basis { x // x ∈ b } K V\n⊢ finrank K V = Finset.card b\n[PROOFSTEP]\nrw [finrank_eq_card_basis h, Fintype.card_coe]\n[GOAL]\nK : Type u\nV : Type v\ninst✝⁵ : Ring K\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module K V\nV₂ : Type v'\ninst✝² : AddCommGroup V₂\ninst✝¹ : Module K V₂\ninst✝ : StrongRankCondition K\n⊢ Module.rank K K = ↑1\n[PROOFSTEP]\nsimp\n[GOAL]\nK : Type u\nV : Type v\ninst✝⁵ : Ring K\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module K V\nV₂ : Type v'\ninst✝² : AddCommGroup V₂\ninst✝¹ : Module K V₂\ninst✝ : StrongRankCondition K\nn : ℕ\n⊢ finrank K (Fin n → K) = n\n[PROOFSTEP]\nsimp\n[GOAL]\nK : Type u\nV : Type v\ninst✝⁴ : Ring K\ninst✝³ : StrongRankCondition K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : Free K V\nh : ∀ (s : Set V), Basis (↑s) K V → ¬Set.Finite s\n⊢ finrank K V = 0\n[PROOFSTEP]\nobtain ⟨_, ⟨b⟩⟩ := (Module.free_iff_set K V).mp ‹_›\n[GOAL]\ncase intro.intro\nK : Type u\nV : Type v\ninst✝⁴ : Ring K\ninst✝³ : StrongRankCondition K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : Free K V\nh : ∀ (s : Set V), Basis (↑s) K V → ¬Set.Finite s\nw✝ : Set V\nb : Basis (↑w✝) K V\n⊢ finrank K V = 0\n[PROOFSTEP]\nexact dif_neg fun rank_lt => h _ b (b.finite_index_of_rank_lt_aleph0 rank_lt)\n[GOAL]\nK : Type u\nV : Type v\ninst✝⁴ : Ring K\ninst✝³ : StrongRankCondition K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : Free K V\nh : ∀ (s : Finset V), Basis (↑↑s) K V → False\ns : Set V\nb : Basis (↑s) K V\nhs : Set.Finite s\n⊢ Basis (↑↑(Set.Finite.toFinset hs)) K V\n[PROOFSTEP]\nconvert b\n[GOAL]\ncase h.e'_1.h.e'_2\nK : Type u\nV : Type v\ninst✝⁴ : Ring K\ninst✝³ : StrongRankCondition K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : Free K V\nh : ∀ (s : Finset V), Basis (↑↑s) K V → False\ns : Set V\nb : Basis (↑s) K V\nhs : Set.Finite s\n⊢ ↑(Set.Finite.toFinset hs) = s\n[PROOFSTEP]\nsimp\n[GOAL]\nK : Type u\nV : Type v\ninst✝⁹ : Ring K\ninst✝⁸ : AddCommGroup V\ninst✝⁷ : Module K V\nV₂ : Type v'\ninst✝⁶ : AddCommGroup V₂\ninst✝⁵ : Module K V₂\nR : Type u_1\nM : Type u_2\nM₂ : Type u_3\ninst✝⁴ : Ring R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup M₂\ninst✝¹ : Module R M\ninst✝ : Module R M₂\nf : M ≃ₗ[R] M₂\n⊢ finrank R M = finrank R M₂\n[PROOFSTEP]\nunfold finrank\n[GOAL]\nK : Type u\nV : Type v\ninst✝⁹ : Ring K\ninst✝⁸ : AddCommGroup V\ninst✝⁷ : Module K V\nV₂ : Type v'\ninst✝⁶ : AddCommGroup V₂\ninst✝⁵ : Module K V₂\nR : Type u_1\nM : Type u_2\nM₂ : Type u_3\ninst✝⁴ : Ring R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup M₂\ninst✝¹ : Module R M\ninst✝ : Module R M₂\nf : M ≃ₗ[R] M₂\n⊢ ↑toNat (Module.rank R M) = ↑toNat (Module.rank R M₂)\n[PROOFSTEP]\nrw [← Cardinal.toNat_lift, f.lift_rank_eq, Cardinal.toNat_lift]\n[GOAL]\nK : Type u\nV : Type v\ninst✝⁴ : Ring K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nV₂ : Type v'\ninst✝¹ : AddCommGroup V₂\ninst✝ : Module K V₂\nf : V →ₗ[K] V₂\nhf : Injective ↑f\n⊢ finrank K { x // x ∈ range f } = finrank K V\n[PROOFSTEP]\nrw [(LinearEquiv.ofInjective f hf).finrank_eq]\n[GOAL]\nK : Type u\nV : Type v\ninst✝² : Ring K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\n⊢ finrank K { x // x ∈ ⊤ } = finrank K V\n[PROOFSTEP]\nunfold finrank\n[GOAL]\nK : Type u\nV : Type v\ninst✝² : Ring K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\n⊢ ↑toNat (Module.rank K { x // x ∈ ⊤ }) = ↑toNat (Module.rank K V)\n[PROOFSTEP]\nsimp [rank_top]\n[GOAL]\nK : Type u\nV : Type v\ninst✝⁴ : Ring K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nV₂ : Type v'\ninst✝¹ : AddCommGroup V₂\ninst✝ : Module K V₂\ns t : Submodule K V\nle : s ≤ t\nlt : finrank K { x // x ∈ s } < finrank K { x // x ∈ t }\nh : s = t\n⊢ finrank K { x // x ∈ s } = finrank K { x // x ∈ t }\n[PROOFSTEP]\nrw [h]\n[GOAL]\nK : Type u\nV : Type v\ninst✝⁴ : Ring K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nV₂ : Type v'\ninst✝¹ : AddCommGroup V₂\ninst✝ : Module K V₂\ns : Submodule K V\nlt : finrank K { x // x ∈ s } < finrank K V\n⊢ s < ⊤\n[PROOFSTEP]\nrw [← finrank_top K V] at lt \n[GOAL]\nK : Type u\nV : Type v\ninst✝⁴ : Ring K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\nV₂ : Type v'\ninst✝¹ : AddCommGroup V₂\ninst✝ : Module K V₂\ns : Submodule K V\nlt : finrank K { x // x ∈ s } < finrank K { x // x ∈ ⊤ }\n⊢ s < ⊤\n[PROOFSTEP]\nexact lt_of_le_of_finrank_lt_finrank le_top lt\n[GOAL]\nK : Type u\nV : Type v\ninst✝³ : DivisionRing K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ns : Set V\ninst✝ : Fintype ↑s\n⊢ Module.rank K { x // x ∈ span K s } ≤ ↑(Finset.card (Set.toFinset s))\n[PROOFSTEP]\nsimpa using rank_span_le (K := K) s\n[GOAL]\nK : Type u\nV : Type v\ninst✝² : DivisionRing K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\ns : Finset V\n⊢ Finset.card (Set.toFinset ↑s) = Finset.card s\n[PROOFSTEP]\nsimp\n[GOAL]\nK : Type u\nV : Type v\ninst✝³ : DivisionRing K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\nι : Type u_1\ninst✝ : Fintype ι\nb : ι → V\n⊢ Set.finrank K (Set.range b) ≤ Fintype.card ι\n[PROOFSTEP]\nclassical\nrefine (finrank_span_le_card _).trans ?_\nrw [Set.toFinset_range]\nexact Finset.card_image_le\n[GOAL]\nK : Type u\nV : Type v\ninst✝³ : DivisionRing K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\nι : Type u_1\ninst✝ : Fintype ι\nb : ι → V\n⊢ Set.finrank K (Set.range b) ≤ Fintype.card ι\n[PROOFSTEP]\nrefine (finrank_span_le_card _).trans ?_\n[GOAL]\nK : Type u\nV : Type v\ninst✝³ : DivisionRing K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\nι : Type u_1\ninst✝ : Fintype ι\nb : ι → V\n⊢ Finset.card (Set.toFinset (Set.range b)) ≤ Fintype.card ι\n[PROOFSTEP]\nrw [Set.toFinset_range]\n[GOAL]\nK : Type u\nV : Type v\ninst✝³ : DivisionRing K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\nι : Type u_1\ninst✝ : Fintype ι\nb : ι → V\n⊢ Finset.card (Finset.image b Finset.univ) ≤ Fintype.card ι\n[PROOFSTEP]\nexact Finset.card_image_le\n[GOAL]\nK : Type u\nV : Type v\ninst✝³ : DivisionRing K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\nι : Type u_1\ninst✝ : Fintype ι\nb : ι → V\nhb : LinearIndependent K b\n⊢ Module.rank K { x // x ∈ span K (Set.range b) } = ↑(Fintype.card ι)\n[PROOFSTEP]\nhave : Module.rank K (span K (Set.range b)) = #(Set.range b) := rank_span hb\n[GOAL]\nK : Type u\nV : Type v\ninst✝³ : DivisionRing K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\nι : Type u_1\ninst✝ : Fintype ι\nb : ι → V\nhb : LinearIndependent K b\nthis : Module.rank K { x // x ∈ span K (Set.range b) } = #↑(Set.range b)\n⊢ Module.rank K { x // x ∈ span K (Set.range b) } = ↑(Fintype.card ι)\n[PROOFSTEP]\nrwa [← lift_inj, mk_range_eq_of_injective hb.injective, Cardinal.mk_fintype, lift_natCast, lift_eq_nat_iff] at this \n[GOAL]\nK : Type u\nV : Type v\ninst✝³ : DivisionRing K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ns : Set V\ninst✝ : Fintype ↑s\nhs : LinearIndependent K Subtype.val\n⊢ Module.rank K { x // x ∈ span K s } = ↑(Finset.card (Set.toFinset s))\n[PROOFSTEP]\nhave : Module.rank K (span K s) = #s := rank_span_set hs\n[GOAL]\nK : Type u\nV : Type v\ninst✝³ : DivisionRing K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ns : Set V\ninst✝ : Fintype ↑s\nhs : LinearIndependent K Subtype.val\nthis : Module.rank K { x // x ∈ span K s } = #↑s\n⊢ Module.rank K { x // x ∈ span K s } = ↑(Finset.card (Set.toFinset s))\n[PROOFSTEP]\nrwa [Cardinal.mk_fintype, ← Set.toFinset_card] at this \n[GOAL]\nK : Type u\nV : Type v\ninst✝² : DivisionRing K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\ns : Finset V\nhs : LinearIndependent K Subtype.val\n⊢ finrank K { x // x ∈ span K ↑s } = Finset.card s\n[PROOFSTEP]\nconvert finrank_span_set_eq_card (s : Set V) hs\n[GOAL]\ncase h.e'_3.h.e'_2\nK : Type u\nV : Type v\ninst✝² : DivisionRing K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\ns : Finset V\nhs : LinearIndependent K Subtype.val\n⊢ s = Set.toFinset ↑s\n[PROOFSTEP]\next\n[GOAL]\ncase h.e'_3.h.e'_2.a\nK : Type u\nV : Type v\ninst✝² : DivisionRing K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\ns : Finset V\nhs : LinearIndependent K Subtype.val\na✝ : V\n⊢ a✝ ∈ s ↔ a✝ ∈ Set.toFinset ↑s\n[PROOFSTEP]\nsimp\n[GOAL]\nK : Type u\nV : Type v\ninst✝³ : DivisionRing K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\nι : Type u_1\ninst✝ : Fintype ι\nb : ι → V\nspans : ⊤ ≤ span K (Set.range b)\ncard_eq : Fintype.card ι = finrank K V\ns : Finset ι\ng : ι → K\ndependent : (Finset.sum s fun i => g i • b i) = 0\ni : ι\ni_mem_s : i ∈ s\n⊢ g i = 0\n[PROOFSTEP]\nclassical\nby_contra gx_ne_zero\nrefine'\n  not_le_of_gt (span_lt_top_of_card_lt_finrank (show (b '' (Set.univ \\ { i })).toFinset.card < finrank K V from _)) _\n·\n  calc\n    (b '' (Set.univ \\ { i })).toFinset.card = ((Set.univ \\ { i }).toFinset.image b).card := by\n      rw [Set.toFinset_card, Fintype.card_ofFinset]\n    _ ≤ (Set.univ \\ { i }).toFinset.card := Finset.card_image_le\n    _ = (Finset.univ.erase i).card := (congr_arg Finset.card (Finset.ext (by simp [and_comm])))\n    _ < Finset.univ.card := (Finset.card_erase_lt_of_mem (Finset.mem_univ i))\n    _ = finrank K V := card_eq\nrefine' spans.trans (span_le.mpr _)\nrintro _\n  ⟨j, rfl, rfl⟩\n      -- The case that `j ≠ i` is easy because `b j ∈ b '' (univ \\ {i})`.\nby_cases j_eq : j = i\nswap\n· refine' subset_span ⟨j, (Set.mem_diff _).mpr ⟨Set.mem_univ _, _⟩, rfl⟩\n  exact mt Set.mem_singleton_iff.mp j_eq\nrw [j_eq, SetLike.mem_coe, show b i = -((g i)⁻¹ • (s.erase i).sum fun j => g j • b j) from _]\n· refine' neg_mem (smul_mem _ _ (sum_mem fun k hk => _))\n  obtain ⟨k_ne_i, _⟩ := Finset.mem_erase.mp hk\n  refine' smul_mem _ _ (subset_span ⟨k, _, rfl⟩)\n  simp_all only [Set.mem_univ, Set.mem_diff, Set.mem_singleton_iff]\n    -- To show `b i` is a weighted sum of the other `b j`s, we'll rewrite this sum\n        -- to have the form of the assumption `dependent`.\napply eq_neg_of_add_eq_zero_left\ncalc\n  (b i + (g i)⁻¹ • (s.erase i).sum fun j => g j • b j) = (g i)⁻¹ • (g i • b i + (s.erase i).sum fun j => g j • b j) :=\n    by rw [smul_add, ← mul_smul, inv_mul_cancel gx_ne_zero, one_smul]\n  _ = (g i)⁻¹ • (0 : V) := (congr_arg _ ?_)\n  _ = 0 :=\n    smul_zero\n      _\n        -- And then it's just a bit of manipulation with finite sums.\nrwa [← Finset.insert_erase i_mem_s, Finset.sum_insert (Finset.not_mem_erase _ _)] at dependent \n[GOAL]\nK : Type u\nV : Type v\ninst✝³ : DivisionRing K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\nι : Type u_1\ninst✝ : Fintype ι\nb : ι → V\nspans : ⊤ ≤ span K (Set.range b)\ncard_eq : Fintype.card ι = finrank K V\ns : Finset ι\ng : ι → K\ndependent : (Finset.sum s fun i => g i • b i) = 0\ni : ι\ni_mem_s : i ∈ s\n⊢ g i = 0\n[PROOFSTEP]\nby_contra gx_ne_zero\n[GOAL]\nK : Type u\nV : Type v\ninst✝³ : DivisionRing K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\nι : Type u_1\ninst✝ : Fintype ι\nb : ι → V\nspans : ⊤ ≤ span K (Set.range b)\ncard_eq : Fintype.card ι = finrank K V\ns : Finset ι\ng : ι → K\ndependent : (Finset.sum s fun i => g i • b i) = 0\ni : ι\ni_mem_s : i ∈ s\ngx_ne_zero : ¬g i = 0\n⊢ False\n[PROOFSTEP]\nrefine'\n  not_le_of_gt (span_lt_top_of_card_lt_finrank (show (b '' (Set.univ \\ { i })).toFinset.card < finrank K V from _)) _\n[GOAL]\ncase refine'_1\nK : Type u\nV : Type v\ninst✝³ : DivisionRing K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\nι : Type u_1\ninst✝ : Fintype ι\nb : ι → V\nspans : ⊤ ≤ span K (Set.range b)\ncard_eq : Fintype.card ι = finrank K V\ns : Finset ι\ng : ι → K\ndependent : (Finset.sum s fun i => g i • b i) = 0\ni : ι\ni_mem_s : i ∈ s\ngx_ne_zero : ¬g i = 0\n⊢ Finset.card (Set.toFinset (b '' (Set.univ \\ {i}))) < finrank K V\n[PROOFSTEP]\ncalc\n  (b '' (Set.univ \\ { i })).toFinset.card = ((Set.univ \\ { i }).toFinset.image b).card := by\n    rw [Set.toFinset_card, Fintype.card_ofFinset]\n  _ ≤ (Set.univ \\ { i }).toFinset.card := Finset.card_image_le\n  _ = (Finset.univ.erase i).card := (congr_arg Finset.card (Finset.ext (by simp [and_comm])))\n  _ < Finset.univ.card := (Finset.card_erase_lt_of_mem (Finset.mem_univ i))\n  _ = finrank K V := card_eq\n[GOAL]\nK : Type u\nV : Type v\ninst✝³ : DivisionRing K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\nι : Type u_1\ninst✝ : Fintype ι\nb : ι → V\nspans : ⊤ ≤ span K (Set.range b)\ncard_eq : Fintype.card ι = finrank K V\ns : Finset ι\ng : ι → K\ndependent : (Finset.sum s fun i => g i • b i) = 0\ni : ι\ni_mem_s : i ∈ s\ngx_ne_zero : ¬g i = 0\n⊢ Finset.card (Set.toFinset (b '' (Set.univ \\ {i}))) = Finset.card (Finset.image b (Set.toFinset (Set.univ \\ {i})))\n[PROOFSTEP]\nrw [Set.toFinset_card, Fintype.card_ofFinset]\n[GOAL]\nK : Type u\nV : Type v\ninst✝³ : DivisionRing K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\nι : Type u_1\ninst✝ : Fintype ι\nb : ι → V\nspans : ⊤ ≤ span K (Set.range b)\ncard_eq : Fintype.card ι = finrank K V\ns : Finset ι\ng : ι → K\ndependent : (Finset.sum s fun i => g i • b i) = 0\ni : ι\ni_mem_s : i ∈ s\ngx_ne_zero : ¬g i = 0\n⊢ ∀ (a : ι), a ∈ Set.toFinset (Set.univ \\ {i}) ↔ a ∈ Finset.erase Finset.univ i\n[PROOFSTEP]\nsimp [and_comm]\n[GOAL]\ncase refine'_2\nK : Type u\nV : Type v\ninst✝³ : DivisionRing K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\nι : Type u_1\ninst✝ : Fintype ι\nb : ι → V\nspans : ⊤ ≤ span K (Set.range b)\ncard_eq : Fintype.card ι = finrank K V\ns : Finset ι\ng : ι → K\ndependent : (Finset.sum s fun i => g i • b i) = 0\ni : ι\ni_mem_s : i ∈ s\ngx_ne_zero : ¬g i = 0\n⊢ ⊤ ≤ span K (b '' (Set.univ \\ {i}))\n[PROOFSTEP]\nrefine' spans.trans (span_le.mpr _)\n[GOAL]\ncase refine'_2\nK : Type u\nV : Type v\ninst✝³ : DivisionRing K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\nι : Type u_1\ninst✝ : Fintype ι\nb : ι → V\nspans : ⊤ ≤ span K (Set.range b)\ncard_eq : Fintype.card ι = finrank K V\ns : Finset ι\ng : ι → K\ndependent : (Finset.sum s fun i => g i • b i) = 0\ni : ι\ni_mem_s : i ∈ s\ngx_ne_zero : ¬g i = 0\n⊢ Set.range b ⊆ ↑(span K (b '' (Set.univ \\ {i})))\n[PROOFSTEP]\nrintro _\n  ⟨j, rfl, rfl⟩\n      -- The case that `j ≠ i` is easy because `b j ∈ b '' (univ \\ {i})`.\n[GOAL]\ncase refine'_2.intro.refl\nK : Type u\nV : Type v\ninst✝³ : DivisionRing K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\nι : Type u_1\ninst✝ : Fintype ι\nb : ι → V\nspans : ⊤ ≤ span K (Set.range b)\ncard_eq : Fintype.card ι = finrank K V\ns : Finset ι\ng : ι → K\ndependent : (Finset.sum s fun i => g i • b i) = 0\ni : ι\ni_mem_s : i ∈ s\ngx_ne_zero : ¬g i = 0\nj : ι\n⊢ b j ∈ ↑(span K (b '' (Set.univ \\ {i})))\n[PROOFSTEP]\nby_cases j_eq : j = i\n[GOAL]\ncase pos\nK : Type u\nV : Type v\ninst✝³ : DivisionRing K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\nι : Type u_1\ninst✝ : Fintype ι\nb : ι → V\nspans : ⊤ ≤ span K (Set.range b)\ncard_eq : Fintype.card ι = finrank K V\ns : Finset ι\ng : ι → K\ndependent : (Finset.sum s fun i => g i • b i) = 0\ni : ι\ni_mem_s : i ∈ s\ngx_ne_zero : ¬g i = 0\nj : ι\nj_eq : j = i\n⊢ b j ∈ ↑(span K (b '' (Set.univ \\ {i})))\ncase neg\nK : Type u\nV : Type v\ninst✝³ : DivisionRing K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\nι : Type u_1\ninst✝ : Fintype ι\nb : ι → V\nspans : ⊤ ≤ span K (Set.range b)\ncard_eq : Fintype.card ι = finrank K V\ns : Finset ι\ng : ι → K\ndependent : (Finset.sum s fun i => g i • b i) = 0\ni : ι\ni_mem_s : i ∈ s\ngx_ne_zero : ¬g i = 0\nj : ι\nj_eq : ¬j = i\n⊢ b j ∈ ↑(span K (b '' (Set.univ \\ {i})))\n[PROOFSTEP]\nswap\n[GOAL]\ncase neg\nK : Type u\nV : Type v\ninst✝³ : DivisionRing K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\nι : Type u_1\ninst✝ : Fintype ι\nb : ι → V\nspans : ⊤ ≤ span K (Set.range b)\ncard_eq : Fintype.card ι = finrank K V\ns : Finset ι\ng : ι → K\ndependent : (Finset.sum s fun i => g i • b i) = 0\ni : ι\ni_mem_s : i ∈ s\ngx_ne_zero : ¬g i = 0\nj : ι\nj_eq : ¬j = i\n⊢ b j ∈ ↑(span K (b '' (Set.univ \\ {i})))\n[PROOFSTEP]\nrefine' subset_span ⟨j, (Set.mem_diff _).mpr ⟨Set.mem_univ _, _⟩, rfl⟩\n[GOAL]\ncase neg\nK : Type u\nV : Type v\ninst✝³ : DivisionRing K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\nι : Type u_1\ninst✝ : Fintype ι\nb : ι → V\nspans : ⊤ ≤ span K (Set.range b)\ncard_eq : Fintype.card ι = finrank K V\ns : Finset ι\ng : ι → K\ndependent : (Finset.sum s fun i => g i • b i) = 0\ni : ι\ni_mem_s : i ∈ s\ngx_ne_zero : ¬g i = 0\nj : ι\nj_eq : ¬j = i\n⊢ ¬j ∈ {i}\n[PROOFSTEP]\nexact mt Set.mem_singleton_iff.mp j_eq\n[GOAL]\ncase pos\nK : Type u\nV : Type v\ninst✝³ : DivisionRing K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\nι : Type u_1\ninst✝ : Fintype ι\nb : ι → V\nspans : ⊤ ≤ span K (Set.range b)\ncard_eq : Fintype.card ι = finrank K V\ns : Finset ι\ng : ι → K\ndependent : (Finset.sum s fun i => g i • b i) = 0\ni : ι\ni_mem_s : i ∈ s\ngx_ne_zero : ¬g i = 0\nj : ι\nj_eq : j = i\n⊢ b j ∈ ↑(span K (b '' (Set.univ \\ {i})))\n[PROOFSTEP]\nrw [j_eq, SetLike.mem_coe, show b i = -((g i)⁻¹ • (s.erase i).sum fun j => g j • b j) from _]\n[GOAL]\ncase pos\nK : Type u\nV : Type v\ninst✝³ : DivisionRing K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\nι : Type u_1\ninst✝ : Fintype ι\nb : ι → V\nspans : ⊤ ≤ span K (Set.range b)\ncard_eq : Fintype.card ι = finrank K V\ns : Finset ι\ng : ι → K\ndependent : (Finset.sum s fun i => g i • b i) = 0\ni : ι\ni_mem_s : i ∈ s\ngx_ne_zero : ¬g i = 0\nj : ι\nj_eq : j = i\n⊢ -((g i)⁻¹ • Finset.sum (Finset.erase s i) fun j => g j • b j) ∈ span K (b '' (Set.univ \\ {i}))\n[PROOFSTEP]\nrefine' neg_mem (smul_mem _ _ (sum_mem fun k hk => _))\n[GOAL]\ncase pos\nK : Type u\nV : Type v\ninst✝³ : DivisionRing K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\nι : Type u_1\ninst✝ : Fintype ι\nb : ι → V\nspans : ⊤ ≤ span K (Set.range b)\ncard_eq : Fintype.card ι = finrank K V\ns : Finset ι\ng : ι → K\ndependent : (Finset.sum s fun i => g i • b i) = 0\ni : ι\ni_mem_s : i ∈ s\ngx_ne_zero : ¬g i = 0\nj : ι\nj_eq : j = i\nk : ι\nhk : k ∈ Finset.erase s i\n⊢ g k • b k ∈ span K (b '' (Set.univ \\ {i}))\n[PROOFSTEP]\nobtain ⟨k_ne_i, _⟩ := Finset.mem_erase.mp hk\n[GOAL]\ncase pos.intro\nK : Type u\nV : Type v\ninst✝³ : DivisionRing K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\nι : Type u_1\ninst✝ : Fintype ι\nb : ι → V\nspans : ⊤ ≤ span K (Set.range b)\ncard_eq : Fintype.card ι = finrank K V\ns : Finset ι\ng : ι → K\ndependent : (Finset.sum s fun i => g i • b i) = 0\ni : ι\ni_mem_s : i ∈ s\ngx_ne_zero : ¬g i = 0\nj : ι\nj_eq : j = i\nk : ι\nhk : k ∈ Finset.erase s i\nk_ne_i : k ≠ i\nright✝ : k ∈ s\n⊢ g k • b k ∈ span K (b '' (Set.univ \\ {i}))\n[PROOFSTEP]\nrefine' smul_mem _ _ (subset_span ⟨k, _, rfl⟩)\n[GOAL]\ncase pos.intro\nK : Type u\nV : Type v\ninst✝³ : DivisionRing K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\nι : Type u_1\ninst✝ : Fintype ι\nb : ι → V\nspans : ⊤ ≤ span K (Set.range b)\ncard_eq : Fintype.card ι = finrank K V\ns : Finset ι\ng : ι → K\ndependent : (Finset.sum s fun i => g i • b i) = 0\ni : ι\ni_mem_s : i ∈ s\ngx_ne_zero : ¬g i = 0\nj : ι\nj_eq : j = i\nk : ι\nhk : k ∈ Finset.erase s i\nk_ne_i : k ≠ i\nright✝ : k ∈ s\n⊢ k ∈ Set.univ \\ {i}\n[PROOFSTEP]\nsimp_all only [Set.mem_univ, Set.mem_diff, Set.mem_singleton_iff]\n  -- To show `b i` is a weighted sum of the other `b j`s, we'll rewrite this sum\n      -- to have the form of the assumption `dependent`.\n[GOAL]\nK : Type u\nV : Type v\ninst✝³ : DivisionRing K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\nι : Type u_1\ninst✝ : Fintype ι\nb : ι → V\nspans : ⊤ ≤ span K (Set.range b)\ncard_eq : Fintype.card ι = finrank K V\ns : Finset ι\ng : ι → K\ndependent : (Finset.sum s fun i => g i • b i) = 0\ni : ι\ni_mem_s : i ∈ s\ngx_ne_zero : ¬g i = 0\nj : ι\nj_eq : j = i\n⊢ b i = -((g i)⁻¹ • Finset.sum (Finset.erase s i) fun j => g j • b j)\n[PROOFSTEP]\napply eq_neg_of_add_eq_zero_left\n[GOAL]\ncase h\nK : Type u\nV : Type v\ninst✝³ : DivisionRing K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\nι : Type u_1\ninst✝ : Fintype ι\nb : ι → V\nspans : ⊤ ≤ span K (Set.range b)\ncard_eq : Fintype.card ι = finrank K V\ns : Finset ι\ng : ι → K\ndependent : (Finset.sum s fun i => g i • b i) = 0\ni : ι\ni_mem_s : i ∈ s\ngx_ne_zero : ¬g i = 0\nj : ι\nj_eq : j = i\n⊢ (b i + (g i)⁻¹ • Finset.sum (Finset.erase s i) fun j => g j • b j) = 0\n[PROOFSTEP]\ncalc\n  (b i + (g i)⁻¹ • (s.erase i).sum fun j => g j • b j) = (g i)⁻¹ • (g i • b i + (s.erase i).sum fun j => g j • b j) :=\n    by rw [smul_add, ← mul_smul, inv_mul_cancel gx_ne_zero, one_smul]\n  _ = (g i)⁻¹ • (0 : V) := (congr_arg _ ?_)\n  _ = 0 :=\n    smul_zero\n      _\n        -- And then it's just a bit of manipulation with finite sums.\n[GOAL]\nK : Type u\nV : Type v\ninst✝³ : DivisionRing K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\nι : Type u_1\ninst✝ : Fintype ι\nb : ι → V\nspans : ⊤ ≤ span K (Set.range b)\ncard_eq : Fintype.card ι = finrank K V\ns : Finset ι\ng : ι → K\ndependent : (Finset.sum s fun i => g i • b i) = 0\ni : ι\ni_mem_s : i ∈ s\ngx_ne_zero : ¬g i = 0\nj : ι\nj_eq : j = i\n⊢ (b i + (g i)⁻¹ • Finset.sum (Finset.erase s i) fun j => g j • b j) =\n    (g i)⁻¹ • (g i • b i + Finset.sum (Finset.erase s i) fun j => g j • b j)\n[PROOFSTEP]\nrw [smul_add, ← mul_smul, inv_mul_cancel gx_ne_zero, one_smul]\n[GOAL]\ncase h\nK : Type u\nV : Type v\ninst✝³ : DivisionRing K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\nι : Type u_1\ninst✝ : Fintype ι\nb : ι → V\nspans : ⊤ ≤ span K (Set.range b)\ncard_eq : Fintype.card ι = finrank K V\ns : Finset ι\ng : ι → K\ndependent : (Finset.sum s fun i => g i • b i) = 0\ni : ι\ni_mem_s : i ∈ s\ngx_ne_zero : ¬g i = 0\nj : ι\nj_eq : j = i\n⊢ (g i • b i + Finset.sum (Finset.erase s i) fun j => g j • b j) = 0\n[PROOFSTEP]\nrwa [← Finset.insert_erase i_mem_s, Finset.sum_insert (Finset.not_mem_erase _ _)] at dependent \n[GOAL]\nK : Type u\nV : Type v\ninst✝³ : DivisionRing K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\nι : Type u_1\ninst✝ : Fintype ι\nb : ι → V\n⊢ LinearIndependent K b ↔ Fintype.card ι = Set.finrank K (Set.range b)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nK : Type u\nV : Type v\ninst✝³ : DivisionRing K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\nι : Type u_1\ninst✝ : Fintype ι\nb : ι → V\n⊢ LinearIndependent K b → Fintype.card ι = Set.finrank K (Set.range b)\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nK : Type u\nV : Type v\ninst✝³ : DivisionRing K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\nι : Type u_1\ninst✝ : Fintype ι\nb : ι → V\nh : LinearIndependent K b\n⊢ Fintype.card ι = Set.finrank K (Set.range b)\n[PROOFSTEP]\nexact (finrank_span_eq_card h).symm\n[GOAL]\ncase mpr\nK : Type u\nV : Type v\ninst✝³ : DivisionRing K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\nι : Type u_1\ninst✝ : Fintype ι\nb : ι → V\n⊢ Fintype.card ι = Set.finrank K (Set.range b) → LinearIndependent K b\n[PROOFSTEP]\nintro hc\n[GOAL]\ncase mpr\nK : Type u\nV : Type v\ninst✝³ : DivisionRing K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\nι : Type u_1\ninst✝ : Fintype ι\nb : ι → V\nhc : Fintype.card ι = Set.finrank K (Set.range b)\n⊢ LinearIndependent K b\n[PROOFSTEP]\nlet f := Submodule.subtype (span K (Set.range b))\n[GOAL]\ncase mpr\nK : Type u\nV : Type v\ninst✝³ : DivisionRing K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\nι : Type u_1\ninst✝ : Fintype ι\nb : ι → V\nhc : Fintype.card ι = Set.finrank K (Set.range b)\nf : { x // x ∈ span K (Set.range b) } →ₗ[K] V := Submodule.subtype (span K (Set.range b))\n⊢ LinearIndependent K b\n[PROOFSTEP]\nlet b' : ι → span K (Set.range b) := fun i => ⟨b i, mem_span.2 fun p hp => hp (Set.mem_range_self _)⟩\n[GOAL]\ncase mpr\nK : Type u\nV : Type v\ninst✝³ : DivisionRing K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\nι : Type u_1\ninst✝ : Fintype ι\nb : ι → V\nhc : Fintype.card ι = Set.finrank K (Set.range b)\nf : { x // x ∈ span K (Set.range b) } →ₗ[K] V := Submodule.subtype (span K (Set.range b))\nb' : ι → { x // x ∈ span K (Set.range b) } := fun i => { val := b i, property := (_ : b i ∈ span K (Set.range b)) }\n⊢ LinearIndependent K b\n[PROOFSTEP]\nhave hs : ⊤ ≤ span K (Set.range b') := by\n  intro x\n  have h : span K (f '' Set.range b') = map f (span K (Set.range b')) := span_image f\n  have hf : f '' Set.range b' = Set.range b := by\n    ext x\n    simp [Set.mem_image, Set.mem_range]\n  rw [hf] at h \n  have hx : (x : V) ∈ span K (Set.range b) := x.property\n  conv at hx =>\n    arg 2\n    rw [h]\n  simpa [mem_map] using hx\n[GOAL]\nK : Type u\nV : Type v\ninst✝³ : DivisionRing K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\nι : Type u_1\ninst✝ : Fintype ι\nb : ι → V\nhc : Fintype.card ι = Set.finrank K (Set.range b)\nf : { x // x ∈ span K (Set.range b) } →ₗ[K] V := Submodule.subtype (span K (Set.range b))\nb' : ι → { x // x ∈ span K (Set.range b) } := fun i => { val := b i, property := (_ : b i ∈ span K (Set.range b)) }\n⊢ ⊤ ≤ span K (Set.range b')\n[PROOFSTEP]\nintro x\n[GOAL]\nK : Type u\nV : Type v\ninst✝³ : DivisionRing K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\nι : Type u_1\ninst✝ : Fintype ι\nb : ι → V\nhc : Fintype.card ι = Set.finrank K (Set.range b)\nf : { x // x ∈ span K (Set.range b) } →ₗ[K] V := Submodule.subtype (span K (Set.range b))\nb' : ι → { x // x ∈ span K (Set.range b) } := fun i => { val := b i, property := (_ : b i ∈ span K (Set.range b)) }\nx : { x // x ∈ span K (Set.range b) }\n⊢ x ∈ ⊤ → x ∈ span K (Set.range b')\n[PROOFSTEP]\nhave h : span K (f '' Set.range b') = map f (span K (Set.range b')) := span_image f\n[GOAL]\nK : Type u\nV : Type v\ninst✝³ : DivisionRing K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\nι : Type u_1\ninst✝ : Fintype ι\nb : ι → V\nhc : Fintype.card ι = Set.finrank K (Set.range b)\nf : { x // x ∈ span K (Set.range b) } →ₗ[K] V := Submodule.subtype (span K (Set.range b))\nb' : ι → { x // x ∈ span K (Set.range b) } := fun i => { val := b i, property := (_ : b i ∈ span K (Set.range b)) }\nx : { x // x ∈ span K (Set.range b) }\nh : span K (↑f '' Set.range b') = Submodule.map f (span K (Set.range b'))\n⊢ x ∈ ⊤ → x ∈ span K (Set.range b')\n[PROOFSTEP]\nhave hf : f '' Set.range b' = Set.range b := by\n  ext x\n  simp [Set.mem_image, Set.mem_range]\n[GOAL]\nK : Type u\nV : Type v\ninst✝³ : DivisionRing K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\nι : Type u_1\ninst✝ : Fintype ι\nb : ι → V\nhc : Fintype.card ι = Set.finrank K (Set.range b)\nf : { x // x ∈ span K (Set.range b) } →ₗ[K] V := Submodule.subtype (span K (Set.range b))\nb' : ι → { x // x ∈ span K (Set.range b) } := fun i => { val := b i, property := (_ : b i ∈ span K (Set.range b)) }\nx : { x // x ∈ span K (Set.range b) }\nh : span K (↑f '' Set.range b') = Submodule.map f (span K (Set.range b'))\n⊢ ↑f '' Set.range b' = Set.range b\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nK : Type u\nV : Type v\ninst✝³ : DivisionRing K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\nι : Type u_1\ninst✝ : Fintype ι\nb : ι → V\nhc : Fintype.card ι = Set.finrank K (Set.range b)\nf : { x // x ∈ span K (Set.range b) } →ₗ[K] V := Submodule.subtype (span K (Set.range b))\nb' : ι → { x // x ∈ span K (Set.range b) } := fun i => { val := b i, property := (_ : b i ∈ span K (Set.range b)) }\nx✝ : { x // x ∈ span K (Set.range b) }\nh : span K (↑f '' Set.range b') = Submodule.map f (span K (Set.range b'))\nx : V\n⊢ x ∈ ↑f '' Set.range b' ↔ x ∈ Set.range b\n[PROOFSTEP]\nsimp [Set.mem_image, Set.mem_range]\n[GOAL]\nK : Type u\nV : Type v\ninst✝³ : DivisionRing K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\nι : Type u_1\ninst✝ : Fintype ι\nb : ι → V\nhc : Fintype.card ι = Set.finrank K (Set.range b)\nf : { x // x ∈ span K (Set.range b) } →ₗ[K] V := Submodule.subtype (span K (Set.range b))\nb' : ι → { x // x ∈ span K (Set.range b) } := fun i => { val := b i, property := (_ : b i ∈ span K (Set.range b)) }\nx : { x // x ∈ span K (Set.range b) }\nh : span K (↑f '' Set.range b') = Submodule.map f (span K (Set.range b'))\nhf : ↑f '' Set.range b' = Set.range b\n⊢ x ∈ ⊤ → x ∈ span K (Set.range b')\n[PROOFSTEP]\nrw [hf] at h \n[GOAL]\nK : Type u\nV : Type v\ninst✝³ : DivisionRing K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\nι : Type u_1\ninst✝ : Fintype ι\nb : ι → V\nhc : Fintype.card ι = Set.finrank K (Set.range b)\nf : { x // x ∈ span K (Set.range b) } →ₗ[K] V := Submodule.subtype (span K (Set.range b))\nb' : ι → { x // x ∈ span K (Set.range b) } := fun i => { val := b i, property := (_ : b i ∈ span K (Set.range b)) }\nx : { x // x ∈ span K (Set.range b) }\nh : span K (Set.range b) = Submodule.map f (span K (Set.range b'))\nhf : ↑f '' Set.range b' = Set.range b\n⊢ x ∈ ⊤ → x ∈ span K (Set.range b')\n[PROOFSTEP]\nhave hx : (x : V) ∈ span K (Set.range b) := x.property\n[GOAL]\nK : Type u\nV : Type v\ninst✝³ : DivisionRing K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\nι : Type u_1\ninst✝ : Fintype ι\nb : ι → V\nhc : Fintype.card ι = Set.finrank K (Set.range b)\nf : { x // x ∈ span K (Set.range b) } →ₗ[K] V := Submodule.subtype (span K (Set.range b))\nb' : ι → { x // x ∈ span K (Set.range b) } := fun i => { val := b i, property := (_ : b i ∈ span K (Set.range b)) }\nx : { x // x ∈ span K (Set.range b) }\nh : span K (Set.range b) = Submodule.map f (span K (Set.range b'))\nhf : ↑f '' Set.range b' = Set.range b\nhx : ↑x ∈ span K (Set.range b)\n⊢ x ∈ ⊤ → x ∈ span K (Set.range b')\n[PROOFSTEP]\nconv at hx =>\n  arg 2\n  rw [h]\n[GOAL]\nK : Type u\nV : Type v\ninst✝³ : DivisionRing K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\nι : Type u_1\ninst✝ : Fintype ι\nb : ι → V\nhc : Fintype.card ι = Set.finrank K (Set.range b)\nf : { x // x ∈ span K (Set.range b) } →ₗ[K] V := Submodule.subtype (span K (Set.range b))\nb' : ι → { x // x ∈ span K (Set.range b) } := fun i => { val := b i, property := (_ : b i ∈ span K (Set.range b)) }\nx : { x // x ∈ span K (Set.range b) }\nh : span K (Set.range b) = Submodule.map f (span K (Set.range b'))\nhf : ↑f '' Set.range b' = Set.range b\nhx : ↑x ∈ span K (Set.range b)\n| ↑x ∈ span K (Set.range b)\n[PROOFSTEP]\n  arg 2\n  rw [h]\n[GOAL]\nK : Type u\nV : Type v\ninst✝³ : DivisionRing K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\nι : Type u_1\ninst✝ : Fintype ι\nb : ι → V\nhc : Fintype.card ι = Set.finrank K (Set.range b)\nf : { x // x ∈ span K (Set.range b) } →ₗ[K] V := Submodule.subtype (span K (Set.range b))\nb' : ι → { x // x ∈ span K (Set.range b) } := fun i => { val := b i, property := (_ : b i ∈ span K (Set.range b)) }\nx : { x // x ∈ span K (Set.range b) }\nh : span K (Set.range b) = Submodule.map f (span K (Set.range b'))\nhf : ↑f '' Set.range b' = Set.range b\nhx : ↑x ∈ span K (Set.range b)\n| ↑x ∈ span K (Set.range b)\n[PROOFSTEP]\n  arg 2\n  rw [h]\n[GOAL]\nK : Type u\nV : Type v\ninst✝³ : DivisionRing K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\nι : Type u_1\ninst✝ : Fintype ι\nb : ι → V\nhc : Fintype.card ι = Set.finrank K (Set.range b)\nf : { x // x ∈ span K (Set.range b) } →ₗ[K] V := Submodule.subtype (span K (Set.range b))\nb' : ι → { x // x ∈ span K (Set.range b) } := fun i => { val := b i, property := (_ : b i ∈ span K (Set.range b)) }\nx : { x // x ∈ span K (Set.range b) }\nh : span K (Set.range b) = Submodule.map f (span K (Set.range b'))\nhf : ↑f '' Set.range b' = Set.range b\nhx : ↑x ∈ span K (Set.range b)\n| ↑x ∈ span K (Set.range b)\n[PROOFSTEP]\narg 2\n[GOAL]\nK : Type u\nV : Type v\ninst✝³ : DivisionRing K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\nι : Type u_1\ninst✝ : Fintype ι\nb : ι → V\nhc : Fintype.card ι = Set.finrank K (Set.range b)\nf : { x // x ∈ span K (Set.range b) } →ₗ[K] V := Submodule.subtype (span K (Set.range b))\nb' : ι → { x // x ∈ span K (Set.range b) } := fun i => { val := b i, property := (_ : b i ∈ span K (Set.range b)) }\nx : { x // x ∈ span K (Set.range b) }\nh : span K (Set.range b) = Submodule.map f (span K (Set.range b'))\nhf : ↑f '' Set.range b' = Set.range b\nhx : ↑x ∈ span K (Set.range b)\n| span K (Set.range b)\n[PROOFSTEP]\nrw [h]\n[GOAL]\nK : Type u\nV : Type v\ninst✝³ : DivisionRing K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\nι : Type u_1\ninst✝ : Fintype ι\nb : ι → V\nhc : Fintype.card ι = Set.finrank K (Set.range b)\nf : { x // x ∈ span K (Set.range b) } →ₗ[K] V := Submodule.subtype (span K (Set.range b))\nb' : ι → { x // x ∈ span K (Set.range b) } := fun i => { val := b i, property := (_ : b i ∈ span K (Set.range b)) }\nx : { x // x ∈ span K (Set.range b) }\nh : span K (Set.range b) = Submodule.map f (span K (Set.range b'))\nhf : ↑f '' Set.range b' = Set.range b\nhx : ↑x ∈ Submodule.map f (span K (Set.range b'))\n⊢ x ∈ ⊤ → x ∈ span K (Set.range b')\n[PROOFSTEP]\nsimpa [mem_map] using hx\n[GOAL]\ncase mpr\nK : Type u\nV : Type v\ninst✝³ : DivisionRing K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\nι : Type u_1\ninst✝ : Fintype ι\nb : ι → V\nhc : Fintype.card ι = Set.finrank K (Set.range b)\nf : { x // x ∈ span K (Set.range b) } →ₗ[K] V := Submodule.subtype (span K (Set.range b))\nb' : ι → { x // x ∈ span K (Set.range b) } := fun i => { val := b i, property := (_ : b i ∈ span K (Set.range b)) }\nhs : ⊤ ≤ span K (Set.range b')\n⊢ LinearIndependent K b\n[PROOFSTEP]\nhave hi : LinearMap.ker f = ⊥ := ker_subtype _\n[GOAL]\ncase mpr\nK : Type u\nV : Type v\ninst✝³ : DivisionRing K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\nι : Type u_1\ninst✝ : Fintype ι\nb : ι → V\nhc : Fintype.card ι = Set.finrank K (Set.range b)\nf : { x // x ∈ span K (Set.range b) } →ₗ[K] V := Submodule.subtype (span K (Set.range b))\nb' : ι → { x // x ∈ span K (Set.range b) } := fun i => { val := b i, property := (_ : b i ∈ span K (Set.range b)) }\nhs : ⊤ ≤ span K (Set.range b')\nhi : LinearMap.ker f = ⊥\n⊢ LinearIndependent K b\n[PROOFSTEP]\nconvert (linearIndependent_of_top_le_span_of_card_eq_finrank hs hc).map' _ hi\n[GOAL]\nK : Type u\nV : Type v\ninst✝³ : DivisionRing K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\nι : Type u_1\ninst✝ : Fintype ι\nb : ι → V\n⊢ LinearIndependent K b ↔ Fintype.card ι ≤ Set.finrank K (Set.range b)\n[PROOFSTEP]\nrw [linearIndependent_iff_card_eq_finrank_span, finrank_range_le_card.le_iff_eq]\n[GOAL]\nK : Type u\nV : Type v\ninst✝⁴ : Ring K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\ninst✝¹ : NoZeroSMulDivisors K V\ninst✝ : StrongRankCondition K\nv : V\nn : v ≠ 0\nh : ∀ (w : V), ∃ c, c • v = w\n⊢ finrank K V = 1\n[PROOFSTEP]\nhaveI := nontrivial_of_invariantBasisNumber K\n[GOAL]\nK : Type u\nV : Type v\ninst✝⁴ : Ring K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\ninst✝¹ : NoZeroSMulDivisors K V\ninst✝ : StrongRankCondition K\nv : V\nn : v ≠ 0\nh : ∀ (w : V), ∃ c, c • v = w\nthis : Nontrivial K\n⊢ finrank K V = 1\n[PROOFSTEP]\nobtain ⟨b⟩ := (Basis.basis_singleton_iff.{u} PUnit).mpr ⟨v, n, h⟩\n[GOAL]\ncase intro\nK : Type u\nV : Type v\ninst✝⁴ : Ring K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\ninst✝¹ : NoZeroSMulDivisors K V\ninst✝ : StrongRankCondition K\nv : V\nn : v ≠ 0\nh : ∀ (w : V), ∃ c, c • v = w\nthis : Nontrivial K\nb : Basis PUnit K V\n⊢ finrank K V = 1\n[PROOFSTEP]\nrw [finrank_eq_card_basis b, Fintype.card_punit]\n[GOAL]\nK : Type u\nV : Type v\ninst✝⁴ : Ring K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\ninst✝¹ : NoZeroSMulDivisors K V\ninst✝ : StrongRankCondition K\nv : V\nh : ∀ (w : V), ∃ c, c • v = w\n⊢ finrank K V ≤ 1\n[PROOFSTEP]\nhaveI := nontrivial_of_invariantBasisNumber K\n[GOAL]\nK : Type u\nV : Type v\ninst✝⁴ : Ring K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\ninst✝¹ : NoZeroSMulDivisors K V\ninst✝ : StrongRankCondition K\nv : V\nh : ∀ (w : V), ∃ c, c • v = w\nthis : Nontrivial K\n⊢ finrank K V ≤ 1\n[PROOFSTEP]\nrcases eq_or_ne v 0 with (rfl | hn)\n[GOAL]\ncase inl\nK : Type u\nV : Type v\ninst✝⁴ : Ring K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\ninst✝¹ : NoZeroSMulDivisors K V\ninst✝ : StrongRankCondition K\nthis : Nontrivial K\nh : ∀ (w : V), ∃ c, c • 0 = w\n⊢ finrank K V ≤ 1\n[PROOFSTEP]\nhaveI :=\n  subsingleton_of_forall_eq (0 : V) fun w => by\n    obtain ⟨c, rfl⟩ := h w\n    simp\n[GOAL]\nK : Type u\nV : Type v\ninst✝⁴ : Ring K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\ninst✝¹ : NoZeroSMulDivisors K V\ninst✝ : StrongRankCondition K\nthis : Nontrivial K\nh : ∀ (w : V), ∃ c, c • 0 = w\nw : V\n⊢ w = 0\n[PROOFSTEP]\nobtain ⟨c, rfl⟩ := h w\n[GOAL]\ncase intro\nK : Type u\nV : Type v\ninst✝⁴ : Ring K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\ninst✝¹ : NoZeroSMulDivisors K V\ninst✝ : StrongRankCondition K\nthis : Nontrivial K\nh : ∀ (w : V), ∃ c, c • 0 = w\nc : K\n⊢ c • 0 = 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inl\nK : Type u\nV : Type v\ninst✝⁴ : Ring K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\ninst✝¹ : NoZeroSMulDivisors K V\ninst✝ : StrongRankCondition K\nthis✝ : Nontrivial K\nh : ∀ (w : V), ∃ c, c • 0 = w\nthis : Subsingleton V\n⊢ finrank K V ≤ 1\n[PROOFSTEP]\nrw [finrank_zero_of_subsingleton]\n[GOAL]\ncase inl\nK : Type u\nV : Type v\ninst✝⁴ : Ring K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\ninst✝¹ : NoZeroSMulDivisors K V\ninst✝ : StrongRankCondition K\nthis✝ : Nontrivial K\nh : ∀ (w : V), ∃ c, c • 0 = w\nthis : Subsingleton V\n⊢ 0 ≤ 1\n[PROOFSTEP]\nexact zero_le_one\n[GOAL]\ncase inr\nK : Type u\nV : Type v\ninst✝⁴ : Ring K\ninst✝³ : AddCommGroup V\ninst✝² : Module K V\ninst✝¹ : NoZeroSMulDivisors K V\ninst✝ : StrongRankCondition K\nv : V\nh : ∀ (w : V), ∃ c, c • v = w\nthis : Nontrivial K\nhn : v ≠ 0\n⊢ finrank K V ≤ 1\n[PROOFSTEP]\nexact (finrank_eq_one v hn h).le\n[GOAL]\nK : Type u\nV : Type v\nF : Type u_1\nE : Type u_2\ninst✝² : CommRing F\ninst✝¹ : Ring E\ninst✝ : Algebra F E\n⊢ Module.rank F { x // x ∈ ⊤ } = Module.rank F { x // x ∈ ⊤ }\n[PROOFSTEP]\nrw [← Algebra.top_toSubmodule]\n[GOAL]\nK : Type u\nV : Type v\nF : Type u_1\nE : Type u_2\ninst✝² : CommRing F\ninst✝¹ : Ring E\ninst✝ : Algebra F E\n⊢ Module.rank F { x // x ∈ ⊤ } = Module.rank F { x // x ∈ ↑Subalgebra.toSubmodule ⊤ }\n[PROOFSTEP]\nrfl\n[GOAL]\nK : Type u\nV : Type v\nF : Type u_1\nE : Type u_2\ninst✝² : CommRing F\ninst✝¹ : Ring E\ninst✝ : Algebra F E\n⊢ finrank F { x // x ∈ ⊤ } = finrank F { x // x ∈ ⊤ }\n[PROOFSTEP]\nrw [← Algebra.top_toSubmodule]\n[GOAL]\nK : Type u\nV : Type v\nF : Type u_1\nE : Type u_2\ninst✝² : CommRing F\ninst✝¹ : Ring E\ninst✝ : Algebra F E\n⊢ finrank F { x // x ∈ ⊤ } = finrank F { x // x ∈ ↑Subalgebra.toSubmodule ⊤ }\n[PROOFSTEP]\nrfl\n[GOAL]\nK : Type u\nV : Type v\nF : Type u_1\nE : Type u_2\ninst✝² : CommRing F\ninst✝¹ : Ring E\ninst✝ : Algebra F E\n⊢ Module.rank F { x // x ∈ ⊤ } = Module.rank F E\n[PROOFSTEP]\nrw [subalgebra_top_rank_eq_submodule_top_rank]\n[GOAL]\nK : Type u\nV : Type v\nF : Type u_1\nE : Type u_2\ninst✝² : CommRing F\ninst✝¹ : Ring E\ninst✝ : Algebra F E\n⊢ Module.rank F { x // x ∈ ⊤ } = Module.rank F E\n[PROOFSTEP]\nexact _root_.rank_top F E\n[GOAL]\nK : Type u\nV : Type v\nF : Type u_1\nE : Type u_2\ninst✝⁵ : CommRing F\ninst✝⁴ : Ring E\ninst✝³ : Algebra F E\ninst✝² : StrongRankCondition F\ninst✝¹ : NoZeroSMulDivisors F E\ninst✝ : Nontrivial E\n⊢ Module.rank F { x // x ∈ span F {1} } = 1\n[PROOFSTEP]\nletI := Module.nontrivial F E\n[GOAL]\nK : Type u\nV : Type v\nF : Type u_1\nE : Type u_2\ninst✝⁵ : CommRing F\ninst✝⁴ : Ring E\ninst✝³ : Algebra F E\ninst✝² : StrongRankCondition F\ninst✝¹ : NoZeroSMulDivisors F E\ninst✝ : Nontrivial E\nthis : Nontrivial F := Module.nontrivial F E\n⊢ Module.rank F { x // x ∈ span F {1} } = 1\n[PROOFSTEP]\nrw [rank_span_set]\n[GOAL]\nK : Type u\nV : Type v\nF : Type u_1\nE : Type u_2\ninst✝⁵ : CommRing F\ninst✝⁴ : Ring E\ninst✝³ : Algebra F E\ninst✝² : StrongRankCondition F\ninst✝¹ : NoZeroSMulDivisors F E\ninst✝ : Nontrivial E\nthis : Nontrivial F := Module.nontrivial F E\n⊢ #↑{1} = 1\nK : Type u\nV : Type v\nF : Type u_1\nE : Type u_2\ninst✝⁵ : CommRing F\ninst✝⁴ : Ring E\ninst✝³ : Algebra F E\ninst✝² : StrongRankCondition F\ninst✝¹ : NoZeroSMulDivisors F E\ninst✝ : Nontrivial E\nthis : Nontrivial F := Module.nontrivial F E\n⊢ LinearIndependent F fun x => ↑x\n[PROOFSTEP]\nexacts [mk_singleton _, linearIndependent_singleton one_ne_zero]\n[GOAL]\nK : Type u\nV : Type v\nF : Type u_1\nE : Type u_2\ninst✝⁵ : CommRing F\ninst✝⁴ : Ring E\ninst✝³ : Algebra F E\ninst✝² : StrongRankCondition F\ninst✝¹ : NoZeroSMulDivisors F E\ninst✝ : Nontrivial E\n⊢ Module.rank F { x // x ∈ ⊥ } = ↑1\n[PROOFSTEP]\nsimp\n", "meta": {"mathlib_filename": "Mathlib.LinearAlgebra.Finrank", "llama_tokens": 21476, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7520125737597972, "lm_q2_score": 0.6992544273261175, "lm_q1q2_score": 0.5258481216064468}}
{"text": "[GOAL]\n⊢ StrictConvexOn ℝ univ exp\n[PROOFSTEP]\napply strictConvexOn_of_slope_strict_mono_adjacent convex_univ\n[GOAL]\n⊢ ∀ {x y z : ℝ}, x ∈ univ → z ∈ univ → x < y → y < z → (exp y - exp x) / (y - x) < (exp z - exp y) / (z - y)\n[PROOFSTEP]\nrintro x y z - - hxy hyz\n[GOAL]\nx y z : ℝ\nhxy : x < y\nhyz : y < z\n⊢ (exp y - exp x) / (y - x) < (exp z - exp y) / (z - y)\n[PROOFSTEP]\ntrans exp y\n[GOAL]\nx y z : ℝ\nhxy : x < y\nhyz : y < z\n⊢ (exp y - exp x) / (y - x) < exp y\n[PROOFSTEP]\nhave h1 : 0 < y - x := by linarith\n[GOAL]\nx y z : ℝ\nhxy : x < y\nhyz : y < z\n⊢ 0 < y - x\n[PROOFSTEP]\nlinarith\n[GOAL]\nx y z : ℝ\nhxy : x < y\nhyz : y < z\nh1 : 0 < y - x\n⊢ (exp y - exp x) / (y - x) < exp y\n[PROOFSTEP]\nhave h2 : x - y < 0 := by linarith\n[GOAL]\nx y z : ℝ\nhxy : x < y\nhyz : y < z\nh1 : 0 < y - x\n⊢ x - y < 0\n[PROOFSTEP]\nlinarith\n[GOAL]\nx y z : ℝ\nhxy : x < y\nhyz : y < z\nh1 : 0 < y - x\nh2 : x - y < 0\n⊢ (exp y - exp x) / (y - x) < exp y\n[PROOFSTEP]\nrw [div_lt_iff h1]\n[GOAL]\nx y z : ℝ\nhxy : x < y\nhyz : y < z\nh1 : 0 < y - x\nh2 : x - y < 0\n⊢ exp y - exp x < exp y * (y - x)\n[PROOFSTEP]\ncalc\n  exp y - exp x = exp y - exp y * exp (x - y) := by rw [← exp_add]; ring_nf\n  _ = exp y * (1 - exp (x - y)) := by ring\n  _ < exp y * -(x - y) := by gcongr; linarith [add_one_lt_exp_of_nonzero h2.ne]\n  _ = exp y * (y - x) := by ring\n[GOAL]\nx y z : ℝ\nhxy : x < y\nhyz : y < z\nh1 : 0 < y - x\nh2 : x - y < 0\n⊢ exp y - exp x = exp y - exp y * exp (x - y)\n[PROOFSTEP]\nrw [← exp_add]\n[GOAL]\nx y z : ℝ\nhxy : x < y\nhyz : y < z\nh1 : 0 < y - x\nh2 : x - y < 0\n⊢ exp y - exp x = exp y - exp (y + (x - y))\n[PROOFSTEP]\nring_nf\n[GOAL]\nx y z : ℝ\nhxy : x < y\nhyz : y < z\nh1 : 0 < y - x\nh2 : x - y < 0\n⊢ exp y - exp y * exp (x - y) = exp y * (1 - exp (x - y))\n[PROOFSTEP]\nring\n[GOAL]\nx y z : ℝ\nhxy : x < y\nhyz : y < z\nh1 : 0 < y - x\nh2 : x - y < 0\n⊢ exp y * (1 - exp (x - y)) < exp y * -(x - y)\n[PROOFSTEP]\ngcongr\n[GOAL]\ncase bc\nx y z : ℝ\nhxy : x < y\nhyz : y < z\nh1 : 0 < y - x\nh2 : x - y < 0\n⊢ 1 - exp (x - y) < -(x - y)\n[PROOFSTEP]\nlinarith [add_one_lt_exp_of_nonzero h2.ne]\n[GOAL]\nx y z : ℝ\nhxy : x < y\nhyz : y < z\nh1 : 0 < y - x\nh2 : x - y < 0\n⊢ exp y * -(x - y) = exp y * (y - x)\n[PROOFSTEP]\nring\n[GOAL]\nx y z : ℝ\nhxy : x < y\nhyz : y < z\n⊢ exp y < (exp z - exp y) / (z - y)\n[PROOFSTEP]\nhave h1 : 0 < z - y := by linarith\n[GOAL]\nx y z : ℝ\nhxy : x < y\nhyz : y < z\n⊢ 0 < z - y\n[PROOFSTEP]\nlinarith\n[GOAL]\nx y z : ℝ\nhxy : x < y\nhyz : y < z\nh1 : 0 < z - y\n⊢ exp y < (exp z - exp y) / (z - y)\n[PROOFSTEP]\nrw [lt_div_iff h1]\n[GOAL]\nx y z : ℝ\nhxy : x < y\nhyz : y < z\nh1 : 0 < z - y\n⊢ exp y * (z - y) < exp z - exp y\n[PROOFSTEP]\ncalc\n  exp y * (z - y) < exp y * (exp (z - y) - 1) := by\n    gcongr _ * ?_\n    linarith [add_one_lt_exp_of_nonzero h1.ne']\n  _ = exp (z - y) * exp y - exp y := by ring\n  _ ≤ exp z - exp y := by rw [← exp_add]; ring_nf; rfl\n[GOAL]\nx y z : ℝ\nhxy : x < y\nhyz : y < z\nh1 : 0 < z - y\n⊢ exp y * (z - y) < exp y * (exp (z - y) - 1)\n[PROOFSTEP]\ngcongr _ * ?_\n[GOAL]\ncase bc\nx y z : ℝ\nhxy : x < y\nhyz : y < z\nh1 : 0 < z - y\n⊢ z - y < exp (z - y) - 1\n[PROOFSTEP]\nlinarith [add_one_lt_exp_of_nonzero h1.ne']\n[GOAL]\nx y z : ℝ\nhxy : x < y\nhyz : y < z\nh1 : 0 < z - y\n⊢ exp y * (exp (z - y) - 1) = exp (z - y) * exp y - exp y\n[PROOFSTEP]\nring\n[GOAL]\nx y z : ℝ\nhxy : x < y\nhyz : y < z\nh1 : 0 < z - y\n⊢ exp (z - y) * exp y - exp y ≤ exp z - exp y\n[PROOFSTEP]\nrw [← exp_add]\n[GOAL]\nx y z : ℝ\nhxy : x < y\nhyz : y < z\nh1 : 0 < z - y\n⊢ exp (z - y + y) - exp y ≤ exp z - exp y\n[PROOFSTEP]\nring_nf\n[GOAL]\nx y z : ℝ\nhxy : x < y\nhyz : y < z\nh1 : 0 < z - y\n⊢ exp z - exp y ≤ exp z - exp y\n[PROOFSTEP]\nrfl\n[GOAL]\nn : ℕ\n⊢ ConvexOn ℝ (Ici 0) fun x => x ^ n\n[PROOFSTEP]\ninduction' n with k IH\n[GOAL]\ncase zero\n⊢ ConvexOn ℝ (Ici 0) fun x => x ^ Nat.zero\n[PROOFSTEP]\nexact convexOn_const (1 : ℝ) (convex_Ici _)\n[GOAL]\ncase succ\nk : ℕ\nIH : ConvexOn ℝ (Ici 0) fun x => x ^ k\n⊢ ConvexOn ℝ (Ici 0) fun x => x ^ Nat.succ k\n[PROOFSTEP]\nrefine' ⟨convex_Ici _, _⟩\n[GOAL]\ncase succ\nk : ℕ\nIH : ConvexOn ℝ (Ici 0) fun x => x ^ k\n⊢ ∀ ⦃x : ℝ⦄,\n    x ∈ Ici 0 →\n      ∀ ⦃y : ℝ⦄,\n        y ∈ Ici 0 →\n          ∀ ⦃a b : ℝ⦄,\n            0 ≤ a →\n              0 ≤ b →\n                a + b = 1 →\n                  (fun x => x ^ Nat.succ k) (a • x + b • y) ≤\n                    a • (fun x => x ^ Nat.succ k) x + b • (fun x => x ^ Nat.succ k) y\n[PROOFSTEP]\nrintro a (ha : 0 ≤ a) b (hb : 0 ≤ b) μ ν hμ hν h\n[GOAL]\ncase succ\nk : ℕ\nIH : ConvexOn ℝ (Ici 0) fun x => x ^ k\na : ℝ\nha : 0 ≤ a\nb : ℝ\nhb : 0 ≤ b\nμ ν : ℝ\nhμ : 0 ≤ μ\nhν : 0 ≤ ν\nh : μ + ν = 1\n⊢ (fun x => x ^ Nat.succ k) (μ • a + ν • b) ≤ μ • (fun x => x ^ Nat.succ k) a + ν • (fun x => x ^ Nat.succ k) b\n[PROOFSTEP]\nhave H := IH.2 ha hb hμ hν h\n[GOAL]\ncase succ\nk : ℕ\nIH : ConvexOn ℝ (Ici 0) fun x => x ^ k\na : ℝ\nha : 0 ≤ a\nb : ℝ\nhb : 0 ≤ b\nμ ν : ℝ\nhμ : 0 ≤ μ\nhν : 0 ≤ ν\nh : μ + ν = 1\nH : (fun x => x ^ k) (μ • a + ν • b) ≤ μ • (fun x => x ^ k) a + ν • (fun x => x ^ k) b\n⊢ (fun x => x ^ Nat.succ k) (μ • a + ν • b) ≤ μ • (fun x => x ^ Nat.succ k) a + ν • (fun x => x ^ Nat.succ k) b\n[PROOFSTEP]\nhave : 0 ≤ (b ^ k - a ^ k) * (b - a) * μ * ν :=\n  by\n  cases' le_or_lt a b with hab hab\n  · have : a ^ k ≤ b ^ k := by gcongr\n    have : 0 ≤ (b ^ k - a ^ k) * (b - a) := by nlinarith\n    positivity\n  · have : b ^ k ≤ a ^ k := by gcongr\n    have : 0 ≤ (b ^ k - a ^ k) * (b - a) := by nlinarith\n    positivity\n[GOAL]\nk : ℕ\nIH : ConvexOn ℝ (Ici 0) fun x => x ^ k\na : ℝ\nha : 0 ≤ a\nb : ℝ\nhb : 0 ≤ b\nμ ν : ℝ\nhμ : 0 ≤ μ\nhν : 0 ≤ ν\nh : μ + ν = 1\nH : (fun x => x ^ k) (μ • a + ν • b) ≤ μ • (fun x => x ^ k) a + ν • (fun x => x ^ k) b\n⊢ 0 ≤ (b ^ k - a ^ k) * (b - a) * μ * ν\n[PROOFSTEP]\ncases' le_or_lt a b with hab hab\n[GOAL]\ncase inl\nk : ℕ\nIH : ConvexOn ℝ (Ici 0) fun x => x ^ k\na : ℝ\nha : 0 ≤ a\nb : ℝ\nhb : 0 ≤ b\nμ ν : ℝ\nhμ : 0 ≤ μ\nhν : 0 ≤ ν\nh : μ + ν = 1\nH : (fun x => x ^ k) (μ • a + ν • b) ≤ μ • (fun x => x ^ k) a + ν • (fun x => x ^ k) b\nhab : a ≤ b\n⊢ 0 ≤ (b ^ k - a ^ k) * (b - a) * μ * ν\n[PROOFSTEP]\nhave : a ^ k ≤ b ^ k := by gcongr\n[GOAL]\nk : ℕ\nIH : ConvexOn ℝ (Ici 0) fun x => x ^ k\na : ℝ\nha : 0 ≤ a\nb : ℝ\nhb : 0 ≤ b\nμ ν : ℝ\nhμ : 0 ≤ μ\nhν : 0 ≤ ν\nh : μ + ν = 1\nH : (fun x => x ^ k) (μ • a + ν • b) ≤ μ • (fun x => x ^ k) a + ν • (fun x => x ^ k) b\nhab : a ≤ b\n⊢ a ^ k ≤ b ^ k\n[PROOFSTEP]\ngcongr\n[GOAL]\ncase inl\nk : ℕ\nIH : ConvexOn ℝ (Ici 0) fun x => x ^ k\na : ℝ\nha : 0 ≤ a\nb : ℝ\nhb : 0 ≤ b\nμ ν : ℝ\nhμ : 0 ≤ μ\nhν : 0 ≤ ν\nh : μ + ν = 1\nH : (fun x => x ^ k) (μ • a + ν • b) ≤ μ • (fun x => x ^ k) a + ν • (fun x => x ^ k) b\nhab : a ≤ b\nthis : a ^ k ≤ b ^ k\n⊢ 0 ≤ (b ^ k - a ^ k) * (b - a) * μ * ν\n[PROOFSTEP]\nhave : 0 ≤ (b ^ k - a ^ k) * (b - a) := by nlinarith\n[GOAL]\nk : ℕ\nIH : ConvexOn ℝ (Ici 0) fun x => x ^ k\na : ℝ\nha : 0 ≤ a\nb : ℝ\nhb : 0 ≤ b\nμ ν : ℝ\nhμ : 0 ≤ μ\nhν : 0 ≤ ν\nh : μ + ν = 1\nH : (fun x => x ^ k) (μ • a + ν • b) ≤ μ • (fun x => x ^ k) a + ν • (fun x => x ^ k) b\nhab : a ≤ b\nthis : a ^ k ≤ b ^ k\n⊢ 0 ≤ (b ^ k - a ^ k) * (b - a)\n[PROOFSTEP]\nnlinarith\n[GOAL]\ncase inl\nk : ℕ\nIH : ConvexOn ℝ (Ici 0) fun x => x ^ k\na : ℝ\nha : 0 ≤ a\nb : ℝ\nhb : 0 ≤ b\nμ ν : ℝ\nhμ : 0 ≤ μ\nhν : 0 ≤ ν\nh : μ + ν = 1\nH : (fun x => x ^ k) (μ • a + ν • b) ≤ μ • (fun x => x ^ k) a + ν • (fun x => x ^ k) b\nhab : a ≤ b\nthis✝ : a ^ k ≤ b ^ k\nthis : 0 ≤ (b ^ k - a ^ k) * (b - a)\n⊢ 0 ≤ (b ^ k - a ^ k) * (b - a) * μ * ν\n[PROOFSTEP]\npositivity\n[GOAL]\ncase inr\nk : ℕ\nIH : ConvexOn ℝ (Ici 0) fun x => x ^ k\na : ℝ\nha : 0 ≤ a\nb : ℝ\nhb : 0 ≤ b\nμ ν : ℝ\nhμ : 0 ≤ μ\nhν : 0 ≤ ν\nh : μ + ν = 1\nH : (fun x => x ^ k) (μ • a + ν • b) ≤ μ • (fun x => x ^ k) a + ν • (fun x => x ^ k) b\nhab : b < a\n⊢ 0 ≤ (b ^ k - a ^ k) * (b - a) * μ * ν\n[PROOFSTEP]\nhave : b ^ k ≤ a ^ k := by gcongr\n[GOAL]\nk : ℕ\nIH : ConvexOn ℝ (Ici 0) fun x => x ^ k\na : ℝ\nha : 0 ≤ a\nb : ℝ\nhb : 0 ≤ b\nμ ν : ℝ\nhμ : 0 ≤ μ\nhν : 0 ≤ ν\nh : μ + ν = 1\nH : (fun x => x ^ k) (μ • a + ν • b) ≤ μ • (fun x => x ^ k) a + ν • (fun x => x ^ k) b\nhab : b < a\n⊢ b ^ k ≤ a ^ k\n[PROOFSTEP]\ngcongr\n[GOAL]\ncase inr\nk : ℕ\nIH : ConvexOn ℝ (Ici 0) fun x => x ^ k\na : ℝ\nha : 0 ≤ a\nb : ℝ\nhb : 0 ≤ b\nμ ν : ℝ\nhμ : 0 ≤ μ\nhν : 0 ≤ ν\nh : μ + ν = 1\nH : (fun x => x ^ k) (μ • a + ν • b) ≤ μ • (fun x => x ^ k) a + ν • (fun x => x ^ k) b\nhab : b < a\nthis : b ^ k ≤ a ^ k\n⊢ 0 ≤ (b ^ k - a ^ k) * (b - a) * μ * ν\n[PROOFSTEP]\nhave : 0 ≤ (b ^ k - a ^ k) * (b - a) := by nlinarith\n[GOAL]\nk : ℕ\nIH : ConvexOn ℝ (Ici 0) fun x => x ^ k\na : ℝ\nha : 0 ≤ a\nb : ℝ\nhb : 0 ≤ b\nμ ν : ℝ\nhμ : 0 ≤ μ\nhν : 0 ≤ ν\nh : μ + ν = 1\nH : (fun x => x ^ k) (μ • a + ν • b) ≤ μ • (fun x => x ^ k) a + ν • (fun x => x ^ k) b\nhab : b < a\nthis : b ^ k ≤ a ^ k\n⊢ 0 ≤ (b ^ k - a ^ k) * (b - a)\n[PROOFSTEP]\nnlinarith\n[GOAL]\ncase inr\nk : ℕ\nIH : ConvexOn ℝ (Ici 0) fun x => x ^ k\na : ℝ\nha : 0 ≤ a\nb : ℝ\nhb : 0 ≤ b\nμ ν : ℝ\nhμ : 0 ≤ μ\nhν : 0 ≤ ν\nh : μ + ν = 1\nH : (fun x => x ^ k) (μ • a + ν • b) ≤ μ • (fun x => x ^ k) a + ν • (fun x => x ^ k) b\nhab : b < a\nthis✝ : b ^ k ≤ a ^ k\nthis : 0 ≤ (b ^ k - a ^ k) * (b - a)\n⊢ 0 ≤ (b ^ k - a ^ k) * (b - a) * μ * ν\n[PROOFSTEP]\npositivity\n[GOAL]\ncase succ\nk : ℕ\nIH : ConvexOn ℝ (Ici 0) fun x => x ^ k\na : ℝ\nha : 0 ≤ a\nb : ℝ\nhb : 0 ≤ b\nμ ν : ℝ\nhμ : 0 ≤ μ\nhν : 0 ≤ ν\nh : μ + ν = 1\nH : (fun x => x ^ k) (μ • a + ν • b) ≤ μ • (fun x => x ^ k) a + ν • (fun x => x ^ k) b\nthis : 0 ≤ (b ^ k - a ^ k) * (b - a) * μ * ν\n⊢ (fun x => x ^ Nat.succ k) (μ • a + ν • b) ≤ μ • (fun x => x ^ Nat.succ k) a + ν • (fun x => x ^ Nat.succ k) b\n[PROOFSTEP]\ncalc\n  (μ * a + ν * b) ^ k.succ = (μ * a + ν * b) * (μ * a + ν * b) ^ k := pow_succ _ _\n  _ ≤ (μ * a + ν * b) * (μ * a ^ k + ν * b ^ k) := by gcongr; exact H\n  _ ≤ (μ * a + ν * b) * (μ * a ^ k + ν * b ^ k) + (b ^ k - a ^ k) * (b - a) * μ * ν := by linarith\n  _ = (μ + ν) * (μ * a ^ k.succ + ν * b ^ k.succ) := by rw [Nat.succ_eq_add_one]; ring\n  _ = μ * a ^ k.succ + ν * b ^ k.succ := by rw [h]; ring\n[GOAL]\nk : ℕ\nIH : ConvexOn ℝ (Ici 0) fun x => x ^ k\na : ℝ\nha : 0 ≤ a\nb : ℝ\nhb : 0 ≤ b\nμ ν : ℝ\nhμ : 0 ≤ μ\nhν : 0 ≤ ν\nh : μ + ν = 1\nH : (fun x => x ^ k) (μ • a + ν • b) ≤ μ • (fun x => x ^ k) a + ν • (fun x => x ^ k) b\nthis : 0 ≤ (b ^ k - a ^ k) * (b - a) * μ * ν\n⊢ (μ * a + ν * b) * (μ * a + ν * b) ^ k ≤ (μ * a + ν * b) * (μ * a ^ k + ν * b ^ k)\n[PROOFSTEP]\ngcongr\n[GOAL]\ncase h\nk : ℕ\nIH : ConvexOn ℝ (Ici 0) fun x => x ^ k\na : ℝ\nha : 0 ≤ a\nb : ℝ\nhb : 0 ≤ b\nμ ν : ℝ\nhμ : 0 ≤ μ\nhν : 0 ≤ ν\nh : μ + ν = 1\nH : (fun x => x ^ k) (μ • a + ν • b) ≤ μ • (fun x => x ^ k) a + ν • (fun x => x ^ k) b\nthis : 0 ≤ (b ^ k - a ^ k) * (b - a) * μ * ν\n⊢ (μ * a + ν * b) ^ k ≤ μ * a ^ k + ν * b ^ k\n[PROOFSTEP]\nexact H\n[GOAL]\nk : ℕ\nIH : ConvexOn ℝ (Ici 0) fun x => x ^ k\na : ℝ\nha : 0 ≤ a\nb : ℝ\nhb : 0 ≤ b\nμ ν : ℝ\nhμ : 0 ≤ μ\nhν : 0 ≤ ν\nh : μ + ν = 1\nH : (fun x => x ^ k) (μ • a + ν • b) ≤ μ • (fun x => x ^ k) a + ν • (fun x => x ^ k) b\nthis : 0 ≤ (b ^ k - a ^ k) * (b - a) * μ * ν\n⊢ (μ * a + ν * b) * (μ * a ^ k + ν * b ^ k) ≤\n    (μ * a + ν * b) * (μ * a ^ k + ν * b ^ k) + (b ^ k - a ^ k) * (b - a) * μ * ν\n[PROOFSTEP]\nlinarith\n[GOAL]\nk : ℕ\nIH : ConvexOn ℝ (Ici 0) fun x => x ^ k\na : ℝ\nha : 0 ≤ a\nb : ℝ\nhb : 0 ≤ b\nμ ν : ℝ\nhμ : 0 ≤ μ\nhν : 0 ≤ ν\nh : μ + ν = 1\nH : (fun x => x ^ k) (μ • a + ν • b) ≤ μ • (fun x => x ^ k) a + ν • (fun x => x ^ k) b\nthis : 0 ≤ (b ^ k - a ^ k) * (b - a) * μ * ν\n⊢ (μ * a + ν * b) * (μ * a ^ k + ν * b ^ k) + (b ^ k - a ^ k) * (b - a) * μ * ν =\n    (μ + ν) * (μ * a ^ Nat.succ k + ν * b ^ Nat.succ k)\n[PROOFSTEP]\nrw [Nat.succ_eq_add_one]\n[GOAL]\nk : ℕ\nIH : ConvexOn ℝ (Ici 0) fun x => x ^ k\na : ℝ\nha : 0 ≤ a\nb : ℝ\nhb : 0 ≤ b\nμ ν : ℝ\nhμ : 0 ≤ μ\nhν : 0 ≤ ν\nh : μ + ν = 1\nH : (fun x => x ^ k) (μ • a + ν • b) ≤ μ • (fun x => x ^ k) a + ν • (fun x => x ^ k) b\nthis : 0 ≤ (b ^ k - a ^ k) * (b - a) * μ * ν\n⊢ (μ * a + ν * b) * (μ * a ^ k + ν * b ^ k) + (b ^ k - a ^ k) * (b - a) * μ * ν =\n    (μ + ν) * (μ * a ^ (k + 1) + ν * b ^ (k + 1))\n[PROOFSTEP]\nring\n[GOAL]\nk : ℕ\nIH : ConvexOn ℝ (Ici 0) fun x => x ^ k\na : ℝ\nha : 0 ≤ a\nb : ℝ\nhb : 0 ≤ b\nμ ν : ℝ\nhμ : 0 ≤ μ\nhν : 0 ≤ ν\nh : μ + ν = 1\nH : (fun x => x ^ k) (μ • a + ν • b) ≤ μ • (fun x => x ^ k) a + ν • (fun x => x ^ k) b\nthis : 0 ≤ (b ^ k - a ^ k) * (b - a) * μ * ν\n⊢ (μ + ν) * (μ * a ^ Nat.succ k + ν * b ^ Nat.succ k) = μ * a ^ Nat.succ k + ν * b ^ Nat.succ k\n[PROOFSTEP]\nrw [h]\n[GOAL]\nk : ℕ\nIH : ConvexOn ℝ (Ici 0) fun x => x ^ k\na : ℝ\nha : 0 ≤ a\nb : ℝ\nhb : 0 ≤ b\nμ ν : ℝ\nhμ : 0 ≤ μ\nhν : 0 ≤ ν\nh : μ + ν = 1\nH : (fun x => x ^ k) (μ • a + ν • b) ≤ μ • (fun x => x ^ k) a + ν • (fun x => x ^ k) b\nthis : 0 ≤ (b ^ k - a ^ k) * (b - a) * μ * ν\n⊢ 1 * (μ * a ^ Nat.succ k + ν * b ^ Nat.succ k) = μ * a ^ Nat.succ k + ν * b ^ Nat.succ k\n[PROOFSTEP]\nring\n[GOAL]\nn : ℕ\nhn : Even n\n⊢ ConvexOn ℝ univ fun x => x ^ n\n[PROOFSTEP]\nrefine' ⟨convex_univ, _⟩\n[GOAL]\nn : ℕ\nhn : Even n\n⊢ ∀ ⦃x : ℝ⦄,\n    x ∈ univ →\n      ∀ ⦃y : ℝ⦄,\n        y ∈ univ →\n          ∀ ⦃a b : ℝ⦄,\n            0 ≤ a →\n              0 ≤ b → a + b = 1 → (fun x => x ^ n) (a • x + b • y) ≤ a • (fun x => x ^ n) x + b • (fun x => x ^ n) y\n[PROOFSTEP]\nrintro a - b - μ ν hμ hν h\n[GOAL]\nn : ℕ\nhn : Even n\na b μ ν : ℝ\nhμ : 0 ≤ μ\nhν : 0 ≤ ν\nh : μ + ν = 1\n⊢ (fun x => x ^ n) (μ • a + ν • b) ≤ μ • (fun x => x ^ n) a + ν • (fun x => x ^ n) b\n[PROOFSTEP]\nobtain ⟨k, rfl⟩ :=\n  hn.exists_two_nsmul\n    _\n      -- Porting note: added type ascription to LHS\n[GOAL]\ncase intro\na b μ ν : ℝ\nhμ : 0 ≤ μ\nhν : 0 ≤ ν\nh : μ + ν = 1\nk : ℕ\nhn : Even (2 • k)\n⊢ (fun x => x ^ (2 • k)) (μ • a + ν • b) ≤ μ • (fun x => x ^ (2 • k)) a + ν • (fun x => x ^ (2 • k)) b\n[PROOFSTEP]\nhave : (0 : ℝ) ≤ (a - b) ^ 2 * μ * ν := by positivity\n[GOAL]\na b μ ν : ℝ\nhμ : 0 ≤ μ\nhν : 0 ≤ ν\nh : μ + ν = 1\nk : ℕ\nhn : Even (2 • k)\n⊢ 0 ≤ (a - b) ^ 2 * μ * ν\n[PROOFSTEP]\npositivity\n[GOAL]\ncase intro\na b μ ν : ℝ\nhμ : 0 ≤ μ\nhν : 0 ≤ ν\nh : μ + ν = 1\nk : ℕ\nhn : Even (2 • k)\nthis : 0 ≤ (a - b) ^ 2 * μ * ν\n⊢ (fun x => x ^ (2 • k)) (μ • a + ν • b) ≤ μ • (fun x => x ^ (2 • k)) a + ν • (fun x => x ^ (2 • k)) b\n[PROOFSTEP]\ncalc\n  (μ * a + ν * b) ^ (2 * k) = ((μ * a + ν * b) ^ 2) ^ k := by rw [pow_mul]\n  _ ≤ ((μ + ν) * (μ * a ^ 2 + ν * b ^ 2)) ^ k := by gcongr; linarith\n  _ = (μ * a ^ 2 + ν * b ^ 2) ^ k := by rw [h]; ring\n  _ ≤ μ * (a ^ 2) ^ k + ν * (b ^ 2) ^ k := ?_\n  _ ≤ μ * a ^ (2 * k) + ν * b ^ (2 * k) := by ring_nf;\n    rfl\n      -- Porting note: `rw [mem_Ici]` was `dsimp`\n[GOAL]\na b μ ν : ℝ\nhμ : 0 ≤ μ\nhν : 0 ≤ ν\nh : μ + ν = 1\nk : ℕ\nhn : Even (2 • k)\nthis : 0 ≤ (a - b) ^ 2 * μ * ν\n⊢ (μ * a + ν * b) ^ (2 * k) = ((μ * a + ν * b) ^ 2) ^ k\n[PROOFSTEP]\nrw [pow_mul]\n[GOAL]\na b μ ν : ℝ\nhμ : 0 ≤ μ\nhν : 0 ≤ ν\nh : μ + ν = 1\nk : ℕ\nhn : Even (2 • k)\nthis : 0 ≤ (a - b) ^ 2 * μ * ν\n⊢ ((μ * a + ν * b) ^ 2) ^ k ≤ ((μ + ν) * (μ * a ^ 2 + ν * b ^ 2)) ^ k\n[PROOFSTEP]\ngcongr\n[GOAL]\ncase hab\na b μ ν : ℝ\nhμ : 0 ≤ μ\nhν : 0 ≤ ν\nh : μ + ν = 1\nk : ℕ\nhn : Even (2 • k)\nthis : 0 ≤ (a - b) ^ 2 * μ * ν\n⊢ (μ * a + ν * b) ^ 2 ≤ (μ + ν) * (μ * a ^ 2 + ν * b ^ 2)\n[PROOFSTEP]\nlinarith\n[GOAL]\na b μ ν : ℝ\nhμ : 0 ≤ μ\nhν : 0 ≤ ν\nh : μ + ν = 1\nk : ℕ\nhn : Even (2 • k)\nthis : 0 ≤ (a - b) ^ 2 * μ * ν\n⊢ ((μ + ν) * (μ * a ^ 2 + ν * b ^ 2)) ^ k = (μ * a ^ 2 + ν * b ^ 2) ^ k\n[PROOFSTEP]\nrw [h]\n[GOAL]\na b μ ν : ℝ\nhμ : 0 ≤ μ\nhν : 0 ≤ ν\nh : μ + ν = 1\nk : ℕ\nhn : Even (2 • k)\nthis : 0 ≤ (a - b) ^ 2 * μ * ν\n⊢ (1 * (μ * a ^ 2 + ν * b ^ 2)) ^ k = (μ * a ^ 2 + ν * b ^ 2) ^ k\n[PROOFSTEP]\nring\n[GOAL]\na b μ ν : ℝ\nhμ : 0 ≤ μ\nhν : 0 ≤ ν\nh : μ + ν = 1\nk : ℕ\nhn : Even (2 • k)\nthis : 0 ≤ (a - b) ^ 2 * μ * ν\n⊢ μ * (a ^ 2) ^ k + ν * (b ^ 2) ^ k ≤ μ * a ^ (2 * k) + ν * b ^ (2 * k)\n[PROOFSTEP]\nring_nf\n[GOAL]\na b μ ν : ℝ\nhμ : 0 ≤ μ\nhν : 0 ≤ ν\nh : μ + ν = 1\nk : ℕ\nhn : Even (2 • k)\nthis : 0 ≤ (a - b) ^ 2 * μ * ν\n⊢ μ * a ^ (k * 2) + ν * b ^ (k * 2) ≤ μ * a ^ (k * 2) + ν * b ^ (k * 2)\n[PROOFSTEP]\nrfl\n  -- Porting note: `rw [mem_Ici]` was `dsimp`\n[GOAL]\ncase intro\na b μ ν : ℝ\nhμ : 0 ≤ μ\nhν : 0 ≤ ν\nh : μ + ν = 1\nk : ℕ\nhn : Even (2 • k)\nthis : 0 ≤ (a - b) ^ 2 * μ * ν\n⊢ (μ * a ^ 2 + ν * b ^ 2) ^ k ≤ μ * (a ^ 2) ^ k + ν * (b ^ 2) ^ k\n[PROOFSTEP]\nrefine' (convexOn_pow k).2 _ _ hμ hν h\n[GOAL]\ncase intro.refine'_1\na b μ ν : ℝ\nhμ : 0 ≤ μ\nhν : 0 ≤ ν\nh : μ + ν = 1\nk : ℕ\nhn : Even (2 • k)\nthis : 0 ≤ (a - b) ^ 2 * μ * ν\n⊢ a ^ 2 ∈ Ici 0\n[PROOFSTEP]\nrw [mem_Ici]\n[GOAL]\ncase intro.refine'_2\na b μ ν : ℝ\nhμ : 0 ≤ μ\nhν : 0 ≤ ν\nh : μ + ν = 1\nk : ℕ\nhn : Even (2 • k)\nthis : 0 ≤ (a - b) ^ 2 * μ * ν\n⊢ b ^ 2 ∈ Ici 0\n[PROOFSTEP]\nrw [mem_Ici]\n[GOAL]\ncase intro.refine'_1\na b μ ν : ℝ\nhμ : 0 ≤ μ\nhν : 0 ≤ ν\nh : μ + ν = 1\nk : ℕ\nhn : Even (2 • k)\nthis : 0 ≤ (a - b) ^ 2 * μ * ν\n⊢ 0 ≤ a ^ 2\n[PROOFSTEP]\npositivity\n[GOAL]\ncase intro.refine'_2\na b μ ν : ℝ\nhμ : 0 ≤ μ\nhν : 0 ≤ ν\nh : μ + ν = 1\nk : ℕ\nhn : Even (2 • k)\nthis : 0 ≤ (a - b) ^ 2 * μ * ν\n⊢ 0 ≤ b ^ 2\n[PROOFSTEP]\npositivity\n[GOAL]\nn : ℕ\n⊢ ConvexOn ℝ (Ioi 0) fun x => x ^ ↑n\n[PROOFSTEP]\nsimp_rw [zpow_ofNat]\n[GOAL]\nn : ℕ\n⊢ ConvexOn ℝ (Ioi 0) fun x => x ^ n\n[PROOFSTEP]\nexact (convexOn_pow n).subset Ioi_subset_Ici_self (convex_Ioi _)\n[GOAL]\nn : ℕ\n⊢ ConvexOn ℝ (Ioi 0) fun x => x ^ -[n+1]\n[PROOFSTEP]\nsimp_rw [zpow_negSucc]\n[GOAL]\nn : ℕ\n⊢ ConvexOn ℝ (Ioi 0) fun x => (x ^ (n + 1))⁻¹\n[PROOFSTEP]\nrefine' ⟨convex_Ioi _, _⟩\n[GOAL]\nn : ℕ\n⊢ ∀ ⦃x : ℝ⦄,\n    x ∈ Ioi 0 →\n      ∀ ⦃y : ℝ⦄,\n        y ∈ Ioi 0 →\n          ∀ ⦃a b : ℝ⦄,\n            0 ≤ a →\n              0 ≤ b →\n                a + b = 1 →\n                  (fun x => (x ^ (n + 1))⁻¹) (a • x + b • y) ≤\n                    a • (fun x => (x ^ (n + 1))⁻¹) x + b • (fun x => (x ^ (n + 1))⁻¹) y\n[PROOFSTEP]\nrintro a (ha : 0 < a) b (hb : 0 < b) μ ν hμ hν h\n[GOAL]\nn : ℕ\na : ℝ\nha : 0 < a\nb : ℝ\nhb : 0 < b\nμ ν : ℝ\nhμ : 0 ≤ μ\nhν : 0 ≤ ν\nh : μ + ν = 1\n⊢ (fun x => (x ^ (n + 1))⁻¹) (μ • a + ν • b) ≤ μ • (fun x => (x ^ (n + 1))⁻¹) a + ν • (fun x => (x ^ (n + 1))⁻¹) b\n[PROOFSTEP]\nfield_simp [ha.ne', hb.ne']\n[GOAL]\nn : ℕ\na : ℝ\nha : 0 < a\nb : ℝ\nhb : 0 < b\nμ ν : ℝ\nhμ : 0 ≤ μ\nhν : 0 ≤ ν\nh : μ + ν = 1\n⊢ 1 / (μ * a + ν * b) ^ (n + 1) ≤ (μ * b ^ (n + 1) + ν * a ^ (n + 1)) / (a ^ (n + 1) * b ^ (n + 1))\n[PROOFSTEP]\nrw [div_le_div_iff]\n[GOAL]\nn : ℕ\na : ℝ\nha : 0 < a\nb : ℝ\nhb : 0 < b\nμ ν : ℝ\nhμ : 0 ≤ μ\nhν : 0 ≤ ν\nh : μ + ν = 1\n⊢ 1 * (a ^ (n + 1) * b ^ (n + 1)) ≤ (μ * b ^ (n + 1) + ν * a ^ (n + 1)) * (μ * a + ν * b) ^ (n + 1)\n[PROOFSTEP]\ncalc\n  (1 : ℝ) * (a ^ (n + 1) * b ^ (n + 1)) = ((μ + ν) ^ 2 * (a * b)) ^ (n + 1) := by rw [h]; ring\n  _ ≤ ((μ * b + ν * a) * (μ * a + ν * b)) ^ (n + 1) := ?_\n  _ = (μ * b + ν * a) ^ (n + 1) * (μ * a + ν * b) ^ (n + 1) := by rw [mul_pow]\n  _ ≤ (μ * b ^ (n + 1) + ν * a ^ (n + 1)) * (μ * a + ν * b) ^ (n + 1) := ?_\n[GOAL]\nn : ℕ\na : ℝ\nha : 0 < a\nb : ℝ\nhb : 0 < b\nμ ν : ℝ\nhμ : 0 ≤ μ\nhν : 0 ≤ ν\nh : μ + ν = 1\n⊢ 1 * (a ^ (n + 1) * b ^ (n + 1)) = ((μ + ν) ^ 2 * (a * b)) ^ (n + 1)\n[PROOFSTEP]\nrw [h]\n[GOAL]\nn : ℕ\na : ℝ\nha : 0 < a\nb : ℝ\nhb : 0 < b\nμ ν : ℝ\nhμ : 0 ≤ μ\nhν : 0 ≤ ν\nh : μ + ν = 1\n⊢ 1 * (a ^ (n + 1) * b ^ (n + 1)) = (1 ^ 2 * (a * b)) ^ (n + 1)\n[PROOFSTEP]\nring\n[GOAL]\nn : ℕ\na : ℝ\nha : 0 < a\nb : ℝ\nhb : 0 < b\nμ ν : ℝ\nhμ : 0 ≤ μ\nhν : 0 ≤ ν\nh : μ + ν = 1\n⊢ ((μ * b + ν * a) * (μ * a + ν * b)) ^ (n + 1) = (μ * b + ν * a) ^ (n + 1) * (μ * a + ν * b) ^ (n + 1)\n[PROOFSTEP]\nrw [mul_pow]\n[GOAL]\ncase calc_1\nn : ℕ\na : ℝ\nha : 0 < a\nb : ℝ\nhb : 0 < b\nμ ν : ℝ\nhμ : 0 ≤ μ\nhν : 0 ≤ ν\nh : μ + ν = 1\n⊢ ((μ + ν) ^ 2 * (a * b)) ^ (n + 1) ≤ ((μ * b + ν * a) * (μ * a + ν * b)) ^ (n + 1)\n[PROOFSTEP]\ngcongr(?_ : ℝ) ^ _\n[GOAL]\ncase calc_1.hab\nn : ℕ\na : ℝ\nha : 0 < a\nb : ℝ\nhb : 0 < b\nμ ν : ℝ\nhμ : 0 ≤ μ\nhν : 0 ≤ ν\nh : μ + ν = 1\n⊢ (μ + ν) ^ 2 * (a * b) ≤ (μ * b + ν * a) * (μ * a + ν * b)\n[PROOFSTEP]\nhave : (0 : ℝ) ≤ μ * ν * (a - b) ^ 2 := by positivity\n[GOAL]\nn : ℕ\na : ℝ\nha : 0 < a\nb : ℝ\nhb : 0 < b\nμ ν : ℝ\nhμ : 0 ≤ μ\nhν : 0 ≤ ν\nh : μ + ν = 1\n⊢ 0 ≤ μ * ν * (a - b) ^ 2\n[PROOFSTEP]\npositivity\n[GOAL]\ncase calc_1.hab\nn : ℕ\na : ℝ\nha : 0 < a\nb : ℝ\nhb : 0 < b\nμ ν : ℝ\nhμ : 0 ≤ μ\nhν : 0 ≤ ν\nh : μ + ν = 1\nthis : 0 ≤ μ * ν * (a - b) ^ 2\n⊢ (μ + ν) ^ 2 * (a * b) ≤ (μ * b + ν * a) * (μ * a + ν * b)\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase calc_2\nn : ℕ\na : ℝ\nha : 0 < a\nb : ℝ\nhb : 0 < b\nμ ν : ℝ\nhμ : 0 ≤ μ\nhν : 0 ≤ ν\nh : μ + ν = 1\n⊢ (μ * b + ν * a) ^ (n + 1) * (μ * a + ν * b) ^ (n + 1) ≤\n    (μ * b ^ (n + 1) + ν * a ^ (n + 1)) * (μ * a + ν * b) ^ (n + 1)\n[PROOFSTEP]\ngcongr\n[GOAL]\ncase calc_2.h\nn : ℕ\na : ℝ\nha : 0 < a\nb : ℝ\nhb : 0 < b\nμ ν : ℝ\nhμ : 0 ≤ μ\nhν : 0 ≤ ν\nh : μ + ν = 1\n⊢ (μ * b + ν * a) ^ (n + 1) ≤ μ * b ^ (n + 1) + ν * a ^ (n + 1)\n[PROOFSTEP]\napply (convexOn_pow (n + 1)).2 hb.le ha.le hμ hν h\n[GOAL]\ncase b0\nn : ℕ\na : ℝ\nha : 0 < a\nb : ℝ\nhb : 0 < b\nμ ν : ℝ\nhμ : 0 ≤ μ\nhν : 0 ≤ ν\nh : μ + ν = 1\n⊢ 0 < (μ * a + ν * b) ^ (n + 1)\n[PROOFSTEP]\nhave : 0 < μ * a + ν * b := by cases le_or_lt a b <;> nlinarith\n[GOAL]\nn : ℕ\na : ℝ\nha : 0 < a\nb : ℝ\nhb : 0 < b\nμ ν : ℝ\nhμ : 0 ≤ μ\nhν : 0 ≤ ν\nh : μ + ν = 1\n⊢ 0 < μ * a + ν * b\n[PROOFSTEP]\ncases le_or_lt a b\n[GOAL]\ncase inl\nn : ℕ\na : ℝ\nha : 0 < a\nb : ℝ\nhb : 0 < b\nμ ν : ℝ\nhμ : 0 ≤ μ\nhν : 0 ≤ ν\nh : μ + ν = 1\nh✝ : a ≤ b\n⊢ 0 < μ * a + ν * b\n[PROOFSTEP]\nnlinarith\n[GOAL]\ncase inr\nn : ℕ\na : ℝ\nha : 0 < a\nb : ℝ\nhb : 0 < b\nμ ν : ℝ\nhμ : 0 ≤ μ\nhν : 0 ≤ ν\nh : μ + ν = 1\nh✝ : b < a\n⊢ 0 < μ * a + ν * b\n[PROOFSTEP]\nnlinarith\n[GOAL]\ncase b0\nn : ℕ\na : ℝ\nha : 0 < a\nb : ℝ\nhb : 0 < b\nμ ν : ℝ\nhμ : 0 ≤ μ\nhν : 0 ≤ ν\nh : μ + ν = 1\nthis : 0 < μ * a + ν * b\n⊢ 0 < (μ * a + ν * b) ^ (n + 1)\n[PROOFSTEP]\npositivity\n[GOAL]\ncase d0\nn : ℕ\na : ℝ\nha : 0 < a\nb : ℝ\nhb : 0 < b\nμ ν : ℝ\nhμ : 0 ≤ μ\nhν : 0 ≤ ν\nh : μ + ν = 1\n⊢ 0 < a ^ (n + 1) * b ^ (n + 1)\n[PROOFSTEP]\npositivity\n[GOAL]\n⊢ StrictConcaveOn ℝ (Ioi 0) log\n[PROOFSTEP]\napply strictConcaveOn_of_slope_strict_anti_adjacent (convex_Ioi (0 : ℝ))\n[GOAL]\n⊢ ∀ {x y z : ℝ}, x ∈ Ioi 0 → z ∈ Ioi 0 → x < y → y < z → (log z - log y) / (z - y) < (log y - log x) / (y - x)\n[PROOFSTEP]\nrintro x y z (hx : 0 < x) (hz : 0 < z) hxy hyz\n[GOAL]\nx y z : ℝ\nhx : 0 < x\nhz : 0 < z\nhxy : x < y\nhyz : y < z\n⊢ (log z - log y) / (z - y) < (log y - log x) / (y - x)\n[PROOFSTEP]\nhave hy : 0 < y := hx.trans hxy\n[GOAL]\nx y z : ℝ\nhx : 0 < x\nhz : 0 < z\nhxy : x < y\nhyz : y < z\nhy : 0 < y\n⊢ (log z - log y) / (z - y) < (log y - log x) / (y - x)\n[PROOFSTEP]\ntrans y⁻¹\n[GOAL]\nx y z : ℝ\nhx : 0 < x\nhz : 0 < z\nhxy : x < y\nhyz : y < z\nhy : 0 < y\n⊢ (log z - log y) / (z - y) < y⁻¹\n[PROOFSTEP]\nhave h : 0 < z - y := by linarith\n[GOAL]\nx y z : ℝ\nhx : 0 < x\nhz : 0 < z\nhxy : x < y\nhyz : y < z\nhy : 0 < y\n⊢ 0 < z - y\n[PROOFSTEP]\nlinarith\n[GOAL]\nx y z : ℝ\nhx : 0 < x\nhz : 0 < z\nhxy : x < y\nhyz : y < z\nhy : 0 < y\nh : 0 < z - y\n⊢ (log z - log y) / (z - y) < y⁻¹\n[PROOFSTEP]\nrw [div_lt_iff h]\n[GOAL]\nx y z : ℝ\nhx : 0 < x\nhz : 0 < z\nhxy : x < y\nhyz : y < z\nhy : 0 < y\nh : 0 < z - y\n⊢ log z - log y < y⁻¹ * (z - y)\n[PROOFSTEP]\nhave hyz' : 0 < z / y := by positivity\n[GOAL]\nx y z : ℝ\nhx : 0 < x\nhz : 0 < z\nhxy : x < y\nhyz : y < z\nhy : 0 < y\nh : 0 < z - y\n⊢ 0 < z / y\n[PROOFSTEP]\npositivity\n[GOAL]\nx y z : ℝ\nhx : 0 < x\nhz : 0 < z\nhxy : x < y\nhyz : y < z\nhy : 0 < y\nh : 0 < z - y\nhyz' : 0 < z / y\n⊢ log z - log y < y⁻¹ * (z - y)\n[PROOFSTEP]\nhave hyz'' : z / y ≠ 1 := by\n  contrapose! h\n  rw [div_eq_one_iff_eq hy.ne'] at h \n  simp [h]\n[GOAL]\nx y z : ℝ\nhx : 0 < x\nhz : 0 < z\nhxy : x < y\nhyz : y < z\nhy : 0 < y\nh : 0 < z - y\nhyz' : 0 < z / y\n⊢ z / y ≠ 1\n[PROOFSTEP]\ncontrapose! h\n[GOAL]\nx y z : ℝ\nhx : 0 < x\nhz : 0 < z\nhxy : x < y\nhyz : y < z\nhy : 0 < y\nhyz' : 0 < z / y\nh : z / y = 1\n⊢ z - y ≤ 0\n[PROOFSTEP]\nrw [div_eq_one_iff_eq hy.ne'] at h \n[GOAL]\nx y z : ℝ\nhx : 0 < x\nhz : 0 < z\nhxy : x < y\nhyz : y < z\nhy : 0 < y\nhyz' : 0 < z / y\nh : z = y\n⊢ z - y ≤ 0\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nx y z : ℝ\nhx : 0 < x\nhz : 0 < z\nhxy : x < y\nhyz : y < z\nhy : 0 < y\nh : 0 < z - y\nhyz' : 0 < z / y\nhyz'' : z / y ≠ 1\n⊢ log z - log y < y⁻¹ * (z - y)\n[PROOFSTEP]\ncalc\n  log z - log y = log (z / y) := by rw [← log_div hz.ne' hy.ne']\n  _ < z / y - 1 := (log_lt_sub_one_of_pos hyz' hyz'')\n  _ = y⁻¹ * (z - y) := by field_simp [hy.ne']\n[GOAL]\nx y z : ℝ\nhx : 0 < x\nhz : 0 < z\nhxy : x < y\nhyz : y < z\nhy : 0 < y\nh : 0 < z - y\nhyz' : 0 < z / y\nhyz'' : z / y ≠ 1\n⊢ log z - log y = log (z / y)\n[PROOFSTEP]\nrw [← log_div hz.ne' hy.ne']\n[GOAL]\nx y z : ℝ\nhx : 0 < x\nhz : 0 < z\nhxy : x < y\nhyz : y < z\nhy : 0 < y\nh : 0 < z - y\nhyz' : 0 < z / y\nhyz'' : z / y ≠ 1\n⊢ z / y - 1 = y⁻¹ * (z - y)\n[PROOFSTEP]\nfield_simp [hy.ne']\n[GOAL]\nx y z : ℝ\nhx : 0 < x\nhz : 0 < z\nhxy : x < y\nhyz : y < z\nhy : 0 < y\n⊢ y⁻¹ < (log y - log x) / (y - x)\n[PROOFSTEP]\nhave h : 0 < y - x := by linarith\n[GOAL]\nx y z : ℝ\nhx : 0 < x\nhz : 0 < z\nhxy : x < y\nhyz : y < z\nhy : 0 < y\n⊢ 0 < y - x\n[PROOFSTEP]\nlinarith\n[GOAL]\nx y z : ℝ\nhx : 0 < x\nhz : 0 < z\nhxy : x < y\nhyz : y < z\nhy : 0 < y\nh : 0 < y - x\n⊢ y⁻¹ < (log y - log x) / (y - x)\n[PROOFSTEP]\nrw [lt_div_iff h]\n[GOAL]\nx y z : ℝ\nhx : 0 < x\nhz : 0 < z\nhxy : x < y\nhyz : y < z\nhy : 0 < y\nh : 0 < y - x\n⊢ y⁻¹ * (y - x) < log y - log x\n[PROOFSTEP]\nhave hxy' : 0 < x / y := by positivity\n[GOAL]\nx y z : ℝ\nhx : 0 < x\nhz : 0 < z\nhxy : x < y\nhyz : y < z\nhy : 0 < y\nh : 0 < y - x\n⊢ 0 < x / y\n[PROOFSTEP]\npositivity\n[GOAL]\nx y z : ℝ\nhx : 0 < x\nhz : 0 < z\nhxy : x < y\nhyz : y < z\nhy : 0 < y\nh : 0 < y - x\nhxy' : 0 < x / y\n⊢ y⁻¹ * (y - x) < log y - log x\n[PROOFSTEP]\nhave hxy'' : x / y ≠ 1 := by\n  contrapose! h\n  rw [div_eq_one_iff_eq hy.ne'] at h \n  simp [h]\n[GOAL]\nx y z : ℝ\nhx : 0 < x\nhz : 0 < z\nhxy : x < y\nhyz : y < z\nhy : 0 < y\nh : 0 < y - x\nhxy' : 0 < x / y\n⊢ x / y ≠ 1\n[PROOFSTEP]\ncontrapose! h\n[GOAL]\nx y z : ℝ\nhx : 0 < x\nhz : 0 < z\nhxy : x < y\nhyz : y < z\nhy : 0 < y\nhxy' : 0 < x / y\nh : x / y = 1\n⊢ y - x ≤ 0\n[PROOFSTEP]\nrw [div_eq_one_iff_eq hy.ne'] at h \n[GOAL]\nx y z : ℝ\nhx : 0 < x\nhz : 0 < z\nhxy : x < y\nhyz : y < z\nhy : 0 < y\nhxy' : 0 < x / y\nh : x = y\n⊢ y - x ≤ 0\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nx y z : ℝ\nhx : 0 < x\nhz : 0 < z\nhxy : x < y\nhyz : y < z\nhy : 0 < y\nh : 0 < y - x\nhxy' : 0 < x / y\nhxy'' : x / y ≠ 1\n⊢ y⁻¹ * (y - x) < log y - log x\n[PROOFSTEP]\ncalc\n  y⁻¹ * (y - x) = 1 - x / y := by field_simp [hy.ne']\n  _ < -log (x / y) := by linarith [log_lt_sub_one_of_pos hxy' hxy'']\n  _ = -(log x - log y) := by rw [log_div hx.ne' hy.ne']\n  _ = log y - log x := by ring\n[GOAL]\nx y z : ℝ\nhx : 0 < x\nhz : 0 < z\nhxy : x < y\nhyz : y < z\nhy : 0 < y\nh : 0 < y - x\nhxy' : 0 < x / y\nhxy'' : x / y ≠ 1\n⊢ y⁻¹ * (y - x) = 1 - x / y\n[PROOFSTEP]\nfield_simp [hy.ne']\n[GOAL]\nx y z : ℝ\nhx : 0 < x\nhz : 0 < z\nhxy : x < y\nhyz : y < z\nhy : 0 < y\nh : 0 < y - x\nhxy' : 0 < x / y\nhxy'' : x / y ≠ 1\n⊢ 1 - x / y < -log (x / y)\n[PROOFSTEP]\nlinarith [log_lt_sub_one_of_pos hxy' hxy'']\n[GOAL]\nx y z : ℝ\nhx : 0 < x\nhz : 0 < z\nhxy : x < y\nhyz : y < z\nhy : 0 < y\nh : 0 < y - x\nhxy' : 0 < x / y\nhxy'' : x / y ≠ 1\n⊢ -log (x / y) = -(log x - log y)\n[PROOFSTEP]\nrw [log_div hx.ne' hy.ne']\n[GOAL]\nx y z : ℝ\nhx : 0 < x\nhz : 0 < z\nhxy : x < y\nhyz : y < z\nhy : 0 < y\nh : 0 < y - x\nhxy' : 0 < x / y\nhxy'' : x / y ≠ 1\n⊢ -(log x - log y) = log y - log x\n[PROOFSTEP]\nring\n[GOAL]\ns : ℝ\nhs : -1 ≤ s\nhs' : s ≠ 0\np : ℝ\nhp : 1 < p\n⊢ 1 + p * s < (1 + s) ^ p\n[PROOFSTEP]\nrcases eq_or_lt_of_le hs with (rfl | hs)\n[GOAL]\ncase inl\np : ℝ\nhp : 1 < p\nhs : -1 ≤ -1\nhs' : -1 ≠ 0\n⊢ 1 + p * -1 < (1 + -1) ^ p\n[PROOFSTEP]\nhave : p ≠ 0 := by positivity\n[GOAL]\np : ℝ\nhp : 1 < p\nhs : -1 ≤ -1\nhs' : -1 ≠ 0\n⊢ p ≠ 0\n[PROOFSTEP]\npositivity\n[GOAL]\ncase inl\np : ℝ\nhp : 1 < p\nhs : -1 ≤ -1\nhs' : -1 ≠ 0\nthis : p ≠ 0\n⊢ 1 + p * -1 < (1 + -1) ^ p\n[PROOFSTEP]\nsimpa [zero_rpow this]\n[GOAL]\ncase inr\ns : ℝ\nhs✝ : -1 ≤ s\nhs' : s ≠ 0\np : ℝ\nhp : 1 < p\nhs : -1 < s\n⊢ 1 + p * s < (1 + s) ^ p\n[PROOFSTEP]\nhave hs1 : 0 < 1 + s := by linarith\n[GOAL]\ns : ℝ\nhs✝ : -1 ≤ s\nhs' : s ≠ 0\np : ℝ\nhp : 1 < p\nhs : -1 < s\n⊢ 0 < 1 + s\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase inr\ns : ℝ\nhs✝ : -1 ≤ s\nhs' : s ≠ 0\np : ℝ\nhp : 1 < p\nhs : -1 < s\nhs1 : 0 < 1 + s\n⊢ 1 + p * s < (1 + s) ^ p\n[PROOFSTEP]\ncases' le_or_lt (1 + p * s) 0 with hs2 hs2\n[GOAL]\ncase inr.inl\ns : ℝ\nhs✝ : -1 ≤ s\nhs' : s ≠ 0\np : ℝ\nhp : 1 < p\nhs : -1 < s\nhs1 : 0 < 1 + s\nhs2 : 1 + p * s ≤ 0\n⊢ 1 + p * s < (1 + s) ^ p\n[PROOFSTEP]\nexact hs2.trans_lt (rpow_pos_of_pos hs1 _)\n[GOAL]\ncase inr.inr\ns : ℝ\nhs✝ : -1 ≤ s\nhs' : s ≠ 0\np : ℝ\nhp : 1 < p\nhs : -1 < s\nhs1 : 0 < 1 + s\nhs2 : 0 < 1 + p * s\n⊢ 1 + p * s < (1 + s) ^ p\n[PROOFSTEP]\nrw [rpow_def_of_pos hs1, ← exp_log hs2]\n[GOAL]\ncase inr.inr\ns : ℝ\nhs✝ : -1 ≤ s\nhs' : s ≠ 0\np : ℝ\nhp : 1 < p\nhs : -1 < s\nhs1 : 0 < 1 + s\nhs2 : 0 < 1 + p * s\n⊢ exp (log (1 + p * s)) < exp (log (1 + s) * p)\n[PROOFSTEP]\napply exp_strictMono\n[GOAL]\ncase inr.inr.a\ns : ℝ\nhs✝ : -1 ≤ s\nhs' : s ≠ 0\np : ℝ\nhp : 1 < p\nhs : -1 < s\nhs1 : 0 < 1 + s\nhs2 : 0 < 1 + p * s\n⊢ log (1 + p * s) < log (1 + s) * p\n[PROOFSTEP]\nhave hp : 0 < p := by positivity\n[GOAL]\ns : ℝ\nhs✝ : -1 ≤ s\nhs' : s ≠ 0\np : ℝ\nhp : 1 < p\nhs : -1 < s\nhs1 : 0 < 1 + s\nhs2 : 0 < 1 + p * s\n⊢ 0 < p\n[PROOFSTEP]\npositivity\n[GOAL]\ncase inr.inr.a\ns : ℝ\nhs✝ : -1 ≤ s\nhs' : s ≠ 0\np : ℝ\nhp✝ : 1 < p\nhs : -1 < s\nhs1 : 0 < 1 + s\nhs2 : 0 < 1 + p * s\nhp : 0 < p\n⊢ log (1 + p * s) < log (1 + s) * p\n[PROOFSTEP]\nhave hs3 : 1 + s ≠ 1 := by contrapose! hs'; linarith\n[GOAL]\ns : ℝ\nhs✝ : -1 ≤ s\nhs' : s ≠ 0\np : ℝ\nhp✝ : 1 < p\nhs : -1 < s\nhs1 : 0 < 1 + s\nhs2 : 0 < 1 + p * s\nhp : 0 < p\n⊢ 1 + s ≠ 1\n[PROOFSTEP]\ncontrapose! hs'\n[GOAL]\ns : ℝ\nhs✝ : -1 ≤ s\np : ℝ\nhp✝ : 1 < p\nhs : -1 < s\nhs1 : 0 < 1 + s\nhs2 : 0 < 1 + p * s\nhp : 0 < p\nhs' : 1 + s = 1\n⊢ s = 0\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase inr.inr.a\ns : ℝ\nhs✝ : -1 ≤ s\nhs' : s ≠ 0\np : ℝ\nhp✝ : 1 < p\nhs : -1 < s\nhs1 : 0 < 1 + s\nhs2 : 0 < 1 + p * s\nhp : 0 < p\nhs3 : 1 + s ≠ 1\n⊢ log (1 + p * s) < log (1 + s) * p\n[PROOFSTEP]\nhave hs4 : 1 + p * s ≠ 1 := by contrapose! hs'; nlinarith\n[GOAL]\ns : ℝ\nhs✝ : -1 ≤ s\nhs' : s ≠ 0\np : ℝ\nhp✝ : 1 < p\nhs : -1 < s\nhs1 : 0 < 1 + s\nhs2 : 0 < 1 + p * s\nhp : 0 < p\nhs3 : 1 + s ≠ 1\n⊢ 1 + p * s ≠ 1\n[PROOFSTEP]\ncontrapose! hs'\n[GOAL]\ns : ℝ\nhs✝ : -1 ≤ s\np : ℝ\nhp✝ : 1 < p\nhs : -1 < s\nhs1 : 0 < 1 + s\nhs2 : 0 < 1 + p * s\nhp : 0 < p\nhs3 : 1 + s ≠ 1\nhs' : 1 + p * s = 1\n⊢ s = 0\n[PROOFSTEP]\nnlinarith\n[GOAL]\ncase inr.inr.a\ns : ℝ\nhs✝ : -1 ≤ s\nhs' : s ≠ 0\np : ℝ\nhp✝ : 1 < p\nhs : -1 < s\nhs1 : 0 < 1 + s\nhs2 : 0 < 1 + p * s\nhp : 0 < p\nhs3 : 1 + s ≠ 1\nhs4 : 1 + p * s ≠ 1\n⊢ log (1 + p * s) < log (1 + s) * p\n[PROOFSTEP]\ncases' lt_or_gt_of_ne hs' with hs' hs'\n[GOAL]\ncase inr.inr.a.inl\ns : ℝ\nhs✝ : -1 ≤ s\nhs'✝ : s ≠ 0\np : ℝ\nhp✝ : 1 < p\nhs : -1 < s\nhs1 : 0 < 1 + s\nhs2 : 0 < 1 + p * s\nhp : 0 < p\nhs3 : 1 + s ≠ 1\nhs4 : 1 + p * s ≠ 1\nhs' : s < 0\n⊢ log (1 + p * s) < log (1 + s) * p\n[PROOFSTEP]\nrw [← div_lt_iff hp, ← div_lt_div_right_of_neg hs']\n  -- Porting note: previously we could write `zero_lt_one` inline,\n      -- but now Lean doesn't guess we are talking about `1` fast enough.\n[GOAL]\ncase inr.inr.a.inl\ns : ℝ\nhs✝ : -1 ≤ s\nhs'✝ : s ≠ 0\np : ℝ\nhp✝ : 1 < p\nhs : -1 < s\nhs1 : 0 < 1 + s\nhs2 : 0 < 1 + p * s\nhp : 0 < p\nhs3 : 1 + s ≠ 1\nhs4 : 1 + p * s ≠ 1\nhs' : s < 0\n⊢ log (1 + s) / s < log (1 + p * s) / p / s\n[PROOFSTEP]\nhaveI : (1 : ℝ) ∈ Ioi 0 := zero_lt_one\n[GOAL]\ncase inr.inr.a.inl\ns : ℝ\nhs✝ : -1 ≤ s\nhs'✝ : s ≠ 0\np : ℝ\nhp✝ : 1 < p\nhs : -1 < s\nhs1 : 0 < 1 + s\nhs2 : 0 < 1 + p * s\nhp : 0 < p\nhs3 : 1 + s ≠ 1\nhs4 : 1 + p * s ≠ 1\nhs' : s < 0\nthis : 1 ∈ Ioi 0\n⊢ log (1 + s) / s < log (1 + p * s) / p / s\n[PROOFSTEP]\nconvert strictConcaveOn_log_Ioi.secant_strict_mono this hs2 hs1 hs4 hs3 _ using 1\n[GOAL]\ncase h.e'_3\ns : ℝ\nhs✝ : -1 ≤ s\nhs'✝ : s ≠ 0\np : ℝ\nhp✝ : 1 < p\nhs : -1 < s\nhs1 : 0 < 1 + s\nhs2 : 0 < 1 + p * s\nhp : 0 < p\nhs3 : 1 + s ≠ 1\nhs4 : 1 + p * s ≠ 1\nhs' : s < 0\nthis : 1 ∈ Ioi 0\n⊢ log (1 + s) / s = (log (1 + s) - log 1) / (1 + s - 1)\n[PROOFSTEP]\nfield_simp [log_one]\n[GOAL]\ncase h.e'_4\ns : ℝ\nhs✝ : -1 ≤ s\nhs'✝ : s ≠ 0\np : ℝ\nhp✝ : 1 < p\nhs : -1 < s\nhs1 : 0 < 1 + s\nhs2 : 0 < 1 + p * s\nhp : 0 < p\nhs3 : 1 + s ≠ 1\nhs4 : 1 + p * s ≠ 1\nhs' : s < 0\nthis : 1 ∈ Ioi 0\n⊢ log (1 + p * s) / p / s = (log (1 + p * s) - log 1) / (1 + p * s - 1)\n[PROOFSTEP]\nfield_simp [log_one]\n[GOAL]\ncase inr.inr.a.inl\ns : ℝ\nhs✝ : -1 ≤ s\nhs'✝ : s ≠ 0\np : ℝ\nhp✝ : 1 < p\nhs : -1 < s\nhs1 : 0 < 1 + s\nhs2 : 0 < 1 + p * s\nhp : 0 < p\nhs3 : 1 + s ≠ 1\nhs4 : 1 + p * s ≠ 1\nhs' : s < 0\nthis : 1 ∈ Ioi 0\n⊢ 1 + p * s < 1 + s\n[PROOFSTEP]\nnlinarith\n[GOAL]\ncase inr.inr.a.inr\ns : ℝ\nhs✝ : -1 ≤ s\nhs'✝ : s ≠ 0\np : ℝ\nhp✝ : 1 < p\nhs : -1 < s\nhs1 : 0 < 1 + s\nhs2 : 0 < 1 + p * s\nhp : 0 < p\nhs3 : 1 + s ≠ 1\nhs4 : 1 + p * s ≠ 1\nhs' : s > 0\n⊢ log (1 + p * s) < log (1 + s) * p\n[PROOFSTEP]\nrw [← div_lt_iff hp, ← div_lt_div_right hs']\n  -- Porting note: previously we could write `zero_lt_one` inline,\n      -- but now Lean doesn't guess we are talking about `1` fast enough.\n[GOAL]\ncase inr.inr.a.inr\ns : ℝ\nhs✝ : -1 ≤ s\nhs'✝ : s ≠ 0\np : ℝ\nhp✝ : 1 < p\nhs : -1 < s\nhs1 : 0 < 1 + s\nhs2 : 0 < 1 + p * s\nhp : 0 < p\nhs3 : 1 + s ≠ 1\nhs4 : 1 + p * s ≠ 1\nhs' : s > 0\n⊢ log (1 + p * s) / p / s < log (1 + s) / s\n[PROOFSTEP]\nhaveI : (1 : ℝ) ∈ Ioi 0 := zero_lt_one\n[GOAL]\ncase inr.inr.a.inr\ns : ℝ\nhs✝ : -1 ≤ s\nhs'✝ : s ≠ 0\np : ℝ\nhp✝ : 1 < p\nhs : -1 < s\nhs1 : 0 < 1 + s\nhs2 : 0 < 1 + p * s\nhp : 0 < p\nhs3 : 1 + s ≠ 1\nhs4 : 1 + p * s ≠ 1\nhs' : s > 0\nthis : 1 ∈ Ioi 0\n⊢ log (1 + p * s) / p / s < log (1 + s) / s\n[PROOFSTEP]\nconvert strictConcaveOn_log_Ioi.secant_strict_mono this hs1 hs2 hs3 hs4 _ using 1\n[GOAL]\ncase h.e'_3\ns : ℝ\nhs✝ : -1 ≤ s\nhs'✝ : s ≠ 0\np : ℝ\nhp✝ : 1 < p\nhs : -1 < s\nhs1 : 0 < 1 + s\nhs2 : 0 < 1 + p * s\nhp : 0 < p\nhs3 : 1 + s ≠ 1\nhs4 : 1 + p * s ≠ 1\nhs' : s > 0\nthis : 1 ∈ Ioi 0\n⊢ log (1 + p * s) / p / s = (log (1 + p * s) - log 1) / (1 + p * s - 1)\n[PROOFSTEP]\nfield_simp [log_one, hp.ne']\n[GOAL]\ncase h.e'_4\ns : ℝ\nhs✝ : -1 ≤ s\nhs'✝ : s ≠ 0\np : ℝ\nhp✝ : 1 < p\nhs : -1 < s\nhs1 : 0 < 1 + s\nhs2 : 0 < 1 + p * s\nhp : 0 < p\nhs3 : 1 + s ≠ 1\nhs4 : 1 + p * s ≠ 1\nhs' : s > 0\nthis : 1 ∈ Ioi 0\n⊢ log (1 + s) / s = (log (1 + s) - log 1) / (1 + s - 1)\n[PROOFSTEP]\nfield_simp [log_one]\n[GOAL]\ncase inr.inr.a.inr\ns : ℝ\nhs✝ : -1 ≤ s\nhs'✝ : s ≠ 0\np : ℝ\nhp✝ : 1 < p\nhs : -1 < s\nhs1 : 0 < 1 + s\nhs2 : 0 < 1 + p * s\nhp : 0 < p\nhs3 : 1 + s ≠ 1\nhs4 : 1 + p * s ≠ 1\nhs' : s > 0\nthis : 1 ∈ Ioi 0\n⊢ 1 + s < 1 + p * s\n[PROOFSTEP]\nnlinarith\n[GOAL]\ns : ℝ\nhs : -1 ≤ s\np : ℝ\nhp : 1 ≤ p\n⊢ 1 + p * s ≤ (1 + s) ^ p\n[PROOFSTEP]\nrcases eq_or_lt_of_le hp with (rfl | hp)\n[GOAL]\ncase inl\ns : ℝ\nhs : -1 ≤ s\nhp : 1 ≤ 1\n⊢ 1 + 1 * s ≤ (1 + s) ^ 1\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\ns : ℝ\nhs : -1 ≤ s\np : ℝ\nhp✝ : 1 ≤ p\nhp : 1 < p\n⊢ 1 + p * s ≤ (1 + s) ^ p\n[PROOFSTEP]\nby_cases hs' : s = 0\n[GOAL]\ncase pos\ns : ℝ\nhs : -1 ≤ s\np : ℝ\nhp✝ : 1 ≤ p\nhp : 1 < p\nhs' : s = 0\n⊢ 1 + p * s ≤ (1 + s) ^ p\n[PROOFSTEP]\nsimp [hs']\n[GOAL]\ncase neg\ns : ℝ\nhs : -1 ≤ s\np : ℝ\nhp✝ : 1 ≤ p\nhp : 1 < p\nhs' : ¬s = 0\n⊢ 1 + p * s ≤ (1 + s) ^ p\n[PROOFSTEP]\nexact (one_add_mul_self_lt_rpow_one_add hs hs' hp).le\n[GOAL]\np : ℝ\nhp : 1 < p\n⊢ StrictConvexOn ℝ (Ici 0) fun x => x ^ p\n[PROOFSTEP]\napply strictConvexOn_of_slope_strict_mono_adjacent (convex_Ici (0 : ℝ))\n[GOAL]\np : ℝ\nhp : 1 < p\n⊢ ∀ {x y z : ℝ}, x ∈ Ici 0 → z ∈ Ici 0 → x < y → y < z → (y ^ p - x ^ p) / (y - x) < (z ^ p - y ^ p) / (z - y)\n[PROOFSTEP]\nrintro x y z (hx : 0 ≤ x) (hz : 0 ≤ z) hxy hyz\n[GOAL]\np : ℝ\nhp : 1 < p\nx y z : ℝ\nhx : 0 ≤ x\nhz : 0 ≤ z\nhxy : x < y\nhyz : y < z\n⊢ (y ^ p - x ^ p) / (y - x) < (z ^ p - y ^ p) / (z - y)\n[PROOFSTEP]\nhave hy : 0 < y := by linarith\n[GOAL]\np : ℝ\nhp : 1 < p\nx y z : ℝ\nhx : 0 ≤ x\nhz : 0 ≤ z\nhxy : x < y\nhyz : y < z\n⊢ 0 < y\n[PROOFSTEP]\nlinarith\n[GOAL]\np : ℝ\nhp : 1 < p\nx y z : ℝ\nhx : 0 ≤ x\nhz : 0 ≤ z\nhxy : x < y\nhyz : y < z\nhy : 0 < y\n⊢ (y ^ p - x ^ p) / (y - x) < (z ^ p - y ^ p) / (z - y)\n[PROOFSTEP]\nhave hy' : 0 < y ^ p := rpow_pos_of_pos hy _\n[GOAL]\np : ℝ\nhp : 1 < p\nx y z : ℝ\nhx : 0 ≤ x\nhz : 0 ≤ z\nhxy : x < y\nhyz : y < z\nhy : 0 < y\nhy' : 0 < y ^ p\n⊢ (y ^ p - x ^ p) / (y - x) < (z ^ p - y ^ p) / (z - y)\n[PROOFSTEP]\nhave H1 : y ^ (p - 1 + 1) = y ^ (p - 1) * y := rpow_add_one hy.ne' _\n[GOAL]\np : ℝ\nhp : 1 < p\nx y z : ℝ\nhx : 0 ≤ x\nhz : 0 ≤ z\nhxy : x < y\nhyz : y < z\nhy : 0 < y\nhy' : 0 < y ^ p\nH1 : y ^ (p - 1 + 1) = y ^ (p - 1) * y\n⊢ (y ^ p - x ^ p) / (y - x) < (z ^ p - y ^ p) / (z - y)\n[PROOFSTEP]\nring_nf at H1 \n[GOAL]\np : ℝ\nhp : 1 < p\nx y z : ℝ\nhx : 0 ≤ x\nhz : 0 ≤ z\nhxy : x < y\nhyz : y < z\nhy : 0 < y\nhy' : 0 < y ^ p\nH1 : y ^ p = y ^ (-1 + p) * y\n⊢ (y ^ p - x ^ p) / (y - x) < (z ^ p - y ^ p) / (z - y)\n[PROOFSTEP]\ntrans p * y ^ (p - 1)\n[GOAL]\np : ℝ\nhp : 1 < p\nx y z : ℝ\nhx : 0 ≤ x\nhz : 0 ≤ z\nhxy : x < y\nhyz : y < z\nhy : 0 < y\nhy' : 0 < y ^ p\nH1 : y ^ p = y ^ (-1 + p) * y\n⊢ (y ^ p - x ^ p) / (y - x) < p * y ^ (p - 1)\n[PROOFSTEP]\nhave h3 : 0 < y - x := by linarith only [hxy]\n[GOAL]\np : ℝ\nhp : 1 < p\nx y z : ℝ\nhx : 0 ≤ x\nhz : 0 ≤ z\nhxy : x < y\nhyz : y < z\nhy : 0 < y\nhy' : 0 < y ^ p\nH1 : y ^ p = y ^ (-1 + p) * y\n⊢ 0 < y - x\n[PROOFSTEP]\nlinarith only [hxy]\n[GOAL]\np : ℝ\nhp : 1 < p\nx y z : ℝ\nhx : 0 ≤ x\nhz : 0 ≤ z\nhxy : x < y\nhyz : y < z\nhy : 0 < y\nhy' : 0 < y ^ p\nH1 : y ^ p = y ^ (-1 + p) * y\nh3 : 0 < y - x\n⊢ (y ^ p - x ^ p) / (y - x) < p * y ^ (p - 1)\n[PROOFSTEP]\nhave hyx'' : x / y < 1 := by rwa [div_lt_one hy]\n[GOAL]\np : ℝ\nhp : 1 < p\nx y z : ℝ\nhx : 0 ≤ x\nhz : 0 ≤ z\nhxy : x < y\nhyz : y < z\nhy : 0 < y\nhy' : 0 < y ^ p\nH1 : y ^ p = y ^ (-1 + p) * y\nh3 : 0 < y - x\n⊢ x / y < 1\n[PROOFSTEP]\nrwa [div_lt_one hy]\n[GOAL]\np : ℝ\nhp : 1 < p\nx y z : ℝ\nhx : 0 ≤ x\nhz : 0 ≤ z\nhxy : x < y\nhyz : y < z\nhy : 0 < y\nhy' : 0 < y ^ p\nH1 : y ^ p = y ^ (-1 + p) * y\nh3 : 0 < y - x\nhyx'' : x / y < 1\n⊢ (y ^ p - x ^ p) / (y - x) < p * y ^ (p - 1)\n[PROOFSTEP]\nhave hyx''' : x / y - 1 < 0 := by linarith only [hyx'']\n[GOAL]\np : ℝ\nhp : 1 < p\nx y z : ℝ\nhx : 0 ≤ x\nhz : 0 ≤ z\nhxy : x < y\nhyz : y < z\nhy : 0 < y\nhy' : 0 < y ^ p\nH1 : y ^ p = y ^ (-1 + p) * y\nh3 : 0 < y - x\nhyx'' : x / y < 1\n⊢ x / y - 1 < 0\n[PROOFSTEP]\nlinarith only [hyx'']\n[GOAL]\np : ℝ\nhp : 1 < p\nx y z : ℝ\nhx : 0 ≤ x\nhz : 0 ≤ z\nhxy : x < y\nhyz : y < z\nhy : 0 < y\nhy' : 0 < y ^ p\nH1 : y ^ p = y ^ (-1 + p) * y\nh3 : 0 < y - x\nhyx'' : x / y < 1\nhyx''' : x / y - 1 < 0\n⊢ (y ^ p - x ^ p) / (y - x) < p * y ^ (p - 1)\n[PROOFSTEP]\nhave hyx'''' : 0 ≤ x / y := by positivity\n[GOAL]\np : ℝ\nhp : 1 < p\nx y z : ℝ\nhx : 0 ≤ x\nhz : 0 ≤ z\nhxy : x < y\nhyz : y < z\nhy : 0 < y\nhy' : 0 < y ^ p\nH1 : y ^ p = y ^ (-1 + p) * y\nh3 : 0 < y - x\nhyx'' : x / y < 1\nhyx''' : x / y - 1 < 0\n⊢ 0 ≤ x / y\n[PROOFSTEP]\npositivity\n[GOAL]\np : ℝ\nhp : 1 < p\nx y z : ℝ\nhx : 0 ≤ x\nhz : 0 ≤ z\nhxy : x < y\nhyz : y < z\nhy : 0 < y\nhy' : 0 < y ^ p\nH1 : y ^ p = y ^ (-1 + p) * y\nh3 : 0 < y - x\nhyx'' : x / y < 1\nhyx''' : x / y - 1 < 0\nhyx'''' : 0 ≤ x / y\n⊢ (y ^ p - x ^ p) / (y - x) < p * y ^ (p - 1)\n[PROOFSTEP]\nhave hyx''''' : -1 ≤ x / y - 1 := by linarith only [hyx'''']\n[GOAL]\np : ℝ\nhp : 1 < p\nx y z : ℝ\nhx : 0 ≤ x\nhz : 0 ≤ z\nhxy : x < y\nhyz : y < z\nhy : 0 < y\nhy' : 0 < y ^ p\nH1 : y ^ p = y ^ (-1 + p) * y\nh3 : 0 < y - x\nhyx'' : x / y < 1\nhyx''' : x / y - 1 < 0\nhyx'''' : 0 ≤ x / y\n⊢ -1 ≤ x / y - 1\n[PROOFSTEP]\nlinarith only [hyx'''']\n[GOAL]\np : ℝ\nhp : 1 < p\nx y z : ℝ\nhx : 0 ≤ x\nhz : 0 ≤ z\nhxy : x < y\nhyz : y < z\nhy : 0 < y\nhy' : 0 < y ^ p\nH1 : y ^ p = y ^ (-1 + p) * y\nh3 : 0 < y - x\nhyx'' : x / y < 1\nhyx''' : x / y - 1 < 0\nhyx'''' : 0 ≤ x / y\nhyx''''' : -1 ≤ x / y - 1\n⊢ (y ^ p - x ^ p) / (y - x) < p * y ^ (p - 1)\n[PROOFSTEP]\nhave : 1 - (1 + (x / y - 1)) ^ p < -p * (x / y - 1) := by\n  linarith [one_add_mul_self_lt_rpow_one_add hyx''''' hyx'''.ne hp]\n[GOAL]\np : ℝ\nhp : 1 < p\nx y z : ℝ\nhx : 0 ≤ x\nhz : 0 ≤ z\nhxy : x < y\nhyz : y < z\nhy : 0 < y\nhy' : 0 < y ^ p\nH1 : y ^ p = y ^ (-1 + p) * y\nh3 : 0 < y - x\nhyx'' : x / y < 1\nhyx''' : x / y - 1 < 0\nhyx'''' : 0 ≤ x / y\nhyx''''' : -1 ≤ x / y - 1\n⊢ 1 - (1 + (x / y - 1)) ^ p < -p * (x / y - 1)\n[PROOFSTEP]\nlinarith [one_add_mul_self_lt_rpow_one_add hyx''''' hyx'''.ne hp]\n[GOAL]\np : ℝ\nhp : 1 < p\nx y z : ℝ\nhx : 0 ≤ x\nhz : 0 ≤ z\nhxy : x < y\nhyz : y < z\nhy : 0 < y\nhy' : 0 < y ^ p\nH1 : y ^ p = y ^ (-1 + p) * y\nh3 : 0 < y - x\nhyx'' : x / y < 1\nhyx''' : x / y - 1 < 0\nhyx'''' : 0 ≤ x / y\nhyx''''' : -1 ≤ x / y - 1\nthis : 1 - (1 + (x / y - 1)) ^ p < -p * (x / y - 1)\n⊢ (y ^ p - x ^ p) / (y - x) < p * y ^ (p - 1)\n[PROOFSTEP]\nrw [div_lt_iff h3, ← div_lt_div_right hy']\n[GOAL]\np : ℝ\nhp : 1 < p\nx y z : ℝ\nhx : 0 ≤ x\nhz : 0 ≤ z\nhxy : x < y\nhyz : y < z\nhy : 0 < y\nhy' : 0 < y ^ p\nH1 : y ^ p = y ^ (-1 + p) * y\nh3 : 0 < y - x\nhyx'' : x / y < 1\nhyx''' : x / y - 1 < 0\nhyx'''' : 0 ≤ x / y\nhyx''''' : -1 ≤ x / y - 1\nthis : 1 - (1 + (x / y - 1)) ^ p < -p * (x / y - 1)\n⊢ (y ^ p - x ^ p) / y ^ p < p * y ^ (p - 1) * (y - x) / y ^ p\n[PROOFSTEP]\nconvert this using 1\n[GOAL]\ncase h.e'_3\np : ℝ\nhp : 1 < p\nx y z : ℝ\nhx : 0 ≤ x\nhz : 0 ≤ z\nhxy : x < y\nhyz : y < z\nhy : 0 < y\nhy' : 0 < y ^ p\nH1 : y ^ p = y ^ (-1 + p) * y\nh3 : 0 < y - x\nhyx'' : x / y < 1\nhyx''' : x / y - 1 < 0\nhyx'''' : 0 ≤ x / y\nhyx''''' : -1 ≤ x / y - 1\nthis : 1 - (1 + (x / y - 1)) ^ p < -p * (x / y - 1)\n⊢ (y ^ p - x ^ p) / y ^ p = 1 - (1 + (x / y - 1)) ^ p\n[PROOFSTEP]\nhave H : (x / y) ^ p = x ^ p / y ^ p := div_rpow hx hy.le _\n[GOAL]\ncase h.e'_3\np : ℝ\nhp : 1 < p\nx y z : ℝ\nhx : 0 ≤ x\nhz : 0 ≤ z\nhxy : x < y\nhyz : y < z\nhy : 0 < y\nhy' : 0 < y ^ p\nH1 : y ^ p = y ^ (-1 + p) * y\nh3 : 0 < y - x\nhyx'' : x / y < 1\nhyx''' : x / y - 1 < 0\nhyx'''' : 0 ≤ x / y\nhyx''''' : -1 ≤ x / y - 1\nthis : 1 - (1 + (x / y - 1)) ^ p < -p * (x / y - 1)\nH : (x / y) ^ p = x ^ p / y ^ p\n⊢ (y ^ p - x ^ p) / y ^ p = 1 - (1 + (x / y - 1)) ^ p\n[PROOFSTEP]\nring_nf at H ⊢\n[GOAL]\ncase h.e'_3\np : ℝ\nhp : 1 < p\nx y z : ℝ\nhx : 0 ≤ x\nhz : 0 ≤ z\nhxy : x < y\nhyz : y < z\nhy : 0 < y\nhy' : 0 < y ^ p\nH1 : y ^ p = y ^ (-1 + p) * y\nh3 : 0 < y - x\nhyx'' : x / y < 1\nhyx''' : x / y - 1 < 0\nhyx'''' : 0 ≤ x / y\nhyx''''' : -1 ≤ x / y - 1\nthis : 1 - (1 + (x / y - 1)) ^ p < -p * (x / y - 1)\nH : (x * y⁻¹) ^ p = x ^ p * (y ^ p)⁻¹\n⊢ -(x ^ p * (y ^ p)⁻¹) + y ^ p * (y ^ p)⁻¹ = 1 - (x * y⁻¹) ^ p\n[PROOFSTEP]\nfield_simp [hy.ne', hy'.ne'] at H ⊢\n[GOAL]\ncase h.e'_3\np : ℝ\nhp : 1 < p\nx y z : ℝ\nhx : 0 ≤ x\nhz : 0 ≤ z\nhxy : x < y\nhyz : y < z\nhy : 0 < y\nhy' : 0 < y ^ p\nH1 : y ^ p = y ^ (-1 + p) * y\nh3 : 0 < y - x\nhyx'' : x / y < 1\nhyx''' : x / y - 1 < 0\nhyx'''' : 0 ≤ x / y\nhyx''''' : -1 ≤ x / y - 1\nthis : 1 - (1 + (x / y - 1)) ^ p < -p * (x / y - 1)\nH : (x / y) ^ p * y ^ p = x ^ p\n⊢ -x ^ p + y ^ p = (1 - (x / y) ^ p) * y ^ p\n[PROOFSTEP]\nlinear_combination H\n[GOAL]\ncase h.e'_4\np : ℝ\nhp : 1 < p\nx y z : ℝ\nhx : 0 ≤ x\nhz : 0 ≤ z\nhxy : x < y\nhyz : y < z\nhy : 0 < y\nhy' : 0 < y ^ p\nH1 : y ^ p = y ^ (-1 + p) * y\nh3 : 0 < y - x\nhyx'' : x / y < 1\nhyx''' : x / y - 1 < 0\nhyx'''' : 0 ≤ x / y\nhyx''''' : -1 ≤ x / y - 1\nthis : 1 - (1 + (x / y - 1)) ^ p < -p * (x / y - 1)\n⊢ p * y ^ (p - 1) * (y - x) / y ^ p = -p * (x / y - 1)\n[PROOFSTEP]\nring_nf at H1 ⊢\n[GOAL]\ncase h.e'_4\np : ℝ\nhp : 1 < p\nx y z : ℝ\nhx : 0 ≤ x\nhz : 0 ≤ z\nhxy : x < y\nhyz : y < z\nhy : 0 < y\nhy' : 0 < y ^ p\nH1 : y ^ p = y ^ (-1 + p) * y\nh3 : 0 < y - x\nhyx'' : x / y < 1\nhyx''' : x / y - 1 < 0\nhyx'''' : 0 ≤ x / y\nhyx''''' : -1 ≤ x / y - 1\nthis : 1 - (1 + (x / y - 1)) ^ p < -p * (x / y - 1)\n⊢ p * y ^ (-1 + p) * y * (y ^ p)⁻¹ - p * y ^ (-1 + p) * x * (y ^ p)⁻¹ = p - p * x * y⁻¹\n[PROOFSTEP]\nfield_simp [hy.ne', hy'.ne']\n[GOAL]\ncase h.e'_4\np : ℝ\nhp : 1 < p\nx y z : ℝ\nhx : 0 ≤ x\nhz : 0 ≤ z\nhxy : x < y\nhyz : y < z\nhy : 0 < y\nhy' : 0 < y ^ p\nH1 : y ^ p = y ^ (-1 + p) * y\nh3 : 0 < y - x\nhyx'' : x / y < 1\nhyx''' : x / y - 1 < 0\nhyx'''' : 0 ≤ x / y\nhyx''''' : -1 ≤ x / y - 1\nthis : 1 - (1 + (x / y - 1)) ^ p < -p * (x / y - 1)\n⊢ (p * y ^ (-1 + p) * y - p * y ^ (-1 + p) * x) * y = (p * y - p * x) * y ^ p\n[PROOFSTEP]\nlinear_combination p * (-y + x) * H1\n[GOAL]\np : ℝ\nhp : 1 < p\nx y z : ℝ\nhx : 0 ≤ x\nhz : 0 ≤ z\nhxy : x < y\nhyz : y < z\nhy : 0 < y\nhy' : 0 < y ^ p\nH1 : y ^ p = y ^ (-1 + p) * y\n⊢ p * y ^ (p - 1) < (z ^ p - y ^ p) / (z - y)\n[PROOFSTEP]\nhave hyz' : 0 < z - y := by linarith only [hyz]\n[GOAL]\np : ℝ\nhp : 1 < p\nx y z : ℝ\nhx : 0 ≤ x\nhz : 0 ≤ z\nhxy : x < y\nhyz : y < z\nhy : 0 < y\nhy' : 0 < y ^ p\nH1 : y ^ p = y ^ (-1 + p) * y\n⊢ 0 < z - y\n[PROOFSTEP]\nlinarith only [hyz]\n[GOAL]\np : ℝ\nhp : 1 < p\nx y z : ℝ\nhx : 0 ≤ x\nhz : 0 ≤ z\nhxy : x < y\nhyz : y < z\nhy : 0 < y\nhy' : 0 < y ^ p\nH1 : y ^ p = y ^ (-1 + p) * y\nhyz' : 0 < z - y\n⊢ p * y ^ (p - 1) < (z ^ p - y ^ p) / (z - y)\n[PROOFSTEP]\nhave hyz'' : 1 < z / y := by rwa [one_lt_div hy]\n[GOAL]\np : ℝ\nhp : 1 < p\nx y z : ℝ\nhx : 0 ≤ x\nhz : 0 ≤ z\nhxy : x < y\nhyz : y < z\nhy : 0 < y\nhy' : 0 < y ^ p\nH1 : y ^ p = y ^ (-1 + p) * y\nhyz' : 0 < z - y\n⊢ 1 < z / y\n[PROOFSTEP]\nrwa [one_lt_div hy]\n[GOAL]\np : ℝ\nhp : 1 < p\nx y z : ℝ\nhx : 0 ≤ x\nhz : 0 ≤ z\nhxy : x < y\nhyz : y < z\nhy : 0 < y\nhy' : 0 < y ^ p\nH1 : y ^ p = y ^ (-1 + p) * y\nhyz' : 0 < z - y\nhyz'' : 1 < z / y\n⊢ p * y ^ (p - 1) < (z ^ p - y ^ p) / (z - y)\n[PROOFSTEP]\nhave hyz''' : 0 < z / y - 1 := by linarith only [hyz'']\n[GOAL]\np : ℝ\nhp : 1 < p\nx y z : ℝ\nhx : 0 ≤ x\nhz : 0 ≤ z\nhxy : x < y\nhyz : y < z\nhy : 0 < y\nhy' : 0 < y ^ p\nH1 : y ^ p = y ^ (-1 + p) * y\nhyz' : 0 < z - y\nhyz'' : 1 < z / y\n⊢ 0 < z / y - 1\n[PROOFSTEP]\nlinarith only [hyz'']\n[GOAL]\np : ℝ\nhp : 1 < p\nx y z : ℝ\nhx : 0 ≤ x\nhz : 0 ≤ z\nhxy : x < y\nhyz : y < z\nhy : 0 < y\nhy' : 0 < y ^ p\nH1 : y ^ p = y ^ (-1 + p) * y\nhyz' : 0 < z - y\nhyz'' : 1 < z / y\nhyz''' : 0 < z / y - 1\n⊢ p * y ^ (p - 1) < (z ^ p - y ^ p) / (z - y)\n[PROOFSTEP]\nhave hyz'''' : -1 ≤ z / y - 1 := by linarith only [hyz'']\n[GOAL]\np : ℝ\nhp : 1 < p\nx y z : ℝ\nhx : 0 ≤ x\nhz : 0 ≤ z\nhxy : x < y\nhyz : y < z\nhy : 0 < y\nhy' : 0 < y ^ p\nH1 : y ^ p = y ^ (-1 + p) * y\nhyz' : 0 < z - y\nhyz'' : 1 < z / y\nhyz''' : 0 < z / y - 1\n⊢ -1 ≤ z / y - 1\n[PROOFSTEP]\nlinarith only [hyz'']\n[GOAL]\np : ℝ\nhp : 1 < p\nx y z : ℝ\nhx : 0 ≤ x\nhz : 0 ≤ z\nhxy : x < y\nhyz : y < z\nhy : 0 < y\nhy' : 0 < y ^ p\nH1 : y ^ p = y ^ (-1 + p) * y\nhyz' : 0 < z - y\nhyz'' : 1 < z / y\nhyz''' : 0 < z / y - 1\nhyz'''' : -1 ≤ z / y - 1\n⊢ p * y ^ (p - 1) < (z ^ p - y ^ p) / (z - y)\n[PROOFSTEP]\nhave : p * (z / y - 1) < (1 + (z / y - 1)) ^ p - 1 := by\n  linarith [one_add_mul_self_lt_rpow_one_add hyz'''' hyz'''.ne' hp]\n[GOAL]\np : ℝ\nhp : 1 < p\nx y z : ℝ\nhx : 0 ≤ x\nhz : 0 ≤ z\nhxy : x < y\nhyz : y < z\nhy : 0 < y\nhy' : 0 < y ^ p\nH1 : y ^ p = y ^ (-1 + p) * y\nhyz' : 0 < z - y\nhyz'' : 1 < z / y\nhyz''' : 0 < z / y - 1\nhyz'''' : -1 ≤ z / y - 1\n⊢ p * (z / y - 1) < (1 + (z / y - 1)) ^ p - 1\n[PROOFSTEP]\nlinarith [one_add_mul_self_lt_rpow_one_add hyz'''' hyz'''.ne' hp]\n[GOAL]\np : ℝ\nhp : 1 < p\nx y z : ℝ\nhx : 0 ≤ x\nhz : 0 ≤ z\nhxy : x < y\nhyz : y < z\nhy : 0 < y\nhy' : 0 < y ^ p\nH1 : y ^ p = y ^ (-1 + p) * y\nhyz' : 0 < z - y\nhyz'' : 1 < z / y\nhyz''' : 0 < z / y - 1\nhyz'''' : -1 ≤ z / y - 1\nthis : p * (z / y - 1) < (1 + (z / y - 1)) ^ p - 1\n⊢ p * y ^ (p - 1) < (z ^ p - y ^ p) / (z - y)\n[PROOFSTEP]\nrw [lt_div_iff hyz', ← div_lt_div_right hy']\n[GOAL]\np : ℝ\nhp : 1 < p\nx y z : ℝ\nhx : 0 ≤ x\nhz : 0 ≤ z\nhxy : x < y\nhyz : y < z\nhy : 0 < y\nhy' : 0 < y ^ p\nH1 : y ^ p = y ^ (-1 + p) * y\nhyz' : 0 < z - y\nhyz'' : 1 < z / y\nhyz''' : 0 < z / y - 1\nhyz'''' : -1 ≤ z / y - 1\nthis : p * (z / y - 1) < (1 + (z / y - 1)) ^ p - 1\n⊢ p * y ^ (p - 1) * (z - y) / y ^ p < (z ^ p - y ^ p) / y ^ p\n[PROOFSTEP]\nconvert this using 1\n[GOAL]\ncase h.e'_3\np : ℝ\nhp : 1 < p\nx y z : ℝ\nhx : 0 ≤ x\nhz : 0 ≤ z\nhxy : x < y\nhyz : y < z\nhy : 0 < y\nhy' : 0 < y ^ p\nH1 : y ^ p = y ^ (-1 + p) * y\nhyz' : 0 < z - y\nhyz'' : 1 < z / y\nhyz''' : 0 < z / y - 1\nhyz'''' : -1 ≤ z / y - 1\nthis : p * (z / y - 1) < (1 + (z / y - 1)) ^ p - 1\n⊢ p * y ^ (p - 1) * (z - y) / y ^ p = p * (z / y - 1)\n[PROOFSTEP]\nring_nf at H1 ⊢\n[GOAL]\ncase h.e'_3\np : ℝ\nhp : 1 < p\nx y z : ℝ\nhx : 0 ≤ x\nhz : 0 ≤ z\nhxy : x < y\nhyz : y < z\nhy : 0 < y\nhy' : 0 < y ^ p\nH1 : y ^ p = y ^ (-1 + p) * y\nhyz' : 0 < z - y\nhyz'' : 1 < z / y\nhyz''' : 0 < z / y - 1\nhyz'''' : -1 ≤ z / y - 1\nthis : p * (z / y - 1) < (1 + (z / y - 1)) ^ p - 1\n⊢ -(p * y ^ (-1 + p) * y * (y ^ p)⁻¹) + p * y ^ (-1 + p) * z * (y ^ p)⁻¹ = -p + p * z * y⁻¹\n[PROOFSTEP]\nfield_simp [hy.ne', hy'.ne'] at H1 ⊢\n[GOAL]\ncase h.e'_3\np : ℝ\nhp : 1 < p\nx y z : ℝ\nhx : 0 ≤ x\nhz : 0 ≤ z\nhxy : x < y\nhyz : y < z\nhy : 0 < y\nhy' : 0 < y ^ p\nH1 : y ^ p = y ^ (-1 + p) * y\nhyz' : 0 < z - y\nhyz'' : 1 < z / y\nhyz''' : 0 < z / y - 1\nhyz'''' : -1 ≤ z / y - 1\nthis : p * (z / y - 1) < (1 + (z / y - 1)) ^ p - 1\n⊢ (-(p * y ^ (-1 + p) * y * y ^ p) + p * y ^ (-1 + p) * z * y ^ p) * y = (-(p * y) + p * z) * (y ^ p * y ^ p)\n[PROOFSTEP]\nlinear_combination p * (y - z) * y ^ p * H1\n[GOAL]\ncase h.e'_4\np : ℝ\nhp : 1 < p\nx y z : ℝ\nhx : 0 ≤ x\nhz : 0 ≤ z\nhxy : x < y\nhyz : y < z\nhy : 0 < y\nhy' : 0 < y ^ p\nH1 : y ^ p = y ^ (-1 + p) * y\nhyz' : 0 < z - y\nhyz'' : 1 < z / y\nhyz''' : 0 < z / y - 1\nhyz'''' : -1 ≤ z / y - 1\nthis : p * (z / y - 1) < (1 + (z / y - 1)) ^ p - 1\n⊢ (z ^ p - y ^ p) / y ^ p = (1 + (z / y - 1)) ^ p - 1\n[PROOFSTEP]\nhave H : (z / y) ^ p = z ^ p / y ^ p := div_rpow hz hy.le _\n[GOAL]\ncase h.e'_4\np : ℝ\nhp : 1 < p\nx y z : ℝ\nhx : 0 ≤ x\nhz : 0 ≤ z\nhxy : x < y\nhyz : y < z\nhy : 0 < y\nhy' : 0 < y ^ p\nH1 : y ^ p = y ^ (-1 + p) * y\nhyz' : 0 < z - y\nhyz'' : 1 < z / y\nhyz''' : 0 < z / y - 1\nhyz'''' : -1 ≤ z / y - 1\nthis : p * (z / y - 1) < (1 + (z / y - 1)) ^ p - 1\nH : (z / y) ^ p = z ^ p / y ^ p\n⊢ (z ^ p - y ^ p) / y ^ p = (1 + (z / y - 1)) ^ p - 1\n[PROOFSTEP]\nring_nf at H ⊢\n[GOAL]\ncase h.e'_4\np : ℝ\nhp : 1 < p\nx y z : ℝ\nhx : 0 ≤ x\nhz : 0 ≤ z\nhxy : x < y\nhyz : y < z\nhy : 0 < y\nhy' : 0 < y ^ p\nH1 : y ^ p = y ^ (-1 + p) * y\nhyz' : 0 < z - y\nhyz'' : 1 < z / y\nhyz''' : 0 < z / y - 1\nhyz'''' : -1 ≤ z / y - 1\nthis : p * (z / y - 1) < (1 + (z / y - 1)) ^ p - 1\nH : (z * y⁻¹) ^ p = z ^ p * (y ^ p)⁻¹\n⊢ z ^ p * (y ^ p)⁻¹ - y ^ p * (y ^ p)⁻¹ = -1 + (z * y⁻¹) ^ p\n[PROOFSTEP]\nfield_simp [hy.ne', hy'.ne'] at H ⊢\n[GOAL]\ncase h.e'_4\np : ℝ\nhp : 1 < p\nx y z : ℝ\nhx : 0 ≤ x\nhz : 0 ≤ z\nhxy : x < y\nhyz : y < z\nhy : 0 < y\nhy' : 0 < y ^ p\nH1 : y ^ p = y ^ (-1 + p) * y\nhyz' : 0 < z - y\nhyz'' : 1 < z / y\nhyz''' : 0 < z / y - 1\nhyz'''' : -1 ≤ z / y - 1\nthis : p * (z / y - 1) < (1 + (z / y - 1)) ^ p - 1\nH : (z / y) ^ p * y ^ p = z ^ p\n⊢ z ^ p - y ^ p = (-1 + (z / y) ^ p) * y ^ p\n[PROOFSTEP]\nlinear_combination -H\n[GOAL]\np : ℝ\nhp : 1 ≤ p\n⊢ ConvexOn ℝ (Ici 0) fun x => x ^ p\n[PROOFSTEP]\nrcases eq_or_lt_of_le hp with (rfl | hp)\n[GOAL]\ncase inl\nhp : 1 ≤ 1\n⊢ ConvexOn ℝ (Ici 0) fun x => x ^ 1\n[PROOFSTEP]\nsimpa using convexOn_id (convex_Ici _)\n[GOAL]\ncase inr\np : ℝ\nhp✝ : 1 ≤ p\nhp : 1 < p\n⊢ ConvexOn ℝ (Ici 0) fun x => x ^ p\n[PROOFSTEP]\nexact (strictConvexOn_rpow hp).convexOn\n[GOAL]\n⊢ StrictConcaveOn ℝ (Iio 0) log\n[PROOFSTEP]\nrefine' ⟨convex_Iio _, _⟩\n[GOAL]\n⊢ ∀ ⦃x : ℝ⦄,\n    x ∈ Iio 0 →\n      ∀ ⦃y : ℝ⦄,\n        y ∈ Iio 0 → x ≠ y → ∀ ⦃a b : ℝ⦄, 0 < a → 0 < b → a + b = 1 → a • log x + b • log y < log (a • x + b • y)\n[PROOFSTEP]\nrintro x (hx : x < 0) y (hy : y < 0) hxy a b ha hb hab\n[GOAL]\nx : ℝ\nhx : x < 0\ny : ℝ\nhy : y < 0\nhxy : x ≠ y\na b : ℝ\nha : 0 < a\nhb : 0 < b\nhab : a + b = 1\n⊢ a • log x + b • log y < log (a • x + b • y)\n[PROOFSTEP]\nhave hx' : 0 < -x := by linarith\n[GOAL]\nx : ℝ\nhx : x < 0\ny : ℝ\nhy : y < 0\nhxy : x ≠ y\na b : ℝ\nha : 0 < a\nhb : 0 < b\nhab : a + b = 1\n⊢ 0 < -x\n[PROOFSTEP]\nlinarith\n[GOAL]\nx : ℝ\nhx : x < 0\ny : ℝ\nhy : y < 0\nhxy : x ≠ y\na b : ℝ\nha : 0 < a\nhb : 0 < b\nhab : a + b = 1\nhx' : 0 < -x\n⊢ a • log x + b • log y < log (a • x + b • y)\n[PROOFSTEP]\nhave hy' : 0 < -y := by linarith\n[GOAL]\nx : ℝ\nhx : x < 0\ny : ℝ\nhy : y < 0\nhxy : x ≠ y\na b : ℝ\nha : 0 < a\nhb : 0 < b\nhab : a + b = 1\nhx' : 0 < -x\n⊢ 0 < -y\n[PROOFSTEP]\nlinarith\n[GOAL]\nx : ℝ\nhx : x < 0\ny : ℝ\nhy : y < 0\nhxy : x ≠ y\na b : ℝ\nha : 0 < a\nhb : 0 < b\nhab : a + b = 1\nhx' : 0 < -x\nhy' : 0 < -y\n⊢ a • log x + b • log y < log (a • x + b • y)\n[PROOFSTEP]\nhave hxy' : -x ≠ -y := by contrapose! hxy; linarith\n[GOAL]\nx : ℝ\nhx : x < 0\ny : ℝ\nhy : y < 0\nhxy : x ≠ y\na b : ℝ\nha : 0 < a\nhb : 0 < b\nhab : a + b = 1\nhx' : 0 < -x\nhy' : 0 < -y\n⊢ -x ≠ -y\n[PROOFSTEP]\ncontrapose! hxy\n[GOAL]\nx : ℝ\nhx : x < 0\ny : ℝ\nhy : y < 0\na b : ℝ\nha : 0 < a\nhb : 0 < b\nhab : a + b = 1\nhx' : 0 < -x\nhy' : 0 < -y\nhxy : -x = -y\n⊢ x = y\n[PROOFSTEP]\nlinarith\n[GOAL]\nx : ℝ\nhx : x < 0\ny : ℝ\nhy : y < 0\nhxy : x ≠ y\na b : ℝ\nha : 0 < a\nhb : 0 < b\nhab : a + b = 1\nhx' : 0 < -x\nhy' : 0 < -y\nhxy' : -x ≠ -y\n⊢ a • log x + b • log y < log (a • x + b • y)\n[PROOFSTEP]\ncalc\n  a • log x + b • log y = a • log (-x) + b • log (-y) := by simp_rw [log_neg_eq_log]\n  _ < log (a • -x + b • -y) := (strictConcaveOn_log_Ioi.2 hx' hy' hxy' ha hb hab)\n  _ = log (-(a • x + b • y)) := by congr 1; simp only [Algebra.id.smul_eq_mul]; ring\n  _ = _ := by rw [log_neg_eq_log]\n[GOAL]\nx : ℝ\nhx : x < 0\ny : ℝ\nhy : y < 0\nhxy : x ≠ y\na b : ℝ\nha : 0 < a\nhb : 0 < b\nhab : a + b = 1\nhx' : 0 < -x\nhy' : 0 < -y\nhxy' : -x ≠ -y\n⊢ a • log x + b • log y = a • log (-x) + b • log (-y)\n[PROOFSTEP]\nsimp_rw [log_neg_eq_log]\n[GOAL]\nx : ℝ\nhx : x < 0\ny : ℝ\nhy : y < 0\nhxy : x ≠ y\na b : ℝ\nha : 0 < a\nhb : 0 < b\nhab : a + b = 1\nhx' : 0 < -x\nhy' : 0 < -y\nhxy' : -x ≠ -y\n⊢ log (a • -x + b • -y) = log (-(a • x + b • y))\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_x\nx : ℝ\nhx : x < 0\ny : ℝ\nhy : y < 0\nhxy : x ≠ y\na b : ℝ\nha : 0 < a\nhb : 0 < b\nhab : a + b = 1\nhx' : 0 < -x\nhy' : 0 < -y\nhxy' : -x ≠ -y\n⊢ a • -x + b • -y = -(a • x + b • y)\n[PROOFSTEP]\nsimp only [Algebra.id.smul_eq_mul]\n[GOAL]\ncase e_x\nx : ℝ\nhx : x < 0\ny : ℝ\nhy : y < 0\nhxy : x ≠ y\na b : ℝ\nha : 0 < a\nhb : 0 < b\nhab : a + b = 1\nhx' : 0 < -x\nhy' : 0 < -y\nhxy' : -x ≠ -y\n⊢ a * -x + b * -y = -(a * x + b * y)\n[PROOFSTEP]\nring\n[GOAL]\nx : ℝ\nhx : x < 0\ny : ℝ\nhy : y < 0\nhxy : x ≠ y\na b : ℝ\nha : 0 < a\nhb : 0 < b\nhab : a + b = 1\nhx' : 0 < -x\nhy' : 0 < -y\nhxy' : -x ≠ -y\n⊢ log (-(a • x + b • y)) = log (a • x + b • y)\n[PROOFSTEP]\nrw [log_neg_eq_log]\n", "meta": {"mathlib_filename": "Mathlib.Analysis.Convex.SpecificFunctions.Basic", "llama_tokens": 32142, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8397339556397749, "lm_q2_score": 0.6261241772283034, "lm_q1q2_score": 0.5257777320656227}}
{"text": "[GOAL]\n⊢ MeasurablePow ℝ≥0∞ ℝ\n[PROOFSTEP]\nrefine' ⟨ENNReal.measurable_of_measurable_nnreal_prod _ _⟩\n[GOAL]\ncase refine'_1\n⊢ Measurable fun p => (↑p.fst, p.snd).fst ^ (↑p.fst, p.snd).snd\n[PROOFSTEP]\nsimp_rw [ENNReal.coe_rpow_def]\n[GOAL]\ncase refine'_1\n⊢ Measurable fun p => if p.fst = 0 ∧ p.snd < 0 then ⊤ else ↑(p.fst ^ p.snd)\n[PROOFSTEP]\nrefine' Measurable.ite _ measurable_const (measurable_fst.pow measurable_snd).coe_nnreal_ennreal\n[GOAL]\ncase refine'_1\n⊢ MeasurableSet {a | a.fst = 0 ∧ a.snd < 0}\n[PROOFSTEP]\nexact MeasurableSet.inter (measurable_fst (measurableSet_singleton 0)) (measurable_snd measurableSet_Iio)\n[GOAL]\ncase refine'_2\n⊢ Measurable fun x => (⊤, x).fst ^ (⊤, x).snd\n[PROOFSTEP]\nsimp_rw [ENNReal.top_rpow_def]\n[GOAL]\ncase refine'_2\n⊢ Measurable fun x => if 0 < x then ⊤ else if x = 0 then 1 else 0\n[PROOFSTEP]\nrefine' Measurable.ite measurableSet_Ioi measurable_const _\n[GOAL]\ncase refine'_2\n⊢ Measurable fun x => if x = 0 then 1 else 0\n[PROOFSTEP]\nexact Measurable.ite (measurableSet_singleton 0) measurable_const measurable_const\n", "meta": {"mathlib_filename": "Mathlib.MeasureTheory.Function.SpecialFunctions.Basic", "llama_tokens": 494, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7772998714925403, "lm_q2_score": 0.6757645944891559, "lm_q1q2_score": 0.5252717324556295}}
{"text": "[GOAL]\nC : Type u_1\nD : Type u_2\nE : Type u_3\ninst✝² : Category.{?u.63, u_1} C\ninst✝¹ : Category.{?u.67, u_2} D\ninst✝ : Category.{?u.71, u_3} E\nF : D ⥤ E\nG : E ⥤ D\nadj : F ⊣ G\n⊢ ∀ ⦃X Y : C ⥤ D⦄ (f : X ⟶ Y),\n    (𝟭 (C ⥤ D)).map f ≫\n        (fun X =>\n            (Functor.rightUnitor ((𝟭 (C ⥤ D)).obj X)).inv ≫ whiskerLeft X adj.unit ≫ (Functor.associator X F G).inv)\n          Y =\n      (fun X => (Functor.rightUnitor ((𝟭 (C ⥤ D)).obj X)).inv ≫ whiskerLeft X adj.unit ≫ (Functor.associator X F G).inv)\n          X ≫\n        ((whiskeringRight C D E).obj F ⋙ (whiskeringRight C E D).obj G).map f\n[PROOFSTEP]\nintros\n[GOAL]\nC : Type u_1\nD : Type u_2\nE : Type u_3\ninst✝² : Category.{?u.63, u_1} C\ninst✝¹ : Category.{?u.67, u_2} D\ninst✝ : Category.{?u.71, u_3} E\nF : D ⥤ E\nG : E ⥤ D\nadj : F ⊣ G\nX✝ Y✝ : C ⥤ D\nf✝ : X✝ ⟶ Y✝\n⊢ (𝟭 (C ⥤ D)).map f✝ ≫\n      (fun X => (Functor.rightUnitor ((𝟭 (C ⥤ D)).obj X)).inv ≫ whiskerLeft X adj.unit ≫ (Functor.associator X F G).inv)\n        Y✝ =\n    (fun X => (Functor.rightUnitor ((𝟭 (C ⥤ D)).obj X)).inv ≫ whiskerLeft X adj.unit ≫ (Functor.associator X F G).inv)\n        X✝ ≫\n      ((whiskeringRight C D E).obj F ⋙ (whiskeringRight C E D).obj G).map f✝\n[PROOFSTEP]\next\n[GOAL]\ncase w.h\nC : Type u_1\nD : Type u_2\nE : Type u_3\ninst✝² : Category.{?u.63, u_1} C\ninst✝¹ : Category.{?u.67, u_2} D\ninst✝ : Category.{?u.71, u_3} E\nF : D ⥤ E\nG : E ⥤ D\nadj : F ⊣ G\nX✝ Y✝ : C ⥤ D\nf✝ : X✝ ⟶ Y✝\nx✝ : C\n⊢ NatTrans.app\n      ((𝟭 (C ⥤ D)).map f✝ ≫\n        (fun X =>\n            (Functor.rightUnitor ((𝟭 (C ⥤ D)).obj X)).inv ≫ whiskerLeft X adj.unit ≫ (Functor.associator X F G).inv)\n          Y✝)\n      x✝ =\n    NatTrans.app\n      ((fun X =>\n            (Functor.rightUnitor ((𝟭 (C ⥤ D)).obj X)).inv ≫ whiskerLeft X adj.unit ≫ (Functor.associator X F G).inv)\n          X✝ ≫\n        ((whiskeringRight C D E).obj F ⋙ (whiskeringRight C E D).obj G).map f✝)\n      x✝\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase w.h\nC : Type u_1\nD : Type u_2\nE : Type u_3\ninst✝² : Category.{?u.63, u_1} C\ninst✝¹ : Category.{?u.67, u_2} D\ninst✝ : Category.{?u.71, u_3} E\nF : D ⥤ E\nG : E ⥤ D\nadj : F ⊣ G\nX✝ Y✝ : C ⥤ D\nf✝ : X✝ ⟶ Y✝\nx✝ : C\n⊢ NatTrans.app f✝ x✝ ≫ 𝟙 (Y✝.obj x✝) ≫ NatTrans.app adj.unit (Y✝.obj x✝) ≫ 𝟙 (G.obj (F.obj (Y✝.obj x✝))) =\n    (𝟙 (X✝.obj x✝) ≫ NatTrans.app adj.unit (X✝.obj x✝) ≫ 𝟙 (G.obj (F.obj (X✝.obj x✝)))) ≫\n      G.map (F.map (NatTrans.app f✝ x✝))\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u_1\nD : Type u_2\nE : Type u_3\ninst✝² : Category.{?u.63, u_1} C\ninst✝¹ : Category.{?u.67, u_2} D\ninst✝ : Category.{?u.71, u_3} E\nF : D ⥤ E\nG : E ⥤ D\nadj : F ⊣ G\n⊢ ∀ ⦃X Y : C ⥤ E⦄ (f : X ⟶ Y),\n    ((whiskeringRight C E D).obj G ⋙ (whiskeringRight C D E).obj F).map f ≫\n        (fun X => (Functor.associator X G F).hom ≫ whiskerLeft X adj.counit ≫ (Functor.rightUnitor X).hom) Y =\n      (fun X => (Functor.associator X G F).hom ≫ whiskerLeft X adj.counit ≫ (Functor.rightUnitor X).hom) X ≫\n        (𝟭 (C ⥤ E)).map f\n[PROOFSTEP]\nintros\n[GOAL]\nC : Type u_1\nD : Type u_2\nE : Type u_3\ninst✝² : Category.{?u.63, u_1} C\ninst✝¹ : Category.{?u.67, u_2} D\ninst✝ : Category.{?u.71, u_3} E\nF : D ⥤ E\nG : E ⥤ D\nadj : F ⊣ G\nX✝ Y✝ : C ⥤ E\nf✝ : X✝ ⟶ Y✝\n⊢ ((whiskeringRight C E D).obj G ⋙ (whiskeringRight C D E).obj F).map f✝ ≫\n      (fun X => (Functor.associator X G F).hom ≫ whiskerLeft X adj.counit ≫ (Functor.rightUnitor X).hom) Y✝ =\n    (fun X => (Functor.associator X G F).hom ≫ whiskerLeft X adj.counit ≫ (Functor.rightUnitor X).hom) X✝ ≫\n      (𝟭 (C ⥤ E)).map f✝\n[PROOFSTEP]\next\n[GOAL]\ncase w.h\nC : Type u_1\nD : Type u_2\nE : Type u_3\ninst✝² : Category.{?u.63, u_1} C\ninst✝¹ : Category.{?u.67, u_2} D\ninst✝ : Category.{?u.71, u_3} E\nF : D ⥤ E\nG : E ⥤ D\nadj : F ⊣ G\nX✝ Y✝ : C ⥤ E\nf✝ : X✝ ⟶ Y✝\nx✝ : C\n⊢ NatTrans.app\n      (((whiskeringRight C E D).obj G ⋙ (whiskeringRight C D E).obj F).map f✝ ≫\n        (fun X => (Functor.associator X G F).hom ≫ whiskerLeft X adj.counit ≫ (Functor.rightUnitor X).hom) Y✝)\n      x✝ =\n    NatTrans.app\n      ((fun X => (Functor.associator X G F).hom ≫ whiskerLeft X adj.counit ≫ (Functor.rightUnitor X).hom) X✝ ≫\n        (𝟭 (C ⥤ E)).map f✝)\n      x✝\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase w.h\nC : Type u_1\nD : Type u_2\nE : Type u_3\ninst✝² : Category.{?u.63, u_1} C\ninst✝¹ : Category.{?u.67, u_2} D\ninst✝ : Category.{?u.71, u_3} E\nF : D ⥤ E\nG : E ⥤ D\nadj : F ⊣ G\nX✝ Y✝ : C ⥤ E\nf✝ : X✝ ⟶ Y✝\nx✝ : C\n⊢ F.map (G.map (NatTrans.app f✝ x✝)) ≫\n      𝟙 (F.obj (G.obj (Y✝.obj x✝))) ≫ NatTrans.app adj.counit (Y✝.obj x✝) ≫ 𝟙 (Y✝.obj x✝) =\n    (𝟙 (F.obj (G.obj (X✝.obj x✝))) ≫ NatTrans.app adj.counit (X✝.obj x✝) ≫ 𝟙 (X✝.obj x✝)) ≫ NatTrans.app f✝ x✝\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u_1\nD : Type u_2\nE : Type u_3\ninst✝² : Category.{?u.63, u_1} C\ninst✝¹ : Category.{?u.67, u_2} D\ninst✝ : Category.{?u.71, u_3} E\nF : D ⥤ E\nG : E ⥤ D\nadj : F ⊣ G\n⊢ whiskerRight\n        (NatTrans.mk fun X =>\n          (Functor.rightUnitor ((𝟭 (C ⥤ D)).obj X)).inv ≫ whiskerLeft X adj.unit ≫ (Functor.associator X F G).inv)\n        ((whiskeringRight C D E).obj F) ≫\n      (Functor.associator ((whiskeringRight C D E).obj F) ((whiskeringRight C E D).obj G)\n            ((whiskeringRight C D E).obj F)).hom ≫\n        whiskerLeft ((whiskeringRight C D E).obj F)\n          (NatTrans.mk fun X =>\n            (Functor.associator X G F).hom ≫ whiskerLeft X adj.counit ≫ (Functor.rightUnitor X).hom) =\n    NatTrans.id (𝟭 (C ⥤ D) ⋙ (whiskeringRight C D E).obj F)\n[PROOFSTEP]\next\n[GOAL]\ncase w.h.w.h\nC : Type u_1\nD : Type u_2\nE : Type u_3\ninst✝² : Category.{?u.63, u_1} C\ninst✝¹ : Category.{?u.67, u_2} D\ninst✝ : Category.{?u.71, u_3} E\nF : D ⥤ E\nG : E ⥤ D\nadj : F ⊣ G\nx✝¹ : C ⥤ D\nx✝ : C\n⊢ NatTrans.app\n      (NatTrans.app\n        (whiskerRight\n            (NatTrans.mk fun X =>\n              (Functor.rightUnitor ((𝟭 (C ⥤ D)).obj X)).inv ≫ whiskerLeft X adj.unit ≫ (Functor.associator X F G).inv)\n            ((whiskeringRight C D E).obj F) ≫\n          (Functor.associator ((whiskeringRight C D E).obj F) ((whiskeringRight C E D).obj G)\n                ((whiskeringRight C D E).obj F)).hom ≫\n            whiskerLeft ((whiskeringRight C D E).obj F)\n              (NatTrans.mk fun X =>\n                (Functor.associator X G F).hom ≫ whiskerLeft X adj.counit ≫ (Functor.rightUnitor X).hom))\n        x✝¹)\n      x✝ =\n    NatTrans.app (NatTrans.app (NatTrans.id (𝟭 (C ⥤ D) ⋙ (whiskeringRight C D E).obj F)) x✝¹) x✝\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase w.h.w.h\nC : Type u_1\nD : Type u_2\nE : Type u_3\ninst✝² : Category.{?u.63, u_1} C\ninst✝¹ : Category.{?u.67, u_2} D\ninst✝ : Category.{?u.71, u_3} E\nF : D ⥤ E\nG : E ⥤ D\nadj : F ⊣ G\nx✝¹ : C ⥤ D\nx✝ : C\n⊢ F.map (𝟙 (x✝¹.obj x✝) ≫ NatTrans.app adj.unit (x✝¹.obj x✝) ≫ 𝟙 (G.obj (F.obj (x✝¹.obj x✝)))) ≫\n      𝟙 (F.obj (G.obj (F.obj (x✝¹.obj x✝)))) ≫\n        𝟙 (F.obj (G.obj (F.obj (x✝¹.obj x✝)))) ≫ NatTrans.app adj.counit (F.obj (x✝¹.obj x✝)) ≫ 𝟙 (F.obj (x✝¹.obj x✝)) =\n    𝟙 (F.obj (x✝¹.obj x✝))\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u_1\nD : Type u_2\nE : Type u_3\ninst✝² : Category.{?u.63, u_1} C\ninst✝¹ : Category.{?u.67, u_2} D\ninst✝ : Category.{?u.71, u_3} E\nF : D ⥤ E\nG : E ⥤ D\nadj : F ⊣ G\n⊢ whiskerLeft ((whiskeringRight C E D).obj G)\n        (NatTrans.mk fun X =>\n          (Functor.rightUnitor ((𝟭 (C ⥤ D)).obj X)).inv ≫ whiskerLeft X adj.unit ≫ (Functor.associator X F G).inv) ≫\n      (Functor.associator ((whiskeringRight C E D).obj G) ((whiskeringRight C D E).obj F)\n            ((whiskeringRight C E D).obj G)).inv ≫\n        whiskerRight\n          (NatTrans.mk fun X => (Functor.associator X G F).hom ≫ whiskerLeft X adj.counit ≫ (Functor.rightUnitor X).hom)\n          ((whiskeringRight C E D).obj G) =\n    NatTrans.id ((whiskeringRight C E D).obj G ⋙ 𝟭 (C ⥤ D))\n[PROOFSTEP]\next\n[GOAL]\ncase w.h.w.h\nC : Type u_1\nD : Type u_2\nE : Type u_3\ninst✝² : Category.{?u.63, u_1} C\ninst✝¹ : Category.{?u.67, u_2} D\ninst✝ : Category.{?u.71, u_3} E\nF : D ⥤ E\nG : E ⥤ D\nadj : F ⊣ G\nx✝¹ : C ⥤ E\nx✝ : C\n⊢ NatTrans.app\n      (NatTrans.app\n        (whiskerLeft ((whiskeringRight C E D).obj G)\n            (NatTrans.mk fun X =>\n              (Functor.rightUnitor ((𝟭 (C ⥤ D)).obj X)).inv ≫ whiskerLeft X adj.unit ≫ (Functor.associator X F G).inv) ≫\n          (Functor.associator ((whiskeringRight C E D).obj G) ((whiskeringRight C D E).obj F)\n                ((whiskeringRight C E D).obj G)).inv ≫\n            whiskerRight\n              (NatTrans.mk fun X =>\n                (Functor.associator X G F).hom ≫ whiskerLeft X adj.counit ≫ (Functor.rightUnitor X).hom)\n              ((whiskeringRight C E D).obj G))\n        x✝¹)\n      x✝ =\n    NatTrans.app (NatTrans.app (NatTrans.id ((whiskeringRight C E D).obj G ⋙ 𝟭 (C ⥤ D))) x✝¹) x✝\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase w.h.w.h\nC : Type u_1\nD : Type u_2\nE : Type u_3\ninst✝² : Category.{?u.63, u_1} C\ninst✝¹ : Category.{?u.67, u_2} D\ninst✝ : Category.{?u.71, u_3} E\nF : D ⥤ E\nG : E ⥤ D\nadj : F ⊣ G\nx✝¹ : C ⥤ E\nx✝ : C\n⊢ (𝟙 (G.obj (x✝¹.obj x✝)) ≫ NatTrans.app adj.unit (G.obj (x✝¹.obj x✝)) ≫ 𝟙 (G.obj (F.obj (G.obj (x✝¹.obj x✝))))) ≫\n      𝟙 (G.obj (F.obj (G.obj (x✝¹.obj x✝)))) ≫\n        G.map (𝟙 (F.obj (G.obj (x✝¹.obj x✝))) ≫ NatTrans.app adj.counit (x✝¹.obj x✝) ≫ 𝟙 (x✝¹.obj x✝)) =\n    𝟙 (G.obj (x✝¹.obj x✝))\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u_1\nD : Type u_2\nE : Type u_3\ninst✝² : Category.{?u.21134, u_1} C\ninst✝¹ : Category.{?u.21138, u_2} D\ninst✝ : Category.{?u.21142, u_3} E\nF : D ⥤ E\nG : E ⥤ D\nadj : F ⊣ G\n⊢ ∀ ⦃X Y : D ⥤ C⦄ (f : X ⟶ Y),\n    (𝟭 (D ⥤ C)).map f ≫\n        (fun X =>\n            (Functor.leftUnitor ((𝟭 (D ⥤ C)).obj X)).inv ≫ whiskerRight adj.unit X ≫ (Functor.associator F G X).hom)\n          Y =\n      (fun X => (Functor.leftUnitor ((𝟭 (D ⥤ C)).obj X)).inv ≫ whiskerRight adj.unit X ≫ (Functor.associator F G X).hom)\n          X ≫\n        ((whiskeringLeft E D C).obj G ⋙ (whiskeringLeft D E C).obj F).map f\n[PROOFSTEP]\nintros\n[GOAL]\nC : Type u_1\nD : Type u_2\nE : Type u_3\ninst✝² : Category.{?u.21134, u_1} C\ninst✝¹ : Category.{?u.21138, u_2} D\ninst✝ : Category.{?u.21142, u_3} E\nF : D ⥤ E\nG : E ⥤ D\nadj : F ⊣ G\nX✝ Y✝ : D ⥤ C\nf✝ : X✝ ⟶ Y✝\n⊢ (𝟭 (D ⥤ C)).map f✝ ≫\n      (fun X => (Functor.leftUnitor ((𝟭 (D ⥤ C)).obj X)).inv ≫ whiskerRight adj.unit X ≫ (Functor.associator F G X).hom)\n        Y✝ =\n    (fun X => (Functor.leftUnitor ((𝟭 (D ⥤ C)).obj X)).inv ≫ whiskerRight adj.unit X ≫ (Functor.associator F G X).hom)\n        X✝ ≫\n      ((whiskeringLeft E D C).obj G ⋙ (whiskeringLeft D E C).obj F).map f✝\n[PROOFSTEP]\next\n[GOAL]\ncase w.h\nC : Type u_1\nD : Type u_2\nE : Type u_3\ninst✝² : Category.{?u.21134, u_1} C\ninst✝¹ : Category.{?u.21138, u_2} D\ninst✝ : Category.{?u.21142, u_3} E\nF : D ⥤ E\nG : E ⥤ D\nadj : F ⊣ G\nX✝ Y✝ : D ⥤ C\nf✝ : X✝ ⟶ Y✝\nx✝ : D\n⊢ NatTrans.app\n      ((𝟭 (D ⥤ C)).map f✝ ≫\n        (fun X =>\n            (Functor.leftUnitor ((𝟭 (D ⥤ C)).obj X)).inv ≫ whiskerRight adj.unit X ≫ (Functor.associator F G X).hom)\n          Y✝)\n      x✝ =\n    NatTrans.app\n      ((fun X =>\n            (Functor.leftUnitor ((𝟭 (D ⥤ C)).obj X)).inv ≫ whiskerRight adj.unit X ≫ (Functor.associator F G X).hom)\n          X✝ ≫\n        ((whiskeringLeft E D C).obj G ⋙ (whiskeringLeft D E C).obj F).map f✝)\n      x✝\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase w.h\nC : Type u_1\nD : Type u_2\nE : Type u_3\ninst✝² : Category.{?u.21134, u_1} C\ninst✝¹ : Category.{?u.21138, u_2} D\ninst✝ : Category.{?u.21142, u_3} E\nF : D ⥤ E\nG : E ⥤ D\nadj : F ⊣ G\nX✝ Y✝ : D ⥤ C\nf✝ : X✝ ⟶ Y✝\nx✝ : D\n⊢ NatTrans.app f✝ x✝ ≫ 𝟙 (Y✝.obj x✝) ≫ Y✝.map (NatTrans.app adj.unit x✝) ≫ 𝟙 (Y✝.obj (G.obj (F.obj x✝))) =\n    (𝟙 (X✝.obj x✝) ≫ X✝.map (NatTrans.app adj.unit x✝) ≫ 𝟙 (X✝.obj (G.obj (F.obj x✝)))) ≫\n      NatTrans.app f✝ (G.obj (F.obj x✝))\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u_1\nD : Type u_2\nE : Type u_3\ninst✝² : Category.{?u.21134, u_1} C\ninst✝¹ : Category.{?u.21138, u_2} D\ninst✝ : Category.{?u.21142, u_3} E\nF : D ⥤ E\nG : E ⥤ D\nadj : F ⊣ G\n⊢ ∀ ⦃X Y : E ⥤ C⦄ (f : X ⟶ Y),\n    ((whiskeringLeft D E C).obj F ⋙ (whiskeringLeft E D C).obj G).map f ≫\n        (fun X => (Functor.associator G F X).inv ≫ whiskerRight adj.counit X ≫ (Functor.leftUnitor X).hom) Y =\n      (fun X => (Functor.associator G F X).inv ≫ whiskerRight adj.counit X ≫ (Functor.leftUnitor X).hom) X ≫\n        (𝟭 (E ⥤ C)).map f\n[PROOFSTEP]\nintros\n[GOAL]\nC : Type u_1\nD : Type u_2\nE : Type u_3\ninst✝² : Category.{?u.21134, u_1} C\ninst✝¹ : Category.{?u.21138, u_2} D\ninst✝ : Category.{?u.21142, u_3} E\nF : D ⥤ E\nG : E ⥤ D\nadj : F ⊣ G\nX✝ Y✝ : E ⥤ C\nf✝ : X✝ ⟶ Y✝\n⊢ ((whiskeringLeft D E C).obj F ⋙ (whiskeringLeft E D C).obj G).map f✝ ≫\n      (fun X => (Functor.associator G F X).inv ≫ whiskerRight adj.counit X ≫ (Functor.leftUnitor X).hom) Y✝ =\n    (fun X => (Functor.associator G F X).inv ≫ whiskerRight adj.counit X ≫ (Functor.leftUnitor X).hom) X✝ ≫\n      (𝟭 (E ⥤ C)).map f✝\n[PROOFSTEP]\next\n[GOAL]\ncase w.h\nC : Type u_1\nD : Type u_2\nE : Type u_3\ninst✝² : Category.{?u.21134, u_1} C\ninst✝¹ : Category.{?u.21138, u_2} D\ninst✝ : Category.{?u.21142, u_3} E\nF : D ⥤ E\nG : E ⥤ D\nadj : F ⊣ G\nX✝ Y✝ : E ⥤ C\nf✝ : X✝ ⟶ Y✝\nx✝ : E\n⊢ NatTrans.app\n      (((whiskeringLeft D E C).obj F ⋙ (whiskeringLeft E D C).obj G).map f✝ ≫\n        (fun X => (Functor.associator G F X).inv ≫ whiskerRight adj.counit X ≫ (Functor.leftUnitor X).hom) Y✝)\n      x✝ =\n    NatTrans.app\n      ((fun X => (Functor.associator G F X).inv ≫ whiskerRight adj.counit X ≫ (Functor.leftUnitor X).hom) X✝ ≫\n        (𝟭 (E ⥤ C)).map f✝)\n      x✝\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase w.h\nC : Type u_1\nD : Type u_2\nE : Type u_3\ninst✝² : Category.{?u.21134, u_1} C\ninst✝¹ : Category.{?u.21138, u_2} D\ninst✝ : Category.{?u.21142, u_3} E\nF : D ⥤ E\nG : E ⥤ D\nadj : F ⊣ G\nX✝ Y✝ : E ⥤ C\nf✝ : X✝ ⟶ Y✝\nx✝ : E\n⊢ NatTrans.app f✝ (F.obj (G.obj x✝)) ≫\n      𝟙 (Y✝.obj (F.obj (G.obj x✝))) ≫ Y✝.map (NatTrans.app adj.counit x✝) ≫ 𝟙 (Y✝.obj x✝) =\n    (𝟙 (X✝.obj (F.obj (G.obj x✝))) ≫ X✝.map (NatTrans.app adj.counit x✝) ≫ 𝟙 (X✝.obj x✝)) ≫ NatTrans.app f✝ x✝\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u_1\nD : Type u_2\nE : Type u_3\ninst✝² : Category.{?u.21134, u_1} C\ninst✝¹ : Category.{?u.21138, u_2} D\ninst✝ : Category.{?u.21142, u_3} E\nF : D ⥤ E\nG : E ⥤ D\nadj : F ⊣ G\n⊢ whiskerRight\n        (NatTrans.mk fun X =>\n          (Functor.leftUnitor ((𝟭 (D ⥤ C)).obj X)).inv ≫ whiskerRight adj.unit X ≫ (Functor.associator F G X).hom)\n        ((whiskeringLeft E D C).obj G) ≫\n      (Functor.associator ((whiskeringLeft E D C).obj G) ((whiskeringLeft D E C).obj F)\n            ((whiskeringLeft E D C).obj G)).hom ≫\n        whiskerLeft ((whiskeringLeft E D C).obj G)\n          (NatTrans.mk fun X =>\n            (Functor.associator G F X).inv ≫ whiskerRight adj.counit X ≫ (Functor.leftUnitor X).hom) =\n    NatTrans.id (𝟭 (D ⥤ C) ⋙ (whiskeringLeft E D C).obj G)\n[PROOFSTEP]\next x\n[GOAL]\ncase w.h.w.h\nC : Type u_1\nD : Type u_2\nE : Type u_3\ninst✝² : Category.{?u.21134, u_1} C\ninst✝¹ : Category.{?u.21138, u_2} D\ninst✝ : Category.{?u.21142, u_3} E\nF : D ⥤ E\nG : E ⥤ D\nadj : F ⊣ G\nx : D ⥤ C\nx✝ : E\n⊢ NatTrans.app\n      (NatTrans.app\n        (whiskerRight\n            (NatTrans.mk fun X =>\n              (Functor.leftUnitor ((𝟭 (D ⥤ C)).obj X)).inv ≫ whiskerRight adj.unit X ≫ (Functor.associator F G X).hom)\n            ((whiskeringLeft E D C).obj G) ≫\n          (Functor.associator ((whiskeringLeft E D C).obj G) ((whiskeringLeft D E C).obj F)\n                ((whiskeringLeft E D C).obj G)).hom ≫\n            whiskerLeft ((whiskeringLeft E D C).obj G)\n              (NatTrans.mk fun X =>\n                (Functor.associator G F X).inv ≫ whiskerRight adj.counit X ≫ (Functor.leftUnitor X).hom))\n        x)\n      x✝ =\n    NatTrans.app (NatTrans.app (NatTrans.id (𝟭 (D ⥤ C) ⋙ (whiskeringLeft E D C).obj G)) x) x✝\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase w.h.w.h\nC : Type u_1\nD : Type u_2\nE : Type u_3\ninst✝² : Category.{?u.21134, u_1} C\ninst✝¹ : Category.{?u.21138, u_2} D\ninst✝ : Category.{?u.21142, u_3} E\nF : D ⥤ E\nG : E ⥤ D\nadj : F ⊣ G\nx : D ⥤ C\nx✝ : E\n⊢ (𝟙 (x.obj (G.obj x✝)) ≫ x.map (NatTrans.app adj.unit (G.obj x✝)) ≫ 𝟙 (x.obj (G.obj (F.obj (G.obj x✝))))) ≫\n      𝟙 (x.obj (G.obj (F.obj (G.obj x✝)))) ≫\n        𝟙 (x.obj (G.obj (F.obj (G.obj x✝)))) ≫ x.map (G.map (NatTrans.app adj.counit x✝)) ≫ 𝟙 (x.obj (G.obj x✝)) =\n    𝟙 (x.obj (G.obj x✝))\n[PROOFSTEP]\nsimp [Category.id_comp, Category.comp_id, ← x.map_comp]\n[GOAL]\nC : Type u_1\nD : Type u_2\nE : Type u_3\ninst✝² : Category.{?u.21134, u_1} C\ninst✝¹ : Category.{?u.21138, u_2} D\ninst✝ : Category.{?u.21142, u_3} E\nF : D ⥤ E\nG : E ⥤ D\nadj : F ⊣ G\n⊢ whiskerLeft ((whiskeringLeft D E C).obj F)\n        (NatTrans.mk fun X =>\n          (Functor.leftUnitor ((𝟭 (D ⥤ C)).obj X)).inv ≫ whiskerRight adj.unit X ≫ (Functor.associator F G X).hom) ≫\n      (Functor.associator ((whiskeringLeft D E C).obj F) ((whiskeringLeft E D C).obj G)\n            ((whiskeringLeft D E C).obj F)).inv ≫\n        whiskerRight\n          (NatTrans.mk fun X => (Functor.associator G F X).inv ≫ whiskerRight adj.counit X ≫ (Functor.leftUnitor X).hom)\n          ((whiskeringLeft D E C).obj F) =\n    NatTrans.id ((whiskeringLeft D E C).obj F ⋙ 𝟭 (D ⥤ C))\n[PROOFSTEP]\next x\n[GOAL]\ncase w.h.w.h\nC : Type u_1\nD : Type u_2\nE : Type u_3\ninst✝² : Category.{?u.21134, u_1} C\ninst✝¹ : Category.{?u.21138, u_2} D\ninst✝ : Category.{?u.21142, u_3} E\nF : D ⥤ E\nG : E ⥤ D\nadj : F ⊣ G\nx : E ⥤ C\nx✝ : D\n⊢ NatTrans.app\n      (NatTrans.app\n        (whiskerLeft ((whiskeringLeft D E C).obj F)\n            (NatTrans.mk fun X =>\n              (Functor.leftUnitor ((𝟭 (D ⥤ C)).obj X)).inv ≫ whiskerRight adj.unit X ≫ (Functor.associator F G X).hom) ≫\n          (Functor.associator ((whiskeringLeft D E C).obj F) ((whiskeringLeft E D C).obj G)\n                ((whiskeringLeft D E C).obj F)).inv ≫\n            whiskerRight\n              (NatTrans.mk fun X =>\n                (Functor.associator G F X).inv ≫ whiskerRight adj.counit X ≫ (Functor.leftUnitor X).hom)\n              ((whiskeringLeft D E C).obj F))\n        x)\n      x✝ =\n    NatTrans.app (NatTrans.app (NatTrans.id ((whiskeringLeft D E C).obj F ⋙ 𝟭 (D ⥤ C))) x) x✝\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase w.h.w.h\nC : Type u_1\nD : Type u_2\nE : Type u_3\ninst✝² : Category.{?u.21134, u_1} C\ninst✝¹ : Category.{?u.21138, u_2} D\ninst✝ : Category.{?u.21142, u_3} E\nF : D ⥤ E\nG : E ⥤ D\nadj : F ⊣ G\nx : E ⥤ C\nx✝ : D\n⊢ (𝟙 (x.obj (F.obj x✝)) ≫ x.map (F.map (NatTrans.app adj.unit x✝)) ≫ 𝟙 (x.obj (F.obj (G.obj (F.obj x✝))))) ≫\n      𝟙 (x.obj (F.obj (G.obj (F.obj x✝)))) ≫\n        𝟙 (x.obj (F.obj (G.obj (F.obj x✝)))) ≫ x.map (NatTrans.app adj.counit (F.obj x✝)) ≫ 𝟙 (x.obj (F.obj x✝)) =\n    𝟙 (x.obj (F.obj x✝))\n[PROOFSTEP]\nsimp [Category.id_comp, Category.comp_id, ← x.map_comp]\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Adjunction.Whiskering", "llama_tokens": 9862, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.82893881677331, "lm_q2_score": 0.6334102636778401, "lm_q1q2_score": 0.5250583545051791}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : CommMonoid β\nn : ℕ\nf : Fin n → β\n⊢ ∏ i : Fin n, f i = List.prod (List.map f (List.finRange n))\n[PROOFSTEP]\nsimp [univ_def]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : CommMonoid β\nn : ℕ\nf : Fin n → β\n⊢ List.prod (List.ofFn f) = ∏ i : Fin n, f i\n[PROOFSTEP]\nrw [List.ofFn_eq_map, prod_univ_def]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : CommMonoid β\nn : ℕ\nf : Fin (n + 1) → β\nx : Fin (n + 1)\n⊢ ∏ i : Fin (n + 1), f i = f x * ∏ i : Fin n, f (succAbove x i)\n[PROOFSTEP]\nrw [univ_succAbove, prod_cons, Finset.prod_map _ x.succAboveEmb.toEmbedding, RelEmbedding.coe_toEmbedding]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : CommMonoid β\nn : ℕ\nf : Fin (n + 1) → β\nx : Fin (n + 1)\n⊢ f x * ∏ x_1 : Fin n, f (↑(succAboveEmb x) x_1) = f x * ∏ i : Fin n, f (succAbove x i)\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : CommMonoid β\nn : ℕ\nf : Fin (n + 1) → β\n⊢ ∏ i : Fin (n + 1), f i = (∏ i : Fin n, f (castSucc i)) * f (last n)\n[PROOFSTEP]\nsimpa [mul_comm] using prod_univ_succAbove f (last n)\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : CommMonoid β\nn : ℕ\nx : β\nf : Fin n → β\n⊢ ∏ i : Fin (Nat.succ n), cons x f i = x * ∏ i : Fin n, f i\n[PROOFSTEP]\nsimp_rw [prod_univ_succ, cons_zero, cons_succ]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : CommMonoid β\nf : Fin 1 → β\n⊢ ∏ i : Fin 1, f i = f 0\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : CommMonoid β\nf : Fin 2 → β\n⊢ ∏ i : Fin 2, f i = f 0 * f 1\n[PROOFSTEP]\nsimp [prod_univ_succ]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : CommMonoid β\nf : Fin 3 → β\n⊢ ∏ i : Fin 3, f i = f 0 * f 1 * f 2\n[PROOFSTEP]\nrw [prod_univ_castSucc, prod_univ_two]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : CommMonoid β\nf : Fin 3 → β\n⊢ f (castSucc 0) * f (castSucc 1) * f (last 2) = f 0 * f 1 * f 2\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : CommMonoid β\nf : Fin 4 → β\n⊢ ∏ i : Fin 4, f i = f 0 * f 1 * f 2 * f 3\n[PROOFSTEP]\nrw [prod_univ_castSucc, prod_univ_three]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : CommMonoid β\nf : Fin 4 → β\n⊢ f (castSucc 0) * f (castSucc 1) * f (castSucc 2) * f (last 3) = f 0 * f 1 * f 2 * f 3\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : CommMonoid β\nf : Fin 5 → β\n⊢ ∏ i : Fin 5, f i = f 0 * f 1 * f 2 * f 3 * f 4\n[PROOFSTEP]\nrw [prod_univ_castSucc, prod_univ_four]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : CommMonoid β\nf : Fin 5 → β\n⊢ f (castSucc 0) * f (castSucc 1) * f (castSucc 2) * f (castSucc 3) * f (last 4) = f 0 * f 1 * f 2 * f 3 * f 4\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : CommMonoid β\nf : Fin 6 → β\n⊢ ∏ i : Fin 6, f i = f 0 * f 1 * f 2 * f 3 * f 4 * f 5\n[PROOFSTEP]\nrw [prod_univ_castSucc, prod_univ_five]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : CommMonoid β\nf : Fin 6 → β\n⊢ f (castSucc 0) * f (castSucc 1) * f (castSucc 2) * f (castSucc 3) * f (castSucc 4) * f (last 5) =\n    f 0 * f 1 * f 2 * f 3 * f 4 * f 5\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : CommMonoid β\nf : Fin 7 → β\n⊢ ∏ i : Fin 7, f i = f 0 * f 1 * f 2 * f 3 * f 4 * f 5 * f 6\n[PROOFSTEP]\nrw [prod_univ_castSucc, prod_univ_six]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : CommMonoid β\nf : Fin 7 → β\n⊢ f (castSucc 0) * f (castSucc 1) * f (castSucc 2) * f (castSucc 3) * f (castSucc 4) * f (castSucc 5) * f (last 6) =\n    f 0 * f 1 * f 2 * f 3 * f 4 * f 5 * f 6\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : CommMonoid β\nf : Fin 8 → β\n⊢ ∏ i : Fin 8, f i = f 0 * f 1 * f 2 * f 3 * f 4 * f 5 * f 6 * f 7\n[PROOFSTEP]\nrw [prod_univ_castSucc, prod_univ_seven]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : CommMonoid β\nf : Fin 8 → β\n⊢ f (castSucc 0) * f (castSucc 1) * f (castSucc 2) * f (castSucc 3) * f (castSucc 4) * f (castSucc 5) * f (castSucc 6) *\n      f (last 7) =\n    f 0 * f 1 * f 2 * f 3 * f 4 * f 5 * f 6 * f 7\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nn : ℕ\nR : Type u_3\ninst✝ : CommSemiring R\na b : R\n⊢ ∑ s : Finset (Fin n), a ^ card s * b ^ (n - card s) = (a + b) ^ n\n[PROOFSTEP]\nsimpa using Fintype.sum_pow_mul_eq_add_pow (Fin n) a b\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : CommMonoid α\nn : ℕ\nx : α\n⊢ ∏ _i : Fin n, x = x ^ n\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : AddCommMonoid α\nn : ℕ\nx : α\n⊢ ∑ _i : Fin n, x = n • x\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nM : Type u_3\ninst✝ : CommMonoid M\nn : ℕ\nv : Fin (Nat.succ n) → M\n⊢ ∏ i in Ioi 0, v i = ∏ j : Fin n, v (succ j)\n[PROOFSTEP]\nrw [Ioi_zero_eq_map, Finset.prod_map, RelEmbedding.coe_toEmbedding, val_succEmbedding]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nM : Type u_3\ninst✝ : CommMonoid M\nn : ℕ\ni : Fin n\nv : Fin (Nat.succ n) → M\n⊢ ∏ j in Ioi (succ i), v j = ∏ j in Ioi i, v (succ j)\n[PROOFSTEP]\nrw [Ioi_succ, Finset.prod_map, RelEmbedding.coe_toEmbedding, val_succEmbedding]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nM : Type u_3\ninst✝ : CommMonoid M\na b : ℕ\nf : Fin b → M\nh : a = b\n⊢ ∏ i : Fin a, f (↑(castIso h) i) = ∏ i : Fin b, f i\n[PROOFSTEP]\nsubst h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nM : Type u_3\ninst✝ : CommMonoid M\na : ℕ\nf : Fin a → M\n⊢ ∏ i : Fin a, f (↑(castIso (_ : a = a)) i) = ∏ i : Fin a, f i\n[PROOFSTEP]\ncongr\n[GOAL]\nα : Type u_1\nβ : Type u_2\nM : Type u_3\ninst✝ : CommMonoid M\na b : ℕ\nf : Fin (a + b) → M\n⊢ ∏ i : Fin (a + b), f i = (∏ i : Fin a, f (castAdd b i)) * ∏ i : Fin b, f (natAdd a i)\n[PROOFSTEP]\nrw [Fintype.prod_equiv finSumFinEquiv.symm f fun i => f (finSumFinEquiv.toFun i)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nM : Type u_3\ninst✝ : CommMonoid M\na b : ℕ\nf : Fin (a + b) → M\n⊢ ∏ x : Fin a ⊕ Fin b, f (Equiv.toFun finSumFinEquiv x) = (∏ i : Fin a, f (castAdd b i)) * ∏ i : Fin b, f (natAdd a i)\n[PROOFSTEP]\napply Fintype.prod_sum_type\n[GOAL]\nα : Type u_1\nβ : Type u_2\nM : Type u_3\ninst✝ : CommMonoid M\na b : ℕ\nf : Fin (a + b) → M\n⊢ ∀ (x : Fin (a + b)), f x = f (Equiv.toFun finSumFinEquiv (↑finSumFinEquiv.symm x))\n[PROOFSTEP]\nintro x\n[GOAL]\nα : Type u_1\nβ : Type u_2\nM : Type u_3\ninst✝ : CommMonoid M\na b : ℕ\nf : Fin (a + b) → M\nx : Fin (a + b)\n⊢ f x = f (Equiv.toFun finSumFinEquiv (↑finSumFinEquiv.symm x))\n[PROOFSTEP]\nsimp only [Equiv.toFun_as_coe, Equiv.apply_symm_apply]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nM : Type u_3\ninst✝ : CommMonoid M\na b : ℕ\nf : Fin (a + b) → M\nhf : ∀ (j : Fin b), f (natAdd a j) = 1\n⊢ ∏ i : Fin (a + b), f i = ∏ i : Fin a, f (castLE (_ : a ≤ a + b) i)\n[PROOFSTEP]\nrw [prod_univ_add, Fintype.prod_eq_one _ hf, mul_one]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nM : Type u_3\ninst✝ : CommMonoid M\na b : ℕ\nf : Fin (a + b) → M\nhf : ∀ (j : Fin b), f (natAdd a j) = 1\n⊢ ∏ i : Fin a, f (castAdd b i) = ∏ i : Fin a, f (castLE (_ : a ≤ a + b) i)\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : Monoid α\nn : ℕ\nf : Fin n → α\n⊢ partialProd f 0 = 1\n[PROOFSTEP]\nsimp [partialProd]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : Monoid α\nn : ℕ\nf : Fin n → α\nj : Fin n\n⊢ partialProd f (succ j) = partialProd f (castSucc j) * f j\n[PROOFSTEP]\nsimp [partialProd, List.take_succ, List.ofFnNthVal, dif_pos j.is_lt, ← Option.coe_def]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : Monoid α\nn : ℕ\nf : Fin (n + 1) → α\nj : Fin (n + 1)\n⊢ partialProd f (succ j) = f 0 * partialProd (tail f) j\n[PROOFSTEP]\nsimp [partialProd]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : Monoid α\nn : ℕ\nf : Fin (n + 1) → α\nj : Fin (n + 1)\n⊢ f 0 * List.prod (List.take (↑j) (List.ofFn fun i => f (succ i))) =\n    f 0 * List.prod (List.take (↑j) (List.ofFn (tail f)))\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Monoid α\nn : ℕ\nG : Type u_3\ninst✝ : Group G\nf : Fin (n + 1) → G\nx : Fin (n + 1)\n⊢ (f 0 • partialProd fun i => (f ↑↑i)⁻¹ * f (succ i)) 0 = f 0\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Monoid α\nn : ℕ\nG : Type u_3\ninst✝ : Group G\nf : Fin (n + 1) → G\nx✝ : Fin (n + 1)\nx : Fin n\nhx : (f 0 • partialProd fun i => (f ↑↑i)⁻¹ * f (succ i)) (castSucc x) = f (castSucc x)\n⊢ (f 0 • partialProd fun i => (f ↑↑i)⁻¹ * f (succ i)) (succ x) = f (succ x)\n[PROOFSTEP]\nsimp only [coe_eq_castSucc, Pi.smul_apply, smul_eq_mul] at hx ⊢\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Monoid α\nn : ℕ\nG : Type u_3\ninst✝ : Group G\nf : Fin (n + 1) → G\nx✝ : Fin (n + 1)\nx : Fin n\nhx : f 0 * partialProd (fun i => (f (castSucc i))⁻¹ * f (succ i)) (castSucc x) = f (castSucc x)\n⊢ f 0 * partialProd (fun i => (f (castSucc i))⁻¹ * f (succ i)) (succ x) = f (succ x)\n[PROOFSTEP]\nrw [partialProd_succ, ← mul_assoc, hx, mul_inv_cancel_left]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Monoid α\nn : ℕ\nG : Type u_3\ninst✝ : Group G\nf : Fin n → G\ni : Fin n\n⊢ (partialProd f (castSucc i))⁻¹ * partialProd f (succ i) = f i\n[PROOFSTEP]\ncases' i with i hn\n[GOAL]\ncase mk\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Monoid α\nn : ℕ\nG : Type u_3\ninst✝ : Group G\nf : Fin n → G\ni : ℕ\nhn : i < n\n⊢ (partialProd f (castSucc { val := i, isLt := hn }))⁻¹ * partialProd f (succ { val := i, isLt := hn }) =\n    f { val := i, isLt := hn }\n[PROOFSTEP]\ninduction i with\n| zero => simp [-Fin.succ_mk, partialProd_succ]\n| succ i hi =>\n  specialize hi (lt_trans (Nat.lt_succ_self i) hn)\n  simp only [Fin.coe_eq_castSucc, Fin.succ_mk, Fin.castSucc_mk] at hi ⊢\n  rw [← Fin.succ_mk _ _ (lt_trans (Nat.lt_succ_self _) hn), ← Fin.succ_mk]\n  rw [Nat.succ_eq_add_one] at hn \n  simp only [partialProd_succ, mul_inv_rev, Fin.castSucc_mk]\n    -- Porting note: was\n        -- assoc_rw [hi, inv_mul_cancel_left]\n  rw [← mul_assoc, mul_left_eq_self, mul_assoc, hi, mul_left_inv]\n[GOAL]\ncase mk\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Monoid α\nn : ℕ\nG : Type u_3\ninst✝ : Group G\nf : Fin n → G\ni : ℕ\nhn : i < n\n⊢ (partialProd f (castSucc { val := i, isLt := hn }))⁻¹ * partialProd f (succ { val := i, isLt := hn }) =\n    f { val := i, isLt := hn }\n[PROOFSTEP]\ninduction i with\n| zero => simp [-Fin.succ_mk, partialProd_succ]\n| succ i hi =>\n  specialize hi (lt_trans (Nat.lt_succ_self i) hn)\n  simp only [Fin.coe_eq_castSucc, Fin.succ_mk, Fin.castSucc_mk] at hi ⊢\n  rw [← Fin.succ_mk _ _ (lt_trans (Nat.lt_succ_self _) hn), ← Fin.succ_mk]\n  rw [Nat.succ_eq_add_one] at hn \n  simp only [partialProd_succ, mul_inv_rev, Fin.castSucc_mk]\n    -- Porting note: was\n        -- assoc_rw [hi, inv_mul_cancel_left]\n  rw [← mul_assoc, mul_left_eq_self, mul_assoc, hi, mul_left_inv]\n[GOAL]\ncase mk.zero\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Monoid α\nn : ℕ\nG : Type u_3\ninst✝ : Group G\nf : Fin n → G\nhn : Nat.zero < n\n⊢ (partialProd f (castSucc { val := Nat.zero, isLt := hn }))⁻¹ * partialProd f (succ { val := Nat.zero, isLt := hn }) =\n    f { val := Nat.zero, isLt := hn }\n[PROOFSTEP]\n\n| zero => simp [-Fin.succ_mk, partialProd_succ]\n[GOAL]\ncase mk.zero\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Monoid α\nn : ℕ\nG : Type u_3\ninst✝ : Group G\nf : Fin n → G\nhn : Nat.zero < n\n⊢ (partialProd f (castSucc { val := Nat.zero, isLt := hn }))⁻¹ * partialProd f (succ { val := Nat.zero, isLt := hn }) =\n    f { val := Nat.zero, isLt := hn }\n[PROOFSTEP]\nsimp [-Fin.succ_mk, partialProd_succ]\n[GOAL]\ncase mk.succ\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Monoid α\nn : ℕ\nG : Type u_3\ninst✝ : Group G\nf : Fin n → G\ni : ℕ\nhi :\n  ∀ (hn : i < n),\n    (partialProd f (castSucc { val := i, isLt := hn }))⁻¹ * partialProd f (succ { val := i, isLt := hn }) =\n      f { val := i, isLt := hn }\nhn : Nat.succ i < n\n⊢ (partialProd f (castSucc { val := Nat.succ i, isLt := hn }))⁻¹ *\n      partialProd f (succ { val := Nat.succ i, isLt := hn }) =\n    f { val := Nat.succ i, isLt := hn }\n[PROOFSTEP]\n\n| succ i hi =>\n  specialize hi (lt_trans (Nat.lt_succ_self i) hn)\n  simp only [Fin.coe_eq_castSucc, Fin.succ_mk, Fin.castSucc_mk] at hi ⊢\n  rw [← Fin.succ_mk _ _ (lt_trans (Nat.lt_succ_self _) hn), ← Fin.succ_mk]\n  rw [Nat.succ_eq_add_one] at hn \n  simp only [partialProd_succ, mul_inv_rev, Fin.castSucc_mk]\n    -- Porting note: was\n        -- assoc_rw [hi, inv_mul_cancel_left]\n  rw [← mul_assoc, mul_left_eq_self, mul_assoc, hi, mul_left_inv]\n[GOAL]\ncase mk.succ\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Monoid α\nn : ℕ\nG : Type u_3\ninst✝ : Group G\nf : Fin n → G\ni : ℕ\nhi :\n  ∀ (hn : i < n),\n    (partialProd f (castSucc { val := i, isLt := hn }))⁻¹ * partialProd f (succ { val := i, isLt := hn }) =\n      f { val := i, isLt := hn }\nhn : Nat.succ i < n\n⊢ (partialProd f (castSucc { val := Nat.succ i, isLt := hn }))⁻¹ *\n      partialProd f (succ { val := Nat.succ i, isLt := hn }) =\n    f { val := Nat.succ i, isLt := hn }\n[PROOFSTEP]\nspecialize hi (lt_trans (Nat.lt_succ_self i) hn)\n[GOAL]\ncase mk.succ\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Monoid α\nn : ℕ\nG : Type u_3\ninst✝ : Group G\nf : Fin n → G\ni : ℕ\nhn : Nat.succ i < n\nhi :\n  (partialProd f (castSucc { val := i, isLt := (_ : i < n) }))⁻¹ *\n      partialProd f (succ { val := i, isLt := (_ : i < n) }) =\n    f { val := i, isLt := (_ : i < n) }\n⊢ (partialProd f (castSucc { val := Nat.succ i, isLt := hn }))⁻¹ *\n      partialProd f (succ { val := Nat.succ i, isLt := hn }) =\n    f { val := Nat.succ i, isLt := hn }\n[PROOFSTEP]\nsimp only [Fin.coe_eq_castSucc, Fin.succ_mk, Fin.castSucc_mk] at hi ⊢\n[GOAL]\ncase mk.succ\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Monoid α\nn : ℕ\nG : Type u_3\ninst✝ : Group G\nf : Fin n → G\ni : ℕ\nhn : Nat.succ i < n\nhi :\n  (partialProd f { val := i, isLt := (_ : i < Nat.succ n) })⁻¹ *\n      partialProd f { val := i + 1, isLt := (_ : Nat.succ i < Nat.succ n) } =\n    f { val := i, isLt := (_ : i < n) }\n⊢ (partialProd f { val := Nat.succ i, isLt := (_ : Nat.succ i < Nat.succ n) })⁻¹ *\n      partialProd f { val := Nat.succ i + 1, isLt := (_ : Nat.succ (Nat.succ i) < Nat.succ n) } =\n    f { val := Nat.succ i, isLt := hn }\n[PROOFSTEP]\nrw [← Fin.succ_mk _ _ (lt_trans (Nat.lt_succ_self _) hn), ← Fin.succ_mk]\n[GOAL]\ncase mk.succ\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Monoid α\nn : ℕ\nG : Type u_3\ninst✝ : Group G\nf : Fin n → G\ni : ℕ\nhn : Nat.succ i < n\nhi :\n  (partialProd f { val := i, isLt := (_ : i < Nat.succ n) })⁻¹ *\n      partialProd f { val := i + 1, isLt := (_ : Nat.succ i < Nat.succ n) } =\n    f { val := i, isLt := (_ : i < n) }\n⊢ (partialProd f (succ { val := i, isLt := (_ : i < n) }))⁻¹ *\n      partialProd f (succ { val := i + 1, isLt := ?mk.succ.h }) =\n    f { val := Nat.succ i, isLt := hn }\ncase mk.succ.h\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Monoid α\nn : ℕ\nG : Type u_3\ninst✝ : Group G\nf : Fin n → G\ni : ℕ\nhn : Nat.succ i < n\nhi :\n  (partialProd f { val := i, isLt := (_ : i < Nat.succ n) })⁻¹ *\n      partialProd f { val := i + 1, isLt := (_ : Nat.succ i < Nat.succ n) } =\n    f { val := i, isLt := (_ : i < n) }\n⊢ i + 1 < n\n[PROOFSTEP]\nrw [Nat.succ_eq_add_one] at hn \n[GOAL]\ncase mk.succ\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Monoid α\nn : ℕ\nG : Type u_3\ninst✝ : Group G\nf : Fin n → G\ni : ℕ\nhn✝ : Nat.succ i < n\nhn : i + 1 < n\nhi :\n  (partialProd f { val := i, isLt := (_ : i < Nat.succ n) })⁻¹ *\n      partialProd f { val := i + 1, isLt := (_ : Nat.succ i < Nat.succ n) } =\n    f { val := i, isLt := (_ : i < n) }\n⊢ (partialProd f (succ { val := i, isLt := (_ : i < n) }))⁻¹ *\n      partialProd f (succ { val := i + 1, isLt := (_ : i + 1 < n) }) =\n    f { val := Nat.succ i, isLt := hn✝ }\n[PROOFSTEP]\nsimp only [partialProd_succ, mul_inv_rev, Fin.castSucc_mk]\n  -- Porting note: was\n      -- assoc_rw [hi, inv_mul_cancel_left]\n[GOAL]\ncase mk.succ\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Monoid α\nn : ℕ\nG : Type u_3\ninst✝ : Group G\nf : Fin n → G\ni : ℕ\nhn✝ : Nat.succ i < n\nhn : i + 1 < n\nhi :\n  (partialProd f { val := i, isLt := (_ : i < Nat.succ n) })⁻¹ *\n      partialProd f { val := i + 1, isLt := (_ : Nat.succ i < Nat.succ n) } =\n    f { val := i, isLt := (_ : i < n) }\n⊢ (f { val := i, isLt := (_ : i < n) })⁻¹ * (partialProd f { val := i, isLt := (_ : i < Nat.succ n) })⁻¹ *\n      (partialProd f { val := i + 1, isLt := (_ : i + 1 < Nat.succ n) } * f { val := i + 1, isLt := (_ : i + 1 < n) }) =\n    f { val := Nat.succ i, isLt := hn✝ }\n[PROOFSTEP]\nrw [← mul_assoc, mul_left_eq_self, mul_assoc, hi, mul_left_inv]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Monoid α\nn : ℕ\nG : Type u_3\ninst✝ : Group G\ng : Fin (n + 1) → G\nj : Fin (n + 1)\nk : Fin n\n⊢ (partialProd g (succAbove (succ j) (castSucc k)))⁻¹ * partialProd g (succ (succAbove j k)) =\n    contractNth j (fun x x_1 => x * x_1) g k\n[PROOFSTEP]\nrcases lt_trichotomy (k : ℕ) j with (h | h | h)\n[GOAL]\ncase inl\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Monoid α\nn : ℕ\nG : Type u_3\ninst✝ : Group G\ng : Fin (n + 1) → G\nj : Fin (n + 1)\nk : Fin n\nh : ↑k < ↑j\n⊢ (partialProd g (succAbove (succ j) (castSucc k)))⁻¹ * partialProd g (succ (succAbove j k)) =\n    contractNth j (fun x x_1 => x * x_1) g k\n[PROOFSTEP]\nrwa [succAbove_below, succAbove_below, partialProd_right_inv, contractNth_apply_of_lt]\n[GOAL]\ncase inl.h\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Monoid α\nn : ℕ\nG : Type u_3\ninst✝ : Group G\ng : Fin (n + 1) → G\nj : Fin (n + 1)\nk : Fin n\nh : ↑k < ↑j\n⊢ castSucc k < j\n[PROOFSTEP]\nassumption\n[GOAL]\ncase inl.h\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Monoid α\nn : ℕ\nG : Type u_3\ninst✝ : Group G\ng : Fin (n + 1) → G\nj : Fin (n + 1)\nk : Fin n\nh : ↑k < ↑j\n⊢ castSucc (castSucc k) < succ j\n[PROOFSTEP]\nrw [castSucc_lt_iff_succ_le, succ_le_succ_iff, le_iff_val_le_val]\n[GOAL]\ncase inl.h\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Monoid α\nn : ℕ\nG : Type u_3\ninst✝ : Group G\ng : Fin (n + 1) → G\nj : Fin (n + 1)\nk : Fin n\nh : ↑k < ↑j\n⊢ ↑(castSucc k) ≤ ↑j\n[PROOFSTEP]\nexact le_of_lt h\n[GOAL]\ncase inr.inl\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Monoid α\nn : ℕ\nG : Type u_3\ninst✝ : Group G\ng : Fin (n + 1) → G\nj : Fin (n + 1)\nk : Fin n\nh : ↑k = ↑j\n⊢ (partialProd g (succAbove (succ j) (castSucc k)))⁻¹ * partialProd g (succ (succAbove j k)) =\n    contractNth j (fun x x_1 => x * x_1) g k\n[PROOFSTEP]\nrwa [succAbove_below, succAbove_above, partialProd_succ, castSucc_fin_succ, ← mul_assoc, partialProd_right_inv,\n  contractNth_apply_of_eq]\n[GOAL]\ncase inr.inl.h\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Monoid α\nn : ℕ\nG : Type u_3\ninst✝ : Group G\ng : Fin (n + 1) → G\nj : Fin (n + 1)\nk : Fin n\nh : ↑k = ↑j\n⊢ j ≤ castSucc k\n[PROOFSTEP]\nsimp [le_iff_val_le_val, ← h]\n[GOAL]\ncase inr.inl.h\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Monoid α\nn : ℕ\nG : Type u_3\ninst✝ : Group G\ng : Fin (n + 1) → G\nj : Fin (n + 1)\nk : Fin n\nh : ↑k = ↑j\n⊢ castSucc (castSucc k) < succ j\n[PROOFSTEP]\nrw [castSucc_lt_iff_succ_le, succ_le_succ_iff, le_iff_val_le_val]\n[GOAL]\ncase inr.inl.h\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Monoid α\nn : ℕ\nG : Type u_3\ninst✝ : Group G\ng : Fin (n + 1) → G\nj : Fin (n + 1)\nk : Fin n\nh : ↑k = ↑j\n⊢ ↑(castSucc k) ≤ ↑j\n[PROOFSTEP]\nexact le_of_eq h\n[GOAL]\ncase inr.inr\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Monoid α\nn : ℕ\nG : Type u_3\ninst✝ : Group G\ng : Fin (n + 1) → G\nj : Fin (n + 1)\nk : Fin n\nh : ↑j < ↑k\n⊢ (partialProd g (succAbove (succ j) (castSucc k)))⁻¹ * partialProd g (succ (succAbove j k)) =\n    contractNth j (fun x x_1 => x * x_1) g k\n[PROOFSTEP]\nrwa [succAbove_above, succAbove_above, partialProd_succ, partialProd_succ, castSucc_fin_succ, partialProd_succ,\n  inv_mul_cancel_left, contractNth_apply_of_gt]\n[GOAL]\ncase inr.inr.h\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Monoid α\nn : ℕ\nG : Type u_3\ninst✝ : Group G\ng : Fin (n + 1) → G\nj : Fin (n + 1)\nk : Fin n\nh : ↑j < ↑k\n⊢ j ≤ castSucc k\n[PROOFSTEP]\nexact le_iff_val_le_val.2 (le_of_lt h)\n[GOAL]\ncase inr.inr.h\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Monoid α\nn : ℕ\nG : Type u_3\ninst✝ : Group G\ng : Fin (n + 1) → G\nj : Fin (n + 1)\nk : Fin n\nh : ↑j < ↑k\n⊢ succ j ≤ castSucc (castSucc k)\n[PROOFSTEP]\nrw [le_iff_val_le_val, val_succ]\n[GOAL]\ncase inr.inr.h\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Monoid α\nn : ℕ\nG : Type u_3\ninst✝ : Group G\ng : Fin (n + 1) → G\nj : Fin (n + 1)\nk : Fin n\nh : ↑j < ↑k\n⊢ ↑j + 1 ≤ ↑(castSucc (castSucc k))\n[PROOFSTEP]\nexact Nat.succ_le_of_lt h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm n : ℕ\n⊢ Fintype.card (Fin n → Fin m) = Fintype.card (Fin (m ^ n))\n[PROOFSTEP]\nsimp_rw [Fintype.card_fun, Fintype.card_fin]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm n : ℕ\nf : Fin n → Fin m\n⊢ ∑ i : Fin n, ↑(f i) * m ^ ↑i < m ^ n\n[PROOFSTEP]\ninduction' n with n ih\n[GOAL]\ncase zero\nα : Type u_1\nβ : Type u_2\nm n : ℕ\nf✝ : Fin n → Fin m\nf : Fin Nat.zero → Fin m\n⊢ ∑ i : Fin Nat.zero, ↑(f i) * m ^ ↑i < m ^ Nat.zero\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\nα : Type u_1\nβ : Type u_2\nm n✝ : ℕ\nf✝ : Fin n✝ → Fin m\nn : ℕ\nih : ∀ (f : Fin n → Fin m), ∑ i : Fin n, ↑(f i) * m ^ ↑i < m ^ n\nf : Fin (Nat.succ n) → Fin m\n⊢ ∑ i : Fin (Nat.succ n), ↑(f i) * m ^ ↑i < m ^ Nat.succ n\n[PROOFSTEP]\ncases m\n[GOAL]\ncase succ.zero\nα : Type u_1\nβ : Type u_2\nn✝ n : ℕ\nf✝ : Fin n✝ → Fin Nat.zero\nih : ∀ (f : Fin n → Fin Nat.zero), ∑ i : Fin n, ↑(f i) * Nat.zero ^ ↑i < Nat.zero ^ n\nf : Fin (Nat.succ n) → Fin Nat.zero\n⊢ ∑ i : Fin (Nat.succ n), ↑(f i) * Nat.zero ^ ↑i < Nat.zero ^ Nat.succ n\n[PROOFSTEP]\ndsimp only [Nat.zero_eq] at f \n[GOAL]\ncase succ.zero\nα : Type u_1\nβ : Type u_2\nn✝ n : ℕ\nf✝ : Fin n✝ → Fin Nat.zero\nih : ∀ (f : Fin n → Fin Nat.zero), ∑ i : Fin n, ↑(f i) * Nat.zero ^ ↑i < Nat.zero ^ n\nf : Fin (Nat.succ n) → Fin 0\n⊢ ∑ i : Fin (Nat.succ n), ↑(f i) * Nat.zero ^ ↑i < Nat.zero ^ Nat.succ n\n[PROOFSTEP]\nexact isEmptyElim (f <| Fin.last _)\n[GOAL]\ncase succ.succ\nα : Type u_1\nβ : Type u_2\nn✝¹ n n✝ : ℕ\nf✝ : Fin n✝¹ → Fin (Nat.succ n✝)\nih : ∀ (f : Fin n → Fin (Nat.succ n✝)), ∑ i : Fin n, ↑(f i) * Nat.succ n✝ ^ ↑i < Nat.succ n✝ ^ n\nf : Fin (Nat.succ n) → Fin (Nat.succ n✝)\n⊢ ∑ i : Fin (Nat.succ n), ↑(f i) * Nat.succ n✝ ^ ↑i < Nat.succ n✝ ^ Nat.succ n\n[PROOFSTEP]\nsimp_rw [Fin.sum_univ_castSucc, Fin.coe_castSucc, Fin.val_last]\n[GOAL]\ncase succ.succ\nα : Type u_1\nβ : Type u_2\nn✝¹ n n✝ : ℕ\nf✝ : Fin n✝¹ → Fin (Nat.succ n✝)\nih : ∀ (f : Fin n → Fin (Nat.succ n✝)), ∑ i : Fin n, ↑(f i) * Nat.succ n✝ ^ ↑i < Nat.succ n✝ ^ n\nf : Fin (Nat.succ n) → Fin (Nat.succ n✝)\n⊢ ∑ x : Fin n, ↑(f (Fin.castSucc x)) * Nat.succ n✝ ^ ↑x + ↑(f (Fin.last n)) * Nat.succ n✝ ^ n < Nat.succ n✝ ^ Nat.succ n\n[PROOFSTEP]\nrefine' (add_lt_add_of_lt_of_le (ih _) <| mul_le_mul_right' (Fin.is_le _) _).trans_eq _\n[GOAL]\ncase succ.succ\nα : Type u_1\nβ : Type u_2\nn✝¹ n n✝ : ℕ\nf✝ : Fin n✝¹ → Fin (Nat.succ n✝)\nih : ∀ (f : Fin n → Fin (Nat.succ n✝)), ∑ i : Fin n, ↑(f i) * Nat.succ n✝ ^ ↑i < Nat.succ n✝ ^ n\nf : Fin (Nat.succ n) → Fin (Nat.succ n✝)\n⊢ Nat.succ n✝ ^ n + n✝ * Nat.succ n✝ ^ n = Nat.succ n✝ ^ Nat.succ n\n[PROOFSTEP]\nrw [← one_add_mul (_ : ℕ), add_comm, pow_succ]\n  -- porting note: added, wrong `succ`\n[GOAL]\ncase succ.succ\nα : Type u_1\nβ : Type u_2\nn✝¹ n n✝ : ℕ\nf✝ : Fin n✝¹ → Fin (Nat.succ n✝)\nih : ∀ (f : Fin n → Fin (Nat.succ n✝)), ∑ i : Fin n, ↑(f i) * Nat.succ n✝ ^ ↑i < Nat.succ n✝ ^ n\nf : Fin (Nat.succ n) → Fin (Nat.succ n✝)\n⊢ (n✝ + 1) * Nat.succ n✝ ^ n = Nat.succ n✝ * Nat.succ n✝ ^ n\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm n : ℕ\na : Fin (m ^ n)\nb : Fin n\n⊢ ↑a / m ^ ↑b % m < m\n[PROOFSTEP]\ncases' n with n\n[GOAL]\ncase zero\nα : Type u_1\nβ : Type u_2\nm : ℕ\na : Fin (m ^ Nat.zero)\nb : Fin Nat.zero\n⊢ ↑a / m ^ ↑b % m < m\n[PROOFSTEP]\nexact b.elim0\n[GOAL]\ncase succ\nα : Type u_1\nβ : Type u_2\nm n : ℕ\na : Fin (m ^ Nat.succ n)\nb : Fin (Nat.succ n)\n⊢ ↑a / m ^ ↑b % m < m\n[PROOFSTEP]\ncases' m with m\n[GOAL]\ncase succ.zero\nα : Type u_1\nβ : Type u_2\nn : ℕ\nb : Fin (Nat.succ n)\na : Fin (Nat.zero ^ Nat.succ n)\n⊢ ↑a / Nat.zero ^ ↑b % Nat.zero < Nat.zero\n[PROOFSTEP]\ndsimp only [Nat.zero_eq] at a \n[GOAL]\ncase succ.zero\nα : Type u_1\nβ : Type u_2\nn : ℕ\nb : Fin (Nat.succ n)\na : Fin (0 ^ Nat.succ n)\n⊢ ↑a / Nat.zero ^ ↑b % Nat.zero < Nat.zero\n[PROOFSTEP]\nrw [zero_pow n.succ_pos] at a \n[GOAL]\ncase succ.zero\nα : Type u_1\nβ : Type u_2\nn : ℕ\nb : Fin (Nat.succ n)\na✝ : Fin (0 ^ Nat.succ n)\na : Fin 0\n⊢ ↑a✝ / Nat.zero ^ ↑b % Nat.zero < Nat.zero\n[PROOFSTEP]\nexact a.elim0\n[GOAL]\ncase succ.succ\nα : Type u_1\nβ : Type u_2\nn : ℕ\nb : Fin (Nat.succ n)\nm : ℕ\na : Fin (Nat.succ m ^ Nat.succ n)\n⊢ ↑a / Nat.succ m ^ ↑b % Nat.succ m < Nat.succ m\n[PROOFSTEP]\nexact Nat.mod_lt _ m.succ_pos\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm n : ℕ\na : Fin (m ^ n)\n⊢ (fun f => { val := ∑ i : Fin n, ↑(f i) * m ^ ↑i, isLt := (_ : ∑ i : Fin n, ↑(f i) * m ^ ↑i < m ^ n) })\n      ((fun a b => { val := ↑a / m ^ ↑b % m, isLt := (_ : ↑a / m ^ ↑b % m < m) }) a) =\n    a\n[PROOFSTEP]\ndsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm n : ℕ\na : Fin (m ^ n)\n⊢ { val := ∑ i : Fin n, ↑a / m ^ ↑i % m * m ^ ↑i,\n      isLt := (_ : ∑ i : Fin n, ↑{ val := ↑a / m ^ ↑i % m, isLt := (_ : ↑a / m ^ ↑i % m < m) } * m ^ ↑i < m ^ n) } =\n    a\n[PROOFSTEP]\ninduction' n with n ih\n[GOAL]\ncase zero\nα : Type u_1\nβ : Type u_2\nm n : ℕ\na✝ : Fin (m ^ n)\na : Fin (m ^ Nat.zero)\n⊢ { val := ∑ i : Fin Nat.zero, ↑a / m ^ ↑i % m * m ^ ↑i,\n      isLt :=\n        (_ :\n          ∑ i : Fin Nat.zero, ↑{ val := ↑a / m ^ ↑i % m, isLt := (_ : ↑a / m ^ ↑i % m < m) } * m ^ ↑i <\n            m ^ Nat.zero) } =\n    a\n[PROOFSTEP]\nhaveI : Subsingleton (Fin (m ^ 0)) := (Fin.castIso <| pow_zero _).toEquiv.subsingleton\n[GOAL]\ncase zero\nα : Type u_1\nβ : Type u_2\nm n : ℕ\na✝ : Fin (m ^ n)\na : Fin (m ^ Nat.zero)\nthis : Subsingleton (Fin (m ^ 0))\n⊢ { val := ∑ i : Fin Nat.zero, ↑a / m ^ ↑i % m * m ^ ↑i,\n      isLt :=\n        (_ :\n          ∑ i : Fin Nat.zero, ↑{ val := ↑a / m ^ ↑i % m, isLt := (_ : ↑a / m ^ ↑i % m < m) } * m ^ ↑i <\n            m ^ Nat.zero) } =\n    a\n[PROOFSTEP]\nexact Subsingleton.elim _ _\n[GOAL]\ncase succ\nα : Type u_1\nβ : Type u_2\nm n✝ : ℕ\na✝ : Fin (m ^ n✝)\nn : ℕ\nih :\n  ∀ (a : Fin (m ^ n)),\n    { val := ∑ i : Fin n, ↑a / m ^ ↑i % m * m ^ ↑i,\n        isLt := (_ : ∑ i : Fin n, ↑{ val := ↑a / m ^ ↑i % m, isLt := (_ : ↑a / m ^ ↑i % m < m) } * m ^ ↑i < m ^ n) } =\n      a\na : Fin (m ^ Nat.succ n)\n⊢ { val := ∑ i : Fin (Nat.succ n), ↑a / m ^ ↑i % m * m ^ ↑i,\n      isLt :=\n        (_ :\n          ∑ i : Fin (Nat.succ n), ↑{ val := ↑a / m ^ ↑i % m, isLt := (_ : ↑a / m ^ ↑i % m < m) } * m ^ ↑i <\n            m ^ Nat.succ n) } =\n    a\n[PROOFSTEP]\nsimp_rw [Fin.forall_iff, Fin.ext_iff] at ih \n[GOAL]\ncase succ\nα : Type u_1\nβ : Type u_2\nm n✝ : ℕ\na✝ : Fin (m ^ n✝)\nn : ℕ\na : Fin (m ^ Nat.succ n)\nih : ∀ (i : ℕ), i < m ^ n → ∑ x : Fin n, i / m ^ ↑x % m * m ^ ↑x = i\n⊢ { val := ∑ i : Fin (Nat.succ n), ↑a / m ^ ↑i % m * m ^ ↑i,\n      isLt :=\n        (_ :\n          ∑ i : Fin (Nat.succ n), ↑{ val := ↑a / m ^ ↑i % m, isLt := (_ : ↑a / m ^ ↑i % m < m) } * m ^ ↑i <\n            m ^ Nat.succ n) } =\n    a\n[PROOFSTEP]\next\n[GOAL]\ncase succ.h\nα : Type u_1\nβ : Type u_2\nm n✝ : ℕ\na✝ : Fin (m ^ n✝)\nn : ℕ\na : Fin (m ^ Nat.succ n)\nih : ∀ (i : ℕ), i < m ^ n → ∑ x : Fin n, i / m ^ ↑x % m * m ^ ↑x = i\n⊢ ↑{ val := ∑ i : Fin (Nat.succ n), ↑a / m ^ ↑i % m * m ^ ↑i,\n        isLt :=\n          (_ :\n            ∑ i : Fin (Nat.succ n), ↑{ val := ↑a / m ^ ↑i % m, isLt := (_ : ↑a / m ^ ↑i % m < m) } * m ^ ↑i <\n              m ^ Nat.succ n) } =\n    ↑a\n[PROOFSTEP]\nsimp_rw [Fin.sum_univ_succ, Fin.val_zero, Fin.val_succ, pow_zero, Nat.div_one, mul_one, pow_succ, ←\n  Nat.div_div_eq_div_mul, mul_left_comm _ m, ← mul_sum]\n[GOAL]\ncase succ.h\nα : Type u_1\nβ : Type u_2\nm n✝ : ℕ\na✝ : Fin (m ^ n✝)\nn : ℕ\na : Fin (m ^ Nat.succ n)\nih : ∀ (i : ℕ), i < m ^ n → ∑ x : Fin n, i / m ^ ↑x % m * m ^ ↑x = i\n⊢ ↑a % m + m * ∑ x : Fin n, ↑a / m / m ^ ↑x % m * m ^ ↑x = ↑a\n[PROOFSTEP]\nrw [ih _ (Nat.div_lt_of_lt_mul ?_), Nat.mod_add_div]\n  -- porting note: replaces `a.is_lt` in the wildcard above. Caused by a refactor of the `npow`\n        -- instance for `Fin`.\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm n✝ : ℕ\na✝ : Fin (m ^ n✝)\nn : ℕ\na : Fin (m ^ Nat.succ n)\nih : ∀ (i : ℕ), i < m ^ n → ∑ x : Fin n, i / m ^ ↑x % m * m ^ ↑x = i\n⊢ ↑a < m * m ^ n\n[PROOFSTEP]\nexact a.is_lt.trans_eq (pow_succ _ _)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm n : ℕ\ninst✝ : NeZero m\ni : Fin n\nj : Fin m\n⊢ ↑(↑finFunctionFinEquiv (Pi.single i j)) = ↑j * m ^ ↑i\n[PROOFSTEP]\nrw [finFunctionFinEquiv_apply, Fintype.sum_eq_single i, Pi.single_eq_same]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm n : ℕ\ninst✝ : NeZero m\ni : Fin n\nj : Fin m\n⊢ ∀ (x : Fin n), x ≠ i → ↑(Pi.single i j x) * m ^ ↑x = 0\n[PROOFSTEP]\nrintro x hx\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm n : ℕ\ninst✝ : NeZero m\ni : Fin n\nj : Fin m\nx : Fin n\nhx : x ≠ i\n⊢ ↑(Pi.single i j x) * m ^ ↑x = 0\n[PROOFSTEP]\nrw [Pi.single_eq_of_ne hx, Fin.val_zero', zero_mul]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : ℕ\nn : Fin m → ℕ\n⊢ Fintype.card ((i : Fin m) → Fin (n i)) = Fintype.card (Fin (∏ i : Fin m, n i))\n[PROOFSTEP]\nsimp_rw [Fintype.card_pi, Fintype.card_fin]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : ℕ\nn : Fin m → ℕ\nf : (i : Fin m) → Fin (n i)\n⊢ ∑ i : Fin m, ↑(f i) * ∏ j : Fin ↑i, n (Fin.castLE (_ : ↑i ≤ m) j) < ∏ i : Fin m, n i\n[PROOFSTEP]\ninduction' m with m ih\n[GOAL]\ncase zero\nα : Type u_1\nβ : Type u_2\nm : ℕ\nn✝ : Fin m → ℕ\nf✝ : (i : Fin m) → Fin (n✝ i)\nn : Fin Nat.zero → ℕ\nf : (i : Fin Nat.zero) → Fin (n i)\n⊢ ∑ i : Fin Nat.zero, ↑(f i) * ∏ j : Fin ↑i, n (Fin.castLE (_ : ↑i ≤ Nat.zero) j) < ∏ i : Fin Nat.zero, n i\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\nα : Type u_1\nβ : Type u_2\nm✝ : ℕ\nn✝ : Fin m✝ → ℕ\nf✝ : (i : Fin m✝) → Fin (n✝ i)\nm : ℕ\nih :\n  ∀ {n : Fin m → ℕ} (f : (i : Fin m) → Fin (n i)),\n    ∑ i : Fin m, ↑(f i) * ∏ j : Fin ↑i, n (Fin.castLE (_ : ↑i ≤ m) j) < ∏ i : Fin m, n i\nn : Fin (Nat.succ m) → ℕ\nf : (i : Fin (Nat.succ m)) → Fin (n i)\n⊢ ∑ i : Fin (Nat.succ m), ↑(f i) * ∏ j : Fin ↑i, n (Fin.castLE (_ : ↑i ≤ Nat.succ m) j) < ∏ i : Fin (Nat.succ m), n i\n[PROOFSTEP]\nrw [Fin.prod_univ_castSucc, Fin.sum_univ_castSucc]\n[GOAL]\ncase succ\nα : Type u_1\nβ : Type u_2\nm✝ : ℕ\nn✝ : Fin m✝ → ℕ\nf✝ : (i : Fin m✝) → Fin (n✝ i)\nm : ℕ\nih :\n  ∀ {n : Fin m → ℕ} (f : (i : Fin m) → Fin (n i)),\n    ∑ i : Fin m, ↑(f i) * ∏ j : Fin ↑i, n (Fin.castLE (_ : ↑i ≤ m) j) < ∏ i : Fin m, n i\nn : Fin (Nat.succ m) → ℕ\nf : (i : Fin (Nat.succ m)) → Fin (n i)\n⊢ ∑ i : Fin m,\n        ↑(f (Fin.castSucc i)) * ∏ j : Fin ↑(Fin.castSucc i), n (Fin.castLE (_ : ↑(Fin.castSucc i) ≤ Nat.succ m) j) +\n      ↑(f (Fin.last m)) * ∏ j : Fin ↑(Fin.last m), n (Fin.castLE (_ : ↑(Fin.last m) ≤ Nat.succ m) j) <\n    (∏ i : Fin m, n (Fin.castSucc i)) * n (Fin.last m)\n[PROOFSTEP]\nsuffices\n  ∀ (n : Fin m → ℕ) (nn : ℕ) (f : ∀ i : Fin m, Fin (n i)) (fn : Fin nn),\n    ((∑ i : Fin m, ↑(f i) * ∏ j : Fin i, n (Fin.castLE i.prop.le j)) + ↑fn * ∏ j, n j) < (∏ i : Fin m, n i) * nn\n  by\n  replace := this (Fin.init n) (n (Fin.last _)) (Fin.init f) (f (Fin.last _))\n  rw [← Fin.snoc_init_self f]\n  simp (config := { singlePass := true }) only [← Fin.snoc_init_self n]\n  simp_rw [Fin.snoc_castSucc, Fin.snoc_last, Fin.snoc_init_self n]\n  exact this\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm✝ : ℕ\nn✝ : Fin m✝ → ℕ\nf✝ : (i : Fin m✝) → Fin (n✝ i)\nm : ℕ\nih :\n  ∀ {n : Fin m → ℕ} (f : (i : Fin m) → Fin (n i)),\n    ∑ i : Fin m, ↑(f i) * ∏ j : Fin ↑i, n (Fin.castLE (_ : ↑i ≤ m) j) < ∏ i : Fin m, n i\nn : Fin (Nat.succ m) → ℕ\nf : (i : Fin (Nat.succ m)) → Fin (n i)\nthis :\n  ∀ (n : Fin m → ℕ) (nn : ℕ) (f : (i : Fin m) → Fin (n i)) (fn : Fin nn),\n    ∑ i : Fin m, ↑(f i) * ∏ j : Fin ↑i, n (Fin.castLE (_ : ↑i ≤ m) j) + ↑fn * ∏ j : Fin m, n j < (∏ i : Fin m, n i) * nn\n⊢ ∑ i : Fin m,\n        ↑(f (Fin.castSucc i)) * ∏ j : Fin ↑(Fin.castSucc i), n (Fin.castLE (_ : ↑(Fin.castSucc i) ≤ Nat.succ m) j) +\n      ↑(f (Fin.last m)) * ∏ j : Fin ↑(Fin.last m), n (Fin.castLE (_ : ↑(Fin.last m) ≤ Nat.succ m) j) <\n    (∏ i : Fin m, n (Fin.castSucc i)) * n (Fin.last m)\n[PROOFSTEP]\nreplace := this (Fin.init n) (n (Fin.last _)) (Fin.init f) (f (Fin.last _))\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm✝ : ℕ\nn✝ : Fin m✝ → ℕ\nf✝ : (i : Fin m✝) → Fin (n✝ i)\nm : ℕ\nih :\n  ∀ {n : Fin m → ℕ} (f : (i : Fin m) → Fin (n i)),\n    ∑ i : Fin m, ↑(f i) * ∏ j : Fin ↑i, n (Fin.castLE (_ : ↑i ≤ m) j) < ∏ i : Fin m, n i\nn : Fin (Nat.succ m) → ℕ\nf : (i : Fin (Nat.succ m)) → Fin (n i)\nthis :\n  ∑ i : Fin m, ↑(Fin.init f i) * ∏ j : Fin ↑i, Fin.init n (Fin.castLE (_ : ↑i ≤ m) j) +\n      ↑(f (Fin.last m)) * ∏ j : Fin m, Fin.init n j <\n    (∏ i : Fin m, Fin.init n i) * n (Fin.last m)\n⊢ ∑ i : Fin m,\n        ↑(f (Fin.castSucc i)) * ∏ j : Fin ↑(Fin.castSucc i), n (Fin.castLE (_ : ↑(Fin.castSucc i) ≤ Nat.succ m) j) +\n      ↑(f (Fin.last m)) * ∏ j : Fin ↑(Fin.last m), n (Fin.castLE (_ : ↑(Fin.last m) ≤ Nat.succ m) j) <\n    (∏ i : Fin m, n (Fin.castSucc i)) * n (Fin.last m)\n[PROOFSTEP]\nrw [← Fin.snoc_init_self f]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm✝ : ℕ\nn✝ : Fin m✝ → ℕ\nf✝ : (i : Fin m✝) → Fin (n✝ i)\nm : ℕ\nih :\n  ∀ {n : Fin m → ℕ} (f : (i : Fin m) → Fin (n i)),\n    ∑ i : Fin m, ↑(f i) * ∏ j : Fin ↑i, n (Fin.castLE (_ : ↑i ≤ m) j) < ∏ i : Fin m, n i\nn : Fin (Nat.succ m) → ℕ\nf : (i : Fin (Nat.succ m)) → Fin (n i)\nthis :\n  ∑ i : Fin m, ↑(Fin.init f i) * ∏ j : Fin ↑i, Fin.init n (Fin.castLE (_ : ↑i ≤ m) j) +\n      ↑(f (Fin.last m)) * ∏ j : Fin m, Fin.init n j <\n    (∏ i : Fin m, Fin.init n i) * n (Fin.last m)\n⊢ ∑ i : Fin m,\n        ↑(Fin.snoc (Fin.init f) (f (Fin.last m)) (Fin.castSucc i)) *\n          ∏ j : Fin ↑(Fin.castSucc i), n (Fin.castLE (_ : ↑(Fin.castSucc i) ≤ Nat.succ m) j) +\n      ↑(Fin.snoc (Fin.init f) (f (Fin.last m)) (Fin.last m)) *\n        ∏ j : Fin ↑(Fin.last m), n (Fin.castLE (_ : ↑(Fin.last m) ≤ Nat.succ m) j) <\n    (∏ i : Fin m, n (Fin.castSucc i)) * n (Fin.last m)\n[PROOFSTEP]\nsimp (config := { singlePass := true }) only [← Fin.snoc_init_self n]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm✝ : ℕ\nn✝ : Fin m✝ → ℕ\nf✝ : (i : Fin m✝) → Fin (n✝ i)\nm : ℕ\nih :\n  ∀ {n : Fin m → ℕ} (f : (i : Fin m) → Fin (n i)),\n    ∑ i : Fin m, ↑(f i) * ∏ j : Fin ↑i, n (Fin.castLE (_ : ↑i ≤ m) j) < ∏ i : Fin m, n i\nn : Fin (Nat.succ m) → ℕ\nf : (i : Fin (Nat.succ m)) → Fin (n i)\nthis :\n  ∑ i : Fin m, ↑(Fin.init f i) * ∏ j : Fin ↑i, Fin.init n (Fin.castLE (_ : ↑i ≤ m) j) +\n      ↑(f (Fin.last m)) * ∏ j : Fin m, Fin.init n j <\n    (∏ i : Fin m, Fin.init n i) * n (Fin.last m)\n⊢ ∑ x : Fin m,\n        ↑(Fin.snoc (Fin.init f) (f (Fin.last m)) (Fin.castSucc x)) *\n          ∏ x_1 : Fin ↑(Fin.castSucc x),\n            Fin.snoc (Fin.init n) (n (Fin.last m)) (Fin.castLE (_ : ↑(Fin.castSucc x) ≤ Nat.succ m) x_1) +\n      ↑(Fin.snoc (Fin.init f) (f (Fin.last m)) (Fin.last m)) *\n        ∏ x : Fin ↑(Fin.last m),\n          Fin.snoc (Fin.init n) (n (Fin.last m)) (Fin.castLE (_ : ↑(Fin.last m) ≤ Nat.succ m) x) <\n    (∏ x : Fin m, Fin.snoc (Fin.init n) (n (Fin.last m)) (Fin.castSucc x)) *\n      Fin.snoc (Fin.init n) (n (Fin.last m)) (Fin.last m)\n[PROOFSTEP]\nsimp_rw [Fin.snoc_castSucc, Fin.snoc_last, Fin.snoc_init_self n]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm✝ : ℕ\nn✝ : Fin m✝ → ℕ\nf✝ : (i : Fin m✝) → Fin (n✝ i)\nm : ℕ\nih :\n  ∀ {n : Fin m → ℕ} (f : (i : Fin m) → Fin (n i)),\n    ∑ i : Fin m, ↑(f i) * ∏ j : Fin ↑i, n (Fin.castLE (_ : ↑i ≤ m) j) < ∏ i : Fin m, n i\nn : Fin (Nat.succ m) → ℕ\nf : (i : Fin (Nat.succ m)) → Fin (n i)\nthis :\n  ∑ i : Fin m, ↑(Fin.init f i) * ∏ j : Fin ↑i, Fin.init n (Fin.castLE (_ : ↑i ≤ m) j) +\n      ↑(f (Fin.last m)) * ∏ j : Fin m, Fin.init n j <\n    (∏ i : Fin m, Fin.init n i) * n (Fin.last m)\n⊢ ∑ x : Fin m,\n        ↑(Fin.init f x) * ∏ x_1 : Fin ↑(Fin.castSucc x), n (Fin.castLE (_ : ↑(Fin.castSucc x) ≤ Nat.succ m) x_1) +\n      ↑(f (Fin.last m)) * ∏ x : Fin ↑(Fin.last m), n (Fin.castLE (_ : ↑(Fin.last m) ≤ Nat.succ m) x) <\n    (∏ x : Fin m, Fin.init n x) * n (Fin.last m)\n[PROOFSTEP]\nexact this\n[GOAL]\ncase succ\nα : Type u_1\nβ : Type u_2\nm✝ : ℕ\nn✝ : Fin m✝ → ℕ\nf✝ : (i : Fin m✝) → Fin (n✝ i)\nm : ℕ\nih :\n  ∀ {n : Fin m → ℕ} (f : (i : Fin m) → Fin (n i)),\n    ∑ i : Fin m, ↑(f i) * ∏ j : Fin ↑i, n (Fin.castLE (_ : ↑i ≤ m) j) < ∏ i : Fin m, n i\nn : Fin (Nat.succ m) → ℕ\nf : (i : Fin (Nat.succ m)) → Fin (n i)\n⊢ ∀ (n : Fin m → ℕ) (nn : ℕ) (f : (i : Fin m) → Fin (n i)) (fn : Fin nn),\n    ∑ i : Fin m, ↑(f i) * ∏ j : Fin ↑i, n (Fin.castLE (_ : ↑i ≤ m) j) + ↑fn * ∏ j : Fin m, n j < (∏ i : Fin m, n i) * nn\n[PROOFSTEP]\nintro n nn f fn\n[GOAL]\ncase succ\nα : Type u_1\nβ : Type u_2\nm✝ : ℕ\nn✝¹ : Fin m✝ → ℕ\nf✝¹ : (i : Fin m✝) → Fin (n✝¹ i)\nm : ℕ\nih :\n  ∀ {n : Fin m → ℕ} (f : (i : Fin m) → Fin (n i)),\n    ∑ i : Fin m, ↑(f i) * ∏ j : Fin ↑i, n (Fin.castLE (_ : ↑i ≤ m) j) < ∏ i : Fin m, n i\nn✝ : Fin (Nat.succ m) → ℕ\nf✝ : (i : Fin (Nat.succ m)) → Fin (n✝ i)\nn : Fin m → ℕ\nnn : ℕ\nf : (i : Fin m) → Fin (n i)\nfn : Fin nn\n⊢ ∑ i : Fin m, ↑(f i) * ∏ j : Fin ↑i, n (Fin.castLE (_ : ↑i ≤ m) j) + ↑fn * ∏ j : Fin m, n j < (∏ i : Fin m, n i) * nn\n[PROOFSTEP]\ncases nn\n[GOAL]\ncase succ.zero\nα : Type u_1\nβ : Type u_2\nm✝ : ℕ\nn✝¹ : Fin m✝ → ℕ\nf✝¹ : (i : Fin m✝) → Fin (n✝¹ i)\nm : ℕ\nih :\n  ∀ {n : Fin m → ℕ} (f : (i : Fin m) → Fin (n i)),\n    ∑ i : Fin m, ↑(f i) * ∏ j : Fin ↑i, n (Fin.castLE (_ : ↑i ≤ m) j) < ∏ i : Fin m, n i\nn✝ : Fin (Nat.succ m) → ℕ\nf✝ : (i : Fin (Nat.succ m)) → Fin (n✝ i)\nn : Fin m → ℕ\nf : (i : Fin m) → Fin (n i)\nfn : Fin Nat.zero\n⊢ ∑ i : Fin m, ↑(f i) * ∏ j : Fin ↑i, n (Fin.castLE (_ : ↑i ≤ m) j) + ↑fn * ∏ j : Fin m, n j <\n    (∏ i : Fin m, n i) * Nat.zero\n[PROOFSTEP]\ndsimp only [Nat.zero_eq] at fn \n[GOAL]\ncase succ.zero\nα : Type u_1\nβ : Type u_2\nm✝ : ℕ\nn✝¹ : Fin m✝ → ℕ\nf✝¹ : (i : Fin m✝) → Fin (n✝¹ i)\nm : ℕ\nih :\n  ∀ {n : Fin m → ℕ} (f : (i : Fin m) → Fin (n i)),\n    ∑ i : Fin m, ↑(f i) * ∏ j : Fin ↑i, n (Fin.castLE (_ : ↑i ≤ m) j) < ∏ i : Fin m, n i\nn✝ : Fin (Nat.succ m) → ℕ\nf✝ : (i : Fin (Nat.succ m)) → Fin (n✝ i)\nn : Fin m → ℕ\nf : (i : Fin m) → Fin (n i)\nfn : Fin 0\n⊢ ∑ i : Fin m, ↑(f i) * ∏ j : Fin ↑i, n (Fin.castLE (_ : ↑i ≤ m) j) + ↑fn * ∏ j : Fin m, n j <\n    (∏ i : Fin m, n i) * Nat.zero\n[PROOFSTEP]\nexact isEmptyElim fn\n[GOAL]\ncase succ.succ\nα : Type u_1\nβ : Type u_2\nm✝ : ℕ\nn✝² : Fin m✝ → ℕ\nf✝¹ : (i : Fin m✝) → Fin (n✝² i)\nm : ℕ\nih :\n  ∀ {n : Fin m → ℕ} (f : (i : Fin m) → Fin (n i)),\n    ∑ i : Fin m, ↑(f i) * ∏ j : Fin ↑i, n (Fin.castLE (_ : ↑i ≤ m) j) < ∏ i : Fin m, n i\nn✝¹ : Fin (Nat.succ m) → ℕ\nf✝ : (i : Fin (Nat.succ m)) → Fin (n✝¹ i)\nn : Fin m → ℕ\nf : (i : Fin m) → Fin (n i)\nn✝ : ℕ\nfn : Fin (Nat.succ n✝)\n⊢ ∑ i : Fin m, ↑(f i) * ∏ j : Fin ↑i, n (Fin.castLE (_ : ↑i ≤ m) j) + ↑fn * ∏ j : Fin m, n j <\n    (∏ i : Fin m, n i) * Nat.succ n✝\n[PROOFSTEP]\nrefine' (add_lt_add_of_lt_of_le (ih _) <| mul_le_mul_right' (Fin.is_le _) _).trans_eq _\n[GOAL]\ncase succ.succ\nα : Type u_1\nβ : Type u_2\nm✝ : ℕ\nn✝² : Fin m✝ → ℕ\nf✝¹ : (i : Fin m✝) → Fin (n✝² i)\nm : ℕ\nih :\n  ∀ {n : Fin m → ℕ} (f : (i : Fin m) → Fin (n i)),\n    ∑ i : Fin m, ↑(f i) * ∏ j : Fin ↑i, n (Fin.castLE (_ : ↑i ≤ m) j) < ∏ i : Fin m, n i\nn✝¹ : Fin (Nat.succ m) → ℕ\nf✝ : (i : Fin (Nat.succ m)) → Fin (n✝¹ i)\nn : Fin m → ℕ\nf : (i : Fin m) → Fin (n i)\nn✝ : ℕ\nfn : Fin (Nat.succ n✝)\n⊢ ∏ i : Fin m, n i + n✝ * ∏ j : Fin m, n j = (∏ i : Fin m, n i) * Nat.succ n✝\n[PROOFSTEP]\nrw [← one_add_mul (_ : ℕ), mul_comm, add_comm]\n  -- porting note: added, wrong `succ`\n[GOAL]\ncase succ.succ\nα : Type u_1\nβ : Type u_2\nm✝ : ℕ\nn✝² : Fin m✝ → ℕ\nf✝¹ : (i : Fin m✝) → Fin (n✝² i)\nm : ℕ\nih :\n  ∀ {n : Fin m → ℕ} (f : (i : Fin m) → Fin (n i)),\n    ∑ i : Fin m, ↑(f i) * ∏ j : Fin ↑i, n (Fin.castLE (_ : ↑i ≤ m) j) < ∏ i : Fin m, n i\nn✝¹ : Fin (Nat.succ m) → ℕ\nf✝ : (i : Fin (Nat.succ m)) → Fin (n✝¹ i)\nn : Fin m → ℕ\nf : (i : Fin m) → Fin (n i)\nn✝ : ℕ\nfn : Fin (Nat.succ n✝)\n⊢ (∏ i : Fin m, n i) * (n✝ + 1) = (∏ i : Fin m, n i) * Nat.succ n✝\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : ℕ\nn : Fin m → ℕ\na : Fin (∏ i : Fin m, n i)\nb : Fin m\n⊢ (↑a / ∏ j : Fin ↑b, n (Fin.castLE (_ : ↑b ≤ m) j)) % n b < n b\n[PROOFSTEP]\ncases m\n[GOAL]\ncase zero\nα : Type u_1\nβ : Type u_2\nn : Fin Nat.zero → ℕ\na : Fin (∏ i : Fin Nat.zero, n i)\nb : Fin Nat.zero\n⊢ (↑a / ∏ j : Fin ↑b, n (Fin.castLE (_ : ↑b ≤ Nat.zero) j)) % n b < n b\n[PROOFSTEP]\nexact b.elim0\n[GOAL]\ncase succ\nα : Type u_1\nβ : Type u_2\nn✝ : ℕ\nn : Fin (Nat.succ n✝) → ℕ\na : Fin (∏ i : Fin (Nat.succ n✝), n i)\nb : Fin (Nat.succ n✝)\n⊢ (↑a / ∏ j : Fin ↑b, n (Fin.castLE (_ : ↑b ≤ Nat.succ n✝) j)) % n b < n b\n[PROOFSTEP]\ncases' h : n b with nb\n[GOAL]\ncase succ.zero\nα : Type u_1\nβ : Type u_2\nn✝ : ℕ\nn : Fin (Nat.succ n✝) → ℕ\na : Fin (∏ i : Fin (Nat.succ n✝), n i)\nb : Fin (Nat.succ n✝)\nh : n b = Nat.zero\n⊢ (↑a / ∏ j : Fin ↑b, n (Fin.castLE (_ : ↑b ≤ Nat.succ n✝) j)) % Nat.zero < Nat.zero\n[PROOFSTEP]\nrw [prod_eq_zero (Finset.mem_univ _) h] at a \n[GOAL]\ncase succ.zero\nα : Type u_1\nβ : Type u_2\nn✝ : ℕ\nn : Fin (Nat.succ n✝) → ℕ\na✝ : Fin (∏ i : Fin (Nat.succ n✝), n i)\na : Fin 0\nb : Fin (Nat.succ n✝)\nh : n b = Nat.zero\n⊢ (↑a✝ / ∏ j : Fin ↑b, n (Fin.castLE (_ : ↑b ≤ Nat.succ n✝) j)) % Nat.zero < Nat.zero\n[PROOFSTEP]\nexact isEmptyElim a\n[GOAL]\ncase succ.succ\nα : Type u_1\nβ : Type u_2\nn✝ : ℕ\nn : Fin (Nat.succ n✝) → ℕ\na : Fin (∏ i : Fin (Nat.succ n✝), n i)\nb : Fin (Nat.succ n✝)\nnb : ℕ\nh : n b = Nat.succ nb\n⊢ (↑a / ∏ j : Fin ↑b, n (Fin.castLE (_ : ↑b ≤ Nat.succ n✝) j)) % Nat.succ nb < Nat.succ nb\n[PROOFSTEP]\nexact Nat.mod_lt _ nb.succ_pos\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : ℕ\nn : Fin m → ℕ\n⊢ Function.RightInverse\n    (fun a b =>\n      { val := (↑a / ∏ j : Fin ↑b, n (Fin.castLE (_ : ↑b ≤ m) j)) % n b,\n        isLt := (_ : (↑a / ∏ j : Fin ↑b, n (Fin.castLE (_ : ↑b ≤ m) j)) % n b < n b) })\n    fun f =>\n    { val := ∑ i : Fin m, ↑(f i) * ∏ j : Fin ↑i, n (Fin.castLE (_ : ↑i ≤ m) j),\n      isLt := (_ : ∑ i : Fin m, ↑(f i) * ∏ j : Fin ↑i, n (Fin.castLE (_ : ↑i ≤ m) j) < ∏ i : Fin m, n i) }\n[PROOFSTEP]\nintro a\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : ℕ\nn : Fin m → ℕ\na : Fin (∏ i : Fin m, n i)\n⊢ (fun f =>\n        { val := ∑ i : Fin m, ↑(f i) * ∏ j : Fin ↑i, n (Fin.castLE (_ : ↑i ≤ m) j),\n          isLt := (_ : ∑ i : Fin m, ↑(f i) * ∏ j : Fin ↑i, n (Fin.castLE (_ : ↑i ≤ m) j) < ∏ i : Fin m, n i) })\n      ((fun a b =>\n          { val := (↑a / ∏ j : Fin ↑b, n (Fin.castLE (_ : ↑b ≤ m) j)) % n b,\n            isLt := (_ : (↑a / ∏ j : Fin ↑b, n (Fin.castLE (_ : ↑b ≤ m) j)) % n b < n b) })\n        a) =\n    a\n[PROOFSTEP]\nrevert a\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : ℕ\nn : Fin m → ℕ\n⊢ ∀ (a : Fin (∏ i : Fin m, n i)),\n    (fun f =>\n          { val := ∑ i : Fin m, ↑(f i) * ∏ j : Fin ↑i, n (Fin.castLE (_ : ↑i ≤ m) j),\n            isLt := (_ : ∑ i : Fin m, ↑(f i) * ∏ j : Fin ↑i, n (Fin.castLE (_ : ↑i ≤ m) j) < ∏ i : Fin m, n i) })\n        ((fun a b =>\n            { val := (↑a / ∏ j : Fin ↑b, n (Fin.castLE (_ : ↑b ≤ m) j)) % n b,\n              isLt := (_ : (↑a / ∏ j : Fin ↑b, n (Fin.castLE (_ : ↑b ≤ m) j)) % n b < n b) })\n          a) =\n      a\n[PROOFSTEP]\ndsimp only [Fin.val_mk]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : ℕ\nn : Fin m → ℕ\n⊢ ∀ (a : Fin (∏ i : Fin m, n i)),\n    {\n        val :=\n          ∑ i : Fin m,\n            (↑a / ∏ j : Fin ↑i, n (Fin.castLE (_ : ↑i ≤ m) j)) % n i * ∏ j : Fin ↑i, n (Fin.castLE (_ : ↑i ≤ m) j),\n        isLt :=\n          (_ :\n            ∑ i : Fin m,\n                ↑{ val := (↑a / ∏ j : Fin ↑i, n (Fin.castLE (_ : ↑i ≤ m) j)) % n i,\n                      isLt := (_ : (↑a / ∏ j : Fin ↑i, n (Fin.castLE (_ : ↑i ≤ m) j)) % n i < n i) } *\n                  ∏ j : Fin ↑i, n (Fin.castLE (_ : ↑i ≤ m) j) <\n              ∏ i : Fin m, n i) } =\n      a\n[PROOFSTEP]\nrefine' Fin.consInduction _ _ n\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nm : ℕ\nn : Fin m → ℕ\n⊢ ∀ (a : Fin (∏ i : Fin 0, Fin.elim0 i)),\n    {\n        val :=\n          ∑ i : Fin 0,\n            (↑a / ∏ j : Fin ↑i, Fin.elim0 (Fin.castLE (_ : ↑i ≤ 0) j)) % Fin.elim0 i *\n              ∏ j : Fin ↑i, Fin.elim0 (Fin.castLE (_ : ↑i ≤ 0) j),\n        isLt :=\n          (_ :\n            ∑ i : Fin 0,\n                ↑{ val := (↑a / ∏ j : Fin ↑i, Fin.elim0 (Fin.castLE (_ : ↑i ≤ 0) j)) % Fin.elim0 i,\n                      isLt :=\n                        (_ : (↑a / ∏ j : Fin ↑i, Fin.elim0 (Fin.castLE (_ : ↑i ≤ 0) j)) % Fin.elim0 i < Fin.elim0 i) } *\n                  ∏ j : Fin ↑i, Fin.elim0 (Fin.castLE (_ : ↑i ≤ 0) j) <\n              ∏ i : Fin 0, Fin.elim0 i) } =\n      a\n[PROOFSTEP]\nintro a\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nm : ℕ\nn : Fin m → ℕ\na : Fin (∏ i : Fin 0, Fin.elim0 i)\n⊢ {\n      val :=\n        ∑ i : Fin 0,\n          (↑a / ∏ j : Fin ↑i, Fin.elim0 (Fin.castLE (_ : ↑i ≤ 0) j)) % Fin.elim0 i *\n            ∏ j : Fin ↑i, Fin.elim0 (Fin.castLE (_ : ↑i ≤ 0) j),\n      isLt :=\n        (_ :\n          ∑ i : Fin 0,\n              ↑{ val := (↑a / ∏ j : Fin ↑i, Fin.elim0 (Fin.castLE (_ : ↑i ≤ 0) j)) % Fin.elim0 i,\n                    isLt :=\n                      (_ : (↑a / ∏ j : Fin ↑i, Fin.elim0 (Fin.castLE (_ : ↑i ≤ 0) j)) % Fin.elim0 i < Fin.elim0 i) } *\n                ∏ j : Fin ↑i, Fin.elim0 (Fin.castLE (_ : ↑i ≤ 0) j) <\n            ∏ i : Fin 0, Fin.elim0 i) } =\n    a\n[PROOFSTEP]\nhaveI : Subsingleton (Fin (∏ i : Fin 0, i.elim0)) := (Fin.castIso <| prod_empty).toEquiv.subsingleton\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nm : ℕ\nn : Fin m → ℕ\na : Fin (∏ i : Fin 0, Fin.elim0 i)\nthis : Subsingleton (Fin (∏ i : Fin 0, Fin.elim0 i))\n⊢ {\n      val :=\n        ∑ i : Fin 0,\n          (↑a / ∏ j : Fin ↑i, Fin.elim0 (Fin.castLE (_ : ↑i ≤ 0) j)) % Fin.elim0 i *\n            ∏ j : Fin ↑i, Fin.elim0 (Fin.castLE (_ : ↑i ≤ 0) j),\n      isLt :=\n        (_ :\n          ∑ i : Fin 0,\n              ↑{ val := (↑a / ∏ j : Fin ↑i, Fin.elim0 (Fin.castLE (_ : ↑i ≤ 0) j)) % Fin.elim0 i,\n                    isLt :=\n                      (_ : (↑a / ∏ j : Fin ↑i, Fin.elim0 (Fin.castLE (_ : ↑i ≤ 0) j)) % Fin.elim0 i < Fin.elim0 i) } *\n                ∏ j : Fin ↑i, Fin.elim0 (Fin.castLE (_ : ↑i ≤ 0) j) <\n            ∏ i : Fin 0, Fin.elim0 i) } =\n    a\n[PROOFSTEP]\nexact Subsingleton.elim _ _\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nm : ℕ\nn : Fin m → ℕ\n⊢ ∀ {n : ℕ} (x₀ : ℕ) (x : Fin n → ℕ),\n    (∀ (a : Fin (∏ i : Fin n, x i)),\n        {\n            val :=\n              ∑ i : Fin n,\n                (↑a / ∏ j : Fin ↑i, x (Fin.castLE (_ : ↑i ≤ n) j)) % x i * ∏ j : Fin ↑i, x (Fin.castLE (_ : ↑i ≤ n) j),\n            isLt :=\n              (_ :\n                ∑ i : Fin n,\n                    ↑{ val := (↑a / ∏ j : Fin ↑i, x (Fin.castLE (_ : ↑i ≤ n) j)) % x i,\n                          isLt := (_ : (↑a / ∏ j : Fin ↑i, x (Fin.castLE (_ : ↑i ≤ n) j)) % x i < x i) } *\n                      ∏ j : Fin ↑i, x (Fin.castLE (_ : ↑i ≤ n) j) <\n                  ∏ i : Fin n, x i) } =\n          a) →\n      ∀ (a : Fin (∏ i : Fin (n + 1), Fin.cons x₀ x i)),\n        {\n            val :=\n              ∑ i : Fin (n + 1),\n                (↑a / ∏ j : Fin ↑i, Fin.cons x₀ x (Fin.castLE (_ : ↑i ≤ n + 1) j)) % Fin.cons x₀ x i *\n                  ∏ j : Fin ↑i, Fin.cons x₀ x (Fin.castLE (_ : ↑i ≤ n + 1) j),\n            isLt :=\n              (_ :\n                ∑ i : Fin (n + 1),\n                    ↑{ val := (↑a / ∏ j : Fin ↑i, Fin.cons x₀ x (Fin.castLE (_ : ↑i ≤ n + 1) j)) % Fin.cons x₀ x i,\n                          isLt :=\n                            (_ :\n                              (↑a / ∏ j : Fin ↑i, Fin.cons x₀ x (Fin.castLE (_ : ↑i ≤ n + 1) j)) % Fin.cons x₀ x i <\n                                Fin.cons x₀ x i) } *\n                      ∏ j : Fin ↑i, Fin.cons x₀ x (Fin.castLE (_ : ↑i ≤ n + 1) j) <\n                  ∏ i : Fin (n + 1), Fin.cons x₀ x i) } =\n          a\n[PROOFSTEP]\nintro n x xs ih a\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nm : ℕ\nn✝ : Fin m → ℕ\nn x : ℕ\nxs : Fin n → ℕ\nih :\n  ∀ (a : Fin (∏ i : Fin n, xs i)),\n    {\n        val :=\n          ∑ i : Fin n,\n            (↑a / ∏ j : Fin ↑i, xs (Fin.castLE (_ : ↑i ≤ n) j)) % xs i * ∏ j : Fin ↑i, xs (Fin.castLE (_ : ↑i ≤ n) j),\n        isLt :=\n          (_ :\n            ∑ i : Fin n,\n                ↑{ val := (↑a / ∏ j : Fin ↑i, xs (Fin.castLE (_ : ↑i ≤ n) j)) % xs i,\n                      isLt := (_ : (↑a / ∏ j : Fin ↑i, xs (Fin.castLE (_ : ↑i ≤ n) j)) % xs i < xs i) } *\n                  ∏ j : Fin ↑i, xs (Fin.castLE (_ : ↑i ≤ n) j) <\n              ∏ i : Fin n, xs i) } =\n      a\na : Fin (∏ i : Fin (n + 1), Fin.cons x xs i)\n⊢ {\n      val :=\n        ∑ i : Fin (n + 1),\n          (↑a / ∏ j : Fin ↑i, Fin.cons x xs (Fin.castLE (_ : ↑i ≤ n + 1) j)) % Fin.cons x xs i *\n            ∏ j : Fin ↑i, Fin.cons x xs (Fin.castLE (_ : ↑i ≤ n + 1) j),\n      isLt :=\n        (_ :\n          ∑ i : Fin (n + 1),\n              ↑{ val := (↑a / ∏ j : Fin ↑i, Fin.cons x xs (Fin.castLE (_ : ↑i ≤ n + 1) j)) % Fin.cons x xs i,\n                    isLt :=\n                      (_ :\n                        (↑a / ∏ j : Fin ↑i, Fin.cons x xs (Fin.castLE (_ : ↑i ≤ n + 1) j)) % Fin.cons x xs i <\n                          Fin.cons x xs i) } *\n                ∏ j : Fin ↑i, Fin.cons x xs (Fin.castLE (_ : ↑i ≤ n + 1) j) <\n            ∏ i : Fin (n + 1), Fin.cons x xs i) } =\n    a\n[PROOFSTEP]\nsimp_rw [Fin.forall_iff, Fin.ext_iff] at ih \n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nm : ℕ\nn✝ : Fin m → ℕ\nn x : ℕ\nxs : Fin n → ℕ\na : Fin (∏ i : Fin (n + 1), Fin.cons x xs i)\nih :\n  ∀ (i : ℕ),\n    i < ∏ i : Fin n, xs i →\n      ∑ x : Fin n,\n          (i / ∏ j : Fin ↑x, xs (Fin.castLE (_ : ↑x ≤ n) j)) % xs x * ∏ j : Fin ↑x, xs (Fin.castLE (_ : ↑x ≤ n) j) =\n        i\n⊢ {\n      val :=\n        ∑ i : Fin (n + 1),\n          (↑a / ∏ j : Fin ↑i, Fin.cons x xs (Fin.castLE (_ : ↑i ≤ n + 1) j)) % Fin.cons x xs i *\n            ∏ j : Fin ↑i, Fin.cons x xs (Fin.castLE (_ : ↑i ≤ n + 1) j),\n      isLt :=\n        (_ :\n          ∑ i : Fin (n + 1),\n              ↑{ val := (↑a / ∏ j : Fin ↑i, Fin.cons x xs (Fin.castLE (_ : ↑i ≤ n + 1) j)) % Fin.cons x xs i,\n                    isLt :=\n                      (_ :\n                        (↑a / ∏ j : Fin ↑i, Fin.cons x xs (Fin.castLE (_ : ↑i ≤ n + 1) j)) % Fin.cons x xs i <\n                          Fin.cons x xs i) } *\n                ∏ j : Fin ↑i, Fin.cons x xs (Fin.castLE (_ : ↑i ≤ n + 1) j) <\n            ∏ i : Fin (n + 1), Fin.cons x xs i) } =\n    a\n[PROOFSTEP]\next\n[GOAL]\ncase refine'_2.h\nα : Type u_1\nβ : Type u_2\nm : ℕ\nn✝ : Fin m → ℕ\nn x : ℕ\nxs : Fin n → ℕ\na : Fin (∏ i : Fin (n + 1), Fin.cons x xs i)\nih :\n  ∀ (i : ℕ),\n    i < ∏ i : Fin n, xs i →\n      ∑ x : Fin n,\n          (i / ∏ j : Fin ↑x, xs (Fin.castLE (_ : ↑x ≤ n) j)) % xs x * ∏ j : Fin ↑x, xs (Fin.castLE (_ : ↑x ≤ n) j) =\n        i\n⊢ ↑{\n        val :=\n          ∑ i : Fin (n + 1),\n            (↑a / ∏ j : Fin ↑i, Fin.cons x xs (Fin.castLE (_ : ↑i ≤ n + 1) j)) % Fin.cons x xs i *\n              ∏ j : Fin ↑i, Fin.cons x xs (Fin.castLE (_ : ↑i ≤ n + 1) j),\n        isLt :=\n          (_ :\n            ∑ i : Fin (n + 1),\n                ↑{ val := (↑a / ∏ j : Fin ↑i, Fin.cons x xs (Fin.castLE (_ : ↑i ≤ n + 1) j)) % Fin.cons x xs i,\n                      isLt :=\n                        (_ :\n                          (↑a / ∏ j : Fin ↑i, Fin.cons x xs (Fin.castLE (_ : ↑i ≤ n + 1) j)) % Fin.cons x xs i <\n                            Fin.cons x xs i) } *\n                  ∏ j : Fin ↑i, Fin.cons x xs (Fin.castLE (_ : ↑i ≤ n + 1) j) <\n              ∏ i : Fin (n + 1), Fin.cons x xs i) } =\n    ↑a\n[PROOFSTEP]\nsimp_rw [Fin.sum_univ_succ, Fin.cons_succ]\n[GOAL]\ncase refine'_2.h\nα : Type u_1\nβ : Type u_2\nm : ℕ\nn✝ : Fin m → ℕ\nn x : ℕ\nxs : Fin n → ℕ\na : Fin (∏ i : Fin (n + 1), Fin.cons x xs i)\nih :\n  ∀ (i : ℕ),\n    i < ∏ i : Fin n, xs i →\n      ∑ x : Fin n,\n          (i / ∏ j : Fin ↑x, xs (Fin.castLE (_ : ↑x ≤ n) j)) % xs x * ∏ j : Fin ↑x, xs (Fin.castLE (_ : ↑x ≤ n) j) =\n        i\n⊢ (↑a / ∏ j : Fin ↑0, Fin.cons x xs (Fin.castLE (_ : ↑0 ≤ n + 1) j)) % Fin.cons x xs 0 *\n        ∏ j : Fin ↑0, Fin.cons x xs (Fin.castLE (_ : ↑0 ≤ n + 1) j) +\n      ∑ x_1 : Fin n,\n        (↑a / ∏ j : Fin ↑(Fin.succ x_1), Fin.cons x xs (Fin.castLE (_ : ↑(Fin.succ x_1) ≤ n + 1) j)) % xs x_1 *\n          ∏ j : Fin ↑(Fin.succ x_1), Fin.cons x xs (Fin.castLE (_ : ↑(Fin.succ x_1) ≤ n + 1) j) =\n    ↑a\n[PROOFSTEP]\nhave := fun i : Fin n =>\n  Fintype.prod_equiv (Fin.castIso <| Fin.val_succ i).toEquiv\n    (fun j => (Fin.cons x xs : _ → ℕ) (Fin.castLE (Fin.is_lt _).le j))\n    (fun j => (Fin.cons x xs : _ → ℕ) (Fin.castLE (Nat.succ_le_succ (Fin.is_lt _).le) j)) fun j => rfl\n[GOAL]\ncase refine'_2.h\nα : Type u_1\nβ : Type u_2\nm : ℕ\nn✝ : Fin m → ℕ\nn x : ℕ\nxs : Fin n → ℕ\na : Fin (∏ i : Fin (n + 1), Fin.cons x xs i)\nih :\n  ∀ (i : ℕ),\n    i < ∏ i : Fin n, xs i →\n      ∑ x : Fin n,\n          (i / ∏ j : Fin ↑x, xs (Fin.castLE (_ : ↑x ≤ n) j)) % xs x * ∏ j : Fin ↑x, xs (Fin.castLE (_ : ↑x ≤ n) j) =\n        i\nthis :\n  ∀ (i : Fin n),\n    ∏ x_1 : Fin ↑(Fin.succ i), Fin.cons x xs (Fin.castLE (_ : ↑(Fin.succ i) ≤ n + 1) x_1) =\n      ∏ x_1 : Fin (↑i + 1), Fin.cons x xs (Fin.castLE (_ : Nat.succ ↑i ≤ Nat.succ n) x_1)\n⊢ (↑a / ∏ j : Fin ↑0, Fin.cons x xs (Fin.castLE (_ : ↑0 ≤ n + 1) j)) % Fin.cons x xs 0 *\n        ∏ j : Fin ↑0, Fin.cons x xs (Fin.castLE (_ : ↑0 ≤ n + 1) j) +\n      ∑ x_1 : Fin n,\n        (↑a / ∏ j : Fin ↑(Fin.succ x_1), Fin.cons x xs (Fin.castLE (_ : ↑(Fin.succ x_1) ≤ n + 1) j)) % xs x_1 *\n          ∏ j : Fin ↑(Fin.succ x_1), Fin.cons x xs (Fin.castLE (_ : ↑(Fin.succ x_1) ≤ n + 1) j) =\n    ↑a\n[PROOFSTEP]\nsimp_rw [this]\n[GOAL]\ncase refine'_2.h\nα : Type u_1\nβ : Type u_2\nm : ℕ\nn✝ : Fin m → ℕ\nn x : ℕ\nxs : Fin n → ℕ\na : Fin (∏ i : Fin (n + 1), Fin.cons x xs i)\nih :\n  ∀ (i : ℕ),\n    i < ∏ i : Fin n, xs i →\n      ∑ x : Fin n,\n          (i / ∏ j : Fin ↑x, xs (Fin.castLE (_ : ↑x ≤ n) j)) % xs x * ∏ j : Fin ↑x, xs (Fin.castLE (_ : ↑x ≤ n) j) =\n        i\nthis :\n  ∀ (i : Fin n),\n    ∏ x_1 : Fin ↑(Fin.succ i), Fin.cons x xs (Fin.castLE (_ : ↑(Fin.succ i) ≤ n + 1) x_1) =\n      ∏ x_1 : Fin (↑i + 1), Fin.cons x xs (Fin.castLE (_ : Nat.succ ↑i ≤ Nat.succ n) x_1)\n⊢ (↑a / ∏ j : Fin ↑0, Fin.cons x xs (Fin.castLE (_ : ↑0 ≤ n + 1) j)) % Fin.cons x xs 0 *\n        ∏ j : Fin ↑0, Fin.cons x xs (Fin.castLE (_ : ↑0 ≤ n + 1) j) +\n      ∑ x_1 : Fin n,\n        (↑a / ∏ x_2 : Fin (↑x_1 + 1), Fin.cons x xs (Fin.castLE (_ : Nat.succ ↑x_1 ≤ Nat.succ n) x_2)) % xs x_1 *\n          ∏ x_2 : Fin (↑x_1 + 1), Fin.cons x xs (Fin.castLE (_ : Nat.succ ↑x_1 ≤ Nat.succ n) x_2) =\n    ↑a\n[PROOFSTEP]\nclear this\n[GOAL]\ncase refine'_2.h\nα : Type u_1\nβ : Type u_2\nm : ℕ\nn✝ : Fin m → ℕ\nn x : ℕ\nxs : Fin n → ℕ\na : Fin (∏ i : Fin (n + 1), Fin.cons x xs i)\nih :\n  ∀ (i : ℕ),\n    i < ∏ i : Fin n, xs i →\n      ∑ x : Fin n,\n          (i / ∏ j : Fin ↑x, xs (Fin.castLE (_ : ↑x ≤ n) j)) % xs x * ∏ j : Fin ↑x, xs (Fin.castLE (_ : ↑x ≤ n) j) =\n        i\n⊢ (↑a / ∏ j : Fin ↑0, Fin.cons x xs (Fin.castLE (_ : ↑0 ≤ n + 1) j)) % Fin.cons x xs 0 *\n        ∏ j : Fin ↑0, Fin.cons x xs (Fin.castLE (_ : ↑0 ≤ n + 1) j) +\n      ∑ x_1 : Fin n,\n        (↑a / ∏ x_2 : Fin (↑x_1 + 1), Fin.cons x xs (Fin.castLE (_ : Nat.succ ↑x_1 ≤ Nat.succ n) x_2)) % xs x_1 *\n          ∏ x_2 : Fin (↑x_1 + 1), Fin.cons x xs (Fin.castLE (_ : Nat.succ ↑x_1 ≤ Nat.succ n) x_2) =\n    ↑a\n[PROOFSTEP]\ndsimp only [Fin.val_zero]\n[GOAL]\ncase refine'_2.h\nα : Type u_1\nβ : Type u_2\nm : ℕ\nn✝ : Fin m → ℕ\nn x : ℕ\nxs : Fin n → ℕ\na : Fin (∏ i : Fin (n + 1), Fin.cons x xs i)\nih :\n  ∀ (i : ℕ),\n    i < ∏ i : Fin n, xs i →\n      ∑ x : Fin n,\n          (i / ∏ j : Fin ↑x, xs (Fin.castLE (_ : ↑x ≤ n) j)) % xs x * ∏ j : Fin ↑x, xs (Fin.castLE (_ : ↑x ≤ n) j) =\n        i\n⊢ (↑a / ∏ j : Fin 0, Fin.cons x xs (Fin.castLE (_ : 0 ≤ n + 1) j)) % Fin.cons x xs 0 *\n        ∏ j : Fin 0, Fin.cons x xs (Fin.castLE (_ : 0 ≤ n + 1) j) +\n      ∑ x_1 : Fin n,\n        (↑a / ∏ x_2 : Fin (↑x_1 + 1), Fin.cons x xs (Fin.castLE (_ : Nat.succ ↑x_1 ≤ Nat.succ n) x_2)) % xs x_1 *\n          ∏ x_2 : Fin (↑x_1 + 1), Fin.cons x xs (Fin.castLE (_ : Nat.succ ↑x_1 ≤ Nat.succ n) x_2) =\n    ↑a\n[PROOFSTEP]\nsimp_rw [Fintype.prod_empty, Nat.div_one, mul_one, Fin.cons_zero, Fin.prod_univ_succ]\n[GOAL]\ncase refine'_2.h\nα : Type u_1\nβ : Type u_2\nm : ℕ\nn✝ : Fin m → ℕ\nn x : ℕ\nxs : Fin n → ℕ\na : Fin (∏ i : Fin (n + 1), Fin.cons x xs i)\nih :\n  ∀ (i : ℕ),\n    i < ∏ i : Fin n, xs i →\n      ∑ x : Fin n,\n          (i / ∏ j : Fin ↑x, xs (Fin.castLE (_ : ↑x ≤ n) j)) % xs x * ∏ j : Fin ↑x, xs (Fin.castLE (_ : ↑x ≤ n) j) =\n        i\n⊢ ↑a % x +\n      ∑ x_1 : Fin n,\n        ↑a /\n              (Fin.cons x xs (Fin.castLE (_ : Nat.succ ↑x_1 ≤ Nat.succ n) 0) *\n                ∏ i : Fin ↑x_1, Fin.cons x xs (Fin.castLE (_ : Nat.succ ↑x_1 ≤ Nat.succ n) (Fin.succ i))) %\n            xs x_1 *\n          (Fin.cons x xs (Fin.castLE (_ : Nat.succ ↑x_1 ≤ Nat.succ n) 0) *\n            ∏ i : Fin ↑x_1, Fin.cons x xs (Fin.castLE (_ : Nat.succ ↑x_1 ≤ Nat.succ n) (Fin.succ i))) =\n    ↑a\n[PROOFSTEP]\nchange (_ + ∑ y : _, _ / (x * _) % _ * (x * _)) = _\n[GOAL]\ncase refine'_2.h\nα : Type u_1\nβ : Type u_2\nm : ℕ\nn✝ : Fin m → ℕ\nn x : ℕ\nxs : Fin n → ℕ\na : Fin (∏ i : Fin (n + 1), Fin.cons x xs i)\nih :\n  ∀ (i : ℕ),\n    i < ∏ i : Fin n, xs i →\n      ∑ x : Fin n,\n          (i / ∏ j : Fin ↑x, xs (Fin.castLE (_ : ↑x ≤ n) j)) % xs x * ∏ j : Fin ↑x, xs (Fin.castLE (_ : ↑x ≤ n) j) =\n        i\n⊢ ↑a % x +\n      ∑ y : Fin n,\n        ↑a / (x * ∏ i : Fin ↑y, Fin.cons x xs (Fin.castLE (_ : Nat.succ ↑y ≤ Nat.succ n) (Fin.succ i))) % xs y *\n          (x * ∏ i : Fin ↑y, Fin.cons x xs (Fin.castLE (_ : Nat.succ ↑y ≤ Nat.succ n) (Fin.succ i))) =\n    ↑a\n[PROOFSTEP]\nsimp_rw [← Nat.div_div_eq_div_mul, mul_left_comm (_ % _ : ℕ), ← mul_sum]\n[GOAL]\ncase refine'_2.h\nα : Type u_1\nβ : Type u_2\nm : ℕ\nn✝ : Fin m → ℕ\nn x : ℕ\nxs : Fin n → ℕ\na : Fin (∏ i : Fin (n + 1), Fin.cons x xs i)\nih :\n  ∀ (i : ℕ),\n    i < ∏ i : Fin n, xs i →\n      ∑ x : Fin n,\n          (i / ∏ j : Fin ↑x, xs (Fin.castLE (_ : ↑x ≤ n) j)) % xs x * ∏ j : Fin ↑x, xs (Fin.castLE (_ : ↑x ≤ n) j) =\n        i\n⊢ ↑a % x +\n      x *\n        ∑ x_1 : Fin n,\n          (↑a / x / ∏ i : Fin ↑x_1, Fin.cons x xs (Fin.castLE (_ : Nat.succ ↑x_1 ≤ Nat.succ n) (Fin.succ i))) % xs x_1 *\n            ∏ i : Fin ↑x_1, Fin.cons x xs (Fin.castLE (_ : Nat.succ ↑x_1 ≤ Nat.succ n) (Fin.succ i)) =\n    ↑a\n[PROOFSTEP]\nconvert\n  Nat.mod_add_div _\n    _\n      -- porting note: new\n[GOAL]\ncase h.e'_2.h.e'_6.h.e'_6\nα : Type u_1\nβ : Type u_2\nm : ℕ\nn✝ : Fin m → ℕ\nn x : ℕ\nxs : Fin n → ℕ\na : Fin (∏ i : Fin (n + 1), Fin.cons x xs i)\nih :\n  ∀ (i : ℕ),\n    i < ∏ i : Fin n, xs i →\n      ∑ x : Fin n,\n          (i / ∏ j : Fin ↑x, xs (Fin.castLE (_ : ↑x ≤ n) j)) % xs x * ∏ j : Fin ↑x, xs (Fin.castLE (_ : ↑x ≤ n) j) =\n        i\n⊢ ∑ x_1 : Fin n,\n      (↑a / x / ∏ i : Fin ↑x_1, Fin.cons x xs (Fin.castLE (_ : Nat.succ ↑x_1 ≤ Nat.succ n) (Fin.succ i))) % xs x_1 *\n        ∏ i : Fin ↑x_1, Fin.cons x xs (Fin.castLE (_ : Nat.succ ↑x_1 ≤ Nat.succ n) (Fin.succ i)) =\n    ↑a / x\n[PROOFSTEP]\nrefine (ih (a / x) (Nat.div_lt_of_lt_mul <| a.is_lt.trans_eq ?_))\n[GOAL]\ncase h.e'_2.h.e'_6.h.e'_6\nα : Type u_1\nβ : Type u_2\nm : ℕ\nn✝ : Fin m → ℕ\nn x : ℕ\nxs : Fin n → ℕ\na : Fin (∏ i : Fin (n + 1), Fin.cons x xs i)\nih :\n  ∀ (i : ℕ),\n    i < ∏ i : Fin n, xs i →\n      ∑ x : Fin n,\n          (i / ∏ j : Fin ↑x, xs (Fin.castLE (_ : ↑x ≤ n) j)) % xs x * ∏ j : Fin ↑x, xs (Fin.castLE (_ : ↑x ≤ n) j) =\n        i\n⊢ ∏ i : Fin (n + 1), Fin.cons x xs i = x * ∏ i : Fin n, xs i\n[PROOFSTEP]\nexact\n  Fin.prod_univ_succ\n    _  -- porting note: was:\n              /-\n              refine' Eq.trans _ (ih (a / x) (Nat.div_lt_of_lt_mul <| a.is_lt.trans_eq _))\n              swap\n              · convert Fin.prod_univ_succ (Fin.cons x xs : ∀ _, ℕ)\n                simp_rw [Fin.cons_succ]\n              congr with i\n              congr with j\n              · cases j\n                rfl\n              · cases j\n                rfl-/\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : ℕ\nn : Fin m → ℕ\ninst✝ : ∀ (i : Fin m), NeZero (n i)\ni : Fin m\nj : Fin (n i)\n⊢ ↑(↑finPiFinEquiv (Pi.single i j)) = ↑j * ∏ j : Fin ↑i, n (Fin.castLE (_ : ↑i ≤ m) j)\n[PROOFSTEP]\nrw [finPiFinEquiv_apply, Fintype.sum_eq_single i, Pi.single_eq_same]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : ℕ\nn : Fin m → ℕ\ninst✝ : ∀ (i : Fin m), NeZero (n i)\ni : Fin m\nj : Fin (n i)\n⊢ ∀ (x : Fin m), x ≠ i → ↑(Pi.single i j x) * ∏ j : Fin ↑x, n (Fin.castLE (_ : ↑x ≤ m) j) = 0\n[PROOFSTEP]\nrintro x hx\n[GOAL]\nα : Type u_1\nβ : Type u_2\nm : ℕ\nn : Fin m → ℕ\ninst✝ : ∀ (i : Fin m), NeZero (n i)\ni : Fin m\nj : Fin (n i)\nx : Fin m\nhx : x ≠ i\n⊢ ↑(Pi.single i j x) * ∏ j : Fin ↑x, n (Fin.castLE (_ : ↑x ≤ m) j) = 0\n[PROOFSTEP]\nrw [Pi.single_eq_of_ne hx, Fin.val_zero', zero_mul]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : CommMonoid α\nn : ℕ\nf : Fin n → α\ni : ℕ\n⊢ prod (take i (ofFn f)) = ∏ j in Finset.filter (fun j => ↑j < i) univ, f j\n[PROOFSTEP]\ninduction i with\n| zero => simp\n| succ i IH =>\n  by_cases h : i < n\n  · have : i < length (ofFn f) := by rwa [length_ofFn f]\n    rw [prod_take_succ _ _ this]\n    have A :\n      ((Finset.univ : Finset (Fin n)).filter fun j => j.val < i + 1) =\n        ((Finset.univ : Finset (Fin n)).filter fun j => j.val < i) ∪ {(⟨i, h⟩ : Fin n)} :=\n      by\n      ext ⟨_, _⟩\n      simp [Nat.lt_succ_iff_lt_or_eq]\n    have B : _root_.Disjoint (Finset.filter (fun j : Fin n => j.val < i) Finset.univ) (singleton (⟨i, h⟩ : Fin n)) := by\n      simp\n    rw [A, Finset.prod_union B, IH]\n    simp\n  · have A : (ofFn f).take i = (ofFn f).take i.succ :=\n      by\n      rw [← length_ofFn f] at h \n      have : length (ofFn f) ≤ i := not_lt.mp h\n      rw [take_all_of_le this, take_all_of_le (le_trans this (Nat.le_succ _))]\n    have B : ∀ j : Fin n, ((j : ℕ) < i.succ) = ((j : ℕ) < i) :=\n      by\n      intro j\n      have : (j : ℕ) < i := lt_of_lt_of_le j.2 (not_lt.mp h)\n      simp [this, lt_trans this (Nat.lt_succ_self _)]\n    simp [← A, B, IH]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : CommMonoid α\nn : ℕ\nf : Fin n → α\ni : ℕ\n⊢ prod (take i (ofFn f)) = ∏ j in Finset.filter (fun j => ↑j < i) univ, f j\n[PROOFSTEP]\ninduction i with\n| zero => simp\n| succ i IH =>\n  by_cases h : i < n\n  · have : i < length (ofFn f) := by rwa [length_ofFn f]\n    rw [prod_take_succ _ _ this]\n    have A :\n      ((Finset.univ : Finset (Fin n)).filter fun j => j.val < i + 1) =\n        ((Finset.univ : Finset (Fin n)).filter fun j => j.val < i) ∪ {(⟨i, h⟩ : Fin n)} :=\n      by\n      ext ⟨_, _⟩\n      simp [Nat.lt_succ_iff_lt_or_eq]\n    have B : _root_.Disjoint (Finset.filter (fun j : Fin n => j.val < i) Finset.univ) (singleton (⟨i, h⟩ : Fin n)) := by\n      simp\n    rw [A, Finset.prod_union B, IH]\n    simp\n  · have A : (ofFn f).take i = (ofFn f).take i.succ :=\n      by\n      rw [← length_ofFn f] at h \n      have : length (ofFn f) ≤ i := not_lt.mp h\n      rw [take_all_of_le this, take_all_of_le (le_trans this (Nat.le_succ _))]\n    have B : ∀ j : Fin n, ((j : ℕ) < i.succ) = ((j : ℕ) < i) :=\n      by\n      intro j\n      have : (j : ℕ) < i := lt_of_lt_of_le j.2 (not_lt.mp h)\n      simp [this, lt_trans this (Nat.lt_succ_self _)]\n    simp [← A, B, IH]\n[GOAL]\ncase zero\nα : Type u_1\nβ : Type u_2\ninst✝ : CommMonoid α\nn : ℕ\nf : Fin n → α\n⊢ prod (take Nat.zero (ofFn f)) = ∏ j in Finset.filter (fun j => ↑j < Nat.zero) univ, f j\n[PROOFSTEP]\n\n| zero => simp\n[GOAL]\ncase zero\nα : Type u_1\nβ : Type u_2\ninst✝ : CommMonoid α\nn : ℕ\nf : Fin n → α\n⊢ prod (take Nat.zero (ofFn f)) = ∏ j in Finset.filter (fun j => ↑j < Nat.zero) univ, f j\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\nα : Type u_1\nβ : Type u_2\ninst✝ : CommMonoid α\nn : ℕ\nf : Fin n → α\ni : ℕ\nIH : prod (take i (ofFn f)) = ∏ j in Finset.filter (fun j => ↑j < i) univ, f j\n⊢ prod (take (Nat.succ i) (ofFn f)) = ∏ j in Finset.filter (fun j => ↑j < Nat.succ i) univ, f j\n[PROOFSTEP]\n\n| succ i IH =>\n  by_cases h : i < n\n  · have : i < length (ofFn f) := by rwa [length_ofFn f]\n    rw [prod_take_succ _ _ this]\n    have A :\n      ((Finset.univ : Finset (Fin n)).filter fun j => j.val < i + 1) =\n        ((Finset.univ : Finset (Fin n)).filter fun j => j.val < i) ∪ {(⟨i, h⟩ : Fin n)} :=\n      by\n      ext ⟨_, _⟩\n      simp [Nat.lt_succ_iff_lt_or_eq]\n    have B : _root_.Disjoint (Finset.filter (fun j : Fin n => j.val < i) Finset.univ) (singleton (⟨i, h⟩ : Fin n)) := by\n      simp\n    rw [A, Finset.prod_union B, IH]\n    simp\n  · have A : (ofFn f).take i = (ofFn f).take i.succ :=\n      by\n      rw [← length_ofFn f] at h \n      have : length (ofFn f) ≤ i := not_lt.mp h\n      rw [take_all_of_le this, take_all_of_le (le_trans this (Nat.le_succ _))]\n    have B : ∀ j : Fin n, ((j : ℕ) < i.succ) = ((j : ℕ) < i) :=\n      by\n      intro j\n      have : (j : ℕ) < i := lt_of_lt_of_le j.2 (not_lt.mp h)\n      simp [this, lt_trans this (Nat.lt_succ_self _)]\n    simp [← A, B, IH]\n[GOAL]\ncase succ\nα : Type u_1\nβ : Type u_2\ninst✝ : CommMonoid α\nn : ℕ\nf : Fin n → α\ni : ℕ\nIH : prod (take i (ofFn f)) = ∏ j in Finset.filter (fun j => ↑j < i) univ, f j\n⊢ prod (take (Nat.succ i) (ofFn f)) = ∏ j in Finset.filter (fun j => ↑j < Nat.succ i) univ, f j\n[PROOFSTEP]\nby_cases h : i < n\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\ninst✝ : CommMonoid α\nn : ℕ\nf : Fin n → α\ni : ℕ\nIH : prod (take i (ofFn f)) = ∏ j in Finset.filter (fun j => ↑j < i) univ, f j\nh : i < n\n⊢ prod (take (Nat.succ i) (ofFn f)) = ∏ j in Finset.filter (fun j => ↑j < Nat.succ i) univ, f j\n[PROOFSTEP]\nhave : i < length (ofFn f) := by rwa [length_ofFn f]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : CommMonoid α\nn : ℕ\nf : Fin n → α\ni : ℕ\nIH : prod (take i (ofFn f)) = ∏ j in Finset.filter (fun j => ↑j < i) univ, f j\nh : i < n\n⊢ i < length (ofFn f)\n[PROOFSTEP]\nrwa [length_ofFn f]\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\ninst✝ : CommMonoid α\nn : ℕ\nf : Fin n → α\ni : ℕ\nIH : prod (take i (ofFn f)) = ∏ j in Finset.filter (fun j => ↑j < i) univ, f j\nh : i < n\nthis : i < length (ofFn f)\n⊢ prod (take (Nat.succ i) (ofFn f)) = ∏ j in Finset.filter (fun j => ↑j < Nat.succ i) univ, f j\n[PROOFSTEP]\nrw [prod_take_succ _ _ this]\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\ninst✝ : CommMonoid α\nn : ℕ\nf : Fin n → α\ni : ℕ\nIH : prod (take i (ofFn f)) = ∏ j in Finset.filter (fun j => ↑j < i) univ, f j\nh : i < n\nthis : i < length (ofFn f)\n⊢ prod (take i (ofFn f)) * nthLe (ofFn f) i this = ∏ j in Finset.filter (fun j => ↑j < Nat.succ i) univ, f j\n[PROOFSTEP]\nhave A :\n  ((Finset.univ : Finset (Fin n)).filter fun j => j.val < i + 1) =\n    ((Finset.univ : Finset (Fin n)).filter fun j => j.val < i) ∪ {(⟨i, h⟩ : Fin n)} :=\n  by\n  ext ⟨_, _⟩\n  simp [Nat.lt_succ_iff_lt_or_eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : CommMonoid α\nn : ℕ\nf : Fin n → α\ni : ℕ\nIH : prod (take i (ofFn f)) = ∏ j in Finset.filter (fun j => ↑j < i) univ, f j\nh : i < n\nthis : i < length (ofFn f)\n⊢ Finset.filter (fun j => ↑j < i + 1) univ = Finset.filter (fun j => ↑j < i) univ ∪ {{ val := i, isLt := h }}\n[PROOFSTEP]\next ⟨_, _⟩\n[GOAL]\ncase a.mk\nα : Type u_1\nβ : Type u_2\ninst✝ : CommMonoid α\nn : ℕ\nf : Fin n → α\ni : ℕ\nIH : prod (take i (ofFn f)) = ∏ j in Finset.filter (fun j => ↑j < i) univ, f j\nh : i < n\nthis : i < length (ofFn f)\nval✝ : ℕ\nisLt✝ : val✝ < n\n⊢ { val := val✝, isLt := isLt✝ } ∈ Finset.filter (fun j => ↑j < i + 1) univ ↔\n    { val := val✝, isLt := isLt✝ } ∈ Finset.filter (fun j => ↑j < i) univ ∪ {{ val := i, isLt := h }}\n[PROOFSTEP]\nsimp [Nat.lt_succ_iff_lt_or_eq]\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\ninst✝ : CommMonoid α\nn : ℕ\nf : Fin n → α\ni : ℕ\nIH : prod (take i (ofFn f)) = ∏ j in Finset.filter (fun j => ↑j < i) univ, f j\nh : i < n\nthis : i < length (ofFn f)\nA : Finset.filter (fun j => ↑j < i + 1) univ = Finset.filter (fun j => ↑j < i) univ ∪ {{ val := i, isLt := h }}\n⊢ prod (take i (ofFn f)) * nthLe (ofFn f) i this = ∏ j in Finset.filter (fun j => ↑j < Nat.succ i) univ, f j\n[PROOFSTEP]\nhave B : _root_.Disjoint (Finset.filter (fun j : Fin n => j.val < i) Finset.univ) (singleton (⟨i, h⟩ : Fin n)) := by\n  simp\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : CommMonoid α\nn : ℕ\nf : Fin n → α\ni : ℕ\nIH : prod (take i (ofFn f)) = ∏ j in Finset.filter (fun j => ↑j < i) univ, f j\nh : i < n\nthis : i < length (ofFn f)\nA : Finset.filter (fun j => ↑j < i + 1) univ = Finset.filter (fun j => ↑j < i) univ ∪ {{ val := i, isLt := h }}\n⊢ _root_.Disjoint (Finset.filter (fun j => ↑j < i) univ) {{ val := i, isLt := h }}\n[PROOFSTEP]\nsimp\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\ninst✝ : CommMonoid α\nn : ℕ\nf : Fin n → α\ni : ℕ\nIH : prod (take i (ofFn f)) = ∏ j in Finset.filter (fun j => ↑j < i) univ, f j\nh : i < n\nthis : i < length (ofFn f)\nA : Finset.filter (fun j => ↑j < i + 1) univ = Finset.filter (fun j => ↑j < i) univ ∪ {{ val := i, isLt := h }}\nB : _root_.Disjoint (Finset.filter (fun j => ↑j < i) univ) {{ val := i, isLt := h }}\n⊢ prod (take i (ofFn f)) * nthLe (ofFn f) i this = ∏ j in Finset.filter (fun j => ↑j < Nat.succ i) univ, f j\n[PROOFSTEP]\nrw [A, Finset.prod_union B, IH]\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\ninst✝ : CommMonoid α\nn : ℕ\nf : Fin n → α\ni : ℕ\nIH : prod (take i (ofFn f)) = ∏ j in Finset.filter (fun j => ↑j < i) univ, f j\nh : i < n\nthis : i < length (ofFn f)\nA : Finset.filter (fun j => ↑j < i + 1) univ = Finset.filter (fun j => ↑j < i) univ ∪ {{ val := i, isLt := h }}\nB : _root_.Disjoint (Finset.filter (fun j => ↑j < i) univ) {{ val := i, isLt := h }}\n⊢ (∏ j in Finset.filter (fun j => ↑j < i) univ, f j) * nthLe (ofFn f) i this =\n    (∏ x in Finset.filter (fun j => ↑j < i) univ, f x) * ∏ x in {{ val := i, isLt := h }}, f x\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\ninst✝ : CommMonoid α\nn : ℕ\nf : Fin n → α\ni : ℕ\nIH : prod (take i (ofFn f)) = ∏ j in Finset.filter (fun j => ↑j < i) univ, f j\nh : ¬i < n\n⊢ prod (take (Nat.succ i) (ofFn f)) = ∏ j in Finset.filter (fun j => ↑j < Nat.succ i) univ, f j\n[PROOFSTEP]\nhave A : (ofFn f).take i = (ofFn f).take i.succ :=\n  by\n  rw [← length_ofFn f] at h \n  have : length (ofFn f) ≤ i := not_lt.mp h\n  rw [take_all_of_le this, take_all_of_le (le_trans this (Nat.le_succ _))]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : CommMonoid α\nn : ℕ\nf : Fin n → α\ni : ℕ\nIH : prod (take i (ofFn f)) = ∏ j in Finset.filter (fun j => ↑j < i) univ, f j\nh : ¬i < n\n⊢ take i (ofFn f) = take (Nat.succ i) (ofFn f)\n[PROOFSTEP]\nrw [← length_ofFn f] at h \n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : CommMonoid α\nn : ℕ\nf : Fin n → α\ni : ℕ\nIH : prod (take i (ofFn f)) = ∏ j in Finset.filter (fun j => ↑j < i) univ, f j\nh : ¬i < length (ofFn f)\n⊢ take i (ofFn f) = take (Nat.succ i) (ofFn f)\n[PROOFSTEP]\nhave : length (ofFn f) ≤ i := not_lt.mp h\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : CommMonoid α\nn : ℕ\nf : Fin n → α\ni : ℕ\nIH : prod (take i (ofFn f)) = ∏ j in Finset.filter (fun j => ↑j < i) univ, f j\nh : ¬i < length (ofFn f)\nthis : length (ofFn f) ≤ i\n⊢ take i (ofFn f) = take (Nat.succ i) (ofFn f)\n[PROOFSTEP]\nrw [take_all_of_le this, take_all_of_le (le_trans this (Nat.le_succ _))]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\ninst✝ : CommMonoid α\nn : ℕ\nf : Fin n → α\ni : ℕ\nIH : prod (take i (ofFn f)) = ∏ j in Finset.filter (fun j => ↑j < i) univ, f j\nh : ¬i < n\nA : take i (ofFn f) = take (Nat.succ i) (ofFn f)\n⊢ prod (take (Nat.succ i) (ofFn f)) = ∏ j in Finset.filter (fun j => ↑j < Nat.succ i) univ, f j\n[PROOFSTEP]\nhave B : ∀ j : Fin n, ((j : ℕ) < i.succ) = ((j : ℕ) < i) :=\n  by\n  intro j\n  have : (j : ℕ) < i := lt_of_lt_of_le j.2 (not_lt.mp h)\n  simp [this, lt_trans this (Nat.lt_succ_self _)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : CommMonoid α\nn : ℕ\nf : Fin n → α\ni : ℕ\nIH : prod (take i (ofFn f)) = ∏ j in Finset.filter (fun j => ↑j < i) univ, f j\nh : ¬i < n\nA : take i (ofFn f) = take (Nat.succ i) (ofFn f)\n⊢ ∀ (j : Fin n), (↑j < Nat.succ i) = (↑j < i)\n[PROOFSTEP]\nintro j\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : CommMonoid α\nn : ℕ\nf : Fin n → α\ni : ℕ\nIH : prod (take i (ofFn f)) = ∏ j in Finset.filter (fun j => ↑j < i) univ, f j\nh : ¬i < n\nA : take i (ofFn f) = take (Nat.succ i) (ofFn f)\nj : Fin n\n⊢ (↑j < Nat.succ i) = (↑j < i)\n[PROOFSTEP]\nhave : (j : ℕ) < i := lt_of_lt_of_le j.2 (not_lt.mp h)\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : CommMonoid α\nn : ℕ\nf : Fin n → α\ni : ℕ\nIH : prod (take i (ofFn f)) = ∏ j in Finset.filter (fun j => ↑j < i) univ, f j\nh : ¬i < n\nA : take i (ofFn f) = take (Nat.succ i) (ofFn f)\nj : Fin n\nthis : ↑j < i\n⊢ (↑j < Nat.succ i) = (↑j < i)\n[PROOFSTEP]\nsimp [this, lt_trans this (Nat.lt_succ_self _)]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\ninst✝ : CommMonoid α\nn : ℕ\nf : Fin n → α\ni : ℕ\nIH : prod (take i (ofFn f)) = ∏ j in Finset.filter (fun j => ↑j < i) univ, f j\nh : ¬i < n\nA : take i (ofFn f) = take (Nat.succ i) (ofFn f)\nB : ∀ (j : Fin n), (↑j < Nat.succ i) = (↑j < i)\n⊢ prod (take (Nat.succ i) (ofFn f)) = ∏ j in Finset.filter (fun j => ↑j < Nat.succ i) univ, f j\n[PROOFSTEP]\nsimp [← A, B, IH]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : CommMonoid α\nn : ℕ\nf : Fin n → α\n⊢ prod (ofFn f) = ∏ i : Fin n, f i\n[PROOFSTEP]\nconvert prod_take_ofFn f n\n[GOAL]\ncase h.e'_2.h.e'_4\nα : Type u_1\nβ : Type u_2\ninst✝ : CommMonoid α\nn : ℕ\nf : Fin n → α\n⊢ ofFn f = take n (ofFn f)\n[PROOFSTEP]\nrw [take_all_of_le (le_of_eq (length_ofFn f))]\n[GOAL]\ncase h.e'_3.h\nα : Type u_1\nβ : Type u_2\ninst✝ : CommMonoid α\nn : ℕ\nf : Fin n → α\n⊢ univ = Finset.filter (fun j => ↑j < n) univ\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : CommGroup G\n⊢ alternatingProd [] = ∏ i : Fin (length []), get [] i ^ (-1) ^ ↑i\n[PROOFSTEP]\nrw [alternatingProd, Finset.prod_eq_one]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : CommGroup G\n⊢ ∀ (x : Fin (length [])), x ∈ univ → get [] x ^ (-1) ^ ↑x = 1\n[PROOFSTEP]\nrintro ⟨i, ⟨⟩⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : CommGroup G\ng : G\n⊢ alternatingProd [g] = ∏ i : Fin (length [g]), get [g] i ^ (-1) ^ ↑i\n[PROOFSTEP]\nshow g = ∏ i : Fin 1, [g].get i ^ (-1 : ℤ) ^ (i : ℕ)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : CommGroup G\ng : G\n⊢ g = ∏ i : Fin 1, get [g] i ^ (-1) ^ ↑i\n[PROOFSTEP]\nrw [Fin.prod_univ_succ]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : CommGroup G\ng : G\n⊢ g = get [g] 0 ^ (-1) ^ ↑0 * ∏ i : Fin 0, get [g] (Fin.succ i) ^ (-1) ^ ↑(Fin.succ i)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : CommGroup G\ng h : G\nL : List G\n⊢ g * h⁻¹ * ∏ i : Fin (length L), get L i ^ (-1) ^ ↑i = ∏ i : Fin (length L + 2), get (g :: h :: L) i ^ (-1) ^ ↑i\n[PROOFSTEP]\n{ rw [Fin.prod_univ_succ, Fin.prod_univ_succ, mul_assoc]\n  simp [Nat.succ_eq_add_one, pow_add]\n}\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : CommGroup G\ng h : G\nL : List G\n⊢ g * h⁻¹ * ∏ i : Fin (length L), get L i ^ (-1) ^ ↑i = ∏ i : Fin (length L + 2), get (g :: h :: L) i ^ (-1) ^ ↑i\n[PROOFSTEP]\nrw [Fin.prod_univ_succ, Fin.prod_univ_succ, mul_assoc]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nG : Type u_3\ninst✝ : CommGroup G\ng h : G\nL : List G\n⊢ g * (h⁻¹ * ∏ i : Fin (length L), get L i ^ (-1) ^ ↑i) =\n    get (g :: h :: L) 0 ^ (-1) ^ ↑0 *\n      (get (g :: h :: L) (Fin.succ 0) ^ (-1) ^ ↑(Fin.succ 0) *\n        ∏ i : Fin (length L), get (g :: h :: L) (Fin.succ (Fin.succ i)) ^ (-1) ^ ↑(Fin.succ (Fin.succ i)))\n[PROOFSTEP]\nsimp [Nat.succ_eq_add_one, pow_add]\n", "meta": {"mathlib_filename": "Mathlib.Algebra.BigOperators.Fin", "llama_tokens": 38484, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7690802370707281, "lm_q2_score": 0.6825737473266736, "lm_q1q2_score": 0.5249539794122534}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : Add α\ninst✝¹ : Semigroup α\ninst✝ : LeftDistribClass α\na b c : α\nh₁ : a ∣ b\nh₂ : a ∣ c\nd : α\nhd : b = a * d\ne : α\nhe : c = a * e\n⊢ a * (d + e) = b + c\n[PROOFSTEP]\nsimp [left_distrib, hd, he]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Semigroup α\ninst✝ : HasDistribNeg α\na b c : α\n⊢ (∃ b_1, -b = a * ↑(Equiv.neg α).symm b_1) ↔ a ∣ b\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Semigroup α\ninst✝ : HasDistribNeg α\na b c : α\n⊢ (∃ b_1, b = a * b_1) ↔ a ∣ b\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Semigroup α\ninst✝ : HasDistribNeg α\na b c : α\n⊢ (∃ b_1, b = -a * ↑(Equiv.neg α).symm b_1) ↔ a ∣ b\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Semigroup α\ninst✝ : HasDistribNeg α\na b c : α\n⊢ (∃ b_1, b = a * b_1) ↔ a ∣ b\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : NonUnitalRing α\na b c : α\nh₁ : a ∣ b\nh₂ : a ∣ c\n⊢ a ∣ b - c\n[PROOFSTEP]\nsimpa only [← sub_eq_add_neg] using h₁.add h₂.neg_right\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : NonUnitalRing α\na b c : α\nh : a ∣ c\nH : a ∣ b + c\n⊢ a ∣ b\n[PROOFSTEP]\nsimpa only [add_sub_cancel] using dvd_sub H h\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : NonUnitalRing α\na b c : α\nh : a ∣ b\n⊢ a ∣ b + c ↔ a ∣ c\n[PROOFSTEP]\nrw [add_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : NonUnitalRing α\na b c : α\nh : a ∣ b\n⊢ a ∣ c + b ↔ a ∣ c\n[PROOFSTEP]\nexact dvd_add_left h\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : NonUnitalRing α\na b c : α\nh : a ∣ c\n⊢ a ∣ b - c ↔ a ∣ b\n[PROOFSTEP]\nsimpa only [← sub_eq_add_neg] using dvd_add_left ((dvd_neg (α := α)).2 h)\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : NonUnitalRing α\na b c : α\nh : a ∣ b\n⊢ a ∣ b - c ↔ a ∣ c\n[PROOFSTEP]\nrw [sub_eq_add_neg, dvd_add_right h, dvd_neg (α := α)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : NonUnitalRing α\na b c : α\nh : a ∣ b - c\n⊢ a ∣ b ↔ a ∣ c\n[PROOFSTEP]\nrw [← sub_add_cancel b c, dvd_add_right h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : NonUnitalRing α\na b c : α\n⊢ a ∣ b - c ↔ a ∣ c - b\n[PROOFSTEP]\nrw [← dvd_neg (α := α), neg_sub]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : NonUnitalCommRing α\na✝ b✝ c k a b x y : α\nhab : k ∣ a - b\nhxy : k ∣ x - y\n⊢ k ∣ a * x - b * y\n[PROOFSTEP]\nconvert dvd_add (hxy.mul_left a) (hab.mul_right y) using 1\n[GOAL]\ncase h.e'_4\nα : Type u_1\nβ : Type u_2\ninst✝ : NonUnitalCommRing α\na✝ b✝ c k a b x y : α\nhab : k ∣ a - b\nhxy : k ∣ x - y\n⊢ a * x - b * y = a * (x - y) + (a - b) * y\n[PROOFSTEP]\nrw [mul_sub_left_distrib, mul_sub_right_distrib]\n[GOAL]\ncase h.e'_4\nα : Type u_1\nβ : Type u_2\ninst✝ : NonUnitalCommRing α\na✝ b✝ c k a b x y : α\nhab : k ∣ a - b\nhxy : k ∣ x - y\n⊢ a * x - b * y = a * x - a * y + (a * y - b * y)\n[PROOFSTEP]\nsimp only [sub_eq_add_neg, add_assoc, neg_add_cancel_left]\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Ring.Divisibility", "llama_tokens": 1523, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7577943822145998, "lm_q2_score": 0.6926419767901475, "lm_q1q2_score": 0.524880198897589}}
{"text": "[GOAL]\nn iv : ℕ\nilt₁ : iv < n\njv : ℕ\njlt₁ : jv < n\nh : { val := iv, isLt := ilt₁ }.val = { val := jv, isLt := jlt₁ }.val\n⊢ { val := iv, isLt := ilt₁ } = { val := jv, isLt := jlt₁ }\n[PROOFSTEP]\ncases h\n[GOAL]\ncase refl\nn iv : ℕ\nilt₁ jlt₁ : iv < n\n⊢ { val := iv, isLt := ilt₁ } = { val := iv, isLt := jlt₁ }\n[PROOFSTEP]\nrfl\n", "meta": {"mathlib_filename": "Mathlib.Init.Data.Fin.Basic", "llama_tokens": 172, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES\n\n", "lm_q1_score": 0.8333245787544825, "lm_q2_score": 0.629774621301746, "lm_q1q2_score": 0.5248066710065412}}
{"text": "[GOAL]\nL : Language\nι : Type v\ninst✝² : Preorder ι\nG : ι → Type w\ninst✝¹ : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\nG' : ℕ → Type w\ninst✝ : (i : ℕ) → Structure L (G' i)\nf' : (n : ℕ) → G' n ↪[L] G' (n + 1)\nm n : ℕ\nh : m ≤ n\n⊢ ↑(natLERec f' m n h) = fun a => Nat.leRecOn h (fun k => ↑(f' k)) a\n[PROOFSTEP]\nobtain ⟨k, rfl⟩ := Nat.exists_eq_add_of_le h\n[GOAL]\ncase intro\nL : Language\nι : Type v\ninst✝² : Preorder ι\nG : ι → Type w\ninst✝¹ : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\nG' : ℕ → Type w\ninst✝ : (i : ℕ) → Structure L (G' i)\nf' : (n : ℕ) → G' n ↪[L] G' (n + 1)\nm k : ℕ\nh : m ≤ m + k\n⊢ ↑(natLERec f' m (m + k) h) = fun a => Nat.leRecOn h (fun k => ↑(f' k)) a\n[PROOFSTEP]\next x\n[GOAL]\ncase intro.h\nL : Language\nι : Type v\ninst✝² : Preorder ι\nG : ι → Type w\ninst✝¹ : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\nG' : ℕ → Type w\ninst✝ : (i : ℕ) → Structure L (G' i)\nf' : (n : ℕ) → G' n ↪[L] G' (n + 1)\nm k : ℕ\nh : m ≤ m + k\nx : G' m\n⊢ ↑(natLERec f' m (m + k) h) x = Nat.leRecOn h (fun k => ↑(f' k)) x\n[PROOFSTEP]\ninduction' k with k ih\n[GOAL]\ncase intro.h.zero\nL : Language\nι : Type v\ninst✝² : Preorder ι\nG : ι → Type w\ninst✝¹ : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\nG' : ℕ → Type w\ninst✝ : (i : ℕ) → Structure L (G' i)\nf' : (n : ℕ) → G' n ↪[L] G' (n + 1)\nm k : ℕ\nh✝ : m ≤ m + k\nx : G' m\nh : m ≤ m + Nat.zero\n⊢ ↑(natLERec f' m (m + Nat.zero) h) x = Nat.leRecOn h (fun k => ↑(f' k)) x\n[PROOFSTEP]\nrw [natLERec, Nat.leRecOn_self, Embedding.refl_apply, Nat.leRecOn_self]\n[GOAL]\ncase intro.h.succ\nL : Language\nι : Type v\ninst✝² : Preorder ι\nG : ι → Type w\ninst✝¹ : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\nG' : ℕ → Type w\ninst✝ : (i : ℕ) → Structure L (G' i)\nf' : (n : ℕ) → G' n ↪[L] G' (n + 1)\nm k✝ : ℕ\nh✝ : m ≤ m + k✝\nx : G' m\nk : ℕ\nih : ∀ (h : m ≤ m + k), ↑(natLERec f' m (m + k) h) x = Nat.leRecOn h (fun k => ↑(f' k)) x\nh : m ≤ m + Nat.succ k\n⊢ ↑(natLERec f' m (m + Nat.succ k) h) x = Nat.leRecOn h (fun k => ↑(f' k)) x\n[PROOFSTEP]\nrw [Nat.leRecOn_succ le_self_add, natLERec, Nat.leRecOn_succ le_self_add, ← natLERec, Embedding.comp_apply, ih]\n[GOAL]\nL : Language\nι : Type v\ninst✝² : Preorder ι\nG : ι → Type w\ninst✝¹ : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\nG' : ℕ → Type w\ninst✝ : (i : ℕ) → Structure L (G' i)\nf' : (n : ℕ) → G' n ↪[L] G' (n + 1)\ni✝ j✝ k✝ : ℕ\nhij : i✝ ≤ j✝\nhjk : j✝ ≤ k✝\n⊢ ∀ (x : G' i✝), ↑(natLERec f' j✝ k✝ hjk) (↑(natLERec f' i✝ j✝ hij) x) = ↑(natLERec f' i✝ k✝ (_ : i✝ ≤ k✝)) x\n[PROOFSTEP]\nsimp [Nat.leRecOn_trans hij hjk]\n[GOAL]\nL : Language\nι : Type v\ninst✝² : Preorder ι\nG : ι → Type w\ninst✝¹ : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\ninst✝ : DirectedSystem G fun i j h => ↑(f i j h)\nα : Type u_1\ni : ι\nx : α → G i\n⊢ unify f (fun a => Structure.Sigma.mk f i (x a)) i\n      (_ : ∀ (j : ι), j ∈ range (Sigma.fst ∘ fun a => Structure.Sigma.mk f i (x a)) → j ≤ i) =\n    x\n[PROOFSTEP]\next a\n[GOAL]\ncase h\nL : Language\nι : Type v\ninst✝² : Preorder ι\nG : ι → Type w\ninst✝¹ : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\ninst✝ : DirectedSystem G fun i j h => ↑(f i j h)\nα : Type u_1\ni : ι\nx : α → G i\na : α\n⊢ unify f (fun a => Structure.Sigma.mk f i (x a)) i\n      (_ : ∀ (j : ι), j ∈ range (Sigma.fst ∘ fun a => Structure.Sigma.mk f i (x a)) → j ≤ i) a =\n    x a\n[PROOFSTEP]\nrw [unify]\n[GOAL]\ncase h\nL : Language\nι : Type v\ninst✝² : Preorder ι\nG : ι → Type w\ninst✝¹ : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\ninst✝ : DirectedSystem G fun i j h => ↑(f i j h)\nα : Type u_1\ni : ι\nx : α → G i\na : α\n⊢ ↑(f (Structure.Sigma.mk f i (x a)).fst i (_ : (Structure.Sigma.mk f i (x a)).fst ≤ i))\n      (Structure.Sigma.mk f i (x a)).snd =\n    x a\n[PROOFSTEP]\napply DirectedSystem.map_self\n[GOAL]\nL : Language\nι : Type v\ninst✝² : Preorder ι\nG : ι → Type w\ninst✝¹ : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\ninst✝ : DirectedSystem G fun i j h => ↑(f i j h)\nα : Type u_1\nx : α → Σˣ f\ni j : ι\nij : i ≤ j\nh : i ∈ upperBounds (range (Sigma.fst ∘ x))\n⊢ ↑(f i j ij) ∘ unify f x i h = unify f x j (_ : ∀ (k : ι), k ∈ range (Sigma.fst ∘ x) → k ≤ j)\n[PROOFSTEP]\next a\n[GOAL]\ncase h\nL : Language\nι : Type v\ninst✝² : Preorder ι\nG : ι → Type w\ninst✝¹ : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\ninst✝ : DirectedSystem G fun i j h => ↑(f i j h)\nα : Type u_1\nx : α → Σˣ f\ni j : ι\nij : i ≤ j\nh : i ∈ upperBounds (range (Sigma.fst ∘ x))\na : α\n⊢ (↑(f i j ij) ∘ unify f x i h) a = unify f x j (_ : ∀ (k : ι), k ∈ range (Sigma.fst ∘ x) → k ≤ j) a\n[PROOFSTEP]\nsimp [unify, DirectedSystem.map_map]\n[GOAL]\nL : Language\nι : Type v\ninst✝³ : Preorder ι\nG : ι → Type w\ninst✝² : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\ninst✝¹ : DirectedSystem G fun i j h => ↑(f i j h)\ninst✝ : IsDirected ι fun x x_1 => x ≤ x_1\nx✝⁴ x✝³ x✝² : Σˣ f\ni : ι\nx : (fun i => G i) i\nj : ι\ny : (fun i => G i) j\nx✝¹ :\n  match { fst := i, snd := x } with\n  | { fst := i, snd := x } =>\n    match { fst := j, snd := y } with\n    | { fst := j, snd := y } => ∃ k ik jk, ↑(f i k ik) x = ↑(f j k jk) y\nk : ι\nz : (fun i => G i) k\nx✝ :\n  match { fst := j, snd := y } with\n  | { fst := i, snd := x } =>\n    match { fst := k, snd := z } with\n    | { fst := j, snd := y } => ∃ k ik jk, ↑(f i k ik) x = ↑(f j k jk) y\nij : ι\nhiij : i ≤ ij\nhjij : j ≤ ij\nhij : ↑(f i ij hiij) x = ↑(f j ij hjij) y\njk : ι\nhjjk : j ≤ jk\nhkjk : k ≤ jk\nhjk : ↑(f j jk hjjk) y = ↑(f k jk hkjk) z\n⊢ match { fst := i, snd := x } with\n  | { fst := i, snd := x } =>\n    match { fst := k, snd := z } with\n    | { fst := j, snd := y } => ∃ k ik jk, ↑(f i k ik) x = ↑(f j k jk) y\n[PROOFSTEP]\nobtain ⟨ijk, hijijk, hjkijk⟩ := directed_of (· ≤ ·) ij jk\n[GOAL]\ncase intro.intro\nL : Language\nι : Type v\ninst✝³ : Preorder ι\nG : ι → Type w\ninst✝² : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\ninst✝¹ : DirectedSystem G fun i j h => ↑(f i j h)\ninst✝ : IsDirected ι fun x x_1 => x ≤ x_1\nx✝⁴ x✝³ x✝² : Σˣ f\ni : ι\nx : (fun i => G i) i\nj : ι\ny : (fun i => G i) j\nx✝¹ :\n  match { fst := i, snd := x } with\n  | { fst := i, snd := x } =>\n    match { fst := j, snd := y } with\n    | { fst := j, snd := y } => ∃ k ik jk, ↑(f i k ik) x = ↑(f j k jk) y\nk : ι\nz : (fun i => G i) k\nx✝ :\n  match { fst := j, snd := y } with\n  | { fst := i, snd := x } =>\n    match { fst := k, snd := z } with\n    | { fst := j, snd := y } => ∃ k ik jk, ↑(f i k ik) x = ↑(f j k jk) y\nij : ι\nhiij : i ≤ ij\nhjij : j ≤ ij\nhij : ↑(f i ij hiij) x = ↑(f j ij hjij) y\njk : ι\nhjjk : j ≤ jk\nhkjk : k ≤ jk\nhjk : ↑(f j jk hjjk) y = ↑(f k jk hkjk) z\nijk : ι\nhijijk : ij ≤ ijk\nhjkijk : jk ≤ ijk\n⊢ match { fst := i, snd := x } with\n  | { fst := i, snd := x } =>\n    match { fst := k, snd := z } with\n    | { fst := j, snd := y } => ∃ k ik jk, ↑(f i k ik) x = ↑(f j k jk) y\n[PROOFSTEP]\nrefine' ⟨ijk, le_trans hiij hijijk, le_trans hkjk hjkijk, _⟩\n[GOAL]\ncase intro.intro\nL : Language\nι : Type v\ninst✝³ : Preorder ι\nG : ι → Type w\ninst✝² : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\ninst✝¹ : DirectedSystem G fun i j h => ↑(f i j h)\ninst✝ : IsDirected ι fun x x_1 => x ≤ x_1\nx✝⁴ x✝³ x✝² : Σˣ f\ni : ι\nx : (fun i => G i) i\nj : ι\ny : (fun i => G i) j\nx✝¹ :\n  match { fst := i, snd := x } with\n  | { fst := i, snd := x } =>\n    match { fst := j, snd := y } with\n    | { fst := j, snd := y } => ∃ k ik jk, ↑(f i k ik) x = ↑(f j k jk) y\nk : ι\nz : (fun i => G i) k\nx✝ :\n  match { fst := j, snd := y } with\n  | { fst := i, snd := x } =>\n    match { fst := k, snd := z } with\n    | { fst := j, snd := y } => ∃ k ik jk, ↑(f i k ik) x = ↑(f j k jk) y\nij : ι\nhiij : i ≤ ij\nhjij : j ≤ ij\nhij : ↑(f i ij hiij) x = ↑(f j ij hjij) y\njk : ι\nhjjk : j ≤ jk\nhkjk : k ≤ jk\nhjk : ↑(f j jk hjjk) y = ↑(f k jk hkjk) z\nijk : ι\nhijijk : ij ≤ ijk\nhjkijk : jk ≤ ijk\n⊢ ↑(f i ijk (_ : i ≤ ijk)) x = ↑(f k ijk (_ : k ≤ ijk)) z\n[PROOFSTEP]\nrw [← DirectedSystem.map_map, hij, DirectedSystem.map_map]\n[GOAL]\ncase intro.intro\nL : Language\nι : Type v\ninst✝³ : Preorder ι\nG : ι → Type w\ninst✝² : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\ninst✝¹ : DirectedSystem G fun i j h => ↑(f i j h)\ninst✝ : IsDirected ι fun x x_1 => x ≤ x_1\nx✝⁴ x✝³ x✝² : Σˣ f\ni : ι\nx : (fun i => G i) i\nj : ι\ny : (fun i => G i) j\nx✝¹ :\n  match { fst := i, snd := x } with\n  | { fst := i, snd := x } =>\n    match { fst := j, snd := y } with\n    | { fst := j, snd := y } => ∃ k ik jk, ↑(f i k ik) x = ↑(f j k jk) y\nk : ι\nz : (fun i => G i) k\nx✝ :\n  match { fst := j, snd := y } with\n  | { fst := i, snd := x } =>\n    match { fst := k, snd := z } with\n    | { fst := j, snd := y } => ∃ k ik jk, ↑(f i k ik) x = ↑(f j k jk) y\nij : ι\nhiij : i ≤ ij\nhjij : j ≤ ij\nhij : ↑(f i ij hiij) x = ↑(f j ij hjij) y\njk : ι\nhjjk : j ≤ jk\nhkjk : k ≤ jk\nhjk : ↑(f j jk hjjk) y = ↑(f k jk hkjk) z\nijk : ι\nhijijk : ij ≤ ijk\nhjkijk : jk ≤ ijk\n⊢ ↑(f j ijk (_ : j ≤ ijk)) y = ↑(f k ijk (_ : k ≤ ijk)) z\ncase intro.intro.hjk\nL : Language\nι : Type v\ninst✝³ : Preorder ι\nG : ι → Type w\ninst✝² : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\ninst✝¹ : DirectedSystem G fun i j h => ↑(f i j h)\ninst✝ : IsDirected ι fun x x_1 => x ≤ x_1\nx✝⁴ x✝³ x✝² : Σˣ f\ni : ι\nx : (fun i => G i) i\nj : ι\ny : (fun i => G i) j\nx✝¹ :\n  match { fst := i, snd := x } with\n  | { fst := i, snd := x } =>\n    match { fst := j, snd := y } with\n    | { fst := j, snd := y } => ∃ k ik jk, ↑(f i k ik) x = ↑(f j k jk) y\nk : ι\nz : (fun i => G i) k\nx✝ :\n  match { fst := j, snd := y } with\n  | { fst := i, snd := x } =>\n    match { fst := k, snd := z } with\n    | { fst := j, snd := y } => ∃ k ik jk, ↑(f i k ik) x = ↑(f j k jk) y\nij : ι\nhiij : i ≤ ij\nhjij : j ≤ ij\nhij : ↑(f i ij hiij) x = ↑(f j ij hjij) y\njk : ι\nhjjk : j ≤ jk\nhkjk : k ≤ jk\nhjk : ↑(f j jk hjjk) y = ↑(f k jk hkjk) z\nijk : ι\nhijijk : ij ≤ ijk\nhjkijk : jk ≤ ijk\n⊢ ij ≤ ijk\ncase intro.intro.hjk\nL : Language\nι : Type v\ninst✝³ : Preorder ι\nG : ι → Type w\ninst✝² : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\ninst✝¹ : DirectedSystem G fun i j h => ↑(f i j h)\ninst✝ : IsDirected ι fun x x_1 => x ≤ x_1\nx✝⁴ x✝³ x✝² : Σˣ f\ni : ι\nx : (fun i => G i) i\nj : ι\ny : (fun i => G i) j\nx✝¹ :\n  match { fst := i, snd := x } with\n  | { fst := i, snd := x } =>\n    match { fst := j, snd := y } with\n    | { fst := j, snd := y } => ∃ k ik jk, ↑(f i k ik) x = ↑(f j k jk) y\nk : ι\nz : (fun i => G i) k\nx✝ :\n  match { fst := j, snd := y } with\n  | { fst := i, snd := x } =>\n    match { fst := k, snd := z } with\n    | { fst := j, snd := y } => ∃ k ik jk, ↑(f i k ik) x = ↑(f j k jk) y\nij : ι\nhiij : i ≤ ij\nhjij : j ≤ ij\nhij : ↑(f i ij hiij) x = ↑(f j ij hjij) y\njk : ι\nhjjk : j ≤ jk\nhkjk : k ≤ jk\nhjk : ↑(f j jk hjjk) y = ↑(f k jk hkjk) z\nijk : ι\nhijijk : ij ≤ ijk\nhjkijk : jk ≤ ijk\n⊢ ij ≤ ijk\ncase intro.intro.hjk\nL : Language\nι : Type v\ninst✝³ : Preorder ι\nG : ι → Type w\ninst✝² : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\ninst✝¹ : DirectedSystem G fun i j h => ↑(f i j h)\ninst✝ : IsDirected ι fun x x_1 => x ≤ x_1\nx✝⁴ x✝³ x✝² : Σˣ f\ni : ι\nx : (fun i => G i) i\nj : ι\ny : (fun i => G i) j\nx✝¹ :\n  match { fst := i, snd := x } with\n  | { fst := i, snd := x } =>\n    match { fst := j, snd := y } with\n    | { fst := j, snd := y } => ∃ k ik jk, ↑(f i k ik) x = ↑(f j k jk) y\nk : ι\nz : (fun i => G i) k\nx✝ :\n  match { fst := j, snd := y } with\n  | { fst := i, snd := x } =>\n    match { fst := k, snd := z } with\n    | { fst := j, snd := y } => ∃ k ik jk, ↑(f i k ik) x = ↑(f j k jk) y\nij : ι\nhiij : i ≤ ij\nhjij : j ≤ ij\nhij : ↑(f i ij hiij) x = ↑(f j ij hjij) y\njk : ι\nhjjk : j ≤ jk\nhkjk : k ≤ jk\nhjk : ↑(f j jk hjjk) y = ↑(f k jk hkjk) z\nijk : ι\nhijijk : ij ≤ ijk\nhjkijk : jk ≤ ijk\n⊢ ij ≤ ijk\n[PROOFSTEP]\nsymm\n[GOAL]\ncase intro.intro\nL : Language\nι : Type v\ninst✝³ : Preorder ι\nG : ι → Type w\ninst✝² : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\ninst✝¹ : DirectedSystem G fun i j h => ↑(f i j h)\ninst✝ : IsDirected ι fun x x_1 => x ≤ x_1\nx✝⁴ x✝³ x✝² : Σˣ f\ni : ι\nx : (fun i => G i) i\nj : ι\ny : (fun i => G i) j\nx✝¹ :\n  match { fst := i, snd := x } with\n  | { fst := i, snd := x } =>\n    match { fst := j, snd := y } with\n    | { fst := j, snd := y } => ∃ k ik jk, ↑(f i k ik) x = ↑(f j k jk) y\nk : ι\nz : (fun i => G i) k\nx✝ :\n  match { fst := j, snd := y } with\n  | { fst := i, snd := x } =>\n    match { fst := k, snd := z } with\n    | { fst := j, snd := y } => ∃ k ik jk, ↑(f i k ik) x = ↑(f j k jk) y\nij : ι\nhiij : i ≤ ij\nhjij : j ≤ ij\nhij : ↑(f i ij hiij) x = ↑(f j ij hjij) y\njk : ι\nhjjk : j ≤ jk\nhkjk : k ≤ jk\nhjk : ↑(f j jk hjjk) y = ↑(f k jk hkjk) z\nijk : ι\nhijijk : ij ≤ ijk\nhjkijk : jk ≤ ijk\n⊢ ↑(f k ijk (_ : k ≤ ijk)) z = ↑(f j ijk (_ : j ≤ ijk)) y\n[PROOFSTEP]\nrw [← DirectedSystem.map_map, ← hjk, DirectedSystem.map_map]\n[GOAL]\ncase intro.intro.hjk\nL : Language\nι : Type v\ninst✝³ : Preorder ι\nG : ι → Type w\ninst✝² : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\ninst✝¹ : DirectedSystem G fun i j h => ↑(f i j h)\ninst✝ : IsDirected ι fun x x_1 => x ≤ x_1\nx✝⁴ x✝³ x✝² : Σˣ f\ni : ι\nx : (fun i => G i) i\nj : ι\ny : (fun i => G i) j\nx✝¹ :\n  match { fst := i, snd := x } with\n  | { fst := i, snd := x } =>\n    match { fst := j, snd := y } with\n    | { fst := j, snd := y } => ∃ k ik jk, ↑(f i k ik) x = ↑(f j k jk) y\nk : ι\nz : (fun i => G i) k\nx✝ :\n  match { fst := j, snd := y } with\n  | { fst := i, snd := x } =>\n    match { fst := k, snd := z } with\n    | { fst := j, snd := y } => ∃ k ik jk, ↑(f i k ik) x = ↑(f j k jk) y\nij : ι\nhiij : i ≤ ij\nhjij : j ≤ ij\nhij : ↑(f i ij hiij) x = ↑(f j ij hjij) y\njk : ι\nhjjk : j ≤ jk\nhkjk : k ≤ jk\nhjk : ↑(f j jk hjjk) y = ↑(f k jk hkjk) z\nijk : ι\nhijijk : ij ≤ ijk\nhjkijk : jk ≤ ijk\n⊢ jk ≤ ijk\n[PROOFSTEP]\nassumption\n[GOAL]\ncase intro.intro.hjk\nL : Language\nι : Type v\ninst✝³ : Preorder ι\nG : ι → Type w\ninst✝² : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\ninst✝¹ : DirectedSystem G fun i j h => ↑(f i j h)\ninst✝ : IsDirected ι fun x x_1 => x ≤ x_1\nx✝⁴ x✝³ x✝² : Σˣ f\ni : ι\nx : (fun i => G i) i\nj : ι\ny : (fun i => G i) j\nx✝¹ :\n  match { fst := i, snd := x } with\n  | { fst := i, snd := x } =>\n    match { fst := j, snd := y } with\n    | { fst := j, snd := y } => ∃ k ik jk, ↑(f i k ik) x = ↑(f j k jk) y\nk : ι\nz : (fun i => G i) k\nx✝ :\n  match { fst := j, snd := y } with\n  | { fst := i, snd := x } =>\n    match { fst := k, snd := z } with\n    | { fst := j, snd := y } => ∃ k ik jk, ↑(f i k ik) x = ↑(f j k jk) y\nij : ι\nhiij : i ≤ ij\nhjij : j ≤ ij\nhij : ↑(f i ij hiij) x = ↑(f j ij hjij) y\njk : ι\nhjjk : j ≤ jk\nhkjk : k ≤ jk\nhjk : ↑(f j jk hjjk) y = ↑(f k jk hkjk) z\nijk : ι\nhijijk : ij ≤ ijk\nhjkijk : jk ≤ ijk\n⊢ ij ≤ ijk\n[PROOFSTEP]\nassumption\n[GOAL]\nL : Language\nι : Type v\ninst✝³ : Preorder ι\nG : ι → Type w\ninst✝² : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\ninst✝¹ : IsDirected ι fun x x_1 => x ≤ x_1\ninst✝ : DirectedSystem G fun i j h => ↑(f i j h)\nx y : Σˣ f\ni : ι\nhx : x.fst ≤ i\nhy : y.fst ≤ i\n⊢ x ≈ y ↔ ↑(f x.fst i hx) x.snd = ↑(f y.fst i hy) y.snd\n[PROOFSTEP]\ncases x\n[GOAL]\ncase mk\nL : Language\nι : Type v\ninst✝³ : Preorder ι\nG : ι → Type w\ninst✝² : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\ninst✝¹ : IsDirected ι fun x x_1 => x ≤ x_1\ninst✝ : DirectedSystem G fun i j h => ↑(f i j h)\ny : Σˣ f\ni : ι\nhy : y.fst ≤ i\nfst✝ : ι\nsnd✝ : (fun i => G i) fst✝\nhx : { fst := fst✝, snd := snd✝ }.fst ≤ i\n⊢ { fst := fst✝, snd := snd✝ } ≈ y ↔\n    ↑(f { fst := fst✝, snd := snd✝ }.fst i hx) { fst := fst✝, snd := snd✝ }.snd = ↑(f y.fst i hy) y.snd\n[PROOFSTEP]\ncases y\n[GOAL]\ncase mk.mk\nL : Language\nι : Type v\ninst✝³ : Preorder ι\nG : ι → Type w\ninst✝² : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\ninst✝¹ : IsDirected ι fun x x_1 => x ≤ x_1\ninst✝ : DirectedSystem G fun i j h => ↑(f i j h)\ni fst✝¹ : ι\nsnd✝¹ : (fun i => G i) fst✝¹\nhx : { fst := fst✝¹, snd := snd✝¹ }.fst ≤ i\nfst✝ : ι\nsnd✝ : (fun i => G i) fst✝\nhy : { fst := fst✝, snd := snd✝ }.fst ≤ i\n⊢ { fst := fst✝¹, snd := snd✝¹ } ≈ { fst := fst✝, snd := snd✝ } ↔\n    ↑(f { fst := fst✝¹, snd := snd✝¹ }.fst i hx) { fst := fst✝¹, snd := snd✝¹ }.snd =\n      ↑(f { fst := fst✝, snd := snd✝ }.fst i hy) { fst := fst✝, snd := snd✝ }.snd\n[PROOFSTEP]\nrefine' ⟨fun xy => _, fun xy => ⟨i, hx, hy, xy⟩⟩\n[GOAL]\ncase mk.mk\nL : Language\nι : Type v\ninst✝³ : Preorder ι\nG : ι → Type w\ninst✝² : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\ninst✝¹ : IsDirected ι fun x x_1 => x ≤ x_1\ninst✝ : DirectedSystem G fun i j h => ↑(f i j h)\ni fst✝¹ : ι\nsnd✝¹ : (fun i => G i) fst✝¹\nhx : { fst := fst✝¹, snd := snd✝¹ }.fst ≤ i\nfst✝ : ι\nsnd✝ : (fun i => G i) fst✝\nhy : { fst := fst✝, snd := snd✝ }.fst ≤ i\nxy : { fst := fst✝¹, snd := snd✝¹ } ≈ { fst := fst✝, snd := snd✝ }\n⊢ ↑(f { fst := fst✝¹, snd := snd✝¹ }.fst i hx) { fst := fst✝¹, snd := snd✝¹ }.snd =\n    ↑(f { fst := fst✝, snd := snd✝ }.fst i hy) { fst := fst✝, snd := snd✝ }.snd\n[PROOFSTEP]\nobtain ⟨j, _, _, h⟩ := xy\n[GOAL]\ncase mk.mk.intro.intro.intro\nL : Language\nι : Type v\ninst✝³ : Preorder ι\nG : ι → Type w\ninst✝² : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\ninst✝¹ : IsDirected ι fun x x_1 => x ≤ x_1\ninst✝ : DirectedSystem G fun i j h => ↑(f i j h)\ni fst✝¹ : ι\nsnd✝¹ : (fun i => G i) fst✝¹\nhx : { fst := fst✝¹, snd := snd✝¹ }.fst ≤ i\nfst✝ : ι\nsnd✝ : (fun i => G i) fst✝\nhy : { fst := fst✝, snd := snd✝ }.fst ≤ i\nj : ι\nw✝¹ : fst✝¹ ≤ j\nw✝ : fst✝ ≤ j\nh : ↑(f fst✝¹ j w✝¹) snd✝¹ = ↑(f fst✝ j w✝) snd✝\n⊢ ↑(f { fst := fst✝¹, snd := snd✝¹ }.fst i hx) { fst := fst✝¹, snd := snd✝¹ }.snd =\n    ↑(f { fst := fst✝, snd := snd✝ }.fst i hy) { fst := fst✝, snd := snd✝ }.snd\n[PROOFSTEP]\nobtain ⟨k, ik, jk⟩ := directed_of (· ≤ ·) i j\n[GOAL]\ncase mk.mk.intro.intro.intro.intro.intro\nL : Language\nι : Type v\ninst✝³ : Preorder ι\nG : ι → Type w\ninst✝² : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\ninst✝¹ : IsDirected ι fun x x_1 => x ≤ x_1\ninst✝ : DirectedSystem G fun i j h => ↑(f i j h)\ni fst✝¹ : ι\nsnd✝¹ : (fun i => G i) fst✝¹\nhx : { fst := fst✝¹, snd := snd✝¹ }.fst ≤ i\nfst✝ : ι\nsnd✝ : (fun i => G i) fst✝\nhy : { fst := fst✝, snd := snd✝ }.fst ≤ i\nj : ι\nw✝¹ : fst✝¹ ≤ j\nw✝ : fst✝ ≤ j\nh : ↑(f fst✝¹ j w✝¹) snd✝¹ = ↑(f fst✝ j w✝) snd✝\nk : ι\nik : i ≤ k\njk : j ≤ k\n⊢ ↑(f { fst := fst✝¹, snd := snd✝¹ }.fst i hx) { fst := fst✝¹, snd := snd✝¹ }.snd =\n    ↑(f { fst := fst✝, snd := snd✝ }.fst i hy) { fst := fst✝, snd := snd✝ }.snd\n[PROOFSTEP]\nhave h := congr_arg (f j k jk) h\n[GOAL]\ncase mk.mk.intro.intro.intro.intro.intro\nL : Language\nι : Type v\ninst✝³ : Preorder ι\nG : ι → Type w\ninst✝² : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\ninst✝¹ : IsDirected ι fun x x_1 => x ≤ x_1\ninst✝ : DirectedSystem G fun i j h => ↑(f i j h)\ni fst✝¹ : ι\nsnd✝¹ : (fun i => G i) fst✝¹\nhx : { fst := fst✝¹, snd := snd✝¹ }.fst ≤ i\nfst✝ : ι\nsnd✝ : (fun i => G i) fst✝\nhy : { fst := fst✝, snd := snd✝ }.fst ≤ i\nj : ι\nw✝¹ : fst✝¹ ≤ j\nw✝ : fst✝ ≤ j\nh✝ : ↑(f fst✝¹ j w✝¹) snd✝¹ = ↑(f fst✝ j w✝) snd✝\nk : ι\nik : i ≤ k\njk : j ≤ k\nh : ↑(f j k jk) (↑(f fst✝¹ j w✝¹) snd✝¹) = ↑(f j k jk) (↑(f fst✝ j w✝) snd✝)\n⊢ ↑(f { fst := fst✝¹, snd := snd✝¹ }.fst i hx) { fst := fst✝¹, snd := snd✝¹ }.snd =\n    ↑(f { fst := fst✝, snd := snd✝ }.fst i hy) { fst := fst✝, snd := snd✝ }.snd\n[PROOFSTEP]\napply (f i k ik).injective\n[GOAL]\ncase mk.mk.intro.intro.intro.intro.intro.a\nL : Language\nι : Type v\ninst✝³ : Preorder ι\nG : ι → Type w\ninst✝² : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\ninst✝¹ : IsDirected ι fun x x_1 => x ≤ x_1\ninst✝ : DirectedSystem G fun i j h => ↑(f i j h)\ni fst✝¹ : ι\nsnd✝¹ : (fun i => G i) fst✝¹\nhx : { fst := fst✝¹, snd := snd✝¹ }.fst ≤ i\nfst✝ : ι\nsnd✝ : (fun i => G i) fst✝\nhy : { fst := fst✝, snd := snd✝ }.fst ≤ i\nj : ι\nw✝¹ : fst✝¹ ≤ j\nw✝ : fst✝ ≤ j\nh✝ : ↑(f fst✝¹ j w✝¹) snd✝¹ = ↑(f fst✝ j w✝) snd✝\nk : ι\nik : i ≤ k\njk : j ≤ k\nh : ↑(f j k jk) (↑(f fst✝¹ j w✝¹) snd✝¹) = ↑(f j k jk) (↑(f fst✝ j w✝) snd✝)\n⊢ ↑(f i k ik) (↑(f { fst := fst✝¹, snd := snd✝¹ }.fst i hx) { fst := fst✝¹, snd := snd✝¹ }.snd) =\n    ↑(f i k ik) (↑(f { fst := fst✝, snd := snd✝ }.fst i hy) { fst := fst✝, snd := snd✝ }.snd)\n[PROOFSTEP]\nrw [DirectedSystem.map_map, DirectedSystem.map_map] at *\n[GOAL]\ncase mk.mk.intro.intro.intro.intro.intro.a\nL : Language\nι : Type v\ninst✝³ : Preorder ι\nG : ι → Type w\ninst✝² : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\ninst✝¹ : IsDirected ι fun x x_1 => x ≤ x_1\ninst✝ : DirectedSystem G fun i j h => ↑(f i j h)\ni fst✝¹ : ι\nsnd✝¹ : (fun i => G i) fst✝¹\nhx : { fst := fst✝¹, snd := snd✝¹ }.fst ≤ i\nfst✝ : ι\nsnd✝ : (fun i => G i) fst✝\nhy : { fst := fst✝, snd := snd✝ }.fst ≤ i\nj : ι\nw✝¹ : fst✝¹ ≤ j\nw✝ : fst✝ ≤ j\nh✝ : ↑(f fst✝¹ j w✝¹) snd✝¹ = ↑(f fst✝ j w✝) snd✝\nk : ι\nik : i ≤ k\njk : j ≤ k\nh : ↑(f fst✝¹ k (_ : fst✝¹ ≤ k)) snd✝¹ = ↑(f fst✝ k (_ : fst✝ ≤ k)) snd✝\n⊢ ↑(f { fst := fst✝¹, snd := snd✝¹ }.fst k (_ : { fst := fst✝¹, snd := snd✝¹ }.fst ≤ k))\n      { fst := fst✝¹, snd := snd✝¹ }.snd =\n    ↑(f { fst := fst✝, snd := snd✝ }.fst k (_ : { fst := fst✝, snd := snd✝ }.fst ≤ k)) { fst := fst✝, snd := snd✝ }.snd\n[PROOFSTEP]\nexact h\n[GOAL]\nL : Language\nι : Type v\ninst✝³ : Preorder ι\nG : ι → Type w\ninst✝² : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\ninst✝¹ : IsDirected ι fun x x_1 => x ≤ x_1\ninst✝ : DirectedSystem G fun i j h => ↑(f i j h)\nn : ℕ\nF : Functions L n\nx : Fin n → Σˣ f\ni j : ι\nhi : i ∈ upperBounds (range (Sigma.fst ∘ x))\nhj : j ∈ upperBounds (range (Sigma.fst ∘ x))\n⊢ Structure.Sigma.mk f i (funMap F (unify f x i hi)) ≈ Structure.Sigma.mk f j (funMap F (unify f x j hj))\n[PROOFSTEP]\nobtain ⟨k, ik, jk⟩ := directed_of (· ≤ ·) i j\n[GOAL]\ncase intro.intro\nL : Language\nι : Type v\ninst✝³ : Preorder ι\nG : ι → Type w\ninst✝² : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\ninst✝¹ : IsDirected ι fun x x_1 => x ≤ x_1\ninst✝ : DirectedSystem G fun i j h => ↑(f i j h)\nn : ℕ\nF : Functions L n\nx : Fin n → Σˣ f\ni j : ι\nhi : i ∈ upperBounds (range (Sigma.fst ∘ x))\nhj : j ∈ upperBounds (range (Sigma.fst ∘ x))\nk : ι\nik : i ≤ k\njk : j ≤ k\n⊢ Structure.Sigma.mk f i (funMap F (unify f x i hi)) ≈ Structure.Sigma.mk f j (funMap F (unify f x j hj))\n[PROOFSTEP]\nrefine' ⟨k, ik, jk, _⟩\n[GOAL]\ncase intro.intro\nL : Language\nι : Type v\ninst✝³ : Preorder ι\nG : ι → Type w\ninst✝² : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\ninst✝¹ : IsDirected ι fun x x_1 => x ≤ x_1\ninst✝ : DirectedSystem G fun i j h => ↑(f i j h)\nn : ℕ\nF : Functions L n\nx : Fin n → Σˣ f\ni j : ι\nhi : i ∈ upperBounds (range (Sigma.fst ∘ x))\nhj : j ∈ upperBounds (range (Sigma.fst ∘ x))\nk : ι\nik : i ≤ k\njk : j ≤ k\n⊢ ↑(f i k ik) (funMap F (unify f x i hi)) = ↑(f j k jk) (funMap F (unify f x j hj))\n[PROOFSTEP]\nrw [(f i k ik).map_fun, (f j k jk).map_fun, comp_unify, comp_unify]\n[GOAL]\nL : Language\nι : Type v\ninst✝³ : Preorder ι\nG : ι → Type w\ninst✝² : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\ninst✝¹ : IsDirected ι fun x x_1 => x ≤ x_1\ninst✝ : DirectedSystem G fun i j h => ↑(f i j h)\nn : ℕ\nR : Relations L n\nx : Fin n → Σˣ f\ni j : ι\nhi : i ∈ upperBounds (range (Sigma.fst ∘ x))\nhj : j ∈ upperBounds (range (Sigma.fst ∘ x))\n⊢ RelMap R (unify f x i hi) = RelMap R (unify f x j hj)\n[PROOFSTEP]\nobtain ⟨k, ik, jk⟩ := directed_of (· ≤ ·) i j\n[GOAL]\ncase intro.intro\nL : Language\nι : Type v\ninst✝³ : Preorder ι\nG : ι → Type w\ninst✝² : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\ninst✝¹ : IsDirected ι fun x x_1 => x ≤ x_1\ninst✝ : DirectedSystem G fun i j h => ↑(f i j h)\nn : ℕ\nR : Relations L n\nx : Fin n → Σˣ f\ni j : ι\nhi : i ∈ upperBounds (range (Sigma.fst ∘ x))\nhj : j ∈ upperBounds (range (Sigma.fst ∘ x))\nk : ι\nik : i ≤ k\njk : j ≤ k\n⊢ RelMap R (unify f x i hi) = RelMap R (unify f x j hj)\n[PROOFSTEP]\nrw [← (f i k ik).map_rel, comp_unify, ← (f j k jk).map_rel, comp_unify]\n[GOAL]\nL : Language\nι : Type v\ninst✝⁵ : Preorder ι\nG : ι → Type w\ninst✝⁴ : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\ninst✝³ : IsDirected ι fun x x_1 => x ≤ x_1\ninst✝² : DirectedSystem G fun i j h => ↑(f i j h)\ninst✝¹ : Nonempty ι\nα : Type u_1\ninst✝ : Fintype α\nx y : α → Σˣ f\nxy : x ≈ y\n⊢ ∃ i hx hy, unify f x i hx = unify f y i hy\n[PROOFSTEP]\nobtain ⟨i, hi⟩ := Fintype.bddAbove_range (Sum.elim (fun a => (x a).1) fun a => (y a).1)\n[GOAL]\ncase intro\nL : Language\nι : Type v\ninst✝⁵ : Preorder ι\nG : ι → Type w\ninst✝⁴ : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\ninst✝³ : IsDirected ι fun x x_1 => x ≤ x_1\ninst✝² : DirectedSystem G fun i j h => ↑(f i j h)\ninst✝¹ : Nonempty ι\nα : Type u_1\ninst✝ : Fintype α\nx y : α → Σˣ f\nxy : x ≈ y\ni : ι\nhi : i ∈ upperBounds (range (Sum.elim (fun a => (x a).fst) fun a => (y a).fst))\n⊢ ∃ i hx hy, unify f x i hx = unify f y i hy\n[PROOFSTEP]\nrw [Sum.elim_range, upperBounds_union] at hi \n[GOAL]\ncase intro\nL : Language\nι : Type v\ninst✝⁵ : Preorder ι\nG : ι → Type w\ninst✝⁴ : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\ninst✝³ : IsDirected ι fun x x_1 => x ≤ x_1\ninst✝² : DirectedSystem G fun i j h => ↑(f i j h)\ninst✝¹ : Nonempty ι\nα : Type u_1\ninst✝ : Fintype α\nx y : α → Σˣ f\nxy : x ≈ y\ni : ι\nhi : i ∈ upperBounds (range fun a => (x a).fst) ∩ upperBounds (range fun a => (y a).fst)\n⊢ ∃ i hx hy, unify f x i hx = unify f y i hy\n[PROOFSTEP]\nsimp_rw [← Function.comp_apply (f := Sigma.fst)] at hi \n[GOAL]\ncase intro\nL : Language\nι : Type v\ninst✝⁵ : Preorder ι\nG : ι → Type w\ninst✝⁴ : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\ninst✝³ : IsDirected ι fun x x_1 => x ≤ x_1\ninst✝² : DirectedSystem G fun i j h => ↑(f i j h)\ninst✝¹ : Nonempty ι\nα : Type u_1\ninst✝ : Fintype α\nx y : α → Σˣ f\nxy : x ≈ y\ni : ι\nhi : i ∈ upperBounds (range fun a => (Sigma.fst ∘ x) a) ∩ upperBounds (range fun a => (Sigma.fst ∘ y) a)\n⊢ ∃ i hx hy, unify f x i hx = unify f y i hy\n[PROOFSTEP]\nexact ⟨i, hi.1, hi.2, funext fun a => (equiv_iff G f _ _).1 (xy a)⟩\n[GOAL]\nL : Language\nι : Type v\ninst✝⁴ : Preorder ι\nG : ι → Type w\ninst✝³ : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\ninst✝² : IsDirected ι fun x x_1 => x ≤ x_1\ninst✝¹ : DirectedSystem G fun i j h => ↑(f i j h)\ninst✝ : Nonempty ι\nn : ℕ\nF : Functions L n\nx y : Fin n → Σˣ f\nxy : x ≈ y\n⊢ funMap F x ≈ funMap F y\n[PROOFSTEP]\nobtain ⟨i, hx, hy, h⟩ := exists_unify_eq G f xy\n[GOAL]\ncase intro.intro.intro\nL : Language\nι : Type v\ninst✝⁴ : Preorder ι\nG : ι → Type w\ninst✝³ : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\ninst✝² : IsDirected ι fun x x_1 => x ≤ x_1\ninst✝¹ : DirectedSystem G fun i j h => ↑(f i j h)\ninst✝ : Nonempty ι\nn : ℕ\nF : Functions L n\nx y : Fin n → Σˣ f\nxy : x ≈ y\ni : ι\nhx : i ∈ upperBounds (range (Sigma.fst ∘ x))\nhy : i ∈ upperBounds (range (Sigma.fst ∘ y))\nh : unify f x i hx = unify f y i hy\n⊢ funMap F x ≈ funMap F y\n[PROOFSTEP]\nrefine' Setoid.trans (funMap_equiv_unify G f F x i hx) (Setoid.trans _ (Setoid.symm (funMap_equiv_unify G f F y i hy)))\n[GOAL]\ncase intro.intro.intro\nL : Language\nι : Type v\ninst✝⁴ : Preorder ι\nG : ι → Type w\ninst✝³ : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\ninst✝² : IsDirected ι fun x x_1 => x ≤ x_1\ninst✝¹ : DirectedSystem G fun i j h => ↑(f i j h)\ninst✝ : Nonempty ι\nn : ℕ\nF : Functions L n\nx y : Fin n → Σˣ f\nxy : x ≈ y\ni : ι\nhx : i ∈ upperBounds (range (Sigma.fst ∘ x))\nhy : i ∈ upperBounds (range (Sigma.fst ∘ y))\nh : unify f x i hx = unify f y i hy\n⊢ Structure.Sigma.mk f i (funMap F (unify f x i hx)) ≈ Structure.Sigma.mk f i (funMap F (unify f y i hy))\n[PROOFSTEP]\nrw [h]\n[GOAL]\nL : Language\nι : Type v\ninst✝⁴ : Preorder ι\nG : ι → Type w\ninst✝³ : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\ninst✝² : IsDirected ι fun x x_1 => x ≤ x_1\ninst✝¹ : DirectedSystem G fun i j h => ↑(f i j h)\ninst✝ : Nonempty ι\nn : ℕ\nR : Relations L n\nx y : Fin n → Σˣ f\nxy : x ≈ y\n⊢ RelMap R x = RelMap R y\n[PROOFSTEP]\nobtain ⟨i, hx, hy, h⟩ := exists_unify_eq G f xy\n[GOAL]\ncase intro.intro.intro\nL : Language\nι : Type v\ninst✝⁴ : Preorder ι\nG : ι → Type w\ninst✝³ : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\ninst✝² : IsDirected ι fun x x_1 => x ≤ x_1\ninst✝¹ : DirectedSystem G fun i j h => ↑(f i j h)\ninst✝ : Nonempty ι\nn : ℕ\nR : Relations L n\nx y : Fin n → Σˣ f\nxy : x ≈ y\ni : ι\nhx : i ∈ upperBounds (range (Sigma.fst ∘ x))\nhy : i ∈ upperBounds (range (Sigma.fst ∘ y))\nh : unify f x i hx = unify f y i hy\n⊢ RelMap R x = RelMap R y\n[PROOFSTEP]\nrefine' _root_.trans (relMap_equiv_unify G f R x i hx) (_root_.trans _ (symm (relMap_equiv_unify G f R y i hy)))\n[GOAL]\ncase intro.intro.intro\nL : Language\nι : Type v\ninst✝⁴ : Preorder ι\nG : ι → Type w\ninst✝³ : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\ninst✝² : IsDirected ι fun x x_1 => x ≤ x_1\ninst✝¹ : DirectedSystem G fun i j h => ↑(f i j h)\ninst✝ : Nonempty ι\nn : ℕ\nR : Relations L n\nx y : Fin n → Σˣ f\nxy : x ≈ y\ni : ι\nhx : i ∈ upperBounds (range (Sigma.fst ∘ x))\nhy : i ∈ upperBounds (range (Sigma.fst ∘ y))\nh : unify f x i hx = unify f y i hy\n⊢ RelMap R (unify f x i hx) = RelMap R (unify f y i hy)\n[PROOFSTEP]\nrw [h]\n[GOAL]\nL : Language\nι : Type v\ninst✝⁴ : Preorder ι\nG : ι → Type w\ninst✝³ : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\ninst✝² : IsDirected ι fun x x_1 => x ≤ x_1\ninst✝¹ : DirectedSystem G fun i j h => ↑(f i j h)\ninst✝ : Nonempty ι\nn : ℕ\nF : Functions L n\ni : ι\nx : Fin n → G i\n⊢ (funMap F fun a => Quotient.mk (setoid G f) (Structure.Sigma.mk f i (x a))) =\n    Quotient.mk (setoid G f) (Structure.Sigma.mk f i (funMap F x))\n[PROOFSTEP]\nsimp [Function.comp_apply, funMap_quotient_mk', Quotient.eq']\n[GOAL]\nL : Language\nι : Type v\ninst✝⁴ : Preorder ι\nG : ι → Type w\ninst✝³ : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\ninst✝² : IsDirected ι fun x x_1 => x ≤ x_1\ninst✝¹ : DirectedSystem G fun i j h => ↑(f i j h)\ninst✝ : Nonempty ι\nn : ℕ\nF : Functions L n\ni : ι\nx : Fin n → G i\n⊢ (funMap F fun i_1 => Structure.Sigma.mk f i (x i_1)) ≈ Structure.Sigma.mk f i (funMap F x)\n[PROOFSTEP]\nobtain ⟨k, ik, jk⟩ := directed_of (· ≤ ·) i (Classical.choose (Fintype.bddAbove_range fun _ : Fin n => i))\n[GOAL]\ncase intro.intro\nL : Language\nι : Type v\ninst✝⁴ : Preorder ι\nG : ι → Type w\ninst✝³ : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\ninst✝² : IsDirected ι fun x x_1 => x ≤ x_1\ninst✝¹ : DirectedSystem G fun i j h => ↑(f i j h)\ninst✝ : Nonempty ι\nn : ℕ\nF : Functions L n\ni : ι\nx : Fin n → G i\nk : ι\nik : i ≤ k\njk : Classical.choose (_ : BddAbove (range fun x => i)) ≤ k\n⊢ (funMap F fun i_1 => Structure.Sigma.mk f i (x i_1)) ≈ Structure.Sigma.mk f i (funMap F x)\n[PROOFSTEP]\nrefine' ⟨k, jk, ik, _⟩\n[GOAL]\ncase intro.intro\nL : Language\nι : Type v\ninst✝⁴ : Preorder ι\nG : ι → Type w\ninst✝³ : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\ninst✝² : IsDirected ι fun x x_1 => x ≤ x_1\ninst✝¹ : DirectedSystem G fun i j h => ↑(f i j h)\ninst✝ : Nonempty ι\nn : ℕ\nF : Functions L n\ni : ι\nx : Fin n → G i\nk : ι\nik : i ≤ k\njk : Classical.choose (_ : BddAbove (range fun x => i)) ≤ k\n⊢ ↑(f (Classical.choose (_ : BddAbove (range fun a => (Structure.Sigma.mk f i (x a)).fst))) k jk)\n      (funMap F\n        (unify f (fun i_1 => Structure.Sigma.mk f i (x i_1))\n          (Classical.choose (_ : BddAbove (range fun a => (Structure.Sigma.mk f i (x a)).fst)))\n          (_ :\n            Classical.choose (_ : BddAbove (range fun a => (Structure.Sigma.mk f i (x a)).fst)) ∈\n              upperBounds (range fun a => (Structure.Sigma.mk f i (x a)).fst)))) =\n    ↑(f i k ik) (funMap F x)\n[PROOFSTEP]\nsimp only [Embedding.map_fun, comp_unify]\n[GOAL]\ncase intro.intro\nL : Language\nι : Type v\ninst✝⁴ : Preorder ι\nG : ι → Type w\ninst✝³ : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\ninst✝² : IsDirected ι fun x x_1 => x ≤ x_1\ninst✝¹ : DirectedSystem G fun i j h => ↑(f i j h)\ninst✝ : Nonempty ι\nn : ℕ\nF : Functions L n\ni : ι\nx : Fin n → G i\nk : ι\nik : i ≤ k\njk : Classical.choose (_ : BddAbove (range fun x => i)) ≤ k\n⊢ funMap F\n      (unify f (fun i_1 => Structure.Sigma.mk f i (x i_1)) k\n        (_ : ∀ (k_1 : ι), k_1 ∈ range (Sigma.fst ∘ fun i_1 => Structure.Sigma.mk f i (x i_1)) → k_1 ≤ k)) =\n    funMap F (↑(f i k ik) ∘ x)\n[PROOFSTEP]\nrfl\n[GOAL]\nL : Language\nι : Type v\ninst✝⁴ : Preorder ι\nG : ι → Type w\ninst✝³ : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\ninst✝² : IsDirected ι fun x x_1 => x ≤ x_1\ninst✝¹ : DirectedSystem G fun i j h => ↑(f i j h)\ninst✝ : Nonempty ι\nn : ℕ\nR : Relations L n\ni : ι\nx : Fin n → G i\n⊢ (RelMap R fun a => Quotient.mk (setoid G f) (Structure.Sigma.mk f i (x a))) = RelMap R x\n[PROOFSTEP]\nrw [relMap_quotient_mk']\n[GOAL]\nL : Language\nι : Type v\ninst✝⁴ : Preorder ι\nG : ι → Type w\ninst✝³ : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\ninst✝² : IsDirected ι fun x x_1 => x ≤ x_1\ninst✝¹ : DirectedSystem G fun i j h => ↑(f i j h)\ninst✝ : Nonempty ι\nn : ℕ\nR : Relations L n\ni : ι\nx : Fin n → G i\n⊢ (RelMap R fun a => Structure.Sigma.mk f i (x a)) = RelMap R x\n[PROOFSTEP]\nobtain ⟨k, _, _⟩ := directed_of (· ≤ ·) i (Classical.choose (Fintype.bddAbove_range fun _ : Fin n => i))\n[GOAL]\ncase intro.intro\nL : Language\nι : Type v\ninst✝⁴ : Preorder ι\nG : ι → Type w\ninst✝³ : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\ninst✝² : IsDirected ι fun x x_1 => x ≤ x_1\ninst✝¹ : DirectedSystem G fun i j h => ↑(f i j h)\ninst✝ : Nonempty ι\nn : ℕ\nR : Relations L n\ni : ι\nx : Fin n → G i\nk : ι\nleft✝ : i ≤ k\nright✝ : Classical.choose (_ : BddAbove (range fun x => i)) ≤ k\n⊢ (RelMap R fun a => Structure.Sigma.mk f i (x a)) = RelMap R x\n[PROOFSTEP]\nrw [relMap_equiv_unify G f R (fun a => .mk f i (x a)) i]\n[GOAL]\ncase intro.intro\nL : Language\nι : Type v\ninst✝⁴ : Preorder ι\nG : ι → Type w\ninst✝³ : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\ninst✝² : IsDirected ι fun x x_1 => x ≤ x_1\ninst✝¹ : DirectedSystem G fun i j h => ↑(f i j h)\ninst✝ : Nonempty ι\nn : ℕ\nR : Relations L n\ni : ι\nx : Fin n → G i\nk : ι\nleft✝ : i ≤ k\nright✝ : Classical.choose (_ : BddAbove (range fun x => i)) ≤ k\n⊢ RelMap R (unify f (fun a => Structure.Sigma.mk f i (x a)) i ?intro.intro) = RelMap R x\ncase intro.intro\nL : Language\nι : Type v\ninst✝⁴ : Preorder ι\nG : ι → Type w\ninst✝³ : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\ninst✝² : IsDirected ι fun x x_1 => x ≤ x_1\ninst✝¹ : DirectedSystem G fun i j h => ↑(f i j h)\ninst✝ : Nonempty ι\nn : ℕ\nR : Relations L n\ni : ι\nx : Fin n → G i\nk : ι\nleft✝ : i ≤ k\nright✝ : Classical.choose (_ : BddAbove (range fun x => i)) ≤ k\n⊢ i ∈ upperBounds (range (Sigma.fst ∘ fun a => Structure.Sigma.mk f i (x a)))\n[PROOFSTEP]\nrw [unify_sigma_mk_self]\n[GOAL]\nL : Language\nι : Type v\ninst✝⁵ : Preorder ι\nG : ι → Type w\ninst✝⁴ : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\ninst✝³ : IsDirected ι fun x x_1 => x ≤ x_1\ninst✝² : DirectedSystem G fun i j h => ↑(f i j h)\ninst✝¹ : Nonempty ι\nα : Type u_1\ninst✝ : Fintype α\nx : α → DirectLimit G f\n⊢ ∃ i y, x = fun a => Quotient.mk (setoid G f) (Structure.Sigma.mk f i (y a))\n[PROOFSTEP]\nobtain ⟨i, hi⟩ := Fintype.bddAbove_range fun a => (x a).out.1\n[GOAL]\ncase intro\nL : Language\nι : Type v\ninst✝⁵ : Preorder ι\nG : ι → Type w\ninst✝⁴ : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\ninst✝³ : IsDirected ι fun x x_1 => x ≤ x_1\ninst✝² : DirectedSystem G fun i j h => ↑(f i j h)\ninst✝¹ : Nonempty ι\nα : Type u_1\ninst✝ : Fintype α\nx : α → DirectLimit G f\ni : ι\nhi : i ∈ upperBounds (range fun a => (Quotient.out (x a)).fst)\n⊢ ∃ i y, x = fun a => Quotient.mk (setoid G f) (Structure.Sigma.mk f i (y a))\n[PROOFSTEP]\nrefine' ⟨i, unify f (Quotient.out ∘ x) i hi, _⟩\n[GOAL]\ncase intro\nL : Language\nι : Type v\ninst✝⁵ : Preorder ι\nG : ι → Type w\ninst✝⁴ : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\ninst✝³ : IsDirected ι fun x x_1 => x ≤ x_1\ninst✝² : DirectedSystem G fun i j h => ↑(f i j h)\ninst✝¹ : Nonempty ι\nα : Type u_1\ninst✝ : Fintype α\nx : α → DirectLimit G f\ni : ι\nhi : i ∈ upperBounds (range fun a => (Quotient.out (x a)).fst)\n⊢ x = fun a => Quotient.mk (setoid G f) (Structure.Sigma.mk f i (unify f (Quotient.out ∘ x) i hi a))\n[PROOFSTEP]\next a\n[GOAL]\ncase intro.h\nL : Language\nι : Type v\ninst✝⁵ : Preorder ι\nG : ι → Type w\ninst✝⁴ : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\ninst✝³ : IsDirected ι fun x x_1 => x ≤ x_1\ninst✝² : DirectedSystem G fun i j h => ↑(f i j h)\ninst✝¹ : Nonempty ι\nα : Type u_1\ninst✝ : Fintype α\nx : α → DirectLimit G f\ni : ι\nhi : i ∈ upperBounds (range fun a => (Quotient.out (x a)).fst)\na : α\n⊢ x a = Quotient.mk (setoid G f) (Structure.Sigma.mk f i (unify f (Quotient.out ∘ x) i hi a))\n[PROOFSTEP]\nrw [Quotient.eq_mk_iff_out, unify]\n[GOAL]\ncase intro.h\nL : Language\nι : Type v\ninst✝⁵ : Preorder ι\nG : ι → Type w\ninst✝⁴ : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\ninst✝³ : IsDirected ι fun x x_1 => x ≤ x_1\ninst✝² : DirectedSystem G fun i j h => ↑(f i j h)\ninst✝¹ : Nonempty ι\nα : Type u_1\ninst✝ : Fintype α\nx : α → DirectLimit G f\ni : ι\nhi : i ∈ upperBounds (range fun a => (Quotient.out (x a)).fst)\na : α\n⊢ Quotient.out (x a) ≈\n    Structure.Sigma.mk f i\n      (↑(f ((Quotient.out ∘ x) a).fst i (_ : ((Quotient.out ∘ x) a).fst ≤ i)) ((Quotient.out ∘ x) a).snd)\n[PROOFSTEP]\ngeneralize_proofs r\n[GOAL]\ncase intro.h\nL : Language\nι : Type v\ninst✝⁵ : Preorder ι\nG : ι → Type w\ninst✝⁴ : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\ninst✝³ : IsDirected ι fun x x_1 => x ≤ x_1\ninst✝² : DirectedSystem G fun i j h => ↑(f i j h)\ninst✝¹ : Nonempty ι\nα : Type u_1\ninst✝ : Fintype α\nx : α → DirectLimit G f\ni : ι\nhi : i ∈ upperBounds (range fun a => (Quotient.out (x a)).fst)\na : α\nr : ((Quotient.out ∘ x) a).fst ≤ i\n⊢ Quotient.out (x a) ≈ Structure.Sigma.mk f i (↑(f ((Quotient.out ∘ x) a).fst i r) ((Quotient.out ∘ x) a).snd)\n[PROOFSTEP]\nchange _ ≈ .mk f i (f (Quotient.out (x a)).fst i r (Quotient.out (x a)).snd)\n[GOAL]\ncase intro.h\nL : Language\nι : Type v\ninst✝⁵ : Preorder ι\nG : ι → Type w\ninst✝⁴ : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\ninst✝³ : IsDirected ι fun x x_1 => x ≤ x_1\ninst✝² : DirectedSystem G fun i j h => ↑(f i j h)\ninst✝¹ : Nonempty ι\nα : Type u_1\ninst✝ : Fintype α\nx : α → DirectLimit G f\ni : ι\nhi : i ∈ upperBounds (range fun a => (Quotient.out (x a)).fst)\na : α\nr : ((Quotient.out ∘ x) a).fst ≤ i\n⊢ Quotient.out (x a) ≈ Structure.Sigma.mk f i (↑(f (Quotient.out (x a)).fst i r) (Quotient.out (x a)).snd)\n[PROOFSTEP]\nhave : (.mk f i (f (Quotient.out (x a)).fst i r (Quotient.out (x a)).snd) : Σˣ f).fst ≤ i := le_rfl\n[GOAL]\ncase intro.h\nL : Language\nι : Type v\ninst✝⁵ : Preorder ι\nG : ι → Type w\ninst✝⁴ : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\ninst✝³ : IsDirected ι fun x x_1 => x ≤ x_1\ninst✝² : DirectedSystem G fun i j h => ↑(f i j h)\ninst✝¹ : Nonempty ι\nα : Type u_1\ninst✝ : Fintype α\nx : α → DirectLimit G f\ni : ι\nhi : i ∈ upperBounds (range fun a => (Quotient.out (x a)).fst)\na : α\nr : ((Quotient.out ∘ x) a).fst ≤ i\nthis : (Structure.Sigma.mk f i (↑(f (Quotient.out (x a)).fst i r) (Quotient.out (x a)).snd)).fst ≤ i\n⊢ Quotient.out (x a) ≈ Structure.Sigma.mk f i (↑(f (Quotient.out (x a)).fst i r) (Quotient.out (x a)).snd)\n[PROOFSTEP]\nrw [equiv_iff G f (i := i) (hi _) this]\n[GOAL]\ncase intro.h\nL : Language\nι : Type v\ninst✝⁵ : Preorder ι\nG : ι → Type w\ninst✝⁴ : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\ninst✝³ : IsDirected ι fun x x_1 => x ≤ x_1\ninst✝² : DirectedSystem G fun i j h => ↑(f i j h)\ninst✝¹ : Nonempty ι\nα : Type u_1\ninst✝ : Fintype α\nx : α → DirectLimit G f\ni : ι\nhi : i ∈ upperBounds (range fun a => (Quotient.out (x a)).fst)\na : α\nr : ((Quotient.out ∘ x) a).fst ≤ i\nthis : (Structure.Sigma.mk f i (↑(f (Quotient.out (x a)).fst i r) (Quotient.out (x a)).snd)).fst ≤ i\n⊢ ↑(f (Quotient.out (x a)).fst i (_ : (Quotient.out (x a)).fst ≤ i)) (Quotient.out (x a)).snd =\n    ↑(f (Structure.Sigma.mk f i (↑(f (Quotient.out (x a)).fst i r) (Quotient.out (x a)).snd)).fst i this)\n      (Structure.Sigma.mk f i (↑(f (Quotient.out (x a)).fst i r) (Quotient.out (x a)).snd)).snd\n[PROOFSTEP]\nsimp only [DirectedSystem.map_self]\n[GOAL]\nL : Language\nι : Type v\ninst✝⁵ : Preorder ι\nG : ι → Type w\ninst✝⁴ : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\ninst✝³ : IsDirected ι fun x x_1 => x ≤ x_1\ninst✝² : DirectedSystem G fun i j h => ↑(f i j h)\ninst✝¹ : Nonempty ι\nα : Type u_1\ninst✝ : Fintype α\nx : α → DirectLimit G f\ni : ι\nhi : i ∈ upperBounds (range fun a => (Quotient.out (x a)).fst)\na : α\nr : ((Quotient.out ∘ x) a).fst ≤ i\nthis : (Structure.Sigma.mk f i (↑(f (Quotient.out (x a)).fst i r) (Quotient.out (x a)).snd)).fst ≤ i\n⊢ (Quotient.out (x a)).fst ∈ range fun a => (Quotient.out (x a)).fst\n[PROOFSTEP]\nexact ⟨a, rfl⟩\n[GOAL]\nL : Language\nι : Type v\ninst✝⁴ : Preorder ι\nG : ι → Type w\ninst✝³ : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\ninst✝² : IsDirected ι fun x x_1 => x ≤ x_1\ninst✝¹ : DirectedSystem G fun i j h => ↑(f i j h)\ninst✝ : Nonempty ι\ni : ι\nx y : G i\nh :\n  (fun a => Quotient.mk (setoid G f) (Structure.Sigma.mk f i a)) x =\n    (fun a => Quotient.mk (setoid G f) (Structure.Sigma.mk f i a)) y\n⊢ x = y\n[PROOFSTEP]\nrw [Quotient.eq] at h \n[GOAL]\nL : Language\nι : Type v\ninst✝⁴ : Preorder ι\nG : ι → Type w\ninst✝³ : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\ninst✝² : IsDirected ι fun x x_1 => x ≤ x_1\ninst✝¹ : DirectedSystem G fun i j h => ↑(f i j h)\ninst✝ : Nonempty ι\ni : ι\nx y : G i\nh : Structure.Sigma.mk f i x ≈ Structure.Sigma.mk f i y\n⊢ x = y\n[PROOFSTEP]\nobtain ⟨j, h1, _, h3⟩ := h\n[GOAL]\ncase intro.intro.intro\nL : Language\nι : Type v\ninst✝⁴ : Preorder ι\nG : ι → Type w\ninst✝³ : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\ninst✝² : IsDirected ι fun x x_1 => x ≤ x_1\ninst✝¹ : DirectedSystem G fun i j h => ↑(f i j h)\ninst✝ : Nonempty ι\ni : ι\nx y : G i\nj : ι\nh1 w✝ : i ≤ j\nh3 : ↑(f i j h1) x = ↑(f i j w✝) y\n⊢ x = y\n[PROOFSTEP]\nexact (f i j h1).injective h3\n[GOAL]\nL : Language\nι : Type v\ninst✝⁴ : Preorder ι\nG : ι → Type w\ninst✝³ : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\ninst✝² : IsDirected ι fun x x_1 => x ≤ x_1\ninst✝¹ : DirectedSystem G fun i j h => ↑(f i j h)\ninst✝ : Nonempty ι\ni : ι\nn✝ : ℕ\nF : Functions L n✝\nx : Fin n✝ → G i\n⊢ Function.Embedding.toFun\n      { toFun := fun a => Quotient.mk (setoid G f) (Structure.Sigma.mk f i a),\n        inj' :=\n          (_ :\n            ∀ (x y : G i),\n              (fun a => Quotient.mk (setoid G f) (Structure.Sigma.mk f i a)) x =\n                  (fun a => Quotient.mk (setoid G f) (Structure.Sigma.mk f i a)) y →\n                x = y) }\n      (funMap F x) =\n    funMap F\n      ({ toFun := fun a => Quotient.mk (setoid G f) (Structure.Sigma.mk f i a),\n            inj' :=\n              (_ :\n                ∀ (x y : G i),\n                  (fun a => Quotient.mk (setoid G f) (Structure.Sigma.mk f i a)) x =\n                      (fun a => Quotient.mk (setoid G f) (Structure.Sigma.mk f i a)) y →\n                    x = y) }.toFun ∘\n        x)\n[PROOFSTEP]\nsimp\n[GOAL]\nL : Language\nι : Type v\ninst✝⁴ : Preorder ι\nG : ι → Type w\ninst✝³ : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\ninst✝² : IsDirected ι fun x x_1 => x ≤ x_1\ninst✝¹ : DirectedSystem G fun i j h => ↑(f i j h)\ninst✝ : Nonempty ι\ni : ι\nn✝ : ℕ\nF : Functions L n✝\nx : Fin n✝ → G i\n⊢ Quotient.mk (setoid G f) (Structure.Sigma.mk f i (funMap F x)) =\n    funMap F ((fun a => Quotient.mk (setoid G f) (Structure.Sigma.mk f i a)) ∘ x)\n[PROOFSTEP]\nrw [← funMap_quotient_mk'_sigma_mk']\n[GOAL]\nL : Language\nι : Type v\ninst✝⁴ : Preorder ι\nG : ι → Type w\ninst✝³ : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\ninst✝² : IsDirected ι fun x x_1 => x ≤ x_1\ninst✝¹ : DirectedSystem G fun i j h => ↑(f i j h)\ninst✝ : Nonempty ι\ni : ι\nn✝ : ℕ\nF : Functions L n✝\nx : Fin n✝ → G i\n⊢ (funMap F fun a => Quotient.mk (setoid G f) (Structure.Sigma.mk f i (x a))) =\n    funMap F ((fun a => Quotient.mk (setoid G f) (Structure.Sigma.mk f i a)) ∘ x)\n[PROOFSTEP]\nrfl\n[GOAL]\nL : Language\nι : Type v\ninst✝⁴ : Preorder ι\nG : ι → Type w\ninst✝³ : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\ninst✝² : IsDirected ι fun x x_1 => x ≤ x_1\ninst✝¹ : DirectedSystem G fun i j h => ↑(f i j h)\ninst✝ : Nonempty ι\ni : ι\n⊢ ∀ {n : ℕ} (r : Relations L n) (x : Fin n → G i),\n    RelMap r\n        ({ toFun := fun a => Quotient.mk (setoid G f) (Structure.Sigma.mk f i a),\n              inj' :=\n                (_ :\n                  ∀ (x y : G i),\n                    (fun a => Quotient.mk (setoid G f) (Structure.Sigma.mk f i a)) x =\n                        (fun a => Quotient.mk (setoid G f) (Structure.Sigma.mk f i a)) y →\n                      x = y) }.toFun ∘\n          x) ↔\n      RelMap r x\n[PROOFSTEP]\nintro n R x\n[GOAL]\nL : Language\nι : Type v\ninst✝⁴ : Preorder ι\nG : ι → Type w\ninst✝³ : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\ninst✝² : IsDirected ι fun x x_1 => x ≤ x_1\ninst✝¹ : DirectedSystem G fun i j h => ↑(f i j h)\ninst✝ : Nonempty ι\ni : ι\nn : ℕ\nR : Relations L n\nx : Fin n → G i\n⊢ RelMap R\n      ({ toFun := fun a => Quotient.mk (setoid G f) (Structure.Sigma.mk f i a),\n            inj' :=\n              (_ :\n                ∀ (x y : G i),\n                  (fun a => Quotient.mk (setoid G f) (Structure.Sigma.mk f i a)) x =\n                      (fun a => Quotient.mk (setoid G f) (Structure.Sigma.mk f i a)) y →\n                    x = y) }.toFun ∘\n        x) ↔\n    RelMap R x\n[PROOFSTEP]\nchange RelMap R (fun a => (⟦.mk f i (x a)⟧ : DirectLimit G f)) ↔ _\n[GOAL]\nL : Language\nι : Type v\ninst✝⁴ : Preorder ι\nG : ι → Type w\ninst✝³ : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\ninst✝² : IsDirected ι fun x x_1 => x ≤ x_1\ninst✝¹ : DirectedSystem G fun i j h => ↑(f i j h)\ninst✝ : Nonempty ι\ni : ι\nn : ℕ\nR : Relations L n\nx : Fin n → G i\n⊢ (RelMap R fun a => Quotient.mk (setoid G f) (Structure.Sigma.mk f i (x a))) ↔ RelMap R x\n[PROOFSTEP]\nsimp only [relMap_quotient_mk'_sigma_mk']\n[GOAL]\nL : Language\nι : Type v\ninst✝⁴ : Preorder ι\nG : ι → Type w\ninst✝³ : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\ninst✝² : IsDirected ι fun x x_1 => x ≤ x_1\ninst✝¹ : DirectedSystem G fun i j h => ↑(f i j h)\ninst✝ : Nonempty ι\ni j : ι\nhij : i ≤ j\nx : G i\n⊢ ↑(of L ι G f j) (↑(f i j hij) x) = ↑(of L ι G f i) x\n[PROOFSTEP]\nrw [of_apply, of_apply, Quotient.eq]\n[GOAL]\nL : Language\nι : Type v\ninst✝⁴ : Preorder ι\nG : ι → Type w\ninst✝³ : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\ninst✝² : IsDirected ι fun x x_1 => x ≤ x_1\ninst✝¹ : DirectedSystem G fun i j h => ↑(f i j h)\ninst✝ : Nonempty ι\ni j : ι\nhij : i ≤ j\nx : G i\n⊢ Structure.Sigma.mk f j (↑(f i j hij) x) ≈ Structure.Sigma.mk f i x\n[PROOFSTEP]\nrefine' Setoid.symm ⟨j, hij, refl j, _⟩\n[GOAL]\nL : Language\nι : Type v\ninst✝⁴ : Preorder ι\nG : ι → Type w\ninst✝³ : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\ninst✝² : IsDirected ι fun x x_1 => x ≤ x_1\ninst✝¹ : DirectedSystem G fun i j h => ↑(f i j h)\ninst✝ : Nonempty ι\ni j : ι\nhij : i ≤ j\nx : G i\n⊢ ↑(f i j hij) x = ↑(f j j (_ : j ≤ j)) (↑(f i j hij) x)\n[PROOFSTEP]\nsimp only [DirectedSystem.map_self]\n[GOAL]\nL : Language\nι : Type v\ninst✝⁴ : Preorder ι\nG : ι → Type w\ninst✝³ : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\ninst✝² : IsDirected ι fun x x_1 => x ≤ x_1\ninst✝¹ : DirectedSystem G fun i j h => ↑(f i j h)\ninst✝ : Nonempty ι\nz : DirectLimit G f\n⊢ ↑(of L ι G f (Quotient.out z).fst) (Quotient.out z).snd = z\n[PROOFSTEP]\nsimp\n[GOAL]\nL : Language\nι : Type v\ninst✝⁵ : Preorder ι\nG : ι → Type w\ninst✝⁴ : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\ninst✝³ : IsDirected ι fun x x_1 => x ≤ x_1\ninst✝² : DirectedSystem G fun i j h => ↑(f i j h)\ninst✝¹ : Nonempty ι\nP : Type u₁\ninst✝ : Structure L P\ng : (i : ι) → G i ↪[L] P\nHg : ∀ (i j : ι) (hij : i ≤ j) (x : G i), ↑(g j) (↑(f i j hij) x) = ↑(g i) x\nx y : Σˣ f\nxy : x ≈ y\n⊢ (fun x => ↑(g x.fst) x.snd) x = (fun x => ↑(g x.fst) x.snd) y\n[PROOFSTEP]\nsimp\n[GOAL]\nL : Language\nι : Type v\ninst✝⁵ : Preorder ι\nG : ι → Type w\ninst✝⁴ : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\ninst✝³ : IsDirected ι fun x x_1 => x ≤ x_1\ninst✝² : DirectedSystem G fun i j h => ↑(f i j h)\ninst✝¹ : Nonempty ι\nP : Type u₁\ninst✝ : Structure L P\ng : (i : ι) → G i ↪[L] P\nHg : ∀ (i j : ι) (hij : i ≤ j) (x : G i), ↑(g j) (↑(f i j hij) x) = ↑(g i) x\nx y : Σˣ f\nxy : x ≈ y\n⊢ ↑(g x.fst) x.snd = ↑(g y.fst) y.snd\n[PROOFSTEP]\nobtain ⟨i, hx, hy⟩ := directed_of (· ≤ ·) x.1 y.1\n[GOAL]\ncase intro.intro\nL : Language\nι : Type v\ninst✝⁵ : Preorder ι\nG : ι → Type w\ninst✝⁴ : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\ninst✝³ : IsDirected ι fun x x_1 => x ≤ x_1\ninst✝² : DirectedSystem G fun i j h => ↑(f i j h)\ninst✝¹ : Nonempty ι\nP : Type u₁\ninst✝ : Structure L P\ng : (i : ι) → G i ↪[L] P\nHg : ∀ (i j : ι) (hij : i ≤ j) (x : G i), ↑(g j) (↑(f i j hij) x) = ↑(g i) x\nx y : Σˣ f\nxy : x ≈ y\ni : ι\nhx : x.fst ≤ i\nhy : y.fst ≤ i\n⊢ ↑(g x.fst) x.snd = ↑(g y.fst) y.snd\n[PROOFSTEP]\nrw [← Hg x.1 i hx, ← Hg y.1 i hy]\n[GOAL]\ncase intro.intro\nL : Language\nι : Type v\ninst✝⁵ : Preorder ι\nG : ι → Type w\ninst✝⁴ : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\ninst✝³ : IsDirected ι fun x x_1 => x ≤ x_1\ninst✝² : DirectedSystem G fun i j h => ↑(f i j h)\ninst✝¹ : Nonempty ι\nP : Type u₁\ninst✝ : Structure L P\ng : (i : ι) → G i ↪[L] P\nHg : ∀ (i j : ι) (hij : i ≤ j) (x : G i), ↑(g j) (↑(f i j hij) x) = ↑(g i) x\nx y : Σˣ f\nxy : x ≈ y\ni : ι\nhx : x.fst ≤ i\nhy : y.fst ≤ i\n⊢ ↑(g i) (↑(f x.fst i hx) x.snd) = ↑(g i) (↑(f y.fst i hy) y.snd)\n[PROOFSTEP]\nexact congr_arg _ ((equiv_iff ..).1 xy)\n[GOAL]\nL : Language\nι : Type v\ninst✝⁵ : Preorder ι\nG : ι → Type w\ninst✝⁴ : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\ninst✝³ : IsDirected ι fun x x_1 => x ≤ x_1\ninst✝² : DirectedSystem G fun i j h => ↑(f i j h)\ninst✝¹ : Nonempty ι\nP : Type u₁\ninst✝ : Structure L P\ng : (i : ι) → G i ↪[L] P\nHg : ∀ (i j : ι) (hij : i ≤ j) (x : G i), ↑(g j) (↑(f i j hij) x) = ↑(g i) x\nx y : DirectLimit G f\nxy :\n  Quotient.lift (fun x => ↑(g x.fst) x.snd)\n      (_ : ∀ (x y : Σˣ f), x ≈ y → (fun x => ↑(g x.fst) x.snd) x = (fun x => ↑(g x.fst) x.snd) y) x =\n    Quotient.lift (fun x => ↑(g x.fst) x.snd)\n      (_ : ∀ (x y : Σˣ f), x ≈ y → (fun x => ↑(g x.fst) x.snd) x = (fun x => ↑(g x.fst) x.snd) y) y\n⊢ x = y\n[PROOFSTEP]\nrw [← Quotient.out_eq x, ← Quotient.out_eq y, Quotient.lift_mk, Quotient.lift_mk] at xy \n[GOAL]\nL : Language\nι : Type v\ninst✝⁵ : Preorder ι\nG : ι → Type w\ninst✝⁴ : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\ninst✝³ : IsDirected ι fun x x_1 => x ≤ x_1\ninst✝² : DirectedSystem G fun i j h => ↑(f i j h)\ninst✝¹ : Nonempty ι\nP : Type u₁\ninst✝ : Structure L P\ng : (i : ι) → G i ↪[L] P\nHg : ∀ (i j : ι) (hij : i ≤ j) (x : G i), ↑(g j) (↑(f i j hij) x) = ↑(g i) x\nx y : DirectLimit G f\nxy : ↑(g (Quotient.out x).fst) (Quotient.out x).snd = ↑(g (Quotient.out y).fst) (Quotient.out y).snd\n⊢ x = y\n[PROOFSTEP]\nobtain ⟨i, hx, hy⟩ := directed_of (· ≤ ·) x.out.1 y.out.1\n[GOAL]\ncase intro.intro\nL : Language\nι : Type v\ninst✝⁵ : Preorder ι\nG : ι → Type w\ninst✝⁴ : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\ninst✝³ : IsDirected ι fun x x_1 => x ≤ x_1\ninst✝² : DirectedSystem G fun i j h => ↑(f i j h)\ninst✝¹ : Nonempty ι\nP : Type u₁\ninst✝ : Structure L P\ng : (i : ι) → G i ↪[L] P\nHg : ∀ (i j : ι) (hij : i ≤ j) (x : G i), ↑(g j) (↑(f i j hij) x) = ↑(g i) x\nx y : DirectLimit G f\nxy : ↑(g (Quotient.out x).fst) (Quotient.out x).snd = ↑(g (Quotient.out y).fst) (Quotient.out y).snd\ni : ι\nhx : (Quotient.out x).fst ≤ i\nhy : (Quotient.out y).fst ≤ i\n⊢ x = y\n[PROOFSTEP]\nrw [← Hg x.out.1 i hx, ← Hg y.out.1 i hy] at xy \n[GOAL]\ncase intro.intro\nL : Language\nι : Type v\ninst✝⁵ : Preorder ι\nG : ι → Type w\ninst✝⁴ : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\ninst✝³ : IsDirected ι fun x x_1 => x ≤ x_1\ninst✝² : DirectedSystem G fun i j h => ↑(f i j h)\ninst✝¹ : Nonempty ι\nP : Type u₁\ninst✝ : Structure L P\ng : (i : ι) → G i ↪[L] P\nHg : ∀ (i j : ι) (hij : i ≤ j) (x : G i), ↑(g j) (↑(f i j hij) x) = ↑(g i) x\nx y : DirectLimit G f\ni : ι\nhx : (Quotient.out x).fst ≤ i\nhy : (Quotient.out y).fst ≤ i\nxy :\n  ↑(g i) (↑(f (Quotient.out x).fst i hx) (Quotient.out x).snd) =\n    ↑(g i) (↑(f (Quotient.out y).fst i hy) (Quotient.out y).snd)\n⊢ x = y\n[PROOFSTEP]\nrw [← Quotient.out_eq x, ← Quotient.out_eq y, Quotient.eq, equiv_iff G f hx hy]\n[GOAL]\ncase intro.intro\nL : Language\nι : Type v\ninst✝⁵ : Preorder ι\nG : ι → Type w\ninst✝⁴ : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\ninst✝³ : IsDirected ι fun x x_1 => x ≤ x_1\ninst✝² : DirectedSystem G fun i j h => ↑(f i j h)\ninst✝¹ : Nonempty ι\nP : Type u₁\ninst✝ : Structure L P\ng : (i : ι) → G i ↪[L] P\nHg : ∀ (i j : ι) (hij : i ≤ j) (x : G i), ↑(g j) (↑(f i j hij) x) = ↑(g i) x\nx y : DirectLimit G f\ni : ι\nhx : (Quotient.out x).fst ≤ i\nhy : (Quotient.out y).fst ≤ i\nxy :\n  ↑(g i) (↑(f (Quotient.out x).fst i hx) (Quotient.out x).snd) =\n    ↑(g i) (↑(f (Quotient.out y).fst i hy) (Quotient.out y).snd)\n⊢ ↑(f (Quotient.out x).fst i hx) (Quotient.out x).snd = ↑(f (Quotient.out y).fst i hy) (Quotient.out y).snd\n[PROOFSTEP]\nexact (g i).injective xy\n[GOAL]\nL : Language\nι : Type v\ninst✝⁵ : Preorder ι\nG : ι → Type w\ninst✝⁴ : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\ninst✝³ : IsDirected ι fun x x_1 => x ≤ x_1\ninst✝² : DirectedSystem G fun i j h => ↑(f i j h)\ninst✝¹ : Nonempty ι\nP : Type u₁\ninst✝ : Structure L P\ng : (i : ι) → G i ↪[L] P\nHg : ∀ (i j : ι) (hij : i ≤ j) (x : G i), ↑(g j) (↑(f i j hij) x) = ↑(g i) x\nn✝ : ℕ\nF : Functions L n✝\nx : Fin n✝ → DirectLimit G f\n⊢ Function.Embedding.toFun\n      {\n        toFun :=\n          Quotient.lift (fun x => ↑(g x.fst) x.snd)\n            (_ : ∀ (x y : Σˣ f), x ≈ y → (fun x => ↑(g x.fst) x.snd) x = (fun x => ↑(g x.fst) x.snd) y),\n        inj' :=\n          (_ :\n            ∀ (x y : DirectLimit G f),\n              Quotient.lift (fun x => ↑(g x.fst) x.snd)\n                    (_ : ∀ (x y : Σˣ f), x ≈ y → (fun x => ↑(g x.fst) x.snd) x = (fun x => ↑(g x.fst) x.snd) y) x =\n                  Quotient.lift (fun x => ↑(g x.fst) x.snd)\n                    (_ : ∀ (x y : Σˣ f), x ≈ y → (fun x => ↑(g x.fst) x.snd) x = (fun x => ↑(g x.fst) x.snd) y) y →\n                x = y) }\n      (funMap F x) =\n    funMap F\n      ({\n            toFun :=\n              Quotient.lift (fun x => ↑(g x.fst) x.snd)\n                (_ : ∀ (x y : Σˣ f), x ≈ y → (fun x => ↑(g x.fst) x.snd) x = (fun x => ↑(g x.fst) x.snd) y),\n            inj' :=\n              (_ :\n                ∀ (x y : DirectLimit G f),\n                  Quotient.lift (fun x => ↑(g x.fst) x.snd)\n                        (_ : ∀ (x y : Σˣ f), x ≈ y → (fun x => ↑(g x.fst) x.snd) x = (fun x => ↑(g x.fst) x.snd) y) x =\n                      Quotient.lift (fun x => ↑(g x.fst) x.snd)\n                        (_ : ∀ (x y : Σˣ f), x ≈ y → (fun x => ↑(g x.fst) x.snd) x = (fun x => ↑(g x.fst) x.snd) y) y →\n                    x = y) }.toFun ∘\n        x)\n[PROOFSTEP]\nobtain ⟨i, y, rfl⟩ := exists_quotient_mk'_sigma_mk'_eq G f x\n[GOAL]\ncase intro.intro\nL : Language\nι : Type v\ninst✝⁵ : Preorder ι\nG : ι → Type w\ninst✝⁴ : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\ninst✝³ : IsDirected ι fun x x_1 => x ≤ x_1\ninst✝² : DirectedSystem G fun i j h => ↑(f i j h)\ninst✝¹ : Nonempty ι\nP : Type u₁\ninst✝ : Structure L P\ng : (i : ι) → G i ↪[L] P\nHg : ∀ (i j : ι) (hij : i ≤ j) (x : G i), ↑(g j) (↑(f i j hij) x) = ↑(g i) x\nn✝ : ℕ\nF : Functions L n✝\ni : ι\ny : Fin n✝ → G i\n⊢ Function.Embedding.toFun\n      {\n        toFun :=\n          Quotient.lift (fun x => ↑(g x.fst) x.snd)\n            (_ : ∀ (x y : Σˣ f), x ≈ y → (fun x => ↑(g x.fst) x.snd) x = (fun x => ↑(g x.fst) x.snd) y),\n        inj' :=\n          (_ :\n            ∀ (x y : DirectLimit G f),\n              Quotient.lift (fun x => ↑(g x.fst) x.snd)\n                    (_ : ∀ (x y : Σˣ f), x ≈ y → (fun x => ↑(g x.fst) x.snd) x = (fun x => ↑(g x.fst) x.snd) y) x =\n                  Quotient.lift (fun x => ↑(g x.fst) x.snd)\n                    (_ : ∀ (x y : Σˣ f), x ≈ y → (fun x => ↑(g x.fst) x.snd) x = (fun x => ↑(g x.fst) x.snd) y) y →\n                x = y) }\n      (funMap F fun a => Quotient.mk (setoid G f) (Structure.Sigma.mk f i (y a))) =\n    funMap F\n      ({\n            toFun :=\n              Quotient.lift (fun x => ↑(g x.fst) x.snd)\n                (_ : ∀ (x y : Σˣ f), x ≈ y → (fun x => ↑(g x.fst) x.snd) x = (fun x => ↑(g x.fst) x.snd) y),\n            inj' :=\n              (_ :\n                ∀ (x y : DirectLimit G f),\n                  Quotient.lift (fun x => ↑(g x.fst) x.snd)\n                        (_ : ∀ (x y : Σˣ f), x ≈ y → (fun x => ↑(g x.fst) x.snd) x = (fun x => ↑(g x.fst) x.snd) y) x =\n                      Quotient.lift (fun x => ↑(g x.fst) x.snd)\n                        (_ : ∀ (x y : Σˣ f), x ≈ y → (fun x => ↑(g x.fst) x.snd) x = (fun x => ↑(g x.fst) x.snd) y) y →\n                    x = y) }.toFun ∘\n        fun a => Quotient.mk (setoid G f) (Structure.Sigma.mk f i (y a)))\n[PROOFSTEP]\nchange _ = funMap F (Quotient.lift _ _ ∘ Quotient.mk _ ∘ Structure.Sigma.mk f i ∘ y)\n[GOAL]\ncase intro.intro\nL : Language\nι : Type v\ninst✝⁵ : Preorder ι\nG : ι → Type w\ninst✝⁴ : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\ninst✝³ : IsDirected ι fun x x_1 => x ≤ x_1\ninst✝² : DirectedSystem G fun i j h => ↑(f i j h)\ninst✝¹ : Nonempty ι\nP : Type u₁\ninst✝ : Structure L P\ng : (i : ι) → G i ↪[L] P\nHg : ∀ (i j : ι) (hij : i ≤ j) (x : G i), ↑(g j) (↑(f i j hij) x) = ↑(g i) x\nn✝ : ℕ\nF : Functions L n✝\ni : ι\ny : Fin n✝ → G i\n⊢ Function.Embedding.toFun\n      {\n        toFun :=\n          Quotient.lift (fun x => ↑(g x.fst) x.snd)\n            (_ : ∀ (x y : Σˣ f), x ≈ y → (fun x => ↑(g x.fst) x.snd) x = (fun x => ↑(g x.fst) x.snd) y),\n        inj' :=\n          (_ :\n            ∀ (x y : DirectLimit G f),\n              Quotient.lift (fun x => ↑(g x.fst) x.snd)\n                    (_ : ∀ (x y : Σˣ f), x ≈ y → (fun x => ↑(g x.fst) x.snd) x = (fun x => ↑(g x.fst) x.snd) y) x =\n                  Quotient.lift (fun x => ↑(g x.fst) x.snd)\n                    (_ : ∀ (x y : Σˣ f), x ≈ y → (fun x => ↑(g x.fst) x.snd) x = (fun x => ↑(g x.fst) x.snd) y) y →\n                x = y) }\n      (funMap F fun a => Quotient.mk (setoid G f) (Structure.Sigma.mk f i (y a))) =\n    funMap F\n      (Quotient.lift (fun x => ↑(g x.fst) x.snd)\n          (_ : ∀ (x y : Σˣ f), x ≈ y → (fun x => ↑(g x.fst) x.snd) x = (fun x => ↑(g x.fst) x.snd) y) ∘\n        Quotient.mk (setoid G f) ∘ Structure.Sigma.mk f i ∘ y)\n[PROOFSTEP]\nrw [funMap_quotient_mk'_sigma_mk', ← Function.comp.assoc, Quotient.lift_comp_mk]\n[GOAL]\ncase intro.intro\nL : Language\nι : Type v\ninst✝⁵ : Preorder ι\nG : ι → Type w\ninst✝⁴ : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\ninst✝³ : IsDirected ι fun x x_1 => x ≤ x_1\ninst✝² : DirectedSystem G fun i j h => ↑(f i j h)\ninst✝¹ : Nonempty ι\nP : Type u₁\ninst✝ : Structure L P\ng : (i : ι) → G i ↪[L] P\nHg : ∀ (i j : ι) (hij : i ≤ j) (x : G i), ↑(g j) (↑(f i j hij) x) = ↑(g i) x\nn✝ : ℕ\nF : Functions L n✝\ni : ι\ny : Fin n✝ → G i\n⊢ Function.Embedding.toFun\n      {\n        toFun :=\n          Quotient.lift (fun x => ↑(g x.fst) x.snd)\n            (_ : ∀ (x y : Σˣ f), x ≈ y → (fun x => ↑(g x.fst) x.snd) x = (fun x => ↑(g x.fst) x.snd) y),\n        inj' :=\n          (_ :\n            ∀ (x y : DirectLimit G f),\n              Quotient.lift (fun x => ↑(g x.fst) x.snd)\n                    (_ : ∀ (x y : Σˣ f), x ≈ y → (fun x => ↑(g x.fst) x.snd) x = (fun x => ↑(g x.fst) x.snd) y) x =\n                  Quotient.lift (fun x => ↑(g x.fst) x.snd)\n                    (_ : ∀ (x y : Σˣ f), x ≈ y → (fun x => ↑(g x.fst) x.snd) x = (fun x => ↑(g x.fst) x.snd) y) y →\n                x = y) }\n      (Quotient.mk (setoid G f) (Structure.Sigma.mk f i (funMap F fun a => y a))) =\n    funMap F ((fun x => ↑(g x.fst) x.snd) ∘ Structure.Sigma.mk f i ∘ y)\n[PROOFSTEP]\nsimp only [Quotient.lift_mk, Embedding.map_fun]\n[GOAL]\ncase intro.intro\nL : Language\nι : Type v\ninst✝⁵ : Preorder ι\nG : ι → Type w\ninst✝⁴ : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\ninst✝³ : IsDirected ι fun x x_1 => x ≤ x_1\ninst✝² : DirectedSystem G fun i j h => ↑(f i j h)\ninst✝¹ : Nonempty ι\nP : Type u₁\ninst✝ : Structure L P\ng : (i : ι) → G i ↪[L] P\nHg : ∀ (i j : ι) (hij : i ≤ j) (x : G i), ↑(g j) (↑(f i j hij) x) = ↑(g i) x\nn✝ : ℕ\nF : Functions L n✝\ni : ι\ny : Fin n✝ → G i\n⊢ funMap F (↑(g i) ∘ fun a => y a) = funMap F ((fun x => ↑(g x.fst) x.snd) ∘ Structure.Sigma.mk f i ∘ y)\n[PROOFSTEP]\nrfl\n[GOAL]\nL : Language\nι : Type v\ninst✝⁵ : Preorder ι\nG : ι → Type w\ninst✝⁴ : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\ninst✝³ : IsDirected ι fun x x_1 => x ≤ x_1\ninst✝² : DirectedSystem G fun i j h => ↑(f i j h)\ninst✝¹ : Nonempty ι\nP : Type u₁\ninst✝ : Structure L P\ng : (i : ι) → G i ↪[L] P\nHg : ∀ (i j : ι) (hij : i ≤ j) (x : G i), ↑(g j) (↑(f i j hij) x) = ↑(g i) x\nn✝ : ℕ\nR : Relations L n✝\nx : Fin n✝ → DirectLimit G f\n⊢ RelMap R\n      ({\n            toFun :=\n              Quotient.lift (fun x => ↑(g x.fst) x.snd)\n                (_ : ∀ (x y : Σˣ f), x ≈ y → (fun x => ↑(g x.fst) x.snd) x = (fun x => ↑(g x.fst) x.snd) y),\n            inj' :=\n              (_ :\n                ∀ (x y : DirectLimit G f),\n                  Quotient.lift (fun x => ↑(g x.fst) x.snd)\n                        (_ : ∀ (x y : Σˣ f), x ≈ y → (fun x => ↑(g x.fst) x.snd) x = (fun x => ↑(g x.fst) x.snd) y) x =\n                      Quotient.lift (fun x => ↑(g x.fst) x.snd)\n                        (_ : ∀ (x y : Σˣ f), x ≈ y → (fun x => ↑(g x.fst) x.snd) x = (fun x => ↑(g x.fst) x.snd) y) y →\n                    x = y) }.toFun ∘\n        x) ↔\n    RelMap R x\n[PROOFSTEP]\nobtain ⟨i, y, rfl⟩ := exists_quotient_mk'_sigma_mk'_eq G f x\n[GOAL]\ncase intro.intro\nL : Language\nι : Type v\ninst✝⁵ : Preorder ι\nG : ι → Type w\ninst✝⁴ : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\ninst✝³ : IsDirected ι fun x x_1 => x ≤ x_1\ninst✝² : DirectedSystem G fun i j h => ↑(f i j h)\ninst✝¹ : Nonempty ι\nP : Type u₁\ninst✝ : Structure L P\ng : (i : ι) → G i ↪[L] P\nHg : ∀ (i j : ι) (hij : i ≤ j) (x : G i), ↑(g j) (↑(f i j hij) x) = ↑(g i) x\nn✝ : ℕ\nR : Relations L n✝\ni : ι\ny : Fin n✝ → G i\n⊢ RelMap R\n      ({\n            toFun :=\n              Quotient.lift (fun x => ↑(g x.fst) x.snd)\n                (_ : ∀ (x y : Σˣ f), x ≈ y → (fun x => ↑(g x.fst) x.snd) x = (fun x => ↑(g x.fst) x.snd) y),\n            inj' :=\n              (_ :\n                ∀ (x y : DirectLimit G f),\n                  Quotient.lift (fun x => ↑(g x.fst) x.snd)\n                        (_ : ∀ (x y : Σˣ f), x ≈ y → (fun x => ↑(g x.fst) x.snd) x = (fun x => ↑(g x.fst) x.snd) y) x =\n                      Quotient.lift (fun x => ↑(g x.fst) x.snd)\n                        (_ : ∀ (x y : Σˣ f), x ≈ y → (fun x => ↑(g x.fst) x.snd) x = (fun x => ↑(g x.fst) x.snd) y) y →\n                    x = y) }.toFun ∘\n        fun a => Quotient.mk (setoid G f) (Structure.Sigma.mk f i (y a))) ↔\n    RelMap R fun a => Quotient.mk (setoid G f) (Structure.Sigma.mk f i (y a))\n[PROOFSTEP]\nchange RelMap R (Quotient.lift _ _ ∘ Quotient.mk _ ∘ Structure.Sigma.mk f i ∘ y) ↔ _\n[GOAL]\ncase intro.intro\nL : Language\nι : Type v\ninst✝⁵ : Preorder ι\nG : ι → Type w\ninst✝⁴ : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\ninst✝³ : IsDirected ι fun x x_1 => x ≤ x_1\ninst✝² : DirectedSystem G fun i j h => ↑(f i j h)\ninst✝¹ : Nonempty ι\nP : Type u₁\ninst✝ : Structure L P\ng : (i : ι) → G i ↪[L] P\nHg : ∀ (i j : ι) (hij : i ≤ j) (x : G i), ↑(g j) (↑(f i j hij) x) = ↑(g i) x\nn✝ : ℕ\nR : Relations L n✝\ni : ι\ny : Fin n✝ → G i\n⊢ RelMap R\n      (Quotient.lift (fun x => ↑(g x.fst) x.snd)\n          (_ : ∀ (x y : Σˣ f), x ≈ y → (fun x => ↑(g x.fst) x.snd) x = (fun x => ↑(g x.fst) x.snd) y) ∘\n        Quotient.mk (setoid G f) ∘ Structure.Sigma.mk f i ∘ y) ↔\n    RelMap R fun a => Quotient.mk (setoid G f) (Structure.Sigma.mk f i (y a))\n[PROOFSTEP]\nrw [relMap_quotient_mk'_sigma_mk' G f, ← (g i).map_rel R y, ← Function.comp.assoc, Quotient.lift_comp_mk]\n[GOAL]\ncase intro.intro\nL : Language\nι : Type v\ninst✝⁵ : Preorder ι\nG : ι → Type w\ninst✝⁴ : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\ninst✝³ : IsDirected ι fun x x_1 => x ≤ x_1\ninst✝² : DirectedSystem G fun i j h => ↑(f i j h)\ninst✝¹ : Nonempty ι\nP : Type u₁\ninst✝ : Structure L P\ng : (i : ι) → G i ↪[L] P\nHg : ∀ (i j : ι) (hij : i ≤ j) (x : G i), ↑(g j) (↑(f i j hij) x) = ↑(g i) x\nn✝ : ℕ\nR : Relations L n✝\ni : ι\ny : Fin n✝ → G i\n⊢ RelMap R ((fun x => ↑(g x.fst) x.snd) ∘ Structure.Sigma.mk f i ∘ y) ↔ RelMap R (↑(g i) ∘ y)\n[PROOFSTEP]\nrfl\n[GOAL]\nL : Language\nι : Type v\ninst✝⁵ : Preorder ι\nG : ι → Type w\ninst✝⁴ : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\ninst✝³ : IsDirected ι fun x x_1 => x ≤ x_1\ninst✝² : DirectedSystem G fun i j h => ↑(f i j h)\ninst✝¹ : Nonempty ι\nP : Type u₁\ninst✝ : Structure L P\ng : (i : ι) → G i ↪[L] P\nHg : ∀ (i j : ι) (hij : i ≤ j) (x : G i), ↑(g j) (↑(f i j hij) x) = ↑(g i) x\ni : ι\nx : G i\n⊢ ↑(lift L ι G f g Hg) (Quotient.mk (setoid G f) (Structure.Sigma.mk f i x)) = ↑(g i) x\n[PROOFSTEP]\nchange (lift L ι G f g Hg).toFun ⟦.mk f i x⟧ = _\n[GOAL]\nL : Language\nι : Type v\ninst✝⁵ : Preorder ι\nG : ι → Type w\ninst✝⁴ : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\ninst✝³ : IsDirected ι fun x x_1 => x ≤ x_1\ninst✝² : DirectedSystem G fun i j h => ↑(f i j h)\ninst✝¹ : Nonempty ι\nP : Type u₁\ninst✝ : Structure L P\ng : (i : ι) → G i ↪[L] P\nHg : ∀ (i j : ι) (hij : i ≤ j) (x : G i), ↑(g j) (↑(f i j hij) x) = ↑(g i) x\ni : ι\nx : G i\n⊢ Function.Embedding.toFun (lift L ι G f g Hg).toEmbedding (Quotient.mk (setoid G f) (Structure.Sigma.mk f i x)) =\n    ↑(g i) x\n[PROOFSTEP]\nsimp only [lift, Quotient.lift_mk]\n[GOAL]\nL : Language\nι : Type v\ninst✝⁵ : Preorder ι\nG : ι → Type w\ninst✝⁴ : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\ninst✝³ : IsDirected ι fun x x_1 => x ≤ x_1\ninst✝² : DirectedSystem G fun i j h => ↑(f i j h)\ninst✝¹ : Nonempty ι\nP : Type u₁\ninst✝ : Structure L P\ng : (i : ι) → G i ↪[L] P\nHg : ∀ (i j : ι) (hij : i ≤ j) (x : G i), ↑(g j) (↑(f i j hij) x) = ↑(g i) x\ni : ι\nx : G i\n⊢ ↑(lift L ι G f g Hg) (↑(of L ι G f i) x) = ↑(g i) x\n[PROOFSTEP]\nsimp\n[GOAL]\nL : Language\nι : Type v\ninst✝⁵ : Preorder ι\nG : ι → Type w\ninst✝⁴ : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\ninst✝³ : IsDirected ι fun x x_1 => x ≤ x_1\ninst✝² : DirectedSystem G fun i j h => ↑(f i j h)\ninst✝¹ : Nonempty ι\nP : Type u₁\ninst✝ : Structure L P\ng : (i : ι) → G i ↪[L] P\nHg : ∀ (i j : ι) (hij : i ≤ j) (x : G i), ↑(g j) (↑(f i j hij) x) = ↑(g i) x\nF : DirectLimit G f ↪[L] P\nx✝ : DirectLimit G f\ni j : ι\nhij : i ≤ j\nx : G i\n⊢ ↑((fun i => Embedding.comp F (of L ι G f i)) j) (↑(f i j hij) x) = ↑((fun i => Embedding.comp F (of L ι G f i)) i) x\n[PROOFSTEP]\nrw [F.comp_apply, F.comp_apply, of_f]\n[GOAL]\nL : Language\nι : Type v\ninst✝⁵ : Preorder ι\nG : ι → Type w\ninst✝⁴ : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\ninst✝³ : IsDirected ι fun x x_1 => x ≤ x_1\ninst✝² : DirectedSystem G fun i j h => ↑(f i j h)\ninst✝¹ : Nonempty ι\nP : Type u₁\ninst✝ : Structure L P\ng : (i : ι) → G i ↪[L] P\nHg : ∀ (i j : ι) (hij : i ≤ j) (x : G i), ↑(g j) (↑(f i j hij) x) = ↑(g i) x\nF : DirectLimit G f ↪[L] P\nx✝ : DirectLimit G f\ni : ι\nx : G i\n⊢ ↑F (↑(of L ι G f i) x) =\n    ↑(lift L ι G f (fun i => Embedding.comp F (of L ι G f i))\n          (_ :\n            ∀ (i j : ι) (hij : i ≤ j) (x : G i),\n              ↑((fun i => Embedding.comp F (of L ι G f i)) j) (↑(f i j hij) x) =\n                ↑((fun i => Embedding.comp F (of L ι G f i)) i) x))\n      (↑(of L ι G f i) x)\n[PROOFSTEP]\nrw [lift_of]\n[GOAL]\nL : Language\nι : Type v\ninst✝⁵ : Preorder ι\nG : ι → Type w\ninst✝⁴ : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\ninst✝³ : IsDirected ι fun x x_1 => x ≤ x_1\ninst✝² : DirectedSystem G fun i j h => ↑(f i j h)\ninst✝¹ : Nonempty ι\nP : Type u₁\ninst✝ : Structure L P\ng : (i : ι) → G i ↪[L] P\nHg : ∀ (i j : ι) (hij : i ≤ j) (x : G i), ↑(g j) (↑(f i j hij) x) = ↑(g i) x\nF : DirectLimit G f ↪[L] P\nx✝ : DirectLimit G f\ni : ι\nx : G i\n⊢ ↑F (↑(of L ι G f i) x) = ↑(Embedding.comp F (of L ι G f i)) x\n[PROOFSTEP]\nrfl\n[GOAL]\nL : Language\nι✝ : Type v\ninst✝¹¹ : Preorder ι✝\nG✝ : ι✝ → Type w\ninst✝¹⁰ : (i : ι✝) → Structure L (G✝ i)\nf✝ : (i j : ι✝) → i ≤ j → G✝ i ↪[L] G✝ j\ninst✝⁹ : IsDirected ι✝ fun x x_1 => x ≤ x_1\ninst✝⁸ : DirectedSystem G✝ fun i j h => ↑(f✝ i j h)\ninst✝⁷ : Nonempty ι✝\nP : Type u₁\ninst✝⁶ : Structure L P\ng : (i : ι✝) → G✝ i ↪[L] P\nHg : ∀ (i j : ι✝) (hij : i ≤ j) (x : G✝ i), ↑(g j) (↑(f✝ i j hij) x) = ↑(g i) x\nι : Type u_1\ninst✝⁵ : Encodable ι\ninst✝⁴ : Preorder ι\ninst✝³ : IsDirected ι fun x x_1 => x ≤ x_1\ninst✝² : Nonempty ι\nG : ι → Type w\ninst✝¹ : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\nh : ∀ (i : ι), CG L (G i)\ninst✝ : DirectedSystem G fun i j h => ↑(f i j h)\n⊢ CG L (DirectLimit G f)\n[PROOFSTEP]\nrefine' ⟨⟨⋃ i, DirectLimit.of L ι G f i '' Classical.choose (h i).out, _, _⟩⟩\n[GOAL]\ncase refine'_1\nL : Language\nι✝ : Type v\ninst✝¹¹ : Preorder ι✝\nG✝ : ι✝ → Type w\ninst✝¹⁰ : (i : ι✝) → Structure L (G✝ i)\nf✝ : (i j : ι✝) → i ≤ j → G✝ i ↪[L] G✝ j\ninst✝⁹ : IsDirected ι✝ fun x x_1 => x ≤ x_1\ninst✝⁸ : DirectedSystem G✝ fun i j h => ↑(f✝ i j h)\ninst✝⁷ : Nonempty ι✝\nP : Type u₁\ninst✝⁶ : Structure L P\ng : (i : ι✝) → G✝ i ↪[L] P\nHg : ∀ (i j : ι✝) (hij : i ≤ j) (x : G✝ i), ↑(g j) (↑(f✝ i j hij) x) = ↑(g i) x\nι : Type u_1\ninst✝⁵ : Encodable ι\ninst✝⁴ : Preorder ι\ninst✝³ : IsDirected ι fun x x_1 => x ≤ x_1\ninst✝² : Nonempty ι\nG : ι → Type w\ninst✝¹ : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\nh : ∀ (i : ι), CG L (G i)\ninst✝ : DirectedSystem G fun i j h => ↑(f i j h)\n⊢ Set.Countable (⋃ (i : ι), ↑(of L ι G f i) '' Classical.choose (_ : Substructure.CG ⊤))\n[PROOFSTEP]\nexact Set.countable_iUnion fun i => Set.Countable.image (Classical.choose_spec (h i).out).1 _\n[GOAL]\ncase refine'_2\nL : Language\nι✝ : Type v\ninst✝¹¹ : Preorder ι✝\nG✝ : ι✝ → Type w\ninst✝¹⁰ : (i : ι✝) → Structure L (G✝ i)\nf✝ : (i j : ι✝) → i ≤ j → G✝ i ↪[L] G✝ j\ninst✝⁹ : IsDirected ι✝ fun x x_1 => x ≤ x_1\ninst✝⁸ : DirectedSystem G✝ fun i j h => ↑(f✝ i j h)\ninst✝⁷ : Nonempty ι✝\nP : Type u₁\ninst✝⁶ : Structure L P\ng : (i : ι✝) → G✝ i ↪[L] P\nHg : ∀ (i j : ι✝) (hij : i ≤ j) (x : G✝ i), ↑(g j) (↑(f✝ i j hij) x) = ↑(g i) x\nι : Type u_1\ninst✝⁵ : Encodable ι\ninst✝⁴ : Preorder ι\ninst✝³ : IsDirected ι fun x x_1 => x ≤ x_1\ninst✝² : Nonempty ι\nG : ι → Type w\ninst✝¹ : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\nh : ∀ (i : ι), CG L (G i)\ninst✝ : DirectedSystem G fun i j h => ↑(f i j h)\n⊢ LowerAdjoint.toFun (Substructure.closure L) (⋃ (i : ι), ↑(of L ι G f i) '' Classical.choose (_ : Substructure.CG ⊤)) =\n    ⊤\n[PROOFSTEP]\nrw [eq_top_iff, Substructure.closure_unionᵢ]\n[GOAL]\ncase refine'_2\nL : Language\nι✝ : Type v\ninst✝¹¹ : Preorder ι✝\nG✝ : ι✝ → Type w\ninst✝¹⁰ : (i : ι✝) → Structure L (G✝ i)\nf✝ : (i j : ι✝) → i ≤ j → G✝ i ↪[L] G✝ j\ninst✝⁹ : IsDirected ι✝ fun x x_1 => x ≤ x_1\ninst✝⁸ : DirectedSystem G✝ fun i j h => ↑(f✝ i j h)\ninst✝⁷ : Nonempty ι✝\nP : Type u₁\ninst✝⁶ : Structure L P\ng : (i : ι✝) → G✝ i ↪[L] P\nHg : ∀ (i j : ι✝) (hij : i ≤ j) (x : G✝ i), ↑(g j) (↑(f✝ i j hij) x) = ↑(g i) x\nι : Type u_1\ninst✝⁵ : Encodable ι\ninst✝⁴ : Preorder ι\ninst✝³ : IsDirected ι fun x x_1 => x ≤ x_1\ninst✝² : Nonempty ι\nG : ι → Type w\ninst✝¹ : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\nh : ∀ (i : ι), CG L (G i)\ninst✝ : DirectedSystem G fun i j h => ↑(f i j h)\n⊢ ⊤ ≤\n    ⨆ (i : ι), LowerAdjoint.toFun (Substructure.closure L) (↑(of L ι G f i) '' Classical.choose (_ : Substructure.CG ⊤))\n[PROOFSTEP]\nsimp_rw [← Embedding.coe_toHom, Substructure.closure_image]\n[GOAL]\ncase refine'_2\nL : Language\nι✝ : Type v\ninst✝¹¹ : Preorder ι✝\nG✝ : ι✝ → Type w\ninst✝¹⁰ : (i : ι✝) → Structure L (G✝ i)\nf✝ : (i j : ι✝) → i ≤ j → G✝ i ↪[L] G✝ j\ninst✝⁹ : IsDirected ι✝ fun x x_1 => x ≤ x_1\ninst✝⁸ : DirectedSystem G✝ fun i j h => ↑(f✝ i j h)\ninst✝⁷ : Nonempty ι✝\nP : Type u₁\ninst✝⁶ : Structure L P\ng : (i : ι✝) → G✝ i ↪[L] P\nHg : ∀ (i j : ι✝) (hij : i ≤ j) (x : G✝ i), ↑(g j) (↑(f✝ i j hij) x) = ↑(g i) x\nι : Type u_1\ninst✝⁵ : Encodable ι\ninst✝⁴ : Preorder ι\ninst✝³ : IsDirected ι fun x x_1 => x ≤ x_1\ninst✝² : Nonempty ι\nG : ι → Type w\ninst✝¹ : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\nh : ∀ (i : ι), CG L (G i)\ninst✝ : DirectedSystem G fun i j h => ↑(f i j h)\n⊢ ⊤ ≤\n    ⨆ (i : ι),\n      Substructure.map (Embedding.toHom (of L ι G f i))\n        (LowerAdjoint.toFun (Substructure.closure L) (Classical.choose (_ : Substructure.CG ⊤)))\n[PROOFSTEP]\nrw [le_iSup_iff]\n[GOAL]\ncase refine'_2\nL : Language\nι✝ : Type v\ninst✝¹¹ : Preorder ι✝\nG✝ : ι✝ → Type w\ninst✝¹⁰ : (i : ι✝) → Structure L (G✝ i)\nf✝ : (i j : ι✝) → i ≤ j → G✝ i ↪[L] G✝ j\ninst✝⁹ : IsDirected ι✝ fun x x_1 => x ≤ x_1\ninst✝⁸ : DirectedSystem G✝ fun i j h => ↑(f✝ i j h)\ninst✝⁷ : Nonempty ι✝\nP : Type u₁\ninst✝⁶ : Structure L P\ng : (i : ι✝) → G✝ i ↪[L] P\nHg : ∀ (i j : ι✝) (hij : i ≤ j) (x : G✝ i), ↑(g j) (↑(f✝ i j hij) x) = ↑(g i) x\nι : Type u_1\ninst✝⁵ : Encodable ι\ninst✝⁴ : Preorder ι\ninst✝³ : IsDirected ι fun x x_1 => x ≤ x_1\ninst✝² : Nonempty ι\nG : ι → Type w\ninst✝¹ : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\nh : ∀ (i : ι), CG L (G i)\ninst✝ : DirectedSystem G fun i j h => ↑(f i j h)\n⊢ ∀ (b : Substructure L (DirectLimit G f)),\n    (∀ (i : ι),\n        Substructure.map (Embedding.toHom (of L ι G f i))\n            (LowerAdjoint.toFun (Substructure.closure L) (Classical.choose (_ : Substructure.CG ⊤))) ≤\n          b) →\n      ⊤ ≤ b\n[PROOFSTEP]\nintro S hS x _\n[GOAL]\ncase refine'_2\nL : Language\nι✝ : Type v\ninst✝¹¹ : Preorder ι✝\nG✝ : ι✝ → Type w\ninst✝¹⁰ : (i : ι✝) → Structure L (G✝ i)\nf✝ : (i j : ι✝) → i ≤ j → G✝ i ↪[L] G✝ j\ninst✝⁹ : IsDirected ι✝ fun x x_1 => x ≤ x_1\ninst✝⁸ : DirectedSystem G✝ fun i j h => ↑(f✝ i j h)\ninst✝⁷ : Nonempty ι✝\nP : Type u₁\ninst✝⁶ : Structure L P\ng : (i : ι✝) → G✝ i ↪[L] P\nHg : ∀ (i j : ι✝) (hij : i ≤ j) (x : G✝ i), ↑(g j) (↑(f✝ i j hij) x) = ↑(g i) x\nι : Type u_1\ninst✝⁵ : Encodable ι\ninst✝⁴ : Preorder ι\ninst✝³ : IsDirected ι fun x x_1 => x ≤ x_1\ninst✝² : Nonempty ι\nG : ι → Type w\ninst✝¹ : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\nh : ∀ (i : ι), CG L (G i)\ninst✝ : DirectedSystem G fun i j h => ↑(f i j h)\nS : Substructure L (DirectLimit G f)\nhS :\n  ∀ (i : ι),\n    Substructure.map (Embedding.toHom (of L ι G f i))\n        (LowerAdjoint.toFun (Substructure.closure L) (Classical.choose (_ : Substructure.CG ⊤))) ≤\n      S\nx : DirectLimit G f\na✝ : x ∈ ⊤\n⊢ x ∈ S\n[PROOFSTEP]\nlet out := Quotient.out (s := DirectLimit.setoid G f)\n[GOAL]\ncase refine'_2\nL : Language\nι✝ : Type v\ninst✝¹¹ : Preorder ι✝\nG✝ : ι✝ → Type w\ninst✝¹⁰ : (i : ι✝) → Structure L (G✝ i)\nf✝ : (i j : ι✝) → i ≤ j → G✝ i ↪[L] G✝ j\ninst✝⁹ : IsDirected ι✝ fun x x_1 => x ≤ x_1\ninst✝⁸ : DirectedSystem G✝ fun i j h => ↑(f✝ i j h)\ninst✝⁷ : Nonempty ι✝\nP : Type u₁\ninst✝⁶ : Structure L P\ng : (i : ι✝) → G✝ i ↪[L] P\nHg : ∀ (i j : ι✝) (hij : i ≤ j) (x : G✝ i), ↑(g j) (↑(f✝ i j hij) x) = ↑(g i) x\nι : Type u_1\ninst✝⁵ : Encodable ι\ninst✝⁴ : Preorder ι\ninst✝³ : IsDirected ι fun x x_1 => x ≤ x_1\ninst✝² : Nonempty ι\nG : ι → Type w\ninst✝¹ : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\nh : ∀ (i : ι), CG L (G i)\ninst✝ : DirectedSystem G fun i j h => ↑(f i j h)\nS : Substructure L (DirectLimit G f)\nhS :\n  ∀ (i : ι),\n    Substructure.map (Embedding.toHom (of L ι G f i))\n        (LowerAdjoint.toFun (Substructure.closure L) (Classical.choose (_ : Substructure.CG ⊤))) ≤\n      S\nx : DirectLimit G f\na✝ : x ∈ ⊤\nout : Quotient (setoid G f) → Σˣ f := Quotient.out\n⊢ x ∈ S\n[PROOFSTEP]\nrefine' hS (out x).1 ⟨(out x).2, _, _⟩\n[GOAL]\ncase refine'_2.refine'_1\nL : Language\nι✝ : Type v\ninst✝¹¹ : Preorder ι✝\nG✝ : ι✝ → Type w\ninst✝¹⁰ : (i : ι✝) → Structure L (G✝ i)\nf✝ : (i j : ι✝) → i ≤ j → G✝ i ↪[L] G✝ j\ninst✝⁹ : IsDirected ι✝ fun x x_1 => x ≤ x_1\ninst✝⁸ : DirectedSystem G✝ fun i j h => ↑(f✝ i j h)\ninst✝⁷ : Nonempty ι✝\nP : Type u₁\ninst✝⁶ : Structure L P\ng : (i : ι✝) → G✝ i ↪[L] P\nHg : ∀ (i j : ι✝) (hij : i ≤ j) (x : G✝ i), ↑(g j) (↑(f✝ i j hij) x) = ↑(g i) x\nι : Type u_1\ninst✝⁵ : Encodable ι\ninst✝⁴ : Preorder ι\ninst✝³ : IsDirected ι fun x x_1 => x ≤ x_1\ninst✝² : Nonempty ι\nG : ι → Type w\ninst✝¹ : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\nh : ∀ (i : ι), CG L (G i)\ninst✝ : DirectedSystem G fun i j h => ↑(f i j h)\nS : Substructure L (DirectLimit G f)\nhS :\n  ∀ (i : ι),\n    Substructure.map (Embedding.toHom (of L ι G f i))\n        (LowerAdjoint.toFun (Substructure.closure L) (Classical.choose (_ : Substructure.CG ⊤))) ≤\n      S\nx : DirectLimit G f\na✝ : x ∈ ⊤\nout : Quotient (setoid G f) → Σˣ f := Quotient.out\n⊢ (out x).snd ∈ ↑(LowerAdjoint.toFun (Substructure.closure L) (Classical.choose (_ : Substructure.CG ⊤)))\n[PROOFSTEP]\nrw [(Classical.choose_spec (h (out x).1).out).2]\n[GOAL]\ncase refine'_2.refine'_1\nL : Language\nι✝ : Type v\ninst✝¹¹ : Preorder ι✝\nG✝ : ι✝ → Type w\ninst✝¹⁰ : (i : ι✝) → Structure L (G✝ i)\nf✝ : (i j : ι✝) → i ≤ j → G✝ i ↪[L] G✝ j\ninst✝⁹ : IsDirected ι✝ fun x x_1 => x ≤ x_1\ninst✝⁸ : DirectedSystem G✝ fun i j h => ↑(f✝ i j h)\ninst✝⁷ : Nonempty ι✝\nP : Type u₁\ninst✝⁶ : Structure L P\ng : (i : ι✝) → G✝ i ↪[L] P\nHg : ∀ (i j : ι✝) (hij : i ≤ j) (x : G✝ i), ↑(g j) (↑(f✝ i j hij) x) = ↑(g i) x\nι : Type u_1\ninst✝⁵ : Encodable ι\ninst✝⁴ : Preorder ι\ninst✝³ : IsDirected ι fun x x_1 => x ≤ x_1\ninst✝² : Nonempty ι\nG : ι → Type w\ninst✝¹ : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\nh : ∀ (i : ι), CG L (G i)\ninst✝ : DirectedSystem G fun i j h => ↑(f i j h)\nS : Substructure L (DirectLimit G f)\nhS :\n  ∀ (i : ι),\n    Substructure.map (Embedding.toHom (of L ι G f i))\n        (LowerAdjoint.toFun (Substructure.closure L) (Classical.choose (_ : Substructure.CG ⊤))) ≤\n      S\nx : DirectLimit G f\na✝ : x ∈ ⊤\nout : Quotient (setoid G f) → Σˣ f := Quotient.out\n⊢ (out x).snd ∈ ↑⊤\n[PROOFSTEP]\ntrivial\n[GOAL]\ncase refine'_2.refine'_2\nL : Language\nι✝ : Type v\ninst✝¹¹ : Preorder ι✝\nG✝ : ι✝ → Type w\ninst✝¹⁰ : (i : ι✝) → Structure L (G✝ i)\nf✝ : (i j : ι✝) → i ≤ j → G✝ i ↪[L] G✝ j\ninst✝⁹ : IsDirected ι✝ fun x x_1 => x ≤ x_1\ninst✝⁸ : DirectedSystem G✝ fun i j h => ↑(f✝ i j h)\ninst✝⁷ : Nonempty ι✝\nP : Type u₁\ninst✝⁶ : Structure L P\ng : (i : ι✝) → G✝ i ↪[L] P\nHg : ∀ (i j : ι✝) (hij : i ≤ j) (x : G✝ i), ↑(g j) (↑(f✝ i j hij) x) = ↑(g i) x\nι : Type u_1\ninst✝⁵ : Encodable ι\ninst✝⁴ : Preorder ι\ninst✝³ : IsDirected ι fun x x_1 => x ≤ x_1\ninst✝² : Nonempty ι\nG : ι → Type w\ninst✝¹ : (i : ι) → Structure L (G i)\nf : (i j : ι) → i ≤ j → G i ↪[L] G j\nh : ∀ (i : ι), CG L (G i)\ninst✝ : DirectedSystem G fun i j h => ↑(f i j h)\nS : Substructure L (DirectLimit G f)\nhS :\n  ∀ (i : ι),\n    Substructure.map (Embedding.toHom (of L ι G f i))\n        (LowerAdjoint.toFun (Substructure.closure L) (Classical.choose (_ : Substructure.CG ⊤))) ≤\n      S\nx : DirectLimit G f\na✝ : x ∈ ⊤\nout : Quotient (setoid G f) → Σˣ f := Quotient.out\n⊢ ↑(Embedding.toHom (of L ι G f (out x).fst)) (out x).snd = x\n[PROOFSTEP]\nsimp only [Embedding.coe_toHom, DirectLimit.of_apply, Sigma.eta, Quotient.out_eq]\n", "meta": {"mathlib_filename": "Mathlib.ModelTheory.DirectLimit", "llama_tokens": 43299, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8056321889812553, "lm_q2_score": 0.6513548646660542, "lm_q1q2_score": 0.5247524454245026}}
{"text": "[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\na : ℝ\nf g : ℂ → E\nl : Filter ℂ\nu : ℂ → ℝ\nhBf : ∃ c, c < a ∧ ∃ B, f =O[l] fun z => expR (B * expR (c * |u z|))\nhBg : ∃ c, c < a ∧ ∃ B, g =O[l] fun z => expR (B * expR (c * |u z|))\n⊢ ∃ c, c < a ∧ ∃ B, (f - g) =O[l] fun z => expR (B * expR (c * |u z|))\n[PROOFSTEP]\nhave :\n  ∀ {c₁ c₂ B₁ B₂},\n    c₁ ≤ c₂ → 0 ≤ B₂ → B₁ ≤ B₂ → ∀ z, ‖expR (B₁ * expR (c₁ * |u z|))‖ ≤ ‖expR (B₂ * expR (c₂ * |u z|))‖ :=\n  fun hc hB₀ hB z ↦\n  by\n  rw [Real.norm_eq_abs, Real.norm_eq_abs, Real.abs_exp, Real.abs_exp, Real.exp_le_exp]\n  exact mul_le_mul hB (Real.exp_le_exp.2 <| mul_le_mul_of_nonneg_right hc <| abs_nonneg _) (Real.exp_pos _).le hB₀\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\na : ℝ\nf g : ℂ → E\nl : Filter ℂ\nu : ℂ → ℝ\nhBf : ∃ c, c < a ∧ ∃ B, f =O[l] fun z => expR (B * expR (c * |u z|))\nhBg : ∃ c, c < a ∧ ∃ B, g =O[l] fun z => expR (B * expR (c * |u z|))\nc₁✝ c₂✝ B₁✝ B₂✝ : ℝ\nhc : c₁✝ ≤ c₂✝\nhB₀ : 0 ≤ B₂✝\nhB : B₁✝ ≤ B₂✝\nz : ℂ\n⊢ ‖expR (B₁✝ * expR (c₁✝ * |u z|))‖ ≤ ‖expR (B₂✝ * expR (c₂✝ * |u z|))‖\n[PROOFSTEP]\nrw [Real.norm_eq_abs, Real.norm_eq_abs, Real.abs_exp, Real.abs_exp, Real.exp_le_exp]\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\na : ℝ\nf g : ℂ → E\nl : Filter ℂ\nu : ℂ → ℝ\nhBf : ∃ c, c < a ∧ ∃ B, f =O[l] fun z => expR (B * expR (c * |u z|))\nhBg : ∃ c, c < a ∧ ∃ B, g =O[l] fun z => expR (B * expR (c * |u z|))\nc₁✝ c₂✝ B₁✝ B₂✝ : ℝ\nhc : c₁✝ ≤ c₂✝\nhB₀ : 0 ≤ B₂✝\nhB : B₁✝ ≤ B₂✝\nz : ℂ\n⊢ B₁✝ * expR (c₁✝ * |u z|) ≤ B₂✝ * expR (c₂✝ * |u z|)\n[PROOFSTEP]\nexact mul_le_mul hB (Real.exp_le_exp.2 <| mul_le_mul_of_nonneg_right hc <| abs_nonneg _) (Real.exp_pos _).le hB₀\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\na : ℝ\nf g : ℂ → E\nl : Filter ℂ\nu : ℂ → ℝ\nhBf : ∃ c, c < a ∧ ∃ B, f =O[l] fun z => expR (B * expR (c * |u z|))\nhBg : ∃ c, c < a ∧ ∃ B, g =O[l] fun z => expR (B * expR (c * |u z|))\nthis :\n  ∀ {c₁ c₂ B₁ B₂ : ℝ},\n    c₁ ≤ c₂ → 0 ≤ B₂ → B₁ ≤ B₂ → ∀ (z : ℂ), ‖expR (B₁ * expR (c₁ * |u z|))‖ ≤ ‖expR (B₂ * expR (c₂ * |u z|))‖\n⊢ ∃ c, c < a ∧ ∃ B, (f - g) =O[l] fun z => expR (B * expR (c * |u z|))\n[PROOFSTEP]\nrcases hBf with ⟨cf, hcf, Bf, hOf⟩\n[GOAL]\ncase intro.intro.intro\nE : Type u_1\ninst✝ : NormedAddCommGroup E\na : ℝ\nf g : ℂ → E\nl : Filter ℂ\nu : ℂ → ℝ\nhBg : ∃ c, c < a ∧ ∃ B, g =O[l] fun z => expR (B * expR (c * |u z|))\nthis :\n  ∀ {c₁ c₂ B₁ B₂ : ℝ},\n    c₁ ≤ c₂ → 0 ≤ B₂ → B₁ ≤ B₂ → ∀ (z : ℂ), ‖expR (B₁ * expR (c₁ * |u z|))‖ ≤ ‖expR (B₂ * expR (c₂ * |u z|))‖\ncf : ℝ\nhcf : cf < a\nBf : ℝ\nhOf : f =O[l] fun z => expR (Bf * expR (cf * |u z|))\n⊢ ∃ c, c < a ∧ ∃ B, (f - g) =O[l] fun z => expR (B * expR (c * |u z|))\n[PROOFSTEP]\nrcases hBg with ⟨cg, hcg, Bg, hOg⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nE : Type u_1\ninst✝ : NormedAddCommGroup E\na : ℝ\nf g : ℂ → E\nl : Filter ℂ\nu : ℂ → ℝ\nthis :\n  ∀ {c₁ c₂ B₁ B₂ : ℝ},\n    c₁ ≤ c₂ → 0 ≤ B₂ → B₁ ≤ B₂ → ∀ (z : ℂ), ‖expR (B₁ * expR (c₁ * |u z|))‖ ≤ ‖expR (B₂ * expR (c₂ * |u z|))‖\ncf : ℝ\nhcf : cf < a\nBf : ℝ\nhOf : f =O[l] fun z => expR (Bf * expR (cf * |u z|))\ncg : ℝ\nhcg : cg < a\nBg : ℝ\nhOg : g =O[l] fun z => expR (Bg * expR (cg * |u z|))\n⊢ ∃ c, c < a ∧ ∃ B, (f - g) =O[l] fun z => expR (B * expR (c * |u z|))\n[PROOFSTEP]\nrefine' ⟨max cf cg, max_lt hcf hcg, max 0 (max Bf Bg), _⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nE : Type u_1\ninst✝ : NormedAddCommGroup E\na : ℝ\nf g : ℂ → E\nl : Filter ℂ\nu : ℂ → ℝ\nthis :\n  ∀ {c₁ c₂ B₁ B₂ : ℝ},\n    c₁ ≤ c₂ → 0 ≤ B₂ → B₁ ≤ B₂ → ∀ (z : ℂ), ‖expR (B₁ * expR (c₁ * |u z|))‖ ≤ ‖expR (B₂ * expR (c₂ * |u z|))‖\ncf : ℝ\nhcf : cf < a\nBf : ℝ\nhOf : f =O[l] fun z => expR (Bf * expR (cf * |u z|))\ncg : ℝ\nhcg : cg < a\nBg : ℝ\nhOg : g =O[l] fun z => expR (Bg * expR (cg * |u z|))\n⊢ (f - g) =O[l] fun z => expR (max 0 (max Bf Bg) * expR (max cf cg * |u z|))\n[PROOFSTEP]\nrefine' (hOf.trans_le <| this _ _ _).sub (hOg.trans_le <| this _ _ _)\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.refine'_1\nE : Type u_1\ninst✝ : NormedAddCommGroup E\na : ℝ\nf g : ℂ → E\nl : Filter ℂ\nu : ℂ → ℝ\nthis :\n  ∀ {c₁ c₂ B₁ B₂ : ℝ},\n    c₁ ≤ c₂ → 0 ≤ B₂ → B₁ ≤ B₂ → ∀ (z : ℂ), ‖expR (B₁ * expR (c₁ * |u z|))‖ ≤ ‖expR (B₂ * expR (c₂ * |u z|))‖\ncf : ℝ\nhcf : cf < a\nBf : ℝ\nhOf : f =O[l] fun z => expR (Bf * expR (cf * |u z|))\ncg : ℝ\nhcg : cg < a\nBg : ℝ\nhOg : g =O[l] fun z => expR (Bg * expR (cg * |u z|))\n⊢ cf ≤ max cf cg\ncase intro.intro.intro.intro.intro.intro.refine'_2\nE : Type u_1\ninst✝ : NormedAddCommGroup E\na : ℝ\nf g : ℂ → E\nl : Filter ℂ\nu : ℂ → ℝ\nthis :\n  ∀ {c₁ c₂ B₁ B₂ : ℝ},\n    c₁ ≤ c₂ → 0 ≤ B₂ → B₁ ≤ B₂ → ∀ (z : ℂ), ‖expR (B₁ * expR (c₁ * |u z|))‖ ≤ ‖expR (B₂ * expR (c₂ * |u z|))‖\ncf : ℝ\nhcf : cf < a\nBf : ℝ\nhOf : f =O[l] fun z => expR (Bf * expR (cf * |u z|))\ncg : ℝ\nhcg : cg < a\nBg : ℝ\nhOg : g =O[l] fun z => expR (Bg * expR (cg * |u z|))\n⊢ 0 ≤ max 0 (max Bf Bg)\ncase intro.intro.intro.intro.intro.intro.refine'_3\nE : Type u_1\ninst✝ : NormedAddCommGroup E\na : ℝ\nf g : ℂ → E\nl : Filter ℂ\nu : ℂ → ℝ\nthis :\n  ∀ {c₁ c₂ B₁ B₂ : ℝ},\n    c₁ ≤ c₂ → 0 ≤ B₂ → B₁ ≤ B₂ → ∀ (z : ℂ), ‖expR (B₁ * expR (c₁ * |u z|))‖ ≤ ‖expR (B₂ * expR (c₂ * |u z|))‖\ncf : ℝ\nhcf : cf < a\nBf : ℝ\nhOf : f =O[l] fun z => expR (Bf * expR (cf * |u z|))\ncg : ℝ\nhcg : cg < a\nBg : ℝ\nhOg : g =O[l] fun z => expR (Bg * expR (cg * |u z|))\n⊢ Bf ≤ max 0 (max Bf Bg)\ncase intro.intro.intro.intro.intro.intro.refine'_4\nE : Type u_1\ninst✝ : NormedAddCommGroup E\na : ℝ\nf g : ℂ → E\nl : Filter ℂ\nu : ℂ → ℝ\nthis :\n  ∀ {c₁ c₂ B₁ B₂ : ℝ},\n    c₁ ≤ c₂ → 0 ≤ B₂ → B₁ ≤ B₂ → ∀ (z : ℂ), ‖expR (B₁ * expR (c₁ * |u z|))‖ ≤ ‖expR (B₂ * expR (c₂ * |u z|))‖\ncf : ℝ\nhcf : cf < a\nBf : ℝ\nhOf : f =O[l] fun z => expR (Bf * expR (cf * |u z|))\ncg : ℝ\nhcg : cg < a\nBg : ℝ\nhOg : g =O[l] fun z => expR (Bg * expR (cg * |u z|))\n⊢ cg ≤ max cf cg\ncase intro.intro.intro.intro.intro.intro.refine'_5\nE : Type u_1\ninst✝ : NormedAddCommGroup E\na : ℝ\nf g : ℂ → E\nl : Filter ℂ\nu : ℂ → ℝ\nthis :\n  ∀ {c₁ c₂ B₁ B₂ : ℝ},\n    c₁ ≤ c₂ → 0 ≤ B₂ → B₁ ≤ B₂ → ∀ (z : ℂ), ‖expR (B₁ * expR (c₁ * |u z|))‖ ≤ ‖expR (B₂ * expR (c₂ * |u z|))‖\ncf : ℝ\nhcf : cf < a\nBf : ℝ\nhOf : f =O[l] fun z => expR (Bf * expR (cf * |u z|))\ncg : ℝ\nhcg : cg < a\nBg : ℝ\nhOg : g =O[l] fun z => expR (Bg * expR (cg * |u z|))\n⊢ 0 ≤ max 0 (max Bf Bg)\ncase intro.intro.intro.intro.intro.intro.refine'_6\nE : Type u_1\ninst✝ : NormedAddCommGroup E\na : ℝ\nf g : ℂ → E\nl : Filter ℂ\nu : ℂ → ℝ\nthis :\n  ∀ {c₁ c₂ B₁ B₂ : ℝ},\n    c₁ ≤ c₂ → 0 ≤ B₂ → B₁ ≤ B₂ → ∀ (z : ℂ), ‖expR (B₁ * expR (c₁ * |u z|))‖ ≤ ‖expR (B₂ * expR (c₂ * |u z|))‖\ncf : ℝ\nhcf : cf < a\nBf : ℝ\nhOf : f =O[l] fun z => expR (Bf * expR (cf * |u z|))\ncg : ℝ\nhcg : cg < a\nBg : ℝ\nhOg : g =O[l] fun z => expR (Bg * expR (cg * |u z|))\n⊢ Bg ≤ max 0 (max Bf Bg)\n[PROOFSTEP]\nexacts [le_max_left _ _, le_max_left _ _, (le_max_left _ _).trans (le_max_right _ _), le_max_right _ _, le_max_left _ _,\n  (le_max_right _ _).trans (le_max_right _ _)]\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\na : ℝ\nf g : ℂ → E\nl : Filter ℂ\nhBf : ∃ c, c < a ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ l] fun z => expR (B * ↑Complex.abs z ^ c)\nhBg : ∃ c, c < a ∧ ∃ B, g =O[comap (↑Complex.abs) atTop ⊓ l] fun z => expR (B * ↑Complex.abs z ^ c)\n⊢ ∃ c, c < a ∧ ∃ B, (f - g) =O[comap (↑Complex.abs) atTop ⊓ l] fun z => expR (B * ↑Complex.abs z ^ c)\n[PROOFSTEP]\nhave :\n  ∀ {c₁ c₂ B₁ B₂ : ℝ},\n    c₁ ≤ c₂ →\n      0 ≤ B₂ →\n        B₁ ≤ B₂ →\n          (fun z : ℂ => expR (B₁ * abs z ^ c₁)) =O[comap Complex.abs atTop ⊓ l] fun z => expR (B₂ * abs z ^ c₂) :=\n  fun hc hB₀ hB ↦\n  .of_bound 1 <|\n    by\n    have : ∀ᶠ z : ℂ in comap Complex.abs atTop ⊓ l, 1 ≤ abs z :=\n      ((eventually_ge_atTop 1).comap _).filter_mono inf_le_left\n    refine this.mono fun z hz => ?_\n    rw [one_mul, Real.norm_eq_abs, Real.norm_eq_abs, Real.abs_exp, Real.abs_exp, Real.exp_le_exp]\n    exact\n      mul_le_mul hB (Real.rpow_le_rpow_of_exponent_le hz hc) (Real.rpow_nonneg_of_nonneg (Complex.abs.nonneg _) _) hB₀\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\na : ℝ\nf g : ℂ → E\nl : Filter ℂ\nhBf : ∃ c, c < a ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ l] fun z => expR (B * ↑Complex.abs z ^ c)\nhBg : ∃ c, c < a ∧ ∃ B, g =O[comap (↑Complex.abs) atTop ⊓ l] fun z => expR (B * ↑Complex.abs z ^ c)\nc₁✝ c₂✝ B₁✝ B₂✝ : ℝ\nhc : c₁✝ ≤ c₂✝\nhB₀ : 0 ≤ B₂✝\nhB : B₁✝ ≤ B₂✝\n⊢ ∀ᶠ (x : ℂ) in comap (↑Complex.abs) atTop ⊓ l,\n    ‖expR (B₁✝ * ↑Complex.abs x ^ c₁✝)‖ ≤ 1 * ‖expR (B₂✝ * ↑Complex.abs x ^ c₂✝)‖\n[PROOFSTEP]\nhave : ∀ᶠ z : ℂ in comap Complex.abs atTop ⊓ l, 1 ≤ abs z := ((eventually_ge_atTop 1).comap _).filter_mono inf_le_left\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\na : ℝ\nf g : ℂ → E\nl : Filter ℂ\nhBf : ∃ c, c < a ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ l] fun z => expR (B * ↑Complex.abs z ^ c)\nhBg : ∃ c, c < a ∧ ∃ B, g =O[comap (↑Complex.abs) atTop ⊓ l] fun z => expR (B * ↑Complex.abs z ^ c)\nc₁✝ c₂✝ B₁✝ B₂✝ : ℝ\nhc : c₁✝ ≤ c₂✝\nhB₀ : 0 ≤ B₂✝\nhB : B₁✝ ≤ B₂✝\nthis : ∀ᶠ (z : ℂ) in comap (↑Complex.abs) atTop ⊓ l, 1 ≤ ↑Complex.abs z\n⊢ ∀ᶠ (x : ℂ) in comap (↑Complex.abs) atTop ⊓ l,\n    ‖expR (B₁✝ * ↑Complex.abs x ^ c₁✝)‖ ≤ 1 * ‖expR (B₂✝ * ↑Complex.abs x ^ c₂✝)‖\n[PROOFSTEP]\nrefine this.mono fun z hz => ?_\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\na : ℝ\nf g : ℂ → E\nl : Filter ℂ\nhBf : ∃ c, c < a ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ l] fun z => expR (B * ↑Complex.abs z ^ c)\nhBg : ∃ c, c < a ∧ ∃ B, g =O[comap (↑Complex.abs) atTop ⊓ l] fun z => expR (B * ↑Complex.abs z ^ c)\nc₁✝ c₂✝ B₁✝ B₂✝ : ℝ\nhc : c₁✝ ≤ c₂✝\nhB₀ : 0 ≤ B₂✝\nhB : B₁✝ ≤ B₂✝\nthis : ∀ᶠ (z : ℂ) in comap (↑Complex.abs) atTop ⊓ l, 1 ≤ ↑Complex.abs z\nz : ℂ\nhz : 1 ≤ ↑Complex.abs z\n⊢ ‖expR (B₁✝ * ↑Complex.abs z ^ c₁✝)‖ ≤ 1 * ‖expR (B₂✝ * ↑Complex.abs z ^ c₂✝)‖\n[PROOFSTEP]\nrw [one_mul, Real.norm_eq_abs, Real.norm_eq_abs, Real.abs_exp, Real.abs_exp, Real.exp_le_exp]\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\na : ℝ\nf g : ℂ → E\nl : Filter ℂ\nhBf : ∃ c, c < a ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ l] fun z => expR (B * ↑Complex.abs z ^ c)\nhBg : ∃ c, c < a ∧ ∃ B, g =O[comap (↑Complex.abs) atTop ⊓ l] fun z => expR (B * ↑Complex.abs z ^ c)\nc₁✝ c₂✝ B₁✝ B₂✝ : ℝ\nhc : c₁✝ ≤ c₂✝\nhB₀ : 0 ≤ B₂✝\nhB : B₁✝ ≤ B₂✝\nthis : ∀ᶠ (z : ℂ) in comap (↑Complex.abs) atTop ⊓ l, 1 ≤ ↑Complex.abs z\nz : ℂ\nhz : 1 ≤ ↑Complex.abs z\n⊢ B₁✝ * ↑Complex.abs z ^ c₁✝ ≤ B₂✝ * ↑Complex.abs z ^ c₂✝\n[PROOFSTEP]\nexact mul_le_mul hB (Real.rpow_le_rpow_of_exponent_le hz hc) (Real.rpow_nonneg_of_nonneg (Complex.abs.nonneg _) _) hB₀\n[GOAL]\nE : Type u_1\ninst✝ : NormedAddCommGroup E\na : ℝ\nf g : ℂ → E\nl : Filter ℂ\nhBf : ∃ c, c < a ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ l] fun z => expR (B * ↑Complex.abs z ^ c)\nhBg : ∃ c, c < a ∧ ∃ B, g =O[comap (↑Complex.abs) atTop ⊓ l] fun z => expR (B * ↑Complex.abs z ^ c)\nthis :\n  ∀ {c₁ c₂ B₁ B₂ : ℝ},\n    c₁ ≤ c₂ →\n      0 ≤ B₂ →\n        B₁ ≤ B₂ →\n          (fun z => expR (B₁ * ↑Complex.abs z ^ c₁)) =O[comap (↑Complex.abs) atTop ⊓ l] fun z =>\n            expR (B₂ * ↑Complex.abs z ^ c₂)\n⊢ ∃ c, c < a ∧ ∃ B, (f - g) =O[comap (↑Complex.abs) atTop ⊓ l] fun z => expR (B * ↑Complex.abs z ^ c)\n[PROOFSTEP]\nrcases hBf with ⟨cf, hcf, Bf, hOf⟩\n[GOAL]\ncase intro.intro.intro\nE : Type u_1\ninst✝ : NormedAddCommGroup E\na : ℝ\nf g : ℂ → E\nl : Filter ℂ\nhBg : ∃ c, c < a ∧ ∃ B, g =O[comap (↑Complex.abs) atTop ⊓ l] fun z => expR (B * ↑Complex.abs z ^ c)\nthis :\n  ∀ {c₁ c₂ B₁ B₂ : ℝ},\n    c₁ ≤ c₂ →\n      0 ≤ B₂ →\n        B₁ ≤ B₂ →\n          (fun z => expR (B₁ * ↑Complex.abs z ^ c₁)) =O[comap (↑Complex.abs) atTop ⊓ l] fun z =>\n            expR (B₂ * ↑Complex.abs z ^ c₂)\ncf : ℝ\nhcf : cf < a\nBf : ℝ\nhOf : f =O[comap (↑Complex.abs) atTop ⊓ l] fun z => expR (Bf * ↑Complex.abs z ^ cf)\n⊢ ∃ c, c < a ∧ ∃ B, (f - g) =O[comap (↑Complex.abs) atTop ⊓ l] fun z => expR (B * ↑Complex.abs z ^ c)\n[PROOFSTEP]\nrcases hBg with ⟨cg, hcg, Bg, hOg⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nE : Type u_1\ninst✝ : NormedAddCommGroup E\na : ℝ\nf g : ℂ → E\nl : Filter ℂ\nthis :\n  ∀ {c₁ c₂ B₁ B₂ : ℝ},\n    c₁ ≤ c₂ →\n      0 ≤ B₂ →\n        B₁ ≤ B₂ →\n          (fun z => expR (B₁ * ↑Complex.abs z ^ c₁)) =O[comap (↑Complex.abs) atTop ⊓ l] fun z =>\n            expR (B₂ * ↑Complex.abs z ^ c₂)\ncf : ℝ\nhcf : cf < a\nBf : ℝ\nhOf : f =O[comap (↑Complex.abs) atTop ⊓ l] fun z => expR (Bf * ↑Complex.abs z ^ cf)\ncg : ℝ\nhcg : cg < a\nBg : ℝ\nhOg : g =O[comap (↑Complex.abs) atTop ⊓ l] fun z => expR (Bg * ↑Complex.abs z ^ cg)\n⊢ ∃ c, c < a ∧ ∃ B, (f - g) =O[comap (↑Complex.abs) atTop ⊓ l] fun z => expR (B * ↑Complex.abs z ^ c)\n[PROOFSTEP]\nrefine' ⟨max cf cg, max_lt hcf hcg, max 0 (max Bf Bg), _⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nE : Type u_1\ninst✝ : NormedAddCommGroup E\na : ℝ\nf g : ℂ → E\nl : Filter ℂ\nthis :\n  ∀ {c₁ c₂ B₁ B₂ : ℝ},\n    c₁ ≤ c₂ →\n      0 ≤ B₂ →\n        B₁ ≤ B₂ →\n          (fun z => expR (B₁ * ↑Complex.abs z ^ c₁)) =O[comap (↑Complex.abs) atTop ⊓ l] fun z =>\n            expR (B₂ * ↑Complex.abs z ^ c₂)\ncf : ℝ\nhcf : cf < a\nBf : ℝ\nhOf : f =O[comap (↑Complex.abs) atTop ⊓ l] fun z => expR (Bf * ↑Complex.abs z ^ cf)\ncg : ℝ\nhcg : cg < a\nBg : ℝ\nhOg : g =O[comap (↑Complex.abs) atTop ⊓ l] fun z => expR (Bg * ↑Complex.abs z ^ cg)\n⊢ (f - g) =O[comap (↑Complex.abs) atTop ⊓ l] fun z => expR (max 0 (max Bf Bg) * ↑Complex.abs z ^ max cf cg)\n[PROOFSTEP]\nrefine' (hOf.trans <| this _ _ _).sub (hOg.trans <| this _ _ _)\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.refine'_1\nE : Type u_1\ninst✝ : NormedAddCommGroup E\na : ℝ\nf g : ℂ → E\nl : Filter ℂ\nthis :\n  ∀ {c₁ c₂ B₁ B₂ : ℝ},\n    c₁ ≤ c₂ →\n      0 ≤ B₂ →\n        B₁ ≤ B₂ →\n          (fun z => expR (B₁ * ↑Complex.abs z ^ c₁)) =O[comap (↑Complex.abs) atTop ⊓ l] fun z =>\n            expR (B₂ * ↑Complex.abs z ^ c₂)\ncf : ℝ\nhcf : cf < a\nBf : ℝ\nhOf : f =O[comap (↑Complex.abs) atTop ⊓ l] fun z => expR (Bf * ↑Complex.abs z ^ cf)\ncg : ℝ\nhcg : cg < a\nBg : ℝ\nhOg : g =O[comap (↑Complex.abs) atTop ⊓ l] fun z => expR (Bg * ↑Complex.abs z ^ cg)\n⊢ cf ≤ max cf cg\ncase intro.intro.intro.intro.intro.intro.refine'_2\nE : Type u_1\ninst✝ : NormedAddCommGroup E\na : ℝ\nf g : ℂ → E\nl : Filter ℂ\nthis :\n  ∀ {c₁ c₂ B₁ B₂ : ℝ},\n    c₁ ≤ c₂ →\n      0 ≤ B₂ →\n        B₁ ≤ B₂ →\n          (fun z => expR (B₁ * ↑Complex.abs z ^ c₁)) =O[comap (↑Complex.abs) atTop ⊓ l] fun z =>\n            expR (B₂ * ↑Complex.abs z ^ c₂)\ncf : ℝ\nhcf : cf < a\nBf : ℝ\nhOf : f =O[comap (↑Complex.abs) atTop ⊓ l] fun z => expR (Bf * ↑Complex.abs z ^ cf)\ncg : ℝ\nhcg : cg < a\nBg : ℝ\nhOg : g =O[comap (↑Complex.abs) atTop ⊓ l] fun z => expR (Bg * ↑Complex.abs z ^ cg)\n⊢ 0 ≤ max 0 (max Bf Bg)\ncase intro.intro.intro.intro.intro.intro.refine'_3\nE : Type u_1\ninst✝ : NormedAddCommGroup E\na : ℝ\nf g : ℂ → E\nl : Filter ℂ\nthis :\n  ∀ {c₁ c₂ B₁ B₂ : ℝ},\n    c₁ ≤ c₂ →\n      0 ≤ B₂ →\n        B₁ ≤ B₂ →\n          (fun z => expR (B₁ * ↑Complex.abs z ^ c₁)) =O[comap (↑Complex.abs) atTop ⊓ l] fun z =>\n            expR (B₂ * ↑Complex.abs z ^ c₂)\ncf : ℝ\nhcf : cf < a\nBf : ℝ\nhOf : f =O[comap (↑Complex.abs) atTop ⊓ l] fun z => expR (Bf * ↑Complex.abs z ^ cf)\ncg : ℝ\nhcg : cg < a\nBg : ℝ\nhOg : g =O[comap (↑Complex.abs) atTop ⊓ l] fun z => expR (Bg * ↑Complex.abs z ^ cg)\n⊢ Bf ≤ max 0 (max Bf Bg)\ncase intro.intro.intro.intro.intro.intro.refine'_4\nE : Type u_1\ninst✝ : NormedAddCommGroup E\na : ℝ\nf g : ℂ → E\nl : Filter ℂ\nthis :\n  ∀ {c₁ c₂ B₁ B₂ : ℝ},\n    c₁ ≤ c₂ →\n      0 ≤ B₂ →\n        B₁ ≤ B₂ →\n          (fun z => expR (B₁ * ↑Complex.abs z ^ c₁)) =O[comap (↑Complex.abs) atTop ⊓ l] fun z =>\n            expR (B₂ * ↑Complex.abs z ^ c₂)\ncf : ℝ\nhcf : cf < a\nBf : ℝ\nhOf : f =O[comap (↑Complex.abs) atTop ⊓ l] fun z => expR (Bf * ↑Complex.abs z ^ cf)\ncg : ℝ\nhcg : cg < a\nBg : ℝ\nhOg : g =O[comap (↑Complex.abs) atTop ⊓ l] fun z => expR (Bg * ↑Complex.abs z ^ cg)\n⊢ cg ≤ max cf cg\ncase intro.intro.intro.intro.intro.intro.refine'_5\nE : Type u_1\ninst✝ : NormedAddCommGroup E\na : ℝ\nf g : ℂ → E\nl : Filter ℂ\nthis :\n  ∀ {c₁ c₂ B₁ B₂ : ℝ},\n    c₁ ≤ c₂ →\n      0 ≤ B₂ →\n        B₁ ≤ B₂ →\n          (fun z => expR (B₁ * ↑Complex.abs z ^ c₁)) =O[comap (↑Complex.abs) atTop ⊓ l] fun z =>\n            expR (B₂ * ↑Complex.abs z ^ c₂)\ncf : ℝ\nhcf : cf < a\nBf : ℝ\nhOf : f =O[comap (↑Complex.abs) atTop ⊓ l] fun z => expR (Bf * ↑Complex.abs z ^ cf)\ncg : ℝ\nhcg : cg < a\nBg : ℝ\nhOg : g =O[comap (↑Complex.abs) atTop ⊓ l] fun z => expR (Bg * ↑Complex.abs z ^ cg)\n⊢ 0 ≤ max 0 (max Bf Bg)\ncase intro.intro.intro.intro.intro.intro.refine'_6\nE : Type u_1\ninst✝ : NormedAddCommGroup E\na : ℝ\nf g : ℂ → E\nl : Filter ℂ\nthis :\n  ∀ {c₁ c₂ B₁ B₂ : ℝ},\n    c₁ ≤ c₂ →\n      0 ≤ B₂ →\n        B₁ ≤ B₂ →\n          (fun z => expR (B₁ * ↑Complex.abs z ^ c₁)) =O[comap (↑Complex.abs) atTop ⊓ l] fun z =>\n            expR (B₂ * ↑Complex.abs z ^ c₂)\ncf : ℝ\nhcf : cf < a\nBf : ℝ\nhOf : f =O[comap (↑Complex.abs) atTop ⊓ l] fun z => expR (Bf * ↑Complex.abs z ^ cf)\ncg : ℝ\nhcg : cg < a\nBg : ℝ\nhOg : g =O[comap (↑Complex.abs) atTop ⊓ l] fun z => expR (Bg * ↑Complex.abs z ^ cg)\n⊢ Bg ≤ max 0 (max Bf Bg)\n[PROOFSTEP]\nexacts [le_max_left _ _, le_max_left _ _, (le_max_left _ _).trans (le_max_right _ _), le_max_right _ _, le_max_left _ _,\n  (le_max_right _ _).trans (le_max_right _ _)]\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nz : ℂ\nhfd : DiffContOnCl ℂ f (im ⁻¹' Ioo a b)\nhB :\n  ∃ c,\n    c < π / (b - a) ∧ ∃ B, f =O[comap (Abs.abs ∘ re) atTop ⊓ 𝓟 (im ⁻¹' Ioo a b)] fun z => expR (B * expR (c * |z.re|))\nhle_a : ∀ (z : ℂ), z.im = a → ‖f z‖ ≤ C\nhle_b : ∀ (z : ℂ), z.im = b → ‖f z‖ ≤ C\nhza : a ≤ z.im\nhzb : z.im ≤ b\n⊢ ‖f z‖ ≤ C\n[PROOFSTEP]\nrw [le_iff_eq_or_lt] at hza hzb \n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nz : ℂ\nhfd : DiffContOnCl ℂ f (im ⁻¹' Ioo a b)\nhB :\n  ∃ c,\n    c < π / (b - a) ∧ ∃ B, f =O[comap (Abs.abs ∘ re) atTop ⊓ 𝓟 (im ⁻¹' Ioo a b)] fun z => expR (B * expR (c * |z.re|))\nhle_a : ∀ (z : ℂ), z.im = a → ‖f z‖ ≤ C\nhle_b : ∀ (z : ℂ), z.im = b → ‖f z‖ ≤ C\nhza : a = z.im ∨ a < z.im\nhzb : z.im = b ∨ z.im < b\n⊢ ‖f z‖ ≤ C\n[PROOFSTEP]\ncases' hza with hza hza\n[GOAL]\ncase inl\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nz : ℂ\nhfd : DiffContOnCl ℂ f (im ⁻¹' Ioo a b)\nhB :\n  ∃ c,\n    c < π / (b - a) ∧ ∃ B, f =O[comap (Abs.abs ∘ re) atTop ⊓ 𝓟 (im ⁻¹' Ioo a b)] fun z => expR (B * expR (c * |z.re|))\nhle_a : ∀ (z : ℂ), z.im = a → ‖f z‖ ≤ C\nhle_b : ∀ (z : ℂ), z.im = b → ‖f z‖ ≤ C\nhzb : z.im = b ∨ z.im < b\nhza : a = z.im\n⊢ ‖f z‖ ≤ C\n[PROOFSTEP]\nexact hle_a _ hza.symm\n[GOAL]\ncase inr\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nz : ℂ\nhfd : DiffContOnCl ℂ f (im ⁻¹' Ioo a b)\nhB :\n  ∃ c,\n    c < π / (b - a) ∧ ∃ B, f =O[comap (Abs.abs ∘ re) atTop ⊓ 𝓟 (im ⁻¹' Ioo a b)] fun z => expR (B * expR (c * |z.re|))\nhle_a : ∀ (z : ℂ), z.im = a → ‖f z‖ ≤ C\nhle_b : ∀ (z : ℂ), z.im = b → ‖f z‖ ≤ C\nhzb : z.im = b ∨ z.im < b\nhza : a < z.im\n⊢ ‖f z‖ ≤ C\n[PROOFSTEP]\ncases' hzb with hzb hzb\n[GOAL]\ncase inr.inl\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nz : ℂ\nhfd : DiffContOnCl ℂ f (im ⁻¹' Ioo a b)\nhB :\n  ∃ c,\n    c < π / (b - a) ∧ ∃ B, f =O[comap (Abs.abs ∘ re) atTop ⊓ 𝓟 (im ⁻¹' Ioo a b)] fun z => expR (B * expR (c * |z.re|))\nhle_a : ∀ (z : ℂ), z.im = a → ‖f z‖ ≤ C\nhle_b : ∀ (z : ℂ), z.im = b → ‖f z‖ ≤ C\nhza : a < z.im\nhzb : z.im = b\n⊢ ‖f z‖ ≤ C\n[PROOFSTEP]\nexact hle_b _ hzb\n[GOAL]\ncase inr.inr\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nz : ℂ\nhfd : DiffContOnCl ℂ f (im ⁻¹' Ioo a b)\nhB :\n  ∃ c,\n    c < π / (b - a) ∧ ∃ B, f =O[comap (Abs.abs ∘ re) atTop ⊓ 𝓟 (im ⁻¹' Ioo a b)] fun z => expR (B * expR (c * |z.re|))\nhle_a : ∀ (z : ℂ), z.im = a → ‖f z‖ ≤ C\nhle_b : ∀ (z : ℂ), z.im = b → ‖f z‖ ≤ C\nhza : a < z.im\nhzb : z.im < b\n⊢ ‖f z‖ ≤ C\n[PROOFSTEP]\nwlog hC₀ : 0 < C generalizing C\n[GOAL]\ncase inr.inr.inr\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nz : ℂ\nhfd : DiffContOnCl ℂ f (im ⁻¹' Ioo a b)\nhB :\n  ∃ c,\n    c < π / (b - a) ∧ ∃ B, f =O[comap (Abs.abs ∘ re) atTop ⊓ 𝓟 (im ⁻¹' Ioo a b)] fun z => expR (B * expR (c * |z.re|))\nhle_a : ∀ (z : ℂ), z.im = a → ‖f z‖ ≤ C\nhle_b : ∀ (z : ℂ), z.im = b → ‖f z‖ ≤ C\nhza : a < z.im\nhzb : z.im < b\nthis : ∀ {C : ℝ}, (∀ (z : ℂ), z.im = a → ‖f z‖ ≤ C) → (∀ (z : ℂ), z.im = b → ‖f z‖ ≤ C) → 0 < C → ‖f z‖ ≤ C\nhC₀ : ¬0 < C\n⊢ ‖f z‖ ≤ C\n[PROOFSTEP]\nrefine' le_of_forall_le_of_dense fun C' hC' => this (fun w hw => _) (fun w hw => _) _\n[GOAL]\ncase inr.inr.inr.refine'_1\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nz : ℂ\nhfd : DiffContOnCl ℂ f (im ⁻¹' Ioo a b)\nhB :\n  ∃ c,\n    c < π / (b - a) ∧ ∃ B, f =O[comap (Abs.abs ∘ re) atTop ⊓ 𝓟 (im ⁻¹' Ioo a b)] fun z => expR (B * expR (c * |z.re|))\nhle_a : ∀ (z : ℂ), z.im = a → ‖f z‖ ≤ C\nhle_b : ∀ (z : ℂ), z.im = b → ‖f z‖ ≤ C\nhza : a < z.im\nhzb : z.im < b\nthis : ∀ {C : ℝ}, (∀ (z : ℂ), z.im = a → ‖f z‖ ≤ C) → (∀ (z : ℂ), z.im = b → ‖f z‖ ≤ C) → 0 < C → ‖f z‖ ≤ C\nhC₀ : ¬0 < C\nC' : ℝ\nhC' : C < C'\nw : ℂ\nhw : w.im = a\n⊢ ‖f w‖ ≤ C'\n[PROOFSTEP]\nexact (hle_a _ hw).trans hC'.le\n[GOAL]\ncase inr.inr.inr.refine'_2\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nz : ℂ\nhfd : DiffContOnCl ℂ f (im ⁻¹' Ioo a b)\nhB :\n  ∃ c,\n    c < π / (b - a) ∧ ∃ B, f =O[comap (Abs.abs ∘ re) atTop ⊓ 𝓟 (im ⁻¹' Ioo a b)] fun z => expR (B * expR (c * |z.re|))\nhle_a : ∀ (z : ℂ), z.im = a → ‖f z‖ ≤ C\nhle_b : ∀ (z : ℂ), z.im = b → ‖f z‖ ≤ C\nhza : a < z.im\nhzb : z.im < b\nthis : ∀ {C : ℝ}, (∀ (z : ℂ), z.im = a → ‖f z‖ ≤ C) → (∀ (z : ℂ), z.im = b → ‖f z‖ ≤ C) → 0 < C → ‖f z‖ ≤ C\nhC₀ : ¬0 < C\nC' : ℝ\nhC' : C < C'\nw : ℂ\nhw : w.im = b\n⊢ ‖f w‖ ≤ C'\n[PROOFSTEP]\nexact (hle_b _ hw).trans hC'.le\n[GOAL]\ncase inr.inr.inr.refine'_3\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nz : ℂ\nhfd : DiffContOnCl ℂ f (im ⁻¹' Ioo a b)\nhB :\n  ∃ c,\n    c < π / (b - a) ∧ ∃ B, f =O[comap (Abs.abs ∘ re) atTop ⊓ 𝓟 (im ⁻¹' Ioo a b)] fun z => expR (B * expR (c * |z.re|))\nhle_a : ∀ (z : ℂ), z.im = a → ‖f z‖ ≤ C\nhle_b : ∀ (z : ℂ), z.im = b → ‖f z‖ ≤ C\nhza : a < z.im\nhzb : z.im < b\nthis : ∀ {C : ℝ}, (∀ (z : ℂ), z.im = a → ‖f z‖ ≤ C) → (∀ (z : ℂ), z.im = b → ‖f z‖ ≤ C) → 0 < C → ‖f z‖ ≤ C\nhC₀ : ¬0 < C\nC' : ℝ\nhC' : C < C'\n⊢ 0 < C'\n[PROOFSTEP]\nrefine' ((norm_nonneg (f (a * I))).trans (hle_a _ _)).trans_lt hC'\n[GOAL]\ncase inr.inr.inr.refine'_3\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nz : ℂ\nhfd : DiffContOnCl ℂ f (im ⁻¹' Ioo a b)\nhB :\n  ∃ c,\n    c < π / (b - a) ∧ ∃ B, f =O[comap (Abs.abs ∘ re) atTop ⊓ 𝓟 (im ⁻¹' Ioo a b)] fun z => expR (B * expR (c * |z.re|))\nhle_a : ∀ (z : ℂ), z.im = a → ‖f z‖ ≤ C\nhle_b : ∀ (z : ℂ), z.im = b → ‖f z‖ ≤ C\nhza : a < z.im\nhzb : z.im < b\nthis : ∀ {C : ℝ}, (∀ (z : ℂ), z.im = a → ‖f z‖ ≤ C) → (∀ (z : ℂ), z.im = b → ‖f z‖ ≤ C) → 0 < C → ‖f z‖ ≤ C\nhC₀ : ¬0 < C\nC' : ℝ\nhC' : C < C'\n⊢ (↑a * I).im = a\n[PROOFSTEP]\nrw [mul_I_im, ofReal_re]\n  -- After a change of variables, we deal with the strip `a - b < im z < a + b` instead\n    -- of `a < im z < b`\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C✝ : ℝ\nf g : ℂ → E\nz : ℂ\nhfd : DiffContOnCl ℂ f (im ⁻¹' Ioo a b)\nhB :\n  ∃ c,\n    c < π / (b - a) ∧ ∃ B, f =O[comap (Abs.abs ∘ re) atTop ⊓ 𝓟 (im ⁻¹' Ioo a b)] fun z => expR (B * expR (c * |z.re|))\nhza : a < z.im\nhzb : z.im < b\nC : ℝ\nhle_a : ∀ (z : ℂ), z.im = a → ‖f z‖ ≤ C\nhle_b : ∀ (z : ℂ), z.im = b → ‖f z‖ ≤ C\nhC₀ : 0 < C\n⊢ ‖f z‖ ≤ C\n[PROOFSTEP]\nobtain ⟨a, b, rfl, rfl⟩ : ∃ a' b', a = a' - b' ∧ b = a' + b' := ⟨(a + b) / 2, (b - a) / 2, by ring, by ring⟩\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C✝ : ℝ\nf g : ℂ → E\nz : ℂ\nhfd : DiffContOnCl ℂ f (im ⁻¹' Ioo a b)\nhB :\n  ∃ c,\n    c < π / (b - a) ∧ ∃ B, f =O[comap (Abs.abs ∘ re) atTop ⊓ 𝓟 (im ⁻¹' Ioo a b)] fun z => expR (B * expR (c * |z.re|))\nhza : a < z.im\nhzb : z.im < b\nC : ℝ\nhle_a : ∀ (z : ℂ), z.im = a → ‖f z‖ ≤ C\nhle_b : ∀ (z : ℂ), z.im = b → ‖f z‖ ≤ C\nhC₀ : 0 < C\n⊢ a = (a + b) / 2 - (b - a) / 2\n[PROOFSTEP]\nring\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C✝ : ℝ\nf g : ℂ → E\nz : ℂ\nhfd : DiffContOnCl ℂ f (im ⁻¹' Ioo a b)\nhB :\n  ∃ c,\n    c < π / (b - a) ∧ ∃ B, f =O[comap (Abs.abs ∘ re) atTop ⊓ 𝓟 (im ⁻¹' Ioo a b)] fun z => expR (B * expR (c * |z.re|))\nhza : a < z.im\nhzb : z.im < b\nC : ℝ\nhle_a : ∀ (z : ℂ), z.im = a → ‖f z‖ ≤ C\nhle_b : ∀ (z : ℂ), z.im = b → ‖f z‖ ≤ C\nhC₀ : 0 < C\n⊢ b = (a + b) / 2 + (b - a) / 2\n[PROOFSTEP]\nring\n[GOAL]\ncase intro.intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nC✝ : ℝ\nf g : ℂ → E\nz : ℂ\nC : ℝ\nhC₀ : 0 < C\na b : ℝ\nhza : a - b < z.im\nhle_a : ∀ (z : ℂ), z.im = a - b → ‖f z‖ ≤ C\nhzb : z.im < a + b\nhle_b : ∀ (z : ℂ), z.im = a + b → ‖f z‖ ≤ C\nhfd : DiffContOnCl ℂ f (im ⁻¹' Ioo (a - b) (a + b))\nhB :\n  ∃ c,\n    c < π / (a + b - (a - b)) ∧\n      ∃ B, f =O[comap (Abs.abs ∘ re) atTop ⊓ 𝓟 (im ⁻¹' Ioo (a - b) (a + b))] fun z => expR (B * expR (c * |z.re|))\n⊢ ‖f z‖ ≤ C\n[PROOFSTEP]\nhave hab : a - b < a + b := hza.trans hzb\n[GOAL]\ncase intro.intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nC✝ : ℝ\nf g : ℂ → E\nz : ℂ\nC : ℝ\nhC₀ : 0 < C\na b : ℝ\nhza : a - b < z.im\nhle_a : ∀ (z : ℂ), z.im = a - b → ‖f z‖ ≤ C\nhzb : z.im < a + b\nhle_b : ∀ (z : ℂ), z.im = a + b → ‖f z‖ ≤ C\nhfd : DiffContOnCl ℂ f (im ⁻¹' Ioo (a - b) (a + b))\nhB :\n  ∃ c,\n    c < π / (a + b - (a - b)) ∧\n      ∃ B, f =O[comap (Abs.abs ∘ re) atTop ⊓ 𝓟 (im ⁻¹' Ioo (a - b) (a + b))] fun z => expR (B * expR (c * |z.re|))\nhab : a - b < a + b\n⊢ ‖f z‖ ≤ C\n[PROOFSTEP]\nhave hb : 0 < b := by simpa only [sub_eq_add_neg, add_lt_add_iff_left, neg_lt_self_iff] using hab\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nC✝ : ℝ\nf g : ℂ → E\nz : ℂ\nC : ℝ\nhC₀ : 0 < C\na b : ℝ\nhza : a - b < z.im\nhle_a : ∀ (z : ℂ), z.im = a - b → ‖f z‖ ≤ C\nhzb : z.im < a + b\nhle_b : ∀ (z : ℂ), z.im = a + b → ‖f z‖ ≤ C\nhfd : DiffContOnCl ℂ f (im ⁻¹' Ioo (a - b) (a + b))\nhB :\n  ∃ c,\n    c < π / (a + b - (a - b)) ∧\n      ∃ B, f =O[comap (Abs.abs ∘ re) atTop ⊓ 𝓟 (im ⁻¹' Ioo (a - b) (a + b))] fun z => expR (B * expR (c * |z.re|))\nhab : a - b < a + b\n⊢ 0 < b\n[PROOFSTEP]\nsimpa only [sub_eq_add_neg, add_lt_add_iff_left, neg_lt_self_iff] using hab\n[GOAL]\ncase intro.intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nC✝ : ℝ\nf g : ℂ → E\nz : ℂ\nC : ℝ\nhC₀ : 0 < C\na b : ℝ\nhza : a - b < z.im\nhle_a : ∀ (z : ℂ), z.im = a - b → ‖f z‖ ≤ C\nhzb : z.im < a + b\nhle_b : ∀ (z : ℂ), z.im = a + b → ‖f z‖ ≤ C\nhfd : DiffContOnCl ℂ f (im ⁻¹' Ioo (a - b) (a + b))\nhB :\n  ∃ c,\n    c < π / (a + b - (a - b)) ∧\n      ∃ B, f =O[comap (Abs.abs ∘ re) atTop ⊓ 𝓟 (im ⁻¹' Ioo (a - b) (a + b))] fun z => expR (B * expR (c * |z.re|))\nhab : a - b < a + b\nhb : 0 < b\n⊢ ‖f z‖ ≤ C\n[PROOFSTEP]\nrw [add_sub_sub_cancel, ← two_mul, div_mul_eq_div_div] at hB \n[GOAL]\ncase intro.intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nC✝ : ℝ\nf g : ℂ → E\nz : ℂ\nC : ℝ\nhC₀ : 0 < C\na b : ℝ\nhza : a - b < z.im\nhle_a : ∀ (z : ℂ), z.im = a - b → ‖f z‖ ≤ C\nhzb : z.im < a + b\nhle_b : ∀ (z : ℂ), z.im = a + b → ‖f z‖ ≤ C\nhfd : DiffContOnCl ℂ f (im ⁻¹' Ioo (a - b) (a + b))\nhB :\n  ∃ c,\n    c < π / 2 / b ∧\n      ∃ B, f =O[comap (Abs.abs ∘ re) atTop ⊓ 𝓟 (im ⁻¹' Ioo (a - b) (a + b))] fun z => expR (B * expR (c * |z.re|))\nhab : a - b < a + b\nhb : 0 < b\n⊢ ‖f z‖ ≤ C\n[PROOFSTEP]\nhave hπb : 0 < π / 2 / b := div_pos Real.pi_div_two_pos hb\n[GOAL]\ncase intro.intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nC✝ : ℝ\nf g : ℂ → E\nz : ℂ\nC : ℝ\nhC₀ : 0 < C\na b : ℝ\nhza : a - b < z.im\nhle_a : ∀ (z : ℂ), z.im = a - b → ‖f z‖ ≤ C\nhzb : z.im < a + b\nhle_b : ∀ (z : ℂ), z.im = a + b → ‖f z‖ ≤ C\nhfd : DiffContOnCl ℂ f (im ⁻¹' Ioo (a - b) (a + b))\nhB :\n  ∃ c,\n    c < π / 2 / b ∧\n      ∃ B, f =O[comap (Abs.abs ∘ re) atTop ⊓ 𝓟 (im ⁻¹' Ioo (a - b) (a + b))] fun z => expR (B * expR (c * |z.re|))\nhab : a - b < a + b\nhb : 0 < b\nhπb : 0 < π / 2 / b\n⊢ ‖f z‖ ≤ C\n[PROOFSTEP]\nrcases hB with ⟨c, hc, B, hO⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nC✝ : ℝ\nf g : ℂ → E\nz : ℂ\nC : ℝ\nhC₀ : 0 < C\na b : ℝ\nhza : a - b < z.im\nhle_a : ∀ (z : ℂ), z.im = a - b → ‖f z‖ ≤ C\nhzb : z.im < a + b\nhle_b : ∀ (z : ℂ), z.im = a + b → ‖f z‖ ≤ C\nhfd : DiffContOnCl ℂ f (im ⁻¹' Ioo (a - b) (a + b))\nhab : a - b < a + b\nhb : 0 < b\nhπb : 0 < π / 2 / b\nc : ℝ\nhc : c < π / 2 / b\nB : ℝ\nhO : f =O[comap (Abs.abs ∘ re) atTop ⊓ 𝓟 (im ⁻¹' Ioo (a - b) (a + b))] fun z => expR (B * expR (c * |z.re|))\n⊢ ‖f z‖ ≤ C\n[PROOFSTEP]\nobtain ⟨d, ⟨hcd, hd₀⟩, hd⟩ : ∃ d, (c < d ∧ 0 < d) ∧ d < π / 2 / b := by\n  simpa only [max_lt_iff] using exists_between (max_lt hc hπb)\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nC✝ : ℝ\nf g : ℂ → E\nz : ℂ\nC : ℝ\nhC₀ : 0 < C\na b : ℝ\nhza : a - b < z.im\nhle_a : ∀ (z : ℂ), z.im = a - b → ‖f z‖ ≤ C\nhzb : z.im < a + b\nhle_b : ∀ (z : ℂ), z.im = a + b → ‖f z‖ ≤ C\nhfd : DiffContOnCl ℂ f (im ⁻¹' Ioo (a - b) (a + b))\nhab : a - b < a + b\nhb : 0 < b\nhπb : 0 < π / 2 / b\nc : ℝ\nhc : c < π / 2 / b\nB : ℝ\nhO : f =O[comap (Abs.abs ∘ re) atTop ⊓ 𝓟 (im ⁻¹' Ioo (a - b) (a + b))] fun z => expR (B * expR (c * |z.re|))\n⊢ ∃ d, (c < d ∧ 0 < d) ∧ d < π / 2 / b\n[PROOFSTEP]\nsimpa only [max_lt_iff] using exists_between (max_lt hc hπb)\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nC✝ : ℝ\nf g : ℂ → E\nz : ℂ\nC : ℝ\nhC₀ : 0 < C\na b : ℝ\nhza : a - b < z.im\nhle_a : ∀ (z : ℂ), z.im = a - b → ‖f z‖ ≤ C\nhzb : z.im < a + b\nhle_b : ∀ (z : ℂ), z.im = a + b → ‖f z‖ ≤ C\nhfd : DiffContOnCl ℂ f (im ⁻¹' Ioo (a - b) (a + b))\nhab : a - b < a + b\nhb : 0 < b\nhπb : 0 < π / 2 / b\nc : ℝ\nhc : c < π / 2 / b\nB : ℝ\nhO : f =O[comap (Abs.abs ∘ re) atTop ⊓ 𝓟 (im ⁻¹' Ioo (a - b) (a + b))] fun z => expR (B * expR (c * |z.re|))\nd : ℝ\nhd : d < π / 2 / b\nhcd : c < d\nhd₀ : 0 < d\n⊢ ‖f z‖ ≤ C\n[PROOFSTEP]\nhave hb' : d * b < π / 2 := (lt_div_iff hb).1 hd\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nC✝ : ℝ\nf g : ℂ → E\nz : ℂ\nC : ℝ\nhC₀ : 0 < C\na b : ℝ\nhza : a - b < z.im\nhle_a : ∀ (z : ℂ), z.im = a - b → ‖f z‖ ≤ C\nhzb : z.im < a + b\nhle_b : ∀ (z : ℂ), z.im = a + b → ‖f z‖ ≤ C\nhfd : DiffContOnCl ℂ f (im ⁻¹' Ioo (a - b) (a + b))\nhab : a - b < a + b\nhb : 0 < b\nhπb : 0 < π / 2 / b\nc : ℝ\nhc : c < π / 2 / b\nB : ℝ\nhO : f =O[comap (Abs.abs ∘ re) atTop ⊓ 𝓟 (im ⁻¹' Ioo (a - b) (a + b))] fun z => expR (B * expR (c * |z.re|))\nd : ℝ\nhd : d < π / 2 / b\nhcd : c < d\nhd₀ : 0 < d\nhb' : d * b < π / 2\n⊢ ‖f z‖ ≤ C\n[PROOFSTEP]\nset aff := (fun w => d * (w - a * I) : ℂ → ℂ)\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nC✝ : ℝ\nf g : ℂ → E\nz : ℂ\nC : ℝ\nhC₀ : 0 < C\na b : ℝ\nhza : a - b < z.im\nhle_a : ∀ (z : ℂ), z.im = a - b → ‖f z‖ ≤ C\nhzb : z.im < a + b\nhle_b : ∀ (z : ℂ), z.im = a + b → ‖f z‖ ≤ C\nhfd : DiffContOnCl ℂ f (im ⁻¹' Ioo (a - b) (a + b))\nhab : a - b < a + b\nhb : 0 < b\nhπb : 0 < π / 2 / b\nc : ℝ\nhc : c < π / 2 / b\nB : ℝ\nhO : f =O[comap (Abs.abs ∘ re) atTop ⊓ 𝓟 (im ⁻¹' Ioo (a - b) (a + b))] fun z => expR (B * expR (c * |z.re|))\nd : ℝ\nhd : d < π / 2 / b\nhcd : c < d\nhd₀ : 0 < d\nhb' : d * b < π / 2\naff : ℂ → ℂ := fun w => ↑d * (w - ↑a * I)\n⊢ ‖f z‖ ≤ C\n[PROOFSTEP]\nset g := fun (ε : ℝ) (w : ℂ) =>\n  exp\n    (ε * (exp (aff w) + exp (-aff w)))\n      /- Since `g ε z → 1` as `ε → 0⁻`, it suffices to prove that `‖g ε z • f z‖ ≤ C`\n          for all negative `ε`. -/\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nC✝ : ℝ\nf g✝ : ℂ → E\nz : ℂ\nC : ℝ\nhC₀ : 0 < C\na b : ℝ\nhza : a - b < z.im\nhle_a : ∀ (z : ℂ), z.im = a - b → ‖f z‖ ≤ C\nhzb : z.im < a + b\nhle_b : ∀ (z : ℂ), z.im = a + b → ‖f z‖ ≤ C\nhfd : DiffContOnCl ℂ f (im ⁻¹' Ioo (a - b) (a + b))\nhab : a - b < a + b\nhb : 0 < b\nhπb : 0 < π / 2 / b\nc : ℝ\nhc : c < π / 2 / b\nB : ℝ\nhO : f =O[comap (Abs.abs ∘ re) atTop ⊓ 𝓟 (im ⁻¹' Ioo (a - b) (a + b))] fun z => expR (B * expR (c * |z.re|))\nd : ℝ\nhd : d < π / 2 / b\nhcd : c < d\nhd₀ : 0 < d\nhb' : d * b < π / 2\naff : ℂ → ℂ := fun w => ↑d * (w - ↑a * I)\ng : ℝ → ℂ → ℂ := fun ε w => exp (↑ε * (exp (aff w) + exp (-aff w)))\n⊢ ‖f z‖ ≤ C\n[PROOFSTEP]\nsuffices : ∀ᶠ ε : ℝ in 𝓝[<] (0 : ℝ), ‖g ε z • f z‖ ≤ C\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nC✝ : ℝ\nf g✝ : ℂ → E\nz : ℂ\nC : ℝ\nhC₀ : 0 < C\na b : ℝ\nhza : a - b < z.im\nhle_a : ∀ (z : ℂ), z.im = a - b → ‖f z‖ ≤ C\nhzb : z.im < a + b\nhle_b : ∀ (z : ℂ), z.im = a + b → ‖f z‖ ≤ C\nhfd : DiffContOnCl ℂ f (im ⁻¹' Ioo (a - b) (a + b))\nhab : a - b < a + b\nhb : 0 < b\nhπb : 0 < π / 2 / b\nc : ℝ\nhc : c < π / 2 / b\nB : ℝ\nhO : f =O[comap (Abs.abs ∘ re) atTop ⊓ 𝓟 (im ⁻¹' Ioo (a - b) (a + b))] fun z => expR (B * expR (c * |z.re|))\nd : ℝ\nhd : d < π / 2 / b\nhcd : c < d\nhd₀ : 0 < d\nhb' : d * b < π / 2\naff : ℂ → ℂ := fun w => ↑d * (w - ↑a * I)\ng : ℝ → ℂ → ℂ := fun ε w => exp (↑ε * (exp (aff w) + exp (-aff w)))\nthis : ∀ᶠ (ε : ℝ) in 𝓝[Iio 0] 0, ‖g ε z • f z‖ ≤ C\n⊢ ‖f z‖ ≤ C\n[PROOFSTEP]\nrefine' le_of_tendsto (Tendsto.mono_left _ nhdsWithin_le_nhds) this\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nC✝ : ℝ\nf g✝ : ℂ → E\nz : ℂ\nC : ℝ\nhC₀ : 0 < C\na b : ℝ\nhza : a - b < z.im\nhle_a : ∀ (z : ℂ), z.im = a - b → ‖f z‖ ≤ C\nhzb : z.im < a + b\nhle_b : ∀ (z : ℂ), z.im = a + b → ‖f z‖ ≤ C\nhfd : DiffContOnCl ℂ f (im ⁻¹' Ioo (a - b) (a + b))\nhab : a - b < a + b\nhb : 0 < b\nhπb : 0 < π / 2 / b\nc : ℝ\nhc : c < π / 2 / b\nB : ℝ\nhO : f =O[comap (Abs.abs ∘ re) atTop ⊓ 𝓟 (im ⁻¹' Ioo (a - b) (a + b))] fun z => expR (B * expR (c * |z.re|))\nd : ℝ\nhd : d < π / 2 / b\nhcd : c < d\nhd₀ : 0 < d\nhb' : d * b < π / 2\naff : ℂ → ℂ := fun w => ↑d * (w - ↑a * I)\ng : ℝ → ℂ → ℂ := fun ε w => exp (↑ε * (exp (aff w) + exp (-aff w)))\nthis : ∀ᶠ (ε : ℝ) in 𝓝[Iio 0] 0, ‖g ε z • f z‖ ≤ C\n⊢ Tendsto (fun c => ‖g c z • f z‖) (𝓝 0) (𝓝 ‖f z‖)\n[PROOFSTEP]\napply ((continuous_ofReal.mul continuous_const).cexp.smul continuous_const).norm.tendsto'\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.h\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nC✝ : ℝ\nf g✝ : ℂ → E\nz : ℂ\nC : ℝ\nhC₀ : 0 < C\na b : ℝ\nhza : a - b < z.im\nhle_a : ∀ (z : ℂ), z.im = a - b → ‖f z‖ ≤ C\nhzb : z.im < a + b\nhle_b : ∀ (z : ℂ), z.im = a + b → ‖f z‖ ≤ C\nhfd : DiffContOnCl ℂ f (im ⁻¹' Ioo (a - b) (a + b))\nhab : a - b < a + b\nhb : 0 < b\nhπb : 0 < π / 2 / b\nc : ℝ\nhc : c < π / 2 / b\nB : ℝ\nhO : f =O[comap (Abs.abs ∘ re) atTop ⊓ 𝓟 (im ⁻¹' Ioo (a - b) (a + b))] fun z => expR (B * expR (c * |z.re|))\nd : ℝ\nhd : d < π / 2 / b\nhcd : c < d\nhd₀ : 0 < d\nhb' : d * b < π / 2\naff : ℂ → ℂ := fun w => ↑d * (w - ↑a * I)\ng : ℝ → ℂ → ℂ := fun ε w => exp (↑ε * (exp (aff w) + exp (-aff w)))\nthis : ∀ᶠ (ε : ℝ) in 𝓝[Iio 0] 0, ‖g ε z • f z‖ ≤ C\n⊢ ‖exp (↑0 * (exp (aff z) + exp (-aff z))) • f z‖ = ‖f z‖\n[PROOFSTEP]\nsimp\n[GOAL]\ncase this\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nC✝ : ℝ\nf g✝ : ℂ → E\nz : ℂ\nC : ℝ\nhC₀ : 0 < C\na b : ℝ\nhza : a - b < z.im\nhle_a : ∀ (z : ℂ), z.im = a - b → ‖f z‖ ≤ C\nhzb : z.im < a + b\nhle_b : ∀ (z : ℂ), z.im = a + b → ‖f z‖ ≤ C\nhfd : DiffContOnCl ℂ f (im ⁻¹' Ioo (a - b) (a + b))\nhab : a - b < a + b\nhb : 0 < b\nhπb : 0 < π / 2 / b\nc : ℝ\nhc : c < π / 2 / b\nB : ℝ\nhO : f =O[comap (Abs.abs ∘ re) atTop ⊓ 𝓟 (im ⁻¹' Ioo (a - b) (a + b))] fun z => expR (B * expR (c * |z.re|))\nd : ℝ\nhd : d < π / 2 / b\nhcd : c < d\nhd₀ : 0 < d\nhb' : d * b < π / 2\naff : ℂ → ℂ := fun w => ↑d * (w - ↑a * I)\ng : ℝ → ℂ → ℂ := fun ε w => exp (↑ε * (exp (aff w) + exp (-aff w)))\n⊢ ∀ᶠ (ε : ℝ) in 𝓝[Iio 0] 0, ‖g ε z • f z‖ ≤ C\n[PROOFSTEP]\nfilter_upwards [self_mem_nhdsWithin] with ε ε₀\n[GOAL]\ncase h\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nC✝ : ℝ\nf g✝ : ℂ → E\nz : ℂ\nC : ℝ\nhC₀ : 0 < C\na b : ℝ\nhza : a - b < z.im\nhle_a : ∀ (z : ℂ), z.im = a - b → ‖f z‖ ≤ C\nhzb : z.im < a + b\nhle_b : ∀ (z : ℂ), z.im = a + b → ‖f z‖ ≤ C\nhfd : DiffContOnCl ℂ f (im ⁻¹' Ioo (a - b) (a + b))\nhab : a - b < a + b\nhb : 0 < b\nhπb : 0 < π / 2 / b\nc : ℝ\nhc : c < π / 2 / b\nB : ℝ\nhO : f =O[comap (Abs.abs ∘ re) atTop ⊓ 𝓟 (im ⁻¹' Ioo (a - b) (a + b))] fun z => expR (B * expR (c * |z.re|))\nd : ℝ\nhd : d < π / 2 / b\nhcd : c < d\nhd₀ : 0 < d\nhb' : d * b < π / 2\naff : ℂ → ℂ := fun w => ↑d * (w - ↑a * I)\ng : ℝ → ℂ → ℂ := fun ε w => exp (↑ε * (exp (aff w) + exp (-aff w)))\nε : ℝ\nε₀ : ε ∈ Iio 0\n⊢ ‖exp (↑ε * (exp (↑d * (z - ↑a * I)) + exp (-(↑d * (z - ↑a * I))))) • f z‖ ≤ C\n[PROOFSTEP]\nchange ε < 0 at ε₀ \n[GOAL]\ncase h\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nC✝ : ℝ\nf g✝ : ℂ → E\nz : ℂ\nC : ℝ\nhC₀ : 0 < C\na b : ℝ\nhza : a - b < z.im\nhle_a : ∀ (z : ℂ), z.im = a - b → ‖f z‖ ≤ C\nhzb : z.im < a + b\nhle_b : ∀ (z : ℂ), z.im = a + b → ‖f z‖ ≤ C\nhfd : DiffContOnCl ℂ f (im ⁻¹' Ioo (a - b) (a + b))\nhab : a - b < a + b\nhb : 0 < b\nhπb : 0 < π / 2 / b\nc : ℝ\nhc : c < π / 2 / b\nB : ℝ\nhO : f =O[comap (Abs.abs ∘ re) atTop ⊓ 𝓟 (im ⁻¹' Ioo (a - b) (a + b))] fun z => expR (B * expR (c * |z.re|))\nd : ℝ\nhd : d < π / 2 / b\nhcd : c < d\nhd₀ : 0 < d\nhb' : d * b < π / 2\naff : ℂ → ℂ := fun w => ↑d * (w - ↑a * I)\ng : ℝ → ℂ → ℂ := fun ε w => exp (↑ε * (exp (aff w) + exp (-aff w)))\nε : ℝ\nε₀ : ε < 0\n⊢ ‖exp (↑ε * (exp (↑d * (z - ↑a * I)) + exp (-(↑d * (z - ↑a * I))))) • f z‖ ≤ C\n[PROOFSTEP]\nobtain ⟨δ, δ₀, hδ⟩ : ∃ δ : ℝ, δ < 0 ∧ ∀ ⦃w⦄, im w ∈ Icc (a - b) (a + b) → abs (g ε w) ≤ expR (δ * expR (d * |re w|)) :=\n  by\n  refine'\n    ⟨ε * Real.cos (d * b),\n      mul_neg_of_neg_of_pos ε₀ (Real.cos_pos_of_mem_Ioo <| abs_lt.1 <| (abs_of_pos (mul_pos hd₀ hb)).symm ▸ hb'),\n      fun w hw => _⟩\n  replace hw : |im (aff w)| ≤ d * b\n  · rw [← Real.closedBall_eq_Icc] at hw \n    rwa [ofReal_mul_im, sub_im, mul_I_im, ofReal_re, _root_.abs_mul, abs_of_pos hd₀, mul_le_mul_left hd₀]\n  simpa only [ofReal_mul_re, _root_.abs_mul, abs_of_pos hd₀, sub_re, mul_I_re, ofReal_im, zero_mul, neg_zero,\n    sub_zero] using abs_exp_mul_exp_add_exp_neg_le_of_abs_im_le ε₀.le hw hb'.le\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nC✝ : ℝ\nf g✝ : ℂ → E\nz : ℂ\nC : ℝ\nhC₀ : 0 < C\na b : ℝ\nhza : a - b < z.im\nhle_a : ∀ (z : ℂ), z.im = a - b → ‖f z‖ ≤ C\nhzb : z.im < a + b\nhle_b : ∀ (z : ℂ), z.im = a + b → ‖f z‖ ≤ C\nhfd : DiffContOnCl ℂ f (im ⁻¹' Ioo (a - b) (a + b))\nhab : a - b < a + b\nhb : 0 < b\nhπb : 0 < π / 2 / b\nc : ℝ\nhc : c < π / 2 / b\nB : ℝ\nhO : f =O[comap (Abs.abs ∘ re) atTop ⊓ 𝓟 (im ⁻¹' Ioo (a - b) (a + b))] fun z => expR (B * expR (c * |z.re|))\nd : ℝ\nhd : d < π / 2 / b\nhcd : c < d\nhd₀ : 0 < d\nhb' : d * b < π / 2\naff : ℂ → ℂ := fun w => ↑d * (w - ↑a * I)\ng : ℝ → ℂ → ℂ := fun ε w => exp (↑ε * (exp (aff w) + exp (-aff w)))\nε : ℝ\nε₀ : ε < 0\n⊢ ∃ δ, δ < 0 ∧ ∀ ⦃w : ℂ⦄, w.im ∈ Icc (a - b) (a + b) → ↑Complex.abs (g ε w) ≤ expR (δ * expR (d * |w.re|))\n[PROOFSTEP]\nrefine'\n  ⟨ε * Real.cos (d * b),\n    mul_neg_of_neg_of_pos ε₀ (Real.cos_pos_of_mem_Ioo <| abs_lt.1 <| (abs_of_pos (mul_pos hd₀ hb)).symm ▸ hb'),\n    fun w hw => _⟩\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nC✝ : ℝ\nf g✝ : ℂ → E\nz : ℂ\nC : ℝ\nhC₀ : 0 < C\na b : ℝ\nhza : a - b < z.im\nhle_a : ∀ (z : ℂ), z.im = a - b → ‖f z‖ ≤ C\nhzb : z.im < a + b\nhle_b : ∀ (z : ℂ), z.im = a + b → ‖f z‖ ≤ C\nhfd : DiffContOnCl ℂ f (im ⁻¹' Ioo (a - b) (a + b))\nhab : a - b < a + b\nhb : 0 < b\nhπb : 0 < π / 2 / b\nc : ℝ\nhc : c < π / 2 / b\nB : ℝ\nhO : f =O[comap (Abs.abs ∘ re) atTop ⊓ 𝓟 (im ⁻¹' Ioo (a - b) (a + b))] fun z => expR (B * expR (c * |z.re|))\nd : ℝ\nhd : d < π / 2 / b\nhcd : c < d\nhd₀ : 0 < d\nhb' : d * b < π / 2\naff : ℂ → ℂ := fun w => ↑d * (w - ↑a * I)\ng : ℝ → ℂ → ℂ := fun ε w => exp (↑ε * (exp (aff w) + exp (-aff w)))\nε : ℝ\nε₀ : ε < 0\nw : ℂ\nhw : w.im ∈ Icc (a - b) (a + b)\n⊢ ↑Complex.abs (g ε w) ≤ expR (ε * Real.cos (d * b) * expR (d * |w.re|))\n[PROOFSTEP]\nreplace hw : |im (aff w)| ≤ d * b\n[GOAL]\ncase hw\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nC✝ : ℝ\nf g✝ : ℂ → E\nz : ℂ\nC : ℝ\nhC₀ : 0 < C\na b : ℝ\nhza : a - b < z.im\nhle_a : ∀ (z : ℂ), z.im = a - b → ‖f z‖ ≤ C\nhzb : z.im < a + b\nhle_b : ∀ (z : ℂ), z.im = a + b → ‖f z‖ ≤ C\nhfd : DiffContOnCl ℂ f (im ⁻¹' Ioo (a - b) (a + b))\nhab : a - b < a + b\nhb : 0 < b\nhπb : 0 < π / 2 / b\nc : ℝ\nhc : c < π / 2 / b\nB : ℝ\nhO : f =O[comap (Abs.abs ∘ re) atTop ⊓ 𝓟 (im ⁻¹' Ioo (a - b) (a + b))] fun z => expR (B * expR (c * |z.re|))\nd : ℝ\nhd : d < π / 2 / b\nhcd : c < d\nhd₀ : 0 < d\nhb' : d * b < π / 2\naff : ℂ → ℂ := fun w => ↑d * (w - ↑a * I)\ng : ℝ → ℂ → ℂ := fun ε w => exp (↑ε * (exp (aff w) + exp (-aff w)))\nε : ℝ\nε₀ : ε < 0\nw : ℂ\nhw : w.im ∈ Icc (a - b) (a + b)\n⊢ |(aff w).im| ≤ d * b\n[PROOFSTEP]\nrw [← Real.closedBall_eq_Icc] at hw \n[GOAL]\ncase hw\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nC✝ : ℝ\nf g✝ : ℂ → E\nz : ℂ\nC : ℝ\nhC₀ : 0 < C\na b : ℝ\nhza : a - b < z.im\nhle_a : ∀ (z : ℂ), z.im = a - b → ‖f z‖ ≤ C\nhzb : z.im < a + b\nhle_b : ∀ (z : ℂ), z.im = a + b → ‖f z‖ ≤ C\nhfd : DiffContOnCl ℂ f (im ⁻¹' Ioo (a - b) (a + b))\nhab : a - b < a + b\nhb : 0 < b\nhπb : 0 < π / 2 / b\nc : ℝ\nhc : c < π / 2 / b\nB : ℝ\nhO : f =O[comap (Abs.abs ∘ re) atTop ⊓ 𝓟 (im ⁻¹' Ioo (a - b) (a + b))] fun z => expR (B * expR (c * |z.re|))\nd : ℝ\nhd : d < π / 2 / b\nhcd : c < d\nhd₀ : 0 < d\nhb' : d * b < π / 2\naff : ℂ → ℂ := fun w => ↑d * (w - ↑a * I)\ng : ℝ → ℂ → ℂ := fun ε w => exp (↑ε * (exp (aff w) + exp (-aff w)))\nε : ℝ\nε₀ : ε < 0\nw : ℂ\nhw : w.im ∈ closedBall a b\n⊢ |(aff w).im| ≤ d * b\n[PROOFSTEP]\nrwa [ofReal_mul_im, sub_im, mul_I_im, ofReal_re, _root_.abs_mul, abs_of_pos hd₀, mul_le_mul_left hd₀]\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nC✝ : ℝ\nf g✝ : ℂ → E\nz : ℂ\nC : ℝ\nhC₀ : 0 < C\na b : ℝ\nhza : a - b < z.im\nhle_a : ∀ (z : ℂ), z.im = a - b → ‖f z‖ ≤ C\nhzb : z.im < a + b\nhle_b : ∀ (z : ℂ), z.im = a + b → ‖f z‖ ≤ C\nhfd : DiffContOnCl ℂ f (im ⁻¹' Ioo (a - b) (a + b))\nhab : a - b < a + b\nhb : 0 < b\nhπb : 0 < π / 2 / b\nc : ℝ\nhc : c < π / 2 / b\nB : ℝ\nhO : f =O[comap (Abs.abs ∘ re) atTop ⊓ 𝓟 (im ⁻¹' Ioo (a - b) (a + b))] fun z => expR (B * expR (c * |z.re|))\nd : ℝ\nhd : d < π / 2 / b\nhcd : c < d\nhd₀ : 0 < d\nhb' : d * b < π / 2\naff : ℂ → ℂ := fun w => ↑d * (w - ↑a * I)\ng : ℝ → ℂ → ℂ := fun ε w => exp (↑ε * (exp (aff w) + exp (-aff w)))\nε : ℝ\nε₀ : ε < 0\nw : ℂ\nhw : |(aff w).im| ≤ d * b\n⊢ ↑Complex.abs (g ε w) ≤ expR (ε * Real.cos (d * b) * expR (d * |w.re|))\n[PROOFSTEP]\nsimpa only [ofReal_mul_re, _root_.abs_mul, abs_of_pos hd₀, sub_re, mul_I_re, ofReal_im, zero_mul, neg_zero,\n  sub_zero] using abs_exp_mul_exp_add_exp_neg_le_of_abs_im_le ε₀.le hw hb'.le\n[GOAL]\ncase h.intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nC✝ : ℝ\nf g✝ : ℂ → E\nz : ℂ\nC : ℝ\nhC₀ : 0 < C\na b : ℝ\nhza : a - b < z.im\nhle_a : ∀ (z : ℂ), z.im = a - b → ‖f z‖ ≤ C\nhzb : z.im < a + b\nhle_b : ∀ (z : ℂ), z.im = a + b → ‖f z‖ ≤ C\nhfd : DiffContOnCl ℂ f (im ⁻¹' Ioo (a - b) (a + b))\nhab : a - b < a + b\nhb : 0 < b\nhπb : 0 < π / 2 / b\nc : ℝ\nhc : c < π / 2 / b\nB : ℝ\nhO : f =O[comap (Abs.abs ∘ re) atTop ⊓ 𝓟 (im ⁻¹' Ioo (a - b) (a + b))] fun z => expR (B * expR (c * |z.re|))\nd : ℝ\nhd : d < π / 2 / b\nhcd : c < d\nhd₀ : 0 < d\nhb' : d * b < π / 2\naff : ℂ → ℂ := fun w => ↑d * (w - ↑a * I)\ng : ℝ → ℂ → ℂ := fun ε w => exp (↑ε * (exp (aff w) + exp (-aff w)))\nε : ℝ\nε₀ : ε < 0\nδ : ℝ\nδ₀ : δ < 0\nhδ : ∀ ⦃w : ℂ⦄, w.im ∈ Icc (a - b) (a + b) → ↑Complex.abs (g ε w) ≤ expR (δ * expR (d * |w.re|))\n⊢ ‖exp (↑ε * (exp (↑d * (z - ↑a * I)) + exp (-(↑d * (z - ↑a * I))))) • f z‖ ≤ C\n[PROOFSTEP]\nhave hg₁ : ∀ w, im w = a - b ∨ im w = a + b → abs (g ε w) ≤ 1 :=\n  by\n  refine' fun w hw => (hδ <| hw.by_cases _ _).trans (Real.exp_le_one_iff.2 _)\n  exacts [fun h => h.symm ▸ left_mem_Icc.2 hab.le, fun h => h.symm ▸ right_mem_Icc.2 hab.le,\n    mul_nonpos_of_nonpos_of_nonneg δ₀.le (Real.exp_pos _).le]\n    /- Our apriori estimate on `f` implies that `g ε w • f w → 0` as `|w.re| → ∞` along the strip. In\n        particular, its norm is less than or equal to `C` for sufficiently large `|w.re|`. -/\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nC✝ : ℝ\nf g✝ : ℂ → E\nz : ℂ\nC : ℝ\nhC₀ : 0 < C\na b : ℝ\nhza : a - b < z.im\nhle_a : ∀ (z : ℂ), z.im = a - b → ‖f z‖ ≤ C\nhzb : z.im < a + b\nhle_b : ∀ (z : ℂ), z.im = a + b → ‖f z‖ ≤ C\nhfd : DiffContOnCl ℂ f (im ⁻¹' Ioo (a - b) (a + b))\nhab : a - b < a + b\nhb : 0 < b\nhπb : 0 < π / 2 / b\nc : ℝ\nhc : c < π / 2 / b\nB : ℝ\nhO : f =O[comap (Abs.abs ∘ re) atTop ⊓ 𝓟 (im ⁻¹' Ioo (a - b) (a + b))] fun z => expR (B * expR (c * |z.re|))\nd : ℝ\nhd : d < π / 2 / b\nhcd : c < d\nhd₀ : 0 < d\nhb' : d * b < π / 2\naff : ℂ → ℂ := fun w => ↑d * (w - ↑a * I)\ng : ℝ → ℂ → ℂ := fun ε w => exp (↑ε * (exp (aff w) + exp (-aff w)))\nε : ℝ\nε₀ : ε < 0\nδ : ℝ\nδ₀ : δ < 0\nhδ : ∀ ⦃w : ℂ⦄, w.im ∈ Icc (a - b) (a + b) → ↑Complex.abs (g ε w) ≤ expR (δ * expR (d * |w.re|))\n⊢ ∀ (w : ℂ), w.im = a - b ∨ w.im = a + b → ↑Complex.abs (g ε w) ≤ 1\n[PROOFSTEP]\nrefine' fun w hw => (hδ <| hw.by_cases _ _).trans (Real.exp_le_one_iff.2 _)\n[GOAL]\ncase refine'_1\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nC✝ : ℝ\nf g✝ : ℂ → E\nz : ℂ\nC : ℝ\nhC₀ : 0 < C\na b : ℝ\nhza : a - b < z.im\nhle_a : ∀ (z : ℂ), z.im = a - b → ‖f z‖ ≤ C\nhzb : z.im < a + b\nhle_b : ∀ (z : ℂ), z.im = a + b → ‖f z‖ ≤ C\nhfd : DiffContOnCl ℂ f (im ⁻¹' Ioo (a - b) (a + b))\nhab : a - b < a + b\nhb : 0 < b\nhπb : 0 < π / 2 / b\nc : ℝ\nhc : c < π / 2 / b\nB : ℝ\nhO : f =O[comap (Abs.abs ∘ re) atTop ⊓ 𝓟 (im ⁻¹' Ioo (a - b) (a + b))] fun z => expR (B * expR (c * |z.re|))\nd : ℝ\nhd : d < π / 2 / b\nhcd : c < d\nhd₀ : 0 < d\nhb' : d * b < π / 2\naff : ℂ → ℂ := fun w => ↑d * (w - ↑a * I)\ng : ℝ → ℂ → ℂ := fun ε w => exp (↑ε * (exp (aff w) + exp (-aff w)))\nε : ℝ\nε₀ : ε < 0\nδ : ℝ\nδ₀ : δ < 0\nhδ : ∀ ⦃w : ℂ⦄, w.im ∈ Icc (a - b) (a + b) → ↑Complex.abs (g ε w) ≤ expR (δ * expR (d * |w.re|))\nw : ℂ\nhw : w.im = a - b ∨ w.im = a + b\n⊢ w.im = a - b → w.im ∈ Icc (a - b) (a + b)\ncase refine'_2\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nC✝ : ℝ\nf g✝ : ℂ → E\nz : ℂ\nC : ℝ\nhC₀ : 0 < C\na b : ℝ\nhza : a - b < z.im\nhle_a : ∀ (z : ℂ), z.im = a - b → ‖f z‖ ≤ C\nhzb : z.im < a + b\nhle_b : ∀ (z : ℂ), z.im = a + b → ‖f z‖ ≤ C\nhfd : DiffContOnCl ℂ f (im ⁻¹' Ioo (a - b) (a + b))\nhab : a - b < a + b\nhb : 0 < b\nhπb : 0 < π / 2 / b\nc : ℝ\nhc : c < π / 2 / b\nB : ℝ\nhO : f =O[comap (Abs.abs ∘ re) atTop ⊓ 𝓟 (im ⁻¹' Ioo (a - b) (a + b))] fun z => expR (B * expR (c * |z.re|))\nd : ℝ\nhd : d < π / 2 / b\nhcd : c < d\nhd₀ : 0 < d\nhb' : d * b < π / 2\naff : ℂ → ℂ := fun w => ↑d * (w - ↑a * I)\ng : ℝ → ℂ → ℂ := fun ε w => exp (↑ε * (exp (aff w) + exp (-aff w)))\nε : ℝ\nε₀ : ε < 0\nδ : ℝ\nδ₀ : δ < 0\nhδ : ∀ ⦃w : ℂ⦄, w.im ∈ Icc (a - b) (a + b) → ↑Complex.abs (g ε w) ≤ expR (δ * expR (d * |w.re|))\nw : ℂ\nhw : w.im = a - b ∨ w.im = a + b\n⊢ w.im = a + b → w.im ∈ Icc (a - b) (a + b)\ncase refine'_3\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nC✝ : ℝ\nf g✝ : ℂ → E\nz : ℂ\nC : ℝ\nhC₀ : 0 < C\na b : ℝ\nhza : a - b < z.im\nhle_a : ∀ (z : ℂ), z.im = a - b → ‖f z‖ ≤ C\nhzb : z.im < a + b\nhle_b : ∀ (z : ℂ), z.im = a + b → ‖f z‖ ≤ C\nhfd : DiffContOnCl ℂ f (im ⁻¹' Ioo (a - b) (a + b))\nhab : a - b < a + b\nhb : 0 < b\nhπb : 0 < π / 2 / b\nc : ℝ\nhc : c < π / 2 / b\nB : ℝ\nhO : f =O[comap (Abs.abs ∘ re) atTop ⊓ 𝓟 (im ⁻¹' Ioo (a - b) (a + b))] fun z => expR (B * expR (c * |z.re|))\nd : ℝ\nhd : d < π / 2 / b\nhcd : c < d\nhd₀ : 0 < d\nhb' : d * b < π / 2\naff : ℂ → ℂ := fun w => ↑d * (w - ↑a * I)\ng : ℝ → ℂ → ℂ := fun ε w => exp (↑ε * (exp (aff w) + exp (-aff w)))\nε : ℝ\nε₀ : ε < 0\nδ : ℝ\nδ₀ : δ < 0\nhδ : ∀ ⦃w : ℂ⦄, w.im ∈ Icc (a - b) (a + b) → ↑Complex.abs (g ε w) ≤ expR (δ * expR (d * |w.re|))\nw : ℂ\nhw : w.im = a - b ∨ w.im = a + b\n⊢ δ * expR (d * |w.re|) ≤ 0\n[PROOFSTEP]\nexacts [fun h => h.symm ▸ left_mem_Icc.2 hab.le, fun h => h.symm ▸ right_mem_Icc.2 hab.le,\n  mul_nonpos_of_nonpos_of_nonneg δ₀.le (Real.exp_pos _).le]\n  /- Our apriori estimate on `f` implies that `g ε w • f w → 0` as `|w.re| → ∞` along the strip. In\n      particular, its norm is less than or equal to `C` for sufficiently large `|w.re|`. -/\n[GOAL]\ncase h.intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nC✝ : ℝ\nf g✝ : ℂ → E\nz : ℂ\nC : ℝ\nhC₀ : 0 < C\na b : ℝ\nhza : a - b < z.im\nhle_a : ∀ (z : ℂ), z.im = a - b → ‖f z‖ ≤ C\nhzb : z.im < a + b\nhle_b : ∀ (z : ℂ), z.im = a + b → ‖f z‖ ≤ C\nhfd : DiffContOnCl ℂ f (im ⁻¹' Ioo (a - b) (a + b))\nhab : a - b < a + b\nhb : 0 < b\nhπb : 0 < π / 2 / b\nc : ℝ\nhc : c < π / 2 / b\nB : ℝ\nhO : f =O[comap (Abs.abs ∘ re) atTop ⊓ 𝓟 (im ⁻¹' Ioo (a - b) (a + b))] fun z => expR (B * expR (c * |z.re|))\nd : ℝ\nhd : d < π / 2 / b\nhcd : c < d\nhd₀ : 0 < d\nhb' : d * b < π / 2\naff : ℂ → ℂ := fun w => ↑d * (w - ↑a * I)\ng : ℝ → ℂ → ℂ := fun ε w => exp (↑ε * (exp (aff w) + exp (-aff w)))\nε : ℝ\nε₀ : ε < 0\nδ : ℝ\nδ₀ : δ < 0\nhδ : ∀ ⦃w : ℂ⦄, w.im ∈ Icc (a - b) (a + b) → ↑Complex.abs (g ε w) ≤ expR (δ * expR (d * |w.re|))\nhg₁ : ∀ (w : ℂ), w.im = a - b ∨ w.im = a + b → ↑Complex.abs (g ε w) ≤ 1\n⊢ ‖exp (↑ε * (exp (↑d * (z - ↑a * I)) + exp (-(↑d * (z - ↑a * I))))) • f z‖ ≤ C\n[PROOFSTEP]\nobtain ⟨R, hzR, hR⟩ : ∃ R : ℝ, |z.re| < R ∧ ∀ w, |re w| = R → im w ∈ Ioo (a - b) (a + b) → ‖g ε w • f w‖ ≤ C :=\n  by\n  refine' ((eventually_gt_atTop _).and _).exists\n  rcases hO.exists_pos with ⟨A, hA₀, hA⟩\n  simp only [isBigOWith_iff, eventually_inf_principal, eventually_comap, mem_Ioo, ← abs_lt, mem_preimage, (· ∘ ·),\n    Real.norm_eq_abs, abs_of_pos (Real.exp_pos _)] at hA \n  suffices : Tendsto (fun R => expR (δ * expR (d * R) + B * expR (c * R) + Real.log A)) atTop (𝓝 0)\n  · filter_upwards [this.eventually (ge_mem_nhds hC₀), hA] with R hR Hle w hre him\n    calc\n      ‖g ε w • f w‖ ≤ expR (δ * expR (d * R) + B * expR (c * R) + Real.log A) := ?_\n      _ ≤ C := hR\n    rw [norm_smul, Real.exp_add, ← hre, Real.exp_add, Real.exp_log hA₀, mul_assoc, mul_comm _ A]\n    exact mul_le_mul (hδ <| Ioo_subset_Icc_self him) (Hle _ hre him) (norm_nonneg _) (Real.exp_pos _).le\n  refine' Real.tendsto_exp_atBot.comp _\n  suffices H : Tendsto (fun R => δ + B * (expR ((d - c) * R))⁻¹) atTop (𝓝 (δ + B * 0))\n  · rw [mul_zero, add_zero] at H \n    refine' Tendsto.atBot_add _ tendsto_const_nhds\n    simpa only [id, (· ∘ ·), add_mul, mul_assoc, ← div_eq_inv_mul, ← Real.exp_sub, ← sub_mul, sub_sub_cancel] using\n      H.neg_mul_atTop δ₀ <| Real.tendsto_exp_atTop.comp <| tendsto_const_nhds.mul_atTop hd₀ tendsto_id\n  refine' tendsto_const_nhds.add (tendsto_const_nhds.mul _)\n  exact\n    tendsto_inv_atTop_zero.comp <|\n      Real.tendsto_exp_atTop.comp <| tendsto_const_nhds.mul_atTop (sub_pos.2 hcd) tendsto_id\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nC✝ : ℝ\nf g✝ : ℂ → E\nz : ℂ\nC : ℝ\nhC₀ : 0 < C\na b : ℝ\nhza : a - b < z.im\nhle_a : ∀ (z : ℂ), z.im = a - b → ‖f z‖ ≤ C\nhzb : z.im < a + b\nhle_b : ∀ (z : ℂ), z.im = a + b → ‖f z‖ ≤ C\nhfd : DiffContOnCl ℂ f (im ⁻¹' Ioo (a - b) (a + b))\nhab : a - b < a + b\nhb : 0 < b\nhπb : 0 < π / 2 / b\nc : ℝ\nhc : c < π / 2 / b\nB : ℝ\nhO : f =O[comap (Abs.abs ∘ re) atTop ⊓ 𝓟 (im ⁻¹' Ioo (a - b) (a + b))] fun z => expR (B * expR (c * |z.re|))\nd : ℝ\nhd : d < π / 2 / b\nhcd : c < d\nhd₀ : 0 < d\nhb' : d * b < π / 2\naff : ℂ → ℂ := fun w => ↑d * (w - ↑a * I)\ng : ℝ → ℂ → ℂ := fun ε w => exp (↑ε * (exp (aff w) + exp (-aff w)))\nε : ℝ\nε₀ : ε < 0\nδ : ℝ\nδ₀ : δ < 0\nhδ : ∀ ⦃w : ℂ⦄, w.im ∈ Icc (a - b) (a + b) → ↑Complex.abs (g ε w) ≤ expR (δ * expR (d * |w.re|))\nhg₁ : ∀ (w : ℂ), w.im = a - b ∨ w.im = a + b → ↑Complex.abs (g ε w) ≤ 1\n⊢ ∃ R, |z.re| < R ∧ ∀ (w : ℂ), |w.re| = R → w.im ∈ Ioo (a - b) (a + b) → ‖g ε w • f w‖ ≤ C\n[PROOFSTEP]\nrefine' ((eventually_gt_atTop _).and _).exists\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nC✝ : ℝ\nf g✝ : ℂ → E\nz : ℂ\nC : ℝ\nhC₀ : 0 < C\na b : ℝ\nhza : a - b < z.im\nhle_a : ∀ (z : ℂ), z.im = a - b → ‖f z‖ ≤ C\nhzb : z.im < a + b\nhle_b : ∀ (z : ℂ), z.im = a + b → ‖f z‖ ≤ C\nhfd : DiffContOnCl ℂ f (im ⁻¹' Ioo (a - b) (a + b))\nhab : a - b < a + b\nhb : 0 < b\nhπb : 0 < π / 2 / b\nc : ℝ\nhc : c < π / 2 / b\nB : ℝ\nhO : f =O[comap (Abs.abs ∘ re) atTop ⊓ 𝓟 (im ⁻¹' Ioo (a - b) (a + b))] fun z => expR (B * expR (c * |z.re|))\nd : ℝ\nhd : d < π / 2 / b\nhcd : c < d\nhd₀ : 0 < d\nhb' : d * b < π / 2\naff : ℂ → ℂ := fun w => ↑d * (w - ↑a * I)\ng : ℝ → ℂ → ℂ := fun ε w => exp (↑ε * (exp (aff w) + exp (-aff w)))\nε : ℝ\nε₀ : ε < 0\nδ : ℝ\nδ₀ : δ < 0\nhδ : ∀ ⦃w : ℂ⦄, w.im ∈ Icc (a - b) (a + b) → ↑Complex.abs (g ε w) ≤ expR (δ * expR (d * |w.re|))\nhg₁ : ∀ (w : ℂ), w.im = a - b ∨ w.im = a + b → ↑Complex.abs (g ε w) ≤ 1\n⊢ ∀ᶠ (R : ℝ) in atTop, ∀ (w : ℂ), |w.re| = R → w.im ∈ Ioo (a - b) (a + b) → ‖g ε w • f w‖ ≤ C\n[PROOFSTEP]\nrcases hO.exists_pos with ⟨A, hA₀, hA⟩\n[GOAL]\ncase intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nC✝ : ℝ\nf g✝ : ℂ → E\nz : ℂ\nC : ℝ\nhC₀ : 0 < C\na b : ℝ\nhza : a - b < z.im\nhle_a : ∀ (z : ℂ), z.im = a - b → ‖f z‖ ≤ C\nhzb : z.im < a + b\nhle_b : ∀ (z : ℂ), z.im = a + b → ‖f z‖ ≤ C\nhfd : DiffContOnCl ℂ f (im ⁻¹' Ioo (a - b) (a + b))\nhab : a - b < a + b\nhb : 0 < b\nhπb : 0 < π / 2 / b\nc : ℝ\nhc : c < π / 2 / b\nB : ℝ\nhO : f =O[comap (Abs.abs ∘ re) atTop ⊓ 𝓟 (im ⁻¹' Ioo (a - b) (a + b))] fun z => expR (B * expR (c * |z.re|))\nd : ℝ\nhd : d < π / 2 / b\nhcd : c < d\nhd₀ : 0 < d\nhb' : d * b < π / 2\naff : ℂ → ℂ := fun w => ↑d * (w - ↑a * I)\ng : ℝ → ℂ → ℂ := fun ε w => exp (↑ε * (exp (aff w) + exp (-aff w)))\nε : ℝ\nε₀ : ε < 0\nδ : ℝ\nδ₀ : δ < 0\nhδ : ∀ ⦃w : ℂ⦄, w.im ∈ Icc (a - b) (a + b) → ↑Complex.abs (g ε w) ≤ expR (δ * expR (d * |w.re|))\nhg₁ : ∀ (w : ℂ), w.im = a - b ∨ w.im = a + b → ↑Complex.abs (g ε w) ≤ 1\nA : ℝ\nhA₀ : 0 < A\nhA : IsBigOWith A (comap (Abs.abs ∘ re) atTop ⊓ 𝓟 (im ⁻¹' Ioo (a - b) (a + b))) f fun z => expR (B * expR (c * |z.re|))\n⊢ ∀ᶠ (R : ℝ) in atTop, ∀ (w : ℂ), |w.re| = R → w.im ∈ Ioo (a - b) (a + b) → ‖g ε w • f w‖ ≤ C\n[PROOFSTEP]\nsimp only [isBigOWith_iff, eventually_inf_principal, eventually_comap, mem_Ioo, ← abs_lt, mem_preimage, (· ∘ ·),\n  Real.norm_eq_abs, abs_of_pos (Real.exp_pos _)] at hA \n[GOAL]\ncase intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nC✝ : ℝ\nf g✝ : ℂ → E\nz : ℂ\nC : ℝ\nhC₀ : 0 < C\na b : ℝ\nhza : a - b < z.im\nhle_a : ∀ (z : ℂ), z.im = a - b → ‖f z‖ ≤ C\nhzb : z.im < a + b\nhle_b : ∀ (z : ℂ), z.im = a + b → ‖f z‖ ≤ C\nhfd : DiffContOnCl ℂ f (im ⁻¹' Ioo (a - b) (a + b))\nhab : a - b < a + b\nhb : 0 < b\nhπb : 0 < π / 2 / b\nc : ℝ\nhc : c < π / 2 / b\nB : ℝ\nhO : f =O[comap (Abs.abs ∘ re) atTop ⊓ 𝓟 (im ⁻¹' Ioo (a - b) (a + b))] fun z => expR (B * expR (c * |z.re|))\nd : ℝ\nhd : d < π / 2 / b\nhcd : c < d\nhd₀ : 0 < d\nhb' : d * b < π / 2\naff : ℂ → ℂ := fun w => ↑d * (w - ↑a * I)\ng : ℝ → ℂ → ℂ := fun ε w => exp (↑ε * (exp (aff w) + exp (-aff w)))\nε : ℝ\nε₀ : ε < 0\nδ : ℝ\nδ₀ : δ < 0\nhδ : ∀ ⦃w : ℂ⦄, w.im ∈ Icc (a - b) (a + b) → ↑Complex.abs (g ε w) ≤ expR (δ * expR (d * |w.re|))\nhg₁ : ∀ (w : ℂ), w.im = a - b ∨ w.im = a + b → ↑Complex.abs (g ε w) ≤ 1\nA : ℝ\nhA₀ : 0 < A\nhA :\n  ∀ᶠ (b_1 : ℝ) in atTop,\n    ∀ (a_1 : ℂ), |a_1.re| = b_1 → a - b < a_1.im ∧ a_1.im < a + b → ‖f a_1‖ ≤ A * expR (B * expR (c * |a_1.re|))\n⊢ ∀ᶠ (R : ℝ) in atTop, ∀ (w : ℂ), |w.re| = R → w.im ∈ Ioo (a - b) (a + b) → ‖g ε w • f w‖ ≤ C\n[PROOFSTEP]\nsuffices : Tendsto (fun R => expR (δ * expR (d * R) + B * expR (c * R) + Real.log A)) atTop (𝓝 0)\n[GOAL]\ncase intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nC✝ : ℝ\nf g✝ : ℂ → E\nz : ℂ\nC : ℝ\nhC₀ : 0 < C\na b : ℝ\nhza : a - b < z.im\nhle_a : ∀ (z : ℂ), z.im = a - b → ‖f z‖ ≤ C\nhzb : z.im < a + b\nhle_b : ∀ (z : ℂ), z.im = a + b → ‖f z‖ ≤ C\nhfd : DiffContOnCl ℂ f (im ⁻¹' Ioo (a - b) (a + b))\nhab : a - b < a + b\nhb : 0 < b\nhπb : 0 < π / 2 / b\nc : ℝ\nhc : c < π / 2 / b\nB : ℝ\nhO : f =O[comap (Abs.abs ∘ re) atTop ⊓ 𝓟 (im ⁻¹' Ioo (a - b) (a + b))] fun z => expR (B * expR (c * |z.re|))\nd : ℝ\nhd : d < π / 2 / b\nhcd : c < d\nhd₀ : 0 < d\nhb' : d * b < π / 2\naff : ℂ → ℂ := fun w => ↑d * (w - ↑a * I)\ng : ℝ → ℂ → ℂ := fun ε w => exp (↑ε * (exp (aff w) + exp (-aff w)))\nε : ℝ\nε₀ : ε < 0\nδ : ℝ\nδ₀ : δ < 0\nhδ : ∀ ⦃w : ℂ⦄, w.im ∈ Icc (a - b) (a + b) → ↑Complex.abs (g ε w) ≤ expR (δ * expR (d * |w.re|))\nhg₁ : ∀ (w : ℂ), w.im = a - b ∨ w.im = a + b → ↑Complex.abs (g ε w) ≤ 1\nA : ℝ\nhA₀ : 0 < A\nhA :\n  ∀ᶠ (b_1 : ℝ) in atTop,\n    ∀ (a_1 : ℂ), |a_1.re| = b_1 → a - b < a_1.im ∧ a_1.im < a + b → ‖f a_1‖ ≤ A * expR (B * expR (c * |a_1.re|))\nthis : Tendsto (fun R => expR (δ * expR (d * R) + B * expR (c * R) + Real.log A)) atTop (𝓝 0)\n⊢ ∀ᶠ (R : ℝ) in atTop, ∀ (w : ℂ), |w.re| = R → w.im ∈ Ioo (a - b) (a + b) → ‖g ε w • f w‖ ≤ C\n[PROOFSTEP]\nfilter_upwards [this.eventually (ge_mem_nhds hC₀), hA] with R hR Hle w hre him\n[GOAL]\ncase h\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nC✝ : ℝ\nf g✝ : ℂ → E\nz : ℂ\nC : ℝ\nhC₀ : 0 < C\na b : ℝ\nhza : a - b < z.im\nhle_a : ∀ (z : ℂ), z.im = a - b → ‖f z‖ ≤ C\nhzb : z.im < a + b\nhle_b : ∀ (z : ℂ), z.im = a + b → ‖f z‖ ≤ C\nhfd : DiffContOnCl ℂ f (im ⁻¹' Ioo (a - b) (a + b))\nhab : a - b < a + b\nhb : 0 < b\nhπb : 0 < π / 2 / b\nc : ℝ\nhc : c < π / 2 / b\nB : ℝ\nhO : f =O[comap (Abs.abs ∘ re) atTop ⊓ 𝓟 (im ⁻¹' Ioo (a - b) (a + b))] fun z => expR (B * expR (c * |z.re|))\nd : ℝ\nhd : d < π / 2 / b\nhcd : c < d\nhd₀ : 0 < d\nhb' : d * b < π / 2\naff : ℂ → ℂ := fun w => ↑d * (w - ↑a * I)\ng : ℝ → ℂ → ℂ := fun ε w => exp (↑ε * (exp (aff w) + exp (-aff w)))\nε : ℝ\nε₀ : ε < 0\nδ : ℝ\nδ₀ : δ < 0\nhδ : ∀ ⦃w : ℂ⦄, w.im ∈ Icc (a - b) (a + b) → ↑Complex.abs (g ε w) ≤ expR (δ * expR (d * |w.re|))\nhg₁ : ∀ (w : ℂ), w.im = a - b ∨ w.im = a + b → ↑Complex.abs (g ε w) ≤ 1\nA : ℝ\nhA₀ : 0 < A\nhA :\n  ∀ᶠ (b_1 : ℝ) in atTop,\n    ∀ (a_1 : ℂ), |a_1.re| = b_1 → a - b < a_1.im ∧ a_1.im < a + b → ‖f a_1‖ ≤ A * expR (B * expR (c * |a_1.re|))\nthis : Tendsto (fun R => expR (δ * expR (d * R) + B * expR (c * R) + Real.log A)) atTop (𝓝 0)\nR : ℝ\nhR : expR (δ * expR (d * R) + B * expR (c * R) + Real.log A) ≤ C\nHle : ∀ (a_1 : ℂ), |a_1.re| = R → a - b < a_1.im ∧ a_1.im < a + b → ‖f a_1‖ ≤ A * expR (B * expR (c * |a_1.re|))\nw : ℂ\nhre : |w.re| = R\nhim : w.im ∈ Ioo (a - b) (a + b)\n⊢ ‖exp (↑ε * (exp (↑d * (w - ↑a * I)) + exp (-(↑d * (w - ↑a * I))))) • f w‖ ≤ C\n[PROOFSTEP]\ncalc\n  ‖g ε w • f w‖ ≤ expR (δ * expR (d * R) + B * expR (c * R) + Real.log A) := ?_\n  _ ≤ C := hR\n[GOAL]\ncase h\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nC✝ : ℝ\nf g✝ : ℂ → E\nz : ℂ\nC : ℝ\nhC₀ : 0 < C\na b : ℝ\nhza : a - b < z.im\nhle_a : ∀ (z : ℂ), z.im = a - b → ‖f z‖ ≤ C\nhzb : z.im < a + b\nhle_b : ∀ (z : ℂ), z.im = a + b → ‖f z‖ ≤ C\nhfd : DiffContOnCl ℂ f (im ⁻¹' Ioo (a - b) (a + b))\nhab : a - b < a + b\nhb : 0 < b\nhπb : 0 < π / 2 / b\nc : ℝ\nhc : c < π / 2 / b\nB : ℝ\nhO : f =O[comap (Abs.abs ∘ re) atTop ⊓ 𝓟 (im ⁻¹' Ioo (a - b) (a + b))] fun z => expR (B * expR (c * |z.re|))\nd : ℝ\nhd : d < π / 2 / b\nhcd : c < d\nhd₀ : 0 < d\nhb' : d * b < π / 2\naff : ℂ → ℂ := fun w => ↑d * (w - ↑a * I)\ng : ℝ → ℂ → ℂ := fun ε w => exp (↑ε * (exp (aff w) + exp (-aff w)))\nε : ℝ\nε₀ : ε < 0\nδ : ℝ\nδ₀ : δ < 0\nhδ : ∀ ⦃w : ℂ⦄, w.im ∈ Icc (a - b) (a + b) → ↑Complex.abs (g ε w) ≤ expR (δ * expR (d * |w.re|))\nhg₁ : ∀ (w : ℂ), w.im = a - b ∨ w.im = a + b → ↑Complex.abs (g ε w) ≤ 1\nA : ℝ\nhA₀ : 0 < A\nhA :\n  ∀ᶠ (b_1 : ℝ) in atTop,\n    ∀ (a_1 : ℂ), |a_1.re| = b_1 → a - b < a_1.im ∧ a_1.im < a + b → ‖f a_1‖ ≤ A * expR (B * expR (c * |a_1.re|))\nthis : Tendsto (fun R => expR (δ * expR (d * R) + B * expR (c * R) + Real.log A)) atTop (𝓝 0)\nR : ℝ\nhR : expR (δ * expR (d * R) + B * expR (c * R) + Real.log A) ≤ C\nHle : ∀ (a_1 : ℂ), |a_1.re| = R → a - b < a_1.im ∧ a_1.im < a + b → ‖f a_1‖ ≤ A * expR (B * expR (c * |a_1.re|))\nw : ℂ\nhre : |w.re| = R\nhim : w.im ∈ Ioo (a - b) (a + b)\n⊢ ‖g ε w • f w‖ ≤ expR (δ * expR (d * R) + B * expR (c * R) + Real.log A)\n[PROOFSTEP]\nrw [norm_smul, Real.exp_add, ← hre, Real.exp_add, Real.exp_log hA₀, mul_assoc, mul_comm _ A]\n[GOAL]\ncase h\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nC✝ : ℝ\nf g✝ : ℂ → E\nz : ℂ\nC : ℝ\nhC₀ : 0 < C\na b : ℝ\nhza : a - b < z.im\nhle_a : ∀ (z : ℂ), z.im = a - b → ‖f z‖ ≤ C\nhzb : z.im < a + b\nhle_b : ∀ (z : ℂ), z.im = a + b → ‖f z‖ ≤ C\nhfd : DiffContOnCl ℂ f (im ⁻¹' Ioo (a - b) (a + b))\nhab : a - b < a + b\nhb : 0 < b\nhπb : 0 < π / 2 / b\nc : ℝ\nhc : c < π / 2 / b\nB : ℝ\nhO : f =O[comap (Abs.abs ∘ re) atTop ⊓ 𝓟 (im ⁻¹' Ioo (a - b) (a + b))] fun z => expR (B * expR (c * |z.re|))\nd : ℝ\nhd : d < π / 2 / b\nhcd : c < d\nhd₀ : 0 < d\nhb' : d * b < π / 2\naff : ℂ → ℂ := fun w => ↑d * (w - ↑a * I)\ng : ℝ → ℂ → ℂ := fun ε w => exp (↑ε * (exp (aff w) + exp (-aff w)))\nε : ℝ\nε₀ : ε < 0\nδ : ℝ\nδ₀ : δ < 0\nhδ : ∀ ⦃w : ℂ⦄, w.im ∈ Icc (a - b) (a + b) → ↑Complex.abs (g ε w) ≤ expR (δ * expR (d * |w.re|))\nhg₁ : ∀ (w : ℂ), w.im = a - b ∨ w.im = a + b → ↑Complex.abs (g ε w) ≤ 1\nA : ℝ\nhA₀ : 0 < A\nhA :\n  ∀ᶠ (b_1 : ℝ) in atTop,\n    ∀ (a_1 : ℂ), |a_1.re| = b_1 → a - b < a_1.im ∧ a_1.im < a + b → ‖f a_1‖ ≤ A * expR (B * expR (c * |a_1.re|))\nthis : Tendsto (fun R => expR (δ * expR (d * R) + B * expR (c * R) + Real.log A)) atTop (𝓝 0)\nR : ℝ\nhR : expR (δ * expR (d * R) + B * expR (c * R) + Real.log A) ≤ C\nHle : ∀ (a_1 : ℂ), |a_1.re| = R → a - b < a_1.im ∧ a_1.im < a + b → ‖f a_1‖ ≤ A * expR (B * expR (c * |a_1.re|))\nw : ℂ\nhre : |w.re| = R\nhim : w.im ∈ Ioo (a - b) (a + b)\n⊢ ‖g ε w‖ * ‖f w‖ ≤ expR (δ * expR (d * |w.re|)) * (A * expR (B * expR (c * |w.re|)))\n[PROOFSTEP]\nexact mul_le_mul (hδ <| Ioo_subset_Icc_self him) (Hle _ hre him) (norm_nonneg _) (Real.exp_pos _).le\n[GOAL]\ncase this\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nC✝ : ℝ\nf g✝ : ℂ → E\nz : ℂ\nC : ℝ\nhC₀ : 0 < C\na b : ℝ\nhza : a - b < z.im\nhle_a : ∀ (z : ℂ), z.im = a - b → ‖f z‖ ≤ C\nhzb : z.im < a + b\nhle_b : ∀ (z : ℂ), z.im = a + b → ‖f z‖ ≤ C\nhfd : DiffContOnCl ℂ f (im ⁻¹' Ioo (a - b) (a + b))\nhab : a - b < a + b\nhb : 0 < b\nhπb : 0 < π / 2 / b\nc : ℝ\nhc : c < π / 2 / b\nB : ℝ\nhO : f =O[comap (Abs.abs ∘ re) atTop ⊓ 𝓟 (im ⁻¹' Ioo (a - b) (a + b))] fun z => expR (B * expR (c * |z.re|))\nd : ℝ\nhd : d < π / 2 / b\nhcd : c < d\nhd₀ : 0 < d\nhb' : d * b < π / 2\naff : ℂ → ℂ := fun w => ↑d * (w - ↑a * I)\ng : ℝ → ℂ → ℂ := fun ε w => exp (↑ε * (exp (aff w) + exp (-aff w)))\nε : ℝ\nε₀ : ε < 0\nδ : ℝ\nδ₀ : δ < 0\nhδ : ∀ ⦃w : ℂ⦄, w.im ∈ Icc (a - b) (a + b) → ↑Complex.abs (g ε w) ≤ expR (δ * expR (d * |w.re|))\nhg₁ : ∀ (w : ℂ), w.im = a - b ∨ w.im = a + b → ↑Complex.abs (g ε w) ≤ 1\nA : ℝ\nhA₀ : 0 < A\nhA :\n  ∀ᶠ (b_1 : ℝ) in atTop,\n    ∀ (a_1 : ℂ), |a_1.re| = b_1 → a - b < a_1.im ∧ a_1.im < a + b → ‖f a_1‖ ≤ A * expR (B * expR (c * |a_1.re|))\n⊢ Tendsto (fun R => expR (δ * expR (d * R) + B * expR (c * R) + Real.log A)) atTop (𝓝 0)\n[PROOFSTEP]\nrefine' Real.tendsto_exp_atBot.comp _\n[GOAL]\ncase this\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nC✝ : ℝ\nf g✝ : ℂ → E\nz : ℂ\nC : ℝ\nhC₀ : 0 < C\na b : ℝ\nhza : a - b < z.im\nhle_a : ∀ (z : ℂ), z.im = a - b → ‖f z‖ ≤ C\nhzb : z.im < a + b\nhle_b : ∀ (z : ℂ), z.im = a + b → ‖f z‖ ≤ C\nhfd : DiffContOnCl ℂ f (im ⁻¹' Ioo (a - b) (a + b))\nhab : a - b < a + b\nhb : 0 < b\nhπb : 0 < π / 2 / b\nc : ℝ\nhc : c < π / 2 / b\nB : ℝ\nhO : f =O[comap (Abs.abs ∘ re) atTop ⊓ 𝓟 (im ⁻¹' Ioo (a - b) (a + b))] fun z => expR (B * expR (c * |z.re|))\nd : ℝ\nhd : d < π / 2 / b\nhcd : c < d\nhd₀ : 0 < d\nhb' : d * b < π / 2\naff : ℂ → ℂ := fun w => ↑d * (w - ↑a * I)\ng : ℝ → ℂ → ℂ := fun ε w => exp (↑ε * (exp (aff w) + exp (-aff w)))\nε : ℝ\nε₀ : ε < 0\nδ : ℝ\nδ₀ : δ < 0\nhδ : ∀ ⦃w : ℂ⦄, w.im ∈ Icc (a - b) (a + b) → ↑Complex.abs (g ε w) ≤ expR (δ * expR (d * |w.re|))\nhg₁ : ∀ (w : ℂ), w.im = a - b ∨ w.im = a + b → ↑Complex.abs (g ε w) ≤ 1\nA : ℝ\nhA₀ : 0 < A\nhA :\n  ∀ᶠ (b_1 : ℝ) in atTop,\n    ∀ (a_1 : ℂ), |a_1.re| = b_1 → a - b < a_1.im ∧ a_1.im < a + b → ‖f a_1‖ ≤ A * expR (B * expR (c * |a_1.re|))\n⊢ Tendsto (fun R => δ * expR (d * R) + B * expR (c * R) + Real.log A) atTop atBot\n[PROOFSTEP]\nsuffices H : Tendsto (fun R => δ + B * (expR ((d - c) * R))⁻¹) atTop (𝓝 (δ + B * 0))\n[GOAL]\ncase this\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nC✝ : ℝ\nf g✝ : ℂ → E\nz : ℂ\nC : ℝ\nhC₀ : 0 < C\na b : ℝ\nhza : a - b < z.im\nhle_a : ∀ (z : ℂ), z.im = a - b → ‖f z‖ ≤ C\nhzb : z.im < a + b\nhle_b : ∀ (z : ℂ), z.im = a + b → ‖f z‖ ≤ C\nhfd : DiffContOnCl ℂ f (im ⁻¹' Ioo (a - b) (a + b))\nhab : a - b < a + b\nhb : 0 < b\nhπb : 0 < π / 2 / b\nc : ℝ\nhc : c < π / 2 / b\nB : ℝ\nhO : f =O[comap (Abs.abs ∘ re) atTop ⊓ 𝓟 (im ⁻¹' Ioo (a - b) (a + b))] fun z => expR (B * expR (c * |z.re|))\nd : ℝ\nhd : d < π / 2 / b\nhcd : c < d\nhd₀ : 0 < d\nhb' : d * b < π / 2\naff : ℂ → ℂ := fun w => ↑d * (w - ↑a * I)\ng : ℝ → ℂ → ℂ := fun ε w => exp (↑ε * (exp (aff w) + exp (-aff w)))\nε : ℝ\nε₀ : ε < 0\nδ : ℝ\nδ₀ : δ < 0\nhδ : ∀ ⦃w : ℂ⦄, w.im ∈ Icc (a - b) (a + b) → ↑Complex.abs (g ε w) ≤ expR (δ * expR (d * |w.re|))\nhg₁ : ∀ (w : ℂ), w.im = a - b ∨ w.im = a + b → ↑Complex.abs (g ε w) ≤ 1\nA : ℝ\nhA₀ : 0 < A\nhA :\n  ∀ᶠ (b_1 : ℝ) in atTop,\n    ∀ (a_1 : ℂ), |a_1.re| = b_1 → a - b < a_1.im ∧ a_1.im < a + b → ‖f a_1‖ ≤ A * expR (B * expR (c * |a_1.re|))\nH : Tendsto (fun R => δ + B * (expR ((d - c) * R))⁻¹) atTop (𝓝 (δ + B * 0))\n⊢ Tendsto (fun R => δ * expR (d * R) + B * expR (c * R) + Real.log A) atTop atBot\n[PROOFSTEP]\nrw [mul_zero, add_zero] at H \n[GOAL]\ncase this\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nC✝ : ℝ\nf g✝ : ℂ → E\nz : ℂ\nC : ℝ\nhC₀ : 0 < C\na b : ℝ\nhza : a - b < z.im\nhle_a : ∀ (z : ℂ), z.im = a - b → ‖f z‖ ≤ C\nhzb : z.im < a + b\nhle_b : ∀ (z : ℂ), z.im = a + b → ‖f z‖ ≤ C\nhfd : DiffContOnCl ℂ f (im ⁻¹' Ioo (a - b) (a + b))\nhab : a - b < a + b\nhb : 0 < b\nhπb : 0 < π / 2 / b\nc : ℝ\nhc : c < π / 2 / b\nB : ℝ\nhO : f =O[comap (Abs.abs ∘ re) atTop ⊓ 𝓟 (im ⁻¹' Ioo (a - b) (a + b))] fun z => expR (B * expR (c * |z.re|))\nd : ℝ\nhd : d < π / 2 / b\nhcd : c < d\nhd₀ : 0 < d\nhb' : d * b < π / 2\naff : ℂ → ℂ := fun w => ↑d * (w - ↑a * I)\ng : ℝ → ℂ → ℂ := fun ε w => exp (↑ε * (exp (aff w) + exp (-aff w)))\nε : ℝ\nε₀ : ε < 0\nδ : ℝ\nδ₀ : δ < 0\nhδ : ∀ ⦃w : ℂ⦄, w.im ∈ Icc (a - b) (a + b) → ↑Complex.abs (g ε w) ≤ expR (δ * expR (d * |w.re|))\nhg₁ : ∀ (w : ℂ), w.im = a - b ∨ w.im = a + b → ↑Complex.abs (g ε w) ≤ 1\nA : ℝ\nhA₀ : 0 < A\nhA :\n  ∀ᶠ (b_1 : ℝ) in atTop,\n    ∀ (a_1 : ℂ), |a_1.re| = b_1 → a - b < a_1.im ∧ a_1.im < a + b → ‖f a_1‖ ≤ A * expR (B * expR (c * |a_1.re|))\nH : Tendsto (fun R => δ + B * (expR ((d - c) * R))⁻¹) atTop (𝓝 δ)\n⊢ Tendsto (fun R => δ * expR (d * R) + B * expR (c * R) + Real.log A) atTop atBot\n[PROOFSTEP]\nrefine' Tendsto.atBot_add _ tendsto_const_nhds\n[GOAL]\ncase this\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nC✝ : ℝ\nf g✝ : ℂ → E\nz : ℂ\nC : ℝ\nhC₀ : 0 < C\na b : ℝ\nhza : a - b < z.im\nhle_a : ∀ (z : ℂ), z.im = a - b → ‖f z‖ ≤ C\nhzb : z.im < a + b\nhle_b : ∀ (z : ℂ), z.im = a + b → ‖f z‖ ≤ C\nhfd : DiffContOnCl ℂ f (im ⁻¹' Ioo (a - b) (a + b))\nhab : a - b < a + b\nhb : 0 < b\nhπb : 0 < π / 2 / b\nc : ℝ\nhc : c < π / 2 / b\nB : ℝ\nhO : f =O[comap (Abs.abs ∘ re) atTop ⊓ 𝓟 (im ⁻¹' Ioo (a - b) (a + b))] fun z => expR (B * expR (c * |z.re|))\nd : ℝ\nhd : d < π / 2 / b\nhcd : c < d\nhd₀ : 0 < d\nhb' : d * b < π / 2\naff : ℂ → ℂ := fun w => ↑d * (w - ↑a * I)\ng : ℝ → ℂ → ℂ := fun ε w => exp (↑ε * (exp (aff w) + exp (-aff w)))\nε : ℝ\nε₀ : ε < 0\nδ : ℝ\nδ₀ : δ < 0\nhδ : ∀ ⦃w : ℂ⦄, w.im ∈ Icc (a - b) (a + b) → ↑Complex.abs (g ε w) ≤ expR (δ * expR (d * |w.re|))\nhg₁ : ∀ (w : ℂ), w.im = a - b ∨ w.im = a + b → ↑Complex.abs (g ε w) ≤ 1\nA : ℝ\nhA₀ : 0 < A\nhA :\n  ∀ᶠ (b_1 : ℝ) in atTop,\n    ∀ (a_1 : ℂ), |a_1.re| = b_1 → a - b < a_1.im ∧ a_1.im < a + b → ‖f a_1‖ ≤ A * expR (B * expR (c * |a_1.re|))\nH : Tendsto (fun R => δ + B * (expR ((d - c) * R))⁻¹) atTop (𝓝 δ)\n⊢ Tendsto (fun R => δ * expR (d * R) + B * expR (c * R)) atTop atBot\n[PROOFSTEP]\nsimpa only [id, (· ∘ ·), add_mul, mul_assoc, ← div_eq_inv_mul, ← Real.exp_sub, ← sub_mul, sub_sub_cancel] using\n  H.neg_mul_atTop δ₀ <| Real.tendsto_exp_atTop.comp <| tendsto_const_nhds.mul_atTop hd₀ tendsto_id\n[GOAL]\ncase H\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nC✝ : ℝ\nf g✝ : ℂ → E\nz : ℂ\nC : ℝ\nhC₀ : 0 < C\na b : ℝ\nhza : a - b < z.im\nhle_a : ∀ (z : ℂ), z.im = a - b → ‖f z‖ ≤ C\nhzb : z.im < a + b\nhle_b : ∀ (z : ℂ), z.im = a + b → ‖f z‖ ≤ C\nhfd : DiffContOnCl ℂ f (im ⁻¹' Ioo (a - b) (a + b))\nhab : a - b < a + b\nhb : 0 < b\nhπb : 0 < π / 2 / b\nc : ℝ\nhc : c < π / 2 / b\nB : ℝ\nhO : f =O[comap (Abs.abs ∘ re) atTop ⊓ 𝓟 (im ⁻¹' Ioo (a - b) (a + b))] fun z => expR (B * expR (c * |z.re|))\nd : ℝ\nhd : d < π / 2 / b\nhcd : c < d\nhd₀ : 0 < d\nhb' : d * b < π / 2\naff : ℂ → ℂ := fun w => ↑d * (w - ↑a * I)\ng : ℝ → ℂ → ℂ := fun ε w => exp (↑ε * (exp (aff w) + exp (-aff w)))\nε : ℝ\nε₀ : ε < 0\nδ : ℝ\nδ₀ : δ < 0\nhδ : ∀ ⦃w : ℂ⦄, w.im ∈ Icc (a - b) (a + b) → ↑Complex.abs (g ε w) ≤ expR (δ * expR (d * |w.re|))\nhg₁ : ∀ (w : ℂ), w.im = a - b ∨ w.im = a + b → ↑Complex.abs (g ε w) ≤ 1\nA : ℝ\nhA₀ : 0 < A\nhA :\n  ∀ᶠ (b_1 : ℝ) in atTop,\n    ∀ (a_1 : ℂ), |a_1.re| = b_1 → a - b < a_1.im ∧ a_1.im < a + b → ‖f a_1‖ ≤ A * expR (B * expR (c * |a_1.re|))\n⊢ Tendsto (fun R => δ + B * (expR ((d - c) * R))⁻¹) atTop (𝓝 (δ + B * 0))\n[PROOFSTEP]\nrefine' tendsto_const_nhds.add (tendsto_const_nhds.mul _)\n[GOAL]\ncase H\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nC✝ : ℝ\nf g✝ : ℂ → E\nz : ℂ\nC : ℝ\nhC₀ : 0 < C\na b : ℝ\nhza : a - b < z.im\nhle_a : ∀ (z : ℂ), z.im = a - b → ‖f z‖ ≤ C\nhzb : z.im < a + b\nhle_b : ∀ (z : ℂ), z.im = a + b → ‖f z‖ ≤ C\nhfd : DiffContOnCl ℂ f (im ⁻¹' Ioo (a - b) (a + b))\nhab : a - b < a + b\nhb : 0 < b\nhπb : 0 < π / 2 / b\nc : ℝ\nhc : c < π / 2 / b\nB : ℝ\nhO : f =O[comap (Abs.abs ∘ re) atTop ⊓ 𝓟 (im ⁻¹' Ioo (a - b) (a + b))] fun z => expR (B * expR (c * |z.re|))\nd : ℝ\nhd : d < π / 2 / b\nhcd : c < d\nhd₀ : 0 < d\nhb' : d * b < π / 2\naff : ℂ → ℂ := fun w => ↑d * (w - ↑a * I)\ng : ℝ → ℂ → ℂ := fun ε w => exp (↑ε * (exp (aff w) + exp (-aff w)))\nε : ℝ\nε₀ : ε < 0\nδ : ℝ\nδ₀ : δ < 0\nhδ : ∀ ⦃w : ℂ⦄, w.im ∈ Icc (a - b) (a + b) → ↑Complex.abs (g ε w) ≤ expR (δ * expR (d * |w.re|))\nhg₁ : ∀ (w : ℂ), w.im = a - b ∨ w.im = a + b → ↑Complex.abs (g ε w) ≤ 1\nA : ℝ\nhA₀ : 0 < A\nhA :\n  ∀ᶠ (b_1 : ℝ) in atTop,\n    ∀ (a_1 : ℂ), |a_1.re| = b_1 → a - b < a_1.im ∧ a_1.im < a + b → ‖f a_1‖ ≤ A * expR (B * expR (c * |a_1.re|))\n⊢ Tendsto (fun R => (expR ((d - c) * R))⁻¹) atTop (𝓝 0)\n[PROOFSTEP]\nexact\n  tendsto_inv_atTop_zero.comp <| Real.tendsto_exp_atTop.comp <| tendsto_const_nhds.mul_atTop (sub_pos.2 hcd) tendsto_id\n[GOAL]\ncase h.intro.intro.intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nC✝ : ℝ\nf g✝ : ℂ → E\nz : ℂ\nC : ℝ\nhC₀ : 0 < C\na b : ℝ\nhza : a - b < z.im\nhle_a : ∀ (z : ℂ), z.im = a - b → ‖f z‖ ≤ C\nhzb : z.im < a + b\nhle_b : ∀ (z : ℂ), z.im = a + b → ‖f z‖ ≤ C\nhfd : DiffContOnCl ℂ f (im ⁻¹' Ioo (a - b) (a + b))\nhab : a - b < a + b\nhb : 0 < b\nhπb : 0 < π / 2 / b\nc : ℝ\nhc : c < π / 2 / b\nB : ℝ\nhO : f =O[comap (Abs.abs ∘ re) atTop ⊓ 𝓟 (im ⁻¹' Ioo (a - b) (a + b))] fun z => expR (B * expR (c * |z.re|))\nd : ℝ\nhd : d < π / 2 / b\nhcd : c < d\nhd₀ : 0 < d\nhb' : d * b < π / 2\naff : ℂ → ℂ := fun w => ↑d * (w - ↑a * I)\ng : ℝ → ℂ → ℂ := fun ε w => exp (↑ε * (exp (aff w) + exp (-aff w)))\nε : ℝ\nε₀ : ε < 0\nδ : ℝ\nδ₀ : δ < 0\nhδ : ∀ ⦃w : ℂ⦄, w.im ∈ Icc (a - b) (a + b) → ↑Complex.abs (g ε w) ≤ expR (δ * expR (d * |w.re|))\nhg₁ : ∀ (w : ℂ), w.im = a - b ∨ w.im = a + b → ↑Complex.abs (g ε w) ≤ 1\nR : ℝ\nhzR : |z.re| < R\nhR : ∀ (w : ℂ), |w.re| = R → w.im ∈ Ioo (a - b) (a + b) → ‖g ε w • f w‖ ≤ C\n⊢ ‖exp (↑ε * (exp (↑d * (z - ↑a * I)) + exp (-(↑d * (z - ↑a * I))))) • f z‖ ≤ C\n[PROOFSTEP]\nhave hR₀ : 0 < R := (_root_.abs_nonneg _).trans_lt hzR\n[GOAL]\ncase h.intro.intro.intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nC✝ : ℝ\nf g✝ : ℂ → E\nz : ℂ\nC : ℝ\nhC₀ : 0 < C\na b : ℝ\nhza : a - b < z.im\nhle_a : ∀ (z : ℂ), z.im = a - b → ‖f z‖ ≤ C\nhzb : z.im < a + b\nhle_b : ∀ (z : ℂ), z.im = a + b → ‖f z‖ ≤ C\nhfd : DiffContOnCl ℂ f (im ⁻¹' Ioo (a - b) (a + b))\nhab : a - b < a + b\nhb : 0 < b\nhπb : 0 < π / 2 / b\nc : ℝ\nhc : c < π / 2 / b\nB : ℝ\nhO : f =O[comap (Abs.abs ∘ re) atTop ⊓ 𝓟 (im ⁻¹' Ioo (a - b) (a + b))] fun z => expR (B * expR (c * |z.re|))\nd : ℝ\nhd : d < π / 2 / b\nhcd : c < d\nhd₀ : 0 < d\nhb' : d * b < π / 2\naff : ℂ → ℂ := fun w => ↑d * (w - ↑a * I)\ng : ℝ → ℂ → ℂ := fun ε w => exp (↑ε * (exp (aff w) + exp (-aff w)))\nε : ℝ\nε₀ : ε < 0\nδ : ℝ\nδ₀ : δ < 0\nhδ : ∀ ⦃w : ℂ⦄, w.im ∈ Icc (a - b) (a + b) → ↑Complex.abs (g ε w) ≤ expR (δ * expR (d * |w.re|))\nhg₁ : ∀ (w : ℂ), w.im = a - b ∨ w.im = a + b → ↑Complex.abs (g ε w) ≤ 1\nR : ℝ\nhzR : |z.re| < R\nhR : ∀ (w : ℂ), |w.re| = R → w.im ∈ Ioo (a - b) (a + b) → ‖g ε w • f w‖ ≤ C\nhR₀ : 0 < R\n⊢ ‖exp (↑ε * (exp (↑d * (z - ↑a * I)) + exp (-(↑d * (z - ↑a * I))))) • f z‖ ≤ C\n[PROOFSTEP]\nhave hgd : Differentiable ℂ (g ε) :=\n  ((((differentiable_id.sub_const _).const_mul _).cexp.add\n          ((differentiable_id.sub_const _).const_mul _).neg.cexp).const_mul\n      _).cexp\n[GOAL]\ncase h.intro.intro.intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nC✝ : ℝ\nf g✝ : ℂ → E\nz : ℂ\nC : ℝ\nhC₀ : 0 < C\na b : ℝ\nhza : a - b < z.im\nhle_a : ∀ (z : ℂ), z.im = a - b → ‖f z‖ ≤ C\nhzb : z.im < a + b\nhle_b : ∀ (z : ℂ), z.im = a + b → ‖f z‖ ≤ C\nhfd : DiffContOnCl ℂ f (im ⁻¹' Ioo (a - b) (a + b))\nhab : a - b < a + b\nhb : 0 < b\nhπb : 0 < π / 2 / b\nc : ℝ\nhc : c < π / 2 / b\nB : ℝ\nhO : f =O[comap (Abs.abs ∘ re) atTop ⊓ 𝓟 (im ⁻¹' Ioo (a - b) (a + b))] fun z => expR (B * expR (c * |z.re|))\nd : ℝ\nhd : d < π / 2 / b\nhcd : c < d\nhd₀ : 0 < d\nhb' : d * b < π / 2\naff : ℂ → ℂ := fun w => ↑d * (w - ↑a * I)\ng : ℝ → ℂ → ℂ := fun ε w => exp (↑ε * (exp (aff w) + exp (-aff w)))\nε : ℝ\nε₀ : ε < 0\nδ : ℝ\nδ₀ : δ < 0\nhδ : ∀ ⦃w : ℂ⦄, w.im ∈ Icc (a - b) (a + b) → ↑Complex.abs (g ε w) ≤ expR (δ * expR (d * |w.re|))\nhg₁ : ∀ (w : ℂ), w.im = a - b ∨ w.im = a + b → ↑Complex.abs (g ε w) ≤ 1\nR : ℝ\nhzR : |z.re| < R\nhR : ∀ (w : ℂ), |w.re| = R → w.im ∈ Ioo (a - b) (a + b) → ‖g ε w • f w‖ ≤ C\nhR₀ : 0 < R\nhgd : Differentiable ℂ (g ε)\n⊢ ‖exp (↑ε * (exp (↑d * (z - ↑a * I)) + exp (-(↑d * (z - ↑a * I))))) • f z‖ ≤ C\n[PROOFSTEP]\nreplace hd : DiffContOnCl ℂ (fun w => g ε w • f w) (Ioo (-R) R ×ℂ Ioo (a - b) (a + b))\n[GOAL]\ncase hd\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nC✝ : ℝ\nf g✝ : ℂ → E\nz : ℂ\nC : ℝ\nhC₀ : 0 < C\na b : ℝ\nhza : a - b < z.im\nhle_a : ∀ (z : ℂ), z.im = a - b → ‖f z‖ ≤ C\nhzb : z.im < a + b\nhle_b : ∀ (z : ℂ), z.im = a + b → ‖f z‖ ≤ C\nhfd : DiffContOnCl ℂ f (im ⁻¹' Ioo (a - b) (a + b))\nhab : a - b < a + b\nhb : 0 < b\nhπb : 0 < π / 2 / b\nc : ℝ\nhc : c < π / 2 / b\nB : ℝ\nhO : f =O[comap (Abs.abs ∘ re) atTop ⊓ 𝓟 (im ⁻¹' Ioo (a - b) (a + b))] fun z => expR (B * expR (c * |z.re|))\nd : ℝ\nhd : d < π / 2 / b\nhcd : c < d\nhd₀ : 0 < d\nhb' : d * b < π / 2\naff : ℂ → ℂ := fun w => ↑d * (w - ↑a * I)\ng : ℝ → ℂ → ℂ := fun ε w => exp (↑ε * (exp (aff w) + exp (-aff w)))\nε : ℝ\nε₀ : ε < 0\nδ : ℝ\nδ₀ : δ < 0\nhδ : ∀ ⦃w : ℂ⦄, w.im ∈ Icc (a - b) (a + b) → ↑Complex.abs (g ε w) ≤ expR (δ * expR (d * |w.re|))\nhg₁ : ∀ (w : ℂ), w.im = a - b ∨ w.im = a + b → ↑Complex.abs (g ε w) ≤ 1\nR : ℝ\nhzR : |z.re| < R\nhR : ∀ (w : ℂ), |w.re| = R → w.im ∈ Ioo (a - b) (a + b) → ‖g ε w • f w‖ ≤ C\nhR₀ : 0 < R\nhgd : Differentiable ℂ (g ε)\n⊢ DiffContOnCl ℂ (fun w => g ε w • f w) (Ioo (-R) R ×ℂ Ioo (a - b) (a + b))\ncase h.intro.intro.intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nC✝ : ℝ\nf g✝ : ℂ → E\nz : ℂ\nC : ℝ\nhC₀ : 0 < C\na b : ℝ\nhza : a - b < z.im\nhle_a : ∀ (z : ℂ), z.im = a - b → ‖f z‖ ≤ C\nhzb : z.im < a + b\nhle_b : ∀ (z : ℂ), z.im = a + b → ‖f z‖ ≤ C\nhfd : DiffContOnCl ℂ f (im ⁻¹' Ioo (a - b) (a + b))\nhab : a - b < a + b\nhb : 0 < b\nhπb : 0 < π / 2 / b\nc : ℝ\nhc : c < π / 2 / b\nB : ℝ\nhO : f =O[comap (Abs.abs ∘ re) atTop ⊓ 𝓟 (im ⁻¹' Ioo (a - b) (a + b))] fun z => expR (B * expR (c * |z.re|))\nd : ℝ\nhcd : c < d\nhd₀ : 0 < d\nhb' : d * b < π / 2\naff : ℂ → ℂ := fun w => ↑d * (w - ↑a * I)\ng : ℝ → ℂ → ℂ := fun ε w => exp (↑ε * (exp (aff w) + exp (-aff w)))\nε : ℝ\nε₀ : ε < 0\nδ : ℝ\nδ₀ : δ < 0\nhδ : ∀ ⦃w : ℂ⦄, w.im ∈ Icc (a - b) (a + b) → ↑Complex.abs (g ε w) ≤ expR (δ * expR (d * |w.re|))\nhg₁ : ∀ (w : ℂ), w.im = a - b ∨ w.im = a + b → ↑Complex.abs (g ε w) ≤ 1\nR : ℝ\nhzR : |z.re| < R\nhR : ∀ (w : ℂ), |w.re| = R → w.im ∈ Ioo (a - b) (a + b) → ‖g ε w • f w‖ ≤ C\nhR₀ : 0 < R\nhgd : Differentiable ℂ (g ε)\nhd : DiffContOnCl ℂ (fun w => g ε w • f w) (Ioo (-R) R ×ℂ Ioo (a - b) (a + b))\n⊢ ‖exp (↑ε * (exp (↑d * (z - ↑a * I)) + exp (-(↑d * (z - ↑a * I))))) • f z‖ ≤ C\n[PROOFSTEP]\nexact (hgd.diffContOnCl.smul hfd).mono (inter_subset_right _ _)\n[GOAL]\ncase h.intro.intro.intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nC✝ : ℝ\nf g✝ : ℂ → E\nz : ℂ\nC : ℝ\nhC₀ : 0 < C\na b : ℝ\nhza : a - b < z.im\nhle_a : ∀ (z : ℂ), z.im = a - b → ‖f z‖ ≤ C\nhzb : z.im < a + b\nhle_b : ∀ (z : ℂ), z.im = a + b → ‖f z‖ ≤ C\nhfd : DiffContOnCl ℂ f (im ⁻¹' Ioo (a - b) (a + b))\nhab : a - b < a + b\nhb : 0 < b\nhπb : 0 < π / 2 / b\nc : ℝ\nhc : c < π / 2 / b\nB : ℝ\nhO : f =O[comap (Abs.abs ∘ re) atTop ⊓ 𝓟 (im ⁻¹' Ioo (a - b) (a + b))] fun z => expR (B * expR (c * |z.re|))\nd : ℝ\nhcd : c < d\nhd₀ : 0 < d\nhb' : d * b < π / 2\naff : ℂ → ℂ := fun w => ↑d * (w - ↑a * I)\ng : ℝ → ℂ → ℂ := fun ε w => exp (↑ε * (exp (aff w) + exp (-aff w)))\nε : ℝ\nε₀ : ε < 0\nδ : ℝ\nδ₀ : δ < 0\nhδ : ∀ ⦃w : ℂ⦄, w.im ∈ Icc (a - b) (a + b) → ↑Complex.abs (g ε w) ≤ expR (δ * expR (d * |w.re|))\nhg₁ : ∀ (w : ℂ), w.im = a - b ∨ w.im = a + b → ↑Complex.abs (g ε w) ≤ 1\nR : ℝ\nhzR : |z.re| < R\nhR : ∀ (w : ℂ), |w.re| = R → w.im ∈ Ioo (a - b) (a + b) → ‖g ε w • f w‖ ≤ C\nhR₀ : 0 < R\nhgd : Differentiable ℂ (g ε)\nhd : DiffContOnCl ℂ (fun w => g ε w • f w) (Ioo (-R) R ×ℂ Ioo (a - b) (a + b))\n⊢ ‖exp (↑ε * (exp (↑d * (z - ↑a * I)) + exp (-(↑d * (z - ↑a * I))))) • f z‖ ≤ C\n[PROOFSTEP]\nconvert norm_le_of_forall_mem_frontier_norm_le ((bounded_Ioo _ _).reProdIm (bounded_Ioo _ _)) hd (fun w hw => _) _\n[GOAL]\ncase h.intro.intro.intro.intro.convert_2\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nC✝ : ℝ\nf g✝ : ℂ → E\nz : ℂ\nC : ℝ\nhC₀ : 0 < C\na b : ℝ\nhza : a - b < z.im\nhle_a : ∀ (z : ℂ), z.im = a - b → ‖f z‖ ≤ C\nhzb : z.im < a + b\nhle_b : ∀ (z : ℂ), z.im = a + b → ‖f z‖ ≤ C\nhfd : DiffContOnCl ℂ f (im ⁻¹' Ioo (a - b) (a + b))\nhab : a - b < a + b\nhb : 0 < b\nhπb : 0 < π / 2 / b\nc : ℝ\nhc : c < π / 2 / b\nB : ℝ\nhO : f =O[comap (Abs.abs ∘ re) atTop ⊓ 𝓟 (im ⁻¹' Ioo (a - b) (a + b))] fun z => expR (B * expR (c * |z.re|))\nd : ℝ\nhcd : c < d\nhd₀ : 0 < d\nhb' : d * b < π / 2\naff : ℂ → ℂ := fun w => ↑d * (w - ↑a * I)\ng : ℝ → ℂ → ℂ := fun ε w => exp (↑ε * (exp (aff w) + exp (-aff w)))\nε : ℝ\nε₀ : ε < 0\nδ : ℝ\nδ₀ : δ < 0\nhδ : ∀ ⦃w : ℂ⦄, w.im ∈ Icc (a - b) (a + b) → ↑Complex.abs (g ε w) ≤ expR (δ * expR (d * |w.re|))\nhg₁ : ∀ (w : ℂ), w.im = a - b ∨ w.im = a + b → ↑Complex.abs (g ε w) ≤ 1\nR : ℝ\nhzR : |z.re| < R\nhR : ∀ (w : ℂ), |w.re| = R → w.im ∈ Ioo (a - b) (a + b) → ‖g ε w • f w‖ ≤ C\nhR₀ : 0 < R\nhgd : Differentiable ℂ (g ε)\nhd : DiffContOnCl ℂ (fun w => g ε w • f w) (Ioo (-R) R ×ℂ Ioo (a - b) (a + b))\nw : ℂ\nhw : w ∈ frontier (Ioo (-R) R ×ℂ Ioo (a - b) (a + b))\n⊢ ‖g ε w • f w‖ ≤ C\n[PROOFSTEP]\nrw [frontier_reProdIm, closure_Ioo (neg_lt_self hR₀).ne, frontier_Ioo hab, closure_Ioo hab.ne,\n  frontier_Ioo (neg_lt_self hR₀)] at hw \n[GOAL]\ncase h.intro.intro.intro.intro.convert_2\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nC✝ : ℝ\nf g✝ : ℂ → E\nz : ℂ\nC : ℝ\nhC₀ : 0 < C\na b : ℝ\nhza : a - b < z.im\nhle_a : ∀ (z : ℂ), z.im = a - b → ‖f z‖ ≤ C\nhzb : z.im < a + b\nhle_b : ∀ (z : ℂ), z.im = a + b → ‖f z‖ ≤ C\nhfd : DiffContOnCl ℂ f (im ⁻¹' Ioo (a - b) (a + b))\nhab : a - b < a + b\nhb : 0 < b\nhπb : 0 < π / 2 / b\nc : ℝ\nhc : c < π / 2 / b\nB : ℝ\nhO : f =O[comap (Abs.abs ∘ re) atTop ⊓ 𝓟 (im ⁻¹' Ioo (a - b) (a + b))] fun z => expR (B * expR (c * |z.re|))\nd : ℝ\nhcd : c < d\nhd₀ : 0 < d\nhb' : d * b < π / 2\naff : ℂ → ℂ := fun w => ↑d * (w - ↑a * I)\ng : ℝ → ℂ → ℂ := fun ε w => exp (↑ε * (exp (aff w) + exp (-aff w)))\nε : ℝ\nε₀ : ε < 0\nδ : ℝ\nδ₀ : δ < 0\nhδ : ∀ ⦃w : ℂ⦄, w.im ∈ Icc (a - b) (a + b) → ↑Complex.abs (g ε w) ≤ expR (δ * expR (d * |w.re|))\nhg₁ : ∀ (w : ℂ), w.im = a - b ∨ w.im = a + b → ↑Complex.abs (g ε w) ≤ 1\nR : ℝ\nhzR : |z.re| < R\nhR : ∀ (w : ℂ), |w.re| = R → w.im ∈ Ioo (a - b) (a + b) → ‖g ε w • f w‖ ≤ C\nhR₀ : 0 < R\nhgd : Differentiable ℂ (g ε)\nhd : DiffContOnCl ℂ (fun w => g ε w • f w) (Ioo (-R) R ×ℂ Ioo (a - b) (a + b))\nw : ℂ\nhw : w ∈ Icc (-R) R ×ℂ {a - b, a + b} ∪ {-R, R} ×ℂ Icc (a - b) (a + b)\n⊢ ‖g ε w • f w‖ ≤ C\n[PROOFSTEP]\nby_cases him : w.im = a - b ∨ w.im = a + b\n[GOAL]\ncase pos\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nC✝ : ℝ\nf g✝ : ℂ → E\nz : ℂ\nC : ℝ\nhC₀ : 0 < C\na b : ℝ\nhza : a - b < z.im\nhle_a : ∀ (z : ℂ), z.im = a - b → ‖f z‖ ≤ C\nhzb : z.im < a + b\nhle_b : ∀ (z : ℂ), z.im = a + b → ‖f z‖ ≤ C\nhfd : DiffContOnCl ℂ f (im ⁻¹' Ioo (a - b) (a + b))\nhab : a - b < a + b\nhb : 0 < b\nhπb : 0 < π / 2 / b\nc : ℝ\nhc : c < π / 2 / b\nB : ℝ\nhO : f =O[comap (Abs.abs ∘ re) atTop ⊓ 𝓟 (im ⁻¹' Ioo (a - b) (a + b))] fun z => expR (B * expR (c * |z.re|))\nd : ℝ\nhcd : c < d\nhd₀ : 0 < d\nhb' : d * b < π / 2\naff : ℂ → ℂ := fun w => ↑d * (w - ↑a * I)\ng : ℝ → ℂ → ℂ := fun ε w => exp (↑ε * (exp (aff w) + exp (-aff w)))\nε : ℝ\nε₀ : ε < 0\nδ : ℝ\nδ₀ : δ < 0\nhδ : ∀ ⦃w : ℂ⦄, w.im ∈ Icc (a - b) (a + b) → ↑Complex.abs (g ε w) ≤ expR (δ * expR (d * |w.re|))\nhg₁ : ∀ (w : ℂ), w.im = a - b ∨ w.im = a + b → ↑Complex.abs (g ε w) ≤ 1\nR : ℝ\nhzR : |z.re| < R\nhR : ∀ (w : ℂ), |w.re| = R → w.im ∈ Ioo (a - b) (a + b) → ‖g ε w • f w‖ ≤ C\nhR₀ : 0 < R\nhgd : Differentiable ℂ (g ε)\nhd : DiffContOnCl ℂ (fun w => g ε w • f w) (Ioo (-R) R ×ℂ Ioo (a - b) (a + b))\nw : ℂ\nhw : w ∈ Icc (-R) R ×ℂ {a - b, a + b} ∪ {-R, R} ×ℂ Icc (a - b) (a + b)\nhim : w.im = a - b ∨ w.im = a + b\n⊢ ‖g ε w • f w‖ ≤ C\n[PROOFSTEP]\nrw [norm_smul, ← one_mul C]\n[GOAL]\ncase pos\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nC✝ : ℝ\nf g✝ : ℂ → E\nz : ℂ\nC : ℝ\nhC₀ : 0 < C\na b : ℝ\nhza : a - b < z.im\nhle_a : ∀ (z : ℂ), z.im = a - b → ‖f z‖ ≤ C\nhzb : z.im < a + b\nhle_b : ∀ (z : ℂ), z.im = a + b → ‖f z‖ ≤ C\nhfd : DiffContOnCl ℂ f (im ⁻¹' Ioo (a - b) (a + b))\nhab : a - b < a + b\nhb : 0 < b\nhπb : 0 < π / 2 / b\nc : ℝ\nhc : c < π / 2 / b\nB : ℝ\nhO : f =O[comap (Abs.abs ∘ re) atTop ⊓ 𝓟 (im ⁻¹' Ioo (a - b) (a + b))] fun z => expR (B * expR (c * |z.re|))\nd : ℝ\nhcd : c < d\nhd₀ : 0 < d\nhb' : d * b < π / 2\naff : ℂ → ℂ := fun w => ↑d * (w - ↑a * I)\ng : ℝ → ℂ → ℂ := fun ε w => exp (↑ε * (exp (aff w) + exp (-aff w)))\nε : ℝ\nε₀ : ε < 0\nδ : ℝ\nδ₀ : δ < 0\nhδ : ∀ ⦃w : ℂ⦄, w.im ∈ Icc (a - b) (a + b) → ↑Complex.abs (g ε w) ≤ expR (δ * expR (d * |w.re|))\nhg₁ : ∀ (w : ℂ), w.im = a - b ∨ w.im = a + b → ↑Complex.abs (g ε w) ≤ 1\nR : ℝ\nhzR : |z.re| < R\nhR : ∀ (w : ℂ), |w.re| = R → w.im ∈ Ioo (a - b) (a + b) → ‖g ε w • f w‖ ≤ C\nhR₀ : 0 < R\nhgd : Differentiable ℂ (g ε)\nhd : DiffContOnCl ℂ (fun w => g ε w • f w) (Ioo (-R) R ×ℂ Ioo (a - b) (a + b))\nw : ℂ\nhw : w ∈ Icc (-R) R ×ℂ {a - b, a + b} ∪ {-R, R} ×ℂ Icc (a - b) (a + b)\nhim : w.im = a - b ∨ w.im = a + b\n⊢ ‖g ε w‖ * ‖f w‖ ≤ 1 * C\n[PROOFSTEP]\nexact mul_le_mul (hg₁ _ him) (him.by_cases (hle_a _) (hle_b _)) (norm_nonneg _) zero_le_one\n[GOAL]\ncase neg\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nC✝ : ℝ\nf g✝ : ℂ → E\nz : ℂ\nC : ℝ\nhC₀ : 0 < C\na b : ℝ\nhza : a - b < z.im\nhle_a : ∀ (z : ℂ), z.im = a - b → ‖f z‖ ≤ C\nhzb : z.im < a + b\nhle_b : ∀ (z : ℂ), z.im = a + b → ‖f z‖ ≤ C\nhfd : DiffContOnCl ℂ f (im ⁻¹' Ioo (a - b) (a + b))\nhab : a - b < a + b\nhb : 0 < b\nhπb : 0 < π / 2 / b\nc : ℝ\nhc : c < π / 2 / b\nB : ℝ\nhO : f =O[comap (Abs.abs ∘ re) atTop ⊓ 𝓟 (im ⁻¹' Ioo (a - b) (a + b))] fun z => expR (B * expR (c * |z.re|))\nd : ℝ\nhcd : c < d\nhd₀ : 0 < d\nhb' : d * b < π / 2\naff : ℂ → ℂ := fun w => ↑d * (w - ↑a * I)\ng : ℝ → ℂ → ℂ := fun ε w => exp (↑ε * (exp (aff w) + exp (-aff w)))\nε : ℝ\nε₀ : ε < 0\nδ : ℝ\nδ₀ : δ < 0\nhδ : ∀ ⦃w : ℂ⦄, w.im ∈ Icc (a - b) (a + b) → ↑Complex.abs (g ε w) ≤ expR (δ * expR (d * |w.re|))\nhg₁ : ∀ (w : ℂ), w.im = a - b ∨ w.im = a + b → ↑Complex.abs (g ε w) ≤ 1\nR : ℝ\nhzR : |z.re| < R\nhR : ∀ (w : ℂ), |w.re| = R → w.im ∈ Ioo (a - b) (a + b) → ‖g ε w • f w‖ ≤ C\nhR₀ : 0 < R\nhgd : Differentiable ℂ (g ε)\nhd : DiffContOnCl ℂ (fun w => g ε w • f w) (Ioo (-R) R ×ℂ Ioo (a - b) (a + b))\nw : ℂ\nhw : w ∈ Icc (-R) R ×ℂ {a - b, a + b} ∪ {-R, R} ×ℂ Icc (a - b) (a + b)\nhim : ¬(w.im = a - b ∨ w.im = a + b)\n⊢ ‖g ε w • f w‖ ≤ C\n[PROOFSTEP]\nreplace hw : w ∈ {-R, R} ×ℂ Icc (a - b) (a + b)\n[GOAL]\ncase hw\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nC✝ : ℝ\nf g✝ : ℂ → E\nz : ℂ\nC : ℝ\nhC₀ : 0 < C\na b : ℝ\nhza : a - b < z.im\nhle_a : ∀ (z : ℂ), z.im = a - b → ‖f z‖ ≤ C\nhzb : z.im < a + b\nhle_b : ∀ (z : ℂ), z.im = a + b → ‖f z‖ ≤ C\nhfd : DiffContOnCl ℂ f (im ⁻¹' Ioo (a - b) (a + b))\nhab : a - b < a + b\nhb : 0 < b\nhπb : 0 < π / 2 / b\nc : ℝ\nhc : c < π / 2 / b\nB : ℝ\nhO : f =O[comap (Abs.abs ∘ re) atTop ⊓ 𝓟 (im ⁻¹' Ioo (a - b) (a + b))] fun z => expR (B * expR (c * |z.re|))\nd : ℝ\nhcd : c < d\nhd₀ : 0 < d\nhb' : d * b < π / 2\naff : ℂ → ℂ := fun w => ↑d * (w - ↑a * I)\ng : ℝ → ℂ → ℂ := fun ε w => exp (↑ε * (exp (aff w) + exp (-aff w)))\nε : ℝ\nε₀ : ε < 0\nδ : ℝ\nδ₀ : δ < 0\nhδ : ∀ ⦃w : ℂ⦄, w.im ∈ Icc (a - b) (a + b) → ↑Complex.abs (g ε w) ≤ expR (δ * expR (d * |w.re|))\nhg₁ : ∀ (w : ℂ), w.im = a - b ∨ w.im = a + b → ↑Complex.abs (g ε w) ≤ 1\nR : ℝ\nhzR : |z.re| < R\nhR : ∀ (w : ℂ), |w.re| = R → w.im ∈ Ioo (a - b) (a + b) → ‖g ε w • f w‖ ≤ C\nhR₀ : 0 < R\nhgd : Differentiable ℂ (g ε)\nhd : DiffContOnCl ℂ (fun w => g ε w • f w) (Ioo (-R) R ×ℂ Ioo (a - b) (a + b))\nw : ℂ\nhw : w ∈ Icc (-R) R ×ℂ {a - b, a + b} ∪ {-R, R} ×ℂ Icc (a - b) (a + b)\nhim : ¬(w.im = a - b ∨ w.im = a + b)\n⊢ w ∈ {-R, R} ×ℂ Icc (a - b) (a + b)\ncase neg\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nC✝ : ℝ\nf g✝ : ℂ → E\nz : ℂ\nC : ℝ\nhC₀ : 0 < C\na b : ℝ\nhza : a - b < z.im\nhle_a : ∀ (z : ℂ), z.im = a - b → ‖f z‖ ≤ C\nhzb : z.im < a + b\nhle_b : ∀ (z : ℂ), z.im = a + b → ‖f z‖ ≤ C\nhfd : DiffContOnCl ℂ f (im ⁻¹' Ioo (a - b) (a + b))\nhab : a - b < a + b\nhb : 0 < b\nhπb : 0 < π / 2 / b\nc : ℝ\nhc : c < π / 2 / b\nB : ℝ\nhO : f =O[comap (Abs.abs ∘ re) atTop ⊓ 𝓟 (im ⁻¹' Ioo (a - b) (a + b))] fun z => expR (B * expR (c * |z.re|))\nd : ℝ\nhcd : c < d\nhd₀ : 0 < d\nhb' : d * b < π / 2\naff : ℂ → ℂ := fun w => ↑d * (w - ↑a * I)\ng : ℝ → ℂ → ℂ := fun ε w => exp (↑ε * (exp (aff w) + exp (-aff w)))\nε : ℝ\nε₀ : ε < 0\nδ : ℝ\nδ₀ : δ < 0\nhδ : ∀ ⦃w : ℂ⦄, w.im ∈ Icc (a - b) (a + b) → ↑Complex.abs (g ε w) ≤ expR (δ * expR (d * |w.re|))\nhg₁ : ∀ (w : ℂ), w.im = a - b ∨ w.im = a + b → ↑Complex.abs (g ε w) ≤ 1\nR : ℝ\nhzR : |z.re| < R\nhR : ∀ (w : ℂ), |w.re| = R → w.im ∈ Ioo (a - b) (a + b) → ‖g ε w • f w‖ ≤ C\nhR₀ : 0 < R\nhgd : Differentiable ℂ (g ε)\nhd : DiffContOnCl ℂ (fun w => g ε w • f w) (Ioo (-R) R ×ℂ Ioo (a - b) (a + b))\nw : ℂ\nhim : ¬(w.im = a - b ∨ w.im = a + b)\nhw : w ∈ {-R, R} ×ℂ Icc (a - b) (a + b)\n⊢ ‖g ε w • f w‖ ≤ C\n[PROOFSTEP]\nexact hw.resolve_left fun h => him h.2\n[GOAL]\ncase neg\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nC✝ : ℝ\nf g✝ : ℂ → E\nz : ℂ\nC : ℝ\nhC₀ : 0 < C\na b : ℝ\nhza : a - b < z.im\nhle_a : ∀ (z : ℂ), z.im = a - b → ‖f z‖ ≤ C\nhzb : z.im < a + b\nhle_b : ∀ (z : ℂ), z.im = a + b → ‖f z‖ ≤ C\nhfd : DiffContOnCl ℂ f (im ⁻¹' Ioo (a - b) (a + b))\nhab : a - b < a + b\nhb : 0 < b\nhπb : 0 < π / 2 / b\nc : ℝ\nhc : c < π / 2 / b\nB : ℝ\nhO : f =O[comap (Abs.abs ∘ re) atTop ⊓ 𝓟 (im ⁻¹' Ioo (a - b) (a + b))] fun z => expR (B * expR (c * |z.re|))\nd : ℝ\nhcd : c < d\nhd₀ : 0 < d\nhb' : d * b < π / 2\naff : ℂ → ℂ := fun w => ↑d * (w - ↑a * I)\ng : ℝ → ℂ → ℂ := fun ε w => exp (↑ε * (exp (aff w) + exp (-aff w)))\nε : ℝ\nε₀ : ε < 0\nδ : ℝ\nδ₀ : δ < 0\nhδ : ∀ ⦃w : ℂ⦄, w.im ∈ Icc (a - b) (a + b) → ↑Complex.abs (g ε w) ≤ expR (δ * expR (d * |w.re|))\nhg₁ : ∀ (w : ℂ), w.im = a - b ∨ w.im = a + b → ↑Complex.abs (g ε w) ≤ 1\nR : ℝ\nhzR : |z.re| < R\nhR : ∀ (w : ℂ), |w.re| = R → w.im ∈ Ioo (a - b) (a + b) → ‖g ε w • f w‖ ≤ C\nhR₀ : 0 < R\nhgd : Differentiable ℂ (g ε)\nhd : DiffContOnCl ℂ (fun w => g ε w • f w) (Ioo (-R) R ×ℂ Ioo (a - b) (a + b))\nw : ℂ\nhim : ¬(w.im = a - b ∨ w.im = a + b)\nhw : w ∈ {-R, R} ×ℂ Icc (a - b) (a + b)\n⊢ ‖g ε w • f w‖ ≤ C\n[PROOFSTEP]\nhave hw' := eq_endpoints_or_mem_Ioo_of_mem_Icc hw.2\n[GOAL]\ncase neg\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nC✝ : ℝ\nf g✝ : ℂ → E\nz : ℂ\nC : ℝ\nhC₀ : 0 < C\na b : ℝ\nhza : a - b < z.im\nhle_a : ∀ (z : ℂ), z.im = a - b → ‖f z‖ ≤ C\nhzb : z.im < a + b\nhle_b : ∀ (z : ℂ), z.im = a + b → ‖f z‖ ≤ C\nhfd : DiffContOnCl ℂ f (im ⁻¹' Ioo (a - b) (a + b))\nhab : a - b < a + b\nhb : 0 < b\nhπb : 0 < π / 2 / b\nc : ℝ\nhc : c < π / 2 / b\nB : ℝ\nhO : f =O[comap (Abs.abs ∘ re) atTop ⊓ 𝓟 (im ⁻¹' Ioo (a - b) (a + b))] fun z => expR (B * expR (c * |z.re|))\nd : ℝ\nhcd : c < d\nhd₀ : 0 < d\nhb' : d * b < π / 2\naff : ℂ → ℂ := fun w => ↑d * (w - ↑a * I)\ng : ℝ → ℂ → ℂ := fun ε w => exp (↑ε * (exp (aff w) + exp (-aff w)))\nε : ℝ\nε₀ : ε < 0\nδ : ℝ\nδ₀ : δ < 0\nhδ : ∀ ⦃w : ℂ⦄, w.im ∈ Icc (a - b) (a + b) → ↑Complex.abs (g ε w) ≤ expR (δ * expR (d * |w.re|))\nhg₁ : ∀ (w : ℂ), w.im = a - b ∨ w.im = a + b → ↑Complex.abs (g ε w) ≤ 1\nR : ℝ\nhzR : |z.re| < R\nhR : ∀ (w : ℂ), |w.re| = R → w.im ∈ Ioo (a - b) (a + b) → ‖g ε w • f w‖ ≤ C\nhR₀ : 0 < R\nhgd : Differentiable ℂ (g ε)\nhd : DiffContOnCl ℂ (fun w => g ε w • f w) (Ioo (-R) R ×ℂ Ioo (a - b) (a + b))\nw : ℂ\nhim : ¬(w.im = a - b ∨ w.im = a + b)\nhw : w ∈ {-R, R} ×ℂ Icc (a - b) (a + b)\nhw' : w.im = a - b ∨ w.im = a + b ∨ w.im ∈ Ioo (a - b) (a + b)\n⊢ ‖g ε w • f w‖ ≤ C\n[PROOFSTEP]\nrw [← or_assoc] at hw' \n[GOAL]\ncase neg\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nC✝ : ℝ\nf g✝ : ℂ → E\nz : ℂ\nC : ℝ\nhC₀ : 0 < C\na b : ℝ\nhza : a - b < z.im\nhle_a : ∀ (z : ℂ), z.im = a - b → ‖f z‖ ≤ C\nhzb : z.im < a + b\nhle_b : ∀ (z : ℂ), z.im = a + b → ‖f z‖ ≤ C\nhfd : DiffContOnCl ℂ f (im ⁻¹' Ioo (a - b) (a + b))\nhab : a - b < a + b\nhb : 0 < b\nhπb : 0 < π / 2 / b\nc : ℝ\nhc : c < π / 2 / b\nB : ℝ\nhO : f =O[comap (Abs.abs ∘ re) atTop ⊓ 𝓟 (im ⁻¹' Ioo (a - b) (a + b))] fun z => expR (B * expR (c * |z.re|))\nd : ℝ\nhcd : c < d\nhd₀ : 0 < d\nhb' : d * b < π / 2\naff : ℂ → ℂ := fun w => ↑d * (w - ↑a * I)\ng : ℝ → ℂ → ℂ := fun ε w => exp (↑ε * (exp (aff w) + exp (-aff w)))\nε : ℝ\nε₀ : ε < 0\nδ : ℝ\nδ₀ : δ < 0\nhδ : ∀ ⦃w : ℂ⦄, w.im ∈ Icc (a - b) (a + b) → ↑Complex.abs (g ε w) ≤ expR (δ * expR (d * |w.re|))\nhg₁ : ∀ (w : ℂ), w.im = a - b ∨ w.im = a + b → ↑Complex.abs (g ε w) ≤ 1\nR : ℝ\nhzR : |z.re| < R\nhR : ∀ (w : ℂ), |w.re| = R → w.im ∈ Ioo (a - b) (a + b) → ‖g ε w • f w‖ ≤ C\nhR₀ : 0 < R\nhgd : Differentiable ℂ (g ε)\nhd : DiffContOnCl ℂ (fun w => g ε w • f w) (Ioo (-R) R ×ℂ Ioo (a - b) (a + b))\nw : ℂ\nhim : ¬(w.im = a - b ∨ w.im = a + b)\nhw : w ∈ {-R, R} ×ℂ Icc (a - b) (a + b)\nhw' : (w.im = a - b ∨ w.im = a + b) ∨ w.im ∈ Ioo (a - b) (a + b)\n⊢ ‖g ε w • f w‖ ≤ C\n[PROOFSTEP]\nexact hR _ ((abs_eq hR₀.le).2 hw.1.symm) (hw'.resolve_left him)\n[GOAL]\ncase h.intro.intro.intro.intro.convert_4\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nC✝ : ℝ\nf g✝ : ℂ → E\nz : ℂ\nC : ℝ\nhC₀ : 0 < C\na b : ℝ\nhza : a - b < z.im\nhle_a : ∀ (z : ℂ), z.im = a - b → ‖f z‖ ≤ C\nhzb : z.im < a + b\nhle_b : ∀ (z : ℂ), z.im = a + b → ‖f z‖ ≤ C\nhfd : DiffContOnCl ℂ f (im ⁻¹' Ioo (a - b) (a + b))\nhab : a - b < a + b\nhb : 0 < b\nhπb : 0 < π / 2 / b\nc : ℝ\nhc : c < π / 2 / b\nB : ℝ\nhO : f =O[comap (Abs.abs ∘ re) atTop ⊓ 𝓟 (im ⁻¹' Ioo (a - b) (a + b))] fun z => expR (B * expR (c * |z.re|))\nd : ℝ\nhcd : c < d\nhd₀ : 0 < d\nhb' : d * b < π / 2\naff : ℂ → ℂ := fun w => ↑d * (w - ↑a * I)\ng : ℝ → ℂ → ℂ := fun ε w => exp (↑ε * (exp (aff w) + exp (-aff w)))\nε : ℝ\nε₀ : ε < 0\nδ : ℝ\nδ₀ : δ < 0\nhδ : ∀ ⦃w : ℂ⦄, w.im ∈ Icc (a - b) (a + b) → ↑Complex.abs (g ε w) ≤ expR (δ * expR (d * |w.re|))\nhg₁ : ∀ (w : ℂ), w.im = a - b ∨ w.im = a + b → ↑Complex.abs (g ε w) ≤ 1\nR : ℝ\nhzR : |z.re| < R\nhR : ∀ (w : ℂ), |w.re| = R → w.im ∈ Ioo (a - b) (a + b) → ‖g ε w • f w‖ ≤ C\nhR₀ : 0 < R\nhgd : Differentiable ℂ (g ε)\nhd : DiffContOnCl ℂ (fun w => g ε w • f w) (Ioo (-R) R ×ℂ Ioo (a - b) (a + b))\n⊢ z ∈ closure (Ioo (-R) R ×ℂ Ioo (a - b) (a + b))\n[PROOFSTEP]\nrw [closure_reProdIm, closure_Ioo hab.ne, closure_Ioo (neg_lt_self hR₀).ne]\n[GOAL]\ncase h.intro.intro.intro.intro.convert_4\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nC✝ : ℝ\nf g✝ : ℂ → E\nz : ℂ\nC : ℝ\nhC₀ : 0 < C\na b : ℝ\nhza : a - b < z.im\nhle_a : ∀ (z : ℂ), z.im = a - b → ‖f z‖ ≤ C\nhzb : z.im < a + b\nhle_b : ∀ (z : ℂ), z.im = a + b → ‖f z‖ ≤ C\nhfd : DiffContOnCl ℂ f (im ⁻¹' Ioo (a - b) (a + b))\nhab : a - b < a + b\nhb : 0 < b\nhπb : 0 < π / 2 / b\nc : ℝ\nhc : c < π / 2 / b\nB : ℝ\nhO : f =O[comap (Abs.abs ∘ re) atTop ⊓ 𝓟 (im ⁻¹' Ioo (a - b) (a + b))] fun z => expR (B * expR (c * |z.re|))\nd : ℝ\nhcd : c < d\nhd₀ : 0 < d\nhb' : d * b < π / 2\naff : ℂ → ℂ := fun w => ↑d * (w - ↑a * I)\ng : ℝ → ℂ → ℂ := fun ε w => exp (↑ε * (exp (aff w) + exp (-aff w)))\nε : ℝ\nε₀ : ε < 0\nδ : ℝ\nδ₀ : δ < 0\nhδ : ∀ ⦃w : ℂ⦄, w.im ∈ Icc (a - b) (a + b) → ↑Complex.abs (g ε w) ≤ expR (δ * expR (d * |w.re|))\nhg₁ : ∀ (w : ℂ), w.im = a - b ∨ w.im = a + b → ↑Complex.abs (g ε w) ≤ 1\nR : ℝ\nhzR : |z.re| < R\nhR : ∀ (w : ℂ), |w.re| = R → w.im ∈ Ioo (a - b) (a + b) → ‖g ε w • f w‖ ≤ C\nhR₀ : 0 < R\nhgd : Differentiable ℂ (g ε)\nhd : DiffContOnCl ℂ (fun w => g ε w • f w) (Ioo (-R) R ×ℂ Ioo (a - b) (a + b))\n⊢ z ∈ Icc (-R) R ×ℂ Icc (a - b) (a + b)\n[PROOFSTEP]\nexact ⟨abs_le.1 hzR.le, ⟨hza.le, hzb.le⟩⟩\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nz : ℂ\nhfd : DiffContOnCl ℂ f (re ⁻¹' Ioo a b)\nhB :\n  ∃ c,\n    c < π / (b - a) ∧ ∃ B, f =O[comap (Abs.abs ∘ im) atTop ⊓ 𝓟 (re ⁻¹' Ioo a b)] fun z => expR (B * expR (c * |z.im|))\nhle_a : ∀ (z : ℂ), z.re = a → ‖f z‖ ≤ C\nhle_b : ∀ (z : ℂ), z.re = b → ‖f z‖ ≤ C\nhza : a ≤ z.re\nhzb : z.re ≤ b\n⊢ ‖f z‖ ≤ C\n[PROOFSTEP]\nsuffices ‖f (z * I * -I)‖ ≤ C by simpa [mul_assoc] using this\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nz : ℂ\nhfd : DiffContOnCl ℂ f (re ⁻¹' Ioo a b)\nhB :\n  ∃ c,\n    c < π / (b - a) ∧ ∃ B, f =O[comap (Abs.abs ∘ im) atTop ⊓ 𝓟 (re ⁻¹' Ioo a b)] fun z => expR (B * expR (c * |z.im|))\nhle_a : ∀ (z : ℂ), z.re = a → ‖f z‖ ≤ C\nhle_b : ∀ (z : ℂ), z.re = b → ‖f z‖ ≤ C\nhza : a ≤ z.re\nhzb : z.re ≤ b\nthis : ‖f (z * I * -I)‖ ≤ C\n⊢ ‖f z‖ ≤ C\n[PROOFSTEP]\nsimpa [mul_assoc] using this\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nz : ℂ\nhfd : DiffContOnCl ℂ f (re ⁻¹' Ioo a b)\nhB :\n  ∃ c,\n    c < π / (b - a) ∧ ∃ B, f =O[comap (Abs.abs ∘ im) atTop ⊓ 𝓟 (re ⁻¹' Ioo a b)] fun z => expR (B * expR (c * |z.im|))\nhle_a : ∀ (z : ℂ), z.re = a → ‖f z‖ ≤ C\nhle_b : ∀ (z : ℂ), z.re = b → ‖f z‖ ≤ C\nhza : a ≤ z.re\nhzb : z.re ≤ b\n⊢ ‖f (z * I * -I)‖ ≤ C\n[PROOFSTEP]\nhave H : MapsTo (· * -I) (im ⁻¹' Ioo a b) (re ⁻¹' Ioo a b) := fun z hz ↦ by simpa using hz\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nz✝ : ℂ\nhfd : DiffContOnCl ℂ f (re ⁻¹' Ioo a b)\nhB :\n  ∃ c,\n    c < π / (b - a) ∧ ∃ B, f =O[comap (Abs.abs ∘ im) atTop ⊓ 𝓟 (re ⁻¹' Ioo a b)] fun z => expR (B * expR (c * |z.im|))\nhle_a : ∀ (z : ℂ), z.re = a → ‖f z‖ ≤ C\nhle_b : ∀ (z : ℂ), z.re = b → ‖f z‖ ≤ C\nhza : a ≤ z✝.re\nhzb : z✝.re ≤ b\nz : ℂ\nhz : z ∈ im ⁻¹' Ioo a b\n⊢ (fun x => x * -I) z ∈ re ⁻¹' Ioo a b\n[PROOFSTEP]\nsimpa using hz\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nz : ℂ\nhfd : DiffContOnCl ℂ f (re ⁻¹' Ioo a b)\nhB :\n  ∃ c,\n    c < π / (b - a) ∧ ∃ B, f =O[comap (Abs.abs ∘ im) atTop ⊓ 𝓟 (re ⁻¹' Ioo a b)] fun z => expR (B * expR (c * |z.im|))\nhle_a : ∀ (z : ℂ), z.re = a → ‖f z‖ ≤ C\nhle_b : ∀ (z : ℂ), z.re = b → ‖f z‖ ≤ C\nhza : a ≤ z.re\nhzb : z.re ≤ b\nH : MapsTo (fun x => x * -I) (im ⁻¹' Ioo a b) (re ⁻¹' Ioo a b)\n⊢ ‖f (z * I * -I)‖ ≤ C\n[PROOFSTEP]\nrefine'\n  horizontal_strip (f := fun z ↦ f (z * -I)) (hfd.comp (differentiable_id.mul_const _).diffContOnCl H) _\n    (fun z hz => hle_a _ _) (fun z hz => hle_b _ _) _ _\n[GOAL]\ncase refine'_1\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nz : ℂ\nhfd : DiffContOnCl ℂ f (re ⁻¹' Ioo a b)\nhB :\n  ∃ c,\n    c < π / (b - a) ∧ ∃ B, f =O[comap (Abs.abs ∘ im) atTop ⊓ 𝓟 (re ⁻¹' Ioo a b)] fun z => expR (B * expR (c * |z.im|))\nhle_a : ∀ (z : ℂ), z.re = a → ‖f z‖ ≤ C\nhle_b : ∀ (z : ℂ), z.re = b → ‖f z‖ ≤ C\nhza : a ≤ z.re\nhzb : z.re ≤ b\nH : MapsTo (fun x => x * -I) (im ⁻¹' Ioo a b) (re ⁻¹' Ioo a b)\n⊢ ∃ c,\n    c < π / (b - a) ∧\n      ∃ B,\n        (fun z => f (z * -I)) =O[comap (Abs.abs ∘ re) atTop ⊓ 𝓟 (im ⁻¹' Ioo a b)] fun z => expR (B * expR (c * |z.re|))\n[PROOFSTEP]\nrcases hB with ⟨c, hc, B, hO⟩\n[GOAL]\ncase refine'_1.intro.intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nz : ℂ\nhfd : DiffContOnCl ℂ f (re ⁻¹' Ioo a b)\nhle_a : ∀ (z : ℂ), z.re = a → ‖f z‖ ≤ C\nhle_b : ∀ (z : ℂ), z.re = b → ‖f z‖ ≤ C\nhza : a ≤ z.re\nhzb : z.re ≤ b\nH : MapsTo (fun x => x * -I) (im ⁻¹' Ioo a b) (re ⁻¹' Ioo a b)\nc : ℝ\nhc : c < π / (b - a)\nB : ℝ\nhO : f =O[comap (Abs.abs ∘ im) atTop ⊓ 𝓟 (re ⁻¹' Ioo a b)] fun z => expR (B * expR (c * |z.im|))\n⊢ ∃ c,\n    c < π / (b - a) ∧\n      ∃ B,\n        (fun z => f (z * -I)) =O[comap (Abs.abs ∘ re) atTop ⊓ 𝓟 (im ⁻¹' Ioo a b)] fun z => expR (B * expR (c * |z.re|))\n[PROOFSTEP]\nrefine ⟨c, hc, B, ?_⟩\n[GOAL]\ncase refine'_1.intro.intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nz : ℂ\nhfd : DiffContOnCl ℂ f (re ⁻¹' Ioo a b)\nhle_a : ∀ (z : ℂ), z.re = a → ‖f z‖ ≤ C\nhle_b : ∀ (z : ℂ), z.re = b → ‖f z‖ ≤ C\nhza : a ≤ z.re\nhzb : z.re ≤ b\nH : MapsTo (fun x => x * -I) (im ⁻¹' Ioo a b) (re ⁻¹' Ioo a b)\nc : ℝ\nhc : c < π / (b - a)\nB : ℝ\nhO : f =O[comap (Abs.abs ∘ im) atTop ⊓ 𝓟 (re ⁻¹' Ioo a b)] fun z => expR (B * expR (c * |z.im|))\n⊢ (fun z => f (z * -I)) =O[comap (Abs.abs ∘ re) atTop ⊓ 𝓟 (im ⁻¹' Ioo a b)] fun z => expR (B * expR (c * |z.re|))\n[PROOFSTEP]\nhave : Tendsto (· * -I) (comap (|re ·|) atTop ⊓ 𝓟 (im ⁻¹' Ioo a b)) (comap (|im ·|) atTop ⊓ 𝓟 (re ⁻¹' Ioo a b)) :=\n  by\n  refine' (tendsto_comap_iff.2 _).inf H.tendsto\n  simpa [(· ∘ ·)] using tendsto_comap\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nz : ℂ\nhfd : DiffContOnCl ℂ f (re ⁻¹' Ioo a b)\nhle_a : ∀ (z : ℂ), z.re = a → ‖f z‖ ≤ C\nhle_b : ∀ (z : ℂ), z.re = b → ‖f z‖ ≤ C\nhza : a ≤ z.re\nhzb : z.re ≤ b\nH : MapsTo (fun x => x * -I) (im ⁻¹' Ioo a b) (re ⁻¹' Ioo a b)\nc : ℝ\nhc : c < π / (b - a)\nB : ℝ\nhO : f =O[comap (Abs.abs ∘ im) atTop ⊓ 𝓟 (re ⁻¹' Ioo a b)] fun z => expR (B * expR (c * |z.im|))\n⊢ Tendsto (fun x => x * -I) (comap (fun x => |x.re|) atTop ⊓ 𝓟 (im ⁻¹' Ioo a b))\n    (comap (fun x => |x.im|) atTop ⊓ 𝓟 (re ⁻¹' Ioo a b))\n[PROOFSTEP]\nrefine' (tendsto_comap_iff.2 _).inf H.tendsto\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nz : ℂ\nhfd : DiffContOnCl ℂ f (re ⁻¹' Ioo a b)\nhle_a : ∀ (z : ℂ), z.re = a → ‖f z‖ ≤ C\nhle_b : ∀ (z : ℂ), z.re = b → ‖f z‖ ≤ C\nhza : a ≤ z.re\nhzb : z.re ≤ b\nH : MapsTo (fun x => x * -I) (im ⁻¹' Ioo a b) (re ⁻¹' Ioo a b)\nc : ℝ\nhc : c < π / (b - a)\nB : ℝ\nhO : f =O[comap (Abs.abs ∘ im) atTop ⊓ 𝓟 (re ⁻¹' Ioo a b)] fun z => expR (B * expR (c * |z.im|))\n⊢ Tendsto ((fun x => |x.im|) ∘ fun x => x * -I) (comap (fun x => |x.re|) atTop) atTop\n[PROOFSTEP]\nsimpa [(· ∘ ·)] using tendsto_comap\n[GOAL]\ncase refine'_1.intro.intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nz : ℂ\nhfd : DiffContOnCl ℂ f (re ⁻¹' Ioo a b)\nhle_a : ∀ (z : ℂ), z.re = a → ‖f z‖ ≤ C\nhle_b : ∀ (z : ℂ), z.re = b → ‖f z‖ ≤ C\nhza : a ≤ z.re\nhzb : z.re ≤ b\nH : MapsTo (fun x => x * -I) (im ⁻¹' Ioo a b) (re ⁻¹' Ioo a b)\nc : ℝ\nhc : c < π / (b - a)\nB : ℝ\nhO : f =O[comap (Abs.abs ∘ im) atTop ⊓ 𝓟 (re ⁻¹' Ioo a b)] fun z => expR (B * expR (c * |z.im|))\nthis :\n  Tendsto (fun x => x * -I) (comap (fun x => |x.re|) atTop ⊓ 𝓟 (im ⁻¹' Ioo a b))\n    (comap (fun x => |x.im|) atTop ⊓ 𝓟 (re ⁻¹' Ioo a b))\n⊢ (fun z => f (z * -I)) =O[comap (Abs.abs ∘ re) atTop ⊓ 𝓟 (im ⁻¹' Ioo a b)] fun z => expR (B * expR (c * |z.re|))\n[PROOFSTEP]\nsimpa [(· ∘ ·)] using hO.comp_tendsto this\n[GOAL]\ncase refine'_2\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nz✝ : ℂ\nhfd : DiffContOnCl ℂ f (re ⁻¹' Ioo a b)\nhB :\n  ∃ c,\n    c < π / (b - a) ∧ ∃ B, f =O[comap (Abs.abs ∘ im) atTop ⊓ 𝓟 (re ⁻¹' Ioo a b)] fun z => expR (B * expR (c * |z.im|))\nhle_a : ∀ (z : ℂ), z.re = a → ‖f z‖ ≤ C\nhle_b : ∀ (z : ℂ), z.re = b → ‖f z‖ ≤ C\nhza : a ≤ z✝.re\nhzb : z✝.re ≤ b\nH : MapsTo (fun x => x * -I) (im ⁻¹' Ioo a b) (re ⁻¹' Ioo a b)\nz : ℂ\nhz : z.im = a\n⊢ (z * -I).re = a\ncase refine'_3\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nz✝ : ℂ\nhfd : DiffContOnCl ℂ f (re ⁻¹' Ioo a b)\nhB :\n  ∃ c,\n    c < π / (b - a) ∧ ∃ B, f =O[comap (Abs.abs ∘ im) atTop ⊓ 𝓟 (re ⁻¹' Ioo a b)] fun z => expR (B * expR (c * |z.im|))\nhle_a : ∀ (z : ℂ), z.re = a → ‖f z‖ ≤ C\nhle_b : ∀ (z : ℂ), z.re = b → ‖f z‖ ≤ C\nhza : a ≤ z✝.re\nhzb : z✝.re ≤ b\nH : MapsTo (fun x => x * -I) (im ⁻¹' Ioo a b) (re ⁻¹' Ioo a b)\nz : ℂ\nhz : z.im = b\n⊢ (z * -I).re = b\ncase refine'_4\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nz : ℂ\nhfd : DiffContOnCl ℂ f (re ⁻¹' Ioo a b)\nhB :\n  ∃ c,\n    c < π / (b - a) ∧ ∃ B, f =O[comap (Abs.abs ∘ im) atTop ⊓ 𝓟 (re ⁻¹' Ioo a b)] fun z => expR (B * expR (c * |z.im|))\nhle_a : ∀ (z : ℂ), z.re = a → ‖f z‖ ≤ C\nhle_b : ∀ (z : ℂ), z.re = b → ‖f z‖ ≤ C\nhza : a ≤ z.re\nhzb : z.re ≤ b\nH : MapsTo (fun x => x * -I) (im ⁻¹' Ioo a b) (re ⁻¹' Ioo a b)\n⊢ a ≤ (z * I).im\ncase refine'_5\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nz : ℂ\nhfd : DiffContOnCl ℂ f (re ⁻¹' Ioo a b)\nhB :\n  ∃ c,\n    c < π / (b - a) ∧ ∃ B, f =O[comap (Abs.abs ∘ im) atTop ⊓ 𝓟 (re ⁻¹' Ioo a b)] fun z => expR (B * expR (c * |z.im|))\nhle_a : ∀ (z : ℂ), z.re = a → ‖f z‖ ≤ C\nhle_b : ∀ (z : ℂ), z.re = b → ‖f z‖ ≤ C\nhza : a ≤ z.re\nhzb : z.re ≤ b\nH : MapsTo (fun x => x * -I) (im ⁻¹' Ioo a b) (re ⁻¹' Ioo a b)\n⊢ (z * I).im ≤ b\n[PROOFSTEP]\nall_goals simpa\n[GOAL]\ncase refine'_2\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nz✝ : ℂ\nhfd : DiffContOnCl ℂ f (re ⁻¹' Ioo a b)\nhB :\n  ∃ c,\n    c < π / (b - a) ∧ ∃ B, f =O[comap (Abs.abs ∘ im) atTop ⊓ 𝓟 (re ⁻¹' Ioo a b)] fun z => expR (B * expR (c * |z.im|))\nhle_a : ∀ (z : ℂ), z.re = a → ‖f z‖ ≤ C\nhle_b : ∀ (z : ℂ), z.re = b → ‖f z‖ ≤ C\nhza : a ≤ z✝.re\nhzb : z✝.re ≤ b\nH : MapsTo (fun x => x * -I) (im ⁻¹' Ioo a b) (re ⁻¹' Ioo a b)\nz : ℂ\nhz : z.im = a\n⊢ (z * -I).re = a\n[PROOFSTEP]\nsimpa\n[GOAL]\ncase refine'_3\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nz✝ : ℂ\nhfd : DiffContOnCl ℂ f (re ⁻¹' Ioo a b)\nhB :\n  ∃ c,\n    c < π / (b - a) ∧ ∃ B, f =O[comap (Abs.abs ∘ im) atTop ⊓ 𝓟 (re ⁻¹' Ioo a b)] fun z => expR (B * expR (c * |z.im|))\nhle_a : ∀ (z : ℂ), z.re = a → ‖f z‖ ≤ C\nhle_b : ∀ (z : ℂ), z.re = b → ‖f z‖ ≤ C\nhza : a ≤ z✝.re\nhzb : z✝.re ≤ b\nH : MapsTo (fun x => x * -I) (im ⁻¹' Ioo a b) (re ⁻¹' Ioo a b)\nz : ℂ\nhz : z.im = b\n⊢ (z * -I).re = b\n[PROOFSTEP]\nsimpa\n[GOAL]\ncase refine'_4\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nz : ℂ\nhfd : DiffContOnCl ℂ f (re ⁻¹' Ioo a b)\nhB :\n  ∃ c,\n    c < π / (b - a) ∧ ∃ B, f =O[comap (Abs.abs ∘ im) atTop ⊓ 𝓟 (re ⁻¹' Ioo a b)] fun z => expR (B * expR (c * |z.im|))\nhle_a : ∀ (z : ℂ), z.re = a → ‖f z‖ ≤ C\nhle_b : ∀ (z : ℂ), z.re = b → ‖f z‖ ≤ C\nhza : a ≤ z.re\nhzb : z.re ≤ b\nH : MapsTo (fun x => x * -I) (im ⁻¹' Ioo a b) (re ⁻¹' Ioo a b)\n⊢ a ≤ (z * I).im\n[PROOFSTEP]\nsimpa\n[GOAL]\ncase refine'_5\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nz : ℂ\nhfd : DiffContOnCl ℂ f (re ⁻¹' Ioo a b)\nhB :\n  ∃ c,\n    c < π / (b - a) ∧ ∃ B, f =O[comap (Abs.abs ∘ im) atTop ⊓ 𝓟 (re ⁻¹' Ioo a b)] fun z => expR (B * expR (c * |z.im|))\nhle_a : ∀ (z : ℂ), z.re = a → ‖f z‖ ≤ C\nhle_b : ∀ (z : ℂ), z.re = b → ‖f z‖ ≤ C\nhza : a ≤ z.re\nhzb : z.re ≤ b\nH : MapsTo (fun x => x * -I) (im ⁻¹' Ioo a b) (re ⁻¹' Ioo a b)\n⊢ (z * I).im ≤ b\n[PROOFSTEP]\nsimpa\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nz : ℂ\nhd : DiffContOnCl ℂ f (Ioi 0 ×ℂ Ioi 0)\nhB : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 (Ioi 0 ×ℂ Ioi 0)] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : ∀ (x : ℝ), 0 ≤ x → ‖f ↑x‖ ≤ C\nhim : ∀ (x : ℝ), 0 ≤ x → ‖f (↑x * I)‖ ≤ C\nhz_re : 0 ≤ z.re\nhz_im : 0 ≤ z.im\n⊢ ‖f z‖ ≤ C\n[PROOFSTEP]\nrcases eq_or_ne z 0 with (rfl | hzne)\n[GOAL]\ncase inl\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f (Ioi 0 ×ℂ Ioi 0)\nhB : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 (Ioi 0 ×ℂ Ioi 0)] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : ∀ (x : ℝ), 0 ≤ x → ‖f ↑x‖ ≤ C\nhim : ∀ (x : ℝ), 0 ≤ x → ‖f (↑x * I)‖ ≤ C\nhz_re : 0 ≤ 0.re\nhz_im : 0 ≤ 0.im\n⊢ ‖f 0‖ ≤ C\n[PROOFSTEP]\nexact hre 0 le_rfl\n[GOAL]\ncase inr\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nz : ℂ\nhd : DiffContOnCl ℂ f (Ioi 0 ×ℂ Ioi 0)\nhB : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 (Ioi 0 ×ℂ Ioi 0)] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : ∀ (x : ℝ), 0 ≤ x → ‖f ↑x‖ ≤ C\nhim : ∀ (x : ℝ), 0 ≤ x → ‖f (↑x * I)‖ ≤ C\nhz_re : 0 ≤ z.re\nhz_im : 0 ≤ z.im\nhzne : z ≠ 0\n⊢ ‖f z‖ ≤ C\n[PROOFSTEP]\nobtain ⟨ζ, hζ, rfl⟩ : ∃ ζ : ℂ, ζ.im ∈ Icc 0 (π / 2) ∧ exp ζ = z :=\n  by\n  refine' ⟨log z, _, exp_log hzne⟩\n  rw [log_im]\n  exact\n    ⟨arg_nonneg_iff.2 hz_im, arg_le_pi_div_two_iff.2 (Or.inl hz_re)⟩\n      -- porting note: failed to clear `clear hz_re hz_im hzne`\n        -- We are going to apply `PhragmenLindelof.horizontal_strip` to `f ∘ Complex.exp` and `ζ`.\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nz : ℂ\nhd : DiffContOnCl ℂ f (Ioi 0 ×ℂ Ioi 0)\nhB : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 (Ioi 0 ×ℂ Ioi 0)] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : ∀ (x : ℝ), 0 ≤ x → ‖f ↑x‖ ≤ C\nhim : ∀ (x : ℝ), 0 ≤ x → ‖f (↑x * I)‖ ≤ C\nhz_re : 0 ≤ z.re\nhz_im : 0 ≤ z.im\nhzne : z ≠ 0\n⊢ ∃ ζ, ζ.im ∈ Icc 0 (π / 2) ∧ exp ζ = z\n[PROOFSTEP]\nrefine' ⟨log z, _, exp_log hzne⟩\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nz : ℂ\nhd : DiffContOnCl ℂ f (Ioi 0 ×ℂ Ioi 0)\nhB : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 (Ioi 0 ×ℂ Ioi 0)] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : ∀ (x : ℝ), 0 ≤ x → ‖f ↑x‖ ≤ C\nhim : ∀ (x : ℝ), 0 ≤ x → ‖f (↑x * I)‖ ≤ C\nhz_re : 0 ≤ z.re\nhz_im : 0 ≤ z.im\nhzne : z ≠ 0\n⊢ (log z).im ∈ Icc 0 (π / 2)\n[PROOFSTEP]\nrw [log_im]\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nz : ℂ\nhd : DiffContOnCl ℂ f (Ioi 0 ×ℂ Ioi 0)\nhB : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 (Ioi 0 ×ℂ Ioi 0)] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : ∀ (x : ℝ), 0 ≤ x → ‖f ↑x‖ ≤ C\nhim : ∀ (x : ℝ), 0 ≤ x → ‖f (↑x * I)‖ ≤ C\nhz_re : 0 ≤ z.re\nhz_im : 0 ≤ z.im\nhzne : z ≠ 0\n⊢ arg z ∈ Icc 0 (π / 2)\n[PROOFSTEP]\nexact\n  ⟨arg_nonneg_iff.2 hz_im, arg_le_pi_div_two_iff.2 (Or.inl hz_re)⟩\n    -- porting note: failed to clear `clear hz_re hz_im hzne`\n      -- We are going to apply `PhragmenLindelof.horizontal_strip` to `f ∘ Complex.exp` and `ζ`.\n[GOAL]\ncase inr.intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f (Ioi 0 ×ℂ Ioi 0)\nhB : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 (Ioi 0 ×ℂ Ioi 0)] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : ∀ (x : ℝ), 0 ≤ x → ‖f ↑x‖ ≤ C\nhim : ∀ (x : ℝ), 0 ≤ x → ‖f (↑x * I)‖ ≤ C\nζ : ℂ\nhζ : ζ.im ∈ Icc 0 (π / 2)\nhz_re : 0 ≤ (exp ζ).re\nhz_im : 0 ≤ (exp ζ).im\nhzne : exp ζ ≠ 0\n⊢ ‖f (exp ζ)‖ ≤ C\n[PROOFSTEP]\nchange ‖(f ∘ exp) ζ‖ ≤ C\n[GOAL]\ncase inr.intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f (Ioi 0 ×ℂ Ioi 0)\nhB : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 (Ioi 0 ×ℂ Ioi 0)] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : ∀ (x : ℝ), 0 ≤ x → ‖f ↑x‖ ≤ C\nhim : ∀ (x : ℝ), 0 ≤ x → ‖f (↑x * I)‖ ≤ C\nζ : ℂ\nhζ : ζ.im ∈ Icc 0 (π / 2)\nhz_re : 0 ≤ (exp ζ).re\nhz_im : 0 ≤ (exp ζ).im\nhzne : exp ζ ≠ 0\n⊢ ‖(f ∘ exp) ζ‖ ≤ C\n[PROOFSTEP]\nhave H : MapsTo exp (im ⁻¹' Ioo 0 (π / 2)) (Ioi 0 ×ℂ Ioi 0) := fun z hz ↦\n  by\n  rw [mem_reProdIm, exp_re, exp_im, mem_Ioi, mem_Ioi]\n  have : 0 < Real.cos z.im := Real.cos_pos_of_mem_Ioo ⟨by linarith [hz.1, hz.2], hz.2⟩\n  have : 0 < Real.sin z.im := Real.sin_pos_of_mem_Ioo ⟨hz.1, hz.2.trans (half_lt_self Real.pi_pos)⟩\n  constructor <;> positivity\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f (Ioi 0 ×ℂ Ioi 0)\nhB : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 (Ioi 0 ×ℂ Ioi 0)] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : ∀ (x : ℝ), 0 ≤ x → ‖f ↑x‖ ≤ C\nhim : ∀ (x : ℝ), 0 ≤ x → ‖f (↑x * I)‖ ≤ C\nζ : ℂ\nhζ : ζ.im ∈ Icc 0 (π / 2)\nhz_re : 0 ≤ (exp ζ).re\nhz_im : 0 ≤ (exp ζ).im\nhzne : exp ζ ≠ 0\nz : ℂ\nhz : z ∈ im ⁻¹' Ioo 0 (π / 2)\n⊢ exp z ∈ Ioi 0 ×ℂ Ioi 0\n[PROOFSTEP]\nrw [mem_reProdIm, exp_re, exp_im, mem_Ioi, mem_Ioi]\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f (Ioi 0 ×ℂ Ioi 0)\nhB : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 (Ioi 0 ×ℂ Ioi 0)] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : ∀ (x : ℝ), 0 ≤ x → ‖f ↑x‖ ≤ C\nhim : ∀ (x : ℝ), 0 ≤ x → ‖f (↑x * I)‖ ≤ C\nζ : ℂ\nhζ : ζ.im ∈ Icc 0 (π / 2)\nhz_re : 0 ≤ (exp ζ).re\nhz_im : 0 ≤ (exp ζ).im\nhzne : exp ζ ≠ 0\nz : ℂ\nhz : z ∈ im ⁻¹' Ioo 0 (π / 2)\n⊢ 0 < expR z.re * Real.cos z.im ∧ 0 < expR z.re * Real.sin z.im\n[PROOFSTEP]\nhave : 0 < Real.cos z.im := Real.cos_pos_of_mem_Ioo ⟨by linarith [hz.1, hz.2], hz.2⟩\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f (Ioi 0 ×ℂ Ioi 0)\nhB : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 (Ioi 0 ×ℂ Ioi 0)] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : ∀ (x : ℝ), 0 ≤ x → ‖f ↑x‖ ≤ C\nhim : ∀ (x : ℝ), 0 ≤ x → ‖f (↑x * I)‖ ≤ C\nζ : ℂ\nhζ : ζ.im ∈ Icc 0 (π / 2)\nhz_re : 0 ≤ (exp ζ).re\nhz_im : 0 ≤ (exp ζ).im\nhzne : exp ζ ≠ 0\nz : ℂ\nhz : z ∈ im ⁻¹' Ioo 0 (π / 2)\n⊢ -(π / 2) < z.im\n[PROOFSTEP]\nlinarith [hz.1, hz.2]\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f (Ioi 0 ×ℂ Ioi 0)\nhB : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 (Ioi 0 ×ℂ Ioi 0)] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : ∀ (x : ℝ), 0 ≤ x → ‖f ↑x‖ ≤ C\nhim : ∀ (x : ℝ), 0 ≤ x → ‖f (↑x * I)‖ ≤ C\nζ : ℂ\nhζ : ζ.im ∈ Icc 0 (π / 2)\nhz_re : 0 ≤ (exp ζ).re\nhz_im : 0 ≤ (exp ζ).im\nhzne : exp ζ ≠ 0\nz : ℂ\nhz : z ∈ im ⁻¹' Ioo 0 (π / 2)\nthis : 0 < Real.cos z.im\n⊢ 0 < expR z.re * Real.cos z.im ∧ 0 < expR z.re * Real.sin z.im\n[PROOFSTEP]\nhave : 0 < Real.sin z.im := Real.sin_pos_of_mem_Ioo ⟨hz.1, hz.2.trans (half_lt_self Real.pi_pos)⟩\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f (Ioi 0 ×ℂ Ioi 0)\nhB : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 (Ioi 0 ×ℂ Ioi 0)] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : ∀ (x : ℝ), 0 ≤ x → ‖f ↑x‖ ≤ C\nhim : ∀ (x : ℝ), 0 ≤ x → ‖f (↑x * I)‖ ≤ C\nζ : ℂ\nhζ : ζ.im ∈ Icc 0 (π / 2)\nhz_re : 0 ≤ (exp ζ).re\nhz_im : 0 ≤ (exp ζ).im\nhzne : exp ζ ≠ 0\nz : ℂ\nhz : z ∈ im ⁻¹' Ioo 0 (π / 2)\nthis✝ : 0 < Real.cos z.im\nthis : 0 < Real.sin z.im\n⊢ 0 < expR z.re * Real.cos z.im ∧ 0 < expR z.re * Real.sin z.im\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase left\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f (Ioi 0 ×ℂ Ioi 0)\nhB : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 (Ioi 0 ×ℂ Ioi 0)] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : ∀ (x : ℝ), 0 ≤ x → ‖f ↑x‖ ≤ C\nhim : ∀ (x : ℝ), 0 ≤ x → ‖f (↑x * I)‖ ≤ C\nζ : ℂ\nhζ : ζ.im ∈ Icc 0 (π / 2)\nhz_re : 0 ≤ (exp ζ).re\nhz_im : 0 ≤ (exp ζ).im\nhzne : exp ζ ≠ 0\nz : ℂ\nhz : z ∈ im ⁻¹' Ioo 0 (π / 2)\nthis✝ : 0 < Real.cos z.im\nthis : 0 < Real.sin z.im\n⊢ 0 < expR z.re * Real.cos z.im\n[PROOFSTEP]\npositivity\n[GOAL]\ncase right\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f (Ioi 0 ×ℂ Ioi 0)\nhB : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 (Ioi 0 ×ℂ Ioi 0)] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : ∀ (x : ℝ), 0 ≤ x → ‖f ↑x‖ ≤ C\nhim : ∀ (x : ℝ), 0 ≤ x → ‖f (↑x * I)‖ ≤ C\nζ : ℂ\nhζ : ζ.im ∈ Icc 0 (π / 2)\nhz_re : 0 ≤ (exp ζ).re\nhz_im : 0 ≤ (exp ζ).im\nhzne : exp ζ ≠ 0\nz : ℂ\nhz : z ∈ im ⁻¹' Ioo 0 (π / 2)\nthis✝ : 0 < Real.cos z.im\nthis : 0 < Real.sin z.im\n⊢ 0 < expR z.re * Real.sin z.im\n[PROOFSTEP]\npositivity\n[GOAL]\ncase inr.intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f (Ioi 0 ×ℂ Ioi 0)\nhB : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 (Ioi 0 ×ℂ Ioi 0)] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : ∀ (x : ℝ), 0 ≤ x → ‖f ↑x‖ ≤ C\nhim : ∀ (x : ℝ), 0 ≤ x → ‖f (↑x * I)‖ ≤ C\nζ : ℂ\nhζ : ζ.im ∈ Icc 0 (π / 2)\nhz_re : 0 ≤ (exp ζ).re\nhz_im : 0 ≤ (exp ζ).im\nhzne : exp ζ ≠ 0\nH : MapsTo exp (im ⁻¹' Ioo 0 (π / 2)) (Ioi 0 ×ℂ Ioi 0)\n⊢ ‖(f ∘ exp) ζ‖ ≤ C\n[PROOFSTEP]\nrefine'\n  horizontal_strip (hd.comp differentiable_exp.diffContOnCl H) _ _ _ hζ.1\n    hζ.2\n      -- porting note: failed to clear hζ ζ\n[GOAL]\ncase inr.intro.intro.refine'_1\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f (Ioi 0 ×ℂ Ioi 0)\nhB : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 (Ioi 0 ×ℂ Ioi 0)] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : ∀ (x : ℝ), 0 ≤ x → ‖f ↑x‖ ≤ C\nhim : ∀ (x : ℝ), 0 ≤ x → ‖f (↑x * I)‖ ≤ C\nζ : ℂ\nhζ : ζ.im ∈ Icc 0 (π / 2)\nhz_re : 0 ≤ (exp ζ).re\nhz_im : 0 ≤ (exp ζ).im\nhzne : exp ζ ≠ 0\nH : MapsTo exp (im ⁻¹' Ioo 0 (π / 2)) (Ioi 0 ×ℂ Ioi 0)\n⊢ ∃ c,\n    c < π / (π / 2 - 0) ∧\n      ∃ B, (f ∘ exp) =O[comap (Abs.abs ∘ re) atTop ⊓ 𝓟 (im ⁻¹' Ioo 0 (π / 2))] fun z => expR (B * expR (c * |z.re|))\n[PROOFSTEP]\nrw [sub_zero, div_div_cancel' Real.pi_pos.ne']\n[GOAL]\ncase inr.intro.intro.refine'_1\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f (Ioi 0 ×ℂ Ioi 0)\nhB : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 (Ioi 0 ×ℂ Ioi 0)] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : ∀ (x : ℝ), 0 ≤ x → ‖f ↑x‖ ≤ C\nhim : ∀ (x : ℝ), 0 ≤ x → ‖f (↑x * I)‖ ≤ C\nζ : ℂ\nhζ : ζ.im ∈ Icc 0 (π / 2)\nhz_re : 0 ≤ (exp ζ).re\nhz_im : 0 ≤ (exp ζ).im\nhzne : exp ζ ≠ 0\nH : MapsTo exp (im ⁻¹' Ioo 0 (π / 2)) (Ioi 0 ×ℂ Ioi 0)\n⊢ ∃ c,\n    c < 2 ∧\n      ∃ B, (f ∘ exp) =O[comap (Abs.abs ∘ re) atTop ⊓ 𝓟 (im ⁻¹' Ioo 0 (π / 2))] fun z => expR (B * expR (c * |z.re|))\n[PROOFSTEP]\nrcases hB with ⟨c, hc, B, hO⟩\n[GOAL]\ncase inr.intro.intro.refine'_1.intro.intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f (Ioi 0 ×ℂ Ioi 0)\nhre : ∀ (x : ℝ), 0 ≤ x → ‖f ↑x‖ ≤ C\nhim : ∀ (x : ℝ), 0 ≤ x → ‖f (↑x * I)‖ ≤ C\nζ : ℂ\nhζ : ζ.im ∈ Icc 0 (π / 2)\nhz_re : 0 ≤ (exp ζ).re\nhz_im : 0 ≤ (exp ζ).im\nhzne : exp ζ ≠ 0\nH : MapsTo exp (im ⁻¹' Ioo 0 (π / 2)) (Ioi 0 ×ℂ Ioi 0)\nc : ℝ\nhc : c < 2\nB : ℝ\nhO : f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 (Ioi 0 ×ℂ Ioi 0)] fun z => expR (B * ↑Complex.abs z ^ c)\n⊢ ∃ c,\n    c < 2 ∧\n      ∃ B, (f ∘ exp) =O[comap (Abs.abs ∘ re) atTop ⊓ 𝓟 (im ⁻¹' Ioo 0 (π / 2))] fun z => expR (B * expR (c * |z.re|))\n[PROOFSTEP]\nrefine' ⟨c, hc, max B 0, _⟩\n[GOAL]\ncase inr.intro.intro.refine'_1.intro.intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f (Ioi 0 ×ℂ Ioi 0)\nhre : ∀ (x : ℝ), 0 ≤ x → ‖f ↑x‖ ≤ C\nhim : ∀ (x : ℝ), 0 ≤ x → ‖f (↑x * I)‖ ≤ C\nζ : ℂ\nhζ : ζ.im ∈ Icc 0 (π / 2)\nhz_re : 0 ≤ (exp ζ).re\nhz_im : 0 ≤ (exp ζ).im\nhzne : exp ζ ≠ 0\nH : MapsTo exp (im ⁻¹' Ioo 0 (π / 2)) (Ioi 0 ×ℂ Ioi 0)\nc : ℝ\nhc : c < 2\nB : ℝ\nhO : f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 (Ioi 0 ×ℂ Ioi 0)] fun z => expR (B * ↑Complex.abs z ^ c)\n⊢ (f ∘ exp) =O[comap (Abs.abs ∘ re) atTop ⊓ 𝓟 (im ⁻¹' Ioo 0 (π / 2))] fun z => expR (max B 0 * expR (c * |z.re|))\n[PROOFSTEP]\nrw [← comap_comap, comap_abs_atTop, comap_sup, inf_sup_right]\n  -- We prove separately the estimates as `ζ.re → ∞` and as `ζ.re → -∞`\n[GOAL]\ncase inr.intro.intro.refine'_1.intro.intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f (Ioi 0 ×ℂ Ioi 0)\nhre : ∀ (x : ℝ), 0 ≤ x → ‖f ↑x‖ ≤ C\nhim : ∀ (x : ℝ), 0 ≤ x → ‖f (↑x * I)‖ ≤ C\nζ : ℂ\nhζ : ζ.im ∈ Icc 0 (π / 2)\nhz_re : 0 ≤ (exp ζ).re\nhz_im : 0 ≤ (exp ζ).im\nhzne : exp ζ ≠ 0\nH : MapsTo exp (im ⁻¹' Ioo 0 (π / 2)) (Ioi 0 ×ℂ Ioi 0)\nc : ℝ\nhc : c < 2\nB : ℝ\nhO : f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 (Ioi 0 ×ℂ Ioi 0)] fun z => expR (B * ↑Complex.abs z ^ c)\n⊢ (f ∘ exp) =O[comap re atBot ⊓ 𝓟 (im ⁻¹' Ioo 0 (π / 2)) ⊔ comap re atTop ⊓ 𝓟 (im ⁻¹' Ioo 0 (π / 2))] fun z =>\n    expR (max B 0 * expR (c * |z.re|))\n[PROOFSTEP]\nrefine' IsBigO.sup _ ((hO.comp_tendsto <| tendsto_exp_comap_re_atTop.inf H.tendsto).trans <| .of_bound 1 _)\n[GOAL]\ncase inr.intro.intro.refine'_1.intro.intro.intro.refine'_1\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f (Ioi 0 ×ℂ Ioi 0)\nhre : ∀ (x : ℝ), 0 ≤ x → ‖f ↑x‖ ≤ C\nhim : ∀ (x : ℝ), 0 ≤ x → ‖f (↑x * I)‖ ≤ C\nζ : ℂ\nhζ : ζ.im ∈ Icc 0 (π / 2)\nhz_re : 0 ≤ (exp ζ).re\nhz_im : 0 ≤ (exp ζ).im\nhzne : exp ζ ≠ 0\nH : MapsTo exp (im ⁻¹' Ioo 0 (π / 2)) (Ioi 0 ×ℂ Ioi 0)\nc : ℝ\nhc : c < 2\nB : ℝ\nhO : f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 (Ioi 0 ×ℂ Ioi 0)] fun z => expR (B * ↑Complex.abs z ^ c)\n⊢ (f ∘ exp) =O[comap re atBot ⊓ 𝓟 (im ⁻¹' Ioo 0 (π / 2))] fun z => expR (max B 0 * expR (c * |z.re|))\n[PROOFSTEP]\nhave hc : ContinuousWithinAt f (Ioi 0 ×ℂ Ioi 0) 0 :=\n  by\n  refine' (hd.continuousOn _ _).mono subset_closure\n  simp [closure_reProdIm, mem_reProdIm]\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f (Ioi 0 ×ℂ Ioi 0)\nhre : ∀ (x : ℝ), 0 ≤ x → ‖f ↑x‖ ≤ C\nhim : ∀ (x : ℝ), 0 ≤ x → ‖f (↑x * I)‖ ≤ C\nζ : ℂ\nhζ : ζ.im ∈ Icc 0 (π / 2)\nhz_re : 0 ≤ (exp ζ).re\nhz_im : 0 ≤ (exp ζ).im\nhzne : exp ζ ≠ 0\nH : MapsTo exp (im ⁻¹' Ioo 0 (π / 2)) (Ioi 0 ×ℂ Ioi 0)\nc : ℝ\nhc : c < 2\nB : ℝ\nhO : f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 (Ioi 0 ×ℂ Ioi 0)] fun z => expR (B * ↑Complex.abs z ^ c)\n⊢ ContinuousWithinAt f (Ioi 0 ×ℂ Ioi 0) 0\n[PROOFSTEP]\nrefine' (hd.continuousOn _ _).mono subset_closure\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f (Ioi 0 ×ℂ Ioi 0)\nhre : ∀ (x : ℝ), 0 ≤ x → ‖f ↑x‖ ≤ C\nhim : ∀ (x : ℝ), 0 ≤ x → ‖f (↑x * I)‖ ≤ C\nζ : ℂ\nhζ : ζ.im ∈ Icc 0 (π / 2)\nhz_re : 0 ≤ (exp ζ).re\nhz_im : 0 ≤ (exp ζ).im\nhzne : exp ζ ≠ 0\nH : MapsTo exp (im ⁻¹' Ioo 0 (π / 2)) (Ioi 0 ×ℂ Ioi 0)\nc : ℝ\nhc : c < 2\nB : ℝ\nhO : f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 (Ioi 0 ×ℂ Ioi 0)] fun z => expR (B * ↑Complex.abs z ^ c)\n⊢ 0 ∈ closure (Ioi 0 ×ℂ Ioi 0)\n[PROOFSTEP]\nsimp [closure_reProdIm, mem_reProdIm]\n[GOAL]\ncase inr.intro.intro.refine'_1.intro.intro.intro.refine'_1\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f (Ioi 0 ×ℂ Ioi 0)\nhre : ∀ (x : ℝ), 0 ≤ x → ‖f ↑x‖ ≤ C\nhim : ∀ (x : ℝ), 0 ≤ x → ‖f (↑x * I)‖ ≤ C\nζ : ℂ\nhζ : ζ.im ∈ Icc 0 (π / 2)\nhz_re : 0 ≤ (exp ζ).re\nhz_im : 0 ≤ (exp ζ).im\nhzne : exp ζ ≠ 0\nH : MapsTo exp (im ⁻¹' Ioo 0 (π / 2)) (Ioi 0 ×ℂ Ioi 0)\nc : ℝ\nhc✝ : c < 2\nB : ℝ\nhO : f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 (Ioi 0 ×ℂ Ioi 0)] fun z => expR (B * ↑Complex.abs z ^ c)\nhc : ContinuousWithinAt f (Ioi 0 ×ℂ Ioi 0) 0\n⊢ (f ∘ exp) =O[comap re atBot ⊓ 𝓟 (im ⁻¹' Ioo 0 (π / 2))] fun z => expR (max B 0 * expR (c * |z.re|))\n[PROOFSTEP]\nrefine' ((hc.tendsto.comp <| tendsto_exp_comap_re_atBot.inf H.tendsto).isBigO_one ℝ).trans (isBigO_of_le _ fun w => _)\n[GOAL]\ncase inr.intro.intro.refine'_1.intro.intro.intro.refine'_1\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f (Ioi 0 ×ℂ Ioi 0)\nhre : ∀ (x : ℝ), 0 ≤ x → ‖f ↑x‖ ≤ C\nhim : ∀ (x : ℝ), 0 ≤ x → ‖f (↑x * I)‖ ≤ C\nζ : ℂ\nhζ : ζ.im ∈ Icc 0 (π / 2)\nhz_re : 0 ≤ (exp ζ).re\nhz_im : 0 ≤ (exp ζ).im\nhzne : exp ζ ≠ 0\nH : MapsTo exp (im ⁻¹' Ioo 0 (π / 2)) (Ioi 0 ×ℂ Ioi 0)\nc : ℝ\nhc✝ : c < 2\nB : ℝ\nhO : f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 (Ioi 0 ×ℂ Ioi 0)] fun z => expR (B * ↑Complex.abs z ^ c)\nhc : ContinuousWithinAt f (Ioi 0 ×ℂ Ioi 0) 0\nw : ℂ\n⊢ ‖1‖ ≤ ‖expR (max B 0 * expR (c * |w.re|))‖\n[PROOFSTEP]\nrw [norm_one, Real.norm_of_nonneg (Real.exp_pos _).le, Real.one_le_exp_iff]\n[GOAL]\ncase inr.intro.intro.refine'_1.intro.intro.intro.refine'_1\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f (Ioi 0 ×ℂ Ioi 0)\nhre : ∀ (x : ℝ), 0 ≤ x → ‖f ↑x‖ ≤ C\nhim : ∀ (x : ℝ), 0 ≤ x → ‖f (↑x * I)‖ ≤ C\nζ : ℂ\nhζ : ζ.im ∈ Icc 0 (π / 2)\nhz_re : 0 ≤ (exp ζ).re\nhz_im : 0 ≤ (exp ζ).im\nhzne : exp ζ ≠ 0\nH : MapsTo exp (im ⁻¹' Ioo 0 (π / 2)) (Ioi 0 ×ℂ Ioi 0)\nc : ℝ\nhc✝ : c < 2\nB : ℝ\nhO : f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 (Ioi 0 ×ℂ Ioi 0)] fun z => expR (B * ↑Complex.abs z ^ c)\nhc : ContinuousWithinAt f (Ioi 0 ×ℂ Ioi 0) 0\nw : ℂ\n⊢ 0 ≤ max B 0 * expR (c * |w.re|)\n[PROOFSTEP]\nexact mul_nonneg (le_max_right _ _) (Real.exp_pos _).le\n[GOAL]\ncase inr.intro.intro.refine'_1.intro.intro.intro.refine'_2\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f (Ioi 0 ×ℂ Ioi 0)\nhre : ∀ (x : ℝ), 0 ≤ x → ‖f ↑x‖ ≤ C\nhim : ∀ (x : ℝ), 0 ≤ x → ‖f (↑x * I)‖ ≤ C\nζ : ℂ\nhζ : ζ.im ∈ Icc 0 (π / 2)\nhz_re : 0 ≤ (exp ζ).re\nhz_im : 0 ≤ (exp ζ).im\nhzne : exp ζ ≠ 0\nH : MapsTo exp (im ⁻¹' Ioo 0 (π / 2)) (Ioi 0 ×ℂ Ioi 0)\nc : ℝ\nhc : c < 2\nB : ℝ\nhO : f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 (Ioi 0 ×ℂ Ioi 0)] fun z => expR (B * ↑Complex.abs z ^ c)\n⊢ ∀ᶠ (x : ℂ) in comap re atTop ⊓ 𝓟 (im ⁻¹' Ioo 0 (π / 2)),\n    ‖((fun z => expR (B * ↑Complex.abs z ^ c)) ∘ exp) x‖ ≤ 1 * ‖expR (max B 0 * expR (c * |x.re|))‖\n[PROOFSTEP]\nsimp only [eventually_inf_principal, eventually_comap, comp_apply, one_mul, Real.norm_of_nonneg (Real.exp_pos _).le,\n  abs_exp, ← Real.exp_mul, Real.exp_le_exp]\n[GOAL]\ncase inr.intro.intro.refine'_1.intro.intro.intro.refine'_2\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f (Ioi 0 ×ℂ Ioi 0)\nhre : ∀ (x : ℝ), 0 ≤ x → ‖f ↑x‖ ≤ C\nhim : ∀ (x : ℝ), 0 ≤ x → ‖f (↑x * I)‖ ≤ C\nζ : ℂ\nhζ : ζ.im ∈ Icc 0 (π / 2)\nhz_re : 0 ≤ (exp ζ).re\nhz_im : 0 ≤ (exp ζ).im\nhzne : exp ζ ≠ 0\nH : MapsTo exp (im ⁻¹' Ioo 0 (π / 2)) (Ioi 0 ×ℂ Ioi 0)\nc : ℝ\nhc : c < 2\nB : ℝ\nhO : f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 (Ioi 0 ×ℂ Ioi 0)] fun z => expR (B * ↑Complex.abs z ^ c)\n⊢ ∀ᶠ (b : ℝ) in atTop,\n    ∀ (a : ℂ), a.re = b → a ∈ im ⁻¹' Ioo 0 (π / 2) → B * expR (a.re * c) ≤ max B 0 * expR (c * |a.re|)\n[PROOFSTEP]\nrefine' (eventually_ge_atTop 0).mono fun x hx z hz _ => _\n[GOAL]\ncase inr.intro.intro.refine'_1.intro.intro.intro.refine'_2\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f (Ioi 0 ×ℂ Ioi 0)\nhre : ∀ (x : ℝ), 0 ≤ x → ‖f ↑x‖ ≤ C\nhim : ∀ (x : ℝ), 0 ≤ x → ‖f (↑x * I)‖ ≤ C\nζ : ℂ\nhζ : ζ.im ∈ Icc 0 (π / 2)\nhz_re : 0 ≤ (exp ζ).re\nhz_im : 0 ≤ (exp ζ).im\nhzne : exp ζ ≠ 0\nH : MapsTo exp (im ⁻¹' Ioo 0 (π / 2)) (Ioi 0 ×ℂ Ioi 0)\nc : ℝ\nhc : c < 2\nB : ℝ\nhO : f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 (Ioi 0 ×ℂ Ioi 0)] fun z => expR (B * ↑Complex.abs z ^ c)\nx : ℝ\nhx : 0 ≤ x\nz : ℂ\nhz : z.re = x\nx✝ : z ∈ im ⁻¹' Ioo 0 (π / 2)\n⊢ B * expR (z.re * c) ≤ max B 0 * expR (c * |z.re|)\n[PROOFSTEP]\nrw [hz, _root_.abs_of_nonneg hx, mul_comm _ c]\n[GOAL]\ncase inr.intro.intro.refine'_1.intro.intro.intro.refine'_2\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f (Ioi 0 ×ℂ Ioi 0)\nhre : ∀ (x : ℝ), 0 ≤ x → ‖f ↑x‖ ≤ C\nhim : ∀ (x : ℝ), 0 ≤ x → ‖f (↑x * I)‖ ≤ C\nζ : ℂ\nhζ : ζ.im ∈ Icc 0 (π / 2)\nhz_re : 0 ≤ (exp ζ).re\nhz_im : 0 ≤ (exp ζ).im\nhzne : exp ζ ≠ 0\nH : MapsTo exp (im ⁻¹' Ioo 0 (π / 2)) (Ioi 0 ×ℂ Ioi 0)\nc : ℝ\nhc : c < 2\nB : ℝ\nhO : f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 (Ioi 0 ×ℂ Ioi 0)] fun z => expR (B * ↑Complex.abs z ^ c)\nx : ℝ\nhx : 0 ≤ x\nz : ℂ\nhz : z.re = x\nx✝ : z ∈ im ⁻¹' Ioo 0 (π / 2)\n⊢ B * expR (c * x) ≤ max B 0 * expR (c * x)\n[PROOFSTEP]\nexact mul_le_mul_of_nonneg_right (le_max_left _ _) (Real.exp_pos _).le\n[GOAL]\ncase inr.intro.intro.refine'_2\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f (Ioi 0 ×ℂ Ioi 0)\nhB : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 (Ioi 0 ×ℂ Ioi 0)] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : ∀ (x : ℝ), 0 ≤ x → ‖f ↑x‖ ≤ C\nhim : ∀ (x : ℝ), 0 ≤ x → ‖f (↑x * I)‖ ≤ C\nζ : ℂ\nhζ : ζ.im ∈ Icc 0 (π / 2)\nhz_re : 0 ≤ (exp ζ).re\nhz_im : 0 ≤ (exp ζ).im\nhzne : exp ζ ≠ 0\nH : MapsTo exp (im ⁻¹' Ioo 0 (π / 2)) (Ioi 0 ×ℂ Ioi 0)\n⊢ ∀ (z : ℂ), z.im = 0 → ‖(f ∘ exp) z‖ ≤ C\n[PROOFSTEP]\nintro ζ hζ\n[GOAL]\ncase inr.intro.intro.refine'_2\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f (Ioi 0 ×ℂ Ioi 0)\nhB : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 (Ioi 0 ×ℂ Ioi 0)] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : ∀ (x : ℝ), 0 ≤ x → ‖f ↑x‖ ≤ C\nhim : ∀ (x : ℝ), 0 ≤ x → ‖f (↑x * I)‖ ≤ C\nζ✝ : ℂ\nhζ✝ : ζ✝.im ∈ Icc 0 (π / 2)\nhz_re : 0 ≤ (exp ζ✝).re\nhz_im : 0 ≤ (exp ζ✝).im\nhzne : exp ζ✝ ≠ 0\nH : MapsTo exp (im ⁻¹' Ioo 0 (π / 2)) (Ioi 0 ×ℂ Ioi 0)\nζ : ℂ\nhζ : ζ.im = 0\n⊢ ‖(f ∘ exp) ζ‖ ≤ C\n[PROOFSTEP]\nlift ζ to ℝ using hζ\n[GOAL]\ncase inr.intro.intro.refine'_2.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f (Ioi 0 ×ℂ Ioi 0)\nhB : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 (Ioi 0 ×ℂ Ioi 0)] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : ∀ (x : ℝ), 0 ≤ x → ‖f ↑x‖ ≤ C\nhim : ∀ (x : ℝ), 0 ≤ x → ‖f (↑x * I)‖ ≤ C\nζ✝ : ℂ\nhz_re : 0 ≤ (exp ζ✝).re\nhz_im : 0 ≤ (exp ζ✝).im\nhzne : exp ζ✝ ≠ 0\nH : MapsTo exp (im ⁻¹' Ioo 0 (π / 2)) (Ioi 0 ×ℂ Ioi 0)\nζ : ℝ\n⊢ ‖(f ∘ exp) ↑ζ‖ ≤ C\n[PROOFSTEP]\nrw [comp_apply, ← ofReal_exp]\n[GOAL]\ncase inr.intro.intro.refine'_2.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f (Ioi 0 ×ℂ Ioi 0)\nhB : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 (Ioi 0 ×ℂ Ioi 0)] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : ∀ (x : ℝ), 0 ≤ x → ‖f ↑x‖ ≤ C\nhim : ∀ (x : ℝ), 0 ≤ x → ‖f (↑x * I)‖ ≤ C\nζ✝ : ℂ\nhz_re : 0 ≤ (exp ζ✝).re\nhz_im : 0 ≤ (exp ζ✝).im\nhzne : exp ζ✝ ≠ 0\nH : MapsTo exp (im ⁻¹' Ioo 0 (π / 2)) (Ioi 0 ×ℂ Ioi 0)\nζ : ℝ\n⊢ ‖f ↑(expR ζ)‖ ≤ C\n[PROOFSTEP]\nexact hre _ (Real.exp_pos _).le\n[GOAL]\ncase inr.intro.intro.refine'_3\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f (Ioi 0 ×ℂ Ioi 0)\nhB : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 (Ioi 0 ×ℂ Ioi 0)] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : ∀ (x : ℝ), 0 ≤ x → ‖f ↑x‖ ≤ C\nhim : ∀ (x : ℝ), 0 ≤ x → ‖f (↑x * I)‖ ≤ C\nζ : ℂ\nhζ : ζ.im ∈ Icc 0 (π / 2)\nhz_re : 0 ≤ (exp ζ).re\nhz_im : 0 ≤ (exp ζ).im\nhzne : exp ζ ≠ 0\nH : MapsTo exp (im ⁻¹' Ioo 0 (π / 2)) (Ioi 0 ×ℂ Ioi 0)\n⊢ ∀ (z : ℂ), z.im = π / 2 → ‖(f ∘ exp) z‖ ≤ C\n[PROOFSTEP]\nintro ζ hζ\n[GOAL]\ncase inr.intro.intro.refine'_3\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f (Ioi 0 ×ℂ Ioi 0)\nhB : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 (Ioi 0 ×ℂ Ioi 0)] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : ∀ (x : ℝ), 0 ≤ x → ‖f ↑x‖ ≤ C\nhim : ∀ (x : ℝ), 0 ≤ x → ‖f (↑x * I)‖ ≤ C\nζ✝ : ℂ\nhζ✝ : ζ✝.im ∈ Icc 0 (π / 2)\nhz_re : 0 ≤ (exp ζ✝).re\nhz_im : 0 ≤ (exp ζ✝).im\nhzne : exp ζ✝ ≠ 0\nH : MapsTo exp (im ⁻¹' Ioo 0 (π / 2)) (Ioi 0 ×ℂ Ioi 0)\nζ : ℂ\nhζ : ζ.im = π / 2\n⊢ ‖(f ∘ exp) ζ‖ ≤ C\n[PROOFSTEP]\nrw [← re_add_im ζ, hζ, comp_apply, exp_add_mul_I, ← ofReal_cos, ← ofReal_sin, Real.cos_pi_div_two, Real.sin_pi_div_two,\n  ofReal_zero, ofReal_one, one_mul, zero_add, ← ofReal_exp]\n[GOAL]\ncase inr.intro.intro.refine'_3\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f (Ioi 0 ×ℂ Ioi 0)\nhB : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 (Ioi 0 ×ℂ Ioi 0)] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : ∀ (x : ℝ), 0 ≤ x → ‖f ↑x‖ ≤ C\nhim : ∀ (x : ℝ), 0 ≤ x → ‖f (↑x * I)‖ ≤ C\nζ✝ : ℂ\nhζ✝ : ζ✝.im ∈ Icc 0 (π / 2)\nhz_re : 0 ≤ (exp ζ✝).re\nhz_im : 0 ≤ (exp ζ✝).im\nhzne : exp ζ✝ ≠ 0\nH : MapsTo exp (im ⁻¹' Ioo 0 (π / 2)) (Ioi 0 ×ℂ Ioi 0)\nζ : ℂ\nhζ : ζ.im = π / 2\n⊢ ‖f (↑(expR ζ.re) * I)‖ ≤ C\n[PROOFSTEP]\nexact him _ (Real.exp_pos _).le\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nz : ℂ\nhd : DiffContOnCl ℂ f (Iio 0 ×ℂ Ioi 0)\nhB : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 (Iio 0 ×ℂ Ioi 0)] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : ∀ (x : ℝ), x ≤ 0 → ‖f ↑x‖ ≤ C\nhim : ∀ (x : ℝ), 0 ≤ x → ‖f (↑x * I)‖ ≤ C\nhz_re : z.re ≤ 0\nhz_im : 0 ≤ z.im\n⊢ ‖f z‖ ≤ C\n[PROOFSTEP]\nobtain ⟨z, rfl⟩ : ∃ z', z' * I = z\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nz : ℂ\nhd : DiffContOnCl ℂ f (Iio 0 ×ℂ Ioi 0)\nhB : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 (Iio 0 ×ℂ Ioi 0)] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : ∀ (x : ℝ), x ≤ 0 → ‖f ↑x‖ ≤ C\nhim : ∀ (x : ℝ), 0 ≤ x → ‖f (↑x * I)‖ ≤ C\nhz_re : z.re ≤ 0\nhz_im : 0 ≤ z.im\n⊢ ∃ z', z' * I = z\ncase intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f (Iio 0 ×ℂ Ioi 0)\nhB : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 (Iio 0 ×ℂ Ioi 0)] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : ∀ (x : ℝ), x ≤ 0 → ‖f ↑x‖ ≤ C\nhim : ∀ (x : ℝ), 0 ≤ x → ‖f (↑x * I)‖ ≤ C\nz : ℂ\nhz_re : (z * I).re ≤ 0\nhz_im : 0 ≤ (z * I).im\n⊢ ‖f (z * I)‖ ≤ C\n[PROOFSTEP]\nexact ⟨z / I, div_mul_cancel _ I_ne_zero⟩\n[GOAL]\ncase intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f (Iio 0 ×ℂ Ioi 0)\nhB : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 (Iio 0 ×ℂ Ioi 0)] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : ∀ (x : ℝ), x ≤ 0 → ‖f ↑x‖ ≤ C\nhim : ∀ (x : ℝ), 0 ≤ x → ‖f (↑x * I)‖ ≤ C\nz : ℂ\nhz_re : (z * I).re ≤ 0\nhz_im : 0 ≤ (z * I).im\n⊢ ‖f (z * I)‖ ≤ C\n[PROOFSTEP]\nsimp only [mul_I_re, mul_I_im, neg_nonpos] at hz_re hz_im \n[GOAL]\ncase intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f (Iio 0 ×ℂ Ioi 0)\nhB : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 (Iio 0 ×ℂ Ioi 0)] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : ∀ (x : ℝ), x ≤ 0 → ‖f ↑x‖ ≤ C\nhim : ∀ (x : ℝ), 0 ≤ x → ‖f (↑x * I)‖ ≤ C\nz : ℂ\nhz_re : 0 ≤ z.im\nhz_im : 0 ≤ z.re\n⊢ ‖f (z * I)‖ ≤ C\n[PROOFSTEP]\nchange ‖(f ∘ (· * I)) z‖ ≤ C\n[GOAL]\ncase intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f (Iio 0 ×ℂ Ioi 0)\nhB : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 (Iio 0 ×ℂ Ioi 0)] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : ∀ (x : ℝ), x ≤ 0 → ‖f ↑x‖ ≤ C\nhim : ∀ (x : ℝ), 0 ≤ x → ‖f (↑x * I)‖ ≤ C\nz : ℂ\nhz_re : 0 ≤ z.im\nhz_im : 0 ≤ z.re\n⊢ ‖(f ∘ fun x => x * I) z‖ ≤ C\n[PROOFSTEP]\nhave H : MapsTo (· * I) (Ioi 0 ×ℂ Ioi 0) (Iio 0 ×ℂ Ioi 0) := fun w hw ↦ by\n  simpa only [mem_reProdIm, mul_I_re, mul_I_im, neg_lt_zero, mem_Iio] using hw.symm\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f (Iio 0 ×ℂ Ioi 0)\nhB : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 (Iio 0 ×ℂ Ioi 0)] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : ∀ (x : ℝ), x ≤ 0 → ‖f ↑x‖ ≤ C\nhim : ∀ (x : ℝ), 0 ≤ x → ‖f (↑x * I)‖ ≤ C\nz : ℂ\nhz_re : 0 ≤ z.im\nhz_im : 0 ≤ z.re\nw : ℂ\nhw : w ∈ Ioi 0 ×ℂ Ioi 0\n⊢ (fun x => x * I) w ∈ Iio 0 ×ℂ Ioi 0\n[PROOFSTEP]\nsimpa only [mem_reProdIm, mul_I_re, mul_I_im, neg_lt_zero, mem_Iio] using hw.symm\n[GOAL]\ncase intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f (Iio 0 ×ℂ Ioi 0)\nhB : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 (Iio 0 ×ℂ Ioi 0)] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : ∀ (x : ℝ), x ≤ 0 → ‖f ↑x‖ ≤ C\nhim : ∀ (x : ℝ), 0 ≤ x → ‖f (↑x * I)‖ ≤ C\nz : ℂ\nhz_re : 0 ≤ z.im\nhz_im : 0 ≤ z.re\nH : MapsTo (fun x => x * I) (Ioi 0 ×ℂ Ioi 0) (Iio 0 ×ℂ Ioi 0)\n⊢ ‖(f ∘ fun x => x * I) z‖ ≤ C\n[PROOFSTEP]\nrcases hB with ⟨c, hc, B, hO⟩\n[GOAL]\ncase intro.intro.intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f (Iio 0 ×ℂ Ioi 0)\nhre : ∀ (x : ℝ), x ≤ 0 → ‖f ↑x‖ ≤ C\nhim : ∀ (x : ℝ), 0 ≤ x → ‖f (↑x * I)‖ ≤ C\nz : ℂ\nhz_re : 0 ≤ z.im\nhz_im : 0 ≤ z.re\nH : MapsTo (fun x => x * I) (Ioi 0 ×ℂ Ioi 0) (Iio 0 ×ℂ Ioi 0)\nc : ℝ\nhc : c < 2\nB : ℝ\nhO : f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 (Iio 0 ×ℂ Ioi 0)] fun z => expR (B * ↑Complex.abs z ^ c)\n⊢ ‖(f ∘ fun x => x * I) z‖ ≤ C\n[PROOFSTEP]\nrefine'\n  quadrant_I (hd.comp (differentiable_id.mul_const _).diffContOnCl H) ⟨c, hc, B, ?_⟩ him (fun x hx => _) hz_im hz_re\n[GOAL]\ncase intro.intro.intro.intro.refine'_1\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f (Iio 0 ×ℂ Ioi 0)\nhre : ∀ (x : ℝ), x ≤ 0 → ‖f ↑x‖ ≤ C\nhim : ∀ (x : ℝ), 0 ≤ x → ‖f (↑x * I)‖ ≤ C\nz : ℂ\nhz_re : 0 ≤ z.im\nhz_im : 0 ≤ z.re\nH : MapsTo (fun x => x * I) (Ioi 0 ×ℂ Ioi 0) (Iio 0 ×ℂ Ioi 0)\nc : ℝ\nhc : c < 2\nB : ℝ\nhO : f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 (Iio 0 ×ℂ Ioi 0)] fun z => expR (B * ↑Complex.abs z ^ c)\n⊢ (f ∘ fun x => x * I) =O[comap (↑Complex.abs) atTop ⊓ 𝓟 (Ioi 0 ×ℂ Ioi 0)] fun z => expR (B * ↑Complex.abs z ^ c)\n[PROOFSTEP]\nsimpa only [(· ∘ ·), map_mul, abs_I, mul_one] using\n  hO.comp_tendsto ((tendsto_mul_right_cobounded I_ne_zero).inf H.tendsto)\n[GOAL]\ncase intro.intro.intro.intro.refine'_2\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f (Iio 0 ×ℂ Ioi 0)\nhre : ∀ (x : ℝ), x ≤ 0 → ‖f ↑x‖ ≤ C\nhim : ∀ (x : ℝ), 0 ≤ x → ‖f (↑x * I)‖ ≤ C\nz : ℂ\nhz_re : 0 ≤ z.im\nhz_im : 0 ≤ z.re\nH : MapsTo (fun x => x * I) (Ioi 0 ×ℂ Ioi 0) (Iio 0 ×ℂ Ioi 0)\nc : ℝ\nhc : c < 2\nB : ℝ\nhO : f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 (Iio 0 ×ℂ Ioi 0)] fun z => expR (B * ↑Complex.abs z ^ c)\nx : ℝ\nhx : 0 ≤ x\n⊢ ‖(f ∘ fun x => x * I) (↑x * I)‖ ≤ C\n[PROOFSTEP]\nrw [comp_apply, mul_assoc, I_mul_I, mul_neg_one, ← ofReal_neg]\n[GOAL]\ncase intro.intro.intro.intro.refine'_2\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f (Iio 0 ×ℂ Ioi 0)\nhre : ∀ (x : ℝ), x ≤ 0 → ‖f ↑x‖ ≤ C\nhim : ∀ (x : ℝ), 0 ≤ x → ‖f (↑x * I)‖ ≤ C\nz : ℂ\nhz_re : 0 ≤ z.im\nhz_im : 0 ≤ z.re\nH : MapsTo (fun x => x * I) (Ioi 0 ×ℂ Ioi 0) (Iio 0 ×ℂ Ioi 0)\nc : ℝ\nhc : c < 2\nB : ℝ\nhO : f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 (Iio 0 ×ℂ Ioi 0)] fun z => expR (B * ↑Complex.abs z ^ c)\nx : ℝ\nhx : 0 ≤ x\n⊢ ‖f ↑(-x)‖ ≤ C\n[PROOFSTEP]\nexact hre _ (neg_nonpos.2 hx)\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nz : ℂ\nhd : DiffContOnCl ℂ f (Iio 0 ×ℂ Iio 0)\nhB : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 (Iio 0 ×ℂ Iio 0)] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : ∀ (x : ℝ), x ≤ 0 → ‖f ↑x‖ ≤ C\nhim : ∀ (x : ℝ), x ≤ 0 → ‖f (↑x * I)‖ ≤ C\nhz_re : z.re ≤ 0\nhz_im : z.im ≤ 0\n⊢ ‖f z‖ ≤ C\n[PROOFSTEP]\nobtain ⟨z, rfl⟩ : ∃ z', -z' = z\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nz : ℂ\nhd : DiffContOnCl ℂ f (Iio 0 ×ℂ Iio 0)\nhB : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 (Iio 0 ×ℂ Iio 0)] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : ∀ (x : ℝ), x ≤ 0 → ‖f ↑x‖ ≤ C\nhim : ∀ (x : ℝ), x ≤ 0 → ‖f (↑x * I)‖ ≤ C\nhz_re : z.re ≤ 0\nhz_im : z.im ≤ 0\n⊢ ∃ z', -z' = z\ncase intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f (Iio 0 ×ℂ Iio 0)\nhB : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 (Iio 0 ×ℂ Iio 0)] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : ∀ (x : ℝ), x ≤ 0 → ‖f ↑x‖ ≤ C\nhim : ∀ (x : ℝ), x ≤ 0 → ‖f (↑x * I)‖ ≤ C\nz : ℂ\nhz_re : (-z).re ≤ 0\nhz_im : (-z).im ≤ 0\n⊢ ‖f (-z)‖ ≤ C\n[PROOFSTEP]\nexact ⟨-z, neg_neg z⟩\n[GOAL]\ncase intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f (Iio 0 ×ℂ Iio 0)\nhB : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 (Iio 0 ×ℂ Iio 0)] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : ∀ (x : ℝ), x ≤ 0 → ‖f ↑x‖ ≤ C\nhim : ∀ (x : ℝ), x ≤ 0 → ‖f (↑x * I)‖ ≤ C\nz : ℂ\nhz_re : (-z).re ≤ 0\nhz_im : (-z).im ≤ 0\n⊢ ‖f (-z)‖ ≤ C\n[PROOFSTEP]\nsimp only [neg_re, neg_im, neg_nonpos] at hz_re hz_im \n[GOAL]\ncase intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f (Iio 0 ×ℂ Iio 0)\nhB : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 (Iio 0 ×ℂ Iio 0)] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : ∀ (x : ℝ), x ≤ 0 → ‖f ↑x‖ ≤ C\nhim : ∀ (x : ℝ), x ≤ 0 → ‖f (↑x * I)‖ ≤ C\nz : ℂ\nhz_re : 0 ≤ z.re\nhz_im : 0 ≤ z.im\n⊢ ‖f (-z)‖ ≤ C\n[PROOFSTEP]\nchange ‖(f ∘ Neg.neg) z‖ ≤ C\n[GOAL]\ncase intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f (Iio 0 ×ℂ Iio 0)\nhB : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 (Iio 0 ×ℂ Iio 0)] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : ∀ (x : ℝ), x ≤ 0 → ‖f ↑x‖ ≤ C\nhim : ∀ (x : ℝ), x ≤ 0 → ‖f (↑x * I)‖ ≤ C\nz : ℂ\nhz_re : 0 ≤ z.re\nhz_im : 0 ≤ z.im\n⊢ ‖(f ∘ Neg.neg) z‖ ≤ C\n[PROOFSTEP]\nhave H : MapsTo Neg.neg (Ioi 0 ×ℂ Ioi 0) (Iio 0 ×ℂ Iio 0) :=\n  by\n  intro w hw\n  simpa only [mem_reProdIm, neg_re, neg_im, neg_lt_zero, mem_Iio] using hw\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f (Iio 0 ×ℂ Iio 0)\nhB : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 (Iio 0 ×ℂ Iio 0)] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : ∀ (x : ℝ), x ≤ 0 → ‖f ↑x‖ ≤ C\nhim : ∀ (x : ℝ), x ≤ 0 → ‖f (↑x * I)‖ ≤ C\nz : ℂ\nhz_re : 0 ≤ z.re\nhz_im : 0 ≤ z.im\n⊢ MapsTo Neg.neg (Ioi 0 ×ℂ Ioi 0) (Iio 0 ×ℂ Iio 0)\n[PROOFSTEP]\nintro w hw\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f (Iio 0 ×ℂ Iio 0)\nhB : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 (Iio 0 ×ℂ Iio 0)] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : ∀ (x : ℝ), x ≤ 0 → ‖f ↑x‖ ≤ C\nhim : ∀ (x : ℝ), x ≤ 0 → ‖f (↑x * I)‖ ≤ C\nz : ℂ\nhz_re : 0 ≤ z.re\nhz_im : 0 ≤ z.im\nw : ℂ\nhw : w ∈ Ioi 0 ×ℂ Ioi 0\n⊢ -w ∈ Iio 0 ×ℂ Iio 0\n[PROOFSTEP]\nsimpa only [mem_reProdIm, neg_re, neg_im, neg_lt_zero, mem_Iio] using hw\n[GOAL]\ncase intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f (Iio 0 ×ℂ Iio 0)\nhB : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 (Iio 0 ×ℂ Iio 0)] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : ∀ (x : ℝ), x ≤ 0 → ‖f ↑x‖ ≤ C\nhim : ∀ (x : ℝ), x ≤ 0 → ‖f (↑x * I)‖ ≤ C\nz : ℂ\nhz_re : 0 ≤ z.re\nhz_im : 0 ≤ z.im\nH : MapsTo Neg.neg (Ioi 0 ×ℂ Ioi 0) (Iio 0 ×ℂ Iio 0)\n⊢ ‖(f ∘ Neg.neg) z‖ ≤ C\n[PROOFSTEP]\nrefine' quadrant_I (hd.comp differentiable_neg.diffContOnCl H) _ (fun x hx => _) (fun x hx => _) hz_re hz_im\n[GOAL]\ncase intro.refine'_1\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f (Iio 0 ×ℂ Iio 0)\nhB : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 (Iio 0 ×ℂ Iio 0)] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : ∀ (x : ℝ), x ≤ 0 → ‖f ↑x‖ ≤ C\nhim : ∀ (x : ℝ), x ≤ 0 → ‖f (↑x * I)‖ ≤ C\nz : ℂ\nhz_re : 0 ≤ z.re\nhz_im : 0 ≤ z.im\nH : MapsTo Neg.neg (Ioi 0 ×ℂ Ioi 0) (Iio 0 ×ℂ Iio 0)\n⊢ ∃ c,\n    c < 2 ∧\n      ∃ B, (f ∘ Neg.neg) =O[comap (↑Complex.abs) atTop ⊓ 𝓟 (Ioi 0 ×ℂ Ioi 0)] fun z => expR (B * ↑Complex.abs z ^ c)\n[PROOFSTEP]\nrcases hB with ⟨c, hc, B, hO⟩\n[GOAL]\ncase intro.refine'_1.intro.intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f (Iio 0 ×ℂ Iio 0)\nhre : ∀ (x : ℝ), x ≤ 0 → ‖f ↑x‖ ≤ C\nhim : ∀ (x : ℝ), x ≤ 0 → ‖f (↑x * I)‖ ≤ C\nz : ℂ\nhz_re : 0 ≤ z.re\nhz_im : 0 ≤ z.im\nH : MapsTo Neg.neg (Ioi 0 ×ℂ Ioi 0) (Iio 0 ×ℂ Iio 0)\nc : ℝ\nhc : c < 2\nB : ℝ\nhO : f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 (Iio 0 ×ℂ Iio 0)] fun z => expR (B * ↑Complex.abs z ^ c)\n⊢ ∃ c,\n    c < 2 ∧\n      ∃ B, (f ∘ Neg.neg) =O[comap (↑Complex.abs) atTop ⊓ 𝓟 (Ioi 0 ×ℂ Ioi 0)] fun z => expR (B * ↑Complex.abs z ^ c)\n[PROOFSTEP]\nrefine ⟨c, hc, B, ?_⟩\n[GOAL]\ncase intro.refine'_1.intro.intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f (Iio 0 ×ℂ Iio 0)\nhre : ∀ (x : ℝ), x ≤ 0 → ‖f ↑x‖ ≤ C\nhim : ∀ (x : ℝ), x ≤ 0 → ‖f (↑x * I)‖ ≤ C\nz : ℂ\nhz_re : 0 ≤ z.re\nhz_im : 0 ≤ z.im\nH : MapsTo Neg.neg (Ioi 0 ×ℂ Ioi 0) (Iio 0 ×ℂ Iio 0)\nc : ℝ\nhc : c < 2\nB : ℝ\nhO : f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 (Iio 0 ×ℂ Iio 0)] fun z => expR (B * ↑Complex.abs z ^ c)\n⊢ (f ∘ Neg.neg) =O[comap (↑Complex.abs) atTop ⊓ 𝓟 (Ioi 0 ×ℂ Ioi 0)] fun z => expR (B * ↑Complex.abs z ^ c)\n[PROOFSTEP]\nsimpa only [(· ∘ ·), Complex.abs.map_neg] using hO.comp_tendsto (tendsto_neg_cobounded.inf H.tendsto)\n[GOAL]\ncase intro.refine'_2\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f (Iio 0 ×ℂ Iio 0)\nhB : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 (Iio 0 ×ℂ Iio 0)] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : ∀ (x : ℝ), x ≤ 0 → ‖f ↑x‖ ≤ C\nhim : ∀ (x : ℝ), x ≤ 0 → ‖f (↑x * I)‖ ≤ C\nz : ℂ\nhz_re : 0 ≤ z.re\nhz_im : 0 ≤ z.im\nH : MapsTo Neg.neg (Ioi 0 ×ℂ Ioi 0) (Iio 0 ×ℂ Iio 0)\nx : ℝ\nhx : 0 ≤ x\n⊢ ‖(f ∘ Neg.neg) ↑x‖ ≤ C\n[PROOFSTEP]\nrw [comp_apply, ← ofReal_neg]\n[GOAL]\ncase intro.refine'_2\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f (Iio 0 ×ℂ Iio 0)\nhB : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 (Iio 0 ×ℂ Iio 0)] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : ∀ (x : ℝ), x ≤ 0 → ‖f ↑x‖ ≤ C\nhim : ∀ (x : ℝ), x ≤ 0 → ‖f (↑x * I)‖ ≤ C\nz : ℂ\nhz_re : 0 ≤ z.re\nhz_im : 0 ≤ z.im\nH : MapsTo Neg.neg (Ioi 0 ×ℂ Ioi 0) (Iio 0 ×ℂ Iio 0)\nx : ℝ\nhx : 0 ≤ x\n⊢ ‖f ↑(-x)‖ ≤ C\n[PROOFSTEP]\nexact hre (-x) (neg_nonpos.2 hx)\n[GOAL]\ncase intro.refine'_3\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f (Iio 0 ×ℂ Iio 0)\nhB : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 (Iio 0 ×ℂ Iio 0)] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : ∀ (x : ℝ), x ≤ 0 → ‖f ↑x‖ ≤ C\nhim : ∀ (x : ℝ), x ≤ 0 → ‖f (↑x * I)‖ ≤ C\nz : ℂ\nhz_re : 0 ≤ z.re\nhz_im : 0 ≤ z.im\nH : MapsTo Neg.neg (Ioi 0 ×ℂ Ioi 0) (Iio 0 ×ℂ Iio 0)\nx : ℝ\nhx : 0 ≤ x\n⊢ ‖(f ∘ Neg.neg) (↑x * I)‖ ≤ C\n[PROOFSTEP]\nrw [comp_apply, ← neg_mul, ← ofReal_neg]\n[GOAL]\ncase intro.refine'_3\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f (Iio 0 ×ℂ Iio 0)\nhB : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 (Iio 0 ×ℂ Iio 0)] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : ∀ (x : ℝ), x ≤ 0 → ‖f ↑x‖ ≤ C\nhim : ∀ (x : ℝ), x ≤ 0 → ‖f (↑x * I)‖ ≤ C\nz : ℂ\nhz_re : 0 ≤ z.re\nhz_im : 0 ≤ z.im\nH : MapsTo Neg.neg (Ioi 0 ×ℂ Ioi 0) (Iio 0 ×ℂ Iio 0)\nx : ℝ\nhx : 0 ≤ x\n⊢ ‖f (↑(-x) * I)‖ ≤ C\n[PROOFSTEP]\nexact him (-x) (neg_nonpos.2 hx)\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nz : ℂ\nhd : DiffContOnCl ℂ f (Ioi 0 ×ℂ Iio 0)\nhB : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 (Ioi 0 ×ℂ Iio 0)] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : ∀ (x : ℝ), 0 ≤ x → ‖f ↑x‖ ≤ C\nhim : ∀ (x : ℝ), x ≤ 0 → ‖f (↑x * I)‖ ≤ C\nhz_re : 0 ≤ z.re\nhz_im : z.im ≤ 0\n⊢ ‖f z‖ ≤ C\n[PROOFSTEP]\nobtain ⟨z, rfl⟩ : ∃ z', -z' = z := ⟨-z, neg_neg z⟩\n[GOAL]\ncase intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f (Ioi 0 ×ℂ Iio 0)\nhB : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 (Ioi 0 ×ℂ Iio 0)] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : ∀ (x : ℝ), 0 ≤ x → ‖f ↑x‖ ≤ C\nhim : ∀ (x : ℝ), x ≤ 0 → ‖f (↑x * I)‖ ≤ C\nz : ℂ\nhz_re : 0 ≤ (-z).re\nhz_im : (-z).im ≤ 0\n⊢ ‖f (-z)‖ ≤ C\n[PROOFSTEP]\nsimp only [neg_re, neg_im, neg_nonpos, neg_nonneg] at hz_re hz_im \n[GOAL]\ncase intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f (Ioi 0 ×ℂ Iio 0)\nhB : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 (Ioi 0 ×ℂ Iio 0)] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : ∀ (x : ℝ), 0 ≤ x → ‖f ↑x‖ ≤ C\nhim : ∀ (x : ℝ), x ≤ 0 → ‖f (↑x * I)‖ ≤ C\nz : ℂ\nhz_re : z.re ≤ 0\nhz_im : 0 ≤ z.im\n⊢ ‖f (-z)‖ ≤ C\n[PROOFSTEP]\nchange ‖(f ∘ Neg.neg) z‖ ≤ C\n[GOAL]\ncase intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f (Ioi 0 ×ℂ Iio 0)\nhB : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 (Ioi 0 ×ℂ Iio 0)] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : ∀ (x : ℝ), 0 ≤ x → ‖f ↑x‖ ≤ C\nhim : ∀ (x : ℝ), x ≤ 0 → ‖f (↑x * I)‖ ≤ C\nz : ℂ\nhz_re : z.re ≤ 0\nhz_im : 0 ≤ z.im\n⊢ ‖(f ∘ Neg.neg) z‖ ≤ C\n[PROOFSTEP]\nhave H : MapsTo Neg.neg (Iio 0 ×ℂ Ioi 0) (Ioi 0 ×ℂ Iio 0) := fun w hw ↦ by\n  simpa only [mem_reProdIm, neg_re, neg_im, neg_lt_zero, neg_pos, mem_Ioi, mem_Iio] using hw\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f (Ioi 0 ×ℂ Iio 0)\nhB : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 (Ioi 0 ×ℂ Iio 0)] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : ∀ (x : ℝ), 0 ≤ x → ‖f ↑x‖ ≤ C\nhim : ∀ (x : ℝ), x ≤ 0 → ‖f (↑x * I)‖ ≤ C\nz : ℂ\nhz_re : z.re ≤ 0\nhz_im : 0 ≤ z.im\nw : ℂ\nhw : w ∈ Iio 0 ×ℂ Ioi 0\n⊢ -w ∈ Ioi 0 ×ℂ Iio 0\n[PROOFSTEP]\nsimpa only [mem_reProdIm, neg_re, neg_im, neg_lt_zero, neg_pos, mem_Ioi, mem_Iio] using hw\n[GOAL]\ncase intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f (Ioi 0 ×ℂ Iio 0)\nhB : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 (Ioi 0 ×ℂ Iio 0)] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : ∀ (x : ℝ), 0 ≤ x → ‖f ↑x‖ ≤ C\nhim : ∀ (x : ℝ), x ≤ 0 → ‖f (↑x * I)‖ ≤ C\nz : ℂ\nhz_re : z.re ≤ 0\nhz_im : 0 ≤ z.im\nH : MapsTo Neg.neg (Iio 0 ×ℂ Ioi 0) (Ioi 0 ×ℂ Iio 0)\n⊢ ‖(f ∘ Neg.neg) z‖ ≤ C\n[PROOFSTEP]\nrefine' quadrant_II (hd.comp differentiable_neg.diffContOnCl H) _ (fun x hx => _) (fun x hx => _) hz_re hz_im\n[GOAL]\ncase intro.refine'_1\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f (Ioi 0 ×ℂ Iio 0)\nhB : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 (Ioi 0 ×ℂ Iio 0)] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : ∀ (x : ℝ), 0 ≤ x → ‖f ↑x‖ ≤ C\nhim : ∀ (x : ℝ), x ≤ 0 → ‖f (↑x * I)‖ ≤ C\nz : ℂ\nhz_re : z.re ≤ 0\nhz_im : 0 ≤ z.im\nH : MapsTo Neg.neg (Iio 0 ×ℂ Ioi 0) (Ioi 0 ×ℂ Iio 0)\n⊢ ∃ c,\n    c < 2 ∧\n      ∃ B, (f ∘ Neg.neg) =O[comap (↑Complex.abs) atTop ⊓ 𝓟 (Iio 0 ×ℂ Ioi 0)] fun z => expR (B * ↑Complex.abs z ^ c)\n[PROOFSTEP]\nrcases hB with ⟨c, hc, B, hO⟩\n[GOAL]\ncase intro.refine'_1.intro.intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f (Ioi 0 ×ℂ Iio 0)\nhre : ∀ (x : ℝ), 0 ≤ x → ‖f ↑x‖ ≤ C\nhim : ∀ (x : ℝ), x ≤ 0 → ‖f (↑x * I)‖ ≤ C\nz : ℂ\nhz_re : z.re ≤ 0\nhz_im : 0 ≤ z.im\nH : MapsTo Neg.neg (Iio 0 ×ℂ Ioi 0) (Ioi 0 ×ℂ Iio 0)\nc : ℝ\nhc : c < 2\nB : ℝ\nhO : f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 (Ioi 0 ×ℂ Iio 0)] fun z => expR (B * ↑Complex.abs z ^ c)\n⊢ ∃ c,\n    c < 2 ∧\n      ∃ B, (f ∘ Neg.neg) =O[comap (↑Complex.abs) atTop ⊓ 𝓟 (Iio 0 ×ℂ Ioi 0)] fun z => expR (B * ↑Complex.abs z ^ c)\n[PROOFSTEP]\nrefine ⟨c, hc, B, ?_⟩\n[GOAL]\ncase intro.refine'_1.intro.intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f (Ioi 0 ×ℂ Iio 0)\nhre : ∀ (x : ℝ), 0 ≤ x → ‖f ↑x‖ ≤ C\nhim : ∀ (x : ℝ), x ≤ 0 → ‖f (↑x * I)‖ ≤ C\nz : ℂ\nhz_re : z.re ≤ 0\nhz_im : 0 ≤ z.im\nH : MapsTo Neg.neg (Iio 0 ×ℂ Ioi 0) (Ioi 0 ×ℂ Iio 0)\nc : ℝ\nhc : c < 2\nB : ℝ\nhO : f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 (Ioi 0 ×ℂ Iio 0)] fun z => expR (B * ↑Complex.abs z ^ c)\n⊢ (f ∘ Neg.neg) =O[comap (↑Complex.abs) atTop ⊓ 𝓟 (Iio 0 ×ℂ Ioi 0)] fun z => expR (B * ↑Complex.abs z ^ c)\n[PROOFSTEP]\nsimpa only [(· ∘ ·), Complex.abs.map_neg] using hO.comp_tendsto (tendsto_neg_cobounded.inf H.tendsto)\n[GOAL]\ncase intro.refine'_2\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f (Ioi 0 ×ℂ Iio 0)\nhB : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 (Ioi 0 ×ℂ Iio 0)] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : ∀ (x : ℝ), 0 ≤ x → ‖f ↑x‖ ≤ C\nhim : ∀ (x : ℝ), x ≤ 0 → ‖f (↑x * I)‖ ≤ C\nz : ℂ\nhz_re : z.re ≤ 0\nhz_im : 0 ≤ z.im\nH : MapsTo Neg.neg (Iio 0 ×ℂ Ioi 0) (Ioi 0 ×ℂ Iio 0)\nx : ℝ\nhx : x ≤ 0\n⊢ ‖(f ∘ Neg.neg) ↑x‖ ≤ C\n[PROOFSTEP]\nrw [comp_apply, ← ofReal_neg]\n[GOAL]\ncase intro.refine'_2\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f (Ioi 0 ×ℂ Iio 0)\nhB : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 (Ioi 0 ×ℂ Iio 0)] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : ∀ (x : ℝ), 0 ≤ x → ‖f ↑x‖ ≤ C\nhim : ∀ (x : ℝ), x ≤ 0 → ‖f (↑x * I)‖ ≤ C\nz : ℂ\nhz_re : z.re ≤ 0\nhz_im : 0 ≤ z.im\nH : MapsTo Neg.neg (Iio 0 ×ℂ Ioi 0) (Ioi 0 ×ℂ Iio 0)\nx : ℝ\nhx : x ≤ 0\n⊢ ‖f ↑(-x)‖ ≤ C\n[PROOFSTEP]\nexact hre (-x) (neg_nonneg.2 hx)\n[GOAL]\ncase intro.refine'_3\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f (Ioi 0 ×ℂ Iio 0)\nhB : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 (Ioi 0 ×ℂ Iio 0)] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : ∀ (x : ℝ), 0 ≤ x → ‖f ↑x‖ ≤ C\nhim : ∀ (x : ℝ), x ≤ 0 → ‖f (↑x * I)‖ ≤ C\nz : ℂ\nhz_re : z.re ≤ 0\nhz_im : 0 ≤ z.im\nH : MapsTo Neg.neg (Iio 0 ×ℂ Ioi 0) (Ioi 0 ×ℂ Iio 0)\nx : ℝ\nhx : 0 ≤ x\n⊢ ‖(f ∘ Neg.neg) (↑x * I)‖ ≤ C\n[PROOFSTEP]\nrw [comp_apply, ← neg_mul, ← ofReal_neg]\n[GOAL]\ncase intro.refine'_3\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f (Ioi 0 ×ℂ Iio 0)\nhB : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 (Ioi 0 ×ℂ Iio 0)] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : ∀ (x : ℝ), 0 ≤ x → ‖f ↑x‖ ≤ C\nhim : ∀ (x : ℝ), x ≤ 0 → ‖f (↑x * I)‖ ≤ C\nz : ℂ\nhz_re : z.re ≤ 0\nhz_im : 0 ≤ z.im\nH : MapsTo Neg.neg (Iio 0 ×ℂ Ioi 0) (Ioi 0 ×ℂ Iio 0)\nx : ℝ\nhx : 0 ≤ x\n⊢ ‖f (↑(-x) * I)‖ ≤ C\n[PROOFSTEP]\nexact him (-x) (neg_nonpos.2 hx)\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nz : ℂ\nhd : DiffContOnCl ℂ f {z | 0 < z.re}\nhexp : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : Tendsto (fun x => f ↑x) atTop (𝓝 0)\nhim : ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\nhz : 0 ≤ z.re\n⊢ ‖f z‖ ≤ C\n[PROOFSTEP]\nrevert z\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f {z | 0 < z.re}\nhexp : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : Tendsto (fun x => f ↑x) atTop (𝓝 0)\nhim : ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\n⊢ ∀ {z : ℂ}, 0 ≤ z.re → ‖f z‖ ≤ C\n[PROOFSTEP]\nhave hle : ∀ C', (∀ x : ℝ, 0 ≤ x → ‖f x‖ ≤ C') → ∀ z : ℂ, 0 ≤ z.re → ‖f z‖ ≤ max C C' := fun C' hC' z hz ↦\n  by\n  rcases hexp with ⟨c, hc, B, hO⟩\n  cases' le_total z.im 0 with h h\n  · refine\n      quadrant_IV (hd.mono fun _ => And.left) ⟨c, hc, B, ?_⟩ (fun x hx => (hC' x hx).trans <| le_max_right _ _)\n        (fun x _ => (him x).trans (le_max_left _ _)) hz h\n    exact hO.mono (inf_le_inf_left _ <| principal_mono.2 fun _ => And.left)\n  · refine'\n      quadrant_I (hd.mono fun _ => And.left) ⟨c, hc, B, ?_⟩ (fun x hx => (hC' x hx).trans <| le_max_right _ _)\n        (fun x _ => (him x).trans (le_max_left _ _)) hz h\n    exact\n      hO.mono\n        (inf_le_inf_left _ <| principal_mono.2 fun _ => And.left)\n          -- Since `f` is continuous on `Ici 0` and `‖f x‖` tends to zero as `x → ∞`,\n            -- the norm `‖f x‖` takes its maximum value at some `x₀ : ℝ`.\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f {z | 0 < z.re}\nhexp : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : Tendsto (fun x => f ↑x) atTop (𝓝 0)\nhim : ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\nC' : ℝ\nhC' : ∀ (x : ℝ), 0 ≤ x → ‖f ↑x‖ ≤ C'\nz : ℂ\nhz : 0 ≤ z.re\n⊢ ‖f z‖ ≤ max C C'\n[PROOFSTEP]\nrcases hexp with ⟨c, hc, B, hO⟩\n[GOAL]\ncase intro.intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f {z | 0 < z.re}\nhre : Tendsto (fun x => f ↑x) atTop (𝓝 0)\nhim : ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\nC' : ℝ\nhC' : ∀ (x : ℝ), 0 ≤ x → ‖f ↑x‖ ≤ C'\nz : ℂ\nhz : 0 ≤ z.re\nc : ℝ\nhc : c < 2\nB : ℝ\nhO : f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\n⊢ ‖f z‖ ≤ max C C'\n[PROOFSTEP]\ncases' le_total z.im 0 with h h\n[GOAL]\ncase intro.intro.intro.inl\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f {z | 0 < z.re}\nhre : Tendsto (fun x => f ↑x) atTop (𝓝 0)\nhim : ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\nC' : ℝ\nhC' : ∀ (x : ℝ), 0 ≤ x → ‖f ↑x‖ ≤ C'\nz : ℂ\nhz : 0 ≤ z.re\nc : ℝ\nhc : c < 2\nB : ℝ\nhO : f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nh : z.im ≤ 0\n⊢ ‖f z‖ ≤ max C C'\n[PROOFSTEP]\nrefine\n  quadrant_IV (hd.mono fun _ => And.left) ⟨c, hc, B, ?_⟩ (fun x hx => (hC' x hx).trans <| le_max_right _ _)\n    (fun x _ => (him x).trans (le_max_left _ _)) hz h\n[GOAL]\ncase intro.intro.intro.inl\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f {z | 0 < z.re}\nhre : Tendsto (fun x => f ↑x) atTop (𝓝 0)\nhim : ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\nC' : ℝ\nhC' : ∀ (x : ℝ), 0 ≤ x → ‖f ↑x‖ ≤ C'\nz : ℂ\nhz : 0 ≤ z.re\nc : ℝ\nhc : c < 2\nB : ℝ\nhO : f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nh : z.im ≤ 0\n⊢ f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 (Ioi 0 ×ℂ Iio 0)] fun z => expR (B * ↑Complex.abs z ^ c)\n[PROOFSTEP]\nexact hO.mono (inf_le_inf_left _ <| principal_mono.2 fun _ => And.left)\n[GOAL]\ncase intro.intro.intro.inr\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f {z | 0 < z.re}\nhre : Tendsto (fun x => f ↑x) atTop (𝓝 0)\nhim : ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\nC' : ℝ\nhC' : ∀ (x : ℝ), 0 ≤ x → ‖f ↑x‖ ≤ C'\nz : ℂ\nhz : 0 ≤ z.re\nc : ℝ\nhc : c < 2\nB : ℝ\nhO : f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nh : 0 ≤ z.im\n⊢ ‖f z‖ ≤ max C C'\n[PROOFSTEP]\nrefine'\n  quadrant_I (hd.mono fun _ => And.left) ⟨c, hc, B, ?_⟩ (fun x hx => (hC' x hx).trans <| le_max_right _ _)\n    (fun x _ => (him x).trans (le_max_left _ _)) hz h\n[GOAL]\ncase intro.intro.intro.inr\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f {z | 0 < z.re}\nhre : Tendsto (fun x => f ↑x) atTop (𝓝 0)\nhim : ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\nC' : ℝ\nhC' : ∀ (x : ℝ), 0 ≤ x → ‖f ↑x‖ ≤ C'\nz : ℂ\nhz : 0 ≤ z.re\nc : ℝ\nhc : c < 2\nB : ℝ\nhO : f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nh : 0 ≤ z.im\n⊢ f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 (Ioi 0 ×ℂ Ioi 0)] fun z => expR (B * ↑Complex.abs z ^ c)\n[PROOFSTEP]\nexact\n  hO.mono\n    (inf_le_inf_left _ <| principal_mono.2 fun _ => And.left)\n      -- Since `f` is continuous on `Ici 0` and `‖f x‖` tends to zero as `x → ∞`,\n        -- the norm `‖f x‖` takes its maximum value at some `x₀ : ℝ`.\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f {z | 0 < z.re}\nhexp : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : Tendsto (fun x => f ↑x) atTop (𝓝 0)\nhim : ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\nhle : ∀ (C' : ℝ), (∀ (x : ℝ), 0 ≤ x → ‖f ↑x‖ ≤ C') → ∀ (z : ℂ), 0 ≤ z.re → ‖f z‖ ≤ max C C'\n⊢ ∀ {z : ℂ}, 0 ≤ z.re → ‖f z‖ ≤ C\n[PROOFSTEP]\nobtain ⟨x₀, hx₀, hmax⟩ : ∃ x : ℝ, 0 ≤ x ∧ ∀ y : ℝ, 0 ≤ y → ‖f y‖ ≤ ‖f x‖ :=\n  by\n  have hfc : ContinuousOn (fun x : ℝ => f x) (Ici 0) :=\n    by\n    refine' hd.continuousOn.comp continuous_ofReal.continuousOn fun x hx => _\n    rwa [closure_setOf_lt_re]\n  by_cases h₀ : ∀ x : ℝ, 0 ≤ x → f x = 0\n  · refine' ⟨0, le_rfl, fun y hy => _⟩; rw [h₀ y hy, h₀ 0 le_rfl]\n  push_neg at h₀ \n  rcases h₀ with ⟨x₀, hx₀, hne⟩\n  have hlt : ‖(0 : E)‖ < ‖f x₀‖ := by rwa [norm_zero, norm_pos_iff]\n  suffices ∀ᶠ x : ℝ in cocompact ℝ ⊓ 𝓟 (Ici 0), ‖f x‖ ≤ ‖f x₀‖ by\n    simpa only [exists_prop] using hfc.norm.exists_forall_ge' isClosed_Ici hx₀ this\n  rw [Real.cocompact_eq, inf_sup_right, (disjoint_atBot_principal_Ici (0 : ℝ)).eq_bot, bot_sup_eq]\n  exact (hre.norm.eventually <| ge_mem_nhds hlt).filter_mono inf_le_left\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f {z | 0 < z.re}\nhexp : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : Tendsto (fun x => f ↑x) atTop (𝓝 0)\nhim : ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\nhle : ∀ (C' : ℝ), (∀ (x : ℝ), 0 ≤ x → ‖f ↑x‖ ≤ C') → ∀ (z : ℂ), 0 ≤ z.re → ‖f z‖ ≤ max C C'\n⊢ ∃ x, 0 ≤ x ∧ ∀ (y : ℝ), 0 ≤ y → ‖f ↑y‖ ≤ ‖f ↑x‖\n[PROOFSTEP]\nhave hfc : ContinuousOn (fun x : ℝ => f x) (Ici 0) :=\n  by\n  refine' hd.continuousOn.comp continuous_ofReal.continuousOn fun x hx => _\n  rwa [closure_setOf_lt_re]\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f {z | 0 < z.re}\nhexp : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : Tendsto (fun x => f ↑x) atTop (𝓝 0)\nhim : ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\nhle : ∀ (C' : ℝ), (∀ (x : ℝ), 0 ≤ x → ‖f ↑x‖ ≤ C') → ∀ (z : ℂ), 0 ≤ z.re → ‖f z‖ ≤ max C C'\n⊢ ContinuousOn (fun x => f ↑x) (Ici 0)\n[PROOFSTEP]\nrefine' hd.continuousOn.comp continuous_ofReal.continuousOn fun x hx => _\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f {z | 0 < z.re}\nhexp : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : Tendsto (fun x => f ↑x) atTop (𝓝 0)\nhim : ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\nhle : ∀ (C' : ℝ), (∀ (x : ℝ), 0 ≤ x → ‖f ↑x‖ ≤ C') → ∀ (z : ℂ), 0 ≤ z.re → ‖f z‖ ≤ max C C'\nx : ℝ\nhx : x ∈ Ici 0\n⊢ ↑x ∈ closure {z | 0 < z.re}\n[PROOFSTEP]\nrwa [closure_setOf_lt_re]\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f {z | 0 < z.re}\nhexp : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : Tendsto (fun x => f ↑x) atTop (𝓝 0)\nhim : ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\nhle : ∀ (C' : ℝ), (∀ (x : ℝ), 0 ≤ x → ‖f ↑x‖ ≤ C') → ∀ (z : ℂ), 0 ≤ z.re → ‖f z‖ ≤ max C C'\nhfc : ContinuousOn (fun x => f ↑x) (Ici 0)\n⊢ ∃ x, 0 ≤ x ∧ ∀ (y : ℝ), 0 ≤ y → ‖f ↑y‖ ≤ ‖f ↑x‖\n[PROOFSTEP]\nby_cases h₀ : ∀ x : ℝ, 0 ≤ x → f x = 0\n[GOAL]\ncase pos\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f {z | 0 < z.re}\nhexp : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : Tendsto (fun x => f ↑x) atTop (𝓝 0)\nhim : ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\nhle : ∀ (C' : ℝ), (∀ (x : ℝ), 0 ≤ x → ‖f ↑x‖ ≤ C') → ∀ (z : ℂ), 0 ≤ z.re → ‖f z‖ ≤ max C C'\nhfc : ContinuousOn (fun x => f ↑x) (Ici 0)\nh₀ : ∀ (x : ℝ), 0 ≤ x → f ↑x = 0\n⊢ ∃ x, 0 ≤ x ∧ ∀ (y : ℝ), 0 ≤ y → ‖f ↑y‖ ≤ ‖f ↑x‖\n[PROOFSTEP]\nrefine' ⟨0, le_rfl, fun y hy => _⟩\n[GOAL]\ncase pos\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f {z | 0 < z.re}\nhexp : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : Tendsto (fun x => f ↑x) atTop (𝓝 0)\nhim : ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\nhle : ∀ (C' : ℝ), (∀ (x : ℝ), 0 ≤ x → ‖f ↑x‖ ≤ C') → ∀ (z : ℂ), 0 ≤ z.re → ‖f z‖ ≤ max C C'\nhfc : ContinuousOn (fun x => f ↑x) (Ici 0)\nh₀ : ∀ (x : ℝ), 0 ≤ x → f ↑x = 0\ny : ℝ\nhy : 0 ≤ y\n⊢ ‖f ↑y‖ ≤ ‖f ↑0‖\n[PROOFSTEP]\nrw [h₀ y hy, h₀ 0 le_rfl]\n[GOAL]\ncase neg\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f {z | 0 < z.re}\nhexp : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : Tendsto (fun x => f ↑x) atTop (𝓝 0)\nhim : ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\nhle : ∀ (C' : ℝ), (∀ (x : ℝ), 0 ≤ x → ‖f ↑x‖ ≤ C') → ∀ (z : ℂ), 0 ≤ z.re → ‖f z‖ ≤ max C C'\nhfc : ContinuousOn (fun x => f ↑x) (Ici 0)\nh₀ : ¬∀ (x : ℝ), 0 ≤ x → f ↑x = 0\n⊢ ∃ x, 0 ≤ x ∧ ∀ (y : ℝ), 0 ≤ y → ‖f ↑y‖ ≤ ‖f ↑x‖\n[PROOFSTEP]\npush_neg at h₀ \n[GOAL]\ncase neg\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f {z | 0 < z.re}\nhexp : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : Tendsto (fun x => f ↑x) atTop (𝓝 0)\nhim : ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\nhle : ∀ (C' : ℝ), (∀ (x : ℝ), 0 ≤ x → ‖f ↑x‖ ≤ C') → ∀ (z : ℂ), 0 ≤ z.re → ‖f z‖ ≤ max C C'\nhfc : ContinuousOn (fun x => f ↑x) (Ici 0)\nh₀ : ∃ x, 0 ≤ x ∧ f ↑x ≠ 0\n⊢ ∃ x, 0 ≤ x ∧ ∀ (y : ℝ), 0 ≤ y → ‖f ↑y‖ ≤ ‖f ↑x‖\n[PROOFSTEP]\nrcases h₀ with ⟨x₀, hx₀, hne⟩\n[GOAL]\ncase neg.intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f {z | 0 < z.re}\nhexp : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : Tendsto (fun x => f ↑x) atTop (𝓝 0)\nhim : ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\nhle : ∀ (C' : ℝ), (∀ (x : ℝ), 0 ≤ x → ‖f ↑x‖ ≤ C') → ∀ (z : ℂ), 0 ≤ z.re → ‖f z‖ ≤ max C C'\nhfc : ContinuousOn (fun x => f ↑x) (Ici 0)\nx₀ : ℝ\nhx₀ : 0 ≤ x₀\nhne : f ↑x₀ ≠ 0\n⊢ ∃ x, 0 ≤ x ∧ ∀ (y : ℝ), 0 ≤ y → ‖f ↑y‖ ≤ ‖f ↑x‖\n[PROOFSTEP]\nhave hlt : ‖(0 : E)‖ < ‖f x₀‖ := by rwa [norm_zero, norm_pos_iff]\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f {z | 0 < z.re}\nhexp : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : Tendsto (fun x => f ↑x) atTop (𝓝 0)\nhim : ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\nhle : ∀ (C' : ℝ), (∀ (x : ℝ), 0 ≤ x → ‖f ↑x‖ ≤ C') → ∀ (z : ℂ), 0 ≤ z.re → ‖f z‖ ≤ max C C'\nhfc : ContinuousOn (fun x => f ↑x) (Ici 0)\nx₀ : ℝ\nhx₀ : 0 ≤ x₀\nhne : f ↑x₀ ≠ 0\n⊢ ‖0‖ < ‖f ↑x₀‖\n[PROOFSTEP]\nrwa [norm_zero, norm_pos_iff]\n[GOAL]\ncase neg.intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f {z | 0 < z.re}\nhexp : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : Tendsto (fun x => f ↑x) atTop (𝓝 0)\nhim : ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\nhle : ∀ (C' : ℝ), (∀ (x : ℝ), 0 ≤ x → ‖f ↑x‖ ≤ C') → ∀ (z : ℂ), 0 ≤ z.re → ‖f z‖ ≤ max C C'\nhfc : ContinuousOn (fun x => f ↑x) (Ici 0)\nx₀ : ℝ\nhx₀ : 0 ≤ x₀\nhne : f ↑x₀ ≠ 0\nhlt : ‖0‖ < ‖f ↑x₀‖\n⊢ ∃ x, 0 ≤ x ∧ ∀ (y : ℝ), 0 ≤ y → ‖f ↑y‖ ≤ ‖f ↑x‖\n[PROOFSTEP]\nsuffices ∀ᶠ x : ℝ in cocompact ℝ ⊓ 𝓟 (Ici 0), ‖f x‖ ≤ ‖f x₀‖ by\n  simpa only [exists_prop] using hfc.norm.exists_forall_ge' isClosed_Ici hx₀ this\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f {z | 0 < z.re}\nhexp : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : Tendsto (fun x => f ↑x) atTop (𝓝 0)\nhim : ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\nhle : ∀ (C' : ℝ), (∀ (x : ℝ), 0 ≤ x → ‖f ↑x‖ ≤ C') → ∀ (z : ℂ), 0 ≤ z.re → ‖f z‖ ≤ max C C'\nhfc : ContinuousOn (fun x => f ↑x) (Ici 0)\nx₀ : ℝ\nhx₀ : 0 ≤ x₀\nhne : f ↑x₀ ≠ 0\nhlt : ‖0‖ < ‖f ↑x₀‖\nthis : ∀ᶠ (x : ℝ) in cocompact ℝ ⊓ 𝓟 (Ici 0), ‖f ↑x‖ ≤ ‖f ↑x₀‖\n⊢ ∃ x, 0 ≤ x ∧ ∀ (y : ℝ), 0 ≤ y → ‖f ↑y‖ ≤ ‖f ↑x‖\n[PROOFSTEP]\nsimpa only [exists_prop] using hfc.norm.exists_forall_ge' isClosed_Ici hx₀ this\n[GOAL]\ncase neg.intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f {z | 0 < z.re}\nhexp : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : Tendsto (fun x => f ↑x) atTop (𝓝 0)\nhim : ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\nhle : ∀ (C' : ℝ), (∀ (x : ℝ), 0 ≤ x → ‖f ↑x‖ ≤ C') → ∀ (z : ℂ), 0 ≤ z.re → ‖f z‖ ≤ max C C'\nhfc : ContinuousOn (fun x => f ↑x) (Ici 0)\nx₀ : ℝ\nhx₀ : 0 ≤ x₀\nhne : f ↑x₀ ≠ 0\nhlt : ‖0‖ < ‖f ↑x₀‖\n⊢ ∀ᶠ (x : ℝ) in cocompact ℝ ⊓ 𝓟 (Ici 0), ‖f ↑x‖ ≤ ‖f ↑x₀‖\n[PROOFSTEP]\nrw [Real.cocompact_eq, inf_sup_right, (disjoint_atBot_principal_Ici (0 : ℝ)).eq_bot, bot_sup_eq]\n[GOAL]\ncase neg.intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f {z | 0 < z.re}\nhexp : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : Tendsto (fun x => f ↑x) atTop (𝓝 0)\nhim : ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\nhle : ∀ (C' : ℝ), (∀ (x : ℝ), 0 ≤ x → ‖f ↑x‖ ≤ C') → ∀ (z : ℂ), 0 ≤ z.re → ‖f z‖ ≤ max C C'\nhfc : ContinuousOn (fun x => f ↑x) (Ici 0)\nx₀ : ℝ\nhx₀ : 0 ≤ x₀\nhne : f ↑x₀ ≠ 0\nhlt : ‖0‖ < ‖f ↑x₀‖\n⊢ ∀ᶠ (x : ℝ) in atTop ⊓ 𝓟 (Ici 0), ‖f ↑x‖ ≤ ‖f ↑x₀‖\n[PROOFSTEP]\nexact (hre.norm.eventually <| ge_mem_nhds hlt).filter_mono inf_le_left\n[GOAL]\ncase intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f {z | 0 < z.re}\nhexp : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : Tendsto (fun x => f ↑x) atTop (𝓝 0)\nhim : ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\nhle : ∀ (C' : ℝ), (∀ (x : ℝ), 0 ≤ x → ‖f ↑x‖ ≤ C') → ∀ (z : ℂ), 0 ≤ z.re → ‖f z‖ ≤ max C C'\nx₀ : ℝ\nhx₀ : 0 ≤ x₀\nhmax : ∀ (y : ℝ), 0 ≤ y → ‖f ↑y‖ ≤ ‖f ↑x₀‖\n⊢ ∀ {z : ℂ}, 0 ≤ z.re → ‖f z‖ ≤ C\n[PROOFSTEP]\ncases' le_or_lt ‖f x₀‖ C with h h\n[GOAL]\ncase intro.intro.inl\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f {z | 0 < z.re}\nhexp : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : Tendsto (fun x => f ↑x) atTop (𝓝 0)\nhim : ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\nhle : ∀ (C' : ℝ), (∀ (x : ℝ), 0 ≤ x → ‖f ↑x‖ ≤ C') → ∀ (z : ℂ), 0 ≤ z.re → ‖f z‖ ≤ max C C'\nx₀ : ℝ\nhx₀ : 0 ≤ x₀\nhmax : ∀ (y : ℝ), 0 ≤ y → ‖f ↑y‖ ≤ ‖f ↑x₀‖\nh : ‖f ↑x₀‖ ≤ C\n⊢ ∀ {z : ℂ}, 0 ≤ z.re → ‖f z‖ ≤ C\n[PROOFSTEP]\nsimpa only [max_eq_left h] using hle _ hmax\n[GOAL]\ncase intro.intro.inr\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f {z | 0 < z.re}\nhexp : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : Tendsto (fun x => f ↑x) atTop (𝓝 0)\nhim : ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\nhle : ∀ (C' : ℝ), (∀ (x : ℝ), 0 ≤ x → ‖f ↑x‖ ≤ C') → ∀ (z : ℂ), 0 ≤ z.re → ‖f z‖ ≤ max C C'\nx₀ : ℝ\nhx₀ : 0 ≤ x₀\nhmax : ∀ (y : ℝ), 0 ≤ y → ‖f ↑y‖ ≤ ‖f ↑x₀‖\nh : C < ‖f ↑x₀‖\n⊢ ∀ {z : ℂ}, 0 ≤ z.re → ‖f z‖ ≤ C\n[PROOFSTEP]\nreplace hmax : IsMaxOn (norm ∘ f) {z | 0 < z.re} x₀\n[GOAL]\ncase hmax\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f {z | 0 < z.re}\nhexp : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : Tendsto (fun x => f ↑x) atTop (𝓝 0)\nhim : ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\nhle : ∀ (C' : ℝ), (∀ (x : ℝ), 0 ≤ x → ‖f ↑x‖ ≤ C') → ∀ (z : ℂ), 0 ≤ z.re → ‖f z‖ ≤ max C C'\nx₀ : ℝ\nhx₀ : 0 ≤ x₀\nhmax : ∀ (y : ℝ), 0 ≤ y → ‖f ↑y‖ ≤ ‖f ↑x₀‖\nh : C < ‖f ↑x₀‖\n⊢ IsMaxOn (norm ∘ f) {z | 0 < z.re} ↑x₀\n[PROOFSTEP]\nrintro z (hz : 0 < z.re)\n[GOAL]\ncase hmax\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f {z | 0 < z.re}\nhexp : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : Tendsto (fun x => f ↑x) atTop (𝓝 0)\nhim : ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\nhle : ∀ (C' : ℝ), (∀ (x : ℝ), 0 ≤ x → ‖f ↑x‖ ≤ C') → ∀ (z : ℂ), 0 ≤ z.re → ‖f z‖ ≤ max C C'\nx₀ : ℝ\nhx₀ : 0 ≤ x₀\nhmax : ∀ (y : ℝ), 0 ≤ y → ‖f ↑y‖ ≤ ‖f ↑x₀‖\nh : C < ‖f ↑x₀‖\nz : ℂ\nhz : 0 < z.re\n⊢ z ∈ {x | (fun x => (norm ∘ f) x ≤ (norm ∘ f) ↑x₀) x}\n[PROOFSTEP]\nsimpa [max_eq_right h.le] using hle _ hmax _ hz.le\n[GOAL]\ncase intro.intro.inr\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f {z | 0 < z.re}\nhexp : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : Tendsto (fun x => f ↑x) atTop (𝓝 0)\nhim : ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\nhle : ∀ (C' : ℝ), (∀ (x : ℝ), 0 ≤ x → ‖f ↑x‖ ≤ C') → ∀ (z : ℂ), 0 ≤ z.re → ‖f z‖ ≤ max C C'\nx₀ : ℝ\nhx₀ : 0 ≤ x₀\nh : C < ‖f ↑x₀‖\nhmax : IsMaxOn (norm ∘ f) {z | 0 < z.re} ↑x₀\n⊢ ∀ {z : ℂ}, 0 ≤ z.re → ‖f z‖ ≤ C\n[PROOFSTEP]\nhave : ‖f 0‖ = ‖f x₀‖ := by\n  apply norm_eq_norm_of_isMaxOn_of_ball_subset hd hmax\n  intro z hz\n  rw [mem_ball, dist_zero_left, dist_eq, norm_eq_abs, Complex.abs_of_nonneg hx₀] at hz \n  rw [mem_setOf_eq]\n  contrapose! hz\n  calc\n    x₀ ≤ x₀ - z.re := (le_sub_self_iff _).2 hz\n    _ ≤ |x₀ - z.re| := (le_abs_self _)\n    _ = |(z - x₀).re| := by rw [sub_re, ofReal_re, _root_.abs_sub_comm]\n    _ ≤ abs (z - x₀) :=\n      abs_re_le_abs\n        _\n          -- Thus we have `C < ‖f x₀‖ = ‖f 0‖ ≤ C`. Contradiction completes the proof.\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f {z | 0 < z.re}\nhexp : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : Tendsto (fun x => f ↑x) atTop (𝓝 0)\nhim : ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\nhle : ∀ (C' : ℝ), (∀ (x : ℝ), 0 ≤ x → ‖f ↑x‖ ≤ C') → ∀ (z : ℂ), 0 ≤ z.re → ‖f z‖ ≤ max C C'\nx₀ : ℝ\nhx₀ : 0 ≤ x₀\nh : C < ‖f ↑x₀‖\nhmax : IsMaxOn (norm ∘ f) {z | 0 < z.re} ↑x₀\n⊢ ‖f 0‖ = ‖f ↑x₀‖\n[PROOFSTEP]\napply norm_eq_norm_of_isMaxOn_of_ball_subset hd hmax\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f {z | 0 < z.re}\nhexp : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : Tendsto (fun x => f ↑x) atTop (𝓝 0)\nhim : ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\nhle : ∀ (C' : ℝ), (∀ (x : ℝ), 0 ≤ x → ‖f ↑x‖ ≤ C') → ∀ (z : ℂ), 0 ≤ z.re → ‖f z‖ ≤ max C C'\nx₀ : ℝ\nhx₀ : 0 ≤ x₀\nh : C < ‖f ↑x₀‖\nhmax : IsMaxOn (norm ∘ f) {z | 0 < z.re} ↑x₀\n⊢ ball (↑x₀) (dist 0 ↑x₀) ⊆ {z | 0 < z.re}\n[PROOFSTEP]\nintro z hz\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f {z | 0 < z.re}\nhexp : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : Tendsto (fun x => f ↑x) atTop (𝓝 0)\nhim : ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\nhle : ∀ (C' : ℝ), (∀ (x : ℝ), 0 ≤ x → ‖f ↑x‖ ≤ C') → ∀ (z : ℂ), 0 ≤ z.re → ‖f z‖ ≤ max C C'\nx₀ : ℝ\nhx₀ : 0 ≤ x₀\nh : C < ‖f ↑x₀‖\nhmax : IsMaxOn (norm ∘ f) {z | 0 < z.re} ↑x₀\nz : ℂ\nhz : z ∈ ball (↑x₀) (dist 0 ↑x₀)\n⊢ z ∈ {z | 0 < z.re}\n[PROOFSTEP]\nrw [mem_ball, dist_zero_left, dist_eq, norm_eq_abs, Complex.abs_of_nonneg hx₀] at hz \n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f {z | 0 < z.re}\nhexp : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : Tendsto (fun x => f ↑x) atTop (𝓝 0)\nhim : ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\nhle : ∀ (C' : ℝ), (∀ (x : ℝ), 0 ≤ x → ‖f ↑x‖ ≤ C') → ∀ (z : ℂ), 0 ≤ z.re → ‖f z‖ ≤ max C C'\nx₀ : ℝ\nhx₀ : 0 ≤ x₀\nh : C < ‖f ↑x₀‖\nhmax : IsMaxOn (norm ∘ f) {z | 0 < z.re} ↑x₀\nz : ℂ\nhz : ↑Complex.abs (z - ↑x₀) < x₀\n⊢ z ∈ {z | 0 < z.re}\n[PROOFSTEP]\nrw [mem_setOf_eq]\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f {z | 0 < z.re}\nhexp : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : Tendsto (fun x => f ↑x) atTop (𝓝 0)\nhim : ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\nhle : ∀ (C' : ℝ), (∀ (x : ℝ), 0 ≤ x → ‖f ↑x‖ ≤ C') → ∀ (z : ℂ), 0 ≤ z.re → ‖f z‖ ≤ max C C'\nx₀ : ℝ\nhx₀ : 0 ≤ x₀\nh : C < ‖f ↑x₀‖\nhmax : IsMaxOn (norm ∘ f) {z | 0 < z.re} ↑x₀\nz : ℂ\nhz : ↑Complex.abs (z - ↑x₀) < x₀\n⊢ 0 < z.re\n[PROOFSTEP]\ncontrapose! hz\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f {z | 0 < z.re}\nhexp : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : Tendsto (fun x => f ↑x) atTop (𝓝 0)\nhim : ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\nhle : ∀ (C' : ℝ), (∀ (x : ℝ), 0 ≤ x → ‖f ↑x‖ ≤ C') → ∀ (z : ℂ), 0 ≤ z.re → ‖f z‖ ≤ max C C'\nx₀ : ℝ\nhx₀ : 0 ≤ x₀\nh : C < ‖f ↑x₀‖\nhmax : IsMaxOn (norm ∘ f) {z | 0 < z.re} ↑x₀\nz : ℂ\nhz : z.re ≤ 0\n⊢ x₀ ≤ ↑Complex.abs (z - ↑x₀)\n[PROOFSTEP]\ncalc\n  x₀ ≤ x₀ - z.re := (le_sub_self_iff _).2 hz\n  _ ≤ |x₀ - z.re| := (le_abs_self _)\n  _ = |(z - x₀).re| := by rw [sub_re, ofReal_re, _root_.abs_sub_comm]\n  _ ≤ abs (z - x₀) :=\n    abs_re_le_abs\n      _\n        -- Thus we have `C < ‖f x₀‖ = ‖f 0‖ ≤ C`. Contradiction completes the proof.\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f {z | 0 < z.re}\nhexp : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : Tendsto (fun x => f ↑x) atTop (𝓝 0)\nhim : ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\nhle : ∀ (C' : ℝ), (∀ (x : ℝ), 0 ≤ x → ‖f ↑x‖ ≤ C') → ∀ (z : ℂ), 0 ≤ z.re → ‖f z‖ ≤ max C C'\nx₀ : ℝ\nhx₀ : 0 ≤ x₀\nh : C < ‖f ↑x₀‖\nhmax : IsMaxOn (norm ∘ f) {z | 0 < z.re} ↑x₀\nz : ℂ\nhz : z.re ≤ 0\n⊢ |x₀ - z.re| = |(z - ↑x₀).re|\n[PROOFSTEP]\nrw [sub_re, ofReal_re, _root_.abs_sub_comm]\n[GOAL]\ncase intro.intro.inr\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f {z | 0 < z.re}\nhexp : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : Tendsto (fun x => f ↑x) atTop (𝓝 0)\nhim : ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\nhle : ∀ (C' : ℝ), (∀ (x : ℝ), 0 ≤ x → ‖f ↑x‖ ≤ C') → ∀ (z : ℂ), 0 ≤ z.re → ‖f z‖ ≤ max C C'\nx₀ : ℝ\nhx₀ : 0 ≤ x₀\nh : C < ‖f ↑x₀‖\nhmax : IsMaxOn (norm ∘ f) {z | 0 < z.re} ↑x₀\nthis : ‖f 0‖ = ‖f ↑x₀‖\n⊢ ∀ {z : ℂ}, 0 ≤ z.re → ‖f z‖ ≤ C\n[PROOFSTEP]\nrefine' (h.not_le <| this ▸ _).elim\n[GOAL]\ncase intro.intro.inr\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nhd : DiffContOnCl ℂ f {z | 0 < z.re}\nhexp : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : Tendsto (fun x => f ↑x) atTop (𝓝 0)\nhim : ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\nhle : ∀ (C' : ℝ), (∀ (x : ℝ), 0 ≤ x → ‖f ↑x‖ ≤ C') → ∀ (z : ℂ), 0 ≤ z.re → ‖f z‖ ≤ max C C'\nx₀ : ℝ\nhx₀ : 0 ≤ x₀\nh : C < ‖f ↑x₀‖\nhmax : IsMaxOn (norm ∘ f) {z | 0 < z.re} ↑x₀\nthis : ‖f 0‖ = ‖f ↑x₀‖\n⊢ ‖f 0‖ ≤ C\n[PROOFSTEP]\nsimpa using him 0\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nz : ℂ\nhd : DiffContOnCl ℂ f {z | 0 < z.re}\nhexp : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : IsBoundedUnder (fun x x_1 => x ≤ x_1) atTop fun x => ‖f ↑x‖\nhim : ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\nhz : 0 ≤ z.re\n⊢ ‖f z‖ ≤ C\n[PROOFSTEP]\nsuffices ∀ᶠ ε : ℝ in 𝓝[<] 0, ‖exp (ε * z) • f z‖ ≤ C\n  by\n  refine' le_of_tendsto (Tendsto.mono_left _ nhdsWithin_le_nhds) this\n  apply ((continuous_ofReal.mul continuous_const).cexp.smul continuous_const).norm.tendsto'\n  simp\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nz : ℂ\nhd : DiffContOnCl ℂ f {z | 0 < z.re}\nhexp : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : IsBoundedUnder (fun x x_1 => x ≤ x_1) atTop fun x => ‖f ↑x‖\nhim : ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\nhz : 0 ≤ z.re\nthis : ∀ᶠ (ε : ℝ) in 𝓝[Iio 0] 0, ‖exp (↑ε * z) • f z‖ ≤ C\n⊢ ‖f z‖ ≤ C\n[PROOFSTEP]\nrefine' le_of_tendsto (Tendsto.mono_left _ nhdsWithin_le_nhds) this\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nz : ℂ\nhd : DiffContOnCl ℂ f {z | 0 < z.re}\nhexp : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : IsBoundedUnder (fun x x_1 => x ≤ x_1) atTop fun x => ‖f ↑x‖\nhim : ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\nhz : 0 ≤ z.re\nthis : ∀ᶠ (ε : ℝ) in 𝓝[Iio 0] 0, ‖exp (↑ε * z) • f z‖ ≤ C\n⊢ Tendsto (fun c => ‖exp (↑c * z) • f z‖) (𝓝 0) (𝓝 ‖f z‖)\n[PROOFSTEP]\napply ((continuous_ofReal.mul continuous_const).cexp.smul continuous_const).norm.tendsto'\n[GOAL]\ncase h\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nz : ℂ\nhd : DiffContOnCl ℂ f {z | 0 < z.re}\nhexp : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : IsBoundedUnder (fun x x_1 => x ≤ x_1) atTop fun x => ‖f ↑x‖\nhim : ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\nhz : 0 ≤ z.re\nthis : ∀ᶠ (ε : ℝ) in 𝓝[Iio 0] 0, ‖exp (↑ε * z) • f z‖ ≤ C\n⊢ ‖exp (↑0 * z) • f z‖ = ‖f z‖\n[PROOFSTEP]\nsimp\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nz : ℂ\nhd : DiffContOnCl ℂ f {z | 0 < z.re}\nhexp : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : IsBoundedUnder (fun x x_1 => x ≤ x_1) atTop fun x => ‖f ↑x‖\nhim : ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\nhz : 0 ≤ z.re\n⊢ ∀ᶠ (ε : ℝ) in 𝓝[Iio 0] 0, ‖exp (↑ε * z) • f z‖ ≤ C\n[PROOFSTEP]\nfilter_upwards [self_mem_nhdsWithin] with ε ε₀\n[GOAL]\ncase h\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nz : ℂ\nhd : DiffContOnCl ℂ f {z | 0 < z.re}\nhexp : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : IsBoundedUnder (fun x x_1 => x ≤ x_1) atTop fun x => ‖f ↑x‖\nhim : ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\nhz : 0 ≤ z.re\nε : ℝ\nε₀ : ε ∈ Iio 0\n⊢ ‖exp (↑ε * z) • f z‖ ≤ C\n[PROOFSTEP]\nchange ε < 0 at ε₀ \n[GOAL]\ncase h\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nz : ℂ\nhd : DiffContOnCl ℂ f {z | 0 < z.re}\nhexp : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : IsBoundedUnder (fun x x_1 => x ≤ x_1) atTop fun x => ‖f ↑x‖\nhim : ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\nhz : 0 ≤ z.re\nε : ℝ\nε₀ : ε < 0\n⊢ ‖exp (↑ε * z) • f z‖ ≤ C\n[PROOFSTEP]\nset g : ℂ → E := fun z => exp (ε * z) • f z\n[GOAL]\ncase h\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g✝ : ℂ → E\nz : ℂ\nhd : DiffContOnCl ℂ f {z | 0 < z.re}\nhexp : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : IsBoundedUnder (fun x x_1 => x ≤ x_1) atTop fun x => ‖f ↑x‖\nhim : ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\nhz : 0 ≤ z.re\nε : ℝ\nε₀ : ε < 0\ng : ℂ → E := fun z => exp (↑ε * z) • f z\n⊢ ‖exp (↑ε * z) • f z‖ ≤ C\n[PROOFSTEP]\nchange ‖g z‖ ≤ C\n[GOAL]\ncase h\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g✝ : ℂ → E\nz : ℂ\nhd : DiffContOnCl ℂ f {z | 0 < z.re}\nhexp : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : IsBoundedUnder (fun x x_1 => x ≤ x_1) atTop fun x => ‖f ↑x‖\nhim : ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\nhz : 0 ≤ z.re\nε : ℝ\nε₀ : ε < 0\ng : ℂ → E := fun z => exp (↑ε * z) • f z\n⊢ ‖g z‖ ≤ C\n[PROOFSTEP]\nreplace hd : DiffContOnCl ℂ g {z : ℂ | 0 < z.re}\n[GOAL]\ncase hd\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g✝ : ℂ → E\nz : ℂ\nhd : DiffContOnCl ℂ f {z | 0 < z.re}\nhexp : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : IsBoundedUnder (fun x x_1 => x ≤ x_1) atTop fun x => ‖f ↑x‖\nhim : ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\nhz : 0 ≤ z.re\nε : ℝ\nε₀ : ε < 0\ng : ℂ → E := fun z => exp (↑ε * z) • f z\n⊢ DiffContOnCl ℂ g {z | 0 < z.re}\ncase h\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g✝ : ℂ → E\nz : ℂ\nhexp : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : IsBoundedUnder (fun x x_1 => x ≤ x_1) atTop fun x => ‖f ↑x‖\nhim : ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\nhz : 0 ≤ z.re\nε : ℝ\nε₀ : ε < 0\ng : ℂ → E := fun z => exp (↑ε * z) • f z\nhd : DiffContOnCl ℂ g {z | 0 < z.re}\n⊢ ‖g z‖ ≤ C\n[PROOFSTEP]\nexact (differentiable_id.const_mul _).cexp.diffContOnCl.smul hd\n[GOAL]\ncase h\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g✝ : ℂ → E\nz : ℂ\nhexp : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : IsBoundedUnder (fun x x_1 => x ≤ x_1) atTop fun x => ‖f ↑x‖\nhim : ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\nhz : 0 ≤ z.re\nε : ℝ\nε₀ : ε < 0\ng : ℂ → E := fun z => exp (↑ε * z) • f z\nhd : DiffContOnCl ℂ g {z | 0 < z.re}\n⊢ ‖g z‖ ≤ C\n[PROOFSTEP]\nhave hgn : ∀ z, ‖g z‖ = expR (ε * z.re) * ‖f z‖ := fun z ↦ by rw [norm_smul, norm_eq_abs, abs_exp, ofReal_mul_re]\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g✝ : ℂ → E\nz✝ : ℂ\nhexp : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : IsBoundedUnder (fun x x_1 => x ≤ x_1) atTop fun x => ‖f ↑x‖\nhim : ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\nhz : 0 ≤ z✝.re\nε : ℝ\nε₀ : ε < 0\ng : ℂ → E := fun z => exp (↑ε * z) • f z\nhd : DiffContOnCl ℂ g {z | 0 < z.re}\nz : ℂ\n⊢ ‖g z‖ = expR (ε * z.re) * ‖f z‖\n[PROOFSTEP]\nrw [norm_smul, norm_eq_abs, abs_exp, ofReal_mul_re]\n[GOAL]\ncase h\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g✝ : ℂ → E\nz : ℂ\nhexp : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : IsBoundedUnder (fun x x_1 => x ≤ x_1) atTop fun x => ‖f ↑x‖\nhim : ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\nhz : 0 ≤ z.re\nε : ℝ\nε₀ : ε < 0\ng : ℂ → E := fun z => exp (↑ε * z) • f z\nhd : DiffContOnCl ℂ g {z | 0 < z.re}\nhgn : ∀ (z : ℂ), ‖g z‖ = expR (ε * z.re) * ‖f z‖\n⊢ ‖g z‖ ≤ C\n[PROOFSTEP]\nrefine' right_half_plane_of_tendsto_zero_on_real hd _ _ (fun y => _) hz\n[GOAL]\ncase h.refine'_1\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g✝ : ℂ → E\nz : ℂ\nhexp : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : IsBoundedUnder (fun x x_1 => x ≤ x_1) atTop fun x => ‖f ↑x‖\nhim : ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\nhz : 0 ≤ z.re\nε : ℝ\nε₀ : ε < 0\ng : ℂ → E := fun z => exp (↑ε * z) • f z\nhd : DiffContOnCl ℂ g {z | 0 < z.re}\nhgn : ∀ (z : ℂ), ‖g z‖ = expR (ε * z.re) * ‖f z‖\n⊢ ∃ c, c < 2 ∧ ∃ B, g =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\n[PROOFSTEP]\nrcases hexp with ⟨c, hc, B, hO⟩\n[GOAL]\ncase h.refine'_1.intro.intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g✝ : ℂ → E\nz : ℂ\nhre : IsBoundedUnder (fun x x_1 => x ≤ x_1) atTop fun x => ‖f ↑x‖\nhim : ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\nhz : 0 ≤ z.re\nε : ℝ\nε₀ : ε < 0\ng : ℂ → E := fun z => exp (↑ε * z) • f z\nhd : DiffContOnCl ℂ g {z | 0 < z.re}\nhgn : ∀ (z : ℂ), ‖g z‖ = expR (ε * z.re) * ‖f z‖\nc : ℝ\nhc : c < 2\nB : ℝ\nhO : f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\n⊢ ∃ c, c < 2 ∧ ∃ B, g =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\n[PROOFSTEP]\nrefine ⟨c, hc, B, (IsBigO.of_bound 1 ?_).trans hO⟩\n[GOAL]\ncase h.refine'_1.intro.intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g✝ : ℂ → E\nz : ℂ\nhre : IsBoundedUnder (fun x x_1 => x ≤ x_1) atTop fun x => ‖f ↑x‖\nhim : ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\nhz : 0 ≤ z.re\nε : ℝ\nε₀ : ε < 0\ng : ℂ → E := fun z => exp (↑ε * z) • f z\nhd : DiffContOnCl ℂ g {z | 0 < z.re}\nhgn : ∀ (z : ℂ), ‖g z‖ = expR (ε * z.re) * ‖f z‖\nc : ℝ\nhc : c < 2\nB : ℝ\nhO : f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\n⊢ ∀ᶠ (x : ℂ) in comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}, ‖g x‖ ≤ 1 * ‖f x‖\n[PROOFSTEP]\nrefine' eventually_inf_principal.2 <| eventually_of_forall fun z hz => _\n[GOAL]\ncase h.refine'_1.intro.intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g✝ : ℂ → E\nz✝ : ℂ\nhre : IsBoundedUnder (fun x x_1 => x ≤ x_1) atTop fun x => ‖f ↑x‖\nhim : ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\nhz✝ : 0 ≤ z✝.re\nε : ℝ\nε₀ : ε < 0\ng : ℂ → E := fun z => exp (↑ε * z) • f z\nhd : DiffContOnCl ℂ g {z | 0 < z.re}\nhgn : ∀ (z : ℂ), ‖g z‖ = expR (ε * z.re) * ‖f z‖\nc : ℝ\nhc : c < 2\nB : ℝ\nhO : f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nz : ℂ\nhz : z ∈ {z | 0 < z.re}\n⊢ ‖g z‖ ≤ 1 * ‖f z‖\n[PROOFSTEP]\nrw [hgn, one_mul]\n[GOAL]\ncase h.refine'_1.intro.intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g✝ : ℂ → E\nz✝ : ℂ\nhre : IsBoundedUnder (fun x x_1 => x ≤ x_1) atTop fun x => ‖f ↑x‖\nhim : ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\nhz✝ : 0 ≤ z✝.re\nε : ℝ\nε₀ : ε < 0\ng : ℂ → E := fun z => exp (↑ε * z) • f z\nhd : DiffContOnCl ℂ g {z | 0 < z.re}\nhgn : ∀ (z : ℂ), ‖g z‖ = expR (ε * z.re) * ‖f z‖\nc : ℝ\nhc : c < 2\nB : ℝ\nhO : f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nz : ℂ\nhz : z ∈ {z | 0 < z.re}\n⊢ expR (ε * z.re) * ‖f z‖ ≤ ‖f z‖\n[PROOFSTEP]\nrefine' mul_le_of_le_one_left (norm_nonneg _) (Real.exp_le_one_iff.2 _)\n[GOAL]\ncase h.refine'_1.intro.intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g✝ : ℂ → E\nz✝ : ℂ\nhre : IsBoundedUnder (fun x x_1 => x ≤ x_1) atTop fun x => ‖f ↑x‖\nhim : ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\nhz✝ : 0 ≤ z✝.re\nε : ℝ\nε₀ : ε < 0\ng : ℂ → E := fun z => exp (↑ε * z) • f z\nhd : DiffContOnCl ℂ g {z | 0 < z.re}\nhgn : ∀ (z : ℂ), ‖g z‖ = expR (ε * z.re) * ‖f z‖\nc : ℝ\nhc : c < 2\nB : ℝ\nhO : f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nz : ℂ\nhz : z ∈ {z | 0 < z.re}\n⊢ ε * z.re ≤ 0\n[PROOFSTEP]\nexact mul_nonpos_of_nonpos_of_nonneg ε₀.le (le_of_lt hz)\n[GOAL]\ncase h.refine'_2\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g✝ : ℂ → E\nz : ℂ\nhexp : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : IsBoundedUnder (fun x x_1 => x ≤ x_1) atTop fun x => ‖f ↑x‖\nhim : ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\nhz : 0 ≤ z.re\nε : ℝ\nε₀ : ε < 0\ng : ℂ → E := fun z => exp (↑ε * z) • f z\nhd : DiffContOnCl ℂ g {z | 0 < z.re}\nhgn : ∀ (z : ℂ), ‖g z‖ = expR (ε * z.re) * ‖f z‖\n⊢ Tendsto (fun x => g ↑x) atTop (𝓝 0)\n[PROOFSTEP]\nsimp_rw [← ofReal_mul, ← ofReal_exp, coe_smul]\n[GOAL]\ncase h.refine'_2\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g✝ : ℂ → E\nz : ℂ\nhexp : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : IsBoundedUnder (fun x x_1 => x ≤ x_1) atTop fun x => ‖f ↑x‖\nhim : ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\nhz : 0 ≤ z.re\nε : ℝ\nε₀ : ε < 0\ng : ℂ → E := fun z => exp (↑ε * z) • f z\nhd : DiffContOnCl ℂ g {z | 0 < z.re}\nhgn : ∀ (z : ℂ), ‖g z‖ = expR (ε * z.re) * ‖f z‖\n⊢ Tendsto (fun x => expR (ε * x) • f ↑x) atTop (𝓝 0)\n[PROOFSTEP]\nhave h₀ : Tendsto (fun x : ℝ => expR (ε * x)) atTop (𝓝 0) :=\n  Real.tendsto_exp_atBot.comp (tendsto_const_nhds.neg_mul_atTop ε₀ tendsto_id)\n[GOAL]\ncase h.refine'_2\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g✝ : ℂ → E\nz : ℂ\nhexp : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : IsBoundedUnder (fun x x_1 => x ≤ x_1) atTop fun x => ‖f ↑x‖\nhim : ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\nhz : 0 ≤ z.re\nε : ℝ\nε₀ : ε < 0\ng : ℂ → E := fun z => exp (↑ε * z) • f z\nhd : DiffContOnCl ℂ g {z | 0 < z.re}\nhgn : ∀ (z : ℂ), ‖g z‖ = expR (ε * z.re) * ‖f z‖\nh₀ : Tendsto (fun x => expR (ε * x)) atTop (𝓝 0)\n⊢ Tendsto (fun x => expR (ε * x) • f ↑x) atTop (𝓝 0)\n[PROOFSTEP]\nexact h₀.zero_smul_isBoundedUnder_le hre\n[GOAL]\ncase h.refine'_3\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g✝ : ℂ → E\nz : ℂ\nhexp : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : IsBoundedUnder (fun x x_1 => x ≤ x_1) atTop fun x => ‖f ↑x‖\nhim : ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\nhz : 0 ≤ z.re\nε : ℝ\nε₀ : ε < 0\ng : ℂ → E := fun z => exp (↑ε * z) • f z\nhd : DiffContOnCl ℂ g {z | 0 < z.re}\nhgn : ∀ (z : ℂ), ‖g z‖ = expR (ε * z.re) * ‖f z‖\ny : ℝ\n⊢ ‖g (↑y * I)‖ ≤ C\n[PROOFSTEP]\nrw [hgn, ofReal_mul_re, I_re, mul_zero, mul_zero, Real.exp_zero, one_mul]\n[GOAL]\ncase h.refine'_3\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g✝ : ℂ → E\nz : ℂ\nhexp : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : IsBoundedUnder (fun x x_1 => x ≤ x_1) atTop fun x => ‖f ↑x‖\nhim : ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\nhz : 0 ≤ z.re\nε : ℝ\nε₀ : ε < 0\ng : ℂ → E := fun z => exp (↑ε * z) • f z\nhd : DiffContOnCl ℂ g {z | 0 < z.re}\nhgn : ∀ (z : ℂ), ‖g z‖ = expR (ε * z.re) * ‖f z‖\ny : ℝ\n⊢ ‖f (↑y * I)‖ ≤ C\n[PROOFSTEP]\nexact him y\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g : ℂ → E\nz : ℂ\nhd : DiffContOnCl ℂ f {z | 0 < z.re}\nhexp : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : SuperpolynomialDecay atTop expR fun x => ‖f ↑x‖\nhim : ∃ C, ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\n⊢ EqOn f 0 {z | 0 ≤ z.re}\n[PROOFSTEP]\nrcases him with\n  ⟨C, hC⟩\n    -- Due to continuity, it suffices to prove the equality on the open right half-plane.\n[GOAL]\ncase intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C✝ : ℝ\nf g : ℂ → E\nz : ℂ\nhd : DiffContOnCl ℂ f {z | 0 < z.re}\nhexp : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : SuperpolynomialDecay atTop expR fun x => ‖f ↑x‖\nC : ℝ\nhC : ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\n⊢ EqOn f 0 {z | 0 ≤ z.re}\n[PROOFSTEP]\nsuffices ∀ z : ℂ, 0 < z.re → f z = 0 by\n  simpa only [closure_setOf_lt_re] using\n    EqOn.of_subset_closure this hd.continuousOn continuousOn_const subset_closure Subset.rfl\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C✝ : ℝ\nf g : ℂ → E\nz : ℂ\nhd : DiffContOnCl ℂ f {z | 0 < z.re}\nhexp : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : SuperpolynomialDecay atTop expR fun x => ‖f ↑x‖\nC : ℝ\nhC : ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\nthis : ∀ (z : ℂ), 0 < z.re → f z = 0\n⊢ EqOn f 0 {z | 0 ≤ z.re}\n[PROOFSTEP]\nsimpa only [closure_setOf_lt_re] using\n  EqOn.of_subset_closure this hd.continuousOn continuousOn_const subset_closure Subset.rfl\n[GOAL]\ncase intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C✝ : ℝ\nf g : ℂ → E\nz : ℂ\nhd : DiffContOnCl ℂ f {z | 0 < z.re}\nhexp : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : SuperpolynomialDecay atTop expR fun x => ‖f ↑x‖\nC : ℝ\nhC : ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\n⊢ ∀ (z : ℂ), 0 < z.re → f z = 0\n[PROOFSTEP]\nset g : ℕ → ℂ → E := fun (n : ℕ) (z : ℂ) => exp z ^ n • f z\n[GOAL]\ncase intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C✝ : ℝ\nf g✝ : ℂ → E\nz : ℂ\nhd : DiffContOnCl ℂ f {z | 0 < z.re}\nhexp : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : SuperpolynomialDecay atTop expR fun x => ‖f ↑x‖\nC : ℝ\nhC : ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\ng : ℕ → ℂ → E := fun n z => exp z ^ n • f z\n⊢ ∀ (z : ℂ), 0 < z.re → f z = 0\n[PROOFSTEP]\nhave hg : ∀ n z, ‖g n z‖ = expR z.re ^ n * ‖f z‖ := fun n z ↦ by\n  simp only [norm_smul, norm_eq_abs, Complex.abs_pow, abs_exp]\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C✝ : ℝ\nf g✝ : ℂ → E\nz✝ : ℂ\nhd : DiffContOnCl ℂ f {z | 0 < z.re}\nhexp : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : SuperpolynomialDecay atTop expR fun x => ‖f ↑x‖\nC : ℝ\nhC : ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\ng : ℕ → ℂ → E := fun n z => exp z ^ n • f z\nn : ℕ\nz : ℂ\n⊢ ‖g n z‖ = expR z.re ^ n * ‖f z‖\n[PROOFSTEP]\nsimp only [norm_smul, norm_eq_abs, Complex.abs_pow, abs_exp]\n[GOAL]\ncase intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C✝ : ℝ\nf g✝ : ℂ → E\nz : ℂ\nhd : DiffContOnCl ℂ f {z | 0 < z.re}\nhexp : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : SuperpolynomialDecay atTop expR fun x => ‖f ↑x‖\nC : ℝ\nhC : ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\ng : ℕ → ℂ → E := fun n z => exp z ^ n • f z\nhg : ∀ (n : ℕ) (z : ℂ), ‖g n z‖ = expR z.re ^ n * ‖f z‖\n⊢ ∀ (z : ℂ), 0 < z.re → f z = 0\n[PROOFSTEP]\nintro z hz\n[GOAL]\ncase intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C✝ : ℝ\nf g✝ : ℂ → E\nz✝ : ℂ\nhd : DiffContOnCl ℂ f {z | 0 < z.re}\nhexp : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : SuperpolynomialDecay atTop expR fun x => ‖f ↑x‖\nC : ℝ\nhC : ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\ng : ℕ → ℂ → E := fun n z => exp z ^ n • f z\nhg : ∀ (n : ℕ) (z : ℂ), ‖g n z‖ = expR z.re ^ n * ‖f z‖\nz : ℂ\nhz : 0 < z.re\n⊢ f z = 0\n[PROOFSTEP]\nsuffices H : ∀ n : ℕ, ‖g n z‖ ≤ C\n[GOAL]\ncase intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C✝ : ℝ\nf g✝ : ℂ → E\nz✝ : ℂ\nhd : DiffContOnCl ℂ f {z | 0 < z.re}\nhexp : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : SuperpolynomialDecay atTop expR fun x => ‖f ↑x‖\nC : ℝ\nhC : ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\ng : ℕ → ℂ → E := fun n z => exp z ^ n • f z\nhg : ∀ (n : ℕ) (z : ℂ), ‖g n z‖ = expR z.re ^ n * ‖f z‖\nz : ℂ\nhz : 0 < z.re\nH : ∀ (n : ℕ), ‖g n z‖ ≤ C\n⊢ f z = 0\n[PROOFSTEP]\ncontrapose! H\n[GOAL]\ncase intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C✝ : ℝ\nf g✝ : ℂ → E\nz✝ : ℂ\nhd : DiffContOnCl ℂ f {z | 0 < z.re}\nhexp : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : SuperpolynomialDecay atTop expR fun x => ‖f ↑x‖\nC : ℝ\nhC : ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\ng : ℕ → ℂ → E := fun n z => exp z ^ n • f z\nhg : ∀ (n : ℕ) (z : ℂ), ‖g n z‖ = expR z.re ^ n * ‖f z‖\nz : ℂ\nhz : 0 < z.re\nH : f z ≠ 0\n⊢ ∃ n, C < ‖(fun n z => exp z ^ n • f z) n z‖\n[PROOFSTEP]\nsimp only [hg]\n[GOAL]\ncase intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C✝ : ℝ\nf g✝ : ℂ → E\nz✝ : ℂ\nhd : DiffContOnCl ℂ f {z | 0 < z.re}\nhexp : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : SuperpolynomialDecay atTop expR fun x => ‖f ↑x‖\nC : ℝ\nhC : ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\ng : ℕ → ℂ → E := fun n z => exp z ^ n • f z\nhg : ∀ (n : ℕ) (z : ℂ), ‖g n z‖ = expR z.re ^ n * ‖f z‖\nz : ℂ\nhz : 0 < z.re\nH : f z ≠ 0\n⊢ ∃ n, C < expR z.re ^ n * ‖f z‖\n[PROOFSTEP]\nexact\n  (((tendsto_pow_atTop_atTop_of_one_lt (Real.one_lt_exp_iff.2 hz)).atTop_mul (norm_pos_iff.2 H)\n          tendsto_const_nhds).eventually\n      (eventually_gt_atTop C)).exists\n[GOAL]\ncase H\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C✝ : ℝ\nf g✝ : ℂ → E\nz✝ : ℂ\nhd : DiffContOnCl ℂ f {z | 0 < z.re}\nhexp : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : SuperpolynomialDecay atTop expR fun x => ‖f ↑x‖\nC : ℝ\nhC : ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\ng : ℕ → ℂ → E := fun n z => exp z ^ n • f z\nhg : ∀ (n : ℕ) (z : ℂ), ‖g n z‖ = expR z.re ^ n * ‖f z‖\nz : ℂ\nhz : 0 < z.re\n⊢ ∀ (n : ℕ), ‖g n z‖ ≤ C\n[PROOFSTEP]\nintro n\n[GOAL]\ncase H\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C✝ : ℝ\nf g✝ : ℂ → E\nz✝ : ℂ\nhd : DiffContOnCl ℂ f {z | 0 < z.re}\nhexp : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : SuperpolynomialDecay atTop expR fun x => ‖f ↑x‖\nC : ℝ\nhC : ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\ng : ℕ → ℂ → E := fun n z => exp z ^ n • f z\nhg : ∀ (n : ℕ) (z : ℂ), ‖g n z‖ = expR z.re ^ n * ‖f z‖\nz : ℂ\nhz : 0 < z.re\nn : ℕ\n⊢ ‖g n z‖ ≤ C\n[PROOFSTEP]\nrefine'\n  right_half_plane_of_tendsto_zero_on_real ((differentiable_exp.pow n).diffContOnCl.smul hd) _ _ (fun y => _) hz.le\n[GOAL]\ncase H.refine'_1\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C✝ : ℝ\nf g✝ : ℂ → E\nz✝ : ℂ\nhd : DiffContOnCl ℂ f {z | 0 < z.re}\nhexp : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : SuperpolynomialDecay atTop expR fun x => ‖f ↑x‖\nC : ℝ\nhC : ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\ng : ℕ → ℂ → E := fun n z => exp z ^ n • f z\nhg : ∀ (n : ℕ) (z : ℂ), ‖g n z‖ = expR z.re ^ n * ‖f z‖\nz : ℂ\nhz : 0 < z.re\nn : ℕ\n⊢ ∃ c, c < 2 ∧ ∃ B, g n =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\n[PROOFSTEP]\nrcases hexp with ⟨c, hc, B, hO⟩\n[GOAL]\ncase H.refine'_1.intro.intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C✝ : ℝ\nf g✝ : ℂ → E\nz✝ : ℂ\nhd : DiffContOnCl ℂ f {z | 0 < z.re}\nhre : SuperpolynomialDecay atTop expR fun x => ‖f ↑x‖\nC : ℝ\nhC : ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\ng : ℕ → ℂ → E := fun n z => exp z ^ n • f z\nhg : ∀ (n : ℕ) (z : ℂ), ‖g n z‖ = expR z.re ^ n * ‖f z‖\nz : ℂ\nhz : 0 < z.re\nn : ℕ\nc : ℝ\nhc : c < 2\nB : ℝ\nhO : f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\n⊢ ∃ c, c < 2 ∧ ∃ B, g n =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\n[PROOFSTEP]\nrefine' ⟨max c 1, max_lt hc one_lt_two, n + max B 0, .of_norm_left _⟩\n[GOAL]\ncase H.refine'_1.intro.intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C✝ : ℝ\nf g✝ : ℂ → E\nz✝ : ℂ\nhd : DiffContOnCl ℂ f {z | 0 < z.re}\nhre : SuperpolynomialDecay atTop expR fun x => ‖f ↑x‖\nC : ℝ\nhC : ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\ng : ℕ → ℂ → E := fun n z => exp z ^ n • f z\nhg : ∀ (n : ℕ) (z : ℂ), ‖g n z‖ = expR z.re ^ n * ‖f z‖\nz : ℂ\nhz : 0 < z.re\nn : ℕ\nc : ℝ\nhc : c < 2\nB : ℝ\nhO : f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\n⊢ (fun x => ‖g n x‖) =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z =>\n    expR ((↑n + max B 0) * ↑Complex.abs z ^ max c 1)\n[PROOFSTEP]\nsimp only [hg]\n[GOAL]\ncase H.refine'_1.intro.intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C✝ : ℝ\nf g✝ : ℂ → E\nz✝ : ℂ\nhd : DiffContOnCl ℂ f {z | 0 < z.re}\nhre : SuperpolynomialDecay atTop expR fun x => ‖f ↑x‖\nC : ℝ\nhC : ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\ng : ℕ → ℂ → E := fun n z => exp z ^ n • f z\nhg : ∀ (n : ℕ) (z : ℂ), ‖g n z‖ = expR z.re ^ n * ‖f z‖\nz : ℂ\nhz : 0 < z.re\nn : ℕ\nc : ℝ\nhc : c < 2\nB : ℝ\nhO : f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\n⊢ (fun x => expR x.re ^ n * ‖f x‖) =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z =>\n    expR ((↑n + max B 0) * ↑Complex.abs z ^ max c 1)\n[PROOFSTEP]\nrefine' ((isBigO_refl (fun z : ℂ => expR z.re ^ n) _).mul hO.norm_left).trans (.of_bound 1 _)\n[GOAL]\ncase H.refine'_1.intro.intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C✝ : ℝ\nf g✝ : ℂ → E\nz✝ : ℂ\nhd : DiffContOnCl ℂ f {z | 0 < z.re}\nhre : SuperpolynomialDecay atTop expR fun x => ‖f ↑x‖\nC : ℝ\nhC : ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\ng : ℕ → ℂ → E := fun n z => exp z ^ n • f z\nhg : ∀ (n : ℕ) (z : ℂ), ‖g n z‖ = expR z.re ^ n * ‖f z‖\nz : ℂ\nhz : 0 < z.re\nn : ℕ\nc : ℝ\nhc : c < 2\nB : ℝ\nhO : f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\n⊢ ∀ᶠ (x : ℂ) in comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re},\n    ‖expR x.re ^ n * expR (B * ↑Complex.abs x ^ c)‖ ≤ 1 * ‖expR ((↑n + max B 0) * ↑Complex.abs x ^ max c 1)‖\n[PROOFSTEP]\nsimp only [← Real.exp_nat_mul, ← Real.exp_add, Real.norm_of_nonneg (Real.exp_pos _).le, Real.exp_le_exp, add_mul,\n  eventually_inf_principal, eventually_comap, one_mul]\n  -- porting note: todo: `0 < z.re` is not used; where do we use it?\n[GOAL]\ncase H.refine'_1.intro.intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C✝ : ℝ\nf g✝ : ℂ → E\nz✝ : ℂ\nhd : DiffContOnCl ℂ f {z | 0 < z.re}\nhre : SuperpolynomialDecay atTop expR fun x => ‖f ↑x‖\nC : ℝ\nhC : ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\ng : ℕ → ℂ → E := fun n z => exp z ^ n • f z\nhg : ∀ (n : ℕ) (z : ℂ), ‖g n z‖ = expR z.re ^ n * ‖f z‖\nz : ℂ\nhz : 0 < z.re\nn : ℕ\nc : ℝ\nhc : c < 2\nB : ℝ\nhO : f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\n⊢ ∀ᶠ (b : ℝ) in atTop,\n    ∀ (a : ℂ),\n      ↑Complex.abs a = b →\n        a ∈ {z | 0 < z.re} →\n          ↑n * a.re + B * ↑Complex.abs a ^ c ≤ ↑n * ↑Complex.abs a ^ max c 1 + max B 0 * ↑Complex.abs a ^ max c 1\n[PROOFSTEP]\nfilter_upwards [eventually_ge_atTop (1 : ℝ)] with r hr z hzr _\n[GOAL]\ncase h\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C✝ : ℝ\nf g✝ : ℂ → E\nz✝¹ : ℂ\nhd : DiffContOnCl ℂ f {z | 0 < z.re}\nhre : SuperpolynomialDecay atTop expR fun x => ‖f ↑x‖\nC : ℝ\nhC : ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\ng : ℕ → ℂ → E := fun n z => exp z ^ n • f z\nhg : ∀ (n : ℕ) (z : ℂ), ‖g n z‖ = expR z.re ^ n * ‖f z‖\nz✝ : ℂ\nhz : 0 < z✝.re\nn : ℕ\nc : ℝ\nhc : c < 2\nB : ℝ\nhO : f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nr : ℝ\nhr : 1 ≤ r\nz : ℂ\nhzr : ↑Complex.abs z = r\na✝ : 0 < z.re\n⊢ ↑n * z.re + B * ↑Complex.abs z ^ c ≤ ↑n * ↑Complex.abs z ^ max c 1 + max B 0 * ↑Complex.abs z ^ max c 1\n[PROOFSTEP]\nsubst r\n[GOAL]\ncase h\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C✝ : ℝ\nf g✝ : ℂ → E\nz✝¹ : ℂ\nhd : DiffContOnCl ℂ f {z | 0 < z.re}\nhre : SuperpolynomialDecay atTop expR fun x => ‖f ↑x‖\nC : ℝ\nhC : ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\ng : ℕ → ℂ → E := fun n z => exp z ^ n • f z\nhg : ∀ (n : ℕ) (z : ℂ), ‖g n z‖ = expR z.re ^ n * ‖f z‖\nz✝ : ℂ\nhz : 0 < z✝.re\nn : ℕ\nc : ℝ\nhc : c < 2\nB : ℝ\nhO : f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nz : ℂ\na✝ : 0 < z.re\nhr : 1 ≤ ↑Complex.abs z\n⊢ ↑n * z.re + B * ↑Complex.abs z ^ c ≤ ↑n * ↑Complex.abs z ^ max c 1 + max B 0 * ↑Complex.abs z ^ max c 1\n[PROOFSTEP]\nrefine' add_le_add (mul_le_mul_of_nonneg_left _ n.cast_nonneg) _\n[GOAL]\ncase h.refine'_1\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C✝ : ℝ\nf g✝ : ℂ → E\nz✝¹ : ℂ\nhd : DiffContOnCl ℂ f {z | 0 < z.re}\nhre : SuperpolynomialDecay atTop expR fun x => ‖f ↑x‖\nC : ℝ\nhC : ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\ng : ℕ → ℂ → E := fun n z => exp z ^ n • f z\nhg : ∀ (n : ℕ) (z : ℂ), ‖g n z‖ = expR z.re ^ n * ‖f z‖\nz✝ : ℂ\nhz : 0 < z✝.re\nn : ℕ\nc : ℝ\nhc : c < 2\nB : ℝ\nhO : f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nz : ℂ\na✝ : 0 < z.re\nhr : 1 ≤ ↑Complex.abs z\n⊢ z.re ≤ ↑Complex.abs z ^ max c 1\n[PROOFSTEP]\ncalc\n  z.re ≤ abs z := re_le_abs _\n  _ = abs z ^ (1 : ℝ) := (Real.rpow_one _).symm\n  _ ≤ abs z ^ max c 1 := Real.rpow_le_rpow_of_exponent_le hr (le_max_right _ _)\n[GOAL]\ncase h.refine'_2\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C✝ : ℝ\nf g✝ : ℂ → E\nz✝¹ : ℂ\nhd : DiffContOnCl ℂ f {z | 0 < z.re}\nhre : SuperpolynomialDecay atTop expR fun x => ‖f ↑x‖\nC : ℝ\nhC : ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\ng : ℕ → ℂ → E := fun n z => exp z ^ n • f z\nhg : ∀ (n : ℕ) (z : ℂ), ‖g n z‖ = expR z.re ^ n * ‖f z‖\nz✝ : ℂ\nhz : 0 < z✝.re\nn : ℕ\nc : ℝ\nhc : c < 2\nB : ℝ\nhO : f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nz : ℂ\na✝ : 0 < z.re\nhr : 1 ≤ ↑Complex.abs z\n⊢ B * ↑Complex.abs z ^ c ≤ max B 0 * ↑Complex.abs z ^ max c 1\n[PROOFSTEP]\nexact\n  mul_le_mul (le_max_left _ _) (Real.rpow_le_rpow_of_exponent_le hr (le_max_left _ _))\n    (Real.rpow_nonneg_of_nonneg (Complex.abs.nonneg _) _) (le_max_right _ _)\n[GOAL]\ncase H.refine'_2\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C✝ : ℝ\nf g✝ : ℂ → E\nz✝ : ℂ\nhd : DiffContOnCl ℂ f {z | 0 < z.re}\nhexp : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : SuperpolynomialDecay atTop expR fun x => ‖f ↑x‖\nC : ℝ\nhC : ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\ng : ℕ → ℂ → E := fun n z => exp z ^ n • f z\nhg : ∀ (n : ℕ) (z : ℂ), ‖g n z‖ = expR z.re ^ n * ‖f z‖\nz : ℂ\nhz : 0 < z.re\nn : ℕ\n⊢ Tendsto (fun x => g n ↑x) atTop (𝓝 0)\n[PROOFSTEP]\nrw [tendsto_zero_iff_norm_tendsto_zero]\n[GOAL]\ncase H.refine'_2\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C✝ : ℝ\nf g✝ : ℂ → E\nz✝ : ℂ\nhd : DiffContOnCl ℂ f {z | 0 < z.re}\nhexp : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : SuperpolynomialDecay atTop expR fun x => ‖f ↑x‖\nC : ℝ\nhC : ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\ng : ℕ → ℂ → E := fun n z => exp z ^ n • f z\nhg : ∀ (n : ℕ) (z : ℂ), ‖g n z‖ = expR z.re ^ n * ‖f z‖\nz : ℂ\nhz : 0 < z.re\nn : ℕ\n⊢ Tendsto (fun e => ‖g n ↑e‖) atTop (𝓝 0)\n[PROOFSTEP]\nsimp only [hg]\n[GOAL]\ncase H.refine'_2\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C✝ : ℝ\nf g✝ : ℂ → E\nz✝ : ℂ\nhd : DiffContOnCl ℂ f {z | 0 < z.re}\nhexp : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : SuperpolynomialDecay atTop expR fun x => ‖f ↑x‖\nC : ℝ\nhC : ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\ng : ℕ → ℂ → E := fun n z => exp z ^ n • f z\nhg : ∀ (n : ℕ) (z : ℂ), ‖g n z‖ = expR z.re ^ n * ‖f z‖\nz : ℂ\nhz : 0 < z.re\nn : ℕ\n⊢ Tendsto (fun e => expR (↑e).re ^ n * ‖f ↑e‖) atTop (𝓝 0)\n[PROOFSTEP]\nexact hre n\n[GOAL]\ncase H.refine'_3\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C✝ : ℝ\nf g✝ : ℂ → E\nz✝ : ℂ\nhd : DiffContOnCl ℂ f {z | 0 < z.re}\nhexp : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : SuperpolynomialDecay atTop expR fun x => ‖f ↑x‖\nC : ℝ\nhC : ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\ng : ℕ → ℂ → E := fun n z => exp z ^ n • f z\nhg : ∀ (n : ℕ) (z : ℂ), ‖g n z‖ = expR z.re ^ n * ‖f z‖\nz : ℂ\nhz : 0 < z.re\nn : ℕ\ny : ℝ\n⊢ ‖g n (↑y * I)‖ ≤ C\n[PROOFSTEP]\nrw [hg, ofReal_mul_re, I_re, mul_zero, Real.exp_zero, one_pow, one_mul]\n[GOAL]\ncase H.refine'_3\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C✝ : ℝ\nf g✝ : ℂ → E\nz✝ : ℂ\nhd : DiffContOnCl ℂ f {z | 0 < z.re}\nhexp : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : SuperpolynomialDecay atTop expR fun x => ‖f ↑x‖\nC : ℝ\nhC : ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\ng : ℕ → ℂ → E := fun n z => exp z ^ n • f z\nhg : ∀ (n : ℕ) (z : ℂ), ‖g n z‖ = expR z.re ^ n * ‖f z‖\nz : ℂ\nhz : 0 < z.re\nn : ℕ\ny : ℝ\n⊢ ‖f (↑y * I)‖ ≤ C\n[PROOFSTEP]\nexact hC y\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g✝ : ℂ → E\nz : ℂ\ng : ℂ → E\nhfd : DiffContOnCl ℂ f {z | 0 < z.re}\nhgd : DiffContOnCl ℂ g {z | 0 < z.re}\nhfexp : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nhgexp : ∃ c, c < 2 ∧ ∃ B, g =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : SuperpolynomialDecay atTop expR fun x => ‖f ↑x - g ↑x‖\nhfim : ∃ C, ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\nhgim : ∃ C, ∀ (x : ℝ), ‖g (↑x * I)‖ ≤ C\n⊢ EqOn f g {z | 0 ≤ z.re}\n[PROOFSTEP]\nsuffices EqOn (f - g) 0 {z : ℂ | 0 ≤ z.re} by simpa only [EqOn, Pi.sub_apply, Pi.zero_apply, sub_eq_zero] using this\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g✝ : ℂ → E\nz : ℂ\ng : ℂ → E\nhfd : DiffContOnCl ℂ f {z | 0 < z.re}\nhgd : DiffContOnCl ℂ g {z | 0 < z.re}\nhfexp : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nhgexp : ∃ c, c < 2 ∧ ∃ B, g =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : SuperpolynomialDecay atTop expR fun x => ‖f ↑x - g ↑x‖\nhfim : ∃ C, ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\nhgim : ∃ C, ∀ (x : ℝ), ‖g (↑x * I)‖ ≤ C\nthis : EqOn (f - g) 0 {z | 0 ≤ z.re}\n⊢ EqOn f g {z | 0 ≤ z.re}\n[PROOFSTEP]\nsimpa only [EqOn, Pi.sub_apply, Pi.zero_apply, sub_eq_zero] using this\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g✝ : ℂ → E\nz : ℂ\ng : ℂ → E\nhfd : DiffContOnCl ℂ f {z | 0 < z.re}\nhgd : DiffContOnCl ℂ g {z | 0 < z.re}\nhfexp : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nhgexp : ∃ c, c < 2 ∧ ∃ B, g =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : SuperpolynomialDecay atTop expR fun x => ‖f ↑x - g ↑x‖\nhfim : ∃ C, ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\nhgim : ∃ C, ∀ (x : ℝ), ‖g (↑x * I)‖ ≤ C\n⊢ EqOn (f - g) 0 {z | 0 ≤ z.re}\n[PROOFSTEP]\nrefine' eq_zero_on_right_half_plane_of_superexponential_decay (hfd.sub hgd) _ hre _\n[GOAL]\ncase refine'_1\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g✝ : ℂ → E\nz : ℂ\ng : ℂ → E\nhfd : DiffContOnCl ℂ f {z | 0 < z.re}\nhgd : DiffContOnCl ℂ g {z | 0 < z.re}\nhfexp : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nhgexp : ∃ c, c < 2 ∧ ∃ B, g =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : SuperpolynomialDecay atTop expR fun x => ‖f ↑x - g ↑x‖\nhfim : ∃ C, ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\nhgim : ∃ C, ∀ (x : ℝ), ‖g (↑x * I)‖ ≤ C\n⊢ ∃ c, c < 2 ∧ ∃ B, (f - g) =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\n[PROOFSTEP]\nset l : Filter ℂ := comap Complex.abs atTop ⊓ 𝓟 {z : ℂ | 0 < z.re}\n[GOAL]\ncase refine'_1\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g✝ : ℂ → E\nz : ℂ\ng : ℂ → E\nhfd : DiffContOnCl ℂ f {z | 0 < z.re}\nhgd : DiffContOnCl ℂ g {z | 0 < z.re}\nhre : SuperpolynomialDecay atTop expR fun x => ‖f ↑x - g ↑x‖\nhfim : ∃ C, ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\nhgim : ∃ C, ∀ (x : ℝ), ‖g (↑x * I)‖ ≤ C\nl : Filter ℂ := comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}\nhfexp : ∃ c, c < 2 ∧ ∃ B, f =O[l] fun z => expR (B * ↑Complex.abs z ^ c)\nhgexp : ∃ c, c < 2 ∧ ∃ B, g =O[l] fun z => expR (B * ↑Complex.abs z ^ c)\n⊢ ∃ c, c < 2 ∧ ∃ B, (f - g) =O[l] fun z => expR (B * ↑Complex.abs z ^ c)\n[PROOFSTEP]\nsuffices\n  ∀ {c₁ c₂ B₁ B₂ : ℝ},\n    c₁ ≤ c₂ → B₁ ≤ B₂ → 0 ≤ B₂ → (fun z => expR (B₁ * abs z ^ c₁)) =O[l] fun z => expR (B₂ * abs z ^ c₂)\n  by\n  rcases hfexp with ⟨cf, hcf, Bf, hOf⟩; rcases hgexp with ⟨cg, hcg, Bg, hOg⟩\n  refine' ⟨max cf cg, max_lt hcf hcg, max 0 (max Bf Bg), _⟩\n  refine' .sub (hOf.trans <| this _ _ _) (hOg.trans <| this _ _ _) <;> simp\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g✝ : ℂ → E\nz : ℂ\ng : ℂ → E\nhfd : DiffContOnCl ℂ f {z | 0 < z.re}\nhgd : DiffContOnCl ℂ g {z | 0 < z.re}\nhre : SuperpolynomialDecay atTop expR fun x => ‖f ↑x - g ↑x‖\nhfim : ∃ C, ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\nhgim : ∃ C, ∀ (x : ℝ), ‖g (↑x * I)‖ ≤ C\nl : Filter ℂ := comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}\nhfexp : ∃ c, c < 2 ∧ ∃ B, f =O[l] fun z => expR (B * ↑Complex.abs z ^ c)\nhgexp : ∃ c, c < 2 ∧ ∃ B, g =O[l] fun z => expR (B * ↑Complex.abs z ^ c)\nthis :\n  ∀ {c₁ c₂ B₁ B₂ : ℝ},\n    c₁ ≤ c₂ →\n      B₁ ≤ B₂ → 0 ≤ B₂ → (fun z => expR (B₁ * ↑Complex.abs z ^ c₁)) =O[l] fun z => expR (B₂ * ↑Complex.abs z ^ c₂)\n⊢ ∃ c, c < 2 ∧ ∃ B, (f - g) =O[l] fun z => expR (B * ↑Complex.abs z ^ c)\n[PROOFSTEP]\nrcases hfexp with ⟨cf, hcf, Bf, hOf⟩\n[GOAL]\ncase intro.intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g✝ : ℂ → E\nz : ℂ\ng : ℂ → E\nhfd : DiffContOnCl ℂ f {z | 0 < z.re}\nhgd : DiffContOnCl ℂ g {z | 0 < z.re}\nhre : SuperpolynomialDecay atTop expR fun x => ‖f ↑x - g ↑x‖\nhfim : ∃ C, ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\nhgim : ∃ C, ∀ (x : ℝ), ‖g (↑x * I)‖ ≤ C\nl : Filter ℂ := comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}\nhgexp : ∃ c, c < 2 ∧ ∃ B, g =O[l] fun z => expR (B * ↑Complex.abs z ^ c)\nthis :\n  ∀ {c₁ c₂ B₁ B₂ : ℝ},\n    c₁ ≤ c₂ →\n      B₁ ≤ B₂ → 0 ≤ B₂ → (fun z => expR (B₁ * ↑Complex.abs z ^ c₁)) =O[l] fun z => expR (B₂ * ↑Complex.abs z ^ c₂)\ncf : ℝ\nhcf : cf < 2\nBf : ℝ\nhOf : f =O[l] fun z => expR (Bf * ↑Complex.abs z ^ cf)\n⊢ ∃ c, c < 2 ∧ ∃ B, (f - g) =O[l] fun z => expR (B * ↑Complex.abs z ^ c)\n[PROOFSTEP]\nrcases hgexp with ⟨cg, hcg, Bg, hOg⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g✝ : ℂ → E\nz : ℂ\ng : ℂ → E\nhfd : DiffContOnCl ℂ f {z | 0 < z.re}\nhgd : DiffContOnCl ℂ g {z | 0 < z.re}\nhre : SuperpolynomialDecay atTop expR fun x => ‖f ↑x - g ↑x‖\nhfim : ∃ C, ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\nhgim : ∃ C, ∀ (x : ℝ), ‖g (↑x * I)‖ ≤ C\nl : Filter ℂ := comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}\nthis :\n  ∀ {c₁ c₂ B₁ B₂ : ℝ},\n    c₁ ≤ c₂ →\n      B₁ ≤ B₂ → 0 ≤ B₂ → (fun z => expR (B₁ * ↑Complex.abs z ^ c₁)) =O[l] fun z => expR (B₂ * ↑Complex.abs z ^ c₂)\ncf : ℝ\nhcf : cf < 2\nBf : ℝ\nhOf : f =O[l] fun z => expR (Bf * ↑Complex.abs z ^ cf)\ncg : ℝ\nhcg : cg < 2\nBg : ℝ\nhOg : g =O[l] fun z => expR (Bg * ↑Complex.abs z ^ cg)\n⊢ ∃ c, c < 2 ∧ ∃ B, (f - g) =O[l] fun z => expR (B * ↑Complex.abs z ^ c)\n[PROOFSTEP]\nrefine' ⟨max cf cg, max_lt hcf hcg, max 0 (max Bf Bg), _⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g✝ : ℂ → E\nz : ℂ\ng : ℂ → E\nhfd : DiffContOnCl ℂ f {z | 0 < z.re}\nhgd : DiffContOnCl ℂ g {z | 0 < z.re}\nhre : SuperpolynomialDecay atTop expR fun x => ‖f ↑x - g ↑x‖\nhfim : ∃ C, ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\nhgim : ∃ C, ∀ (x : ℝ), ‖g (↑x * I)‖ ≤ C\nl : Filter ℂ := comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}\nthis :\n  ∀ {c₁ c₂ B₁ B₂ : ℝ},\n    c₁ ≤ c₂ →\n      B₁ ≤ B₂ → 0 ≤ B₂ → (fun z => expR (B₁ * ↑Complex.abs z ^ c₁)) =O[l] fun z => expR (B₂ * ↑Complex.abs z ^ c₂)\ncf : ℝ\nhcf : cf < 2\nBf : ℝ\nhOf : f =O[l] fun z => expR (Bf * ↑Complex.abs z ^ cf)\ncg : ℝ\nhcg : cg < 2\nBg : ℝ\nhOg : g =O[l] fun z => expR (Bg * ↑Complex.abs z ^ cg)\n⊢ (f - g) =O[l] fun z => expR (max 0 (max Bf Bg) * ↑Complex.abs z ^ max cf cg)\n[PROOFSTEP]\nrefine' .sub (hOf.trans <| this _ _ _) (hOg.trans <| this _ _ _)\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.refine'_1\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g✝ : ℂ → E\nz : ℂ\ng : ℂ → E\nhfd : DiffContOnCl ℂ f {z | 0 < z.re}\nhgd : DiffContOnCl ℂ g {z | 0 < z.re}\nhre : SuperpolynomialDecay atTop expR fun x => ‖f ↑x - g ↑x‖\nhfim : ∃ C, ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\nhgim : ∃ C, ∀ (x : ℝ), ‖g (↑x * I)‖ ≤ C\nl : Filter ℂ := comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}\nthis :\n  ∀ {c₁ c₂ B₁ B₂ : ℝ},\n    c₁ ≤ c₂ →\n      B₁ ≤ B₂ → 0 ≤ B₂ → (fun z => expR (B₁ * ↑Complex.abs z ^ c₁)) =O[l] fun z => expR (B₂ * ↑Complex.abs z ^ c₂)\ncf : ℝ\nhcf : cf < 2\nBf : ℝ\nhOf : f =O[l] fun z => expR (Bf * ↑Complex.abs z ^ cf)\ncg : ℝ\nhcg : cg < 2\nBg : ℝ\nhOg : g =O[l] fun z => expR (Bg * ↑Complex.abs z ^ cg)\n⊢ cf ≤ max cf cg\n[PROOFSTEP]\nsimp\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.refine'_2\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g✝ : ℂ → E\nz : ℂ\ng : ℂ → E\nhfd : DiffContOnCl ℂ f {z | 0 < z.re}\nhgd : DiffContOnCl ℂ g {z | 0 < z.re}\nhre : SuperpolynomialDecay atTop expR fun x => ‖f ↑x - g ↑x‖\nhfim : ∃ C, ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\nhgim : ∃ C, ∀ (x : ℝ), ‖g (↑x * I)‖ ≤ C\nl : Filter ℂ := comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}\nthis :\n  ∀ {c₁ c₂ B₁ B₂ : ℝ},\n    c₁ ≤ c₂ →\n      B₁ ≤ B₂ → 0 ≤ B₂ → (fun z => expR (B₁ * ↑Complex.abs z ^ c₁)) =O[l] fun z => expR (B₂ * ↑Complex.abs z ^ c₂)\ncf : ℝ\nhcf : cf < 2\nBf : ℝ\nhOf : f =O[l] fun z => expR (Bf * ↑Complex.abs z ^ cf)\ncg : ℝ\nhcg : cg < 2\nBg : ℝ\nhOg : g =O[l] fun z => expR (Bg * ↑Complex.abs z ^ cg)\n⊢ Bf ≤ max 0 (max Bf Bg)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.refine'_3\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g✝ : ℂ → E\nz : ℂ\ng : ℂ → E\nhfd : DiffContOnCl ℂ f {z | 0 < z.re}\nhgd : DiffContOnCl ℂ g {z | 0 < z.re}\nhre : SuperpolynomialDecay atTop expR fun x => ‖f ↑x - g ↑x‖\nhfim : ∃ C, ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\nhgim : ∃ C, ∀ (x : ℝ), ‖g (↑x * I)‖ ≤ C\nl : Filter ℂ := comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}\nthis :\n  ∀ {c₁ c₂ B₁ B₂ : ℝ},\n    c₁ ≤ c₂ →\n      B₁ ≤ B₂ → 0 ≤ B₂ → (fun z => expR (B₁ * ↑Complex.abs z ^ c₁)) =O[l] fun z => expR (B₂ * ↑Complex.abs z ^ c₂)\ncf : ℝ\nhcf : cf < 2\nBf : ℝ\nhOf : f =O[l] fun z => expR (Bf * ↑Complex.abs z ^ cf)\ncg : ℝ\nhcg : cg < 2\nBg : ℝ\nhOg : g =O[l] fun z => expR (Bg * ↑Complex.abs z ^ cg)\n⊢ 0 ≤ max 0 (max Bf Bg)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.refine'_4\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g✝ : ℂ → E\nz : ℂ\ng : ℂ → E\nhfd : DiffContOnCl ℂ f {z | 0 < z.re}\nhgd : DiffContOnCl ℂ g {z | 0 < z.re}\nhre : SuperpolynomialDecay atTop expR fun x => ‖f ↑x - g ↑x‖\nhfim : ∃ C, ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\nhgim : ∃ C, ∀ (x : ℝ), ‖g (↑x * I)‖ ≤ C\nl : Filter ℂ := comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}\nthis :\n  ∀ {c₁ c₂ B₁ B₂ : ℝ},\n    c₁ ≤ c₂ →\n      B₁ ≤ B₂ → 0 ≤ B₂ → (fun z => expR (B₁ * ↑Complex.abs z ^ c₁)) =O[l] fun z => expR (B₂ * ↑Complex.abs z ^ c₂)\ncf : ℝ\nhcf : cf < 2\nBf : ℝ\nhOf : f =O[l] fun z => expR (Bf * ↑Complex.abs z ^ cf)\ncg : ℝ\nhcg : cg < 2\nBg : ℝ\nhOg : g =O[l] fun z => expR (Bg * ↑Complex.abs z ^ cg)\n⊢ cg ≤ max cf cg\n[PROOFSTEP]\nsimp\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.refine'_5\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g✝ : ℂ → E\nz : ℂ\ng : ℂ → E\nhfd : DiffContOnCl ℂ f {z | 0 < z.re}\nhgd : DiffContOnCl ℂ g {z | 0 < z.re}\nhre : SuperpolynomialDecay atTop expR fun x => ‖f ↑x - g ↑x‖\nhfim : ∃ C, ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\nhgim : ∃ C, ∀ (x : ℝ), ‖g (↑x * I)‖ ≤ C\nl : Filter ℂ := comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}\nthis :\n  ∀ {c₁ c₂ B₁ B₂ : ℝ},\n    c₁ ≤ c₂ →\n      B₁ ≤ B₂ → 0 ≤ B₂ → (fun z => expR (B₁ * ↑Complex.abs z ^ c₁)) =O[l] fun z => expR (B₂ * ↑Complex.abs z ^ c₂)\ncf : ℝ\nhcf : cf < 2\nBf : ℝ\nhOf : f =O[l] fun z => expR (Bf * ↑Complex.abs z ^ cf)\ncg : ℝ\nhcg : cg < 2\nBg : ℝ\nhOg : g =O[l] fun z => expR (Bg * ↑Complex.abs z ^ cg)\n⊢ Bg ≤ max 0 (max Bf Bg)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.refine'_6\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g✝ : ℂ → E\nz : ℂ\ng : ℂ → E\nhfd : DiffContOnCl ℂ f {z | 0 < z.re}\nhgd : DiffContOnCl ℂ g {z | 0 < z.re}\nhre : SuperpolynomialDecay atTop expR fun x => ‖f ↑x - g ↑x‖\nhfim : ∃ C, ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\nhgim : ∃ C, ∀ (x : ℝ), ‖g (↑x * I)‖ ≤ C\nl : Filter ℂ := comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}\nthis :\n  ∀ {c₁ c₂ B₁ B₂ : ℝ},\n    c₁ ≤ c₂ →\n      B₁ ≤ B₂ → 0 ≤ B₂ → (fun z => expR (B₁ * ↑Complex.abs z ^ c₁)) =O[l] fun z => expR (B₂ * ↑Complex.abs z ^ c₂)\ncf : ℝ\nhcf : cf < 2\nBf : ℝ\nhOf : f =O[l] fun z => expR (Bf * ↑Complex.abs z ^ cf)\ncg : ℝ\nhcg : cg < 2\nBg : ℝ\nhOg : g =O[l] fun z => expR (Bg * ↑Complex.abs z ^ cg)\n⊢ 0 ≤ max 0 (max Bf Bg)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase refine'_1\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g✝ : ℂ → E\nz : ℂ\ng : ℂ → E\nhfd : DiffContOnCl ℂ f {z | 0 < z.re}\nhgd : DiffContOnCl ℂ g {z | 0 < z.re}\nhre : SuperpolynomialDecay atTop expR fun x => ‖f ↑x - g ↑x‖\nhfim : ∃ C, ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\nhgim : ∃ C, ∀ (x : ℝ), ‖g (↑x * I)‖ ≤ C\nl : Filter ℂ := comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}\nhfexp : ∃ c, c < 2 ∧ ∃ B, f =O[l] fun z => expR (B * ↑Complex.abs z ^ c)\nhgexp : ∃ c, c < 2 ∧ ∃ B, g =O[l] fun z => expR (B * ↑Complex.abs z ^ c)\n⊢ ∀ {c₁ c₂ B₁ B₂ : ℝ},\n    c₁ ≤ c₂ →\n      B₁ ≤ B₂ → 0 ≤ B₂ → (fun z => expR (B₁ * ↑Complex.abs z ^ c₁)) =O[l] fun z => expR (B₂ * ↑Complex.abs z ^ c₂)\n[PROOFSTEP]\nintro c₁ c₂ B₁ B₂ hc hB hB₂\n[GOAL]\ncase refine'_1\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g✝ : ℂ → E\nz : ℂ\ng : ℂ → E\nhfd : DiffContOnCl ℂ f {z | 0 < z.re}\nhgd : DiffContOnCl ℂ g {z | 0 < z.re}\nhre : SuperpolynomialDecay atTop expR fun x => ‖f ↑x - g ↑x‖\nhfim : ∃ C, ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\nhgim : ∃ C, ∀ (x : ℝ), ‖g (↑x * I)‖ ≤ C\nl : Filter ℂ := comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}\nhfexp : ∃ c, c < 2 ∧ ∃ B, f =O[l] fun z => expR (B * ↑Complex.abs z ^ c)\nhgexp : ∃ c, c < 2 ∧ ∃ B, g =O[l] fun z => expR (B * ↑Complex.abs z ^ c)\nc₁ c₂ B₁ B₂ : ℝ\nhc : c₁ ≤ c₂\nhB : B₁ ≤ B₂\nhB₂ : 0 ≤ B₂\n⊢ (fun z => expR (B₁ * ↑Complex.abs z ^ c₁)) =O[l] fun z => expR (B₂ * ↑Complex.abs z ^ c₂)\n[PROOFSTEP]\nhave : ∀ᶠ z : ℂ in l, 1 ≤ abs z := ((eventually_ge_atTop 1).comap _).filter_mono inf_le_left\n[GOAL]\ncase refine'_1\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g✝ : ℂ → E\nz : ℂ\ng : ℂ → E\nhfd : DiffContOnCl ℂ f {z | 0 < z.re}\nhgd : DiffContOnCl ℂ g {z | 0 < z.re}\nhre : SuperpolynomialDecay atTop expR fun x => ‖f ↑x - g ↑x‖\nhfim : ∃ C, ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\nhgim : ∃ C, ∀ (x : ℝ), ‖g (↑x * I)‖ ≤ C\nl : Filter ℂ := comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}\nhfexp : ∃ c, c < 2 ∧ ∃ B, f =O[l] fun z => expR (B * ↑Complex.abs z ^ c)\nhgexp : ∃ c, c < 2 ∧ ∃ B, g =O[l] fun z => expR (B * ↑Complex.abs z ^ c)\nc₁ c₂ B₁ B₂ : ℝ\nhc : c₁ ≤ c₂\nhB : B₁ ≤ B₂\nhB₂ : 0 ≤ B₂\nthis : ∀ᶠ (z : ℂ) in l, 1 ≤ ↑Complex.abs z\n⊢ (fun z => expR (B₁ * ↑Complex.abs z ^ c₁)) =O[l] fun z => expR (B₂ * ↑Complex.abs z ^ c₂)\n[PROOFSTEP]\nrefine' .of_bound 1 (this.mono fun z hz => _)\n[GOAL]\ncase refine'_1\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g✝ : ℂ → E\nz✝ : ℂ\ng : ℂ → E\nhfd : DiffContOnCl ℂ f {z | 0 < z.re}\nhgd : DiffContOnCl ℂ g {z | 0 < z.re}\nhre : SuperpolynomialDecay atTop expR fun x => ‖f ↑x - g ↑x‖\nhfim : ∃ C, ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\nhgim : ∃ C, ∀ (x : ℝ), ‖g (↑x * I)‖ ≤ C\nl : Filter ℂ := comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}\nhfexp : ∃ c, c < 2 ∧ ∃ B, f =O[l] fun z => expR (B * ↑Complex.abs z ^ c)\nhgexp : ∃ c, c < 2 ∧ ∃ B, g =O[l] fun z => expR (B * ↑Complex.abs z ^ c)\nc₁ c₂ B₁ B₂ : ℝ\nhc : c₁ ≤ c₂\nhB : B₁ ≤ B₂\nhB₂ : 0 ≤ B₂\nthis : ∀ᶠ (z : ℂ) in l, 1 ≤ ↑Complex.abs z\nz : ℂ\nhz : 1 ≤ ↑Complex.abs z\n⊢ ‖expR (B₁ * ↑Complex.abs z ^ c₁)‖ ≤ 1 * ‖expR (B₂ * ↑Complex.abs z ^ c₂)‖\n[PROOFSTEP]\nsimp only [Real.norm_of_nonneg (Real.exp_pos _).le, Real.exp_le_exp, one_mul]\n[GOAL]\ncase refine'_1\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g✝ : ℂ → E\nz✝ : ℂ\ng : ℂ → E\nhfd : DiffContOnCl ℂ f {z | 0 < z.re}\nhgd : DiffContOnCl ℂ g {z | 0 < z.re}\nhre : SuperpolynomialDecay atTop expR fun x => ‖f ↑x - g ↑x‖\nhfim : ∃ C, ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\nhgim : ∃ C, ∀ (x : ℝ), ‖g (↑x * I)‖ ≤ C\nl : Filter ℂ := comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}\nhfexp : ∃ c, c < 2 ∧ ∃ B, f =O[l] fun z => expR (B * ↑Complex.abs z ^ c)\nhgexp : ∃ c, c < 2 ∧ ∃ B, g =O[l] fun z => expR (B * ↑Complex.abs z ^ c)\nc₁ c₂ B₁ B₂ : ℝ\nhc : c₁ ≤ c₂\nhB : B₁ ≤ B₂\nhB₂ : 0 ≤ B₂\nthis : ∀ᶠ (z : ℂ) in l, 1 ≤ ↑Complex.abs z\nz : ℂ\nhz : 1 ≤ ↑Complex.abs z\n⊢ B₁ * ↑Complex.abs z ^ c₁ ≤ B₂ * ↑Complex.abs z ^ c₂\n[PROOFSTEP]\nhave := Real.rpow_le_rpow_of_exponent_le hz hc\n[GOAL]\ncase refine'_1\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g✝ : ℂ → E\nz✝ : ℂ\ng : ℂ → E\nhfd : DiffContOnCl ℂ f {z | 0 < z.re}\nhgd : DiffContOnCl ℂ g {z | 0 < z.re}\nhre : SuperpolynomialDecay atTop expR fun x => ‖f ↑x - g ↑x‖\nhfim : ∃ C, ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\nhgim : ∃ C, ∀ (x : ℝ), ‖g (↑x * I)‖ ≤ C\nl : Filter ℂ := comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}\nhfexp : ∃ c, c < 2 ∧ ∃ B, f =O[l] fun z => expR (B * ↑Complex.abs z ^ c)\nhgexp : ∃ c, c < 2 ∧ ∃ B, g =O[l] fun z => expR (B * ↑Complex.abs z ^ c)\nc₁ c₂ B₁ B₂ : ℝ\nhc : c₁ ≤ c₂\nhB : B₁ ≤ B₂\nhB₂ : 0 ≤ B₂\nthis✝ : ∀ᶠ (z : ℂ) in l, 1 ≤ ↑Complex.abs z\nz : ℂ\nhz : 1 ≤ ↑Complex.abs z\nthis : ↑Complex.abs z ^ c₁ ≤ ↑Complex.abs z ^ c₂\n⊢ B₁ * ↑Complex.abs z ^ c₁ ≤ B₂ * ↑Complex.abs z ^ c₂\n[PROOFSTEP]\ngcongr\n[GOAL]\ncase refine'_2\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g✝ : ℂ → E\nz : ℂ\ng : ℂ → E\nhfd : DiffContOnCl ℂ f {z | 0 < z.re}\nhgd : DiffContOnCl ℂ g {z | 0 < z.re}\nhfexp : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nhgexp : ∃ c, c < 2 ∧ ∃ B, g =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : SuperpolynomialDecay atTop expR fun x => ‖f ↑x - g ↑x‖\nhfim : ∃ C, ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ C\nhgim : ∃ C, ∀ (x : ℝ), ‖g (↑x * I)‖ ≤ C\n⊢ ∃ C, ∀ (x : ℝ), ‖(f - g) (↑x * I)‖ ≤ C\n[PROOFSTEP]\nrcases hfim with ⟨Cf, hCf⟩\n[GOAL]\ncase refine'_2.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g✝ : ℂ → E\nz : ℂ\ng : ℂ → E\nhfd : DiffContOnCl ℂ f {z | 0 < z.re}\nhgd : DiffContOnCl ℂ g {z | 0 < z.re}\nhfexp : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nhgexp : ∃ c, c < 2 ∧ ∃ B, g =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : SuperpolynomialDecay atTop expR fun x => ‖f ↑x - g ↑x‖\nhgim : ∃ C, ∀ (x : ℝ), ‖g (↑x * I)‖ ≤ C\nCf : ℝ\nhCf : ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ Cf\n⊢ ∃ C, ∀ (x : ℝ), ‖(f - g) (↑x * I)‖ ≤ C\n[PROOFSTEP]\nrcases hgim with ⟨Cg, hCg⟩\n[GOAL]\ncase refine'_2.intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\na b C : ℝ\nf g✝ : ℂ → E\nz : ℂ\ng : ℂ → E\nhfd : DiffContOnCl ℂ f {z | 0 < z.re}\nhgd : DiffContOnCl ℂ g {z | 0 < z.re}\nhfexp : ∃ c, c < 2 ∧ ∃ B, f =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nhgexp : ∃ c, c < 2 ∧ ∃ B, g =O[comap (↑Complex.abs) atTop ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * ↑Complex.abs z ^ c)\nhre : SuperpolynomialDecay atTop expR fun x => ‖f ↑x - g ↑x‖\nCf : ℝ\nhCf : ∀ (x : ℝ), ‖f (↑x * I)‖ ≤ Cf\nCg : ℝ\nhCg : ∀ (x : ℝ), ‖g (↑x * I)‖ ≤ Cg\n⊢ ∃ C, ∀ (x : ℝ), ‖(f - g) (↑x * I)‖ ≤ C\n[PROOFSTEP]\nexact ⟨Cf + Cg, fun x => norm_sub_le_of_le (hCf x) (hCg x)⟩\n", "meta": {"mathlib_filename": "Mathlib.Analysis.Complex.PhragmenLindelof", "llama_tokens": 135635, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.863391595913457, "lm_q2_score": 0.6076631698328916, "lm_q1q2_score": 0.5246512739798503}}
{"text": "[GOAL]\nX : Type u_1\nY : Type u_2\nZ : Type u_3\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : TopologicalSpace Z\ny : Y\n⊢ Homotopic (const X y) (const X y)\n[PROOFSTEP]\nrfl\n[GOAL]\nX : Type u_1\nY : Type u_2\nZ : Type u_3\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : TopologicalSpace Z\nf : C(X, Y)\nhf : Nullhomotopic f\ng : C(Y, Z)\n⊢ Nullhomotopic (comp g f)\n[PROOFSTEP]\ncases' hf with y hy\n[GOAL]\ncase intro\nX : Type u_1\nY : Type u_2\nZ : Type u_3\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : TopologicalSpace Z\nf : C(X, Y)\ng : C(Y, Z)\ny : Y\nhy : Homotopic f (const X y)\n⊢ Nullhomotopic (comp g f)\n[PROOFSTEP]\nuse g y\n[GOAL]\ncase h\nX : Type u_1\nY : Type u_2\nZ : Type u_3\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : TopologicalSpace Z\nf : C(X, Y)\ng : C(Y, Z)\ny : Y\nhy : Homotopic f (const X y)\n⊢ Homotopic (comp g f) (const X (↑g y))\n[PROOFSTEP]\nexact Homotopic.hcomp hy (Homotopic.refl g)\n[GOAL]\nX : Type u_1\nY : Type u_2\nZ : Type u_3\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : TopologicalSpace Z\nf : C(Y, Z)\nhf : Nullhomotopic f\ng : C(X, Y)\n⊢ Nullhomotopic (comp f g)\n[PROOFSTEP]\ncases' hf with y hy\n[GOAL]\ncase intro\nX : Type u_1\nY : Type u_2\nZ : Type u_3\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : TopologicalSpace Z\nf : C(Y, Z)\ng : C(X, Y)\ny : Z\nhy : Homotopic f (const Y y)\n⊢ Nullhomotopic (comp f g)\n[PROOFSTEP]\nuse y\n[GOAL]\ncase h\nX : Type u_1\nY : Type u_2\nZ : Type u_3\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : TopologicalSpace Z\nf : C(Y, Z)\ng : C(X, Y)\ny : Z\nhy : Homotopic f (const Y y)\n⊢ Homotopic (comp f g) (const X y)\n[PROOFSTEP]\nexact Homotopic.hcomp (Homotopic.refl g) hy\n[GOAL]\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : ContractibleSpace X\n⊢ Nullhomotopic (ContinuousMap.id X)\n[PROOFSTEP]\nobtain ⟨hv⟩ := ContractibleSpace.hequiv_unit X\n[GOAL]\ncase intro\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : ContractibleSpace X\nhv : X ≃ₕ Unit\n⊢ Nullhomotopic (ContinuousMap.id X)\n[PROOFSTEP]\nuse hv.invFun ()\n[GOAL]\ncase h\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : ContractibleSpace X\nhv : X ≃ₕ Unit\n⊢ Homotopic (ContinuousMap.id X) (const X (↑hv.invFun ()))\n[PROOFSTEP]\nconvert hv.left_inv.symm\n[GOAL]\nY : Type u_1\ninst✝ : TopologicalSpace Y\n⊢ ContractibleSpace Y ↔ Nullhomotopic (ContinuousMap.id Y)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nY : Type u_1\ninst✝ : TopologicalSpace Y\n⊢ ContractibleSpace Y → Nullhomotopic (ContinuousMap.id Y)\n[PROOFSTEP]\nintro\n[GOAL]\ncase mp\nY : Type u_1\ninst✝ : TopologicalSpace Y\na✝ : ContractibleSpace Y\n⊢ Nullhomotopic (ContinuousMap.id Y)\n[PROOFSTEP]\napply id_nullhomotopic\n[GOAL]\ncase mpr\nY : Type u_1\ninst✝ : TopologicalSpace Y\n⊢ Nullhomotopic (ContinuousMap.id Y) → ContractibleSpace Y\n[PROOFSTEP]\nrintro ⟨p, h⟩\n[GOAL]\ncase mpr.intro\nY : Type u_1\ninst✝ : TopologicalSpace Y\np : Y\nh : Homotopic (ContinuousMap.id Y) (const Y p)\n⊢ ContractibleSpace Y\n[PROOFSTEP]\nrefine\n  {\n    hequiv_unit' :=\n      ⟨{  toFun := ContinuousMap.const _ ()\n          invFun := ContinuousMap.const _ p\n          left_inv := ?_\n          right_inv := ?_ }⟩ }\n[GOAL]\ncase mpr.intro.refine_1\nY : Type u_1\ninst✝ : TopologicalSpace Y\np : Y\nh : Homotopic (ContinuousMap.id Y) (const Y p)\n⊢ Homotopic (comp (const Unit p) (const Y ())) (ContinuousMap.id Y)\n[PROOFSTEP]\nexact h.symm\n[GOAL]\ncase mpr.intro.refine_2\nY : Type u_1\ninst✝ : TopologicalSpace Y\np : Y\nh : Homotopic (ContinuousMap.id Y) (const Y p)\n⊢ Homotopic (comp (const Y ()) (const Unit p)) (ContinuousMap.id Unit)\n[PROOFSTEP]\nconvert Homotopic.refl (ContinuousMap.id Unit)\n[GOAL]\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : ContractibleSpace X\n⊢ PathConnectedSpace X\n[PROOFSTEP]\nobtain ⟨p, ⟨h⟩⟩ := id_nullhomotopic X\n[GOAL]\ncase intro.intro\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : ContractibleSpace X\np : X\nh : Homotopy (ContinuousMap.id X) (const X p)\n⊢ PathConnectedSpace X\n[PROOFSTEP]\nhave : ∀ x, Joined p x := fun x => ⟨(h.evalAt x).symm⟩\n[GOAL]\ncase intro.intro\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : ContractibleSpace X\np : X\nh : Homotopy (ContinuousMap.id X) (const X p)\nthis : ∀ (x : X), Joined p x\n⊢ PathConnectedSpace X\n[PROOFSTEP]\nrw [pathConnectedSpace_iff_eq]\n[GOAL]\ncase intro.intro\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : ContractibleSpace X\np : X\nh : Homotopy (ContinuousMap.id X) (const X p)\nthis : ∀ (x : X), Joined p x\n⊢ ∃ x, pathComponent x = Set.univ\n[PROOFSTEP]\nuse p\n[GOAL]\ncase h\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : ContractibleSpace X\np : X\nh : Homotopy (ContinuousMap.id X) (const X p)\nthis : ∀ (x : X), Joined p x\n⊢ pathComponent p = Set.univ\n[PROOFSTEP]\next\n[GOAL]\ncase h.h\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : ContractibleSpace X\np : X\nh : Homotopy (ContinuousMap.id X) (const X p)\nthis : ∀ (x : X), Joined p x\nx✝ : X\n⊢ x✝ ∈ pathComponent p ↔ x✝ ∈ Set.univ\n[PROOFSTEP]\ntauto\n", "meta": {"mathlib_filename": "Mathlib.Topology.Homotopy.Contractible", "llama_tokens": 2360, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7799928900257126, "lm_q2_score": 0.6723317123102955, "lm_q1q2_score": 0.5244139553408433}}
{"text": "[GOAL]\nN : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝² : Group N\ninst✝¹ : Group G\ninst✝ : Group H\nφ : G →* MulAut N\na b c : N ⋊[φ] G\n⊢ (a * b * c).left = (a * (b * c)).left\n[PROOFSTEP]\nsimp [mul_assoc]\n[GOAL]\nN : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝² : Group N\ninst✝¹ : Group G\ninst✝ : Group H\nφ : G →* MulAut N\na b c : N ⋊[φ] G\n⊢ (a * b * c).right = (a * (b * c)).right\n[PROOFSTEP]\nsimp [mul_assoc]\n[GOAL]\nN : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝² : Group N\ninst✝¹ : Group G\ninst✝ : Group H\nφ : G →* MulAut N\na : N ⋊[φ] G\n⊢ (1 * a).left = a.left\n[PROOFSTEP]\nsimp\n[GOAL]\nN : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝² : Group N\ninst✝¹ : Group G\ninst✝ : Group H\nφ : G →* MulAut N\na : N ⋊[φ] G\n⊢ (a * 1).left = a.left\n[PROOFSTEP]\nsimp\n[GOAL]\nN : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝² : Group N\ninst✝¹ : Group G\ninst✝ : Group H\nφ : G →* MulAut N\na : N ⋊[φ] G\n⊢ (a⁻¹ * a).left = 1.left\n[PROOFSTEP]\nsimp\n[GOAL]\nN : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝² : Group N\ninst✝¹ : Group G\ninst✝ : Group H\nφ : G →* MulAut N\na : N ⋊[φ] G\n⊢ (a⁻¹ * a).right = 1.right\n[PROOFSTEP]\nsimp\n[GOAL]\nN : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝² : Group N\ninst✝¹ : Group G\ninst✝ : Group H\nφ : G →* MulAut N\n⊢ ∀ (x y : N),\n    OneHom.toFun\n        { toFun := fun n => { left := n, right := 1 },\n          map_one' := (_ : (fun n => { left := n, right := 1 }) 1 = (fun n => { left := n, right := 1 }) 1) }\n        (x * y) =\n      OneHom.toFun\n          { toFun := fun n => { left := n, right := 1 },\n            map_one' := (_ : (fun n => { left := n, right := 1 }) 1 = (fun n => { left := n, right := 1 }) 1) }\n          x *\n        OneHom.toFun\n          { toFun := fun n => { left := n, right := 1 },\n            map_one' := (_ : (fun n => { left := n, right := 1 }) 1 = (fun n => { left := n, right := 1 }) 1) }\n          y\n[PROOFSTEP]\nintros\n[GOAL]\nN : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝² : Group N\ninst✝¹ : Group G\ninst✝ : Group H\nφ : G →* MulAut N\nx✝ y✝ : N\n⊢ OneHom.toFun\n      { toFun := fun n => { left := n, right := 1 },\n        map_one' := (_ : (fun n => { left := n, right := 1 }) 1 = (fun n => { left := n, right := 1 }) 1) }\n      (x✝ * y✝) =\n    OneHom.toFun\n        { toFun := fun n => { left := n, right := 1 },\n          map_one' := (_ : (fun n => { left := n, right := 1 }) 1 = (fun n => { left := n, right := 1 }) 1) }\n        x✝ *\n      OneHom.toFun\n        { toFun := fun n => { left := n, right := 1 },\n          map_one' := (_ : (fun n => { left := n, right := 1 }) 1 = (fun n => { left := n, right := 1 }) 1) }\n        y✝\n[PROOFSTEP]\next\n[GOAL]\ncase left\nN : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝² : Group N\ninst✝¹ : Group G\ninst✝ : Group H\nφ : G →* MulAut N\nx✝ y✝ : N\n⊢ (OneHom.toFun\n        { toFun := fun n => { left := n, right := 1 },\n          map_one' := (_ : (fun n => { left := n, right := 1 }) 1 = (fun n => { left := n, right := 1 }) 1) }\n        (x✝ * y✝)).left =\n    (OneHom.toFun\n          { toFun := fun n => { left := n, right := 1 },\n            map_one' := (_ : (fun n => { left := n, right := 1 }) 1 = (fun n => { left := n, right := 1 }) 1) }\n          x✝ *\n        OneHom.toFun\n          { toFun := fun n => { left := n, right := 1 },\n            map_one' := (_ : (fun n => { left := n, right := 1 }) 1 = (fun n => { left := n, right := 1 }) 1) }\n          y✝).left\n[PROOFSTEP]\nsimp only [mul_left, map_one, MulAut.one_apply, mul_right, mul_one]\n[GOAL]\ncase right\nN : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝² : Group N\ninst✝¹ : Group G\ninst✝ : Group H\nφ : G →* MulAut N\nx✝ y✝ : N\n⊢ (OneHom.toFun\n        { toFun := fun n => { left := n, right := 1 },\n          map_one' := (_ : (fun n => { left := n, right := 1 }) 1 = (fun n => { left := n, right := 1 }) 1) }\n        (x✝ * y✝)).right =\n    (OneHom.toFun\n          { toFun := fun n => { left := n, right := 1 },\n            map_one' := (_ : (fun n => { left := n, right := 1 }) 1 = (fun n => { left := n, right := 1 }) 1) }\n          x✝ *\n        OneHom.toFun\n          { toFun := fun n => { left := n, right := 1 },\n            map_one' := (_ : (fun n => { left := n, right := 1 }) 1 = (fun n => { left := n, right := 1 }) 1) }\n          y✝).right\n[PROOFSTEP]\nsimp only [mul_left, map_one, MulAut.one_apply, mul_right, mul_one]\n[GOAL]\nN : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝² : Group N\ninst✝¹ : Group G\ninst✝ : Group H\nφ : G →* MulAut N\n⊢ ∀ (x y : G),\n    OneHom.toFun\n        { toFun := fun g => { left := 1, right := g },\n          map_one' := (_ : (fun g => { left := 1, right := g }) 1 = (fun g => { left := 1, right := g }) 1) }\n        (x * y) =\n      OneHom.toFun\n          { toFun := fun g => { left := 1, right := g },\n            map_one' := (_ : (fun g => { left := 1, right := g }) 1 = (fun g => { left := 1, right := g }) 1) }\n          x *\n        OneHom.toFun\n          { toFun := fun g => { left := 1, right := g },\n            map_one' := (_ : (fun g => { left := 1, right := g }) 1 = (fun g => { left := 1, right := g }) 1) }\n          y\n[PROOFSTEP]\nintros\n[GOAL]\nN : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝² : Group N\ninst✝¹ : Group G\ninst✝ : Group H\nφ : G →* MulAut N\nx✝ y✝ : G\n⊢ OneHom.toFun\n      { toFun := fun g => { left := 1, right := g },\n        map_one' := (_ : (fun g => { left := 1, right := g }) 1 = (fun g => { left := 1, right := g }) 1) }\n      (x✝ * y✝) =\n    OneHom.toFun\n        { toFun := fun g => { left := 1, right := g },\n          map_one' := (_ : (fun g => { left := 1, right := g }) 1 = (fun g => { left := 1, right := g }) 1) }\n        x✝ *\n      OneHom.toFun\n        { toFun := fun g => { left := 1, right := g },\n          map_one' := (_ : (fun g => { left := 1, right := g }) 1 = (fun g => { left := 1, right := g }) 1) }\n        y✝\n[PROOFSTEP]\next\n[GOAL]\ncase left\nN : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝² : Group N\ninst✝¹ : Group G\ninst✝ : Group H\nφ : G →* MulAut N\nx✝ y✝ : G\n⊢ (OneHom.toFun\n        { toFun := fun g => { left := 1, right := g },\n          map_one' := (_ : (fun g => { left := 1, right := g }) 1 = (fun g => { left := 1, right := g }) 1) }\n        (x✝ * y✝)).left =\n    (OneHom.toFun\n          { toFun := fun g => { left := 1, right := g },\n            map_one' := (_ : (fun g => { left := 1, right := g }) 1 = (fun g => { left := 1, right := g }) 1) }\n          x✝ *\n        OneHom.toFun\n          { toFun := fun g => { left := 1, right := g },\n            map_one' := (_ : (fun g => { left := 1, right := g }) 1 = (fun g => { left := 1, right := g }) 1) }\n          y✝).left\n[PROOFSTEP]\nsimp\n[GOAL]\ncase right\nN : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝² : Group N\ninst✝¹ : Group G\ninst✝ : Group H\nφ : G →* MulAut N\nx✝ y✝ : G\n⊢ (OneHom.toFun\n        { toFun := fun g => { left := 1, right := g },\n          map_one' := (_ : (fun g => { left := 1, right := g }) 1 = (fun g => { left := 1, right := g }) 1) }\n        (x✝ * y✝)).right =\n    (OneHom.toFun\n          { toFun := fun g => { left := 1, right := g },\n            map_one' := (_ : (fun g => { left := 1, right := g }) 1 = (fun g => { left := 1, right := g }) 1) }\n          x✝ *\n        OneHom.toFun\n          { toFun := fun g => { left := 1, right := g },\n            map_one' := (_ : (fun g => { left := 1, right := g }) 1 = (fun g => { left := 1, right := g }) 1) }\n          y✝).right\n[PROOFSTEP]\nsimp\n[GOAL]\nN : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝² : Group N\ninst✝¹ : Group G\ninst✝ : Group H\nφ : G →* MulAut N\ng : G\nn : N\n⊢ ↑inl (↑(↑φ g) n) = ↑inr g * ↑inl n * ↑inr g⁻¹\n[PROOFSTEP]\next\n[GOAL]\ncase left\nN : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝² : Group N\ninst✝¹ : Group G\ninst✝ : Group H\nφ : G →* MulAut N\ng : G\nn : N\n⊢ (↑inl (↑(↑φ g) n)).left = (↑inr g * ↑inl n * ↑inr g⁻¹).left\n[PROOFSTEP]\nsimp\n[GOAL]\ncase right\nN : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝² : Group N\ninst✝¹ : Group G\ninst✝ : Group H\nφ : G →* MulAut N\ng : G\nn : N\n⊢ (↑inl (↑(↑φ g) n)).right = (↑inr g * ↑inl n * ↑inr g⁻¹).right\n[PROOFSTEP]\nsimp\n[GOAL]\nN : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝² : Group N\ninst✝¹ : Group G\ninst✝ : Group H\nφ : G →* MulAut N\ng : G\nn : N\n⊢ ↑inl (↑(↑φ g)⁻¹ n) = ↑inr g⁻¹ * ↑inl n * ↑inr g\n[PROOFSTEP]\nrw [← MonoidHom.map_inv, inl_aut, inv_inv]\n[GOAL]\nN : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝² : Group N\ninst✝¹ : Group G\ninst✝ : Group H\nφ : G →* MulAut N\ng : G\nn : N\n⊢ { left := n, right := g } = ↑inl n * ↑inr g\n[PROOFSTEP]\next\n[GOAL]\ncase left\nN : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝² : Group N\ninst✝¹ : Group G\ninst✝ : Group H\nφ : G →* MulAut N\ng : G\nn : N\n⊢ { left := n, right := g }.left = (↑inl n * ↑inr g).left\n[PROOFSTEP]\nsimp\n[GOAL]\ncase right\nN : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝² : Group N\ninst✝¹ : Group G\ninst✝ : Group H\nφ : G →* MulAut N\ng : G\nn : N\n⊢ { left := n, right := g }.right = (↑inl n * ↑inr g).right\n[PROOFSTEP]\nsimp\n[GOAL]\nN : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝² : Group N\ninst✝¹ : Group G\ninst✝ : Group H\nφ : G →* MulAut N\nx : N ⋊[φ] G\n⊢ ↑inl x.left * ↑inr x.right = x\n[PROOFSTEP]\next\n[GOAL]\ncase left\nN : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝² : Group N\ninst✝¹ : Group G\ninst✝ : Group H\nφ : G →* MulAut N\nx : N ⋊[φ] G\n⊢ (↑inl x.left * ↑inr x.right).left = x.left\n[PROOFSTEP]\nsimp\n[GOAL]\ncase right\nN : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝² : Group N\ninst✝¹ : Group G\ninst✝ : Group H\nφ : G →* MulAut N\nx : N ⋊[φ] G\n⊢ (↑inl x.left * ↑inr x.right).right = x.right\n[PROOFSTEP]\nsimp\n[GOAL]\nN : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝² : Group N\ninst✝¹ : Group G\ninst✝ : Group H\nφ : G →* MulAut N\n⊢ MonoidHom.comp rightHom inl = 1\n[PROOFSTEP]\next\n[GOAL]\ncase h\nN : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝² : Group N\ninst✝¹ : Group G\ninst✝ : Group H\nφ : G →* MulAut N\nx✝ : N\n⊢ ↑(MonoidHom.comp rightHom inl) x✝ = ↑1 x✝\n[PROOFSTEP]\nsimp [rightHom]\n[GOAL]\nN : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝² : Group N\ninst✝¹ : Group G\ninst✝ : Group H\nφ : G →* MulAut N\n⊢ MonoidHom.comp rightHom inr = MonoidHom.id G\n[PROOFSTEP]\next\n[GOAL]\ncase h\nN : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝² : Group N\ninst✝¹ : Group G\ninst✝ : Group H\nφ : G →* MulAut N\nx✝ : G\n⊢ ↑(MonoidHom.comp rightHom inr) x✝ = ↑(MonoidHom.id G) x✝\n[PROOFSTEP]\nsimp [rightHom]\n[GOAL]\nN : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝² : Group N\ninst✝¹ : Group G\ninst✝ : Group H\nφ : G →* MulAut N\nn : N\n⊢ ↑rightHom (↑inl n) = 1\n[PROOFSTEP]\nsimp [rightHom]\n[GOAL]\nN : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝² : Group N\ninst✝¹ : Group G\ninst✝ : Group H\nφ : G →* MulAut N\ng : G\n⊢ ↑rightHom (↑inr g) = g\n[PROOFSTEP]\nsimp [rightHom]\n[GOAL]\nN : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝² : Group N\ninst✝¹ : Group G\ninst✝ : Group H\nφ : G →* MulAut N\nx✝ : N ⋊[φ] G\n⊢ x✝ ∈ MonoidHom.range inl → x✝ ∈ MonoidHom.ker rightHom\n[PROOFSTEP]\nsimp (config := { contextual := true }) [MonoidHom.mem_ker, eq_comm]\n[GOAL]\nN : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝² : Group N\ninst✝¹ : Group G\ninst✝ : Group H\nφ : G →* MulAut N\nx : N ⋊[φ] G\nhx : x ∈ MonoidHom.ker rightHom\n⊢ ↑inl x.left = x\n[PROOFSTEP]\next\n[GOAL]\ncase left\nN : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝² : Group N\ninst✝¹ : Group G\ninst✝ : Group H\nφ : G →* MulAut N\nx : N ⋊[φ] G\nhx : x ∈ MonoidHom.ker rightHom\n⊢ (↑inl x.left).left = x.left\n[PROOFSTEP]\nsimp_all [MonoidHom.mem_ker]\n[GOAL]\ncase right\nN : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝² : Group N\ninst✝¹ : Group G\ninst✝ : Group H\nφ : G →* MulAut N\nx : N ⋊[φ] G\nhx : x ∈ MonoidHom.ker rightHom\n⊢ (↑inl x.left).right = x.right\n[PROOFSTEP]\nsimp_all [MonoidHom.mem_ker]\n[GOAL]\nN : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝² : Group N\ninst✝¹ : Group G\ninst✝ : Group H\nφ : G →* MulAut N\nf₁✝ : N →* H\nf₂✝ : G →* H\nh✝ :\n  ∀ (g : G),\n    MonoidHom.comp f₁✝ (MulEquiv.toMonoidHom (↑φ g)) = MonoidHom.comp (MulEquiv.toMonoidHom (↑MulAut.conj (↑f₂✝ g))) f₁✝\nf₁ : N →* H\nf₂ : G →* H\nh :\n  ∀ (g : G),\n    MonoidHom.comp f₁ (MulEquiv.toMonoidHom (↑φ g)) = MonoidHom.comp (MulEquiv.toMonoidHom (↑MulAut.conj (↑f₂ g))) f₁\n⊢ (fun a => ↑f₁ a.left * ↑f₂ a.right) 1 = 1\n[PROOFSTEP]\nsimp\n[GOAL]\nN : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝² : Group N\ninst✝¹ : Group G\ninst✝ : Group H\nφ : G →* MulAut N\nf₁✝ : N →* H\nf₂✝ : G →* H\nh✝ :\n  ∀ (g : G),\n    MonoidHom.comp f₁✝ (MulEquiv.toMonoidHom (↑φ g)) = MonoidHom.comp (MulEquiv.toMonoidHom (↑MulAut.conj (↑f₂✝ g))) f₁✝\nf₁ : N →* H\nf₂ : G →* H\nh :\n  ∀ (g : G),\n    MonoidHom.comp f₁ (MulEquiv.toMonoidHom (↑φ g)) = MonoidHom.comp (MulEquiv.toMonoidHom (↑MulAut.conj (↑f₂ g))) f₁\na b : N ⋊[φ] G\n⊢ OneHom.toFun { toFun := fun a => ↑f₁ a.left * ↑f₂ a.right, map_one' := (_ : ↑f₁ 1 * ↑f₂ 1 = 1) } (a * b) =\n    OneHom.toFun { toFun := fun a => ↑f₁ a.left * ↑f₂ a.right, map_one' := (_ : ↑f₁ 1 * ↑f₂ 1 = 1) } a *\n      OneHom.toFun { toFun := fun a => ↑f₁ a.left * ↑f₂ a.right, map_one' := (_ : ↑f₁ 1 * ↑f₂ 1 = 1) } b\n[PROOFSTEP]\nhave := fun n g ↦ FunLike.ext_iff.1 (h n) g\n[GOAL]\nN : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝² : Group N\ninst✝¹ : Group G\ninst✝ : Group H\nφ : G →* MulAut N\nf₁✝ : N →* H\nf₂✝ : G →* H\nh✝ :\n  ∀ (g : G),\n    MonoidHom.comp f₁✝ (MulEquiv.toMonoidHom (↑φ g)) = MonoidHom.comp (MulEquiv.toMonoidHom (↑MulAut.conj (↑f₂✝ g))) f₁✝\nf₁ : N →* H\nf₂ : G →* H\nh :\n  ∀ (g : G),\n    MonoidHom.comp f₁ (MulEquiv.toMonoidHom (↑φ g)) = MonoidHom.comp (MulEquiv.toMonoidHom (↑MulAut.conj (↑f₂ g))) f₁\na b : N ⋊[φ] G\nthis :\n  ∀ (n : G) (g : N),\n    ↑(MonoidHom.comp f₁ (MulEquiv.toMonoidHom (↑φ n))) g =\n      ↑(MonoidHom.comp (MulEquiv.toMonoidHom (↑MulAut.conj (↑f₂ n))) f₁) g\n⊢ OneHom.toFun { toFun := fun a => ↑f₁ a.left * ↑f₂ a.right, map_one' := (_ : ↑f₁ 1 * ↑f₂ 1 = 1) } (a * b) =\n    OneHom.toFun { toFun := fun a => ↑f₁ a.left * ↑f₂ a.right, map_one' := (_ : ↑f₁ 1 * ↑f₂ 1 = 1) } a *\n      OneHom.toFun { toFun := fun a => ↑f₁ a.left * ↑f₂ a.right, map_one' := (_ : ↑f₁ 1 * ↑f₂ 1 = 1) } b\n[PROOFSTEP]\nsimp only [MulAut.conj_apply, MonoidHom.comp_apply, MulEquiv.coe_toMonoidHom] at this \n[GOAL]\nN : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝² : Group N\ninst✝¹ : Group G\ninst✝ : Group H\nφ : G →* MulAut N\nf₁✝ : N →* H\nf₂✝ : G →* H\nh✝ :\n  ∀ (g : G),\n    MonoidHom.comp f₁✝ (MulEquiv.toMonoidHom (↑φ g)) = MonoidHom.comp (MulEquiv.toMonoidHom (↑MulAut.conj (↑f₂✝ g))) f₁✝\nf₁ : N →* H\nf₂ : G →* H\nh :\n  ∀ (g : G),\n    MonoidHom.comp f₁ (MulEquiv.toMonoidHom (↑φ g)) = MonoidHom.comp (MulEquiv.toMonoidHom (↑MulAut.conj (↑f₂ g))) f₁\na b : N ⋊[φ] G\nthis : ∀ (n : G) (g : N), ↑f₁ (↑(↑φ n) g) = ↑f₂ n * ↑f₁ g * (↑f₂ n)⁻¹\n⊢ OneHom.toFun { toFun := fun a => ↑f₁ a.left * ↑f₂ a.right, map_one' := (_ : ↑f₁ 1 * ↑f₂ 1 = 1) } (a * b) =\n    OneHom.toFun { toFun := fun a => ↑f₁ a.left * ↑f₂ a.right, map_one' := (_ : ↑f₁ 1 * ↑f₂ 1 = 1) } a *\n      OneHom.toFun { toFun := fun a => ↑f₁ a.left * ↑f₂ a.right, map_one' := (_ : ↑f₁ 1 * ↑f₂ 1 = 1) } b\n[PROOFSTEP]\nsimp only [mul_left, mul_right, map_mul, this, mul_assoc, inv_mul_cancel_left]\n[GOAL]\nN : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝² : Group N\ninst✝¹ : Group G\ninst✝ : Group H\nφ : G →* MulAut N\nf₁ : N →* H\nf₂ : G →* H\nh :\n  ∀ (g : G),\n    MonoidHom.comp f₁ (MulEquiv.toMonoidHom (↑φ g)) = MonoidHom.comp (MulEquiv.toMonoidHom (↑MulAut.conj (↑f₂ g))) f₁\nn : N\n⊢ ↑(lift f₁ f₂ h) (↑inl n) = ↑f₁ n\n[PROOFSTEP]\nsimp [lift]\n[GOAL]\nN : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝² : Group N\ninst✝¹ : Group G\ninst✝ : Group H\nφ : G →* MulAut N\nf₁ : N →* H\nf₂ : G →* H\nh :\n  ∀ (g : G),\n    MonoidHom.comp f₁ (MulEquiv.toMonoidHom (↑φ g)) = MonoidHom.comp (MulEquiv.toMonoidHom (↑MulAut.conj (↑f₂ g))) f₁\n⊢ MonoidHom.comp (lift f₁ f₂ h) inl = f₁\n[PROOFSTEP]\next\n[GOAL]\ncase h\nN : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝² : Group N\ninst✝¹ : Group G\ninst✝ : Group H\nφ : G →* MulAut N\nf₁ : N →* H\nf₂ : G →* H\nh :\n  ∀ (g : G),\n    MonoidHom.comp f₁ (MulEquiv.toMonoidHom (↑φ g)) = MonoidHom.comp (MulEquiv.toMonoidHom (↑MulAut.conj (↑f₂ g))) f₁\nx✝ : N\n⊢ ↑(MonoidHom.comp (lift f₁ f₂ h) inl) x✝ = ↑f₁ x✝\n[PROOFSTEP]\nsimp\n[GOAL]\nN : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝² : Group N\ninst✝¹ : Group G\ninst✝ : Group H\nφ : G →* MulAut N\nf₁ : N →* H\nf₂ : G →* H\nh :\n  ∀ (g : G),\n    MonoidHom.comp f₁ (MulEquiv.toMonoidHom (↑φ g)) = MonoidHom.comp (MulEquiv.toMonoidHom (↑MulAut.conj (↑f₂ g))) f₁\ng : G\n⊢ ↑(lift f₁ f₂ h) (↑inr g) = ↑f₂ g\n[PROOFSTEP]\nsimp [lift]\n[GOAL]\nN : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝² : Group N\ninst✝¹ : Group G\ninst✝ : Group H\nφ : G →* MulAut N\nf₁ : N →* H\nf₂ : G →* H\nh :\n  ∀ (g : G),\n    MonoidHom.comp f₁ (MulEquiv.toMonoidHom (↑φ g)) = MonoidHom.comp (MulEquiv.toMonoidHom (↑MulAut.conj (↑f₂ g))) f₁\n⊢ MonoidHom.comp (lift f₁ f₂ h) inr = f₂\n[PROOFSTEP]\next\n[GOAL]\ncase h\nN : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝² : Group N\ninst✝¹ : Group G\ninst✝ : Group H\nφ : G →* MulAut N\nf₁ : N →* H\nf₂ : G →* H\nh :\n  ∀ (g : G),\n    MonoidHom.comp f₁ (MulEquiv.toMonoidHom (↑φ g)) = MonoidHom.comp (MulEquiv.toMonoidHom (↑MulAut.conj (↑f₂ g))) f₁\nx✝ : G\n⊢ ↑(MonoidHom.comp (lift f₁ f₂ h) inr) x✝ = ↑f₂ x✝\n[PROOFSTEP]\nsimp\n[GOAL]\nN : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝² : Group N\ninst✝¹ : Group G\ninst✝ : Group H\nφ : G →* MulAut N\nf₁ : N →* H\nf₂ : G →* H\nh :\n  ∀ (g : G),\n    MonoidHom.comp f₁ (MulEquiv.toMonoidHom (↑φ g)) = MonoidHom.comp (MulEquiv.toMonoidHom (↑MulAut.conj (↑f₂ g))) f₁\nF : N ⋊[φ] G →* H\nx✝ : G\n⊢ MonoidHom.comp (MonoidHom.comp F inl) (MulEquiv.toMonoidHom (↑φ x✝)) =\n    MonoidHom.comp (MulEquiv.toMonoidHom (↑MulAut.conj (↑(MonoidHom.comp F inr) x✝))) (MonoidHom.comp F inl)\n[PROOFSTEP]\next\n[GOAL]\ncase h\nN : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝² : Group N\ninst✝¹ : Group G\ninst✝ : Group H\nφ : G →* MulAut N\nf₁ : N →* H\nf₂ : G →* H\nh :\n  ∀ (g : G),\n    MonoidHom.comp f₁ (MulEquiv.toMonoidHom (↑φ g)) = MonoidHom.comp (MulEquiv.toMonoidHom (↑MulAut.conj (↑f₂ g))) f₁\nF : N ⋊[φ] G →* H\nx✝¹ : G\nx✝ : N\n⊢ ↑(MonoidHom.comp (MonoidHom.comp F inl) (MulEquiv.toMonoidHom (↑φ x✝¹))) x✝ =\n    ↑(MonoidHom.comp (MulEquiv.toMonoidHom (↑MulAut.conj (↑(MonoidHom.comp F inr) x✝¹))) (MonoidHom.comp F inl)) x✝\n[PROOFSTEP]\nsimp [inl_aut]\n[GOAL]\nN : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝² : Group N\ninst✝¹ : Group G\ninst✝ : Group H\nφ : G →* MulAut N\nf₁ : N →* H\nf₂ : G →* H\nh :\n  ∀ (g : G),\n    MonoidHom.comp f₁ (MulEquiv.toMonoidHom (↑φ g)) = MonoidHom.comp (MulEquiv.toMonoidHom (↑MulAut.conj (↑f₂ g))) f₁\nF : N ⋊[φ] G →* H\n⊢ F =\n    lift (MonoidHom.comp F inl) (MonoidHom.comp F inr)\n      (_ :\n        ∀ (x : G),\n          MonoidHom.comp (MonoidHom.comp F inl) (MulEquiv.toMonoidHom (↑φ x)) =\n            MonoidHom.comp (MulEquiv.toMonoidHom (↑MulAut.conj (↑(MonoidHom.comp F inr) x))) (MonoidHom.comp F inl))\n[PROOFSTEP]\nrw [FunLike.ext_iff]\n[GOAL]\nN : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝² : Group N\ninst✝¹ : Group G\ninst✝ : Group H\nφ : G →* MulAut N\nf₁ : N →* H\nf₂ : G →* H\nh :\n  ∀ (g : G),\n    MonoidHom.comp f₁ (MulEquiv.toMonoidHom (↑φ g)) = MonoidHom.comp (MulEquiv.toMonoidHom (↑MulAut.conj (↑f₂ g))) f₁\nF : N ⋊[φ] G →* H\n⊢ ∀ (x : N ⋊[φ] G),\n    ↑F x =\n      ↑(lift (MonoidHom.comp F inl) (MonoidHom.comp F inr)\n            (_ :\n              ∀ (x : G),\n                MonoidHom.comp (MonoidHom.comp F inl) (MulEquiv.toMonoidHom (↑φ x)) =\n                  MonoidHom.comp (MulEquiv.toMonoidHom (↑MulAut.conj (↑(MonoidHom.comp F inr) x)))\n                    (MonoidHom.comp F inl)))\n        x\n[PROOFSTEP]\nsimp only [lift, MonoidHom.comp_apply, MonoidHom.coe_mk, OneHom.coe_mk, ← map_mul, inl_left_mul_inr_right, forall_const]\n[GOAL]\nN : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝² : Group N\ninst✝¹ : Group G\ninst✝ : Group H\nφ : G →* MulAut N\nf₁ : N →* H\nf₂ : G →* H\nh :\n  ∀ (g : G),\n    MonoidHom.comp f₁ (MulEquiv.toMonoidHom (↑φ g)) = MonoidHom.comp (MulEquiv.toMonoidHom (↑MulAut.conj (↑f₂ g))) f₁\nf g : N ⋊[φ] G →* H\nhl : MonoidHom.comp f inl = MonoidHom.comp g inl\nhr : MonoidHom.comp f inr = MonoidHom.comp g inr\n⊢ f = g\n[PROOFSTEP]\nrw [lift_unique f, lift_unique g]\n[GOAL]\nN : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝² : Group N\ninst✝¹ : Group G\ninst✝ : Group H\nφ : G →* MulAut N\nf₁ : N →* H\nf₂ : G →* H\nh :\n  ∀ (g : G),\n    MonoidHom.comp f₁ (MulEquiv.toMonoidHom (↑φ g)) = MonoidHom.comp (MulEquiv.toMonoidHom (↑MulAut.conj (↑f₂ g))) f₁\nf g : N ⋊[φ] G →* H\nhl : MonoidHom.comp f inl = MonoidHom.comp g inl\nhr : MonoidHom.comp f inr = MonoidHom.comp g inr\n⊢ lift (MonoidHom.comp f inl) (MonoidHom.comp f inr)\n      (_ :\n        ∀ (x : G),\n          MonoidHom.comp (MonoidHom.comp f inl) (MulEquiv.toMonoidHom (↑φ x)) =\n            MonoidHom.comp (MulEquiv.toMonoidHom (↑MulAut.conj (↑(MonoidHom.comp f inr) x))) (MonoidHom.comp f inl)) =\n    lift (MonoidHom.comp g inl) (MonoidHom.comp g inr)\n      (_ :\n        ∀ (x : G),\n          MonoidHom.comp (MonoidHom.comp g inl) (MulEquiv.toMonoidHom (↑φ x)) =\n            MonoidHom.comp (MulEquiv.toMonoidHom (↑MulAut.conj (↑(MonoidHom.comp g inr) x))) (MonoidHom.comp g inl))\n[PROOFSTEP]\nsimp only [*]\n[GOAL]\nN : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝⁴ : Group N\ninst✝³ : Group G\ninst✝² : Group H\nφ : G →* MulAut N\nN₁ : Type u_4\nG₁ : Type u_5\ninst✝¹ : Group N₁\ninst✝ : Group G₁\nφ₁ : G₁ →* MulAut N₁\nf₁ : N →* N₁\nf₂ : G →* G₁\nh : ∀ (g : G), MonoidHom.comp f₁ (MulEquiv.toMonoidHom (↑φ g)) = MonoidHom.comp (MulEquiv.toMonoidHom (↑φ₁ (↑f₂ g))) f₁\n⊢ (fun x => { left := ↑f₁ x.left, right := ↑f₂ x.right }) 1 = 1\n[PROOFSTEP]\nsimp\n[GOAL]\nN : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝⁴ : Group N\ninst✝³ : Group G\ninst✝² : Group H\nφ : G →* MulAut N\nN₁ : Type u_4\nG₁ : Type u_5\ninst✝¹ : Group N₁\ninst✝ : Group G₁\nφ₁ : G₁ →* MulAut N₁\nf₁ : N →* N₁\nf₂ : G →* G₁\nh : ∀ (g : G), MonoidHom.comp f₁ (MulEquiv.toMonoidHom (↑φ g)) = MonoidHom.comp (MulEquiv.toMonoidHom (↑φ₁ (↑f₂ g))) f₁\nx y : N ⋊[φ] G\n⊢ OneHom.toFun\n      { toFun := fun x => { left := ↑f₁ x.left, right := ↑f₂ x.right },\n        map_one' := (_ : { left := ↑f₁ 1, right := ↑f₂ 1 } = 1) }\n      (x * y) =\n    OneHom.toFun\n        { toFun := fun x => { left := ↑f₁ x.left, right := ↑f₂ x.right },\n          map_one' := (_ : { left := ↑f₁ 1, right := ↑f₂ 1 } = 1) }\n        x *\n      OneHom.toFun\n        { toFun := fun x => { left := ↑f₁ x.left, right := ↑f₂ x.right },\n          map_one' := (_ : { left := ↑f₁ 1, right := ↑f₂ 1 } = 1) }\n        y\n[PROOFSTEP]\nreplace h := FunLike.ext_iff.1 (h x.right) y.left\n[GOAL]\nN : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝⁴ : Group N\ninst✝³ : Group G\ninst✝² : Group H\nφ : G →* MulAut N\nN₁ : Type u_4\nG₁ : Type u_5\ninst✝¹ : Group N₁\ninst✝ : Group G₁\nφ₁ : G₁ →* MulAut N₁\nf₁ : N →* N₁\nf₂ : G →* G₁\nx y : N ⋊[φ] G\nh :\n  ↑(MonoidHom.comp f₁ (MulEquiv.toMonoidHom (↑φ x.right))) y.left =\n    ↑(MonoidHom.comp (MulEquiv.toMonoidHom (↑φ₁ (↑f₂ x.right))) f₁) y.left\n⊢ OneHom.toFun\n      { toFun := fun x => { left := ↑f₁ x.left, right := ↑f₂ x.right },\n        map_one' := (_ : { left := ↑f₁ 1, right := ↑f₂ 1 } = 1) }\n      (x * y) =\n    OneHom.toFun\n        { toFun := fun x => { left := ↑f₁ x.left, right := ↑f₂ x.right },\n          map_one' := (_ : { left := ↑f₁ 1, right := ↑f₂ 1 } = 1) }\n        x *\n      OneHom.toFun\n        { toFun := fun x => { left := ↑f₁ x.left, right := ↑f₂ x.right },\n          map_one' := (_ : { left := ↑f₁ 1, right := ↑f₂ 1 } = 1) }\n        y\n[PROOFSTEP]\next\n[GOAL]\ncase left\nN : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝⁴ : Group N\ninst✝³ : Group G\ninst✝² : Group H\nφ : G →* MulAut N\nN₁ : Type u_4\nG₁ : Type u_5\ninst✝¹ : Group N₁\ninst✝ : Group G₁\nφ₁ : G₁ →* MulAut N₁\nf₁ : N →* N₁\nf₂ : G →* G₁\nx y : N ⋊[φ] G\nh :\n  ↑(MonoidHom.comp f₁ (MulEquiv.toMonoidHom (↑φ x.right))) y.left =\n    ↑(MonoidHom.comp (MulEquiv.toMonoidHom (↑φ₁ (↑f₂ x.right))) f₁) y.left\n⊢ (OneHom.toFun\n        { toFun := fun x => { left := ↑f₁ x.left, right := ↑f₂ x.right },\n          map_one' := (_ : { left := ↑f₁ 1, right := ↑f₂ 1 } = 1) }\n        (x * y)).left =\n    (OneHom.toFun\n          { toFun := fun x => { left := ↑f₁ x.left, right := ↑f₂ x.right },\n            map_one' := (_ : { left := ↑f₁ 1, right := ↑f₂ 1 } = 1) }\n          x *\n        OneHom.toFun\n          { toFun := fun x => { left := ↑f₁ x.left, right := ↑f₂ x.right },\n            map_one' := (_ : { left := ↑f₁ 1, right := ↑f₂ 1 } = 1) }\n          y).left\n[PROOFSTEP]\nsimp_all\n[GOAL]\ncase right\nN : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝⁴ : Group N\ninst✝³ : Group G\ninst✝² : Group H\nφ : G →* MulAut N\nN₁ : Type u_4\nG₁ : Type u_5\ninst✝¹ : Group N₁\ninst✝ : Group G₁\nφ₁ : G₁ →* MulAut N₁\nf₁ : N →* N₁\nf₂ : G →* G₁\nx y : N ⋊[φ] G\nh :\n  ↑(MonoidHom.comp f₁ (MulEquiv.toMonoidHom (↑φ x.right))) y.left =\n    ↑(MonoidHom.comp (MulEquiv.toMonoidHom (↑φ₁ (↑f₂ x.right))) f₁) y.left\n⊢ (OneHom.toFun\n        { toFun := fun x => { left := ↑f₁ x.left, right := ↑f₂ x.right },\n          map_one' := (_ : { left := ↑f₁ 1, right := ↑f₂ 1 } = 1) }\n        (x * y)).right =\n    (OneHom.toFun\n          { toFun := fun x => { left := ↑f₁ x.left, right := ↑f₂ x.right },\n            map_one' := (_ : { left := ↑f₁ 1, right := ↑f₂ 1 } = 1) }\n          x *\n        OneHom.toFun\n          { toFun := fun x => { left := ↑f₁ x.left, right := ↑f₂ x.right },\n            map_one' := (_ : { left := ↑f₁ 1, right := ↑f₂ 1 } = 1) }\n          y).right\n[PROOFSTEP]\nsimp_all\n[GOAL]\nN : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝⁴ : Group N\ninst✝³ : Group G\ninst✝² : Group H\nφ : G →* MulAut N\nN₁ : Type u_4\nG₁ : Type u_5\ninst✝¹ : Group N₁\ninst✝ : Group G₁\nφ₁ : G₁ →* MulAut N₁\nf₁ : N →* N₁\nf₂ : G →* G₁\nh : ∀ (g : G), MonoidHom.comp f₁ (MulEquiv.toMonoidHom (↑φ g)) = MonoidHom.comp (MulEquiv.toMonoidHom (↑φ₁ (↑f₂ g))) f₁\nn : N\n⊢ ↑(map f₁ f₂ h) (↑inl n) = ↑inl (↑f₁ n)\n[PROOFSTEP]\nsimp [map]\n[GOAL]\nN : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝⁴ : Group N\ninst✝³ : Group G\ninst✝² : Group H\nφ : G →* MulAut N\nN₁ : Type u_4\nG₁ : Type u_5\ninst✝¹ : Group N₁\ninst✝ : Group G₁\nφ₁ : G₁ →* MulAut N₁\nf₁ : N →* N₁\nf₂ : G →* G₁\nh : ∀ (g : G), MonoidHom.comp f₁ (MulEquiv.toMonoidHom (↑φ g)) = MonoidHom.comp (MulEquiv.toMonoidHom (↑φ₁ (↑f₂ g))) f₁\n⊢ MonoidHom.comp (map f₁ f₂ h) inl = MonoidHom.comp inl f₁\n[PROOFSTEP]\next\n[GOAL]\ncase h.left\nN : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝⁴ : Group N\ninst✝³ : Group G\ninst✝² : Group H\nφ : G →* MulAut N\nN₁ : Type u_4\nG₁ : Type u_5\ninst✝¹ : Group N₁\ninst✝ : Group G₁\nφ₁ : G₁ →* MulAut N₁\nf₁ : N →* N₁\nf₂ : G →* G₁\nh : ∀ (g : G), MonoidHom.comp f₁ (MulEquiv.toMonoidHom (↑φ g)) = MonoidHom.comp (MulEquiv.toMonoidHom (↑φ₁ (↑f₂ g))) f₁\nx✝ : N\n⊢ (↑(MonoidHom.comp (map f₁ f₂ h) inl) x✝).left = (↑(MonoidHom.comp inl f₁) x✝).left\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.right\nN : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝⁴ : Group N\ninst✝³ : Group G\ninst✝² : Group H\nφ : G →* MulAut N\nN₁ : Type u_4\nG₁ : Type u_5\ninst✝¹ : Group N₁\ninst✝ : Group G₁\nφ₁ : G₁ →* MulAut N₁\nf₁ : N →* N₁\nf₂ : G →* G₁\nh : ∀ (g : G), MonoidHom.comp f₁ (MulEquiv.toMonoidHom (↑φ g)) = MonoidHom.comp (MulEquiv.toMonoidHom (↑φ₁ (↑f₂ g))) f₁\nx✝ : N\n⊢ (↑(MonoidHom.comp (map f₁ f₂ h) inl) x✝).right = (↑(MonoidHom.comp inl f₁) x✝).right\n[PROOFSTEP]\nsimp\n[GOAL]\nN : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝⁴ : Group N\ninst✝³ : Group G\ninst✝² : Group H\nφ : G →* MulAut N\nN₁ : Type u_4\nG₁ : Type u_5\ninst✝¹ : Group N₁\ninst✝ : Group G₁\nφ₁ : G₁ →* MulAut N₁\nf₁ : N →* N₁\nf₂ : G →* G₁\nh : ∀ (g : G), MonoidHom.comp f₁ (MulEquiv.toMonoidHom (↑φ g)) = MonoidHom.comp (MulEquiv.toMonoidHom (↑φ₁ (↑f₂ g))) f₁\ng : G\n⊢ ↑(map f₁ f₂ h) (↑inr g) = ↑inr (↑f₂ g)\n[PROOFSTEP]\nsimp [map]\n[GOAL]\nN : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝⁴ : Group N\ninst✝³ : Group G\ninst✝² : Group H\nφ : G →* MulAut N\nN₁ : Type u_4\nG₁ : Type u_5\ninst✝¹ : Group N₁\ninst✝ : Group G₁\nφ₁ : G₁ →* MulAut N₁\nf₁ : N →* N₁\nf₂ : G →* G₁\nh : ∀ (g : G), MonoidHom.comp f₁ (MulEquiv.toMonoidHom (↑φ g)) = MonoidHom.comp (MulEquiv.toMonoidHom (↑φ₁ (↑f₂ g))) f₁\n⊢ MonoidHom.comp (map f₁ f₂ h) inr = MonoidHom.comp inr f₂\n[PROOFSTEP]\next\n[GOAL]\ncase h.left\nN : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝⁴ : Group N\ninst✝³ : Group G\ninst✝² : Group H\nφ : G →* MulAut N\nN₁ : Type u_4\nG₁ : Type u_5\ninst✝¹ : Group N₁\ninst✝ : Group G₁\nφ₁ : G₁ →* MulAut N₁\nf₁ : N →* N₁\nf₂ : G →* G₁\nh : ∀ (g : G), MonoidHom.comp f₁ (MulEquiv.toMonoidHom (↑φ g)) = MonoidHom.comp (MulEquiv.toMonoidHom (↑φ₁ (↑f₂ g))) f₁\nx✝ : G\n⊢ (↑(MonoidHom.comp (map f₁ f₂ h) inr) x✝).left = (↑(MonoidHom.comp inr f₂) x✝).left\n[PROOFSTEP]\nsimp [map]\n[GOAL]\ncase h.right\nN : Type u_1\nG : Type u_2\nH : Type u_3\ninst✝⁴ : Group N\ninst✝³ : Group G\ninst✝² : Group H\nφ : G →* MulAut N\nN₁ : Type u_4\nG₁ : Type u_5\ninst✝¹ : Group N₁\ninst✝ : Group G₁\nφ₁ : G₁ →* MulAut N₁\nf₁ : N →* N₁\nf₂ : G →* G₁\nh : ∀ (g : G), MonoidHom.comp f₁ (MulEquiv.toMonoidHom (↑φ g)) = MonoidHom.comp (MulEquiv.toMonoidHom (↑φ₁ (↑f₂ g))) f₁\nx✝ : G\n⊢ (↑(MonoidHom.comp (map f₁ f₂ h) inr) x✝).right = (↑(MonoidHom.comp inr f₂) x✝).right\n[PROOFSTEP]\nsimp [map]\n", "meta": {"mathlib_filename": "Mathlib.GroupTheory.SemidirectProduct", "llama_tokens": 14341, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8006920020959545, "lm_q2_score": 0.6548947223065755, "lm_q1q2_score": 0.524368966365726}}
{"text": "[GOAL]\nR : Type u_1\ninst✝ : Semiring R\nk m n : ℕ\nu v w : R\nhkm : k < m\nhmn : m < n\n⊢ coeff (trinomial k m n u v w) n = w\n[PROOFSTEP]\nrw [trinomial_def, coeff_add, coeff_add, coeff_C_mul_X_pow, coeff_C_mul_X_pow, coeff_C_mul_X_pow,\n  if_neg (hkm.trans hmn).ne', if_neg hmn.ne', if_pos rfl, zero_add, zero_add]\n[GOAL]\nR : Type u_1\ninst✝ : Semiring R\nk m n : ℕ\nu v w : R\nhkm : k < m\nhmn : m < n\n⊢ coeff (trinomial k m n u v w) m = v\n[PROOFSTEP]\nrw [trinomial_def, coeff_add, coeff_add, coeff_C_mul_X_pow, coeff_C_mul_X_pow, coeff_C_mul_X_pow, if_neg hkm.ne',\n  if_pos rfl, if_neg hmn.ne, zero_add, add_zero]\n[GOAL]\nR : Type u_1\ninst✝ : Semiring R\nk m n : ℕ\nu v w : R\nhkm : k < m\nhmn : m < n\n⊢ coeff (trinomial k m n u v w) k = u\n[PROOFSTEP]\nrw [trinomial_def, coeff_add, coeff_add, coeff_C_mul_X_pow, coeff_C_mul_X_pow, coeff_C_mul_X_pow, if_pos rfl,\n  if_neg hkm.ne, if_neg (hkm.trans hmn).ne, add_zero, add_zero]\n[GOAL]\nR : Type u_1\ninst✝ : Semiring R\nk m n : ℕ\nu v w : R\nhkm : k < m\nhmn : m < n\nhw : w ≠ 0\n⊢ natDegree (trinomial k m n u v w) = n\n[PROOFSTEP]\nrefine'\n  natDegree_eq_of_degree_eq_some\n    ((Finset.sup_le fun i h => _).antisymm <| le_degree_of_ne_zero <| by rwa [trinomial_leading_coeff' hkm hmn])\n[GOAL]\nR : Type u_1\ninst✝ : Semiring R\nk m n : ℕ\nu v w : R\nhkm : k < m\nhmn : m < n\nhw : w ≠ 0\n⊢ coeff (trinomial k m n u v w) n ≠ 0\n[PROOFSTEP]\nrwa [trinomial_leading_coeff' hkm hmn]\n[GOAL]\nR : Type u_1\ninst✝ : Semiring R\nk m n : ℕ\nu v w : R\nhkm : k < m\nhmn : m < n\nhw : w ≠ 0\ni : ℕ\nh : i ∈ support (trinomial k m n u v w)\n⊢ ↑i ≤ ↑n\n[PROOFSTEP]\nreplace h := support_trinomial' k m n u v w h\n[GOAL]\nR : Type u_1\ninst✝ : Semiring R\nk m n : ℕ\nu v w : R\nhkm : k < m\nhmn : m < n\nhw : w ≠ 0\ni : ℕ\nh : i ∈ {k, m, n}\n⊢ ↑i ≤ ↑n\n[PROOFSTEP]\nrw [mem_insert, mem_insert, mem_singleton] at h \n[GOAL]\nR : Type u_1\ninst✝ : Semiring R\nk m n : ℕ\nu v w : R\nhkm : k < m\nhmn : m < n\nhw : w ≠ 0\ni : ℕ\nh : i = k ∨ i = m ∨ i = n\n⊢ ↑i ≤ ↑n\n[PROOFSTEP]\nrcases h with (rfl | rfl | rfl)\n[GOAL]\ncase inl\nR : Type u_1\ninst✝ : Semiring R\nm n : ℕ\nu v w : R\nhmn : m < n\nhw : w ≠ 0\ni : ℕ\nhkm : i < m\n⊢ ↑i ≤ ↑n\n[PROOFSTEP]\nexact WithBot.coe_le_coe.mpr (hkm.trans hmn).le\n[GOAL]\ncase inr.inl\nR : Type u_1\ninst✝ : Semiring R\nk n : ℕ\nu v w : R\nhw : w ≠ 0\ni : ℕ\nhkm : k < i\nhmn : i < n\n⊢ ↑i ≤ ↑n\n[PROOFSTEP]\nexact WithBot.coe_le_coe.mpr hmn.le\n[GOAL]\ncase inr.inr\nR : Type u_1\ninst✝ : Semiring R\nk m : ℕ\nu v w : R\nhkm : k < m\nhw : w ≠ 0\ni : ℕ\nhmn : m < i\n⊢ ↑i ≤ ↑i\n[PROOFSTEP]\nexact le_rfl\n[GOAL]\nR : Type u_1\ninst✝ : Semiring R\nk m n : ℕ\nu v w : R\nhkm : k < m\nhmn : m < n\nhu : u ≠ 0\n⊢ natTrailingDegree (trinomial k m n u v w) = k\n[PROOFSTEP]\nrefine'\n  natTrailingDegree_eq_of_trailingDegree_eq_some\n    ((Finset.le_inf fun i h => _).antisymm <|\n        le_trailingDegree_of_ne_zero <| by rwa [trinomial_trailing_coeff' hkm hmn]).symm\n[GOAL]\nR : Type u_1\ninst✝ : Semiring R\nk m n : ℕ\nu v w : R\nhkm : k < m\nhmn : m < n\nhu : u ≠ 0\n⊢ coeff (trinomial k m n u v w) k ≠ 0\n[PROOFSTEP]\nrwa [trinomial_trailing_coeff' hkm hmn]\n[GOAL]\nR : Type u_1\ninst✝ : Semiring R\nk m n : ℕ\nu v w : R\nhkm : k < m\nhmn : m < n\nhu : u ≠ 0\ni : ℕ\nh : i ∈ support (trinomial k m n u v w)\n⊢ ↑k ≤ ↑i\n[PROOFSTEP]\nreplace h := support_trinomial' k m n u v w h\n[GOAL]\nR : Type u_1\ninst✝ : Semiring R\nk m n : ℕ\nu v w : R\nhkm : k < m\nhmn : m < n\nhu : u ≠ 0\ni : ℕ\nh : i ∈ {k, m, n}\n⊢ ↑k ≤ ↑i\n[PROOFSTEP]\nrw [mem_insert, mem_insert, mem_singleton] at h \n[GOAL]\nR : Type u_1\ninst✝ : Semiring R\nk m n : ℕ\nu v w : R\nhkm : k < m\nhmn : m < n\nhu : u ≠ 0\ni : ℕ\nh : i = k ∨ i = m ∨ i = n\n⊢ ↑k ≤ ↑i\n[PROOFSTEP]\nrcases h with (rfl | rfl | rfl)\n[GOAL]\ncase inl\nR : Type u_1\ninst✝ : Semiring R\nm n : ℕ\nu v w : R\nhmn : m < n\nhu : u ≠ 0\ni : ℕ\nhkm : i < m\n⊢ ↑i ≤ ↑i\n[PROOFSTEP]\nexact le_rfl\n[GOAL]\ncase inr.inl\nR : Type u_1\ninst✝ : Semiring R\nk n : ℕ\nu v w : R\nhu : u ≠ 0\ni : ℕ\nhkm : k < i\nhmn : i < n\n⊢ ↑k ≤ ↑i\n[PROOFSTEP]\nexact WithTop.coe_le_coe.mpr hkm.le\n[GOAL]\ncase inr.inr\nR : Type u_1\ninst✝ : Semiring R\nk m : ℕ\nu v w : R\nhkm : k < m\nhu : u ≠ 0\ni : ℕ\nhmn : m < i\n⊢ ↑k ≤ ↑i\n[PROOFSTEP]\nexact WithTop.coe_le_coe.mpr (hkm.trans hmn).le\n[GOAL]\nR : Type u_1\ninst✝ : Semiring R\nk m n : ℕ\nu v w : R\nhkm : k < m\nhmn : m < n\nhw : w ≠ 0\n⊢ leadingCoeff (trinomial k m n u v w) = w\n[PROOFSTEP]\nrw [leadingCoeff, trinomial_natDegree hkm hmn hw, trinomial_leading_coeff' hkm hmn]\n[GOAL]\nR : Type u_1\ninst✝ : Semiring R\nk m n : ℕ\nu v w : R\nhkm : k < m\nhmn : m < n\nhu : u ≠ 0\n⊢ trailingCoeff (trinomial k m n u v w) = u\n[PROOFSTEP]\nrw [trailingCoeff, trinomial_natTrailingDegree hkm hmn hu, trinomial_trailing_coeff' hkm hmn]\n[GOAL]\nR : Type u_1\ninst✝ : Semiring R\nk m n : ℕ\nu v w : R\nhkm : k < m\nhmn : m < n\n⊢ Monic (trinomial k m n u v 1)\n[PROOFSTEP]\nnontriviality R\n[GOAL]\nR : Type u_1\ninst✝ : Semiring R\nk m n : ℕ\nu v w : R\nhkm : k < m\nhmn : m < n\n✝ : Nontrivial R\n⊢ Monic (trinomial k m n u v 1)\n[PROOFSTEP]\nexact trinomial_leadingCoeff hkm hmn one_ne_zero\n[GOAL]\nR : Type u_1\ninst✝ : Semiring R\nk m n : ℕ\nu v w : R\nhkm : k < m\nhmn : m < n\nhu : u ≠ 0\nhw : w ≠ 0\n⊢ mirror (trinomial k m n u v w) = trinomial k (n - m + k) n w v u\n[PROOFSTEP]\nrw [mirror, trinomial_natTrailingDegree hkm hmn hu, reverse, trinomial_natDegree hkm hmn hw, trinomial_def, reflect_add,\n  reflect_add, reflect_C_mul_X_pow, reflect_C_mul_X_pow, reflect_C_mul_X_pow, revAt_le (hkm.trans hmn).le,\n  revAt_le hmn.le, revAt_le le_rfl, add_mul, add_mul, mul_assoc, mul_assoc, mul_assoc, ← pow_add, ← pow_add, ← pow_add,\n  Nat.sub_add_cancel (hkm.trans hmn).le, Nat.sub_self, zero_add, add_comm, add_comm (C u * X ^ n), ← add_assoc, ←\n  trinomial_def]\n[GOAL]\np q : ℤ[X]\nhp : IsUnitTrinomial p\n⊢ ¬IsUnit p\n[PROOFSTEP]\nobtain ⟨k, m, n, hkm, hmn, u, v, w, rfl⟩ := hp\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nq : ℤ[X]\nk m n : ℕ\nhkm : k < m\nhmn : m < n\nu v w : ℤˣ\n⊢ ¬IsUnit (trinomial k m n ↑u ↑v ↑w)\n[PROOFSTEP]\nexact fun h =>\n  ne_zero_of_lt hmn\n    ((trinomial_natDegree hkm hmn w.ne_zero).symm.trans (natDegree_eq_of_degree_eq_some (degree_eq_zero_of_isUnit h)))\n[GOAL]\np q : ℤ[X]\nhp : IsUnitTrinomial p\n⊢ card (support p) = 3\n[PROOFSTEP]\nobtain ⟨k, m, n, hkm, hmn, u, v, w, rfl⟩ := hp\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nq : ℤ[X]\nk m n : ℕ\nhkm : k < m\nhmn : m < n\nu v w : ℤˣ\n⊢ card (support (trinomial k m n ↑u ↑v ↑w)) = 3\n[PROOFSTEP]\nexact card_support_trinomial hkm hmn u.ne_zero v.ne_zero w.ne_zero\n[GOAL]\np q : ℤ[X]\nhp : IsUnitTrinomial p\n⊢ p ≠ 0\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nq : ℤ[X]\nhp : IsUnitTrinomial 0\n⊢ False\n[PROOFSTEP]\nexact Nat.zero_ne_bit1 1 hp.card_support_eq_three\n[GOAL]\np q : ℤ[X]\nhp : IsUnitTrinomial p\nk : ℕ\nhk : k ∈ support p\n⊢ IsUnit (coeff p k)\n[PROOFSTEP]\nobtain ⟨k, m, n, hkm, hmn, u, v, w, rfl⟩ := hp\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nq : ℤ[X]\nk✝ k m n : ℕ\nhkm : k < m\nhmn : m < n\nu v w : ℤˣ\nhk : k✝ ∈ support (trinomial k m n ↑u ↑v ↑w)\n⊢ IsUnit (coeff (trinomial k m n ↑u ↑v ↑w) k✝)\n[PROOFSTEP]\nhave := support_trinomial' k m n (u : ℤ) v w hk\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nq : ℤ[X]\nk✝ k m n : ℕ\nhkm : k < m\nhmn : m < n\nu v w : ℤˣ\nhk : k✝ ∈ support (trinomial k m n ↑u ↑v ↑w)\nthis : k✝ ∈ {k, m, n}\n⊢ IsUnit (coeff (trinomial k m n ↑u ↑v ↑w) k✝)\n[PROOFSTEP]\nrw [mem_insert, mem_insert, mem_singleton] at this \n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nq : ℤ[X]\nk✝ k m n : ℕ\nhkm : k < m\nhmn : m < n\nu v w : ℤˣ\nhk : k✝ ∈ support (trinomial k m n ↑u ↑v ↑w)\nthis : k✝ = k ∨ k✝ = m ∨ k✝ = n\n⊢ IsUnit (coeff (trinomial k m n ↑u ↑v ↑w) k✝)\n[PROOFSTEP]\nrcases this with (rfl | rfl | rfl)\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.inl\nq : ℤ[X]\nk m n : ℕ\nhmn : m < n\nu v w : ℤˣ\nhkm : k < m\nhk : k ∈ support (trinomial k m n ↑u ↑v ↑w)\n⊢ IsUnit (coeff (trinomial k m n ↑u ↑v ↑w) k)\n[PROOFSTEP]\nrefine' ⟨u, by rw [trinomial_trailing_coeff' hkm hmn]⟩\n[GOAL]\nq : ℤ[X]\nk m n : ℕ\nhmn : m < n\nu v w : ℤˣ\nhkm : k < m\nhk : k ∈ support (trinomial k m n ↑u ↑v ↑w)\n⊢ ↑u = coeff (trinomial k m n ↑u ↑v ↑w) k\n[PROOFSTEP]\nrw [trinomial_trailing_coeff' hkm hmn]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.inr.inl\nq : ℤ[X]\nk✝ k n : ℕ\nu v w : ℤˣ\nhkm : k < k✝\nhmn : k✝ < n\nhk : k✝ ∈ support (trinomial k k✝ n ↑u ↑v ↑w)\n⊢ IsUnit (coeff (trinomial k k✝ n ↑u ↑v ↑w) k✝)\n[PROOFSTEP]\nrefine' ⟨v, by rw [trinomial_middle_coeff hkm hmn]⟩\n[GOAL]\nq : ℤ[X]\nk✝ k n : ℕ\nu v w : ℤˣ\nhkm : k < k✝\nhmn : k✝ < n\nhk : k✝ ∈ support (trinomial k k✝ n ↑u ↑v ↑w)\n⊢ ↑v = coeff (trinomial k k✝ n ↑u ↑v ↑w) k✝\n[PROOFSTEP]\nrw [trinomial_middle_coeff hkm hmn]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.inr.inr\nq : ℤ[X]\nk✝ k m : ℕ\nhkm : k < m\nu v w : ℤˣ\nhmn : m < k✝\nhk : k✝ ∈ support (trinomial k m k✝ ↑u ↑v ↑w)\n⊢ IsUnit (coeff (trinomial k m k✝ ↑u ↑v ↑w) k✝)\n[PROOFSTEP]\nrefine' ⟨w, by rw [trinomial_leading_coeff' hkm hmn]⟩\n[GOAL]\nq : ℤ[X]\nk✝ k m : ℕ\nhkm : k < m\nu v w : ℤˣ\nhmn : m < k✝\nhk : k✝ ∈ support (trinomial k m k✝ ↑u ↑v ↑w)\n⊢ ↑w = coeff (trinomial k m k✝ ↑u ↑v ↑w) k✝\n[PROOFSTEP]\nrw [trinomial_leading_coeff' hkm hmn]\n[GOAL]\np q : ℤ[X]\n⊢ IsUnitTrinomial p ↔ card (support p) = 3 ∧ ∀ (k : ℕ), k ∈ support p → IsUnit (coeff p k)\n[PROOFSTEP]\nrefine' ⟨fun hp => ⟨hp.card_support_eq_three, fun k => hp.coeff_isUnit⟩, fun hp => _⟩\n[GOAL]\np q : ℤ[X]\nhp : card (support p) = 3 ∧ ∀ (k : ℕ), k ∈ support p → IsUnit (coeff p k)\n⊢ IsUnitTrinomial p\n[PROOFSTEP]\nobtain ⟨k, m, n, hkm, hmn, x, y, z, hx, hy, hz, rfl⟩ := card_support_eq_three.mp hp.1\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nq : ℤ[X]\nk m n : ℕ\nhkm : k < m\nhmn : m < n\nx y z : ℤ\nhx : x ≠ 0\nhy : y ≠ 0\nhz : z ≠ 0\nhp :\n  card (support (↑C x * X ^ k + ↑C y * X ^ m + ↑C z * X ^ n)) = 3 ∧\n    ∀ (k_1 : ℕ),\n      k_1 ∈ support (↑C x * X ^ k + ↑C y * X ^ m + ↑C z * X ^ n) →\n        IsUnit (coeff (↑C x * X ^ k + ↑C y * X ^ m + ↑C z * X ^ n) k_1)\n⊢ IsUnitTrinomial (↑C x * X ^ k + ↑C y * X ^ m + ↑C z * X ^ n)\n[PROOFSTEP]\nrw [support_trinomial hkm hmn hx hy hz] at hp \n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nq : ℤ[X]\nk m n : ℕ\nhkm : k < m\nhmn : m < n\nx y z : ℤ\nhx : x ≠ 0\nhy : y ≠ 0\nhz : z ≠ 0\nhp : card {k, m, n} = 3 ∧ ∀ (k_1 : ℕ), k_1 ∈ {k, m, n} → IsUnit (coeff (↑C x * X ^ k + ↑C y * X ^ m + ↑C z * X ^ n) k_1)\n⊢ IsUnitTrinomial (↑C x * X ^ k + ↑C y * X ^ m + ↑C z * X ^ n)\n[PROOFSTEP]\nreplace hx := hp.2 k (mem_insert_self k { m, n })\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nq : ℤ[X]\nk m n : ℕ\nhkm : k < m\nhmn : m < n\nx y z : ℤ\nhy : y ≠ 0\nhz : z ≠ 0\nhp : card {k, m, n} = 3 ∧ ∀ (k_1 : ℕ), k_1 ∈ {k, m, n} → IsUnit (coeff (↑C x * X ^ k + ↑C y * X ^ m + ↑C z * X ^ n) k_1)\nhx : IsUnit (coeff (↑C x * X ^ k + ↑C y * X ^ m + ↑C z * X ^ n) k)\n⊢ IsUnitTrinomial (↑C x * X ^ k + ↑C y * X ^ m + ↑C z * X ^ n)\n[PROOFSTEP]\nreplace hy := hp.2 m (mem_insert_of_mem (mem_insert_self m { n }))\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nq : ℤ[X]\nk m n : ℕ\nhkm : k < m\nhmn : m < n\nx y z : ℤ\nhz : z ≠ 0\nhp : card {k, m, n} = 3 ∧ ∀ (k_1 : ℕ), k_1 ∈ {k, m, n} → IsUnit (coeff (↑C x * X ^ k + ↑C y * X ^ m + ↑C z * X ^ n) k_1)\nhx : IsUnit (coeff (↑C x * X ^ k + ↑C y * X ^ m + ↑C z * X ^ n) k)\nhy : IsUnit (coeff (↑C x * X ^ k + ↑C y * X ^ m + ↑C z * X ^ n) m)\n⊢ IsUnitTrinomial (↑C x * X ^ k + ↑C y * X ^ m + ↑C z * X ^ n)\n[PROOFSTEP]\nreplace hz := hp.2 n (mem_insert_of_mem (mem_insert_of_mem (mem_singleton_self n)))\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nq : ℤ[X]\nk m n : ℕ\nhkm : k < m\nhmn : m < n\nx y z : ℤ\nhp : card {k, m, n} = 3 ∧ ∀ (k_1 : ℕ), k_1 ∈ {k, m, n} → IsUnit (coeff (↑C x * X ^ k + ↑C y * X ^ m + ↑C z * X ^ n) k_1)\nhx : IsUnit (coeff (↑C x * X ^ k + ↑C y * X ^ m + ↑C z * X ^ n) k)\nhy : IsUnit (coeff (↑C x * X ^ k + ↑C y * X ^ m + ↑C z * X ^ n) m)\nhz : IsUnit (coeff (↑C x * X ^ k + ↑C y * X ^ m + ↑C z * X ^ n) n)\n⊢ IsUnitTrinomial (↑C x * X ^ k + ↑C y * X ^ m + ↑C z * X ^ n)\n[PROOFSTEP]\nsimp_rw [coeff_add, coeff_C_mul, coeff_X_pow_self, mul_one, coeff_X_pow] at hx hy hz \n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nq : ℤ[X]\nk m n : ℕ\nhkm : k < m\nhmn : m < n\nx y z : ℤ\nhp : card {k, m, n} = 3 ∧ ∀ (k_1 : ℕ), k_1 ∈ {k, m, n} → IsUnit (coeff (↑C x * X ^ k + ↑C y * X ^ m + ↑C z * X ^ n) k_1)\nhx : IsUnit ((x + y * if k = m then 1 else 0) + z * if k = n then 1 else 0)\nhy : IsUnit ((x * if m = k then 1 else 0) + y + z * if m = n then 1 else 0)\nhz : IsUnit (((x * if n = k then 1 else 0) + y * if n = m then 1 else 0) + z)\n⊢ IsUnitTrinomial (↑C x * X ^ k + ↑C y * X ^ m + ↑C z * X ^ n)\n[PROOFSTEP]\nrw [if_neg hkm.ne, if_neg (hkm.trans hmn).ne] at hx \n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nq : ℤ[X]\nk m n : ℕ\nhkm : k < m\nhmn : m < n\nx y z : ℤ\nhp : card {k, m, n} = 3 ∧ ∀ (k_1 : ℕ), k_1 ∈ {k, m, n} → IsUnit (coeff (↑C x * X ^ k + ↑C y * X ^ m + ↑C z * X ^ n) k_1)\nhx : IsUnit (x + y * 0 + z * 0)\nhy : IsUnit ((x * if m = k then 1 else 0) + y + z * if m = n then 1 else 0)\nhz : IsUnit (((x * if n = k then 1 else 0) + y * if n = m then 1 else 0) + z)\n⊢ IsUnitTrinomial (↑C x * X ^ k + ↑C y * X ^ m + ↑C z * X ^ n)\n[PROOFSTEP]\nrw [if_neg hkm.ne', if_neg hmn.ne] at hy \n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nq : ℤ[X]\nk m n : ℕ\nhkm : k < m\nhmn : m < n\nx y z : ℤ\nhp : card {k, m, n} = 3 ∧ ∀ (k_1 : ℕ), k_1 ∈ {k, m, n} → IsUnit (coeff (↑C x * X ^ k + ↑C y * X ^ m + ↑C z * X ^ n) k_1)\nhx : IsUnit (x + y * 0 + z * 0)\nhy : IsUnit (x * 0 + y + z * 0)\nhz : IsUnit (((x * if n = k then 1 else 0) + y * if n = m then 1 else 0) + z)\n⊢ IsUnitTrinomial (↑C x * X ^ k + ↑C y * X ^ m + ↑C z * X ^ n)\n[PROOFSTEP]\nrw [if_neg (hkm.trans hmn).ne', if_neg hmn.ne'] at hz \n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nq : ℤ[X]\nk m n : ℕ\nhkm : k < m\nhmn : m < n\nx y z : ℤ\nhp : card {k, m, n} = 3 ∧ ∀ (k_1 : ℕ), k_1 ∈ {k, m, n} → IsUnit (coeff (↑C x * X ^ k + ↑C y * X ^ m + ↑C z * X ^ n) k_1)\nhx : IsUnit (x + y * 0 + z * 0)\nhy : IsUnit (x * 0 + y + z * 0)\nhz : IsUnit (x * 0 + y * 0 + z)\n⊢ IsUnitTrinomial (↑C x * X ^ k + ↑C y * X ^ m + ↑C z * X ^ n)\n[PROOFSTEP]\nsimp_rw [mul_zero, zero_add, add_zero] at hx hy hz \n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nq : ℤ[X]\nk m n : ℕ\nhkm : k < m\nhmn : m < n\nx y z : ℤ\nhp : card {k, m, n} = 3 ∧ ∀ (k_1 : ℕ), k_1 ∈ {k, m, n} → IsUnit (coeff (↑C x * X ^ k + ↑C y * X ^ m + ↑C z * X ^ n) k_1)\nhz : IsUnit z\nhx : IsUnit x\nhy : IsUnit y\n⊢ IsUnitTrinomial (↑C x * X ^ k + ↑C y * X ^ m + ↑C z * X ^ n)\n[PROOFSTEP]\nexact ⟨k, m, n, hkm, hmn, hx.unit, hy.unit, hz.unit, rfl⟩\n[GOAL]\np q : ℤ[X]\n⊢ IsUnitTrinomial p ↔ coeff (p * mirror p) ((natDegree (p * mirror p) + natTrailingDegree (p * mirror p)) / 2) = 3\n[PROOFSTEP]\nrw [natDegree_mul_mirror, natTrailingDegree_mul_mirror, ← mul_add, Nat.mul_div_right _ zero_lt_two, coeff_mul_mirror]\n[GOAL]\np q : ℤ[X]\n⊢ IsUnitTrinomial p ↔ (sum p fun n x => x ^ 2) = 3\n[PROOFSTEP]\nrefine' ⟨_, fun hp => _⟩\n[GOAL]\ncase refine'_1\np q : ℤ[X]\n⊢ IsUnitTrinomial p → (sum p fun n x => x ^ 2) = 3\n[PROOFSTEP]\nrintro ⟨k, m, n, hkm, hmn, u, v, w, rfl⟩\n[GOAL]\ncase refine'_1.intro.intro.intro.intro.intro.intro.intro.intro\nq : ℤ[X]\nk m n : ℕ\nhkm : k < m\nhmn : m < n\nu v w : ℤˣ\n⊢ (sum (trinomial k m n ↑u ↑v ↑w) fun n x => x ^ 2) = 3\n[PROOFSTEP]\nrw [sum_def, trinomial_support hkm hmn u.ne_zero v.ne_zero w.ne_zero,\n  sum_insert (mt mem_insert.mp (not_or_of_not hkm.ne (mt mem_singleton.mp (hkm.trans hmn).ne))),\n  sum_insert (mt mem_singleton.mp hmn.ne), sum_singleton, trinomial_leading_coeff' hkm hmn,\n  trinomial_middle_coeff hkm hmn, trinomial_trailing_coeff' hkm hmn]\n[GOAL]\ncase refine'_1.intro.intro.intro.intro.intro.intro.intro.intro\nq : ℤ[X]\nk m n : ℕ\nhkm : k < m\nhmn : m < n\nu v w : ℤˣ\n⊢ ↑u ^ 2 + (↑v ^ 2 + ↑w ^ 2) = 3\n[PROOFSTEP]\nsimp_rw [← Units.val_pow_eq_pow_val, Int.units_sq]\n[GOAL]\ncase refine'_2\np q : ℤ[X]\nhp : (sum p fun n x => x ^ 2) = 3\n⊢ IsUnitTrinomial p\n[PROOFSTEP]\nhave key : ∀ k ∈ p.support, p.coeff k ^ 2 = 1 := fun k hk =>\n  Int.sq_eq_one_of_sq_le_three ((single_le_sum (fun k _ => sq_nonneg (p.coeff k)) hk).trans hp.le)\n    (mem_support_iff.mp hk)\n[GOAL]\ncase refine'_2\np q : ℤ[X]\nhp : (sum p fun n x => x ^ 2) = 3\nkey : ∀ (k : ℕ), k ∈ support p → coeff p k ^ 2 = 1\n⊢ IsUnitTrinomial p\n[PROOFSTEP]\nrefine' isUnitTrinomial_iff.mpr ⟨_, fun k hk => isUnit_ofPowEqOne (key k hk) two_ne_zero⟩\n[GOAL]\ncase refine'_2\np q : ℤ[X]\nhp : (sum p fun n x => x ^ 2) = 3\nkey : ∀ (k : ℕ), k ∈ support p → coeff p k ^ 2 = 1\n⊢ card (support p) = 3\n[PROOFSTEP]\nrw [sum_def, sum_congr rfl key, sum_const, Nat.smul_one_eq_coe] at hp \n[GOAL]\ncase refine'_2\np q : ℤ[X]\nhp : ↑(card (support p)) = 3\nkey : ∀ (k : ℕ), k ∈ support p → coeff p k ^ 2 = 1\n⊢ card (support p) = 3\n[PROOFSTEP]\nexact Nat.cast_injective hp\n[GOAL]\np q : ℤ[X]\nh : p * mirror p = q * mirror q\n⊢ IsUnitTrinomial p ↔ IsUnitTrinomial q\n[PROOFSTEP]\nrw [isUnitTrinomial_iff', isUnitTrinomial_iff', h]\n[GOAL]\np q : ℤ[X]\nk m n : ℕ\nhkm : k < m\nhmn : m < n\nu v w : ℤˣ\nhp : p = trinomial k m n ↑u ↑v ↑w\n⊢ ↑C ↑v * (↑C ↑u * X ^ (m + n) + ↑C ↑w * X ^ (n - m + k + n)) =\n    { toFinsupp := Finsupp.filter (Set.Ioo (k + n) (n + n)) (p * mirror p).toFinsupp }\n[PROOFSTEP]\nhave key : n - m + k < n := by rwa [← lt_tsub_iff_right, tsub_lt_tsub_iff_left_of_le hmn.le]\n[GOAL]\np q : ℤ[X]\nk m n : ℕ\nhkm : k < m\nhmn : m < n\nu v w : ℤˣ\nhp : p = trinomial k m n ↑u ↑v ↑w\n⊢ n - m + k < n\n[PROOFSTEP]\nrwa [← lt_tsub_iff_right, tsub_lt_tsub_iff_left_of_le hmn.le]\n[GOAL]\np q : ℤ[X]\nk m n : ℕ\nhkm : k < m\nhmn : m < n\nu v w : ℤˣ\nhp : p = trinomial k m n ↑u ↑v ↑w\nkey : n - m + k < n\n⊢ ↑C ↑v * (↑C ↑u * X ^ (m + n) + ↑C ↑w * X ^ (n - m + k + n)) =\n    { toFinsupp := Finsupp.filter (Set.Ioo (k + n) (n + n)) (p * mirror p).toFinsupp }\n[PROOFSTEP]\nrw [hp, trinomial_mirror hkm hmn u.ne_zero w.ne_zero]\n[GOAL]\np q : ℤ[X]\nk m n : ℕ\nhkm : k < m\nhmn : m < n\nu v w : ℤˣ\nhp : p = trinomial k m n ↑u ↑v ↑w\nkey : n - m + k < n\n⊢ ↑C ↑v * (↑C ↑u * X ^ (m + n) + ↑C ↑w * X ^ (n - m + k + n)) =\n    {\n      toFinsupp :=\n        Finsupp.filter (Set.Ioo (k + n) (n + n))\n          (trinomial k m n ↑u ↑v ↑w * trinomial k (n - m + k) n ↑w ↑v ↑u).toFinsupp }\n[PROOFSTEP]\nsimp_rw [trinomial_def, C_mul_X_pow_eq_monomial, add_mul, mul_add, monomial_mul_monomial, toFinsupp_add,\n  toFinsupp_monomial]\n  -- Porting note: added next line (less powerful `simp`).\n[GOAL]\np q : ℤ[X]\nk m n : ℕ\nhkm : k < m\nhmn : m < n\nu v w : ℤˣ\nhp : p = trinomial k m n ↑u ↑v ↑w\nkey : n - m + k < n\n⊢ ↑C ↑v * ↑(monomial (m + n)) ↑u + ↑C ↑v * ↑(monomial (n - m + k + n)) ↑w =\n    {\n      toFinsupp :=\n        Finsupp.filter (Set.Ioo (k + n) (n + n))\n          (Finsupp.single (k + k) (↑u * ↑w) + Finsupp.single (k + (n - m + k)) (↑u * ↑v) +\n                Finsupp.single (k + n) (↑u * ↑u) +\n              (Finsupp.single (m + k) (↑v * ↑w) + Finsupp.single (m + (n - m + k)) (↑v * ↑v) +\n                Finsupp.single (m + n) (↑v * ↑u)) +\n            (Finsupp.single (n + k) (↑w * ↑w) + Finsupp.single (n + (n - m + k)) (↑w * ↑v) +\n              Finsupp.single (n + n) (↑w * ↑u))) }\n[PROOFSTEP]\nrw [Finsupp.filter_add, Finsupp.filter_add, Finsupp.filter_add, Finsupp.filter_add, Finsupp.filter_add,\n  Finsupp.filter_add, Finsupp.filter_add, Finsupp.filter_add]\n[GOAL]\np q : ℤ[X]\nk m n : ℕ\nhkm : k < m\nhmn : m < n\nu v w : ℤˣ\nhp : p = trinomial k m n ↑u ↑v ↑w\nkey : n - m + k < n\n⊢ ↑C ↑v * ↑(monomial (m + n)) ↑u + ↑C ↑v * ↑(monomial (n - m + k + n)) ↑w =\n    {\n      toFinsupp :=\n        Finsupp.filter (Set.Ioo (k + n) (n + n)) (Finsupp.single (k + k) (↑u * ↑w)) +\n                Finsupp.filter (Set.Ioo (k + n) (n + n)) (Finsupp.single (k + (n - m + k)) (↑u * ↑v)) +\n              Finsupp.filter (Set.Ioo (k + n) (n + n)) (Finsupp.single (k + n) (↑u * ↑u)) +\n            (Finsupp.filter (Set.Ioo (k + n) (n + n)) (Finsupp.single (m + k) (↑v * ↑w)) +\n                Finsupp.filter (Set.Ioo (k + n) (n + n)) (Finsupp.single (m + (n - m + k)) (↑v * ↑v)) +\n              Finsupp.filter (Set.Ioo (k + n) (n + n)) (Finsupp.single (m + n) (↑v * ↑u))) +\n          (Finsupp.filter (Set.Ioo (k + n) (n + n)) (Finsupp.single (n + k) (↑w * ↑w)) +\n              Finsupp.filter (Set.Ioo (k + n) (n + n)) (Finsupp.single (n + (n - m + k)) (↑w * ↑v)) +\n            Finsupp.filter (Set.Ioo (k + n) (n + n)) (Finsupp.single (n + n) (↑w * ↑u))) }\n[PROOFSTEP]\nrw [Finsupp.filter_single_of_neg, Finsupp.filter_single_of_neg, Finsupp.filter_single_of_neg,\n  Finsupp.filter_single_of_neg, Finsupp.filter_single_of_neg, Finsupp.filter_single_of_pos,\n  Finsupp.filter_single_of_neg, Finsupp.filter_single_of_pos, Finsupp.filter_single_of_neg]\n[GOAL]\np q : ℤ[X]\nk m n : ℕ\nhkm : k < m\nhmn : m < n\nu v w : ℤˣ\nhp : p = trinomial k m n ↑u ↑v ↑w\nkey : n - m + k < n\n⊢ ↑C ↑v * ↑(monomial (m + n)) ↑u + ↑C ↑v * ↑(monomial (n - m + k + n)) ↑w =\n    {\n      toFinsupp :=\n        0 + 0 + 0 + (0 + 0 + Finsupp.single (m + n) (↑v * ↑u)) + (0 + Finsupp.single (n + (n - m + k)) (↑w * ↑v) + 0) }\n[PROOFSTEP]\nsimp only [add_zero, zero_add, ofFinsupp_add, ofFinsupp_single]\n  -- Porting note: added next two lines (less powerful `simp`).\n[GOAL]\np q : ℤ[X]\nk m n : ℕ\nhkm : k < m\nhmn : m < n\nu v w : ℤˣ\nhp : p = trinomial k m n ↑u ↑v ↑w\nkey : n - m + k < n\n⊢ ↑C ↑v * ↑(monomial (m + n)) ↑u + ↑C ↑v * ↑(monomial (n - m + k + n)) ↑w =\n    { toFinsupp := Finsupp.single (m + n) (↑v * ↑u) + Finsupp.single (n + (n - m + k)) (↑w * ↑v) }\n[PROOFSTEP]\nrw [ofFinsupp_add]\n[GOAL]\np q : ℤ[X]\nk m n : ℕ\nhkm : k < m\nhmn : m < n\nu v w : ℤˣ\nhp : p = trinomial k m n ↑u ↑v ↑w\nkey : n - m + k < n\n⊢ ↑C ↑v * ↑(monomial (m + n)) ↑u + ↑C ↑v * ↑(monomial (n - m + k + n)) ↑w =\n    { toFinsupp := Finsupp.single (m + n) (↑v * ↑u) } + { toFinsupp := Finsupp.single (n + (n - m + k)) (↑w * ↑v) }\n[PROOFSTEP]\nsimp only [ofFinsupp_single]\n[GOAL]\np q : ℤ[X]\nk m n : ℕ\nhkm : k < m\nhmn : m < n\nu v w : ℤˣ\nhp : p = trinomial k m n ↑u ↑v ↑w\nkey : n - m + k < n\n⊢ ↑C ↑v * ↑(monomial (m + n)) ↑u + ↑C ↑v * ↑(monomial (n - m + k + n)) ↑w =\n    ↑(monomial (m + n)) (↑v * ↑u) + ↑(monomial (n + (n - m + k))) (↑w * ↑v)\n[PROOFSTEP]\nrw [C_mul_monomial, C_mul_monomial, mul_comm (v : ℤ) w, add_comm (n - m + k) n]\n[GOAL]\ncase h\np q : ℤ[X]\nk m n : ℕ\nhkm : k < m\nhmn : m < n\nu v w : ℤˣ\nhp : p = trinomial k m n ↑u ↑v ↑w\nkey : n - m + k < n\n⊢ ¬Set.Ioo (k + n) (n + n) (n + n)\n[PROOFSTEP]\nexact fun h => h.2.ne rfl\n[GOAL]\ncase h\np q : ℤ[X]\nk m n : ℕ\nhkm : k < m\nhmn : m < n\nu v w : ℤˣ\nhp : p = trinomial k m n ↑u ↑v ↑w\nkey : n - m + k < n\n⊢ Set.Ioo (k + n) (n + n) (n + (n - m + k))\n[PROOFSTEP]\nrefine' ⟨_, add_lt_add_left key n⟩\n[GOAL]\ncase h\np q : ℤ[X]\nk m n : ℕ\nhkm : k < m\nhmn : m < n\nu v w : ℤˣ\nhp : p = trinomial k m n ↑u ↑v ↑w\nkey : n - m + k < n\n⊢ k + n < n + (n - m + k)\n[PROOFSTEP]\nrwa [add_comm, add_lt_add_iff_left, lt_add_iff_pos_left, tsub_pos_iff_lt]\n[GOAL]\ncase h\np q : ℤ[X]\nk m n : ℕ\nhkm : k < m\nhmn : m < n\nu v w : ℤˣ\nhp : p = trinomial k m n ↑u ↑v ↑w\nkey : n - m + k < n\n⊢ ¬Set.Ioo (k + n) (n + n) (n + k)\n[PROOFSTEP]\nexact fun h => h.1.ne (add_comm k n)\n[GOAL]\ncase h\np q : ℤ[X]\nk m n : ℕ\nhkm : k < m\nhmn : m < n\nu v w : ℤˣ\nhp : p = trinomial k m n ↑u ↑v ↑w\nkey : n - m + k < n\n⊢ Set.Ioo (k + n) (n + n) (m + n)\n[PROOFSTEP]\nexact ⟨add_lt_add_right hkm n, add_lt_add_right hmn n⟩\n[GOAL]\ncase h\np q : ℤ[X]\nk m n : ℕ\nhkm : k < m\nhmn : m < n\nu v w : ℤˣ\nhp : p = trinomial k m n ↑u ↑v ↑w\nkey : n - m + k < n\n⊢ ¬Set.Ioo (k + n) (n + n) (m + (n - m + k))\n[PROOFSTEP]\nrw [← add_assoc, add_tsub_cancel_of_le hmn.le, add_comm]\n[GOAL]\ncase h\np q : ℤ[X]\nk m n : ℕ\nhkm : k < m\nhmn : m < n\nu v w : ℤˣ\nhp : p = trinomial k m n ↑u ↑v ↑w\nkey : n - m + k < n\n⊢ ¬Set.Ioo (n + k) (n + n) (n + k)\n[PROOFSTEP]\nexact fun h => h.1.ne rfl\n[GOAL]\ncase h\np q : ℤ[X]\nk m n : ℕ\nhkm : k < m\nhmn : m < n\nu v w : ℤˣ\nhp : p = trinomial k m n ↑u ↑v ↑w\nkey : n - m + k < n\n⊢ ¬Set.Ioo (k + n) (n + n) (m + k)\n[PROOFSTEP]\nintro h\n[GOAL]\ncase h\np q : ℤ[X]\nk m n : ℕ\nhkm : k < m\nhmn : m < n\nu v w : ℤˣ\nhp : p = trinomial k m n ↑u ↑v ↑w\nkey : n - m + k < n\nh : Set.Ioo (k + n) (n + n) (m + k)\n⊢ False\n[PROOFSTEP]\nhave := h.1\n[GOAL]\ncase h\np q : ℤ[X]\nk m n : ℕ\nhkm : k < m\nhmn : m < n\nu v w : ℤˣ\nhp : p = trinomial k m n ↑u ↑v ↑w\nkey : n - m + k < n\nh : Set.Ioo (k + n) (n + n) (m + k)\nthis : k + n < m + k\n⊢ False\n[PROOFSTEP]\nrw [add_comm, add_lt_add_iff_right] at this \n[GOAL]\ncase h\np q : ℤ[X]\nk m n : ℕ\nhkm : k < m\nhmn : m < n\nu v w : ℤˣ\nhp : p = trinomial k m n ↑u ↑v ↑w\nkey : n - m + k < n\nh : Set.Ioo (k + n) (n + n) (m + k)\nthis : n < m\n⊢ False\n[PROOFSTEP]\nexact asymm this hmn\n[GOAL]\ncase h\np q : ℤ[X]\nk m n : ℕ\nhkm : k < m\nhmn : m < n\nu v w : ℤˣ\nhp : p = trinomial k m n ↑u ↑v ↑w\nkey : n - m + k < n\n⊢ ¬Set.Ioo (k + n) (n + n) (k + n)\n[PROOFSTEP]\nexact fun h => h.1.ne rfl\n[GOAL]\ncase h\np q : ℤ[X]\nk m n : ℕ\nhkm : k < m\nhmn : m < n\nu v w : ℤˣ\nhp : p = trinomial k m n ↑u ↑v ↑w\nkey : n - m + k < n\n⊢ ¬Set.Ioo (k + n) (n + n) (k + (n - m + k))\n[PROOFSTEP]\nexact fun h => asymm ((add_lt_add_iff_left k).mp h.1) key\n[GOAL]\ncase h\np q : ℤ[X]\nk m n : ℕ\nhkm : k < m\nhmn : m < n\nu v w : ℤˣ\nhp : p = trinomial k m n ↑u ↑v ↑w\nkey : n - m + k < n\n⊢ ¬Set.Ioo (k + n) (n + n) (k + k)\n[PROOFSTEP]\nexact fun h => asymm ((add_lt_add_iff_left k).mp h.1) (hkm.trans hmn)\n[GOAL]\np q : ℤ[X]\nk m m' n : ℕ\nhkm : k < m\nhmn : m < n\nhkm' : k < m'\nhmn' : m' < n\nu v w : ℤˣ\nhp : p = trinomial k m n ↑u ↑v ↑w\nhq : q = trinomial k m' n ↑u ↑v ↑w\nh : p * mirror p = q * mirror q\n⊢ q = p ∨ q = mirror p\n[PROOFSTEP]\nlet f : ℤ[X] → ℤ[X] := fun p => ⟨Finsupp.filter (Set.Ioo (k + n) (n + n)) p.toFinsupp⟩\n[GOAL]\np q : ℤ[X]\nk m m' n : ℕ\nhkm : k < m\nhmn : m < n\nhkm' : k < m'\nhmn' : m' < n\nu v w : ℤˣ\nhp : p = trinomial k m n ↑u ↑v ↑w\nhq : q = trinomial k m' n ↑u ↑v ↑w\nh : p * mirror p = q * mirror q\nf : ℤ[X] → ℤ[X] := fun p => { toFinsupp := Finsupp.filter (Set.Ioo (k + n) (n + n)) p.toFinsupp }\n⊢ q = p ∨ q = mirror p\n[PROOFSTEP]\nreplace h := congr_arg f h\n[GOAL]\np q : ℤ[X]\nk m m' n : ℕ\nhkm : k < m\nhmn : m < n\nhkm' : k < m'\nhmn' : m' < n\nu v w : ℤˣ\nhp : p = trinomial k m n ↑u ↑v ↑w\nhq : q = trinomial k m' n ↑u ↑v ↑w\nf : ℤ[X] → ℤ[X] := fun p => { toFinsupp := Finsupp.filter (Set.Ioo (k + n) (n + n)) p.toFinsupp }\nh : f (p * mirror p) = f (q * mirror q)\n⊢ q = p ∨ q = mirror p\n[PROOFSTEP]\nreplace h := (irreducible_aux1 hkm hmn u v w hp).trans h\n[GOAL]\np q : ℤ[X]\nk m m' n : ℕ\nhkm : k < m\nhmn : m < n\nhkm' : k < m'\nhmn' : m' < n\nu v w : ℤˣ\nhp : p = trinomial k m n ↑u ↑v ↑w\nhq : q = trinomial k m' n ↑u ↑v ↑w\nf : ℤ[X] → ℤ[X] := fun p => { toFinsupp := Finsupp.filter (Set.Ioo (k + n) (n + n)) p.toFinsupp }\nh : ↑C ↑v * (↑C ↑u * X ^ (m + n) + ↑C ↑w * X ^ (n - m + k + n)) = f (q * mirror q)\n⊢ q = p ∨ q = mirror p\n[PROOFSTEP]\nreplace h := h.trans (irreducible_aux1 hkm' hmn' u v w hq).symm\n[GOAL]\np q : ℤ[X]\nk m m' n : ℕ\nhkm : k < m\nhmn : m < n\nhkm' : k < m'\nhmn' : m' < n\nu v w : ℤˣ\nhp : p = trinomial k m n ↑u ↑v ↑w\nhq : q = trinomial k m' n ↑u ↑v ↑w\nf : ℤ[X] → ℤ[X] := fun p => { toFinsupp := Finsupp.filter (Set.Ioo (k + n) (n + n)) p.toFinsupp }\nh :\n  ↑C ↑v * (↑C ↑u * X ^ (m + n) + ↑C ↑w * X ^ (n - m + k + n)) =\n    ↑C ↑v * (↑C ↑u * X ^ (m' + n) + ↑C ↑w * X ^ (n - m' + k + n))\n⊢ q = p ∨ q = mirror p\n[PROOFSTEP]\nrw [(isUnit_C.mpr v.isUnit).mul_right_inj] at h \n[GOAL]\np q : ℤ[X]\nk m m' n : ℕ\nhkm : k < m\nhmn : m < n\nhkm' : k < m'\nhmn' : m' < n\nu v w : ℤˣ\nhp : p = trinomial k m n ↑u ↑v ↑w\nhq : q = trinomial k m' n ↑u ↑v ↑w\nf : ℤ[X] → ℤ[X] := fun p => { toFinsupp := Finsupp.filter (Set.Ioo (k + n) (n + n)) p.toFinsupp }\nh : ↑C ↑u * X ^ (m + n) + ↑C ↑w * X ^ (n - m + k + n) = ↑C ↑u * X ^ (m' + n) + ↑C ↑w * X ^ (n - m' + k + n)\n⊢ q = p ∨ q = mirror p\n[PROOFSTEP]\nrw [binomial_eq_binomial u.ne_zero w.ne_zero] at h \n[GOAL]\np q : ℤ[X]\nk m m' n : ℕ\nhkm : k < m\nhmn : m < n\nhkm' : k < m'\nhmn' : m' < n\nu v w : ℤˣ\nhp : p = trinomial k m n ↑u ↑v ↑w\nhq : q = trinomial k m' n ↑u ↑v ↑w\nf : ℤ[X] → ℤ[X] := fun p => { toFinsupp := Finsupp.filter (Set.Ioo (k + n) (n + n)) p.toFinsupp }\nh :\n  m + n = m' + n ∧ n - m + k + n = n - m' + k + n ∨\n    ↑u = ↑w ∧ m + n = n - m' + k + n ∧ n - m + k + n = m' + n ∨\n      ↑u + ↑w = 0 ∧ m + n = n - m + k + n ∧ m' + n = n - m' + k + n\n⊢ q = p ∨ q = mirror p\n[PROOFSTEP]\nsimp only [add_left_inj, Units.eq_iff] at h \n[GOAL]\np q : ℤ[X]\nk m m' n : ℕ\nhkm : k < m\nhmn : m < n\nhkm' : k < m'\nhmn' : m' < n\nu v w : ℤˣ\nhp : p = trinomial k m n ↑u ↑v ↑w\nhq : q = trinomial k m' n ↑u ↑v ↑w\nf : ℤ[X] → ℤ[X] := fun p => { toFinsupp := Finsupp.filter (Set.Ioo (k + n) (n + n)) p.toFinsupp }\nh : m = m' ∧ n - m = n - m' ∨ u = w ∧ m = n - m' + k ∧ n - m + k = m' ∨ ↑u + ↑w = 0 ∧ m = n - m + k ∧ m' = n - m' + k\n⊢ q = p ∨ q = mirror p\n[PROOFSTEP]\nrcases h with (⟨rfl, -⟩ | ⟨rfl, rfl, h⟩ | ⟨-, hm, hm'⟩)\n[GOAL]\ncase inl.intro\np q : ℤ[X]\nk m n : ℕ\nhkm : k < m\nhmn : m < n\nu v w : ℤˣ\nhp : p = trinomial k m n ↑u ↑v ↑w\nf : ℤ[X] → ℤ[X] := fun p => { toFinsupp := Finsupp.filter (Set.Ioo (k + n) (n + n)) p.toFinsupp }\nhkm' : k < m\nhmn' : m < n\nhq : q = trinomial k m n ↑u ↑v ↑w\n⊢ q = p ∨ q = mirror p\n[PROOFSTEP]\nexact Or.inl (hq.trans hp.symm)\n[GOAL]\ncase inr.inl.intro.intro\np q : ℤ[X]\nk m' n : ℕ\nhkm' : k < m'\nhmn' : m' < n\nu v : ℤˣ\nf : ℤ[X] → ℤ[X] := fun p => { toFinsupp := Finsupp.filter (Set.Ioo (k + n) (n + n)) p.toFinsupp }\nhq : q = trinomial k m' n ↑u ↑v ↑u\nhkm : k < n - m' + k\nhmn : n - m' + k < n\nhp : p = trinomial k (n - m' + k) n ↑u ↑v ↑u\nh : n - (n - m' + k) + k = m'\n⊢ q = p ∨ q = mirror p\n[PROOFSTEP]\nrefine' Or.inr _\n[GOAL]\ncase inr.inl.intro.intro\np q : ℤ[X]\nk m' n : ℕ\nhkm' : k < m'\nhmn' : m' < n\nu v : ℤˣ\nf : ℤ[X] → ℤ[X] := fun p => { toFinsupp := Finsupp.filter (Set.Ioo (k + n) (n + n)) p.toFinsupp }\nhq : q = trinomial k m' n ↑u ↑v ↑u\nhkm : k < n - m' + k\nhmn : n - m' + k < n\nhp : p = trinomial k (n - m' + k) n ↑u ↑v ↑u\nh : n - (n - m' + k) + k = m'\n⊢ q = mirror p\n[PROOFSTEP]\nrw [← trinomial_mirror hkm' hmn' u.ne_zero u.ne_zero, eq_comm, mirror_eq_iff] at hp \n[GOAL]\ncase inr.inl.intro.intro\np q : ℤ[X]\nk m' n : ℕ\nhkm' : k < m'\nhmn' : m' < n\nu v : ℤˣ\nf : ℤ[X] → ℤ[X] := fun p => { toFinsupp := Finsupp.filter (Set.Ioo (k + n) (n + n)) p.toFinsupp }\nhq : q = trinomial k m' n ↑u ↑v ↑u\nhkm : k < n - m' + k\nhmn : n - m' + k < n\nhp : trinomial k m' n ↑u ↑v ↑u = mirror p\nh : n - (n - m' + k) + k = m'\n⊢ q = mirror p\n[PROOFSTEP]\nexact hq.trans hp\n[GOAL]\ncase inr.inr.intro.intro\np q : ℤ[X]\nk m m' n : ℕ\nhkm : k < m\nhmn : m < n\nhkm' : k < m'\nhmn' : m' < n\nu v w : ℤˣ\nhp : p = trinomial k m n ↑u ↑v ↑w\nhq : q = trinomial k m' n ↑u ↑v ↑w\nf : ℤ[X] → ℤ[X] := fun p => { toFinsupp := Finsupp.filter (Set.Ioo (k + n) (n + n)) p.toFinsupp }\nhm : m = n - m + k\nhm' : m' = n - m' + k\n⊢ q = p ∨ q = mirror p\n[PROOFSTEP]\nsuffices m = m' by\n  rw [this] at hp \n  exact Or.inl (hq.trans hp.symm)\n[GOAL]\np q : ℤ[X]\nk m m' n : ℕ\nhkm : k < m\nhmn : m < n\nhkm' : k < m'\nhmn' : m' < n\nu v w : ℤˣ\nhp : p = trinomial k m n ↑u ↑v ↑w\nhq : q = trinomial k m' n ↑u ↑v ↑w\nf : ℤ[X] → ℤ[X] := fun p => { toFinsupp := Finsupp.filter (Set.Ioo (k + n) (n + n)) p.toFinsupp }\nhm : m = n - m + k\nhm' : m' = n - m' + k\nthis : m = m'\n⊢ q = p ∨ q = mirror p\n[PROOFSTEP]\nrw [this] at hp \n[GOAL]\np q : ℤ[X]\nk m m' n : ℕ\nhkm : k < m\nhmn : m < n\nhkm' : k < m'\nhmn' : m' < n\nu v w : ℤˣ\nhp : p = trinomial k m' n ↑u ↑v ↑w\nhq : q = trinomial k m' n ↑u ↑v ↑w\nf : ℤ[X] → ℤ[X] := fun p => { toFinsupp := Finsupp.filter (Set.Ioo (k + n) (n + n)) p.toFinsupp }\nhm : m = n - m + k\nhm' : m' = n - m' + k\nthis : m = m'\n⊢ q = p ∨ q = mirror p\n[PROOFSTEP]\nexact Or.inl (hq.trans hp.symm)\n[GOAL]\ncase inr.inr.intro.intro\np q : ℤ[X]\nk m m' n : ℕ\nhkm : k < m\nhmn : m < n\nhkm' : k < m'\nhmn' : m' < n\nu v w : ℤˣ\nhp : p = trinomial k m n ↑u ↑v ↑w\nhq : q = trinomial k m' n ↑u ↑v ↑w\nf : ℤ[X] → ℤ[X] := fun p => { toFinsupp := Finsupp.filter (Set.Ioo (k + n) (n + n)) p.toFinsupp }\nhm : m = n - m + k\nhm' : m' = n - m' + k\n⊢ m = m'\n[PROOFSTEP]\nrw [tsub_add_eq_add_tsub hmn.le, eq_tsub_iff_add_eq_of_le, ← two_mul] at hm \n[GOAL]\ncase inr.inr.intro.intro\np q : ℤ[X]\nk m m' n : ℕ\nhkm : k < m\nhmn : m < n\nhkm' : k < m'\nhmn' : m' < n\nu v w : ℤˣ\nhp : p = trinomial k m n ↑u ↑v ↑w\nhq : q = trinomial k m' n ↑u ↑v ↑w\nf : ℤ[X] → ℤ[X] := fun p => { toFinsupp := Finsupp.filter (Set.Ioo (k + n) (n + n)) p.toFinsupp }\nhm✝ : m = n + k - m\nhm : 2 * m = n + k\nhm' : m' = n - m' + k\n⊢ m = m'\ncase inr.inr.intro.intro\np q : ℤ[X]\nk m m' n : ℕ\nhkm : k < m\nhmn : m < n\nhkm' : k < m'\nhmn' : m' < n\nu v w : ℤˣ\nhp : p = trinomial k m n ↑u ↑v ↑w\nhq : q = trinomial k m' n ↑u ↑v ↑w\nf : ℤ[X] → ℤ[X] := fun p => { toFinsupp := Finsupp.filter (Set.Ioo (k + n) (n + n)) p.toFinsupp }\nhm : m = n + k - m\nhm' : m' = n - m' + k\n⊢ m ≤ n + k\n[PROOFSTEP]\nrw [tsub_add_eq_add_tsub hmn'.le, eq_tsub_iff_add_eq_of_le, ← two_mul] at hm' \n[GOAL]\ncase inr.inr.intro.intro\np q : ℤ[X]\nk m m' n : ℕ\nhkm : k < m\nhmn : m < n\nhkm' : k < m'\nhmn' : m' < n\nu v w : ℤˣ\nhp : p = trinomial k m n ↑u ↑v ↑w\nhq : q = trinomial k m' n ↑u ↑v ↑w\nf : ℤ[X] → ℤ[X] := fun p => { toFinsupp := Finsupp.filter (Set.Ioo (k + n) (n + n)) p.toFinsupp }\nhm✝ : m = n + k - m\nhm : 2 * m = n + k\nhm'✝ : m' = n + k - m'\nhm' : 2 * m' = n + k\n⊢ m = m'\ncase inr.inr.intro.intro\np q : ℤ[X]\nk m m' n : ℕ\nhkm : k < m\nhmn : m < n\nhkm' : k < m'\nhmn' : m' < n\nu v w : ℤˣ\nhp : p = trinomial k m n ↑u ↑v ↑w\nhq : q = trinomial k m' n ↑u ↑v ↑w\nf : ℤ[X] → ℤ[X] := fun p => { toFinsupp := Finsupp.filter (Set.Ioo (k + n) (n + n)) p.toFinsupp }\nhm✝ : m = n + k - m\nhm : 2 * m = n + k\nhm' : m' = n + k - m'\n⊢ m' ≤ n + k\ncase inr.inr.intro.intro\np q : ℤ[X]\nk m m' n : ℕ\nhkm : k < m\nhmn : m < n\nhkm' : k < m'\nhmn' : m' < n\nu v w : ℤˣ\nhp : p = trinomial k m n ↑u ↑v ↑w\nhq : q = trinomial k m' n ↑u ↑v ↑w\nf : ℤ[X] → ℤ[X] := fun p => { toFinsupp := Finsupp.filter (Set.Ioo (k + n) (n + n)) p.toFinsupp }\nhm : m = n + k - m\nhm' : m' = n - m' + k\n⊢ m ≤ n + k\n[PROOFSTEP]\nexact mul_left_cancel₀ two_ne_zero (hm.trans hm'.symm)\n[GOAL]\ncase inr.inr.intro.intro\np q : ℤ[X]\nk m m' n : ℕ\nhkm : k < m\nhmn : m < n\nhkm' : k < m'\nhmn' : m' < n\nu v w : ℤˣ\nhp : p = trinomial k m n ↑u ↑v ↑w\nhq : q = trinomial k m' n ↑u ↑v ↑w\nf : ℤ[X] → ℤ[X] := fun p => { toFinsupp := Finsupp.filter (Set.Ioo (k + n) (n + n)) p.toFinsupp }\nhm✝ : m = n + k - m\nhm : 2 * m = n + k\nhm' : m' = n + k - m'\n⊢ m' ≤ n + k\ncase inr.inr.intro.intro\np q : ℤ[X]\nk m m' n : ℕ\nhkm : k < m\nhmn : m < n\nhkm' : k < m'\nhmn' : m' < n\nu v w : ℤˣ\nhp : p = trinomial k m n ↑u ↑v ↑w\nhq : q = trinomial k m' n ↑u ↑v ↑w\nf : ℤ[X] → ℤ[X] := fun p => { toFinsupp := Finsupp.filter (Set.Ioo (k + n) (n + n)) p.toFinsupp }\nhm : m = n + k - m\nhm' : m' = n - m' + k\n⊢ m ≤ n + k\n[PROOFSTEP]\nexact hmn'.le.trans (Nat.le_add_right n k)\n[GOAL]\ncase inr.inr.intro.intro\np q : ℤ[X]\nk m m' n : ℕ\nhkm : k < m\nhmn : m < n\nhkm' : k < m'\nhmn' : m' < n\nu v w : ℤˣ\nhp : p = trinomial k m n ↑u ↑v ↑w\nhq : q = trinomial k m' n ↑u ↑v ↑w\nf : ℤ[X] → ℤ[X] := fun p => { toFinsupp := Finsupp.filter (Set.Ioo (k + n) (n + n)) p.toFinsupp }\nhm : m = n + k - m\nhm' : m' = n - m' + k\n⊢ m ≤ n + k\n[PROOFSTEP]\nexact hmn.le.trans (Nat.le_add_right n k)\n[GOAL]\np q : ℤ[X]\nk m m' n : ℕ\nhkm : k < m\nhmn : m < n\nhkm' : k < m'\nhmn' : m' < n\nu v w x z : ℤˣ\nhp : p = trinomial k m n ↑u ↑v ↑w\nhq : q = trinomial k m' n ↑x ↑v ↑z\nh : p * mirror p = q * mirror q\n⊢ q = p ∨ q = mirror p\n[PROOFSTEP]\nhave hmul := congr_arg leadingCoeff h\n[GOAL]\np q : ℤ[X]\nk m m' n : ℕ\nhkm : k < m\nhmn : m < n\nhkm' : k < m'\nhmn' : m' < n\nu v w x z : ℤˣ\nhp : p = trinomial k m n ↑u ↑v ↑w\nhq : q = trinomial k m' n ↑x ↑v ↑z\nh : p * mirror p = q * mirror q\nhmul : leadingCoeff (p * mirror p) = leadingCoeff (q * mirror q)\n⊢ q = p ∨ q = mirror p\n[PROOFSTEP]\nrw [leadingCoeff_mul, leadingCoeff_mul, mirror_leadingCoeff, mirror_leadingCoeff, hp, hq,\n  trinomial_leadingCoeff hkm hmn w.ne_zero, trinomial_leadingCoeff hkm' hmn' z.ne_zero,\n  trinomial_trailingCoeff hkm hmn u.ne_zero, trinomial_trailingCoeff hkm' hmn' x.ne_zero] at hmul \n[GOAL]\np q : ℤ[X]\nk m m' n : ℕ\nhkm : k < m\nhmn : m < n\nhkm' : k < m'\nhmn' : m' < n\nu v w x z : ℤˣ\nhp : p = trinomial k m n ↑u ↑v ↑w\nhq : q = trinomial k m' n ↑x ↑v ↑z\nh : p * mirror p = q * mirror q\nhmul : ↑w * ↑u = ↑z * ↑x\n⊢ q = p ∨ q = mirror p\n[PROOFSTEP]\nhave hadd := congr_arg (eval 1) h\n[GOAL]\np q : ℤ[X]\nk m m' n : ℕ\nhkm : k < m\nhmn : m < n\nhkm' : k < m'\nhmn' : m' < n\nu v w x z : ℤˣ\nhp : p = trinomial k m n ↑u ↑v ↑w\nhq : q = trinomial k m' n ↑x ↑v ↑z\nh : p * mirror p = q * mirror q\nhmul : ↑w * ↑u = ↑z * ↑x\nhadd : eval 1 (p * mirror p) = eval 1 (q * mirror q)\n⊢ q = p ∨ q = mirror p\n[PROOFSTEP]\nrw [eval_mul, eval_mul, mirror_eval_one, mirror_eval_one, ← sq, ← sq, hp, hq] at hadd \n[GOAL]\np q : ℤ[X]\nk m m' n : ℕ\nhkm : k < m\nhmn : m < n\nhkm' : k < m'\nhmn' : m' < n\nu v w x z : ℤˣ\nhp : p = trinomial k m n ↑u ↑v ↑w\nhq : q = trinomial k m' n ↑x ↑v ↑z\nh : p * mirror p = q * mirror q\nhmul : ↑w * ↑u = ↑z * ↑x\nhadd : eval 1 (trinomial k m n ↑u ↑v ↑w) ^ 2 = eval 1 (trinomial k m' n ↑x ↑v ↑z) ^ 2\n⊢ q = p ∨ q = mirror p\n[PROOFSTEP]\nsimp only [eval_add, eval_C_mul, eval_pow, eval_X, one_pow, mul_one, trinomial_def] at hadd \n[GOAL]\np q : ℤ[X]\nk m m' n : ℕ\nhkm : k < m\nhmn : m < n\nhkm' : k < m'\nhmn' : m' < n\nu v w x z : ℤˣ\nhp : p = trinomial k m n ↑u ↑v ↑w\nhq : q = trinomial k m' n ↑x ↑v ↑z\nh : p * mirror p = q * mirror q\nhmul : ↑w * ↑u = ↑z * ↑x\nhadd : (↑u + ↑v + ↑w) ^ 2 = (↑x + ↑v + ↑z) ^ 2\n⊢ q = p ∨ q = mirror p\n[PROOFSTEP]\nrw [add_assoc, add_assoc, add_comm (u : ℤ), add_comm (x : ℤ), add_assoc, add_assoc] at hadd \n[GOAL]\np q : ℤ[X]\nk m m' n : ℕ\nhkm : k < m\nhmn : m < n\nhkm' : k < m'\nhmn' : m' < n\nu v w x z : ℤˣ\nhp : p = trinomial k m n ↑u ↑v ↑w\nhq : q = trinomial k m' n ↑x ↑v ↑z\nh : p * mirror p = q * mirror q\nhmul : ↑w * ↑u = ↑z * ↑x\nhadd : (↑v + (↑w + ↑u)) ^ 2 = (↑v + (↑z + ↑x)) ^ 2\n⊢ q = p ∨ q = mirror p\n[PROOFSTEP]\nsimp only [add_sq', add_assoc, add_right_inj, ← Units.val_pow_eq_pow_val, Int.units_sq] at hadd \n[GOAL]\np q : ℤ[X]\nk m m' n : ℕ\nhkm : k < m\nhmn : m < n\nhkm' : k < m'\nhmn' : m' < n\nu v w x z : ℤˣ\nhp : p = trinomial k m n ↑u ↑v ↑w\nhq : q = trinomial k m' n ↑x ↑v ↑z\nh : p * mirror p = q * mirror q\nhmul : ↑w * ↑u = ↑z * ↑x\nhadd : 2 * ↑w * ↑u + 2 * ↑v * (↑w + ↑u) = 2 * ↑z * ↑x + 2 * ↑v * (↑z + ↑x)\n⊢ q = p ∨ q = mirror p\n[PROOFSTEP]\nrw [mul_assoc, hmul, ← mul_assoc, add_right_inj,\n  mul_right_inj' (show 2 * (v : ℤ) ≠ 0 from mul_ne_zero two_ne_zero v.ne_zero)] at hadd \n[GOAL]\np q : ℤ[X]\nk m m' n : ℕ\nhkm : k < m\nhmn : m < n\nhkm' : k < m'\nhmn' : m' < n\nu v w x z : ℤˣ\nhp : p = trinomial k m n ↑u ↑v ↑w\nhq : q = trinomial k m' n ↑x ↑v ↑z\nh : p * mirror p = q * mirror q\nhmul : ↑w * ↑u = ↑z * ↑x\nhadd : ↑w + ↑u = ↑z + ↑x\n⊢ q = p ∨ q = mirror p\n[PROOFSTEP]\nreplace hadd := (Int.isUnit_add_isUnit_eq_isUnit_add_isUnit w.isUnit u.isUnit z.isUnit x.isUnit).mp hadd\n[GOAL]\np q : ℤ[X]\nk m m' n : ℕ\nhkm : k < m\nhmn : m < n\nhkm' : k < m'\nhmn' : m' < n\nu v w x z : ℤˣ\nhp : p = trinomial k m n ↑u ↑v ↑w\nhq : q = trinomial k m' n ↑x ↑v ↑z\nh : p * mirror p = q * mirror q\nhmul : ↑w * ↑u = ↑z * ↑x\nhadd : ↑w = ↑z ∧ ↑u = ↑x ∨ ↑w = ↑x ∧ ↑u = ↑z\n⊢ q = p ∨ q = mirror p\n[PROOFSTEP]\nsimp only [Units.eq_iff] at hadd \n[GOAL]\np q : ℤ[X]\nk m m' n : ℕ\nhkm : k < m\nhmn : m < n\nhkm' : k < m'\nhmn' : m' < n\nu v w x z : ℤˣ\nhp : p = trinomial k m n ↑u ↑v ↑w\nhq : q = trinomial k m' n ↑x ↑v ↑z\nh : p * mirror p = q * mirror q\nhmul : ↑w * ↑u = ↑z * ↑x\nhadd : w = z ∧ u = x ∨ w = x ∧ u = z\n⊢ q = p ∨ q = mirror p\n[PROOFSTEP]\nrcases hadd with (⟨rfl, rfl⟩ | ⟨rfl, rfl⟩)\n[GOAL]\ncase inl.intro\np q : ℤ[X]\nk m m' n : ℕ\nhkm : k < m\nhmn : m < n\nhkm' : k < m'\nhmn' : m' < n\nu v w : ℤˣ\nhp : p = trinomial k m n ↑u ↑v ↑w\nh : p * mirror p = q * mirror q\nhq : q = trinomial k m' n ↑u ↑v ↑w\nhmul : ↑w * ↑u = ↑w * ↑u\n⊢ q = p ∨ q = mirror p\n[PROOFSTEP]\nexact irreducible_aux2 hkm hmn hkm' hmn' u v w hp hq h\n[GOAL]\ncase inr.intro\np q : ℤ[X]\nk m m' n : ℕ\nhkm : k < m\nhmn : m < n\nhkm' : k < m'\nhmn' : m' < n\nu v w : ℤˣ\nhp : p = trinomial k m n ↑u ↑v ↑w\nh : p * mirror p = q * mirror q\nhq : q = trinomial k m' n ↑w ↑v ↑u\nhmul : ↑w * ↑u = ↑u * ↑w\n⊢ q = p ∨ q = mirror p\n[PROOFSTEP]\nrw [← mirror_inj, trinomial_mirror hkm' hmn' w.ne_zero u.ne_zero] at hq \n[GOAL]\ncase inr.intro\np q : ℤ[X]\nk m m' n : ℕ\nhkm : k < m\nhmn : m < n\nhkm' : k < m'\nhmn' : m' < n\nu v w : ℤˣ\nhp : p = trinomial k m n ↑u ↑v ↑w\nh : p * mirror p = q * mirror q\nhq : mirror q = trinomial k (n - m' + k) n ↑u ↑v ↑w\nhmul : ↑w * ↑u = ↑u * ↑w\n⊢ q = p ∨ q = mirror p\n[PROOFSTEP]\nrw [mul_comm q, ← q.mirror_mirror, q.mirror.mirror_mirror] at h \n[GOAL]\ncase inr.intro\np q : ℤ[X]\nk m m' n : ℕ\nhkm : k < m\nhmn : m < n\nhkm' : k < m'\nhmn' : m' < n\nu v w : ℤˣ\nhp : p = trinomial k m n ↑u ↑v ↑w\nh : p * mirror p = mirror q * mirror (mirror q)\nhq : mirror q = trinomial k (n - m' + k) n ↑u ↑v ↑w\nhmul : ↑w * ↑u = ↑u * ↑w\n⊢ q = p ∨ q = mirror p\n[PROOFSTEP]\nrw [← mirror_inj, or_comm, ← mirror_eq_iff]\n[GOAL]\ncase inr.intro\np q : ℤ[X]\nk m m' n : ℕ\nhkm : k < m\nhmn : m < n\nhkm' : k < m'\nhmn' : m' < n\nu v w : ℤˣ\nhp : p = trinomial k m n ↑u ↑v ↑w\nh : p * mirror p = mirror q * mirror (mirror q)\nhq : mirror q = trinomial k (n - m' + k) n ↑u ↑v ↑w\nhmul : ↑w * ↑u = ↑u * ↑w\n⊢ mirror q = p ∨ mirror q = mirror p\n[PROOFSTEP]\nexact\n  irreducible_aux2 hkm hmn (lt_add_of_pos_left k (tsub_pos_of_lt hmn'))\n    (lt_tsub_iff_right.mp ((tsub_lt_tsub_iff_left_of_le hmn'.le).mpr hkm')) u v w hp hq h\n[GOAL]\np q : ℤ[X]\nhp : IsUnitTrinomial p\nh : ∀ (q : ℤ[X]), q ∣ p → q ∣ mirror p → IsUnit q\n⊢ Irreducible p\n[PROOFSTEP]\nrefine' irreducible_of_mirror hp.not_isUnit (fun q hpq => _) h\n[GOAL]\np q✝ : ℤ[X]\nhp : IsUnitTrinomial p\nh : ∀ (q : ℤ[X]), q ∣ p → q ∣ mirror p → IsUnit q\nq : ℤ[X]\nhpq : p * mirror p = q * mirror q\n⊢ q = p ∨ q = -p ∨ q = mirror p ∨ q = -mirror p\n[PROOFSTEP]\nhave hq : IsUnitTrinomial q := (isUnitTrinomial_iff'' hpq).mp hp\n[GOAL]\np q✝ : ℤ[X]\nhp : IsUnitTrinomial p\nh : ∀ (q : ℤ[X]), q ∣ p → q ∣ mirror p → IsUnit q\nq : ℤ[X]\nhpq : p * mirror p = q * mirror q\nhq : IsUnitTrinomial q\n⊢ q = p ∨ q = -p ∨ q = mirror p ∨ q = -mirror p\n[PROOFSTEP]\nobtain ⟨k, m, n, hkm, hmn, u, v, w, hp⟩ := hp\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\np q✝ : ℤ[X]\nh : ∀ (q : ℤ[X]), q ∣ p → q ∣ mirror p → IsUnit q\nq : ℤ[X]\nhpq : p * mirror p = q * mirror q\nhq : IsUnitTrinomial q\nk m n : ℕ\nhkm : k < m\nhmn : m < n\nu v w : ℤˣ\nhp : p = trinomial k m n ↑u ↑v ↑w\n⊢ q = p ∨ q = -p ∨ q = mirror p ∨ q = -mirror p\n[PROOFSTEP]\nobtain ⟨k', m', n', hkm', hmn', x, y, z, hq⟩ := hq\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\np q✝ : ℤ[X]\nh : ∀ (q : ℤ[X]), q ∣ p → q ∣ mirror p → IsUnit q\nq : ℤ[X]\nhpq : p * mirror p = q * mirror q\nk m n : ℕ\nhkm : k < m\nhmn : m < n\nu v w : ℤˣ\nhp : p = trinomial k m n ↑u ↑v ↑w\nk' m' n' : ℕ\nhkm' : k' < m'\nhmn' : m' < n'\nx y z : ℤˣ\nhq : q = trinomial k' m' n' ↑x ↑y ↑z\n⊢ q = p ∨ q = -p ∨ q = mirror p ∨ q = -mirror p\n[PROOFSTEP]\nhave hk : k = k' := by\n  rw [← mul_right_inj' (show 2 ≠ 0 from two_ne_zero), ← trinomial_natTrailingDegree hkm hmn u.ne_zero, ← hp, ←\n    natTrailingDegree_mul_mirror, hpq, natTrailingDegree_mul_mirror, hq,\n    trinomial_natTrailingDegree hkm' hmn' x.ne_zero]\n[GOAL]\np q✝ : ℤ[X]\nh : ∀ (q : ℤ[X]), q ∣ p → q ∣ mirror p → IsUnit q\nq : ℤ[X]\nhpq : p * mirror p = q * mirror q\nk m n : ℕ\nhkm : k < m\nhmn : m < n\nu v w : ℤˣ\nhp : p = trinomial k m n ↑u ↑v ↑w\nk' m' n' : ℕ\nhkm' : k' < m'\nhmn' : m' < n'\nx y z : ℤˣ\nhq : q = trinomial k' m' n' ↑x ↑y ↑z\n⊢ k = k'\n[PROOFSTEP]\nrw [← mul_right_inj' (show 2 ≠ 0 from two_ne_zero), ← trinomial_natTrailingDegree hkm hmn u.ne_zero, ← hp, ←\n  natTrailingDegree_mul_mirror, hpq, natTrailingDegree_mul_mirror, hq, trinomial_natTrailingDegree hkm' hmn' x.ne_zero]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\np q✝ : ℤ[X]\nh : ∀ (q : ℤ[X]), q ∣ p → q ∣ mirror p → IsUnit q\nq : ℤ[X]\nhpq : p * mirror p = q * mirror q\nk m n : ℕ\nhkm : k < m\nhmn : m < n\nu v w : ℤˣ\nhp : p = trinomial k m n ↑u ↑v ↑w\nk' m' n' : ℕ\nhkm' : k' < m'\nhmn' : m' < n'\nx y z : ℤˣ\nhq : q = trinomial k' m' n' ↑x ↑y ↑z\nhk : k = k'\n⊢ q = p ∨ q = -p ∨ q = mirror p ∨ q = -mirror p\n[PROOFSTEP]\nhave hn : n = n' := by\n  rw [← mul_right_inj' (show 2 ≠ 0 from two_ne_zero), ← trinomial_natDegree hkm hmn w.ne_zero, ← hp, ←\n    natDegree_mul_mirror, hpq, natDegree_mul_mirror, hq, trinomial_natDegree hkm' hmn' z.ne_zero]\n[GOAL]\np q✝ : ℤ[X]\nh : ∀ (q : ℤ[X]), q ∣ p → q ∣ mirror p → IsUnit q\nq : ℤ[X]\nhpq : p * mirror p = q * mirror q\nk m n : ℕ\nhkm : k < m\nhmn : m < n\nu v w : ℤˣ\nhp : p = trinomial k m n ↑u ↑v ↑w\nk' m' n' : ℕ\nhkm' : k' < m'\nhmn' : m' < n'\nx y z : ℤˣ\nhq : q = trinomial k' m' n' ↑x ↑y ↑z\nhk : k = k'\n⊢ n = n'\n[PROOFSTEP]\nrw [← mul_right_inj' (show 2 ≠ 0 from two_ne_zero), ← trinomial_natDegree hkm hmn w.ne_zero, ← hp, ←\n  natDegree_mul_mirror, hpq, natDegree_mul_mirror, hq, trinomial_natDegree hkm' hmn' z.ne_zero]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\np q✝ : ℤ[X]\nh : ∀ (q : ℤ[X]), q ∣ p → q ∣ mirror p → IsUnit q\nq : ℤ[X]\nhpq : p * mirror p = q * mirror q\nk m n : ℕ\nhkm : k < m\nhmn : m < n\nu v w : ℤˣ\nhp : p = trinomial k m n ↑u ↑v ↑w\nk' m' n' : ℕ\nhkm' : k' < m'\nhmn' : m' < n'\nx y z : ℤˣ\nhq : q = trinomial k' m' n' ↑x ↑y ↑z\nhk : k = k'\nhn : n = n'\n⊢ q = p ∨ q = -p ∨ q = mirror p ∨ q = -mirror p\n[PROOFSTEP]\nsubst hk\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\np q✝ : ℤ[X]\nh : ∀ (q : ℤ[X]), q ∣ p → q ∣ mirror p → IsUnit q\nq : ℤ[X]\nhpq : p * mirror p = q * mirror q\nk m n : ℕ\nhkm : k < m\nhmn : m < n\nu v w : ℤˣ\nhp : p = trinomial k m n ↑u ↑v ↑w\nm' n' : ℕ\nhmn' : m' < n'\nx y z : ℤˣ\nhn : n = n'\nhkm' : k < m'\nhq : q = trinomial k m' n' ↑x ↑y ↑z\n⊢ q = p ∨ q = -p ∨ q = mirror p ∨ q = -mirror p\n[PROOFSTEP]\nsubst hn\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\np q✝ : ℤ[X]\nh : ∀ (q : ℤ[X]), q ∣ p → q ∣ mirror p → IsUnit q\nq : ℤ[X]\nhpq : p * mirror p = q * mirror q\nk m n : ℕ\nhkm : k < m\nhmn : m < n\nu v w : ℤˣ\nhp : p = trinomial k m n ↑u ↑v ↑w\nm' : ℕ\nx y z : ℤˣ\nhkm' : k < m'\nhmn' : m' < n\nhq : q = trinomial k m' n ↑x ↑y ↑z\n⊢ q = p ∨ q = -p ∨ q = mirror p ∨ q = -mirror p\n[PROOFSTEP]\nrcases eq_or_eq_neg_of_sq_eq_sq (y : ℤ) (v : ℤ) ((Int.isUnit_sq y.isUnit).trans (Int.isUnit_sq v.isUnit).symm) with\n  (h1 | h1)\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.inl\np q✝ : ℤ[X]\nh : ∀ (q : ℤ[X]), q ∣ p → q ∣ mirror p → IsUnit q\nq : ℤ[X]\nhpq : p * mirror p = q * mirror q\nk m n : ℕ\nhkm : k < m\nhmn : m < n\nu v w : ℤˣ\nhp : p = trinomial k m n ↑u ↑v ↑w\nm' : ℕ\nx y z : ℤˣ\nhkm' : k < m'\nhmn' : m' < n\nhq : q = trinomial k m' n ↑x ↑y ↑z\nh1 : ↑y = ↑v\n⊢ q = p ∨ q = -p ∨ q = mirror p ∨ q = -mirror p\n[PROOFSTEP]\nrw [h1] at hq \n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.inl\np q✝ : ℤ[X]\nh : ∀ (q : ℤ[X]), q ∣ p → q ∣ mirror p → IsUnit q\nq : ℤ[X]\nhpq : p * mirror p = q * mirror q\nk m n : ℕ\nhkm : k < m\nhmn : m < n\nu v w : ℤˣ\nhp : p = trinomial k m n ↑u ↑v ↑w\nm' : ℕ\nx y z : ℤˣ\nhkm' : k < m'\nhmn' : m' < n\nhq : q = trinomial k m' n ↑x ↑v ↑z\nh1 : ↑y = ↑v\n⊢ q = p ∨ q = -p ∨ q = mirror p ∨ q = -mirror p\n[PROOFSTEP]\nrcases irreducible_aux3 hkm hmn hkm' hmn' u v w x z hp hq hpq with (h2 | h2)\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.inl.inl\np q✝ : ℤ[X]\nh : ∀ (q : ℤ[X]), q ∣ p → q ∣ mirror p → IsUnit q\nq : ℤ[X]\nhpq : p * mirror p = q * mirror q\nk m n : ℕ\nhkm : k < m\nhmn : m < n\nu v w : ℤˣ\nhp : p = trinomial k m n ↑u ↑v ↑w\nm' : ℕ\nx y z : ℤˣ\nhkm' : k < m'\nhmn' : m' < n\nhq : q = trinomial k m' n ↑x ↑v ↑z\nh1 : ↑y = ↑v\nh2 : q = p\n⊢ q = p ∨ q = -p ∨ q = mirror p ∨ q = -mirror p\n[PROOFSTEP]\nexact Or.inl h2\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.inl.inr\np q✝ : ℤ[X]\nh : ∀ (q : ℤ[X]), q ∣ p → q ∣ mirror p → IsUnit q\nq : ℤ[X]\nhpq : p * mirror p = q * mirror q\nk m n : ℕ\nhkm : k < m\nhmn : m < n\nu v w : ℤˣ\nhp : p = trinomial k m n ↑u ↑v ↑w\nm' : ℕ\nx y z : ℤˣ\nhkm' : k < m'\nhmn' : m' < n\nhq : q = trinomial k m' n ↑x ↑v ↑z\nh1 : ↑y = ↑v\nh2 : q = mirror p\n⊢ q = p ∨ q = -p ∨ q = mirror p ∨ q = -mirror p\n[PROOFSTEP]\nexact Or.inr (Or.inr (Or.inl h2))\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.inr\np q✝ : ℤ[X]\nh : ∀ (q : ℤ[X]), q ∣ p → q ∣ mirror p → IsUnit q\nq : ℤ[X]\nhpq : p * mirror p = q * mirror q\nk m n : ℕ\nhkm : k < m\nhmn : m < n\nu v w : ℤˣ\nhp : p = trinomial k m n ↑u ↑v ↑w\nm' : ℕ\nx y z : ℤˣ\nhkm' : k < m'\nhmn' : m' < n\nhq : q = trinomial k m' n ↑x ↑y ↑z\nh1 : ↑y = -↑v\n⊢ q = p ∨ q = -p ∨ q = mirror p ∨ q = -mirror p\n[PROOFSTEP]\nrw [h1] at hq \n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.inr\np q✝ : ℤ[X]\nh : ∀ (q : ℤ[X]), q ∣ p → q ∣ mirror p → IsUnit q\nq : ℤ[X]\nhpq : p * mirror p = q * mirror q\nk m n : ℕ\nhkm : k < m\nhmn : m < n\nu v w : ℤˣ\nhp : p = trinomial k m n ↑u ↑v ↑w\nm' : ℕ\nx y z : ℤˣ\nhkm' : k < m'\nhmn' : m' < n\nhq : q = trinomial k m' n (↑x) (-↑v) ↑z\nh1 : ↑y = -↑v\n⊢ q = p ∨ q = -p ∨ q = mirror p ∨ q = -mirror p\n[PROOFSTEP]\nrw [trinomial_def] at hp \n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.inr\np q✝ : ℤ[X]\nh : ∀ (q : ℤ[X]), q ∣ p → q ∣ mirror p → IsUnit q\nq : ℤ[X]\nhpq : p * mirror p = q * mirror q\nk m n : ℕ\nhkm : k < m\nhmn : m < n\nu v w : ℤˣ\nhp : p = ↑C ↑u * X ^ k + ↑C ↑v * X ^ m + ↑C ↑w * X ^ n\nm' : ℕ\nx y z : ℤˣ\nhkm' : k < m'\nhmn' : m' < n\nhq : q = trinomial k m' n (↑x) (-↑v) ↑z\nh1 : ↑y = -↑v\n⊢ q = p ∨ q = -p ∨ q = mirror p ∨ q = -mirror p\n[PROOFSTEP]\nrw [← neg_inj, neg_add, neg_add, ← neg_mul, ← neg_mul, ← neg_mul, ← C_neg, ← C_neg, ← C_neg] at hp \n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.inr\np q✝ : ℤ[X]\nh : ∀ (q : ℤ[X]), q ∣ p → q ∣ mirror p → IsUnit q\nq : ℤ[X]\nhpq : p * mirror p = q * mirror q\nk m n : ℕ\nhkm : k < m\nhmn : m < n\nu v w : ℤˣ\nhp✝ : p = ↑C ↑u * X ^ k + ↑C ↑v * X ^ m + ↑C ↑w * X ^ n\nhp : -p = ↑C (-↑u) * X ^ k + ↑C (-↑v) * X ^ m + ↑C (-↑w) * X ^ n\nm' : ℕ\nx y z : ℤˣ\nhkm' : k < m'\nhmn' : m' < n\nhq : q = trinomial k m' n (↑x) (-↑v) ↑z\nh1 : ↑y = -↑v\n⊢ q = p ∨ q = -p ∨ q = mirror p ∨ q = -mirror p\n[PROOFSTEP]\nrw [← neg_mul_neg, ← mirror_neg] at hpq \n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.inr\np q✝ : ℤ[X]\nh : ∀ (q : ℤ[X]), q ∣ p → q ∣ mirror p → IsUnit q\nq : ℤ[X]\nhpq✝ : p * mirror p = q * mirror q\nhpq : -p * mirror (-p) = q * mirror q\nk m n : ℕ\nhkm : k < m\nhmn : m < n\nu v w : ℤˣ\nhp✝ : p = ↑C ↑u * X ^ k + ↑C ↑v * X ^ m + ↑C ↑w * X ^ n\nhp : -p = ↑C (-↑u) * X ^ k + ↑C (-↑v) * X ^ m + ↑C (-↑w) * X ^ n\nm' : ℕ\nx y z : ℤˣ\nhkm' : k < m'\nhmn' : m' < n\nhq : q = trinomial k m' n (↑x) (-↑v) ↑z\nh1 : ↑y = -↑v\n⊢ q = p ∨ q = -p ∨ q = mirror p ∨ q = -mirror p\n[PROOFSTEP]\nrcases irreducible_aux3 hkm hmn hkm' hmn' (-u) (-v) (-w) x z hp hq hpq with (rfl | rfl)\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.inr.inl\np q : ℤ[X]\nh : ∀ (q : ℤ[X]), q ∣ p → q ∣ mirror p → IsUnit q\nk m n : ℕ\nhkm : k < m\nhmn : m < n\nu v w : ℤˣ\nhp✝ : p = ↑C ↑u * X ^ k + ↑C ↑v * X ^ m + ↑C ↑w * X ^ n\nhp : -p = ↑C (-↑u) * X ^ k + ↑C (-↑v) * X ^ m + ↑C (-↑w) * X ^ n\nm' : ℕ\nx y z : ℤˣ\nhkm' : k < m'\nhmn' : m' < n\nh1 : ↑y = -↑v\nhpq✝ : p * mirror p = -p * mirror (-p)\nhpq : -p * mirror (-p) = -p * mirror (-p)\nhq : -p = trinomial k m' n (↑x) (-↑v) ↑z\n⊢ -p = p ∨ -p = -p ∨ -p = mirror p ∨ -p = -mirror p\n[PROOFSTEP]\nexact Or.inr (Or.inl rfl)\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.inr.inr\np q : ℤ[X]\nh : ∀ (q : ℤ[X]), q ∣ p → q ∣ mirror p → IsUnit q\nk m n : ℕ\nhkm : k < m\nhmn : m < n\nu v w : ℤˣ\nhp✝ : p = ↑C ↑u * X ^ k + ↑C ↑v * X ^ m + ↑C ↑w * X ^ n\nhp : -p = ↑C (-↑u) * X ^ k + ↑C (-↑v) * X ^ m + ↑C (-↑w) * X ^ n\nm' : ℕ\nx y z : ℤˣ\nhkm' : k < m'\nhmn' : m' < n\nh1 : ↑y = -↑v\nhpq✝ : p * mirror p = mirror (-p) * mirror (mirror (-p))\nhpq : -p * mirror (-p) = mirror (-p) * mirror (mirror (-p))\nhq : mirror (-p) = trinomial k m' n (↑x) (-↑v) ↑z\n⊢ mirror (-p) = p ∨ mirror (-p) = -p ∨ mirror (-p) = mirror p ∨ mirror (-p) = -mirror p\n[PROOFSTEP]\nexact Or.inr (Or.inr (Or.inr p.mirror_neg))\n[GOAL]\np q : ℤ[X]\nhp : IsUnitTrinomial p\nh : ∀ (z : ℂ), ¬(↑(aeval z) p = 0 ∧ ↑(aeval z) (mirror p) = 0)\n⊢ Irreducible p\n[PROOFSTEP]\nrefine' hp.irreducible_of_coprime fun q hq hq' => _\n[GOAL]\np q✝ : ℤ[X]\nhp : IsUnitTrinomial p\nh : ∀ (z : ℂ), ¬(↑(aeval z) p = 0 ∧ ↑(aeval z) (mirror p) = 0)\nq : ℤ[X]\nhq : q ∣ p\nhq' : q ∣ mirror p\n⊢ IsUnit q\n[PROOFSTEP]\nsuffices ¬0 < q.natDegree by\n  rcases hq with ⟨p, rfl⟩\n  replace hp := hp.leadingCoeff_isUnit\n  rw [leadingCoeff_mul] at hp \n  replace hp := isUnit_of_mul_isUnit_left hp\n  rw [not_lt, le_zero_iff] at this \n  rwa [eq_C_of_natDegree_eq_zero this, isUnit_C, ← this]\n[GOAL]\np q✝ : ℤ[X]\nhp : IsUnitTrinomial p\nh : ∀ (z : ℂ), ¬(↑(aeval z) p = 0 ∧ ↑(aeval z) (mirror p) = 0)\nq : ℤ[X]\nhq : q ∣ p\nhq' : q ∣ mirror p\nthis : ¬0 < natDegree q\n⊢ IsUnit q\n[PROOFSTEP]\nrcases hq with ⟨p, rfl⟩\n[GOAL]\ncase intro\nq✝ q : ℤ[X]\nthis : ¬0 < natDegree q\np : ℤ[X]\nhp : IsUnitTrinomial (q * p)\nh : ∀ (z : ℂ), ¬(↑(aeval z) (q * p) = 0 ∧ ↑(aeval z) (mirror (q * p)) = 0)\nhq' : q ∣ mirror (q * p)\n⊢ IsUnit q\n[PROOFSTEP]\nreplace hp := hp.leadingCoeff_isUnit\n[GOAL]\ncase intro\nq✝ q : ℤ[X]\nthis : ¬0 < natDegree q\np : ℤ[X]\nh : ∀ (z : ℂ), ¬(↑(aeval z) (q * p) = 0 ∧ ↑(aeval z) (mirror (q * p)) = 0)\nhq' : q ∣ mirror (q * p)\nhp : IsUnit (leadingCoeff (q * p))\n⊢ IsUnit q\n[PROOFSTEP]\nrw [leadingCoeff_mul] at hp \n[GOAL]\ncase intro\nq✝ q : ℤ[X]\nthis : ¬0 < natDegree q\np : ℤ[X]\nh : ∀ (z : ℂ), ¬(↑(aeval z) (q * p) = 0 ∧ ↑(aeval z) (mirror (q * p)) = 0)\nhq' : q ∣ mirror (q * p)\nhp : IsUnit (leadingCoeff q * leadingCoeff p)\n⊢ IsUnit q\n[PROOFSTEP]\nreplace hp := isUnit_of_mul_isUnit_left hp\n[GOAL]\ncase intro\nq✝ q : ℤ[X]\nthis : ¬0 < natDegree q\np : ℤ[X]\nh : ∀ (z : ℂ), ¬(↑(aeval z) (q * p) = 0 ∧ ↑(aeval z) (mirror (q * p)) = 0)\nhq' : q ∣ mirror (q * p)\nhp : IsUnit (leadingCoeff q)\n⊢ IsUnit q\n[PROOFSTEP]\nrw [not_lt, le_zero_iff] at this \n[GOAL]\ncase intro\nq✝ q : ℤ[X]\nthis : natDegree q = 0\np : ℤ[X]\nh : ∀ (z : ℂ), ¬(↑(aeval z) (q * p) = 0 ∧ ↑(aeval z) (mirror (q * p)) = 0)\nhq' : q ∣ mirror (q * p)\nhp : IsUnit (leadingCoeff q)\n⊢ IsUnit q\n[PROOFSTEP]\nrwa [eq_C_of_natDegree_eq_zero this, isUnit_C, ← this]\n[GOAL]\np q✝ : ℤ[X]\nhp : IsUnitTrinomial p\nh : ∀ (z : ℂ), ¬(↑(aeval z) p = 0 ∧ ↑(aeval z) (mirror p) = 0)\nq : ℤ[X]\nhq : q ∣ p\nhq' : q ∣ mirror p\n⊢ ¬0 < natDegree q\n[PROOFSTEP]\nintro hq''\n[GOAL]\np q✝ : ℤ[X]\nhp : IsUnitTrinomial p\nh : ∀ (z : ℂ), ¬(↑(aeval z) p = 0 ∧ ↑(aeval z) (mirror p) = 0)\nq : ℤ[X]\nhq : q ∣ p\nhq' : q ∣ mirror p\nhq'' : 0 < natDegree q\n⊢ False\n[PROOFSTEP]\nrw [natDegree_pos_iff_degree_pos] at hq'' \n[GOAL]\np q✝ : ℤ[X]\nhp : IsUnitTrinomial p\nh : ∀ (z : ℂ), ¬(↑(aeval z) p = 0 ∧ ↑(aeval z) (mirror p) = 0)\nq : ℤ[X]\nhq : q ∣ p\nhq' : q ∣ mirror p\nhq'' : 0 < degree q\n⊢ False\n[PROOFSTEP]\nrw [← degree_map_eq_of_injective (algebraMap ℤ ℂ).injective_int] at hq'' \n[GOAL]\np q✝ : ℤ[X]\nhp : IsUnitTrinomial p\nh : ∀ (z : ℂ), ¬(↑(aeval z) p = 0 ∧ ↑(aeval z) (mirror p) = 0)\nq : ℤ[X]\nhq : q ∣ p\nhq' : q ∣ mirror p\nhq'' : 0 < degree (map (algebraMap ℤ ℂ) q)\n⊢ False\n[PROOFSTEP]\ncases' Complex.exists_root hq'' with z hz\n[GOAL]\ncase intro\np q✝ : ℤ[X]\nhp : IsUnitTrinomial p\nh : ∀ (z : ℂ), ¬(↑(aeval z) p = 0 ∧ ↑(aeval z) (mirror p) = 0)\nq : ℤ[X]\nhq : q ∣ p\nhq' : q ∣ mirror p\nhq'' : 0 < degree (map (algebraMap ℤ ℂ) q)\nz : ℂ\nhz : IsRoot (map (algebraMap ℤ ℂ) q) z\n⊢ False\n[PROOFSTEP]\nrw [IsRoot, eval_map, ← aeval_def] at hz \n[GOAL]\ncase intro\np q✝ : ℤ[X]\nhp : IsUnitTrinomial p\nh : ∀ (z : ℂ), ¬(↑(aeval z) p = 0 ∧ ↑(aeval z) (mirror p) = 0)\nq : ℤ[X]\nhq : q ∣ p\nhq' : q ∣ mirror p\nhq'' : 0 < degree (map (algebraMap ℤ ℂ) q)\nz : ℂ\nhz : ↑(aeval z) q = 0\n⊢ False\n[PROOFSTEP]\nrefine' h z ⟨_, _⟩\n[GOAL]\ncase intro.refine'_1\np q✝ : ℤ[X]\nhp : IsUnitTrinomial p\nh : ∀ (z : ℂ), ¬(↑(aeval z) p = 0 ∧ ↑(aeval z) (mirror p) = 0)\nq : ℤ[X]\nhq : q ∣ p\nhq' : q ∣ mirror p\nhq'' : 0 < degree (map (algebraMap ℤ ℂ) q)\nz : ℂ\nhz : ↑(aeval z) q = 0\n⊢ ↑(aeval z) p = 0\n[PROOFSTEP]\ncases' hq with g' hg'\n[GOAL]\ncase intro.refine'_1.intro\np q✝ : ℤ[X]\nhp : IsUnitTrinomial p\nh : ∀ (z : ℂ), ¬(↑(aeval z) p = 0 ∧ ↑(aeval z) (mirror p) = 0)\nq : ℤ[X]\nhq' : q ∣ mirror p\nhq'' : 0 < degree (map (algebraMap ℤ ℂ) q)\nz : ℂ\nhz : ↑(aeval z) q = 0\ng' : ℤ[X]\nhg' : p = q * g'\n⊢ ↑(aeval z) p = 0\n[PROOFSTEP]\nrw [hg', aeval_mul, hz, zero_mul]\n[GOAL]\ncase intro.refine'_2\np q✝ : ℤ[X]\nhp : IsUnitTrinomial p\nh : ∀ (z : ℂ), ¬(↑(aeval z) p = 0 ∧ ↑(aeval z) (mirror p) = 0)\nq : ℤ[X]\nhq : q ∣ p\nhq' : q ∣ mirror p\nhq'' : 0 < degree (map (algebraMap ℤ ℂ) q)\nz : ℂ\nhz : ↑(aeval z) q = 0\n⊢ ↑(aeval z) (mirror p) = 0\n[PROOFSTEP]\ncases' hq' with g' hg'\n[GOAL]\ncase intro.refine'_2.intro\np q✝ : ℤ[X]\nhp : IsUnitTrinomial p\nh : ∀ (z : ℂ), ¬(↑(aeval z) p = 0 ∧ ↑(aeval z) (mirror p) = 0)\nq : ℤ[X]\nhq : q ∣ p\nhq'' : 0 < degree (map (algebraMap ℤ ℂ) q)\nz : ℂ\nhz : ↑(aeval z) q = 0\ng' : ℤ[X]\nhg' : mirror p = q * g'\n⊢ ↑(aeval z) (mirror p) = 0\n[PROOFSTEP]\nrw [hg', aeval_mul, hz, zero_mul]\n", "meta": {"mathlib_filename": "Mathlib.Data.Polynomial.UnitTrinomial", "llama_tokens": 31675, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7606506526772883, "lm_q2_score": 0.6893056040203135, "lm_q1q2_score": 0.5243207575921639}}
{"text": "[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝⁴ : CommSemiring R\ninst✝³ : CommSemiring R₁\ninst✝² : CommSemiring R₂\ninst✝¹ : Fintype n\ninst✝ : Fintype m\nσ₁ : R₁ →+* R\nσ₂ : R₂ →+* R\nf : Matrix n m R\nx✝² x✝¹ : n → R₁\nx✝ : m → R₂\n⊢ (fun v w => ∑ i : n, ∑ j : m, ↑σ₁ (v i) * f i j * ↑σ₂ (w j)) (x✝² + x✝¹) x✝ =\n    (fun v w => ∑ i : n, ∑ j : m, ↑σ₁ (v i) * f i j * ↑σ₂ (w j)) x✝² x✝ +\n      (fun v w => ∑ i : n, ∑ j : m, ↑σ₁ (v i) * f i j * ↑σ₂ (w j)) x✝¹ x✝\n[PROOFSTEP]\nsimp only [Pi.add_apply, map_add, add_mul, sum_add_distrib]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝⁴ : CommSemiring R\ninst✝³ : CommSemiring R₁\ninst✝² : CommSemiring R₂\ninst✝¹ : Fintype n\ninst✝ : Fintype m\nσ₁ : R₁ →+* R\nσ₂ : R₂ →+* R\nf : Matrix n m R\nx✝² : R₁\nx✝¹ : n → R₁\nx✝ : m → R₂\n⊢ (fun v w => ∑ i : n, ∑ j : m, ↑σ₁ (v i) * f i j * ↑σ₂ (w j)) (x✝² • x✝¹) x✝ =\n    ↑σ₁ x✝² • (fun v w => ∑ i : n, ∑ j : m, ↑σ₁ (v i) * f i j * ↑σ₂ (w j)) x✝¹ x✝\n[PROOFSTEP]\nsimp only [Pi.smul_apply, smul_eq_mul, RingHom.map_mul, mul_assoc, mul_sum]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝⁴ : CommSemiring R\ninst✝³ : CommSemiring R₁\ninst✝² : CommSemiring R₂\ninst✝¹ : Fintype n\ninst✝ : Fintype m\nσ₁ : R₁ →+* R\nσ₂ : R₂ →+* R\nf : Matrix n m R\nx✝² : n → R₁\nx✝¹ x✝ : m → R₂\n⊢ (fun v w => ∑ i : n, ∑ j : m, ↑σ₁ (v i) * f i j * ↑σ₂ (w j)) x✝² (x✝¹ + x✝) =\n    (fun v w => ∑ i : n, ∑ j : m, ↑σ₁ (v i) * f i j * ↑σ₂ (w j)) x✝² x✝¹ +\n      (fun v w => ∑ i : n, ∑ j : m, ↑σ₁ (v i) * f i j * ↑σ₂ (w j)) x✝² x✝\n[PROOFSTEP]\nsimp only [Pi.add_apply, map_add, mul_add, sum_add_distrib]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝⁴ : CommSemiring R\ninst✝³ : CommSemiring R₁\ninst✝² : CommSemiring R₂\ninst✝¹ : Fintype n\ninst✝ : Fintype m\nσ₁ : R₁ →+* R\nσ₂ : R₂ →+* R\nf : Matrix n m R\nx✝² : R₂\nx✝¹ : n → R₁\nx✝ : m → R₂\n⊢ (fun v w => ∑ i : n, ∑ j : m, ↑σ₁ (v i) * f i j * ↑σ₂ (w j)) x✝¹ (x✝² • x✝) =\n    ↑σ₂ x✝² • (fun v w => ∑ i : n, ∑ j : m, ↑σ₁ (v i) * f i j * ↑σ₂ (w j)) x✝¹ x✝\n[PROOFSTEP]\nsimp only [Pi.smul_apply, smul_eq_mul, RingHom.map_mul, mul_assoc, mul_left_comm, mul_sum]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝⁶ : CommSemiring R\ninst✝⁵ : CommSemiring R₁\ninst✝⁴ : CommSemiring R₂\ninst✝³ : Fintype n\ninst✝² : Fintype m\nσ₁ : R₁ →+* R\nσ₂ : R₂ →+* R\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq m\nf : Matrix n m R\ni : n\nj : m\n⊢ ↑(↑(toLinearMap₂'Aux σ₁ σ₂ f) (↑(LinearMap.stdBasis R₁ (fun x => R₁) i) 1))\n      (↑(LinearMap.stdBasis R₂ (fun x => R₂) j) 1) =\n    f i j\n[PROOFSTEP]\nrw [Matrix.toLinearMap₂'Aux, mk₂'ₛₗ_apply]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝⁶ : CommSemiring R\ninst✝⁵ : CommSemiring R₁\ninst✝⁴ : CommSemiring R₂\ninst✝³ : Fintype n\ninst✝² : Fintype m\nσ₁ : R₁ →+* R\nσ₂ : R₂ →+* R\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq m\nf : Matrix n m R\ni : n\nj : m\n⊢ ∑ i_1 : n,\n      ∑ j_1 : m,\n        ↑σ₁ (↑(LinearMap.stdBasis R₁ (fun x => R₁) i) 1 i_1) * f i_1 j_1 *\n          ↑σ₂ (↑(LinearMap.stdBasis R₂ (fun x => R₂) j) 1 j_1) =\n    f i j\n[PROOFSTEP]\nhave : (∑ i', ∑ j', (if i = i' then 1 else 0) * f i' j' * if j = j' then 1 else 0) = f i j :=\n  by\n  simp_rw [mul_assoc, ← Finset.mul_sum]\n  simp only [boole_mul, Finset.sum_ite_eq, Finset.mem_univ, if_true, mul_comm (f _ _)]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝⁶ : CommSemiring R\ninst✝⁵ : CommSemiring R₁\ninst✝⁴ : CommSemiring R₂\ninst✝³ : Fintype n\ninst✝² : Fintype m\nσ₁ : R₁ →+* R\nσ₂ : R₂ →+* R\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq m\nf : Matrix n m R\ni : n\nj : m\n⊢ (∑ i' : n, ∑ j' : m, (if i = i' then 1 else 0) * f i' j' * if j = j' then 1 else 0) = f i j\n[PROOFSTEP]\nsimp_rw [mul_assoc, ← Finset.mul_sum]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝⁶ : CommSemiring R\ninst✝⁵ : CommSemiring R₁\ninst✝⁴ : CommSemiring R₂\ninst✝³ : Fintype n\ninst✝² : Fintype m\nσ₁ : R₁ →+* R\nσ₂ : R₂ →+* R\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq m\nf : Matrix n m R\ni : n\nj : m\n⊢ (∑ x : n, (if i = x then 1 else 0) * ∑ x_1 : m, f x x_1 * if j = x_1 then 1 else 0) = f i j\n[PROOFSTEP]\nsimp only [boole_mul, Finset.sum_ite_eq, Finset.mem_univ, if_true, mul_comm (f _ _)]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝⁶ : CommSemiring R\ninst✝⁵ : CommSemiring R₁\ninst✝⁴ : CommSemiring R₂\ninst✝³ : Fintype n\ninst✝² : Fintype m\nσ₁ : R₁ →+* R\nσ₂ : R₂ →+* R\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq m\nf : Matrix n m R\ni : n\nj : m\nthis : (∑ i' : n, ∑ j' : m, (if i = i' then 1 else 0) * f i' j' * if j = j' then 1 else 0) = f i j\n⊢ ∑ i_1 : n,\n      ∑ j_1 : m,\n        ↑σ₁ (↑(LinearMap.stdBasis R₁ (fun x => R₁) i) 1 i_1) * f i_1 j_1 *\n          ↑σ₂ (↑(LinearMap.stdBasis R₂ (fun x => R₂) j) 1 j_1) =\n    f i j\n[PROOFSTEP]\nrw [← this]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝⁶ : CommSemiring R\ninst✝⁵ : CommSemiring R₁\ninst✝⁴ : CommSemiring R₂\ninst✝³ : Fintype n\ninst✝² : Fintype m\nσ₁ : R₁ →+* R\nσ₂ : R₂ →+* R\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq m\nf : Matrix n m R\ni : n\nj : m\nthis : (∑ i' : n, ∑ j' : m, (if i = i' then 1 else 0) * f i' j' * if j = j' then 1 else 0) = f i j\n⊢ ∑ i_1 : n,\n      ∑ j_1 : m,\n        ↑σ₁ (↑(LinearMap.stdBasis R₁ (fun x => R₁) i) 1 i_1) * f i_1 j_1 *\n          ↑σ₂ (↑(LinearMap.stdBasis R₂ (fun x => R₂) j) 1 j_1) =\n    ∑ i' : n, ∑ j' : m, (if i = i' then 1 else 0) * f i' j' * if j = j' then 1 else 0\n[PROOFSTEP]\nexact Finset.sum_congr rfl fun _ _ => Finset.sum_congr rfl fun _ _ => by simp\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝⁶ : CommSemiring R\ninst✝⁵ : CommSemiring R₁\ninst✝⁴ : CommSemiring R₂\ninst✝³ : Fintype n\ninst✝² : Fintype m\nσ₁ : R₁ →+* R\nσ₂ : R₂ →+* R\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq m\nf : Matrix n m R\ni : n\nj : m\nthis : (∑ i' : n, ∑ j' : m, (if i = i' then 1 else 0) * f i' j' * if j = j' then 1 else 0) = f i j\nx✝³ : n\nx✝² : x✝³ ∈ univ\nx✝¹ : m\nx✝ : x✝¹ ∈ univ\n⊢ ↑σ₁ (↑(LinearMap.stdBasis R₁ (fun x => R₁) i) 1 x✝³) * f x✝³ x✝¹ *\n      ↑σ₂ (↑(LinearMap.stdBasis R₂ (fun x => R₂) j) 1 x✝¹) =\n    (if i = x✝³ then 1 else 0) * f x✝³ x✝¹ * if j = x✝¹ then 1 else 0\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing R₁\ninst✝⁸ : CommRing R₂\ninst✝⁷ : AddCommMonoid M₁\ninst✝⁶ : Module R₁ M₁\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : Module R₂ M₂\ninst✝³ : Fintype n\ninst✝² : Fintype m\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq m\nσ₁ : R₁ →+* R\nσ₂ : R₂ →+* R\nf : (n → R₁) →ₛₗ[σ₁] (m → R₂) →ₛₗ[σ₂] R\n⊢ toLinearMap₂'Aux σ₁ σ₂\n      (↑(toMatrix₂Aux (fun i => ↑(stdBasis R₁ (fun x => R₁) i) 1) fun j => ↑(stdBasis R₂ (fun x => R₂) j) 1) f) =\n    f\n[PROOFSTEP]\nrefine' ext_basis (Pi.basisFun R₁ n) (Pi.basisFun R₂ m) fun i j => _\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing R₁\ninst✝⁸ : CommRing R₂\ninst✝⁷ : AddCommMonoid M₁\ninst✝⁶ : Module R₁ M₁\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : Module R₂ M₂\ninst✝³ : Fintype n\ninst✝² : Fintype m\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq m\nσ₁ : R₁ →+* R\nσ₂ : R₂ →+* R\nf : (n → R₁) →ₛₗ[σ₁] (m → R₂) →ₛₗ[σ₂] R\ni : n\nj : m\n⊢ ↑(↑(toLinearMap₂'Aux σ₁ σ₂\n              (↑(toMatrix₂Aux (fun i => ↑(stdBasis R₁ (fun x => R₁) i) 1) fun j => ↑(stdBasis R₂ (fun x => R₂) j) 1) f))\n          (↑(Pi.basisFun R₁ n) i))\n      (↑(Pi.basisFun R₂ m) j) =\n    ↑(↑f (↑(Pi.basisFun R₁ n) i)) (↑(Pi.basisFun R₂ m) j)\n[PROOFSTEP]\nsimp_rw [Pi.basisFun_apply, Matrix.toLinearMap₂'Aux_stdBasis, LinearMap.toMatrix₂Aux_apply]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing R₁\ninst✝⁸ : CommRing R₂\ninst✝⁷ : AddCommMonoid M₁\ninst✝⁶ : Module R₁ M₁\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : Module R₂ M₂\ninst✝³ : Fintype n\ninst✝² : Fintype m\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq m\nσ₁ : R₁ →+* R\nσ₂ : R₂ →+* R\nf : Matrix n m R\n⊢ ↑(toMatrix₂Aux (fun i => ↑(LinearMap.stdBasis R₁ (fun x => R₁) i) 1) fun j =>\n          ↑(LinearMap.stdBasis R₂ (fun x => R₂) j) 1)\n      (toLinearMap₂'Aux σ₁ σ₂ f) =\n    f\n[PROOFSTEP]\next i j\n[GOAL]\ncase a.h\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing R₁\ninst✝⁸ : CommRing R₂\ninst✝⁷ : AddCommMonoid M₁\ninst✝⁶ : Module R₁ M₁\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : Module R₂ M₂\ninst✝³ : Fintype n\ninst✝² : Fintype m\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq m\nσ₁ : R₁ →+* R\nσ₂ : R₂ →+* R\nf : Matrix n m R\ni : n\nj : m\n⊢ ↑(toMatrix₂Aux (fun i => ↑(LinearMap.stdBasis R₁ (fun x => R₁) i) 1) fun j =>\n          ↑(LinearMap.stdBasis R₂ (fun x => R₂) j) 1)\n      (toLinearMap₂'Aux σ₁ σ₂ f) i j =\n    f i j\n[PROOFSTEP]\nsimp_rw [LinearMap.toMatrix₂Aux_apply, Matrix.toLinearMap₂'Aux_stdBasis]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM✝ : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing R₁\ninst✝⁴ : CommRing R₂\ninst✝³ : Fintype n\ninst✝² : Fintype m\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq m\nσ₁ : R₁ →+* R\nσ₂ : R₂ →+* R\nM : Matrix n m R\nv : n → R\nw : m → R\n⊢ ↑(↑(↑toLinearMap₂' M) v) w = v ⬝ᵥ mulVec M w\n[PROOFSTEP]\nsimp_rw [Matrix.toLinearMap₂'_apply, Matrix.dotProduct, Matrix.mulVec, Matrix.dotProduct]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM✝ : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing R₁\ninst✝⁴ : CommRing R₂\ninst✝³ : Fintype n\ninst✝² : Fintype m\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq m\nσ₁ : R₁ →+* R\nσ₂ : R₂ →+* R\nM : Matrix n m R\nv : n → R\nw : m → R\n⊢ ∑ i : n, ∑ j : m, v i * M i j * w j = ∑ x : n, v x * ∑ x_1 : m, M x x_1 * w x_1\n[PROOFSTEP]\nrefine' Finset.sum_congr rfl fun _ _ => _\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM✝ : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing R₁\ninst✝⁴ : CommRing R₂\ninst✝³ : Fintype n\ninst✝² : Fintype m\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq m\nσ₁ : R₁ →+* R\nσ₂ : R₂ →+* R\nM : Matrix n m R\nv : n → R\nw : m → R\nx✝¹ : n\nx✝ : x✝¹ ∈ univ\n⊢ ∑ j : m, v x✝¹ * M x✝¹ j * w j = v x✝¹ * ∑ x : m, M x✝¹ x * w x\n[PROOFSTEP]\nrw [Finset.mul_sum]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM✝ : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing R₁\ninst✝⁴ : CommRing R₂\ninst✝³ : Fintype n\ninst✝² : Fintype m\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq m\nσ₁ : R₁ →+* R\nσ₂ : R₂ →+* R\nM : Matrix n m R\nv : n → R\nw : m → R\nx✝¹ : n\nx✝ : x✝¹ ∈ univ\n⊢ ∑ j : m, v x✝¹ * M x✝¹ j * w j = ∑ x : m, v x✝¹ * (M x✝¹ x * w x)\n[PROOFSTEP]\nrefine' Finset.sum_congr rfl fun _ _ => _\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM✝ : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing R₁\ninst✝⁴ : CommRing R₂\ninst✝³ : Fintype n\ninst✝² : Fintype m\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq m\nσ₁ : R₁ →+* R\nσ₂ : R₂ →+* R\nM : Matrix n m R\nv : n → R\nw : m → R\nx✝³ : n\nx✝² : x✝³ ∈ univ\nx✝¹ : m\nx✝ : x✝¹ ∈ univ\n⊢ v x✝³ * M x✝³ x✝¹ * w x✝¹ = v x✝³ * (M x✝³ x✝¹ * w x✝¹)\n[PROOFSTEP]\nrw [← mul_assoc]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing R₁\ninst✝⁸ : CommRing R₂\ninst✝⁷ : Fintype n\ninst✝⁶ : Fintype m\ninst✝⁵ : DecidableEq n\ninst✝⁴ : DecidableEq m\nσ₁ : R₁ →+* R\nσ₂ : R₂ →+* R\ninst✝³ : Fintype n'\ninst✝² : Fintype m'\ninst✝¹ : DecidableEq n'\ninst✝ : DecidableEq m'\nB : (n → R) →ₗ[R] (m → R) →ₗ[R] R\nl : (n' → R) →ₗ[R] n → R\nr : (m' → R) →ₗ[R] m → R\n⊢ ↑toMatrix₂' (compl₁₂ B l r) = (↑toMatrix' l)ᵀ * ↑toMatrix₂' B * ↑toMatrix' r\n[PROOFSTEP]\next i j\n[GOAL]\ncase a.h\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing R₁\ninst✝⁸ : CommRing R₂\ninst✝⁷ : Fintype n\ninst✝⁶ : Fintype m\ninst✝⁵ : DecidableEq n\ninst✝⁴ : DecidableEq m\nσ₁ : R₁ →+* R\nσ₂ : R₂ →+* R\ninst✝³ : Fintype n'\ninst✝² : Fintype m'\ninst✝¹ : DecidableEq n'\ninst✝ : DecidableEq m'\nB : (n → R) →ₗ[R] (m → R) →ₗ[R] R\nl : (n' → R) →ₗ[R] n → R\nr : (m' → R) →ₗ[R] m → R\ni : n'\nj : m'\n⊢ ↑toMatrix₂' (compl₁₂ B l r) i j = ((↑toMatrix' l)ᵀ * ↑toMatrix₂' B * ↑toMatrix' r) i j\n[PROOFSTEP]\nsimp only [LinearMap.toMatrix₂'_apply, LinearMap.compl₁₂_apply, transpose_apply, Matrix.mul_apply, LinearMap.toMatrix',\n  LinearEquiv.coe_mk, sum_mul]\n[GOAL]\ncase a.h\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing R₁\ninst✝⁸ : CommRing R₂\ninst✝⁷ : Fintype n\ninst✝⁶ : Fintype m\ninst✝⁵ : DecidableEq n\ninst✝⁴ : DecidableEq m\nσ₁ : R₁ →+* R\nσ₂ : R₂ →+* R\ninst✝³ : Fintype n'\ninst✝² : Fintype m'\ninst✝¹ : DecidableEq n'\ninst✝ : DecidableEq m'\nB : (n → R) →ₗ[R] (m → R) →ₗ[R] R\nl : (n' → R) →ₗ[R] n → R\nr : (m' → R) →ₗ[R] m → R\ni : n'\nj : m'\n⊢ ↑(↑B (↑l (↑(stdBasis R (fun x => R) i) 1))) (↑r (↑(stdBasis R (fun x => R) j) 1)) =\n    ∑ x : m,\n      ∑ x_1 : n,\n        ↑of (fun i j => ↑l (↑(stdBasis R (fun x => R) j) 1) i) x_1 i *\n            ↑(↑B (↑(stdBasis R (fun x => R) x_1) 1)) (↑(stdBasis R (fun x => R) x) 1) *\n          ↑of (fun i j => ↑r (↑(stdBasis R (fun x => R) j) 1) i) x j\n[PROOFSTEP]\nrw [sum_comm]\n[GOAL]\ncase a.h\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing R₁\ninst✝⁸ : CommRing R₂\ninst✝⁷ : Fintype n\ninst✝⁶ : Fintype m\ninst✝⁵ : DecidableEq n\ninst✝⁴ : DecidableEq m\nσ₁ : R₁ →+* R\nσ₂ : R₂ →+* R\ninst✝³ : Fintype n'\ninst✝² : Fintype m'\ninst✝¹ : DecidableEq n'\ninst✝ : DecidableEq m'\nB : (n → R) →ₗ[R] (m → R) →ₗ[R] R\nl : (n' → R) →ₗ[R] n → R\nr : (m' → R) →ₗ[R] m → R\ni : n'\nj : m'\n⊢ ↑(↑B (↑l (↑(stdBasis R (fun x => R) i) 1))) (↑r (↑(stdBasis R (fun x => R) j) 1)) =\n    ∑ y : n,\n      ∑ x : m,\n        ↑of (fun i j => ↑l (↑(stdBasis R (fun x => R) j) 1) i) y i *\n            ↑(↑B (↑(stdBasis R (fun x => R) y) 1)) (↑(stdBasis R (fun x => R) x) 1) *\n          ↑of (fun i j => ↑r (↑(stdBasis R (fun x => R) j) 1) i) x j\n[PROOFSTEP]\nconv_lhs => rw [← LinearMap.sum_repr_mul_repr_mul (Pi.basisFun R n) (Pi.basisFun R m) (l _) (r _)]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing R₁\ninst✝⁸ : CommRing R₂\ninst✝⁷ : Fintype n\ninst✝⁶ : Fintype m\ninst✝⁵ : DecidableEq n\ninst✝⁴ : DecidableEq m\nσ₁ : R₁ →+* R\nσ₂ : R₂ →+* R\ninst✝³ : Fintype n'\ninst✝² : Fintype m'\ninst✝¹ : DecidableEq n'\ninst✝ : DecidableEq m'\nB : (n → R) →ₗ[R] (m → R) →ₗ[R] R\nl : (n' → R) →ₗ[R] n → R\nr : (m' → R) →ₗ[R] m → R\ni : n'\nj : m'\n| ↑(↑B (↑l (↑(stdBasis R (fun x => R) i) 1))) (↑r (↑(stdBasis R (fun x => R) j) 1))\n[PROOFSTEP]\nrw [← LinearMap.sum_repr_mul_repr_mul (Pi.basisFun R n) (Pi.basisFun R m) (l _) (r _)]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing R₁\ninst✝⁸ : CommRing R₂\ninst✝⁷ : Fintype n\ninst✝⁶ : Fintype m\ninst✝⁵ : DecidableEq n\ninst✝⁴ : DecidableEq m\nσ₁ : R₁ →+* R\nσ₂ : R₂ →+* R\ninst✝³ : Fintype n'\ninst✝² : Fintype m'\ninst✝¹ : DecidableEq n'\ninst✝ : DecidableEq m'\nB : (n → R) →ₗ[R] (m → R) →ₗ[R] R\nl : (n' → R) →ₗ[R] n → R\nr : (m' → R) →ₗ[R] m → R\ni : n'\nj : m'\n| ↑(↑B (↑l (↑(stdBasis R (fun x => R) i) 1))) (↑r (↑(stdBasis R (fun x => R) j) 1))\n[PROOFSTEP]\nrw [← LinearMap.sum_repr_mul_repr_mul (Pi.basisFun R n) (Pi.basisFun R m) (l _) (r _)]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing R₁\ninst✝⁸ : CommRing R₂\ninst✝⁷ : Fintype n\ninst✝⁶ : Fintype m\ninst✝⁵ : DecidableEq n\ninst✝⁴ : DecidableEq m\nσ₁ : R₁ →+* R\nσ₂ : R₂ →+* R\ninst✝³ : Fintype n'\ninst✝² : Fintype m'\ninst✝¹ : DecidableEq n'\ninst✝ : DecidableEq m'\nB : (n → R) →ₗ[R] (m → R) →ₗ[R] R\nl : (n' → R) →ₗ[R] n → R\nr : (m' → R) →ₗ[R] m → R\ni : n'\nj : m'\n| ↑(↑B (↑l (↑(stdBasis R (fun x => R) i) 1))) (↑r (↑(stdBasis R (fun x => R) j) 1))\n[PROOFSTEP]\nrw [← LinearMap.sum_repr_mul_repr_mul (Pi.basisFun R n) (Pi.basisFun R m) (l _) (r _)]\n[GOAL]\ncase a.h\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing R₁\ninst✝⁸ : CommRing R₂\ninst✝⁷ : Fintype n\ninst✝⁶ : Fintype m\ninst✝⁵ : DecidableEq n\ninst✝⁴ : DecidableEq m\nσ₁ : R₁ →+* R\nσ₂ : R₂ →+* R\ninst✝³ : Fintype n'\ninst✝² : Fintype m'\ninst✝¹ : DecidableEq n'\ninst✝ : DecidableEq m'\nB : (n → R) →ₗ[R] (m → R) →ₗ[R] R\nl : (n' → R) →ₗ[R] n → R\nr : (m' → R) →ₗ[R] m → R\ni : n'\nj : m'\n⊢ (Finsupp.sum (↑(Pi.basisFun R n).repr (↑l (↑(stdBasis R (fun x => R) i) 1))) fun i xi =>\n      Finsupp.sum (↑(Pi.basisFun R m).repr (↑r (↑(stdBasis R (fun x => R) j) 1))) fun j yj =>\n        xi • yj • ↑(↑B (↑(Pi.basisFun R n) i)) (↑(Pi.basisFun R m) j)) =\n    ∑ y : n,\n      ∑ x : m,\n        ↑of (fun i j => ↑l (↑(stdBasis R (fun x => R) j) 1) i) y i *\n            ↑(↑B (↑(stdBasis R (fun x => R) y) 1)) (↑(stdBasis R (fun x => R) x) 1) *\n          ↑of (fun i j => ↑r (↑(stdBasis R (fun x => R) j) 1) i) x j\n[PROOFSTEP]\nrw [Finsupp.sum_fintype]\n[GOAL]\ncase a.h\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing R₁\ninst✝⁸ : CommRing R₂\ninst✝⁷ : Fintype n\ninst✝⁶ : Fintype m\ninst✝⁵ : DecidableEq n\ninst✝⁴ : DecidableEq m\nσ₁ : R₁ →+* R\nσ₂ : R₂ →+* R\ninst✝³ : Fintype n'\ninst✝² : Fintype m'\ninst✝¹ : DecidableEq n'\ninst✝ : DecidableEq m'\nB : (n → R) →ₗ[R] (m → R) →ₗ[R] R\nl : (n' → R) →ₗ[R] n → R\nr : (m' → R) →ₗ[R] m → R\ni : n'\nj : m'\n⊢ (∑ i_1 : n,\n      Finsupp.sum (↑(Pi.basisFun R m).repr (↑r (↑(stdBasis R (fun x => R) j) 1))) fun j yj =>\n        ↑(↑(Pi.basisFun R n).repr (↑l (↑(stdBasis R (fun x => R) i) 1))) i_1 •\n          yj • ↑(↑B (↑(Pi.basisFun R n) i_1)) (↑(Pi.basisFun R m) j)) =\n    ∑ y : n,\n      ∑ x : m,\n        ↑of (fun i j => ↑l (↑(stdBasis R (fun x => R) j) 1) i) y i *\n            ↑(↑B (↑(stdBasis R (fun x => R) y) 1)) (↑(stdBasis R (fun x => R) x) 1) *\n          ↑of (fun i j => ↑r (↑(stdBasis R (fun x => R) j) 1) i) x j\n[PROOFSTEP]\napply sum_congr rfl\n[GOAL]\ncase a.h\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing R₁\ninst✝⁸ : CommRing R₂\ninst✝⁷ : Fintype n\ninst✝⁶ : Fintype m\ninst✝⁵ : DecidableEq n\ninst✝⁴ : DecidableEq m\nσ₁ : R₁ →+* R\nσ₂ : R₂ →+* R\ninst✝³ : Fintype n'\ninst✝² : Fintype m'\ninst✝¹ : DecidableEq n'\ninst✝ : DecidableEq m'\nB : (n → R) →ₗ[R] (m → R) →ₗ[R] R\nl : (n' → R) →ₗ[R] n → R\nr : (m' → R) →ₗ[R] m → R\ni : n'\nj : m'\n⊢ ∀ (x : n),\n    x ∈ univ →\n      (Finsupp.sum (↑(Pi.basisFun R m).repr (↑r (↑(stdBasis R (fun x => R) j) 1))) fun j yj =>\n          ↑(↑(Pi.basisFun R n).repr (↑l (↑(stdBasis R (fun x => R) i) 1))) x •\n            yj • ↑(↑B (↑(Pi.basisFun R n) x)) (↑(Pi.basisFun R m) j)) =\n        ∑ x_1 : m,\n          ↑of (fun i j => ↑l (↑(stdBasis R (fun x => R) j) 1) i) x i *\n              ↑(↑B (↑(stdBasis R (fun x => R) x) 1)) (↑(stdBasis R (fun x => R) x_1) 1) *\n            ↑of (fun i j => ↑r (↑(stdBasis R (fun x => R) j) 1) i) x_1 j\n[PROOFSTEP]\nrintro i' -\n[GOAL]\ncase a.h\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing R₁\ninst✝⁸ : CommRing R₂\ninst✝⁷ : Fintype n\ninst✝⁶ : Fintype m\ninst✝⁵ : DecidableEq n\ninst✝⁴ : DecidableEq m\nσ₁ : R₁ →+* R\nσ₂ : R₂ →+* R\ninst✝³ : Fintype n'\ninst✝² : Fintype m'\ninst✝¹ : DecidableEq n'\ninst✝ : DecidableEq m'\nB : (n → R) →ₗ[R] (m → R) →ₗ[R] R\nl : (n' → R) →ₗ[R] n → R\nr : (m' → R) →ₗ[R] m → R\ni : n'\nj : m'\ni' : n\n⊢ (Finsupp.sum (↑(Pi.basisFun R m).repr (↑r (↑(stdBasis R (fun x => R) j) 1))) fun j yj =>\n      ↑(↑(Pi.basisFun R n).repr (↑l (↑(stdBasis R (fun x => R) i) 1))) i' •\n        yj • ↑(↑B (↑(Pi.basisFun R n) i')) (↑(Pi.basisFun R m) j)) =\n    ∑ x : m,\n      ↑of (fun i j => ↑l (↑(stdBasis R (fun x => R) j) 1) i) i' i *\n          ↑(↑B (↑(stdBasis R (fun x => R) i') 1)) (↑(stdBasis R (fun x => R) x) 1) *\n        ↑of (fun i j => ↑r (↑(stdBasis R (fun x => R) j) 1) i) x j\n[PROOFSTEP]\nrw [Finsupp.sum_fintype]\n[GOAL]\ncase a.h\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing R₁\ninst✝⁸ : CommRing R₂\ninst✝⁷ : Fintype n\ninst✝⁶ : Fintype m\ninst✝⁵ : DecidableEq n\ninst✝⁴ : DecidableEq m\nσ₁ : R₁ →+* R\nσ₂ : R₂ →+* R\ninst✝³ : Fintype n'\ninst✝² : Fintype m'\ninst✝¹ : DecidableEq n'\ninst✝ : DecidableEq m'\nB : (n → R) →ₗ[R] (m → R) →ₗ[R] R\nl : (n' → R) →ₗ[R] n → R\nr : (m' → R) →ₗ[R] m → R\ni : n'\nj : m'\ni' : n\n⊢ ∑ i_1 : m,\n      ↑(↑(Pi.basisFun R n).repr (↑l (↑(stdBasis R (fun x => R) i) 1))) i' •\n        ↑(↑(Pi.basisFun R m).repr (↑r (↑(stdBasis R (fun x => R) j) 1))) i_1 •\n          ↑(↑B (↑(Pi.basisFun R n) i')) (↑(Pi.basisFun R m) i_1) =\n    ∑ x : m,\n      ↑of (fun i j => ↑l (↑(stdBasis R (fun x => R) j) 1) i) i' i *\n          ↑(↑B (↑(stdBasis R (fun x => R) i') 1)) (↑(stdBasis R (fun x => R) x) 1) *\n        ↑of (fun i j => ↑r (↑(stdBasis R (fun x => R) j) 1) i) x j\n[PROOFSTEP]\napply sum_congr rfl\n[GOAL]\ncase a.h\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing R₁\ninst✝⁸ : CommRing R₂\ninst✝⁷ : Fintype n\ninst✝⁶ : Fintype m\ninst✝⁵ : DecidableEq n\ninst✝⁴ : DecidableEq m\nσ₁ : R₁ →+* R\nσ₂ : R₂ →+* R\ninst✝³ : Fintype n'\ninst✝² : Fintype m'\ninst✝¹ : DecidableEq n'\ninst✝ : DecidableEq m'\nB : (n → R) →ₗ[R] (m → R) →ₗ[R] R\nl : (n' → R) →ₗ[R] n → R\nr : (m' → R) →ₗ[R] m → R\ni : n'\nj : m'\ni' : n\n⊢ ∀ (x : m),\n    x ∈ univ →\n      ↑(↑(Pi.basisFun R n).repr (↑l (↑(stdBasis R (fun x => R) i) 1))) i' •\n          ↑(↑(Pi.basisFun R m).repr (↑r (↑(stdBasis R (fun x => R) j) 1))) x •\n            ↑(↑B (↑(Pi.basisFun R n) i')) (↑(Pi.basisFun R m) x) =\n        ↑of (fun i j => ↑l (↑(stdBasis R (fun x => R) j) 1) i) i' i *\n            ↑(↑B (↑(stdBasis R (fun x => R) i') 1)) (↑(stdBasis R (fun x => R) x) 1) *\n          ↑of (fun i j => ↑r (↑(stdBasis R (fun x => R) j) 1) i) x j\n[PROOFSTEP]\nrintro j' -\n[GOAL]\ncase a.h\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing R₁\ninst✝⁸ : CommRing R₂\ninst✝⁷ : Fintype n\ninst✝⁶ : Fintype m\ninst✝⁵ : DecidableEq n\ninst✝⁴ : DecidableEq m\nσ₁ : R₁ →+* R\nσ₂ : R₂ →+* R\ninst✝³ : Fintype n'\ninst✝² : Fintype m'\ninst✝¹ : DecidableEq n'\ninst✝ : DecidableEq m'\nB : (n → R) →ₗ[R] (m → R) →ₗ[R] R\nl : (n' → R) →ₗ[R] n → R\nr : (m' → R) →ₗ[R] m → R\ni : n'\nj : m'\ni' : n\nj' : m\n⊢ ↑(↑(Pi.basisFun R n).repr (↑l (↑(stdBasis R (fun x => R) i) 1))) i' •\n      ↑(↑(Pi.basisFun R m).repr (↑r (↑(stdBasis R (fun x => R) j) 1))) j' •\n        ↑(↑B (↑(Pi.basisFun R n) i')) (↑(Pi.basisFun R m) j') =\n    ↑of (fun i j => ↑l (↑(stdBasis R (fun x => R) j) 1) i) i' i *\n        ↑(↑B (↑(stdBasis R (fun x => R) i') 1)) (↑(stdBasis R (fun x => R) j') 1) *\n      ↑of (fun i j => ↑r (↑(stdBasis R (fun x => R) j) 1) i) j' j\n[PROOFSTEP]\nsimp only [smul_eq_mul, Pi.basisFun_repr, mul_assoc, mul_comm, mul_left_comm, Pi.basisFun_apply, of_apply]\n[GOAL]\ncase a.h.h\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing R₁\ninst✝⁸ : CommRing R₂\ninst✝⁷ : Fintype n\ninst✝⁶ : Fintype m\ninst✝⁵ : DecidableEq n\ninst✝⁴ : DecidableEq m\nσ₁ : R₁ →+* R\nσ₂ : R₂ →+* R\ninst✝³ : Fintype n'\ninst✝² : Fintype m'\ninst✝¹ : DecidableEq n'\ninst✝ : DecidableEq m'\nB : (n → R) →ₗ[R] (m → R) →ₗ[R] R\nl : (n' → R) →ₗ[R] n → R\nr : (m' → R) →ₗ[R] m → R\ni : n'\nj : m'\ni' : n\n⊢ ∀ (i_1 : m),\n    ↑(↑(Pi.basisFun R n).repr (↑l (↑(stdBasis R (fun x => R) i) 1))) i' •\n        0 • ↑(↑B (↑(Pi.basisFun R n) i')) (↑(Pi.basisFun R m) i_1) =\n      0\n[PROOFSTEP]\nintros\n[GOAL]\ncase a.h.h\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing R₁\ninst✝⁸ : CommRing R₂\ninst✝⁷ : Fintype n\ninst✝⁶ : Fintype m\ninst✝⁵ : DecidableEq n\ninst✝⁴ : DecidableEq m\nσ₁ : R₁ →+* R\nσ₂ : R₂ →+* R\ninst✝³ : Fintype n'\ninst✝² : Fintype m'\ninst✝¹ : DecidableEq n'\ninst✝ : DecidableEq m'\nB : (n → R) →ₗ[R] (m → R) →ₗ[R] R\nl : (n' → R) →ₗ[R] n → R\nr : (m' → R) →ₗ[R] m → R\ni : n'\nj : m'\ni' : n\ni✝ : m\n⊢ ↑(↑(Pi.basisFun R n).repr (↑l (↑(stdBasis R (fun x => R) i) 1))) i' •\n      0 • ↑(↑B (↑(Pi.basisFun R n) i')) (↑(Pi.basisFun R m) i✝) =\n    0\n[PROOFSTEP]\nsimp only [zero_smul, smul_zero]\n[GOAL]\ncase a.h.h\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing R₁\ninst✝⁸ : CommRing R₂\ninst✝⁷ : Fintype n\ninst✝⁶ : Fintype m\ninst✝⁵ : DecidableEq n\ninst✝⁴ : DecidableEq m\nσ₁ : R₁ →+* R\nσ₂ : R₂ →+* R\ninst✝³ : Fintype n'\ninst✝² : Fintype m'\ninst✝¹ : DecidableEq n'\ninst✝ : DecidableEq m'\nB : (n → R) →ₗ[R] (m → R) →ₗ[R] R\nl : (n' → R) →ₗ[R] n → R\nr : (m' → R) →ₗ[R] m → R\ni : n'\nj : m'\n⊢ ∀ (i : n),\n    (Finsupp.sum (↑(Pi.basisFun R m).repr (↑r (↑(stdBasis R (fun x => R) j) 1))) fun j yj =>\n        0 • yj • ↑(↑B (↑(Pi.basisFun R n) i)) (↑(Pi.basisFun R m) j)) =\n      0\n[PROOFSTEP]\nintros\n[GOAL]\ncase a.h.h\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing R₁\ninst✝⁸ : CommRing R₂\ninst✝⁷ : Fintype n\ninst✝⁶ : Fintype m\ninst✝⁵ : DecidableEq n\ninst✝⁴ : DecidableEq m\nσ₁ : R₁ →+* R\nσ₂ : R₂ →+* R\ninst✝³ : Fintype n'\ninst✝² : Fintype m'\ninst✝¹ : DecidableEq n'\ninst✝ : DecidableEq m'\nB : (n → R) →ₗ[R] (m → R) →ₗ[R] R\nl : (n' → R) →ₗ[R] n → R\nr : (m' → R) →ₗ[R] m → R\ni : n'\nj : m'\ni✝ : n\n⊢ (Finsupp.sum (↑(Pi.basisFun R m).repr (↑r (↑(stdBasis R (fun x => R) j) 1))) fun j yj =>\n      0 • yj • ↑(↑B (↑(Pi.basisFun R n) i✝)) (↑(Pi.basisFun R m) j)) =\n    0\n[PROOFSTEP]\nsimp only [zero_smul, Finsupp.sum_zero]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing R₁\ninst✝⁸ : CommRing R₂\ninst✝⁷ : Fintype n\ninst✝⁶ : Fintype m\ninst✝⁵ : DecidableEq n\ninst✝⁴ : DecidableEq m\nσ₁ : R₁ →+* R\nσ₂ : R₂ →+* R\ninst✝³ : Fintype n'\ninst✝² : Fintype m'\ninst✝¹ : DecidableEq n'\ninst✝ : DecidableEq m'\nB : (n → R) →ₗ[R] (m → R) →ₗ[R] R\nf : (n' → R) →ₗ[R] n → R\n⊢ ↑toMatrix₂' (comp B f) = (↑toMatrix' f)ᵀ * ↑toMatrix₂' B\n[PROOFSTEP]\nrw [← LinearMap.compl₂_id (B.comp f), ← LinearMap.compl₁₂]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing R₁\ninst✝⁸ : CommRing R₂\ninst✝⁷ : Fintype n\ninst✝⁶ : Fintype m\ninst✝⁵ : DecidableEq n\ninst✝⁴ : DecidableEq m\nσ₁ : R₁ →+* R\nσ₂ : R₂ →+* R\ninst✝³ : Fintype n'\ninst✝² : Fintype m'\ninst✝¹ : DecidableEq n'\ninst✝ : DecidableEq m'\nB : (n → R) →ₗ[R] (m → R) →ₗ[R] R\nf : (n' → R) →ₗ[R] n → R\n⊢ ↑toMatrix₂' (compl₁₂ B f id) = (↑toMatrix' f)ᵀ * ↑toMatrix₂' B\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing R₁\ninst✝⁸ : CommRing R₂\ninst✝⁷ : Fintype n\ninst✝⁶ : Fintype m\ninst✝⁵ : DecidableEq n\ninst✝⁴ : DecidableEq m\nσ₁ : R₁ →+* R\nσ₂ : R₂ →+* R\ninst✝³ : Fintype n'\ninst✝² : Fintype m'\ninst✝¹ : DecidableEq n'\ninst✝ : DecidableEq m'\nB : (n → R) →ₗ[R] (m → R) →ₗ[R] R\nf : (m' → R) →ₗ[R] m → R\n⊢ ↑toMatrix₂' (compl₂ B f) = ↑toMatrix₂' B * ↑toMatrix' f\n[PROOFSTEP]\nrw [← LinearMap.comp_id B, ← LinearMap.compl₁₂]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing R₁\ninst✝⁸ : CommRing R₂\ninst✝⁷ : Fintype n\ninst✝⁶ : Fintype m\ninst✝⁵ : DecidableEq n\ninst✝⁴ : DecidableEq m\nσ₁ : R₁ →+* R\nσ₂ : R₂ →+* R\ninst✝³ : Fintype n'\ninst✝² : Fintype m'\ninst✝¹ : DecidableEq n'\ninst✝ : DecidableEq m'\nB : (n → R) →ₗ[R] (m → R) →ₗ[R] R\nf : (m' → R) →ₗ[R] m → R\n⊢ ↑toMatrix₂' (compl₁₂ B id f) = ↑toMatrix₂' (comp B id) * ↑toMatrix' f\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM✝ : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing R₁\ninst✝⁸ : CommRing R₂\ninst✝⁷ : Fintype n\ninst✝⁶ : Fintype m\ninst✝⁵ : DecidableEq n\ninst✝⁴ : DecidableEq m\nσ₁ : R₁ →+* R\nσ₂ : R₂ →+* R\ninst✝³ : Fintype n'\ninst✝² : Fintype m'\ninst✝¹ : DecidableEq n'\ninst✝ : DecidableEq m'\nB : (n → R) →ₗ[R] (m → R) →ₗ[R] R\nM : Matrix n' n R\nN : Matrix m m' R\n⊢ M * ↑toMatrix₂' B * N = ↑toMatrix₂' (compl₁₂ B (↑toLin' Mᵀ) (↑toLin' N))\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM✝ : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing R₁\ninst✝⁸ : CommRing R₂\ninst✝⁷ : Fintype n\ninst✝⁶ : Fintype m\ninst✝⁵ : DecidableEq n\ninst✝⁴ : DecidableEq m\nσ₁ : R₁ →+* R\nσ₂ : R₂ →+* R\ninst✝³ : Fintype n'\ninst✝² : Fintype m'\ninst✝¹ : DecidableEq n'\ninst✝ : DecidableEq m'\nB : (n → R) →ₗ[R] (m → R) →ₗ[R] R\nM : Matrix n' n R\n⊢ M * ↑toMatrix₂' B = ↑toMatrix₂' (comp B (↑toLin' Mᵀ))\n[PROOFSTEP]\nsimp only [B.toMatrix₂'_comp, transpose_transpose, toMatrix'_toLin']\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM✝ : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing R₁\ninst✝⁸ : CommRing R₂\ninst✝⁷ : Fintype n\ninst✝⁶ : Fintype m\ninst✝⁵ : DecidableEq n\ninst✝⁴ : DecidableEq m\nσ₁ : R₁ →+* R\nσ₂ : R₂ →+* R\ninst✝³ : Fintype n'\ninst✝² : Fintype m'\ninst✝¹ : DecidableEq n'\ninst✝ : DecidableEq m'\nB : (n → R) →ₗ[R] (m → R) →ₗ[R] R\nM : Matrix m m' R\n⊢ ↑toMatrix₂' B * M = ↑toMatrix₂' (compl₂ B (↑toLin' M))\n[PROOFSTEP]\nsimp only [B.toMatrix₂'_compl₂, toMatrix'_toLin']\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM✝ : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing R₁\ninst✝⁸ : CommRing R₂\ninst✝⁷ : Fintype n\ninst✝⁶ : Fintype m\ninst✝⁵ : DecidableEq n\ninst✝⁴ : DecidableEq m\nσ₁ : R₁ →+* R\nσ₂ : R₂ →+* R\ninst✝³ : Fintype n'\ninst✝² : Fintype m'\ninst✝¹ : DecidableEq n'\ninst✝ : DecidableEq m'\nM : Matrix n m R\nP : Matrix n n' R\nQ : Matrix m m' R\n⊢ ↑toMatrix₂' (compl₁₂ (↑toLinearMap₂' M) (↑toLin' P) (↑toLin' Q)) = ↑toMatrix₂' (↑toLinearMap₂' (Pᵀ * M * Q))\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝⁸ : CommRing R\ninst✝⁷ : AddCommMonoid M₁\ninst✝⁶ : Module R M₁\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : Module R M₂\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\ninst✝¹ : DecidableEq m\ninst✝ : Fintype m\nb₁ : Basis n R M₁\nb₂ : Basis m R M₂\nB : M₁ →ₗ[R] M₂ →ₗ[R] R\ni : n\nj : m\n⊢ ↑(toMatrix₂ b₁ b₂) B i j = ↑(↑B (↑b₁ i)) (↑b₂ j)\n[PROOFSTEP]\nsimp only [LinearMap.toMatrix₂, LinearEquiv.trans_apply, LinearMap.toMatrix₂'_apply, LinearEquiv.trans_apply,\n  LinearMap.toMatrix₂'_apply, LinearEquiv.arrowCongr_apply, Basis.equivFun_symm_stdBasis, LinearEquiv.refl_apply]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝⁸ : CommRing R\ninst✝⁷ : AddCommMonoid M₁\ninst✝⁶ : Module R M₁\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : Module R M₂\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\ninst✝¹ : DecidableEq m\ninst✝ : Fintype m\nb₁ : Basis n R M₁\nb₂ : Basis m R M₂\nB : M₁ →ₗ[R] M₂ →ₗ[R] R\ni : n\nj : m\n⊢ ↑(toMatrix₂Aux ↑b₁ ↑b₂) B i j = ↑(toMatrix₂ b₁ b₂) B i j\n[PROOFSTEP]\nrw [LinearMap.toMatrix₂_apply, LinearMap.toMatrix₂Aux_apply]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝⁸ : CommRing R\ninst✝⁷ : AddCommMonoid M₁\ninst✝⁶ : Module R M₁\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : Module R M₂\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\ninst✝¹ : DecidableEq m\ninst✝ : Fintype m\nb₁ : Basis n R M₁\nb₂ : Basis m R M₂\n⊢ toLinearMap₂ (Pi.basisFun R n) (Pi.basisFun R m) = toLinearMap₂'\n[PROOFSTEP]\next M\n[GOAL]\ncase h.h.h.h.h\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM✝ : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝⁸ : CommRing R\ninst✝⁷ : AddCommMonoid M₁\ninst✝⁶ : Module R M₁\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : Module R M₂\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\ninst✝¹ : DecidableEq m\ninst✝ : Fintype m\nb₁ : Basis n R M₁\nb₂ : Basis m R M₂\nM : Matrix n m R\ni✝¹ : n\ni✝ : m\n⊢ ↑(comp (↑(comp (↑(toLinearMap₂ (Pi.basisFun R n) (Pi.basisFun R m)) M) (single i✝¹)) 1) (single i✝)) 1 =\n    ↑(comp (↑(comp (↑toLinearMap₂' M) (single i✝¹)) 1) (single i✝)) 1\n[PROOFSTEP]\nsimp only [Matrix.toLinearMap₂_apply, Matrix.toLinearMap₂'_apply, Pi.basisFun_repr, coe_comp, Function.comp_apply]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝⁸ : CommRing R\ninst✝⁷ : AddCommMonoid M₁\ninst✝⁶ : Module R M₁\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : Module R M₂\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\ninst✝¹ : DecidableEq m\ninst✝ : Fintype m\nb₁ : Basis n R M₁\nb₂ : Basis m R M₂\n⊢ toMatrix₂ (Pi.basisFun R n) (Pi.basisFun R m) = toMatrix₂'\n[PROOFSTEP]\next B\n[GOAL]\ncase h.a.h\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝⁸ : CommRing R\ninst✝⁷ : AddCommMonoid M₁\ninst✝⁶ : Module R M₁\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : Module R M₂\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\ninst✝¹ : DecidableEq m\ninst✝ : Fintype m\nb₁ : Basis n R M₁\nb₂ : Basis m R M₂\nB : (n → R) →ₗ[R] (m → R) →ₗ[R] R\ni✝ : n\nx✝ : m\n⊢ ↑(toMatrix₂ (Pi.basisFun R n) (Pi.basisFun R m)) B i✝ x✝ = ↑toMatrix₂' B i✝ x✝\n[PROOFSTEP]\nrw [LinearMap.toMatrix₂_apply, LinearMap.toMatrix₂'_apply, Pi.basisFun_apply, Pi.basisFun_apply]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝¹⁶ : CommRing R\ninst✝¹⁵ : AddCommMonoid M₁\ninst✝¹⁴ : Module R M₁\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : Module R M₂\ninst✝¹¹ : DecidableEq n\ninst✝¹⁰ : Fintype n\ninst✝⁹ : DecidableEq m\ninst✝⁸ : Fintype m\nb₁ : Basis n R M₁\nb₂ : Basis m R M₂\ninst✝⁷ : AddCommMonoid M₁'\ninst✝⁶ : Module R M₁'\ninst✝⁵ : AddCommMonoid M₂'\ninst✝⁴ : Module R M₂'\nb₁' : Basis n' R M₁'\nb₂' : Basis m' R M₂'\ninst✝³ : Fintype n'\ninst✝² : Fintype m'\ninst✝¹ : DecidableEq n'\ninst✝ : DecidableEq m'\nB : M₁ →ₗ[R] M₂ →ₗ[R] R\nl : M₁' →ₗ[R] M₁\nr : M₂' →ₗ[R] M₂\n⊢ ↑(toMatrix₂ b₁' b₂') (compl₁₂ B l r) = (↑(toMatrix b₁' b₁) l)ᵀ * ↑(toMatrix₂ b₁ b₂) B * ↑(toMatrix b₂' b₂) r\n[PROOFSTEP]\next i j\n[GOAL]\ncase a.h\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝¹⁶ : CommRing R\ninst✝¹⁵ : AddCommMonoid M₁\ninst✝¹⁴ : Module R M₁\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : Module R M₂\ninst✝¹¹ : DecidableEq n\ninst✝¹⁰ : Fintype n\ninst✝⁹ : DecidableEq m\ninst✝⁸ : Fintype m\nb₁ : Basis n R M₁\nb₂ : Basis m R M₂\ninst✝⁷ : AddCommMonoid M₁'\ninst✝⁶ : Module R M₁'\ninst✝⁵ : AddCommMonoid M₂'\ninst✝⁴ : Module R M₂'\nb₁' : Basis n' R M₁'\nb₂' : Basis m' R M₂'\ninst✝³ : Fintype n'\ninst✝² : Fintype m'\ninst✝¹ : DecidableEq n'\ninst✝ : DecidableEq m'\nB : M₁ →ₗ[R] M₂ →ₗ[R] R\nl : M₁' →ₗ[R] M₁\nr : M₂' →ₗ[R] M₂\ni : n'\nj : m'\n⊢ ↑(toMatrix₂ b₁' b₂') (compl₁₂ B l r) i j = ((↑(toMatrix b₁' b₁) l)ᵀ * ↑(toMatrix₂ b₁ b₂) B * ↑(toMatrix b₂' b₂) r) i j\n[PROOFSTEP]\nsimp only [LinearMap.toMatrix₂_apply, compl₁₂_apply, transpose_apply, Matrix.mul_apply, LinearMap.toMatrix_apply,\n  LinearEquiv.coe_mk, sum_mul]\n[GOAL]\ncase a.h\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝¹⁶ : CommRing R\ninst✝¹⁵ : AddCommMonoid M₁\ninst✝¹⁴ : Module R M₁\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : Module R M₂\ninst✝¹¹ : DecidableEq n\ninst✝¹⁰ : Fintype n\ninst✝⁹ : DecidableEq m\ninst✝⁸ : Fintype m\nb₁ : Basis n R M₁\nb₂ : Basis m R M₂\ninst✝⁷ : AddCommMonoid M₁'\ninst✝⁶ : Module R M₁'\ninst✝⁵ : AddCommMonoid M₂'\ninst✝⁴ : Module R M₂'\nb₁' : Basis n' R M₁'\nb₂' : Basis m' R M₂'\ninst✝³ : Fintype n'\ninst✝² : Fintype m'\ninst✝¹ : DecidableEq n'\ninst✝ : DecidableEq m'\nB : M₁ →ₗ[R] M₂ →ₗ[R] R\nl : M₁' →ₗ[R] M₁\nr : M₂' →ₗ[R] M₂\ni : n'\nj : m'\n⊢ ↑(↑B (↑l (↑b₁' i))) (↑r (↑b₂' j)) =\n    ∑ x : m, ∑ x_1 : n, ↑(↑b₁.repr (↑l (↑b₁' i))) x_1 * ↑(↑B (↑b₁ x_1)) (↑b₂ x) * ↑(↑b₂.repr (↑r (↑b₂' j))) x\n[PROOFSTEP]\nrw [sum_comm]\n[GOAL]\ncase a.h\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝¹⁶ : CommRing R\ninst✝¹⁵ : AddCommMonoid M₁\ninst✝¹⁴ : Module R M₁\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : Module R M₂\ninst✝¹¹ : DecidableEq n\ninst✝¹⁰ : Fintype n\ninst✝⁹ : DecidableEq m\ninst✝⁸ : Fintype m\nb₁ : Basis n R M₁\nb₂ : Basis m R M₂\ninst✝⁷ : AddCommMonoid M₁'\ninst✝⁶ : Module R M₁'\ninst✝⁵ : AddCommMonoid M₂'\ninst✝⁴ : Module R M₂'\nb₁' : Basis n' R M₁'\nb₂' : Basis m' R M₂'\ninst✝³ : Fintype n'\ninst✝² : Fintype m'\ninst✝¹ : DecidableEq n'\ninst✝ : DecidableEq m'\nB : M₁ →ₗ[R] M₂ →ₗ[R] R\nl : M₁' →ₗ[R] M₁\nr : M₂' →ₗ[R] M₂\ni : n'\nj : m'\n⊢ ↑(↑B (↑l (↑b₁' i))) (↑r (↑b₂' j)) =\n    ∑ y : n, ∑ x : m, ↑(↑b₁.repr (↑l (↑b₁' i))) y * ↑(↑B (↑b₁ y)) (↑b₂ x) * ↑(↑b₂.repr (↑r (↑b₂' j))) x\n[PROOFSTEP]\nconv_lhs => rw [← LinearMap.sum_repr_mul_repr_mul b₁ b₂]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝¹⁶ : CommRing R\ninst✝¹⁵ : AddCommMonoid M₁\ninst✝¹⁴ : Module R M₁\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : Module R M₂\ninst✝¹¹ : DecidableEq n\ninst✝¹⁰ : Fintype n\ninst✝⁹ : DecidableEq m\ninst✝⁸ : Fintype m\nb₁ : Basis n R M₁\nb₂ : Basis m R M₂\ninst✝⁷ : AddCommMonoid M₁'\ninst✝⁶ : Module R M₁'\ninst✝⁵ : AddCommMonoid M₂'\ninst✝⁴ : Module R M₂'\nb₁' : Basis n' R M₁'\nb₂' : Basis m' R M₂'\ninst✝³ : Fintype n'\ninst✝² : Fintype m'\ninst✝¹ : DecidableEq n'\ninst✝ : DecidableEq m'\nB : M₁ →ₗ[R] M₂ →ₗ[R] R\nl : M₁' →ₗ[R] M₁\nr : M₂' →ₗ[R] M₂\ni : n'\nj : m'\n| ↑(↑B (↑l (↑b₁' i))) (↑r (↑b₂' j))\n[PROOFSTEP]\nrw [← LinearMap.sum_repr_mul_repr_mul b₁ b₂]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝¹⁶ : CommRing R\ninst✝¹⁵ : AddCommMonoid M₁\ninst✝¹⁴ : Module R M₁\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : Module R M₂\ninst✝¹¹ : DecidableEq n\ninst✝¹⁰ : Fintype n\ninst✝⁹ : DecidableEq m\ninst✝⁸ : Fintype m\nb₁ : Basis n R M₁\nb₂ : Basis m R M₂\ninst✝⁷ : AddCommMonoid M₁'\ninst✝⁶ : Module R M₁'\ninst✝⁵ : AddCommMonoid M₂'\ninst✝⁴ : Module R M₂'\nb₁' : Basis n' R M₁'\nb₂' : Basis m' R M₂'\ninst✝³ : Fintype n'\ninst✝² : Fintype m'\ninst✝¹ : DecidableEq n'\ninst✝ : DecidableEq m'\nB : M₁ →ₗ[R] M₂ →ₗ[R] R\nl : M₁' →ₗ[R] M₁\nr : M₂' →ₗ[R] M₂\ni : n'\nj : m'\n| ↑(↑B (↑l (↑b₁' i))) (↑r (↑b₂' j))\n[PROOFSTEP]\nrw [← LinearMap.sum_repr_mul_repr_mul b₁ b₂]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝¹⁶ : CommRing R\ninst✝¹⁵ : AddCommMonoid M₁\ninst✝¹⁴ : Module R M₁\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : Module R M₂\ninst✝¹¹ : DecidableEq n\ninst✝¹⁰ : Fintype n\ninst✝⁹ : DecidableEq m\ninst✝⁸ : Fintype m\nb₁ : Basis n R M₁\nb₂ : Basis m R M₂\ninst✝⁷ : AddCommMonoid M₁'\ninst✝⁶ : Module R M₁'\ninst✝⁵ : AddCommMonoid M₂'\ninst✝⁴ : Module R M₂'\nb₁' : Basis n' R M₁'\nb₂' : Basis m' R M₂'\ninst✝³ : Fintype n'\ninst✝² : Fintype m'\ninst✝¹ : DecidableEq n'\ninst✝ : DecidableEq m'\nB : M₁ →ₗ[R] M₂ →ₗ[R] R\nl : M₁' →ₗ[R] M₁\nr : M₂' →ₗ[R] M₂\ni : n'\nj : m'\n| ↑(↑B (↑l (↑b₁' i))) (↑r (↑b₂' j))\n[PROOFSTEP]\nrw [← LinearMap.sum_repr_mul_repr_mul b₁ b₂]\n[GOAL]\ncase a.h\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝¹⁶ : CommRing R\ninst✝¹⁵ : AddCommMonoid M₁\ninst✝¹⁴ : Module R M₁\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : Module R M₂\ninst✝¹¹ : DecidableEq n\ninst✝¹⁰ : Fintype n\ninst✝⁹ : DecidableEq m\ninst✝⁸ : Fintype m\nb₁ : Basis n R M₁\nb₂ : Basis m R M₂\ninst✝⁷ : AddCommMonoid M₁'\ninst✝⁶ : Module R M₁'\ninst✝⁵ : AddCommMonoid M₂'\ninst✝⁴ : Module R M₂'\nb₁' : Basis n' R M₁'\nb₂' : Basis m' R M₂'\ninst✝³ : Fintype n'\ninst✝² : Fintype m'\ninst✝¹ : DecidableEq n'\ninst✝ : DecidableEq m'\nB : M₁ →ₗ[R] M₂ →ₗ[R] R\nl : M₁' →ₗ[R] M₁\nr : M₂' →ₗ[R] M₂\ni : n'\nj : m'\n⊢ (Finsupp.sum (↑b₁.repr (↑l (↑b₁' i))) fun i xi =>\n      Finsupp.sum (↑b₂.repr (↑r (↑b₂' j))) fun j yj => xi • yj • ↑(↑B (↑b₁ i)) (↑b₂ j)) =\n    ∑ y : n, ∑ x : m, ↑(↑b₁.repr (↑l (↑b₁' i))) y * ↑(↑B (↑b₁ y)) (↑b₂ x) * ↑(↑b₂.repr (↑r (↑b₂' j))) x\n[PROOFSTEP]\nrw [Finsupp.sum_fintype]\n[GOAL]\ncase a.h\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝¹⁶ : CommRing R\ninst✝¹⁵ : AddCommMonoid M₁\ninst✝¹⁴ : Module R M₁\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : Module R M₂\ninst✝¹¹ : DecidableEq n\ninst✝¹⁰ : Fintype n\ninst✝⁹ : DecidableEq m\ninst✝⁸ : Fintype m\nb₁ : Basis n R M₁\nb₂ : Basis m R M₂\ninst✝⁷ : AddCommMonoid M₁'\ninst✝⁶ : Module R M₁'\ninst✝⁵ : AddCommMonoid M₂'\ninst✝⁴ : Module R M₂'\nb₁' : Basis n' R M₁'\nb₂' : Basis m' R M₂'\ninst✝³ : Fintype n'\ninst✝² : Fintype m'\ninst✝¹ : DecidableEq n'\ninst✝ : DecidableEq m'\nB : M₁ →ₗ[R] M₂ →ₗ[R] R\nl : M₁' →ₗ[R] M₁\nr : M₂' →ₗ[R] M₂\ni : n'\nj : m'\n⊢ (∑ i_1 : n,\n      Finsupp.sum (↑b₂.repr (↑r (↑b₂' j))) fun j yj => ↑(↑b₁.repr (↑l (↑b₁' i))) i_1 • yj • ↑(↑B (↑b₁ i_1)) (↑b₂ j)) =\n    ∑ y : n, ∑ x : m, ↑(↑b₁.repr (↑l (↑b₁' i))) y * ↑(↑B (↑b₁ y)) (↑b₂ x) * ↑(↑b₂.repr (↑r (↑b₂' j))) x\n[PROOFSTEP]\napply sum_congr rfl\n[GOAL]\ncase a.h\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝¹⁶ : CommRing R\ninst✝¹⁵ : AddCommMonoid M₁\ninst✝¹⁴ : Module R M₁\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : Module R M₂\ninst✝¹¹ : DecidableEq n\ninst✝¹⁰ : Fintype n\ninst✝⁹ : DecidableEq m\ninst✝⁸ : Fintype m\nb₁ : Basis n R M₁\nb₂ : Basis m R M₂\ninst✝⁷ : AddCommMonoid M₁'\ninst✝⁶ : Module R M₁'\ninst✝⁵ : AddCommMonoid M₂'\ninst✝⁴ : Module R M₂'\nb₁' : Basis n' R M₁'\nb₂' : Basis m' R M₂'\ninst✝³ : Fintype n'\ninst✝² : Fintype m'\ninst✝¹ : DecidableEq n'\ninst✝ : DecidableEq m'\nB : M₁ →ₗ[R] M₂ →ₗ[R] R\nl : M₁' →ₗ[R] M₁\nr : M₂' →ₗ[R] M₂\ni : n'\nj : m'\n⊢ ∀ (x : n),\n    x ∈ univ →\n      (Finsupp.sum (↑b₂.repr (↑r (↑b₂' j))) fun j yj => ↑(↑b₁.repr (↑l (↑b₁' i))) x • yj • ↑(↑B (↑b₁ x)) (↑b₂ j)) =\n        ∑ x_1 : m, ↑(↑b₁.repr (↑l (↑b₁' i))) x * ↑(↑B (↑b₁ x)) (↑b₂ x_1) * ↑(↑b₂.repr (↑r (↑b₂' j))) x_1\n[PROOFSTEP]\nrintro i' -\n[GOAL]\ncase a.h\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝¹⁶ : CommRing R\ninst✝¹⁵ : AddCommMonoid M₁\ninst✝¹⁴ : Module R M₁\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : Module R M₂\ninst✝¹¹ : DecidableEq n\ninst✝¹⁰ : Fintype n\ninst✝⁹ : DecidableEq m\ninst✝⁸ : Fintype m\nb₁ : Basis n R M₁\nb₂ : Basis m R M₂\ninst✝⁷ : AddCommMonoid M₁'\ninst✝⁶ : Module R M₁'\ninst✝⁵ : AddCommMonoid M₂'\ninst✝⁴ : Module R M₂'\nb₁' : Basis n' R M₁'\nb₂' : Basis m' R M₂'\ninst✝³ : Fintype n'\ninst✝² : Fintype m'\ninst✝¹ : DecidableEq n'\ninst✝ : DecidableEq m'\nB : M₁ →ₗ[R] M₂ →ₗ[R] R\nl : M₁' →ₗ[R] M₁\nr : M₂' →ₗ[R] M₂\ni : n'\nj : m'\ni' : n\n⊢ (Finsupp.sum (↑b₂.repr (↑r (↑b₂' j))) fun j yj => ↑(↑b₁.repr (↑l (↑b₁' i))) i' • yj • ↑(↑B (↑b₁ i')) (↑b₂ j)) =\n    ∑ x : m, ↑(↑b₁.repr (↑l (↑b₁' i))) i' * ↑(↑B (↑b₁ i')) (↑b₂ x) * ↑(↑b₂.repr (↑r (↑b₂' j))) x\n[PROOFSTEP]\nrw [Finsupp.sum_fintype]\n[GOAL]\ncase a.h\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝¹⁶ : CommRing R\ninst✝¹⁵ : AddCommMonoid M₁\ninst✝¹⁴ : Module R M₁\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : Module R M₂\ninst✝¹¹ : DecidableEq n\ninst✝¹⁰ : Fintype n\ninst✝⁹ : DecidableEq m\ninst✝⁸ : Fintype m\nb₁ : Basis n R M₁\nb₂ : Basis m R M₂\ninst✝⁷ : AddCommMonoid M₁'\ninst✝⁶ : Module R M₁'\ninst✝⁵ : AddCommMonoid M₂'\ninst✝⁴ : Module R M₂'\nb₁' : Basis n' R M₁'\nb₂' : Basis m' R M₂'\ninst✝³ : Fintype n'\ninst✝² : Fintype m'\ninst✝¹ : DecidableEq n'\ninst✝ : DecidableEq m'\nB : M₁ →ₗ[R] M₂ →ₗ[R] R\nl : M₁' →ₗ[R] M₁\nr : M₂' →ₗ[R] M₂\ni : n'\nj : m'\ni' : n\n⊢ ∑ i_1 : m, ↑(↑b₁.repr (↑l (↑b₁' i))) i' • ↑(↑b₂.repr (↑r (↑b₂' j))) i_1 • ↑(↑B (↑b₁ i')) (↑b₂ i_1) =\n    ∑ x : m, ↑(↑b₁.repr (↑l (↑b₁' i))) i' * ↑(↑B (↑b₁ i')) (↑b₂ x) * ↑(↑b₂.repr (↑r (↑b₂' j))) x\n[PROOFSTEP]\napply sum_congr rfl\n[GOAL]\ncase a.h\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝¹⁶ : CommRing R\ninst✝¹⁵ : AddCommMonoid M₁\ninst✝¹⁴ : Module R M₁\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : Module R M₂\ninst✝¹¹ : DecidableEq n\ninst✝¹⁰ : Fintype n\ninst✝⁹ : DecidableEq m\ninst✝⁸ : Fintype m\nb₁ : Basis n R M₁\nb₂ : Basis m R M₂\ninst✝⁷ : AddCommMonoid M₁'\ninst✝⁶ : Module R M₁'\ninst✝⁵ : AddCommMonoid M₂'\ninst✝⁴ : Module R M₂'\nb₁' : Basis n' R M₁'\nb₂' : Basis m' R M₂'\ninst✝³ : Fintype n'\ninst✝² : Fintype m'\ninst✝¹ : DecidableEq n'\ninst✝ : DecidableEq m'\nB : M₁ →ₗ[R] M₂ →ₗ[R] R\nl : M₁' →ₗ[R] M₁\nr : M₂' →ₗ[R] M₂\ni : n'\nj : m'\ni' : n\n⊢ ∀ (x : m),\n    x ∈ univ →\n      ↑(↑b₁.repr (↑l (↑b₁' i))) i' • ↑(↑b₂.repr (↑r (↑b₂' j))) x • ↑(↑B (↑b₁ i')) (↑b₂ x) =\n        ↑(↑b₁.repr (↑l (↑b₁' i))) i' * ↑(↑B (↑b₁ i')) (↑b₂ x) * ↑(↑b₂.repr (↑r (↑b₂' j))) x\n[PROOFSTEP]\nrintro j' -\n[GOAL]\ncase a.h\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝¹⁶ : CommRing R\ninst✝¹⁵ : AddCommMonoid M₁\ninst✝¹⁴ : Module R M₁\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : Module R M₂\ninst✝¹¹ : DecidableEq n\ninst✝¹⁰ : Fintype n\ninst✝⁹ : DecidableEq m\ninst✝⁸ : Fintype m\nb₁ : Basis n R M₁\nb₂ : Basis m R M₂\ninst✝⁷ : AddCommMonoid M₁'\ninst✝⁶ : Module R M₁'\ninst✝⁵ : AddCommMonoid M₂'\ninst✝⁴ : Module R M₂'\nb₁' : Basis n' R M₁'\nb₂' : Basis m' R M₂'\ninst✝³ : Fintype n'\ninst✝² : Fintype m'\ninst✝¹ : DecidableEq n'\ninst✝ : DecidableEq m'\nB : M₁ →ₗ[R] M₂ →ₗ[R] R\nl : M₁' →ₗ[R] M₁\nr : M₂' →ₗ[R] M₂\ni : n'\nj : m'\ni' : n\nj' : m\n⊢ ↑(↑b₁.repr (↑l (↑b₁' i))) i' • ↑(↑b₂.repr (↑r (↑b₂' j))) j' • ↑(↑B (↑b₁ i')) (↑b₂ j') =\n    ↑(↑b₁.repr (↑l (↑b₁' i))) i' * ↑(↑B (↑b₁ i')) (↑b₂ j') * ↑(↑b₂.repr (↑r (↑b₂' j))) j'\n[PROOFSTEP]\nsimp only [smul_eq_mul, LinearMap.toMatrix_apply, Basis.equivFun_apply, mul_assoc, mul_comm, mul_left_comm]\n[GOAL]\ncase a.h.h\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝¹⁶ : CommRing R\ninst✝¹⁵ : AddCommMonoid M₁\ninst✝¹⁴ : Module R M₁\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : Module R M₂\ninst✝¹¹ : DecidableEq n\ninst✝¹⁰ : Fintype n\ninst✝⁹ : DecidableEq m\ninst✝⁸ : Fintype m\nb₁ : Basis n R M₁\nb₂ : Basis m R M₂\ninst✝⁷ : AddCommMonoid M₁'\ninst✝⁶ : Module R M₁'\ninst✝⁵ : AddCommMonoid M₂'\ninst✝⁴ : Module R M₂'\nb₁' : Basis n' R M₁'\nb₂' : Basis m' R M₂'\ninst✝³ : Fintype n'\ninst✝² : Fintype m'\ninst✝¹ : DecidableEq n'\ninst✝ : DecidableEq m'\nB : M₁ →ₗ[R] M₂ →ₗ[R] R\nl : M₁' →ₗ[R] M₁\nr : M₂' →ₗ[R] M₂\ni : n'\nj : m'\ni' : n\n⊢ ∀ (i_1 : m), ↑(↑b₁.repr (↑l (↑b₁' i))) i' • 0 • ↑(↑B (↑b₁ i')) (↑b₂ i_1) = 0\n[PROOFSTEP]\nintros\n[GOAL]\ncase a.h.h\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝¹⁶ : CommRing R\ninst✝¹⁵ : AddCommMonoid M₁\ninst✝¹⁴ : Module R M₁\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : Module R M₂\ninst✝¹¹ : DecidableEq n\ninst✝¹⁰ : Fintype n\ninst✝⁹ : DecidableEq m\ninst✝⁸ : Fintype m\nb₁ : Basis n R M₁\nb₂ : Basis m R M₂\ninst✝⁷ : AddCommMonoid M₁'\ninst✝⁶ : Module R M₁'\ninst✝⁵ : AddCommMonoid M₂'\ninst✝⁴ : Module R M₂'\nb₁' : Basis n' R M₁'\nb₂' : Basis m' R M₂'\ninst✝³ : Fintype n'\ninst✝² : Fintype m'\ninst✝¹ : DecidableEq n'\ninst✝ : DecidableEq m'\nB : M₁ →ₗ[R] M₂ →ₗ[R] R\nl : M₁' →ₗ[R] M₁\nr : M₂' →ₗ[R] M₂\ni : n'\nj : m'\ni' : n\ni✝ : m\n⊢ ↑(↑b₁.repr (↑l (↑b₁' i))) i' • 0 • ↑(↑B (↑b₁ i')) (↑b₂ i✝) = 0\n[PROOFSTEP]\nsimp only [zero_smul, smul_zero]\n[GOAL]\ncase a.h.h\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝¹⁶ : CommRing R\ninst✝¹⁵ : AddCommMonoid M₁\ninst✝¹⁴ : Module R M₁\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : Module R M₂\ninst✝¹¹ : DecidableEq n\ninst✝¹⁰ : Fintype n\ninst✝⁹ : DecidableEq m\ninst✝⁸ : Fintype m\nb₁ : Basis n R M₁\nb₂ : Basis m R M₂\ninst✝⁷ : AddCommMonoid M₁'\ninst✝⁶ : Module R M₁'\ninst✝⁵ : AddCommMonoid M₂'\ninst✝⁴ : Module R M₂'\nb₁' : Basis n' R M₁'\nb₂' : Basis m' R M₂'\ninst✝³ : Fintype n'\ninst✝² : Fintype m'\ninst✝¹ : DecidableEq n'\ninst✝ : DecidableEq m'\nB : M₁ →ₗ[R] M₂ →ₗ[R] R\nl : M₁' →ₗ[R] M₁\nr : M₂' →ₗ[R] M₂\ni : n'\nj : m'\n⊢ ∀ (i : n), (Finsupp.sum (↑b₂.repr (↑r (↑b₂' j))) fun j yj => 0 • yj • ↑(↑B (↑b₁ i)) (↑b₂ j)) = 0\n[PROOFSTEP]\nintros\n[GOAL]\ncase a.h.h\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝¹⁶ : CommRing R\ninst✝¹⁵ : AddCommMonoid M₁\ninst✝¹⁴ : Module R M₁\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : Module R M₂\ninst✝¹¹ : DecidableEq n\ninst✝¹⁰ : Fintype n\ninst✝⁹ : DecidableEq m\ninst✝⁸ : Fintype m\nb₁ : Basis n R M₁\nb₂ : Basis m R M₂\ninst✝⁷ : AddCommMonoid M₁'\ninst✝⁶ : Module R M₁'\ninst✝⁵ : AddCommMonoid M₂'\ninst✝⁴ : Module R M₂'\nb₁' : Basis n' R M₁'\nb₂' : Basis m' R M₂'\ninst✝³ : Fintype n'\ninst✝² : Fintype m'\ninst✝¹ : DecidableEq n'\ninst✝ : DecidableEq m'\nB : M₁ →ₗ[R] M₂ →ₗ[R] R\nl : M₁' →ₗ[R] M₁\nr : M₂' →ₗ[R] M₂\ni : n'\nj : m'\ni✝ : n\n⊢ (Finsupp.sum (↑b₂.repr (↑r (↑b₂' j))) fun j yj => 0 • yj • ↑(↑B (↑b₁ i✝)) (↑b₂ j)) = 0\n[PROOFSTEP]\nsimp only [zero_smul, Finsupp.sum_zero]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝¹⁶ : CommRing R\ninst✝¹⁵ : AddCommMonoid M₁\ninst✝¹⁴ : Module R M₁\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : Module R M₂\ninst✝¹¹ : DecidableEq n\ninst✝¹⁰ : Fintype n\ninst✝⁹ : DecidableEq m\ninst✝⁸ : Fintype m\nb₁ : Basis n R M₁\nb₂ : Basis m R M₂\ninst✝⁷ : AddCommMonoid M₁'\ninst✝⁶ : Module R M₁'\ninst✝⁵ : AddCommMonoid M₂'\ninst✝⁴ : Module R M₂'\nb₁' : Basis n' R M₁'\nb₂' : Basis m' R M₂'\ninst✝³ : Fintype n'\ninst✝² : Fintype m'\ninst✝¹ : DecidableEq n'\ninst✝ : DecidableEq m'\nB : M₁ →ₗ[R] M₂ →ₗ[R] R\nf : M₁' →ₗ[R] M₁\n⊢ ↑(toMatrix₂ b₁' b₂) (comp B f) = (↑(toMatrix b₁' b₁) f)ᵀ * ↑(toMatrix₂ b₁ b₂) B\n[PROOFSTEP]\nrw [← LinearMap.compl₂_id (B.comp f), ← LinearMap.compl₁₂, LinearMap.toMatrix₂_compl₁₂ b₁ b₂]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝¹⁶ : CommRing R\ninst✝¹⁵ : AddCommMonoid M₁\ninst✝¹⁴ : Module R M₁\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : Module R M₂\ninst✝¹¹ : DecidableEq n\ninst✝¹⁰ : Fintype n\ninst✝⁹ : DecidableEq m\ninst✝⁸ : Fintype m\nb₁ : Basis n R M₁\nb₂ : Basis m R M₂\ninst✝⁷ : AddCommMonoid M₁'\ninst✝⁶ : Module R M₁'\ninst✝⁵ : AddCommMonoid M₂'\ninst✝⁴ : Module R M₂'\nb₁' : Basis n' R M₁'\nb₂' : Basis m' R M₂'\ninst✝³ : Fintype n'\ninst✝² : Fintype m'\ninst✝¹ : DecidableEq n'\ninst✝ : DecidableEq m'\nB : M₁ →ₗ[R] M₂ →ₗ[R] R\nf : M₁' →ₗ[R] M₁\n⊢ (↑(toMatrix b₁' b₁) f)ᵀ * ↑(toMatrix₂ b₁ b₂) B * ↑(toMatrix b₂ b₂) id = (↑(toMatrix b₁' b₁) f)ᵀ * ↑(toMatrix₂ b₁ b₂) B\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝¹⁶ : CommRing R\ninst✝¹⁵ : AddCommMonoid M₁\ninst✝¹⁴ : Module R M₁\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : Module R M₂\ninst✝¹¹ : DecidableEq n\ninst✝¹⁰ : Fintype n\ninst✝⁹ : DecidableEq m\ninst✝⁸ : Fintype m\nb₁ : Basis n R M₁\nb₂ : Basis m R M₂\ninst✝⁷ : AddCommMonoid M₁'\ninst✝⁶ : Module R M₁'\ninst✝⁵ : AddCommMonoid M₂'\ninst✝⁴ : Module R M₂'\nb₁' : Basis n' R M₁'\nb₂' : Basis m' R M₂'\ninst✝³ : Fintype n'\ninst✝² : Fintype m'\ninst✝¹ : DecidableEq n'\ninst✝ : DecidableEq m'\nB : M₁ →ₗ[R] M₂ →ₗ[R] R\nf : M₂' →ₗ[R] M₂\n⊢ ↑(toMatrix₂ b₁ b₂') (compl₂ B f) = ↑(toMatrix₂ b₁ b₂) B * ↑(toMatrix b₂' b₂) f\n[PROOFSTEP]\nrw [← LinearMap.comp_id B, ← LinearMap.compl₁₂, LinearMap.toMatrix₂_compl₁₂ b₁ b₂]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝¹⁶ : CommRing R\ninst✝¹⁵ : AddCommMonoid M₁\ninst✝¹⁴ : Module R M₁\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : Module R M₂\ninst✝¹¹ : DecidableEq n\ninst✝¹⁰ : Fintype n\ninst✝⁹ : DecidableEq m\ninst✝⁸ : Fintype m\nb₁ : Basis n R M₁\nb₂ : Basis m R M₂\ninst✝⁷ : AddCommMonoid M₁'\ninst✝⁶ : Module R M₁'\ninst✝⁵ : AddCommMonoid M₂'\ninst✝⁴ : Module R M₂'\nb₁' : Basis n' R M₁'\nb₂' : Basis m' R M₂'\ninst✝³ : Fintype n'\ninst✝² : Fintype m'\ninst✝¹ : DecidableEq n'\ninst✝ : DecidableEq m'\nB : M₁ →ₗ[R] M₂ →ₗ[R] R\nf : M₂' →ₗ[R] M₂\n⊢ (↑(toMatrix b₁ b₁) id)ᵀ * ↑(toMatrix₂ b₁ b₂) B * ↑(toMatrix b₂' b₂) f =\n    ↑(toMatrix₂ b₁ b₂) (comp B id) * ↑(toMatrix b₂' b₂) f\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝¹⁶ : CommRing R\ninst✝¹⁵ : AddCommMonoid M₁\ninst✝¹⁴ : Module R M₁\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : Module R M₂\ninst✝¹¹ : DecidableEq n\ninst✝¹⁰ : Fintype n\ninst✝⁹ : DecidableEq m\ninst✝⁸ : Fintype m\nb₁ : Basis n R M₁\nb₂ : Basis m R M₂\ninst✝⁷ : AddCommMonoid M₁'\ninst✝⁶ : Module R M₁'\ninst✝⁵ : AddCommMonoid M₂'\ninst✝⁴ : Module R M₂'\nb₁' : Basis n' R M₁'\nb₂' : Basis m' R M₂'\ninst✝³ : Fintype n'\ninst✝² : Fintype m'\ninst✝¹ : DecidableEq n'\ninst✝ : DecidableEq m'\nc₁ : Basis n' R M₁\nc₂ : Basis m' R M₂\nB : M₁ →ₗ[R] M₂ →ₗ[R] R\n⊢ (Basis.toMatrix b₁ ↑c₁)ᵀ * ↑(toMatrix₂ b₁ b₂) B * Basis.toMatrix b₂ ↑c₂ = ↑(toMatrix₂ c₁ c₂) B\n[PROOFSTEP]\nsimp_rw [← LinearMap.toMatrix_id_eq_basis_toMatrix]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝¹⁶ : CommRing R\ninst✝¹⁵ : AddCommMonoid M₁\ninst✝¹⁴ : Module R M₁\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : Module R M₂\ninst✝¹¹ : DecidableEq n\ninst✝¹⁰ : Fintype n\ninst✝⁹ : DecidableEq m\ninst✝⁸ : Fintype m\nb₁ : Basis n R M₁\nb₂ : Basis m R M₂\ninst✝⁷ : AddCommMonoid M₁'\ninst✝⁶ : Module R M₁'\ninst✝⁵ : AddCommMonoid M₂'\ninst✝⁴ : Module R M₂'\nb₁' : Basis n' R M₁'\nb₂' : Basis m' R M₂'\ninst✝³ : Fintype n'\ninst✝² : Fintype m'\ninst✝¹ : DecidableEq n'\ninst✝ : DecidableEq m'\nc₁ : Basis n' R M₁\nc₂ : Basis m' R M₂\nB : M₁ →ₗ[R] M₂ →ₗ[R] R\n⊢ (↑(toMatrix c₁ b₁) id)ᵀ * ↑(toMatrix₂ b₁ b₂) B * ↑(toMatrix c₂ b₂) id = ↑(toMatrix₂ c₁ c₂) B\n[PROOFSTEP]\nrw [← LinearMap.toMatrix₂_compl₁₂, LinearMap.compl₁₂_id_id]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM✝ : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝¹⁶ : CommRing R\ninst✝¹⁵ : AddCommMonoid M₁\ninst✝¹⁴ : Module R M₁\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : Module R M₂\ninst✝¹¹ : DecidableEq n\ninst✝¹⁰ : Fintype n\ninst✝⁹ : DecidableEq m\ninst✝⁸ : Fintype m\nb₁ : Basis n R M₁\nb₂ : Basis m R M₂\ninst✝⁷ : AddCommMonoid M₁'\ninst✝⁶ : Module R M₁'\ninst✝⁵ : AddCommMonoid M₂'\ninst✝⁴ : Module R M₂'\nb₁' : Basis n' R M₁'\nb₂' : Basis m' R M₂'\ninst✝³ : Fintype n'\ninst✝² : Fintype m'\ninst✝¹ : DecidableEq n'\ninst✝ : DecidableEq m'\nB : M₁ →ₗ[R] M₂ →ₗ[R] R\nM : Matrix n' n R\nN : Matrix m m' R\n⊢ M * ↑(toMatrix₂ b₁ b₂) B * N = ↑(toMatrix₂ b₁' b₂') (compl₁₂ B (↑(toLin b₁' b₁) Mᵀ) (↑(toLin b₂' b₂) N))\n[PROOFSTEP]\nsimp_rw [LinearMap.toMatrix₂_compl₁₂ b₁ b₂, toMatrix_toLin, transpose_transpose]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM✝ : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝¹⁶ : CommRing R\ninst✝¹⁵ : AddCommMonoid M₁\ninst✝¹⁴ : Module R M₁\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : Module R M₂\ninst✝¹¹ : DecidableEq n\ninst✝¹⁰ : Fintype n\ninst✝⁹ : DecidableEq m\ninst✝⁸ : Fintype m\nb₁ : Basis n R M₁\nb₂ : Basis m R M₂\ninst✝⁷ : AddCommMonoid M₁'\ninst✝⁶ : Module R M₁'\ninst✝⁵ : AddCommMonoid M₂'\ninst✝⁴ : Module R M₂'\nb₁' : Basis n' R M₁'\nb₂' : Basis m' R M₂'\ninst✝³ : Fintype n'\ninst✝² : Fintype m'\ninst✝¹ : DecidableEq n'\ninst✝ : DecidableEq m'\nB : M₁ →ₗ[R] M₂ →ₗ[R] R\nM : Matrix n' n R\n⊢ M * ↑(toMatrix₂ b₁ b₂) B = ↑(toMatrix₂ b₁' b₂) (comp B (↑(toLin b₁' b₁) Mᵀ))\n[PROOFSTEP]\nrw [LinearMap.toMatrix₂_comp b₁, toMatrix_toLin, transpose_transpose]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM✝ : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝¹⁶ : CommRing R\ninst✝¹⁵ : AddCommMonoid M₁\ninst✝¹⁴ : Module R M₁\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : Module R M₂\ninst✝¹¹ : DecidableEq n\ninst✝¹⁰ : Fintype n\ninst✝⁹ : DecidableEq m\ninst✝⁸ : Fintype m\nb₁ : Basis n R M₁\nb₂ : Basis m R M₂\ninst✝⁷ : AddCommMonoid M₁'\ninst✝⁶ : Module R M₁'\ninst✝⁵ : AddCommMonoid M₂'\ninst✝⁴ : Module R M₂'\nb₁' : Basis n' R M₁'\nb₂' : Basis m' R M₂'\ninst✝³ : Fintype n'\ninst✝² : Fintype m'\ninst✝¹ : DecidableEq n'\ninst✝ : DecidableEq m'\nB : M₁ →ₗ[R] M₂ →ₗ[R] R\nM : Matrix m m' R\n⊢ ↑(toMatrix₂ b₁ b₂) B * M = ↑(toMatrix₂ b₁ b₂') (compl₂ B (↑(toLin b₂' b₂) M))\n[PROOFSTEP]\nrw [LinearMap.toMatrix₂_compl₂ b₁ b₂, toMatrix_toLin]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM✝ : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝¹⁶ : CommRing R\ninst✝¹⁵ : AddCommMonoid M₁\ninst✝¹⁴ : Module R M₁\ninst✝¹³ : AddCommMonoid M₂\ninst✝¹² : Module R M₂\ninst✝¹¹ : DecidableEq n\ninst✝¹⁰ : Fintype n\ninst✝⁹ : DecidableEq m\ninst✝⁸ : Fintype m\nb₁ : Basis n R M₁\nb₂ : Basis m R M₂\ninst✝⁷ : AddCommMonoid M₁'\ninst✝⁶ : Module R M₁'\ninst✝⁵ : AddCommMonoid M₂'\ninst✝⁴ : Module R M₂'\nb₁' : Basis n' R M₁'\nb₂' : Basis m' R M₂'\ninst✝³ : Fintype n'\ninst✝² : Fintype m'\ninst✝¹ : DecidableEq n'\ninst✝ : DecidableEq m'\nM : Matrix n m R\nP : Matrix n n' R\nQ : Matrix m m' R\n⊢ ↑(toMatrix₂ b₁' b₂') (compl₁₂ (↑(toLinearMap₂ b₁ b₂) M) (↑(toLin b₁' b₁) P) (↑(toLin b₂' b₂) Q)) =\n    ↑(toMatrix₂ b₁' b₂') (↑(toLinearMap₂ b₁' b₂') (Pᵀ * M * Q))\n[PROOFSTEP]\nsimp only [LinearMap.toMatrix₂_compl₁₂ b₁ b₂, LinearMap.toMatrix₂_toLinearMap₂, toMatrix_toLin]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝⁸ : CommRing R\ninst✝⁷ : AddCommMonoid M₁\ninst✝⁶ : Module R M₁\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : Module R M₂\ninst✝³ : Fintype n\ninst✝² : Fintype n'\nb₁ : Basis n R M₁\nb₂ : Basis n' R M₂\nJ J₂ : Matrix n n R\nJ' : Matrix n' n' R\nA : Matrix n' n R\nA' : Matrix n n' R\nA₁ : Matrix n n R\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq n'\n⊢ LinearMap.IsAdjointPair (↑toLinearMap₂' J) (↑toLinearMap₂' J') (↑toLin' A) (↑toLin' A') ↔\n    Matrix.IsAdjointPair J J' A A'\n[PROOFSTEP]\nrw [isAdjointPair_iff_comp_eq_compl₂]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝⁸ : CommRing R\ninst✝⁷ : AddCommMonoid M₁\ninst✝⁶ : Module R M₁\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : Module R M₂\ninst✝³ : Fintype n\ninst✝² : Fintype n'\nb₁ : Basis n R M₁\nb₂ : Basis n' R M₂\nJ J₂ : Matrix n n R\nJ' : Matrix n' n' R\nA : Matrix n' n R\nA' : Matrix n n' R\nA₁ : Matrix n n R\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq n'\n⊢ comp (↑toLinearMap₂' J') (↑toLin' A) = compl₂ (↑toLinearMap₂' J) (↑toLin' A') ↔ Matrix.IsAdjointPair J J' A A'\n[PROOFSTEP]\nhave h : ∀ B B' : (n → R) →ₗ[R] (n' → R) →ₗ[R] R, B = B' ↔ LinearMap.toMatrix₂' B = LinearMap.toMatrix₂' B' :=\n  by\n  intro B B'\n  constructor <;> intro h\n  · rw [h]\n  · exact LinearMap.toMatrix₂'.injective h\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝⁸ : CommRing R\ninst✝⁷ : AddCommMonoid M₁\ninst✝⁶ : Module R M₁\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : Module R M₂\ninst✝³ : Fintype n\ninst✝² : Fintype n'\nb₁ : Basis n R M₁\nb₂ : Basis n' R M₂\nJ J₂ : Matrix n n R\nJ' : Matrix n' n' R\nA : Matrix n' n R\nA' : Matrix n n' R\nA₁ : Matrix n n R\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq n'\n⊢ ∀ (B B' : (n → R) →ₗ[R] (n' → R) →ₗ[R] R), B = B' ↔ ↑toMatrix₂' B = ↑toMatrix₂' B'\n[PROOFSTEP]\nintro B B'\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝⁸ : CommRing R\ninst✝⁷ : AddCommMonoid M₁\ninst✝⁶ : Module R M₁\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : Module R M₂\ninst✝³ : Fintype n\ninst✝² : Fintype n'\nb₁ : Basis n R M₁\nb₂ : Basis n' R M₂\nJ J₂ : Matrix n n R\nJ' : Matrix n' n' R\nA : Matrix n' n R\nA' : Matrix n n' R\nA₁ : Matrix n n R\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq n'\nB B' : (n → R) →ₗ[R] (n' → R) →ₗ[R] R\n⊢ B = B' ↔ ↑toMatrix₂' B = ↑toMatrix₂' B'\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝⁸ : CommRing R\ninst✝⁷ : AddCommMonoid M₁\ninst✝⁶ : Module R M₁\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : Module R M₂\ninst✝³ : Fintype n\ninst✝² : Fintype n'\nb₁ : Basis n R M₁\nb₂ : Basis n' R M₂\nJ J₂ : Matrix n n R\nJ' : Matrix n' n' R\nA : Matrix n' n R\nA' : Matrix n n' R\nA₁ : Matrix n n R\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq n'\nB B' : (n → R) →ₗ[R] (n' → R) →ₗ[R] R\n⊢ B = B' → ↑toMatrix₂' B = ↑toMatrix₂' B'\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝⁸ : CommRing R\ninst✝⁷ : AddCommMonoid M₁\ninst✝⁶ : Module R M₁\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : Module R M₂\ninst✝³ : Fintype n\ninst✝² : Fintype n'\nb₁ : Basis n R M₁\nb₂ : Basis n' R M₂\nJ J₂ : Matrix n n R\nJ' : Matrix n' n' R\nA : Matrix n' n R\nA' : Matrix n n' R\nA₁ : Matrix n n R\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq n'\nB B' : (n → R) →ₗ[R] (n' → R) →ₗ[R] R\n⊢ ↑toMatrix₂' B = ↑toMatrix₂' B' → B = B'\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝⁸ : CommRing R\ninst✝⁷ : AddCommMonoid M₁\ninst✝⁶ : Module R M₁\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : Module R M₂\ninst✝³ : Fintype n\ninst✝² : Fintype n'\nb₁ : Basis n R M₁\nb₂ : Basis n' R M₂\nJ J₂ : Matrix n n R\nJ' : Matrix n' n' R\nA : Matrix n' n R\nA' : Matrix n n' R\nA₁ : Matrix n n R\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq n'\nB B' : (n → R) →ₗ[R] (n' → R) →ₗ[R] R\nh : B = B'\n⊢ ↑toMatrix₂' B = ↑toMatrix₂' B'\n[PROOFSTEP]\nrw [h]\n[GOAL]\ncase mpr\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝⁸ : CommRing R\ninst✝⁷ : AddCommMonoid M₁\ninst✝⁶ : Module R M₁\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : Module R M₂\ninst✝³ : Fintype n\ninst✝² : Fintype n'\nb₁ : Basis n R M₁\nb₂ : Basis n' R M₂\nJ J₂ : Matrix n n R\nJ' : Matrix n' n' R\nA : Matrix n' n R\nA' : Matrix n n' R\nA₁ : Matrix n n R\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq n'\nB B' : (n → R) →ₗ[R] (n' → R) →ₗ[R] R\nh : ↑toMatrix₂' B = ↑toMatrix₂' B'\n⊢ B = B'\n[PROOFSTEP]\nexact LinearMap.toMatrix₂'.injective h\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝⁸ : CommRing R\ninst✝⁷ : AddCommMonoid M₁\ninst✝⁶ : Module R M₁\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : Module R M₂\ninst✝³ : Fintype n\ninst✝² : Fintype n'\nb₁ : Basis n R M₁\nb₂ : Basis n' R M₂\nJ J₂ : Matrix n n R\nJ' : Matrix n' n' R\nA : Matrix n' n R\nA' : Matrix n n' R\nA₁ : Matrix n n R\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq n'\nh : ∀ (B B' : (n → R) →ₗ[R] (n' → R) →ₗ[R] R), B = B' ↔ ↑toMatrix₂' B = ↑toMatrix₂' B'\n⊢ comp (↑toLinearMap₂' J') (↑toLin' A) = compl₂ (↑toLinearMap₂' J) (↑toLin' A') ↔ Matrix.IsAdjointPair J J' A A'\n[PROOFSTEP]\nsimp_rw [h, LinearMap.toMatrix₂'_comp, LinearMap.toMatrix₂'_compl₂, LinearMap.toMatrix'_toLin',\n  LinearMap.toMatrix'_toLinearMap₂']\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝⁸ : CommRing R\ninst✝⁷ : AddCommMonoid M₁\ninst✝⁶ : Module R M₁\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : Module R M₂\ninst✝³ : Fintype n\ninst✝² : Fintype n'\nb₁ : Basis n R M₁\nb₂ : Basis n' R M₂\nJ J₂ : Matrix n n R\nJ' : Matrix n' n' R\nA : Matrix n' n R\nA' : Matrix n n' R\nA₁ : Matrix n n R\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq n'\nh : ∀ (B B' : (n → R) →ₗ[R] (n' → R) →ₗ[R] R), B = B' ↔ ↑toMatrix₂' B = ↑toMatrix₂' B'\n⊢ Aᵀ * J' = J * A' ↔ Matrix.IsAdjointPair J J' A A'\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝⁸ : CommRing R\ninst✝⁷ : AddCommMonoid M₁\ninst✝⁶ : Module R M₁\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : Module R M₂\ninst✝³ : Fintype n\ninst✝² : Fintype n'\nb₁ : Basis n R M₁\nb₂ : Basis n' R M₂\nJ J₂ : Matrix n n R\nJ' : Matrix n' n' R\nA : Matrix n' n R\nA' : Matrix n n' R\nA₁ : Matrix n n R\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq n'\n⊢ LinearMap.IsAdjointPair (↑(toLinearMap₂ b₁ b₁) J) (↑(toLinearMap₂ b₂ b₂) J') (↑(toLin b₁ b₂) A) (↑(toLin b₂ b₁) A') ↔\n    Matrix.IsAdjointPair J J' A A'\n[PROOFSTEP]\nrw [isAdjointPair_iff_comp_eq_compl₂]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝⁸ : CommRing R\ninst✝⁷ : AddCommMonoid M₁\ninst✝⁶ : Module R M₁\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : Module R M₂\ninst✝³ : Fintype n\ninst✝² : Fintype n'\nb₁ : Basis n R M₁\nb₂ : Basis n' R M₂\nJ J₂ : Matrix n n R\nJ' : Matrix n' n' R\nA : Matrix n' n R\nA' : Matrix n n' R\nA₁ : Matrix n n R\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq n'\n⊢ comp (↑(toLinearMap₂ b₂ b₂) J') (↑(toLin b₁ b₂) A) = compl₂ (↑(toLinearMap₂ b₁ b₁) J) (↑(toLin b₂ b₁) A') ↔\n    Matrix.IsAdjointPair J J' A A'\n[PROOFSTEP]\nhave h : ∀ B B' : M₁ →ₗ[R] M₂ →ₗ[R] R, B = B' ↔ LinearMap.toMatrix₂ b₁ b₂ B = LinearMap.toMatrix₂ b₁ b₂ B' :=\n  by\n  intro B B'\n  constructor <;> intro h\n  · rw [h]\n  · exact (LinearMap.toMatrix₂ b₁ b₂).injective h\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝⁸ : CommRing R\ninst✝⁷ : AddCommMonoid M₁\ninst✝⁶ : Module R M₁\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : Module R M₂\ninst✝³ : Fintype n\ninst✝² : Fintype n'\nb₁ : Basis n R M₁\nb₂ : Basis n' R M₂\nJ J₂ : Matrix n n R\nJ' : Matrix n' n' R\nA : Matrix n' n R\nA' : Matrix n n' R\nA₁ : Matrix n n R\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq n'\n⊢ ∀ (B B' : M₁ →ₗ[R] M₂ →ₗ[R] R), B = B' ↔ ↑(toMatrix₂ b₁ b₂) B = ↑(toMatrix₂ b₁ b₂) B'\n[PROOFSTEP]\nintro B B'\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝⁸ : CommRing R\ninst✝⁷ : AddCommMonoid M₁\ninst✝⁶ : Module R M₁\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : Module R M₂\ninst✝³ : Fintype n\ninst✝² : Fintype n'\nb₁ : Basis n R M₁\nb₂ : Basis n' R M₂\nJ J₂ : Matrix n n R\nJ' : Matrix n' n' R\nA : Matrix n' n R\nA' : Matrix n n' R\nA₁ : Matrix n n R\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq n'\nB B' : M₁ →ₗ[R] M₂ →ₗ[R] R\n⊢ B = B' ↔ ↑(toMatrix₂ b₁ b₂) B = ↑(toMatrix₂ b₁ b₂) B'\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝⁸ : CommRing R\ninst✝⁷ : AddCommMonoid M₁\ninst✝⁶ : Module R M₁\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : Module R M₂\ninst✝³ : Fintype n\ninst✝² : Fintype n'\nb₁ : Basis n R M₁\nb₂ : Basis n' R M₂\nJ J₂ : Matrix n n R\nJ' : Matrix n' n' R\nA : Matrix n' n R\nA' : Matrix n n' R\nA₁ : Matrix n n R\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq n'\nB B' : M₁ →ₗ[R] M₂ →ₗ[R] R\n⊢ B = B' → ↑(toMatrix₂ b₁ b₂) B = ↑(toMatrix₂ b₁ b₂) B'\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝⁸ : CommRing R\ninst✝⁷ : AddCommMonoid M₁\ninst✝⁶ : Module R M₁\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : Module R M₂\ninst✝³ : Fintype n\ninst✝² : Fintype n'\nb₁ : Basis n R M₁\nb₂ : Basis n' R M₂\nJ J₂ : Matrix n n R\nJ' : Matrix n' n' R\nA : Matrix n' n R\nA' : Matrix n n' R\nA₁ : Matrix n n R\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq n'\nB B' : M₁ →ₗ[R] M₂ →ₗ[R] R\n⊢ ↑(toMatrix₂ b₁ b₂) B = ↑(toMatrix₂ b₁ b₂) B' → B = B'\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝⁸ : CommRing R\ninst✝⁷ : AddCommMonoid M₁\ninst✝⁶ : Module R M₁\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : Module R M₂\ninst✝³ : Fintype n\ninst✝² : Fintype n'\nb₁ : Basis n R M₁\nb₂ : Basis n' R M₂\nJ J₂ : Matrix n n R\nJ' : Matrix n' n' R\nA : Matrix n' n R\nA' : Matrix n n' R\nA₁ : Matrix n n R\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq n'\nB B' : M₁ →ₗ[R] M₂ →ₗ[R] R\nh : B = B'\n⊢ ↑(toMatrix₂ b₁ b₂) B = ↑(toMatrix₂ b₁ b₂) B'\n[PROOFSTEP]\nrw [h]\n[GOAL]\ncase mpr\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝⁸ : CommRing R\ninst✝⁷ : AddCommMonoid M₁\ninst✝⁶ : Module R M₁\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : Module R M₂\ninst✝³ : Fintype n\ninst✝² : Fintype n'\nb₁ : Basis n R M₁\nb₂ : Basis n' R M₂\nJ J₂ : Matrix n n R\nJ' : Matrix n' n' R\nA : Matrix n' n R\nA' : Matrix n n' R\nA₁ : Matrix n n R\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq n'\nB B' : M₁ →ₗ[R] M₂ →ₗ[R] R\nh : ↑(toMatrix₂ b₁ b₂) B = ↑(toMatrix₂ b₁ b₂) B'\n⊢ B = B'\n[PROOFSTEP]\nexact (LinearMap.toMatrix₂ b₁ b₂).injective h\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝⁸ : CommRing R\ninst✝⁷ : AddCommMonoid M₁\ninst✝⁶ : Module R M₁\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : Module R M₂\ninst✝³ : Fintype n\ninst✝² : Fintype n'\nb₁ : Basis n R M₁\nb₂ : Basis n' R M₂\nJ J₂ : Matrix n n R\nJ' : Matrix n' n' R\nA : Matrix n' n R\nA' : Matrix n n' R\nA₁ : Matrix n n R\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq n'\nh : ∀ (B B' : M₁ →ₗ[R] M₂ →ₗ[R] R), B = B' ↔ ↑(toMatrix₂ b₁ b₂) B = ↑(toMatrix₂ b₁ b₂) B'\n⊢ comp (↑(toLinearMap₂ b₂ b₂) J') (↑(toLin b₁ b₂) A) = compl₂ (↑(toLinearMap₂ b₁ b₁) J) (↑(toLin b₂ b₁) A') ↔\n    Matrix.IsAdjointPair J J' A A'\n[PROOFSTEP]\nsimp_rw [h, LinearMap.toMatrix₂_comp b₂ b₂, LinearMap.toMatrix₂_compl₂ b₁ b₁, LinearMap.toMatrix_toLin,\n  LinearMap.toMatrix₂_toLinearMap₂]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝⁸ : CommRing R\ninst✝⁷ : AddCommMonoid M₁\ninst✝⁶ : Module R M₁\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : Module R M₂\ninst✝³ : Fintype n\ninst✝² : Fintype n'\nb₁ : Basis n R M₁\nb₂ : Basis n' R M₂\nJ J₂ : Matrix n n R\nJ' : Matrix n' n' R\nA : Matrix n' n R\nA' : Matrix n n' R\nA₁ : Matrix n n R\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq n'\nh : ∀ (B B' : M₁ →ₗ[R] M₂ →ₗ[R] R), B = B' ↔ ↑(toMatrix₂ b₁ b₂) B = ↑(toMatrix₂ b₁ b₂) B'\n⊢ Aᵀ * J' = J * A' ↔ Matrix.IsAdjointPair J J' A A'\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝⁸ : CommRing R\ninst✝⁷ : AddCommMonoid M₁\ninst✝⁶ : Module R M₁\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : Module R M₂\ninst✝³ : Fintype n\ninst✝² : Fintype n'\nb₁ : Basis n R M₁\nb₂ : Basis n' R M₂\nJ J₂ : Matrix n n R\nJ' : Matrix n' n' R\nA : Matrix n' n R\nA' : Matrix n n' R\nA₁ : Matrix n n R\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq n'\nP : Matrix n n R\nh : IsUnit P\n⊢ IsAdjointPair (Pᵀ * J * P) (Pᵀ * J * P) A₁ A₁ ↔ IsAdjointPair J J (P * A₁ * P⁻¹) (P * A₁ * P⁻¹)\n[PROOFSTEP]\nhave h' : IsUnit P.det := P.isUnit_iff_isUnit_det.mp h\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝⁸ : CommRing R\ninst✝⁷ : AddCommMonoid M₁\ninst✝⁶ : Module R M₁\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : Module R M₂\ninst✝³ : Fintype n\ninst✝² : Fintype n'\nb₁ : Basis n R M₁\nb₂ : Basis n' R M₂\nJ J₂ : Matrix n n R\nJ' : Matrix n' n' R\nA : Matrix n' n R\nA' : Matrix n n' R\nA₁ : Matrix n n R\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq n'\nP : Matrix n n R\nh : IsUnit P\nh' : IsUnit (det P)\n⊢ IsAdjointPair (Pᵀ * J * P) (Pᵀ * J * P) A₁ A₁ ↔ IsAdjointPair J J (P * A₁ * P⁻¹) (P * A₁ * P⁻¹)\n[PROOFSTEP]\nlet u := P.nonsingInvUnit h'\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝⁸ : CommRing R\ninst✝⁷ : AddCommMonoid M₁\ninst✝⁶ : Module R M₁\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : Module R M₂\ninst✝³ : Fintype n\ninst✝² : Fintype n'\nb₁ : Basis n R M₁\nb₂ : Basis n' R M₂\nJ J₂ : Matrix n n R\nJ' : Matrix n' n' R\nA : Matrix n' n R\nA' : Matrix n n' R\nA₁ : Matrix n n R\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq n'\nP : Matrix n n R\nh : IsUnit P\nh' : IsUnit (det P)\nu : (Matrix n n R)ˣ := nonsingInvUnit P h'\n⊢ IsAdjointPair (Pᵀ * J * P) (Pᵀ * J * P) A₁ A₁ ↔ IsAdjointPair J J (P * A₁ * P⁻¹) (P * A₁ * P⁻¹)\n[PROOFSTEP]\nlet v := Pᵀ.nonsingInvUnit (P.isUnit_det_transpose h')\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝⁸ : CommRing R\ninst✝⁷ : AddCommMonoid M₁\ninst✝⁶ : Module R M₁\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : Module R M₂\ninst✝³ : Fintype n\ninst✝² : Fintype n'\nb₁ : Basis n R M₁\nb₂ : Basis n' R M₂\nJ J₂ : Matrix n n R\nJ' : Matrix n' n' R\nA : Matrix n' n R\nA' : Matrix n n' R\nA₁ : Matrix n n R\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq n'\nP : Matrix n n R\nh : IsUnit P\nh' : IsUnit (det P)\nu : (Matrix n n R)ˣ := nonsingInvUnit P h'\nv : (Matrix n n R)ˣ := nonsingInvUnit Pᵀ (_ : IsUnit (det Pᵀ))\n⊢ IsAdjointPair (Pᵀ * J * P) (Pᵀ * J * P) A₁ A₁ ↔ IsAdjointPair J J (P * A₁ * P⁻¹) (P * A₁ * P⁻¹)\n[PROOFSTEP]\nlet x := A₁ᵀ * Pᵀ * J\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝⁸ : CommRing R\ninst✝⁷ : AddCommMonoid M₁\ninst✝⁶ : Module R M₁\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : Module R M₂\ninst✝³ : Fintype n\ninst✝² : Fintype n'\nb₁ : Basis n R M₁\nb₂ : Basis n' R M₂\nJ J₂ : Matrix n n R\nJ' : Matrix n' n' R\nA : Matrix n' n R\nA' : Matrix n n' R\nA₁ : Matrix n n R\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq n'\nP : Matrix n n R\nh : IsUnit P\nh' : IsUnit (det P)\nu : (Matrix n n R)ˣ := nonsingInvUnit P h'\nv : (Matrix n n R)ˣ := nonsingInvUnit Pᵀ (_ : IsUnit (det Pᵀ))\nx : Matrix n n R := A₁ᵀ * Pᵀ * J\n⊢ IsAdjointPair (Pᵀ * J * P) (Pᵀ * J * P) A₁ A₁ ↔ IsAdjointPair J J (P * A₁ * P⁻¹) (P * A₁ * P⁻¹)\n[PROOFSTEP]\nlet y := J * P * A₁\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝⁸ : CommRing R\ninst✝⁷ : AddCommMonoid M₁\ninst✝⁶ : Module R M₁\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : Module R M₂\ninst✝³ : Fintype n\ninst✝² : Fintype n'\nb₁ : Basis n R M₁\nb₂ : Basis n' R M₂\nJ J₂ : Matrix n n R\nJ' : Matrix n' n' R\nA : Matrix n' n R\nA' : Matrix n n' R\nA₁ : Matrix n n R\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq n'\nP : Matrix n n R\nh : IsUnit P\nh' : IsUnit (det P)\nu : (Matrix n n R)ˣ := nonsingInvUnit P h'\nv : (Matrix n n R)ˣ := nonsingInvUnit Pᵀ (_ : IsUnit (det Pᵀ))\nx : Matrix n n R := A₁ᵀ * Pᵀ * J\ny : Matrix n n R := J * P * A₁\n⊢ IsAdjointPair (Pᵀ * J * P) (Pᵀ * J * P) A₁ A₁ ↔ IsAdjointPair J J (P * A₁ * P⁻¹) (P * A₁ * P⁻¹)\n[PROOFSTEP]\nsuffices x * u.val = v.val * y ↔ (v⁻¹).val * x = y * (u⁻¹).val\n  by\n  dsimp only [Matrix.IsAdjointPair]\n  simp only [Matrix.transpose_mul]\n  simp only [← mul_assoc, P.transpose_nonsing_inv]\n    -- porting note: the previous proof used `conv` and was causing timeouts, so we use `convert`\n  convert this using 2\n  · rw [mul_assoc, mul_assoc, ← mul_assoc J]\n    rfl\n  · rw [mul_assoc, mul_assoc, ← mul_assoc _ _ J]\n    rfl\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝⁸ : CommRing R\ninst✝⁷ : AddCommMonoid M₁\ninst✝⁶ : Module R M₁\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : Module R M₂\ninst✝³ : Fintype n\ninst✝² : Fintype n'\nb₁ : Basis n R M₁\nb₂ : Basis n' R M₂\nJ J₂ : Matrix n n R\nJ' : Matrix n' n' R\nA : Matrix n' n R\nA' : Matrix n n' R\nA₁ : Matrix n n R\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq n'\nP : Matrix n n R\nh : IsUnit P\nh' : IsUnit (det P)\nu : (Matrix n n R)ˣ := nonsingInvUnit P h'\nv : (Matrix n n R)ˣ := nonsingInvUnit Pᵀ (_ : IsUnit (det Pᵀ))\nx : Matrix n n R := A₁ᵀ * Pᵀ * J\ny : Matrix n n R := J * P * A₁\nthis : x * ↑u = ↑v * y ↔ ↑v⁻¹ * x = y * ↑u⁻¹\n⊢ IsAdjointPair (Pᵀ * J * P) (Pᵀ * J * P) A₁ A₁ ↔ IsAdjointPair J J (P * A₁ * P⁻¹) (P * A₁ * P⁻¹)\n[PROOFSTEP]\ndsimp only [Matrix.IsAdjointPair]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝⁸ : CommRing R\ninst✝⁷ : AddCommMonoid M₁\ninst✝⁶ : Module R M₁\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : Module R M₂\ninst✝³ : Fintype n\ninst✝² : Fintype n'\nb₁ : Basis n R M₁\nb₂ : Basis n' R M₂\nJ J₂ : Matrix n n R\nJ' : Matrix n' n' R\nA : Matrix n' n R\nA' : Matrix n n' R\nA₁ : Matrix n n R\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq n'\nP : Matrix n n R\nh : IsUnit P\nh' : IsUnit (det P)\nu : (Matrix n n R)ˣ := nonsingInvUnit P h'\nv : (Matrix n n R)ˣ := nonsingInvUnit Pᵀ (_ : IsUnit (det Pᵀ))\nx : Matrix n n R := A₁ᵀ * Pᵀ * J\ny : Matrix n n R := J * P * A₁\nthis : x * ↑u = ↑v * y ↔ ↑v⁻¹ * x = y * ↑u⁻¹\n⊢ A₁ᵀ * (Pᵀ * J * P) = Pᵀ * J * P * A₁ ↔ (P * A₁ * P⁻¹)ᵀ * J = J * (P * A₁ * P⁻¹)\n[PROOFSTEP]\nsimp only [Matrix.transpose_mul]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝⁸ : CommRing R\ninst✝⁷ : AddCommMonoid M₁\ninst✝⁶ : Module R M₁\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : Module R M₂\ninst✝³ : Fintype n\ninst✝² : Fintype n'\nb₁ : Basis n R M₁\nb₂ : Basis n' R M₂\nJ J₂ : Matrix n n R\nJ' : Matrix n' n' R\nA : Matrix n' n R\nA' : Matrix n n' R\nA₁ : Matrix n n R\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq n'\nP : Matrix n n R\nh : IsUnit P\nh' : IsUnit (det P)\nu : (Matrix n n R)ˣ := nonsingInvUnit P h'\nv : (Matrix n n R)ˣ := nonsingInvUnit Pᵀ (_ : IsUnit (det Pᵀ))\nx : Matrix n n R := A₁ᵀ * Pᵀ * J\ny : Matrix n n R := J * P * A₁\nthis : x * ↑u = ↑v * y ↔ ↑v⁻¹ * x = y * ↑u⁻¹\n⊢ A₁ᵀ * (Pᵀ * J * P) = Pᵀ * J * P * A₁ ↔ P⁻¹ᵀ * (A₁ᵀ * Pᵀ) * J = J * (P * A₁ * P⁻¹)\n[PROOFSTEP]\nsimp only [← mul_assoc, P.transpose_nonsing_inv]\n  -- porting note: the previous proof used `conv` and was causing timeouts, so we use `convert`\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝⁸ : CommRing R\ninst✝⁷ : AddCommMonoid M₁\ninst✝⁶ : Module R M₁\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : Module R M₂\ninst✝³ : Fintype n\ninst✝² : Fintype n'\nb₁ : Basis n R M₁\nb₂ : Basis n' R M₂\nJ J₂ : Matrix n n R\nJ' : Matrix n' n' R\nA : Matrix n' n R\nA' : Matrix n n' R\nA₁ : Matrix n n R\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq n'\nP : Matrix n n R\nh : IsUnit P\nh' : IsUnit (det P)\nu : (Matrix n n R)ˣ := nonsingInvUnit P h'\nv : (Matrix n n R)ˣ := nonsingInvUnit Pᵀ (_ : IsUnit (det Pᵀ))\nx : Matrix n n R := A₁ᵀ * Pᵀ * J\ny : Matrix n n R := J * P * A₁\nthis : x * ↑u = ↑v * y ↔ ↑v⁻¹ * x = y * ↑u⁻¹\n⊢ A₁ᵀ * Pᵀ * J * P = Pᵀ * J * P * A₁ ↔ Pᵀ⁻¹ * A₁ᵀ * Pᵀ * J = J * P * A₁ * P⁻¹\n[PROOFSTEP]\nconvert this using 2\n[GOAL]\ncase h.e'_1.h.e'_3\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝⁸ : CommRing R\ninst✝⁷ : AddCommMonoid M₁\ninst✝⁶ : Module R M₁\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : Module R M₂\ninst✝³ : Fintype n\ninst✝² : Fintype n'\nb₁ : Basis n R M₁\nb₂ : Basis n' R M₂\nJ J₂ : Matrix n n R\nJ' : Matrix n' n' R\nA : Matrix n' n R\nA' : Matrix n n' R\nA₁ : Matrix n n R\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq n'\nP : Matrix n n R\nh : IsUnit P\nh' : IsUnit (det P)\nu : (Matrix n n R)ˣ := nonsingInvUnit P h'\nv : (Matrix n n R)ˣ := nonsingInvUnit Pᵀ (_ : IsUnit (det Pᵀ))\nx : Matrix n n R := A₁ᵀ * Pᵀ * J\ny : Matrix n n R := J * P * A₁\nthis : x * ↑u = ↑v * y ↔ ↑v⁻¹ * x = y * ↑u⁻¹\n⊢ Pᵀ * J * P * A₁ = ↑v * y\n[PROOFSTEP]\nrw [mul_assoc, mul_assoc, ← mul_assoc J]\n[GOAL]\ncase h.e'_1.h.e'_3\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝⁸ : CommRing R\ninst✝⁷ : AddCommMonoid M₁\ninst✝⁶ : Module R M₁\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : Module R M₂\ninst✝³ : Fintype n\ninst✝² : Fintype n'\nb₁ : Basis n R M₁\nb₂ : Basis n' R M₂\nJ J₂ : Matrix n n R\nJ' : Matrix n' n' R\nA : Matrix n' n R\nA' : Matrix n n' R\nA₁ : Matrix n n R\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq n'\nP : Matrix n n R\nh : IsUnit P\nh' : IsUnit (det P)\nu : (Matrix n n R)ˣ := nonsingInvUnit P h'\nv : (Matrix n n R)ˣ := nonsingInvUnit Pᵀ (_ : IsUnit (det Pᵀ))\nx : Matrix n n R := A₁ᵀ * Pᵀ * J\ny : Matrix n n R := J * P * A₁\nthis : x * ↑u = ↑v * y ↔ ↑v⁻¹ * x = y * ↑u⁻¹\n⊢ Pᵀ * (J * P * A₁) = ↑v * y\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h.e'_2.h.e'_2\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝⁸ : CommRing R\ninst✝⁷ : AddCommMonoid M₁\ninst✝⁶ : Module R M₁\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : Module R M₂\ninst✝³ : Fintype n\ninst✝² : Fintype n'\nb₁ : Basis n R M₁\nb₂ : Basis n' R M₂\nJ J₂ : Matrix n n R\nJ' : Matrix n' n' R\nA : Matrix n' n R\nA' : Matrix n n' R\nA₁ : Matrix n n R\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq n'\nP : Matrix n n R\nh : IsUnit P\nh' : IsUnit (det P)\nu : (Matrix n n R)ˣ := nonsingInvUnit P h'\nv : (Matrix n n R)ˣ := nonsingInvUnit Pᵀ (_ : IsUnit (det Pᵀ))\nx : Matrix n n R := A₁ᵀ * Pᵀ * J\ny : Matrix n n R := J * P * A₁\nthis : x * ↑u = ↑v * y ↔ ↑v⁻¹ * x = y * ↑u⁻¹\n⊢ Pᵀ⁻¹ * A₁ᵀ * Pᵀ * J = ↑v⁻¹ * x\n[PROOFSTEP]\nrw [mul_assoc, mul_assoc, ← mul_assoc _ _ J]\n[GOAL]\ncase h.e'_2.h.e'_2\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝⁸ : CommRing R\ninst✝⁷ : AddCommMonoid M₁\ninst✝⁶ : Module R M₁\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : Module R M₂\ninst✝³ : Fintype n\ninst✝² : Fintype n'\nb₁ : Basis n R M₁\nb₂ : Basis n' R M₂\nJ J₂ : Matrix n n R\nJ' : Matrix n' n' R\nA : Matrix n' n R\nA' : Matrix n n' R\nA₁ : Matrix n n R\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq n'\nP : Matrix n n R\nh : IsUnit P\nh' : IsUnit (det P)\nu : (Matrix n n R)ˣ := nonsingInvUnit P h'\nv : (Matrix n n R)ˣ := nonsingInvUnit Pᵀ (_ : IsUnit (det Pᵀ))\nx : Matrix n n R := A₁ᵀ * Pᵀ * J\ny : Matrix n n R := J * P * A₁\nthis : x * ↑u = ↑v * y ↔ ↑v⁻¹ * x = y * ↑u⁻¹\n⊢ Pᵀ⁻¹ * (A₁ᵀ * Pᵀ * J) = ↑v⁻¹ * x\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝⁸ : CommRing R\ninst✝⁷ : AddCommMonoid M₁\ninst✝⁶ : Module R M₁\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : Module R M₂\ninst✝³ : Fintype n\ninst✝² : Fintype n'\nb₁ : Basis n R M₁\nb₂ : Basis n' R M₂\nJ J₂ : Matrix n n R\nJ' : Matrix n' n' R\nA : Matrix n' n R\nA' : Matrix n n' R\nA₁ : Matrix n n R\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq n'\nP : Matrix n n R\nh : IsUnit P\nh' : IsUnit (det P)\nu : (Matrix n n R)ˣ := nonsingInvUnit P h'\nv : (Matrix n n R)ˣ := nonsingInvUnit Pᵀ (_ : IsUnit (det Pᵀ))\nx : Matrix n n R := A₁ᵀ * Pᵀ * J\ny : Matrix n n R := J * P * A₁\n⊢ x * ↑u = ↑v * y ↔ ↑v⁻¹ * x = y * ↑u⁻¹\n[PROOFSTEP]\nrw [Units.eq_mul_inv_iff_mul_eq]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝⁸ : CommRing R\ninst✝⁷ : AddCommMonoid M₁\ninst✝⁶ : Module R M₁\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : Module R M₂\ninst✝³ : Fintype n\ninst✝² : Fintype n'\nb₁ : Basis n R M₁\nb₂ : Basis n' R M₂\nJ J₂ : Matrix n n R\nJ' : Matrix n' n' R\nA : Matrix n' n R\nA' : Matrix n n' R\nA₁ : Matrix n n R\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq n'\nP : Matrix n n R\nh : IsUnit P\nh' : IsUnit (det P)\nu : (Matrix n n R)ˣ := nonsingInvUnit P h'\nv : (Matrix n n R)ˣ := nonsingInvUnit Pᵀ (_ : IsUnit (det Pᵀ))\nx : Matrix n n R := A₁ᵀ * Pᵀ * J\ny : Matrix n n R := J * P * A₁\n⊢ x * ↑u = ↑v * y ↔ ↑v⁻¹ * x * ↑u = y\n[PROOFSTEP]\nconv_rhs => rw [mul_assoc]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝⁸ : CommRing R\ninst✝⁷ : AddCommMonoid M₁\ninst✝⁶ : Module R M₁\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : Module R M₂\ninst✝³ : Fintype n\ninst✝² : Fintype n'\nb₁ : Basis n R M₁\nb₂ : Basis n' R M₂\nJ J₂ : Matrix n n R\nJ' : Matrix n' n' R\nA : Matrix n' n R\nA' : Matrix n n' R\nA₁ : Matrix n n R\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq n'\nP : Matrix n n R\nh : IsUnit P\nh' : IsUnit (det P)\nu : (Matrix n n R)ˣ := nonsingInvUnit P h'\nv : (Matrix n n R)ˣ := nonsingInvUnit Pᵀ (_ : IsUnit (det Pᵀ))\nx : Matrix n n R := A₁ᵀ * Pᵀ * J\ny : Matrix n n R := J * P * A₁\n| ↑v⁻¹ * x * ↑u = y\n[PROOFSTEP]\nrw [mul_assoc]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝⁸ : CommRing R\ninst✝⁷ : AddCommMonoid M₁\ninst✝⁶ : Module R M₁\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : Module R M₂\ninst✝³ : Fintype n\ninst✝² : Fintype n'\nb₁ : Basis n R M₁\nb₂ : Basis n' R M₂\nJ J₂ : Matrix n n R\nJ' : Matrix n' n' R\nA : Matrix n' n R\nA' : Matrix n n' R\nA₁ : Matrix n n R\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq n'\nP : Matrix n n R\nh : IsUnit P\nh' : IsUnit (det P)\nu : (Matrix n n R)ˣ := nonsingInvUnit P h'\nv : (Matrix n n R)ˣ := nonsingInvUnit Pᵀ (_ : IsUnit (det Pᵀ))\nx : Matrix n n R := A₁ᵀ * Pᵀ * J\ny : Matrix n n R := J * P * A₁\n| ↑v⁻¹ * x * ↑u = y\n[PROOFSTEP]\nrw [mul_assoc]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝⁸ : CommRing R\ninst✝⁷ : AddCommMonoid M₁\ninst✝⁶ : Module R M₁\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : Module R M₂\ninst✝³ : Fintype n\ninst✝² : Fintype n'\nb₁ : Basis n R M₁\nb₂ : Basis n' R M₂\nJ J₂ : Matrix n n R\nJ' : Matrix n' n' R\nA : Matrix n' n R\nA' : Matrix n n' R\nA₁ : Matrix n n R\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq n'\nP : Matrix n n R\nh : IsUnit P\nh' : IsUnit (det P)\nu : (Matrix n n R)ˣ := nonsingInvUnit P h'\nv : (Matrix n n R)ˣ := nonsingInvUnit Pᵀ (_ : IsUnit (det Pᵀ))\nx : Matrix n n R := A₁ᵀ * Pᵀ * J\ny : Matrix n n R := J * P * A₁\n| ↑v⁻¹ * x * ↑u = y\n[PROOFSTEP]\nrw [mul_assoc]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝⁸ : CommRing R\ninst✝⁷ : AddCommMonoid M₁\ninst✝⁶ : Module R M₁\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : Module R M₂\ninst✝³ : Fintype n\ninst✝² : Fintype n'\nb₁ : Basis n R M₁\nb₂ : Basis n' R M₂\nJ J₂ : Matrix n n R\nJ' : Matrix n' n' R\nA : Matrix n' n R\nA' : Matrix n n' R\nA₁ : Matrix n n R\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq n'\nP : Matrix n n R\nh : IsUnit P\nh' : IsUnit (det P)\nu : (Matrix n n R)ˣ := nonsingInvUnit P h'\nv : (Matrix n n R)ˣ := nonsingInvUnit Pᵀ (_ : IsUnit (det Pᵀ))\nx : Matrix n n R := A₁ᵀ * Pᵀ * J\ny : Matrix n n R := J * P * A₁\n⊢ x * ↑u = ↑v * y ↔ ↑v⁻¹ * (x * ↑u) = y\n[PROOFSTEP]\nrw [v.inv_mul_eq_iff_eq_mul]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝⁸ : CommRing R\ninst✝⁷ : AddCommMonoid M₁\ninst✝⁶ : Module R M₁\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : Module R M₂\ninst✝³ : Fintype n\ninst✝² : Fintype n'\nb₁ : Basis n R M₁\nb₂ : Basis n' R M₂\nJ J₂ : Matrix n n R\nJ' : Matrix n' n' R\nA : Matrix n' n R\nA' : Matrix n n' R\nA₁ : Matrix n n R\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq n'\n⊢ A₁ ∈ pairSelfAdjointMatricesSubmodule J J₂ ↔ Matrix.IsAdjointPair J J₂ A₁ A₁\n[PROOFSTEP]\nsimp only [pairSelfAdjointMatricesSubmodule, LinearEquiv.coe_coe, LinearMap.toMatrix'_apply, Submodule.mem_map,\n  mem_isPairSelfAdjointSubmodule]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝⁸ : CommRing R\ninst✝⁷ : AddCommMonoid M₁\ninst✝⁶ : Module R M₁\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : Module R M₂\ninst✝³ : Fintype n\ninst✝² : Fintype n'\nb₁ : Basis n R M₁\nb₂ : Basis n' R M₂\nJ J₂ : Matrix n n R\nJ' : Matrix n' n' R\nA : Matrix n' n R\nA' : Matrix n n' R\nA₁ : Matrix n n R\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq n'\n⊢ (∃ y, IsPairSelfAdjoint (↑toLinearMap₂' J) (↑toLinearMap₂' J₂) y ∧ ↑toMatrix' y = A₁) ↔\n    Matrix.IsAdjointPair J J₂ A₁ A₁\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝⁸ : CommRing R\ninst✝⁷ : AddCommMonoid M₁\ninst✝⁶ : Module R M₁\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : Module R M₂\ninst✝³ : Fintype n\ninst✝² : Fintype n'\nb₁ : Basis n R M₁\nb₂ : Basis n' R M₂\nJ J₂ : Matrix n n R\nJ' : Matrix n' n' R\nA : Matrix n' n R\nA' : Matrix n n' R\nA₁ : Matrix n n R\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq n'\n⊢ (∃ y, IsPairSelfAdjoint (↑toLinearMap₂' J) (↑toLinearMap₂' J₂) y ∧ ↑toMatrix' y = A₁) →\n    Matrix.IsAdjointPair J J₂ A₁ A₁\n[PROOFSTEP]\nrintro ⟨f, hf, hA⟩\n[GOAL]\ncase mp.intro.intro\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝⁸ : CommRing R\ninst✝⁷ : AddCommMonoid M₁\ninst✝⁶ : Module R M₁\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : Module R M₂\ninst✝³ : Fintype n\ninst✝² : Fintype n'\nb₁ : Basis n R M₁\nb₂ : Basis n' R M₂\nJ J₂ : Matrix n n R\nJ' : Matrix n' n' R\nA : Matrix n' n R\nA' : Matrix n n' R\nA₁ : Matrix n n R\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq n'\nf : Module.End R (n → R)\nhf : IsPairSelfAdjoint (↑toLinearMap₂' J) (↑toLinearMap₂' J₂) f\nhA : ↑toMatrix' f = A₁\n⊢ Matrix.IsAdjointPair J J₂ A₁ A₁\n[PROOFSTEP]\nhave hf' : f = toLin' A₁ := by rw [← hA, Matrix.toLin'_toMatrix']\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝⁸ : CommRing R\ninst✝⁷ : AddCommMonoid M₁\ninst✝⁶ : Module R M₁\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : Module R M₂\ninst✝³ : Fintype n\ninst✝² : Fintype n'\nb₁ : Basis n R M₁\nb₂ : Basis n' R M₂\nJ J₂ : Matrix n n R\nJ' : Matrix n' n' R\nA : Matrix n' n R\nA' : Matrix n n' R\nA₁ : Matrix n n R\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq n'\nf : Module.End R (n → R)\nhf : IsPairSelfAdjoint (↑toLinearMap₂' J) (↑toLinearMap₂' J₂) f\nhA : ↑toMatrix' f = A₁\n⊢ f = ↑toLin' A₁\n[PROOFSTEP]\nrw [← hA, Matrix.toLin'_toMatrix']\n[GOAL]\ncase mp.intro.intro\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝⁸ : CommRing R\ninst✝⁷ : AddCommMonoid M₁\ninst✝⁶ : Module R M₁\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : Module R M₂\ninst✝³ : Fintype n\ninst✝² : Fintype n'\nb₁ : Basis n R M₁\nb₂ : Basis n' R M₂\nJ J₂ : Matrix n n R\nJ' : Matrix n' n' R\nA : Matrix n' n R\nA' : Matrix n n' R\nA₁ : Matrix n n R\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq n'\nf : Module.End R (n → R)\nhf : IsPairSelfAdjoint (↑toLinearMap₂' J) (↑toLinearMap₂' J₂) f\nhA : ↑toMatrix' f = A₁\nhf' : f = ↑toLin' A₁\n⊢ Matrix.IsAdjointPair J J₂ A₁ A₁\n[PROOFSTEP]\nrw [hf'] at hf \n[GOAL]\ncase mp.intro.intro\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝⁸ : CommRing R\ninst✝⁷ : AddCommMonoid M₁\ninst✝⁶ : Module R M₁\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : Module R M₂\ninst✝³ : Fintype n\ninst✝² : Fintype n'\nb₁ : Basis n R M₁\nb₂ : Basis n' R M₂\nJ J₂ : Matrix n n R\nJ' : Matrix n' n' R\nA : Matrix n' n R\nA' : Matrix n n' R\nA₁ : Matrix n n R\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq n'\nf : Module.End R (n → R)\nhf : IsPairSelfAdjoint (↑toLinearMap₂' J) (↑toLinearMap₂' J₂) (↑toLin' A₁)\nhA : ↑toMatrix' f = A₁\nhf' : f = ↑toLin' A₁\n⊢ Matrix.IsAdjointPair J J₂ A₁ A₁\n[PROOFSTEP]\nrw [← isAdjointPair_toLinearMap₂']\n[GOAL]\ncase mp.intro.intro\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝⁸ : CommRing R\ninst✝⁷ : AddCommMonoid M₁\ninst✝⁶ : Module R M₁\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : Module R M₂\ninst✝³ : Fintype n\ninst✝² : Fintype n'\nb₁ : Basis n R M₁\nb₂ : Basis n' R M₂\nJ J₂ : Matrix n n R\nJ' : Matrix n' n' R\nA : Matrix n' n R\nA' : Matrix n n' R\nA₁ : Matrix n n R\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq n'\nf : Module.End R (n → R)\nhf : IsPairSelfAdjoint (↑toLinearMap₂' J) (↑toLinearMap₂' J₂) (↑toLin' A₁)\nhA : ↑toMatrix' f = A₁\nhf' : f = ↑toLin' A₁\n⊢ LinearMap.IsAdjointPair (↑toLinearMap₂' J) (↑toLinearMap₂' J₂) (↑toLin' A₁) (↑toLin' A₁)\n[PROOFSTEP]\nexact hf\n[GOAL]\ncase mpr\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝⁸ : CommRing R\ninst✝⁷ : AddCommMonoid M₁\ninst✝⁶ : Module R M₁\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : Module R M₂\ninst✝³ : Fintype n\ninst✝² : Fintype n'\nb₁ : Basis n R M₁\nb₂ : Basis n' R M₂\nJ J₂ : Matrix n n R\nJ' : Matrix n' n' R\nA : Matrix n' n R\nA' : Matrix n n' R\nA₁ : Matrix n n R\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq n'\n⊢ Matrix.IsAdjointPair J J₂ A₁ A₁ → ∃ y, IsPairSelfAdjoint (↑toLinearMap₂' J) (↑toLinearMap₂' J₂) y ∧ ↑toMatrix' y = A₁\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝⁸ : CommRing R\ninst✝⁷ : AddCommMonoid M₁\ninst✝⁶ : Module R M₁\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : Module R M₂\ninst✝³ : Fintype n\ninst✝² : Fintype n'\nb₁ : Basis n R M₁\nb₂ : Basis n' R M₂\nJ J₂ : Matrix n n R\nJ' : Matrix n' n' R\nA : Matrix n' n R\nA' : Matrix n n' R\nA₁ : Matrix n n R\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq n'\nh : Matrix.IsAdjointPair J J₂ A₁ A₁\n⊢ ∃ y, IsPairSelfAdjoint (↑toLinearMap₂' J) (↑toLinearMap₂' J₂) y ∧ ↑toMatrix' y = A₁\n[PROOFSTEP]\nrefine' ⟨toLin' A₁, _, LinearMap.toMatrix'_toLin' _⟩\n[GOAL]\ncase mpr\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝⁸ : CommRing R\ninst✝⁷ : AddCommMonoid M₁\ninst✝⁶ : Module R M₁\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : Module R M₂\ninst✝³ : Fintype n\ninst✝² : Fintype n'\nb₁ : Basis n R M₁\nb₂ : Basis n' R M₂\nJ J₂ : Matrix n n R\nJ' : Matrix n' n' R\nA : Matrix n' n R\nA' : Matrix n n' R\nA₁ : Matrix n n R\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq n'\nh : Matrix.IsAdjointPair J J₂ A₁ A₁\n⊢ IsPairSelfAdjoint (↑toLinearMap₂' J) (↑toLinearMap₂' J₂) (↑toLin' A₁)\n[PROOFSTEP]\nexact (isAdjointPair_toLinearMap₂' _ _ _ _).mpr h\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝⁸ : CommRing R\ninst✝⁷ : AddCommMonoid M₁\ninst✝⁶ : Module R M₁\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : Module R M₂\ninst✝³ : Fintype n\ninst✝² : Fintype n'\nb₁ : Basis n R M₁\nb₂ : Basis n' R M₂\nJ J₂ : Matrix n n R\nJ' : Matrix n' n' R\nA : Matrix n' n R\nA' : Matrix n n' R\nA₁ : Matrix n n R\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq n'\n⊢ A₁ ∈ selfAdjointMatricesSubmodule J ↔ Matrix.IsSelfAdjoint J A₁\n[PROOFSTEP]\nerw [mem_pairSelfAdjointMatricesSubmodule]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝⁸ : CommRing R\ninst✝⁷ : AddCommMonoid M₁\ninst✝⁶ : Module R M₁\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : Module R M₂\ninst✝³ : Fintype n\ninst✝² : Fintype n'\nb₁ : Basis n R M₁\nb₂ : Basis n' R M₂\nJ J₂ : Matrix n n R\nJ' : Matrix n' n' R\nA : Matrix n' n R\nA' : Matrix n n' R\nA₁ : Matrix n n R\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq n'\n⊢ Matrix.IsAdjointPair J J A₁ A₁ ↔ Matrix.IsSelfAdjoint J A₁\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝⁸ : CommRing R\ninst✝⁷ : AddCommMonoid M₁\ninst✝⁶ : Module R M₁\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : Module R M₂\ninst✝³ : Fintype n\ninst✝² : Fintype n'\nb₁ : Basis n R M₁\nb₂ : Basis n' R M₂\nJ J₂ : Matrix n n R\nJ' : Matrix n' n' R\nA : Matrix n' n R\nA' : Matrix n n' R\nA₁ : Matrix n n R\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq n'\n⊢ A₁ ∈ skewAdjointMatricesSubmodule J ↔ Matrix.IsSkewAdjoint J A₁\n[PROOFSTEP]\nerw [mem_pairSelfAdjointMatricesSubmodule]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝⁸ : CommRing R\ninst✝⁷ : AddCommMonoid M₁\ninst✝⁶ : Module R M₁\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : Module R M₂\ninst✝³ : Fintype n\ninst✝² : Fintype n'\nb₁ : Basis n R M₁\nb₂ : Basis n' R M₂\nJ J₂ : Matrix n n R\nJ' : Matrix n' n' R\nA : Matrix n' n R\nA' : Matrix n n' R\nA₁ : Matrix n n R\ninst✝¹ : DecidableEq n\ninst✝ : DecidableEq n'\n⊢ Matrix.IsAdjointPair (-J) J A₁ A₁ ↔ Matrix.IsSkewAdjoint J A₁\n[PROOFSTEP]\nsimp [Matrix.IsSkewAdjoint, Matrix.IsAdjointPair]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM✝ : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝⁴ : CommRing R₁\ninst✝³ : AddCommMonoid M₁\ninst✝² : Module R₁ M₁\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nB : M₁ →ₗ[R₁] M₁ →ₗ[R₁] R₁\nM : Matrix ι ι R₁\nh : Matrix.Nondegenerate M\nx : ι → R₁\nhx : ∀ (y : ι → R₁), ↑(↑(↑Matrix.toLinearMap₂' M) x) y = 0\ny : ι → R₁\n⊢ x ⬝ᵥ mulVec M y = 0\n[PROOFSTEP]\nsimpa only [toLinearMap₂'_apply'] using hx y\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM✝ : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝⁴ : CommRing R₁\ninst✝³ : AddCommMonoid M₁\ninst✝² : Module R₁ M₁\ninst✝¹ : DecidableEq ι\ninst✝ : Fintype ι\nB : M₁ →ₗ[R₁] M₁ →ₗ[R₁] R₁\nM : Matrix ι ι R₁\nb : Basis ι R₁ M₁\n⊢ SeparatingLeft (↑(toLinearMap₂ b b) M) ↔ Matrix.Nondegenerate M\n[PROOFSTEP]\nrw [← Matrix.separatingLeft_toLinearMap₂'_iff_separatingLeft_toLinearMap₂, Matrix.separatingLeft_toLinearMap₂'_iff]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM✝ : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝⁵ : CommRing R₁\ninst✝⁴ : AddCommMonoid M₁\ninst✝³ : Module R₁ M₁\ninst✝² : DecidableEq ι\ninst✝¹ : Fintype ι\nB : M₁ →ₗ[R₁] M₁ →ₗ[R₁] R₁\ninst✝ : IsDomain R₁\nM : Matrix ι ι R₁\n⊢ SeparatingLeft (↑toLinearMap₂' M) ↔ det M ≠ 0\n[PROOFSTEP]\nrw [Matrix.separatingLeft_toLinearMap₂'_iff, Matrix.nondegenerate_iff_det_ne_zero]\n[GOAL]\nR : Type u_1\nR₁ : Type u_2\nR₂ : Type u_3\nM : Type u_4\nM₁ : Type u_5\nM₂ : Type u_6\nM₁' : Type u_7\nM₂' : Type u_8\nn : Type u_9\nm : Type u_10\nn' : Type u_11\nm' : Type u_12\nι : Type u_13\ninst✝⁵ : CommRing R₁\ninst✝⁴ : AddCommMonoid M₁\ninst✝³ : Module R₁ M₁\ninst✝² : DecidableEq ι\ninst✝¹ : Fintype ι\nB✝ : M₁ →ₗ[R₁] M₁ →ₗ[R₁] R₁\ninst✝ : IsDomain R₁\nB : M₁ →ₗ[R₁] M₁ →ₗ[R₁] R₁\nb : Basis ι R₁ M₁\n⊢ SeparatingLeft B ↔ det (↑(toMatrix₂ b b) B) ≠ 0\n[PROOFSTEP]\nrw [← Matrix.nondegenerate_iff_det_ne_zero, nondegenerate_toMatrix_iff]\n", "meta": {"mathlib_filename": "Mathlib.LinearAlgebra.Matrix.SesquilinearForm", "llama_tokens": 60072, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7879311856832191, "lm_q2_score": 0.665410572017153, "lm_q1q2_score": 0.5242977409756244}}
{"text": "[GOAL]\nK : Type u\ninst✝ : CommRing K\nx y : FractionRing K[X]\nxy : { toFractionRing := x }.toFractionRing = { toFractionRing := y }.toFractionRing\n⊢ { toFractionRing := x } = { toFractionRing := y }\n[PROOFSTEP]\nsubst xy\n[GOAL]\nK : Type u\ninst✝ : CommRing K\nx : FractionRing K[X]\n⊢ { toFractionRing := x } = { toFractionRing := { toFractionRing := x }.toFractionRing }\n[PROOFSTEP]\nrfl\n[GOAL]\nK : Type u\ninst✝ : CommRing K\nP : Sort v\nx : RatFunc K\nf : K[X] → K[X] → P\nH : ∀ {p q p' q' : K[X]}, q ∈ K[X]⁰ → q' ∈ K[X]⁰ → q' * p = q * p' → f p q = f p' q'\n⊢ P\n[PROOFSTEP]\nrefine Localization.liftOn (toFractionRing x) (fun p q => f p q) ?_\n[GOAL]\nK : Type u\ninst✝ : CommRing K\nP : Sort v\nx : RatFunc K\nf : K[X] → K[X] → P\nH : ∀ {p q p' q' : K[X]}, q ∈ K[X]⁰ → q' ∈ K[X]⁰ → q' * p = q * p' → f p q = f p' q'\n⊢ ∀ {a c : K[X]} {b d : { x // x ∈ K[X]⁰ }},\n    ↑(Localization.r K[X]⁰) (a, b) (c, d) → (fun p q => f p ↑q) a b = (fun p q => f p ↑q) c d\n[PROOFSTEP]\nintros p p' q q' h\n[GOAL]\nK : Type u\ninst✝ : CommRing K\nP : Sort v\nx : RatFunc K\nf : K[X] → K[X] → P\nH : ∀ {p q p' q' : K[X]}, q ∈ K[X]⁰ → q' ∈ K[X]⁰ → q' * p = q * p' → f p q = f p' q'\np p' : K[X]\nq q' : { x // x ∈ K[X]⁰ }\nh : ↑(Localization.r K[X]⁰) (p, q) (p', q')\n⊢ (fun p q => f p ↑q) p q = (fun p q => f p ↑q) p' q'\n[PROOFSTEP]\nexact\n  H q.2 q'.2\n    (let ⟨⟨c, hc⟩, mul_eq⟩ := Localization.r_iff_exists.mp h\n    mul_cancel_left_coe_nonZeroDivisors.mp mul_eq)\n      -- porting note: the definition above was as follows\n      --    (-- Fix timeout by manipulating elaboration order\n      --    fun p q => f p q)\n      --    fun p p' q q' h => by\n      --    exact H q.2 q'.2\n      --      (let ⟨⟨c, hc⟩, mul_eq⟩ := Localization.r_iff_exists.mp h\n      --      mul_cancel_left_coe_nonZeroDivisors.mp mul_eq)\n[GOAL]\nK : Type u\ninst✝ : CommRing K\nP : Sort v\nn : K[X]\nd : { x // x ∈ K[X]⁰ }\nf : K[X] → K[X] → P\nH : ∀ {p q p' q' : K[X]}, q ∈ K[X]⁰ → q' ∈ K[X]⁰ → q' * p = q * p' → f p q = f p' q'\n⊢ RatFunc.liftOn { toFractionRing := Localization.mk n d } f H = f n ↑d\n[PROOFSTEP]\nrw [RatFunc.liftOn]\n[GOAL]\nK : Type u\ninst✝ : CommRing K\nP : Sort v\nn : K[X]\nd : { x // x ∈ K[X]⁰ }\nf : K[X] → K[X] → P\nH : ∀ {p q p' q' : K[X]}, q ∈ K[X]⁰ → q' ∈ K[X]⁰ → q' * p = q * p' → f p q = f p' q'\n⊢ Localization.liftOn { toFractionRing := Localization.mk n d }.toFractionRing (fun p q => f p ↑q)\n      (_ : ∀ {p p' : K[X]} {q q' : { x // x ∈ K[X]⁰ }}, ↑(Localization.r K[X]⁰) (p, q) (p', q') → f p ↑q = f p' ↑q') =\n    f n ↑d\n[PROOFSTEP]\nexact Localization.liftOn_mk _ _ _ _\n[GOAL]\nK : Type u\ninst✝ : CommRing K\nP : Sort v\nf : K[X] → K[X] → P\nH : ∀ {p q a : K[X]}, q ≠ 0 → a ≠ 0 → f (a * p) (a * q) = f p q\np q p' q' : K[X]\nhq : q ≠ 0\nhq' : q' ≠ 0\nh : q' * p = q * p'\n⊢ f (q' * p) (q' * q) = f (q * p') (q * q')\n[PROOFSTEP]\nrw [h, mul_comm q']\n[GOAL]\nK : Type u\ninst✝¹ : CommRing K\ninst✝ : IsDomain K\np q : K[X]\n⊢ RatFunc.mk p q =\n    { toFractionRing := ↑(algebraMap K[X] (FractionRing K[X])) p / ↑(algebraMap K[X] (FractionRing K[X])) q }\n[PROOFSTEP]\nrw [RatFunc.mk]\n[GOAL]\nK : Type u\ninst✝¹ : CommRing K\ninst✝ : IsDomain K\np : K[X]\n⊢ RatFunc.mk p 0 = { toFractionRing := 0 }\n[PROOFSTEP]\nrw [mk_eq_div', RingHom.map_zero, div_zero]\n[GOAL]\nK : Type u\ninst✝¹ : CommRing K\ninst✝ : IsDomain K\np : K[X]\nq : { x // x ∈ K[X]⁰ }\n⊢ RatFunc.mk p ↑q = { toFractionRing := IsLocalization.mk' (FractionRing K[X]) p q }\n[PROOFSTEP]\nsimp only [mk_eq_div', ← Localization.mk_eq_mk', FractionRing.mk_eq_div]\n[GOAL]\nK : Type u\ninst✝¹ : CommRing K\ninst✝ : IsDomain K\np q : K[X]\nhq : q ∈ K[X]⁰\n⊢ RatFunc.mk p q = { toFractionRing := IsLocalization.mk' (FractionRing K[X]) p { val := q, property := hq } }\n[PROOFSTEP]\nsimp only [← mk_coe_def]\n[GOAL]\nK : Type u\ninst✝¹ : CommRing K\ninst✝ : IsDomain K\np q : K[X]\nhq : q ≠ 0\n⊢ RatFunc.mk p q = { toFractionRing := Localization.mk p { val := q, property := (_ : q ∈ K[X]⁰) } }\n[PROOFSTEP]\nrw [mk_def_of_ne, Localization.mk_eq_mk']\n[GOAL]\ncase hq\nK : Type u\ninst✝¹ : CommRing K\ninst✝ : IsDomain K\np q : K[X]\nhq : q ≠ 0\n⊢ q ≠ 0\n[PROOFSTEP]\nexact hq\n[GOAL]\nK : Type u\ninst✝¹ : CommRing K\ninst✝ : IsDomain K\np : K[X]\n⊢ RatFunc.mk p 1 = { toFractionRing := ↑(algebraMap K[X] (FractionRing K[X])) p }\n[PROOFSTEP]\nrw [← IsLocalization.mk'_one (M := K[X]⁰) (FractionRing K[X]) p, ← mk_coe_def, Submonoid.coe_one]\n[GOAL]\nK : Type u\ninst✝¹ : CommRing K\ninst✝ : IsDomain K\np q p' q' : K[X]\nhq : q ≠ 0\nhq' : q' ≠ 0\n⊢ RatFunc.mk p q = RatFunc.mk p' q' ↔ p * q' = p' * q\n[PROOFSTEP]\nrw [mk_def_of_ne _ hq, mk_def_of_ne _ hq', ofFractionRing_injective.eq_iff, IsLocalization.mk'_eq_iff_eq',\n  -- porting note: removed `[anonymous], [anonymous]`(IsFractionRing.injective K[X] (FractionRing K[X])).eq_iff]\n[GOAL]\nK : Type u\ninst✝¹ : CommRing K\ninst✝ : IsDomain K\nP : Sort v\np q : K[X]\nf : K[X] → K[X] → P\nf0 : ∀ (p : K[X]), f p 0 = f 0 1\nH' : ∀ {p q p' q' : K[X]}, q ≠ 0 → q' ≠ 0 → q' * p = q * p' → f p q = f p' q'\nH :\n  optParam (∀ {p q p' q' : K[X]}, q ∈ K[X]⁰ → q' ∈ K[X]⁰ → q' * p = q * p' → f p q = f p' q')\n    (_ : ∀ {p q p' q' : K[X]}, q ∈ K[X]⁰ → q' ∈ K[X]⁰ → q' * p = q * p' → f p q = f p' q')\n⊢ RatFunc.liftOn (RatFunc.mk p q) f H = f p q\n[PROOFSTEP]\nby_cases hq : q = 0\n[GOAL]\ncase pos\nK : Type u\ninst✝¹ : CommRing K\ninst✝ : IsDomain K\nP : Sort v\np q : K[X]\nf : K[X] → K[X] → P\nf0 : ∀ (p : K[X]), f p 0 = f 0 1\nH' : ∀ {p q p' q' : K[X]}, q ≠ 0 → q' ≠ 0 → q' * p = q * p' → f p q = f p' q'\nH :\n  optParam (∀ {p q p' q' : K[X]}, q ∈ K[X]⁰ → q' ∈ K[X]⁰ → q' * p = q * p' → f p q = f p' q')\n    (_ : ∀ {p q p' q' : K[X]}, q ∈ K[X]⁰ → q' ∈ K[X]⁰ → q' * p = q * p' → f p q = f p' q')\nhq : q = 0\n⊢ RatFunc.liftOn (RatFunc.mk p q) f H = f p q\n[PROOFSTEP]\nsubst hq\n[GOAL]\ncase pos\nK : Type u\ninst✝¹ : CommRing K\ninst✝ : IsDomain K\nP : Sort v\np : K[X]\nf : K[X] → K[X] → P\nf0 : ∀ (p : K[X]), f p 0 = f 0 1\nH' : ∀ {p q p' q' : K[X]}, q ≠ 0 → q' ≠ 0 → q' * p = q * p' → f p q = f p' q'\nH :\n  optParam (∀ {p q p' q' : K[X]}, q ∈ K[X]⁰ → q' ∈ K[X]⁰ → q' * p = q * p' → f p q = f p' q')\n    (_ : ∀ {p q p' q' : K[X]}, q ∈ K[X]⁰ → q' ∈ K[X]⁰ → q' * p = q * p' → f p q = f p' q')\n⊢ RatFunc.liftOn (RatFunc.mk p 0) f H = f p 0\n[PROOFSTEP]\nsimp only [mk_zero, f0, ← Localization.mk_zero 1, Localization.liftOn_mk, liftOn_ofFractionRing_mk, Submonoid.coe_one]\n[GOAL]\ncase neg\nK : Type u\ninst✝¹ : CommRing K\ninst✝ : IsDomain K\nP : Sort v\np q : K[X]\nf : K[X] → K[X] → P\nf0 : ∀ (p : K[X]), f p 0 = f 0 1\nH' : ∀ {p q p' q' : K[X]}, q ≠ 0 → q' ≠ 0 → q' * p = q * p' → f p q = f p' q'\nH :\n  optParam (∀ {p q p' q' : K[X]}, q ∈ K[X]⁰ → q' ∈ K[X]⁰ → q' * p = q * p' → f p q = f p' q')\n    (_ : ∀ {p q p' q' : K[X]}, q ∈ K[X]⁰ → q' ∈ K[X]⁰ → q' * p = q * p' → f p q = f p' q')\nhq : ¬q = 0\n⊢ RatFunc.liftOn (RatFunc.mk p q) f H = f p q\n[PROOFSTEP]\nsimp only [mk_eq_localization_mk _ hq, Localization.liftOn_mk, liftOn_ofFractionRing_mk]\n[GOAL]\nK : Type u\ninst✝¹ : CommRing K\ninst✝ : IsDomain K\nP : Sort v\np q : K[X]\nf : K[X] → K[X] → P\nf0 : ∀ (p : K[X]), f p 0 = f 0 1\nH : ∀ {p q a : K[X]}, q ≠ 0 → a ≠ 0 → f (a * p) (a * q) = f p q\n⊢ RatFunc.liftOn' (RatFunc.mk p q) f H = f p q\n[PROOFSTEP]\nrw [RatFunc.liftOn', RatFunc.liftOn_mk _ _ _ f0]\n[GOAL]\nK : Type u\ninst✝¹ : CommRing K\ninst✝ : IsDomain K\nP : Sort v\np q : K[X]\nf : K[X] → K[X] → P\nf0 : ∀ (p : K[X]), f p 0 = f 0 1\nH : ∀ {p q a : K[X]}, q ≠ 0 → a ≠ 0 → f (a * p) (a * q) = f p q\n⊢ ∀ {p q p' q' : K[X]}, q ≠ 0 → q' ≠ 0 → q' * p = q * p' → f p q = f p' q'\n[PROOFSTEP]\napply lift_on_condition_of_lift_on'_condition H\n[GOAL]\nK : Type u\ninst✝¹ : CommRing K\ninst✝ : IsDomain K\nP : RatFunc K → Prop\nx : FractionRing K[X]\nf : ∀ (p q : K[X]), q ≠ 0 → P (RatFunc.mk p q)\nx✝ : K[X] × { x // x ∈ K[X]⁰ }\np : K[X]\nq : { x // x ∈ K[X]⁰ }\n⊢ P { toFractionRing := Localization.mk (p, q).fst (p, q).snd }\n[PROOFSTEP]\nsimpa only [mk_coe_def, Localization.mk_eq_mk'] using f p q (mem_nonZeroDivisors_iff_ne_zero.mp q.2)\n[GOAL]\nK : Type u\ninst✝ : CommRing K\n⊢ { toFractionRing := 0 } = 0\n[PROOFSTEP]\nsimp only [Zero.zero, OfNat.ofNat, RatFunc.zero]\n[GOAL]\nK : Type u\ninst✝ : CommRing K\np q : FractionRing K[X]\n⊢ { toFractionRing := p + q } = { toFractionRing := p } + { toFractionRing := q }\n[PROOFSTEP]\nsimp only [HAdd.hAdd, Add.add, RatFunc.add]\n[GOAL]\nK : Type u\ninst✝ : CommRing K\np q : FractionRing K[X]\n⊢ { toFractionRing := p - q } = { toFractionRing := p } - { toFractionRing := q }\n[PROOFSTEP]\nsimp only [Sub.sub, HSub.hSub, RatFunc.sub]\n[GOAL]\nK : Type u\ninst✝ : CommRing K\np : FractionRing K[X]\n⊢ { toFractionRing := -p } = -{ toFractionRing := p }\n[PROOFSTEP]\nsimp only [Neg.neg, RatFunc.neg]\n[GOAL]\nK : Type u\ninst✝ : CommRing K\n⊢ { toFractionRing := 1 } = 1\n[PROOFSTEP]\nsimp only [One.one, OfNat.ofNat, RatFunc.one]\n[GOAL]\nK : Type u\ninst✝ : CommRing K\np q : FractionRing K[X]\n⊢ { toFractionRing := p * q } = { toFractionRing := p } * { toFractionRing := q }\n[PROOFSTEP]\nsimp only [Mul.mul, HMul.hMul, RatFunc.mul]\n[GOAL]\nK : Type u\ninst✝¹ : CommRing K\ninst✝ : IsDomain K\np q : FractionRing K[X]\n⊢ { toFractionRing := p / q } = { toFractionRing := p } / { toFractionRing := q }\n[PROOFSTEP]\nsimp only [Div.div, HDiv.hDiv, RatFunc.div]\n[GOAL]\nK : Type u\ninst✝¹ : CommRing K\ninst✝ : IsDomain K\np : FractionRing K[X]\n⊢ { toFractionRing := p⁻¹ } = { toFractionRing := p }⁻¹\n[PROOFSTEP]\nsimp only [Inv.inv, RatFunc.inv]\n[GOAL]\nK : Type u\ninst✝¹ : CommRing K\ninst✝ : IsDomain K\np : FractionRing K[X]\nh : { toFractionRing := p } ≠ 0\n⊢ { toFractionRing := p } * { toFractionRing := p }⁻¹ = 1\n[PROOFSTEP]\nhave : p ≠ 0 := fun hp => h <| by rw [hp, ofFractionRing_zero]\n[GOAL]\nK : Type u\ninst✝¹ : CommRing K\ninst✝ : IsDomain K\np : FractionRing K[X]\nh : { toFractionRing := p } ≠ 0\nhp : p = 0\n⊢ { toFractionRing := p } = 0\n[PROOFSTEP]\nrw [hp, ofFractionRing_zero]\n[GOAL]\nK : Type u\ninst✝¹ : CommRing K\ninst✝ : IsDomain K\np : FractionRing K[X]\nh : { toFractionRing := p } ≠ 0\nthis : p ≠ 0\n⊢ { toFractionRing := p } * { toFractionRing := p }⁻¹ = 1\n[PROOFSTEP]\nsimpa only [← ofFractionRing_inv, ← ofFractionRing_mul, ← ofFractionRing_one, ofFractionRing.injEq] using\n  -- porting note: `ofFractionRing.injEq` was not present_root_.mul_inv_cancel this\n[GOAL]\nK : Type u\ninst✝¹ : CommRing K\nR : Type u_1\ninst✝ : SMul R (FractionRing K[X])\nc : R\np : FractionRing K[X]\n⊢ { toFractionRing := c • p } = c • { toFractionRing := p }\n[PROOFSTEP]\nsimp only [SMul.smul, HSMul.hSMul, RatFunc.smul]\n[GOAL]\nK : Type u\ninst✝¹ : CommRing K\nR : Type u_1\ninst✝ : SMul R (FractionRing K[X])\nc : R\np : RatFunc K\n⊢ (c • p).toFractionRing = c • p.toFractionRing\n[PROOFSTEP]\ncases p\n[GOAL]\ncase ofFractionRing\nK : Type u\ninst✝¹ : CommRing K\nR : Type u_1\ninst✝ : SMul R (FractionRing K[X])\nc : R\ntoFractionRing✝ : FractionRing K[X]\n⊢ (c • { toFractionRing := toFractionRing✝ }).toFractionRing = c • { toFractionRing := toFractionRing✝ }.toFractionRing\n[PROOFSTEP]\nrw [← ofFractionRing_smul]\n[GOAL]\nK : Type u\ninst✝ : CommRing K\nR : Type u_1\nx : RatFunc K\nr : K\n⊢ r • x = ↑Polynomial.C r • x\n[PROOFSTEP]\ncases' x with x\n[GOAL]\ncase ofFractionRing\nK : Type u\ninst✝ : CommRing K\nR : Type u_1\nr : K\nx : FractionRing K[X]\n⊢ r • { toFractionRing := x } = ↑Polynomial.C r • { toFractionRing := x }\n[PROOFSTEP]\ninduction x using Localization.induction_on\n[GOAL]\ncase ofFractionRing.H\nK : Type u\ninst✝ : CommRing K\nR : Type u_1\nr : K\ny✝ : K[X] × { x // x ∈ K[X]⁰ }\n⊢ r • { toFractionRing := Localization.mk y✝.fst y✝.snd } =\n    ↑Polynomial.C r • { toFractionRing := Localization.mk y✝.fst y✝.snd }\n[PROOFSTEP]\nrw [← ofFractionRing_smul, ← ofFractionRing_smul, Localization.smul_mk, Localization.smul_mk, smul_eq_mul,\n  Polynomial.smul_eq_C_mul]\n[GOAL]\nK : Type u\ninst✝⁴ : CommRing K\nR : Type u_1\ninst✝³ : IsDomain K\ninst✝² : Monoid R\ninst✝¹ : DistribMulAction R K[X]\ninst✝ : IsScalarTower R K[X] K[X]\nc : R\np q : K[X]\n⊢ RatFunc.mk (c • p) q = c • RatFunc.mk p q\n[PROOFSTEP]\nby_cases hq : q = 0\n[GOAL]\ncase pos\nK : Type u\ninst✝⁴ : CommRing K\nR : Type u_1\ninst✝³ : IsDomain K\ninst✝² : Monoid R\ninst✝¹ : DistribMulAction R K[X]\ninst✝ : IsScalarTower R K[X] K[X]\nc : R\np q : K[X]\nhq : q = 0\n⊢ RatFunc.mk (c • p) q = c • RatFunc.mk p q\n[PROOFSTEP]\nrw [hq, mk_zero, mk_zero, ← ofFractionRing_smul, smul_zero]\n[GOAL]\ncase neg\nK : Type u\ninst✝⁴ : CommRing K\nR : Type u_1\ninst✝³ : IsDomain K\ninst✝² : Monoid R\ninst✝¹ : DistribMulAction R K[X]\ninst✝ : IsScalarTower R K[X] K[X]\nc : R\np q : K[X]\nhq : ¬q = 0\n⊢ RatFunc.mk (c • p) q = c • RatFunc.mk p q\n[PROOFSTEP]\nrw [mk_eq_localization_mk _ hq, mk_eq_localization_mk _ hq, ← Localization.smul_mk, ← ofFractionRing_smul]\n[GOAL]\nK : Type u\ninst✝⁴ : CommRing K\nR : Type u_1\ninst✝³ : IsDomain K\ninst✝² : Monoid R\ninst✝¹ : DistribMulAction R K[X]\ninst✝ : IsScalarTower R K[X] K[X]\n⊢ ∀ (x : R) (y : K[X]) (z : RatFunc K), (x • y) • z = x • y • z\n[PROOFSTEP]\nintros c p q\n[GOAL]\nK : Type u\ninst✝⁴ : CommRing K\nR : Type u_1\ninst✝³ : IsDomain K\ninst✝² : Monoid R\ninst✝¹ : DistribMulAction R K[X]\ninst✝ : IsScalarTower R K[X] K[X]\nc : R\np : K[X]\nq : RatFunc K\n⊢ (c • p) • q = c • p • q\n[PROOFSTEP]\napply q.induction_on' fun q r _ => by rw [← mk_smul, smul_assoc, mk_smul, mk_smul]\n[GOAL]\nK : Type u\ninst✝⁴ : CommRing K\nR : Type u_1\ninst✝³ : IsDomain K\ninst✝² : Monoid R\ninst✝¹ : DistribMulAction R K[X]\ninst✝ : IsScalarTower R K[X] K[X]\nc : R\np : K[X]\nq✝ : RatFunc K\nq r : K[X]\nx✝ : r ≠ 0\n⊢ (c • p) • RatFunc.mk q r = c • p • RatFunc.mk q r\n[PROOFSTEP]\nrw [← mk_smul, smul_assoc, mk_smul, mk_smul]\n[GOAL]\nK : Type u\ninst✝ : CommRing K\nx✝¹ x✝ : RatFunc K\ntoFractionRing✝¹ toFractionRing✝ : FractionRing K[X]\n⊢ Equiv.toFun\n      { toFun := toFractionRing, invFun := ofFractionRing,\n        left_inv := (_ : ∀ (x : RatFunc K), { toFractionRing := x.toFractionRing } = x),\n        right_inv :=\n          (_ :\n            ∀ (x : FractionRing K[X]),\n              { toFractionRing := x }.toFractionRing = { toFractionRing := x }.toFractionRing) }\n      ({ toFractionRing := toFractionRing✝¹ } * { toFractionRing := toFractionRing✝ }) =\n    Equiv.toFun\n        { toFun := toFractionRing, invFun := ofFractionRing,\n          left_inv := (_ : ∀ (x : RatFunc K), { toFractionRing := x.toFractionRing } = x),\n          right_inv :=\n            (_ :\n              ∀ (x : FractionRing K[X]),\n                { toFractionRing := x }.toFractionRing = { toFractionRing := x }.toFractionRing) }\n        { toFractionRing := toFractionRing✝¹ } *\n      Equiv.toFun\n        { toFun := toFractionRing, invFun := ofFractionRing,\n          left_inv := (_ : ∀ (x : RatFunc K), { toFractionRing := x.toFractionRing } = x),\n          right_inv :=\n            (_ :\n              ∀ (x : FractionRing K[X]),\n                { toFractionRing := x }.toFractionRing = { toFractionRing := x }.toFractionRing) }\n        { toFractionRing := toFractionRing✝ }\n[PROOFSTEP]\nsimp [← ofFractionRing_mul]\n[GOAL]\nK : Type u\ninst✝ : CommRing K\nx✝¹ x✝ : RatFunc K\ntoFractionRing✝¹ toFractionRing✝ : FractionRing K[X]\n⊢ Equiv.toFun\n      { toFun := toFractionRing, invFun := ofFractionRing,\n        left_inv := (_ : ∀ (x : RatFunc K), { toFractionRing := x.toFractionRing } = x),\n        right_inv :=\n          (_ :\n            ∀ (x : FractionRing K[X]),\n              { toFractionRing := x }.toFractionRing = { toFractionRing := x }.toFractionRing) }\n      ({ toFractionRing := toFractionRing✝¹ } + { toFractionRing := toFractionRing✝ }) =\n    Equiv.toFun\n        { toFun := toFractionRing, invFun := ofFractionRing,\n          left_inv := (_ : ∀ (x : RatFunc K), { toFractionRing := x.toFractionRing } = x),\n          right_inv :=\n            (_ :\n              ∀ (x : FractionRing K[X]),\n                { toFractionRing := x }.toFractionRing = { toFractionRing := x }.toFractionRing) }\n        { toFractionRing := toFractionRing✝¹ } +\n      Equiv.toFun\n        { toFun := toFractionRing, invFun := ofFractionRing,\n          left_inv := (_ : ∀ (x : RatFunc K), { toFractionRing := x.toFractionRing } = x),\n          right_inv :=\n            (_ :\n              ∀ (x : FractionRing K[X]),\n                { toFractionRing := x }.toFractionRing = { toFractionRing := x }.toFractionRing) }\n        { toFractionRing := toFractionRing✝ }\n[PROOFSTEP]\nsimp [← ofFractionRing_add]\n[GOAL]\nK : Type u\ninst✝ : CommRing K\n⊢ ∀ (a b c : RatFunc K), a * b * c = a * (b * c)\n[PROOFSTEP]\nfrac_tac\n[GOAL]\nK : Type u\ninst✝ : CommRing K\n⊢ ∀ (a : RatFunc K), 1 * a = a\n[PROOFSTEP]\nfrac_tac\n[GOAL]\nK : Type u\ninst✝ : CommRing K\n⊢ ∀ (a : RatFunc K), a * 1 = a\n[PROOFSTEP]\nfrac_tac\n[GOAL]\nK : Type u\ninst✝ : CommRing K\n⊢ ∀ (a b : RatFunc K), a * b = b * a\n[PROOFSTEP]\nfrac_tac\n[GOAL]\nK : Type u\ninst✝ : CommRing K\n⊢ ∀ (a b c : RatFunc K), a + b + c = a + (b + c)\n[PROOFSTEP]\nfrac_tac\n  -- porting note: `by frac_tac` didn't work:\n[GOAL]\nK : Type u\ninst✝ : CommRing K\n⊢ ∀ (a : RatFunc K), 0 + a = a\n[PROOFSTEP]\nfrac_tac\n[GOAL]\nK : Type u\ninst✝ : CommRing K\n⊢ ∀ (a : RatFunc K), a + 0 = a\n[PROOFSTEP]\nfrac_tac\n[GOAL]\nK : Type u\ninst✝ : CommRing K\n⊢ ∀ (x : RatFunc K), (fun x x_1 => x • x_1) 0 x = 0\n[PROOFSTEP]\nsmul_tac\n[GOAL]\nK : Type u\ninst✝ : CommRing K\nx✝ : ℕ\n⊢ ∀ (x : RatFunc K), (fun x x_1 => x • x_1) (x✝ + 1) x = x + (fun x x_1 => x • x_1) x✝ x\n[PROOFSTEP]\nsmul_tac\n[GOAL]\nK : Type u\ninst✝ : CommRing K\n⊢ ∀ (a b : RatFunc K), a - b = a + -b\n[PROOFSTEP]\nfrac_tac\n[GOAL]\nK : Type u\ninst✝ : CommRing K\n⊢ ∀ (a : RatFunc K), (fun x x_1 => x • x_1) 0 a = 0\n[PROOFSTEP]\nsmul_tac\n[GOAL]\nK : Type u\ninst✝ : CommRing K\nx✝ : ℕ\n⊢ ∀ (a : RatFunc K), (fun x x_1 => x • x_1) (Int.ofNat (Nat.succ x✝)) a = a + (fun x x_1 => x • x_1) (Int.ofNat x✝) a\n[PROOFSTEP]\nsmul_tac\n[GOAL]\nK : Type u\ninst✝ : CommRing K\nx✝ : ℕ\n⊢ ∀ (a : RatFunc K), (fun x x_1 => x • x_1) (Int.negSucc x✝) a = -(fun x x_1 => x • x_1) (↑(Nat.succ x✝)) a\n[PROOFSTEP]\nsmul_tac\n[GOAL]\nK : Type u\ninst✝ : CommRing K\n⊢ ∀ (a : RatFunc K), -a + a = 0\n[PROOFSTEP]\nfrac_tac\n[GOAL]\nK : Type u\ninst✝ : CommRing K\n⊢ ∀ (a b : RatFunc K), a + b = b + a\n[PROOFSTEP]\nrepeat rintro (⟨⟩ : RatFunc _) <;> simp only [← ofFractionRing_add, add_comm]\n[GOAL]\nK : Type u\ninst✝ : CommRing K\n⊢ ∀ (a b : RatFunc K), a + b = b + a\n[PROOFSTEP]\nrintro (⟨⟩ : RatFunc _)\n[GOAL]\ncase ofFractionRing\nK : Type u\ninst✝ : CommRing K\ntoFractionRing✝ : FractionRing K[X]\n⊢ ∀ (b : RatFunc K), { toFractionRing := toFractionRing✝ } + b = b + { toFractionRing := toFractionRing✝ }\n[PROOFSTEP]\nsimp only [← ofFractionRing_add, add_comm]\n[GOAL]\ncase ofFractionRing\nK : Type u\ninst✝ : CommRing K\ntoFractionRing✝ : FractionRing K[X]\n⊢ ∀ (b : RatFunc K), { toFractionRing := toFractionRing✝ } + b = b + { toFractionRing := toFractionRing✝ }\n[PROOFSTEP]\nrintro (⟨⟩ : RatFunc _)\n[GOAL]\ncase ofFractionRing.ofFractionRing\nK : Type u\ninst✝ : CommRing K\ntoFractionRing✝¹ toFractionRing✝ : FractionRing K[X]\n⊢ { toFractionRing := toFractionRing✝¹ } + { toFractionRing := toFractionRing✝ } =\n    { toFractionRing := toFractionRing✝ } + { toFractionRing := toFractionRing✝¹ }\n[PROOFSTEP]\nsimp only [← ofFractionRing_add, add_comm]\n[GOAL]\nK : Type u\ninst✝ : CommRing K\nsrc✝¹ : CommMonoid (RatFunc K) := instCommMonoid K\nsrc✝ : AddCommGroup (RatFunc K) := instAddCommGroup K\n⊢ ∀ (a b c : RatFunc K), a * (b + c) = a * b + a * c\n[PROOFSTEP]\nfrac_tac\n[GOAL]\nK : Type u\ninst✝ : CommRing K\nsrc✝¹ : CommMonoid (RatFunc K) := instCommMonoid K\nsrc✝ : AddCommGroup (RatFunc K) := instAddCommGroup K\n⊢ ∀ (a b c : RatFunc K), (a + b) * c = a * c + b * c\n[PROOFSTEP]\nfrac_tac\n[GOAL]\nK : Type u\ninst✝ : CommRing K\nsrc✝¹ : CommMonoid (RatFunc K) := instCommMonoid K\nsrc✝ : AddCommGroup (RatFunc K) := instAddCommGroup K\n⊢ ∀ (a : RatFunc K), 0 * a = 0\n[PROOFSTEP]\nfrac_tac\n[GOAL]\nK : Type u\ninst✝ : CommRing K\nsrc✝¹ : CommMonoid (RatFunc K) := instCommMonoid K\nsrc✝ : AddCommGroup (RatFunc K) := instAddCommGroup K\n⊢ ∀ (a : RatFunc K), a * 0 = 0\n[PROOFSTEP]\nfrac_tac\n[GOAL]\nK : Type u\ninst✝⁵ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝⁴ : CommGroupWithZero G₀\ninst✝³ : Field L\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : MonoidHomClass F R[X] S[X]\nφ : F\nhφ : R[X]⁰ ≤ Submonoid.comap φ S[X]⁰\nf : RatFunc R\np q p' q' : R[X]\nhq : q ∈ R[X]⁰\nhq' : q' ∈ R[X]⁰\nh : q' * p = q * p'\n⊢ (fun n d =>\n        if h : ↑φ d ∈ S[X]⁰ then { toFractionRing := Localization.mk (↑φ n) { val := ↑φ d, property := h } } else 0)\n      p q =\n    (fun n d =>\n        if h : ↑φ d ∈ S[X]⁰ then { toFractionRing := Localization.mk (↑φ n) { val := ↑φ d, property := h } } else 0)\n      p' q'\n[PROOFSTEP]\ndsimp only\n  -- porting note: force the function to be applied\n[GOAL]\nK : Type u\ninst✝⁵ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝⁴ : CommGroupWithZero G₀\ninst✝³ : Field L\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : MonoidHomClass F R[X] S[X]\nφ : F\nhφ : R[X]⁰ ≤ Submonoid.comap φ S[X]⁰\nf : RatFunc R\np q p' q' : R[X]\nhq : q ∈ R[X]⁰\nhq' : q' ∈ R[X]⁰\nh : q' * p = q * p'\n⊢ (if h : ↑φ q ∈ S[X]⁰ then { toFractionRing := Localization.mk (↑φ p) { val := ↑φ q, property := h } } else 0) =\n    if h : ↑φ q' ∈ S[X]⁰ then { toFractionRing := Localization.mk (↑φ p') { val := ↑φ q', property := h } } else 0\n[PROOFSTEP]\nrw [dif_pos, dif_pos]\n[GOAL]\nK : Type u\ninst✝⁵ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝⁴ : CommGroupWithZero G₀\ninst✝³ : Field L\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : MonoidHomClass F R[X] S[X]\nφ : F\nhφ : R[X]⁰ ≤ Submonoid.comap φ S[X]⁰\nf : RatFunc R\np q p' q' : R[X]\nhq : q ∈ R[X]⁰\nhq' : q' ∈ R[X]⁰\nh : q' * p = q * p'\n⊢ { toFractionRing := Localization.mk (↑φ p) { val := ↑φ q, property := ?hc } } =\n    { toFractionRing := Localization.mk (↑φ p') { val := ↑φ q', property := ?hc } }\ncase hc\nK : Type u\ninst✝⁵ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝⁴ : CommGroupWithZero G₀\ninst✝³ : Field L\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : MonoidHomClass F R[X] S[X]\nφ : F\nhφ : R[X]⁰ ≤ Submonoid.comap φ S[X]⁰\nf : RatFunc R\np q p' q' : R[X]\nhq : q ∈ R[X]⁰\nhq' : q' ∈ R[X]⁰\nh : q' * p = q * p'\n⊢ ↑φ q' ∈ S[X]⁰\ncase hc\nK : Type u\ninst✝⁵ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝⁴ : CommGroupWithZero G₀\ninst✝³ : Field L\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : MonoidHomClass F R[X] S[X]\nφ : F\nhφ : R[X]⁰ ≤ Submonoid.comap φ S[X]⁰\nf : RatFunc R\np q p' q' : R[X]\nhq : q ∈ R[X]⁰\nhq' : q' ∈ R[X]⁰\nh : q' * p = q * p'\n⊢ ↑φ q ∈ S[X]⁰\ncase hc\nK : Type u\ninst✝⁵ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝⁴ : CommGroupWithZero G₀\ninst✝³ : Field L\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : MonoidHomClass F R[X] S[X]\nφ : F\nhφ : R[X]⁰ ≤ Submonoid.comap φ S[X]⁰\nf : RatFunc R\np q p' q' : R[X]\nhq : q ∈ R[X]⁰\nhq' : q' ∈ R[X]⁰\nh : q' * p = q * p'\n⊢ ↑φ q ∈ S[X]⁰\n[PROOFSTEP]\ncongr 1\n  -- porting note: this was a `rw [ofFractionRing.inj_eq]` which was overkill anyway\n[GOAL]\ncase e_toFractionRing\nK : Type u\ninst✝⁵ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝⁴ : CommGroupWithZero G₀\ninst✝³ : Field L\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : MonoidHomClass F R[X] S[X]\nφ : F\nhφ : R[X]⁰ ≤ Submonoid.comap φ S[X]⁰\nf : RatFunc R\np q p' q' : R[X]\nhq : q ∈ R[X]⁰\nhq' : q' ∈ R[X]⁰\nh : q' * p = q * p'\n⊢ Localization.mk (↑φ p) { val := ↑φ q, property := ?hc } = Localization.mk (↑φ p') { val := ↑φ q', property := ?hc }\ncase hc\nK : Type u\ninst✝⁵ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝⁴ : CommGroupWithZero G₀\ninst✝³ : Field L\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : MonoidHomClass F R[X] S[X]\nφ : F\nhφ : R[X]⁰ ≤ Submonoid.comap φ S[X]⁰\nf : RatFunc R\np q p' q' : R[X]\nhq : q ∈ R[X]⁰\nhq' : q' ∈ R[X]⁰\nh : q' * p = q * p'\n⊢ ↑φ q' ∈ S[X]⁰\ncase hc\nK : Type u\ninst✝⁵ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝⁴ : CommGroupWithZero G₀\ninst✝³ : Field L\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : MonoidHomClass F R[X] S[X]\nφ : F\nhφ : R[X]⁰ ≤ Submonoid.comap φ S[X]⁰\nf : RatFunc R\np q p' q' : R[X]\nhq : q ∈ R[X]⁰\nhq' : q' ∈ R[X]⁰\nh : q' * p = q * p'\n⊢ ↑φ q ∈ S[X]⁰\ncase hc\nK : Type u\ninst✝⁵ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝⁴ : CommGroupWithZero G₀\ninst✝³ : Field L\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : MonoidHomClass F R[X] S[X]\nφ : F\nhφ : R[X]⁰ ≤ Submonoid.comap φ S[X]⁰\nf : RatFunc R\np q p' q' : R[X]\nhq : q ∈ R[X]⁰\nhq' : q' ∈ R[X]⁰\nh : q' * p = q * p'\n⊢ ↑φ q ∈ S[X]⁰\n[PROOFSTEP]\nrw [Localization.mk_eq_mk_iff]\n[GOAL]\ncase e_toFractionRing\nK : Type u\ninst✝⁵ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝⁴ : CommGroupWithZero G₀\ninst✝³ : Field L\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : MonoidHomClass F R[X] S[X]\nφ : F\nhφ : R[X]⁰ ≤ Submonoid.comap φ S[X]⁰\nf : RatFunc R\np q p' q' : R[X]\nhq : q ∈ R[X]⁰\nhq' : q' ∈ R[X]⁰\nh : q' * p = q * p'\n⊢ ↑(Localization.r S[X]⁰) (↑φ p, { val := ↑φ q, property := ?hc }) (↑φ p', { val := ↑φ q', property := ?hc })\ncase hc\nK : Type u\ninst✝⁵ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝⁴ : CommGroupWithZero G₀\ninst✝³ : Field L\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : MonoidHomClass F R[X] S[X]\nφ : F\nhφ : R[X]⁰ ≤ Submonoid.comap φ S[X]⁰\nf : RatFunc R\np q p' q' : R[X]\nhq : q ∈ R[X]⁰\nhq' : q' ∈ R[X]⁰\nh : q' * p = q * p'\n⊢ ↑φ q ∈ S[X]⁰\ncase hc\nK : Type u\ninst✝⁵ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝⁴ : CommGroupWithZero G₀\ninst✝³ : Field L\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : MonoidHomClass F R[X] S[X]\nφ : F\nhφ : R[X]⁰ ≤ Submonoid.comap φ S[X]⁰\nf : RatFunc R\np q p' q' : R[X]\nhq : q ∈ R[X]⁰\nhq' : q' ∈ R[X]⁰\nh : q' * p = q * p'\n⊢ ↑φ q' ∈ S[X]⁰\ncase hc\nK : Type u\ninst✝⁵ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝⁴ : CommGroupWithZero G₀\ninst✝³ : Field L\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : MonoidHomClass F R[X] S[X]\nφ : F\nhφ : R[X]⁰ ≤ Submonoid.comap φ S[X]⁰\nf : RatFunc R\np q p' q' : R[X]\nhq : q ∈ R[X]⁰\nhq' : q' ∈ R[X]⁰\nh : q' * p = q * p'\n⊢ ↑φ q' ∈ S[X]⁰\ncase hc\nK : Type u\ninst✝⁵ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝⁴ : CommGroupWithZero G₀\ninst✝³ : Field L\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : MonoidHomClass F R[X] S[X]\nφ : F\nhφ : R[X]⁰ ≤ Submonoid.comap φ S[X]⁰\nf : RatFunc R\np q p' q' : R[X]\nhq : q ∈ R[X]⁰\nhq' : q' ∈ R[X]⁰\nh : q' * p = q * p'\n⊢ ↑φ q ∈ S[X]⁰\ncase hc\nK : Type u\ninst✝⁵ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝⁴ : CommGroupWithZero G₀\ninst✝³ : Field L\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : MonoidHomClass F R[X] S[X]\nφ : F\nhφ : R[X]⁰ ≤ Submonoid.comap φ S[X]⁰\nf : RatFunc R\np q p' q' : R[X]\nhq : q ∈ R[X]⁰\nhq' : q' ∈ R[X]⁰\nh : q' * p = q * p'\n⊢ ↑φ q ∈ S[X]⁰\n[PROOFSTEP]\nrotate_left\n[GOAL]\ncase hc\nK : Type u\ninst✝⁵ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝⁴ : CommGroupWithZero G₀\ninst✝³ : Field L\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : MonoidHomClass F R[X] S[X]\nφ : F\nhφ : R[X]⁰ ≤ Submonoid.comap φ S[X]⁰\nf : RatFunc R\np q p' q' : R[X]\nhq : q ∈ R[X]⁰\nhq' : q' ∈ R[X]⁰\nh : q' * p = q * p'\n⊢ ↑φ q ∈ S[X]⁰\n[PROOFSTEP]\nexact hφ hq\n[GOAL]\ncase hc\nK : Type u\ninst✝⁵ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝⁴ : CommGroupWithZero G₀\ninst✝³ : Field L\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : MonoidHomClass F R[X] S[X]\nφ : F\nhφ : R[X]⁰ ≤ Submonoid.comap φ S[X]⁰\nf : RatFunc R\np q p' q' : R[X]\nhq : q ∈ R[X]⁰\nhq' : q' ∈ R[X]⁰\nh : q' * p = q * p'\n⊢ ↑φ q' ∈ S[X]⁰\n[PROOFSTEP]\nexact hφ hq'\n[GOAL]\ncase e_toFractionRing\nK : Type u\ninst✝⁵ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝⁴ : CommGroupWithZero G₀\ninst✝³ : Field L\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : MonoidHomClass F R[X] S[X]\nφ : F\nhφ : R[X]⁰ ≤ Submonoid.comap φ S[X]⁰\nf : RatFunc R\np q p' q' : R[X]\nhq : q ∈ R[X]⁰\nhq' : q' ∈ R[X]⁰\nh : q' * p = q * p'\n⊢ ↑(Localization.r S[X]⁰) (↑φ p, { val := ↑φ q, property := (_ : q ∈ Submonoid.comap φ S[X]⁰) })\n    (↑φ p', { val := ↑φ q', property := (_ : q' ∈ Submonoid.comap φ S[X]⁰) })\n[PROOFSTEP]\nrefine' Localization.r_of_eq _\n[GOAL]\ncase e_toFractionRing\nK : Type u\ninst✝⁵ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝⁴ : CommGroupWithZero G₀\ninst✝³ : Field L\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : MonoidHomClass F R[X] S[X]\nφ : F\nhφ : R[X]⁰ ≤ Submonoid.comap φ S[X]⁰\nf : RatFunc R\np q p' q' : R[X]\nhq : q ∈ R[X]⁰\nhq' : q' ∈ R[X]⁰\nh : q' * p = q * p'\n⊢ ↑(↑φ p', { val := ↑φ q', property := (_ : q' ∈ Submonoid.comap φ S[X]⁰) }).snd *\n      (↑φ p, { val := ↑φ q, property := (_ : q ∈ Submonoid.comap φ S[X]⁰) }).fst =\n    ↑(↑φ p, { val := ↑φ q, property := (_ : q ∈ Submonoid.comap φ S[X]⁰) }).snd *\n      (↑φ p', { val := ↑φ q', property := (_ : q' ∈ Submonoid.comap φ S[X]⁰) }).fst\n[PROOFSTEP]\nsimpa only [map_mul] using congr_arg φ h\n[GOAL]\nK : Type u\ninst✝⁵ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝⁴ : CommGroupWithZero G₀\ninst✝³ : Field L\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : MonoidHomClass F R[X] S[X]\nφ : F\nhφ : R[X]⁰ ≤ Submonoid.comap φ S[X]⁰\n⊢ (fun f =>\n        RatFunc.liftOn f\n          (fun n d =>\n            if h : ↑φ d ∈ S[X]⁰ then { toFractionRing := Localization.mk (↑φ n) { val := ↑φ d, property := h } } else 0)\n          (_ :\n            ∀ {p q p' q' : R[X]},\n              q ∈ R[X]⁰ →\n                q' ∈ R[X]⁰ →\n                  q' * p = q * p' →\n                    (fun n d =>\n                          if h : ↑φ d ∈ S[X]⁰ then\n                            { toFractionRing := Localization.mk (↑φ n) { val := ↑φ d, property := h } }\n                          else 0)\n                        p q =\n                      (fun n d =>\n                          if h : ↑φ d ∈ S[X]⁰ then\n                            { toFractionRing := Localization.mk (↑φ n) { val := ↑φ d, property := h } }\n                          else 0)\n                        p' q'))\n      1 =\n    1\n[PROOFSTEP]\ndsimp only\n  -- porting note: force the function to be applied\n[GOAL]\nK : Type u\ninst✝⁵ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝⁴ : CommGroupWithZero G₀\ninst✝³ : Field L\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : MonoidHomClass F R[X] S[X]\nφ : F\nhφ : R[X]⁰ ≤ Submonoid.comap φ S[X]⁰\n⊢ RatFunc.liftOn 1\n      (fun n d =>\n        if h : ↑φ d ∈ S[X]⁰ then { toFractionRing := Localization.mk (↑φ n) { val := ↑φ d, property := h } } else 0)\n      (_ :\n        ∀ {p q p' q' : R[X]},\n          q ∈ R[X]⁰ →\n            q' ∈ R[X]⁰ →\n              q' * p = q * p' →\n                (if h : ↑φ q ∈ S[X]⁰ then { toFractionRing := Localization.mk (↑φ p) { val := ↑φ q, property := h } }\n                  else 0) =\n                  if h : ↑φ q' ∈ S[X]⁰ then\n                    { toFractionRing := Localization.mk (↑φ p') { val := ↑φ q', property := h } }\n                  else 0) =\n    1\n[PROOFSTEP]\nrw [← ofFractionRing_one, ← Localization.mk_one, liftOn_ofFractionRing_mk, dif_pos]\n[GOAL]\nK : Type u\ninst✝⁵ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝⁴ : CommGroupWithZero G₀\ninst✝³ : Field L\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : MonoidHomClass F R[X] S[X]\nφ : F\nhφ : R[X]⁰ ≤ Submonoid.comap φ S[X]⁰\n⊢ { toFractionRing := Localization.mk (↑φ 1) { val := ↑φ ↑1, property := ?hc } } = 1\n[PROOFSTEP]\nsimpa using ofFractionRing_one\n[GOAL]\ncase hc\nK : Type u\ninst✝⁵ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝⁴ : CommGroupWithZero G₀\ninst✝³ : Field L\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : MonoidHomClass F R[X] S[X]\nφ : F\nhφ : R[X]⁰ ≤ Submonoid.comap φ S[X]⁰\n⊢ ↑φ ↑1 ∈ S[X]⁰\n[PROOFSTEP]\nsimpa using Submonoid.one_mem _\n[GOAL]\nK : Type u\ninst✝⁵ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝⁴ : CommGroupWithZero G₀\ninst✝³ : Field L\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : MonoidHomClass F R[X] S[X]\nφ : F\nhφ : R[X]⁰ ≤ Submonoid.comap φ S[X]⁰\nx y : RatFunc R\n⊢ OneHom.toFun\n      {\n        toFun := fun f =>\n          RatFunc.liftOn f\n            (fun n d =>\n              if h : ↑φ d ∈ S[X]⁰ then { toFractionRing := Localization.mk (↑φ n) { val := ↑φ d, property := h } }\n              else 0)\n            (_ :\n              ∀ {p q p' q' : R[X]},\n                q ∈ R[X]⁰ →\n                  q' ∈ R[X]⁰ →\n                    q' * p = q * p' →\n                      (fun n d =>\n                            if h : ↑φ d ∈ S[X]⁰ then\n                              { toFractionRing := Localization.mk (↑φ n) { val := ↑φ d, property := h } }\n                            else 0)\n                          p q =\n                        (fun n d =>\n                            if h : ↑φ d ∈ S[X]⁰ then\n                              { toFractionRing := Localization.mk (↑φ n) { val := ↑φ d, property := h } }\n                            else 0)\n                          p' q'),\n        map_one' :=\n          (_ :\n            (fun f =>\n                  RatFunc.liftOn f\n                    (fun n d =>\n                      if h : ↑φ d ∈ S[X]⁰ then\n                        { toFractionRing := Localization.mk (↑φ n) { val := ↑φ d, property := h } }\n                      else 0)\n                    (_ :\n                      ∀ {p q p' q' : R[X]},\n                        q ∈ R[X]⁰ →\n                          q' ∈ R[X]⁰ →\n                            q' * p = q * p' →\n                              (fun n d =>\n                                    if h : ↑φ d ∈ S[X]⁰ then\n                                      { toFractionRing := Localization.mk (↑φ n) { val := ↑φ d, property := h } }\n                                    else 0)\n                                  p q =\n                                (fun n d =>\n                                    if h : ↑φ d ∈ S[X]⁰ then\n                                      { toFractionRing := Localization.mk (↑φ n) { val := ↑φ d, property := h } }\n                                    else 0)\n                                  p' q'))\n                1 =\n              1) }\n      (x * y) =\n    OneHom.toFun\n        {\n          toFun := fun f =>\n            RatFunc.liftOn f\n              (fun n d =>\n                if h : ↑φ d ∈ S[X]⁰ then { toFractionRing := Localization.mk (↑φ n) { val := ↑φ d, property := h } }\n                else 0)\n              (_ :\n                ∀ {p q p' q' : R[X]},\n                  q ∈ R[X]⁰ →\n                    q' ∈ R[X]⁰ →\n                      q' * p = q * p' →\n                        (fun n d =>\n                              if h : ↑φ d ∈ S[X]⁰ then\n                                { toFractionRing := Localization.mk (↑φ n) { val := ↑φ d, property := h } }\n                              else 0)\n                            p q =\n                          (fun n d =>\n                              if h : ↑φ d ∈ S[X]⁰ then\n                                { toFractionRing := Localization.mk (↑φ n) { val := ↑φ d, property := h } }\n                              else 0)\n                            p' q'),\n          map_one' :=\n            (_ :\n              (fun f =>\n                    RatFunc.liftOn f\n                      (fun n d =>\n                        if h : ↑φ d ∈ S[X]⁰ then\n                          { toFractionRing := Localization.mk (↑φ n) { val := ↑φ d, property := h } }\n                        else 0)\n                      (_ :\n                        ∀ {p q p' q' : R[X]},\n                          q ∈ R[X]⁰ →\n                            q' ∈ R[X]⁰ →\n                              q' * p = q * p' →\n                                (fun n d =>\n                                      if h : ↑φ d ∈ S[X]⁰ then\n                                        { toFractionRing := Localization.mk (↑φ n) { val := ↑φ d, property := h } }\n                                      else 0)\n                                    p q =\n                                  (fun n d =>\n                                      if h : ↑φ d ∈ S[X]⁰ then\n                                        { toFractionRing := Localization.mk (↑φ n) { val := ↑φ d, property := h } }\n                                      else 0)\n                                    p' q'))\n                  1 =\n                1) }\n        x *\n      OneHom.toFun\n        {\n          toFun := fun f =>\n            RatFunc.liftOn f\n              (fun n d =>\n                if h : ↑φ d ∈ S[X]⁰ then { toFractionRing := Localization.mk (↑φ n) { val := ↑φ d, property := h } }\n                else 0)\n              (_ :\n                ∀ {p q p' q' : R[X]},\n                  q ∈ R[X]⁰ →\n                    q' ∈ R[X]⁰ →\n                      q' * p = q * p' →\n                        (fun n d =>\n                              if h : ↑φ d ∈ S[X]⁰ then\n                                { toFractionRing := Localization.mk (↑φ n) { val := ↑φ d, property := h } }\n                              else 0)\n                            p q =\n                          (fun n d =>\n                              if h : ↑φ d ∈ S[X]⁰ then\n                                { toFractionRing := Localization.mk (↑φ n) { val := ↑φ d, property := h } }\n                              else 0)\n                            p' q'),\n          map_one' :=\n            (_ :\n              (fun f =>\n                    RatFunc.liftOn f\n                      (fun n d =>\n                        if h : ↑φ d ∈ S[X]⁰ then\n                          { toFractionRing := Localization.mk (↑φ n) { val := ↑φ d, property := h } }\n                        else 0)\n                      (_ :\n                        ∀ {p q p' q' : R[X]},\n                          q ∈ R[X]⁰ →\n                            q' ∈ R[X]⁰ →\n                              q' * p = q * p' →\n                                (fun n d =>\n                                      if h : ↑φ d ∈ S[X]⁰ then\n                                        { toFractionRing := Localization.mk (↑φ n) { val := ↑φ d, property := h } }\n                                      else 0)\n                                    p q =\n                                  (fun n d =>\n                                      if h : ↑φ d ∈ S[X]⁰ then\n                                        { toFractionRing := Localization.mk (↑φ n) { val := ↑φ d, property := h } }\n                                      else 0)\n                                    p' q'))\n                  1 =\n                1) }\n        y\n[PROOFSTEP]\ndsimp only\n  -- porting note: force the function to be applied\n[GOAL]\nK : Type u\ninst✝⁵ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝⁴ : CommGroupWithZero G₀\ninst✝³ : Field L\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : MonoidHomClass F R[X] S[X]\nφ : F\nhφ : R[X]⁰ ≤ Submonoid.comap φ S[X]⁰\nx y : RatFunc R\n⊢ RatFunc.liftOn (x * y)\n      (fun n d =>\n        if h : ↑φ d ∈ S[X]⁰ then { toFractionRing := Localization.mk (↑φ n) { val := ↑φ d, property := h } } else 0)\n      (_ :\n        ∀ {p q p' q' : R[X]},\n          q ∈ R[X]⁰ →\n            q' ∈ R[X]⁰ →\n              q' * p = q * p' →\n                (if h : ↑φ q ∈ S[X]⁰ then { toFractionRing := Localization.mk (↑φ p) { val := ↑φ q, property := h } }\n                  else 0) =\n                  if h : ↑φ q' ∈ S[X]⁰ then\n                    { toFractionRing := Localization.mk (↑φ p') { val := ↑φ q', property := h } }\n                  else 0) =\n    RatFunc.liftOn x\n        (fun n d =>\n          if h : ↑φ d ∈ S[X]⁰ then { toFractionRing := Localization.mk (↑φ n) { val := ↑φ d, property := h } } else 0)\n        (_ :\n          ∀ {p q p' q' : R[X]},\n            q ∈ R[X]⁰ →\n              q' ∈ R[X]⁰ →\n                q' * p = q * p' →\n                  (if h : ↑φ q ∈ S[X]⁰ then { toFractionRing := Localization.mk (↑φ p) { val := ↑φ q, property := h } }\n                    else 0) =\n                    if h : ↑φ q' ∈ S[X]⁰ then\n                      { toFractionRing := Localization.mk (↑φ p') { val := ↑φ q', property := h } }\n                    else 0) *\n      RatFunc.liftOn y\n        (fun n d =>\n          if h : ↑φ d ∈ S[X]⁰ then { toFractionRing := Localization.mk (↑φ n) { val := ↑φ d, property := h } } else 0)\n        (_ :\n          ∀ {p q p' q' : R[X]},\n            q ∈ R[X]⁰ →\n              q' ∈ R[X]⁰ →\n                q' * p = q * p' →\n                  (if h : ↑φ q ∈ S[X]⁰ then { toFractionRing := Localization.mk (↑φ p) { val := ↑φ q, property := h } }\n                    else 0) =\n                    if h : ↑φ q' ∈ S[X]⁰ then\n                      { toFractionRing := Localization.mk (↑φ p') { val := ↑φ q', property := h } }\n                    else 0)\n[PROOFSTEP]\ncases' x with x\n[GOAL]\ncase ofFractionRing\nK : Type u\ninst✝⁵ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝⁴ : CommGroupWithZero G₀\ninst✝³ : Field L\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : MonoidHomClass F R[X] S[X]\nφ : F\nhφ : R[X]⁰ ≤ Submonoid.comap φ S[X]⁰\ny : RatFunc R\nx : FractionRing R[X]\n⊢ RatFunc.liftOn ({ toFractionRing := x } * y)\n      (fun n d =>\n        if h : ↑φ d ∈ S[X]⁰ then { toFractionRing := Localization.mk (↑φ n) { val := ↑φ d, property := h } } else 0)\n      (_ :\n        ∀ {p q p' q' : R[X]},\n          q ∈ R[X]⁰ →\n            q' ∈ R[X]⁰ →\n              q' * p = q * p' →\n                (if h : ↑φ q ∈ S[X]⁰ then { toFractionRing := Localization.mk (↑φ p) { val := ↑φ q, property := h } }\n                  else 0) =\n                  if h : ↑φ q' ∈ S[X]⁰ then\n                    { toFractionRing := Localization.mk (↑φ p') { val := ↑φ q', property := h } }\n                  else 0) =\n    RatFunc.liftOn { toFractionRing := x }\n        (fun n d =>\n          if h : ↑φ d ∈ S[X]⁰ then { toFractionRing := Localization.mk (↑φ n) { val := ↑φ d, property := h } } else 0)\n        (_ :\n          ∀ {p q p' q' : R[X]},\n            q ∈ R[X]⁰ →\n              q' ∈ R[X]⁰ →\n                q' * p = q * p' →\n                  (if h : ↑φ q ∈ S[X]⁰ then { toFractionRing := Localization.mk (↑φ p) { val := ↑φ q, property := h } }\n                    else 0) =\n                    if h : ↑φ q' ∈ S[X]⁰ then\n                      { toFractionRing := Localization.mk (↑φ p') { val := ↑φ q', property := h } }\n                    else 0) *\n      RatFunc.liftOn y\n        (fun n d =>\n          if h : ↑φ d ∈ S[X]⁰ then { toFractionRing := Localization.mk (↑φ n) { val := ↑φ d, property := h } } else 0)\n        (_ :\n          ∀ {p q p' q' : R[X]},\n            q ∈ R[X]⁰ →\n              q' ∈ R[X]⁰ →\n                q' * p = q * p' →\n                  (if h : ↑φ q ∈ S[X]⁰ then { toFractionRing := Localization.mk (↑φ p) { val := ↑φ q, property := h } }\n                    else 0) =\n                    if h : ↑φ q' ∈ S[X]⁰ then\n                      { toFractionRing := Localization.mk (↑φ p') { val := ↑φ q', property := h } }\n                    else 0)\n[PROOFSTEP]\ncases' y with y\n[GOAL]\ncase ofFractionRing.ofFractionRing\nK : Type u\ninst✝⁵ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝⁴ : CommGroupWithZero G₀\ninst✝³ : Field L\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : MonoidHomClass F R[X] S[X]\nφ : F\nhφ : R[X]⁰ ≤ Submonoid.comap φ S[X]⁰\nx y : FractionRing R[X]\n⊢ RatFunc.liftOn ({ toFractionRing := x } * { toFractionRing := y })\n      (fun n d =>\n        if h : ↑φ d ∈ S[X]⁰ then { toFractionRing := Localization.mk (↑φ n) { val := ↑φ d, property := h } } else 0)\n      (_ :\n        ∀ {p q p' q' : R[X]},\n          q ∈ R[X]⁰ →\n            q' ∈ R[X]⁰ →\n              q' * p = q * p' →\n                (if h : ↑φ q ∈ S[X]⁰ then { toFractionRing := Localization.mk (↑φ p) { val := ↑φ q, property := h } }\n                  else 0) =\n                  if h : ↑φ q' ∈ S[X]⁰ then\n                    { toFractionRing := Localization.mk (↑φ p') { val := ↑φ q', property := h } }\n                  else 0) =\n    RatFunc.liftOn { toFractionRing := x }\n        (fun n d =>\n          if h : ↑φ d ∈ S[X]⁰ then { toFractionRing := Localization.mk (↑φ n) { val := ↑φ d, property := h } } else 0)\n        (_ :\n          ∀ {p q p' q' : R[X]},\n            q ∈ R[X]⁰ →\n              q' ∈ R[X]⁰ →\n                q' * p = q * p' →\n                  (if h : ↑φ q ∈ S[X]⁰ then { toFractionRing := Localization.mk (↑φ p) { val := ↑φ q, property := h } }\n                    else 0) =\n                    if h : ↑φ q' ∈ S[X]⁰ then\n                      { toFractionRing := Localization.mk (↑φ p') { val := ↑φ q', property := h } }\n                    else 0) *\n      RatFunc.liftOn { toFractionRing := y }\n        (fun n d =>\n          if h : ↑φ d ∈ S[X]⁰ then { toFractionRing := Localization.mk (↑φ n) { val := ↑φ d, property := h } } else 0)\n        (_ :\n          ∀ {p q p' q' : R[X]},\n            q ∈ R[X]⁰ →\n              q' ∈ R[X]⁰ →\n                q' * p = q * p' →\n                  (if h : ↑φ q ∈ S[X]⁰ then { toFractionRing := Localization.mk (↑φ p) { val := ↑φ q, property := h } }\n                    else 0) =\n                    if h : ↑φ q' ∈ S[X]⁰ then\n                      { toFractionRing := Localization.mk (↑φ p') { val := ↑φ q', property := h } }\n                    else 0)\n[PROOFSTEP]\ninduction' x using Localization.rec with p q\n[GOAL]\ncase ofFractionRing.ofFractionRing.f\nK : Type u\ninst✝⁵ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝⁴ : CommGroupWithZero G₀\ninst✝³ : Field L\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : MonoidHomClass F R[X] S[X]\nφ : F\nhφ : R[X]⁰ ≤ Submonoid.comap φ S[X]⁰\ny : FractionRing R[X]\np : R[X]\nq : { x // x ∈ R[X]⁰ }\n⊢ RatFunc.liftOn ({ toFractionRing := Localization.mk p q } * { toFractionRing := y })\n      (fun n d =>\n        if h : ↑φ d ∈ S[X]⁰ then { toFractionRing := Localization.mk (↑φ n) { val := ↑φ d, property := h } } else 0)\n      (_ :\n        ∀ {p q p' q' : R[X]},\n          q ∈ R[X]⁰ →\n            q' ∈ R[X]⁰ →\n              q' * p = q * p' →\n                (if h : ↑φ q ∈ S[X]⁰ then { toFractionRing := Localization.mk (↑φ p) { val := ↑φ q, property := h } }\n                  else 0) =\n                  if h : ↑φ q' ∈ S[X]⁰ then\n                    { toFractionRing := Localization.mk (↑φ p') { val := ↑φ q', property := h } }\n                  else 0) =\n    RatFunc.liftOn { toFractionRing := Localization.mk p q }\n        (fun n d =>\n          if h : ↑φ d ∈ S[X]⁰ then { toFractionRing := Localization.mk (↑φ n) { val := ↑φ d, property := h } } else 0)\n        (_ :\n          ∀ {p q p' q' : R[X]},\n            q ∈ R[X]⁰ →\n              q' ∈ R[X]⁰ →\n                q' * p = q * p' →\n                  (if h : ↑φ q ∈ S[X]⁰ then { toFractionRing := Localization.mk (↑φ p) { val := ↑φ q, property := h } }\n                    else 0) =\n                    if h : ↑φ q' ∈ S[X]⁰ then\n                      { toFractionRing := Localization.mk (↑φ p') { val := ↑φ q', property := h } }\n                    else 0) *\n      RatFunc.liftOn { toFractionRing := y }\n        (fun n d =>\n          if h : ↑φ d ∈ S[X]⁰ then { toFractionRing := Localization.mk (↑φ n) { val := ↑φ d, property := h } } else 0)\n        (_ :\n          ∀ {p q p' q' : R[X]},\n            q ∈ R[X]⁰ →\n              q' ∈ R[X]⁰ →\n                q' * p = q * p' →\n                  (if h : ↑φ q ∈ S[X]⁰ then { toFractionRing := Localization.mk (↑φ p) { val := ↑φ q, property := h } }\n                    else 0) =\n                    if h : ↑φ q' ∈ S[X]⁰ then\n                      { toFractionRing := Localization.mk (↑φ p') { val := ↑φ q', property := h } }\n                    else 0)\ncase ofFractionRing.ofFractionRing.H\nK : Type u\ninst✝⁵ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝⁴ : CommGroupWithZero G₀\ninst✝³ : Field L\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : MonoidHomClass F R[X] S[X]\nφ : F\nhφ : R[X]⁰ ≤ Submonoid.comap φ S[X]⁰\nx y : FractionRing R[X]\na✝ c✝ : R[X]\nb✝ d✝ : { x // x ∈ R[X]⁰ }\nh✝ : ↑(Localization.r R[X]⁰) (a✝, b✝) (c✝, d✝)\n⊢ (_ :\n      RatFunc.liftOn ({ toFractionRing := Localization.mk c✝ d✝ } * { toFractionRing := y })\n          (fun n d =>\n            if h : ↑φ d ∈ S[X]⁰ then { toFractionRing := Localization.mk (↑φ n) { val := ↑φ d, property := h } } else 0)\n          (_ :\n            ∀ {p q p' q' : R[X]},\n              q ∈ R[X]⁰ →\n                q' ∈ R[X]⁰ →\n                  q' * p = q * p' →\n                    (if h : ↑φ q ∈ S[X]⁰ then\n                        { toFractionRing := Localization.mk (↑φ p) { val := ↑φ q, property := h } }\n                      else 0) =\n                      if h : ↑φ q' ∈ S[X]⁰ then\n                        { toFractionRing := Localization.mk (↑φ p') { val := ↑φ q', property := h } }\n                      else 0) =\n        RatFunc.liftOn { toFractionRing := Localization.mk c✝ d✝ }\n            (fun n d =>\n              if h : ↑φ d ∈ S[X]⁰ then { toFractionRing := Localization.mk (↑φ n) { val := ↑φ d, property := h } }\n              else 0)\n            (_ :\n              ∀ {p q p' q' : R[X]},\n                q ∈ R[X]⁰ →\n                  q' ∈ R[X]⁰ →\n                    q' * p = q * p' →\n                      (if h : ↑φ q ∈ S[X]⁰ then\n                          { toFractionRing := Localization.mk (↑φ p) { val := ↑φ q, property := h } }\n                        else 0) =\n                        if h : ↑φ q' ∈ S[X]⁰ then\n                          { toFractionRing := Localization.mk (↑φ p') { val := ↑φ q', property := h } }\n                        else 0) *\n          RatFunc.liftOn { toFractionRing := y }\n            (fun n d =>\n              if h : ↑φ d ∈ S[X]⁰ then { toFractionRing := Localization.mk (↑φ n) { val := ↑φ d, property := h } }\n              else 0)\n            (_ :\n              ∀ {p q p' q' : R[X]},\n                q ∈ R[X]⁰ →\n                  q' ∈ R[X]⁰ →\n                    q' * p = q * p' →\n                      (if h : ↑φ q ∈ S[X]⁰ then\n                          { toFractionRing := Localization.mk (↑φ p) { val := ↑φ q, property := h } }\n                        else 0) =\n                        if h : ↑φ q' ∈ S[X]⁰ then\n                          { toFractionRing := Localization.mk (↑φ p') { val := ↑φ q', property := h } }\n                        else 0)) =\n    (_ :\n      RatFunc.liftOn ({ toFractionRing := Localization.mk c✝ d✝ } * { toFractionRing := y })\n          (fun n d =>\n            if h : ↑φ d ∈ S[X]⁰ then { toFractionRing := Localization.mk (↑φ n) { val := ↑φ d, property := h } } else 0)\n          (_ :\n            ∀ {p q p' q' : R[X]},\n              q ∈ R[X]⁰ →\n                q' ∈ R[X]⁰ →\n                  q' * p = q * p' →\n                    (if h : ↑φ q ∈ S[X]⁰ then\n                        { toFractionRing := Localization.mk (↑φ p) { val := ↑φ q, property := h } }\n                      else 0) =\n                      if h : ↑φ q' ∈ S[X]⁰ then\n                        { toFractionRing := Localization.mk (↑φ p') { val := ↑φ q', property := h } }\n                      else 0) =\n        RatFunc.liftOn { toFractionRing := Localization.mk c✝ d✝ }\n            (fun n d =>\n              if h : ↑φ d ∈ S[X]⁰ then { toFractionRing := Localization.mk (↑φ n) { val := ↑φ d, property := h } }\n              else 0)\n            (_ :\n              ∀ {p q p' q' : R[X]},\n                q ∈ R[X]⁰ →\n                  q' ∈ R[X]⁰ →\n                    q' * p = q * p' →\n                      (if h : ↑φ q ∈ S[X]⁰ then\n                          { toFractionRing := Localization.mk (↑φ p) { val := ↑φ q, property := h } }\n                        else 0) =\n                        if h : ↑φ q' ∈ S[X]⁰ then\n                          { toFractionRing := Localization.mk (↑φ p') { val := ↑φ q', property := h } }\n                        else 0) *\n          RatFunc.liftOn { toFractionRing := y }\n            (fun n d =>\n              if h : ↑φ d ∈ S[X]⁰ then { toFractionRing := Localization.mk (↑φ n) { val := ↑φ d, property := h } }\n              else 0)\n            (_ :\n              ∀ {p q p' q' : R[X]},\n                q ∈ R[X]⁰ →\n                  q' ∈ R[X]⁰ →\n                    q' * p = q * p' →\n                      (if h : ↑φ q ∈ S[X]⁰ then\n                          { toFractionRing := Localization.mk (↑φ p) { val := ↑φ q, property := h } }\n                        else 0) =\n                        if h : ↑φ q' ∈ S[X]⁰ then\n                          { toFractionRing := Localization.mk (↑φ p') { val := ↑φ q', property := h } }\n                        else 0))\n[PROOFSTEP]\ninduction' y using Localization.rec with p' q'\n[GOAL]\ncase ofFractionRing.ofFractionRing.f.f\nK : Type u\ninst✝⁵ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝⁴ : CommGroupWithZero G₀\ninst✝³ : Field L\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : MonoidHomClass F R[X] S[X]\nφ : F\nhφ : R[X]⁰ ≤ Submonoid.comap φ S[X]⁰\np : R[X]\nq : { x // x ∈ R[X]⁰ }\np' : R[X]\nq' : { x // x ∈ R[X]⁰ }\n⊢ RatFunc.liftOn ({ toFractionRing := Localization.mk p q } * { toFractionRing := Localization.mk p' q' })\n      (fun n d =>\n        if h : ↑φ d ∈ S[X]⁰ then { toFractionRing := Localization.mk (↑φ n) { val := ↑φ d, property := h } } else 0)\n      (_ :\n        ∀ {p q p' q' : R[X]},\n          q ∈ R[X]⁰ →\n            q' ∈ R[X]⁰ →\n              q' * p = q * p' →\n                (if h : ↑φ q ∈ S[X]⁰ then { toFractionRing := Localization.mk (↑φ p) { val := ↑φ q, property := h } }\n                  else 0) =\n                  if h : ↑φ q' ∈ S[X]⁰ then\n                    { toFractionRing := Localization.mk (↑φ p') { val := ↑φ q', property := h } }\n                  else 0) =\n    RatFunc.liftOn { toFractionRing := Localization.mk p q }\n        (fun n d =>\n          if h : ↑φ d ∈ S[X]⁰ then { toFractionRing := Localization.mk (↑φ n) { val := ↑φ d, property := h } } else 0)\n        (_ :\n          ∀ {p q p' q' : R[X]},\n            q ∈ R[X]⁰ →\n              q' ∈ R[X]⁰ →\n                q' * p = q * p' →\n                  (if h : ↑φ q ∈ S[X]⁰ then { toFractionRing := Localization.mk (↑φ p) { val := ↑φ q, property := h } }\n                    else 0) =\n                    if h : ↑φ q' ∈ S[X]⁰ then\n                      { toFractionRing := Localization.mk (↑φ p') { val := ↑φ q', property := h } }\n                    else 0) *\n      RatFunc.liftOn { toFractionRing := Localization.mk p' q' }\n        (fun n d =>\n          if h : ↑φ d ∈ S[X]⁰ then { toFractionRing := Localization.mk (↑φ n) { val := ↑φ d, property := h } } else 0)\n        (_ :\n          ∀ {p q p' q' : R[X]},\n            q ∈ R[X]⁰ →\n              q' ∈ R[X]⁰ →\n                q' * p = q * p' →\n                  (if h : ↑φ q ∈ S[X]⁰ then { toFractionRing := Localization.mk (↑φ p) { val := ↑φ q, property := h } }\n                    else 0) =\n                    if h : ↑φ q' ∈ S[X]⁰ then\n                      { toFractionRing := Localization.mk (↑φ p') { val := ↑φ q', property := h } }\n                    else 0)\n[PROOFSTEP]\nhave hq : φ q ∈ S[X]⁰ := hφ q.prop\n[GOAL]\ncase ofFractionRing.ofFractionRing.f.f\nK : Type u\ninst✝⁵ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝⁴ : CommGroupWithZero G₀\ninst✝³ : Field L\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : MonoidHomClass F R[X] S[X]\nφ : F\nhφ : R[X]⁰ ≤ Submonoid.comap φ S[X]⁰\np : R[X]\nq : { x // x ∈ R[X]⁰ }\np' : R[X]\nq' : { x // x ∈ R[X]⁰ }\nhq : ↑φ ↑q ∈ S[X]⁰\n⊢ RatFunc.liftOn ({ toFractionRing := Localization.mk p q } * { toFractionRing := Localization.mk p' q' })\n      (fun n d =>\n        if h : ↑φ d ∈ S[X]⁰ then { toFractionRing := Localization.mk (↑φ n) { val := ↑φ d, property := h } } else 0)\n      (_ :\n        ∀ {p q p' q' : R[X]},\n          q ∈ R[X]⁰ →\n            q' ∈ R[X]⁰ →\n              q' * p = q * p' →\n                (if h : ↑φ q ∈ S[X]⁰ then { toFractionRing := Localization.mk (↑φ p) { val := ↑φ q, property := h } }\n                  else 0) =\n                  if h : ↑φ q' ∈ S[X]⁰ then\n                    { toFractionRing := Localization.mk (↑φ p') { val := ↑φ q', property := h } }\n                  else 0) =\n    RatFunc.liftOn { toFractionRing := Localization.mk p q }\n        (fun n d =>\n          if h : ↑φ d ∈ S[X]⁰ then { toFractionRing := Localization.mk (↑φ n) { val := ↑φ d, property := h } } else 0)\n        (_ :\n          ∀ {p q p' q' : R[X]},\n            q ∈ R[X]⁰ →\n              q' ∈ R[X]⁰ →\n                q' * p = q * p' →\n                  (if h : ↑φ q ∈ S[X]⁰ then { toFractionRing := Localization.mk (↑φ p) { val := ↑φ q, property := h } }\n                    else 0) =\n                    if h : ↑φ q' ∈ S[X]⁰ then\n                      { toFractionRing := Localization.mk (↑φ p') { val := ↑φ q', property := h } }\n                    else 0) *\n      RatFunc.liftOn { toFractionRing := Localization.mk p' q' }\n        (fun n d =>\n          if h : ↑φ d ∈ S[X]⁰ then { toFractionRing := Localization.mk (↑φ n) { val := ↑φ d, property := h } } else 0)\n        (_ :\n          ∀ {p q p' q' : R[X]},\n            q ∈ R[X]⁰ →\n              q' ∈ R[X]⁰ →\n                q' * p = q * p' →\n                  (if h : ↑φ q ∈ S[X]⁰ then { toFractionRing := Localization.mk (↑φ p) { val := ↑φ q, property := h } }\n                    else 0) =\n                    if h : ↑φ q' ∈ S[X]⁰ then\n                      { toFractionRing := Localization.mk (↑φ p') { val := ↑φ q', property := h } }\n                    else 0)\n[PROOFSTEP]\nhave hq' : φ q' ∈ S[X]⁰ := hφ q'.prop\n[GOAL]\ncase ofFractionRing.ofFractionRing.f.f\nK : Type u\ninst✝⁵ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝⁴ : CommGroupWithZero G₀\ninst✝³ : Field L\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : MonoidHomClass F R[X] S[X]\nφ : F\nhφ : R[X]⁰ ≤ Submonoid.comap φ S[X]⁰\np : R[X]\nq : { x // x ∈ R[X]⁰ }\np' : R[X]\nq' : { x // x ∈ R[X]⁰ }\nhq : ↑φ ↑q ∈ S[X]⁰\nhq' : ↑φ ↑q' ∈ S[X]⁰\n⊢ RatFunc.liftOn ({ toFractionRing := Localization.mk p q } * { toFractionRing := Localization.mk p' q' })\n      (fun n d =>\n        if h : ↑φ d ∈ S[X]⁰ then { toFractionRing := Localization.mk (↑φ n) { val := ↑φ d, property := h } } else 0)\n      (_ :\n        ∀ {p q p' q' : R[X]},\n          q ∈ R[X]⁰ →\n            q' ∈ R[X]⁰ →\n              q' * p = q * p' →\n                (if h : ↑φ q ∈ S[X]⁰ then { toFractionRing := Localization.mk (↑φ p) { val := ↑φ q, property := h } }\n                  else 0) =\n                  if h : ↑φ q' ∈ S[X]⁰ then\n                    { toFractionRing := Localization.mk (↑φ p') { val := ↑φ q', property := h } }\n                  else 0) =\n    RatFunc.liftOn { toFractionRing := Localization.mk p q }\n        (fun n d =>\n          if h : ↑φ d ∈ S[X]⁰ then { toFractionRing := Localization.mk (↑φ n) { val := ↑φ d, property := h } } else 0)\n        (_ :\n          ∀ {p q p' q' : R[X]},\n            q ∈ R[X]⁰ →\n              q' ∈ R[X]⁰ →\n                q' * p = q * p' →\n                  (if h : ↑φ q ∈ S[X]⁰ then { toFractionRing := Localization.mk (↑φ p) { val := ↑φ q, property := h } }\n                    else 0) =\n                    if h : ↑φ q' ∈ S[X]⁰ then\n                      { toFractionRing := Localization.mk (↑φ p') { val := ↑φ q', property := h } }\n                    else 0) *\n      RatFunc.liftOn { toFractionRing := Localization.mk p' q' }\n        (fun n d =>\n          if h : ↑φ d ∈ S[X]⁰ then { toFractionRing := Localization.mk (↑φ n) { val := ↑φ d, property := h } } else 0)\n        (_ :\n          ∀ {p q p' q' : R[X]},\n            q ∈ R[X]⁰ →\n              q' ∈ R[X]⁰ →\n                q' * p = q * p' →\n                  (if h : ↑φ q ∈ S[X]⁰ then { toFractionRing := Localization.mk (↑φ p) { val := ↑φ q, property := h } }\n                    else 0) =\n                    if h : ↑φ q' ∈ S[X]⁰ then\n                      { toFractionRing := Localization.mk (↑φ p') { val := ↑φ q', property := h } }\n                    else 0)\n[PROOFSTEP]\nhave hqq' : φ ↑(q * q') ∈ S[X]⁰ := by simpa using Submonoid.mul_mem _ hq hq'\n[GOAL]\nK : Type u\ninst✝⁵ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝⁴ : CommGroupWithZero G₀\ninst✝³ : Field L\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : MonoidHomClass F R[X] S[X]\nφ : F\nhφ : R[X]⁰ ≤ Submonoid.comap φ S[X]⁰\np : R[X]\nq : { x // x ∈ R[X]⁰ }\np' : R[X]\nq' : { x // x ∈ R[X]⁰ }\nhq : ↑φ ↑q ∈ S[X]⁰\nhq' : ↑φ ↑q' ∈ S[X]⁰\n⊢ ↑φ ↑(q * q') ∈ S[X]⁰\n[PROOFSTEP]\nsimpa using Submonoid.mul_mem _ hq hq'\n[GOAL]\ncase ofFractionRing.ofFractionRing.f.f\nK : Type u\ninst✝⁵ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝⁴ : CommGroupWithZero G₀\ninst✝³ : Field L\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : MonoidHomClass F R[X] S[X]\nφ : F\nhφ : R[X]⁰ ≤ Submonoid.comap φ S[X]⁰\np : R[X]\nq : { x // x ∈ R[X]⁰ }\np' : R[X]\nq' : { x // x ∈ R[X]⁰ }\nhq : ↑φ ↑q ∈ S[X]⁰\nhq' : ↑φ ↑q' ∈ S[X]⁰\nhqq' : ↑φ ↑(q * q') ∈ S[X]⁰\n⊢ RatFunc.liftOn ({ toFractionRing := Localization.mk p q } * { toFractionRing := Localization.mk p' q' })\n      (fun n d =>\n        if h : ↑φ d ∈ S[X]⁰ then { toFractionRing := Localization.mk (↑φ n) { val := ↑φ d, property := h } } else 0)\n      (_ :\n        ∀ {p q p' q' : R[X]},\n          q ∈ R[X]⁰ →\n            q' ∈ R[X]⁰ →\n              q' * p = q * p' →\n                (if h : ↑φ q ∈ S[X]⁰ then { toFractionRing := Localization.mk (↑φ p) { val := ↑φ q, property := h } }\n                  else 0) =\n                  if h : ↑φ q' ∈ S[X]⁰ then\n                    { toFractionRing := Localization.mk (↑φ p') { val := ↑φ q', property := h } }\n                  else 0) =\n    RatFunc.liftOn { toFractionRing := Localization.mk p q }\n        (fun n d =>\n          if h : ↑φ d ∈ S[X]⁰ then { toFractionRing := Localization.mk (↑φ n) { val := ↑φ d, property := h } } else 0)\n        (_ :\n          ∀ {p q p' q' : R[X]},\n            q ∈ R[X]⁰ →\n              q' ∈ R[X]⁰ →\n                q' * p = q * p' →\n                  (if h : ↑φ q ∈ S[X]⁰ then { toFractionRing := Localization.mk (↑φ p) { val := ↑φ q, property := h } }\n                    else 0) =\n                    if h : ↑φ q' ∈ S[X]⁰ then\n                      { toFractionRing := Localization.mk (↑φ p') { val := ↑φ q', property := h } }\n                    else 0) *\n      RatFunc.liftOn { toFractionRing := Localization.mk p' q' }\n        (fun n d =>\n          if h : ↑φ d ∈ S[X]⁰ then { toFractionRing := Localization.mk (↑φ n) { val := ↑φ d, property := h } } else 0)\n        (_ :\n          ∀ {p q p' q' : R[X]},\n            q ∈ R[X]⁰ →\n              q' ∈ R[X]⁰ →\n                q' * p = q * p' →\n                  (if h : ↑φ q ∈ S[X]⁰ then { toFractionRing := Localization.mk (↑φ p) { val := ↑φ q, property := h } }\n                    else 0) =\n                    if h : ↑φ q' ∈ S[X]⁰ then\n                      { toFractionRing := Localization.mk (↑φ p') { val := ↑φ q', property := h } }\n                    else 0)\n[PROOFSTEP]\nsimp_rw [← ofFractionRing_mul, Localization.mk_mul, liftOn_ofFractionRing_mk, dif_pos hq, dif_pos hq', dif_pos hqq', ←\n  ofFractionRing_mul, Submonoid.coe_mul, map_mul, Localization.mk_mul, Submonoid.mk_mul_mk]\n[GOAL]\ncase ofFractionRing.ofFractionRing.f.H\nK : Type u\ninst✝⁵ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝⁴ : CommGroupWithZero G₀\ninst✝³ : Field L\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : MonoidHomClass F R[X] S[X]\nφ : F\nhφ : R[X]⁰ ≤ Submonoid.comap φ S[X]⁰\ny : FractionRing R[X]\np : R[X]\nq : { x // x ∈ R[X]⁰ }\na✝ c✝ : R[X]\nb✝ d✝ : { x // x ∈ R[X]⁰ }\nh✝ : ↑(Localization.r R[X]⁰) (a✝, b✝) (c✝, d✝)\n⊢ (_ :\n      RatFunc.liftOn ({ toFractionRing := Localization.mk p q } * { toFractionRing := Localization.mk c✝ d✝ })\n          (fun n d =>\n            if h : ↑φ d ∈ S[X]⁰ then { toFractionRing := Localization.mk (↑φ n) { val := ↑φ d, property := h } } else 0)\n          (_ :\n            ∀ {p q p' q' : R[X]},\n              q ∈ R[X]⁰ →\n                q' ∈ R[X]⁰ →\n                  q' * p = q * p' →\n                    (if h : ↑φ q ∈ S[X]⁰ then\n                        { toFractionRing := Localization.mk (↑φ p) { val := ↑φ q, property := h } }\n                      else 0) =\n                      if h : ↑φ q' ∈ S[X]⁰ then\n                        { toFractionRing := Localization.mk (↑φ p') { val := ↑φ q', property := h } }\n                      else 0) =\n        RatFunc.liftOn { toFractionRing := Localization.mk p q }\n            (fun n d =>\n              if h : ↑φ d ∈ S[X]⁰ then { toFractionRing := Localization.mk (↑φ n) { val := ↑φ d, property := h } }\n              else 0)\n            (_ :\n              ∀ {p q p' q' : R[X]},\n                q ∈ R[X]⁰ →\n                  q' ∈ R[X]⁰ →\n                    q' * p = q * p' →\n                      (if h : ↑φ q ∈ S[X]⁰ then\n                          { toFractionRing := Localization.mk (↑φ p) { val := ↑φ q, property := h } }\n                        else 0) =\n                        if h : ↑φ q' ∈ S[X]⁰ then\n                          { toFractionRing := Localization.mk (↑φ p') { val := ↑φ q', property := h } }\n                        else 0) *\n          RatFunc.liftOn { toFractionRing := Localization.mk c✝ d✝ }\n            (fun n d =>\n              if h : ↑φ d ∈ S[X]⁰ then { toFractionRing := Localization.mk (↑φ n) { val := ↑φ d, property := h } }\n              else 0)\n            (_ :\n              ∀ {p q p' q' : R[X]},\n                q ∈ R[X]⁰ →\n                  q' ∈ R[X]⁰ →\n                    q' * p = q * p' →\n                      (if h : ↑φ q ∈ S[X]⁰ then\n                          { toFractionRing := Localization.mk (↑φ p) { val := ↑φ q, property := h } }\n                        else 0) =\n                        if h : ↑φ q' ∈ S[X]⁰ then\n                          { toFractionRing := Localization.mk (↑φ p') { val := ↑φ q', property := h } }\n                        else 0)) =\n    (_ :\n      RatFunc.liftOn ({ toFractionRing := Localization.mk p q } * { toFractionRing := Localization.mk c✝ d✝ })\n          (fun n d =>\n            if h : ↑φ d ∈ S[X]⁰ then { toFractionRing := Localization.mk (↑φ n) { val := ↑φ d, property := h } } else 0)\n          (_ :\n            ∀ {p q p' q' : R[X]},\n              q ∈ R[X]⁰ →\n                q' ∈ R[X]⁰ →\n                  q' * p = q * p' →\n                    (if h : ↑φ q ∈ S[X]⁰ then\n                        { toFractionRing := Localization.mk (↑φ p) { val := ↑φ q, property := h } }\n                      else 0) =\n                      if h : ↑φ q' ∈ S[X]⁰ then\n                        { toFractionRing := Localization.mk (↑φ p') { val := ↑φ q', property := h } }\n                      else 0) =\n        RatFunc.liftOn { toFractionRing := Localization.mk p q }\n            (fun n d =>\n              if h : ↑φ d ∈ S[X]⁰ then { toFractionRing := Localization.mk (↑φ n) { val := ↑φ d, property := h } }\n              else 0)\n            (_ :\n              ∀ {p q p' q' : R[X]},\n                q ∈ R[X]⁰ →\n                  q' ∈ R[X]⁰ →\n                    q' * p = q * p' →\n                      (if h : ↑φ q ∈ S[X]⁰ then\n                          { toFractionRing := Localization.mk (↑φ p) { val := ↑φ q, property := h } }\n                        else 0) =\n                        if h : ↑φ q' ∈ S[X]⁰ then\n                          { toFractionRing := Localization.mk (↑φ p') { val := ↑φ q', property := h } }\n                        else 0) *\n          RatFunc.liftOn { toFractionRing := Localization.mk c✝ d✝ }\n            (fun n d =>\n              if h : ↑φ d ∈ S[X]⁰ then { toFractionRing := Localization.mk (↑φ n) { val := ↑φ d, property := h } }\n              else 0)\n            (_ :\n              ∀ {p q p' q' : R[X]},\n                q ∈ R[X]⁰ →\n                  q' ∈ R[X]⁰ →\n                    q' * p = q * p' →\n                      (if h : ↑φ q ∈ S[X]⁰ then\n                          { toFractionRing := Localization.mk (↑φ p) { val := ↑φ q, property := h } }\n                        else 0) =\n                        if h : ↑φ q' ∈ S[X]⁰ then\n                          { toFractionRing := Localization.mk (↑φ p') { val := ↑φ q', property := h } }\n                        else 0))\n[PROOFSTEP]\nrfl\n[GOAL]\ncase ofFractionRing.ofFractionRing.H\nK : Type u\ninst✝⁵ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝⁴ : CommGroupWithZero G₀\ninst✝³ : Field L\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : MonoidHomClass F R[X] S[X]\nφ : F\nhφ : R[X]⁰ ≤ Submonoid.comap φ S[X]⁰\nx y : FractionRing R[X]\na✝ c✝ : R[X]\nb✝ d✝ : { x // x ∈ R[X]⁰ }\nh✝ : ↑(Localization.r R[X]⁰) (a✝, b✝) (c✝, d✝)\n⊢ (_ :\n      RatFunc.liftOn ({ toFractionRing := Localization.mk c✝ d✝ } * { toFractionRing := y })\n          (fun n d =>\n            if h : ↑φ d ∈ S[X]⁰ then { toFractionRing := Localization.mk (↑φ n) { val := ↑φ d, property := h } } else 0)\n          (_ :\n            ∀ {p q p' q' : R[X]},\n              q ∈ R[X]⁰ →\n                q' ∈ R[X]⁰ →\n                  q' * p = q * p' →\n                    (if h : ↑φ q ∈ S[X]⁰ then\n                        { toFractionRing := Localization.mk (↑φ p) { val := ↑φ q, property := h } }\n                      else 0) =\n                      if h : ↑φ q' ∈ S[X]⁰ then\n                        { toFractionRing := Localization.mk (↑φ p') { val := ↑φ q', property := h } }\n                      else 0) =\n        RatFunc.liftOn { toFractionRing := Localization.mk c✝ d✝ }\n            (fun n d =>\n              if h : ↑φ d ∈ S[X]⁰ then { toFractionRing := Localization.mk (↑φ n) { val := ↑φ d, property := h } }\n              else 0)\n            (_ :\n              ∀ {p q p' q' : R[X]},\n                q ∈ R[X]⁰ →\n                  q' ∈ R[X]⁰ →\n                    q' * p = q * p' →\n                      (if h : ↑φ q ∈ S[X]⁰ then\n                          { toFractionRing := Localization.mk (↑φ p) { val := ↑φ q, property := h } }\n                        else 0) =\n                        if h : ↑φ q' ∈ S[X]⁰ then\n                          { toFractionRing := Localization.mk (↑φ p') { val := ↑φ q', property := h } }\n                        else 0) *\n          RatFunc.liftOn { toFractionRing := y }\n            (fun n d =>\n              if h : ↑φ d ∈ S[X]⁰ then { toFractionRing := Localization.mk (↑φ n) { val := ↑φ d, property := h } }\n              else 0)\n            (_ :\n              ∀ {p q p' q' : R[X]},\n                q ∈ R[X]⁰ →\n                  q' ∈ R[X]⁰ →\n                    q' * p = q * p' →\n                      (if h : ↑φ q ∈ S[X]⁰ then\n                          { toFractionRing := Localization.mk (↑φ p) { val := ↑φ q, property := h } }\n                        else 0) =\n                        if h : ↑φ q' ∈ S[X]⁰ then\n                          { toFractionRing := Localization.mk (↑φ p') { val := ↑φ q', property := h } }\n                        else 0)) =\n    (_ :\n      RatFunc.liftOn ({ toFractionRing := Localization.mk c✝ d✝ } * { toFractionRing := y })\n          (fun n d =>\n            if h : ↑φ d ∈ S[X]⁰ then { toFractionRing := Localization.mk (↑φ n) { val := ↑φ d, property := h } } else 0)\n          (_ :\n            ∀ {p q p' q' : R[X]},\n              q ∈ R[X]⁰ →\n                q' ∈ R[X]⁰ →\n                  q' * p = q * p' →\n                    (if h : ↑φ q ∈ S[X]⁰ then\n                        { toFractionRing := Localization.mk (↑φ p) { val := ↑φ q, property := h } }\n                      else 0) =\n                      if h : ↑φ q' ∈ S[X]⁰ then\n                        { toFractionRing := Localization.mk (↑φ p') { val := ↑φ q', property := h } }\n                      else 0) =\n        RatFunc.liftOn { toFractionRing := Localization.mk c✝ d✝ }\n            (fun n d =>\n              if h : ↑φ d ∈ S[X]⁰ then { toFractionRing := Localization.mk (↑φ n) { val := ↑φ d, property := h } }\n              else 0)\n            (_ :\n              ∀ {p q p' q' : R[X]},\n                q ∈ R[X]⁰ →\n                  q' ∈ R[X]⁰ →\n                    q' * p = q * p' →\n                      (if h : ↑φ q ∈ S[X]⁰ then\n                          { toFractionRing := Localization.mk (↑φ p) { val := ↑φ q, property := h } }\n                        else 0) =\n                        if h : ↑φ q' ∈ S[X]⁰ then\n                          { toFractionRing := Localization.mk (↑φ p') { val := ↑φ q', property := h } }\n                        else 0) *\n          RatFunc.liftOn { toFractionRing := y }\n            (fun n d =>\n              if h : ↑φ d ∈ S[X]⁰ then { toFractionRing := Localization.mk (↑φ n) { val := ↑φ d, property := h } }\n              else 0)\n            (_ :\n              ∀ {p q p' q' : R[X]},\n                q ∈ R[X]⁰ →\n                  q' ∈ R[X]⁰ →\n                    q' * p = q * p' →\n                      (if h : ↑φ q ∈ S[X]⁰ then\n                          { toFractionRing := Localization.mk (↑φ p) { val := ↑φ q, property := h } }\n                        else 0) =\n                        if h : ↑φ q' ∈ S[X]⁰ then\n                          { toFractionRing := Localization.mk (↑φ p') { val := ↑φ q', property := h } }\n                        else 0))\n[PROOFSTEP]\nrfl\n[GOAL]\nK : Type u\ninst✝⁵ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝⁴ : CommGroupWithZero G₀\ninst✝³ : Field L\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : MonoidHomClass F R[X] S[X]\nφ : F\nhφ : R[X]⁰ ≤ Submonoid.comap φ S[X]⁰\nn : R[X]\nd : { x // x ∈ R[X]⁰ }\n⊢ ↑(map φ hφ) { toFractionRing := Localization.mk n d } =\n    { toFractionRing := Localization.mk (↑φ n) { val := ↑φ ↑d, property := (_ : ↑d ∈ Submonoid.comap φ S[X]⁰) } }\n[PROOFSTEP]\nrefine (liftOn_ofFractionRing_mk n _ _ _).trans ?_\n[GOAL]\nK : Type u\ninst✝⁵ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝⁴ : CommGroupWithZero G₀\ninst✝³ : Field L\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : MonoidHomClass F R[X] S[X]\nφ : F\nhφ : R[X]⁰ ≤ Submonoid.comap φ S[X]⁰\nn : R[X]\nd : { x // x ∈ R[X]⁰ }\n⊢ (if h : ↑φ ↑d ∈ S[X]⁰ then { toFractionRing := Localization.mk (↑φ n) { val := ↑φ ↑d, property := h } } else 0) =\n    { toFractionRing := Localization.mk (↑φ n) { val := ↑φ ↑d, property := (_ : ↑d ∈ Submonoid.comap φ S[X]⁰) } }\n[PROOFSTEP]\nrw [dif_pos]\n[GOAL]\nK : Type u\ninst✝⁵ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝⁴ : CommGroupWithZero G₀\ninst✝³ : Field L\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : MonoidHomClass F R[X] S[X]\nφ : F\nhφ : R[X]⁰ ≤ Submonoid.comap φ S[X]⁰\nhf : Function.Injective ↑φ\n⊢ Function.Injective ↑(map φ hφ)\n[PROOFSTEP]\nrintro ⟨x⟩ ⟨y⟩ h\n[GOAL]\ncase ofFractionRing.ofFractionRing\nK : Type u\ninst✝⁵ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝⁴ : CommGroupWithZero G₀\ninst✝³ : Field L\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : MonoidHomClass F R[X] S[X]\nφ : F\nhφ : R[X]⁰ ≤ Submonoid.comap φ S[X]⁰\nhf : Function.Injective ↑φ\nx y : FractionRing R[X]\nh : ↑(map φ hφ) { toFractionRing := x } = ↑(map φ hφ) { toFractionRing := y }\n⊢ { toFractionRing := x } = { toFractionRing := y }\n[PROOFSTEP]\ninduction x using Localization.induction_on\n[GOAL]\ncase ofFractionRing.ofFractionRing.H\nK : Type u\ninst✝⁵ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝⁴ : CommGroupWithZero G₀\ninst✝³ : Field L\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : MonoidHomClass F R[X] S[X]\nφ : F\nhφ : R[X]⁰ ≤ Submonoid.comap φ S[X]⁰\nhf : Function.Injective ↑φ\ny : FractionRing R[X]\ny✝ : R[X] × { x // x ∈ R[X]⁰ }\nh : ↑(map φ hφ) { toFractionRing := Localization.mk y✝.fst y✝.snd } = ↑(map φ hφ) { toFractionRing := y }\n⊢ { toFractionRing := Localization.mk y✝.fst y✝.snd } = { toFractionRing := y }\n[PROOFSTEP]\ninduction y using Localization.induction_on\n[GOAL]\ncase ofFractionRing.ofFractionRing.H.H\nK : Type u\ninst✝⁵ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝⁴ : CommGroupWithZero G₀\ninst✝³ : Field L\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : MonoidHomClass F R[X] S[X]\nφ : F\nhφ : R[X]⁰ ≤ Submonoid.comap φ S[X]⁰\nhf : Function.Injective ↑φ\ny✝¹ y✝ : R[X] × { x // x ∈ R[X]⁰ }\nh :\n  ↑(map φ hφ) { toFractionRing := Localization.mk y✝¹.fst y✝¹.snd } =\n    ↑(map φ hφ) { toFractionRing := Localization.mk y✝.fst y✝.snd }\n⊢ { toFractionRing := Localization.mk y✝¹.fst y✝¹.snd } = { toFractionRing := Localization.mk y✝.fst y✝.snd }\n[PROOFSTEP]\nsimpa only [map_apply_ofFractionRing_mk, ofFractionRing_injective.eq_iff, Localization.mk_eq_mk_iff,\n  Localization.r_iff_exists, mul_cancel_left_coe_nonZeroDivisors, exists_const, ← map_mul, hf.eq_iff] using h\n[GOAL]\nK : Type u\ninst✝⁵ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝⁴ : CommGroupWithZero G₀\ninst✝³ : Field L\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : RingHomClass F R[X] S[X]\nφ : F\nhφ : R[X]⁰ ≤ Submonoid.comap φ S[X]⁰\nsrc✝ : RatFunc R →* RatFunc S := map φ hφ\n⊢ OneHom.toFun\n      (↑{ toOneHom := ↑src✝,\n          map_mul' :=\n            (_ : ∀ (x y : RatFunc R), OneHom.toFun (↑src✝) (x * y) = OneHom.toFun (↑src✝) x * OneHom.toFun (↑src✝) y) })\n      0 =\n    0\n[PROOFSTEP]\nsimp_rw [MonoidHom.toFun_eq_coe, ← ofFractionRing_zero, ← Localization.mk_zero (1 : R[X]⁰), ←\n  Localization.mk_zero (1 : S[X]⁰), map_apply_ofFractionRing_mk, map_zero, Localization.mk_eq_mk',\n  IsLocalization.mk'_zero]\n[GOAL]\nK : Type u\ninst✝⁵ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝⁴ : CommGroupWithZero G₀\ninst✝³ : Field L\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : RingHomClass F R[X] S[X]\nφ : F\nhφ : R[X]⁰ ≤ Submonoid.comap φ S[X]⁰\nsrc✝ : RatFunc R →* RatFunc S := map φ hφ\n⊢ ∀ (x y : RatFunc R),\n    OneHom.toFun\n        (↑{ toOneHom := ↑src✝,\n            map_mul' :=\n              (_ :\n                ∀ (x y : RatFunc R), OneHom.toFun (↑src✝) (x * y) = OneHom.toFun (↑src✝) x * OneHom.toFun (↑src✝) y) })\n        (x + y) =\n      OneHom.toFun\n          (↑{ toOneHom := ↑src✝,\n              map_mul' :=\n                (_ :\n                  ∀ (x y : RatFunc R),\n                    OneHom.toFun (↑src✝) (x * y) = OneHom.toFun (↑src✝) x * OneHom.toFun (↑src✝) y) })\n          x +\n        OneHom.toFun\n          (↑{ toOneHom := ↑src✝,\n              map_mul' :=\n                (_ :\n                  ∀ (x y : RatFunc R),\n                    OneHom.toFun (↑src✝) (x * y) = OneHom.toFun (↑src✝) x * OneHom.toFun (↑src✝) y) })\n          y\n[PROOFSTEP]\nrintro ⟨x⟩\n  ⟨y⟩\n      -- porting note: had to hint `induction` which induction principle to use\n[GOAL]\ncase ofFractionRing.ofFractionRing\nK : Type u\ninst✝⁵ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝⁴ : CommGroupWithZero G₀\ninst✝³ : Field L\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : RingHomClass F R[X] S[X]\nφ : F\nhφ : R[X]⁰ ≤ Submonoid.comap φ S[X]⁰\nsrc✝ : RatFunc R →* RatFunc S := map φ hφ\nx y : FractionRing R[X]\n⊢ OneHom.toFun\n      (↑{ toOneHom := ↑src✝,\n          map_mul' :=\n            (_ : ∀ (x y : RatFunc R), OneHom.toFun (↑src✝) (x * y) = OneHom.toFun (↑src✝) x * OneHom.toFun (↑src✝) y) })\n      ({ toFractionRing := x } + { toFractionRing := y }) =\n    OneHom.toFun\n        ↑{ toOneHom := ↑src✝,\n            map_mul' :=\n              (_ :\n                ∀ (x y : RatFunc R), OneHom.toFun (↑src✝) (x * y) = OneHom.toFun (↑src✝) x * OneHom.toFun (↑src✝) y) }\n        { toFractionRing := x } +\n      OneHom.toFun\n        ↑{ toOneHom := ↑src✝,\n            map_mul' :=\n              (_ :\n                ∀ (x y : RatFunc R), OneHom.toFun (↑src✝) (x * y) = OneHom.toFun (↑src✝) x * OneHom.toFun (↑src✝) y) }\n        { toFractionRing := y }\n[PROOFSTEP]\ninduction x using Localization.rec\n[GOAL]\ncase ofFractionRing.ofFractionRing.f\nK : Type u\ninst✝⁵ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝⁴ : CommGroupWithZero G₀\ninst✝³ : Field L\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : RingHomClass F R[X] S[X]\nφ : F\nhφ : R[X]⁰ ≤ Submonoid.comap φ S[X]⁰\nsrc✝ : RatFunc R →* RatFunc S := map φ hφ\ny : FractionRing R[X]\na✝ : R[X]\nb✝ : { x // x ∈ R[X]⁰ }\n⊢ OneHom.toFun\n      (↑{ toOneHom := ↑src✝,\n          map_mul' :=\n            (_ : ∀ (x y : RatFunc R), OneHom.toFun (↑src✝) (x * y) = OneHom.toFun (↑src✝) x * OneHom.toFun (↑src✝) y) })\n      ({ toFractionRing := Localization.mk a✝ b✝ } + { toFractionRing := y }) =\n    OneHom.toFun\n        ↑{ toOneHom := ↑src✝,\n            map_mul' :=\n              (_ :\n                ∀ (x y : RatFunc R), OneHom.toFun (↑src✝) (x * y) = OneHom.toFun (↑src✝) x * OneHom.toFun (↑src✝) y) }\n        { toFractionRing := Localization.mk a✝ b✝ } +\n      OneHom.toFun\n        ↑{ toOneHom := ↑src✝,\n            map_mul' :=\n              (_ :\n                ∀ (x y : RatFunc R), OneHom.toFun (↑src✝) (x * y) = OneHom.toFun (↑src✝) x * OneHom.toFun (↑src✝) y) }\n        { toFractionRing := y }\ncase ofFractionRing.ofFractionRing.H\nK : Type u\ninst✝⁵ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝⁴ : CommGroupWithZero G₀\ninst✝³ : Field L\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : RingHomClass F R[X] S[X]\nφ : F\nhφ : R[X]⁰ ≤ Submonoid.comap φ S[X]⁰\nsrc✝ : RatFunc R →* RatFunc S := map φ hφ\nx y : FractionRing R[X]\na✝ c✝ : R[X]\nb✝ d✝ : { x // x ∈ R[X]⁰ }\nh✝ : ↑(Localization.r R[X]⁰) (a✝, b✝) (c✝, d✝)\n⊢ (_ :\n      OneHom.toFun\n          (↑{ toOneHom := ↑src✝,\n              map_mul' :=\n                (_ :\n                  ∀ (x y : RatFunc R),\n                    OneHom.toFun (↑src✝) (x * y) = OneHom.toFun (↑src✝) x * OneHom.toFun (↑src✝) y) })\n          ({ toFractionRing := Localization.mk c✝ d✝ } + { toFractionRing := y }) =\n        OneHom.toFun\n            ↑{ toOneHom := ↑src✝,\n                map_mul' :=\n                  (_ :\n                    ∀ (x y : RatFunc R),\n                      OneHom.toFun (↑src✝) (x * y) = OneHom.toFun (↑src✝) x * OneHom.toFun (↑src✝) y) }\n            { toFractionRing := Localization.mk c✝ d✝ } +\n          OneHom.toFun\n            ↑{ toOneHom := ↑src✝,\n                map_mul' :=\n                  (_ :\n                    ∀ (x y : RatFunc R),\n                      OneHom.toFun (↑src✝) (x * y) = OneHom.toFun (↑src✝) x * OneHom.toFun (↑src✝) y) }\n            { toFractionRing := y }) =\n    (_ :\n      OneHom.toFun\n          (↑{ toOneHom := ↑src✝,\n              map_mul' :=\n                (_ :\n                  ∀ (x y : RatFunc R),\n                    OneHom.toFun (↑src✝) (x * y) = OneHom.toFun (↑src✝) x * OneHom.toFun (↑src✝) y) })\n          ({ toFractionRing := Localization.mk c✝ d✝ } + { toFractionRing := y }) =\n        OneHom.toFun\n            ↑{ toOneHom := ↑src✝,\n                map_mul' :=\n                  (_ :\n                    ∀ (x y : RatFunc R),\n                      OneHom.toFun (↑src✝) (x * y) = OneHom.toFun (↑src✝) x * OneHom.toFun (↑src✝) y) }\n            { toFractionRing := Localization.mk c✝ d✝ } +\n          OneHom.toFun\n            ↑{ toOneHom := ↑src✝,\n                map_mul' :=\n                  (_ :\n                    ∀ (x y : RatFunc R),\n                      OneHom.toFun (↑src✝) (x * y) = OneHom.toFun (↑src✝) x * OneHom.toFun (↑src✝) y) }\n            { toFractionRing := y })\n[PROOFSTEP]\ninduction y using Localization.rec\n[GOAL]\ncase ofFractionRing.ofFractionRing.f.f\nK : Type u\ninst✝⁵ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝⁴ : CommGroupWithZero G₀\ninst✝³ : Field L\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : RingHomClass F R[X] S[X]\nφ : F\nhφ : R[X]⁰ ≤ Submonoid.comap φ S[X]⁰\nsrc✝ : RatFunc R →* RatFunc S := map φ hφ\na✝¹ : R[X]\nb✝¹ : { x // x ∈ R[X]⁰ }\na✝ : R[X]\nb✝ : { x // x ∈ R[X]⁰ }\n⊢ OneHom.toFun\n      (↑{ toOneHom := ↑src✝,\n          map_mul' :=\n            (_ : ∀ (x y : RatFunc R), OneHom.toFun (↑src✝) (x * y) = OneHom.toFun (↑src✝) x * OneHom.toFun (↑src✝) y) })\n      ({ toFractionRing := Localization.mk a✝¹ b✝¹ } + { toFractionRing := Localization.mk a✝ b✝ }) =\n    OneHom.toFun\n        ↑{ toOneHom := ↑src✝,\n            map_mul' :=\n              (_ :\n                ∀ (x y : RatFunc R), OneHom.toFun (↑src✝) (x * y) = OneHom.toFun (↑src✝) x * OneHom.toFun (↑src✝) y) }\n        { toFractionRing := Localization.mk a✝¹ b✝¹ } +\n      OneHom.toFun\n        ↑{ toOneHom := ↑src✝,\n            map_mul' :=\n              (_ :\n                ∀ (x y : RatFunc R), OneHom.toFun (↑src✝) (x * y) = OneHom.toFun (↑src✝) x * OneHom.toFun (↑src✝) y) }\n        { toFractionRing := Localization.mk a✝ b✝ }\n[PROOFSTEP]\nsimp only [← ofFractionRing_add, Localization.add_mk, map_add, map_mul, MonoidHom.toFun_eq_coe,\n  map_apply_ofFractionRing_mk, Submonoid.coe_mul]\n  -- Porting note: `Submonoid.mk_mul_mk` couldn't be applied: motive incorrect,\n          -- even though it is a rfl lemma.\n[GOAL]\ncase ofFractionRing.ofFractionRing.f.f\nK : Type u\ninst✝⁵ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝⁴ : CommGroupWithZero G₀\ninst✝³ : Field L\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : RingHomClass F R[X] S[X]\nφ : F\nhφ : R[X]⁰ ≤ Submonoid.comap φ S[X]⁰\nsrc✝ : RatFunc R →* RatFunc S := map φ hφ\na✝¹ : R[X]\nb✝¹ : { x // x ∈ R[X]⁰ }\na✝ : R[X]\nb✝ : { x // x ∈ R[X]⁰ }\n⊢ {\n      toFractionRing :=\n        Localization.mk (↑φ ↑b✝¹ * ↑φ a✝ + ↑φ ↑b✝ * ↑φ a✝¹)\n          { val := ↑φ ↑b✝¹ * ↑φ ↑b✝, property := (_ : (fun x => x ∈ S[X]⁰) (↑φ ↑b✝¹ * ↑φ ↑b✝)) } } =\n    {\n      toFractionRing :=\n        Localization.mk (↑φ ↑b✝¹ * ↑φ a✝ + ↑φ ↑b✝ * ↑φ a✝¹)\n          ({ val := ↑φ ↑b✝¹, property := (_ : ↑b✝¹ ∈ Submonoid.comap φ S[X]⁰) } *\n            { val := ↑φ ↑b✝, property := (_ : ↑b✝ ∈ Submonoid.comap φ S[X]⁰) }) }\n[PROOFSTEP]\nrfl\n[GOAL]\ncase ofFractionRing.ofFractionRing.f.H\nK : Type u\ninst✝⁵ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝⁴ : CommGroupWithZero G₀\ninst✝³ : Field L\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : RingHomClass F R[X] S[X]\nφ : F\nhφ : R[X]⁰ ≤ Submonoid.comap φ S[X]⁰\nsrc✝ : RatFunc R →* RatFunc S := map φ hφ\ny : FractionRing R[X]\na✝¹ : R[X]\nb✝¹ : { x // x ∈ R[X]⁰ }\na✝ c✝ : R[X]\nb✝ d✝ : { x // x ∈ R[X]⁰ }\nh✝ : ↑(Localization.r R[X]⁰) (a✝, b✝) (c✝, d✝)\n⊢ (_ :\n      OneHom.toFun\n          (↑{ toOneHom := ↑src✝,\n              map_mul' :=\n                (_ :\n                  ∀ (x y : RatFunc R),\n                    OneHom.toFun (↑src✝) (x * y) = OneHom.toFun (↑src✝) x * OneHom.toFun (↑src✝) y) })\n          ({ toFractionRing := Localization.mk a✝¹ b✝¹ } + { toFractionRing := Localization.mk c✝ d✝ }) =\n        OneHom.toFun\n            ↑{ toOneHom := ↑src✝,\n                map_mul' :=\n                  (_ :\n                    ∀ (x y : RatFunc R),\n                      OneHom.toFun (↑src✝) (x * y) = OneHom.toFun (↑src✝) x * OneHom.toFun (↑src✝) y) }\n            { toFractionRing := Localization.mk a✝¹ b✝¹ } +\n          OneHom.toFun\n            ↑{ toOneHom := ↑src✝,\n                map_mul' :=\n                  (_ :\n                    ∀ (x y : RatFunc R),\n                      OneHom.toFun (↑src✝) (x * y) = OneHom.toFun (↑src✝) x * OneHom.toFun (↑src✝) y) }\n            { toFractionRing := Localization.mk c✝ d✝ }) =\n    (_ :\n      OneHom.toFun\n          (↑{ toOneHom := ↑src✝,\n              map_mul' :=\n                (_ :\n                  ∀ (x y : RatFunc R),\n                    OneHom.toFun (↑src✝) (x * y) = OneHom.toFun (↑src✝) x * OneHom.toFun (↑src✝) y) })\n          ({ toFractionRing := Localization.mk a✝¹ b✝¹ } + { toFractionRing := Localization.mk c✝ d✝ }) =\n        OneHom.toFun\n            ↑{ toOneHom := ↑src✝,\n                map_mul' :=\n                  (_ :\n                    ∀ (x y : RatFunc R),\n                      OneHom.toFun (↑src✝) (x * y) = OneHom.toFun (↑src✝) x * OneHom.toFun (↑src✝) y) }\n            { toFractionRing := Localization.mk a✝¹ b✝¹ } +\n          OneHom.toFun\n            ↑{ toOneHom := ↑src✝,\n                map_mul' :=\n                  (_ :\n                    ∀ (x y : RatFunc R),\n                      OneHom.toFun (↑src✝) (x * y) = OneHom.toFun (↑src✝) x * OneHom.toFun (↑src✝) y) }\n            { toFractionRing := Localization.mk c✝ d✝ })\n[PROOFSTEP]\nrfl\n[GOAL]\ncase ofFractionRing.ofFractionRing.H\nK : Type u\ninst✝⁵ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝⁴ : CommGroupWithZero G₀\ninst✝³ : Field L\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : RingHomClass F R[X] S[X]\nφ : F\nhφ : R[X]⁰ ≤ Submonoid.comap φ S[X]⁰\nsrc✝ : RatFunc R →* RatFunc S := map φ hφ\nx y : FractionRing R[X]\na✝ c✝ : R[X]\nb✝ d✝ : { x // x ∈ R[X]⁰ }\nh✝ : ↑(Localization.r R[X]⁰) (a✝, b✝) (c✝, d✝)\n⊢ (_ :\n      OneHom.toFun\n          (↑{ toOneHom := ↑src✝,\n              map_mul' :=\n                (_ :\n                  ∀ (x y : RatFunc R),\n                    OneHom.toFun (↑src✝) (x * y) = OneHom.toFun (↑src✝) x * OneHom.toFun (↑src✝) y) })\n          ({ toFractionRing := Localization.mk c✝ d✝ } + { toFractionRing := y }) =\n        OneHom.toFun\n            ↑{ toOneHom := ↑src✝,\n                map_mul' :=\n                  (_ :\n                    ∀ (x y : RatFunc R),\n                      OneHom.toFun (↑src✝) (x * y) = OneHom.toFun (↑src✝) x * OneHom.toFun (↑src✝) y) }\n            { toFractionRing := Localization.mk c✝ d✝ } +\n          OneHom.toFun\n            ↑{ toOneHom := ↑src✝,\n                map_mul' :=\n                  (_ :\n                    ∀ (x y : RatFunc R),\n                      OneHom.toFun (↑src✝) (x * y) = OneHom.toFun (↑src✝) x * OneHom.toFun (↑src✝) y) }\n            { toFractionRing := y }) =\n    (_ :\n      OneHom.toFun\n          (↑{ toOneHom := ↑src✝,\n              map_mul' :=\n                (_ :\n                  ∀ (x y : RatFunc R),\n                    OneHom.toFun (↑src✝) (x * y) = OneHom.toFun (↑src✝) x * OneHom.toFun (↑src✝) y) })\n          ({ toFractionRing := Localization.mk c✝ d✝ } + { toFractionRing := y }) =\n        OneHom.toFun\n            ↑{ toOneHom := ↑src✝,\n                map_mul' :=\n                  (_ :\n                    ∀ (x y : RatFunc R),\n                      OneHom.toFun (↑src✝) (x * y) = OneHom.toFun (↑src✝) x * OneHom.toFun (↑src✝) y) }\n            { toFractionRing := Localization.mk c✝ d✝ } +\n          OneHom.toFun\n            ↑{ toOneHom := ↑src✝,\n                map_mul' :=\n                  (_ :\n                    ∀ (x y : RatFunc R),\n                      OneHom.toFun (↑src✝) (x * y) = OneHom.toFun (↑src✝) x * OneHom.toFun (↑src✝) y) }\n            { toFractionRing := y })\n[PROOFSTEP]\nrfl\n[GOAL]\nK : Type u\ninst✝⁴ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝³ : CommGroupWithZero G₀\ninst✝² : Field L\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nφ : R[X] →*₀ G₀\nhφ : R[X]⁰ ≤ Submonoid.comap φ G₀⁰\nf : RatFunc R\np q p' q' : R[X]\nhq : q ∈ R[X]⁰\nhq' : q' ∈ R[X]⁰\nh : q' * p = q * p'\n⊢ (fun p q => ↑φ p / ↑φ q) p q = (fun p q => ↑φ p / ↑φ q) p' q'\n[PROOFSTEP]\ncases subsingleton_or_nontrivial R\n[GOAL]\ncase inl\nK : Type u\ninst✝⁴ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝³ : CommGroupWithZero G₀\ninst✝² : Field L\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nφ : R[X] →*₀ G₀\nhφ : R[X]⁰ ≤ Submonoid.comap φ G₀⁰\nf : RatFunc R\np q p' q' : R[X]\nhq : q ∈ R[X]⁰\nhq' : q' ∈ R[X]⁰\nh : q' * p = q * p'\nh✝ : Subsingleton R\n⊢ (fun p q => ↑φ p / ↑φ q) p q = (fun p q => ↑φ p / ↑φ q) p' q'\n[PROOFSTEP]\nrw [Subsingleton.elim p q, Subsingleton.elim p' q, Subsingleton.elim q' q]\n[GOAL]\ncase inr\nK : Type u\ninst✝⁴ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝³ : CommGroupWithZero G₀\ninst✝² : Field L\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nφ : R[X] →*₀ G₀\nhφ : R[X]⁰ ≤ Submonoid.comap φ G₀⁰\nf : RatFunc R\np q p' q' : R[X]\nhq : q ∈ R[X]⁰\nhq' : q' ∈ R[X]⁰\nh : q' * p = q * p'\nh✝ : Nontrivial R\n⊢ (fun p q => ↑φ p / ↑φ q) p q = (fun p q => ↑φ p / ↑φ q) p' q'\n[PROOFSTEP]\nrw [div_eq_div_iff, ← map_mul, mul_comm p, h, map_mul, mul_comm]\n[GOAL]\ncase inr.hb\nK : Type u\ninst✝⁴ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝³ : CommGroupWithZero G₀\ninst✝² : Field L\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nφ : R[X] →*₀ G₀\nhφ : R[X]⁰ ≤ Submonoid.comap φ G₀⁰\nf : RatFunc R\np q p' q' : R[X]\nhq : q ∈ R[X]⁰\nhq' : q' ∈ R[X]⁰\nh : q' * p = q * p'\nh✝ : Nontrivial R\n⊢ ↑φ q ≠ 0\n[PROOFSTEP]\nexact nonZeroDivisors.ne_zero (hφ ‹_›)\n[GOAL]\ncase inr.hd\nK : Type u\ninst✝⁴ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝³ : CommGroupWithZero G₀\ninst✝² : Field L\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nφ : R[X] →*₀ G₀\nhφ : R[X]⁰ ≤ Submonoid.comap φ G₀⁰\nf : RatFunc R\np q p' q' : R[X]\nhq : q ∈ R[X]⁰\nhq' : q' ∈ R[X]⁰\nh : q' * p = q * p'\nh✝ : Nontrivial R\n⊢ ↑φ q' ≠ 0\n[PROOFSTEP]\nexact nonZeroDivisors.ne_zero (hφ ‹_›)\n[GOAL]\nK : Type u\ninst✝⁴ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝³ : CommGroupWithZero G₀\ninst✝² : Field L\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nφ : R[X] →*₀ G₀\nhφ : R[X]⁰ ≤ Submonoid.comap φ G₀⁰\n⊢ (fun f =>\n        RatFunc.liftOn f (fun p q => ↑φ p / ↑φ q)\n          (_ :\n            ∀ {p q p' q' : R[X]},\n              q ∈ R[X]⁰ → q' ∈ R[X]⁰ → q' * p = q * p' → (fun p q => ↑φ p / ↑φ q) p q = (fun p q => ↑φ p / ↑φ q) p' q'))\n      0 =\n    0\n[PROOFSTEP]\ndsimp only\n  -- porting note: force the function to be applied\n[GOAL]\nK : Type u\ninst✝⁴ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝³ : CommGroupWithZero G₀\ninst✝² : Field L\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nφ : R[X] →*₀ G₀\nhφ : R[X]⁰ ≤ Submonoid.comap φ G₀⁰\n⊢ RatFunc.liftOn 0 (fun p q => ↑φ p / ↑φ q)\n      (_ : ∀ {p q p' q' : R[X]}, q ∈ R[X]⁰ → q' ∈ R[X]⁰ → q' * p = q * p' → ↑φ p / ↑φ q = ↑φ p' / ↑φ q') =\n    0\n[PROOFSTEP]\nrw [← ofFractionRing_zero, ← Localization.mk_zero (1 : R[X]⁰), liftOn_ofFractionRing_mk]\n[GOAL]\nK : Type u\ninst✝⁴ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝³ : CommGroupWithZero G₀\ninst✝² : Field L\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nφ : R[X] →*₀ G₀\nhφ : R[X]⁰ ≤ Submonoid.comap φ G₀⁰\n⊢ ↑φ 0 / ↑φ ↑1 = 0\n[PROOFSTEP]\nsimp only [map_zero, zero_div]\n[GOAL]\nK : Type u\ninst✝⁴ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝³ : CommGroupWithZero G₀\ninst✝² : Field L\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nφ : R[X] →*₀ G₀\nhφ : R[X]⁰ ≤ Submonoid.comap φ G₀⁰\n⊢ ZeroHom.toFun\n      {\n        toFun := fun f =>\n          RatFunc.liftOn f (fun p q => ↑φ p / ↑φ q)\n            (_ :\n              ∀ {p q p' q' : R[X]},\n                q ∈ R[X]⁰ →\n                  q' ∈ R[X]⁰ → q' * p = q * p' → (fun p q => ↑φ p / ↑φ q) p q = (fun p q => ↑φ p / ↑φ q) p' q'),\n        map_zero' :=\n          (_ :\n            (fun f =>\n                  RatFunc.liftOn f (fun p q => ↑φ p / ↑φ q)\n                    (_ :\n                      ∀ {p q p' q' : R[X]},\n                        q ∈ R[X]⁰ →\n                          q' ∈ R[X]⁰ → q' * p = q * p' → (fun p q => ↑φ p / ↑φ q) p q = (fun p q => ↑φ p / ↑φ q) p' q'))\n                0 =\n              0) }\n      1 =\n    1\n[PROOFSTEP]\ndsimp only\n  -- porting note: force the function to be applied\n[GOAL]\nK : Type u\ninst✝⁴ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝³ : CommGroupWithZero G₀\ninst✝² : Field L\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nφ : R[X] →*₀ G₀\nhφ : R[X]⁰ ≤ Submonoid.comap φ G₀⁰\n⊢ RatFunc.liftOn 1 (fun p q => ↑φ p / ↑φ q)\n      (_ : ∀ {p q p' q' : R[X]}, q ∈ R[X]⁰ → q' ∈ R[X]⁰ → q' * p = q * p' → ↑φ p / ↑φ q = ↑φ p' / ↑φ q') =\n    1\n[PROOFSTEP]\nrw [← ofFractionRing_one, ← Localization.mk_one, liftOn_ofFractionRing_mk]\n[GOAL]\nK : Type u\ninst✝⁴ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝³ : CommGroupWithZero G₀\ninst✝² : Field L\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nφ : R[X] →*₀ G₀\nhφ : R[X]⁰ ≤ Submonoid.comap φ G₀⁰\n⊢ ↑φ 1 / ↑φ ↑1 = 1\n[PROOFSTEP]\nsimp only [map_one, Submonoid.coe_one, div_one]\n[GOAL]\nK : Type u\ninst✝⁴ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝³ : CommGroupWithZero G₀\ninst✝² : Field L\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nφ : R[X] →*₀ G₀\nhφ : R[X]⁰ ≤ Submonoid.comap φ G₀⁰\nx y : RatFunc R\n⊢ ZeroHom.toFun\n      {\n        toFun := fun f =>\n          RatFunc.liftOn f (fun p q => ↑φ p / ↑φ q)\n            (_ :\n              ∀ {p q p' q' : R[X]},\n                q ∈ R[X]⁰ →\n                  q' ∈ R[X]⁰ → q' * p = q * p' → (fun p q => ↑φ p / ↑φ q) p q = (fun p q => ↑φ p / ↑φ q) p' q'),\n        map_zero' :=\n          (_ :\n            (fun f =>\n                  RatFunc.liftOn f (fun p q => ↑φ p / ↑φ q)\n                    (_ :\n                      ∀ {p q p' q' : R[X]},\n                        q ∈ R[X]⁰ →\n                          q' ∈ R[X]⁰ → q' * p = q * p' → (fun p q => ↑φ p / ↑φ q) p q = (fun p q => ↑φ p / ↑φ q) p' q'))\n                0 =\n              0) }\n      (x * y) =\n    ZeroHom.toFun\n        {\n          toFun := fun f =>\n            RatFunc.liftOn f (fun p q => ↑φ p / ↑φ q)\n              (_ :\n                ∀ {p q p' q' : R[X]},\n                  q ∈ R[X]⁰ →\n                    q' ∈ R[X]⁰ → q' * p = q * p' → (fun p q => ↑φ p / ↑φ q) p q = (fun p q => ↑φ p / ↑φ q) p' q'),\n          map_zero' :=\n            (_ :\n              (fun f =>\n                    RatFunc.liftOn f (fun p q => ↑φ p / ↑φ q)\n                      (_ :\n                        ∀ {p q p' q' : R[X]},\n                          q ∈ R[X]⁰ →\n                            q' ∈ R[X]⁰ →\n                              q' * p = q * p' → (fun p q => ↑φ p / ↑φ q) p q = (fun p q => ↑φ p / ↑φ q) p' q'))\n                  0 =\n                0) }\n        x *\n      ZeroHom.toFun\n        {\n          toFun := fun f =>\n            RatFunc.liftOn f (fun p q => ↑φ p / ↑φ q)\n              (_ :\n                ∀ {p q p' q' : R[X]},\n                  q ∈ R[X]⁰ →\n                    q' ∈ R[X]⁰ → q' * p = q * p' → (fun p q => ↑φ p / ↑φ q) p q = (fun p q => ↑φ p / ↑φ q) p' q'),\n          map_zero' :=\n            (_ :\n              (fun f =>\n                    RatFunc.liftOn f (fun p q => ↑φ p / ↑φ q)\n                      (_ :\n                        ∀ {p q p' q' : R[X]},\n                          q ∈ R[X]⁰ →\n                            q' ∈ R[X]⁰ →\n                              q' * p = q * p' → (fun p q => ↑φ p / ↑φ q) p q = (fun p q => ↑φ p / ↑φ q) p' q'))\n                  0 =\n                0) }\n        y\n[PROOFSTEP]\ncases' x with x\n[GOAL]\ncase ofFractionRing\nK : Type u\ninst✝⁴ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝³ : CommGroupWithZero G₀\ninst✝² : Field L\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nφ : R[X] →*₀ G₀\nhφ : R[X]⁰ ≤ Submonoid.comap φ G₀⁰\ny : RatFunc R\nx : FractionRing R[X]\n⊢ ZeroHom.toFun\n      {\n        toFun := fun f =>\n          RatFunc.liftOn f (fun p q => ↑φ p / ↑φ q)\n            (_ :\n              ∀ {p q p' q' : R[X]},\n                q ∈ R[X]⁰ →\n                  q' ∈ R[X]⁰ → q' * p = q * p' → (fun p q => ↑φ p / ↑φ q) p q = (fun p q => ↑φ p / ↑φ q) p' q'),\n        map_zero' :=\n          (_ :\n            (fun f =>\n                  RatFunc.liftOn f (fun p q => ↑φ p / ↑φ q)\n                    (_ :\n                      ∀ {p q p' q' : R[X]},\n                        q ∈ R[X]⁰ →\n                          q' ∈ R[X]⁰ → q' * p = q * p' → (fun p q => ↑φ p / ↑φ q) p q = (fun p q => ↑φ p / ↑φ q) p' q'))\n                0 =\n              0) }\n      ({ toFractionRing := x } * y) =\n    ZeroHom.toFun\n        {\n          toFun := fun f =>\n            RatFunc.liftOn f (fun p q => ↑φ p / ↑φ q)\n              (_ :\n                ∀ {p q p' q' : R[X]},\n                  q ∈ R[X]⁰ →\n                    q' ∈ R[X]⁰ → q' * p = q * p' → (fun p q => ↑φ p / ↑φ q) p q = (fun p q => ↑φ p / ↑φ q) p' q'),\n          map_zero' :=\n            (_ :\n              (fun f =>\n                    RatFunc.liftOn f (fun p q => ↑φ p / ↑φ q)\n                      (_ :\n                        ∀ {p q p' q' : R[X]},\n                          q ∈ R[X]⁰ →\n                            q' ∈ R[X]⁰ →\n                              q' * p = q * p' → (fun p q => ↑φ p / ↑φ q) p q = (fun p q => ↑φ p / ↑φ q) p' q'))\n                  0 =\n                0) }\n        { toFractionRing := x } *\n      ZeroHom.toFun\n        {\n          toFun := fun f =>\n            RatFunc.liftOn f (fun p q => ↑φ p / ↑φ q)\n              (_ :\n                ∀ {p q p' q' : R[X]},\n                  q ∈ R[X]⁰ →\n                    q' ∈ R[X]⁰ → q' * p = q * p' → (fun p q => ↑φ p / ↑φ q) p q = (fun p q => ↑φ p / ↑φ q) p' q'),\n          map_zero' :=\n            (_ :\n              (fun f =>\n                    RatFunc.liftOn f (fun p q => ↑φ p / ↑φ q)\n                      (_ :\n                        ∀ {p q p' q' : R[X]},\n                          q ∈ R[X]⁰ →\n                            q' ∈ R[X]⁰ →\n                              q' * p = q * p' → (fun p q => ↑φ p / ↑φ q) p q = (fun p q => ↑φ p / ↑φ q) p' q'))\n                  0 =\n                0) }\n        y\n[PROOFSTEP]\ncases' y with y\n[GOAL]\ncase ofFractionRing.ofFractionRing\nK : Type u\ninst✝⁴ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝³ : CommGroupWithZero G₀\ninst✝² : Field L\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nφ : R[X] →*₀ G₀\nhφ : R[X]⁰ ≤ Submonoid.comap φ G₀⁰\nx y : FractionRing R[X]\n⊢ ZeroHom.toFun\n      {\n        toFun := fun f =>\n          RatFunc.liftOn f (fun p q => ↑φ p / ↑φ q)\n            (_ :\n              ∀ {p q p' q' : R[X]},\n                q ∈ R[X]⁰ →\n                  q' ∈ R[X]⁰ → q' * p = q * p' → (fun p q => ↑φ p / ↑φ q) p q = (fun p q => ↑φ p / ↑φ q) p' q'),\n        map_zero' :=\n          (_ :\n            (fun f =>\n                  RatFunc.liftOn f (fun p q => ↑φ p / ↑φ q)\n                    (_ :\n                      ∀ {p q p' q' : R[X]},\n                        q ∈ R[X]⁰ →\n                          q' ∈ R[X]⁰ → q' * p = q * p' → (fun p q => ↑φ p / ↑φ q) p q = (fun p q => ↑φ p / ↑φ q) p' q'))\n                0 =\n              0) }\n      ({ toFractionRing := x } * { toFractionRing := y }) =\n    ZeroHom.toFun\n        {\n          toFun := fun f =>\n            RatFunc.liftOn f (fun p q => ↑φ p / ↑φ q)\n              (_ :\n                ∀ {p q p' q' : R[X]},\n                  q ∈ R[X]⁰ →\n                    q' ∈ R[X]⁰ → q' * p = q * p' → (fun p q => ↑φ p / ↑φ q) p q = (fun p q => ↑φ p / ↑φ q) p' q'),\n          map_zero' :=\n            (_ :\n              (fun f =>\n                    RatFunc.liftOn f (fun p q => ↑φ p / ↑φ q)\n                      (_ :\n                        ∀ {p q p' q' : R[X]},\n                          q ∈ R[X]⁰ →\n                            q' ∈ R[X]⁰ →\n                              q' * p = q * p' → (fun p q => ↑φ p / ↑φ q) p q = (fun p q => ↑φ p / ↑φ q) p' q'))\n                  0 =\n                0) }\n        { toFractionRing := x } *\n      ZeroHom.toFun\n        {\n          toFun := fun f =>\n            RatFunc.liftOn f (fun p q => ↑φ p / ↑φ q)\n              (_ :\n                ∀ {p q p' q' : R[X]},\n                  q ∈ R[X]⁰ →\n                    q' ∈ R[X]⁰ → q' * p = q * p' → (fun p q => ↑φ p / ↑φ q) p q = (fun p q => ↑φ p / ↑φ q) p' q'),\n          map_zero' :=\n            (_ :\n              (fun f =>\n                    RatFunc.liftOn f (fun p q => ↑φ p / ↑φ q)\n                      (_ :\n                        ∀ {p q p' q' : R[X]},\n                          q ∈ R[X]⁰ →\n                            q' ∈ R[X]⁰ →\n                              q' * p = q * p' → (fun p q => ↑φ p / ↑φ q) p q = (fun p q => ↑φ p / ↑φ q) p' q'))\n                  0 =\n                0) }\n        { toFractionRing := y }\n[PROOFSTEP]\ninduction' x using Localization.rec with p q\n[GOAL]\ncase ofFractionRing.ofFractionRing.f\nK : Type u\ninst✝⁴ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝³ : CommGroupWithZero G₀\ninst✝² : Field L\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nφ : R[X] →*₀ G₀\nhφ : R[X]⁰ ≤ Submonoid.comap φ G₀⁰\ny : FractionRing R[X]\np : R[X]\nq : { x // x ∈ R[X]⁰ }\n⊢ ZeroHom.toFun\n      {\n        toFun := fun f =>\n          RatFunc.liftOn f (fun p q => ↑φ p / ↑φ q)\n            (_ :\n              ∀ {p q p' q' : R[X]},\n                q ∈ R[X]⁰ →\n                  q' ∈ R[X]⁰ → q' * p = q * p' → (fun p q => ↑φ p / ↑φ q) p q = (fun p q => ↑φ p / ↑φ q) p' q'),\n        map_zero' :=\n          (_ :\n            (fun f =>\n                  RatFunc.liftOn f (fun p q => ↑φ p / ↑φ q)\n                    (_ :\n                      ∀ {p q p' q' : R[X]},\n                        q ∈ R[X]⁰ →\n                          q' ∈ R[X]⁰ → q' * p = q * p' → (fun p q => ↑φ p / ↑φ q) p q = (fun p q => ↑φ p / ↑φ q) p' q'))\n                0 =\n              0) }\n      ({ toFractionRing := Localization.mk p q } * { toFractionRing := y }) =\n    ZeroHom.toFun\n        {\n          toFun := fun f =>\n            RatFunc.liftOn f (fun p q => ↑φ p / ↑φ q)\n              (_ :\n                ∀ {p q p' q' : R[X]},\n                  q ∈ R[X]⁰ →\n                    q' ∈ R[X]⁰ → q' * p = q * p' → (fun p q => ↑φ p / ↑φ q) p q = (fun p q => ↑φ p / ↑φ q) p' q'),\n          map_zero' :=\n            (_ :\n              (fun f =>\n                    RatFunc.liftOn f (fun p q => ↑φ p / ↑φ q)\n                      (_ :\n                        ∀ {p q p' q' : R[X]},\n                          q ∈ R[X]⁰ →\n                            q' ∈ R[X]⁰ →\n                              q' * p = q * p' → (fun p q => ↑φ p / ↑φ q) p q = (fun p q => ↑φ p / ↑φ q) p' q'))\n                  0 =\n                0) }\n        { toFractionRing := Localization.mk p q } *\n      ZeroHom.toFun\n        {\n          toFun := fun f =>\n            RatFunc.liftOn f (fun p q => ↑φ p / ↑φ q)\n              (_ :\n                ∀ {p q p' q' : R[X]},\n                  q ∈ R[X]⁰ →\n                    q' ∈ R[X]⁰ → q' * p = q * p' → (fun p q => ↑φ p / ↑φ q) p q = (fun p q => ↑φ p / ↑φ q) p' q'),\n          map_zero' :=\n            (_ :\n              (fun f =>\n                    RatFunc.liftOn f (fun p q => ↑φ p / ↑φ q)\n                      (_ :\n                        ∀ {p q p' q' : R[X]},\n                          q ∈ R[X]⁰ →\n                            q' ∈ R[X]⁰ →\n                              q' * p = q * p' → (fun p q => ↑φ p / ↑φ q) p q = (fun p q => ↑φ p / ↑φ q) p' q'))\n                  0 =\n                0) }\n        { toFractionRing := y }\ncase ofFractionRing.ofFractionRing.H\nK : Type u\ninst✝⁴ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝³ : CommGroupWithZero G₀\ninst✝² : Field L\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nφ : R[X] →*₀ G₀\nhφ : R[X]⁰ ≤ Submonoid.comap φ G₀⁰\nx y : FractionRing R[X]\na✝ c✝ : R[X]\nb✝ d✝ : { x // x ∈ R[X]⁰ }\nh✝ : ↑(Localization.r R[X]⁰) (a✝, b✝) (c✝, d✝)\n⊢ (_ :\n      ZeroHom.toFun\n          {\n            toFun := fun f =>\n              RatFunc.liftOn f (fun p q => ↑φ p / ↑φ q)\n                (_ :\n                  ∀ {p q p' q' : R[X]},\n                    q ∈ R[X]⁰ →\n                      q' ∈ R[X]⁰ → q' * p = q * p' → (fun p q => ↑φ p / ↑φ q) p q = (fun p q => ↑φ p / ↑φ q) p' q'),\n            map_zero' :=\n              (_ :\n                (fun f =>\n                      RatFunc.liftOn f (fun p q => ↑φ p / ↑φ q)\n                        (_ :\n                          ∀ {p q p' q' : R[X]},\n                            q ∈ R[X]⁰ →\n                              q' ∈ R[X]⁰ →\n                                q' * p = q * p' → (fun p q => ↑φ p / ↑φ q) p q = (fun p q => ↑φ p / ↑φ q) p' q'))\n                    0 =\n                  0) }\n          ({ toFractionRing := Localization.mk c✝ d✝ } * { toFractionRing := y }) =\n        ZeroHom.toFun\n            {\n              toFun := fun f =>\n                RatFunc.liftOn f (fun p q => ↑φ p / ↑φ q)\n                  (_ :\n                    ∀ {p q p' q' : R[X]},\n                      q ∈ R[X]⁰ →\n                        q' ∈ R[X]⁰ → q' * p = q * p' → (fun p q => ↑φ p / ↑φ q) p q = (fun p q => ↑φ p / ↑φ q) p' q'),\n              map_zero' :=\n                (_ :\n                  (fun f =>\n                        RatFunc.liftOn f (fun p q => ↑φ p / ↑φ q)\n                          (_ :\n                            ∀ {p q p' q' : R[X]},\n                              q ∈ R[X]⁰ →\n                                q' ∈ R[X]⁰ →\n                                  q' * p = q * p' → (fun p q => ↑φ p / ↑φ q) p q = (fun p q => ↑φ p / ↑φ q) p' q'))\n                      0 =\n                    0) }\n            { toFractionRing := Localization.mk c✝ d✝ } *\n          ZeroHom.toFun\n            {\n              toFun := fun f =>\n                RatFunc.liftOn f (fun p q => ↑φ p / ↑φ q)\n                  (_ :\n                    ∀ {p q p' q' : R[X]},\n                      q ∈ R[X]⁰ →\n                        q' ∈ R[X]⁰ → q' * p = q * p' → (fun p q => ↑φ p / ↑φ q) p q = (fun p q => ↑φ p / ↑φ q) p' q'),\n              map_zero' :=\n                (_ :\n                  (fun f =>\n                        RatFunc.liftOn f (fun p q => ↑φ p / ↑φ q)\n                          (_ :\n                            ∀ {p q p' q' : R[X]},\n                              q ∈ R[X]⁰ →\n                                q' ∈ R[X]⁰ →\n                                  q' * p = q * p' → (fun p q => ↑φ p / ↑φ q) p q = (fun p q => ↑φ p / ↑φ q) p' q'))\n                      0 =\n                    0) }\n            { toFractionRing := y }) =\n    (_ :\n      ZeroHom.toFun\n          {\n            toFun := fun f =>\n              RatFunc.liftOn f (fun p q => ↑φ p / ↑φ q)\n                (_ :\n                  ∀ {p q p' q' : R[X]},\n                    q ∈ R[X]⁰ →\n                      q' ∈ R[X]⁰ → q' * p = q * p' → (fun p q => ↑φ p / ↑φ q) p q = (fun p q => ↑φ p / ↑φ q) p' q'),\n            map_zero' :=\n              (_ :\n                (fun f =>\n                      RatFunc.liftOn f (fun p q => ↑φ p / ↑φ q)\n                        (_ :\n                          ∀ {p q p' q' : R[X]},\n                            q ∈ R[X]⁰ →\n                              q' ∈ R[X]⁰ →\n                                q' * p = q * p' → (fun p q => ↑φ p / ↑φ q) p q = (fun p q => ↑φ p / ↑φ q) p' q'))\n                    0 =\n                  0) }\n          ({ toFractionRing := Localization.mk c✝ d✝ } * { toFractionRing := y }) =\n        ZeroHom.toFun\n            {\n              toFun := fun f =>\n                RatFunc.liftOn f (fun p q => ↑φ p / ↑φ q)\n                  (_ :\n                    ∀ {p q p' q' : R[X]},\n                      q ∈ R[X]⁰ →\n                        q' ∈ R[X]⁰ → q' * p = q * p' → (fun p q => ↑φ p / ↑φ q) p q = (fun p q => ↑φ p / ↑φ q) p' q'),\n              map_zero' :=\n                (_ :\n                  (fun f =>\n                        RatFunc.liftOn f (fun p q => ↑φ p / ↑φ q)\n                          (_ :\n                            ∀ {p q p' q' : R[X]},\n                              q ∈ R[X]⁰ →\n                                q' ∈ R[X]⁰ →\n                                  q' * p = q * p' → (fun p q => ↑φ p / ↑φ q) p q = (fun p q => ↑φ p / ↑φ q) p' q'))\n                      0 =\n                    0) }\n            { toFractionRing := Localization.mk c✝ d✝ } *\n          ZeroHom.toFun\n            {\n              toFun := fun f =>\n                RatFunc.liftOn f (fun p q => ↑φ p / ↑φ q)\n                  (_ :\n                    ∀ {p q p' q' : R[X]},\n                      q ∈ R[X]⁰ →\n                        q' ∈ R[X]⁰ → q' * p = q * p' → (fun p q => ↑φ p / ↑φ q) p q = (fun p q => ↑φ p / ↑φ q) p' q'),\n              map_zero' :=\n                (_ :\n                  (fun f =>\n                        RatFunc.liftOn f (fun p q => ↑φ p / ↑φ q)\n                          (_ :\n                            ∀ {p q p' q' : R[X]},\n                              q ∈ R[X]⁰ →\n                                q' ∈ R[X]⁰ →\n                                  q' * p = q * p' → (fun p q => ↑φ p / ↑φ q) p q = (fun p q => ↑φ p / ↑φ q) p' q'))\n                      0 =\n                    0) }\n            { toFractionRing := y })\n[PROOFSTEP]\ninduction' y using Localization.rec with p' q'\n[GOAL]\ncase ofFractionRing.ofFractionRing.f.f\nK : Type u\ninst✝⁴ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝³ : CommGroupWithZero G₀\ninst✝² : Field L\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nφ : R[X] →*₀ G₀\nhφ : R[X]⁰ ≤ Submonoid.comap φ G₀⁰\np : R[X]\nq : { x // x ∈ R[X]⁰ }\np' : R[X]\nq' : { x // x ∈ R[X]⁰ }\n⊢ ZeroHom.toFun\n      {\n        toFun := fun f =>\n          RatFunc.liftOn f (fun p q => ↑φ p / ↑φ q)\n            (_ :\n              ∀ {p q p' q' : R[X]},\n                q ∈ R[X]⁰ →\n                  q' ∈ R[X]⁰ → q' * p = q * p' → (fun p q => ↑φ p / ↑φ q) p q = (fun p q => ↑φ p / ↑φ q) p' q'),\n        map_zero' :=\n          (_ :\n            (fun f =>\n                  RatFunc.liftOn f (fun p q => ↑φ p / ↑φ q)\n                    (_ :\n                      ∀ {p q p' q' : R[X]},\n                        q ∈ R[X]⁰ →\n                          q' ∈ R[X]⁰ → q' * p = q * p' → (fun p q => ↑φ p / ↑φ q) p q = (fun p q => ↑φ p / ↑φ q) p' q'))\n                0 =\n              0) }\n      ({ toFractionRing := Localization.mk p q } * { toFractionRing := Localization.mk p' q' }) =\n    ZeroHom.toFun\n        {\n          toFun := fun f =>\n            RatFunc.liftOn f (fun p q => ↑φ p / ↑φ q)\n              (_ :\n                ∀ {p q p' q' : R[X]},\n                  q ∈ R[X]⁰ →\n                    q' ∈ R[X]⁰ → q' * p = q * p' → (fun p q => ↑φ p / ↑φ q) p q = (fun p q => ↑φ p / ↑φ q) p' q'),\n          map_zero' :=\n            (_ :\n              (fun f =>\n                    RatFunc.liftOn f (fun p q => ↑φ p / ↑φ q)\n                      (_ :\n                        ∀ {p q p' q' : R[X]},\n                          q ∈ R[X]⁰ →\n                            q' ∈ R[X]⁰ →\n                              q' * p = q * p' → (fun p q => ↑φ p / ↑φ q) p q = (fun p q => ↑φ p / ↑φ q) p' q'))\n                  0 =\n                0) }\n        { toFractionRing := Localization.mk p q } *\n      ZeroHom.toFun\n        {\n          toFun := fun f =>\n            RatFunc.liftOn f (fun p q => ↑φ p / ↑φ q)\n              (_ :\n                ∀ {p q p' q' : R[X]},\n                  q ∈ R[X]⁰ →\n                    q' ∈ R[X]⁰ → q' * p = q * p' → (fun p q => ↑φ p / ↑φ q) p q = (fun p q => ↑φ p / ↑φ q) p' q'),\n          map_zero' :=\n            (_ :\n              (fun f =>\n                    RatFunc.liftOn f (fun p q => ↑φ p / ↑φ q)\n                      (_ :\n                        ∀ {p q p' q' : R[X]},\n                          q ∈ R[X]⁰ →\n                            q' ∈ R[X]⁰ →\n                              q' * p = q * p' → (fun p q => ↑φ p / ↑φ q) p q = (fun p q => ↑φ p / ↑φ q) p' q'))\n                  0 =\n                0) }\n        { toFractionRing := Localization.mk p' q' }\n[PROOFSTEP]\nrw [← ofFractionRing_mul, Localization.mk_mul]\n[GOAL]\ncase ofFractionRing.ofFractionRing.f.f\nK : Type u\ninst✝⁴ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝³ : CommGroupWithZero G₀\ninst✝² : Field L\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nφ : R[X] →*₀ G₀\nhφ : R[X]⁰ ≤ Submonoid.comap φ G₀⁰\np : R[X]\nq : { x // x ∈ R[X]⁰ }\np' : R[X]\nq' : { x // x ∈ R[X]⁰ }\n⊢ ZeroHom.toFun\n      {\n        toFun := fun f =>\n          RatFunc.liftOn f (fun p q => ↑φ p / ↑φ q)\n            (_ :\n              ∀ {p q p' q' : R[X]},\n                q ∈ R[X]⁰ →\n                  q' ∈ R[X]⁰ → q' * p = q * p' → (fun p q => ↑φ p / ↑φ q) p q = (fun p q => ↑φ p / ↑φ q) p' q'),\n        map_zero' :=\n          (_ :\n            (fun f =>\n                  RatFunc.liftOn f (fun p q => ↑φ p / ↑φ q)\n                    (_ :\n                      ∀ {p q p' q' : R[X]},\n                        q ∈ R[X]⁰ →\n                          q' ∈ R[X]⁰ → q' * p = q * p' → (fun p q => ↑φ p / ↑φ q) p q = (fun p q => ↑φ p / ↑φ q) p' q'))\n                0 =\n              0) }\n      { toFractionRing := Localization.mk (p * p') (q * q') } =\n    ZeroHom.toFun\n        {\n          toFun := fun f =>\n            RatFunc.liftOn f (fun p q => ↑φ p / ↑φ q)\n              (_ :\n                ∀ {p q p' q' : R[X]},\n                  q ∈ R[X]⁰ →\n                    q' ∈ R[X]⁰ → q' * p = q * p' → (fun p q => ↑φ p / ↑φ q) p q = (fun p q => ↑φ p / ↑φ q) p' q'),\n          map_zero' :=\n            (_ :\n              (fun f =>\n                    RatFunc.liftOn f (fun p q => ↑φ p / ↑φ q)\n                      (_ :\n                        ∀ {p q p' q' : R[X]},\n                          q ∈ R[X]⁰ →\n                            q' ∈ R[X]⁰ →\n                              q' * p = q * p' → (fun p q => ↑φ p / ↑φ q) p q = (fun p q => ↑φ p / ↑φ q) p' q'))\n                  0 =\n                0) }\n        { toFractionRing := Localization.mk p q } *\n      ZeroHom.toFun\n        {\n          toFun := fun f =>\n            RatFunc.liftOn f (fun p q => ↑φ p / ↑φ q)\n              (_ :\n                ∀ {p q p' q' : R[X]},\n                  q ∈ R[X]⁰ →\n                    q' ∈ R[X]⁰ → q' * p = q * p' → (fun p q => ↑φ p / ↑φ q) p q = (fun p q => ↑φ p / ↑φ q) p' q'),\n          map_zero' :=\n            (_ :\n              (fun f =>\n                    RatFunc.liftOn f (fun p q => ↑φ p / ↑φ q)\n                      (_ :\n                        ∀ {p q p' q' : R[X]},\n                          q ∈ R[X]⁰ →\n                            q' ∈ R[X]⁰ →\n                              q' * p = q * p' → (fun p q => ↑φ p / ↑φ q) p q = (fun p q => ↑φ p / ↑φ q) p' q'))\n                  0 =\n                0) }\n        { toFractionRing := Localization.mk p' q' }\n[PROOFSTEP]\nsimp only [liftOn_ofFractionRing_mk, div_mul_div_comm, map_mul, Submonoid.coe_mul]\n[GOAL]\ncase ofFractionRing.ofFractionRing.f.H\nK : Type u\ninst✝⁴ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝³ : CommGroupWithZero G₀\ninst✝² : Field L\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nφ : R[X] →*₀ G₀\nhφ : R[X]⁰ ≤ Submonoid.comap φ G₀⁰\ny : FractionRing R[X]\np : R[X]\nq : { x // x ∈ R[X]⁰ }\na✝ c✝ : R[X]\nb✝ d✝ : { x // x ∈ R[X]⁰ }\nh✝ : ↑(Localization.r R[X]⁰) (a✝, b✝) (c✝, d✝)\n⊢ (_ :\n      ZeroHom.toFun\n          {\n            toFun := fun f =>\n              RatFunc.liftOn f (fun p q => ↑φ p / ↑φ q)\n                (_ :\n                  ∀ {p q p' q' : R[X]},\n                    q ∈ R[X]⁰ →\n                      q' ∈ R[X]⁰ → q' * p = q * p' → (fun p q => ↑φ p / ↑φ q) p q = (fun p q => ↑φ p / ↑φ q) p' q'),\n            map_zero' :=\n              (_ :\n                (fun f =>\n                      RatFunc.liftOn f (fun p q => ↑φ p / ↑φ q)\n                        (_ :\n                          ∀ {p q p' q' : R[X]},\n                            q ∈ R[X]⁰ →\n                              q' ∈ R[X]⁰ →\n                                q' * p = q * p' → (fun p q => ↑φ p / ↑φ q) p q = (fun p q => ↑φ p / ↑φ q) p' q'))\n                    0 =\n                  0) }\n          ({ toFractionRing := Localization.mk p q } * { toFractionRing := Localization.mk c✝ d✝ }) =\n        ZeroHom.toFun\n            {\n              toFun := fun f =>\n                RatFunc.liftOn f (fun p q => ↑φ p / ↑φ q)\n                  (_ :\n                    ∀ {p q p' q' : R[X]},\n                      q ∈ R[X]⁰ →\n                        q' ∈ R[X]⁰ → q' * p = q * p' → (fun p q => ↑φ p / ↑φ q) p q = (fun p q => ↑φ p / ↑φ q) p' q'),\n              map_zero' :=\n                (_ :\n                  (fun f =>\n                        RatFunc.liftOn f (fun p q => ↑φ p / ↑φ q)\n                          (_ :\n                            ∀ {p q p' q' : R[X]},\n                              q ∈ R[X]⁰ →\n                                q' ∈ R[X]⁰ →\n                                  q' * p = q * p' → (fun p q => ↑φ p / ↑φ q) p q = (fun p q => ↑φ p / ↑φ q) p' q'))\n                      0 =\n                    0) }\n            { toFractionRing := Localization.mk p q } *\n          ZeroHom.toFun\n            {\n              toFun := fun f =>\n                RatFunc.liftOn f (fun p q => ↑φ p / ↑φ q)\n                  (_ :\n                    ∀ {p q p' q' : R[X]},\n                      q ∈ R[X]⁰ →\n                        q' ∈ R[X]⁰ → q' * p = q * p' → (fun p q => ↑φ p / ↑φ q) p q = (fun p q => ↑φ p / ↑φ q) p' q'),\n              map_zero' :=\n                (_ :\n                  (fun f =>\n                        RatFunc.liftOn f (fun p q => ↑φ p / ↑φ q)\n                          (_ :\n                            ∀ {p q p' q' : R[X]},\n                              q ∈ R[X]⁰ →\n                                q' ∈ R[X]⁰ →\n                                  q' * p = q * p' → (fun p q => ↑φ p / ↑φ q) p q = (fun p q => ↑φ p / ↑φ q) p' q'))\n                      0 =\n                    0) }\n            { toFractionRing := Localization.mk c✝ d✝ }) =\n    (_ :\n      ZeroHom.toFun\n          {\n            toFun := fun f =>\n              RatFunc.liftOn f (fun p q => ↑φ p / ↑φ q)\n                (_ :\n                  ∀ {p q p' q' : R[X]},\n                    q ∈ R[X]⁰ →\n                      q' ∈ R[X]⁰ → q' * p = q * p' → (fun p q => ↑φ p / ↑φ q) p q = (fun p q => ↑φ p / ↑φ q) p' q'),\n            map_zero' :=\n              (_ :\n                (fun f =>\n                      RatFunc.liftOn f (fun p q => ↑φ p / ↑φ q)\n                        (_ :\n                          ∀ {p q p' q' : R[X]},\n                            q ∈ R[X]⁰ →\n                              q' ∈ R[X]⁰ →\n                                q' * p = q * p' → (fun p q => ↑φ p / ↑φ q) p q = (fun p q => ↑φ p / ↑φ q) p' q'))\n                    0 =\n                  0) }\n          ({ toFractionRing := Localization.mk p q } * { toFractionRing := Localization.mk c✝ d✝ }) =\n        ZeroHom.toFun\n            {\n              toFun := fun f =>\n                RatFunc.liftOn f (fun p q => ↑φ p / ↑φ q)\n                  (_ :\n                    ∀ {p q p' q' : R[X]},\n                      q ∈ R[X]⁰ →\n                        q' ∈ R[X]⁰ → q' * p = q * p' → (fun p q => ↑φ p / ↑φ q) p q = (fun p q => ↑φ p / ↑φ q) p' q'),\n              map_zero' :=\n                (_ :\n                  (fun f =>\n                        RatFunc.liftOn f (fun p q => ↑φ p / ↑φ q)\n                          (_ :\n                            ∀ {p q p' q' : R[X]},\n                              q ∈ R[X]⁰ →\n                                q' ∈ R[X]⁰ →\n                                  q' * p = q * p' → (fun p q => ↑φ p / ↑φ q) p q = (fun p q => ↑φ p / ↑φ q) p' q'))\n                      0 =\n                    0) }\n            { toFractionRing := Localization.mk p q } *\n          ZeroHom.toFun\n            {\n              toFun := fun f =>\n                RatFunc.liftOn f (fun p q => ↑φ p / ↑φ q)\n                  (_ :\n                    ∀ {p q p' q' : R[X]},\n                      q ∈ R[X]⁰ →\n                        q' ∈ R[X]⁰ → q' * p = q * p' → (fun p q => ↑φ p / ↑φ q) p q = (fun p q => ↑φ p / ↑φ q) p' q'),\n              map_zero' :=\n                (_ :\n                  (fun f =>\n                        RatFunc.liftOn f (fun p q => ↑φ p / ↑φ q)\n                          (_ :\n                            ∀ {p q p' q' : R[X]},\n                              q ∈ R[X]⁰ →\n                                q' ∈ R[X]⁰ →\n                                  q' * p = q * p' → (fun p q => ↑φ p / ↑φ q) p q = (fun p q => ↑φ p / ↑φ q) p' q'))\n                      0 =\n                    0) }\n            { toFractionRing := Localization.mk c✝ d✝ })\n[PROOFSTEP]\nrfl\n[GOAL]\ncase ofFractionRing.ofFractionRing.H\nK : Type u\ninst✝⁴ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝³ : CommGroupWithZero G₀\ninst✝² : Field L\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nφ : R[X] →*₀ G₀\nhφ : R[X]⁰ ≤ Submonoid.comap φ G₀⁰\nx y : FractionRing R[X]\na✝ c✝ : R[X]\nb✝ d✝ : { x // x ∈ R[X]⁰ }\nh✝ : ↑(Localization.r R[X]⁰) (a✝, b✝) (c✝, d✝)\n⊢ (_ :\n      ZeroHom.toFun\n          {\n            toFun := fun f =>\n              RatFunc.liftOn f (fun p q => ↑φ p / ↑φ q)\n                (_ :\n                  ∀ {p q p' q' : R[X]},\n                    q ∈ R[X]⁰ →\n                      q' ∈ R[X]⁰ → q' * p = q * p' → (fun p q => ↑φ p / ↑φ q) p q = (fun p q => ↑φ p / ↑φ q) p' q'),\n            map_zero' :=\n              (_ :\n                (fun f =>\n                      RatFunc.liftOn f (fun p q => ↑φ p / ↑φ q)\n                        (_ :\n                          ∀ {p q p' q' : R[X]},\n                            q ∈ R[X]⁰ →\n                              q' ∈ R[X]⁰ →\n                                q' * p = q * p' → (fun p q => ↑φ p / ↑φ q) p q = (fun p q => ↑φ p / ↑φ q) p' q'))\n                    0 =\n                  0) }\n          ({ toFractionRing := Localization.mk c✝ d✝ } * { toFractionRing := y }) =\n        ZeroHom.toFun\n            {\n              toFun := fun f =>\n                RatFunc.liftOn f (fun p q => ↑φ p / ↑φ q)\n                  (_ :\n                    ∀ {p q p' q' : R[X]},\n                      q ∈ R[X]⁰ →\n                        q' ∈ R[X]⁰ → q' * p = q * p' → (fun p q => ↑φ p / ↑φ q) p q = (fun p q => ↑φ p / ↑φ q) p' q'),\n              map_zero' :=\n                (_ :\n                  (fun f =>\n                        RatFunc.liftOn f (fun p q => ↑φ p / ↑φ q)\n                          (_ :\n                            ∀ {p q p' q' : R[X]},\n                              q ∈ R[X]⁰ →\n                                q' ∈ R[X]⁰ →\n                                  q' * p = q * p' → (fun p q => ↑φ p / ↑φ q) p q = (fun p q => ↑φ p / ↑φ q) p' q'))\n                      0 =\n                    0) }\n            { toFractionRing := Localization.mk c✝ d✝ } *\n          ZeroHom.toFun\n            {\n              toFun := fun f =>\n                RatFunc.liftOn f (fun p q => ↑φ p / ↑φ q)\n                  (_ :\n                    ∀ {p q p' q' : R[X]},\n                      q ∈ R[X]⁰ →\n                        q' ∈ R[X]⁰ → q' * p = q * p' → (fun p q => ↑φ p / ↑φ q) p q = (fun p q => ↑φ p / ↑φ q) p' q'),\n              map_zero' :=\n                (_ :\n                  (fun f =>\n                        RatFunc.liftOn f (fun p q => ↑φ p / ↑φ q)\n                          (_ :\n                            ∀ {p q p' q' : R[X]},\n                              q ∈ R[X]⁰ →\n                                q' ∈ R[X]⁰ →\n                                  q' * p = q * p' → (fun p q => ↑φ p / ↑φ q) p q = (fun p q => ↑φ p / ↑φ q) p' q'))\n                      0 =\n                    0) }\n            { toFractionRing := y }) =\n    (_ :\n      ZeroHom.toFun\n          {\n            toFun := fun f =>\n              RatFunc.liftOn f (fun p q => ↑φ p / ↑φ q)\n                (_ :\n                  ∀ {p q p' q' : R[X]},\n                    q ∈ R[X]⁰ →\n                      q' ∈ R[X]⁰ → q' * p = q * p' → (fun p q => ↑φ p / ↑φ q) p q = (fun p q => ↑φ p / ↑φ q) p' q'),\n            map_zero' :=\n              (_ :\n                (fun f =>\n                      RatFunc.liftOn f (fun p q => ↑φ p / ↑φ q)\n                        (_ :\n                          ∀ {p q p' q' : R[X]},\n                            q ∈ R[X]⁰ →\n                              q' ∈ R[X]⁰ →\n                                q' * p = q * p' → (fun p q => ↑φ p / ↑φ q) p q = (fun p q => ↑φ p / ↑φ q) p' q'))\n                    0 =\n                  0) }\n          ({ toFractionRing := Localization.mk c✝ d✝ } * { toFractionRing := y }) =\n        ZeroHom.toFun\n            {\n              toFun := fun f =>\n                RatFunc.liftOn f (fun p q => ↑φ p / ↑φ q)\n                  (_ :\n                    ∀ {p q p' q' : R[X]},\n                      q ∈ R[X]⁰ →\n                        q' ∈ R[X]⁰ → q' * p = q * p' → (fun p q => ↑φ p / ↑φ q) p q = (fun p q => ↑φ p / ↑φ q) p' q'),\n              map_zero' :=\n                (_ :\n                  (fun f =>\n                        RatFunc.liftOn f (fun p q => ↑φ p / ↑φ q)\n                          (_ :\n                            ∀ {p q p' q' : R[X]},\n                              q ∈ R[X]⁰ →\n                                q' ∈ R[X]⁰ →\n                                  q' * p = q * p' → (fun p q => ↑φ p / ↑φ q) p q = (fun p q => ↑φ p / ↑φ q) p' q'))\n                      0 =\n                    0) }\n            { toFractionRing := Localization.mk c✝ d✝ } *\n          ZeroHom.toFun\n            {\n              toFun := fun f =>\n                RatFunc.liftOn f (fun p q => ↑φ p / ↑φ q)\n                  (_ :\n                    ∀ {p q p' q' : R[X]},\n                      q ∈ R[X]⁰ →\n                        q' ∈ R[X]⁰ → q' * p = q * p' → (fun p q => ↑φ p / ↑φ q) p q = (fun p q => ↑φ p / ↑φ q) p' q'),\n              map_zero' :=\n                (_ :\n                  (fun f =>\n                        RatFunc.liftOn f (fun p q => ↑φ p / ↑φ q)\n                          (_ :\n                            ∀ {p q p' q' : R[X]},\n                              q ∈ R[X]⁰ →\n                                q' ∈ R[X]⁰ →\n                                  q' * p = q * p' → (fun p q => ↑φ p / ↑φ q) p q = (fun p q => ↑φ p / ↑φ q) p' q'))\n                      0 =\n                    0) }\n            { toFractionRing := y })\n[PROOFSTEP]\nrfl\n[GOAL]\nK : Type u\ninst✝⁵ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝⁴ : CommGroupWithZero G₀\ninst✝³ : Field L\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : Nontrivial R\nφ : R[X] →*₀ G₀\nhφ : Function.Injective ↑φ\nhφ' : optParam (R[X]⁰ ≤ Submonoid.comap φ G₀⁰) (_ : R[X]⁰ ≤ Submonoid.comap φ G₀⁰)\n⊢ Function.Injective ↑(liftMonoidWithZeroHom φ hφ')\n[PROOFSTEP]\nrintro ⟨x⟩ ⟨y⟩\n[GOAL]\ncase ofFractionRing.ofFractionRing\nK : Type u\ninst✝⁵ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝⁴ : CommGroupWithZero G₀\ninst✝³ : Field L\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : Nontrivial R\nφ : R[X] →*₀ G₀\nhφ : Function.Injective ↑φ\nhφ' : optParam (R[X]⁰ ≤ Submonoid.comap φ G₀⁰) (_ : R[X]⁰ ≤ Submonoid.comap φ G₀⁰)\nx y : FractionRing R[X]\n⊢ ↑(liftMonoidWithZeroHom φ hφ') { toFractionRing := x } = ↑(liftMonoidWithZeroHom φ hφ') { toFractionRing := y } →\n    { toFractionRing := x } = { toFractionRing := y }\n[PROOFSTEP]\ninduction' x using Localization.induction_on with a\n[GOAL]\ncase ofFractionRing.ofFractionRing.H\nK : Type u\ninst✝⁵ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝⁴ : CommGroupWithZero G₀\ninst✝³ : Field L\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : Nontrivial R\nφ : R[X] →*₀ G₀\nhφ : Function.Injective ↑φ\nhφ' : optParam (R[X]⁰ ≤ Submonoid.comap φ G₀⁰) (_ : R[X]⁰ ≤ Submonoid.comap φ G₀⁰)\ny : FractionRing R[X]\na : R[X] × { x // x ∈ R[X]⁰ }\n⊢ ↑(liftMonoidWithZeroHom φ hφ') { toFractionRing := Localization.mk a.fst a.snd } =\n      ↑(liftMonoidWithZeroHom φ hφ') { toFractionRing := y } →\n    { toFractionRing := Localization.mk a.fst a.snd } = { toFractionRing := y }\n[PROOFSTEP]\ninduction' y using Localization.induction_on with a'\n[GOAL]\ncase ofFractionRing.ofFractionRing.H.H\nK : Type u\ninst✝⁵ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝⁴ : CommGroupWithZero G₀\ninst✝³ : Field L\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : Nontrivial R\nφ : R[X] →*₀ G₀\nhφ : Function.Injective ↑φ\nhφ' : optParam (R[X]⁰ ≤ Submonoid.comap φ G₀⁰) (_ : R[X]⁰ ≤ Submonoid.comap φ G₀⁰)\na a' : R[X] × { x // x ∈ R[X]⁰ }\n⊢ ↑(liftMonoidWithZeroHom φ hφ') { toFractionRing := Localization.mk a.fst a.snd } =\n      ↑(liftMonoidWithZeroHom φ hφ') { toFractionRing := Localization.mk a'.fst a'.snd } →\n    { toFractionRing := Localization.mk a.fst a.snd } = { toFractionRing := Localization.mk a'.fst a'.snd }\n[PROOFSTEP]\nsimp_rw [liftMonoidWithZeroHom_apply_ofFractionRing_mk]\n[GOAL]\ncase ofFractionRing.ofFractionRing.H.H\nK : Type u\ninst✝⁵ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝⁴ : CommGroupWithZero G₀\ninst✝³ : Field L\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : Nontrivial R\nφ : R[X] →*₀ G₀\nhφ : Function.Injective ↑φ\nhφ' : optParam (R[X]⁰ ≤ Submonoid.comap φ G₀⁰) (_ : R[X]⁰ ≤ Submonoid.comap φ G₀⁰)\na a' : R[X] × { x // x ∈ R[X]⁰ }\n⊢ ↑φ a.fst / ↑φ ↑a.snd = ↑φ a'.fst / ↑φ ↑a'.snd →\n    { toFractionRing := Localization.mk a.fst a.snd } = { toFractionRing := Localization.mk a'.fst a'.snd }\n[PROOFSTEP]\nintro h\n[GOAL]\ncase ofFractionRing.ofFractionRing.H.H\nK : Type u\ninst✝⁵ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝⁴ : CommGroupWithZero G₀\ninst✝³ : Field L\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : Nontrivial R\nφ : R[X] →*₀ G₀\nhφ : Function.Injective ↑φ\nhφ' : optParam (R[X]⁰ ≤ Submonoid.comap φ G₀⁰) (_ : R[X]⁰ ≤ Submonoid.comap φ G₀⁰)\na a' : R[X] × { x // x ∈ R[X]⁰ }\nh : ↑φ a.fst / ↑φ ↑a.snd = ↑φ a'.fst / ↑φ ↑a'.snd\n⊢ { toFractionRing := Localization.mk a.fst a.snd } = { toFractionRing := Localization.mk a'.fst a'.snd }\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase ofFractionRing.ofFractionRing.H.H.e_toFractionRing\nK : Type u\ninst✝⁵ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝⁴ : CommGroupWithZero G₀\ninst✝³ : Field L\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : Nontrivial R\nφ : R[X] →*₀ G₀\nhφ : Function.Injective ↑φ\nhφ' : optParam (R[X]⁰ ≤ Submonoid.comap φ G₀⁰) (_ : R[X]⁰ ≤ Submonoid.comap φ G₀⁰)\na a' : R[X] × { x // x ∈ R[X]⁰ }\nh : ↑φ a.fst / ↑φ ↑a.snd = ↑φ a'.fst / ↑φ ↑a'.snd\n⊢ Localization.mk a.fst a.snd = Localization.mk a'.fst a'.snd\n[PROOFSTEP]\nrefine Localization.mk_eq_mk_iff.mpr (Localization.r_of_eq (M := R[X]) ?_)\n[GOAL]\ncase ofFractionRing.ofFractionRing.H.H.e_toFractionRing\nK : Type u\ninst✝⁵ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝⁴ : CommGroupWithZero G₀\ninst✝³ : Field L\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : Nontrivial R\nφ : R[X] →*₀ G₀\nhφ : Function.Injective ↑φ\nhφ' : optParam (R[X]⁰ ≤ Submonoid.comap φ G₀⁰) (_ : R[X]⁰ ≤ Submonoid.comap φ G₀⁰)\na a' : R[X] × { x // x ∈ R[X]⁰ }\nh : ↑φ a.fst / ↑φ ↑a.snd = ↑φ a'.fst / ↑φ ↑a'.snd\n⊢ ↑(a'.fst, a'.snd).snd * (a.fst, a.snd).fst = ↑(a.fst, a.snd).snd * (a'.fst, a'.snd).fst\n[PROOFSTEP]\nhave := mul_eq_mul_of_div_eq_div _ _ ?_ ?_ h\n[GOAL]\ncase ofFractionRing.ofFractionRing.H.H.e_toFractionRing.refine_3\nK : Type u\ninst✝⁵ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝⁴ : CommGroupWithZero G₀\ninst✝³ : Field L\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : Nontrivial R\nφ : R[X] →*₀ G₀\nhφ : Function.Injective ↑φ\nhφ' : optParam (R[X]⁰ ≤ Submonoid.comap φ G₀⁰) (_ : R[X]⁰ ≤ Submonoid.comap φ G₀⁰)\na a' : R[X] × { x // x ∈ R[X]⁰ }\nh : ↑φ a.fst / ↑φ ↑a.snd = ↑φ a'.fst / ↑φ ↑a'.snd\nthis : ↑φ a.fst * ↑φ ↑a'.snd = ↑φ a'.fst * ↑φ ↑a.snd\n⊢ ↑(a'.fst, a'.snd).snd * (a.fst, a.snd).fst = ↑(a.fst, a.snd).snd * (a'.fst, a'.snd).fst\ncase ofFractionRing.ofFractionRing.H.H.e_toFractionRing.refine_1\nK : Type u\ninst✝⁵ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝⁴ : CommGroupWithZero G₀\ninst✝³ : Field L\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : Nontrivial R\nφ : R[X] →*₀ G₀\nhφ : Function.Injective ↑φ\nhφ' : optParam (R[X]⁰ ≤ Submonoid.comap φ G₀⁰) (_ : R[X]⁰ ≤ Submonoid.comap φ G₀⁰)\na a' : R[X] × { x // x ∈ R[X]⁰ }\nh : ↑φ a.fst / ↑φ ↑a.snd = ↑φ a'.fst / ↑φ ↑a'.snd\n⊢ ↑φ ↑a.snd ≠ 0\ncase ofFractionRing.ofFractionRing.H.H.e_toFractionRing.refine_2\nK : Type u\ninst✝⁵ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝⁴ : CommGroupWithZero G₀\ninst✝³ : Field L\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : Nontrivial R\nφ : R[X] →*₀ G₀\nhφ : Function.Injective ↑φ\nhφ' : optParam (R[X]⁰ ≤ Submonoid.comap φ G₀⁰) (_ : R[X]⁰ ≤ Submonoid.comap φ G₀⁰)\na a' : R[X] × { x // x ∈ R[X]⁰ }\nh : ↑φ a.fst / ↑φ ↑a.snd = ↑φ a'.fst / ↑φ ↑a'.snd\n⊢ ↑φ ↑a'.snd ≠ 0\n[PROOFSTEP]\nrwa [← map_mul, ← map_mul, hφ.eq_iff, mul_comm, mul_comm a'.fst] at this \n[GOAL]\ncase ofFractionRing.ofFractionRing.H.H.e_toFractionRing.refine_1\nK : Type u\ninst✝⁵ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝⁴ : CommGroupWithZero G₀\ninst✝³ : Field L\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : Nontrivial R\nφ : R[X] →*₀ G₀\nhφ : Function.Injective ↑φ\nhφ' : optParam (R[X]⁰ ≤ Submonoid.comap φ G₀⁰) (_ : R[X]⁰ ≤ Submonoid.comap φ G₀⁰)\na a' : R[X] × { x // x ∈ R[X]⁰ }\nh : ↑φ a.fst / ↑φ ↑a.snd = ↑φ a'.fst / ↑φ ↑a'.snd\n⊢ ↑φ ↑a.snd ≠ 0\ncase ofFractionRing.ofFractionRing.H.H.e_toFractionRing.refine_2\nK : Type u\ninst✝⁵ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝⁴ : CommGroupWithZero G₀\ninst✝³ : Field L\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : Nontrivial R\nφ : R[X] →*₀ G₀\nhφ : Function.Injective ↑φ\nhφ' : optParam (R[X]⁰ ≤ Submonoid.comap φ G₀⁰) (_ : R[X]⁰ ≤ Submonoid.comap φ G₀⁰)\na a' : R[X] × { x // x ∈ R[X]⁰ }\nh : ↑φ a.fst / ↑φ ↑a.snd = ↑φ a'.fst / ↑φ ↑a'.snd\n⊢ ↑φ ↑a'.snd ≠ 0\n[PROOFSTEP]\nall_goals exact map_ne_zero_of_mem_nonZeroDivisors _ hφ (SetLike.coe_mem _)\n[GOAL]\ncase ofFractionRing.ofFractionRing.H.H.e_toFractionRing.refine_1\nK : Type u\ninst✝⁵ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝⁴ : CommGroupWithZero G₀\ninst✝³ : Field L\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : Nontrivial R\nφ : R[X] →*₀ G₀\nhφ : Function.Injective ↑φ\nhφ' : optParam (R[X]⁰ ≤ Submonoid.comap φ G₀⁰) (_ : R[X]⁰ ≤ Submonoid.comap φ G₀⁰)\na a' : R[X] × { x // x ∈ R[X]⁰ }\nh : ↑φ a.fst / ↑φ ↑a.snd = ↑φ a'.fst / ↑φ ↑a'.snd\n⊢ ↑φ ↑a.snd ≠ 0\n[PROOFSTEP]\nexact map_ne_zero_of_mem_nonZeroDivisors _ hφ (SetLike.coe_mem _)\n[GOAL]\ncase ofFractionRing.ofFractionRing.H.H.e_toFractionRing.refine_2\nK : Type u\ninst✝⁵ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝⁴ : CommGroupWithZero G₀\ninst✝³ : Field L\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : Nontrivial R\nφ : R[X] →*₀ G₀\nhφ : Function.Injective ↑φ\nhφ' : optParam (R[X]⁰ ≤ Submonoid.comap φ G₀⁰) (_ : R[X]⁰ ≤ Submonoid.comap φ G₀⁰)\na a' : R[X] × { x // x ∈ R[X]⁰ }\nh : ↑φ a.fst / ↑φ ↑a.snd = ↑φ a'.fst / ↑φ ↑a'.snd\n⊢ ↑φ ↑a'.snd ≠ 0\n[PROOFSTEP]\nexact map_ne_zero_of_mem_nonZeroDivisors _ hφ (SetLike.coe_mem _)\n[GOAL]\nK : Type u\ninst✝⁴ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝³ : CommGroupWithZero G₀\ninst✝² : Field L\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nφ : R[X] →+* L\nhφ : R[X]⁰ ≤ Submonoid.comap φ L⁰\nsrc✝ : RatFunc R →*₀ L := liftMonoidWithZeroHom (RingHom.toMonoidWithZeroHom φ) hφ\nx y : RatFunc R\n⊢ OneHom.toFun\n      (↑{ toOneHom := { toFun := src✝.toFun, map_one' := (_ : ZeroHom.toFun (↑src✝) 1 = 1) },\n          map_mul' :=\n            (_ :\n              ∀ (x y : RatFunc R), ZeroHom.toFun (↑src✝) (x * y) = ZeroHom.toFun (↑src✝) x * ZeroHom.toFun (↑src✝) y) })\n      (x + y) =\n    OneHom.toFun\n        (↑{ toOneHom := { toFun := src✝.toFun, map_one' := (_ : ZeroHom.toFun (↑src✝) 1 = 1) },\n            map_mul' :=\n              (_ :\n                ∀ (x y : RatFunc R),\n                  ZeroHom.toFun (↑src✝) (x * y) = ZeroHom.toFun (↑src✝) x * ZeroHom.toFun (↑src✝) y) })\n        x +\n      OneHom.toFun\n        (↑{ toOneHom := { toFun := src✝.toFun, map_one' := (_ : ZeroHom.toFun (↑src✝) 1 = 1) },\n            map_mul' :=\n              (_ :\n                ∀ (x y : RatFunc R),\n                  ZeroHom.toFun (↑src✝) (x * y) = ZeroHom.toFun (↑src✝) x * ZeroHom.toFun (↑src✝) y) })\n        y\n[PROOFSTEP]\nsimp only [ZeroHom.toFun_eq_coe, MonoidWithZeroHom.toZeroHom_coe]\n[GOAL]\nK : Type u\ninst✝⁴ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝³ : CommGroupWithZero G₀\ninst✝² : Field L\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nφ : R[X] →+* L\nhφ : R[X]⁰ ≤ Submonoid.comap φ L⁰\nsrc✝ : RatFunc R →*₀ L := liftMonoidWithZeroHom (RingHom.toMonoidWithZeroHom φ) hφ\nx y : RatFunc R\n⊢ ↑(liftMonoidWithZeroHom (RingHom.toMonoidWithZeroHom φ) hφ) (x + y) =\n    ↑(liftMonoidWithZeroHom (RingHom.toMonoidWithZeroHom φ) hφ) x +\n      ↑(liftMonoidWithZeroHom (RingHom.toMonoidWithZeroHom φ) hφ) y\n[PROOFSTEP]\ncases subsingleton_or_nontrivial R\n[GOAL]\ncase inl\nK : Type u\ninst✝⁴ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝³ : CommGroupWithZero G₀\ninst✝² : Field L\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nφ : R[X] →+* L\nhφ : R[X]⁰ ≤ Submonoid.comap φ L⁰\nsrc✝ : RatFunc R →*₀ L := liftMonoidWithZeroHom (RingHom.toMonoidWithZeroHom φ) hφ\nx y : RatFunc R\nh✝ : Subsingleton R\n⊢ ↑(liftMonoidWithZeroHom (RingHom.toMonoidWithZeroHom φ) hφ) (x + y) =\n    ↑(liftMonoidWithZeroHom (RingHom.toMonoidWithZeroHom φ) hφ) x +\n      ↑(liftMonoidWithZeroHom (RingHom.toMonoidWithZeroHom φ) hφ) y\n[PROOFSTEP]\nrw [Subsingleton.elim (x + y) y, Subsingleton.elim x 0, map_zero, zero_add]\n[GOAL]\ncase inr\nK : Type u\ninst✝⁴ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝³ : CommGroupWithZero G₀\ninst✝² : Field L\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nφ : R[X] →+* L\nhφ : R[X]⁰ ≤ Submonoid.comap φ L⁰\nsrc✝ : RatFunc R →*₀ L := liftMonoidWithZeroHom (RingHom.toMonoidWithZeroHom φ) hφ\nx y : RatFunc R\nh✝ : Nontrivial R\n⊢ ↑(liftMonoidWithZeroHom (RingHom.toMonoidWithZeroHom φ) hφ) (x + y) =\n    ↑(liftMonoidWithZeroHom (RingHom.toMonoidWithZeroHom φ) hφ) x +\n      ↑(liftMonoidWithZeroHom (RingHom.toMonoidWithZeroHom φ) hφ) y\n[PROOFSTEP]\ncases' x with x\n[GOAL]\ncase inr.ofFractionRing\nK : Type u\ninst✝⁴ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝³ : CommGroupWithZero G₀\ninst✝² : Field L\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nφ : R[X] →+* L\nhφ : R[X]⁰ ≤ Submonoid.comap φ L⁰\nsrc✝ : RatFunc R →*₀ L := liftMonoidWithZeroHom (RingHom.toMonoidWithZeroHom φ) hφ\ny : RatFunc R\nh✝ : Nontrivial R\nx : FractionRing R[X]\n⊢ ↑(liftMonoidWithZeroHom (RingHom.toMonoidWithZeroHom φ) hφ) ({ toFractionRing := x } + y) =\n    ↑(liftMonoidWithZeroHom (RingHom.toMonoidWithZeroHom φ) hφ) { toFractionRing := x } +\n      ↑(liftMonoidWithZeroHom (RingHom.toMonoidWithZeroHom φ) hφ) y\n[PROOFSTEP]\ncases' y with y\n[GOAL]\ncase inr.ofFractionRing.ofFractionRing\nK : Type u\ninst✝⁴ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝³ : CommGroupWithZero G₀\ninst✝² : Field L\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nφ : R[X] →+* L\nhφ : R[X]⁰ ≤ Submonoid.comap φ L⁰\nsrc✝ : RatFunc R →*₀ L := liftMonoidWithZeroHom (RingHom.toMonoidWithZeroHom φ) hφ\nh✝ : Nontrivial R\nx y : FractionRing R[X]\n⊢ ↑(liftMonoidWithZeroHom (RingHom.toMonoidWithZeroHom φ) hφ) ({ toFractionRing := x } + { toFractionRing := y }) =\n    ↑(liftMonoidWithZeroHom (RingHom.toMonoidWithZeroHom φ) hφ) { toFractionRing := x } +\n      ↑(liftMonoidWithZeroHom (RingHom.toMonoidWithZeroHom φ) hφ) { toFractionRing := y }\n[PROOFSTEP]\ninduction' x using Localization.rec with p q\n[GOAL]\ncase inr.ofFractionRing.ofFractionRing.f\nK : Type u\ninst✝⁴ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝³ : CommGroupWithZero G₀\ninst✝² : Field L\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nφ : R[X] →+* L\nhφ : R[X]⁰ ≤ Submonoid.comap φ L⁰\nsrc✝ : RatFunc R →*₀ L := liftMonoidWithZeroHom (RingHom.toMonoidWithZeroHom φ) hφ\nh✝ : Nontrivial R\ny : FractionRing R[X]\np : R[X]\nq : { x // x ∈ R[X]⁰ }\n⊢ ↑(liftMonoidWithZeroHom (RingHom.toMonoidWithZeroHom φ) hφ)\n      ({ toFractionRing := Localization.mk p q } + { toFractionRing := y }) =\n    ↑(liftMonoidWithZeroHom (RingHom.toMonoidWithZeroHom φ) hφ) { toFractionRing := Localization.mk p q } +\n      ↑(liftMonoidWithZeroHom (RingHom.toMonoidWithZeroHom φ) hφ) { toFractionRing := y }\ncase inr.ofFractionRing.ofFractionRing.H\nK : Type u\ninst✝⁴ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝³ : CommGroupWithZero G₀\ninst✝² : Field L\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nφ : R[X] →+* L\nhφ : R[X]⁰ ≤ Submonoid.comap φ L⁰\nsrc✝ : RatFunc R →*₀ L := liftMonoidWithZeroHom (RingHom.toMonoidWithZeroHom φ) hφ\nh✝¹ : Nontrivial R\nx y : FractionRing R[X]\na✝ c✝ : R[X]\nb✝ d✝ : { x // x ∈ R[X]⁰ }\nh✝ : ↑(Localization.r R[X]⁰) (a✝, b✝) (c✝, d✝)\n⊢ (_ :\n      ↑(liftMonoidWithZeroHom (RingHom.toMonoidWithZeroHom φ) hφ)\n          ({ toFractionRing := Localization.mk c✝ d✝ } + { toFractionRing := y }) =\n        ↑(liftMonoidWithZeroHom (RingHom.toMonoidWithZeroHom φ) hφ) { toFractionRing := Localization.mk c✝ d✝ } +\n          ↑(liftMonoidWithZeroHom (RingHom.toMonoidWithZeroHom φ) hφ) { toFractionRing := y }) =\n    (_ :\n      ↑(liftMonoidWithZeroHom (RingHom.toMonoidWithZeroHom φ) hφ)\n          ({ toFractionRing := Localization.mk c✝ d✝ } + { toFractionRing := y }) =\n        ↑(liftMonoidWithZeroHom (RingHom.toMonoidWithZeroHom φ) hφ) { toFractionRing := Localization.mk c✝ d✝ } +\n          ↑(liftMonoidWithZeroHom (RingHom.toMonoidWithZeroHom φ) hφ) { toFractionRing := y })\n[PROOFSTEP]\ninduction' y using Localization.rec with p' q'\n[GOAL]\ncase inr.ofFractionRing.ofFractionRing.f.f\nK : Type u\ninst✝⁴ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝³ : CommGroupWithZero G₀\ninst✝² : Field L\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nφ : R[X] →+* L\nhφ : R[X]⁰ ≤ Submonoid.comap φ L⁰\nsrc✝ : RatFunc R →*₀ L := liftMonoidWithZeroHom (RingHom.toMonoidWithZeroHom φ) hφ\nh✝ : Nontrivial R\np : R[X]\nq : { x // x ∈ R[X]⁰ }\np' : R[X]\nq' : { x // x ∈ R[X]⁰ }\n⊢ ↑(liftMonoidWithZeroHom (RingHom.toMonoidWithZeroHom φ) hφ)\n      ({ toFractionRing := Localization.mk p q } + { toFractionRing := Localization.mk p' q' }) =\n    ↑(liftMonoidWithZeroHom (RingHom.toMonoidWithZeroHom φ) hφ) { toFractionRing := Localization.mk p q } +\n      ↑(liftMonoidWithZeroHom (RingHom.toMonoidWithZeroHom φ) hφ) { toFractionRing := Localization.mk p' q' }\n[PROOFSTEP]\nrw [← ofFractionRing_add, Localization.add_mk]\n[GOAL]\ncase inr.ofFractionRing.ofFractionRing.f.f\nK : Type u\ninst✝⁴ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝³ : CommGroupWithZero G₀\ninst✝² : Field L\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nφ : R[X] →+* L\nhφ : R[X]⁰ ≤ Submonoid.comap φ L⁰\nsrc✝ : RatFunc R →*₀ L := liftMonoidWithZeroHom (RingHom.toMonoidWithZeroHom φ) hφ\nh✝ : Nontrivial R\np : R[X]\nq : { x // x ∈ R[X]⁰ }\np' : R[X]\nq' : { x // x ∈ R[X]⁰ }\n⊢ ↑(liftMonoidWithZeroHom (RingHom.toMonoidWithZeroHom φ) hφ)\n      { toFractionRing := Localization.mk (↑q * p' + ↑q' * p) (q * q') } =\n    ↑(liftMonoidWithZeroHom (RingHom.toMonoidWithZeroHom φ) hφ) { toFractionRing := Localization.mk p q } +\n      ↑(liftMonoidWithZeroHom (RingHom.toMonoidWithZeroHom φ) hφ) { toFractionRing := Localization.mk p' q' }\n[PROOFSTEP]\nsimp only [RingHom.toMonoidWithZeroHom_eq_coe, liftMonoidWithZeroHom_apply_ofFractionRing_mk]\n[GOAL]\ncase inr.ofFractionRing.ofFractionRing.f.f\nK : Type u\ninst✝⁴ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝³ : CommGroupWithZero G₀\ninst✝² : Field L\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nφ : R[X] →+* L\nhφ : R[X]⁰ ≤ Submonoid.comap φ L⁰\nsrc✝ : RatFunc R →*₀ L := liftMonoidWithZeroHom (RingHom.toMonoidWithZeroHom φ) hφ\nh✝ : Nontrivial R\np : R[X]\nq : { x // x ∈ R[X]⁰ }\np' : R[X]\nq' : { x // x ∈ R[X]⁰ }\n⊢ ↑φ (↑q * p' + ↑q' * p) / ↑φ ↑(q * q') = ↑φ p / ↑φ ↑q + ↑φ p' / ↑φ ↑q'\n[PROOFSTEP]\nrw [div_add_div, div_eq_div_iff]\n[GOAL]\ncase inr.ofFractionRing.ofFractionRing.f.f\nK : Type u\ninst✝⁴ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝³ : CommGroupWithZero G₀\ninst✝² : Field L\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nφ : R[X] →+* L\nhφ : R[X]⁰ ≤ Submonoid.comap φ L⁰\nsrc✝ : RatFunc R →*₀ L := liftMonoidWithZeroHom (RingHom.toMonoidWithZeroHom φ) hφ\nh✝ : Nontrivial R\np : R[X]\nq : { x // x ∈ R[X]⁰ }\np' : R[X]\nq' : { x // x ∈ R[X]⁰ }\n⊢ ↑φ (↑q * p' + ↑q' * p) * (↑φ ↑q * ↑φ ↑q') = (↑φ p * ↑φ ↑q' + ↑φ ↑q * ↑φ p') * ↑φ ↑(q * q')\n[PROOFSTEP]\nrw [mul_comm _ p, mul_comm _ p', mul_comm _ (φ p'), add_comm]\n[GOAL]\ncase inr.ofFractionRing.ofFractionRing.f.f\nK : Type u\ninst✝⁴ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝³ : CommGroupWithZero G₀\ninst✝² : Field L\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nφ : R[X] →+* L\nhφ : R[X]⁰ ≤ Submonoid.comap φ L⁰\nsrc✝ : RatFunc R →*₀ L := liftMonoidWithZeroHom (RingHom.toMonoidWithZeroHom φ) hφ\nh✝ : Nontrivial R\np : R[X]\nq : { x // x ∈ R[X]⁰ }\np' : R[X]\nq' : { x // x ∈ R[X]⁰ }\n⊢ ↑φ (p * ↑q' + p' * ↑q) * (↑φ ↑q * ↑φ ↑q') = (↑φ p * ↑φ ↑q' + ↑φ p' * ↑φ ↑q) * ↑φ ↑(q * q')\n[PROOFSTEP]\nsimp only [map_add, map_mul, Submonoid.coe_mul]\n[GOAL]\ncase inr.ofFractionRing.ofFractionRing.f.f.hb\nK : Type u\ninst✝⁴ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝³ : CommGroupWithZero G₀\ninst✝² : Field L\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nφ : R[X] →+* L\nhφ : R[X]⁰ ≤ Submonoid.comap φ L⁰\nsrc✝ : RatFunc R →*₀ L := liftMonoidWithZeroHom (RingHom.toMonoidWithZeroHom φ) hφ\nh✝ : Nontrivial R\np : R[X]\nq : { x // x ∈ R[X]⁰ }\np' : R[X]\nq' : { x // x ∈ R[X]⁰ }\n⊢ ↑φ ↑(q * q') ≠ 0\ncase inr.ofFractionRing.ofFractionRing.f.f.hd\nK : Type u\ninst✝⁴ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝³ : CommGroupWithZero G₀\ninst✝² : Field L\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nφ : R[X] →+* L\nhφ : R[X]⁰ ≤ Submonoid.comap φ L⁰\nsrc✝ : RatFunc R →*₀ L := liftMonoidWithZeroHom (RingHom.toMonoidWithZeroHom φ) hφ\nh✝ : Nontrivial R\np : R[X]\nq : { x // x ∈ R[X]⁰ }\np' : R[X]\nq' : { x // x ∈ R[X]⁰ }\n⊢ ↑φ ↑q * ↑φ ↑q' ≠ 0\ncase inr.ofFractionRing.ofFractionRing.f.f.hb\nK : Type u\ninst✝⁴ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝³ : CommGroupWithZero G₀\ninst✝² : Field L\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nφ : R[X] →+* L\nhφ : R[X]⁰ ≤ Submonoid.comap φ L⁰\nsrc✝ : RatFunc R →*₀ L := liftMonoidWithZeroHom (RingHom.toMonoidWithZeroHom φ) hφ\nh✝ : Nontrivial R\np : R[X]\nq : { x // x ∈ R[X]⁰ }\np' : R[X]\nq' : { x // x ∈ R[X]⁰ }\n⊢ ↑φ ↑q ≠ 0\ncase inr.ofFractionRing.ofFractionRing.f.f.hd\nK : Type u\ninst✝⁴ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝³ : CommGroupWithZero G₀\ninst✝² : Field L\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nφ : R[X] →+* L\nhφ : R[X]⁰ ≤ Submonoid.comap φ L⁰\nsrc✝ : RatFunc R →*₀ L := liftMonoidWithZeroHom (RingHom.toMonoidWithZeroHom φ) hφ\nh✝ : Nontrivial R\np : R[X]\nq : { x // x ∈ R[X]⁰ }\np' : R[X]\nq' : { x // x ∈ R[X]⁰ }\n⊢ ↑φ ↑q' ≠ 0\n[PROOFSTEP]\nall_goals\n  try simp only [← map_mul, ← Submonoid.coe_mul]\n  exact nonZeroDivisors.ne_zero (hφ (SetLike.coe_mem _))\n[GOAL]\ncase inr.ofFractionRing.ofFractionRing.f.f.hb\nK : Type u\ninst✝⁴ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝³ : CommGroupWithZero G₀\ninst✝² : Field L\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nφ : R[X] →+* L\nhφ : R[X]⁰ ≤ Submonoid.comap φ L⁰\nsrc✝ : RatFunc R →*₀ L := liftMonoidWithZeroHom (RingHom.toMonoidWithZeroHom φ) hφ\nh✝ : Nontrivial R\np : R[X]\nq : { x // x ∈ R[X]⁰ }\np' : R[X]\nq' : { x // x ∈ R[X]⁰ }\n⊢ ↑φ ↑(q * q') ≠ 0\n[PROOFSTEP]\ntry simp only [← map_mul, ← Submonoid.coe_mul]\n[GOAL]\ncase inr.ofFractionRing.ofFractionRing.f.f.hb\nK : Type u\ninst✝⁴ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝³ : CommGroupWithZero G₀\ninst✝² : Field L\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nφ : R[X] →+* L\nhφ : R[X]⁰ ≤ Submonoid.comap φ L⁰\nsrc✝ : RatFunc R →*₀ L := liftMonoidWithZeroHom (RingHom.toMonoidWithZeroHom φ) hφ\nh✝ : Nontrivial R\np : R[X]\nq : { x // x ∈ R[X]⁰ }\np' : R[X]\nq' : { x // x ∈ R[X]⁰ }\n⊢ ↑φ ↑(q * q') ≠ 0\n[PROOFSTEP]\nsimp only [← map_mul, ← Submonoid.coe_mul]\n[GOAL]\ncase inr.ofFractionRing.ofFractionRing.f.f.hb\nK : Type u\ninst✝⁴ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝³ : CommGroupWithZero G₀\ninst✝² : Field L\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nφ : R[X] →+* L\nhφ : R[X]⁰ ≤ Submonoid.comap φ L⁰\nsrc✝ : RatFunc R →*₀ L := liftMonoidWithZeroHom (RingHom.toMonoidWithZeroHom φ) hφ\nh✝ : Nontrivial R\np : R[X]\nq : { x // x ∈ R[X]⁰ }\np' : R[X]\nq' : { x // x ∈ R[X]⁰ }\n⊢ ↑φ ↑(q * q') ≠ 0\n[PROOFSTEP]\nexact nonZeroDivisors.ne_zero (hφ (SetLike.coe_mem _))\n[GOAL]\ncase inr.ofFractionRing.ofFractionRing.f.f.hd\nK : Type u\ninst✝⁴ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝³ : CommGroupWithZero G₀\ninst✝² : Field L\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nφ : R[X] →+* L\nhφ : R[X]⁰ ≤ Submonoid.comap φ L⁰\nsrc✝ : RatFunc R →*₀ L := liftMonoidWithZeroHom (RingHom.toMonoidWithZeroHom φ) hφ\nh✝ : Nontrivial R\np : R[X]\nq : { x // x ∈ R[X]⁰ }\np' : R[X]\nq' : { x // x ∈ R[X]⁰ }\n⊢ ↑φ ↑q * ↑φ ↑q' ≠ 0\n[PROOFSTEP]\ntry simp only [← map_mul, ← Submonoid.coe_mul]\n[GOAL]\ncase inr.ofFractionRing.ofFractionRing.f.f.hd\nK : Type u\ninst✝⁴ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝³ : CommGroupWithZero G₀\ninst✝² : Field L\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nφ : R[X] →+* L\nhφ : R[X]⁰ ≤ Submonoid.comap φ L⁰\nsrc✝ : RatFunc R →*₀ L := liftMonoidWithZeroHom (RingHom.toMonoidWithZeroHom φ) hφ\nh✝ : Nontrivial R\np : R[X]\nq : { x // x ∈ R[X]⁰ }\np' : R[X]\nq' : { x // x ∈ R[X]⁰ }\n⊢ ↑φ ↑q * ↑φ ↑q' ≠ 0\n[PROOFSTEP]\nsimp only [← map_mul, ← Submonoid.coe_mul]\n[GOAL]\ncase inr.ofFractionRing.ofFractionRing.f.f.hd\nK : Type u\ninst✝⁴ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝³ : CommGroupWithZero G₀\ninst✝² : Field L\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nφ : R[X] →+* L\nhφ : R[X]⁰ ≤ Submonoid.comap φ L⁰\nsrc✝ : RatFunc R →*₀ L := liftMonoidWithZeroHom (RingHom.toMonoidWithZeroHom φ) hφ\nh✝ : Nontrivial R\np : R[X]\nq : { x // x ∈ R[X]⁰ }\np' : R[X]\nq' : { x // x ∈ R[X]⁰ }\n⊢ ↑φ ↑(q * q') ≠ 0\n[PROOFSTEP]\nexact nonZeroDivisors.ne_zero (hφ (SetLike.coe_mem _))\n[GOAL]\ncase inr.ofFractionRing.ofFractionRing.f.f.hb\nK : Type u\ninst✝⁴ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝³ : CommGroupWithZero G₀\ninst✝² : Field L\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nφ : R[X] →+* L\nhφ : R[X]⁰ ≤ Submonoid.comap φ L⁰\nsrc✝ : RatFunc R →*₀ L := liftMonoidWithZeroHom (RingHom.toMonoidWithZeroHom φ) hφ\nh✝ : Nontrivial R\np : R[X]\nq : { x // x ∈ R[X]⁰ }\np' : R[X]\nq' : { x // x ∈ R[X]⁰ }\n⊢ ↑φ ↑q ≠ 0\n[PROOFSTEP]\ntry simp only [← map_mul, ← Submonoid.coe_mul]\n[GOAL]\ncase inr.ofFractionRing.ofFractionRing.f.f.hb\nK : Type u\ninst✝⁴ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝³ : CommGroupWithZero G₀\ninst✝² : Field L\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nφ : R[X] →+* L\nhφ : R[X]⁰ ≤ Submonoid.comap φ L⁰\nsrc✝ : RatFunc R →*₀ L := liftMonoidWithZeroHom (RingHom.toMonoidWithZeroHom φ) hφ\nh✝ : Nontrivial R\np : R[X]\nq : { x // x ∈ R[X]⁰ }\np' : R[X]\nq' : { x // x ∈ R[X]⁰ }\n⊢ ↑φ ↑q ≠ 0\n[PROOFSTEP]\nsimp only [← map_mul, ← Submonoid.coe_mul]\n[GOAL]\ncase inr.ofFractionRing.ofFractionRing.f.f.hb\nK : Type u\ninst✝⁴ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝³ : CommGroupWithZero G₀\ninst✝² : Field L\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nφ : R[X] →+* L\nhφ : R[X]⁰ ≤ Submonoid.comap φ L⁰\nsrc✝ : RatFunc R →*₀ L := liftMonoidWithZeroHom (RingHom.toMonoidWithZeroHom φ) hφ\nh✝ : Nontrivial R\np : R[X]\nq : { x // x ∈ R[X]⁰ }\np' : R[X]\nq' : { x // x ∈ R[X]⁰ }\n⊢ ↑φ ↑q ≠ 0\n[PROOFSTEP]\nexact nonZeroDivisors.ne_zero (hφ (SetLike.coe_mem _))\n[GOAL]\ncase inr.ofFractionRing.ofFractionRing.f.f.hd\nK : Type u\ninst✝⁴ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝³ : CommGroupWithZero G₀\ninst✝² : Field L\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nφ : R[X] →+* L\nhφ : R[X]⁰ ≤ Submonoid.comap φ L⁰\nsrc✝ : RatFunc R →*₀ L := liftMonoidWithZeroHom (RingHom.toMonoidWithZeroHom φ) hφ\nh✝ : Nontrivial R\np : R[X]\nq : { x // x ∈ R[X]⁰ }\np' : R[X]\nq' : { x // x ∈ R[X]⁰ }\n⊢ ↑φ ↑q' ≠ 0\n[PROOFSTEP]\ntry simp only [← map_mul, ← Submonoid.coe_mul]\n[GOAL]\ncase inr.ofFractionRing.ofFractionRing.f.f.hd\nK : Type u\ninst✝⁴ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝³ : CommGroupWithZero G₀\ninst✝² : Field L\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nφ : R[X] →+* L\nhφ : R[X]⁰ ≤ Submonoid.comap φ L⁰\nsrc✝ : RatFunc R →*₀ L := liftMonoidWithZeroHom (RingHom.toMonoidWithZeroHom φ) hφ\nh✝ : Nontrivial R\np : R[X]\nq : { x // x ∈ R[X]⁰ }\np' : R[X]\nq' : { x // x ∈ R[X]⁰ }\n⊢ ↑φ ↑q' ≠ 0\n[PROOFSTEP]\nsimp only [← map_mul, ← Submonoid.coe_mul]\n[GOAL]\ncase inr.ofFractionRing.ofFractionRing.f.f.hd\nK : Type u\ninst✝⁴ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝³ : CommGroupWithZero G₀\ninst✝² : Field L\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nφ : R[X] →+* L\nhφ : R[X]⁰ ≤ Submonoid.comap φ L⁰\nsrc✝ : RatFunc R →*₀ L := liftMonoidWithZeroHom (RingHom.toMonoidWithZeroHom φ) hφ\nh✝ : Nontrivial R\np : R[X]\nq : { x // x ∈ R[X]⁰ }\np' : R[X]\nq' : { x // x ∈ R[X]⁰ }\n⊢ ↑φ ↑q' ≠ 0\n[PROOFSTEP]\nexact nonZeroDivisors.ne_zero (hφ (SetLike.coe_mem _))\n[GOAL]\ncase inr.ofFractionRing.ofFractionRing.f.H\nK : Type u\ninst✝⁴ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝³ : CommGroupWithZero G₀\ninst✝² : Field L\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nφ : R[X] →+* L\nhφ : R[X]⁰ ≤ Submonoid.comap φ L⁰\nsrc✝ : RatFunc R →*₀ L := liftMonoidWithZeroHom (RingHom.toMonoidWithZeroHom φ) hφ\nh✝¹ : Nontrivial R\ny : FractionRing R[X]\np : R[X]\nq : { x // x ∈ R[X]⁰ }\na✝ c✝ : R[X]\nb✝ d✝ : { x // x ∈ R[X]⁰ }\nh✝ : ↑(Localization.r R[X]⁰) (a✝, b✝) (c✝, d✝)\n⊢ (_ :\n      ↑(liftMonoidWithZeroHom (RingHom.toMonoidWithZeroHom φ) hφ)\n          ({ toFractionRing := Localization.mk p q } + { toFractionRing := Localization.mk c✝ d✝ }) =\n        ↑(liftMonoidWithZeroHom (RingHom.toMonoidWithZeroHom φ) hφ) { toFractionRing := Localization.mk p q } +\n          ↑(liftMonoidWithZeroHom (RingHom.toMonoidWithZeroHom φ) hφ) { toFractionRing := Localization.mk c✝ d✝ }) =\n    (_ :\n      ↑(liftMonoidWithZeroHom (RingHom.toMonoidWithZeroHom φ) hφ)\n          ({ toFractionRing := Localization.mk p q } + { toFractionRing := Localization.mk c✝ d✝ }) =\n        ↑(liftMonoidWithZeroHom (RingHom.toMonoidWithZeroHom φ) hφ) { toFractionRing := Localization.mk p q } +\n          ↑(liftMonoidWithZeroHom (RingHom.toMonoidWithZeroHom φ) hφ) { toFractionRing := Localization.mk c✝ d✝ })\n[PROOFSTEP]\nrfl\n[GOAL]\ncase inr.ofFractionRing.ofFractionRing.H\nK : Type u\ninst✝⁴ : CommRing K\nG₀ : Type u_1\nL : Type u_2\nR : Type u_3\nS : Type u_4\nF : Type u_5\ninst✝³ : CommGroupWithZero G₀\ninst✝² : Field L\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nφ : R[X] →+* L\nhφ : R[X]⁰ ≤ Submonoid.comap φ L⁰\nsrc✝ : RatFunc R →*₀ L := liftMonoidWithZeroHom (RingHom.toMonoidWithZeroHom φ) hφ\nh✝¹ : Nontrivial R\nx y : FractionRing R[X]\na✝ c✝ : R[X]\nb✝ d✝ : { x // x ∈ R[X]⁰ }\nh✝ : ↑(Localization.r R[X]⁰) (a✝, b✝) (c✝, d✝)\n⊢ (_ :\n      ↑(liftMonoidWithZeroHom (RingHom.toMonoidWithZeroHom φ) hφ)\n          ({ toFractionRing := Localization.mk c✝ d✝ } + { toFractionRing := y }) =\n        ↑(liftMonoidWithZeroHom (RingHom.toMonoidWithZeroHom φ) hφ) { toFractionRing := Localization.mk c✝ d✝ } +\n          ↑(liftMonoidWithZeroHom (RingHom.toMonoidWithZeroHom φ) hφ) { toFractionRing := y }) =\n    (_ :\n      ↑(liftMonoidWithZeroHom (RingHom.toMonoidWithZeroHom φ) hφ)\n          ({ toFractionRing := Localization.mk c✝ d✝ } + { toFractionRing := y }) =\n        ↑(liftMonoidWithZeroHom (RingHom.toMonoidWithZeroHom φ) hφ) { toFractionRing := Localization.mk c✝ d✝ } +\n          ↑(liftMonoidWithZeroHom (RingHom.toMonoidWithZeroHom φ) hφ) { toFractionRing := y })\n[PROOFSTEP]\nrfl\n[GOAL]\nK : Type u\ninst✝¹ : CommRing K\ninst✝ : IsDomain K\nsrc✝¹ : CommRing (RatFunc K) := instCommRing K\nsrc✝ : Nontrivial (RatFunc K) := instNontrivial K\n⊢ ∀ (a b : RatFunc K), a / b = a * b⁻¹\n[PROOFSTEP]\nfrac_tac\n[GOAL]\nK : Type u\ninst✝¹ : CommRing K\ninst✝ : IsDomain K\nsrc✝¹ : CommRing (RatFunc K) := instCommRing K\nsrc✝ : Nontrivial (RatFunc K) := instNontrivial K\n⊢ 0⁻¹ = 0\n[PROOFSTEP]\nrw [← ofFractionRing_zero, ← ofFractionRing_inv, inv_zero]\n[GOAL]\nK : Type u\ninst✝³ : CommRing K\ninst✝² : IsDomain K\nR : Type u_1\ninst✝¹ : CommSemiring R\ninst✝ : Algebra R K[X]\n⊢ (fun x => RatFunc.mk (↑(algebraMap R K[X]) x) 1) 1 = 1\n[PROOFSTEP]\nsimp only [mk_one', RingHom.map_one, ofFractionRing_one]\n[GOAL]\nK : Type u\ninst✝³ : CommRing K\ninst✝² : IsDomain K\nR : Type u_1\ninst✝¹ : CommSemiring R\ninst✝ : Algebra R K[X]\nx y : R\n⊢ OneHom.toFun\n      { toFun := fun x => RatFunc.mk (↑(algebraMap R K[X]) x) 1,\n        map_one' := (_ : RatFunc.mk (↑(algebraMap R K[X]) 1) 1 = 1) }\n      (x * y) =\n    OneHom.toFun\n        { toFun := fun x => RatFunc.mk (↑(algebraMap R K[X]) x) 1,\n          map_one' := (_ : RatFunc.mk (↑(algebraMap R K[X]) 1) 1 = 1) }\n        x *\n      OneHom.toFun\n        { toFun := fun x => RatFunc.mk (↑(algebraMap R K[X]) x) 1,\n          map_one' := (_ : RatFunc.mk (↑(algebraMap R K[X]) 1) 1 = 1) }\n        y\n[PROOFSTEP]\nsimp only [mk_one', RingHom.map_mul, ofFractionRing_mul]\n[GOAL]\nK : Type u\ninst✝³ : CommRing K\ninst✝² : IsDomain K\nR : Type u_1\ninst✝¹ : CommSemiring R\ninst✝ : Algebra R K[X]\n⊢ OneHom.toFun\n      (↑{\n          toOneHom :=\n            { toFun := fun x => RatFunc.mk (↑(algebraMap R K[X]) x) 1,\n              map_one' := (_ : RatFunc.mk (↑(algebraMap R K[X]) 1) 1 = 1) },\n          map_mul' :=\n            (_ :\n              ∀ (x y : R),\n                RatFunc.mk (↑(algebraMap R K[X]) (x * y)) 1 =\n                  RatFunc.mk (↑(algebraMap R K[X]) x) 1 * RatFunc.mk (↑(algebraMap R K[X]) y) 1) })\n      0 =\n    0\n[PROOFSTEP]\nsimp only [mk_one', RingHom.map_zero, ofFractionRing_zero]\n[GOAL]\nK : Type u\ninst✝³ : CommRing K\ninst✝² : IsDomain K\nR : Type u_1\ninst✝¹ : CommSemiring R\ninst✝ : Algebra R K[X]\nx y : R\n⊢ OneHom.toFun\n      (↑{\n          toOneHom :=\n            { toFun := fun x => RatFunc.mk (↑(algebraMap R K[X]) x) 1,\n              map_one' := (_ : RatFunc.mk (↑(algebraMap R K[X]) 1) 1 = 1) },\n          map_mul' :=\n            (_ :\n              ∀ (x y : R),\n                RatFunc.mk (↑(algebraMap R K[X]) (x * y)) 1 =\n                  RatFunc.mk (↑(algebraMap R K[X]) x) 1 * RatFunc.mk (↑(algebraMap R K[X]) y) 1) })\n      (x + y) =\n    OneHom.toFun\n        (↑{\n            toOneHom :=\n              { toFun := fun x => RatFunc.mk (↑(algebraMap R K[X]) x) 1,\n                map_one' := (_ : RatFunc.mk (↑(algebraMap R K[X]) 1) 1 = 1) },\n            map_mul' :=\n              (_ :\n                ∀ (x y : R),\n                  RatFunc.mk (↑(algebraMap R K[X]) (x * y)) 1 =\n                    RatFunc.mk (↑(algebraMap R K[X]) x) 1 * RatFunc.mk (↑(algebraMap R K[X]) y) 1) })\n        x +\n      OneHom.toFun\n        (↑{\n            toOneHom :=\n              { toFun := fun x => RatFunc.mk (↑(algebraMap R K[X]) x) 1,\n                map_one' := (_ : RatFunc.mk (↑(algebraMap R K[X]) 1) 1 = 1) },\n            map_mul' :=\n              (_ :\n                ∀ (x y : R),\n                  RatFunc.mk (↑(algebraMap R K[X]) (x * y)) 1 =\n                    RatFunc.mk (↑(algebraMap R K[X]) x) 1 * RatFunc.mk (↑(algebraMap R K[X]) y) 1) })\n        y\n[PROOFSTEP]\nsimp only [mk_one', RingHom.map_add, ofFractionRing_add]\n[GOAL]\nK : Type u\ninst✝³ : CommRing K\ninst✝² : IsDomain K\nR : Type u_1\ninst✝¹ : CommSemiring R\ninst✝ : Algebra R K[X]\nc : R\nx : (fun x => RatFunc K) c\n⊢ c • x =\n    ↑{\n            toMonoidHom :=\n              {\n                toOneHom :=\n                  { toFun := fun x => RatFunc.mk (↑(algebraMap R K[X]) x) 1,\n                    map_one' := (_ : RatFunc.mk (↑(algebraMap R K[X]) 1) 1 = 1) },\n                map_mul' :=\n                  (_ :\n                    ∀ (x y : R),\n                      RatFunc.mk (↑(algebraMap R K[X]) (x * y)) 1 =\n                        RatFunc.mk (↑(algebraMap R K[X]) x) 1 * RatFunc.mk (↑(algebraMap R K[X]) y) 1) },\n            map_zero' := (_ : RatFunc.mk (↑(algebraMap R K[X]) 0) 1 = 0),\n            map_add' :=\n              (_ :\n                ∀ (x y : R),\n                  RatFunc.mk (↑(algebraMap R K[X]) (x + y)) 1 =\n                    RatFunc.mk (↑(algebraMap R K[X]) x) 1 + RatFunc.mk (↑(algebraMap R K[X]) y) 1) }\n        c *\n      x\n[PROOFSTEP]\ninduction' x using RatFunc.induction_on' with p q hq\n[GOAL]\ncase _pq\nK : Type u\ninst✝³ : CommRing K\ninst✝² : IsDomain K\nR : Type u_1\ninst✝¹ : CommSemiring R\ninst✝ : Algebra R K[X]\nc : R\np q : K[X]\nhq : q ≠ 0\n⊢ c • RatFunc.mk p q =\n    ↑{\n            toMonoidHom :=\n              {\n                toOneHom :=\n                  { toFun := fun x => RatFunc.mk (↑(algebraMap R K[X]) x) 1,\n                    map_one' := (_ : RatFunc.mk (↑(algebraMap R K[X]) 1) 1 = 1) },\n                map_mul' :=\n                  (_ :\n                    ∀ (x y : R),\n                      RatFunc.mk (↑(algebraMap R K[X]) (x * y)) 1 =\n                        RatFunc.mk (↑(algebraMap R K[X]) x) 1 * RatFunc.mk (↑(algebraMap R K[X]) y) 1) },\n            map_zero' := (_ : RatFunc.mk (↑(algebraMap R K[X]) 0) 1 = 0),\n            map_add' :=\n              (_ :\n                ∀ (x y : R),\n                  RatFunc.mk (↑(algebraMap R K[X]) (x + y)) 1 =\n                    RatFunc.mk (↑(algebraMap R K[X]) x) 1 + RatFunc.mk (↑(algebraMap R K[X]) y) 1) }\n        c *\n      RatFunc.mk p q\n[PROOFSTEP]\nrw [RingHom.coe_mk, MonoidHom.coe_mk, OneHom.coe_mk]\n[GOAL]\ncase _pq\nK : Type u\ninst✝³ : CommRing K\ninst✝² : IsDomain K\nR : Type u_1\ninst✝¹ : CommSemiring R\ninst✝ : Algebra R K[X]\nc : R\np q : K[X]\nhq : q ≠ 0\n⊢ c • RatFunc.mk p q = RatFunc.mk (↑(algebraMap R K[X]) c) 1 * RatFunc.mk p q\n[PROOFSTEP]\nrw [mk_one', ← mk_smul, mk_def_of_ne (c • p) hq, mk_def_of_ne p hq, ← ofFractionRing_mul,\n  IsLocalization.mul_mk'_eq_mk'_of_mul, Algebra.smul_def]\n[GOAL]\nK : Type u\ninst✝¹ : CommRing K\ninst✝ : IsDomain K\nx : K[X]\n⊢ { toFractionRing := ↑(algebraMap K[X] (FractionRing K[X])) x } = ↑(algebraMap K[X] (RatFunc K)) x\n[PROOFSTEP]\nrw [← mk_one, mk_one']\n[GOAL]\nK : Type u\ninst✝¹ : CommRing K\ninst✝ : IsDomain K\np q : K[X]\n⊢ RatFunc.mk p q = ↑(algebraMap K[X] (RatFunc K)) p / ↑(algebraMap K[X] (RatFunc K)) q\n[PROOFSTEP]\nsimp only [mk_eq_div', ofFractionRing_div, ofFractionRing_algebraMap]\n[GOAL]\nK : Type u\ninst✝⁴ : CommRing K\ninst✝³ : IsDomain K\nR : Type u_1\ninst✝² : Monoid R\ninst✝¹ : DistribMulAction R K[X]\ninst✝ : IsScalarTower R K[X] K[X]\nc : R\np q : K[X]\n⊢ ↑(algebraMap K[X] (RatFunc K)) (c • p) / ↑(algebraMap K[X] (RatFunc K)) q =\n    c • (↑(algebraMap K[X] (RatFunc K)) p / ↑(algebraMap K[X] (RatFunc K)) q)\n[PROOFSTEP]\nrw [← mk_eq_div, mk_smul, mk_eq_div]\n[GOAL]\nK : Type u\ninst✝³ : CommRing K\ninst✝² : IsDomain K\nR : Type u_1\ninst✝¹ : CommSemiring R\ninst✝ : Algebra R K[X]\nx : R\n⊢ ↑(algebraMap R (RatFunc K)) x =\n    ↑(algebraMap ((fun x => K[X]) x) (RatFunc K)) (↑(algebraMap R K[X]) x) / ↑(algebraMap K[X] (RatFunc K)) 1\n[PROOFSTEP]\nrw [← mk_eq_div]\n[GOAL]\nK : Type u\ninst✝³ : CommRing K\ninst✝² : IsDomain K\nR : Type u_1\ninst✝¹ : CommSemiring R\ninst✝ : Algebra R K[X]\nx : R\n⊢ ↑(algebraMap R (RatFunc K)) x = RatFunc.mk (↑(algebraMap R K[X]) x) 1\n[PROOFSTEP]\nrfl\n[GOAL]\nK : Type u\ninst✝⁴ : CommRing K\ninst✝³ : IsDomain K\nR : Type u_1\nF : Type u_2\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : MonoidHomClass F K[X] R[X]\nφ : F\nhφ : K[X]⁰ ≤ Submonoid.comap φ R[X]⁰\np q : K[X]\nhq : q ≠ 0\n⊢ ↑(map φ hφ) (↑(algebraMap K[X] (RatFunc K)) p / ↑(algebraMap K[X] (RatFunc K)) q) =\n    ↑(algebraMap ((fun x => R[X]) p) (RatFunc R)) (↑φ p) / ↑(algebraMap ((fun x => R[X]) q) (RatFunc R)) (↑φ q)\n[PROOFSTEP]\nhave hq' : φ q ≠ 0 := nonZeroDivisors.ne_zero (hφ (mem_nonZeroDivisors_iff_ne_zero.mpr hq))\n[GOAL]\nK : Type u\ninst✝⁴ : CommRing K\ninst✝³ : IsDomain K\nR : Type u_1\nF : Type u_2\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : MonoidHomClass F K[X] R[X]\nφ : F\nhφ : K[X]⁰ ≤ Submonoid.comap φ R[X]⁰\np q : K[X]\nhq : q ≠ 0\nhq' : ↑φ q ≠ 0\n⊢ ↑(map φ hφ) (↑(algebraMap K[X] (RatFunc K)) p / ↑(algebraMap K[X] (RatFunc K)) q) =\n    ↑(algebraMap ((fun x => R[X]) p) (RatFunc R)) (↑φ p) / ↑(algebraMap ((fun x => R[X]) q) (RatFunc R)) (↑φ q)\n[PROOFSTEP]\nsimp only [← mk_eq_div, mk_eq_localization_mk _ hq, map_apply_ofFractionRing_mk, mk_eq_localization_mk _ hq']\n[GOAL]\nK : Type u\ninst✝⁴ : CommRing K\ninst✝³ : IsDomain K\nR : Type u_1\nF : Type u_2\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : MonoidWithZeroHomClass F K[X] R[X]\nφ : F\nhφ : K[X]⁰ ≤ Submonoid.comap φ R[X]⁰\np q : K[X]\n⊢ ↑(map φ hφ) (↑(algebraMap K[X] (RatFunc K)) p / ↑(algebraMap K[X] (RatFunc K)) q) =\n    ↑(algebraMap ((fun x => R[X]) p) (RatFunc R)) (↑φ p) / ↑(algebraMap ((fun x => R[X]) q) (RatFunc R)) (↑φ q)\n[PROOFSTEP]\nrcases eq_or_ne q 0 with (rfl | hq)\n[GOAL]\ncase inl\nK : Type u\ninst✝⁴ : CommRing K\ninst✝³ : IsDomain K\nR : Type u_1\nF : Type u_2\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : MonoidWithZeroHomClass F K[X] R[X]\nφ : F\nhφ : K[X]⁰ ≤ Submonoid.comap φ R[X]⁰\np : K[X]\n⊢ ↑(map φ hφ) (↑(algebraMap K[X] (RatFunc K)) p / ↑(algebraMap K[X] (RatFunc K)) 0) =\n    ↑(algebraMap ((fun x => R[X]) p) (RatFunc R)) (↑φ p) / ↑(algebraMap ((fun x => R[X]) 0) (RatFunc R)) (↑φ 0)\n[PROOFSTEP]\nhave : (0 : RatFunc K) = algebraMap K[X] _ 0 / algebraMap K[X] _ 1 := by simp\n[GOAL]\nK : Type u\ninst✝⁴ : CommRing K\ninst✝³ : IsDomain K\nR : Type u_1\nF : Type u_2\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : MonoidWithZeroHomClass F K[X] R[X]\nφ : F\nhφ : K[X]⁰ ≤ Submonoid.comap φ R[X]⁰\np : K[X]\n⊢ 0 = ↑(algebraMap K[X] (RatFunc K)) 0 / ↑(algebraMap K[X] (RatFunc K)) 1\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inl\nK : Type u\ninst✝⁴ : CommRing K\ninst✝³ : IsDomain K\nR : Type u_1\nF : Type u_2\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : MonoidWithZeroHomClass F K[X] R[X]\nφ : F\nhφ : K[X]⁰ ≤ Submonoid.comap φ R[X]⁰\np : K[X]\nthis : 0 = ↑(algebraMap K[X] (RatFunc K)) 0 / ↑(algebraMap K[X] (RatFunc K)) 1\n⊢ ↑(map φ hφ) (↑(algebraMap K[X] (RatFunc K)) p / ↑(algebraMap K[X] (RatFunc K)) 0) =\n    ↑(algebraMap ((fun x => R[X]) p) (RatFunc R)) (↑φ p) / ↑(algebraMap ((fun x => R[X]) 0) (RatFunc R)) (↑φ 0)\n[PROOFSTEP]\nrw [map_zero, map_zero, map_zero, div_zero, div_zero, this, map_apply_div_ne_zero, map_one, map_one, div_one, map_zero,\n  map_zero]\n[GOAL]\ncase inl\nK : Type u\ninst✝⁴ : CommRing K\ninst✝³ : IsDomain K\nR : Type u_1\nF : Type u_2\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : MonoidWithZeroHomClass F K[X] R[X]\nφ : F\nhφ : K[X]⁰ ≤ Submonoid.comap φ R[X]⁰\np : K[X]\nthis : 0 = ↑(algebraMap K[X] (RatFunc K)) 0 / ↑(algebraMap K[X] (RatFunc K)) 1\n⊢ ↑(algebraMap ((fun x => R[X]) 0) (RatFunc R)) 0 / ↑(algebraMap ((fun x => R[X]) 1) (RatFunc R)) 1 = 0\ncase inl.hq\nK : Type u\ninst✝⁴ : CommRing K\ninst✝³ : IsDomain K\nR : Type u_1\nF : Type u_2\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : MonoidWithZeroHomClass F K[X] R[X]\nφ : F\nhφ : K[X]⁰ ≤ Submonoid.comap φ R[X]⁰\np : K[X]\nthis : 0 = ↑(algebraMap K[X] (RatFunc K)) 0 / ↑(algebraMap K[X] (RatFunc K)) 1\n⊢ 1 ≠ 0\n[PROOFSTEP]\nsimp only [map_zero, map_one, div_one]\n  -- porting note: this `simp` was not needed\n[GOAL]\ncase inl.hq\nK : Type u\ninst✝⁴ : CommRing K\ninst✝³ : IsDomain K\nR : Type u_1\nF : Type u_2\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : MonoidWithZeroHomClass F K[X] R[X]\nφ : F\nhφ : K[X]⁰ ≤ Submonoid.comap φ R[X]⁰\np : K[X]\nthis : 0 = ↑(algebraMap K[X] (RatFunc K)) 0 / ↑(algebraMap K[X] (RatFunc K)) 1\n⊢ 1 ≠ 0\n[PROOFSTEP]\nexact one_ne_zero\n[GOAL]\ncase inr\nK : Type u\ninst✝⁴ : CommRing K\ninst✝³ : IsDomain K\nR : Type u_1\nF : Type u_2\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : MonoidWithZeroHomClass F K[X] R[X]\nφ : F\nhφ : K[X]⁰ ≤ Submonoid.comap φ R[X]⁰\np q : K[X]\nhq : q ≠ 0\n⊢ ↑(map φ hφ) (↑(algebraMap K[X] (RatFunc K)) p / ↑(algebraMap K[X] (RatFunc K)) q) =\n    ↑(algebraMap ((fun x => R[X]) p) (RatFunc R)) (↑φ p) / ↑(algebraMap ((fun x => R[X]) q) (RatFunc R)) (↑φ q)\n[PROOFSTEP]\nexact map_apply_div_ne_zero _ _ _ _ hq\n[GOAL]\nK : Type u\ninst✝² : CommRing K\ninst✝¹ : IsDomain K\nL : Type u_1\ninst✝ : CommGroupWithZero L\nφ : K[X] →*₀ L\nhφ : K[X]⁰ ≤ Submonoid.comap φ L⁰\np q : K[X]\n⊢ ↑(liftMonoidWithZeroHom φ hφ) (↑(algebraMap K[X] (RatFunc K)) p / ↑(algebraMap K[X] (RatFunc K)) q) = ↑φ p / ↑φ q\n[PROOFSTEP]\nrcases eq_or_ne q 0 with (rfl | hq)\n[GOAL]\ncase inl\nK : Type u\ninst✝² : CommRing K\ninst✝¹ : IsDomain K\nL : Type u_1\ninst✝ : CommGroupWithZero L\nφ : K[X] →*₀ L\nhφ : K[X]⁰ ≤ Submonoid.comap φ L⁰\np : K[X]\n⊢ ↑(liftMonoidWithZeroHom φ hφ) (↑(algebraMap K[X] (RatFunc K)) p / ↑(algebraMap K[X] (RatFunc K)) 0) = ↑φ p / ↑φ 0\n[PROOFSTEP]\nsimp only [div_zero, map_zero]\n[GOAL]\ncase inr\nK : Type u\ninst✝² : CommRing K\ninst✝¹ : IsDomain K\nL : Type u_1\ninst✝ : CommGroupWithZero L\nφ : K[X] →*₀ L\nhφ : K[X]⁰ ≤ Submonoid.comap φ L⁰\np q : K[X]\nhq : q ≠ 0\n⊢ ↑(liftMonoidWithZeroHom φ hφ) (↑(algebraMap K[X] (RatFunc K)) p / ↑(algebraMap K[X] (RatFunc K)) q) = ↑φ p / ↑φ q\n[PROOFSTEP]\nsimp only [← mk_eq_div, mk_eq_localization_mk _ hq, liftMonoidWithZeroHom_apply_ofFractionRing_mk]\n[GOAL]\nK : Type u\ninst✝² : CommRing K\ninst✝¹ : IsDomain K\nL : Type u_1\ninst✝ : CommGroupWithZero L\nφ : K[X] →*₀ L\nhφ : K[X]⁰ ≤ Submonoid.comap φ L⁰\np q : K[X]\n⊢ ↑(liftMonoidWithZeroHom φ hφ) (↑(algebraMap K[X] (RatFunc K)) p) /\n      ↑(liftMonoidWithZeroHom φ hφ) (↑(algebraMap K[X] (RatFunc K)) q) =\n    ↑φ p / ↑φ q\n[PROOFSTEP]\nrw [← map_div₀, liftMonoidWithZeroHom_apply_div]\n[GOAL]\nK : Type u\ninst✝¹ : CommRing K\ninst✝ : IsDomain K\n⊢ Function.Injective ↑(algebraMap K[X] (RatFunc K))\n[PROOFSTEP]\nrw [← ofFractionRing_comp_algebraMap]\n[GOAL]\nK : Type u\ninst✝¹ : CommRing K\ninst✝ : IsDomain K\n⊢ Function.Injective (ofFractionRing ∘ ↑(algebraMap K[X] (FractionRing K[X])))\n[PROOFSTEP]\nexact ofFractionRing_injective.comp (IsFractionRing.injective _ _)\n[GOAL]\nK : Type u\ninst✝¹ : CommRing K\ninst✝ : IsDomain K\nx : K[X]\nhx : x = 0\n⊢ ↑(algebraMap K[X] (RatFunc K)) x = 0\n[PROOFSTEP]\nrw [hx, RingHom.map_zero]\n[GOAL]\nK : Type u\ninst✝⁸ : CommRing K\ninst✝⁷ : IsDomain K\nL : Type u_1\nR : Type u_2\nS : Type u_3\ninst✝⁶ : Field L\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : CommSemiring S\ninst✝² : Algebra S K[X]\ninst✝¹ : Algebra S L\ninst✝ : Algebra S R[X]\nφ✝ : K[X] →ₐ[S] L\nhφ✝ : K[X]⁰ ≤ Submonoid.comap φ✝ L⁰\nφ : K[X] →ₐ[S] R[X]\nhφ : K[X]⁰ ≤ Submonoid.comap φ R[X]⁰\nsrc✝ : RatFunc K →+* RatFunc R := mapRingHom φ hφ\nr : S\n⊢ OneHom.toFun\n      (↑↑{ toMonoidHom := ↑src✝, map_zero' := (_ : OneHom.toFun (↑↑src✝) 0 = 0),\n            map_add' :=\n              (_ :\n                ∀ (x y : RatFunc K),\n                  OneHom.toFun (↑↑src✝) (x + y) = OneHom.toFun (↑↑src✝) x + OneHom.toFun (↑↑src✝) y) })\n      (↑(algebraMap S (RatFunc K)) r) =\n    ↑(algebraMap S (RatFunc R)) r\n[PROOFSTEP]\nsimp_rw [RingHom.toFun_eq_coe, coe_mapRingHom_eq_coe_map, algebraMap_apply r, map_apply_div, map_one, AlgHom.commutes]\n[GOAL]\nK : Type u\ninst✝⁸ : CommRing K\ninst✝⁷ : IsDomain K\nL : Type u_1\nR : Type u_2\nS : Type u_3\ninst✝⁶ : Field L\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : CommSemiring S\ninst✝² : Algebra S K[X]\ninst✝¹ : Algebra S L\ninst✝ : Algebra S R[X]\nφ : K[X] →ₐ[S] L\nhφ : K[X]⁰ ≤ Submonoid.comap φ L⁰\nsrc✝ : RatFunc K →+* L := liftRingHom (↑φ) hφ\nr : S\n⊢ OneHom.toFun\n      (↑↑{ toMonoidHom := ↑src✝, map_zero' := (_ : OneHom.toFun (↑↑src✝) 0 = 0),\n            map_add' :=\n              (_ :\n                ∀ (x y : RatFunc K),\n                  OneHom.toFun (↑↑src✝) (x + y) = OneHom.toFun (↑↑src✝) x + OneHom.toFun (↑↑src✝) y) })\n      (↑(algebraMap S (RatFunc K)) r) =\n    ↑(algebraMap S L) r\n[PROOFSTEP]\nsimp_rw [RingHom.toFun_eq_coe, AlgHom.toRingHom_eq_coe, algebraMap_apply r, liftRingHom_apply_div, AlgHom.coe_toRingHom,\n  map_one, div_one, AlgHom.commutes]\n[GOAL]\nK : Type u\ninst✝¹ : CommRing K\ninst✝ : IsDomain K\ny : { x // x ∈ K[X]⁰ }\n⊢ IsUnit (↑(algebraMap K[X] (RatFunc K)) ↑y)\n[PROOFSTEP]\nrw [← ofFractionRing_algebraMap]\n[GOAL]\nK : Type u\ninst✝¹ : CommRing K\ninst✝ : IsDomain K\ny : { x // x ∈ K[X]⁰ }\n⊢ IsUnit { toFractionRing := ↑(algebraMap K[X] (FractionRing K[X])) ↑y }\n[PROOFSTEP]\nexact (toFractionRingRingEquiv K).symm.toRingHom.isUnit_map (IsLocalization.map_units _ y)\n[GOAL]\nK : Type u\ninst✝¹ : CommRing K\ninst✝ : IsDomain K\n⊢ ∀ (z : RatFunc K), ∃ x, z * ↑(algebraMap K[X] (RatFunc K)) ↑x.snd = ↑(algebraMap K[X] (RatFunc K)) x.fst\n[PROOFSTEP]\nrintro ⟨z⟩\n[GOAL]\ncase ofFractionRing\nK : Type u\ninst✝¹ : CommRing K\ninst✝ : IsDomain K\nz : FractionRing K[X]\n⊢ ∃ x, { toFractionRing := z } * ↑(algebraMap K[X] (RatFunc K)) ↑x.snd = ↑(algebraMap K[X] (RatFunc K)) x.fst\n[PROOFSTEP]\nconvert IsLocalization.surj K[X]⁰ z\n[GOAL]\ncase h.e'_2.h.a\nK : Type u\ninst✝¹ : CommRing K\ninst✝ : IsDomain K\nz : FractionRing K[X]\nx✝ : K[X] × { x // x ∈ K[X]⁰ }\n⊢ { toFractionRing := z } * ↑(algebraMap K[X] (RatFunc K)) ↑x✝.snd = ↑(algebraMap K[X] (RatFunc K)) x✝.fst ↔\n    z * ↑(algebraMap K[X] (FractionRing K[X])) ↑x✝.snd = ↑(algebraMap K[X] (FractionRing K[X])) x✝.fst\n[PROOFSTEP]\nsimp only [← ofFractionRing_algebraMap, Function.comp_apply, ← ofFractionRing_mul]\n[GOAL]\ncase h.e'_2.h.a\nK : Type u\ninst✝¹ : CommRing K\ninst✝ : IsDomain K\nz : FractionRing K[X]\nx✝ : K[X] × { x // x ∈ K[X]⁰ }\n⊢ { toFractionRing := z * ↑(algebraMap K[X] (FractionRing K[X])) ↑x✝.snd } =\n      { toFractionRing := ↑(algebraMap K[X] (FractionRing K[X])) x✝.fst } ↔\n    z * ↑(algebraMap K[X] (FractionRing K[X])) ↑x✝.snd = ↑(algebraMap K[X] (FractionRing K[X])) x✝.fst\n[PROOFSTEP]\nrw [ofFractionRing.injEq]\n  -- porting note: added\n[GOAL]\nK : Type u\ninst✝¹ : CommRing K\ninst✝ : IsDomain K\nx y : K[X]\n⊢ ↑(algebraMap K[X] (RatFunc K)) x = ↑(algebraMap K[X] (RatFunc K)) y ↔ ∃ c, ↑c * x = ↑c * y\n[PROOFSTEP]\nrw [← ofFractionRing_algebraMap, ← ofFractionRing_algebraMap]\n[GOAL]\nK : Type u\ninst✝¹ : CommRing K\ninst✝ : IsDomain K\nx y : K[X]\n⊢ { toFractionRing := ↑(algebraMap K[X] (FractionRing K[X])) x } =\n      { toFractionRing := ↑(algebraMap K[X] (FractionRing K[X])) y } ↔\n    ∃ c, ↑c * x = ↑c * y\n[PROOFSTEP]\nexact (toFractionRingRingEquiv K).symm.injective.eq_iff.trans (IsLocalization.eq_iff_exists _ _)\n[GOAL]\nK : Type u\ninst✝¹ : CommRing K\ninst✝ : IsDomain K\nP : Sort v\np q : K[X]\nf : K[X] → K[X] → P\nf0 : ∀ (p : K[X]), f p 0 = f 0 1\nH' : ∀ {p q p' q' : K[X]}, q ≠ 0 → q' ≠ 0 → q' * p = q * p' → f p q = f p' q'\nH :\n  optParam (∀ {p q p' q' : K[X]}, q ∈ K[X]⁰ → q' ∈ K[X]⁰ → q' * p = q * p' → f p q = f p' q')\n    (_ : ∀ {p q p' q' : K[X]}, q ∈ K[X]⁰ → q' ∈ K[X]⁰ → q' * p = q * p' → f p q = f p' q')\n⊢ RatFunc.liftOn (↑(algebraMap K[X] (RatFunc K)) p / ↑(algebraMap K[X] (RatFunc K)) q) f H = f p q\n[PROOFSTEP]\nrw [← mk_eq_div, liftOn_mk _ _ f f0 @H']\n[GOAL]\nK : Type u\ninst✝¹ : CommRing K\ninst✝ : IsDomain K\nP : Sort v\np q : K[X]\nf : K[X] → K[X] → P\nf0 : ∀ (p : K[X]), f p 0 = f 0 1\nH : ∀ {p q a : K[X]}, q ≠ 0 → a ≠ 0 → f (a * p) (a * q) = f p q\n⊢ RatFunc.liftOn' (↑(algebraMap K[X] (RatFunc K)) p / ↑(algebraMap K[X] (RatFunc K)) q) f H = f p q\n[PROOFSTEP]\nrw [RatFunc.liftOn', liftOn_div _ _ _ f0]\n[GOAL]\nK : Type u\ninst✝¹ : CommRing K\ninst✝ : IsDomain K\nP : Sort v\np q : K[X]\nf : K[X] → K[X] → P\nf0 : ∀ (p : K[X]), f p 0 = f 0 1\nH : ∀ {p q a : K[X]}, q ≠ 0 → a ≠ 0 → f (a * p) (a * q) = f p q\n⊢ ∀ {p q p' q' : K[X]}, q ≠ 0 → q' ≠ 0 → q' * p = q * p' → f p q = f p' q'\n[PROOFSTEP]\napply lift_on_condition_of_lift_on'_condition H\n[GOAL]\nK : Type u\ninst✝¹ : CommRing K\ninst✝ : IsDomain K\nP : RatFunc K → Prop\nx : RatFunc K\nf : ∀ (p q : K[X]), q ≠ 0 → P (↑(algebraMap K[X] (RatFunc K)) p / ↑(algebraMap K[X] (RatFunc K)) q)\np q : K[X]\nhq : q ≠ 0\n⊢ P (RatFunc.mk p q)\n[PROOFSTEP]\nsimpa using f p q hq\n[GOAL]\nK : Type u\ninst✝¹ : CommRing K\ninst✝ : IsDomain K\nx : K[X]\ny : { x // x ∈ K[X]⁰ }\n⊢ { toFractionRing := IsLocalization.mk' (FractionRing K[X]) x y } = IsLocalization.mk' (RatFunc K) x y\n[PROOFSTEP]\nrw [IsFractionRing.mk'_eq_div, IsFractionRing.mk'_eq_div, ← mk_eq_div', ← mk_eq_div]\n[GOAL]\nK : Type u\ninst✝¹ : CommRing K\ninst✝ : IsDomain K\nx✝ : FractionRing K[X]\nx : K[X] × { x // x ∈ K[X]⁰ }\n⊢ { toFractionRing := Localization.mk x.fst x.snd } =\n    ↑(IsLocalization.algEquiv K[X]⁰ (FractionRing K[X]) (RatFunc K)) (Localization.mk x.fst x.snd)\n[PROOFSTEP]\nsimp only [IsLocalization.algEquiv_apply, IsLocalization.ringEquivOfRingEquiv_apply, Localization.mk_eq_mk'_apply,\n  IsLocalization.map_mk', ofFractionRing_mk', RingEquiv.coe_toRingHom, RingEquiv.refl_apply, SetLike.eta]\n  -- porting note: added following `simp`.  The previous one can be squeezed.\n[GOAL]\nK : Type u\ninst✝¹ : CommRing K\ninst✝ : IsDomain K\nx✝ : FractionRing K[X]\nx : K[X] × { x // x ∈ K[X]⁰ }\n⊢ IsLocalization.mk' (RatFunc K) x.fst x.snd =\n    IsLocalization.mk' (RatFunc K) (↑(RingHom.id K[X]) x.fst)\n      { val := ↑(RingHom.id K[X]) ↑x.snd, property := (_ : ↑x.snd ∈ Submonoid.comap (RingHom.id K[X]) K[X]⁰) }\n[PROOFSTEP]\nsimp only [IsFractionRing.mk'_eq_div, RingHom.id_apply, Subtype.coe_eta]\n[GOAL]\nK : Type u\ninst✝¹ : CommRing K\ninst✝ : IsDomain K\nx✝¹ : RatFunc K\nx✝ : FractionRing K[X]\nx : K[X] × { x // x ∈ K[X]⁰ }\n⊢ { toFractionRing := Localization.mk x.fst x.snd }.toFractionRing =\n    ↑(IsLocalization.algEquiv K[X]⁰ (RatFunc K) (FractionRing K[X])) { toFractionRing := Localization.mk x.fst x.snd }\n[PROOFSTEP]\nsimp only [Localization.mk_eq_mk'_apply, ofFractionRing_mk', IsLocalization.algEquiv_apply,\n  IsLocalization.ringEquivOfRingEquiv_apply, IsLocalization.map_mk', RingEquiv.coe_toRingHom, RingEquiv.refl_apply,\n  SetLike.eta]\n  -- porting note: added following `simp`.  The previous one can be squeezed.\n[GOAL]\nK : Type u\ninst✝¹ : CommRing K\ninst✝ : IsDomain K\nx✝¹ : RatFunc K\nx✝ : FractionRing K[X]\nx : K[X] × { x // x ∈ K[X]⁰ }\n⊢ IsLocalization.mk' (Localization K[X]⁰) x.fst x.snd =\n    IsLocalization.mk' (FractionRing K[X]) (↑(RingHom.id K[X]) x.fst)\n      { val := ↑(RingHom.id K[X]) ↑x.snd, property := (_ : ↑x.snd ∈ Submonoid.comap (RingHom.id K[X]) K[X]⁰) }\n[PROOFSTEP]\nsimp only [IsFractionRing.mk'_eq_div, RingHom.id_apply, Subtype.coe_eta]\n[GOAL]\nK : Type u\ninst✝¹ : CommRing K\ninst✝ : IsDomain K\n⊢ RingEquiv.symm (toFractionRingRingEquiv K) =\n    AlgEquiv.toRingEquiv (IsLocalization.algEquiv K[X]⁰ (FractionRing K[X]) (RatFunc K))\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nK : Type u\ninst✝¹ : CommRing K\ninst✝ : IsDomain K\nx : FractionRing K[X]\n⊢ ↑(RingEquiv.symm (toFractionRingRingEquiv K)) x =\n    ↑(AlgEquiv.toRingEquiv (IsLocalization.algEquiv K[X]⁰ (FractionRing K[X]) (RatFunc K))) x\n[PROOFSTEP]\nsimp [toFractionRingRingEquiv, ofFractionRing_eq, AlgEquiv.coe_ringEquiv']\n[GOAL]\nK : Type u\ninst✝ : Field K\nx : RatFunc K\n⊢ ∀ {p q a : K[X]},\n    q ≠ 0 →\n      a ≠ 0 →\n        (fun p q =>\n              if q = 0 then (0, 1)\n              else\n                let r := gcd p q;\n                (↑C (leadingCoeff (q / r))⁻¹ * (p / r), ↑C (leadingCoeff (q / r))⁻¹ * (q / r)))\n            (a * p) (a * q) =\n          (fun p q =>\n              if q = 0 then (0, 1)\n              else\n                let r := gcd p q;\n                (↑C (leadingCoeff (q / r))⁻¹ * (p / r), ↑C (leadingCoeff (q / r))⁻¹ * (q / r)))\n            p q\n[PROOFSTEP]\nintros p q a hq ha\n[GOAL]\nK : Type u\ninst✝ : Field K\nx : RatFunc K\np q a : K[X]\nhq : q ≠ 0\nha : a ≠ 0\n⊢ (fun p q =>\n        if q = 0 then (0, 1)\n        else\n          let r := gcd p q;\n          (↑C (leadingCoeff (q / r))⁻¹ * (p / r), ↑C (leadingCoeff (q / r))⁻¹ * (q / r)))\n      (a * p) (a * q) =\n    (fun p q =>\n        if q = 0 then (0, 1)\n        else\n          let r := gcd p q;\n          (↑C (leadingCoeff (q / r))⁻¹ * (p / r), ↑C (leadingCoeff (q / r))⁻¹ * (q / r)))\n      p q\n[PROOFSTEP]\ndsimp\n[GOAL]\nK : Type u\ninst✝ : Field K\nx : RatFunc K\np q a : K[X]\nhq : q ≠ 0\nha : a ≠ 0\n⊢ (if a * q = 0 then (0, 1)\n    else\n      (↑C (leadingCoeff (a * q / gcd (a * p) (a * q)))⁻¹ * (a * p / gcd (a * p) (a * q)),\n        ↑C (leadingCoeff (a * q / gcd (a * p) (a * q)))⁻¹ * (a * q / gcd (a * p) (a * q)))) =\n    if q = 0 then (0, 1)\n    else (↑C (leadingCoeff (q / gcd p q))⁻¹ * (p / gcd p q), ↑C (leadingCoeff (q / gcd p q))⁻¹ * (q / gcd p q))\n[PROOFSTEP]\nrw [if_neg hq, if_neg (mul_ne_zero ha hq)]\n[GOAL]\nK : Type u\ninst✝ : Field K\nx : RatFunc K\np q a : K[X]\nhq : q ≠ 0\nha : a ≠ 0\n⊢ (↑C (leadingCoeff (a * q / gcd (a * p) (a * q)))⁻¹ * (a * p / gcd (a * p) (a * q)),\n      ↑C (leadingCoeff (a * q / gcd (a * p) (a * q)))⁻¹ * (a * q / gcd (a * p) (a * q))) =\n    (↑C (leadingCoeff (q / gcd p q))⁻¹ * (p / gcd p q), ↑C (leadingCoeff (q / gcd p q))⁻¹ * (q / gcd p q))\n[PROOFSTEP]\nhave ha' : a.leadingCoeff ≠ 0 := Polynomial.leadingCoeff_ne_zero.mpr ha\n[GOAL]\nK : Type u\ninst✝ : Field K\nx : RatFunc K\np q a : K[X]\nhq : q ≠ 0\nha : a ≠ 0\nha' : leadingCoeff a ≠ 0\n⊢ (↑C (leadingCoeff (a * q / gcd (a * p) (a * q)))⁻¹ * (a * p / gcd (a * p) (a * q)),\n      ↑C (leadingCoeff (a * q / gcd (a * p) (a * q)))⁻¹ * (a * q / gcd (a * p) (a * q))) =\n    (↑C (leadingCoeff (q / gcd p q))⁻¹ * (p / gcd p q), ↑C (leadingCoeff (q / gcd p q))⁻¹ * (q / gcd p q))\n[PROOFSTEP]\nhave hainv : a.leadingCoeff⁻¹ ≠ 0 := inv_ne_zero ha'\n[GOAL]\nK : Type u\ninst✝ : Field K\nx : RatFunc K\np q a : K[X]\nhq : q ≠ 0\nha : a ≠ 0\nha' : leadingCoeff a ≠ 0\nhainv : (leadingCoeff a)⁻¹ ≠ 0\n⊢ (↑C (leadingCoeff (a * q / gcd (a * p) (a * q)))⁻¹ * (a * p / gcd (a * p) (a * q)),\n      ↑C (leadingCoeff (a * q / gcd (a * p) (a * q)))⁻¹ * (a * q / gcd (a * p) (a * q))) =\n    (↑C (leadingCoeff (q / gcd p q))⁻¹ * (p / gcd p q), ↑C (leadingCoeff (q / gcd p q))⁻¹ * (q / gcd p q))\n[PROOFSTEP]\nsimp only [Prod.ext_iff, gcd_mul_left, normalize_apply, Polynomial.coe_normUnit, mul_assoc,\n  CommGroupWithZero.coe_normUnit _ ha']\n[GOAL]\nK : Type u\ninst✝ : Field K\nx : RatFunc K\np q a : K[X]\nhq : q ≠ 0\nha : a ≠ 0\nha' : leadingCoeff a ≠ 0\nhainv : (leadingCoeff a)⁻¹ ≠ 0\n⊢ ↑C (leadingCoeff (a * q / (↑normalize a * gcd p q)))⁻¹ * (a * p / (↑normalize a * gcd p q)) =\n      ↑C (leadingCoeff (q / gcd p q))⁻¹ * (p / gcd p q) ∧\n    ↑C (leadingCoeff (a * q / (↑normalize a * gcd p q)))⁻¹ * (a * q / (↑normalize a * gcd p q)) =\n      ↑C (leadingCoeff (q / gcd p q))⁻¹ * (q / gcd p q)\n[PROOFSTEP]\nhave hdeg : (gcd p q).degree ≤ q.degree := degree_gcd_le_right _ hq\n[GOAL]\nK : Type u\ninst✝ : Field K\nx : RatFunc K\np q a : K[X]\nhq : q ≠ 0\nha : a ≠ 0\nha' : leadingCoeff a ≠ 0\nhainv : (leadingCoeff a)⁻¹ ≠ 0\nhdeg : degree (gcd p q) ≤ degree q\n⊢ ↑C (leadingCoeff (a * q / (↑normalize a * gcd p q)))⁻¹ * (a * p / (↑normalize a * gcd p q)) =\n      ↑C (leadingCoeff (q / gcd p q))⁻¹ * (p / gcd p q) ∧\n    ↑C (leadingCoeff (a * q / (↑normalize a * gcd p q)))⁻¹ * (a * q / (↑normalize a * gcd p q)) =\n      ↑C (leadingCoeff (q / gcd p q))⁻¹ * (q / gcd p q)\n[PROOFSTEP]\nhave hdeg' : (Polynomial.C a.leadingCoeff⁻¹ * gcd p q).degree ≤ q.degree :=\n  by\n  rw [Polynomial.degree_mul, Polynomial.degree_C hainv, zero_add]\n  exact hdeg\n[GOAL]\nK : Type u\ninst✝ : Field K\nx : RatFunc K\np q a : K[X]\nhq : q ≠ 0\nha : a ≠ 0\nha' : leadingCoeff a ≠ 0\nhainv : (leadingCoeff a)⁻¹ ≠ 0\nhdeg : degree (gcd p q) ≤ degree q\n⊢ degree (↑C (leadingCoeff a)⁻¹ * gcd p q) ≤ degree q\n[PROOFSTEP]\nrw [Polynomial.degree_mul, Polynomial.degree_C hainv, zero_add]\n[GOAL]\nK : Type u\ninst✝ : Field K\nx : RatFunc K\np q a : K[X]\nhq : q ≠ 0\nha : a ≠ 0\nha' : leadingCoeff a ≠ 0\nhainv : (leadingCoeff a)⁻¹ ≠ 0\nhdeg : degree (gcd p q) ≤ degree q\n⊢ degree (gcd p q) ≤ degree q\n[PROOFSTEP]\nexact hdeg\n[GOAL]\nK : Type u\ninst✝ : Field K\nx : RatFunc K\np q a : K[X]\nhq : q ≠ 0\nha : a ≠ 0\nha' : leadingCoeff a ≠ 0\nhainv : (leadingCoeff a)⁻¹ ≠ 0\nhdeg : degree (gcd p q) ≤ degree q\nhdeg' : degree (↑C (leadingCoeff a)⁻¹ * gcd p q) ≤ degree q\n⊢ ↑C (leadingCoeff (a * q / (↑normalize a * gcd p q)))⁻¹ * (a * p / (↑normalize a * gcd p q)) =\n      ↑C (leadingCoeff (q / gcd p q))⁻¹ * (p / gcd p q) ∧\n    ↑C (leadingCoeff (a * q / (↑normalize a * gcd p q)))⁻¹ * (a * q / (↑normalize a * gcd p q)) =\n      ↑C (leadingCoeff (q / gcd p q))⁻¹ * (q / gcd p q)\n[PROOFSTEP]\nhave hdivp : Polynomial.C a.leadingCoeff⁻¹ * gcd p q ∣ p := (C_mul_dvd hainv).mpr (gcd_dvd_left p q)\n[GOAL]\nK : Type u\ninst✝ : Field K\nx : RatFunc K\np q a : K[X]\nhq : q ≠ 0\nha : a ≠ 0\nha' : leadingCoeff a ≠ 0\nhainv : (leadingCoeff a)⁻¹ ≠ 0\nhdeg : degree (gcd p q) ≤ degree q\nhdeg' : degree (↑C (leadingCoeff a)⁻¹ * gcd p q) ≤ degree q\nhdivp : ↑C (leadingCoeff a)⁻¹ * gcd p q ∣ p\n⊢ ↑C (leadingCoeff (a * q / (↑normalize a * gcd p q)))⁻¹ * (a * p / (↑normalize a * gcd p q)) =\n      ↑C (leadingCoeff (q / gcd p q))⁻¹ * (p / gcd p q) ∧\n    ↑C (leadingCoeff (a * q / (↑normalize a * gcd p q)))⁻¹ * (a * q / (↑normalize a * gcd p q)) =\n      ↑C (leadingCoeff (q / gcd p q))⁻¹ * (q / gcd p q)\n[PROOFSTEP]\nhave hdivq : Polynomial.C a.leadingCoeff⁻¹ * gcd p q ∣ q :=\n  (C_mul_dvd hainv).mpr\n    (gcd_dvd_right p q)\n      -- porting note: added `simp only [...]` and `rw [mul_assoc]`\n            -- porting note: note the unfolding of `normalize` and `normUnit`!\n[GOAL]\nK : Type u\ninst✝ : Field K\nx : RatFunc K\np q a : K[X]\nhq : q ≠ 0\nha : a ≠ 0\nha' : leadingCoeff a ≠ 0\nhainv : (leadingCoeff a)⁻¹ ≠ 0\nhdeg : degree (gcd p q) ≤ degree q\nhdeg' : degree (↑C (leadingCoeff a)⁻¹ * gcd p q) ≤ degree q\nhdivp : ↑C (leadingCoeff a)⁻¹ * gcd p q ∣ p\nhdivq : ↑C (leadingCoeff a)⁻¹ * gcd p q ∣ q\n⊢ ↑C (leadingCoeff (a * q / (↑normalize a * gcd p q)))⁻¹ * (a * p / (↑normalize a * gcd p q)) =\n      ↑C (leadingCoeff (q / gcd p q))⁻¹ * (p / gcd p q) ∧\n    ↑C (leadingCoeff (a * q / (↑normalize a * gcd p q)))⁻¹ * (a * q / (↑normalize a * gcd p q)) =\n      ↑C (leadingCoeff (q / gcd p q))⁻¹ * (q / gcd p q)\n[PROOFSTEP]\nsimp only [normalize, normUnit, coe_normUnit, leadingCoeff_eq_zero, MonoidWithZeroHom.coe_mk, ZeroHom.coe_mk, ha,\n  dite_false, Units.val_inv_eq_inv_val, Units.val_mk0]\n[GOAL]\nK : Type u\ninst✝ : Field K\nx : RatFunc K\np q a : K[X]\nhq : q ≠ 0\nha : a ≠ 0\nha' : leadingCoeff a ≠ 0\nhainv : (leadingCoeff a)⁻¹ ≠ 0\nhdeg : degree (gcd p q) ≤ degree q\nhdeg' : degree (↑C (leadingCoeff a)⁻¹ * gcd p q) ≤ degree q\nhdivp : ↑C (leadingCoeff a)⁻¹ * gcd p q ∣ p\nhdivq : ↑C (leadingCoeff a)⁻¹ * gcd p q ∣ q\n⊢ ↑C (leadingCoeff (a * q / (a * ↑C (leadingCoeff a)⁻¹ * gcd p q)))⁻¹ *\n        (a * p / (a * ↑C (leadingCoeff a)⁻¹ * gcd p q)) =\n      ↑C (leadingCoeff (q / gcd p q))⁻¹ * (p / gcd p q) ∧\n    ↑C (leadingCoeff (a * q / (a * ↑C (leadingCoeff a)⁻¹ * gcd p q)))⁻¹ *\n        (a * q / (a * ↑C (leadingCoeff a)⁻¹ * gcd p q)) =\n      ↑C (leadingCoeff (q / gcd p q))⁻¹ * (q / gcd p q)\n[PROOFSTEP]\nrw [mul_assoc]\n[GOAL]\nK : Type u\ninst✝ : Field K\nx : RatFunc K\np q a : K[X]\nhq : q ≠ 0\nha : a ≠ 0\nha' : leadingCoeff a ≠ 0\nhainv : (leadingCoeff a)⁻¹ ≠ 0\nhdeg : degree (gcd p q) ≤ degree q\nhdeg' : degree (↑C (leadingCoeff a)⁻¹ * gcd p q) ≤ degree q\nhdivp : ↑C (leadingCoeff a)⁻¹ * gcd p q ∣ p\nhdivq : ↑C (leadingCoeff a)⁻¹ * gcd p q ∣ q\n⊢ ↑C (leadingCoeff (a * q / (a * (↑C (leadingCoeff a)⁻¹ * gcd p q))))⁻¹ *\n        (a * p / (a * (↑C (leadingCoeff a)⁻¹ * gcd p q))) =\n      ↑C (leadingCoeff (q / gcd p q))⁻¹ * (p / gcd p q) ∧\n    ↑C (leadingCoeff (a * q / (a * (↑C (leadingCoeff a)⁻¹ * gcd p q))))⁻¹ *\n        (a * q / (a * (↑C (leadingCoeff a)⁻¹ * gcd p q))) =\n      ↑C (leadingCoeff (q / gcd p q))⁻¹ * (q / gcd p q)\n[PROOFSTEP]\nrw [EuclideanDomain.mul_div_mul_cancel ha hdivp, EuclideanDomain.mul_div_mul_cancel ha hdivq, leadingCoeff_div hdeg,\n  leadingCoeff_div hdeg', Polynomial.leadingCoeff_mul, Polynomial.leadingCoeff_C, div_C_mul, div_C_mul, ← mul_assoc, ←\n  Polynomial.C_mul, ← mul_assoc, ← Polynomial.C_mul]\n[GOAL]\nK : Type u\ninst✝ : Field K\nx : RatFunc K\np q a : K[X]\nhq : q ≠ 0\nha : a ≠ 0\nha' : leadingCoeff a ≠ 0\nhainv : (leadingCoeff a)⁻¹ ≠ 0\nhdeg : degree (gcd p q) ≤ degree q\nhdeg' : degree (↑C (leadingCoeff a)⁻¹ * gcd p q) ≤ degree q\nhdivp : ↑C (leadingCoeff a)⁻¹ * gcd p q ∣ p\nhdivq : ↑C (leadingCoeff a)⁻¹ * gcd p q ∣ q\n⊢ ↑C ((leadingCoeff q / ((leadingCoeff a)⁻¹ * leadingCoeff (gcd p q)))⁻¹ * (leadingCoeff a)⁻¹⁻¹) * (p / gcd p q) =\n      ↑C (leadingCoeff q / leadingCoeff (gcd p q))⁻¹ * (p / gcd p q) ∧\n    ↑C ((leadingCoeff q / ((leadingCoeff a)⁻¹ * leadingCoeff (gcd p q)))⁻¹ * (leadingCoeff a)⁻¹⁻¹) * (q / gcd p q) =\n      ↑C (leadingCoeff q / leadingCoeff (gcd p q))⁻¹ * (q / gcd p q)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase left\nK : Type u\ninst✝ : Field K\nx : RatFunc K\np q a : K[X]\nhq : q ≠ 0\nha : a ≠ 0\nha' : leadingCoeff a ≠ 0\nhainv : (leadingCoeff a)⁻¹ ≠ 0\nhdeg : degree (gcd p q) ≤ degree q\nhdeg' : degree (↑C (leadingCoeff a)⁻¹ * gcd p q) ≤ degree q\nhdivp : ↑C (leadingCoeff a)⁻¹ * gcd p q ∣ p\nhdivq : ↑C (leadingCoeff a)⁻¹ * gcd p q ∣ q\n⊢ ↑C ((leadingCoeff q / ((leadingCoeff a)⁻¹ * leadingCoeff (gcd p q)))⁻¹ * (leadingCoeff a)⁻¹⁻¹) * (p / gcd p q) =\n    ↑C (leadingCoeff q / leadingCoeff (gcd p q))⁻¹ * (p / gcd p q)\n[PROOFSTEP]\ncongr\n[GOAL]\ncase right\nK : Type u\ninst✝ : Field K\nx : RatFunc K\np q a : K[X]\nhq : q ≠ 0\nha : a ≠ 0\nha' : leadingCoeff a ≠ 0\nhainv : (leadingCoeff a)⁻¹ ≠ 0\nhdeg : degree (gcd p q) ≤ degree q\nhdeg' : degree (↑C (leadingCoeff a)⁻¹ * gcd p q) ≤ degree q\nhdivp : ↑C (leadingCoeff a)⁻¹ * gcd p q ∣ p\nhdivq : ↑C (leadingCoeff a)⁻¹ * gcd p q ∣ q\n⊢ ↑C ((leadingCoeff q / ((leadingCoeff a)⁻¹ * leadingCoeff (gcd p q)))⁻¹ * (leadingCoeff a)⁻¹⁻¹) * (q / gcd p q) =\n    ↑C (leadingCoeff q / leadingCoeff (gcd p q))⁻¹ * (q / gcd p q)\n[PROOFSTEP]\ncongr\n[GOAL]\ncase left.e_a.h.e_6.h\nK : Type u\ninst✝ : Field K\nx : RatFunc K\np q a : K[X]\nhq : q ≠ 0\nha : a ≠ 0\nha' : leadingCoeff a ≠ 0\nhainv : (leadingCoeff a)⁻¹ ≠ 0\nhdeg : degree (gcd p q) ≤ degree q\nhdeg' : degree (↑C (leadingCoeff a)⁻¹ * gcd p q) ≤ degree q\nhdivp : ↑C (leadingCoeff a)⁻¹ * gcd p q ∣ p\nhdivq : ↑C (leadingCoeff a)⁻¹ * gcd p q ∣ q\n⊢ (leadingCoeff q / ((leadingCoeff a)⁻¹ * leadingCoeff (gcd p q)))⁻¹ * (leadingCoeff a)⁻¹⁻¹ =\n    (leadingCoeff q / leadingCoeff (gcd p q))⁻¹\n[PROOFSTEP]\nrw [inv_div, mul_comm, mul_div_assoc, ← mul_assoc, inv_inv, _root_.mul_inv_cancel ha', one_mul, inv_div]\n[GOAL]\ncase right.e_a.h.e_6.h\nK : Type u\ninst✝ : Field K\nx : RatFunc K\np q a : K[X]\nhq : q ≠ 0\nha : a ≠ 0\nha' : leadingCoeff a ≠ 0\nhainv : (leadingCoeff a)⁻¹ ≠ 0\nhdeg : degree (gcd p q) ≤ degree q\nhdeg' : degree (↑C (leadingCoeff a)⁻¹ * gcd p q) ≤ degree q\nhdivp : ↑C (leadingCoeff a)⁻¹ * gcd p q ∣ p\nhdivq : ↑C (leadingCoeff a)⁻¹ * gcd p q ∣ q\n⊢ (leadingCoeff q / ((leadingCoeff a)⁻¹ * leadingCoeff (gcd p q)))⁻¹ * (leadingCoeff a)⁻¹⁻¹ =\n    (leadingCoeff q / leadingCoeff (gcd p q))⁻¹\n[PROOFSTEP]\nrw [inv_div, mul_comm, mul_div_assoc, ← mul_assoc, inv_inv, _root_.mul_inv_cancel ha', one_mul, inv_div]\n[GOAL]\nK : Type u\ninst✝ : Field K\np q : K[X]\nhq : q ≠ 0\n⊢ numDenom (↑(algebraMap K[X] (RatFunc K)) p / ↑(algebraMap K[X] (RatFunc K)) q) =\n    (↑C (leadingCoeff (q / gcd p q))⁻¹ * (p / gcd p q), ↑C (leadingCoeff (q / gcd p q))⁻¹ * (q / gcd p q))\n[PROOFSTEP]\nrw [numDenom, liftOn'_div, if_neg hq]\n[GOAL]\ncase f0\nK : Type u\ninst✝ : Field K\np q : K[X]\nhq : q ≠ 0\n⊢ ∀ (p : K[X]),\n    (if 0 = 0 then (0, 1)\n      else\n        let r := gcd p 0;\n        (↑C (leadingCoeff (0 / r))⁻¹ * (p / r), ↑C (leadingCoeff (0 / r))⁻¹ * (0 / r))) =\n      if 1 = 0 then (0, 1)\n      else\n        let r := gcd 0 1;\n        (↑C (leadingCoeff (1 / r))⁻¹ * (0 / r), ↑C (leadingCoeff (1 / r))⁻¹ * (1 / r))\n[PROOFSTEP]\nintro p\n[GOAL]\ncase f0\nK : Type u\ninst✝ : Field K\np✝ q : K[X]\nhq : q ≠ 0\np : K[X]\n⊢ (if 0 = 0 then (0, 1)\n    else\n      let r := gcd p 0;\n      (↑C (leadingCoeff (0 / r))⁻¹ * (p / r), ↑C (leadingCoeff (0 / r))⁻¹ * (0 / r))) =\n    if 1 = 0 then (0, 1)\n    else\n      let r := gcd 0 1;\n      (↑C (leadingCoeff (1 / r))⁻¹ * (0 / r), ↑C (leadingCoeff (1 / r))⁻¹ * (1 / r))\n[PROOFSTEP]\nrw [if_pos rfl, if_neg (one_ne_zero' K[X])]\n[GOAL]\ncase f0\nK : Type u\ninst✝ : Field K\np✝ q : K[X]\nhq : q ≠ 0\np : K[X]\n⊢ (0, 1) =\n    let r := gcd 0 1;\n    (↑C (leadingCoeff (1 / r))⁻¹ * (0 / r), ↑C (leadingCoeff (1 / r))⁻¹ * (1 / r))\n[PROOFSTEP]\nsimp\n[GOAL]\nK : Type u\ninst✝ : Field K\np q : K[X]\nhq : q ≠ 0\n⊢ num (↑(algebraMap K[X] (RatFunc K)) p / ↑(algebraMap K[X] (RatFunc K)) q) =\n    ↑C (leadingCoeff (q / gcd p q))⁻¹ * (p / gcd p q)\n[PROOFSTEP]\nrw [num, numDenom_div _ hq]\n[GOAL]\nK : Type u\ninst✝ : Field K\n⊢ num 0 = 0\n[PROOFSTEP]\nconvert num_div' (0 : K[X]) one_ne_zero\n[GOAL]\ncase h.e'_2.h.e'_3\nK : Type u\ninst✝ : Field K\n⊢ 0 = ↑(algebraMap K[X] (RatFunc K)) 0 / ↑(algebraMap K[X] (RatFunc K)) 1\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.e'_3\nK : Type u\ninst✝ : Field K\n⊢ 0 = ↑C (leadingCoeff (1 / gcd 0 1))⁻¹ * (0 / gcd 0 1)\n[PROOFSTEP]\nsimp\n[GOAL]\nK : Type u\ninst✝ : Field K\np q : K[X]\n⊢ num (↑(algebraMap K[X] (RatFunc K)) p / ↑(algebraMap K[X] (RatFunc K)) q) =\n    ↑C (leadingCoeff (q / gcd p q))⁻¹ * (p / gcd p q)\n[PROOFSTEP]\nby_cases hq : q = 0\n[GOAL]\ncase pos\nK : Type u\ninst✝ : Field K\np q : K[X]\nhq : q = 0\n⊢ num (↑(algebraMap K[X] (RatFunc K)) p / ↑(algebraMap K[X] (RatFunc K)) q) =\n    ↑C (leadingCoeff (q / gcd p q))⁻¹ * (p / gcd p q)\n[PROOFSTEP]\nsimp [hq]\n[GOAL]\ncase neg\nK : Type u\ninst✝ : Field K\np q : K[X]\nhq : ¬q = 0\n⊢ num (↑(algebraMap K[X] (RatFunc K)) p / ↑(algebraMap K[X] (RatFunc K)) q) =\n    ↑C (leadingCoeff (q / gcd p q))⁻¹ * (p / gcd p q)\n[PROOFSTEP]\nexact num_div' p hq\n[GOAL]\nK : Type u\ninst✝ : Field K\n⊢ num 1 = 1\n[PROOFSTEP]\nconvert num_div (1 : K[X]) 1\n[GOAL]\ncase h.e'_2.h.e'_3\nK : Type u\ninst✝ : Field K\n⊢ 1 = ↑(algebraMap K[X] (RatFunc K)) 1 / ↑(algebraMap K[X] (RatFunc K)) 1\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.e'_3\nK : Type u\ninst✝ : Field K\n⊢ 1 = ↑C (leadingCoeff (1 / gcd 1 1))⁻¹ * (1 / gcd 1 1)\n[PROOFSTEP]\nsimp\n[GOAL]\nK : Type u\ninst✝ : Field K\np : K[X]\n⊢ num (↑(algebraMap K[X] (RatFunc K)) p) = p\n[PROOFSTEP]\nconvert num_div p 1\n[GOAL]\ncase h.e'_2.h.e'_3\nK : Type u\ninst✝ : Field K\np : K[X]\n⊢ ↑(algebraMap K[X] (RatFunc K)) p = ↑(algebraMap K[X] (RatFunc K)) p / ↑(algebraMap K[X] (RatFunc K)) 1\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.e'_3\nK : Type u\ninst✝ : Field K\np : K[X]\n⊢ p = ↑C (leadingCoeff (1 / gcd p 1))⁻¹ * (p / gcd p 1)\n[PROOFSTEP]\nsimp\n[GOAL]\nK : Type u\ninst✝ : Field K\np q : K[X]\nhq : q ≠ 0\n⊢ num (↑(algebraMap K[X] (RatFunc K)) p / ↑(algebraMap K[X] (RatFunc K)) q) ∣ p\n[PROOFSTEP]\nrw [num_div _ q, C_mul_dvd]\n[GOAL]\nK : Type u\ninst✝ : Field K\np q : K[X]\nhq : q ≠ 0\n⊢ p / gcd p q ∣ p\n[PROOFSTEP]\nexact EuclideanDomain.div_dvd_of_dvd (gcd_dvd_left p q)\n[GOAL]\nK : Type u\ninst✝ : Field K\np q : K[X]\nhq : q ≠ 0\n⊢ (leadingCoeff (q / gcd p q))⁻¹ ≠ 0\n[PROOFSTEP]\nsimpa only [Ne.def, inv_eq_zero, Polynomial.leadingCoeff_eq_zero] using right_div_gcd_ne_zero hq\n[GOAL]\nK : Type u\ninst✝ : Field K\np q : K[X]\nhq : q ≠ 0\n⊢ ↑C (leadingCoeff (q / gcd p q))⁻¹ * (p / gcd p q) ∣ p\n[PROOFSTEP]\nsimpa using num_div_dvd p hq\n[GOAL]\nK : Type u\ninst✝ : Field K\np q : K[X]\nhq : q ≠ 0\n⊢ denom (↑(algebraMap K[X] (RatFunc K)) p / ↑(algebraMap K[X] (RatFunc K)) q) =\n    ↑C (leadingCoeff (q / gcd p q))⁻¹ * (q / gcd p q)\n[PROOFSTEP]\nrw [denom, numDenom_div _ hq]\n[GOAL]\nK : Type u\ninst✝ : Field K\nx : RatFunc K\n⊢ Monic (denom x)\n[PROOFSTEP]\ninduction x using RatFunc.induction_on with\n| f p q hq =>\n  rw [denom_div p hq, mul_comm]\n  exact Polynomial.monic_mul_leadingCoeff_inv (right_div_gcd_ne_zero hq)\n[GOAL]\nK : Type u\ninst✝ : Field K\nx : RatFunc K\n⊢ Monic (denom x)\n[PROOFSTEP]\ninduction x using RatFunc.induction_on with\n| f p q hq =>\n  rw [denom_div p hq, mul_comm]\n  exact Polynomial.monic_mul_leadingCoeff_inv (right_div_gcd_ne_zero hq)\n[GOAL]\ncase f\nK : Type u\ninst✝ : Field K\np q : K[X]\nhq : q ≠ 0\n⊢ Monic (denom (↑(algebraMap K[X] (RatFunc K)) p / ↑(algebraMap K[X] (RatFunc K)) q))\n[PROOFSTEP]\n\n| f p q hq =>\n  rw [denom_div p hq, mul_comm]\n  exact Polynomial.monic_mul_leadingCoeff_inv (right_div_gcd_ne_zero hq)\n[GOAL]\ncase f\nK : Type u\ninst✝ : Field K\np q : K[X]\nhq : q ≠ 0\n⊢ Monic (denom (↑(algebraMap K[X] (RatFunc K)) p / ↑(algebraMap K[X] (RatFunc K)) q))\n[PROOFSTEP]\nrw [denom_div p hq, mul_comm]\n[GOAL]\ncase f\nK : Type u\ninst✝ : Field K\np q : K[X]\nhq : q ≠ 0\n⊢ Monic (q / gcd p q * ↑C (leadingCoeff (q / gcd p q))⁻¹)\n[PROOFSTEP]\nexact Polynomial.monic_mul_leadingCoeff_inv (right_div_gcd_ne_zero hq)\n[GOAL]\nK : Type u\ninst✝ : Field K\n⊢ denom 0 = 1\n[PROOFSTEP]\nconvert denom_div (0 : K[X]) one_ne_zero\n[GOAL]\ncase h.e'_2.h.e'_3\nK : Type u\ninst✝ : Field K\n⊢ 0 = ↑(algebraMap K[X] (RatFunc K)) 0 / ↑(algebraMap K[X] (RatFunc K)) 1\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.e'_3\nK : Type u\ninst✝ : Field K\n⊢ 1 = ↑C (leadingCoeff (1 / gcd 0 1))⁻¹ * (1 / gcd 0 1)\n[PROOFSTEP]\nsimp\n[GOAL]\nK : Type u\ninst✝ : Field K\n⊢ denom 1 = 1\n[PROOFSTEP]\nconvert denom_div (1 : K[X]) one_ne_zero\n[GOAL]\ncase h.e'_2.h.e'_3\nK : Type u\ninst✝ : Field K\n⊢ 1 = ↑(algebraMap K[X] (RatFunc K)) 1 / ↑(algebraMap K[X] (RatFunc K)) 1\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.e'_3\nK : Type u\ninst✝ : Field K\n⊢ 1 = ↑C (leadingCoeff (1 / gcd 1 1))⁻¹ * (1 / gcd 1 1)\n[PROOFSTEP]\nsimp\n[GOAL]\nK : Type u\ninst✝ : Field K\np : K[X]\n⊢ denom (↑(algebraMap K[X] (RatFunc K)) p) = 1\n[PROOFSTEP]\nconvert denom_div p one_ne_zero\n[GOAL]\ncase h.e'_2.h.e'_3\nK : Type u\ninst✝ : Field K\np : K[X]\n⊢ ↑(algebraMap K[X] (RatFunc K)) p = ↑(algebraMap K[X] (RatFunc K)) p / ↑(algebraMap K[X] (RatFunc K)) 1\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.e'_3\nK : Type u\ninst✝ : Field K\np : K[X]\n⊢ 1 = ↑C (leadingCoeff (1 / gcd p 1))⁻¹ * (1 / gcd p 1)\n[PROOFSTEP]\nsimp\n[GOAL]\nK : Type u\ninst✝ : Field K\np q : K[X]\n⊢ denom (↑(algebraMap K[X] (RatFunc K)) p / ↑(algebraMap K[X] (RatFunc K)) q) ∣ q\n[PROOFSTEP]\nby_cases hq : q = 0\n[GOAL]\ncase pos\nK : Type u\ninst✝ : Field K\np q : K[X]\nhq : q = 0\n⊢ denom (↑(algebraMap K[X] (RatFunc K)) p / ↑(algebraMap K[X] (RatFunc K)) q) ∣ q\n[PROOFSTEP]\nsimp [hq]\n[GOAL]\ncase neg\nK : Type u\ninst✝ : Field K\np q : K[X]\nhq : ¬q = 0\n⊢ denom (↑(algebraMap K[X] (RatFunc K)) p / ↑(algebraMap K[X] (RatFunc K)) q) ∣ q\n[PROOFSTEP]\nrw [denom_div _ hq, C_mul_dvd]\n[GOAL]\ncase neg\nK : Type u\ninst✝ : Field K\np q : K[X]\nhq : ¬q = 0\n⊢ q / gcd p q ∣ q\n[PROOFSTEP]\nexact EuclideanDomain.div_dvd_of_dvd (gcd_dvd_right p q)\n[GOAL]\ncase neg\nK : Type u\ninst✝ : Field K\np q : K[X]\nhq : ¬q = 0\n⊢ (leadingCoeff (q / gcd p q))⁻¹ ≠ 0\n[PROOFSTEP]\nsimpa only [Ne.def, inv_eq_zero, Polynomial.leadingCoeff_eq_zero] using right_div_gcd_ne_zero hq\n[GOAL]\nK : Type u\ninst✝ : Field K\nx : RatFunc K\n⊢ ↑(algebraMap K[X] (RatFunc K)) (num x) / ↑(algebraMap K[X] (RatFunc K)) (denom x) = x\n[PROOFSTEP]\ninduction' x using RatFunc.induction_on with p q hq\n[GOAL]\ncase f\nK : Type u\ninst✝ : Field K\np q : K[X]\nhq : q ≠ 0\n⊢ ↑(algebraMap K[X] (RatFunc K)) (num (↑(algebraMap K[X] (RatFunc K)) p / ↑(algebraMap K[X] (RatFunc K)) q)) /\n      ↑(algebraMap K[X] (RatFunc K)) (denom (↑(algebraMap K[X] (RatFunc K)) p / ↑(algebraMap K[X] (RatFunc K)) q)) =\n    ↑(algebraMap K[X] (RatFunc K)) p / ↑(algebraMap K[X] (RatFunc K)) q\n[PROOFSTEP]\nhave q_div_ne_zero : q / gcd p q ≠ 0 := right_div_gcd_ne_zero hq\n[GOAL]\ncase f\nK : Type u\ninst✝ : Field K\np q : K[X]\nhq : q ≠ 0\nq_div_ne_zero : q / gcd p q ≠ 0\n⊢ ↑(algebraMap K[X] (RatFunc K)) (num (↑(algebraMap K[X] (RatFunc K)) p / ↑(algebraMap K[X] (RatFunc K)) q)) /\n      ↑(algebraMap K[X] (RatFunc K)) (denom (↑(algebraMap K[X] (RatFunc K)) p / ↑(algebraMap K[X] (RatFunc K)) q)) =\n    ↑(algebraMap K[X] (RatFunc K)) p / ↑(algebraMap K[X] (RatFunc K)) q\n[PROOFSTEP]\ndsimp only\n[GOAL]\ncase f\nK : Type u\ninst✝ : Field K\np q : K[X]\nhq : q ≠ 0\nq_div_ne_zero : q / gcd p q ≠ 0\n⊢ ↑(algebraMap K[X] (RatFunc K)) (num (↑(algebraMap K[X] (RatFunc K)) p / ↑(algebraMap K[X] (RatFunc K)) q)) /\n      ↑(algebraMap K[X] (RatFunc K)) (denom (↑(algebraMap K[X] (RatFunc K)) p / ↑(algebraMap K[X] (RatFunc K)) q)) =\n    ↑(algebraMap K[X] (RatFunc K)) p / ↑(algebraMap K[X] (RatFunc K)) q\n[PROOFSTEP]\nrw [num_div p q, denom_div p hq, RingHom.map_mul, RingHom.map_mul, mul_div_mul_left, div_eq_div_iff, ← RingHom.map_mul,\n  ← RingHom.map_mul, mul_comm _ q, ← EuclideanDomain.mul_div_assoc, ← EuclideanDomain.mul_div_assoc, mul_comm]\n[GOAL]\ncase f.h\nK : Type u\ninst✝ : Field K\np q : K[X]\nhq : q ≠ 0\nq_div_ne_zero : q / gcd p q ≠ 0\n⊢ gcd p q ∣ q\n[PROOFSTEP]\napply gcd_dvd_right\n[GOAL]\ncase f.h\nK : Type u\ninst✝ : Field K\np q : K[X]\nhq : q ≠ 0\nq_div_ne_zero : q / gcd p q ≠ 0\n⊢ gcd p q ∣ p\n[PROOFSTEP]\napply gcd_dvd_left\n[GOAL]\ncase f.hb\nK : Type u\ninst✝ : Field K\np q : K[X]\nhq : q ≠ 0\nq_div_ne_zero : q / gcd p q ≠ 0\n⊢ ↑(algebraMap K[X] (RatFunc K)) (q / gcd p q) ≠ 0\n[PROOFSTEP]\nexact algebraMap_ne_zero q_div_ne_zero\n[GOAL]\ncase f.hd\nK : Type u\ninst✝ : Field K\np q : K[X]\nhq : q ≠ 0\nq_div_ne_zero : q / gcd p q ≠ 0\n⊢ ↑(algebraMap K[X] (RatFunc K)) q ≠ 0\n[PROOFSTEP]\nexact algebraMap_ne_zero hq\n[GOAL]\ncase f.hc\nK : Type u\ninst✝ : Field K\np q : K[X]\nhq : q ≠ 0\nq_div_ne_zero : q / gcd p q ≠ 0\n⊢ ↑(algebraMap K[X] (RatFunc K)) (↑C (leadingCoeff (q / gcd p q))⁻¹) ≠ 0\n[PROOFSTEP]\nrefine' algebraMap_ne_zero (mt Polynomial.C_eq_zero.mp _)\n[GOAL]\ncase f.hc\nK : Type u\ninst✝ : Field K\np q : K[X]\nhq : q ≠ 0\nq_div_ne_zero : q / gcd p q ≠ 0\n⊢ ¬(leadingCoeff (q / gcd p q))⁻¹ = 0\n[PROOFSTEP]\nexact inv_ne_zero (Polynomial.leadingCoeff_ne_zero.mpr q_div_ne_zero)\n[GOAL]\nK : Type u\ninst✝ : Field K\nx : RatFunc K\n⊢ IsCoprime (num x) (denom x)\n[PROOFSTEP]\ninduction' x using RatFunc.induction_on with p q hq\n[GOAL]\ncase f\nK : Type u\ninst✝ : Field K\np q : K[X]\nhq : q ≠ 0\n⊢ IsCoprime (num (↑(algebraMap K[X] (RatFunc K)) p / ↑(algebraMap K[X] (RatFunc K)) q))\n    (denom (↑(algebraMap K[X] (RatFunc K)) p / ↑(algebraMap K[X] (RatFunc K)) q))\n[PROOFSTEP]\nrw [num_div, denom_div _ hq]\n[GOAL]\ncase f\nK : Type u\ninst✝ : Field K\np q : K[X]\nhq : q ≠ 0\n⊢ IsCoprime (↑C (leadingCoeff (q / gcd p q))⁻¹ * (p / gcd p q)) (↑C (leadingCoeff (q / gcd p q))⁻¹ * (q / gcd p q))\n[PROOFSTEP]\nexact\n  (isCoprime_mul_unit_left ((leadingCoeff_ne_zero.2 <| right_div_gcd_ne_zero hq).isUnit.inv.map C) _ _).2\n    (isCoprime_div_gcd_div_gcd hq)\n[GOAL]\nK : Type u\ninst✝ : Field K\nx : RatFunc K\nh : num x = 0\n⊢ x = 0\n[PROOFSTEP]\nrw [← num_div_denom x, h, RingHom.map_zero, zero_div]\n[GOAL]\nK : Type u\ninst✝ : Field K\nx : RatFunc K\np q : K[X]\nhq : q ≠ 0\n⊢ num x * q = p * denom x ↔ x = ↑(algebraMap K[X] (RatFunc K)) p / ↑(algebraMap K[X] (RatFunc K)) q\n[PROOFSTEP]\nrw [← (algebraMap_injective K).eq_iff, eq_div_iff (algebraMap_ne_zero hq)]\n[GOAL]\nK : Type u\ninst✝ : Field K\nx : RatFunc K\np q : K[X]\nhq : q ≠ 0\n⊢ ↑(algebraMap K[X] (RatFunc K)) (num x * q) = ↑(algebraMap K[X] (RatFunc K)) (p * denom x) ↔\n    x * ↑(algebraMap K[X] (RatFunc K)) q = ↑(algebraMap K[X] (RatFunc K)) p\n[PROOFSTEP]\nconv_rhs => rw [← num_div_denom x]\n[GOAL]\nK : Type u\ninst✝ : Field K\nx : RatFunc K\np q : K[X]\nhq : q ≠ 0\n| x * ↑(algebraMap K[X] (RatFunc K)) q = ↑(algebraMap K[X] (RatFunc K)) p\n[PROOFSTEP]\nrw [← num_div_denom x]\n[GOAL]\nK : Type u\ninst✝ : Field K\nx : RatFunc K\np q : K[X]\nhq : q ≠ 0\n| x * ↑(algebraMap K[X] (RatFunc K)) q = ↑(algebraMap K[X] (RatFunc K)) p\n[PROOFSTEP]\nrw [← num_div_denom x]\n[GOAL]\nK : Type u\ninst✝ : Field K\nx : RatFunc K\np q : K[X]\nhq : q ≠ 0\n| x * ↑(algebraMap K[X] (RatFunc K)) q = ↑(algebraMap K[X] (RatFunc K)) p\n[PROOFSTEP]\nrw [← num_div_denom x]\n[GOAL]\nK : Type u\ninst✝ : Field K\nx : RatFunc K\np q : K[X]\nhq : q ≠ 0\n⊢ ↑(algebraMap K[X] (RatFunc K)) (num x * q) = ↑(algebraMap K[X] (RatFunc K)) (p * denom x) ↔\n    ↑(algebraMap K[X] (RatFunc K)) (num x) / ↑(algebraMap K[X] (RatFunc K)) (denom x) *\n        ↑(algebraMap K[X] (RatFunc K)) q =\n      ↑(algebraMap K[X] (RatFunc K)) p\n[PROOFSTEP]\nrw [RingHom.map_mul, RingHom.map_mul, div_eq_mul_inv, mul_assoc, mul_comm (Inv.inv _), ← mul_assoc, ← div_eq_mul_inv,\n  div_eq_iff]\n[GOAL]\nK : Type u\ninst✝ : Field K\nx : RatFunc K\np q : K[X]\nhq : q ≠ 0\n⊢ ↑(algebraMap K[X] (RatFunc K)) (denom x) ≠ 0\n[PROOFSTEP]\nexact algebraMap_ne_zero (denom_ne_zero x)\n[GOAL]\nK : Type u\ninst✝ : Field K\nx y : RatFunc K\n⊢ x + y =\n    ↑(algebraMap K[X] (RatFunc K)) (num x * denom y + denom x * num y) /\n      ↑(algebraMap K[X] (RatFunc K)) (denom x * denom y)\n[PROOFSTEP]\nconv_lhs => rw [← num_div_denom x, ← num_div_denom y]\n[GOAL]\nK : Type u\ninst✝ : Field K\nx y : RatFunc K\n| x + y\n[PROOFSTEP]\nrw [← num_div_denom x, ← num_div_denom y]\n[GOAL]\nK : Type u\ninst✝ : Field K\nx y : RatFunc K\n| x + y\n[PROOFSTEP]\nrw [← num_div_denom x, ← num_div_denom y]\n[GOAL]\nK : Type u\ninst✝ : Field K\nx y : RatFunc K\n| x + y\n[PROOFSTEP]\nrw [← num_div_denom x, ← num_div_denom y]\n[GOAL]\nK : Type u\ninst✝ : Field K\nx y : RatFunc K\n⊢ ↑(algebraMap K[X] (RatFunc K)) (num x) / ↑(algebraMap K[X] (RatFunc K)) (denom x) +\n      ↑(algebraMap K[X] (RatFunc K)) (num y) / ↑(algebraMap K[X] (RatFunc K)) (denom y) =\n    ↑(algebraMap K[X] (RatFunc K)) (num x * denom y + denom x * num y) /\n      ↑(algebraMap K[X] (RatFunc K)) (denom x * denom y)\n[PROOFSTEP]\nrw [div_add_div, RingHom.map_mul, RingHom.map_add, RingHom.map_mul, RingHom.map_mul]\n[GOAL]\ncase hb\nK : Type u\ninst✝ : Field K\nx y : RatFunc K\n⊢ ↑(algebraMap K[X] (RatFunc K)) (denom x) ≠ 0\n[PROOFSTEP]\nexact algebraMap_ne_zero (denom_ne_zero x)\n[GOAL]\ncase hd\nK : Type u\ninst✝ : Field K\nx y : RatFunc K\n⊢ ↑(algebraMap K[X] (RatFunc K)) (denom y) ≠ 0\n[PROOFSTEP]\nexact algebraMap_ne_zero (denom_ne_zero y)\n[GOAL]\nK : Type u\ninst✝ : Field K\nx : RatFunc K\n⊢ num (-x) * denom x = -num x * denom (-x)\n[PROOFSTEP]\nrw [num_mul_eq_mul_denom_iff (denom_ne_zero x), _root_.map_neg, neg_div, num_div_denom]\n[GOAL]\nK : Type u\ninst✝ : Field K\nx y : RatFunc K\n⊢ x * y = ↑(algebraMap K[X] (RatFunc K)) (num x * num y) / ↑(algebraMap K[X] (RatFunc K)) (denom x * denom y)\n[PROOFSTEP]\nconv_lhs => rw [← num_div_denom x, ← num_div_denom y, div_mul_div_comm, ← RingHom.map_mul, ← RingHom.map_mul]\n[GOAL]\nK : Type u\ninst✝ : Field K\nx y : RatFunc K\n| x * y\n[PROOFSTEP]\nrw [← num_div_denom x, ← num_div_denom y, div_mul_div_comm, ← RingHom.map_mul, ← RingHom.map_mul]\n[GOAL]\nK : Type u\ninst✝ : Field K\nx y : RatFunc K\n| x * y\n[PROOFSTEP]\nrw [← num_div_denom x, ← num_div_denom y, div_mul_div_comm, ← RingHom.map_mul, ← RingHom.map_mul]\n[GOAL]\nK : Type u\ninst✝ : Field K\nx y : RatFunc K\n| x * y\n[PROOFSTEP]\nrw [← num_div_denom x, ← num_div_denom y, div_mul_div_comm, ← RingHom.map_mul, ← RingHom.map_mul]\n[GOAL]\nK : Type u\ninst✝ : Field K\nx : RatFunc K\np : K[X]\nhp : p ≠ 0\n⊢ num x ∣ p ↔ ∃ q hq, x = ↑(algebraMap K[X] (RatFunc K)) p / ↑(algebraMap K[X] (RatFunc K)) q\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nK : Type u\ninst✝ : Field K\nx : RatFunc K\np : K[X]\nhp : p ≠ 0\n⊢ num x ∣ p → ∃ q hq, x = ↑(algebraMap K[X] (RatFunc K)) p / ↑(algebraMap K[X] (RatFunc K)) q\n[PROOFSTEP]\nrintro ⟨q, rfl⟩\n[GOAL]\ncase mp.intro\nK : Type u\ninst✝ : Field K\nx : RatFunc K\nq : K[X]\nhp : num x * q ≠ 0\n⊢ ∃ q_1 hq, x = ↑(algebraMap K[X] (RatFunc K)) (num x * q) / ↑(algebraMap K[X] (RatFunc K)) q_1\n[PROOFSTEP]\nobtain ⟨_hx, hq⟩ := mul_ne_zero_iff.mp hp\n[GOAL]\ncase mp.intro.intro\nK : Type u\ninst✝ : Field K\nx : RatFunc K\nq : K[X]\nhp : num x * q ≠ 0\n_hx : num x ≠ 0\nhq : q ≠ 0\n⊢ ∃ q_1 hq, x = ↑(algebraMap K[X] (RatFunc K)) (num x * q) / ↑(algebraMap K[X] (RatFunc K)) q_1\n[PROOFSTEP]\nuse denom x * q\n[GOAL]\ncase h\nK : Type u\ninst✝ : Field K\nx : RatFunc K\nq : K[X]\nhp : num x * q ≠ 0\n_hx : num x ≠ 0\nhq : q ≠ 0\n⊢ ∃ hq, x = ↑(algebraMap K[X] (RatFunc K)) (num x * q) / ↑(algebraMap K[X] (RatFunc K)) (denom x * q)\n[PROOFSTEP]\nrw [RingHom.map_mul, RingHom.map_mul, ← div_mul_div_comm, div_self, mul_one, num_div_denom]\n[GOAL]\ncase h\nK : Type u\ninst✝ : Field K\nx : RatFunc K\nq : K[X]\nhp : num x * q ≠ 0\n_hx : num x ≠ 0\nhq : q ≠ 0\n⊢ ∃ hq, x = x\n[PROOFSTEP]\nexact ⟨mul_ne_zero (denom_ne_zero x) hq, rfl⟩\n[GOAL]\ncase h\nK : Type u\ninst✝ : Field K\nx : RatFunc K\nq : K[X]\nhp : num x * q ≠ 0\n_hx : num x ≠ 0\nhq : q ≠ 0\n⊢ ↑(algebraMap K[X] (RatFunc K)) q ≠ 0\n[PROOFSTEP]\nexact algebraMap_ne_zero hq\n[GOAL]\ncase mpr\nK : Type u\ninst✝ : Field K\nx : RatFunc K\np : K[X]\nhp : p ≠ 0\n⊢ (∃ q hq, x = ↑(algebraMap K[X] (RatFunc K)) p / ↑(algebraMap K[X] (RatFunc K)) q) → num x ∣ p\n[PROOFSTEP]\nrintro ⟨q, hq, rfl⟩\n[GOAL]\ncase mpr.intro.intro\nK : Type u\ninst✝ : Field K\np : K[X]\nhp : p ≠ 0\nq : K[X]\nhq : q ≠ 0\n⊢ num (↑(algebraMap K[X] (RatFunc K)) p / ↑(algebraMap K[X] (RatFunc K)) q) ∣ p\n[PROOFSTEP]\nexact num_div_dvd p hq\n[GOAL]\nK : Type u\ninst✝ : Field K\nx : RatFunc K\nq : K[X]\nhq : q ≠ 0\n⊢ denom x ∣ q ↔ ∃ p, x = ↑(algebraMap K[X] (RatFunc K)) p / ↑(algebraMap K[X] (RatFunc K)) q\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nK : Type u\ninst✝ : Field K\nx : RatFunc K\nq : K[X]\nhq : q ≠ 0\n⊢ denom x ∣ q → ∃ p, x = ↑(algebraMap K[X] (RatFunc K)) p / ↑(algebraMap K[X] (RatFunc K)) q\n[PROOFSTEP]\nrintro ⟨p, rfl⟩\n[GOAL]\ncase mp.intro\nK : Type u\ninst✝ : Field K\nx : RatFunc K\np : K[X]\nhq : denom x * p ≠ 0\n⊢ ∃ p_1, x = ↑(algebraMap K[X] (RatFunc K)) p_1 / ↑(algebraMap K[X] (RatFunc K)) (denom x * p)\n[PROOFSTEP]\nobtain ⟨_hx, hp⟩ := mul_ne_zero_iff.mp hq\n[GOAL]\ncase mp.intro.intro\nK : Type u\ninst✝ : Field K\nx : RatFunc K\np : K[X]\nhq : denom x * p ≠ 0\n_hx : denom x ≠ 0\nhp : p ≠ 0\n⊢ ∃ p_1, x = ↑(algebraMap K[X] (RatFunc K)) p_1 / ↑(algebraMap K[X] (RatFunc K)) (denom x * p)\n[PROOFSTEP]\nuse num x * p\n[GOAL]\ncase h\nK : Type u\ninst✝ : Field K\nx : RatFunc K\np : K[X]\nhq : denom x * p ≠ 0\n_hx : denom x ≠ 0\nhp : p ≠ 0\n⊢ x = ↑(algebraMap K[X] (RatFunc K)) (num x * p) / ↑(algebraMap K[X] (RatFunc K)) (denom x * p)\n[PROOFSTEP]\nrw [RingHom.map_mul, RingHom.map_mul, ← div_mul_div_comm, div_self, mul_one, num_div_denom]\n[GOAL]\ncase h\nK : Type u\ninst✝ : Field K\nx : RatFunc K\np : K[X]\nhq : denom x * p ≠ 0\n_hx : denom x ≠ 0\nhp : p ≠ 0\n⊢ ↑(algebraMap K[X] (RatFunc K)) p ≠ 0\n[PROOFSTEP]\nexact algebraMap_ne_zero hp\n[GOAL]\ncase mpr\nK : Type u\ninst✝ : Field K\nx : RatFunc K\nq : K[X]\nhq : q ≠ 0\n⊢ (∃ p, x = ↑(algebraMap K[X] (RatFunc K)) p / ↑(algebraMap K[X] (RatFunc K)) q) → denom x ∣ q\n[PROOFSTEP]\nrintro ⟨p, rfl⟩\n[GOAL]\ncase mpr.intro\nK : Type u\ninst✝ : Field K\nq : K[X]\nhq : q ≠ 0\np : K[X]\n⊢ denom (↑(algebraMap K[X] (RatFunc K)) p / ↑(algebraMap K[X] (RatFunc K)) q) ∣ q\n[PROOFSTEP]\nexact denom_div_dvd p q\n[GOAL]\nK : Type u\ninst✝ : Field K\nx y : RatFunc K\n⊢ num (x * y) ∣ num x * num y\n[PROOFSTEP]\nby_cases hx : x = 0\n[GOAL]\ncase pos\nK : Type u\ninst✝ : Field K\nx y : RatFunc K\nhx : x = 0\n⊢ num (x * y) ∣ num x * num y\n[PROOFSTEP]\nsimp [hx]\n[GOAL]\ncase neg\nK : Type u\ninst✝ : Field K\nx y : RatFunc K\nhx : ¬x = 0\n⊢ num (x * y) ∣ num x * num y\n[PROOFSTEP]\nby_cases hy : y = 0\n[GOAL]\ncase pos\nK : Type u\ninst✝ : Field K\nx y : RatFunc K\nhx : ¬x = 0\nhy : y = 0\n⊢ num (x * y) ∣ num x * num y\n[PROOFSTEP]\nsimp [hy]\n[GOAL]\ncase neg\nK : Type u\ninst✝ : Field K\nx y : RatFunc K\nhx : ¬x = 0\nhy : ¬y = 0\n⊢ num (x * y) ∣ num x * num y\n[PROOFSTEP]\nrw [num_dvd (mul_ne_zero (num_ne_zero hx) (num_ne_zero hy))]\n[GOAL]\ncase neg\nK : Type u\ninst✝ : Field K\nx y : RatFunc K\nhx : ¬x = 0\nhy : ¬y = 0\n⊢ ∃ q hq, x * y = ↑(algebraMap K[X] (RatFunc K)) (num x * num y) / ↑(algebraMap K[X] (RatFunc K)) q\n[PROOFSTEP]\nrefine' ⟨x.denom * y.denom, mul_ne_zero (denom_ne_zero x) (denom_ne_zero y), _⟩\n[GOAL]\ncase neg\nK : Type u\ninst✝ : Field K\nx y : RatFunc K\nhx : ¬x = 0\nhy : ¬y = 0\n⊢ x * y = ↑(algebraMap K[X] (RatFunc K)) (num x * num y) / ↑(algebraMap K[X] (RatFunc K)) (denom x * denom y)\n[PROOFSTEP]\nrw [RingHom.map_mul, RingHom.map_mul, ← div_mul_div_comm, num_div_denom, num_div_denom]\n[GOAL]\nK : Type u\ninst✝ : Field K\nx y : RatFunc K\n⊢ denom (x * y) ∣ denom x * denom y\n[PROOFSTEP]\nrw [denom_dvd (mul_ne_zero (denom_ne_zero x) (denom_ne_zero y))]\n[GOAL]\nK : Type u\ninst✝ : Field K\nx y : RatFunc K\n⊢ ∃ p, x * y = ↑(algebraMap K[X] (RatFunc K)) p / ↑(algebraMap K[X] (RatFunc K)) (denom x * denom y)\n[PROOFSTEP]\nrefine' ⟨x.num * y.num, _⟩\n[GOAL]\nK : Type u\ninst✝ : Field K\nx y : RatFunc K\n⊢ x * y = ↑(algebraMap K[X] (RatFunc K)) (num x * num y) / ↑(algebraMap K[X] (RatFunc K)) (denom x * denom y)\n[PROOFSTEP]\nrw [RingHom.map_mul, RingHom.map_mul, ← div_mul_div_comm, num_div_denom, num_div_denom]\n[GOAL]\nK : Type u\ninst✝ : Field K\nx y : RatFunc K\n⊢ denom (x + y) ∣ denom x * denom y\n[PROOFSTEP]\nrw [denom_dvd (mul_ne_zero (denom_ne_zero x) (denom_ne_zero y))]\n[GOAL]\nK : Type u\ninst✝ : Field K\nx y : RatFunc K\n⊢ ∃ p, x + y = ↑(algebraMap K[X] (RatFunc K)) p / ↑(algebraMap K[X] (RatFunc K)) (denom x * denom y)\n[PROOFSTEP]\nrefine' ⟨x.num * y.denom + x.denom * y.num, _⟩\n[GOAL]\nK : Type u\ninst✝ : Field K\nx y : RatFunc K\n⊢ x + y =\n    ↑(algebraMap K[X] (RatFunc K)) (num x * denom y + denom x * num y) /\n      ↑(algebraMap K[X] (RatFunc K)) (denom x * denom y)\n[PROOFSTEP]\nrw [RingHom.map_mul, RingHom.map_add, RingHom.map_mul, RingHom.map_mul, ← div_add_div, num_div_denom, num_div_denom]\n[GOAL]\ncase hb\nK : Type u\ninst✝ : Field K\nx y : RatFunc K\n⊢ ↑(algebraMap K[X] (RatFunc K)) (denom x) ≠ 0\n[PROOFSTEP]\nexact algebraMap_ne_zero (denom_ne_zero x)\n[GOAL]\ncase hd\nK : Type u\ninst✝ : Field K\nx y : RatFunc K\n⊢ ↑(algebraMap K[X] (RatFunc K)) (denom y) ≠ 0\n[PROOFSTEP]\nexact algebraMap_ne_zero (denom_ne_zero y)\n[GOAL]\nK : Type u\ninst✝³ : Field K\nR : Type u_1\nF : Type u_2\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : MonoidHomClass F K[X] R[X]\nφ : F\nhφ : K[X]⁰ ≤ Submonoid.comap φ R[X]⁰\nf : RatFunc K\n⊢ ↑(map φ hφ) f =\n    ↑(algebraMap ((fun x => R[X]) (num f)) (RatFunc R)) (↑φ (num f)) /\n      ↑(algebraMap ((fun x => R[X]) (denom f)) (RatFunc R)) (↑φ (denom f))\n[PROOFSTEP]\nrw [← num_div_denom f, map_apply_div_ne_zero, num_div_denom f]\n[GOAL]\ncase hq\nK : Type u\ninst✝³ : Field K\nR : Type u_1\nF : Type u_2\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\ninst✝ : MonoidHomClass F K[X] R[X]\nφ : F\nhφ : K[X]⁰ ≤ Submonoid.comap φ R[X]⁰\nf : RatFunc K\n⊢ denom f ≠ 0\n[PROOFSTEP]\nexact denom_ne_zero _\n[GOAL]\nK : Type u\ninst✝¹ : Field K\nL : Type u_1\ninst✝ : CommGroupWithZero L\nφ : K[X] →*₀ L\nhφ : K[X]⁰ ≤ Submonoid.comap φ L⁰\nf : RatFunc K\n⊢ ↑(liftMonoidWithZeroHom φ hφ) f = ↑φ (num f) / ↑φ (denom f)\n[PROOFSTEP]\nrw [← num_div_denom f, liftMonoidWithZeroHom_apply_div, num_div_denom]\n[GOAL]\nK : Type u\ninst✝ : Field K\nx y : RatFunc K\nhxy : x + y ≠ 0\n⊢ num x * denom y + denom x * num y ≠ 0\n[PROOFSTEP]\nintro h_zero\n[GOAL]\nK : Type u\ninst✝ : Field K\nx y : RatFunc K\nhxy : x + y ≠ 0\nh_zero : num x * denom y + denom x * num y = 0\n⊢ False\n[PROOFSTEP]\nhave h := num_denom_add x y\n[GOAL]\nK : Type u\ninst✝ : Field K\nx y : RatFunc K\nhxy : x + y ≠ 0\nh_zero : num x * denom y + denom x * num y = 0\nh : num (x + y) * (denom x * denom y) = (num x * denom y + denom x * num y) * denom (x + y)\n⊢ False\n[PROOFSTEP]\nrw [h_zero, zero_mul] at h \n[GOAL]\nK : Type u\ninst✝ : Field K\nx y : RatFunc K\nhxy : x + y ≠ 0\nh_zero : num x * denom y + denom x * num y = 0\nh : num (x + y) * (denom x * denom y) = 0\n⊢ False\n[PROOFSTEP]\nexact (mul_ne_zero (num_ne_zero hxy) (mul_ne_zero x.denom_ne_zero y.denom_ne_zero)) h\n[GOAL]\nK : Type u\ninst✝¹ : CommRing K\ninst✝ : IsDomain K\nr : K\nx : RatFunc K\n⊢ r • x = ↑C r * x\n[PROOFSTEP]\nrw [Algebra.smul_def, algebraMap_eq_C]\n[GOAL]\nK : Type u\ninst✝¹ : Field K\nL : Type u_1\ninst✝ : Field L\nf : K →+* L\na : L\nx : RatFunc K\nh : Polynomial.eval₂ f a (denom x) = 0\n⊢ eval f a x = 0\n[PROOFSTEP]\nrw [eval, h, div_zero]\n[GOAL]\nK : Type u\ninst✝¹ : Field K\nL : Type u_1\ninst✝ : Field L\nf : K →+* L\na : L\nc : K\n⊢ eval f a (↑C c) = ↑f c\n[PROOFSTEP]\nsimp [eval]\n[GOAL]\nK : Type u\ninst✝¹ : Field K\nL : Type u_1\ninst✝ : Field L\nf : K →+* L\na : L\n⊢ eval f a X = a\n[PROOFSTEP]\nsimp [eval]\n[GOAL]\nK : Type u\ninst✝¹ : Field K\nL : Type u_1\ninst✝ : Field L\nf : K →+* L\na : L\n⊢ eval f a 0 = 0\n[PROOFSTEP]\nsimp [eval]\n[GOAL]\nK : Type u\ninst✝¹ : Field K\nL : Type u_1\ninst✝ : Field L\nf : K →+* L\na : L\n⊢ eval f a 1 = 1\n[PROOFSTEP]\nsimp [eval]\n[GOAL]\nK : Type u\ninst✝³ : Field K\nL : Type u_1\ninst✝² : Field L\nf : K →+* L\na : L\nS : Type u_2\ninst✝¹ : CommSemiring S\ninst✝ : Algebra S K[X]\np : S\n⊢ eval f a (↑(algebraMap S (RatFunc K)) p) = Polynomial.eval₂ f a (↑(algebraMap S K[X]) p)\n[PROOFSTEP]\nsimp [eval, IsScalarTower.algebraMap_apply S K[X] (RatFunc K)]\n[GOAL]\nK : Type u\ninst✝¹ : Field K\nL : Type u_1\ninst✝ : Field L\nf : K →+* L\na : L\nx y : RatFunc K\nhx : Polynomial.eval₂ f a (denom x) ≠ 0\nhy : Polynomial.eval₂ f a (denom y) ≠ 0\n⊢ eval f a (x + y) = eval f a x + eval f a y\n[PROOFSTEP]\nunfold eval\n[GOAL]\nK : Type u\ninst✝¹ : Field K\nL : Type u_1\ninst✝ : Field L\nf : K →+* L\na : L\nx y : RatFunc K\nhx : Polynomial.eval₂ f a (denom x) ≠ 0\nhy : Polynomial.eval₂ f a (denom y) ≠ 0\n⊢ Polynomial.eval₂ f a (num (x + y)) / Polynomial.eval₂ f a (denom (x + y)) =\n    Polynomial.eval₂ f a (num x) / Polynomial.eval₂ f a (denom x) +\n      Polynomial.eval₂ f a (num y) / Polynomial.eval₂ f a (denom y)\n[PROOFSTEP]\nby_cases hxy : Polynomial.eval₂ f a (denom (x + y)) = 0\n[GOAL]\ncase pos\nK : Type u\ninst✝¹ : Field K\nL : Type u_1\ninst✝ : Field L\nf : K →+* L\na : L\nx y : RatFunc K\nhx : Polynomial.eval₂ f a (denom x) ≠ 0\nhy : Polynomial.eval₂ f a (denom y) ≠ 0\nhxy : Polynomial.eval₂ f a (denom (x + y)) = 0\n⊢ Polynomial.eval₂ f a (num (x + y)) / Polynomial.eval₂ f a (denom (x + y)) =\n    Polynomial.eval₂ f a (num x) / Polynomial.eval₂ f a (denom x) +\n      Polynomial.eval₂ f a (num y) / Polynomial.eval₂ f a (denom y)\n[PROOFSTEP]\nhave := Polynomial.eval₂_eq_zero_of_dvd_of_eval₂_eq_zero f a (denom_add_dvd x y) hxy\n[GOAL]\ncase pos\nK : Type u\ninst✝¹ : Field K\nL : Type u_1\ninst✝ : Field L\nf : K →+* L\na : L\nx y : RatFunc K\nhx : Polynomial.eval₂ f a (denom x) ≠ 0\nhy : Polynomial.eval₂ f a (denom y) ≠ 0\nhxy : Polynomial.eval₂ f a (denom (x + y)) = 0\nthis : Polynomial.eval₂ f a (denom x * denom y) = 0\n⊢ Polynomial.eval₂ f a (num (x + y)) / Polynomial.eval₂ f a (denom (x + y)) =\n    Polynomial.eval₂ f a (num x) / Polynomial.eval₂ f a (denom x) +\n      Polynomial.eval₂ f a (num y) / Polynomial.eval₂ f a (denom y)\n[PROOFSTEP]\nrw [Polynomial.eval₂_mul] at this \n[GOAL]\ncase pos\nK : Type u\ninst✝¹ : Field K\nL : Type u_1\ninst✝ : Field L\nf : K →+* L\na : L\nx y : RatFunc K\nhx : Polynomial.eval₂ f a (denom x) ≠ 0\nhy : Polynomial.eval₂ f a (denom y) ≠ 0\nhxy : Polynomial.eval₂ f a (denom (x + y)) = 0\nthis : Polynomial.eval₂ f a (denom x) * Polynomial.eval₂ f a (denom y) = 0\n⊢ Polynomial.eval₂ f a (num (x + y)) / Polynomial.eval₂ f a (denom (x + y)) =\n    Polynomial.eval₂ f a (num x) / Polynomial.eval₂ f a (denom x) +\n      Polynomial.eval₂ f a (num y) / Polynomial.eval₂ f a (denom y)\n[PROOFSTEP]\ncases mul_eq_zero.mp this\n[GOAL]\ncase pos.inl\nK : Type u\ninst✝¹ : Field K\nL : Type u_1\ninst✝ : Field L\nf : K →+* L\na : L\nx y : RatFunc K\nhx : Polynomial.eval₂ f a (denom x) ≠ 0\nhy : Polynomial.eval₂ f a (denom y) ≠ 0\nhxy : Polynomial.eval₂ f a (denom (x + y)) = 0\nthis : Polynomial.eval₂ f a (denom x) * Polynomial.eval₂ f a (denom y) = 0\nh✝ : Polynomial.eval₂ f a (denom x) = 0\n⊢ Polynomial.eval₂ f a (num (x + y)) / Polynomial.eval₂ f a (denom (x + y)) =\n    Polynomial.eval₂ f a (num x) / Polynomial.eval₂ f a (denom x) +\n      Polynomial.eval₂ f a (num y) / Polynomial.eval₂ f a (denom y)\n[PROOFSTEP]\ncontradiction\n[GOAL]\ncase pos.inr\nK : Type u\ninst✝¹ : Field K\nL : Type u_1\ninst✝ : Field L\nf : K →+* L\na : L\nx y : RatFunc K\nhx : Polynomial.eval₂ f a (denom x) ≠ 0\nhy : Polynomial.eval₂ f a (denom y) ≠ 0\nhxy : Polynomial.eval₂ f a (denom (x + y)) = 0\nthis : Polynomial.eval₂ f a (denom x) * Polynomial.eval₂ f a (denom y) = 0\nh✝ : Polynomial.eval₂ f a (denom y) = 0\n⊢ Polynomial.eval₂ f a (num (x + y)) / Polynomial.eval₂ f a (denom (x + y)) =\n    Polynomial.eval₂ f a (num x) / Polynomial.eval₂ f a (denom x) +\n      Polynomial.eval₂ f a (num y) / Polynomial.eval₂ f a (denom y)\n[PROOFSTEP]\ncontradiction\n[GOAL]\ncase neg\nK : Type u\ninst✝¹ : Field K\nL : Type u_1\ninst✝ : Field L\nf : K →+* L\na : L\nx y : RatFunc K\nhx : Polynomial.eval₂ f a (denom x) ≠ 0\nhy : Polynomial.eval₂ f a (denom y) ≠ 0\nhxy : ¬Polynomial.eval₂ f a (denom (x + y)) = 0\n⊢ Polynomial.eval₂ f a (num (x + y)) / Polynomial.eval₂ f a (denom (x + y)) =\n    Polynomial.eval₂ f a (num x) / Polynomial.eval₂ f a (denom x) +\n      Polynomial.eval₂ f a (num y) / Polynomial.eval₂ f a (denom y)\n[PROOFSTEP]\nrw [div_add_div _ _ hx hy, eq_div_iff (mul_ne_zero hx hy), div_eq_mul_inv, mul_right_comm, ← div_eq_mul_inv,\n  div_eq_iff hxy]\n[GOAL]\ncase neg\nK : Type u\ninst✝¹ : Field K\nL : Type u_1\ninst✝ : Field L\nf : K →+* L\na : L\nx y : RatFunc K\nhx : Polynomial.eval₂ f a (denom x) ≠ 0\nhy : Polynomial.eval₂ f a (denom y) ≠ 0\nhxy : ¬Polynomial.eval₂ f a (denom (x + y)) = 0\n⊢ Polynomial.eval₂ f a (num (x + y)) * (Polynomial.eval₂ f a (denom x) * Polynomial.eval₂ f a (denom y)) =\n    (Polynomial.eval₂ f a (num x) * Polynomial.eval₂ f a (denom y) +\n        Polynomial.eval₂ f a (denom x) * Polynomial.eval₂ f a (num y)) *\n      Polynomial.eval₂ f a (denom (x + y))\n[PROOFSTEP]\nsimp only [← Polynomial.eval₂_mul, ← Polynomial.eval₂_add]\n[GOAL]\ncase neg\nK : Type u\ninst✝¹ : Field K\nL : Type u_1\ninst✝ : Field L\nf : K →+* L\na : L\nx y : RatFunc K\nhx : Polynomial.eval₂ f a (denom x) ≠ 0\nhy : Polynomial.eval₂ f a (denom y) ≠ 0\nhxy : ¬Polynomial.eval₂ f a (denom (x + y)) = 0\n⊢ Polynomial.eval₂ f a (num (x + y) * (denom x * denom y)) =\n    Polynomial.eval₂ f a ((num x * denom y + denom x * num y) * denom (x + y))\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase neg.e_p\nK : Type u\ninst✝¹ : Field K\nL : Type u_1\ninst✝ : Field L\nf : K →+* L\na : L\nx y : RatFunc K\nhx : Polynomial.eval₂ f a (denom x) ≠ 0\nhy : Polynomial.eval₂ f a (denom y) ≠ 0\nhxy : ¬Polynomial.eval₂ f a (denom (x + y)) = 0\n⊢ num (x + y) * (denom x * denom y) = (num x * denom y + denom x * num y) * denom (x + y)\n[PROOFSTEP]\napply num_denom_add\n[GOAL]\nK : Type u\ninst✝¹ : Field K\nL : Type u_1\ninst✝ : Field L\nf : K →+* L\na : L\nx y : RatFunc K\nhx : Polynomial.eval₂ f a (denom x) ≠ 0\nhy : Polynomial.eval₂ f a (denom y) ≠ 0\n⊢ eval f a (x * y) = eval f a x * eval f a y\n[PROOFSTEP]\nunfold eval\n[GOAL]\nK : Type u\ninst✝¹ : Field K\nL : Type u_1\ninst✝ : Field L\nf : K →+* L\na : L\nx y : RatFunc K\nhx : Polynomial.eval₂ f a (denom x) ≠ 0\nhy : Polynomial.eval₂ f a (denom y) ≠ 0\n⊢ Polynomial.eval₂ f a (num (x * y)) / Polynomial.eval₂ f a (denom (x * y)) =\n    Polynomial.eval₂ f a (num x) / Polynomial.eval₂ f a (denom x) *\n      (Polynomial.eval₂ f a (num y) / Polynomial.eval₂ f a (denom y))\n[PROOFSTEP]\nby_cases hxy : Polynomial.eval₂ f a (denom (x * y)) = 0\n[GOAL]\ncase pos\nK : Type u\ninst✝¹ : Field K\nL : Type u_1\ninst✝ : Field L\nf : K →+* L\na : L\nx y : RatFunc K\nhx : Polynomial.eval₂ f a (denom x) ≠ 0\nhy : Polynomial.eval₂ f a (denom y) ≠ 0\nhxy : Polynomial.eval₂ f a (denom (x * y)) = 0\n⊢ Polynomial.eval₂ f a (num (x * y)) / Polynomial.eval₂ f a (denom (x * y)) =\n    Polynomial.eval₂ f a (num x) / Polynomial.eval₂ f a (denom x) *\n      (Polynomial.eval₂ f a (num y) / Polynomial.eval₂ f a (denom y))\n[PROOFSTEP]\nhave := Polynomial.eval₂_eq_zero_of_dvd_of_eval₂_eq_zero f a (denom_mul_dvd x y) hxy\n[GOAL]\ncase pos\nK : Type u\ninst✝¹ : Field K\nL : Type u_1\ninst✝ : Field L\nf : K →+* L\na : L\nx y : RatFunc K\nhx : Polynomial.eval₂ f a (denom x) ≠ 0\nhy : Polynomial.eval₂ f a (denom y) ≠ 0\nhxy : Polynomial.eval₂ f a (denom (x * y)) = 0\nthis : Polynomial.eval₂ f a (denom x * denom y) = 0\n⊢ Polynomial.eval₂ f a (num (x * y)) / Polynomial.eval₂ f a (denom (x * y)) =\n    Polynomial.eval₂ f a (num x) / Polynomial.eval₂ f a (denom x) *\n      (Polynomial.eval₂ f a (num y) / Polynomial.eval₂ f a (denom y))\n[PROOFSTEP]\nrw [Polynomial.eval₂_mul] at this \n[GOAL]\ncase pos\nK : Type u\ninst✝¹ : Field K\nL : Type u_1\ninst✝ : Field L\nf : K →+* L\na : L\nx y : RatFunc K\nhx : Polynomial.eval₂ f a (denom x) ≠ 0\nhy : Polynomial.eval₂ f a (denom y) ≠ 0\nhxy : Polynomial.eval₂ f a (denom (x * y)) = 0\nthis : Polynomial.eval₂ f a (denom x) * Polynomial.eval₂ f a (denom y) = 0\n⊢ Polynomial.eval₂ f a (num (x * y)) / Polynomial.eval₂ f a (denom (x * y)) =\n    Polynomial.eval₂ f a (num x) / Polynomial.eval₂ f a (denom x) *\n      (Polynomial.eval₂ f a (num y) / Polynomial.eval₂ f a (denom y))\n[PROOFSTEP]\ncases mul_eq_zero.mp this\n[GOAL]\ncase pos.inl\nK : Type u\ninst✝¹ : Field K\nL : Type u_1\ninst✝ : Field L\nf : K →+* L\na : L\nx y : RatFunc K\nhx : Polynomial.eval₂ f a (denom x) ≠ 0\nhy : Polynomial.eval₂ f a (denom y) ≠ 0\nhxy : Polynomial.eval₂ f a (denom (x * y)) = 0\nthis : Polynomial.eval₂ f a (denom x) * Polynomial.eval₂ f a (denom y) = 0\nh✝ : Polynomial.eval₂ f a (denom x) = 0\n⊢ Polynomial.eval₂ f a (num (x * y)) / Polynomial.eval₂ f a (denom (x * y)) =\n    Polynomial.eval₂ f a (num x) / Polynomial.eval₂ f a (denom x) *\n      (Polynomial.eval₂ f a (num y) / Polynomial.eval₂ f a (denom y))\n[PROOFSTEP]\ncontradiction\n[GOAL]\ncase pos.inr\nK : Type u\ninst✝¹ : Field K\nL : Type u_1\ninst✝ : Field L\nf : K →+* L\na : L\nx y : RatFunc K\nhx : Polynomial.eval₂ f a (denom x) ≠ 0\nhy : Polynomial.eval₂ f a (denom y) ≠ 0\nhxy : Polynomial.eval₂ f a (denom (x * y)) = 0\nthis : Polynomial.eval₂ f a (denom x) * Polynomial.eval₂ f a (denom y) = 0\nh✝ : Polynomial.eval₂ f a (denom y) = 0\n⊢ Polynomial.eval₂ f a (num (x * y)) / Polynomial.eval₂ f a (denom (x * y)) =\n    Polynomial.eval₂ f a (num x) / Polynomial.eval₂ f a (denom x) *\n      (Polynomial.eval₂ f a (num y) / Polynomial.eval₂ f a (denom y))\n[PROOFSTEP]\ncontradiction\n[GOAL]\ncase neg\nK : Type u\ninst✝¹ : Field K\nL : Type u_1\ninst✝ : Field L\nf : K →+* L\na : L\nx y : RatFunc K\nhx : Polynomial.eval₂ f a (denom x) ≠ 0\nhy : Polynomial.eval₂ f a (denom y) ≠ 0\nhxy : ¬Polynomial.eval₂ f a (denom (x * y)) = 0\n⊢ Polynomial.eval₂ f a (num (x * y)) / Polynomial.eval₂ f a (denom (x * y)) =\n    Polynomial.eval₂ f a (num x) / Polynomial.eval₂ f a (denom x) *\n      (Polynomial.eval₂ f a (num y) / Polynomial.eval₂ f a (denom y))\n[PROOFSTEP]\nrw [div_mul_div_comm, eq_div_iff (mul_ne_zero hx hy), div_eq_mul_inv, mul_right_comm, ← div_eq_mul_inv, div_eq_iff hxy]\n[GOAL]\ncase neg\nK : Type u\ninst✝¹ : Field K\nL : Type u_1\ninst✝ : Field L\nf : K →+* L\na : L\nx y : RatFunc K\nhx : Polynomial.eval₂ f a (denom x) ≠ 0\nhy : Polynomial.eval₂ f a (denom y) ≠ 0\nhxy : ¬Polynomial.eval₂ f a (denom (x * y)) = 0\n⊢ Polynomial.eval₂ f a (num (x * y)) * (Polynomial.eval₂ f a (denom x) * Polynomial.eval₂ f a (denom y)) =\n    Polynomial.eval₂ f a (num x) * Polynomial.eval₂ f a (num y) * Polynomial.eval₂ f a (denom (x * y))\n[PROOFSTEP]\nsimp only [← Polynomial.eval₂_mul]\n  -- porting note: was `repeat' rw [← Polynomial.eval₂_mul]`\n[GOAL]\ncase neg\nK : Type u\ninst✝¹ : Field K\nL : Type u_1\ninst✝ : Field L\nf : K →+* L\na : L\nx y : RatFunc K\nhx : Polynomial.eval₂ f a (denom x) ≠ 0\nhy : Polynomial.eval₂ f a (denom y) ≠ 0\nhxy : ¬Polynomial.eval₂ f a (denom (x * y)) = 0\n⊢ Polynomial.eval₂ f a (num (x * y) * (denom x * denom y)) = Polynomial.eval₂ f a (num x * num y * denom (x * y))\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase neg.e_p\nK : Type u\ninst✝¹ : Field K\nL : Type u_1\ninst✝ : Field L\nf : K →+* L\na : L\nx y : RatFunc K\nhx : Polynomial.eval₂ f a (denom x) ≠ 0\nhy : Polynomial.eval₂ f a (denom y) ≠ 0\nhxy : ¬Polynomial.eval₂ f a (denom (x * y)) = 0\n⊢ num (x * y) * (denom x * denom y) = num x * num y * denom (x * y)\n[PROOFSTEP]\napply num_denom_mul\n[GOAL]\nK : Type u\ninst✝ : Field K\n⊢ intDegree 0 = 0\n[PROOFSTEP]\nrw [intDegree, num_zero, natDegree_zero, denom_zero, natDegree_one, sub_self]\n[GOAL]\nK : Type u\ninst✝ : Field K\n⊢ intDegree 1 = 0\n[PROOFSTEP]\nrw [intDegree, num_one, denom_one, sub_self]\n[GOAL]\nK : Type u\ninst✝ : Field K\nk : K\n⊢ intDegree (↑C k) = 0\n[PROOFSTEP]\nrw [intDegree, num_C, natDegree_C, denom_C, natDegree_one, sub_self]\n[GOAL]\nK : Type u\ninst✝ : Field K\n⊢ intDegree X = 1\n[PROOFSTEP]\nrw [intDegree, RatFunc.num_X, Polynomial.natDegree_X, RatFunc.denom_X, Polynomial.natDegree_one, Int.ofNat_one,\n  Int.ofNat_zero, sub_zero]\n[GOAL]\nK : Type u\ninst✝ : Field K\np : K[X]\n⊢ intDegree (↑(algebraMap K[X] (RatFunc K)) p) = ↑(natDegree p)\n[PROOFSTEP]\nrw [intDegree, RatFunc.num_algebraMap, RatFunc.denom_algebraMap, Polynomial.natDegree_one, Int.ofNat_zero, sub_zero]\n[GOAL]\nK : Type u\ninst✝ : Field K\nx y : RatFunc K\nhx : x ≠ 0\nhy : y ≠ 0\n⊢ intDegree (x * y) = intDegree x + intDegree y\n[PROOFSTEP]\nsimp only [intDegree, add_sub, sub_add, sub_sub_eq_add_sub, sub_sub, sub_eq_sub_iff_add_eq_add]\n[GOAL]\nK : Type u\ninst✝ : Field K\nx y : RatFunc K\nhx : x ≠ 0\nhy : y ≠ 0\n⊢ ↑(natDegree (num (x * y))) + (↑(natDegree (denom x)) + ↑(natDegree (denom y))) =\n    ↑(natDegree (num x)) + ↑(natDegree (num y)) + ↑(natDegree (denom (x * y)))\n[PROOFSTEP]\nnorm_cast\n[GOAL]\nK : Type u\ninst✝ : Field K\nx y : RatFunc K\nhx : x ≠ 0\nhy : y ≠ 0\n⊢ natDegree (num (x * y)) + (natDegree (denom x) + natDegree (denom y)) =\n    natDegree (num x) + natDegree (num y) + natDegree (denom (x * y))\n[PROOFSTEP]\nrw [← Polynomial.natDegree_mul x.denom_ne_zero y.denom_ne_zero, ←\n  Polynomial.natDegree_mul (RatFunc.num_ne_zero (mul_ne_zero hx hy)) (mul_ne_zero x.denom_ne_zero y.denom_ne_zero), ←\n  Polynomial.natDegree_mul (RatFunc.num_ne_zero hx) (RatFunc.num_ne_zero hy), ←\n  Polynomial.natDegree_mul (mul_ne_zero (RatFunc.num_ne_zero hx) (RatFunc.num_ne_zero hy)) (x * y).denom_ne_zero,\n  RatFunc.num_denom_mul]\n[GOAL]\nK : Type u\ninst✝ : Field K\nx : RatFunc K\n⊢ intDegree (-x) = intDegree x\n[PROOFSTEP]\nby_cases hx : x = 0\n[GOAL]\ncase pos\nK : Type u\ninst✝ : Field K\nx : RatFunc K\nhx : x = 0\n⊢ intDegree (-x) = intDegree x\n[PROOFSTEP]\nrw [hx, neg_zero]\n[GOAL]\ncase neg\nK : Type u\ninst✝ : Field K\nx : RatFunc K\nhx : ¬x = 0\n⊢ intDegree (-x) = intDegree x\n[PROOFSTEP]\nrw [intDegree, intDegree, ← natDegree_neg x.num]\n[GOAL]\ncase neg\nK : Type u\ninst✝ : Field K\nx : RatFunc K\nhx : ¬x = 0\n⊢ ↑(natDegree (num (-x))) - ↑(natDegree (denom (-x))) = ↑(natDegree (-num x)) - ↑(natDegree (denom x))\n[PROOFSTEP]\nexact\n  natDegree_sub_eq_of_prod_eq (num_ne_zero (neg_ne_zero.mpr hx)) (denom_ne_zero (-x)) (neg_ne_zero.mpr (num_ne_zero hx))\n    (denom_ne_zero x) (num_denom_neg x)\n[GOAL]\nK : Type u\ninst✝ : Field K\nx : RatFunc K\nhx : x ≠ 0\ns : K[X]\nhs : s ≠ 0\n⊢ ↑(natDegree (num x * s)) - ↑(natDegree (s * denom x)) = intDegree x\n[PROOFSTEP]\napply\n  natDegree_sub_eq_of_prod_eq (mul_ne_zero (num_ne_zero hx) hs) (mul_ne_zero hs x.denom_ne_zero) (num_ne_zero hx)\n    x.denom_ne_zero\n[GOAL]\nK : Type u\ninst✝ : Field K\nx : RatFunc K\nhx : x ≠ 0\ns : K[X]\nhs : s ≠ 0\n⊢ num x * s * denom x = num x * (s * denom x)\n[PROOFSTEP]\nrw [mul_assoc]\n[GOAL]\nK : Type u\ninst✝ : Field K\nx y : RatFunc K\nhy : y ≠ 0\nhxy : x + y ≠ 0\n⊢ intDegree (x + y) ≤ max (intDegree x) (intDegree y)\n[PROOFSTEP]\nby_cases hx : x = 0\n[GOAL]\ncase pos\nK : Type u\ninst✝ : Field K\nx y : RatFunc K\nhy : y ≠ 0\nhxy : x + y ≠ 0\nhx : x = 0\n⊢ intDegree (x + y) ≤ max (intDegree x) (intDegree y)\n[PROOFSTEP]\nsimp [hx] at hxy \n[GOAL]\ncase pos\nK : Type u\ninst✝ : Field K\nx y : RatFunc K\nhy : y ≠ 0\nhx : x = 0\nhxy : ¬y = 0\n⊢ intDegree (x + y) ≤ max (intDegree x) (intDegree y)\n[PROOFSTEP]\nsimp [hx, hxy]\n[GOAL]\ncase neg\nK : Type u\ninst✝ : Field K\nx y : RatFunc K\nhy : y ≠ 0\nhxy : x + y ≠ 0\nhx : ¬x = 0\n⊢ intDegree (x + y) ≤ max (intDegree x) (intDegree y)\n[PROOFSTEP]\nrw [intDegree_add hxy, ← natDegree_num_mul_right_sub_natDegree_denom_mul_left_eq_intDegree hx y.denom_ne_zero,\n  mul_comm y.denom, ← natDegree_num_mul_right_sub_natDegree_denom_mul_left_eq_intDegree hy x.denom_ne_zero, le_max_iff,\n  sub_le_sub_iff_right, Int.ofNat_le, sub_le_sub_iff_right, Int.ofNat_le, ← le_max_iff, mul_comm y.num]\n[GOAL]\ncase neg\nK : Type u\ninst✝ : Field K\nx y : RatFunc K\nhy : y ≠ 0\nhxy : x + y ≠ 0\nhx : ¬x = 0\n⊢ natDegree (num x * denom y + denom x * num y) ≤ max (natDegree (num x * denom y)) (natDegree (denom x * num y))\n[PROOFSTEP]\nexact natDegree_add_le _ _\n[GOAL]\nK F : Type u\ninst✝ : Field F\np q : F[X]\nf g : RatFunc F\nr : F\n⊢ ↑(↑C r) = ↑HahnSeries.C r\n[PROOFSTEP]\nrw [coe_num_denom, num_C, denom_C, Polynomial.coe_C,\n  -- porting note: removed `coe_C`Polynomial.coe_one, PowerSeries.coe_one, div_one]\n[GOAL]\nK F : Type u\ninst✝ : Field F\np q : F[X]\nf g : RatFunc F\nr : F\n⊢ ↑(ofPowerSeries ℤ F) (↑(PowerSeries.C F) r) = ↑HahnSeries.C r\n[PROOFSTEP]\nsimp only [algebraMap_eq_C, ofPowerSeries_C, C_apply]\n  -- porting note: added\n[GOAL]\nK F : Type u\ninst✝ : Field F\np q : F[X]\nf g : RatFunc F\nr : F\n⊢ ↑(r • f) = r • ↑f\n[PROOFSTEP]\nrw [smul_eq_C_mul, ← C_mul_eq_smul, coe_mul, coe_C]\n[GOAL]\nK F : Type u\ninst✝ : Field F\np q : F[X]\nf g : RatFunc F\n⊢ ↑X = ↑(single 1) 1\n[PROOFSTEP]\nrw [coe_num_denom, num_X, denom_X, Polynomial.coe_X,\n  -- porting note: removed `coe_C`Polynomial.coe_one, PowerSeries.coe_one, div_one]\n[GOAL]\nK F : Type u\ninst✝ : Field F\np q : F[X]\nf g : RatFunc F\n⊢ ↑(ofPowerSeries ℤ F) PowerSeries.X = ↑(single 1) 1\n[PROOFSTEP]\nsimp only [ofPowerSeries_X]\n  -- porting note: added\n[GOAL]\nK F : Type u\ninst✝ : Field F\np q : F[X]\nf g : RatFunc F\n⊢ ↑(algebraMap (RatFunc F) (LaurentSeries F)) (↑(algebraMap F[X] (RatFunc F)) p / ↑(algebraMap F[X] (RatFunc F)) q) =\n    ↑(algebraMap F[X] (LaurentSeries F)) p / ↑(algebraMap F[X] (LaurentSeries F)) q\n[PROOFSTEP]\nconvert coe_div (algebraMap F[X] (RatFunc F) p) (algebraMap F[X] (RatFunc F) q)\n[GOAL]\ncase h.e'_3.h.e'_5\nK F : Type u\ninst✝ : Field F\np q : F[X]\nf g : RatFunc F\n⊢ ↑(algebraMap F[X] (LaurentSeries F)) p = ↑(↑(algebraMap F[X] (RatFunc F)) p)\n[PROOFSTEP]\nrw [← mk_one, coe_def, coeAlgHom, mk_eq_div, liftAlgHom_apply_div, map_one, div_one, Algebra.ofId_apply]\n[GOAL]\ncase h.e'_3.h.e'_6\nK F : Type u\ninst✝ : Field F\np q : F[X]\nf g : RatFunc F\n⊢ ↑(algebraMap F[X] (LaurentSeries F)) q = ↑(↑(algebraMap F[X] (RatFunc F)) q)\n[PROOFSTEP]\nrw [← mk_one, coe_def, coeAlgHom, mk_eq_div, liftAlgHom_apply_div, map_one, div_one, Algebra.ofId_apply]\n[GOAL]\nK F : Type u\ninst✝ : Field F\np q : F[X]\nf g : RatFunc F\nx : F[X]\ny : RatFunc F\nz : LaurentSeries F\n⊢ (x • y) • z = x • y • z\n[PROOFSTEP]\next\n[GOAL]\ncase coeff.h\nK F : Type u\ninst✝ : Field F\np q : F[X]\nf g : RatFunc F\nx : F[X]\ny : RatFunc F\nz : LaurentSeries F\nx✝ : ℤ\n⊢ HahnSeries.coeff ((x • y) • z) x✝ = HahnSeries.coeff (x • y • z) x✝\n[PROOFSTEP]\nsimp\n", "meta": {"mathlib_filename": "Mathlib.FieldTheory.RatFunc", "llama_tokens": 110234, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7718434873426302, "lm_q2_score": 0.6791786861878392, "lm_q1q2_score": 0.5242196456760077}}
{"text": "[GOAL]\nM : Type u_1\ninst✝¹ : Mul M\nM' : Type u_2\ninst✝ : Mul M'\n⊢ commProb (M × M') = commProb M * commProb M'\n[PROOFSTEP]\nsimp_rw [commProb_def, div_mul_div_comm, Nat.card_prod, Nat.cast_mul, mul_pow, ← Nat.cast_mul, ← Nat.card_prod, Commute,\n  SemiconjBy, Prod.ext_iff]\n[GOAL]\nM : Type u_1\ninst✝¹ : Mul M\nM' : Type u_2\ninst✝ : Mul M'\n⊢ ↑(Nat.card { p // (p.fst * p.snd).fst = (p.snd * p.fst).fst ∧ (p.fst * p.snd).snd = (p.snd * p.fst).snd }) /\n      (↑(Nat.card M) ^ 2 * ↑(Nat.card M') ^ 2) =\n    ↑(Nat.card ({ p // p.fst * p.snd = p.snd * p.fst } × { p // p.fst * p.snd = p.snd * p.fst })) /\n      (↑(Nat.card M) ^ 2 * ↑(Nat.card M') ^ 2)\n[PROOFSTEP]\ncongr 2\n[GOAL]\ncase e_a.e_a\nM : Type u_1\ninst✝¹ : Mul M\nM' : Type u_2\ninst✝ : Mul M'\n⊢ Nat.card { p // (p.fst * p.snd).fst = (p.snd * p.fst).fst ∧ (p.fst * p.snd).snd = (p.snd * p.fst).snd } =\n    Nat.card ({ p // p.fst * p.snd = p.snd * p.fst } × { p // p.fst * p.snd = p.snd * p.fst })\n[PROOFSTEP]\nexact\n  Nat.card_congr\n    ⟨fun x => ⟨⟨⟨x.1.1.1, x.1.2.1⟩, x.2.1⟩, ⟨⟨x.1.1.2, x.1.2.2⟩, x.2.2⟩⟩, fun x =>\n      ⟨⟨⟨x.1.1.1, x.2.1.1⟩, ⟨x.1.1.2, x.2.1.2⟩⟩, ⟨x.1.2, x.2.2⟩⟩, fun x => rfl, fun x => rfl⟩\n[GOAL]\nM : Type u_1\ninst✝² : Mul M\nα : Type u_3\ni : α → Type u_2\ninst✝¹ : Fintype α\ninst✝ : (a : α) → Mul (i a)\n⊢ commProb ((a : α) → i a) = ∏ a : α, commProb (i a)\n[PROOFSTEP]\nsimp_rw [commProb_def, Finset.prod_div_distrib, Finset.prod_pow, ← Nat.cast_prod, ← Nat.card_pi, Commute, SemiconjBy,\n  Function.funext_iff]\n[GOAL]\nM : Type u_1\ninst✝² : Mul M\nα : Type u_3\ni : α → Type u_2\ninst✝¹ : Fintype α\ninst✝ : (a : α) → Mul (i a)\n⊢ ↑(Nat.card { p // ∀ (a : α), (p.fst * p.snd) a = (p.snd * p.fst) a }) / ↑(Nat.card ((a : α) → i a)) ^ 2 =\n    ↑(Nat.card ((a : α) → { p // p.fst * p.snd = p.snd * p.fst })) / ↑(Nat.card ((a : α) → i a)) ^ 2\n[PROOFSTEP]\ncongr 2\n[GOAL]\ncase e_a.e_a\nM : Type u_1\ninst✝² : Mul M\nα : Type u_3\ni : α → Type u_2\ninst✝¹ : Fintype α\ninst✝ : (a : α) → Mul (i a)\n⊢ Nat.card { p // ∀ (a : α), (p.fst * p.snd) a = (p.snd * p.fst) a } =\n    Nat.card ((a : α) → { p // p.fst * p.snd = p.snd * p.fst })\n[PROOFSTEP]\nexact\n  Nat.card_congr\n    ⟨fun x a => ⟨⟨x.1.1 a, x.1.2 a⟩, x.2 a⟩, fun x => ⟨⟨fun a => (x a).1.1, fun a => (x a).1.2⟩, fun a => (x a).2⟩,\n      fun x => rfl, fun x => rfl⟩\n[GOAL]\nM : Type u_1\ninst✝² : Mul M\nα : Type u_2\nβ : Type u_3\ninst✝¹ : Fintype α\ninst✝ : Mul β\n⊢ commProb (α → β) = commProb β ^ card α\n[PROOFSTEP]\nrw [commProb_pi, Finset.prod_const, Finset.card_univ]\n[GOAL]\nM : Type u_1\ninst✝¹ : Mul M\ninst✝ : Finite M\n⊢ commProb M ≤ 1\n[PROOFSTEP]\nrefine' div_le_one_of_le _ (sq_nonneg (Nat.card M : ℚ))\n[GOAL]\nM : Type u_1\ninst✝¹ : Mul M\ninst✝ : Finite M\n⊢ ↑(Nat.card { p // Commute p.fst p.snd }) ≤ ↑(Nat.card M) ^ 2\n[PROOFSTEP]\nrw [← Nat.cast_pow, Nat.cast_le, sq, ← Nat.card_prod]\n[GOAL]\nM : Type u_1\ninst✝¹ : Mul M\ninst✝ : Finite M\n⊢ Nat.card { p // Commute p.fst p.snd } ≤ Nat.card (M × M)\n[PROOFSTEP]\napply Finite.card_subtype_le\n[GOAL]\nM : Type u_1\ninst✝¹ : Mul M\ninst✝ : Finite M\nh : Nonempty M\n⊢ commProb M = 1 ↔ Commutative fun x x_1 => x * x_1\n[PROOFSTEP]\nhaveI := Fintype.ofFinite M\n[GOAL]\nM : Type u_1\ninst✝¹ : Mul M\ninst✝ : Finite M\nh : Nonempty M\nthis : Fintype M\n⊢ commProb M = 1 ↔ Commutative fun x x_1 => x * x_1\n[PROOFSTEP]\nrw [commProb, ← Set.coe_setOf, Nat.card_eq_fintype_card, Nat.card_eq_fintype_card]\n[GOAL]\nM : Type u_1\ninst✝¹ : Mul M\ninst✝ : Finite M\nh : Nonempty M\nthis : Fintype M\n⊢ ↑(card ↑{x | Commute x.fst x.snd}) / ↑(card M) ^ 2 = 1 ↔ Commutative fun x x_1 => x * x_1\n[PROOFSTEP]\nrw [div_eq_one_iff_eq, ← Nat.cast_pow, Nat.cast_inj, sq, ← card_prod, set_fintype_card_eq_univ_iff,\n  Set.eq_univ_iff_forall]\n[GOAL]\nM : Type u_1\ninst✝¹ : Mul M\ninst✝ : Finite M\nh : Nonempty M\nthis : Fintype M\n⊢ (∀ (x : M × M), x ∈ {x | Commute x.fst x.snd}) ↔ Commutative fun x x_1 => x * x_1\n[PROOFSTEP]\nexact ⟨fun h x y ↦ h (x, y), fun h x ↦ h x.1 x.2⟩\n[GOAL]\nM : Type u_1\ninst✝¹ : Mul M\ninst✝ : Finite M\nh : Nonempty M\nthis : Fintype M\n⊢ ↑(card M) ^ 2 ≠ 0\n[PROOFSTEP]\nexact pow_ne_zero 2 (Nat.cast_ne_zero.mpr card_ne_zero)\n[GOAL]\nM : Type u_1\ninst✝² : Mul M\ninst✝¹ : Finite M\nG : Type u_2\ninst✝ : Group G\n⊢ commProb G = ↑(Nat.card (ConjClasses G)) / ↑(Nat.card G)\n[PROOFSTEP]\nrw [commProb, card_comm_eq_card_conjClasses_mul_card, Nat.cast_mul, sq]\n[GOAL]\nM : Type u_1\ninst✝² : Mul M\ninst✝¹ : Finite M\nG : Type u_2\ninst✝ : Group G\n⊢ ↑(Nat.card (ConjClasses G)) * ↑(Nat.card G) / (↑(Nat.card G) * ↑(Nat.card G)) =\n    ↑(Nat.card (ConjClasses G)) / ↑(Nat.card G)\n[PROOFSTEP]\nby_cases h : (Nat.card G : ℚ) = 0\n[GOAL]\ncase pos\nM : Type u_1\ninst✝² : Mul M\ninst✝¹ : Finite M\nG : Type u_2\ninst✝ : Group G\nh : ↑(Nat.card G) = 0\n⊢ ↑(Nat.card (ConjClasses G)) * ↑(Nat.card G) / (↑(Nat.card G) * ↑(Nat.card G)) =\n    ↑(Nat.card (ConjClasses G)) / ↑(Nat.card G)\n[PROOFSTEP]\nrw [h, zero_mul, div_zero, div_zero]\n[GOAL]\ncase neg\nM : Type u_1\ninst✝² : Mul M\ninst✝¹ : Finite M\nG : Type u_2\ninst✝ : Group G\nh : ¬↑(Nat.card G) = 0\n⊢ ↑(Nat.card (ConjClasses G)) * ↑(Nat.card G) / (↑(Nat.card G) * ↑(Nat.card G)) =\n    ↑(Nat.card (ConjClasses G)) / ↑(Nat.card G)\n[PROOFSTEP]\nexact mul_div_mul_right _ _ h\n[GOAL]\nM : Type u_1\ninst✝³ : Mul M\ninst✝² : Finite M\nG : Type u_2\ninst✝¹ : Group G\ninst✝ : Finite G\nH : Subgroup G\n⊢ commProb { x // x ∈ H } ≤ commProb G * ↑(index H) ^ 2\n[PROOFSTEP]\nrw [commProb_def, commProb_def, div_le_iff, mul_assoc, ← mul_pow, ← Nat.cast_mul, mul_comm H.index, H.card_mul_index,\n  div_mul_cancel, Nat.cast_le]\n[GOAL]\nM : Type u_1\ninst✝³ : Mul M\ninst✝² : Finite M\nG : Type u_2\ninst✝¹ : Group G\ninst✝ : Finite G\nH : Subgroup G\n⊢ Nat.card { p // Commute p.fst p.snd } ≤ Nat.card { p // Commute p.fst p.snd }\n[PROOFSTEP]\nrefine' Finite.card_le_of_injective (fun p ↦ ⟨⟨p.1.1, p.1.2⟩, Subtype.ext_iff.mp p.2⟩) _\n[GOAL]\nM : Type u_1\ninst✝³ : Mul M\ninst✝² : Finite M\nG : Type u_2\ninst✝¹ : Group G\ninst✝ : Finite G\nH : Subgroup G\n⊢ Function.Injective fun p =>\n    { val := (↑(↑p).fst, ↑(↑p).snd), property := (_ : ↑((↑p).fst * (↑p).snd) = ↑((↑p).snd * (↑p).fst)) }\n[PROOFSTEP]\nexact fun p q h ↦ by simpa only [Subtype.ext_iff, Prod.ext_iff] using h\n[GOAL]\nM : Type u_1\ninst✝³ : Mul M\ninst✝² : Finite M\nG : Type u_2\ninst✝¹ : Group G\ninst✝ : Finite G\nH : Subgroup G\np q : { p // Commute p.fst p.snd }\nh :\n  (fun p => { val := (↑(↑p).fst, ↑(↑p).snd), property := (_ : ↑((↑p).fst * (↑p).snd) = ↑((↑p).snd * (↑p).fst)) }) p =\n    (fun p => { val := (↑(↑p).fst, ↑(↑p).snd), property := (_ : ↑((↑p).fst * (↑p).snd) = ↑((↑p).snd * (↑p).fst)) }) q\n⊢ p = q\n[PROOFSTEP]\nsimpa only [Subtype.ext_iff, Prod.ext_iff] using h\n[GOAL]\ncase h\nM : Type u_1\ninst✝³ : Mul M\ninst✝² : Finite M\nG : Type u_2\ninst✝¹ : Group G\ninst✝ : Finite G\nH : Subgroup G\n⊢ ↑(Nat.card G) ^ 2 ≠ 0\n[PROOFSTEP]\nexact pow_ne_zero 2 (Nat.cast_ne_zero.mpr Finite.card_pos.ne')\n[GOAL]\nM : Type u_1\ninst✝³ : Mul M\ninst✝² : Finite M\nG : Type u_2\ninst✝¹ : Group G\ninst✝ : Finite G\nH : Subgroup G\n⊢ 0 < ↑(Nat.card { x // x ∈ H }) ^ 2\n[PROOFSTEP]\nexact pow_pos (Nat.cast_pos.mpr Finite.card_pos) 2\n[GOAL]\nM : Type u_1\ninst✝⁴ : Mul M\ninst✝³ : Finite M\nG : Type u_2\ninst✝² : Group G\ninst✝¹ : Finite G\nH : Subgroup G\ninst✝ : Normal H\n⊢ commProb (G ⧸ H) ≤ commProb G * ↑(Nat.card { x // x ∈ H })\n[PROOFSTEP]\nrw [commProb_def', commProb_def', div_le_iff, mul_assoc, ← Nat.cast_mul, ← Subgroup.index, H.card_mul_index,\n  div_mul_cancel, Nat.cast_le]\n[GOAL]\nM : Type u_1\ninst✝⁴ : Mul M\ninst✝³ : Finite M\nG : Type u_2\ninst✝² : Group G\ninst✝¹ : Finite G\nH : Subgroup G\ninst✝ : Normal H\n⊢ Nat.card (ConjClasses (G ⧸ H)) ≤ Nat.card (ConjClasses G)\n[PROOFSTEP]\napply Finite.card_le_of_surjective\n[GOAL]\ncase hf\nM : Type u_1\ninst✝⁴ : Mul M\ninst✝³ : Finite M\nG : Type u_2\ninst✝² : Group G\ninst✝¹ : Finite G\nH : Subgroup G\ninst✝ : Normal H\n⊢ Function.Surjective ?f\ncase f\nM : Type u_1\ninst✝⁴ : Mul M\ninst✝³ : Finite M\nG : Type u_2\ninst✝² : Group G\ninst✝¹ : Finite G\nH : Subgroup G\ninst✝ : Normal H\n⊢ ConjClasses G → ConjClasses (G ⧸ H)\n[PROOFSTEP]\nshow Function.Surjective (ConjClasses.map (QuotientGroup.mk' H))\n[GOAL]\ncase hf\nM : Type u_1\ninst✝⁴ : Mul M\ninst✝³ : Finite M\nG : Type u_2\ninst✝² : Group G\ninst✝¹ : Finite G\nH : Subgroup G\ninst✝ : Normal H\n⊢ Function.Surjective (ConjClasses.map (QuotientGroup.mk' H))\n[PROOFSTEP]\nexact ConjClasses.map_surjective Quotient.surjective_Quotient_mk''\n[GOAL]\ncase h\nM : Type u_1\ninst✝⁴ : Mul M\ninst✝³ : Finite M\nG : Type u_2\ninst✝² : Group G\ninst✝¹ : Finite G\nH : Subgroup G\ninst✝ : Normal H\n⊢ ↑(Nat.card G) ≠ 0\n[PROOFSTEP]\nexact Nat.cast_ne_zero.mpr Finite.card_pos.ne'\n[GOAL]\nM : Type u_1\ninst✝⁴ : Mul M\ninst✝³ : Finite M\nG : Type u_2\ninst✝² : Group G\ninst✝¹ : Finite G\nH : Subgroup G\ninst✝ : Normal H\n⊢ 0 < ↑(Nat.card (G ⧸ H))\n[PROOFSTEP]\nexact Nat.cast_pos.mpr Finite.card_pos\n", "meta": {"mathlib_filename": "Mathlib.GroupTheory.CommutingProbability", "llama_tokens": 4650, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8128673269042767, "lm_q2_score": 0.6442251201477016, "lm_q1q2_score": 0.5236695513390487}}
{"text": "[GOAL]\nΩ : Type u_1\ninst✝ : MeasurableSpace Ω\nμ : FiniteMeasure Ω\ns₁ s₂ : Set Ω\nh : s₁ ⊆ s₂\n⊢ (fun s => ENNReal.toNNReal (↑↑↑μ s)) s₁ ≤ (fun s => ENNReal.toNNReal (↑↑↑μ s)) s₂\n[PROOFSTEP]\nchange ((μ : Measure Ω) s₁).toNNReal ≤ ((μ : Measure Ω) s₂).toNNReal\n[GOAL]\nΩ : Type u_1\ninst✝ : MeasurableSpace Ω\nμ : FiniteMeasure Ω\ns₁ s₂ : Set Ω\nh : s₁ ⊆ s₂\n⊢ ENNReal.toNNReal (↑↑↑μ s₁) ≤ ENNReal.toNNReal (↑↑↑μ s₂)\n[PROOFSTEP]\nhave key : (μ : Measure Ω) s₁ ≤ (μ : Measure Ω) s₂ := (μ : Measure Ω).mono h\n[GOAL]\nΩ : Type u_1\ninst✝ : MeasurableSpace Ω\nμ : FiniteMeasure Ω\ns₁ s₂ : Set Ω\nh : s₁ ⊆ s₂\nkey : ↑↑↑μ s₁ ≤ ↑↑↑μ s₂\n⊢ ENNReal.toNNReal (↑↑↑μ s₁) ≤ ENNReal.toNNReal (↑↑↑μ s₂)\n[PROOFSTEP]\napply (ENNReal.toNNReal_le_toNNReal (measure_ne_top _ s₁) (measure_ne_top _ s₂)).mpr key\n[GOAL]\nΩ : Type u_1\ninst✝ : MeasurableSpace Ω\nμ : FiniteMeasure Ω\n⊢ mass μ = 0 ↔ μ = 0\n[PROOFSTEP]\nrefine' ⟨fun μ_mass => _, fun hμ => by simp only [hμ, zero_mass]⟩\n[GOAL]\nΩ : Type u_1\ninst✝ : MeasurableSpace Ω\nμ : FiniteMeasure Ω\nhμ : μ = 0\n⊢ mass μ = 0\n[PROOFSTEP]\nsimp only [hμ, zero_mass]\n[GOAL]\nΩ : Type u_1\ninst✝ : MeasurableSpace Ω\nμ : FiniteMeasure Ω\nμ_mass : mass μ = 0\n⊢ μ = 0\n[PROOFSTEP]\napply toMeasure_injective\n[GOAL]\ncase a\nΩ : Type u_1\ninst✝ : MeasurableSpace Ω\nμ : FiniteMeasure Ω\nμ_mass : mass μ = 0\n⊢ ↑μ = ↑0\n[PROOFSTEP]\napply Measure.measure_univ_eq_zero.mp\n[GOAL]\ncase a\nΩ : Type u_1\ninst✝ : MeasurableSpace Ω\nμ : FiniteMeasure Ω\nμ_mass : mass μ = 0\n⊢ ↑↑↑μ univ = 0\n[PROOFSTEP]\nrwa [← ennreal_mass, ENNReal.coe_eq_zero]\n[GOAL]\nΩ : Type u_1\ninst✝ : MeasurableSpace Ω\nμ : FiniteMeasure Ω\n⊢ mass μ ≠ 0 ↔ μ ≠ 0\n[PROOFSTEP]\nrw [not_iff_not]\n[GOAL]\nΩ : Type u_1\ninst✝ : MeasurableSpace Ω\nμ : FiniteMeasure Ω\n⊢ mass μ = 0 ↔ μ = 0\n[PROOFSTEP]\nexact FiniteMeasure.mass_zero_iff μ\n[GOAL]\nΩ : Type u_1\ninst✝ : MeasurableSpace Ω\nμ ν : FiniteMeasure Ω\nh : ∀ (s : Set Ω), MeasurableSet s → ↑↑↑μ s = ↑↑↑ν s\n⊢ μ = ν\n[PROOFSTEP]\napply Subtype.ext\n[GOAL]\ncase a\nΩ : Type u_1\ninst✝ : MeasurableSpace Ω\nμ ν : FiniteMeasure Ω\nh : ∀ (s : Set Ω), MeasurableSet s → ↑↑↑μ s = ↑↑↑ν s\n⊢ ↑μ = ↑ν\n[PROOFSTEP]\next1 s s_mble\n[GOAL]\ncase a.h\nΩ : Type u_1\ninst✝ : MeasurableSpace Ω\nμ ν : FiniteMeasure Ω\nh : ∀ (s : Set Ω), MeasurableSet s → ↑↑↑μ s = ↑↑↑ν s\ns : Set Ω\ns_mble : MeasurableSet s\n⊢ ↑↑↑μ s = ↑↑↑ν s\n[PROOFSTEP]\nexact h s s_mble\n[GOAL]\nΩ : Type u_1\ninst✝ : MeasurableSpace Ω\nμ ν : FiniteMeasure Ω\nh : ∀ (s : Set Ω), MeasurableSet s → (fun s => ENNReal.toNNReal (↑↑↑μ s)) s = (fun s => ENNReal.toNNReal (↑↑↑ν s)) s\n⊢ μ = ν\n[PROOFSTEP]\next1 s s_mble\n[GOAL]\ncase h\nΩ : Type u_1\ninst✝ : MeasurableSpace Ω\nμ ν : FiniteMeasure Ω\nh : ∀ (s : Set Ω), MeasurableSet s → (fun s => ENNReal.toNNReal (↑↑↑μ s)) s = (fun s => ENNReal.toNNReal (↑↑↑ν s)) s\ns : Set Ω\ns_mble : MeasurableSet s\n⊢ ↑↑↑μ s = ↑↑↑ν s\n[PROOFSTEP]\nsimpa [ennreal_coeFn_eq_coeFn_toMeasure] using congr_arg ((↑) : ℝ≥0 → ℝ≥0∞) (h s s_mble)\n[GOAL]\nΩ : Type u_1\ninst✝⁴ : MeasurableSpace Ω\nR : Type u_2\ninst✝³ : SMul R ℝ≥0\ninst✝² : SMul R ℝ≥0∞\ninst✝¹ : IsScalarTower R ℝ≥0 ℝ≥0∞\ninst✝ : IsScalarTower R ℝ≥0∞ ℝ≥0∞\n⊢ (fun s => ENNReal.toNNReal (↑↑↑0 s)) = 0\n[PROOFSTEP]\nfunext\n[GOAL]\ncase h\nΩ : Type u_1\ninst✝⁴ : MeasurableSpace Ω\nR : Type u_2\ninst✝³ : SMul R ℝ≥0\ninst✝² : SMul R ℝ≥0∞\ninst✝¹ : IsScalarTower R ℝ≥0 ℝ≥0∞\ninst✝ : IsScalarTower R ℝ≥0∞ ℝ≥0∞\nx✝ : Set Ω\n⊢ ENNReal.toNNReal (↑↑↑0 x✝) = OfNat.ofNat 0 x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nΩ : Type u_1\ninst✝⁴ : MeasurableSpace Ω\nR : Type u_2\ninst✝³ : SMul R ℝ≥0\ninst✝² : SMul R ℝ≥0∞\ninst✝¹ : IsScalarTower R ℝ≥0 ℝ≥0∞\ninst✝ : IsScalarTower R ℝ≥0∞ ℝ≥0∞\nμ ν : FiniteMeasure Ω\n⊢ (fun s => ENNReal.toNNReal (↑↑↑(μ + ν) s)) = (fun s => ENNReal.toNNReal (↑↑↑μ s)) + fun s => ENNReal.toNNReal (↑↑↑ν s)\n[PROOFSTEP]\nfunext\n[GOAL]\ncase h\nΩ : Type u_1\ninst✝⁴ : MeasurableSpace Ω\nR : Type u_2\ninst✝³ : SMul R ℝ≥0\ninst✝² : SMul R ℝ≥0∞\ninst✝¹ : IsScalarTower R ℝ≥0 ℝ≥0∞\ninst✝ : IsScalarTower R ℝ≥0∞ ℝ≥0∞\nμ ν : FiniteMeasure Ω\nx✝ : Set Ω\n⊢ ENNReal.toNNReal (↑↑↑(μ + ν) x✝) = ((fun s => ENNReal.toNNReal (↑↑↑μ s)) + fun s => ENNReal.toNNReal (↑↑↑ν s)) x✝\n[PROOFSTEP]\nsimp [← ENNReal.coe_eq_coe]\n[GOAL]\ncase h\nΩ : Type u_1\ninst✝⁴ : MeasurableSpace Ω\nR : Type u_2\ninst✝³ : SMul R ℝ≥0\ninst✝² : SMul R ℝ≥0∞\ninst✝¹ : IsScalarTower R ℝ≥0 ℝ≥0∞\ninst✝ : IsScalarTower R ℝ≥0∞ ℝ≥0∞\nμ ν : FiniteMeasure Ω\nx✝ : Set Ω\n⊢ ↑↑↑(μ + ν) x✝ = ↑↑↑μ x✝ + ↑↑↑ν x✝\n[PROOFSTEP]\nnorm_cast\n[GOAL]\nΩ : Type u_1\ninst✝⁵ : MeasurableSpace Ω\nR : Type u_2\ninst✝⁴ : SMul R ℝ≥0\ninst✝³ : SMul R ℝ≥0∞\ninst✝² : IsScalarTower R ℝ≥0 ℝ≥0∞\ninst✝¹ : IsScalarTower R ℝ≥0∞ ℝ≥0∞\ninst✝ : IsScalarTower R ℝ≥0 ℝ≥0\nc : R\nμ : FiniteMeasure Ω\n⊢ (fun s => ENNReal.toNNReal (↑↑↑(c • μ) s)) = c • fun s => ENNReal.toNNReal (↑↑↑μ s)\n[PROOFSTEP]\nfunext\n[GOAL]\ncase h\nΩ : Type u_1\ninst✝⁵ : MeasurableSpace Ω\nR : Type u_2\ninst✝⁴ : SMul R ℝ≥0\ninst✝³ : SMul R ℝ≥0∞\ninst✝² : IsScalarTower R ℝ≥0 ℝ≥0∞\ninst✝¹ : IsScalarTower R ℝ≥0∞ ℝ≥0∞\ninst✝ : IsScalarTower R ℝ≥0 ℝ≥0\nc : R\nμ : FiniteMeasure Ω\nx✝ : Set Ω\n⊢ ENNReal.toNNReal (↑↑↑(c • μ) x✝) = (c • fun s => ENNReal.toNNReal (↑↑↑μ s)) x✝\n[PROOFSTEP]\nsimp [← ENNReal.coe_eq_coe, ENNReal.coe_smul]\n[GOAL]\ncase h\nΩ : Type u_1\ninst✝⁵ : MeasurableSpace Ω\nR : Type u_2\ninst✝⁴ : SMul R ℝ≥0\ninst✝³ : SMul R ℝ≥0∞\ninst✝² : IsScalarTower R ℝ≥0 ℝ≥0∞\ninst✝¹ : IsScalarTower R ℝ≥0∞ ℝ≥0∞\ninst✝ : IsScalarTower R ℝ≥0 ℝ≥0\nc : R\nμ : FiniteMeasure Ω\nx✝ : Set Ω\n⊢ ↑↑↑(c • μ) x✝ = c • ↑↑↑μ x✝\n[PROOFSTEP]\nnorm_cast\n[GOAL]\nΩ : Type u_1\ninst✝⁵ : MeasurableSpace Ω\nR : Type u_2\ninst✝⁴ : SMul R ℝ≥0\ninst✝³ : SMul R ℝ≥0∞\ninst✝² : IsScalarTower R ℝ≥0 ℝ≥0∞\ninst✝¹ : IsScalarTower R ℝ≥0∞ ℝ≥0∞\ninst✝ : IsScalarTower R ℝ≥0 ℝ≥0\nc : R\nμ : FiniteMeasure Ω\ns : Set Ω\n⊢ (fun s => ENNReal.toNNReal (↑↑↑(c • μ) s)) s = c • (fun s => ENNReal.toNNReal (↑↑↑μ s)) s\n[PROOFSTEP]\nrw [coeFn_smul, Pi.smul_apply]\n  -- porting note: why doesn't `simp only` work in place of `rw` here?\n[GOAL]\nΩ : Type u_1\ninst✝⁴ : MeasurableSpace Ω\nR : Type u_2\ninst✝³ : SMul R ℝ≥0\ninst✝² : SMul R ℝ≥0∞\ninst✝¹ : IsScalarTower R ℝ≥0 ℝ≥0∞\ninst✝ : IsScalarTower R ℝ≥0∞ ℝ≥0∞\nμ : FiniteMeasure Ω\nA s : Set Ω\ns_mble : MeasurableSet s\n⊢ (fun s => ENNReal.toNNReal (↑↑↑(restrict μ A) s)) s = (fun s => ENNReal.toNNReal (↑↑↑μ s)) (s ∩ A)\n[PROOFSTEP]\napply congr_arg ENNReal.toNNReal\n[GOAL]\nΩ : Type u_1\ninst✝⁴ : MeasurableSpace Ω\nR : Type u_2\ninst✝³ : SMul R ℝ≥0\ninst✝² : SMul R ℝ≥0∞\ninst✝¹ : IsScalarTower R ℝ≥0 ℝ≥0∞\ninst✝ : IsScalarTower R ℝ≥0∞ ℝ≥0∞\nμ : FiniteMeasure Ω\nA s : Set Ω\ns_mble : MeasurableSet s\n⊢ ↑↑↑(restrict μ A) s = ↑↑↑μ (s ∩ A)\n[PROOFSTEP]\nexact Measure.restrict_apply s_mble\n[GOAL]\nΩ : Type u_1\ninst✝⁴ : MeasurableSpace Ω\nR : Type u_2\ninst✝³ : SMul R ℝ≥0\ninst✝² : SMul R ℝ≥0∞\ninst✝¹ : IsScalarTower R ℝ≥0 ℝ≥0∞\ninst✝ : IsScalarTower R ℝ≥0∞ ℝ≥0∞\nμ : FiniteMeasure Ω\nA : Set Ω\n⊢ mass (restrict μ A) = (fun s => ENNReal.toNNReal (↑↑↑μ s)) A\n[PROOFSTEP]\nsimp only [mass, restrict_apply μ A MeasurableSet.univ, univ_inter]\n[GOAL]\nΩ : Type u_1\ninst✝⁴ : MeasurableSpace Ω\nR : Type u_2\ninst✝³ : SMul R ℝ≥0\ninst✝² : SMul R ℝ≥0∞\ninst✝¹ : IsScalarTower R ℝ≥0 ℝ≥0∞\ninst✝ : IsScalarTower R ℝ≥0∞ ℝ≥0∞\nμ : FiniteMeasure Ω\nA : Set Ω\n⊢ restrict μ A = 0 ↔ (fun s => ENNReal.toNNReal (↑↑↑μ s)) A = 0\n[PROOFSTEP]\nrw [← mass_zero_iff, restrict_mass]\n[GOAL]\nΩ : Type u_1\ninst✝⁴ : MeasurableSpace Ω\nR : Type u_2\ninst✝³ : SMul R ℝ≥0\ninst✝² : SMul R ℝ≥0∞\ninst✝¹ : IsScalarTower R ℝ≥0 ℝ≥0∞\ninst✝ : IsScalarTower R ℝ≥0∞ ℝ≥0∞\nμ : FiniteMeasure Ω\nA : Set Ω\n⊢ restrict μ A ≠ 0 ↔ (fun s => ENNReal.toNNReal (↑↑↑μ s)) A ≠ 0\n[PROOFSTEP]\nrw [← mass_nonzero_iff, restrict_mass]\n[GOAL]\nΩ : Type u_1\ninst✝⁶ : MeasurableSpace Ω\nR : Type u_2\ninst✝⁵ : SMul R ℝ≥0\ninst✝⁴ : SMul R ℝ≥0∞\ninst✝³ : IsScalarTower R ℝ≥0 ℝ≥0∞\ninst✝² : IsScalarTower R ℝ≥0∞ ℝ≥0∞\ninst✝¹ : TopologicalSpace Ω\nμ : Measure Ω\ninst✝ : IsFiniteMeasure μ\nf : Ω →ᵇ ℝ≥0\n⊢ ∫⁻ (ω : Ω), ↑(↑f ω) ∂μ < ⊤\n[PROOFSTEP]\napply IsFiniteMeasure.lintegral_lt_top_of_bounded_to_eNNReal\n[GOAL]\ncase f_bdd\nΩ : Type u_1\ninst✝⁶ : MeasurableSpace Ω\nR : Type u_2\ninst✝⁵ : SMul R ℝ≥0\ninst✝⁴ : SMul R ℝ≥0∞\ninst✝³ : IsScalarTower R ℝ≥0 ℝ≥0∞\ninst✝² : IsScalarTower R ℝ≥0∞ ℝ≥0∞\ninst✝¹ : TopologicalSpace Ω\nμ : Measure Ω\ninst✝ : IsFiniteMeasure μ\nf : Ω →ᵇ ℝ≥0\n⊢ ∃ c, ∀ (x : Ω), ↑(↑f x) ≤ ↑c\n[PROOFSTEP]\nuse nndist f 0\n[GOAL]\ncase h\nΩ : Type u_1\ninst✝⁶ : MeasurableSpace Ω\nR : Type u_2\ninst✝⁵ : SMul R ℝ≥0\ninst✝⁴ : SMul R ℝ≥0∞\ninst✝³ : IsScalarTower R ℝ≥0 ℝ≥0∞\ninst✝² : IsScalarTower R ℝ≥0∞ ℝ≥0∞\ninst✝¹ : TopologicalSpace Ω\nμ : Measure Ω\ninst✝ : IsFiniteMeasure μ\nf : Ω →ᵇ ℝ≥0\n⊢ ∀ (x : Ω), ↑(↑f x) ≤ ↑(nndist f 0)\n[PROOFSTEP]\nintro x\n[GOAL]\ncase h\nΩ : Type u_1\ninst✝⁶ : MeasurableSpace Ω\nR : Type u_2\ninst✝⁵ : SMul R ℝ≥0\ninst✝⁴ : SMul R ℝ≥0∞\ninst✝³ : IsScalarTower R ℝ≥0 ℝ≥0∞\ninst✝² : IsScalarTower R ℝ≥0∞ ℝ≥0∞\ninst✝¹ : TopologicalSpace Ω\nμ : Measure Ω\ninst✝ : IsFiniteMeasure μ\nf : Ω →ᵇ ℝ≥0\nx : Ω\n⊢ ↑(↑f x) ≤ ↑(nndist f 0)\n[PROOFSTEP]\nhave key := BoundedContinuousFunction.Nnreal.upper_bound f x\n[GOAL]\ncase h\nΩ : Type u_1\ninst✝⁶ : MeasurableSpace Ω\nR : Type u_2\ninst✝⁵ : SMul R ℝ≥0\ninst✝⁴ : SMul R ℝ≥0∞\ninst✝³ : IsScalarTower R ℝ≥0 ℝ≥0∞\ninst✝² : IsScalarTower R ℝ≥0∞ ℝ≥0∞\ninst✝¹ : TopologicalSpace Ω\nμ : Measure Ω\ninst✝ : IsFiniteMeasure μ\nf : Ω →ᵇ ℝ≥0\nx : Ω\nkey : ↑f x ≤ nndist f 0\n⊢ ↑(↑f x) ≤ ↑(nndist f 0)\n[PROOFSTEP]\nrw [ENNReal.coe_le_coe]\n[GOAL]\ncase h\nΩ : Type u_1\ninst✝⁶ : MeasurableSpace Ω\nR : Type u_2\ninst✝⁵ : SMul R ℝ≥0\ninst✝⁴ : SMul R ℝ≥0∞\ninst✝³ : IsScalarTower R ℝ≥0 ℝ≥0∞\ninst✝² : IsScalarTower R ℝ≥0∞ ℝ≥0∞\ninst✝¹ : TopologicalSpace Ω\nμ : Measure Ω\ninst✝ : IsFiniteMeasure μ\nf : Ω →ᵇ ℝ≥0\nx : Ω\nkey : ↑f x ≤ nndist f 0\n⊢ ↑f x ≤ nndist f 0\n[PROOFSTEP]\nhave eq : nndist f 0 = ⟨dist f 0, dist_nonneg⟩ := by\n  ext\n  simp only [Real.coe_toNNReal', max_eq_left_iff, NNReal.coe_mk, coe_nndist]\n[GOAL]\nΩ : Type u_1\ninst✝⁶ : MeasurableSpace Ω\nR : Type u_2\ninst✝⁵ : SMul R ℝ≥0\ninst✝⁴ : SMul R ℝ≥0∞\ninst✝³ : IsScalarTower R ℝ≥0 ℝ≥0∞\ninst✝² : IsScalarTower R ℝ≥0∞ ℝ≥0∞\ninst✝¹ : TopologicalSpace Ω\nμ : Measure Ω\ninst✝ : IsFiniteMeasure μ\nf : Ω →ᵇ ℝ≥0\nx : Ω\nkey : ↑f x ≤ nndist f 0\n⊢ nndist f 0 = { val := dist f 0, property := (_ : 0 ≤ dist f 0) }\n[PROOFSTEP]\next\n[GOAL]\ncase a\nΩ : Type u_1\ninst✝⁶ : MeasurableSpace Ω\nR : Type u_2\ninst✝⁵ : SMul R ℝ≥0\ninst✝⁴ : SMul R ℝ≥0∞\ninst✝³ : IsScalarTower R ℝ≥0 ℝ≥0∞\ninst✝² : IsScalarTower R ℝ≥0∞ ℝ≥0∞\ninst✝¹ : TopologicalSpace Ω\nμ : Measure Ω\ninst✝ : IsFiniteMeasure μ\nf : Ω →ᵇ ℝ≥0\nx : Ω\nkey : ↑f x ≤ nndist f 0\n⊢ ↑(nndist f 0) = ↑{ val := dist f 0, property := (_ : 0 ≤ dist f 0) }\n[PROOFSTEP]\nsimp only [Real.coe_toNNReal', max_eq_left_iff, NNReal.coe_mk, coe_nndist]\n[GOAL]\ncase h\nΩ : Type u_1\ninst✝⁶ : MeasurableSpace Ω\nR : Type u_2\ninst✝⁵ : SMul R ℝ≥0\ninst✝⁴ : SMul R ℝ≥0∞\ninst✝³ : IsScalarTower R ℝ≥0 ℝ≥0∞\ninst✝² : IsScalarTower R ℝ≥0∞ ℝ≥0∞\ninst✝¹ : TopologicalSpace Ω\nμ : Measure Ω\ninst✝ : IsFiniteMeasure μ\nf : Ω →ᵇ ℝ≥0\nx : Ω\nkey : ↑f x ≤ nndist f 0\neq : nndist f 0 = { val := dist f 0, property := (_ : 0 ≤ dist f 0) }\n⊢ ↑f x ≤ nndist f 0\n[PROOFSTEP]\nrwa [eq] at key \n[GOAL]\nΩ : Type u_1\ninst✝⁵ : MeasurableSpace Ω\nR : Type u_2\ninst✝⁴ : SMul R ℝ≥0\ninst✝³ : SMul R ℝ≥0∞\ninst✝² : IsScalarTower R ℝ≥0 ℝ≥0∞\ninst✝¹ : IsScalarTower R ℝ≥0∞ ℝ≥0∞\ninst✝ : TopologicalSpace Ω\nμ : FiniteMeasure Ω\nc : ℝ≥0\n⊢ testAgainstNN μ (const Ω c) = c * mass μ\n[PROOFSTEP]\nsimp [← ENNReal.coe_eq_coe]\n[GOAL]\nΩ : Type u_1\ninst✝⁵ : MeasurableSpace Ω\nR : Type u_2\ninst✝⁴ : SMul R ℝ≥0\ninst✝³ : SMul R ℝ≥0∞\ninst✝² : IsScalarTower R ℝ≥0 ℝ≥0∞\ninst✝¹ : IsScalarTower R ℝ≥0∞ ℝ≥0∞\ninst✝ : TopologicalSpace Ω\nμ : FiniteMeasure Ω\nf g : Ω →ᵇ ℝ≥0\nf_le_g : ↑f ≤ ↑g\n⊢ testAgainstNN μ f ≤ testAgainstNN μ g\n[PROOFSTEP]\nsimp only [← ENNReal.coe_le_coe, testAgainstNN_coe_eq]\n[GOAL]\nΩ : Type u_1\ninst✝⁵ : MeasurableSpace Ω\nR : Type u_2\ninst✝⁴ : SMul R ℝ≥0\ninst✝³ : SMul R ℝ≥0∞\ninst✝² : IsScalarTower R ℝ≥0 ℝ≥0∞\ninst✝¹ : IsScalarTower R ℝ≥0∞ ℝ≥0∞\ninst✝ : TopologicalSpace Ω\nμ : FiniteMeasure Ω\nf g : Ω →ᵇ ℝ≥0\nf_le_g : ↑f ≤ ↑g\n⊢ ∫⁻ (ω : Ω), ↑(↑f ω) ∂↑μ ≤ ∫⁻ (ω : Ω), ↑(↑g ω) ∂↑μ\n[PROOFSTEP]\nexact lintegral_mono fun ω => ENNReal.coe_mono (f_le_g ω)\n[GOAL]\nΩ : Type u_1\ninst✝⁵ : MeasurableSpace Ω\nR : Type u_2\ninst✝⁴ : SMul R ℝ≥0\ninst✝³ : SMul R ℝ≥0∞\ninst✝² : IsScalarTower R ℝ≥0 ℝ≥0∞\ninst✝¹ : IsScalarTower R ℝ≥0∞ ℝ≥0∞\ninst✝ : TopologicalSpace Ω\nμ : FiniteMeasure Ω\n⊢ testAgainstNN μ 0 = 0\n[PROOFSTEP]\nsimpa only [zero_mul] using μ.testAgainstNN_const 0\n[GOAL]\nΩ : Type u_1\ninst✝⁵ : MeasurableSpace Ω\nR : Type u_2\ninst✝⁴ : SMul R ℝ≥0\ninst✝³ : SMul R ℝ≥0∞\ninst✝² : IsScalarTower R ℝ≥0 ℝ≥0∞\ninst✝¹ : IsScalarTower R ℝ≥0∞ ℝ≥0∞\ninst✝ : TopologicalSpace Ω\nμ : FiniteMeasure Ω\n⊢ testAgainstNN μ 1 = mass μ\n[PROOFSTEP]\nsimp only [testAgainstNN, coe_one, Pi.one_apply, ENNReal.coe_one, lintegral_one]\n[GOAL]\nΩ : Type u_1\ninst✝⁵ : MeasurableSpace Ω\nR : Type u_2\ninst✝⁴ : SMul R ℝ≥0\ninst✝³ : SMul R ℝ≥0∞\ninst✝² : IsScalarTower R ℝ≥0 ℝ≥0∞\ninst✝¹ : IsScalarTower R ℝ≥0∞ ℝ≥0∞\ninst✝ : TopologicalSpace Ω\nμ : FiniteMeasure Ω\n⊢ ENNReal.toNNReal (↑↑↑μ univ) = mass μ\n[PROOFSTEP]\nrfl\n[GOAL]\nΩ : Type u_1\ninst✝⁵ : MeasurableSpace Ω\nR : Type u_2\ninst✝⁴ : SMul R ℝ≥0\ninst✝³ : SMul R ℝ≥0∞\ninst✝² : IsScalarTower R ℝ≥0 ℝ≥0∞\ninst✝¹ : IsScalarTower R ℝ≥0∞ ℝ≥0∞\ninst✝ : TopologicalSpace Ω\nf : Ω →ᵇ ℝ≥0\n⊢ testAgainstNN 0 f = 0\n[PROOFSTEP]\nsimp only [testAgainstNN, toMeasure_zero, lintegral_zero_measure, ENNReal.zero_toNNReal]\n[GOAL]\nΩ : Type u_1\ninst✝⁵ : MeasurableSpace Ω\nR : Type u_2\ninst✝⁴ : SMul R ℝ≥0\ninst✝³ : SMul R ℝ≥0∞\ninst✝² : IsScalarTower R ℝ≥0 ℝ≥0∞\ninst✝¹ : IsScalarTower R ℝ≥0∞ ℝ≥0∞\ninst✝ : TopologicalSpace Ω\n⊢ testAgainstNN 0 = 0\n[PROOFSTEP]\nfunext\n[GOAL]\ncase h\nΩ : Type u_1\ninst✝⁵ : MeasurableSpace Ω\nR : Type u_2\ninst✝⁴ : SMul R ℝ≥0\ninst✝³ : SMul R ℝ≥0∞\ninst✝² : IsScalarTower R ℝ≥0 ℝ≥0∞\ninst✝¹ : IsScalarTower R ℝ≥0∞ ℝ≥0∞\ninst✝ : TopologicalSpace Ω\nx✝ : Ω →ᵇ ℝ≥0\n⊢ testAgainstNN 0 x✝ = OfNat.ofNat 0 x✝\n[PROOFSTEP]\nsimp only [zero_testAgainstNN_apply, Pi.zero_apply]\n[GOAL]\nΩ : Type u_1\ninst✝⁵ : MeasurableSpace Ω\nR : Type u_2\ninst✝⁴ : SMul R ℝ≥0\ninst✝³ : SMul R ℝ≥0∞\ninst✝² : IsScalarTower R ℝ≥0 ℝ≥0∞\ninst✝¹ : IsScalarTower R ℝ≥0∞ ℝ≥0∞\ninst✝ : TopologicalSpace Ω\nc : ℝ≥0\nμ : FiniteMeasure Ω\nf : Ω →ᵇ ℝ≥0\n⊢ testAgainstNN (c • μ) f = c • testAgainstNN μ f\n[PROOFSTEP]\nsimp only [testAgainstNN, toMeasure_smul, smul_eq_mul, ← ENNReal.smul_toNNReal, ENNReal.smul_def,\n  lintegral_smul_measure]\n[GOAL]\nΩ : Type u_1\ninst✝⁶ : MeasurableSpace Ω\nR : Type u_2\ninst✝⁵ : SMul R ℝ≥0\ninst✝⁴ : SMul R ℝ≥0∞\ninst✝³ : IsScalarTower R ℝ≥0 ℝ≥0∞\ninst✝² : IsScalarTower R ℝ≥0∞ ℝ≥0∞\ninst✝¹ : TopologicalSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nμ : FiniteMeasure Ω\nf₁ f₂ : Ω →ᵇ ℝ≥0\n⊢ testAgainstNN μ (f₁ + f₂) = testAgainstNN μ f₁ + testAgainstNN μ f₂\n[PROOFSTEP]\nsimp only [← ENNReal.coe_eq_coe, BoundedContinuousFunction.coe_add, ENNReal.coe_add, Pi.add_apply, testAgainstNN_coe_eq]\n[GOAL]\nΩ : Type u_1\ninst✝⁶ : MeasurableSpace Ω\nR : Type u_2\ninst✝⁵ : SMul R ℝ≥0\ninst✝⁴ : SMul R ℝ≥0∞\ninst✝³ : IsScalarTower R ℝ≥0 ℝ≥0∞\ninst✝² : IsScalarTower R ℝ≥0∞ ℝ≥0∞\ninst✝¹ : TopologicalSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nμ : FiniteMeasure Ω\nf₁ f₂ : Ω →ᵇ ℝ≥0\n⊢ ∫⁻ (ω : Ω), ↑(↑f₁ ω) + ↑(↑f₂ ω) ∂↑μ = ∫⁻ (ω : Ω), ↑(↑f₁ ω) ∂↑μ + ∫⁻ (ω : Ω), ↑(↑f₂ ω) ∂↑μ\n[PROOFSTEP]\nexact lintegral_add_left (BoundedContinuousFunction.NNReal.coe_ennreal_comp_measurable _) _\n[GOAL]\nΩ : Type u_1\ninst✝¹⁰ : MeasurableSpace Ω\nR : Type u_2\ninst✝⁹ : SMul R ℝ≥0\ninst✝⁸ : SMul R ℝ≥0∞\ninst✝⁷ : IsScalarTower R ℝ≥0 ℝ≥0∞\ninst✝⁶ : IsScalarTower R ℝ≥0∞ ℝ≥0∞\ninst✝⁵ : TopologicalSpace Ω\ninst✝⁴ : OpensMeasurableSpace Ω\ninst✝³ : IsScalarTower R ℝ≥0 ℝ≥0\ninst✝² : PseudoMetricSpace R\ninst✝¹ : Zero R\ninst✝ : BoundedSMul R ℝ≥0\nμ : FiniteMeasure Ω\nc : R\nf : Ω →ᵇ ℝ≥0\n⊢ testAgainstNN μ (c • f) = c • testAgainstNN μ f\n[PROOFSTEP]\nsimp only [← ENNReal.coe_eq_coe, BoundedContinuousFunction.coe_smul, testAgainstNN_coe_eq, ENNReal.coe_smul]\n[GOAL]\nΩ : Type u_1\ninst✝¹⁰ : MeasurableSpace Ω\nR : Type u_2\ninst✝⁹ : SMul R ℝ≥0\ninst✝⁸ : SMul R ℝ≥0∞\ninst✝⁷ : IsScalarTower R ℝ≥0 ℝ≥0∞\ninst✝⁶ : IsScalarTower R ℝ≥0∞ ℝ≥0∞\ninst✝⁵ : TopologicalSpace Ω\ninst✝⁴ : OpensMeasurableSpace Ω\ninst✝³ : IsScalarTower R ℝ≥0 ℝ≥0\ninst✝² : PseudoMetricSpace R\ninst✝¹ : Zero R\ninst✝ : BoundedSMul R ℝ≥0\nμ : FiniteMeasure Ω\nc : R\nf : Ω →ᵇ ℝ≥0\n⊢ ∫⁻ (ω : Ω), c • ↑(↑f ω) ∂↑μ = c • ∫⁻ (ω : Ω), ↑(↑f ω) ∂↑μ\n[PROOFSTEP]\nsimp_rw [← smul_one_smul ℝ≥0∞ c (f _ : ℝ≥0∞), ← smul_one_smul ℝ≥0∞ c (lintegral _ _ : ℝ≥0∞), smul_eq_mul]\n[GOAL]\nΩ : Type u_1\ninst✝¹⁰ : MeasurableSpace Ω\nR : Type u_2\ninst✝⁹ : SMul R ℝ≥0\ninst✝⁸ : SMul R ℝ≥0∞\ninst✝⁷ : IsScalarTower R ℝ≥0 ℝ≥0∞\ninst✝⁶ : IsScalarTower R ℝ≥0∞ ℝ≥0∞\ninst✝⁵ : TopologicalSpace Ω\ninst✝⁴ : OpensMeasurableSpace Ω\ninst✝³ : IsScalarTower R ℝ≥0 ℝ≥0\ninst✝² : PseudoMetricSpace R\ninst✝¹ : Zero R\ninst✝ : BoundedSMul R ℝ≥0\nμ : FiniteMeasure Ω\nc : R\nf : Ω →ᵇ ℝ≥0\n⊢ ∫⁻ (ω : Ω), c • 1 * ↑(↑f ω) ∂↑μ = c • 1 * ∫⁻ (ω : Ω), ↑(↑f ω) ∂↑μ\n[PROOFSTEP]\nexact\n  @lintegral_const_mul _ _ (μ : Measure Ω) (c • (1 : ℝ≥0∞)) _\n    (BoundedContinuousFunction.NNReal.coe_ennreal_comp_measurable f)\n[GOAL]\nΩ : Type u_1\ninst✝⁶ : MeasurableSpace Ω\nR : Type u_2\ninst✝⁵ : SMul R ℝ≥0\ninst✝⁴ : SMul R ℝ≥0∞\ninst✝³ : IsScalarTower R ℝ≥0 ℝ≥0∞\ninst✝² : IsScalarTower R ℝ≥0∞ ℝ≥0∞\ninst✝¹ : TopologicalSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nμ : FiniteMeasure Ω\nf g : Ω →ᵇ ℝ≥0\n⊢ testAgainstNN μ f ≤ testAgainstNN μ g + nndist f g * mass μ\n[PROOFSTEP]\nsimp only [← μ.testAgainstNN_const (nndist f g), ← testAgainstNN_add, ← ENNReal.coe_le_coe,\n  BoundedContinuousFunction.coe_add, const_apply, ENNReal.coe_add, Pi.add_apply, coe_nnreal_ennreal_nndist,\n  testAgainstNN_coe_eq]\n[GOAL]\nΩ : Type u_1\ninst✝⁶ : MeasurableSpace Ω\nR : Type u_2\ninst✝⁵ : SMul R ℝ≥0\ninst✝⁴ : SMul R ℝ≥0∞\ninst✝³ : IsScalarTower R ℝ≥0 ℝ≥0∞\ninst✝² : IsScalarTower R ℝ≥0∞ ℝ≥0∞\ninst✝¹ : TopologicalSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nμ : FiniteMeasure Ω\nf g : Ω →ᵇ ℝ≥0\n⊢ ∫⁻ (ω : Ω), ↑(↑f ω) ∂↑μ ≤ ∫⁻ (ω : Ω), ↑(↑g ω) + edist f g ∂↑μ\n[PROOFSTEP]\napply lintegral_mono\n[GOAL]\ncase hfg\nΩ : Type u_1\ninst✝⁶ : MeasurableSpace Ω\nR : Type u_2\ninst✝⁵ : SMul R ℝ≥0\ninst✝⁴ : SMul R ℝ≥0∞\ninst✝³ : IsScalarTower R ℝ≥0 ℝ≥0∞\ninst✝² : IsScalarTower R ℝ≥0∞ ℝ≥0∞\ninst✝¹ : TopologicalSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nμ : FiniteMeasure Ω\nf g : Ω →ᵇ ℝ≥0\n⊢ (fun a => ↑(↑f a)) ≤ fun a => ↑(↑g a) + edist f g\n[PROOFSTEP]\nhave le_dist : ∀ ω, dist (f ω) (g ω) ≤ nndist f g := BoundedContinuousFunction.dist_coe_le_dist\n[GOAL]\ncase hfg\nΩ : Type u_1\ninst✝⁶ : MeasurableSpace Ω\nR : Type u_2\ninst✝⁵ : SMul R ℝ≥0\ninst✝⁴ : SMul R ℝ≥0∞\ninst✝³ : IsScalarTower R ℝ≥0 ℝ≥0∞\ninst✝² : IsScalarTower R ℝ≥0∞ ℝ≥0∞\ninst✝¹ : TopologicalSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nμ : FiniteMeasure Ω\nf g : Ω →ᵇ ℝ≥0\nle_dist : ∀ (ω : Ω), dist (↑f ω) (↑g ω) ≤ ↑(nndist f g)\n⊢ (fun a => ↑(↑f a)) ≤ fun a => ↑(↑g a) + edist f g\n[PROOFSTEP]\nintro ω\n[GOAL]\ncase hfg\nΩ : Type u_1\ninst✝⁶ : MeasurableSpace Ω\nR : Type u_2\ninst✝⁵ : SMul R ℝ≥0\ninst✝⁴ : SMul R ℝ≥0∞\ninst✝³ : IsScalarTower R ℝ≥0 ℝ≥0∞\ninst✝² : IsScalarTower R ℝ≥0∞ ℝ≥0∞\ninst✝¹ : TopologicalSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nμ : FiniteMeasure Ω\nf g : Ω →ᵇ ℝ≥0\nle_dist : ∀ (ω : Ω), dist (↑f ω) (↑g ω) ≤ ↑(nndist f g)\nω : Ω\n⊢ (fun a => ↑(↑f a)) ω ≤ (fun a => ↑(↑g a) + edist f g) ω\n[PROOFSTEP]\nhave le' : f ω ≤ g ω + nndist f g :=\n  by\n  apply (NNReal.le_add_nndist (f ω) (g ω)).trans\n  rw [add_le_add_iff_left]\n  exact dist_le_coe.mp (le_dist ω)\n[GOAL]\nΩ : Type u_1\ninst✝⁶ : MeasurableSpace Ω\nR : Type u_2\ninst✝⁵ : SMul R ℝ≥0\ninst✝⁴ : SMul R ℝ≥0∞\ninst✝³ : IsScalarTower R ℝ≥0 ℝ≥0∞\ninst✝² : IsScalarTower R ℝ≥0∞ ℝ≥0∞\ninst✝¹ : TopologicalSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nμ : FiniteMeasure Ω\nf g : Ω →ᵇ ℝ≥0\nle_dist : ∀ (ω : Ω), dist (↑f ω) (↑g ω) ≤ ↑(nndist f g)\nω : Ω\n⊢ ↑f ω ≤ ↑g ω + nndist f g\n[PROOFSTEP]\napply (NNReal.le_add_nndist (f ω) (g ω)).trans\n[GOAL]\nΩ : Type u_1\ninst✝⁶ : MeasurableSpace Ω\nR : Type u_2\ninst✝⁵ : SMul R ℝ≥0\ninst✝⁴ : SMul R ℝ≥0∞\ninst✝³ : IsScalarTower R ℝ≥0 ℝ≥0∞\ninst✝² : IsScalarTower R ℝ≥0∞ ℝ≥0∞\ninst✝¹ : TopologicalSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nμ : FiniteMeasure Ω\nf g : Ω →ᵇ ℝ≥0\nle_dist : ∀ (ω : Ω), dist (↑f ω) (↑g ω) ≤ ↑(nndist f g)\nω : Ω\n⊢ ↑g ω + nndist (↑f ω) (↑g ω) ≤ ↑g ω + nndist f g\n[PROOFSTEP]\nrw [add_le_add_iff_left]\n[GOAL]\nΩ : Type u_1\ninst✝⁶ : MeasurableSpace Ω\nR : Type u_2\ninst✝⁵ : SMul R ℝ≥0\ninst✝⁴ : SMul R ℝ≥0∞\ninst✝³ : IsScalarTower R ℝ≥0 ℝ≥0∞\ninst✝² : IsScalarTower R ℝ≥0∞ ℝ≥0∞\ninst✝¹ : TopologicalSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nμ : FiniteMeasure Ω\nf g : Ω →ᵇ ℝ≥0\nle_dist : ∀ (ω : Ω), dist (↑f ω) (↑g ω) ≤ ↑(nndist f g)\nω : Ω\n⊢ nndist (↑f ω) (↑g ω) ≤ nndist f g\n[PROOFSTEP]\nexact dist_le_coe.mp (le_dist ω)\n[GOAL]\ncase hfg\nΩ : Type u_1\ninst✝⁶ : MeasurableSpace Ω\nR : Type u_2\ninst✝⁵ : SMul R ℝ≥0\ninst✝⁴ : SMul R ℝ≥0∞\ninst✝³ : IsScalarTower R ℝ≥0 ℝ≥0∞\ninst✝² : IsScalarTower R ℝ≥0∞ ℝ≥0∞\ninst✝¹ : TopologicalSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nμ : FiniteMeasure Ω\nf g : Ω →ᵇ ℝ≥0\nle_dist : ∀ (ω : Ω), dist (↑f ω) (↑g ω) ≤ ↑(nndist f g)\nω : Ω\nle' : ↑f ω ≤ ↑g ω + nndist f g\n⊢ (fun a => ↑(↑f a)) ω ≤ (fun a => ↑(↑g a) + edist f g) ω\n[PROOFSTEP]\nhave le : (f ω : ℝ≥0∞) ≤ (g ω : ℝ≥0∞) + nndist f g := by rw [← ENNReal.coe_add]; exact ENNReal.coe_mono le'\n[GOAL]\nΩ : Type u_1\ninst✝⁶ : MeasurableSpace Ω\nR : Type u_2\ninst✝⁵ : SMul R ℝ≥0\ninst✝⁴ : SMul R ℝ≥0∞\ninst✝³ : IsScalarTower R ℝ≥0 ℝ≥0∞\ninst✝² : IsScalarTower R ℝ≥0∞ ℝ≥0∞\ninst✝¹ : TopologicalSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nμ : FiniteMeasure Ω\nf g : Ω →ᵇ ℝ≥0\nle_dist : ∀ (ω : Ω), dist (↑f ω) (↑g ω) ≤ ↑(nndist f g)\nω : Ω\nle' : ↑f ω ≤ ↑g ω + nndist f g\n⊢ ↑(↑f ω) ≤ ↑(↑g ω) + ↑(nndist f g)\n[PROOFSTEP]\nrw [← ENNReal.coe_add]\n[GOAL]\nΩ : Type u_1\ninst✝⁶ : MeasurableSpace Ω\nR : Type u_2\ninst✝⁵ : SMul R ℝ≥0\ninst✝⁴ : SMul R ℝ≥0∞\ninst✝³ : IsScalarTower R ℝ≥0 ℝ≥0∞\ninst✝² : IsScalarTower R ℝ≥0∞ ℝ≥0∞\ninst✝¹ : TopologicalSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nμ : FiniteMeasure Ω\nf g : Ω →ᵇ ℝ≥0\nle_dist : ∀ (ω : Ω), dist (↑f ω) (↑g ω) ≤ ↑(nndist f g)\nω : Ω\nle' : ↑f ω ≤ ↑g ω + nndist f g\n⊢ ↑(↑f ω) ≤ ↑(↑g ω + nndist f g)\n[PROOFSTEP]\nexact ENNReal.coe_mono le'\n[GOAL]\ncase hfg\nΩ : Type u_1\ninst✝⁶ : MeasurableSpace Ω\nR : Type u_2\ninst✝⁵ : SMul R ℝ≥0\ninst✝⁴ : SMul R ℝ≥0∞\ninst✝³ : IsScalarTower R ℝ≥0 ℝ≥0∞\ninst✝² : IsScalarTower R ℝ≥0∞ ℝ≥0∞\ninst✝¹ : TopologicalSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nμ : FiniteMeasure Ω\nf g : Ω →ᵇ ℝ≥0\nle_dist : ∀ (ω : Ω), dist (↑f ω) (↑g ω) ≤ ↑(nndist f g)\nω : Ω\nle' : ↑f ω ≤ ↑g ω + nndist f g\nle : ↑(↑f ω) ≤ ↑(↑g ω) + ↑(nndist f g)\n⊢ (fun a => ↑(↑f a)) ω ≤ (fun a => ↑(↑g a) + edist f g) ω\n[PROOFSTEP]\nrwa [coe_nnreal_ennreal_nndist] at le \n[GOAL]\nΩ : Type u_1\ninst✝⁶ : MeasurableSpace Ω\nR : Type u_2\ninst✝⁵ : SMul R ℝ≥0\ninst✝⁴ : SMul R ℝ≥0∞\ninst✝³ : IsScalarTower R ℝ≥0 ℝ≥0∞\ninst✝² : IsScalarTower R ℝ≥0∞ ℝ≥0∞\ninst✝¹ : TopologicalSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nμ : FiniteMeasure Ω\n⊢ LipschitzWith (mass μ) fun f => testAgainstNN μ f\n[PROOFSTEP]\nrw [lipschitzWith_iff_dist_le_mul]\n[GOAL]\nΩ : Type u_1\ninst✝⁶ : MeasurableSpace Ω\nR : Type u_2\ninst✝⁵ : SMul R ℝ≥0\ninst✝⁴ : SMul R ℝ≥0∞\ninst✝³ : IsScalarTower R ℝ≥0 ℝ≥0∞\ninst✝² : IsScalarTower R ℝ≥0∞ ℝ≥0∞\ninst✝¹ : TopologicalSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nμ : FiniteMeasure Ω\n⊢ ∀ (x y : Ω →ᵇ ℝ≥0), dist (testAgainstNN μ x) (testAgainstNN μ y) ≤ ↑(mass μ) * dist x y\n[PROOFSTEP]\nintro f₁ f₂\n[GOAL]\nΩ : Type u_1\ninst✝⁶ : MeasurableSpace Ω\nR : Type u_2\ninst✝⁵ : SMul R ℝ≥0\ninst✝⁴ : SMul R ℝ≥0∞\ninst✝³ : IsScalarTower R ℝ≥0 ℝ≥0∞\ninst✝² : IsScalarTower R ℝ≥0∞ ℝ≥0∞\ninst✝¹ : TopologicalSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nμ : FiniteMeasure Ω\nf₁ f₂ : Ω →ᵇ ℝ≥0\n⊢ dist (testAgainstNN μ f₁) (testAgainstNN μ f₂) ≤ ↑(mass μ) * dist f₁ f₂\n[PROOFSTEP]\nsuffices abs (μ.testAgainstNN f₁ - μ.testAgainstNN f₂ : ℝ) ≤ μ.mass * dist f₁ f₂ by rwa [NNReal.dist_eq]\n[GOAL]\nΩ : Type u_1\ninst✝⁶ : MeasurableSpace Ω\nR : Type u_2\ninst✝⁵ : SMul R ℝ≥0\ninst✝⁴ : SMul R ℝ≥0∞\ninst✝³ : IsScalarTower R ℝ≥0 ℝ≥0∞\ninst✝² : IsScalarTower R ℝ≥0∞ ℝ≥0∞\ninst✝¹ : TopologicalSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nμ : FiniteMeasure Ω\nf₁ f₂ : Ω →ᵇ ℝ≥0\nthis : |↑(testAgainstNN μ f₁) - ↑(testAgainstNN μ f₂)| ≤ ↑(mass μ) * dist f₁ f₂\n⊢ dist (testAgainstNN μ f₁) (testAgainstNN μ f₂) ≤ ↑(mass μ) * dist f₁ f₂\n[PROOFSTEP]\nrwa [NNReal.dist_eq]\n[GOAL]\nΩ : Type u_1\ninst✝⁶ : MeasurableSpace Ω\nR : Type u_2\ninst✝⁵ : SMul R ℝ≥0\ninst✝⁴ : SMul R ℝ≥0∞\ninst✝³ : IsScalarTower R ℝ≥0 ℝ≥0∞\ninst✝² : IsScalarTower R ℝ≥0∞ ℝ≥0∞\ninst✝¹ : TopologicalSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nμ : FiniteMeasure Ω\nf₁ f₂ : Ω →ᵇ ℝ≥0\n⊢ |↑(testAgainstNN μ f₁) - ↑(testAgainstNN μ f₂)| ≤ ↑(mass μ) * dist f₁ f₂\n[PROOFSTEP]\napply abs_le.mpr\n[GOAL]\nΩ : Type u_1\ninst✝⁶ : MeasurableSpace Ω\nR : Type u_2\ninst✝⁵ : SMul R ℝ≥0\ninst✝⁴ : SMul R ℝ≥0∞\ninst✝³ : IsScalarTower R ℝ≥0 ℝ≥0∞\ninst✝² : IsScalarTower R ℝ≥0∞ ℝ≥0∞\ninst✝¹ : TopologicalSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nμ : FiniteMeasure Ω\nf₁ f₂ : Ω →ᵇ ℝ≥0\n⊢ -(↑(mass μ) * dist f₁ f₂) ≤ ↑(testAgainstNN μ f₁) - ↑(testAgainstNN μ f₂) ∧\n    ↑(testAgainstNN μ f₁) - ↑(testAgainstNN μ f₂) ≤ ↑(mass μ) * dist f₁ f₂\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase left\nΩ : Type u_1\ninst✝⁶ : MeasurableSpace Ω\nR : Type u_2\ninst✝⁵ : SMul R ℝ≥0\ninst✝⁴ : SMul R ℝ≥0∞\ninst✝³ : IsScalarTower R ℝ≥0 ℝ≥0∞\ninst✝² : IsScalarTower R ℝ≥0∞ ℝ≥0∞\ninst✝¹ : TopologicalSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nμ : FiniteMeasure Ω\nf₁ f₂ : Ω →ᵇ ℝ≥0\n⊢ -(↑(mass μ) * dist f₁ f₂) ≤ ↑(testAgainstNN μ f₁) - ↑(testAgainstNN μ f₂)\n[PROOFSTEP]\nhave key' := μ.testAgainstNN_lipschitz_estimate f₂ f₁\n[GOAL]\ncase left\nΩ : Type u_1\ninst✝⁶ : MeasurableSpace Ω\nR : Type u_2\ninst✝⁵ : SMul R ℝ≥0\ninst✝⁴ : SMul R ℝ≥0∞\ninst✝³ : IsScalarTower R ℝ≥0 ℝ≥0∞\ninst✝² : IsScalarTower R ℝ≥0∞ ℝ≥0∞\ninst✝¹ : TopologicalSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nμ : FiniteMeasure Ω\nf₁ f₂ : Ω →ᵇ ℝ≥0\nkey' : testAgainstNN μ f₂ ≤ testAgainstNN μ f₁ + nndist f₂ f₁ * mass μ\n⊢ -(↑(mass μ) * dist f₁ f₂) ≤ ↑(testAgainstNN μ f₁) - ↑(testAgainstNN μ f₂)\n[PROOFSTEP]\nrw [mul_comm] at key' \n[GOAL]\ncase left\nΩ : Type u_1\ninst✝⁶ : MeasurableSpace Ω\nR : Type u_2\ninst✝⁵ : SMul R ℝ≥0\ninst✝⁴ : SMul R ℝ≥0∞\ninst✝³ : IsScalarTower R ℝ≥0 ℝ≥0∞\ninst✝² : IsScalarTower R ℝ≥0∞ ℝ≥0∞\ninst✝¹ : TopologicalSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nμ : FiniteMeasure Ω\nf₁ f₂ : Ω →ᵇ ℝ≥0\nkey' : testAgainstNN μ f₂ ≤ testAgainstNN μ f₁ + mass μ * nndist f₂ f₁\n⊢ -(↑(mass μ) * dist f₁ f₂) ≤ ↑(testAgainstNN μ f₁) - ↑(testAgainstNN μ f₂)\n[PROOFSTEP]\nsuffices ↑(μ.testAgainstNN f₂) ≤ ↑(μ.testAgainstNN f₁) + ↑μ.mass * dist f₁ f₂ by linarith\n[GOAL]\nΩ : Type u_1\ninst✝⁶ : MeasurableSpace Ω\nR : Type u_2\ninst✝⁵ : SMul R ℝ≥0\ninst✝⁴ : SMul R ℝ≥0∞\ninst✝³ : IsScalarTower R ℝ≥0 ℝ≥0∞\ninst✝² : IsScalarTower R ℝ≥0∞ ℝ≥0∞\ninst✝¹ : TopologicalSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nμ : FiniteMeasure Ω\nf₁ f₂ : Ω →ᵇ ℝ≥0\nkey' : testAgainstNN μ f₂ ≤ testAgainstNN μ f₁ + mass μ * nndist f₂ f₁\nthis : ↑(testAgainstNN μ f₂) ≤ ↑(testAgainstNN μ f₁) + ↑(mass μ) * dist f₁ f₂\n⊢ -(↑(mass μ) * dist f₁ f₂) ≤ ↑(testAgainstNN μ f₁) - ↑(testAgainstNN μ f₂)\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase left\nΩ : Type u_1\ninst✝⁶ : MeasurableSpace Ω\nR : Type u_2\ninst✝⁵ : SMul R ℝ≥0\ninst✝⁴ : SMul R ℝ≥0∞\ninst✝³ : IsScalarTower R ℝ≥0 ℝ≥0∞\ninst✝² : IsScalarTower R ℝ≥0∞ ℝ≥0∞\ninst✝¹ : TopologicalSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nμ : FiniteMeasure Ω\nf₁ f₂ : Ω →ᵇ ℝ≥0\nkey' : testAgainstNN μ f₂ ≤ testAgainstNN μ f₁ + mass μ * nndist f₂ f₁\n⊢ ↑(testAgainstNN μ f₂) ≤ ↑(testAgainstNN μ f₁) + ↑(mass μ) * dist f₁ f₂\n[PROOFSTEP]\nhave key := NNReal.coe_mono key'\n[GOAL]\ncase left\nΩ : Type u_1\ninst✝⁶ : MeasurableSpace Ω\nR : Type u_2\ninst✝⁵ : SMul R ℝ≥0\ninst✝⁴ : SMul R ℝ≥0∞\ninst✝³ : IsScalarTower R ℝ≥0 ℝ≥0∞\ninst✝² : IsScalarTower R ℝ≥0∞ ℝ≥0∞\ninst✝¹ : TopologicalSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nμ : FiniteMeasure Ω\nf₁ f₂ : Ω →ᵇ ℝ≥0\nkey' : testAgainstNN μ f₂ ≤ testAgainstNN μ f₁ + mass μ * nndist f₂ f₁\nkey : ↑(testAgainstNN μ f₂) ≤ ↑(testAgainstNN μ f₁ + mass μ * nndist f₂ f₁)\n⊢ ↑(testAgainstNN μ f₂) ≤ ↑(testAgainstNN μ f₁) + ↑(mass μ) * dist f₁ f₂\n[PROOFSTEP]\nrwa [NNReal.coe_add, NNReal.coe_mul, nndist_comm] at key \n[GOAL]\ncase right\nΩ : Type u_1\ninst✝⁶ : MeasurableSpace Ω\nR : Type u_2\ninst✝⁵ : SMul R ℝ≥0\ninst✝⁴ : SMul R ℝ≥0∞\ninst✝³ : IsScalarTower R ℝ≥0 ℝ≥0∞\ninst✝² : IsScalarTower R ℝ≥0∞ ℝ≥0∞\ninst✝¹ : TopologicalSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nμ : FiniteMeasure Ω\nf₁ f₂ : Ω →ᵇ ℝ≥0\n⊢ ↑(testAgainstNN μ f₁) - ↑(testAgainstNN μ f₂) ≤ ↑(mass μ) * dist f₁ f₂\n[PROOFSTEP]\nhave key' := μ.testAgainstNN_lipschitz_estimate f₁ f₂\n[GOAL]\ncase right\nΩ : Type u_1\ninst✝⁶ : MeasurableSpace Ω\nR : Type u_2\ninst✝⁵ : SMul R ℝ≥0\ninst✝⁴ : SMul R ℝ≥0∞\ninst✝³ : IsScalarTower R ℝ≥0 ℝ≥0∞\ninst✝² : IsScalarTower R ℝ≥0∞ ℝ≥0∞\ninst✝¹ : TopologicalSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nμ : FiniteMeasure Ω\nf₁ f₂ : Ω →ᵇ ℝ≥0\nkey' : testAgainstNN μ f₁ ≤ testAgainstNN μ f₂ + nndist f₁ f₂ * mass μ\n⊢ ↑(testAgainstNN μ f₁) - ↑(testAgainstNN μ f₂) ≤ ↑(mass μ) * dist f₁ f₂\n[PROOFSTEP]\nrw [mul_comm] at key' \n[GOAL]\ncase right\nΩ : Type u_1\ninst✝⁶ : MeasurableSpace Ω\nR : Type u_2\ninst✝⁵ : SMul R ℝ≥0\ninst✝⁴ : SMul R ℝ≥0∞\ninst✝³ : IsScalarTower R ℝ≥0 ℝ≥0∞\ninst✝² : IsScalarTower R ℝ≥0∞ ℝ≥0∞\ninst✝¹ : TopologicalSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nμ : FiniteMeasure Ω\nf₁ f₂ : Ω →ᵇ ℝ≥0\nkey' : testAgainstNN μ f₁ ≤ testAgainstNN μ f₂ + mass μ * nndist f₁ f₂\n⊢ ↑(testAgainstNN μ f₁) - ↑(testAgainstNN μ f₂) ≤ ↑(mass μ) * dist f₁ f₂\n[PROOFSTEP]\nsuffices ↑(μ.testAgainstNN f₁) ≤ ↑(μ.testAgainstNN f₂) + ↑μ.mass * dist f₁ f₂ by linarith\n[GOAL]\nΩ : Type u_1\ninst✝⁶ : MeasurableSpace Ω\nR : Type u_2\ninst✝⁵ : SMul R ℝ≥0\ninst✝⁴ : SMul R ℝ≥0∞\ninst✝³ : IsScalarTower R ℝ≥0 ℝ≥0∞\ninst✝² : IsScalarTower R ℝ≥0∞ ℝ≥0∞\ninst✝¹ : TopologicalSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nμ : FiniteMeasure Ω\nf₁ f₂ : Ω →ᵇ ℝ≥0\nkey' : testAgainstNN μ f₁ ≤ testAgainstNN μ f₂ + mass μ * nndist f₁ f₂\nthis : ↑(testAgainstNN μ f₁) ≤ ↑(testAgainstNN μ f₂) + ↑(mass μ) * dist f₁ f₂\n⊢ ↑(testAgainstNN μ f₁) - ↑(testAgainstNN μ f₂) ≤ ↑(mass μ) * dist f₁ f₂\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase right\nΩ : Type u_1\ninst✝⁶ : MeasurableSpace Ω\nR : Type u_2\ninst✝⁵ : SMul R ℝ≥0\ninst✝⁴ : SMul R ℝ≥0∞\ninst✝³ : IsScalarTower R ℝ≥0 ℝ≥0∞\ninst✝² : IsScalarTower R ℝ≥0∞ ℝ≥0∞\ninst✝¹ : TopologicalSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nμ : FiniteMeasure Ω\nf₁ f₂ : Ω →ᵇ ℝ≥0\nkey' : testAgainstNN μ f₁ ≤ testAgainstNN μ f₂ + mass μ * nndist f₁ f₂\n⊢ ↑(testAgainstNN μ f₁) ≤ ↑(testAgainstNN μ f₂) + ↑(mass μ) * dist f₁ f₂\n[PROOFSTEP]\nhave key := NNReal.coe_mono key'\n[GOAL]\ncase right\nΩ : Type u_1\ninst✝⁶ : MeasurableSpace Ω\nR : Type u_2\ninst✝⁵ : SMul R ℝ≥0\ninst✝⁴ : SMul R ℝ≥0∞\ninst✝³ : IsScalarTower R ℝ≥0 ℝ≥0∞\ninst✝² : IsScalarTower R ℝ≥0∞ ℝ≥0∞\ninst✝¹ : TopologicalSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nμ : FiniteMeasure Ω\nf₁ f₂ : Ω →ᵇ ℝ≥0\nkey' : testAgainstNN μ f₁ ≤ testAgainstNN μ f₂ + mass μ * nndist f₁ f₂\nkey : ↑(testAgainstNN μ f₁) ≤ ↑(testAgainstNN μ f₂ + mass μ * nndist f₁ f₂)\n⊢ ↑(testAgainstNN μ f₁) ≤ ↑(testAgainstNN μ f₂) + ↑(mass μ) * dist f₁ f₂\n[PROOFSTEP]\nrwa [NNReal.coe_add, NNReal.coe_mul] at key \n[GOAL]\nΩ : Type u_1\ninst✝⁶ : MeasurableSpace Ω\nR : Type u_2\ninst✝⁵ : SMul R ℝ≥0\ninst✝⁴ : SMul R ℝ≥0∞\ninst✝³ : IsScalarTower R ℝ≥0 ℝ≥0∞\ninst✝² : IsScalarTower R ℝ≥0∞ ℝ≥0∞\ninst✝¹ : TopologicalSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nf : Ω →ᵇ ℝ≥0\n⊢ Continuous fun μ => testAgainstNN μ f\n[PROOFSTEP]\nshow Continuous ((fun φ : WeakDual ℝ≥0 (Ω →ᵇ ℝ≥0) => φ f) ∘ toWeakDualBCNN)\n[GOAL]\nΩ : Type u_1\ninst✝⁶ : MeasurableSpace Ω\nR : Type u_2\ninst✝⁵ : SMul R ℝ≥0\ninst✝⁴ : SMul R ℝ≥0∞\ninst✝³ : IsScalarTower R ℝ≥0 ℝ≥0∞\ninst✝² : IsScalarTower R ℝ≥0∞ ℝ≥0∞\ninst✝¹ : TopologicalSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nf : Ω →ᵇ ℝ≥0\n⊢ Continuous ((fun φ => ↑φ f) ∘ toWeakDualBCNN)\n[PROOFSTEP]\nrefine Continuous.comp ?_ (toWeakDualBCNN_continuous (Ω := Ω))\n[GOAL]\nΩ : Type u_1\ninst✝⁶ : MeasurableSpace Ω\nR : Type u_2\ninst✝⁵ : SMul R ℝ≥0\ninst✝⁴ : SMul R ℝ≥0∞\ninst✝³ : IsScalarTower R ℝ≥0 ℝ≥0∞\ninst✝² : IsScalarTower R ℝ≥0∞ ℝ≥0∞\ninst✝¹ : TopologicalSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nf : Ω →ᵇ ℝ≥0\n⊢ Continuous fun φ => ↑φ f\n[PROOFSTEP]\nexact\n  @WeakBilin.eval_continuous _ _ _ _ _ _ ContinuousLinearMap.module _ _ _\n    _\n      /- porting note: without explicitly providing `ContinuousLinearMap.module`, TC synthesis times\n        out trying to find `Module ℝ≥0 ((Ω →ᵇ ℝ≥0) →L[ℝ≥0] ℝ≥0)`, but it can find it with enough time:\n        `set_option synthInstance.maxHeartbeats 47000` was sufficient. -/\n[GOAL]\nΩ : Type u_1\ninst✝⁶ : MeasurableSpace Ω\nR : Type u_2\ninst✝⁵ : SMul R ℝ≥0\ninst✝⁴ : SMul R ℝ≥0∞\ninst✝³ : IsScalarTower R ℝ≥0 ℝ≥0∞\ninst✝² : IsScalarTower R ℝ≥0∞ ℝ≥0∞\ninst✝¹ : TopologicalSpace Ω\ninst✝ : OpensMeasurableSpace Ω\n⊢ Continuous fun μ => mass μ\n[PROOFSTEP]\nsimp_rw [← testAgainstNN_one]\n[GOAL]\nΩ : Type u_1\ninst✝⁶ : MeasurableSpace Ω\nR : Type u_2\ninst✝⁵ : SMul R ℝ≥0\ninst✝⁴ : SMul R ℝ≥0∞\ninst✝³ : IsScalarTower R ℝ≥0 ℝ≥0∞\ninst✝² : IsScalarTower R ℝ≥0∞ ℝ≥0∞\ninst✝¹ : TopologicalSpace Ω\ninst✝ : OpensMeasurableSpace Ω\n⊢ Continuous fun μ => testAgainstNN μ 1\n[PROOFSTEP]\nexact continuous_testAgainstNN_eval 1\n[GOAL]\nΩ : Type u_1\ninst✝⁶ : MeasurableSpace Ω\nR : Type u_2\ninst✝⁵ : SMul R ℝ≥0\ninst✝⁴ : SMul R ℝ≥0∞\ninst✝³ : IsScalarTower R ℝ≥0 ℝ≥0∞\ninst✝² : IsScalarTower R ℝ≥0∞ ℝ≥0∞\ninst✝¹ : TopologicalSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nγ : Type u_3\nF : Filter γ\nμs : γ → FiniteMeasure Ω\nμ : FiniteMeasure Ω\n⊢ Tendsto μs F (𝓝 μ) ↔ ∀ (f : Ω →ᵇ ℝ≥0), Tendsto (fun i => ↑(toWeakDualBCNN (μs i)) f) F (𝓝 (↑(toWeakDualBCNN μ) f))\n[PROOFSTEP]\nrw [tendsto_iff_weak_star_tendsto, tendsto_iff_forall_eval_tendsto_topDualPairing]\n[GOAL]\nΩ : Type u_1\ninst✝⁶ : MeasurableSpace Ω\nR : Type u_2\ninst✝⁵ : SMul R ℝ≥0\ninst✝⁴ : SMul R ℝ≥0∞\ninst✝³ : IsScalarTower R ℝ≥0 ℝ≥0∞\ninst✝² : IsScalarTower R ℝ≥0∞ ℝ≥0∞\ninst✝¹ : TopologicalSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nγ : Type u_3\nF : Filter γ\nμs : γ → FiniteMeasure Ω\nμ : FiniteMeasure Ω\n⊢ (∀ (y : Ω →ᵇ ℝ≥0),\n      Tendsto (fun i => ↑(↑(topDualPairing ℝ≥0 (Ω →ᵇ ℝ≥0)) (toWeakDualBCNN (μs i))) y) F\n        (𝓝 (↑(↑(topDualPairing ℝ≥0 (Ω →ᵇ ℝ≥0)) (toWeakDualBCNN μ)) y))) ↔\n    ∀ (f : Ω →ᵇ ℝ≥0), Tendsto (fun i => ↑(toWeakDualBCNN (μs i)) f) F (𝓝 (↑(toWeakDualBCNN μ) f))\n[PROOFSTEP]\nrfl\n[GOAL]\nΩ : Type u_1\ninst✝⁶ : MeasurableSpace Ω\nR : Type u_2\ninst✝⁵ : SMul R ℝ≥0\ninst✝⁴ : SMul R ℝ≥0∞\ninst✝³ : IsScalarTower R ℝ≥0 ℝ≥0∞\ninst✝² : IsScalarTower R ℝ≥0∞ ℝ≥0∞\ninst✝¹ : TopologicalSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nγ : Type u_3\nF : Filter γ\nμs : γ → FiniteMeasure Ω\nμ : FiniteMeasure Ω\n⊢ Tendsto μs F (𝓝 μ) ↔ ∀ (f : Ω →ᵇ ℝ≥0), Tendsto (fun i => testAgainstNN (μs i) f) F (𝓝 (testAgainstNN μ f))\n[PROOFSTEP]\nrw [FiniteMeasure.tendsto_iff_forall_toWeakDualBCNN_tendsto]\n[GOAL]\nΩ : Type u_1\ninst✝⁶ : MeasurableSpace Ω\nR : Type u_2\ninst✝⁵ : SMul R ℝ≥0\ninst✝⁴ : SMul R ℝ≥0∞\ninst✝³ : IsScalarTower R ℝ≥0 ℝ≥0∞\ninst✝² : IsScalarTower R ℝ≥0∞ ℝ≥0∞\ninst✝¹ : TopologicalSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nγ : Type u_3\nF : Filter γ\nμs : γ → FiniteMeasure Ω\nμ : FiniteMeasure Ω\n⊢ (∀ (f : Ω →ᵇ ℝ≥0), Tendsto (fun i => ↑(toWeakDualBCNN (μs i)) f) F (𝓝 (↑(toWeakDualBCNN μ) f))) ↔\n    ∀ (f : Ω →ᵇ ℝ≥0), Tendsto (fun i => testAgainstNN (μs i) f) F (𝓝 (testAgainstNN μ f))\n[PROOFSTEP]\nrfl\n[GOAL]\nΩ : Type u_1\ninst✝⁶ : MeasurableSpace Ω\nR : Type u_2\ninst✝⁵ : SMul R ℝ≥0\ninst✝⁴ : SMul R ℝ≥0∞\ninst✝³ : IsScalarTower R ℝ≥0 ℝ≥0∞\ninst✝² : IsScalarTower R ℝ≥0∞ ℝ≥0∞\ninst✝¹ : TopologicalSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nγ : Type u_3\nF : Filter γ\nμs : γ → FiniteMeasure Ω\nmass_lim : Tendsto (fun i => mass (μs i)) F (𝓝 0)\nf : Ω →ᵇ ℝ≥0\n⊢ Tendsto (fun i => testAgainstNN (μs i) f) F (𝓝 0)\n[PROOFSTEP]\napply tendsto_iff_dist_tendsto_zero.mpr\n[GOAL]\nΩ : Type u_1\ninst✝⁶ : MeasurableSpace Ω\nR : Type u_2\ninst✝⁵ : SMul R ℝ≥0\ninst✝⁴ : SMul R ℝ≥0∞\ninst✝³ : IsScalarTower R ℝ≥0 ℝ≥0∞\ninst✝² : IsScalarTower R ℝ≥0∞ ℝ≥0∞\ninst✝¹ : TopologicalSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nγ : Type u_3\nF : Filter γ\nμs : γ → FiniteMeasure Ω\nmass_lim : Tendsto (fun i => mass (μs i)) F (𝓝 0)\nf : Ω →ᵇ ℝ≥0\n⊢ Tendsto (fun b => dist (testAgainstNN (μs b) f) 0) F (𝓝 0)\n[PROOFSTEP]\nhave obs := fun i => (μs i).testAgainstNN_lipschitz_estimate f 0\n[GOAL]\nΩ : Type u_1\ninst✝⁶ : MeasurableSpace Ω\nR : Type u_2\ninst✝⁵ : SMul R ℝ≥0\ninst✝⁴ : SMul R ℝ≥0∞\ninst✝³ : IsScalarTower R ℝ≥0 ℝ≥0∞\ninst✝² : IsScalarTower R ℝ≥0∞ ℝ≥0∞\ninst✝¹ : TopologicalSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nγ : Type u_3\nF : Filter γ\nμs : γ → FiniteMeasure Ω\nmass_lim : Tendsto (fun i => mass (μs i)) F (𝓝 0)\nf : Ω →ᵇ ℝ≥0\nobs : ∀ (i : γ), testAgainstNN (μs i) f ≤ testAgainstNN (μs i) 0 + nndist f 0 * mass (μs i)\n⊢ Tendsto (fun b => dist (testAgainstNN (μs b) f) 0) F (𝓝 0)\n[PROOFSTEP]\nsimp_rw [testAgainstNN_zero, zero_add] at obs \n[GOAL]\nΩ : Type u_1\ninst✝⁶ : MeasurableSpace Ω\nR : Type u_2\ninst✝⁵ : SMul R ℝ≥0\ninst✝⁴ : SMul R ℝ≥0∞\ninst✝³ : IsScalarTower R ℝ≥0 ℝ≥0∞\ninst✝² : IsScalarTower R ℝ≥0∞ ℝ≥0∞\ninst✝¹ : TopologicalSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nγ : Type u_3\nF : Filter γ\nμs : γ → FiniteMeasure Ω\nmass_lim : Tendsto (fun i => mass (μs i)) F (𝓝 0)\nf : Ω →ᵇ ℝ≥0\nobs : ∀ (i : γ), testAgainstNN (μs i) f ≤ nndist f 0 * mass (μs i)\n⊢ Tendsto (fun b => dist (testAgainstNN (μs b) f) 0) F (𝓝 0)\n[PROOFSTEP]\nsimp_rw [show ∀ i, dist ((μs i).testAgainstNN f) 0 = (μs i).testAgainstNN f by\n    simp only [dist_nndist, NNReal.nndist_zero_eq_val', eq_self_iff_true, imp_true_iff]]\n[GOAL]\nΩ : Type u_1\ninst✝⁶ : MeasurableSpace Ω\nR : Type u_2\ninst✝⁵ : SMul R ℝ≥0\ninst✝⁴ : SMul R ℝ≥0∞\ninst✝³ : IsScalarTower R ℝ≥0 ℝ≥0∞\ninst✝² : IsScalarTower R ℝ≥0∞ ℝ≥0∞\ninst✝¹ : TopologicalSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nγ : Type u_3\nF : Filter γ\nμs : γ → FiniteMeasure Ω\nmass_lim : Tendsto (fun i => mass (μs i)) F (𝓝 0)\nf : Ω →ᵇ ℝ≥0\nobs : ∀ (i : γ), testAgainstNN (μs i) f ≤ nndist f 0 * mass (μs i)\n⊢ ∀ (i : γ), dist (testAgainstNN (μs i) f) 0 = ↑(testAgainstNN (μs i) f)\n[PROOFSTEP]\nsimp only [dist_nndist, NNReal.nndist_zero_eq_val', eq_self_iff_true, imp_true_iff]\n[GOAL]\nΩ : Type u_1\ninst✝⁶ : MeasurableSpace Ω\nR : Type u_2\ninst✝⁵ : SMul R ℝ≥0\ninst✝⁴ : SMul R ℝ≥0∞\ninst✝³ : IsScalarTower R ℝ≥0 ℝ≥0∞\ninst✝² : IsScalarTower R ℝ≥0∞ ℝ≥0∞\ninst✝¹ : TopologicalSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nγ : Type u_3\nF : Filter γ\nμs : γ → FiniteMeasure Ω\nmass_lim : Tendsto (fun i => mass (μs i)) F (𝓝 0)\nf : Ω →ᵇ ℝ≥0\nobs : ∀ (i : γ), testAgainstNN (μs i) f ≤ nndist f 0 * mass (μs i)\n⊢ Tendsto (fun b => ↑(testAgainstNN (μs b) f)) F (𝓝 0)\n[PROOFSTEP]\nrefine' squeeze_zero (fun i => NNReal.coe_nonneg _) obs _\n[GOAL]\nΩ : Type u_1\ninst✝⁶ : MeasurableSpace Ω\nR : Type u_2\ninst✝⁵ : SMul R ℝ≥0\ninst✝⁴ : SMul R ℝ≥0∞\ninst✝³ : IsScalarTower R ℝ≥0 ℝ≥0∞\ninst✝² : IsScalarTower R ℝ≥0∞ ℝ≥0∞\ninst✝¹ : TopologicalSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nγ : Type u_3\nF : Filter γ\nμs : γ → FiniteMeasure Ω\nmass_lim : Tendsto (fun i => mass (μs i)) F (𝓝 0)\nf : Ω →ᵇ ℝ≥0\nobs : ∀ (i : γ), testAgainstNN (μs i) f ≤ nndist f 0 * mass (μs i)\n⊢ Tendsto (fun t => (fun a => ↑a) (nndist f 0 * mass (μs t))) F (𝓝 0)\n[PROOFSTEP]\nhave lim_pair : Tendsto (fun i => (⟨nndist f 0, (μs i).mass⟩ : ℝ × ℝ)) F (𝓝 ⟨nndist f 0, 0⟩) :=\n  by\n  refine' (Prod.tendsto_iff _ _).mpr ⟨tendsto_const_nhds, _⟩\n  exact (NNReal.continuous_coe.tendsto 0).comp mass_lim\n[GOAL]\nΩ : Type u_1\ninst✝⁶ : MeasurableSpace Ω\nR : Type u_2\ninst✝⁵ : SMul R ℝ≥0\ninst✝⁴ : SMul R ℝ≥0∞\ninst✝³ : IsScalarTower R ℝ≥0 ℝ≥0∞\ninst✝² : IsScalarTower R ℝ≥0∞ ℝ≥0∞\ninst✝¹ : TopologicalSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nγ : Type u_3\nF : Filter γ\nμs : γ → FiniteMeasure Ω\nmass_lim : Tendsto (fun i => mass (μs i)) F (𝓝 0)\nf : Ω →ᵇ ℝ≥0\nobs : ∀ (i : γ), testAgainstNN (μs i) f ≤ nndist f 0 * mass (μs i)\n⊢ Tendsto (fun i => (↑(nndist f 0), ↑(mass (μs i)))) F (𝓝 (↑(nndist f 0), 0))\n[PROOFSTEP]\nrefine' (Prod.tendsto_iff _ _).mpr ⟨tendsto_const_nhds, _⟩\n[GOAL]\nΩ : Type u_1\ninst✝⁶ : MeasurableSpace Ω\nR : Type u_2\ninst✝⁵ : SMul R ℝ≥0\ninst✝⁴ : SMul R ℝ≥0∞\ninst✝³ : IsScalarTower R ℝ≥0 ℝ≥0∞\ninst✝² : IsScalarTower R ℝ≥0∞ ℝ≥0∞\ninst✝¹ : TopologicalSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nγ : Type u_3\nF : Filter γ\nμs : γ → FiniteMeasure Ω\nmass_lim : Tendsto (fun i => mass (μs i)) F (𝓝 0)\nf : Ω →ᵇ ℝ≥0\nobs : ∀ (i : γ), testAgainstNN (μs i) f ≤ nndist f 0 * mass (μs i)\n⊢ Tendsto (fun n => (↑(nndist f 0), ↑(mass (μs n))).snd) F (𝓝 (↑(nndist f 0), 0).snd)\n[PROOFSTEP]\nexact (NNReal.continuous_coe.tendsto 0).comp mass_lim\n[GOAL]\nΩ : Type u_1\ninst✝⁶ : MeasurableSpace Ω\nR : Type u_2\ninst✝⁵ : SMul R ℝ≥0\ninst✝⁴ : SMul R ℝ≥0∞\ninst✝³ : IsScalarTower R ℝ≥0 ℝ≥0∞\ninst✝² : IsScalarTower R ℝ≥0∞ ℝ≥0∞\ninst✝¹ : TopologicalSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nγ : Type u_3\nF : Filter γ\nμs : γ → FiniteMeasure Ω\nmass_lim : Tendsto (fun i => mass (μs i)) F (𝓝 0)\nf : Ω →ᵇ ℝ≥0\nobs : ∀ (i : γ), testAgainstNN (μs i) f ≤ nndist f 0 * mass (μs i)\nlim_pair : Tendsto (fun i => (↑(nndist f 0), ↑(mass (μs i)))) F (𝓝 (↑(nndist f 0), 0))\n⊢ Tendsto (fun t => (fun a => ↑a) (nndist f 0 * mass (μs t))) F (𝓝 0)\n[PROOFSTEP]\nhave key := tendsto_mul.comp lim_pair\n[GOAL]\nΩ : Type u_1\ninst✝⁶ : MeasurableSpace Ω\nR : Type u_2\ninst✝⁵ : SMul R ℝ≥0\ninst✝⁴ : SMul R ℝ≥0∞\ninst✝³ : IsScalarTower R ℝ≥0 ℝ≥0∞\ninst✝² : IsScalarTower R ℝ≥0∞ ℝ≥0∞\ninst✝¹ : TopologicalSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nγ : Type u_3\nF : Filter γ\nμs : γ → FiniteMeasure Ω\nmass_lim : Tendsto (fun i => mass (μs i)) F (𝓝 0)\nf : Ω →ᵇ ℝ≥0\nobs : ∀ (i : γ), testAgainstNN (μs i) f ≤ nndist f 0 * mass (μs i)\nlim_pair : Tendsto (fun i => (↑(nndist f 0), ↑(mass (μs i)))) F (𝓝 (↑(nndist f 0), 0))\nkey : Tendsto ((fun p => p.fst * p.snd) ∘ fun i => (↑(nndist f 0), ↑(mass (μs i)))) F (𝓝 (↑(nndist f 0) * 0))\n⊢ Tendsto (fun t => (fun a => ↑a) (nndist f 0 * mass (μs t))) F (𝓝 0)\n[PROOFSTEP]\nrwa [mul_zero] at key \n[GOAL]\nΩ : Type u_1\ninst✝⁶ : MeasurableSpace Ω\nR : Type u_2\ninst✝⁵ : SMul R ℝ≥0\ninst✝⁴ : SMul R ℝ≥0∞\ninst✝³ : IsScalarTower R ℝ≥0 ℝ≥0∞\ninst✝² : IsScalarTower R ℝ≥0∞ ℝ≥0∞\ninst✝¹ : TopologicalSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nγ : Type u_3\nF : Filter γ\nμs : γ → FiniteMeasure Ω\nmass_lim : Tendsto (fun i => mass (μs i)) F (𝓝 0)\n⊢ Tendsto μs F (𝓝 0)\n[PROOFSTEP]\nrw [tendsto_iff_forall_testAgainstNN_tendsto]\n[GOAL]\nΩ : Type u_1\ninst✝⁶ : MeasurableSpace Ω\nR : Type u_2\ninst✝⁵ : SMul R ℝ≥0\ninst✝⁴ : SMul R ℝ≥0∞\ninst✝³ : IsScalarTower R ℝ≥0 ℝ≥0∞\ninst✝² : IsScalarTower R ℝ≥0∞ ℝ≥0∞\ninst✝¹ : TopologicalSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nγ : Type u_3\nF : Filter γ\nμs : γ → FiniteMeasure Ω\nmass_lim : Tendsto (fun i => mass (μs i)) F (𝓝 0)\n⊢ ∀ (f : Ω →ᵇ ℝ≥0), Tendsto (fun i => testAgainstNN (μs i) f) F (𝓝 (testAgainstNN 0 f))\n[PROOFSTEP]\nintro f\n[GOAL]\nΩ : Type u_1\ninst✝⁶ : MeasurableSpace Ω\nR : Type u_2\ninst✝⁵ : SMul R ℝ≥0\ninst✝⁴ : SMul R ℝ≥0∞\ninst✝³ : IsScalarTower R ℝ≥0 ℝ≥0∞\ninst✝² : IsScalarTower R ℝ≥0∞ ℝ≥0∞\ninst✝¹ : TopologicalSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nγ : Type u_3\nF : Filter γ\nμs : γ → FiniteMeasure Ω\nmass_lim : Tendsto (fun i => mass (μs i)) F (𝓝 0)\nf : Ω →ᵇ ℝ≥0\n⊢ Tendsto (fun i => testAgainstNN (μs i) f) F (𝓝 (testAgainstNN 0 f))\n[PROOFSTEP]\nconvert tendsto_zero_testAgainstNN_of_tendsto_zero_mass mass_lim f\n[GOAL]\ncase h.e'_5.h.e'_3\nΩ : Type u_1\ninst✝⁶ : MeasurableSpace Ω\nR : Type u_2\ninst✝⁵ : SMul R ℝ≥0\ninst✝⁴ : SMul R ℝ≥0∞\ninst✝³ : IsScalarTower R ℝ≥0 ℝ≥0∞\ninst✝² : IsScalarTower R ℝ≥0∞ ℝ≥0∞\ninst✝¹ : TopologicalSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nγ : Type u_3\nF : Filter γ\nμs : γ → FiniteMeasure Ω\nmass_lim : Tendsto (fun i => mass (μs i)) F (𝓝 0)\nf : Ω →ᵇ ℝ≥0\n⊢ testAgainstNN 0 f = 0\n[PROOFSTEP]\nrw [zero_testAgainstNN_apply]\n[GOAL]\nΩ : Type u_1\ninst✝⁶ : MeasurableSpace Ω\nR : Type u_2\ninst✝⁵ : SMul R ℝ≥0\ninst✝⁴ : SMul R ℝ≥0∞\ninst✝³ : IsScalarTower R ℝ≥0 ℝ≥0∞\ninst✝² : IsScalarTower R ℝ≥0∞ ℝ≥0∞\ninst✝¹ : TopologicalSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nγ : Type u_3\nF : Filter γ\nμs : γ → FiniteMeasure Ω\nμ : FiniteMeasure Ω\n⊢ Tendsto μs F (𝓝 μ) ↔ ∀ (f : Ω →ᵇ ℝ≥0), Tendsto (fun i => ∫⁻ (x : Ω), ↑(↑f x) ∂↑(μs i)) F (𝓝 (∫⁻ (x : Ω), ↑(↑f x) ∂↑μ))\n[PROOFSTEP]\nrw [tendsto_iff_forall_toWeakDualBCNN_tendsto]\n[GOAL]\nΩ : Type u_1\ninst✝⁶ : MeasurableSpace Ω\nR : Type u_2\ninst✝⁵ : SMul R ℝ≥0\ninst✝⁴ : SMul R ℝ≥0∞\ninst✝³ : IsScalarTower R ℝ≥0 ℝ≥0∞\ninst✝² : IsScalarTower R ℝ≥0∞ ℝ≥0∞\ninst✝¹ : TopologicalSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nγ : Type u_3\nF : Filter γ\nμs : γ → FiniteMeasure Ω\nμ : FiniteMeasure Ω\n⊢ (∀ (f : Ω →ᵇ ℝ≥0), Tendsto (fun i => ↑(toWeakDualBCNN (μs i)) f) F (𝓝 (↑(toWeakDualBCNN μ) f))) ↔\n    ∀ (f : Ω →ᵇ ℝ≥0), Tendsto (fun i => ∫⁻ (x : Ω), ↑(↑f x) ∂↑(μs i)) F (𝓝 (∫⁻ (x : Ω), ↑(↑f x) ∂↑μ))\n[PROOFSTEP]\nsimp_rw [toWeakDualBCNN_apply _ _, ← testAgainstNN_coe_eq, ENNReal.tendsto_coe, ENNReal.toNNReal_coe]\n[GOAL]\nΩ : Type u_1\ninst✝⁴ : MeasurableSpace Ω\ninst✝³ : TopologicalSpace Ω\ninst✝² : OpensMeasurableSpace Ω\nι : Type u_2\nL : Filter ι\ninst✝¹ : IsCountablyGenerated L\nμ : Measure Ω\ninst✝ : IsFiniteMeasure μ\nfs : ι → Ω →ᵇ ℝ≥0\nc : ℝ≥0\nfs_le_const : ∀ᶠ (i : ι) in L, ∀ᵐ (ω : Ω) ∂μ, ↑(fs i) ω ≤ c\nf : Ω → ℝ≥0\nfs_lim : ∀ᵐ (ω : Ω) ∂μ, Tendsto (fun i => ↑(fs i) ω) L (𝓝 (f ω))\n⊢ Tendsto (fun i => ∫⁻ (ω : Ω), ↑(↑(fs i) ω) ∂μ) L (𝓝 (∫⁻ (ω : Ω), ↑(f ω) ∂μ))\n[PROOFSTEP]\nrefine\n  tendsto_lintegral_filter_of_dominated_convergence (fun _ => c)\n    (eventually_of_forall fun i => (ENNReal.continuous_coe.comp (fs i).continuous).measurable) ?_\n    (@lintegral_const_lt_top _ _ μ _ _ (@ENNReal.coe_ne_top c)).ne ?_\n[GOAL]\ncase refine_1\nΩ : Type u_1\ninst✝⁴ : MeasurableSpace Ω\ninst✝³ : TopologicalSpace Ω\ninst✝² : OpensMeasurableSpace Ω\nι : Type u_2\nL : Filter ι\ninst✝¹ : IsCountablyGenerated L\nμ : Measure Ω\ninst✝ : IsFiniteMeasure μ\nfs : ι → Ω →ᵇ ℝ≥0\nc : ℝ≥0\nfs_le_const : ∀ᶠ (i : ι) in L, ∀ᵐ (ω : Ω) ∂μ, ↑(fs i) ω ≤ c\nf : Ω → ℝ≥0\nfs_lim : ∀ᵐ (ω : Ω) ∂μ, Tendsto (fun i => ↑(fs i) ω) L (𝓝 (f ω))\n⊢ ∀ᶠ (n : ι) in L, ∀ᵐ (a : Ω) ∂μ, ↑(↑(fs n) a) ≤ (fun x => ↑c) a\n[PROOFSTEP]\nsimpa only [Function.comp_apply, ENNReal.coe_le_coe] using fs_le_const\n[GOAL]\ncase refine_2\nΩ : Type u_1\ninst✝⁴ : MeasurableSpace Ω\ninst✝³ : TopologicalSpace Ω\ninst✝² : OpensMeasurableSpace Ω\nι : Type u_2\nL : Filter ι\ninst✝¹ : IsCountablyGenerated L\nμ : Measure Ω\ninst✝ : IsFiniteMeasure μ\nfs : ι → Ω →ᵇ ℝ≥0\nc : ℝ≥0\nfs_le_const : ∀ᶠ (i : ι) in L, ∀ᵐ (ω : Ω) ∂μ, ↑(fs i) ω ≤ c\nf : Ω → ℝ≥0\nfs_lim : ∀ᵐ (ω : Ω) ∂μ, Tendsto (fun i => ↑(fs i) ω) L (𝓝 (f ω))\n⊢ ∀ᵐ (a : Ω) ∂μ, Tendsto (fun n => ↑(↑(fs n) a)) L (𝓝 ↑(f a))\n[PROOFSTEP]\nsimpa only [Function.comp_apply, ENNReal.tendsto_coe] using fs_lim\n[GOAL]\nΩ : Type u_1\ninst✝³ : MeasurableSpace Ω\ninst✝² : TopologicalSpace Ω\ninst✝¹ : OpensMeasurableSpace Ω\nι : Type u_2\nL : Filter ι\ninst✝ : IsCountablyGenerated L\nμ : FiniteMeasure Ω\nfs : ι → Ω →ᵇ ℝ≥0\nc : ℝ≥0\nfs_le_const : ∀ᶠ (i : ι) in L, ∀ᵐ (ω : Ω) ∂↑μ, ↑(fs i) ω ≤ c\nf : Ω →ᵇ ℝ≥0\nfs_lim : ∀ᵐ (ω : Ω) ∂↑μ, Tendsto (fun i => ↑(fs i) ω) L (𝓝 (↑f ω))\n⊢ Tendsto (fun i => testAgainstNN μ (fs i)) L (𝓝 (testAgainstNN μ f))\n[PROOFSTEP]\napply (ENNReal.tendsto_toNNReal (lintegral_lt_top_of_boundedContinuous_to_nnreal (μ : Measure Ω) f).ne).comp\n[GOAL]\nΩ : Type u_1\ninst✝³ : MeasurableSpace Ω\ninst✝² : TopologicalSpace Ω\ninst✝¹ : OpensMeasurableSpace Ω\nι : Type u_2\nL : Filter ι\ninst✝ : IsCountablyGenerated L\nμ : FiniteMeasure Ω\nfs : ι → Ω →ᵇ ℝ≥0\nc : ℝ≥0\nfs_le_const : ∀ᶠ (i : ι) in L, ∀ᵐ (ω : Ω) ∂↑μ, ↑(fs i) ω ≤ c\nf : Ω →ᵇ ℝ≥0\nfs_lim : ∀ᵐ (ω : Ω) ∂↑μ, Tendsto (fun i => ↑(fs i) ω) L (𝓝 (↑f ω))\n⊢ Tendsto (fun i => ∫⁻ (ω : Ω), ↑(↑(fs i) ω) ∂↑μ) L (𝓝 (∫⁻ (ω : Ω), ↑(↑f ω) ∂↑μ))\n[PROOFSTEP]\nexact tendsto_lintegral_nn_filter_of_le_const μ fs_le_const fs_lim\n[GOAL]\nΩ : Type u_1\ninst✝³ : MeasurableSpace Ω\ninst✝² : TopologicalSpace Ω\ninst✝¹ : OpensMeasurableSpace Ω\nμ : Measure Ω\ninst✝ : IsFiniteMeasure μ\nf : Ω →ᵇ ℝ≥0\n⊢ Integrable (NNReal.toReal ∘ ↑f)\n[PROOFSTEP]\nrefine' ⟨(NNReal.continuous_coe.comp f.continuous).measurable.aestronglyMeasurable, _⟩\n[GOAL]\nΩ : Type u_1\ninst✝³ : MeasurableSpace Ω\ninst✝² : TopologicalSpace Ω\ninst✝¹ : OpensMeasurableSpace Ω\nμ : Measure Ω\ninst✝ : IsFiniteMeasure μ\nf : Ω →ᵇ ℝ≥0\n⊢ HasFiniteIntegral (NNReal.toReal ∘ ↑f)\n[PROOFSTEP]\nsimp only [HasFiniteIntegral, Function.comp_apply, NNReal.nnnorm_eq]\n[GOAL]\nΩ : Type u_1\ninst✝³ : MeasurableSpace Ω\ninst✝² : TopologicalSpace Ω\ninst✝¹ : OpensMeasurableSpace Ω\nμ : Measure Ω\ninst✝ : IsFiniteMeasure μ\nf : Ω →ᵇ ℝ≥0\n⊢ ∫⁻ (a : Ω), ↑(↑f a) ∂μ < ⊤\n[PROOFSTEP]\nexact lintegral_lt_top_of_boundedContinuous_to_nnreal _ f\n[GOAL]\nΩ : Type u_1\ninst✝³ : MeasurableSpace Ω\ninst✝² : TopologicalSpace Ω\ninst✝¹ : OpensMeasurableSpace Ω\nμ : Measure Ω\ninst✝ : IsFiniteMeasure μ\nf : Ω →ᵇ ℝ\n⊢ Integrable ↑f\n[PROOFSTEP]\nrefine' ⟨f.continuous.measurable.aestronglyMeasurable, _⟩\n[GOAL]\nΩ : Type u_1\ninst✝³ : MeasurableSpace Ω\ninst✝² : TopologicalSpace Ω\ninst✝¹ : OpensMeasurableSpace Ω\nμ : Measure Ω\ninst✝ : IsFiniteMeasure μ\nf : Ω →ᵇ ℝ\n⊢ HasFiniteIntegral ↑f\n[PROOFSTEP]\nhave aux : ((↑) : ℝ≥0 → ℝ) ∘ ⇑f.nnnorm = fun x => ‖f x‖ :=\n  by\n  ext ω\n  simp only [Function.comp_apply, BoundedContinuousFunction.nnnorm_coeFn_eq, coe_nnnorm]\n[GOAL]\nΩ : Type u_1\ninst✝³ : MeasurableSpace Ω\ninst✝² : TopologicalSpace Ω\ninst✝¹ : OpensMeasurableSpace Ω\nμ : Measure Ω\ninst✝ : IsFiniteMeasure μ\nf : Ω →ᵇ ℝ\n⊢ NNReal.toReal ∘ ↑(BoundedContinuousFunction.nnnorm f) = fun x => ‖↑f x‖\n[PROOFSTEP]\next ω\n[GOAL]\ncase h\nΩ : Type u_1\ninst✝³ : MeasurableSpace Ω\ninst✝² : TopologicalSpace Ω\ninst✝¹ : OpensMeasurableSpace Ω\nμ : Measure Ω\ninst✝ : IsFiniteMeasure μ\nf : Ω →ᵇ ℝ\nω : Ω\n⊢ (NNReal.toReal ∘ ↑(BoundedContinuousFunction.nnnorm f)) ω = ‖↑f ω‖\n[PROOFSTEP]\nsimp only [Function.comp_apply, BoundedContinuousFunction.nnnorm_coeFn_eq, coe_nnnorm]\n[GOAL]\nΩ : Type u_1\ninst✝³ : MeasurableSpace Ω\ninst✝² : TopologicalSpace Ω\ninst✝¹ : OpensMeasurableSpace Ω\nμ : Measure Ω\ninst✝ : IsFiniteMeasure μ\nf : Ω →ᵇ ℝ\naux : NNReal.toReal ∘ ↑(BoundedContinuousFunction.nnnorm f) = fun x => ‖↑f x‖\n⊢ HasFiniteIntegral ↑f\n[PROOFSTEP]\napply (hasFiniteIntegral_iff_norm f).mpr\n[GOAL]\nΩ : Type u_1\ninst✝³ : MeasurableSpace Ω\ninst✝² : TopologicalSpace Ω\ninst✝¹ : OpensMeasurableSpace Ω\nμ : Measure Ω\ninst✝ : IsFiniteMeasure μ\nf : Ω →ᵇ ℝ\naux : NNReal.toReal ∘ ↑(BoundedContinuousFunction.nnnorm f) = fun x => ‖↑f x‖\n⊢ ∫⁻ (a : Ω), ENNReal.ofReal ‖↑f a‖ ∂μ < ⊤\n[PROOFSTEP]\nrw [← ofReal_integral_eq_lintegral_ofReal]\n[GOAL]\nΩ : Type u_1\ninst✝³ : MeasurableSpace Ω\ninst✝² : TopologicalSpace Ω\ninst✝¹ : OpensMeasurableSpace Ω\nμ : Measure Ω\ninst✝ : IsFiniteMeasure μ\nf : Ω →ᵇ ℝ\naux : NNReal.toReal ∘ ↑(BoundedContinuousFunction.nnnorm f) = fun x => ‖↑f x‖\n⊢ ENNReal.ofReal (∫ (x : Ω), ‖↑f x‖ ∂μ) < ⊤\n[PROOFSTEP]\nexact ENNReal.ofReal_lt_top\n[GOAL]\ncase hfi\nΩ : Type u_1\ninst✝³ : MeasurableSpace Ω\ninst✝² : TopologicalSpace Ω\ninst✝¹ : OpensMeasurableSpace Ω\nμ : Measure Ω\ninst✝ : IsFiniteMeasure μ\nf : Ω →ᵇ ℝ\naux : NNReal.toReal ∘ ↑(BoundedContinuousFunction.nnnorm f) = fun x => ‖↑f x‖\n⊢ Integrable fun a => ‖↑f a‖\n[PROOFSTEP]\nexact aux ▸ integrable_of_boundedContinuous_to_nnreal μ f.nnnorm\n[GOAL]\ncase f_nn\nΩ : Type u_1\ninst✝³ : MeasurableSpace Ω\ninst✝² : TopologicalSpace Ω\ninst✝¹ : OpensMeasurableSpace Ω\nμ : Measure Ω\ninst✝ : IsFiniteMeasure μ\nf : Ω →ᵇ ℝ\naux : NNReal.toReal ∘ ↑(BoundedContinuousFunction.nnnorm f) = fun x => ‖↑f x‖\n⊢ 0 ≤ᵐ[μ] fun a => ‖↑f a‖\n[PROOFSTEP]\nexact eventually_of_forall fun ω => norm_nonneg (f ω)\n[GOAL]\nΩ : Type u_1\ninst✝³ : MeasurableSpace Ω\ninst✝² : TopologicalSpace Ω\ninst✝¹ : OpensMeasurableSpace Ω\nμ : Measure Ω\ninst✝ : IsFiniteMeasure μ\nf : Ω →ᵇ ℝ\n⊢ ∫ (ω : Ω), ↑f ω ∂μ = ∫ (ω : Ω), ↑(↑(nnrealPart f) ω) ∂μ - ∫ (ω : Ω), ↑(↑(nnrealPart (-f)) ω) ∂μ\n[PROOFSTEP]\nsimp only [f.self_eq_nnrealPart_sub_nnrealPart_neg, Pi.sub_apply, integral_sub,\n  integrable_of_boundedContinuous_to_nnreal]\n[GOAL]\nΩ : Type u_1\ninst✝³ : MeasurableSpace Ω\ninst✝² : TopologicalSpace Ω\ninst✝¹ : OpensMeasurableSpace Ω\nμ : Measure Ω\ninst✝ : IsFiniteMeasure μ\nf : Ω →ᵇ ℝ\n⊢ ∫ (a : Ω), (NNReal.toReal ∘ ↑(nnrealPart f)) a ∂μ - ∫ (a : Ω), (NNReal.toReal ∘ ↑(nnrealPart (-f))) a ∂μ =\n    ∫ (ω : Ω), ↑(↑(nnrealPart f) ω) ∂μ - ∫ (ω : Ω), ↑(↑(nnrealPart (-f)) ω) ∂μ\n[PROOFSTEP]\nrfl\n[GOAL]\nΩ : Type u_1\ninst✝² : MeasurableSpace Ω\ninst✝¹ : TopologicalSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nγ : Type u_2\nF : Filter γ\nμs : γ → FiniteMeasure Ω\nμ : FiniteMeasure Ω\nh : ∀ (f : Ω →ᵇ ℝ), Tendsto (fun i => ∫ (x : Ω), ↑f x ∂↑(μs i)) F (𝓝 (∫ (x : Ω), ↑f x ∂↑μ))\n⊢ Tendsto μs F (𝓝 μ)\n[PROOFSTEP]\napply (@tendsto_iff_forall_lintegral_tendsto Ω _ _ _ γ F μs μ).mpr\n[GOAL]\nΩ : Type u_1\ninst✝² : MeasurableSpace Ω\ninst✝¹ : TopologicalSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nγ : Type u_2\nF : Filter γ\nμs : γ → FiniteMeasure Ω\nμ : FiniteMeasure Ω\nh : ∀ (f : Ω →ᵇ ℝ), Tendsto (fun i => ∫ (x : Ω), ↑f x ∂↑(μs i)) F (𝓝 (∫ (x : Ω), ↑f x ∂↑μ))\n⊢ ∀ (f : Ω →ᵇ ℝ≥0), Tendsto (fun i => ∫⁻ (x : Ω), ↑(↑f x) ∂↑(μs i)) F (𝓝 (∫⁻ (x : Ω), ↑(↑f x) ∂↑μ))\n[PROOFSTEP]\nintro f\n[GOAL]\nΩ : Type u_1\ninst✝² : MeasurableSpace Ω\ninst✝¹ : TopologicalSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nγ : Type u_2\nF : Filter γ\nμs : γ → FiniteMeasure Ω\nμ : FiniteMeasure Ω\nh : ∀ (f : Ω →ᵇ ℝ), Tendsto (fun i => ∫ (x : Ω), ↑f x ∂↑(μs i)) F (𝓝 (∫ (x : Ω), ↑f x ∂↑μ))\nf : Ω →ᵇ ℝ≥0\n⊢ Tendsto (fun i => ∫⁻ (x : Ω), ↑(↑f x) ∂↑(μs i)) F (𝓝 (∫⁻ (x : Ω), ↑(↑f x) ∂↑μ))\n[PROOFSTEP]\nhave key :=\n  @ENNReal.tendsto_toReal_iff _ F _ (fun i => (lintegral_lt_top_of_boundedContinuous_to_nnreal (μs i : Measure Ω) f).ne)\n    _ (lintegral_lt_top_of_boundedContinuous_to_nnreal (μ : Measure Ω) f).ne\n[GOAL]\nΩ : Type u_1\ninst✝² : MeasurableSpace Ω\ninst✝¹ : TopologicalSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nγ : Type u_2\nF : Filter γ\nμs : γ → FiniteMeasure Ω\nμ : FiniteMeasure Ω\nh : ∀ (f : Ω →ᵇ ℝ), Tendsto (fun i => ∫ (x : Ω), ↑f x ∂↑(μs i)) F (𝓝 (∫ (x : Ω), ↑f x ∂↑μ))\nf : Ω →ᵇ ℝ≥0\nkey :\n  Tendsto (fun n => ENNReal.toReal (∫⁻ (ω : Ω), ↑(↑f ω) ∂↑(μs n))) F (𝓝 (ENNReal.toReal (∫⁻ (ω : Ω), ↑(↑f ω) ∂↑μ))) ↔\n    Tendsto (fun i => ∫⁻ (ω : Ω), ↑(↑f ω) ∂↑(μs i)) F (𝓝 (∫⁻ (ω : Ω), ↑(↑f ω) ∂↑μ))\n⊢ Tendsto (fun i => ∫⁻ (x : Ω), ↑(↑f x) ∂↑(μs i)) F (𝓝 (∫⁻ (x : Ω), ↑(↑f x) ∂↑μ))\n[PROOFSTEP]\nsimp only [ENNReal.ofReal_coe_nnreal] at key \n[GOAL]\nΩ : Type u_1\ninst✝² : MeasurableSpace Ω\ninst✝¹ : TopologicalSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nγ : Type u_2\nF : Filter γ\nμs : γ → FiniteMeasure Ω\nμ : FiniteMeasure Ω\nh : ∀ (f : Ω →ᵇ ℝ), Tendsto (fun i => ∫ (x : Ω), ↑f x ∂↑(μs i)) F (𝓝 (∫ (x : Ω), ↑f x ∂↑μ))\nf : Ω →ᵇ ℝ≥0\nkey :\n  Tendsto (fun n => ENNReal.toReal (∫⁻ (ω : Ω), ↑(↑f ω) ∂↑(μs n))) F (𝓝 (ENNReal.toReal (∫⁻ (ω : Ω), ↑(↑f ω) ∂↑μ))) ↔\n    Tendsto (fun i => ∫⁻ (ω : Ω), ↑(↑f ω) ∂↑(μs i)) F (𝓝 (∫⁻ (ω : Ω), ↑(↑f ω) ∂↑μ))\n⊢ Tendsto (fun i => ∫⁻ (x : Ω), ↑(↑f x) ∂↑(μs i)) F (𝓝 (∫⁻ (x : Ω), ↑(↑f x) ∂↑μ))\n[PROOFSTEP]\napply key.mp\n[GOAL]\nΩ : Type u_1\ninst✝² : MeasurableSpace Ω\ninst✝¹ : TopologicalSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nγ : Type u_2\nF : Filter γ\nμs : γ → FiniteMeasure Ω\nμ : FiniteMeasure Ω\nh : ∀ (f : Ω →ᵇ ℝ), Tendsto (fun i => ∫ (x : Ω), ↑f x ∂↑(μs i)) F (𝓝 (∫ (x : Ω), ↑f x ∂↑μ))\nf : Ω →ᵇ ℝ≥0\nkey :\n  Tendsto (fun n => ENNReal.toReal (∫⁻ (ω : Ω), ↑(↑f ω) ∂↑(μs n))) F (𝓝 (ENNReal.toReal (∫⁻ (ω : Ω), ↑(↑f ω) ∂↑μ))) ↔\n    Tendsto (fun i => ∫⁻ (ω : Ω), ↑(↑f ω) ∂↑(μs i)) F (𝓝 (∫⁻ (ω : Ω), ↑(↑f ω) ∂↑μ))\n⊢ Tendsto (fun n => ENNReal.toReal (∫⁻ (ω : Ω), ↑(↑f ω) ∂↑(μs n))) F (𝓝 (ENNReal.toReal (∫⁻ (ω : Ω), ↑(↑f ω) ∂↑μ)))\n[PROOFSTEP]\nhave lip : LipschitzWith 1 ((↑) : ℝ≥0 → ℝ) := isometry_subtype_coe.lipschitz\n[GOAL]\nΩ : Type u_1\ninst✝² : MeasurableSpace Ω\ninst✝¹ : TopologicalSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nγ : Type u_2\nF : Filter γ\nμs : γ → FiniteMeasure Ω\nμ : FiniteMeasure Ω\nh : ∀ (f : Ω →ᵇ ℝ), Tendsto (fun i => ∫ (x : Ω), ↑f x ∂↑(μs i)) F (𝓝 (∫ (x : Ω), ↑f x ∂↑μ))\nf : Ω →ᵇ ℝ≥0\nkey :\n  Tendsto (fun n => ENNReal.toReal (∫⁻ (ω : Ω), ↑(↑f ω) ∂↑(μs n))) F (𝓝 (ENNReal.toReal (∫⁻ (ω : Ω), ↑(↑f ω) ∂↑μ))) ↔\n    Tendsto (fun i => ∫⁻ (ω : Ω), ↑(↑f ω) ∂↑(μs i)) F (𝓝 (∫⁻ (ω : Ω), ↑(↑f ω) ∂↑μ))\nlip : LipschitzWith 1 NNReal.toReal\n⊢ Tendsto (fun n => ENNReal.toReal (∫⁻ (ω : Ω), ↑(↑f ω) ∂↑(μs n))) F (𝓝 (ENNReal.toReal (∫⁻ (ω : Ω), ↑(↑f ω) ∂↑μ)))\n[PROOFSTEP]\nset f₀ := BoundedContinuousFunction.comp _ lip f with _def_f₀\n[GOAL]\nΩ : Type u_1\ninst✝² : MeasurableSpace Ω\ninst✝¹ : TopologicalSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nγ : Type u_2\nF : Filter γ\nμs : γ → FiniteMeasure Ω\nμ : FiniteMeasure Ω\nh : ∀ (f : Ω →ᵇ ℝ), Tendsto (fun i => ∫ (x : Ω), ↑f x ∂↑(μs i)) F (𝓝 (∫ (x : Ω), ↑f x ∂↑μ))\nf : Ω →ᵇ ℝ≥0\nkey :\n  Tendsto (fun n => ENNReal.toReal (∫⁻ (ω : Ω), ↑(↑f ω) ∂↑(μs n))) F (𝓝 (ENNReal.toReal (∫⁻ (ω : Ω), ↑(↑f ω) ∂↑μ))) ↔\n    Tendsto (fun i => ∫⁻ (ω : Ω), ↑(↑f ω) ∂↑(μs i)) F (𝓝 (∫⁻ (ω : Ω), ↑(↑f ω) ∂↑μ))\nlip : LipschitzWith 1 NNReal.toReal\nf₀ : Ω →ᵇ ℝ := comp NNReal.toReal lip f\n_def_f₀ : f₀ = comp NNReal.toReal lip f\n⊢ Tendsto (fun n => ENNReal.toReal (∫⁻ (ω : Ω), ↑(↑f ω) ∂↑(μs n))) F (𝓝 (ENNReal.toReal (∫⁻ (ω : Ω), ↑(↑f ω) ∂↑μ)))\n[PROOFSTEP]\nhave f₀_eq : ⇑f₀ = ((↑) : ℝ≥0 → ℝ) ∘ ⇑f := by rfl\n[GOAL]\nΩ : Type u_1\ninst✝² : MeasurableSpace Ω\ninst✝¹ : TopologicalSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nγ : Type u_2\nF : Filter γ\nμs : γ → FiniteMeasure Ω\nμ : FiniteMeasure Ω\nh : ∀ (f : Ω →ᵇ ℝ), Tendsto (fun i => ∫ (x : Ω), ↑f x ∂↑(μs i)) F (𝓝 (∫ (x : Ω), ↑f x ∂↑μ))\nf : Ω →ᵇ ℝ≥0\nkey :\n  Tendsto (fun n => ENNReal.toReal (∫⁻ (ω : Ω), ↑(↑f ω) ∂↑(μs n))) F (𝓝 (ENNReal.toReal (∫⁻ (ω : Ω), ↑(↑f ω) ∂↑μ))) ↔\n    Tendsto (fun i => ∫⁻ (ω : Ω), ↑(↑f ω) ∂↑(μs i)) F (𝓝 (∫⁻ (ω : Ω), ↑(↑f ω) ∂↑μ))\nlip : LipschitzWith 1 NNReal.toReal\nf₀ : Ω →ᵇ ℝ := comp NNReal.toReal lip f\n_def_f₀ : f₀ = comp NNReal.toReal lip f\n⊢ ↑f₀ = NNReal.toReal ∘ ↑f\n[PROOFSTEP]\nrfl\n[GOAL]\nΩ : Type u_1\ninst✝² : MeasurableSpace Ω\ninst✝¹ : TopologicalSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nγ : Type u_2\nF : Filter γ\nμs : γ → FiniteMeasure Ω\nμ : FiniteMeasure Ω\nh : ∀ (f : Ω →ᵇ ℝ), Tendsto (fun i => ∫ (x : Ω), ↑f x ∂↑(μs i)) F (𝓝 (∫ (x : Ω), ↑f x ∂↑μ))\nf : Ω →ᵇ ℝ≥0\nkey :\n  Tendsto (fun n => ENNReal.toReal (∫⁻ (ω : Ω), ↑(↑f ω) ∂↑(μs n))) F (𝓝 (ENNReal.toReal (∫⁻ (ω : Ω), ↑(↑f ω) ∂↑μ))) ↔\n    Tendsto (fun i => ∫⁻ (ω : Ω), ↑(↑f ω) ∂↑(μs i)) F (𝓝 (∫⁻ (ω : Ω), ↑(↑f ω) ∂↑μ))\nlip : LipschitzWith 1 NNReal.toReal\nf₀ : Ω →ᵇ ℝ := comp NNReal.toReal lip f\n_def_f₀ : f₀ = comp NNReal.toReal lip f\nf₀_eq : ↑f₀ = NNReal.toReal ∘ ↑f\n⊢ Tendsto (fun n => ENNReal.toReal (∫⁻ (ω : Ω), ↑(↑f ω) ∂↑(μs n))) F (𝓝 (ENNReal.toReal (∫⁻ (ω : Ω), ↑(↑f ω) ∂↑μ)))\n[PROOFSTEP]\nhave f₀_nn : 0 ≤ ⇑f₀ := fun _ => by simp only [f₀_eq, Pi.zero_apply, Function.comp_apply, NNReal.zero_le_coe]\n[GOAL]\nΩ : Type u_1\ninst✝² : MeasurableSpace Ω\ninst✝¹ : TopologicalSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nγ : Type u_2\nF : Filter γ\nμs : γ → FiniteMeasure Ω\nμ : FiniteMeasure Ω\nh : ∀ (f : Ω →ᵇ ℝ), Tendsto (fun i => ∫ (x : Ω), ↑f x ∂↑(μs i)) F (𝓝 (∫ (x : Ω), ↑f x ∂↑μ))\nf : Ω →ᵇ ℝ≥0\nkey :\n  Tendsto (fun n => ENNReal.toReal (∫⁻ (ω : Ω), ↑(↑f ω) ∂↑(μs n))) F (𝓝 (ENNReal.toReal (∫⁻ (ω : Ω), ↑(↑f ω) ∂↑μ))) ↔\n    Tendsto (fun i => ∫⁻ (ω : Ω), ↑(↑f ω) ∂↑(μs i)) F (𝓝 (∫⁻ (ω : Ω), ↑(↑f ω) ∂↑μ))\nlip : LipschitzWith 1 NNReal.toReal\nf₀ : Ω →ᵇ ℝ := comp NNReal.toReal lip f\n_def_f₀ : f₀ = comp NNReal.toReal lip f\nf₀_eq : ↑f₀ = NNReal.toReal ∘ ↑f\nx✝ : Ω\n⊢ OfNat.ofNat 0 x✝ ≤ ↑f₀ x✝\n[PROOFSTEP]\nsimp only [f₀_eq, Pi.zero_apply, Function.comp_apply, NNReal.zero_le_coe]\n[GOAL]\nΩ : Type u_1\ninst✝² : MeasurableSpace Ω\ninst✝¹ : TopologicalSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nγ : Type u_2\nF : Filter γ\nμs : γ → FiniteMeasure Ω\nμ : FiniteMeasure Ω\nh : ∀ (f : Ω →ᵇ ℝ), Tendsto (fun i => ∫ (x : Ω), ↑f x ∂↑(μs i)) F (𝓝 (∫ (x : Ω), ↑f x ∂↑μ))\nf : Ω →ᵇ ℝ≥0\nkey :\n  Tendsto (fun n => ENNReal.toReal (∫⁻ (ω : Ω), ↑(↑f ω) ∂↑(μs n))) F (𝓝 (ENNReal.toReal (∫⁻ (ω : Ω), ↑(↑f ω) ∂↑μ))) ↔\n    Tendsto (fun i => ∫⁻ (ω : Ω), ↑(↑f ω) ∂↑(μs i)) F (𝓝 (∫⁻ (ω : Ω), ↑(↑f ω) ∂↑μ))\nlip : LipschitzWith 1 NNReal.toReal\nf₀ : Ω →ᵇ ℝ := comp NNReal.toReal lip f\n_def_f₀ : f₀ = comp NNReal.toReal lip f\nf₀_eq : ↑f₀ = NNReal.toReal ∘ ↑f\nf₀_nn : 0 ≤ ↑f₀\n⊢ Tendsto (fun n => ENNReal.toReal (∫⁻ (ω : Ω), ↑(↑f ω) ∂↑(μs n))) F (𝓝 (ENNReal.toReal (∫⁻ (ω : Ω), ↑(↑f ω) ∂↑μ)))\n[PROOFSTEP]\nhave f₀_ae_nn : 0 ≤ᵐ[(μ : Measure Ω)] ⇑f₀ := eventually_of_forall f₀_nn\n[GOAL]\nΩ : Type u_1\ninst✝² : MeasurableSpace Ω\ninst✝¹ : TopologicalSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nγ : Type u_2\nF : Filter γ\nμs : γ → FiniteMeasure Ω\nμ : FiniteMeasure Ω\nh : ∀ (f : Ω →ᵇ ℝ), Tendsto (fun i => ∫ (x : Ω), ↑f x ∂↑(μs i)) F (𝓝 (∫ (x : Ω), ↑f x ∂↑μ))\nf : Ω →ᵇ ℝ≥0\nkey :\n  Tendsto (fun n => ENNReal.toReal (∫⁻ (ω : Ω), ↑(↑f ω) ∂↑(μs n))) F (𝓝 (ENNReal.toReal (∫⁻ (ω : Ω), ↑(↑f ω) ∂↑μ))) ↔\n    Tendsto (fun i => ∫⁻ (ω : Ω), ↑(↑f ω) ∂↑(μs i)) F (𝓝 (∫⁻ (ω : Ω), ↑(↑f ω) ∂↑μ))\nlip : LipschitzWith 1 NNReal.toReal\nf₀ : Ω →ᵇ ℝ := comp NNReal.toReal lip f\n_def_f₀ : f₀ = comp NNReal.toReal lip f\nf₀_eq : ↑f₀ = NNReal.toReal ∘ ↑f\nf₀_nn : 0 ≤ ↑f₀\nf₀_ae_nn : 0 ≤ᵐ[↑μ] ↑f₀\n⊢ Tendsto (fun n => ENNReal.toReal (∫⁻ (ω : Ω), ↑(↑f ω) ∂↑(μs n))) F (𝓝 (ENNReal.toReal (∫⁻ (ω : Ω), ↑(↑f ω) ∂↑μ)))\n[PROOFSTEP]\nhave f₀_ae_nns : ∀ i, 0 ≤ᵐ[(μs i : Measure Ω)] ⇑f₀ := fun i => eventually_of_forall f₀_nn\n[GOAL]\nΩ : Type u_1\ninst✝² : MeasurableSpace Ω\ninst✝¹ : TopologicalSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nγ : Type u_2\nF : Filter γ\nμs : γ → FiniteMeasure Ω\nμ : FiniteMeasure Ω\nh : ∀ (f : Ω →ᵇ ℝ), Tendsto (fun i => ∫ (x : Ω), ↑f x ∂↑(μs i)) F (𝓝 (∫ (x : Ω), ↑f x ∂↑μ))\nf : Ω →ᵇ ℝ≥0\nkey :\n  Tendsto (fun n => ENNReal.toReal (∫⁻ (ω : Ω), ↑(↑f ω) ∂↑(μs n))) F (𝓝 (ENNReal.toReal (∫⁻ (ω : Ω), ↑(↑f ω) ∂↑μ))) ↔\n    Tendsto (fun i => ∫⁻ (ω : Ω), ↑(↑f ω) ∂↑(μs i)) F (𝓝 (∫⁻ (ω : Ω), ↑(↑f ω) ∂↑μ))\nlip : LipschitzWith 1 NNReal.toReal\nf₀ : Ω →ᵇ ℝ := comp NNReal.toReal lip f\n_def_f₀ : f₀ = comp NNReal.toReal lip f\nf₀_eq : ↑f₀ = NNReal.toReal ∘ ↑f\nf₀_nn : 0 ≤ ↑f₀\nf₀_ae_nn : 0 ≤ᵐ[↑μ] ↑f₀\nf₀_ae_nns : ∀ (i : γ), 0 ≤ᵐ[↑(μs i)] ↑f₀\n⊢ Tendsto (fun n => ENNReal.toReal (∫⁻ (ω : Ω), ↑(↑f ω) ∂↑(μs n))) F (𝓝 (ENNReal.toReal (∫⁻ (ω : Ω), ↑(↑f ω) ∂↑μ)))\n[PROOFSTEP]\nhave aux := integral_eq_lintegral_of_nonneg_ae f₀_ae_nn f₀.continuous.measurable.aestronglyMeasurable\n[GOAL]\nΩ : Type u_1\ninst✝² : MeasurableSpace Ω\ninst✝¹ : TopologicalSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nγ : Type u_2\nF : Filter γ\nμs : γ → FiniteMeasure Ω\nμ : FiniteMeasure Ω\nh : ∀ (f : Ω →ᵇ ℝ), Tendsto (fun i => ∫ (x : Ω), ↑f x ∂↑(μs i)) F (𝓝 (∫ (x : Ω), ↑f x ∂↑μ))\nf : Ω →ᵇ ℝ≥0\nkey :\n  Tendsto (fun n => ENNReal.toReal (∫⁻ (ω : Ω), ↑(↑f ω) ∂↑(μs n))) F (𝓝 (ENNReal.toReal (∫⁻ (ω : Ω), ↑(↑f ω) ∂↑μ))) ↔\n    Tendsto (fun i => ∫⁻ (ω : Ω), ↑(↑f ω) ∂↑(μs i)) F (𝓝 (∫⁻ (ω : Ω), ↑(↑f ω) ∂↑μ))\nlip : LipschitzWith 1 NNReal.toReal\nf₀ : Ω →ᵇ ℝ := comp NNReal.toReal lip f\n_def_f₀ : f₀ = comp NNReal.toReal lip f\nf₀_eq : ↑f₀ = NNReal.toReal ∘ ↑f\nf₀_nn : 0 ≤ ↑f₀\nf₀_ae_nn : 0 ≤ᵐ[↑μ] ↑f₀\nf₀_ae_nns : ∀ (i : γ), 0 ≤ᵐ[↑(μs i)] ↑f₀\naux : ∫ (a : Ω), ↑f₀ a ∂↑μ = ENNReal.toReal (∫⁻ (a : Ω), ENNReal.ofReal (↑f₀ a) ∂↑μ)\n⊢ Tendsto (fun n => ENNReal.toReal (∫⁻ (ω : Ω), ↑(↑f ω) ∂↑(μs n))) F (𝓝 (ENNReal.toReal (∫⁻ (ω : Ω), ↑(↑f ω) ∂↑μ)))\n[PROOFSTEP]\nhave auxs := fun i => integral_eq_lintegral_of_nonneg_ae (f₀_ae_nns i) f₀.continuous.measurable.aestronglyMeasurable\n[GOAL]\nΩ : Type u_1\ninst✝² : MeasurableSpace Ω\ninst✝¹ : TopologicalSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nγ : Type u_2\nF : Filter γ\nμs : γ → FiniteMeasure Ω\nμ : FiniteMeasure Ω\nh : ∀ (f : Ω →ᵇ ℝ), Tendsto (fun i => ∫ (x : Ω), ↑f x ∂↑(μs i)) F (𝓝 (∫ (x : Ω), ↑f x ∂↑μ))\nf : Ω →ᵇ ℝ≥0\nkey :\n  Tendsto (fun n => ENNReal.toReal (∫⁻ (ω : Ω), ↑(↑f ω) ∂↑(μs n))) F (𝓝 (ENNReal.toReal (∫⁻ (ω : Ω), ↑(↑f ω) ∂↑μ))) ↔\n    Tendsto (fun i => ∫⁻ (ω : Ω), ↑(↑f ω) ∂↑(μs i)) F (𝓝 (∫⁻ (ω : Ω), ↑(↑f ω) ∂↑μ))\nlip : LipschitzWith 1 NNReal.toReal\nf₀ : Ω →ᵇ ℝ := comp NNReal.toReal lip f\n_def_f₀ : f₀ = comp NNReal.toReal lip f\nf₀_eq : ↑f₀ = NNReal.toReal ∘ ↑f\nf₀_nn : 0 ≤ ↑f₀\nf₀_ae_nn : 0 ≤ᵐ[↑μ] ↑f₀\nf₀_ae_nns : ∀ (i : γ), 0 ≤ᵐ[↑(μs i)] ↑f₀\naux : ∫ (a : Ω), ↑f₀ a ∂↑μ = ENNReal.toReal (∫⁻ (a : Ω), ENNReal.ofReal (↑f₀ a) ∂↑μ)\nauxs : ∀ (i : γ), ∫ (a : Ω), ↑f₀ a ∂↑(μs i) = ENNReal.toReal (∫⁻ (a : Ω), ENNReal.ofReal (↑f₀ a) ∂↑(μs i))\n⊢ Tendsto (fun n => ENNReal.toReal (∫⁻ (ω : Ω), ↑(↑f ω) ∂↑(μs n))) F (𝓝 (ENNReal.toReal (∫⁻ (ω : Ω), ↑(↑f ω) ∂↑μ)))\n[PROOFSTEP]\nsimp_rw [f₀_eq, Function.comp_apply, ENNReal.ofReal_coe_nnreal] at aux auxs \n[GOAL]\nΩ : Type u_1\ninst✝² : MeasurableSpace Ω\ninst✝¹ : TopologicalSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nγ : Type u_2\nF : Filter γ\nμs : γ → FiniteMeasure Ω\nμ : FiniteMeasure Ω\nh : ∀ (f : Ω →ᵇ ℝ), Tendsto (fun i => ∫ (x : Ω), ↑f x ∂↑(μs i)) F (𝓝 (∫ (x : Ω), ↑f x ∂↑μ))\nf : Ω →ᵇ ℝ≥0\nkey :\n  Tendsto (fun n => ENNReal.toReal (∫⁻ (ω : Ω), ↑(↑f ω) ∂↑(μs n))) F (𝓝 (ENNReal.toReal (∫⁻ (ω : Ω), ↑(↑f ω) ∂↑μ))) ↔\n    Tendsto (fun i => ∫⁻ (ω : Ω), ↑(↑f ω) ∂↑(μs i)) F (𝓝 (∫⁻ (ω : Ω), ↑(↑f ω) ∂↑μ))\nlip : LipschitzWith 1 NNReal.toReal\nf₀ : Ω →ᵇ ℝ := comp NNReal.toReal lip f\n_def_f₀ : f₀ = comp NNReal.toReal lip f\nf₀_eq : ↑f₀ = NNReal.toReal ∘ ↑f\nf₀_nn : 0 ≤ ↑f₀\nf₀_ae_nn : 0 ≤ᵐ[↑μ] ↑f₀\nf₀_ae_nns : ∀ (i : γ), 0 ≤ᵐ[↑(μs i)] ↑f₀\naux : ∫ (a : Ω), ↑(↑f a) ∂↑μ = ENNReal.toReal (∫⁻ (a : Ω), ↑(↑f a) ∂↑μ)\nauxs : ∀ (i : γ), ∫ (a : Ω), ↑(↑f a) ∂↑(μs i) = ENNReal.toReal (∫⁻ (a : Ω), ↑(↑f a) ∂↑(μs i))\n⊢ Tendsto (fun n => ENNReal.toReal (∫⁻ (ω : Ω), ↑(↑f ω) ∂↑(μs n))) F (𝓝 (ENNReal.toReal (∫⁻ (ω : Ω), ↑(↑f ω) ∂↑μ)))\n[PROOFSTEP]\nsimpa only [← aux, ← auxs] using h f₀\n[GOAL]\nΩ : Type u_1\ninst✝² : MeasurableSpace Ω\ninst✝¹ : TopologicalSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nf : Ω →ᵇ ℝ≥0\nμ : Measure Ω\n⊢ ENNReal.toReal (∫⁻ (x : Ω), ↑(↑f x) ∂μ) = ∫ (x : Ω), ↑(↑f x) ∂μ\n[PROOFSTEP]\nrw [integral_eq_lintegral_of_nonneg_ae _\n    (by simpa [Function.comp_apply] using (NNReal.continuous_coe.comp f.continuous).measurable.aestronglyMeasurable)]\n[GOAL]\nΩ : Type u_1\ninst✝² : MeasurableSpace Ω\ninst✝¹ : TopologicalSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nf : Ω →ᵇ ℝ≥0\nμ : Measure Ω\n⊢ AEStronglyMeasurable (fun x => ↑(↑f x)) μ\n[PROOFSTEP]\nsimpa [Function.comp_apply] using (NNReal.continuous_coe.comp f.continuous).measurable.aestronglyMeasurable\n[GOAL]\nΩ : Type u_1\ninst✝² : MeasurableSpace Ω\ninst✝¹ : TopologicalSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nf : Ω →ᵇ ℝ≥0\nμ : Measure Ω\n⊢ ENNReal.toReal (∫⁻ (x : Ω), ↑(↑f x) ∂μ) = ENNReal.toReal (∫⁻ (a : Ω), ENNReal.ofReal ↑(↑f a) ∂μ)\n[PROOFSTEP]\nsimp only [ENNReal.ofReal_coe_nnreal]\n[GOAL]\nΩ : Type u_1\ninst✝² : MeasurableSpace Ω\ninst✝¹ : TopologicalSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nf : Ω →ᵇ ℝ≥0\nμ : Measure Ω\n⊢ 0 ≤ᵐ[μ] fun x => ↑(↑f x)\n[PROOFSTEP]\napply eventually_of_forall\n[GOAL]\ncase hp\nΩ : Type u_1\ninst✝² : MeasurableSpace Ω\ninst✝¹ : TopologicalSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nf : Ω →ᵇ ℝ≥0\nμ : Measure Ω\n⊢ ∀ (x : Ω), OfNat.ofNat 0 x ≤ (fun x => ↑(↑f x)) x\n[PROOFSTEP]\nsimp only [Pi.zero_apply, NNReal.zero_le_coe, imp_true_iff]\n[GOAL]\nΩ : Type u_1\ninst✝² : MeasurableSpace Ω\ninst✝¹ : TopologicalSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nγ : Type u_2\nF : Filter γ\nμs : γ → FiniteMeasure Ω\nμ : FiniteMeasure Ω\n⊢ Tendsto μs F (𝓝 μ) ↔ ∀ (f : Ω →ᵇ ℝ), Tendsto (fun i => ∫ (x : Ω), ↑f x ∂↑(μs i)) F (𝓝 (∫ (x : Ω), ↑f x ∂↑μ))\n[PROOFSTEP]\nrefine' ⟨_, tendsto_of_forall_integral_tendsto⟩\n[GOAL]\nΩ : Type u_1\ninst✝² : MeasurableSpace Ω\ninst✝¹ : TopologicalSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nγ : Type u_2\nF : Filter γ\nμs : γ → FiniteMeasure Ω\nμ : FiniteMeasure Ω\n⊢ Tendsto μs F (𝓝 μ) → ∀ (f : Ω →ᵇ ℝ), Tendsto (fun i => ∫ (x : Ω), ↑f x ∂↑(μs i)) F (𝓝 (∫ (x : Ω), ↑f x ∂↑μ))\n[PROOFSTEP]\nrw [tendsto_iff_forall_lintegral_tendsto]\n[GOAL]\nΩ : Type u_1\ninst✝² : MeasurableSpace Ω\ninst✝¹ : TopologicalSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nγ : Type u_2\nF : Filter γ\nμs : γ → FiniteMeasure Ω\nμ : FiniteMeasure Ω\n⊢ (∀ (f : Ω →ᵇ ℝ≥0), Tendsto (fun i => ∫⁻ (x : Ω), ↑(↑f x) ∂↑(μs i)) F (𝓝 (∫⁻ (x : Ω), ↑(↑f x) ∂↑μ))) →\n    ∀ (f : Ω →ᵇ ℝ), Tendsto (fun i => ∫ (x : Ω), ↑f x ∂↑(μs i)) F (𝓝 (∫ (x : Ω), ↑f x ∂↑μ))\n[PROOFSTEP]\nintro h f\n[GOAL]\nΩ : Type u_1\ninst✝² : MeasurableSpace Ω\ninst✝¹ : TopologicalSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nγ : Type u_2\nF : Filter γ\nμs : γ → FiniteMeasure Ω\nμ : FiniteMeasure Ω\nh : ∀ (f : Ω →ᵇ ℝ≥0), Tendsto (fun i => ∫⁻ (x : Ω), ↑(↑f x) ∂↑(μs i)) F (𝓝 (∫⁻ (x : Ω), ↑(↑f x) ∂↑μ))\nf : Ω →ᵇ ℝ\n⊢ Tendsto (fun i => ∫ (x : Ω), ↑f x ∂↑(μs i)) F (𝓝 (∫ (x : Ω), ↑f x ∂↑μ))\n[PROOFSTEP]\nsimp_rw [BoundedContinuousFunction.integral_eq_integral_nnrealPart_sub]\n[GOAL]\nΩ : Type u_1\ninst✝² : MeasurableSpace Ω\ninst✝¹ : TopologicalSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nγ : Type u_2\nF : Filter γ\nμs : γ → FiniteMeasure Ω\nμ : FiniteMeasure Ω\nh : ∀ (f : Ω →ᵇ ℝ≥0), Tendsto (fun i => ∫⁻ (x : Ω), ↑(↑f x) ∂↑(μs i)) F (𝓝 (∫⁻ (x : Ω), ↑(↑f x) ∂↑μ))\nf : Ω →ᵇ ℝ\n⊢ Tendsto (fun i => ∫ (ω : Ω), ↑(↑(nnrealPart f) ω) ∂↑(μs i) - ∫ (ω : Ω), ↑(↑(nnrealPart (-f)) ω) ∂↑(μs i)) F\n    (𝓝 (∫ (ω : Ω), ↑(↑(nnrealPart f) ω) ∂↑μ - ∫ (ω : Ω), ↑(↑(nnrealPart (-f)) ω) ∂↑μ))\n[PROOFSTEP]\nset f_pos := f.nnrealPart with _def_f_pos\n[GOAL]\nΩ : Type u_1\ninst✝² : MeasurableSpace Ω\ninst✝¹ : TopologicalSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nγ : Type u_2\nF : Filter γ\nμs : γ → FiniteMeasure Ω\nμ : FiniteMeasure Ω\nh : ∀ (f : Ω →ᵇ ℝ≥0), Tendsto (fun i => ∫⁻ (x : Ω), ↑(↑f x) ∂↑(μs i)) F (𝓝 (∫⁻ (x : Ω), ↑(↑f x) ∂↑μ))\nf : Ω →ᵇ ℝ\nf_pos : Ω →ᵇ ℝ≥0 := nnrealPart f\n_def_f_pos : f_pos = nnrealPart f\n⊢ Tendsto (fun i => ∫ (ω : Ω), ↑(↑f_pos ω) ∂↑(μs i) - ∫ (ω : Ω), ↑(↑(nnrealPart (-f)) ω) ∂↑(μs i)) F\n    (𝓝 (∫ (ω : Ω), ↑(↑f_pos ω) ∂↑μ - ∫ (ω : Ω), ↑(↑(nnrealPart (-f)) ω) ∂↑μ))\n[PROOFSTEP]\nset f_neg := (-f).nnrealPart with _def_f_neg\n[GOAL]\nΩ : Type u_1\ninst✝² : MeasurableSpace Ω\ninst✝¹ : TopologicalSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nγ : Type u_2\nF : Filter γ\nμs : γ → FiniteMeasure Ω\nμ : FiniteMeasure Ω\nh : ∀ (f : Ω →ᵇ ℝ≥0), Tendsto (fun i => ∫⁻ (x : Ω), ↑(↑f x) ∂↑(μs i)) F (𝓝 (∫⁻ (x : Ω), ↑(↑f x) ∂↑μ))\nf : Ω →ᵇ ℝ\nf_pos : Ω →ᵇ ℝ≥0 := nnrealPart f\n_def_f_pos : f_pos = nnrealPart f\nf_neg : Ω →ᵇ ℝ≥0 := nnrealPart (-f)\n_def_f_neg : f_neg = nnrealPart (-f)\n⊢ Tendsto (fun i => ∫ (ω : Ω), ↑(↑f_pos ω) ∂↑(μs i) - ∫ (ω : Ω), ↑(↑f_neg ω) ∂↑(μs i)) F\n    (𝓝 (∫ (ω : Ω), ↑(↑f_pos ω) ∂↑μ - ∫ (ω : Ω), ↑(↑f_neg ω) ∂↑μ))\n[PROOFSTEP]\nhave tends_pos :=\n  (ENNReal.tendsto_toReal (lintegral_lt_top_of_boundedContinuous_to_nnreal (μ : Measure Ω) f_pos).ne).comp (h f_pos)\n[GOAL]\nΩ : Type u_1\ninst✝² : MeasurableSpace Ω\ninst✝¹ : TopologicalSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nγ : Type u_2\nF : Filter γ\nμs : γ → FiniteMeasure Ω\nμ : FiniteMeasure Ω\nh : ∀ (f : Ω →ᵇ ℝ≥0), Tendsto (fun i => ∫⁻ (x : Ω), ↑(↑f x) ∂↑(μs i)) F (𝓝 (∫⁻ (x : Ω), ↑(↑f x) ∂↑μ))\nf : Ω →ᵇ ℝ\nf_pos : Ω →ᵇ ℝ≥0 := nnrealPart f\n_def_f_pos : f_pos = nnrealPart f\nf_neg : Ω →ᵇ ℝ≥0 := nnrealPart (-f)\n_def_f_neg : f_neg = nnrealPart (-f)\ntends_pos :\n  Tendsto (ENNReal.toReal ∘ fun i => ∫⁻ (x : Ω), ↑(↑f_pos x) ∂↑(μs i)) F\n    (𝓝 (ENNReal.toReal (∫⁻ (ω : Ω), ↑(↑f_pos ω) ∂↑μ)))\n⊢ Tendsto (fun i => ∫ (ω : Ω), ↑(↑f_pos ω) ∂↑(μs i) - ∫ (ω : Ω), ↑(↑f_neg ω) ∂↑(μs i)) F\n    (𝓝 (∫ (ω : Ω), ↑(↑f_pos ω) ∂↑μ - ∫ (ω : Ω), ↑(↑f_neg ω) ∂↑μ))\n[PROOFSTEP]\nhave tends_neg :=\n  (ENNReal.tendsto_toReal (lintegral_lt_top_of_boundedContinuous_to_nnreal (μ : Measure Ω) f_neg).ne).comp (h f_neg)\n[GOAL]\nΩ : Type u_1\ninst✝² : MeasurableSpace Ω\ninst✝¹ : TopologicalSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nγ : Type u_2\nF : Filter γ\nμs : γ → FiniteMeasure Ω\nμ : FiniteMeasure Ω\nh : ∀ (f : Ω →ᵇ ℝ≥0), Tendsto (fun i => ∫⁻ (x : Ω), ↑(↑f x) ∂↑(μs i)) F (𝓝 (∫⁻ (x : Ω), ↑(↑f x) ∂↑μ))\nf : Ω →ᵇ ℝ\nf_pos : Ω →ᵇ ℝ≥0 := nnrealPart f\n_def_f_pos : f_pos = nnrealPart f\nf_neg : Ω →ᵇ ℝ≥0 := nnrealPart (-f)\n_def_f_neg : f_neg = nnrealPart (-f)\ntends_pos :\n  Tendsto (ENNReal.toReal ∘ fun i => ∫⁻ (x : Ω), ↑(↑f_pos x) ∂↑(μs i)) F\n    (𝓝 (ENNReal.toReal (∫⁻ (ω : Ω), ↑(↑f_pos ω) ∂↑μ)))\ntends_neg :\n  Tendsto (ENNReal.toReal ∘ fun i => ∫⁻ (x : Ω), ↑(↑f_neg x) ∂↑(μs i)) F\n    (𝓝 (ENNReal.toReal (∫⁻ (ω : Ω), ↑(↑f_neg ω) ∂↑μ)))\n⊢ Tendsto (fun i => ∫ (ω : Ω), ↑(↑f_pos ω) ∂↑(μs i) - ∫ (ω : Ω), ↑(↑f_neg ω) ∂↑(μs i)) F\n    (𝓝 (∫ (ω : Ω), ↑(↑f_pos ω) ∂↑μ - ∫ (ω : Ω), ↑(↑f_neg ω) ∂↑μ))\n[PROOFSTEP]\nhave aux :\n  ∀ g : Ω →ᵇ ℝ≥0,\n    (ENNReal.toReal ∘ fun i : γ => ∫⁻ x : Ω, ↑(g x) ∂(μs i : Measure Ω)) = fun i : γ =>\n      (∫⁻ x : Ω, ↑(g x) ∂(μs i : Measure Ω)).toReal :=\n  fun _ => rfl\n[GOAL]\nΩ : Type u_1\ninst✝² : MeasurableSpace Ω\ninst✝¹ : TopologicalSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nγ : Type u_2\nF : Filter γ\nμs : γ → FiniteMeasure Ω\nμ : FiniteMeasure Ω\nh : ∀ (f : Ω →ᵇ ℝ≥0), Tendsto (fun i => ∫⁻ (x : Ω), ↑(↑f x) ∂↑(μs i)) F (𝓝 (∫⁻ (x : Ω), ↑(↑f x) ∂↑μ))\nf : Ω →ᵇ ℝ\nf_pos : Ω →ᵇ ℝ≥0 := nnrealPart f\n_def_f_pos : f_pos = nnrealPart f\nf_neg : Ω →ᵇ ℝ≥0 := nnrealPart (-f)\n_def_f_neg : f_neg = nnrealPart (-f)\ntends_pos :\n  Tendsto (ENNReal.toReal ∘ fun i => ∫⁻ (x : Ω), ↑(↑f_pos x) ∂↑(μs i)) F\n    (𝓝 (ENNReal.toReal (∫⁻ (ω : Ω), ↑(↑f_pos ω) ∂↑μ)))\ntends_neg :\n  Tendsto (ENNReal.toReal ∘ fun i => ∫⁻ (x : Ω), ↑(↑f_neg x) ∂↑(μs i)) F\n    (𝓝 (ENNReal.toReal (∫⁻ (ω : Ω), ↑(↑f_neg ω) ∂↑μ)))\naux :\n  ∀ (g : Ω →ᵇ ℝ≥0),\n    (ENNReal.toReal ∘ fun i => ∫⁻ (x : Ω), ↑(↑g x) ∂↑(μs i)) = fun i => ENNReal.toReal (∫⁻ (x : Ω), ↑(↑g x) ∂↑(μs i))\n⊢ Tendsto (fun i => ∫ (ω : Ω), ↑(↑f_pos ω) ∂↑(μs i) - ∫ (ω : Ω), ↑(↑f_neg ω) ∂↑(μs i)) F\n    (𝓝 (∫ (ω : Ω), ↑(↑f_pos ω) ∂↑μ - ∫ (ω : Ω), ↑(↑f_neg ω) ∂↑μ))\n[PROOFSTEP]\nsimp_rw [aux, BoundedContinuousFunction.NNReal.toReal_lintegral_eq_integral] at tends_pos tends_neg \n[GOAL]\nΩ : Type u_1\ninst✝² : MeasurableSpace Ω\ninst✝¹ : TopologicalSpace Ω\ninst✝ : OpensMeasurableSpace Ω\nγ : Type u_2\nF : Filter γ\nμs : γ → FiniteMeasure Ω\nμ : FiniteMeasure Ω\nh : ∀ (f : Ω →ᵇ ℝ≥0), Tendsto (fun i => ∫⁻ (x : Ω), ↑(↑f x) ∂↑(μs i)) F (𝓝 (∫⁻ (x : Ω), ↑(↑f x) ∂↑μ))\nf : Ω →ᵇ ℝ\nf_pos : Ω →ᵇ ℝ≥0 := nnrealPart f\n_def_f_pos : f_pos = nnrealPart f\nf_neg : Ω →ᵇ ℝ≥0 := nnrealPart (-f)\n_def_f_neg : f_neg = nnrealPart (-f)\naux :\n  ∀ (g : Ω →ᵇ ℝ≥0),\n    (ENNReal.toReal ∘ fun i => ∫⁻ (x : Ω), ↑(↑g x) ∂↑(μs i)) = fun i => ENNReal.toReal (∫⁻ (x : Ω), ↑(↑g x) ∂↑(μs i))\ntends_pos : Tendsto (fun i => ∫ (x : Ω), ↑(↑(nnrealPart f) x) ∂↑(μs i)) F (𝓝 (∫ (x : Ω), ↑(↑(nnrealPart f) x) ∂↑μ))\ntends_neg :\n  Tendsto (fun i => ∫ (x : Ω), ↑(↑(nnrealPart (-f)) x) ∂↑(μs i)) F (𝓝 (∫ (x : Ω), ↑(↑(nnrealPart (-f)) x) ∂↑μ))\n⊢ Tendsto (fun i => ∫ (ω : Ω), ↑(↑f_pos ω) ∂↑(μs i) - ∫ (ω : Ω), ↑(↑f_neg ω) ∂↑(μs i)) F\n    (𝓝 (∫ (ω : Ω), ↑(↑f_pos ω) ∂↑μ - ∫ (ω : Ω), ↑(↑f_neg ω) ∂↑μ))\n[PROOFSTEP]\nexact Tendsto.sub tends_pos tends_neg\n", "meta": {"mathlib_filename": "Mathlib.MeasureTheory.Measure.FiniteMeasure", "llama_tokens": 41684, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7826624789529375, "lm_q2_score": 0.6688802603710086, "lm_q1q2_score": 0.5235074827046599}}
{"text": "[GOAL]\nα : Type u_1\nl : List α\ns : Multiset α\n⊢ ∀ (a : List α), Quotient.mk (isSetoid α) a ∈ powersetAux l ↔ Quotient.mk (isSetoid α) a ≤ ↑l\n[PROOFSTEP]\nsimp [powersetAux_eq_map_coe, Subperm, and_comm]\n[GOAL]\nα : Type u_1\nl : List α\n⊢ powersetAux l ~ powersetAux' l\n[PROOFSTEP]\nrw [powersetAux_eq_map_coe]\n[GOAL]\nα : Type u_1\nl : List α\n⊢ List.map ofList (sublists l) ~ powersetAux' l\n[PROOFSTEP]\nexact (sublists_perm_sublists' _).map _\n[GOAL]\nα : Type u_1\na : α\nl : List α\n⊢ powersetAux' (a :: l) = powersetAux' l ++ List.map (cons a) (powersetAux' l)\n[PROOFSTEP]\nsimp [powersetAux']\n[GOAL]\nα : Type u_1\na : α\nl : List α\n⊢ List.map (ofList ∘ List.cons a) (sublists' l) = List.map (cons a ∘ ofList) (sublists' l)\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nl₁ l₂ : List α\np : l₁ ~ l₂\n⊢ powersetAux' l₁ ~ powersetAux' l₂\n[PROOFSTEP]\ninduction' p with a l₁ l₂ p IH a b l l₁ l₂ l₃ _ _ IH₁ IH₂\n[GOAL]\ncase nil\nα : Type u_1\nl₁ l₂ : List α\n⊢ powersetAux' [] ~ powersetAux' []\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\nα : Type u_1\nl₁✝ l₂✝ : List α\na : α\nl₁ l₂ : List α\np : l₁ ~ l₂\nIH : powersetAux' l₁ ~ powersetAux' l₂\n⊢ powersetAux' (a :: l₁) ~ powersetAux' (a :: l₂)\n[PROOFSTEP]\nsimp only [powersetAux'_cons]\n[GOAL]\ncase cons\nα : Type u_1\nl₁✝ l₂✝ : List α\na : α\nl₁ l₂ : List α\np : l₁ ~ l₂\nIH : powersetAux' l₁ ~ powersetAux' l₂\n⊢ powersetAux' l₁ ++ List.map (cons a) (powersetAux' l₁) ~ powersetAux' l₂ ++ List.map (cons a) (powersetAux' l₂)\n[PROOFSTEP]\nexact IH.append (IH.map _)\n[GOAL]\ncase swap\nα : Type u_1\nl₁ l₂ : List α\na b : α\nl : List α\n⊢ powersetAux' (b :: a :: l) ~ powersetAux' (a :: b :: l)\n[PROOFSTEP]\nsimp only [powersetAux'_cons, map_append, List.map_map, append_assoc]\n[GOAL]\ncase swap\nα : Type u_1\nl₁ l₂ : List α\na b : α\nl : List α\n⊢ powersetAux' l ++\n      (List.map (cons a) (powersetAux' l) ++\n        (List.map (cons b) (powersetAux' l) ++ List.map (cons b ∘ cons a) (powersetAux' l))) ~\n    powersetAux' l ++\n      (List.map (cons b) (powersetAux' l) ++\n        (List.map (cons a) (powersetAux' l) ++ List.map (cons a ∘ cons b) (powersetAux' l)))\n[PROOFSTEP]\napply Perm.append_left\n[GOAL]\ncase swap.a\nα : Type u_1\nl₁ l₂ : List α\na b : α\nl : List α\n⊢ List.map (cons a) (powersetAux' l) ++\n      (List.map (cons b) (powersetAux' l) ++ List.map (cons b ∘ cons a) (powersetAux' l)) ~\n    List.map (cons b) (powersetAux' l) ++\n      (List.map (cons a) (powersetAux' l) ++ List.map (cons a ∘ cons b) (powersetAux' l))\n[PROOFSTEP]\nrw [← append_assoc, ← append_assoc, (by funext s; simp [cons_swap] : cons b ∘ cons a = cons a ∘ cons b)]\n[GOAL]\nα : Type u_1\nl₁ l₂ : List α\na b : α\nl : List α\n⊢ cons b ∘ cons a = cons a ∘ cons b\n[PROOFSTEP]\nfunext s\n[GOAL]\ncase h\nα : Type u_1\nl₁ l₂ : List α\na b : α\nl : List α\ns : Multiset α\n⊢ (cons b ∘ cons a) s = (cons a ∘ cons b) s\n[PROOFSTEP]\nsimp [cons_swap]\n[GOAL]\ncase swap.a\nα : Type u_1\nl₁ l₂ : List α\na b : α\nl : List α\n⊢ List.map (cons a) (powersetAux' l) ++ List.map (cons b) (powersetAux' l) ++\n      List.map (cons a ∘ cons b) (powersetAux' l) ~\n    List.map (cons b) (powersetAux' l) ++ List.map (cons a) (powersetAux' l) ++\n      List.map (cons a ∘ cons b) (powersetAux' l)\n[PROOFSTEP]\nexact perm_append_comm.append_right _\n[GOAL]\ncase trans\nα : Type u_1\nl₁✝ l₂✝ l₁ l₂ l₃ : List α\na✝¹ : l₁ ~ l₂\na✝ : l₂ ~ l₃\nIH₁ : powersetAux' l₁ ~ powersetAux' l₂\nIH₂ : powersetAux' l₂ ~ powersetAux' l₃\n⊢ powersetAux' l₁ ~ powersetAux' l₃\n[PROOFSTEP]\nexact IH₁.trans IH₂\n[GOAL]\nα : Type u_1\na : α\ns : Multiset α\nl : List α\n⊢ powerset (a ::ₘ Quotient.mk (isSetoid α) l) =\n    powerset (Quotient.mk (isSetoid α) l) + map (cons a) (powerset (Quotient.mk (isSetoid α) l))\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\na : α\ns : Multiset α\nl : List α\n⊢ List.map ofList (sublists' l) ++ List.map (ofList ∘ List.cons a) (sublists' l) ~\n    List.map ofList (sublists' l) ++ List.map ((fun x => a ::ₘ x) ∘ ofList) (sublists' l)\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\ns t : Multiset α\n⊢ ∀ (a b : List α),\n    Quotient.mk (isSetoid α) a ∈ powerset (Quotient.mk (isSetoid α) b) ↔\n      Quotient.mk (isSetoid α) a ≤ Quotient.mk (isSetoid α) b\n[PROOFSTEP]\nsimp [Subperm, and_comm]\n[GOAL]\nα : Type u_1\ns : Multiset α\nl : List α\n⊢ map singleton (Quotient.mk (isSetoid α) l) ≤ powerset (Quotient.mk (isSetoid α) l)\n[PROOFSTEP]\nsimp only [powerset_coe, quot_mk_to_coe, coe_le, coe_map]\n[GOAL]\nα : Type u_1\ns : Multiset α\nl : List α\n⊢ List.map singleton l <+~ List.map ofList (sublists l)\n[PROOFSTEP]\nshow l.map (((↑) : List α → Multiset α) ∘ List.ret) <+~ (sublists l).map (↑)\n[GOAL]\nα : Type u_1\ns : Multiset α\nl : List α\n⊢ List.map (ofList ∘ List.ret) l <+~ List.map ofList (sublists l)\n[PROOFSTEP]\nrw [← List.map_map]\n[GOAL]\nα : Type u_1\ns : Multiset α\nl : List α\n⊢ List.map ofList (List.map List.ret l) <+~ List.map ofList (sublists l)\n[PROOFSTEP]\nexact ((map_ret_sublist_sublists _).map _).subperm\n[GOAL]\nα : Type u_1\ns : Multiset α\n⊢ ∀ (a : List α), ↑card (powerset (Quotient.mk (isSetoid α) a)) = 2 ^ ↑card (Quotient.mk (isSetoid α) a)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nl : List α\nx : Multiset α × Multiset α\nh : x ∈ revzip (powersetAux l)\n⊢ x.fst + x.snd = ↑l\n[PROOFSTEP]\nrw [revzip, powersetAux_eq_map_coe, ← map_reverse, zip_map, ← revzip, List.mem_map] at h \n[GOAL]\nα : Type u_1\nl : List α\nx : Multiset α × Multiset α\nh : ∃ a, a ∈ revzip (sublists l) ∧ Prod.map ofList ofList a = x\n⊢ x.fst + x.snd = ↑l\n[PROOFSTEP]\nsimp only [Prod_map, Prod.exists] at h \n[GOAL]\nα : Type u_1\nl : List α\nx : Multiset α × Multiset α\nh : ∃ a b, (a, b) ∈ revzip (sublists l) ∧ (↑a, ↑b) = x\n⊢ x.fst + x.snd = ↑l\n[PROOFSTEP]\nrcases h with ⟨l₁, l₂, h, rfl, rfl⟩\n[GOAL]\ncase intro.intro.intro.refl\nα : Type u_1\nl l₁ l₂ : List α\nh : (l₁, l₂) ∈ revzip (sublists l)\n⊢ (↑l₁, ↑l₂).fst + (↑l₁, ↑l₂).snd = ↑l\n[PROOFSTEP]\nexact Quot.sound (revzip_sublists _ _ _ h)\n[GOAL]\nα : Type u_1\nl : List α\nx : Multiset α × Multiset α\nh : x ∈ revzip (powersetAux' l)\n⊢ x.fst + x.snd = ↑l\n[PROOFSTEP]\nrw [revzip, powersetAux', ← map_reverse, zip_map, ← revzip, List.mem_map] at h \n[GOAL]\nα : Type u_1\nl : List α\nx : Multiset α × Multiset α\nh : ∃ a, a ∈ revzip (sublists' l) ∧ Prod.map ofList ofList a = x\n⊢ x.fst + x.snd = ↑l\n[PROOFSTEP]\nsimp only [Prod_map, Prod.exists] at h \n[GOAL]\nα : Type u_1\nl : List α\nx : Multiset α × Multiset α\nh : ∃ a b, (a, b) ∈ revzip (sublists' l) ∧ (↑a, ↑b) = x\n⊢ x.fst + x.snd = ↑l\n[PROOFSTEP]\nrcases h with ⟨l₁, l₂, h, rfl, rfl⟩\n[GOAL]\ncase intro.intro.intro.refl\nα : Type u_1\nl l₁ l₂ : List α\nh : (l₁, l₂) ∈ revzip (sublists' l)\n⊢ (↑l₁, ↑l₂).fst + (↑l₁, ↑l₂).snd = ↑l\n[PROOFSTEP]\nexact Quot.sound (revzip_sublists' _ _ _ h)\n[GOAL]\nα✝ : Type u_1\nα : Type u\ninst✝ : DecidableEq α\nl : List α\nl' : List (Multiset α)\nH : ∀ ⦃x : Multiset α × Multiset α⦄, x ∈ revzip l' → x.fst + x.snd = ↑l\n⊢ revzip l' = List.map (fun x => (x, ↑l - x)) l'\n[PROOFSTEP]\nhave :\n  Forall₂ (fun (p : Multiset α × Multiset α) (s : Multiset α) => p = (s, ↑l - s)) (revzip l')\n    ((revzip l').map Prod.fst) :=\n  by\n  rw [forall₂_map_right_iff, forall₂_same]\n  rintro ⟨s, t⟩ h\n  dsimp\n  rw [← H h, add_tsub_cancel_left]\n[GOAL]\nα✝ : Type u_1\nα : Type u\ninst✝ : DecidableEq α\nl : List α\nl' : List (Multiset α)\nH : ∀ ⦃x : Multiset α × Multiset α⦄, x ∈ revzip l' → x.fst + x.snd = ↑l\n⊢ Forall₂ (fun p s => p = (s, ↑l - s)) (revzip l') (List.map Prod.fst (revzip l'))\n[PROOFSTEP]\nrw [forall₂_map_right_iff, forall₂_same]\n[GOAL]\nα✝ : Type u_1\nα : Type u\ninst✝ : DecidableEq α\nl : List α\nl' : List (Multiset α)\nH : ∀ ⦃x : Multiset α × Multiset α⦄, x ∈ revzip l' → x.fst + x.snd = ↑l\n⊢ ∀ (x : Multiset α × Multiset α), x ∈ revzip l' → x = (x.fst, ↑l - x.fst)\n[PROOFSTEP]\nrintro ⟨s, t⟩ h\n[GOAL]\ncase mk\nα✝ : Type u_1\nα : Type u\ninst✝ : DecidableEq α\nl : List α\nl' : List (Multiset α)\nH : ∀ ⦃x : Multiset α × Multiset α⦄, x ∈ revzip l' → x.fst + x.snd = ↑l\ns t : Multiset α\nh : (s, t) ∈ revzip l'\n⊢ (s, t) = ((s, t).fst, ↑l - (s, t).fst)\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase mk\nα✝ : Type u_1\nα : Type u\ninst✝ : DecidableEq α\nl : List α\nl' : List (Multiset α)\nH : ∀ ⦃x : Multiset α × Multiset α⦄, x ∈ revzip l' → x.fst + x.snd = ↑l\ns t : Multiset α\nh : (s, t) ∈ revzip l'\n⊢ (s, t) = (s, ↑l - s)\n[PROOFSTEP]\nrw [← H h, add_tsub_cancel_left]\n[GOAL]\nα✝ : Type u_1\nα : Type u\ninst✝ : DecidableEq α\nl : List α\nl' : List (Multiset α)\nH : ∀ ⦃x : Multiset α × Multiset α⦄, x ∈ revzip l' → x.fst + x.snd = ↑l\nthis : Forall₂ (fun p s => p = (s, ↑l - s)) (revzip l') (List.map Prod.fst (revzip l'))\n⊢ revzip l' = List.map (fun x => (x, ↑l - x)) l'\n[PROOFSTEP]\nrw [← forall₂_eq_eq_eq, forall₂_map_right_iff]\n[GOAL]\nα✝ : Type u_1\nα : Type u\ninst✝ : DecidableEq α\nl : List α\nl' : List (Multiset α)\nH : ∀ ⦃x : Multiset α × Multiset α⦄, x ∈ revzip l' → x.fst + x.snd = ↑l\nthis : Forall₂ (fun p s => p = (s, ↑l - s)) (revzip l') (List.map Prod.fst (revzip l'))\n⊢ Forall₂ (fun a c => a = (c, ↑l - c)) (revzip l') l'\n[PROOFSTEP]\nsimpa using this\n[GOAL]\nα : Type u_1\nl : List α\n⊢ revzip (powersetAux l) ~ revzip (powersetAux' l)\n[PROOFSTEP]\nhaveI := Classical.decEq α\n[GOAL]\nα : Type u_1\nl : List α\nthis : DecidableEq α\n⊢ revzip (powersetAux l) ~ revzip (powersetAux' l)\n[PROOFSTEP]\nrw [revzip_powersetAux_lemma l revzip_powersetAux, revzip_powersetAux_lemma l revzip_powersetAux']\n[GOAL]\nα : Type u_1\nl : List α\nthis : DecidableEq α\n⊢ List.map (fun x => (x, ↑l - x)) (powersetAux l) ~ List.map (fun x => (x, ↑l - x)) (powersetAux' l)\n[PROOFSTEP]\nexact powersetAux_perm_powersetAux'.map _\n[GOAL]\nα : Type u_1\nl₁ l₂ : List α\np : l₁ ~ l₂\n⊢ revzip (powersetAux l₁) ~ revzip (powersetAux l₂)\n[PROOFSTEP]\nhaveI := Classical.decEq α\n[GOAL]\nα : Type u_1\nl₁ l₂ : List α\np : l₁ ~ l₂\nthis : DecidableEq α\n⊢ revzip (powersetAux l₁) ~ revzip (powersetAux l₂)\n[PROOFSTEP]\nsimp [fun l : List α => revzip_powersetAux_lemma l revzip_powersetAux, coe_eq_coe.2 p]\n[GOAL]\nα : Type u_1\nl₁ l₂ : List α\np : l₁ ~ l₂\nthis : DecidableEq α\n⊢ List.map (fun x => (x, ↑l₂ - x)) (powersetAux l₁) ~ List.map (fun x => (x, ↑l₂ - x)) (powersetAux l₂)\n[PROOFSTEP]\nexact (powersetAux_perm p).map _\n[GOAL]\nα : Type u_1\nn : ℕ\nl : List α\n⊢ powersetLenAux n l = List.map ofList (sublistsLen n l)\n[PROOFSTEP]\nrw [powersetLenAux, sublistsLenAux_eq, append_nil]\n[GOAL]\nα : Type u_1\nn : ℕ\nl : List α\ns : Multiset α\n⊢ ∀ (a : List α),\n    Quotient.mk (isSetoid α) a ∈ powersetLenAux n l ↔\n      Quotient.mk (isSetoid α) a ≤ ↑l ∧ ↑card (Quotient.mk (isSetoid α) a) = n\n[PROOFSTEP]\nsimp [powersetLenAux_eq_map_coe, Subperm]\n[GOAL]\nα : Type u_1\nn : ℕ\nl : List α\ns : Multiset α\n⊢ ∀ (a : List α), (∃ a_1, (a_1 <+ l ∧ length a_1 = n) ∧ a_1 ~ a) ↔ (∃ l_1, l_1 ~ a ∧ l_1 <+ l) ∧ length a = n\n[PROOFSTEP]\nexact fun l₁ =>\n  ⟨fun ⟨l₂, ⟨s, e⟩, p⟩ => ⟨⟨_, p, s⟩, p.symm.length_eq.trans e⟩, fun ⟨⟨l₂, p, s⟩, e⟩ =>\n    ⟨_, ⟨s, p.length_eq.trans e⟩, p⟩⟩\n[GOAL]\nα : Type u_1\nl : List α\n⊢ powersetLenAux 0 l = [0]\n[PROOFSTEP]\nsimp [powersetLenAux_eq_map_coe]\n[GOAL]\nα : Type u_1\nn : ℕ\na : α\nl : List α\n⊢ powersetLenAux (n + 1) (a :: l) = powersetLenAux (n + 1) l ++ List.map (cons a) (powersetLenAux n l)\n[PROOFSTEP]\nsimp [powersetLenAux_eq_map_coe]\n[GOAL]\nα : Type u_1\nn : ℕ\na : α\nl : List α\n⊢ List.map (ofList ∘ List.cons a) (sublistsLen n l) = List.map (cons a ∘ ofList) (sublistsLen n l)\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nn : ℕ\nl₁ l₂ : List α\np : l₁ ~ l₂\n⊢ powersetLenAux n l₁ ~ powersetLenAux n l₂\n[PROOFSTEP]\ninduction' n with n IHn generalizing l₁ l₂\n[GOAL]\ncase zero\nα : Type u_1\nl₁✝ l₂✝ : List α\np✝ : l₁✝ ~ l₂✝\nl₁ l₂ : List α\np : l₁ ~ l₂\n⊢ powersetLenAux Nat.zero l₁ ~ powersetLenAux Nat.zero l₂\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\nα : Type u_1\nl₁✝ l₂✝ : List α\np✝ : l₁✝ ~ l₂✝\nn : ℕ\nIHn : ∀ {l₁ l₂ : List α}, l₁ ~ l₂ → powersetLenAux n l₁ ~ powersetLenAux n l₂\nl₁ l₂ : List α\np : l₁ ~ l₂\n⊢ powersetLenAux (Nat.succ n) l₁ ~ powersetLenAux (Nat.succ n) l₂\n[PROOFSTEP]\ninduction' p with a l₁ l₂ p IH a b l l₁ l₂ l₃ _ _ IH₁ IH₂\n[GOAL]\ncase succ.nil\nα : Type u_1\nl₁✝ l₂✝ : List α\np : l₁✝ ~ l₂✝\nn : ℕ\nIHn : ∀ {l₁ l₂ : List α}, l₁ ~ l₂ → powersetLenAux n l₁ ~ powersetLenAux n l₂\nl₁ l₂ : List α\n⊢ powersetLenAux (Nat.succ n) [] ~ powersetLenAux (Nat.succ n) []\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ.cons\nα : Type u_1\nl₁✝¹ l₂✝¹ : List α\np✝ : l₁✝¹ ~ l₂✝¹\nn : ℕ\nIHn : ∀ {l₁ l₂ : List α}, l₁ ~ l₂ → powersetLenAux n l₁ ~ powersetLenAux n l₂\nl₁✝ l₂✝ : List α\na : α\nl₁ l₂ : List α\np : l₁ ~ l₂\nIH : powersetLenAux (Nat.succ n) l₁ ~ powersetLenAux (Nat.succ n) l₂\n⊢ powersetLenAux (Nat.succ n) (a :: l₁) ~ powersetLenAux (Nat.succ n) (a :: l₂)\n[PROOFSTEP]\nsimp only [powersetLenAux_cons]\n[GOAL]\ncase succ.cons\nα : Type u_1\nl₁✝¹ l₂✝¹ : List α\np✝ : l₁✝¹ ~ l₂✝¹\nn : ℕ\nIHn : ∀ {l₁ l₂ : List α}, l₁ ~ l₂ → powersetLenAux n l₁ ~ powersetLenAux n l₂\nl₁✝ l₂✝ : List α\na : α\nl₁ l₂ : List α\np : l₁ ~ l₂\nIH : powersetLenAux (Nat.succ n) l₁ ~ powersetLenAux (Nat.succ n) l₂\n⊢ powersetLenAux (n + 1) l₁ ++ List.map (cons a) (powersetLenAux n l₁) ~\n    powersetLenAux (n + 1) l₂ ++ List.map (cons a) (powersetLenAux n l₂)\n[PROOFSTEP]\nexact IH.append ((IHn p).map _)\n[GOAL]\ncase succ.swap\nα : Type u_1\nl₁✝ l₂✝ : List α\np : l₁✝ ~ l₂✝\nn : ℕ\nIHn : ∀ {l₁ l₂ : List α}, l₁ ~ l₂ → powersetLenAux n l₁ ~ powersetLenAux n l₂\nl₁ l₂ : List α\na b : α\nl : List α\n⊢ powersetLenAux (Nat.succ n) (b :: a :: l) ~ powersetLenAux (Nat.succ n) (a :: b :: l)\n[PROOFSTEP]\nsimp only [powersetLenAux_cons, append_assoc]\n[GOAL]\ncase succ.swap\nα : Type u_1\nl₁✝ l₂✝ : List α\np : l₁✝ ~ l₂✝\nn : ℕ\nIHn : ∀ {l₁ l₂ : List α}, l₁ ~ l₂ → powersetLenAux n l₁ ~ powersetLenAux n l₂\nl₁ l₂ : List α\na b : α\nl : List α\n⊢ powersetLenAux (n + 1) l ++\n      (List.map (cons a) (powersetLenAux n l) ++ List.map (cons b) (powersetLenAux n (a :: l))) ~\n    powersetLenAux (n + 1) l ++\n      (List.map (cons b) (powersetLenAux n l) ++ List.map (cons a) (powersetLenAux n (b :: l)))\n[PROOFSTEP]\napply Perm.append_left\n[GOAL]\ncase succ.swap.a\nα : Type u_1\nl₁✝ l₂✝ : List α\np : l₁✝ ~ l₂✝\nn : ℕ\nIHn : ∀ {l₁ l₂ : List α}, l₁ ~ l₂ → powersetLenAux n l₁ ~ powersetLenAux n l₂\nl₁ l₂ : List α\na b : α\nl : List α\n⊢ List.map (cons a) (powersetLenAux n l) ++ List.map (cons b) (powersetLenAux n (a :: l)) ~\n    List.map (cons b) (powersetLenAux n l) ++ List.map (cons a) (powersetLenAux n (b :: l))\n[PROOFSTEP]\ncases n\n[GOAL]\ncase succ.swap.a.zero\nα : Type u_1\nl₁✝ l₂✝ : List α\np : l₁✝ ~ l₂✝\nl₁ l₂ : List α\na b : α\nl : List α\nIHn : ∀ {l₁ l₂ : List α}, l₁ ~ l₂ → powersetLenAux Nat.zero l₁ ~ powersetLenAux Nat.zero l₂\n⊢ List.map (cons a) (powersetLenAux Nat.zero l) ++ List.map (cons b) (powersetLenAux Nat.zero (a :: l)) ~\n    List.map (cons b) (powersetLenAux Nat.zero l) ++ List.map (cons a) (powersetLenAux Nat.zero (b :: l))\n[PROOFSTEP]\nsimp [Perm.swap]\n[GOAL]\ncase succ.swap.a.succ\nα : Type u_1\nl₁✝ l₂✝ : List α\np : l₁✝ ~ l₂✝\nl₁ l₂ : List α\na b : α\nl : List α\nn✝ : ℕ\nIHn : ∀ {l₁ l₂ : List α}, l₁ ~ l₂ → powersetLenAux (Nat.succ n✝) l₁ ~ powersetLenAux (Nat.succ n✝) l₂\n⊢ List.map (cons a) (powersetLenAux (Nat.succ n✝) l) ++ List.map (cons b) (powersetLenAux (Nat.succ n✝) (a :: l)) ~\n    List.map (cons b) (powersetLenAux (Nat.succ n✝) l) ++ List.map (cons a) (powersetLenAux (Nat.succ n✝) (b :: l))\n[PROOFSTEP]\nsimp only [powersetLenAux_cons, map_append, List.map_map]\n[GOAL]\ncase succ.swap.a.succ\nα : Type u_1\nl₁✝ l₂✝ : List α\np : l₁✝ ~ l₂✝\nl₁ l₂ : List α\na b : α\nl : List α\nn✝ : ℕ\nIHn : ∀ {l₁ l₂ : List α}, l₁ ~ l₂ → powersetLenAux (Nat.succ n✝) l₁ ~ powersetLenAux (Nat.succ n✝) l₂\n⊢ List.map (cons a) (powersetLenAux (Nat.succ n✝) l) ++\n      (List.map (cons b) (powersetLenAux (n✝ + 1) l) ++ List.map (cons b ∘ cons a) (powersetLenAux n✝ l)) ~\n    List.map (cons b) (powersetLenAux (Nat.succ n✝) l) ++\n      (List.map (cons a) (powersetLenAux (n✝ + 1) l) ++ List.map (cons a ∘ cons b) (powersetLenAux n✝ l))\n[PROOFSTEP]\nrw [← append_assoc, ← append_assoc, (by funext s; simp [cons_swap] : cons b ∘ cons a = cons a ∘ cons b)]\n[GOAL]\nα : Type u_1\nl₁✝ l₂✝ : List α\np : l₁✝ ~ l₂✝\nl₁ l₂ : List α\na b : α\nl : List α\nn✝ : ℕ\nIHn : ∀ {l₁ l₂ : List α}, l₁ ~ l₂ → powersetLenAux (Nat.succ n✝) l₁ ~ powersetLenAux (Nat.succ n✝) l₂\n⊢ cons b ∘ cons a = cons a ∘ cons b\n[PROOFSTEP]\nfunext s\n[GOAL]\ncase h\nα : Type u_1\nl₁✝ l₂✝ : List α\np : l₁✝ ~ l₂✝\nl₁ l₂ : List α\na b : α\nl : List α\nn✝ : ℕ\nIHn : ∀ {l₁ l₂ : List α}, l₁ ~ l₂ → powersetLenAux (Nat.succ n✝) l₁ ~ powersetLenAux (Nat.succ n✝) l₂\ns : Multiset α\n⊢ (cons b ∘ cons a) s = (cons a ∘ cons b) s\n[PROOFSTEP]\nsimp [cons_swap]\n[GOAL]\ncase succ.swap.a.succ\nα : Type u_1\nl₁✝ l₂✝ : List α\np : l₁✝ ~ l₂✝\nl₁ l₂ : List α\na b : α\nl : List α\nn✝ : ℕ\nIHn : ∀ {l₁ l₂ : List α}, l₁ ~ l₂ → powersetLenAux (Nat.succ n✝) l₁ ~ powersetLenAux (Nat.succ n✝) l₂\n⊢ List.map (cons a) (powersetLenAux (Nat.succ n✝) l) ++ List.map (cons b) (powersetLenAux (n✝ + 1) l) ++\n      List.map (cons a ∘ cons b) (powersetLenAux n✝ l) ~\n    List.map (cons b) (powersetLenAux (Nat.succ n✝) l) ++ List.map (cons a) (powersetLenAux (n✝ + 1) l) ++\n      List.map (cons a ∘ cons b) (powersetLenAux n✝ l)\n[PROOFSTEP]\nexact perm_append_comm.append_right _\n[GOAL]\ncase succ.trans\nα : Type u_1\nl₁✝¹ l₂✝¹ : List α\np : l₁✝¹ ~ l₂✝¹\nn : ℕ\nIHn : ∀ {l₁ l₂ : List α}, l₁ ~ l₂ → powersetLenAux n l₁ ~ powersetLenAux n l₂\nl₁✝ l₂✝ l₁ l₂ l₃ : List α\na✝¹ : l₁ ~ l₂\na✝ : l₂ ~ l₃\nIH₁ : powersetLenAux (Nat.succ n) l₁ ~ powersetLenAux (Nat.succ n) l₂\nIH₂ : powersetLenAux (Nat.succ n) l₂ ~ powersetLenAux (Nat.succ n) l₃\n⊢ powersetLenAux (Nat.succ n) l₁ ~ powersetLenAux (Nat.succ n) l₃\n[PROOFSTEP]\nexact IH₁.trans IH₂\n[GOAL]\nα : Type u_1\ns : Multiset α\nl : List α\n⊢ powersetLen 0 (Quotient.mk (isSetoid α) l) = {0}\n[PROOFSTEP]\nsimp [powersetLen_coe']\n[GOAL]\nα : Type u_1\nn : ℕ\na : α\ns : Multiset α\nl : List α\n⊢ powersetLen (n + 1) (a ::ₘ Quotient.mk (isSetoid α) l) =\n    powersetLen (n + 1) (Quotient.mk (isSetoid α) l) + map (cons a) (powersetLen n (Quotient.mk (isSetoid α) l))\n[PROOFSTEP]\nsimp [powersetLen_coe']\n[GOAL]\nα : Type u_1\nn : ℕ\ns t : Multiset α\nl : List α\n⊢ s ∈ powersetLen n (Quotient.mk (isSetoid α) l) ↔ s ≤ Quotient.mk (isSetoid α) l ∧ ↑card s = n\n[PROOFSTEP]\nsimp [powersetLen_coe']\n[GOAL]\nα : Type u_1\nn : ℕ\ns : Multiset α\n⊢ ∀ (a : List α), ↑card (powersetLen n (Quotient.mk (isSetoid α) a)) = Nat.choose (↑card (Quotient.mk (isSetoid α) a)) n\n[PROOFSTEP]\nsimp [powersetLen_coe]\n[GOAL]\nα : Type u_1\nn : ℕ\ns : Multiset α\nl : List α\n⊢ powersetLen n (Quotient.mk (isSetoid α) l) ≤ powerset (Quotient.mk (isSetoid α) l)\n[PROOFSTEP]\nsimp only [quot_mk_to_coe, powersetLen_coe, powerset_coe', coe_le]\n[GOAL]\nα : Type u_1\nn : ℕ\ns : Multiset α\nl : List α\n⊢ List.map ofList (sublistsLen n l) <+~ List.map ofList (sublists' l)\n[PROOFSTEP]\nexact ((sublistsLen_sublist_sublists' _ _).map _).subperm\n[GOAL]\nα : Type u_1\nn : ℕ\ns t : Multiset α\nh✝ : s ≤ t\nl₁ l₂ : List α\nh : l₁ <+ l₂\n⊢ powersetLen n ↑l₁ ≤ powersetLen n ↑l₂\n[PROOFSTEP]\nsimp only [powersetLen_coe, coe_le]\n[GOAL]\nα : Type u_1\nn : ℕ\ns t : Multiset α\nh✝ : s ≤ t\nl₁ l₂ : List α\nh : l₁ <+ l₂\n⊢ List.map ofList (sublistsLen n l₁) <+~ List.map ofList (sublistsLen n l₂)\n[PROOFSTEP]\nexact ((sublistsLen_sublist_of_sublist _ h).map _).subperm\n[GOAL]\nα : Type u_1\nβ : Type u_2\nf : α → β\nn : ℕ\ns : Multiset α\n⊢ powersetLen n (map f s) = map (map f) (powersetLen n s)\n[PROOFSTEP]\ninduction' s using Multiset.induction with t s ih generalizing n\n[GOAL]\ncase empty\nα : Type u_1\nβ : Type u_2\nf : α → β\nn✝ n : ℕ\n⊢ powersetLen n (map f 0) = map (map f) (powersetLen n 0)\n[PROOFSTEP]\ncases n\n[GOAL]\ncase empty.zero\nα : Type u_1\nβ : Type u_2\nf : α → β\nn : ℕ\n⊢ powersetLen Nat.zero (map f 0) = map (map f) (powersetLen Nat.zero 0)\n[PROOFSTEP]\nsimp [powersetLen_zero_left, powersetLen_zero_right]\n[GOAL]\ncase empty.succ\nα : Type u_1\nβ : Type u_2\nf : α → β\nn n✝ : ℕ\n⊢ powersetLen (Nat.succ n✝) (map f 0) = map (map f) (powersetLen (Nat.succ n✝) 0)\n[PROOFSTEP]\nsimp [powersetLen_zero_left, powersetLen_zero_right]\n[GOAL]\ncase cons\nα : Type u_1\nβ : Type u_2\nf : α → β\nn✝ : ℕ\nt : α\ns : Multiset α\nih : ∀ (n : ℕ), powersetLen n (map f s) = map (map f) (powersetLen n s)\nn : ℕ\n⊢ powersetLen n (map f (t ::ₘ s)) = map (map f) (powersetLen n (t ::ₘ s))\n[PROOFSTEP]\ncases n\n[GOAL]\ncase cons.zero\nα : Type u_1\nβ : Type u_2\nf : α → β\nn : ℕ\nt : α\ns : Multiset α\nih : ∀ (n : ℕ), powersetLen n (map f s) = map (map f) (powersetLen n s)\n⊢ powersetLen Nat.zero (map f (t ::ₘ s)) = map (map f) (powersetLen Nat.zero (t ::ₘ s))\n[PROOFSTEP]\nsimp [ih, map_comp_cons]\n[GOAL]\ncase cons.succ\nα : Type u_1\nβ : Type u_2\nf : α → β\nn : ℕ\nt : α\ns : Multiset α\nih : ∀ (n : ℕ), powersetLen n (map f s) = map (map f) (powersetLen n s)\nn✝ : ℕ\n⊢ powersetLen (Nat.succ n✝) (map f (t ::ₘ s)) = map (map f) (powersetLen (Nat.succ n✝) (t ::ₘ s))\n[PROOFSTEP]\nsimp [ih, map_comp_cons]\n[GOAL]\nα✝ : Type u_1\nα : Type u_2\nS : Multiset α\n⊢ (bind (range (↑card S + 1)) fun k => powersetLen k S) = powerset S\n[PROOFSTEP]\ninduction S using Quotient.inductionOn\n[GOAL]\ncase h\nα✝ : Type u_1\nα : Type u_2\na✝ : List α\n⊢ (bind (range (↑card (Quotient.mk (isSetoid α) a✝) + 1)) fun k => powersetLen k (Quotient.mk (isSetoid α) a✝)) =\n    powerset (Quotient.mk (isSetoid α) a✝)\n[PROOFSTEP]\nsimp_rw [quot_mk_to_coe, powerset_coe', powersetLen_coe, ← coe_range, coe_bind, ← List.bind_map, coe_card]\n[GOAL]\ncase h\nα✝ : Type u_1\nα : Type u_2\na✝ : List α\n⊢ ↑(List.map ofList (List.bind (List.range (length a✝ + 1)) fun a => sublistsLen a a✝)) =\n    ↑(List.map ofList (sublists' a✝))\n[PROOFSTEP]\nexact coe_eq_coe.mpr ((List.range_bind_sublistsLen_perm _).map _)\n[GOAL]\nα : Type u_1\ns : Multiset α\nl : List α\nh : Nodup (Quotient.mk (isSetoid α) l)\n⊢ Nodup (powerset (Quotient.mk (isSetoid α) l))\n[PROOFSTEP]\nsimp only [quot_mk_to_coe, powerset_coe', coe_nodup]\n[GOAL]\nα : Type u_1\ns : Multiset α\nl : List α\nh : Nodup (Quotient.mk (isSetoid α) l)\n⊢ List.Nodup (List.map ofList (sublists' l))\n[PROOFSTEP]\nrefine' (nodup_sublists'.2 h).map_on _\n[GOAL]\nα : Type u_1\ns : Multiset α\nl : List α\nh : Nodup (Quotient.mk (isSetoid α) l)\n⊢ ∀ (x : List α), x ∈ sublists' l → ∀ (y : List α), y ∈ sublists' l → ↑x = ↑y → x = y\n[PROOFSTEP]\nexact fun x sx y sy e => (h.sublist_ext (mem_sublists'.1 sx) (mem_sublists'.1 sy)).1 (Quotient.exact e)\n", "meta": {"mathlib_filename": "Mathlib.Data.Multiset.Powerset", "llama_tokens": 11147, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7745833737577158, "lm_q2_score": 0.6757645944891559, "lm_q1q2_score": 0.5234360194654252}}
{"text": "[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\nE : Type u_3\nF : Type u_4\nG : Type u_5\ninst✝⁴ : SeminormedRing 𝕜\ninst✝³ : Ring 𝕜₂\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : Module 𝕜 E\ninst✝ : BoundedSMul 𝕜 E\nf : 𝕜 →ₗ[𝕜] E\nx : 𝕜\n⊢ ‖↑f x‖ ≤ ‖↑f 1‖ * ‖x‖\n[PROOFSTEP]\nconv_lhs => rw [← mul_one x]\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\nE : Type u_3\nF : Type u_4\nG : Type u_5\ninst✝⁴ : SeminormedRing 𝕜\ninst✝³ : Ring 𝕜₂\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : Module 𝕜 E\ninst✝ : BoundedSMul 𝕜 E\nf : 𝕜 →ₗ[𝕜] E\nx : 𝕜\n| ‖↑f x‖\n[PROOFSTEP]\nrw [← mul_one x]\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\nE : Type u_3\nF : Type u_4\nG : Type u_5\ninst✝⁴ : SeminormedRing 𝕜\ninst✝³ : Ring 𝕜₂\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : Module 𝕜 E\ninst✝ : BoundedSMul 𝕜 E\nf : 𝕜 →ₗ[𝕜] E\nx : 𝕜\n| ‖↑f x‖\n[PROOFSTEP]\nrw [← mul_one x]\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\nE : Type u_3\nF : Type u_4\nG : Type u_5\ninst✝⁴ : SeminormedRing 𝕜\ninst✝³ : Ring 𝕜₂\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : Module 𝕜 E\ninst✝ : BoundedSMul 𝕜 E\nf : 𝕜 →ₗ[𝕜] E\nx : 𝕜\n| ‖↑f x‖\n[PROOFSTEP]\nrw [← mul_one x]\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\nE : Type u_3\nF : Type u_4\nG : Type u_5\ninst✝⁴ : SeminormedRing 𝕜\ninst✝³ : Ring 𝕜₂\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : Module 𝕜 E\ninst✝ : BoundedSMul 𝕜 E\nf : 𝕜 →ₗ[𝕜] E\nx : 𝕜\n⊢ ‖↑f (x * 1)‖ ≤ ‖↑f 1‖ * ‖x‖\n[PROOFSTEP]\nrw [← smul_eq_mul, f.map_smul, mul_comm]\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\nE : Type u_3\nF : Type u_4\nG : Type u_5\ninst✝⁴ : SeminormedRing 𝕜\ninst✝³ : Ring 𝕜₂\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : Module 𝕜 E\ninst✝ : BoundedSMul 𝕜 E\nf : 𝕜 →ₗ[𝕜] E\nx : 𝕜\n⊢ ‖x • ↑f 1‖ ≤ ‖x‖ * ‖↑f 1‖\n[PROOFSTEP]\nexact norm_smul_le _ _\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\nE : Type u_3\nF : Type u_4\nG : Type u_5\ninst✝⁷ : Ring 𝕜\ninst✝⁶ : Ring 𝕜₂\ninst✝⁵ : SeminormedAddCommGroup E\ninst✝⁴ : SeminormedAddCommGroup F\ninst✝³ : Module 𝕜 E\ninst✝² : Module 𝕜₂ F\nσ : 𝕜 →+* 𝕜₂\nf✝ : E →ₛₗ[σ] F\nσ₂₁ : 𝕜₂ →+* 𝕜\ninst✝¹ : RingHomInvPair σ σ₂₁\ninst✝ : RingHomInvPair σ₂₁ σ\na : ℝ\nha : 0 < a\nf : E ≃ₛₗ[σ] F\n⊢ (∀ (x : E), ‖↑f x‖ = a * ‖x‖) → ∀ (y : F), ‖↑(LinearEquiv.symm f) y‖ = a⁻¹ * ‖y‖\n[PROOFSTEP]\nintro hf y\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\nE : Type u_3\nF : Type u_4\nG : Type u_5\ninst✝⁷ : Ring 𝕜\ninst✝⁶ : Ring 𝕜₂\ninst✝⁵ : SeminormedAddCommGroup E\ninst✝⁴ : SeminormedAddCommGroup F\ninst✝³ : Module 𝕜 E\ninst✝² : Module 𝕜₂ F\nσ : 𝕜 →+* 𝕜₂\nf✝ : E →ₛₗ[σ] F\nσ₂₁ : 𝕜₂ →+* 𝕜\ninst✝¹ : RingHomInvPair σ σ₂₁\ninst✝ : RingHomInvPair σ₂₁ σ\na : ℝ\nha : 0 < a\nf : E ≃ₛₗ[σ] F\nhf : ∀ (x : E), ‖↑f x‖ = a * ‖x‖\ny : F\n⊢ ‖↑(LinearEquiv.symm f) y‖ = a⁻¹ * ‖y‖\n[PROOFSTEP]\ncalc\n  ‖f.symm y‖ = a⁻¹ * (a * ‖f.symm y‖) := by rw [← mul_assoc, inv_mul_cancel (ne_of_lt ha).symm, one_mul]\n  _ = a⁻¹ * ‖f (f.symm y)‖ := by rw [hf]\n  _ = a⁻¹ * ‖y‖ := by simp\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\nE : Type u_3\nF : Type u_4\nG : Type u_5\ninst✝⁷ : Ring 𝕜\ninst✝⁶ : Ring 𝕜₂\ninst✝⁵ : SeminormedAddCommGroup E\ninst✝⁴ : SeminormedAddCommGroup F\ninst✝³ : Module 𝕜 E\ninst✝² : Module 𝕜₂ F\nσ : 𝕜 →+* 𝕜₂\nf✝ : E →ₛₗ[σ] F\nσ₂₁ : 𝕜₂ →+* 𝕜\ninst✝¹ : RingHomInvPair σ σ₂₁\ninst✝ : RingHomInvPair σ₂₁ σ\na : ℝ\nha : 0 < a\nf : E ≃ₛₗ[σ] F\nhf : ∀ (x : E), ‖↑f x‖ = a * ‖x‖\ny : F\n⊢ ‖↑(LinearEquiv.symm f) y‖ = a⁻¹ * (a * ‖↑(LinearEquiv.symm f) y‖)\n[PROOFSTEP]\nrw [← mul_assoc, inv_mul_cancel (ne_of_lt ha).symm, one_mul]\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\nE : Type u_3\nF : Type u_4\nG : Type u_5\ninst✝⁷ : Ring 𝕜\ninst✝⁶ : Ring 𝕜₂\ninst✝⁵ : SeminormedAddCommGroup E\ninst✝⁴ : SeminormedAddCommGroup F\ninst✝³ : Module 𝕜 E\ninst✝² : Module 𝕜₂ F\nσ : 𝕜 →+* 𝕜₂\nf✝ : E →ₛₗ[σ] F\nσ₂₁ : 𝕜₂ →+* 𝕜\ninst✝¹ : RingHomInvPair σ σ₂₁\ninst✝ : RingHomInvPair σ₂₁ σ\na : ℝ\nha : 0 < a\nf : E ≃ₛₗ[σ] F\nhf : ∀ (x : E), ‖↑f x‖ = a * ‖x‖\ny : F\n⊢ a⁻¹ * (a * ‖↑(LinearEquiv.symm f) y‖) = a⁻¹ * ‖↑f (↑(LinearEquiv.symm f) y)‖\n[PROOFSTEP]\nrw [hf]\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\nE : Type u_3\nF : Type u_4\nG : Type u_5\ninst✝⁷ : Ring 𝕜\ninst✝⁶ : Ring 𝕜₂\ninst✝⁵ : SeminormedAddCommGroup E\ninst✝⁴ : SeminormedAddCommGroup F\ninst✝³ : Module 𝕜 E\ninst✝² : Module 𝕜₂ F\nσ : 𝕜 →+* 𝕜₂\nf✝ : E →ₛₗ[σ] F\nσ₂₁ : 𝕜₂ →+* 𝕜\ninst✝¹ : RingHomInvPair σ σ₂₁\ninst✝ : RingHomInvPair σ₂₁ σ\na : ℝ\nha : 0 < a\nf : E ≃ₛₗ[σ] F\nhf : ∀ (x : E), ‖↑f x‖ = a * ‖x‖\ny : F\n⊢ a⁻¹ * ‖↑f (↑(LinearEquiv.symm f) y)‖ = a⁻¹ * ‖y‖\n[PROOFSTEP]\nsimp\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\nE : Type u_3\nF : Type u_4\nG : Type u_5\ninst✝³ : NormedDivisionRing 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : Module 𝕜 E\ninst✝ : BoundedSMul 𝕜 E\nx : E\nc : 𝕜\n⊢ ‖↑(LinearMap.toSpanSingleton 𝕜 E x) c‖ = ‖x‖ * ‖c‖\n[PROOFSTEP]\nrw [mul_comm]\n[GOAL]\n𝕜 : Type u_1\n𝕜₂ : Type u_2\nE : Type u_3\nF : Type u_4\nG : Type u_5\ninst✝³ : NormedDivisionRing 𝕜\ninst✝² : SeminormedAddCommGroup E\ninst✝¹ : Module 𝕜 E\ninst✝ : BoundedSMul 𝕜 E\nx : E\nc : 𝕜\n⊢ ‖↑(LinearMap.toSpanSingleton 𝕜 E x) c‖ = ‖c‖ * ‖x‖\n[PROOFSTEP]\nexact norm_smul _ _\n", "meta": {"mathlib_filename": "Mathlib.Analysis.NormedSpace.ContinuousLinearMap", "llama_tokens": 2802, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8311430645886584, "lm_q2_score": 0.6297746074044135, "lm_q1q2_score": 0.5234327971982234}}
{"text": "[GOAL]\nn : Type u_1\nα : Type u_2\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\ninst✝ : CommRing α\nA B : Matrix n n α\n⊢ natDegree (det (X • Matrix.map A ↑C + Matrix.map B ↑C)) ≤ Fintype.card n\n[PROOFSTEP]\nrw [det_apply]\n[GOAL]\nn : Type u_1\nα : Type u_2\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\ninst✝ : CommRing α\nA B : Matrix n n α\n⊢ natDegree (∑ σ : Equiv.Perm n, ↑sign σ • ∏ i : n, (X • Matrix.map A ↑C + Matrix.map B ↑C) (↑σ i) i) ≤ Fintype.card n\n[PROOFSTEP]\nrefine' (natDegree_sum_le _ _).trans _\n[GOAL]\nn : Type u_1\nα : Type u_2\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\ninst✝ : CommRing α\nA B : Matrix n n α\n⊢ Finset.fold max 0 (natDegree ∘ fun σ => ↑sign σ • ∏ i : n, (X • Matrix.map A ↑C + Matrix.map B ↑C) (↑σ i) i)\n      Finset.univ ≤\n    Fintype.card n\n[PROOFSTEP]\nrefine' Multiset.max_nat_le_of_forall_le _ _ _\n[GOAL]\nn : Type u_1\nα : Type u_2\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\ninst✝ : CommRing α\nA B : Matrix n n α\n⊢ ∀ (x : ℕ),\n    x ∈\n        Multiset.map (natDegree ∘ fun σ => ↑sign σ • ∏ i : n, (X • Matrix.map A ↑C + Matrix.map B ↑C) (↑σ i) i)\n          Finset.univ.val →\n      x ≤ Fintype.card n\n[PROOFSTEP]\nsimp only [forall_apply_eq_imp_iff', true_and_iff, Function.comp_apply, Multiset.map_map, Multiset.mem_map, exists_imp,\n  Finset.mem_univ_val]\n[GOAL]\nn : Type u_1\nα : Type u_2\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\ninst✝ : CommRing α\nA B : Matrix n n α\n⊢ ∀ (a : Equiv.Perm n), natDegree (↑sign a • ∏ x : n, (X • Matrix.map A ↑C + Matrix.map B ↑C) (↑a x) x) ≤ Fintype.card n\n[PROOFSTEP]\nintro g\n[GOAL]\nn : Type u_1\nα : Type u_2\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\ninst✝ : CommRing α\nA B : Matrix n n α\ng : Equiv.Perm n\n⊢ natDegree (↑sign g • ∏ x : n, (X • Matrix.map A ↑C + Matrix.map B ↑C) (↑g x) x) ≤ Fintype.card n\n[PROOFSTEP]\ncalc\n  natDegree (sign g • ∏ i : n, (X • A.map C + B.map C) (g i) i) ≤\n      natDegree (∏ i : n, (X • A.map C + B.map C) (g i) i) :=\n    by\n    cases' Int.units_eq_one_or (sign g) with sg sg\n    · rw [sg, one_smul]\n    · rw [sg, Units.neg_smul, one_smul, natDegree_neg]\n  _ ≤ ∑ i : n, natDegree (((X : α[X]) • A.map C + B.map C) (g i) i) :=\n    (natDegree_prod_le (Finset.univ : Finset n) fun i : n => (X • A.map C + B.map C) (g i) i)\n  _ ≤ Finset.univ.card • 1 := (Finset.sum_le_card_nsmul _ _ 1 fun (i : n) _ => ?_)\n  _ ≤ Fintype.card n := by simp [mul_one, Algebra.id.smul_eq_mul, Finset.card_univ]\n[GOAL]\nn : Type u_1\nα : Type u_2\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\ninst✝ : CommRing α\nA B : Matrix n n α\ng : Equiv.Perm n\n⊢ natDegree (↑sign g • ∏ i : n, (X • Matrix.map A ↑C + Matrix.map B ↑C) (↑g i) i) ≤\n    natDegree (∏ i : n, (X • Matrix.map A ↑C + Matrix.map B ↑C) (↑g i) i)\n[PROOFSTEP]\ncases' Int.units_eq_one_or (sign g) with sg sg\n[GOAL]\ncase inl\nn : Type u_1\nα : Type u_2\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\ninst✝ : CommRing α\nA B : Matrix n n α\ng : Equiv.Perm n\nsg : ↑sign g = 1\n⊢ natDegree (↑sign g • ∏ i : n, (X • Matrix.map A ↑C + Matrix.map B ↑C) (↑g i) i) ≤\n    natDegree (∏ i : n, (X • Matrix.map A ↑C + Matrix.map B ↑C) (↑g i) i)\n[PROOFSTEP]\nrw [sg, one_smul]\n[GOAL]\ncase inr\nn : Type u_1\nα : Type u_2\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\ninst✝ : CommRing α\nA B : Matrix n n α\ng : Equiv.Perm n\nsg : ↑sign g = -1\n⊢ natDegree (↑sign g • ∏ i : n, (X • Matrix.map A ↑C + Matrix.map B ↑C) (↑g i) i) ≤\n    natDegree (∏ i : n, (X • Matrix.map A ↑C + Matrix.map B ↑C) (↑g i) i)\n[PROOFSTEP]\nrw [sg, Units.neg_smul, one_smul, natDegree_neg]\n[GOAL]\nn : Type u_1\nα : Type u_2\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\ninst✝ : CommRing α\nA B : Matrix n n α\ng : Equiv.Perm n\n⊢ Finset.card Finset.univ • 1 ≤ Fintype.card n\n[PROOFSTEP]\nsimp [mul_one, Algebra.id.smul_eq_mul, Finset.card_univ]\n[GOAL]\nn : Type u_1\nα : Type u_2\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\ninst✝ : CommRing α\nA B : Matrix n n α\ng : Equiv.Perm n\ni : n\nx✝ : i ∈ Finset.univ\n⊢ natDegree ((X • Matrix.map A ↑C + Matrix.map B ↑C) (↑g i) i) ≤ 1\n[PROOFSTEP]\ncalc\n  natDegree (((X : α[X]) • A.map C + B.map C) (g i) i) = natDegree ((X : α[X]) * C (A (g i) i) + C (B (g i) i)) := by\n    simp\n  _ ≤ max (natDegree ((X : α[X]) * C (A (g i) i))) (natDegree (C (B (g i) i))) := (natDegree_add_le _ _)\n  _ = natDegree ((X : α[X]) * C (A (g i) i)) := (max_eq_left ((natDegree_C _).le.trans (zero_le _)))\n  _ ≤ natDegree (X : α[X]) := (natDegree_mul_C_le _ _)\n  _ ≤ 1 := natDegree_X_le\n[GOAL]\nn : Type u_1\nα : Type u_2\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\ninst✝ : CommRing α\nA B : Matrix n n α\ng : Equiv.Perm n\ni : n\nx✝ : i ∈ Finset.univ\n⊢ natDegree ((X • Matrix.map A ↑C + Matrix.map B ↑C) (↑g i) i) = natDegree (X * ↑C (A (↑g i) i) + ↑C (B (↑g i) i))\n[PROOFSTEP]\nsimp\n[GOAL]\nn : Type u_1\nα : Type u_2\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\ninst✝ : CommRing α\nA B : Matrix n n α\n⊢ coeff (det (X • Matrix.map A ↑C + Matrix.map B ↑C)) 0 = det B\n[PROOFSTEP]\nrw [det_apply, finset_sum_coeff, det_apply]\n[GOAL]\nn : Type u_1\nα : Type u_2\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\ninst✝ : CommRing α\nA B : Matrix n n α\n⊢ ∑ b : Equiv.Perm n, coeff (↑sign b • ∏ i : n, (X • Matrix.map A ↑C + Matrix.map B ↑C) (↑b i) i) 0 =\n    ∑ σ : Equiv.Perm n, ↑sign σ • ∏ i : n, B (↑σ i) i\n[PROOFSTEP]\nrefine' Finset.sum_congr rfl _\n[GOAL]\nn : Type u_1\nα : Type u_2\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\ninst✝ : CommRing α\nA B : Matrix n n α\n⊢ ∀ (x : Equiv.Perm n),\n    x ∈ Finset.univ →\n      coeff (↑sign x • ∏ i : n, (X • Matrix.map A ↑C + Matrix.map B ↑C) (↑x i) i) 0 = ↑sign x • ∏ i : n, B (↑x i) i\n[PROOFSTEP]\nrintro g -\n[GOAL]\nn : Type u_1\nα : Type u_2\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\ninst✝ : CommRing α\nA B : Matrix n n α\ng : Equiv.Perm n\n⊢ coeff (↑sign g • ∏ i : n, (X • Matrix.map A ↑C + Matrix.map B ↑C) (↑g i) i) 0 = ↑sign g • ∏ i : n, B (↑g i) i\n[PROOFSTEP]\nconvert coeff_smul (R := α) (sign g) _ 0\n[GOAL]\ncase h.e'_3.h.e'_6\nn : Type u_1\nα : Type u_2\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\ninst✝ : CommRing α\nA B : Matrix n n α\ng : Equiv.Perm n\n⊢ ∏ i : n, B (↑g i) i = coeff (∏ i : n, (X • Matrix.map A ↑C + Matrix.map B ↑C) (↑g i) i) 0\n[PROOFSTEP]\nrw [coeff_zero_prod]\n[GOAL]\ncase h.e'_3.h.e'_6\nn : Type u_1\nα : Type u_2\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\ninst✝ : CommRing α\nA B : Matrix n n α\ng : Equiv.Perm n\n⊢ ∏ i : n, B (↑g i) i = ∏ i : n, coeff ((X • Matrix.map A ↑C + Matrix.map B ↑C) (↑g i) i) 0\n[PROOFSTEP]\nrefine' Finset.prod_congr rfl _\n[GOAL]\ncase h.e'_3.h.e'_6\nn : Type u_1\nα : Type u_2\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\ninst✝ : CommRing α\nA B : Matrix n n α\ng : Equiv.Perm n\n⊢ ∀ (x : n), x ∈ Finset.univ → B (↑g x) x = coeff ((X • Matrix.map A ↑C + Matrix.map B ↑C) (↑g x) x) 0\n[PROOFSTEP]\nsimp\n[GOAL]\nn : Type u_1\nα : Type u_2\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\ninst✝ : CommRing α\nA B : Matrix n n α\n⊢ coeff (det (X • Matrix.map A ↑C + Matrix.map B ↑C)) (Fintype.card n) = det A\n[PROOFSTEP]\nrw [det_apply, det_apply, finset_sum_coeff]\n[GOAL]\nn : Type u_1\nα : Type u_2\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\ninst✝ : CommRing α\nA B : Matrix n n α\n⊢ ∑ b : Equiv.Perm n, coeff (↑sign b • ∏ i : n, (X • Matrix.map A ↑C + Matrix.map B ↑C) (↑b i) i) (Fintype.card n) =\n    ∑ σ : Equiv.Perm n, ↑sign σ • ∏ i : n, A (↑σ i) i\n[PROOFSTEP]\nrefine' Finset.sum_congr rfl _\n[GOAL]\nn : Type u_1\nα : Type u_2\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\ninst✝ : CommRing α\nA B : Matrix n n α\n⊢ ∀ (x : Equiv.Perm n),\n    x ∈ Finset.univ →\n      coeff (↑sign x • ∏ i : n, (X • Matrix.map A ↑C + Matrix.map B ↑C) (↑x i) i) (Fintype.card n) =\n        ↑sign x • ∏ i : n, A (↑x i) i\n[PROOFSTEP]\nsimp only [Algebra.id.smul_eq_mul, Finset.mem_univ, RingHom.mapMatrix_apply, forall_true_left, map_apply, Pi.smul_apply]\n[GOAL]\nn : Type u_1\nα : Type u_2\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\ninst✝ : CommRing α\nA B : Matrix n n α\n⊢ ∀ (x : Equiv.Perm n),\n    coeff (↑sign x • ∏ x_1 : n, (X • Matrix.map A ↑C + Matrix.map B ↑C) (↑x x_1) x_1) (Fintype.card n) =\n      ↑sign x • ∏ x_1 : n, A (↑x x_1) x_1\n[PROOFSTEP]\nintro g\n[GOAL]\nn : Type u_1\nα : Type u_2\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\ninst✝ : CommRing α\nA B : Matrix n n α\ng : Equiv.Perm n\n⊢ coeff (↑sign g • ∏ x : n, (X • Matrix.map A ↑C + Matrix.map B ↑C) (↑g x) x) (Fintype.card n) =\n    ↑sign g • ∏ x : n, A (↑g x) x\n[PROOFSTEP]\nconvert coeff_smul (R := α) (sign g) _ _\n[GOAL]\ncase h.e'_3.h.e'_6\nn : Type u_1\nα : Type u_2\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\ninst✝ : CommRing α\nA B : Matrix n n α\ng : Equiv.Perm n\n⊢ ∏ x : n, A (↑g x) x = coeff (∏ x : n, (X • Matrix.map A ↑C + Matrix.map B ↑C) (↑g x) x) (Fintype.card n)\n[PROOFSTEP]\nrw [← mul_one (Fintype.card n)]\n[GOAL]\ncase h.e'_3.h.e'_6\nn : Type u_1\nα : Type u_2\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\ninst✝ : CommRing α\nA B : Matrix n n α\ng : Equiv.Perm n\n⊢ ∏ x : n, A (↑g x) x = coeff (∏ x : n, (X • Matrix.map A ↑C + Matrix.map B ↑C) (↑g x) x) (Fintype.card n * 1)\n[PROOFSTEP]\nconvert (coeff_prod_of_natDegree_le (R := α) _ _ _ _).symm\n[GOAL]\ncase h.e'_2.a\nn : Type u_1\nα : Type u_2\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\ninst✝ : CommRing α\nA B : Matrix n n α\ng : Equiv.Perm n\nx✝ : n\na✝ : x✝ ∈ Finset.univ\n⊢ A (↑g x✝) x✝ = coeff ((X • Matrix.map A ↑C + Matrix.map B ↑C) (↑g x✝) x✝) 1\n[PROOFSTEP]\nsimp [coeff_C]\n[GOAL]\ncase h.e'_3.h.e'_6.convert_5\nn : Type u_1\nα : Type u_2\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\ninst✝ : CommRing α\nA B : Matrix n n α\ng : Equiv.Perm n\n⊢ ∀ (p : n), p ∈ Finset.univ → natDegree ((X • Matrix.map A ↑C + Matrix.map B ↑C) (↑g p) p) ≤ 1\n[PROOFSTEP]\nrintro p -\n[GOAL]\ncase h.e'_3.h.e'_6.convert_5\nn : Type u_1\nα : Type u_2\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\ninst✝ : CommRing α\nA B : Matrix n n α\ng : Equiv.Perm n\np : n\n⊢ natDegree ((X • Matrix.map A ↑C + Matrix.map B ↑C) (↑g p) p) ≤ 1\n[PROOFSTEP]\nrefine' (natDegree_add_le _ _).trans _\n[GOAL]\ncase h.e'_3.h.e'_6.convert_5\nn : Type u_1\nα : Type u_2\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\ninst✝ : CommRing α\nA B : Matrix n n α\ng : Equiv.Perm n\np : n\n⊢ max (natDegree ((X • Matrix.map A ↑C) (↑g p) p)) (natDegree (Matrix.map B (↑C) (↑g p) p)) ≤ 1\n[PROOFSTEP]\nsimpa [Pi.smul_apply, map_apply, Algebra.id.smul_eq_mul, X_mul_C, natDegree_C, max_eq_left, zero_le'] using\n  (natDegree_C_mul_le _ _).trans (natDegree_X_le (R := α))\n[GOAL]\nn : Type u_1\nα : Type u_2\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\ninst✝ : CommRing α\nA : Matrix n n α\n⊢ leadingCoeff (det (X • 1 + Matrix.map A ↑C)) = 1\n[PROOFSTEP]\ncases subsingleton_or_nontrivial α\n[GOAL]\ncase inl\nn : Type u_1\nα : Type u_2\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\ninst✝ : CommRing α\nA : Matrix n n α\nh✝ : Subsingleton α\n⊢ leadingCoeff (det (X • 1 + Matrix.map A ↑C)) = 1\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\nn : Type u_1\nα : Type u_2\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\ninst✝ : CommRing α\nA : Matrix n n α\nh✝ : Nontrivial α\n⊢ leadingCoeff (det (X • 1 + Matrix.map A ↑C)) = 1\n[PROOFSTEP]\nrw [← @det_one n, ← coeff_det_X_add_C_card _ A, leadingCoeff]\n[GOAL]\ncase inr\nn : Type u_1\nα : Type u_2\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\ninst✝ : CommRing α\nA : Matrix n n α\nh✝ : Nontrivial α\n⊢ coeff (det (X • 1 + Matrix.map A ↑C)) (natDegree (det (X • 1 + Matrix.map A ↑C))) =\n    coeff (det (X • Matrix.map 1 ↑C + Matrix.map A ↑C)) (Fintype.card n)\n[PROOFSTEP]\nsimp only [Matrix.map_one, C_eq_zero, RingHom.map_one]\n[GOAL]\ncase inr\nn : Type u_1\nα : Type u_2\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\ninst✝ : CommRing α\nA : Matrix n n α\nh✝ : Nontrivial α\n⊢ coeff (det (X • 1 + Matrix.map A ↑C)) (natDegree (det (X • 1 + Matrix.map A ↑C))) =\n    coeff (det (X • 1 + Matrix.map A ↑C)) (Fintype.card n)\n[PROOFSTEP]\ncases' (natDegree_det_X_add_C_le 1 A).eq_or_lt with h h\n[GOAL]\ncase inr.inl\nn : Type u_1\nα : Type u_2\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\ninst✝ : CommRing α\nA : Matrix n n α\nh✝ : Nontrivial α\nh : natDegree (det (X • Matrix.map 1 ↑C + Matrix.map A ↑C)) = Fintype.card n\n⊢ coeff (det (X • 1 + Matrix.map A ↑C)) (natDegree (det (X • 1 + Matrix.map A ↑C))) =\n    coeff (det (X • 1 + Matrix.map A ↑C)) (Fintype.card n)\n[PROOFSTEP]\nsimp only [RingHom.map_one, Matrix.map_one, C_eq_zero] at h \n[GOAL]\ncase inr.inl\nn : Type u_1\nα : Type u_2\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\ninst✝ : CommRing α\nA : Matrix n n α\nh✝ : Nontrivial α\nh : natDegree (det (X • 1 + Matrix.map A ↑C)) = Fintype.card n\n⊢ coeff (det (X • 1 + Matrix.map A ↑C)) (natDegree (det (X • 1 + Matrix.map A ↑C))) =\n    coeff (det (X • 1 + Matrix.map A ↑C)) (Fintype.card n)\n[PROOFSTEP]\nrw [h]\n[GOAL]\ncase inr.inr\nn : Type u_1\nα : Type u_2\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\ninst✝ : CommRing α\nA : Matrix n n α\nh✝ : Nontrivial α\nh : natDegree (det (X • Matrix.map 1 ↑C + Matrix.map A ↑C)) < Fintype.card n\n⊢ coeff (det (X • 1 + Matrix.map A ↑C)) (natDegree (det (X • 1 + Matrix.map A ↑C))) =\n    coeff (det (X • 1 + Matrix.map A ↑C)) (Fintype.card n)\n[PROOFSTEP]\nhave H := coeff_eq_zero_of_natDegree_lt h\n[GOAL]\ncase inr.inr\nn : Type u_1\nα : Type u_2\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\ninst✝ : CommRing α\nA : Matrix n n α\nh✝ : Nontrivial α\nh : natDegree (det (X • Matrix.map 1 ↑C + Matrix.map A ↑C)) < Fintype.card n\nH : coeff (det (X • Matrix.map 1 ↑C + Matrix.map A ↑C)) (Fintype.card n) = 0\n⊢ coeff (det (X • 1 + Matrix.map A ↑C)) (natDegree (det (X • 1 + Matrix.map A ↑C))) =\n    coeff (det (X • 1 + Matrix.map A ↑C)) (Fintype.card n)\n[PROOFSTEP]\nrw [coeff_det_X_add_C_card] at H \n[GOAL]\ncase inr.inr\nn : Type u_1\nα : Type u_2\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\ninst✝ : CommRing α\nA : Matrix n n α\nh✝ : Nontrivial α\nh : natDegree (det (X • Matrix.map 1 ↑C + Matrix.map A ↑C)) < Fintype.card n\nH : det 1 = 0\n⊢ coeff (det (X • 1 + Matrix.map A ↑C)) (natDegree (det (X • 1 + Matrix.map A ↑C))) =\n    coeff (det (X • 1 + Matrix.map A ↑C)) (Fintype.card n)\n[PROOFSTEP]\nsimp at H \n", "meta": {"mathlib_filename": "Mathlib.LinearAlgebra.Matrix.Polynomial", "llama_tokens": 7140, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8311430478583168, "lm_q2_score": 0.6297746074044134, "lm_q1q2_score": 0.5234327866618791}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : CompleteSpace α\n⊢ BaireSpace α\n[PROOFSTEP]\nrefine' ⟨fun f ho hd => _⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : CompleteSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\n⊢ Dense (⋂ (n : ℕ), f n)\n[PROOFSTEP]\nlet B : ℕ → ℝ≥0∞ := fun n => 1 / 2 ^ n\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : CompleteSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\nB : ℕ → ℝ≥0∞ := fun n => 1 / 2 ^ n\n⊢ Dense (⋂ (n : ℕ), f n)\n[PROOFSTEP]\nhave Bpos : ∀ n, 0 < B n := by\n  intro n\n  simp only [one_div, one_mul, ENNReal.inv_pos]\n  exact pow_ne_top two_ne_top\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : CompleteSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\nB : ℕ → ℝ≥0∞ := fun n => 1 / 2 ^ n\n⊢ ∀ (n : ℕ), 0 < B n\n[PROOFSTEP]\nintro n\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : CompleteSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\nB : ℕ → ℝ≥0∞ := fun n => 1 / 2 ^ n\nn : ℕ\n⊢ 0 < B n\n[PROOFSTEP]\nsimp only [one_div, one_mul, ENNReal.inv_pos]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : CompleteSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\nB : ℕ → ℝ≥0∞ := fun n => 1 / 2 ^ n\nn : ℕ\n⊢ 2 ^ n ≠ ⊤\n[PROOFSTEP]\nexact pow_ne_top two_ne_top\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : CompleteSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\nB : ℕ → ℝ≥0∞ := fun n => 1 / 2 ^ n\nBpos : ∀ (n : ℕ), 0 < B n\n⊢ Dense (⋂ (n : ℕ), f n)\n[PROOFSTEP]\nhave : ∀ n x δ, δ ≠ 0 → ∃ y r, 0 < r ∧ r ≤ B (n + 1) ∧ closedBall y r ⊆ closedBall x δ ∩ f n :=\n  by\n  intro n x δ δpos\n  have : x ∈ closure (f n) := hd n x\n  rcases EMetric.mem_closure_iff.1 this (δ / 2) (ENNReal.half_pos δpos) with ⟨y, ys, xy⟩\n  rw [edist_comm] at xy \n  obtain ⟨r, rpos, hr⟩ : ∃ r > 0, closedBall y r ⊆ f n :=\n    nhds_basis_closed_eball.mem_iff.1 (isOpen_iff_mem_nhds.1 (ho n) y ys)\n  refine' ⟨y, min (min (δ / 2) r) (B (n + 1)), _, _, fun z hz => ⟨_, _⟩⟩\n  show 0 < min (min (δ / 2) r) (B (n + 1))\n  exact lt_min (lt_min (ENNReal.half_pos δpos) rpos) (Bpos (n + 1))\n  show min (min (δ / 2) r) (B (n + 1)) ≤ B (n + 1)\n  exact min_le_right _ _\n  show z ∈ closedBall x δ\n  exact\n    calc\n      edist z x ≤ edist z y + edist y x := edist_triangle _ _ _\n      _ ≤ min (min (δ / 2) r) (B (n + 1)) + δ / 2 := (add_le_add hz (le_of_lt xy))\n      _ ≤ δ / 2 + δ / 2 := (add_le_add (le_trans (min_le_left _ _) (min_le_left _ _)) le_rfl)\n      _ = δ := ENNReal.add_halves δ\n  show z ∈ f n\n  exact\n    hr\n      (calc\n        edist z y ≤ min (min (δ / 2) r) (B (n + 1)) := hz\n        _ ≤ r := le_trans (min_le_left _ _) (min_le_right _ _))\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : CompleteSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\nB : ℕ → ℝ≥0∞ := fun n => 1 / 2 ^ n\nBpos : ∀ (n : ℕ), 0 < B n\n⊢ ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → ∃ y r, 0 < r ∧ r ≤ B (n + 1) ∧ closedBall y r ⊆ closedBall x δ ∩ f n\n[PROOFSTEP]\nintro n x δ δpos\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : CompleteSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\nB : ℕ → ℝ≥0∞ := fun n => 1 / 2 ^ n\nBpos : ∀ (n : ℕ), 0 < B n\nn : ℕ\nx : α\nδ : ℝ≥0∞\nδpos : δ ≠ 0\n⊢ ∃ y r, 0 < r ∧ r ≤ B (n + 1) ∧ closedBall y r ⊆ closedBall x δ ∩ f n\n[PROOFSTEP]\nhave : x ∈ closure (f n) := hd n x\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : CompleteSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\nB : ℕ → ℝ≥0∞ := fun n => 1 / 2 ^ n\nBpos : ∀ (n : ℕ), 0 < B n\nn : ℕ\nx : α\nδ : ℝ≥0∞\nδpos : δ ≠ 0\nthis : x ∈ closure (f n)\n⊢ ∃ y r, 0 < r ∧ r ≤ B (n + 1) ∧ closedBall y r ⊆ closedBall x δ ∩ f n\n[PROOFSTEP]\nrcases EMetric.mem_closure_iff.1 this (δ / 2) (ENNReal.half_pos δpos) with ⟨y, ys, xy⟩\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : CompleteSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\nB : ℕ → ℝ≥0∞ := fun n => 1 / 2 ^ n\nBpos : ∀ (n : ℕ), 0 < B n\nn : ℕ\nx : α\nδ : ℝ≥0∞\nδpos : δ ≠ 0\nthis : x ∈ closure (f n)\ny : α\nys : y ∈ f n\nxy : edist x y < δ / 2\n⊢ ∃ y r, 0 < r ∧ r ≤ B (n + 1) ∧ closedBall y r ⊆ closedBall x δ ∩ f n\n[PROOFSTEP]\nrw [edist_comm] at xy \n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : CompleteSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\nB : ℕ → ℝ≥0∞ := fun n => 1 / 2 ^ n\nBpos : ∀ (n : ℕ), 0 < B n\nn : ℕ\nx : α\nδ : ℝ≥0∞\nδpos : δ ≠ 0\nthis : x ∈ closure (f n)\ny : α\nys : y ∈ f n\nxy : edist y x < δ / 2\n⊢ ∃ y r, 0 < r ∧ r ≤ B (n + 1) ∧ closedBall y r ⊆ closedBall x δ ∩ f n\n[PROOFSTEP]\nobtain ⟨r, rpos, hr⟩ : ∃ r > 0, closedBall y r ⊆ f n :=\n  nhds_basis_closed_eball.mem_iff.1 (isOpen_iff_mem_nhds.1 (ho n) y ys)\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : CompleteSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\nB : ℕ → ℝ≥0∞ := fun n => 1 / 2 ^ n\nBpos : ∀ (n : ℕ), 0 < B n\nn : ℕ\nx : α\nδ : ℝ≥0∞\nδpos : δ ≠ 0\nthis : x ∈ closure (f n)\ny : α\nys : y ∈ f n\nxy : edist y x < δ / 2\nr : ℝ≥0∞\nrpos : r > 0\nhr : closedBall y r ⊆ f n\n⊢ ∃ y r, 0 < r ∧ r ≤ B (n + 1) ∧ closedBall y r ⊆ closedBall x δ ∩ f n\n[PROOFSTEP]\nrefine' ⟨y, min (min (δ / 2) r) (B (n + 1)), _, _, fun z hz => ⟨_, _⟩⟩\n[GOAL]\ncase intro.intro.intro.intro.refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : CompleteSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\nB : ℕ → ℝ≥0∞ := fun n => 1 / 2 ^ n\nBpos : ∀ (n : ℕ), 0 < B n\nn : ℕ\nx : α\nδ : ℝ≥0∞\nδpos : δ ≠ 0\nthis : x ∈ closure (f n)\ny : α\nys : y ∈ f n\nxy : edist y x < δ / 2\nr : ℝ≥0∞\nrpos : r > 0\nhr : closedBall y r ⊆ f n\n⊢ 0 < min (min (δ / 2) r) (B (n + 1))\ncase intro.intro.intro.intro.refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : CompleteSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\nB : ℕ → ℝ≥0∞ := fun n => 1 / 2 ^ n\nBpos : ∀ (n : ℕ), 0 < B n\nn : ℕ\nx : α\nδ : ℝ≥0∞\nδpos : δ ≠ 0\nthis : x ∈ closure (f n)\ny : α\nys : y ∈ f n\nxy : edist y x < δ / 2\nr : ℝ≥0∞\nrpos : r > 0\nhr : closedBall y r ⊆ f n\n⊢ min (min (δ / 2) r) (B (n + 1)) ≤ B (n + 1)\ncase intro.intro.intro.intro.refine'_3\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : CompleteSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\nB : ℕ → ℝ≥0∞ := fun n => 1 / 2 ^ n\nBpos : ∀ (n : ℕ), 0 < B n\nn : ℕ\nx : α\nδ : ℝ≥0∞\nδpos : δ ≠ 0\nthis : x ∈ closure (f n)\ny : α\nys : y ∈ f n\nxy : edist y x < δ / 2\nr : ℝ≥0∞\nrpos : r > 0\nhr : closedBall y r ⊆ f n\nz : α\nhz : z ∈ closedBall y (min (min (δ / 2) r) (B (n + 1)))\n⊢ z ∈ closedBall x δ\ncase intro.intro.intro.intro.refine'_4\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : CompleteSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\nB : ℕ → ℝ≥0∞ := fun n => 1 / 2 ^ n\nBpos : ∀ (n : ℕ), 0 < B n\nn : ℕ\nx : α\nδ : ℝ≥0∞\nδpos : δ ≠ 0\nthis : x ∈ closure (f n)\ny : α\nys : y ∈ f n\nxy : edist y x < δ / 2\nr : ℝ≥0∞\nrpos : r > 0\nhr : closedBall y r ⊆ f n\nz : α\nhz : z ∈ closedBall y (min (min (δ / 2) r) (B (n + 1)))\n⊢ z ∈ f n\n[PROOFSTEP]\nshow 0 < min (min (δ / 2) r) (B (n + 1))\n[GOAL]\ncase intro.intro.intro.intro.refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : CompleteSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\nB : ℕ → ℝ≥0∞ := fun n => 1 / 2 ^ n\nBpos : ∀ (n : ℕ), 0 < B n\nn : ℕ\nx : α\nδ : ℝ≥0∞\nδpos : δ ≠ 0\nthis : x ∈ closure (f n)\ny : α\nys : y ∈ f n\nxy : edist y x < δ / 2\nr : ℝ≥0∞\nrpos : r > 0\nhr : closedBall y r ⊆ f n\n⊢ 0 < min (min (δ / 2) r) (B (n + 1))\ncase intro.intro.intro.intro.refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : CompleteSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\nB : ℕ → ℝ≥0∞ := fun n => 1 / 2 ^ n\nBpos : ∀ (n : ℕ), 0 < B n\nn : ℕ\nx : α\nδ : ℝ≥0∞\nδpos : δ ≠ 0\nthis : x ∈ closure (f n)\ny : α\nys : y ∈ f n\nxy : edist y x < δ / 2\nr : ℝ≥0∞\nrpos : r > 0\nhr : closedBall y r ⊆ f n\n⊢ min (min (δ / 2) r) (B (n + 1)) ≤ B (n + 1)\ncase intro.intro.intro.intro.refine'_3\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : CompleteSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\nB : ℕ → ℝ≥0∞ := fun n => 1 / 2 ^ n\nBpos : ∀ (n : ℕ), 0 < B n\nn : ℕ\nx : α\nδ : ℝ≥0∞\nδpos : δ ≠ 0\nthis : x ∈ closure (f n)\ny : α\nys : y ∈ f n\nxy : edist y x < δ / 2\nr : ℝ≥0∞\nrpos : r > 0\nhr : closedBall y r ⊆ f n\nz : α\nhz : z ∈ closedBall y (min (min (δ / 2) r) (B (n + 1)))\n⊢ z ∈ closedBall x δ\ncase intro.intro.intro.intro.refine'_4\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : CompleteSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\nB : ℕ → ℝ≥0∞ := fun n => 1 / 2 ^ n\nBpos : ∀ (n : ℕ), 0 < B n\nn : ℕ\nx : α\nδ : ℝ≥0∞\nδpos : δ ≠ 0\nthis : x ∈ closure (f n)\ny : α\nys : y ∈ f n\nxy : edist y x < δ / 2\nr : ℝ≥0∞\nrpos : r > 0\nhr : closedBall y r ⊆ f n\nz : α\nhz : z ∈ closedBall y (min (min (δ / 2) r) (B (n + 1)))\n⊢ z ∈ f n\n[PROOFSTEP]\nexact lt_min (lt_min (ENNReal.half_pos δpos) rpos) (Bpos (n + 1))\n[GOAL]\ncase intro.intro.intro.intro.refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : CompleteSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\nB : ℕ → ℝ≥0∞ := fun n => 1 / 2 ^ n\nBpos : ∀ (n : ℕ), 0 < B n\nn : ℕ\nx : α\nδ : ℝ≥0∞\nδpos : δ ≠ 0\nthis : x ∈ closure (f n)\ny : α\nys : y ∈ f n\nxy : edist y x < δ / 2\nr : ℝ≥0∞\nrpos : r > 0\nhr : closedBall y r ⊆ f n\n⊢ min (min (δ / 2) r) (B (n + 1)) ≤ B (n + 1)\ncase intro.intro.intro.intro.refine'_3\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : CompleteSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\nB : ℕ → ℝ≥0∞ := fun n => 1 / 2 ^ n\nBpos : ∀ (n : ℕ), 0 < B n\nn : ℕ\nx : α\nδ : ℝ≥0∞\nδpos : δ ≠ 0\nthis : x ∈ closure (f n)\ny : α\nys : y ∈ f n\nxy : edist y x < δ / 2\nr : ℝ≥0∞\nrpos : r > 0\nhr : closedBall y r ⊆ f n\nz : α\nhz : z ∈ closedBall y (min (min (δ / 2) r) (B (n + 1)))\n⊢ z ∈ closedBall x δ\ncase intro.intro.intro.intro.refine'_4\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : CompleteSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\nB : ℕ → ℝ≥0∞ := fun n => 1 / 2 ^ n\nBpos : ∀ (n : ℕ), 0 < B n\nn : ℕ\nx : α\nδ : ℝ≥0∞\nδpos : δ ≠ 0\nthis : x ∈ closure (f n)\ny : α\nys : y ∈ f n\nxy : edist y x < δ / 2\nr : ℝ≥0∞\nrpos : r > 0\nhr : closedBall y r ⊆ f n\nz : α\nhz : z ∈ closedBall y (min (min (δ / 2) r) (B (n + 1)))\n⊢ z ∈ f n\n[PROOFSTEP]\nshow min (min (δ / 2) r) (B (n + 1)) ≤ B (n + 1)\n[GOAL]\ncase intro.intro.intro.intro.refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : CompleteSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\nB : ℕ → ℝ≥0∞ := fun n => 1 / 2 ^ n\nBpos : ∀ (n : ℕ), 0 < B n\nn : ℕ\nx : α\nδ : ℝ≥0∞\nδpos : δ ≠ 0\nthis : x ∈ closure (f n)\ny : α\nys : y ∈ f n\nxy : edist y x < δ / 2\nr : ℝ≥0∞\nrpos : r > 0\nhr : closedBall y r ⊆ f n\n⊢ min (min (δ / 2) r) (B (n + 1)) ≤ B (n + 1)\ncase intro.intro.intro.intro.refine'_3\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : CompleteSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\nB : ℕ → ℝ≥0∞ := fun n => 1 / 2 ^ n\nBpos : ∀ (n : ℕ), 0 < B n\nn : ℕ\nx : α\nδ : ℝ≥0∞\nδpos : δ ≠ 0\nthis : x ∈ closure (f n)\ny : α\nys : y ∈ f n\nxy : edist y x < δ / 2\nr : ℝ≥0∞\nrpos : r > 0\nhr : closedBall y r ⊆ f n\nz : α\nhz : z ∈ closedBall y (min (min (δ / 2) r) (B (n + 1)))\n⊢ z ∈ closedBall x δ\ncase intro.intro.intro.intro.refine'_4\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : CompleteSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\nB : ℕ → ℝ≥0∞ := fun n => 1 / 2 ^ n\nBpos : ∀ (n : ℕ), 0 < B n\nn : ℕ\nx : α\nδ : ℝ≥0∞\nδpos : δ ≠ 0\nthis : x ∈ closure (f n)\ny : α\nys : y ∈ f n\nxy : edist y x < δ / 2\nr : ℝ≥0∞\nrpos : r > 0\nhr : closedBall y r ⊆ f n\nz : α\nhz : z ∈ closedBall y (min (min (δ / 2) r) (B (n + 1)))\n⊢ z ∈ f n\n[PROOFSTEP]\nexact min_le_right _ _\n[GOAL]\ncase intro.intro.intro.intro.refine'_3\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : CompleteSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\nB : ℕ → ℝ≥0∞ := fun n => 1 / 2 ^ n\nBpos : ∀ (n : ℕ), 0 < B n\nn : ℕ\nx : α\nδ : ℝ≥0∞\nδpos : δ ≠ 0\nthis : x ∈ closure (f n)\ny : α\nys : y ∈ f n\nxy : edist y x < δ / 2\nr : ℝ≥0∞\nrpos : r > 0\nhr : closedBall y r ⊆ f n\nz : α\nhz : z ∈ closedBall y (min (min (δ / 2) r) (B (n + 1)))\n⊢ z ∈ closedBall x δ\ncase intro.intro.intro.intro.refine'_4\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : CompleteSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\nB : ℕ → ℝ≥0∞ := fun n => 1 / 2 ^ n\nBpos : ∀ (n : ℕ), 0 < B n\nn : ℕ\nx : α\nδ : ℝ≥0∞\nδpos : δ ≠ 0\nthis : x ∈ closure (f n)\ny : α\nys : y ∈ f n\nxy : edist y x < δ / 2\nr : ℝ≥0∞\nrpos : r > 0\nhr : closedBall y r ⊆ f n\nz : α\nhz : z ∈ closedBall y (min (min (δ / 2) r) (B (n + 1)))\n⊢ z ∈ f n\n[PROOFSTEP]\nshow z ∈ closedBall x δ\n[GOAL]\ncase intro.intro.intro.intro.refine'_3\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : CompleteSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\nB : ℕ → ℝ≥0∞ := fun n => 1 / 2 ^ n\nBpos : ∀ (n : ℕ), 0 < B n\nn : ℕ\nx : α\nδ : ℝ≥0∞\nδpos : δ ≠ 0\nthis : x ∈ closure (f n)\ny : α\nys : y ∈ f n\nxy : edist y x < δ / 2\nr : ℝ≥0∞\nrpos : r > 0\nhr : closedBall y r ⊆ f n\nz : α\nhz : z ∈ closedBall y (min (min (δ / 2) r) (B (n + 1)))\n⊢ z ∈ closedBall x δ\ncase intro.intro.intro.intro.refine'_4\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : CompleteSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\nB : ℕ → ℝ≥0∞ := fun n => 1 / 2 ^ n\nBpos : ∀ (n : ℕ), 0 < B n\nn : ℕ\nx : α\nδ : ℝ≥0∞\nδpos : δ ≠ 0\nthis : x ∈ closure (f n)\ny : α\nys : y ∈ f n\nxy : edist y x < δ / 2\nr : ℝ≥0∞\nrpos : r > 0\nhr : closedBall y r ⊆ f n\nz : α\nhz : z ∈ closedBall y (min (min (δ / 2) r) (B (n + 1)))\n⊢ z ∈ f n\n[PROOFSTEP]\nexact\n  calc\n    edist z x ≤ edist z y + edist y x := edist_triangle _ _ _\n    _ ≤ min (min (δ / 2) r) (B (n + 1)) + δ / 2 := (add_le_add hz (le_of_lt xy))\n    _ ≤ δ / 2 + δ / 2 := (add_le_add (le_trans (min_le_left _ _) (min_le_left _ _)) le_rfl)\n    _ = δ := ENNReal.add_halves δ\n[GOAL]\ncase intro.intro.intro.intro.refine'_4\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : CompleteSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\nB : ℕ → ℝ≥0∞ := fun n => 1 / 2 ^ n\nBpos : ∀ (n : ℕ), 0 < B n\nn : ℕ\nx : α\nδ : ℝ≥0∞\nδpos : δ ≠ 0\nthis : x ∈ closure (f n)\ny : α\nys : y ∈ f n\nxy : edist y x < δ / 2\nr : ℝ≥0∞\nrpos : r > 0\nhr : closedBall y r ⊆ f n\nz : α\nhz : z ∈ closedBall y (min (min (δ / 2) r) (B (n + 1)))\n⊢ z ∈ f n\n[PROOFSTEP]\nshow z ∈ f n\n[GOAL]\ncase intro.intro.intro.intro.refine'_4\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : CompleteSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\nB : ℕ → ℝ≥0∞ := fun n => 1 / 2 ^ n\nBpos : ∀ (n : ℕ), 0 < B n\nn : ℕ\nx : α\nδ : ℝ≥0∞\nδpos : δ ≠ 0\nthis : x ∈ closure (f n)\ny : α\nys : y ∈ f n\nxy : edist y x < δ / 2\nr : ℝ≥0∞\nrpos : r > 0\nhr : closedBall y r ⊆ f n\nz : α\nhz : z ∈ closedBall y (min (min (δ / 2) r) (B (n + 1)))\n⊢ z ∈ f n\n[PROOFSTEP]\nexact\n  hr\n    (calc\n      edist z y ≤ min (min (δ / 2) r) (B (n + 1)) := hz\n      _ ≤ r := le_trans (min_le_left _ _) (min_le_right _ _))\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : CompleteSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\nB : ℕ → ℝ≥0∞ := fun n => 1 / 2 ^ n\nBpos : ∀ (n : ℕ), 0 < B n\nthis : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → ∃ y r, 0 < r ∧ r ≤ B (n + 1) ∧ closedBall y r ⊆ closedBall x δ ∩ f n\n⊢ Dense (⋂ (n : ℕ), f n)\n[PROOFSTEP]\nchoose! center radius Hpos HB Hball using this\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : CompleteSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\nB : ℕ → ℝ≥0∞ := fun n => 1 / 2 ^ n\nBpos : ∀ (n : ℕ), 0 < B n\ncenter : ℕ → α → ℝ≥0∞ → α\nradius : ℕ → α → ℝ≥0∞ → ℝ≥0∞\nHpos : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → 0 < radius n x δ\nHB : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → radius n x δ ≤ B (n + 1)\nHball : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → closedBall (center n x δ) (radius n x δ) ⊆ closedBall x δ ∩ f n\n⊢ Dense (⋂ (n : ℕ), f n)\n[PROOFSTEP]\nrefine' fun x =>\n  (mem_closure_iff_nhds_basis nhds_basis_closed_eball).2 fun ε εpos =>\n    _\n      /- `ε` is positive. We have to find a point in the ball of radius `ε` around `x` belonging to all\n          `f n`. For this, we construct inductively a sequence `F n = (c n, r n)` such that the closed\n          ball `closedBall (c n) (r n)` is included in the previous ball and in `f n`, and such that\n          `r n` is small enough to ensure that `c n` is a Cauchy sequence. Then `c n` converges to a\n          limit which belongs to all the `f n`. -/\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : CompleteSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\nB : ℕ → ℝ≥0∞ := fun n => 1 / 2 ^ n\nBpos : ∀ (n : ℕ), 0 < B n\ncenter : ℕ → α → ℝ≥0∞ → α\nradius : ℕ → α → ℝ≥0∞ → ℝ≥0∞\nHpos : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → 0 < radius n x δ\nHB : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → radius n x δ ≤ B (n + 1)\nHball : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → closedBall (center n x δ) (radius n x δ) ⊆ closedBall x δ ∩ f n\nx : α\nε : ℝ≥0∞\nεpos : 0 < ε\n⊢ ∃ y, y ∈ ⋂ (n : ℕ), f n ∧ y ∈ closedBall x ε\n[PROOFSTEP]\nlet F : ℕ → α × ℝ≥0∞ := fun n =>\n  Nat.recOn n (Prod.mk x (min ε (B 0))) fun n p => Prod.mk (center n p.1 p.2) (radius n p.1 p.2)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : CompleteSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\nB : ℕ → ℝ≥0∞ := fun n => 1 / 2 ^ n\nBpos : ∀ (n : ℕ), 0 < B n\ncenter : ℕ → α → ℝ≥0∞ → α\nradius : ℕ → α → ℝ≥0∞ → ℝ≥0∞\nHpos : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → 0 < radius n x δ\nHB : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → radius n x δ ≤ B (n + 1)\nHball : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → closedBall (center n x δ) (radius n x δ) ⊆ closedBall x δ ∩ f n\nx : α\nε : ℝ≥0∞\nεpos : 0 < ε\nF : ℕ → α × ℝ≥0∞ := fun n => Nat.recOn n (x, min ε (B 0)) fun n p => (center n p.fst p.snd, radius n p.fst p.snd)\n⊢ ∃ y, y ∈ ⋂ (n : ℕ), f n ∧ y ∈ closedBall x ε\n[PROOFSTEP]\nlet c : ℕ → α := fun n => (F n).1\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : CompleteSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\nB : ℕ → ℝ≥0∞ := fun n => 1 / 2 ^ n\nBpos : ∀ (n : ℕ), 0 < B n\ncenter : ℕ → α → ℝ≥0∞ → α\nradius : ℕ → α → ℝ≥0∞ → ℝ≥0∞\nHpos : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → 0 < radius n x δ\nHB : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → radius n x δ ≤ B (n + 1)\nHball : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → closedBall (center n x δ) (radius n x δ) ⊆ closedBall x δ ∩ f n\nx : α\nε : ℝ≥0∞\nεpos : 0 < ε\nF : ℕ → α × ℝ≥0∞ := fun n => Nat.recOn n (x, min ε (B 0)) fun n p => (center n p.fst p.snd, radius n p.fst p.snd)\nc : ℕ → α := fun n => (F n).fst\n⊢ ∃ y, y ∈ ⋂ (n : ℕ), f n ∧ y ∈ closedBall x ε\n[PROOFSTEP]\nlet r : ℕ → ℝ≥0∞ := fun n => (F n).2\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : CompleteSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\nB : ℕ → ℝ≥0∞ := fun n => 1 / 2 ^ n\nBpos : ∀ (n : ℕ), 0 < B n\ncenter : ℕ → α → ℝ≥0∞ → α\nradius : ℕ → α → ℝ≥0∞ → ℝ≥0∞\nHpos : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → 0 < radius n x δ\nHB : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → radius n x δ ≤ B (n + 1)\nHball : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → closedBall (center n x δ) (radius n x δ) ⊆ closedBall x δ ∩ f n\nx : α\nε : ℝ≥0∞\nεpos : 0 < ε\nF : ℕ → α × ℝ≥0∞ := fun n => Nat.recOn n (x, min ε (B 0)) fun n p => (center n p.fst p.snd, radius n p.fst p.snd)\nc : ℕ → α := fun n => (F n).fst\nr : ℕ → ℝ≥0∞ := fun n => (F n).snd\n⊢ ∃ y, y ∈ ⋂ (n : ℕ), f n ∧ y ∈ closedBall x ε\n[PROOFSTEP]\nhave rpos : ∀ n, 0 < r n := by\n  intro n\n  induction' n with n hn\n  exact lt_min εpos (Bpos 0)\n  exact Hpos n (c n) (r n) hn.ne'\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : CompleteSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\nB : ℕ → ℝ≥0∞ := fun n => 1 / 2 ^ n\nBpos : ∀ (n : ℕ), 0 < B n\ncenter : ℕ → α → ℝ≥0∞ → α\nradius : ℕ → α → ℝ≥0∞ → ℝ≥0∞\nHpos : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → 0 < radius n x δ\nHB : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → radius n x δ ≤ B (n + 1)\nHball : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → closedBall (center n x δ) (radius n x δ) ⊆ closedBall x δ ∩ f n\nx : α\nε : ℝ≥0∞\nεpos : 0 < ε\nF : ℕ → α × ℝ≥0∞ := fun n => Nat.recOn n (x, min ε (B 0)) fun n p => (center n p.fst p.snd, radius n p.fst p.snd)\nc : ℕ → α := fun n => (F n).fst\nr : ℕ → ℝ≥0∞ := fun n => (F n).snd\n⊢ ∀ (n : ℕ), 0 < r n\n[PROOFSTEP]\nintro n\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : CompleteSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\nB : ℕ → ℝ≥0∞ := fun n => 1 / 2 ^ n\nBpos : ∀ (n : ℕ), 0 < B n\ncenter : ℕ → α → ℝ≥0∞ → α\nradius : ℕ → α → ℝ≥0∞ → ℝ≥0∞\nHpos : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → 0 < radius n x δ\nHB : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → radius n x δ ≤ B (n + 1)\nHball : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → closedBall (center n x δ) (radius n x δ) ⊆ closedBall x δ ∩ f n\nx : α\nε : ℝ≥0∞\nεpos : 0 < ε\nF : ℕ → α × ℝ≥0∞ := fun n => Nat.recOn n (x, min ε (B 0)) fun n p => (center n p.fst p.snd, radius n p.fst p.snd)\nc : ℕ → α := fun n => (F n).fst\nr : ℕ → ℝ≥0∞ := fun n => (F n).snd\nn : ℕ\n⊢ 0 < r n\n[PROOFSTEP]\ninduction' n with n hn\n[GOAL]\ncase zero\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : CompleteSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\nB : ℕ → ℝ≥0∞ := fun n => 1 / 2 ^ n\nBpos : ∀ (n : ℕ), 0 < B n\ncenter : ℕ → α → ℝ≥0∞ → α\nradius : ℕ → α → ℝ≥0∞ → ℝ≥0∞\nHpos : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → 0 < radius n x δ\nHB : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → radius n x δ ≤ B (n + 1)\nHball : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → closedBall (center n x δ) (radius n x δ) ⊆ closedBall x δ ∩ f n\nx : α\nε : ℝ≥0∞\nεpos : 0 < ε\nF : ℕ → α × ℝ≥0∞ := fun n => Nat.recOn n (x, min ε (B 0)) fun n p => (center n p.fst p.snd, radius n p.fst p.snd)\nc : ℕ → α := fun n => (F n).fst\nr : ℕ → ℝ≥0∞ := fun n => (F n).snd\n⊢ 0 < r Nat.zero\ncase succ\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : CompleteSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\nB : ℕ → ℝ≥0∞ := fun n => 1 / 2 ^ n\nBpos : ∀ (n : ℕ), 0 < B n\ncenter : ℕ → α → ℝ≥0∞ → α\nradius : ℕ → α → ℝ≥0∞ → ℝ≥0∞\nHpos : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → 0 < radius n x δ\nHB : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → radius n x δ ≤ B (n + 1)\nHball : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → closedBall (center n x δ) (radius n x δ) ⊆ closedBall x δ ∩ f n\nx : α\nε : ℝ≥0∞\nεpos : 0 < ε\nF : ℕ → α × ℝ≥0∞ := fun n => Nat.recOn n (x, min ε (B 0)) fun n p => (center n p.fst p.snd, radius n p.fst p.snd)\nc : ℕ → α := fun n => (F n).fst\nr : ℕ → ℝ≥0∞ := fun n => (F n).snd\nn : ℕ\nhn : 0 < r n\n⊢ 0 < r (Nat.succ n)\n[PROOFSTEP]\nexact lt_min εpos (Bpos 0)\n[GOAL]\ncase succ\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : CompleteSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\nB : ℕ → ℝ≥0∞ := fun n => 1 / 2 ^ n\nBpos : ∀ (n : ℕ), 0 < B n\ncenter : ℕ → α → ℝ≥0∞ → α\nradius : ℕ → α → ℝ≥0∞ → ℝ≥0∞\nHpos : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → 0 < radius n x δ\nHB : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → radius n x δ ≤ B (n + 1)\nHball : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → closedBall (center n x δ) (radius n x δ) ⊆ closedBall x δ ∩ f n\nx : α\nε : ℝ≥0∞\nεpos : 0 < ε\nF : ℕ → α × ℝ≥0∞ := fun n => Nat.recOn n (x, min ε (B 0)) fun n p => (center n p.fst p.snd, radius n p.fst p.snd)\nc : ℕ → α := fun n => (F n).fst\nr : ℕ → ℝ≥0∞ := fun n => (F n).snd\nn : ℕ\nhn : 0 < r n\n⊢ 0 < r (Nat.succ n)\n[PROOFSTEP]\nexact Hpos n (c n) (r n) hn.ne'\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : CompleteSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\nB : ℕ → ℝ≥0∞ := fun n => 1 / 2 ^ n\nBpos : ∀ (n : ℕ), 0 < B n\ncenter : ℕ → α → ℝ≥0∞ → α\nradius : ℕ → α → ℝ≥0∞ → ℝ≥0∞\nHpos : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → 0 < radius n x δ\nHB : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → radius n x δ ≤ B (n + 1)\nHball : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → closedBall (center n x δ) (radius n x δ) ⊆ closedBall x δ ∩ f n\nx : α\nε : ℝ≥0∞\nεpos : 0 < ε\nF : ℕ → α × ℝ≥0∞ := fun n => Nat.recOn n (x, min ε (B 0)) fun n p => (center n p.fst p.snd, radius n p.fst p.snd)\nc : ℕ → α := fun n => (F n).fst\nr : ℕ → ℝ≥0∞ := fun n => (F n).snd\nrpos : ∀ (n : ℕ), 0 < r n\n⊢ ∃ y, y ∈ ⋂ (n : ℕ), f n ∧ y ∈ closedBall x ε\n[PROOFSTEP]\nhave r0 : ∀ n, r n ≠ 0 := fun n => (rpos n).ne'\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : CompleteSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\nB : ℕ → ℝ≥0∞ := fun n => 1 / 2 ^ n\nBpos : ∀ (n : ℕ), 0 < B n\ncenter : ℕ → α → ℝ≥0∞ → α\nradius : ℕ → α → ℝ≥0∞ → ℝ≥0∞\nHpos : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → 0 < radius n x δ\nHB : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → radius n x δ ≤ B (n + 1)\nHball : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → closedBall (center n x δ) (radius n x δ) ⊆ closedBall x δ ∩ f n\nx : α\nε : ℝ≥0∞\nεpos : 0 < ε\nF : ℕ → α × ℝ≥0∞ := fun n => Nat.recOn n (x, min ε (B 0)) fun n p => (center n p.fst p.snd, radius n p.fst p.snd)\nc : ℕ → α := fun n => (F n).fst\nr : ℕ → ℝ≥0∞ := fun n => (F n).snd\nrpos : ∀ (n : ℕ), 0 < r n\nr0 : ∀ (n : ℕ), r n ≠ 0\n⊢ ∃ y, y ∈ ⋂ (n : ℕ), f n ∧ y ∈ closedBall x ε\n[PROOFSTEP]\nhave rB : ∀ n, r n ≤ B n := by\n  intro n\n  induction' n with n _\n  exact min_le_right _ _\n  exact HB n (c n) (r n) (r0 n)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : CompleteSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\nB : ℕ → ℝ≥0∞ := fun n => 1 / 2 ^ n\nBpos : ∀ (n : ℕ), 0 < B n\ncenter : ℕ → α → ℝ≥0∞ → α\nradius : ℕ → α → ℝ≥0∞ → ℝ≥0∞\nHpos : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → 0 < radius n x δ\nHB : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → radius n x δ ≤ B (n + 1)\nHball : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → closedBall (center n x δ) (radius n x δ) ⊆ closedBall x δ ∩ f n\nx : α\nε : ℝ≥0∞\nεpos : 0 < ε\nF : ℕ → α × ℝ≥0∞ := fun n => Nat.recOn n (x, min ε (B 0)) fun n p => (center n p.fst p.snd, radius n p.fst p.snd)\nc : ℕ → α := fun n => (F n).fst\nr : ℕ → ℝ≥0∞ := fun n => (F n).snd\nrpos : ∀ (n : ℕ), 0 < r n\nr0 : ∀ (n : ℕ), r n ≠ 0\n⊢ ∀ (n : ℕ), r n ≤ B n\n[PROOFSTEP]\nintro n\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : CompleteSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\nB : ℕ → ℝ≥0∞ := fun n => 1 / 2 ^ n\nBpos : ∀ (n : ℕ), 0 < B n\ncenter : ℕ → α → ℝ≥0∞ → α\nradius : ℕ → α → ℝ≥0∞ → ℝ≥0∞\nHpos : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → 0 < radius n x δ\nHB : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → radius n x δ ≤ B (n + 1)\nHball : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → closedBall (center n x δ) (radius n x δ) ⊆ closedBall x δ ∩ f n\nx : α\nε : ℝ≥0∞\nεpos : 0 < ε\nF : ℕ → α × ℝ≥0∞ := fun n => Nat.recOn n (x, min ε (B 0)) fun n p => (center n p.fst p.snd, radius n p.fst p.snd)\nc : ℕ → α := fun n => (F n).fst\nr : ℕ → ℝ≥0∞ := fun n => (F n).snd\nrpos : ∀ (n : ℕ), 0 < r n\nr0 : ∀ (n : ℕ), r n ≠ 0\nn : ℕ\n⊢ r n ≤ B n\n[PROOFSTEP]\ninduction' n with n _\n[GOAL]\ncase zero\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : CompleteSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\nB : ℕ → ℝ≥0∞ := fun n => 1 / 2 ^ n\nBpos : ∀ (n : ℕ), 0 < B n\ncenter : ℕ → α → ℝ≥0∞ → α\nradius : ℕ → α → ℝ≥0∞ → ℝ≥0∞\nHpos : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → 0 < radius n x δ\nHB : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → radius n x δ ≤ B (n + 1)\nHball : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → closedBall (center n x δ) (radius n x δ) ⊆ closedBall x δ ∩ f n\nx : α\nε : ℝ≥0∞\nεpos : 0 < ε\nF : ℕ → α × ℝ≥0∞ := fun n => Nat.recOn n (x, min ε (B 0)) fun n p => (center n p.fst p.snd, radius n p.fst p.snd)\nc : ℕ → α := fun n => (F n).fst\nr : ℕ → ℝ≥0∞ := fun n => (F n).snd\nrpos : ∀ (n : ℕ), 0 < r n\nr0 : ∀ (n : ℕ), r n ≠ 0\n⊢ r Nat.zero ≤ B Nat.zero\ncase succ\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : CompleteSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\nB : ℕ → ℝ≥0∞ := fun n => 1 / 2 ^ n\nBpos : ∀ (n : ℕ), 0 < B n\ncenter : ℕ → α → ℝ≥0∞ → α\nradius : ℕ → α → ℝ≥0∞ → ℝ≥0∞\nHpos : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → 0 < radius n x δ\nHB : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → radius n x δ ≤ B (n + 1)\nHball : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → closedBall (center n x δ) (radius n x δ) ⊆ closedBall x δ ∩ f n\nx : α\nε : ℝ≥0∞\nεpos : 0 < ε\nF : ℕ → α × ℝ≥0∞ := fun n => Nat.recOn n (x, min ε (B 0)) fun n p => (center n p.fst p.snd, radius n p.fst p.snd)\nc : ℕ → α := fun n => (F n).fst\nr : ℕ → ℝ≥0∞ := fun n => (F n).snd\nrpos : ∀ (n : ℕ), 0 < r n\nr0 : ∀ (n : ℕ), r n ≠ 0\nn : ℕ\nn_ih✝ : r n ≤ B n\n⊢ r (Nat.succ n) ≤ B (Nat.succ n)\n[PROOFSTEP]\nexact min_le_right _ _\n[GOAL]\ncase succ\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : CompleteSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\nB : ℕ → ℝ≥0∞ := fun n => 1 / 2 ^ n\nBpos : ∀ (n : ℕ), 0 < B n\ncenter : ℕ → α → ℝ≥0∞ → α\nradius : ℕ → α → ℝ≥0∞ → ℝ≥0∞\nHpos : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → 0 < radius n x δ\nHB : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → radius n x δ ≤ B (n + 1)\nHball : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → closedBall (center n x δ) (radius n x δ) ⊆ closedBall x δ ∩ f n\nx : α\nε : ℝ≥0∞\nεpos : 0 < ε\nF : ℕ → α × ℝ≥0∞ := fun n => Nat.recOn n (x, min ε (B 0)) fun n p => (center n p.fst p.snd, radius n p.fst p.snd)\nc : ℕ → α := fun n => (F n).fst\nr : ℕ → ℝ≥0∞ := fun n => (F n).snd\nrpos : ∀ (n : ℕ), 0 < r n\nr0 : ∀ (n : ℕ), r n ≠ 0\nn : ℕ\nn_ih✝ : r n ≤ B n\n⊢ r (Nat.succ n) ≤ B (Nat.succ n)\n[PROOFSTEP]\nexact HB n (c n) (r n) (r0 n)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : CompleteSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\nB : ℕ → ℝ≥0∞ := fun n => 1 / 2 ^ n\nBpos : ∀ (n : ℕ), 0 < B n\ncenter : ℕ → α → ℝ≥0∞ → α\nradius : ℕ → α → ℝ≥0∞ → ℝ≥0∞\nHpos : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → 0 < radius n x δ\nHB : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → radius n x δ ≤ B (n + 1)\nHball : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → closedBall (center n x δ) (radius n x δ) ⊆ closedBall x δ ∩ f n\nx : α\nε : ℝ≥0∞\nεpos : 0 < ε\nF : ℕ → α × ℝ≥0∞ := fun n => Nat.recOn n (x, min ε (B 0)) fun n p => (center n p.fst p.snd, radius n p.fst p.snd)\nc : ℕ → α := fun n => (F n).fst\nr : ℕ → ℝ≥0∞ := fun n => (F n).snd\nrpos : ∀ (n : ℕ), 0 < r n\nr0 : ∀ (n : ℕ), r n ≠ 0\nrB : ∀ (n : ℕ), r n ≤ B n\n⊢ ∃ y, y ∈ ⋂ (n : ℕ), f n ∧ y ∈ closedBall x ε\n[PROOFSTEP]\nhave incl : ∀ n, closedBall (c (n + 1)) (r (n + 1)) ⊆ closedBall (c n) (r n) ∩ f n := fun n =>\n  Hball n (c n) (r n) (r0 n)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : CompleteSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\nB : ℕ → ℝ≥0∞ := fun n => 1 / 2 ^ n\nBpos : ∀ (n : ℕ), 0 < B n\ncenter : ℕ → α → ℝ≥0∞ → α\nradius : ℕ → α → ℝ≥0∞ → ℝ≥0∞\nHpos : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → 0 < radius n x δ\nHB : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → radius n x δ ≤ B (n + 1)\nHball : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → closedBall (center n x δ) (radius n x δ) ⊆ closedBall x δ ∩ f n\nx : α\nε : ℝ≥0∞\nεpos : 0 < ε\nF : ℕ → α × ℝ≥0∞ := fun n => Nat.recOn n (x, min ε (B 0)) fun n p => (center n p.fst p.snd, radius n p.fst p.snd)\nc : ℕ → α := fun n => (F n).fst\nr : ℕ → ℝ≥0∞ := fun n => (F n).snd\nrpos : ∀ (n : ℕ), 0 < r n\nr0 : ∀ (n : ℕ), r n ≠ 0\nrB : ∀ (n : ℕ), r n ≤ B n\nincl : ∀ (n : ℕ), closedBall (c (n + 1)) (r (n + 1)) ⊆ closedBall (c n) (r n) ∩ f n\n⊢ ∃ y, y ∈ ⋂ (n : ℕ), f n ∧ y ∈ closedBall x ε\n[PROOFSTEP]\nhave cdist : ∀ n, edist (c n) (c (n + 1)) ≤ B n := by\n  intro n\n  rw [edist_comm]\n  have A : c (n + 1) ∈ closedBall (c (n + 1)) (r (n + 1)) := mem_closedBall_self\n  have I :=\n    calc\n      closedBall (c (n + 1)) (r (n + 1)) ⊆ closedBall (c n) (r n) := Subset.trans (incl n) (inter_subset_left _ _)\n      _ ⊆ closedBall (c n) (B n) := closedBall_subset_closedBall (rB n)\n  exact I A\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : CompleteSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\nB : ℕ → ℝ≥0∞ := fun n => 1 / 2 ^ n\nBpos : ∀ (n : ℕ), 0 < B n\ncenter : ℕ → α → ℝ≥0∞ → α\nradius : ℕ → α → ℝ≥0∞ → ℝ≥0∞\nHpos : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → 0 < radius n x δ\nHB : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → radius n x δ ≤ B (n + 1)\nHball : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → closedBall (center n x δ) (radius n x δ) ⊆ closedBall x δ ∩ f n\nx : α\nε : ℝ≥0∞\nεpos : 0 < ε\nF : ℕ → α × ℝ≥0∞ := fun n => Nat.recOn n (x, min ε (B 0)) fun n p => (center n p.fst p.snd, radius n p.fst p.snd)\nc : ℕ → α := fun n => (F n).fst\nr : ℕ → ℝ≥0∞ := fun n => (F n).snd\nrpos : ∀ (n : ℕ), 0 < r n\nr0 : ∀ (n : ℕ), r n ≠ 0\nrB : ∀ (n : ℕ), r n ≤ B n\nincl : ∀ (n : ℕ), closedBall (c (n + 1)) (r (n + 1)) ⊆ closedBall (c n) (r n) ∩ f n\n⊢ ∀ (n : ℕ), edist (c n) (c (n + 1)) ≤ B n\n[PROOFSTEP]\nintro n\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : CompleteSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\nB : ℕ → ℝ≥0∞ := fun n => 1 / 2 ^ n\nBpos : ∀ (n : ℕ), 0 < B n\ncenter : ℕ → α → ℝ≥0∞ → α\nradius : ℕ → α → ℝ≥0∞ → ℝ≥0∞\nHpos : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → 0 < radius n x δ\nHB : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → radius n x δ ≤ B (n + 1)\nHball : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → closedBall (center n x δ) (radius n x δ) ⊆ closedBall x δ ∩ f n\nx : α\nε : ℝ≥0∞\nεpos : 0 < ε\nF : ℕ → α × ℝ≥0∞ := fun n => Nat.recOn n (x, min ε (B 0)) fun n p => (center n p.fst p.snd, radius n p.fst p.snd)\nc : ℕ → α := fun n => (F n).fst\nr : ℕ → ℝ≥0∞ := fun n => (F n).snd\nrpos : ∀ (n : ℕ), 0 < r n\nr0 : ∀ (n : ℕ), r n ≠ 0\nrB : ∀ (n : ℕ), r n ≤ B n\nincl : ∀ (n : ℕ), closedBall (c (n + 1)) (r (n + 1)) ⊆ closedBall (c n) (r n) ∩ f n\nn : ℕ\n⊢ edist (c n) (c (n + 1)) ≤ B n\n[PROOFSTEP]\nrw [edist_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : CompleteSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\nB : ℕ → ℝ≥0∞ := fun n => 1 / 2 ^ n\nBpos : ∀ (n : ℕ), 0 < B n\ncenter : ℕ → α → ℝ≥0∞ → α\nradius : ℕ → α → ℝ≥0∞ → ℝ≥0∞\nHpos : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → 0 < radius n x δ\nHB : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → radius n x δ ≤ B (n + 1)\nHball : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → closedBall (center n x δ) (radius n x δ) ⊆ closedBall x δ ∩ f n\nx : α\nε : ℝ≥0∞\nεpos : 0 < ε\nF : ℕ → α × ℝ≥0∞ := fun n => Nat.recOn n (x, min ε (B 0)) fun n p => (center n p.fst p.snd, radius n p.fst p.snd)\nc : ℕ → α := fun n => (F n).fst\nr : ℕ → ℝ≥0∞ := fun n => (F n).snd\nrpos : ∀ (n : ℕ), 0 < r n\nr0 : ∀ (n : ℕ), r n ≠ 0\nrB : ∀ (n : ℕ), r n ≤ B n\nincl : ∀ (n : ℕ), closedBall (c (n + 1)) (r (n + 1)) ⊆ closedBall (c n) (r n) ∩ f n\nn : ℕ\n⊢ edist (c (n + 1)) (c n) ≤ B n\n[PROOFSTEP]\nhave A : c (n + 1) ∈ closedBall (c (n + 1)) (r (n + 1)) := mem_closedBall_self\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : CompleteSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\nB : ℕ → ℝ≥0∞ := fun n => 1 / 2 ^ n\nBpos : ∀ (n : ℕ), 0 < B n\ncenter : ℕ → α → ℝ≥0∞ → α\nradius : ℕ → α → ℝ≥0∞ → ℝ≥0∞\nHpos : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → 0 < radius n x δ\nHB : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → radius n x δ ≤ B (n + 1)\nHball : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → closedBall (center n x δ) (radius n x δ) ⊆ closedBall x δ ∩ f n\nx : α\nε : ℝ≥0∞\nεpos : 0 < ε\nF : ℕ → α × ℝ≥0∞ := fun n => Nat.recOn n (x, min ε (B 0)) fun n p => (center n p.fst p.snd, radius n p.fst p.snd)\nc : ℕ → α := fun n => (F n).fst\nr : ℕ → ℝ≥0∞ := fun n => (F n).snd\nrpos : ∀ (n : ℕ), 0 < r n\nr0 : ∀ (n : ℕ), r n ≠ 0\nrB : ∀ (n : ℕ), r n ≤ B n\nincl : ∀ (n : ℕ), closedBall (c (n + 1)) (r (n + 1)) ⊆ closedBall (c n) (r n) ∩ f n\nn : ℕ\nA : c (n + 1) ∈ closedBall (c (n + 1)) (r (n + 1))\n⊢ edist (c (n + 1)) (c n) ≤ B n\n[PROOFSTEP]\nhave I :=\n  calc\n    closedBall (c (n + 1)) (r (n + 1)) ⊆ closedBall (c n) (r n) := Subset.trans (incl n) (inter_subset_left _ _)\n    _ ⊆ closedBall (c n) (B n) := closedBall_subset_closedBall (rB n)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : CompleteSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\nB : ℕ → ℝ≥0∞ := fun n => 1 / 2 ^ n\nBpos : ∀ (n : ℕ), 0 < B n\ncenter : ℕ → α → ℝ≥0∞ → α\nradius : ℕ → α → ℝ≥0∞ → ℝ≥0∞\nHpos : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → 0 < radius n x δ\nHB : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → radius n x δ ≤ B (n + 1)\nHball : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → closedBall (center n x δ) (radius n x δ) ⊆ closedBall x δ ∩ f n\nx : α\nε : ℝ≥0∞\nεpos : 0 < ε\nF : ℕ → α × ℝ≥0∞ := fun n => Nat.recOn n (x, min ε (B 0)) fun n p => (center n p.fst p.snd, radius n p.fst p.snd)\nc : ℕ → α := fun n => (F n).fst\nr : ℕ → ℝ≥0∞ := fun n => (F n).snd\nrpos : ∀ (n : ℕ), 0 < r n\nr0 : ∀ (n : ℕ), r n ≠ 0\nrB : ∀ (n : ℕ), r n ≤ B n\nincl : ∀ (n : ℕ), closedBall (c (n + 1)) (r (n + 1)) ⊆ closedBall (c n) (r n) ∩ f n\nn : ℕ\nA : c (n + 1) ∈ closedBall (c (n + 1)) (r (n + 1))\nI : closedBall (c (n + 1)) (r (n + 1)) ⊆ closedBall (c n) (B n)\n⊢ edist (c (n + 1)) (c n) ≤ B n\n[PROOFSTEP]\nexact I A\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : CompleteSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\nB : ℕ → ℝ≥0∞ := fun n => 1 / 2 ^ n\nBpos : ∀ (n : ℕ), 0 < B n\ncenter : ℕ → α → ℝ≥0∞ → α\nradius : ℕ → α → ℝ≥0∞ → ℝ≥0∞\nHpos : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → 0 < radius n x δ\nHB : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → radius n x δ ≤ B (n + 1)\nHball : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → closedBall (center n x δ) (radius n x δ) ⊆ closedBall x δ ∩ f n\nx : α\nε : ℝ≥0∞\nεpos : 0 < ε\nF : ℕ → α × ℝ≥0∞ := fun n => Nat.recOn n (x, min ε (B 0)) fun n p => (center n p.fst p.snd, radius n p.fst p.snd)\nc : ℕ → α := fun n => (F n).fst\nr : ℕ → ℝ≥0∞ := fun n => (F n).snd\nrpos : ∀ (n : ℕ), 0 < r n\nr0 : ∀ (n : ℕ), r n ≠ 0\nrB : ∀ (n : ℕ), r n ≤ B n\nincl : ∀ (n : ℕ), closedBall (c (n + 1)) (r (n + 1)) ⊆ closedBall (c n) (r n) ∩ f n\ncdist : ∀ (n : ℕ), edist (c n) (c (n + 1)) ≤ B n\n⊢ ∃ y, y ∈ ⋂ (n : ℕ), f n ∧ y ∈ closedBall x ε\n[PROOFSTEP]\nhave : CauchySeq c := cauchySeq_of_edist_le_geometric_two _ one_ne_top cdist\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : CompleteSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\nB : ℕ → ℝ≥0∞ := fun n => 1 / 2 ^ n\nBpos : ∀ (n : ℕ), 0 < B n\ncenter : ℕ → α → ℝ≥0∞ → α\nradius : ℕ → α → ℝ≥0∞ → ℝ≥0∞\nHpos : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → 0 < radius n x δ\nHB : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → radius n x δ ≤ B (n + 1)\nHball : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → closedBall (center n x δ) (radius n x δ) ⊆ closedBall x δ ∩ f n\nx : α\nε : ℝ≥0∞\nεpos : 0 < ε\nF : ℕ → α × ℝ≥0∞ := fun n => Nat.recOn n (x, min ε (B 0)) fun n p => (center n p.fst p.snd, radius n p.fst p.snd)\nc : ℕ → α := fun n => (F n).fst\nr : ℕ → ℝ≥0∞ := fun n => (F n).snd\nrpos : ∀ (n : ℕ), 0 < r n\nr0 : ∀ (n : ℕ), r n ≠ 0\nrB : ∀ (n : ℕ), r n ≤ B n\nincl : ∀ (n : ℕ), closedBall (c (n + 1)) (r (n + 1)) ⊆ closedBall (c n) (r n) ∩ f n\ncdist : ∀ (n : ℕ), edist (c n) (c (n + 1)) ≤ B n\nthis : CauchySeq c\n⊢ ∃ y, y ∈ ⋂ (n : ℕ), f n ∧ y ∈ closedBall x ε\n[PROOFSTEP]\nrcases cauchySeq_tendsto_of_complete this with\n  ⟨y, ylim⟩\n    -- this point `y` will be the desired point. We will check that it belongs to all\n      -- `f n` and to `ball x ε`.\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : CompleteSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\nB : ℕ → ℝ≥0∞ := fun n => 1 / 2 ^ n\nBpos : ∀ (n : ℕ), 0 < B n\ncenter : ℕ → α → ℝ≥0∞ → α\nradius : ℕ → α → ℝ≥0∞ → ℝ≥0∞\nHpos : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → 0 < radius n x δ\nHB : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → radius n x δ ≤ B (n + 1)\nHball : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → closedBall (center n x δ) (radius n x δ) ⊆ closedBall x δ ∩ f n\nx : α\nε : ℝ≥0∞\nεpos : 0 < ε\nF : ℕ → α × ℝ≥0∞ := fun n => Nat.recOn n (x, min ε (B 0)) fun n p => (center n p.fst p.snd, radius n p.fst p.snd)\nc : ℕ → α := fun n => (F n).fst\nr : ℕ → ℝ≥0∞ := fun n => (F n).snd\nrpos : ∀ (n : ℕ), 0 < r n\nr0 : ∀ (n : ℕ), r n ≠ 0\nrB : ∀ (n : ℕ), r n ≤ B n\nincl : ∀ (n : ℕ), closedBall (c (n + 1)) (r (n + 1)) ⊆ closedBall (c n) (r n) ∩ f n\ncdist : ∀ (n : ℕ), edist (c n) (c (n + 1)) ≤ B n\nthis : CauchySeq c\ny : α\nylim : Tendsto c atTop (𝓝 y)\n⊢ ∃ y, y ∈ ⋂ (n : ℕ), f n ∧ y ∈ closedBall x ε\n[PROOFSTEP]\nuse y\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : CompleteSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\nB : ℕ → ℝ≥0∞ := fun n => 1 / 2 ^ n\nBpos : ∀ (n : ℕ), 0 < B n\ncenter : ℕ → α → ℝ≥0∞ → α\nradius : ℕ → α → ℝ≥0∞ → ℝ≥0∞\nHpos : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → 0 < radius n x δ\nHB : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → radius n x δ ≤ B (n + 1)\nHball : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → closedBall (center n x δ) (radius n x δ) ⊆ closedBall x δ ∩ f n\nx : α\nε : ℝ≥0∞\nεpos : 0 < ε\nF : ℕ → α × ℝ≥0∞ := fun n => Nat.recOn n (x, min ε (B 0)) fun n p => (center n p.fst p.snd, radius n p.fst p.snd)\nc : ℕ → α := fun n => (F n).fst\nr : ℕ → ℝ≥0∞ := fun n => (F n).snd\nrpos : ∀ (n : ℕ), 0 < r n\nr0 : ∀ (n : ℕ), r n ≠ 0\nrB : ∀ (n : ℕ), r n ≤ B n\nincl : ∀ (n : ℕ), closedBall (c (n + 1)) (r (n + 1)) ⊆ closedBall (c n) (r n) ∩ f n\ncdist : ∀ (n : ℕ), edist (c n) (c (n + 1)) ≤ B n\nthis : CauchySeq c\ny : α\nylim : Tendsto c atTop (𝓝 y)\n⊢ y ∈ ⋂ (n : ℕ), f n ∧ y ∈ closedBall x ε\n[PROOFSTEP]\nsimp only [exists_prop, Set.mem_iInter]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : CompleteSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\nB : ℕ → ℝ≥0∞ := fun n => 1 / 2 ^ n\nBpos : ∀ (n : ℕ), 0 < B n\ncenter : ℕ → α → ℝ≥0∞ → α\nradius : ℕ → α → ℝ≥0∞ → ℝ≥0∞\nHpos : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → 0 < radius n x δ\nHB : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → radius n x δ ≤ B (n + 1)\nHball : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → closedBall (center n x δ) (radius n x δ) ⊆ closedBall x δ ∩ f n\nx : α\nε : ℝ≥0∞\nεpos : 0 < ε\nF : ℕ → α × ℝ≥0∞ := fun n => Nat.recOn n (x, min ε (B 0)) fun n p => (center n p.fst p.snd, radius n p.fst p.snd)\nc : ℕ → α := fun n => (F n).fst\nr : ℕ → ℝ≥0∞ := fun n => (F n).snd\nrpos : ∀ (n : ℕ), 0 < r n\nr0 : ∀ (n : ℕ), r n ≠ 0\nrB : ∀ (n : ℕ), r n ≤ B n\nincl : ∀ (n : ℕ), closedBall (c (n + 1)) (r (n + 1)) ⊆ closedBall (c n) (r n) ∩ f n\ncdist : ∀ (n : ℕ), edist (c n) (c (n + 1)) ≤ B n\nthis : CauchySeq c\ny : α\nylim : Tendsto c atTop (𝓝 y)\n⊢ (∀ (i : ℕ), y ∈ f i) ∧ y ∈ closedBall x ε\n[PROOFSTEP]\nhave I : ∀ n, ∀ m ≥ n, closedBall (c m) (r m) ⊆ closedBall (c n) (r n) :=\n  by\n  intro n\n  refine' Nat.le_induction _ fun m _ h => _\n  · exact Subset.refl _\n  · exact Subset.trans (incl m) (Subset.trans (inter_subset_left _ _) h)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : CompleteSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\nB : ℕ → ℝ≥0∞ := fun n => 1 / 2 ^ n\nBpos : ∀ (n : ℕ), 0 < B n\ncenter : ℕ → α → ℝ≥0∞ → α\nradius : ℕ → α → ℝ≥0∞ → ℝ≥0∞\nHpos : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → 0 < radius n x δ\nHB : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → radius n x δ ≤ B (n + 1)\nHball : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → closedBall (center n x δ) (radius n x δ) ⊆ closedBall x δ ∩ f n\nx : α\nε : ℝ≥0∞\nεpos : 0 < ε\nF : ℕ → α × ℝ≥0∞ := fun n => Nat.recOn n (x, min ε (B 0)) fun n p => (center n p.fst p.snd, radius n p.fst p.snd)\nc : ℕ → α := fun n => (F n).fst\nr : ℕ → ℝ≥0∞ := fun n => (F n).snd\nrpos : ∀ (n : ℕ), 0 < r n\nr0 : ∀ (n : ℕ), r n ≠ 0\nrB : ∀ (n : ℕ), r n ≤ B n\nincl : ∀ (n : ℕ), closedBall (c (n + 1)) (r (n + 1)) ⊆ closedBall (c n) (r n) ∩ f n\ncdist : ∀ (n : ℕ), edist (c n) (c (n + 1)) ≤ B n\nthis : CauchySeq c\ny : α\nylim : Tendsto c atTop (𝓝 y)\n⊢ ∀ (n m : ℕ), m ≥ n → closedBall (c m) (r m) ⊆ closedBall (c n) (r n)\n[PROOFSTEP]\nintro n\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : CompleteSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\nB : ℕ → ℝ≥0∞ := fun n => 1 / 2 ^ n\nBpos : ∀ (n : ℕ), 0 < B n\ncenter : ℕ → α → ℝ≥0∞ → α\nradius : ℕ → α → ℝ≥0∞ → ℝ≥0∞\nHpos : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → 0 < radius n x δ\nHB : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → radius n x δ ≤ B (n + 1)\nHball : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → closedBall (center n x δ) (radius n x δ) ⊆ closedBall x δ ∩ f n\nx : α\nε : ℝ≥0∞\nεpos : 0 < ε\nF : ℕ → α × ℝ≥0∞ := fun n => Nat.recOn n (x, min ε (B 0)) fun n p => (center n p.fst p.snd, radius n p.fst p.snd)\nc : ℕ → α := fun n => (F n).fst\nr : ℕ → ℝ≥0∞ := fun n => (F n).snd\nrpos : ∀ (n : ℕ), 0 < r n\nr0 : ∀ (n : ℕ), r n ≠ 0\nrB : ∀ (n : ℕ), r n ≤ B n\nincl : ∀ (n : ℕ), closedBall (c (n + 1)) (r (n + 1)) ⊆ closedBall (c n) (r n) ∩ f n\ncdist : ∀ (n : ℕ), edist (c n) (c (n + 1)) ≤ B n\nthis : CauchySeq c\ny : α\nylim : Tendsto c atTop (𝓝 y)\nn : ℕ\n⊢ ∀ (m : ℕ), m ≥ n → closedBall (c m) (r m) ⊆ closedBall (c n) (r n)\n[PROOFSTEP]\nrefine' Nat.le_induction _ fun m _ h => _\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : CompleteSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\nB : ℕ → ℝ≥0∞ := fun n => 1 / 2 ^ n\nBpos : ∀ (n : ℕ), 0 < B n\ncenter : ℕ → α → ℝ≥0∞ → α\nradius : ℕ → α → ℝ≥0∞ → ℝ≥0∞\nHpos : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → 0 < radius n x δ\nHB : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → radius n x δ ≤ B (n + 1)\nHball : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → closedBall (center n x δ) (radius n x δ) ⊆ closedBall x δ ∩ f n\nx : α\nε : ℝ≥0∞\nεpos : 0 < ε\nF : ℕ → α × ℝ≥0∞ := fun n => Nat.recOn n (x, min ε (B 0)) fun n p => (center n p.fst p.snd, radius n p.fst p.snd)\nc : ℕ → α := fun n => (F n).fst\nr : ℕ → ℝ≥0∞ := fun n => (F n).snd\nrpos : ∀ (n : ℕ), 0 < r n\nr0 : ∀ (n : ℕ), r n ≠ 0\nrB : ∀ (n : ℕ), r n ≤ B n\nincl : ∀ (n : ℕ), closedBall (c (n + 1)) (r (n + 1)) ⊆ closedBall (c n) (r n) ∩ f n\ncdist : ∀ (n : ℕ), edist (c n) (c (n + 1)) ≤ B n\nthis : CauchySeq c\ny : α\nylim : Tendsto c atTop (𝓝 y)\nn : ℕ\n⊢ closedBall (c n) (r n) ⊆ closedBall (c n) (r n)\n[PROOFSTEP]\nexact Subset.refl _\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : CompleteSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\nB : ℕ → ℝ≥0∞ := fun n => 1 / 2 ^ n\nBpos : ∀ (n : ℕ), 0 < B n\ncenter : ℕ → α → ℝ≥0∞ → α\nradius : ℕ → α → ℝ≥0∞ → ℝ≥0∞\nHpos : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → 0 < radius n x δ\nHB : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → radius n x δ ≤ B (n + 1)\nHball : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → closedBall (center n x δ) (radius n x δ) ⊆ closedBall x δ ∩ f n\nx : α\nε : ℝ≥0∞\nεpos : 0 < ε\nF : ℕ → α × ℝ≥0∞ := fun n => Nat.recOn n (x, min ε (B 0)) fun n p => (center n p.fst p.snd, radius n p.fst p.snd)\nc : ℕ → α := fun n => (F n).fst\nr : ℕ → ℝ≥0∞ := fun n => (F n).snd\nrpos : ∀ (n : ℕ), 0 < r n\nr0 : ∀ (n : ℕ), r n ≠ 0\nrB : ∀ (n : ℕ), r n ≤ B n\nincl : ∀ (n : ℕ), closedBall (c (n + 1)) (r (n + 1)) ⊆ closedBall (c n) (r n) ∩ f n\ncdist : ∀ (n : ℕ), edist (c n) (c (n + 1)) ≤ B n\nthis : CauchySeq c\ny : α\nylim : Tendsto c atTop (𝓝 y)\nn m : ℕ\nx✝ : n ≤ m\nh : closedBall (c m) (r m) ⊆ closedBall (c n) (r n)\n⊢ closedBall (c (m + 1)) (r (m + 1)) ⊆ closedBall (c n) (r n)\n[PROOFSTEP]\nexact Subset.trans (incl m) (Subset.trans (inter_subset_left _ _) h)\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : CompleteSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\nB : ℕ → ℝ≥0∞ := fun n => 1 / 2 ^ n\nBpos : ∀ (n : ℕ), 0 < B n\ncenter : ℕ → α → ℝ≥0∞ → α\nradius : ℕ → α → ℝ≥0∞ → ℝ≥0∞\nHpos : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → 0 < radius n x δ\nHB : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → radius n x δ ≤ B (n + 1)\nHball : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → closedBall (center n x δ) (radius n x δ) ⊆ closedBall x δ ∩ f n\nx : α\nε : ℝ≥0∞\nεpos : 0 < ε\nF : ℕ → α × ℝ≥0∞ := fun n => Nat.recOn n (x, min ε (B 0)) fun n p => (center n p.fst p.snd, radius n p.fst p.snd)\nc : ℕ → α := fun n => (F n).fst\nr : ℕ → ℝ≥0∞ := fun n => (F n).snd\nrpos : ∀ (n : ℕ), 0 < r n\nr0 : ∀ (n : ℕ), r n ≠ 0\nrB : ∀ (n : ℕ), r n ≤ B n\nincl : ∀ (n : ℕ), closedBall (c (n + 1)) (r (n + 1)) ⊆ closedBall (c n) (r n) ∩ f n\ncdist : ∀ (n : ℕ), edist (c n) (c (n + 1)) ≤ B n\nthis : CauchySeq c\ny : α\nylim : Tendsto c atTop (𝓝 y)\nI : ∀ (n m : ℕ), m ≥ n → closedBall (c m) (r m) ⊆ closedBall (c n) (r n)\n⊢ (∀ (i : ℕ), y ∈ f i) ∧ y ∈ closedBall x ε\n[PROOFSTEP]\nhave yball : ∀ n, y ∈ closedBall (c n) (r n) := by\n  intro n\n  refine' isClosed_ball.mem_of_tendsto ylim _\n  refine' (Filter.eventually_ge_atTop n).mono fun m hm => _\n  exact I n m hm mem_closedBall_self\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : CompleteSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\nB : ℕ → ℝ≥0∞ := fun n => 1 / 2 ^ n\nBpos : ∀ (n : ℕ), 0 < B n\ncenter : ℕ → α → ℝ≥0∞ → α\nradius : ℕ → α → ℝ≥0∞ → ℝ≥0∞\nHpos : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → 0 < radius n x δ\nHB : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → radius n x δ ≤ B (n + 1)\nHball : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → closedBall (center n x δ) (radius n x δ) ⊆ closedBall x δ ∩ f n\nx : α\nε : ℝ≥0∞\nεpos : 0 < ε\nF : ℕ → α × ℝ≥0∞ := fun n => Nat.recOn n (x, min ε (B 0)) fun n p => (center n p.fst p.snd, radius n p.fst p.snd)\nc : ℕ → α := fun n => (F n).fst\nr : ℕ → ℝ≥0∞ := fun n => (F n).snd\nrpos : ∀ (n : ℕ), 0 < r n\nr0 : ∀ (n : ℕ), r n ≠ 0\nrB : ∀ (n : ℕ), r n ≤ B n\nincl : ∀ (n : ℕ), closedBall (c (n + 1)) (r (n + 1)) ⊆ closedBall (c n) (r n) ∩ f n\ncdist : ∀ (n : ℕ), edist (c n) (c (n + 1)) ≤ B n\nthis : CauchySeq c\ny : α\nylim : Tendsto c atTop (𝓝 y)\nI : ∀ (n m : ℕ), m ≥ n → closedBall (c m) (r m) ⊆ closedBall (c n) (r n)\n⊢ ∀ (n : ℕ), y ∈ closedBall (c n) (r n)\n[PROOFSTEP]\nintro n\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : CompleteSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\nB : ℕ → ℝ≥0∞ := fun n => 1 / 2 ^ n\nBpos : ∀ (n : ℕ), 0 < B n\ncenter : ℕ → α → ℝ≥0∞ → α\nradius : ℕ → α → ℝ≥0∞ → ℝ≥0∞\nHpos : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → 0 < radius n x δ\nHB : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → radius n x δ ≤ B (n + 1)\nHball : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → closedBall (center n x δ) (radius n x δ) ⊆ closedBall x δ ∩ f n\nx : α\nε : ℝ≥0∞\nεpos : 0 < ε\nF : ℕ → α × ℝ≥0∞ := fun n => Nat.recOn n (x, min ε (B 0)) fun n p => (center n p.fst p.snd, radius n p.fst p.snd)\nc : ℕ → α := fun n => (F n).fst\nr : ℕ → ℝ≥0∞ := fun n => (F n).snd\nrpos : ∀ (n : ℕ), 0 < r n\nr0 : ∀ (n : ℕ), r n ≠ 0\nrB : ∀ (n : ℕ), r n ≤ B n\nincl : ∀ (n : ℕ), closedBall (c (n + 1)) (r (n + 1)) ⊆ closedBall (c n) (r n) ∩ f n\ncdist : ∀ (n : ℕ), edist (c n) (c (n + 1)) ≤ B n\nthis : CauchySeq c\ny : α\nylim : Tendsto c atTop (𝓝 y)\nI : ∀ (n m : ℕ), m ≥ n → closedBall (c m) (r m) ⊆ closedBall (c n) (r n)\nn : ℕ\n⊢ y ∈ closedBall (c n) (r n)\n[PROOFSTEP]\nrefine' isClosed_ball.mem_of_tendsto ylim _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : CompleteSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\nB : ℕ → ℝ≥0∞ := fun n => 1 / 2 ^ n\nBpos : ∀ (n : ℕ), 0 < B n\ncenter : ℕ → α → ℝ≥0∞ → α\nradius : ℕ → α → ℝ≥0∞ → ℝ≥0∞\nHpos : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → 0 < radius n x δ\nHB : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → radius n x δ ≤ B (n + 1)\nHball : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → closedBall (center n x δ) (radius n x δ) ⊆ closedBall x δ ∩ f n\nx : α\nε : ℝ≥0∞\nεpos : 0 < ε\nF : ℕ → α × ℝ≥0∞ := fun n => Nat.recOn n (x, min ε (B 0)) fun n p => (center n p.fst p.snd, radius n p.fst p.snd)\nc : ℕ → α := fun n => (F n).fst\nr : ℕ → ℝ≥0∞ := fun n => (F n).snd\nrpos : ∀ (n : ℕ), 0 < r n\nr0 : ∀ (n : ℕ), r n ≠ 0\nrB : ∀ (n : ℕ), r n ≤ B n\nincl : ∀ (n : ℕ), closedBall (c (n + 1)) (r (n + 1)) ⊆ closedBall (c n) (r n) ∩ f n\ncdist : ∀ (n : ℕ), edist (c n) (c (n + 1)) ≤ B n\nthis : CauchySeq c\ny : α\nylim : Tendsto c atTop (𝓝 y)\nI : ∀ (n m : ℕ), m ≥ n → closedBall (c m) (r m) ⊆ closedBall (c n) (r n)\nn : ℕ\n⊢ ∀ᶠ (x : ℕ) in atTop, c x ∈ closedBall (c n) (r n)\n[PROOFSTEP]\nrefine' (Filter.eventually_ge_atTop n).mono fun m hm => _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : CompleteSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\nB : ℕ → ℝ≥0∞ := fun n => 1 / 2 ^ n\nBpos : ∀ (n : ℕ), 0 < B n\ncenter : ℕ → α → ℝ≥0∞ → α\nradius : ℕ → α → ℝ≥0∞ → ℝ≥0∞\nHpos : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → 0 < radius n x δ\nHB : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → radius n x δ ≤ B (n + 1)\nHball : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → closedBall (center n x δ) (radius n x δ) ⊆ closedBall x δ ∩ f n\nx : α\nε : ℝ≥0∞\nεpos : 0 < ε\nF : ℕ → α × ℝ≥0∞ := fun n => Nat.recOn n (x, min ε (B 0)) fun n p => (center n p.fst p.snd, radius n p.fst p.snd)\nc : ℕ → α := fun n => (F n).fst\nr : ℕ → ℝ≥0∞ := fun n => (F n).snd\nrpos : ∀ (n : ℕ), 0 < r n\nr0 : ∀ (n : ℕ), r n ≠ 0\nrB : ∀ (n : ℕ), r n ≤ B n\nincl : ∀ (n : ℕ), closedBall (c (n + 1)) (r (n + 1)) ⊆ closedBall (c n) (r n) ∩ f n\ncdist : ∀ (n : ℕ), edist (c n) (c (n + 1)) ≤ B n\nthis : CauchySeq c\ny : α\nylim : Tendsto c atTop (𝓝 y)\nI : ∀ (n m : ℕ), m ≥ n → closedBall (c m) (r m) ⊆ closedBall (c n) (r n)\nn m : ℕ\nhm : n ≤ m\n⊢ c m ∈ closedBall (c n) (r n)\n[PROOFSTEP]\nexact I n m hm mem_closedBall_self\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : CompleteSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\nB : ℕ → ℝ≥0∞ := fun n => 1 / 2 ^ n\nBpos : ∀ (n : ℕ), 0 < B n\ncenter : ℕ → α → ℝ≥0∞ → α\nradius : ℕ → α → ℝ≥0∞ → ℝ≥0∞\nHpos : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → 0 < radius n x δ\nHB : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → radius n x δ ≤ B (n + 1)\nHball : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → closedBall (center n x δ) (radius n x δ) ⊆ closedBall x δ ∩ f n\nx : α\nε : ℝ≥0∞\nεpos : 0 < ε\nF : ℕ → α × ℝ≥0∞ := fun n => Nat.recOn n (x, min ε (B 0)) fun n p => (center n p.fst p.snd, radius n p.fst p.snd)\nc : ℕ → α := fun n => (F n).fst\nr : ℕ → ℝ≥0∞ := fun n => (F n).snd\nrpos : ∀ (n : ℕ), 0 < r n\nr0 : ∀ (n : ℕ), r n ≠ 0\nrB : ∀ (n : ℕ), r n ≤ B n\nincl : ∀ (n : ℕ), closedBall (c (n + 1)) (r (n + 1)) ⊆ closedBall (c n) (r n) ∩ f n\ncdist : ∀ (n : ℕ), edist (c n) (c (n + 1)) ≤ B n\nthis : CauchySeq c\ny : α\nylim : Tendsto c atTop (𝓝 y)\nI : ∀ (n m : ℕ), m ≥ n → closedBall (c m) (r m) ⊆ closedBall (c n) (r n)\nyball : ∀ (n : ℕ), y ∈ closedBall (c n) (r n)\n⊢ (∀ (i : ℕ), y ∈ f i) ∧ y ∈ closedBall x ε\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.left\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : CompleteSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\nB : ℕ → ℝ≥0∞ := fun n => 1 / 2 ^ n\nBpos : ∀ (n : ℕ), 0 < B n\ncenter : ℕ → α → ℝ≥0∞ → α\nradius : ℕ → α → ℝ≥0∞ → ℝ≥0∞\nHpos : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → 0 < radius n x δ\nHB : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → radius n x δ ≤ B (n + 1)\nHball : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → closedBall (center n x δ) (radius n x δ) ⊆ closedBall x δ ∩ f n\nx : α\nε : ℝ≥0∞\nεpos : 0 < ε\nF : ℕ → α × ℝ≥0∞ := fun n => Nat.recOn n (x, min ε (B 0)) fun n p => (center n p.fst p.snd, radius n p.fst p.snd)\nc : ℕ → α := fun n => (F n).fst\nr : ℕ → ℝ≥0∞ := fun n => (F n).snd\nrpos : ∀ (n : ℕ), 0 < r n\nr0 : ∀ (n : ℕ), r n ≠ 0\nrB : ∀ (n : ℕ), r n ≤ B n\nincl : ∀ (n : ℕ), closedBall (c (n + 1)) (r (n + 1)) ⊆ closedBall (c n) (r n) ∩ f n\ncdist : ∀ (n : ℕ), edist (c n) (c (n + 1)) ≤ B n\nthis : CauchySeq c\ny : α\nylim : Tendsto c atTop (𝓝 y)\nI : ∀ (n m : ℕ), m ≥ n → closedBall (c m) (r m) ⊆ closedBall (c n) (r n)\nyball : ∀ (n : ℕ), y ∈ closedBall (c n) (r n)\n⊢ ∀ (i : ℕ), y ∈ f i\ncase h.right\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : CompleteSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\nB : ℕ → ℝ≥0∞ := fun n => 1 / 2 ^ n\nBpos : ∀ (n : ℕ), 0 < B n\ncenter : ℕ → α → ℝ≥0∞ → α\nradius : ℕ → α → ℝ≥0∞ → ℝ≥0∞\nHpos : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → 0 < radius n x δ\nHB : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → radius n x δ ≤ B (n + 1)\nHball : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → closedBall (center n x δ) (radius n x δ) ⊆ closedBall x δ ∩ f n\nx : α\nε : ℝ≥0∞\nεpos : 0 < ε\nF : ℕ → α × ℝ≥0∞ := fun n => Nat.recOn n (x, min ε (B 0)) fun n p => (center n p.fst p.snd, radius n p.fst p.snd)\nc : ℕ → α := fun n => (F n).fst\nr : ℕ → ℝ≥0∞ := fun n => (F n).snd\nrpos : ∀ (n : ℕ), 0 < r n\nr0 : ∀ (n : ℕ), r n ≠ 0\nrB : ∀ (n : ℕ), r n ≤ B n\nincl : ∀ (n : ℕ), closedBall (c (n + 1)) (r (n + 1)) ⊆ closedBall (c n) (r n) ∩ f n\ncdist : ∀ (n : ℕ), edist (c n) (c (n + 1)) ≤ B n\nthis : CauchySeq c\ny : α\nylim : Tendsto c atTop (𝓝 y)\nI : ∀ (n m : ℕ), m ≥ n → closedBall (c m) (r m) ⊆ closedBall (c n) (r n)\nyball : ∀ (n : ℕ), y ∈ closedBall (c n) (r n)\n⊢ y ∈ closedBall x ε\n[PROOFSTEP]\nshow ∀ n, y ∈ f n\n[GOAL]\ncase h.left\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : CompleteSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\nB : ℕ → ℝ≥0∞ := fun n => 1 / 2 ^ n\nBpos : ∀ (n : ℕ), 0 < B n\ncenter : ℕ → α → ℝ≥0∞ → α\nradius : ℕ → α → ℝ≥0∞ → ℝ≥0∞\nHpos : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → 0 < radius n x δ\nHB : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → radius n x δ ≤ B (n + 1)\nHball : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → closedBall (center n x δ) (radius n x δ) ⊆ closedBall x δ ∩ f n\nx : α\nε : ℝ≥0∞\nεpos : 0 < ε\nF : ℕ → α × ℝ≥0∞ := fun n => Nat.recOn n (x, min ε (B 0)) fun n p => (center n p.fst p.snd, radius n p.fst p.snd)\nc : ℕ → α := fun n => (F n).fst\nr : ℕ → ℝ≥0∞ := fun n => (F n).snd\nrpos : ∀ (n : ℕ), 0 < r n\nr0 : ∀ (n : ℕ), r n ≠ 0\nrB : ∀ (n : ℕ), r n ≤ B n\nincl : ∀ (n : ℕ), closedBall (c (n + 1)) (r (n + 1)) ⊆ closedBall (c n) (r n) ∩ f n\ncdist : ∀ (n : ℕ), edist (c n) (c (n + 1)) ≤ B n\nthis : CauchySeq c\ny : α\nylim : Tendsto c atTop (𝓝 y)\nI : ∀ (n m : ℕ), m ≥ n → closedBall (c m) (r m) ⊆ closedBall (c n) (r n)\nyball : ∀ (n : ℕ), y ∈ closedBall (c n) (r n)\n⊢ ∀ (n : ℕ), y ∈ f n\n[PROOFSTEP]\nintro n\n[GOAL]\ncase h.left\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : CompleteSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\nB : ℕ → ℝ≥0∞ := fun n => 1 / 2 ^ n\nBpos : ∀ (n : ℕ), 0 < B n\ncenter : ℕ → α → ℝ≥0∞ → α\nradius : ℕ → α → ℝ≥0∞ → ℝ≥0∞\nHpos : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → 0 < radius n x δ\nHB : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → radius n x δ ≤ B (n + 1)\nHball : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → closedBall (center n x δ) (radius n x δ) ⊆ closedBall x δ ∩ f n\nx : α\nε : ℝ≥0∞\nεpos : 0 < ε\nF : ℕ → α × ℝ≥0∞ := fun n => Nat.recOn n (x, min ε (B 0)) fun n p => (center n p.fst p.snd, radius n p.fst p.snd)\nc : ℕ → α := fun n => (F n).fst\nr : ℕ → ℝ≥0∞ := fun n => (F n).snd\nrpos : ∀ (n : ℕ), 0 < r n\nr0 : ∀ (n : ℕ), r n ≠ 0\nrB : ∀ (n : ℕ), r n ≤ B n\nincl : ∀ (n : ℕ), closedBall (c (n + 1)) (r (n + 1)) ⊆ closedBall (c n) (r n) ∩ f n\ncdist : ∀ (n : ℕ), edist (c n) (c (n + 1)) ≤ B n\nthis : CauchySeq c\ny : α\nylim : Tendsto c atTop (𝓝 y)\nI : ∀ (n m : ℕ), m ≥ n → closedBall (c m) (r m) ⊆ closedBall (c n) (r n)\nyball : ∀ (n : ℕ), y ∈ closedBall (c n) (r n)\nn : ℕ\n⊢ y ∈ f n\n[PROOFSTEP]\nhave : closedBall (c (n + 1)) (r (n + 1)) ⊆ f n := Subset.trans (incl n) (inter_subset_right _ _)\n[GOAL]\ncase h.left\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : CompleteSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\nB : ℕ → ℝ≥0∞ := fun n => 1 / 2 ^ n\nBpos : ∀ (n : ℕ), 0 < B n\ncenter : ℕ → α → ℝ≥0∞ → α\nradius : ℕ → α → ℝ≥0∞ → ℝ≥0∞\nHpos : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → 0 < radius n x δ\nHB : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → radius n x δ ≤ B (n + 1)\nHball : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → closedBall (center n x δ) (radius n x δ) ⊆ closedBall x δ ∩ f n\nx : α\nε : ℝ≥0∞\nεpos : 0 < ε\nF : ℕ → α × ℝ≥0∞ := fun n => Nat.recOn n (x, min ε (B 0)) fun n p => (center n p.fst p.snd, radius n p.fst p.snd)\nc : ℕ → α := fun n => (F n).fst\nr : ℕ → ℝ≥0∞ := fun n => (F n).snd\nrpos : ∀ (n : ℕ), 0 < r n\nr0 : ∀ (n : ℕ), r n ≠ 0\nrB : ∀ (n : ℕ), r n ≤ B n\nincl : ∀ (n : ℕ), closedBall (c (n + 1)) (r (n + 1)) ⊆ closedBall (c n) (r n) ∩ f n\ncdist : ∀ (n : ℕ), edist (c n) (c (n + 1)) ≤ B n\nthis✝ : CauchySeq c\ny : α\nylim : Tendsto c atTop (𝓝 y)\nI : ∀ (n m : ℕ), m ≥ n → closedBall (c m) (r m) ⊆ closedBall (c n) (r n)\nyball : ∀ (n : ℕ), y ∈ closedBall (c n) (r n)\nn : ℕ\nthis : closedBall (c (n + 1)) (r (n + 1)) ⊆ f n\n⊢ y ∈ f n\n[PROOFSTEP]\nexact this (yball (n + 1))\n[GOAL]\ncase h.right\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : CompleteSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\nB : ℕ → ℝ≥0∞ := fun n => 1 / 2 ^ n\nBpos : ∀ (n : ℕ), 0 < B n\ncenter : ℕ → α → ℝ≥0∞ → α\nradius : ℕ → α → ℝ≥0∞ → ℝ≥0∞\nHpos : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → 0 < radius n x δ\nHB : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → radius n x δ ≤ B (n + 1)\nHball : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → closedBall (center n x δ) (radius n x δ) ⊆ closedBall x δ ∩ f n\nx : α\nε : ℝ≥0∞\nεpos : 0 < ε\nF : ℕ → α × ℝ≥0∞ := fun n => Nat.recOn n (x, min ε (B 0)) fun n p => (center n p.fst p.snd, radius n p.fst p.snd)\nc : ℕ → α := fun n => (F n).fst\nr : ℕ → ℝ≥0∞ := fun n => (F n).snd\nrpos : ∀ (n : ℕ), 0 < r n\nr0 : ∀ (n : ℕ), r n ≠ 0\nrB : ∀ (n : ℕ), r n ≤ B n\nincl : ∀ (n : ℕ), closedBall (c (n + 1)) (r (n + 1)) ⊆ closedBall (c n) (r n) ∩ f n\ncdist : ∀ (n : ℕ), edist (c n) (c (n + 1)) ≤ B n\nthis : CauchySeq c\ny : α\nylim : Tendsto c atTop (𝓝 y)\nI : ∀ (n m : ℕ), m ≥ n → closedBall (c m) (r m) ⊆ closedBall (c n) (r n)\nyball : ∀ (n : ℕ), y ∈ closedBall (c n) (r n)\n⊢ y ∈ closedBall x ε\n[PROOFSTEP]\nshow edist y x ≤ ε\n[GOAL]\ncase h.right\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : PseudoEMetricSpace α\ninst✝ : CompleteSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\nB : ℕ → ℝ≥0∞ := fun n => 1 / 2 ^ n\nBpos : ∀ (n : ℕ), 0 < B n\ncenter : ℕ → α → ℝ≥0∞ → α\nradius : ℕ → α → ℝ≥0∞ → ℝ≥0∞\nHpos : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → 0 < radius n x δ\nHB : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → radius n x δ ≤ B (n + 1)\nHball : ∀ (n : ℕ) (x : α) (δ : ℝ≥0∞), δ ≠ 0 → closedBall (center n x δ) (radius n x δ) ⊆ closedBall x δ ∩ f n\nx : α\nε : ℝ≥0∞\nεpos : 0 < ε\nF : ℕ → α × ℝ≥0∞ := fun n => Nat.recOn n (x, min ε (B 0)) fun n p => (center n p.fst p.snd, radius n p.fst p.snd)\nc : ℕ → α := fun n => (F n).fst\nr : ℕ → ℝ≥0∞ := fun n => (F n).snd\nrpos : ∀ (n : ℕ), 0 < r n\nr0 : ∀ (n : ℕ), r n ≠ 0\nrB : ∀ (n : ℕ), r n ≤ B n\nincl : ∀ (n : ℕ), closedBall (c (n + 1)) (r (n + 1)) ⊆ closedBall (c n) (r n) ∩ f n\ncdist : ∀ (n : ℕ), edist (c n) (c (n + 1)) ≤ B n\nthis : CauchySeq c\ny : α\nylim : Tendsto c atTop (𝓝 y)\nI : ∀ (n m : ℕ), m ≥ n → closedBall (c m) (r m) ⊆ closedBall (c n) (r n)\nyball : ∀ (n : ℕ), y ∈ closedBall (c n) (r n)\n⊢ edist y x ≤ ε\n[PROOFSTEP]\nexact le_trans (yball 0) (min_le_left _ _)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : T2Space α\ninst✝ : LocallyCompactSpace α\n⊢ BaireSpace α\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase baire_property\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : T2Space α\ninst✝ : LocallyCompactSpace α\n⊢ ∀ (f : ℕ → Set α), (∀ (n : ℕ), IsOpen (f n)) → (∀ (n : ℕ), Dense (f n)) → Dense (⋂ (n : ℕ), f n)\n[PROOFSTEP]\nintro f ho hd\n[GOAL]\ncase baire_property\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : T2Space α\ninst✝ : LocallyCompactSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\n⊢ Dense (⋂ (n : ℕ), f n)\n[PROOFSTEP]\napply dense_iff_inter_open.2\n[GOAL]\ncase baire_property\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : T2Space α\ninst✝ : LocallyCompactSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\n⊢ ∀ (U : Set α), IsOpen U → Set.Nonempty U → Set.Nonempty (U ∩ ⋂ (n : ℕ), f n)\n[PROOFSTEP]\nintro U U_open U_nonempty\n[GOAL]\ncase baire_property\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : T2Space α\ninst✝ : LocallyCompactSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\nU : Set α\nU_open : IsOpen U\nU_nonempty : Set.Nonempty U\n⊢ Set.Nonempty (U ∩ ⋂ (n : ℕ), f n)\n[PROOFSTEP]\nrcases exists_positiveCompacts_subset U_open U_nonempty with ⟨K₀, hK₀⟩\n[GOAL]\ncase baire_property.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : T2Space α\ninst✝ : LocallyCompactSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\nU : Set α\nU_open : IsOpen U\nU_nonempty : Set.Nonempty U\nK₀ : PositiveCompacts α\nhK₀ : ↑K₀ ⊆ U\n⊢ Set.Nonempty (U ∩ ⋂ (n : ℕ), f n)\n[PROOFSTEP]\nhave : ∀ (n) (K : PositiveCompacts α), ∃ K' : PositiveCompacts α, ↑K' ⊆ f n ∩ interior K :=\n  by\n  refine' fun n K => exists_positiveCompacts_subset ((ho n).inter isOpen_interior) _\n  rw [inter_comm]\n  exact (hd n).inter_open_nonempty _ isOpen_interior K.interior_nonempty\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : T2Space α\ninst✝ : LocallyCompactSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\nU : Set α\nU_open : IsOpen U\nU_nonempty : Set.Nonempty U\nK₀ : PositiveCompacts α\nhK₀ : ↑K₀ ⊆ U\n⊢ ∀ (n : ℕ) (K : PositiveCompacts α), ∃ K', ↑K' ⊆ f n ∩ interior ↑K\n[PROOFSTEP]\nrefine' fun n K => exists_positiveCompacts_subset ((ho n).inter isOpen_interior) _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : T2Space α\ninst✝ : LocallyCompactSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\nU : Set α\nU_open : IsOpen U\nU_nonempty : Set.Nonempty U\nK₀ : PositiveCompacts α\nhK₀ : ↑K₀ ⊆ U\nn : ℕ\nK : PositiveCompacts α\n⊢ Set.Nonempty (f n ∩ interior ↑K)\n[PROOFSTEP]\nrw [inter_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : T2Space α\ninst✝ : LocallyCompactSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\nU : Set α\nU_open : IsOpen U\nU_nonempty : Set.Nonempty U\nK₀ : PositiveCompacts α\nhK₀ : ↑K₀ ⊆ U\nn : ℕ\nK : PositiveCompacts α\n⊢ Set.Nonempty (interior ↑K ∩ f n)\n[PROOFSTEP]\nexact (hd n).inter_open_nonempty _ isOpen_interior K.interior_nonempty\n[GOAL]\ncase baire_property.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : T2Space α\ninst✝ : LocallyCompactSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\nU : Set α\nU_open : IsOpen U\nU_nonempty : Set.Nonempty U\nK₀ : PositiveCompacts α\nhK₀ : ↑K₀ ⊆ U\nthis : ∀ (n : ℕ) (K : PositiveCompacts α), ∃ K', ↑K' ⊆ f n ∩ interior ↑K\n⊢ Set.Nonempty (U ∩ ⋂ (n : ℕ), f n)\n[PROOFSTEP]\nchoose K_next hK_next using this\n[GOAL]\ncase baire_property.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : T2Space α\ninst✝ : LocallyCompactSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\nU : Set α\nU_open : IsOpen U\nU_nonempty : Set.Nonempty U\nK₀ : PositiveCompacts α\nhK₀ : ↑K₀ ⊆ U\nK_next : ℕ → PositiveCompacts α → PositiveCompacts α\nhK_next : ∀ (n : ℕ) (K : PositiveCompacts α), ↑(K_next n K) ⊆ f n ∩ interior ↑K\n⊢ Set.Nonempty (U ∩ ⋂ (n : ℕ), f n)\n[PROOFSTEP]\nlet K : ℕ → PositiveCompacts α := fun n => Nat.recOn n K₀ K_next\n[GOAL]\ncase baire_property.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : T2Space α\ninst✝ : LocallyCompactSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\nU : Set α\nU_open : IsOpen U\nU_nonempty : Set.Nonempty U\nK₀ : PositiveCompacts α\nhK₀ : ↑K₀ ⊆ U\nK_next : ℕ → PositiveCompacts α → PositiveCompacts α\nhK_next : ∀ (n : ℕ) (K : PositiveCompacts α), ↑(K_next n K) ⊆ f n ∩ interior ↑K\nK : ℕ → PositiveCompacts α := fun n => Nat.recOn n K₀ K_next\n⊢ Set.Nonempty (U ∩ ⋂ (n : ℕ), f n)\n[PROOFSTEP]\nhave hK_decreasing : ∀ n : ℕ, ((K (n + 1)).carrier) ⊆ (f n ∩ (K n).carrier) := fun n =>\n  (hK_next n (K n)).trans <| inter_subset_inter_right _ interior_subset\n[GOAL]\ncase baire_property.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : T2Space α\ninst✝ : LocallyCompactSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\nU : Set α\nU_open : IsOpen U\nU_nonempty : Set.Nonempty U\nK₀ : PositiveCompacts α\nhK₀ : ↑K₀ ⊆ U\nK_next : ℕ → PositiveCompacts α → PositiveCompacts α\nhK_next : ∀ (n : ℕ) (K : PositiveCompacts α), ↑(K_next n K) ⊆ f n ∩ interior ↑K\nK : ℕ → PositiveCompacts α := fun n => Nat.recOn n K₀ K_next\nhK_decreasing : ∀ (n : ℕ), (K (n + 1)).carrier ⊆ f n ∩ (K n).carrier\n⊢ Set.Nonempty (U ∩ ⋂ (n : ℕ), f n)\n[PROOFSTEP]\nhave hK_subset : (⋂ n, (K n).carrier : Set α) ⊆ U ∩ ⋂ n, f n :=\n  by\n  intro x hx\n  simp only [mem_iInter] at hx \n  simp only [mem_inter_iff, mem_inter] at hx ⊢\n  refine' ⟨hK₀ <| hx 0, _⟩\n  simp only [mem_iInter]\n  exact fun n =>\n    (hK_decreasing n (hx (n + 1))).1\n      /- Prove that `⋂ n : ℕ, K n` is not empty, as an intersection of a decreasing sequence\n          of nonempty compact subsets. -/\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : T2Space α\ninst✝ : LocallyCompactSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\nU : Set α\nU_open : IsOpen U\nU_nonempty : Set.Nonempty U\nK₀ : PositiveCompacts α\nhK₀ : ↑K₀ ⊆ U\nK_next : ℕ → PositiveCompacts α → PositiveCompacts α\nhK_next : ∀ (n : ℕ) (K : PositiveCompacts α), ↑(K_next n K) ⊆ f n ∩ interior ↑K\nK : ℕ → PositiveCompacts α := fun n => Nat.recOn n K₀ K_next\nhK_decreasing : ∀ (n : ℕ), (K (n + 1)).carrier ⊆ f n ∩ (K n).carrier\n⊢ ⋂ (n : ℕ), (K n).carrier ⊆ U ∩ ⋂ (n : ℕ), f n\n[PROOFSTEP]\nintro x hx\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : T2Space α\ninst✝ : LocallyCompactSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\nU : Set α\nU_open : IsOpen U\nU_nonempty : Set.Nonempty U\nK₀ : PositiveCompacts α\nhK₀ : ↑K₀ ⊆ U\nK_next : ℕ → PositiveCompacts α → PositiveCompacts α\nhK_next : ∀ (n : ℕ) (K : PositiveCompacts α), ↑(K_next n K) ⊆ f n ∩ interior ↑K\nK : ℕ → PositiveCompacts α := fun n => Nat.recOn n K₀ K_next\nhK_decreasing : ∀ (n : ℕ), (K (n + 1)).carrier ⊆ f n ∩ (K n).carrier\nx : α\nhx : x ∈ ⋂ (n : ℕ), (K n).carrier\n⊢ x ∈ U ∩ ⋂ (n : ℕ), f n\n[PROOFSTEP]\nsimp only [mem_iInter] at hx \n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : T2Space α\ninst✝ : LocallyCompactSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\nU : Set α\nU_open : IsOpen U\nU_nonempty : Set.Nonempty U\nK₀ : PositiveCompacts α\nhK₀ : ↑K₀ ⊆ U\nK_next : ℕ → PositiveCompacts α → PositiveCompacts α\nhK_next : ∀ (n : ℕ) (K : PositiveCompacts α), ↑(K_next n K) ⊆ f n ∩ interior ↑K\nK : ℕ → PositiveCompacts α := fun n => Nat.recOn n K₀ K_next\nhK_decreasing : ∀ (n : ℕ), (K (n + 1)).carrier ⊆ f n ∩ (K n).carrier\nx : α\nhx : ∀ (i : ℕ), x ∈ (Nat.rec K₀ K_next i).toCompacts.carrier\n⊢ x ∈ U ∩ ⋂ (n : ℕ), f n\n[PROOFSTEP]\nsimp only [mem_inter_iff, mem_inter] at hx ⊢\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : T2Space α\ninst✝ : LocallyCompactSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\nU : Set α\nU_open : IsOpen U\nU_nonempty : Set.Nonempty U\nK₀ : PositiveCompacts α\nhK₀ : ↑K₀ ⊆ U\nK_next : ℕ → PositiveCompacts α → PositiveCompacts α\nhK_next : ∀ (n : ℕ) (K : PositiveCompacts α), ↑(K_next n K) ⊆ f n ∩ interior ↑K\nK : ℕ → PositiveCompacts α := fun n => Nat.recOn n K₀ K_next\nhK_decreasing : ∀ (n : ℕ), (K (n + 1)).carrier ⊆ f n ∩ (K n).carrier\nx : α\nhx : ∀ (i : ℕ), x ∈ (Nat.rec K₀ K_next i).toCompacts.carrier\n⊢ x ∈ U ∧ x ∈ ⋂ (n : ℕ), f n\n[PROOFSTEP]\nrefine' ⟨hK₀ <| hx 0, _⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : T2Space α\ninst✝ : LocallyCompactSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\nU : Set α\nU_open : IsOpen U\nU_nonempty : Set.Nonempty U\nK₀ : PositiveCompacts α\nhK₀ : ↑K₀ ⊆ U\nK_next : ℕ → PositiveCompacts α → PositiveCompacts α\nhK_next : ∀ (n : ℕ) (K : PositiveCompacts α), ↑(K_next n K) ⊆ f n ∩ interior ↑K\nK : ℕ → PositiveCompacts α := fun n => Nat.recOn n K₀ K_next\nhK_decreasing : ∀ (n : ℕ), (K (n + 1)).carrier ⊆ f n ∩ (K n).carrier\nx : α\nhx : ∀ (i : ℕ), x ∈ (Nat.rec K₀ K_next i).toCompacts.carrier\n⊢ x ∈ ⋂ (n : ℕ), f n\n[PROOFSTEP]\nsimp only [mem_iInter]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : T2Space α\ninst✝ : LocallyCompactSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\nU : Set α\nU_open : IsOpen U\nU_nonempty : Set.Nonempty U\nK₀ : PositiveCompacts α\nhK₀ : ↑K₀ ⊆ U\nK_next : ℕ → PositiveCompacts α → PositiveCompacts α\nhK_next : ∀ (n : ℕ) (K : PositiveCompacts α), ↑(K_next n K) ⊆ f n ∩ interior ↑K\nK : ℕ → PositiveCompacts α := fun n => Nat.recOn n K₀ K_next\nhK_decreasing : ∀ (n : ℕ), (K (n + 1)).carrier ⊆ f n ∩ (K n).carrier\nx : α\nhx : ∀ (i : ℕ), x ∈ (Nat.rec K₀ K_next i).toCompacts.carrier\n⊢ ∀ (i : ℕ), x ∈ f i\n[PROOFSTEP]\nexact fun n =>\n  (hK_decreasing n (hx (n + 1))).1\n    /- Prove that `⋂ n : ℕ, K n` is not empty, as an intersection of a decreasing sequence\n        of nonempty compact subsets. -/\n[GOAL]\ncase baire_property.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : T2Space α\ninst✝ : LocallyCompactSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\nU : Set α\nU_open : IsOpen U\nU_nonempty : Set.Nonempty U\nK₀ : PositiveCompacts α\nhK₀ : ↑K₀ ⊆ U\nK_next : ℕ → PositiveCompacts α → PositiveCompacts α\nhK_next : ∀ (n : ℕ) (K : PositiveCompacts α), ↑(K_next n K) ⊆ f n ∩ interior ↑K\nK : ℕ → PositiveCompacts α := fun n => Nat.recOn n K₀ K_next\nhK_decreasing : ∀ (n : ℕ), (K (n + 1)).carrier ⊆ f n ∩ (K n).carrier\nhK_subset : ⋂ (n : ℕ), (K n).carrier ⊆ U ∩ ⋂ (n : ℕ), f n\n⊢ Set.Nonempty (U ∩ ⋂ (n : ℕ), f n)\n[PROOFSTEP]\nhave hK_nonempty : (⋂ n, (K n).carrier : Set α).Nonempty :=\n  IsCompact.nonempty_iInter_of_sequence_nonempty_compact_closed _\n    (fun n => (hK_decreasing n).trans (inter_subset_right _ _)) (fun n => (K n).nonempty) (K 0).isCompact fun n =>\n    (K n).isCompact.isClosed\n[GOAL]\ncase baire_property.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : T2Space α\ninst✝ : LocallyCompactSpace α\nf : ℕ → Set α\nho : ∀ (n : ℕ), IsOpen (f n)\nhd : ∀ (n : ℕ), Dense (f n)\nU : Set α\nU_open : IsOpen U\nU_nonempty : Set.Nonempty U\nK₀ : PositiveCompacts α\nhK₀ : ↑K₀ ⊆ U\nK_next : ℕ → PositiveCompacts α → PositiveCompacts α\nhK_next : ∀ (n : ℕ) (K : PositiveCompacts α), ↑(K_next n K) ⊆ f n ∩ interior ↑K\nK : ℕ → PositiveCompacts α := fun n => Nat.recOn n K₀ K_next\nhK_decreasing : ∀ (n : ℕ), (K (n + 1)).carrier ⊆ f n ∩ (K n).carrier\nhK_subset : ⋂ (n : ℕ), (K n).carrier ⊆ U ∩ ⋂ (n : ℕ), f n\nhK_nonempty : Set.Nonempty (⋂ (n : ℕ), (K n).carrier)\n⊢ Set.Nonempty (U ∩ ⋂ (n : ℕ), f n)\n[PROOFSTEP]\nexact hK_nonempty.mono hK_subset\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : TopologicalSpace α\ninst✝ : BaireSpace α\nS : Set (Set α)\nho : ∀ (s : Set α), s ∈ S → IsOpen s\nhS : Set.Countable S\nhd : ∀ (s : Set α), s ∈ S → Dense s\n⊢ Dense (⋂₀ S)\n[PROOFSTEP]\ncases' S.eq_empty_or_nonempty with h h\n[GOAL]\ncase inl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : TopologicalSpace α\ninst✝ : BaireSpace α\nS : Set (Set α)\nho : ∀ (s : Set α), s ∈ S → IsOpen s\nhS : Set.Countable S\nhd : ∀ (s : Set α), s ∈ S → Dense s\nh : S = ∅\n⊢ Dense (⋂₀ S)\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase inr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : TopologicalSpace α\ninst✝ : BaireSpace α\nS : Set (Set α)\nho : ∀ (s : Set α), s ∈ S → IsOpen s\nhS : Set.Countable S\nhd : ∀ (s : Set α), s ∈ S → Dense s\nh : Set.Nonempty S\n⊢ Dense (⋂₀ S)\n[PROOFSTEP]\nrcases hS.exists_eq_range h with ⟨f, hf⟩\n[GOAL]\ncase inr.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : TopologicalSpace α\ninst✝ : BaireSpace α\nS : Set (Set α)\nho : ∀ (s : Set α), s ∈ S → IsOpen s\nhS : Set.Countable S\nhd : ∀ (s : Set α), s ∈ S → Dense s\nh : Set.Nonempty S\nf : ℕ → Set α\nhf : S = range f\n⊢ Dense (⋂₀ S)\n[PROOFSTEP]\nhave F : ∀ n, f n ∈ S := fun n => by rw [hf]; exact mem_range_self _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : TopologicalSpace α\ninst✝ : BaireSpace α\nS : Set (Set α)\nho : ∀ (s : Set α), s ∈ S → IsOpen s\nhS : Set.Countable S\nhd : ∀ (s : Set α), s ∈ S → Dense s\nh : Set.Nonempty S\nf : ℕ → Set α\nhf : S = range f\nn : ℕ\n⊢ f n ∈ S\n[PROOFSTEP]\nrw [hf]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : TopologicalSpace α\ninst✝ : BaireSpace α\nS : Set (Set α)\nho : ∀ (s : Set α), s ∈ S → IsOpen s\nhS : Set.Countable S\nhd : ∀ (s : Set α), s ∈ S → Dense s\nh : Set.Nonempty S\nf : ℕ → Set α\nhf : S = range f\nn : ℕ\n⊢ f n ∈ range f\n[PROOFSTEP]\nexact mem_range_self _\n[GOAL]\ncase inr.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : TopologicalSpace α\ninst✝ : BaireSpace α\nS : Set (Set α)\nho : ∀ (s : Set α), s ∈ S → IsOpen s\nhS : Set.Countable S\nhd : ∀ (s : Set α), s ∈ S → Dense s\nh : Set.Nonempty S\nf : ℕ → Set α\nhf : S = range f\nF : ∀ (n : ℕ), f n ∈ S\n⊢ Dense (⋂₀ S)\n[PROOFSTEP]\nrw [hf, sInter_range]\n[GOAL]\ncase inr.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : TopologicalSpace α\ninst✝ : BaireSpace α\nS : Set (Set α)\nho : ∀ (s : Set α), s ∈ S → IsOpen s\nhS : Set.Countable S\nhd : ∀ (s : Set α), s ∈ S → Dense s\nh : Set.Nonempty S\nf : ℕ → Set α\nhf : S = range f\nF : ∀ (n : ℕ), f n ∈ S\n⊢ Dense (⋂ (x : ℕ), f x)\n[PROOFSTEP]\nexact dense_iInter_of_open_nat (fun n => ho _ (F n)) fun n => hd _ (F n)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : TopologicalSpace α\ninst✝ : BaireSpace α\nS : Set β\nf : β → Set α\nho : ∀ (s : β), s ∈ S → IsOpen (f s)\nhS : Set.Countable S\nhd : ∀ (s : β), s ∈ S → Dense (f s)\n⊢ Dense (⋂ (s : β) (_ : s ∈ S), f s)\n[PROOFSTEP]\nrw [← sInter_image]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : TopologicalSpace α\ninst✝ : BaireSpace α\nS : Set β\nf : β → Set α\nho : ∀ (s : β), s ∈ S → IsOpen (f s)\nhS : Set.Countable S\nhd : ∀ (s : β), s ∈ S → Dense (f s)\n⊢ Dense (⋂₀ ((fun s => f s) '' S))\n[PROOFSTEP]\napply dense_sInter_of_open\n[GOAL]\ncase ho\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : TopologicalSpace α\ninst✝ : BaireSpace α\nS : Set β\nf : β → Set α\nho : ∀ (s : β), s ∈ S → IsOpen (f s)\nhS : Set.Countable S\nhd : ∀ (s : β), s ∈ S → Dense (f s)\n⊢ ∀ (s : Set α), s ∈ (fun s => f s) '' S → IsOpen s\n[PROOFSTEP]\nrwa [ball_image_iff]\n[GOAL]\ncase hS\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : TopologicalSpace α\ninst✝ : BaireSpace α\nS : Set β\nf : β → Set α\nho : ∀ (s : β), s ∈ S → IsOpen (f s)\nhS : Set.Countable S\nhd : ∀ (s : β), s ∈ S → Dense (f s)\n⊢ Set.Countable ((fun s => f s) '' S)\n[PROOFSTEP]\nexact hS.image _\n[GOAL]\ncase hd\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : TopologicalSpace α\ninst✝ : BaireSpace α\nS : Set β\nf : β → Set α\nho : ∀ (s : β), s ∈ S → IsOpen (f s)\nhS : Set.Countable S\nhd : ∀ (s : β), s ∈ S → Dense (f s)\n⊢ ∀ (s : Set α), s ∈ (fun s => f s) '' S → Dense s\n[PROOFSTEP]\nrwa [ball_image_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : BaireSpace α\ninst✝ : Encodable β\nf : β → Set α\nho : ∀ (s : β), IsOpen (f s)\nhd : ∀ (s : β), Dense (f s)\n⊢ Dense (⋂ (s : β), f s)\n[PROOFSTEP]\nrw [← sInter_range]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : BaireSpace α\ninst✝ : Encodable β\nf : β → Set α\nho : ∀ (s : β), IsOpen (f s)\nhd : ∀ (s : β), Dense (f s)\n⊢ Dense (⋂₀ range fun s => f s)\n[PROOFSTEP]\napply dense_sInter_of_open\n[GOAL]\ncase ho\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : BaireSpace α\ninst✝ : Encodable β\nf : β → Set α\nho : ∀ (s : β), IsOpen (f s)\nhd : ∀ (s : β), Dense (f s)\n⊢ ∀ (s : Set α), (s ∈ range fun s => f s) → IsOpen s\n[PROOFSTEP]\nrwa [forall_range_iff]\n[GOAL]\ncase hS\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : BaireSpace α\ninst✝ : Encodable β\nf : β → Set α\nho : ∀ (s : β), IsOpen (f s)\nhd : ∀ (s : β), Dense (f s)\n⊢ Set.Countable (range fun s => f s)\n[PROOFSTEP]\nexact countable_range _\n[GOAL]\ncase hd\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : BaireSpace α\ninst✝ : Encodable β\nf : β → Set α\nho : ∀ (s : β), IsOpen (f s)\nhd : ∀ (s : β), Dense (f s)\n⊢ ∀ (s : Set α), (s ∈ range fun s => f s) → Dense s\n[PROOFSTEP]\nrwa [forall_range_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : TopologicalSpace α\ninst✝ : BaireSpace α\ns : Set α\n⊢ s ∈ residual α ↔ ∃ t x, IsGδ t ∧ Dense t\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : TopologicalSpace α\ninst✝ : BaireSpace α\ns : Set α\n⊢ s ∈ residual α → ∃ t x, IsGδ t ∧ Dense t\n[PROOFSTEP]\nrw [mem_residual_iff]\n[GOAL]\ncase mp\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : TopologicalSpace α\ninst✝ : BaireSpace α\ns : Set α\n⊢ (∃ S, (∀ (t : Set α), t ∈ S → IsOpen t) ∧ (∀ (t : Set α), t ∈ S → Dense t) ∧ Set.Countable S ∧ ⋂₀ S ⊆ s) →\n    ∃ t x, IsGδ t ∧ Dense t\n[PROOFSTEP]\nrintro ⟨S, hSo, hSd, Sct, Ss⟩\n[GOAL]\ncase mp.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : TopologicalSpace α\ninst✝ : BaireSpace α\ns : Set α\nS : Set (Set α)\nhSo : ∀ (t : Set α), t ∈ S → IsOpen t\nhSd : ∀ (t : Set α), t ∈ S → Dense t\nSct : Set.Countable S\nSs : ⋂₀ S ⊆ s\n⊢ ∃ t x, IsGδ t ∧ Dense t\n[PROOFSTEP]\nrefine' ⟨_, Ss, ⟨_, fun t ht => hSo _ ht, Sct, rfl⟩, _⟩\n[GOAL]\ncase mp.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : TopologicalSpace α\ninst✝ : BaireSpace α\ns : Set α\nS : Set (Set α)\nhSo : ∀ (t : Set α), t ∈ S → IsOpen t\nhSd : ∀ (t : Set α), t ∈ S → Dense t\nSct : Set.Countable S\nSs : ⋂₀ S ⊆ s\n⊢ Dense (⋂₀ S)\n[PROOFSTEP]\nexact dense_sInter_of_open hSo Sct hSd\n[GOAL]\ncase mpr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : TopologicalSpace α\ninst✝ : BaireSpace α\ns : Set α\n⊢ (∃ t x, IsGδ t ∧ Dense t) → s ∈ residual α\n[PROOFSTEP]\nrintro ⟨t, ts, ho, hd⟩\n[GOAL]\ncase mpr.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : TopologicalSpace α\ninst✝ : BaireSpace α\ns t : Set α\nts : t ⊆ s\nho : IsGδ t\nhd : Dense t\n⊢ s ∈ residual α\n[PROOFSTEP]\nexact mem_of_superset (residual_of_dense_Gδ ho hd) ts\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : TopologicalSpace α\ninst✝ : BaireSpace α\np : α → Prop\n⊢ (∀ᶠ (x : α) in residual α, p x) ↔ ∃ t, IsGδ t ∧ Dense t ∧ ∀ (x : α), x ∈ t → p x\n[PROOFSTEP]\nconvert @mem_residual _ _ _ p\n[GOAL]\ncase h.e'_2.h.e'_2.h.a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : TopologicalSpace α\ninst✝ : BaireSpace α\np : α → Prop\nx✝ : Set α\n⊢ (IsGδ x✝ ∧ Dense x✝ ∧ ∀ (x : α), x ∈ x✝ → p x) ↔ ∃ x, IsGδ x✝ ∧ Dense x✝\n[PROOFSTEP]\nsimp_rw [exists_prop, @and_comm ((_ : Set α) ⊆ p), and_assoc]\n[GOAL]\ncase h.e'_2.h.e'_2.h.a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : TopologicalSpace α\ninst✝ : BaireSpace α\np : α → Prop\nx✝ : Set α\n⊢ (IsGδ x✝ ∧ Dense x✝ ∧ ∀ (x : α), x ∈ x✝ → p x) ↔ IsGδ x✝ ∧ Dense x✝ ∧ x✝ ⊆ p\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : BaireSpace α\ninst✝ : Encodable β\nf : β → Set α\nho : ∀ (s : β), IsGδ (f s)\nhd : ∀ (s : β), Dense (f s)\n⊢ Dense (⋂ (s : β), f s)\n[PROOFSTEP]\nrw [← sInter_range]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : BaireSpace α\ninst✝ : Encodable β\nf : β → Set α\nho : ∀ (s : β), IsGδ (f s)\nhd : ∀ (s : β), Dense (f s)\n⊢ Dense (⋂₀ range fun s => f s)\n[PROOFSTEP]\nexact dense_sInter_of_Gδ (forall_range_iff.2 ‹_›) (countable_range _) (forall_range_iff.2 ‹_›)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : TopologicalSpace α\ninst✝ : BaireSpace α\nS : Set β\nf : (x : β) → x ∈ S → Set α\nho : ∀ (s : β) (H : s ∈ S), IsGδ (f s H)\nhS : Set.Countable S\nhd : ∀ (s : β) (H : s ∈ S), Dense (f s H)\n⊢ Dense (⋂ (s : β) (h : s ∈ S), f s h)\n[PROOFSTEP]\nrw [biInter_eq_iInter]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : TopologicalSpace α\ninst✝ : BaireSpace α\nS : Set β\nf : (x : β) → x ∈ S → Set α\nho : ∀ (s : β) (H : s ∈ S), IsGδ (f s H)\nhS : Set.Countable S\nhd : ∀ (s : β) (H : s ∈ S), Dense (f s H)\n⊢ Dense (⋂ (x : ↑S), f ↑x (_ : ↑x ∈ S))\n[PROOFSTEP]\nhaveI := hS.toEncodable\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : TopologicalSpace α\ninst✝ : BaireSpace α\nS : Set β\nf : (x : β) → x ∈ S → Set α\nho : ∀ (s : β) (H : s ∈ S), IsGδ (f s H)\nhS : Set.Countable S\nhd : ∀ (s : β) (H : s ∈ S), Dense (f s H)\nthis : Encodable ↑S\n⊢ Dense (⋂ (x : ↑S), f ↑x (_ : ↑x ∈ S))\n[PROOFSTEP]\nexact dense_iInter_of_Gδ (fun s => ho s s.2) fun s => hd s s.2\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : TopologicalSpace α\ninst✝ : BaireSpace α\ns t : Set α\nhs : IsGδ s\nht : IsGδ t\nhsc : Dense s\nhtc : Dense t\n⊢ Dense (s ∩ t)\n[PROOFSTEP]\nrw [inter_eq_iInter]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : TopologicalSpace α\ninst✝ : BaireSpace α\ns t : Set α\nhs : IsGδ s\nht : IsGδ t\nhsc : Dense s\nhtc : Dense t\n⊢ Dense (⋂ (b : Bool), bif b then s else t)\n[PROOFSTEP]\napply dense_iInter_of_Gδ\n[GOAL]\ncase ho\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : TopologicalSpace α\ninst✝ : BaireSpace α\ns t : Set α\nhs : IsGδ s\nht : IsGδ t\nhsc : Dense s\nhtc : Dense t\n⊢ ∀ (s_1 : Bool), IsGδ (bif s_1 then s else t)\n[PROOFSTEP]\nsimp [Bool.forall_bool, *]\n[GOAL]\ncase hd\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : TopologicalSpace α\ninst✝ : BaireSpace α\ns t : Set α\nhs : IsGδ s\nht : IsGδ t\nhsc : Dense s\nhtc : Dense t\n⊢ ∀ (s_1 : Bool), Dense (bif s_1 then s else t)\n[PROOFSTEP]\nsimp [Bool.forall_bool, *]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : BaireSpace α\ninst✝ : Encodable ι\ns : Set α\nhs : IsGδ s\nhd : Dense s\nf : ι → Set α\nhc : ∀ (i : ι), IsClosed (f i)\nhU : s ⊆ ⋃ (i : ι), f i\n⊢ Dense (⋃ (i : ι), interior (f i))\n[PROOFSTEP]\nlet g i := (frontier (f i))ᶜ\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : BaireSpace α\ninst✝ : Encodable ι\ns : Set α\nhs : IsGδ s\nhd : Dense s\nf : ι → Set α\nhc : ∀ (i : ι), IsClosed (f i)\nhU : s ⊆ ⋃ (i : ι), f i\ng : ι → Set α := fun i => (frontier (f i))ᶜ\n⊢ Dense (⋃ (i : ι), interior (f i))\n[PROOFSTEP]\nhave hgo : ∀ i, IsOpen (g i) := fun i => isClosed_frontier.isOpen_compl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : BaireSpace α\ninst✝ : Encodable ι\ns : Set α\nhs : IsGδ s\nhd : Dense s\nf : ι → Set α\nhc : ∀ (i : ι), IsClosed (f i)\nhU : s ⊆ ⋃ (i : ι), f i\ng : ι → Set α := fun i => (frontier (f i))ᶜ\nhgo : ∀ (i : ι), IsOpen (g i)\n⊢ Dense (⋃ (i : ι), interior (f i))\n[PROOFSTEP]\nhave hgd : Dense (⋂ i, g i) := by\n  refine' dense_iInter_of_open hgo fun i x => _\n  rw [closure_compl, interior_frontier (hc _)]\n  exact id\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : BaireSpace α\ninst✝ : Encodable ι\ns : Set α\nhs : IsGδ s\nhd : Dense s\nf : ι → Set α\nhc : ∀ (i : ι), IsClosed (f i)\nhU : s ⊆ ⋃ (i : ι), f i\ng : ι → Set α := fun i => (frontier (f i))ᶜ\nhgo : ∀ (i : ι), IsOpen (g i)\n⊢ Dense (⋂ (i : ι), g i)\n[PROOFSTEP]\nrefine' dense_iInter_of_open hgo fun i x => _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : BaireSpace α\ninst✝ : Encodable ι\ns : Set α\nhs : IsGδ s\nhd : Dense s\nf : ι → Set α\nhc : ∀ (i : ι), IsClosed (f i)\nhU : s ⊆ ⋃ (i : ι), f i\ng : ι → Set α := fun i => (frontier (f i))ᶜ\nhgo : ∀ (i : ι), IsOpen (g i)\ni : ι\nx : α\n⊢ x ∈ closure (g i)\n[PROOFSTEP]\nrw [closure_compl, interior_frontier (hc _)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : BaireSpace α\ninst✝ : Encodable ι\ns : Set α\nhs : IsGδ s\nhd : Dense s\nf : ι → Set α\nhc : ∀ (i : ι), IsClosed (f i)\nhU : s ⊆ ⋃ (i : ι), f i\ng : ι → Set α := fun i => (frontier (f i))ᶜ\nhgo : ∀ (i : ι), IsOpen (g i)\ni : ι\nx : α\n⊢ x ∈ ∅ᶜ\n[PROOFSTEP]\nexact id\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : BaireSpace α\ninst✝ : Encodable ι\ns : Set α\nhs : IsGδ s\nhd : Dense s\nf : ι → Set α\nhc : ∀ (i : ι), IsClosed (f i)\nhU : s ⊆ ⋃ (i : ι), f i\ng : ι → Set α := fun i => (frontier (f i))ᶜ\nhgo : ∀ (i : ι), IsOpen (g i)\nhgd : Dense (⋂ (i : ι), g i)\n⊢ Dense (⋃ (i : ι), interior (f i))\n[PROOFSTEP]\nrefine' (hd.inter_of_Gδ hs (isGδ_iInter_of_open fun i => (hgo i)) hgd).mono _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : BaireSpace α\ninst✝ : Encodable ι\ns : Set α\nhs : IsGδ s\nhd : Dense s\nf : ι → Set α\nhc : ∀ (i : ι), IsClosed (f i)\nhU : s ⊆ ⋃ (i : ι), f i\ng : ι → Set α := fun i => (frontier (f i))ᶜ\nhgo : ∀ (i : ι), IsOpen (g i)\nhgd : Dense (⋂ (i : ι), g i)\n⊢ s ∩ ⋂ (i : ι), g i ⊆ ⋃ (i : ι), interior (f i)\n[PROOFSTEP]\nrintro x ⟨hxs, hxg⟩\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : BaireSpace α\ninst✝ : Encodable ι\ns : Set α\nhs : IsGδ s\nhd : Dense s\nf : ι → Set α\nhc : ∀ (i : ι), IsClosed (f i)\nhU : s ⊆ ⋃ (i : ι), f i\ng : ι → Set α := fun i => (frontier (f i))ᶜ\nhgo : ∀ (i : ι), IsOpen (g i)\nhgd : Dense (⋂ (i : ι), g i)\nx : α\nhxs : x ∈ s\nhxg : x ∈ ⋂ (i : ι), g i\n⊢ x ∈ ⋃ (i : ι), interior (f i)\n[PROOFSTEP]\nrw [mem_iInter] at hxg \n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : BaireSpace α\ninst✝ : Encodable ι\ns : Set α\nhs : IsGδ s\nhd : Dense s\nf : ι → Set α\nhc : ∀ (i : ι), IsClosed (f i)\nhU : s ⊆ ⋃ (i : ι), f i\ng : ι → Set α := fun i => (frontier (f i))ᶜ\nhgo : ∀ (i : ι), IsOpen (g i)\nhgd : Dense (⋂ (i : ι), g i)\nx : α\nhxs : x ∈ s\nhxg : ∀ (i : ι), x ∈ g i\n⊢ x ∈ ⋃ (i : ι), interior (f i)\n[PROOFSTEP]\nrcases mem_iUnion.1 (hU hxs) with ⟨i, hi⟩\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝² : TopologicalSpace α\ninst✝¹ : BaireSpace α\ninst✝ : Encodable ι\ns : Set α\nhs : IsGδ s\nhd : Dense s\nf : ι → Set α\nhc : ∀ (i : ι), IsClosed (f i)\nhU : s ⊆ ⋃ (i : ι), f i\ng : ι → Set α := fun i => (frontier (f i))ᶜ\nhgo : ∀ (i : ι), IsOpen (g i)\nhgd : Dense (⋂ (i : ι), g i)\nx : α\nhxs : x ∈ s\nhxg : ∀ (i : ι), x ∈ g i\ni : ι\nhi : x ∈ f i\n⊢ x ∈ ⋃ (i : ι), interior (f i)\n[PROOFSTEP]\nexact mem_iUnion.2 ⟨i, self_diff_frontier (f i) ▸ ⟨hi, hxg _⟩⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : TopologicalSpace α\ninst✝ : BaireSpace α\nt : Set ι\ns : Set α\nhs : IsGδ s\nhd : Dense s\nht : Set.Countable t\nf : ι → Set α\nhc : ∀ (i : ι), i ∈ t → IsClosed (f i)\nhU : s ⊆ ⋃ (i : ι) (_ : i ∈ t), f i\n⊢ Dense (⋃ (i : ι) (_ : i ∈ t), interior (f i))\n[PROOFSTEP]\nhaveI := ht.toEncodable\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : TopologicalSpace α\ninst✝ : BaireSpace α\nt : Set ι\ns : Set α\nhs : IsGδ s\nhd : Dense s\nht : Set.Countable t\nf : ι → Set α\nhc : ∀ (i : ι), i ∈ t → IsClosed (f i)\nhU : s ⊆ ⋃ (i : ι) (_ : i ∈ t), f i\nthis : Encodable ↑t\n⊢ Dense (⋃ (i : ι) (_ : i ∈ t), interior (f i))\n[PROOFSTEP]\nsimp only [biUnion_eq_iUnion, SetCoe.forall'] at *\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : TopologicalSpace α\ninst✝ : BaireSpace α\nt : Set ι\ns : Set α\nhs : IsGδ s\nhd : Dense s\nht : Set.Countable t\nf : ι → Set α\nthis : Encodable ↑t\nhc : ∀ (x : ↑t), IsClosed (f ↑x)\nhU : s ⊆ ⋃ (x : ↑t), f ↑x\n⊢ Dense (⋃ (x : ↑t), interior (f ↑x))\n[PROOFSTEP]\nexact hs.dense_iUnion_interior_of_closed hd hc hU\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝¹ : TopologicalSpace α\ninst✝ : BaireSpace α\nT : Set (Set α)\ns : Set α\nhs : IsGδ s\nhd : Dense s\nhc : Set.Countable T\nhc' : ∀ (t : Set α), t ∈ T → IsClosed t\nhU : s ⊆ ⋃₀ T\n⊢ s ⊆ ⋃ (i : Set α) (_ : i ∈ T), i\n[PROOFSTEP]\nrwa [← sUnion_eq_biUnion]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : BaireSpace α\ninst✝¹ : Nonempty α\ninst✝ : Encodable β\nf : β → Set α\nhc : ∀ (s : β), IsClosed (f s)\nhU : ⋃ (s : β), f s = univ\n⊢ ∃ s, Set.Nonempty (interior (f s))\n[PROOFSTEP]\nsimpa using (dense_iUnion_interior_of_closed hc hU).nonempty\n", "meta": {"mathlib_filename": "Mathlib.Topology.MetricSpace.Baire", "llama_tokens": 53012, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.831143031127974, "lm_q2_score": 0.6297745935070806, "lm_q1q2_score": 0.5234327645748628}}
{"text": "[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\na a₁ a₂ b c : G\ninst✝¹ : Group G\ninst✝ : AddGroup A\ns : Set G\nhs : IsSubgroup s\nx y : G\nhx : x ∈ s\nhy : y ∈ s\n⊢ x / y ∈ s\n[PROOFSTEP]\nsimpa only [div_eq_mul_inv] using hs.mul_mem hx (hs.inv_mem hy)\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\na a₁ a₂ b c : G\ninst✝¹ : Group G\ninst✝ : AddGroup A\ns : Set G\n⊢ IsAddSubgroup s → IsSubgroup s\n[PROOFSTEP]\nrintro ⟨⟨h₁, h₂⟩, h₃⟩\n[GOAL]\ncase mk.mk\nG : Type u_1\nH : Type u_2\nA : Type u_3\na a₁ a₂ b c : G\ninst✝¹ : Group G\ninst✝ : AddGroup A\ns : Set G\nh₃ : ∀ {a : Additive G}, a ∈ s → -a ∈ s\nh₁ : 0 ∈ s\nh₂ : ∀ {a b : Additive G}, a ∈ s → b ∈ s → a + b ∈ s\n⊢ IsSubgroup s\n[PROOFSTEP]\nexact @IsSubgroup.mk G _ _ ⟨h₁, @h₂⟩ @h₃\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\na a₁ a₂ b c : G\ninst✝¹ : Group G\ninst✝ : AddGroup A\ns : Set A\n⊢ IsSubgroup s → IsAddSubgroup s\n[PROOFSTEP]\nrintro ⟨⟨h₁, h₂⟩, h₃⟩\n[GOAL]\ncase mk.mk\nG : Type u_1\nH : Type u_2\nA : Type u_3\na a₁ a₂ b c : G\ninst✝¹ : Group G\ninst✝ : AddGroup A\ns : Set A\nh₃ : ∀ {a : Multiplicative A}, a ∈ s → a⁻¹ ∈ s\nh₁ : 1 ∈ s\nh₂ : ∀ {a b : Multiplicative A}, a ∈ s → b ∈ s → a * b ∈ s\n⊢ IsAddSubgroup s\n[PROOFSTEP]\nexact @IsAddSubgroup.mk A _ _ ⟨h₁, @h₂⟩ @h₃\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\na✝ a₁ a₂ b c : G\ninst✝¹ : Group G\ninst✝ : AddGroup A\ns : Set G\none_mem : 1 ∈ s\ndiv_mem : ∀ {a b : G}, a ∈ s → b ∈ s → a * b⁻¹ ∈ s\na : G\nha : a ∈ s\n⊢ a⁻¹ ∈ s\n[PROOFSTEP]\nhave : 1 * a⁻¹ ∈ s := div_mem one_mem ha\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\na✝ a₁ a₂ b c : G\ninst✝¹ : Group G\ninst✝ : AddGroup A\ns : Set G\none_mem : 1 ∈ s\ndiv_mem : ∀ {a b : G}, a ∈ s → b ∈ s → a * b⁻¹ ∈ s\na : G\nha : a ∈ s\nthis : 1 * a⁻¹ ∈ s\n⊢ a⁻¹ ∈ s\n[PROOFSTEP]\nconvert this using 1\n[GOAL]\ncase h.e'_4\nG : Type u_1\nH : Type u_2\nA : Type u_3\na✝ a₁ a₂ b c : G\ninst✝¹ : Group G\ninst✝ : AddGroup A\ns : Set G\none_mem : 1 ∈ s\ndiv_mem : ∀ {a b : G}, a ∈ s → b ∈ s → a * b⁻¹ ∈ s\na : G\nha : a ∈ s\nthis : 1 * a⁻¹ ∈ s\n⊢ a⁻¹ = 1 * a⁻¹\n[PROOFSTEP]\nrw [one_mul]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\na✝ a₁ a₂ b✝ c : G\ninst✝¹ : Group G\ninst✝ : AddGroup A\ns : Set G\none_mem : 1 ∈ s\ndiv_mem : ∀ {a b : G}, a ∈ s → b ∈ s → a * b⁻¹ ∈ s\ninv_mem : ∀ (a : G), a ∈ s → a⁻¹ ∈ s\na b : G\nha : a ∈ s\nhb : b ∈ s\n⊢ a * b ∈ s\n[PROOFSTEP]\nhave : a * b⁻¹⁻¹ ∈ s := div_mem ha (inv_mem b hb)\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\na✝ a₁ a₂ b✝ c : G\ninst✝¹ : Group G\ninst✝ : AddGroup A\ns : Set G\none_mem : 1 ∈ s\ndiv_mem : ∀ {a b : G}, a ∈ s → b ∈ s → a * b⁻¹ ∈ s\ninv_mem : ∀ (a : G), a ∈ s → a⁻¹ ∈ s\na b : G\nha : a ∈ s\nhb : b ∈ s\nthis : a * b⁻¹⁻¹ ∈ s\n⊢ a * b ∈ s\n[PROOFSTEP]\nconvert this\n[GOAL]\ncase h.e'_4.h.e'_6\nG : Type u_1\nH : Type u_2\nA : Type u_3\na✝ a₁ a₂ b✝ c : G\ninst✝¹ : Group G\ninst✝ : AddGroup A\ns : Set G\none_mem : 1 ∈ s\ndiv_mem : ∀ {a b : G}, a ∈ s → b ∈ s → a * b⁻¹ ∈ s\ninv_mem : ∀ (a : G), a ∈ s → a⁻¹ ∈ s\na b : G\nha : a ∈ s\nhb : b ∈ s\nthis : a * b⁻¹⁻¹ ∈ s\n⊢ b = b⁻¹⁻¹\n[PROOFSTEP]\nrw [inv_inv]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\na a₁ a₂ b c : G\ninst✝¹ : Group G\ninst✝ : AddGroup A\ns : Set A\nzero_mem : 0 ∈ s\nsub_mem : ∀ {a b : A}, a ∈ s → b ∈ s → a - b ∈ s\nx y : A\nhx : x ∈ s\nhy : y ∈ s\n⊢ x + -y ∈ s\n[PROOFSTEP]\nsimpa only [sub_eq_add_neg] using sub_mem hx hy\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\na a₁ a₂ b c : G\ninst✝ : Group G\ns : Set G\nhs : IsSubgroup s\nh : a⁻¹ ∈ s\n⊢ a ∈ s\n[PROOFSTEP]\nsimpa using hs.inv_mem h\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\na a₁ a₂ b c : G\ninst✝ : Group G\ns : Set G\nhs : IsSubgroup s\nh : a ∈ s\nhba : b * a ∈ s\n⊢ b ∈ s\n[PROOFSTEP]\nsimpa using hs.mul_mem hba (hs.inv_mem h)\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\na a₁ a₂ b c : G\ninst✝ : Group G\ns : Set G\nhs : IsSubgroup s\nh : a ∈ s\nhab : a * b ∈ s\n⊢ b ∈ s\n[PROOFSTEP]\nsimpa using hs.mul_mem (hs.inv_mem h) hab\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\na a₁ a₂ b c : G\ninst✝ : CommGroup G\ns : Set G\nhs : IsSubgroup s\nn : G\nhn : n ∈ s\ng : G\n⊢ g * n * g⁻¹ ∈ s\n[PROOFSTEP]\nrwa [mul_right_comm, mul_right_inv, one_mul]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\na a₁ a₂ b c : G\ninst✝ : Group G\ns : Set G\n⊢ IsNormalAddSubgroup s → IsNormalSubgroup s\n[PROOFSTEP]\nrintro ⟨h₁, h₂⟩\n[GOAL]\ncase mk\nG : Type u_1\nH : Type u_2\nA : Type u_3\na a₁ a₂ b c : G\ninst✝ : Group G\ns : Set G\nh₁ : IsAddSubgroup s\nh₂ : ∀ (n : Additive G), n ∈ s → ∀ (g : Additive G), g + n + -g ∈ s\n⊢ IsNormalSubgroup s\n[PROOFSTEP]\nexact @IsNormalSubgroup.mk G _ _ (Additive.isAddSubgroup_iff.1 h₁) @h₂\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\na a₁ a₂ b c : G\ninst✝ : AddGroup A\ns : Set A\n⊢ IsNormalSubgroup s → IsNormalAddSubgroup s\n[PROOFSTEP]\nrintro ⟨h₁, h₂⟩\n[GOAL]\ncase mk\nG : Type u_1\nH : Type u_2\nA : Type u_3\na a₁ a₂ b c : G\ninst✝ : AddGroup A\ns : Set A\nh₁ : IsSubgroup s\nh₂ : ∀ (n : Multiplicative A), n ∈ s → ∀ (g : Multiplicative A), g * n * g⁻¹ ∈ s\n⊢ IsNormalAddSubgroup s\n[PROOFSTEP]\nexact @IsNormalAddSubgroup.mk A _ _ (Multiplicative.isSubgroup_iff.1 h₁) @h₂\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\na✝ a₁ a₂ b✝ c : G\ninst✝ : Group G\ns : Set G\nhs : IsNormalSubgroup s\na b : G\nhab : a * b ∈ s\n⊢ b * a ∈ s\n[PROOFSTEP]\nhave h : a⁻¹ * (a * b) * a⁻¹⁻¹ ∈ s := hs.normal (a * b) hab a⁻¹\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\na✝ a₁ a₂ b✝ c : G\ninst✝ : Group G\ns : Set G\nhs : IsNormalSubgroup s\na b : G\nhab : a * b ∈ s\nh : a⁻¹ * (a * b) * a⁻¹⁻¹ ∈ s\n⊢ b * a ∈ s\n[PROOFSTEP]\nsimp at h \n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\na✝ a₁ a₂ b✝ c : G\ninst✝ : Group G\ns : Set G\nhs : IsNormalSubgroup s\na b : G\nhab : a * b ∈ s\nh : b * a ∈ s\n⊢ b * a ∈ s\n[PROOFSTEP]\nexact h\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\na a₁ a₂ b c : G\ninst✝ : Group G\n⊢ IsNormalSubgroup (trivial G)\n[PROOFSTEP]\nrefine' { .. }\n[GOAL]\ncase refine'_1\nG : Type u_1\nH : Type u_2\nA : Type u_3\na a₁ a₂ b c : G\ninst✝ : Group G\n⊢ 1 ∈ trivial G\n[PROOFSTEP]\nsimp (config := { contextual := true }) [trivial]\n[GOAL]\ncase refine'_2\nG : Type u_1\nH : Type u_2\nA : Type u_3\na a₁ a₂ b c : G\ninst✝ : Group G\n⊢ ∀ {a b : G}, a ∈ trivial G → b ∈ trivial G → a * b ∈ trivial G\n[PROOFSTEP]\nsimp (config := { contextual := true }) [trivial]\n[GOAL]\ncase refine'_3\nG : Type u_1\nH : Type u_2\nA : Type u_3\na a₁ a₂ b c : G\ninst✝ : Group G\n⊢ ∀ {a : G}, a ∈ trivial G → a⁻¹ ∈ trivial G\n[PROOFSTEP]\nsimp (config := { contextual := true }) [trivial]\n[GOAL]\ncase refine'_4\nG : Type u_1\nH : Type u_2\nA : Type u_3\na a₁ a₂ b c : G\ninst✝ : Group G\n⊢ ∀ (n : G), n ∈ trivial G → ∀ (g : G), g * n * g⁻¹ ∈ trivial G\n[PROOFSTEP]\nsimp (config := { contextual := true }) [trivial]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\na a₁ a₂ b c : G\ninst✝ : Group G\ns : Set G\nhs : IsSubgroup s\n⊢ s = trivial G ↔ ∀ (x : G), x ∈ s → x = 1\n[PROOFSTEP]\nsimp only [Set.ext_iff, IsSubgroup.mem_trivial]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\na a₁ a₂ b c : G\ninst✝ : Group G\ns : Set G\nhs : IsSubgroup s\n⊢ (∀ (x : G), x ∈ s ↔ x = 1) ↔ ∀ (x : G), x ∈ s → x = 1\n[PROOFSTEP]\nexact ⟨fun h x => (h x).1, fun h x => ⟨h x, fun hx => hx.symm ▸ hs.toIsSubmonoid.one_mem⟩⟩\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\na a₁ a₂ b c : G\ninst✝ : Group G\n⊢ IsNormalSubgroup univ\n[PROOFSTEP]\nrefine' { .. }\n[GOAL]\ncase refine'_1\nG : Type u_1\nH : Type u_2\nA : Type u_3\na a₁ a₂ b c : G\ninst✝ : Group G\n⊢ 1 ∈ univ\n[PROOFSTEP]\nsimp\n[GOAL]\ncase refine'_2\nG : Type u_1\nH : Type u_2\nA : Type u_3\na a₁ a₂ b c : G\ninst✝ : Group G\n⊢ ∀ {a b : G}, a ∈ univ → b ∈ univ → a * b ∈ univ\n[PROOFSTEP]\nsimp\n[GOAL]\ncase refine'_3\nG : Type u_1\nH : Type u_2\nA : Type u_3\na a₁ a₂ b c : G\ninst✝ : Group G\n⊢ ∀ {a : G}, a ∈ univ → a⁻¹ ∈ univ\n[PROOFSTEP]\nsimp\n[GOAL]\ncase refine'_4\nG : Type u_1\nH : Type u_2\nA : Type u_3\na a₁ a₂ b c : G\ninst✝ : Group G\n⊢ ∀ (n : G), n ∈ univ → ∀ (g : G), g * n * g⁻¹ ∈ univ\n[PROOFSTEP]\nsimp\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\na a₁ a₂ b c : G\ninst✝ : Group G\n⊢ 1 ∈ center G\n[PROOFSTEP]\nsimp [center]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\na a₁ a₂ b c : G\ninst✝ : Group G\na✝ b✝ : G\nha : a✝ ∈ center G\nhb : b✝ ∈ center G\ng : G\n⊢ g * (a✝ * b✝) = a✝ * b✝ * g\n[PROOFSTEP]\nrw [← mul_assoc, mem_center.2 ha g, mul_assoc, mem_center.2 hb g, ← mul_assoc]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\na✝ a₁ a₂ b c : G\ninst✝ : Group G\na : G\nha : a ∈ center G\ng : G\n⊢ g * a⁻¹ = a⁻¹ * (g * a) * a⁻¹\n[PROOFSTEP]\nsimp [ha g]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\na✝ a₁ a₂ b c : G\ninst✝ : Group G\na : G\nha : a ∈ center G\ng : G\n⊢ a⁻¹ * (g * a) * a⁻¹ = a⁻¹ * g\n[PROOFSTEP]\nrw [← mul_assoc, mul_assoc]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\na✝ a₁ a₂ b c : G\ninst✝ : Group G\na : G\nha : a ∈ center G\ng : G\n⊢ a⁻¹ * g * (a * a⁻¹) = a⁻¹ * g\n[PROOFSTEP]\nsimp\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\na a₁ a₂ b c : G\ninst✝ : Group G\nn : G\nha : n ∈ center G\ng h : G\n⊢ h * (g * n * g⁻¹) = h * n\n[PROOFSTEP]\nsimp [ha g, mul_assoc]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\na a₁ a₂ b c : G\ninst✝ : Group G\nn : G\nha : n ∈ center G\ng h : G\n⊢ h * n = g * g⁻¹ * n * h\n[PROOFSTEP]\nrw [ha h]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\na a₁ a₂ b c : G\ninst✝ : Group G\nn : G\nha : n ∈ center G\ng h : G\n⊢ n * h = g * g⁻¹ * n * h\n[PROOFSTEP]\nsimp\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\na a₁ a₂ b c : G\ninst✝ : Group G\nn : G\nha : n ∈ center G\ng h : G\n⊢ g * g⁻¹ * n * h = g * n * g⁻¹ * h\n[PROOFSTEP]\nrw [mul_assoc g, ha g⁻¹, ← mul_assoc]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\na a₁ a₂ b c : G\ninst✝ : Group G\ns : Set G\n⊢ 1 ∈ normalizer s\n[PROOFSTEP]\nsimp [normalizer]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\na✝ a₁ a₂ b✝ c : G\ninst✝ : Group G\ns : Set G\na b : G\nha : ∀ (n : G), n ∈ s ↔ a * n * a⁻¹ ∈ s\nhb : ∀ (n : G), n ∈ s ↔ b * n * b⁻¹ ∈ s\nn : G\n⊢ n ∈ s ↔ a * b * n * (a * b)⁻¹ ∈ s\n[PROOFSTEP]\nrw [mul_inv_rev, ← mul_assoc, mul_assoc a, mul_assoc a, ← ha, ← hb]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\na✝ a₁ a₂ b c : G\ninst✝ : Group G\ns : Set G\na : G\nha : ∀ (n : G), n ∈ s ↔ a * n * a⁻¹ ∈ s\nn : G\n⊢ n ∈ s ↔ a⁻¹ * n * a⁻¹⁻¹ ∈ s\n[PROOFSTEP]\nrw [ha (a⁻¹ * n * a⁻¹⁻¹)]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\na✝ a₁ a₂ b c : G\ninst✝ : Group G\ns : Set G\na : G\nha : ∀ (n : G), n ∈ s ↔ a * n * a⁻¹ ∈ s\nn : G\n⊢ n ∈ s ↔ a * (a⁻¹ * n * a⁻¹⁻¹) * a⁻¹ ∈ s\n[PROOFSTEP]\nsimp [mul_assoc]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\na a₁ a₂ b c : G\ninst✝ : Group G\ns : Set G\nhs : IsSubgroup s\ng : G\nhg : g ∈ s\nn : G\n⊢ n ∈ s ↔ g * n * g⁻¹ ∈ s\n[PROOFSTEP]\nrw [IsSubgroup.mul_mem_cancel_right hs ((IsSubgroup.inv_mem_iff hs).2 hg), IsSubgroup.mul_mem_cancel_left hs hg]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\na✝ a₁ a₂ b✝ c : G\ninst✝¹ : Group G\ninst✝ : Group H\nf : G → H\nhf : IsGroupHom f\na b : G\nh : f (a * b⁻¹) = 1\n⊢ f a = f b\n[PROOFSTEP]\nrw [hf.map_mul, hf.map_inv] at h \n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\na✝ a₁ a₂ b✝ c : G\ninst✝¹ : Group G\ninst✝ : Group H\nf : G → H\nhf : IsGroupHom f\na b : G\nh : f a * (f b)⁻¹ = 1\n⊢ f a = f b\n[PROOFSTEP]\nrw [← inv_inv (f b), eq_inv_of_mul_eq_one_left h]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\na✝ a₁ a₂ b✝ c : G\ninst✝¹ : Group G\ninst✝ : Group H\nf : G → H\nhf : IsGroupHom f\na b : G\nh : f (a⁻¹ * b) = 1\n⊢ f a = f b\n[PROOFSTEP]\nrw [hf.map_mul, hf.map_inv] at h \n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\na✝ a₁ a₂ b✝ c : G\ninst✝¹ : Group G\ninst✝ : Group H\nf : G → H\nhf : IsGroupHom f\na b : G\nh : (f a)⁻¹ * f b = 1\n⊢ f a = f b\n[PROOFSTEP]\napply inv_injective\n[GOAL]\ncase a\nG : Type u_1\nH : Type u_2\nA : Type u_3\na✝ a₁ a₂ b✝ c : G\ninst✝¹ : Group G\ninst✝ : Group H\nf : G → H\nhf : IsGroupHom f\na b : G\nh : (f a)⁻¹ * f b = 1\n⊢ (f a)⁻¹ = (f b)⁻¹\n[PROOFSTEP]\nrw [eq_inv_of_mul_eq_one_left h]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\na✝ a₁ a₂ b✝ c : G\ninst✝¹ : Group G\ninst✝ : Group H\nf : G → H\nhf : IsGroupHom f\na b : G\nh : f a = f b\n⊢ f (a * b⁻¹) = 1\n[PROOFSTEP]\nhave : f a * (f b)⁻¹ = 1 := by rw [h, mul_right_inv]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\na✝ a₁ a₂ b✝ c : G\ninst✝¹ : Group G\ninst✝ : Group H\nf : G → H\nhf : IsGroupHom f\na b : G\nh : f a = f b\n⊢ f a * (f b)⁻¹ = 1\n[PROOFSTEP]\nrw [h, mul_right_inv]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\na✝ a₁ a₂ b✝ c : G\ninst✝¹ : Group G\ninst✝ : Group H\nf : G → H\nhf : IsGroupHom f\na b : G\nh : f a = f b\nthis : f a * (f b)⁻¹ = 1\n⊢ f (a * b⁻¹) = 1\n[PROOFSTEP]\nrwa [← hf.map_inv, ← hf.map_mul] at this \n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\na✝ a₁ a₂ b✝ c : G\ninst✝¹ : Group G\ninst✝ : Group H\nf : G → H\nhf : IsGroupHom f\na b : G\nh : f a = f b\n⊢ f (a⁻¹ * b) = 1\n[PROOFSTEP]\nhave : (f a)⁻¹ * f b = 1 := by rw [h, mul_left_inv]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\na✝ a₁ a₂ b✝ c : G\ninst✝¹ : Group G\ninst✝ : Group H\nf : G → H\nhf : IsGroupHom f\na b : G\nh : f a = f b\n⊢ (f a)⁻¹ * f b = 1\n[PROOFSTEP]\nrw [h, mul_left_inv]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\na✝ a₁ a₂ b✝ c : G\ninst✝¹ : Group G\ninst✝ : Group H\nf : G → H\nhf : IsGroupHom f\na b : G\nh : f a = f b\nthis : (f a)⁻¹ * f b = 1\n⊢ f (a⁻¹ * b) = 1\n[PROOFSTEP]\nrwa [← hf.map_inv, ← hf.map_mul] at this \n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\na✝ a₁ a₂ b✝ c : G\ninst✝¹ : Group G\ninst✝ : Group H\nf : G → H\nhf : IsGroupHom f\na b : G\n⊢ f a = f b ↔ a * b⁻¹ ∈ ker f\n[PROOFSTEP]\nrw [mem_ker]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\na✝ a₁ a₂ b✝ c : G\ninst✝¹ : Group G\ninst✝ : Group H\nf : G → H\nhf : IsGroupHom f\na b : G\n⊢ f a = f b ↔ f (a * b⁻¹) = 1\n[PROOFSTEP]\nexact one_iff_ker_inv hf _ _\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\na✝ a₁ a₂ b✝ c : G\ninst✝¹ : Group G\ninst✝ : Group H\nf : G → H\nhf : IsGroupHom f\na b : G\n⊢ f a = f b ↔ a⁻¹ * b ∈ ker f\n[PROOFSTEP]\nrw [mem_ker]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\na✝ a₁ a₂ b✝ c : G\ninst✝¹ : Group G\ninst✝ : Group H\nf : G → H\nhf : IsGroupHom f\na b : G\n⊢ f a = f b ↔ f (a⁻¹ * b) = 1\n[PROOFSTEP]\nexact one_iff_ker_inv' hf _ _\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\na a₁✝ a₂✝ b c : G\ninst✝¹ : Group G\ninst✝ : Group H\nf : G → H\nhf : IsGroupHom f\ns : Set G\nhs : IsSubgroup s\na₁ a₂ : H\nx✝¹ : a₁ ∈ f '' s\nx✝ : a₂ ∈ f '' s\nb₁ : G\nhb₁ : b₁ ∈ s\neq₁ : f b₁ = a₁\nb₂ : G\nhb₂ : b₂ ∈ s\neq₂ : f b₂ = a₂\n⊢ f (b₁ * b₂) = a₁ * a₂\n[PROOFSTEP]\nsimp [eq₁, eq₂, hf.map_mul]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\na✝ a₁ a₂ b✝ c : G\ninst✝¹ : Group G\ninst✝ : Group H\nf : G → H\nhf : IsGroupHom f\ns : Set G\nhs : IsSubgroup s\na : H\nx✝ : a ∈ f '' s\nb : G\nhb : b ∈ s\nEq : f b = a\n⊢ f b⁻¹ = a⁻¹\n[PROOFSTEP]\nrw [hf.map_inv]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\na✝ a₁ a₂ b✝ c : G\ninst✝¹ : Group G\ninst✝ : Group H\nf : G → H\nhf : IsGroupHom f\ns : Set G\nhs : IsSubgroup s\na : H\nx✝ : a ∈ f '' s\nb : G\nhb : b ∈ s\nEq : f b = a\n⊢ (f b)⁻¹ = a⁻¹\n[PROOFSTEP]\nsimp [*]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\na a₁ a₂ b c : G\ninst✝¹ : Group G\ninst✝ : Group H\nf : G → H\nhf : IsGroupHom f\ns : Set H\nhs : IsSubgroup s\n⊢ IsSubgroup (f ⁻¹' s)\n[PROOFSTEP]\nrefine' { .. }\n[GOAL]\ncase refine'_1\nG : Type u_1\nH : Type u_2\nA : Type u_3\na a₁ a₂ b c : G\ninst✝¹ : Group G\ninst✝ : Group H\nf : G → H\nhf : IsGroupHom f\ns : Set H\nhs : IsSubgroup s\n⊢ 1 ∈ f ⁻¹' s\n[PROOFSTEP]\nsimp (config := { contextual := true }) [hs.one_mem, hs.mul_mem, hs.inv_mem, hf.map_mul, hf.map_one, hf.map_inv,\n  InvMemClass.inv_mem]\n[GOAL]\ncase refine'_2\nG : Type u_1\nH : Type u_2\nA : Type u_3\na a₁ a₂ b c : G\ninst✝¹ : Group G\ninst✝ : Group H\nf : G → H\nhf : IsGroupHom f\ns : Set H\nhs : IsSubgroup s\n⊢ ∀ {a b : G}, a ∈ f ⁻¹' s → b ∈ f ⁻¹' s → a * b ∈ f ⁻¹' s\n[PROOFSTEP]\nsimp (config := { contextual := true }) [hs.one_mem, hs.mul_mem, hs.inv_mem, hf.map_mul, hf.map_one, hf.map_inv,\n  InvMemClass.inv_mem]\n[GOAL]\ncase refine'_3\nG : Type u_1\nH : Type u_2\nA : Type u_3\na a₁ a₂ b c : G\ninst✝¹ : Group G\ninst✝ : Group H\nf : G → H\nhf : IsGroupHom f\ns : Set H\nhs : IsSubgroup s\n⊢ ∀ {a : G}, a ∈ f ⁻¹' s → a⁻¹ ∈ f ⁻¹' s\n[PROOFSTEP]\nsimp (config := { contextual := true }) [hs.one_mem, hs.mul_mem, hs.inv_mem, hf.map_mul, hf.map_one, hf.map_inv,\n  InvMemClass.inv_mem]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\na a₁ a₂ b c : G\ninst✝¹ : Group G\ninst✝ : Group H\nf : G → H\nhf : IsGroupHom f\ns : Set H\nhs : IsNormalSubgroup s\n⊢ 1 ∈ f ⁻¹' s\n[PROOFSTEP]\nsimp [hf.map_one, hs.toIsSubgroup.one_mem]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\na a₁ a₂ b c : G\ninst✝¹ : Group G\ninst✝ : Group H\nf : G → H\nhf : IsGroupHom f\ns : Set H\nhs : IsNormalSubgroup s\n⊢ ∀ {a b : G}, a ∈ f ⁻¹' s → b ∈ f ⁻¹' s → a * b ∈ f ⁻¹' s\n[PROOFSTEP]\nsimp (config := { contextual := true }) [hf.map_mul, hs.toIsSubgroup.mul_mem]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\na a₁ a₂ b c : G\ninst✝¹ : Group G\ninst✝ : Group H\nf : G → H\nhf : IsGroupHom f\ns : Set H\nhs : IsNormalSubgroup s\n⊢ ∀ {a : G}, a ∈ f ⁻¹' s → a⁻¹ ∈ f ⁻¹' s\n[PROOFSTEP]\nsimp (config := { contextual := true }) [hf.map_inv, hs.toIsSubgroup.inv_mem]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\na a₁ a₂ b c : G\ninst✝¹ : Group G\ninst✝ : Group H\nf : G → H\nhf : IsGroupHom f\ns : Set H\nhs : IsNormalSubgroup s\n⊢ ∀ (n : G), n ∈ f ⁻¹' s → ∀ (g : G), g * n * g⁻¹ ∈ f ⁻¹' s\n[PROOFSTEP]\nsimp (config := { contextual := true }) [hs.normal, hf.map_mul, hf.map_inv]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\na a₁ a₂ b c : G\ninst✝¹ : Group G\ninst✝ : Group H\nf : G → H\nhf : IsGroupHom f\nh : ker f = IsSubgroup.trivial G\n⊢ Injective f\n[PROOFSTEP]\nintro a₁ a₂ hfa\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\na a₁✝ a₂✝ b c : G\ninst✝¹ : Group G\ninst✝ : Group H\nf : G → H\nhf : IsGroupHom f\nh : ker f = IsSubgroup.trivial G\na₁ a₂ : G\nhfa : f a₁ = f a₂\n⊢ a₁ = a₂\n[PROOFSTEP]\nsimp [ext_iff, ker, IsSubgroup.trivial] at h \n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\na a₁✝ a₂✝ b c : G\ninst✝¹ : Group G\ninst✝ : Group H\nf : G → H\nhf : IsGroupHom f\na₁ a₂ : G\nhfa : f a₁ = f a₂\nh : ∀ (x : G), f x = 1 ↔ x = 1\n⊢ a₁ = a₂\n[PROOFSTEP]\nhave ha : a₁ * a₂⁻¹ = 1 := by rw [← h]; exact hf.inv_ker_one hfa\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\na a₁✝ a₂✝ b c : G\ninst✝¹ : Group G\ninst✝ : Group H\nf : G → H\nhf : IsGroupHom f\na₁ a₂ : G\nhfa : f a₁ = f a₂\nh : ∀ (x : G), f x = 1 ↔ x = 1\n⊢ a₁ * a₂⁻¹ = 1\n[PROOFSTEP]\nrw [← h]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\na a₁✝ a₂✝ b c : G\ninst✝¹ : Group G\ninst✝ : Group H\nf : G → H\nhf : IsGroupHom f\na₁ a₂ : G\nhfa : f a₁ = f a₂\nh : ∀ (x : G), f x = 1 ↔ x = 1\n⊢ f (a₁ * a₂⁻¹) = 1\n[PROOFSTEP]\nexact hf.inv_ker_one hfa\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\na a₁✝ a₂✝ b c : G\ninst✝¹ : Group G\ninst✝ : Group H\nf : G → H\nhf : IsGroupHom f\na₁ a₂ : G\nhfa : f a₁ = f a₂\nh : ∀ (x : G), f x = 1 ↔ x = 1\nha : a₁ * a₂⁻¹ = 1\n⊢ a₁ = a₂\n[PROOFSTEP]\nrw [eq_inv_of_mul_eq_one_left ha, inv_inv a₂]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\na a₁ a₂ b c : G\ninst✝¹ : Group G\ninst✝ : Group H\nf : G → H\nhf : IsGroupHom f\nh : Injective f\nx : G\nhx : x ∈ ker f\n⊢ x ∈ IsSubgroup.trivial G\n[PROOFSTEP]\nsuffices f x = f 1 by simpa using h this\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\na a₁ a₂ b c : G\ninst✝¹ : Group G\ninst✝ : Group H\nf : G → H\nhf : IsGroupHom f\nh : Injective f\nx : G\nhx : x ∈ ker f\nthis : f x = f 1\n⊢ x ∈ IsSubgroup.trivial G\n[PROOFSTEP]\nsimpa using h this\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\na a₁ a₂ b c : G\ninst✝¹ : Group G\ninst✝ : Group H\nf : G → H\nhf : IsGroupHom f\nh : Injective f\nx : G\nhx : x ∈ ker f\n⊢ f x = f 1\n[PROOFSTEP]\nsimp [hf.map_one]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\na a₁ a₂ b c : G\ninst✝¹ : Group G\ninst✝ : Group H\nf : G → H\nhf : IsGroupHom f\nh : Injective f\nx : G\nhx : x ∈ ker f\n⊢ f x = 1\n[PROOFSTEP]\nrwa [mem_ker] at hx \n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\na a₁ a₂ b c : G\ninst✝¹ : Group G\ninst✝ : Group H\nf : G → H\nhf : IsGroupHom f\nh : Injective f\nx : G\n⊢ x ∈ IsSubgroup.trivial G → x ∈ ker f\n[PROOFSTEP]\nsimp (config := { contextual := true }) [mem_ker, hf.map_one]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\na a₁ a₂ b c : G\ninst✝¹ : Group G\ninst✝ : Group H\nf : G → H\nhf : IsGroupHom f\n⊢ ker f = IsSubgroup.trivial G ↔ ∀ (x : G), f x = 1 → x = 1\n[PROOFSTEP]\nrw [Set.ext_iff]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\na a₁ a₂ b c : G\ninst✝¹ : Group G\ninst✝ : Group H\nf : G → H\nhf : IsGroupHom f\n⊢ (∀ (x : G), x ∈ ker f ↔ x ∈ IsSubgroup.trivial G) ↔ ∀ (x : G), f x = 1 → x = 1\n[PROOFSTEP]\nsimp [ker]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\na a₁ a₂ b c : G\ninst✝¹ : Group G\ninst✝ : Group H\nf : G → H\nhf : IsGroupHom f\n⊢ (∀ (x : G), f x = 1 ↔ x = 1) ↔ ∀ (x : G), f x = 1 → x = 1\n[PROOFSTEP]\nexact ⟨fun h x hx => (h x).1 hx, fun h x => ⟨h x, fun hx => by rw [hx, hf.map_one]⟩⟩\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\na a₁ a₂ b c : G\ninst✝¹ : Group G\ninst✝ : Group H\nf : G → H\nhf : IsGroupHom f\nh : ∀ (x : G), f x = 1 → x = 1\nx : G\nhx : x = 1\n⊢ f x = 1\n[PROOFSTEP]\nrw [hx, hf.map_one]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\na✝ a₁ a₂ b c : G\ninst✝ : Group G\ns✝ s t : Set G\nht : IsSubgroup t\nh : s ⊆ t\na : G\nha : a ∈ closure s\n⊢ a ∈ t\n[PROOFSTEP]\ninduction ha\n[GOAL]\ncase basic\nG : Type u_1\nH : Type u_2\nA : Type u_3\na✝² a₁ a₂ b c : G\ninst✝ : Group G\ns✝ s t : Set G\nht : IsSubgroup t\nh : s ⊆ t\na a✝¹ : G\na✝ : a✝¹ ∈ s\n⊢ a✝¹ ∈ t\n[PROOFSTEP]\nsimp [h _, *, ht.one_mem, ht.mul_mem, IsSubgroup.inv_mem_iff]\n[GOAL]\ncase one\nG : Type u_1\nH : Type u_2\nA : Type u_3\na✝ a₁ a₂ b c : G\ninst✝ : Group G\ns✝ s t : Set G\nht : IsSubgroup t\nh : s ⊆ t\na : G\n⊢ 1 ∈ t\n[PROOFSTEP]\nsimp [h _, *, ht.one_mem, ht.mul_mem, IsSubgroup.inv_mem_iff]\n[GOAL]\ncase inv\nG : Type u_1\nH : Type u_2\nA : Type u_3\na✝² a₁ a₂ b c : G\ninst✝ : Group G\ns✝ s t : Set G\nht : IsSubgroup t\nh : s ⊆ t\na a✝¹ : G\na✝ : InClosure s a✝¹\na_ih✝ : a✝¹ ∈ t\n⊢ a✝¹⁻¹ ∈ t\n[PROOFSTEP]\nsimp [h _, *, ht.one_mem, ht.mul_mem, IsSubgroup.inv_mem_iff]\n[GOAL]\ncase mul\nG : Type u_1\nH : Type u_2\nA : Type u_3\na✝³ a₁ a₂ b c : G\ninst✝ : Group G\ns✝ s t : Set G\nht : IsSubgroup t\nh : s ⊆ t\na a✝² b✝ : G\na✝¹ : InClosure s a✝²\na✝ : InClosure s b✝\na_ih✝¹ : a✝² ∈ t\na_ih✝ : b✝ ∈ t\n⊢ a✝² * b✝ ∈ t\n[PROOFSTEP]\nsimp [h _, *, ht.one_mem, ht.mul_mem, IsSubgroup.inv_mem_iff]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\na✝ a₁ a₂ b c : G\ninst✝ : Group G\ns✝ s : Set G\na : G\nh : a ∈ closure s\nx✝² : G\nx✝¹ : InClosure s x✝²\nx✝ : ∃ l, (∀ (x : G), x ∈ l → x ∈ s ∨ x⁻¹ ∈ s) ∧ List.prod l = x✝²\nL : List G\nHL1 : ∀ (x : G), x ∈ L → x ∈ s ∨ x⁻¹ ∈ s\nHL2 : List.prod L = x✝²\nx : G\nhx : x ∈ List.map Inv.inv (List.reverse L)\ny : G\nhy1 : y ∈ List.reverse L\nhy2 : y⁻¹ = x\n⊢ y ∈ s → y⁻¹⁻¹ ∈ s\n[PROOFSTEP]\nrw [inv_inv]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\na✝ a₁ a₂ b c : G\ninst✝ : Group G\ns✝ s : Set G\na : G\nh : a ∈ closure s\nx✝² : G\nx✝¹ : InClosure s x✝²\nx✝ : ∃ l, (∀ (x : G), x ∈ l → x ∈ s ∨ x⁻¹ ∈ s) ∧ List.prod l = x✝²\nL : List G\nHL1 : ∀ (x : G), x ∈ L → x ∈ s ∨ x⁻¹ ∈ s\nHL2 : List.prod L = x✝²\nx : G\nhx : x ∈ List.map Inv.inv (List.reverse L)\ny : G\nhy1 : y ∈ List.reverse L\nhy2 : y⁻¹ = x\n⊢ y ∈ s → y ∈ s\n[PROOFSTEP]\nexact id\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\na✝ a₁ a₂ b c : G\ninst✝ : Group G\ns✝ s : Set G\na : G\nh : a ∈ closure s\nx : G\nx✝¹ : InClosure s x\nx✝ : ∃ l, (∀ (x : G), x ∈ l → x ∈ s ∨ x⁻¹ ∈ s) ∧ List.prod l = x\nL : List G\nHL1 : ∀ (x : G), x ∈ L → x ∈ s ∨ x⁻¹ ∈ s\nHL2 : List.prod L = x\nhd : G\ntl : List G\nih : List.prod (List.map Inv.inv (List.reverse tl)) = (List.prod tl)⁻¹\n⊢ List.prod (List.map Inv.inv (List.reverse (hd :: tl))) = (List.prod (hd :: tl))⁻¹\n[PROOFSTEP]\nrw [List.reverse_cons, List.map_append, List.prod_append, ih, List.map_singleton, List.prod_cons, List.prod_nil,\n  mul_one, List.prod_cons, mul_inv_rev]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\na✝ a₁ a₂ b c : G\ninst✝ : Group G\ns✝ s : Set G\na : G\nh : a ∈ closure s\nx y : G\nx✝³ : InClosure s x\nx✝² : InClosure s y\nx✝¹ : ∃ l, (∀ (x : G), x ∈ l → x ∈ s ∨ x⁻¹ ∈ s) ∧ List.prod l = x\nx✝ : ∃ l, (∀ (x : G), x ∈ l → x ∈ s ∨ x⁻¹ ∈ s) ∧ List.prod l = y\nL1 : List G\nHL1 : ∀ (x : G), x ∈ L1 → x ∈ s ∨ x⁻¹ ∈ s\nHL2 : List.prod L1 = x\nL2 : List G\nHL3 : ∀ (x : G), x ∈ L2 → x ∈ s ∨ x⁻¹ ∈ s\nHL4 : List.prod L2 = y\n⊢ List.prod (L1 ++ L2) = x * y\n[PROOFSTEP]\nrw [List.prod_append, HL2, HL4]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\na a₁ a₂ b c : G\ninst✝¹ : Group G\ns✝ : Set G\ninst✝ : Group H\nf : G → H\nhf : IsGroupHom f\ns : Set G\n⊢ f '' closure s ≤ closure (f '' s)\n[PROOFSTEP]\nrintro _ ⟨x, hx, rfl⟩\n[GOAL]\ncase intro.intro\nG : Type u_1\nH : Type u_2\nA : Type u_3\na a₁ a₂ b c : G\ninst✝¹ : Group G\ns✝ : Set G\ninst✝ : Group H\nf : G → H\nhf : IsGroupHom f\ns : Set G\nx : G\nhx : x ∈ closure s\n⊢ f x ∈ closure (f '' s)\n[PROOFSTEP]\nexact\n  InClosure.recOn hx (by intros _ ha; exact subset_closure (mem_image_of_mem f ha))\n    (by\n      rw [hf.map_one]\n      apply IsSubmonoid.one_mem (closure.isSubgroup _).toIsSubmonoid)\n    (by\n      intros _ _\n      rw [hf.map_inv]\n      apply IsSubgroup.inv_mem (closure.isSubgroup _))\n    (by\n      intros _ _ _ _ ha hb\n      rw [hf.map_mul]\n      exact (closure.isSubgroup (f '' s)).toIsSubmonoid.mul_mem ha hb)\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\na a₁ a₂ b c : G\ninst✝¹ : Group G\ns✝ : Set G\ninst✝ : Group H\nf : G → H\nhf : IsGroupHom f\ns : Set G\nx : G\nhx : x ∈ closure s\n⊢ ∀ {a : G}, a ∈ s → f a ∈ closure (f '' s)\n[PROOFSTEP]\nintros _ ha\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\na a₁ a₂ b c : G\ninst✝¹ : Group G\ns✝ : Set G\ninst✝ : Group H\nf : G → H\nhf : IsGroupHom f\ns : Set G\nx : G\nhx : x ∈ closure s\na✝ : G\nha : a✝ ∈ s\n⊢ f a✝ ∈ closure (f '' s)\n[PROOFSTEP]\nexact subset_closure (mem_image_of_mem f ha)\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\na a₁ a₂ b c : G\ninst✝¹ : Group G\ns✝ : Set G\ninst✝ : Group H\nf : G → H\nhf : IsGroupHom f\ns : Set G\nx : G\nhx : x ∈ closure s\n⊢ f 1 ∈ closure (f '' s)\n[PROOFSTEP]\nrw [hf.map_one]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\na a₁ a₂ b c : G\ninst✝¹ : Group G\ns✝ : Set G\ninst✝ : Group H\nf : G → H\nhf : IsGroupHom f\ns : Set G\nx : G\nhx : x ∈ closure s\n⊢ 1 ∈ closure (f '' s)\n[PROOFSTEP]\napply IsSubmonoid.one_mem (closure.isSubgroup _).toIsSubmonoid\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\na a₁ a₂ b c : G\ninst✝¹ : Group G\ns✝ : Set G\ninst✝ : Group H\nf : G → H\nhf : IsGroupHom f\ns : Set G\nx : G\nhx : x ∈ closure s\n⊢ ∀ {a : G}, InClosure s a → f a ∈ closure (f '' s) → f a⁻¹ ∈ closure (f '' s)\n[PROOFSTEP]\nintros _ _\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\na a₁ a₂ b c : G\ninst✝¹ : Group G\ns✝ : Set G\ninst✝ : Group H\nf : G → H\nhf : IsGroupHom f\ns : Set G\nx : G\nhx : x ∈ closure s\na✝¹ : G\na✝ : InClosure s a✝¹\n⊢ f a✝¹ ∈ closure (f '' s) → f a✝¹⁻¹ ∈ closure (f '' s)\n[PROOFSTEP]\nrw [hf.map_inv]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\na a₁ a₂ b c : G\ninst✝¹ : Group G\ns✝ : Set G\ninst✝ : Group H\nf : G → H\nhf : IsGroupHom f\ns : Set G\nx : G\nhx : x ∈ closure s\na✝¹ : G\na✝ : InClosure s a✝¹\n⊢ f a✝¹ ∈ closure (f '' s) → (f a✝¹)⁻¹ ∈ closure (f '' s)\n[PROOFSTEP]\napply IsSubgroup.inv_mem (closure.isSubgroup _)\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\na a₁ a₂ b c : G\ninst✝¹ : Group G\ns✝ : Set G\ninst✝ : Group H\nf : G → H\nhf : IsGroupHom f\ns : Set G\nx : G\nhx : x ∈ closure s\n⊢ ∀ {a b : G},\n    InClosure s a → InClosure s b → f a ∈ closure (f '' s) → f b ∈ closure (f '' s) → f (a * b) ∈ closure (f '' s)\n[PROOFSTEP]\nintros _ _ _ _ ha hb\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\na a₁ a₂ b c : G\ninst✝¹ : Group G\ns✝ : Set G\ninst✝ : Group H\nf : G → H\nhf : IsGroupHom f\ns : Set G\nx : G\nhx : x ∈ closure s\na✝² b✝ : G\na✝¹ : InClosure s a✝²\na✝ : InClosure s b✝\nha : f a✝² ∈ closure (f '' s)\nhb : f b✝ ∈ closure (f '' s)\n⊢ f (a✝² * b✝) ∈ closure (f '' s)\n[PROOFSTEP]\nrw [hf.map_mul]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\na a₁ a₂ b c : G\ninst✝¹ : Group G\ns✝ : Set G\ninst✝ : Group H\nf : G → H\nhf : IsGroupHom f\ns : Set G\nx : G\nhx : x ∈ closure s\na✝² b✝ : G\na✝¹ : InClosure s a✝²\na✝ : InClosure s b✝\nha : f a✝² ∈ closure (f '' s)\nhb : f b✝ ∈ closure (f '' s)\n⊢ f a✝² * f b✝ ∈ closure (f '' s)\n[PROOFSTEP]\nexact (closure.isSubgroup (f '' s)).toIsSubmonoid.mul_mem ha hb\n[GOAL]\nG✝ : Type u_1\nH : Type u_2\nA : Type u_3\na a₁ a₂ b c : G✝\ninst✝¹ : Group G✝\ns✝ : Set G✝\nG : Type u_4\ninst✝ : CommGroup G\ns t : Set G\nx : G\n⊢ x ∈ closure (s ∪ t) ↔ ∃ y, y ∈ closure s ∧ ∃ z, z ∈ closure t ∧ y * z = x\n[PROOFSTEP]\nsimp only [closure_eq_mclosure, Monoid.mem_closure_union_iff, exists_prop, preimage_union]\n[GOAL]\nG✝ : Type u_1\nH : Type u_2\nA : Type u_3\na a₁ a₂ b c : G✝\ninst✝¹ : Group G✝\ns✝ : Set G✝\nG : Type u_4\ninst✝ : CommGroup G\ns t : Set G\nx : G\n⊢ (∃ y,\n      (∃ y_1, y_1 ∈ Monoid.Closure s ∧ ∃ z, z ∈ Monoid.Closure t ∧ y_1 * z = y) ∧\n        ∃ z,\n          (∃ y, y ∈ Monoid.Closure (Inv.inv ⁻¹' s) ∧ ∃ z_1, z_1 ∈ Monoid.Closure (Inv.inv ⁻¹' t) ∧ y * z_1 = z) ∧\n            y * z = x) ↔\n    ∃ y,\n      (∃ y_1, y_1 ∈ Monoid.Closure s ∧ ∃ z, z ∈ Monoid.Closure (Inv.inv ⁻¹' s) ∧ y_1 * z = y) ∧\n        ∃ z, (∃ y, y ∈ Monoid.Closure t ∧ ∃ z_1, z_1 ∈ Monoid.Closure (Inv.inv ⁻¹' t) ∧ y * z_1 = z) ∧ y * z = x\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nG✝ : Type u_1\nH : Type u_2\nA : Type u_3\na a₁ a₂ b c : G✝\ninst✝¹ : Group G✝\ns✝ : Set G✝\nG : Type u_4\ninst✝ : CommGroup G\ns t : Set G\nx : G\n⊢ (∃ y,\n      (∃ y_1, y_1 ∈ Monoid.Closure s ∧ ∃ z, z ∈ Monoid.Closure t ∧ y_1 * z = y) ∧\n        ∃ z,\n          (∃ y, y ∈ Monoid.Closure (Inv.inv ⁻¹' s) ∧ ∃ z_1, z_1 ∈ Monoid.Closure (Inv.inv ⁻¹' t) ∧ y * z_1 = z) ∧\n            y * z = x) →\n    ∃ y,\n      (∃ y_1, y_1 ∈ Monoid.Closure s ∧ ∃ z, z ∈ Monoid.Closure (Inv.inv ⁻¹' s) ∧ y_1 * z = y) ∧\n        ∃ z, (∃ y, y ∈ Monoid.Closure t ∧ ∃ z_1, z_1 ∈ Monoid.Closure (Inv.inv ⁻¹' t) ∧ y * z_1 = z) ∧ y * z = x\n[PROOFSTEP]\nrintro ⟨_, ⟨ys, hys, yt, hyt, rfl⟩, _, ⟨zs, hzs, zt, hzt, rfl⟩, rfl⟩\n[GOAL]\ncase mp.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nG✝ : Type u_1\nH : Type u_2\nA : Type u_3\na a₁ a₂ b c : G✝\ninst✝¹ : Group G✝\ns✝ : Set G✝\nG : Type u_4\ninst✝ : CommGroup G\ns t : Set G\nys : G\nhys : ys ∈ Monoid.Closure s\nyt : G\nhyt : yt ∈ Monoid.Closure t\nzs : G\nhzs : zs ∈ Monoid.Closure (Inv.inv ⁻¹' s)\nzt : G\nhzt : zt ∈ Monoid.Closure (Inv.inv ⁻¹' t)\n⊢ ∃ y,\n    (∃ y_1, y_1 ∈ Monoid.Closure s ∧ ∃ z, z ∈ Monoid.Closure (Inv.inv ⁻¹' s) ∧ y_1 * z = y) ∧\n      ∃ z,\n        (∃ y, y ∈ Monoid.Closure t ∧ ∃ z_1, z_1 ∈ Monoid.Closure (Inv.inv ⁻¹' t) ∧ y * z_1 = z) ∧\n          y * z = ys * yt * (zs * zt)\n[PROOFSTEP]\nrefine' ⟨_, ⟨_, hys, _, hzs, rfl⟩, _, ⟨_, hyt, _, hzt, rfl⟩, _⟩\n[GOAL]\ncase mp.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nG✝ : Type u_1\nH : Type u_2\nA : Type u_3\na a₁ a₂ b c : G✝\ninst✝¹ : Group G✝\ns✝ : Set G✝\nG : Type u_4\ninst✝ : CommGroup G\ns t : Set G\nys : G\nhys : ys ∈ Monoid.Closure s\nyt : G\nhyt : yt ∈ Monoid.Closure t\nzs : G\nhzs : zs ∈ Monoid.Closure (Inv.inv ⁻¹' s)\nzt : G\nhzt : zt ∈ Monoid.Closure (Inv.inv ⁻¹' t)\n⊢ ys * zs * (yt * zt) = ys * yt * (zs * zt)\n[PROOFSTEP]\nrw [mul_assoc, mul_assoc, mul_left_comm zs]\n[GOAL]\ncase mpr\nG✝ : Type u_1\nH : Type u_2\nA : Type u_3\na a₁ a₂ b c : G✝\ninst✝¹ : Group G✝\ns✝ : Set G✝\nG : Type u_4\ninst✝ : CommGroup G\ns t : Set G\nx : G\n⊢ (∃ y,\n      (∃ y_1, y_1 ∈ Monoid.Closure s ∧ ∃ z, z ∈ Monoid.Closure (Inv.inv ⁻¹' s) ∧ y_1 * z = y) ∧\n        ∃ z, (∃ y, y ∈ Monoid.Closure t ∧ ∃ z_1, z_1 ∈ Monoid.Closure (Inv.inv ⁻¹' t) ∧ y * z_1 = z) ∧ y * z = x) →\n    ∃ y,\n      (∃ y_1, y_1 ∈ Monoid.Closure s ∧ ∃ z, z ∈ Monoid.Closure t ∧ y_1 * z = y) ∧\n        ∃ z,\n          (∃ y, y ∈ Monoid.Closure (Inv.inv ⁻¹' s) ∧ ∃ z_1, z_1 ∈ Monoid.Closure (Inv.inv ⁻¹' t) ∧ y * z_1 = z) ∧\n            y * z = x\n[PROOFSTEP]\nrintro ⟨_, ⟨ys, hys, zs, hzs, rfl⟩, _, ⟨yt, hyt, zt, hzt, rfl⟩, rfl⟩\n[GOAL]\ncase mpr.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nG✝ : Type u_1\nH : Type u_2\nA : Type u_3\na a₁ a₂ b c : G✝\ninst✝¹ : Group G✝\ns✝ : Set G✝\nG : Type u_4\ninst✝ : CommGroup G\ns t : Set G\nys : G\nhys : ys ∈ Monoid.Closure s\nzs : G\nhzs : zs ∈ Monoid.Closure (Inv.inv ⁻¹' s)\nyt : G\nhyt : yt ∈ Monoid.Closure t\nzt : G\nhzt : zt ∈ Monoid.Closure (Inv.inv ⁻¹' t)\n⊢ ∃ y,\n    (∃ y_1, y_1 ∈ Monoid.Closure s ∧ ∃ z, z ∈ Monoid.Closure t ∧ y_1 * z = y) ∧\n      ∃ z,\n        (∃ y, y ∈ Monoid.Closure (Inv.inv ⁻¹' s) ∧ ∃ z_1, z_1 ∈ Monoid.Closure (Inv.inv ⁻¹' t) ∧ y * z_1 = z) ∧\n          y * z = ys * zs * (yt * zt)\n[PROOFSTEP]\nrefine' ⟨_, ⟨ys, hys, yt, hyt, rfl⟩, _, ⟨zs, hzs, zt, hzt, rfl⟩, _⟩\n[GOAL]\ncase mpr.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nG✝ : Type u_1\nH : Type u_2\nA : Type u_3\na a₁ a₂ b c : G✝\ninst✝¹ : Group G✝\ns✝ : Set G✝\nG : Type u_4\ninst✝ : CommGroup G\ns t : Set G\nys : G\nhys : ys ∈ Monoid.Closure s\nzs : G\nhzs : zs ∈ Monoid.Closure (Inv.inv ⁻¹' s)\nyt : G\nhyt : yt ∈ Monoid.Closure t\nzt : G\nhzt : zt ∈ Monoid.Closure (Inv.inv ⁻¹' t)\n⊢ ys * yt * (zs * zt) = ys * zs * (yt * zt)\n[PROOFSTEP]\nrw [mul_assoc, mul_assoc, mul_left_comm yt]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\na a₁ a₂ b c : G\ninst✝ : Group G\n⊢ trivial G ⊆ Group.closure ∅\n[PROOFSTEP]\nsimp [Set.subset_def, (Group.closure.isSubgroup _).one_mem]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\na a₁ a₂ b c : G\ninst✝ : Group G\n⊢ ∅ ⊆ trivial G\n[PROOFSTEP]\nsimp\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\na✝ a₁ a₂ b c : G\ns : Set G\ninst✝ : Group G\nt : Set G\nht : IsNormalSubgroup t\na : G\nh : a ∈ t\nx : G\nhc : x ∈ conjugatesOf a\n⊢ x ∈ t\n[PROOFSTEP]\nobtain ⟨c, w⟩ := isConj_iff.1 hc\n[GOAL]\ncase intro\nG : Type u_1\nH : Type u_2\nA : Type u_3\na✝ a₁ a₂ b c✝ : G\ns : Set G\ninst✝ : Group G\nt : Set G\nht : IsNormalSubgroup t\na : G\nh : a ∈ t\nx : G\nhc : x ∈ conjugatesOf a\nc : G\nw : c * a * c⁻¹ = x\n⊢ x ∈ t\n[PROOFSTEP]\nhave H := IsNormalSubgroup.normal ht a h c\n[GOAL]\ncase intro\nG : Type u_1\nH✝ : Type u_2\nA : Type u_3\na✝ a₁ a₂ b c✝ : G\ns : Set G\ninst✝ : Group G\nt : Set G\nht : IsNormalSubgroup t\na : G\nh : a ∈ t\nx : G\nhc : x ∈ conjugatesOf a\nc : G\nw : c * a * c⁻¹ = x\nH : c * a * c⁻¹ ∈ t\n⊢ x ∈ t\n[PROOFSTEP]\nrwa [← w]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\na a₁ a₂ b c : G\ns : Set G\ninst✝ : Group G\nsrc✝ : IsSubgroup (normalClosure s) := isSubgroup s\nn : G\nh : n ∈ normalClosure s\ng : G\n⊢ g * n * g⁻¹ ∈ normalClosure s\n[PROOFSTEP]\ninduction' h with x hx x hx ihx x y hx hy ihx ihy\n[GOAL]\ncase basic\nG : Type u_1\nH : Type u_2\nA : Type u_3\na a₁ a₂ b c : G\ns : Set G\ninst✝ : Group G\nsrc✝ : IsSubgroup (normalClosure s) := isSubgroup s\nn g x : G\nhx : x ∈ conjugatesOfSet s\n⊢ g * x * g⁻¹ ∈ normalClosure s\n[PROOFSTEP]\nexact conjugatesOfSet_subset_normalClosure (conj_mem_conjugatesOfSet hx)\n[GOAL]\ncase one\nG : Type u_1\nH : Type u_2\nA : Type u_3\na a₁ a₂ b c : G\ns : Set G\ninst✝ : Group G\nsrc✝ : IsSubgroup (normalClosure s) := isSubgroup s\nn g : G\n⊢ g * 1 * g⁻¹ ∈ normalClosure s\n[PROOFSTEP]\nsimpa using (normalClosure.isSubgroup s).one_mem\n[GOAL]\ncase inv\nG : Type u_1\nH : Type u_2\nA : Type u_3\na a₁ a₂ b c : G\ns : Set G\ninst✝ : Group G\nsrc✝ : IsSubgroup (normalClosure s) := isSubgroup s\nn g x : G\nhx : InClosure (conjugatesOfSet s) x\nihx : g * x * g⁻¹ ∈ normalClosure s\n⊢ g * x⁻¹ * g⁻¹ ∈ normalClosure s\n[PROOFSTEP]\nrw [← conj_inv]\n[GOAL]\ncase inv\nG : Type u_1\nH : Type u_2\nA : Type u_3\na a₁ a₂ b c : G\ns : Set G\ninst✝ : Group G\nsrc✝ : IsSubgroup (normalClosure s) := isSubgroup s\nn g x : G\nhx : InClosure (conjugatesOfSet s) x\nihx : g * x * g⁻¹ ∈ normalClosure s\n⊢ (g * x * g⁻¹)⁻¹ ∈ normalClosure s\n[PROOFSTEP]\nexact (normalClosure.isSubgroup _).inv_mem ihx\n[GOAL]\ncase mul\nG : Type u_1\nH : Type u_2\nA : Type u_3\na a₁ a₂ b c : G\ns : Set G\ninst✝ : Group G\nsrc✝ : IsSubgroup (normalClosure s) := isSubgroup s\nn g x y : G\nhx : InClosure (conjugatesOfSet s) x\nhy : InClosure (conjugatesOfSet s) y\nihx : g * x * g⁻¹ ∈ normalClosure s\nihy : g * y * g⁻¹ ∈ normalClosure s\n⊢ g * (x * y) * g⁻¹ ∈ normalClosure s\n[PROOFSTEP]\nrw [← conj_mul]\n[GOAL]\ncase mul\nG : Type u_1\nH : Type u_2\nA : Type u_3\na a₁ a₂ b c : G\ns : Set G\ninst✝ : Group G\nsrc✝ : IsSubgroup (normalClosure s) := isSubgroup s\nn g x y : G\nhx : InClosure (conjugatesOfSet s) x\nhy : InClosure (conjugatesOfSet s) y\nihx : g * x * g⁻¹ ∈ normalClosure s\nihy : g * y * g⁻¹ ∈ normalClosure s\n⊢ g * x * g⁻¹ * (g * y * g⁻¹) ∈ normalClosure s\n[PROOFSTEP]\nexact (normalClosure.isSubgroup _).toIsSubmonoid.mul_mem ihx ihy\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\na✝ a₁ a₂ b c : G\ns✝ : Set G\ninst✝ : Group G\ns t : Set G\nht : IsNormalSubgroup t\nh : s ⊆ t\na : G\nw : a ∈ normalClosure s\n⊢ a ∈ t\n[PROOFSTEP]\ninduction' w with x hx x _ ihx x y _ _ ihx ihy\n[GOAL]\ncase basic\nG : Type u_1\nH : Type u_2\nA : Type u_3\na✝ a₁ a₂ b c : G\ns✝ : Set G\ninst✝ : Group G\ns t : Set G\nht : IsNormalSubgroup t\nh : s ⊆ t\na x : G\nhx : x ∈ conjugatesOfSet s\n⊢ x ∈ t\n[PROOFSTEP]\nexact conjugatesOfSet_subset' ht h <| hx\n[GOAL]\ncase one\nG : Type u_1\nH : Type u_2\nA : Type u_3\na✝ a₁ a₂ b c : G\ns✝ : Set G\ninst✝ : Group G\ns t : Set G\nht : IsNormalSubgroup t\nh : s ⊆ t\na : G\n⊢ 1 ∈ t\n[PROOFSTEP]\nexact ht.toIsSubgroup.toIsSubmonoid.one_mem\n[GOAL]\ncase inv\nG : Type u_1\nH : Type u_2\nA : Type u_3\na✝¹ a₁ a₂ b c : G\ns✝ : Set G\ninst✝ : Group G\ns t : Set G\nht : IsNormalSubgroup t\nh : s ⊆ t\na x : G\na✝ : InClosure (conjugatesOfSet s) x\nihx : x ∈ t\n⊢ x⁻¹ ∈ t\n[PROOFSTEP]\nexact ht.toIsSubgroup.inv_mem ihx\n[GOAL]\ncase mul\nG : Type u_1\nH : Type u_2\nA : Type u_3\na✝² a₁ a₂ b c : G\ns✝ : Set G\ninst✝ : Group G\ns t : Set G\nht : IsNormalSubgroup t\nh : s ⊆ t\na x y : G\na✝¹ : InClosure (conjugatesOfSet s) x\na✝ : InClosure (conjugatesOfSet s) y\nihx : x ∈ t\nihy : y ∈ t\n⊢ x * y ∈ t\n[PROOFSTEP]\nexact ht.toIsSubgroup.toIsSubmonoid.mul_mem ihx ihy\n", "meta": {"mathlib_filename": "Mathlib.Deprecated.Subgroup", "llama_tokens": 20229, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7185943925708561, "lm_q2_score": 0.7279754607093178, "lm_q1q2_score": 0.5231190839949014}}
{"text": "[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : Type x\ninst✝¹ : Monoid α\ninst✝ : HasDistribNeg α\na b : α\nu : αˣ\n⊢ -↑u * -↑u⁻¹ = 1\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : Type x\ninst✝¹ : Monoid α\ninst✝ : HasDistribNeg α\na b : α\nu : αˣ\n⊢ -↑u⁻¹ * -↑u = 1\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : Type x\ninst✝¹ : Monoid α\ninst✝ : HasDistribNeg α\na✝ b a : α\nu : αˣ\n⊢ -(a /ₚ u) = -a /ₚ u\n[PROOFSTEP]\nsimp only [divp, neg_mul]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : Type x\ninst✝ : Ring α\na✝ b✝ a b : α\nu : αˣ\n⊢ a /ₚ u + b /ₚ u = (a + b) /ₚ u\n[PROOFSTEP]\nsimp only [divp, add_mul]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : Type x\ninst✝ : Ring α\na✝ b✝ a b : α\nu : αˣ\n⊢ a /ₚ u - b /ₚ u = (a - b) /ₚ u\n[PROOFSTEP]\nrw [sub_eq_add_neg, sub_eq_add_neg, neg_divp, divp_add_divp_same]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : Type x\ninst✝ : Ring α\na✝ b✝ a b : α\nu : αˣ\n⊢ a + b /ₚ u = (a * ↑u + b) /ₚ u\n[PROOFSTEP]\nsimp only [divp, add_mul, Units.mul_inv_cancel_right]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : Type x\ninst✝ : Ring α\na✝ b✝ a b : α\nu : αˣ\n⊢ a - b /ₚ u = (a * ↑u - b) /ₚ u\n[PROOFSTEP]\nsimp only [divp, sub_mul, Units.mul_inv_cancel_right]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : Type x\ninst✝ : Ring α\na✝ b✝ a b : α\nu : αˣ\n⊢ a /ₚ u + b = (a + b * ↑u) /ₚ u\n[PROOFSTEP]\nsimp only [divp, add_mul, Units.mul_inv_cancel_right]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : Type x\ninst✝ : Ring α\na✝ b✝ a b : α\nu : αˣ\n⊢ a /ₚ u - b = (a - b * ↑u) /ₚ u\n[PROOFSTEP]\nsimp only [divp, sub_mul, sub_right_inj]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : Type x\ninst✝ : Ring α\na✝ b✝ a b : α\nu : αˣ\n⊢ b = b * ↑u * ↑u⁻¹\n[PROOFSTEP]\nrw [mul_assoc, Units.mul_inv, mul_one]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : Type x\ninst✝ : CommRing α\na b : α\nu₁ u₂ : αˣ\n⊢ a /ₚ u₁ + b /ₚ u₂ = (a * ↑u₂ + ↑u₁ * b) /ₚ (u₁ * u₂)\n[PROOFSTEP]\nsimp only [divp, add_mul, mul_inv_rev, val_mul]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : Type x\ninst✝ : CommRing α\na b : α\nu₁ u₂ : αˣ\n⊢ a * ↑u₁⁻¹ + b * ↑u₂⁻¹ = a * ↑u₂ * (↑u₂⁻¹ * ↑u₁⁻¹) + ↑u₁ * b * (↑u₂⁻¹ * ↑u₁⁻¹)\n[PROOFSTEP]\nrw [mul_comm (↑u₁ * b), mul_comm b]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : Type x\ninst✝ : CommRing α\na b : α\nu₁ u₂ : αˣ\n⊢ a * ↑u₁⁻¹ + ↑u₂⁻¹ * b = a * ↑u₂ * (↑u₂⁻¹ * ↑u₁⁻¹) + ↑u₂⁻¹ * ↑u₁⁻¹ * (↑u₁ * b)\n[PROOFSTEP]\nrw [← mul_assoc, ← mul_assoc, mul_assoc a, mul_assoc (↑u₂⁻¹ : α), mul_inv, inv_mul, mul_one, mul_one]\n  -- porting note: `assoc_rw` not ported: `assoc_rw [mul_inv, mul_inv, mul_one, mul_one]`\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : Type x\ninst✝ : CommRing α\na b : α\nu₁ u₂ : αˣ\n⊢ a /ₚ u₁ - b /ₚ u₂ = (a * ↑u₂ - ↑u₁ * b) /ₚ (u₁ * u₂)\n[PROOFSTEP]\nsimp only [sub_eq_add_neg, neg_divp, divp_add_divp, mul_neg]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : Type x\ninst✝ : Semiring R\na : Rˣ\nb : R\n⊢ ↑a + b = ↑a * (1 + ↑a⁻¹ * b)\n[PROOFSTEP]\nrw [mul_add, mul_one, ← mul_assoc, Units.mul_inv, one_mul]\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Ring.Units", "llama_tokens": 1674, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7772998508568416, "lm_q2_score": 0.6723316926137812, "lm_q1q2_score": 0.52260332439502}}
{"text": "[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nR : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝³ : OrderedSemiring R\ninst✝² : OrderedAddCommMonoid M\ninst✝¹ : SMulWithZero R M\ninst✝ : OrderedSMul R M\ns : Set M\na b : M\nc : R\nh₁ : a ≤ b\nh₂ : 0 ≤ c\n⊢ c • a ≤ c • b\n[PROOFSTEP]\nrcases h₁.eq_or_lt with (rfl | hab)\n[GOAL]\ncase inl\nι : Type u_1\n𝕜 : Type u_2\nR : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝³ : OrderedSemiring R\ninst✝² : OrderedAddCommMonoid M\ninst✝¹ : SMulWithZero R M\ninst✝ : OrderedSMul R M\ns : Set M\na : M\nc : R\nh₂ : 0 ≤ c\nh₁ : a ≤ a\n⊢ c • a ≤ c • a\n[PROOFSTEP]\nrfl\n[GOAL]\ncase inr\nι : Type u_1\n𝕜 : Type u_2\nR : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝³ : OrderedSemiring R\ninst✝² : OrderedAddCommMonoid M\ninst✝¹ : SMulWithZero R M\ninst✝ : OrderedSMul R M\ns : Set M\na b : M\nc : R\nh₁ : a ≤ b\nh₂ : 0 ≤ c\nhab : a < b\n⊢ c • a ≤ c • b\n[PROOFSTEP]\nrcases h₂.eq_or_lt with (rfl | hc)\n[GOAL]\ncase inr.inl\nι : Type u_1\n𝕜 : Type u_2\nR : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝³ : OrderedSemiring R\ninst✝² : OrderedAddCommMonoid M\ninst✝¹ : SMulWithZero R M\ninst✝ : OrderedSMul R M\ns : Set M\na b : M\nh₁ : a ≤ b\nhab : a < b\nh₂ : 0 ≤ 0\n⊢ 0 • a ≤ 0 • b\n[PROOFSTEP]\nrw [zero_smul, zero_smul]\n[GOAL]\ncase inr.inr\nι : Type u_1\n𝕜 : Type u_2\nR : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝³ : OrderedSemiring R\ninst✝² : OrderedAddCommMonoid M\ninst✝¹ : SMulWithZero R M\ninst✝ : OrderedSMul R M\ns : Set M\na b : M\nc : R\nh₁ : a ≤ b\nh₂ : 0 ≤ c\nhab : a < b\nhc : 0 < c\n⊢ c • a ≤ c • b\n[PROOFSTEP]\nexact (smul_lt_smul_of_pos hab hc).le\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nR : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝³ : OrderedSemiring R\ninst✝² : OrderedAddCommMonoid M\ninst✝¹ : SMulWithZero R M\ninst✝ : OrderedSMul R M\ns : Set M\na b : M\nc : R\nh : c • a < c • b\nhc✝ : 0 ≤ c\nhc : 0 = c\n⊢ 0 < 0\n[PROOFSTEP]\nrwa [← hc, zero_smul, zero_smul] at h \n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nR : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝³ : OrderedSemiring R\ninst✝² : OrderedAddCommMonoid M\ninst✝¹ : SMulWithZero R M\ninst✝ : OrderedSMul R M\ns : Set M\na b : M\nc : R\nhc : 0 < c\n⊢ 0 < c • a ↔ c • 0 < c • a\n[PROOFSTEP]\nrw [smul_zero]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nR : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝ : LinearOrderedCancelAddCommMonoid M\nn : ℕ\nhn : 0 < n\na b : M\nhab : a < b\n⊢ (fun a => n • a) a < (fun a => n • a) b\n[PROOFSTEP]\ncases n with\n| zero => cases hn\n| succ n =>\n  induction n with\n  | zero => dsimp; rwa [one_nsmul, one_nsmul]\n  | succ n ih => simp only [succ_nsmul _ n.succ, _root_.add_lt_add hab (ih n.succ_pos)]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nR : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝ : LinearOrderedCancelAddCommMonoid M\nn : ℕ\nhn : 0 < n\na b : M\nhab : a < b\n⊢ (fun a => n • a) a < (fun a => n • a) b\n[PROOFSTEP]\ncases n with\n| zero => cases hn\n| succ n =>\n  induction n with\n  | zero => dsimp; rwa [one_nsmul, one_nsmul]\n  | succ n ih => simp only [succ_nsmul _ n.succ, _root_.add_lt_add hab (ih n.succ_pos)]\n[GOAL]\ncase zero\nι : Type u_1\n𝕜 : Type u_2\nR : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝ : LinearOrderedCancelAddCommMonoid M\na b : M\nhab : a < b\nhn : 0 < zero\n⊢ (fun a => zero • a) a < (fun a => zero • a) b\n[PROOFSTEP]\n\n| zero => cases hn\n[GOAL]\ncase zero\nι : Type u_1\n𝕜 : Type u_2\nR : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝ : LinearOrderedCancelAddCommMonoid M\na b : M\nhab : a < b\nhn : 0 < zero\n⊢ (fun a => zero • a) a < (fun a => zero • a) b\n[PROOFSTEP]\ncases hn\n[GOAL]\ncase succ\nι : Type u_1\n𝕜 : Type u_2\nR : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝ : LinearOrderedCancelAddCommMonoid M\na b : M\nhab : a < b\nn : ℕ\nhn : 0 < succ n\n⊢ (fun a => succ n • a) a < (fun a => succ n • a) b\n[PROOFSTEP]\n\n| succ n =>\n  induction n with\n  | zero => dsimp; rwa [one_nsmul, one_nsmul]\n  | succ n ih => simp only [succ_nsmul _ n.succ, _root_.add_lt_add hab (ih n.succ_pos)]\n[GOAL]\ncase succ\nι : Type u_1\n𝕜 : Type u_2\nR : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝ : LinearOrderedCancelAddCommMonoid M\na b : M\nhab : a < b\nn : ℕ\nhn : 0 < succ n\n⊢ (fun a => succ n • a) a < (fun a => succ n • a) b\n[PROOFSTEP]\ninduction n with\n| zero => dsimp; rwa [one_nsmul, one_nsmul]\n| succ n ih => simp only [succ_nsmul _ n.succ, _root_.add_lt_add hab (ih n.succ_pos)]\n[GOAL]\ncase succ\nι : Type u_1\n𝕜 : Type u_2\nR : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝ : LinearOrderedCancelAddCommMonoid M\na b : M\nhab : a < b\nn : ℕ\nhn : 0 < succ n\n⊢ (fun a => succ n • a) a < (fun a => succ n • a) b\n[PROOFSTEP]\ninduction n with\n| zero => dsimp; rwa [one_nsmul, one_nsmul]\n| succ n ih => simp only [succ_nsmul _ n.succ, _root_.add_lt_add hab (ih n.succ_pos)]\n[GOAL]\ncase succ.zero\nι : Type u_1\n𝕜 : Type u_2\nR : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝ : LinearOrderedCancelAddCommMonoid M\na b : M\nhab : a < b\nhn : 0 < succ zero\n⊢ (fun a => succ zero • a) a < (fun a => succ zero • a) b\n[PROOFSTEP]\n\n| zero => dsimp; rwa [one_nsmul, one_nsmul]\n[GOAL]\ncase succ.zero\nι : Type u_1\n𝕜 : Type u_2\nR : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝ : LinearOrderedCancelAddCommMonoid M\na b : M\nhab : a < b\nhn : 0 < succ zero\n⊢ (fun a => succ zero • a) a < (fun a => succ zero • a) b\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase succ.zero\nι : Type u_1\n𝕜 : Type u_2\nR : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝ : LinearOrderedCancelAddCommMonoid M\na b : M\nhab : a < b\nhn : 0 < succ zero\n⊢ succ 0 • a < succ 0 • b\n[PROOFSTEP]\nrwa [one_nsmul, one_nsmul]\n[GOAL]\ncase succ.succ\nι : Type u_1\n𝕜 : Type u_2\nR : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝ : LinearOrderedCancelAddCommMonoid M\na b : M\nhab : a < b\nn : ℕ\nih : 0 < succ n → (fun a => succ n • a) a < (fun a => succ n • a) b\nhn : 0 < succ (succ n)\n⊢ (fun a => succ (succ n) • a) a < (fun a => succ (succ n) • a) b\n[PROOFSTEP]\n\n| succ n ih => simp only [succ_nsmul _ n.succ, _root_.add_lt_add hab (ih n.succ_pos)]\n[GOAL]\ncase succ.succ\nι : Type u_1\n𝕜 : Type u_2\nR : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝ : LinearOrderedCancelAddCommMonoid M\na b : M\nhab : a < b\nn : ℕ\nih : 0 < succ n → (fun a => succ n • a) a < (fun a => succ n • a) b\nhn : 0 < succ (succ n)\n⊢ (fun a => succ (succ n) • a) a < (fun a => succ (succ n) • a) b\n[PROOFSTEP]\nsimp only [succ_nsmul _ n.succ, _root_.add_lt_add hab (ih n.succ_pos)]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nR : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝ : LinearOrderedAddCommGroup M\nn : ℤ\nhn : 0 < n\n⊢ StrictMono fun a => n • a\n[PROOFSTEP]\ncases n\n[GOAL]\ncase ofNat\nι : Type u_1\n𝕜 : Type u_2\nR : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝ : LinearOrderedAddCommGroup M\na✝ : ℕ\nhn : 0 < ofNat a✝\n⊢ StrictMono fun a => ofNat a✝ • a\n[PROOFSTEP]\nsimp only [Int.ofNat_eq_coe, Int.coe_nat_pos, coe_nat_zsmul] at hn ⊢\n[GOAL]\ncase ofNat\nι : Type u_1\n𝕜 : Type u_2\nR : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝ : LinearOrderedAddCommGroup M\na✝ : ℕ\nhn : 0 < a✝\n⊢ StrictMono fun a => a✝ • a\n[PROOFSTEP]\nexact strictMono_smul_left hn\n[GOAL]\ncase negSucc\nι : Type u_1\n𝕜 : Type u_2\nR : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝ : LinearOrderedAddCommGroup M\na✝ : ℕ\nhn : 0 < -[a✝+1]\n⊢ StrictMono fun a => -[a✝+1] • a\n[PROOFSTEP]\ncases (Int.negSucc_not_pos _).1 hn\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nR : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁴ : LinearOrderedSemifield 𝕜\ninst✝³ : OrderedAddCommMonoid M\ninst✝² : OrderedAddCommMonoid N\ninst✝¹ : MulActionWithZero 𝕜 M\ninst✝ : MulActionWithZero 𝕜 N\nh : ∀ ⦃a b : M⦄ ⦃c : 𝕜⦄, a < b → 0 < c → c • a ≤ c • b\n⊢ OrderedSMul 𝕜 M\n[PROOFSTEP]\nhave hlt' : ∀ (a b : M) (c : 𝕜), a < b → 0 < c → c • a < c • b :=\n  by\n  refine' fun a b c hab hc => (h hab hc).lt_of_ne _\n  rw [Ne.def, hc.ne'.isUnit.smul_left_cancel]\n  exact hab.ne\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nR : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁴ : LinearOrderedSemifield 𝕜\ninst✝³ : OrderedAddCommMonoid M\ninst✝² : OrderedAddCommMonoid N\ninst✝¹ : MulActionWithZero 𝕜 M\ninst✝ : MulActionWithZero 𝕜 N\nh : ∀ ⦃a b : M⦄ ⦃c : 𝕜⦄, a < b → 0 < c → c • a ≤ c • b\n⊢ ∀ (a b : M) (c : 𝕜), a < b → 0 < c → c • a < c • b\n[PROOFSTEP]\nrefine' fun a b c hab hc => (h hab hc).lt_of_ne _\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nR : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁴ : LinearOrderedSemifield 𝕜\ninst✝³ : OrderedAddCommMonoid M\ninst✝² : OrderedAddCommMonoid N\ninst✝¹ : MulActionWithZero 𝕜 M\ninst✝ : MulActionWithZero 𝕜 N\nh : ∀ ⦃a b : M⦄ ⦃c : 𝕜⦄, a < b → 0 < c → c • a ≤ c • b\na b : M\nc : 𝕜\nhab : a < b\nhc : 0 < c\n⊢ c • a ≠ c • b\n[PROOFSTEP]\nrw [Ne.def, hc.ne'.isUnit.smul_left_cancel]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nR : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁴ : LinearOrderedSemifield 𝕜\ninst✝³ : OrderedAddCommMonoid M\ninst✝² : OrderedAddCommMonoid N\ninst✝¹ : MulActionWithZero 𝕜 M\ninst✝ : MulActionWithZero 𝕜 N\nh : ∀ ⦃a b : M⦄ ⦃c : 𝕜⦄, a < b → 0 < c → c • a ≤ c • b\na b : M\nc : 𝕜\nhab : a < b\nhc : 0 < c\n⊢ ¬a = b\n[PROOFSTEP]\nexact hab.ne\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nR : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁴ : LinearOrderedSemifield 𝕜\ninst✝³ : OrderedAddCommMonoid M\ninst✝² : OrderedAddCommMonoid N\ninst✝¹ : MulActionWithZero 𝕜 M\ninst✝ : MulActionWithZero 𝕜 N\nh : ∀ ⦃a b : M⦄ ⦃c : 𝕜⦄, a < b → 0 < c → c • a ≤ c • b\nhlt' : ∀ (a b : M) (c : 𝕜), a < b → 0 < c → c • a < c • b\n⊢ OrderedSMul 𝕜 M\n[PROOFSTEP]\nrefine' { smul_lt_smul_of_pos := fun {a b c} => hlt' a b c .. }\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nR : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁴ : LinearOrderedSemifield 𝕜\ninst✝³ : OrderedAddCommMonoid M\ninst✝² : OrderedAddCommMonoid N\ninst✝¹ : MulActionWithZero 𝕜 M\ninst✝ : MulActionWithZero 𝕜 N\nh : ∀ ⦃a b : M⦄ ⦃c : 𝕜⦄, a < b → 0 < c → c • a ≤ c • b\nhlt' : ∀ (a b : M) (c : 𝕜), a < b → 0 < c → c • a < c • b\n⊢ ∀ {a b : M} {c : 𝕜}, c • a < c • b → 0 < c → a < b\n[PROOFSTEP]\nintro a b c hab hc\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nR : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁴ : LinearOrderedSemifield 𝕜\ninst✝³ : OrderedAddCommMonoid M\ninst✝² : OrderedAddCommMonoid N\ninst✝¹ : MulActionWithZero 𝕜 M\ninst✝ : MulActionWithZero 𝕜 N\nh : ∀ ⦃a b : M⦄ ⦃c : 𝕜⦄, a < b → 0 < c → c • a ≤ c • b\nhlt' : ∀ (a b : M) (c : 𝕜), a < b → 0 < c → c • a < c • b\na b : M\nc : 𝕜\nhab : c • a < c • b\nhc : 0 < c\n⊢ a < b\n[PROOFSTEP]\nobtain ⟨c, rfl⟩ := hc.ne'.isUnit\n[GOAL]\ncase intro\nι : Type u_1\n𝕜 : Type u_2\nR : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁴ : LinearOrderedSemifield 𝕜\ninst✝³ : OrderedAddCommMonoid M\ninst✝² : OrderedAddCommMonoid N\ninst✝¹ : MulActionWithZero 𝕜 M\ninst✝ : MulActionWithZero 𝕜 N\nh : ∀ ⦃a b : M⦄ ⦃c : 𝕜⦄, a < b → 0 < c → c • a ≤ c • b\nhlt' : ∀ (a b : M) (c : 𝕜), a < b → 0 < c → c • a < c • b\na b : M\nc : 𝕜ˣ\nhab : ↑c • a < ↑c • b\nhc : 0 < ↑c\n⊢ a < b\n[PROOFSTEP]\nrw [← inv_smul_smul c a, ← inv_smul_smul c b]\n[GOAL]\ncase intro\nι : Type u_1\n𝕜 : Type u_2\nR : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁴ : LinearOrderedSemifield 𝕜\ninst✝³ : OrderedAddCommMonoid M\ninst✝² : OrderedAddCommMonoid N\ninst✝¹ : MulActionWithZero 𝕜 M\ninst✝ : MulActionWithZero 𝕜 N\nh : ∀ ⦃a b : M⦄ ⦃c : 𝕜⦄, a < b → 0 < c → c • a ≤ c • b\nhlt' : ∀ (a b : M) (c : 𝕜), a < b → 0 < c → c • a < c • b\na b : M\nc : 𝕜ˣ\nhab : ↑c • a < ↑c • b\nhc : 0 < ↑c\n⊢ c⁻¹ • c • a < c⁻¹ • c • b\n[PROOFSTEP]\nrefine' hlt' _ _ _ hab (pos_of_mul_pos_right _ hc.le)\n[GOAL]\ncase intro\nι : Type u_1\n𝕜 : Type u_2\nR : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁴ : LinearOrderedSemifield 𝕜\ninst✝³ : OrderedAddCommMonoid M\ninst✝² : OrderedAddCommMonoid N\ninst✝¹ : MulActionWithZero 𝕜 M\ninst✝ : MulActionWithZero 𝕜 N\nh : ∀ ⦃a b : M⦄ ⦃c : 𝕜⦄, a < b → 0 < c → c • a ≤ c • b\nhlt' : ∀ (a b : M) (c : 𝕜), a < b → 0 < c → c • a < c • b\na b : M\nc : 𝕜ˣ\nhab : ↑c • a < ↑c • b\nhc : 0 < ↑c\n⊢ 0 < ↑c * ↑c⁻¹\n[PROOFSTEP]\nsimp only [c.mul_inv, zero_lt_one]\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nR : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁵ : LinearOrderedSemifield 𝕜\ninst✝⁴ : OrderedAddCommMonoid M\ninst✝³ : OrderedAddCommMonoid N\ninst✝² : MulActionWithZero 𝕜 M\ninst✝¹ : MulActionWithZero 𝕜 N\ninst✝ : OrderedSMul 𝕜 M\ns : Set M\na b : M\nc : 𝕜\nh : 0 < c\n⊢ c⁻¹ • a ≤ b ↔ a ≤ c • b\n[PROOFSTEP]\nrw [← smul_le_smul_iff_of_pos h, smul_inv_smul₀ h.ne']\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nR : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁵ : LinearOrderedSemifield 𝕜\ninst✝⁴ : OrderedAddCommMonoid M\ninst✝³ : OrderedAddCommMonoid N\ninst✝² : MulActionWithZero 𝕜 M\ninst✝¹ : MulActionWithZero 𝕜 N\ninst✝ : OrderedSMul 𝕜 M\ns : Set M\na b : M\nc : 𝕜\nh : 0 < c\n⊢ c⁻¹ • a < b ↔ a < c • b\n[PROOFSTEP]\nrw [← smul_lt_smul_iff_of_pos h, smul_inv_smul₀ h.ne']\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nR : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁵ : LinearOrderedSemifield 𝕜\ninst✝⁴ : OrderedAddCommMonoid M\ninst✝³ : OrderedAddCommMonoid N\ninst✝² : MulActionWithZero 𝕜 M\ninst✝¹ : MulActionWithZero 𝕜 N\ninst✝ : OrderedSMul 𝕜 M\ns : Set M\na b : M\nc : 𝕜\nh : 0 < c\n⊢ a ≤ c⁻¹ • b ↔ c • a ≤ b\n[PROOFSTEP]\nrw [← smul_le_smul_iff_of_pos h, smul_inv_smul₀ h.ne']\n[GOAL]\nι : Type u_1\n𝕜 : Type u_2\nR : Type u_3\nM : Type u_4\nN : Type u_5\ninst✝⁵ : LinearOrderedSemifield 𝕜\ninst✝⁴ : OrderedAddCommMonoid M\ninst✝³ : OrderedAddCommMonoid N\ninst✝² : MulActionWithZero 𝕜 M\ninst✝¹ : MulActionWithZero 𝕜 N\ninst✝ : OrderedSMul 𝕜 M\ns : Set M\na b : M\nc : 𝕜\nh : 0 < c\n⊢ a < c⁻¹ • b ↔ c • a < b\n[PROOFSTEP]\nrw [← smul_lt_smul_iff_of_pos h, smul_inv_smul₀ h.ne']\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Order.SMul", "llama_tokens": 6751, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.785308580887758, "lm_q2_score": 0.665410558746814, "lm_q1q2_score": 0.5225526215971906}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\nK : Type u_3\ninst✝ : DivisionSemiring α\na✝ b✝ c✝ d a b c : α\n⊢ (a + b) / c = a / c + b / c\n[PROOFSTEP]\nsimp_rw [div_eq_mul_inv, add_mul]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nK : Type u_3\ninst✝ : DivisionSemiring α\na b c d : α\nh : b ≠ 0\n⊢ (b + a) / b = 1 + a / b\n[PROOFSTEP]\nrw [← div_self h, add_div]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nK : Type u_3\ninst✝ : DivisionSemiring α\na b c d : α\nh : b ≠ 0\n⊢ (a + b) / b = a / b + 1\n[PROOFSTEP]\nrw [← div_self h, add_div]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nK : Type u_3\ninst✝ : DivisionSemiring α\na b c d : α\nha : a ≠ 0\nhb : b ≠ 0\n⊢ 1 / a * (a + b) * (1 / b) = 1 / a + 1 / b\n[PROOFSTEP]\nrw [mul_add, one_div_mul_cancel ha, add_mul, one_mul, mul_assoc, mul_one_div_cancel hb, mul_one, add_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nK : Type u_3\ninst✝ : DivisionSemiring α\na✝ b✝ c d a b : α\nhc : c ≠ 0\n⊢ (a + b / c) * c = a * c + b\n[PROOFSTEP]\nrw [right_distrib, div_mul_cancel _ hc]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nK : Type u_3\ninst✝ : DivisionSemiring α\na✝ b✝ c✝ d a b c : α\nhc : c ≠ 0\n⊢ b + a / c = (b * c + a) / c\n[PROOFSTEP]\nrw [add_div, mul_div_cancel _ hc]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nK : Type u_3\ninst✝ : DivisionSemiring α\na✝ b✝ c✝ d a b c : α\nhc : c ≠ 0\n⊢ a / c + b = (a + b * c) / c\n[PROOFSTEP]\nrwa [add_comm, add_div', add_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nK : Type u_3\ninst✝ : DivisionSemiring α\na b c d : α\nhbc : Commute b c\nhbd : Commute b d\nhb : b ≠ 0\nhd : d ≠ 0\n⊢ a / b + c / d = (a * d + b * c) / (b * d)\n[PROOFSTEP]\nrw [add_div, mul_div_mul_right _ b hd, hbc.eq, hbd.eq, mul_div_mul_right c d hb]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nK : Type u_3\ninst✝ : DivisionSemiring α\na b c d : α\nhab : Commute a b\nha : a ≠ 0\nhb : b ≠ 0\n⊢ 1 / a + 1 / b = (a + b) / (a * b)\n[PROOFSTEP]\nrw [(Commute.one_right a).div_add_div hab ha hb, one_mul, mul_one, add_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nK : Type u_3\ninst✝ : DivisionSemiring α\na b c d : α\nhab : Commute a b\nha : a ≠ 0\nhb : b ≠ 0\n⊢ a⁻¹ + b⁻¹ = (a + b) / (a * b)\n[PROOFSTEP]\nrw [inv_eq_one_div, inv_eq_one_div, hab.one_div_add_one_div ha hb]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nK : Type u_3\ninst✝¹ : DivisionMonoid K\ninst✝ : HasDistribNeg K\na b : K\n⊢ -1 * -1 = 1\n[PROOFSTEP]\nrw [neg_mul_neg, one_mul]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nK : Type u_3\ninst✝¹ : DivisionMonoid K\ninst✝ : HasDistribNeg K\na✝ b a : K\n⊢ 1 / -a = 1 / (-1 * a)\n[PROOFSTEP]\nrw [neg_eq_neg_one_mul]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nK : Type u_3\ninst✝¹ : DivisionMonoid K\ninst✝ : HasDistribNeg K\na✝ b a : K\n⊢ 1 / (-1 * a) = 1 / a * (1 / -1)\n[PROOFSTEP]\nrw [one_div_mul_one_div_rev]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nK : Type u_3\ninst✝¹ : DivisionMonoid K\ninst✝ : HasDistribNeg K\na✝ b a : K\n⊢ 1 / a * (1 / -1) = 1 / a * -1\n[PROOFSTEP]\nrw [one_div_neg_one_eq_neg_one]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nK : Type u_3\ninst✝¹ : DivisionMonoid K\ninst✝ : HasDistribNeg K\na✝ b a : K\n⊢ 1 / a * -1 = -(1 / a)\n[PROOFSTEP]\nrw [mul_neg, mul_one]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nK : Type u_3\ninst✝¹ : DivisionMonoid K\ninst✝ : HasDistribNeg K\na✝ b✝ a b : K\n⊢ b / -a = b * (1 / -a)\n[PROOFSTEP]\nrw [← inv_eq_one_div, division_def]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nK : Type u_3\ninst✝¹ : DivisionMonoid K\ninst✝ : HasDistribNeg K\na✝ b✝ a b : K\n⊢ b * (1 / -a) = b * -(1 / a)\n[PROOFSTEP]\nrw [one_div_neg_eq_neg_one_div]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nK : Type u_3\ninst✝¹ : DivisionMonoid K\ninst✝ : HasDistribNeg K\na✝ b✝ a b : K\n⊢ b * -(1 / a) = -(b * (1 / a))\n[PROOFSTEP]\nrw [neg_mul_eq_mul_neg]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nK : Type u_3\ninst✝¹ : DivisionMonoid K\ninst✝ : HasDistribNeg K\na✝ b✝ a b : K\n⊢ -(b * (1 / a)) = -(b / a)\n[PROOFSTEP]\nrw [mul_one_div]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nK : Type u_3\ninst✝¹ : DivisionMonoid K\ninst✝ : HasDistribNeg K\na✝ b✝ a b : K\n⊢ -b / a = -(b / a)\n[PROOFSTEP]\nrw [neg_eq_neg_one_mul, mul_div_assoc, ← neg_eq_neg_one_mul]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nK : Type u_3\ninst✝¹ : DivisionMonoid K\ninst✝ : HasDistribNeg K\na✝ b✝ a b : K\n⊢ -(b / a) = -b / a\n[PROOFSTEP]\nsimp [neg_div]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nK : Type u_3\ninst✝¹ : DivisionMonoid K\ninst✝ : HasDistribNeg K\na✝ b✝ a b : K\n⊢ -a / -b = a / b\n[PROOFSTEP]\nrw [div_neg_eq_neg_div, neg_div, neg_neg]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nK : Type u_3\ninst✝¹ : DivisionMonoid K\ninst✝ : HasDistribNeg K\na b : K\n⊢ -a⁻¹ = (-a)⁻¹\n[PROOFSTEP]\nrw [inv_eq_one_div, inv_eq_one_div, div_neg_eq_neg_div]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nK : Type u_3\ninst✝¹ : DivisionMonoid K\ninst✝ : HasDistribNeg K\na✝ b a : K\n⊢ a / -b = -(a / b)\n[PROOFSTEP]\nrw [← div_neg_eq_neg_div]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nK : Type u_3\ninst✝¹ : DivisionMonoid K\ninst✝ : HasDistribNeg K\na b : K\n⊢ (-a)⁻¹ = -a⁻¹\n[PROOFSTEP]\nrw [neg_inv]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nK : Type u_3\ninst✝¹ : DivisionMonoid K\ninst✝ : HasDistribNeg K\na b : K\n⊢ (-1)⁻¹ = -1\n[PROOFSTEP]\nrw [← neg_inv, inv_one]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nK : Type u_3\ninst✝ : DivisionRing K\na✝ b c d a : K\nh : a ≠ 0\n⊢ a / -a = -1\n[PROOFSTEP]\nrw [div_neg_eq_neg_div, div_self h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nK : Type u_3\ninst✝ : DivisionRing K\na✝ b c d a : K\nh : a ≠ 0\n⊢ -a / a = -1\n[PROOFSTEP]\nrw [neg_div, div_self h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nK : Type u_3\ninst✝ : DivisionRing K\na✝ b✝ c✝ d a b c : K\n⊢ a / c - b / c = (a - b) / c\n[PROOFSTEP]\nrw [sub_eq_add_neg, ← neg_div, div_add_div_same, sub_eq_add_neg]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nK : Type u_3\ninst✝ : DivisionRing K\na✝ b✝ c d a b : K\nh : b ≠ 0\n⊢ (b - a) / b = 1 - a / b\n[PROOFSTEP]\nsimpa only [← @div_self _ _ b h] using (div_sub_div_same b a b).symm\n[GOAL]\nα : Type u_1\nβ : Type u_2\nK : Type u_3\ninst✝ : DivisionRing K\na✝ b✝ c d a b : K\nh : b ≠ 0\n⊢ (a - b) / b = a / b - 1\n[PROOFSTEP]\nsimpa only [← @div_self _ _ b h] using (div_sub_div_same a b b).symm\n[GOAL]\nα : Type u_1\nβ : Type u_2\nK : Type u_3\ninst✝ : DivisionRing K\na✝ b✝ c d a b : K\nha : a ≠ 0\nhb : b ≠ 0\n⊢ a⁻¹ - b⁻¹ = a⁻¹ * (b - a) * b⁻¹\n[PROOFSTEP]\nrw [mul_sub, sub_mul, mul_inv_cancel_right₀ hb, inv_mul_cancel ha, one_mul]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nK : Type u_3\ninst✝ : DivisionRing K\na b c d : K\nha : a ≠ 0\nhb : b ≠ 0\n⊢ 1 / a * (b - a) * (1 / b) = 1 / a - 1 / b\n[PROOFSTEP]\nrw [mul_sub_left_distrib (1 / a), one_div_mul_cancel ha, mul_sub_right_distrib, one_mul, mul_assoc,\n  mul_one_div_cancel hb, mul_one]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nK : Type u_3\ninst✝ : DivisionRing K\na b c d : K\nhbc : Commute b c\nhbd : Commute b d\nhb : b ≠ 0\nhd : d ≠ 0\n⊢ a / b - c / d = (a * d - b * c) / (b * d)\n[PROOFSTEP]\nsimpa only [mul_neg, neg_div, ← sub_eq_add_neg] using hbc.neg_right.div_add_div hbd hb hd\n[GOAL]\nα : Type u_1\nβ : Type u_2\nK : Type u_3\ninst✝ : DivisionRing K\na b c d : K\nhab : Commute a b\nha : a ≠ 0\nhb : b ≠ 0\n⊢ a⁻¹ - b⁻¹ = (b - a) / (a * b)\n[PROOFSTEP]\nsimp only [inv_eq_one_div, (Commute.one_right a).div_sub_div hab ha hb, one_mul, mul_one]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nK : Type u_3\ninst✝ : Field K\na b : K\nha : a ≠ 0\nhb : b ≠ 0\n⊢ a⁻¹ - b⁻¹ = (b - a) / (a * b)\n[PROOFSTEP]\nrw [inv_eq_one_div, inv_eq_one_div, div_sub_div _ _ ha hb, one_mul, mul_one]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nK : Type u_3\ninst✝ : Field K\na b c : K\nhc : c ≠ 0\n⊢ b - a / c = (b * c - a) / c\n[PROOFSTEP]\nsimpa using div_sub_div b a one_ne_zero hc\n[GOAL]\nα : Type u_1\nβ : Type u_2\nK : Type u_3\ninst✝ : Field K\na b c : K\nhc : c ≠ 0\n⊢ a / c - b = (a - c * b) / c\n[PROOFSTEP]\nsimpa using div_sub_div a b hc one_ne_zero\n[GOAL]\nα : Type u_1\nβ : Type u_2\nK : Type u_3\ninst✝¹⁶ : DivisionRing K\nK' : Type ?u.52132\ninst✝¹⁵ : Zero K'\ninst✝¹⁴ : One K'\ninst✝¹³ : Add K'\ninst✝¹² : Mul K'\ninst✝¹¹ : Neg K'\ninst✝¹⁰ : Sub K'\ninst✝⁹ : Inv K'\ninst✝⁸ : Div K'\ninst✝⁷ : SMul ℕ K'\ninst✝⁶ : SMul ℤ K'\ninst✝⁵ : SMul ℚ K'\ninst✝⁴ : Pow K' ℕ\ninst✝³ : Pow K' ℤ\ninst✝² : NatCast K'\ninst✝¹ : IntCast K'\ninst✝ : RatCast K'\nf : K' → K\nhf : Injective f\nzero : f 0 = 0\none : f 1 = 1\nadd : ∀ (x y : K'), f (x + y) = f x + f y\nmul : ∀ (x y : K'), f (x * y) = f x * f y\nneg : ∀ (x : K'), f (-x) = -f x\nsub : ∀ (x y : K'), f (x - y) = f x - f y\ninv : ∀ (x : K'), f x⁻¹ = (f x)⁻¹\ndiv : ∀ (x y : K'), f (x / y) = f x / f y\nnsmul : ∀ (x : K') (n : ℕ), f (n • x) = n • f x\nzsmul : ∀ (x : K') (n : ℤ), f (n • x) = n • f x\nqsmul : ∀ (x : K') (n : ℚ), f (n • x) = n • f x\nnpow : ∀ (x : K') (n : ℕ), f (x ^ n) = f x ^ n\nzpow : ∀ (x : K') (n : ℤ), f (x ^ n) = f x ^ n\nnat_cast : ∀ (n : ℕ), f ↑n = ↑n\nint_cast : ∀ (n : ℤ), f ↑n = ↑n\nrat_cast : ∀ (n : ℚ), f ↑n = ↑n\nsrc✝¹ : GroupWithZero K' := Injective.groupWithZero f hf zero one mul inv div npow zpow\nsrc✝ : Ring K' := Injective.ring f hf zero one add mul neg sub nsmul zsmul npow nat_cast int_cast\na : ℤ\nb : ℕ\nh1 : b ≠ 0\nh2 : Nat.coprime (Int.natAbs a) b\n⊢ f ↑(Rat.mk' a b) = f (↑a * (↑b)⁻¹)\n[PROOFSTEP]\nerw [rat_cast, mul, inv, int_cast, nat_cast]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nK : Type u_3\ninst✝¹⁶ : DivisionRing K\nK' : Type ?u.52132\ninst✝¹⁵ : Zero K'\ninst✝¹⁴ : One K'\ninst✝¹³ : Add K'\ninst✝¹² : Mul K'\ninst✝¹¹ : Neg K'\ninst✝¹⁰ : Sub K'\ninst✝⁹ : Inv K'\ninst✝⁸ : Div K'\ninst✝⁷ : SMul ℕ K'\ninst✝⁶ : SMul ℤ K'\ninst✝⁵ : SMul ℚ K'\ninst✝⁴ : Pow K' ℕ\ninst✝³ : Pow K' ℤ\ninst✝² : NatCast K'\ninst✝¹ : IntCast K'\ninst✝ : RatCast K'\nf : K' → K\nhf : Injective f\nzero : f 0 = 0\none : f 1 = 1\nadd : ∀ (x y : K'), f (x + y) = f x + f y\nmul : ∀ (x y : K'), f (x * y) = f x * f y\nneg : ∀ (x : K'), f (-x) = -f x\nsub : ∀ (x y : K'), f (x - y) = f x - f y\ninv : ∀ (x : K'), f x⁻¹ = (f x)⁻¹\ndiv : ∀ (x y : K'), f (x / y) = f x / f y\nnsmul : ∀ (x : K') (n : ℕ), f (n • x) = n • f x\nzsmul : ∀ (x : K') (n : ℤ), f (n • x) = n • f x\nqsmul : ∀ (x : K') (n : ℚ), f (n • x) = n • f x\nnpow : ∀ (x : K') (n : ℕ), f (x ^ n) = f x ^ n\nzpow : ∀ (x : K') (n : ℤ), f (x ^ n) = f x ^ n\nnat_cast : ∀ (n : ℕ), f ↑n = ↑n\nint_cast : ∀ (n : ℤ), f ↑n = ↑n\nrat_cast : ∀ (n : ℚ), f ↑n = ↑n\nsrc✝¹ : GroupWithZero K' := Injective.groupWithZero f hf zero one mul inv div npow zpow\nsrc✝ : Ring K' := Injective.ring f hf zero one add mul neg sub nsmul zsmul npow nat_cast int_cast\na : ℤ\nb : ℕ\nh1 : b ≠ 0\nh2 : Nat.coprime (Int.natAbs a) b\n⊢ ↑(Rat.mk' a b) = ↑a * (↑b)⁻¹\n[PROOFSTEP]\nexact DivisionRing.ratCast_mk a b h1 h2\n[GOAL]\nα : Type u_1\nβ : Type u_2\nK : Type u_3\ninst✝¹⁶ : DivisionRing K\nK' : Type ?u.52132\ninst✝¹⁵ : Zero K'\ninst✝¹⁴ : One K'\ninst✝¹³ : Add K'\ninst✝¹² : Mul K'\ninst✝¹¹ : Neg K'\ninst✝¹⁰ : Sub K'\ninst✝⁹ : Inv K'\ninst✝⁸ : Div K'\ninst✝⁷ : SMul ℕ K'\ninst✝⁶ : SMul ℤ K'\ninst✝⁵ : SMul ℚ K'\ninst✝⁴ : Pow K' ℕ\ninst✝³ : Pow K' ℤ\ninst✝² : NatCast K'\ninst✝¹ : IntCast K'\ninst✝ : RatCast K'\nf : K' → K\nhf : Injective f\nzero : f 0 = 0\none : f 1 = 1\nadd : ∀ (x y : K'), f (x + y) = f x + f y\nmul : ∀ (x y : K'), f (x * y) = f x * f y\nneg : ∀ (x : K'), f (-x) = -f x\nsub : ∀ (x y : K'), f (x - y) = f x - f y\ninv : ∀ (x : K'), f x⁻¹ = (f x)⁻¹\ndiv : ∀ (x y : K'), f (x / y) = f x / f y\nnsmul : ∀ (x : K') (n : ℕ), f (n • x) = n • f x\nzsmul : ∀ (x : K') (n : ℤ), f (n • x) = n • f x\nqsmul : ∀ (x : K') (n : ℚ), f (n • x) = n • f x\nnpow : ∀ (x : K') (n : ℕ), f (x ^ n) = f x ^ n\nzpow : ∀ (x : K') (n : ℤ), f (x ^ n) = f x ^ n\nnat_cast : ∀ (n : ℕ), f ↑n = ↑n\nint_cast : ∀ (n : ℤ), f ↑n = ↑n\nrat_cast : ∀ (n : ℚ), f ↑n = ↑n\nsrc✝¹ : GroupWithZero K' := Injective.groupWithZero f hf zero one mul inv div npow zpow\nsrc✝ : Ring K' := Injective.ring f hf zero one add mul neg sub nsmul zsmul npow nat_cast int_cast\na : ℚ\nx : K'\n⊢ f ((fun x x_1 => x • x_1) a x) = f (↑a * x)\n[PROOFSTEP]\nerw [qsmul, mul, Rat.smul_def, rat_cast]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nK : Type u_3\ninst✝¹⁶ : Field K\nK' : Type ?u.64255\ninst✝¹⁵ : Zero K'\ninst✝¹⁴ : Mul K'\ninst✝¹³ : Add K'\ninst✝¹² : Neg K'\ninst✝¹¹ : Sub K'\ninst✝¹⁰ : One K'\ninst✝⁹ : Inv K'\ninst✝⁸ : Div K'\ninst✝⁷ : SMul ℕ K'\ninst✝⁶ : SMul ℤ K'\ninst✝⁵ : SMul ℚ K'\ninst✝⁴ : Pow K' ℕ\ninst✝³ : Pow K' ℤ\ninst✝² : NatCast K'\ninst✝¹ : IntCast K'\ninst✝ : RatCast K'\nf : K' → K\nhf : Injective f\nzero : f 0 = 0\none : f 1 = 1\nadd : ∀ (x y : K'), f (x + y) = f x + f y\nmul : ∀ (x y : K'), f (x * y) = f x * f y\nneg : ∀ (x : K'), f (-x) = -f x\nsub : ∀ (x y : K'), f (x - y) = f x - f y\ninv : ∀ (x : K'), f x⁻¹ = (f x)⁻¹\ndiv : ∀ (x y : K'), f (x / y) = f x / f y\nnsmul : ∀ (x : K') (n : ℕ), f (n • x) = n • f x\nzsmul : ∀ (x : K') (n : ℤ), f (n • x) = n • f x\nqsmul : ∀ (x : K') (n : ℚ), f (n • x) = n • f x\nnpow : ∀ (x : K') (n : ℕ), f (x ^ n) = f x ^ n\nzpow : ∀ (x : K') (n : ℤ), f (x ^ n) = f x ^ n\nnat_cast : ∀ (n : ℕ), f ↑n = ↑n\nint_cast : ∀ (n : ℤ), f ↑n = ↑n\nrat_cast : ∀ (n : ℚ), f ↑n = ↑n\nsrc✝¹ : CommGroupWithZero K' := Injective.commGroupWithZero f hf zero one mul inv div npow zpow\nsrc✝ : CommRing K' := Injective.commRing f hf zero one add mul neg sub nsmul zsmul npow nat_cast int_cast\na : ℤ\nb : ℕ\nh1 : b ≠ 0\nh2 : Nat.coprime (Int.natAbs a) b\n⊢ f ↑(Rat.mk' a b) = f (↑a * (↑b)⁻¹)\n[PROOFSTEP]\nerw [rat_cast, mul, inv, int_cast, nat_cast]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nK : Type u_3\ninst✝¹⁶ : Field K\nK' : Type ?u.64255\ninst✝¹⁵ : Zero K'\ninst✝¹⁴ : Mul K'\ninst✝¹³ : Add K'\ninst✝¹² : Neg K'\ninst✝¹¹ : Sub K'\ninst✝¹⁰ : One K'\ninst✝⁹ : Inv K'\ninst✝⁸ : Div K'\ninst✝⁷ : SMul ℕ K'\ninst✝⁶ : SMul ℤ K'\ninst✝⁵ : SMul ℚ K'\ninst✝⁴ : Pow K' ℕ\ninst✝³ : Pow K' ℤ\ninst✝² : NatCast K'\ninst✝¹ : IntCast K'\ninst✝ : RatCast K'\nf : K' → K\nhf : Injective f\nzero : f 0 = 0\none : f 1 = 1\nadd : ∀ (x y : K'), f (x + y) = f x + f y\nmul : ∀ (x y : K'), f (x * y) = f x * f y\nneg : ∀ (x : K'), f (-x) = -f x\nsub : ∀ (x y : K'), f (x - y) = f x - f y\ninv : ∀ (x : K'), f x⁻¹ = (f x)⁻¹\ndiv : ∀ (x y : K'), f (x / y) = f x / f y\nnsmul : ∀ (x : K') (n : ℕ), f (n • x) = n • f x\nzsmul : ∀ (x : K') (n : ℤ), f (n • x) = n • f x\nqsmul : ∀ (x : K') (n : ℚ), f (n • x) = n • f x\nnpow : ∀ (x : K') (n : ℕ), f (x ^ n) = f x ^ n\nzpow : ∀ (x : K') (n : ℤ), f (x ^ n) = f x ^ n\nnat_cast : ∀ (n : ℕ), f ↑n = ↑n\nint_cast : ∀ (n : ℤ), f ↑n = ↑n\nrat_cast : ∀ (n : ℚ), f ↑n = ↑n\nsrc✝¹ : CommGroupWithZero K' := Injective.commGroupWithZero f hf zero one mul inv div npow zpow\nsrc✝ : CommRing K' := Injective.commRing f hf zero one add mul neg sub nsmul zsmul npow nat_cast int_cast\na : ℤ\nb : ℕ\nh1 : b ≠ 0\nh2 : Nat.coprime (Int.natAbs a) b\n⊢ ↑(Rat.mk' a b) = ↑a * (↑b)⁻¹\n[PROOFSTEP]\nexact DivisionRing.ratCast_mk a b h1 h2\n[GOAL]\nα : Type u_1\nβ : Type u_2\nK : Type u_3\ninst✝¹⁶ : Field K\nK' : Type ?u.64255\ninst✝¹⁵ : Zero K'\ninst✝¹⁴ : Mul K'\ninst✝¹³ : Add K'\ninst✝¹² : Neg K'\ninst✝¹¹ : Sub K'\ninst✝¹⁰ : One K'\ninst✝⁹ : Inv K'\ninst✝⁸ : Div K'\ninst✝⁷ : SMul ℕ K'\ninst✝⁶ : SMul ℤ K'\ninst✝⁵ : SMul ℚ K'\ninst✝⁴ : Pow K' ℕ\ninst✝³ : Pow K' ℤ\ninst✝² : NatCast K'\ninst✝¹ : IntCast K'\ninst✝ : RatCast K'\nf : K' → K\nhf : Injective f\nzero : f 0 = 0\none : f 1 = 1\nadd : ∀ (x y : K'), f (x + y) = f x + f y\nmul : ∀ (x y : K'), f (x * y) = f x * f y\nneg : ∀ (x : K'), f (-x) = -f x\nsub : ∀ (x y : K'), f (x - y) = f x - f y\ninv : ∀ (x : K'), f x⁻¹ = (f x)⁻¹\ndiv : ∀ (x y : K'), f (x / y) = f x / f y\nnsmul : ∀ (x : K') (n : ℕ), f (n • x) = n • f x\nzsmul : ∀ (x : K') (n : ℤ), f (n • x) = n • f x\nqsmul : ∀ (x : K') (n : ℚ), f (n • x) = n • f x\nnpow : ∀ (x : K') (n : ℕ), f (x ^ n) = f x ^ n\nzpow : ∀ (x : K') (n : ℤ), f (x ^ n) = f x ^ n\nnat_cast : ∀ (n : ℕ), f ↑n = ↑n\nint_cast : ∀ (n : ℤ), f ↑n = ↑n\nrat_cast : ∀ (n : ℚ), f ↑n = ↑n\nsrc✝¹ : CommGroupWithZero K' := Injective.commGroupWithZero f hf zero one mul inv div npow zpow\nsrc✝ : CommRing K' := Injective.commRing f hf zero one add mul neg sub nsmul zsmul npow nat_cast int_cast\na : ℚ\nx : K'\n⊢ f ((fun x x_1 => x • x_1) a x) = f (↑a * x)\n[PROOFSTEP]\nerw [qsmul, mul, Rat.smul_def, rat_cast]\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Field.Basic", "llama_tokens": 8555, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7577943822145998, "lm_q2_score": 0.6893056040203135, "lm_q1q2_score": 0.522351914355635}}
{"text": "[GOAL]\nα : Sort ?u.352\np q : Prop\ns : α → Prop\n⊢ ¬p ∧ q ∨ ¬¬p ∧ ¬q ↔ p ∧ ¬q ∨ ¬p ∧ q\n[PROOFSTEP]\nrw [not_not, or_comm]\n", "meta": {"mathlib_filename": "Mathlib.Tactic.PushNeg", "llama_tokens": 79, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES\n\n", "lm_q1_score": 0.8198933447152497, "lm_q2_score": 0.6370308082623217, "lm_q1q2_score": 0.5222973200728539}}
{"text": "[GOAL]\nX : Type u_1\nY : Type u_2\nZ : Type u_3\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : TopologicalSpace Z\ng : Y → Z\nf : X → Y\ns : Set X\nt : Set Y\nh : ∀ (x : X), x ∈ s → ∃ e, x ∈ e.source ∧ ∀ (y : X), y ∈ e.source → f y = ↑e y\n⊢ IsLocallyHomeomorphOn f s\n[PROOFSTEP]\nintro x hx\n[GOAL]\nX : Type u_1\nY : Type u_2\nZ : Type u_3\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : TopologicalSpace Z\ng : Y → Z\nf : X → Y\ns : Set X\nt : Set Y\nh : ∀ (x : X), x ∈ s → ∃ e, x ∈ e.source ∧ ∀ (y : X), y ∈ e.source → f y = ↑e y\nx : X\nhx : x ∈ s\n⊢ ∃ e, x ∈ e.source ∧ f = ↑e\n[PROOFSTEP]\nobtain ⟨e, hx, he⟩ := h x hx\n[GOAL]\ncase intro.intro\nX : Type u_1\nY : Type u_2\nZ : Type u_3\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : TopologicalSpace Z\ng : Y → Z\nf : X → Y\ns : Set X\nt : Set Y\nh : ∀ (x : X), x ∈ s → ∃ e, x ∈ e.source ∧ ∀ (y : X), y ∈ e.source → f y = ↑e y\nx : X\nhx✝ : x ∈ s\ne : LocalHomeomorph X Y\nhx : x ∈ e.source\nhe : ∀ (y : X), y ∈ e.source → f y = ↑e y\n⊢ ∃ e, x ∈ e.source ∧ f = ↑e\n[PROOFSTEP]\nexact\n  ⟨{ e with\n      toFun := f\n      map_source' := fun x hx => by rw [he x hx]; exact e.map_source' hx\n      left_inv' := fun x hx => by rw [he x hx]; exact e.left_inv' hx\n      right_inv' := fun y hy => by rw [he _ (e.map_target' hy)]; exact e.right_inv' hy\n      continuous_toFun := (continuousOn_congr he).mpr e.continuous_toFun },\n    hx, rfl⟩\n[GOAL]\nX : Type u_1\nY : Type u_2\nZ : Type u_3\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : TopologicalSpace Z\ng : Y → Z\nf : X → Y\ns : Set X\nt : Set Y\nh : ∀ (x : X), x ∈ s → ∃ e, x ∈ e.source ∧ ∀ (y : X), y ∈ e.source → f y = ↑e y\nx✝ : X\nhx✝¹ : x✝ ∈ s\ne : LocalHomeomorph X Y\nhx✝ : x✝ ∈ e.source\nhe : ∀ (y : X), y ∈ e.source → f y = ↑e y\nx : X\nhx : x ∈ e.source\n⊢ f x ∈ e.target\n[PROOFSTEP]\nrw [he x hx]\n[GOAL]\nX : Type u_1\nY : Type u_2\nZ : Type u_3\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : TopologicalSpace Z\ng : Y → Z\nf : X → Y\ns : Set X\nt : Set Y\nh : ∀ (x : X), x ∈ s → ∃ e, x ∈ e.source ∧ ∀ (y : X), y ∈ e.source → f y = ↑e y\nx✝ : X\nhx✝¹ : x✝ ∈ s\ne : LocalHomeomorph X Y\nhx✝ : x✝ ∈ e.source\nhe : ∀ (y : X), y ∈ e.source → f y = ↑e y\nx : X\nhx : x ∈ e.source\n⊢ ↑e x ∈ e.target\n[PROOFSTEP]\nexact e.map_source' hx\n[GOAL]\nX : Type u_1\nY : Type u_2\nZ : Type u_3\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : TopologicalSpace Z\ng : Y → Z\nf : X → Y\ns : Set X\nt : Set Y\nh : ∀ (x : X), x ∈ s → ∃ e, x ∈ e.source ∧ ∀ (y : X), y ∈ e.source → f y = ↑e y\nx✝ : X\nhx✝¹ : x✝ ∈ s\ne : LocalHomeomorph X Y\nhx✝ : x✝ ∈ e.source\nhe : ∀ (y : X), y ∈ e.source → f y = ↑e y\nx : X\nhx : x ∈ e.source\n⊢ LocalEquiv.invFun e.toLocalEquiv (f x) = x\n[PROOFSTEP]\nrw [he x hx]\n[GOAL]\nX : Type u_1\nY : Type u_2\nZ : Type u_3\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : TopologicalSpace Z\ng : Y → Z\nf : X → Y\ns : Set X\nt : Set Y\nh : ∀ (x : X), x ∈ s → ∃ e, x ∈ e.source ∧ ∀ (y : X), y ∈ e.source → f y = ↑e y\nx✝ : X\nhx✝¹ : x✝ ∈ s\ne : LocalHomeomorph X Y\nhx✝ : x✝ ∈ e.source\nhe : ∀ (y : X), y ∈ e.source → f y = ↑e y\nx : X\nhx : x ∈ e.source\n⊢ LocalEquiv.invFun e.toLocalEquiv (↑e x) = x\n[PROOFSTEP]\nexact e.left_inv' hx\n[GOAL]\nX : Type u_1\nY : Type u_2\nZ : Type u_3\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : TopologicalSpace Z\ng : Y → Z\nf : X → Y\ns : Set X\nt : Set Y\nh : ∀ (x : X), x ∈ s → ∃ e, x ∈ e.source ∧ ∀ (y : X), y ∈ e.source → f y = ↑e y\nx : X\nhx✝ : x ∈ s\ne : LocalHomeomorph X Y\nhx : x ∈ e.source\nhe : ∀ (y : X), y ∈ e.source → f y = ↑e y\ny : Y\nhy : y ∈ e.target\n⊢ f (LocalEquiv.invFun e.toLocalEquiv y) = y\n[PROOFSTEP]\nrw [he _ (e.map_target' hy)]\n[GOAL]\nX : Type u_1\nY : Type u_2\nZ : Type u_3\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : TopologicalSpace Z\ng : Y → Z\nf : X → Y\ns : Set X\nt : Set Y\nh : ∀ (x : X), x ∈ s → ∃ e, x ∈ e.source ∧ ∀ (y : X), y ∈ e.source → f y = ↑e y\nx : X\nhx✝ : x ∈ s\ne : LocalHomeomorph X Y\nhx : x ∈ e.source\nhe : ∀ (y : X), y ∈ e.source → f y = ↑e y\ny : Y\nhy : y ∈ e.target\n⊢ ↑e (LocalEquiv.invFun e.toLocalEquiv y) = y\n[PROOFSTEP]\nexact e.right_inv' hy\n[GOAL]\nX : Type u_1\nY : Type u_2\nZ : Type u_3\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : TopologicalSpace Z\ng : Y → Z\nf : X → Y\ns : Set X\nt : Set Y\nhg : IsLocallyHomeomorphOn g t\nhf : IsLocallyHomeomorphOn f s\nh : Set.MapsTo f s t\n⊢ IsLocallyHomeomorphOn (g ∘ f) s\n[PROOFSTEP]\nintro x hx\n[GOAL]\nX : Type u_1\nY : Type u_2\nZ : Type u_3\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : TopologicalSpace Z\ng : Y → Z\nf : X → Y\ns : Set X\nt : Set Y\nhg : IsLocallyHomeomorphOn g t\nhf : IsLocallyHomeomorphOn f s\nh : Set.MapsTo f s t\nx : X\nhx : x ∈ s\n⊢ ∃ e, x ∈ e.source ∧ g ∘ f = ↑e\n[PROOFSTEP]\nobtain ⟨eg, hxg, rfl⟩ := hg (f x) (h hx)\n[GOAL]\ncase intro.intro\nX : Type u_1\nY : Type u_2\nZ : Type u_3\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : TopologicalSpace Z\nf : X → Y\ns : Set X\nt : Set Y\nhf : IsLocallyHomeomorphOn f s\nh : Set.MapsTo f s t\nx : X\nhx : x ∈ s\neg : LocalHomeomorph Y Z\nhxg : f x ∈ eg.source\nhg : IsLocallyHomeomorphOn (↑eg) t\n⊢ ∃ e, x ∈ e.source ∧ ↑eg ∘ f = ↑e\n[PROOFSTEP]\nobtain ⟨ef, hxf, rfl⟩ := hf x hx\n[GOAL]\ncase intro.intro.intro.intro\nX : Type u_1\nY : Type u_2\nZ : Type u_3\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : TopologicalSpace Z\ns : Set X\nt : Set Y\nx : X\nhx : x ∈ s\neg : LocalHomeomorph Y Z\nhg : IsLocallyHomeomorphOn (↑eg) t\nef : LocalHomeomorph X Y\nhxf : x ∈ ef.source\nhf : IsLocallyHomeomorphOn (↑ef) s\nh : Set.MapsTo (↑ef) s t\nhxg : ↑ef x ∈ eg.source\n⊢ ∃ e, x ∈ e.source ∧ ↑eg ∘ ↑ef = ↑e\n[PROOFSTEP]\nexact ⟨ef.trans eg, ⟨hxf, hxg⟩, rfl⟩\n[GOAL]\nX : Type u_1\nY : Type u_2\nZ : Type u_3\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : TopologicalSpace Z\ng : Y → Z\nf : X → Y\ns : Set X\nt : Set Y\n⊢ IsLocallyHomeomorph f ↔ IsLocallyHomeomorphOn f Set.univ\n[PROOFSTEP]\nsimp only [IsLocallyHomeomorph, IsLocallyHomeomorphOn, Set.mem_univ, forall_true_left]\n", "meta": {"mathlib_filename": "Mathlib.Topology.IsLocallyHomeomorph", "llama_tokens": 3034, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8152324893519999, "lm_q2_score": 0.640635854839898, "lm_q1q2_score": 0.5222671627092765}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nb : ℤ\n⊢ b ≤ ⌊↑(b + 1)⌋\n[PROOFSTEP]\nrw [floor_intCast]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nb : ℤ\n⊢ b ≤ b + 1\n[PROOFSTEP]\nexact (lt_add_one _).le\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nb : ℤ\n⊢ ⌈↑(b - 1)⌉ ≤ b\n[PROOFSTEP]\nrw [ceil_intCast]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : LinearOrderedRing α\ninst✝ : FloorRing α\nb : ℤ\n⊢ b - 1 ≤ b\n[PROOFSTEP]\nexact (sub_one_lt _).le\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : FloorRing α\ninst✝¹ : TopologicalSpace α\ninst✝ : OrderClosedTopology α\nn : ℤ\n⊢ Tendsto floor (𝓝[Ici ↑n] ↑n) (pure n)\n[PROOFSTEP]\nsimpa only [floor_intCast] using\n  tendsto_floor_right_pure_floor\n    (n : α)\n      -- porting note: new theorem\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : FloorRing α\ninst✝¹ : TopologicalSpace α\ninst✝ : OrderClosedTopology α\nn : ℤ\n⊢ Tendsto ceil (𝓝[Iic ↑n] ↑n) (pure n)\n[PROOFSTEP]\nsimpa only [ceil_intCast] using\n  tendsto_ceil_left_pure_ceil\n    (n : α)\n      -- porting note: new theorem\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : FloorRing α\ninst✝¹ : TopologicalSpace α\ninst✝ : OrderClosedTopology α\nx : α\n⊢ ↑(⌈x⌉ - 1) < x\n[PROOFSTEP]\nrw [cast_sub, cast_one, sub_lt_iff_lt_add]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : FloorRing α\ninst✝¹ : TopologicalSpace α\ninst✝ : OrderClosedTopology α\nx : α\n⊢ ↑⌈x⌉ < x + 1\n[PROOFSTEP]\nexact ceil_lt_add_one _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : FloorRing α\ninst✝¹ : TopologicalSpace α\ninst✝ : OrderClosedTopology α\nx : α\nh₁ : ↑(⌈x⌉ - 1) < x\n⊢ x ≤ ↑(⌈x⌉ - 1) + 1\n[PROOFSTEP]\nrw [cast_sub, cast_one, sub_add_cancel]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : FloorRing α\ninst✝¹ : TopologicalSpace α\ninst✝ : OrderClosedTopology α\nx : α\nh₁ : ↑(⌈x⌉ - 1) < x\n⊢ x ≤ ↑⌈x⌉\n[PROOFSTEP]\nexact le_ceil _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : FloorRing α\ninst✝¹ : TopologicalSpace α\ninst✝ : OrderClosedTopology α\nn : ℤ\n⊢ Tendsto floor (𝓝[Iio ↑n] ↑n) (pure (n - 1))\n[PROOFSTEP]\nsimpa only [ceil_intCast] using\n  tendsto_floor_left_pure_ceil_sub_one\n    (n : α)\n      -- porting note: new theorem\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : FloorRing α\ninst✝¹ : TopologicalSpace α\ninst✝ : OrderClosedTopology α\nx : α\n⊢ ↑(⌊x⌋ + 1) - 1 ≤ x\n[PROOFSTEP]\nrw [cast_add, cast_one, add_sub_cancel]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : FloorRing α\ninst✝¹ : TopologicalSpace α\ninst✝ : OrderClosedTopology α\nx : α\n⊢ ↑⌊x⌋ ≤ x\n[PROOFSTEP]\nexact floor_le _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : FloorRing α\ninst✝¹ : TopologicalSpace α\ninst✝ : OrderClosedTopology α\nn : ℤ\n⊢ Tendsto ceil (𝓝[Ioi ↑n] ↑n) (pure (n + 1))\n[PROOFSTEP]\nsimpa only [floor_intCast] using tendsto_ceil_right_pure_floor_add_one (n : α)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : FloorRing α\ninst✝¹ : TopologicalSpace α\ninst✝ : OrderClosedTopology α\nn : ℤ\n⊢ pure (IntCast.intCast (n - 1)) ≤ 𝓝[Iic (↑n - 1)] (↑n - 1)\n[PROOFSTEP]\nrw [← @cast_one α, ← cast_sub]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : FloorRing α\ninst✝¹ : TopologicalSpace α\ninst✝ : OrderClosedTopology α\nn : ℤ\n⊢ pure (IntCast.intCast (n - 1)) ≤ 𝓝[Iic ↑(n - 1)] ↑(n - 1)\n[PROOFSTEP]\nexact pure_le_nhdsWithin le_rfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : FloorRing α\ninst✝¹ : TopologicalSpace α\ninst✝ : OrderClosedTopology α\nn : ℤ\n⊢ pure (IntCast.intCast (n + 1)) ≤ 𝓝[Ici (↑n + 1)] (↑n + 1)\n[PROOFSTEP]\nrw [← @cast_one α, ← cast_add]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : FloorRing α\ninst✝¹ : TopologicalSpace α\ninst✝ : OrderClosedTopology α\nn : ℤ\n⊢ pure (IntCast.intCast (n + 1)) ≤ 𝓝[Ici ↑(n + 1)] ↑(n + 1)\n[PROOFSTEP]\nexact pure_le_nhdsWithin le_rfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁴ : LinearOrderedRing α\ninst✝³ : FloorRing α\ninst✝² : TopologicalSpace α\ninst✝¹ : OrderClosedTopology α\ninst✝ : TopologicalAddGroup α\nn : ℤ\n⊢ Tendsto fract (𝓝[Iio ↑n] ↑n) (𝓝 1)\n[PROOFSTEP]\nrw [← sub_sub_cancel (n : α) 1]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁴ : LinearOrderedRing α\ninst✝³ : FloorRing α\ninst✝² : TopologicalSpace α\ninst✝¹ : OrderClosedTopology α\ninst✝ : TopologicalAddGroup α\nn : ℤ\n⊢ Tendsto fract (𝓝[Iio ↑n] ↑n) (𝓝 (↑n - (↑n - 1)))\n[PROOFSTEP]\nrefine (tendsto_id.mono_left nhdsWithin_le_nhds).sub ?_\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁴ : LinearOrderedRing α\ninst✝³ : FloorRing α\ninst✝² : TopologicalSpace α\ninst✝¹ : OrderClosedTopology α\ninst✝ : TopologicalAddGroup α\nn : ℤ\n⊢ Tendsto (fun x => ↑⌊x⌋) (𝓝[Iio ↑n] ↑n) (𝓝 (↑n - 1))\n[PROOFSTEP]\nexact tendsto_floor_left' n\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁵ : LinearOrderedRing α\ninst✝⁴ : FloorRing α\ninst✝³ : TopologicalSpace α\ninst✝² : OrderTopology α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nf : β → α → γ\nh : ContinuousOn (uncurry f) (univ ×ˢ Icc 0 1)\nhf : ∀ (s : β), f s 0 = f s 1\n⊢ Continuous fun st => f st.fst (fract st.snd)\n[PROOFSTEP]\nchange Continuous (uncurry f ∘ Prod.map id fract)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁵ : LinearOrderedRing α\ninst✝⁴ : FloorRing α\ninst✝³ : TopologicalSpace α\ninst✝² : OrderTopology α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nf : β → α → γ\nh : ContinuousOn (uncurry f) (univ ×ˢ Icc 0 1)\nhf : ∀ (s : β), f s 0 = f s 1\n⊢ Continuous (uncurry f ∘ Prod.map id fract)\n[PROOFSTEP]\nrw [continuous_iff_continuousAt]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁵ : LinearOrderedRing α\ninst✝⁴ : FloorRing α\ninst✝³ : TopologicalSpace α\ninst✝² : OrderTopology α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nf : β → α → γ\nh : ContinuousOn (uncurry f) (univ ×ˢ Icc 0 1)\nhf : ∀ (s : β), f s 0 = f s 1\n⊢ ∀ (x : β × α), ContinuousAt (uncurry f ∘ Prod.map id fract) x\n[PROOFSTEP]\nrintro ⟨s, t⟩\n[GOAL]\ncase mk\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁵ : LinearOrderedRing α\ninst✝⁴ : FloorRing α\ninst✝³ : TopologicalSpace α\ninst✝² : OrderTopology α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nf : β → α → γ\nh : ContinuousOn (uncurry f) (univ ×ˢ Icc 0 1)\nhf : ∀ (s : β), f s 0 = f s 1\ns : β\nt : α\n⊢ ContinuousAt (uncurry f ∘ Prod.map id fract) (s, t)\n[PROOFSTEP]\nrcases em (∃ n : ℤ, t = n) with (⟨n, rfl⟩ | ht)\n[GOAL]\ncase mk.inl.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁵ : LinearOrderedRing α\ninst✝⁴ : FloorRing α\ninst✝³ : TopologicalSpace α\ninst✝² : OrderTopology α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nf : β → α → γ\nh : ContinuousOn (uncurry f) (univ ×ˢ Icc 0 1)\nhf : ∀ (s : β), f s 0 = f s 1\ns : β\nn : ℤ\n⊢ ContinuousAt (uncurry f ∘ Prod.map id fract) (s, ↑n)\n[PROOFSTEP]\nrw [ContinuousAt, nhds_prod_eq, ← nhds_left'_sup_nhds_right (n : α), prod_sup, tendsto_sup]\n[GOAL]\ncase mk.inl.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁵ : LinearOrderedRing α\ninst✝⁴ : FloorRing α\ninst✝³ : TopologicalSpace α\ninst✝² : OrderTopology α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nf : β → α → γ\nh : ContinuousOn (uncurry f) (univ ×ˢ Icc 0 1)\nhf : ∀ (s : β), f s 0 = f s 1\ns : β\nn : ℤ\n⊢ Tendsto (uncurry f ∘ Prod.map id fract) (𝓝 s ×ˢ 𝓝[Iio ↑n] ↑n) (𝓝 ((uncurry f ∘ Prod.map id fract) (s, ↑n))) ∧\n    Tendsto (uncurry f ∘ Prod.map id fract) (𝓝 s ×ˢ 𝓝[Ici ↑n] ↑n) (𝓝 ((uncurry f ∘ Prod.map id fract) (s, ↑n)))\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mk.inl.intro.left\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁵ : LinearOrderedRing α\ninst✝⁴ : FloorRing α\ninst✝³ : TopologicalSpace α\ninst✝² : OrderTopology α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nf : β → α → γ\nh : ContinuousOn (uncurry f) (univ ×ˢ Icc 0 1)\nhf : ∀ (s : β), f s 0 = f s 1\ns : β\nn : ℤ\n⊢ Tendsto (uncurry f ∘ Prod.map id fract) (𝓝 s ×ˢ 𝓝[Iio ↑n] ↑n) (𝓝 ((uncurry f ∘ Prod.map id fract) (s, ↑n)))\n[PROOFSTEP]\nrefine\n  (((h (s, 1) ⟨trivial, zero_le_one, le_rfl⟩).tendsto.mono_left ?_).comp\n        (tendsto_id.prod_map (tendsto_fract_left _))).mono_right\n    (le_of_eq ?_)\n[GOAL]\ncase mk.inl.intro.left.refine_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁵ : LinearOrderedRing α\ninst✝⁴ : FloorRing α\ninst✝³ : TopologicalSpace α\ninst✝² : OrderTopology α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nf : β → α → γ\nh : ContinuousOn (uncurry f) (univ ×ˢ Icc 0 1)\nhf : ∀ (s : β), f s 0 = f s 1\ns : β\nn : ℤ\n⊢ 𝓝 s ×ˢ 𝓝[Iio 1] 1 ≤ 𝓝[univ ×ˢ Icc 0 1] (s, 1)\n[PROOFSTEP]\nrw [nhdsWithin_prod_eq, nhdsWithin_univ, ← nhdsWithin_Ico_eq_nhdsWithin_Iio one_pos]\n[GOAL]\ncase mk.inl.intro.left.refine_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁵ : LinearOrderedRing α\ninst✝⁴ : FloorRing α\ninst✝³ : TopologicalSpace α\ninst✝² : OrderTopology α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nf : β → α → γ\nh : ContinuousOn (uncurry f) (univ ×ˢ Icc 0 1)\nhf : ∀ (s : β), f s 0 = f s 1\ns : β\nn : ℤ\n⊢ 𝓝 s ×ˢ 𝓝[Ico 0 1] 1 ≤ 𝓝 s ×ˢ 𝓝[Icc 0 1] 1\n[PROOFSTEP]\nexact Filter.prod_mono le_rfl (nhdsWithin_mono _ Ico_subset_Icc_self)\n[GOAL]\ncase mk.inl.intro.left.refine_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁵ : LinearOrderedRing α\ninst✝⁴ : FloorRing α\ninst✝³ : TopologicalSpace α\ninst✝² : OrderTopology α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nf : β → α → γ\nh : ContinuousOn (uncurry f) (univ ×ˢ Icc 0 1)\nhf : ∀ (s : β), f s 0 = f s 1\ns : β\nn : ℤ\n⊢ 𝓝 (uncurry f (s, 1)) = 𝓝 ((uncurry f ∘ Prod.map id fract) (s, ↑n))\n[PROOFSTEP]\nsimp [hf]\n[GOAL]\ncase mk.inl.intro.right\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁵ : LinearOrderedRing α\ninst✝⁴ : FloorRing α\ninst✝³ : TopologicalSpace α\ninst✝² : OrderTopology α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nf : β → α → γ\nh : ContinuousOn (uncurry f) (univ ×ˢ Icc 0 1)\nhf : ∀ (s : β), f s 0 = f s 1\ns : β\nn : ℤ\n⊢ Tendsto (uncurry f ∘ Prod.map id fract) (𝓝 s ×ˢ 𝓝[Ici ↑n] ↑n) (𝓝 ((uncurry f ∘ Prod.map id fract) (s, ↑n)))\n[PROOFSTEP]\nrefine\n  (((h (s, 0) ⟨trivial, le_rfl, zero_le_one⟩).tendsto.mono_left <| le_of_eq ?_).comp\n        (tendsto_id.prod_map (tendsto_fract_right _))).mono_right\n    (le_of_eq ?_)\n[GOAL]\ncase mk.inl.intro.right.refine_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁵ : LinearOrderedRing α\ninst✝⁴ : FloorRing α\ninst✝³ : TopologicalSpace α\ninst✝² : OrderTopology α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nf : β → α → γ\nh : ContinuousOn (uncurry f) (univ ×ˢ Icc 0 1)\nhf : ∀ (s : β), f s 0 = f s 1\ns : β\nn : ℤ\n⊢ 𝓝 s ×ˢ 𝓝[Ici 0] 0 = 𝓝[univ ×ˢ Icc 0 1] (s, 0)\n[PROOFSTEP]\nsimp [nhdsWithin_prod_eq, nhdsWithin_univ]\n[GOAL]\ncase mk.inl.intro.right.refine_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁵ : LinearOrderedRing α\ninst✝⁴ : FloorRing α\ninst✝³ : TopologicalSpace α\ninst✝² : OrderTopology α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nf : β → α → γ\nh : ContinuousOn (uncurry f) (univ ×ˢ Icc 0 1)\nhf : ∀ (s : β), f s 0 = f s 1\ns : β\nn : ℤ\n⊢ 𝓝 (uncurry f (s, 0)) = 𝓝 ((uncurry f ∘ Prod.map id fract) (s, ↑n))\n[PROOFSTEP]\nsimp [nhdsWithin_prod_eq, nhdsWithin_univ]\n[GOAL]\ncase mk.inr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁵ : LinearOrderedRing α\ninst✝⁴ : FloorRing α\ninst✝³ : TopologicalSpace α\ninst✝² : OrderTopology α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nf : β → α → γ\nh : ContinuousOn (uncurry f) (univ ×ˢ Icc 0 1)\nhf : ∀ (s : β), f s 0 = f s 1\ns : β\nt : α\nht : ¬∃ n, t = ↑n\n⊢ ContinuousAt (uncurry f ∘ Prod.map id fract) (s, t)\n[PROOFSTEP]\nreplace ht : t ≠ ⌊t⌋ := fun ht' => ht ⟨_, ht'⟩\n[GOAL]\ncase mk.inr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁵ : LinearOrderedRing α\ninst✝⁴ : FloorRing α\ninst✝³ : TopologicalSpace α\ninst✝² : OrderTopology α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nf : β → α → γ\nh : ContinuousOn (uncurry f) (univ ×ˢ Icc 0 1)\nhf : ∀ (s : β), f s 0 = f s 1\ns : β\nt : α\nht : t ≠ ↑⌊t⌋\n⊢ ContinuousAt (uncurry f ∘ Prod.map id fract) (s, t)\n[PROOFSTEP]\nrefine (h.continuousAt ?_).comp (continuousAt_id.prod_map (continuousAt_fract ht))\n[GOAL]\ncase mk.inr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝⁵ : LinearOrderedRing α\ninst✝⁴ : FloorRing α\ninst✝³ : TopologicalSpace α\ninst✝² : OrderTopology α\ninst✝¹ : TopologicalSpace β\ninst✝ : TopologicalSpace γ\nf : β → α → γ\nh : ContinuousOn (uncurry f) (univ ×ˢ Icc 0 1)\nhf : ∀ (s : β), f s 0 = f s 1\ns : β\nt : α\nht : t ≠ ↑⌊t⌋\n⊢ univ ×ˢ Icc 0 1 ∈ 𝓝 (Prod.map id fract (s, t))\n[PROOFSTEP]\nexact prod_mem_nhds univ_mem (Icc_mem_nhds (fract_pos.2 ht) (fract_lt_one _))\n", "meta": {"mathlib_filename": "Mathlib.Topology.Algebra.Order.Floor", "llama_tokens": 6737, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.743167997235783, "lm_q2_score": 0.7025300573952054, "lm_q1q2_score": 0.5220978557523345}}
{"text": "[GOAL]\nK : Type u\nV : Type v\ninst✝² : DivisionRing K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\n⊢ IsNoetherian K V ↔ Module.rank K V < ℵ₀\n[PROOFSTEP]\nlet b := Basis.ofVectorSpace K V\n[GOAL]\nK : Type u\nV : Type v\ninst✝² : DivisionRing K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nb : Basis (↑(Basis.ofVectorSpaceIndex K V)) K V := Basis.ofVectorSpace K V\n⊢ IsNoetherian K V ↔ Module.rank K V < ℵ₀\n[PROOFSTEP]\nrw [← b.mk_eq_rank'', lt_aleph0_iff_set_finite]\n[GOAL]\nK : Type u\nV : Type v\ninst✝² : DivisionRing K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nb : Basis (↑(Basis.ofVectorSpaceIndex K V)) K V := Basis.ofVectorSpace K V\n⊢ IsNoetherian K V ↔ Set.Finite (Basis.ofVectorSpaceIndex K V)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nK : Type u\nV : Type v\ninst✝² : DivisionRing K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nb : Basis (↑(Basis.ofVectorSpaceIndex K V)) K V := Basis.ofVectorSpace K V\n⊢ IsNoetherian K V → Set.Finite (Basis.ofVectorSpaceIndex K V)\n[PROOFSTEP]\nintro\n[GOAL]\ncase mp\nK : Type u\nV : Type v\ninst✝² : DivisionRing K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nb : Basis (↑(Basis.ofVectorSpaceIndex K V)) K V := Basis.ofVectorSpace K V\na✝ : IsNoetherian K V\n⊢ Set.Finite (Basis.ofVectorSpaceIndex K V)\n[PROOFSTEP]\nexact finite_of_linearIndependent (Basis.ofVectorSpaceIndex.linearIndependent K V)\n[GOAL]\ncase mpr\nK : Type u\nV : Type v\ninst✝² : DivisionRing K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nb : Basis (↑(Basis.ofVectorSpaceIndex K V)) K V := Basis.ofVectorSpace K V\n⊢ Set.Finite (Basis.ofVectorSpaceIndex K V) → IsNoetherian K V\n[PROOFSTEP]\nintro hbfinite\n[GOAL]\ncase mpr\nK : Type u\nV : Type v\ninst✝² : DivisionRing K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nb : Basis (↑(Basis.ofVectorSpaceIndex K V)) K V := Basis.ofVectorSpace K V\nhbfinite : Set.Finite (Basis.ofVectorSpaceIndex K V)\n⊢ IsNoetherian K V\n[PROOFSTEP]\nrefine' @isNoetherian_of_linearEquiv K (⊤ : Submodule K V) V _ _ _ _ _ (LinearEquiv.ofTop _ rfl) (id _)\n[GOAL]\ncase mpr\nK : Type u\nV : Type v\ninst✝² : DivisionRing K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nb : Basis (↑(Basis.ofVectorSpaceIndex K V)) K V := Basis.ofVectorSpace K V\nhbfinite : Set.Finite (Basis.ofVectorSpaceIndex K V)\n⊢ IsNoetherian K { x // x ∈ ⊤ }\n[PROOFSTEP]\nrefine' isNoetherian_of_fg_of_noetherian _ ⟨Set.Finite.toFinset hbfinite, _⟩\n[GOAL]\ncase mpr\nK : Type u\nV : Type v\ninst✝² : DivisionRing K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nb : Basis (↑(Basis.ofVectorSpaceIndex K V)) K V := Basis.ofVectorSpace K V\nhbfinite : Set.Finite (Basis.ofVectorSpaceIndex K V)\n⊢ span K ↑(Set.Finite.toFinset hbfinite) = ⊤\n[PROOFSTEP]\nrw [Set.Finite.coe_toFinset, ← b.span_eq, Basis.coe_ofVectorSpace, Subtype.range_coe]\n[GOAL]\nK : Type u\nV : Type v\ninst✝³ : DivisionRing K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : IsNoetherian K V\n⊢ ↑(Basis.ofVectorSpaceIndex K V) ≃ { x // x ∈ finsetBasisIndex K V }\n[PROOFSTEP]\nrw [coeSort_finsetBasisIndex]\n[GOAL]\nK : Type u\nV : Type v\ninst✝³ : DivisionRing K\ninst✝² : AddCommGroup V\ninst✝¹ : Module K V\ninst✝ : IsNoetherian K V\n⊢ Set.range ↑(finsetBasis K V) = Basis.ofVectorSpaceIndex K V\n[PROOFSTEP]\nrw [finsetBasis, Basis.range_reindex, Basis.range_ofVectorSpace]\n[GOAL]\nK : Type u\nV : Type v\ninst✝² : DivisionRing K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\n⊢ IsNoetherian K V ↔ Module.Finite K V\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nK : Type u\nV : Type v\ninst✝² : DivisionRing K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\n⊢ IsNoetherian K V → Module.Finite K V\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nK : Type u\nV : Type v\ninst✝² : DivisionRing K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nh : IsNoetherian K V\n⊢ Module.Finite K V\n[PROOFSTEP]\nexact\n  ⟨⟨finsetBasisIndex K V, by\n      convert (finsetBasis K V).span_eq\n      simp⟩⟩\n[GOAL]\nK : Type u\nV : Type v\ninst✝² : DivisionRing K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nh : IsNoetherian K V\n⊢ span K ↑(finsetBasisIndex K V) = ⊤\n[PROOFSTEP]\nconvert (finsetBasis K V).span_eq\n[GOAL]\ncase h.e'_2.h.e'_6\nK : Type u\nV : Type v\ninst✝² : DivisionRing K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nh : IsNoetherian K V\n⊢ ↑(finsetBasisIndex K V) = Set.range ↑(finsetBasis K V)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mpr\nK : Type u\nV : Type v\ninst✝² : DivisionRing K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\n⊢ Module.Finite K V → IsNoetherian K V\n[PROOFSTEP]\nrintro ⟨s, hs⟩\n[GOAL]\ncase mpr.mk.intro\nK : Type u\nV : Type v\ninst✝² : DivisionRing K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\ns : Finset V\nhs : span K ↑s = ⊤\n⊢ IsNoetherian K V\n[PROOFSTEP]\nrw [IsNoetherian.iff_rank_lt_aleph0, ← rank_top, ← hs]\n[GOAL]\ncase mpr.mk.intro\nK : Type u\nV : Type v\ninst✝² : DivisionRing K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\ns : Finset V\nhs : span K ↑s = ⊤\n⊢ Module.rank K { x // x ∈ span K ↑s } < ℵ₀\n[PROOFSTEP]\nexact lt_of_le_of_lt (rank_span_le _) s.finite_toSet.lt_aleph0\n", "meta": {"mathlib_filename": "Mathlib.FieldTheory.Finiteness", "llama_tokens": 2188, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8056321983146848, "lm_q2_score": 0.6477982179521105, "lm_q1q2_score": 0.5218871023930941}}
{"text": "[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\nπ : ι → Type u_4\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : Finite ι\ninst✝ : (i : ι) → TopologicalSpace (π i)\nh : PseudoMetrizableSpace X\n⊢ FirstCountableTopology X\n[PROOFSTEP]\nrcases h with ⟨_, hm⟩\n[GOAL]\ncase mk.intro\nι : Type u_1\nX : Type u_2\nY : Type u_3\nπ : ι → Type u_4\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : Finite ι\ninst✝ : (i : ι) → TopologicalSpace (π i)\nw✝ : PseudoMetricSpace X\nhm : UniformSpace.toTopologicalSpace = inst✝³\n⊢ FirstCountableTopology X\n[PROOFSTEP]\nrw [← hm]\n[GOAL]\ncase mk.intro\nι : Type u_1\nX : Type u_2\nY : Type u_3\nπ : ι → Type u_4\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : Finite ι\ninst✝ : (i : ι) → TopologicalSpace (π i)\nw✝ : PseudoMetricSpace X\nhm : UniformSpace.toTopologicalSpace = inst✝³\n⊢ FirstCountableTopology X\n[PROOFSTEP]\nexact @UniformSpace.firstCountableTopology X PseudoMetricSpace.toUniformSpace EMetric.instIsCountablyGeneratedUniformity\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\nπ : ι → Type u_4\ninst✝⁴ : TopologicalSpace X\ninst✝³ : TopologicalSpace Y\ninst✝² : Finite ι\ninst✝¹ : (i : ι) → TopologicalSpace (π i)\ninst✝ : ∀ (i : ι), PseudoMetrizableSpace (π i)\n⊢ PseudoMetrizableSpace ((i : ι) → π i)\n[PROOFSTEP]\ncases nonempty_fintype ι\n[GOAL]\ncase intro\nι : Type u_1\nX : Type u_2\nY : Type u_3\nπ : ι → Type u_4\ninst✝⁴ : TopologicalSpace X\ninst✝³ : TopologicalSpace Y\ninst✝² : Finite ι\ninst✝¹ : (i : ι) → TopologicalSpace (π i)\ninst✝ : ∀ (i : ι), PseudoMetrizableSpace (π i)\nval✝ : Fintype ι\n⊢ PseudoMetrizableSpace ((i : ι) → π i)\n[PROOFSTEP]\nletI := fun i => pseudoMetrizableSpacePseudoMetric (π i)\n[GOAL]\ncase intro\nι : Type u_1\nX : Type u_2\nY : Type u_3\nπ : ι → Type u_4\ninst✝⁴ : TopologicalSpace X\ninst✝³ : TopologicalSpace Y\ninst✝² : Finite ι\ninst✝¹ : (i : ι) → TopologicalSpace (π i)\ninst✝ : ∀ (i : ι), PseudoMetrizableSpace (π i)\nval✝ : Fintype ι\nthis : (i : ι) → PseudoMetricSpace (π i) := fun i => pseudoMetrizableSpacePseudoMetric (π i)\n⊢ PseudoMetrizableSpace ((i : ι) → π i)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\nπ : ι → Type u_4\ninst✝⁴ : TopologicalSpace X\ninst✝³ : TopologicalSpace Y\ninst✝² : Finite ι\ninst✝¹ : (i : ι) → TopologicalSpace (π i)\ninst✝ : ∀ (i : ι), MetrizableSpace (π i)\n⊢ MetrizableSpace ((i : ι) → π i)\n[PROOFSTEP]\ncases nonempty_fintype ι\n[GOAL]\ncase intro\nι : Type u_1\nX : Type u_2\nY : Type u_3\nπ : ι → Type u_4\ninst✝⁴ : TopologicalSpace X\ninst✝³ : TopologicalSpace Y\ninst✝² : Finite ι\ninst✝¹ : (i : ι) → TopologicalSpace (π i)\ninst✝ : ∀ (i : ι), MetrizableSpace (π i)\nval✝ : Fintype ι\n⊢ MetrizableSpace ((i : ι) → π i)\n[PROOFSTEP]\nletI := fun i => metrizableSpaceMetric (π i)\n[GOAL]\ncase intro\nι : Type u_1\nX : Type u_2\nY : Type u_3\nπ : ι → Type u_4\ninst✝⁴ : TopologicalSpace X\ninst✝³ : TopologicalSpace Y\ninst✝² : Finite ι\ninst✝¹ : (i : ι) → TopologicalSpace (π i)\ninst✝ : ∀ (i : ι), MetrizableSpace (π i)\nval✝ : Fintype ι\nthis : (i : ι) → MetricSpace (π i) := fun i => metrizableSpaceMetric (π i)\n⊢ MetrizableSpace ((i : ι) → π i)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\nπ : ι → Type u_4\ninst✝⁴ : TopologicalSpace X\ninst✝³ : TopologicalSpace Y\ninst✝² : Finite ι\ninst✝¹ : (i : ι) → TopologicalSpace (π i)\ninst✝ : PseudoMetrizableSpace X\ns : Set X\nhs : IsSeparable s\n⊢ SecondCountableTopology ↑s\n[PROOFSTEP]\nletI := pseudoMetrizableSpacePseudoMetric X\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\nπ : ι → Type u_4\ninst✝⁴ : TopologicalSpace X\ninst✝³ : TopologicalSpace Y\ninst✝² : Finite ι\ninst✝¹ : (i : ι) → TopologicalSpace (π i)\ninst✝ : PseudoMetrizableSpace X\ns : Set X\nhs : IsSeparable s\nthis : PseudoMetricSpace X := pseudoMetrizableSpacePseudoMetric X\n⊢ SecondCountableTopology ↑s\n[PROOFSTEP]\nhave := hs.separableSpace\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\nπ : ι → Type u_4\ninst✝⁴ : TopologicalSpace X\ninst✝³ : TopologicalSpace Y\ninst✝² : Finite ι\ninst✝¹ : (i : ι) → TopologicalSpace (π i)\ninst✝ : PseudoMetrizableSpace X\ns : Set X\nhs : IsSeparable s\nthis✝ : PseudoMetricSpace X := pseudoMetrizableSpacePseudoMetric X\nthis : SeparableSpace ↑s\n⊢ SecondCountableTopology ↑s\n[PROOFSTEP]\nexact UniformSpace.secondCountable_of_separable s\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\nπ : ι → Type u_4\ninst✝⁵ : TopologicalSpace X\ninst✝⁴ : TopologicalSpace Y\ninst✝³ : Finite ι\ninst✝² : (i : ι) → TopologicalSpace (π i)\ninst✝¹ : T3Space X\ninst✝ : SecondCountableTopology X\n⊢ ∃ f, Embedding f\n[PROOFSTEP]\nhaveI : NormalSpace X := normalSpaceOfT3SecondCountable X\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\nπ : ι → Type u_4\ninst✝⁵ : TopologicalSpace X\ninst✝⁴ : TopologicalSpace Y\ninst✝³ : Finite ι\ninst✝² : (i : ι) → TopologicalSpace (π i)\ninst✝¹ : T3Space X\ninst✝ : SecondCountableTopology X\nthis : NormalSpace X\n⊢ ∃ f, Embedding f\n[PROOFSTEP]\nrcases exists_countable_basis X with ⟨B, hBc, -, hB⟩\n[GOAL]\ncase intro.intro.intro\nι : Type u_1\nX : Type u_2\nY : Type u_3\nπ : ι → Type u_4\ninst✝⁵ : TopologicalSpace X\ninst✝⁴ : TopologicalSpace Y\ninst✝³ : Finite ι\ninst✝² : (i : ι) → TopologicalSpace (π i)\ninst✝¹ : T3Space X\ninst✝ : SecondCountableTopology X\nthis : NormalSpace X\nB : Set (Set X)\nhBc : Set.Countable B\nhB : IsTopologicalBasis B\n⊢ ∃ f, Embedding f\n[PROOFSTEP]\nlet s : Set (Set X × Set X) :=\n  {UV ∈ B ×ˢ B | closure UV.1 ⊆ UV.2}\n    -- `s` is a countable set.\n[GOAL]\ncase intro.intro.intro\nι : Type u_1\nX : Type u_2\nY : Type u_3\nπ : ι → Type u_4\ninst✝⁵ : TopologicalSpace X\ninst✝⁴ : TopologicalSpace Y\ninst✝³ : Finite ι\ninst✝² : (i : ι) → TopologicalSpace (π i)\ninst✝¹ : T3Space X\ninst✝ : SecondCountableTopology X\nthis : NormalSpace X\nB : Set (Set X)\nhBc : Set.Countable B\nhB : IsTopologicalBasis B\ns : Set (Set X × Set X) := {UV | UV ∈ B ×ˢ B ∧ closure UV.fst ⊆ UV.snd}\n⊢ ∃ f, Embedding f\n[PROOFSTEP]\nhaveI : Encodable s := ((hBc.prod hBc).mono (inter_subset_left _ _)).toEncodable\n[GOAL]\ncase intro.intro.intro\nι : Type u_1\nX : Type u_2\nY : Type u_3\nπ : ι → Type u_4\ninst✝⁵ : TopologicalSpace X\ninst✝⁴ : TopologicalSpace Y\ninst✝³ : Finite ι\ninst✝² : (i : ι) → TopologicalSpace (π i)\ninst✝¹ : T3Space X\ninst✝ : SecondCountableTopology X\nthis✝ : NormalSpace X\nB : Set (Set X)\nhBc : Set.Countable B\nhB : IsTopologicalBasis B\ns : Set (Set X × Set X) := {UV | UV ∈ B ×ˢ B ∧ closure UV.fst ⊆ UV.snd}\nthis : Encodable ↑s\n⊢ ∃ f, Embedding f\n[PROOFSTEP]\nletI : TopologicalSpace s := ⊥\n[GOAL]\ncase intro.intro.intro\nι : Type u_1\nX : Type u_2\nY : Type u_3\nπ : ι → Type u_4\ninst✝⁵ : TopologicalSpace X\ninst✝⁴ : TopologicalSpace Y\ninst✝³ : Finite ι\ninst✝² : (i : ι) → TopologicalSpace (π i)\ninst✝¹ : T3Space X\ninst✝ : SecondCountableTopology X\nthis✝¹ : NormalSpace X\nB : Set (Set X)\nhBc : Set.Countable B\nhB : IsTopologicalBasis B\ns : Set (Set X × Set X) := {UV | UV ∈ B ×ˢ B ∧ closure UV.fst ⊆ UV.snd}\nthis✝ : Encodable ↑s\nthis : TopologicalSpace ↑s := ⊥\n⊢ ∃ f, Embedding f\n[PROOFSTEP]\nhaveI : DiscreteTopology s := ⟨rfl⟩\n[GOAL]\ncase intro.intro.intro\nι : Type u_1\nX : Type u_2\nY : Type u_3\nπ : ι → Type u_4\ninst✝⁵ : TopologicalSpace X\ninst✝⁴ : TopologicalSpace Y\ninst✝³ : Finite ι\ninst✝² : (i : ι) → TopologicalSpace (π i)\ninst✝¹ : T3Space X\ninst✝ : SecondCountableTopology X\nthis✝² : NormalSpace X\nB : Set (Set X)\nhBc : Set.Countable B\nhB : IsTopologicalBasis B\ns : Set (Set X × Set X) := {UV | UV ∈ B ×ˢ B ∧ closure UV.fst ⊆ UV.snd}\nthis✝¹ : Encodable ↑s\nthis✝ : TopologicalSpace ↑s := ⊥\nthis : DiscreteTopology ↑s\n⊢ ∃ f, Embedding f\n[PROOFSTEP]\nrsuffices ⟨f, hf⟩ : ∃ f : X → s →ᵇ ℝ, Embedding f\n[GOAL]\ncase intro.intro.intro.intro\nι : Type u_1\nX : Type u_2\nY : Type u_3\nπ : ι → Type u_4\ninst✝⁵ : TopologicalSpace X\ninst✝⁴ : TopologicalSpace Y\ninst✝³ : Finite ι\ninst✝² : (i : ι) → TopologicalSpace (π i)\ninst✝¹ : T3Space X\ninst✝ : SecondCountableTopology X\nthis✝² : NormalSpace X\nB : Set (Set X)\nhBc : Set.Countable B\nhB : IsTopologicalBasis B\ns : Set (Set X × Set X) := {UV | UV ∈ B ×ˢ B ∧ closure UV.fst ⊆ UV.snd}\nthis✝¹ : Encodable ↑s\nthis✝ : TopologicalSpace ↑s := ⊥\nthis : DiscreteTopology ↑s\nf : X → ↑s →ᵇ ℝ\nhf : Embedding f\n⊢ ∃ f, Embedding f\n[PROOFSTEP]\nexact\n  ⟨fun x => (f x).extend (Encodable.encode' s) 0,\n    (BoundedContinuousFunction.isometry_extend (Encodable.encode' s) (0 : ℕ →ᵇ ℝ)).embedding.comp hf⟩\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\nπ : ι → Type u_4\ninst✝⁵ : TopologicalSpace X\ninst✝⁴ : TopologicalSpace Y\ninst✝³ : Finite ι\ninst✝² : (i : ι) → TopologicalSpace (π i)\ninst✝¹ : T3Space X\ninst✝ : SecondCountableTopology X\nthis✝² : NormalSpace X\nB : Set (Set X)\nhBc : Set.Countable B\nhB : IsTopologicalBasis B\ns : Set (Set X × Set X) := {UV | UV ∈ B ×ˢ B ∧ closure UV.fst ⊆ UV.snd}\nthis✝¹ : Encodable ↑s\nthis✝ : TopologicalSpace ↑s := ⊥\nthis : DiscreteTopology ↑s\n⊢ ∃ f, Embedding f\n[PROOFSTEP]\nhave hd : ∀ UV : s, Disjoint (closure UV.1.1) UV.1.2ᶜ := fun UV =>\n  disjoint_compl_right.mono_right\n    (compl_subset_compl.2 UV.2.2)\n      -- Choose a sequence of `εₙ > 0`, `n : s`, that is bounded above by `1` and tends to zero\n        -- along the `cofinite` filter.\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\nπ : ι → Type u_4\ninst✝⁵ : TopologicalSpace X\ninst✝⁴ : TopologicalSpace Y\ninst✝³ : Finite ι\ninst✝² : (i : ι) → TopologicalSpace (π i)\ninst✝¹ : T3Space X\ninst✝ : SecondCountableTopology X\nthis✝² : NormalSpace X\nB : Set (Set X)\nhBc : Set.Countable B\nhB : IsTopologicalBasis B\ns : Set (Set X × Set X) := {UV | UV ∈ B ×ˢ B ∧ closure UV.fst ⊆ UV.snd}\nthis✝¹ : Encodable ↑s\nthis✝ : TopologicalSpace ↑s := ⊥\nthis : DiscreteTopology ↑s\nhd : ∀ (UV : ↑s), Disjoint (closure (↑UV).fst) (↑UV).sndᶜ\n⊢ ∃ f, Embedding f\n[PROOFSTEP]\nobtain ⟨ε, ε01, hε⟩ : ∃ ε : s → ℝ, (∀ UV, ε UV ∈ Ioc (0 : ℝ) 1) ∧ Tendsto ε cofinite (𝓝 0) :=\n  by\n  rcases posSumOfEncodable zero_lt_one s with ⟨ε, ε0, c, hεc, hc1⟩\n  refine' ⟨ε, fun UV => ⟨ε0 UV, _⟩, hεc.summable.tendsto_cofinite_zero⟩\n  exact (le_hasSum hεc UV fun _ _ => (ε0 _).le).trans hc1\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\nπ : ι → Type u_4\ninst✝⁵ : TopologicalSpace X\ninst✝⁴ : TopologicalSpace Y\ninst✝³ : Finite ι\ninst✝² : (i : ι) → TopologicalSpace (π i)\ninst✝¹ : T3Space X\ninst✝ : SecondCountableTopology X\nthis✝² : NormalSpace X\nB : Set (Set X)\nhBc : Set.Countable B\nhB : IsTopologicalBasis B\ns : Set (Set X × Set X) := {UV | UV ∈ B ×ˢ B ∧ closure UV.fst ⊆ UV.snd}\nthis✝¹ : Encodable ↑s\nthis✝ : TopologicalSpace ↑s := ⊥\nthis : DiscreteTopology ↑s\nhd : ∀ (UV : ↑s), Disjoint (closure (↑UV).fst) (↑UV).sndᶜ\n⊢ ∃ ε, (∀ (UV : ↑s), ε UV ∈ Ioc 0 1) ∧ Tendsto ε cofinite (𝓝 0)\n[PROOFSTEP]\nrcases posSumOfEncodable zero_lt_one s with ⟨ε, ε0, c, hεc, hc1⟩\n[GOAL]\ncase mk.intro.intro.intro\nι : Type u_1\nX : Type u_2\nY : Type u_3\nπ : ι → Type u_4\ninst✝⁵ : TopologicalSpace X\ninst✝⁴ : TopologicalSpace Y\ninst✝³ : Finite ι\ninst✝² : (i : ι) → TopologicalSpace (π i)\ninst✝¹ : T3Space X\ninst✝ : SecondCountableTopology X\nthis✝² : NormalSpace X\nB : Set (Set X)\nhBc : Set.Countable B\nhB : IsTopologicalBasis B\ns : Set (Set X × Set X) := {UV | UV ∈ B ×ˢ B ∧ closure UV.fst ⊆ UV.snd}\nthis✝¹ : Encodable ↑s\nthis✝ : TopologicalSpace ↑s := ⊥\nthis : DiscreteTopology ↑s\nhd : ∀ (UV : ↑s), Disjoint (closure (↑UV).fst) (↑UV).sndᶜ\nε : ↑s → ℝ\nε0 : ∀ (i : ↑s), 0 < ε i\nc : ℝ\nhεc : HasSum ε c\nhc1 : c ≤ 1\n⊢ ∃ ε, (∀ (UV : ↑s), ε UV ∈ Ioc 0 1) ∧ Tendsto ε cofinite (𝓝 0)\n[PROOFSTEP]\nrefine' ⟨ε, fun UV => ⟨ε0 UV, _⟩, hεc.summable.tendsto_cofinite_zero⟩\n[GOAL]\ncase mk.intro.intro.intro\nι : Type u_1\nX : Type u_2\nY : Type u_3\nπ : ι → Type u_4\ninst✝⁵ : TopologicalSpace X\ninst✝⁴ : TopologicalSpace Y\ninst✝³ : Finite ι\ninst✝² : (i : ι) → TopologicalSpace (π i)\ninst✝¹ : T3Space X\ninst✝ : SecondCountableTopology X\nthis✝² : NormalSpace X\nB : Set (Set X)\nhBc : Set.Countable B\nhB : IsTopologicalBasis B\ns : Set (Set X × Set X) := {UV | UV ∈ B ×ˢ B ∧ closure UV.fst ⊆ UV.snd}\nthis✝¹ : Encodable ↑s\nthis✝ : TopologicalSpace ↑s := ⊥\nthis : DiscreteTopology ↑s\nhd : ∀ (UV : ↑s), Disjoint (closure (↑UV).fst) (↑UV).sndᶜ\nε : ↑s → ℝ\nε0 : ∀ (i : ↑s), 0 < ε i\nc : ℝ\nhεc : HasSum ε c\nhc1 : c ≤ 1\nUV : ↑s\n⊢ ε UV ≤ 1\n[PROOFSTEP]\nexact (le_hasSum hεc UV fun _ _ => (ε0 _).le).trans hc1\n[GOAL]\ncase intro.intro\nι : Type u_1\nX : Type u_2\nY : Type u_3\nπ : ι → Type u_4\ninst✝⁵ : TopologicalSpace X\ninst✝⁴ : TopologicalSpace Y\ninst✝³ : Finite ι\ninst✝² : (i : ι) → TopologicalSpace (π i)\ninst✝¹ : T3Space X\ninst✝ : SecondCountableTopology X\nthis✝² : NormalSpace X\nB : Set (Set X)\nhBc : Set.Countable B\nhB : IsTopologicalBasis B\ns : Set (Set X × Set X) := {UV | UV ∈ B ×ˢ B ∧ closure UV.fst ⊆ UV.snd}\nthis✝¹ : Encodable ↑s\nthis✝ : TopologicalSpace ↑s := ⊥\nthis : DiscreteTopology ↑s\nhd : ∀ (UV : ↑s), Disjoint (closure (↑UV).fst) (↑UV).sndᶜ\nε : ↑s → ℝ\nε01 : ∀ (UV : ↑s), ε UV ∈ Ioc 0 1\nhε : Tendsto ε cofinite (𝓝 0)\n⊢ ∃ f, Embedding f\n[PROOFSTEP]\nhave : ∀ UV : s, ∃ f : C(X, ℝ), EqOn f 0 UV.1.1 ∧ EqOn f (fun _ => ε UV) UV.1.2ᶜ ∧ ∀ x, f x ∈ Icc 0 (ε UV) :=\n  by\n  intro UV\n  rcases exists_continuous_zero_one_of_closed isClosed_closure (hB.isOpen UV.2.1.2).isClosed_compl (hd UV) with\n    ⟨f, hf₀, hf₁, hf01⟩\n  exact\n    ⟨ε UV • f, fun x hx => by simp [hf₀ (subset_closure hx)], fun x hx => by simp [hf₁ hx], fun x =>\n      ⟨mul_nonneg (ε01 _).1.le (hf01 _).1, mul_le_of_le_one_right (ε01 _).1.le (hf01 _).2⟩⟩\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\nπ : ι → Type u_4\ninst✝⁵ : TopologicalSpace X\ninst✝⁴ : TopologicalSpace Y\ninst✝³ : Finite ι\ninst✝² : (i : ι) → TopologicalSpace (π i)\ninst✝¹ : T3Space X\ninst✝ : SecondCountableTopology X\nthis✝² : NormalSpace X\nB : Set (Set X)\nhBc : Set.Countable B\nhB : IsTopologicalBasis B\ns : Set (Set X × Set X) := {UV | UV ∈ B ×ˢ B ∧ closure UV.fst ⊆ UV.snd}\nthis✝¹ : Encodable ↑s\nthis✝ : TopologicalSpace ↑s := ⊥\nthis : DiscreteTopology ↑s\nhd : ∀ (UV : ↑s), Disjoint (closure (↑UV).fst) (↑UV).sndᶜ\nε : ↑s → ℝ\nε01 : ∀ (UV : ↑s), ε UV ∈ Ioc 0 1\nhε : Tendsto ε cofinite (𝓝 0)\n⊢ ∀ (UV : ↑s), ∃ f, EqOn (↑f) 0 (↑UV).fst ∧ EqOn (↑f) (fun x => ε UV) (↑UV).sndᶜ ∧ ∀ (x : X), ↑f x ∈ Icc 0 (ε UV)\n[PROOFSTEP]\nintro UV\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\nπ : ι → Type u_4\ninst✝⁵ : TopologicalSpace X\ninst✝⁴ : TopologicalSpace Y\ninst✝³ : Finite ι\ninst✝² : (i : ι) → TopologicalSpace (π i)\ninst✝¹ : T3Space X\ninst✝ : SecondCountableTopology X\nthis✝² : NormalSpace X\nB : Set (Set X)\nhBc : Set.Countable B\nhB : IsTopologicalBasis B\ns : Set (Set X × Set X) := {UV | UV ∈ B ×ˢ B ∧ closure UV.fst ⊆ UV.snd}\nthis✝¹ : Encodable ↑s\nthis✝ : TopologicalSpace ↑s := ⊥\nthis : DiscreteTopology ↑s\nhd : ∀ (UV : ↑s), Disjoint (closure (↑UV).fst) (↑UV).sndᶜ\nε : ↑s → ℝ\nε01 : ∀ (UV : ↑s), ε UV ∈ Ioc 0 1\nhε : Tendsto ε cofinite (𝓝 0)\nUV : ↑s\n⊢ ∃ f, EqOn (↑f) 0 (↑UV).fst ∧ EqOn (↑f) (fun x => ε UV) (↑UV).sndᶜ ∧ ∀ (x : X), ↑f x ∈ Icc 0 (ε UV)\n[PROOFSTEP]\nrcases exists_continuous_zero_one_of_closed isClosed_closure (hB.isOpen UV.2.1.2).isClosed_compl (hd UV) with\n  ⟨f, hf₀, hf₁, hf01⟩\n[GOAL]\ncase intro.intro.intro\nι : Type u_1\nX : Type u_2\nY : Type u_3\nπ : ι → Type u_4\ninst✝⁵ : TopologicalSpace X\ninst✝⁴ : TopologicalSpace Y\ninst✝³ : Finite ι\ninst✝² : (i : ι) → TopologicalSpace (π i)\ninst✝¹ : T3Space X\ninst✝ : SecondCountableTopology X\nthis✝² : NormalSpace X\nB : Set (Set X)\nhBc : Set.Countable B\nhB : IsTopologicalBasis B\ns : Set (Set X × Set X) := {UV | UV ∈ B ×ˢ B ∧ closure UV.fst ⊆ UV.snd}\nthis✝¹ : Encodable ↑s\nthis✝ : TopologicalSpace ↑s := ⊥\nthis : DiscreteTopology ↑s\nhd : ∀ (UV : ↑s), Disjoint (closure (↑UV).fst) (↑UV).sndᶜ\nε : ↑s → ℝ\nε01 : ∀ (UV : ↑s), ε UV ∈ Ioc 0 1\nhε : Tendsto ε cofinite (𝓝 0)\nUV : ↑s\nf : C(X, ℝ)\nhf₀ : EqOn (↑f) 0 (closure (↑UV).fst)\nhf₁ : EqOn (↑f) 1 (↑UV).sndᶜ\nhf01 : ∀ (x : X), ↑f x ∈ Icc 0 1\n⊢ ∃ f, EqOn (↑f) 0 (↑UV).fst ∧ EqOn (↑f) (fun x => ε UV) (↑UV).sndᶜ ∧ ∀ (x : X), ↑f x ∈ Icc 0 (ε UV)\n[PROOFSTEP]\nexact\n  ⟨ε UV • f, fun x hx => by simp [hf₀ (subset_closure hx)], fun x hx => by simp [hf₁ hx], fun x =>\n    ⟨mul_nonneg (ε01 _).1.le (hf01 _).1, mul_le_of_le_one_right (ε01 _).1.le (hf01 _).2⟩⟩\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\nπ : ι → Type u_4\ninst✝⁵ : TopologicalSpace X\ninst✝⁴ : TopologicalSpace Y\ninst✝³ : Finite ι\ninst✝² : (i : ι) → TopologicalSpace (π i)\ninst✝¹ : T3Space X\ninst✝ : SecondCountableTopology X\nthis✝² : NormalSpace X\nB : Set (Set X)\nhBc : Set.Countable B\nhB : IsTopologicalBasis B\ns : Set (Set X × Set X) := {UV | UV ∈ B ×ˢ B ∧ closure UV.fst ⊆ UV.snd}\nthis✝¹ : Encodable ↑s\nthis✝ : TopologicalSpace ↑s := ⊥\nthis : DiscreteTopology ↑s\nhd : ∀ (UV : ↑s), Disjoint (closure (↑UV).fst) (↑UV).sndᶜ\nε : ↑s → ℝ\nε01 : ∀ (UV : ↑s), ε UV ∈ Ioc 0 1\nhε : Tendsto ε cofinite (𝓝 0)\nUV : ↑s\nf : C(X, ℝ)\nhf₀ : EqOn (↑f) 0 (closure (↑UV).fst)\nhf₁ : EqOn (↑f) 1 (↑UV).sndᶜ\nhf01 : ∀ (x : X), ↑f x ∈ Icc 0 1\nx : X\nhx : x ∈ (↑UV).fst\n⊢ ↑(ε UV • f) x = OfNat.ofNat 0 x\n[PROOFSTEP]\nsimp [hf₀ (subset_closure hx)]\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\nπ : ι → Type u_4\ninst✝⁵ : TopologicalSpace X\ninst✝⁴ : TopologicalSpace Y\ninst✝³ : Finite ι\ninst✝² : (i : ι) → TopologicalSpace (π i)\ninst✝¹ : T3Space X\ninst✝ : SecondCountableTopology X\nthis✝² : NormalSpace X\nB : Set (Set X)\nhBc : Set.Countable B\nhB : IsTopologicalBasis B\ns : Set (Set X × Set X) := {UV | UV ∈ B ×ˢ B ∧ closure UV.fst ⊆ UV.snd}\nthis✝¹ : Encodable ↑s\nthis✝ : TopologicalSpace ↑s := ⊥\nthis : DiscreteTopology ↑s\nhd : ∀ (UV : ↑s), Disjoint (closure (↑UV).fst) (↑UV).sndᶜ\nε : ↑s → ℝ\nε01 : ∀ (UV : ↑s), ε UV ∈ Ioc 0 1\nhε : Tendsto ε cofinite (𝓝 0)\nUV : ↑s\nf : C(X, ℝ)\nhf₀ : EqOn (↑f) 0 (closure (↑UV).fst)\nhf₁ : EqOn (↑f) 1 (↑UV).sndᶜ\nhf01 : ∀ (x : X), ↑f x ∈ Icc 0 1\nx : X\nhx : x ∈ (↑UV).sndᶜ\n⊢ ↑(ε UV • f) x = (fun x => ε UV) x\n[PROOFSTEP]\nsimp [hf₁ hx]\n[GOAL]\ncase intro.intro\nι : Type u_1\nX : Type u_2\nY : Type u_3\nπ : ι → Type u_4\ninst✝⁵ : TopologicalSpace X\ninst✝⁴ : TopologicalSpace Y\ninst✝³ : Finite ι\ninst✝² : (i : ι) → TopologicalSpace (π i)\ninst✝¹ : T3Space X\ninst✝ : SecondCountableTopology X\nthis✝³ : NormalSpace X\nB : Set (Set X)\nhBc : Set.Countable B\nhB : IsTopologicalBasis B\ns : Set (Set X × Set X) := {UV | UV ∈ B ×ˢ B ∧ closure UV.fst ⊆ UV.snd}\nthis✝² : Encodable ↑s\nthis✝¹ : TopologicalSpace ↑s := ⊥\nthis✝ : DiscreteTopology ↑s\nhd : ∀ (UV : ↑s), Disjoint (closure (↑UV).fst) (↑UV).sndᶜ\nε : ↑s → ℝ\nε01 : ∀ (UV : ↑s), ε UV ∈ Ioc 0 1\nhε : Tendsto ε cofinite (𝓝 0)\nthis : ∀ (UV : ↑s), ∃ f, EqOn (↑f) 0 (↑UV).fst ∧ EqOn (↑f) (fun x => ε UV) (↑UV).sndᶜ ∧ ∀ (x : X), ↑f x ∈ Icc 0 (ε UV)\n⊢ ∃ f, Embedding f\n[PROOFSTEP]\nchoose f hf0 hfε hf0ε using this\n[GOAL]\ncase intro.intro\nι : Type u_1\nX : Type u_2\nY : Type u_3\nπ : ι → Type u_4\ninst✝⁵ : TopologicalSpace X\ninst✝⁴ : TopologicalSpace Y\ninst✝³ : Finite ι\ninst✝² : (i : ι) → TopologicalSpace (π i)\ninst✝¹ : T3Space X\ninst✝ : SecondCountableTopology X\nthis✝² : NormalSpace X\nB : Set (Set X)\nhBc : Set.Countable B\nhB : IsTopologicalBasis B\ns : Set (Set X × Set X) := {UV | UV ∈ B ×ˢ B ∧ closure UV.fst ⊆ UV.snd}\nthis✝¹ : Encodable ↑s\nthis✝ : TopologicalSpace ↑s := ⊥\nthis : DiscreteTopology ↑s\nhd : ∀ (UV : ↑s), Disjoint (closure (↑UV).fst) (↑UV).sndᶜ\nε : ↑s → ℝ\nε01 : ∀ (UV : ↑s), ε UV ∈ Ioc 0 1\nhε : Tendsto ε cofinite (𝓝 0)\nf : ↑s → C(X, ℝ)\nhf0 : ∀ (UV : ↑s), EqOn (↑(f UV)) 0 (↑UV).fst\nhfε : ∀ (UV : ↑s), EqOn (↑(f UV)) (fun x => ε UV) (↑UV).sndᶜ\nhf0ε : ∀ (UV : ↑s) (x : X), ↑(f UV) x ∈ Icc 0 (ε UV)\n⊢ ∃ f, Embedding f\n[PROOFSTEP]\nhave hf01 : ∀ UV x, f UV x ∈ Icc (0 : ℝ) 1 := fun UV x =>\n  Icc_subset_Icc_right (ε01 _).2\n    (hf0ε _ _)\n      -- The embedding is given by `F x UV = f UV x`.\n[GOAL]\ncase intro.intro\nι : Type u_1\nX : Type u_2\nY : Type u_3\nπ : ι → Type u_4\ninst✝⁵ : TopologicalSpace X\ninst✝⁴ : TopologicalSpace Y\ninst✝³ : Finite ι\ninst✝² : (i : ι) → TopologicalSpace (π i)\ninst✝¹ : T3Space X\ninst✝ : SecondCountableTopology X\nthis✝² : NormalSpace X\nB : Set (Set X)\nhBc : Set.Countable B\nhB : IsTopologicalBasis B\ns : Set (Set X × Set X) := {UV | UV ∈ B ×ˢ B ∧ closure UV.fst ⊆ UV.snd}\nthis✝¹ : Encodable ↑s\nthis✝ : TopologicalSpace ↑s := ⊥\nthis : DiscreteTopology ↑s\nhd : ∀ (UV : ↑s), Disjoint (closure (↑UV).fst) (↑UV).sndᶜ\nε : ↑s → ℝ\nε01 : ∀ (UV : ↑s), ε UV ∈ Ioc 0 1\nhε : Tendsto ε cofinite (𝓝 0)\nf : ↑s → C(X, ℝ)\nhf0 : ∀ (UV : ↑s), EqOn (↑(f UV)) 0 (↑UV).fst\nhfε : ∀ (UV : ↑s), EqOn (↑(f UV)) (fun x => ε UV) (↑UV).sndᶜ\nhf0ε : ∀ (UV : ↑s) (x : X), ↑(f UV) x ∈ Icc 0 (ε UV)\nhf01 : ∀ (UV : ↑s) (x : X), ↑(f UV) x ∈ Icc 0 1\n⊢ ∃ f, Embedding f\n[PROOFSTEP]\nset F : X → s →ᵇ ℝ := fun x =>\n  ⟨⟨fun UV => f UV x, continuous_of_discreteTopology⟩, 1, fun UV₁ UV₂ =>\n    Real.dist_le_of_mem_Icc_01 (hf01 _ _) (hf01 _ _)⟩\n[GOAL]\ncase intro.intro\nι : Type u_1\nX : Type u_2\nY : Type u_3\nπ : ι → Type u_4\ninst✝⁵ : TopologicalSpace X\ninst✝⁴ : TopologicalSpace Y\ninst✝³ : Finite ι\ninst✝² : (i : ι) → TopologicalSpace (π i)\ninst✝¹ : T3Space X\ninst✝ : SecondCountableTopology X\nthis✝² : NormalSpace X\nB : Set (Set X)\nhBc : Set.Countable B\nhB : IsTopologicalBasis B\ns : Set (Set X × Set X) := {UV | UV ∈ B ×ˢ B ∧ closure UV.fst ⊆ UV.snd}\nthis✝¹ : Encodable ↑s\nthis✝ : TopologicalSpace ↑s := ⊥\nthis : DiscreteTopology ↑s\nhd : ∀ (UV : ↑s), Disjoint (closure (↑UV).fst) (↑UV).sndᶜ\nε : ↑s → ℝ\nε01 : ∀ (UV : ↑s), ε UV ∈ Ioc 0 1\nhε : Tendsto ε cofinite (𝓝 0)\nf : ↑s → C(X, ℝ)\nhf0 : ∀ (UV : ↑s), EqOn (↑(f UV)) 0 (↑UV).fst\nhfε : ∀ (UV : ↑s), EqOn (↑(f UV)) (fun x => ε UV) (↑UV).sndᶜ\nhf0ε : ∀ (UV : ↑s) (x : X), ↑(f UV) x ∈ Icc 0 (ε UV)\nhf01 : ∀ (UV : ↑s) (x : X), ↑(f UV) x ∈ Icc 0 1\nF : X → ↑s →ᵇ ℝ :=\n  fun x =>\n    { toContinuousMap := ContinuousMap.mk fun UV => ↑(f UV) x,\n      map_bounded' :=\n        (_ :\n          ∃ C,\n            ∀ (x_1 y : ↑s),\n              dist (ContinuousMap.toFun (ContinuousMap.mk fun UV => ↑(f UV) x) x_1)\n                  (ContinuousMap.toFun (ContinuousMap.mk fun UV => ↑(f UV) x) y) ≤\n                C) }\n⊢ ∃ f, Embedding f\n[PROOFSTEP]\nhave hF : ∀ x UV, F x UV = f UV x := fun _ _ => rfl\n[GOAL]\ncase intro.intro\nι : Type u_1\nX : Type u_2\nY : Type u_3\nπ : ι → Type u_4\ninst✝⁵ : TopologicalSpace X\ninst✝⁴ : TopologicalSpace Y\ninst✝³ : Finite ι\ninst✝² : (i : ι) → TopologicalSpace (π i)\ninst✝¹ : T3Space X\ninst✝ : SecondCountableTopology X\nthis✝² : NormalSpace X\nB : Set (Set X)\nhBc : Set.Countable B\nhB : IsTopologicalBasis B\ns : Set (Set X × Set X) := {UV | UV ∈ B ×ˢ B ∧ closure UV.fst ⊆ UV.snd}\nthis✝¹ : Encodable ↑s\nthis✝ : TopologicalSpace ↑s := ⊥\nthis : DiscreteTopology ↑s\nhd : ∀ (UV : ↑s), Disjoint (closure (↑UV).fst) (↑UV).sndᶜ\nε : ↑s → ℝ\nε01 : ∀ (UV : ↑s), ε UV ∈ Ioc 0 1\nhε : Tendsto ε cofinite (𝓝 0)\nf : ↑s → C(X, ℝ)\nhf0 : ∀ (UV : ↑s), EqOn (↑(f UV)) 0 (↑UV).fst\nhfε : ∀ (UV : ↑s), EqOn (↑(f UV)) (fun x => ε UV) (↑UV).sndᶜ\nhf0ε : ∀ (UV : ↑s) (x : X), ↑(f UV) x ∈ Icc 0 (ε UV)\nhf01 : ∀ (UV : ↑s) (x : X), ↑(f UV) x ∈ Icc 0 1\nF : X → ↑s →ᵇ ℝ :=\n  fun x =>\n    { toContinuousMap := ContinuousMap.mk fun UV => ↑(f UV) x,\n      map_bounded' :=\n        (_ :\n          ∃ C,\n            ∀ (x_1 y : ↑s),\n              dist (ContinuousMap.toFun (ContinuousMap.mk fun UV => ↑(f UV) x) x_1)\n                  (ContinuousMap.toFun (ContinuousMap.mk fun UV => ↑(f UV) x) y) ≤\n                C) }\nhF : ∀ (x : X) (UV : ↑s), ↑(F x) UV = ↑(f UV) x\n⊢ ∃ f, Embedding f\n[PROOFSTEP]\nrefine' ⟨F, Embedding.mk' _ (fun x y hxy => _) fun x => le_antisymm _ _⟩\n[GOAL]\ncase intro.intro.refine'_1\nι : Type u_1\nX : Type u_2\nY : Type u_3\nπ : ι → Type u_4\ninst✝⁵ : TopologicalSpace X\ninst✝⁴ : TopologicalSpace Y\ninst✝³ : Finite ι\ninst✝² : (i : ι) → TopologicalSpace (π i)\ninst✝¹ : T3Space X\ninst✝ : SecondCountableTopology X\nthis✝² : NormalSpace X\nB : Set (Set X)\nhBc : Set.Countable B\nhB : IsTopologicalBasis B\ns : Set (Set X × Set X) := {UV | UV ∈ B ×ˢ B ∧ closure UV.fst ⊆ UV.snd}\nthis✝¹ : Encodable ↑s\nthis✝ : TopologicalSpace ↑s := ⊥\nthis : DiscreteTopology ↑s\nhd : ∀ (UV : ↑s), Disjoint (closure (↑UV).fst) (↑UV).sndᶜ\nε : ↑s → ℝ\nε01 : ∀ (UV : ↑s), ε UV ∈ Ioc 0 1\nhε : Tendsto ε cofinite (𝓝 0)\nf : ↑s → C(X, ℝ)\nhf0 : ∀ (UV : ↑s), EqOn (↑(f UV)) 0 (↑UV).fst\nhfε : ∀ (UV : ↑s), EqOn (↑(f UV)) (fun x => ε UV) (↑UV).sndᶜ\nhf0ε : ∀ (UV : ↑s) (x : X), ↑(f UV) x ∈ Icc 0 (ε UV)\nhf01 : ∀ (UV : ↑s) (x : X), ↑(f UV) x ∈ Icc 0 1\nF : X → ↑s →ᵇ ℝ :=\n  fun x =>\n    { toContinuousMap := ContinuousMap.mk fun UV => ↑(f UV) x,\n      map_bounded' :=\n        (_ :\n          ∃ C,\n            ∀ (x_1 y : ↑s),\n              dist (ContinuousMap.toFun (ContinuousMap.mk fun UV => ↑(f UV) x) x_1)\n                  (ContinuousMap.toFun (ContinuousMap.mk fun UV => ↑(f UV) x) y) ≤\n                C) }\nhF : ∀ (x : X) (UV : ↑s), ↑(F x) UV = ↑(f UV) x\nx y : X\nhxy : F x = F y\n⊢ x = y\n[PROOFSTEP]\nby_contra Hne\n[GOAL]\ncase intro.intro.refine'_1\nι : Type u_1\nX : Type u_2\nY : Type u_3\nπ : ι → Type u_4\ninst✝⁵ : TopologicalSpace X\ninst✝⁴ : TopologicalSpace Y\ninst✝³ : Finite ι\ninst✝² : (i : ι) → TopologicalSpace (π i)\ninst✝¹ : T3Space X\ninst✝ : SecondCountableTopology X\nthis✝² : NormalSpace X\nB : Set (Set X)\nhBc : Set.Countable B\nhB : IsTopologicalBasis B\ns : Set (Set X × Set X) := {UV | UV ∈ B ×ˢ B ∧ closure UV.fst ⊆ UV.snd}\nthis✝¹ : Encodable ↑s\nthis✝ : TopologicalSpace ↑s := ⊥\nthis : DiscreteTopology ↑s\nhd : ∀ (UV : ↑s), Disjoint (closure (↑UV).fst) (↑UV).sndᶜ\nε : ↑s → ℝ\nε01 : ∀ (UV : ↑s), ε UV ∈ Ioc 0 1\nhε : Tendsto ε cofinite (𝓝 0)\nf : ↑s → C(X, ℝ)\nhf0 : ∀ (UV : ↑s), EqOn (↑(f UV)) 0 (↑UV).fst\nhfε : ∀ (UV : ↑s), EqOn (↑(f UV)) (fun x => ε UV) (↑UV).sndᶜ\nhf0ε : ∀ (UV : ↑s) (x : X), ↑(f UV) x ∈ Icc 0 (ε UV)\nhf01 : ∀ (UV : ↑s) (x : X), ↑(f UV) x ∈ Icc 0 1\nF : X → ↑s →ᵇ ℝ :=\n  fun x =>\n    { toContinuousMap := ContinuousMap.mk fun UV => ↑(f UV) x,\n      map_bounded' :=\n        (_ :\n          ∃ C,\n            ∀ (x_1 y : ↑s),\n              dist (ContinuousMap.toFun (ContinuousMap.mk fun UV => ↑(f UV) x) x_1)\n                  (ContinuousMap.toFun (ContinuousMap.mk fun UV => ↑(f UV) x) y) ≤\n                C) }\nhF : ∀ (x : X) (UV : ↑s), ↑(F x) UV = ↑(f UV) x\nx y : X\nhxy : F x = F y\nHne : ¬x = y\n⊢ False\n[PROOFSTEP]\nrcases hB.mem_nhds_iff.1 (isOpen_ne.mem_nhds Hne) with ⟨V, hVB, hxV, hVy⟩\n[GOAL]\ncase intro.intro.refine'_1.intro.intro.intro\nι : Type u_1\nX : Type u_2\nY : Type u_3\nπ : ι → Type u_4\ninst✝⁵ : TopologicalSpace X\ninst✝⁴ : TopologicalSpace Y\ninst✝³ : Finite ι\ninst✝² : (i : ι) → TopologicalSpace (π i)\ninst✝¹ : T3Space X\ninst✝ : SecondCountableTopology X\nthis✝² : NormalSpace X\nB : Set (Set X)\nhBc : Set.Countable B\nhB : IsTopologicalBasis B\ns : Set (Set X × Set X) := {UV | UV ∈ B ×ˢ B ∧ closure UV.fst ⊆ UV.snd}\nthis✝¹ : Encodable ↑s\nthis✝ : TopologicalSpace ↑s := ⊥\nthis : DiscreteTopology ↑s\nhd : ∀ (UV : ↑s), Disjoint (closure (↑UV).fst) (↑UV).sndᶜ\nε : ↑s → ℝ\nε01 : ∀ (UV : ↑s), ε UV ∈ Ioc 0 1\nhε : Tendsto ε cofinite (𝓝 0)\nf : ↑s → C(X, ℝ)\nhf0 : ∀ (UV : ↑s), EqOn (↑(f UV)) 0 (↑UV).fst\nhfε : ∀ (UV : ↑s), EqOn (↑(f UV)) (fun x => ε UV) (↑UV).sndᶜ\nhf0ε : ∀ (UV : ↑s) (x : X), ↑(f UV) x ∈ Icc 0 (ε UV)\nhf01 : ∀ (UV : ↑s) (x : X), ↑(f UV) x ∈ Icc 0 1\nF : X → ↑s →ᵇ ℝ :=\n  fun x =>\n    { toContinuousMap := ContinuousMap.mk fun UV => ↑(f UV) x,\n      map_bounded' :=\n        (_ :\n          ∃ C,\n            ∀ (x_1 y : ↑s),\n              dist (ContinuousMap.toFun (ContinuousMap.mk fun UV => ↑(f UV) x) x_1)\n                  (ContinuousMap.toFun (ContinuousMap.mk fun UV => ↑(f UV) x) y) ≤\n                C) }\nhF : ∀ (x : X) (UV : ↑s), ↑(F x) UV = ↑(f UV) x\nx y : X\nhxy : F x = F y\nHne : ¬x = y\nV : Set X\nhVB : V ∈ B\nhxV : x ∈ V\nhVy : V ⊆ {y_1 | y_1 ≠ y}\n⊢ False\n[PROOFSTEP]\nrcases hB.exists_closure_subset (hB.mem_nhds hVB hxV) with ⟨U, hUB, hxU, hUV⟩\n[GOAL]\ncase intro.intro.refine'_1.intro.intro.intro.intro.intro.intro\nι : Type u_1\nX : Type u_2\nY : Type u_3\nπ : ι → Type u_4\ninst✝⁵ : TopologicalSpace X\ninst✝⁴ : TopologicalSpace Y\ninst✝³ : Finite ι\ninst✝² : (i : ι) → TopologicalSpace (π i)\ninst✝¹ : T3Space X\ninst✝ : SecondCountableTopology X\nthis✝² : NormalSpace X\nB : Set (Set X)\nhBc : Set.Countable B\nhB : IsTopologicalBasis B\ns : Set (Set X × Set X) := {UV | UV ∈ B ×ˢ B ∧ closure UV.fst ⊆ UV.snd}\nthis✝¹ : Encodable ↑s\nthis✝ : TopologicalSpace ↑s := ⊥\nthis : DiscreteTopology ↑s\nhd : ∀ (UV : ↑s), Disjoint (closure (↑UV).fst) (↑UV).sndᶜ\nε : ↑s → ℝ\nε01 : ∀ (UV : ↑s), ε UV ∈ Ioc 0 1\nhε : Tendsto ε cofinite (𝓝 0)\nf : ↑s → C(X, ℝ)\nhf0 : ∀ (UV : ↑s), EqOn (↑(f UV)) 0 (↑UV).fst\nhfε : ∀ (UV : ↑s), EqOn (↑(f UV)) (fun x => ε UV) (↑UV).sndᶜ\nhf0ε : ∀ (UV : ↑s) (x : X), ↑(f UV) x ∈ Icc 0 (ε UV)\nhf01 : ∀ (UV : ↑s) (x : X), ↑(f UV) x ∈ Icc 0 1\nF : X → ↑s →ᵇ ℝ :=\n  fun x =>\n    { toContinuousMap := ContinuousMap.mk fun UV => ↑(f UV) x,\n      map_bounded' :=\n        (_ :\n          ∃ C,\n            ∀ (x_1 y : ↑s),\n              dist (ContinuousMap.toFun (ContinuousMap.mk fun UV => ↑(f UV) x) x_1)\n                  (ContinuousMap.toFun (ContinuousMap.mk fun UV => ↑(f UV) x) y) ≤\n                C) }\nhF : ∀ (x : X) (UV : ↑s), ↑(F x) UV = ↑(f UV) x\nx y : X\nhxy : F x = F y\nHne : ¬x = y\nV : Set X\nhVB : V ∈ B\nhxV : x ∈ V\nhVy : V ⊆ {y_1 | y_1 ≠ y}\nU : Set X\nhUB : U ∈ B\nhxU : x ∈ U\nhUV : closure U ⊆ V\n⊢ False\n[PROOFSTEP]\nset UV : ↥s := ⟨(U, V), ⟨hUB, hVB⟩, hUV⟩\n[GOAL]\ncase intro.intro.refine'_1.intro.intro.intro.intro.intro.intro\nι : Type u_1\nX : Type u_2\nY : Type u_3\nπ : ι → Type u_4\ninst✝⁵ : TopologicalSpace X\ninst✝⁴ : TopologicalSpace Y\ninst✝³ : Finite ι\ninst✝² : (i : ι) → TopologicalSpace (π i)\ninst✝¹ : T3Space X\ninst✝ : SecondCountableTopology X\nthis✝² : NormalSpace X\nB : Set (Set X)\nhBc : Set.Countable B\nhB : IsTopologicalBasis B\ns : Set (Set X × Set X) := {UV | UV ∈ B ×ˢ B ∧ closure UV.fst ⊆ UV.snd}\nthis✝¹ : Encodable ↑s\nthis✝ : TopologicalSpace ↑s := ⊥\nthis : DiscreteTopology ↑s\nhd : ∀ (UV : ↑s), Disjoint (closure (↑UV).fst) (↑UV).sndᶜ\nε : ↑s → ℝ\nε01 : ∀ (UV : ↑s), ε UV ∈ Ioc 0 1\nhε : Tendsto ε cofinite (𝓝 0)\nf : ↑s → C(X, ℝ)\nhf0 : ∀ (UV : ↑s), EqOn (↑(f UV)) 0 (↑UV).fst\nhfε : ∀ (UV : ↑s), EqOn (↑(f UV)) (fun x => ε UV) (↑UV).sndᶜ\nhf0ε : ∀ (UV : ↑s) (x : X), ↑(f UV) x ∈ Icc 0 (ε UV)\nhf01 : ∀ (UV : ↑s) (x : X), ↑(f UV) x ∈ Icc 0 1\nF : X → ↑s →ᵇ ℝ :=\n  fun x =>\n    { toContinuousMap := ContinuousMap.mk fun UV => ↑(f UV) x,\n      map_bounded' :=\n        (_ :\n          ∃ C,\n            ∀ (x_1 y : ↑s),\n              dist (ContinuousMap.toFun (ContinuousMap.mk fun UV => ↑(f UV) x) x_1)\n                  (ContinuousMap.toFun (ContinuousMap.mk fun UV => ↑(f UV) x) y) ≤\n                C) }\nhF : ∀ (x : X) (UV : ↑s), ↑(F x) UV = ↑(f UV) x\nx y : X\nhxy : F x = F y\nHne : ¬x = y\nV : Set X\nhVB : V ∈ B\nhxV : x ∈ V\nhVy : V ⊆ {y_1 | y_1 ≠ y}\nU : Set X\nhUB : U ∈ B\nhxU : x ∈ U\nhUV : closure U ⊆ V\nUV : ↑s := { val := (U, V), property := (_ : (U, V) ∈ B ×ˢ B ∧ closure (U, V).fst ⊆ (U, V).snd) }\n⊢ False\n[PROOFSTEP]\napply (ε01 UV).1.ne\n[GOAL]\ncase intro.intro.refine'_1.intro.intro.intro.intro.intro.intro\nι : Type u_1\nX : Type u_2\nY : Type u_3\nπ : ι → Type u_4\ninst✝⁵ : TopologicalSpace X\ninst✝⁴ : TopologicalSpace Y\ninst✝³ : Finite ι\ninst✝² : (i : ι) → TopologicalSpace (π i)\ninst✝¹ : T3Space X\ninst✝ : SecondCountableTopology X\nthis✝² : NormalSpace X\nB : Set (Set X)\nhBc : Set.Countable B\nhB : IsTopologicalBasis B\ns : Set (Set X × Set X) := {UV | UV ∈ B ×ˢ B ∧ closure UV.fst ⊆ UV.snd}\nthis✝¹ : Encodable ↑s\nthis✝ : TopologicalSpace ↑s := ⊥\nthis : DiscreteTopology ↑s\nhd : ∀ (UV : ↑s), Disjoint (closure (↑UV).fst) (↑UV).sndᶜ\nε : ↑s → ℝ\nε01 : ∀ (UV : ↑s), ε UV ∈ Ioc 0 1\nhε : Tendsto ε cofinite (𝓝 0)\nf : ↑s → C(X, ℝ)\nhf0 : ∀ (UV : ↑s), EqOn (↑(f UV)) 0 (↑UV).fst\nhfε : ∀ (UV : ↑s), EqOn (↑(f UV)) (fun x => ε UV) (↑UV).sndᶜ\nhf0ε : ∀ (UV : ↑s) (x : X), ↑(f UV) x ∈ Icc 0 (ε UV)\nhf01 : ∀ (UV : ↑s) (x : X), ↑(f UV) x ∈ Icc 0 1\nF : X → ↑s →ᵇ ℝ :=\n  fun x =>\n    { toContinuousMap := ContinuousMap.mk fun UV => ↑(f UV) x,\n      map_bounded' :=\n        (_ :\n          ∃ C,\n            ∀ (x_1 y : ↑s),\n              dist (ContinuousMap.toFun (ContinuousMap.mk fun UV => ↑(f UV) x) x_1)\n                  (ContinuousMap.toFun (ContinuousMap.mk fun UV => ↑(f UV) x) y) ≤\n                C) }\nhF : ∀ (x : X) (UV : ↑s), ↑(F x) UV = ↑(f UV) x\nx y : X\nhxy : F x = F y\nHne : ¬x = y\nV : Set X\nhVB : V ∈ B\nhxV : x ∈ V\nhVy : V ⊆ {y_1 | y_1 ≠ y}\nU : Set X\nhUB : U ∈ B\nhxU : x ∈ U\nhUV : closure U ⊆ V\nUV : ↑s := { val := (U, V), property := (_ : (U, V) ∈ B ×ˢ B ∧ closure (U, V).fst ⊆ (U, V).snd) }\n⊢ 0 = ε UV\n[PROOFSTEP]\ncalc\n  (0 : ℝ) = F x UV := (hf0 UV hxU).symm\n  _ = F y UV := by rw [hxy]\n  _ = ε UV := hfε UV fun h : y ∈ V => hVy h rfl\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\nπ : ι → Type u_4\ninst✝⁵ : TopologicalSpace X\ninst✝⁴ : TopologicalSpace Y\ninst✝³ : Finite ι\ninst✝² : (i : ι) → TopologicalSpace (π i)\ninst✝¹ : T3Space X\ninst✝ : SecondCountableTopology X\nthis✝² : NormalSpace X\nB : Set (Set X)\nhBc : Set.Countable B\nhB : IsTopologicalBasis B\ns : Set (Set X × Set X) := {UV | UV ∈ B ×ˢ B ∧ closure UV.fst ⊆ UV.snd}\nthis✝¹ : Encodable ↑s\nthis✝ : TopologicalSpace ↑s := ⊥\nthis : DiscreteTopology ↑s\nhd : ∀ (UV : ↑s), Disjoint (closure (↑UV).fst) (↑UV).sndᶜ\nε : ↑s → ℝ\nε01 : ∀ (UV : ↑s), ε UV ∈ Ioc 0 1\nhε : Tendsto ε cofinite (𝓝 0)\nf : ↑s → C(X, ℝ)\nhf0 : ∀ (UV : ↑s), EqOn (↑(f UV)) 0 (↑UV).fst\nhfε : ∀ (UV : ↑s), EqOn (↑(f UV)) (fun x => ε UV) (↑UV).sndᶜ\nhf0ε : ∀ (UV : ↑s) (x : X), ↑(f UV) x ∈ Icc 0 (ε UV)\nhf01 : ∀ (UV : ↑s) (x : X), ↑(f UV) x ∈ Icc 0 1\nF : X → ↑s →ᵇ ℝ :=\n  fun x =>\n    { toContinuousMap := ContinuousMap.mk fun UV => ↑(f UV) x,\n      map_bounded' :=\n        (_ :\n          ∃ C,\n            ∀ (x_1 y : ↑s),\n              dist (ContinuousMap.toFun (ContinuousMap.mk fun UV => ↑(f UV) x) x_1)\n                  (ContinuousMap.toFun (ContinuousMap.mk fun UV => ↑(f UV) x) y) ≤\n                C) }\nhF : ∀ (x : X) (UV : ↑s), ↑(F x) UV = ↑(f UV) x\nx y : X\nhxy : F x = F y\nHne : ¬x = y\nV : Set X\nhVB : V ∈ B\nhxV : x ∈ V\nhVy : V ⊆ {y_1 | y_1 ≠ y}\nU : Set X\nhUB : U ∈ B\nhxU : x ∈ U\nhUV : closure U ⊆ V\nUV : ↑s := { val := (U, V), property := (_ : (U, V) ∈ B ×ˢ B ∧ closure (U, V).fst ⊆ (U, V).snd) }\n⊢ ↑(F x) UV = ↑(F y) UV\n[PROOFSTEP]\nrw [hxy]\n[GOAL]\ncase intro.intro.refine'_2\nι : Type u_1\nX : Type u_2\nY : Type u_3\nπ : ι → Type u_4\ninst✝⁵ : TopologicalSpace X\ninst✝⁴ : TopologicalSpace Y\ninst✝³ : Finite ι\ninst✝² : (i : ι) → TopologicalSpace (π i)\ninst✝¹ : T3Space X\ninst✝ : SecondCountableTopology X\nthis✝² : NormalSpace X\nB : Set (Set X)\nhBc : Set.Countable B\nhB : IsTopologicalBasis B\ns : Set (Set X × Set X) := {UV | UV ∈ B ×ˢ B ∧ closure UV.fst ⊆ UV.snd}\nthis✝¹ : Encodable ↑s\nthis✝ : TopologicalSpace ↑s := ⊥\nthis : DiscreteTopology ↑s\nhd : ∀ (UV : ↑s), Disjoint (closure (↑UV).fst) (↑UV).sndᶜ\nε : ↑s → ℝ\nε01 : ∀ (UV : ↑s), ε UV ∈ Ioc 0 1\nhε : Tendsto ε cofinite (𝓝 0)\nf : ↑s → C(X, ℝ)\nhf0 : ∀ (UV : ↑s), EqOn (↑(f UV)) 0 (↑UV).fst\nhfε : ∀ (UV : ↑s), EqOn (↑(f UV)) (fun x => ε UV) (↑UV).sndᶜ\nhf0ε : ∀ (UV : ↑s) (x : X), ↑(f UV) x ∈ Icc 0 (ε UV)\nhf01 : ∀ (UV : ↑s) (x : X), ↑(f UV) x ∈ Icc 0 1\nF : X → ↑s →ᵇ ℝ :=\n  fun x =>\n    { toContinuousMap := ContinuousMap.mk fun UV => ↑(f UV) x,\n      map_bounded' :=\n        (_ :\n          ∃ C,\n            ∀ (x_1 y : ↑s),\n              dist (ContinuousMap.toFun (ContinuousMap.mk fun UV => ↑(f UV) x) x_1)\n                  (ContinuousMap.toFun (ContinuousMap.mk fun UV => ↑(f UV) x) y) ≤\n                C) }\nhF : ∀ (x : X) (UV : ↑s), ↑(F x) UV = ↑(f UV) x\nx : X\n⊢ comap F (𝓝 (F x)) ≤ 𝓝 x\n[PROOFSTEP]\nrefine' ((nhds_basis_ball.comap _).le_basis_iff hB.nhds_hasBasis).2 _\n[GOAL]\ncase intro.intro.refine'_2\nι : Type u_1\nX : Type u_2\nY : Type u_3\nπ : ι → Type u_4\ninst✝⁵ : TopologicalSpace X\ninst✝⁴ : TopologicalSpace Y\ninst✝³ : Finite ι\ninst✝² : (i : ι) → TopologicalSpace (π i)\ninst✝¹ : T3Space X\ninst✝ : SecondCountableTopology X\nthis✝² : NormalSpace X\nB : Set (Set X)\nhBc : Set.Countable B\nhB : IsTopologicalBasis B\ns : Set (Set X × Set X) := {UV | UV ∈ B ×ˢ B ∧ closure UV.fst ⊆ UV.snd}\nthis✝¹ : Encodable ↑s\nthis✝ : TopologicalSpace ↑s := ⊥\nthis : DiscreteTopology ↑s\nhd : ∀ (UV : ↑s), Disjoint (closure (↑UV).fst) (↑UV).sndᶜ\nε : ↑s → ℝ\nε01 : ∀ (UV : ↑s), ε UV ∈ Ioc 0 1\nhε : Tendsto ε cofinite (𝓝 0)\nf : ↑s → C(X, ℝ)\nhf0 : ∀ (UV : ↑s), EqOn (↑(f UV)) 0 (↑UV).fst\nhfε : ∀ (UV : ↑s), EqOn (↑(f UV)) (fun x => ε UV) (↑UV).sndᶜ\nhf0ε : ∀ (UV : ↑s) (x : X), ↑(f UV) x ∈ Icc 0 (ε UV)\nhf01 : ∀ (UV : ↑s) (x : X), ↑(f UV) x ∈ Icc 0 1\nF : X → ↑s →ᵇ ℝ :=\n  fun x =>\n    { toContinuousMap := ContinuousMap.mk fun UV => ↑(f UV) x,\n      map_bounded' :=\n        (_ :\n          ∃ C,\n            ∀ (x_1 y : ↑s),\n              dist (ContinuousMap.toFun (ContinuousMap.mk fun UV => ↑(f UV) x) x_1)\n                  (ContinuousMap.toFun (ContinuousMap.mk fun UV => ↑(f UV) x) y) ≤\n                C) }\nhF : ∀ (x : X) (UV : ↑s), ↑(F x) UV = ↑(f UV) x\nx : X\n⊢ ∀ (i' : Set X), i' ∈ B ∧ x ∈ i' → ∃ i, 0 < i ∧ F ⁻¹' ball (F x) i ⊆ i'\n[PROOFSTEP]\nrintro V ⟨hVB, hxV⟩\n[GOAL]\ncase intro.intro.refine'_2.intro\nι : Type u_1\nX : Type u_2\nY : Type u_3\nπ : ι → Type u_4\ninst✝⁵ : TopologicalSpace X\ninst✝⁴ : TopologicalSpace Y\ninst✝³ : Finite ι\ninst✝² : (i : ι) → TopologicalSpace (π i)\ninst✝¹ : T3Space X\ninst✝ : SecondCountableTopology X\nthis✝² : NormalSpace X\nB : Set (Set X)\nhBc : Set.Countable B\nhB : IsTopologicalBasis B\ns : Set (Set X × Set X) := {UV | UV ∈ B ×ˢ B ∧ closure UV.fst ⊆ UV.snd}\nthis✝¹ : Encodable ↑s\nthis✝ : TopologicalSpace ↑s := ⊥\nthis : DiscreteTopology ↑s\nhd : ∀ (UV : ↑s), Disjoint (closure (↑UV).fst) (↑UV).sndᶜ\nε : ↑s → ℝ\nε01 : ∀ (UV : ↑s), ε UV ∈ Ioc 0 1\nhε : Tendsto ε cofinite (𝓝 0)\nf : ↑s → C(X, ℝ)\nhf0 : ∀ (UV : ↑s), EqOn (↑(f UV)) 0 (↑UV).fst\nhfε : ∀ (UV : ↑s), EqOn (↑(f UV)) (fun x => ε UV) (↑UV).sndᶜ\nhf0ε : ∀ (UV : ↑s) (x : X), ↑(f UV) x ∈ Icc 0 (ε UV)\nhf01 : ∀ (UV : ↑s) (x : X), ↑(f UV) x ∈ Icc 0 1\nF : X → ↑s →ᵇ ℝ :=\n  fun x =>\n    { toContinuousMap := ContinuousMap.mk fun UV => ↑(f UV) x,\n      map_bounded' :=\n        (_ :\n          ∃ C,\n            ∀ (x_1 y : ↑s),\n              dist (ContinuousMap.toFun (ContinuousMap.mk fun UV => ↑(f UV) x) x_1)\n                  (ContinuousMap.toFun (ContinuousMap.mk fun UV => ↑(f UV) x) y) ≤\n                C) }\nhF : ∀ (x : X) (UV : ↑s), ↑(F x) UV = ↑(f UV) x\nx : X\nV : Set X\nhVB : V ∈ B\nhxV : x ∈ V\n⊢ ∃ i, 0 < i ∧ F ⁻¹' ball (F x) i ⊆ V\n[PROOFSTEP]\nrcases hB.exists_closure_subset (hB.mem_nhds hVB hxV) with ⟨U, hUB, hxU, hUV⟩\n[GOAL]\ncase intro.intro.refine'_2.intro.intro.intro.intro\nι : Type u_1\nX : Type u_2\nY : Type u_3\nπ : ι → Type u_4\ninst✝⁵ : TopologicalSpace X\ninst✝⁴ : TopologicalSpace Y\ninst✝³ : Finite ι\ninst✝² : (i : ι) → TopologicalSpace (π i)\ninst✝¹ : T3Space X\ninst✝ : SecondCountableTopology X\nthis✝² : NormalSpace X\nB : Set (Set X)\nhBc : Set.Countable B\nhB : IsTopologicalBasis B\ns : Set (Set X × Set X) := {UV | UV ∈ B ×ˢ B ∧ closure UV.fst ⊆ UV.snd}\nthis✝¹ : Encodable ↑s\nthis✝ : TopologicalSpace ↑s := ⊥\nthis : DiscreteTopology ↑s\nhd : ∀ (UV : ↑s), Disjoint (closure (↑UV).fst) (↑UV).sndᶜ\nε : ↑s → ℝ\nε01 : ∀ (UV : ↑s), ε UV ∈ Ioc 0 1\nhε : Tendsto ε cofinite (𝓝 0)\nf : ↑s → C(X, ℝ)\nhf0 : ∀ (UV : ↑s), EqOn (↑(f UV)) 0 (↑UV).fst\nhfε : ∀ (UV : ↑s), EqOn (↑(f UV)) (fun x => ε UV) (↑UV).sndᶜ\nhf0ε : ∀ (UV : ↑s) (x : X), ↑(f UV) x ∈ Icc 0 (ε UV)\nhf01 : ∀ (UV : ↑s) (x : X), ↑(f UV) x ∈ Icc 0 1\nF : X → ↑s →ᵇ ℝ :=\n  fun x =>\n    { toContinuousMap := ContinuousMap.mk fun UV => ↑(f UV) x,\n      map_bounded' :=\n        (_ :\n          ∃ C,\n            ∀ (x_1 y : ↑s),\n              dist (ContinuousMap.toFun (ContinuousMap.mk fun UV => ↑(f UV) x) x_1)\n                  (ContinuousMap.toFun (ContinuousMap.mk fun UV => ↑(f UV) x) y) ≤\n                C) }\nhF : ∀ (x : X) (UV : ↑s), ↑(F x) UV = ↑(f UV) x\nx : X\nV : Set X\nhVB : V ∈ B\nhxV : x ∈ V\nU : Set X\nhUB : U ∈ B\nhxU : x ∈ U\nhUV : closure U ⊆ V\n⊢ ∃ i, 0 < i ∧ F ⁻¹' ball (F x) i ⊆ V\n[PROOFSTEP]\nset UV : ↥s := ⟨(U, V), ⟨hUB, hVB⟩, hUV⟩\n[GOAL]\ncase intro.intro.refine'_2.intro.intro.intro.intro\nι : Type u_1\nX : Type u_2\nY : Type u_3\nπ : ι → Type u_4\ninst✝⁵ : TopologicalSpace X\ninst✝⁴ : TopologicalSpace Y\ninst✝³ : Finite ι\ninst✝² : (i : ι) → TopologicalSpace (π i)\ninst✝¹ : T3Space X\ninst✝ : SecondCountableTopology X\nthis✝² : NormalSpace X\nB : Set (Set X)\nhBc : Set.Countable B\nhB : IsTopologicalBasis B\ns : Set (Set X × Set X) := {UV | UV ∈ B ×ˢ B ∧ closure UV.fst ⊆ UV.snd}\nthis✝¹ : Encodable ↑s\nthis✝ : TopologicalSpace ↑s := ⊥\nthis : DiscreteTopology ↑s\nhd : ∀ (UV : ↑s), Disjoint (closure (↑UV).fst) (↑UV).sndᶜ\nε : ↑s → ℝ\nε01 : ∀ (UV : ↑s), ε UV ∈ Ioc 0 1\nhε : Tendsto ε cofinite (𝓝 0)\nf : ↑s → C(X, ℝ)\nhf0 : ∀ (UV : ↑s), EqOn (↑(f UV)) 0 (↑UV).fst\nhfε : ∀ (UV : ↑s), EqOn (↑(f UV)) (fun x => ε UV) (↑UV).sndᶜ\nhf0ε : ∀ (UV : ↑s) (x : X), ↑(f UV) x ∈ Icc 0 (ε UV)\nhf01 : ∀ (UV : ↑s) (x : X), ↑(f UV) x ∈ Icc 0 1\nF : X → ↑s →ᵇ ℝ :=\n  fun x =>\n    { toContinuousMap := ContinuousMap.mk fun UV => ↑(f UV) x,\n      map_bounded' :=\n        (_ :\n          ∃ C,\n            ∀ (x_1 y : ↑s),\n              dist (ContinuousMap.toFun (ContinuousMap.mk fun UV => ↑(f UV) x) x_1)\n                  (ContinuousMap.toFun (ContinuousMap.mk fun UV => ↑(f UV) x) y) ≤\n                C) }\nhF : ∀ (x : X) (UV : ↑s), ↑(F x) UV = ↑(f UV) x\nx : X\nV : Set X\nhVB : V ∈ B\nhxV : x ∈ V\nU : Set X\nhUB : U ∈ B\nhxU : x ∈ U\nhUV : closure U ⊆ V\nUV : ↑s := { val := (U, V), property := (_ : (U, V) ∈ B ×ˢ B ∧ closure (U, V).fst ⊆ (U, V).snd) }\n⊢ ∃ i, 0 < i ∧ F ⁻¹' ball (F x) i ⊆ V\n[PROOFSTEP]\nrefine' ⟨ε UV, (ε01 UV).1, fun y (hy : dist (F y) (F x) < ε UV) => _⟩\n[GOAL]\ncase intro.intro.refine'_2.intro.intro.intro.intro\nι : Type u_1\nX : Type u_2\nY : Type u_3\nπ : ι → Type u_4\ninst✝⁵ : TopologicalSpace X\ninst✝⁴ : TopologicalSpace Y\ninst✝³ : Finite ι\ninst✝² : (i : ι) → TopologicalSpace (π i)\ninst✝¹ : T3Space X\ninst✝ : SecondCountableTopology X\nthis✝² : NormalSpace X\nB : Set (Set X)\nhBc : Set.Countable B\nhB : IsTopologicalBasis B\ns : Set (Set X × Set X) := {UV | UV ∈ B ×ˢ B ∧ closure UV.fst ⊆ UV.snd}\nthis✝¹ : Encodable ↑s\nthis✝ : TopologicalSpace ↑s := ⊥\nthis : DiscreteTopology ↑s\nhd : ∀ (UV : ↑s), Disjoint (closure (↑UV).fst) (↑UV).sndᶜ\nε : ↑s → ℝ\nε01 : ∀ (UV : ↑s), ε UV ∈ Ioc 0 1\nhε : Tendsto ε cofinite (𝓝 0)\nf : ↑s → C(X, ℝ)\nhf0 : ∀ (UV : ↑s), EqOn (↑(f UV)) 0 (↑UV).fst\nhfε : ∀ (UV : ↑s), EqOn (↑(f UV)) (fun x => ε UV) (↑UV).sndᶜ\nhf0ε : ∀ (UV : ↑s) (x : X), ↑(f UV) x ∈ Icc 0 (ε UV)\nhf01 : ∀ (UV : ↑s) (x : X), ↑(f UV) x ∈ Icc 0 1\nF : X → ↑s →ᵇ ℝ :=\n  fun x =>\n    { toContinuousMap := ContinuousMap.mk fun UV => ↑(f UV) x,\n      map_bounded' :=\n        (_ :\n          ∃ C,\n            ∀ (x_1 y : ↑s),\n              dist (ContinuousMap.toFun (ContinuousMap.mk fun UV => ↑(f UV) x) x_1)\n                  (ContinuousMap.toFun (ContinuousMap.mk fun UV => ↑(f UV) x) y) ≤\n                C) }\nhF : ∀ (x : X) (UV : ↑s), ↑(F x) UV = ↑(f UV) x\nx : X\nV : Set X\nhVB : V ∈ B\nhxV : x ∈ V\nU : Set X\nhUB : U ∈ B\nhxU : x ∈ U\nhUV : closure U ⊆ V\nUV : ↑s := { val := (U, V), property := (_ : (U, V) ∈ B ×ˢ B ∧ closure (U, V).fst ⊆ (U, V).snd) }\ny : X\nhy : dist (F y) (F x) < ε UV\n⊢ y ∈ V\n[PROOFSTEP]\nreplace hy : dist (F y UV) (F x UV) < ε UV\n[GOAL]\ncase hy\nι : Type u_1\nX : Type u_2\nY : Type u_3\nπ : ι → Type u_4\ninst✝⁵ : TopologicalSpace X\ninst✝⁴ : TopologicalSpace Y\ninst✝³ : Finite ι\ninst✝² : (i : ι) → TopologicalSpace (π i)\ninst✝¹ : T3Space X\ninst✝ : SecondCountableTopology X\nthis✝² : NormalSpace X\nB : Set (Set X)\nhBc : Set.Countable B\nhB : IsTopologicalBasis B\ns : Set (Set X × Set X) := {UV | UV ∈ B ×ˢ B ∧ closure UV.fst ⊆ UV.snd}\nthis✝¹ : Encodable ↑s\nthis✝ : TopologicalSpace ↑s := ⊥\nthis : DiscreteTopology ↑s\nhd : ∀ (UV : ↑s), Disjoint (closure (↑UV).fst) (↑UV).sndᶜ\nε : ↑s → ℝ\nε01 : ∀ (UV : ↑s), ε UV ∈ Ioc 0 1\nhε : Tendsto ε cofinite (𝓝 0)\nf : ↑s → C(X, ℝ)\nhf0 : ∀ (UV : ↑s), EqOn (↑(f UV)) 0 (↑UV).fst\nhfε : ∀ (UV : ↑s), EqOn (↑(f UV)) (fun x => ε UV) (↑UV).sndᶜ\nhf0ε : ∀ (UV : ↑s) (x : X), ↑(f UV) x ∈ Icc 0 (ε UV)\nhf01 : ∀ (UV : ↑s) (x : X), ↑(f UV) x ∈ Icc 0 1\nF : X → ↑s →ᵇ ℝ :=\n  fun x =>\n    { toContinuousMap := ContinuousMap.mk fun UV => ↑(f UV) x,\n      map_bounded' :=\n        (_ :\n          ∃ C,\n            ∀ (x_1 y : ↑s),\n              dist (ContinuousMap.toFun (ContinuousMap.mk fun UV => ↑(f UV) x) x_1)\n                  (ContinuousMap.toFun (ContinuousMap.mk fun UV => ↑(f UV) x) y) ≤\n                C) }\nhF : ∀ (x : X) (UV : ↑s), ↑(F x) UV = ↑(f UV) x\nx : X\nV : Set X\nhVB : V ∈ B\nhxV : x ∈ V\nU : Set X\nhUB : U ∈ B\nhxU : x ∈ U\nhUV : closure U ⊆ V\nUV : ↑s := { val := (U, V), property := (_ : (U, V) ∈ B ×ˢ B ∧ closure (U, V).fst ⊆ (U, V).snd) }\ny : X\nhy : dist (F y) (F x) < ε UV\n⊢ dist (↑(F y) UV) (↑(F x) UV) < ε UV\ncase intro.intro.refine'_2.intro.intro.intro.intro\nι : Type u_1\nX : Type u_2\nY : Type u_3\nπ : ι → Type u_4\ninst✝⁵ : TopologicalSpace X\ninst✝⁴ : TopologicalSpace Y\ninst✝³ : Finite ι\ninst✝² : (i : ι) → TopologicalSpace (π i)\ninst✝¹ : T3Space X\ninst✝ : SecondCountableTopology X\nthis✝² : NormalSpace X\nB : Set (Set X)\nhBc : Set.Countable B\nhB : IsTopologicalBasis B\ns : Set (Set X × Set X) := {UV | UV ∈ B ×ˢ B ∧ closure UV.fst ⊆ UV.snd}\nthis✝¹ : Encodable ↑s\nthis✝ : TopologicalSpace ↑s := ⊥\nthis : DiscreteTopology ↑s\nhd : ∀ (UV : ↑s), Disjoint (closure (↑UV).fst) (↑UV).sndᶜ\nε : ↑s → ℝ\nε01 : ∀ (UV : ↑s), ε UV ∈ Ioc 0 1\nhε : Tendsto ε cofinite (𝓝 0)\nf : ↑s → C(X, ℝ)\nhf0 : ∀ (UV : ↑s), EqOn (↑(f UV)) 0 (↑UV).fst\nhfε : ∀ (UV : ↑s), EqOn (↑(f UV)) (fun x => ε UV) (↑UV).sndᶜ\nhf0ε : ∀ (UV : ↑s) (x : X), ↑(f UV) x ∈ Icc 0 (ε UV)\nhf01 : ∀ (UV : ↑s) (x : X), ↑(f UV) x ∈ Icc 0 1\nF : X → ↑s →ᵇ ℝ :=\n  fun x =>\n    { toContinuousMap := ContinuousMap.mk fun UV => ↑(f UV) x,\n      map_bounded' :=\n        (_ :\n          ∃ C,\n            ∀ (x_1 y : ↑s),\n              dist (ContinuousMap.toFun (ContinuousMap.mk fun UV => ↑(f UV) x) x_1)\n                  (ContinuousMap.toFun (ContinuousMap.mk fun UV => ↑(f UV) x) y) ≤\n                C) }\nhF : ∀ (x : X) (UV : ↑s), ↑(F x) UV = ↑(f UV) x\nx : X\nV : Set X\nhVB : V ∈ B\nhxV : x ∈ V\nU : Set X\nhUB : U ∈ B\nhxU : x ∈ U\nhUV : closure U ⊆ V\nUV : ↑s := { val := (U, V), property := (_ : (U, V) ∈ B ×ˢ B ∧ closure (U, V).fst ⊆ (U, V).snd) }\ny : X\nhy : dist (↑(F y) UV) (↑(F x) UV) < ε UV\n⊢ y ∈ V\n[PROOFSTEP]\nexact (BoundedContinuousFunction.dist_coe_le_dist _).trans_lt hy\n[GOAL]\ncase intro.intro.refine'_2.intro.intro.intro.intro\nι : Type u_1\nX : Type u_2\nY : Type u_3\nπ : ι → Type u_4\ninst✝⁵ : TopologicalSpace X\ninst✝⁴ : TopologicalSpace Y\ninst✝³ : Finite ι\ninst✝² : (i : ι) → TopologicalSpace (π i)\ninst✝¹ : T3Space X\ninst✝ : SecondCountableTopology X\nthis✝² : NormalSpace X\nB : Set (Set X)\nhBc : Set.Countable B\nhB : IsTopologicalBasis B\ns : Set (Set X × Set X) := {UV | UV ∈ B ×ˢ B ∧ closure UV.fst ⊆ UV.snd}\nthis✝¹ : Encodable ↑s\nthis✝ : TopologicalSpace ↑s := ⊥\nthis : DiscreteTopology ↑s\nhd : ∀ (UV : ↑s), Disjoint (closure (↑UV).fst) (↑UV).sndᶜ\nε : ↑s → ℝ\nε01 : ∀ (UV : ↑s), ε UV ∈ Ioc 0 1\nhε : Tendsto ε cofinite (𝓝 0)\nf : ↑s → C(X, ℝ)\nhf0 : ∀ (UV : ↑s), EqOn (↑(f UV)) 0 (↑UV).fst\nhfε : ∀ (UV : ↑s), EqOn (↑(f UV)) (fun x => ε UV) (↑UV).sndᶜ\nhf0ε : ∀ (UV : ↑s) (x : X), ↑(f UV) x ∈ Icc 0 (ε UV)\nhf01 : ∀ (UV : ↑s) (x : X), ↑(f UV) x ∈ Icc 0 1\nF : X → ↑s →ᵇ ℝ :=\n  fun x =>\n    { toContinuousMap := ContinuousMap.mk fun UV => ↑(f UV) x,\n      map_bounded' :=\n        (_ :\n          ∃ C,\n            ∀ (x_1 y : ↑s),\n              dist (ContinuousMap.toFun (ContinuousMap.mk fun UV => ↑(f UV) x) x_1)\n                  (ContinuousMap.toFun (ContinuousMap.mk fun UV => ↑(f UV) x) y) ≤\n                C) }\nhF : ∀ (x : X) (UV : ↑s), ↑(F x) UV = ↑(f UV) x\nx : X\nV : Set X\nhVB : V ∈ B\nhxV : x ∈ V\nU : Set X\nhUB : U ∈ B\nhxU : x ∈ U\nhUV : closure U ⊆ V\nUV : ↑s := { val := (U, V), property := (_ : (U, V) ∈ B ×ˢ B ∧ closure (U, V).fst ⊆ (U, V).snd) }\ny : X\nhy : dist (↑(F y) UV) (↑(F x) UV) < ε UV\n⊢ y ∈ V\n[PROOFSTEP]\ncontrapose! hy\n[GOAL]\ncase intro.intro.refine'_2.intro.intro.intro.intro\nι : Type u_1\nX : Type u_2\nY : Type u_3\nπ : ι → Type u_4\ninst✝⁵ : TopologicalSpace X\ninst✝⁴ : TopologicalSpace Y\ninst✝³ : Finite ι\ninst✝² : (i : ι) → TopologicalSpace (π i)\ninst✝¹ : T3Space X\ninst✝ : SecondCountableTopology X\nthis✝² : NormalSpace X\nB : Set (Set X)\nhBc : Set.Countable B\nhB : IsTopologicalBasis B\ns : Set (Set X × Set X) := {UV | UV ∈ B ×ˢ B ∧ closure UV.fst ⊆ UV.snd}\nthis✝¹ : Encodable ↑s\nthis✝ : TopologicalSpace ↑s := ⊥\nthis : DiscreteTopology ↑s\nhd : ∀ (UV : ↑s), Disjoint (closure (↑UV).fst) (↑UV).sndᶜ\nε : ↑s → ℝ\nε01 : ∀ (UV : ↑s), ε UV ∈ Ioc 0 1\nhε : Tendsto ε cofinite (𝓝 0)\nf : ↑s → C(X, ℝ)\nhf0 : ∀ (UV : ↑s), EqOn (↑(f UV)) 0 (↑UV).fst\nhfε : ∀ (UV : ↑s), EqOn (↑(f UV)) (fun x => ε UV) (↑UV).sndᶜ\nhf0ε : ∀ (UV : ↑s) (x : X), ↑(f UV) x ∈ Icc 0 (ε UV)\nhf01 : ∀ (UV : ↑s) (x : X), ↑(f UV) x ∈ Icc 0 1\nF : X → ↑s →ᵇ ℝ :=\n  fun x =>\n    { toContinuousMap := ContinuousMap.mk fun UV => ↑(f UV) x,\n      map_bounded' :=\n        (_ :\n          ∃ C,\n            ∀ (x_1 y : ↑s),\n              dist (ContinuousMap.toFun (ContinuousMap.mk fun UV => ↑(f UV) x) x_1)\n                  (ContinuousMap.toFun (ContinuousMap.mk fun UV => ↑(f UV) x) y) ≤\n                C) }\nhF : ∀ (x : X) (UV : ↑s), ↑(F x) UV = ↑(f UV) x\nx : X\nV : Set X\nhVB : V ∈ B\nhxV : x ∈ V\nU : Set X\nhUB : U ∈ B\nhxU : x ∈ U\nhUV : closure U ⊆ V\nUV : ↑s := { val := (U, V), property := (_ : (U, V) ∈ B ×ˢ B ∧ closure (U, V).fst ⊆ (U, V).snd) }\ny : X\nhy : ¬y ∈ V\n⊢ ε { val := (U, V), property := (_ : (U, V) ∈ B ×ˢ B ∧ closure (U, V).fst ⊆ (U, V).snd) } ≤\n    dist\n      (↑((fun x =>\n              { toContinuousMap := ContinuousMap.mk fun UV => ↑(f UV) x,\n                map_bounded' :=\n                  (_ :\n                    ∃ C,\n                      ∀ (x_1 y : ↑s),\n                        dist (ContinuousMap.toFun (ContinuousMap.mk fun UV => ↑(f UV) x) x_1)\n                            (ContinuousMap.toFun (ContinuousMap.mk fun UV => ↑(f UV) x) y) ≤\n                          C) })\n            y)\n        { val := (U, V), property := (_ : (U, V) ∈ B ×ˢ B ∧ closure (U, V).fst ⊆ (U, V).snd) })\n      (↑((fun x =>\n              { toContinuousMap := ContinuousMap.mk fun UV => ↑(f UV) x,\n                map_bounded' :=\n                  (_ :\n                    ∃ C,\n                      ∀ (x_1 y : ↑s),\n                        dist (ContinuousMap.toFun (ContinuousMap.mk fun UV => ↑(f UV) x) x_1)\n                            (ContinuousMap.toFun (ContinuousMap.mk fun UV => ↑(f UV) x) y) ≤\n                          C) })\n            x)\n        { val := (U, V), property := (_ : (U, V) ∈ B ×ˢ B ∧ closure (U, V).fst ⊆ (U, V).snd) })\n[PROOFSTEP]\nrw [hF, hF, hfε UV hy, hf0 UV hxU, Pi.zero_apply, dist_zero_right]\n[GOAL]\ncase intro.intro.refine'_2.intro.intro.intro.intro\nι : Type u_1\nX : Type u_2\nY : Type u_3\nπ : ι → Type u_4\ninst✝⁵ : TopologicalSpace X\ninst✝⁴ : TopologicalSpace Y\ninst✝³ : Finite ι\ninst✝² : (i : ι) → TopologicalSpace (π i)\ninst✝¹ : T3Space X\ninst✝ : SecondCountableTopology X\nthis✝² : NormalSpace X\nB : Set (Set X)\nhBc : Set.Countable B\nhB : IsTopologicalBasis B\ns : Set (Set X × Set X) := {UV | UV ∈ B ×ˢ B ∧ closure UV.fst ⊆ UV.snd}\nthis✝¹ : Encodable ↑s\nthis✝ : TopologicalSpace ↑s := ⊥\nthis : DiscreteTopology ↑s\nhd : ∀ (UV : ↑s), Disjoint (closure (↑UV).fst) (↑UV).sndᶜ\nε : ↑s → ℝ\nε01 : ∀ (UV : ↑s), ε UV ∈ Ioc 0 1\nhε : Tendsto ε cofinite (𝓝 0)\nf : ↑s → C(X, ℝ)\nhf0 : ∀ (UV : ↑s), EqOn (↑(f UV)) 0 (↑UV).fst\nhfε : ∀ (UV : ↑s), EqOn (↑(f UV)) (fun x => ε UV) (↑UV).sndᶜ\nhf0ε : ∀ (UV : ↑s) (x : X), ↑(f UV) x ∈ Icc 0 (ε UV)\nhf01 : ∀ (UV : ↑s) (x : X), ↑(f UV) x ∈ Icc 0 1\nF : X → ↑s →ᵇ ℝ :=\n  fun x =>\n    { toContinuousMap := ContinuousMap.mk fun UV => ↑(f UV) x,\n      map_bounded' :=\n        (_ :\n          ∃ C,\n            ∀ (x_1 y : ↑s),\n              dist (ContinuousMap.toFun (ContinuousMap.mk fun UV => ↑(f UV) x) x_1)\n                  (ContinuousMap.toFun (ContinuousMap.mk fun UV => ↑(f UV) x) y) ≤\n                C) }\nhF : ∀ (x : X) (UV : ↑s), ↑(F x) UV = ↑(f UV) x\nx : X\nV : Set X\nhVB : V ∈ B\nhxV : x ∈ V\nU : Set X\nhUB : U ∈ B\nhxU : x ∈ U\nhUV : closure U ⊆ V\nUV : ↑s := { val := (U, V), property := (_ : (U, V) ∈ B ×ˢ B ∧ closure (U, V).fst ⊆ (U, V).snd) }\ny : X\nhy : ¬y ∈ V\n⊢ ε { val := (U, V), property := (_ : (U, V) ∈ B ×ˢ B ∧ closure (U, V).fst ⊆ (U, V).snd) } ≤ ‖(fun x => ε UV) y‖\n[PROOFSTEP]\nexact le_abs_self _\n[GOAL]\ncase intro.intro.refine'_3\nι : Type u_1\nX : Type u_2\nY : Type u_3\nπ : ι → Type u_4\ninst✝⁵ : TopologicalSpace X\ninst✝⁴ : TopologicalSpace Y\ninst✝³ : Finite ι\ninst✝² : (i : ι) → TopologicalSpace (π i)\ninst✝¹ : T3Space X\ninst✝ : SecondCountableTopology X\nthis✝² : NormalSpace X\nB : Set (Set X)\nhBc : Set.Countable B\nhB : IsTopologicalBasis B\ns : Set (Set X × Set X) := {UV | UV ∈ B ×ˢ B ∧ closure UV.fst ⊆ UV.snd}\nthis✝¹ : Encodable ↑s\nthis✝ : TopologicalSpace ↑s := ⊥\nthis : DiscreteTopology ↑s\nhd : ∀ (UV : ↑s), Disjoint (closure (↑UV).fst) (↑UV).sndᶜ\nε : ↑s → ℝ\nε01 : ∀ (UV : ↑s), ε UV ∈ Ioc 0 1\nhε : Tendsto ε cofinite (𝓝 0)\nf : ↑s → C(X, ℝ)\nhf0 : ∀ (UV : ↑s), EqOn (↑(f UV)) 0 (↑UV).fst\nhfε : ∀ (UV : ↑s), EqOn (↑(f UV)) (fun x => ε UV) (↑UV).sndᶜ\nhf0ε : ∀ (UV : ↑s) (x : X), ↑(f UV) x ∈ Icc 0 (ε UV)\nhf01 : ∀ (UV : ↑s) (x : X), ↑(f UV) x ∈ Icc 0 1\nF : X → ↑s →ᵇ ℝ :=\n  fun x =>\n    { toContinuousMap := ContinuousMap.mk fun UV => ↑(f UV) x,\n      map_bounded' :=\n        (_ :\n          ∃ C,\n            ∀ (x_1 y : ↑s),\n              dist (ContinuousMap.toFun (ContinuousMap.mk fun UV => ↑(f UV) x) x_1)\n                  (ContinuousMap.toFun (ContinuousMap.mk fun UV => ↑(f UV) x) y) ≤\n                C) }\nhF : ∀ (x : X) (UV : ↑s), ↑(F x) UV = ↑(f UV) x\nx : X\n⊢ 𝓝 x ≤ comap F (𝓝 (F x))\n[PROOFSTEP]\nrefine' (nhds_basis_closedBall.comap _).ge_iff.2 fun δ δ0 => _\n[GOAL]\ncase intro.intro.refine'_3\nι : Type u_1\nX : Type u_2\nY : Type u_3\nπ : ι → Type u_4\ninst✝⁵ : TopologicalSpace X\ninst✝⁴ : TopologicalSpace Y\ninst✝³ : Finite ι\ninst✝² : (i : ι) → TopologicalSpace (π i)\ninst✝¹ : T3Space X\ninst✝ : SecondCountableTopology X\nthis✝² : NormalSpace X\nB : Set (Set X)\nhBc : Set.Countable B\nhB : IsTopologicalBasis B\ns : Set (Set X × Set X) := {UV | UV ∈ B ×ˢ B ∧ closure UV.fst ⊆ UV.snd}\nthis✝¹ : Encodable ↑s\nthis✝ : TopologicalSpace ↑s := ⊥\nthis : DiscreteTopology ↑s\nhd : ∀ (UV : ↑s), Disjoint (closure (↑UV).fst) (↑UV).sndᶜ\nε : ↑s → ℝ\nε01 : ∀ (UV : ↑s), ε UV ∈ Ioc 0 1\nhε : Tendsto ε cofinite (𝓝 0)\nf : ↑s → C(X, ℝ)\nhf0 : ∀ (UV : ↑s), EqOn (↑(f UV)) 0 (↑UV).fst\nhfε : ∀ (UV : ↑s), EqOn (↑(f UV)) (fun x => ε UV) (↑UV).sndᶜ\nhf0ε : ∀ (UV : ↑s) (x : X), ↑(f UV) x ∈ Icc 0 (ε UV)\nhf01 : ∀ (UV : ↑s) (x : X), ↑(f UV) x ∈ Icc 0 1\nF : X → ↑s →ᵇ ℝ :=\n  fun x =>\n    { toContinuousMap := ContinuousMap.mk fun UV => ↑(f UV) x,\n      map_bounded' :=\n        (_ :\n          ∃ C,\n            ∀ (x_1 y : ↑s),\n              dist (ContinuousMap.toFun (ContinuousMap.mk fun UV => ↑(f UV) x) x_1)\n                  (ContinuousMap.toFun (ContinuousMap.mk fun UV => ↑(f UV) x) y) ≤\n                C) }\nhF : ∀ (x : X) (UV : ↑s), ↑(F x) UV = ↑(f UV) x\nx : X\nδ : ℝ\nδ0 : 0 < δ\n⊢ F ⁻¹' closedBall (F x) δ ∈ 𝓝 x\n[PROOFSTEP]\nhave h_fin : {UV : s | δ ≤ ε UV}.Finite := by simpa only [← not_lt] using hε (gt_mem_nhds δ0)\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\nπ : ι → Type u_4\ninst✝⁵ : TopologicalSpace X\ninst✝⁴ : TopologicalSpace Y\ninst✝³ : Finite ι\ninst✝² : (i : ι) → TopologicalSpace (π i)\ninst✝¹ : T3Space X\ninst✝ : SecondCountableTopology X\nthis✝² : NormalSpace X\nB : Set (Set X)\nhBc : Set.Countable B\nhB : IsTopologicalBasis B\ns : Set (Set X × Set X) := {UV | UV ∈ B ×ˢ B ∧ closure UV.fst ⊆ UV.snd}\nthis✝¹ : Encodable ↑s\nthis✝ : TopologicalSpace ↑s := ⊥\nthis : DiscreteTopology ↑s\nhd : ∀ (UV : ↑s), Disjoint (closure (↑UV).fst) (↑UV).sndᶜ\nε : ↑s → ℝ\nε01 : ∀ (UV : ↑s), ε UV ∈ Ioc 0 1\nhε : Tendsto ε cofinite (𝓝 0)\nf : ↑s → C(X, ℝ)\nhf0 : ∀ (UV : ↑s), EqOn (↑(f UV)) 0 (↑UV).fst\nhfε : ∀ (UV : ↑s), EqOn (↑(f UV)) (fun x => ε UV) (↑UV).sndᶜ\nhf0ε : ∀ (UV : ↑s) (x : X), ↑(f UV) x ∈ Icc 0 (ε UV)\nhf01 : ∀ (UV : ↑s) (x : X), ↑(f UV) x ∈ Icc 0 1\nF : X → ↑s →ᵇ ℝ :=\n  fun x =>\n    { toContinuousMap := ContinuousMap.mk fun UV => ↑(f UV) x,\n      map_bounded' :=\n        (_ :\n          ∃ C,\n            ∀ (x_1 y : ↑s),\n              dist (ContinuousMap.toFun (ContinuousMap.mk fun UV => ↑(f UV) x) x_1)\n                  (ContinuousMap.toFun (ContinuousMap.mk fun UV => ↑(f UV) x) y) ≤\n                C) }\nhF : ∀ (x : X) (UV : ↑s), ↑(F x) UV = ↑(f UV) x\nx : X\nδ : ℝ\nδ0 : 0 < δ\n⊢ Set.Finite {UV | δ ≤ ε UV}\n[PROOFSTEP]\nsimpa only [← not_lt] using hε (gt_mem_nhds δ0)\n[GOAL]\ncase intro.intro.refine'_3\nι : Type u_1\nX : Type u_2\nY : Type u_3\nπ : ι → Type u_4\ninst✝⁵ : TopologicalSpace X\ninst✝⁴ : TopologicalSpace Y\ninst✝³ : Finite ι\ninst✝² : (i : ι) → TopologicalSpace (π i)\ninst✝¹ : T3Space X\ninst✝ : SecondCountableTopology X\nthis✝² : NormalSpace X\nB : Set (Set X)\nhBc : Set.Countable B\nhB : IsTopologicalBasis B\ns : Set (Set X × Set X) := {UV | UV ∈ B ×ˢ B ∧ closure UV.fst ⊆ UV.snd}\nthis✝¹ : Encodable ↑s\nthis✝ : TopologicalSpace ↑s := ⊥\nthis : DiscreteTopology ↑s\nhd : ∀ (UV : ↑s), Disjoint (closure (↑UV).fst) (↑UV).sndᶜ\nε : ↑s → ℝ\nε01 : ∀ (UV : ↑s), ε UV ∈ Ioc 0 1\nhε : Tendsto ε cofinite (𝓝 0)\nf : ↑s → C(X, ℝ)\nhf0 : ∀ (UV : ↑s), EqOn (↑(f UV)) 0 (↑UV).fst\nhfε : ∀ (UV : ↑s), EqOn (↑(f UV)) (fun x => ε UV) (↑UV).sndᶜ\nhf0ε : ∀ (UV : ↑s) (x : X), ↑(f UV) x ∈ Icc 0 (ε UV)\nhf01 : ∀ (UV : ↑s) (x : X), ↑(f UV) x ∈ Icc 0 1\nF : X → ↑s →ᵇ ℝ :=\n  fun x =>\n    { toContinuousMap := ContinuousMap.mk fun UV => ↑(f UV) x,\n      map_bounded' :=\n        (_ :\n          ∃ C,\n            ∀ (x_1 y : ↑s),\n              dist (ContinuousMap.toFun (ContinuousMap.mk fun UV => ↑(f UV) x) x_1)\n                  (ContinuousMap.toFun (ContinuousMap.mk fun UV => ↑(f UV) x) y) ≤\n                C) }\nhF : ∀ (x : X) (UV : ↑s), ↑(F x) UV = ↑(f UV) x\nx : X\nδ : ℝ\nδ0 : 0 < δ\nh_fin : Set.Finite {UV | δ ≤ ε UV}\n⊢ F ⁻¹' closedBall (F x) δ ∈ 𝓝 x\n[PROOFSTEP]\nhave : ∀ᶠ y in 𝓝 x, ∀ UV, δ ≤ ε UV → dist (F y UV) (F x UV) ≤ δ :=\n  by\n  refine' (eventually_all_finite h_fin).2 fun UV _ => _\n  exact (f UV).continuous.tendsto x (closedBall_mem_nhds _ δ0)\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\nπ : ι → Type u_4\ninst✝⁵ : TopologicalSpace X\ninst✝⁴ : TopologicalSpace Y\ninst✝³ : Finite ι\ninst✝² : (i : ι) → TopologicalSpace (π i)\ninst✝¹ : T3Space X\ninst✝ : SecondCountableTopology X\nthis✝² : NormalSpace X\nB : Set (Set X)\nhBc : Set.Countable B\nhB : IsTopologicalBasis B\ns : Set (Set X × Set X) := {UV | UV ∈ B ×ˢ B ∧ closure UV.fst ⊆ UV.snd}\nthis✝¹ : Encodable ↑s\nthis✝ : TopologicalSpace ↑s := ⊥\nthis : DiscreteTopology ↑s\nhd : ∀ (UV : ↑s), Disjoint (closure (↑UV).fst) (↑UV).sndᶜ\nε : ↑s → ℝ\nε01 : ∀ (UV : ↑s), ε UV ∈ Ioc 0 1\nhε : Tendsto ε cofinite (𝓝 0)\nf : ↑s → C(X, ℝ)\nhf0 : ∀ (UV : ↑s), EqOn (↑(f UV)) 0 (↑UV).fst\nhfε : ∀ (UV : ↑s), EqOn (↑(f UV)) (fun x => ε UV) (↑UV).sndᶜ\nhf0ε : ∀ (UV : ↑s) (x : X), ↑(f UV) x ∈ Icc 0 (ε UV)\nhf01 : ∀ (UV : ↑s) (x : X), ↑(f UV) x ∈ Icc 0 1\nF : X → ↑s →ᵇ ℝ :=\n  fun x =>\n    { toContinuousMap := ContinuousMap.mk fun UV => ↑(f UV) x,\n      map_bounded' :=\n        (_ :\n          ∃ C,\n            ∀ (x_1 y : ↑s),\n              dist (ContinuousMap.toFun (ContinuousMap.mk fun UV => ↑(f UV) x) x_1)\n                  (ContinuousMap.toFun (ContinuousMap.mk fun UV => ↑(f UV) x) y) ≤\n                C) }\nhF : ∀ (x : X) (UV : ↑s), ↑(F x) UV = ↑(f UV) x\nx : X\nδ : ℝ\nδ0 : 0 < δ\nh_fin : Set.Finite {UV | δ ≤ ε UV}\n⊢ ∀ᶠ (y : X) in 𝓝 x, ∀ (UV : ↑s), δ ≤ ε UV → dist (↑(F y) UV) (↑(F x) UV) ≤ δ\n[PROOFSTEP]\nrefine' (eventually_all_finite h_fin).2 fun UV _ => _\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\nπ : ι → Type u_4\ninst✝⁵ : TopologicalSpace X\ninst✝⁴ : TopologicalSpace Y\ninst✝³ : Finite ι\ninst✝² : (i : ι) → TopologicalSpace (π i)\ninst✝¹ : T3Space X\ninst✝ : SecondCountableTopology X\nthis✝² : NormalSpace X\nB : Set (Set X)\nhBc : Set.Countable B\nhB : IsTopologicalBasis B\ns : Set (Set X × Set X) := {UV | UV ∈ B ×ˢ B ∧ closure UV.fst ⊆ UV.snd}\nthis✝¹ : Encodable ↑s\nthis✝ : TopologicalSpace ↑s := ⊥\nthis : DiscreteTopology ↑s\nhd : ∀ (UV : ↑s), Disjoint (closure (↑UV).fst) (↑UV).sndᶜ\nε : ↑s → ℝ\nε01 : ∀ (UV : ↑s), ε UV ∈ Ioc 0 1\nhε : Tendsto ε cofinite (𝓝 0)\nf : ↑s → C(X, ℝ)\nhf0 : ∀ (UV : ↑s), EqOn (↑(f UV)) 0 (↑UV).fst\nhfε : ∀ (UV : ↑s), EqOn (↑(f UV)) (fun x => ε UV) (↑UV).sndᶜ\nhf0ε : ∀ (UV : ↑s) (x : X), ↑(f UV) x ∈ Icc 0 (ε UV)\nhf01 : ∀ (UV : ↑s) (x : X), ↑(f UV) x ∈ Icc 0 1\nF : X → ↑s →ᵇ ℝ :=\n  fun x =>\n    { toContinuousMap := ContinuousMap.mk fun UV => ↑(f UV) x,\n      map_bounded' :=\n        (_ :\n          ∃ C,\n            ∀ (x_1 y : ↑s),\n              dist (ContinuousMap.toFun (ContinuousMap.mk fun UV => ↑(f UV) x) x_1)\n                  (ContinuousMap.toFun (ContinuousMap.mk fun UV => ↑(f UV) x) y) ≤\n                C) }\nhF : ∀ (x : X) (UV : ↑s), ↑(F x) UV = ↑(f UV) x\nx : X\nδ : ℝ\nδ0 : 0 < δ\nh_fin : Set.Finite {UV | δ ≤ ε UV}\nUV : ↑s\nx✝ : UV ∈ {UV | δ ≤ ε UV}\n⊢ ∀ᶠ (x_1 : X) in 𝓝 x, dist (↑(F x_1) UV) (↑(F x) UV) ≤ δ\n[PROOFSTEP]\nexact (f UV).continuous.tendsto x (closedBall_mem_nhds _ δ0)\n[GOAL]\ncase intro.intro.refine'_3\nι : Type u_1\nX : Type u_2\nY : Type u_3\nπ : ι → Type u_4\ninst✝⁵ : TopologicalSpace X\ninst✝⁴ : TopologicalSpace Y\ninst✝³ : Finite ι\ninst✝² : (i : ι) → TopologicalSpace (π i)\ninst✝¹ : T3Space X\ninst✝ : SecondCountableTopology X\nthis✝³ : NormalSpace X\nB : Set (Set X)\nhBc : Set.Countable B\nhB : IsTopologicalBasis B\ns : Set (Set X × Set X) := {UV | UV ∈ B ×ˢ B ∧ closure UV.fst ⊆ UV.snd}\nthis✝² : Encodable ↑s\nthis✝¹ : TopologicalSpace ↑s := ⊥\nthis✝ : DiscreteTopology ↑s\nhd : ∀ (UV : ↑s), Disjoint (closure (↑UV).fst) (↑UV).sndᶜ\nε : ↑s → ℝ\nε01 : ∀ (UV : ↑s), ε UV ∈ Ioc 0 1\nhε : Tendsto ε cofinite (𝓝 0)\nf : ↑s → C(X, ℝ)\nhf0 : ∀ (UV : ↑s), EqOn (↑(f UV)) 0 (↑UV).fst\nhfε : ∀ (UV : ↑s), EqOn (↑(f UV)) (fun x => ε UV) (↑UV).sndᶜ\nhf0ε : ∀ (UV : ↑s) (x : X), ↑(f UV) x ∈ Icc 0 (ε UV)\nhf01 : ∀ (UV : ↑s) (x : X), ↑(f UV) x ∈ Icc 0 1\nF : X → ↑s →ᵇ ℝ :=\n  fun x =>\n    { toContinuousMap := ContinuousMap.mk fun UV => ↑(f UV) x,\n      map_bounded' :=\n        (_ :\n          ∃ C,\n            ∀ (x_1 y : ↑s),\n              dist (ContinuousMap.toFun (ContinuousMap.mk fun UV => ↑(f UV) x) x_1)\n                  (ContinuousMap.toFun (ContinuousMap.mk fun UV => ↑(f UV) x) y) ≤\n                C) }\nhF : ∀ (x : X) (UV : ↑s), ↑(F x) UV = ↑(f UV) x\nx : X\nδ : ℝ\nδ0 : 0 < δ\nh_fin : Set.Finite {UV | δ ≤ ε UV}\nthis : ∀ᶠ (y : X) in 𝓝 x, ∀ (UV : ↑s), δ ≤ ε UV → dist (↑(F y) UV) (↑(F x) UV) ≤ δ\n⊢ F ⁻¹' closedBall (F x) δ ∈ 𝓝 x\n[PROOFSTEP]\nrefine' this.mono fun y hy => (BoundedContinuousFunction.dist_le δ0.le).2 fun UV => _\n[GOAL]\ncase intro.intro.refine'_3\nι : Type u_1\nX : Type u_2\nY : Type u_3\nπ : ι → Type u_4\ninst✝⁵ : TopologicalSpace X\ninst✝⁴ : TopologicalSpace Y\ninst✝³ : Finite ι\ninst✝² : (i : ι) → TopologicalSpace (π i)\ninst✝¹ : T3Space X\ninst✝ : SecondCountableTopology X\nthis✝³ : NormalSpace X\nB : Set (Set X)\nhBc : Set.Countable B\nhB : IsTopologicalBasis B\ns : Set (Set X × Set X) := {UV | UV ∈ B ×ˢ B ∧ closure UV.fst ⊆ UV.snd}\nthis✝² : Encodable ↑s\nthis✝¹ : TopologicalSpace ↑s := ⊥\nthis✝ : DiscreteTopology ↑s\nhd : ∀ (UV : ↑s), Disjoint (closure (↑UV).fst) (↑UV).sndᶜ\nε : ↑s → ℝ\nε01 : ∀ (UV : ↑s), ε UV ∈ Ioc 0 1\nhε : Tendsto ε cofinite (𝓝 0)\nf : ↑s → C(X, ℝ)\nhf0 : ∀ (UV : ↑s), EqOn (↑(f UV)) 0 (↑UV).fst\nhfε : ∀ (UV : ↑s), EqOn (↑(f UV)) (fun x => ε UV) (↑UV).sndᶜ\nhf0ε : ∀ (UV : ↑s) (x : X), ↑(f UV) x ∈ Icc 0 (ε UV)\nhf01 : ∀ (UV : ↑s) (x : X), ↑(f UV) x ∈ Icc 0 1\nF : X → ↑s →ᵇ ℝ :=\n  fun x =>\n    { toContinuousMap := ContinuousMap.mk fun UV => ↑(f UV) x,\n      map_bounded' :=\n        (_ :\n          ∃ C,\n            ∀ (x_1 y : ↑s),\n              dist (ContinuousMap.toFun (ContinuousMap.mk fun UV => ↑(f UV) x) x_1)\n                  (ContinuousMap.toFun (ContinuousMap.mk fun UV => ↑(f UV) x) y) ≤\n                C) }\nhF : ∀ (x : X) (UV : ↑s), ↑(F x) UV = ↑(f UV) x\nx : X\nδ : ℝ\nδ0 : 0 < δ\nh_fin : Set.Finite {UV | δ ≤ ε UV}\nthis : ∀ᶠ (y : X) in 𝓝 x, ∀ (UV : ↑s), δ ≤ ε UV → dist (↑(F y) UV) (↑(F x) UV) ≤ δ\ny : X\nhy : ∀ (UV : ↑s), δ ≤ ε UV → dist (↑(F y) UV) (↑(F x) UV) ≤ δ\nUV : ↑s\n⊢ dist (↑(F y) UV) (↑(F x) UV) ≤ δ\n[PROOFSTEP]\ncases' le_total δ (ε UV) with hle hle\n[GOAL]\ncase intro.intro.refine'_3.inl\nι : Type u_1\nX : Type u_2\nY : Type u_3\nπ : ι → Type u_4\ninst✝⁵ : TopologicalSpace X\ninst✝⁴ : TopologicalSpace Y\ninst✝³ : Finite ι\ninst✝² : (i : ι) → TopologicalSpace (π i)\ninst✝¹ : T3Space X\ninst✝ : SecondCountableTopology X\nthis✝³ : NormalSpace X\nB : Set (Set X)\nhBc : Set.Countable B\nhB : IsTopologicalBasis B\ns : Set (Set X × Set X) := {UV | UV ∈ B ×ˢ B ∧ closure UV.fst ⊆ UV.snd}\nthis✝² : Encodable ↑s\nthis✝¹ : TopologicalSpace ↑s := ⊥\nthis✝ : DiscreteTopology ↑s\nhd : ∀ (UV : ↑s), Disjoint (closure (↑UV).fst) (↑UV).sndᶜ\nε : ↑s → ℝ\nε01 : ∀ (UV : ↑s), ε UV ∈ Ioc 0 1\nhε : Tendsto ε cofinite (𝓝 0)\nf : ↑s → C(X, ℝ)\nhf0 : ∀ (UV : ↑s), EqOn (↑(f UV)) 0 (↑UV).fst\nhfε : ∀ (UV : ↑s), EqOn (↑(f UV)) (fun x => ε UV) (↑UV).sndᶜ\nhf0ε : ∀ (UV : ↑s) (x : X), ↑(f UV) x ∈ Icc 0 (ε UV)\nhf01 : ∀ (UV : ↑s) (x : X), ↑(f UV) x ∈ Icc 0 1\nF : X → ↑s →ᵇ ℝ :=\n  fun x =>\n    { toContinuousMap := ContinuousMap.mk fun UV => ↑(f UV) x,\n      map_bounded' :=\n        (_ :\n          ∃ C,\n            ∀ (x_1 y : ↑s),\n              dist (ContinuousMap.toFun (ContinuousMap.mk fun UV => ↑(f UV) x) x_1)\n                  (ContinuousMap.toFun (ContinuousMap.mk fun UV => ↑(f UV) x) y) ≤\n                C) }\nhF : ∀ (x : X) (UV : ↑s), ↑(F x) UV = ↑(f UV) x\nx : X\nδ : ℝ\nδ0 : 0 < δ\nh_fin : Set.Finite {UV | δ ≤ ε UV}\nthis : ∀ᶠ (y : X) in 𝓝 x, ∀ (UV : ↑s), δ ≤ ε UV → dist (↑(F y) UV) (↑(F x) UV) ≤ δ\ny : X\nhy : ∀ (UV : ↑s), δ ≤ ε UV → dist (↑(F y) UV) (↑(F x) UV) ≤ δ\nUV : ↑s\nhle : δ ≤ ε UV\n⊢ dist (↑(F y) UV) (↑(F x) UV) ≤ δ\ncase intro.intro.refine'_3.inr\nι : Type u_1\nX : Type u_2\nY : Type u_3\nπ : ι → Type u_4\ninst✝⁵ : TopologicalSpace X\ninst✝⁴ : TopologicalSpace Y\ninst✝³ : Finite ι\ninst✝² : (i : ι) → TopologicalSpace (π i)\ninst✝¹ : T3Space X\ninst✝ : SecondCountableTopology X\nthis✝³ : NormalSpace X\nB : Set (Set X)\nhBc : Set.Countable B\nhB : IsTopologicalBasis B\ns : Set (Set X × Set X) := {UV | UV ∈ B ×ˢ B ∧ closure UV.fst ⊆ UV.snd}\nthis✝² : Encodable ↑s\nthis✝¹ : TopologicalSpace ↑s := ⊥\nthis✝ : DiscreteTopology ↑s\nhd : ∀ (UV : ↑s), Disjoint (closure (↑UV).fst) (↑UV).sndᶜ\nε : ↑s → ℝ\nε01 : ∀ (UV : ↑s), ε UV ∈ Ioc 0 1\nhε : Tendsto ε cofinite (𝓝 0)\nf : ↑s → C(X, ℝ)\nhf0 : ∀ (UV : ↑s), EqOn (↑(f UV)) 0 (↑UV).fst\nhfε : ∀ (UV : ↑s), EqOn (↑(f UV)) (fun x => ε UV) (↑UV).sndᶜ\nhf0ε : ∀ (UV : ↑s) (x : X), ↑(f UV) x ∈ Icc 0 (ε UV)\nhf01 : ∀ (UV : ↑s) (x : X), ↑(f UV) x ∈ Icc 0 1\nF : X → ↑s →ᵇ ℝ :=\n  fun x =>\n    { toContinuousMap := ContinuousMap.mk fun UV => ↑(f UV) x,\n      map_bounded' :=\n        (_ :\n          ∃ C,\n            ∀ (x_1 y : ↑s),\n              dist (ContinuousMap.toFun (ContinuousMap.mk fun UV => ↑(f UV) x) x_1)\n                  (ContinuousMap.toFun (ContinuousMap.mk fun UV => ↑(f UV) x) y) ≤\n                C) }\nhF : ∀ (x : X) (UV : ↑s), ↑(F x) UV = ↑(f UV) x\nx : X\nδ : ℝ\nδ0 : 0 < δ\nh_fin : Set.Finite {UV | δ ≤ ε UV}\nthis : ∀ᶠ (y : X) in 𝓝 x, ∀ (UV : ↑s), δ ≤ ε UV → dist (↑(F y) UV) (↑(F x) UV) ≤ δ\ny : X\nhy : ∀ (UV : ↑s), δ ≤ ε UV → dist (↑(F y) UV) (↑(F x) UV) ≤ δ\nUV : ↑s\nhle : ε UV ≤ δ\n⊢ dist (↑(F y) UV) (↑(F x) UV) ≤ δ\n[PROOFSTEP]\nexacts [hy _ hle, (Real.dist_le_of_mem_Icc (hf0ε _ _) (hf0ε _ _)).trans (by rwa [sub_zero])]\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\nπ : ι → Type u_4\ninst✝⁵ : TopologicalSpace X\ninst✝⁴ : TopologicalSpace Y\ninst✝³ : Finite ι\ninst✝² : (i : ι) → TopologicalSpace (π i)\ninst✝¹ : T3Space X\ninst✝ : SecondCountableTopology X\nthis✝³ : NormalSpace X\nB : Set (Set X)\nhBc : Set.Countable B\nhB : IsTopologicalBasis B\ns : Set (Set X × Set X) := {UV | UV ∈ B ×ˢ B ∧ closure UV.fst ⊆ UV.snd}\nthis✝² : Encodable ↑s\nthis✝¹ : TopologicalSpace ↑s := ⊥\nthis✝ : DiscreteTopology ↑s\nhd : ∀ (UV : ↑s), Disjoint (closure (↑UV).fst) (↑UV).sndᶜ\nε : ↑s → ℝ\nε01 : ∀ (UV : ↑s), ε UV ∈ Ioc 0 1\nhε : Tendsto ε cofinite (𝓝 0)\nf : ↑s → C(X, ℝ)\nhf0 : ∀ (UV : ↑s), EqOn (↑(f UV)) 0 (↑UV).fst\nhfε : ∀ (UV : ↑s), EqOn (↑(f UV)) (fun x => ε UV) (↑UV).sndᶜ\nhf0ε : ∀ (UV : ↑s) (x : X), ↑(f UV) x ∈ Icc 0 (ε UV)\nhf01 : ∀ (UV : ↑s) (x : X), ↑(f UV) x ∈ Icc 0 1\nF : X → ↑s →ᵇ ℝ :=\n  fun x =>\n    { toContinuousMap := ContinuousMap.mk fun UV => ↑(f UV) x,\n      map_bounded' :=\n        (_ :\n          ∃ C,\n            ∀ (x_1 y : ↑s),\n              dist (ContinuousMap.toFun (ContinuousMap.mk fun UV => ↑(f UV) x) x_1)\n                  (ContinuousMap.toFun (ContinuousMap.mk fun UV => ↑(f UV) x) y) ≤\n                C) }\nhF : ∀ (x : X) (UV : ↑s), ↑(F x) UV = ↑(f UV) x\nx : X\nδ : ℝ\nδ0 : 0 < δ\nh_fin : Set.Finite {UV | δ ≤ ε UV}\nthis : ∀ᶠ (y : X) in 𝓝 x, ∀ (UV : ↑s), δ ≤ ε UV → dist (↑(F y) UV) (↑(F x) UV) ≤ δ\ny : X\nhy : ∀ (UV : ↑s), δ ≤ ε UV → dist (↑(F y) UV) (↑(F x) UV) ≤ δ\nUV : ↑s\nhle : ε UV ≤ δ\n⊢ ε UV - 0 ≤ δ\n[PROOFSTEP]\nrwa [sub_zero]\n", "meta": {"mathlib_filename": "Mathlib.Topology.MetricSpace.Metrizable", "llama_tokens": 36399, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8056321983146848, "lm_q2_score": 0.6477982179521103, "lm_q1q2_score": 0.521887102393094}}
{"text": "[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nι : Sort x\nκ : ι → Sort u_1\na a₁ a₂ : α\nb✝ b₁ b₂ : β\ninst✝¹ : Preorder α\ninst✝ : Preorder β\nl : α → β\nu : β → α\ngc : GaloisConnection l u\ns : Set α\nb : β\n⊢ b ∈ upperBounds (l '' s) ↔ b ∈ u ⁻¹' upperBounds s\n[PROOFSTEP]\nsimp [upperBounds, gc _ _]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nι : Sort x\nκ : ι → Sort u_1\na a₁ a₂ : α\nb b₁ b₂ : β\ninst✝¹ : Preorder α\ninst✝ : Preorder β\nl : α → β\nu : β → α\ngc : GaloisConnection l u\ns : Set α\nx✝ : BddAbove (l '' s)\nx : β\nhx : x ∈ upperBounds (l '' s)\n⊢ u x ∈ upperBounds s\n[PROOFSTEP]\nrwa [gc.upperBounds_l_image] at hx \n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nι : Sort x\nκ : ι → Sort u_1\na✝ a₁ a₂ : α\nb✝ b₁ b₂ : β\ninst✝¹ : Preorder α\ninst✝ : Preorder β\nl : α → β\nu : β → α\ngc : GaloisConnection l u\ns : Set α\na : α\nh : IsLUB s a\nb : β\nhb : b ∈ upperBounds (l '' s)\n⊢ u b ∈ upperBounds s\n[PROOFSTEP]\nrwa [gc.upperBounds_l_image] at hb \n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nι : Sort x\nκ : ι → Sort u_1\na a₁ a₂ : α\nb b₁ b₂ : β\ninst✝¹ : PartialOrder α\ninst✝ : Preorder β\nl : α → β\nu : β → α\ngc : GaloisConnection l u\nz : α\ny : β\n⊢ u y = z ↔ ∀ (x : α), x ≤ z ↔ l x ≤ y\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type u\nβ : Type v\nγ : Type w\nι : Sort x\nκ : ι → Sort u_1\na a₁ a₂ : α\nb b₁ b₂ : β\ninst✝¹ : PartialOrder α\ninst✝ : Preorder β\nl : α → β\nu : β → α\ngc : GaloisConnection l u\nz : α\ny : β\n⊢ u y = z → ∀ (x : α), x ≤ z ↔ l x ≤ y\n[PROOFSTEP]\nrintro rfl x\n[GOAL]\ncase mp\nα : Type u\nβ : Type v\nγ : Type w\nι : Sort x\nκ : ι → Sort u_1\na a₁ a₂ : α\nb b₁ b₂ : β\ninst✝¹ : PartialOrder α\ninst✝ : Preorder β\nl : α → β\nu : β → α\ngc : GaloisConnection l u\ny : β\nx : α\n⊢ x ≤ u y ↔ l x ≤ y\n[PROOFSTEP]\nexact (gc x y).symm\n[GOAL]\ncase mpr\nα : Type u\nβ : Type v\nγ : Type w\nι : Sort x\nκ : ι → Sort u_1\na a₁ a₂ : α\nb b₁ b₂ : β\ninst✝¹ : PartialOrder α\ninst✝ : Preorder β\nl : α → β\nu : β → α\ngc : GaloisConnection l u\nz : α\ny : β\n⊢ (∀ (x : α), x ≤ z ↔ l x ≤ y) → u y = z\n[PROOFSTEP]\nintro H\n[GOAL]\ncase mpr\nα : Type u\nβ : Type v\nγ : Type w\nι : Sort x\nκ : ι → Sort u_1\na a₁ a₂ : α\nb b₁ b₂ : β\ninst✝¹ : PartialOrder α\ninst✝ : Preorder β\nl : α → β\nu : β → α\ngc : GaloisConnection l u\nz : α\ny : β\nH : ∀ (x : α), x ≤ z ↔ l x ≤ y\n⊢ u y = z\n[PROOFSTEP]\nexact ((H <| u y).mpr (gc.l_u_le y)).antisymm ((gc _ _).mp <| (H z).mp le_rfl)\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nι : Sort x\nκ : ι → Sort u_1\na a₁ a₂ : α\nb b₁ b₂ : β\ninst✝¹ : Preorder α\ninst✝ : PartialOrder β\nl : α → β\nu : β → α\ngc : GaloisConnection l u\nx : α\nz : β\n⊢ l x = z ↔ ∀ (y : β), z ≤ y ↔ x ≤ u y\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type u\nβ : Type v\nγ : Type w\nι : Sort x\nκ : ι → Sort u_1\na a₁ a₂ : α\nb b₁ b₂ : β\ninst✝¹ : Preorder α\ninst✝ : PartialOrder β\nl : α → β\nu : β → α\ngc : GaloisConnection l u\nx : α\nz : β\n⊢ l x = z → ∀ (y : β), z ≤ y ↔ x ≤ u y\n[PROOFSTEP]\nrintro rfl y\n[GOAL]\ncase mp\nα : Type u\nβ : Type v\nγ : Type w\nι : Sort x\nκ : ι → Sort u_1\na a₁ a₂ : α\nb b₁ b₂ : β\ninst✝¹ : Preorder α\ninst✝ : PartialOrder β\nl : α → β\nu : β → α\ngc : GaloisConnection l u\nx : α\ny : β\n⊢ l x ≤ y ↔ x ≤ u y\n[PROOFSTEP]\nexact gc x y\n[GOAL]\ncase mpr\nα : Type u\nβ : Type v\nγ : Type w\nι : Sort x\nκ : ι → Sort u_1\na a₁ a₂ : α\nb b₁ b₂ : β\ninst✝¹ : Preorder α\ninst✝ : PartialOrder β\nl : α → β\nu : β → α\ngc : GaloisConnection l u\nx : α\nz : β\n⊢ (∀ (y : β), z ≤ y ↔ x ≤ u y) → l x = z\n[PROOFSTEP]\nintro H\n[GOAL]\ncase mpr\nα : Type u\nβ : Type v\nγ : Type w\nι : Sort x\nκ : ι → Sort u_1\na a₁ a₂ : α\nb b₁ b₂ : β\ninst✝¹ : Preorder α\ninst✝ : PartialOrder β\nl : α → β\nu : β → α\ngc : GaloisConnection l u\nx : α\nz : β\nH : ∀ (y : β), z ≤ y ↔ x ≤ u y\n⊢ l x = z\n[PROOFSTEP]\nexact ((gc _ _).mpr <| (H z).mp le_rfl).antisymm ((H <| l x).mpr (gc.le_u_l x))\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nι : Sort x\nκ : ι → Sort u_1\na a₁ a₂ : α\nb b₁ b₂ : β\ninst✝¹ : SemilatticeSup α\ninst✝ : SemilatticeSup β\nl : α → β\nu : β → α\ngc : GaloisConnection l u\n⊢ IsLUB (l '' {a₁, a₂}) (l a₁ ⊔ l a₂)\n[PROOFSTEP]\nsimp only [image_pair, isLUB_pair]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nι : Sort x\nκ : ι → Sort u_1\na a₁ a₂ : α\nb b₁ b₂ : β\ninst✝¹ : CompleteLattice α\ninst✝ : CompleteLattice β\nl : α → β\nu : β → α\ngc : GaloisConnection l u\nf : ι → α\n⊢ IsLUB (range (l ∘ f)) (l (iSup f))\n[PROOFSTEP]\nrw [range_comp, ← sSup_range]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nι : Sort x\nκ : ι → Sort u_1\na a₁ a₂ : α\nb b₁ b₂ : β\ninst✝¹ : CompleteLattice α\ninst✝ : CompleteLattice β\nl : α → β\nu : β → α\ngc : GaloisConnection l u\nf : ι → α\n⊢ IsLUB (l '' range f) (l (sSup (range f)))\n[PROOFSTEP]\nexact gc.isLUB_l_image (isLUB_sSup _)\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nι : Sort x\nκ : ι → Sort u_1\na a₁ a₂ : α\nb b₁ b₂ : β\ninst✝¹ : CompleteLattice α\ninst✝ : CompleteLattice β\nl : α → β\nu : β → α\ngc : GaloisConnection l u\nf : (i : ι) → κ i → α\n⊢ l (⨆ (i : ι) (j : κ i), f i j) = ⨆ (i : ι) (j : κ i), l (f i j)\n[PROOFSTEP]\nsimp_rw [gc.l_iSup]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nι : Sort x\nκ : ι → Sort u_1\na a₁ a₂ : α\nb b₁ b₂ : β\ninst✝¹ : CompleteLattice α\ninst✝ : CompleteLattice β\nl : α → β\nu : β → α\ngc : GaloisConnection l u\ns : Set α\n⊢ l (sSup s) = ⨆ (a : α) (_ : a ∈ s), l a\n[PROOFSTEP]\nsimp only [sSup_eq_iSup, gc.l_iSup]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nι : Sort x\nκ : ι → Sort u_1\na a₁ a₂ : α\nb b₁ b₂ : β\ninst✝² : Preorder α\ninst✝¹ : Preorder β\ninst✝ : Preorder γ\nl1 : α → β\nu1 : β → α\nl2 : β → γ\nu2 : γ → β\ngc1 : GaloisConnection l1 u1\ngc2 : GaloisConnection l2 u2\n⊢ GaloisConnection (l2 ∘ l1) (u1 ∘ u2)\n[PROOFSTEP]\nintro a b\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nι : Sort x\nκ : ι → Sort u_1\na✝ a₁ a₂ : α\nb✝ b₁ b₂ : β\ninst✝² : Preorder α\ninst✝¹ : Preorder β\ninst✝ : Preorder γ\nl1 : α → β\nu1 : β → α\nl2 : β → γ\nu2 : γ → β\ngc1 : GaloisConnection l1 u1\ngc2 : GaloisConnection l2 u2\na : α\nb : γ\n⊢ (l2 ∘ l1) a ≤ b ↔ a ≤ (u1 ∘ u2) b\n[PROOFSTEP]\ndsimp\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nι : Sort x\nκ : ι → Sort u_1\na✝ a₁ a₂ : α\nb✝ b₁ b₂ : β\ninst✝² : Preorder α\ninst✝¹ : Preorder β\ninst✝ : Preorder γ\nl1 : α → β\nu1 : β → α\nl2 : β → γ\nu2 : γ → β\ngc1 : GaloisConnection l1 u1\ngc2 : GaloisConnection l2 u2\na : α\nb : γ\n⊢ l2 (l1 a) ≤ b ↔ a ≤ u1 (u2 b)\n[PROOFSTEP]\nrw [gc2, gc1]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nι : Sort x\nκ : ι → Sort u_1\na a₁ a₂ : α\nb b₁ b₂ : β\ninst✝¹ : BooleanAlgebra α\ninst✝ : BooleanAlgebra β\nl : α → β\nu : β → α\ngc : GaloisConnection l u\n⊢ GaloisConnection (compl ∘ u ∘ compl) (compl ∘ l ∘ compl)\n[PROOFSTEP]\nintro a b\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nι : Sort x\nκ : ι → Sort u_1\na✝ a₁ a₂ : α\nb✝ b₁ b₂ : β\ninst✝¹ : BooleanAlgebra α\ninst✝ : BooleanAlgebra β\nl : α → β\nu : β → α\ngc : GaloisConnection l u\na : β\nb : α\n⊢ (compl ∘ u ∘ compl) a ≤ b ↔ a ≤ (compl ∘ l ∘ compl) b\n[PROOFSTEP]\ndsimp\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nι : Sort x\nκ : ι → Sort u_1\na✝ a₁ a₂ : α\nb✝ b₁ b₂ : β\ninst✝¹ : BooleanAlgebra α\ninst✝ : BooleanAlgebra β\nl : α → β\nu : β → α\ngc : GaloisConnection l u\na : β\nb : α\n⊢ (u aᶜ)ᶜ ≤ b ↔ a ≤ (l bᶜ)ᶜ\n[PROOFSTEP]\nrw [le_compl_iff_le_compl, gc, compl_le_iff_compl_le]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nι : Sort x\nκ : ι → Sort u_1\na a₁ a₂ : α\nb b₁ b₂ : β\ninst✝² : CompleteLattice α\ninst✝¹ : CompleteLattice β\ninst✝ : CompleteLattice γ\nf : α → β → γ\ns : Set α\nt : Set β\nl u : α → β → γ\nl₁ u₁ : β → γ → α\nl₂ u₂ : α → γ → β\nh₁ : ∀ (b : β), GaloisConnection (swap l b) (u₁ b)\nh₂ : ∀ (a : α), GaloisConnection (l a) (u₂ a)\n⊢ sSup (image2 l s t) = l (sSup s) (sSup t)\n[PROOFSTEP]\nsimp_rw [sSup_image2, ← (h₂ _).l_sSup, ← (h₁ _).l_sSup]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nι : Sort x\nκ : ι → Sort u_1\na a₁ a₂ : α\nb b₁ b₂ : β\ninst✝² : CompleteLattice α\ninst✝¹ : CompleteLattice β\ninst✝ : CompleteLattice γ\nf : α → β → γ\ns : Set α\nt : Set β\nl u : α → β → γ\nl₁ u₁ : β → γ → α\nl₂ u₂ : α → γ → β\nh₁ : ∀ (b : β), GaloisConnection (l₁ b) (swap u b)\nh₂ : ∀ (a : α), GaloisConnection (l₂ a) (u a)\n⊢ sInf (image2 u s t) = u (sInf s) (sInf t)\n[PROOFSTEP]\nsimp_rw [sInf_image2, ← (h₂ _).u_sInf, ← (h₁ _).u_sInf]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nι : Sort x\nκ : ι → Sort u_1\na a₁ a₂ : α\nb b₁ b₂ : β\ninst✝¹ : Preorder α\ninst✝ : Preorder β\ne : α ≃o β\ns : Set β\n⊢ BddAbove (↑e ⁻¹' s) ↔ BddAbove s\n[PROOFSTEP]\nrw [← e.bddAbove_image, e.image_preimage]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nι : Sort x\nκ : ι → Sort u_1\na a₁ a₂ : α\nb b₁ b₂ : β\ninst✝¹ : Preorder α\ninst✝ : Preorder β\ne : α ≃o β\ns : Set β\n⊢ BddBelow (↑e ⁻¹' s) ↔ BddBelow s\n[PROOFSTEP]\nrw [← e.bddBelow_image, e.image_preimage]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nι : Sort x\nκ : ι → Sort u_1\na✝ a₁ a₂ : α\nb✝ b₁ b₂ : β\nl : α → β\nu : β → α\ninst✝¹ : SemilatticeSup α\ninst✝ : SemilatticeSup β\ngi : GaloisInsertion l u\na b : β\n⊢ l (u a) ⊔ l (u b) = a ⊔ b\n[PROOFSTEP]\nsimp only [gi.l_u_eq]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nι✝ : Sort x\nκ : ι✝ → Sort u_1\na a₁ a₂ : α\nb b₁ b₂ : β\nl : α → β\nu : β → α\ninst✝¹ : CompleteLattice α\ninst✝ : CompleteLattice β\ngi : GaloisInsertion l u\nι : Sort x\np : ι → Prop\nf : (i : ι) → p i → β\n⊢ l (⨆ (i : ι) (hi : p i), u (f i hi)) = ⨆ (i : ι) (hi : p i), f i hi\n[PROOFSTEP]\nsimp only [iSup_subtype', gi.l_iSup_u]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nι : Sort x\nκ : ι → Sort u_1\na a₁ a₂ : α\nb b₁ b₂ : β\nl : α → β\nu : β → α\ninst✝¹ : CompleteLattice α\ninst✝ : CompleteLattice β\ngi : GaloisInsertion l u\ns : Set β\n⊢ l (sSup (u '' s)) = sSup s\n[PROOFSTEP]\nrw [sSup_image, gi.l_biSup_u, sSup_eq_iSup]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nι : Sort x\nκ : ι → Sort u_1\na✝ a₁ a₂ : α\nb✝ b₁ b₂ : β\nl : α → β\nu : β → α\ninst✝¹ : SemilatticeInf α\ninst✝ : SemilatticeInf β\ngi : GaloisInsertion l u\na b : β\n⊢ l (u (a ⊓ b)) = a ⊓ b\n[PROOFSTEP]\nsimp only [gi.l_u_eq]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nι✝ : Sort x\nκ : ι✝ → Sort u_1\na a₁ a₂ : α\nb b₁ b₂ : β\nl : α → β\nu : β → α\ninst✝¹ : CompleteLattice α\ninst✝ : CompleteLattice β\ngi : GaloisInsertion l u\nι : Sort x\np : ι → Prop\nf : (i : ι) → p i → β\n⊢ l (⨅ (i : ι) (hi : p i), u (f i hi)) = ⨅ (i : ι) (hi : p i), f i hi\n[PROOFSTEP]\nsimp only [iInf_subtype', gi.l_iInf_u]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nι : Sort x\nκ : ι → Sort u_1\na a₁ a₂ : α\nb b₁ b₂ : β\nl : α → β\nu : β → α\ninst✝¹ : CompleteLattice α\ninst✝ : CompleteLattice β\ngi : GaloisInsertion l u\ns : Set β\n⊢ l (sInf (u '' s)) = sInf s\n[PROOFSTEP]\nrw [sInf_image, gi.l_biInf_u, sInf_eq_iInf]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nι✝ : Sort x\nκ : ι✝ → Sort u_1\na a₁ a₂ : α\nb b₁ b₂ : β\nl : α → β\nu : β → α\ninst✝¹ : CompleteLattice α\ninst✝ : CompleteLattice β\ngi : GaloisInsertion l u\nι : Sort x\nf : ι → α\nhf : ∀ (i : ι), u (l (f i)) = f i\n⊢ l (⨅ (i : ι), f i) = l (⨅ (i : ι), u (l (f i)))\n[PROOFSTEP]\nsimp [hf]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nι✝ : Sort x\nκ : ι✝ → Sort u_1\na a₁ a₂ : α\nb b₁ b₂ : β\nl : α → β\nu : β → α\ninst✝¹ : CompleteLattice α\ninst✝ : CompleteLattice β\ngi : GaloisInsertion l u\nι : Sort x\np : ι → Prop\nf : (i : ι) → p i → α\nhf : ∀ (i : ι) (hi : p i), u (l (f i hi)) = f i hi\n⊢ l (⨅ (i : ι) (hi : p i), f i hi) = ⨅ (i : ι) (hi : p i), l (f i hi)\n[PROOFSTEP]\nrw [iInf_subtype', iInf_subtype']\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nι✝ : Sort x\nκ : ι✝ → Sort u_1\na a₁ a₂ : α\nb b₁ b₂ : β\nl : α → β\nu : β → α\ninst✝¹ : CompleteLattice α\ninst✝ : CompleteLattice β\ngi : GaloisInsertion l u\nι : Sort x\np : ι → Prop\nf : (i : ι) → p i → α\nhf : ∀ (i : ι) (hi : p i), u (l (f i hi)) = f i hi\n⊢ l (⨅ (x : { i // p i }), f ↑x (_ : p ↑x)) = ⨅ (x : { i // p i }), l (f ↑x (_ : p ↑x))\n[PROOFSTEP]\nexact gi.l_iInf_of_ul_eq_self _ fun _ => hf _ _\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nι : Sort x\nκ : ι → Sort u_1\na a₁ a₂ : α\nb b₁ b₂ : β\nl : α → β\nu : β → α\ninst✝¹ : PartialOrder β\ninst✝ : SemilatticeInf α\ngi : GaloisInsertion l u\nsrc✝ : PartialOrder β := inst✝¹\n⊢ ∀ (a b : β), a ⊓ b ≤ a\n[PROOFSTEP]\nsimp only [gi.choice_eq]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nι : Sort x\nκ : ι → Sort u_1\na a₁ a₂ : α\nb b₁ b₂ : β\nl : α → β\nu : β → α\ninst✝¹ : PartialOrder β\ninst✝ : SemilatticeInf α\ngi : GaloisInsertion l u\nsrc✝ : PartialOrder β := inst✝¹\n⊢ ∀ (a b : β), l (u a ⊓ u b) ≤ a\n[PROOFSTEP]\nexact fun a b => gi.gc.l_le inf_le_left\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nι : Sort x\nκ : ι → Sort u_1\na a₁ a₂ : α\nb b₁ b₂ : β\nl : α → β\nu : β → α\ninst✝¹ : PartialOrder β\ninst✝ : SemilatticeInf α\ngi : GaloisInsertion l u\nsrc✝ : PartialOrder β := inst✝¹\n⊢ ∀ (a b : β), a ⊓ b ≤ b\n[PROOFSTEP]\nsimp only [gi.choice_eq]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nι : Sort x\nκ : ι → Sort u_1\na a₁ a₂ : α\nb b₁ b₂ : β\nl : α → β\nu : β → α\ninst✝¹ : PartialOrder β\ninst✝ : SemilatticeInf α\ngi : GaloisInsertion l u\nsrc✝ : PartialOrder β := inst✝¹\n⊢ ∀ (a b : β), l (u a ⊓ u b) ≤ b\n[PROOFSTEP]\nexact fun a b => gi.gc.l_le inf_le_right\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nι : Sort x\nκ : ι → Sort u_1\na a₁ a₂ : α\nb b₁ b₂ : β\nl : α → β\nu : β → α\ninst✝¹ : PartialOrder β\ninst✝ : SemilatticeInf α\ngi : GaloisInsertion l u\nsrc✝ : PartialOrder β := inst✝¹\n⊢ ∀ (a b c : β), a ≤ b → a ≤ c → a ≤ b ⊓ c\n[PROOFSTEP]\nsimp only [gi.choice_eq]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nι : Sort x\nκ : ι → Sort u_1\na a₁ a₂ : α\nb b₁ b₂ : β\nl : α → β\nu : β → α\ninst✝¹ : PartialOrder β\ninst✝ : SemilatticeInf α\ngi : GaloisInsertion l u\nsrc✝ : PartialOrder β := inst✝¹\n⊢ ∀ (a b c : β), a ≤ b → a ≤ c → a ≤ l (u b ⊓ u c)\n[PROOFSTEP]\nexact fun a b c hac hbc =>\n  (gi.le_l_u a).trans <| gi.gc.monotone_l <| le_inf (gi.gc.monotone_u hac) (gi.gc.monotone_u hbc)\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nι : Sort x\nκ : ι → Sort u_1\na a₁ a₂ : α\nb b₁ b₂ : β\nl : α → β\nu : β → α\ninst✝² : PartialOrder β\ninst✝¹ : Preorder α\ninst✝ : OrderTop α\ngi : GaloisInsertion l u\n⊢ ∀ (a : β), a ≤ ⊤\n[PROOFSTEP]\nsimp only [gi.choice_eq]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nι : Sort x\nκ : ι → Sort u_1\na a₁ a₂ : α\nb b₁ b₂ : β\nl : α → β\nu : β → α\ninst✝² : PartialOrder β\ninst✝¹ : Preorder α\ninst✝ : OrderTop α\ngi : GaloisInsertion l u\n⊢ ∀ (a : β), a ≤ l ⊤\n[PROOFSTEP]\nexact fun b => (gi.le_l_u b).trans (gi.gc.monotone_l le_top)\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nι : Sort x\nκ : ι → Sort u_1\na a₁ a₂ : α\nb b₁ b₂ : β\nl : α → β\nu : β → α\ninst✝¹ : PartialOrder β\ninst✝ : CompleteLattice α\ngi : GaloisInsertion l u\nsrc✝¹ : BoundedOrder β := liftBoundedOrder gi\nsrc✝ : Lattice β := liftLattice gi\ns : Set β\n⊢ ∀ (a : β), a ∈ s → sInf s ≤ a\n[PROOFSTEP]\ndsimp\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nι : Sort x\nκ : ι → Sort u_1\na a₁ a₂ : α\nb b₁ b₂ : β\nl : α → β\nu : β → α\ninst✝¹ : PartialOrder β\ninst✝ : CompleteLattice α\ngi : GaloisInsertion l u\nsrc✝¹ : BoundedOrder β := liftBoundedOrder gi\nsrc✝ : Lattice β := liftLattice gi\ns : Set β\n⊢ ∀ (a : β), a ∈ s → choice gi (sInf (u '' s)) (_ : u (l (sInf (u '' s))) ≤ sInf (u '' s)) ≤ a\n[PROOFSTEP]\nrw [gi.choice_eq]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nι : Sort x\nκ : ι → Sort u_1\na a₁ a₂ : α\nb b₁ b₂ : β\nl : α → β\nu : β → α\ninst✝¹ : PartialOrder β\ninst✝ : CompleteLattice α\ngi : GaloisInsertion l u\nsrc✝¹ : BoundedOrder β := liftBoundedOrder gi\nsrc✝ : Lattice β := liftLattice gi\ns : Set β\n⊢ ∀ (a : β), a ∈ s → l (sInf (u '' s)) ≤ a\n[PROOFSTEP]\nexact (gi.isGLB_of_u_image (isGLB_sInf _)).1\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nι : Sort x\nκ : ι → Sort u_1\na a₁ a₂ : α\nb b₁ b₂ : β\nl : α → β\nu : β → α\ninst✝¹ : PartialOrder β\ninst✝ : CompleteLattice α\ngi : GaloisInsertion l u\nsrc✝¹ : BoundedOrder β := liftBoundedOrder gi\nsrc✝ : Lattice β := liftLattice gi\ns : Set β\n⊢ ∀ (a : β), (∀ (b : β), b ∈ s → a ≤ b) → a ≤ sInf s\n[PROOFSTEP]\ndsimp\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nι : Sort x\nκ : ι → Sort u_1\na a₁ a₂ : α\nb b₁ b₂ : β\nl : α → β\nu : β → α\ninst✝¹ : PartialOrder β\ninst✝ : CompleteLattice α\ngi : GaloisInsertion l u\nsrc✝¹ : BoundedOrder β := liftBoundedOrder gi\nsrc✝ : Lattice β := liftLattice gi\ns : Set β\n⊢ ∀ (a : β), (∀ (b : β), b ∈ s → a ≤ b) → a ≤ choice gi (sInf (u '' s)) (_ : u (l (sInf (u '' s))) ≤ sInf (u '' s))\n[PROOFSTEP]\nrw [gi.choice_eq]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nι : Sort x\nκ : ι → Sort u_1\na a₁ a₂ : α\nb b₁ b₂ : β\nl : α → β\nu : β → α\ninst✝¹ : PartialOrder β\ninst✝ : CompleteLattice α\ngi : GaloisInsertion l u\nsrc✝¹ : BoundedOrder β := liftBoundedOrder gi\nsrc✝ : Lattice β := liftLattice gi\ns : Set β\n⊢ ∀ (a : β), (∀ (b : β), b ∈ s → a ≤ b) → a ≤ l (sInf (u '' s))\n[PROOFSTEP]\nexact (gi.isGLB_of_u_image (isGLB_sInf _)).2\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nι : Sort x\nκ : ι → Sort u_1\na✝ a₁ a₂ : α\nb✝ b₁ b₂ : β\nl : α → β\nu : β → α\ninst✝¹ : PartialOrder α\ninst✝ : SemilatticeInf β\ngi : GaloisCoinsertion l u\nsrc✝ : PartialOrder α := inst✝¹\na b : α\n⊢ a ⊓ b ≤ a\n[PROOFSTEP]\nexact (@OrderDual.semilatticeInf αᵒᵈ gi.dual.liftSemilatticeSup).inf_le_left a b\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nι : Sort x\nκ : ι → Sort u_1\na✝ a₁ a₂ : α\nb✝ b₁ b₂ : β\nl : α → β\nu : β → α\ninst✝¹ : PartialOrder α\ninst✝ : SemilatticeInf β\ngi : GaloisCoinsertion l u\nsrc✝ : PartialOrder α := inst✝¹\na b : α\n⊢ a ⊓ b ≤ b\n[PROOFSTEP]\nexact (@OrderDual.semilatticeInf αᵒᵈ gi.dual.liftSemilatticeSup).inf_le_right a b\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nι : Sort x\nκ : ι → Sort u_1\na✝ a₁ a₂ : α\nb✝ b₁ b₂ : β\nl : α → β\nu : β → α\ninst✝¹ : PartialOrder α\ninst✝ : SemilatticeInf β\ngi : GaloisCoinsertion l u\nsrc✝ : PartialOrder α := inst✝¹\na b c : α\n⊢ a ≤ b → a ≤ c → a ≤ b ⊓ c\n[PROOFSTEP]\nexact (@OrderDual.semilatticeInf αᵒᵈ gi.dual.liftSemilatticeSup).le_inf a b c\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nι : Sort x\nκ : ι → Sort u_1\na✝ a₁ a₂ : α\nb✝ b₁ b₂ : β\nl : α → β\nu : β → α\ninst✝¹ : PartialOrder α\ninst✝ : SemilatticeSup β\ngi : GaloisCoinsertion l u\nsrc✝ : PartialOrder α := inst✝¹\na b : α\n⊢ a ≤ a ⊔ b\n[PROOFSTEP]\nexact (@OrderDual.semilatticeSup αᵒᵈ gi.dual.liftSemilatticeInf).le_sup_left a b\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nι : Sort x\nκ : ι → Sort u_1\na✝ a₁ a₂ : α\nb✝ b₁ b₂ : β\nl : α → β\nu : β → α\ninst✝¹ : PartialOrder α\ninst✝ : SemilatticeSup β\ngi : GaloisCoinsertion l u\nsrc✝ : PartialOrder α := inst✝¹\na b : α\n⊢ b ≤ a ⊔ b\n[PROOFSTEP]\nexact (@OrderDual.semilatticeSup αᵒᵈ gi.dual.liftSemilatticeInf).le_sup_right a b\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nι : Sort x\nκ : ι → Sort u_1\na✝ a₁ a₂ : α\nb✝ b₁ b₂ : β\nl : α → β\nu : β → α\ninst✝¹ : PartialOrder α\ninst✝ : SemilatticeSup β\ngi : GaloisCoinsertion l u\nsrc✝ : PartialOrder α := inst✝¹\na b c : α\n⊢ a ≤ c → b ≤ c → a ⊔ b ≤ c\n[PROOFSTEP]\nexact (@OrderDual.semilatticeSup αᵒᵈ gi.dual.liftSemilatticeInf).sup_le a b c\n", "meta": {"mathlib_filename": "Mathlib.Order.GaloisConnection", "llama_tokens": 9875, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8056321889812553, "lm_q2_score": 0.647798211152541, "lm_q1q2_score": 0.521887090868963}}
{"text": "[GOAL]\nα : Type u_1\nm0 : MeasurableSpace α\nμ μ₁ μ₂ ν ν₁ ν₂ : Measure α\ns t : Set α\nhs : ↑↑μ s = 0\nht : ↑↑ν t = 0\nhst : univ ⊆ s ∪ t\n⊢ μ ⟂ₘ ν\n[PROOFSTEP]\nuse toMeasurable μ s, measurableSet_toMeasurable _ _, (measure_toMeasurable _).trans hs\n[GOAL]\ncase right\nα : Type u_1\nm0 : MeasurableSpace α\nμ μ₁ μ₂ ν ν₁ ν₂ : Measure α\ns t : Set α\nhs : ↑↑μ s = 0\nht : ↑↑ν t = 0\nhst : univ ⊆ s ∪ t\n⊢ ↑↑ν (toMeasurable μ s)ᶜ = 0\n[PROOFSTEP]\nrefine' measure_mono_null (fun x hx => (hst trivial).resolve_left fun hxs => hx _) ht\n[GOAL]\ncase right\nα : Type u_1\nm0 : MeasurableSpace α\nμ μ₁ μ₂ ν ν₁ ν₂ : Measure α\ns t : Set α\nhs : ↑↑μ s = 0\nht : ↑↑ν t = 0\nhst : univ ⊆ s ∪ t\nx : α\nhx : x ∈ (toMeasurable μ s)ᶜ\nhxs : x ∈ s\n⊢ x ∈ toMeasurable μ s\n[PROOFSTEP]\nexact subset_toMeasurable _ _ hxs\n[GOAL]\nα : Type u_1\nm0 : MeasurableSpace α\nμ✝ μ₁ μ₂ ν ν₁ ν₂ : Measure α\nι : Type u_2\ninst✝ : Countable ι\nμ : ι → Measure α\n⊢ sum μ ⟂ₘ ν ↔ ∀ (i : ι), μ i ⟂ₘ ν\n[PROOFSTEP]\nrefine' ⟨fun h i => h.mono (le_sum _ _) le_rfl, fun H => _⟩\n[GOAL]\nα : Type u_1\nm0 : MeasurableSpace α\nμ✝ μ₁ μ₂ ν ν₁ ν₂ : Measure α\nι : Type u_2\ninst✝ : Countable ι\nμ : ι → Measure α\nH : ∀ (i : ι), μ i ⟂ₘ ν\n⊢ sum μ ⟂ₘ ν\n[PROOFSTEP]\nchoose s hsm hsμ hsν using H\n[GOAL]\nα : Type u_1\nm0 : MeasurableSpace α\nμ✝ μ₁ μ₂ ν ν₁ ν₂ : Measure α\nι : Type u_2\ninst✝ : Countable ι\nμ : ι → Measure α\ns : ι → Set α\nhsm : ∀ (i : ι), MeasurableSet (s i)\nhsμ : ∀ (i : ι), ↑↑(μ i) (s i) = 0\nhsν : ∀ (i : ι), ↑↑ν (s i)ᶜ = 0\n⊢ sum μ ⟂ₘ ν\n[PROOFSTEP]\nrefine' ⟨⋂ i, s i, MeasurableSet.iInter hsm, _, _⟩\n[GOAL]\ncase refine'_1\nα : Type u_1\nm0 : MeasurableSpace α\nμ✝ μ₁ μ₂ ν ν₁ ν₂ : Measure α\nι : Type u_2\ninst✝ : Countable ι\nμ : ι → Measure α\ns : ι → Set α\nhsm : ∀ (i : ι), MeasurableSet (s i)\nhsμ : ∀ (i : ι), ↑↑(μ i) (s i) = 0\nhsν : ∀ (i : ι), ↑↑ν (s i)ᶜ = 0\n⊢ ↑↑(sum μ) (⋂ (i : ι), s i) = 0\n[PROOFSTEP]\nrw [sum_apply _ (MeasurableSet.iInter hsm), ENNReal.tsum_eq_zero]\n[GOAL]\ncase refine'_1\nα : Type u_1\nm0 : MeasurableSpace α\nμ✝ μ₁ μ₂ ν ν₁ ν₂ : Measure α\nι : Type u_2\ninst✝ : Countable ι\nμ : ι → Measure α\ns : ι → Set α\nhsm : ∀ (i : ι), MeasurableSet (s i)\nhsμ : ∀ (i : ι), ↑↑(μ i) (s i) = 0\nhsν : ∀ (i : ι), ↑↑ν (s i)ᶜ = 0\n⊢ ∀ (i : ι), ↑↑(μ i) (⋂ (b : ι), s b) = 0\n[PROOFSTEP]\nexact fun i => measure_mono_null (iInter_subset _ _) (hsμ i)\n[GOAL]\ncase refine'_2\nα : Type u_1\nm0 : MeasurableSpace α\nμ✝ μ₁ μ₂ ν ν₁ ν₂ : Measure α\nι : Type u_2\ninst✝ : Countable ι\nμ : ι → Measure α\ns : ι → Set α\nhsm : ∀ (i : ι), MeasurableSet (s i)\nhsμ : ∀ (i : ι), ↑↑(μ i) (s i) = 0\nhsν : ∀ (i : ι), ↑↑ν (s i)ᶜ = 0\n⊢ ↑↑ν (⋂ (i : ι), s i)ᶜ = 0\n[PROOFSTEP]\nrwa [compl_iInter, measure_iUnion_null_iff]\n[GOAL]\nα : Type u_1\nm0 : MeasurableSpace α\nμ μ₁ μ₂ ν ν₁ ν₂ : Measure α\n⊢ μ₁ + μ₂ ⟂ₘ ν ↔ μ₁ ⟂ₘ ν ∧ μ₂ ⟂ₘ ν\n[PROOFSTEP]\nrw [← sum_cond, sum_left, Bool.forall_bool, cond, cond, and_comm]\n", "meta": {"mathlib_filename": "Mathlib.MeasureTheory.Measure.MutuallySingular", "llama_tokens": 1658, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7606506418255927, "lm_q2_score": 0.6859494614282923, "lm_q1q2_score": 0.5217678980953502}}
{"text": "[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nT : Monad C\ninst✝ : Functor.Additive T.toFunctor\nF G : Algebra T\nα β : F ⟶ G\n⊢ T.map (α.f + β.f) ≫ G.a = F.a ≫ (α.f + β.f)\n[PROOFSTEP]\nsimp only [Functor.map_add, add_comp, Monad.Algebra.Hom.h, comp_add]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nT : Monad C\ninst✝ : Functor.Additive T.toFunctor\nF G : Algebra T\n⊢ ∀ (a b c : F ⟶ G), a + b + c = a + (b + c)\n[PROOFSTEP]\nintros\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nT : Monad C\ninst✝ : Functor.Additive T.toFunctor\nF G : Algebra T\na✝ b✝ c✝ : F ⟶ G\n⊢ a✝ + b✝ + c✝ = a✝ + (b✝ + c✝)\n[PROOFSTEP]\next\n[GOAL]\ncase h\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nT : Monad C\ninst✝ : Functor.Additive T.toFunctor\nF G : Algebra T\na✝ b✝ c✝ : F ⟶ G\n⊢ (a✝ + b✝ + c✝).f = (a✝ + (b✝ + c✝)).f\n[PROOFSTEP]\napply add_assoc\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nT : Monad C\ninst✝ : Functor.Additive T.toFunctor\nF G : Algebra T\n⊢ T.map 0 ≫ G.a = F.a ≫ 0\n[PROOFSTEP]\nsimp only [Functor.map_zero, zero_comp, comp_zero]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nT : Monad C\ninst✝ : Functor.Additive T.toFunctor\nF G : Algebra T\n⊢ ∀ (a : F ⟶ G), 0 + a = a\n[PROOFSTEP]\nintros\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nT : Monad C\ninst✝ : Functor.Additive T.toFunctor\nF G : Algebra T\na✝ : F ⟶ G\n⊢ 0 + a✝ = a✝\n[PROOFSTEP]\next\n[GOAL]\ncase h\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nT : Monad C\ninst✝ : Functor.Additive T.toFunctor\nF G : Algebra T\na✝ : F ⟶ G\n⊢ (0 + a✝).f = a✝.f\n[PROOFSTEP]\napply zero_add\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nT : Monad C\ninst✝ : Functor.Additive T.toFunctor\nF G : Algebra T\n⊢ ∀ (a : F ⟶ G), a + 0 = a\n[PROOFSTEP]\nintros\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nT : Monad C\ninst✝ : Functor.Additive T.toFunctor\nF G : Algebra T\na✝ : F ⟶ G\n⊢ a✝ + 0 = a✝\n[PROOFSTEP]\next\n[GOAL]\ncase h\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nT : Monad C\ninst✝ : Functor.Additive T.toFunctor\nF G : Algebra T\na✝ : F ⟶ G\n⊢ (a✝ + 0).f = a✝.f\n[PROOFSTEP]\napply add_zero\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nT : Monad C\ninst✝ : Functor.Additive T.toFunctor\nF G : Algebra T\nn : ℕ\nα : F ⟶ G\n⊢ T.map (n • α.f) ≫ G.a = F.a ≫ (n • α.f)\n[PROOFSTEP]\nrw [Functor.map_nsmul, nsmul_comp, Monad.Algebra.Hom.h, comp_nsmul]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nT : Monad C\ninst✝ : Functor.Additive T.toFunctor\nF G : Algebra T\n⊢ ∀ (x : F ⟶ G), (fun n α => Algebra.Hom.mk (n • α.f)) 0 x = 0\n[PROOFSTEP]\nintros\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nT : Monad C\ninst✝ : Functor.Additive T.toFunctor\nF G : Algebra T\nx✝ : F ⟶ G\n⊢ (fun n α => Algebra.Hom.mk (n • α.f)) 0 x✝ = 0\n[PROOFSTEP]\next\n[GOAL]\ncase h\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nT : Monad C\ninst✝ : Functor.Additive T.toFunctor\nF G : Algebra T\nx✝ : F ⟶ G\n⊢ ((fun n α => Algebra.Hom.mk (n • α.f)) 0 x✝).f = 0.f\n[PROOFSTEP]\napply zero_smul\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nT : Monad C\ninst✝ : Functor.Additive T.toFunctor\nF G : Algebra T\n⊢ ∀ (n : ℕ) (x : F ⟶ G), (fun n α => Algebra.Hom.mk (n • α.f)) (n + 1) x = x + (fun n α => Algebra.Hom.mk (n • α.f)) n x\n[PROOFSTEP]\nintros\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nT : Monad C\ninst✝ : Functor.Additive T.toFunctor\nF G : Algebra T\nn✝ : ℕ\nx✝ : F ⟶ G\n⊢ (fun n α => Algebra.Hom.mk (n • α.f)) (n✝ + 1) x✝ = x✝ + (fun n α => Algebra.Hom.mk (n • α.f)) n✝ x✝\n[PROOFSTEP]\next\n[GOAL]\ncase h\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nT : Monad C\ninst✝ : Functor.Additive T.toFunctor\nF G : Algebra T\nn✝ : ℕ\nx✝ : F ⟶ G\n⊢ ((fun n α => Algebra.Hom.mk (n • α.f)) (n✝ + 1) x✝).f = (x✝ + (fun n α => Algebra.Hom.mk (n • α.f)) n✝ x✝).f\n[PROOFSTEP]\napply succ_nsmul\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nT : Monad C\ninst✝ : Functor.Additive T.toFunctor\nF G : Algebra T\nα : F ⟶ G\n⊢ T.map (-α.f) ≫ G.a = F.a ≫ (-α.f)\n[PROOFSTEP]\nsimp only [Functor.map_neg, neg_comp, Monad.Algebra.Hom.h, comp_neg]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nT : Monad C\ninst✝ : Functor.Additive T.toFunctor\nF G : Algebra T\nα β : F ⟶ G\n⊢ T.map (α.f - β.f) ≫ G.a = F.a ≫ (α.f - β.f)\n[PROOFSTEP]\nsimp only [Functor.map_sub, sub_comp, Monad.Algebra.Hom.h, comp_sub]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nT : Monad C\ninst✝ : Functor.Additive T.toFunctor\nF G : Algebra T\n⊢ ∀ (a b : F ⟶ G), a - b = a + -b\n[PROOFSTEP]\nintros\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nT : Monad C\ninst✝ : Functor.Additive T.toFunctor\nF G : Algebra T\na✝ b✝ : F ⟶ G\n⊢ a✝ - b✝ = a✝ + -b✝\n[PROOFSTEP]\next\n[GOAL]\ncase h\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nT : Monad C\ninst✝ : Functor.Additive T.toFunctor\nF G : Algebra T\na✝ b✝ : F ⟶ G\n⊢ (a✝ - b✝).f = (a✝ + -b✝).f\n[PROOFSTEP]\napply sub_eq_add_neg\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nT : Monad C\ninst✝ : Functor.Additive T.toFunctor\nF G : Algebra T\nr : ℤ\nα : F ⟶ G\n⊢ T.map (r • α.f) ≫ G.a = F.a ≫ (r • α.f)\n[PROOFSTEP]\nrw [Functor.map_zsmul, zsmul_comp, Monad.Algebra.Hom.h, comp_zsmul]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nT : Monad C\ninst✝ : Functor.Additive T.toFunctor\nF G : Algebra T\n⊢ ∀ (a : F ⟶ G), (fun r α => Algebra.Hom.mk (r • α.f)) 0 a = 0\n[PROOFSTEP]\nintros\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nT : Monad C\ninst✝ : Functor.Additive T.toFunctor\nF G : Algebra T\na✝ : F ⟶ G\n⊢ (fun r α => Algebra.Hom.mk (r • α.f)) 0 a✝ = 0\n[PROOFSTEP]\next\n[GOAL]\ncase h\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nT : Monad C\ninst✝ : Functor.Additive T.toFunctor\nF G : Algebra T\na✝ : F ⟶ G\n⊢ ((fun r α => Algebra.Hom.mk (r • α.f)) 0 a✝).f = 0.f\n[PROOFSTEP]\napply zero_smul\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nT : Monad C\ninst✝ : Functor.Additive T.toFunctor\nF G : Algebra T\n⊢ ∀ (n : ℕ) (a : F ⟶ G),\n    (fun r α => Algebra.Hom.mk (r • α.f)) (Int.ofNat (Nat.succ n)) a =\n      a + (fun r α => Algebra.Hom.mk (r • α.f)) (Int.ofNat n) a\n[PROOFSTEP]\nintros\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nT : Monad C\ninst✝ : Functor.Additive T.toFunctor\nF G : Algebra T\nn✝ : ℕ\na✝ : F ⟶ G\n⊢ (fun r α => Algebra.Hom.mk (r • α.f)) (Int.ofNat (Nat.succ n✝)) a✝ =\n    a✝ + (fun r α => Algebra.Hom.mk (r • α.f)) (Int.ofNat n✝) a✝\n[PROOFSTEP]\next\n[GOAL]\ncase h\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nT : Monad C\ninst✝ : Functor.Additive T.toFunctor\nF G : Algebra T\nn✝ : ℕ\na✝ : F ⟶ G\n⊢ ((fun r α => Algebra.Hom.mk (r • α.f)) (Int.ofNat (Nat.succ n✝)) a✝).f =\n    (a✝ + (fun r α => Algebra.Hom.mk (r • α.f)) (Int.ofNat n✝) a✝).f\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nT : Monad C\ninst✝ : Functor.Additive T.toFunctor\nF G : Algebra T\nn✝ : ℕ\na✝ : F ⟶ G\n⊢ ↑(Nat.succ n✝) • a✝.f = (a✝ + Algebra.Hom.mk (↑n✝ • a✝.f)).f\n[PROOFSTEP]\nsimp only [coe_nat_zsmul, succ_nsmul]\n[GOAL]\ncase h\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nT : Monad C\ninst✝ : Functor.Additive T.toFunctor\nF G : Algebra T\nn✝ : ℕ\na✝ : F ⟶ G\n⊢ a✝.f + n✝ • a✝.f = (a✝ + Algebra.Hom.mk (n✝ • a✝.f)).f\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nT : Monad C\ninst✝ : Functor.Additive T.toFunctor\nF G : Algebra T\n⊢ ∀ (n : ℕ) (a : F ⟶ G),\n    (fun r α => Algebra.Hom.mk (r • α.f)) (Int.negSucc n) a = -(fun r α => Algebra.Hom.mk (r • α.f)) (↑(Nat.succ n)) a\n[PROOFSTEP]\nintros\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nT : Monad C\ninst✝ : Functor.Additive T.toFunctor\nF G : Algebra T\nn✝ : ℕ\na✝ : F ⟶ G\n⊢ (fun r α => Algebra.Hom.mk (r • α.f)) (Int.negSucc n✝) a✝ = -(fun r α => Algebra.Hom.mk (r • α.f)) (↑(Nat.succ n✝)) a✝\n[PROOFSTEP]\next\n[GOAL]\ncase h\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nT : Monad C\ninst✝ : Functor.Additive T.toFunctor\nF G : Algebra T\nn✝ : ℕ\na✝ : F ⟶ G\n⊢ ((fun r α => Algebra.Hom.mk (r • α.f)) (Int.negSucc n✝) a✝).f =\n    (-(fun r α => Algebra.Hom.mk (r • α.f)) (↑(Nat.succ n✝)) a✝).f\n[PROOFSTEP]\nsimp only [negSucc_zsmul, neg_inj, nsmul_eq_smul_cast ℤ]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nT : Monad C\ninst✝ : Functor.Additive T.toFunctor\nF G : Algebra T\n⊢ ∀ (a : F ⟶ G), -a + a = 0\n[PROOFSTEP]\nintros\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nT : Monad C\ninst✝ : Functor.Additive T.toFunctor\nF G : Algebra T\na✝ : F ⟶ G\n⊢ -a✝ + a✝ = 0\n[PROOFSTEP]\next\n[GOAL]\ncase h\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nT : Monad C\ninst✝ : Functor.Additive T.toFunctor\nF G : Algebra T\na✝ : F ⟶ G\n⊢ (-a✝ + a✝).f = 0.f\n[PROOFSTEP]\napply add_left_neg\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nT : Monad C\ninst✝ : Functor.Additive T.toFunctor\nF G : Algebra T\n⊢ ∀ (a b : F ⟶ G), a + b = b + a\n[PROOFSTEP]\nintros\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nT : Monad C\ninst✝ : Functor.Additive T.toFunctor\nF G : Algebra T\na✝ b✝ : F ⟶ G\n⊢ a✝ + b✝ = b✝ + a✝\n[PROOFSTEP]\next\n[GOAL]\ncase h\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nT : Monad C\ninst✝ : Functor.Additive T.toFunctor\nF G : Algebra T\na✝ b✝ : F ⟶ G\n⊢ (a✝ + b✝).f = (b✝ + a✝).f\n[PROOFSTEP]\napply add_comm\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nT : Monad C\ninst✝ : Functor.Additive T.toFunctor\n⊢ ∀ (P Q R : Algebra T) (f f' : P ⟶ Q) (g : Q ⟶ R), (f + f') ≫ g = f ≫ g + f' ≫ g\n[PROOFSTEP]\nintros\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nT : Monad C\ninst✝ : Functor.Additive T.toFunctor\nP✝ Q✝ R✝ : Algebra T\nf✝ f'✝ : P✝ ⟶ Q✝\ng✝ : Q✝ ⟶ R✝\n⊢ (f✝ + f'✝) ≫ g✝ = f✝ ≫ g✝ + f'✝ ≫ g✝\n[PROOFSTEP]\next\n[GOAL]\ncase h\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nT : Monad C\ninst✝ : Functor.Additive T.toFunctor\nP✝ Q✝ R✝ : Algebra T\nf✝ f'✝ : P✝ ⟶ Q✝\ng✝ : Q✝ ⟶ R✝\n⊢ ((f✝ + f'✝) ≫ g✝).f = (f✝ ≫ g✝ + f'✝ ≫ g✝).f\n[PROOFSTEP]\napply add_comp\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nT : Monad C\ninst✝ : Functor.Additive T.toFunctor\n⊢ ∀ (P Q R : Algebra T) (f : P ⟶ Q) (g g' : Q ⟶ R), f ≫ (g + g') = f ≫ g + f ≫ g'\n[PROOFSTEP]\nintros\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nT : Monad C\ninst✝ : Functor.Additive T.toFunctor\nP✝ Q✝ R✝ : Algebra T\nf✝ : P✝ ⟶ Q✝\ng✝ g'✝ : Q✝ ⟶ R✝\n⊢ f✝ ≫ (g✝ + g'✝) = f✝ ≫ g✝ + f✝ ≫ g'✝\n[PROOFSTEP]\next\n[GOAL]\ncase h\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\ninst✝¹ : Preadditive C\nT : Monad C\ninst✝ : Functor.Additive T.toFunctor\nP✝ Q✝ R✝ : Algebra T\nf✝ : P✝ ⟶ Q✝\ng✝ g'✝ : Q✝ ⟶ R✝\n⊢ (f✝ ≫ (g✝ + g'✝)).f = (f✝ ≫ g✝ + f✝ ≫ g'✝).f\n[PROOFSTEP]\napply comp_add\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : Preadditive C\nT : Monad C\ninst✝¹ : Functor.Additive T.toFunctor\nU : Comonad C\ninst✝ : Functor.Additive U.toFunctor\nF G : Coalgebra U\nα β : F ⟶ G\n⊢ F.a ≫ U.map (α.f + β.f) = (α.f + β.f) ≫ G.a\n[PROOFSTEP]\nsimp only [Functor.map_add, comp_add, Comonad.Coalgebra.Hom.h, add_comp]\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : Preadditive C\nT : Monad C\ninst✝¹ : Functor.Additive T.toFunctor\nU : Comonad C\ninst✝ : Functor.Additive U.toFunctor\nF G : Coalgebra U\n⊢ ∀ (a b c : F ⟶ G), a + b + c = a + (b + c)\n[PROOFSTEP]\nintros\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : Preadditive C\nT : Monad C\ninst✝¹ : Functor.Additive T.toFunctor\nU : Comonad C\ninst✝ : Functor.Additive U.toFunctor\nF G : Coalgebra U\na✝ b✝ c✝ : F ⟶ G\n⊢ a✝ + b✝ + c✝ = a✝ + (b✝ + c✝)\n[PROOFSTEP]\next\n[GOAL]\ncase h\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : Preadditive C\nT : Monad C\ninst✝¹ : Functor.Additive T.toFunctor\nU : Comonad C\ninst✝ : Functor.Additive U.toFunctor\nF G : Coalgebra U\na✝ b✝ c✝ : F ⟶ G\n⊢ (a✝ + b✝ + c✝).f = (a✝ + (b✝ + c✝)).f\n[PROOFSTEP]\napply add_assoc\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : Preadditive C\nT : Monad C\ninst✝¹ : Functor.Additive T.toFunctor\nU : Comonad C\ninst✝ : Functor.Additive U.toFunctor\nF G : Coalgebra U\n⊢ F.a ≫ U.map 0 = 0 ≫ G.a\n[PROOFSTEP]\nsimp only [Functor.map_zero, comp_zero, zero_comp]\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : Preadditive C\nT : Monad C\ninst✝¹ : Functor.Additive T.toFunctor\nU : Comonad C\ninst✝ : Functor.Additive U.toFunctor\nF G : Coalgebra U\n⊢ ∀ (a : F ⟶ G), 0 + a = a\n[PROOFSTEP]\nintros\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : Preadditive C\nT : Monad C\ninst✝¹ : Functor.Additive T.toFunctor\nU : Comonad C\ninst✝ : Functor.Additive U.toFunctor\nF G : Coalgebra U\na✝ : F ⟶ G\n⊢ 0 + a✝ = a✝\n[PROOFSTEP]\next\n[GOAL]\ncase h\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : Preadditive C\nT : Monad C\ninst✝¹ : Functor.Additive T.toFunctor\nU : Comonad C\ninst✝ : Functor.Additive U.toFunctor\nF G : Coalgebra U\na✝ : F ⟶ G\n⊢ (0 + a✝).f = a✝.f\n[PROOFSTEP]\napply zero_add\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : Preadditive C\nT : Monad C\ninst✝¹ : Functor.Additive T.toFunctor\nU : Comonad C\ninst✝ : Functor.Additive U.toFunctor\nF G : Coalgebra U\n⊢ ∀ (a : F ⟶ G), a + 0 = a\n[PROOFSTEP]\nintros\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : Preadditive C\nT : Monad C\ninst✝¹ : Functor.Additive T.toFunctor\nU : Comonad C\ninst✝ : Functor.Additive U.toFunctor\nF G : Coalgebra U\na✝ : F ⟶ G\n⊢ a✝ + 0 = a✝\n[PROOFSTEP]\next\n[GOAL]\ncase h\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : Preadditive C\nT : Monad C\ninst✝¹ : Functor.Additive T.toFunctor\nU : Comonad C\ninst✝ : Functor.Additive U.toFunctor\nF G : Coalgebra U\na✝ : F ⟶ G\n⊢ (a✝ + 0).f = a✝.f\n[PROOFSTEP]\napply add_zero\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : Preadditive C\nT : Monad C\ninst✝¹ : Functor.Additive T.toFunctor\nU : Comonad C\ninst✝ : Functor.Additive U.toFunctor\nF G : Coalgebra U\nn : ℕ\nα : F ⟶ G\n⊢ F.a ≫ U.map (n • α.f) = (n • α.f) ≫ G.a\n[PROOFSTEP]\nrw [Functor.map_nsmul, comp_nsmul, Comonad.Coalgebra.Hom.h, nsmul_comp]\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : Preadditive C\nT : Monad C\ninst✝¹ : Functor.Additive T.toFunctor\nU : Comonad C\ninst✝ : Functor.Additive U.toFunctor\nF G : Coalgebra U\n⊢ ∀ (x : F ⟶ G), (fun n α => Coalgebra.Hom.mk (n • α.f)) 0 x = 0\n[PROOFSTEP]\nintros\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : Preadditive C\nT : Monad C\ninst✝¹ : Functor.Additive T.toFunctor\nU : Comonad C\ninst✝ : Functor.Additive U.toFunctor\nF G : Coalgebra U\nx✝ : F ⟶ G\n⊢ (fun n α => Coalgebra.Hom.mk (n • α.f)) 0 x✝ = 0\n[PROOFSTEP]\next\n[GOAL]\ncase h\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : Preadditive C\nT : Monad C\ninst✝¹ : Functor.Additive T.toFunctor\nU : Comonad C\ninst✝ : Functor.Additive U.toFunctor\nF G : Coalgebra U\nx✝ : F ⟶ G\n⊢ ((fun n α => Coalgebra.Hom.mk (n • α.f)) 0 x✝).f = 0.f\n[PROOFSTEP]\napply zero_smul\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : Preadditive C\nT : Monad C\ninst✝¹ : Functor.Additive T.toFunctor\nU : Comonad C\ninst✝ : Functor.Additive U.toFunctor\nF G : Coalgebra U\n⊢ ∀ (n : ℕ) (x : F ⟶ G),\n    (fun n α => Coalgebra.Hom.mk (n • α.f)) (n + 1) x = x + (fun n α => Coalgebra.Hom.mk (n • α.f)) n x\n[PROOFSTEP]\nintros\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : Preadditive C\nT : Monad C\ninst✝¹ : Functor.Additive T.toFunctor\nU : Comonad C\ninst✝ : Functor.Additive U.toFunctor\nF G : Coalgebra U\nn✝ : ℕ\nx✝ : F ⟶ G\n⊢ (fun n α => Coalgebra.Hom.mk (n • α.f)) (n✝ + 1) x✝ = x✝ + (fun n α => Coalgebra.Hom.mk (n • α.f)) n✝ x✝\n[PROOFSTEP]\next\n[GOAL]\ncase h\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : Preadditive C\nT : Monad C\ninst✝¹ : Functor.Additive T.toFunctor\nU : Comonad C\ninst✝ : Functor.Additive U.toFunctor\nF G : Coalgebra U\nn✝ : ℕ\nx✝ : F ⟶ G\n⊢ ((fun n α => Coalgebra.Hom.mk (n • α.f)) (n✝ + 1) x✝).f = (x✝ + (fun n α => Coalgebra.Hom.mk (n • α.f)) n✝ x✝).f\n[PROOFSTEP]\napply succ_nsmul\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : Preadditive C\nT : Monad C\ninst✝¹ : Functor.Additive T.toFunctor\nU : Comonad C\ninst✝ : Functor.Additive U.toFunctor\nF G : Coalgebra U\nα : F ⟶ G\n⊢ F.a ≫ U.map (-α.f) = (-α.f) ≫ G.a\n[PROOFSTEP]\nsimp only [Functor.map_neg, comp_neg, Comonad.Coalgebra.Hom.h, neg_comp]\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : Preadditive C\nT : Monad C\ninst✝¹ : Functor.Additive T.toFunctor\nU : Comonad C\ninst✝ : Functor.Additive U.toFunctor\nF G : Coalgebra U\nα β : F ⟶ G\n⊢ F.a ≫ U.map (α.f - β.f) = (α.f - β.f) ≫ G.a\n[PROOFSTEP]\nsimp only [Functor.map_sub, comp_sub, Comonad.Coalgebra.Hom.h, sub_comp]\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : Preadditive C\nT : Monad C\ninst✝¹ : Functor.Additive T.toFunctor\nU : Comonad C\ninst✝ : Functor.Additive U.toFunctor\nF G : Coalgebra U\n⊢ ∀ (a b : F ⟶ G), a - b = a + -b\n[PROOFSTEP]\nintros\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : Preadditive C\nT : Monad C\ninst✝¹ : Functor.Additive T.toFunctor\nU : Comonad C\ninst✝ : Functor.Additive U.toFunctor\nF G : Coalgebra U\na✝ b✝ : F ⟶ G\n⊢ a✝ - b✝ = a✝ + -b✝\n[PROOFSTEP]\next\n[GOAL]\ncase h\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : Preadditive C\nT : Monad C\ninst✝¹ : Functor.Additive T.toFunctor\nU : Comonad C\ninst✝ : Functor.Additive U.toFunctor\nF G : Coalgebra U\na✝ b✝ : F ⟶ G\n⊢ (a✝ - b✝).f = (a✝ + -b✝).f\n[PROOFSTEP]\napply sub_eq_add_neg\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : Preadditive C\nT : Monad C\ninst✝¹ : Functor.Additive T.toFunctor\nU : Comonad C\ninst✝ : Functor.Additive U.toFunctor\nF G : Coalgebra U\nr : ℤ\nα : F ⟶ G\n⊢ F.a ≫ U.map (r • α.f) = (r • α.f) ≫ G.a\n[PROOFSTEP]\nrw [Functor.map_zsmul, comp_zsmul, Comonad.Coalgebra.Hom.h, zsmul_comp]\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : Preadditive C\nT : Monad C\ninst✝¹ : Functor.Additive T.toFunctor\nU : Comonad C\ninst✝ : Functor.Additive U.toFunctor\nF G : Coalgebra U\n⊢ ∀ (a : F ⟶ G), (fun r α => Coalgebra.Hom.mk (r • α.f)) 0 a = 0\n[PROOFSTEP]\nintros\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : Preadditive C\nT : Monad C\ninst✝¹ : Functor.Additive T.toFunctor\nU : Comonad C\ninst✝ : Functor.Additive U.toFunctor\nF G : Coalgebra U\na✝ : F ⟶ G\n⊢ (fun r α => Coalgebra.Hom.mk (r • α.f)) 0 a✝ = 0\n[PROOFSTEP]\next\n[GOAL]\ncase h\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : Preadditive C\nT : Monad C\ninst✝¹ : Functor.Additive T.toFunctor\nU : Comonad C\ninst✝ : Functor.Additive U.toFunctor\nF G : Coalgebra U\na✝ : F ⟶ G\n⊢ ((fun r α => Coalgebra.Hom.mk (r • α.f)) 0 a✝).f = 0.f\n[PROOFSTEP]\napply zero_smul\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : Preadditive C\nT : Monad C\ninst✝¹ : Functor.Additive T.toFunctor\nU : Comonad C\ninst✝ : Functor.Additive U.toFunctor\nF G : Coalgebra U\n⊢ ∀ (n : ℕ) (a : F ⟶ G),\n    (fun r α => Coalgebra.Hom.mk (r • α.f)) (Int.ofNat (Nat.succ n)) a =\n      a + (fun r α => Coalgebra.Hom.mk (r • α.f)) (Int.ofNat n) a\n[PROOFSTEP]\nintros\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : Preadditive C\nT : Monad C\ninst✝¹ : Functor.Additive T.toFunctor\nU : Comonad C\ninst✝ : Functor.Additive U.toFunctor\nF G : Coalgebra U\nn✝ : ℕ\na✝ : F ⟶ G\n⊢ (fun r α => Coalgebra.Hom.mk (r • α.f)) (Int.ofNat (Nat.succ n✝)) a✝ =\n    a✝ + (fun r α => Coalgebra.Hom.mk (r • α.f)) (Int.ofNat n✝) a✝\n[PROOFSTEP]\next\n[GOAL]\ncase h\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : Preadditive C\nT : Monad C\ninst✝¹ : Functor.Additive T.toFunctor\nU : Comonad C\ninst✝ : Functor.Additive U.toFunctor\nF G : Coalgebra U\nn✝ : ℕ\na✝ : F ⟶ G\n⊢ ((fun r α => Coalgebra.Hom.mk (r • α.f)) (Int.ofNat (Nat.succ n✝)) a✝).f =\n    (a✝ + (fun r α => Coalgebra.Hom.mk (r • α.f)) (Int.ofNat n✝) a✝).f\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : Preadditive C\nT : Monad C\ninst✝¹ : Functor.Additive T.toFunctor\nU : Comonad C\ninst✝ : Functor.Additive U.toFunctor\nF G : Coalgebra U\nn✝ : ℕ\na✝ : F ⟶ G\n⊢ ↑(Nat.succ n✝) • a✝.f = (a✝ + Coalgebra.Hom.mk (↑n✝ • a✝.f)).f\n[PROOFSTEP]\nsimp only [coe_nat_zsmul, succ_nsmul]\n[GOAL]\ncase h\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : Preadditive C\nT : Monad C\ninst✝¹ : Functor.Additive T.toFunctor\nU : Comonad C\ninst✝ : Functor.Additive U.toFunctor\nF G : Coalgebra U\nn✝ : ℕ\na✝ : F ⟶ G\n⊢ a✝.f + n✝ • a✝.f = (a✝ + Coalgebra.Hom.mk (n✝ • a✝.f)).f\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : Preadditive C\nT : Monad C\ninst✝¹ : Functor.Additive T.toFunctor\nU : Comonad C\ninst✝ : Functor.Additive U.toFunctor\nF G : Coalgebra U\n⊢ ∀ (n : ℕ) (a : F ⟶ G),\n    (fun r α => Coalgebra.Hom.mk (r • α.f)) (Int.negSucc n) a =\n      -(fun r α => Coalgebra.Hom.mk (r • α.f)) (↑(Nat.succ n)) a\n[PROOFSTEP]\nintros\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : Preadditive C\nT : Monad C\ninst✝¹ : Functor.Additive T.toFunctor\nU : Comonad C\ninst✝ : Functor.Additive U.toFunctor\nF G : Coalgebra U\nn✝ : ℕ\na✝ : F ⟶ G\n⊢ (fun r α => Coalgebra.Hom.mk (r • α.f)) (Int.negSucc n✝) a✝ =\n    -(fun r α => Coalgebra.Hom.mk (r • α.f)) (↑(Nat.succ n✝)) a✝\n[PROOFSTEP]\next\n[GOAL]\ncase h\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : Preadditive C\nT : Monad C\ninst✝¹ : Functor.Additive T.toFunctor\nU : Comonad C\ninst✝ : Functor.Additive U.toFunctor\nF G : Coalgebra U\nn✝ : ℕ\na✝ : F ⟶ G\n⊢ ((fun r α => Coalgebra.Hom.mk (r • α.f)) (Int.negSucc n✝) a✝).f =\n    (-(fun r α => Coalgebra.Hom.mk (r • α.f)) (↑(Nat.succ n✝)) a✝).f\n[PROOFSTEP]\nsimp only [negSucc_zsmul, neg_inj, nsmul_eq_smul_cast ℤ]\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : Preadditive C\nT : Monad C\ninst✝¹ : Functor.Additive T.toFunctor\nU : Comonad C\ninst✝ : Functor.Additive U.toFunctor\nF G : Coalgebra U\n⊢ ∀ (a : F ⟶ G), -a + a = 0\n[PROOFSTEP]\nintros\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : Preadditive C\nT : Monad C\ninst✝¹ : Functor.Additive T.toFunctor\nU : Comonad C\ninst✝ : Functor.Additive U.toFunctor\nF G : Coalgebra U\na✝ : F ⟶ G\n⊢ -a✝ + a✝ = 0\n[PROOFSTEP]\next\n[GOAL]\ncase h\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : Preadditive C\nT : Monad C\ninst✝¹ : Functor.Additive T.toFunctor\nU : Comonad C\ninst✝ : Functor.Additive U.toFunctor\nF G : Coalgebra U\na✝ : F ⟶ G\n⊢ (-a✝ + a✝).f = 0.f\n[PROOFSTEP]\napply add_left_neg\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : Preadditive C\nT : Monad C\ninst✝¹ : Functor.Additive T.toFunctor\nU : Comonad C\ninst✝ : Functor.Additive U.toFunctor\nF G : Coalgebra U\n⊢ ∀ (a b : F ⟶ G), a + b = b + a\n[PROOFSTEP]\nintros\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : Preadditive C\nT : Monad C\ninst✝¹ : Functor.Additive T.toFunctor\nU : Comonad C\ninst✝ : Functor.Additive U.toFunctor\nF G : Coalgebra U\na✝ b✝ : F ⟶ G\n⊢ a✝ + b✝ = b✝ + a✝\n[PROOFSTEP]\next\n[GOAL]\ncase h\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : Preadditive C\nT : Monad C\ninst✝¹ : Functor.Additive T.toFunctor\nU : Comonad C\ninst✝ : Functor.Additive U.toFunctor\nF G : Coalgebra U\na✝ b✝ : F ⟶ G\n⊢ (a✝ + b✝).f = (b✝ + a✝).f\n[PROOFSTEP]\napply add_comm\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : Preadditive C\nT : Monad C\ninst✝¹ : Functor.Additive T.toFunctor\nU : Comonad C\ninst✝ : Functor.Additive U.toFunctor\n⊢ ∀ (P Q R : Coalgebra U) (f f' : P ⟶ Q) (g : Q ⟶ R), (f + f') ≫ g = f ≫ g + f' ≫ g\n[PROOFSTEP]\nintros\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : Preadditive C\nT : Monad C\ninst✝¹ : Functor.Additive T.toFunctor\nU : Comonad C\ninst✝ : Functor.Additive U.toFunctor\nP✝ Q✝ R✝ : Coalgebra U\nf✝ f'✝ : P✝ ⟶ Q✝\ng✝ : Q✝ ⟶ R✝\n⊢ (f✝ + f'✝) ≫ g✝ = f✝ ≫ g✝ + f'✝ ≫ g✝\n[PROOFSTEP]\next\n[GOAL]\ncase h\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : Preadditive C\nT : Monad C\ninst✝¹ : Functor.Additive T.toFunctor\nU : Comonad C\ninst✝ : Functor.Additive U.toFunctor\nP✝ Q✝ R✝ : Coalgebra U\nf✝ f'✝ : P✝ ⟶ Q✝\ng✝ : Q✝ ⟶ R✝\n⊢ ((f✝ + f'✝) ≫ g✝).f = (f✝ ≫ g✝ + f'✝ ≫ g✝).f\n[PROOFSTEP]\napply add_comp\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : Preadditive C\nT : Monad C\ninst✝¹ : Functor.Additive T.toFunctor\nU : Comonad C\ninst✝ : Functor.Additive U.toFunctor\n⊢ ∀ (P Q R : Coalgebra U) (f : P ⟶ Q) (g g' : Q ⟶ R), f ≫ (g + g') = f ≫ g + f ≫ g'\n[PROOFSTEP]\nintros\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : Preadditive C\nT : Monad C\ninst✝¹ : Functor.Additive T.toFunctor\nU : Comonad C\ninst✝ : Functor.Additive U.toFunctor\nP✝ Q✝ R✝ : Coalgebra U\nf✝ : P✝ ⟶ Q✝\ng✝ g'✝ : Q✝ ⟶ R✝\n⊢ f✝ ≫ (g✝ + g'✝) = f✝ ≫ g✝ + f✝ ≫ g'✝\n[PROOFSTEP]\next\n[GOAL]\ncase h\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : Preadditive C\nT : Monad C\ninst✝¹ : Functor.Additive T.toFunctor\nU : Comonad C\ninst✝ : Functor.Additive U.toFunctor\nP✝ Q✝ R✝ : Coalgebra U\nf✝ : P✝ ⟶ Q✝\ng✝ g'✝ : Q✝ ⟶ R✝\n⊢ (f✝ ≫ (g✝ + g'✝)).f = (f✝ ≫ g✝ + f✝ ≫ g'✝).f\n[PROOFSTEP]\napply comp_add\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Preadditive.EilenbergMoore", "llama_tokens": 13851, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7799928900257127, "lm_q2_score": 0.668880247169804, "lm_q1q2_score": 0.5217218370710884}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\ns : Finset α\nt : Finset β\n⊢ _root_.Disjoint (map Embedding.inl s) (map Embedding.inr t)\n[PROOFSTEP]\nsimp_rw [disjoint_left, mem_map]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ns : Finset α\nt : Finset β\n⊢ ∀ ⦃a : α ⊕ β⦄, (∃ a_1, a_1 ∈ s ∧ ↑Embedding.inl a_1 = a) → ¬∃ a_2, a_2 ∈ t ∧ ↑Embedding.inr a_2 = a\n[PROOFSTEP]\nrintro x ⟨a, _, rfl⟩ ⟨b, _, ⟨⟩⟩\n", "meta": {"mathlib_filename": "Mathlib.Data.Finset.Sum", "llama_tokens": 216, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES\n\n", "lm_q1_score": 0.7718434873426303, "lm_q2_score": 0.6757646075489392, "lm_q1q2_score": 0.5215845113132972}}
{"text": "[GOAL]\nα : Type u\nβ : Type v\ninst✝¹ : Lattice α\ninst✝ : Group α\n⊢ 1⁻ = 1\n[PROOFSTEP]\nrw [m_neg_part_def, inv_one, sup_idem]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝³ : Lattice α\ninst✝² : Group α\ninst✝¹ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\ninst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na : α\n⊢ a⁻ = (a ⊓ 1)⁻¹\n[PROOFSTEP]\nrw [m_neg_part_def, ← inv_inj, inv_sup_eq_inv_inf_inv, inv_inv, inv_inv, inv_one]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝¹ : Lattice α\ninst✝ : Group α\na : α\n⊢ a⁻¹ ⊔ a⁻¹⁻¹ = a ⊔ a⁻¹\n[PROOFSTEP]\nrw [inv_inv, sup_comm]\n  -- 0 ≤ a⁺\n[GOAL]\nα : Type u\nβ : Type v\ninst✝¹ : Lattice α\ninst✝ : Group α\na : α\n⊢ a⁺ ≤ 1 ↔ a ≤ 1\n[PROOFSTEP]\nrw [m_pos_part_def, sup_le_iff, and_iff_left le_rfl]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝¹ : Lattice α\ninst✝ : Group α\na : α\n⊢ a⁻ ≤ 1 ↔ a⁻¹ ≤ 1\n[PROOFSTEP]\nrw [m_neg_part_def, sup_le_iff, and_iff_left le_rfl]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝² : Lattice α\ninst✝¹ : Group α\ninst✝ : CovariantClass α α Mul.mul LE.le\na : α\n⊢ a⁻ = 1 ↔ 1 ≤ a\n[PROOFSTEP]\nrw [le_antisymm_iff, neg_le_one_iff, inv_le_one', and_iff_left (one_le_neg _)]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝¹ : Lattice α\ninst✝ : Group α\na : α\n⊢ a⁺ = a⁻¹⁻\n[PROOFSTEP]\nrw [neg_eq_pos_inv, inv_inv]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝² : Lattice α\ninst✝¹ : Group α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b c : α\n⊢ c * (a ⊓ b) = c * a ⊓ c * b\n[PROOFSTEP]\nrefine' le_antisymm _ _\n[GOAL]\ncase refine'_1\nα : Type u\nβ : Type v\ninst✝² : Lattice α\ninst✝¹ : Group α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b c : α\n⊢ c * (a ⊓ b) ≤ c * a ⊓ c * b\ncase refine'_2\nα : Type u\nβ : Type v\ninst✝² : Lattice α\ninst✝¹ : Group α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b c : α\n⊢ c * a ⊓ c * b ≤ c * (a ⊓ b)\n[PROOFSTEP]\nrw [le_inf_iff, mul_le_mul_iff_left, mul_le_mul_iff_left]\n[GOAL]\ncase refine'_1\nα : Type u\nβ : Type v\ninst✝² : Lattice α\ninst✝¹ : Group α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b c : α\n⊢ a ⊓ b ≤ a ∧ a ⊓ b ≤ b\ncase refine'_2\nα : Type u\nβ : Type v\ninst✝² : Lattice α\ninst✝¹ : Group α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b c : α\n⊢ c * a ⊓ c * b ≤ c * (a ⊓ b)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase refine'_2\nα : Type u\nβ : Type v\ninst✝² : Lattice α\ninst✝¹ : Group α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b c : α\n⊢ c * a ⊓ c * b ≤ c * (a ⊓ b)\n[PROOFSTEP]\nrw [← mul_le_mul_iff_left c⁻¹, ← mul_assoc, inv_mul_self, one_mul, le_inf_iff, inv_mul_le_iff_le_mul,\n  inv_mul_le_iff_le_mul]\n[GOAL]\ncase refine'_2\nα : Type u\nβ : Type v\ninst✝² : Lattice α\ninst✝¹ : Group α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b c : α\n⊢ c * a ⊓ c * b ≤ c * a ∧ c * a ⊓ c * b ≤ c * b\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nβ : Type v\ninst✝² : Lattice α\ninst✝¹ : Group α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na : α\n⊢ a⁺ / a⁻ = a\n[PROOFSTEP]\nsymm\n[GOAL]\nα : Type u\nβ : Type v\ninst✝² : Lattice α\ninst✝¹ : Group α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na : α\n⊢ a = a⁺ / a⁻\n[PROOFSTEP]\nrw [div_eq_mul_inv]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝² : Lattice α\ninst✝¹ : Group α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na : α\n⊢ a = a⁺ * a⁻⁻¹\n[PROOFSTEP]\napply eq_mul_inv_of_mul_eq\n[GOAL]\ncase h\nα : Type u\nβ : Type v\ninst✝² : Lattice α\ninst✝¹ : Group α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na : α\n⊢ a * a⁻ = a⁺\n[PROOFSTEP]\nrw [m_neg_part_def, mul_sup, mul_one, mul_right_inv, sup_comm, m_pos_part_def]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝¹ : Lattice α\ninst✝ : Group α\na : α\nh : 1 ≤ a\n⊢ a⁺ = a\n[PROOFSTEP]\nrw [m_pos_part_def]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝¹ : Lattice α\ninst✝ : Group α\na : α\nh : 1 ≤ a\n⊢ a ⊔ 1 = a\n[PROOFSTEP]\nexact sup_of_le_left h\n[GOAL]\nα : Type u\nβ : Type v\ninst✝¹ : Lattice α\ninst✝ : Group α\na : α\nh : 1 ≤ a⁻¹\n⊢ a⁻ = a⁻¹\n[PROOFSTEP]\nrw [neg_eq_pos_inv]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝¹ : Lattice α\ninst✝ : Group α\na : α\nh : 1 ≤ a⁻¹\n⊢ a⁻¹⁺ = a⁻¹\n[PROOFSTEP]\nexact pos_of_one_le _ h\n[GOAL]\nα✝ : Type u\nβ : Type v\ninst✝³ : Lattice α✝\ninst✝² : Group α✝\nα : Type u_1\ninst✝¹ : LinearOrder α\ninst✝ : CommGroup α\nx : α\nhx : 1 < x⁺\n⊢ x⁺ = x\n[PROOFSTEP]\nrw [m_pos_part_def, right_lt_sup, not_le] at hx \n[GOAL]\nα✝ : Type u\nβ : Type v\ninst✝³ : Lattice α✝\ninst✝² : Group α✝\nα : Type u_1\ninst✝¹ : LinearOrder α\ninst✝ : CommGroup α\nx : α\nhx : 1 < x\n⊢ x⁺ = x\n[PROOFSTEP]\nrw [m_pos_part_def, sup_eq_left]\n[GOAL]\nα✝ : Type u\nβ : Type v\ninst✝³ : Lattice α✝\ninst✝² : Group α✝\nα : Type u_1\ninst✝¹ : LinearOrder α\ninst✝ : CommGroup α\nx : α\nhx : 1 < x\n⊢ 1 ≤ x\n[PROOFSTEP]\nexact hx.le\n[GOAL]\nα : Type u\nβ : Type v\ninst✝¹ : Lattice α\ninst✝ : Group α\na b : α\n⊢ |a / b| = |b / a|\n[PROOFSTEP]\ndsimp only [Abs.abs]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝¹ : Lattice α\ninst✝ : Group α\na b : α\n⊢ a / b ⊔ (a / b)⁻¹ = b / a ⊔ (b / a)⁻¹\n[PROOFSTEP]\nrw [inv_div a b, ← inv_inv (a / b), inv_div, sup_comm]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝³ : Lattice α\ninst✝² : Group α\ninst✝¹ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\ninst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na : α\n⊢ 1 ≤ a ^ 2 → 1 ≤ a\n[PROOFSTEP]\nintro h\n[GOAL]\nα : Type u\nβ : Type v\ninst✝³ : Lattice α\ninst✝² : Group α\ninst✝¹ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\ninst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na : α\nh : 1 ≤ a ^ 2\n⊢ 1 ≤ a\n[PROOFSTEP]\nhave e1 : (a ⊓ 1) * (a ⊓ 1) = a ⊓ 1 := by\n  rw [mul_inf, inf_mul, ← pow_two, mul_one, one_mul, inf_assoc, inf_left_idem, inf_comm, inf_assoc, (inf_of_le_left h)]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝³ : Lattice α\ninst✝² : Group α\ninst✝¹ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\ninst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na : α\nh : 1 ≤ a ^ 2\n⊢ (a ⊓ 1) * (a ⊓ 1) = a ⊓ 1\n[PROOFSTEP]\nrw [mul_inf, inf_mul, ← pow_two, mul_one, one_mul, inf_assoc, inf_left_idem, inf_comm, inf_assoc, (inf_of_le_left h)]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝³ : Lattice α\ninst✝² : Group α\ninst✝¹ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\ninst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na : α\nh : 1 ≤ a ^ 2\ne1 : (a ⊓ 1) * (a ⊓ 1) = a ⊓ 1\n⊢ 1 ≤ a\n[PROOFSTEP]\nrw [← inf_eq_right]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝³ : Lattice α\ninst✝² : Group α\ninst✝¹ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\ninst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na : α\nh : 1 ≤ a ^ 2\ne1 : (a ⊓ 1) * (a ⊓ 1) = a ⊓ 1\n⊢ a ⊓ 1 = 1\n[PROOFSTEP]\nexact mul_right_eq_self.mp e1\n[GOAL]\nα : Type u\nβ : Type v\ninst✝³ : Lattice α\ninst✝² : Group α\ninst✝¹ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\ninst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na : α\n⊢ 1 ≤ |a|\n[PROOFSTEP]\napply pow_two_semiclosed _ _\n[GOAL]\nα : Type u\nβ : Type v\ninst✝³ : Lattice α\ninst✝² : Group α\ninst✝¹ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\ninst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na : α\n⊢ 1 ≤ |a| ^ 2\n[PROOFSTEP]\nrw [abs_eq_sup_inv, pow_two, mul_sup, sup_mul, ← pow_two, mul_left_inv, sup_comm, ← sup_assoc]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝³ : Lattice α\ninst✝² : Group α\ninst✝¹ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\ninst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na : α\n⊢ 1 ≤ (a ⊔ a⁻¹) * a⁻¹ ⊔ a ^ 2 ⊔ 1\n[PROOFSTEP]\napply le_sup_right\n[GOAL]\nα : Type u\nβ : Type v\ninst✝³ : Lattice α\ninst✝² : Group α\ninst✝¹ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\ninst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na : α\n⊢ |a| = a⁺ * a⁻\n[PROOFSTEP]\nrw [m_pos_part_def, sup_mul, one_mul, m_neg_part_def, mul_sup, mul_one, mul_inv_self, sup_assoc, ← @sup_assoc _ _ a,\n  sup_eq_right.2 le_sup_right]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝³ : Lattice α\ninst✝² : Group α\ninst✝¹ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\ninst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na : α\n⊢ |a| = a ⊔ a⁻¹ ⊔ 1\n[PROOFSTEP]\nexact (sup_eq_left.2 <| one_le_abs a).symm\n[GOAL]\nα : Type u\nβ : Type v\ninst✝³ : Lattice α\ninst✝² : Group α\ninst✝¹ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\ninst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na : α\n⊢ |a|⁺ = |a|\n[PROOFSTEP]\nrw [m_pos_part_def]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝³ : Lattice α\ninst✝² : Group α\ninst✝¹ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\ninst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na : α\n⊢ |a| ⊔ 1 = |a|\n[PROOFSTEP]\napply sup_of_le_left\n[GOAL]\ncase a\nα : Type u\nβ : Type v\ninst✝³ : Lattice α\ninst✝² : Group α\ninst✝¹ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\ninst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na : α\n⊢ 1 ≤ |a|\n[PROOFSTEP]\napply one_le_abs\n[GOAL]\nα : Type u\nβ : Type v\ninst✝³ : Lattice α\ninst✝² : Group α\ninst✝¹ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\ninst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na : α\n⊢ |a|⁻ = 1\n[PROOFSTEP]\nrw [m_neg_part_def]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝³ : Lattice α\ninst✝² : Group α\ninst✝¹ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\ninst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na : α\n⊢ |a|⁻¹ ⊔ 1 = 1\n[PROOFSTEP]\napply sup_of_le_right\n[GOAL]\ncase a\nα : Type u\nβ : Type v\ninst✝³ : Lattice α\ninst✝² : Group α\ninst✝¹ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\ninst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na : α\n⊢ |a|⁻¹ ≤ 1\n[PROOFSTEP]\nrw [Left.inv_le_one_iff]\n[GOAL]\ncase a\nα : Type u\nβ : Type v\ninst✝³ : Lattice α\ninst✝² : Group α\ninst✝¹ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\ninst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na : α\n⊢ 1 ≤ |a|\n[PROOFSTEP]\napply one_le_abs\n[GOAL]\nα : Type u\nβ : Type v\ninst✝³ : Lattice α\ninst✝² : Group α\ninst✝¹ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\ninst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b : α\n⊢ (a ⊔ b) / (a ⊓ b) = (a ⊔ b) * (a⁻¹ ⊔ b⁻¹)\n[PROOFSTEP]\nrw [div_eq_mul_inv, ← inv_inf_eq_sup_inv]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝³ : Lattice α\ninst✝² : Group α\ninst✝¹ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\ninst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b : α\n⊢ (a ⊔ b) * (a⁻¹ ⊔ b⁻¹) = a * a⁻¹ ⊔ b * a⁻¹ ⊔ (a * b⁻¹ ⊔ b * b⁻¹)\n[PROOFSTEP]\nrw [mul_sup, sup_mul, sup_mul]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝³ : Lattice α\ninst✝² : Group α\ninst✝¹ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\ninst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b : α\n⊢ a * a⁻¹ ⊔ b * a⁻¹ ⊔ (a * b⁻¹ ⊔ b * b⁻¹) = 1 ⊔ b / a ⊔ (a / b ⊔ 1)\n[PROOFSTEP]\nrw [mul_right_inv, mul_right_inv, ← div_eq_mul_inv, ← div_eq_mul_inv]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝³ : Lattice α\ninst✝² : Group α\ninst✝¹ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\ninst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b : α\n⊢ 1 ⊔ b / a ⊔ (a / b ⊔ 1) = 1 ⊔ b / a ⊔ (1 / (b / a) ⊔ 1)\n[PROOFSTEP]\nrw [one_div_div]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝³ : Lattice α\ninst✝² : Group α\ninst✝¹ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\ninst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b : α\n⊢ 1 ⊔ b / a ⊔ (1 / (b / a) ⊔ 1) = 1 ⊔ b / a ⊔ ((b / a)⁻¹ ⊔ 1)\n[PROOFSTEP]\nrw [inv_eq_one_div]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝³ : Lattice α\ninst✝² : Group α\ninst✝¹ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\ninst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b : α\n⊢ 1 ⊔ b / a ⊔ ((b / a)⁻¹ ⊔ 1) = 1 ⊔ (b / a ⊔ (b / a)⁻¹ ⊔ 1)\n[PROOFSTEP]\nrw [sup_assoc, sup_assoc]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝³ : Lattice α\ninst✝² : Group α\ninst✝¹ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\ninst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b : α\n⊢ 1 ⊔ (b / a ⊔ (b / a)⁻¹ ⊔ 1) = 1 ⊔ (|b / a| ⊔ 1)\n[PROOFSTEP]\nrw [abs_eq_sup_inv]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝³ : Lattice α\ninst✝² : Group α\ninst✝¹ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\ninst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b : α\n⊢ 1 ⊔ (|b / a| ⊔ 1) = 1 ⊔ |b / a|\n[PROOFSTEP]\nrw [← m_pos_part_def, m_pos_abs]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝³ : Lattice α\ninst✝² : Group α\ninst✝¹ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\ninst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b : α\n⊢ 1 ⊔ |b / a| = |b / a| ⊔ 1\n[PROOFSTEP]\nrw [sup_comm]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝³ : Lattice α\ninst✝² : Group α\ninst✝¹ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\ninst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b : α\n⊢ |b / a| ⊔ 1 = |b / a|\n[PROOFSTEP]\nrw [← m_pos_part_def, m_pos_abs]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝³ : Lattice α\ninst✝² : Group α\ninst✝¹ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\ninst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na : α\n⊢ a⁺ ⊓ a⁻ = 1\n[PROOFSTEP]\nrw [← mul_left_inj (a⁻)⁻¹, inf_mul, one_mul, mul_right_inv, ← div_eq_mul_inv, pos_div_neg, neg_eq_inv_inf_one, inv_inv]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝² : Lattice α\ninst✝¹ : CommGroup α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b : α\n⊢ (a ⊓ b) * (a ⊔ b) = (a ⊓ b) * (a * b * (b⁻¹ ⊔ a⁻¹))\n[PROOFSTEP]\nrw [mul_sup b⁻¹ a⁻¹ (a * b), mul_inv_cancel_right, mul_inv_cancel_comm]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝² : Lattice α\ninst✝¹ : CommGroup α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b : α\n⊢ (a ⊓ b) * (a * b * (b⁻¹ ⊔ a⁻¹)) = (a ⊓ b) * (a * b * (a ⊓ b)⁻¹)\n[PROOFSTEP]\nrw [inv_inf_eq_sup_inv, sup_comm]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝² : Lattice α\ninst✝¹ : CommGroup α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b : α\n⊢ (a ⊓ b) * (a * b * (a ⊓ b)⁻¹) = a * b\n[PROOFSTEP]\nrw [mul_comm, inv_mul_cancel_right]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝² : Lattice α\ninst✝¹ : CommGroup α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b : α\n⊢ a ⊔ b = b * (a / b) ⊔ b * 1\n[PROOFSTEP]\nrw [mul_one b, div_eq_mul_inv, mul_comm a, mul_inv_cancel_left]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝² : Lattice α\ninst✝¹ : CommGroup α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b : α\n⊢ b * (a / b) ⊔ b * 1 = b * (a / b ⊔ 1)\n[PROOFSTEP]\nrw [← mul_sup (a / b) 1 b]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝² : Lattice α\ninst✝¹ : CommGroup α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b : α\n⊢ a ⊓ b = a * 1 ⊓ a * (b / a)\n[PROOFSTEP]\nrw [mul_one a, div_eq_mul_inv, mul_comm b, mul_inv_cancel_left]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝² : Lattice α\ninst✝¹ : CommGroup α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b : α\n⊢ a * 1 ⊓ a * (b / a) = a * (1 ⊓ b / a)\n[PROOFSTEP]\nrw [← mul_inf 1 (b / a) a]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝² : Lattice α\ninst✝¹ : CommGroup α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b : α\n⊢ a * (1 ⊓ b / a) = a * (b / a ⊓ 1)\n[PROOFSTEP]\nrw [inf_comm]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝² : Lattice α\ninst✝¹ : CommGroup α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b : α\n⊢ a * (b / a ⊓ 1) = a * ((a / b)⁻¹ ⊓ 1)\n[PROOFSTEP]\nrw [div_eq_mul_inv]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝² : Lattice α\ninst✝¹ : CommGroup α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b : α\n⊢ a * (b * a⁻¹ ⊓ 1) = a * ((a / b)⁻¹ ⊓ 1)\n[PROOFSTEP]\nnth_rw 1 [← inv_inv b]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝² : Lattice α\ninst✝¹ : CommGroup α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b : α\n⊢ a * (b⁻¹⁻¹ * a⁻¹ ⊓ 1) = a * ((a / b)⁻¹ ⊓ 1)\n[PROOFSTEP]\nrw [← mul_inv, mul_comm b⁻¹, ← div_eq_mul_inv]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝² : Lattice α\ninst✝¹ : CommGroup α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b : α\n⊢ a * ((a / b)⁻¹ ⊓ 1) = a * ((a / b)⁻¹ ⊓ 1⁻¹)\n[PROOFSTEP]\nrw [inv_one]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝² : Lattice α\ninst✝¹ : CommGroup α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b : α\n⊢ a * ((a / b)⁻¹ ⊓ 1⁻¹) = a / (a / b ⊔ 1)\n[PROOFSTEP]\nrw [← inv_sup_eq_inv_inf_inv, ← div_eq_mul_inv]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝² : Lattice α\ninst✝¹ : CommGroup α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b : α\n⊢ a ≤ b ↔ a⁺ ≤ b⁺ ∧ b⁻ ≤ a⁻\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type u\nβ : Type v\ninst✝² : Lattice α\ninst✝¹ : CommGroup α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b : α\n⊢ a ≤ b → a⁺ ≤ b⁺ ∧ b⁻ ≤ a⁻\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nα : Type u\nβ : Type v\ninst✝² : Lattice α\ninst✝¹ : CommGroup α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b : α\n⊢ a⁺ ≤ b⁺ ∧ b⁻ ≤ a⁻ → a ≤ b\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nα : Type u\nβ : Type v\ninst✝² : Lattice α\ninst✝¹ : CommGroup α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b : α\nh : a ≤ b\n⊢ a⁺ ≤ b⁺ ∧ b⁻ ≤ a⁻\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp.left\nα : Type u\nβ : Type v\ninst✝² : Lattice α\ninst✝¹ : CommGroup α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b : α\nh : a ≤ b\n⊢ a⁺ ≤ b⁺\n[PROOFSTEP]\nexact sup_le (h.trans (m_le_pos b)) (one_le_pos b)\n[GOAL]\ncase mp.right\nα : Type u\nβ : Type v\ninst✝² : Lattice α\ninst✝¹ : CommGroup α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b : α\nh : a ≤ b\n⊢ b⁻ ≤ a⁻\n[PROOFSTEP]\nrw [← inv_le_inv_iff] at h \n[GOAL]\ncase mp.right\nα : Type u\nβ : Type v\ninst✝² : Lattice α\ninst✝¹ : CommGroup α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b : α\nh✝ : a ≤ b\nh : b⁻¹ ≤ a⁻¹\n⊢ b⁻ ≤ a⁻\n[PROOFSTEP]\nexact sup_le (h.trans (inv_le_neg a)) (one_le_neg a)\n[GOAL]\ncase mpr\nα : Type u\nβ : Type v\ninst✝² : Lattice α\ninst✝¹ : CommGroup α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b : α\nh : a⁺ ≤ b⁺ ∧ b⁻ ≤ a⁻\n⊢ a ≤ b\n[PROOFSTEP]\nrw [← pos_div_neg a, ← pos_div_neg b]\n[GOAL]\ncase mpr\nα : Type u\nβ : Type v\ninst✝² : Lattice α\ninst✝¹ : CommGroup α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b : α\nh : a⁺ ≤ b⁺ ∧ b⁻ ≤ a⁻\n⊢ a⁺ / a⁻ ≤ b⁺ / b⁻\n[PROOFSTEP]\nexact div_le_div'' h.1 h.2\n[GOAL]\nα : Type u\nβ : Type v\ninst✝² : Lattice α\ninst✝¹ : CommGroup α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b : α\n⊢ (a ⊔ b) ^ 2 = a * b * |b / a|\n[PROOFSTEP]\nrw [← inf_mul_sup a b, ← sup_div_inf_eq_abs_div, div_eq_mul_inv, ← mul_assoc, mul_comm, mul_assoc, ← pow_two,\n  inv_mul_cancel_left]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝² : Lattice α\ninst✝¹ : CommGroup α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b : α\n⊢ (a ⊓ b) ^ 2 = a * b / |b / a|\n[PROOFSTEP]\nrw [← inf_mul_sup a b, ← sup_div_inf_eq_abs_div, div_eq_mul_inv, div_eq_mul_inv, mul_inv_rev, inv_inv, mul_assoc,\n  mul_inv_cancel_comm_assoc, ← pow_two]\n[GOAL]\nα✝ : Type u\nβ : Type v\ninst✝³ : Lattice α✝\ninst✝² : CommGroup α✝\nα : Type u\ns : Lattice α\ninst✝¹ : CommGroup α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\n⊢ ∀ (x y z : α), (x ⊔ y) ⊓ (x ⊔ z) ≤ x ⊔ y ⊓ z\n[PROOFSTEP]\nintros x y z\n[GOAL]\nα✝ : Type u\nβ : Type v\ninst✝³ : Lattice α✝\ninst✝² : CommGroup α✝\nα : Type u\ns : Lattice α\ninst✝¹ : CommGroup α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\nx y z : α\n⊢ (x ⊔ y) ⊓ (x ⊔ z) ≤ x ⊔ y ⊓ z\n[PROOFSTEP]\nrw [← mul_le_mul_iff_left (x ⊓ (y ⊓ z)), inf_mul_sup x (y ⊓ z), ← inv_mul_le_iff_le_mul, le_inf_iff]\n[GOAL]\nα✝ : Type u\nβ : Type v\ninst✝³ : Lattice α✝\ninst✝² : CommGroup α✝\nα : Type u\ns : Lattice α\ninst✝¹ : CommGroup α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\nx y z : α\n⊢ x⁻¹ * ((x ⊓ (y ⊓ z)) * ((x ⊔ y) ⊓ (x ⊔ z))) ≤ y ∧ x⁻¹ * ((x ⊓ (y ⊓ z)) * ((x ⊔ y) ⊓ (x ⊔ z))) ≤ z\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase left\nα✝ : Type u\nβ : Type v\ninst✝³ : Lattice α✝\ninst✝² : CommGroup α✝\nα : Type u\ns : Lattice α\ninst✝¹ : CommGroup α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\nx y z : α\n⊢ x⁻¹ * ((x ⊓ (y ⊓ z)) * ((x ⊔ y) ⊓ (x ⊔ z))) ≤ y\n[PROOFSTEP]\nrw [inv_mul_le_iff_le_mul, ← inf_mul_sup x y]\n[GOAL]\ncase left\nα✝ : Type u\nβ : Type v\ninst✝³ : Lattice α✝\ninst✝² : CommGroup α✝\nα : Type u\ns : Lattice α\ninst✝¹ : CommGroup α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\nx y z : α\n⊢ (x ⊓ (y ⊓ z)) * ((x ⊔ y) ⊓ (x ⊔ z)) ≤ (x ⊓ y) * (x ⊔ y)\n[PROOFSTEP]\napply mul_le_mul'\n[GOAL]\ncase left.h₁\nα✝ : Type u\nβ : Type v\ninst✝³ : Lattice α✝\ninst✝² : CommGroup α✝\nα : Type u\ns : Lattice α\ninst✝¹ : CommGroup α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\nx y z : α\n⊢ x ⊓ (y ⊓ z) ≤ x ⊓ y\n[PROOFSTEP]\napply inf_le_inf_left\n[GOAL]\ncase left.h₁.h\nα✝ : Type u\nβ : Type v\ninst✝³ : Lattice α✝\ninst✝² : CommGroup α✝\nα : Type u\ns : Lattice α\ninst✝¹ : CommGroup α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\nx y z : α\n⊢ y ⊓ z ≤ y\n[PROOFSTEP]\napply inf_le_left\n[GOAL]\ncase left.h₂\nα✝ : Type u\nβ : Type v\ninst✝³ : Lattice α✝\ninst✝² : CommGroup α✝\nα : Type u\ns : Lattice α\ninst✝¹ : CommGroup α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\nx y z : α\n⊢ (x ⊔ y) ⊓ (x ⊔ z) ≤ x ⊔ y\n[PROOFSTEP]\napply inf_le_left\n[GOAL]\ncase right\nα✝ : Type u\nβ : Type v\ninst✝³ : Lattice α✝\ninst✝² : CommGroup α✝\nα : Type u\ns : Lattice α\ninst✝¹ : CommGroup α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\nx y z : α\n⊢ x⁻¹ * ((x ⊓ (y ⊓ z)) * ((x ⊔ y) ⊓ (x ⊔ z))) ≤ z\n[PROOFSTEP]\nrw [inv_mul_le_iff_le_mul, ← inf_mul_sup x z]\n[GOAL]\ncase right\nα✝ : Type u\nβ : Type v\ninst✝³ : Lattice α✝\ninst✝² : CommGroup α✝\nα : Type u\ns : Lattice α\ninst✝¹ : CommGroup α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\nx y z : α\n⊢ (x ⊓ (y ⊓ z)) * ((x ⊔ y) ⊓ (x ⊔ z)) ≤ (x ⊓ z) * (x ⊔ z)\n[PROOFSTEP]\napply mul_le_mul'\n[GOAL]\ncase right.h₁\nα✝ : Type u\nβ : Type v\ninst✝³ : Lattice α✝\ninst✝² : CommGroup α✝\nα : Type u\ns : Lattice α\ninst✝¹ : CommGroup α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\nx y z : α\n⊢ x ⊓ (y ⊓ z) ≤ x ⊓ z\n[PROOFSTEP]\napply inf_le_inf_left\n[GOAL]\ncase right.h₁.h\nα✝ : Type u\nβ : Type v\ninst✝³ : Lattice α✝\ninst✝² : CommGroup α✝\nα : Type u\ns : Lattice α\ninst✝¹ : CommGroup α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\nx y z : α\n⊢ y ⊓ z ≤ z\n[PROOFSTEP]\napply inf_le_right\n[GOAL]\ncase right.h₂\nα✝ : Type u\nβ : Type v\ninst✝³ : Lattice α✝\ninst✝² : CommGroup α✝\nα : Type u\ns : Lattice α\ninst✝¹ : CommGroup α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\nx y z : α\n⊢ (x ⊔ y) ⊓ (x ⊔ z) ≤ x ⊔ z\n[PROOFSTEP]\napply inf_le_right\n[GOAL]\nα : Type u\nβ : Type v\ninst✝² : Lattice α\ninst✝¹ : CommGroup α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b c : α\n⊢ |(a ⊔ c) / (b ⊔ c)| * |(a ⊓ c) / (b ⊓ c)| = |a / b|\n[PROOFSTEP]\nletI : DistribLattice α := LatticeOrderedCommGroup.latticeOrderedCommGroupToDistribLattice α\n[GOAL]\nα : Type u\nβ : Type v\ninst✝² : Lattice α\ninst✝¹ : CommGroup α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b c : α\nthis : DistribLattice α := latticeOrderedCommGroupToDistribLattice α\n⊢ |(a ⊔ c) / (b ⊔ c)| * |(a ⊓ c) / (b ⊓ c)| = |a / b|\n[PROOFSTEP]\ncalc\n  |(a ⊔ c) / (b ⊔ c)| * |(a ⊓ c) / (b ⊓ c)| = (b ⊔ c ⊔ (a ⊔ c)) / ((b ⊔ c) ⊓ (a ⊔ c)) * |(a ⊓ c) / (b ⊓ c)| := by\n    rw [sup_div_inf_eq_abs_div]\n  _ = (b ⊔ c ⊔ (a ⊔ c)) / ((b ⊔ c) ⊓ (a ⊔ c)) * ((b ⊓ c ⊔ a ⊓ c) / (b ⊓ c ⊓ (a ⊓ c))) := by\n    rw [sup_div_inf_eq_abs_div (b ⊓ c) (a ⊓ c)]\n  _ = (b ⊔ a ⊔ c) / (b ⊓ a ⊔ c) * (((b ⊔ a) ⊓ c) / (b ⊓ a ⊓ c)) := by\n    rw [← sup_inf_right, ← inf_sup_right, sup_assoc, @sup_comm _ _ c (a ⊔ c), sup_right_idem, sup_assoc, inf_assoc,\n      @inf_comm _ _ c (a ⊓ c), inf_right_idem, inf_assoc]\n  _ = (b ⊔ a ⊔ c) * ((b ⊔ a) ⊓ c) / ((b ⊓ a ⊔ c) * (b ⊓ a ⊓ c)) := by rw [div_mul_div_comm]\n  _ = (b ⊔ a) * c / ((b ⊓ a) * c) := by rw [mul_comm, inf_mul_sup, mul_comm (b ⊓ a ⊔ c), inf_mul_sup]\n  _ = (b ⊔ a) / (b ⊓ a) := by rw [div_eq_mul_inv, mul_inv_rev, mul_assoc, mul_inv_cancel_left, ← div_eq_mul_inv]\n  _ = |a / b| := by rw [sup_div_inf_eq_abs_div]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝² : Lattice α\ninst✝¹ : CommGroup α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b c : α\nthis : DistribLattice α := latticeOrderedCommGroupToDistribLattice α\n⊢ |(a ⊔ c) / (b ⊔ c)| * |(a ⊓ c) / (b ⊓ c)| = (b ⊔ c ⊔ (a ⊔ c)) / ((b ⊔ c) ⊓ (a ⊔ c)) * |(a ⊓ c) / (b ⊓ c)|\n[PROOFSTEP]\nrw [sup_div_inf_eq_abs_div]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝² : Lattice α\ninst✝¹ : CommGroup α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b c : α\nthis : DistribLattice α := latticeOrderedCommGroupToDistribLattice α\n⊢ (b ⊔ c ⊔ (a ⊔ c)) / ((b ⊔ c) ⊓ (a ⊔ c)) * |(a ⊓ c) / (b ⊓ c)| =\n    (b ⊔ c ⊔ (a ⊔ c)) / ((b ⊔ c) ⊓ (a ⊔ c)) * ((b ⊓ c ⊔ a ⊓ c) / (b ⊓ c ⊓ (a ⊓ c)))\n[PROOFSTEP]\nrw [sup_div_inf_eq_abs_div (b ⊓ c) (a ⊓ c)]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝² : Lattice α\ninst✝¹ : CommGroup α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b c : α\nthis : DistribLattice α := latticeOrderedCommGroupToDistribLattice α\n⊢ (b ⊔ c ⊔ (a ⊔ c)) / ((b ⊔ c) ⊓ (a ⊔ c)) * ((b ⊓ c ⊔ a ⊓ c) / (b ⊓ c ⊓ (a ⊓ c))) =\n    (b ⊔ a ⊔ c) / (b ⊓ a ⊔ c) * (((b ⊔ a) ⊓ c) / (b ⊓ a ⊓ c))\n[PROOFSTEP]\nrw [← sup_inf_right, ← inf_sup_right, sup_assoc, @sup_comm _ _ c (a ⊔ c), sup_right_idem, sup_assoc, inf_assoc,\n  @inf_comm _ _ c (a ⊓ c), inf_right_idem, inf_assoc]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝² : Lattice α\ninst✝¹ : CommGroup α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b c : α\nthis : DistribLattice α := latticeOrderedCommGroupToDistribLattice α\n⊢ (b ⊔ a ⊔ c) / (b ⊓ a ⊔ c) * (((b ⊔ a) ⊓ c) / (b ⊓ a ⊓ c)) = (b ⊔ a ⊔ c) * ((b ⊔ a) ⊓ c) / ((b ⊓ a ⊔ c) * (b ⊓ a ⊓ c))\n[PROOFSTEP]\nrw [div_mul_div_comm]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝² : Lattice α\ninst✝¹ : CommGroup α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b c : α\nthis : DistribLattice α := latticeOrderedCommGroupToDistribLattice α\n⊢ (b ⊔ a ⊔ c) * ((b ⊔ a) ⊓ c) / ((b ⊓ a ⊔ c) * (b ⊓ a ⊓ c)) = (b ⊔ a) * c / ((b ⊓ a) * c)\n[PROOFSTEP]\nrw [mul_comm, inf_mul_sup, mul_comm (b ⊓ a ⊔ c), inf_mul_sup]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝² : Lattice α\ninst✝¹ : CommGroup α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b c : α\nthis : DistribLattice α := latticeOrderedCommGroupToDistribLattice α\n⊢ (b ⊔ a) * c / ((b ⊓ a) * c) = (b ⊔ a) / (b ⊓ a)\n[PROOFSTEP]\nrw [div_eq_mul_inv, mul_inv_rev, mul_assoc, mul_inv_cancel_left, ← div_eq_mul_inv]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝² : Lattice α\ninst✝¹ : CommGroup α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b c : α\nthis : DistribLattice α := latticeOrderedCommGroupToDistribLattice α\n⊢ (b ⊔ a) / (b ⊓ a) = |a / b|\n[PROOFSTEP]\nrw [sup_div_inf_eq_abs_div]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝² : Lattice α\ninst✝¹ : CommGroup α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b c : α\n⊢ |(a ⊔ c) / (b ⊔ c)| ≤ |a / b|\n[PROOFSTEP]\napply le_of_mul_le_of_one_le_left\n[GOAL]\ncase h\nα : Type u\nβ : Type v\ninst✝² : Lattice α\ninst✝¹ : CommGroup α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b c : α\n⊢ |(a ⊔ c) / (b ⊔ c)| * ?b ≤ |a / b|\n[PROOFSTEP]\nrw [abs_div_sup_mul_abs_div_inf]\n[GOAL]\ncase hle\nα : Type u\nβ : Type v\ninst✝² : Lattice α\ninst✝¹ : CommGroup α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b c : α\n⊢ 1 ≤ |(a ⊓ c) / (b ⊓ c)|\n[PROOFSTEP]\nexact one_le_abs _\n[GOAL]\nα : Type u\nβ : Type v\ninst✝² : Lattice α\ninst✝¹ : CommGroup α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b c : α\n⊢ |(a ⊓ c) / (b ⊓ c)| ≤ |a / b|\n[PROOFSTEP]\napply le_of_mul_le_of_one_le_right\n[GOAL]\ncase h\nα : Type u\nβ : Type v\ninst✝² : Lattice α\ninst✝¹ : CommGroup α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b c : α\n⊢ ?a * |(a ⊓ c) / (b ⊓ c)| ≤ |a / b|\n[PROOFSTEP]\nrw [abs_div_sup_mul_abs_div_inf]\n[GOAL]\ncase hle\nα : Type u\nβ : Type v\ninst✝² : Lattice α\ninst✝¹ : CommGroup α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b c : α\n⊢ 1 ≤ |(a ⊔ c) / (b ⊔ c)|\n[PROOFSTEP]\nexact one_le_abs _\n[GOAL]\nα : Type u\nβ : Type v\ninst✝² : Lattice α\ninst✝¹ : CommGroup α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b : α\n⊢ |a * b| ≤ |a| * |b|\n[PROOFSTEP]\napply sup_le\n[GOAL]\ncase a\nα : Type u\nβ : Type v\ninst✝² : Lattice α\ninst✝¹ : CommGroup α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b : α\n⊢ a * b ≤ |a| * |b|\n[PROOFSTEP]\nexact mul_le_mul' (le_mabs a) (le_mabs b)\n[GOAL]\ncase a\nα : Type u\nβ : Type v\ninst✝² : Lattice α\ninst✝¹ : CommGroup α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b : α\n⊢ (a * b)⁻¹ ≤ |a| * |b|\n[PROOFSTEP]\nrw [mul_inv]\n[GOAL]\ncase a\nα : Type u\nβ : Type v\ninst✝² : Lattice α\ninst✝¹ : CommGroup α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b : α\n⊢ a⁻¹ * b⁻¹ ≤ |a| * |b|\n[PROOFSTEP]\nexact mul_le_mul' (inv_le_abs _) (inv_le_abs _)\n[GOAL]\nα : Type u\nβ : Type v\ninst✝² : Lattice α\ninst✝¹ : CommGroup α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b : α\n⊢ ||a| / |b|| ≤ |a / b|\n[PROOFSTEP]\nrw [abs_eq_sup_inv, sup_le_iff]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝² : Lattice α\ninst✝¹ : CommGroup α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b : α\n⊢ |a| / |b| ≤ |a / b| ∧ (|a| / |b|)⁻¹ ≤ |a / b|\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase left\nα : Type u\nβ : Type v\ninst✝² : Lattice α\ninst✝¹ : CommGroup α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b : α\n⊢ |a| / |b| ≤ |a / b|\n[PROOFSTEP]\napply div_le_iff_le_mul.2\n[GOAL]\ncase left\nα : Type u\nβ : Type v\ninst✝² : Lattice α\ninst✝¹ : CommGroup α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b : α\n⊢ |a| ≤ |a / b| * |b|\n[PROOFSTEP]\nconvert mabs_mul_le (a / b) b\n[GOAL]\ncase h.e'_3.h.e'_3\nα : Type u\nβ : Type v\ninst✝² : Lattice α\ninst✝¹ : CommGroup α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b : α\n⊢ a = a / b * b\n[PROOFSTEP]\nrw [div_mul_cancel']\n[GOAL]\ncase right\nα : Type u\nβ : Type v\ninst✝² : Lattice α\ninst✝¹ : CommGroup α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b : α\n⊢ (|a| / |b|)⁻¹ ≤ |a / b|\n[PROOFSTEP]\nrw [div_eq_mul_inv, mul_inv_rev, inv_inv, mul_inv_le_iff_le_mul, abs_div_comm]\n[GOAL]\ncase right\nα : Type u\nβ : Type v\ninst✝² : Lattice α\ninst✝¹ : CommGroup α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b : α\n⊢ |b| ≤ |b / a| * |a|\n[PROOFSTEP]\nconvert mabs_mul_le (b / a) a\n[GOAL]\ncase h.e'_3.h.e'_3\nα : Type u\nβ : Type v\ninst✝² : Lattice α\ninst✝¹ : CommGroup α\ninst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\na b : α\n⊢ b = b / a * a\n[PROOFSTEP]\nrw [div_mul_cancel']\n[GOAL]\nα : Type u\nβ : Type v\ninst✝⁷ : Lattice α\ninst✝⁶ : CommGroup α\ninst✝⁵ : Semiring α\ninst✝⁴ : Invertible 2\ninst✝³ : Lattice β\ninst✝² : AddCommGroup β\ninst✝¹ : Module α β\ninst✝ : CovariantClass β β (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\nx y : β\n⊢ x ⊓ y = ⅟2 • (x + y - |y - x|)\n[PROOFSTEP]\nrw [← LatticeOrderedCommGroup.two_inf_eq_add_sub_abs_sub x y, two_smul, ← two_smul α, smul_smul, invOf_mul_self,\n  one_smul]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝⁷ : Lattice α\ninst✝⁶ : CommGroup α\ninst✝⁵ : Semiring α\ninst✝⁴ : Invertible 2\ninst✝³ : Lattice β\ninst✝² : AddCommGroup β\ninst✝¹ : Module α β\ninst✝ : CovariantClass β β (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\nx y : β\n⊢ x ⊔ y = ⅟2 • (x + y + |y - x|)\n[PROOFSTEP]\nrw [← LatticeOrderedCommGroup.two_sup_eq_add_add_abs_sub x y, two_smul, ← two_smul α, smul_smul, invOf_mul_self,\n  one_smul]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝⁷ : Lattice α\ninst✝⁶ : CommGroup α\ninst✝⁵ : DivisionSemiring α\ninst✝⁴ : NeZero 2\ninst✝³ : Lattice β\ninst✝² : AddCommGroup β\ninst✝¹ : Module α β\ninst✝ : CovariantClass β β (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\nx y : β\n⊢ x ⊓ y = 2⁻¹ • (x + y - |y - x|)\n[PROOFSTEP]\nletI := invertibleOfNonzero (two_ne_zero' α)\n[GOAL]\nα : Type u\nβ : Type v\ninst✝⁷ : Lattice α\ninst✝⁶ : CommGroup α\ninst✝⁵ : DivisionSemiring α\ninst✝⁴ : NeZero 2\ninst✝³ : Lattice β\ninst✝² : AddCommGroup β\ninst✝¹ : Module α β\ninst✝ : CovariantClass β β (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\nx y : β\nthis : Invertible 2 := invertibleOfNonzero (_ : 2 ≠ 0)\n⊢ x ⊓ y = 2⁻¹ • (x + y - |y - x|)\n[PROOFSTEP]\nexact inf_eq_half_smul_add_sub_abs_sub α x y\n[GOAL]\nα : Type u\nβ : Type v\ninst✝⁷ : Lattice α\ninst✝⁶ : CommGroup α\ninst✝⁵ : DivisionSemiring α\ninst✝⁴ : NeZero 2\ninst✝³ : Lattice β\ninst✝² : AddCommGroup β\ninst✝¹ : Module α β\ninst✝ : CovariantClass β β (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\nx y : β\n⊢ x ⊔ y = 2⁻¹ • (x + y + |y - x|)\n[PROOFSTEP]\nletI := invertibleOfNonzero (two_ne_zero' α)\n[GOAL]\nα : Type u\nβ : Type v\ninst✝⁷ : Lattice α\ninst✝⁶ : CommGroup α\ninst✝⁵ : DivisionSemiring α\ninst✝⁴ : NeZero 2\ninst✝³ : Lattice β\ninst✝² : AddCommGroup β\ninst✝¹ : Module α β\ninst✝ : CovariantClass β β (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\nx y : β\nthis : Invertible 2 := invertibleOfNonzero (_ : 2 ≠ 0)\n⊢ x ⊔ y = 2⁻¹ • (x + y + |y - x|)\n[PROOFSTEP]\nexact sup_eq_half_smul_add_add_abs_sub α x y\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Order.LatticeGroup", "llama_tokens": 19134, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7956581000631542, "lm_q2_score": 0.6548947290421275, "lm_q1q2_score": 0.5210722958510333}}
{"text": "[GOAL]\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : Preorder ι\ninst✝ : (i : ι) → Preorder (α i)\nsrc✝¹ : LE (Σₗ' (i : ι), α i) := le\nsrc✝ : LT (Σₗ' (i : ι), α i) := lt\n⊢ ∀ (a b c : Σₗ' (i : ι), α i), a ≤ b → b ≤ c → a ≤ c\n[PROOFSTEP]\nrintro ⟨a₁, b₁⟩ ⟨a₂, b₂⟩ ⟨a₃, b₃⟩ ⟨h₁r⟩ ⟨h₂r⟩\n[GOAL]\ncase mk.mk.mk.left.left\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : Preorder ι\ninst✝ : (i : ι) → Preorder (α i)\nsrc✝¹ : LE (Σₗ' (i : ι), α i) := le\nsrc✝ : LT (Σₗ' (i : ι), α i) := lt\na₁ : ι\nb₁ : α a₁\na₂ : ι\nb₂ : α a₂\na₃ : ι\nb₃ : α a₃\na✝¹ : a₁ < a₂\na✝ : a₂ < a₃\n⊢ { fst := a₁, snd := b₁ } ≤ { fst := a₃, snd := b₃ }\n[PROOFSTEP]\nleft\n[GOAL]\ncase mk.mk.mk.left.left.a\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : Preorder ι\ninst✝ : (i : ι) → Preorder (α i)\nsrc✝¹ : LE (Σₗ' (i : ι), α i) := le\nsrc✝ : LT (Σₗ' (i : ι), α i) := lt\na₁ : ι\nb₁ : α a₁\na₂ : ι\nb₂ : α a₂\na₃ : ι\nb₃ : α a₃\na✝¹ : a₁ < a₂\na✝ : a₂ < a₃\n⊢ a₁ < a₃\n[PROOFSTEP]\napply lt_trans\n[GOAL]\ncase mk.mk.mk.left.left.a.a\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : Preorder ι\ninst✝ : (i : ι) → Preorder (α i)\nsrc✝¹ : LE (Σₗ' (i : ι), α i) := le\nsrc✝ : LT (Σₗ' (i : ι), α i) := lt\na₁ : ι\nb₁ : α a₁\na₂ : ι\nb₂ : α a₂\na₃ : ι\nb₃ : α a₃\na✝¹ : a₁ < a₂\na✝ : a₂ < a₃\n⊢ a₁ < ?mk.mk.mk.left.left.a.b\ncase mk.mk.mk.left.left.a.a\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : Preorder ι\ninst✝ : (i : ι) → Preorder (α i)\nsrc✝¹ : LE (Σₗ' (i : ι), α i) := le\nsrc✝ : LT (Σₗ' (i : ι), α i) := lt\na₁ : ι\nb₁ : α a₁\na₂ : ι\nb₂ : α a₂\na₃ : ι\nb₃ : α a₃\na✝¹ : a₁ < a₂\na✝ : a₂ < a₃\n⊢ ?mk.mk.mk.left.left.a.b < a₃\ncase mk.mk.mk.left.left.a.b\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : Preorder ι\ninst✝ : (i : ι) → Preorder (α i)\nsrc✝¹ : LE (Σₗ' (i : ι), α i) := le\nsrc✝ : LT (Σₗ' (i : ι), α i) := lt\na₁ : ι\nb₁ : α a₁\na₂ : ι\nb₂ : α a₂\na₃ : ι\nb₃ : α a₃\na✝¹ : a₁ < a₂\na✝ : a₂ < a₃\n⊢ ι\n[PROOFSTEP]\nrepeat' assumption\n[GOAL]\ncase mk.mk.mk.left.left.a.a\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : Preorder ι\ninst✝ : (i : ι) → Preorder (α i)\nsrc✝¹ : LE (Σₗ' (i : ι), α i) := le\nsrc✝ : LT (Σₗ' (i : ι), α i) := lt\na₁ : ι\nb₁ : α a₁\na₂ : ι\nb₂ : α a₂\na₃ : ι\nb₃ : α a₃\na✝¹ : a₁ < a₂\na✝ : a₂ < a₃\n⊢ a₁ < ?mk.mk.mk.left.left.a.b\n[PROOFSTEP]\nassumption\n[GOAL]\ncase mk.mk.mk.left.left.a.a\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : Preorder ι\ninst✝ : (i : ι) → Preorder (α i)\nsrc✝¹ : LE (Σₗ' (i : ι), α i) := le\nsrc✝ : LT (Σₗ' (i : ι), α i) := lt\na₁ : ι\nb₁ : α a₁\na₂ : ι\nb₂ : α a₂\na₃ : ι\nb₃ : α a₃\na✝¹ : a₁ < a₂\na✝ : a₂ < a₃\n⊢ a₂ < a₃\n[PROOFSTEP]\nassumption\n[GOAL]\ncase mk.mk.mk.left.right\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : Preorder ι\ninst✝ : (i : ι) → Preorder (α i)\nsrc✝¹ : LE (Σₗ' (i : ι), α i) := le\nsrc✝ : LT (Σₗ' (i : ι), α i) := lt\na₁ : ι\nb₁ : α a₁\na₂ : ι\nb₂ : α a₂\na✝¹ : a₁ < a₂\nb₂✝ : α a₂\na✝ : b₂ ≤ b₂✝\n⊢ { fst := a₁, snd := b₁ } ≤ { fst := a₂, snd := b₂✝ }\n[PROOFSTEP]\nleft\n[GOAL]\ncase mk.mk.mk.left.right.a\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : Preorder ι\ninst✝ : (i : ι) → Preorder (α i)\nsrc✝¹ : LE (Σₗ' (i : ι), α i) := le\nsrc✝ : LT (Σₗ' (i : ι), α i) := lt\na₁ : ι\nb₁ : α a₁\na₂ : ι\nb₂ : α a₂\na✝¹ : a₁ < a₂\nb₂✝ : α a₂\na✝ : b₂ ≤ b₂✝\n⊢ a₁ < a₂\n[PROOFSTEP]\nassumption\n[GOAL]\ncase mk.mk.mk.right.left\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : Preorder ι\ninst✝ : (i : ι) → Preorder (α i)\nsrc✝¹ : LE (Σₗ' (i : ι), α i) := le\nsrc✝ : LT (Σₗ' (i : ι), α i) := lt\na₁ : ι\nb₁ : α a₁\na₃ : ι\nb₃ : α a₃\nb₂✝ : α a₁\na✝¹ : b₁ ≤ b₂✝\na✝ : a₁ < a₃\n⊢ { fst := a₁, snd := b₁ } ≤ { fst := a₃, snd := b₃ }\n[PROOFSTEP]\nleft\n[GOAL]\ncase mk.mk.mk.right.left.a\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : Preorder ι\ninst✝ : (i : ι) → Preorder (α i)\nsrc✝¹ : LE (Σₗ' (i : ι), α i) := le\nsrc✝ : LT (Σₗ' (i : ι), α i) := lt\na₁ : ι\nb₁ : α a₁\na₃ : ι\nb₃ : α a₃\nb₂✝ : α a₁\na✝¹ : b₁ ≤ b₂✝\na✝ : a₁ < a₃\n⊢ a₁ < a₃\n[PROOFSTEP]\nassumption\n[GOAL]\ncase mk.mk.mk.right.right\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : Preorder ι\ninst✝ : (i : ι) → Preorder (α i)\nsrc✝¹ : LE (Σₗ' (i : ι), α i) := le\nsrc✝ : LT (Σₗ' (i : ι), α i) := lt\na₁ : ι\nb₁ b₂✝¹ : α a₁\na✝¹ : b₁ ≤ b₂✝¹\nb₂✝ : α a₁\na✝ : b₂✝¹ ≤ b₂✝\n⊢ { fst := a₁, snd := b₁ } ≤ { fst := a₁, snd := b₂✝ }\n[PROOFSTEP]\nright\n[GOAL]\ncase mk.mk.mk.right.right.a\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : Preorder ι\ninst✝ : (i : ι) → Preorder (α i)\nsrc✝¹ : LE (Σₗ' (i : ι), α i) := le\nsrc✝ : LT (Σₗ' (i : ι), α i) := lt\na₁ : ι\nb₁ b₂✝¹ : α a₁\na✝¹ : b₁ ≤ b₂✝¹\nb₂✝ : α a₁\na✝ : b₂✝¹ ≤ b₂✝\n⊢ b₁ ≤ b₂✝\n[PROOFSTEP]\napply le_trans\n[GOAL]\ncase mk.mk.mk.right.right.a.a\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : Preorder ι\ninst✝ : (i : ι) → Preorder (α i)\nsrc✝¹ : LE (Σₗ' (i : ι), α i) := le\nsrc✝ : LT (Σₗ' (i : ι), α i) := lt\na₁ : ι\nb₁ b₂✝¹ : α a₁\na✝¹ : b₁ ≤ b₂✝¹\nb₂✝ : α a₁\na✝ : b₂✝¹ ≤ b₂✝\n⊢ b₁ ≤ ?mk.mk.mk.right.right.a.b\ncase mk.mk.mk.right.right.a.a\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : Preorder ι\ninst✝ : (i : ι) → Preorder (α i)\nsrc✝¹ : LE (Σₗ' (i : ι), α i) := le\nsrc✝ : LT (Σₗ' (i : ι), α i) := lt\na₁ : ι\nb₁ b₂✝¹ : α a₁\na✝¹ : b₁ ≤ b₂✝¹\nb₂✝ : α a₁\na✝ : b₂✝¹ ≤ b₂✝\n⊢ ?mk.mk.mk.right.right.a.b ≤ b₂✝\ncase mk.mk.mk.right.right.a.b\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : Preorder ι\ninst✝ : (i : ι) → Preorder (α i)\nsrc✝¹ : LE (Σₗ' (i : ι), α i) := le\nsrc✝ : LT (Σₗ' (i : ι), α i) := lt\na₁ : ι\nb₁ b₂✝¹ : α a₁\na✝¹ : b₁ ≤ b₂✝¹\nb₂✝ : α a₁\na✝ : b₂✝¹ ≤ b₂✝\n⊢ (fun i => α i) a₁\n[PROOFSTEP]\nrepeat' assumption\n[GOAL]\ncase mk.mk.mk.right.right.a.a\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : Preorder ι\ninst✝ : (i : ι) → Preorder (α i)\nsrc✝¹ : LE (Σₗ' (i : ι), α i) := le\nsrc✝ : LT (Σₗ' (i : ι), α i) := lt\na₁ : ι\nb₁ b₂✝¹ : α a₁\na✝¹ : b₁ ≤ b₂✝¹\nb₂✝ : α a₁\na✝ : b₂✝¹ ≤ b₂✝\n⊢ b₁ ≤ ?mk.mk.mk.right.right.a.b\n[PROOFSTEP]\nassumption\n[GOAL]\ncase mk.mk.mk.right.right.a.a\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : Preorder ι\ninst✝ : (i : ι) → Preorder (α i)\nsrc✝¹ : LE (Σₗ' (i : ι), α i) := le\nsrc✝ : LT (Σₗ' (i : ι), α i) := lt\na₁ : ι\nb₁ b₂✝¹ : α a₁\na✝¹ : b₁ ≤ b₂✝¹\nb₂✝ : α a₁\na✝ : b₂✝¹ ≤ b₂✝\n⊢ b₂✝¹ ≤ b₂✝\n[PROOFSTEP]\nassumption\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : Preorder ι\ninst✝ : (i : ι) → Preorder (α i)\nsrc✝¹ : LE (Σₗ' (i : ι), α i) := le\nsrc✝ : LT (Σₗ' (i : ι), α i) := lt\n⊢ ∀ (a b : Σₗ' (i : ι), α i), a < b ↔ a ≤ b ∧ ¬b ≤ a\n[PROOFSTEP]\nrefine' fun a b => ⟨fun hab => ⟨hab.mono_right fun i a b => le_of_lt, _⟩, _⟩\n[GOAL]\ncase refine'_1\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : Preorder ι\ninst✝ : (i : ι) → Preorder (α i)\nsrc✝¹ : LE (Σₗ' (i : ι), α i) := le\nsrc✝ : LT (Σₗ' (i : ι), α i) := lt\na b : Σₗ' (i : ι), α i\nhab : a < b\n⊢ ¬b ≤ a\n[PROOFSTEP]\nrintro (⟨i, a, hji⟩ | ⟨i, hba⟩)\n[GOAL]\ncase refine'_1.left\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : Preorder ι\ninst✝ : (i : ι) → Preorder (α i)\nsrc✝¹ : LE (Σₗ' (i : ι), α i) := le\nsrc✝ : LT (Σₗ' (i : ι), α i) := lt\na₁✝ : ι\ni : α a₁✝\na₂✝ : ι\na : α a₂✝\nhji : a₁✝ < a₂✝\nhab : { fst := a₂✝, snd := a } < { fst := a₁✝, snd := i }\n⊢ False\n[PROOFSTEP]\nobtain ⟨_, _, hij⟩ | ⟨_, hab⟩ := hab\n[GOAL]\ncase refine'_1.right\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : Preorder ι\ninst✝ : (i : ι) → Preorder (α i)\nsrc✝¹ : LE (Σₗ' (i : ι), α i) := le\nsrc✝ : LT (Σₗ' (i : ι), α i) := lt\ni : ι\nb₁✝ b₂✝ : α i\nhba : b₁✝ ≤ b₂✝\nhab : { fst := i, snd := b₂✝ } < { fst := i, snd := b₁✝ }\n⊢ False\n[PROOFSTEP]\nobtain ⟨_, _, hij⟩ | ⟨_, hab⟩ := hab\n[GOAL]\ncase refine'_1.left.left\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : Preorder ι\ninst✝ : (i : ι) → Preorder (α i)\nsrc✝¹ : LE (Σₗ' (i : ι), α i) := le\nsrc✝ : LT (Σₗ' (i : ι), α i) := lt\na₁✝ : ι\ni : α a₁✝\na₂✝ : ι\na : α a₂✝\nhji : a₁✝ < a₂✝\nhij : a₂✝ < a₁✝\n⊢ False\n[PROOFSTEP]\nexact hij.not_lt hji\n[GOAL]\ncase refine'_1.left.right\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : Preorder ι\ninst✝ : (i : ι) → Preorder (α i)\nsrc✝¹ : LE (Σₗ' (i : ι), α i) := le\nsrc✝ : LT (Σₗ' (i : ι), α i) := lt\na₁✝ : ι\ni a : α a₁✝\nhji : a₁✝ < a₁✝\nhab : a < i\n⊢ False\n[PROOFSTEP]\nexact lt_irrefl _ hji\n[GOAL]\ncase refine'_1.right.left\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : Preorder ι\ninst✝ : (i : ι) → Preorder (α i)\nsrc✝¹ : LE (Σₗ' (i : ι), α i) := le\nsrc✝ : LT (Σₗ' (i : ι), α i) := lt\ni : ι\nb₁✝ b₂✝ : α i\nhba : b₁✝ ≤ b₂✝\nhij : i < i\n⊢ False\n[PROOFSTEP]\nexact lt_irrefl _ hij\n[GOAL]\ncase refine'_1.right.right\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : Preorder ι\ninst✝ : (i : ι) → Preorder (α i)\nsrc✝¹ : LE (Σₗ' (i : ι), α i) := le\nsrc✝ : LT (Σₗ' (i : ι), α i) := lt\ni : ι\nb₁✝ b₂✝ : α i\nhba : b₁✝ ≤ b₂✝\nhab : b₂✝ < b₁✝\n⊢ False\n[PROOFSTEP]\nexact hab.not_le hba\n[GOAL]\ncase refine'_2\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : Preorder ι\ninst✝ : (i : ι) → Preorder (α i)\nsrc✝¹ : LE (Σₗ' (i : ι), α i) := le\nsrc✝ : LT (Σₗ' (i : ι), α i) := lt\na b : Σₗ' (i : ι), α i\n⊢ a ≤ b ∧ ¬b ≤ a → a < b\n[PROOFSTEP]\nrintro ⟨⟨j, b, hij⟩ | ⟨i, hab⟩, hba⟩\n[GOAL]\ncase refine'_2.intro.left\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : Preorder ι\ninst✝ : (i : ι) → Preorder (α i)\nsrc✝¹ : LE (Σₗ' (i : ι), α i) := le\nsrc✝ : LT (Σₗ' (i : ι), α i) := lt\na₁✝ : ι\nj : α a₁✝\na₂✝ : ι\nb : α a₂✝\nhij : a₁✝ < a₂✝\nhba : ¬{ fst := a₂✝, snd := b } ≤ { fst := a₁✝, snd := j }\n⊢ { fst := a₁✝, snd := j } < { fst := a₂✝, snd := b }\n[PROOFSTEP]\nexact Lex.left _ _ hij\n[GOAL]\ncase refine'_2.intro.right\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : Preorder ι\ninst✝ : (i : ι) → Preorder (α i)\nsrc✝¹ : LE (Σₗ' (i : ι), α i) := le\nsrc✝ : LT (Σₗ' (i : ι), α i) := lt\ni : ι\nb₁✝ b₂✝ : α i\nhab : b₁✝ ≤ b₂✝\nhba : ¬{ fst := i, snd := b₂✝ } ≤ { fst := i, snd := b₁✝ }\n⊢ { fst := i, snd := b₁✝ } < { fst := i, snd := b₂✝ }\n[PROOFSTEP]\nexact Lex.right _ (hab.lt_of_not_le fun h => hba <| Lex.right _ h)\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : PartialOrder ι\ninst✝ : (i : ι) → PartialOrder (α i)\nsrc✝ : Preorder (Σₗ' (i : ι), α i) := preorder\n⊢ ∀ (a b : Σₗ' (i : ι), α i), a ≤ b → b ≤ a → a = b\n[PROOFSTEP]\nrintro ⟨a₁, b₁⟩ ⟨a₂, b₂⟩ (⟨_, _, hlt₁⟩ | ⟨_, hlt₁⟩) (⟨_, _, hlt₂⟩ | ⟨_, hlt₂⟩)\n[GOAL]\ncase mk.mk.left.left\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : PartialOrder ι\ninst✝ : (i : ι) → PartialOrder (α i)\nsrc✝ : Preorder (Σₗ' (i : ι), α i) := preorder\na₁ : ι\nb₁ : α a₁\na₂ : ι\nb₂ : α a₂\nhlt₁ : a₁ < a₂\nhlt₂ : a₂ < a₁\n⊢ { fst := a₁, snd := b₁ } = { fst := a₂, snd := b₂ }\n[PROOFSTEP]\nexact (lt_irrefl a₁ <| hlt₁.trans hlt₂).elim\n[GOAL]\ncase mk.mk.left.right\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : PartialOrder ι\ninst✝ : (i : ι) → PartialOrder (α i)\nsrc✝ : Preorder (Σₗ' (i : ι), α i) := preorder\na₁ : ι\nb₁ b₂ : α a₁\nhlt₁ : a₁ < a₁\nhlt₂ : b₂ ≤ b₁\n⊢ { fst := a₁, snd := b₁ } = { fst := a₁, snd := b₂ }\n[PROOFSTEP]\nexact (lt_irrefl a₁ hlt₁).elim\n[GOAL]\ncase mk.mk.right.left\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : PartialOrder ι\ninst✝ : (i : ι) → PartialOrder (α i)\nsrc✝ : Preorder (Σₗ' (i : ι), α i) := preorder\na₁ : ι\nb₁ b₂✝ : α a₁\nhlt₁ : b₁ ≤ b₂✝\nhlt₂ : a₁ < a₁\n⊢ { fst := a₁, snd := b₁ } = { fst := a₁, snd := b₂✝ }\n[PROOFSTEP]\nexact (lt_irrefl a₁ hlt₂).elim\n[GOAL]\ncase mk.mk.right.right\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : PartialOrder ι\ninst✝ : (i : ι) → PartialOrder (α i)\nsrc✝ : Preorder (Σₗ' (i : ι), α i) := preorder\na₁ : ι\nb₁ b₂✝ : α a₁\nhlt₁ : b₁ ≤ b₂✝\nhlt₂ : b₂✝ ≤ b₁\n⊢ { fst := a₁, snd := b₁ } = { fst := a₁, snd := b₂✝ }\n[PROOFSTEP]\nrw [hlt₁.antisymm hlt₂]\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : LinearOrder ι\ninst✝ : (i : ι) → LinearOrder (α i)\nsrc✝ : PartialOrder (Σₗ' (i : ι), α i) := partialOrder\n⊢ ∀ (a b : Σₗ' (i : ι), α i), a ≤ b ∨ b ≤ a\n[PROOFSTEP]\nrintro ⟨i, a⟩ ⟨j, b⟩\n[GOAL]\ncase mk.mk\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : LinearOrder ι\ninst✝ : (i : ι) → LinearOrder (α i)\nsrc✝ : PartialOrder (Σₗ' (i : ι), α i) := partialOrder\ni : ι\na : α i\nj : ι\nb : α j\n⊢ { fst := i, snd := a } ≤ { fst := j, snd := b } ∨ { fst := j, snd := b } ≤ { fst := i, snd := a }\n[PROOFSTEP]\nobtain hij | rfl | hji := lt_trichotomy i j\n[GOAL]\ncase mk.mk.inl\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : LinearOrder ι\ninst✝ : (i : ι) → LinearOrder (α i)\nsrc✝ : PartialOrder (Σₗ' (i : ι), α i) := partialOrder\ni : ι\na : α i\nj : ι\nb : α j\nhij : i < j\n⊢ { fst := i, snd := a } ≤ { fst := j, snd := b } ∨ { fst := j, snd := b } ≤ { fst := i, snd := a }\n[PROOFSTEP]\nexact Or.inl (Lex.left _ _ hij)\n[GOAL]\ncase mk.mk.inr.inl\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : LinearOrder ι\ninst✝ : (i : ι) → LinearOrder (α i)\nsrc✝ : PartialOrder (Σₗ' (i : ι), α i) := partialOrder\ni : ι\na b : α i\n⊢ { fst := i, snd := a } ≤ { fst := i, snd := b } ∨ { fst := i, snd := b } ≤ { fst := i, snd := a }\n[PROOFSTEP]\nobtain hab | hba := le_total a b\n[GOAL]\ncase mk.mk.inr.inl.inl\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : LinearOrder ι\ninst✝ : (i : ι) → LinearOrder (α i)\nsrc✝ : PartialOrder (Σₗ' (i : ι), α i) := partialOrder\ni : ι\na b : α i\nhab : a ≤ b\n⊢ { fst := i, snd := a } ≤ { fst := i, snd := b } ∨ { fst := i, snd := b } ≤ { fst := i, snd := a }\n[PROOFSTEP]\nexact Or.inl (Lex.right _ hab)\n[GOAL]\ncase mk.mk.inr.inl.inr\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : LinearOrder ι\ninst✝ : (i : ι) → LinearOrder (α i)\nsrc✝ : PartialOrder (Σₗ' (i : ι), α i) := partialOrder\ni : ι\na b : α i\nhba : b ≤ a\n⊢ { fst := i, snd := a } ≤ { fst := i, snd := b } ∨ { fst := i, snd := b } ≤ { fst := i, snd := a }\n[PROOFSTEP]\nexact Or.inr (Lex.right _ hba)\n[GOAL]\ncase mk.mk.inr.inr\nι : Type u_1\nα : ι → Type u_2\ninst✝¹ : LinearOrder ι\ninst✝ : (i : ι) → LinearOrder (α i)\nsrc✝ : PartialOrder (Σₗ' (i : ι), α i) := partialOrder\ni : ι\na : α i\nj : ι\nb : α j\nhji : j < i\n⊢ { fst := i, snd := a } ≤ { fst := j, snd := b } ∨ { fst := j, snd := b } ≤ { fst := i, snd := a }\n[PROOFSTEP]\nexact Or.inr (Lex.left _ _ hji)\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\ninst✝³ : PartialOrder ι\ninst✝² : OrderBot ι\ninst✝¹ : (i : ι) → Preorder (α i)\ninst✝ : OrderBot (α ⊥)\nx✝ : Σₗ' (i : ι), α i\na : ι\nb : α a\n⊢ ⊥ ≤ { fst := a, snd := b }\n[PROOFSTEP]\nobtain rfl | ha := eq_bot_or_bot_lt a\n[GOAL]\ncase inl\nι : Type u_1\nα : ι → Type u_2\ninst✝³ : PartialOrder ι\ninst✝² : OrderBot ι\ninst✝¹ : (i : ι) → Preorder (α i)\ninst✝ : OrderBot (α ⊥)\nx✝ : Σₗ' (i : ι), α i\nb : α ⊥\n⊢ ⊥ ≤ { fst := ⊥, snd := b }\n[PROOFSTEP]\nexact Lex.right _ bot_le\n[GOAL]\ncase inr\nι : Type u_1\nα : ι → Type u_2\ninst✝³ : PartialOrder ι\ninst✝² : OrderBot ι\ninst✝¹ : (i : ι) → Preorder (α i)\ninst✝ : OrderBot (α ⊥)\nx✝ : Σₗ' (i : ι), α i\na : ι\nb : α a\nha : ⊥ < a\n⊢ ⊥ ≤ { fst := a, snd := b }\n[PROOFSTEP]\nexact Lex.left _ _ ha\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\ninst✝³ : PartialOrder ι\ninst✝² : OrderTop ι\ninst✝¹ : (i : ι) → Preorder (α i)\ninst✝ : OrderTop (α ⊤)\nx✝ : Σₗ' (i : ι), α i\na : ι\nb : α a\n⊢ { fst := a, snd := b } ≤ ⊤\n[PROOFSTEP]\nobtain rfl | ha := eq_top_or_lt_top a\n[GOAL]\ncase inl\nι : Type u_1\nα : ι → Type u_2\ninst✝³ : PartialOrder ι\ninst✝² : OrderTop ι\ninst✝¹ : (i : ι) → Preorder (α i)\ninst✝ : OrderTop (α ⊤)\nx✝ : Σₗ' (i : ι), α i\nb : α ⊤\n⊢ { fst := ⊤, snd := b } ≤ ⊤\n[PROOFSTEP]\nexact Lex.right _ le_top\n[GOAL]\ncase inr\nι : Type u_1\nα : ι → Type u_2\ninst✝³ : PartialOrder ι\ninst✝² : OrderTop ι\ninst✝¹ : (i : ι) → Preorder (α i)\ninst✝ : OrderTop (α ⊤)\nx✝ : Σₗ' (i : ι), α i\na : ι\nb : α a\nha : a < ⊤\n⊢ { fst := a, snd := b } ≤ ⊤\n[PROOFSTEP]\nexact Lex.left _ _ ha\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\ninst✝⁴ : Preorder ι\ninst✝³ : DenselyOrdered ι\ninst✝² : ∀ (i : ι), Nonempty (α i)\ninst✝¹ : (i : ι) → Preorder (α i)\ninst✝ : ∀ (i : ι), DenselyOrdered (α i)\n⊢ ∀ (a₁ a₂ : Σₗ' (i : ι), α i), a₁ < a₂ → ∃ a, a₁ < a ∧ a < a₂\n[PROOFSTEP]\nrintro ⟨i, a⟩ ⟨j, b⟩ (⟨_, _, h⟩ | @⟨_, _, b, h⟩)\n[GOAL]\ncase mk.mk.left\nι : Type u_1\nα : ι → Type u_2\ninst✝⁴ : Preorder ι\ninst✝³ : DenselyOrdered ι\ninst✝² : ∀ (i : ι), Nonempty (α i)\ninst✝¹ : (i : ι) → Preorder (α i)\ninst✝ : ∀ (i : ι), DenselyOrdered (α i)\ni : ι\na : α i\nj : ι\nb : α j\nh : i < j\n⊢ ∃ a_1, { fst := i, snd := a } < a_1 ∧ a_1 < { fst := j, snd := b }\n[PROOFSTEP]\nobtain ⟨k, hi, hj⟩ := exists_between h\n[GOAL]\ncase mk.mk.left.intro.intro\nι : Type u_1\nα : ι → Type u_2\ninst✝⁴ : Preorder ι\ninst✝³ : DenselyOrdered ι\ninst✝² : ∀ (i : ι), Nonempty (α i)\ninst✝¹ : (i : ι) → Preorder (α i)\ninst✝ : ∀ (i : ι), DenselyOrdered (α i)\ni : ι\na : α i\nj : ι\nb : α j\nh : i < j\nk : ι\nhi : i < k\nhj : k < j\n⊢ ∃ a_1, { fst := i, snd := a } < a_1 ∧ a_1 < { fst := j, snd := b }\n[PROOFSTEP]\nobtain ⟨c⟩ : Nonempty (α k) := inferInstance\n[GOAL]\ncase mk.mk.left.intro.intro.intro\nι : Type u_1\nα : ι → Type u_2\ninst✝⁴ : Preorder ι\ninst✝³ : DenselyOrdered ι\ninst✝² : ∀ (i : ι), Nonempty (α i)\ninst✝¹ : (i : ι) → Preorder (α i)\ninst✝ : ∀ (i : ι), DenselyOrdered (α i)\ni : ι\na : α i\nj : ι\nb : α j\nh : i < j\nk : ι\nhi : i < k\nhj : k < j\nc : α k\n⊢ ∃ a_1, { fst := i, snd := a } < a_1 ∧ a_1 < { fst := j, snd := b }\n[PROOFSTEP]\nexact ⟨⟨k, c⟩, left _ _ hi, left _ _ hj⟩\n[GOAL]\ncase mk.mk.right\nι : Type u_1\nα : ι → Type u_2\ninst✝⁴ : Preorder ι\ninst✝³ : DenselyOrdered ι\ninst✝² : ∀ (i : ι), Nonempty (α i)\ninst✝¹ : (i : ι) → Preorder (α i)\ninst✝ : ∀ (i : ι), DenselyOrdered (α i)\ni : ι\na b : α i\nh : a < b\n⊢ ∃ a_1, { fst := i, snd := a } < a_1 ∧ a_1 < { fst := i, snd := b }\n[PROOFSTEP]\nobtain ⟨c, ha, hb⟩ := exists_between h\n[GOAL]\ncase mk.mk.right.intro.intro\nι : Type u_1\nα : ι → Type u_2\ninst✝⁴ : Preorder ι\ninst✝³ : DenselyOrdered ι\ninst✝² : ∀ (i : ι), Nonempty (α i)\ninst✝¹ : (i : ι) → Preorder (α i)\ninst✝ : ∀ (i : ι), DenselyOrdered (α i)\ni : ι\na b : α i\nh : a < b\nc : α i\nha : a < c\nhb : c < b\n⊢ ∃ a_1, { fst := i, snd := a } < a_1 ∧ a_1 < { fst := i, snd := b }\n[PROOFSTEP]\nexact ⟨⟨i, c⟩, right _ ha, right _ hb⟩\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\ninst✝³ : Preorder ι\ninst✝² : (i : ι) → Preorder (α i)\ninst✝¹ : ∀ (i : ι), DenselyOrdered (α i)\ninst✝ : ∀ (i : ι), NoMaxOrder (α i)\n⊢ ∀ (a₁ a₂ : Σₗ' (i : ι), α i), a₁ < a₂ → ∃ a, a₁ < a ∧ a < a₂\n[PROOFSTEP]\nrintro ⟨i, a⟩ ⟨j, b⟩ (⟨_, _, h⟩ | @⟨_, _, b, h⟩)\n[GOAL]\ncase mk.mk.left\nι : Type u_1\nα : ι → Type u_2\ninst✝³ : Preorder ι\ninst✝² : (i : ι) → Preorder (α i)\ninst✝¹ : ∀ (i : ι), DenselyOrdered (α i)\ninst✝ : ∀ (i : ι), NoMaxOrder (α i)\ni : ι\na : α i\nj : ι\nb : α j\nh : i < j\n⊢ ∃ a_1, { fst := i, snd := a } < a_1 ∧ a_1 < { fst := j, snd := b }\n[PROOFSTEP]\nobtain ⟨c, ha⟩ := exists_gt a\n[GOAL]\ncase mk.mk.left.intro\nι : Type u_1\nα : ι → Type u_2\ninst✝³ : Preorder ι\ninst✝² : (i : ι) → Preorder (α i)\ninst✝¹ : ∀ (i : ι), DenselyOrdered (α i)\ninst✝ : ∀ (i : ι), NoMaxOrder (α i)\ni : ι\na : α i\nj : ι\nb : α j\nh : i < j\nc : α i\nha : a < c\n⊢ ∃ a_1, { fst := i, snd := a } < a_1 ∧ a_1 < { fst := j, snd := b }\n[PROOFSTEP]\nexact ⟨⟨i, c⟩, right _ ha, left _ _ h⟩\n[GOAL]\ncase mk.mk.right\nι : Type u_1\nα : ι → Type u_2\ninst✝³ : Preorder ι\ninst✝² : (i : ι) → Preorder (α i)\ninst✝¹ : ∀ (i : ι), DenselyOrdered (α i)\ninst✝ : ∀ (i : ι), NoMaxOrder (α i)\ni : ι\na b : α i\nh : a < b\n⊢ ∃ a_1, { fst := i, snd := a } < a_1 ∧ a_1 < { fst := i, snd := b }\n[PROOFSTEP]\nobtain ⟨c, ha, hb⟩ := exists_between h\n[GOAL]\ncase mk.mk.right.intro.intro\nι : Type u_1\nα : ι → Type u_2\ninst✝³ : Preorder ι\ninst✝² : (i : ι) → Preorder (α i)\ninst✝¹ : ∀ (i : ι), DenselyOrdered (α i)\ninst✝ : ∀ (i : ι), NoMaxOrder (α i)\ni : ι\na b : α i\nh : a < b\nc : α i\nha : a < c\nhb : c < b\n⊢ ∃ a_1, { fst := i, snd := a } < a_1 ∧ a_1 < { fst := i, snd := b }\n[PROOFSTEP]\nexact ⟨⟨i, c⟩, right _ ha, right _ hb⟩\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\ninst✝³ : Preorder ι\ninst✝² : (i : ι) → Preorder (α i)\ninst✝¹ : ∀ (i : ι), DenselyOrdered (α i)\ninst✝ : ∀ (i : ι), NoMinOrder (α i)\n⊢ ∀ (a₁ a₂ : Σₗ' (i : ι), α i), a₁ < a₂ → ∃ a, a₁ < a ∧ a < a₂\n[PROOFSTEP]\nrintro ⟨i, a⟩ ⟨j, b⟩ (⟨_, _, h⟩ | @⟨_, _, b, h⟩)\n[GOAL]\ncase mk.mk.left\nι : Type u_1\nα : ι → Type u_2\ninst✝³ : Preorder ι\ninst✝² : (i : ι) → Preorder (α i)\ninst✝¹ : ∀ (i : ι), DenselyOrdered (α i)\ninst✝ : ∀ (i : ι), NoMinOrder (α i)\ni : ι\na : α i\nj : ι\nb : α j\nh : i < j\n⊢ ∃ a_1, { fst := i, snd := a } < a_1 ∧ a_1 < { fst := j, snd := b }\n[PROOFSTEP]\nobtain ⟨c, hb⟩ := exists_lt b\n[GOAL]\ncase mk.mk.left.intro\nι : Type u_1\nα : ι → Type u_2\ninst✝³ : Preorder ι\ninst✝² : (i : ι) → Preorder (α i)\ninst✝¹ : ∀ (i : ι), DenselyOrdered (α i)\ninst✝ : ∀ (i : ι), NoMinOrder (α i)\ni : ι\na : α i\nj : ι\nb : α j\nh : i < j\nc : α j\nhb : c < b\n⊢ ∃ a_1, { fst := i, snd := a } < a_1 ∧ a_1 < { fst := j, snd := b }\n[PROOFSTEP]\nexact ⟨⟨j, c⟩, left _ _ h, right _ hb⟩\n[GOAL]\ncase mk.mk.right\nι : Type u_1\nα : ι → Type u_2\ninst✝³ : Preorder ι\ninst✝² : (i : ι) → Preorder (α i)\ninst✝¹ : ∀ (i : ι), DenselyOrdered (α i)\ninst✝ : ∀ (i : ι), NoMinOrder (α i)\ni : ι\na b : α i\nh : a < b\n⊢ ∃ a_1, { fst := i, snd := a } < a_1 ∧ a_1 < { fst := i, snd := b }\n[PROOFSTEP]\nobtain ⟨c, ha, hb⟩ := exists_between h\n[GOAL]\ncase mk.mk.right.intro.intro\nι : Type u_1\nα : ι → Type u_2\ninst✝³ : Preorder ι\ninst✝² : (i : ι) → Preorder (α i)\ninst✝¹ : ∀ (i : ι), DenselyOrdered (α i)\ninst✝ : ∀ (i : ι), NoMinOrder (α i)\ni : ι\na b : α i\nh : a < b\nc : α i\nha : a < c\nhb : c < b\n⊢ ∃ a_1, { fst := i, snd := a } < a_1 ∧ a_1 < { fst := i, snd := b }\n[PROOFSTEP]\nexact ⟨⟨i, c⟩, right _ ha, right _ hb⟩\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\ninst✝³ : Preorder ι\ninst✝² : (i : ι) → Preorder (α i)\ninst✝¹ : NoMaxOrder ι\ninst✝ : ∀ (i : ι), Nonempty (α i)\n⊢ ∀ (a : Σₗ' (i : ι), α i), ∃ b, a < b\n[PROOFSTEP]\nrintro ⟨i, a⟩\n[GOAL]\ncase mk\nι : Type u_1\nα : ι → Type u_2\ninst✝³ : Preorder ι\ninst✝² : (i : ι) → Preorder (α i)\ninst✝¹ : NoMaxOrder ι\ninst✝ : ∀ (i : ι), Nonempty (α i)\ni : ι\na : α i\n⊢ ∃ b, { fst := i, snd := a } < b\n[PROOFSTEP]\nobtain ⟨j, h⟩ := exists_gt i\n[GOAL]\ncase mk.intro\nι : Type u_1\nα : ι → Type u_2\ninst✝³ : Preorder ι\ninst✝² : (i : ι) → Preorder (α i)\ninst✝¹ : NoMaxOrder ι\ninst✝ : ∀ (i : ι), Nonempty (α i)\ni : ι\na : α i\nj : ι\nh : i < j\n⊢ ∃ b, { fst := i, snd := a } < b\n[PROOFSTEP]\nobtain ⟨b⟩ : Nonempty (α j) := inferInstance\n[GOAL]\ncase mk.intro.intro\nι : Type u_1\nα : ι → Type u_2\ninst✝³ : Preorder ι\ninst✝² : (i : ι) → Preorder (α i)\ninst✝¹ : NoMaxOrder ι\ninst✝ : ∀ (i : ι), Nonempty (α i)\ni : ι\na : α i\nj : ι\nh : i < j\nb : α j\n⊢ ∃ b, { fst := i, snd := a } < b\n[PROOFSTEP]\nexact ⟨⟨j, b⟩, left _ _ h⟩\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\ninst✝³ : Preorder ι\ninst✝² : (i : ι) → Preorder (α i)\ninst✝¹ : NoMinOrder ι\ninst✝ : ∀ (i : ι), Nonempty (α i)\n⊢ ∀ (a : Σₗ' (i : ι), α i), ∃ b, b < a\n[PROOFSTEP]\nrintro ⟨i, a⟩\n[GOAL]\ncase mk\nι : Type u_1\nα : ι → Type u_2\ninst✝³ : Preorder ι\ninst✝² : (i : ι) → Preorder (α i)\ninst✝¹ : NoMinOrder ι\ninst✝ : ∀ (i : ι), Nonempty (α i)\ni : ι\na : α i\n⊢ ∃ b, b < { fst := i, snd := a }\n[PROOFSTEP]\nobtain ⟨j, h⟩ := exists_lt i\n[GOAL]\ncase mk.intro\nι : Type u_1\nα : ι → Type u_2\ninst✝³ : Preorder ι\ninst✝² : (i : ι) → Preorder (α i)\ninst✝¹ : NoMinOrder ι\ninst✝ : ∀ (i : ι), Nonempty (α i)\ni : ι\na : α i\nj : ι\nh : j < i\n⊢ ∃ b, b < { fst := i, snd := a }\n[PROOFSTEP]\nobtain ⟨b⟩ : Nonempty (α j) := inferInstance\n[GOAL]\ncase mk.intro.intro\nι : Type u_1\nα : ι → Type u_2\ninst✝³ : Preorder ι\ninst✝² : (i : ι) → Preorder (α i)\ninst✝¹ : NoMinOrder ι\ninst✝ : ∀ (i : ι), Nonempty (α i)\ni : ι\na : α i\nj : ι\nh : j < i\nb : α j\n⊢ ∃ b, b < { fst := i, snd := a }\n[PROOFSTEP]\nexact ⟨⟨j, b⟩, left _ _ h⟩\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\ninst✝² : Preorder ι\ninst✝¹ : (i : ι) → Preorder (α i)\ninst✝ : ∀ (i : ι), NoMaxOrder (α i)\n⊢ ∀ (a : Σₗ' (i : ι), α i), ∃ b, a < b\n[PROOFSTEP]\nrintro ⟨i, a⟩\n[GOAL]\ncase mk\nι : Type u_1\nα : ι → Type u_2\ninst✝² : Preorder ι\ninst✝¹ : (i : ι) → Preorder (α i)\ninst✝ : ∀ (i : ι), NoMaxOrder (α i)\ni : ι\na : α i\n⊢ ∃ b, { fst := i, snd := a } < b\n[PROOFSTEP]\nobtain ⟨b, h⟩ := exists_gt a\n[GOAL]\ncase mk.intro\nι : Type u_1\nα : ι → Type u_2\ninst✝² : Preorder ι\ninst✝¹ : (i : ι) → Preorder (α i)\ninst✝ : ∀ (i : ι), NoMaxOrder (α i)\ni : ι\na b : α i\nh : a < b\n⊢ ∃ b, { fst := i, snd := a } < b\n[PROOFSTEP]\nexact ⟨⟨i, b⟩, right _ h⟩\n[GOAL]\nι : Type u_1\nα : ι → Type u_2\ninst✝² : Preorder ι\ninst✝¹ : (i : ι) → Preorder (α i)\ninst✝ : ∀ (i : ι), NoMinOrder (α i)\n⊢ ∀ (a : Σₗ' (i : ι), α i), ∃ b, b < a\n[PROOFSTEP]\nrintro ⟨i, a⟩\n[GOAL]\ncase mk\nι : Type u_1\nα : ι → Type u_2\ninst✝² : Preorder ι\ninst✝¹ : (i : ι) → Preorder (α i)\ninst✝ : ∀ (i : ι), NoMinOrder (α i)\ni : ι\na : α i\n⊢ ∃ b, b < { fst := i, snd := a }\n[PROOFSTEP]\nobtain ⟨b, h⟩ := exists_lt a\n[GOAL]\ncase mk.intro\nι : Type u_1\nα : ι → Type u_2\ninst✝² : Preorder ι\ninst✝¹ : (i : ι) → Preorder (α i)\ninst✝ : ∀ (i : ι), NoMinOrder (α i)\ni : ι\na b : α i\nh : b < a\n⊢ ∃ b, b < { fst := i, snd := a }\n[PROOFSTEP]\nexact ⟨⟨i, b⟩, right _ h⟩\n", "meta": {"mathlib_filename": "Mathlib.Data.PSigma.Order", "llama_tokens": 14140, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8418256512199033, "lm_q2_score": 0.6187804337438501, "lm_q1q2_score": 0.5209052415985508}}
{"text": "[GOAL]\na : ℤ\n⊢ J(a | 0) = 1\n[PROOFSTEP]\nsimp only [jacobiSym, factors_zero, List.prod_nil, List.pmap]\n[GOAL]\na : ℤ\n⊢ J(a | 1) = 1\n[PROOFSTEP]\nsimp only [jacobiSym, factors_one, List.prod_nil, List.pmap]\n[GOAL]\np : ℕ\nfp : Fact (Nat.Prime p)\na : ℤ\n⊢ legendreSym p a = J(a | p)\n[PROOFSTEP]\nsimp only [jacobiSym, factors_prime fp.1, List.prod_cons, List.prod_nil, mul_one, List.pmap]\n[GOAL]\na : ℤ\nb₁ b₂ : ℕ\nhb₁ : b₁ ≠ 0\nhb₂ : b₂ ≠ 0\n⊢ J(a | b₁ * b₂) = J(a | b₁) * J(a | b₂)\n[PROOFSTEP]\nrw [jacobiSym, ((perm_factors_mul hb₁ hb₂).pmap _).prod_eq, List.pmap_append, List.prod_append]\n[GOAL]\na : ℤ\nb₁ b₂ : ℕ\nhb₁ : b₁ ≠ 0\nhb₂ : b₂ ≠ 0\n⊢ List.prod (List.pmap (fun p pp => legendreSym p a) (factors b₁) (_ : ∀ (a : ℕ), a ∈ factors b₁ → Nat.Prime a)) *\n      List.prod (List.pmap (fun p pp => legendreSym p a) (factors b₂) (_ : ∀ (a : ℕ), a ∈ factors b₂ → Nat.Prime a)) =\n    J(a | b₁) * J(a | b₂)\ncase h\na : ℤ\nb₁ b₂ : ℕ\nhb₁ : b₁ ≠ 0\nhb₂ : b₂ ≠ 0\n⊢ ∀ (a : ℕ), a ∈ factors b₁ ++ factors b₂ → Nat.Prime a\ncase h a : ℤ b₁ b₂ : ℕ hb₁ : b₁ ≠ 0 hb₂ : b₂ ≠ 0 ⊢ ∀ (a : ℕ), a ∈ factors b₁ ++ factors b₂ → Nat.Prime a\n[PROOFSTEP]\ncase h => exact fun p hp => (List.mem_append.mp hp).elim prime_of_mem_factors prime_of_mem_factors\n[GOAL]\na : ℤ\nb₁ b₂ : ℕ\nhb₁ : b₁ ≠ 0\nhb₂ : b₂ ≠ 0\n⊢ ∀ (a : ℕ), a ∈ factors b₁ ++ factors b₂ → Nat.Prime a\n[PROOFSTEP]\ncase h => exact fun p hp => (List.mem_append.mp hp).elim prime_of_mem_factors prime_of_mem_factors\n[GOAL]\na : ℤ\nb₁ b₂ : ℕ\nhb₁ : b₁ ≠ 0\nhb₂ : b₂ ≠ 0\n⊢ ∀ (a : ℕ), a ∈ factors b₁ ++ factors b₂ → Nat.Prime a\n[PROOFSTEP]\nexact fun p hp => (List.mem_append.mp hp).elim prime_of_mem_factors prime_of_mem_factors\n[GOAL]\na : ℤ\nb₁ b₂ : ℕ\nhb₁ : b₁ ≠ 0\nhb₂ : b₂ ≠ 0\n⊢ List.prod (List.pmap (fun p pp => legendreSym p a) (factors b₁) (_ : ∀ (a : ℕ), a ∈ factors b₁ → Nat.Prime a)) *\n      List.prod (List.pmap (fun p pp => legendreSym p a) (factors b₂) (_ : ∀ (a : ℕ), a ∈ factors b₂ → Nat.Prime a)) =\n    J(a | b₁) * J(a | b₂)\n[PROOFSTEP]\ncase _ => rfl\n[GOAL]\na : ℤ\nb₁ b₂ : ℕ\nhb₁ : b₁ ≠ 0\nhb₂ : b₂ ≠ 0\n⊢ List.prod (List.pmap (fun p pp => legendreSym p a) (factors b₁) (_ : ∀ (a : ℕ), a ∈ factors b₁ → Nat.Prime a)) *\n      List.prod (List.pmap (fun p pp => legendreSym p a) (factors b₂) (_ : ∀ (a : ℕ), a ∈ factors b₂ → Nat.Prime a)) =\n    J(a | b₁) * J(a | b₂)\n[PROOFSTEP]\ncase _ => rfl\n[GOAL]\na : ℤ\nb₁ b₂ : ℕ\nhb₁ : b₁ ≠ 0\nhb₂ : b₂ ≠ 0\n⊢ List.prod (List.pmap (fun p pp => legendreSym p a) (factors b₁) (_ : ∀ (a : ℕ), a ∈ factors b₁ → Nat.Prime a)) *\n      List.prod (List.pmap (fun p pp => legendreSym p a) (factors b₂) (_ : ∀ (a : ℕ), a ∈ factors b₂ → Nat.Prime a)) =\n    J(a | b₁) * J(a | b₂)\n[PROOFSTEP]\nrfl\n[GOAL]\na : ℤ\nb : ℕ\n⊢ {0, 1, -1} = ↑(MonoidHom.mrange ↑SignType.castHom)\n[PROOFSTEP]\nrw [Set.pair_comm]\n[GOAL]\na : ℤ\nb : ℕ\n⊢ {0, -1, 1} = ↑(MonoidHom.mrange ↑SignType.castHom)\n[PROOFSTEP]\nexact (SignType.range_eq SignType.castHom).symm\n[GOAL]\na : ℤ\nb : ℕ\n⊢ ∀ (x : ℤ),\n    x ∈ List.pmap (fun p pp => legendreSym p a) (factors b) (_ : ∀ (x : ℕ), x ∈ factors b → Nat.Prime x) →\n      x ∈\n        Submonoid.copy (MonoidHom.mrange ↑SignType.castHom) {0, 1, -1}\n          (_ : {0, 1, -1} = ↑(MonoidHom.mrange ↑SignType.castHom))\n[PROOFSTEP]\nintro _ ha'\n[GOAL]\na : ℤ\nb : ℕ\nx✝ : ℤ\nha' : x✝ ∈ List.pmap (fun p pp => legendreSym p a) (factors b) (_ : ∀ (x : ℕ), x ∈ factors b → Nat.Prime x)\n⊢ x✝ ∈\n    Submonoid.copy (MonoidHom.mrange ↑SignType.castHom) {0, 1, -1}\n      (_ : {0, 1, -1} = ↑(MonoidHom.mrange ↑SignType.castHom))\n[PROOFSTEP]\nrcases List.mem_pmap.mp ha' with ⟨p, hp, rfl⟩\n[GOAL]\ncase intro.intro\na : ℤ\nb p : ℕ\nhp : p ∈ factors b\nha' : legendreSym p a ∈ List.pmap (fun p pp => legendreSym p a) (factors b) (_ : ∀ (x : ℕ), x ∈ factors b → Nat.Prime x)\n⊢ legendreSym p a ∈\n    Submonoid.copy (MonoidHom.mrange ↑SignType.castHom) {0, 1, -1}\n      (_ : {0, 1, -1} = ↑(MonoidHom.mrange ↑SignType.castHom))\n[PROOFSTEP]\nhaveI : Fact p.Prime := ⟨prime_of_mem_factors hp⟩\n[GOAL]\ncase intro.intro\na : ℤ\nb p : ℕ\nhp : p ∈ factors b\nha' : legendreSym p a ∈ List.pmap (fun p pp => legendreSym p a) (factors b) (_ : ∀ (x : ℕ), x ∈ factors b → Nat.Prime x)\nthis : Fact (Nat.Prime p)\n⊢ legendreSym p a ∈\n    Submonoid.copy (MonoidHom.mrange ↑SignType.castHom) {0, 1, -1}\n      (_ : {0, 1, -1} = ↑(MonoidHom.mrange ↑SignType.castHom))\n[PROOFSTEP]\nexact quadraticChar_isQuadratic (ZMod p) a\n[GOAL]\nb : ℕ\nz : ℤ\nhz : z ∈ List.pmap (fun p pp => legendreSym p 1) (factors b) (_ : ∀ (x : ℕ), x ∈ factors b → Nat.Prime x)\n⊢ z = 1\n[PROOFSTEP]\nlet ⟨p, hp, he⟩ := List.mem_pmap.1 hz\n[GOAL]\nb : ℕ\nz : ℤ\nhz : z ∈ List.pmap (fun p pp => legendreSym p 1) (factors b) (_ : ∀ (x : ℕ), x ∈ factors b → Nat.Prime x)\np : ℕ\nhp : p ∈ factors b\nhe : legendreSym p 1 = z\n⊢ z = 1\n[PROOFSTEP]\nletI : Fact p.Prime := ⟨prime_of_mem_factors hp⟩\n[GOAL]\nb : ℕ\nz : ℤ\nhz : z ∈ List.pmap (fun p pp => legendreSym p 1) (factors b) (_ : ∀ (x : ℕ), x ∈ factors b → Nat.Prime x)\np : ℕ\nhp : p ∈ factors b\nhe : legendreSym p 1 = z\nthis : Fact (Nat.Prime p) := { out := prime_of_mem_factors hp }\n⊢ z = 1\n[PROOFSTEP]\nrw [← he, legendreSym.at_one]\n[GOAL]\na₁ a₂ : ℤ\nb : ℕ\n⊢ J(a₁ * a₂ | b) = J(a₁ | b) * J(a₂ | b)\n[PROOFSTEP]\nsimp_rw [jacobiSym, List.pmap_eq_map_attach, legendreSym.mul _ _ _]\n[GOAL]\na₁ a₂ : ℤ\nb : ℕ\n⊢ List.prod (List.map (fun x => legendreSym (↑x) a₁ * legendreSym (↑x) a₂) (List.attach (factors b))) =\n    List.prod (List.map (fun x => legendreSym (↑x) a₁) (List.attach (factors b))) *\n      List.prod (List.map (fun x => legendreSym (↑x) a₂) (List.attach (factors b)))\n[PROOFSTEP]\nexact\n  List.prod_map_mul (α := ℤ) (l := (factors b).attach) (f := fun x ↦\n    @legendreSym x { out := prime_of_mem_factors x.2 } a₁) (g := fun x ↦\n    @legendreSym x { out := prime_of_mem_factors x.2 } a₂)\n[GOAL]\na : ℤ\nb : ℕ\ninst✝ : NeZero b\n⊢ 0 ∈ List.pmap (fun p pp => legendreSym p a) (factors b) (_ : ∀ (x : ℕ), x ∈ factors b → Nat.Prime x) ↔\n    Int.gcd a ↑b ≠ 1\n[PROOFSTEP]\nrw [List.mem_pmap, Int.gcd_eq_natAbs, Ne, Prime.not_coprime_iff_dvd]\n  -- porting note: Initially, `and_assoc'` and `and_comm'` were used on line 164 but they have\n        -- been deprecated so we replace them with `and_assoc` and `and_comm`\n[GOAL]\na : ℤ\nb : ℕ\ninst✝ : NeZero b\n⊢ (∃ a_1 h, legendreSym a_1 a = 0) ↔ ∃ p, Nat.Prime p ∧ p ∣ Int.natAbs a ∧ p ∣ Int.natAbs ↑b\n[PROOFSTEP]\nsimp_rw [legendreSym.eq_zero_iff _ _, int_cast_zmod_eq_zero_iff_dvd, mem_factors (NeZero.ne b), ← Int.coe_nat_dvd_left,\n  Int.coe_nat_dvd, exists_prop, and_assoc, and_comm]\n[GOAL]\na : ℤ\nb : ℕ\nh : Int.gcd a ↑b = 1\n⊢ J(a | b) ≠ 0\n[PROOFSTEP]\ncases' eq_zero_or_neZero b with hb\n[GOAL]\ncase inl\na : ℤ\nb : ℕ\nh : Int.gcd a ↑b = 1\nhb : b = 0\n⊢ J(a | b) ≠ 0\n[PROOFSTEP]\nrw [hb, zero_right]\n[GOAL]\ncase inl\na : ℤ\nb : ℕ\nh : Int.gcd a ↑b = 1\nhb : b = 0\n⊢ 1 ≠ 0\n[PROOFSTEP]\nexact one_ne_zero\n[GOAL]\ncase inr\na : ℤ\nb : ℕ\nh : Int.gcd a ↑b = 1\nh✝ : NeZero b\n⊢ J(a | b) ≠ 0\n[PROOFSTEP]\ncontrapose! h\n[GOAL]\ncase inr\na : ℤ\nb : ℕ\nh✝ : NeZero b\nh : J(a | b) = 0\n⊢ Int.gcd a ↑b ≠ 1\n[PROOFSTEP]\nexact eq_zero_iff_not_coprime.1 h\n[GOAL]\na : ℤ\nb : ℕ\nh : J(a | b) = 0\n⊢ b ≠ 0 ∧ Int.gcd a ↑b ≠ 1\n[PROOFSTEP]\ncases' eq_or_ne b 0 with hb hb\n[GOAL]\ncase inl\na : ℤ\nb : ℕ\nh : J(a | b) = 0\nhb : b = 0\n⊢ b ≠ 0 ∧ Int.gcd a ↑b ≠ 1\n[PROOFSTEP]\nrw [hb, zero_right] at h \n[GOAL]\ncase inl\na : ℤ\nb : ℕ\nh : 1 = 0\nhb : b = 0\n⊢ b ≠ 0 ∧ Int.gcd a ↑b ≠ 1\n[PROOFSTEP]\ncases h\n[GOAL]\ncase inr\na : ℤ\nb : ℕ\nh : J(a | b) = 0\nhb : b ≠ 0\n⊢ b ≠ 0 ∧ Int.gcd a ↑b ≠ 1\n[PROOFSTEP]\nexact ⟨hb, mt jacobiSym.ne_zero <| Classical.not_not.2 h⟩\n[GOAL]\na : ℤ\nb : ℕ\nx✝ : b ≠ 0 ∧ Int.gcd a ↑b ≠ 1\nhb : b ≠ 0\nh : Int.gcd a ↑b ≠ 1\n⊢ J(a | b) = 0\n[PROOFSTEP]\nrw [← neZero_iff] at hb \n[GOAL]\na : ℤ\nb : ℕ\nx✝ : b ≠ 0 ∧ Int.gcd a ↑b ≠ 1\nhb : NeZero b\nh : Int.gcd a ↑b ≠ 1\n⊢ J(a | b) = 0\n[PROOFSTEP]\nexact eq_zero_iff_not_coprime.2 h\n[GOAL]\nb : ℕ\nhb : 1 < b\n⊢ Int.gcd 0 ↑b ≠ 1\n[PROOFSTEP]\nrw [Int.gcd_zero_left, Int.natAbs_ofNat]\n[GOAL]\nb : ℕ\nhb : 1 < b\n⊢ b ≠ 1\n[PROOFSTEP]\nexact hb.ne'\n[GOAL]\na : ℤ\ne b : ℕ\n⊢ J(a ^ zero | b) = J(a | b) ^ zero\n[PROOFSTEP]\nrw [_root_.pow_zero, _root_.pow_zero, one_left]\n[GOAL]\na : ℤ\ne b x✝ : ℕ\nih : J(a ^ x✝ | b) = J(a | b) ^ x✝\n⊢ J(a ^ succ x✝ | b) = J(a | b) ^ succ x✝\n[PROOFSTEP]\nrw [_root_.pow_succ, _root_.pow_succ, mul_left, ih]\n[GOAL]\na : ℤ\nb e : ℕ\n⊢ J(a | b ^ e) = J(a | b) ^ e\n[PROOFSTEP]\ninduction' e with e ih\n[GOAL]\ncase zero\na : ℤ\nb : ℕ\n⊢ J(a | b ^ zero) = J(a | b) ^ zero\n[PROOFSTEP]\nrw [Nat.pow_zero, _root_.pow_zero, one_right]\n[GOAL]\ncase succ\na : ℤ\nb e : ℕ\nih : J(a | b ^ e) = J(a | b) ^ e\n⊢ J(a | b ^ succ e) = J(a | b) ^ succ e\n[PROOFSTEP]\ncases' eq_zero_or_neZero b with hb\n[GOAL]\ncase succ.inl\na : ℤ\nb e : ℕ\nih : J(a | b ^ e) = J(a | b) ^ e\nhb : b = 0\n⊢ J(a | b ^ succ e) = J(a | b) ^ succ e\n[PROOFSTEP]\nrw [hb, zero_pow (succ_pos e), zero_right, one_pow]\n[GOAL]\ncase succ.inr\na : ℤ\nb e : ℕ\nih : J(a | b ^ e) = J(a | b) ^ e\nh✝ : NeZero b\n⊢ J(a | b ^ succ e) = J(a | b) ^ succ e\n[PROOFSTEP]\nrw [_root_.pow_succ, _root_.pow_succ, mul_right, ih]\n[GOAL]\na : ℤ\nb : ℕ\nh : Int.gcd a ↑b = 1\n⊢ J(a | b) ^ 2 = 1\n[PROOFSTEP]\ncases' eq_one_or_neg_one h with h₁ h₁\n[GOAL]\ncase inl\na : ℤ\nb : ℕ\nh : Int.gcd a ↑b = 1\nh₁ : J(a | b) = 1\n⊢ J(a | b) ^ 2 = 1\n[PROOFSTEP]\nrw [h₁]\n[GOAL]\ncase inr\na : ℤ\nb : ℕ\nh : Int.gcd a ↑b = 1\nh₁ : J(a | b) = -1\n⊢ J(a | b) ^ 2 = 1\n[PROOFSTEP]\nrw [h₁]\n[GOAL]\ncase inl\na : ℤ\nb : ℕ\nh : Int.gcd a ↑b = 1\nh₁ : J(a | b) = 1\n⊢ 1 ^ 2 = 1\n[PROOFSTEP]\nrfl\n[GOAL]\ncase inr\na : ℤ\nb : ℕ\nh : Int.gcd a ↑b = 1\nh₁ : J(a | b) = -1\n⊢ (-1) ^ 2 = 1\n[PROOFSTEP]\nrfl\n[GOAL]\na : ℤ\nb : ℕ\nh : Int.gcd a ↑b = 1\n⊢ J(a ^ 2 | b) = 1\n[PROOFSTEP]\nrw [pow_left, sq_one h]\n[GOAL]\na : ℤ\nb : ℕ\n⊢ ∀ (a_1 : ℕ), a_1 ∈ factors b → ∀ (h₁ h₂ : Nat.Prime a_1), legendreSym a_1 a = legendreSym a_1 (a % ↑b)\n[PROOFSTEP]\nrintro p hp _ h₂\n[GOAL]\na : ℤ\nb p : ℕ\nhp : p ∈ factors b\nh₁✝ h₂ : Nat.Prime p\n⊢ legendreSym p a = legendreSym p (a % ↑b)\n[PROOFSTEP]\nletI : Fact p.Prime := ⟨h₂⟩\n[GOAL]\na : ℤ\nb p : ℕ\nhp : p ∈ factors b\nh₁✝ h₂ : Nat.Prime p\nthis : Fact (Nat.Prime p) := { out := h₂ }\n⊢ legendreSym p a = legendreSym p (a % ↑b)\n[PROOFSTEP]\nconv_rhs => rw [legendreSym.mod, Int.emod_emod_of_dvd _ (Int.coe_nat_dvd.2 <| dvd_of_mem_factors hp), ← legendreSym.mod]\n[GOAL]\na : ℤ\nb p : ℕ\nhp : p ∈ factors b\nh₁✝ h₂ : Nat.Prime p\nthis : Fact (Nat.Prime p) := { out := h₂ }\n| legendreSym p (a % ↑b)\n[PROOFSTEP]\nrw [legendreSym.mod, Int.emod_emod_of_dvd _ (Int.coe_nat_dvd.2 <| dvd_of_mem_factors hp), ← legendreSym.mod]\n[GOAL]\na : ℤ\nb p : ℕ\nhp : p ∈ factors b\nh₁✝ h₂ : Nat.Prime p\nthis : Fact (Nat.Prime p) := { out := h₂ }\n| legendreSym p (a % ↑b)\n[PROOFSTEP]\nrw [legendreSym.mod, Int.emod_emod_of_dvd _ (Int.coe_nat_dvd.2 <| dvd_of_mem_factors hp), ← legendreSym.mod]\n[GOAL]\na : ℤ\nb p : ℕ\nhp : p ∈ factors b\nh₁✝ h₂ : Nat.Prime p\nthis : Fact (Nat.Prime p) := { out := h₂ }\n| legendreSym p (a % ↑b)\n[PROOFSTEP]\nrw [legendreSym.mod, Int.emod_emod_of_dvd _ (Int.coe_nat_dvd.2 <| dvd_of_mem_factors hp), ← legendreSym.mod]\n[GOAL]\na₁ a₂ : ℤ\nb : ℕ\nh : a₁ % ↑b = a₂ % ↑b\n⊢ J(a₁ | b) = J(a₂ | b)\n[PROOFSTEP]\nrw [mod_left, h, ← mod_left]\n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\na : ℤ\nh : J(a | p) = -1\nx y : ℤ\nhxy : ↑p ∣ x ^ 2 - a * y ^ 2\n⊢ ↑p ∣ x ∧ ↑p ∣ y\n[PROOFSTEP]\nrw [← legendreSym.to_jacobiSym] at h \n[GOAL]\np : ℕ\ninst✝ : Fact (Nat.Prime p)\na : ℤ\nh : legendreSym p a = -1\nx y : ℤ\nhxy : ↑p ∣ x ^ 2 - a * y ^ 2\n⊢ ↑p ∣ x ∧ ↑p ∣ y\n[PROOFSTEP]\nexact legendreSym.prime_dvd_of_eq_neg_one h hxy\n[GOAL]\nl : List ℤ\nn : ℕ\n⊢ J(List.prod l | n) = List.prod (List.map (fun a => J(a | n)) l)\n[PROOFSTEP]\ninduction' l with n l' ih\n[GOAL]\ncase nil\nn : ℕ\n⊢ J(List.prod [] | n) = List.prod (List.map (fun a => J(a | n)) [])\n[PROOFSTEP]\nsimp only [List.prod_nil, List.map_nil, one_left]\n[GOAL]\ncase cons\nn✝ : ℕ\nn : ℤ\nl' : List ℤ\nih : J(List.prod l' | n✝) = List.prod (List.map (fun a => J(a | n✝)) l')\n⊢ J(List.prod (n :: l') | n✝) = List.prod (List.map (fun a => J(a | n✝)) (n :: l'))\n[PROOFSTEP]\nrw [List.map, List.prod_cons, List.prod_cons, mul_left, ih]\n[GOAL]\na : ℤ\nl : List ℕ\nhl : ∀ (n : ℕ), n ∈ l → n ≠ 0\n⊢ J(a | List.prod l) = List.prod (List.map (fun n => J(a | n)) l)\n[PROOFSTEP]\ninduction' l with n l' ih\n[GOAL]\ncase nil\na : ℤ\nl : List ℕ\nhl✝ : ∀ (n : ℕ), n ∈ l → n ≠ 0\nhl : ∀ (n : ℕ), n ∈ [] → n ≠ 0\n⊢ J(a | List.prod []) = List.prod (List.map (fun n => J(a | n)) [])\n[PROOFSTEP]\nsimp only [List.prod_nil, one_right, List.map_nil]\n[GOAL]\ncase cons\na : ℤ\nl : List ℕ\nhl✝ : ∀ (n : ℕ), n ∈ l → n ≠ 0\nn : ℕ\nl' : List ℕ\nih : (∀ (n : ℕ), n ∈ l' → n ≠ 0) → J(a | List.prod l') = List.prod (List.map (fun n => J(a | n)) l')\nhl : ∀ (n_1 : ℕ), n_1 ∈ n :: l' → n_1 ≠ 0\n⊢ J(a | List.prod (n :: l')) = List.prod (List.map (fun n => J(a | n)) (n :: l'))\n[PROOFSTEP]\nhave hn :=\n  hl n\n    (List.mem_cons_self n l')\n      -- `n ≠ 0`\n[GOAL]\ncase cons\na : ℤ\nl : List ℕ\nhl✝ : ∀ (n : ℕ), n ∈ l → n ≠ 0\nn : ℕ\nl' : List ℕ\nih : (∀ (n : ℕ), n ∈ l' → n ≠ 0) → J(a | List.prod l') = List.prod (List.map (fun n => J(a | n)) l')\nhl : ∀ (n_1 : ℕ), n_1 ∈ n :: l' → n_1 ≠ 0\nhn : n ≠ 0\n⊢ J(a | List.prod (n :: l')) = List.prod (List.map (fun n => J(a | n)) (n :: l'))\n[PROOFSTEP]\nhave hl' := List.prod_ne_zero fun hf => hl 0 (List.mem_cons_of_mem _ hf) rfl\n[GOAL]\ncase cons\na : ℤ\nl : List ℕ\nhl✝ : ∀ (n : ℕ), n ∈ l → n ≠ 0\nn : ℕ\nl' : List ℕ\nih : (∀ (n : ℕ), n ∈ l' → n ≠ 0) → J(a | List.prod l') = List.prod (List.map (fun n => J(a | n)) l')\nhl : ∀ (n_1 : ℕ), n_1 ∈ n :: l' → n_1 ≠ 0\nhn : n ≠ 0\nhl' : List.prod l' ≠ 0\n⊢ J(a | List.prod (n :: l')) = List.prod (List.map (fun n => J(a | n)) (n :: l'))\n[PROOFSTEP]\nhave h := fun m hm =>\n  hl m\n    (List.mem_cons_of_mem _ hm)\n      -- `∀ (m : ℕ), m ∈ l' → m ≠ 0`\n[GOAL]\ncase cons\na : ℤ\nl : List ℕ\nhl✝ : ∀ (n : ℕ), n ∈ l → n ≠ 0\nn : ℕ\nl' : List ℕ\nih : (∀ (n : ℕ), n ∈ l' → n ≠ 0) → J(a | List.prod l') = List.prod (List.map (fun n => J(a | n)) l')\nhl : ∀ (n_1 : ℕ), n_1 ∈ n :: l' → n_1 ≠ 0\nhn : n ≠ 0\nhl' : List.prod l' ≠ 0\nh : ∀ (m : ℕ), m ∈ l' → m ≠ 0\n⊢ J(a | List.prod (n :: l')) = List.prod (List.map (fun n => J(a | n)) (n :: l'))\n[PROOFSTEP]\nrw [List.map, List.prod_cons, List.prod_cons, mul_right' a hn hl', ih h]\n[GOAL]\na : ℤ\nn : ℕ\nh : J(a | n) = -1\n⊢ ∃ p x, p ∣ n ∧ J(a | p) = -1\n[PROOFSTEP]\nhave hn₀ : n ≠ 0 := by\n  rintro rfl\n  rw [zero_right, eq_neg_self_iff] at h \n  exact one_ne_zero h\n[GOAL]\na : ℤ\nn : ℕ\nh : J(a | n) = -1\n⊢ n ≠ 0\n[PROOFSTEP]\nrintro rfl\n[GOAL]\na : ℤ\nh : J(a | 0) = -1\n⊢ False\n[PROOFSTEP]\nrw [zero_right, eq_neg_self_iff] at h \n[GOAL]\na : ℤ\nh : 1 = 0\n⊢ False\n[PROOFSTEP]\nexact one_ne_zero h\n[GOAL]\na : ℤ\nn : ℕ\nh : J(a | n) = -1\nhn₀ : n ≠ 0\n⊢ ∃ p x, p ∣ n ∧ J(a | p) = -1\n[PROOFSTEP]\nhave hf₀ : ∀ p ∈ n.factors, p ≠ 0 := fun p hp => (Nat.pos_of_mem_factors hp).ne.symm\n[GOAL]\na : ℤ\nn : ℕ\nh : J(a | n) = -1\nhn₀ : n ≠ 0\nhf₀ : ∀ (p : ℕ), p ∈ factors n → p ≠ 0\n⊢ ∃ p x, p ∣ n ∧ J(a | p) = -1\n[PROOFSTEP]\nrw [← Nat.prod_factors hn₀, list_prod_right hf₀] at h \n[GOAL]\na : ℤ\nn : ℕ\nh : List.prod (List.map (fun n => J(a | n)) (factors n)) = -1\nhn₀ : n ≠ 0\nhf₀ : ∀ (p : ℕ), p ∈ factors n → p ≠ 0\n⊢ ∃ p x, p ∣ n ∧ J(a | p) = -1\n[PROOFSTEP]\nobtain ⟨p, hmem, hj⟩ := List.mem_map.mp (List.neg_one_mem_of_prod_eq_neg_one h)\n[GOAL]\ncase intro.intro\na : ℤ\nn : ℕ\nh : List.prod (List.map (fun n => J(a | n)) (factors n)) = -1\nhn₀ : n ≠ 0\nhf₀ : ∀ (p : ℕ), p ∈ factors n → p ≠ 0\np : ℕ\nhmem : p ∈ factors n\nhj : J(a | p) = -1\n⊢ ∃ p x, p ∣ n ∧ J(a | p) = -1\n[PROOFSTEP]\nexact ⟨p, Nat.prime_of_mem_factors hmem, Nat.dvd_of_mem_factors hmem, hj⟩\n[GOAL]\na : ℤ\nb : ℕ\nh : J(a | b) = -1\nx✝ : IsSquare ↑a\nr : ZMod b\nha : ↑a = r * r\n⊢ False\n[PROOFSTEP]\nrw [← r.coe_valMinAbs, ← Int.cast_mul, int_cast_eq_int_cast_iff', ← sq] at ha \n[GOAL]\na : ℤ\nb : ℕ\nh : J(a | b) = -1\nx✝ : IsSquare ↑a\nr : ZMod b\nha : a % ↑b = valMinAbs r ^ 2 % ↑b\n⊢ False\n[PROOFSTEP]\napply (by norm_num : ¬(0 : ℤ) ≤ -1)\n[GOAL]\na : ℤ\nb : ℕ\nh : J(a | b) = -1\nx✝ : IsSquare ↑a\nr : ZMod b\nha : a % ↑b = valMinAbs r ^ 2 % ↑b\n⊢ ¬0 ≤ -1\n[PROOFSTEP]\nnorm_num\n[GOAL]\na : ℤ\nb : ℕ\nh : J(a | b) = -1\nx✝ : IsSquare ↑a\nr : ZMod b\nha : a % ↑b = valMinAbs r ^ 2 % ↑b\n⊢ 0 ≤ -1\n[PROOFSTEP]\nrw [← h, mod_left, ha, ← mod_left, pow_left]\n[GOAL]\na : ℤ\nb : ℕ\nh : J(a | b) = -1\nx✝ : IsSquare ↑a\nr : ZMod b\nha : a % ↑b = valMinAbs r ^ 2 % ↑b\n⊢ 0 ≤ J(valMinAbs r | b) ^ 2\n[PROOFSTEP]\napply sq_nonneg\n[GOAL]\na : ℤ\np : ℕ\ninst✝ : Fact (Nat.Prime p)\n⊢ J(a | p) = -1 ↔ ¬IsSquare ↑a\n[PROOFSTEP]\nrw [← legendreSym.to_jacobiSym]\n[GOAL]\na : ℤ\np : ℕ\ninst✝ : Fact (Nat.Prime p)\n⊢ legendreSym p a = -1 ↔ ¬IsSquare ↑a\n[PROOFSTEP]\nexact legendreSym.eq_neg_one_iff p\n[GOAL]\na : ℤ\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nh : J(a | p) = 1\n⊢ ¬¬IsSquare ↑a\n[PROOFSTEP]\nrw [← nonsquare_iff_jacobiSym_eq_neg_one, h]\n[GOAL]\na : ℤ\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nh : J(a | p) = 1\n⊢ ¬1 = -1\n[PROOFSTEP]\ndecide\n[GOAL]\na : ℤ\nR : Type u_1\ninst✝ : CommSemiring R\nχ : R →* ℤ\nhp : ∀ (p : ℕ) (pp : Nat.Prime p), p ≠ 2 → legendreSym p a = ↑χ ↑p\nb : ℕ\nhb : Odd b\n⊢ J(a | b) = ↑χ ↑b\n[PROOFSTEP]\nconv_rhs => rw [← prod_factors hb.pos.ne', cast_list_prod, χ.map_list_prod]\n[GOAL]\na : ℤ\nR : Type u_1\ninst✝ : CommSemiring R\nχ : R →* ℤ\nhp : ∀ (p : ℕ) (pp : Nat.Prime p), p ≠ 2 → legendreSym p a = ↑χ ↑p\nb : ℕ\nhb : Odd b\n| ↑χ ↑b\n[PROOFSTEP]\nrw [← prod_factors hb.pos.ne', cast_list_prod, χ.map_list_prod]\n[GOAL]\na : ℤ\nR : Type u_1\ninst✝ : CommSemiring R\nχ : R →* ℤ\nhp : ∀ (p : ℕ) (pp : Nat.Prime p), p ≠ 2 → legendreSym p a = ↑χ ↑p\nb : ℕ\nhb : Odd b\n| ↑χ ↑b\n[PROOFSTEP]\nrw [← prod_factors hb.pos.ne', cast_list_prod, χ.map_list_prod]\n[GOAL]\na : ℤ\nR : Type u_1\ninst✝ : CommSemiring R\nχ : R →* ℤ\nhp : ∀ (p : ℕ) (pp : Nat.Prime p), p ≠ 2 → legendreSym p a = ↑χ ↑p\nb : ℕ\nhb : Odd b\n| ↑χ ↑b\n[PROOFSTEP]\nrw [← prod_factors hb.pos.ne', cast_list_prod, χ.map_list_prod]\n[GOAL]\na : ℤ\nR : Type u_1\ninst✝ : CommSemiring R\nχ : R →* ℤ\nhp : ∀ (p : ℕ) (pp : Nat.Prime p), p ≠ 2 → legendreSym p a = ↑χ ↑p\nb : ℕ\nhb : Odd b\n⊢ J(a | b) = List.prod (List.map (↑χ) (List.map Nat.cast (factors b)))\n[PROOFSTEP]\nrw [jacobiSym, List.map_map, ← List.pmap_eq_map Nat.Prime _ _ fun _ => prime_of_mem_factors]\n[GOAL]\na : ℤ\nR : Type u_1\ninst✝ : CommSemiring R\nχ : R →* ℤ\nhp : ∀ (p : ℕ) (pp : Nat.Prime p), p ≠ 2 → legendreSym p a = ↑χ ↑p\nb : ℕ\nhb : Odd b\n⊢ List.prod (List.pmap (fun p pp => legendreSym p a) (factors b) (_ : ∀ (x : ℕ), x ∈ factors b → Nat.Prime x)) =\n    List.prod (List.pmap (fun a x => (↑χ ∘ Nat.cast) a) (factors b) (_ : ∀ (x : ℕ), x ∈ factors b → Nat.Prime x))\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_a\na : ℤ\nR : Type u_1\ninst✝ : CommSemiring R\nχ : R →* ℤ\nhp : ∀ (p : ℕ) (pp : Nat.Prime p), p ≠ 2 → legendreSym p a = ↑χ ↑p\nb : ℕ\nhb : Odd b\n⊢ List.pmap (fun p pp => legendreSym p a) (factors b) (_ : ∀ (x : ℕ), x ∈ factors b → Nat.Prime x) =\n    List.pmap (fun a x => (↑χ ∘ Nat.cast) a) (factors b) (_ : ∀ (x : ℕ), x ∈ factors b → Nat.Prime x)\n[PROOFSTEP]\napply List.pmap_congr\n[GOAL]\ncase e_a.h\na : ℤ\nR : Type u_1\ninst✝ : CommSemiring R\nχ : R →* ℤ\nhp : ∀ (p : ℕ) (pp : Nat.Prime p), p ≠ 2 → legendreSym p a = ↑χ ↑p\nb : ℕ\nhb : Odd b\n⊢ ∀ (a_1 : ℕ), a_1 ∈ factors b → ∀ (h₁ : Nat.Prime a_1), Nat.Prime a_1 → legendreSym a_1 a = (↑χ ∘ Nat.cast) a_1\n[PROOFSTEP]\nexact fun p h pp _ => hp p pp (hb.ne_two_of_dvd_nat <| dvd_of_mem_factors h)\n[GOAL]\na : ℤ\nb : ℕ\nhb : Odd b\n⊢ J(-a | b) = ↑χ₄ ↑b * J(a | b)\n[PROOFSTEP]\nrw [neg_eq_neg_one_mul, mul_left, at_neg_one hb]\n[GOAL]\nm n : ℕ\nhm : Odd m\nhn : Odd n\n⊢ qrSign m n = (-1) ^ (m / 2 * (n / 2))\n[PROOFSTEP]\nrw [qrSign, pow_mul, ← χ₄_eq_neg_one_pow (odd_iff.mp hm)]\n[GOAL]\nm n : ℕ\nhm : Odd m\nhn : Odd n\n⊢ J(↑χ₄ ↑m | n) = ↑χ₄ ↑m ^ (n / 2)\n[PROOFSTEP]\ncases' odd_mod_four_iff.mp (odd_iff.mp hm) with h h\n[GOAL]\ncase inl\nm n : ℕ\nhm : Odd m\nhn : Odd n\nh : m % 4 = 1\n⊢ J(↑χ₄ ↑m | n) = ↑χ₄ ↑m ^ (n / 2)\n[PROOFSTEP]\nrw [χ₄_nat_one_mod_four h, jacobiSym.one_left, one_pow]\n[GOAL]\ncase inr\nm n : ℕ\nhm : Odd m\nhn : Odd n\nh : m % 4 = 3\n⊢ J(↑χ₄ ↑m | n) = ↑χ₄ ↑m ^ (n / 2)\n[PROOFSTEP]\nrw [χ₄_nat_three_mod_four h, ← χ₄_eq_neg_one_pow (odd_iff.mp hn), jacobiSym.at_neg_one hn]\n[GOAL]\nm n : ℕ\nhm : Odd m\nhn : Odd n\n⊢ qrSign m n ^ 2 = 1\n[PROOFSTEP]\nrw [neg_one_pow hm hn, ← pow_mul, mul_comm, pow_mul, neg_one_sq, one_pow]\n[GOAL]\nm₁ m₂ n : ℕ\n⊢ qrSign (m₁ * m₂) n = qrSign m₁ n * qrSign m₂ n\n[PROOFSTEP]\nsimp_rw [qrSign, Nat.cast_mul, map_mul, jacobiSym.mul_left]\n[GOAL]\nm n : ℕ\nhm : Odd m\nhn : Odd n\n⊢ qrSign m n = qrSign n m\n[PROOFSTEP]\nrw [neg_one_pow hm hn, neg_one_pow hn hm, mul_comm (m / 2)]\n[GOAL]\nm n : ℕ\nhm : Odd m\nhn : Odd n\nx y : ℤ\n⊢ qrSign m n * x = y ↔ x = qrSign m n * y\n[PROOFSTEP]\nrefine'\n  ⟨fun h' =>\n    let h := h'.symm\n    _,\n    fun h => _⟩\n[GOAL]\ncase refine'_1\nm n : ℕ\nhm : Odd m\nhn : Odd n\nx y : ℤ\nh' : qrSign m n * x = y\nh : y = qrSign m n * x := Eq.symm h'\n⊢ x = qrSign m n * y\n[PROOFSTEP]\nrw [h, ← mul_assoc, ← pow_two, sq_eq_one hm hn, one_mul]\n[GOAL]\ncase refine'_2\nm n : ℕ\nhm : Odd m\nhn : Odd n\nx y : ℤ\nh : x = qrSign m n * y\n⊢ qrSign m n * x = y\n[PROOFSTEP]\nrw [h, ← mul_assoc, ← pow_two, sq_eq_one hm hn, one_mul]\n[GOAL]\na b : ℕ\nha : Odd a\nhb : Odd b\n⊢ J(↑a | b) = qrSign b a * J(↑b | a)\n[PROOFSTEP]\nlet rhs : ℕ → ℕ →* ℤ := fun a =>\n  { toFun := fun x => qrSign x a * J(x | a)\n    map_one' := by convert ← mul_one (M := ℤ) _; symm; all_goals apply one_left\n    map_mul' := fun x y => by\n      -- porting note: `simp_rw` on line 423 replaces `rw` to allow the rewrite rules to be\n              -- applied under the binder `fun ↦ ...`simp_rw [qrSign.mul_left x y a, Nat.cast_mul, mul_left,\n        mul_mul_mul_comm] }\n[GOAL]\na✝ b : ℕ\nha : Odd a✝\nhb : Odd b\na : ℕ\n⊢ (fun x => qrSign x a * J(↑x | a)) 1 = 1\n[PROOFSTEP]\nconvert ← mul_one (M := ℤ) _\n[GOAL]\ncase h.e'_2.h.e'_6\na✝ b : ℕ\nha : Odd a✝\nhb : Odd b\na : ℕ\n⊢ 1 = J(↑1 | a)\ncase h.e'_3 a✝ b : ℕ ha : Odd a✝ hb : Odd b a : ℕ ⊢ qrSign 1 a = 1\n[PROOFSTEP]\nsymm\n[GOAL]\ncase h.e'_2.h.e'_6\na✝ b : ℕ\nha : Odd a✝\nhb : Odd b\na : ℕ\n⊢ J(↑1 | a) = 1\ncase h.e'_3 a✝ b : ℕ ha : Odd a✝ hb : Odd b a : ℕ ⊢ qrSign 1 a = 1\n[PROOFSTEP]\nall_goals apply one_left\n[GOAL]\ncase h.e'_2.h.e'_6\na✝ b : ℕ\nha : Odd a✝\nhb : Odd b\na : ℕ\n⊢ J(↑1 | a) = 1\n[PROOFSTEP]\napply one_left\n[GOAL]\ncase h.e'_3\na✝ b : ℕ\nha : Odd a✝\nhb : Odd b\na : ℕ\n⊢ qrSign 1 a = 1\n[PROOFSTEP]\napply one_left\n[GOAL]\na✝ b : ℕ\nha : Odd a✝\nhb : Odd b\na x y : ℕ\n⊢ OneHom.toFun { toFun := fun x => qrSign x a * J(↑x | a), map_one' := (_ : (fun x => qrSign x a * J(↑x | a)) 1 = 1) }\n      (x * y) =\n    OneHom.toFun { toFun := fun x => qrSign x a * J(↑x | a), map_one' := (_ : (fun x => qrSign x a * J(↑x | a)) 1 = 1) }\n        x *\n      OneHom.toFun\n        { toFun := fun x => qrSign x a * J(↑x | a), map_one' := (_ : (fun x => qrSign x a * J(↑x | a)) 1 = 1) } y\n[PROOFSTEP]\nsimp_rw [qrSign.mul_left x y a, Nat.cast_mul, mul_left, mul_mul_mul_comm]\n[GOAL]\na b : ℕ\nha : Odd a\nhb : Odd b\nrhs : ℕ → ℕ →* ℤ :=\n  fun a =>\n    {\n      toOneHom :=\n        { toFun := fun x => qrSign x a * J(↑x | a), map_one' := (_ : (fun x => qrSign x a * J(↑x | a)) 1 = 1) },\n      map_mul' :=\n        (_ :\n          ∀ (x y : ℕ),\n            OneHom.toFun\n                { toFun := fun x => qrSign x a * J(↑x | a), map_one' := (_ : (fun x => qrSign x a * J(↑x | a)) 1 = 1) }\n                (x * y) =\n              OneHom.toFun\n                  { toFun := fun x => qrSign x a * J(↑x | a),\n                    map_one' := (_ : (fun x => qrSign x a * J(↑x | a)) 1 = 1) }\n                  x *\n                OneHom.toFun\n                  { toFun := fun x => qrSign x a * J(↑x | a),\n                    map_one' := (_ : (fun x => qrSign x a * J(↑x | a)) 1 = 1) }\n                  y) }\n⊢ J(↑a | b) = qrSign b a * J(↑b | a)\n[PROOFSTEP]\nhave rhs_apply : ∀ a b : ℕ, rhs a b = qrSign b a * J(b | a) := fun a b => rfl\n[GOAL]\na b : ℕ\nha : Odd a\nhb : Odd b\nrhs : ℕ → ℕ →* ℤ :=\n  fun a =>\n    {\n      toOneHom :=\n        { toFun := fun x => qrSign x a * J(↑x | a), map_one' := (_ : (fun x => qrSign x a * J(↑x | a)) 1 = 1) },\n      map_mul' :=\n        (_ :\n          ∀ (x y : ℕ),\n            OneHom.toFun\n                { toFun := fun x => qrSign x a * J(↑x | a), map_one' := (_ : (fun x => qrSign x a * J(↑x | a)) 1 = 1) }\n                (x * y) =\n              OneHom.toFun\n                  { toFun := fun x => qrSign x a * J(↑x | a),\n                    map_one' := (_ : (fun x => qrSign x a * J(↑x | a)) 1 = 1) }\n                  x *\n                OneHom.toFun\n                  { toFun := fun x => qrSign x a * J(↑x | a),\n                    map_one' := (_ : (fun x => qrSign x a * J(↑x | a)) 1 = 1) }\n                  y) }\nrhs_apply : ∀ (a b : ℕ), ↑(rhs a) b = qrSign b a * J(↑b | a)\n⊢ J(↑a | b) = qrSign b a * J(↑b | a)\n[PROOFSTEP]\nrefine' value_at a (rhs a) (fun p pp hp => Eq.symm _) hb\n[GOAL]\na b : ℕ\nha : Odd a\nhb : Odd b\nrhs : ℕ → ℕ →* ℤ :=\n  fun a =>\n    {\n      toOneHom :=\n        { toFun := fun x => qrSign x a * J(↑x | a), map_one' := (_ : (fun x => qrSign x a * J(↑x | a)) 1 = 1) },\n      map_mul' :=\n        (_ :\n          ∀ (x y : ℕ),\n            OneHom.toFun\n                { toFun := fun x => qrSign x a * J(↑x | a), map_one' := (_ : (fun x => qrSign x a * J(↑x | a)) 1 = 1) }\n                (x * y) =\n              OneHom.toFun\n                  { toFun := fun x => qrSign x a * J(↑x | a),\n                    map_one' := (_ : (fun x => qrSign x a * J(↑x | a)) 1 = 1) }\n                  x *\n                OneHom.toFun\n                  { toFun := fun x => qrSign x a * J(↑x | a),\n                    map_one' := (_ : (fun x => qrSign x a * J(↑x | a)) 1 = 1) }\n                  y) }\nrhs_apply : ∀ (a b : ℕ), ↑(rhs a) b = qrSign b a * J(↑b | a)\np : ℕ\npp : Nat.Prime p\nhp : p ≠ 2\n⊢ ↑(rhs a) ↑p = legendreSym p ↑a\n[PROOFSTEP]\nhave hpo := pp.eq_two_or_odd'.resolve_left hp\n[GOAL]\na b : ℕ\nha : Odd a\nhb : Odd b\nrhs : ℕ → ℕ →* ℤ :=\n  fun a =>\n    {\n      toOneHom :=\n        { toFun := fun x => qrSign x a * J(↑x | a), map_one' := (_ : (fun x => qrSign x a * J(↑x | a)) 1 = 1) },\n      map_mul' :=\n        (_ :\n          ∀ (x y : ℕ),\n            OneHom.toFun\n                { toFun := fun x => qrSign x a * J(↑x | a), map_one' := (_ : (fun x => qrSign x a * J(↑x | a)) 1 = 1) }\n                (x * y) =\n              OneHom.toFun\n                  { toFun := fun x => qrSign x a * J(↑x | a),\n                    map_one' := (_ : (fun x => qrSign x a * J(↑x | a)) 1 = 1) }\n                  x *\n                OneHom.toFun\n                  { toFun := fun x => qrSign x a * J(↑x | a),\n                    map_one' := (_ : (fun x => qrSign x a * J(↑x | a)) 1 = 1) }\n                  y) }\nrhs_apply : ∀ (a b : ℕ), ↑(rhs a) b = qrSign b a * J(↑b | a)\np : ℕ\npp : Nat.Prime p\nhp : p ≠ 2\nhpo : Odd p\n⊢ ↑(rhs a) ↑p = legendreSym p ↑a\n[PROOFSTEP]\nrw [@legendreSym.to_jacobiSym p ⟨pp⟩, rhs_apply, Nat.cast_id, qrSign.eq_iff_eq hpo ha, qrSign.symm hpo ha]\n[GOAL]\na b : ℕ\nha : Odd a\nhb : Odd b\nrhs : ℕ → ℕ →* ℤ :=\n  fun a =>\n    {\n      toOneHom :=\n        { toFun := fun x => qrSign x a * J(↑x | a), map_one' := (_ : (fun x => qrSign x a * J(↑x | a)) 1 = 1) },\n      map_mul' :=\n        (_ :\n          ∀ (x y : ℕ),\n            OneHom.toFun\n                { toFun := fun x => qrSign x a * J(↑x | a), map_one' := (_ : (fun x => qrSign x a * J(↑x | a)) 1 = 1) }\n                (x * y) =\n              OneHom.toFun\n                  { toFun := fun x => qrSign x a * J(↑x | a),\n                    map_one' := (_ : (fun x => qrSign x a * J(↑x | a)) 1 = 1) }\n                  x *\n                OneHom.toFun\n                  { toFun := fun x => qrSign x a * J(↑x | a),\n                    map_one' := (_ : (fun x => qrSign x a * J(↑x | a)) 1 = 1) }\n                  y) }\nrhs_apply : ∀ (a b : ℕ), ↑(rhs a) b = qrSign b a * J(↑b | a)\np : ℕ\npp : Nat.Prime p\nhp : p ≠ 2\nhpo : Odd p\n⊢ J(↑p | a) = qrSign a p * J(↑a | p)\n[PROOFSTEP]\nrefine' value_at p (rhs p) (fun q pq hq => _) ha\n[GOAL]\na b : ℕ\nha : Odd a\nhb : Odd b\nrhs : ℕ → ℕ →* ℤ :=\n  fun a =>\n    {\n      toOneHom :=\n        { toFun := fun x => qrSign x a * J(↑x | a), map_one' := (_ : (fun x => qrSign x a * J(↑x | a)) 1 = 1) },\n      map_mul' :=\n        (_ :\n          ∀ (x y : ℕ),\n            OneHom.toFun\n                { toFun := fun x => qrSign x a * J(↑x | a), map_one' := (_ : (fun x => qrSign x a * J(↑x | a)) 1 = 1) }\n                (x * y) =\n              OneHom.toFun\n                  { toFun := fun x => qrSign x a * J(↑x | a),\n                    map_one' := (_ : (fun x => qrSign x a * J(↑x | a)) 1 = 1) }\n                  x *\n                OneHom.toFun\n                  { toFun := fun x => qrSign x a * J(↑x | a),\n                    map_one' := (_ : (fun x => qrSign x a * J(↑x | a)) 1 = 1) }\n                  y) }\nrhs_apply : ∀ (a b : ℕ), ↑(rhs a) b = qrSign b a * J(↑b | a)\np : ℕ\npp : Nat.Prime p\nhp : p ≠ 2\nhpo : Odd p\nq : ℕ\npq : Nat.Prime q\nhq : q ≠ 2\n⊢ legendreSym q ↑p = ↑(rhs p) ↑q\n[PROOFSTEP]\nhave hqo := pq.eq_two_or_odd'.resolve_left hq\n[GOAL]\na b : ℕ\nha : Odd a\nhb : Odd b\nrhs : ℕ → ℕ →* ℤ :=\n  fun a =>\n    {\n      toOneHom :=\n        { toFun := fun x => qrSign x a * J(↑x | a), map_one' := (_ : (fun x => qrSign x a * J(↑x | a)) 1 = 1) },\n      map_mul' :=\n        (_ :\n          ∀ (x y : ℕ),\n            OneHom.toFun\n                { toFun := fun x => qrSign x a * J(↑x | a), map_one' := (_ : (fun x => qrSign x a * J(↑x | a)) 1 = 1) }\n                (x * y) =\n              OneHom.toFun\n                  { toFun := fun x => qrSign x a * J(↑x | a),\n                    map_one' := (_ : (fun x => qrSign x a * J(↑x | a)) 1 = 1) }\n                  x *\n                OneHom.toFun\n                  { toFun := fun x => qrSign x a * J(↑x | a),\n                    map_one' := (_ : (fun x => qrSign x a * J(↑x | a)) 1 = 1) }\n                  y) }\nrhs_apply : ∀ (a b : ℕ), ↑(rhs a) b = qrSign b a * J(↑b | a)\np : ℕ\npp : Nat.Prime p\nhp : p ≠ 2\nhpo : Odd p\nq : ℕ\npq : Nat.Prime q\nhq : q ≠ 2\nhqo : Odd q\n⊢ legendreSym q ↑p = ↑(rhs p) ↑q\n[PROOFSTEP]\nrw [rhs_apply, Nat.cast_id, ← @legendreSym.to_jacobiSym p ⟨pp⟩, qrSign.symm hqo hpo, qrSign.neg_one_pow hpo hqo,\n  @legendreSym.quadratic_reciprocity' p q ⟨pp⟩ ⟨pq⟩ hp hq]\n[GOAL]\na b : ℕ\nha : Odd a\nhb : Odd b\n⊢ J(↑a | b) = (-1) ^ (a / 2 * (b / 2)) * J(↑b | a)\n[PROOFSTEP]\nrw [← qrSign.neg_one_pow ha hb, qrSign.symm ha hb, quadratic_reciprocity' ha hb]\n[GOAL]\na b : ℕ\nha : a % 4 = 1\nhb : Odd b\n⊢ J(↑a | b) = J(↑b | a)\n[PROOFSTEP]\nrw [quadratic_reciprocity (odd_iff.mpr (odd_of_mod_four_eq_one ha)) hb, pow_mul, neg_one_pow_div_two_of_one_mod_four ha,\n  one_pow, one_mul]\n[GOAL]\na b : ℕ\nha : a % 4 = 3\nhb : b % 4 = 3\n⊢ J(↑a | b) = -J(↑b | a)\n[PROOFSTEP]\nlet nop := @neg_one_pow_div_two_of_three_mod_four\n[GOAL]\na b : ℕ\nha : a % 4 = 3\nhb : b % 4 = 3\nnop : ∀ {n : ℕ}, n % 4 = 3 → (-1) ^ (n / 2) = -1 := @neg_one_pow_div_two_of_three_mod_four\n⊢ J(↑a | b) = -J(↑b | a)\n[PROOFSTEP]\nrw [quadratic_reciprocity, pow_mul, nop ha, nop hb, neg_one_mul]\n[GOAL]\ncase ha\na b : ℕ\nha : a % 4 = 3\nhb : b % 4 = 3\nnop : ∀ {n : ℕ}, n % 4 = 3 → (-1) ^ (n / 2) = -1 := @neg_one_pow_div_two_of_three_mod_four\n⊢ Odd a\n[PROOFSTEP]\nrwa [odd_iff, odd_of_mod_four_eq_three]\n[GOAL]\ncase hb\na b : ℕ\nha : a % 4 = 3\nhb : b % 4 = 3\nnop : ∀ {n : ℕ}, n % 4 = 3 → (-1) ^ (n / 2) = -1 := @neg_one_pow_div_two_of_three_mod_four\n⊢ Odd b\n[PROOFSTEP]\nrwa [odd_iff, odd_of_mod_four_eq_three]\n[GOAL]\na b : ℕ\nhb : Odd b\n⊢ J(↑a | b) = J(↑a | b % (4 * a))\n[PROOFSTEP]\nrcases eq_or_ne a 0 with (rfl | ha₀)\n[GOAL]\ncase inl\nb : ℕ\nhb : Odd b\n⊢ J(↑0 | b) = J(↑0 | b % (4 * 0))\n[PROOFSTEP]\nrw [mul_zero, mod_zero]\n[GOAL]\ncase inr\na b : ℕ\nhb : Odd b\nha₀ : a ≠ 0\n⊢ J(↑a | b) = J(↑a | b % (4 * a))\n[PROOFSTEP]\nhave hb' : Odd (b % (4 * a)) := hb.mod_even (Even.mul_right (by norm_num) _)\n[GOAL]\na b : ℕ\nhb : Odd b\nha₀ : a ≠ 0\n⊢ Even 4\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase inr\na b : ℕ\nhb : Odd b\nha₀ : a ≠ 0\nhb' : Odd (b % (4 * a))\n⊢ J(↑a | b) = J(↑a | b % (4 * a))\n[PROOFSTEP]\nrcases exists_eq_pow_mul_and_not_dvd ha₀ 2 (by norm_num) with ⟨e, a', ha₁', ha₂⟩\n[GOAL]\na b : ℕ\nhb : Odd b\nha₀ : a ≠ 0\nhb' : Odd (b % (4 * a))\n⊢ 2 ≠ 1\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase inr.intro.intro.intro\na b : ℕ\nhb : Odd b\nha₀ : a ≠ 0\nhb' : Odd (b % (4 * a))\ne a' : ℕ\nha₁' : ¬2 ∣ a'\nha₂ : a = 2 ^ e * a'\n⊢ J(↑a | b) = J(↑a | b % (4 * a))\n[PROOFSTEP]\nhave ha₁ := odd_iff.mpr (two_dvd_ne_zero.mp ha₁')\n[GOAL]\ncase inr.intro.intro.intro\na b : ℕ\nhb : Odd b\nha₀ : a ≠ 0\nhb' : Odd (b % (4 * a))\ne a' : ℕ\nha₁' : ¬2 ∣ a'\nha₂ : a = 2 ^ e * a'\nha₁ : Odd a'\n⊢ J(↑a | b) = J(↑a | b % (4 * a))\n[PROOFSTEP]\nnth_rw 2 [ha₂]\n[GOAL]\ncase inr.intro.intro.intro\na b : ℕ\nhb : Odd b\nha₀ : a ≠ 0\nhb' : Odd (b % (4 * a))\ne a' : ℕ\nha₁' : ¬2 ∣ a'\nha₂ : a = 2 ^ e * a'\nha₁ : Odd a'\n⊢ J(↑a | b) = J(↑(2 ^ e * a') | b % (4 * a))\n[PROOFSTEP]\nnth_rw 1 [ha₂]\n[GOAL]\ncase inr.intro.intro.intro\na b : ℕ\nhb : Odd b\nha₀ : a ≠ 0\nhb' : Odd (b % (4 * a))\ne a' : ℕ\nha₁' : ¬2 ∣ a'\nha₂ : a = 2 ^ e * a'\nha₁ : Odd a'\n⊢ J(↑(2 ^ e * a') | b) = J(↑(2 ^ e * a') | b % (4 * a))\n[PROOFSTEP]\nrw [Nat.cast_mul, mul_left, mul_left, quadratic_reciprocity' ha₁ hb, quadratic_reciprocity' ha₁ hb', Nat.cast_pow,\n  pow_left, pow_left, Nat.cast_two, at_two hb, at_two hb']\n[GOAL]\ncase inr.intro.intro.intro\na b : ℕ\nhb : Odd b\nha₀ : a ≠ 0\nhb' : Odd (b % (4 * a))\ne a' : ℕ\nha₁' : ¬2 ∣ a'\nha₂ : a = 2 ^ e * a'\nha₁ : Odd a'\n⊢ ↑χ₈ ↑b ^ e * (qrSign b a' * J(↑b | a')) = ↑χ₈ ↑(b % (4 * a)) ^ e * (qrSign (b % (4 * a)) a' * J(↑(b % (4 * a)) | a'))\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase inr.intro.intro.intro.e_a\na b : ℕ\nhb : Odd b\nha₀ : a ≠ 0\nhb' : Odd (b % (4 * a))\ne a' : ℕ\nha₁' : ¬2 ∣ a'\nha₂ : a = 2 ^ e * a'\nha₁ : Odd a'\n⊢ ↑χ₈ ↑b ^ e = ↑χ₈ ↑(b % (4 * a)) ^ e\ncase inr.intro.intro.intro.e_a\na b : ℕ\nhb : Odd b\nha₀ : a ≠ 0\nhb' : Odd (b % (4 * a))\ne a' : ℕ\nha₁' : ¬2 ∣ a'\nha₂ : a = 2 ^ e * a'\nha₁ : Odd a'\n⊢ qrSign b a' * J(↑b | a') = qrSign (b % (4 * a)) a' * J(↑(b % (4 * a)) | a')\n[PROOFSTEP]\nswap\n[GOAL]\ncase inr.intro.intro.intro.e_a\na b : ℕ\nhb : Odd b\nha₀ : a ≠ 0\nhb' : Odd (b % (4 * a))\ne a' : ℕ\nha₁' : ¬2 ∣ a'\nha₂ : a = 2 ^ e * a'\nha₁ : Odd a'\n⊢ qrSign b a' * J(↑b | a') = qrSign (b % (4 * a)) a' * J(↑(b % (4 * a)) | a')\ncase inr.intro.intro.intro.e_a\na b : ℕ\nhb : Odd b\nha₀ : a ≠ 0\nhb' : Odd (b % (4 * a))\ne a' : ℕ\nha₁' : ¬2 ∣ a'\nha₂ : a = 2 ^ e * a'\nha₁ : Odd a'\n⊢ ↑χ₈ ↑b ^ e = ↑χ₈ ↑(b % (4 * a)) ^ e\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase inr.intro.intro.intro.e_a.e_a\na b : ℕ\nhb : Odd b\nha₀ : a ≠ 0\nhb' : Odd (b % (4 * a))\ne a' : ℕ\nha₁' : ¬2 ∣ a'\nha₂ : a = 2 ^ e * a'\nha₁ : Odd a'\n⊢ qrSign b a' = qrSign (b % (4 * a)) a'\n[PROOFSTEP]\nsimp_rw [qrSign]\n[GOAL]\ncase inr.intro.intro.intro.e_a.e_a\na b : ℕ\nhb : Odd b\nha₀ : a ≠ 0\nhb' : Odd (b % (4 * a))\ne a' : ℕ\nha₁' : ¬2 ∣ a'\nha₂ : a = 2 ^ e * a'\nha₁ : Odd a'\n⊢ J(↑χ₄ ↑b | a') = J(↑χ₄ ↑(b % (4 * a)) | a')\n[PROOFSTEP]\nrw [χ₄_nat_mod_four, χ₄_nat_mod_four (b % (4 * a)), mod_mod_of_dvd b (dvd_mul_right 4 a)]\n[GOAL]\ncase inr.intro.intro.intro.e_a.e_a\na b : ℕ\nhb : Odd b\nha₀ : a ≠ 0\nhb' : Odd (b % (4 * a))\ne a' : ℕ\nha₁' : ¬2 ∣ a'\nha₂ : a = 2 ^ e * a'\nha₁ : Odd a'\n⊢ J(↑b | a') = J(↑(b % (4 * a)) | a')\n[PROOFSTEP]\nrw [mod_left ↑(b % _), mod_left b, Int.coe_nat_mod, Int.emod_emod_of_dvd b]\n[GOAL]\ncase inr.intro.intro.intro.e_a.e_a\na b : ℕ\nhb : Odd b\nha₀ : a ≠ 0\nhb' : Odd (b % (4 * a))\ne a' : ℕ\nha₁' : ¬2 ∣ a'\nha₂ : a = 2 ^ e * a'\nha₁ : Odd a'\n⊢ ↑a' ∣ ↑(4 * a)\n[PROOFSTEP]\nsimp only [ha₂, Nat.cast_mul, ← mul_assoc]\n[GOAL]\ncase inr.intro.intro.intro.e_a.e_a\na b : ℕ\nhb : Odd b\nha₀ : a ≠ 0\nhb' : Odd (b % (4 * a))\ne a' : ℕ\nha₁' : ¬2 ∣ a'\nha₂ : a = 2 ^ e * a'\nha₁ : Odd a'\n⊢ ↑a' ∣ ↑4 * ↑(2 ^ e) * ↑a'\n[PROOFSTEP]\nexact\n  dvd_mul_left (a' : ℤ)\n    (↑4 * ↑(2 ^ e))\n      -- porting note: In mathlib3, it was written `cases' e`. In Lean 4, this resulted in the choice\n        -- of a name other than e (for the case distinction of line 482) so we indicate the name\n        -- to use explicitly.\n[GOAL]\ncase inr.intro.intro.intro.e_a\na b : ℕ\nhb : Odd b\nha₀ : a ≠ 0\nhb' : Odd (b % (4 * a))\ne a' : ℕ\nha₁' : ¬2 ∣ a'\nha₂ : a = 2 ^ e * a'\nha₁ : Odd a'\n⊢ ↑χ₈ ↑b ^ e = ↑χ₈ ↑(b % (4 * a)) ^ e\n[PROOFSTEP]\ncases' e with e\n[GOAL]\ncase inr.intro.intro.intro.e_a.zero\na b : ℕ\nhb : Odd b\nha₀ : a ≠ 0\nhb' : Odd (b % (4 * a))\na' : ℕ\nha₁' : ¬2 ∣ a'\nha₁ : Odd a'\nha₂ : a = 2 ^ zero * a'\n⊢ ↑χ₈ ↑b ^ zero = ↑χ₈ ↑(b % (4 * a)) ^ zero\n[PROOFSTEP]\nrfl\n[GOAL]\ncase inr.intro.intro.intro.e_a.succ\na b : ℕ\nhb : Odd b\nha₀ : a ≠ 0\nhb' : Odd (b % (4 * a))\na' : ℕ\nha₁' : ¬2 ∣ a'\nha₁ : Odd a'\ne : ℕ\nha₂ : a = 2 ^ succ e * a'\n⊢ ↑χ₈ ↑b ^ succ e = ↑χ₈ ↑(b % (4 * a)) ^ succ e\n[PROOFSTEP]\nrw [χ₈_nat_mod_eight, χ₈_nat_mod_eight (b % (4 * a)), mod_mod_of_dvd b]\n[GOAL]\ncase inr.intro.intro.intro.e_a.succ\na b : ℕ\nhb : Odd b\nha₀ : a ≠ 0\nhb' : Odd (b % (4 * a))\na' : ℕ\nha₁' : ¬2 ∣ a'\nha₁ : Odd a'\ne : ℕ\nha₂ : a = 2 ^ succ e * a'\n⊢ 8 ∣ 4 * a\n[PROOFSTEP]\nuse 2 ^ e * a'\n[GOAL]\ncase h\na b : ℕ\nhb : Odd b\nha₀ : a ≠ 0\nhb' : Odd (b % (4 * a))\na' : ℕ\nha₁' : ¬2 ∣ a'\nha₁ : Odd a'\ne : ℕ\nha₂ : a = 2 ^ succ e * a'\n⊢ 4 * a = 8 * (2 ^ e * a')\n[PROOFSTEP]\nrw [ha₂, Nat.pow_succ]\n[GOAL]\ncase h\na b : ℕ\nhb : Odd b\nha₀ : a ≠ 0\nhb' : Odd (b % (4 * a))\na' : ℕ\nha₁' : ¬2 ∣ a'\nha₁ : Odd a'\ne : ℕ\nha₂ : a = 2 ^ succ e * a'\n⊢ 4 * (2 ^ e * 2 * a') = 8 * (2 ^ e * a')\n[PROOFSTEP]\nring\n[GOAL]\na : ℤ\nb : ℕ\nhb : Odd b\n⊢ J(a | b) = J(a | b % (4 * Int.natAbs a))\n[PROOFSTEP]\ncases' Int.natAbs_eq a with ha ha\n[GOAL]\ncase inl\na : ℤ\nb : ℕ\nhb : Odd b\nha : a = ↑(Int.natAbs a)\n⊢ J(a | b) = J(a | b % (4 * Int.natAbs a))\n[PROOFSTEP]\nnth_rw 2 [ha]\n[GOAL]\ncase inr\na : ℤ\nb : ℕ\nhb : Odd b\nha : a = -↑(Int.natAbs a)\n⊢ J(a | b) = J(a | b % (4 * Int.natAbs a))\n[PROOFSTEP]\nnth_rw 2 [ha]\n[GOAL]\ncase inl\na : ℤ\nb : ℕ\nhb : Odd b\nha : a = ↑(Int.natAbs a)\n⊢ J(a | b) = J(↑(Int.natAbs a) | b % (4 * Int.natAbs a))\n[PROOFSTEP]\nnth_rw 1 [ha]\n[GOAL]\ncase inr\na : ℤ\nb : ℕ\nhb : Odd b\nha : a = -↑(Int.natAbs a)\n⊢ J(a | b) = J(-↑(Int.natAbs a) | b % (4 * Int.natAbs a))\n[PROOFSTEP]\nnth_rw 1 [ha]\n[GOAL]\ncase inl\na : ℤ\nb : ℕ\nhb : Odd b\nha : a = ↑(Int.natAbs a)\n⊢ J(↑(Int.natAbs a) | b) = J(↑(Int.natAbs a) | b % (4 * Int.natAbs a))\n[PROOFSTEP]\nexact mod_right' a.natAbs hb\n[GOAL]\ncase inr\na : ℤ\nb : ℕ\nhb : Odd b\nha : a = -↑(Int.natAbs a)\n⊢ J(-↑(Int.natAbs a) | b) = J(-↑(Int.natAbs a) | b % (4 * Int.natAbs a))\n[PROOFSTEP]\nhave hb' : Odd (b % (4 * a.natAbs)) := hb.mod_even (Even.mul_right (by norm_num) _)\n[GOAL]\na : ℤ\nb : ℕ\nhb : Odd b\nha : a = -↑(Int.natAbs a)\n⊢ Even 4\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase inr\na : ℤ\nb : ℕ\nhb : Odd b\nha : a = -↑(Int.natAbs a)\nhb' : Odd (b % (4 * Int.natAbs a))\n⊢ J(-↑(Int.natAbs a) | b) = J(-↑(Int.natAbs a) | b % (4 * Int.natAbs a))\n[PROOFSTEP]\nrw [jacobiSym.neg _ hb, jacobiSym.neg _ hb', mod_right' _ hb, χ₄_nat_mod_four, χ₄_nat_mod_four (b % (4 * _)),\n  mod_mod_of_dvd b (dvd_mul_right 4 _)]\n", "meta": {"mathlib_filename": "Mathlib.NumberTheory.LegendreSymbol.JacobiSymbol", "llama_tokens": 20672, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8418256512199033, "lm_q2_score": 0.6187804337438501, "lm_q1q2_score": 0.5209052415985508}}
{"text": "[GOAL]\nc : Prop\ninst✝ : Decidable c\na b : Ordering\n⊢ ((if c then a else b) = lt) = if c then a = lt else b = lt\n[PROOFSTEP]\nby_cases c\n[GOAL]\nc : Prop\ninst✝ : Decidable c\na b : Ordering\n⊢ ((if c then a else b) = lt) = if c then a = lt else b = lt\n[PROOFSTEP]\nby_cases c\n[GOAL]\ncase pos\nc : Prop\ninst✝ : Decidable c\na b : Ordering\nh : c\n⊢ ((if c then a else b) = lt) = if c then a = lt else b = lt\n[PROOFSTEP]\nsimp [*]\n[GOAL]\ncase neg\nc : Prop\ninst✝ : Decidable c\na b : Ordering\nh : ¬c\n⊢ ((if c then a else b) = lt) = if c then a = lt else b = lt\n[PROOFSTEP]\nsimp [*]\n[GOAL]\nc : Prop\ninst✝ : Decidable c\na b : Ordering\n⊢ ((if c then a else b) = eq) = if c then a = eq else b = eq\n[PROOFSTEP]\nby_cases c\n[GOAL]\nc : Prop\ninst✝ : Decidable c\na b : Ordering\n⊢ ((if c then a else b) = eq) = if c then a = eq else b = eq\n[PROOFSTEP]\nby_cases c\n[GOAL]\ncase pos\nc : Prop\ninst✝ : Decidable c\na b : Ordering\nh : c\n⊢ ((if c then a else b) = eq) = if c then a = eq else b = eq\n[PROOFSTEP]\nsimp [*]\n[GOAL]\ncase neg\nc : Prop\ninst✝ : Decidable c\na b : Ordering\nh : ¬c\n⊢ ((if c then a else b) = eq) = if c then a = eq else b = eq\n[PROOFSTEP]\nsimp [*]\n[GOAL]\nc : Prop\ninst✝ : Decidable c\na b : Ordering\n⊢ ((if c then a else b) = gt) = if c then a = gt else b = gt\n[PROOFSTEP]\nby_cases c\n[GOAL]\nc : Prop\ninst✝ : Decidable c\na b : Ordering\n⊢ ((if c then a else b) = gt) = if c then a = gt else b = gt\n[PROOFSTEP]\nby_cases c\n[GOAL]\ncase pos\nc : Prop\ninst✝ : Decidable c\na b : Ordering\nh : c\n⊢ ((if c then a else b) = gt) = if c then a = gt else b = gt\n[PROOFSTEP]\nsimp [*]\n[GOAL]\ncase neg\nc : Prop\ninst✝ : Decidable c\na b : Ordering\nh : ¬c\n⊢ ((if c then a else b) = gt) = if c then a = gt else b = gt\n[PROOFSTEP]\nsimp [*]\n[GOAL]\nα : Type u\nlt : α → α → Prop\ninst✝ : DecidableRel lt\na b : α\n⊢ (cmpUsing lt a b = Ordering.lt) = lt a b\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nlt : α → α → Prop\ninst✝¹ : DecidableRel lt\ninst✝ : IsStrictOrder α lt\na b : α\n⊢ (cmpUsing lt a b = Ordering.gt) = lt b a\n[PROOFSTEP]\nsimp only [cmpUsing, Ordering.ite_eq_gt_distrib, if_false_right_eq_and, and_true, if_false_left_eq_and]\n[GOAL]\nα : Type u\nlt : α → α → Prop\ninst✝¹ : DecidableRel lt\ninst✝ : IsStrictOrder α lt\na b : α\n⊢ (¬lt a b ∧ lt b a) = lt b a\n[PROOFSTEP]\napply propext\n[GOAL]\ncase a\nα : Type u\nlt : α → α → Prop\ninst✝¹ : DecidableRel lt\ninst✝ : IsStrictOrder α lt\na b : α\n⊢ ¬lt a b ∧ lt b a ↔ lt b a\n[PROOFSTEP]\napply Iff.intro\n[GOAL]\ncase a.mp\nα : Type u\nlt : α → α → Prop\ninst✝¹ : DecidableRel lt\ninst✝ : IsStrictOrder α lt\na b : α\n⊢ ¬lt a b ∧ lt b a → lt b a\n[PROOFSTEP]\nexact fun h => h.2\n[GOAL]\ncase a.mpr\nα : Type u\nlt : α → α → Prop\ninst✝¹ : DecidableRel lt\ninst✝ : IsStrictOrder α lt\na b : α\n⊢ lt b a → ¬lt a b ∧ lt b a\n[PROOFSTEP]\nintro hba\n[GOAL]\ncase a.mpr\nα : Type u\nlt : α → α → Prop\ninst✝¹ : DecidableRel lt\ninst✝ : IsStrictOrder α lt\na b : α\nhba : lt b a\n⊢ ¬lt a b ∧ lt b a\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase a.mpr.left\nα : Type u\nlt : α → α → Prop\ninst✝¹ : DecidableRel lt\ninst✝ : IsStrictOrder α lt\na b : α\nhba : lt b a\n⊢ ¬lt a b\n[PROOFSTEP]\nintro hab\n[GOAL]\ncase a.mpr.left\nα : Type u\nlt : α → α → Prop\ninst✝¹ : DecidableRel lt\ninst✝ : IsStrictOrder α lt\na b : α\nhba : lt b a\nhab : lt a b\n⊢ False\n[PROOFSTEP]\nexact absurd (_root_.trans hab hba) (irrefl a)\n[GOAL]\ncase a.mpr.right\nα : Type u\nlt : α → α → Prop\ninst✝¹ : DecidableRel lt\ninst✝ : IsStrictOrder α lt\na b : α\nhba : lt b a\n⊢ lt b a\n[PROOFSTEP]\nassumption\n[GOAL]\nα : Type u\nlt : α → α → Prop\ninst✝ : DecidableRel lt\na b : α\n⊢ (cmpUsing lt a b = Ordering.eq) = (¬lt a b ∧ ¬lt b a)\n[PROOFSTEP]\nsimp\n", "meta": {"mathlib_filename": "Mathlib.Init.Data.Ordering.Lemmas", "llama_tokens": 1745, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7520125737597972, "lm_q2_score": 0.6926419894793246, "lm_q1q2_score": 0.5208754852024533}}
{"text": "[GOAL]\nα β : PreordCat\ne : ↑α ≃o ↑β\n⊢ ↑e ≫ ↑(OrderIso.symm e) = 𝟙 α\n[PROOFSTEP]\next x\n[GOAL]\ncase w\nα β : PreordCat\ne : ↑α ≃o ↑β\nx : (forget PreordCat).obj α\n⊢ ↑(↑e ≫ ↑(OrderIso.symm e)) x = ↑(𝟙 α) x\n[PROOFSTEP]\nexact e.symm_apply_apply x\n[GOAL]\nα β : PreordCat\ne : ↑α ≃o ↑β\n⊢ ↑(OrderIso.symm e) ≫ ↑e = 𝟙 β\n[PROOFSTEP]\next x\n[GOAL]\ncase w\nα β : PreordCat\ne : ↑α ≃o ↑β\nx : (forget PreordCat).obj β\n⊢ ↑(↑(OrderIso.symm e) ≫ ↑e) x = ↑(𝟙 β) x\n[PROOFSTEP]\nexact e.apply_symm_apply x\n[GOAL]\nX✝ Y✝ : PreordCat\na₁✝ a₂✝ : X✝ ⟶ Y✝\nh : preordCatToCat.map a₁✝ = preordCatToCat.map a₂✝\n⊢ a₁✝ = a₂✝\n[PROOFSTEP]\next x\n[GOAL]\ncase w\nX✝ Y✝ : PreordCat\na₁✝ a₂✝ : X✝ ⟶ Y✝\nh : preordCatToCat.map a₁✝ = preordCatToCat.map a₂✝\nx : (forget PreordCat).obj X✝\n⊢ ↑a₁✝ x = ↑a₂✝ x\n[PROOFSTEP]\nexact Functor.congr_obj h x\n", "meta": {"mathlib_filename": "Mathlib.Order.Category.PreordCat", "llama_tokens": 521, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7520125737597972, "lm_q2_score": 0.6926419767901475, "lm_q1q2_score": 0.5208754756600326}}
{"text": "[GOAL]\nC : Type u_1\ninst✝ : Groupoid C\n⊢ Quiver.IsThin C ↔ ∀ (c : C), Subsingleton (c ⟶ c)\n[PROOFSTEP]\nrefine' ⟨fun h c => h c c, fun h c d => Subsingleton.intro fun f g => _⟩\n[GOAL]\nC : Type u_1\ninst✝ : Groupoid C\nh : ∀ (c : C), Subsingleton (c ⟶ c)\nc d : C\nf g : c ⟶ d\n⊢ f = g\n[PROOFSTEP]\nhaveI := h d\n[GOAL]\nC : Type u_1\ninst✝ : Groupoid C\nh : ∀ (c : C), Subsingleton (c ⟶ c)\nc d : C\nf g : c ⟶ d\nthis : Subsingleton (d ⟶ d)\n⊢ f = g\n[PROOFSTEP]\ncalc\n  f = f ≫ inv g ≫ g := by simp only [inv_eq_inv, IsIso.inv_hom_id, Category.comp_id]\n  _ = f ≫ inv f ≫ g := by\n    congr 1\n    simp only [inv_eq_inv, IsIso.inv_hom_id, eq_iff_true_of_subsingleton]\n  _ = g := by simp only [inv_eq_inv, IsIso.hom_inv_id_assoc]\n[GOAL]\nC : Type u_1\ninst✝ : Groupoid C\nh : ∀ (c : C), Subsingleton (c ⟶ c)\nc d : C\nf g : c ⟶ d\nthis : Subsingleton (d ⟶ d)\n⊢ f = f ≫ inv g ≫ g\n[PROOFSTEP]\nsimp only [inv_eq_inv, IsIso.inv_hom_id, Category.comp_id]\n[GOAL]\nC : Type u_1\ninst✝ : Groupoid C\nh : ∀ (c : C), Subsingleton (c ⟶ c)\nc d : C\nf g : c ⟶ d\nthis : Subsingleton (d ⟶ d)\n⊢ f ≫ inv g ≫ g = f ≫ inv f ≫ g\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_a\nC : Type u_1\ninst✝ : Groupoid C\nh : ∀ (c : C), Subsingleton (c ⟶ c)\nc d : C\nf g : c ⟶ d\nthis : Subsingleton (d ⟶ d)\n⊢ inv g ≫ g = inv f ≫ g\n[PROOFSTEP]\nsimp only [inv_eq_inv, IsIso.inv_hom_id, eq_iff_true_of_subsingleton]\n[GOAL]\nC : Type u_1\ninst✝ : Groupoid C\nh : ∀ (c : C), Subsingleton (c ⟶ c)\nc d : C\nf g : c ⟶ d\nthis : Subsingleton (d ⟶ d)\n⊢ f ≫ inv f ≫ g = g\n[PROOFSTEP]\nsimp only [inv_eq_inv, IsIso.hom_inv_id_assoc]\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Groupoid.Basic", "llama_tokens": 803, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7279754489059774, "lm_q2_score": 0.7154239897159439, "lm_q1q2_score": 0.5208111000715696}}
{"text": "[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝ : SeminormedGroup E\nh : ∀ (x : E), ‖x‖ = 0 → x = 1\nsrc✝ : SeminormedGroup E := inst✝\nx✝ y✝ : E\nhxy : dist x✝ y✝ = 0\n⊢ ‖x✝ / y✝‖ = 0\n[PROOFSTEP]\nexact (‹SeminormedGroup E›.dist_eq _ _).symm.trans hxy\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : Norm E\ninst✝¹ : Group E\ninst✝ : PseudoMetricSpace E\nh₁ : ∀ (x : E), ‖x‖ = dist x 1\nh₂ : ∀ (x y z : E), dist x y ≤ dist (x * z) (y * z)\nx y : E\n⊢ dist x y = ‖x / y‖\n[PROOFSTEP]\nrw [h₁]\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : Norm E\ninst✝¹ : Group E\ninst✝ : PseudoMetricSpace E\nh₁ : ∀ (x : E), ‖x‖ = dist x 1\nh₂ : ∀ (x y z : E), dist x y ≤ dist (x * z) (y * z)\nx y : E\n⊢ dist x y = dist (x / y) 1\n[PROOFSTEP]\napply le_antisymm\n[GOAL]\ncase a\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : Norm E\ninst✝¹ : Group E\ninst✝ : PseudoMetricSpace E\nh₁ : ∀ (x : E), ‖x‖ = dist x 1\nh₂ : ∀ (x y z : E), dist x y ≤ dist (x * z) (y * z)\nx y : E\n⊢ dist x y ≤ dist (x / y) 1\n[PROOFSTEP]\nsimpa only [div_eq_mul_inv, ← mul_right_inv y] using h₂ _ _ _\n[GOAL]\ncase a\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : Norm E\ninst✝¹ : Group E\ninst✝ : PseudoMetricSpace E\nh₁ : ∀ (x : E), ‖x‖ = dist x 1\nh₂ : ∀ (x y z : E), dist x y ≤ dist (x * z) (y * z)\nx y : E\n⊢ dist (x / y) 1 ≤ dist x y\n[PROOFSTEP]\nsimpa only [div_mul_cancel', one_mul] using h₂ (x / y) 1 y\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : Norm E\ninst✝¹ : Group E\ninst✝ : PseudoMetricSpace E\nh₁ : ∀ (x : E), ‖x‖ = dist x 1\nh₂ : ∀ (x y z : E), dist (x * z) (y * z) ≤ dist x y\nx y : E\n⊢ dist x y = ‖x / y‖\n[PROOFSTEP]\nrw [h₁]\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : Norm E\ninst✝¹ : Group E\ninst✝ : PseudoMetricSpace E\nh₁ : ∀ (x : E), ‖x‖ = dist x 1\nh₂ : ∀ (x y z : E), dist (x * z) (y * z) ≤ dist x y\nx y : E\n⊢ dist x y = dist (x / y) 1\n[PROOFSTEP]\napply le_antisymm\n[GOAL]\ncase a\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : Norm E\ninst✝¹ : Group E\ninst✝ : PseudoMetricSpace E\nh₁ : ∀ (x : E), ‖x‖ = dist x 1\nh₂ : ∀ (x y z : E), dist (x * z) (y * z) ≤ dist x y\nx y : E\n⊢ dist x y ≤ dist (x / y) 1\n[PROOFSTEP]\nsimpa only [div_mul_cancel', one_mul] using h₂ (x / y) 1 y\n[GOAL]\ncase a\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : Norm E\ninst✝¹ : Group E\ninst✝ : PseudoMetricSpace E\nh₁ : ∀ (x : E), ‖x‖ = dist x 1\nh₂ : ∀ (x y z : E), dist (x * z) (y * z) ≤ dist x y\nx y : E\n⊢ dist (x / y) 1 ≤ dist x y\n[PROOFSTEP]\nsimpa only [div_eq_mul_inv, ← mul_right_inv y] using h₂ _ _ _\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝ : Group E\nf : GroupSeminorm E\nx : E\n⊢ dist x x = 0\n[PROOFSTEP]\nsimp only [div_self', map_one_eq_zero]\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝ : Group E\nf : GroupSeminorm E\nx y : E\n⊢ (fun x y => ↑{ val := ↑f (x / y), property := (_ : 0 ≤ ↑f (x / y)) }) x y = ENNReal.ofReal (dist x y)\n[PROOFSTEP]\nexact\n  ENNReal.coe_nnreal_eq\n    _\n      -- porting note: how did `mathlib3` solve this automatically?\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns : Set E\na✝ a₁ a₂ b✝ b₁ b₂ : E\nr r₁ r₂ : ℝ\na b : E\n⊢ dist a b = ‖b / a‖\n[PROOFSTEP]\nrw [dist_comm, dist_eq_norm_div]\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns : Set E\na✝ a₁ a₂ b✝ b₁ b₂ : E\nr r₁ r₂ : ℝ\na : Eᵐᵒᵖ\nb c : E\n⊢ dist (a • b) (a • c) = dist b c\n[PROOFSTEP]\nsimp [dist_eq_norm_div]\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns : Set E\na✝ a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\na : E\n⊢ dist a 1 = ‖a‖\n[PROOFSTEP]\nrw [dist_eq_norm_div, div_one]\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns : Set E\na✝ a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\na : E\n⊢ dist 1 a = ‖a‖\n[PROOFSTEP]\nrw [dist_comm, dist_one_right]\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns : Set E\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nf : E → F\nhi : Isometry f\nh₁ : f 1 = 1\nx : E\n⊢ ‖f x‖ = ‖x‖\n[PROOFSTEP]\nrw [← dist_one_right, ← h₁, hi.dist_eq, dist_one_right]\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝³ : SeminormedGroup E\ninst✝² : SeminormedGroup F\ninst✝¹ : SeminormedGroup G\ns : Set E\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\ninst✝ : ProperSpace E\n⊢ Tendsto norm (cocompact E) atTop\n[PROOFSTEP]\nsimpa only [dist_one_right] using tendsto_dist_right_cocompact_atTop (1 : E)\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns : Set E\na✝ a₁ a₂ b✝ b₁ b₂ : E\nr r₁ r₂ : ℝ\na b : E\n⊢ ‖a / b‖ = ‖b / a‖\n[PROOFSTEP]\nsimpa only [dist_eq_norm_div] using dist_comm a b\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns : Set E\na✝ a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\na : E\n⊢ ‖a⁻¹‖ = ‖a‖\n[PROOFSTEP]\nsimpa using norm_div_rev 1 a\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns : Set E\na✝ a₁ a₂ b✝ b₁ b₂ : E\nr r₁ r₂ : ℝ\na b : E\n⊢ dist b (a * b) = ‖a‖\n[PROOFSTEP]\nrw [← dist_one_left, ← dist_mul_right 1 a b, one_mul]\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns : Set E\na✝ a₁ a₂ b✝ b₁ b₂ : E\nr r₁ r₂ : ℝ\na b : E\n⊢ dist (a * b) b = ‖a‖\n[PROOFSTEP]\nrw [dist_comm, dist_mul_self_right]\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns : Set E\na✝ a₁ a₂ b✝ b₁ b₂ : E\nr r₁ r₂ : ℝ\na b c : E\n⊢ dist (a / b) c = dist a (c * b)\n[PROOFSTEP]\nrw [← dist_mul_right _ _ b, div_mul_cancel']\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns : Set E\na✝ a₁ a₂ b✝ b₁ b₂ : E\nr r₁ r₂ : ℝ\na b c : E\n⊢ dist a (b / c) = dist (a * c) b\n[PROOFSTEP]\nrw [← dist_mul_right _ _ c, div_mul_cancel']\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns : Set E\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\n⊢ Tendsto Inv.inv (comap norm atTop) (comap norm atTop)\n[PROOFSTEP]\nsimpa only [norm_inv', tendsto_comap_iff, (· ∘ ·)] using tendsto_comap\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns : Set E\na✝ a₁ a₂ b✝ b₁ b₂ : E\nr r₁ r₂ : ℝ\na b : E\n⊢ ‖a * b‖ ≤ ‖a‖ + ‖b‖\n[PROOFSTEP]\nsimpa [dist_eq_norm_div] using dist_triangle a 1 b⁻¹\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns : Set E\na✝ a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\na : E\n⊢ 0 ≤ ‖a‖\n[PROOFSTEP]\nrw [← dist_one_right]\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns : Set E\na✝ a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\na : E\n⊢ 0 ≤ dist a 1\n[PROOFSTEP]\nexact dist_nonneg\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns : Set E\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\n⊢ ‖1‖ = 0\n[PROOFSTEP]\nrw [← dist_one_right, dist_self]\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns : Set E\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\n⊢ a = 1 → ‖a‖ = 0\n[PROOFSTEP]\nrintro rfl\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns : Set E\na₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\n⊢ ‖1‖ = 0\n[PROOFSTEP]\nexact norm_one'\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝³ : SeminormedGroup E\ninst✝² : SeminormedGroup F\ninst✝¹ : SeminormedGroup G\ns : Set E\na✝ a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\ninst✝ : Subsingleton E\na : E\n⊢ ‖a‖ = 0\n[PROOFSTEP]\nrw [Subsingleton.elim a 1, norm_one']\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns : Set E\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nx : E\n⊢ 0 < 1 + ‖x‖ ^ 2\n[PROOFSTEP]\npositivity\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns : Set E\na✝ a₁ a₂ b✝ b₁ b₂ : E\nr r₁ r₂ : ℝ\na b : E\n⊢ ‖a / b‖ ≤ ‖a‖ + ‖b‖\n[PROOFSTEP]\nsimpa [dist_eq_norm_div] using dist_triangle a 1 b\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns : Set E\na✝ a₁ a₂ b✝ b₁ b₂ : E\nr r₁ r₂ : ℝ\na b : E\n⊢ dist a b ≤ ‖a‖ + ‖b‖\n[PROOFSTEP]\nrw [dist_eq_norm_div]\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns : Set E\na✝ a₁ a₂ b✝ b₁ b₂ : E\nr r₁ r₂ : ℝ\na b : E\n⊢ ‖a / b‖ ≤ ‖a‖ + ‖b‖\n[PROOFSTEP]\napply norm_div_le\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns : Set E\na✝ a₁ a₂ b✝ b₁ b₂ : E\nr r₁ r₂ : ℝ\na b : E\n⊢ |‖a‖ - ‖b‖| ≤ ‖a / b‖\n[PROOFSTEP]\nsimpa [dist_eq_norm_div] using abs_dist_sub_le a b 1\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns : Set E\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nu v : E\n⊢ ‖u‖ ≤ ‖v‖ + ‖u / v‖\n[PROOFSTEP]\nrw [add_comm]\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns : Set E\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nu v : E\n⊢ ‖u‖ ≤ ‖u / v‖ + ‖v‖\n[PROOFSTEP]\nrefine' (norm_mul_le' _ _).trans_eq' _\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns : Set E\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nu v : E\n⊢ ‖u‖ = ‖u / v * v‖\n[PROOFSTEP]\nrw [div_mul_cancel']\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns : Set E\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nu v : E\n⊢ ‖v‖ ≤ ‖u‖ + ‖u / v‖\n[PROOFSTEP]\nrw [norm_div_rev]\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns : Set E\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nu v : E\n⊢ ‖v‖ ≤ ‖u‖ + ‖v / u‖\n[PROOFSTEP]\nexact norm_le_norm_add_norm_div' v u\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns : Set E\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nu v : E\n⊢ ‖u‖ = ‖u * v / v‖\n[PROOFSTEP]\nrw [mul_div_cancel'']\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns : Set E\na✝ a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\ny : E\nε : ℝ\na : E\n⊢ a ∈ ball y ε ↔ a ∈ {x | ‖x / y‖ < ε}\n[PROOFSTEP]\nsimp [dist_eq_norm_div]\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns : Set E\na✝ a₁ a₂ b b₁ b₂ : E\nr✝ r₁ r₂ r : ℝ\na : E\n⊢ a ∈ ball 1 r ↔ a ∈ {x | ‖x‖ < r}\n[PROOFSTEP]\nsimp\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns : Set E\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\n⊢ b ∈ ball a r ↔ ‖b / a‖ < r\n[PROOFSTEP]\nrw [mem_ball, dist_eq_norm_div]\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns : Set E\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\n⊢ b ∈ ball a r ↔ ‖a / b‖ < r\n[PROOFSTEP]\nrw [mem_ball', dist_eq_norm_div]\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns : Set E\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\n⊢ a ∈ ball 1 r ↔ ‖a‖ < r\n[PROOFSTEP]\nrw [mem_ball, dist_one_right]\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns : Set E\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\n⊢ b ∈ closedBall a r ↔ ‖b / a‖ ≤ r\n[PROOFSTEP]\nrw [mem_closedBall, dist_eq_norm_div]\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns : Set E\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\n⊢ a ∈ closedBall 1 r ↔ ‖a‖ ≤ r\n[PROOFSTEP]\nrw [mem_closedBall, dist_one_right]\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns : Set E\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\n⊢ b ∈ closedBall a r ↔ ‖a / b‖ ≤ r\n[PROOFSTEP]\nrw [mem_closedBall', dist_eq_norm_div]\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns : Set E\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nh : b ∈ closedBall a r\n⊢ ‖b / a‖ ≤ r\n[PROOFSTEP]\nrwa [← dist_eq_norm_div]\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns : Set E\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nh : b ∈ ball a r\n⊢ ‖b / a‖ < r\n[PROOFSTEP]\nrwa [← dist_eq_norm_div]\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns : Set E\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nu v w : E\n⊢ ‖u / w‖ - ‖v / w‖ ≤ ‖u / v‖\n[PROOFSTEP]\nsimpa only [div_div_div_cancel_right'] using norm_sub_norm_le' (u / w) (v / w)\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns : Set E\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\n⊢ Bounded s ↔ ∃ C, ∀ (x : E), x ∈ s → ‖x‖ ≤ C\n[PROOFSTEP]\nsimpa only [Set.subset_def, mem_closedBall_one_iff] using bounded_iff_subset_ball (1 : E)\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns : Set E\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nhs : Bounded s\nR₀ : ℝ\nhR₀ : ∀ (x : E), x ∈ s → ‖x‖ ≤ R₀\n⊢ max R₀ 1 > 0\n[PROOFSTEP]\npositivity\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns : Set E\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\n⊢ b ∈ sphere a r ↔ ‖b / a‖ = r\n[PROOFSTEP]\nsimp [dist_eq_norm_div]\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns : Set E\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\n⊢ a ∈ sphere 1 r ↔ ‖a‖ = r\n[PROOFSTEP]\nsimp [dist_eq_norm_div]\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns : Set E\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nhr : r ≠ 0\nx : ↑(sphere 1 r)\n⊢ ‖↑x‖ ≠ 0\n[PROOFSTEP]\nrwa [norm_eq_of_mem_sphere' x]\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns : Set E\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nf : α → E\nl : Filter α\n⊢ (∀ (ε : ℝ), ε > 0 → ∀ᶠ (x : α) in l, dist (f x) 1 < ε) ↔ ∀ (ε : ℝ), ε > 0 → ∀ᶠ (x : α) in l, ‖f x‖ < ε\n[PROOFSTEP]\nsimp only [dist_one_right]\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns : Set E\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nf : E → F\nx : E\ny : F\n⊢ Tendsto f (𝓝 x) (𝓝 y) ↔ ∀ (ε : ℝ), ε > 0 → ∃ δ, δ > 0 ∧ ∀ (x' : E), ‖x' / x‖ < δ → ‖f x' / y‖ < ε\n[PROOFSTEP]\nsimp_rw [Metric.tendsto_nhds_nhds, dist_eq_norm_div]\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝⁴ : SeminormedGroup E\ninst✝³ : SeminormedGroup F\ninst✝² : SeminormedGroup G\ns : Set E\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\ninst✝¹ : Nonempty α\ninst✝ : SemilatticeSup α\nu : α → E\n⊢ CauchySeq u ↔ ∀ (ε : ℝ), ε > 0 → ∃ N, ∀ (m : α), N ≤ m → ∀ (n : α), N ≤ n → ‖u m / u n‖ < ε\n[PROOFSTEP]\nsimp [Metric.cauchySeq_iff, dist_eq_norm_div]\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns : Set E\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nx : E\n⊢ HasBasis (𝓝 x) (fun ε => 0 < ε) fun ε => {y | ‖y / x‖ < ε}\n[PROOFSTEP]\nsimp_rw [← ball_eq']\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns : Set E\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nx : E\n⊢ HasBasis (𝓝 x) (fun ε => 0 < ε) fun ε => ball x ε\n[PROOFSTEP]\nexact Metric.nhds_basis_ball\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns : Set E\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\n⊢ HasBasis (𝓝 1) (fun ε => 0 < ε) fun ε => {y | ‖y‖ < ε}\n[PROOFSTEP]\nconvert NormedCommGroup.nhds_basis_norm_lt (1 : E)\n[GOAL]\ncase h.e'_5.h.h.e'_2.h.h.e'_3.h.e'_3\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns : Set E\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ x✝¹ : ℝ\nx✝ : E\n⊢ x✝ = x✝ / 1\n[PROOFSTEP]\nsimp\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns : Set E\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\n⊢ HasBasis (𝓤 E) (fun ε => 0 < ε) fun ε => {p | ‖p.fst / p.snd‖ < ε}\n[PROOFSTEP]\nconvert Metric.uniformity_basis_dist (α := E) using 1\n[GOAL]\ncase h.e'_5\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns : Set E\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\n⊢ (fun ε => {p | ‖p.fst / p.snd‖ < ε}) = fun ε => {p | dist p.fst p.snd < ε}\n[PROOFSTEP]\nsimp [dist_eq_norm_div]\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝³ : SeminormedGroup E\ninst✝² : SeminormedGroup F\ninst✝¹ : SeminormedGroup G\ns : Set E\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\ninst✝ : MonoidHomClass 𝓕 E F\nf : 𝓕\nC : ℝ\nh : ∀ (x : E), ‖↑f x‖ ≤ C * ‖x‖\nx y : E\n⊢ dist (↑f x) (↑f y) ≤ C * dist x y\n[PROOFSTEP]\nsimpa only [dist_eq_norm_div, map_div] using h (x / y)\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns : Set E\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nf : E → F\nC : ℝ≥0\n⊢ LipschitzOnWith C f s ↔ ∀ ⦃x : E⦄, x ∈ s → ∀ ⦃y : E⦄, y ∈ s → ‖f x / f y‖ ≤ ↑C * ‖x / y‖\n[PROOFSTEP]\nsimp only [lipschitzOnWith_iff_dist_le_mul, dist_eq_norm_div]\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns : Set E\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nf : E → F\nC : ℝ≥0\nh : LipschitzOnWith C f s\nha : a ∈ s\nhb : b ∈ s\nhr : ‖a / b‖ ≤ r\n⊢ ↑C * ‖a / b‖ ≤ ↑C * r\n[PROOFSTEP]\ngcongr\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns : Set E\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nf : E → F\nC : ℝ≥0\n⊢ LipschitzWith C f ↔ ∀ (x y : E), ‖f x / f y‖ ≤ ↑C * ‖x / y‖\n[PROOFSTEP]\nsimp only [lipschitzWith_iff_dist_le_mul, dist_eq_norm_div]\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns : Set E\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nf : E → F\nC : ℝ≥0\nh : LipschitzWith C f\nhr : ‖a / b‖ ≤ r\n⊢ ↑C * ‖a / b‖ ≤ ↑C * r\n[PROOFSTEP]\ngcongr\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝³ : SeminormedGroup E\ninst✝² : SeminormedGroup F\ninst✝¹ : SeminormedGroup G\ns : Set E\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\ninst✝ : MonoidHomClass 𝓕 E F\nf : 𝓕\n⊢ Isometry ↑f ↔ ∀ (x : E), ‖↑f x‖ = ‖x‖\n[PROOFSTEP]\nsimp only [isometry_iff_dist_eq, dist_eq_norm_div, ← map_div]\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝³ : SeminormedGroup E\ninst✝² : SeminormedGroup F\ninst✝¹ : SeminormedGroup G\ns : Set E\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\ninst✝ : MonoidHomClass 𝓕 E F\nf : 𝓕\n⊢ (∀ (x y : E), ‖↑f (x / y)‖ = ‖x / y‖) ↔ ∀ (x : E), ‖↑f x‖ = ‖x‖\n[PROOFSTEP]\nrefine' ⟨fun h x => _, fun h x y => h _⟩\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝³ : SeminormedGroup E\ninst✝² : SeminormedGroup F\ninst✝¹ : SeminormedGroup G\ns : Set E\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\ninst✝ : MonoidHomClass 𝓕 E F\nf : 𝓕\nh : ∀ (x y : E), ‖↑f (x / y)‖ = ‖x / y‖\nx : E\n⊢ ‖↑f x‖ = ‖x‖\n[PROOFSTEP]\nsimpa using h x 1\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns : Set E\na✝ a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\na : E\n⊢ a = 1 → ‖a‖₊ = 0\n[PROOFSTEP]\nrintro rfl\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns : Set E\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\n⊢ ‖1‖₊ = 0\n[PROOFSTEP]\nexact nnnorm_one'\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns : Set E\na✝ a₁ a₂ b✝ b₁ b₂ : E\nr r₁ r₂ : ℝ\na b : E\n⊢ edist a b = ↑‖a / b‖₊\n[PROOFSTEP]\nrw [edist_dist, dist_eq_norm_div, ofReal_norm_eq_coe_nnnorm']\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns : Set E\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nx : E\n⊢ edist x 1 = ↑‖x‖₊\n[PROOFSTEP]\nrw [edist_eq_coe_nnnorm_div, div_one]\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns : Set E\na a₁ a₂ b b₁ b₂ : E\nr✝ r₁ r₂ : ℝ\nr : ℝ≥0∞\n⊢ a ∈ EMetric.ball 1 r ↔ ↑‖a‖₊ < r\n[PROOFSTEP]\nrw [EMetric.mem_ball, edist_eq_coe_nnnorm']\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝³ : SeminormedGroup E\ninst✝² : SeminormedGroup F\ninst✝¹ : SeminormedGroup G\ns : Set E\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\ninst✝ : MonoidHomClass 𝓕 E F\nf : 𝓕\nK : ℝ≥0\nh : ∀ (x : E), ‖x‖ ≤ ↑K * ‖↑f x‖\nx y : E\n⊢ dist x y ≤ ↑K * dist (↑f x) (↑f y)\n[PROOFSTEP]\nsimpa only [dist_eq_norm_div, map_div] using h (x / y)\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns : Set E\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nf : E → F\nK : ℝ≥0\nh : LipschitzWith K f\nhf : f 1 = 1\nx : E\n⊢ ‖f x‖ ≤ ↑K * ‖x‖\n[PROOFSTEP]\nsimpa only [dist_one_right, hf] using h.dist_le_mul x 1\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns : Set E\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nf : E → F\nK : ℝ≥0\nh : AntilipschitzWith K f\nhf : f 1 = 1\nx : E\n⊢ ‖x‖ ≤ ↑K * ‖f x‖\n[PROOFSTEP]\nsimpa only [dist_one_right, hf] using h.le_mul_dist x 1\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns : Set E\na✝ a₁ a₂ b✝ b₁ b₂ : E\nr r₁ r₂ : ℝ\nf : α → E\na : Filter α\nb : E\n⊢ Tendsto f a (𝓝 b) ↔ Tendsto (fun e => ‖f e / b‖) a (𝓝 0)\n[PROOFSTEP]\nconvert tendsto_iff_dist_tendsto_zero (f := f) (x := a) (a := b) using 1\n[GOAL]\ncase h.e'_2.a\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns : Set E\na✝ a₁ a₂ b✝ b₁ b₂ : E\nr r₁ r₂ : ℝ\nf : α → E\na : Filter α\nb : E\n⊢ Tendsto (fun e => ‖f e / b‖) a (𝓝 0) ↔ Tendsto (fun b_1 => dist (f b_1) b) a (𝓝 0)\n[PROOFSTEP]\nsimp [dist_eq_norm_div]\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns : Set E\na✝ a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nf : α → E\na : Filter α\n⊢ Tendsto f a (𝓝 1) ↔ Tendsto (fun e => ‖f e‖) a (𝓝 0)\n[PROOFSTEP]\nrw [tendsto_iff_norm_tendsto_one]\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns : Set E\na✝ a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nf : α → E\na : Filter α\n⊢ Tendsto (fun e => ‖f e / 1‖) a (𝓝 0) ↔ Tendsto (fun e => ‖f e‖) a (𝓝 0)\n[PROOFSTEP]\nsimp only [div_one]\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns : Set E\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\n⊢ comap norm (𝓝 0) = 𝓝 1\n[PROOFSTEP]\nsimpa only [dist_one_right] using nhds_comap_dist (1 : E)\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns : Set E\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nx : E\n⊢ Tendsto (fun a => ‖a / x‖) (𝓝 x) (𝓝 0)\n[PROOFSTEP]\nsimpa [dist_eq_norm_div] using tendsto_id.dist (tendsto_const_nhds : Tendsto (fun _a => (x : E)) (𝓝 x) _)\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns : Set E\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nx : E\n⊢ Tendsto (fun a => ‖a‖) (𝓝 x) (𝓝 ‖x‖)\n[PROOFSTEP]\nsimpa using tendsto_id.dist (tendsto_const_nhds : Tendsto (fun _a => (1 : E)) _ _)\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns : Set E\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\n⊢ Tendsto (fun a => ‖a‖) (𝓝 1) (𝓝 0)\n[PROOFSTEP]\nsimpa using tendsto_norm_div_self (1 : E)\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns : Set E\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\n⊢ Continuous fun a => ‖a‖\n[PROOFSTEP]\nsimpa using continuous_id.dist (continuous_const : Continuous fun _a => (1 : E))\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns : Set E\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\n⊢ LipschitzWith 1 norm\n[PROOFSTEP]\nsimpa only [dist_one_left] using LipschitzWith.dist_right (1 : E)\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns : Set E\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nx : E\n⊢ x ∈ closure {1} ↔ ‖x‖ = 0\n[PROOFSTEP]\nrw [← closedBall_zero', mem_closedBall_one_iff, (norm_nonneg' x).le_iff_eq]\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns : Set E\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nf : α → E\ng : α → F\nl : Filter α\nhf : Tendsto f l (𝓝 1)\nhg : IsBoundedUnder (fun x x_1 => x ≤ x_1) l (norm ∘ g)\nop : E → F → G\nh_op : ∃ A, ∀ (x : E) (y : F), ‖op x y‖ ≤ A * ‖x‖ * ‖y‖\n⊢ Tendsto (fun x => op (f x) (g x)) l (𝓝 1)\n[PROOFSTEP]\ncases' h_op with A h_op\n[GOAL]\ncase intro\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns : Set E\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nf : α → E\ng : α → F\nl : Filter α\nhf : Tendsto f l (𝓝 1)\nhg : IsBoundedUnder (fun x x_1 => x ≤ x_1) l (norm ∘ g)\nop : E → F → G\nA : ℝ\nh_op : ∀ (x : E) (y : F), ‖op x y‖ ≤ A * ‖x‖ * ‖y‖\n⊢ Tendsto (fun x => op (f x) (g x)) l (𝓝 1)\n[PROOFSTEP]\nrcases hg with ⟨C, hC⟩\n[GOAL]\ncase intro.intro\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns : Set E\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nf : α → E\ng : α → F\nl : Filter α\nhf : Tendsto f l (𝓝 1)\nop : E → F → G\nA : ℝ\nh_op : ∀ (x : E) (y : F), ‖op x y‖ ≤ A * ‖x‖ * ‖y‖\nC : ℝ\nhC : ∀ᶠ (x : ℝ) in map (norm ∘ g) l, (fun x x_1 => x ≤ x_1) x C\n⊢ Tendsto (fun x => op (f x) (g x)) l (𝓝 1)\n[PROOFSTEP]\nrw [eventually_map] at hC \n[GOAL]\ncase intro.intro\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns : Set E\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nf : α → E\ng : α → F\nl : Filter α\nhf : Tendsto f l (𝓝 1)\nop : E → F → G\nA : ℝ\nh_op : ∀ (x : E) (y : F), ‖op x y‖ ≤ A * ‖x‖ * ‖y‖\nC : ℝ\nhC : ∀ᶠ (a : α) in l, (fun x x_1 => x ≤ x_1) ((norm ∘ g) a) C\n⊢ Tendsto (fun x => op (f x) (g x)) l (𝓝 1)\n[PROOFSTEP]\nrw [NormedCommGroup.tendsto_nhds_one] at hf ⊢\n[GOAL]\ncase intro.intro\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns : Set E\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nf : α → E\ng : α → F\nl : Filter α\nhf : ∀ (ε : ℝ), ε > 0 → ∀ᶠ (x : α) in l, ‖f x‖ < ε\nop : E → F → G\nA : ℝ\nh_op : ∀ (x : E) (y : F), ‖op x y‖ ≤ A * ‖x‖ * ‖y‖\nC : ℝ\nhC : ∀ᶠ (a : α) in l, (fun x x_1 => x ≤ x_1) ((norm ∘ g) a) C\n⊢ ∀ (ε : ℝ), ε > 0 → ∀ᶠ (x : α) in l, ‖op (f x) (g x)‖ < ε\n[PROOFSTEP]\nintro ε ε₀\n[GOAL]\ncase intro.intro\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns : Set E\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nf : α → E\ng : α → F\nl : Filter α\nhf : ∀ (ε : ℝ), ε > 0 → ∀ᶠ (x : α) in l, ‖f x‖ < ε\nop : E → F → G\nA : ℝ\nh_op : ∀ (x : E) (y : F), ‖op x y‖ ≤ A * ‖x‖ * ‖y‖\nC : ℝ\nhC : ∀ᶠ (a : α) in l, (fun x x_1 => x ≤ x_1) ((norm ∘ g) a) C\nε : ℝ\nε₀ : ε > 0\n⊢ ∀ᶠ (x : α) in l, ‖op (f x) (g x)‖ < ε\n[PROOFSTEP]\nrcases exists_pos_mul_lt ε₀ (A * C) with ⟨δ, δ₀, hδ⟩\n[GOAL]\ncase intro.intro.intro.intro\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns : Set E\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nf : α → E\ng : α → F\nl : Filter α\nhf : ∀ (ε : ℝ), ε > 0 → ∀ᶠ (x : α) in l, ‖f x‖ < ε\nop : E → F → G\nA : ℝ\nh_op : ∀ (x : E) (y : F), ‖op x y‖ ≤ A * ‖x‖ * ‖y‖\nC : ℝ\nhC : ∀ᶠ (a : α) in l, (fun x x_1 => x ≤ x_1) ((norm ∘ g) a) C\nε : ℝ\nε₀ : ε > 0\nδ : ℝ\nδ₀ : 0 < δ\nhδ : A * C * δ < ε\n⊢ ∀ᶠ (x : α) in l, ‖op (f x) (g x)‖ < ε\n[PROOFSTEP]\nfilter_upwards [hf δ δ₀, hC] with i hf hg\n[GOAL]\ncase h\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns : Set E\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nf : α → E\ng : α → F\nl : Filter α\nhf✝ : ∀ (ε : ℝ), ε > 0 → ∀ᶠ (x : α) in l, ‖f x‖ < ε\nop : E → F → G\nA : ℝ\nh_op : ∀ (x : E) (y : F), ‖op x y‖ ≤ A * ‖x‖ * ‖y‖\nC : ℝ\nhC : ∀ᶠ (a : α) in l, (fun x x_1 => x ≤ x_1) ((norm ∘ g) a) C\nε : ℝ\nε₀ : ε > 0\nδ : ℝ\nδ₀ : 0 < δ\nhδ : A * C * δ < ε\ni : α\nhf : ‖f i‖ < δ\nhg : (norm ∘ g) i ≤ C\n⊢ ‖op (f i) (g i)‖ < ε\n[PROOFSTEP]\nrefine' (h_op _ _).trans_lt _\n[GOAL]\ncase h\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns : Set E\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nf : α → E\ng : α → F\nl : Filter α\nhf✝ : ∀ (ε : ℝ), ε > 0 → ∀ᶠ (x : α) in l, ‖f x‖ < ε\nop : E → F → G\nA : ℝ\nh_op : ∀ (x : E) (y : F), ‖op x y‖ ≤ A * ‖x‖ * ‖y‖\nC : ℝ\nhC : ∀ᶠ (a : α) in l, (fun x x_1 => x ≤ x_1) ((norm ∘ g) a) C\nε : ℝ\nε₀ : ε > 0\nδ : ℝ\nδ₀ : 0 < δ\nhδ : A * C * δ < ε\ni : α\nhf : ‖f i‖ < δ\nhg : (norm ∘ g) i ≤ C\n⊢ A * ‖f i‖ * ‖g i‖ < ε\n[PROOFSTEP]\ncases' le_total A 0 with hA hA\n[GOAL]\ncase h.inl\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns : Set E\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nf : α → E\ng : α → F\nl : Filter α\nhf✝ : ∀ (ε : ℝ), ε > 0 → ∀ᶠ (x : α) in l, ‖f x‖ < ε\nop : E → F → G\nA : ℝ\nh_op : ∀ (x : E) (y : F), ‖op x y‖ ≤ A * ‖x‖ * ‖y‖\nC : ℝ\nhC : ∀ᶠ (a : α) in l, (fun x x_1 => x ≤ x_1) ((norm ∘ g) a) C\nε : ℝ\nε₀ : ε > 0\nδ : ℝ\nδ₀ : 0 < δ\nhδ : A * C * δ < ε\ni : α\nhf : ‖f i‖ < δ\nhg : (norm ∘ g) i ≤ C\nhA : A ≤ 0\n⊢ A * ‖f i‖ * ‖g i‖ < ε\n[PROOFSTEP]\nexact\n  (mul_nonpos_of_nonpos_of_nonneg (mul_nonpos_of_nonpos_of_nonneg hA <| norm_nonneg' _) <| norm_nonneg' _).trans_lt ε₀\n[GOAL]\ncase h.inr\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns : Set E\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nf : α → E\ng : α → F\nl : Filter α\nhf✝ : ∀ (ε : ℝ), ε > 0 → ∀ᶠ (x : α) in l, ‖f x‖ < ε\nop : E → F → G\nA : ℝ\nh_op : ∀ (x : E) (y : F), ‖op x y‖ ≤ A * ‖x‖ * ‖y‖\nC : ℝ\nhC : ∀ᶠ (a : α) in l, (fun x x_1 => x ≤ x_1) ((norm ∘ g) a) C\nε : ℝ\nε₀ : ε > 0\nδ : ℝ\nδ₀ : 0 < δ\nhδ : A * C * δ < ε\ni : α\nhf : ‖f i‖ < δ\nhg : (norm ∘ g) i ≤ C\nhA : 0 ≤ A\n⊢ A * ‖f i‖ * ‖g i‖ < ε\n[PROOFSTEP]\ncalc\n  A * ‖f i‖ * ‖g i‖ ≤ A * δ * C := by gcongr; exact hg\n  _ = A * C * δ := (mul_right_comm _ _ _)\n  _ < ε := hδ\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns : Set E\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nf : α → E\ng : α → F\nl : Filter α\nhf✝ : ∀ (ε : ℝ), ε > 0 → ∀ᶠ (x : α) in l, ‖f x‖ < ε\nop : E → F → G\nA : ℝ\nh_op : ∀ (x : E) (y : F), ‖op x y‖ ≤ A * ‖x‖ * ‖y‖\nC : ℝ\nhC : ∀ᶠ (a : α) in l, (fun x x_1 => x ≤ x_1) ((norm ∘ g) a) C\nε : ℝ\nε₀ : ε > 0\nδ : ℝ\nδ₀ : 0 < δ\nhδ : A * C * δ < ε\ni : α\nhf : ‖f i‖ < δ\nhg : (norm ∘ g) i ≤ C\nhA : 0 ≤ A\n⊢ A * ‖f i‖ * ‖g i‖ ≤ A * δ * C\n[PROOFSTEP]\ngcongr\n[GOAL]\ncase h₂\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns : Set E\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nf : α → E\ng : α → F\nl : Filter α\nhf✝ : ∀ (ε : ℝ), ε > 0 → ∀ᶠ (x : α) in l, ‖f x‖ < ε\nop : E → F → G\nA : ℝ\nh_op : ∀ (x : E) (y : F), ‖op x y‖ ≤ A * ‖x‖ * ‖y‖\nC : ℝ\nhC : ∀ᶠ (a : α) in l, (fun x x_1 => x ≤ x_1) ((norm ∘ g) a) C\nε : ℝ\nε₀ : ε > 0\nδ : ℝ\nδ₀ : 0 < δ\nhδ : A * C * δ < ε\ni : α\nhf : ‖f i‖ < δ\nhg : (norm ∘ g) i ≤ C\nhA : 0 ≤ A\n⊢ ‖g i‖ ≤ C\n[PROOFSTEP]\nexact hg\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns : Set E\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\n⊢ a ∈ closure s ↔ ∀ (ε : ℝ), 0 < ε → ∃ b, b ∈ s ∧ ‖a / b‖ < ε\n[PROOFSTEP]\nsimp [Metric.mem_closure_iff, dist_eq_norm_div]\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝³ : SeminormedGroup E\ninst✝² : SeminormedGroup F\ninst✝¹ : SeminormedGroup G\ns : Set E\na✝ a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\ninst✝ : T0Space E\na : E\n⊢ ‖a‖ ≤ 0 ↔ a = 1\n[PROOFSTEP]\nletI : NormedGroup E := { ‹SeminormedGroup E› with toMetricSpace := MetricSpace.ofT0PseudoMetricSpace E }\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝³ : SeminormedGroup E\ninst✝² : SeminormedGroup F\ninst✝¹ : SeminormedGroup G\ns : Set E\na✝ a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\ninst✝ : T0Space E\na : E\nthis : NormedGroup E :=\n  let src := inst✝³;\n  NormedGroup.mk\n⊢ ‖a‖ ≤ 0 ↔ a = 1\n[PROOFSTEP]\nrw [← dist_one_right, dist_le_zero]\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝³ : SeminormedGroup E\ninst✝² : SeminormedGroup F\ninst✝¹ : SeminormedGroup G\ns : Set E\na✝ a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\ninst✝ : T0Space E\na : E\n⊢ 0 < ‖a‖ ↔ a ≠ 1\n[PROOFSTEP]\nrw [← not_le, norm_le_zero_iff''']\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns✝ : Set E\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nf : ι → κ → G\ns : Set κ\nl : Filter ι\n⊢ TendstoUniformlyOn f 1 l s ↔ ∀ (ε : ℝ), ε > 0 → ∀ᶠ (i : ι) in l, ∀ (x : κ), x ∈ s → ‖f i x‖ < ε\n[PROOFSTEP]\nsimp_rw [tendstoUniformlyOn_iff, Pi.one_apply, dist_one_left]\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns : Set E\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nf : ι → κ → G\nl : Filter ι\nl' : Filter κ\n⊢ UniformCauchySeqOnFilter f l l' ↔ TendstoUniformlyOnFilter (fun n z => f n.fst z / f n.snd z) 1 (l ×ˢ l) l'\n[PROOFSTEP]\nrefine' ⟨fun hf u hu => _, fun hf u hu => _⟩\n[GOAL]\ncase refine'_1\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns : Set E\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nf : ι → κ → G\nl : Filter ι\nl' : Filter κ\nhf : UniformCauchySeqOnFilter f l l'\nu : Set (G × G)\nhu : u ∈ 𝓤 G\n⊢ ∀ᶠ (n : (ι × ι) × κ) in (l ×ˢ l) ×ˢ l', (OfNat.ofNat 1 n.snd, (fun n z => f n.fst z / f n.snd z) n.fst n.snd) ∈ u\n[PROOFSTEP]\nobtain ⟨ε, hε, H⟩ := uniformity_basis_dist.mem_uniformity_iff.mp hu\n[GOAL]\ncase refine'_1.intro.intro\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns : Set E\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nf : ι → κ → G\nl : Filter ι\nl' : Filter κ\nhf : UniformCauchySeqOnFilter f l l'\nu : Set (G × G)\nhu : u ∈ 𝓤 G\nε : ℝ\nhε : 0 < ε\nH : ∀ (a b : G), (a, b) ∈ {p | dist p.fst p.snd < ε} → (a, b) ∈ u\n⊢ ∀ᶠ (n : (ι × ι) × κ) in (l ×ˢ l) ×ˢ l', (OfNat.ofNat 1 n.snd, (fun n z => f n.fst z / f n.snd z) n.fst n.snd) ∈ u\n[PROOFSTEP]\nrefine'\n  (hf {p : G × G | dist p.fst p.snd < ε} <| dist_mem_uniformity hε).mono fun x hx =>\n    H 1 (f x.fst.fst x.snd / f x.fst.snd x.snd) _\n[GOAL]\ncase refine'_1.intro.intro\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns : Set E\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nf : ι → κ → G\nl : Filter ι\nl' : Filter κ\nhf : UniformCauchySeqOnFilter f l l'\nu : Set (G × G)\nhu : u ∈ 𝓤 G\nε : ℝ\nhε : 0 < ε\nH : ∀ (a b : G), (a, b) ∈ {p | dist p.fst p.snd < ε} → (a, b) ∈ u\nx : (ι × ι) × κ\nhx : (f x.fst.fst x.snd, f x.fst.snd x.snd) ∈ {p | dist p.fst p.snd < ε}\n⊢ (1, f x.fst.fst x.snd / f x.fst.snd x.snd) ∈ {p | dist p.fst p.snd < ε}\n[PROOFSTEP]\nsimpa [dist_eq_norm_div, norm_div_rev] using hx\n[GOAL]\ncase refine'_2\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns : Set E\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nf : ι → κ → G\nl : Filter ι\nl' : Filter κ\nhf : TendstoUniformlyOnFilter (fun n z => f n.fst z / f n.snd z) 1 (l ×ˢ l) l'\nu : Set (G × G)\nhu : u ∈ 𝓤 G\n⊢ ∀ᶠ (m : (ι × ι) × κ) in (l ×ˢ l) ×ˢ l', (f m.fst.fst m.snd, f m.fst.snd m.snd) ∈ u\n[PROOFSTEP]\nobtain ⟨ε, hε, H⟩ := uniformity_basis_dist.mem_uniformity_iff.mp hu\n[GOAL]\ncase refine'_2.intro.intro\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns : Set E\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nf : ι → κ → G\nl : Filter ι\nl' : Filter κ\nhf : TendstoUniformlyOnFilter (fun n z => f n.fst z / f n.snd z) 1 (l ×ˢ l) l'\nu : Set (G × G)\nhu : u ∈ 𝓤 G\nε : ℝ\nhε : 0 < ε\nH : ∀ (a b : G), (a, b) ∈ {p | dist p.fst p.snd < ε} → (a, b) ∈ u\n⊢ ∀ᶠ (m : (ι × ι) × κ) in (l ×ˢ l) ×ˢ l', (f m.fst.fst m.snd, f m.fst.snd m.snd) ∈ u\n[PROOFSTEP]\nrefine'\n  (hf {p : G × G | dist p.fst p.snd < ε} <| dist_mem_uniformity hε).mono fun x hx =>\n    H (f x.fst.fst x.snd) (f x.fst.snd x.snd) _\n[GOAL]\ncase refine'_2.intro.intro\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns : Set E\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nf : ι → κ → G\nl : Filter ι\nl' : Filter κ\nhf : TendstoUniformlyOnFilter (fun n z => f n.fst z / f n.snd z) 1 (l ×ˢ l) l'\nu : Set (G × G)\nhu : u ∈ 𝓤 G\nε : ℝ\nhε : 0 < ε\nH : ∀ (a b : G), (a, b) ∈ {p | dist p.fst p.snd < ε} → (a, b) ∈ u\nx : (ι × ι) × κ\nhx : (OfNat.ofNat 1 x.snd, (fun n z => f n.fst z / f n.snd z) x.fst x.snd) ∈ {p | dist p.fst p.snd < ε}\n⊢ (f x.fst.fst x.snd, f x.fst.snd x.snd) ∈ {p | dist p.fst p.snd < ε}\n[PROOFSTEP]\nsimpa [dist_eq_norm_div, norm_div_rev] using hx\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedGroup E\ninst✝¹ : SeminormedGroup F\ninst✝ : SeminormedGroup G\ns✝ : Set E\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nf : ι → κ → G\ns : Set κ\nl : Filter ι\n⊢ UniformCauchySeqOn f l s ↔ TendstoUniformlyOn (fun n z => f n.fst z / f n.snd z) 1 (l ×ˢ l) s\n[PROOFSTEP]\nrw [tendstoUniformlyOn_iff_tendstoUniformlyOnFilter, uniformCauchySeqOn_iff_uniformCauchySeqOnFilter,\n  SeminormedGroup.uniformCauchySeqOnFilter_iff_tendstoUniformlyOnFilter_one]\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : Group E\ninst✝¹ : SeminormedGroup F\ninst✝ : MonoidHomClass 𝓕 E F\nf : 𝓕\nsrc✝ : PseudoMetricSpace E := PseudoMetricSpace.induced (↑f) toPseudoMetricSpace\nx y : E\n⊢ dist x y = ‖x / y‖\n[PROOFSTEP]\nsimp only [map_div, ← dist_eq_norm_div]\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : Group E\ninst✝¹ : SeminormedGroup F\ninst✝ : MonoidHomClass 𝓕 E F\nf : 𝓕\nsrc✝ : PseudoMetricSpace E := PseudoMetricSpace.induced (↑f) toPseudoMetricSpace\nx y : E\n⊢ dist x y = dist (↑f x) (↑f y)\n[PROOFSTEP]\nrfl\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na✝ a₁ a₂ b✝ b₁ b₂ : E\nr r₁ r₂ : ℝ\na b c : E\n⊢ dist (a • b) (a • c) = dist b c\n[PROOFSTEP]\nsimp [dist_eq_norm_div]\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nx y : E\n⊢ dist x⁻¹ y = dist x y⁻¹\n[PROOFSTEP]\nsimp_rw [dist_eq_norm_div, ← norm_inv' (x⁻¹ / y), inv_div, div_inv_eq_mul, mul_comm]\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na✝ a₁ a₂ b✝ b₁ b₂ : E\nr r₁ r₂ : ℝ\na b : E\n⊢ dist a (a * b) = ‖b‖\n[PROOFSTEP]\nrw [← dist_one_left, ← dist_mul_left a 1 b, mul_one]\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na✝ a₁ a₂ b✝ b₁ b₂ : E\nr r₁ r₂ : ℝ\na b : E\n⊢ dist (a * b) a = ‖b‖\n[PROOFSTEP]\nrw [dist_comm, dist_self_mul_right]\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na✝ a₁ a₂ b✝ b₁ b₂ : E\nr r₁ r₂ : ℝ\na b : E\n⊢ dist a (a / b) = ‖b‖\n[PROOFSTEP]\nrw [div_eq_mul_inv, dist_self_mul_right, norm_inv']\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na✝ a₁ a₂ b✝ b₁ b₂ : E\nr r₁ r₂ : ℝ\na b : E\n⊢ dist (a / b) a = ‖b‖\n[PROOFSTEP]\nrw [dist_comm, dist_self_div_right]\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁✝ a₂✝ b b₁✝ b₂✝ : E\nr r₁ r₂ : ℝ\na₁ a₂ b₁ b₂ : E\n⊢ dist (a₁ * a₂) (b₁ * b₂) ≤ dist a₁ b₁ + dist a₂ b₂\n[PROOFSTEP]\nsimpa only [dist_mul_left, dist_mul_right] using dist_triangle (a₁ * a₂) (b₁ * a₂) (b₁ * b₂)\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁✝ a₂✝ b b₁✝ b₂✝ : E\nr r₁ r₂ : ℝ\na₁ a₂ b₁ b₂ : E\n⊢ dist (a₁ / a₂) (b₁ / b₂) ≤ dist a₁ b₁ + dist a₂ b₂\n[PROOFSTEP]\nsimpa only [div_eq_mul_inv, dist_inv_inv] using dist_mul_mul_le a₁ a₂⁻¹ b₁ b₂⁻¹\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁✝ a₂✝ b b₁✝ b₂✝ : E\nr r₁ r₂ : ℝ\na₁ a₂ b₁ b₂ : E\n⊢ |dist a₁ b₁ - dist a₂ b₂| ≤ dist (a₁ * a₂) (b₁ * b₂)\n[PROOFSTEP]\nsimpa only [dist_mul_left, dist_mul_right, dist_comm b₂] using abs_dist_sub_le (a₁ * a₂) (b₁ * b₂) (b₁ * a₂)\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nm : Multiset E\n⊢ ‖Multiset.prod m‖ ≤ Multiset.sum (Multiset.map (fun x => ‖x‖) m)\n[PROOFSTEP]\nrw [← Multiplicative.ofAdd_le, ofAdd_multiset_prod, Multiset.map_map]\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nm : Multiset E\n⊢ ↑Multiplicative.ofAdd ‖Multiset.prod m‖ ≤ Multiset.prod (Multiset.map (↑Multiplicative.ofAdd ∘ fun x => ‖x‖) m)\n[PROOFSTEP]\nrefine' Multiset.le_prod_of_submultiplicative (Multiplicative.ofAdd ∘ norm) _ (fun x y => _) _\n[GOAL]\ncase refine'_1\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nm : Multiset E\n⊢ (↑Multiplicative.ofAdd ∘ norm) 1 = 1\n[PROOFSTEP]\nsimp only [comp_apply, norm_one', ofAdd_zero]\n[GOAL]\ncase refine'_2\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nm : Multiset E\nx y : E\n⊢ (↑Multiplicative.ofAdd ∘ norm) (x * y) ≤ (↑Multiplicative.ofAdd ∘ norm) x * (↑Multiplicative.ofAdd ∘ norm) y\n[PROOFSTEP]\nexact norm_mul_le' x y\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\ns : Finset ι\nf : ι → E\n⊢ ‖∏ i in s, f i‖ ≤ ∑ i in s, ‖f i‖\n[PROOFSTEP]\nrw [← Multiplicative.ofAdd_le, ofAdd_sum]\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\ns : Finset ι\nf : ι → E\n⊢ ↑Multiplicative.ofAdd ‖∏ i in s, f i‖ ≤ ∏ i in s, ↑Multiplicative.ofAdd ‖f i‖\n[PROOFSTEP]\nrefine' Finset.le_prod_of_submultiplicative (Multiplicative.ofAdd ∘ norm) _ (fun x y => _) _ _\n[GOAL]\ncase refine'_1\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\ns : Finset ι\nf : ι → E\n⊢ (↑Multiplicative.ofAdd ∘ norm) 1 = 1\n[PROOFSTEP]\nsimp only [comp_apply, norm_one', ofAdd_zero]\n[GOAL]\ncase refine'_2\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\ns : Finset ι\nf : ι → E\nx y : E\n⊢ (↑Multiplicative.ofAdd ∘ norm) (x * y) ≤ (↑Multiplicative.ofAdd ∘ norm) x * (↑Multiplicative.ofAdd ∘ norm) y\n[PROOFSTEP]\nexact norm_mul_le' x y\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na✝ a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\ns : Finset ι\nf a : ι → E\nd : ι → ℝ\nh : ∀ (b : ι), b ∈ s → dist (f b) (a b) ≤ d b\n⊢ dist (∏ b in s, f b) (∏ b in s, a b) ≤ ∑ b in s, d b\n[PROOFSTEP]\nsimp only [dist_eq_norm_div, ← Finset.prod_div_distrib] at *\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na✝ a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\ns : Finset ι\nf a : ι → E\nd : ι → ℝ\nh : ∀ (b : ι), b ∈ s → ‖f b / a b‖ ≤ d b\n⊢ ‖∏ x in s, f x / a x‖ ≤ ∑ b in s, d b\n[PROOFSTEP]\nexact norm_prod_le_of_le s h\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\n⊢ a * b ∈ ball a r ↔ ‖b‖ < r\n[PROOFSTEP]\nrw [mem_ball_iff_norm'', mul_div_cancel''']\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\n⊢ a * b ∈ closedBall a r ↔ ‖b‖ ≤ r\n[PROOFSTEP]\nrw [mem_closedBall_iff_norm'', mul_div_cancel''']\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na✝ a₁ a₂ b✝ b₁ b₂ : E\nr✝ r₁ r₂ : ℝ\na b : E\nr : ℝ\n⊢ (fun x x_1 => x * x_1) b ⁻¹' ball a r = ball (a / b) r\n[PROOFSTEP]\next c\n[GOAL]\ncase h\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na✝ a₁ a₂ b✝ b₁ b₂ : E\nr✝ r₁ r₂ : ℝ\na b : E\nr : ℝ\nc : E\n⊢ c ∈ (fun x x_1 => x * x_1) b ⁻¹' ball a r ↔ c ∈ ball (a / b) r\n[PROOFSTEP]\nsimp only [dist_eq_norm_div, Set.mem_preimage, mem_ball, div_div_eq_mul_div, mul_comm]\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na✝ a₁ a₂ b✝ b₁ b₂ : E\nr✝ r₁ r₂ : ℝ\na b : E\nr : ℝ\n⊢ (fun x x_1 => x * x_1) b ⁻¹' closedBall a r = closedBall (a / b) r\n[PROOFSTEP]\next c\n[GOAL]\ncase h\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na✝ a₁ a₂ b✝ b₁ b₂ : E\nr✝ r₁ r₂ : ℝ\na b : E\nr : ℝ\nc : E\n⊢ c ∈ (fun x x_1 => x * x_1) b ⁻¹' closedBall a r ↔ c ∈ closedBall (a / b) r\n[PROOFSTEP]\nsimp only [dist_eq_norm_div, Set.mem_preimage, mem_closedBall, div_div_eq_mul_div, mul_comm]\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na✝ a₁ a₂ b✝ b₁ b₂ : E\nr✝ r₁ r₂ : ℝ\na b : E\nr : ℝ\n⊢ (fun x x_1 => x * x_1) b ⁻¹' sphere a r = sphere (a / b) r\n[PROOFSTEP]\next c\n[GOAL]\ncase h\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na✝ a₁ a₂ b✝ b₁ b₂ : E\nr✝ r₁ r₂ : ℝ\na b : E\nr : ℝ\nc : E\n⊢ c ∈ (fun x x_1 => x * x_1) b ⁻¹' sphere a r ↔ c ∈ sphere (a / b) r\n[PROOFSTEP]\nsimp only [Set.mem_preimage, mem_sphere_iff_norm', div_div_eq_mul_div, mul_comm]\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na✝ a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nn : ℕ\na : E\n⊢ ‖a ^ n‖ ≤ ↑n * ‖a‖\n[PROOFSTEP]\ninduction' n with n ih\n[GOAL]\ncase zero\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na✝ a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\na : E\n⊢ ‖a ^ Nat.zero‖ ≤ ↑Nat.zero * ‖a‖\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na✝ a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\na : E\nn : ℕ\nih : ‖a ^ n‖ ≤ ↑n * ‖a‖\n⊢ ‖a ^ Nat.succ n‖ ≤ ↑(Nat.succ n) * ‖a‖\n[PROOFSTEP]\nsimpa only [pow_succ', Nat.cast_succ, add_mul, one_mul] using norm_mul_le_of_le ih le_rfl\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na✝ a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nn : ℕ\na : E\n⊢ ‖a ^ n‖₊ ≤ ↑n * ‖a‖₊\n[PROOFSTEP]\nsimpa only [← NNReal.coe_le_coe, NNReal.coe_mul, NNReal.coe_nat_cast] using norm_pow_le_mul_norm n a\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nn : ℕ\nh : a ∈ closedBall b r\n⊢ a ^ n ∈ closedBall (b ^ n) (n • r)\n[PROOFSTEP]\nsimp only [mem_closedBall, dist_eq_norm_div, ← div_pow] at h ⊢\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nn : ℕ\nh : ‖a / b‖ ≤ r\n⊢ ‖(a / b) ^ n‖ ≤ n • r\n[PROOFSTEP]\nrefine' (norm_pow_le_mul_norm n (a / b)).trans _\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nn : ℕ\nh : ‖a / b‖ ≤ r\n⊢ ↑n * ‖a / b‖ ≤ n • r\n[PROOFSTEP]\nsimpa only [nsmul_eq_mul] using mul_le_mul_of_nonneg_left h n.cast_nonneg\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nn : ℕ\nhn : 0 < n\nh : a ∈ ball b r\n⊢ a ^ n ∈ ball (b ^ n) (n • r)\n[PROOFSTEP]\nsimp only [mem_ball, dist_eq_norm_div, ← div_pow] at h ⊢\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nn : ℕ\nhn : 0 < n\nh : ‖a / b‖ < r\n⊢ ‖(a / b) ^ n‖ < n • r\n[PROOFSTEP]\nrefine' lt_of_le_of_lt (norm_pow_le_mul_norm n (a / b)) _\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nn : ℕ\nhn : 0 < n\nh : ‖a / b‖ < r\n⊢ ↑n * ‖a / b‖ < n • r\n[PROOFSTEP]\nreplace hn : 0 < (n : ℝ)\n[GOAL]\ncase hn\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nn : ℕ\nhn : 0 < n\nh : ‖a / b‖ < r\n⊢ 0 < ↑n\n[PROOFSTEP]\nnorm_cast\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nn : ℕ\nh : ‖a / b‖ < r\nhn : 0 < ↑n\n⊢ ↑n * ‖a / b‖ < n • r\n[PROOFSTEP]\nrw [nsmul_eq_mul]\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nn : ℕ\nh : ‖a / b‖ < r\nhn : 0 < ↑n\n⊢ ↑n * ‖a / b‖ < ↑n * r\n[PROOFSTEP]\nnlinarith\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nc : E\n⊢ a * c ∈ closedBall (b * c) r ↔ a ∈ closedBall b r\n[PROOFSTEP]\nsimp only [mem_closedBall, dist_eq_norm_div, mul_div_mul_right_eq_div]\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nc : E\n⊢ a * c ∈ ball (b * c) r ↔ a ∈ ball b r\n[PROOFSTEP]\nsimp only [mem_ball, dist_eq_norm_div, mul_div_mul_right_eq_div]\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\n⊢ a • closedBall b r = closedBall (a • b) r\n[PROOFSTEP]\next\n[GOAL]\ncase h\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nx✝ : E\n⊢ x✝ ∈ a • closedBall b r ↔ x✝ ∈ closedBall (a • b) r\n[PROOFSTEP]\nsimp [mem_closedBall, Set.mem_smul_set, dist_eq_norm_div, _root_.div_eq_inv_mul, ← eq_inv_mul_iff_mul_eq, mul_assoc]\n  -- porting note: `ENNReal.div_eq_inv_mul` should be `protected`?\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\n⊢ a • ball b r = ball (a • b) r\n[PROOFSTEP]\next\n[GOAL]\ncase h\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nx✝ : E\n⊢ x✝ ∈ a • ball b r ↔ x✝ ∈ ball (a • b) r\n[PROOFSTEP]\nsimp [mem_ball, Set.mem_smul_set, dist_eq_norm_div, _root_.div_eq_inv_mul, ← eq_inv_mul_iff_mul_eq, mul_assoc]\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁ a₂ b✝ b₁ b₂ : E\nr r₁ r₂ : ℝ\ns : Subgroup E\nhg : a ∈ closure ↑s\nb : ℕ → ℝ\nb_pos : ∀ (n : ℕ), 0 < b n\n⊢ ∃ v,\n    Tendsto (fun n => ∏ i in range (n + 1), v i) atTop (𝓝 a) ∧\n      (∀ (n : ℕ), v n ∈ s) ∧ ‖v 0 / a‖ < b 0 ∧ ∀ (n : ℕ), 0 < n → ‖v n‖ < b n\n[PROOFSTEP]\nobtain ⟨u : ℕ → E, u_in : ∀ n, u n ∈ s, lim_u : Tendsto u atTop (𝓝 a)⟩ := mem_closure_iff_seq_limit.mp hg\n[GOAL]\ncase intro.intro\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁ a₂ b✝ b₁ b₂ : E\nr r₁ r₂ : ℝ\ns : Subgroup E\nhg : a ∈ closure ↑s\nb : ℕ → ℝ\nb_pos : ∀ (n : ℕ), 0 < b n\nu : ℕ → E\nu_in : ∀ (n : ℕ), u n ∈ s\nlim_u : Tendsto u atTop (𝓝 a)\n⊢ ∃ v,\n    Tendsto (fun n => ∏ i in range (n + 1), v i) atTop (𝓝 a) ∧\n      (∀ (n : ℕ), v n ∈ s) ∧ ‖v 0 / a‖ < b 0 ∧ ∀ (n : ℕ), 0 < n → ‖v n‖ < b n\n[PROOFSTEP]\nobtain ⟨n₀, hn₀⟩ : ∃ n₀, ∀ n ≥ n₀, ‖u n / a‖ < b 0 :=\n  haveI : {x | ‖x / a‖ < b 0} ∈ 𝓝 a := by\n    simp_rw [← dist_eq_norm_div]\n    exact Metric.ball_mem_nhds _ (b_pos _)\n  Filter.tendsto_atTop'.mp lim_u _ this\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁ a₂ b✝ b₁ b₂ : E\nr r₁ r₂ : ℝ\ns : Subgroup E\nhg : a ∈ closure ↑s\nb : ℕ → ℝ\nb_pos : ∀ (n : ℕ), 0 < b n\nu : ℕ → E\nu_in : ∀ (n : ℕ), u n ∈ s\nlim_u : Tendsto u atTop (𝓝 a)\n⊢ {x | ‖x / a‖ < b 0} ∈ 𝓝 a\n[PROOFSTEP]\nsimp_rw [← dist_eq_norm_div]\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁ a₂ b✝ b₁ b₂ : E\nr r₁ r₂ : ℝ\ns : Subgroup E\nhg : a ∈ closure ↑s\nb : ℕ → ℝ\nb_pos : ∀ (n : ℕ), 0 < b n\nu : ℕ → E\nu_in : ∀ (n : ℕ), u n ∈ s\nlim_u : Tendsto u atTop (𝓝 a)\n⊢ {x | dist x a < b 0} ∈ 𝓝 a\n[PROOFSTEP]\nexact Metric.ball_mem_nhds _ (b_pos _)\n[GOAL]\ncase intro.intro.intro\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁ a₂ b✝ b₁ b₂ : E\nr r₁ r₂ : ℝ\ns : Subgroup E\nhg : a ∈ closure ↑s\nb : ℕ → ℝ\nb_pos : ∀ (n : ℕ), 0 < b n\nu : ℕ → E\nu_in : ∀ (n : ℕ), u n ∈ s\nlim_u : Tendsto u atTop (𝓝 a)\nn₀ : ℕ\nhn₀ : ∀ (n : ℕ), n ≥ n₀ → ‖u n / a‖ < b 0\n⊢ ∃ v,\n    Tendsto (fun n => ∏ i in range (n + 1), v i) atTop (𝓝 a) ∧\n      (∀ (n : ℕ), v n ∈ s) ∧ ‖v 0 / a‖ < b 0 ∧ ∀ (n : ℕ), 0 < n → ‖v n‖ < b n\n[PROOFSTEP]\nset z : ℕ → E := fun n => u (n + n₀)\n[GOAL]\ncase intro.intro.intro\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁ a₂ b✝ b₁ b₂ : E\nr r₁ r₂ : ℝ\ns : Subgroup E\nhg : a ∈ closure ↑s\nb : ℕ → ℝ\nb_pos : ∀ (n : ℕ), 0 < b n\nu : ℕ → E\nu_in : ∀ (n : ℕ), u n ∈ s\nlim_u : Tendsto u atTop (𝓝 a)\nn₀ : ℕ\nhn₀ : ∀ (n : ℕ), n ≥ n₀ → ‖u n / a‖ < b 0\nz : ℕ → E := fun n => u (n + n₀)\n⊢ ∃ v,\n    Tendsto (fun n => ∏ i in range (n + 1), v i) atTop (𝓝 a) ∧\n      (∀ (n : ℕ), v n ∈ s) ∧ ‖v 0 / a‖ < b 0 ∧ ∀ (n : ℕ), 0 < n → ‖v n‖ < b n\n[PROOFSTEP]\nhave lim_z : Tendsto z atTop (𝓝 a) := lim_u.comp (tendsto_add_atTop_nat n₀)\n[GOAL]\ncase intro.intro.intro\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁ a₂ b✝ b₁ b₂ : E\nr r₁ r₂ : ℝ\ns : Subgroup E\nhg : a ∈ closure ↑s\nb : ℕ → ℝ\nb_pos : ∀ (n : ℕ), 0 < b n\nu : ℕ → E\nu_in : ∀ (n : ℕ), u n ∈ s\nlim_u : Tendsto u atTop (𝓝 a)\nn₀ : ℕ\nhn₀ : ∀ (n : ℕ), n ≥ n₀ → ‖u n / a‖ < b 0\nz : ℕ → E := fun n => u (n + n₀)\nlim_z : Tendsto z atTop (𝓝 a)\n⊢ ∃ v,\n    Tendsto (fun n => ∏ i in range (n + 1), v i) atTop (𝓝 a) ∧\n      (∀ (n : ℕ), v n ∈ s) ∧ ‖v 0 / a‖ < b 0 ∧ ∀ (n : ℕ), 0 < n → ‖v n‖ < b n\n[PROOFSTEP]\nhave mem_𝓤 : ∀ n, {p : E × E | ‖p.1 / p.2‖ < b (n + 1)} ∈ 𝓤 E := fun n => by\n  simpa [← dist_eq_norm_div] using Metric.dist_mem_uniformity (b_pos <| n + 1)\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁ a₂ b✝ b₁ b₂ : E\nr r₁ r₂ : ℝ\ns : Subgroup E\nhg : a ∈ closure ↑s\nb : ℕ → ℝ\nb_pos : ∀ (n : ℕ), 0 < b n\nu : ℕ → E\nu_in : ∀ (n : ℕ), u n ∈ s\nlim_u : Tendsto u atTop (𝓝 a)\nn₀ : ℕ\nhn₀ : ∀ (n : ℕ), n ≥ n₀ → ‖u n / a‖ < b 0\nz : ℕ → E := fun n => u (n + n₀)\nlim_z : Tendsto z atTop (𝓝 a)\nn : ℕ\n⊢ {p | ‖p.fst / p.snd‖ < b (n + 1)} ∈ 𝓤 E\n[PROOFSTEP]\nsimpa [← dist_eq_norm_div] using Metric.dist_mem_uniformity (b_pos <| n + 1)\n[GOAL]\ncase intro.intro.intro\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁ a₂ b✝ b₁ b₂ : E\nr r₁ r₂ : ℝ\ns : Subgroup E\nhg : a ∈ closure ↑s\nb : ℕ → ℝ\nb_pos : ∀ (n : ℕ), 0 < b n\nu : ℕ → E\nu_in : ∀ (n : ℕ), u n ∈ s\nlim_u : Tendsto u atTop (𝓝 a)\nn₀ : ℕ\nhn₀ : ∀ (n : ℕ), n ≥ n₀ → ‖u n / a‖ < b 0\nz : ℕ → E := fun n => u (n + n₀)\nlim_z : Tendsto z atTop (𝓝 a)\nmem_𝓤 : ∀ (n : ℕ), {p | ‖p.fst / p.snd‖ < b (n + 1)} ∈ 𝓤 E\n⊢ ∃ v,\n    Tendsto (fun n => ∏ i in range (n + 1), v i) atTop (𝓝 a) ∧\n      (∀ (n : ℕ), v n ∈ s) ∧ ‖v 0 / a‖ < b 0 ∧ ∀ (n : ℕ), 0 < n → ‖v n‖ < b n\n[PROOFSTEP]\nobtain ⟨φ : ℕ → ℕ, φ_extr : StrictMono φ, hφ : ∀ n, ‖z (φ <| n + 1) / z (φ n)‖ < b (n + 1)⟩ :=\n  lim_z.cauchySeq.subseq_mem mem_𝓤\n[GOAL]\ncase intro.intro.intro.intro.intro\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁ a₂ b✝ b₁ b₂ : E\nr r₁ r₂ : ℝ\ns : Subgroup E\nhg : a ∈ closure ↑s\nb : ℕ → ℝ\nb_pos : ∀ (n : ℕ), 0 < b n\nu : ℕ → E\nu_in : ∀ (n : ℕ), u n ∈ s\nlim_u : Tendsto u atTop (𝓝 a)\nn₀ : ℕ\nhn₀ : ∀ (n : ℕ), n ≥ n₀ → ‖u n / a‖ < b 0\nz : ℕ → E := fun n => u (n + n₀)\nlim_z : Tendsto z atTop (𝓝 a)\nmem_𝓤 : ∀ (n : ℕ), {p | ‖p.fst / p.snd‖ < b (n + 1)} ∈ 𝓤 E\nφ : ℕ → ℕ\nφ_extr : StrictMono φ\nhφ : ∀ (n : ℕ), ‖z (φ (n + 1)) / z (φ n)‖ < b (n + 1)\n⊢ ∃ v,\n    Tendsto (fun n => ∏ i in range (n + 1), v i) atTop (𝓝 a) ∧\n      (∀ (n : ℕ), v n ∈ s) ∧ ‖v 0 / a‖ < b 0 ∧ ∀ (n : ℕ), 0 < n → ‖v n‖ < b n\n[PROOFSTEP]\nset w : ℕ → E := z ∘ φ\n[GOAL]\ncase intro.intro.intro.intro.intro\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁ a₂ b✝ b₁ b₂ : E\nr r₁ r₂ : ℝ\ns : Subgroup E\nhg : a ∈ closure ↑s\nb : ℕ → ℝ\nb_pos : ∀ (n : ℕ), 0 < b n\nu : ℕ → E\nu_in : ∀ (n : ℕ), u n ∈ s\nlim_u : Tendsto u atTop (𝓝 a)\nn₀ : ℕ\nhn₀ : ∀ (n : ℕ), n ≥ n₀ → ‖u n / a‖ < b 0\nz : ℕ → E := fun n => u (n + n₀)\nlim_z : Tendsto z atTop (𝓝 a)\nmem_𝓤 : ∀ (n : ℕ), {p | ‖p.fst / p.snd‖ < b (n + 1)} ∈ 𝓤 E\nφ : ℕ → ℕ\nφ_extr : StrictMono φ\nhφ : ∀ (n : ℕ), ‖z (φ (n + 1)) / z (φ n)‖ < b (n + 1)\nw : ℕ → E := z ∘ φ\n⊢ ∃ v,\n    Tendsto (fun n => ∏ i in range (n + 1), v i) atTop (𝓝 a) ∧\n      (∀ (n : ℕ), v n ∈ s) ∧ ‖v 0 / a‖ < b 0 ∧ ∀ (n : ℕ), 0 < n → ‖v n‖ < b n\n[PROOFSTEP]\nhave hw : Tendsto w atTop (𝓝 a) := lim_z.comp φ_extr.tendsto_atTop\n[GOAL]\ncase intro.intro.intro.intro.intro\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁ a₂ b✝ b₁ b₂ : E\nr r₁ r₂ : ℝ\ns : Subgroup E\nhg : a ∈ closure ↑s\nb : ℕ → ℝ\nb_pos : ∀ (n : ℕ), 0 < b n\nu : ℕ → E\nu_in : ∀ (n : ℕ), u n ∈ s\nlim_u : Tendsto u atTop (𝓝 a)\nn₀ : ℕ\nhn₀ : ∀ (n : ℕ), n ≥ n₀ → ‖u n / a‖ < b 0\nz : ℕ → E := fun n => u (n + n₀)\nlim_z : Tendsto z atTop (𝓝 a)\nmem_𝓤 : ∀ (n : ℕ), {p | ‖p.fst / p.snd‖ < b (n + 1)} ∈ 𝓤 E\nφ : ℕ → ℕ\nφ_extr : StrictMono φ\nhφ : ∀ (n : ℕ), ‖z (φ (n + 1)) / z (φ n)‖ < b (n + 1)\nw : ℕ → E := z ∘ φ\nhw : Tendsto w atTop (𝓝 a)\n⊢ ∃ v,\n    Tendsto (fun n => ∏ i in range (n + 1), v i) atTop (𝓝 a) ∧\n      (∀ (n : ℕ), v n ∈ s) ∧ ‖v 0 / a‖ < b 0 ∧ ∀ (n : ℕ), 0 < n → ‖v n‖ < b n\n[PROOFSTEP]\nset v : ℕ → E := fun i => if i = 0 then w 0 else w i / w (i - 1)\n[GOAL]\ncase intro.intro.intro.intro.intro\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁ a₂ b✝ b₁ b₂ : E\nr r₁ r₂ : ℝ\ns : Subgroup E\nhg : a ∈ closure ↑s\nb : ℕ → ℝ\nb_pos : ∀ (n : ℕ), 0 < b n\nu : ℕ → E\nu_in : ∀ (n : ℕ), u n ∈ s\nlim_u : Tendsto u atTop (𝓝 a)\nn₀ : ℕ\nhn₀ : ∀ (n : ℕ), n ≥ n₀ → ‖u n / a‖ < b 0\nz : ℕ → E := fun n => u (n + n₀)\nlim_z : Tendsto z atTop (𝓝 a)\nmem_𝓤 : ∀ (n : ℕ), {p | ‖p.fst / p.snd‖ < b (n + 1)} ∈ 𝓤 E\nφ : ℕ → ℕ\nφ_extr : StrictMono φ\nhφ : ∀ (n : ℕ), ‖z (φ (n + 1)) / z (φ n)‖ < b (n + 1)\nw : ℕ → E := z ∘ φ\nhw : Tendsto w atTop (𝓝 a)\nv : ℕ → E := fun i => if i = 0 then w 0 else w i / w (i - 1)\n⊢ ∃ v,\n    Tendsto (fun n => ∏ i in range (n + 1), v i) atTop (𝓝 a) ∧\n      (∀ (n : ℕ), v n ∈ s) ∧ ‖v 0 / a‖ < b 0 ∧ ∀ (n : ℕ), 0 < n → ‖v n‖ < b n\n[PROOFSTEP]\nrefine' ⟨v, Tendsto.congr (Finset.eq_prod_range_div' w) hw, _, hn₀ _ (n₀.le_add_left _), _⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.refine'_1\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁ a₂ b✝ b₁ b₂ : E\nr r₁ r₂ : ℝ\ns : Subgroup E\nhg : a ∈ closure ↑s\nb : ℕ → ℝ\nb_pos : ∀ (n : ℕ), 0 < b n\nu : ℕ → E\nu_in : ∀ (n : ℕ), u n ∈ s\nlim_u : Tendsto u atTop (𝓝 a)\nn₀ : ℕ\nhn₀ : ∀ (n : ℕ), n ≥ n₀ → ‖u n / a‖ < b 0\nz : ℕ → E := fun n => u (n + n₀)\nlim_z : Tendsto z atTop (𝓝 a)\nmem_𝓤 : ∀ (n : ℕ), {p | ‖p.fst / p.snd‖ < b (n + 1)} ∈ 𝓤 E\nφ : ℕ → ℕ\nφ_extr : StrictMono φ\nhφ : ∀ (n : ℕ), ‖z (φ (n + 1)) / z (φ n)‖ < b (n + 1)\nw : ℕ → E := z ∘ φ\nhw : Tendsto w atTop (𝓝 a)\nv : ℕ → E := fun i => if i = 0 then w 0 else w i / w (i - 1)\n⊢ ∀ (n : ℕ), v n ∈ s\n[PROOFSTEP]\nrintro ⟨⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.refine'_1.zero\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁ a₂ b✝ b₁ b₂ : E\nr r₁ r₂ : ℝ\ns : Subgroup E\nhg : a ∈ closure ↑s\nb : ℕ → ℝ\nb_pos : ∀ (n : ℕ), 0 < b n\nu : ℕ → E\nu_in : ∀ (n : ℕ), u n ∈ s\nlim_u : Tendsto u atTop (𝓝 a)\nn₀ : ℕ\nhn₀ : ∀ (n : ℕ), n ≥ n₀ → ‖u n / a‖ < b 0\nz : ℕ → E := fun n => u (n + n₀)\nlim_z : Tendsto z atTop (𝓝 a)\nmem_𝓤 : ∀ (n : ℕ), {p | ‖p.fst / p.snd‖ < b (n + 1)} ∈ 𝓤 E\nφ : ℕ → ℕ\nφ_extr : StrictMono φ\nhφ : ∀ (n : ℕ), ‖z (φ (n + 1)) / z (φ n)‖ < b (n + 1)\nw : ℕ → E := z ∘ φ\nhw : Tendsto w atTop (𝓝 a)\nv : ℕ → E := fun i => if i = 0 then w 0 else w i / w (i - 1)\n⊢ v Nat.zero ∈ s\n[PROOFSTEP]\nchange w 0 ∈ s\n[GOAL]\ncase intro.intro.intro.intro.intro.refine'_1.zero\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁ a₂ b✝ b₁ b₂ : E\nr r₁ r₂ : ℝ\ns : Subgroup E\nhg : a ∈ closure ↑s\nb : ℕ → ℝ\nb_pos : ∀ (n : ℕ), 0 < b n\nu : ℕ → E\nu_in : ∀ (n : ℕ), u n ∈ s\nlim_u : Tendsto u atTop (𝓝 a)\nn₀ : ℕ\nhn₀ : ∀ (n : ℕ), n ≥ n₀ → ‖u n / a‖ < b 0\nz : ℕ → E := fun n => u (n + n₀)\nlim_z : Tendsto z atTop (𝓝 a)\nmem_𝓤 : ∀ (n : ℕ), {p | ‖p.fst / p.snd‖ < b (n + 1)} ∈ 𝓤 E\nφ : ℕ → ℕ\nφ_extr : StrictMono φ\nhφ : ∀ (n : ℕ), ‖z (φ (n + 1)) / z (φ n)‖ < b (n + 1)\nw : ℕ → E := z ∘ φ\nhw : Tendsto w atTop (𝓝 a)\nv : ℕ → E := fun i => if i = 0 then w 0 else w i / w (i - 1)\n⊢ w 0 ∈ s\n[PROOFSTEP]\napply u_in\n[GOAL]\ncase intro.intro.intro.intro.intro.refine'_1.succ\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁ a₂ b✝ b₁ b₂ : E\nr r₁ r₂ : ℝ\ns : Subgroup E\nhg : a ∈ closure ↑s\nb : ℕ → ℝ\nb_pos : ∀ (n : ℕ), 0 < b n\nu : ℕ → E\nu_in : ∀ (n : ℕ), u n ∈ s\nlim_u : Tendsto u atTop (𝓝 a)\nn₀ : ℕ\nhn₀ : ∀ (n : ℕ), n ≥ n₀ → ‖u n / a‖ < b 0\nz : ℕ → E := fun n => u (n + n₀)\nlim_z : Tendsto z atTop (𝓝 a)\nmem_𝓤 : ∀ (n : ℕ), {p | ‖p.fst / p.snd‖ < b (n + 1)} ∈ 𝓤 E\nφ : ℕ → ℕ\nφ_extr : StrictMono φ\nhφ : ∀ (n : ℕ), ‖z (φ (n + 1)) / z (φ n)‖ < b (n + 1)\nw : ℕ → E := z ∘ φ\nhw : Tendsto w atTop (𝓝 a)\nv : ℕ → E := fun i => if i = 0 then w 0 else w i / w (i - 1)\nn✝ : ℕ\n⊢ v (Nat.succ n✝) ∈ s\n[PROOFSTEP]\napply s.div_mem\n[GOAL]\ncase intro.intro.intro.intro.intro.refine'_1.succ.hx\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁ a₂ b✝ b₁ b₂ : E\nr r₁ r₂ : ℝ\ns : Subgroup E\nhg : a ∈ closure ↑s\nb : ℕ → ℝ\nb_pos : ∀ (n : ℕ), 0 < b n\nu : ℕ → E\nu_in : ∀ (n : ℕ), u n ∈ s\nlim_u : Tendsto u atTop (𝓝 a)\nn₀ : ℕ\nhn₀ : ∀ (n : ℕ), n ≥ n₀ → ‖u n / a‖ < b 0\nz : ℕ → E := fun n => u (n + n₀)\nlim_z : Tendsto z atTop (𝓝 a)\nmem_𝓤 : ∀ (n : ℕ), {p | ‖p.fst / p.snd‖ < b (n + 1)} ∈ 𝓤 E\nφ : ℕ → ℕ\nφ_extr : StrictMono φ\nhφ : ∀ (n : ℕ), ‖z (φ (n + 1)) / z (φ n)‖ < b (n + 1)\nw : ℕ → E := z ∘ φ\nhw : Tendsto w atTop (𝓝 a)\nv : ℕ → E := fun i => if i = 0 then w 0 else w i / w (i - 1)\nn✝ : ℕ\n⊢ w (Nat.succ n✝) ∈ s\n[PROOFSTEP]\napply u_in\n[GOAL]\ncase intro.intro.intro.intro.intro.refine'_1.succ.hy\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁ a₂ b✝ b₁ b₂ : E\nr r₁ r₂ : ℝ\ns : Subgroup E\nhg : a ∈ closure ↑s\nb : ℕ → ℝ\nb_pos : ∀ (n : ℕ), 0 < b n\nu : ℕ → E\nu_in : ∀ (n : ℕ), u n ∈ s\nlim_u : Tendsto u atTop (𝓝 a)\nn₀ : ℕ\nhn₀ : ∀ (n : ℕ), n ≥ n₀ → ‖u n / a‖ < b 0\nz : ℕ → E := fun n => u (n + n₀)\nlim_z : Tendsto z atTop (𝓝 a)\nmem_𝓤 : ∀ (n : ℕ), {p | ‖p.fst / p.snd‖ < b (n + 1)} ∈ 𝓤 E\nφ : ℕ → ℕ\nφ_extr : StrictMono φ\nhφ : ∀ (n : ℕ), ‖z (φ (n + 1)) / z (φ n)‖ < b (n + 1)\nw : ℕ → E := z ∘ φ\nhw : Tendsto w atTop (𝓝 a)\nv : ℕ → E := fun i => if i = 0 then w 0 else w i / w (i - 1)\nn✝ : ℕ\n⊢ w (Nat.succ n✝ - 1) ∈ s\n[PROOFSTEP]\napply u_in\n[GOAL]\ncase intro.intro.intro.intro.intro.refine'_2\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁ a₂ b✝ b₁ b₂ : E\nr r₁ r₂ : ℝ\ns : Subgroup E\nhg : a ∈ closure ↑s\nb : ℕ → ℝ\nb_pos : ∀ (n : ℕ), 0 < b n\nu : ℕ → E\nu_in : ∀ (n : ℕ), u n ∈ s\nlim_u : Tendsto u atTop (𝓝 a)\nn₀ : ℕ\nhn₀ : ∀ (n : ℕ), n ≥ n₀ → ‖u n / a‖ < b 0\nz : ℕ → E := fun n => u (n + n₀)\nlim_z : Tendsto z atTop (𝓝 a)\nmem_𝓤 : ∀ (n : ℕ), {p | ‖p.fst / p.snd‖ < b (n + 1)} ∈ 𝓤 E\nφ : ℕ → ℕ\nφ_extr : StrictMono φ\nhφ : ∀ (n : ℕ), ‖z (φ (n + 1)) / z (φ n)‖ < b (n + 1)\nw : ℕ → E := z ∘ φ\nhw : Tendsto w atTop (𝓝 a)\nv : ℕ → E := fun i => if i = 0 then w 0 else w i / w (i - 1)\n⊢ ∀ (n : ℕ), 0 < n → ‖v n‖ < b n\n[PROOFSTEP]\nintro l hl\n[GOAL]\ncase intro.intro.intro.intro.intro.refine'_2\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁ a₂ b✝ b₁ b₂ : E\nr r₁ r₂ : ℝ\ns : Subgroup E\nhg : a ∈ closure ↑s\nb : ℕ → ℝ\nb_pos : ∀ (n : ℕ), 0 < b n\nu : ℕ → E\nu_in : ∀ (n : ℕ), u n ∈ s\nlim_u : Tendsto u atTop (𝓝 a)\nn₀ : ℕ\nhn₀ : ∀ (n : ℕ), n ≥ n₀ → ‖u n / a‖ < b 0\nz : ℕ → E := fun n => u (n + n₀)\nlim_z : Tendsto z atTop (𝓝 a)\nmem_𝓤 : ∀ (n : ℕ), {p | ‖p.fst / p.snd‖ < b (n + 1)} ∈ 𝓤 E\nφ : ℕ → ℕ\nφ_extr : StrictMono φ\nhφ : ∀ (n : ℕ), ‖z (φ (n + 1)) / z (φ n)‖ < b (n + 1)\nw : ℕ → E := z ∘ φ\nhw : Tendsto w atTop (𝓝 a)\nv : ℕ → E := fun i => if i = 0 then w 0 else w i / w (i - 1)\nl : ℕ\nhl : 0 < l\n⊢ ‖v l‖ < b l\n[PROOFSTEP]\nobtain ⟨k, rfl⟩ : ∃ k, l = k + 1\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁ a₂ b✝ b₁ b₂ : E\nr r₁ r₂ : ℝ\ns : Subgroup E\nhg : a ∈ closure ↑s\nb : ℕ → ℝ\nb_pos : ∀ (n : ℕ), 0 < b n\nu : ℕ → E\nu_in : ∀ (n : ℕ), u n ∈ s\nlim_u : Tendsto u atTop (𝓝 a)\nn₀ : ℕ\nhn₀ : ∀ (n : ℕ), n ≥ n₀ → ‖u n / a‖ < b 0\nz : ℕ → E := fun n => u (n + n₀)\nlim_z : Tendsto z atTop (𝓝 a)\nmem_𝓤 : ∀ (n : ℕ), {p | ‖p.fst / p.snd‖ < b (n + 1)} ∈ 𝓤 E\nφ : ℕ → ℕ\nφ_extr : StrictMono φ\nhφ : ∀ (n : ℕ), ‖z (φ (n + 1)) / z (φ n)‖ < b (n + 1)\nw : ℕ → E := z ∘ φ\nhw : Tendsto w atTop (𝓝 a)\nv : ℕ → E := fun i => if i = 0 then w 0 else w i / w (i - 1)\nl : ℕ\nhl : 0 < l\n⊢ ∃ k, l = k + 1\ncase intro.intro.intro.intro.intro.refine'_2.intro\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁ a₂ b✝ b₁ b₂ : E\nr r₁ r₂ : ℝ\ns : Subgroup E\nhg : a ∈ closure ↑s\nb : ℕ → ℝ\nb_pos : ∀ (n : ℕ), 0 < b n\nu : ℕ → E\nu_in : ∀ (n : ℕ), u n ∈ s\nlim_u : Tendsto u atTop (𝓝 a)\nn₀ : ℕ\nhn₀ : ∀ (n : ℕ), n ≥ n₀ → ‖u n / a‖ < b 0\nz : ℕ → E := fun n => u (n + n₀)\nlim_z : Tendsto z atTop (𝓝 a)\nmem_𝓤 : ∀ (n : ℕ), {p | ‖p.fst / p.snd‖ < b (n + 1)} ∈ 𝓤 E\nφ : ℕ → ℕ\nφ_extr : StrictMono φ\nhφ : ∀ (n : ℕ), ‖z (φ (n + 1)) / z (φ n)‖ < b (n + 1)\nw : ℕ → E := z ∘ φ\nhw : Tendsto w atTop (𝓝 a)\nv : ℕ → E := fun i => if i = 0 then w 0 else w i / w (i - 1)\nk : ℕ\nhl : 0 < k + 1\n⊢ ‖v (k + 1)‖ < b (k + 1)\n[PROOFSTEP]\nexact Nat.exists_eq_succ_of_ne_zero hl.ne'\n[GOAL]\ncase intro.intro.intro.intro.intro.refine'_2.intro\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁ a₂ b✝ b₁ b₂ : E\nr r₁ r₂ : ℝ\ns : Subgroup E\nhg : a ∈ closure ↑s\nb : ℕ → ℝ\nb_pos : ∀ (n : ℕ), 0 < b n\nu : ℕ → E\nu_in : ∀ (n : ℕ), u n ∈ s\nlim_u : Tendsto u atTop (𝓝 a)\nn₀ : ℕ\nhn₀ : ∀ (n : ℕ), n ≥ n₀ → ‖u n / a‖ < b 0\nz : ℕ → E := fun n => u (n + n₀)\nlim_z : Tendsto z atTop (𝓝 a)\nmem_𝓤 : ∀ (n : ℕ), {p | ‖p.fst / p.snd‖ < b (n + 1)} ∈ 𝓤 E\nφ : ℕ → ℕ\nφ_extr : StrictMono φ\nhφ : ∀ (n : ℕ), ‖z (φ (n + 1)) / z (φ n)‖ < b (n + 1)\nw : ℕ → E := z ∘ φ\nhw : Tendsto w atTop (𝓝 a)\nv : ℕ → E := fun i => if i = 0 then w 0 else w i / w (i - 1)\nk : ℕ\nhl : 0 < k + 1\n⊢ ‖v (k + 1)‖ < b (k + 1)\n[PROOFSTEP]\napply hφ\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁ a₂ b✝ b₁ b₂ : E\nr r₁ r₂ : ℝ\nj : E →* F\nb : F\nhb : b ∈ closure ↑(MonoidHom.range j)\nf : ℕ → ℝ\nb_pos : ∀ (n : ℕ), 0 < f n\n⊢ ∃ a,\n    Tendsto (fun n => ∏ i in range (n + 1), ↑j (a i)) atTop (𝓝 b) ∧\n      ‖↑j (a 0) / b‖ < f 0 ∧ ∀ (n : ℕ), 0 < n → ‖↑j (a n)‖ < f n\n[PROOFSTEP]\nobtain ⟨v, sum_v, v_in, hv₀, hv_pos⟩ := controlled_prod_of_mem_closure hb b_pos\n[GOAL]\ncase intro.intro.intro.intro\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁ a₂ b✝ b₁ b₂ : E\nr r₁ r₂ : ℝ\nj : E →* F\nb : F\nhb : b ∈ closure ↑(MonoidHom.range j)\nf : ℕ → ℝ\nb_pos : ∀ (n : ℕ), 0 < f n\nv : ℕ → F\nsum_v : Tendsto (fun n => ∏ i in range (n + 1), v i) atTop (𝓝 b)\nv_in : ∀ (n : ℕ), v n ∈ MonoidHom.range j\nhv₀ : ‖v 0 / b‖ < f 0\nhv_pos : ∀ (n : ℕ), 0 < n → ‖v n‖ < f n\n⊢ ∃ a,\n    Tendsto (fun n => ∏ i in range (n + 1), ↑j (a i)) atTop (𝓝 b) ∧\n      ‖↑j (a 0) / b‖ < f 0 ∧ ∀ (n : ℕ), 0 < n → ‖↑j (a n)‖ < f n\n[PROOFSTEP]\nchoose g hg using v_in\n[GOAL]\ncase intro.intro.intro.intro\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁ a₂ b✝ b₁ b₂ : E\nr r₁ r₂ : ℝ\nj : E →* F\nb : F\nhb : b ∈ closure ↑(MonoidHom.range j)\nf : ℕ → ℝ\nb_pos : ∀ (n : ℕ), 0 < f n\nv : ℕ → F\nsum_v : Tendsto (fun n => ∏ i in range (n + 1), v i) atTop (𝓝 b)\nhv₀ : ‖v 0 / b‖ < f 0\nhv_pos : ∀ (n : ℕ), 0 < n → ‖v n‖ < f n\ng : ℕ → E\nhg : ∀ (n : ℕ), ↑j (g n) = v n\n⊢ ∃ a,\n    Tendsto (fun n => ∏ i in range (n + 1), ↑j (a i)) atTop (𝓝 b) ∧\n      ‖↑j (a 0) / b‖ < f 0 ∧ ∀ (n : ℕ), 0 < n → ‖↑j (a n)‖ < f n\n[PROOFSTEP]\nexact ⟨g, by simpa [← hg] using sum_v, by simpa [hg 0] using hv₀, fun n hn => by simpa [hg] using hv_pos n hn⟩\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁ a₂ b✝ b₁ b₂ : E\nr r₁ r₂ : ℝ\nj : E →* F\nb : F\nhb : b ∈ closure ↑(MonoidHom.range j)\nf : ℕ → ℝ\nb_pos : ∀ (n : ℕ), 0 < f n\nv : ℕ → F\nsum_v : Tendsto (fun n => ∏ i in range (n + 1), v i) atTop (𝓝 b)\nhv₀ : ‖v 0 / b‖ < f 0\nhv_pos : ∀ (n : ℕ), 0 < n → ‖v n‖ < f n\ng : ℕ → E\nhg : ∀ (n : ℕ), ↑j (g n) = v n\n⊢ Tendsto (fun n => ∏ i in range (n + 1), ↑j (g i)) atTop (𝓝 b)\n[PROOFSTEP]\nsimpa [← hg] using sum_v\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁ a₂ b✝ b₁ b₂ : E\nr r₁ r₂ : ℝ\nj : E →* F\nb : F\nhb : b ∈ closure ↑(MonoidHom.range j)\nf : ℕ → ℝ\nb_pos : ∀ (n : ℕ), 0 < f n\nv : ℕ → F\nsum_v : Tendsto (fun n => ∏ i in range (n + 1), v i) atTop (𝓝 b)\nhv₀ : ‖v 0 / b‖ < f 0\nhv_pos : ∀ (n : ℕ), 0 < n → ‖v n‖ < f n\ng : ℕ → E\nhg : ∀ (n : ℕ), ↑j (g n) = v n\n⊢ ‖↑j (g 0) / b‖ < f 0\n[PROOFSTEP]\nsimpa [hg 0] using hv₀\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁ a₂ b✝ b₁ b₂ : E\nr r₁ r₂ : ℝ\nj : E →* F\nb : F\nhb : b ∈ closure ↑(MonoidHom.range j)\nf : ℕ → ℝ\nb_pos : ∀ (n : ℕ), 0 < f n\nv : ℕ → F\nsum_v : Tendsto (fun n => ∏ i in range (n + 1), v i) atTop (𝓝 b)\nhv₀ : ‖v 0 / b‖ < f 0\nhv_pos : ∀ (n : ℕ), 0 < n → ‖v n‖ < f n\ng : ℕ → E\nhg : ∀ (n : ℕ), ↑j (g n) = v n\nn : ℕ\nhn : 0 < n\n⊢ ‖↑j (g n)‖ < f n\n[PROOFSTEP]\nsimpa [hg] using hv_pos n hn\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁✝ a₂✝ b b₁✝ b₂✝ : E\nr r₁ r₂ : ℝ\na₁ a₂ b₁ b₂ : E\n⊢ edist (a₁ * a₂) (b₁ * b₂) ≤ edist a₁ b₁ + edist a₂ b₂\n[PROOFSTEP]\nsimp only [edist_nndist]\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁✝ a₂✝ b b₁✝ b₂✝ : E\nr r₁ r₂ : ℝ\na₁ a₂ b₁ b₂ : E\n⊢ ↑(nndist (a₁ * a₂) (b₁ * b₂)) ≤ ↑(nndist a₁ b₁) + ↑(nndist a₂ b₂)\n[PROOFSTEP]\nnorm_cast\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁✝ a₂✝ b b₁✝ b₂✝ : E\nr r₁ r₂ : ℝ\na₁ a₂ b₁ b₂ : E\n⊢ nndist (a₁ * a₂) (b₁ * b₂) ≤ nndist a₁ b₁ + nndist a₂ b₂\n[PROOFSTEP]\napply nndist_mul_mul_le\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nm : Multiset E\n⊢ ↑‖Multiset.prod m‖₊ ≤ ↑(Multiset.sum (Multiset.map (fun x => ‖x‖₊) m))\n[PROOFSTEP]\npush_cast\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nm : Multiset E\n⊢ ‖Multiset.prod m‖ ≤ Multiset.sum (Multiset.map toReal (Multiset.map (fun x => ‖x‖₊) m))\n[PROOFSTEP]\nrw [Multiset.map_map]\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nm : Multiset E\n⊢ ‖Multiset.prod m‖ ≤ Multiset.sum (Multiset.map (toReal ∘ fun x => ‖x‖₊) m)\n[PROOFSTEP]\nexact norm_multiset_prod_le _\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\ns : Finset ι\nf : ι → E\n⊢ ↑‖∏ a in s, f a‖₊ ≤ ↑(∑ a in s, ‖f a‖₊)\n[PROOFSTEP]\npush_cast\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\ns : Finset ι\nf : ι → E\n⊢ ‖∏ a in s, f a‖ ≤ ∑ x in s, ‖f x‖\n[PROOFSTEP]\nexact norm_prod_le _ _\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\n⊢ ↑‖2‖₊ = ↑2\n[PROOFSTEP]\nsimp\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁ a₂ b b₁ b₂ : E\nr✝ r₁ r₂ r : ℝ\n⊢ ‖|r|‖₊ = ‖r‖₊\n[PROOFSTEP]\nsimp [nnnorm]\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nhr : 0 ≤ r\n⊢ ↑‖r‖₊ = ENNReal.ofReal r\n[PROOFSTEP]\nrw [← ofReal_norm_eq_coe_nnnorm, norm_of_nonneg hr]\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁ a₂ b b₁ b₂ : E\nr✝ r₁ r₂ r : ℝ\n⊢ ↑‖r‖₊ = ENNReal.ofReal |r|\n[PROOFSTEP]\nrw [← Real.nnnorm_abs r, Real.ennnorm_eq_ofReal (abs_nonneg _)]\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nhr : 0 ≤ r\n⊢ toNNReal r = ‖r‖₊\n[PROOFSTEP]\nrw [Real.toNNReal_of_nonneg hr]\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nhr : 0 ≤ r\n⊢ { val := r, property := hr } = ‖r‖₊\n[PROOFSTEP]\next\n[GOAL]\ncase a\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nhr : 0 ≤ r\n⊢ ↑{ val := r, property := hr } = ↑‖r‖₊\n[PROOFSTEP]\nrw [coe_mk, coe_nnnorm r, Real.norm_eq_abs r, abs_of_nonneg hr]\n  -- porting note: this is due to the change from `Subtype.val` to `NNReal.toReal` for the coercion\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁ a₂ b b₁ b₂ : E\nr✝ r₁ r₂ r : ℝ\n⊢ ENNReal.ofReal r ≤ ↑‖r‖₊\n[PROOFSTEP]\nobtain hr | hr := le_total 0 r\n[GOAL]\ncase inl\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁ a₂ b b₁ b₂ : E\nr✝ r₁ r₂ r : ℝ\nhr : 0 ≤ r\n⊢ ENNReal.ofReal r ≤ ↑‖r‖₊\n[PROOFSTEP]\nexact (Real.ennnorm_eq_ofReal hr).ge\n[GOAL]\ncase inr\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁ a₂ b b₁ b₂ : E\nr✝ r₁ r₂ r : ℝ\nhr : r ≤ 0\n⊢ ENNReal.ofReal r ≤ ↑‖r‖₊\n[PROOFSTEP]\nrw [ENNReal.ofReal_eq_zero.2 hr]\n[GOAL]\ncase inr\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁ a₂ b b₁ b₂ : E\nr✝ r₁ r₂ r : ℝ\nhr : r ≤ 0\n⊢ 0 ≤ ↑‖r‖₊\n[PROOFSTEP]\nexact bot_le\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nm n : ℤ\n⊢ dist m n = ‖m - n‖\n[PROOFSTEP]\nsimp only [Int.dist_eq, norm, Int.cast_sub]\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nn : ℤ\n⊢ ‖↑n‖ = ↑|n|\n[PROOFSTEP]\nrw [Real.norm_eq_abs, cast_abs]\n  -- porting note: I'm not sure why this isn't `rfl` anymore, but I suspect it's about coercions\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nn : ℕ\n⊢ ‖↑n‖ = ↑n\n[PROOFSTEP]\nsimp [Int.norm_eq_abs]\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nn : ℤ\n⊢ ↑↑(natAbs n) = ↑↑(natAbs n)\n[PROOFSTEP]\nsimp only [Int.cast_ofNat, NNReal.coe_nat_cast]\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nn : ℤ\n⊢ ↑↑(natAbs n) = ↑|n|\n[PROOFSTEP]\nsimp only [Int.coe_natAbs, Int.cast_abs]\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nz : ℤ\nc : ℝ≥0\n⊢ |z| ≤ ↑⌊c⌋₊ ↔ ‖z‖₊ ≤ c\n[PROOFSTEP]\nrw [Int.abs_eq_natAbs, Int.ofNat_le, Nat.le_floor_iff (zero_le c), NNReal.coe_natAbs z]\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁ a₂ b b₁ b₂ : E\nr r₁✝ r₂✝ : ℝ\nr₁ r₂ : ℚ\n⊢ dist r₁ r₂ = ‖r₁ - r₂‖\n[PROOFSTEP]\nsimp only [Rat.dist_eq, norm, Rat.cast_sub]\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nm : ℤ\n⊢ ‖↑m‖ = ‖m‖\n[PROOFSTEP]\nrw [← Rat.norm_cast_real, ← Int.norm_cast_real]\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nm : ℤ\n⊢ ‖↑↑m‖ = ‖↑m‖\n[PROOFSTEP]\ncongr 1\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedCommGroup E\ninst✝¹ : SeminormedCommGroup F\na✝ a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\ninst✝ : SeminormedCommGroup α\nn : ℤ\na : α\n⊢ ‖a ^ n‖ ≤ ‖n‖ * ‖a‖\n[PROOFSTEP]\nrcases n.eq_nat_or_neg with ⟨n, rfl | rfl⟩\n[GOAL]\ncase intro.inl\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedCommGroup E\ninst✝¹ : SeminormedCommGroup F\na✝ a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\ninst✝ : SeminormedCommGroup α\na : α\nn : ℕ\n⊢ ‖a ^ ↑n‖ ≤ ‖↑n‖ * ‖a‖\n[PROOFSTEP]\nsimpa using norm_pow_le_mul_norm n a\n[GOAL]\ncase intro.inr\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedCommGroup E\ninst✝¹ : SeminormedCommGroup F\na✝ a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\ninst✝ : SeminormedCommGroup α\na : α\nn : ℕ\n⊢ ‖a ^ (-↑n)‖ ≤ ‖-↑n‖ * ‖a‖\n[PROOFSTEP]\nsimpa using norm_pow_le_mul_norm n a\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedCommGroup E\ninst✝¹ : SeminormedCommGroup F\na✝ a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\ninst✝ : SeminormedCommGroup α\nn : ℤ\na : α\n⊢ ‖a ^ n‖₊ ≤ ‖n‖₊ * ‖a‖₊\n[PROOFSTEP]\nsimpa only [← NNReal.coe_le_coe, NNReal.coe_mul] using norm_zpow_le_mul_norm n a\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedCommGroup E\ninst✝¹ : SeminormedCommGroup F\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\ninst✝ : PseudoEMetricSpace α\nK Kf Kg : ℝ≥0\nf g : α → E\nhf : LipschitzWith Kf f\nhg : LipschitzWith Kg g\n⊢ LipschitzWith (Kf + Kg) fun x => f x / g x\n[PROOFSTEP]\nsimpa only [div_eq_mul_inv] using hf.mul' hg.inv\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedCommGroup E\ninst✝¹ : SeminormedCommGroup F\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\ninst✝ : PseudoEMetricSpace α\nK Kf Kg : ℝ≥0\nf g : α → E\nhf : AntilipschitzWith Kf f\nhg : LipschitzWith Kg g\nhK : Kg < Kf⁻¹\n⊢ AntilipschitzWith (Kf⁻¹ - Kg)⁻¹ fun x => f x * g x\n[PROOFSTEP]\nletI : PseudoMetricSpace α := PseudoEMetricSpace.toPseudoMetricSpace hf.edist_ne_top\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedCommGroup E\ninst✝¹ : SeminormedCommGroup F\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\ninst✝ : PseudoEMetricSpace α\nK Kf Kg : ℝ≥0\nf g : α → E\nhf : AntilipschitzWith Kf f\nhg : LipschitzWith Kg g\nhK : Kg < Kf⁻¹\nthis : PseudoMetricSpace α := PseudoEMetricSpace.toPseudoMetricSpace (_ : ∀ (x y : α), edist x y ≠ ⊤)\n⊢ AntilipschitzWith (Kf⁻¹ - Kg)⁻¹ fun x => f x * g x\n[PROOFSTEP]\nrefine' AntilipschitzWith.of_le_mul_dist fun x y => _\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedCommGroup E\ninst✝¹ : SeminormedCommGroup F\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\ninst✝ : PseudoEMetricSpace α\nK Kf Kg : ℝ≥0\nf g : α → E\nhf : AntilipschitzWith Kf f\nhg : LipschitzWith Kg g\nhK : Kg < Kf⁻¹\nthis : PseudoMetricSpace α := PseudoEMetricSpace.toPseudoMetricSpace (_ : ∀ (x y : α), edist x y ≠ ⊤)\nx y : α\n⊢ dist x y ≤ ↑(Kf⁻¹ - Kg)⁻¹ * dist (f x * g x) (f y * g y)\n[PROOFSTEP]\nrw [NNReal.coe_inv, ← _root_.div_eq_inv_mul]\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedCommGroup E\ninst✝¹ : SeminormedCommGroup F\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\ninst✝ : PseudoEMetricSpace α\nK Kf Kg : ℝ≥0\nf g : α → E\nhf : AntilipschitzWith Kf f\nhg : LipschitzWith Kg g\nhK : Kg < Kf⁻¹\nthis : PseudoMetricSpace α := PseudoEMetricSpace.toPseudoMetricSpace (_ : ∀ (x y : α), edist x y ≠ ⊤)\nx y : α\n⊢ dist x y ≤ dist (f x * g x) (f y * g y) / ↑(Kf⁻¹ - Kg)\n[PROOFSTEP]\nrw [le_div_iff (NNReal.coe_pos.2 <| tsub_pos_iff_lt.2 hK)]\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedCommGroup E\ninst✝¹ : SeminormedCommGroup F\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\ninst✝ : PseudoEMetricSpace α\nK Kf Kg : ℝ≥0\nf g : α → E\nhf : AntilipschitzWith Kf f\nhg : LipschitzWith Kg g\nhK : Kg < Kf⁻¹\nthis : PseudoMetricSpace α := PseudoEMetricSpace.toPseudoMetricSpace (_ : ∀ (x y : α), edist x y ≠ ⊤)\nx y : α\n⊢ dist x y * ↑(Kf⁻¹ - Kg) ≤ dist (f x * g x) (f y * g y)\n[PROOFSTEP]\nrw [mul_comm, NNReal.coe_sub hK.le, _root_.sub_mul]\n  -- porting note: `ENNReal.sub_mul` should be `protected`?\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedCommGroup E\ninst✝¹ : SeminormedCommGroup F\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\ninst✝ : PseudoEMetricSpace α\nK Kf Kg : ℝ≥0\nf g : α → E\nhf : AntilipschitzWith Kf f\nhg : LipschitzWith Kg g\nhK : Kg < Kf⁻¹\nthis : PseudoMetricSpace α := PseudoEMetricSpace.toPseudoMetricSpace (_ : ∀ (x y : α), edist x y ≠ ⊤)\nx y : α\n⊢ ↑Kf⁻¹ * dist x y - ↑Kg * dist x y ≤ dist (f x * g x) (f y * g y)\n[PROOFSTEP]\ncalc\n  ↑Kf⁻¹ * dist x y - Kg * dist x y ≤ dist (f x) (f y) - dist (g x) (g y) :=\n    sub_le_sub (hf.mul_le_dist x y) (hg.dist_le_mul x y)\n  _ ≤ _ := le_trans (le_abs_self _) (abs_dist_sub_le_dist_mul_mul _ _ _ _)\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedCommGroup E\ninst✝¹ : SeminormedCommGroup F\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\ninst✝ : PseudoEMetricSpace α\nK Kf Kg : ℝ≥0\nf g : α → E\nhf : AntilipschitzWith Kf f\nhg : LipschitzWith Kg (g / f)\nhK : Kg < Kf⁻¹\n⊢ AntilipschitzWith (Kf⁻¹ - Kg)⁻¹ g\n[PROOFSTEP]\nsimpa only [Pi.div_apply, mul_div_cancel'_right] using hf.mul_lipschitzWith hg hK\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝² : SeminormedCommGroup E\ninst✝¹ : SeminormedCommGroup F\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\ninst✝ : PseudoEMetricSpace α\nK Kf Kg : ℝ≥0\nf✝ g : α → E\nf : E → F\nhf : AntilipschitzWith K f\nx y : E\n⊢ ‖x / y‖ ≤ ↑K * ‖f x / f y‖\n[PROOFSTEP]\nsimp [← dist_eq_norm_div, hf.le_mul_dist x y]\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nu v : ℕ → E\nN : ℕ\nhuv : ∀ (n : ℕ), n ≥ N → u n = v n\nhv : CauchySeq fun n => ∏ k in range (n + 1), v k\n⊢ CauchySeq fun n => ∏ k in range (n + 1), u k\n[PROOFSTEP]\nlet d : ℕ → E := fun n => ∏ k in range (n + 1), u k / v k\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nu v : ℕ → E\nN : ℕ\nhuv : ∀ (n : ℕ), n ≥ N → u n = v n\nhv : CauchySeq fun n => ∏ k in range (n + 1), v k\nd : ℕ → E := fun n => ∏ k in range (n + 1), u k / v k\n⊢ CauchySeq fun n => ∏ k in range (n + 1), u k\n[PROOFSTEP]\nrw [show (fun n => ∏ k in range (n + 1), u k) = d * fun n => ∏ k in range (n + 1), v k by ext n; simp]\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nu v : ℕ → E\nN : ℕ\nhuv : ∀ (n : ℕ), n ≥ N → u n = v n\nhv : CauchySeq fun n => ∏ k in range (n + 1), v k\nd : ℕ → E := fun n => ∏ k in range (n + 1), u k / v k\n⊢ (fun n => ∏ k in range (n + 1), u k) = d * fun n => ∏ k in range (n + 1), v k\n[PROOFSTEP]\next n\n[GOAL]\ncase h\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nu v : ℕ → E\nN : ℕ\nhuv : ∀ (n : ℕ), n ≥ N → u n = v n\nhv : CauchySeq fun n => ∏ k in range (n + 1), v k\nd : ℕ → E := fun n => ∏ k in range (n + 1), u k / v k\nn : ℕ\n⊢ ∏ k in range (n + 1), u k = (d * fun n => ∏ k in range (n + 1), v k) n\n[PROOFSTEP]\nsimp\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nu v : ℕ → E\nN : ℕ\nhuv : ∀ (n : ℕ), n ≥ N → u n = v n\nhv : CauchySeq fun n => ∏ k in range (n + 1), v k\nd : ℕ → E := fun n => ∏ k in range (n + 1), u k / v k\n⊢ CauchySeq (d * fun n => ∏ k in range (n + 1), v k)\n[PROOFSTEP]\nsuffices ∀ n ≥ N, d n = d N by exact (tendsto_atTop_of_eventually_const this).cauchySeq.mul hv\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nu v : ℕ → E\nN : ℕ\nhuv : ∀ (n : ℕ), n ≥ N → u n = v n\nhv : CauchySeq fun n => ∏ k in range (n + 1), v k\nd : ℕ → E := fun n => ∏ k in range (n + 1), u k / v k\nthis : ∀ (n : ℕ), n ≥ N → d n = d N\n⊢ CauchySeq (d * fun n => ∏ k in range (n + 1), v k)\n[PROOFSTEP]\nexact (tendsto_atTop_of_eventually_const this).cauchySeq.mul hv\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nu v : ℕ → E\nN : ℕ\nhuv : ∀ (n : ℕ), n ≥ N → u n = v n\nhv : CauchySeq fun n => ∏ k in range (n + 1), v k\nd : ℕ → E := fun n => ∏ k in range (n + 1), u k / v k\n⊢ ∀ (n : ℕ), n ≥ N → d n = d N\n[PROOFSTEP]\nintro n hn\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nu v : ℕ → E\nN : ℕ\nhuv : ∀ (n : ℕ), n ≥ N → u n = v n\nhv : CauchySeq fun n => ∏ k in range (n + 1), v k\nd : ℕ → E := fun n => ∏ k in range (n + 1), u k / v k\nn : ℕ\nhn : n ≥ N\n⊢ d n = d N\n[PROOFSTEP]\ndsimp\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nu v : ℕ → E\nN : ℕ\nhuv : ∀ (n : ℕ), n ≥ N → u n = v n\nhv : CauchySeq fun n => ∏ k in range (n + 1), v k\nd : ℕ → E := fun n => ∏ k in range (n + 1), u k / v k\nn : ℕ\nhn : n ≥ N\n⊢ ∏ k in range (n + 1), u k / v k = ∏ k in range (N + 1), u k / v k\n[PROOFSTEP]\nrw [eventually_constant_prod _ hn]\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nu v : ℕ → E\nN : ℕ\nhuv : ∀ (n : ℕ), n ≥ N → u n = v n\nhv : CauchySeq fun n => ∏ k in range (n + 1), v k\nd : ℕ → E := fun n => ∏ k in range (n + 1), u k / v k\nn : ℕ\nhn : n ≥ N\n⊢ ∀ (n : ℕ), n ≥ N → u n / v n = 1\n[PROOFSTEP]\nintro m hm\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedCommGroup E\ninst✝ : SeminormedCommGroup F\na a₁ a₂ b b₁ b₂ : E\nr r₁ r₂ : ℝ\nu v : ℕ → E\nN : ℕ\nhuv : ∀ (n : ℕ), n ≥ N → u n = v n\nhv : CauchySeq fun n => ∏ k in range (n + 1), v k\nd : ℕ → E := fun n => ∏ k in range (n + 1), u k / v k\nn : ℕ\nhn : n ≥ N\nm : ℕ\nhm : m ≥ N\n⊢ u m / v m = 1\n[PROOFSTEP]\nsimp [huv m hm]\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : NormedGroup E\ninst✝ : NormedGroup F\na b : E\n⊢ ‖a / b‖ = 0 ↔ a = b\n[PROOFSTEP]\nrw [norm_eq_zero'', div_eq_one]\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : NormedGroup E\ninst✝ : NormedGroup F\na b : E\n⊢ 0 < ‖a / b‖ ↔ a ≠ b\n[PROOFSTEP]\nrw [(norm_nonneg' _).lt_iff_ne, ne_comm]\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : NormedGroup E\ninst✝ : NormedGroup F\na b : E\n⊢ ‖a / b‖ ≠ 0 ↔ a ≠ b\n[PROOFSTEP]\nexact norm_div_eq_zero_iff.not\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : NormedGroup E\ninst✝ : NormedGroup F\na b : E\nh : ‖a / b‖ ≤ 0\n⊢ a = b\n[PROOFSTEP]\nrwa [← div_eq_one, ← norm_le_zero_iff'']\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : NormedGroup E\ninst✝ : NormedGroup F\na b : E\n⊢ ‖a‖₊ = 0 ↔ a = 1\n[PROOFSTEP]\nrw [← NNReal.coe_eq_zero, coe_nnnorm', norm_eq_zero'']\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : NormedAddGroup E\ninst✝ : TopologicalSpace α\nf : α → E\nhf : Continuous f\nh : HasCompactSupport f\n⊢ ∃ C, ∀ (x : α), ‖f x‖ ≤ C\n[PROOFSTEP]\nsimpa [bddAbove_def] using hf.norm.bddAbove_range_of_hasCompactSupport h.norm\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : NormedAddGroup α\nf : α → E\ninst✝ : One E\nhf : HasCompactMulSupport f\n⊢ ∃ R, 0 < R ∧ ∀ (x : α), R ≤ ‖x‖ → f x = 1\n[PROOFSTEP]\nobtain ⟨K, ⟨hK1, hK2⟩⟩ := exists_compact_iff_hasCompactMulSupport.mpr hf\n[GOAL]\ncase intro.intro\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : NormedAddGroup α\nf : α → E\ninst✝ : One E\nhf : HasCompactMulSupport f\nK : Set α\nhK1 : IsCompact K\nhK2 : ∀ (x : α), ¬x ∈ K → f x = 1\n⊢ ∃ R, 0 < R ∧ ∀ (x : α), R ≤ ‖x‖ → f x = 1\n[PROOFSTEP]\nobtain ⟨S, hS, hS'⟩ := hK1.bounded.exists_pos_norm_le\n[GOAL]\ncase intro.intro.intro.intro\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : NormedAddGroup α\nf : α → E\ninst✝ : One E\nhf : HasCompactMulSupport f\nK : Set α\nhK1 : IsCompact K\nhK2 : ∀ (x : α), ¬x ∈ K → f x = 1\nS : ℝ\nhS : S > 0\nhS' : ∀ (x : α), x ∈ K → ‖x‖ ≤ S\n⊢ ∃ R, 0 < R ∧ ∀ (x : α), R ≤ ‖x‖ → f x = 1\n[PROOFSTEP]\nrefine'\n  ⟨S + 1, by positivity, fun x hx => hK2 x ((mt <| hS' x) _)⟩\n    -- porting note: `ENNReal.add_lt_add` should be `protected`?\n      -- [context: we used `_root_.add_lt_add` in a previous version of this proof]\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : NormedAddGroup α\nf : α → E\ninst✝ : One E\nhf : HasCompactMulSupport f\nK : Set α\nhK1 : IsCompact K\nhK2 : ∀ (x : α), ¬x ∈ K → f x = 1\nS : ℝ\nhS : S > 0\nhS' : ∀ (x : α), x ∈ K → ‖x‖ ≤ S\n⊢ 0 < S + 1\n[PROOFSTEP]\npositivity\n[GOAL]\ncase intro.intro.intro.intro\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : NormedAddGroup α\nf : α → E\ninst✝ : One E\nhf : HasCompactMulSupport f\nK : Set α\nhK1 : IsCompact K\nhK2 : ∀ (x : α), ¬x ∈ K → f x = 1\nS : ℝ\nhS : S > 0\nhS' : ∀ (x : α), x ∈ K → ‖x‖ ≤ S\nx : α\nhx : S + 1 ≤ ‖x‖\n⊢ ¬‖x‖ ≤ S\n[PROOFSTEP]\ncontrapose! hx\n[GOAL]\ncase intro.intro.intro.intro\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : NormedAddGroup α\nf : α → E\ninst✝ : One E\nhf : HasCompactMulSupport f\nK : Set α\nhK1 : IsCompact K\nhK2 : ∀ (x : α), ¬x ∈ K → f x = 1\nS : ℝ\nhS : S > 0\nhS' : ∀ (x : α), x ∈ K → ‖x‖ ≤ S\nx : α\nhx : ‖x‖ ≤ S\n⊢ ‖x‖ < S + 1\n[PROOFSTEP]\nexact lt_add_of_le_of_pos hx zero_lt_one\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\ninst✝¹ : SeminormedGroup E\ninst✝ : SeminormedGroup F\nx y : E × F\n⊢ dist x y = ‖x / y‖\n[PROOFSTEP]\nsimp only [Prod.norm_def, Prod.dist_eq, dist_eq_norm_div, Prod.fst_div, Prod.snd_div]\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\nπ : ι → Type u_9\ninst✝² : Fintype ι\ninst✝¹ : (i : ι) → SeminormedGroup (π i)\ninst✝ : SeminormedGroup E\nf x : (i : ι) → π i\nr : ℝ\nhr : 0 ≤ r\n⊢ ‖x‖ ≤ r ↔ ∀ (i : ι), ‖x i‖ ≤ r\n[PROOFSTEP]\nsimp only [← dist_one_right, dist_pi_le_iff hr, Pi.one_apply]\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\nπ : ι → Type u_9\ninst✝³ : Fintype ι\ninst✝² : (i : ι) → SeminormedGroup (π i)\ninst✝¹ : SeminormedGroup E\nf x : (i : ι) → π i\nr : ℝ\ninst✝ : Nonempty ι\n⊢ ‖f‖ ≤ r ↔ ∀ (b : ι), ‖f b‖ ≤ r\n[PROOFSTEP]\nby_cases hr : 0 ≤ r\n[GOAL]\ncase pos\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\nπ : ι → Type u_9\ninst✝³ : Fintype ι\ninst✝² : (i : ι) → SeminormedGroup (π i)\ninst✝¹ : SeminormedGroup E\nf x : (i : ι) → π i\nr : ℝ\ninst✝ : Nonempty ι\nhr : 0 ≤ r\n⊢ ‖f‖ ≤ r ↔ ∀ (b : ι), ‖f b‖ ≤ r\n[PROOFSTEP]\nexact pi_norm_le_iff_of_nonneg' hr\n[GOAL]\ncase neg\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\nπ : ι → Type u_9\ninst✝³ : Fintype ι\ninst✝² : (i : ι) → SeminormedGroup (π i)\ninst✝¹ : SeminormedGroup E\nf x : (i : ι) → π i\nr : ℝ\ninst✝ : Nonempty ι\nhr : ¬0 ≤ r\n⊢ ‖f‖ ≤ r ↔ ∀ (b : ι), ‖f b‖ ≤ r\n[PROOFSTEP]\nexact\n  iff_of_false (fun h => hr <| (norm_nonneg' _).trans h) fun h =>\n    hr <| (norm_nonneg' _).trans <| h <| Classical.arbitrary _\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\nπ : ι → Type u_9\ninst✝² : Fintype ι\ninst✝¹ : (i : ι) → SeminormedGroup (π i)\ninst✝ : SeminormedGroup E\nf x : (i : ι) → π i\nr : ℝ\nhr : 0 < r\n⊢ ‖x‖ < r ↔ ∀ (i : ι), ‖x i‖ < r\n[PROOFSTEP]\nsimp only [← dist_one_right, dist_pi_lt_iff hr, Pi.one_apply]\n[GOAL]\n𝓕 : Type u_1\n𝕜 : Type u_2\nα : Type u_3\nι : Type u_4\nκ : Type u_5\nE : Type u_6\nF : Type u_7\nG : Type u_8\nπ : ι → Type u_9\ninst✝³ : Fintype ι\ninst✝² : (i : ι) → SeminormedGroup (π i)\ninst✝¹ : SeminormedGroup E\nf x : (i : ι) → π i\nr : ℝ\ninst✝ : Nonempty ι\na : E\n⊢ ‖fun _i => a‖ = ‖a‖\n[PROOFSTEP]\nsimpa only [← dist_one_right] using dist_pi_const a 1\n", "meta": {"mathlib_filename": "Mathlib.Analysis.Normed.Group.Basic", "llama_tokens": 62635, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7826624789529375, "lm_q2_score": 0.6654105653819836, "lm_q1q2_score": 0.520791882623339}}
{"text": "[GOAL]\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : SuccOrder α\n⊢ ∀ (a : αᵒᵈ), (↑toDual ∘ SuccOrder.succ ∘ ↑ofDual) a ≤ a\n[PROOFSTEP]\nsimp only [comp, OrderDual.forall, ofDual_toDual, toDual_le_toDual, SuccOrder.le_succ, implies_true]\n[GOAL]\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : SuccOrder α\na✝ : αᵒᵈ\nh : a✝ ≤ (↑toDual ∘ SuccOrder.succ ∘ ↑ofDual) a✝\n⊢ IsMin a✝\n[PROOFSTEP]\napply SuccOrder.max_of_succ_le h\n[GOAL]\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : SuccOrder α\n⊢ ∀ {a b : αᵒᵈ}, a < b → a ≤ (↑toDual ∘ SuccOrder.succ ∘ ↑ofDual) b\n[PROOFSTEP]\nintro a b h\n[GOAL]\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : SuccOrder α\na b : αᵒᵈ\nh : a < b\n⊢ a ≤ (↑toDual ∘ SuccOrder.succ ∘ ↑ofDual) b\n[PROOFSTEP]\nexact SuccOrder.succ_le_of_lt h\n[GOAL]\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : PredOrder α\n⊢ ∀ (a : αᵒᵈ), a ≤ (↑toDual ∘ PredOrder.pred ∘ ↑ofDual) a\n[PROOFSTEP]\nsimp only [comp, OrderDual.forall, ofDual_toDual, toDual_le_toDual, PredOrder.pred_le, implies_true]\n[GOAL]\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : PredOrder α\na✝ : αᵒᵈ\nh : (↑toDual ∘ PredOrder.pred ∘ ↑ofDual) a✝ ≤ a✝\n⊢ IsMax a✝\n[PROOFSTEP]\napply PredOrder.min_of_le_pred h\n[GOAL]\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : PredOrder α\n⊢ ∀ {a b : αᵒᵈ}, a < b → (↑toDual ∘ PredOrder.pred ∘ ↑ofDual) a ≤ b\n[PROOFSTEP]\nintro a b h\n[GOAL]\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : PredOrder α\na b : αᵒᵈ\nh : a < b\n⊢ (↑toDual ∘ PredOrder.pred ∘ ↑ofDual) a ≤ b\n[PROOFSTEP]\nexact PredOrder.le_pred_of_lt h\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrder α\nsucc : α → α\nhn : ∀ {a : α}, ¬IsMax a → ∀ (b : α), a < b ↔ succ a ≤ b\nhm : ∀ (a : α), IsMax a → succ a = a\na : α\nh : ¬IsMax a\n⊢ a < succ a\n[PROOFSTEP]\nsimpa using (hn h a).not\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrder α\nsucc : α → α\nhn : ∀ {a : α}, ¬IsMax a → ∀ (b : α), a < b ↔ succ a ≤ b\nhm : ∀ (a : α), IsMax a → succ a = a\na : α\nh : ¬IsMax a\n⊢ ¬succ a ≤ a\n[PROOFSTEP]\nsimpa using (hn h a).not\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrder α\nsucc : α → α\nhn : ∀ {a : α}, ¬IsMax a → ∀ (b : α), a < b ↔ succ a ≤ b\nhm : ∀ (a : α), IsMax a → succ a = a\na b : α\nhab : a < succ b\nh : ¬IsMax b\n⊢ a ≤ b\n[PROOFSTEP]\nsimpa [hab] using (hn h a).not\n[GOAL]\nα✝ : Type u_1\ninst✝¹ : LinearOrder α✝\nα : Type ?u.4579\ninst✝ : LinearOrder α\npred : α → α\nhn : ∀ {a : α}, ¬IsMin a → ∀ (b : α), b ≤ pred a ↔ b < a\nhm : ∀ (a : α), IsMin a → pred a = a\na : α\nh : ¬IsMin a\n⊢ pred a < a\n[PROOFSTEP]\nsimpa using (hn h a).not\n[GOAL]\nα✝ : Type u_1\ninst✝¹ : LinearOrder α✝\nα : Type ?u.4579\ninst✝ : LinearOrder α\npred : α → α\nhn : ∀ {a : α}, ¬IsMin a → ∀ (b : α), b ≤ pred a ↔ b < a\nhm : ∀ (a : α), IsMin a → pred a = a\na : α\nh : ¬IsMin a\n⊢ ¬a ≤ pred a\n[PROOFSTEP]\nsimpa using (hn h a).not\n[GOAL]\nα✝ : Type u_1\ninst✝¹ : LinearOrder α✝\nα : Type ?u.4579\ninst✝ : LinearOrder α\npred : α → α\nhn : ∀ {a : α}, ¬IsMin a → ∀ (b : α), b ≤ pred a ↔ b < a\nhm : ∀ (a : α), IsMin a → pred a = a\na b : α\nhab : pred a < b\nh : ¬IsMin a\n⊢ a ≤ b\n[PROOFSTEP]\nsimpa [hab] using (hn h b).not\n[GOAL]\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : SuccOrder α\na b : α\nha : ¬IsMax a\nhb : ¬IsMax b\n⊢ succ a < succ b ↔ a < b\n[PROOFSTEP]\nrw [lt_succ_iff_of_not_isMax hb, succ_le_iff_of_not_isMax ha]\n[GOAL]\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : SuccOrder α\na b : α\nha : ¬IsMax a\nhb : ¬IsMax b\n⊢ succ a ≤ succ b ↔ a ≤ b\n[PROOFSTEP]\nrw [succ_le_iff_of_not_isMax ha, lt_succ_iff_of_not_isMax hb]\n[GOAL]\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : SuccOrder α\na b : α\nh : a ≤ b\n⊢ succ a ≤ succ b\n[PROOFSTEP]\nby_cases hb : IsMax b\n[GOAL]\ncase pos\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : SuccOrder α\na b : α\nh : a ≤ b\nhb : IsMax b\n⊢ succ a ≤ succ b\n[PROOFSTEP]\nby_cases hba : b ≤ a\n[GOAL]\ncase pos\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : SuccOrder α\na b : α\nh : a ≤ b\nhb : IsMax b\nhba : b ≤ a\n⊢ succ a ≤ succ b\n[PROOFSTEP]\nexact (hb <| hba.trans <| le_succ _).trans (le_succ _)\n[GOAL]\ncase neg\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : SuccOrder α\na b : α\nh : a ≤ b\nhb : IsMax b\nhba : ¬b ≤ a\n⊢ succ a ≤ succ b\n[PROOFSTEP]\nexact succ_le_of_lt ((h.lt_of_not_le hba).trans_le <| le_succ b)\n[GOAL]\ncase neg\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : SuccOrder α\na b : α\nh : a ≤ b\nhb : ¬IsMax b\n⊢ succ a ≤ succ b\n[PROOFSTEP]\nrwa [succ_le_iff_of_not_isMax fun ha => hb <| ha.mono h, lt_succ_iff_of_not_isMax hb]\n[GOAL]\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : SuccOrder α\na b : α\nk : ℕ\nx : α\n⊢ x ≤ succ^[k] x\n[PROOFSTEP]\nconv_lhs => rw [(by simp only [Function.iterate_id, id.def] : x = id^[k] x)]\n[GOAL]\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : SuccOrder α\na b : α\nk : ℕ\nx : α\n| x\n[PROOFSTEP]\nrw [(by simp only [Function.iterate_id, id.def] : x = id^[k] x)]\n[GOAL]\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : SuccOrder α\na b : α\nk : ℕ\nx : α\n| x\n[PROOFSTEP]\nrw [(by simp only [Function.iterate_id, id.def] : x = id^[k] x)]\n[GOAL]\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : SuccOrder α\na b : α\nk : ℕ\nx : α\n| x\n[PROOFSTEP]\nrw [(by simp only [Function.iterate_id, id.def] : x = id^[k] x)]\n[GOAL]\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : SuccOrder α\na b : α\nk : ℕ\nx : α\n⊢ x = id^[k] x\n[PROOFSTEP]\nsimp only [Function.iterate_id, id.def]\n[GOAL]\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : SuccOrder α\na b : α\nk : ℕ\nx : α\n⊢ id^[k] x ≤ succ^[k] x\n[PROOFSTEP]\nexact Monotone.le_iterate_of_le succ_mono le_succ k x\n[GOAL]\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : SuccOrder α\na b : α\nn m : ℕ\nh_eq : succ^[n] a = succ^[m] a\nh_lt : n < m\n⊢ IsMax (succ^[n] a)\n[PROOFSTEP]\nrefine' max_of_succ_le (le_trans _ h_eq.symm.le)\n[GOAL]\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : SuccOrder α\na b : α\nn m : ℕ\nh_eq : succ^[n] a = succ^[m] a\nh_lt : n < m\n⊢ succ (succ^[n] a) ≤ succ^[m] a\n[PROOFSTEP]\nhave : succ (succ^[n] a) = succ^[n + 1] a := by rw [Function.iterate_succ', comp]\n[GOAL]\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : SuccOrder α\na b : α\nn m : ℕ\nh_eq : succ^[n] a = succ^[m] a\nh_lt : n < m\n⊢ succ (succ^[n] a) = succ^[n + 1] a\n[PROOFSTEP]\nrw [Function.iterate_succ', comp]\n[GOAL]\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : SuccOrder α\na b : α\nn m : ℕ\nh_eq : succ^[n] a = succ^[m] a\nh_lt : n < m\nthis : succ (succ^[n] a) = succ^[n + 1] a\n⊢ succ (succ^[n] a) ≤ succ^[m] a\n[PROOFSTEP]\nrw [this]\n[GOAL]\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : SuccOrder α\na b : α\nn m : ℕ\nh_eq : succ^[n] a = succ^[m] a\nh_lt : n < m\nthis : succ (succ^[n] a) = succ^[n + 1] a\n⊢ succ^[n + 1] a ≤ succ^[m] a\n[PROOFSTEP]\nhave h_le : n + 1 ≤ m := Nat.succ_le_of_lt h_lt\n[GOAL]\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : SuccOrder α\na b : α\nn m : ℕ\nh_eq : succ^[n] a = succ^[m] a\nh_lt : n < m\nthis : succ (succ^[n] a) = succ^[n + 1] a\nh_le : n + 1 ≤ m\n⊢ succ^[n + 1] a ≤ succ^[m] a\n[PROOFSTEP]\nexact Monotone.monotone_iterate_of_le_map succ_mono (le_succ a) h_le\n[GOAL]\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : SuccOrder α\na b : α\nn m : ℕ\nh_eq : succ^[n] a = succ^[m] a\nh_ne : n ≠ m\n⊢ IsMax (succ^[n] a)\n[PROOFSTEP]\ncases' le_total n m with h h\n[GOAL]\ncase inl\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : SuccOrder α\na b : α\nn m : ℕ\nh_eq : succ^[n] a = succ^[m] a\nh_ne : n ≠ m\nh : n ≤ m\n⊢ IsMax (succ^[n] a)\n[PROOFSTEP]\nexact isMax_iterate_succ_of_eq_of_lt h_eq (lt_of_le_of_ne h h_ne)\n[GOAL]\ncase inr\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : SuccOrder α\na b : α\nn m : ℕ\nh_eq : succ^[n] a = succ^[m] a\nh_ne : n ≠ m\nh : m ≤ n\n⊢ IsMax (succ^[n] a)\n[PROOFSTEP]\nrw [h_eq]\n[GOAL]\ncase inr\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : SuccOrder α\na b : α\nn m : ℕ\nh_eq : succ^[n] a = succ^[m] a\nh_ne : n ≠ m\nh : m ≤ n\n⊢ IsMax (succ^[m] a)\n[PROOFSTEP]\nexact isMax_iterate_succ_of_eq_of_lt h_eq.symm (lt_of_le_of_ne h h_ne.symm)\n[GOAL]\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : SuccOrder α\na b : α\nhb : ¬IsMax b\n⊢ Ico a (succ b) = Icc a b\n[PROOFSTEP]\nrw [← Ici_inter_Iio, Iio_succ_of_not_isMax hb, Ici_inter_Iic]\n[GOAL]\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : SuccOrder α\na b : α\nhb : ¬IsMax b\n⊢ Ioo a (succ b) = Ioc a b\n[PROOFSTEP]\nrw [← Ioi_inter_Iio, Iio_succ_of_not_isMax hb, Ioi_inter_Iic]\n[GOAL]\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : SuccOrder α\na b : α\nha : ¬IsMax a\n⊢ Icc (succ a) b = Ioc a b\n[PROOFSTEP]\nrw [← Ici_inter_Iic, Ici_succ_of_not_isMax ha, Ioi_inter_Iic]\n[GOAL]\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : SuccOrder α\na b : α\nha : ¬IsMax a\n⊢ Ico (succ a) b = Ioo a b\n[PROOFSTEP]\nrw [← Ici_inter_Iio, Ici_succ_of_not_isMax ha, Ioi_inter_Iio]\n[GOAL]\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : SuccOrder α\na b : α\ninst✝ : NoMaxOrder α\n⊢ succ a ≤ succ b ↔ a ≤ b\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : SuccOrder α\na b : α\ninst✝ : NoMaxOrder α\n⊢ succ a < succ b ↔ a < b\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\ninst✝¹ : PartialOrder α\ninst✝ : SuccOrder α\na b : α\nha : ¬IsMax a\nhb : ¬IsMax b\n⊢ succ a = succ b ↔ a = b\n[PROOFSTEP]\nrw [eq_iff_le_not_lt, eq_iff_le_not_lt, succ_le_succ_iff_of_not_isMax ha hb, succ_lt_succ_iff_of_not_isMax ha hb]\n[GOAL]\nα : Type u_1\ninst✝¹ : PartialOrder α\ninst✝ : SuccOrder α\na b : α\n⊢ a ≤ b ∧ b ≤ succ a ↔ b = a ∨ b = succ a\n[PROOFSTEP]\nrefine' ⟨fun h => or_iff_not_imp_left.2 fun hba : b ≠ a => h.2.antisymm (succ_le_of_lt <| h.1.lt_of_ne <| hba.symm), _⟩\n[GOAL]\nα : Type u_1\ninst✝¹ : PartialOrder α\ninst✝ : SuccOrder α\na b : α\n⊢ b = a ∨ b = succ a → a ≤ b ∧ b ≤ succ a\n[PROOFSTEP]\nrintro (rfl | rfl)\n[GOAL]\ncase inl\nα : Type u_1\ninst✝¹ : PartialOrder α\ninst✝ : SuccOrder α\nb : α\n⊢ b ≤ b ∧ b ≤ succ b\n[PROOFSTEP]\nexact ⟨le_rfl, le_succ b⟩\n[GOAL]\ncase inr\nα : Type u_1\ninst✝¹ : PartialOrder α\ninst✝ : SuccOrder α\na : α\n⊢ a ≤ succ a ∧ succ a ≤ succ a\n[PROOFSTEP]\nexact ⟨le_succ a, le_rfl⟩\n[GOAL]\nα : Type u_1\ninst✝¹ : PartialOrder α\ninst✝ : SuccOrder α\na b : α\nh : a ⩿ b\n⊢ b ≤ succ a\n[PROOFSTEP]\nobtain h | rfl := h.covby_or_eq\n[GOAL]\ncase inl\nα : Type u_1\ninst✝¹ : PartialOrder α\ninst✝ : SuccOrder α\na b : α\nh✝ : a ⩿ b\nh : a ⋖ b\n⊢ b ≤ succ a\n[PROOFSTEP]\nexact (Covby.succ_eq h).ge\n[GOAL]\ncase inr\nα : Type u_1\ninst✝¹ : PartialOrder α\ninst✝ : SuccOrder α\na : α\nh : a ⩿ a\n⊢ a ≤ succ a\n[PROOFSTEP]\nexact le_succ _\n[GOAL]\nα : Type u_1\ninst✝¹ : PartialOrder α\ninst✝ : SuccOrder α\na b : α\n⊢ a ≤ succ b ↔ a = succ b ∨ a ≤ b\n[PROOFSTEP]\nby_cases hb : IsMax b\n[GOAL]\ncase pos\nα : Type u_1\ninst✝¹ : PartialOrder α\ninst✝ : SuccOrder α\na b : α\nhb : IsMax b\n⊢ a ≤ succ b ↔ a = succ b ∨ a ≤ b\n[PROOFSTEP]\nrw [hb.succ_eq, or_iff_right_of_imp le_of_eq]\n[GOAL]\ncase neg\nα : Type u_1\ninst✝¹ : PartialOrder α\ninst✝ : SuccOrder α\na b : α\nhb : ¬IsMax b\n⊢ a ≤ succ b ↔ a = succ b ∨ a ≤ b\n[PROOFSTEP]\nrw [← lt_succ_iff_of_not_isMax hb, le_iff_eq_or_lt]\n[GOAL]\nα : Type u_1\ninst✝¹ : PartialOrder α\ninst✝ : SuccOrder α\na b : α\nh : a ≤ succ b\n⊢ Icc a (succ b) = insert (succ b) (Icc a b)\n[PROOFSTEP]\nsimp_rw [← Ici_inter_Iic, Iic_succ, inter_insert_of_mem (mem_Ici.2 h)]\n[GOAL]\nα : Type u_1\ninst✝¹ : PartialOrder α\ninst✝ : SuccOrder α\na b : α\nh : a < succ b\n⊢ Ioc a (succ b) = insert (succ b) (Ioc a b)\n[PROOFSTEP]\nsimp_rw [← Ioi_inter_Iic, Iic_succ, inter_insert_of_mem (mem_Ioi.2 h)]\n[GOAL]\nα : Type u_1\ninst✝¹ : PartialOrder α\ninst✝ : SuccOrder α\na b : α\nh₁ : a ≤ b\nh₂ : ¬IsMax b\n⊢ Ico a (succ b) = insert b (Ico a b)\n[PROOFSTEP]\nsimp_rw [← Iio_inter_Ici, Iio_succ_eq_insert_of_not_isMax h₂, insert_inter_of_mem (mem_Ici.2 h₁)]\n[GOAL]\nα : Type u_1\ninst✝¹ : PartialOrder α\ninst✝ : SuccOrder α\na b : α\nh₁ : a < b\nh₂ : ¬IsMax b\n⊢ Ioo a (succ b) = insert b (Ioo a b)\n[PROOFSTEP]\nsimp_rw [← Iio_inter_Ioi, Iio_succ_eq_insert_of_not_isMax h₂, insert_inter_of_mem (mem_Ioi.2 h₁)]\n[GOAL]\nα : Type u_1\ninst✝² : PartialOrder α\ninst✝¹ : SuccOrder α\na b : α\ninst✝ : NoMaxOrder α\n⊢ succ a = b → a ⋖ b\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nα : Type u_1\ninst✝² : PartialOrder α\ninst✝¹ : SuccOrder α\na : α\ninst✝ : NoMaxOrder α\n⊢ a ⋖ succ a\n[PROOFSTEP]\nexact covby_succ _\n[GOAL]\nα : Type u_1\ninst✝² : PartialOrder α\ninst✝¹ : SuccOrder α\na b : α\ninst✝ : OrderTop α\n⊢ succ ⊤ = ⊤\n[PROOFSTEP]\nrw [succ_eq_iff_isMax, isMax_iff_eq_top]\n[GOAL]\nα : Type u_1\ninst✝³ : PartialOrder α\ninst✝² : SuccOrder α\na b : α\ninst✝¹ : OrderBot α\ninst✝ : NoMaxOrder α\n⊢ a < succ ⊥ ↔ a = ⊥\n[PROOFSTEP]\nrw [lt_succ_iff, le_bot_iff]\n[GOAL]\nα : Type u_1\ninst✝² : PartialOrder α\ninst✝¹ : SuccOrder α\na b : α\ninst✝ : OrderBot α\n⊢ a ≤ succ ⊥ ↔ a = ⊥ ∨ a = succ ⊥\n[PROOFSTEP]\nrw [le_succ_iff_eq_or_le, le_bot_iff, or_comm]\n[GOAL]\nα : Type u_1\ninst✝ : PartialOrder α\n⊢ ∀ (a b : SuccOrder α), a = b\n[PROOFSTEP]\nintro h₀ h₁\n[GOAL]\nα : Type u_1\ninst✝ : PartialOrder α\nh₀ h₁ : SuccOrder α\n⊢ h₀ = h₁\n[PROOFSTEP]\next a\n[GOAL]\ncase succ.h\nα : Type u_1\ninst✝ : PartialOrder α\nh₀ h₁ : SuccOrder α\na : α\n⊢ SuccOrder.succ a = SuccOrder.succ a\n[PROOFSTEP]\nby_cases ha : IsMax a\n[GOAL]\ncase pos\nα : Type u_1\ninst✝ : PartialOrder α\nh₀ h₁ : SuccOrder α\na : α\nha : IsMax a\n⊢ SuccOrder.succ a = SuccOrder.succ a\n[PROOFSTEP]\nexact (@IsMax.succ_eq _ _ h₀ _ ha).trans ha.succ_eq.symm\n[GOAL]\ncase neg\nα : Type u_1\ninst✝ : PartialOrder α\nh₀ h₁ : SuccOrder α\na : α\nha : ¬IsMax a\n⊢ SuccOrder.succ a = SuccOrder.succ a\n[PROOFSTEP]\nexact @Covby.succ_eq _ _ h₀ _ _ (covby_succ_of_not_isMax ha)\n[GOAL]\nα : Type u_1\ninst✝¹ : CompleteLattice α\ninst✝ : SuccOrder α\na : α\n⊢ succ a = ⨅ (b : α) (_ : a < b), b\n[PROOFSTEP]\nrefine' le_antisymm (le_iInf fun b => le_iInf succ_le_of_lt) _\n[GOAL]\nα : Type u_1\ninst✝¹ : CompleteLattice α\ninst✝ : SuccOrder α\na : α\n⊢ ⨅ (b : α) (_ : a < b), b ≤ succ a\n[PROOFSTEP]\nobtain rfl | ha := eq_or_ne a ⊤\n[GOAL]\ncase inl\nα : Type u_1\ninst✝¹ : CompleteLattice α\ninst✝ : SuccOrder α\n⊢ ⨅ (b : α) (_ : ⊤ < b), b ≤ succ ⊤\n[PROOFSTEP]\nrw [succ_top]\n[GOAL]\ncase inl\nα : Type u_1\ninst✝¹ : CompleteLattice α\ninst✝ : SuccOrder α\n⊢ ⨅ (b : α) (_ : ⊤ < b), b ≤ ⊤\n[PROOFSTEP]\nexact le_top\n[GOAL]\ncase inr\nα : Type u_1\ninst✝¹ : CompleteLattice α\ninst✝ : SuccOrder α\na : α\nha : a ≠ ⊤\n⊢ ⨅ (b : α) (_ : a < b), b ≤ succ a\n[PROOFSTEP]\nexact iInf₂_le _ (lt_succ_iff_ne_top.2 ha)\n[GOAL]\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : PredOrder α\na b : α\nk : ℕ\nx : α\n⊢ pred^[k] x ≤ x\n[PROOFSTEP]\nconv_rhs => rw [(by simp only [Function.iterate_id, id.def] : x = id^[k] x)]\n[GOAL]\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : PredOrder α\na b : α\nk : ℕ\nx : α\n| x\n[PROOFSTEP]\nrw [(by simp only [Function.iterate_id, id.def] : x = id^[k] x)]\n[GOAL]\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : PredOrder α\na b : α\nk : ℕ\nx : α\n| x\n[PROOFSTEP]\nrw [(by simp only [Function.iterate_id, id.def] : x = id^[k] x)]\n[GOAL]\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : PredOrder α\na b : α\nk : ℕ\nx : α\n| x\n[PROOFSTEP]\nrw [(by simp only [Function.iterate_id, id.def] : x = id^[k] x)]\n[GOAL]\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : PredOrder α\na b : α\nk : ℕ\nx : α\n⊢ x = id^[k] x\n[PROOFSTEP]\nsimp only [Function.iterate_id, id.def]\n[GOAL]\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : PredOrder α\na b : α\nk : ℕ\nx : α\n⊢ pred^[k] x ≤ id^[k] x\n[PROOFSTEP]\nexact Monotone.iterate_le_of_le pred_mono pred_le k x\n[GOAL]\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : PredOrder α\na b : α\nha : ¬IsMin a\n⊢ Ioc (pred a) b = Icc a b\n[PROOFSTEP]\nrw [← Ioi_inter_Iic, Ioi_pred_of_not_isMin ha, Ici_inter_Iic]\n[GOAL]\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : PredOrder α\na b : α\nha : ¬IsMin a\n⊢ Ioo (pred a) b = Ico a b\n[PROOFSTEP]\nrw [← Ioi_inter_Iio, Ioi_pred_of_not_isMin ha, Ici_inter_Iio]\n[GOAL]\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : PredOrder α\na b : α\nha : ¬IsMin b\n⊢ Icc a (pred b) = Ico a b\n[PROOFSTEP]\nrw [← Ici_inter_Iic, Iic_pred_of_not_isMin ha, Ici_inter_Iio]\n[GOAL]\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : PredOrder α\na b : α\nha : ¬IsMin b\n⊢ Ioc a (pred b) = Ioo a b\n[PROOFSTEP]\nrw [← Ioi_inter_Iic, Iic_pred_of_not_isMin ha, Ioi_inter_Iio]\n[GOAL]\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : PredOrder α\na b : α\ninst✝ : NoMinOrder α\n⊢ pred a ≤ pred b ↔ a ≤ b\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : PredOrder α\na b : α\ninst✝ : NoMinOrder α\n⊢ pred a < pred b ↔ a < b\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\ninst✝¹ : PartialOrder α\ninst✝ : PredOrder α\na✝ b✝ a b : α\n⊢ pred a ≤ b ∧ b ≤ a ↔ b = a ∨ b = pred a\n[PROOFSTEP]\nrefine' ⟨fun h => or_iff_not_imp_left.2 fun hba : b ≠ a => (le_pred_of_lt <| h.2.lt_of_ne hba).antisymm h.1, _⟩\n[GOAL]\nα : Type u_1\ninst✝¹ : PartialOrder α\ninst✝ : PredOrder α\na✝ b✝ a b : α\n⊢ b = a ∨ b = pred a → pred a ≤ b ∧ b ≤ a\n[PROOFSTEP]\nrintro (rfl | rfl)\n[GOAL]\ncase inl\nα : Type u_1\ninst✝¹ : PartialOrder α\ninst✝ : PredOrder α\na b✝ b : α\n⊢ pred b ≤ b ∧ b ≤ b\n[PROOFSTEP]\nexact ⟨pred_le b, le_rfl⟩\n[GOAL]\ncase inr\nα : Type u_1\ninst✝¹ : PartialOrder α\ninst✝ : PredOrder α\na✝ b a : α\n⊢ pred a ≤ pred a ∧ pred a ≤ a\n[PROOFSTEP]\nexact ⟨le_rfl, pred_le a⟩\n[GOAL]\nα : Type u_1\ninst✝¹ : PartialOrder α\ninst✝ : PredOrder α\na b : α\nh : a ⩿ b\n⊢ pred b ≤ a\n[PROOFSTEP]\nobtain h | rfl := h.covby_or_eq\n[GOAL]\ncase inl\nα : Type u_1\ninst✝¹ : PartialOrder α\ninst✝ : PredOrder α\na b : α\nh✝ : a ⩿ b\nh : a ⋖ b\n⊢ pred b ≤ a\n[PROOFSTEP]\nexact (Covby.pred_eq h).le\n[GOAL]\ncase inr\nα : Type u_1\ninst✝¹ : PartialOrder α\ninst✝ : PredOrder α\na : α\nh : a ⩿ a\n⊢ pred a ≤ a\n[PROOFSTEP]\nexact pred_le _\n[GOAL]\nα : Type u_1\ninst✝¹ : PartialOrder α\ninst✝ : PredOrder α\na b : α\n⊢ pred a ≤ b ↔ b = pred a ∨ a ≤ b\n[PROOFSTEP]\nby_cases ha : IsMin a\n[GOAL]\ncase pos\nα : Type u_1\ninst✝¹ : PartialOrder α\ninst✝ : PredOrder α\na b : α\nha : IsMin a\n⊢ pred a ≤ b ↔ b = pred a ∨ a ≤ b\n[PROOFSTEP]\nrw [ha.pred_eq, or_iff_right_of_imp ge_of_eq]\n[GOAL]\ncase neg\nα : Type u_1\ninst✝¹ : PartialOrder α\ninst✝ : PredOrder α\na b : α\nha : ¬IsMin a\n⊢ pred a ≤ b ↔ b = pred a ∨ a ≤ b\n[PROOFSTEP]\nrw [← pred_lt_iff_of_not_isMin ha, le_iff_eq_or_lt, eq_comm]\n[GOAL]\nα : Type u_1\ninst✝¹ : PartialOrder α\ninst✝ : PredOrder α\na b : α\nha : ¬IsMin a\n⊢ Ioi (pred a) = insert a (Ioi a)\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nα : Type u_1\ninst✝¹ : PartialOrder α\ninst✝ : PredOrder α\na b : α\nha : ¬IsMin a\nx : α\n⊢ x ∈ Ioi (pred a) ↔ x ∈ insert a (Ioi a)\n[PROOFSTEP]\nsimp only [insert, mem_setOf, @eq_comm _ x a, mem_Ioi, Set.insert]\n[GOAL]\ncase h\nα : Type u_1\ninst✝¹ : PartialOrder α\ninst✝ : PredOrder α\na b : α\nha : ¬IsMin a\nx : α\n⊢ pred a < x ↔ a = x ∨ a < x\n[PROOFSTEP]\nexact pred_lt_iff_eq_or_lt_of_not_isMin ha\n[GOAL]\nα : Type u_1\ninst✝¹ : PartialOrder α\ninst✝ : PredOrder α\na b : α\nh : pred a ≤ b\n⊢ Icc (pred a) b = insert (pred a) (Icc a b)\n[PROOFSTEP]\nsimp_rw [← Ici_inter_Iic, Ici_pred, insert_inter_of_mem (mem_Iic.2 h)]\n[GOAL]\nα : Type u_1\ninst✝¹ : PartialOrder α\ninst✝ : PredOrder α\na b : α\nh : pred a < b\n⊢ Ico (pred a) b = insert (pred a) (Ico a b)\n[PROOFSTEP]\nsimp_rw [← Ici_inter_Iio, Ici_pred, insert_inter_of_mem (mem_Iio.2 h)]\n[GOAL]\nα : Type u_1\ninst✝² : PartialOrder α\ninst✝¹ : PredOrder α\na b : α\ninst✝ : NoMinOrder α\n⊢ pred a = pred b ↔ a = b\n[PROOFSTEP]\nsimp_rw [eq_iff_le_not_lt, pred_le_pred_iff, pred_lt_pred_iff]\n[GOAL]\nα : Type u_1\ninst✝² : PartialOrder α\ninst✝¹ : PredOrder α\na b : α\ninst✝ : NoMinOrder α\n⊢ pred b = a → a ⋖ b\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nα : Type u_1\ninst✝² : PartialOrder α\ninst✝¹ : PredOrder α\nb : α\ninst✝ : NoMinOrder α\n⊢ pred b ⋖ b\n[PROOFSTEP]\nexact pred_covby _\n[GOAL]\nα : Type u_1\ninst✝² : PartialOrder α\ninst✝¹ : PredOrder α\na b : α\ninst✝ : NoMinOrder α\nh : a ≤ b\n⊢ Ioc (pred a) b = insert a (Ioc a b)\n[PROOFSTEP]\nsimp_rw [← Ioi_inter_Iic, Ioi_pred_eq_insert, insert_inter_of_mem (mem_Iic.2 h)]\n[GOAL]\nα : Type u_1\ninst✝² : PartialOrder α\ninst✝¹ : PredOrder α\na b : α\ninst✝ : NoMinOrder α\nh : a < b\n⊢ Ioo (pred a) b = insert a (Ioo a b)\n[PROOFSTEP]\nsimp_rw [← Ioi_inter_Iio, Ioi_pred_eq_insert, insert_inter_of_mem (mem_Iio.2 h)]\n[GOAL]\nα : Type u_1\ninst✝ : PartialOrder α\n⊢ ∀ (a b : PredOrder α), a = b\n[PROOFSTEP]\nintro h₀ h₁\n[GOAL]\nα : Type u_1\ninst✝ : PartialOrder α\nh₀ h₁ : PredOrder α\n⊢ h₀ = h₁\n[PROOFSTEP]\next a\n[GOAL]\ncase pred.h\nα : Type u_1\ninst✝ : PartialOrder α\nh₀ h₁ : PredOrder α\na : α\n⊢ PredOrder.pred a = PredOrder.pred a\n[PROOFSTEP]\nby_cases ha : IsMin a\n[GOAL]\ncase pos\nα : Type u_1\ninst✝ : PartialOrder α\nh₀ h₁ : PredOrder α\na : α\nha : IsMin a\n⊢ PredOrder.pred a = PredOrder.pred a\n[PROOFSTEP]\nexact (@IsMin.pred_eq _ _ h₀ _ ha).trans ha.pred_eq.symm\n[GOAL]\ncase neg\nα : Type u_1\ninst✝ : PartialOrder α\nh₀ h₁ : PredOrder α\na : α\nha : ¬IsMin a\n⊢ PredOrder.pred a = PredOrder.pred a\n[PROOFSTEP]\nexact @Covby.pred_eq _ _ h₀ _ _ (pred_covby_of_not_isMin ha)\n[GOAL]\nα : Type u_1\ninst✝¹ : CompleteLattice α\ninst✝ : PredOrder α\na : α\n⊢ pred a = ⨆ (b : α) (_ : b < a), b\n[PROOFSTEP]\nrefine' le_antisymm _ (iSup_le fun b => iSup_le le_pred_of_lt)\n[GOAL]\nα : Type u_1\ninst✝¹ : CompleteLattice α\ninst✝ : PredOrder α\na : α\n⊢ pred a ≤ ⨆ (b : α) (_ : b < a), b\n[PROOFSTEP]\nobtain rfl | ha := eq_or_ne a ⊥\n[GOAL]\ncase inl\nα : Type u_1\ninst✝¹ : CompleteLattice α\ninst✝ : PredOrder α\n⊢ pred ⊥ ≤ ⨆ (b : α) (_ : b < ⊥), b\n[PROOFSTEP]\nrw [pred_bot]\n[GOAL]\ncase inl\nα : Type u_1\ninst✝¹ : CompleteLattice α\ninst✝ : PredOrder α\n⊢ ⊥ ≤ ⨆ (b : α) (_ : b < ⊥), b\n[PROOFSTEP]\nexact bot_le\n[GOAL]\ncase inr\nα : Type u_1\ninst✝¹ : CompleteLattice α\ninst✝ : PredOrder α\na : α\nha : a ≠ ⊥\n⊢ pred a ≤ ⨆ (b : α) (_ : b < a), b\n[PROOFSTEP]\nexact @le_iSup₂ _ _ (fun b => b < a) _ (fun a _ => a) (pred a) (pred_lt_iff_ne_bot.2 ha)\n[GOAL]\nα : Type u_1\ninst✝² : PartialOrder α\ninst✝¹ : SuccOrder α\ninst✝ : PredOrder α\na b i : α\nn : ℕ\nhin : ¬IsMax (succ^[n - 1] i)\n⊢ pred^[n] (succ^[n] i) = i\n[PROOFSTEP]\ninduction' n with n hn\n[GOAL]\ncase zero\nα : Type u_1\ninst✝² : PartialOrder α\ninst✝¹ : SuccOrder α\ninst✝ : PredOrder α\na b i : α\nn : ℕ\nhin✝ : ¬IsMax (succ^[n - 1] i)\nhin : ¬IsMax (succ^[Nat.zero - 1] i)\n⊢ pred^[Nat.zero] (succ^[Nat.zero] i) = i\n[PROOFSTEP]\nsimp only [Nat.zero_eq, Function.iterate_zero, id.def]\n[GOAL]\ncase succ\nα : Type u_1\ninst✝² : PartialOrder α\ninst✝¹ : SuccOrder α\ninst✝ : PredOrder α\na b i : α\nn✝ : ℕ\nhin✝ : ¬IsMax (succ^[n✝ - 1] i)\nn : ℕ\nhn : ¬IsMax (succ^[n - 1] i) → pred^[n] (succ^[n] i) = i\nhin : ¬IsMax (succ^[Nat.succ n - 1] i)\n⊢ pred^[Nat.succ n] (succ^[Nat.succ n] i) = i\n[PROOFSTEP]\nrw [Nat.succ_sub_succ_eq_sub, Nat.sub_zero] at hin \n[GOAL]\ncase succ\nα : Type u_1\ninst✝² : PartialOrder α\ninst✝¹ : SuccOrder α\ninst✝ : PredOrder α\na b i : α\nn✝ : ℕ\nhin✝ : ¬IsMax (succ^[n✝ - 1] i)\nn : ℕ\nhn : ¬IsMax (succ^[n - 1] i) → pred^[n] (succ^[n] i) = i\nhin : ¬IsMax (succ^[n] i)\n⊢ pred^[Nat.succ n] (succ^[Nat.succ n] i) = i\n[PROOFSTEP]\nhave h_not_max : ¬IsMax (succ^[n - 1] i) := by\n  cases' n with n\n  · simpa using hin\n  rw [Nat.succ_sub_succ_eq_sub, Nat.sub_zero] at hn ⊢\n  have h_sub_le : succ^[n] i ≤ succ^[n.succ] i :=\n    by\n    rw [Function.iterate_succ']\n    exact le_succ _\n  refine' fun h_max => hin fun j hj => _\n  have hj_le : j ≤ succ^[n] i := h_max (h_sub_le.trans hj)\n  exact hj_le.trans h_sub_le\n[GOAL]\nα : Type u_1\ninst✝² : PartialOrder α\ninst✝¹ : SuccOrder α\ninst✝ : PredOrder α\na b i : α\nn✝ : ℕ\nhin✝ : ¬IsMax (succ^[n✝ - 1] i)\nn : ℕ\nhn : ¬IsMax (succ^[n - 1] i) → pred^[n] (succ^[n] i) = i\nhin : ¬IsMax (succ^[n] i)\n⊢ ¬IsMax (succ^[n - 1] i)\n[PROOFSTEP]\ncases' n with n\n[GOAL]\ncase zero\nα : Type u_1\ninst✝² : PartialOrder α\ninst✝¹ : SuccOrder α\ninst✝ : PredOrder α\na b i : α\nn : ℕ\nhin✝ : ¬IsMax (succ^[n - 1] i)\nhn : ¬IsMax (succ^[Nat.zero - 1] i) → pred^[Nat.zero] (succ^[Nat.zero] i) = i\nhin : ¬IsMax (succ^[Nat.zero] i)\n⊢ ¬IsMax (succ^[Nat.zero - 1] i)\n[PROOFSTEP]\nsimpa using hin\n[GOAL]\ncase succ\nα : Type u_1\ninst✝² : PartialOrder α\ninst✝¹ : SuccOrder α\ninst✝ : PredOrder α\na b i : α\nn✝ : ℕ\nhin✝ : ¬IsMax (succ^[n✝ - 1] i)\nn : ℕ\nhn : ¬IsMax (succ^[Nat.succ n - 1] i) → pred^[Nat.succ n] (succ^[Nat.succ n] i) = i\nhin : ¬IsMax (succ^[Nat.succ n] i)\n⊢ ¬IsMax (succ^[Nat.succ n - 1] i)\n[PROOFSTEP]\nrw [Nat.succ_sub_succ_eq_sub, Nat.sub_zero] at hn ⊢\n[GOAL]\ncase succ\nα : Type u_1\ninst✝² : PartialOrder α\ninst✝¹ : SuccOrder α\ninst✝ : PredOrder α\na b i : α\nn✝ : ℕ\nhin✝ : ¬IsMax (succ^[n✝ - 1] i)\nn : ℕ\nhn : ¬IsMax (succ^[n] i) → pred^[Nat.succ n] (succ^[Nat.succ n] i) = i\nhin : ¬IsMax (succ^[Nat.succ n] i)\n⊢ ¬IsMax (succ^[n] i)\n[PROOFSTEP]\nhave h_sub_le : succ^[n] i ≤ succ^[n.succ] i :=\n  by\n  rw [Function.iterate_succ']\n  exact le_succ _\n[GOAL]\nα : Type u_1\ninst✝² : PartialOrder α\ninst✝¹ : SuccOrder α\ninst✝ : PredOrder α\na b i : α\nn✝ : ℕ\nhin✝ : ¬IsMax (succ^[n✝ - 1] i)\nn : ℕ\nhn : ¬IsMax (succ^[n] i) → pred^[Nat.succ n] (succ^[Nat.succ n] i) = i\nhin : ¬IsMax (succ^[Nat.succ n] i)\n⊢ succ^[n] i ≤ succ^[Nat.succ n] i\n[PROOFSTEP]\nrw [Function.iterate_succ']\n[GOAL]\nα : Type u_1\ninst✝² : PartialOrder α\ninst✝¹ : SuccOrder α\ninst✝ : PredOrder α\na b i : α\nn✝ : ℕ\nhin✝ : ¬IsMax (succ^[n✝ - 1] i)\nn : ℕ\nhn : ¬IsMax (succ^[n] i) → pred^[Nat.succ n] (succ^[Nat.succ n] i) = i\nhin : ¬IsMax (succ^[Nat.succ n] i)\n⊢ succ^[n] i ≤ (succ ∘ succ^[n]) i\n[PROOFSTEP]\nexact le_succ _\n[GOAL]\ncase succ\nα : Type u_1\ninst✝² : PartialOrder α\ninst✝¹ : SuccOrder α\ninst✝ : PredOrder α\na b i : α\nn✝ : ℕ\nhin✝ : ¬IsMax (succ^[n✝ - 1] i)\nn : ℕ\nhn : ¬IsMax (succ^[n] i) → pred^[Nat.succ n] (succ^[Nat.succ n] i) = i\nhin : ¬IsMax (succ^[Nat.succ n] i)\nh_sub_le : succ^[n] i ≤ succ^[Nat.succ n] i\n⊢ ¬IsMax (succ^[n] i)\n[PROOFSTEP]\nrefine' fun h_max => hin fun j hj => _\n[GOAL]\ncase succ\nα : Type u_1\ninst✝² : PartialOrder α\ninst✝¹ : SuccOrder α\ninst✝ : PredOrder α\na b i : α\nn✝ : ℕ\nhin✝ : ¬IsMax (succ^[n✝ - 1] i)\nn : ℕ\nhn : ¬IsMax (succ^[n] i) → pred^[Nat.succ n] (succ^[Nat.succ n] i) = i\nhin : ¬IsMax (succ^[Nat.succ n] i)\nh_sub_le : succ^[n] i ≤ succ^[Nat.succ n] i\nh_max : IsMax (succ^[n] i)\nj : α\nhj : succ^[Nat.succ n] i ≤ j\n⊢ j ≤ succ^[Nat.succ n] i\n[PROOFSTEP]\nhave hj_le : j ≤ succ^[n] i := h_max (h_sub_le.trans hj)\n[GOAL]\ncase succ\nα : Type u_1\ninst✝² : PartialOrder α\ninst✝¹ : SuccOrder α\ninst✝ : PredOrder α\na b i : α\nn✝ : ℕ\nhin✝ : ¬IsMax (succ^[n✝ - 1] i)\nn : ℕ\nhn : ¬IsMax (succ^[n] i) → pred^[Nat.succ n] (succ^[Nat.succ n] i) = i\nhin : ¬IsMax (succ^[Nat.succ n] i)\nh_sub_le : succ^[n] i ≤ succ^[Nat.succ n] i\nh_max : IsMax (succ^[n] i)\nj : α\nhj : succ^[Nat.succ n] i ≤ j\nhj_le : j ≤ succ^[n] i\n⊢ j ≤ succ^[Nat.succ n] i\n[PROOFSTEP]\nexact hj_le.trans h_sub_le\n[GOAL]\ncase succ\nα : Type u_1\ninst✝² : PartialOrder α\ninst✝¹ : SuccOrder α\ninst✝ : PredOrder α\na b i : α\nn✝ : ℕ\nhin✝ : ¬IsMax (succ^[n✝ - 1] i)\nn : ℕ\nhn : ¬IsMax (succ^[n - 1] i) → pred^[n] (succ^[n] i) = i\nhin : ¬IsMax (succ^[n] i)\nh_not_max : ¬IsMax (succ^[n - 1] i)\n⊢ pred^[Nat.succ n] (succ^[Nat.succ n] i) = i\n[PROOFSTEP]\nrw [Function.iterate_succ, Function.iterate_succ']\n[GOAL]\ncase succ\nα : Type u_1\ninst✝² : PartialOrder α\ninst✝¹ : SuccOrder α\ninst✝ : PredOrder α\na b i : α\nn✝ : ℕ\nhin✝ : ¬IsMax (succ^[n✝ - 1] i)\nn : ℕ\nhn : ¬IsMax (succ^[n - 1] i) → pred^[n] (succ^[n] i) = i\nhin : ¬IsMax (succ^[n] i)\nh_not_max : ¬IsMax (succ^[n - 1] i)\n⊢ (pred^[n] ∘ pred) ((succ ∘ succ^[n]) i) = i\n[PROOFSTEP]\nsimp only [Function.comp_apply]\n[GOAL]\ncase succ\nα : Type u_1\ninst✝² : PartialOrder α\ninst✝¹ : SuccOrder α\ninst✝ : PredOrder α\na b i : α\nn✝ : ℕ\nhin✝ : ¬IsMax (succ^[n✝ - 1] i)\nn : ℕ\nhn : ¬IsMax (succ^[n - 1] i) → pred^[n] (succ^[n] i) = i\nhin : ¬IsMax (succ^[n] i)\nh_not_max : ¬IsMax (succ^[n - 1] i)\n⊢ pred^[n] (pred (succ (succ^[n] i))) = i\n[PROOFSTEP]\nrw [pred_succ_of_not_isMax hin]\n[GOAL]\ncase succ\nα : Type u_1\ninst✝² : PartialOrder α\ninst✝¹ : SuccOrder α\ninst✝ : PredOrder α\na b i : α\nn✝ : ℕ\nhin✝ : ¬IsMax (succ^[n✝ - 1] i)\nn : ℕ\nhn : ¬IsMax (succ^[n - 1] i) → pred^[n] (succ^[n] i) = i\nhin : ¬IsMax (succ^[n] i)\nh_not_max : ¬IsMax (succ^[n - 1] i)\n⊢ pred^[n] (succ^[n] i) = i\n[PROOFSTEP]\nexact hn h_not_max\n[GOAL]\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : PartialOrder α\ninst✝¹ : OrderTop α\ninst✝ : SuccOrder α\na : WithTop α\n⊢ a ≤\n    (fun a =>\n        match a with\n        | none => ⊤\n        | Option.some a => if a = ⊤ then ⊤ else ↑(succ a))\n      a\n[PROOFSTEP]\ncases' a with a a\n[GOAL]\ncase none\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : PartialOrder α\ninst✝¹ : OrderTop α\ninst✝ : SuccOrder α\n⊢ none ≤\n    (fun a =>\n        match a with\n        | none => ⊤\n        | Option.some a => if a = ⊤ then ⊤ else ↑(succ a))\n      none\n[PROOFSTEP]\nexact le_top\n[GOAL]\ncase some\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : PartialOrder α\ninst✝¹ : OrderTop α\ninst✝ : SuccOrder α\na : α\n⊢ Option.some a ≤\n    (fun a =>\n        match a with\n        | none => ⊤\n        | Option.some a => if a = ⊤ then ⊤ else ↑(succ a))\n      (Option.some a)\n[PROOFSTEP]\nchange _ ≤ ite _ _ _\n[GOAL]\ncase some\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : PartialOrder α\ninst✝¹ : OrderTop α\ninst✝ : SuccOrder α\na : α\n⊢ Option.some a ≤ if a = ⊤ then ⊤ else ↑(succ a)\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : PartialOrder α\ninst✝¹ : OrderTop α\ninst✝ : SuccOrder α\na : α\nh✝ : a = ⊤\n⊢ Option.some a ≤ ⊤\n[PROOFSTEP]\nexact le_top\n[GOAL]\ncase neg\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : PartialOrder α\ninst✝¹ : OrderTop α\ninst✝ : SuccOrder α\na : α\nh✝ : ¬a = ⊤\n⊢ Option.some a ≤ ↑(succ a)\n[PROOFSTEP]\nexact some_le_some.2 (le_succ a)\n[GOAL]\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : PartialOrder α\ninst✝¹ : OrderTop α\ninst✝ : SuccOrder α\na : WithTop α\nha :\n  (fun a =>\n        match a with\n        | none => ⊤\n        | Option.some a => if a = ⊤ then ⊤ else ↑(succ a))\n      a ≤\n    a\n⊢ IsMax a\n[PROOFSTEP]\ncases a\n[GOAL]\ncase none\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : PartialOrder α\ninst✝¹ : OrderTop α\ninst✝ : SuccOrder α\nha :\n  (fun a =>\n        match a with\n        | none => ⊤\n        | Option.some a => if a = ⊤ then ⊤ else ↑(succ a))\n      none ≤\n    none\n⊢ IsMax none\n[PROOFSTEP]\nexact isMax_top\n[GOAL]\ncase some\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : PartialOrder α\ninst✝¹ : OrderTop α\ninst✝ : SuccOrder α\nval✝ : α\nha :\n  (fun a =>\n        match a with\n        | none => ⊤\n        | Option.some a => if a = ⊤ then ⊤ else ↑(succ a))\n      (Option.some val✝) ≤\n    Option.some val✝\n⊢ IsMax (Option.some val✝)\n[PROOFSTEP]\ndsimp only at ha \n[GOAL]\ncase some\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : PartialOrder α\ninst✝¹ : OrderTop α\ninst✝ : SuccOrder α\nval✝ : α\nha : (if val✝ = ⊤ then ⊤ else ↑(succ val✝)) ≤ Option.some val✝\n⊢ IsMax (Option.some val✝)\n[PROOFSTEP]\nsplit_ifs at ha  with ha'\n[GOAL]\ncase pos\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : PartialOrder α\ninst✝¹ : OrderTop α\ninst✝ : SuccOrder α\nval✝ : α\nha' : val✝ = ⊤\nha : ⊤ ≤ Option.some val✝\n⊢ IsMax (Option.some val✝)\n[PROOFSTEP]\nexact (not_top_le_coe _ ha).elim\n[GOAL]\ncase neg\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : PartialOrder α\ninst✝¹ : OrderTop α\ninst✝ : SuccOrder α\nval✝ : α\nha' : ¬val✝ = ⊤\nha : ↑(succ val✝) ≤ Option.some val✝\n⊢ IsMax (Option.some val✝)\n[PROOFSTEP]\nrw [some_eq_coe, coe_le_coe, succ_le_iff_eq_top] at ha \n[GOAL]\ncase neg\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : PartialOrder α\ninst✝¹ : OrderTop α\ninst✝ : SuccOrder α\nval✝ : α\nha' : ¬val✝ = ⊤\nha✝ : succ val✝ ≤ val✝\nha : val✝ = ⊤\n⊢ IsMax (Option.some val✝)\n[PROOFSTEP]\nexact (ha' ha).elim\n[GOAL]\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : PartialOrder α\ninst✝¹ : OrderTop α\ninst✝ : SuccOrder α\na b : WithTop α\nh : a < b\n⊢ (fun a =>\n        match a with\n        | none => ⊤\n        | Option.some a => if a = ⊤ then ⊤ else ↑(succ a))\n      a ≤\n    b\n[PROOFSTEP]\ncases b\n[GOAL]\ncase none\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : PartialOrder α\ninst✝¹ : OrderTop α\ninst✝ : SuccOrder α\na : WithTop α\nh : a < none\n⊢ (fun a =>\n        match a with\n        | none => ⊤\n        | Option.some a => if a = ⊤ then ⊤ else ↑(succ a))\n      a ≤\n    none\n[PROOFSTEP]\nexact le_top\n[GOAL]\ncase some\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : PartialOrder α\ninst✝¹ : OrderTop α\ninst✝ : SuccOrder α\na : WithTop α\nval✝ : α\nh : a < Option.some val✝\n⊢ (fun a =>\n        match a with\n        | none => ⊤\n        | Option.some a => if a = ⊤ then ⊤ else ↑(succ a))\n      a ≤\n    Option.some val✝\n[PROOFSTEP]\ncases a\n[GOAL]\ncase some.none\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : PartialOrder α\ninst✝¹ : OrderTop α\ninst✝ : SuccOrder α\nval✝ : α\nh : none < Option.some val✝\n⊢ (fun a =>\n        match a with\n        | none => ⊤\n        | Option.some a => if a = ⊤ then ⊤ else ↑(succ a))\n      none ≤\n    Option.some val✝\n[PROOFSTEP]\nexact (not_top_lt h).elim\n[GOAL]\ncase some.some\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : PartialOrder α\ninst✝¹ : OrderTop α\ninst✝ : SuccOrder α\nval✝¹ val✝ : α\nh : Option.some val✝ < Option.some val✝¹\n⊢ (fun a =>\n        match a with\n        | none => ⊤\n        | Option.some a => if a = ⊤ then ⊤ else ↑(succ a))\n      (Option.some val✝) ≤\n    Option.some val✝¹\n[PROOFSTEP]\nrw [some_lt_some] at h \n[GOAL]\ncase some.some\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : PartialOrder α\ninst✝¹ : OrderTop α\ninst✝ : SuccOrder α\nval✝¹ val✝ : α\nh : val✝ < val✝¹\n⊢ (fun a =>\n        match a with\n        | none => ⊤\n        | Option.some a => if a = ⊤ then ⊤ else ↑(succ a))\n      (Option.some val✝) ≤\n    Option.some val✝¹\n[PROOFSTEP]\nchange ite _ _ _ ≤ _\n[GOAL]\ncase some.some\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : PartialOrder α\ninst✝¹ : OrderTop α\ninst✝ : SuccOrder α\nval✝¹ val✝ : α\nh : val✝ < val✝¹\n⊢ (if val✝ = ⊤ then ⊤ else ↑(succ val✝)) ≤ Option.some val✝¹\n[PROOFSTEP]\nsplit_ifs with ha\n[GOAL]\ncase pos\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : PartialOrder α\ninst✝¹ : OrderTop α\ninst✝ : SuccOrder α\nval✝¹ val✝ : α\nh : val✝ < val✝¹\nha : val✝ = ⊤\n⊢ ⊤ ≤ Option.some val✝¹\n[PROOFSTEP]\nrw [ha] at h \n[GOAL]\ncase pos\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : PartialOrder α\ninst✝¹ : OrderTop α\ninst✝ : SuccOrder α\nval✝¹ val✝ : α\nh : ⊤ < val✝¹\nha : val✝ = ⊤\n⊢ ⊤ ≤ Option.some val✝¹\n[PROOFSTEP]\nexact (not_top_lt h).elim\n[GOAL]\ncase neg\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : PartialOrder α\ninst✝¹ : OrderTop α\ninst✝ : SuccOrder α\nval✝¹ val✝ : α\nh : val✝ < val✝¹\nha : ¬val✝ = ⊤\n⊢ ↑(succ val✝) ≤ Option.some val✝¹\n[PROOFSTEP]\nexact some_le_some.2 (succ_le_of_lt h)\n[GOAL]\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : PartialOrder α\ninst✝¹ : OrderTop α\ninst✝ : SuccOrder α\na b : WithTop α\nh :\n  a <\n    (fun a =>\n        match a with\n        | none => ⊤\n        | Option.some a => if a = ⊤ then ⊤ else ↑(succ a))\n      b\n⊢ a ≤ b\n[PROOFSTEP]\ncases a\n[GOAL]\ncase none\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : PartialOrder α\ninst✝¹ : OrderTop α\ninst✝ : SuccOrder α\nb : WithTop α\nh :\n  none <\n    (fun a =>\n        match a with\n        | none => ⊤\n        | Option.some a => if a = ⊤ then ⊤ else ↑(succ a))\n      b\n⊢ none ≤ b\n[PROOFSTEP]\nexact (not_top_lt h).elim\n[GOAL]\ncase some\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : PartialOrder α\ninst✝¹ : OrderTop α\ninst✝ : SuccOrder α\nb : WithTop α\nval✝ : α\nh :\n  Option.some val✝ <\n    (fun a =>\n        match a with\n        | none => ⊤\n        | Option.some a => if a = ⊤ then ⊤ else ↑(succ a))\n      b\n⊢ Option.some val✝ ≤ b\n[PROOFSTEP]\ncases b\n[GOAL]\ncase some.none\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : PartialOrder α\ninst✝¹ : OrderTop α\ninst✝ : SuccOrder α\nval✝ : α\nh :\n  Option.some val✝ <\n    (fun a =>\n        match a with\n        | none => ⊤\n        | Option.some a => if a = ⊤ then ⊤ else ↑(succ a))\n      none\n⊢ Option.some val✝ ≤ none\n[PROOFSTEP]\nexact le_top\n[GOAL]\ncase some.some\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : PartialOrder α\ninst✝¹ : OrderTop α\ninst✝ : SuccOrder α\nval✝¹ val✝ : α\nh :\n  Option.some val✝¹ <\n    (fun a =>\n        match a with\n        | none => ⊤\n        | Option.some a => if a = ⊤ then ⊤ else ↑(succ a))\n      (Option.some val✝)\n⊢ Option.some val✝¹ ≤ Option.some val✝\n[PROOFSTEP]\ndsimp only at h \n[GOAL]\ncase some.some\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : PartialOrder α\ninst✝¹ : OrderTop α\ninst✝ : SuccOrder α\nval✝¹ val✝ : α\nh : Option.some val✝¹ < if val✝ = ⊤ then ⊤ else ↑(succ val✝)\n⊢ Option.some val✝¹ ≤ Option.some val✝\n[PROOFSTEP]\nrw [some_le_some]\n[GOAL]\ncase some.some\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : PartialOrder α\ninst✝¹ : OrderTop α\ninst✝ : SuccOrder α\nval✝¹ val✝ : α\nh : Option.some val✝¹ < if val✝ = ⊤ then ⊤ else ↑(succ val✝)\n⊢ val✝¹ ≤ val✝\n[PROOFSTEP]\nsplit_ifs at h  with hb\n[GOAL]\ncase pos\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : PartialOrder α\ninst✝¹ : OrderTop α\ninst✝ : SuccOrder α\nval✝¹ val✝ : α\nhb : val✝ = ⊤\nh : Option.some val✝¹ < ⊤\n⊢ val✝¹ ≤ val✝\n[PROOFSTEP]\nrw [hb]\n[GOAL]\ncase pos\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : PartialOrder α\ninst✝¹ : OrderTop α\ninst✝ : SuccOrder α\nval✝¹ val✝ : α\nhb : val✝ = ⊤\nh : Option.some val✝¹ < ⊤\n⊢ val✝¹ ≤ ⊤\n[PROOFSTEP]\nexact le_top\n[GOAL]\ncase neg\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : PartialOrder α\ninst✝¹ : OrderTop α\ninst✝ : SuccOrder α\nval✝¹ val✝ : α\nhb : ¬val✝ = ⊤\nh : Option.some val✝¹ < ↑(succ val✝)\n⊢ val✝¹ ≤ val✝\n[PROOFSTEP]\nexact le_of_lt_succ (some_lt_some.1 h)\n[GOAL]\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : OrderTop α\ninst✝ : PredOrder α\na : WithTop α\nha :\n  a ≤\n    (fun a =>\n        match a with\n        | none => ↑⊤\n        | Option.some a => ↑(pred a))\n      a\n⊢ IsMin a\n[PROOFSTEP]\ncases a\n[GOAL]\ncase none\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : OrderTop α\ninst✝ : PredOrder α\nha :\n  none ≤\n    (fun a =>\n        match a with\n        | none => ↑⊤\n        | Option.some a => ↑(pred a))\n      none\n⊢ IsMin none\n[PROOFSTEP]\nexact ((coe_lt_top (⊤ : α)).not_le ha).elim\n[GOAL]\ncase some\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : OrderTop α\ninst✝ : PredOrder α\nval✝ : α\nha :\n  Option.some val✝ ≤\n    (fun a =>\n        match a with\n        | none => ↑⊤\n        | Option.some a => ↑(pred a))\n      (Option.some val✝)\n⊢ IsMin (Option.some val✝)\n[PROOFSTEP]\nexact (min_of_le_pred <| some_le_some.1 ha).withTop\n[GOAL]\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : OrderTop α\ninst✝ : PredOrder α\na b : WithTop α\nh : a < b\n⊢ a ≤\n    (fun a =>\n        match a with\n        | none => ↑⊤\n        | Option.some a => ↑(pred a))\n      b\n[PROOFSTEP]\ncases a\n[GOAL]\ncase none\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : OrderTop α\ninst✝ : PredOrder α\nb : WithTop α\nh : none < b\n⊢ none ≤\n    (fun a =>\n        match a with\n        | none => ↑⊤\n        | Option.some a => ↑(pred a))\n      b\n[PROOFSTEP]\nexact (le_top.not_lt h).elim\n[GOAL]\ncase some\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : OrderTop α\ninst✝ : PredOrder α\nb : WithTop α\nval✝ : α\nh : Option.some val✝ < b\n⊢ Option.some val✝ ≤\n    (fun a =>\n        match a with\n        | none => ↑⊤\n        | Option.some a => ↑(pred a))\n      b\n[PROOFSTEP]\ncases b\n[GOAL]\ncase some.none\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : OrderTop α\ninst✝ : PredOrder α\nval✝ : α\nh : Option.some val✝ < none\n⊢ Option.some val✝ ≤\n    (fun a =>\n        match a with\n        | none => ↑⊤\n        | Option.some a => ↑(pred a))\n      none\n[PROOFSTEP]\nexact some_le_some.2 le_top\n[GOAL]\ncase some.some\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : OrderTop α\ninst✝ : PredOrder α\nval✝¹ val✝ : α\nh : Option.some val✝¹ < Option.some val✝\n⊢ Option.some val✝¹ ≤\n    (fun a =>\n        match a with\n        | none => ↑⊤\n        | Option.some a => ↑(pred a))\n      (Option.some val✝)\n[PROOFSTEP]\nexact some_le_some.2 (le_pred_of_lt <| some_lt_some.1 h)\n[GOAL]\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : OrderTop α\ninst✝ : PredOrder α\na b : WithTop α\nh :\n  (fun a =>\n        match a with\n        | none => ↑⊤\n        | Option.some a => ↑(pred a))\n      a <\n    b\n⊢ a ≤ b\n[PROOFSTEP]\ncases b\n[GOAL]\ncase none\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : OrderTop α\ninst✝ : PredOrder α\na : WithTop α\nh :\n  (fun a =>\n        match a with\n        | none => ↑⊤\n        | Option.some a => ↑(pred a))\n      a <\n    none\n⊢ a ≤ none\n[PROOFSTEP]\nexact le_top\n[GOAL]\ncase some\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : OrderTop α\ninst✝ : PredOrder α\na : WithTop α\nval✝ : α\nh :\n  (fun a =>\n        match a with\n        | none => ↑⊤\n        | Option.some a => ↑(pred a))\n      a <\n    Option.some val✝\n⊢ a ≤ Option.some val✝\n[PROOFSTEP]\ncases a\n[GOAL]\ncase some.none\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : OrderTop α\ninst✝ : PredOrder α\nval✝ : α\nh :\n  (fun a =>\n        match a with\n        | none => ↑⊤\n        | Option.some a => ↑(pred a))\n      none <\n    Option.some val✝\n⊢ none ≤ Option.some val✝\n[PROOFSTEP]\nexact (not_top_lt <| some_lt_some.1 h).elim\n[GOAL]\ncase some.some\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : OrderTop α\ninst✝ : PredOrder α\nval✝¹ val✝ : α\nh :\n  (fun a =>\n        match a with\n        | none => ↑⊤\n        | Option.some a => ↑(pred a))\n      (Option.some val✝) <\n    Option.some val✝¹\n⊢ Option.some val✝ ≤ Option.some val✝¹\n[PROOFSTEP]\nexact some_le_some.2 (le_of_pred_lt <| some_lt_some.1 h)\n[GOAL]\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : OrderTop α\ninst✝ : PredOrder α\na : WithTop α\nha : a ≠ ⊤\n⊢ pred a ≠ ⊤\n[PROOFSTEP]\ninduction a using WithTop.recTopCoe\n[GOAL]\ncase top\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : OrderTop α\ninst✝ : PredOrder α\nha : ⊤ ≠ ⊤\n⊢ pred ⊤ ≠ ⊤\n[PROOFSTEP]\nsimp\n[GOAL]\ncase coe\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : OrderTop α\ninst✝ : PredOrder α\na✝ : α\nha : ↑a✝ ≠ ⊤\n⊢ pred ↑a✝ ≠ ⊤\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : NoMaxOrder α\ninst✝ : SuccOrder α\na : WithTop α\n⊢ a ≤\n    (fun a =>\n        match a with\n        | none => ⊤\n        | Option.some a => ↑(succ a))\n      a\n[PROOFSTEP]\ncases' a with a a\n[GOAL]\ncase none\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : NoMaxOrder α\ninst✝ : SuccOrder α\n⊢ none ≤\n    (fun a =>\n        match a with\n        | none => ⊤\n        | Option.some a => ↑(succ a))\n      none\n[PROOFSTEP]\nexact le_top\n[GOAL]\ncase some\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : NoMaxOrder α\ninst✝ : SuccOrder α\na : α\n⊢ Option.some a ≤\n    (fun a =>\n        match a with\n        | none => ⊤\n        | Option.some a => ↑(succ a))\n      (Option.some a)\n[PROOFSTEP]\nexact some_le_some.2 (le_succ a)\n[GOAL]\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : NoMaxOrder α\ninst✝ : SuccOrder α\na : WithTop α\nha :\n  (fun a =>\n        match a with\n        | none => ⊤\n        | Option.some a => ↑(succ a))\n      a ≤\n    a\n⊢ IsMax a\n[PROOFSTEP]\ncases a\n[GOAL]\ncase none\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : NoMaxOrder α\ninst✝ : SuccOrder α\nha :\n  (fun a =>\n        match a with\n        | none => ⊤\n        | Option.some a => ↑(succ a))\n      none ≤\n    none\n⊢ IsMax none\n[PROOFSTEP]\nexact isMax_top\n[GOAL]\ncase some\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : NoMaxOrder α\ninst✝ : SuccOrder α\nval✝ : α\nha :\n  (fun a =>\n        match a with\n        | none => ⊤\n        | Option.some a => ↑(succ a))\n      (Option.some val✝) ≤\n    Option.some val✝\n⊢ IsMax (Option.some val✝)\n[PROOFSTEP]\nexact (not_isMax _ <| max_of_succ_le <| some_le_some.1 ha).elim\n[GOAL]\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : NoMaxOrder α\ninst✝ : SuccOrder α\na b : WithTop α\nh : a < b\n⊢ (fun a =>\n        match a with\n        | none => ⊤\n        | Option.some a => ↑(succ a))\n      a ≤\n    b\n[PROOFSTEP]\ncases a\n[GOAL]\ncase none\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : NoMaxOrder α\ninst✝ : SuccOrder α\nb : WithTop α\nh : none < b\n⊢ (fun a =>\n        match a with\n        | none => ⊤\n        | Option.some a => ↑(succ a))\n      none ≤\n    b\n[PROOFSTEP]\nexact (not_top_lt h).elim\n[GOAL]\ncase some\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : NoMaxOrder α\ninst✝ : SuccOrder α\nb : WithTop α\nval✝ : α\nh : Option.some val✝ < b\n⊢ (fun a =>\n        match a with\n        | none => ⊤\n        | Option.some a => ↑(succ a))\n      (Option.some val✝) ≤\n    b\n[PROOFSTEP]\ncases b\n[GOAL]\ncase some.none\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : NoMaxOrder α\ninst✝ : SuccOrder α\nval✝ : α\nh : Option.some val✝ < none\n⊢ (fun a =>\n        match a with\n        | none => ⊤\n        | Option.some a => ↑(succ a))\n      (Option.some val✝) ≤\n    none\n[PROOFSTEP]\nexact le_top\n[GOAL]\ncase some.some\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : NoMaxOrder α\ninst✝ : SuccOrder α\nval✝¹ val✝ : α\nh : Option.some val✝¹ < Option.some val✝\n⊢ (fun a =>\n        match a with\n        | none => ⊤\n        | Option.some a => ↑(succ a))\n      (Option.some val✝¹) ≤\n    Option.some val✝\n[PROOFSTEP]\nexact some_le_some.2 (succ_le_of_lt <| some_lt_some.1 h)\n[GOAL]\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : NoMaxOrder α\ninst✝ : SuccOrder α\na b : WithTop α\nh :\n  a <\n    (fun a =>\n        match a with\n        | none => ⊤\n        | Option.some a => ↑(succ a))\n      b\n⊢ a ≤ b\n[PROOFSTEP]\ncases a\n[GOAL]\ncase none\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : NoMaxOrder α\ninst✝ : SuccOrder α\nb : WithTop α\nh :\n  none <\n    (fun a =>\n        match a with\n        | none => ⊤\n        | Option.some a => ↑(succ a))\n      b\n⊢ none ≤ b\n[PROOFSTEP]\nexact (not_top_lt h).elim\n[GOAL]\ncase some\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : NoMaxOrder α\ninst✝ : SuccOrder α\nb : WithTop α\nval✝ : α\nh :\n  Option.some val✝ <\n    (fun a =>\n        match a with\n        | none => ⊤\n        | Option.some a => ↑(succ a))\n      b\n⊢ Option.some val✝ ≤ b\n[PROOFSTEP]\ncases b\n[GOAL]\ncase some.none\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : NoMaxOrder α\ninst✝ : SuccOrder α\nval✝ : α\nh :\n  Option.some val✝ <\n    (fun a =>\n        match a with\n        | none => ⊤\n        | Option.some a => ↑(succ a))\n      none\n⊢ Option.some val✝ ≤ none\n[PROOFSTEP]\nexact le_top\n[GOAL]\ncase some.some\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : NoMaxOrder α\ninst✝ : SuccOrder α\nval✝¹ val✝ : α\nh :\n  Option.some val✝¹ <\n    (fun a =>\n        match a with\n        | none => ⊤\n        | Option.some a => ↑(succ a))\n      (Option.some val✝)\n⊢ Option.some val✝¹ ≤ Option.some val✝\n[PROOFSTEP]\nexact some_le_some.2 (le_of_lt_succ <| some_lt_some.1 h)\n[GOAL]\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : NoMaxOrder α\nhα : Nonempty α\n⊢ PredOrder (WithTop α) → False\n[PROOFSTEP]\nintro\n[GOAL]\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : NoMaxOrder α\nhα : Nonempty α\na✝ : PredOrder (WithTop α)\n⊢ False\n[PROOFSTEP]\ncases' h : pred (⊤ : WithTop α) with a ha\n[GOAL]\ncase none\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : NoMaxOrder α\nhα : Nonempty α\na✝ : PredOrder (WithTop α)\nh : pred ⊤ = none\n⊢ False\n[PROOFSTEP]\nexact hα.elim fun a => (min_of_le_pred h.ge).not_lt <| coe_lt_top a\n[GOAL]\ncase some\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : NoMaxOrder α\nhα : Nonempty α\na✝ : PredOrder (WithTop α)\na : α\nh : pred ⊤ = Option.some a\n⊢ False\n[PROOFSTEP]\nobtain ⟨c, hc⟩ := exists_gt a\n[GOAL]\ncase some.intro\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : NoMaxOrder α\nhα : Nonempty α\na✝ : PredOrder (WithTop α)\na : α\nh : pred ⊤ = Option.some a\nc : α\nhc : a < c\n⊢ False\n[PROOFSTEP]\nrw [← some_lt_some, ← h] at hc \n[GOAL]\ncase some.intro\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : NoMaxOrder α\nhα : Nonempty α\na✝ : PredOrder (WithTop α)\na : α\nh : pred ⊤ = Option.some a\nc : α\nhc : pred ⊤ < Option.some c\n⊢ False\n[PROOFSTEP]\nexact (le_of_pred_lt hc).not_lt (some_lt_none _)\n[GOAL]\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : OrderBot α\ninst✝ : SuccOrder α\na : WithBot α\nha :\n  (fun a =>\n        match a with\n        | none => ↑⊥\n        | Option.some a => ↑(succ a))\n      a ≤\n    a\n⊢ IsMax a\n[PROOFSTEP]\ncases a\n[GOAL]\ncase none\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : OrderBot α\ninst✝ : SuccOrder α\nha :\n  (fun a =>\n        match a with\n        | none => ↑⊥\n        | Option.some a => ↑(succ a))\n      none ≤\n    none\n⊢ IsMax none\n[PROOFSTEP]\nexact ((none_lt_some (⊥ : α)).not_le ha).elim\n[GOAL]\ncase some\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : OrderBot α\ninst✝ : SuccOrder α\nval✝ : α\nha :\n  (fun a =>\n        match a with\n        | none => ↑⊥\n        | Option.some a => ↑(succ a))\n      (Option.some val✝) ≤\n    Option.some val✝\n⊢ IsMax (Option.some val✝)\n[PROOFSTEP]\nexact (max_of_succ_le <| some_le_some.1 ha).withBot\n[GOAL]\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : OrderBot α\ninst✝ : SuccOrder α\na b : WithBot α\nh : a < b\n⊢ (fun a =>\n        match a with\n        | none => ↑⊥\n        | Option.some a => ↑(succ a))\n      a ≤\n    b\n[PROOFSTEP]\ncases b\n[GOAL]\ncase none\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : OrderBot α\ninst✝ : SuccOrder α\na : WithBot α\nh : a < none\n⊢ (fun a =>\n        match a with\n        | none => ↑⊥\n        | Option.some a => ↑(succ a))\n      a ≤\n    none\n[PROOFSTEP]\nexact (not_lt_bot h).elim\n[GOAL]\ncase some\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : OrderBot α\ninst✝ : SuccOrder α\na : WithBot α\nval✝ : α\nh : a < Option.some val✝\n⊢ (fun a =>\n        match a with\n        | none => ↑⊥\n        | Option.some a => ↑(succ a))\n      a ≤\n    Option.some val✝\n[PROOFSTEP]\ncases a\n[GOAL]\ncase some.none\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : OrderBot α\ninst✝ : SuccOrder α\nval✝ : α\nh : none < Option.some val✝\n⊢ (fun a =>\n        match a with\n        | none => ↑⊥\n        | Option.some a => ↑(succ a))\n      none ≤\n    Option.some val✝\n[PROOFSTEP]\nexact some_le_some.2 bot_le\n[GOAL]\ncase some.some\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : OrderBot α\ninst✝ : SuccOrder α\nval✝¹ val✝ : α\nh : Option.some val✝ < Option.some val✝¹\n⊢ (fun a =>\n        match a with\n        | none => ↑⊥\n        | Option.some a => ↑(succ a))\n      (Option.some val✝) ≤\n    Option.some val✝¹\n[PROOFSTEP]\nexact some_le_some.2 (succ_le_of_lt <| some_lt_some.1 h)\n[GOAL]\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : OrderBot α\ninst✝ : SuccOrder α\na b : WithBot α\nh :\n  a <\n    (fun a =>\n        match a with\n        | none => ↑⊥\n        | Option.some a => ↑(succ a))\n      b\n⊢ a ≤ b\n[PROOFSTEP]\ncases a\n[GOAL]\ncase none\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : OrderBot α\ninst✝ : SuccOrder α\nb : WithBot α\nh :\n  none <\n    (fun a =>\n        match a with\n        | none => ↑⊥\n        | Option.some a => ↑(succ a))\n      b\n⊢ none ≤ b\n[PROOFSTEP]\nexact bot_le\n[GOAL]\ncase some\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : OrderBot α\ninst✝ : SuccOrder α\nb : WithBot α\nval✝ : α\nh :\n  Option.some val✝ <\n    (fun a =>\n        match a with\n        | none => ↑⊥\n        | Option.some a => ↑(succ a))\n      b\n⊢ Option.some val✝ ≤ b\n[PROOFSTEP]\ncases b\n[GOAL]\ncase some.none\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : OrderBot α\ninst✝ : SuccOrder α\nval✝ : α\nh :\n  Option.some val✝ <\n    (fun a =>\n        match a with\n        | none => ↑⊥\n        | Option.some a => ↑(succ a))\n      none\n⊢ Option.some val✝ ≤ none\n[PROOFSTEP]\nexact (not_lt_bot <| some_lt_some.1 h).elim\n[GOAL]\ncase some.some\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : OrderBot α\ninst✝ : SuccOrder α\nval✝¹ val✝ : α\nh :\n  Option.some val✝¹ <\n    (fun a =>\n        match a with\n        | none => ↑⊥\n        | Option.some a => ↑(succ a))\n      (Option.some val✝)\n⊢ Option.some val✝¹ ≤ Option.some val✝\n[PROOFSTEP]\nexact some_le_some.2 (le_of_lt_succ <| some_lt_some.1 h)\n[GOAL]\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : OrderBot α\ninst✝ : SuccOrder α\na : WithBot α\nha : a ≠ ⊥\n⊢ succ a ≠ ⊥\n[PROOFSTEP]\ninduction a using WithBot.recBotCoe\n[GOAL]\ncase bot\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : OrderBot α\ninst✝ : SuccOrder α\nha : ⊥ ≠ ⊥\n⊢ succ ⊥ ≠ ⊥\n[PROOFSTEP]\nsimp\n[GOAL]\ncase coe\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : OrderBot α\ninst✝ : SuccOrder α\na✝ : α\nha : ↑a✝ ≠ ⊥\n⊢ succ ↑a✝ ≠ ⊥\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : PartialOrder α\ninst✝¹ : OrderBot α\ninst✝ : PredOrder α\na : WithBot α\n⊢ (fun a =>\n        match a with\n        | none => ⊥\n        | Option.some a => if a = ⊥ then ⊥ else ↑(pred a))\n      a ≤\n    a\n[PROOFSTEP]\ncases' a with a a\n[GOAL]\ncase none\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : PartialOrder α\ninst✝¹ : OrderBot α\ninst✝ : PredOrder α\n⊢ (fun a =>\n        match a with\n        | none => ⊥\n        | Option.some a => if a = ⊥ then ⊥ else ↑(pred a))\n      none ≤\n    none\n[PROOFSTEP]\nexact bot_le\n[GOAL]\ncase some\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : PartialOrder α\ninst✝¹ : OrderBot α\ninst✝ : PredOrder α\na : α\n⊢ (fun a =>\n        match a with\n        | none => ⊥\n        | Option.some a => if a = ⊥ then ⊥ else ↑(pred a))\n      (Option.some a) ≤\n    Option.some a\n[PROOFSTEP]\nchange ite _ _ _ ≤ _\n[GOAL]\ncase some\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : PartialOrder α\ninst✝¹ : OrderBot α\ninst✝ : PredOrder α\na : α\n⊢ (if a = ⊥ then ⊥ else ↑(pred a)) ≤ Option.some a\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : PartialOrder α\ninst✝¹ : OrderBot α\ninst✝ : PredOrder α\na : α\nh✝ : a = ⊥\n⊢ ⊥ ≤ Option.some a\n[PROOFSTEP]\nexact bot_le\n[GOAL]\ncase neg\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : PartialOrder α\ninst✝¹ : OrderBot α\ninst✝ : PredOrder α\na : α\nh✝ : ¬a = ⊥\n⊢ ↑(pred a) ≤ Option.some a\n[PROOFSTEP]\nexact some_le_some.2 (pred_le a)\n[GOAL]\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : PartialOrder α\ninst✝¹ : OrderBot α\ninst✝ : PredOrder α\na : WithBot α\nha :\n  a ≤\n    (fun a =>\n        match a with\n        | none => ⊥\n        | Option.some a => if a = ⊥ then ⊥ else ↑(pred a))\n      a\n⊢ IsMin a\n[PROOFSTEP]\ncases' a with a a\n[GOAL]\ncase none\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : PartialOrder α\ninst✝¹ : OrderBot α\ninst✝ : PredOrder α\nha :\n  none ≤\n    (fun a =>\n        match a with\n        | none => ⊥\n        | Option.some a => if a = ⊥ then ⊥ else ↑(pred a))\n      none\n⊢ IsMin none\n[PROOFSTEP]\nexact isMin_bot\n[GOAL]\ncase some\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : PartialOrder α\ninst✝¹ : OrderBot α\ninst✝ : PredOrder α\na : α\nha :\n  Option.some a ≤\n    (fun a =>\n        match a with\n        | none => ⊥\n        | Option.some a => if a = ⊥ then ⊥ else ↑(pred a))\n      (Option.some a)\n⊢ IsMin (Option.some a)\n[PROOFSTEP]\ndsimp only at ha \n[GOAL]\ncase some\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : PartialOrder α\ninst✝¹ : OrderBot α\ninst✝ : PredOrder α\na : α\nha : Option.some a ≤ if a = ⊥ then ⊥ else ↑(pred a)\n⊢ IsMin (Option.some a)\n[PROOFSTEP]\nsplit_ifs at ha  with ha'\n[GOAL]\ncase pos\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : PartialOrder α\ninst✝¹ : OrderBot α\ninst✝ : PredOrder α\na : α\nha' : a = ⊥\nha : Option.some a ≤ ⊥\n⊢ IsMin (Option.some a)\n[PROOFSTEP]\nexact (not_coe_le_bot _ ha).elim\n[GOAL]\ncase neg\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : PartialOrder α\ninst✝¹ : OrderBot α\ninst✝ : PredOrder α\na : α\nha' : ¬a = ⊥\nha : Option.some a ≤ ↑(pred a)\n⊢ IsMin (Option.some a)\n[PROOFSTEP]\nrw [some_eq_coe, coe_le_coe, le_pred_iff_eq_bot] at ha \n[GOAL]\ncase neg\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : PartialOrder α\ninst✝¹ : OrderBot α\ninst✝ : PredOrder α\na : α\nha' : ¬a = ⊥\nha✝ : a ≤ pred a\nha : a = ⊥\n⊢ IsMin (Option.some a)\n[PROOFSTEP]\nexact (ha' ha).elim\n[GOAL]\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : PartialOrder α\ninst✝¹ : OrderBot α\ninst✝ : PredOrder α\na b : WithBot α\nh : a < b\n⊢ a ≤\n    (fun a =>\n        match a with\n        | none => ⊥\n        | Option.some a => if a = ⊥ then ⊥ else ↑(pred a))\n      b\n[PROOFSTEP]\ncases a\n[GOAL]\ncase none\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : PartialOrder α\ninst✝¹ : OrderBot α\ninst✝ : PredOrder α\nb : WithBot α\nh : none < b\n⊢ none ≤\n    (fun a =>\n        match a with\n        | none => ⊥\n        | Option.some a => if a = ⊥ then ⊥ else ↑(pred a))\n      b\n[PROOFSTEP]\nexact bot_le\n[GOAL]\ncase some\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : PartialOrder α\ninst✝¹ : OrderBot α\ninst✝ : PredOrder α\nb : WithBot α\nval✝ : α\nh : Option.some val✝ < b\n⊢ Option.some val✝ ≤\n    (fun a =>\n        match a with\n        | none => ⊥\n        | Option.some a => if a = ⊥ then ⊥ else ↑(pred a))\n      b\n[PROOFSTEP]\ncases b\n[GOAL]\ncase some.none\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : PartialOrder α\ninst✝¹ : OrderBot α\ninst✝ : PredOrder α\nval✝ : α\nh : Option.some val✝ < none\n⊢ Option.some val✝ ≤\n    (fun a =>\n        match a with\n        | none => ⊥\n        | Option.some a => if a = ⊥ then ⊥ else ↑(pred a))\n      none\n[PROOFSTEP]\nexact (not_lt_bot h).elim\n[GOAL]\ncase some.some\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : PartialOrder α\ninst✝¹ : OrderBot α\ninst✝ : PredOrder α\nval✝¹ val✝ : α\nh : Option.some val✝¹ < Option.some val✝\n⊢ Option.some val✝¹ ≤\n    (fun a =>\n        match a with\n        | none => ⊥\n        | Option.some a => if a = ⊥ then ⊥ else ↑(pred a))\n      (Option.some val✝)\n[PROOFSTEP]\nrw [some_lt_some] at h \n[GOAL]\ncase some.some\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : PartialOrder α\ninst✝¹ : OrderBot α\ninst✝ : PredOrder α\nval✝¹ val✝ : α\nh : val✝¹ < val✝\n⊢ Option.some val✝¹ ≤\n    (fun a =>\n        match a with\n        | none => ⊥\n        | Option.some a => if a = ⊥ then ⊥ else ↑(pred a))\n      (Option.some val✝)\n[PROOFSTEP]\nchange _ ≤ ite _ _ _\n[GOAL]\ncase some.some\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : PartialOrder α\ninst✝¹ : OrderBot α\ninst✝ : PredOrder α\nval✝¹ val✝ : α\nh : val✝¹ < val✝\n⊢ Option.some val✝¹ ≤ if val✝ = ⊥ then ⊥ else ↑(pred val✝)\n[PROOFSTEP]\nsplit_ifs with hb\n[GOAL]\ncase pos\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : PartialOrder α\ninst✝¹ : OrderBot α\ninst✝ : PredOrder α\nval✝¹ val✝ : α\nh : val✝¹ < val✝\nhb : val✝ = ⊥\n⊢ Option.some val✝¹ ≤ ⊥\n[PROOFSTEP]\nrw [hb] at h \n[GOAL]\ncase pos\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : PartialOrder α\ninst✝¹ : OrderBot α\ninst✝ : PredOrder α\nval✝¹ val✝ : α\nh : val✝¹ < ⊥\nhb : val✝ = ⊥\n⊢ Option.some val✝¹ ≤ ⊥\n[PROOFSTEP]\nexact (not_lt_bot h).elim\n[GOAL]\ncase neg\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : PartialOrder α\ninst✝¹ : OrderBot α\ninst✝ : PredOrder α\nval✝¹ val✝ : α\nh : val✝¹ < val✝\nhb : ¬val✝ = ⊥\n⊢ Option.some val✝¹ ≤ ↑(pred val✝)\n[PROOFSTEP]\nexact some_le_some.2 (le_pred_of_lt h)\n[GOAL]\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : PartialOrder α\ninst✝¹ : OrderBot α\ninst✝ : PredOrder α\na b : WithBot α\nh :\n  (fun a =>\n        match a with\n        | none => ⊥\n        | Option.some a => if a = ⊥ then ⊥ else ↑(pred a))\n      a <\n    b\n⊢ a ≤ b\n[PROOFSTEP]\ncases b\n[GOAL]\ncase none\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : PartialOrder α\ninst✝¹ : OrderBot α\ninst✝ : PredOrder α\na : WithBot α\nh :\n  (fun a =>\n        match a with\n        | none => ⊥\n        | Option.some a => if a = ⊥ then ⊥ else ↑(pred a))\n      a <\n    none\n⊢ a ≤ none\n[PROOFSTEP]\nexact (not_lt_bot h).elim\n[GOAL]\ncase some\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : PartialOrder α\ninst✝¹ : OrderBot α\ninst✝ : PredOrder α\na : WithBot α\nval✝ : α\nh :\n  (fun a =>\n        match a with\n        | none => ⊥\n        | Option.some a => if a = ⊥ then ⊥ else ↑(pred a))\n      a <\n    Option.some val✝\n⊢ a ≤ Option.some val✝\n[PROOFSTEP]\ncases a\n[GOAL]\ncase some.none\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : PartialOrder α\ninst✝¹ : OrderBot α\ninst✝ : PredOrder α\nval✝ : α\nh :\n  (fun a =>\n        match a with\n        | none => ⊥\n        | Option.some a => if a = ⊥ then ⊥ else ↑(pred a))\n      none <\n    Option.some val✝\n⊢ none ≤ Option.some val✝\n[PROOFSTEP]\nexact bot_le\n[GOAL]\ncase some.some\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : PartialOrder α\ninst✝¹ : OrderBot α\ninst✝ : PredOrder α\nval✝¹ val✝ : α\nh :\n  (fun a =>\n        match a with\n        | none => ⊥\n        | Option.some a => if a = ⊥ then ⊥ else ↑(pred a))\n      (Option.some val✝) <\n    Option.some val✝¹\n⊢ Option.some val✝ ≤ Option.some val✝¹\n[PROOFSTEP]\ndsimp only at h \n[GOAL]\ncase some.some\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : PartialOrder α\ninst✝¹ : OrderBot α\ninst✝ : PredOrder α\nval✝¹ val✝ : α\nh : (if val✝ = ⊥ then ⊥ else ↑(pred val✝)) < Option.some val✝¹\n⊢ Option.some val✝ ≤ Option.some val✝¹\n[PROOFSTEP]\nrw [some_le_some]\n[GOAL]\ncase some.some\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : PartialOrder α\ninst✝¹ : OrderBot α\ninst✝ : PredOrder α\nval✝¹ val✝ : α\nh : (if val✝ = ⊥ then ⊥ else ↑(pred val✝)) < Option.some val✝¹\n⊢ val✝ ≤ val✝¹\n[PROOFSTEP]\nsplit_ifs at h  with ha\n[GOAL]\ncase pos\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : PartialOrder α\ninst✝¹ : OrderBot α\ninst✝ : PredOrder α\nval✝¹ val✝ : α\nha : val✝ = ⊥\nh : ⊥ < Option.some val✝¹\n⊢ val✝ ≤ val✝¹\n[PROOFSTEP]\nrw [ha]\n[GOAL]\ncase pos\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : PartialOrder α\ninst✝¹ : OrderBot α\ninst✝ : PredOrder α\nval✝¹ val✝ : α\nha : val✝ = ⊥\nh : ⊥ < Option.some val✝¹\n⊢ ⊥ ≤ val✝¹\n[PROOFSTEP]\nexact bot_le\n[GOAL]\ncase neg\nα : Type u_1\ninst✝³ : DecidableEq α\ninst✝² : PartialOrder α\ninst✝¹ : OrderBot α\ninst✝ : PredOrder α\nval✝¹ val✝ : α\nha : ¬val✝ = ⊥\nh : ↑(pred val✝) < Option.some val✝¹\n⊢ val✝ ≤ val✝¹\n[PROOFSTEP]\nexact le_of_pred_lt (some_lt_some.1 h)\n[GOAL]\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : NoMinOrder α\nhα : Nonempty α\n⊢ SuccOrder (WithBot α) → False\n[PROOFSTEP]\nintro\n[GOAL]\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : NoMinOrder α\nhα : Nonempty α\na✝ : SuccOrder (WithBot α)\n⊢ False\n[PROOFSTEP]\ncases' h : succ (⊥ : WithBot α) with a ha\n[GOAL]\ncase none\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : NoMinOrder α\nhα : Nonempty α\na✝ : SuccOrder (WithBot α)\nh : succ ⊥ = none\n⊢ False\n[PROOFSTEP]\nexact hα.elim fun a => (max_of_succ_le h.le).not_lt <| bot_lt_coe a\n[GOAL]\ncase some\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : NoMinOrder α\nhα : Nonempty α\na✝ : SuccOrder (WithBot α)\na : α\nh : succ ⊥ = Option.some a\n⊢ False\n[PROOFSTEP]\nobtain ⟨c, hc⟩ := exists_lt a\n[GOAL]\ncase some.intro\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : NoMinOrder α\nhα : Nonempty α\na✝ : SuccOrder (WithBot α)\na : α\nh : succ ⊥ = Option.some a\nc : α\nhc : c < a\n⊢ False\n[PROOFSTEP]\nrw [← some_lt_some, ← h] at hc \n[GOAL]\ncase some.intro\nα : Type u_1\ninst✝¹ : Preorder α\ninst✝ : NoMinOrder α\nhα : Nonempty α\na✝ : SuccOrder (WithBot α)\na : α\nh : succ ⊥ = Option.some a\nc : α\nhc : Option.some c < succ ⊥\n⊢ False\n[PROOFSTEP]\nexact (le_of_lt_succ hc).not_lt (none_lt_some _)\n[GOAL]\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : NoMinOrder α\ninst✝ : PredOrder α\na : WithBot α\n⊢ (fun a =>\n        match a with\n        | none => ⊥\n        | Option.some a => ↑(pred a))\n      a ≤\n    a\n[PROOFSTEP]\ncases' a with a a\n[GOAL]\ncase none\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : NoMinOrder α\ninst✝ : PredOrder α\n⊢ (fun a =>\n        match a with\n        | none => ⊥\n        | Option.some a => ↑(pred a))\n      none ≤\n    none\n[PROOFSTEP]\nexact bot_le\n[GOAL]\ncase some\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : NoMinOrder α\ninst✝ : PredOrder α\na : α\n⊢ (fun a =>\n        match a with\n        | none => ⊥\n        | Option.some a => ↑(pred a))\n      (Option.some a) ≤\n    Option.some a\n[PROOFSTEP]\nexact some_le_some.2 (pred_le a)\n[GOAL]\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : NoMinOrder α\ninst✝ : PredOrder α\na : WithBot α\nha :\n  a ≤\n    (fun a =>\n        match a with\n        | none => ⊥\n        | Option.some a => ↑(pred a))\n      a\n⊢ IsMin a\n[PROOFSTEP]\ncases a\n[GOAL]\ncase none\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : NoMinOrder α\ninst✝ : PredOrder α\nha :\n  none ≤\n    (fun a =>\n        match a with\n        | none => ⊥\n        | Option.some a => ↑(pred a))\n      none\n⊢ IsMin none\n[PROOFSTEP]\nexact isMin_bot\n[GOAL]\ncase some\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : NoMinOrder α\ninst✝ : PredOrder α\nval✝ : α\nha :\n  Option.some val✝ ≤\n    (fun a =>\n        match a with\n        | none => ⊥\n        | Option.some a => ↑(pred a))\n      (Option.some val✝)\n⊢ IsMin (Option.some val✝)\n[PROOFSTEP]\nexact (not_isMin _ <| min_of_le_pred <| some_le_some.1 ha).elim\n[GOAL]\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : NoMinOrder α\ninst✝ : PredOrder α\na b : WithBot α\nh : a < b\n⊢ a ≤\n    (fun a =>\n        match a with\n        | none => ⊥\n        | Option.some a => ↑(pred a))\n      b\n[PROOFSTEP]\ncases b\n[GOAL]\ncase none\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : NoMinOrder α\ninst✝ : PredOrder α\na : WithBot α\nh : a < none\n⊢ a ≤\n    (fun a =>\n        match a with\n        | none => ⊥\n        | Option.some a => ↑(pred a))\n      none\n[PROOFSTEP]\nexact (not_lt_bot h).elim\n[GOAL]\ncase some\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : NoMinOrder α\ninst✝ : PredOrder α\na : WithBot α\nval✝ : α\nh : a < Option.some val✝\n⊢ a ≤\n    (fun a =>\n        match a with\n        | none => ⊥\n        | Option.some a => ↑(pred a))\n      (Option.some val✝)\n[PROOFSTEP]\ncases a\n[GOAL]\ncase some.none\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : NoMinOrder α\ninst✝ : PredOrder α\nval✝ : α\nh : none < Option.some val✝\n⊢ none ≤\n    (fun a =>\n        match a with\n        | none => ⊥\n        | Option.some a => ↑(pred a))\n      (Option.some val✝)\n[PROOFSTEP]\nexact bot_le\n[GOAL]\ncase some.some\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : NoMinOrder α\ninst✝ : PredOrder α\nval✝¹ val✝ : α\nh : Option.some val✝ < Option.some val✝¹\n⊢ Option.some val✝ ≤\n    (fun a =>\n        match a with\n        | none => ⊥\n        | Option.some a => ↑(pred a))\n      (Option.some val✝¹)\n[PROOFSTEP]\nexact some_le_some.2 (le_pred_of_lt <| some_lt_some.1 h)\n[GOAL]\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : NoMinOrder α\ninst✝ : PredOrder α\na b : WithBot α\nh :\n  (fun a =>\n        match a with\n        | none => ⊥\n        | Option.some a => ↑(pred a))\n      a <\n    b\n⊢ a ≤ b\n[PROOFSTEP]\ncases b\n[GOAL]\ncase none\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : NoMinOrder α\ninst✝ : PredOrder α\na : WithBot α\nh :\n  (fun a =>\n        match a with\n        | none => ⊥\n        | Option.some a => ↑(pred a))\n      a <\n    none\n⊢ a ≤ none\n[PROOFSTEP]\nexact (not_lt_bot h).elim\n[GOAL]\ncase some\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : NoMinOrder α\ninst✝ : PredOrder α\na : WithBot α\nval✝ : α\nh :\n  (fun a =>\n        match a with\n        | none => ⊥\n        | Option.some a => ↑(pred a))\n      a <\n    Option.some val✝\n⊢ a ≤ Option.some val✝\n[PROOFSTEP]\ncases a\n[GOAL]\ncase some.none\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : NoMinOrder α\ninst✝ : PredOrder α\nval✝ : α\nh :\n  (fun a =>\n        match a with\n        | none => ⊥\n        | Option.some a => ↑(pred a))\n      none <\n    Option.some val✝\n⊢ none ≤ Option.some val✝\n[PROOFSTEP]\nexact bot_le\n[GOAL]\ncase some.some\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : NoMinOrder α\ninst✝ : PredOrder α\nval✝¹ val✝ : α\nh :\n  (fun a =>\n        match a with\n        | none => ⊥\n        | Option.some a => ↑(pred a))\n      (Option.some val✝) <\n    Option.some val✝¹\n⊢ Option.some val✝ ≤ Option.some val✝¹\n[PROOFSTEP]\nexact some_le_some.2 (le_of_pred_lt <| some_lt_some.1 h)\n[GOAL]\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : SuccOrder α\ninst✝ : IsSuccArchimedean α\na✝ b✝ : α\na b : αᵒᵈ\nh : a ≤ b\n⊢ ∃ n, pred^[n] b = a\n[PROOFSTEP]\nconvert exists_succ_iterate_of_le h.ofDual\n[GOAL]\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : SuccOrder α\ninst✝ : IsSuccArchimedean α\na b : α\n⊢ (∃ n, succ^[n] a = b) ↔ a ≤ b\n[PROOFSTEP]\nrefine' ⟨_, exists_succ_iterate_of_le⟩\n[GOAL]\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : SuccOrder α\ninst✝ : IsSuccArchimedean α\na b : α\n⊢ (∃ n, succ^[n] a = b) → a ≤ b\n[PROOFSTEP]\nrintro ⟨n, rfl⟩\n[GOAL]\ncase intro\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : SuccOrder α\ninst✝ : IsSuccArchimedean α\na : α\nn : ℕ\n⊢ a ≤ succ^[n] a\n[PROOFSTEP]\nexact id_le_iterate_of_id_le le_succ n a\n[GOAL]\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : SuccOrder α\ninst✝ : IsSuccArchimedean α\na b : α\nP : α → Prop\nm : α\nh0 : P m\nh1 : ∀ (n : α), m ≤ n → P n → P (succ n)\nn : α\nhmn : m ≤ n\n⊢ P n\n[PROOFSTEP]\nobtain ⟨n, rfl⟩ := hmn.exists_succ_iterate\n[GOAL]\ncase intro\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : SuccOrder α\ninst✝ : IsSuccArchimedean α\na b : α\nP : α → Prop\nm : α\nh0 : P m\nh1 : ∀ (n : α), m ≤ n → P n → P (succ n)\nn : ℕ\nhmn : m ≤ succ^[n] m\n⊢ P (succ^[n] m)\n[PROOFSTEP]\nclear hmn\n[GOAL]\ncase intro\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : SuccOrder α\ninst✝ : IsSuccArchimedean α\na b : α\nP : α → Prop\nm : α\nh0 : P m\nh1 : ∀ (n : α), m ≤ n → P n → P (succ n)\nn : ℕ\n⊢ P (succ^[n] m)\n[PROOFSTEP]\ninduction' n with n ih\n[GOAL]\ncase intro.zero\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : SuccOrder α\ninst✝ : IsSuccArchimedean α\na b : α\nP : α → Prop\nm : α\nh0 : P m\nh1 : ∀ (n : α), m ≤ n → P n → P (succ n)\n⊢ P (succ^[Nat.zero] m)\n[PROOFSTEP]\nexact h0\n[GOAL]\ncase intro.succ\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : SuccOrder α\ninst✝ : IsSuccArchimedean α\na b : α\nP : α → Prop\nm : α\nh0 : P m\nh1 : ∀ (n : α), m ≤ n → P n → P (succ n)\nn : ℕ\nih : P (succ^[n] m)\n⊢ P (succ^[Nat.succ n] m)\n[PROOFSTEP]\nrw [Function.iterate_succ_apply']\n[GOAL]\ncase intro.succ\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : SuccOrder α\ninst✝ : IsSuccArchimedean α\na b : α\nP : α → Prop\nm : α\nh0 : P m\nh1 : ∀ (n : α), m ≤ n → P n → P (succ n)\nn : ℕ\nih : P (succ^[n] m)\n⊢ P (succ (succ^[n] m))\n[PROOFSTEP]\nexact h1 _ (id_le_iterate_of_id_le le_succ n m) ih\n[GOAL]\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : SuccOrder α\ninst✝ : IsSuccArchimedean α\na✝ b✝ : α\np : α → Prop\nhsucc : ∀ (a : α), p a ↔ p (succ a)\na b : α\nh : a ≤ b\n⊢ p a ↔ p b\n[PROOFSTEP]\nobtain ⟨n, rfl⟩ := h.exists_succ_iterate\n[GOAL]\ncase intro\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : SuccOrder α\ninst✝ : IsSuccArchimedean α\na✝ b : α\np : α → Prop\nhsucc : ∀ (a : α), p a ↔ p (succ a)\na : α\nn : ℕ\nh : a ≤ succ^[n] a\n⊢ p a ↔ p (succ^[n] a)\n[PROOFSTEP]\nexact Iterate.rec (fun b => p a ↔ p b) (fun c hc => hc.trans (hsucc _)) Iff.rfl n\n[GOAL]\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : PredOrder α\ninst✝ : IsPredArchimedean α\na✝ b✝ : α\na b : αᵒᵈ\nh : a ≤ b\n⊢ ∃ n, succ^[n] a = b\n[PROOFSTEP]\nconvert exists_pred_iterate_of_le h.ofDual\n[GOAL]\nα : Type u_1\ninst✝¹ : LinearOrder α\nh : IsWellOrder α fun x x_1 => x < x_1\ninst✝ : PredOrder α\na b : α\n⊢ a ≤ b → ∃ n, pred^[n] b = a\n[PROOFSTEP]\nrefine' WellFounded.fix (C := fun b => a ≤ b → ∃ n, Nat.iterate pred n b = a) h.wf _ b\n[GOAL]\nα : Type u_1\ninst✝¹ : LinearOrder α\nh : IsWellOrder α fun x x_1 => x < x_1\ninst✝ : PredOrder α\na b : α\n⊢ ∀ (x : α), (∀ (y : α), y < x → (fun b => a ≤ b → ∃ n, pred^[n] b = a) y) → (fun b => a ≤ b → ∃ n, pred^[n] b = a) x\n[PROOFSTEP]\nintros b ih hab\n[GOAL]\nα : Type u_1\ninst✝¹ : LinearOrder α\nh : IsWellOrder α fun x x_1 => x < x_1\ninst✝ : PredOrder α\na b✝ b : α\nih : ∀ (y : α), y < b → (fun b => a ≤ b → ∃ n, pred^[n] b = a) y\nhab : a ≤ b\n⊢ ∃ n, pred^[n] b = a\n[PROOFSTEP]\nreplace hab := eq_or_lt_of_le hab\n[GOAL]\nα : Type u_1\ninst✝¹ : LinearOrder α\nh : IsWellOrder α fun x x_1 => x < x_1\ninst✝ : PredOrder α\na b✝ b : α\nih : ∀ (y : α), y < b → (fun b => a ≤ b → ∃ n, pred^[n] b = a) y\nhab : a = b ∨ a < b\n⊢ ∃ n, pred^[n] b = a\n[PROOFSTEP]\nrcases hab with (rfl | hab)\n[GOAL]\ncase inl\nα : Type u_1\ninst✝¹ : LinearOrder α\nh : IsWellOrder α fun x x_1 => x < x_1\ninst✝ : PredOrder α\na b : α\nih : ∀ (y : α), y < a → (fun b => a ≤ b → ∃ n, pred^[n] b = a) y\n⊢ ∃ n, pred^[n] a = a\n[PROOFSTEP]\nexact ⟨0, rfl⟩\n[GOAL]\ncase inr\nα : Type u_1\ninst✝¹ : LinearOrder α\nh : IsWellOrder α fun x x_1 => x < x_1\ninst✝ : PredOrder α\na b✝ b : α\nih : ∀ (y : α), y < b → (fun b => a ≤ b → ∃ n, pred^[n] b = a) y\nhab : a < b\n⊢ ∃ n, pred^[n] b = a\n[PROOFSTEP]\ncases' le_or_lt b (pred b) with hb hb\n[GOAL]\ncase inr.inl\nα : Type u_1\ninst✝¹ : LinearOrder α\nh : IsWellOrder α fun x x_1 => x < x_1\ninst✝ : PredOrder α\na b✝ b : α\nih : ∀ (y : α), y < b → (fun b => a ≤ b → ∃ n, pred^[n] b = a) y\nhab : a < b\nhb : b ≤ pred b\n⊢ ∃ n, pred^[n] b = a\n[PROOFSTEP]\ncases (min_of_le_pred hb).not_lt hab\n[GOAL]\ncase inr.inr\nα : Type u_1\ninst✝¹ : LinearOrder α\nh : IsWellOrder α fun x x_1 => x < x_1\ninst✝ : PredOrder α\na b✝ b : α\nih : ∀ (y : α), y < b → (fun b => a ≤ b → ∃ n, pred^[n] b = a) y\nhab : a < b\nhb : pred b < b\n⊢ ∃ n, pred^[n] b = a\n[PROOFSTEP]\ndsimp at ih \n[GOAL]\ncase inr.inr\nα : Type u_1\ninst✝¹ : LinearOrder α\nh : IsWellOrder α fun x x_1 => x < x_1\ninst✝ : PredOrder α\na b✝ b : α\nih : ∀ (y : α), y < b → a ≤ y → ∃ n, pred^[n] y = a\nhab : a < b\nhb : pred b < b\n⊢ ∃ n, pred^[n] b = a\n[PROOFSTEP]\nobtain ⟨k, hk⟩ := ih (pred b) hb (le_pred_of_lt hab)\n[GOAL]\ncase inr.inr.intro\nα : Type u_1\ninst✝¹ : LinearOrder α\nh : IsWellOrder α fun x x_1 => x < x_1\ninst✝ : PredOrder α\na b✝ b : α\nih : ∀ (y : α), y < b → a ≤ y → ∃ n, pred^[n] y = a\nhab : a < b\nhb : pred b < b\nk : ℕ\nhk : pred^[k] (pred b) = a\n⊢ ∃ n, pred^[n] b = a\n[PROOFSTEP]\nrefine' ⟨k + 1, _⟩\n[GOAL]\ncase inr.inr.intro\nα : Type u_1\ninst✝¹ : LinearOrder α\nh : IsWellOrder α fun x x_1 => x < x_1\ninst✝ : PredOrder α\na b✝ b : α\nih : ∀ (y : α), y < b → a ≤ y → ∃ n, pred^[n] y = a\nhab : a < b\nhb : pred b < b\nk : ℕ\nhk : pred^[k] (pred b) = a\n⊢ pred^[k + 1] b = a\n[PROOFSTEP]\nrw [iterate_add_apply, iterate_one, hk]\n[GOAL]\nα : Type u_1\ninst✝¹ : LinearOrder α\nh : IsWellOrder α fun x x_1 => x > x_1\ninst✝ : SuccOrder α\n⊢ IsPredArchimedean αᵒᵈ\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u_1\ninst✝⁴ : Nontrivial α\ninst✝³ : PartialOrder α\ninst✝² : OrderBot α\ninst✝¹ : SuccOrder α\ninst✝ : IsSuccArchimedean α\nP : α → Prop\n⊢ (∀ (i : α), i ≠ ⊥ → P i) ↔ ∀ (i : α), P (succ i)\n[PROOFSTEP]\nrefine' ⟨fun h i ↦ h _ (Order.succ_ne_bot i), fun h i hi ↦ _⟩\n[GOAL]\nα : Type u_1\ninst✝⁴ : Nontrivial α\ninst✝³ : PartialOrder α\ninst✝² : OrderBot α\ninst✝¹ : SuccOrder α\ninst✝ : IsSuccArchimedean α\nP : α → Prop\nh : ∀ (i : α), P (succ i)\ni : α\nhi : i ≠ ⊥\n⊢ P i\n[PROOFSTEP]\nobtain ⟨j, rfl⟩ := exists_succ_iterate_of_le (bot_le : ⊥ ≤ i)\n[GOAL]\ncase intro\nα : Type u_1\ninst✝⁴ : Nontrivial α\ninst✝³ : PartialOrder α\ninst✝² : OrderBot α\ninst✝¹ : SuccOrder α\ninst✝ : IsSuccArchimedean α\nP : α → Prop\nh : ∀ (i : α), P (succ i)\nj : ℕ\nhi : Order.succ^[j] ⊥ ≠ ⊥\n⊢ P (Order.succ^[j] ⊥)\n[PROOFSTEP]\nhave hj : 0 < j := by apply Nat.pos_of_ne_zero; contrapose! hi; simp [hi]\n[GOAL]\nα : Type u_1\ninst✝⁴ : Nontrivial α\ninst✝³ : PartialOrder α\ninst✝² : OrderBot α\ninst✝¹ : SuccOrder α\ninst✝ : IsSuccArchimedean α\nP : α → Prop\nh : ∀ (i : α), P (succ i)\nj : ℕ\nhi : Order.succ^[j] ⊥ ≠ ⊥\n⊢ 0 < j\n[PROOFSTEP]\napply Nat.pos_of_ne_zero\n[GOAL]\ncase a\nα : Type u_1\ninst✝⁴ : Nontrivial α\ninst✝³ : PartialOrder α\ninst✝² : OrderBot α\ninst✝¹ : SuccOrder α\ninst✝ : IsSuccArchimedean α\nP : α → Prop\nh : ∀ (i : α), P (succ i)\nj : ℕ\nhi : Order.succ^[j] ⊥ ≠ ⊥\n⊢ j ≠ 0\n[PROOFSTEP]\ncontrapose! hi\n[GOAL]\ncase a\nα : Type u_1\ninst✝⁴ : Nontrivial α\ninst✝³ : PartialOrder α\ninst✝² : OrderBot α\ninst✝¹ : SuccOrder α\ninst✝ : IsSuccArchimedean α\nP : α → Prop\nh : ∀ (i : α), P (succ i)\nj : ℕ\nhi : j = 0\n⊢ Order.succ^[j] ⊥ = ⊥\n[PROOFSTEP]\nsimp [hi]\n[GOAL]\ncase intro\nα : Type u_1\ninst✝⁴ : Nontrivial α\ninst✝³ : PartialOrder α\ninst✝² : OrderBot α\ninst✝¹ : SuccOrder α\ninst✝ : IsSuccArchimedean α\nP : α → Prop\nh : ∀ (i : α), P (succ i)\nj : ℕ\nhi : Order.succ^[j] ⊥ ≠ ⊥\nhj : 0 < j\n⊢ P (Order.succ^[j] ⊥)\n[PROOFSTEP]\nrw [← Nat.succ_pred_eq_of_pos hj]\n[GOAL]\ncase intro\nα : Type u_1\ninst✝⁴ : Nontrivial α\ninst✝³ : PartialOrder α\ninst✝² : OrderBot α\ninst✝¹ : SuccOrder α\ninst✝ : IsSuccArchimedean α\nP : α → Prop\nh : ∀ (i : α), P (succ i)\nj : ℕ\nhi : Order.succ^[j] ⊥ ≠ ⊥\nhj : 0 < j\n⊢ P (Order.succ^[Nat.succ (Nat.pred j)] ⊥)\n[PROOFSTEP]\nsimp only [Function.iterate_succ', Function.comp_apply]\n[GOAL]\ncase intro\nα : Type u_1\ninst✝⁴ : Nontrivial α\ninst✝³ : PartialOrder α\ninst✝² : OrderBot α\ninst✝¹ : SuccOrder α\ninst✝ : IsSuccArchimedean α\nP : α → Prop\nh : ∀ (i : α), P (succ i)\nj : ℕ\nhi : Order.succ^[j] ⊥ ≠ ⊥\nhj : 0 < j\n⊢ P (Order.succ (Order.succ^[Nat.pred j] ⊥))\n[PROOFSTEP]\napply h\n", "meta": {"mathlib_filename": "Mathlib.Order.SuccPred.Basic", "llama_tokens": 37436, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.782662489091802, "lm_q2_score": 0.6654105521116443, "lm_q1q2_score": 0.5207918789836498}}
{"text": "[GOAL]\nX : Type u_1\nY : Type u_2\ninst✝¹ : TopologicalSpace X\ninst✝ : TopologicalSpace Y\nf : X → Y\n⊢ Tendsto f cofinite (cocompact Y) ↔ ∀ (K : Set Y), IsCompact K → Set.Finite (f ⁻¹' K)\n[PROOFSTEP]\nrw [hasBasis_cocompact.tendsto_right_iff]\n[GOAL]\nX : Type u_1\nY : Type u_2\ninst✝¹ : TopologicalSpace X\ninst✝ : TopologicalSpace Y\nf : X → Y\n⊢ (∀ (i : Set Y), IsCompact i → ∀ᶠ (x : X) in cofinite, f x ∈ iᶜ) ↔ ∀ (K : Set Y), IsCompact K → Set.Finite (f ⁻¹' K)\n[PROOFSTEP]\nrefine' forall₂_congr (fun K _ ↦ _)\n[GOAL]\nX : Type u_1\nY : Type u_2\ninst✝¹ : TopologicalSpace X\ninst✝ : TopologicalSpace Y\nf : X → Y\nK : Set Y\nx✝ : IsCompact K\n⊢ (∀ᶠ (x : X) in cofinite, f x ∈ Kᶜ) ↔ Set.Finite (f ⁻¹' K)\n[PROOFSTEP]\nsimp only [mem_compl_iff, eventually_cofinite, not_not, preimage]\n[GOAL]\nX : Type u_1\nY : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\nf : X → Y\ninst✝¹ : T1Space X\ninst✝ : LocallyCompactSpace Y\nhf' : Continuous f\nhf : Tendsto f cofinite (cocompact Y)\n⊢ DiscreteTopology X\n[PROOFSTEP]\nrefine' singletons_open_iff_discrete.mp (fun x ↦ _)\n[GOAL]\nX : Type u_1\nY : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\nf : X → Y\ninst✝¹ : T1Space X\ninst✝ : LocallyCompactSpace Y\nhf' : Continuous f\nhf : Tendsto f cofinite (cocompact Y)\nx : X\n⊢ IsOpen {x}\n[PROOFSTEP]\nobtain ⟨K : Set Y, hK : IsCompact K, hK' : K ∈ 𝓝 (f x)⟩ := exists_compact_mem_nhds (f x)\n[GOAL]\ncase intro.intro\nX : Type u_1\nY : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\nf : X → Y\ninst✝¹ : T1Space X\ninst✝ : LocallyCompactSpace Y\nhf' : Continuous f\nhf : Tendsto f cofinite (cocompact Y)\nx : X\nK : Set Y\nhK : IsCompact K\nhK' : K ∈ 𝓝 (f x)\n⊢ IsOpen {x}\n[PROOFSTEP]\nobtain ⟨U : Set Y, hU₁ : U ⊆ K, hU₂ : IsOpen U, hU₃ : f x ∈ U⟩ := mem_nhds_iff.mp hK'\n[GOAL]\ncase intro.intro.intro.intro.intro\nX : Type u_1\nY : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\nf : X → Y\ninst✝¹ : T1Space X\ninst✝ : LocallyCompactSpace Y\nhf' : Continuous f\nhf : Tendsto f cofinite (cocompact Y)\nx : X\nK : Set Y\nhK : IsCompact K\nhK' : K ∈ 𝓝 (f x)\nU : Set Y\nhU₁ : U ⊆ K\nhU₂ : IsOpen U\nhU₃ : f x ∈ U\n⊢ IsOpen {x}\n[PROOFSTEP]\nhave hU₄ : Set.Finite (f ⁻¹' U) := Finite.subset (tendsto_cofinite_cocompact_iff.mp hf K hK) (preimage_mono hU₁)\n[GOAL]\ncase intro.intro.intro.intro.intro\nX : Type u_1\nY : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\nf : X → Y\ninst✝¹ : T1Space X\ninst✝ : LocallyCompactSpace Y\nhf' : Continuous f\nhf : Tendsto f cofinite (cocompact Y)\nx : X\nK : Set Y\nhK : IsCompact K\nhK' : K ∈ 𝓝 (f x)\nU : Set Y\nhU₁ : U ⊆ K\nhU₂ : IsOpen U\nhU₃ : f x ∈ U\nhU₄ : Set.Finite (f ⁻¹' U)\n⊢ IsOpen {x}\n[PROOFSTEP]\nexact isOpen_singleton_of_finite_mem_nhds _ ((hU₂.preimage hf').mem_nhds hU₃) hU₄\n[GOAL]\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\nf : X → Y\ninst✝ : DiscreteTopology X\nhf : Tendsto f (cocompact X) (cocompact Y)\n⊢ Tendsto f cofinite (cocompact Y)\n[PROOFSTEP]\nconvert hf\n[GOAL]\ncase h.e'_4\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\nf : X → Y\ninst✝ : DiscreteTopology X\nhf : Tendsto f (cocompact X) (cocompact Y)\n⊢ cofinite = cocompact X\n[PROOFSTEP]\nrw [cocompact_eq_cofinite X]\n", "meta": {"mathlib_filename": "Mathlib.Topology.DiscreteSubset", "llama_tokens": 1588, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.785308580887758, "lm_q2_score": 0.6619228825191872, "lm_q1q2_score": 0.519813719528277}}
{"text": "[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\ninst✝³ : IsDomain R\ninst✝² : IsPrincipalIdealRing R\ninst✝¹ : IsDomain S\ninst✝ : Finite ι\nI : Ideal S\nb : Basis ι R S\nhI : I ≠ ⊥\n⊢ (S ⧸ I) ≃ₗ[R] (i : ι) → R ⧸ span {smithCoeffs b I hI i}\n[PROOFSTEP]\nhaveI := Fintype.ofFinite ι\n[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\ninst✝³ : IsDomain R\ninst✝² : IsPrincipalIdealRing R\ninst✝¹ : IsDomain S\ninst✝ : Finite ι\nI : Ideal S\nb : Basis ι R S\nhI : I ≠ ⊥\nthis : Fintype ι\n⊢ (S ⧸ I) ≃ₗ[R] (i : ι) → R ⧸ span {smithCoeffs b I hI i}\n[PROOFSTEP]\nlet a := I.smithCoeffs b hI\n[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\ninst✝³ : IsDomain R\ninst✝² : IsPrincipalIdealRing R\ninst✝¹ : IsDomain S\ninst✝ : Finite ι\nI : Ideal S\nb : Basis ι R S\nhI : I ≠ ⊥\nthis : Fintype ι\na : ι → R := smithCoeffs b I hI\n⊢ (S ⧸ I) ≃ₗ[R] (i : ι) → R ⧸ span {smithCoeffs b I hI i}\n[PROOFSTEP]\nlet b' := I.ringBasis b hI\n[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\ninst✝³ : IsDomain R\ninst✝² : IsPrincipalIdealRing R\ninst✝¹ : IsDomain S\ninst✝ : Finite ι\nI : Ideal S\nb : Basis ι R S\nhI : I ≠ ⊥\nthis : Fintype ι\na : ι → R := smithCoeffs b I hI\nb' : Basis ι R S := ringBasis b I hI\n⊢ (S ⧸ I) ≃ₗ[R] (i : ι) → R ⧸ span {smithCoeffs b I hI i}\n[PROOFSTEP]\nlet ab := I.selfBasis b hI\n[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\ninst✝³ : IsDomain R\ninst✝² : IsPrincipalIdealRing R\ninst✝¹ : IsDomain S\ninst✝ : Finite ι\nI : Ideal S\nb : Basis ι R S\nhI : I ≠ ⊥\nthis : Fintype ι\na : ι → R := smithCoeffs b I hI\nb' : Basis ι R S := ringBasis b I hI\nab : Basis ι R { x // x ∈ I } := selfBasis b I hI\n⊢ (S ⧸ I) ≃ₗ[R] (i : ι) → R ⧸ span {smithCoeffs b I hI i}\n[PROOFSTEP]\nhave ab_eq := I.selfBasis_def b hI\n[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\ninst✝³ : IsDomain R\ninst✝² : IsPrincipalIdealRing R\ninst✝¹ : IsDomain S\ninst✝ : Finite ι\nI : Ideal S\nb : Basis ι R S\nhI : I ≠ ⊥\nthis : Fintype ι\na : ι → R := smithCoeffs b I hI\nb' : Basis ι R S := ringBasis b I hI\nab : Basis ι R { x // x ∈ I } := selfBasis b I hI\nab_eq : ∀ (i : ι), ↑(↑(selfBasis b I hI) i) = smithCoeffs b I hI i • ↑(ringBasis b I hI) i\n⊢ (S ⧸ I) ≃ₗ[R] (i : ι) → R ⧸ span {smithCoeffs b I hI i}\n[PROOFSTEP]\nhave mem_I_iff : ∀ x, x ∈ I ↔ ∀ i, a i ∣ b'.repr x i := by\n  intro x\n  rw [ab.mem_ideal_iff']\n  simp_rw [ab_eq]\n  have : ∀ (c : ι → R) (i), b'.repr (∑ j : ι, c j • a j • b' j) i = a i * c i :=\n    by\n    intro c i\n    simp only [← MulAction.mul_smul, b'.repr_sum_self, mul_comm]\n  constructor\n  · rintro ⟨c, rfl⟩ i\n    exact ⟨c i, this c i⟩\n  · rintro ha\n    choose c hc using ha\n    exact\n      ⟨c, b'.ext_elem fun i => Eq.trans (hc i) (this c i).symm⟩\n        -- Now we map everything through the linear equiv `S ≃ₗ (ι → R)`,\n          -- which maps `I` to `I' := Π i, a i ℤ`.\n[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\ninst✝³ : IsDomain R\ninst✝² : IsPrincipalIdealRing R\ninst✝¹ : IsDomain S\ninst✝ : Finite ι\nI : Ideal S\nb : Basis ι R S\nhI : I ≠ ⊥\nthis : Fintype ι\na : ι → R := smithCoeffs b I hI\nb' : Basis ι R S := ringBasis b I hI\nab : Basis ι R { x // x ∈ I } := selfBasis b I hI\nab_eq : ∀ (i : ι), ↑(↑(selfBasis b I hI) i) = smithCoeffs b I hI i • ↑(ringBasis b I hI) i\n⊢ ∀ (x : S), x ∈ I ↔ ∀ (i : ι), a i ∣ ↑(↑b'.repr x) i\n[PROOFSTEP]\nintro x\n[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\ninst✝³ : IsDomain R\ninst✝² : IsPrincipalIdealRing R\ninst✝¹ : IsDomain S\ninst✝ : Finite ι\nI : Ideal S\nb : Basis ι R S\nhI : I ≠ ⊥\nthis : Fintype ι\na : ι → R := smithCoeffs b I hI\nb' : Basis ι R S := ringBasis b I hI\nab : Basis ι R { x // x ∈ I } := selfBasis b I hI\nab_eq : ∀ (i : ι), ↑(↑(selfBasis b I hI) i) = smithCoeffs b I hI i • ↑(ringBasis b I hI) i\nx : S\n⊢ x ∈ I ↔ ∀ (i : ι), a i ∣ ↑(↑b'.repr x) i\n[PROOFSTEP]\nrw [ab.mem_ideal_iff']\n[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\ninst✝³ : IsDomain R\ninst✝² : IsPrincipalIdealRing R\ninst✝¹ : IsDomain S\ninst✝ : Finite ι\nI : Ideal S\nb : Basis ι R S\nhI : I ≠ ⊥\nthis : Fintype ι\na : ι → R := smithCoeffs b I hI\nb' : Basis ι R S := ringBasis b I hI\nab : Basis ι R { x // x ∈ I } := selfBasis b I hI\nab_eq : ∀ (i : ι), ↑(↑(selfBasis b I hI) i) = smithCoeffs b I hI i • ↑(ringBasis b I hI) i\nx : S\n⊢ (∃ c, x = ∑ i : ι, c i • ↑(↑ab i)) ↔ ∀ (i : ι), a i ∣ ↑(↑b'.repr x) i\n[PROOFSTEP]\nsimp_rw [ab_eq]\n[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\ninst✝³ : IsDomain R\ninst✝² : IsPrincipalIdealRing R\ninst✝¹ : IsDomain S\ninst✝ : Finite ι\nI : Ideal S\nb : Basis ι R S\nhI : I ≠ ⊥\nthis : Fintype ι\na : ι → R := smithCoeffs b I hI\nb' : Basis ι R S := ringBasis b I hI\nab : Basis ι R { x // x ∈ I } := selfBasis b I hI\nab_eq : ∀ (i : ι), ↑(↑(selfBasis b I hI) i) = smithCoeffs b I hI i • ↑(ringBasis b I hI) i\nx : S\n⊢ (∃ c, x = ∑ x : ι, c x • smithCoeffs b I hI x • ↑(ringBasis b I hI) x) ↔\n    ∀ (i : ι), smithCoeffs b I hI i ∣ ↑(↑(ringBasis b I hI).repr x) i\n[PROOFSTEP]\nhave : ∀ (c : ι → R) (i), b'.repr (∑ j : ι, c j • a j • b' j) i = a i * c i :=\n  by\n  intro c i\n  simp only [← MulAction.mul_smul, b'.repr_sum_self, mul_comm]\n[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\ninst✝³ : IsDomain R\ninst✝² : IsPrincipalIdealRing R\ninst✝¹ : IsDomain S\ninst✝ : Finite ι\nI : Ideal S\nb : Basis ι R S\nhI : I ≠ ⊥\nthis : Fintype ι\na : ι → R := smithCoeffs b I hI\nb' : Basis ι R S := ringBasis b I hI\nab : Basis ι R { x // x ∈ I } := selfBasis b I hI\nab_eq : ∀ (i : ι), ↑(↑(selfBasis b I hI) i) = smithCoeffs b I hI i • ↑(ringBasis b I hI) i\nx : S\n⊢ ∀ (c : ι → R) (i : ι), ↑(↑b'.repr (∑ j : ι, c j • a j • ↑b' j)) i = a i * c i\n[PROOFSTEP]\nintro c i\n[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\ninst✝³ : IsDomain R\ninst✝² : IsPrincipalIdealRing R\ninst✝¹ : IsDomain S\ninst✝ : Finite ι\nI : Ideal S\nb : Basis ι R S\nhI : I ≠ ⊥\nthis : Fintype ι\na : ι → R := smithCoeffs b I hI\nb' : Basis ι R S := ringBasis b I hI\nab : Basis ι R { x // x ∈ I } := selfBasis b I hI\nab_eq : ∀ (i : ι), ↑(↑(selfBasis b I hI) i) = smithCoeffs b I hI i • ↑(ringBasis b I hI) i\nx : S\nc : ι → R\ni : ι\n⊢ ↑(↑b'.repr (∑ j : ι, c j • a j • ↑b' j)) i = a i * c i\n[PROOFSTEP]\nsimp only [← MulAction.mul_smul, b'.repr_sum_self, mul_comm]\n[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\ninst✝³ : IsDomain R\ninst✝² : IsPrincipalIdealRing R\ninst✝¹ : IsDomain S\ninst✝ : Finite ι\nI : Ideal S\nb : Basis ι R S\nhI : I ≠ ⊥\nthis✝ : Fintype ι\na : ι → R := smithCoeffs b I hI\nb' : Basis ι R S := ringBasis b I hI\nab : Basis ι R { x // x ∈ I } := selfBasis b I hI\nab_eq : ∀ (i : ι), ↑(↑(selfBasis b I hI) i) = smithCoeffs b I hI i • ↑(ringBasis b I hI) i\nx : S\nthis : ∀ (c : ι → R) (i : ι), ↑(↑b'.repr (∑ j : ι, c j • a j • ↑b' j)) i = a i * c i\n⊢ (∃ c, x = ∑ x : ι, c x • smithCoeffs b I hI x • ↑(ringBasis b I hI) x) ↔\n    ∀ (i : ι), smithCoeffs b I hI i ∣ ↑(↑(ringBasis b I hI).repr x) i\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nι : Type u_1\nR : Type u_2\nS : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\ninst✝³ : IsDomain R\ninst✝² : IsPrincipalIdealRing R\ninst✝¹ : IsDomain S\ninst✝ : Finite ι\nI : Ideal S\nb : Basis ι R S\nhI : I ≠ ⊥\nthis✝ : Fintype ι\na : ι → R := smithCoeffs b I hI\nb' : Basis ι R S := ringBasis b I hI\nab : Basis ι R { x // x ∈ I } := selfBasis b I hI\nab_eq : ∀ (i : ι), ↑(↑(selfBasis b I hI) i) = smithCoeffs b I hI i • ↑(ringBasis b I hI) i\nx : S\nthis : ∀ (c : ι → R) (i : ι), ↑(↑b'.repr (∑ j : ι, c j • a j • ↑b' j)) i = a i * c i\n⊢ (∃ c, x = ∑ x : ι, c x • smithCoeffs b I hI x • ↑(ringBasis b I hI) x) →\n    ∀ (i : ι), smithCoeffs b I hI i ∣ ↑(↑(ringBasis b I hI).repr x) i\n[PROOFSTEP]\nrintro ⟨c, rfl⟩ i\n[GOAL]\ncase mp.intro\nι : Type u_1\nR : Type u_2\nS : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\ninst✝³ : IsDomain R\ninst✝² : IsPrincipalIdealRing R\ninst✝¹ : IsDomain S\ninst✝ : Finite ι\nI : Ideal S\nb : Basis ι R S\nhI : I ≠ ⊥\nthis✝ : Fintype ι\na : ι → R := smithCoeffs b I hI\nb' : Basis ι R S := ringBasis b I hI\nab : Basis ι R { x // x ∈ I } := selfBasis b I hI\nab_eq : ∀ (i : ι), ↑(↑(selfBasis b I hI) i) = smithCoeffs b I hI i • ↑(ringBasis b I hI) i\nthis : ∀ (c : ι → R) (i : ι), ↑(↑b'.repr (∑ j : ι, c j • a j • ↑b' j)) i = a i * c i\nc : ι → R\ni : ι\n⊢ smithCoeffs b I hI i ∣ ↑(↑(ringBasis b I hI).repr (∑ x : ι, c x • smithCoeffs b I hI x • ↑(ringBasis b I hI) x)) i\n[PROOFSTEP]\nexact ⟨c i, this c i⟩\n[GOAL]\ncase mpr\nι : Type u_1\nR : Type u_2\nS : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\ninst✝³ : IsDomain R\ninst✝² : IsPrincipalIdealRing R\ninst✝¹ : IsDomain S\ninst✝ : Finite ι\nI : Ideal S\nb : Basis ι R S\nhI : I ≠ ⊥\nthis✝ : Fintype ι\na : ι → R := smithCoeffs b I hI\nb' : Basis ι R S := ringBasis b I hI\nab : Basis ι R { x // x ∈ I } := selfBasis b I hI\nab_eq : ∀ (i : ι), ↑(↑(selfBasis b I hI) i) = smithCoeffs b I hI i • ↑(ringBasis b I hI) i\nx : S\nthis : ∀ (c : ι → R) (i : ι), ↑(↑b'.repr (∑ j : ι, c j • a j • ↑b' j)) i = a i * c i\n⊢ (∀ (i : ι), smithCoeffs b I hI i ∣ ↑(↑(ringBasis b I hI).repr x) i) →\n    ∃ c, x = ∑ x : ι, c x • smithCoeffs b I hI x • ↑(ringBasis b I hI) x\n[PROOFSTEP]\nrintro ha\n[GOAL]\ncase mpr\nι : Type u_1\nR : Type u_2\nS : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\ninst✝³ : IsDomain R\ninst✝² : IsPrincipalIdealRing R\ninst✝¹ : IsDomain S\ninst✝ : Finite ι\nI : Ideal S\nb : Basis ι R S\nhI : I ≠ ⊥\nthis✝ : Fintype ι\na : ι → R := smithCoeffs b I hI\nb' : Basis ι R S := ringBasis b I hI\nab : Basis ι R { x // x ∈ I } := selfBasis b I hI\nab_eq : ∀ (i : ι), ↑(↑(selfBasis b I hI) i) = smithCoeffs b I hI i • ↑(ringBasis b I hI) i\nx : S\nthis : ∀ (c : ι → R) (i : ι), ↑(↑b'.repr (∑ j : ι, c j • a j • ↑b' j)) i = a i * c i\nha : ∀ (i : ι), smithCoeffs b I hI i ∣ ↑(↑(ringBasis b I hI).repr x) i\n⊢ ∃ c, x = ∑ x : ι, c x • smithCoeffs b I hI x • ↑(ringBasis b I hI) x\n[PROOFSTEP]\nchoose c hc using ha\n[GOAL]\ncase mpr\nι : Type u_1\nR : Type u_2\nS : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\ninst✝³ : IsDomain R\ninst✝² : IsPrincipalIdealRing R\ninst✝¹ : IsDomain S\ninst✝ : Finite ι\nI : Ideal S\nb : Basis ι R S\nhI : I ≠ ⊥\nthis✝ : Fintype ι\na : ι → R := smithCoeffs b I hI\nb' : Basis ι R S := ringBasis b I hI\nab : Basis ι R { x // x ∈ I } := selfBasis b I hI\nab_eq : ∀ (i : ι), ↑(↑(selfBasis b I hI) i) = smithCoeffs b I hI i • ↑(ringBasis b I hI) i\nx : S\nthis : ∀ (c : ι → R) (i : ι), ↑(↑b'.repr (∑ j : ι, c j • a j • ↑b' j)) i = a i * c i\nc : ι → R\nhc : ∀ (i : ι), ↑(↑(ringBasis b I hI).repr x) i = smithCoeffs b I hI i * c i\n⊢ ∃ c, x = ∑ x : ι, c x • smithCoeffs b I hI x • ↑(ringBasis b I hI) x\n[PROOFSTEP]\nexact\n  ⟨c, b'.ext_elem fun i => Eq.trans (hc i) (this c i).symm⟩\n    -- Now we map everything through the linear equiv `S ≃ₗ (ι → R)`,\n      -- which maps `I` to `I' := Π i, a i ℤ`.\n[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\ninst✝³ : IsDomain R\ninst✝² : IsPrincipalIdealRing R\ninst✝¹ : IsDomain S\ninst✝ : Finite ι\nI : Ideal S\nb : Basis ι R S\nhI : I ≠ ⊥\nthis : Fintype ι\na : ι → R := smithCoeffs b I hI\nb' : Basis ι R S := ringBasis b I hI\nab : Basis ι R { x // x ∈ I } := selfBasis b I hI\nab_eq : ∀ (i : ι), ↑(↑(selfBasis b I hI) i) = smithCoeffs b I hI i • ↑(ringBasis b I hI) i\nmem_I_iff : ∀ (x : S), x ∈ I ↔ ∀ (i : ι), a i ∣ ↑(↑b'.repr x) i\n⊢ (S ⧸ I) ≃ₗ[R] (i : ι) → R ⧸ span {smithCoeffs b I hI i}\n[PROOFSTEP]\nlet I' : Submodule R (ι → R) := Submodule.pi Set.univ fun i => span ({a i} : Set R)\n[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\ninst✝³ : IsDomain R\ninst✝² : IsPrincipalIdealRing R\ninst✝¹ : IsDomain S\ninst✝ : Finite ι\nI : Ideal S\nb : Basis ι R S\nhI : I ≠ ⊥\nthis : Fintype ι\na : ι → R := smithCoeffs b I hI\nb' : Basis ι R S := ringBasis b I hI\nab : Basis ι R { x // x ∈ I } := selfBasis b I hI\nab_eq : ∀ (i : ι), ↑(↑(selfBasis b I hI) i) = smithCoeffs b I hI i • ↑(ringBasis b I hI) i\nmem_I_iff : ∀ (x : S), x ∈ I ↔ ∀ (i : ι), a i ∣ ↑(↑b'.repr x) i\nI' : Submodule R (ι → R) := Submodule.pi Set.univ fun i => span {a i}\n⊢ (S ⧸ I) ≃ₗ[R] (i : ι) → R ⧸ span {smithCoeffs b I hI i}\n[PROOFSTEP]\nhave : Submodule.map (b'.equivFun : S →ₗ[R] ι → R) (I.restrictScalars R) = I' :=\n  by\n  ext x\n  simp only [Submodule.mem_map, Submodule.mem_pi, mem_span_singleton, Set.mem_univ, Submodule.restrictScalars_mem,\n    mem_I_iff, smul_eq_mul, forall_true_left, LinearEquiv.coe_coe, Basis.equivFun_apply]\n  constructor\n  · rintro ⟨y, hy, rfl⟩ i\n    exact hy i\n  · rintro hdvd\n    refine' ⟨∑ i, x i • b' i, fun i => _, _⟩ <;> rw [b'.repr_sum_self]\n    · exact hdvd i\n[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\ninst✝³ : IsDomain R\ninst✝² : IsPrincipalIdealRing R\ninst✝¹ : IsDomain S\ninst✝ : Finite ι\nI : Ideal S\nb : Basis ι R S\nhI : I ≠ ⊥\nthis : Fintype ι\na : ι → R := smithCoeffs b I hI\nb' : Basis ι R S := ringBasis b I hI\nab : Basis ι R { x // x ∈ I } := selfBasis b I hI\nab_eq : ∀ (i : ι), ↑(↑(selfBasis b I hI) i) = smithCoeffs b I hI i • ↑(ringBasis b I hI) i\nmem_I_iff : ∀ (x : S), x ∈ I ↔ ∀ (i : ι), a i ∣ ↑(↑b'.repr x) i\nI' : Submodule R (ι → R) := Submodule.pi Set.univ fun i => span {a i}\n⊢ Submodule.map (↑(Basis.equivFun b')) (Submodule.restrictScalars R I) = I'\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nι : Type u_1\nR : Type u_2\nS : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\ninst✝³ : IsDomain R\ninst✝² : IsPrincipalIdealRing R\ninst✝¹ : IsDomain S\ninst✝ : Finite ι\nI : Ideal S\nb : Basis ι R S\nhI : I ≠ ⊥\nthis : Fintype ι\na : ι → R := smithCoeffs b I hI\nb' : Basis ι R S := ringBasis b I hI\nab : Basis ι R { x // x ∈ I } := selfBasis b I hI\nab_eq : ∀ (i : ι), ↑(↑(selfBasis b I hI) i) = smithCoeffs b I hI i • ↑(ringBasis b I hI) i\nmem_I_iff : ∀ (x : S), x ∈ I ↔ ∀ (i : ι), a i ∣ ↑(↑b'.repr x) i\nI' : Submodule R (ι → R) := Submodule.pi Set.univ fun i => span {a i}\nx : ι → R\n⊢ x ∈ Submodule.map (↑(Basis.equivFun b')) (Submodule.restrictScalars R I) ↔ x ∈ I'\n[PROOFSTEP]\nsimp only [Submodule.mem_map, Submodule.mem_pi, mem_span_singleton, Set.mem_univ, Submodule.restrictScalars_mem,\n  mem_I_iff, smul_eq_mul, forall_true_left, LinearEquiv.coe_coe, Basis.equivFun_apply]\n[GOAL]\ncase h\nι : Type u_1\nR : Type u_2\nS : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\ninst✝³ : IsDomain R\ninst✝² : IsPrincipalIdealRing R\ninst✝¹ : IsDomain S\ninst✝ : Finite ι\nI : Ideal S\nb : Basis ι R S\nhI : I ≠ ⊥\nthis : Fintype ι\na : ι → R := smithCoeffs b I hI\nb' : Basis ι R S := ringBasis b I hI\nab : Basis ι R { x // x ∈ I } := selfBasis b I hI\nab_eq : ∀ (i : ι), ↑(↑(selfBasis b I hI) i) = smithCoeffs b I hI i • ↑(ringBasis b I hI) i\nmem_I_iff : ∀ (x : S), x ∈ I ↔ ∀ (i : ι), a i ∣ ↑(↑b'.repr x) i\nI' : Submodule R (ι → R) := Submodule.pi Set.univ fun i => span {a i}\nx : ι → R\n⊢ (∃ y, (∀ (i : ι), smithCoeffs b I hI i ∣ ↑(↑(ringBasis b I hI).repr y) i) ∧ ↑(↑(ringBasis b I hI).repr y) = x) ↔\n    ∀ (i : ι), smithCoeffs b I hI i ∣ x i\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nι : Type u_1\nR : Type u_2\nS : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\ninst✝³ : IsDomain R\ninst✝² : IsPrincipalIdealRing R\ninst✝¹ : IsDomain S\ninst✝ : Finite ι\nI : Ideal S\nb : Basis ι R S\nhI : I ≠ ⊥\nthis : Fintype ι\na : ι → R := smithCoeffs b I hI\nb' : Basis ι R S := ringBasis b I hI\nab : Basis ι R { x // x ∈ I } := selfBasis b I hI\nab_eq : ∀ (i : ι), ↑(↑(selfBasis b I hI) i) = smithCoeffs b I hI i • ↑(ringBasis b I hI) i\nmem_I_iff : ∀ (x : S), x ∈ I ↔ ∀ (i : ι), a i ∣ ↑(↑b'.repr x) i\nI' : Submodule R (ι → R) := Submodule.pi Set.univ fun i => span {a i}\nx : ι → R\n⊢ (∃ y, (∀ (i : ι), smithCoeffs b I hI i ∣ ↑(↑(ringBasis b I hI).repr y) i) ∧ ↑(↑(ringBasis b I hI).repr y) = x) →\n    ∀ (i : ι), smithCoeffs b I hI i ∣ x i\n[PROOFSTEP]\nrintro ⟨y, hy, rfl⟩ i\n[GOAL]\ncase h.mp.intro.intro\nι : Type u_1\nR : Type u_2\nS : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\ninst✝³ : IsDomain R\ninst✝² : IsPrincipalIdealRing R\ninst✝¹ : IsDomain S\ninst✝ : Finite ι\nI : Ideal S\nb : Basis ι R S\nhI : I ≠ ⊥\nthis : Fintype ι\na : ι → R := smithCoeffs b I hI\nb' : Basis ι R S := ringBasis b I hI\nab : Basis ι R { x // x ∈ I } := selfBasis b I hI\nab_eq : ∀ (i : ι), ↑(↑(selfBasis b I hI) i) = smithCoeffs b I hI i • ↑(ringBasis b I hI) i\nmem_I_iff : ∀ (x : S), x ∈ I ↔ ∀ (i : ι), a i ∣ ↑(↑b'.repr x) i\nI' : Submodule R (ι → R) := Submodule.pi Set.univ fun i => span {a i}\ny : S\nhy : ∀ (i : ι), smithCoeffs b I hI i ∣ ↑(↑(ringBasis b I hI).repr y) i\ni : ι\n⊢ smithCoeffs b I hI i ∣ ↑(↑(ringBasis b I hI).repr y) i\n[PROOFSTEP]\nexact hy i\n[GOAL]\ncase h.mpr\nι : Type u_1\nR : Type u_2\nS : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\ninst✝³ : IsDomain R\ninst✝² : IsPrincipalIdealRing R\ninst✝¹ : IsDomain S\ninst✝ : Finite ι\nI : Ideal S\nb : Basis ι R S\nhI : I ≠ ⊥\nthis : Fintype ι\na : ι → R := smithCoeffs b I hI\nb' : Basis ι R S := ringBasis b I hI\nab : Basis ι R { x // x ∈ I } := selfBasis b I hI\nab_eq : ∀ (i : ι), ↑(↑(selfBasis b I hI) i) = smithCoeffs b I hI i • ↑(ringBasis b I hI) i\nmem_I_iff : ∀ (x : S), x ∈ I ↔ ∀ (i : ι), a i ∣ ↑(↑b'.repr x) i\nI' : Submodule R (ι → R) := Submodule.pi Set.univ fun i => span {a i}\nx : ι → R\n⊢ (∀ (i : ι), smithCoeffs b I hI i ∣ x i) →\n    ∃ y, (∀ (i : ι), smithCoeffs b I hI i ∣ ↑(↑(ringBasis b I hI).repr y) i) ∧ ↑(↑(ringBasis b I hI).repr y) = x\n[PROOFSTEP]\nrintro hdvd\n[GOAL]\ncase h.mpr\nι : Type u_1\nR : Type u_2\nS : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\ninst✝³ : IsDomain R\ninst✝² : IsPrincipalIdealRing R\ninst✝¹ : IsDomain S\ninst✝ : Finite ι\nI : Ideal S\nb : Basis ι R S\nhI : I ≠ ⊥\nthis : Fintype ι\na : ι → R := smithCoeffs b I hI\nb' : Basis ι R S := ringBasis b I hI\nab : Basis ι R { x // x ∈ I } := selfBasis b I hI\nab_eq : ∀ (i : ι), ↑(↑(selfBasis b I hI) i) = smithCoeffs b I hI i • ↑(ringBasis b I hI) i\nmem_I_iff : ∀ (x : S), x ∈ I ↔ ∀ (i : ι), a i ∣ ↑(↑b'.repr x) i\nI' : Submodule R (ι → R) := Submodule.pi Set.univ fun i => span {a i}\nx : ι → R\nhdvd : ∀ (i : ι), smithCoeffs b I hI i ∣ x i\n⊢ ∃ y, (∀ (i : ι), smithCoeffs b I hI i ∣ ↑(↑(ringBasis b I hI).repr y) i) ∧ ↑(↑(ringBasis b I hI).repr y) = x\n[PROOFSTEP]\nrefine' ⟨∑ i, x i • b' i, fun i => _, _⟩\n[GOAL]\ncase h.mpr.refine'_1\nι : Type u_1\nR : Type u_2\nS : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\ninst✝³ : IsDomain R\ninst✝² : IsPrincipalIdealRing R\ninst✝¹ : IsDomain S\ninst✝ : Finite ι\nI : Ideal S\nb : Basis ι R S\nhI : I ≠ ⊥\nthis : Fintype ι\na : ι → R := smithCoeffs b I hI\nb' : Basis ι R S := ringBasis b I hI\nab : Basis ι R { x // x ∈ I } := selfBasis b I hI\nab_eq : ∀ (i : ι), ↑(↑(selfBasis b I hI) i) = smithCoeffs b I hI i • ↑(ringBasis b I hI) i\nmem_I_iff : ∀ (x : S), x ∈ I ↔ ∀ (i : ι), a i ∣ ↑(↑b'.repr x) i\nI' : Submodule R (ι → R) := Submodule.pi Set.univ fun i => span {a i}\nx : ι → R\nhdvd : ∀ (i : ι), smithCoeffs b I hI i ∣ x i\ni : ι\n⊢ smithCoeffs b I hI i ∣ ↑(↑(ringBasis b I hI).repr (∑ i : ι, x i • ↑b' i)) i\n[PROOFSTEP]\nrw [b'.repr_sum_self]\n[GOAL]\ncase h.mpr.refine'_2\nι : Type u_1\nR : Type u_2\nS : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\ninst✝³ : IsDomain R\ninst✝² : IsPrincipalIdealRing R\ninst✝¹ : IsDomain S\ninst✝ : Finite ι\nI : Ideal S\nb : Basis ι R S\nhI : I ≠ ⊥\nthis : Fintype ι\na : ι → R := smithCoeffs b I hI\nb' : Basis ι R S := ringBasis b I hI\nab : Basis ι R { x // x ∈ I } := selfBasis b I hI\nab_eq : ∀ (i : ι), ↑(↑(selfBasis b I hI) i) = smithCoeffs b I hI i • ↑(ringBasis b I hI) i\nmem_I_iff : ∀ (x : S), x ∈ I ↔ ∀ (i : ι), a i ∣ ↑(↑b'.repr x) i\nI' : Submodule R (ι → R) := Submodule.pi Set.univ fun i => span {a i}\nx : ι → R\nhdvd : ∀ (i : ι), smithCoeffs b I hI i ∣ x i\n⊢ ↑(↑(ringBasis b I hI).repr (∑ i : ι, x i • ↑b' i)) = x\n[PROOFSTEP]\nrw [b'.repr_sum_self]\n[GOAL]\ncase h.mpr.refine'_1\nι : Type u_1\nR : Type u_2\nS : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\ninst✝³ : IsDomain R\ninst✝² : IsPrincipalIdealRing R\ninst✝¹ : IsDomain S\ninst✝ : Finite ι\nI : Ideal S\nb : Basis ι R S\nhI : I ≠ ⊥\nthis : Fintype ι\na : ι → R := smithCoeffs b I hI\nb' : Basis ι R S := ringBasis b I hI\nab : Basis ι R { x // x ∈ I } := selfBasis b I hI\nab_eq : ∀ (i : ι), ↑(↑(selfBasis b I hI) i) = smithCoeffs b I hI i • ↑(ringBasis b I hI) i\nmem_I_iff : ∀ (x : S), x ∈ I ↔ ∀ (i : ι), a i ∣ ↑(↑b'.repr x) i\nI' : Submodule R (ι → R) := Submodule.pi Set.univ fun i => span {a i}\nx : ι → R\nhdvd : ∀ (i : ι), smithCoeffs b I hI i ∣ x i\ni : ι\n⊢ smithCoeffs b I hI i ∣ x i\n[PROOFSTEP]\nexact hdvd i\n[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\ninst✝³ : IsDomain R\ninst✝² : IsPrincipalIdealRing R\ninst✝¹ : IsDomain S\ninst✝ : Finite ι\nI : Ideal S\nb : Basis ι R S\nhI : I ≠ ⊥\nthis✝ : Fintype ι\na : ι → R := smithCoeffs b I hI\nb' : Basis ι R S := ringBasis b I hI\nab : Basis ι R { x // x ∈ I } := selfBasis b I hI\nab_eq : ∀ (i : ι), ↑(↑(selfBasis b I hI) i) = smithCoeffs b I hI i • ↑(ringBasis b I hI) i\nmem_I_iff : ∀ (x : S), x ∈ I ↔ ∀ (i : ι), a i ∣ ↑(↑b'.repr x) i\nI' : Submodule R (ι → R) := Submodule.pi Set.univ fun i => span {a i}\nthis : Submodule.map (↑(Basis.equivFun b')) (Submodule.restrictScalars R I) = I'\n⊢ (S ⧸ I) ≃ₗ[R] (i : ι) → R ⧸ span {smithCoeffs b I hI i}\n[PROOFSTEP]\nrefine'\n  ((Submodule.Quotient.restrictScalarsEquiv R I).restrictScalars R).symm.trans (σ₁₂ := RingHom.id R) (σ₃₂ :=\n    RingHom.id R) _\n[GOAL]\ncase refine'_1\nι : Type u_1\nR : Type u_2\nS : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\ninst✝³ : IsDomain R\ninst✝² : IsPrincipalIdealRing R\ninst✝¹ : IsDomain S\ninst✝ : Finite ι\nI : Ideal S\nb : Basis ι R S\nhI : I ≠ ⊥\nthis✝ : Fintype ι\na : ι → R := smithCoeffs b I hI\nb' : Basis ι R S := ringBasis b I hI\nab : Basis ι R { x // x ∈ I } := selfBasis b I hI\nab_eq : ∀ (i : ι), ↑(↑(selfBasis b I hI) i) = smithCoeffs b I hI i • ↑(ringBasis b I hI) i\nmem_I_iff : ∀ (x : S), x ∈ I ↔ ∀ (i : ι), a i ∣ ↑(↑b'.repr x) i\nI' : Submodule R (ι → R) := Submodule.pi Set.univ fun i => span {a i}\nthis : Submodule.map (↑(Basis.equivFun b')) (Submodule.restrictScalars R I) = I'\n⊢ RingHomInvPair (RingHom.id R) (RingHom.id R)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\ncase refine'_2\nι : Type u_1\nR : Type u_2\nS : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\ninst✝³ : IsDomain R\ninst✝² : IsPrincipalIdealRing R\ninst✝¹ : IsDomain S\ninst✝ : Finite ι\nI : Ideal S\nb : Basis ι R S\nhI : I ≠ ⊥\nthis✝ : Fintype ι\na : ι → R := smithCoeffs b I hI\nb' : Basis ι R S := ringBasis b I hI\nab : Basis ι R { x // x ∈ I } := selfBasis b I hI\nab_eq : ∀ (i : ι), ↑(↑(selfBasis b I hI) i) = smithCoeffs b I hI i • ↑(ringBasis b I hI) i\nmem_I_iff : ∀ (x : S), x ∈ I ↔ ∀ (i : ι), a i ∣ ↑(↑b'.repr x) i\nI' : Submodule R (ι → R) := Submodule.pi Set.univ fun i => span {a i}\nthis : Submodule.map (↑(Basis.equivFun b')) (Submodule.restrictScalars R I) = I'\n⊢ RingHomInvPair (RingHom.id R) (RingHom.id R)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\ncase refine'_3\nι : Type u_1\nR : Type u_2\nS : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\ninst✝³ : IsDomain R\ninst✝² : IsPrincipalIdealRing R\ninst✝¹ : IsDomain S\ninst✝ : Finite ι\nI : Ideal S\nb : Basis ι R S\nhI : I ≠ ⊥\nthis✝ : Fintype ι\na : ι → R := smithCoeffs b I hI\nb' : Basis ι R S := ringBasis b I hI\nab : Basis ι R { x // x ∈ I } := selfBasis b I hI\nab_eq : ∀ (i : ι), ↑(↑(selfBasis b I hI) i) = smithCoeffs b I hI i • ↑(ringBasis b I hI) i\nmem_I_iff : ∀ (x : S), x ∈ I ↔ ∀ (i : ι), a i ∣ ↑(↑b'.repr x) i\nI' : Submodule R (ι → R) := Submodule.pi Set.univ fun i => span {a i}\nthis : Submodule.map (↑(Basis.equivFun b')) (Submodule.restrictScalars R I) = I'\n⊢ (S ⧸ Submodule.restrictScalars R I) ≃ₗ[R] (i : ι) → R ⧸ span {smithCoeffs b I hI i}\n[PROOFSTEP]\nrefine'\n  (Submodule.Quotient.equiv (I.restrictScalars R) I' b'.equivFun this).trans (σ₁₂ := RingHom.id R) (σ₃₂ := RingHom.id R)\n    _\n[GOAL]\ncase refine'_3.refine'_1\nι : Type u_1\nR : Type u_2\nS : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\ninst✝³ : IsDomain R\ninst✝² : IsPrincipalIdealRing R\ninst✝¹ : IsDomain S\ninst✝ : Finite ι\nI : Ideal S\nb : Basis ι R S\nhI : I ≠ ⊥\nthis✝ : Fintype ι\na : ι → R := smithCoeffs b I hI\nb' : Basis ι R S := ringBasis b I hI\nab : Basis ι R { x // x ∈ I } := selfBasis b I hI\nab_eq : ∀ (i : ι), ↑(↑(selfBasis b I hI) i) = smithCoeffs b I hI i • ↑(ringBasis b I hI) i\nmem_I_iff : ∀ (x : S), x ∈ I ↔ ∀ (i : ι), a i ∣ ↑(↑b'.repr x) i\nI' : Submodule R (ι → R) := Submodule.pi Set.univ fun i => span {a i}\nthis : Submodule.map (↑(Basis.equivFun b')) (Submodule.restrictScalars R I) = I'\n⊢ RingHomInvPair (RingHom.id R) (RingHom.id R)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\ncase refine'_3.refine'_2\nι : Type u_1\nR : Type u_2\nS : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\ninst✝³ : IsDomain R\ninst✝² : IsPrincipalIdealRing R\ninst✝¹ : IsDomain S\ninst✝ : Finite ι\nI : Ideal S\nb : Basis ι R S\nhI : I ≠ ⊥\nthis✝ : Fintype ι\na : ι → R := smithCoeffs b I hI\nb' : Basis ι R S := ringBasis b I hI\nab : Basis ι R { x // x ∈ I } := selfBasis b I hI\nab_eq : ∀ (i : ι), ↑(↑(selfBasis b I hI) i) = smithCoeffs b I hI i • ↑(ringBasis b I hI) i\nmem_I_iff : ∀ (x : S), x ∈ I ↔ ∀ (i : ι), a i ∣ ↑(↑b'.repr x) i\nI' : Submodule R (ι → R) := Submodule.pi Set.univ fun i => span {a i}\nthis : Submodule.map (↑(Basis.equivFun b')) (Submodule.restrictScalars R I) = I'\n⊢ RingHomInvPair (RingHom.id R) (RingHom.id R)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\ncase refine'_3.refine'_3\nι : Type u_1\nR : Type u_2\nS : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\ninst✝³ : IsDomain R\ninst✝² : IsPrincipalIdealRing R\ninst✝¹ : IsDomain S\ninst✝ : Finite ι\nI : Ideal S\nb : Basis ι R S\nhI : I ≠ ⊥\nthis✝ : Fintype ι\na : ι → R := smithCoeffs b I hI\nb' : Basis ι R S := ringBasis b I hI\nab : Basis ι R { x // x ∈ I } := selfBasis b I hI\nab_eq : ∀ (i : ι), ↑(↑(selfBasis b I hI) i) = smithCoeffs b I hI i • ↑(ringBasis b I hI) i\nmem_I_iff : ∀ (x : S), x ∈ I ↔ ∀ (i : ι), a i ∣ ↑(↑b'.repr x) i\nI' : Submodule R (ι → R) := Submodule.pi Set.univ fun i => span {a i}\nthis : Submodule.map (↑(Basis.equivFun b')) (Submodule.restrictScalars R I) = I'\n⊢ ((ι → R) ⧸ I') ≃ₗ[R] (i : ι) → R ⧸ span {smithCoeffs b I hI i}\n[PROOFSTEP]\nclassical\nlet this := Submodule.quotientPi (show ∀ _, Submodule R R from fun i => span ({a i} : Set R))\nexact this\n[GOAL]\ncase refine'_3.refine'_3\nι : Type u_1\nR : Type u_2\nS : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\ninst✝³ : IsDomain R\ninst✝² : IsPrincipalIdealRing R\ninst✝¹ : IsDomain S\ninst✝ : Finite ι\nI : Ideal S\nb : Basis ι R S\nhI : I ≠ ⊥\nthis✝ : Fintype ι\na : ι → R := smithCoeffs b I hI\nb' : Basis ι R S := ringBasis b I hI\nab : Basis ι R { x // x ∈ I } := selfBasis b I hI\nab_eq : ∀ (i : ι), ↑(↑(selfBasis b I hI) i) = smithCoeffs b I hI i • ↑(ringBasis b I hI) i\nmem_I_iff : ∀ (x : S), x ∈ I ↔ ∀ (i : ι), a i ∣ ↑(↑b'.repr x) i\nI' : Submodule R (ι → R) := Submodule.pi Set.univ fun i => span {a i}\nthis : Submodule.map (↑(Basis.equivFun b')) (Submodule.restrictScalars R I) = I'\n⊢ ((ι → R) ⧸ I') ≃ₗ[R] (i : ι) → R ⧸ span {smithCoeffs b I hI i}\n[PROOFSTEP]\nlet this := Submodule.quotientPi (show ∀ _, Submodule R R from fun i => span ({a i} : Set R))\n[GOAL]\ncase refine'_3.refine'_3\nι : Type u_1\nR : Type u_2\nS : Type u_3\ninst✝⁶ : CommRing R\ninst✝⁵ : CommRing S\ninst✝⁴ : Algebra R S\ninst✝³ : IsDomain R\ninst✝² : IsPrincipalIdealRing R\ninst✝¹ : IsDomain S\ninst✝ : Finite ι\nI : Ideal S\nb : Basis ι R S\nhI : I ≠ ⊥\nthis✝¹ : Fintype ι\na : ι → R := smithCoeffs b I hI\nb' : Basis ι R S := ringBasis b I hI\nab : Basis ι R { x // x ∈ I } := selfBasis b I hI\nab_eq : ∀ (i : ι), ↑(↑(selfBasis b I hI) i) = smithCoeffs b I hI i • ↑(ringBasis b I hI) i\nmem_I_iff : ∀ (x : S), x ∈ I ↔ ∀ (i : ι), a i ∣ ↑(↑b'.repr x) i\nI' : Submodule R (ι → R) := Submodule.pi Set.univ fun i => span {a i}\nthis✝ : Submodule.map (↑(Basis.equivFun b')) (Submodule.restrictScalars R I) = I'\nthis : ((ι → R) ⧸\n    Submodule.pi Set.univ\n      (let_fun this := fun i => span {a i};\n      this)) ≃ₗ[R]\n  (i : ι) → R ⧸ (fun this => this) (fun i => span {a i}) i :=\n  Submodule.quotientPi\n    (let_fun this := fun i => span {a i};\n    this)\n⊢ ((ι → R) ⧸ I') ≃ₗ[R] (i : ι) → R ⧸ span {smithCoeffs b I hI i}\n[PROOFSTEP]\nexact this\n[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : CommRing S\ninst✝⁶ : Algebra R S\ninst✝⁵ : IsDomain R\ninst✝⁴ : IsPrincipalIdealRing R\ninst✝³ : IsDomain S\ninst✝² : Finite ι\ninst✝¹ : Module.Free ℤ S\ninst✝ : Module.Finite ℤ S\nI : Ideal S\nhI : I ≠ ⊥\n⊢ Fintype (S ⧸ I)\n[PROOFSTEP]\nlet b := Module.Free.chooseBasis ℤ S\n[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : CommRing S\ninst✝⁶ : Algebra R S\ninst✝⁵ : IsDomain R\ninst✝⁴ : IsPrincipalIdealRing R\ninst✝³ : IsDomain S\ninst✝² : Finite ι\ninst✝¹ : Module.Free ℤ S\ninst✝ : Module.Finite ℤ S\nI : Ideal S\nhI : I ≠ ⊥\nb : Basis (Module.Free.ChooseBasisIndex ℤ S) ℤ S := Module.Free.chooseBasis ℤ S\n⊢ Fintype (S ⧸ I)\n[PROOFSTEP]\nlet a := I.smithCoeffs b hI\n[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : CommRing S\ninst✝⁶ : Algebra R S\ninst✝⁵ : IsDomain R\ninst✝⁴ : IsPrincipalIdealRing R\ninst✝³ : IsDomain S\ninst✝² : Finite ι\ninst✝¹ : Module.Free ℤ S\ninst✝ : Module.Finite ℤ S\nI : Ideal S\nhI : I ≠ ⊥\nb : Basis (Module.Free.ChooseBasisIndex ℤ S) ℤ S := Module.Free.chooseBasis ℤ S\na : Module.Free.ChooseBasisIndex ℤ S → ℤ := smithCoeffs b I hI\n⊢ Fintype (S ⧸ I)\n[PROOFSTEP]\nlet e := I.quotientEquivPiZMod b hI\n[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : CommRing S\ninst✝⁶ : Algebra R S\ninst✝⁵ : IsDomain R\ninst✝⁴ : IsPrincipalIdealRing R\ninst✝³ : IsDomain S\ninst✝² : Finite ι\ninst✝¹ : Module.Free ℤ S\ninst✝ : Module.Finite ℤ S\nI : Ideal S\nhI : I ≠ ⊥\nb : Basis (Module.Free.ChooseBasisIndex ℤ S) ℤ S := Module.Free.chooseBasis ℤ S\na : Module.Free.ChooseBasisIndex ℤ S → ℤ := smithCoeffs b I hI\ne : S ⧸ I ≃+ ((i : Module.Free.ChooseBasisIndex ℤ S) → ZMod (Int.natAbs (smithCoeffs b I hI i))) :=\n  quotientEquivPiZMod I b hI\n⊢ Fintype (S ⧸ I)\n[PROOFSTEP]\nhaveI : ∀ i, NeZero (a i).natAbs := fun i => ⟨Int.natAbs_ne_zero.mpr (smithCoeffs_ne_zero b I hI i)⟩\n[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : CommRing S\ninst✝⁶ : Algebra R S\ninst✝⁵ : IsDomain R\ninst✝⁴ : IsPrincipalIdealRing R\ninst✝³ : IsDomain S\ninst✝² : Finite ι\ninst✝¹ : Module.Free ℤ S\ninst✝ : Module.Finite ℤ S\nI : Ideal S\nhI : I ≠ ⊥\nb : Basis (Module.Free.ChooseBasisIndex ℤ S) ℤ S := Module.Free.chooseBasis ℤ S\na : Module.Free.ChooseBasisIndex ℤ S → ℤ := smithCoeffs b I hI\ne : S ⧸ I ≃+ ((i : Module.Free.ChooseBasisIndex ℤ S) → ZMod (Int.natAbs (smithCoeffs b I hI i))) :=\n  quotientEquivPiZMod I b hI\nthis : ∀ (i : Module.Free.ChooseBasisIndex ℤ S), NeZero (Int.natAbs (a i))\n⊢ Fintype (S ⧸ I)\n[PROOFSTEP]\nclassical exact Fintype.ofEquiv (∀ i, ZMod (a i).natAbs) e.symm\n[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : CommRing S\ninst✝⁶ : Algebra R S\ninst✝⁵ : IsDomain R\ninst✝⁴ : IsPrincipalIdealRing R\ninst✝³ : IsDomain S\ninst✝² : Finite ι\ninst✝¹ : Module.Free ℤ S\ninst✝ : Module.Finite ℤ S\nI : Ideal S\nhI : I ≠ ⊥\nb : Basis (Module.Free.ChooseBasisIndex ℤ S) ℤ S := Module.Free.chooseBasis ℤ S\na : Module.Free.ChooseBasisIndex ℤ S → ℤ := smithCoeffs b I hI\ne : S ⧸ I ≃+ ((i : Module.Free.ChooseBasisIndex ℤ S) → ZMod (Int.natAbs (smithCoeffs b I hI i))) :=\n  quotientEquivPiZMod I b hI\nthis : ∀ (i : Module.Free.ChooseBasisIndex ℤ S), NeZero (Int.natAbs (a i))\n⊢ Fintype (S ⧸ I)\n[PROOFSTEP]\nexact Fintype.ofEquiv (∀ i, ZMod (a i).natAbs) e.symm\n[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing S\ninst✝⁸ : Algebra R S\ninst✝⁷ : IsDomain R\ninst✝⁶ : IsPrincipalIdealRing R\ninst✝⁵ : IsDomain S\ninst✝⁴ : Finite ι\nF : Type u_4\ninst✝³ : CommRing F\ninst✝² : Algebra F R\ninst✝¹ : Algebra F S\ninst✝ : IsScalarTower F R S\nb : Basis ι R S\nI : Ideal S\nhI : I ≠ ⊥\n⊢ (S ⧸ I) ≃ₗ[F] ⨁ (i : ι), R ⧸ span {smithCoeffs b I hI i}\n[PROOFSTEP]\nhaveI := Fintype.ofFinite ι\n[GOAL]\nι : Type u_1\nR : Type u_2\nS : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing S\ninst✝⁸ : Algebra R S\ninst✝⁷ : IsDomain R\ninst✝⁶ : IsPrincipalIdealRing R\ninst✝⁵ : IsDomain S\ninst✝⁴ : Finite ι\nF : Type u_4\ninst✝³ : CommRing F\ninst✝² : Algebra F R\ninst✝¹ : Algebra F S\ninst✝ : IsScalarTower F R S\nb : Basis ι R S\nI : Ideal S\nhI : I ≠ ⊥\nthis : Fintype ι\n⊢ (S ⧸ I) ≃ₗ[F] ⨁ (i : ι), R ⧸ span {smithCoeffs b I hI i}\n[PROOFSTEP]\nexact ((I.quotientEquivPiSpan b _).restrictScalars F).trans (DirectSum.linearEquivFunOnFintype _ _ _).symm\n[GOAL]\nι✝ : Type u_1\nR : Type u_2\nS : Type u_3\ninst✝¹⁴ : CommRing R\ninst✝¹³ : CommRing S\ninst✝¹² : Algebra R S\ninst✝¹¹ : IsDomain R\ninst✝¹⁰ : IsPrincipalIdealRing R\ninst✝⁹ : IsDomain S\ninst✝⁸ : Finite ι✝\nF : Type u_4\ninst✝⁷ : CommRing F\ninst✝⁶ : Algebra F R\ninst✝⁵ : Algebra F S\ninst✝⁴ : IsScalarTower F R S\nb✝ : Basis ι✝ R S\nI : Ideal S\nhI : I ≠ ⊥\nι : Type u_5\ninst✝³ : Fintype ι\nb : Basis ι R S\ninst✝² : Nontrivial F\ninst✝¹ : ∀ (i : ι), Module.Free F (R ⧸ span {smithCoeffs b I hI i})\ninst✝ : ∀ (i : ι), Module.Finite F (R ⧸ span {smithCoeffs b I hI i})\n⊢ FiniteDimensional.finrank F (S ⧸ I) = ∑ i : ι, FiniteDimensional.finrank F (R ⧸ span {smithCoeffs b I hI i})\n[PROOFSTEP]\nrw [LinearEquiv.finrank_eq <| quotientEquivDirectSum F b hI, FiniteDimensional.finrank_directSum]\n", "meta": {"mathlib_filename": "Mathlib.LinearAlgebra.FreeModule.IdealQuotient", "llama_tokens": 18066, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8152324983301568, "lm_q2_score": 0.6370308082623217, "lm_q1q2_score": 0.5193282173329716}}
{"text": "[GOAL]\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\na✝ b✝ : R[X]\nhf : a✝ ∈ {f | ∀ (i : ℕ), coeff f i ∈ I ^ i}\nhg : b✝ ∈ {f | ∀ (i : ℕ), coeff f i ∈ I ^ i}\ni : ℕ\n⊢ coeff (a✝ * b✝) i ∈ I ^ i\n[PROOFSTEP]\nrw [coeff_mul]\n[GOAL]\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\na✝ b✝ : R[X]\nhf : a✝ ∈ {f | ∀ (i : ℕ), coeff f i ∈ I ^ i}\nhg : b✝ ∈ {f | ∀ (i : ℕ), coeff f i ∈ I ^ i}\ni : ℕ\n⊢ ∑ x in Finset.Nat.antidiagonal i, coeff a✝ x.fst * coeff b✝ x.snd ∈ I ^ i\n[PROOFSTEP]\napply Ideal.sum_mem\n[GOAL]\ncase a\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\na✝ b✝ : R[X]\nhf : a✝ ∈ {f | ∀ (i : ℕ), coeff f i ∈ I ^ i}\nhg : b✝ ∈ {f | ∀ (i : ℕ), coeff f i ∈ I ^ i}\ni : ℕ\n⊢ ∀ (c : ℕ × ℕ), c ∈ Finset.Nat.antidiagonal i → coeff a✝ c.fst * coeff b✝ c.snd ∈ I ^ i\n[PROOFSTEP]\nrintro ⟨j, k⟩ e\n[GOAL]\ncase a.mk\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\na✝ b✝ : R[X]\nhf : a✝ ∈ {f | ∀ (i : ℕ), coeff f i ∈ I ^ i}\nhg : b✝ ∈ {f | ∀ (i : ℕ), coeff f i ∈ I ^ i}\ni j k : ℕ\ne : (j, k) ∈ Finset.Nat.antidiagonal i\n⊢ coeff a✝ (j, k).fst * coeff b✝ (j, k).snd ∈ I ^ i\n[PROOFSTEP]\nrw [← Finset.Nat.mem_antidiagonal.mp e, pow_add]\n[GOAL]\ncase a.mk\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\na✝ b✝ : R[X]\nhf : a✝ ∈ {f | ∀ (i : ℕ), coeff f i ∈ I ^ i}\nhg : b✝ ∈ {f | ∀ (i : ℕ), coeff f i ∈ I ^ i}\ni j k : ℕ\ne : (j, k) ∈ Finset.Nat.antidiagonal i\n⊢ coeff a✝ (j, k).fst * coeff b✝ (j, k).snd ∈ I ^ (j, k).fst * I ^ (j, k).snd\n[PROOFSTEP]\nexact Ideal.mul_mem_mul (hf j) (hg k)\n[GOAL]\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\ni : ℕ\n⊢ coeff 1 i ∈ I ^ i\n[PROOFSTEP]\nrw [coeff_one]\n[GOAL]\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\ni : ℕ\n⊢ (if 0 = i then 1 else 0) ∈ I ^ i\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\ni : ℕ\nh : 0 = i\n⊢ 1 ∈ I ^ i\n[PROOFSTEP]\nsubst h\n[GOAL]\ncase pos\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\n⊢ 1 ∈ I ^ 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\ni : ℕ\nh : ¬0 = i\n⊢ 0 ∈ I ^ i\n[PROOFSTEP]\nsimp\n[GOAL]\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\na✝ b✝ : R[X]\nhf :\n  a✝ ∈\n    {\n          toSubsemigroup :=\n            { carrier := {f | ∀ (i : ℕ), coeff f i ∈ I ^ i},\n              mul_mem' :=\n                (_ :\n                  ∀ {a b : R[X]},\n                    a ∈ {f | ∀ (i : ℕ), coeff f i ∈ I ^ i} →\n                      b ∈ {f | ∀ (i : ℕ), coeff f i ∈ I ^ i} → ∀ (i : ℕ), coeff (a * b) i ∈ I ^ i) },\n          one_mem' := (_ : ∀ (i : ℕ), coeff 1 i ∈ I ^ i) }.toSubsemigroup.carrier\nhg :\n  b✝ ∈\n    {\n          toSubsemigroup :=\n            { carrier := {f | ∀ (i : ℕ), coeff f i ∈ I ^ i},\n              mul_mem' :=\n                (_ :\n                  ∀ {a b : R[X]},\n                    a ∈ {f | ∀ (i : ℕ), coeff f i ∈ I ^ i} →\n                      b ∈ {f | ∀ (i : ℕ), coeff f i ∈ I ^ i} → ∀ (i : ℕ), coeff (a * b) i ∈ I ^ i) },\n          one_mem' := (_ : ∀ (i : ℕ), coeff 1 i ∈ I ^ i) }.toSubsemigroup.carrier\ni : ℕ\n⊢ coeff (a✝ + b✝) i ∈ I ^ i\n[PROOFSTEP]\nrw [coeff_add]\n[GOAL]\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\na✝ b✝ : R[X]\nhf :\n  a✝ ∈\n    {\n          toSubsemigroup :=\n            { carrier := {f | ∀ (i : ℕ), coeff f i ∈ I ^ i},\n              mul_mem' :=\n                (_ :\n                  ∀ {a b : R[X]},\n                    a ∈ {f | ∀ (i : ℕ), coeff f i ∈ I ^ i} →\n                      b ∈ {f | ∀ (i : ℕ), coeff f i ∈ I ^ i} → ∀ (i : ℕ), coeff (a * b) i ∈ I ^ i) },\n          one_mem' := (_ : ∀ (i : ℕ), coeff 1 i ∈ I ^ i) }.toSubsemigroup.carrier\nhg :\n  b✝ ∈\n    {\n          toSubsemigroup :=\n            { carrier := {f | ∀ (i : ℕ), coeff f i ∈ I ^ i},\n              mul_mem' :=\n                (_ :\n                  ∀ {a b : R[X]},\n                    a ∈ {f | ∀ (i : ℕ), coeff f i ∈ I ^ i} →\n                      b ∈ {f | ∀ (i : ℕ), coeff f i ∈ I ^ i} → ∀ (i : ℕ), coeff (a * b) i ∈ I ^ i) },\n          one_mem' := (_ : ∀ (i : ℕ), coeff 1 i ∈ I ^ i) }.toSubsemigroup.carrier\ni : ℕ\n⊢ coeff a✝ i + coeff b✝ i ∈ I ^ i\n[PROOFSTEP]\nexact Ideal.add_mem _ (hf i) (hg i)\n[GOAL]\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nr : R\ni : ℕ\n⊢ coeff (↑(algebraMap R R[X]) r) i ∈ I ^ i\n[PROOFSTEP]\nrw [algebraMap_apply, coeff_C]\n[GOAL]\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nr : R\ni : ℕ\n⊢ (if i = 0 then ↑(algebraMap R R) r else 0) ∈ I ^ i\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nr : R\ni : ℕ\nh : i = 0\n⊢ ↑(algebraMap R R) r ∈ I ^ i\n[PROOFSTEP]\nsubst h\n[GOAL]\ncase pos\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nr : R\n⊢ ↑(algebraMap R R) r ∈ I ^ 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nr : R\ni : ℕ\nh : ¬i = 0\n⊢ 0 ∈ I ^ i\n[PROOFSTEP]\nsimp\n[GOAL]\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nf : R[X]\n⊢ f ∈ reesAlgebra I ↔ ∀ (i : ℕ), i ∈ support f → coeff f i ∈ I ^ i\n[PROOFSTEP]\napply forall_congr'\n[GOAL]\ncase h\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nf : R[X]\n⊢ ∀ (a : ℕ), coeff f a ∈ I ^ a ↔ a ∈ support f → coeff f a ∈ I ^ a\n[PROOFSTEP]\nintro a\n[GOAL]\ncase h\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nf : R[X]\na : ℕ\n⊢ coeff f a ∈ I ^ a ↔ a ∈ support f → coeff f a ∈ I ^ a\n[PROOFSTEP]\nrw [mem_support_iff, Iff.comm, imp_iff_right_iff, Ne.def, ← imp_iff_not_or]\n[GOAL]\ncase h\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nf : R[X]\na : ℕ\n⊢ coeff f a = 0 → coeff f a ∈ I ^ a\n[PROOFSTEP]\nexact fun e => e.symm ▸ (I ^ a).zero_mem\n[GOAL]\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI✝ I : Ideal R\ni : ℕ\nr : R\n⊢ ↑(monomial i) r ∈ reesAlgebra I ↔ r ∈ I ^ i\n[PROOFSTEP]\nsimp (config := { contextual := true }) [mem_reesAlgebra_iff_support, coeff_monomial, ← imp_iff_not_or]\n[GOAL]\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI✝ I : Ideal R\nn : ℕ\nr : R\nhr : r ∈ I ^ n\n⊢ ↑(monomial n) r ∈ Algebra.adjoin R ↑(Submodule.map (monomial 1) I)\n[PROOFSTEP]\ninduction' n with n hn generalizing r\n[GOAL]\ncase zero\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI✝ I : Ideal R\nn : ℕ\nr✝ : R\nhr✝ : r✝ ∈ I ^ n\nr : R\nhr : r ∈ I ^ Nat.zero\n⊢ ↑(monomial Nat.zero) r ∈ Algebra.adjoin R ↑(Submodule.map (monomial 1) I)\n[PROOFSTEP]\nexact Subalgebra.algebraMap_mem _ _\n[GOAL]\ncase succ\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI✝ I : Ideal R\nn✝ : ℕ\nr✝ : R\nhr✝ : r✝ ∈ I ^ n✝\nn : ℕ\nhn : ∀ {r : R}, r ∈ I ^ n → ↑(monomial n) r ∈ Algebra.adjoin R ↑(Submodule.map (monomial 1) I)\nr : R\nhr : r ∈ I ^ Nat.succ n\n⊢ ↑(monomial (Nat.succ n)) r ∈ Algebra.adjoin R ↑(Submodule.map (monomial 1) I)\n[PROOFSTEP]\nrw [pow_succ] at hr \n[GOAL]\ncase succ\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI✝ I : Ideal R\nn✝ : ℕ\nr✝ : R\nhr✝ : r✝ ∈ I ^ n✝\nn : ℕ\nhn : ∀ {r : R}, r ∈ I ^ n → ↑(monomial n) r ∈ Algebra.adjoin R ↑(Submodule.map (monomial 1) I)\nr : R\nhr : r ∈ I * I ^ n\n⊢ ↑(monomial (Nat.succ n)) r ∈ Algebra.adjoin R ↑(Submodule.map (monomial 1) I)\n[PROOFSTEP]\napply\n  Submodule.smul_induction_on (p := fun r =>\n    (monomial (Nat.succ n)) r ∈ Algebra.adjoin R (Submodule.map (monomial 1) I)) hr\n[GOAL]\ncase succ.Hb\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI✝ I : Ideal R\nn✝ : ℕ\nr✝ : R\nhr✝ : r✝ ∈ I ^ n✝\nn : ℕ\nhn : ∀ {r : R}, r ∈ I ^ n → ↑(monomial n) r ∈ Algebra.adjoin R ↑(Submodule.map (monomial 1) I)\nr : R\nhr : r ∈ I * I ^ n\n⊢ ∀ (r : R),\n    r ∈ I →\n      ∀ (n_1 : R), n_1 ∈ I ^ n → ↑(monomial (Nat.succ n)) (r • n_1) ∈ Algebra.adjoin R ↑(Submodule.map (monomial 1) I)\n[PROOFSTEP]\nintro r hr s hs\n[GOAL]\ncase succ.Hb\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI✝ I : Ideal R\nn✝ : ℕ\nr✝¹ : R\nhr✝¹ : r✝¹ ∈ I ^ n✝\nn : ℕ\nhn : ∀ {r : R}, r ∈ I ^ n → ↑(monomial n) r ∈ Algebra.adjoin R ↑(Submodule.map (monomial 1) I)\nr✝ : R\nhr✝ : r✝ ∈ I * I ^ n\nr : R\nhr : r ∈ I\ns : R\nhs : s ∈ I ^ n\n⊢ ↑(monomial (Nat.succ n)) (r • s) ∈ Algebra.adjoin R ↑(Submodule.map (monomial 1) I)\n[PROOFSTEP]\nrw [Nat.succ_eq_one_add, smul_eq_mul, ← monomial_mul_monomial]\n[GOAL]\ncase succ.Hb\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI✝ I : Ideal R\nn✝ : ℕ\nr✝¹ : R\nhr✝¹ : r✝¹ ∈ I ^ n✝\nn : ℕ\nhn : ∀ {r : R}, r ∈ I ^ n → ↑(monomial n) r ∈ Algebra.adjoin R ↑(Submodule.map (monomial 1) I)\nr✝ : R\nhr✝ : r✝ ∈ I * I ^ n\nr : R\nhr : r ∈ I\ns : R\nhs : s ∈ I ^ n\n⊢ ↑(monomial 1) r * ↑(monomial n) s ∈ Algebra.adjoin R ↑(Submodule.map (monomial 1) I)\n[PROOFSTEP]\nexact Subalgebra.mul_mem _ (Algebra.subset_adjoin (Set.mem_image_of_mem _ hr)) (hn hs)\n[GOAL]\ncase succ.H1\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI✝ I : Ideal R\nn✝ : ℕ\nr✝ : R\nhr✝ : r✝ ∈ I ^ n✝\nn : ℕ\nhn : ∀ {r : R}, r ∈ I ^ n → ↑(monomial n) r ∈ Algebra.adjoin R ↑(Submodule.map (monomial 1) I)\nr : R\nhr : r ∈ I * I ^ n\n⊢ ∀ (x y : R),\n    ↑(monomial (Nat.succ n)) x ∈ Algebra.adjoin R ↑(Submodule.map (monomial 1) I) →\n      ↑(monomial (Nat.succ n)) y ∈ Algebra.adjoin R ↑(Submodule.map (monomial 1) I) →\n        ↑(monomial (Nat.succ n)) (x + y) ∈ Algebra.adjoin R ↑(Submodule.map (monomial 1) I)\n[PROOFSTEP]\nintro x y hx hy\n[GOAL]\ncase succ.H1\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI✝ I : Ideal R\nn✝ : ℕ\nr✝ : R\nhr✝ : r✝ ∈ I ^ n✝\nn : ℕ\nhn : ∀ {r : R}, r ∈ I ^ n → ↑(monomial n) r ∈ Algebra.adjoin R ↑(Submodule.map (monomial 1) I)\nr : R\nhr : r ∈ I * I ^ n\nx y : R\nhx : ↑(monomial (Nat.succ n)) x ∈ Algebra.adjoin R ↑(Submodule.map (monomial 1) I)\nhy : ↑(monomial (Nat.succ n)) y ∈ Algebra.adjoin R ↑(Submodule.map (monomial 1) I)\n⊢ ↑(monomial (Nat.succ n)) (x + y) ∈ Algebra.adjoin R ↑(Submodule.map (monomial 1) I)\n[PROOFSTEP]\nrw [monomial_add]\n[GOAL]\ncase succ.H1\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI✝ I : Ideal R\nn✝ : ℕ\nr✝ : R\nhr✝ : r✝ ∈ I ^ n✝\nn : ℕ\nhn : ∀ {r : R}, r ∈ I ^ n → ↑(monomial n) r ∈ Algebra.adjoin R ↑(Submodule.map (monomial 1) I)\nr : R\nhr : r ∈ I * I ^ n\nx y : R\nhx : ↑(monomial (Nat.succ n)) x ∈ Algebra.adjoin R ↑(Submodule.map (monomial 1) I)\nhy : ↑(monomial (Nat.succ n)) y ∈ Algebra.adjoin R ↑(Submodule.map (monomial 1) I)\n⊢ ↑(monomial (Nat.succ n)) x + ↑(monomial (Nat.succ n)) y ∈ Algebra.adjoin R ↑(Submodule.map (monomial 1) I)\n[PROOFSTEP]\nexact Subalgebra.add_mem _ hx hy\n[GOAL]\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\n⊢ Algebra.adjoin R ↑(Submodule.map (monomial 1) I) = reesAlgebra I\n[PROOFSTEP]\napply le_antisymm\n[GOAL]\ncase a\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\n⊢ Algebra.adjoin R ↑(Submodule.map (monomial 1) I) ≤ reesAlgebra I\n[PROOFSTEP]\napply Algebra.adjoin_le _\n[GOAL]\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\n⊢ ↑(Submodule.map (monomial 1) I) ⊆ ↑(reesAlgebra I)\n[PROOFSTEP]\nrintro _ ⟨r, hr, rfl⟩\n[GOAL]\ncase intro.intro\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nr : R\nhr : r ∈ ↑I\n⊢ ↑(monomial 1) r ∈ ↑(reesAlgebra I)\n[PROOFSTEP]\nexact reesAlgebra.monomial_mem.mpr (by rwa [pow_one])\n[GOAL]\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nr : R\nhr : r ∈ ↑I\n⊢ r ∈ I ^ 1\n[PROOFSTEP]\nrwa [pow_one]\n[GOAL]\ncase a\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\n⊢ reesAlgebra I ≤ Algebra.adjoin R ↑(Submodule.map (monomial 1) I)\n[PROOFSTEP]\nintro p hp\n[GOAL]\ncase a\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\np : R[X]\nhp : p ∈ reesAlgebra I\n⊢ p ∈ Algebra.adjoin R ↑(Submodule.map (monomial 1) I)\n[PROOFSTEP]\nrw [p.as_sum_support]\n[GOAL]\ncase a\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\np : R[X]\nhp : p ∈ reesAlgebra I\n⊢ ∑ i in support p, ↑(monomial i) (coeff p i) ∈ Algebra.adjoin R ↑(Submodule.map (monomial 1) I)\n[PROOFSTEP]\napply Subalgebra.sum_mem _ _\n[GOAL]\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\np : R[X]\nhp : p ∈ reesAlgebra I\n⊢ ∀ (x : ℕ), x ∈ support p → ↑(monomial x) (coeff p x) ∈ Algebra.adjoin R ↑(Submodule.map (monomial 1) I)\n[PROOFSTEP]\nrintro i -\n[GOAL]\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\np : R[X]\nhp : p ∈ reesAlgebra I\ni : ℕ\n⊢ ↑(monomial i) (coeff p i) ∈ Algebra.adjoin R ↑(Submodule.map (monomial 1) I)\n[PROOFSTEP]\nexact monomial_mem_adjoin_monomial (hp i)\n[GOAL]\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nhI : Ideal.FG I\n⊢ Subalgebra.FG (reesAlgebra I)\n[PROOFSTEP]\nclassical\nobtain ⟨s, hs⟩ := hI\nrw [← adjoin_monomial_eq_reesAlgebra, ← hs]\nuse s.image (monomial 1)\nrw [Finset.coe_image]\nchange _ = Algebra.adjoin R (Submodule.map (monomial 1 : R →ₗ[R] R[X]) (Submodule.span R ↑s) : Set R[X])\nrw [Submodule.map_span, Algebra.adjoin_span]\n[GOAL]\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nhI : Ideal.FG I\n⊢ Subalgebra.FG (reesAlgebra I)\n[PROOFSTEP]\nobtain ⟨s, hs⟩ := hI\n[GOAL]\ncase intro\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\ns : Finset R\nhs : Ideal.span ↑s = I\n⊢ Subalgebra.FG (reesAlgebra I)\n[PROOFSTEP]\nrw [← adjoin_monomial_eq_reesAlgebra, ← hs]\n[GOAL]\ncase intro\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\ns : Finset R\nhs : Ideal.span ↑s = I\n⊢ Subalgebra.FG (Algebra.adjoin R ↑(Submodule.map (monomial 1) (Ideal.span ↑s)))\n[PROOFSTEP]\nuse s.image (monomial 1)\n[GOAL]\ncase h\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\ns : Finset R\nhs : Ideal.span ↑s = I\n⊢ Algebra.adjoin R ↑(Finset.image (↑(monomial 1)) s) = Algebra.adjoin R ↑(Submodule.map (monomial 1) (Ideal.span ↑s))\n[PROOFSTEP]\nrw [Finset.coe_image]\n[GOAL]\ncase h\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\ns : Finset R\nhs : Ideal.span ↑s = I\n⊢ Algebra.adjoin R (↑(monomial 1) '' ↑s) = Algebra.adjoin R ↑(Submodule.map (monomial 1) (Ideal.span ↑s))\n[PROOFSTEP]\nchange _ = Algebra.adjoin R (Submodule.map (monomial 1 : R →ₗ[R] R[X]) (Submodule.span R ↑s) : Set R[X])\n[GOAL]\ncase h\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\ns : Finset R\nhs : Ideal.span ↑s = I\n⊢ Algebra.adjoin R (↑(monomial 1) '' ↑s) = Algebra.adjoin R ↑(Submodule.map (monomial 1) (Submodule.span R ↑s))\n[PROOFSTEP]\nrw [Submodule.map_span, Algebra.adjoin_span]\n", "meta": {"mathlib_filename": "Mathlib.RingTheory.ReesAlgebra", "llama_tokens": 7991, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8152325073083132, "lm_q2_score": 0.6370307806984444, "lm_q1q2_score": 0.5193282005813651}}
{"text": "[GOAL]\nα : Type u_1\ninst✝¹ : PartialOrder α\ninst✝ : OrderTop α\nh : ∀ (c : Set α), IsChain (fun x x_1 => x ≤ x_1) c → Set.Nonempty c → ¬⊤ ∈ c → ∃ x x_1, x ∈ upperBounds c\n⊢ IsCoatomic α\n[PROOFSTEP]\nrefine ⟨fun x => le_top.eq_or_lt.imp_right fun hx => ?_⟩\n[GOAL]\nα : Type u_1\ninst✝¹ : PartialOrder α\ninst✝ : OrderTop α\nh : ∀ (c : Set α), IsChain (fun x x_1 => x ≤ x_1) c → Set.Nonempty c → ¬⊤ ∈ c → ∃ x x_1, x ∈ upperBounds c\nx : α\nhx : x < ⊤\n⊢ ∃ a, IsCoatom a ∧ x ≤ a\n[PROOFSTEP]\nhave : ∃ y ∈ Ico x ⊤, x ≤ y ∧ ∀ z ∈ Ico x ⊤, y ≤ z → z = y :=\n  by\n  refine zorn_nonempty_partialOrder₀ (Ico x ⊤) (fun c hxc hc y hy => ?_) x (left_mem_Ico.2 hx)\n  rcases h c hc ⟨y, hy⟩ fun h => (hxc h).2.ne rfl with ⟨z, hz, hcz⟩\n  exact ⟨z, ⟨le_trans (hxc hy).1 (hcz hy), hz.lt_top⟩, hcz⟩\n[GOAL]\nα : Type u_1\ninst✝¹ : PartialOrder α\ninst✝ : OrderTop α\nh : ∀ (c : Set α), IsChain (fun x x_1 => x ≤ x_1) c → Set.Nonempty c → ¬⊤ ∈ c → ∃ x x_1, x ∈ upperBounds c\nx : α\nhx : x < ⊤\n⊢ ∃ y, y ∈ Ico x ⊤ ∧ x ≤ y ∧ ∀ (z : α), z ∈ Ico x ⊤ → y ≤ z → z = y\n[PROOFSTEP]\nrefine zorn_nonempty_partialOrder₀ (Ico x ⊤) (fun c hxc hc y hy => ?_) x (left_mem_Ico.2 hx)\n[GOAL]\nα : Type u_1\ninst✝¹ : PartialOrder α\ninst✝ : OrderTop α\nh : ∀ (c : Set α), IsChain (fun x x_1 => x ≤ x_1) c → Set.Nonempty c → ¬⊤ ∈ c → ∃ x x_1, x ∈ upperBounds c\nx : α\nhx : x < ⊤\nc : Set α\nhxc : c ⊆ Ico x ⊤\nhc : IsChain (fun x x_1 => x ≤ x_1) c\ny : α\nhy : y ∈ c\n⊢ ∃ ub, ub ∈ Ico x ⊤ ∧ ∀ (z : α), z ∈ c → z ≤ ub\n[PROOFSTEP]\nrcases h c hc ⟨y, hy⟩ fun h => (hxc h).2.ne rfl with ⟨z, hz, hcz⟩\n[GOAL]\ncase intro.intro\nα : Type u_1\ninst✝¹ : PartialOrder α\ninst✝ : OrderTop α\nh : ∀ (c : Set α), IsChain (fun x x_1 => x ≤ x_1) c → Set.Nonempty c → ¬⊤ ∈ c → ∃ x x_1, x ∈ upperBounds c\nx : α\nhx : x < ⊤\nc : Set α\nhxc : c ⊆ Ico x ⊤\nhc : IsChain (fun x x_1 => x ≤ x_1) c\ny : α\nhy : y ∈ c\nz : α\nhz : z ≠ ⊤\nhcz : z ∈ upperBounds c\n⊢ ∃ ub, ub ∈ Ico x ⊤ ∧ ∀ (z : α), z ∈ c → z ≤ ub\n[PROOFSTEP]\nexact ⟨z, ⟨le_trans (hxc hy).1 (hcz hy), hz.lt_top⟩, hcz⟩\n[GOAL]\nα : Type u_1\ninst✝¹ : PartialOrder α\ninst✝ : OrderTop α\nh : ∀ (c : Set α), IsChain (fun x x_1 => x ≤ x_1) c → Set.Nonempty c → ¬⊤ ∈ c → ∃ x x_1, x ∈ upperBounds c\nx : α\nhx : x < ⊤\nthis : ∃ y, y ∈ Ico x ⊤ ∧ x ≤ y ∧ ∀ (z : α), z ∈ Ico x ⊤ → y ≤ z → z = y\n⊢ ∃ a, IsCoatom a ∧ x ≤ a\n[PROOFSTEP]\nrcases this with ⟨y, ⟨hxy, hy⟩, -, hy'⟩\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\ninst✝¹ : PartialOrder α\ninst✝ : OrderTop α\nh : ∀ (c : Set α), IsChain (fun x x_1 => x ≤ x_1) c → Set.Nonempty c → ¬⊤ ∈ c → ∃ x x_1, x ∈ upperBounds c\nx : α\nhx : x < ⊤\ny : α\nhxy : x ≤ y\nhy : y < ⊤\nhy' : ∀ (z : α), z ∈ Ico x ⊤ → y ≤ z → z = y\n⊢ ∃ a, IsCoatom a ∧ x ≤ a\n[PROOFSTEP]\nrefine ⟨y, ⟨hy.ne, fun z hyz => le_top.eq_or_lt.resolve_right fun hz => ?_⟩, hxy⟩\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\ninst✝¹ : PartialOrder α\ninst✝ : OrderTop α\nh : ∀ (c : Set α), IsChain (fun x x_1 => x ≤ x_1) c → Set.Nonempty c → ¬⊤ ∈ c → ∃ x x_1, x ∈ upperBounds c\nx : α\nhx : x < ⊤\ny : α\nhxy : x ≤ y\nhy : y < ⊤\nhy' : ∀ (z : α), z ∈ Ico x ⊤ → y ≤ z → z = y\nz : α\nhyz : y < z\nhz : z < ⊤\n⊢ False\n[PROOFSTEP]\nexact hyz.ne' (hy' z ⟨hxy.trans hyz.le, hz⟩ hyz.le)\n", "meta": {"mathlib_filename": "Mathlib.Order.ZornAtoms", "llama_tokens": 1705, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8152324938410784, "lm_q2_score": 0.6370307806984444, "lm_q1q2_score": 0.5193281920023219}}
{"text": "[GOAL]\ni n : ℕ\nh0 : n ≠ 0\nhi : Nat.coprime i n\n⊢ IsPrimitiveRoot (exp (2 * ↑π * I * (↑i / ↑n))) n\n[PROOFSTEP]\nrw [IsPrimitiveRoot.iff_def]\n[GOAL]\ni n : ℕ\nh0 : n ≠ 0\nhi : Nat.coprime i n\n⊢ exp (2 * ↑π * I * (↑i / ↑n)) ^ n = 1 ∧ ∀ (l : ℕ), exp (2 * ↑π * I * (↑i / ↑n)) ^ l = 1 → n ∣ l\n[PROOFSTEP]\nsimp only [← exp_nat_mul, exp_eq_one_iff]\n[GOAL]\ni n : ℕ\nh0 : n ≠ 0\nhi : Nat.coprime i n\n⊢ (∃ n_1, ↑n * (2 * ↑π * I * (↑i / ↑n)) = ↑n_1 * (2 * ↑π * I)) ∧\n    ∀ (l : ℕ), (∃ n_1, ↑l * (2 * ↑π * I * (↑i / ↑n)) = ↑n_1 * (2 * ↑π * I)) → n ∣ l\n[PROOFSTEP]\nhave hn0 : (n : ℂ) ≠ 0 := by exact_mod_cast h0\n[GOAL]\ni n : ℕ\nh0 : n ≠ 0\nhi : Nat.coprime i n\n⊢ ↑n ≠ 0\n[PROOFSTEP]\nexact_mod_cast h0\n[GOAL]\ni n : ℕ\nh0 : n ≠ 0\nhi : Nat.coprime i n\nhn0 : ↑n ≠ 0\n⊢ (∃ n_1, ↑n * (2 * ↑π * I * (↑i / ↑n)) = ↑n_1 * (2 * ↑π * I)) ∧\n    ∀ (l : ℕ), (∃ n_1, ↑l * (2 * ↑π * I * (↑i / ↑n)) = ↑n_1 * (2 * ↑π * I)) → n ∣ l\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase left\ni n : ℕ\nh0 : n ≠ 0\nhi : Nat.coprime i n\nhn0 : ↑n ≠ 0\n⊢ ∃ n_1, ↑n * (2 * ↑π * I * (↑i / ↑n)) = ↑n_1 * (2 * ↑π * I)\n[PROOFSTEP]\nuse i\n[GOAL]\ncase h\ni n : ℕ\nh0 : n ≠ 0\nhi : Nat.coprime i n\nhn0 : ↑n ≠ 0\n⊢ ↑n * (2 * ↑π * I * (↑i / ↑n)) = ↑↑i * (2 * ↑π * I)\n[PROOFSTEP]\nfield_simp [hn0, mul_comm (i : ℂ), mul_comm (n : ℂ)]\n[GOAL]\ncase right\ni n : ℕ\nh0 : n ≠ 0\nhi : Nat.coprime i n\nhn0 : ↑n ≠ 0\n⊢ ∀ (l : ℕ), (∃ n_1, ↑l * (2 * ↑π * I * (↑i / ↑n)) = ↑n_1 * (2 * ↑π * I)) → n ∣ l\n[PROOFSTEP]\nsimp only [hn0, mul_right_comm _ _ ↑n, mul_left_inj' two_pi_I_ne_zero, Ne.def, not_false_iff, mul_comm _ (i : ℂ), ←\n  mul_assoc _ (i : ℂ), exists_imp, field_simps]\n[GOAL]\ncase right\ni n : ℕ\nh0 : n ≠ 0\nhi : Nat.coprime i n\nhn0 : ↑n ≠ 0\n⊢ ∀ (l : ℕ) (x : ℤ), ↑i * ↑l * (2 * ↑π * I) = ↑x * (2 * ↑π * I) * ↑n → n ∣ l\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase right\ni n : ℕ\nh0 : n ≠ 0\nhi : Nat.coprime i n\nhn0 : ↑n ≠ 0\n⊢ ∀ (l : ℕ) (x : ℤ), ↑(i * l) * (↑(2 * π) * I) = ↑x * (↑(2 * π) * I) * ↑n → n ∣ l\n[PROOFSTEP]\nrintro l k hk\n[GOAL]\ncase right\ni n : ℕ\nh0 : n ≠ 0\nhi : Nat.coprime i n\nhn0 : ↑n ≠ 0\nl : ℕ\nk : ℤ\nhk : ↑(i * l) * (↑(2 * π) * I) = ↑k * (↑(2 * π) * I) * ↑n\n⊢ n ∣ l\n[PROOFSTEP]\nconv_rhs at hk => rw [mul_comm, ← mul_assoc]\n[GOAL]\ni n : ℕ\nh0 : n ≠ 0\nhi : Nat.coprime i n\nhn0 : ↑n ≠ 0\nl : ℕ\nk : ℤ\nhk : ↑(i * l) * (↑(2 * π) * I) = ↑k * (↑(2 * π) * I) * ↑n\n| ↑k * (↑(2 * π) * I) * ↑n\n[PROOFSTEP]\nrw [mul_comm, ← mul_assoc]\n[GOAL]\ni n : ℕ\nh0 : n ≠ 0\nhi : Nat.coprime i n\nhn0 : ↑n ≠ 0\nl : ℕ\nk : ℤ\nhk : ↑(i * l) * (↑(2 * π) * I) = ↑k * (↑(2 * π) * I) * ↑n\n| ↑k * (↑(2 * π) * I) * ↑n\n[PROOFSTEP]\nrw [mul_comm, ← mul_assoc]\n[GOAL]\ni n : ℕ\nh0 : n ≠ 0\nhi : Nat.coprime i n\nhn0 : ↑n ≠ 0\nl : ℕ\nk : ℤ\nhk : ↑(i * l) * (↑(2 * π) * I) = ↑k * (↑(2 * π) * I) * ↑n\n| ↑k * (↑(2 * π) * I) * ↑n\n[PROOFSTEP]\nrw [mul_comm, ← mul_assoc]\n[GOAL]\ncase right\ni n : ℕ\nh0 : n ≠ 0\nhi : Nat.coprime i n\nhn0 : ↑n ≠ 0\nl : ℕ\nk : ℤ\nhk : ↑(i * l) * (↑(2 * π) * I) = ↑n * ↑k * (↑(2 * π) * I)\n⊢ n ∣ l\n[PROOFSTEP]\nhave hz : 2 * ↑π * I ≠ 0 := by simp [pi_pos.ne.symm, I_ne_zero]\n[GOAL]\ni n : ℕ\nh0 : n ≠ 0\nhi : Nat.coprime i n\nhn0 : ↑n ≠ 0\nl : ℕ\nk : ℤ\nhk : ↑(i * l) * (↑(2 * π) * I) = ↑n * ↑k * (↑(2 * π) * I)\n⊢ 2 * ↑π * I ≠ 0\n[PROOFSTEP]\nsimp [pi_pos.ne.symm, I_ne_zero]\n[GOAL]\ncase right\ni n : ℕ\nh0 : n ≠ 0\nhi : Nat.coprime i n\nhn0 : ↑n ≠ 0\nl : ℕ\nk : ℤ\nhk : ↑(i * l) * (↑(2 * π) * I) = ↑n * ↑k * (↑(2 * π) * I)\nhz : 2 * ↑π * I ≠ 0\n⊢ n ∣ l\n[PROOFSTEP]\nfield_simp [hz] at hk \n[GOAL]\ncase right\ni n : ℕ\nh0 : n ≠ 0\nhi : Nat.coprime i n\nhn0 : ↑n ≠ 0\nl : ℕ\nk : ℤ\nhz : 2 * ↑π * I ≠ 0\nhk : ↑i * ↑l = ↑n * ↑k\n⊢ n ∣ l\n[PROOFSTEP]\nnorm_cast at hk \n[GOAL]\ncase right\ni n : ℕ\nh0 : n ≠ 0\nhi : Nat.coprime i n\nhn0 : ↑n ≠ 0\nl : ℕ\nk : ℤ\nhz : 2 * ↑π * I ≠ 0\nhk : ↑(i * l) = ↑n * k\n⊢ n ∣ l\n[PROOFSTEP]\nhave : n ∣ i * l := by rw [← Int.coe_nat_dvd, hk, mul_comm]; apply dvd_mul_left\n[GOAL]\ni n : ℕ\nh0 : n ≠ 0\nhi : Nat.coprime i n\nhn0 : ↑n ≠ 0\nl : ℕ\nk : ℤ\nhz : 2 * ↑π * I ≠ 0\nhk : ↑(i * l) = ↑n * k\n⊢ n ∣ i * l\n[PROOFSTEP]\nrw [← Int.coe_nat_dvd, hk, mul_comm]\n[GOAL]\ni n : ℕ\nh0 : n ≠ 0\nhi : Nat.coprime i n\nhn0 : ↑n ≠ 0\nl : ℕ\nk : ℤ\nhz : 2 * ↑π * I ≠ 0\nhk : ↑(i * l) = ↑n * k\n⊢ ↑n ∣ k * ↑n\n[PROOFSTEP]\napply dvd_mul_left\n[GOAL]\ncase right\ni n : ℕ\nh0 : n ≠ 0\nhi : Nat.coprime i n\nhn0 : ↑n ≠ 0\nl : ℕ\nk : ℤ\nhz : 2 * ↑π * I ≠ 0\nhk : ↑(i * l) = ↑n * k\nthis : n ∣ i * l\n⊢ n ∣ l\n[PROOFSTEP]\nexact hi.symm.dvd_of_dvd_mul_left this\n[GOAL]\nn : ℕ\nh0 : n ≠ 0\n⊢ IsPrimitiveRoot (exp (2 * ↑π * I / ↑n)) n\n[PROOFSTEP]\nsimpa only [Nat.cast_one, one_div] using isPrimitiveRoot_exp_of_coprime 1 n h0 n.coprime_one_left\n[GOAL]\nζ : ℂ\nn : ℕ\nhn : n ≠ 0\n⊢ IsPrimitiveRoot ζ n ↔ ∃ i, i < n ∧ ∃ x, exp (2 * ↑π * I * (↑i / ↑n)) = ζ\n[PROOFSTEP]\nhave hn0 : (n : ℂ) ≠ 0 := by exact_mod_cast hn\n[GOAL]\nζ : ℂ\nn : ℕ\nhn : n ≠ 0\n⊢ ↑n ≠ 0\n[PROOFSTEP]\nexact_mod_cast hn\n[GOAL]\nζ : ℂ\nn : ℕ\nhn : n ≠ 0\nhn0 : ↑n ≠ 0\n⊢ IsPrimitiveRoot ζ n ↔ ∃ i, i < n ∧ ∃ x, exp (2 * ↑π * I * (↑i / ↑n)) = ζ\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nζ : ℂ\nn : ℕ\nhn : n ≠ 0\nhn0 : ↑n ≠ 0\n⊢ IsPrimitiveRoot ζ n → ∃ i, i < n ∧ ∃ x, exp (2 * ↑π * I * (↑i / ↑n)) = ζ\ncase mpr\nζ : ℂ\nn : ℕ\nhn : n ≠ 0\nhn0 : ↑n ≠ 0\n⊢ (∃ i, i < n ∧ ∃ x, exp (2 * ↑π * I * (↑i / ↑n)) = ζ) → IsPrimitiveRoot ζ n\n[PROOFSTEP]\nswap\n[GOAL]\ncase mpr\nζ : ℂ\nn : ℕ\nhn : n ≠ 0\nhn0 : ↑n ≠ 0\n⊢ (∃ i, i < n ∧ ∃ x, exp (2 * ↑π * I * (↑i / ↑n)) = ζ) → IsPrimitiveRoot ζ n\n[PROOFSTEP]\nrintro ⟨i, -, hi, rfl⟩\n[GOAL]\ncase mpr.intro.intro.intro\nn : ℕ\nhn : n ≠ 0\nhn0 : ↑n ≠ 0\ni : ℕ\nhi : Nat.coprime i n\n⊢ IsPrimitiveRoot (exp (2 * ↑π * I * (↑i / ↑n))) n\n[PROOFSTEP]\nexact isPrimitiveRoot_exp_of_coprime i n hn hi\n[GOAL]\ncase mp\nζ : ℂ\nn : ℕ\nhn : n ≠ 0\nhn0 : ↑n ≠ 0\n⊢ IsPrimitiveRoot ζ n → ∃ i, i < n ∧ ∃ x, exp (2 * ↑π * I * (↑i / ↑n)) = ζ\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nζ : ℂ\nn : ℕ\nhn : n ≠ 0\nhn0 : ↑n ≠ 0\nh : IsPrimitiveRoot ζ n\n⊢ ∃ i, i < n ∧ ∃ x, exp (2 * ↑π * I * (↑i / ↑n)) = ζ\n[PROOFSTEP]\nobtain ⟨i, hi, rfl⟩ := (isPrimitiveRoot_exp n hn).eq_pow_of_pow_eq_one h.pow_eq_one (Nat.pos_of_ne_zero hn)\n[GOAL]\ncase mp.intro.intro\nn : ℕ\nhn : n ≠ 0\nhn0 : ↑n ≠ 0\ni : ℕ\nhi : i < n\nh : IsPrimitiveRoot (exp (2 * ↑π * I / ↑n) ^ i) n\n⊢ ∃ i_1, i_1 < n ∧ ∃ x, exp (2 * ↑π * I * (↑i_1 / ↑n)) = exp (2 * ↑π * I / ↑n) ^ i\n[PROOFSTEP]\nrefine' ⟨i, hi, ((isPrimitiveRoot_exp n hn).pow_iff_coprime (Nat.pos_of_ne_zero hn) i).mp h, _⟩\n[GOAL]\ncase mp.intro.intro\nn : ℕ\nhn : n ≠ 0\nhn0 : ↑n ≠ 0\ni : ℕ\nhi : i < n\nh : IsPrimitiveRoot (exp (2 * ↑π * I / ↑n) ^ i) n\n⊢ exp (2 * ↑π * I * (↑i / ↑n)) = exp (2 * ↑π * I / ↑n) ^ i\n[PROOFSTEP]\nrw [← exp_nat_mul]\n[GOAL]\ncase mp.intro.intro\nn : ℕ\nhn : n ≠ 0\nhn0 : ↑n ≠ 0\ni : ℕ\nhi : i < n\nh : IsPrimitiveRoot (exp (2 * ↑π * I / ↑n) ^ i) n\n⊢ exp (2 * ↑π * I * (↑i / ↑n)) = exp (↑i * (2 * ↑π * I / ↑n))\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase mp.intro.intro.e_z\nn : ℕ\nhn : n ≠ 0\nhn0 : ↑n ≠ 0\ni : ℕ\nhi : i < n\nh : IsPrimitiveRoot (exp (2 * ↑π * I / ↑n) ^ i) n\n⊢ 2 * ↑π * I * (↑i / ↑n) = ↑i * (2 * ↑π * I / ↑n)\n[PROOFSTEP]\nfield_simp [hn0, mul_comm (i : ℂ)]\n[GOAL]\nn : ℕ+\nx : ℂˣ\n⊢ x ∈ rootsOfUnity n ℂ ↔ ∃ i, i < ↑n ∧ exp (2 * ↑π * I * (↑i / ↑↑n)) = ↑x\n[PROOFSTEP]\nrw [mem_rootsOfUnity, Units.ext_iff, Units.val_pow_eq_pow_val, Units.val_one]\n[GOAL]\nn : ℕ+\nx : ℂˣ\n⊢ ↑x ^ ↑n = 1 ↔ ∃ i, i < ↑n ∧ exp (2 * ↑π * I * (↑i / ↑↑n)) = ↑x\n[PROOFSTEP]\nhave hn0 : (n : ℂ) ≠ 0 := by exact_mod_cast n.ne_zero\n[GOAL]\nn : ℕ+\nx : ℂˣ\n⊢ ↑↑n ≠ 0\n[PROOFSTEP]\nexact_mod_cast n.ne_zero\n[GOAL]\nn : ℕ+\nx : ℂˣ\nhn0 : ↑↑n ≠ 0\n⊢ ↑x ^ ↑n = 1 ↔ ∃ i, i < ↑n ∧ exp (2 * ↑π * I * (↑i / ↑↑n)) = ↑x\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nn : ℕ+\nx : ℂˣ\nhn0 : ↑↑n ≠ 0\n⊢ ↑x ^ ↑n = 1 → ∃ i, i < ↑n ∧ exp (2 * ↑π * I * (↑i / ↑↑n)) = ↑x\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nn : ℕ+\nx : ℂˣ\nhn0 : ↑↑n ≠ 0\nh : ↑x ^ ↑n = 1\n⊢ ∃ i, i < ↑n ∧ exp (2 * ↑π * I * (↑i / ↑↑n)) = ↑x\n[PROOFSTEP]\nobtain ⟨i, hi, H⟩ : ∃ i < (n : ℕ), exp (2 * π * I / n) ^ i = x := by\n  simpa only using (isPrimitiveRoot_exp n n.ne_zero).eq_pow_of_pow_eq_one h n.pos\n[GOAL]\nn : ℕ+\nx : ℂˣ\nhn0 : ↑↑n ≠ 0\nh : ↑x ^ ↑n = 1\n⊢ ∃ i, i < ↑n ∧ exp (2 * ↑π * I / ↑↑n) ^ i = ↑x\n[PROOFSTEP]\nsimpa only using (isPrimitiveRoot_exp n n.ne_zero).eq_pow_of_pow_eq_one h n.pos\n[GOAL]\ncase mp.intro.intro\nn : ℕ+\nx : ℂˣ\nhn0 : ↑↑n ≠ 0\nh : ↑x ^ ↑n = 1\ni : ℕ\nhi : i < ↑n\nH : exp (2 * ↑π * I / ↑↑n) ^ i = ↑x\n⊢ ∃ i, i < ↑n ∧ exp (2 * ↑π * I * (↑i / ↑↑n)) = ↑x\n[PROOFSTEP]\nrefine' ⟨i, hi, _⟩\n[GOAL]\ncase mp.intro.intro\nn : ℕ+\nx : ℂˣ\nhn0 : ↑↑n ≠ 0\nh : ↑x ^ ↑n = 1\ni : ℕ\nhi : i < ↑n\nH : exp (2 * ↑π * I / ↑↑n) ^ i = ↑x\n⊢ exp (2 * ↑π * I * (↑i / ↑↑n)) = ↑x\n[PROOFSTEP]\nrw [← H, ← exp_nat_mul]\n[GOAL]\ncase mp.intro.intro\nn : ℕ+\nx : ℂˣ\nhn0 : ↑↑n ≠ 0\nh : ↑x ^ ↑n = 1\ni : ℕ\nhi : i < ↑n\nH : exp (2 * ↑π * I / ↑↑n) ^ i = ↑x\n⊢ exp (2 * ↑π * I * (↑i / ↑↑n)) = exp (↑i * (2 * ↑π * I / ↑↑n))\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase mp.intro.intro.e_z\nn : ℕ+\nx : ℂˣ\nhn0 : ↑↑n ≠ 0\nh : ↑x ^ ↑n = 1\ni : ℕ\nhi : i < ↑n\nH : exp (2 * ↑π * I / ↑↑n) ^ i = ↑x\n⊢ 2 * ↑π * I * (↑i / ↑↑n) = ↑i * (2 * ↑π * I / ↑↑n)\n[PROOFSTEP]\nfield_simp [hn0, mul_comm (i : ℂ)]\n[GOAL]\ncase mpr\nn : ℕ+\nx : ℂˣ\nhn0 : ↑↑n ≠ 0\n⊢ (∃ i, i < ↑n ∧ exp (2 * ↑π * I * (↑i / ↑↑n)) = ↑x) → ↑x ^ ↑n = 1\n[PROOFSTEP]\nrintro ⟨i, _, H⟩\n[GOAL]\ncase mpr.intro.intro\nn : ℕ+\nx : ℂˣ\nhn0 : ↑↑n ≠ 0\ni : ℕ\nleft✝ : i < ↑n\nH : exp (2 * ↑π * I * (↑i / ↑↑n)) = ↑x\n⊢ ↑x ^ ↑n = 1\n[PROOFSTEP]\nrw [← H, ← exp_nat_mul, exp_eq_one_iff]\n[GOAL]\ncase mpr.intro.intro\nn : ℕ+\nx : ℂˣ\nhn0 : ↑↑n ≠ 0\ni : ℕ\nleft✝ : i < ↑n\nH : exp (2 * ↑π * I * (↑i / ↑↑n)) = ↑x\n⊢ ∃ n_1, ↑↑n * (2 * ↑π * I * (↑i / ↑↑n)) = ↑n_1 * (2 * ↑π * I)\n[PROOFSTEP]\nuse i\n[GOAL]\ncase h\nn : ℕ+\nx : ℂˣ\nhn0 : ↑↑n ≠ 0\ni : ℕ\nleft✝ : i < ↑n\nH : exp (2 * ↑π * I * (↑i / ↑↑n)) = ↑x\n⊢ ↑↑n * (2 * ↑π * I * (↑i / ↑↑n)) = ↑↑i * (2 * ↑π * I)\n[PROOFSTEP]\nfield_simp [hn0, mul_comm ((n : ℕ) : ℂ), mul_comm (i : ℂ)]\n[GOAL]\nk : ℕ\n⊢ Finset.card (primitiveRoots k ℂ) = φ k\n[PROOFSTEP]\nby_cases h : k = 0\n[GOAL]\ncase pos\nk : ℕ\nh : k = 0\n⊢ Finset.card (primitiveRoots k ℂ) = φ k\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase neg\nk : ℕ\nh : ¬k = 0\n⊢ Finset.card (primitiveRoots k ℂ) = φ k\n[PROOFSTEP]\nexact (isPrimitiveRoot_exp k h).card_primitiveRoots\n[GOAL]\nn : ℕ\nζ : ℂ\nh : IsPrimitiveRoot ζ n\nhn : n ≠ 0\n⊢ ∃ i, Complex.arg ζ = ↑i / ↑n * (2 * Real.pi) ∧ IsCoprime i ↑n ∧ Int.natAbs i < n\n[PROOFSTEP]\nrw [Complex.isPrimitiveRoot_iff _ _ hn] at h \n[GOAL]\nn : ℕ\nζ : ℂ\nh : ∃ i, i < n ∧ ∃ x, Complex.exp (2 * ↑Real.pi * Complex.I * (↑i / ↑n)) = ζ\nhn : n ≠ 0\n⊢ ∃ i, Complex.arg ζ = ↑i / ↑n * (2 * Real.pi) ∧ IsCoprime i ↑n ∧ Int.natAbs i < n\n[PROOFSTEP]\nobtain ⟨i, h, hin, rfl⟩ := h\n[GOAL]\ncase intro.intro.intro\nn : ℕ\nhn : n ≠ 0\ni : ℕ\nh : i < n\nhin : Nat.coprime i n\n⊢ ∃ i_1,\n    Complex.arg (Complex.exp (2 * ↑Real.pi * Complex.I * (↑i / ↑n))) = ↑i_1 / ↑n * (2 * Real.pi) ∧\n      IsCoprime i_1 ↑n ∧ Int.natAbs i_1 < n\n[PROOFSTEP]\nrw [mul_comm, ← mul_assoc, Complex.exp_mul_I]\n[GOAL]\ncase intro.intro.intro\nn : ℕ\nhn : n ≠ 0\ni : ℕ\nh : i < n\nhin : Nat.coprime i n\n⊢ ∃ i_1,\n    Complex.arg (Complex.cos (↑i / ↑n * (2 * ↑Real.pi)) + Complex.sin (↑i / ↑n * (2 * ↑Real.pi)) * Complex.I) =\n        ↑i_1 / ↑n * (2 * Real.pi) ∧\n      IsCoprime i_1 ↑n ∧ Int.natAbs i_1 < n\n[PROOFSTEP]\nrefine' ⟨if i * 2 ≤ n then i else i - n, _, _, _⟩\n[GOAL]\ncase intro.intro.intro.refine'_1\nn : ℕ\nhn : n ≠ 0\ni : ℕ\nh : i < n\nhin : Nat.coprime i n\n⊢ Complex.arg (Complex.cos (↑i / ↑n * (2 * ↑Real.pi)) + Complex.sin (↑i / ↑n * (2 * ↑Real.pi)) * Complex.I) =\n    ↑(if i * 2 ≤ n then ↑i else ↑i - ↑n) / ↑n * (2 * Real.pi)\ncase intro.intro.intro.refine'_2\nn : ℕ\nhn : n ≠ 0\ni : ℕ\nh : i < n\nhin : Nat.coprime i n\n⊢ IsCoprime (if i * 2 ≤ n then ↑i else ↑i - ↑n) ↑n\ncase intro.intro.intro.refine'_3\nn : ℕ\nhn : n ≠ 0\ni : ℕ\nh : i < n\nhin : Nat.coprime i n\n⊢ Int.natAbs (if i * 2 ≤ n then ↑i else ↑i - ↑n) < n\n[PROOFSTEP]\non_goal 2 =>\n  replace hin := Nat.isCoprime_iff_coprime.mpr hin\n  split_ifs\n  · exact hin\n  · convert hin.add_mul_left_left (-1) using 1\n    rw [mul_neg_one, sub_eq_add_neg]\n[GOAL]\ncase intro.intro.intro.refine'_1\nn : ℕ\nhn : n ≠ 0\ni : ℕ\nh : i < n\nhin : Nat.coprime i n\n⊢ Complex.arg (Complex.cos (↑i / ↑n * (2 * ↑Real.pi)) + Complex.sin (↑i / ↑n * (2 * ↑Real.pi)) * Complex.I) =\n    ↑(if i * 2 ≤ n then ↑i else ↑i - ↑n) / ↑n * (2 * Real.pi)\ncase intro.intro.intro.refine'_2\nn : ℕ\nhn : n ≠ 0\ni : ℕ\nh : i < n\nhin : Nat.coprime i n\n⊢ IsCoprime (if i * 2 ≤ n then ↑i else ↑i - ↑n) ↑n\ncase intro.intro.intro.refine'_3\nn : ℕ\nhn : n ≠ 0\ni : ℕ\nh : i < n\nhin : Nat.coprime i n\n⊢ Int.natAbs (if i * 2 ≤ n then ↑i else ↑i - ↑n) < n\n[PROOFSTEP]\non_goal 2 =>\n  replace hin := Nat.isCoprime_iff_coprime.mpr hin\n  split_ifs\n  · exact hin\n  · convert hin.add_mul_left_left (-1) using 1\n    rw [mul_neg_one, sub_eq_add_neg]\n[GOAL]\ncase intro.intro.intro.refine'_2\nn : ℕ\nhn : n ≠ 0\ni : ℕ\nh : i < n\nhin : Nat.coprime i n\n⊢ IsCoprime (if i * 2 ≤ n then ↑i else ↑i - ↑n) ↑n\n[PROOFSTEP]\nreplace hin := Nat.isCoprime_iff_coprime.mpr hin\n[GOAL]\ncase intro.intro.intro.refine'_2\nn : ℕ\nhn : n ≠ 0\ni : ℕ\nh : i < n\nhin : IsCoprime ↑i ↑n\n⊢ IsCoprime (if i * 2 ≤ n then ↑i else ↑i - ↑n) ↑n\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nn : ℕ\nhn : n ≠ 0\ni : ℕ\nh : i < n\nhin : IsCoprime ↑i ↑n\nh✝ : i * 2 ≤ n\n⊢ IsCoprime ↑i ↑n\n[PROOFSTEP]\nexact hin\n[GOAL]\ncase neg\nn : ℕ\nhn : n ≠ 0\ni : ℕ\nh : i < n\nhin : IsCoprime ↑i ↑n\nh✝ : ¬i * 2 ≤ n\n⊢ IsCoprime (↑i - ↑n) ↑n\n[PROOFSTEP]\nconvert hin.add_mul_left_left (-1) using 1\n[GOAL]\ncase h.e'_3\nn : ℕ\nhn : n ≠ 0\ni : ℕ\nh : i < n\nhin : IsCoprime ↑i ↑n\nh✝ : ¬i * 2 ≤ n\n⊢ ↑i - ↑n = ↑i + ↑n * -1\n[PROOFSTEP]\nrw [mul_neg_one, sub_eq_add_neg]\n[GOAL]\ncase intro.intro.intro.refine'_1\nn : ℕ\nhn : n ≠ 0\ni : ℕ\nh : i < n\nhin : Nat.coprime i n\n⊢ Complex.arg (Complex.cos (↑i / ↑n * (2 * ↑Real.pi)) + Complex.sin (↑i / ↑n * (2 * ↑Real.pi)) * Complex.I) =\n    ↑(if i * 2 ≤ n then ↑i else ↑i - ↑n) / ↑n * (2 * Real.pi)\ncase intro.intro.intro.refine'_3\nn : ℕ\nhn : n ≠ 0\ni : ℕ\nh : i < n\nhin : Nat.coprime i n\n⊢ Int.natAbs (if i * 2 ≤ n then ↑i else ↑i - ↑n) < n\n[PROOFSTEP]\non_goal 2 =>\n  split_ifs with h₂\n  · exact_mod_cast h\n  suffices (i - n : ℤ).natAbs = n - i by\n    rw [this]\n    apply tsub_lt_self hn.bot_lt\n    contrapose! h₂\n    rw [Nat.eq_zero_of_le_zero h₂, zero_mul]\n    exact zero_le _\n  rw [← Int.natAbs_neg, neg_sub, Int.natAbs_eq_iff]\n  exact Or.inl (Int.ofNat_sub h.le).symm\n[GOAL]\ncase intro.intro.intro.refine'_1\nn : ℕ\nhn : n ≠ 0\ni : ℕ\nh : i < n\nhin : Nat.coprime i n\n⊢ Complex.arg (Complex.cos (↑i / ↑n * (2 * ↑Real.pi)) + Complex.sin (↑i / ↑n * (2 * ↑Real.pi)) * Complex.I) =\n    ↑(if i * 2 ≤ n then ↑i else ↑i - ↑n) / ↑n * (2 * Real.pi)\ncase intro.intro.intro.refine'_3\nn : ℕ\nhn : n ≠ 0\ni : ℕ\nh : i < n\nhin : Nat.coprime i n\n⊢ Int.natAbs (if i * 2 ≤ n then ↑i else ↑i - ↑n) < n\n[PROOFSTEP]\non_goal 2 =>\n  split_ifs with h₂\n  · exact_mod_cast h\n  suffices (i - n : ℤ).natAbs = n - i by\n    rw [this]\n    apply tsub_lt_self hn.bot_lt\n    contrapose! h₂\n    rw [Nat.eq_zero_of_le_zero h₂, zero_mul]\n    exact zero_le _\n  rw [← Int.natAbs_neg, neg_sub, Int.natAbs_eq_iff]\n  exact Or.inl (Int.ofNat_sub h.le).symm\n[GOAL]\ncase intro.intro.intro.refine'_3\nn : ℕ\nhn : n ≠ 0\ni : ℕ\nh : i < n\nhin : Nat.coprime i n\n⊢ Int.natAbs (if i * 2 ≤ n then ↑i else ↑i - ↑n) < n\n[PROOFSTEP]\nsplit_ifs with h₂\n[GOAL]\ncase pos\nn : ℕ\nhn : n ≠ 0\ni : ℕ\nh : i < n\nhin : Nat.coprime i n\nh₂ : i * 2 ≤ n\n⊢ Int.natAbs ↑i < n\n[PROOFSTEP]\nexact_mod_cast h\n[GOAL]\ncase neg\nn : ℕ\nhn : n ≠ 0\ni : ℕ\nh : i < n\nhin : Nat.coprime i n\nh₂ : ¬i * 2 ≤ n\n⊢ Int.natAbs (↑i - ↑n) < n\n[PROOFSTEP]\nsuffices (i - n : ℤ).natAbs = n - i by\n  rw [this]\n  apply tsub_lt_self hn.bot_lt\n  contrapose! h₂\n  rw [Nat.eq_zero_of_le_zero h₂, zero_mul]\n  exact zero_le _\n[GOAL]\nn : ℕ\nhn : n ≠ 0\ni : ℕ\nh : i < n\nhin : Nat.coprime i n\nh₂ : ¬i * 2 ≤ n\nthis : Int.natAbs (↑i - ↑n) = n - i\n⊢ Int.natAbs (↑i - ↑n) < n\n[PROOFSTEP]\nrw [this]\n[GOAL]\nn : ℕ\nhn : n ≠ 0\ni : ℕ\nh : i < n\nhin : Nat.coprime i n\nh₂ : ¬i * 2 ≤ n\nthis : Int.natAbs (↑i - ↑n) = n - i\n⊢ n - i < n\n[PROOFSTEP]\napply tsub_lt_self hn.bot_lt\n[GOAL]\nn : ℕ\nhn : n ≠ 0\ni : ℕ\nh : i < n\nhin : Nat.coprime i n\nh₂ : ¬i * 2 ≤ n\nthis : Int.natAbs (↑i - ↑n) = n - i\n⊢ 0 < i\n[PROOFSTEP]\ncontrapose! h₂\n[GOAL]\nn : ℕ\nhn : n ≠ 0\ni : ℕ\nh : i < n\nhin : Nat.coprime i n\nthis : Int.natAbs (↑i - ↑n) = n - i\nh₂ : i ≤ 0\n⊢ i * 2 ≤ n\n[PROOFSTEP]\nrw [Nat.eq_zero_of_le_zero h₂, zero_mul]\n[GOAL]\nn : ℕ\nhn : n ≠ 0\ni : ℕ\nh : i < n\nhin : Nat.coprime i n\nthis : Int.natAbs (↑i - ↑n) = n - i\nh₂ : i ≤ 0\n⊢ 0 ≤ n\n[PROOFSTEP]\nexact zero_le _\n[GOAL]\ncase neg\nn : ℕ\nhn : n ≠ 0\ni : ℕ\nh : i < n\nhin : Nat.coprime i n\nh₂ : ¬i * 2 ≤ n\n⊢ Int.natAbs (↑i - ↑n) = n - i\n[PROOFSTEP]\nrw [← Int.natAbs_neg, neg_sub, Int.natAbs_eq_iff]\n[GOAL]\ncase neg\nn : ℕ\nhn : n ≠ 0\ni : ℕ\nh : i < n\nhin : Nat.coprime i n\nh₂ : ¬i * 2 ≤ n\n⊢ ↑n - ↑i = ↑(n - i) ∨ ↑n - ↑i = -↑(n - i)\n[PROOFSTEP]\nexact Or.inl (Int.ofNat_sub h.le).symm\n[GOAL]\ncase intro.intro.intro.refine'_1\nn : ℕ\nhn : n ≠ 0\ni : ℕ\nh : i < n\nhin : Nat.coprime i n\n⊢ Complex.arg (Complex.cos (↑i / ↑n * (2 * ↑Real.pi)) + Complex.sin (↑i / ↑n * (2 * ↑Real.pi)) * Complex.I) =\n    ↑(if i * 2 ≤ n then ↑i else ↑i - ↑n) / ↑n * (2 * Real.pi)\n[PROOFSTEP]\nsplit_ifs with h₂\n[GOAL]\ncase pos\nn : ℕ\nhn : n ≠ 0\ni : ℕ\nh : i < n\nhin : Nat.coprime i n\nh₂ : i * 2 ≤ n\n⊢ Complex.arg (Complex.cos (↑i / ↑n * (2 * ↑Real.pi)) + Complex.sin (↑i / ↑n * (2 * ↑Real.pi)) * Complex.I) =\n    ↑↑i / ↑n * (2 * Real.pi)\n[PROOFSTEP]\nconvert Complex.arg_cos_add_sin_mul_I _\n[GOAL]\ncase h.e'_2.h.e'_1.h.e'_5.h.e'_1\nn : ℕ\nhn : n ≠ 0\ni : ℕ\nh : i < n\nhin : Nat.coprime i n\nh₂ : i * 2 ≤ n\n⊢ ↑i / ↑n * (2 * ↑Real.pi) = ↑(↑↑i / ↑n * (2 * Real.pi))\n[PROOFSTEP]\npush_cast\n[GOAL]\ncase h.e'_2.h.e'_1.h.e'_5.h.e'_1\nn : ℕ\nhn : n ≠ 0\ni : ℕ\nh : i < n\nhin : Nat.coprime i n\nh₂ : i * 2 ≤ n\n⊢ ↑i / ↑n * (2 * ↑Real.pi) = ↑i / ↑n * (2 * ↑Real.pi)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h.e'_2.h.e'_1.h.e'_6.h.e'_5.h.e'_1\nn : ℕ\nhn : n ≠ 0\ni : ℕ\nh : i < n\nhin : Nat.coprime i n\nh₂ : i * 2 ≤ n\n⊢ ↑i / ↑n * (2 * ↑Real.pi) = ↑(↑↑i / ↑n * (2 * Real.pi))\n[PROOFSTEP]\npush_cast\n[GOAL]\ncase h.e'_2.h.e'_1.h.e'_6.h.e'_5.h.e'_1\nn : ℕ\nhn : n ≠ 0\ni : ℕ\nh : i < n\nhin : Nat.coprime i n\nh₂ : i * 2 ≤ n\n⊢ ↑i / ↑n * (2 * ↑Real.pi) = ↑i / ↑n * (2 * ↑Real.pi)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase pos.convert_2\nn : ℕ\nhn : n ≠ 0\ni : ℕ\nh : i < n\nhin : Nat.coprime i n\nh₂ : i * 2 ≤ n\n⊢ ↑↑i / ↑n * (2 * Real.pi) ∈ Set.Ioc (-Real.pi) Real.pi\n[PROOFSTEP]\nfield_simp [hn]\n[GOAL]\ncase pos.convert_2\nn : ℕ\nhn : n ≠ 0\ni : ℕ\nh : i < n\nhin : Nat.coprime i n\nh₂ : i * 2 ≤ n\n⊢ -Real.pi < ↑i * (2 * Real.pi) / ↑n ∧ ↑i * (2 * Real.pi) / ↑n ≤ Real.pi\n[PROOFSTEP]\nrefine' ⟨(neg_lt_neg Real.pi_pos).trans_le _, _⟩\n[GOAL]\ncase pos.convert_2.refine'_1\nn : ℕ\nhn : n ≠ 0\ni : ℕ\nh : i < n\nhin : Nat.coprime i n\nh₂ : i * 2 ≤ n\n⊢ -0 ≤ ↑i * (2 * Real.pi) / ↑n\n[PROOFSTEP]\nrw [neg_zero]\n[GOAL]\ncase pos.convert_2.refine'_1\nn : ℕ\nhn : n ≠ 0\ni : ℕ\nh : i < n\nhin : Nat.coprime i n\nh₂ : i * 2 ≤ n\n⊢ 0 ≤ ↑i * (2 * Real.pi) / ↑n\n[PROOFSTEP]\nexact\n  mul_nonneg (mul_nonneg i.cast_nonneg <| by simp [Real.pi_pos.le]) (by rw [inv_nonneg]; simp only [Nat.cast_nonneg])\n[GOAL]\nn : ℕ\nhn : n ≠ 0\ni : ℕ\nh : i < n\nhin : Nat.coprime i n\nh₂ : i * 2 ≤ n\n⊢ 0 ≤ 2 * Real.pi\n[PROOFSTEP]\nsimp [Real.pi_pos.le]\n[GOAL]\nn : ℕ\nhn : n ≠ 0\ni : ℕ\nh : i < n\nhin : Nat.coprime i n\nh₂ : i * 2 ≤ n\n⊢ 0 ≤ (↑n)⁻¹\n[PROOFSTEP]\nrw [inv_nonneg]\n[GOAL]\nn : ℕ\nhn : n ≠ 0\ni : ℕ\nh : i < n\nhin : Nat.coprime i n\nh₂ : i * 2 ≤ n\n⊢ 0 ≤ ↑n\n[PROOFSTEP]\nsimp only [Nat.cast_nonneg]\n[GOAL]\ncase pos.convert_2.refine'_2\nn : ℕ\nhn : n ≠ 0\ni : ℕ\nh : i < n\nhin : Nat.coprime i n\nh₂ : i * 2 ≤ n\n⊢ ↑i * (2 * Real.pi) / ↑n ≤ Real.pi\n[PROOFSTEP]\nrw [← mul_rotate', mul_div_assoc]\n[GOAL]\ncase pos.convert_2.refine'_2\nn : ℕ\nhn : n ≠ 0\ni : ℕ\nh : i < n\nhin : Nat.coprime i n\nh₂ : i * 2 ≤ n\n⊢ Real.pi * (↑i * 2 / ↑n) ≤ Real.pi\n[PROOFSTEP]\nrw [← mul_one n] at h₂ \n[GOAL]\ncase pos.convert_2.refine'_2\nn : ℕ\nhn : n ≠ 0\ni : ℕ\nh : i < n\nhin : Nat.coprime i n\nh₂ : i * 2 ≤ n * 1\n⊢ Real.pi * (↑i * 2 / ↑n) ≤ Real.pi\n[PROOFSTEP]\nexact mul_le_of_le_one_right Real.pi_pos.le ((div_le_iff' <| by exact_mod_cast pos_of_gt h).mpr <| by exact_mod_cast h₂)\n[GOAL]\nn : ℕ\nhn : n ≠ 0\ni : ℕ\nh : i < n\nhin : Nat.coprime i n\nh₂ : i * 2 ≤ n * 1\n⊢ 0 < ↑n\n[PROOFSTEP]\nexact_mod_cast pos_of_gt h\n[GOAL]\nn : ℕ\nhn : n ≠ 0\ni : ℕ\nh : i < n\nhin : Nat.coprime i n\nh₂ : i * 2 ≤ n * 1\n⊢ ↑i * 2 ≤ ↑n * 1\n[PROOFSTEP]\nexact_mod_cast h₂\n[GOAL]\ncase neg\nn : ℕ\nhn : n ≠ 0\ni : ℕ\nh : i < n\nhin : Nat.coprime i n\nh₂ : ¬i * 2 ≤ n\n⊢ Complex.arg (Complex.cos (↑i / ↑n * (2 * ↑Real.pi)) + Complex.sin (↑i / ↑n * (2 * ↑Real.pi)) * Complex.I) =\n    ↑(↑i - ↑n) / ↑n * (2 * Real.pi)\n[PROOFSTEP]\nrw [← Complex.cos_sub_two_pi, ← Complex.sin_sub_two_pi]\n[GOAL]\ncase neg\nn : ℕ\nhn : n ≠ 0\ni : ℕ\nh : i < n\nhin : Nat.coprime i n\nh₂ : ¬i * 2 ≤ n\n⊢ Complex.arg\n      (Complex.cos (↑i / ↑n * (2 * ↑Real.pi) - 2 * ↑Real.pi) +\n        Complex.sin (↑i / ↑n * (2 * ↑Real.pi) - 2 * ↑Real.pi) * Complex.I) =\n    ↑(↑i - ↑n) / ↑n * (2 * Real.pi)\n[PROOFSTEP]\nconvert Complex.arg_cos_add_sin_mul_I _\n[GOAL]\ncase h.e'_2.h.e'_1.h.e'_5.h.e'_1\nn : ℕ\nhn : n ≠ 0\ni : ℕ\nh : i < n\nhin : Nat.coprime i n\nh₂ : ¬i * 2 ≤ n\n⊢ ↑i / ↑n * (2 * ↑Real.pi) - 2 * ↑Real.pi = ↑(↑(↑i - ↑n) / ↑n * (2 * Real.pi))\n[PROOFSTEP]\npush_cast\n[GOAL]\ncase h.e'_2.h.e'_1.h.e'_5.h.e'_1\nn : ℕ\nhn : n ≠ 0\ni : ℕ\nh : i < n\nhin : Nat.coprime i n\nh₂ : ¬i * 2 ≤ n\n⊢ ↑i / ↑n * (2 * ↑Real.pi) - 2 * ↑Real.pi = (↑i - ↑n) / ↑n * (2 * ↑Real.pi)\n[PROOFSTEP]\nrw [← sub_one_mul, sub_div, div_self]\n[GOAL]\ncase h.e'_2.h.e'_1.h.e'_5.h.e'_1\nn : ℕ\nhn : n ≠ 0\ni : ℕ\nh : i < n\nhin : Nat.coprime i n\nh₂ : ¬i * 2 ≤ n\n⊢ ↑n ≠ 0\n[PROOFSTEP]\nexact_mod_cast hn\n[GOAL]\ncase h.e'_2.h.e'_1.h.e'_6.h.e'_5.h.e'_1\nn : ℕ\nhn : n ≠ 0\ni : ℕ\nh : i < n\nhin : Nat.coprime i n\nh₂ : ¬i * 2 ≤ n\n⊢ ↑i / ↑n * (2 * ↑Real.pi) - 2 * ↑Real.pi = ↑(↑(↑i - ↑n) / ↑n * (2 * Real.pi))\n[PROOFSTEP]\npush_cast\n[GOAL]\ncase h.e'_2.h.e'_1.h.e'_6.h.e'_5.h.e'_1\nn : ℕ\nhn : n ≠ 0\ni : ℕ\nh : i < n\nhin : Nat.coprime i n\nh₂ : ¬i * 2 ≤ n\n⊢ ↑i / ↑n * (2 * ↑Real.pi) - 2 * ↑Real.pi = (↑i - ↑n) / ↑n * (2 * ↑Real.pi)\n[PROOFSTEP]\nrw [← sub_one_mul, sub_div, div_self]\n[GOAL]\ncase h.e'_2.h.e'_1.h.e'_6.h.e'_5.h.e'_1\nn : ℕ\nhn : n ≠ 0\ni : ℕ\nh : i < n\nhin : Nat.coprime i n\nh₂ : ¬i * 2 ≤ n\n⊢ ↑n ≠ 0\n[PROOFSTEP]\nexact_mod_cast hn\n[GOAL]\ncase neg.convert_2\nn : ℕ\nhn : n ≠ 0\ni : ℕ\nh : i < n\nhin : Nat.coprime i n\nh₂ : ¬i * 2 ≤ n\n⊢ ↑(↑i - ↑n) / ↑n * (2 * Real.pi) ∈ Set.Ioc (-Real.pi) Real.pi\n[PROOFSTEP]\nfield_simp [hn]\n[GOAL]\ncase neg.convert_2\nn : ℕ\nhn : n ≠ 0\ni : ℕ\nh : i < n\nhin : Nat.coprime i n\nh₂ : ¬i * 2 ≤ n\n⊢ -Real.pi < (↑i - ↑n) * (2 * Real.pi) / ↑n ∧ (↑i - ↑n) * (2 * Real.pi) / ↑n ≤ Real.pi\n[PROOFSTEP]\nrefine' ⟨_, le_trans _ Real.pi_pos.le⟩\n[GOAL]\ncase neg.convert_2.refine'_1\nn : ℕ\nhn : n ≠ 0\ni : ℕ\nh : i < n\nhin : Nat.coprime i n\nh₂ : ¬i * 2 ≤ n\n⊢ -Real.pi < (↑i - ↑n) * (2 * Real.pi) / ↑n\ncase neg.convert_2.refine'_2\nn : ℕ\nhn : n ≠ 0\ni : ℕ\nh : i < n\nhin : Nat.coprime i n\nh₂ : ¬i * 2 ≤ n\n⊢ (↑i - ↑n) * (2 * Real.pi) / ↑n ≤ 0\n[PROOFSTEP]\non_goal 2 =>\n  rw [mul_div_assoc]\n  exact\n    mul_nonpos_of_nonpos_of_nonneg (sub_nonpos.mpr <| by exact_mod_cast h.le)\n      (div_nonneg (by simp [Real.pi_pos.le]) <| by simp)\n[GOAL]\ncase neg.convert_2.refine'_1\nn : ℕ\nhn : n ≠ 0\ni : ℕ\nh : i < n\nhin : Nat.coprime i n\nh₂ : ¬i * 2 ≤ n\n⊢ -Real.pi < (↑i - ↑n) * (2 * Real.pi) / ↑n\ncase neg.convert_2.refine'_2\nn : ℕ\nhn : n ≠ 0\ni : ℕ\nh : i < n\nhin : Nat.coprime i n\nh₂ : ¬i * 2 ≤ n\n⊢ (↑i - ↑n) * (2 * Real.pi) / ↑n ≤ 0\n[PROOFSTEP]\non_goal 2 =>\n  rw [mul_div_assoc]\n  exact\n    mul_nonpos_of_nonpos_of_nonneg (sub_nonpos.mpr <| by exact_mod_cast h.le)\n      (div_nonneg (by simp [Real.pi_pos.le]) <| by simp)\n[GOAL]\ncase neg.convert_2.refine'_2\nn : ℕ\nhn : n ≠ 0\ni : ℕ\nh : i < n\nhin : Nat.coprime i n\nh₂ : ¬i * 2 ≤ n\n⊢ (↑i - ↑n) * (2 * Real.pi) / ↑n ≤ 0\n[PROOFSTEP]\nrw [mul_div_assoc]\n[GOAL]\ncase neg.convert_2.refine'_2\nn : ℕ\nhn : n ≠ 0\ni : ℕ\nh : i < n\nhin : Nat.coprime i n\nh₂ : ¬i * 2 ≤ n\n⊢ (↑i - ↑n) * (2 * Real.pi / ↑n) ≤ 0\n[PROOFSTEP]\nexact\n  mul_nonpos_of_nonpos_of_nonneg (sub_nonpos.mpr <| by exact_mod_cast h.le)\n    (div_nonneg (by simp [Real.pi_pos.le]) <| by simp)\n[GOAL]\nn : ℕ\nhn : n ≠ 0\ni : ℕ\nh : i < n\nhin : Nat.coprime i n\nh₂ : ¬i * 2 ≤ n\n⊢ ↑i ≤ ↑n\n[PROOFSTEP]\nexact_mod_cast h.le\n[GOAL]\nn : ℕ\nhn : n ≠ 0\ni : ℕ\nh : i < n\nhin : Nat.coprime i n\nh₂ : ¬i * 2 ≤ n\n⊢ 0 ≤ 2 * Real.pi\n[PROOFSTEP]\nsimp [Real.pi_pos.le]\n[GOAL]\nn : ℕ\nhn : n ≠ 0\ni : ℕ\nh : i < n\nhin : Nat.coprime i n\nh₂ : ¬i * 2 ≤ n\n⊢ 0 ≤ ↑n\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg.convert_2.refine'_1\nn : ℕ\nhn : n ≠ 0\ni : ℕ\nh : i < n\nhin : Nat.coprime i n\nh₂ : ¬i * 2 ≤ n\n⊢ -Real.pi < (↑i - ↑n) * (2 * Real.pi) / ↑n\n[PROOFSTEP]\nrw [← mul_rotate', mul_div_assoc, neg_lt, ← mul_neg, mul_lt_iff_lt_one_right Real.pi_pos, ← neg_div, ← neg_mul, neg_sub,\n  div_lt_iff, one_mul, sub_mul, sub_lt_comm, ← mul_sub_one]\n[GOAL]\ncase neg.convert_2.refine'_1\nn : ℕ\nhn : n ≠ 0\ni : ℕ\nh : i < n\nhin : Nat.coprime i n\nh₂ : ¬i * 2 ≤ n\n⊢ ↑n * (2 - 1) < ↑i * 2\ncase neg.convert_2.refine'_1 n : ℕ hn : n ≠ 0 i : ℕ h : i < n hin : Nat.coprime i n h₂ : ¬i * 2 ≤ n ⊢ 0 < ↑n\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase neg.convert_2.refine'_1\nn : ℕ\nhn : n ≠ 0\ni : ℕ\nh : i < n\nhin : Nat.coprime i n\nh₂ : ¬i * 2 ≤ n\n⊢ ↑n < ↑i * 2\ncase neg.convert_2.refine'_1 n : ℕ hn : n ≠ 0 i : ℕ h : i < n hin : Nat.coprime i n h₂ : ¬i * 2 ≤ n ⊢ 0 < ↑n\n[PROOFSTEP]\nexact_mod_cast not_le.mp h₂\n[GOAL]\ncase neg.convert_2.refine'_1\nn : ℕ\nhn : n ≠ 0\ni : ℕ\nh : i < n\nhin : Nat.coprime i n\nh₂ : ¬i * 2 ≤ n\n⊢ 0 < ↑n\n[PROOFSTEP]\nexact Nat.cast_pos.mpr hn.bot_lt\n", "meta": {"mathlib_filename": "Mathlib.RingTheory.RootsOfUnity.Complex", "llama_tokens": 14978, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8438950947024555, "lm_q2_score": 0.6150878555160665, "lm_q1q2_score": 0.5190696240810612}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\nf : α → β\ninst✝¹ : Preorder α\ninst✝ : Preorder β\na b : α\nh : Monotone f\nx✝¹ : α\nx✝ : x✝¹ ∈ Icc a b\n⊢ f x✝¹ ∈ Icc (f a) (f b)\n[PROOFSTEP]\naesop\n[GOAL]\nα : Type u_1\nβ : Type u_2\nf : α → β\ninst✝¹ : Preorder α\ninst✝ : Preorder β\na b : α\nh : StrictMono f\nx✝¹ : α\nx✝ : x✝¹ ∈ Ioo a b\n⊢ f x✝¹ ∈ Ioo (f a) (f b)\n[PROOFSTEP]\naesop\n[GOAL]\nα : Type u_1\nβ : Type u_2\nf : α → β\ninst✝¹ : Preorder α\ninst✝ : Preorder β\na : α\nh : Monotone f\nx✝¹ : α\nx✝ : x✝¹ ∈ Ici a\n⊢ f x✝¹ ∈ Ici (f a)\n[PROOFSTEP]\naesop\n[GOAL]\nα : Type u_1\nβ : Type u_2\nf : α → β\ninst✝¹ : Preorder α\ninst✝ : Preorder β\na : α\nh : Monotone f\nx✝¹ : α\nx✝ : x✝¹ ∈ Iic a\n⊢ f x✝¹ ∈ Iic (f a)\n[PROOFSTEP]\naesop\n[GOAL]\nα : Type u_1\nβ : Type u_2\nf : α → β\ninst✝¹ : Preorder α\ninst✝ : Preorder β\na : α\nh : StrictMono f\nx✝¹ : α\nx✝ : x✝¹ ∈ Ioi a\n⊢ f x✝¹ ∈ Ioi (f a)\n[PROOFSTEP]\naesop\n[GOAL]\nα : Type u_1\nβ : Type u_2\nf : α → β\ninst✝¹ : Preorder α\ninst✝ : Preorder β\na : α\nh : StrictMono f\nx✝¹ : α\nx✝ : x✝¹ ∈ Iio a\n⊢ f x✝¹ ∈ Iio (f a)\n[PROOFSTEP]\naesop\n", "meta": {"mathlib_filename": "Mathlib.Data.Set.Intervals.Image", "llama_tokens": 657, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7799929002541068, "lm_q2_score": 0.6654105521116443, "lm_q1q2_score": 0.5190155064012479}}
{"text": "[GOAL]\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : X →ᵇ ℝ\ne : C(X, Y)\nhe : ClosedEmbedding ↑e\n⊢ ∃ g, ‖g‖ ≤ ‖f‖ / 3 ∧ dist (compContinuous g e) f ≤ 2 / 3 * ‖f‖\n[PROOFSTEP]\nhave h3 : (0 : ℝ) < 3 := by norm_num1\n[GOAL]\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : X →ᵇ ℝ\ne : C(X, Y)\nhe : ClosedEmbedding ↑e\n⊢ 0 < 3\n[PROOFSTEP]\nnorm_num1\n[GOAL]\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : X →ᵇ ℝ\ne : C(X, Y)\nhe : ClosedEmbedding ↑e\nh3 : 0 < 3\n⊢ ∃ g, ‖g‖ ≤ ‖f‖ / 3 ∧ dist (compContinuous g e) f ≤ 2 / 3 * ‖f‖\n[PROOFSTEP]\nhave h23 : 0 < (2 / 3 : ℝ) := by\n  norm_num1\n    -- In the trivial case `f = 0`, we take `g = 0`\n[GOAL]\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : X →ᵇ ℝ\ne : C(X, Y)\nhe : ClosedEmbedding ↑e\nh3 : 0 < 3\n⊢ 0 < 2 / 3\n[PROOFSTEP]\nnorm_num1\n  -- In the trivial case `f = 0`, we take `g = 0`\n[GOAL]\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : X →ᵇ ℝ\ne : C(X, Y)\nhe : ClosedEmbedding ↑e\nh3 : 0 < 3\nh23 : 0 < 2 / 3\n⊢ ∃ g, ‖g‖ ≤ ‖f‖ / 3 ∧ dist (compContinuous g e) f ≤ 2 / 3 * ‖f‖\n[PROOFSTEP]\nrcases eq_or_ne f 0 with (rfl | hf)\n[GOAL]\ncase inl\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\ne : C(X, Y)\nhe : ClosedEmbedding ↑e\nh3 : 0 < 3\nh23 : 0 < 2 / 3\n⊢ ∃ g, ‖g‖ ≤ ‖0‖ / 3 ∧ dist (compContinuous g e) 0 ≤ 2 / 3 * ‖0‖\n[PROOFSTEP]\nuse 0\n[GOAL]\ncase h\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\ne : C(X, Y)\nhe : ClosedEmbedding ↑e\nh3 : 0 < 3\nh23 : 0 < 2 / 3\n⊢ ‖0‖ ≤ ‖0‖ / 3 ∧ dist (compContinuous 0 e) 0 ≤ 2 / 3 * ‖0‖\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : X →ᵇ ℝ\ne : C(X, Y)\nhe : ClosedEmbedding ↑e\nh3 : 0 < 3\nh23 : 0 < 2 / 3\nhf : f ≠ 0\n⊢ ∃ g, ‖g‖ ≤ ‖f‖ / 3 ∧ dist (compContinuous g e) f ≤ 2 / 3 * ‖f‖\n[PROOFSTEP]\nreplace hf : 0 < ‖f‖ := norm_pos_iff.2 hf\n[GOAL]\ncase inr\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : X →ᵇ ℝ\ne : C(X, Y)\nhe : ClosedEmbedding ↑e\nh3 : 0 < 3\nh23 : 0 < 2 / 3\nhf : 0 < ‖f‖\n⊢ ∃ g, ‖g‖ ≤ ‖f‖ / 3 ∧ dist (compContinuous g e) f ≤ 2 / 3 * ‖f‖\n[PROOFSTEP]\nhave hf3 : -‖f‖ / 3 < ‖f‖ / 3 := (div_lt_div_right h3).2 (Left.neg_lt_self hf)\n[GOAL]\ncase inr\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : X →ᵇ ℝ\ne : C(X, Y)\nhe : ClosedEmbedding ↑e\nh3 : 0 < 3\nh23 : 0 < 2 / 3\nhf : 0 < ‖f‖\nhf3 : -‖f‖ / 3 < ‖f‖ / 3\n⊢ ∃ g, ‖g‖ ≤ ‖f‖ / 3 ∧ dist (compContinuous g e) f ≤ 2 / 3 * ‖f‖\n[PROOFSTEP]\nhave hc₁ : IsClosed (e '' (f ⁻¹' Iic (-‖f‖ / 3))) := he.isClosedMap _ (isClosed_Iic.preimage f.continuous)\n[GOAL]\ncase inr\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : X →ᵇ ℝ\ne : C(X, Y)\nhe : ClosedEmbedding ↑e\nh3 : 0 < 3\nh23 : 0 < 2 / 3\nhf : 0 < ‖f‖\nhf3 : -‖f‖ / 3 < ‖f‖ / 3\nhc₁ : IsClosed (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3)))\n⊢ ∃ g, ‖g‖ ≤ ‖f‖ / 3 ∧ dist (compContinuous g e) f ≤ 2 / 3 * ‖f‖\n[PROOFSTEP]\nhave hc₂ : IsClosed (e '' (f ⁻¹' Ici (‖f‖ / 3))) := he.isClosedMap _ (isClosed_Ici.preimage f.continuous)\n[GOAL]\ncase inr\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : X →ᵇ ℝ\ne : C(X, Y)\nhe : ClosedEmbedding ↑e\nh3 : 0 < 3\nh23 : 0 < 2 / 3\nhf : 0 < ‖f‖\nhf3 : -‖f‖ / 3 < ‖f‖ / 3\nhc₁ : IsClosed (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3)))\nhc₂ : IsClosed (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))\n⊢ ∃ g, ‖g‖ ≤ ‖f‖ / 3 ∧ dist (compContinuous g e) f ≤ 2 / 3 * ‖f‖\n[PROOFSTEP]\nhave hd : Disjoint (e '' (f ⁻¹' Iic (-‖f‖ / 3))) (e '' (f ⁻¹' Ici (‖f‖ / 3))) :=\n  by\n  refine' disjoint_image_of_injective he.inj (Disjoint.preimage _ _)\n  rwa [Iic_disjoint_Ici, not_le]\n[GOAL]\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : X →ᵇ ℝ\ne : C(X, Y)\nhe : ClosedEmbedding ↑e\nh3 : 0 < 3\nh23 : 0 < 2 / 3\nhf : 0 < ‖f‖\nhf3 : -‖f‖ / 3 < ‖f‖ / 3\nhc₁ : IsClosed (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3)))\nhc₂ : IsClosed (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))\n⊢ Disjoint (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3))) (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))\n[PROOFSTEP]\nrefine' disjoint_image_of_injective he.inj (Disjoint.preimage _ _)\n[GOAL]\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : X →ᵇ ℝ\ne : C(X, Y)\nhe : ClosedEmbedding ↑e\nh3 : 0 < 3\nh23 : 0 < 2 / 3\nhf : 0 < ‖f‖\nhf3 : -‖f‖ / 3 < ‖f‖ / 3\nhc₁ : IsClosed (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3)))\nhc₂ : IsClosed (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))\n⊢ Disjoint (Iic (-‖f‖ / 3)) (Ici (‖f‖ / 3))\n[PROOFSTEP]\nrwa [Iic_disjoint_Ici, not_le]\n[GOAL]\ncase inr\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : X →ᵇ ℝ\ne : C(X, Y)\nhe : ClosedEmbedding ↑e\nh3 : 0 < 3\nh23 : 0 < 2 / 3\nhf : 0 < ‖f‖\nhf3 : -‖f‖ / 3 < ‖f‖ / 3\nhc₁ : IsClosed (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3)))\nhc₂ : IsClosed (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))\nhd : Disjoint (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3))) (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))\n⊢ ∃ g, ‖g‖ ≤ ‖f‖ / 3 ∧ dist (compContinuous g e) f ≤ 2 / 3 * ‖f‖\n[PROOFSTEP]\nrcases exists_bounded_mem_Icc_of_closed_of_le hc₁ hc₂ hd hf3.le with ⟨g, hg₁, hg₂, hgf⟩\n[GOAL]\ncase inr.intro.intro.intro\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : X →ᵇ ℝ\ne : C(X, Y)\nhe : ClosedEmbedding ↑e\nh3 : 0 < 3\nh23 : 0 < 2 / 3\nhf : 0 < ‖f‖\nhf3 : -‖f‖ / 3 < ‖f‖ / 3\nhc₁ : IsClosed (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3)))\nhc₂ : IsClosed (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))\nhd : Disjoint (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3))) (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))\ng : Y →ᵇ ℝ\nhg₁ : EqOn (↑g) (Function.const Y (-‖f‖ / 3)) (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3)))\nhg₂ : EqOn (↑g) (Function.const Y (‖f‖ / 3)) (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))\nhgf : ∀ (x : Y), ↑g x ∈ Icc (-‖f‖ / 3) (‖f‖ / 3)\n⊢ ∃ g, ‖g‖ ≤ ‖f‖ / 3 ∧ dist (compContinuous g e) f ≤ 2 / 3 * ‖f‖\n[PROOFSTEP]\nrefine' ⟨g, _, _⟩\n[GOAL]\ncase inr.intro.intro.intro.refine'_1\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : X →ᵇ ℝ\ne : C(X, Y)\nhe : ClosedEmbedding ↑e\nh3 : 0 < 3\nh23 : 0 < 2 / 3\nhf : 0 < ‖f‖\nhf3 : -‖f‖ / 3 < ‖f‖ / 3\nhc₁ : IsClosed (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3)))\nhc₂ : IsClosed (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))\nhd : Disjoint (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3))) (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))\ng : Y →ᵇ ℝ\nhg₁ : EqOn (↑g) (Function.const Y (-‖f‖ / 3)) (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3)))\nhg₂ : EqOn (↑g) (Function.const Y (‖f‖ / 3)) (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))\nhgf : ∀ (x : Y), ↑g x ∈ Icc (-‖f‖ / 3) (‖f‖ / 3)\n⊢ ‖g‖ ≤ ‖f‖ / 3\n[PROOFSTEP]\nrefine' (norm_le <| div_nonneg hf.le h3.le).mpr fun y => _\n[GOAL]\ncase inr.intro.intro.intro.refine'_1\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : X →ᵇ ℝ\ne : C(X, Y)\nhe : ClosedEmbedding ↑e\nh3 : 0 < 3\nh23 : 0 < 2 / 3\nhf : 0 < ‖f‖\nhf3 : -‖f‖ / 3 < ‖f‖ / 3\nhc₁ : IsClosed (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3)))\nhc₂ : IsClosed (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))\nhd : Disjoint (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3))) (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))\ng : Y →ᵇ ℝ\nhg₁ : EqOn (↑g) (Function.const Y (-‖f‖ / 3)) (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3)))\nhg₂ : EqOn (↑g) (Function.const Y (‖f‖ / 3)) (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))\nhgf : ∀ (x : Y), ↑g x ∈ Icc (-‖f‖ / 3) (‖f‖ / 3)\ny : Y\n⊢ ‖↑g y‖ ≤ ‖f‖ / 3\n[PROOFSTEP]\nsimpa [abs_le, neg_div] using hgf y\n[GOAL]\ncase inr.intro.intro.intro.refine'_2\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : X →ᵇ ℝ\ne : C(X, Y)\nhe : ClosedEmbedding ↑e\nh3 : 0 < 3\nh23 : 0 < 2 / 3\nhf : 0 < ‖f‖\nhf3 : -‖f‖ / 3 < ‖f‖ / 3\nhc₁ : IsClosed (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3)))\nhc₂ : IsClosed (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))\nhd : Disjoint (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3))) (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))\ng : Y →ᵇ ℝ\nhg₁ : EqOn (↑g) (Function.const Y (-‖f‖ / 3)) (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3)))\nhg₂ : EqOn (↑g) (Function.const Y (‖f‖ / 3)) (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))\nhgf : ∀ (x : Y), ↑g x ∈ Icc (-‖f‖ / 3) (‖f‖ / 3)\n⊢ dist (compContinuous g e) f ≤ 2 / 3 * ‖f‖\n[PROOFSTEP]\nrefine' (dist_le <| mul_nonneg h23.le hf.le).mpr fun x => _\n[GOAL]\ncase inr.intro.intro.intro.refine'_2\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : X →ᵇ ℝ\ne : C(X, Y)\nhe : ClosedEmbedding ↑e\nh3 : 0 < 3\nh23 : 0 < 2 / 3\nhf : 0 < ‖f‖\nhf3 : -‖f‖ / 3 < ‖f‖ / 3\nhc₁ : IsClosed (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3)))\nhc₂ : IsClosed (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))\nhd : Disjoint (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3))) (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))\ng : Y →ᵇ ℝ\nhg₁ : EqOn (↑g) (Function.const Y (-‖f‖ / 3)) (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3)))\nhg₂ : EqOn (↑g) (Function.const Y (‖f‖ / 3)) (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))\nhgf : ∀ (x : Y), ↑g x ∈ Icc (-‖f‖ / 3) (‖f‖ / 3)\nx : X\n⊢ dist (↑(compContinuous g e) x) (↑f x) ≤ 2 / 3 * ‖f‖\n[PROOFSTEP]\nhave hfx : -‖f‖ ≤ f x ∧ f x ≤ ‖f‖ := by simpa only [Real.norm_eq_abs, abs_le] using f.norm_coe_le_norm x\n[GOAL]\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : X →ᵇ ℝ\ne : C(X, Y)\nhe : ClosedEmbedding ↑e\nh3 : 0 < 3\nh23 : 0 < 2 / 3\nhf : 0 < ‖f‖\nhf3 : -‖f‖ / 3 < ‖f‖ / 3\nhc₁ : IsClosed (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3)))\nhc₂ : IsClosed (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))\nhd : Disjoint (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3))) (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))\ng : Y →ᵇ ℝ\nhg₁ : EqOn (↑g) (Function.const Y (-‖f‖ / 3)) (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3)))\nhg₂ : EqOn (↑g) (Function.const Y (‖f‖ / 3)) (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))\nhgf : ∀ (x : Y), ↑g x ∈ Icc (-‖f‖ / 3) (‖f‖ / 3)\nx : X\n⊢ -‖f‖ ≤ ↑f x ∧ ↑f x ≤ ‖f‖\n[PROOFSTEP]\nsimpa only [Real.norm_eq_abs, abs_le] using f.norm_coe_le_norm x\n[GOAL]\ncase inr.intro.intro.intro.refine'_2\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : X →ᵇ ℝ\ne : C(X, Y)\nhe : ClosedEmbedding ↑e\nh3 : 0 < 3\nh23 : 0 < 2 / 3\nhf : 0 < ‖f‖\nhf3 : -‖f‖ / 3 < ‖f‖ / 3\nhc₁ : IsClosed (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3)))\nhc₂ : IsClosed (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))\nhd : Disjoint (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3))) (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))\ng : Y →ᵇ ℝ\nhg₁ : EqOn (↑g) (Function.const Y (-‖f‖ / 3)) (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3)))\nhg₂ : EqOn (↑g) (Function.const Y (‖f‖ / 3)) (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))\nhgf : ∀ (x : Y), ↑g x ∈ Icc (-‖f‖ / 3) (‖f‖ / 3)\nx : X\nhfx : -‖f‖ ≤ ↑f x ∧ ↑f x ≤ ‖f‖\n⊢ dist (↑(compContinuous g e) x) (↑f x) ≤ 2 / 3 * ‖f‖\n[PROOFSTEP]\ncases' le_total (f x) (-‖f‖ / 3) with hle₁ hle₁\n[GOAL]\ncase inr.intro.intro.intro.refine'_2.inl\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : X →ᵇ ℝ\ne : C(X, Y)\nhe : ClosedEmbedding ↑e\nh3 : 0 < 3\nh23 : 0 < 2 / 3\nhf : 0 < ‖f‖\nhf3 : -‖f‖ / 3 < ‖f‖ / 3\nhc₁ : IsClosed (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3)))\nhc₂ : IsClosed (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))\nhd : Disjoint (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3))) (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))\ng : Y →ᵇ ℝ\nhg₁ : EqOn (↑g) (Function.const Y (-‖f‖ / 3)) (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3)))\nhg₂ : EqOn (↑g) (Function.const Y (‖f‖ / 3)) (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))\nhgf : ∀ (x : Y), ↑g x ∈ Icc (-‖f‖ / 3) (‖f‖ / 3)\nx : X\nhfx : -‖f‖ ≤ ↑f x ∧ ↑f x ≤ ‖f‖\nhle₁ : ↑f x ≤ -‖f‖ / 3\n⊢ dist (↑(compContinuous g e) x) (↑f x) ≤ 2 / 3 * ‖f‖\n[PROOFSTEP]\ncalc\n  |g (e x) - f x| = -‖f‖ / 3 - f x := by\n    rw [hg₁ (mem_image_of_mem _ hle₁), Function.const_apply, abs_of_nonneg (sub_nonneg.2 hle₁)]\n  _ ≤ 2 / 3 * ‖f‖ := by linarith\n[GOAL]\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : X →ᵇ ℝ\ne : C(X, Y)\nhe : ClosedEmbedding ↑e\nh3 : 0 < 3\nh23 : 0 < 2 / 3\nhf : 0 < ‖f‖\nhf3 : -‖f‖ / 3 < ‖f‖ / 3\nhc₁ : IsClosed (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3)))\nhc₂ : IsClosed (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))\nhd : Disjoint (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3))) (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))\ng : Y →ᵇ ℝ\nhg₁ : EqOn (↑g) (Function.const Y (-‖f‖ / 3)) (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3)))\nhg₂ : EqOn (↑g) (Function.const Y (‖f‖ / 3)) (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))\nhgf : ∀ (x : Y), ↑g x ∈ Icc (-‖f‖ / 3) (‖f‖ / 3)\nx : X\nhfx : -‖f‖ ≤ ↑f x ∧ ↑f x ≤ ‖f‖\nhle₁ : ↑f x ≤ -‖f‖ / 3\n⊢ |↑g (↑e x) - ↑f x| = -‖f‖ / 3 - ↑f x\n[PROOFSTEP]\nrw [hg₁ (mem_image_of_mem _ hle₁), Function.const_apply, abs_of_nonneg (sub_nonneg.2 hle₁)]\n[GOAL]\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : X →ᵇ ℝ\ne : C(X, Y)\nhe : ClosedEmbedding ↑e\nh3 : 0 < 3\nh23 : 0 < 2 / 3\nhf : 0 < ‖f‖\nhf3 : -‖f‖ / 3 < ‖f‖ / 3\nhc₁ : IsClosed (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3)))\nhc₂ : IsClosed (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))\nhd : Disjoint (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3))) (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))\ng : Y →ᵇ ℝ\nhg₁ : EqOn (↑g) (Function.const Y (-‖f‖ / 3)) (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3)))\nhg₂ : EqOn (↑g) (Function.const Y (‖f‖ / 3)) (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))\nhgf : ∀ (x : Y), ↑g x ∈ Icc (-‖f‖ / 3) (‖f‖ / 3)\nx : X\nhfx : -‖f‖ ≤ ↑f x ∧ ↑f x ≤ ‖f‖\nhle₁ : ↑f x ≤ -‖f‖ / 3\n⊢ -‖f‖ / 3 - ↑f x ≤ 2 / 3 * ‖f‖\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase inr.intro.intro.intro.refine'_2.inr\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : X →ᵇ ℝ\ne : C(X, Y)\nhe : ClosedEmbedding ↑e\nh3 : 0 < 3\nh23 : 0 < 2 / 3\nhf : 0 < ‖f‖\nhf3 : -‖f‖ / 3 < ‖f‖ / 3\nhc₁ : IsClosed (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3)))\nhc₂ : IsClosed (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))\nhd : Disjoint (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3))) (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))\ng : Y →ᵇ ℝ\nhg₁ : EqOn (↑g) (Function.const Y (-‖f‖ / 3)) (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3)))\nhg₂ : EqOn (↑g) (Function.const Y (‖f‖ / 3)) (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))\nhgf : ∀ (x : Y), ↑g x ∈ Icc (-‖f‖ / 3) (‖f‖ / 3)\nx : X\nhfx : -‖f‖ ≤ ↑f x ∧ ↑f x ≤ ‖f‖\nhle₁ : -‖f‖ / 3 ≤ ↑f x\n⊢ dist (↑(compContinuous g e) x) (↑f x) ≤ 2 / 3 * ‖f‖\n[PROOFSTEP]\ncases' le_total (f x) (‖f‖ / 3) with hle₂ hle₂\n[GOAL]\ncase inr.intro.intro.intro.refine'_2.inr.inl\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : X →ᵇ ℝ\ne : C(X, Y)\nhe : ClosedEmbedding ↑e\nh3 : 0 < 3\nh23 : 0 < 2 / 3\nhf : 0 < ‖f‖\nhf3 : -‖f‖ / 3 < ‖f‖ / 3\nhc₁ : IsClosed (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3)))\nhc₂ : IsClosed (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))\nhd : Disjoint (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3))) (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))\ng : Y →ᵇ ℝ\nhg₁ : EqOn (↑g) (Function.const Y (-‖f‖ / 3)) (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3)))\nhg₂ : EqOn (↑g) (Function.const Y (‖f‖ / 3)) (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))\nhgf : ∀ (x : Y), ↑g x ∈ Icc (-‖f‖ / 3) (‖f‖ / 3)\nx : X\nhfx : -‖f‖ ≤ ↑f x ∧ ↑f x ≤ ‖f‖\nhle₁ : -‖f‖ / 3 ≤ ↑f x\nhle₂ : ↑f x ≤ ‖f‖ / 3\n⊢ dist (↑(compContinuous g e) x) (↑f x) ≤ 2 / 3 * ‖f‖\n[PROOFSTEP]\nsimp only [neg_div] at *\n[GOAL]\ncase inr.intro.intro.intro.refine'_2.inr.inl\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : X →ᵇ ℝ\ne : C(X, Y)\nhe : ClosedEmbedding ↑e\nh3 : 0 < 3\nh23 : 0 < 2 / 3\nhf : 0 < ‖f‖\ng : Y →ᵇ ℝ\nx : X\nhfx : -‖f‖ ≤ ↑f x ∧ ↑f x ≤ ‖f‖\nhle₂ : ↑f x ≤ ‖f‖ / 3\nhf3 : -(‖f‖ / 3) < ‖f‖ / 3\nhc₁ : IsClosed ((fun a => ↑e a) '' (↑f ⁻¹' Iic (-(‖f‖ / 3))))\nhc₂ : IsClosed ((fun a => ↑e a) '' (↑f ⁻¹' Ici (‖f‖ / 3)))\nhd : Disjoint ((fun a => ↑e a) '' (↑f ⁻¹' Iic (-(‖f‖ / 3)))) ((fun a => ↑e a) '' (↑f ⁻¹' Ici (‖f‖ / 3)))\nhg₁ : EqOn (↑g) (Function.const Y (-(‖f‖ / 3))) ((fun a => ↑e a) '' (↑f ⁻¹' Iic (-(‖f‖ / 3))))\nhg₂ : EqOn (↑g) (Function.const Y (‖f‖ / 3)) ((fun a => ↑e a) '' (↑f ⁻¹' Ici (‖f‖ / 3)))\nhgf : ∀ (x : Y), ↑g x ∈ Icc (-(‖f‖ / 3)) (‖f‖ / 3)\nhle₁ : -(‖f‖ / 3) ≤ ↑f x\n⊢ dist (↑(compContinuous g e) x) (↑f x) ≤ 2 / 3 * ‖f‖\n[PROOFSTEP]\ncalc\n  dist (g (e x)) (f x) ≤ |g (e x)| + |f x| := dist_le_norm_add_norm _ _\n  _ ≤ ‖f‖ / 3 + ‖f‖ / 3 := (add_le_add (abs_le.2 <| hgf _) (abs_le.2 ⟨hle₁, hle₂⟩))\n  _ = 2 / 3 * ‖f‖ := by linarith\n[GOAL]\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : X →ᵇ ℝ\ne : C(X, Y)\nhe : ClosedEmbedding ↑e\nh3 : 0 < 3\nh23 : 0 < 2 / 3\nhf : 0 < ‖f‖\ng : Y →ᵇ ℝ\nx : X\nhfx : -‖f‖ ≤ ↑f x ∧ ↑f x ≤ ‖f‖\nhle₂ : ↑f x ≤ ‖f‖ / 3\nhf3 : -(‖f‖ / 3) < ‖f‖ / 3\nhc₁ : IsClosed ((fun a => ↑e a) '' (↑f ⁻¹' Iic (-(‖f‖ / 3))))\nhc₂ : IsClosed ((fun a => ↑e a) '' (↑f ⁻¹' Ici (‖f‖ / 3)))\nhd : Disjoint ((fun a => ↑e a) '' (↑f ⁻¹' Iic (-(‖f‖ / 3)))) ((fun a => ↑e a) '' (↑f ⁻¹' Ici (‖f‖ / 3)))\nhg₁ : EqOn (↑g) (Function.const Y (-(‖f‖ / 3))) ((fun a => ↑e a) '' (↑f ⁻¹' Iic (-(‖f‖ / 3))))\nhg₂ : EqOn (↑g) (Function.const Y (‖f‖ / 3)) ((fun a => ↑e a) '' (↑f ⁻¹' Ici (‖f‖ / 3)))\nhgf : ∀ (x : Y), ↑g x ∈ Icc (-(‖f‖ / 3)) (‖f‖ / 3)\nhle₁ : -(‖f‖ / 3) ≤ ↑f x\n⊢ ‖f‖ / 3 + ‖f‖ / 3 = 2 / 3 * ‖f‖\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase inr.intro.intro.intro.refine'_2.inr.inr\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : X →ᵇ ℝ\ne : C(X, Y)\nhe : ClosedEmbedding ↑e\nh3 : 0 < 3\nh23 : 0 < 2 / 3\nhf : 0 < ‖f‖\nhf3 : -‖f‖ / 3 < ‖f‖ / 3\nhc₁ : IsClosed (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3)))\nhc₂ : IsClosed (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))\nhd : Disjoint (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3))) (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))\ng : Y →ᵇ ℝ\nhg₁ : EqOn (↑g) (Function.const Y (-‖f‖ / 3)) (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3)))\nhg₂ : EqOn (↑g) (Function.const Y (‖f‖ / 3)) (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))\nhgf : ∀ (x : Y), ↑g x ∈ Icc (-‖f‖ / 3) (‖f‖ / 3)\nx : X\nhfx : -‖f‖ ≤ ↑f x ∧ ↑f x ≤ ‖f‖\nhle₁ : -‖f‖ / 3 ≤ ↑f x\nhle₂ : ‖f‖ / 3 ≤ ↑f x\n⊢ dist (↑(compContinuous g e) x) (↑f x) ≤ 2 / 3 * ‖f‖\n[PROOFSTEP]\ncalc\n  |g (e x) - f x| = f x - ‖f‖ / 3 := by\n    rw [hg₂ (mem_image_of_mem _ hle₂), abs_sub_comm, Function.const_apply, abs_of_nonneg (sub_nonneg.2 hle₂)]\n  _ ≤ 2 / 3 * ‖f‖ := by linarith\n[GOAL]\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : X →ᵇ ℝ\ne : C(X, Y)\nhe : ClosedEmbedding ↑e\nh3 : 0 < 3\nh23 : 0 < 2 / 3\nhf : 0 < ‖f‖\nhf3 : -‖f‖ / 3 < ‖f‖ / 3\nhc₁ : IsClosed (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3)))\nhc₂ : IsClosed (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))\nhd : Disjoint (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3))) (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))\ng : Y →ᵇ ℝ\nhg₁ : EqOn (↑g) (Function.const Y (-‖f‖ / 3)) (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3)))\nhg₂ : EqOn (↑g) (Function.const Y (‖f‖ / 3)) (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))\nhgf : ∀ (x : Y), ↑g x ∈ Icc (-‖f‖ / 3) (‖f‖ / 3)\nx : X\nhfx : -‖f‖ ≤ ↑f x ∧ ↑f x ≤ ‖f‖\nhle₁ : -‖f‖ / 3 ≤ ↑f x\nhle₂ : ‖f‖ / 3 ≤ ↑f x\n⊢ |↑g (↑e x) - ↑f x| = ↑f x - ‖f‖ / 3\n[PROOFSTEP]\nrw [hg₂ (mem_image_of_mem _ hle₂), abs_sub_comm, Function.const_apply, abs_of_nonneg (sub_nonneg.2 hle₂)]\n[GOAL]\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : X →ᵇ ℝ\ne : C(X, Y)\nhe : ClosedEmbedding ↑e\nh3 : 0 < 3\nh23 : 0 < 2 / 3\nhf : 0 < ‖f‖\nhf3 : -‖f‖ / 3 < ‖f‖ / 3\nhc₁ : IsClosed (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3)))\nhc₂ : IsClosed (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))\nhd : Disjoint (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3))) (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))\ng : Y →ᵇ ℝ\nhg₁ : EqOn (↑g) (Function.const Y (-‖f‖ / 3)) (↑e '' (↑f ⁻¹' Iic (-‖f‖ / 3)))\nhg₂ : EqOn (↑g) (Function.const Y (‖f‖ / 3)) (↑e '' (↑f ⁻¹' Ici (‖f‖ / 3)))\nhgf : ∀ (x : Y), ↑g x ∈ Icc (-‖f‖ / 3) (‖f‖ / 3)\nx : X\nhfx : -‖f‖ ≤ ↑f x ∧ ↑f x ≤ ‖f‖\nhle₁ : -‖f‖ / 3 ≤ ↑f x\nhle₂ : ‖f‖ / 3 ≤ ↑f x\n⊢ ↑f x - ‖f‖ / 3 ≤ 2 / 3 * ‖f‖\n[PROOFSTEP]\nlinarith\n[GOAL]\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : X →ᵇ ℝ\ne : C(X, Y)\nhe : ClosedEmbedding ↑e\n⊢ ∃ g, ‖g‖ = ‖f‖ ∧ compContinuous g e = f\n[PROOFSTEP]\nchoose F hF_norm hF_dist using fun f : X →ᵇ ℝ => tietze_extension_step f e he\n[GOAL]\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : X →ᵇ ℝ\ne : C(X, Y)\nhe : ClosedEmbedding ↑e\nF : (X →ᵇ ℝ) → Y →ᵇ ℝ\nhF_norm : ∀ (f : X →ᵇ ℝ), ‖F f‖ ≤ ‖f‖ / 3\nhF_dist : ∀ (f : X →ᵇ ℝ), dist (compContinuous (F f) e) f ≤ 2 / 3 * ‖f‖\n⊢ ∃ g, ‖g‖ = ‖f‖ ∧ compContinuous g e = f\n[PROOFSTEP]\nset g : ℕ → Y →ᵇ ℝ := fun n => (fun g => g + F (f - g.compContinuous e))^[n] 0\n[GOAL]\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : X →ᵇ ℝ\ne : C(X, Y)\nhe : ClosedEmbedding ↑e\nF : (X →ᵇ ℝ) → Y →ᵇ ℝ\nhF_norm : ∀ (f : X →ᵇ ℝ), ‖F f‖ ≤ ‖f‖ / 3\nhF_dist : ∀ (f : X →ᵇ ℝ), dist (compContinuous (F f) e) f ≤ 2 / 3 * ‖f‖\ng : ℕ → Y →ᵇ ℝ := fun n => (fun g => g + F (f - compContinuous g e))^[n] 0\n⊢ ∃ g, ‖g‖ = ‖f‖ ∧ compContinuous g e = f\n[PROOFSTEP]\nhave g0 : g 0 = 0 := rfl\n[GOAL]\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : X →ᵇ ℝ\ne : C(X, Y)\nhe : ClosedEmbedding ↑e\nF : (X →ᵇ ℝ) → Y →ᵇ ℝ\nhF_norm : ∀ (f : X →ᵇ ℝ), ‖F f‖ ≤ ‖f‖ / 3\nhF_dist : ∀ (f : X →ᵇ ℝ), dist (compContinuous (F f) e) f ≤ 2 / 3 * ‖f‖\ng : ℕ → Y →ᵇ ℝ := fun n => (fun g => g + F (f - compContinuous g e))^[n] 0\ng0 : g 0 = 0\n⊢ ∃ g, ‖g‖ = ‖f‖ ∧ compContinuous g e = f\n[PROOFSTEP]\nhave g_succ : ∀ n, g (n + 1) = g n + F (f - (g n).compContinuous e) := fun n => Function.iterate_succ_apply' _ _ _\n[GOAL]\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : X →ᵇ ℝ\ne : C(X, Y)\nhe : ClosedEmbedding ↑e\nF : (X →ᵇ ℝ) → Y →ᵇ ℝ\nhF_norm : ∀ (f : X →ᵇ ℝ), ‖F f‖ ≤ ‖f‖ / 3\nhF_dist : ∀ (f : X →ᵇ ℝ), dist (compContinuous (F f) e) f ≤ 2 / 3 * ‖f‖\ng : ℕ → Y →ᵇ ℝ := fun n => (fun g => g + F (f - compContinuous g e))^[n] 0\ng0 : g 0 = 0\ng_succ : ∀ (n : ℕ), g (n + 1) = g n + F (f - compContinuous (g n) e)\n⊢ ∃ g, ‖g‖ = ‖f‖ ∧ compContinuous g e = f\n[PROOFSTEP]\nhave hgf : ∀ n, dist ((g n).compContinuous e) f ≤ (2 / 3) ^ n * ‖f‖ :=\n  by\n  intro n\n  induction' n with n ihn\n  · simp [g0]\n  · rw [g_succ n, add_compContinuous, ← dist_sub_right, add_sub_cancel', pow_succ, mul_assoc]\n    refine' (hF_dist _).trans (mul_le_mul_of_nonneg_left _ (by norm_num1))\n    rwa [← dist_eq_norm']\n[GOAL]\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : X →ᵇ ℝ\ne : C(X, Y)\nhe : ClosedEmbedding ↑e\nF : (X →ᵇ ℝ) → Y →ᵇ ℝ\nhF_norm : ∀ (f : X →ᵇ ℝ), ‖F f‖ ≤ ‖f‖ / 3\nhF_dist : ∀ (f : X →ᵇ ℝ), dist (compContinuous (F f) e) f ≤ 2 / 3 * ‖f‖\ng : ℕ → Y →ᵇ ℝ := fun n => (fun g => g + F (f - compContinuous g e))^[n] 0\ng0 : g 0 = 0\ng_succ : ∀ (n : ℕ), g (n + 1) = g n + F (f - compContinuous (g n) e)\n⊢ ∀ (n : ℕ), dist (compContinuous (g n) e) f ≤ (2 / 3) ^ n * ‖f‖\n[PROOFSTEP]\nintro n\n[GOAL]\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : X →ᵇ ℝ\ne : C(X, Y)\nhe : ClosedEmbedding ↑e\nF : (X →ᵇ ℝ) → Y →ᵇ ℝ\nhF_norm : ∀ (f : X →ᵇ ℝ), ‖F f‖ ≤ ‖f‖ / 3\nhF_dist : ∀ (f : X →ᵇ ℝ), dist (compContinuous (F f) e) f ≤ 2 / 3 * ‖f‖\ng : ℕ → Y →ᵇ ℝ := fun n => (fun g => g + F (f - compContinuous g e))^[n] 0\ng0 : g 0 = 0\ng_succ : ∀ (n : ℕ), g (n + 1) = g n + F (f - compContinuous (g n) e)\nn : ℕ\n⊢ dist (compContinuous (g n) e) f ≤ (2 / 3) ^ n * ‖f‖\n[PROOFSTEP]\ninduction' n with n ihn\n[GOAL]\ncase zero\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : X →ᵇ ℝ\ne : C(X, Y)\nhe : ClosedEmbedding ↑e\nF : (X →ᵇ ℝ) → Y →ᵇ ℝ\nhF_norm : ∀ (f : X →ᵇ ℝ), ‖F f‖ ≤ ‖f‖ / 3\nhF_dist : ∀ (f : X →ᵇ ℝ), dist (compContinuous (F f) e) f ≤ 2 / 3 * ‖f‖\ng : ℕ → Y →ᵇ ℝ := fun n => (fun g => g + F (f - compContinuous g e))^[n] 0\ng0 : g 0 = 0\ng_succ : ∀ (n : ℕ), g (n + 1) = g n + F (f - compContinuous (g n) e)\n⊢ dist (compContinuous (g Nat.zero) e) f ≤ (2 / 3) ^ Nat.zero * ‖f‖\n[PROOFSTEP]\nsimp [g0]\n[GOAL]\ncase succ\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : X →ᵇ ℝ\ne : C(X, Y)\nhe : ClosedEmbedding ↑e\nF : (X →ᵇ ℝ) → Y →ᵇ ℝ\nhF_norm : ∀ (f : X →ᵇ ℝ), ‖F f‖ ≤ ‖f‖ / 3\nhF_dist : ∀ (f : X →ᵇ ℝ), dist (compContinuous (F f) e) f ≤ 2 / 3 * ‖f‖\ng : ℕ → Y →ᵇ ℝ := fun n => (fun g => g + F (f - compContinuous g e))^[n] 0\ng0 : g 0 = 0\ng_succ : ∀ (n : ℕ), g (n + 1) = g n + F (f - compContinuous (g n) e)\nn : ℕ\nihn : dist (compContinuous (g n) e) f ≤ (2 / 3) ^ n * ‖f‖\n⊢ dist (compContinuous (g (Nat.succ n)) e) f ≤ (2 / 3) ^ Nat.succ n * ‖f‖\n[PROOFSTEP]\nrw [g_succ n, add_compContinuous, ← dist_sub_right, add_sub_cancel', pow_succ, mul_assoc]\n[GOAL]\ncase succ\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : X →ᵇ ℝ\ne : C(X, Y)\nhe : ClosedEmbedding ↑e\nF : (X →ᵇ ℝ) → Y →ᵇ ℝ\nhF_norm : ∀ (f : X →ᵇ ℝ), ‖F f‖ ≤ ‖f‖ / 3\nhF_dist : ∀ (f : X →ᵇ ℝ), dist (compContinuous (F f) e) f ≤ 2 / 3 * ‖f‖\ng : ℕ → Y →ᵇ ℝ := fun n => (fun g => g + F (f - compContinuous g e))^[n] 0\ng0 : g 0 = 0\ng_succ : ∀ (n : ℕ), g (n + 1) = g n + F (f - compContinuous (g n) e)\nn : ℕ\nihn : dist (compContinuous (g n) e) f ≤ (2 / 3) ^ n * ‖f‖\n⊢ dist (compContinuous (F (f - compContinuous (g n) e)) e) (f - compContinuous (g n) e) ≤ 2 / 3 * ((2 / 3) ^ n * ‖f‖)\n[PROOFSTEP]\nrefine' (hF_dist _).trans (mul_le_mul_of_nonneg_left _ (by norm_num1))\n[GOAL]\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : X →ᵇ ℝ\ne : C(X, Y)\nhe : ClosedEmbedding ↑e\nF : (X →ᵇ ℝ) → Y →ᵇ ℝ\nhF_norm : ∀ (f : X →ᵇ ℝ), ‖F f‖ ≤ ‖f‖ / 3\nhF_dist : ∀ (f : X →ᵇ ℝ), dist (compContinuous (F f) e) f ≤ 2 / 3 * ‖f‖\ng : ℕ → Y →ᵇ ℝ := fun n => (fun g => g + F (f - compContinuous g e))^[n] 0\ng0 : g 0 = 0\ng_succ : ∀ (n : ℕ), g (n + 1) = g n + F (f - compContinuous (g n) e)\nn : ℕ\nihn : dist (compContinuous (g n) e) f ≤ (2 / 3) ^ n * ‖f‖\n⊢ 0 ≤ 2 / 3\n[PROOFSTEP]\nnorm_num1\n[GOAL]\ncase succ\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : X →ᵇ ℝ\ne : C(X, Y)\nhe : ClosedEmbedding ↑e\nF : (X →ᵇ ℝ) → Y →ᵇ ℝ\nhF_norm : ∀ (f : X →ᵇ ℝ), ‖F f‖ ≤ ‖f‖ / 3\nhF_dist : ∀ (f : X →ᵇ ℝ), dist (compContinuous (F f) e) f ≤ 2 / 3 * ‖f‖\ng : ℕ → Y →ᵇ ℝ := fun n => (fun g => g + F (f - compContinuous g e))^[n] 0\ng0 : g 0 = 0\ng_succ : ∀ (n : ℕ), g (n + 1) = g n + F (f - compContinuous (g n) e)\nn : ℕ\nihn : dist (compContinuous (g n) e) f ≤ (2 / 3) ^ n * ‖f‖\n⊢ ‖f - compContinuous (g n) e‖ ≤ (2 / 3) ^ n * ‖f‖\n[PROOFSTEP]\nrwa [← dist_eq_norm']\n[GOAL]\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : X →ᵇ ℝ\ne : C(X, Y)\nhe : ClosedEmbedding ↑e\nF : (X →ᵇ ℝ) → Y →ᵇ ℝ\nhF_norm : ∀ (f : X →ᵇ ℝ), ‖F f‖ ≤ ‖f‖ / 3\nhF_dist : ∀ (f : X →ᵇ ℝ), dist (compContinuous (F f) e) f ≤ 2 / 3 * ‖f‖\ng : ℕ → Y →ᵇ ℝ := fun n => (fun g => g + F (f - compContinuous g e))^[n] 0\ng0 : g 0 = 0\ng_succ : ∀ (n : ℕ), g (n + 1) = g n + F (f - compContinuous (g n) e)\nhgf : ∀ (n : ℕ), dist (compContinuous (g n) e) f ≤ (2 / 3) ^ n * ‖f‖\n⊢ ∃ g, ‖g‖ = ‖f‖ ∧ compContinuous g e = f\n[PROOFSTEP]\nhave hg_dist : ∀ n, dist (g n) (g (n + 1)) ≤ 1 / 3 * ‖f‖ * (2 / 3) ^ n :=\n  by\n  intro n\n  calc\n    dist (g n) (g (n + 1)) = ‖F (f - (g n).compContinuous e)‖ := by rw [g_succ, dist_eq_norm', add_sub_cancel']\n    _ ≤ ‖f - (g n).compContinuous e‖ / 3 := (hF_norm _)\n    _ = 1 / 3 * dist ((g n).compContinuous e) f := by rw [dist_eq_norm', one_div, div_eq_inv_mul]\n    _ ≤ 1 / 3 * ((2 / 3) ^ n * ‖f‖) := (mul_le_mul_of_nonneg_left (hgf n) (by norm_num1))\n    _ = 1 / 3 * ‖f‖ * (2 / 3) ^ n := by ac_rfl\n[GOAL]\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : X →ᵇ ℝ\ne : C(X, Y)\nhe : ClosedEmbedding ↑e\nF : (X →ᵇ ℝ) → Y →ᵇ ℝ\nhF_norm : ∀ (f : X →ᵇ ℝ), ‖F f‖ ≤ ‖f‖ / 3\nhF_dist : ∀ (f : X →ᵇ ℝ), dist (compContinuous (F f) e) f ≤ 2 / 3 * ‖f‖\ng : ℕ → Y →ᵇ ℝ := fun n => (fun g => g + F (f - compContinuous g e))^[n] 0\ng0 : g 0 = 0\ng_succ : ∀ (n : ℕ), g (n + 1) = g n + F (f - compContinuous (g n) e)\nhgf : ∀ (n : ℕ), dist (compContinuous (g n) e) f ≤ (2 / 3) ^ n * ‖f‖\n⊢ ∀ (n : ℕ), dist (g n) (g (n + 1)) ≤ 1 / 3 * ‖f‖ * (2 / 3) ^ n\n[PROOFSTEP]\nintro n\n[GOAL]\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : X →ᵇ ℝ\ne : C(X, Y)\nhe : ClosedEmbedding ↑e\nF : (X →ᵇ ℝ) → Y →ᵇ ℝ\nhF_norm : ∀ (f : X →ᵇ ℝ), ‖F f‖ ≤ ‖f‖ / 3\nhF_dist : ∀ (f : X →ᵇ ℝ), dist (compContinuous (F f) e) f ≤ 2 / 3 * ‖f‖\ng : ℕ → Y →ᵇ ℝ := fun n => (fun g => g + F (f - compContinuous g e))^[n] 0\ng0 : g 0 = 0\ng_succ : ∀ (n : ℕ), g (n + 1) = g n + F (f - compContinuous (g n) e)\nhgf : ∀ (n : ℕ), dist (compContinuous (g n) e) f ≤ (2 / 3) ^ n * ‖f‖\nn : ℕ\n⊢ dist (g n) (g (n + 1)) ≤ 1 / 3 * ‖f‖ * (2 / 3) ^ n\n[PROOFSTEP]\ncalc\n  dist (g n) (g (n + 1)) = ‖F (f - (g n).compContinuous e)‖ := by rw [g_succ, dist_eq_norm', add_sub_cancel']\n  _ ≤ ‖f - (g n).compContinuous e‖ / 3 := (hF_norm _)\n  _ = 1 / 3 * dist ((g n).compContinuous e) f := by rw [dist_eq_norm', one_div, div_eq_inv_mul]\n  _ ≤ 1 / 3 * ((2 / 3) ^ n * ‖f‖) := (mul_le_mul_of_nonneg_left (hgf n) (by norm_num1))\n  _ = 1 / 3 * ‖f‖ * (2 / 3) ^ n := by ac_rfl\n[GOAL]\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : X →ᵇ ℝ\ne : C(X, Y)\nhe : ClosedEmbedding ↑e\nF : (X →ᵇ ℝ) → Y →ᵇ ℝ\nhF_norm : ∀ (f : X →ᵇ ℝ), ‖F f‖ ≤ ‖f‖ / 3\nhF_dist : ∀ (f : X →ᵇ ℝ), dist (compContinuous (F f) e) f ≤ 2 / 3 * ‖f‖\ng : ℕ → Y →ᵇ ℝ := fun n => (fun g => g + F (f - compContinuous g e))^[n] 0\ng0 : g 0 = 0\ng_succ : ∀ (n : ℕ), g (n + 1) = g n + F (f - compContinuous (g n) e)\nhgf : ∀ (n : ℕ), dist (compContinuous (g n) e) f ≤ (2 / 3) ^ n * ‖f‖\nn : ℕ\n⊢ dist (g n) (g (n + 1)) = ‖F (f - compContinuous (g n) e)‖\n[PROOFSTEP]\nrw [g_succ, dist_eq_norm', add_sub_cancel']\n[GOAL]\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : X →ᵇ ℝ\ne : C(X, Y)\nhe : ClosedEmbedding ↑e\nF : (X →ᵇ ℝ) → Y →ᵇ ℝ\nhF_norm : ∀ (f : X →ᵇ ℝ), ‖F f‖ ≤ ‖f‖ / 3\nhF_dist : ∀ (f : X →ᵇ ℝ), dist (compContinuous (F f) e) f ≤ 2 / 3 * ‖f‖\ng : ℕ → Y →ᵇ ℝ := fun n => (fun g => g + F (f - compContinuous g e))^[n] 0\ng0 : g 0 = 0\ng_succ : ∀ (n : ℕ), g (n + 1) = g n + F (f - compContinuous (g n) e)\nhgf : ∀ (n : ℕ), dist (compContinuous (g n) e) f ≤ (2 / 3) ^ n * ‖f‖\nn : ℕ\n⊢ ‖f - compContinuous (g n) e‖ / 3 = 1 / 3 * dist (compContinuous (g n) e) f\n[PROOFSTEP]\nrw [dist_eq_norm', one_div, div_eq_inv_mul]\n[GOAL]\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : X →ᵇ ℝ\ne : C(X, Y)\nhe : ClosedEmbedding ↑e\nF : (X →ᵇ ℝ) → Y →ᵇ ℝ\nhF_norm : ∀ (f : X →ᵇ ℝ), ‖F f‖ ≤ ‖f‖ / 3\nhF_dist : ∀ (f : X →ᵇ ℝ), dist (compContinuous (F f) e) f ≤ 2 / 3 * ‖f‖\ng : ℕ → Y →ᵇ ℝ := fun n => (fun g => g + F (f - compContinuous g e))^[n] 0\ng0 : g 0 = 0\ng_succ : ∀ (n : ℕ), g (n + 1) = g n + F (f - compContinuous (g n) e)\nhgf : ∀ (n : ℕ), dist (compContinuous (g n) e) f ≤ (2 / 3) ^ n * ‖f‖\nn : ℕ\n⊢ 0 ≤ 1 / 3\n[PROOFSTEP]\nnorm_num1\n[GOAL]\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : X →ᵇ ℝ\ne : C(X, Y)\nhe : ClosedEmbedding ↑e\nF : (X →ᵇ ℝ) → Y →ᵇ ℝ\nhF_norm : ∀ (f : X →ᵇ ℝ), ‖F f‖ ≤ ‖f‖ / 3\nhF_dist : ∀ (f : X →ᵇ ℝ), dist (compContinuous (F f) e) f ≤ 2 / 3 * ‖f‖\ng : ℕ → Y →ᵇ ℝ := fun n => (fun g => g + F (f - compContinuous g e))^[n] 0\ng0 : g 0 = 0\ng_succ : ∀ (n : ℕ), g (n + 1) = g n + F (f - compContinuous (g n) e)\nhgf : ∀ (n : ℕ), dist (compContinuous (g n) e) f ≤ (2 / 3) ^ n * ‖f‖\nn : ℕ\n⊢ 1 / 3 * ((2 / 3) ^ n * ‖f‖) = 1 / 3 * ‖f‖ * (2 / 3) ^ n\n[PROOFSTEP]\nac_rfl\n[GOAL]\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : X →ᵇ ℝ\ne : C(X, Y)\nhe : ClosedEmbedding ↑e\nF : (X →ᵇ ℝ) → Y →ᵇ ℝ\nhF_norm : ∀ (f : X →ᵇ ℝ), ‖F f‖ ≤ ‖f‖ / 3\nhF_dist : ∀ (f : X →ᵇ ℝ), dist (compContinuous (F f) e) f ≤ 2 / 3 * ‖f‖\ng : ℕ → Y →ᵇ ℝ := fun n => (fun g => g + F (f - compContinuous g e))^[n] 0\ng0 : g 0 = 0\ng_succ : ∀ (n : ℕ), g (n + 1) = g n + F (f - compContinuous (g n) e)\nhgf : ∀ (n : ℕ), dist (compContinuous (g n) e) f ≤ (2 / 3) ^ n * ‖f‖\nhg_dist : ∀ (n : ℕ), dist (g n) (g (n + 1)) ≤ 1 / 3 * ‖f‖ * (2 / 3) ^ n\n⊢ ∃ g, ‖g‖ = ‖f‖ ∧ compContinuous g e = f\n[PROOFSTEP]\nhave hg_cau : CauchySeq g := cauchySeq_of_le_geometric _ _ (by norm_num1) hg_dist\n[GOAL]\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : X →ᵇ ℝ\ne : C(X, Y)\nhe : ClosedEmbedding ↑e\nF : (X →ᵇ ℝ) → Y →ᵇ ℝ\nhF_norm : ∀ (f : X →ᵇ ℝ), ‖F f‖ ≤ ‖f‖ / 3\nhF_dist : ∀ (f : X →ᵇ ℝ), dist (compContinuous (F f) e) f ≤ 2 / 3 * ‖f‖\ng : ℕ → Y →ᵇ ℝ := fun n => (fun g => g + F (f - compContinuous g e))^[n] 0\ng0 : g 0 = 0\ng_succ : ∀ (n : ℕ), g (n + 1) = g n + F (f - compContinuous (g n) e)\nhgf : ∀ (n : ℕ), dist (compContinuous (g n) e) f ≤ (2 / 3) ^ n * ‖f‖\nhg_dist : ∀ (n : ℕ), dist (g n) (g (n + 1)) ≤ 1 / 3 * ‖f‖ * (2 / 3) ^ n\n⊢ 2 / 3 < 1\n[PROOFSTEP]\nnorm_num1\n[GOAL]\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : X →ᵇ ℝ\ne : C(X, Y)\nhe : ClosedEmbedding ↑e\nF : (X →ᵇ ℝ) → Y →ᵇ ℝ\nhF_norm : ∀ (f : X →ᵇ ℝ), ‖F f‖ ≤ ‖f‖ / 3\nhF_dist : ∀ (f : X →ᵇ ℝ), dist (compContinuous (F f) e) f ≤ 2 / 3 * ‖f‖\ng : ℕ → Y →ᵇ ℝ := fun n => (fun g => g + F (f - compContinuous g e))^[n] 0\ng0 : g 0 = 0\ng_succ : ∀ (n : ℕ), g (n + 1) = g n + F (f - compContinuous (g n) e)\nhgf : ∀ (n : ℕ), dist (compContinuous (g n) e) f ≤ (2 / 3) ^ n * ‖f‖\nhg_dist : ∀ (n : ℕ), dist (g n) (g (n + 1)) ≤ 1 / 3 * ‖f‖ * (2 / 3) ^ n\nhg_cau : CauchySeq g\n⊢ ∃ g, ‖g‖ = ‖f‖ ∧ compContinuous g e = f\n[PROOFSTEP]\nhave : Tendsto (fun n => (g n).compContinuous e) atTop (𝓝 <| (limUnder atTop g).compContinuous e) :=\n  ((continuous_compContinuous e).tendsto _).comp hg_cau.tendsto_limUnder\n[GOAL]\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : X →ᵇ ℝ\ne : C(X, Y)\nhe : ClosedEmbedding ↑e\nF : (X →ᵇ ℝ) → Y →ᵇ ℝ\nhF_norm : ∀ (f : X →ᵇ ℝ), ‖F f‖ ≤ ‖f‖ / 3\nhF_dist : ∀ (f : X →ᵇ ℝ), dist (compContinuous (F f) e) f ≤ 2 / 3 * ‖f‖\ng : ℕ → Y →ᵇ ℝ := fun n => (fun g => g + F (f - compContinuous g e))^[n] 0\ng0 : g 0 = 0\ng_succ : ∀ (n : ℕ), g (n + 1) = g n + F (f - compContinuous (g n) e)\nhgf : ∀ (n : ℕ), dist (compContinuous (g n) e) f ≤ (2 / 3) ^ n * ‖f‖\nhg_dist : ∀ (n : ℕ), dist (g n) (g (n + 1)) ≤ 1 / 3 * ‖f‖ * (2 / 3) ^ n\nhg_cau : CauchySeq g\nthis : Tendsto (fun n => compContinuous (g n) e) atTop (𝓝 (compContinuous (limUnder atTop g) e))\n⊢ ∃ g, ‖g‖ = ‖f‖ ∧ compContinuous g e = f\n[PROOFSTEP]\nhave hge : (limUnder atTop g).compContinuous e = f :=\n  by\n  refine' tendsto_nhds_unique this (tendsto_iff_dist_tendsto_zero.2 _)\n  refine' squeeze_zero (fun _ => dist_nonneg) hgf _\n  rw [← zero_mul ‖f‖]\n  refine' (tendsto_pow_atTop_nhds_0_of_lt_1 _ _).mul tendsto_const_nhds <;> norm_num1\n[GOAL]\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : X →ᵇ ℝ\ne : C(X, Y)\nhe : ClosedEmbedding ↑e\nF : (X →ᵇ ℝ) → Y →ᵇ ℝ\nhF_norm : ∀ (f : X →ᵇ ℝ), ‖F f‖ ≤ ‖f‖ / 3\nhF_dist : ∀ (f : X →ᵇ ℝ), dist (compContinuous (F f) e) f ≤ 2 / 3 * ‖f‖\ng : ℕ → Y →ᵇ ℝ := fun n => (fun g => g + F (f - compContinuous g e))^[n] 0\ng0 : g 0 = 0\ng_succ : ∀ (n : ℕ), g (n + 1) = g n + F (f - compContinuous (g n) e)\nhgf : ∀ (n : ℕ), dist (compContinuous (g n) e) f ≤ (2 / 3) ^ n * ‖f‖\nhg_dist : ∀ (n : ℕ), dist (g n) (g (n + 1)) ≤ 1 / 3 * ‖f‖ * (2 / 3) ^ n\nhg_cau : CauchySeq g\nthis : Tendsto (fun n => compContinuous (g n) e) atTop (𝓝 (compContinuous (limUnder atTop g) e))\n⊢ compContinuous (limUnder atTop g) e = f\n[PROOFSTEP]\nrefine' tendsto_nhds_unique this (tendsto_iff_dist_tendsto_zero.2 _)\n[GOAL]\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : X →ᵇ ℝ\ne : C(X, Y)\nhe : ClosedEmbedding ↑e\nF : (X →ᵇ ℝ) → Y →ᵇ ℝ\nhF_norm : ∀ (f : X →ᵇ ℝ), ‖F f‖ ≤ ‖f‖ / 3\nhF_dist : ∀ (f : X →ᵇ ℝ), dist (compContinuous (F f) e) f ≤ 2 / 3 * ‖f‖\ng : ℕ → Y →ᵇ ℝ := fun n => (fun g => g + F (f - compContinuous g e))^[n] 0\ng0 : g 0 = 0\ng_succ : ∀ (n : ℕ), g (n + 1) = g n + F (f - compContinuous (g n) e)\nhgf : ∀ (n : ℕ), dist (compContinuous (g n) e) f ≤ (2 / 3) ^ n * ‖f‖\nhg_dist : ∀ (n : ℕ), dist (g n) (g (n + 1)) ≤ 1 / 3 * ‖f‖ * (2 / 3) ^ n\nhg_cau : CauchySeq g\nthis : Tendsto (fun n => compContinuous (g n) e) atTop (𝓝 (compContinuous (limUnder atTop g) e))\n⊢ Tendsto (fun b => dist (compContinuous (g b) e) f) atTop (𝓝 0)\n[PROOFSTEP]\nrefine' squeeze_zero (fun _ => dist_nonneg) hgf _\n[GOAL]\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : X →ᵇ ℝ\ne : C(X, Y)\nhe : ClosedEmbedding ↑e\nF : (X →ᵇ ℝ) → Y →ᵇ ℝ\nhF_norm : ∀ (f : X →ᵇ ℝ), ‖F f‖ ≤ ‖f‖ / 3\nhF_dist : ∀ (f : X →ᵇ ℝ), dist (compContinuous (F f) e) f ≤ 2 / 3 * ‖f‖\ng : ℕ → Y →ᵇ ℝ := fun n => (fun g => g + F (f - compContinuous g e))^[n] 0\ng0 : g 0 = 0\ng_succ : ∀ (n : ℕ), g (n + 1) = g n + F (f - compContinuous (g n) e)\nhgf : ∀ (n : ℕ), dist (compContinuous (g n) e) f ≤ (2 / 3) ^ n * ‖f‖\nhg_dist : ∀ (n : ℕ), dist (g n) (g (n + 1)) ≤ 1 / 3 * ‖f‖ * (2 / 3) ^ n\nhg_cau : CauchySeq g\nthis : Tendsto (fun n => compContinuous (g n) e) atTop (𝓝 (compContinuous (limUnder atTop g) e))\n⊢ Tendsto (fun t => (2 / 3) ^ t * ‖f‖) atTop (𝓝 0)\n[PROOFSTEP]\nrw [← zero_mul ‖f‖]\n[GOAL]\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : X →ᵇ ℝ\ne : C(X, Y)\nhe : ClosedEmbedding ↑e\nF : (X →ᵇ ℝ) → Y →ᵇ ℝ\nhF_norm : ∀ (f : X →ᵇ ℝ), ‖F f‖ ≤ ‖f‖ / 3\nhF_dist : ∀ (f : X →ᵇ ℝ), dist (compContinuous (F f) e) f ≤ 2 / 3 * ‖f‖\ng : ℕ → Y →ᵇ ℝ := fun n => (fun g => g + F (f - compContinuous g e))^[n] 0\ng0 : g 0 = 0\ng_succ : ∀ (n : ℕ), g (n + 1) = g n + F (f - compContinuous (g n) e)\nhgf : ∀ (n : ℕ), dist (compContinuous (g n) e) f ≤ (2 / 3) ^ n * ‖f‖\nhg_dist : ∀ (n : ℕ), dist (g n) (g (n + 1)) ≤ 1 / 3 * ‖f‖ * (2 / 3) ^ n\nhg_cau : CauchySeq g\nthis : Tendsto (fun n => compContinuous (g n) e) atTop (𝓝 (compContinuous (limUnder atTop g) e))\n⊢ Tendsto (fun t => (2 / 3) ^ t * ‖f‖) atTop (𝓝 (0 * ‖f‖))\n[PROOFSTEP]\nrefine' (tendsto_pow_atTop_nhds_0_of_lt_1 _ _).mul tendsto_const_nhds\n[GOAL]\ncase refine'_1\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : X →ᵇ ℝ\ne : C(X, Y)\nhe : ClosedEmbedding ↑e\nF : (X →ᵇ ℝ) → Y →ᵇ ℝ\nhF_norm : ∀ (f : X →ᵇ ℝ), ‖F f‖ ≤ ‖f‖ / 3\nhF_dist : ∀ (f : X →ᵇ ℝ), dist (compContinuous (F f) e) f ≤ 2 / 3 * ‖f‖\ng : ℕ → Y →ᵇ ℝ := fun n => (fun g => g + F (f - compContinuous g e))^[n] 0\ng0 : g 0 = 0\ng_succ : ∀ (n : ℕ), g (n + 1) = g n + F (f - compContinuous (g n) e)\nhgf : ∀ (n : ℕ), dist (compContinuous (g n) e) f ≤ (2 / 3) ^ n * ‖f‖\nhg_dist : ∀ (n : ℕ), dist (g n) (g (n + 1)) ≤ 1 / 3 * ‖f‖ * (2 / 3) ^ n\nhg_cau : CauchySeq g\nthis : Tendsto (fun n => compContinuous (g n) e) atTop (𝓝 (compContinuous (limUnder atTop g) e))\n⊢ 0 ≤ 2 / 3\n[PROOFSTEP]\nnorm_num1\n[GOAL]\ncase refine'_2\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : X →ᵇ ℝ\ne : C(X, Y)\nhe : ClosedEmbedding ↑e\nF : (X →ᵇ ℝ) → Y →ᵇ ℝ\nhF_norm : ∀ (f : X →ᵇ ℝ), ‖F f‖ ≤ ‖f‖ / 3\nhF_dist : ∀ (f : X →ᵇ ℝ), dist (compContinuous (F f) e) f ≤ 2 / 3 * ‖f‖\ng : ℕ → Y →ᵇ ℝ := fun n => (fun g => g + F (f - compContinuous g e))^[n] 0\ng0 : g 0 = 0\ng_succ : ∀ (n : ℕ), g (n + 1) = g n + F (f - compContinuous (g n) e)\nhgf : ∀ (n : ℕ), dist (compContinuous (g n) e) f ≤ (2 / 3) ^ n * ‖f‖\nhg_dist : ∀ (n : ℕ), dist (g n) (g (n + 1)) ≤ 1 / 3 * ‖f‖ * (2 / 3) ^ n\nhg_cau : CauchySeq g\nthis : Tendsto (fun n => compContinuous (g n) e) atTop (𝓝 (compContinuous (limUnder atTop g) e))\n⊢ 2 / 3 < 1\n[PROOFSTEP]\nnorm_num1\n[GOAL]\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : X →ᵇ ℝ\ne : C(X, Y)\nhe : ClosedEmbedding ↑e\nF : (X →ᵇ ℝ) → Y →ᵇ ℝ\nhF_norm : ∀ (f : X →ᵇ ℝ), ‖F f‖ ≤ ‖f‖ / 3\nhF_dist : ∀ (f : X →ᵇ ℝ), dist (compContinuous (F f) e) f ≤ 2 / 3 * ‖f‖\ng : ℕ → Y →ᵇ ℝ := fun n => (fun g => g + F (f - compContinuous g e))^[n] 0\ng0 : g 0 = 0\ng_succ : ∀ (n : ℕ), g (n + 1) = g n + F (f - compContinuous (g n) e)\nhgf : ∀ (n : ℕ), dist (compContinuous (g n) e) f ≤ (2 / 3) ^ n * ‖f‖\nhg_dist : ∀ (n : ℕ), dist (g n) (g (n + 1)) ≤ 1 / 3 * ‖f‖ * (2 / 3) ^ n\nhg_cau : CauchySeq g\nthis : Tendsto (fun n => compContinuous (g n) e) atTop (𝓝 (compContinuous (limUnder atTop g) e))\nhge : compContinuous (limUnder atTop g) e = f\n⊢ ∃ g, ‖g‖ = ‖f‖ ∧ compContinuous g e = f\n[PROOFSTEP]\nrefine' ⟨limUnder atTop g, le_antisymm _ _, hge⟩\n[GOAL]\ncase refine'_1\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : X →ᵇ ℝ\ne : C(X, Y)\nhe : ClosedEmbedding ↑e\nF : (X →ᵇ ℝ) → Y →ᵇ ℝ\nhF_norm : ∀ (f : X →ᵇ ℝ), ‖F f‖ ≤ ‖f‖ / 3\nhF_dist : ∀ (f : X →ᵇ ℝ), dist (compContinuous (F f) e) f ≤ 2 / 3 * ‖f‖\ng : ℕ → Y →ᵇ ℝ := fun n => (fun g => g + F (f - compContinuous g e))^[n] 0\ng0 : g 0 = 0\ng_succ : ∀ (n : ℕ), g (n + 1) = g n + F (f - compContinuous (g n) e)\nhgf : ∀ (n : ℕ), dist (compContinuous (g n) e) f ≤ (2 / 3) ^ n * ‖f‖\nhg_dist : ∀ (n : ℕ), dist (g n) (g (n + 1)) ≤ 1 / 3 * ‖f‖ * (2 / 3) ^ n\nhg_cau : CauchySeq g\nthis : Tendsto (fun n => compContinuous (g n) e) atTop (𝓝 (compContinuous (limUnder atTop g) e))\nhge : compContinuous (limUnder atTop g) e = f\n⊢ ‖limUnder atTop g‖ ≤ ‖f‖\n[PROOFSTEP]\nrw [← dist_zero_left, ← g0]\n[GOAL]\ncase refine'_1\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : X →ᵇ ℝ\ne : C(X, Y)\nhe : ClosedEmbedding ↑e\nF : (X →ᵇ ℝ) → Y →ᵇ ℝ\nhF_norm : ∀ (f : X →ᵇ ℝ), ‖F f‖ ≤ ‖f‖ / 3\nhF_dist : ∀ (f : X →ᵇ ℝ), dist (compContinuous (F f) e) f ≤ 2 / 3 * ‖f‖\ng : ℕ → Y →ᵇ ℝ := fun n => (fun g => g + F (f - compContinuous g e))^[n] 0\ng0 : g 0 = 0\ng_succ : ∀ (n : ℕ), g (n + 1) = g n + F (f - compContinuous (g n) e)\nhgf : ∀ (n : ℕ), dist (compContinuous (g n) e) f ≤ (2 / 3) ^ n * ‖f‖\nhg_dist : ∀ (n : ℕ), dist (g n) (g (n + 1)) ≤ 1 / 3 * ‖f‖ * (2 / 3) ^ n\nhg_cau : CauchySeq g\nthis : Tendsto (fun n => compContinuous (g n) e) atTop (𝓝 (compContinuous (limUnder atTop g) e))\nhge : compContinuous (limUnder atTop g) e = f\n⊢ dist (g 0) (limUnder atTop g) ≤ ‖f‖\n[PROOFSTEP]\nrefine' (dist_le_of_le_geometric_of_tendsto₀ _ _ (by norm_num1) hg_dist hg_cau.tendsto_limUnder).trans_eq _\n[GOAL]\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : X →ᵇ ℝ\ne : C(X, Y)\nhe : ClosedEmbedding ↑e\nF : (X →ᵇ ℝ) → Y →ᵇ ℝ\nhF_norm : ∀ (f : X →ᵇ ℝ), ‖F f‖ ≤ ‖f‖ / 3\nhF_dist : ∀ (f : X →ᵇ ℝ), dist (compContinuous (F f) e) f ≤ 2 / 3 * ‖f‖\ng : ℕ → Y →ᵇ ℝ := fun n => (fun g => g + F (f - compContinuous g e))^[n] 0\ng0 : g 0 = 0\ng_succ : ∀ (n : ℕ), g (n + 1) = g n + F (f - compContinuous (g n) e)\nhgf : ∀ (n : ℕ), dist (compContinuous (g n) e) f ≤ (2 / 3) ^ n * ‖f‖\nhg_dist : ∀ (n : ℕ), dist (g n) (g (n + 1)) ≤ 1 / 3 * ‖f‖ * (2 / 3) ^ n\nhg_cau : CauchySeq g\nthis : Tendsto (fun n => compContinuous (g n) e) atTop (𝓝 (compContinuous (limUnder atTop g) e))\nhge : compContinuous (limUnder atTop g) e = f\n⊢ 2 / 3 < 1\n[PROOFSTEP]\nnorm_num1\n[GOAL]\ncase refine'_1\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : X →ᵇ ℝ\ne : C(X, Y)\nhe : ClosedEmbedding ↑e\nF : (X →ᵇ ℝ) → Y →ᵇ ℝ\nhF_norm : ∀ (f : X →ᵇ ℝ), ‖F f‖ ≤ ‖f‖ / 3\nhF_dist : ∀ (f : X →ᵇ ℝ), dist (compContinuous (F f) e) f ≤ 2 / 3 * ‖f‖\ng : ℕ → Y →ᵇ ℝ := fun n => (fun g => g + F (f - compContinuous g e))^[n] 0\ng0 : g 0 = 0\ng_succ : ∀ (n : ℕ), g (n + 1) = g n + F (f - compContinuous (g n) e)\nhgf : ∀ (n : ℕ), dist (compContinuous (g n) e) f ≤ (2 / 3) ^ n * ‖f‖\nhg_dist : ∀ (n : ℕ), dist (g n) (g (n + 1)) ≤ 1 / 3 * ‖f‖ * (2 / 3) ^ n\nhg_cau : CauchySeq g\nthis : Tendsto (fun n => compContinuous (g n) e) atTop (𝓝 (compContinuous (limUnder atTop g) e))\nhge : compContinuous (limUnder atTop g) e = f\n⊢ 1 / 3 * ‖f‖ / (1 - 2 / 3) = ‖f‖\n[PROOFSTEP]\nfield_simp [show (3 - 2 : ℝ) = 1 by norm_num1]\n[GOAL]\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : X →ᵇ ℝ\ne : C(X, Y)\nhe : ClosedEmbedding ↑e\nF : (X →ᵇ ℝ) → Y →ᵇ ℝ\nhF_norm : ∀ (f : X →ᵇ ℝ), ‖F f‖ ≤ ‖f‖ / 3\nhF_dist : ∀ (f : X →ᵇ ℝ), dist (compContinuous (F f) e) f ≤ 2 / 3 * ‖f‖\ng : ℕ → Y →ᵇ ℝ := fun n => (fun g => g + F (f - compContinuous g e))^[n] 0\ng0 : g 0 = 0\ng_succ : ∀ (n : ℕ), g (n + 1) = g n + F (f - compContinuous (g n) e)\nhgf : ∀ (n : ℕ), dist (compContinuous (g n) e) f ≤ (2 / 3) ^ n * ‖f‖\nhg_dist : ∀ (n : ℕ), dist (g n) (g (n + 1)) ≤ 1 / 3 * ‖f‖ * (2 / 3) ^ n\nhg_cau : CauchySeq g\nthis : Tendsto (fun n => compContinuous (g n) e) atTop (𝓝 (compContinuous (limUnder atTop g) e))\nhge : compContinuous (limUnder atTop g) e = f\n⊢ 3 - 2 = 1\n[PROOFSTEP]\nnorm_num1\n[GOAL]\ncase refine'_2\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : X →ᵇ ℝ\ne : C(X, Y)\nhe : ClosedEmbedding ↑e\nF : (X →ᵇ ℝ) → Y →ᵇ ℝ\nhF_norm : ∀ (f : X →ᵇ ℝ), ‖F f‖ ≤ ‖f‖ / 3\nhF_dist : ∀ (f : X →ᵇ ℝ), dist (compContinuous (F f) e) f ≤ 2 / 3 * ‖f‖\ng : ℕ → Y →ᵇ ℝ := fun n => (fun g => g + F (f - compContinuous g e))^[n] 0\ng0 : g 0 = 0\ng_succ : ∀ (n : ℕ), g (n + 1) = g n + F (f - compContinuous (g n) e)\nhgf : ∀ (n : ℕ), dist (compContinuous (g n) e) f ≤ (2 / 3) ^ n * ‖f‖\nhg_dist : ∀ (n : ℕ), dist (g n) (g (n + 1)) ≤ 1 / 3 * ‖f‖ * (2 / 3) ^ n\nhg_cau : CauchySeq g\nthis : Tendsto (fun n => compContinuous (g n) e) atTop (𝓝 (compContinuous (limUnder atTop g) e))\nhge : compContinuous (limUnder atTop g) e = f\n⊢ ‖f‖ ≤ ‖limUnder atTop g‖\n[PROOFSTEP]\nrw [← hge]\n[GOAL]\ncase refine'_2\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : X →ᵇ ℝ\ne : C(X, Y)\nhe : ClosedEmbedding ↑e\nF : (X →ᵇ ℝ) → Y →ᵇ ℝ\nhF_norm : ∀ (f : X →ᵇ ℝ), ‖F f‖ ≤ ‖f‖ / 3\nhF_dist : ∀ (f : X →ᵇ ℝ), dist (compContinuous (F f) e) f ≤ 2 / 3 * ‖f‖\ng : ℕ → Y →ᵇ ℝ := fun n => (fun g => g + F (f - compContinuous g e))^[n] 0\ng0 : g 0 = 0\ng_succ : ∀ (n : ℕ), g (n + 1) = g n + F (f - compContinuous (g n) e)\nhgf : ∀ (n : ℕ), dist (compContinuous (g n) e) f ≤ (2 / 3) ^ n * ‖f‖\nhg_dist : ∀ (n : ℕ), dist (g n) (g (n + 1)) ≤ 1 / 3 * ‖f‖ * (2 / 3) ^ n\nhg_cau : CauchySeq g\nthis : Tendsto (fun n => compContinuous (g n) e) atTop (𝓝 (compContinuous (limUnder atTop g) e))\nhge : compContinuous (limUnder atTop g) e = f\n⊢ ‖compContinuous (limUnder atTop g) e‖ ≤ ‖limUnder atTop g‖\n[PROOFSTEP]\nexact norm_compContinuous_le _ _\n[GOAL]\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : X →ᵇ ℝ\ne : X → Y\nhe : ClosedEmbedding e\n⊢ ∃ g, ‖g‖ = ‖f‖ ∧ ↑g ∘ e = ↑f\n[PROOFSTEP]\nrcases exists_extension_norm_eq_of_closedEmbedding' f ⟨e, he.continuous⟩ he with ⟨g, hg, rfl⟩\n[GOAL]\ncase intro.intro\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\ne : X → Y\nhe : ClosedEmbedding e\ng : Y →ᵇ ℝ\nhg : ‖g‖ = ‖compContinuous g (ContinuousMap.mk e)‖\n⊢ ∃ g_1, ‖g_1‖ = ‖compContinuous g (ContinuousMap.mk e)‖ ∧ ↑g_1 ∘ e = ↑(compContinuous g (ContinuousMap.mk e))\n[PROOFSTEP]\nexact ⟨g, hg, rfl⟩\n[GOAL]\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : X →ᵇ ℝ\na b : ℝ\ne : X → Y\nhf : ∀ (x : X), ↑f x ∈ Icc a b\nhle : a ≤ b\nhe : ClosedEmbedding e\n⊢ ∃ g, (∀ (y : Y), ↑g y ∈ Icc a b) ∧ ↑g ∘ e = ↑f\n[PROOFSTEP]\nrcases exists_extension_norm_eq_of_closedEmbedding (f - const X ((a + b) / 2)) he with ⟨g, hgf, hge⟩\n[GOAL]\ncase intro.intro\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : X →ᵇ ℝ\na b : ℝ\ne : X → Y\nhf : ∀ (x : X), ↑f x ∈ Icc a b\nhle : a ≤ b\nhe : ClosedEmbedding e\ng : Y →ᵇ ℝ\nhgf : ‖g‖ = ‖f - const X ((a + b) / 2)‖\nhge : ↑g ∘ e = ↑(f - const X ((a + b) / 2))\n⊢ ∃ g, (∀ (y : Y), ↑g y ∈ Icc a b) ∧ ↑g ∘ e = ↑f\n[PROOFSTEP]\nrefine' ⟨const Y ((a + b) / 2) + g, fun y => _, _⟩\n[GOAL]\ncase intro.intro.refine'_1\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : X →ᵇ ℝ\na b : ℝ\ne : X → Y\nhf : ∀ (x : X), ↑f x ∈ Icc a b\nhle : a ≤ b\nhe : ClosedEmbedding e\ng : Y →ᵇ ℝ\nhgf : ‖g‖ = ‖f - const X ((a + b) / 2)‖\nhge : ↑g ∘ e = ↑(f - const X ((a + b) / 2))\ny : Y\n⊢ ↑(const Y ((a + b) / 2) + g) y ∈ Icc a b\n[PROOFSTEP]\nsuffices ‖f - const X ((a + b) / 2)‖ ≤ (b - a) / 2 by\n  simpa [Real.Icc_eq_closedBall, add_mem_closedBall_iff_norm] using (norm_coe_le_norm g y).trans (hgf.trans_le this)\n[GOAL]\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : X →ᵇ ℝ\na b : ℝ\ne : X → Y\nhf : ∀ (x : X), ↑f x ∈ Icc a b\nhle : a ≤ b\nhe : ClosedEmbedding e\ng : Y →ᵇ ℝ\nhgf : ‖g‖ = ‖f - const X ((a + b) / 2)‖\nhge : ↑g ∘ e = ↑(f - const X ((a + b) / 2))\ny : Y\nthis : ‖f - const X ((a + b) / 2)‖ ≤ (b - a) / 2\n⊢ ↑(const Y ((a + b) / 2) + g) y ∈ Icc a b\n[PROOFSTEP]\nsimpa [Real.Icc_eq_closedBall, add_mem_closedBall_iff_norm] using (norm_coe_le_norm g y).trans (hgf.trans_le this)\n[GOAL]\ncase intro.intro.refine'_1\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : X →ᵇ ℝ\na b : ℝ\ne : X → Y\nhf : ∀ (x : X), ↑f x ∈ Icc a b\nhle : a ≤ b\nhe : ClosedEmbedding e\ng : Y →ᵇ ℝ\nhgf : ‖g‖ = ‖f - const X ((a + b) / 2)‖\nhge : ↑g ∘ e = ↑(f - const X ((a + b) / 2))\ny : Y\n⊢ ‖f - const X ((a + b) / 2)‖ ≤ (b - a) / 2\n[PROOFSTEP]\nrefine' (norm_le <| div_nonneg (sub_nonneg.2 hle) zero_le_two).2 fun x => _\n[GOAL]\ncase intro.intro.refine'_1\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : X →ᵇ ℝ\na b : ℝ\ne : X → Y\nhf : ∀ (x : X), ↑f x ∈ Icc a b\nhle : a ≤ b\nhe : ClosedEmbedding e\ng : Y →ᵇ ℝ\nhgf : ‖g‖ = ‖f - const X ((a + b) / 2)‖\nhge : ↑g ∘ e = ↑(f - const X ((a + b) / 2))\ny : Y\nx : X\n⊢ ‖↑(f - const X ((a + b) / 2)) x‖ ≤ (b - a) / 2\n[PROOFSTEP]\nsimpa only [Real.Icc_eq_closedBall] using hf x\n[GOAL]\ncase intro.intro.refine'_2\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : X →ᵇ ℝ\na b : ℝ\ne : X → Y\nhf : ∀ (x : X), ↑f x ∈ Icc a b\nhle : a ≤ b\nhe : ClosedEmbedding e\ng : Y →ᵇ ℝ\nhgf : ‖g‖ = ‖f - const X ((a + b) / 2)‖\nhge : ↑g ∘ e = ↑(f - const X ((a + b) / 2))\n⊢ ↑(const Y ((a + b) / 2) + g) ∘ e = ↑f\n[PROOFSTEP]\next x\n[GOAL]\ncase intro.intro.refine'_2.h\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : X →ᵇ ℝ\na b : ℝ\ne : X → Y\nhf : ∀ (x : X), ↑f x ∈ Icc a b\nhle : a ≤ b\nhe : ClosedEmbedding e\ng : Y →ᵇ ℝ\nhgf : ‖g‖ = ‖f - const X ((a + b) / 2)‖\nhge : ↑g ∘ e = ↑(f - const X ((a + b) / 2))\nx : X\n⊢ (↑(const Y ((a + b) / 2) + g) ∘ e) x = ↑f x\n[PROOFSTEP]\nhave : g (e x) = f x - (a + b) / 2 := congr_fun hge x\n[GOAL]\ncase intro.intro.refine'_2.h\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : X →ᵇ ℝ\na b : ℝ\ne : X → Y\nhf : ∀ (x : X), ↑f x ∈ Icc a b\nhle : a ≤ b\nhe : ClosedEmbedding e\ng : Y →ᵇ ℝ\nhgf : ‖g‖ = ‖f - const X ((a + b) / 2)‖\nhge : ↑g ∘ e = ↑(f - const X ((a + b) / 2))\nx : X\nthis : ↑g (e x) = ↑f x - (a + b) / 2\n⊢ (↑(const Y ((a + b) / 2) + g) ∘ e) x = ↑f x\n[PROOFSTEP]\nsimp [this]\n[GOAL]\nX : Type u_1\nY : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : NormalSpace Y\ninst✝ : Nonempty X\nf : X →ᵇ ℝ\ne : X → Y\nhe : ClosedEmbedding e\n⊢ ∃ g, (∀ (y : Y), ∃ x₁ x₂, ↑g y ∈ Icc (↑f x₁) (↑f x₂)) ∧ ↑g ∘ e = ↑f\n[PROOFSTEP]\ninhabit X\n[GOAL]\nX : Type u_1\nY : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : NormalSpace Y\ninst✝ : Nonempty X\nf : X →ᵇ ℝ\ne : X → Y\nhe : ClosedEmbedding e\ninhabited_h : Inhabited X\n⊢ ∃ g, (∀ (y : Y), ∃ x₁ x₂, ↑g y ∈ Icc (↑f x₁) (↑f x₂)) ∧ ↑g ∘ e = ↑f\n[PROOFSTEP]\nobtain ⟨a, ha⟩ : ∃ a, IsGLB (range f) a\n[GOAL]\nX : Type u_1\nY : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : NormalSpace Y\ninst✝ : Nonempty X\nf : X →ᵇ ℝ\ne : X → Y\nhe : ClosedEmbedding e\ninhabited_h : Inhabited X\n⊢ ∃ a, IsGLB (range ↑f) a\ncase intro\nX : Type u_1\nY : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : NormalSpace Y\ninst✝ : Nonempty X\nf : X →ᵇ ℝ\ne : X → Y\nhe : ClosedEmbedding e\ninhabited_h : Inhabited X\na : ℝ\nha : IsGLB (range ↑f) a\n⊢ ∃ g, (∀ (y : Y), ∃ x₁ x₂, ↑g y ∈ Icc (↑f x₁) (↑f x₂)) ∧ ↑g ∘ e = ↑f\n[PROOFSTEP]\nexact ⟨_, isGLB_ciInf (Real.bounded_iff_bddBelow_bddAbove.1 f.bounded_range).1⟩\n[GOAL]\ncase intro\nX : Type u_1\nY : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : NormalSpace Y\ninst✝ : Nonempty X\nf : X →ᵇ ℝ\ne : X → Y\nhe : ClosedEmbedding e\ninhabited_h : Inhabited X\na : ℝ\nha : IsGLB (range ↑f) a\n⊢ ∃ g, (∀ (y : Y), ∃ x₁ x₂, ↑g y ∈ Icc (↑f x₁) (↑f x₂)) ∧ ↑g ∘ e = ↑f\n[PROOFSTEP]\nobtain ⟨b, hb⟩ : ∃ b, IsLUB (range f) b\n[GOAL]\nX : Type u_1\nY : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : NormalSpace Y\ninst✝ : Nonempty X\nf : X →ᵇ ℝ\ne : X → Y\nhe : ClosedEmbedding e\ninhabited_h : Inhabited X\na : ℝ\nha : IsGLB (range ↑f) a\n⊢ ∃ b, IsLUB (range ↑f) b\ncase intro.intro\nX : Type u_1\nY : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : NormalSpace Y\ninst✝ : Nonempty X\nf : X →ᵇ ℝ\ne : X → Y\nhe : ClosedEmbedding e\ninhabited_h : Inhabited X\na : ℝ\nha : IsGLB (range ↑f) a\nb : ℝ\nhb : IsLUB (range ↑f) b\n⊢ ∃ g, (∀ (y : Y), ∃ x₁ x₂, ↑g y ∈ Icc (↑f x₁) (↑f x₂)) ∧ ↑g ∘ e = ↑f\n[PROOFSTEP]\nexact\n  ⟨_, isLUB_ciSup (Real.bounded_iff_bddBelow_bddAbove.1 f.bounded_range).2⟩\n    -- Then `f x ∈ [a, b]` for all `x`\n[GOAL]\ncase intro.intro\nX : Type u_1\nY : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : NormalSpace Y\ninst✝ : Nonempty X\nf : X →ᵇ ℝ\ne : X → Y\nhe : ClosedEmbedding e\ninhabited_h : Inhabited X\na : ℝ\nha : IsGLB (range ↑f) a\nb : ℝ\nhb : IsLUB (range ↑f) b\n⊢ ∃ g, (∀ (y : Y), ∃ x₁ x₂, ↑g y ∈ Icc (↑f x₁) (↑f x₂)) ∧ ↑g ∘ e = ↑f\n[PROOFSTEP]\nhave hmem : ∀ x, f x ∈ Icc a b := fun x =>\n  ⟨ha.1 ⟨x, rfl⟩, hb.1 ⟨x, rfl⟩⟩\n    -- Rule out the trivial case `a = b`\n[GOAL]\ncase intro.intro\nX : Type u_1\nY : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : NormalSpace Y\ninst✝ : Nonempty X\nf : X →ᵇ ℝ\ne : X → Y\nhe : ClosedEmbedding e\ninhabited_h : Inhabited X\na : ℝ\nha : IsGLB (range ↑f) a\nb : ℝ\nhb : IsLUB (range ↑f) b\nhmem : ∀ (x : X), ↑f x ∈ Icc a b\n⊢ ∃ g, (∀ (y : Y), ∃ x₁ x₂, ↑g y ∈ Icc (↑f x₁) (↑f x₂)) ∧ ↑g ∘ e = ↑f\n[PROOFSTEP]\nhave hle : a ≤ b := (hmem default).1.trans (hmem default).2\n[GOAL]\ncase intro.intro\nX : Type u_1\nY : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : NormalSpace Y\ninst✝ : Nonempty X\nf : X →ᵇ ℝ\ne : X → Y\nhe : ClosedEmbedding e\ninhabited_h : Inhabited X\na : ℝ\nha : IsGLB (range ↑f) a\nb : ℝ\nhb : IsLUB (range ↑f) b\nhmem : ∀ (x : X), ↑f x ∈ Icc a b\nhle : a ≤ b\n⊢ ∃ g, (∀ (y : Y), ∃ x₁ x₂, ↑g y ∈ Icc (↑f x₁) (↑f x₂)) ∧ ↑g ∘ e = ↑f\n[PROOFSTEP]\nrcases hle.eq_or_lt with (rfl | hlt)\n[GOAL]\ncase intro.intro.inl\nX : Type u_1\nY : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : NormalSpace Y\ninst✝ : Nonempty X\nf : X →ᵇ ℝ\ne : X → Y\nhe : ClosedEmbedding e\ninhabited_h : Inhabited X\na : ℝ\nha : IsGLB (range ↑f) a\nhb : IsLUB (range ↑f) a\nhmem : ∀ (x : X), ↑f x ∈ Icc a a\nhle : a ≤ a\n⊢ ∃ g, (∀ (y : Y), ∃ x₁ x₂, ↑g y ∈ Icc (↑f x₁) (↑f x₂)) ∧ ↑g ∘ e = ↑f\n[PROOFSTEP]\nhave : ∀ x, f x = a := by simpa using hmem\n[GOAL]\nX : Type u_1\nY : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : NormalSpace Y\ninst✝ : Nonempty X\nf : X →ᵇ ℝ\ne : X → Y\nhe : ClosedEmbedding e\ninhabited_h : Inhabited X\na : ℝ\nha : IsGLB (range ↑f) a\nhb : IsLUB (range ↑f) a\nhmem : ∀ (x : X), ↑f x ∈ Icc a a\nhle : a ≤ a\n⊢ ∀ (x : X), ↑f x = a\n[PROOFSTEP]\nsimpa using hmem\n[GOAL]\ncase intro.intro.inl\nX : Type u_1\nY : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : NormalSpace Y\ninst✝ : Nonempty X\nf : X →ᵇ ℝ\ne : X → Y\nhe : ClosedEmbedding e\ninhabited_h : Inhabited X\na : ℝ\nha : IsGLB (range ↑f) a\nhb : IsLUB (range ↑f) a\nhmem : ∀ (x : X), ↑f x ∈ Icc a a\nhle : a ≤ a\nthis : ∀ (x : X), ↑f x = a\n⊢ ∃ g, (∀ (y : Y), ∃ x₁ x₂, ↑g y ∈ Icc (↑f x₁) (↑f x₂)) ∧ ↑g ∘ e = ↑f\n[PROOFSTEP]\nuse const Y a\n[GOAL]\ncase h\nX : Type u_1\nY : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : NormalSpace Y\ninst✝ : Nonempty X\nf : X →ᵇ ℝ\ne : X → Y\nhe : ClosedEmbedding e\ninhabited_h : Inhabited X\na : ℝ\nha : IsGLB (range ↑f) a\nhb : IsLUB (range ↑f) a\nhmem : ∀ (x : X), ↑f x ∈ Icc a a\nhle : a ≤ a\nthis : ∀ (x : X), ↑f x = a\n⊢ (∀ (y : Y), ∃ x₁ x₂, ↑(const Y a) y ∈ Icc (↑f x₁) (↑f x₂)) ∧ ↑(const Y a) ∘ e = ↑f\n[PROOFSTEP]\nsimp [this, Function.funext_iff]\n  -- Put `c = (a + b) / 2`. Then `a < c < b` and `c - a = b - c`.\n[GOAL]\ncase intro.intro.inr\nX : Type u_1\nY : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : NormalSpace Y\ninst✝ : Nonempty X\nf : X →ᵇ ℝ\ne : X → Y\nhe : ClosedEmbedding e\ninhabited_h : Inhabited X\na : ℝ\nha : IsGLB (range ↑f) a\nb : ℝ\nhb : IsLUB (range ↑f) b\nhmem : ∀ (x : X), ↑f x ∈ Icc a b\nhle : a ≤ b\nhlt : a < b\n⊢ ∃ g, (∀ (y : Y), ∃ x₁ x₂, ↑g y ∈ Icc (↑f x₁) (↑f x₂)) ∧ ↑g ∘ e = ↑f\n[PROOFSTEP]\nset c := (a + b) / 2\n[GOAL]\ncase intro.intro.inr\nX : Type u_1\nY : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : NormalSpace Y\ninst✝ : Nonempty X\nf : X →ᵇ ℝ\ne : X → Y\nhe : ClosedEmbedding e\ninhabited_h : Inhabited X\na : ℝ\nha : IsGLB (range ↑f) a\nb : ℝ\nhb : IsLUB (range ↑f) b\nhmem : ∀ (x : X), ↑f x ∈ Icc a b\nhle : a ≤ b\nhlt : a < b\nc : ℝ := (a + b) / 2\n⊢ ∃ g, (∀ (y : Y), ∃ x₁ x₂, ↑g y ∈ Icc (↑f x₁) (↑f x₂)) ∧ ↑g ∘ e = ↑f\n[PROOFSTEP]\nhave hac : a < c := left_lt_add_div_two.2 hlt\n[GOAL]\ncase intro.intro.inr\nX : Type u_1\nY : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : NormalSpace Y\ninst✝ : Nonempty X\nf : X →ᵇ ℝ\ne : X → Y\nhe : ClosedEmbedding e\ninhabited_h : Inhabited X\na : ℝ\nha : IsGLB (range ↑f) a\nb : ℝ\nhb : IsLUB (range ↑f) b\nhmem : ∀ (x : X), ↑f x ∈ Icc a b\nhle : a ≤ b\nhlt : a < b\nc : ℝ := (a + b) / 2\nhac : a < c\n⊢ ∃ g, (∀ (y : Y), ∃ x₁ x₂, ↑g y ∈ Icc (↑f x₁) (↑f x₂)) ∧ ↑g ∘ e = ↑f\n[PROOFSTEP]\nhave hcb : c < b := add_div_two_lt_right.2 hlt\n[GOAL]\ncase intro.intro.inr\nX : Type u_1\nY : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : NormalSpace Y\ninst✝ : Nonempty X\nf : X →ᵇ ℝ\ne : X → Y\nhe : ClosedEmbedding e\ninhabited_h : Inhabited X\na : ℝ\nha : IsGLB (range ↑f) a\nb : ℝ\nhb : IsLUB (range ↑f) b\nhmem : ∀ (x : X), ↑f x ∈ Icc a b\nhle : a ≤ b\nhlt : a < b\nc : ℝ := (a + b) / 2\nhac : a < c\nhcb : c < b\n⊢ ∃ g, (∀ (y : Y), ∃ x₁ x₂, ↑g y ∈ Icc (↑f x₁) (↑f x₂)) ∧ ↑g ∘ e = ↑f\n[PROOFSTEP]\nhave hsub : c - a = b - c := by\n  field_simp\n  ring\n    /- Due to `exists_extension_forall_mem_Icc_of_closedEmbedding`, there exists an extension `g`\n        such that `g y ∈ [a, b]` for all `y`. However, if `a` and/or `b` do not belong to the range of\n        `f`, then we need to ensure that these points do not belong to the range of `g`. This is done\n        in two almost identical steps. First we deal with the case `∀ x, f x ≠ a`. -/\n[GOAL]\nX : Type u_1\nY : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : NormalSpace Y\ninst✝ : Nonempty X\nf : X →ᵇ ℝ\ne : X → Y\nhe : ClosedEmbedding e\ninhabited_h : Inhabited X\na : ℝ\nha : IsGLB (range ↑f) a\nb : ℝ\nhb : IsLUB (range ↑f) b\nhmem : ∀ (x : X), ↑f x ∈ Icc a b\nhle : a ≤ b\nhlt : a < b\nc : ℝ := (a + b) / 2\nhac : a < c\nhcb : c < b\n⊢ c - a = b - c\n[PROOFSTEP]\nfield_simp\n[GOAL]\nX : Type u_1\nY : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : NormalSpace Y\ninst✝ : Nonempty X\nf : X →ᵇ ℝ\ne : X → Y\nhe : ClosedEmbedding e\ninhabited_h : Inhabited X\na : ℝ\nha : IsGLB (range ↑f) a\nb : ℝ\nhb : IsLUB (range ↑f) b\nhmem : ∀ (x : X), ↑f x ∈ Icc a b\nhle : a ≤ b\nhlt : a < b\nc : ℝ := (a + b) / 2\nhac : a < c\nhcb : c < b\n⊢ a + b - 2 * a = b * 2 - (a + b)\n[PROOFSTEP]\nring\n  /- Due to `exists_extension_forall_mem_Icc_of_closedEmbedding`, there exists an extension `g`\n      such that `g y ∈ [a, b]` for all `y`. However, if `a` and/or `b` do not belong to the range of\n      `f`, then we need to ensure that these points do not belong to the range of `g`. This is done\n      in two almost identical steps. First we deal with the case `∀ x, f x ≠ a`. -/\n[GOAL]\ncase intro.intro.inr\nX : Type u_1\nY : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : NormalSpace Y\ninst✝ : Nonempty X\nf : X →ᵇ ℝ\ne : X → Y\nhe : ClosedEmbedding e\ninhabited_h : Inhabited X\na : ℝ\nha : IsGLB (range ↑f) a\nb : ℝ\nhb : IsLUB (range ↑f) b\nhmem : ∀ (x : X), ↑f x ∈ Icc a b\nhle : a ≤ b\nhlt : a < b\nc : ℝ := (a + b) / 2\nhac : a < c\nhcb : c < b\nhsub : c - a = b - c\n⊢ ∃ g, (∀ (y : Y), ∃ x₁ x₂, ↑g y ∈ Icc (↑f x₁) (↑f x₂)) ∧ ↑g ∘ e = ↑f\n[PROOFSTEP]\nobtain ⟨g, hg_mem, hgf⟩ : ∃ g : Y →ᵇ ℝ, (∀ y, ∃ x, g y ∈ Icc (f x) b) ∧ g ∘ e = f :=\n  by\n  rcases exists_extension_forall_mem_Icc_of_closedEmbedding f hmem hle he with\n    ⟨g, hg_mem, hgf⟩\n      -- If `a ∈ range f`, then we are done.\n  rcases em (∃ x, f x = a) with (⟨x, rfl⟩ | ha')\n  ·\n    exact\n      ⟨g, fun y => ⟨x, hg_mem _⟩, hgf⟩\n        /- Otherwise, `g ⁻¹' {a}` is disjoint with `range e ∪ g ⁻¹' (Ici c)`, hence there exists a\n                function `dg : Y → ℝ` such that `dg ∘ e = 0`, `dg y = 0` whenever `c ≤ g y`, `dg y = c - a`\n                whenever `g y = a`, and `0 ≤ dg y ≤ c - a` for all `y`.  -/\n  have hd : Disjoint (range e ∪ g ⁻¹' Ici c) (g ⁻¹' { a }) :=\n    by\n    refine' disjoint_union_left.2 ⟨_, Disjoint.preimage _ _⟩\n    · rw [Set.disjoint_left]\n      rintro _ ⟨x, rfl⟩ (rfl : g (e x) = a)\n      exact ha' ⟨x, (congr_fun hgf x).symm⟩\n    · exact Set.disjoint_singleton_right.2 hac.not_le\n  rcases exists_bounded_mem_Icc_of_closed_of_le (he.closed_range.union <| isClosed_Ici.preimage g.continuous)\n      (isClosed_singleton.preimage g.continuous) hd (sub_nonneg.2 hac.le) with\n    ⟨dg, dg0, dga, dgmem⟩\n  replace hgf : ∀ x, (g + dg) (e x) = f x\n  · intro x\n    simp [dg0 (Or.inl <| mem_range_self _), ← hgf]\n  refine' ⟨g + dg, fun y => _, funext hgf⟩\n  · have hay : a < (g + dg) y := by\n      rcases(hg_mem y).1.eq_or_lt with (rfl | hlt)\n      · refine' (lt_add_iff_pos_right _).2 _\n        calc\n          0 < c - g y := sub_pos.2 hac\n          _ = dg y := (dga rfl).symm\n      · exact hlt.trans_le ((le_add_iff_nonneg_right _).2 <| (dgmem y).1)\n    rcases ha.exists_between hay with ⟨_, ⟨x, rfl⟩, _, hxy⟩\n    refine' ⟨x, hxy.le, _⟩\n    cases' le_total c (g y) with hc hc\n    · simp [dg0 (Or.inr hc), (hg_mem y).2]\n    ·\n      calc\n        g y + dg y ≤ c + (c - a) := add_le_add hc (dgmem _).2\n        _ = b := by\n          rw [hsub, add_sub_cancel'_right]\n            /- Now we deal with the case `∀ x, f x ≠ b`. The proof is the same as in the first case, with\n                minor modifications that make it hard to deduplicate code. -/\n[GOAL]\nX : Type u_1\nY : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : NormalSpace Y\ninst✝ : Nonempty X\nf : X →ᵇ ℝ\ne : X → Y\nhe : ClosedEmbedding e\ninhabited_h : Inhabited X\na : ℝ\nha : IsGLB (range ↑f) a\nb : ℝ\nhb : IsLUB (range ↑f) b\nhmem : ∀ (x : X), ↑f x ∈ Icc a b\nhle : a ≤ b\nhlt : a < b\nc : ℝ := (a + b) / 2\nhac : a < c\nhcb : c < b\nhsub : c - a = b - c\n⊢ ∃ g, (∀ (y : Y), ∃ x, ↑g y ∈ Icc (↑f x) b) ∧ ↑g ∘ e = ↑f\n[PROOFSTEP]\nrcases exists_extension_forall_mem_Icc_of_closedEmbedding f hmem hle he with\n  ⟨g, hg_mem, hgf⟩\n    -- If `a ∈ range f`, then we are done.\n[GOAL]\ncase intro.intro\nX : Type u_1\nY : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : NormalSpace Y\ninst✝ : Nonempty X\nf : X →ᵇ ℝ\ne : X → Y\nhe : ClosedEmbedding e\ninhabited_h : Inhabited X\na : ℝ\nha : IsGLB (range ↑f) a\nb : ℝ\nhb : IsLUB (range ↑f) b\nhmem : ∀ (x : X), ↑f x ∈ Icc a b\nhle : a ≤ b\nhlt : a < b\nc : ℝ := (a + b) / 2\nhac : a < c\nhcb : c < b\nhsub : c - a = b - c\ng : Y →ᵇ ℝ\nhg_mem : ∀ (y : Y), ↑g y ∈ Icc a b\nhgf : ↑g ∘ e = ↑f\n⊢ ∃ g, (∀ (y : Y), ∃ x, ↑g y ∈ Icc (↑f x) b) ∧ ↑g ∘ e = ↑f\n[PROOFSTEP]\nrcases em (∃ x, f x = a) with (⟨x, rfl⟩ | ha')\n[GOAL]\ncase intro.intro.inl.intro\nX : Type u_1\nY : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : NormalSpace Y\ninst✝ : Nonempty X\nf : X →ᵇ ℝ\ne : X → Y\nhe : ClosedEmbedding e\ninhabited_h : Inhabited X\nb : ℝ\nhb : IsLUB (range ↑f) b\ng : Y →ᵇ ℝ\nhgf : ↑g ∘ e = ↑f\nx : X\nha : IsGLB (range ↑f) (↑f x)\nhmem : ∀ (x_1 : X), ↑f x_1 ∈ Icc (↑f x) b\nhle : ↑f x ≤ b\nhlt : ↑f x < b\nc : ℝ := (↑f x + b) / 2\nhac : ↑f x < c\nhcb : c < b\nhsub : c - ↑f x = b - c\nhg_mem : ∀ (y : Y), ↑g y ∈ Icc (↑f x) b\n⊢ ∃ g, (∀ (y : Y), ∃ x, ↑g y ∈ Icc (↑f x) b) ∧ ↑g ∘ e = ↑f\n[PROOFSTEP]\nexact\n  ⟨g, fun y => ⟨x, hg_mem _⟩, hgf⟩\n    /- Otherwise, `g ⁻¹' {a}` is disjoint with `range e ∪ g ⁻¹' (Ici c)`, hence there exists a\n            function `dg : Y → ℝ` such that `dg ∘ e = 0`, `dg y = 0` whenever `c ≤ g y`, `dg y = c - a`\n            whenever `g y = a`, and `0 ≤ dg y ≤ c - a` for all `y`.  -/\n[GOAL]\ncase intro.intro.inr\nX : Type u_1\nY : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : NormalSpace Y\ninst✝ : Nonempty X\nf : X →ᵇ ℝ\ne : X → Y\nhe : ClosedEmbedding e\ninhabited_h : Inhabited X\na : ℝ\nha : IsGLB (range ↑f) a\nb : ℝ\nhb : IsLUB (range ↑f) b\nhmem : ∀ (x : X), ↑f x ∈ Icc a b\nhle : a ≤ b\nhlt : a < b\nc : ℝ := (a + b) / 2\nhac : a < c\nhcb : c < b\nhsub : c - a = b - c\ng : Y →ᵇ ℝ\nhg_mem : ∀ (y : Y), ↑g y ∈ Icc a b\nhgf : ↑g ∘ e = ↑f\nha' : ¬∃ x, ↑f x = a\n⊢ ∃ g, (∀ (y : Y), ∃ x, ↑g y ∈ Icc (↑f x) b) ∧ ↑g ∘ e = ↑f\n[PROOFSTEP]\nhave hd : Disjoint (range e ∪ g ⁻¹' Ici c) (g ⁻¹' { a }) :=\n  by\n  refine' disjoint_union_left.2 ⟨_, Disjoint.preimage _ _⟩\n  · rw [Set.disjoint_left]\n    rintro _ ⟨x, rfl⟩ (rfl : g (e x) = a)\n    exact ha' ⟨x, (congr_fun hgf x).symm⟩\n  · exact Set.disjoint_singleton_right.2 hac.not_le\n[GOAL]\nX : Type u_1\nY : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : NormalSpace Y\ninst✝ : Nonempty X\nf : X →ᵇ ℝ\ne : X → Y\nhe : ClosedEmbedding e\ninhabited_h : Inhabited X\na : ℝ\nha : IsGLB (range ↑f) a\nb : ℝ\nhb : IsLUB (range ↑f) b\nhmem : ∀ (x : X), ↑f x ∈ Icc a b\nhle : a ≤ b\nhlt : a < b\nc : ℝ := (a + b) / 2\nhac : a < c\nhcb : c < b\nhsub : c - a = b - c\ng : Y →ᵇ ℝ\nhg_mem : ∀ (y : Y), ↑g y ∈ Icc a b\nhgf : ↑g ∘ e = ↑f\nha' : ¬∃ x, ↑f x = a\n⊢ Disjoint (range e ∪ ↑g ⁻¹' Ici c) (↑g ⁻¹' {a})\n[PROOFSTEP]\nrefine' disjoint_union_left.2 ⟨_, Disjoint.preimage _ _⟩\n[GOAL]\ncase refine'_1\nX : Type u_1\nY : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : NormalSpace Y\ninst✝ : Nonempty X\nf : X →ᵇ ℝ\ne : X → Y\nhe : ClosedEmbedding e\ninhabited_h : Inhabited X\na : ℝ\nha : IsGLB (range ↑f) a\nb : ℝ\nhb : IsLUB (range ↑f) b\nhmem : ∀ (x : X), ↑f x ∈ Icc a b\nhle : a ≤ b\nhlt : a < b\nc : ℝ := (a + b) / 2\nhac : a < c\nhcb : c < b\nhsub : c - a = b - c\ng : Y →ᵇ ℝ\nhg_mem : ∀ (y : Y), ↑g y ∈ Icc a b\nhgf : ↑g ∘ e = ↑f\nha' : ¬∃ x, ↑f x = a\n⊢ Disjoint (range e) (↑g ⁻¹' {a})\n[PROOFSTEP]\nrw [Set.disjoint_left]\n[GOAL]\ncase refine'_1\nX : Type u_1\nY : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : NormalSpace Y\ninst✝ : Nonempty X\nf : X →ᵇ ℝ\ne : X → Y\nhe : ClosedEmbedding e\ninhabited_h : Inhabited X\na : ℝ\nha : IsGLB (range ↑f) a\nb : ℝ\nhb : IsLUB (range ↑f) b\nhmem : ∀ (x : X), ↑f x ∈ Icc a b\nhle : a ≤ b\nhlt : a < b\nc : ℝ := (a + b) / 2\nhac : a < c\nhcb : c < b\nhsub : c - a = b - c\ng : Y →ᵇ ℝ\nhg_mem : ∀ (y : Y), ↑g y ∈ Icc a b\nhgf : ↑g ∘ e = ↑f\nha' : ¬∃ x, ↑f x = a\n⊢ ∀ ⦃a_1 : Y⦄, a_1 ∈ range e → ¬a_1 ∈ ↑g ⁻¹' {a}\n[PROOFSTEP]\nrintro _ ⟨x, rfl⟩ (rfl : g (e x) = a)\n[GOAL]\ncase refine'_1.intro\nX : Type u_1\nY : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : NormalSpace Y\ninst✝ : Nonempty X\nf : X →ᵇ ℝ\ne : X → Y\nhe : ClosedEmbedding e\ninhabited_h : Inhabited X\nb : ℝ\nhb : IsLUB (range ↑f) b\ng : Y →ᵇ ℝ\nhgf : ↑g ∘ e = ↑f\nx : X\nha : IsGLB (range ↑f) (↑g (e x))\nhmem : ∀ (x_1 : X), ↑f x_1 ∈ Icc (↑g (e x)) b\nhle : ↑g (e x) ≤ b\nhlt : ↑g (e x) < b\nc : ℝ := (↑g (e x) + b) / 2\nhac : ↑g (e x) < c\nhcb : c < b\nhsub : c - ↑g (e x) = b - c\nhg_mem : ∀ (y : Y), ↑g y ∈ Icc (↑g (e x)) b\nha' : ¬∃ x_1, ↑f x_1 = ↑g (e x)\n⊢ False\n[PROOFSTEP]\nexact ha' ⟨x, (congr_fun hgf x).symm⟩\n[GOAL]\ncase refine'_2\nX : Type u_1\nY : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : NormalSpace Y\ninst✝ : Nonempty X\nf : X →ᵇ ℝ\ne : X → Y\nhe : ClosedEmbedding e\ninhabited_h : Inhabited X\na : ℝ\nha : IsGLB (range ↑f) a\nb : ℝ\nhb : IsLUB (range ↑f) b\nhmem : ∀ (x : X), ↑f x ∈ Icc a b\nhle : a ≤ b\nhlt : a < b\nc : ℝ := (a + b) / 2\nhac : a < c\nhcb : c < b\nhsub : c - a = b - c\ng : Y →ᵇ ℝ\nhg_mem : ∀ (y : Y), ↑g y ∈ Icc a b\nhgf : ↑g ∘ e = ↑f\nha' : ¬∃ x, ↑f x = a\n⊢ Disjoint (Ici c) {a}\n[PROOFSTEP]\nexact Set.disjoint_singleton_right.2 hac.not_le\n[GOAL]\ncase intro.intro.inr\nX : Type u_1\nY : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : NormalSpace Y\ninst✝ : Nonempty X\nf : X →ᵇ ℝ\ne : X → Y\nhe : ClosedEmbedding e\ninhabited_h : Inhabited X\na : ℝ\nha : IsGLB (range ↑f) a\nb : ℝ\nhb : IsLUB (range ↑f) b\nhmem : ∀ (x : X), ↑f x ∈ Icc a b\nhle : a ≤ b\nhlt : a < b\nc : ℝ := (a + b) / 2\nhac : a < c\nhcb : c < b\nhsub : c - a = b - c\ng : Y →ᵇ ℝ\nhg_mem : ∀ (y : Y), ↑g y ∈ Icc a b\nhgf : ↑g ∘ e = ↑f\nha' : ¬∃ x, ↑f x = a\nhd : Disjoint (range e ∪ ↑g ⁻¹' Ici c) (↑g ⁻¹' {a})\n⊢ ∃ g, (∀ (y : Y), ∃ x, ↑g y ∈ Icc (↑f x) b) ∧ ↑g ∘ e = ↑f\n[PROOFSTEP]\nrcases exists_bounded_mem_Icc_of_closed_of_le (he.closed_range.union <| isClosed_Ici.preimage g.continuous)\n    (isClosed_singleton.preimage g.continuous) hd (sub_nonneg.2 hac.le) with\n  ⟨dg, dg0, dga, dgmem⟩\n[GOAL]\ncase intro.intro.inr.intro.intro.intro\nX : Type u_1\nY : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : NormalSpace Y\ninst✝ : Nonempty X\nf : X →ᵇ ℝ\ne : X → Y\nhe : ClosedEmbedding e\ninhabited_h : Inhabited X\na : ℝ\nha : IsGLB (range ↑f) a\nb : ℝ\nhb : IsLUB (range ↑f) b\nhmem : ∀ (x : X), ↑f x ∈ Icc a b\nhle : a ≤ b\nhlt : a < b\nc : ℝ := (a + b) / 2\nhac : a < c\nhcb : c < b\nhsub : c - a = b - c\ng : Y →ᵇ ℝ\nhg_mem : ∀ (y : Y), ↑g y ∈ Icc a b\nhgf : ↑g ∘ e = ↑f\nha' : ¬∃ x, ↑f x = a\nhd : Disjoint (range e ∪ ↑g ⁻¹' Ici c) (↑g ⁻¹' {a})\ndg : Y →ᵇ ℝ\ndg0 : EqOn (↑dg) (Function.const Y 0) (range e ∪ ↑g ⁻¹' Ici c)\ndga : EqOn (↑dg) (Function.const Y (c - a)) (↑g ⁻¹' {a})\ndgmem : ∀ (x : Y), ↑dg x ∈ Icc 0 (c - a)\n⊢ ∃ g, (∀ (y : Y), ∃ x, ↑g y ∈ Icc (↑f x) b) ∧ ↑g ∘ e = ↑f\n[PROOFSTEP]\nreplace hgf : ∀ x, (g + dg) (e x) = f x\n[GOAL]\ncase hgf\nX : Type u_1\nY : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : NormalSpace Y\ninst✝ : Nonempty X\nf : X →ᵇ ℝ\ne : X → Y\nhe : ClosedEmbedding e\ninhabited_h : Inhabited X\na : ℝ\nha : IsGLB (range ↑f) a\nb : ℝ\nhb : IsLUB (range ↑f) b\nhmem : ∀ (x : X), ↑f x ∈ Icc a b\nhle : a ≤ b\nhlt : a < b\nc : ℝ := (a + b) / 2\nhac : a < c\nhcb : c < b\nhsub : c - a = b - c\ng : Y →ᵇ ℝ\nhg_mem : ∀ (y : Y), ↑g y ∈ Icc a b\nhgf : ↑g ∘ e = ↑f\nha' : ¬∃ x, ↑f x = a\nhd : Disjoint (range e ∪ ↑g ⁻¹' Ici c) (↑g ⁻¹' {a})\ndg : Y →ᵇ ℝ\ndg0 : EqOn (↑dg) (Function.const Y 0) (range e ∪ ↑g ⁻¹' Ici c)\ndga : EqOn (↑dg) (Function.const Y (c - a)) (↑g ⁻¹' {a})\ndgmem : ∀ (x : Y), ↑dg x ∈ Icc 0 (c - a)\n⊢ ∀ (x : X), ↑(g + dg) (e x) = ↑f x\n[PROOFSTEP]\nintro x\n[GOAL]\ncase hgf\nX : Type u_1\nY : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : NormalSpace Y\ninst✝ : Nonempty X\nf : X →ᵇ ℝ\ne : X → Y\nhe : ClosedEmbedding e\ninhabited_h : Inhabited X\na : ℝ\nha : IsGLB (range ↑f) a\nb : ℝ\nhb : IsLUB (range ↑f) b\nhmem : ∀ (x : X), ↑f x ∈ Icc a b\nhle : a ≤ b\nhlt : a < b\nc : ℝ := (a + b) / 2\nhac : a < c\nhcb : c < b\nhsub : c - a = b - c\ng : Y →ᵇ ℝ\nhg_mem : ∀ (y : Y), ↑g y ∈ Icc a b\nhgf : ↑g ∘ e = ↑f\nha' : ¬∃ x, ↑f x = a\nhd : Disjoint (range e ∪ ↑g ⁻¹' Ici c) (↑g ⁻¹' {a})\ndg : Y →ᵇ ℝ\ndg0 : EqOn (↑dg) (Function.const Y 0) (range e ∪ ↑g ⁻¹' Ici c)\ndga : EqOn (↑dg) (Function.const Y (c - a)) (↑g ⁻¹' {a})\ndgmem : ∀ (x : Y), ↑dg x ∈ Icc 0 (c - a)\nx : X\n⊢ ↑(g + dg) (e x) = ↑f x\n[PROOFSTEP]\nsimp [dg0 (Or.inl <| mem_range_self _), ← hgf]\n[GOAL]\ncase intro.intro.inr.intro.intro.intro\nX : Type u_1\nY : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : NormalSpace Y\ninst✝ : Nonempty X\nf : X →ᵇ ℝ\ne : X → Y\nhe : ClosedEmbedding e\ninhabited_h : Inhabited X\na : ℝ\nha : IsGLB (range ↑f) a\nb : ℝ\nhb : IsLUB (range ↑f) b\nhmem : ∀ (x : X), ↑f x ∈ Icc a b\nhle : a ≤ b\nhlt : a < b\nc : ℝ := (a + b) / 2\nhac : a < c\nhcb : c < b\nhsub : c - a = b - c\ng : Y →ᵇ ℝ\nhg_mem : ∀ (y : Y), ↑g y ∈ Icc a b\nha' : ¬∃ x, ↑f x = a\nhd : Disjoint (range e ∪ ↑g ⁻¹' Ici c) (↑g ⁻¹' {a})\ndg : Y →ᵇ ℝ\ndg0 : EqOn (↑dg) (Function.const Y 0) (range e ∪ ↑g ⁻¹' Ici c)\ndga : EqOn (↑dg) (Function.const Y (c - a)) (↑g ⁻¹' {a})\ndgmem : ∀ (x : Y), ↑dg x ∈ Icc 0 (c - a)\nhgf : ∀ (x : X), ↑(g + dg) (e x) = ↑f x\n⊢ ∃ g, (∀ (y : Y), ∃ x, ↑g y ∈ Icc (↑f x) b) ∧ ↑g ∘ e = ↑f\n[PROOFSTEP]\nrefine' ⟨g + dg, fun y => _, funext hgf⟩\n[GOAL]\ncase intro.intro.inr.intro.intro.intro\nX : Type u_1\nY : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : NormalSpace Y\ninst✝ : Nonempty X\nf : X →ᵇ ℝ\ne : X → Y\nhe : ClosedEmbedding e\ninhabited_h : Inhabited X\na : ℝ\nha : IsGLB (range ↑f) a\nb : ℝ\nhb : IsLUB (range ↑f) b\nhmem : ∀ (x : X), ↑f x ∈ Icc a b\nhle : a ≤ b\nhlt : a < b\nc : ℝ := (a + b) / 2\nhac : a < c\nhcb : c < b\nhsub : c - a = b - c\ng : Y →ᵇ ℝ\nhg_mem : ∀ (y : Y), ↑g y ∈ Icc a b\nha' : ¬∃ x, ↑f x = a\nhd : Disjoint (range e ∪ ↑g ⁻¹' Ici c) (↑g ⁻¹' {a})\ndg : Y →ᵇ ℝ\ndg0 : EqOn (↑dg) (Function.const Y 0) (range e ∪ ↑g ⁻¹' Ici c)\ndga : EqOn (↑dg) (Function.const Y (c - a)) (↑g ⁻¹' {a})\ndgmem : ∀ (x : Y), ↑dg x ∈ Icc 0 (c - a)\nhgf : ∀ (x : X), ↑(g + dg) (e x) = ↑f x\ny : Y\n⊢ ∃ x, ↑(g + dg) y ∈ Icc (↑f x) b\n[PROOFSTEP]\nhave hay : a < (g + dg) y := by\n  rcases(hg_mem y).1.eq_or_lt with (rfl | hlt)\n  · refine' (lt_add_iff_pos_right _).2 _\n    calc\n      0 < c - g y := sub_pos.2 hac\n      _ = dg y := (dga rfl).symm\n  · exact hlt.trans_le ((le_add_iff_nonneg_right _).2 <| (dgmem y).1)\n[GOAL]\nX : Type u_1\nY : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : NormalSpace Y\ninst✝ : Nonempty X\nf : X →ᵇ ℝ\ne : X → Y\nhe : ClosedEmbedding e\ninhabited_h : Inhabited X\na : ℝ\nha : IsGLB (range ↑f) a\nb : ℝ\nhb : IsLUB (range ↑f) b\nhmem : ∀ (x : X), ↑f x ∈ Icc a b\nhle : a ≤ b\nhlt : a < b\nc : ℝ := (a + b) / 2\nhac : a < c\nhcb : c < b\nhsub : c - a = b - c\ng : Y →ᵇ ℝ\nhg_mem : ∀ (y : Y), ↑g y ∈ Icc a b\nha' : ¬∃ x, ↑f x = a\nhd : Disjoint (range e ∪ ↑g ⁻¹' Ici c) (↑g ⁻¹' {a})\ndg : Y →ᵇ ℝ\ndg0 : EqOn (↑dg) (Function.const Y 0) (range e ∪ ↑g ⁻¹' Ici c)\ndga : EqOn (↑dg) (Function.const Y (c - a)) (↑g ⁻¹' {a})\ndgmem : ∀ (x : Y), ↑dg x ∈ Icc 0 (c - a)\nhgf : ∀ (x : X), ↑(g + dg) (e x) = ↑f x\ny : Y\n⊢ a < ↑(g + dg) y\n[PROOFSTEP]\nrcases(hg_mem y).1.eq_or_lt with (rfl | hlt)\n[GOAL]\ncase inl\nX : Type u_1\nY : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : NormalSpace Y\ninst✝ : Nonempty X\nf : X →ᵇ ℝ\ne : X → Y\nhe : ClosedEmbedding e\ninhabited_h : Inhabited X\nb : ℝ\nhb : IsLUB (range ↑f) b\ng dg : Y →ᵇ ℝ\nhgf : ∀ (x : X), ↑(g + dg) (e x) = ↑f x\ny : Y\nha : IsGLB (range ↑f) (↑g y)\nhmem : ∀ (x : X), ↑f x ∈ Icc (↑g y) b\nhle : ↑g y ≤ b\nhlt : ↑g y < b\nc : ℝ := (↑g y + b) / 2\nhac : ↑g y < c\nhcb : c < b\nhsub : c - ↑g y = b - c\nhg_mem : ∀ (y_1 : Y), ↑g y_1 ∈ Icc (↑g y) b\nha' : ¬∃ x, ↑f x = ↑g y\nhd : Disjoint (range e ∪ ↑g ⁻¹' Ici c) (↑g ⁻¹' {↑g y})\ndg0 : EqOn (↑dg) (Function.const Y 0) (range e ∪ ↑g ⁻¹' Ici c)\ndga : EqOn (↑dg) (Function.const Y (c - ↑g y)) (↑g ⁻¹' {↑g y})\ndgmem : ∀ (x : Y), ↑dg x ∈ Icc 0 (c - ↑g y)\n⊢ ↑g y < ↑(g + dg) y\n[PROOFSTEP]\nrefine' (lt_add_iff_pos_right _).2 _\n[GOAL]\ncase inl\nX : Type u_1\nY : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : NormalSpace Y\ninst✝ : Nonempty X\nf : X →ᵇ ℝ\ne : X → Y\nhe : ClosedEmbedding e\ninhabited_h : Inhabited X\nb : ℝ\nhb : IsLUB (range ↑f) b\ng dg : Y →ᵇ ℝ\nhgf : ∀ (x : X), ↑(g + dg) (e x) = ↑f x\ny : Y\nha : IsGLB (range ↑f) (↑g y)\nhmem : ∀ (x : X), ↑f x ∈ Icc (↑g y) b\nhle : ↑g y ≤ b\nhlt : ↑g y < b\nc : ℝ := (↑g y + b) / 2\nhac : ↑g y < c\nhcb : c < b\nhsub : c - ↑g y = b - c\nhg_mem : ∀ (y_1 : Y), ↑g y_1 ∈ Icc (↑g y) b\nha' : ¬∃ x, ↑f x = ↑g y\nhd : Disjoint (range e ∪ ↑g ⁻¹' Ici c) (↑g ⁻¹' {↑g y})\ndg0 : EqOn (↑dg) (Function.const Y 0) (range e ∪ ↑g ⁻¹' Ici c)\ndga : EqOn (↑dg) (Function.const Y (c - ↑g y)) (↑g ⁻¹' {↑g y})\ndgmem : ∀ (x : Y), ↑dg x ∈ Icc 0 (c - ↑g y)\n⊢ 0 < ↑dg.toContinuousMap y\n[PROOFSTEP]\ncalc\n  0 < c - g y := sub_pos.2 hac\n  _ = dg y := (dga rfl).symm\n[GOAL]\ncase inr\nX : Type u_1\nY : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : NormalSpace Y\ninst✝ : Nonempty X\nf : X →ᵇ ℝ\ne : X → Y\nhe : ClosedEmbedding e\ninhabited_h : Inhabited X\na : ℝ\nha : IsGLB (range ↑f) a\nb : ℝ\nhb : IsLUB (range ↑f) b\nhmem : ∀ (x : X), ↑f x ∈ Icc a b\nhle : a ≤ b\nhlt✝ : a < b\nc : ℝ := (a + b) / 2\nhac : a < c\nhcb : c < b\nhsub : c - a = b - c\ng : Y →ᵇ ℝ\nhg_mem : ∀ (y : Y), ↑g y ∈ Icc a b\nha' : ¬∃ x, ↑f x = a\nhd : Disjoint (range e ∪ ↑g ⁻¹' Ici c) (↑g ⁻¹' {a})\ndg : Y →ᵇ ℝ\ndg0 : EqOn (↑dg) (Function.const Y 0) (range e ∪ ↑g ⁻¹' Ici c)\ndga : EqOn (↑dg) (Function.const Y (c - a)) (↑g ⁻¹' {a})\ndgmem : ∀ (x : Y), ↑dg x ∈ Icc 0 (c - a)\nhgf : ∀ (x : X), ↑(g + dg) (e x) = ↑f x\ny : Y\nhlt : a < ↑g y\n⊢ a < ↑(g + dg) y\n[PROOFSTEP]\nexact hlt.trans_le ((le_add_iff_nonneg_right _).2 <| (dgmem y).1)\n[GOAL]\ncase intro.intro.inr.intro.intro.intro\nX : Type u_1\nY : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : NormalSpace Y\ninst✝ : Nonempty X\nf : X →ᵇ ℝ\ne : X → Y\nhe : ClosedEmbedding e\ninhabited_h : Inhabited X\na : ℝ\nha : IsGLB (range ↑f) a\nb : ℝ\nhb : IsLUB (range ↑f) b\nhmem : ∀ (x : X), ↑f x ∈ Icc a b\nhle : a ≤ b\nhlt : a < b\nc : ℝ := (a + b) / 2\nhac : a < c\nhcb : c < b\nhsub : c - a = b - c\ng : Y →ᵇ ℝ\nhg_mem : ∀ (y : Y), ↑g y ∈ Icc a b\nha' : ¬∃ x, ↑f x = a\nhd : Disjoint (range e ∪ ↑g ⁻¹' Ici c) (↑g ⁻¹' {a})\ndg : Y →ᵇ ℝ\ndg0 : EqOn (↑dg) (Function.const Y 0) (range e ∪ ↑g ⁻¹' Ici c)\ndga : EqOn (↑dg) (Function.const Y (c - a)) (↑g ⁻¹' {a})\ndgmem : ∀ (x : Y), ↑dg x ∈ Icc 0 (c - a)\nhgf : ∀ (x : X), ↑(g + dg) (e x) = ↑f x\ny : Y\nhay : a < ↑(g + dg) y\n⊢ ∃ x, ↑(g + dg) y ∈ Icc (↑f x) b\n[PROOFSTEP]\nrcases ha.exists_between hay with ⟨_, ⟨x, rfl⟩, _, hxy⟩\n[GOAL]\ncase intro.intro.inr.intro.intro.intro.intro.intro.intro.intro\nX : Type u_1\nY : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : NormalSpace Y\ninst✝ : Nonempty X\nf : X →ᵇ ℝ\ne : X → Y\nhe : ClosedEmbedding e\ninhabited_h : Inhabited X\na : ℝ\nha : IsGLB (range ↑f) a\nb : ℝ\nhb : IsLUB (range ↑f) b\nhmem : ∀ (x : X), ↑f x ∈ Icc a b\nhle : a ≤ b\nhlt : a < b\nc : ℝ := (a + b) / 2\nhac : a < c\nhcb : c < b\nhsub : c - a = b - c\ng : Y →ᵇ ℝ\nhg_mem : ∀ (y : Y), ↑g y ∈ Icc a b\nha' : ¬∃ x, ↑f x = a\nhd : Disjoint (range e ∪ ↑g ⁻¹' Ici c) (↑g ⁻¹' {a})\ndg : Y →ᵇ ℝ\ndg0 : EqOn (↑dg) (Function.const Y 0) (range e ∪ ↑g ⁻¹' Ici c)\ndga : EqOn (↑dg) (Function.const Y (c - a)) (↑g ⁻¹' {a})\ndgmem : ∀ (x : Y), ↑dg x ∈ Icc 0 (c - a)\nhgf : ∀ (x : X), ↑(g + dg) (e x) = ↑f x\ny : Y\nhay : a < ↑(g + dg) y\nx : X\nleft✝ : a ≤ ↑f x\nhxy : ↑f x < ↑(g + dg) y\n⊢ ∃ x, ↑(g + dg) y ∈ Icc (↑f x) b\n[PROOFSTEP]\nrefine' ⟨x, hxy.le, _⟩\n[GOAL]\ncase intro.intro.inr.intro.intro.intro.intro.intro.intro.intro\nX : Type u_1\nY : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : NormalSpace Y\ninst✝ : Nonempty X\nf : X →ᵇ ℝ\ne : X → Y\nhe : ClosedEmbedding e\ninhabited_h : Inhabited X\na : ℝ\nha : IsGLB (range ↑f) a\nb : ℝ\nhb : IsLUB (range ↑f) b\nhmem : ∀ (x : X), ↑f x ∈ Icc a b\nhle : a ≤ b\nhlt : a < b\nc : ℝ := (a + b) / 2\nhac : a < c\nhcb : c < b\nhsub : c - a = b - c\ng : Y →ᵇ ℝ\nhg_mem : ∀ (y : Y), ↑g y ∈ Icc a b\nha' : ¬∃ x, ↑f x = a\nhd : Disjoint (range e ∪ ↑g ⁻¹' Ici c) (↑g ⁻¹' {a})\ndg : Y →ᵇ ℝ\ndg0 : EqOn (↑dg) (Function.const Y 0) (range e ∪ ↑g ⁻¹' Ici c)\ndga : EqOn (↑dg) (Function.const Y (c - a)) (↑g ⁻¹' {a})\ndgmem : ∀ (x : Y), ↑dg x ∈ Icc 0 (c - a)\nhgf : ∀ (x : X), ↑(g + dg) (e x) = ↑f x\ny : Y\nhay : a < ↑(g + dg) y\nx : X\nleft✝ : a ≤ ↑f x\nhxy : ↑f x < ↑(g + dg) y\n⊢ ↑(g + dg) y ≤ b\n[PROOFSTEP]\ncases' le_total c (g y) with hc hc\n[GOAL]\ncase intro.intro.inr.intro.intro.intro.intro.intro.intro.intro.inl\nX : Type u_1\nY : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : NormalSpace Y\ninst✝ : Nonempty X\nf : X →ᵇ ℝ\ne : X → Y\nhe : ClosedEmbedding e\ninhabited_h : Inhabited X\na : ℝ\nha : IsGLB (range ↑f) a\nb : ℝ\nhb : IsLUB (range ↑f) b\nhmem : ∀ (x : X), ↑f x ∈ Icc a b\nhle : a ≤ b\nhlt : a < b\nc : ℝ := (a + b) / 2\nhac : a < c\nhcb : c < b\nhsub : c - a = b - c\ng : Y →ᵇ ℝ\nhg_mem : ∀ (y : Y), ↑g y ∈ Icc a b\nha' : ¬∃ x, ↑f x = a\nhd : Disjoint (range e ∪ ↑g ⁻¹' Ici c) (↑g ⁻¹' {a})\ndg : Y →ᵇ ℝ\ndg0 : EqOn (↑dg) (Function.const Y 0) (range e ∪ ↑g ⁻¹' Ici c)\ndga : EqOn (↑dg) (Function.const Y (c - a)) (↑g ⁻¹' {a})\ndgmem : ∀ (x : Y), ↑dg x ∈ Icc 0 (c - a)\nhgf : ∀ (x : X), ↑(g + dg) (e x) = ↑f x\ny : Y\nhay : a < ↑(g + dg) y\nx : X\nleft✝ : a ≤ ↑f x\nhxy : ↑f x < ↑(g + dg) y\nhc : c ≤ ↑g y\n⊢ ↑(g + dg) y ≤ b\n[PROOFSTEP]\nsimp [dg0 (Or.inr hc), (hg_mem y).2]\n[GOAL]\ncase intro.intro.inr.intro.intro.intro.intro.intro.intro.intro.inr\nX : Type u_1\nY : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : NormalSpace Y\ninst✝ : Nonempty X\nf : X →ᵇ ℝ\ne : X → Y\nhe : ClosedEmbedding e\ninhabited_h : Inhabited X\na : ℝ\nha : IsGLB (range ↑f) a\nb : ℝ\nhb : IsLUB (range ↑f) b\nhmem : ∀ (x : X), ↑f x ∈ Icc a b\nhle : a ≤ b\nhlt : a < b\nc : ℝ := (a + b) / 2\nhac : a < c\nhcb : c < b\nhsub : c - a = b - c\ng : Y →ᵇ ℝ\nhg_mem : ∀ (y : Y), ↑g y ∈ Icc a b\nha' : ¬∃ x, ↑f x = a\nhd : Disjoint (range e ∪ ↑g ⁻¹' Ici c) (↑g ⁻¹' {a})\ndg : Y →ᵇ ℝ\ndg0 : EqOn (↑dg) (Function.const Y 0) (range e ∪ ↑g ⁻¹' Ici c)\ndga : EqOn (↑dg) (Function.const Y (c - a)) (↑g ⁻¹' {a})\ndgmem : ∀ (x : Y), ↑dg x ∈ Icc 0 (c - a)\nhgf : ∀ (x : X), ↑(g + dg) (e x) = ↑f x\ny : Y\nhay : a < ↑(g + dg) y\nx : X\nleft✝ : a ≤ ↑f x\nhxy : ↑f x < ↑(g + dg) y\nhc : ↑g y ≤ c\n⊢ ↑(g + dg) y ≤ b\n[PROOFSTEP]\ncalc\n  g y + dg y ≤ c + (c - a) := add_le_add hc (dgmem _).2\n  _ = b := by\n    rw [hsub, add_sub_cancel'_right]\n      /- Now we deal with the case `∀ x, f x ≠ b`. The proof is the same as in the first case, with\n          minor modifications that make it hard to deduplicate code. -/\n[GOAL]\nX : Type u_1\nY : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : NormalSpace Y\ninst✝ : Nonempty X\nf : X →ᵇ ℝ\ne : X → Y\nhe : ClosedEmbedding e\ninhabited_h : Inhabited X\na : ℝ\nha : IsGLB (range ↑f) a\nb : ℝ\nhb : IsLUB (range ↑f) b\nhmem : ∀ (x : X), ↑f x ∈ Icc a b\nhle : a ≤ b\nhlt : a < b\nc : ℝ := (a + b) / 2\nhac : a < c\nhcb : c < b\nhsub : c - a = b - c\ng : Y →ᵇ ℝ\nhg_mem : ∀ (y : Y), ↑g y ∈ Icc a b\nha' : ¬∃ x, ↑f x = a\nhd : Disjoint (range e ∪ ↑g ⁻¹' Ici c) (↑g ⁻¹' {a})\ndg : Y →ᵇ ℝ\ndg0 : EqOn (↑dg) (Function.const Y 0) (range e ∪ ↑g ⁻¹' Ici c)\ndga : EqOn (↑dg) (Function.const Y (c - a)) (↑g ⁻¹' {a})\ndgmem : ∀ (x : Y), ↑dg x ∈ Icc 0 (c - a)\nhgf : ∀ (x : X), ↑(g + dg) (e x) = ↑f x\ny : Y\nhay : a < ↑(g + dg) y\nx : X\nleft✝ : a ≤ ↑f x\nhxy : ↑f x < ↑(g + dg) y\nhc : ↑g y ≤ c\n⊢ c + (c - a) = b\n[PROOFSTEP]\nrw [hsub, add_sub_cancel'_right]\n  /- Now we deal with the case `∀ x, f x ≠ b`. The proof is the same as in the first case, with\n      minor modifications that make it hard to deduplicate code. -/\n[GOAL]\ncase intro.intro.inr.intro.intro\nX : Type u_1\nY : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : NormalSpace Y\ninst✝ : Nonempty X\nf : X →ᵇ ℝ\ne : X → Y\nhe : ClosedEmbedding e\ninhabited_h : Inhabited X\na : ℝ\nha : IsGLB (range ↑f) a\nb : ℝ\nhb : IsLUB (range ↑f) b\nhmem : ∀ (x : X), ↑f x ∈ Icc a b\nhle : a ≤ b\nhlt : a < b\nc : ℝ := (a + b) / 2\nhac : a < c\nhcb : c < b\nhsub : c - a = b - c\ng : Y →ᵇ ℝ\nhg_mem : ∀ (y : Y), ∃ x, ↑g y ∈ Icc (↑f x) b\nhgf : ↑g ∘ e = ↑f\n⊢ ∃ g, (∀ (y : Y), ∃ x₁ x₂, ↑g y ∈ Icc (↑f x₁) (↑f x₂)) ∧ ↑g ∘ e = ↑f\n[PROOFSTEP]\nchoose xl hxl hgb using hg_mem\n[GOAL]\ncase intro.intro.inr.intro.intro\nX : Type u_1\nY : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : NormalSpace Y\ninst✝ : Nonempty X\nf : X →ᵇ ℝ\ne : X → Y\nhe : ClosedEmbedding e\ninhabited_h : Inhabited X\na : ℝ\nha : IsGLB (range ↑f) a\nb : ℝ\nhb : IsLUB (range ↑f) b\nhmem : ∀ (x : X), ↑f x ∈ Icc a b\nhle : a ≤ b\nhlt : a < b\nc : ℝ := (a + b) / 2\nhac : a < c\nhcb : c < b\nhsub : c - a = b - c\ng : Y →ᵇ ℝ\nhgf : ↑g ∘ e = ↑f\nxl : Y → X\nhxl : ∀ (y : Y), ↑f (xl y) ≤ ↑g y\nhgb : ∀ (y : Y), ↑g y ≤ b\n⊢ ∃ g, (∀ (y : Y), ∃ x₁ x₂, ↑g y ∈ Icc (↑f x₁) (↑f x₂)) ∧ ↑g ∘ e = ↑f\n[PROOFSTEP]\nrcases em (∃ x, f x = b) with (⟨x, rfl⟩ | hb')\n[GOAL]\ncase intro.intro.inr.intro.intro.inl.intro\nX : Type u_1\nY : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : NormalSpace Y\ninst✝ : Nonempty X\nf : X →ᵇ ℝ\ne : X → Y\nhe : ClosedEmbedding e\ninhabited_h : Inhabited X\na : ℝ\nha : IsGLB (range ↑f) a\ng : Y →ᵇ ℝ\nhgf : ↑g ∘ e = ↑f\nxl : Y → X\nhxl : ∀ (y : Y), ↑f (xl y) ≤ ↑g y\nx : X\nhb : IsLUB (range ↑f) (↑f x)\nhmem : ∀ (x_1 : X), ↑f x_1 ∈ Icc a (↑f x)\nhle : a ≤ ↑f x\nhlt : a < ↑f x\nc : ℝ := (a + ↑f x) / 2\nhac : a < c\nhcb : c < ↑f x\nhsub : c - a = ↑f x - c\nhgb : ∀ (y : Y), ↑g y ≤ ↑f x\n⊢ ∃ g, (∀ (y : Y), ∃ x₁ x₂, ↑g y ∈ Icc (↑f x₁) (↑f x₂)) ∧ ↑g ∘ e = ↑f\n[PROOFSTEP]\nexact ⟨g, fun y => ⟨xl y, x, hxl y, hgb y⟩, hgf⟩\n[GOAL]\ncase intro.intro.inr.intro.intro.inr\nX : Type u_1\nY : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : NormalSpace Y\ninst✝ : Nonempty X\nf : X →ᵇ ℝ\ne : X → Y\nhe : ClosedEmbedding e\ninhabited_h : Inhabited X\na : ℝ\nha : IsGLB (range ↑f) a\nb : ℝ\nhb : IsLUB (range ↑f) b\nhmem : ∀ (x : X), ↑f x ∈ Icc a b\nhle : a ≤ b\nhlt : a < b\nc : ℝ := (a + b) / 2\nhac : a < c\nhcb : c < b\nhsub : c - a = b - c\ng : Y →ᵇ ℝ\nhgf : ↑g ∘ e = ↑f\nxl : Y → X\nhxl : ∀ (y : Y), ↑f (xl y) ≤ ↑g y\nhgb : ∀ (y : Y), ↑g y ≤ b\nhb' : ¬∃ x, ↑f x = b\n⊢ ∃ g, (∀ (y : Y), ∃ x₁ x₂, ↑g y ∈ Icc (↑f x₁) (↑f x₂)) ∧ ↑g ∘ e = ↑f\n[PROOFSTEP]\nhave hd : Disjoint (range e ∪ g ⁻¹' Iic c) (g ⁻¹' { b }) :=\n  by\n  refine' disjoint_union_left.2 ⟨_, Disjoint.preimage _ _⟩\n  · rw [Set.disjoint_left]\n    rintro _ ⟨x, rfl⟩ (rfl : g (e x) = b)\n    exact hb' ⟨x, (congr_fun hgf x).symm⟩\n  · exact Set.disjoint_singleton_right.2 hcb.not_le\n[GOAL]\nX : Type u_1\nY : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : NormalSpace Y\ninst✝ : Nonempty X\nf : X →ᵇ ℝ\ne : X → Y\nhe : ClosedEmbedding e\ninhabited_h : Inhabited X\na : ℝ\nha : IsGLB (range ↑f) a\nb : ℝ\nhb : IsLUB (range ↑f) b\nhmem : ∀ (x : X), ↑f x ∈ Icc a b\nhle : a ≤ b\nhlt : a < b\nc : ℝ := (a + b) / 2\nhac : a < c\nhcb : c < b\nhsub : c - a = b - c\ng : Y →ᵇ ℝ\nhgf : ↑g ∘ e = ↑f\nxl : Y → X\nhxl : ∀ (y : Y), ↑f (xl y) ≤ ↑g y\nhgb : ∀ (y : Y), ↑g y ≤ b\nhb' : ¬∃ x, ↑f x = b\n⊢ Disjoint (range e ∪ ↑g ⁻¹' Iic c) (↑g ⁻¹' {b})\n[PROOFSTEP]\nrefine' disjoint_union_left.2 ⟨_, Disjoint.preimage _ _⟩\n[GOAL]\ncase refine'_1\nX : Type u_1\nY : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : NormalSpace Y\ninst✝ : Nonempty X\nf : X →ᵇ ℝ\ne : X → Y\nhe : ClosedEmbedding e\ninhabited_h : Inhabited X\na : ℝ\nha : IsGLB (range ↑f) a\nb : ℝ\nhb : IsLUB (range ↑f) b\nhmem : ∀ (x : X), ↑f x ∈ Icc a b\nhle : a ≤ b\nhlt : a < b\nc : ℝ := (a + b) / 2\nhac : a < c\nhcb : c < b\nhsub : c - a = b - c\ng : Y →ᵇ ℝ\nhgf : ↑g ∘ e = ↑f\nxl : Y → X\nhxl : ∀ (y : Y), ↑f (xl y) ≤ ↑g y\nhgb : ∀ (y : Y), ↑g y ≤ b\nhb' : ¬∃ x, ↑f x = b\n⊢ Disjoint (range e) (↑g ⁻¹' {b})\n[PROOFSTEP]\nrw [Set.disjoint_left]\n[GOAL]\ncase refine'_1\nX : Type u_1\nY : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : NormalSpace Y\ninst✝ : Nonempty X\nf : X →ᵇ ℝ\ne : X → Y\nhe : ClosedEmbedding e\ninhabited_h : Inhabited X\na : ℝ\nha : IsGLB (range ↑f) a\nb : ℝ\nhb : IsLUB (range ↑f) b\nhmem : ∀ (x : X), ↑f x ∈ Icc a b\nhle : a ≤ b\nhlt : a < b\nc : ℝ := (a + b) / 2\nhac : a < c\nhcb : c < b\nhsub : c - a = b - c\ng : Y →ᵇ ℝ\nhgf : ↑g ∘ e = ↑f\nxl : Y → X\nhxl : ∀ (y : Y), ↑f (xl y) ≤ ↑g y\nhgb : ∀ (y : Y), ↑g y ≤ b\nhb' : ¬∃ x, ↑f x = b\n⊢ ∀ ⦃a : Y⦄, a ∈ range e → ¬a ∈ ↑g ⁻¹' {b}\n[PROOFSTEP]\nrintro _ ⟨x, rfl⟩ (rfl : g (e x) = b)\n[GOAL]\ncase refine'_1.intro\nX : Type u_1\nY : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : NormalSpace Y\ninst✝ : Nonempty X\nf : X →ᵇ ℝ\ne : X → Y\nhe : ClosedEmbedding e\ninhabited_h : Inhabited X\na : ℝ\nha : IsGLB (range ↑f) a\ng : Y →ᵇ ℝ\nhgf : ↑g ∘ e = ↑f\nxl : Y → X\nhxl : ∀ (y : Y), ↑f (xl y) ≤ ↑g y\nx : X\nhb : IsLUB (range ↑f) (↑g (e x))\nhmem : ∀ (x_1 : X), ↑f x_1 ∈ Icc a (↑g (e x))\nhle : a ≤ ↑g (e x)\nhlt : a < ↑g (e x)\nc : ℝ := (a + ↑g (e x)) / 2\nhac : a < c\nhcb : c < ↑g (e x)\nhsub : c - a = ↑g (e x) - c\nhgb : ∀ (y : Y), ↑g y ≤ ↑g (e x)\nhb' : ¬∃ x_1, ↑f x_1 = ↑g (e x)\n⊢ False\n[PROOFSTEP]\nexact hb' ⟨x, (congr_fun hgf x).symm⟩\n[GOAL]\ncase refine'_2\nX : Type u_1\nY : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : NormalSpace Y\ninst✝ : Nonempty X\nf : X →ᵇ ℝ\ne : X → Y\nhe : ClosedEmbedding e\ninhabited_h : Inhabited X\na : ℝ\nha : IsGLB (range ↑f) a\nb : ℝ\nhb : IsLUB (range ↑f) b\nhmem : ∀ (x : X), ↑f x ∈ Icc a b\nhle : a ≤ b\nhlt : a < b\nc : ℝ := (a + b) / 2\nhac : a < c\nhcb : c < b\nhsub : c - a = b - c\ng : Y →ᵇ ℝ\nhgf : ↑g ∘ e = ↑f\nxl : Y → X\nhxl : ∀ (y : Y), ↑f (xl y) ≤ ↑g y\nhgb : ∀ (y : Y), ↑g y ≤ b\nhb' : ¬∃ x, ↑f x = b\n⊢ Disjoint (Iic c) {b}\n[PROOFSTEP]\nexact Set.disjoint_singleton_right.2 hcb.not_le\n[GOAL]\ncase intro.intro.inr.intro.intro.inr\nX : Type u_1\nY : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : NormalSpace Y\ninst✝ : Nonempty X\nf : X →ᵇ ℝ\ne : X → Y\nhe : ClosedEmbedding e\ninhabited_h : Inhabited X\na : ℝ\nha : IsGLB (range ↑f) a\nb : ℝ\nhb : IsLUB (range ↑f) b\nhmem : ∀ (x : X), ↑f x ∈ Icc a b\nhle : a ≤ b\nhlt : a < b\nc : ℝ := (a + b) / 2\nhac : a < c\nhcb : c < b\nhsub : c - a = b - c\ng : Y →ᵇ ℝ\nhgf : ↑g ∘ e = ↑f\nxl : Y → X\nhxl : ∀ (y : Y), ↑f (xl y) ≤ ↑g y\nhgb : ∀ (y : Y), ↑g y ≤ b\nhb' : ¬∃ x, ↑f x = b\nhd : Disjoint (range e ∪ ↑g ⁻¹' Iic c) (↑g ⁻¹' {b})\n⊢ ∃ g, (∀ (y : Y), ∃ x₁ x₂, ↑g y ∈ Icc (↑f x₁) (↑f x₂)) ∧ ↑g ∘ e = ↑f\n[PROOFSTEP]\nrcases exists_bounded_mem_Icc_of_closed_of_le (he.closed_range.union <| isClosed_Iic.preimage g.continuous)\n    (isClosed_singleton.preimage g.continuous) hd (sub_nonneg.2 hcb.le) with\n  ⟨dg, dg0, dgb, dgmem⟩\n[GOAL]\ncase intro.intro.inr.intro.intro.inr.intro.intro.intro\nX : Type u_1\nY : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : NormalSpace Y\ninst✝ : Nonempty X\nf : X →ᵇ ℝ\ne : X → Y\nhe : ClosedEmbedding e\ninhabited_h : Inhabited X\na : ℝ\nha : IsGLB (range ↑f) a\nb : ℝ\nhb : IsLUB (range ↑f) b\nhmem : ∀ (x : X), ↑f x ∈ Icc a b\nhle : a ≤ b\nhlt : a < b\nc : ℝ := (a + b) / 2\nhac : a < c\nhcb : c < b\nhsub : c - a = b - c\ng : Y →ᵇ ℝ\nhgf : ↑g ∘ e = ↑f\nxl : Y → X\nhxl : ∀ (y : Y), ↑f (xl y) ≤ ↑g y\nhgb : ∀ (y : Y), ↑g y ≤ b\nhb' : ¬∃ x, ↑f x = b\nhd : Disjoint (range e ∪ ↑g ⁻¹' Iic c) (↑g ⁻¹' {b})\ndg : Y →ᵇ ℝ\ndg0 : EqOn (↑dg) (Function.const Y 0) (range e ∪ ↑g ⁻¹' Iic c)\ndgb : EqOn (↑dg) (Function.const Y (b - c)) (↑g ⁻¹' {b})\ndgmem : ∀ (x : Y), ↑dg x ∈ Icc 0 (b - c)\n⊢ ∃ g, (∀ (y : Y), ∃ x₁ x₂, ↑g y ∈ Icc (↑f x₁) (↑f x₂)) ∧ ↑g ∘ e = ↑f\n[PROOFSTEP]\nreplace hgf : ∀ x, (g - dg) (e x) = f x\n[GOAL]\ncase hgf\nX : Type u_1\nY : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : NormalSpace Y\ninst✝ : Nonempty X\nf : X →ᵇ ℝ\ne : X → Y\nhe : ClosedEmbedding e\ninhabited_h : Inhabited X\na : ℝ\nha : IsGLB (range ↑f) a\nb : ℝ\nhb : IsLUB (range ↑f) b\nhmem : ∀ (x : X), ↑f x ∈ Icc a b\nhle : a ≤ b\nhlt : a < b\nc : ℝ := (a + b) / 2\nhac : a < c\nhcb : c < b\nhsub : c - a = b - c\ng : Y →ᵇ ℝ\nhgf : ↑g ∘ e = ↑f\nxl : Y → X\nhxl : ∀ (y : Y), ↑f (xl y) ≤ ↑g y\nhgb : ∀ (y : Y), ↑g y ≤ b\nhb' : ¬∃ x, ↑f x = b\nhd : Disjoint (range e ∪ ↑g ⁻¹' Iic c) (↑g ⁻¹' {b})\ndg : Y →ᵇ ℝ\ndg0 : EqOn (↑dg) (Function.const Y 0) (range e ∪ ↑g ⁻¹' Iic c)\ndgb : EqOn (↑dg) (Function.const Y (b - c)) (↑g ⁻¹' {b})\ndgmem : ∀ (x : Y), ↑dg x ∈ Icc 0 (b - c)\n⊢ ∀ (x : X), ↑(g - dg) (e x) = ↑f x\n[PROOFSTEP]\nintro x\n[GOAL]\ncase hgf\nX : Type u_1\nY : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : NormalSpace Y\ninst✝ : Nonempty X\nf : X →ᵇ ℝ\ne : X → Y\nhe : ClosedEmbedding e\ninhabited_h : Inhabited X\na : ℝ\nha : IsGLB (range ↑f) a\nb : ℝ\nhb : IsLUB (range ↑f) b\nhmem : ∀ (x : X), ↑f x ∈ Icc a b\nhle : a ≤ b\nhlt : a < b\nc : ℝ := (a + b) / 2\nhac : a < c\nhcb : c < b\nhsub : c - a = b - c\ng : Y →ᵇ ℝ\nhgf : ↑g ∘ e = ↑f\nxl : Y → X\nhxl : ∀ (y : Y), ↑f (xl y) ≤ ↑g y\nhgb : ∀ (y : Y), ↑g y ≤ b\nhb' : ¬∃ x, ↑f x = b\nhd : Disjoint (range e ∪ ↑g ⁻¹' Iic c) (↑g ⁻¹' {b})\ndg : Y →ᵇ ℝ\ndg0 : EqOn (↑dg) (Function.const Y 0) (range e ∪ ↑g ⁻¹' Iic c)\ndgb : EqOn (↑dg) (Function.const Y (b - c)) (↑g ⁻¹' {b})\ndgmem : ∀ (x : Y), ↑dg x ∈ Icc 0 (b - c)\nx : X\n⊢ ↑(g - dg) (e x) = ↑f x\n[PROOFSTEP]\nsimp [dg0 (Or.inl <| mem_range_self _), ← hgf]\n[GOAL]\ncase intro.intro.inr.intro.intro.inr.intro.intro.intro\nX : Type u_1\nY : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : NormalSpace Y\ninst✝ : Nonempty X\nf : X →ᵇ ℝ\ne : X → Y\nhe : ClosedEmbedding e\ninhabited_h : Inhabited X\na : ℝ\nha : IsGLB (range ↑f) a\nb : ℝ\nhb : IsLUB (range ↑f) b\nhmem : ∀ (x : X), ↑f x ∈ Icc a b\nhle : a ≤ b\nhlt : a < b\nc : ℝ := (a + b) / 2\nhac : a < c\nhcb : c < b\nhsub : c - a = b - c\ng : Y →ᵇ ℝ\nxl : Y → X\nhxl : ∀ (y : Y), ↑f (xl y) ≤ ↑g y\nhgb : ∀ (y : Y), ↑g y ≤ b\nhb' : ¬∃ x, ↑f x = b\nhd : Disjoint (range e ∪ ↑g ⁻¹' Iic c) (↑g ⁻¹' {b})\ndg : Y →ᵇ ℝ\ndg0 : EqOn (↑dg) (Function.const Y 0) (range e ∪ ↑g ⁻¹' Iic c)\ndgb : EqOn (↑dg) (Function.const Y (b - c)) (↑g ⁻¹' {b})\ndgmem : ∀ (x : Y), ↑dg x ∈ Icc 0 (b - c)\nhgf : ∀ (x : X), ↑(g - dg) (e x) = ↑f x\n⊢ ∃ g, (∀ (y : Y), ∃ x₁ x₂, ↑g y ∈ Icc (↑f x₁) (↑f x₂)) ∧ ↑g ∘ e = ↑f\n[PROOFSTEP]\nrefine' ⟨g - dg, fun y => _, funext hgf⟩\n[GOAL]\ncase intro.intro.inr.intro.intro.inr.intro.intro.intro\nX : Type u_1\nY : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : NormalSpace Y\ninst✝ : Nonempty X\nf : X →ᵇ ℝ\ne : X → Y\nhe : ClosedEmbedding e\ninhabited_h : Inhabited X\na : ℝ\nha : IsGLB (range ↑f) a\nb : ℝ\nhb : IsLUB (range ↑f) b\nhmem : ∀ (x : X), ↑f x ∈ Icc a b\nhle : a ≤ b\nhlt : a < b\nc : ℝ := (a + b) / 2\nhac : a < c\nhcb : c < b\nhsub : c - a = b - c\ng : Y →ᵇ ℝ\nxl : Y → X\nhxl : ∀ (y : Y), ↑f (xl y) ≤ ↑g y\nhgb : ∀ (y : Y), ↑g y ≤ b\nhb' : ¬∃ x, ↑f x = b\nhd : Disjoint (range e ∪ ↑g ⁻¹' Iic c) (↑g ⁻¹' {b})\ndg : Y →ᵇ ℝ\ndg0 : EqOn (↑dg) (Function.const Y 0) (range e ∪ ↑g ⁻¹' Iic c)\ndgb : EqOn (↑dg) (Function.const Y (b - c)) (↑g ⁻¹' {b})\ndgmem : ∀ (x : Y), ↑dg x ∈ Icc 0 (b - c)\nhgf : ∀ (x : X), ↑(g - dg) (e x) = ↑f x\ny : Y\n⊢ ∃ x₁ x₂, ↑(g - dg) y ∈ Icc (↑f x₁) (↑f x₂)\n[PROOFSTEP]\nhave hyb : (g - dg) y < b := by\n  rcases(hgb y).eq_or_lt with (rfl | hlt)\n  · refine' (sub_lt_self_iff _).2 _\n    calc\n      0 < g y - c := sub_pos.2 hcb\n      _ = dg y := (dgb rfl).symm\n  · exact ((sub_le_self_iff _).2 (dgmem _).1).trans_lt hlt\n[GOAL]\nX : Type u_1\nY : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : NormalSpace Y\ninst✝ : Nonempty X\nf : X →ᵇ ℝ\ne : X → Y\nhe : ClosedEmbedding e\ninhabited_h : Inhabited X\na : ℝ\nha : IsGLB (range ↑f) a\nb : ℝ\nhb : IsLUB (range ↑f) b\nhmem : ∀ (x : X), ↑f x ∈ Icc a b\nhle : a ≤ b\nhlt : a < b\nc : ℝ := (a + b) / 2\nhac : a < c\nhcb : c < b\nhsub : c - a = b - c\ng : Y →ᵇ ℝ\nxl : Y → X\nhxl : ∀ (y : Y), ↑f (xl y) ≤ ↑g y\nhgb : ∀ (y : Y), ↑g y ≤ b\nhb' : ¬∃ x, ↑f x = b\nhd : Disjoint (range e ∪ ↑g ⁻¹' Iic c) (↑g ⁻¹' {b})\ndg : Y →ᵇ ℝ\ndg0 : EqOn (↑dg) (Function.const Y 0) (range e ∪ ↑g ⁻¹' Iic c)\ndgb : EqOn (↑dg) (Function.const Y (b - c)) (↑g ⁻¹' {b})\ndgmem : ∀ (x : Y), ↑dg x ∈ Icc 0 (b - c)\nhgf : ∀ (x : X), ↑(g - dg) (e x) = ↑f x\ny : Y\n⊢ ↑(g - dg) y < b\n[PROOFSTEP]\nrcases(hgb y).eq_or_lt with (rfl | hlt)\n[GOAL]\ncase inl\nX : Type u_1\nY : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : NormalSpace Y\ninst✝ : Nonempty X\nf : X →ᵇ ℝ\ne : X → Y\nhe : ClosedEmbedding e\ninhabited_h : Inhabited X\na : ℝ\nha : IsGLB (range ↑f) a\ng : Y →ᵇ ℝ\nxl : Y → X\nhxl : ∀ (y : Y), ↑f (xl y) ≤ ↑g y\ndg : Y →ᵇ ℝ\nhgf : ∀ (x : X), ↑(g - dg) (e x) = ↑f x\ny : Y\nhb : IsLUB (range ↑f) (↑g y)\nhmem : ∀ (x : X), ↑f x ∈ Icc a (↑g y)\nhle : a ≤ ↑g y\nhlt : a < ↑g y\nc : ℝ := (a + ↑g y) / 2\nhac : a < c\nhcb : c < ↑g y\nhsub : c - a = ↑g y - c\nhgb : ∀ (y_1 : Y), ↑g y_1 ≤ ↑g y\nhb' : ¬∃ x, ↑f x = ↑g y\nhd : Disjoint (range e ∪ ↑g ⁻¹' Iic c) (↑g ⁻¹' {↑g y})\ndg0 : EqOn (↑dg) (Function.const Y 0) (range e ∪ ↑g ⁻¹' Iic c)\ndgb : EqOn (↑dg) (Function.const Y (↑g y - c)) (↑g ⁻¹' {↑g y})\ndgmem : ∀ (x : Y), ↑dg x ∈ Icc 0 (↑g y - c)\n⊢ ↑(g - dg) y < ↑g y\n[PROOFSTEP]\nrefine' (sub_lt_self_iff _).2 _\n[GOAL]\ncase inl\nX : Type u_1\nY : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : NormalSpace Y\ninst✝ : Nonempty X\nf : X →ᵇ ℝ\ne : X → Y\nhe : ClosedEmbedding e\ninhabited_h : Inhabited X\na : ℝ\nha : IsGLB (range ↑f) a\ng : Y →ᵇ ℝ\nxl : Y → X\nhxl : ∀ (y : Y), ↑f (xl y) ≤ ↑g y\ndg : Y →ᵇ ℝ\nhgf : ∀ (x : X), ↑(g - dg) (e x) = ↑f x\ny : Y\nhb : IsLUB (range ↑f) (↑g y)\nhmem : ∀ (x : X), ↑f x ∈ Icc a (↑g y)\nhle : a ≤ ↑g y\nhlt : a < ↑g y\nc : ℝ := (a + ↑g y) / 2\nhac : a < c\nhcb : c < ↑g y\nhsub : c - a = ↑g y - c\nhgb : ∀ (y_1 : Y), ↑g y_1 ≤ ↑g y\nhb' : ¬∃ x, ↑f x = ↑g y\nhd : Disjoint (range e ∪ ↑g ⁻¹' Iic c) (↑g ⁻¹' {↑g y})\ndg0 : EqOn (↑dg) (Function.const Y 0) (range e ∪ ↑g ⁻¹' Iic c)\ndgb : EqOn (↑dg) (Function.const Y (↑g y - c)) (↑g ⁻¹' {↑g y})\ndgmem : ∀ (x : Y), ↑dg x ∈ Icc 0 (↑g y - c)\n⊢ 0 < ↑dg y\n[PROOFSTEP]\ncalc\n  0 < g y - c := sub_pos.2 hcb\n  _ = dg y := (dgb rfl).symm\n[GOAL]\ncase inr\nX : Type u_1\nY : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : NormalSpace Y\ninst✝ : Nonempty X\nf : X →ᵇ ℝ\ne : X → Y\nhe : ClosedEmbedding e\ninhabited_h : Inhabited X\na : ℝ\nha : IsGLB (range ↑f) a\nb : ℝ\nhb : IsLUB (range ↑f) b\nhmem : ∀ (x : X), ↑f x ∈ Icc a b\nhle : a ≤ b\nhlt✝ : a < b\nc : ℝ := (a + b) / 2\nhac : a < c\nhcb : c < b\nhsub : c - a = b - c\ng : Y →ᵇ ℝ\nxl : Y → X\nhxl : ∀ (y : Y), ↑f (xl y) ≤ ↑g y\nhgb : ∀ (y : Y), ↑g y ≤ b\nhb' : ¬∃ x, ↑f x = b\nhd : Disjoint (range e ∪ ↑g ⁻¹' Iic c) (↑g ⁻¹' {b})\ndg : Y →ᵇ ℝ\ndg0 : EqOn (↑dg) (Function.const Y 0) (range e ∪ ↑g ⁻¹' Iic c)\ndgb : EqOn (↑dg) (Function.const Y (b - c)) (↑g ⁻¹' {b})\ndgmem : ∀ (x : Y), ↑dg x ∈ Icc 0 (b - c)\nhgf : ∀ (x : X), ↑(g - dg) (e x) = ↑f x\ny : Y\nhlt : ↑g y < b\n⊢ ↑(g - dg) y < b\n[PROOFSTEP]\nexact ((sub_le_self_iff _).2 (dgmem _).1).trans_lt hlt\n[GOAL]\ncase intro.intro.inr.intro.intro.inr.intro.intro.intro\nX : Type u_1\nY : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : NormalSpace Y\ninst✝ : Nonempty X\nf : X →ᵇ ℝ\ne : X → Y\nhe : ClosedEmbedding e\ninhabited_h : Inhabited X\na : ℝ\nha : IsGLB (range ↑f) a\nb : ℝ\nhb : IsLUB (range ↑f) b\nhmem : ∀ (x : X), ↑f x ∈ Icc a b\nhle : a ≤ b\nhlt : a < b\nc : ℝ := (a + b) / 2\nhac : a < c\nhcb : c < b\nhsub : c - a = b - c\ng : Y →ᵇ ℝ\nxl : Y → X\nhxl : ∀ (y : Y), ↑f (xl y) ≤ ↑g y\nhgb : ∀ (y : Y), ↑g y ≤ b\nhb' : ¬∃ x, ↑f x = b\nhd : Disjoint (range e ∪ ↑g ⁻¹' Iic c) (↑g ⁻¹' {b})\ndg : Y →ᵇ ℝ\ndg0 : EqOn (↑dg) (Function.const Y 0) (range e ∪ ↑g ⁻¹' Iic c)\ndgb : EqOn (↑dg) (Function.const Y (b - c)) (↑g ⁻¹' {b})\ndgmem : ∀ (x : Y), ↑dg x ∈ Icc 0 (b - c)\nhgf : ∀ (x : X), ↑(g - dg) (e x) = ↑f x\ny : Y\nhyb : ↑(g - dg) y < b\n⊢ ∃ x₁ x₂, ↑(g - dg) y ∈ Icc (↑f x₁) (↑f x₂)\n[PROOFSTEP]\nrcases hb.exists_between hyb with ⟨_, ⟨xu, rfl⟩, hyxu, _⟩\n[GOAL]\ncase intro.intro.inr.intro.intro.inr.intro.intro.intro.intro.intro.intro.intro\nX : Type u_1\nY : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : NormalSpace Y\ninst✝ : Nonempty X\nf : X →ᵇ ℝ\ne : X → Y\nhe : ClosedEmbedding e\ninhabited_h : Inhabited X\na : ℝ\nha : IsGLB (range ↑f) a\nb : ℝ\nhb : IsLUB (range ↑f) b\nhmem : ∀ (x : X), ↑f x ∈ Icc a b\nhle : a ≤ b\nhlt : a < b\nc : ℝ := (a + b) / 2\nhac : a < c\nhcb : c < b\nhsub : c - a = b - c\ng : Y →ᵇ ℝ\nxl : Y → X\nhxl : ∀ (y : Y), ↑f (xl y) ≤ ↑g y\nhgb : ∀ (y : Y), ↑g y ≤ b\nhb' : ¬∃ x, ↑f x = b\nhd : Disjoint (range e ∪ ↑g ⁻¹' Iic c) (↑g ⁻¹' {b})\ndg : Y →ᵇ ℝ\ndg0 : EqOn (↑dg) (Function.const Y 0) (range e ∪ ↑g ⁻¹' Iic c)\ndgb : EqOn (↑dg) (Function.const Y (b - c)) (↑g ⁻¹' {b})\ndgmem : ∀ (x : Y), ↑dg x ∈ Icc 0 (b - c)\nhgf : ∀ (x : X), ↑(g - dg) (e x) = ↑f x\ny : Y\nhyb : ↑(g - dg) y < b\nxu : X\nhyxu : ↑(g - dg) y < ↑f xu\nright✝ : ↑f xu ≤ b\n⊢ ∃ x₁ x₂, ↑(g - dg) y ∈ Icc (↑f x₁) (↑f x₂)\n[PROOFSTEP]\ncases' lt_or_le c (g y) with hc hc\n[GOAL]\ncase intro.intro.inr.intro.intro.inr.intro.intro.intro.intro.intro.intro.intro.inl\nX : Type u_1\nY : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : NormalSpace Y\ninst✝ : Nonempty X\nf : X →ᵇ ℝ\ne : X → Y\nhe : ClosedEmbedding e\ninhabited_h : Inhabited X\na : ℝ\nha : IsGLB (range ↑f) a\nb : ℝ\nhb : IsLUB (range ↑f) b\nhmem : ∀ (x : X), ↑f x ∈ Icc a b\nhle : a ≤ b\nhlt : a < b\nc : ℝ := (a + b) / 2\nhac : a < c\nhcb : c < b\nhsub : c - a = b - c\ng : Y →ᵇ ℝ\nxl : Y → X\nhxl : ∀ (y : Y), ↑f (xl y) ≤ ↑g y\nhgb : ∀ (y : Y), ↑g y ≤ b\nhb' : ¬∃ x, ↑f x = b\nhd : Disjoint (range e ∪ ↑g ⁻¹' Iic c) (↑g ⁻¹' {b})\ndg : Y →ᵇ ℝ\ndg0 : EqOn (↑dg) (Function.const Y 0) (range e ∪ ↑g ⁻¹' Iic c)\ndgb : EqOn (↑dg) (Function.const Y (b - c)) (↑g ⁻¹' {b})\ndgmem : ∀ (x : Y), ↑dg x ∈ Icc 0 (b - c)\nhgf : ∀ (x : X), ↑(g - dg) (e x) = ↑f x\ny : Y\nhyb : ↑(g - dg) y < b\nxu : X\nhyxu : ↑(g - dg) y < ↑f xu\nright✝ : ↑f xu ≤ b\nhc : c < ↑g y\n⊢ ∃ x₁ x₂, ↑(g - dg) y ∈ Icc (↑f x₁) (↑f x₂)\n[PROOFSTEP]\nrcases em (a ∈ range f) with (⟨x, rfl⟩ | _)\n[GOAL]\ncase intro.intro.inr.intro.intro.inr.intro.intro.intro.intro.intro.intro.intro.inl.inl.intro\nX : Type u_1\nY : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : NormalSpace Y\ninst✝ : Nonempty X\nf : X →ᵇ ℝ\ne : X → Y\nhe : ClosedEmbedding e\ninhabited_h : Inhabited X\nb : ℝ\nhb : IsLUB (range ↑f) b\ng : Y →ᵇ ℝ\nxl : Y → X\nhxl : ∀ (y : Y), ↑f (xl y) ≤ ↑g y\nhgb : ∀ (y : Y), ↑g y ≤ b\nhb' : ¬∃ x, ↑f x = b\ndg : Y →ᵇ ℝ\nhgf : ∀ (x : X), ↑(g - dg) (e x) = ↑f x\ny : Y\nhyb : ↑(g - dg) y < b\nxu : X\nhyxu : ↑(g - dg) y < ↑f xu\nright✝ : ↑f xu ≤ b\nx : X\nha : IsGLB (range ↑f) (↑f x)\nhmem : ∀ (x_1 : X), ↑f x_1 ∈ Icc (↑f x) b\nhle : ↑f x ≤ b\nhlt : ↑f x < b\nc : ℝ := (↑f x + b) / 2\nhac : ↑f x < c\nhcb : c < b\nhsub : c - ↑f x = b - c\nhd : Disjoint (range e ∪ ↑g ⁻¹' Iic c) (↑g ⁻¹' {b})\ndg0 : EqOn (↑dg) (Function.const Y 0) (range e ∪ ↑g ⁻¹' Iic c)\ndgb : EqOn (↑dg) (Function.const Y (b - c)) (↑g ⁻¹' {b})\ndgmem : ∀ (x : Y), ↑dg x ∈ Icc 0 (b - c)\nhc : c < ↑g y\n⊢ ∃ x₁ x₂, ↑(g - dg) y ∈ Icc (↑f x₁) (↑f x₂)\n[PROOFSTEP]\nrefine' ⟨x, xu, _, hyxu.le⟩\n[GOAL]\ncase intro.intro.inr.intro.intro.inr.intro.intro.intro.intro.intro.intro.intro.inl.inl.intro\nX : Type u_1\nY : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : NormalSpace Y\ninst✝ : Nonempty X\nf : X →ᵇ ℝ\ne : X → Y\nhe : ClosedEmbedding e\ninhabited_h : Inhabited X\nb : ℝ\nhb : IsLUB (range ↑f) b\ng : Y →ᵇ ℝ\nxl : Y → X\nhxl : ∀ (y : Y), ↑f (xl y) ≤ ↑g y\nhgb : ∀ (y : Y), ↑g y ≤ b\nhb' : ¬∃ x, ↑f x = b\ndg : Y →ᵇ ℝ\nhgf : ∀ (x : X), ↑(g - dg) (e x) = ↑f x\ny : Y\nhyb : ↑(g - dg) y < b\nxu : X\nhyxu : ↑(g - dg) y < ↑f xu\nright✝ : ↑f xu ≤ b\nx : X\nha : IsGLB (range ↑f) (↑f x)\nhmem : ∀ (x_1 : X), ↑f x_1 ∈ Icc (↑f x) b\nhle : ↑f x ≤ b\nhlt : ↑f x < b\nc : ℝ := (↑f x + b) / 2\nhac : ↑f x < c\nhcb : c < b\nhsub : c - ↑f x = b - c\nhd : Disjoint (range e ∪ ↑g ⁻¹' Iic c) (↑g ⁻¹' {b})\ndg0 : EqOn (↑dg) (Function.const Y 0) (range e ∪ ↑g ⁻¹' Iic c)\ndgb : EqOn (↑dg) (Function.const Y (b - c)) (↑g ⁻¹' {b})\ndgmem : ∀ (x : Y), ↑dg x ∈ Icc 0 (b - c)\nhc : c < ↑g y\n⊢ ↑f x ≤ ↑(g - dg) y\n[PROOFSTEP]\ncalc\n  f x = c - (b - c) := by rw [← hsub, sub_sub_cancel]\n  _ ≤ g y - dg y := sub_le_sub hc.le (dgmem _).2\n[GOAL]\nX : Type u_1\nY : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : NormalSpace Y\ninst✝ : Nonempty X\nf : X →ᵇ ℝ\ne : X → Y\nhe : ClosedEmbedding e\ninhabited_h : Inhabited X\nb : ℝ\nhb : IsLUB (range ↑f) b\ng : Y →ᵇ ℝ\nxl : Y → X\nhxl : ∀ (y : Y), ↑f (xl y) ≤ ↑g y\nhgb : ∀ (y : Y), ↑g y ≤ b\nhb' : ¬∃ x, ↑f x = b\ndg : Y →ᵇ ℝ\nhgf : ∀ (x : X), ↑(g - dg) (e x) = ↑f x\ny : Y\nhyb : ↑(g - dg) y < b\nxu : X\nhyxu : ↑(g - dg) y < ↑f xu\nright✝ : ↑f xu ≤ b\nx : X\nha : IsGLB (range ↑f) (↑f x)\nhmem : ∀ (x_1 : X), ↑f x_1 ∈ Icc (↑f x) b\nhle : ↑f x ≤ b\nhlt : ↑f x < b\nc : ℝ := (↑f x + b) / 2\nhac : ↑f x < c\nhcb : c < b\nhsub : c - ↑f x = b - c\nhd : Disjoint (range e ∪ ↑g ⁻¹' Iic c) (↑g ⁻¹' {b})\ndg0 : EqOn (↑dg) (Function.const Y 0) (range e ∪ ↑g ⁻¹' Iic c)\ndgb : EqOn (↑dg) (Function.const Y (b - c)) (↑g ⁻¹' {b})\ndgmem : ∀ (x : Y), ↑dg x ∈ Icc 0 (b - c)\nhc : c < ↑g y\n⊢ ↑f x = c - (b - c)\n[PROOFSTEP]\nrw [← hsub, sub_sub_cancel]\n[GOAL]\ncase intro.intro.inr.intro.intro.inr.intro.intro.intro.intro.intro.intro.intro.inl.inr\nX : Type u_1\nY : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : NormalSpace Y\ninst✝ : Nonempty X\nf : X →ᵇ ℝ\ne : X → Y\nhe : ClosedEmbedding e\ninhabited_h : Inhabited X\na : ℝ\nha : IsGLB (range ↑f) a\nb : ℝ\nhb : IsLUB (range ↑f) b\nhmem : ∀ (x : X), ↑f x ∈ Icc a b\nhle : a ≤ b\nhlt : a < b\nc : ℝ := (a + b) / 2\nhac : a < c\nhcb : c < b\nhsub : c - a = b - c\ng : Y →ᵇ ℝ\nxl : Y → X\nhxl : ∀ (y : Y), ↑f (xl y) ≤ ↑g y\nhgb : ∀ (y : Y), ↑g y ≤ b\nhb' : ¬∃ x, ↑f x = b\nhd : Disjoint (range e ∪ ↑g ⁻¹' Iic c) (↑g ⁻¹' {b})\ndg : Y →ᵇ ℝ\ndg0 : EqOn (↑dg) (Function.const Y 0) (range e ∪ ↑g ⁻¹' Iic c)\ndgb : EqOn (↑dg) (Function.const Y (b - c)) (↑g ⁻¹' {b})\ndgmem : ∀ (x : Y), ↑dg x ∈ Icc 0 (b - c)\nhgf : ∀ (x : X), ↑(g - dg) (e x) = ↑f x\ny : Y\nhyb : ↑(g - dg) y < b\nxu : X\nhyxu : ↑(g - dg) y < ↑f xu\nright✝ : ↑f xu ≤ b\nhc : c < ↑g y\nh✝ : ¬a ∈ range ↑f\n⊢ ∃ x₁ x₂, ↑(g - dg) y ∈ Icc (↑f x₁) (↑f x₂)\n[PROOFSTEP]\nhave hay : a < (g - dg) y := by\n  calc\n    a = c - (b - c) := by rw [← hsub, sub_sub_cancel]\n    _ < g y - (b - c) := (sub_lt_sub_right hc _)\n    _ ≤ g y - dg y := sub_le_sub_left (dgmem _).2 _\n[GOAL]\nX : Type u_1\nY : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : NormalSpace Y\ninst✝ : Nonempty X\nf : X →ᵇ ℝ\ne : X → Y\nhe : ClosedEmbedding e\ninhabited_h : Inhabited X\na : ℝ\nha : IsGLB (range ↑f) a\nb : ℝ\nhb : IsLUB (range ↑f) b\nhmem : ∀ (x : X), ↑f x ∈ Icc a b\nhle : a ≤ b\nhlt : a < b\nc : ℝ := (a + b) / 2\nhac : a < c\nhcb : c < b\nhsub : c - a = b - c\ng : Y →ᵇ ℝ\nxl : Y → X\nhxl : ∀ (y : Y), ↑f (xl y) ≤ ↑g y\nhgb : ∀ (y : Y), ↑g y ≤ b\nhb' : ¬∃ x, ↑f x = b\nhd : Disjoint (range e ∪ ↑g ⁻¹' Iic c) (↑g ⁻¹' {b})\ndg : Y →ᵇ ℝ\ndg0 : EqOn (↑dg) (Function.const Y 0) (range e ∪ ↑g ⁻¹' Iic c)\ndgb : EqOn (↑dg) (Function.const Y (b - c)) (↑g ⁻¹' {b})\ndgmem : ∀ (x : Y), ↑dg x ∈ Icc 0 (b - c)\nhgf : ∀ (x : X), ↑(g - dg) (e x) = ↑f x\ny : Y\nhyb : ↑(g - dg) y < b\nxu : X\nhyxu : ↑(g - dg) y < ↑f xu\nright✝ : ↑f xu ≤ b\nhc : c < ↑g y\nh✝ : ¬a ∈ range ↑f\n⊢ a < ↑(g - dg) y\n[PROOFSTEP]\ncalc\n  a = c - (b - c) := by rw [← hsub, sub_sub_cancel]\n  _ < g y - (b - c) := (sub_lt_sub_right hc _)\n  _ ≤ g y - dg y := sub_le_sub_left (dgmem _).2 _\n[GOAL]\nX : Type u_1\nY : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : NormalSpace Y\ninst✝ : Nonempty X\nf : X →ᵇ ℝ\ne : X → Y\nhe : ClosedEmbedding e\ninhabited_h : Inhabited X\na : ℝ\nha : IsGLB (range ↑f) a\nb : ℝ\nhb : IsLUB (range ↑f) b\nhmem : ∀ (x : X), ↑f x ∈ Icc a b\nhle : a ≤ b\nhlt : a < b\nc : ℝ := (a + b) / 2\nhac : a < c\nhcb : c < b\nhsub : c - a = b - c\ng : Y →ᵇ ℝ\nxl : Y → X\nhxl : ∀ (y : Y), ↑f (xl y) ≤ ↑g y\nhgb : ∀ (y : Y), ↑g y ≤ b\nhb' : ¬∃ x, ↑f x = b\nhd : Disjoint (range e ∪ ↑g ⁻¹' Iic c) (↑g ⁻¹' {b})\ndg : Y →ᵇ ℝ\ndg0 : EqOn (↑dg) (Function.const Y 0) (range e ∪ ↑g ⁻¹' Iic c)\ndgb : EqOn (↑dg) (Function.const Y (b - c)) (↑g ⁻¹' {b})\ndgmem : ∀ (x : Y), ↑dg x ∈ Icc 0 (b - c)\nhgf : ∀ (x : X), ↑(g - dg) (e x) = ↑f x\ny : Y\nhyb : ↑(g - dg) y < b\nxu : X\nhyxu : ↑(g - dg) y < ↑f xu\nright✝ : ↑f xu ≤ b\nhc : c < ↑g y\nh✝ : ¬a ∈ range ↑f\n⊢ a = c - (b - c)\n[PROOFSTEP]\nrw [← hsub, sub_sub_cancel]\n[GOAL]\ncase intro.intro.inr.intro.intro.inr.intro.intro.intro.intro.intro.intro.intro.inl.inr\nX : Type u_1\nY : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : NormalSpace Y\ninst✝ : Nonempty X\nf : X →ᵇ ℝ\ne : X → Y\nhe : ClosedEmbedding e\ninhabited_h : Inhabited X\na : ℝ\nha : IsGLB (range ↑f) a\nb : ℝ\nhb : IsLUB (range ↑f) b\nhmem : ∀ (x : X), ↑f x ∈ Icc a b\nhle : a ≤ b\nhlt : a < b\nc : ℝ := (a + b) / 2\nhac : a < c\nhcb : c < b\nhsub : c - a = b - c\ng : Y →ᵇ ℝ\nxl : Y → X\nhxl : ∀ (y : Y), ↑f (xl y) ≤ ↑g y\nhgb : ∀ (y : Y), ↑g y ≤ b\nhb' : ¬∃ x, ↑f x = b\nhd : Disjoint (range e ∪ ↑g ⁻¹' Iic c) (↑g ⁻¹' {b})\ndg : Y →ᵇ ℝ\ndg0 : EqOn (↑dg) (Function.const Y 0) (range e ∪ ↑g ⁻¹' Iic c)\ndgb : EqOn (↑dg) (Function.const Y (b - c)) (↑g ⁻¹' {b})\ndgmem : ∀ (x : Y), ↑dg x ∈ Icc 0 (b - c)\nhgf : ∀ (x : X), ↑(g - dg) (e x) = ↑f x\ny : Y\nhyb : ↑(g - dg) y < b\nxu : X\nhyxu : ↑(g - dg) y < ↑f xu\nright✝ : ↑f xu ≤ b\nhc : c < ↑g y\nh✝ : ¬a ∈ range ↑f\nhay : a < ↑(g - dg) y\n⊢ ∃ x₁ x₂, ↑(g - dg) y ∈ Icc (↑f x₁) (↑f x₂)\n[PROOFSTEP]\nrcases ha.exists_between hay with ⟨_, ⟨x, rfl⟩, _, hxy⟩\n[GOAL]\ncase intro.intro.inr.intro.intro.inr.intro.intro.intro.intro.intro.intro.intro.inl.inr.intro.intro.intro.intro\nX : Type u_1\nY : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : NormalSpace Y\ninst✝ : Nonempty X\nf : X →ᵇ ℝ\ne : X → Y\nhe : ClosedEmbedding e\ninhabited_h : Inhabited X\na : ℝ\nha : IsGLB (range ↑f) a\nb : ℝ\nhb : IsLUB (range ↑f) b\nhmem : ∀ (x : X), ↑f x ∈ Icc a b\nhle : a ≤ b\nhlt : a < b\nc : ℝ := (a + b) / 2\nhac : a < c\nhcb : c < b\nhsub : c - a = b - c\ng : Y →ᵇ ℝ\nxl : Y → X\nhxl : ∀ (y : Y), ↑f (xl y) ≤ ↑g y\nhgb : ∀ (y : Y), ↑g y ≤ b\nhb' : ¬∃ x, ↑f x = b\nhd : Disjoint (range e ∪ ↑g ⁻¹' Iic c) (↑g ⁻¹' {b})\ndg : Y →ᵇ ℝ\ndg0 : EqOn (↑dg) (Function.const Y 0) (range e ∪ ↑g ⁻¹' Iic c)\ndgb : EqOn (↑dg) (Function.const Y (b - c)) (↑g ⁻¹' {b})\ndgmem : ∀ (x : Y), ↑dg x ∈ Icc 0 (b - c)\nhgf : ∀ (x : X), ↑(g - dg) (e x) = ↑f x\ny : Y\nhyb : ↑(g - dg) y < b\nxu : X\nhyxu : ↑(g - dg) y < ↑f xu\nright✝ : ↑f xu ≤ b\nhc : c < ↑g y\nh✝ : ¬a ∈ range ↑f\nhay : a < ↑(g - dg) y\nx : X\nleft✝ : a ≤ ↑f x\nhxy : ↑f x < ↑(g - dg) y\n⊢ ∃ x₁ x₂, ↑(g - dg) y ∈ Icc (↑f x₁) (↑f x₂)\n[PROOFSTEP]\nexact ⟨x, xu, hxy.le, hyxu.le⟩\n[GOAL]\ncase intro.intro.inr.intro.intro.inr.intro.intro.intro.intro.intro.intro.intro.inr\nX : Type u_1\nY : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : NormalSpace Y\ninst✝ : Nonempty X\nf : X →ᵇ ℝ\ne : X → Y\nhe : ClosedEmbedding e\ninhabited_h : Inhabited X\na : ℝ\nha : IsGLB (range ↑f) a\nb : ℝ\nhb : IsLUB (range ↑f) b\nhmem : ∀ (x : X), ↑f x ∈ Icc a b\nhle : a ≤ b\nhlt : a < b\nc : ℝ := (a + b) / 2\nhac : a < c\nhcb : c < b\nhsub : c - a = b - c\ng : Y →ᵇ ℝ\nxl : Y → X\nhxl : ∀ (y : Y), ↑f (xl y) ≤ ↑g y\nhgb : ∀ (y : Y), ↑g y ≤ b\nhb' : ¬∃ x, ↑f x = b\nhd : Disjoint (range e ∪ ↑g ⁻¹' Iic c) (↑g ⁻¹' {b})\ndg : Y →ᵇ ℝ\ndg0 : EqOn (↑dg) (Function.const Y 0) (range e ∪ ↑g ⁻¹' Iic c)\ndgb : EqOn (↑dg) (Function.const Y (b - c)) (↑g ⁻¹' {b})\ndgmem : ∀ (x : Y), ↑dg x ∈ Icc 0 (b - c)\nhgf : ∀ (x : X), ↑(g - dg) (e x) = ↑f x\ny : Y\nhyb : ↑(g - dg) y < b\nxu : X\nhyxu : ↑(g - dg) y < ↑f xu\nright✝ : ↑f xu ≤ b\nhc : ↑g y ≤ c\n⊢ ∃ x₁ x₂, ↑(g - dg) y ∈ Icc (↑f x₁) (↑f x₂)\n[PROOFSTEP]\nrefine' ⟨xl y, xu, _, hyxu.le⟩\n[GOAL]\ncase intro.intro.inr.intro.intro.inr.intro.intro.intro.intro.intro.intro.intro.inr\nX : Type u_1\nY : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : NormalSpace Y\ninst✝ : Nonempty X\nf : X →ᵇ ℝ\ne : X → Y\nhe : ClosedEmbedding e\ninhabited_h : Inhabited X\na : ℝ\nha : IsGLB (range ↑f) a\nb : ℝ\nhb : IsLUB (range ↑f) b\nhmem : ∀ (x : X), ↑f x ∈ Icc a b\nhle : a ≤ b\nhlt : a < b\nc : ℝ := (a + b) / 2\nhac : a < c\nhcb : c < b\nhsub : c - a = b - c\ng : Y →ᵇ ℝ\nxl : Y → X\nhxl : ∀ (y : Y), ↑f (xl y) ≤ ↑g y\nhgb : ∀ (y : Y), ↑g y ≤ b\nhb' : ¬∃ x, ↑f x = b\nhd : Disjoint (range e ∪ ↑g ⁻¹' Iic c) (↑g ⁻¹' {b})\ndg : Y →ᵇ ℝ\ndg0 : EqOn (↑dg) (Function.const Y 0) (range e ∪ ↑g ⁻¹' Iic c)\ndgb : EqOn (↑dg) (Function.const Y (b - c)) (↑g ⁻¹' {b})\ndgmem : ∀ (x : Y), ↑dg x ∈ Icc 0 (b - c)\nhgf : ∀ (x : X), ↑(g - dg) (e x) = ↑f x\ny : Y\nhyb : ↑(g - dg) y < b\nxu : X\nhyxu : ↑(g - dg) y < ↑f xu\nright✝ : ↑f xu ≤ b\nhc : ↑g y ≤ c\n⊢ ↑f (xl y) ≤ ↑(g - dg) y\n[PROOFSTEP]\nsimp [dg0 (Or.inr hc), hxl]\n[GOAL]\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : X →ᵇ ℝ\nt : Set ℝ\ne : X → Y\nhs : OrdConnected t\nhf : ∀ (x : X), ↑f x ∈ t\nhne : Set.Nonempty t\nhe : ClosedEmbedding e\n⊢ ∃ g, (∀ (y : Y), ↑g y ∈ t) ∧ ↑g ∘ e = ↑f\n[PROOFSTEP]\ncases isEmpty_or_nonempty X\n[GOAL]\ncase inl\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : X →ᵇ ℝ\nt : Set ℝ\ne : X → Y\nhs : OrdConnected t\nhf : ∀ (x : X), ↑f x ∈ t\nhne : Set.Nonempty t\nhe : ClosedEmbedding e\nh✝ : IsEmpty X\n⊢ ∃ g, (∀ (y : Y), ↑g y ∈ t) ∧ ↑g ∘ e = ↑f\n[PROOFSTEP]\nrcases hne with ⟨c, hc⟩\n[GOAL]\ncase inl.intro\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : X →ᵇ ℝ\nt : Set ℝ\ne : X → Y\nhs : OrdConnected t\nhf : ∀ (x : X), ↑f x ∈ t\nhe : ClosedEmbedding e\nh✝ : IsEmpty X\nc : ℝ\nhc : c ∈ t\n⊢ ∃ g, (∀ (y : Y), ↑g y ∈ t) ∧ ↑g ∘ e = ↑f\n[PROOFSTEP]\nrefine' ⟨const Y c, fun _ => hc, funext fun x => isEmptyElim x⟩\n[GOAL]\ncase inr\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : X →ᵇ ℝ\nt : Set ℝ\ne : X → Y\nhs : OrdConnected t\nhf : ∀ (x : X), ↑f x ∈ t\nhne : Set.Nonempty t\nhe : ClosedEmbedding e\nh✝ : Nonempty X\n⊢ ∃ g, (∀ (y : Y), ↑g y ∈ t) ∧ ↑g ∘ e = ↑f\n[PROOFSTEP]\nrcases exists_extension_forall_exists_le_ge_of_closedEmbedding f he with ⟨g, hg, hgf⟩\n[GOAL]\ncase inr.intro.intro\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : X →ᵇ ℝ\nt : Set ℝ\ne : X → Y\nhs : OrdConnected t\nhf : ∀ (x : X), ↑f x ∈ t\nhne : Set.Nonempty t\nhe : ClosedEmbedding e\nh✝ : Nonempty X\ng : Y →ᵇ ℝ\nhg : ∀ (y : Y), ∃ x₁ x₂, ↑g y ∈ Icc (↑f x₁) (↑f x₂)\nhgf : ↑g ∘ e = ↑f\n⊢ ∃ g, (∀ (y : Y), ↑g y ∈ t) ∧ ↑g ∘ e = ↑f\n[PROOFSTEP]\nrefine' ⟨g, fun y => _, hgf⟩\n[GOAL]\ncase inr.intro.intro\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : X →ᵇ ℝ\nt : Set ℝ\ne : X → Y\nhs : OrdConnected t\nhf : ∀ (x : X), ↑f x ∈ t\nhne : Set.Nonempty t\nhe : ClosedEmbedding e\nh✝ : Nonempty X\ng : Y →ᵇ ℝ\nhg : ∀ (y : Y), ∃ x₁ x₂, ↑g y ∈ Icc (↑f x₁) (↑f x₂)\nhgf : ↑g ∘ e = ↑f\ny : Y\n⊢ ↑g y ∈ t\n[PROOFSTEP]\nrcases hg y with ⟨xl, xu, h⟩\n[GOAL]\ncase inr.intro.intro.intro.intro\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : X →ᵇ ℝ\nt : Set ℝ\ne : X → Y\nhs : OrdConnected t\nhf : ∀ (x : X), ↑f x ∈ t\nhne : Set.Nonempty t\nhe : ClosedEmbedding e\nh✝ : Nonempty X\ng : Y →ᵇ ℝ\nhg : ∀ (y : Y), ∃ x₁ x₂, ↑g y ∈ Icc (↑f x₁) (↑f x₂)\nhgf : ↑g ∘ e = ↑f\ny : Y\nxl xu : X\nh : ↑g y ∈ Icc (↑f xl) (↑f xu)\n⊢ ↑g y ∈ t\n[PROOFSTEP]\nexact hs.out (hf _) (hf _) h\n[GOAL]\nX : Type u_1\nY : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : NormalSpace Y\ns : Set Y\nf : ↑s →ᵇ ℝ\nhs : IsClosed s\nt : Set ℝ\ninst✝ : OrdConnected t\nhf : ∀ (x : ↑s), ↑f x ∈ t\nhne : Set.Nonempty t\n⊢ ∃ g, (∀ (y : Y), ↑g y ∈ t) ∧ restrict g s = f\n[PROOFSTEP]\nrcases exists_extension_forall_mem_of_closedEmbedding f hf hne (closedEmbedding_subtype_val hs) with ⟨g, hg, hgf⟩\n[GOAL]\ncase intro.intro\nX : Type u_1\nY : Type u_2\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : NormalSpace Y\ns : Set Y\nf : ↑s →ᵇ ℝ\nhs : IsClosed s\nt : Set ℝ\ninst✝ : OrdConnected t\nhf : ∀ (x : ↑s), ↑f x ∈ t\nhne : Set.Nonempty t\ng : Y →ᵇ ℝ\nhg : ∀ (y : Y), ↑g y ∈ t\nhgf : ↑g ∘ Subtype.val = ↑f\n⊢ ∃ g, (∀ (y : Y), ↑g y ∈ t) ∧ restrict g s = f\n[PROOFSTEP]\nexact ⟨g, hg, FunLike.coe_injective hgf⟩\n[GOAL]\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : C(X, ℝ)\nt : Set ℝ\ne : X → Y\nhs : OrdConnected t\nhf : ∀ (x : X), ↑f x ∈ t\nhne : Set.Nonempty t\nhe : ClosedEmbedding e\n⊢ ∃ g, (∀ (y : Y), ↑g y ∈ t) ∧ ↑g ∘ e = ↑f\n[PROOFSTEP]\nhave h : ℝ ≃o Ioo (-1 : ℝ) 1 := orderIsoIooNegOneOne ℝ\n[GOAL]\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : C(X, ℝ)\nt : Set ℝ\ne : X → Y\nhs : OrdConnected t\nhf : ∀ (x : X), ↑f x ∈ t\nhne : Set.Nonempty t\nhe : ClosedEmbedding e\nh : ℝ ≃o ↑(Ioo (-1) 1)\n⊢ ∃ g, (∀ (y : Y), ↑g y ∈ t) ∧ ↑g ∘ e = ↑f\n[PROOFSTEP]\nlet F : X →ᵇ ℝ :=\n  { toFun := (↑) ∘ h ∘ f\n    continuous_toFun := continuous_subtype_val.comp (h.continuous.comp f.continuous)\n    map_bounded' := bounded_range_iff.1 ((bounded_Ioo (-1 : ℝ) 1).mono <| forall_range_iff.2 fun x => (h (f x)).2) }\n[GOAL]\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : C(X, ℝ)\nt : Set ℝ\ne : X → Y\nhs : OrdConnected t\nhf : ∀ (x : X), ↑f x ∈ t\nhne : Set.Nonempty t\nhe : ClosedEmbedding e\nh : ℝ ≃o ↑(Ioo (-1) 1)\nF : X →ᵇ ℝ :=\n  { toContinuousMap := mk (Subtype.val ∘ ↑h ∘ ↑f),\n    map_bounded' :=\n      (_ :\n        ∃ C,\n          ∀ (x y : X),\n            dist (ContinuousMap.toFun (mk (Subtype.val ∘ ↑h ∘ ↑f)) x)\n                (ContinuousMap.toFun (mk (Subtype.val ∘ ↑h ∘ ↑f)) y) ≤\n              C) }\n⊢ ∃ g, (∀ (y : Y), ↑g y ∈ t) ∧ ↑g ∘ e = ↑f\n[PROOFSTEP]\nlet t' : Set ℝ := (↑) ∘ h '' t\n[GOAL]\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : C(X, ℝ)\nt : Set ℝ\ne : X → Y\nhs : OrdConnected t\nhf : ∀ (x : X), ↑f x ∈ t\nhne : Set.Nonempty t\nhe : ClosedEmbedding e\nh : ℝ ≃o ↑(Ioo (-1) 1)\nF : X →ᵇ ℝ :=\n  { toContinuousMap := mk (Subtype.val ∘ ↑h ∘ ↑f),\n    map_bounded' :=\n      (_ :\n        ∃ C,\n          ∀ (x y : X),\n            dist (ContinuousMap.toFun (mk (Subtype.val ∘ ↑h ∘ ↑f)) x)\n                (ContinuousMap.toFun (mk (Subtype.val ∘ ↑h ∘ ↑f)) y) ≤\n              C) }\nt' : Set ℝ := Subtype.val ∘ ↑h '' t\n⊢ ∃ g, (∀ (y : Y), ↑g y ∈ t) ∧ ↑g ∘ e = ↑f\n[PROOFSTEP]\nhave ht_sub : t' ⊆ Ioo (-1 : ℝ) 1 := image_subset_iff.2 fun x _ => (h x).2\n[GOAL]\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : C(X, ℝ)\nt : Set ℝ\ne : X → Y\nhs : OrdConnected t\nhf : ∀ (x : X), ↑f x ∈ t\nhne : Set.Nonempty t\nhe : ClosedEmbedding e\nh : ℝ ≃o ↑(Ioo (-1) 1)\nF : X →ᵇ ℝ :=\n  { toContinuousMap := mk (Subtype.val ∘ ↑h ∘ ↑f),\n    map_bounded' :=\n      (_ :\n        ∃ C,\n          ∀ (x y : X),\n            dist (ContinuousMap.toFun (mk (Subtype.val ∘ ↑h ∘ ↑f)) x)\n                (ContinuousMap.toFun (mk (Subtype.val ∘ ↑h ∘ ↑f)) y) ≤\n              C) }\nt' : Set ℝ := Subtype.val ∘ ↑h '' t\nht_sub : t' ⊆ Ioo (-1) 1\n⊢ ∃ g, (∀ (y : Y), ↑g y ∈ t) ∧ ↑g ∘ e = ↑f\n[PROOFSTEP]\nhave : OrdConnected t' := by\n  constructor\n  rintro _ ⟨x, hx, rfl⟩ _ ⟨y, hy, rfl⟩ z hz\n  lift z to Ioo (-1 : ℝ) 1 using Icc_subset_Ioo (h x).2.1 (h y).2.2 hz\n  change z ∈ Icc (h x) (h y) at hz \n  rw [← h.image_Icc] at hz \n  rcases hz with ⟨z, hz, rfl⟩\n  exact ⟨z, hs.out hx hy hz, rfl⟩\n[GOAL]\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : C(X, ℝ)\nt : Set ℝ\ne : X → Y\nhs : OrdConnected t\nhf : ∀ (x : X), ↑f x ∈ t\nhne : Set.Nonempty t\nhe : ClosedEmbedding e\nh : ℝ ≃o ↑(Ioo (-1) 1)\nF : X →ᵇ ℝ :=\n  { toContinuousMap := mk (Subtype.val ∘ ↑h ∘ ↑f),\n    map_bounded' :=\n      (_ :\n        ∃ C,\n          ∀ (x y : X),\n            dist (ContinuousMap.toFun (mk (Subtype.val ∘ ↑h ∘ ↑f)) x)\n                (ContinuousMap.toFun (mk (Subtype.val ∘ ↑h ∘ ↑f)) y) ≤\n              C) }\nt' : Set ℝ := Subtype.val ∘ ↑h '' t\nht_sub : t' ⊆ Ioo (-1) 1\n⊢ OrdConnected t'\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase out'\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : C(X, ℝ)\nt : Set ℝ\ne : X → Y\nhs : OrdConnected t\nhf : ∀ (x : X), ↑f x ∈ t\nhne : Set.Nonempty t\nhe : ClosedEmbedding e\nh : ℝ ≃o ↑(Ioo (-1) 1)\nF : X →ᵇ ℝ :=\n  { toContinuousMap := mk (Subtype.val ∘ ↑h ∘ ↑f),\n    map_bounded' :=\n      (_ :\n        ∃ C,\n          ∀ (x y : X),\n            dist (ContinuousMap.toFun (mk (Subtype.val ∘ ↑h ∘ ↑f)) x)\n                (ContinuousMap.toFun (mk (Subtype.val ∘ ↑h ∘ ↑f)) y) ≤\n              C) }\nt' : Set ℝ := Subtype.val ∘ ↑h '' t\nht_sub : t' ⊆ Ioo (-1) 1\n⊢ ∀ ⦃x : ℝ⦄, x ∈ t' → ∀ ⦃y : ℝ⦄, y ∈ t' → Icc x y ⊆ t'\n[PROOFSTEP]\nrintro _ ⟨x, hx, rfl⟩ _ ⟨y, hy, rfl⟩ z hz\n[GOAL]\ncase out'.intro.intro.intro.intro\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : C(X, ℝ)\nt : Set ℝ\ne : X → Y\nhs : OrdConnected t\nhf : ∀ (x : X), ↑f x ∈ t\nhne : Set.Nonempty t\nhe : ClosedEmbedding e\nh : ℝ ≃o ↑(Ioo (-1) 1)\nF : X →ᵇ ℝ :=\n  { toContinuousMap := mk (Subtype.val ∘ ↑h ∘ ↑f),\n    map_bounded' :=\n      (_ :\n        ∃ C,\n          ∀ (x y : X),\n            dist (ContinuousMap.toFun (mk (Subtype.val ∘ ↑h ∘ ↑f)) x)\n                (ContinuousMap.toFun (mk (Subtype.val ∘ ↑h ∘ ↑f)) y) ≤\n              C) }\nt' : Set ℝ := Subtype.val ∘ ↑h '' t\nht_sub : t' ⊆ Ioo (-1) 1\nx : ℝ\nhx : x ∈ t\ny : ℝ\nhy : y ∈ t\nz : ℝ\nhz : z ∈ Icc ((Subtype.val ∘ ↑h) x) ((Subtype.val ∘ ↑h) y)\n⊢ z ∈ t'\n[PROOFSTEP]\nlift z to Ioo (-1 : ℝ) 1 using Icc_subset_Ioo (h x).2.1 (h y).2.2 hz\n[GOAL]\ncase out'.intro.intro.intro.intro.intro\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : C(X, ℝ)\nt : Set ℝ\ne : X → Y\nhs : OrdConnected t\nhf : ∀ (x : X), ↑f x ∈ t\nhne : Set.Nonempty t\nhe : ClosedEmbedding e\nh : ℝ ≃o ↑(Ioo (-1) 1)\nF : X →ᵇ ℝ :=\n  { toContinuousMap := mk (Subtype.val ∘ ↑h ∘ ↑f),\n    map_bounded' :=\n      (_ :\n        ∃ C,\n          ∀ (x y : X),\n            dist (ContinuousMap.toFun (mk (Subtype.val ∘ ↑h ∘ ↑f)) x)\n                (ContinuousMap.toFun (mk (Subtype.val ∘ ↑h ∘ ↑f)) y) ≤\n              C) }\nt' : Set ℝ := Subtype.val ∘ ↑h '' t\nht_sub : t' ⊆ Ioo (-1) 1\nx : ℝ\nhx : x ∈ t\ny : ℝ\nhy : y ∈ t\nz : { x // x ∈ Ioo (-1) 1 }\nhz : ↑z ∈ Icc ((Subtype.val ∘ ↑h) x) ((Subtype.val ∘ ↑h) y)\n⊢ ↑z ∈ t'\n[PROOFSTEP]\nchange z ∈ Icc (h x) (h y) at hz \n[GOAL]\ncase out'.intro.intro.intro.intro.intro\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : C(X, ℝ)\nt : Set ℝ\ne : X → Y\nhs : OrdConnected t\nhf : ∀ (x : X), ↑f x ∈ t\nhne : Set.Nonempty t\nhe : ClosedEmbedding e\nh : ℝ ≃o ↑(Ioo (-1) 1)\nF : X →ᵇ ℝ :=\n  { toContinuousMap := mk (Subtype.val ∘ ↑h ∘ ↑f),\n    map_bounded' :=\n      (_ :\n        ∃ C,\n          ∀ (x y : X),\n            dist (ContinuousMap.toFun (mk (Subtype.val ∘ ↑h ∘ ↑f)) x)\n                (ContinuousMap.toFun (mk (Subtype.val ∘ ↑h ∘ ↑f)) y) ≤\n              C) }\nt' : Set ℝ := Subtype.val ∘ ↑h '' t\nht_sub : t' ⊆ Ioo (-1) 1\nx : ℝ\nhx : x ∈ t\ny : ℝ\nhy : y ∈ t\nz : { x // x ∈ Ioo (-1) 1 }\nhz : z ∈ Icc (↑h x) (↑h y)\n⊢ ↑z ∈ t'\n[PROOFSTEP]\nrw [← h.image_Icc] at hz \n[GOAL]\ncase out'.intro.intro.intro.intro.intro\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : C(X, ℝ)\nt : Set ℝ\ne : X → Y\nhs : OrdConnected t\nhf : ∀ (x : X), ↑f x ∈ t\nhne : Set.Nonempty t\nhe : ClosedEmbedding e\nh : ℝ ≃o ↑(Ioo (-1) 1)\nF : X →ᵇ ℝ :=\n  { toContinuousMap := mk (Subtype.val ∘ ↑h ∘ ↑f),\n    map_bounded' :=\n      (_ :\n        ∃ C,\n          ∀ (x y : X),\n            dist (ContinuousMap.toFun (mk (Subtype.val ∘ ↑h ∘ ↑f)) x)\n                (ContinuousMap.toFun (mk (Subtype.val ∘ ↑h ∘ ↑f)) y) ≤\n              C) }\nt' : Set ℝ := Subtype.val ∘ ↑h '' t\nht_sub : t' ⊆ Ioo (-1) 1\nx : ℝ\nhx : x ∈ t\ny : ℝ\nhy : y ∈ t\nz : { x // x ∈ Ioo (-1) 1 }\nhz : z ∈ ↑h '' Icc x y\n⊢ ↑z ∈ t'\n[PROOFSTEP]\nrcases hz with ⟨z, hz, rfl⟩\n[GOAL]\ncase out'.intro.intro.intro.intro.intro.intro.intro\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : C(X, ℝ)\nt : Set ℝ\ne : X → Y\nhs : OrdConnected t\nhf : ∀ (x : X), ↑f x ∈ t\nhne : Set.Nonempty t\nhe : ClosedEmbedding e\nh : ℝ ≃o ↑(Ioo (-1) 1)\nF : X →ᵇ ℝ :=\n  { toContinuousMap := mk (Subtype.val ∘ ↑h ∘ ↑f),\n    map_bounded' :=\n      (_ :\n        ∃ C,\n          ∀ (x y : X),\n            dist (ContinuousMap.toFun (mk (Subtype.val ∘ ↑h ∘ ↑f)) x)\n                (ContinuousMap.toFun (mk (Subtype.val ∘ ↑h ∘ ↑f)) y) ≤\n              C) }\nt' : Set ℝ := Subtype.val ∘ ↑h '' t\nht_sub : t' ⊆ Ioo (-1) 1\nx : ℝ\nhx : x ∈ t\ny : ℝ\nhy : y ∈ t\nz : ℝ\nhz : z ∈ Icc x y\n⊢ ↑(↑h z) ∈ t'\n[PROOFSTEP]\nexact ⟨z, hs.out hx hy hz, rfl⟩\n[GOAL]\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : C(X, ℝ)\nt : Set ℝ\ne : X → Y\nhs : OrdConnected t\nhf : ∀ (x : X), ↑f x ∈ t\nhne : Set.Nonempty t\nhe : ClosedEmbedding e\nh : ℝ ≃o ↑(Ioo (-1) 1)\nF : X →ᵇ ℝ :=\n  { toContinuousMap := mk (Subtype.val ∘ ↑h ∘ ↑f),\n    map_bounded' :=\n      (_ :\n        ∃ C,\n          ∀ (x y : X),\n            dist (ContinuousMap.toFun (mk (Subtype.val ∘ ↑h ∘ ↑f)) x)\n                (ContinuousMap.toFun (mk (Subtype.val ∘ ↑h ∘ ↑f)) y) ≤\n              C) }\nt' : Set ℝ := Subtype.val ∘ ↑h '' t\nht_sub : t' ⊆ Ioo (-1) 1\nthis : OrdConnected t'\n⊢ ∃ g, (∀ (y : Y), ↑g y ∈ t) ∧ ↑g ∘ e = ↑f\n[PROOFSTEP]\nhave hFt : ∀ x, F x ∈ t' := fun x => mem_image_of_mem _ (hf x)\n[GOAL]\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : C(X, ℝ)\nt : Set ℝ\ne : X → Y\nhs : OrdConnected t\nhf : ∀ (x : X), ↑f x ∈ t\nhne : Set.Nonempty t\nhe : ClosedEmbedding e\nh : ℝ ≃o ↑(Ioo (-1) 1)\nF : X →ᵇ ℝ :=\n  { toContinuousMap := mk (Subtype.val ∘ ↑h ∘ ↑f),\n    map_bounded' :=\n      (_ :\n        ∃ C,\n          ∀ (x y : X),\n            dist (ContinuousMap.toFun (mk (Subtype.val ∘ ↑h ∘ ↑f)) x)\n                (ContinuousMap.toFun (mk (Subtype.val ∘ ↑h ∘ ↑f)) y) ≤\n              C) }\nt' : Set ℝ := Subtype.val ∘ ↑h '' t\nht_sub : t' ⊆ Ioo (-1) 1\nthis : OrdConnected t'\nhFt : ∀ (x : X), ↑F x ∈ t'\n⊢ ∃ g, (∀ (y : Y), ↑g y ∈ t) ∧ ↑g ∘ e = ↑f\n[PROOFSTEP]\nrcases F.exists_extension_forall_mem_of_closedEmbedding hFt (hne.image _) he with ⟨G, hG, hGF⟩\n[GOAL]\ncase intro.intro\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : C(X, ℝ)\nt : Set ℝ\ne : X → Y\nhs : OrdConnected t\nhf : ∀ (x : X), ↑f x ∈ t\nhne : Set.Nonempty t\nhe : ClosedEmbedding e\nh : ℝ ≃o ↑(Ioo (-1) 1)\nF : X →ᵇ ℝ :=\n  { toContinuousMap := mk (Subtype.val ∘ ↑h ∘ ↑f),\n    map_bounded' :=\n      (_ :\n        ∃ C,\n          ∀ (x y : X),\n            dist (ContinuousMap.toFun (mk (Subtype.val ∘ ↑h ∘ ↑f)) x)\n                (ContinuousMap.toFun (mk (Subtype.val ∘ ↑h ∘ ↑f)) y) ≤\n              C) }\nt' : Set ℝ := Subtype.val ∘ ↑h '' t\nht_sub : t' ⊆ Ioo (-1) 1\nthis : OrdConnected t'\nhFt : ∀ (x : X), ↑F x ∈ t'\nG : Y →ᵇ ℝ\nhG : ∀ (y : Y), ↑G y ∈ t'\nhGF : ↑G ∘ e = ↑F\n⊢ ∃ g, (∀ (y : Y), ↑g y ∈ t) ∧ ↑g ∘ e = ↑f\n[PROOFSTEP]\nlet g : C(Y, ℝ) :=\n  ⟨h.symm ∘ codRestrict G _ fun y => ht_sub (hG y), h.symm.continuous.comp <| G.continuous.subtype_mk _⟩\n[GOAL]\ncase intro.intro\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : C(X, ℝ)\nt : Set ℝ\ne : X → Y\nhs : OrdConnected t\nhf : ∀ (x : X), ↑f x ∈ t\nhne : Set.Nonempty t\nhe : ClosedEmbedding e\nh : ℝ ≃o ↑(Ioo (-1) 1)\nF : X →ᵇ ℝ :=\n  { toContinuousMap := mk (Subtype.val ∘ ↑h ∘ ↑f),\n    map_bounded' :=\n      (_ :\n        ∃ C,\n          ∀ (x y : X),\n            dist (ContinuousMap.toFun (mk (Subtype.val ∘ ↑h ∘ ↑f)) x)\n                (ContinuousMap.toFun (mk (Subtype.val ∘ ↑h ∘ ↑f)) y) ≤\n              C) }\nt' : Set ℝ := Subtype.val ∘ ↑h '' t\nht_sub : t' ⊆ Ioo (-1) 1\nthis : OrdConnected t'\nhFt : ∀ (x : X), ↑F x ∈ t'\nG : Y →ᵇ ℝ\nhG : ∀ (y : Y), ↑G y ∈ t'\nhGF : ↑G ∘ e = ↑F\ng : C(Y, ℝ) := mk (↑(OrderIso.symm h) ∘ Set.codRestrict (↑G) (Ioo (-1) 1) (_ : ∀ (y : Y), ↑G y ∈ Ioo (-1) 1))\n⊢ ∃ g, (∀ (y : Y), ↑g y ∈ t) ∧ ↑g ∘ e = ↑f\n[PROOFSTEP]\nhave hgG : ∀ {y a}, g y = a ↔ G y = h a := @fun y a => h.toEquiv.symm_apply_eq.trans Subtype.ext_iff\n[GOAL]\ncase intro.intro\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : C(X, ℝ)\nt : Set ℝ\ne : X → Y\nhs : OrdConnected t\nhf : ∀ (x : X), ↑f x ∈ t\nhne : Set.Nonempty t\nhe : ClosedEmbedding e\nh : ℝ ≃o ↑(Ioo (-1) 1)\nF : X →ᵇ ℝ :=\n  { toContinuousMap := mk (Subtype.val ∘ ↑h ∘ ↑f),\n    map_bounded' :=\n      (_ :\n        ∃ C,\n          ∀ (x y : X),\n            dist (ContinuousMap.toFun (mk (Subtype.val ∘ ↑h ∘ ↑f)) x)\n                (ContinuousMap.toFun (mk (Subtype.val ∘ ↑h ∘ ↑f)) y) ≤\n              C) }\nt' : Set ℝ := Subtype.val ∘ ↑h '' t\nht_sub : t' ⊆ Ioo (-1) 1\nthis : OrdConnected t'\nhFt : ∀ (x : X), ↑F x ∈ t'\nG : Y →ᵇ ℝ\nhG : ∀ (y : Y), ↑G y ∈ t'\nhGF : ↑G ∘ e = ↑F\ng : C(Y, ℝ) := mk (↑(OrderIso.symm h) ∘ Set.codRestrict (↑G) (Ioo (-1) 1) (_ : ∀ (y : Y), ↑G y ∈ Ioo (-1) 1))\nhgG : ∀ {y : Y} {a : (fun x => ℝ) y}, ↑g y = a ↔ ↑G y = ↑(↑h a)\n⊢ ∃ g, (∀ (y : Y), ↑g y ∈ t) ∧ ↑g ∘ e = ↑f\n[PROOFSTEP]\nrefine' ⟨g, fun y => _, _⟩\n[GOAL]\ncase intro.intro.refine'_1\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : C(X, ℝ)\nt : Set ℝ\ne : X → Y\nhs : OrdConnected t\nhf : ∀ (x : X), ↑f x ∈ t\nhne : Set.Nonempty t\nhe : ClosedEmbedding e\nh : ℝ ≃o ↑(Ioo (-1) 1)\nF : X →ᵇ ℝ :=\n  { toContinuousMap := mk (Subtype.val ∘ ↑h ∘ ↑f),\n    map_bounded' :=\n      (_ :\n        ∃ C,\n          ∀ (x y : X),\n            dist (ContinuousMap.toFun (mk (Subtype.val ∘ ↑h ∘ ↑f)) x)\n                (ContinuousMap.toFun (mk (Subtype.val ∘ ↑h ∘ ↑f)) y) ≤\n              C) }\nt' : Set ℝ := Subtype.val ∘ ↑h '' t\nht_sub : t' ⊆ Ioo (-1) 1\nthis : OrdConnected t'\nhFt : ∀ (x : X), ↑F x ∈ t'\nG : Y →ᵇ ℝ\nhG : ∀ (y : Y), ↑G y ∈ t'\nhGF : ↑G ∘ e = ↑F\ng : C(Y, ℝ) := mk (↑(OrderIso.symm h) ∘ Set.codRestrict (↑G) (Ioo (-1) 1) (_ : ∀ (y : Y), ↑G y ∈ Ioo (-1) 1))\nhgG : ∀ {y : Y} {a : (fun x => ℝ) y}, ↑g y = a ↔ ↑G y = ↑(↑h a)\ny : Y\n⊢ ↑g y ∈ t\n[PROOFSTEP]\nrcases hG y with ⟨a, ha, hay⟩\n[GOAL]\ncase intro.intro.refine'_1.intro.intro\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : C(X, ℝ)\nt : Set ℝ\ne : X → Y\nhs : OrdConnected t\nhf : ∀ (x : X), ↑f x ∈ t\nhne : Set.Nonempty t\nhe : ClosedEmbedding e\nh : ℝ ≃o ↑(Ioo (-1) 1)\nF : X →ᵇ ℝ :=\n  { toContinuousMap := mk (Subtype.val ∘ ↑h ∘ ↑f),\n    map_bounded' :=\n      (_ :\n        ∃ C,\n          ∀ (x y : X),\n            dist (ContinuousMap.toFun (mk (Subtype.val ∘ ↑h ∘ ↑f)) x)\n                (ContinuousMap.toFun (mk (Subtype.val ∘ ↑h ∘ ↑f)) y) ≤\n              C) }\nt' : Set ℝ := Subtype.val ∘ ↑h '' t\nht_sub : t' ⊆ Ioo (-1) 1\nthis : OrdConnected t'\nhFt : ∀ (x : X), ↑F x ∈ t'\nG : Y →ᵇ ℝ\nhG : ∀ (y : Y), ↑G y ∈ t'\nhGF : ↑G ∘ e = ↑F\ng : C(Y, ℝ) := mk (↑(OrderIso.symm h) ∘ Set.codRestrict (↑G) (Ioo (-1) 1) (_ : ∀ (y : Y), ↑G y ∈ Ioo (-1) 1))\nhgG : ∀ {y : Y} {a : (fun x => ℝ) y}, ↑g y = a ↔ ↑G y = ↑(↑h a)\ny : Y\na : ℝ\nha : a ∈ t\nhay : (Subtype.val ∘ ↑h) a = ↑G y\n⊢ ↑g y ∈ t\n[PROOFSTEP]\nconvert ha\n[GOAL]\ncase h.e'_4\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : C(X, ℝ)\nt : Set ℝ\ne : X → Y\nhs : OrdConnected t\nhf : ∀ (x : X), ↑f x ∈ t\nhne : Set.Nonempty t\nhe : ClosedEmbedding e\nh : ℝ ≃o ↑(Ioo (-1) 1)\nF : X →ᵇ ℝ :=\n  { toContinuousMap := mk (Subtype.val ∘ ↑h ∘ ↑f),\n    map_bounded' :=\n      (_ :\n        ∃ C,\n          ∀ (x y : X),\n            dist (ContinuousMap.toFun (mk (Subtype.val ∘ ↑h ∘ ↑f)) x)\n                (ContinuousMap.toFun (mk (Subtype.val ∘ ↑h ∘ ↑f)) y) ≤\n              C) }\nt' : Set ℝ := Subtype.val ∘ ↑h '' t\nht_sub : t' ⊆ Ioo (-1) 1\nthis : OrdConnected t'\nhFt : ∀ (x : X), ↑F x ∈ t'\nG : Y →ᵇ ℝ\nhG : ∀ (y : Y), ↑G y ∈ t'\nhGF : ↑G ∘ e = ↑F\ng : C(Y, ℝ) := mk (↑(OrderIso.symm h) ∘ Set.codRestrict (↑G) (Ioo (-1) 1) (_ : ∀ (y : Y), ↑G y ∈ Ioo (-1) 1))\nhgG : ∀ {y : Y} {a : (fun x => ℝ) y}, ↑g y = a ↔ ↑G y = ↑(↑h a)\ny : Y\na : ℝ\nha : a ∈ t\nhay : (Subtype.val ∘ ↑h) a = ↑G y\n⊢ ↑g y = a\n[PROOFSTEP]\nexact hgG.2 hay.symm\n[GOAL]\ncase intro.intro.refine'_2\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : C(X, ℝ)\nt : Set ℝ\ne : X → Y\nhs : OrdConnected t\nhf : ∀ (x : X), ↑f x ∈ t\nhne : Set.Nonempty t\nhe : ClosedEmbedding e\nh : ℝ ≃o ↑(Ioo (-1) 1)\nF : X →ᵇ ℝ :=\n  { toContinuousMap := mk (Subtype.val ∘ ↑h ∘ ↑f),\n    map_bounded' :=\n      (_ :\n        ∃ C,\n          ∀ (x y : X),\n            dist (ContinuousMap.toFun (mk (Subtype.val ∘ ↑h ∘ ↑f)) x)\n                (ContinuousMap.toFun (mk (Subtype.val ∘ ↑h ∘ ↑f)) y) ≤\n              C) }\nt' : Set ℝ := Subtype.val ∘ ↑h '' t\nht_sub : t' ⊆ Ioo (-1) 1\nthis : OrdConnected t'\nhFt : ∀ (x : X), ↑F x ∈ t'\nG : Y →ᵇ ℝ\nhG : ∀ (y : Y), ↑G y ∈ t'\nhGF : ↑G ∘ e = ↑F\ng : C(Y, ℝ) := mk (↑(OrderIso.symm h) ∘ Set.codRestrict (↑G) (Ioo (-1) 1) (_ : ∀ (y : Y), ↑G y ∈ Ioo (-1) 1))\nhgG : ∀ {y : Y} {a : (fun x => ℝ) y}, ↑g y = a ↔ ↑G y = ↑(↑h a)\n⊢ ↑g ∘ e = ↑f\n[PROOFSTEP]\next x\n[GOAL]\ncase intro.intro.refine'_2.h\nX : Type u_1\nY : Type u_2\ninst✝² : TopologicalSpace X\ninst✝¹ : TopologicalSpace Y\ninst✝ : NormalSpace Y\nf : C(X, ℝ)\nt : Set ℝ\ne : X → Y\nhs : OrdConnected t\nhf : ∀ (x : X), ↑f x ∈ t\nhne : Set.Nonempty t\nhe : ClosedEmbedding e\nh : ℝ ≃o ↑(Ioo (-1) 1)\nF : X →ᵇ ℝ :=\n  { toContinuousMap := mk (Subtype.val ∘ ↑h ∘ ↑f),\n    map_bounded' :=\n      (_ :\n        ∃ C,\n          ∀ (x y : X),\n            dist (ContinuousMap.toFun (mk (Subtype.val ∘ ↑h ∘ ↑f)) x)\n                (ContinuousMap.toFun (mk (Subtype.val ∘ ↑h ∘ ↑f)) y) ≤\n              C) }\nt' : Set ℝ := Subtype.val ∘ ↑h '' t\nht_sub : t' ⊆ Ioo (-1) 1\nthis : OrdConnected t'\nhFt : ∀ (x : X), ↑F x ∈ t'\nG : Y →ᵇ ℝ\nhG : ∀ (y : Y), ↑G y ∈ t'\nhGF : ↑G ∘ e = ↑F\ng : C(Y, ℝ) := mk (↑(OrderIso.symm h) ∘ Set.codRestrict (↑G) (Ioo (-1) 1) (_ : ∀ (y : Y), ↑G y ∈ Ioo (-1) 1))\nhgG : ∀ {y : Y} {a : (fun x => ℝ) y}, ↑g y = a ↔ ↑G y = ↑(↑h a)\nx : X\n⊢ (↑g ∘ e) x = ↑f x\n[PROOFSTEP]\nexact hgG.2 (congr_fun hGF _)\n", "meta": {"mathlib_filename": "Mathlib.Topology.TietzeExtension", "llama_tokens": 74789, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7799929002541068, "lm_q2_score": 0.6654105521116443, "lm_q1q2_score": 0.5190155064012479}}
{"text": "[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : GCDMonoid R\ninst✝² : CommRing A\ninst✝¹ : Algebra R A\nM : Submonoid R\ninst✝ : IsLocalization M A\nz : A\n⊢ ∃ a b, IsUnit (gcd a b) ∧ z * ↑(algebraMap R A) b = ↑(algebraMap R A) a\n[PROOFSTEP]\nobtain ⟨x, ⟨y, hy⟩, rfl⟩ := IsLocalization.mk'_surjective M z\n[GOAL]\ncase intro.intro.mk\nR : Type u_1\nA : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : GCDMonoid R\ninst✝² : CommRing A\ninst✝¹ : Algebra R A\nM : Submonoid R\ninst✝ : IsLocalization M A\nx y : R\nhy : y ∈ M\n⊢ ∃ a b, IsUnit (gcd a b) ∧ mk' A x { val := y, property := hy } * ↑(algebraMap R A) b = ↑(algebraMap R A) a\n[PROOFSTEP]\nobtain ⟨x', y', hx', hy', hu⟩ := extract_gcd x y\n[GOAL]\ncase intro.intro.mk.intro.intro.intro.intro\nR : Type u_1\nA : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : GCDMonoid R\ninst✝² : CommRing A\ninst✝¹ : Algebra R A\nM : Submonoid R\ninst✝ : IsLocalization M A\nx y : R\nhy : y ∈ M\nx' y' : R\nhx' : x = gcd x y * x'\nhy' : y = gcd x y * y'\nhu : IsUnit (gcd x' y')\n⊢ ∃ a b, IsUnit (gcd a b) ∧ mk' A x { val := y, property := hy } * ↑(algebraMap R A) b = ↑(algebraMap R A) a\n[PROOFSTEP]\nuse x', y', hu\n[GOAL]\ncase right\nR : Type u_1\nA : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : GCDMonoid R\ninst✝² : CommRing A\ninst✝¹ : Algebra R A\nM : Submonoid R\ninst✝ : IsLocalization M A\nx y : R\nhy : y ∈ M\nx' y' : R\nhx' : x = gcd x y * x'\nhy' : y = gcd x y * y'\nhu : IsUnit (gcd x' y')\n⊢ mk' A x { val := y, property := hy } * ↑(algebraMap R A) y' = ↑(algebraMap R A) x'\n[PROOFSTEP]\nrw [mul_comm, IsLocalization.mul_mk'_eq_mk'_of_mul]\n[GOAL]\ncase right\nR : Type u_1\nA : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : GCDMonoid R\ninst✝² : CommRing A\ninst✝¹ : Algebra R A\nM : Submonoid R\ninst✝ : IsLocalization M A\nx y : R\nhy : y ∈ M\nx' y' : R\nhx' : x = gcd x y * x'\nhy' : y = gcd x y * y'\nhu : IsUnit (gcd x' y')\n⊢ mk' A (y' * x) { val := y, property := hy } = ↑(algebraMap R A) x'\n[PROOFSTEP]\nconvert IsLocalization.mk'_mul_cancel_left (M := M) (S := A) _ _ using 2\n[GOAL]\ncase h.e'_2.h.e'_8\nR : Type u_1\nA : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : GCDMonoid R\ninst✝² : CommRing A\ninst✝¹ : Algebra R A\nM : Submonoid R\ninst✝ : IsLocalization M A\nx y : R\nhy : y ∈ M\nx' y' : R\nhx' : x = gcd x y * x'\nhy' : y = gcd x y * y'\nhu : IsUnit (gcd x' y')\n⊢ y' * x = ↑{ val := y, property := hy } * x'\n[PROOFSTEP]\nrw [Subtype.coe_mk, hy', ← mul_comm y', mul_assoc]\n[GOAL]\ncase h.e'_2.h.e'_8\nR : Type u_1\nA : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : GCDMonoid R\ninst✝² : CommRing A\ninst✝¹ : Algebra R A\nM : Submonoid R\ninst✝ : IsLocalization M A\nx y : R\nhy : y ∈ M\nx' y' : R\nhx' : x = gcd x y * x'\nhy' : y = gcd x y * y'\nhu : IsUnit (gcd x' y')\n⊢ y' * x = y' * (gcd x y * x')\n[PROOFSTEP]\nconv_lhs => rw [hx']\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : GCDMonoid R\ninst✝² : CommRing A\ninst✝¹ : Algebra R A\nM : Submonoid R\ninst✝ : IsLocalization M A\nx y : R\nhy : y ∈ M\nx' y' : R\nhx' : x = gcd x y * x'\nhy' : y = gcd x y * y'\nhu : IsUnit (gcd x' y')\n| y' * x\n[PROOFSTEP]\nrw [hx']\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : GCDMonoid R\ninst✝² : CommRing A\ninst✝¹ : Algebra R A\nM : Submonoid R\ninst✝ : IsLocalization M A\nx y : R\nhy : y ∈ M\nx' y' : R\nhx' : x = gcd x y * x'\nhy' : y = gcd x y * y'\nhu : IsUnit (gcd x' y')\n| y' * x\n[PROOFSTEP]\nrw [hx']\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : GCDMonoid R\ninst✝² : CommRing A\ninst✝¹ : Algebra R A\nM : Submonoid R\ninst✝ : IsLocalization M A\nx y : R\nhy : y ∈ M\nx' y' : R\nhx' : x = gcd x y * x'\nhy' : y = gcd x y * y'\nhu : IsUnit (gcd x' y')\n| y' * x\n[PROOFSTEP]\nrw [hx']\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝⁴ : CommRing R\ninst✝³ : IsDomain R\ninst✝² : GCDMonoid R\ninst✝¹ : CommRing A\ninst✝ : Algebra R A\nX : FractionRing R\nx✝ : IsIntegral R X\np : R[X]\nhp₁ : Polynomial.Monic p\nhp₂ : Polynomial.eval₂ (algebraMap R (FractionRing R)) X p = 0\n⊢ ∃ y, ↑(algebraMap R (FractionRing R)) y = X\n[PROOFSTEP]\nobtain ⟨x, y, hg, he⟩ := IsLocalization.surj_of_gcd_domain (nonZeroDivisors R) X\n[GOAL]\ncase intro.intro.intro\nR : Type u_1\nA : Type u_2\ninst✝⁴ : CommRing R\ninst✝³ : IsDomain R\ninst✝² : GCDMonoid R\ninst✝¹ : CommRing A\ninst✝ : Algebra R A\nX : FractionRing R\nx✝ : IsIntegral R X\np : R[X]\nhp₁ : Polynomial.Monic p\nhp₂ : Polynomial.eval₂ (algebraMap R (FractionRing R)) X p = 0\nx y : R\nhg : IsUnit (gcd x y)\nhe : X * ↑(algebraMap R (FractionRing R)) y = ↑(algebraMap R (FractionRing R)) x\n⊢ ∃ y, ↑(algebraMap R (FractionRing R)) y = X\n[PROOFSTEP]\nhave :=\n  Polynomial.dvd_pow_natDegree_of_eval₂_eq_zero (IsFractionRing.injective R <| FractionRing R) hp₁ y x _ hp₂\n    (by rw [mul_comm, he])\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝⁴ : CommRing R\ninst✝³ : IsDomain R\ninst✝² : GCDMonoid R\ninst✝¹ : CommRing A\ninst✝ : Algebra R A\nX : FractionRing R\nx✝ : IsIntegral R X\np : R[X]\nhp₁ : Polynomial.Monic p\nhp₂ : Polynomial.eval₂ (algebraMap R (FractionRing R)) X p = 0\nx y : R\nhg : IsUnit (gcd x y)\nhe : X * ↑(algebraMap R (FractionRing R)) y = ↑(algebraMap R (FractionRing R)) x\n⊢ ↑(algebraMap R (FractionRing R)) y * X = ↑(algebraMap R (FractionRing R)) x\n[PROOFSTEP]\nrw [mul_comm, he]\n[GOAL]\ncase intro.intro.intro\nR : Type u_1\nA : Type u_2\ninst✝⁴ : CommRing R\ninst✝³ : IsDomain R\ninst✝² : GCDMonoid R\ninst✝¹ : CommRing A\ninst✝ : Algebra R A\nX : FractionRing R\nx✝ : IsIntegral R X\np : R[X]\nhp₁ : Polynomial.Monic p\nhp₂ : Polynomial.eval₂ (algebraMap R (FractionRing R)) X p = 0\nx y : R\nhg : IsUnit (gcd x y)\nhe : X * ↑(algebraMap R (FractionRing R)) y = ↑(algebraMap R (FractionRing R)) x\nthis : y ∣ x ^ Polynomial.natDegree p\n⊢ ∃ y, ↑(algebraMap R (FractionRing R)) y = X\n[PROOFSTEP]\nhave : IsUnit y := by\n  rw [isUnit_iff_dvd_one, ← one_pow]\n  exact\n    (dvd_gcd this <| dvd_refl y).trans\n      (gcd_pow_left_dvd_pow_gcd.trans <| pow_dvd_pow_of_dvd (isUnit_iff_dvd_one.1 hg) _)\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝⁴ : CommRing R\ninst✝³ : IsDomain R\ninst✝² : GCDMonoid R\ninst✝¹ : CommRing A\ninst✝ : Algebra R A\nX : FractionRing R\nx✝ : IsIntegral R X\np : R[X]\nhp₁ : Polynomial.Monic p\nhp₂ : Polynomial.eval₂ (algebraMap R (FractionRing R)) X p = 0\nx y : R\nhg : IsUnit (gcd x y)\nhe : X * ↑(algebraMap R (FractionRing R)) y = ↑(algebraMap R (FractionRing R)) x\nthis : y ∣ x ^ Polynomial.natDegree p\n⊢ IsUnit y\n[PROOFSTEP]\nrw [isUnit_iff_dvd_one, ← one_pow]\n[GOAL]\nR : Type u_1\nA : Type u_2\ninst✝⁴ : CommRing R\ninst✝³ : IsDomain R\ninst✝² : GCDMonoid R\ninst✝¹ : CommRing A\ninst✝ : Algebra R A\nX : FractionRing R\nx✝ : IsIntegral R X\np : R[X]\nhp₁ : Polynomial.Monic p\nhp₂ : Polynomial.eval₂ (algebraMap R (FractionRing R)) X p = 0\nx y : R\nhg : IsUnit (gcd x y)\nhe : X * ↑(algebraMap R (FractionRing R)) y = ↑(algebraMap R (FractionRing R)) x\nthis : y ∣ x ^ Polynomial.natDegree p\n⊢ y ∣ 1 ^ ?m.56326\nR : Type u_1\nA : Type u_2\ninst✝⁴ : CommRing R\ninst✝³ : IsDomain R\ninst✝² : GCDMonoid R\ninst✝¹ : CommRing A\ninst✝ : Algebra R A\nX : FractionRing R\nx✝ : IsIntegral R X\np : R[X]\nhp₁ : Polynomial.Monic p\nhp₂ : Polynomial.eval₂ (algebraMap R (FractionRing R)) X p = 0\nx y : R\nhg : IsUnit (gcd x y)\nhe : X * ↑(algebraMap R (FractionRing R)) y = ↑(algebraMap R (FractionRing R)) x\nthis : y ∣ x ^ Polynomial.natDegree p\n⊢ ℕ\n[PROOFSTEP]\nexact\n  (dvd_gcd this <| dvd_refl y).trans (gcd_pow_left_dvd_pow_gcd.trans <| pow_dvd_pow_of_dvd (isUnit_iff_dvd_one.1 hg) _)\n[GOAL]\ncase intro.intro.intro\nR : Type u_1\nA : Type u_2\ninst✝⁴ : CommRing R\ninst✝³ : IsDomain R\ninst✝² : GCDMonoid R\ninst✝¹ : CommRing A\ninst✝ : Algebra R A\nX : FractionRing R\nx✝ : IsIntegral R X\np : R[X]\nhp₁ : Polynomial.Monic p\nhp₂ : Polynomial.eval₂ (algebraMap R (FractionRing R)) X p = 0\nx y : R\nhg : IsUnit (gcd x y)\nhe : X * ↑(algebraMap R (FractionRing R)) y = ↑(algebraMap R (FractionRing R)) x\nthis✝ : y ∣ x ^ Polynomial.natDegree p\nthis : IsUnit y\n⊢ ∃ y, ↑(algebraMap R (FractionRing R)) y = X\n[PROOFSTEP]\nuse x * (this.unit⁻¹ : _)\n[GOAL]\ncase h\nR : Type u_1\nA : Type u_2\ninst✝⁴ : CommRing R\ninst✝³ : IsDomain R\ninst✝² : GCDMonoid R\ninst✝¹ : CommRing A\ninst✝ : Algebra R A\nX : FractionRing R\nx✝ : IsIntegral R X\np : R[X]\nhp₁ : Polynomial.Monic p\nhp₂ : Polynomial.eval₂ (algebraMap R (FractionRing R)) X p = 0\nx y : R\nhg : IsUnit (gcd x y)\nhe : X * ↑(algebraMap R (FractionRing R)) y = ↑(algebraMap R (FractionRing R)) x\nthis✝ : y ∣ x ^ Polynomial.natDegree p\nthis : IsUnit y\n⊢ ↑(algebraMap R (FractionRing R)) (x * ↑(IsUnit.unit this)⁻¹) = X\n[PROOFSTEP]\nerw [map_mul, ← Units.coe_map_inv, eq_comm, Units.eq_mul_inv_iff_mul_eq]\n[GOAL]\ncase h\nR : Type u_1\nA : Type u_2\ninst✝⁴ : CommRing R\ninst✝³ : IsDomain R\ninst✝² : GCDMonoid R\ninst✝¹ : CommRing A\ninst✝ : Algebra R A\nX : FractionRing R\nx✝ : IsIntegral R X\np : R[X]\nhp₁ : Polynomial.Monic p\nhp₂ : Polynomial.eval₂ (algebraMap R (FractionRing R)) X p = 0\nx y : R\nhg : IsUnit (gcd x y)\nhe : X * ↑(algebraMap R (FractionRing R)) y = ↑(algebraMap R (FractionRing R)) x\nthis✝ : y ∣ x ^ Polynomial.natDegree p\nthis : IsUnit y\n⊢ X * ↑(↑(Units.map ↑(algebraMap R (FractionRing R))) (IsUnit.unit this)) = ↑(algebraMap R (FractionRing R)) x\n[PROOFSTEP]\nexact he\n", "meta": {"mathlib_filename": "Mathlib.Algebra.GCDMonoid.IntegrallyClosed", "llama_tokens": 4580, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7718434978390747, "lm_q2_score": 0.6723317123102956, "lm_q1q2_score": 0.5189348605377131}}
{"text": "[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : StrictOrderedCommRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y : P\nh : WSameSide s x y\nf : P →ᵃ[R] P'\n⊢ WSameSide (AffineSubspace.map f s) (↑f x) (↑f y)\n[PROOFSTEP]\nrcases h with ⟨p₁, hp₁, p₂, hp₂, h⟩\n[GOAL]\ncase intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : StrictOrderedCommRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y : P\nf : P →ᵃ[R] P'\np₁ : P\nhp₁ : p₁ ∈ s\np₂ : P\nhp₂ : p₂ ∈ s\nh : SameRay R (x -ᵥ p₁) (y -ᵥ p₂)\n⊢ WSameSide (AffineSubspace.map f s) (↑f x) (↑f y)\n[PROOFSTEP]\nrefine' ⟨f p₁, mem_map_of_mem f hp₁, f p₂, mem_map_of_mem f hp₂, _⟩\n[GOAL]\ncase intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : StrictOrderedCommRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y : P\nf : P →ᵃ[R] P'\np₁ : P\nhp₁ : p₁ ∈ s\np₂ : P\nhp₂ : p₂ ∈ s\nh : SameRay R (x -ᵥ p₁) (y -ᵥ p₂)\n⊢ SameRay R (↑f x -ᵥ ↑f p₁) (↑f y -ᵥ ↑f p₂)\n[PROOFSTEP]\nsimp_rw [← linearMap_vsub]\n[GOAL]\ncase intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : StrictOrderedCommRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y : P\nf : P →ᵃ[R] P'\np₁ : P\nhp₁ : p₁ ∈ s\np₂ : P\nhp₂ : p₂ ∈ s\nh : SameRay R (x -ᵥ p₁) (y -ᵥ p₂)\n⊢ SameRay R (↑f.linear (x -ᵥ p₁)) (↑f.linear (y -ᵥ p₂))\n[PROOFSTEP]\nexact h.map f.linear\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : StrictOrderedCommRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y : P\nf : P →ᵃ[R] P'\nhf : Function.Injective ↑f\n⊢ WSameSide (map f s) (↑f x) (↑f y) ↔ WSameSide s x y\n[PROOFSTEP]\nrefine' ⟨fun h => _, fun h => h.map _⟩\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : StrictOrderedCommRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y : P\nf : P →ᵃ[R] P'\nhf : Function.Injective ↑f\nh : WSameSide (map f s) (↑f x) (↑f y)\n⊢ WSameSide s x y\n[PROOFSTEP]\nrcases h with ⟨fp₁, hfp₁, fp₂, hfp₂, h⟩\n[GOAL]\ncase intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : StrictOrderedCommRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y : P\nf : P →ᵃ[R] P'\nhf : Function.Injective ↑f\nfp₁ : P'\nhfp₁ : fp₁ ∈ map f s\nfp₂ : P'\nhfp₂ : fp₂ ∈ map f s\nh : SameRay R (↑f x -ᵥ fp₁) (↑f y -ᵥ fp₂)\n⊢ WSameSide s x y\n[PROOFSTEP]\nrw [mem_map] at hfp₁ hfp₂ \n[GOAL]\ncase intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : StrictOrderedCommRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y : P\nf : P →ᵃ[R] P'\nhf : Function.Injective ↑f\nfp₁ : P'\nhfp₁ : ∃ y, y ∈ s ∧ ↑f y = fp₁\nfp₂ : P'\nhfp₂ : ∃ y, y ∈ s ∧ ↑f y = fp₂\nh : SameRay R (↑f x -ᵥ fp₁) (↑f y -ᵥ fp₂)\n⊢ WSameSide s x y\n[PROOFSTEP]\nrcases hfp₁ with ⟨p₁, hp₁, rfl⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : StrictOrderedCommRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y : P\nf : P →ᵃ[R] P'\nhf : Function.Injective ↑f\nfp₂ : P'\nhfp₂ : ∃ y, y ∈ s ∧ ↑f y = fp₂\np₁ : P\nhp₁ : p₁ ∈ s\nh : SameRay R (↑f x -ᵥ ↑f p₁) (↑f y -ᵥ fp₂)\n⊢ WSameSide s x y\n[PROOFSTEP]\nrcases hfp₂ with ⟨p₂, hp₂, rfl⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : StrictOrderedCommRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y : P\nf : P →ᵃ[R] P'\nhf : Function.Injective ↑f\np₁ : P\nhp₁ : p₁ ∈ s\np₂ : P\nhp₂ : p₂ ∈ s\nh : SameRay R (↑f x -ᵥ ↑f p₁) (↑f y -ᵥ ↑f p₂)\n⊢ WSameSide s x y\n[PROOFSTEP]\nrefine' ⟨p₁, hp₁, p₂, hp₂, _⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : StrictOrderedCommRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y : P\nf : P →ᵃ[R] P'\nhf : Function.Injective ↑f\np₁ : P\nhp₁ : p₁ ∈ s\np₂ : P\nhp₂ : p₂ ∈ s\nh : SameRay R (↑f x -ᵥ ↑f p₁) (↑f y -ᵥ ↑f p₂)\n⊢ SameRay R (x -ᵥ p₁) (y -ᵥ p₂)\n[PROOFSTEP]\nsimp_rw [← linearMap_vsub, (f.linear_injective_iff.2 hf).sameRay_map_iff] at h \n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : StrictOrderedCommRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y : P\nf : P →ᵃ[R] P'\nhf : Function.Injective ↑f\np₁ : P\nhp₁ : p₁ ∈ s\np₂ : P\nhp₂ : p₂ ∈ s\nh : SameRay R (x -ᵥ p₁) (y -ᵥ p₂)\n⊢ SameRay R (x -ᵥ p₁) (y -ᵥ p₂)\n[PROOFSTEP]\nexact h\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : StrictOrderedCommRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y : P\nf : P →ᵃ[R] P'\nhf : Function.Injective ↑f\n⊢ SSameSide (map f s) (↑f x) (↑f y) ↔ SSameSide s x y\n[PROOFSTEP]\nsimp_rw [SSameSide, hf.wSameSide_map_iff, mem_map_iff_mem_of_injective hf]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : StrictOrderedCommRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y : P\nh : WOppSide s x y\nf : P →ᵃ[R] P'\n⊢ WOppSide (AffineSubspace.map f s) (↑f x) (↑f y)\n[PROOFSTEP]\nrcases h with ⟨p₁, hp₁, p₂, hp₂, h⟩\n[GOAL]\ncase intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : StrictOrderedCommRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y : P\nf : P →ᵃ[R] P'\np₁ : P\nhp₁ : p₁ ∈ s\np₂ : P\nhp₂ : p₂ ∈ s\nh : SameRay R (x -ᵥ p₁) (p₂ -ᵥ y)\n⊢ WOppSide (AffineSubspace.map f s) (↑f x) (↑f y)\n[PROOFSTEP]\nrefine' ⟨f p₁, mem_map_of_mem f hp₁, f p₂, mem_map_of_mem f hp₂, _⟩\n[GOAL]\ncase intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : StrictOrderedCommRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y : P\nf : P →ᵃ[R] P'\np₁ : P\nhp₁ : p₁ ∈ s\np₂ : P\nhp₂ : p₂ ∈ s\nh : SameRay R (x -ᵥ p₁) (p₂ -ᵥ y)\n⊢ SameRay R (↑f x -ᵥ ↑f p₁) (↑f p₂ -ᵥ ↑f y)\n[PROOFSTEP]\nsimp_rw [← linearMap_vsub]\n[GOAL]\ncase intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : StrictOrderedCommRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y : P\nf : P →ᵃ[R] P'\np₁ : P\nhp₁ : p₁ ∈ s\np₂ : P\nhp₂ : p₂ ∈ s\nh : SameRay R (x -ᵥ p₁) (p₂ -ᵥ y)\n⊢ SameRay R (↑f.linear (x -ᵥ p₁)) (↑f.linear (p₂ -ᵥ y))\n[PROOFSTEP]\nexact h.map f.linear\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : StrictOrderedCommRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y : P\nf : P →ᵃ[R] P'\nhf : Function.Injective ↑f\n⊢ WOppSide (map f s) (↑f x) (↑f y) ↔ WOppSide s x y\n[PROOFSTEP]\nrefine' ⟨fun h => _, fun h => h.map _⟩\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : StrictOrderedCommRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y : P\nf : P →ᵃ[R] P'\nhf : Function.Injective ↑f\nh : WOppSide (map f s) (↑f x) (↑f y)\n⊢ WOppSide s x y\n[PROOFSTEP]\nrcases h with ⟨fp₁, hfp₁, fp₂, hfp₂, h⟩\n[GOAL]\ncase intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : StrictOrderedCommRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y : P\nf : P →ᵃ[R] P'\nhf : Function.Injective ↑f\nfp₁ : P'\nhfp₁ : fp₁ ∈ map f s\nfp₂ : P'\nhfp₂ : fp₂ ∈ map f s\nh : SameRay R (↑f x -ᵥ fp₁) (fp₂ -ᵥ ↑f y)\n⊢ WOppSide s x y\n[PROOFSTEP]\nrw [mem_map] at hfp₁ hfp₂ \n[GOAL]\ncase intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : StrictOrderedCommRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y : P\nf : P →ᵃ[R] P'\nhf : Function.Injective ↑f\nfp₁ : P'\nhfp₁ : ∃ y, y ∈ s ∧ ↑f y = fp₁\nfp₂ : P'\nhfp₂ : ∃ y, y ∈ s ∧ ↑f y = fp₂\nh : SameRay R (↑f x -ᵥ fp₁) (fp₂ -ᵥ ↑f y)\n⊢ WOppSide s x y\n[PROOFSTEP]\nrcases hfp₁ with ⟨p₁, hp₁, rfl⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : StrictOrderedCommRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y : P\nf : P →ᵃ[R] P'\nhf : Function.Injective ↑f\nfp₂ : P'\nhfp₂ : ∃ y, y ∈ s ∧ ↑f y = fp₂\np₁ : P\nhp₁ : p₁ ∈ s\nh : SameRay R (↑f x -ᵥ ↑f p₁) (fp₂ -ᵥ ↑f y)\n⊢ WOppSide s x y\n[PROOFSTEP]\nrcases hfp₂ with ⟨p₂, hp₂, rfl⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : StrictOrderedCommRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y : P\nf : P →ᵃ[R] P'\nhf : Function.Injective ↑f\np₁ : P\nhp₁ : p₁ ∈ s\np₂ : P\nhp₂ : p₂ ∈ s\nh : SameRay R (↑f x -ᵥ ↑f p₁) (↑f p₂ -ᵥ ↑f y)\n⊢ WOppSide s x y\n[PROOFSTEP]\nrefine' ⟨p₁, hp₁, p₂, hp₂, _⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : StrictOrderedCommRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y : P\nf : P →ᵃ[R] P'\nhf : Function.Injective ↑f\np₁ : P\nhp₁ : p₁ ∈ s\np₂ : P\nhp₂ : p₂ ∈ s\nh : SameRay R (↑f x -ᵥ ↑f p₁) (↑f p₂ -ᵥ ↑f y)\n⊢ SameRay R (x -ᵥ p₁) (p₂ -ᵥ y)\n[PROOFSTEP]\nsimp_rw [← linearMap_vsub, (f.linear_injective_iff.2 hf).sameRay_map_iff] at h \n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : StrictOrderedCommRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y : P\nf : P →ᵃ[R] P'\nhf : Function.Injective ↑f\np₁ : P\nhp₁ : p₁ ∈ s\np₂ : P\nhp₂ : p₂ ∈ s\nh : SameRay R (x -ᵥ p₁) (p₂ -ᵥ y)\n⊢ SameRay R (x -ᵥ p₁) (p₂ -ᵥ y)\n[PROOFSTEP]\nexact h\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : StrictOrderedCommRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y : P\nf : P →ᵃ[R] P'\nhf : Function.Injective ↑f\n⊢ SOppSide (map f s) (↑f x) (↑f y) ↔ SOppSide s x y\n[PROOFSTEP]\nsimp_rw [SOppSide, hf.wOppSide_map_iff, mem_map_iff_mem_of_injective hf]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : StrictOrderedCommRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y : P\n⊢ SSameSide s x y ↔ SSameSide s y x\n[PROOFSTEP]\nrw [SSameSide, SSameSide, wSameSide_comm, and_comm (b := x ∉ s)]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : StrictOrderedCommRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y : P\n⊢ WOppSide s x y ↔ WOppSide s y x\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : StrictOrderedCommRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y : P\n⊢ WOppSide s x y → WOppSide s y x\n[PROOFSTEP]\nrintro ⟨p₁, hp₁, p₂, hp₂, h⟩\n[GOAL]\ncase mp.intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : StrictOrderedCommRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y p₁ : P\nhp₁ : p₁ ∈ s\np₂ : P\nhp₂ : p₂ ∈ s\nh : SameRay R (x -ᵥ p₁) (p₂ -ᵥ y)\n⊢ WOppSide s y x\n[PROOFSTEP]\nrefine' ⟨p₂, hp₂, p₁, hp₁, _⟩\n[GOAL]\ncase mp.intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : StrictOrderedCommRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y p₁ : P\nhp₁ : p₁ ∈ s\np₂ : P\nhp₂ : p₂ ∈ s\nh : SameRay R (x -ᵥ p₁) (p₂ -ᵥ y)\n⊢ SameRay R (y -ᵥ p₂) (p₁ -ᵥ x)\n[PROOFSTEP]\nrwa [SameRay.sameRay_comm, ← sameRay_neg_iff, neg_vsub_eq_vsub_rev, neg_vsub_eq_vsub_rev]\n[GOAL]\ncase mpr\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : StrictOrderedCommRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y : P\n⊢ WOppSide s y x → WOppSide s x y\n[PROOFSTEP]\nrintro ⟨p₁, hp₁, p₂, hp₂, h⟩\n[GOAL]\ncase mpr.intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : StrictOrderedCommRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y p₁ : P\nhp₁ : p₁ ∈ s\np₂ : P\nhp₂ : p₂ ∈ s\nh : SameRay R (y -ᵥ p₁) (p₂ -ᵥ x)\n⊢ WOppSide s x y\n[PROOFSTEP]\nrefine' ⟨p₂, hp₂, p₁, hp₁, _⟩\n[GOAL]\ncase mpr.intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : StrictOrderedCommRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y p₁ : P\nhp₁ : p₁ ∈ s\np₂ : P\nhp₂ : p₂ ∈ s\nh : SameRay R (y -ᵥ p₁) (p₂ -ᵥ x)\n⊢ SameRay R (x -ᵥ p₂) (p₁ -ᵥ y)\n[PROOFSTEP]\nrwa [SameRay.sameRay_comm, ← sameRay_neg_iff, neg_vsub_eq_vsub_rev, neg_vsub_eq_vsub_rev]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : StrictOrderedCommRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y : P\n⊢ SOppSide s x y ↔ SOppSide s y x\n[PROOFSTEP]\nrw [SOppSide, SOppSide, wOppSide_comm, and_comm (b := x ∉ s)]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : StrictOrderedCommRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y : P\nhx : x ∈ s\n⊢ WSameSide s x y\n[PROOFSTEP]\nrefine' ⟨x, hx, x, hx, _⟩\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : StrictOrderedCommRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y : P\nhx : x ∈ s\n⊢ SameRay R (x -ᵥ x) (y -ᵥ x)\n[PROOFSTEP]\nrw [vsub_self]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : StrictOrderedCommRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y : P\nhx : x ∈ s\n⊢ SameRay R 0 (y -ᵥ x)\n[PROOFSTEP]\napply SameRay.zero_left\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : StrictOrderedCommRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y : P\nhx : x ∈ s\n⊢ WOppSide s x y\n[PROOFSTEP]\nrefine' ⟨x, hx, x, hx, _⟩\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : StrictOrderedCommRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y : P\nhx : x ∈ s\n⊢ SameRay R (x -ᵥ x) (x -ᵥ y)\n[PROOFSTEP]\nrw [vsub_self]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : StrictOrderedCommRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y : P\nhx : x ∈ s\n⊢ SameRay R 0 (x -ᵥ y)\n[PROOFSTEP]\napply SameRay.zero_left\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : StrictOrderedCommRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y : P\nv : V\nhv : v ∈ direction s\n⊢ WSameSide s (v +ᵥ x) y ↔ WSameSide s x y\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : StrictOrderedCommRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y : P\nv : V\nhv : v ∈ direction s\n⊢ WSameSide s (v +ᵥ x) y → WSameSide s x y\n[PROOFSTEP]\nrintro ⟨p₁, hp₁, p₂, hp₂, h⟩\n[GOAL]\ncase mp.intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : StrictOrderedCommRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y : P\nv : V\nhv : v ∈ direction s\np₁ : P\nhp₁ : p₁ ∈ s\np₂ : P\nhp₂ : p₂ ∈ s\nh : SameRay R (v +ᵥ x -ᵥ p₁) (y -ᵥ p₂)\n⊢ WSameSide s x y\n[PROOFSTEP]\nrefine' ⟨-v +ᵥ p₁, AffineSubspace.vadd_mem_of_mem_direction (Submodule.neg_mem _ hv) hp₁, p₂, hp₂, _⟩\n[GOAL]\ncase mp.intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : StrictOrderedCommRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y : P\nv : V\nhv : v ∈ direction s\np₁ : P\nhp₁ : p₁ ∈ s\np₂ : P\nhp₂ : p₂ ∈ s\nh : SameRay R (v +ᵥ x -ᵥ p₁) (y -ᵥ p₂)\n⊢ SameRay R (x -ᵥ (-v +ᵥ p₁)) (y -ᵥ p₂)\n[PROOFSTEP]\nrwa [vsub_vadd_eq_vsub_sub, sub_neg_eq_add, add_comm, ← vadd_vsub_assoc]\n[GOAL]\ncase mpr\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : StrictOrderedCommRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y : P\nv : V\nhv : v ∈ direction s\n⊢ WSameSide s x y → WSameSide s (v +ᵥ x) y\n[PROOFSTEP]\nrintro ⟨p₁, hp₁, p₂, hp₂, h⟩\n[GOAL]\ncase mpr.intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : StrictOrderedCommRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y : P\nv : V\nhv : v ∈ direction s\np₁ : P\nhp₁ : p₁ ∈ s\np₂ : P\nhp₂ : p₂ ∈ s\nh : SameRay R (x -ᵥ p₁) (y -ᵥ p₂)\n⊢ WSameSide s (v +ᵥ x) y\n[PROOFSTEP]\nrefine' ⟨v +ᵥ p₁, AffineSubspace.vadd_mem_of_mem_direction hv hp₁, p₂, hp₂, _⟩\n[GOAL]\ncase mpr.intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : StrictOrderedCommRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y : P\nv : V\nhv : v ∈ direction s\np₁ : P\nhp₁ : p₁ ∈ s\np₂ : P\nhp₂ : p₂ ∈ s\nh : SameRay R (x -ᵥ p₁) (y -ᵥ p₂)\n⊢ SameRay R (v +ᵥ x -ᵥ (v +ᵥ p₁)) (y -ᵥ p₂)\n[PROOFSTEP]\nrwa [vadd_vsub_vadd_cancel_left]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : StrictOrderedCommRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y : P\nv : V\nhv : v ∈ direction s\n⊢ WSameSide s x (v +ᵥ y) ↔ WSameSide s x y\n[PROOFSTEP]\nrw [wSameSide_comm, wSameSide_vadd_left_iff hv, wSameSide_comm]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : StrictOrderedCommRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y : P\nv : V\nhv : v ∈ direction s\n⊢ SSameSide s (v +ᵥ x) y ↔ SSameSide s x y\n[PROOFSTEP]\nrw [SSameSide, SSameSide, wSameSide_vadd_left_iff hv, vadd_mem_iff_mem_of_mem_direction hv]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : StrictOrderedCommRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y : P\nv : V\nhv : v ∈ direction s\n⊢ SSameSide s x (v +ᵥ y) ↔ SSameSide s x y\n[PROOFSTEP]\nrw [sSameSide_comm, sSameSide_vadd_left_iff hv, sSameSide_comm]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : StrictOrderedCommRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y : P\nv : V\nhv : v ∈ direction s\n⊢ WOppSide s (v +ᵥ x) y ↔ WOppSide s x y\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : StrictOrderedCommRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y : P\nv : V\nhv : v ∈ direction s\n⊢ WOppSide s (v +ᵥ x) y → WOppSide s x y\n[PROOFSTEP]\nrintro ⟨p₁, hp₁, p₂, hp₂, h⟩\n[GOAL]\ncase mp.intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : StrictOrderedCommRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y : P\nv : V\nhv : v ∈ direction s\np₁ : P\nhp₁ : p₁ ∈ s\np₂ : P\nhp₂ : p₂ ∈ s\nh : SameRay R (v +ᵥ x -ᵥ p₁) (p₂ -ᵥ y)\n⊢ WOppSide s x y\n[PROOFSTEP]\nrefine' ⟨-v +ᵥ p₁, AffineSubspace.vadd_mem_of_mem_direction (Submodule.neg_mem _ hv) hp₁, p₂, hp₂, _⟩\n[GOAL]\ncase mp.intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : StrictOrderedCommRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y : P\nv : V\nhv : v ∈ direction s\np₁ : P\nhp₁ : p₁ ∈ s\np₂ : P\nhp₂ : p₂ ∈ s\nh : SameRay R (v +ᵥ x -ᵥ p₁) (p₂ -ᵥ y)\n⊢ SameRay R (x -ᵥ (-v +ᵥ p₁)) (p₂ -ᵥ y)\n[PROOFSTEP]\nrwa [vsub_vadd_eq_vsub_sub, sub_neg_eq_add, add_comm, ← vadd_vsub_assoc]\n[GOAL]\ncase mpr\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : StrictOrderedCommRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y : P\nv : V\nhv : v ∈ direction s\n⊢ WOppSide s x y → WOppSide s (v +ᵥ x) y\n[PROOFSTEP]\nrintro ⟨p₁, hp₁, p₂, hp₂, h⟩\n[GOAL]\ncase mpr.intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : StrictOrderedCommRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y : P\nv : V\nhv : v ∈ direction s\np₁ : P\nhp₁ : p₁ ∈ s\np₂ : P\nhp₂ : p₂ ∈ s\nh : SameRay R (x -ᵥ p₁) (p₂ -ᵥ y)\n⊢ WOppSide s (v +ᵥ x) y\n[PROOFSTEP]\nrefine' ⟨v +ᵥ p₁, AffineSubspace.vadd_mem_of_mem_direction hv hp₁, p₂, hp₂, _⟩\n[GOAL]\ncase mpr.intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : StrictOrderedCommRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y : P\nv : V\nhv : v ∈ direction s\np₁ : P\nhp₁ : p₁ ∈ s\np₂ : P\nhp₂ : p₂ ∈ s\nh : SameRay R (x -ᵥ p₁) (p₂ -ᵥ y)\n⊢ SameRay R (v +ᵥ x -ᵥ (v +ᵥ p₁)) (p₂ -ᵥ y)\n[PROOFSTEP]\nrwa [vadd_vsub_vadd_cancel_left]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : StrictOrderedCommRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y : P\nv : V\nhv : v ∈ direction s\n⊢ WOppSide s x (v +ᵥ y) ↔ WOppSide s x y\n[PROOFSTEP]\nrw [wOppSide_comm, wOppSide_vadd_left_iff hv, wOppSide_comm]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : StrictOrderedCommRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y : P\nv : V\nhv : v ∈ direction s\n⊢ SOppSide s (v +ᵥ x) y ↔ SOppSide s x y\n[PROOFSTEP]\nrw [SOppSide, SOppSide, wOppSide_vadd_left_iff hv, vadd_mem_iff_mem_of_mem_direction hv]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : StrictOrderedCommRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y : P\nv : V\nhv : v ∈ direction s\n⊢ SOppSide s x (v +ᵥ y) ↔ SOppSide s x y\n[PROOFSTEP]\nrw [sOppSide_comm, sOppSide_vadd_left_iff hv, sOppSide_comm]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : StrictOrderedCommRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\np₁ p₂ x : P\nhp₁ : p₁ ∈ s\nhp₂ : p₂ ∈ s\nt : R\nht : 0 ≤ t\n⊢ WSameSide s (t • (x -ᵥ p₁) +ᵥ p₂) x\n[PROOFSTEP]\nrefine' ⟨p₂, hp₂, p₁, hp₁, _⟩\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : StrictOrderedCommRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\np₁ p₂ x : P\nhp₁ : p₁ ∈ s\nhp₂ : p₂ ∈ s\nt : R\nht : 0 ≤ t\n⊢ SameRay R (t • (x -ᵥ p₁) +ᵥ p₂ -ᵥ p₂) (x -ᵥ p₁)\n[PROOFSTEP]\nrw [vadd_vsub]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : StrictOrderedCommRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\np₁ p₂ x : P\nhp₁ : p₁ ∈ s\nhp₂ : p₂ ∈ s\nt : R\nht : 0 ≤ t\n⊢ SameRay R (t • (x -ᵥ p₁)) (x -ᵥ p₁)\n[PROOFSTEP]\nexact SameRay.sameRay_nonneg_smul_left _ ht\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : StrictOrderedCommRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\np₁ p₂ x : P\nhp₁ : p₁ ∈ s\nhp₂ : p₂ ∈ s\nt : R\nht : t ≤ 0\n⊢ WOppSide s (t • (x -ᵥ p₁) +ᵥ p₂) x\n[PROOFSTEP]\nrefine' ⟨p₂, hp₂, p₁, hp₁, _⟩\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : StrictOrderedCommRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\np₁ p₂ x : P\nhp₁ : p₁ ∈ s\nhp₂ : p₂ ∈ s\nt : R\nht : t ≤ 0\n⊢ SameRay R (t • (x -ᵥ p₁) +ᵥ p₂ -ᵥ p₂) (p₁ -ᵥ x)\n[PROOFSTEP]\nrw [vadd_vsub, ← neg_neg t, neg_smul, ← smul_neg, neg_vsub_eq_vsub_rev]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : StrictOrderedCommRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\np₁ p₂ x : P\nhp₁ : p₁ ∈ s\nhp₂ : p₂ ∈ s\nt : R\nht : t ≤ 0\n⊢ SameRay R (-t • (p₁ -ᵥ x)) (p₁ -ᵥ x)\n[PROOFSTEP]\nexact SameRay.sameRay_nonneg_smul_left _ (neg_nonneg.2 ht)\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : StrictOrderedCommRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y z : P\nh : Wbtw R x y z\nhx : x ∈ s\n⊢ WSameSide s y z\n[PROOFSTEP]\nrcases h with ⟨t, ⟨ht0, -⟩, rfl⟩\n[GOAL]\ncase intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : StrictOrderedCommRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx z : P\nhx : x ∈ s\nt : R\nht0 : 0 ≤ t\n⊢ WSameSide s (↑(lineMap x z) t) z\n[PROOFSTEP]\nexact wSameSide_lineMap_left z hx ht0\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : StrictOrderedCommRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y z : P\nh : Wbtw R x y z\nhy : y ∈ s\n⊢ WOppSide s x z\n[PROOFSTEP]\nrcases h with ⟨t, ⟨ht0, ht1⟩, rfl⟩\n[GOAL]\ncase intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : StrictOrderedCommRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx z : P\nt : R\nht0 : 0 ≤ t\nht1 : t ≤ 1\nhy : ↑(lineMap x z) t ∈ s\n⊢ WOppSide s x z\n[PROOFSTEP]\nrefine' ⟨_, hy, _, hy, _⟩\n[GOAL]\ncase intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : StrictOrderedCommRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx z : P\nt : R\nht0 : 0 ≤ t\nht1 : t ≤ 1\nhy : ↑(lineMap x z) t ∈ s\n⊢ SameRay R (x -ᵥ ↑(lineMap x z) t) (↑(lineMap x z) t -ᵥ z)\n[PROOFSTEP]\nrcases ht1.lt_or_eq with (ht1' | rfl)\n[GOAL]\ncase intro.intro.intro.inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : StrictOrderedCommRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx z : P\nt : R\nht0 : 0 ≤ t\nht1 : t ≤ 1\nhy : ↑(lineMap x z) t ∈ s\nht1' : t < 1\n⊢ SameRay R (x -ᵥ ↑(lineMap x z) t) (↑(lineMap x z) t -ᵥ z)\ncase intro.intro.intro.inr\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : StrictOrderedCommRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx z : P\nht0 : 0 ≤ 1\nht1 : 1 ≤ 1\nhy : ↑(lineMap x z) 1 ∈ s\n⊢ SameRay R (x -ᵥ ↑(lineMap x z) 1) (↑(lineMap x z) 1 -ᵥ z)\n[PROOFSTEP]\nswap\n[GOAL]\ncase intro.intro.intro.inr\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : StrictOrderedCommRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx z : P\nht0 : 0 ≤ 1\nht1 : 1 ≤ 1\nhy : ↑(lineMap x z) 1 ∈ s\n⊢ SameRay R (x -ᵥ ↑(lineMap x z) 1) (↑(lineMap x z) 1 -ᵥ z)\n[PROOFSTEP]\nrw [lineMap_apply_one]\n[GOAL]\ncase intro.intro.intro.inr\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : StrictOrderedCommRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx z : P\nht0 : 0 ≤ 1\nht1 : 1 ≤ 1\nhy : ↑(lineMap x z) 1 ∈ s\n⊢ SameRay R (x -ᵥ z) (z -ᵥ z)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase intro.intro.intro.inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : StrictOrderedCommRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx z : P\nt : R\nht0 : 0 ≤ t\nht1 : t ≤ 1\nhy : ↑(lineMap x z) t ∈ s\nht1' : t < 1\n⊢ SameRay R (x -ᵥ ↑(lineMap x z) t) (↑(lineMap x z) t -ᵥ z)\n[PROOFSTEP]\nrcases ht0.lt_or_eq with (ht0' | rfl)\n[GOAL]\ncase intro.intro.intro.inl.inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : StrictOrderedCommRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx z : P\nt : R\nht0 : 0 ≤ t\nht1 : t ≤ 1\nhy : ↑(lineMap x z) t ∈ s\nht1' : t < 1\nht0' : 0 < t\n⊢ SameRay R (x -ᵥ ↑(lineMap x z) t) (↑(lineMap x z) t -ᵥ z)\ncase intro.intro.intro.inl.inr\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : StrictOrderedCommRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx z : P\nht0 : 0 ≤ 0\nht1 : 0 ≤ 1\nhy : ↑(lineMap x z) 0 ∈ s\nht1' : 0 < 1\n⊢ SameRay R (x -ᵥ ↑(lineMap x z) 0) (↑(lineMap x z) 0 -ᵥ z)\n[PROOFSTEP]\nswap\n[GOAL]\ncase intro.intro.intro.inl.inr\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : StrictOrderedCommRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx z : P\nht0 : 0 ≤ 0\nht1 : 0 ≤ 1\nhy : ↑(lineMap x z) 0 ∈ s\nht1' : 0 < 1\n⊢ SameRay R (x -ᵥ ↑(lineMap x z) 0) (↑(lineMap x z) 0 -ᵥ z)\n[PROOFSTEP]\nrw [lineMap_apply_zero]\n[GOAL]\ncase intro.intro.intro.inl.inr\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : StrictOrderedCommRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx z : P\nht0 : 0 ≤ 0\nht1 : 0 ≤ 1\nhy : ↑(lineMap x z) 0 ∈ s\nht1' : 0 < 1\n⊢ SameRay R (x -ᵥ x) (x -ᵥ z)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase intro.intro.intro.inl.inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : StrictOrderedCommRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx z : P\nt : R\nht0 : 0 ≤ t\nht1 : t ≤ 1\nhy : ↑(lineMap x z) t ∈ s\nht1' : t < 1\nht0' : 0 < t\n⊢ SameRay R (x -ᵥ ↑(lineMap x z) t) (↑(lineMap x z) t -ᵥ z)\n[PROOFSTEP]\nrefine'\n  Or.inr\n    (Or.inr ⟨1 - t, t, sub_pos.2 ht1', ht0', _⟩)\n      -- TODO: after lean4#2336 \"simp made no progress feature\"\n        -- had to add `_` to several lemmas here. Not sure why!\n[GOAL]\ncase intro.intro.intro.inl.inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : StrictOrderedCommRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx z : P\nt : R\nht0 : 0 ≤ t\nht1 : t ≤ 1\nhy : ↑(lineMap x z) t ∈ s\nht1' : t < 1\nht0' : 0 < t\n⊢ (1 - t) • (x -ᵥ ↑(lineMap x z) t) = t • (↑(lineMap x z) t -ᵥ z)\n[PROOFSTEP]\nsimp_rw [lineMap_apply _, vadd_vsub_assoc _, vsub_vadd_eq_vsub_sub _, ← neg_vsub_eq_vsub_rev z x, vsub_self _, zero_sub,\n  ← neg_one_smul R (z -ᵥ x), ← add_smul, smul_neg, ← neg_smul, smul_smul]\n[GOAL]\ncase intro.intro.intro.inl.inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : StrictOrderedCommRing R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx z : P\nt : R\nht0 : 0 ≤ t\nht1 : t ≤ 1\nhy : ↑(lineMap x z) t ∈ s\nht1' : t < 1\nht0' : 0 < t\n⊢ (-(1 - t) * t) • (z -ᵥ x) = (t * (t + -1)) • (z -ᵥ x)\n[PROOFSTEP]\nring_nf\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx : P\n⊢ WOppSide s x x ↔ x ∈ s\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx : P\n⊢ WOppSide s x x → x ∈ s\n[PROOFSTEP]\nrintro ⟨p₁, hp₁, p₂, hp₂, h⟩\n[GOAL]\ncase mp.intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx p₁ : P\nhp₁ : p₁ ∈ s\np₂ : P\nhp₂ : p₂ ∈ s\nh : SameRay R (x -ᵥ p₁) (p₂ -ᵥ x)\n⊢ x ∈ s\n[PROOFSTEP]\nobtain ⟨a, -, -, -, -, h₁, -⟩ := h.exists_eq_smul_add\n[GOAL]\ncase mp.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx p₁ : P\nhp₁ : p₁ ∈ s\np₂ : P\nhp₂ : p₂ ∈ s\nh : SameRay R (x -ᵥ p₁) (p₂ -ᵥ x)\na : R\nh₁ : x -ᵥ p₁ = a • (x -ᵥ p₁ + (p₂ -ᵥ x))\n⊢ x ∈ s\n[PROOFSTEP]\nrw [add_comm, vsub_add_vsub_cancel, ← eq_vadd_iff_vsub_eq] at h₁ \n[GOAL]\ncase mp.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx p₁ : P\nhp₁ : p₁ ∈ s\np₂ : P\nhp₂ : p₂ ∈ s\nh : SameRay R (x -ᵥ p₁) (p₂ -ᵥ x)\na : R\nh₁ : x = a • (p₂ -ᵥ p₁) +ᵥ p₁\n⊢ x ∈ s\n[PROOFSTEP]\nrw [h₁]\n[GOAL]\ncase mp.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx p₁ : P\nhp₁ : p₁ ∈ s\np₂ : P\nhp₂ : p₂ ∈ s\nh : SameRay R (x -ᵥ p₁) (p₂ -ᵥ x)\na : R\nh₁ : x = a • (p₂ -ᵥ p₁) +ᵥ p₁\n⊢ a • (p₂ -ᵥ p₁) +ᵥ p₁ ∈ s\n[PROOFSTEP]\nexact s.smul_vsub_vadd_mem a hp₂ hp₁ hp₁\n[GOAL]\ncase mpr\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx : P\n⊢ x ∈ s → WOppSide s x x\n[PROOFSTEP]\nexact fun h => ⟨x, h, x, h, SameRay.rfl⟩\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx : P\n⊢ ¬SOppSide s x x\n[PROOFSTEP]\nrw [SOppSide]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx : P\n⊢ ¬(WOppSide s x x ∧ ¬x ∈ s ∧ ¬x ∈ s)\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y p₁ : P\nh : p₁ ∈ s\n⊢ WSameSide s x y ↔ x ∈ s ∨ ∃ p₂, p₂ ∈ s ∧ SameRay R (x -ᵥ p₁) (y -ᵥ p₂)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y p₁ : P\nh : p₁ ∈ s\n⊢ WSameSide s x y → x ∈ s ∨ ∃ p₂, p₂ ∈ s ∧ SameRay R (x -ᵥ p₁) (y -ᵥ p₂)\n[PROOFSTEP]\nrintro ⟨p₁', hp₁', p₂', hp₂', h0 | h0 | ⟨r₁, r₂, hr₁, hr₂, hr⟩⟩\n[GOAL]\ncase mp.intro.intro.intro.intro.inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y p₁ : P\nh : p₁ ∈ s\np₁' : P\nhp₁' : p₁' ∈ s\np₂' : P\nhp₂' : p₂' ∈ s\nh0 : x -ᵥ p₁' = 0\n⊢ x ∈ s ∨ ∃ p₂, p₂ ∈ s ∧ SameRay R (x -ᵥ p₁) (y -ᵥ p₂)\n[PROOFSTEP]\nrw [vsub_eq_zero_iff_eq] at h0 \n[GOAL]\ncase mp.intro.intro.intro.intro.inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y p₁ : P\nh : p₁ ∈ s\np₁' : P\nhp₁' : p₁' ∈ s\np₂' : P\nhp₂' : p₂' ∈ s\nh0 : x = p₁'\n⊢ x ∈ s ∨ ∃ p₂, p₂ ∈ s ∧ SameRay R (x -ᵥ p₁) (y -ᵥ p₂)\n[PROOFSTEP]\nrw [h0]\n[GOAL]\ncase mp.intro.intro.intro.intro.inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y p₁ : P\nh : p₁ ∈ s\np₁' : P\nhp₁' : p₁' ∈ s\np₂' : P\nhp₂' : p₂' ∈ s\nh0 : x = p₁'\n⊢ p₁' ∈ s ∨ ∃ p₂, p₂ ∈ s ∧ SameRay R (p₁' -ᵥ p₁) (y -ᵥ p₂)\n[PROOFSTEP]\nexact Or.inl hp₁'\n[GOAL]\ncase mp.intro.intro.intro.intro.inr.inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y p₁ : P\nh : p₁ ∈ s\np₁' : P\nhp₁' : p₁' ∈ s\np₂' : P\nhp₂' : p₂' ∈ s\nh0 : y -ᵥ p₂' = 0\n⊢ x ∈ s ∨ ∃ p₂, p₂ ∈ s ∧ SameRay R (x -ᵥ p₁) (y -ᵥ p₂)\n[PROOFSTEP]\nrefine' Or.inr ⟨p₂', hp₂', _⟩\n[GOAL]\ncase mp.intro.intro.intro.intro.inr.inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y p₁ : P\nh : p₁ ∈ s\np₁' : P\nhp₁' : p₁' ∈ s\np₂' : P\nhp₂' : p₂' ∈ s\nh0 : y -ᵥ p₂' = 0\n⊢ SameRay R (x -ᵥ p₁) (y -ᵥ p₂')\n[PROOFSTEP]\nrw [h0]\n[GOAL]\ncase mp.intro.intro.intro.intro.inr.inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y p₁ : P\nh : p₁ ∈ s\np₁' : P\nhp₁' : p₁' ∈ s\np₂' : P\nhp₂' : p₂' ∈ s\nh0 : y -ᵥ p₂' = 0\n⊢ SameRay R (x -ᵥ p₁) 0\n[PROOFSTEP]\nexact SameRay.zero_right _\n[GOAL]\ncase mp.intro.intro.intro.intro.inr.inr.intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y p₁ : P\nh : p₁ ∈ s\np₁' : P\nhp₁' : p₁' ∈ s\np₂' : P\nhp₂' : p₂' ∈ s\nr₁ r₂ : R\nhr₁ : 0 < r₁\nhr₂ : 0 < r₂\nhr : r₁ • (x -ᵥ p₁') = r₂ • (y -ᵥ p₂')\n⊢ x ∈ s ∨ ∃ p₂, p₂ ∈ s ∧ SameRay R (x -ᵥ p₁) (y -ᵥ p₂)\n[PROOFSTEP]\nrefine'\n  Or.inr ⟨(r₁ / r₂) • (p₁ -ᵥ p₁') +ᵥ p₂', s.smul_vsub_vadd_mem _ h hp₁' hp₂', Or.inr (Or.inr ⟨r₁, r₂, hr₁, hr₂, _⟩)⟩\n[GOAL]\ncase mp.intro.intro.intro.intro.inr.inr.intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y p₁ : P\nh : p₁ ∈ s\np₁' : P\nhp₁' : p₁' ∈ s\np₂' : P\nhp₂' : p₂' ∈ s\nr₁ r₂ : R\nhr₁ : 0 < r₁\nhr₂ : 0 < r₂\nhr : r₁ • (x -ᵥ p₁') = r₂ • (y -ᵥ p₂')\n⊢ r₁ • (x -ᵥ p₁) = r₂ • (y -ᵥ ((r₁ / r₂) • (p₁ -ᵥ p₁') +ᵥ p₂'))\n[PROOFSTEP]\nrw [vsub_vadd_eq_vsub_sub, smul_sub, ← hr, smul_smul, mul_div_cancel' _ hr₂.ne.symm, ← smul_sub,\n  vsub_sub_vsub_cancel_right]\n[GOAL]\ncase mpr\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y p₁ : P\nh : p₁ ∈ s\n⊢ (x ∈ s ∨ ∃ p₂, p₂ ∈ s ∧ SameRay R (x -ᵥ p₁) (y -ᵥ p₂)) → WSameSide s x y\n[PROOFSTEP]\nrintro (h' | ⟨h₁, h₂, h₃⟩)\n[GOAL]\ncase mpr.inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y p₁ : P\nh : p₁ ∈ s\nh' : x ∈ s\n⊢ WSameSide s x y\n[PROOFSTEP]\nexact wSameSide_of_left_mem y h'\n[GOAL]\ncase mpr.inr.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y p₁ : P\nh : p₁ ∈ s\nh₁ : P\nh₂ : h₁ ∈ s\nh₃ : SameRay R (x -ᵥ p₁) (y -ᵥ h₁)\n⊢ WSameSide s x y\n[PROOFSTEP]\nexact ⟨p₁, h, h₁, h₂, h₃⟩\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y p₂ : P\nh : p₂ ∈ s\n⊢ WSameSide s x y ↔ y ∈ s ∨ ∃ p₁, p₁ ∈ s ∧ SameRay R (x -ᵥ p₁) (y -ᵥ p₂)\n[PROOFSTEP]\nrw [wSameSide_comm, wSameSide_iff_exists_left h]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y p₂ : P\nh : p₂ ∈ s\n⊢ (y ∈ s ∨ ∃ p₂_1, p₂_1 ∈ s ∧ SameRay R (y -ᵥ p₂) (x -ᵥ p₂_1)) ↔ y ∈ s ∨ ∃ p₁, p₁ ∈ s ∧ SameRay R (x -ᵥ p₁) (y -ᵥ p₂)\n[PROOFSTEP]\nsimp_rw [SameRay.sameRay_comm]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y p₁ : P\nh : p₁ ∈ s\n⊢ SSameSide s x y ↔ ¬x ∈ s ∧ ¬y ∈ s ∧ ∃ p₂, p₂ ∈ s ∧ SameRay R (x -ᵥ p₁) (y -ᵥ p₂)\n[PROOFSTEP]\nrw [SSameSide, and_comm, wSameSide_iff_exists_left h, and_assoc, and_congr_right_iff]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y p₁ : P\nh : p₁ ∈ s\n⊢ ¬x ∈ s →\n    (¬y ∈ s ∧ (x ∈ s ∨ ∃ p₂, p₂ ∈ s ∧ SameRay R (x -ᵥ p₁) (y -ᵥ p₂)) ↔\n      ¬y ∈ s ∧ ∃ p₂, p₂ ∈ s ∧ SameRay R (x -ᵥ p₁) (y -ᵥ p₂))\n[PROOFSTEP]\nintro hx\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y p₁ : P\nh : p₁ ∈ s\nhx : ¬x ∈ s\n⊢ ¬y ∈ s ∧ (x ∈ s ∨ ∃ p₂, p₂ ∈ s ∧ SameRay R (x -ᵥ p₁) (y -ᵥ p₂)) ↔\n    ¬y ∈ s ∧ ∃ p₂, p₂ ∈ s ∧ SameRay R (x -ᵥ p₁) (y -ᵥ p₂)\n[PROOFSTEP]\nrw [or_iff_right hx]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y p₂ : P\nh : p₂ ∈ s\n⊢ SSameSide s x y ↔ ¬x ∈ s ∧ ¬y ∈ s ∧ ∃ p₁, p₁ ∈ s ∧ SameRay R (x -ᵥ p₁) (y -ᵥ p₂)\n[PROOFSTEP]\nrw [sSameSide_comm, sSameSide_iff_exists_left h, ← and_assoc, and_comm (a := y ∉ s), and_assoc]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y p₂ : P\nh : p₂ ∈ s\n⊢ (¬x ∈ s ∧ ¬y ∈ s ∧ ∃ p₂_1, p₂_1 ∈ s ∧ SameRay R (y -ᵥ p₂) (x -ᵥ p₂_1)) ↔\n    ¬x ∈ s ∧ ¬y ∈ s ∧ ∃ p₁, p₁ ∈ s ∧ SameRay R (x -ᵥ p₁) (y -ᵥ p₂)\n[PROOFSTEP]\nsimp_rw [SameRay.sameRay_comm]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y p₁ : P\nh : p₁ ∈ s\n⊢ WOppSide s x y ↔ x ∈ s ∨ ∃ p₂, p₂ ∈ s ∧ SameRay R (x -ᵥ p₁) (p₂ -ᵥ y)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y p₁ : P\nh : p₁ ∈ s\n⊢ WOppSide s x y → x ∈ s ∨ ∃ p₂, p₂ ∈ s ∧ SameRay R (x -ᵥ p₁) (p₂ -ᵥ y)\n[PROOFSTEP]\nrintro ⟨p₁', hp₁', p₂', hp₂', h0 | h0 | ⟨r₁, r₂, hr₁, hr₂, hr⟩⟩\n[GOAL]\ncase mp.intro.intro.intro.intro.inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y p₁ : P\nh : p₁ ∈ s\np₁' : P\nhp₁' : p₁' ∈ s\np₂' : P\nhp₂' : p₂' ∈ s\nh0 : x -ᵥ p₁' = 0\n⊢ x ∈ s ∨ ∃ p₂, p₂ ∈ s ∧ SameRay R (x -ᵥ p₁) (p₂ -ᵥ y)\n[PROOFSTEP]\nrw [vsub_eq_zero_iff_eq] at h0 \n[GOAL]\ncase mp.intro.intro.intro.intro.inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y p₁ : P\nh : p₁ ∈ s\np₁' : P\nhp₁' : p₁' ∈ s\np₂' : P\nhp₂' : p₂' ∈ s\nh0 : x = p₁'\n⊢ x ∈ s ∨ ∃ p₂, p₂ ∈ s ∧ SameRay R (x -ᵥ p₁) (p₂ -ᵥ y)\n[PROOFSTEP]\nrw [h0]\n[GOAL]\ncase mp.intro.intro.intro.intro.inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y p₁ : P\nh : p₁ ∈ s\np₁' : P\nhp₁' : p₁' ∈ s\np₂' : P\nhp₂' : p₂' ∈ s\nh0 : x = p₁'\n⊢ p₁' ∈ s ∨ ∃ p₂, p₂ ∈ s ∧ SameRay R (p₁' -ᵥ p₁) (p₂ -ᵥ y)\n[PROOFSTEP]\nexact Or.inl hp₁'\n[GOAL]\ncase mp.intro.intro.intro.intro.inr.inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y p₁ : P\nh : p₁ ∈ s\np₁' : P\nhp₁' : p₁' ∈ s\np₂' : P\nhp₂' : p₂' ∈ s\nh0 : p₂' -ᵥ y = 0\n⊢ x ∈ s ∨ ∃ p₂, p₂ ∈ s ∧ SameRay R (x -ᵥ p₁) (p₂ -ᵥ y)\n[PROOFSTEP]\nrefine' Or.inr ⟨p₂', hp₂', _⟩\n[GOAL]\ncase mp.intro.intro.intro.intro.inr.inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y p₁ : P\nh : p₁ ∈ s\np₁' : P\nhp₁' : p₁' ∈ s\np₂' : P\nhp₂' : p₂' ∈ s\nh0 : p₂' -ᵥ y = 0\n⊢ SameRay R (x -ᵥ p₁) (p₂' -ᵥ y)\n[PROOFSTEP]\nrw [h0]\n[GOAL]\ncase mp.intro.intro.intro.intro.inr.inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y p₁ : P\nh : p₁ ∈ s\np₁' : P\nhp₁' : p₁' ∈ s\np₂' : P\nhp₂' : p₂' ∈ s\nh0 : p₂' -ᵥ y = 0\n⊢ SameRay R (x -ᵥ p₁) 0\n[PROOFSTEP]\nexact SameRay.zero_right _\n[GOAL]\ncase mp.intro.intro.intro.intro.inr.inr.intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y p₁ : P\nh : p₁ ∈ s\np₁' : P\nhp₁' : p₁' ∈ s\np₂' : P\nhp₂' : p₂' ∈ s\nr₁ r₂ : R\nhr₁ : 0 < r₁\nhr₂ : 0 < r₂\nhr : r₁ • (x -ᵥ p₁') = r₂ • (p₂' -ᵥ y)\n⊢ x ∈ s ∨ ∃ p₂, p₂ ∈ s ∧ SameRay R (x -ᵥ p₁) (p₂ -ᵥ y)\n[PROOFSTEP]\nrefine'\n  Or.inr ⟨(-r₁ / r₂) • (p₁ -ᵥ p₁') +ᵥ p₂', s.smul_vsub_vadd_mem _ h hp₁' hp₂', Or.inr (Or.inr ⟨r₁, r₂, hr₁, hr₂, _⟩)⟩\n[GOAL]\ncase mp.intro.intro.intro.intro.inr.inr.intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y p₁ : P\nh : p₁ ∈ s\np₁' : P\nhp₁' : p₁' ∈ s\np₂' : P\nhp₂' : p₂' ∈ s\nr₁ r₂ : R\nhr₁ : 0 < r₁\nhr₂ : 0 < r₂\nhr : r₁ • (x -ᵥ p₁') = r₂ • (p₂' -ᵥ y)\n⊢ r₁ • (x -ᵥ p₁) = r₂ • ((-r₁ / r₂) • (p₁ -ᵥ p₁') +ᵥ p₂' -ᵥ y)\n[PROOFSTEP]\nrw [vadd_vsub_assoc, smul_add, ← hr, smul_smul, neg_div, mul_neg, mul_div_cancel' _ hr₂.ne.symm, neg_smul,\n  neg_add_eq_sub, ← smul_sub, vsub_sub_vsub_cancel_right]\n[GOAL]\ncase mpr\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y p₁ : P\nh : p₁ ∈ s\n⊢ (x ∈ s ∨ ∃ p₂, p₂ ∈ s ∧ SameRay R (x -ᵥ p₁) (p₂ -ᵥ y)) → WOppSide s x y\n[PROOFSTEP]\nrintro (h' | ⟨h₁, h₂, h₃⟩)\n[GOAL]\ncase mpr.inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y p₁ : P\nh : p₁ ∈ s\nh' : x ∈ s\n⊢ WOppSide s x y\n[PROOFSTEP]\nexact wOppSide_of_left_mem y h'\n[GOAL]\ncase mpr.inr.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y p₁ : P\nh : p₁ ∈ s\nh₁ : P\nh₂ : h₁ ∈ s\nh₃ : SameRay R (x -ᵥ p₁) (h₁ -ᵥ y)\n⊢ WOppSide s x y\n[PROOFSTEP]\nexact ⟨p₁, h, h₁, h₂, h₃⟩\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y p₂ : P\nh : p₂ ∈ s\n⊢ WOppSide s x y ↔ y ∈ s ∨ ∃ p₁, p₁ ∈ s ∧ SameRay R (x -ᵥ p₁) (p₂ -ᵥ y)\n[PROOFSTEP]\nrw [wOppSide_comm, wOppSide_iff_exists_left h]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y p₂ : P\nh : p₂ ∈ s\n⊢ (y ∈ s ∨ ∃ p₂_1, p₂_1 ∈ s ∧ SameRay R (y -ᵥ p₂) (p₂_1 -ᵥ x)) ↔ y ∈ s ∨ ∃ p₁, p₁ ∈ s ∧ SameRay R (x -ᵥ p₁) (p₂ -ᵥ y)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y p₂ : P\nh : p₂ ∈ s\n⊢ (y ∈ s ∨ ∃ p₂_1, p₂_1 ∈ s ∧ SameRay R (y -ᵥ p₂) (p₂_1 -ᵥ x)) → y ∈ s ∨ ∃ p₁, p₁ ∈ s ∧ SameRay R (x -ᵥ p₁) (p₂ -ᵥ y)\n[PROOFSTEP]\nrintro (hy | ⟨p, hp, hr⟩)\n[GOAL]\ncase mp.inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y p₂ : P\nh : p₂ ∈ s\nhy : y ∈ s\n⊢ y ∈ s ∨ ∃ p₁, p₁ ∈ s ∧ SameRay R (x -ᵥ p₁) (p₂ -ᵥ y)\n[PROOFSTEP]\nexact Or.inl hy\n[GOAL]\ncase mp.inr.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y p₂ : P\nh : p₂ ∈ s\np : P\nhp : p ∈ s\nhr : SameRay R (y -ᵥ p₂) (p -ᵥ x)\n⊢ y ∈ s ∨ ∃ p₁, p₁ ∈ s ∧ SameRay R (x -ᵥ p₁) (p₂ -ᵥ y)\n[PROOFSTEP]\nrefine' Or.inr ⟨p, hp, _⟩\n[GOAL]\ncase mp.inr.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y p₂ : P\nh : p₂ ∈ s\np : P\nhp : p ∈ s\nhr : SameRay R (y -ᵥ p₂) (p -ᵥ x)\n⊢ SameRay R (x -ᵥ p) (p₂ -ᵥ y)\n[PROOFSTEP]\nrwa [SameRay.sameRay_comm, ← sameRay_neg_iff, neg_vsub_eq_vsub_rev, neg_vsub_eq_vsub_rev]\n[GOAL]\ncase mpr\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y p₂ : P\nh : p₂ ∈ s\n⊢ (y ∈ s ∨ ∃ p₁, p₁ ∈ s ∧ SameRay R (x -ᵥ p₁) (p₂ -ᵥ y)) → y ∈ s ∨ ∃ p₂_1, p₂_1 ∈ s ∧ SameRay R (y -ᵥ p₂) (p₂_1 -ᵥ x)\n[PROOFSTEP]\nrintro (hy | ⟨p, hp, hr⟩)\n[GOAL]\ncase mpr.inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y p₂ : P\nh : p₂ ∈ s\nhy : y ∈ s\n⊢ y ∈ s ∨ ∃ p₂_1, p₂_1 ∈ s ∧ SameRay R (y -ᵥ p₂) (p₂_1 -ᵥ x)\n[PROOFSTEP]\nexact Or.inl hy\n[GOAL]\ncase mpr.inr.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y p₂ : P\nh : p₂ ∈ s\np : P\nhp : p ∈ s\nhr : SameRay R (x -ᵥ p) (p₂ -ᵥ y)\n⊢ y ∈ s ∨ ∃ p₂_1, p₂_1 ∈ s ∧ SameRay R (y -ᵥ p₂) (p₂_1 -ᵥ x)\n[PROOFSTEP]\nrefine' Or.inr ⟨p, hp, _⟩\n[GOAL]\ncase mpr.inr.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y p₂ : P\nh : p₂ ∈ s\np : P\nhp : p ∈ s\nhr : SameRay R (x -ᵥ p) (p₂ -ᵥ y)\n⊢ SameRay R (y -ᵥ p₂) (p -ᵥ x)\n[PROOFSTEP]\nrwa [SameRay.sameRay_comm, ← sameRay_neg_iff, neg_vsub_eq_vsub_rev, neg_vsub_eq_vsub_rev]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y p₁ : P\nh : p₁ ∈ s\n⊢ SOppSide s x y ↔ ¬x ∈ s ∧ ¬y ∈ s ∧ ∃ p₂, p₂ ∈ s ∧ SameRay R (x -ᵥ p₁) (p₂ -ᵥ y)\n[PROOFSTEP]\nrw [SOppSide, and_comm, wOppSide_iff_exists_left h, and_assoc, and_congr_right_iff]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y p₁ : P\nh : p₁ ∈ s\n⊢ ¬x ∈ s →\n    (¬y ∈ s ∧ (x ∈ s ∨ ∃ p₂, p₂ ∈ s ∧ SameRay R (x -ᵥ p₁) (p₂ -ᵥ y)) ↔\n      ¬y ∈ s ∧ ∃ p₂, p₂ ∈ s ∧ SameRay R (x -ᵥ p₁) (p₂ -ᵥ y))\n[PROOFSTEP]\nintro hx\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y p₁ : P\nh : p₁ ∈ s\nhx : ¬x ∈ s\n⊢ ¬y ∈ s ∧ (x ∈ s ∨ ∃ p₂, p₂ ∈ s ∧ SameRay R (x -ᵥ p₁) (p₂ -ᵥ y)) ↔\n    ¬y ∈ s ∧ ∃ p₂, p₂ ∈ s ∧ SameRay R (x -ᵥ p₁) (p₂ -ᵥ y)\n[PROOFSTEP]\nrw [or_iff_right hx]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y p₂ : P\nh : p₂ ∈ s\n⊢ SOppSide s x y ↔ ¬x ∈ s ∧ ¬y ∈ s ∧ ∃ p₁, p₁ ∈ s ∧ SameRay R (x -ᵥ p₁) (p₂ -ᵥ y)\n[PROOFSTEP]\nrw [SOppSide, and_comm, wOppSide_iff_exists_right h, and_assoc, and_congr_right_iff, and_congr_right_iff]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y p₂ : P\nh : p₂ ∈ s\n⊢ ¬x ∈ s →\n    ¬y ∈ s → ((y ∈ s ∨ ∃ p₁, p₁ ∈ s ∧ SameRay R (x -ᵥ p₁) (p₂ -ᵥ y)) ↔ ∃ p₁, p₁ ∈ s ∧ SameRay R (x -ᵥ p₁) (p₂ -ᵥ y))\n[PROOFSTEP]\nrintro _ hy\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y p₂ : P\nh : p₂ ∈ s\na✝ : ¬x ∈ s\nhy : ¬y ∈ s\n⊢ (y ∈ s ∨ ∃ p₁, p₁ ∈ s ∧ SameRay R (x -ᵥ p₁) (p₂ -ᵥ y)) ↔ ∃ p₁, p₁ ∈ s ∧ SameRay R (x -ᵥ p₁) (p₂ -ᵥ y)\n[PROOFSTEP]\nrw [or_iff_right hy]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y z : P\nhxy : WSameSide s x y\nhyz : WSameSide s y z\nhy : ¬y ∈ s\n⊢ WSameSide s x z\n[PROOFSTEP]\nrcases hxy with ⟨p₁, hp₁, p₂, hp₂, hxy⟩\n[GOAL]\ncase intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y z : P\nhyz : WSameSide s y z\nhy : ¬y ∈ s\np₁ : P\nhp₁ : p₁ ∈ s\np₂ : P\nhp₂ : p₂ ∈ s\nhxy : SameRay R (x -ᵥ p₁) (y -ᵥ p₂)\n⊢ WSameSide s x z\n[PROOFSTEP]\nrw [wSameSide_iff_exists_left hp₂, or_iff_right hy] at hyz \n[GOAL]\ncase intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y z : P\nhy : ¬y ∈ s\np₁ : P\nhp₁ : p₁ ∈ s\np₂ : P\nhyz : ∃ p₂_1, p₂_1 ∈ s ∧ SameRay R (y -ᵥ p₂) (z -ᵥ p₂_1)\nhp₂ : p₂ ∈ s\nhxy : SameRay R (x -ᵥ p₁) (y -ᵥ p₂)\n⊢ WSameSide s x z\n[PROOFSTEP]\nrcases hyz with ⟨p₃, hp₃, hyz⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y z : P\nhy : ¬y ∈ s\np₁ : P\nhp₁ : p₁ ∈ s\np₂ : P\nhp₂ : p₂ ∈ s\nhxy : SameRay R (x -ᵥ p₁) (y -ᵥ p₂)\np₃ : P\nhp₃ : p₃ ∈ s\nhyz : SameRay R (y -ᵥ p₂) (z -ᵥ p₃)\n⊢ WSameSide s x z\n[PROOFSTEP]\nrefine' ⟨p₁, hp₁, p₃, hp₃, hxy.trans hyz _⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y z : P\nhy : ¬y ∈ s\np₁ : P\nhp₁ : p₁ ∈ s\np₂ : P\nhp₂ : p₂ ∈ s\nhxy : SameRay R (x -ᵥ p₁) (y -ᵥ p₂)\np₃ : P\nhp₃ : p₃ ∈ s\nhyz : SameRay R (y -ᵥ p₂) (z -ᵥ p₃)\n⊢ y -ᵥ p₂ = 0 → x -ᵥ p₁ = 0 ∨ z -ᵥ p₃ = 0\n[PROOFSTEP]\nrefine' fun h => False.elim _\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y z : P\nhy : ¬y ∈ s\np₁ : P\nhp₁ : p₁ ∈ s\np₂ : P\nhp₂ : p₂ ∈ s\nhxy : SameRay R (x -ᵥ p₁) (y -ᵥ p₂)\np₃ : P\nhp₃ : p₃ ∈ s\nhyz : SameRay R (y -ᵥ p₂) (z -ᵥ p₃)\nh : y -ᵥ p₂ = 0\n⊢ False\n[PROOFSTEP]\nrw [vsub_eq_zero_iff_eq] at h \n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y z : P\nhy : ¬y ∈ s\np₁ : P\nhp₁ : p₁ ∈ s\np₂ : P\nhp₂ : p₂ ∈ s\nhxy : SameRay R (x -ᵥ p₁) (y -ᵥ p₂)\np₃ : P\nhp₃ : p₃ ∈ s\nhyz : SameRay R (y -ᵥ p₂) (z -ᵥ p₃)\nh : y = p₂\n⊢ False\n[PROOFSTEP]\nexact hy (h.symm ▸ hp₂)\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y z : P\nhxy : WSameSide s x y\nhyz : WOppSide s y z\nhy : ¬y ∈ s\n⊢ WOppSide s x z\n[PROOFSTEP]\nrcases hxy with ⟨p₁, hp₁, p₂, hp₂, hxy⟩\n[GOAL]\ncase intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y z : P\nhyz : WOppSide s y z\nhy : ¬y ∈ s\np₁ : P\nhp₁ : p₁ ∈ s\np₂ : P\nhp₂ : p₂ ∈ s\nhxy : SameRay R (x -ᵥ p₁) (y -ᵥ p₂)\n⊢ WOppSide s x z\n[PROOFSTEP]\nrw [wOppSide_iff_exists_left hp₂, or_iff_right hy] at hyz \n[GOAL]\ncase intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y z : P\nhy : ¬y ∈ s\np₁ : P\nhp₁ : p₁ ∈ s\np₂ : P\nhyz : ∃ p₂_1, p₂_1 ∈ s ∧ SameRay R (y -ᵥ p₂) (p₂_1 -ᵥ z)\nhp₂ : p₂ ∈ s\nhxy : SameRay R (x -ᵥ p₁) (y -ᵥ p₂)\n⊢ WOppSide s x z\n[PROOFSTEP]\nrcases hyz with ⟨p₃, hp₃, hyz⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y z : P\nhy : ¬y ∈ s\np₁ : P\nhp₁ : p₁ ∈ s\np₂ : P\nhp₂ : p₂ ∈ s\nhxy : SameRay R (x -ᵥ p₁) (y -ᵥ p₂)\np₃ : P\nhp₃ : p₃ ∈ s\nhyz : SameRay R (y -ᵥ p₂) (p₃ -ᵥ z)\n⊢ WOppSide s x z\n[PROOFSTEP]\nrefine' ⟨p₁, hp₁, p₃, hp₃, hxy.trans hyz _⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y z : P\nhy : ¬y ∈ s\np₁ : P\nhp₁ : p₁ ∈ s\np₂ : P\nhp₂ : p₂ ∈ s\nhxy : SameRay R (x -ᵥ p₁) (y -ᵥ p₂)\np₃ : P\nhp₃ : p₃ ∈ s\nhyz : SameRay R (y -ᵥ p₂) (p₃ -ᵥ z)\n⊢ y -ᵥ p₂ = 0 → x -ᵥ p₁ = 0 ∨ p₃ -ᵥ z = 0\n[PROOFSTEP]\nrefine' fun h => False.elim _\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y z : P\nhy : ¬y ∈ s\np₁ : P\nhp₁ : p₁ ∈ s\np₂ : P\nhp₂ : p₂ ∈ s\nhxy : SameRay R (x -ᵥ p₁) (y -ᵥ p₂)\np₃ : P\nhp₃ : p₃ ∈ s\nhyz : SameRay R (y -ᵥ p₂) (p₃ -ᵥ z)\nh : y -ᵥ p₂ = 0\n⊢ False\n[PROOFSTEP]\nrw [vsub_eq_zero_iff_eq] at h \n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y z : P\nhy : ¬y ∈ s\np₁ : P\nhp₁ : p₁ ∈ s\np₂ : P\nhp₂ : p₂ ∈ s\nhxy : SameRay R (x -ᵥ p₁) (y -ᵥ p₂)\np₃ : P\nhp₃ : p₃ ∈ s\nhyz : SameRay R (y -ᵥ p₂) (p₃ -ᵥ z)\nh : y = p₂\n⊢ False\n[PROOFSTEP]\nexact hy (h.symm ▸ hp₂)\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y z : P\nhxy : WOppSide s x y\nhyz : WOppSide s y z\nhy : ¬y ∈ s\n⊢ WSameSide s x z\n[PROOFSTEP]\nrcases hxy with ⟨p₁, hp₁, p₂, hp₂, hxy⟩\n[GOAL]\ncase intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y z : P\nhyz : WOppSide s y z\nhy : ¬y ∈ s\np₁ : P\nhp₁ : p₁ ∈ s\np₂ : P\nhp₂ : p₂ ∈ s\nhxy : SameRay R (x -ᵥ p₁) (p₂ -ᵥ y)\n⊢ WSameSide s x z\n[PROOFSTEP]\nrw [wOppSide_iff_exists_left hp₂, or_iff_right hy] at hyz \n[GOAL]\ncase intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y z : P\nhy : ¬y ∈ s\np₁ : P\nhp₁ : p₁ ∈ s\np₂ : P\nhyz : ∃ p₂_1, p₂_1 ∈ s ∧ SameRay R (y -ᵥ p₂) (p₂_1 -ᵥ z)\nhp₂ : p₂ ∈ s\nhxy : SameRay R (x -ᵥ p₁) (p₂ -ᵥ y)\n⊢ WSameSide s x z\n[PROOFSTEP]\nrcases hyz with ⟨p₃, hp₃, hyz⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y z : P\nhy : ¬y ∈ s\np₁ : P\nhp₁ : p₁ ∈ s\np₂ : P\nhp₂ : p₂ ∈ s\nhxy : SameRay R (x -ᵥ p₁) (p₂ -ᵥ y)\np₃ : P\nhp₃ : p₃ ∈ s\nhyz : SameRay R (y -ᵥ p₂) (p₃ -ᵥ z)\n⊢ WSameSide s x z\n[PROOFSTEP]\nrw [← sameRay_neg_iff, neg_vsub_eq_vsub_rev, neg_vsub_eq_vsub_rev] at hyz \n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y z : P\nhy : ¬y ∈ s\np₁ : P\nhp₁ : p₁ ∈ s\np₂ : P\nhp₂ : p₂ ∈ s\nhxy : SameRay R (x -ᵥ p₁) (p₂ -ᵥ y)\np₃ : P\nhp₃ : p₃ ∈ s\nhyz : SameRay R (p₂ -ᵥ y) (z -ᵥ p₃)\n⊢ WSameSide s x z\n[PROOFSTEP]\nrefine' ⟨p₁, hp₁, p₃, hp₃, hxy.trans hyz _⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y z : P\nhy : ¬y ∈ s\np₁ : P\nhp₁ : p₁ ∈ s\np₂ : P\nhp₂ : p₂ ∈ s\nhxy : SameRay R (x -ᵥ p₁) (p₂ -ᵥ y)\np₃ : P\nhp₃ : p₃ ∈ s\nhyz : SameRay R (p₂ -ᵥ y) (z -ᵥ p₃)\n⊢ p₂ -ᵥ y = 0 → x -ᵥ p₁ = 0 ∨ z -ᵥ p₃ = 0\n[PROOFSTEP]\nrefine' fun h => False.elim _\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y z : P\nhy : ¬y ∈ s\np₁ : P\nhp₁ : p₁ ∈ s\np₂ : P\nhp₂ : p₂ ∈ s\nhxy : SameRay R (x -ᵥ p₁) (p₂ -ᵥ y)\np₃ : P\nhp₃ : p₃ ∈ s\nhyz : SameRay R (p₂ -ᵥ y) (z -ᵥ p₃)\nh : p₂ -ᵥ y = 0\n⊢ False\n[PROOFSTEP]\nrw [vsub_eq_zero_iff_eq] at h \n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y z : P\nhy : ¬y ∈ s\np₁ : P\nhp₁ : p₁ ∈ s\np₂ : P\nhp₂ : p₂ ∈ s\nhxy : SameRay R (x -ᵥ p₁) (p₂ -ᵥ y)\np₃ : P\nhp₃ : p₃ ∈ s\nhyz : SameRay R (p₂ -ᵥ y) (z -ᵥ p₃)\nh : p₂ = y\n⊢ False\n[PROOFSTEP]\nexact hy (h ▸ hp₂)\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y : P\n⊢ WSameSide s x y ∧ WOppSide s x y ↔ x ∈ s ∨ y ∈ s\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y : P\n⊢ WSameSide s x y ∧ WOppSide s x y → x ∈ s ∨ y ∈ s\n[PROOFSTEP]\nrintro ⟨hs, ho⟩\n[GOAL]\ncase mp.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y : P\nhs : WSameSide s x y\nho : WOppSide s x y\n⊢ x ∈ s ∨ y ∈ s\n[PROOFSTEP]\nrw [wOppSide_comm] at ho \n[GOAL]\ncase mp.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y : P\nhs : WSameSide s x y\nho : WOppSide s y x\n⊢ x ∈ s ∨ y ∈ s\n[PROOFSTEP]\nby_contra h\n[GOAL]\ncase mp.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y : P\nhs : WSameSide s x y\nho : WOppSide s y x\nh : ¬(x ∈ s ∨ y ∈ s)\n⊢ False\n[PROOFSTEP]\nrw [not_or] at h \n[GOAL]\ncase mp.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y : P\nhs : WSameSide s x y\nho : WOppSide s y x\nh : ¬x ∈ s ∧ ¬y ∈ s\n⊢ False\n[PROOFSTEP]\nexact h.1 (wOppSide_self_iff.1 (hs.trans_wOppSide ho h.2))\n[GOAL]\ncase mpr\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y : P\n⊢ x ∈ s ∨ y ∈ s → WSameSide s x y ∧ WOppSide s x y\n[PROOFSTEP]\nrintro (h | h)\n[GOAL]\ncase mpr.inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y : P\nh : x ∈ s\n⊢ WSameSide s x y ∧ WOppSide s x y\n[PROOFSTEP]\nexact ⟨wSameSide_of_left_mem y h, wOppSide_of_left_mem y h⟩\n[GOAL]\ncase mpr.inr\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y : P\nh : y ∈ s\n⊢ WSameSide s x y ∧ WOppSide s x y\n[PROOFSTEP]\nexact ⟨wSameSide_of_right_mem x h, wOppSide_of_right_mem x h⟩\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y : P\nh : WSameSide s x y\n⊢ ¬SOppSide s x y\n[PROOFSTEP]\nintro ho\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y : P\nh : WSameSide s x y\nho : SOppSide s x y\n⊢ False\n[PROOFSTEP]\nhave hxy := wSameSide_and_wOppSide_iff.1 ⟨h, ho.1⟩\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y : P\nh : WSameSide s x y\nho : SOppSide s x y\nhxy : x ∈ s ∨ y ∈ s\n⊢ False\n[PROOFSTEP]\nrcases hxy with (hx | hy)\n[GOAL]\ncase inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y : P\nh : WSameSide s x y\nho : SOppSide s x y\nhx : x ∈ s\n⊢ False\n[PROOFSTEP]\nexact ho.2.1 hx\n[GOAL]\ncase inr\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y : P\nh : WSameSide s x y\nho : SOppSide s x y\nhy : y ∈ s\n⊢ False\n[PROOFSTEP]\nexact ho.2.2 hy\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y : P\nh : SSameSide s x y\n⊢ ¬WOppSide s x y\n[PROOFSTEP]\nintro ho\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y : P\nh : SSameSide s x y\nho : WOppSide s x y\n⊢ False\n[PROOFSTEP]\nhave hxy := wSameSide_and_wOppSide_iff.1 ⟨h.1, ho⟩\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y : P\nh : SSameSide s x y\nho : WOppSide s x y\nhxy : x ∈ s ∨ y ∈ s\n⊢ False\n[PROOFSTEP]\nrcases hxy with (hx | hy)\n[GOAL]\ncase inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y : P\nh : SSameSide s x y\nho : WOppSide s x y\nhx : x ∈ s\n⊢ False\n[PROOFSTEP]\nexact h.2.1 hx\n[GOAL]\ncase inr\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y : P\nh : SSameSide s x y\nho : WOppSide s x y\nhy : y ∈ s\n⊢ False\n[PROOFSTEP]\nexact h.2.2 hy\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y : P\n⊢ WOppSide s x y ↔ ∃ p, p ∈ s ∧ Wbtw R x p y\n[PROOFSTEP]\nrefine' ⟨fun h => _, fun ⟨p, hp, h⟩ => h.wOppSide₁₃ hp⟩\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y : P\nh : WOppSide s x y\n⊢ ∃ p, p ∈ s ∧ Wbtw R x p y\n[PROOFSTEP]\nrcases h with ⟨p₁, hp₁, p₂, hp₂, h | h | ⟨r₁, r₂, hr₁, hr₂, h⟩⟩\n[GOAL]\ncase intro.intro.intro.intro.inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y p₁ : P\nhp₁ : p₁ ∈ s\np₂ : P\nhp₂ : p₂ ∈ s\nh : x -ᵥ p₁ = 0\n⊢ ∃ p, p ∈ s ∧ Wbtw R x p y\n[PROOFSTEP]\nrw [vsub_eq_zero_iff_eq] at h \n[GOAL]\ncase intro.intro.intro.intro.inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y p₁ : P\nhp₁ : p₁ ∈ s\np₂ : P\nhp₂ : p₂ ∈ s\nh : x = p₁\n⊢ ∃ p, p ∈ s ∧ Wbtw R x p y\n[PROOFSTEP]\nrw [h]\n[GOAL]\ncase intro.intro.intro.intro.inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y p₁ : P\nhp₁ : p₁ ∈ s\np₂ : P\nhp₂ : p₂ ∈ s\nh : x = p₁\n⊢ ∃ p, p ∈ s ∧ Wbtw R p₁ p y\n[PROOFSTEP]\nexact ⟨p₁, hp₁, wbtw_self_left _ _ _⟩\n[GOAL]\ncase intro.intro.intro.intro.inr.inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y p₁ : P\nhp₁ : p₁ ∈ s\np₂ : P\nhp₂ : p₂ ∈ s\nh : p₂ -ᵥ y = 0\n⊢ ∃ p, p ∈ s ∧ Wbtw R x p y\n[PROOFSTEP]\nrw [vsub_eq_zero_iff_eq] at h \n[GOAL]\ncase intro.intro.intro.intro.inr.inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y p₁ : P\nhp₁ : p₁ ∈ s\np₂ : P\nhp₂ : p₂ ∈ s\nh : p₂ = y\n⊢ ∃ p, p ∈ s ∧ Wbtw R x p y\n[PROOFSTEP]\nrw [← h]\n[GOAL]\ncase intro.intro.intro.intro.inr.inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y p₁ : P\nhp₁ : p₁ ∈ s\np₂ : P\nhp₂ : p₂ ∈ s\nh : p₂ = y\n⊢ ∃ p, p ∈ s ∧ Wbtw R x p p₂\n[PROOFSTEP]\nexact ⟨p₂, hp₂, wbtw_self_right _ _ _⟩\n[GOAL]\ncase intro.intro.intro.intro.inr.inr.intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y p₁ : P\nhp₁ : p₁ ∈ s\np₂ : P\nhp₂ : p₂ ∈ s\nr₁ r₂ : R\nhr₁ : 0 < r₁\nhr₂ : 0 < r₂\nh : r₁ • (x -ᵥ p₁) = r₂ • (p₂ -ᵥ y)\n⊢ ∃ p, p ∈ s ∧ Wbtw R x p y\n[PROOFSTEP]\nrefine' ⟨lineMap x y (r₂ / (r₁ + r₂)), _, _⟩\n[GOAL]\ncase intro.intro.intro.intro.inr.inr.intro.intro.intro.intro.refine'_1\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y p₁ : P\nhp₁ : p₁ ∈ s\np₂ : P\nhp₂ : p₂ ∈ s\nr₁ r₂ : R\nhr₁ : 0 < r₁\nhr₂ : 0 < r₂\nh : r₁ • (x -ᵥ p₁) = r₂ • (p₂ -ᵥ y)\n⊢ ↑(lineMap x y) (r₂ / (r₁ + r₂)) ∈ s\n[PROOFSTEP]\nhave : (r₂ / (r₁ + r₂)) • (y -ᵥ p₂ + (p₂ -ᵥ p₁) - (x -ᵥ p₁)) + (x -ᵥ p₁) = (r₂ / (r₁ + r₂)) • (p₂ -ᵥ p₁) := by\n  rw [add_comm (y -ᵥ p₂), smul_sub, smul_add, add_sub_assoc, add_assoc, add_right_eq_self, div_eq_inv_mul, ←\n    neg_vsub_eq_vsub_rev, smul_neg, ← smul_smul, ← h, smul_smul, ← neg_smul, ← sub_smul, ← div_eq_inv_mul, ←\n    div_eq_inv_mul, ← neg_div, ← sub_div, sub_eq_add_neg, ← neg_add, neg_div, div_self (Left.add_pos hr₁ hr₂).ne.symm,\n    neg_one_smul, neg_add_self]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y p₁ : P\nhp₁ : p₁ ∈ s\np₂ : P\nhp₂ : p₂ ∈ s\nr₁ r₂ : R\nhr₁ : 0 < r₁\nhr₂ : 0 < r₂\nh : r₁ • (x -ᵥ p₁) = r₂ • (p₂ -ᵥ y)\n⊢ (r₂ / (r₁ + r₂)) • (y -ᵥ p₂ + (p₂ -ᵥ p₁) - (x -ᵥ p₁)) + (x -ᵥ p₁) = (r₂ / (r₁ + r₂)) • (p₂ -ᵥ p₁)\n[PROOFSTEP]\nrw [add_comm (y -ᵥ p₂), smul_sub, smul_add, add_sub_assoc, add_assoc, add_right_eq_self, div_eq_inv_mul, ←\n  neg_vsub_eq_vsub_rev, smul_neg, ← smul_smul, ← h, smul_smul, ← neg_smul, ← sub_smul, ← div_eq_inv_mul, ←\n  div_eq_inv_mul, ← neg_div, ← sub_div, sub_eq_add_neg, ← neg_add, neg_div, div_self (Left.add_pos hr₁ hr₂).ne.symm,\n  neg_one_smul, neg_add_self]\n[GOAL]\ncase intro.intro.intro.intro.inr.inr.intro.intro.intro.intro.refine'_1\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y p₁ : P\nhp₁ : p₁ ∈ s\np₂ : P\nhp₂ : p₂ ∈ s\nr₁ r₂ : R\nhr₁ : 0 < r₁\nhr₂ : 0 < r₂\nh : r₁ • (x -ᵥ p₁) = r₂ • (p₂ -ᵥ y)\nthis : (r₂ / (r₁ + r₂)) • (y -ᵥ p₂ + (p₂ -ᵥ p₁) - (x -ᵥ p₁)) + (x -ᵥ p₁) = (r₂ / (r₁ + r₂)) • (p₂ -ᵥ p₁)\n⊢ ↑(lineMap x y) (r₂ / (r₁ + r₂)) ∈ s\n[PROOFSTEP]\nrw [lineMap_apply, ← vsub_vadd x p₁, ← vsub_vadd y p₂, vsub_vadd_eq_vsub_sub, vadd_vsub_assoc, ← vadd_assoc,\n  vadd_eq_add, this]\n[GOAL]\ncase intro.intro.intro.intro.inr.inr.intro.intro.intro.intro.refine'_1\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y p₁ : P\nhp₁ : p₁ ∈ s\np₂ : P\nhp₂ : p₂ ∈ s\nr₁ r₂ : R\nhr₁ : 0 < r₁\nhr₂ : 0 < r₂\nh : r₁ • (x -ᵥ p₁) = r₂ • (p₂ -ᵥ y)\nthis : (r₂ / (r₁ + r₂)) • (y -ᵥ p₂ + (p₂ -ᵥ p₁) - (x -ᵥ p₁)) + (x -ᵥ p₁) = (r₂ / (r₁ + r₂)) • (p₂ -ᵥ p₁)\n⊢ (r₂ / (r₁ + r₂)) • (p₂ -ᵥ p₁) +ᵥ p₁ ∈ s\n[PROOFSTEP]\nexact s.smul_vsub_vadd_mem (r₂ / (r₁ + r₂)) hp₂ hp₁ hp₁\n[GOAL]\ncase intro.intro.intro.intro.inr.inr.intro.intro.intro.intro.refine'_2\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y p₁ : P\nhp₁ : p₁ ∈ s\np₂ : P\nhp₂ : p₂ ∈ s\nr₁ r₂ : R\nhr₁ : 0 < r₁\nhr₂ : 0 < r₂\nh : r₁ • (x -ᵥ p₁) = r₂ • (p₂ -ᵥ y)\n⊢ Wbtw R x (↑(lineMap x y) (r₂ / (r₁ + r₂))) y\n[PROOFSTEP]\nexact\n  Set.mem_image_of_mem _\n    ⟨div_nonneg hr₂.le (Left.add_pos hr₁ hr₂).le,\n      div_le_one_of_le (le_add_of_nonneg_left hr₁.le) (Left.add_pos hr₁ hr₂).le⟩\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y : P\nh : SOppSide s x y\n⊢ ∃ p, p ∈ s ∧ Sbtw R x p y\n[PROOFSTEP]\nobtain ⟨p, hp, hw⟩ := wOppSide_iff_exists_wbtw.1 h.wOppSide\n[GOAL]\ncase intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y : P\nh : SOppSide s x y\np : P\nhp : p ∈ s\nhw : Wbtw R x p y\n⊢ ∃ p, p ∈ s ∧ Sbtw R x p y\n[PROOFSTEP]\nrefine' ⟨p, hp, hw, _, _⟩\n[GOAL]\ncase intro.intro.refine'_1\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y : P\nh : SOppSide s x y\np : P\nhp : p ∈ s\nhw : Wbtw R x p y\n⊢ p ≠ x\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase intro.intro.refine'_1\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\ny p : P\nhp : p ∈ s\nh : SOppSide s p y\nhw : Wbtw R p p y\n⊢ False\n[PROOFSTEP]\nexact h.2.1 hp\n[GOAL]\ncase intro.intro.refine'_2\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y : P\nh : SOppSide s x y\np : P\nhp : p ∈ s\nhw : Wbtw R x p y\n⊢ p ≠ y\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase intro.intro.refine'_2\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx p : P\nhp : p ∈ s\nh : SOppSide s x p\nhw : Wbtw R x p p\n⊢ False\n[PROOFSTEP]\nexact h.2.2 hp\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y z : P\nh : Sbtw R x y z\nhx : ¬x ∈ s\nhy : y ∈ s\n⊢ SOppSide s x z\n[PROOFSTEP]\nrefine' ⟨h.wbtw.wOppSide₁₃ hy, hx, fun hz => hx _⟩\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y z : P\nh : Sbtw R x y z\nhx : ¬x ∈ s\nhy : y ∈ s\nhz : z ∈ s\n⊢ x ∈ s\n[PROOFSTEP]\nrcases h with ⟨⟨t, ⟨ht0, ht1⟩, rfl⟩, hyx, hyz⟩\n[GOAL]\ncase intro.intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx z : P\nhx : ¬x ∈ s\nhz : z ∈ s\nt : R\nht0 : 0 ≤ t\nht1 : t ≤ 1\nhy : ↑(lineMap x z) t ∈ s\nhyx : ↑(lineMap x z) t ≠ x\nhyz : ↑(lineMap x z) t ≠ z\n⊢ x ∈ s\n[PROOFSTEP]\nrw [lineMap_apply] at hy \n[GOAL]\ncase intro.intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx z : P\nhx : ¬x ∈ s\nhz : z ∈ s\nt : R\nht0 : 0 ≤ t\nht1 : t ≤ 1\nhy : t • (z -ᵥ x) +ᵥ x ∈ s\nhyx : ↑(lineMap x z) t ≠ x\nhyz : ↑(lineMap x z) t ≠ z\n⊢ x ∈ s\n[PROOFSTEP]\nhave ht : t ≠ 1 := by\n  rintro rfl\n  simp [lineMap_apply] at hyz \n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx z : P\nhx : ¬x ∈ s\nhz : z ∈ s\nt : R\nht0 : 0 ≤ t\nht1 : t ≤ 1\nhy : t • (z -ᵥ x) +ᵥ x ∈ s\nhyx : ↑(lineMap x z) t ≠ x\nhyz : ↑(lineMap x z) t ≠ z\n⊢ t ≠ 1\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx z : P\nhx : ¬x ∈ s\nhz : z ∈ s\nht0 : 0 ≤ 1\nht1 : 1 ≤ 1\nhy : 1 • (z -ᵥ x) +ᵥ x ∈ s\nhyx : ↑(lineMap x z) 1 ≠ x\nhyz : ↑(lineMap x z) 1 ≠ z\n⊢ False\n[PROOFSTEP]\nsimp [lineMap_apply] at hyz \n[GOAL]\ncase intro.intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx z : P\nhx : ¬x ∈ s\nhz : z ∈ s\nt : R\nht0 : 0 ≤ t\nht1 : t ≤ 1\nhy : t • (z -ᵥ x) +ᵥ x ∈ s\nhyx : ↑(lineMap x z) t ≠ x\nhyz : ↑(lineMap x z) t ≠ z\nht : t ≠ 1\n⊢ x ∈ s\n[PROOFSTEP]\nhave hy' := vsub_mem_direction hy hz\n[GOAL]\ncase intro.intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx z : P\nhx : ¬x ∈ s\nhz : z ∈ s\nt : R\nht0 : 0 ≤ t\nht1 : t ≤ 1\nhy : t • (z -ᵥ x) +ᵥ x ∈ s\nhyx : ↑(lineMap x z) t ≠ x\nhyz : ↑(lineMap x z) t ≠ z\nht : t ≠ 1\nhy' : t • (z -ᵥ x) +ᵥ x -ᵥ z ∈ direction s\n⊢ x ∈ s\n[PROOFSTEP]\nrw [vadd_vsub_assoc, ← neg_vsub_eq_vsub_rev z, ← neg_one_smul R (z -ᵥ x), ← add_smul, ← sub_eq_add_neg,\n  s.direction.smul_mem_iff (sub_ne_zero_of_ne ht)] at hy' \n[GOAL]\ncase intro.intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx z : P\nhx : ¬x ∈ s\nhz : z ∈ s\nt : R\nht0 : 0 ≤ t\nht1 : t ≤ 1\nhy : t • (z -ᵥ x) +ᵥ x ∈ s\nhyx : ↑(lineMap x z) t ≠ x\nhyz : ↑(lineMap x z) t ≠ z\nht : t ≠ 1\nhy' : z -ᵥ x ∈ direction s\n⊢ x ∈ s\n[PROOFSTEP]\nrwa [vadd_mem_iff_mem_of_mem_direction (Submodule.smul_mem _ _ hy')] at hy \n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx p₁ p₂ : P\nhx : ¬x ∈ s\nhp₁ : p₁ ∈ s\nhp₂ : p₂ ∈ s\nt : R\nht : 0 < t\n⊢ SSameSide s (t • (x -ᵥ p₁) +ᵥ p₂) x\n[PROOFSTEP]\nrefine' ⟨wSameSide_smul_vsub_vadd_left x hp₁ hp₂ ht.le, fun h => hx _, hx⟩\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx p₁ p₂ : P\nhx : ¬x ∈ s\nhp₁ : p₁ ∈ s\nhp₂ : p₂ ∈ s\nt : R\nht : 0 < t\nh : t • (x -ᵥ p₁) +ᵥ p₂ ∈ s\n⊢ x ∈ s\n[PROOFSTEP]\nrwa [vadd_mem_iff_mem_direction _ hp₂, s.direction.smul_mem_iff ht.ne.symm, vsub_right_mem_direction_iff_mem hp₁] at h \n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx p₁ p₂ : P\nhx : ¬x ∈ s\nhp₁ : p₁ ∈ s\nhp₂ : p₂ ∈ s\nt : R\nht : t < 0\n⊢ SOppSide s (t • (x -ᵥ p₁) +ᵥ p₂) x\n[PROOFSTEP]\nrefine' ⟨wOppSide_smul_vsub_vadd_left x hp₁ hp₂ ht.le, fun h => hx _, hx⟩\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx p₁ p₂ : P\nhx : ¬x ∈ s\nhp₁ : p₁ ∈ s\nhp₂ : p₂ ∈ s\nt : R\nht : t < 0\nh : t • (x -ᵥ p₁) +ᵥ p₂ ∈ s\n⊢ x ∈ s\n[PROOFSTEP]\nrwa [vadd_mem_iff_mem_direction _ hp₂, s.direction.smul_mem_iff ht.ne, vsub_right_mem_direction_iff_mem hp₁] at h \n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx p : P\nhx : ¬x ∈ s\nhp : p ∈ s\n⊢ {y | WSameSide s x y} = Set.image2 (fun t q => t • (x -ᵥ p) +ᵥ q) (Set.Ici 0) ↑s\n[PROOFSTEP]\next y\n[GOAL]\ncase h\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx p : P\nhx : ¬x ∈ s\nhp : p ∈ s\ny : P\n⊢ y ∈ {y | WSameSide s x y} ↔ y ∈ Set.image2 (fun t q => t • (x -ᵥ p) +ᵥ q) (Set.Ici 0) ↑s\n[PROOFSTEP]\nsimp_rw [Set.mem_setOf, Set.mem_image2, Set.mem_Ici]\n[GOAL]\ncase h\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx p : P\nhx : ¬x ∈ s\nhp : p ∈ s\ny : P\n⊢ WSameSide s x y ↔ ∃ a b, 0 ≤ a ∧ b ∈ ↑s ∧ a • (x -ᵥ p) +ᵥ b = y\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx p : P\nhx : ¬x ∈ s\nhp : p ∈ s\ny : P\n⊢ WSameSide s x y → ∃ a b, 0 ≤ a ∧ b ∈ ↑s ∧ a • (x -ᵥ p) +ᵥ b = y\n[PROOFSTEP]\nrw [wSameSide_iff_exists_left hp, or_iff_right hx]\n[GOAL]\ncase h.mp\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx p : P\nhx : ¬x ∈ s\nhp : p ∈ s\ny : P\n⊢ (∃ p₂, p₂ ∈ s ∧ SameRay R (x -ᵥ p) (y -ᵥ p₂)) → ∃ a b, 0 ≤ a ∧ b ∈ ↑s ∧ a • (x -ᵥ p) +ᵥ b = y\n[PROOFSTEP]\nrintro ⟨p₂, hp₂, h | h | ⟨r₁, r₂, hr₁, hr₂, h⟩⟩\n[GOAL]\ncase h.mp.intro.intro.inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx p : P\nhx : ¬x ∈ s\nhp : p ∈ s\ny p₂ : P\nhp₂ : p₂ ∈ s\nh : x -ᵥ p = 0\n⊢ ∃ a b, 0 ≤ a ∧ b ∈ ↑s ∧ a • (x -ᵥ p) +ᵥ b = y\n[PROOFSTEP]\nrw [vsub_eq_zero_iff_eq] at h \n[GOAL]\ncase h.mp.intro.intro.inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx p : P\nhx : ¬x ∈ s\nhp : p ∈ s\ny p₂ : P\nhp₂ : p₂ ∈ s\nh : x = p\n⊢ ∃ a b, 0 ≤ a ∧ b ∈ ↑s ∧ a • (x -ᵥ p) +ᵥ b = y\n[PROOFSTEP]\nexact False.elim (hx (h.symm ▸ hp))\n[GOAL]\ncase h.mp.intro.intro.inr.inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx p : P\nhx : ¬x ∈ s\nhp : p ∈ s\ny p₂ : P\nhp₂ : p₂ ∈ s\nh : y -ᵥ p₂ = 0\n⊢ ∃ a b, 0 ≤ a ∧ b ∈ ↑s ∧ a • (x -ᵥ p) +ᵥ b = y\n[PROOFSTEP]\nrw [vsub_eq_zero_iff_eq] at h \n[GOAL]\ncase h.mp.intro.intro.inr.inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx p : P\nhx : ¬x ∈ s\nhp : p ∈ s\ny p₂ : P\nhp₂ : p₂ ∈ s\nh : y = p₂\n⊢ ∃ a b, 0 ≤ a ∧ b ∈ ↑s ∧ a • (x -ᵥ p) +ᵥ b = y\n[PROOFSTEP]\nrefine' ⟨0, p₂, le_refl _, hp₂, _⟩\n[GOAL]\ncase h.mp.intro.intro.inr.inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx p : P\nhx : ¬x ∈ s\nhp : p ∈ s\ny p₂ : P\nhp₂ : p₂ ∈ s\nh : y = p₂\n⊢ 0 • (x -ᵥ p) +ᵥ p₂ = y\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase h.mp.intro.intro.inr.inr.intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx p : P\nhx : ¬x ∈ s\nhp : p ∈ s\ny p₂ : P\nhp₂ : p₂ ∈ s\nr₁ r₂ : R\nhr₁ : 0 < r₁\nhr₂ : 0 < r₂\nh : r₁ • (x -ᵥ p) = r₂ • (y -ᵥ p₂)\n⊢ ∃ a b, 0 ≤ a ∧ b ∈ ↑s ∧ a • (x -ᵥ p) +ᵥ b = y\n[PROOFSTEP]\nrefine' ⟨r₁ / r₂, p₂, (div_pos hr₁ hr₂).le, hp₂, _⟩\n[GOAL]\ncase h.mp.intro.intro.inr.inr.intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx p : P\nhx : ¬x ∈ s\nhp : p ∈ s\ny p₂ : P\nhp₂ : p₂ ∈ s\nr₁ r₂ : R\nhr₁ : 0 < r₁\nhr₂ : 0 < r₂\nh : r₁ • (x -ᵥ p) = r₂ • (y -ᵥ p₂)\n⊢ (r₁ / r₂) • (x -ᵥ p) +ᵥ p₂ = y\n[PROOFSTEP]\nrw [div_eq_inv_mul, ← smul_smul, h, smul_smul, inv_mul_cancel hr₂.ne.symm, one_smul, vsub_vadd]\n[GOAL]\ncase h.mpr\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx p : P\nhx : ¬x ∈ s\nhp : p ∈ s\ny : P\n⊢ (∃ a b, 0 ≤ a ∧ b ∈ ↑s ∧ a • (x -ᵥ p) +ᵥ b = y) → WSameSide s x y\n[PROOFSTEP]\nrintro ⟨t, p', ht, hp', rfl⟩\n[GOAL]\ncase h.mpr.intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx p : P\nhx : ¬x ∈ s\nhp : p ∈ s\nt : R\np' : P\nht : 0 ≤ t\nhp' : p' ∈ ↑s\n⊢ WSameSide s x (t • (x -ᵥ p) +ᵥ p')\n[PROOFSTEP]\nexact wSameSide_smul_vsub_vadd_right x hp hp' ht\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx p : P\nhx : ¬x ∈ s\nhp : p ∈ s\n⊢ {y | SSameSide s x y} = Set.image2 (fun t q => t • (x -ᵥ p) +ᵥ q) (Set.Ioi 0) ↑s\n[PROOFSTEP]\next y\n[GOAL]\ncase h\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx p : P\nhx : ¬x ∈ s\nhp : p ∈ s\ny : P\n⊢ y ∈ {y | SSameSide s x y} ↔ y ∈ Set.image2 (fun t q => t • (x -ᵥ p) +ᵥ q) (Set.Ioi 0) ↑s\n[PROOFSTEP]\nsimp_rw [Set.mem_setOf, Set.mem_image2, Set.mem_Ioi]\n[GOAL]\ncase h\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx p : P\nhx : ¬x ∈ s\nhp : p ∈ s\ny : P\n⊢ SSameSide s x y ↔ ∃ a b, 0 < a ∧ b ∈ ↑s ∧ a • (x -ᵥ p) +ᵥ b = y\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx p : P\nhx : ¬x ∈ s\nhp : p ∈ s\ny : P\n⊢ SSameSide s x y → ∃ a b, 0 < a ∧ b ∈ ↑s ∧ a • (x -ᵥ p) +ᵥ b = y\n[PROOFSTEP]\nrw [sSameSide_iff_exists_left hp]\n[GOAL]\ncase h.mp\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx p : P\nhx : ¬x ∈ s\nhp : p ∈ s\ny : P\n⊢ (¬x ∈ s ∧ ¬y ∈ s ∧ ∃ p₂, p₂ ∈ s ∧ SameRay R (x -ᵥ p) (y -ᵥ p₂)) → ∃ a b, 0 < a ∧ b ∈ ↑s ∧ a • (x -ᵥ p) +ᵥ b = y\n[PROOFSTEP]\nrintro ⟨-, hy, p₂, hp₂, h | h | ⟨r₁, r₂, hr₁, hr₂, h⟩⟩\n[GOAL]\ncase h.mp.intro.intro.intro.intro.inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx p : P\nhx : ¬x ∈ s\nhp : p ∈ s\ny : P\nhy : ¬y ∈ s\np₂ : P\nhp₂ : p₂ ∈ s\nh : x -ᵥ p = 0\n⊢ ∃ a b, 0 < a ∧ b ∈ ↑s ∧ a • (x -ᵥ p) +ᵥ b = y\n[PROOFSTEP]\nrw [vsub_eq_zero_iff_eq] at h \n[GOAL]\ncase h.mp.intro.intro.intro.intro.inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx p : P\nhx : ¬x ∈ s\nhp : p ∈ s\ny : P\nhy : ¬y ∈ s\np₂ : P\nhp₂ : p₂ ∈ s\nh : x = p\n⊢ ∃ a b, 0 < a ∧ b ∈ ↑s ∧ a • (x -ᵥ p) +ᵥ b = y\n[PROOFSTEP]\nexact False.elim (hx (h.symm ▸ hp))\n[GOAL]\ncase h.mp.intro.intro.intro.intro.inr.inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx p : P\nhx : ¬x ∈ s\nhp : p ∈ s\ny : P\nhy : ¬y ∈ s\np₂ : P\nhp₂ : p₂ ∈ s\nh : y -ᵥ p₂ = 0\n⊢ ∃ a b, 0 < a ∧ b ∈ ↑s ∧ a • (x -ᵥ p) +ᵥ b = y\n[PROOFSTEP]\nrw [vsub_eq_zero_iff_eq] at h \n[GOAL]\ncase h.mp.intro.intro.intro.intro.inr.inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx p : P\nhx : ¬x ∈ s\nhp : p ∈ s\ny : P\nhy : ¬y ∈ s\np₂ : P\nhp₂ : p₂ ∈ s\nh : y = p₂\n⊢ ∃ a b, 0 < a ∧ b ∈ ↑s ∧ a • (x -ᵥ p) +ᵥ b = y\n[PROOFSTEP]\nexact False.elim (hy (h.symm ▸ hp₂))\n[GOAL]\ncase h.mp.intro.intro.intro.intro.inr.inr.intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx p : P\nhx : ¬x ∈ s\nhp : p ∈ s\ny : P\nhy : ¬y ∈ s\np₂ : P\nhp₂ : p₂ ∈ s\nr₁ r₂ : R\nhr₁ : 0 < r₁\nhr₂ : 0 < r₂\nh : r₁ • (x -ᵥ p) = r₂ • (y -ᵥ p₂)\n⊢ ∃ a b, 0 < a ∧ b ∈ ↑s ∧ a • (x -ᵥ p) +ᵥ b = y\n[PROOFSTEP]\nrefine' ⟨r₁ / r₂, p₂, div_pos hr₁ hr₂, hp₂, _⟩\n[GOAL]\ncase h.mp.intro.intro.intro.intro.inr.inr.intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx p : P\nhx : ¬x ∈ s\nhp : p ∈ s\ny : P\nhy : ¬y ∈ s\np₂ : P\nhp₂ : p₂ ∈ s\nr₁ r₂ : R\nhr₁ : 0 < r₁\nhr₂ : 0 < r₂\nh : r₁ • (x -ᵥ p) = r₂ • (y -ᵥ p₂)\n⊢ (r₁ / r₂) • (x -ᵥ p) +ᵥ p₂ = y\n[PROOFSTEP]\nrw [div_eq_inv_mul, ← smul_smul, h, smul_smul, inv_mul_cancel hr₂.ne.symm, one_smul, vsub_vadd]\n[GOAL]\ncase h.mpr\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx p : P\nhx : ¬x ∈ s\nhp : p ∈ s\ny : P\n⊢ (∃ a b, 0 < a ∧ b ∈ ↑s ∧ a • (x -ᵥ p) +ᵥ b = y) → SSameSide s x y\n[PROOFSTEP]\nrintro ⟨t, p', ht, hp', rfl⟩\n[GOAL]\ncase h.mpr.intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx p : P\nhx : ¬x ∈ s\nhp : p ∈ s\nt : R\np' : P\nht : 0 < t\nhp' : p' ∈ ↑s\n⊢ SSameSide s x (t • (x -ᵥ p) +ᵥ p')\n[PROOFSTEP]\nexact sSameSide_smul_vsub_vadd_right hx hp hp' ht\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx p : P\nhx : ¬x ∈ s\nhp : p ∈ s\n⊢ {y | WOppSide s x y} = Set.image2 (fun t q => t • (x -ᵥ p) +ᵥ q) (Set.Iic 0) ↑s\n[PROOFSTEP]\next y\n[GOAL]\ncase h\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx p : P\nhx : ¬x ∈ s\nhp : p ∈ s\ny : P\n⊢ y ∈ {y | WOppSide s x y} ↔ y ∈ Set.image2 (fun t q => t • (x -ᵥ p) +ᵥ q) (Set.Iic 0) ↑s\n[PROOFSTEP]\nsimp_rw [Set.mem_setOf, Set.mem_image2, Set.mem_Iic]\n[GOAL]\ncase h\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx p : P\nhx : ¬x ∈ s\nhp : p ∈ s\ny : P\n⊢ WOppSide s x y ↔ ∃ a b, a ≤ 0 ∧ b ∈ ↑s ∧ a • (x -ᵥ p) +ᵥ b = y\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx p : P\nhx : ¬x ∈ s\nhp : p ∈ s\ny : P\n⊢ WOppSide s x y → ∃ a b, a ≤ 0 ∧ b ∈ ↑s ∧ a • (x -ᵥ p) +ᵥ b = y\n[PROOFSTEP]\nrw [wOppSide_iff_exists_left hp, or_iff_right hx]\n[GOAL]\ncase h.mp\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx p : P\nhx : ¬x ∈ s\nhp : p ∈ s\ny : P\n⊢ (∃ p₂, p₂ ∈ s ∧ SameRay R (x -ᵥ p) (p₂ -ᵥ y)) → ∃ a b, a ≤ 0 ∧ b ∈ ↑s ∧ a • (x -ᵥ p) +ᵥ b = y\n[PROOFSTEP]\nrintro ⟨p₂, hp₂, h | h | ⟨r₁, r₂, hr₁, hr₂, h⟩⟩\n[GOAL]\ncase h.mp.intro.intro.inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx p : P\nhx : ¬x ∈ s\nhp : p ∈ s\ny p₂ : P\nhp₂ : p₂ ∈ s\nh : x -ᵥ p = 0\n⊢ ∃ a b, a ≤ 0 ∧ b ∈ ↑s ∧ a • (x -ᵥ p) +ᵥ b = y\n[PROOFSTEP]\nrw [vsub_eq_zero_iff_eq] at h \n[GOAL]\ncase h.mp.intro.intro.inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx p : P\nhx : ¬x ∈ s\nhp : p ∈ s\ny p₂ : P\nhp₂ : p₂ ∈ s\nh : x = p\n⊢ ∃ a b, a ≤ 0 ∧ b ∈ ↑s ∧ a • (x -ᵥ p) +ᵥ b = y\n[PROOFSTEP]\nexact False.elim (hx (h.symm ▸ hp))\n[GOAL]\ncase h.mp.intro.intro.inr.inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx p : P\nhx : ¬x ∈ s\nhp : p ∈ s\ny p₂ : P\nhp₂ : p₂ ∈ s\nh : p₂ -ᵥ y = 0\n⊢ ∃ a b, a ≤ 0 ∧ b ∈ ↑s ∧ a • (x -ᵥ p) +ᵥ b = y\n[PROOFSTEP]\nrw [vsub_eq_zero_iff_eq] at h \n[GOAL]\ncase h.mp.intro.intro.inr.inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx p : P\nhx : ¬x ∈ s\nhp : p ∈ s\ny p₂ : P\nhp₂ : p₂ ∈ s\nh : p₂ = y\n⊢ ∃ a b, a ≤ 0 ∧ b ∈ ↑s ∧ a • (x -ᵥ p) +ᵥ b = y\n[PROOFSTEP]\nrefine' ⟨0, p₂, le_refl _, hp₂, _⟩\n[GOAL]\ncase h.mp.intro.intro.inr.inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx p : P\nhx : ¬x ∈ s\nhp : p ∈ s\ny p₂ : P\nhp₂ : p₂ ∈ s\nh : p₂ = y\n⊢ 0 • (x -ᵥ p) +ᵥ p₂ = y\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase h.mp.intro.intro.inr.inr.intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx p : P\nhx : ¬x ∈ s\nhp : p ∈ s\ny p₂ : P\nhp₂ : p₂ ∈ s\nr₁ r₂ : R\nhr₁ : 0 < r₁\nhr₂ : 0 < r₂\nh : r₁ • (x -ᵥ p) = r₂ • (p₂ -ᵥ y)\n⊢ ∃ a b, a ≤ 0 ∧ b ∈ ↑s ∧ a • (x -ᵥ p) +ᵥ b = y\n[PROOFSTEP]\nrefine' ⟨-r₁ / r₂, p₂, (div_neg_of_neg_of_pos (Left.neg_neg_iff.2 hr₁) hr₂).le, hp₂, _⟩\n[GOAL]\ncase h.mp.intro.intro.inr.inr.intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx p : P\nhx : ¬x ∈ s\nhp : p ∈ s\ny p₂ : P\nhp₂ : p₂ ∈ s\nr₁ r₂ : R\nhr₁ : 0 < r₁\nhr₂ : 0 < r₂\nh : r₁ • (x -ᵥ p) = r₂ • (p₂ -ᵥ y)\n⊢ (-r₁ / r₂) • (x -ᵥ p) +ᵥ p₂ = y\n[PROOFSTEP]\nrw [div_eq_inv_mul, ← smul_smul, neg_smul, h, smul_neg, smul_smul, inv_mul_cancel hr₂.ne.symm, one_smul,\n  neg_vsub_eq_vsub_rev, vsub_vadd]\n[GOAL]\ncase h.mpr\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx p : P\nhx : ¬x ∈ s\nhp : p ∈ s\ny : P\n⊢ (∃ a b, a ≤ 0 ∧ b ∈ ↑s ∧ a • (x -ᵥ p) +ᵥ b = y) → WOppSide s x y\n[PROOFSTEP]\nrintro ⟨t, p', ht, hp', rfl⟩\n[GOAL]\ncase h.mpr.intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx p : P\nhx : ¬x ∈ s\nhp : p ∈ s\nt : R\np' : P\nht : t ≤ 0\nhp' : p' ∈ ↑s\n⊢ WOppSide s x (t • (x -ᵥ p) +ᵥ p')\n[PROOFSTEP]\nexact wOppSide_smul_vsub_vadd_right x hp hp' ht\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx p : P\nhx : ¬x ∈ s\nhp : p ∈ s\n⊢ {y | SOppSide s x y} = Set.image2 (fun t q => t • (x -ᵥ p) +ᵥ q) (Set.Iio 0) ↑s\n[PROOFSTEP]\next y\n[GOAL]\ncase h\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx p : P\nhx : ¬x ∈ s\nhp : p ∈ s\ny : P\n⊢ y ∈ {y | SOppSide s x y} ↔ y ∈ Set.image2 (fun t q => t • (x -ᵥ p) +ᵥ q) (Set.Iio 0) ↑s\n[PROOFSTEP]\nsimp_rw [Set.mem_setOf, Set.mem_image2, Set.mem_Iio]\n[GOAL]\ncase h\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx p : P\nhx : ¬x ∈ s\nhp : p ∈ s\ny : P\n⊢ SOppSide s x y ↔ ∃ a b, a < 0 ∧ b ∈ ↑s ∧ a • (x -ᵥ p) +ᵥ b = y\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx p : P\nhx : ¬x ∈ s\nhp : p ∈ s\ny : P\n⊢ SOppSide s x y → ∃ a b, a < 0 ∧ b ∈ ↑s ∧ a • (x -ᵥ p) +ᵥ b = y\n[PROOFSTEP]\nrw [sOppSide_iff_exists_left hp]\n[GOAL]\ncase h.mp\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx p : P\nhx : ¬x ∈ s\nhp : p ∈ s\ny : P\n⊢ (¬x ∈ s ∧ ¬y ∈ s ∧ ∃ p₂, p₂ ∈ s ∧ SameRay R (x -ᵥ p) (p₂ -ᵥ y)) → ∃ a b, a < 0 ∧ b ∈ ↑s ∧ a • (x -ᵥ p) +ᵥ b = y\n[PROOFSTEP]\nrintro ⟨-, hy, p₂, hp₂, h | h | ⟨r₁, r₂, hr₁, hr₂, h⟩⟩\n[GOAL]\ncase h.mp.intro.intro.intro.intro.inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx p : P\nhx : ¬x ∈ s\nhp : p ∈ s\ny : P\nhy : ¬y ∈ s\np₂ : P\nhp₂ : p₂ ∈ s\nh : x -ᵥ p = 0\n⊢ ∃ a b, a < 0 ∧ b ∈ ↑s ∧ a • (x -ᵥ p) +ᵥ b = y\n[PROOFSTEP]\nrw [vsub_eq_zero_iff_eq] at h \n[GOAL]\ncase h.mp.intro.intro.intro.intro.inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx p : P\nhx : ¬x ∈ s\nhp : p ∈ s\ny : P\nhy : ¬y ∈ s\np₂ : P\nhp₂ : p₂ ∈ s\nh : x = p\n⊢ ∃ a b, a < 0 ∧ b ∈ ↑s ∧ a • (x -ᵥ p) +ᵥ b = y\n[PROOFSTEP]\nexact False.elim (hx (h.symm ▸ hp))\n[GOAL]\ncase h.mp.intro.intro.intro.intro.inr.inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx p : P\nhx : ¬x ∈ s\nhp : p ∈ s\ny : P\nhy : ¬y ∈ s\np₂ : P\nhp₂ : p₂ ∈ s\nh : p₂ -ᵥ y = 0\n⊢ ∃ a b, a < 0 ∧ b ∈ ↑s ∧ a • (x -ᵥ p) +ᵥ b = y\n[PROOFSTEP]\nrw [vsub_eq_zero_iff_eq] at h \n[GOAL]\ncase h.mp.intro.intro.intro.intro.inr.inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx p : P\nhx : ¬x ∈ s\nhp : p ∈ s\ny : P\nhy : ¬y ∈ s\np₂ : P\nhp₂ : p₂ ∈ s\nh : p₂ = y\n⊢ ∃ a b, a < 0 ∧ b ∈ ↑s ∧ a • (x -ᵥ p) +ᵥ b = y\n[PROOFSTEP]\nexact False.elim (hy (h ▸ hp₂))\n[GOAL]\ncase h.mp.intro.intro.intro.intro.inr.inr.intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx p : P\nhx : ¬x ∈ s\nhp : p ∈ s\ny : P\nhy : ¬y ∈ s\np₂ : P\nhp₂ : p₂ ∈ s\nr₁ r₂ : R\nhr₁ : 0 < r₁\nhr₂ : 0 < r₂\nh : r₁ • (x -ᵥ p) = r₂ • (p₂ -ᵥ y)\n⊢ ∃ a b, a < 0 ∧ b ∈ ↑s ∧ a • (x -ᵥ p) +ᵥ b = y\n[PROOFSTEP]\nrefine' ⟨-r₁ / r₂, p₂, div_neg_of_neg_of_pos (Left.neg_neg_iff.2 hr₁) hr₂, hp₂, _⟩\n[GOAL]\ncase h.mp.intro.intro.intro.intro.inr.inr.intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx p : P\nhx : ¬x ∈ s\nhp : p ∈ s\ny : P\nhy : ¬y ∈ s\np₂ : P\nhp₂ : p₂ ∈ s\nr₁ r₂ : R\nhr₁ : 0 < r₁\nhr₂ : 0 < r₂\nh : r₁ • (x -ᵥ p) = r₂ • (p₂ -ᵥ y)\n⊢ (-r₁ / r₂) • (x -ᵥ p) +ᵥ p₂ = y\n[PROOFSTEP]\nrw [div_eq_inv_mul, ← smul_smul, neg_smul, h, smul_neg, smul_smul, inv_mul_cancel hr₂.ne.symm, one_smul,\n  neg_vsub_eq_vsub_rev, vsub_vadd]\n[GOAL]\ncase h.mpr\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx p : P\nhx : ¬x ∈ s\nhp : p ∈ s\ny : P\n⊢ (∃ a b, a < 0 ∧ b ∈ ↑s ∧ a • (x -ᵥ p) +ᵥ b = y) → SOppSide s x y\n[PROOFSTEP]\nrintro ⟨t, p', ht, hp', rfl⟩\n[GOAL]\ncase h.mpr.intro.intro.intro.intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx p : P\nhx : ¬x ∈ s\nhp : p ∈ s\nt : R\np' : P\nht : t < 0\nhp' : p' ∈ ↑s\n⊢ SOppSide s x (t • (x -ᵥ p) +ᵥ p')\n[PROOFSTEP]\nexact sOppSide_smul_vsub_vadd_right hx hp hp' ht\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y : P\nhx : x ∈ s\nhy : ¬y ∈ s\n⊢ SOppSide s y (↑(pointReflection R x) y)\n[PROOFSTEP]\nrefine' (sbtw_pointReflection_of_ne R fun h => hy _).sOppSide_of_not_mem_of_mem hy hx\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝⁶ : LinearOrderedField R\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : Module R V\ninst✝³ : AddTorsor V P\ninst✝² : AddCommGroup V'\ninst✝¹ : Module R V'\ninst✝ : AddTorsor V' P'\ns : AffineSubspace R P\nx y : P\nhx : x ∈ s\nhy : ¬y ∈ s\nh : x = y\n⊢ y ∈ s\n[PROOFSTEP]\nrwa [← h]\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : NormedSpace ℝ V\ninst✝¹ : PseudoMetricSpace P\ninst✝ : NormedAddTorsor V P\ns : AffineSubspace ℝ P\nx : P\nh : Set.Nonempty ↑s\n⊢ IsConnected {y | WSameSide s x y}\n[PROOFSTEP]\nobtain ⟨p, hp⟩ := h\n[GOAL]\ncase intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : NormedSpace ℝ V\ninst✝¹ : PseudoMetricSpace P\ninst✝ : NormedAddTorsor V P\ns : AffineSubspace ℝ P\nx p : P\nhp : p ∈ ↑s\n⊢ IsConnected {y | WSameSide s x y}\n[PROOFSTEP]\nhaveI : Nonempty s := ⟨⟨p, hp⟩⟩\n[GOAL]\ncase intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : NormedSpace ℝ V\ninst✝¹ : PseudoMetricSpace P\ninst✝ : NormedAddTorsor V P\ns : AffineSubspace ℝ P\nx p : P\nhp : p ∈ ↑s\nthis : Nonempty { x // x ∈ s }\n⊢ IsConnected {y | WSameSide s x y}\n[PROOFSTEP]\nby_cases hx : x ∈ s\n[GOAL]\ncase pos\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : NormedSpace ℝ V\ninst✝¹ : PseudoMetricSpace P\ninst✝ : NormedAddTorsor V P\ns : AffineSubspace ℝ P\nx p : P\nhp : p ∈ ↑s\nthis : Nonempty { x // x ∈ s }\nhx : x ∈ s\n⊢ IsConnected {y | WSameSide s x y}\n[PROOFSTEP]\nsimp only [wSameSide_of_left_mem, hx]\n[GOAL]\ncase pos\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : NormedSpace ℝ V\ninst✝¹ : PseudoMetricSpace P\ninst✝ : NormedAddTorsor V P\ns : AffineSubspace ℝ P\nx p : P\nhp : p ∈ ↑s\nthis : Nonempty { x // x ∈ s }\nhx : x ∈ s\n⊢ IsConnected {y | True}\n[PROOFSTEP]\nhave := AddTorsor.connectedSpace V P\n[GOAL]\ncase pos\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : NormedSpace ℝ V\ninst✝¹ : PseudoMetricSpace P\ninst✝ : NormedAddTorsor V P\ns : AffineSubspace ℝ P\nx p : P\nhp : p ∈ ↑s\nthis✝ : Nonempty { x // x ∈ s }\nhx : x ∈ s\nthis : ConnectedSpace P\n⊢ IsConnected {y | True}\n[PROOFSTEP]\nexact isConnected_univ\n[GOAL]\ncase neg\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : NormedSpace ℝ V\ninst✝¹ : PseudoMetricSpace P\ninst✝ : NormedAddTorsor V P\ns : AffineSubspace ℝ P\nx p : P\nhp : p ∈ ↑s\nthis : Nonempty { x // x ∈ s }\nhx : ¬x ∈ s\n⊢ IsConnected {y | WSameSide s x y}\n[PROOFSTEP]\nrw [setOf_wSameSide_eq_image2 hx hp, ← Set.image_prod]\n[GOAL]\ncase neg\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : NormedSpace ℝ V\ninst✝¹ : PseudoMetricSpace P\ninst✝ : NormedAddTorsor V P\ns : AffineSubspace ℝ P\nx p : P\nhp : p ∈ ↑s\nthis : Nonempty { x // x ∈ s }\nhx : ¬x ∈ s\n⊢ IsConnected ((fun x_1 => x_1.fst • (x -ᵥ p) +ᵥ x_1.snd) '' Set.Ici 0 ×ˢ ↑s)\n[PROOFSTEP]\nrefine'\n  (isConnected_Ici.prod (isConnected_iff_connectedSpace.2 _)).image _\n    ((continuous_fst.smul continuous_const).vadd continuous_snd).continuousOn\n[GOAL]\ncase neg\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : NormedSpace ℝ V\ninst✝¹ : PseudoMetricSpace P\ninst✝ : NormedAddTorsor V P\ns : AffineSubspace ℝ P\nx p : P\nhp : p ∈ ↑s\nthis : Nonempty { x // x ∈ s }\nhx : ¬x ∈ s\n⊢ ConnectedSpace ↑↑s\n[PROOFSTEP]\nconvert AddTorsor.connectedSpace s.direction s\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : NormedSpace ℝ V\ninst✝¹ : PseudoMetricSpace P\ninst✝ : NormedAddTorsor V P\ns : AffineSubspace ℝ P\nx : P\n⊢ IsPreconnected {y | WSameSide s x y}\n[PROOFSTEP]\nrcases Set.eq_empty_or_nonempty (s : Set P) with (h | h)\n[GOAL]\ncase inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : NormedSpace ℝ V\ninst✝¹ : PseudoMetricSpace P\ninst✝ : NormedAddTorsor V P\ns : AffineSubspace ℝ P\nx : P\nh : ↑s = ∅\n⊢ IsPreconnected {y | WSameSide s x y}\n[PROOFSTEP]\nrw [coe_eq_bot_iff] at h \n[GOAL]\ncase inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : NormedSpace ℝ V\ninst✝¹ : PseudoMetricSpace P\ninst✝ : NormedAddTorsor V P\ns : AffineSubspace ℝ P\nx : P\nh : s = ⊥\n⊢ IsPreconnected {y | WSameSide s x y}\n[PROOFSTEP]\nsimp only [h, not_wSameSide_bot]\n[GOAL]\ncase inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : NormedSpace ℝ V\ninst✝¹ : PseudoMetricSpace P\ninst✝ : NormedAddTorsor V P\ns : AffineSubspace ℝ P\nx : P\nh : s = ⊥\n⊢ IsPreconnected {y | False}\n[PROOFSTEP]\nexact isPreconnected_empty\n[GOAL]\ncase inr\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : NormedSpace ℝ V\ninst✝¹ : PseudoMetricSpace P\ninst✝ : NormedAddTorsor V P\ns : AffineSubspace ℝ P\nx : P\nh : Set.Nonempty ↑s\n⊢ IsPreconnected {y | WSameSide s x y}\n[PROOFSTEP]\nexact (isConnected_setOf_wSameSide x h).isPreconnected\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : NormedSpace ℝ V\ninst✝¹ : PseudoMetricSpace P\ninst✝ : NormedAddTorsor V P\ns : AffineSubspace ℝ P\nx : P\nhx : ¬x ∈ s\nh : Set.Nonempty ↑s\n⊢ IsConnected {y | SSameSide s x y}\n[PROOFSTEP]\nobtain ⟨p, hp⟩ := h\n[GOAL]\ncase intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : NormedSpace ℝ V\ninst✝¹ : PseudoMetricSpace P\ninst✝ : NormedAddTorsor V P\ns : AffineSubspace ℝ P\nx : P\nhx : ¬x ∈ s\np : P\nhp : p ∈ ↑s\n⊢ IsConnected {y | SSameSide s x y}\n[PROOFSTEP]\nhaveI : Nonempty s := ⟨⟨p, hp⟩⟩\n[GOAL]\ncase intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : NormedSpace ℝ V\ninst✝¹ : PseudoMetricSpace P\ninst✝ : NormedAddTorsor V P\ns : AffineSubspace ℝ P\nx : P\nhx : ¬x ∈ s\np : P\nhp : p ∈ ↑s\nthis : Nonempty { x // x ∈ s }\n⊢ IsConnected {y | SSameSide s x y}\n[PROOFSTEP]\nrw [setOf_sSameSide_eq_image2 hx hp, ← Set.image_prod]\n[GOAL]\ncase intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : NormedSpace ℝ V\ninst✝¹ : PseudoMetricSpace P\ninst✝ : NormedAddTorsor V P\ns : AffineSubspace ℝ P\nx : P\nhx : ¬x ∈ s\np : P\nhp : p ∈ ↑s\nthis : Nonempty { x // x ∈ s }\n⊢ IsConnected ((fun x_1 => x_1.fst • (x -ᵥ p) +ᵥ x_1.snd) '' Set.Ioi 0 ×ˢ ↑s)\n[PROOFSTEP]\nrefine'\n  (isConnected_Ioi.prod (isConnected_iff_connectedSpace.2 _)).image _\n    ((continuous_fst.smul continuous_const).vadd continuous_snd).continuousOn\n[GOAL]\ncase intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : NormedSpace ℝ V\ninst✝¹ : PseudoMetricSpace P\ninst✝ : NormedAddTorsor V P\ns : AffineSubspace ℝ P\nx : P\nhx : ¬x ∈ s\np : P\nhp : p ∈ ↑s\nthis : Nonempty { x // x ∈ s }\n⊢ ConnectedSpace ↑↑s\n[PROOFSTEP]\nconvert AddTorsor.connectedSpace s.direction s\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : NormedSpace ℝ V\ninst✝¹ : PseudoMetricSpace P\ninst✝ : NormedAddTorsor V P\ns : AffineSubspace ℝ P\nx : P\n⊢ IsPreconnected {y | SSameSide s x y}\n[PROOFSTEP]\nrcases Set.eq_empty_or_nonempty (s : Set P) with (h | h)\n[GOAL]\ncase inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : NormedSpace ℝ V\ninst✝¹ : PseudoMetricSpace P\ninst✝ : NormedAddTorsor V P\ns : AffineSubspace ℝ P\nx : P\nh : ↑s = ∅\n⊢ IsPreconnected {y | SSameSide s x y}\n[PROOFSTEP]\nrw [coe_eq_bot_iff] at h \n[GOAL]\ncase inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : NormedSpace ℝ V\ninst✝¹ : PseudoMetricSpace P\ninst✝ : NormedAddTorsor V P\ns : AffineSubspace ℝ P\nx : P\nh : s = ⊥\n⊢ IsPreconnected {y | SSameSide s x y}\n[PROOFSTEP]\nsimp only [h, not_sSameSide_bot]\n[GOAL]\ncase inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : NormedSpace ℝ V\ninst✝¹ : PseudoMetricSpace P\ninst✝ : NormedAddTorsor V P\ns : AffineSubspace ℝ P\nx : P\nh : s = ⊥\n⊢ IsPreconnected {y | False}\n[PROOFSTEP]\nexact isPreconnected_empty\n[GOAL]\ncase inr\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : NormedSpace ℝ V\ninst✝¹ : PseudoMetricSpace P\ninst✝ : NormedAddTorsor V P\ns : AffineSubspace ℝ P\nx : P\nh : Set.Nonempty ↑s\n⊢ IsPreconnected {y | SSameSide s x y}\n[PROOFSTEP]\nby_cases hx : x ∈ s\n[GOAL]\ncase pos\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : NormedSpace ℝ V\ninst✝¹ : PseudoMetricSpace P\ninst✝ : NormedAddTorsor V P\ns : AffineSubspace ℝ P\nx : P\nh : Set.Nonempty ↑s\nhx : x ∈ s\n⊢ IsPreconnected {y | SSameSide s x y}\n[PROOFSTEP]\nsimp only [hx, SSameSide, not_true, false_and_iff, and_false_iff]\n[GOAL]\ncase pos\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : NormedSpace ℝ V\ninst✝¹ : PseudoMetricSpace P\ninst✝ : NormedAddTorsor V P\ns : AffineSubspace ℝ P\nx : P\nh : Set.Nonempty ↑s\nhx : x ∈ s\n⊢ IsPreconnected {y | False}\n[PROOFSTEP]\nexact isPreconnected_empty\n[GOAL]\ncase neg\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : NormedSpace ℝ V\ninst✝¹ : PseudoMetricSpace P\ninst✝ : NormedAddTorsor V P\ns : AffineSubspace ℝ P\nx : P\nh : Set.Nonempty ↑s\nhx : ¬x ∈ s\n⊢ IsPreconnected {y | SSameSide s x y}\n[PROOFSTEP]\nexact (isConnected_setOf_sSameSide hx h).isPreconnected\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : NormedSpace ℝ V\ninst✝¹ : PseudoMetricSpace P\ninst✝ : NormedAddTorsor V P\ns : AffineSubspace ℝ P\nx : P\nh : Set.Nonempty ↑s\n⊢ IsConnected {y | WOppSide s x y}\n[PROOFSTEP]\nobtain ⟨p, hp⟩ := h\n[GOAL]\ncase intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : NormedSpace ℝ V\ninst✝¹ : PseudoMetricSpace P\ninst✝ : NormedAddTorsor V P\ns : AffineSubspace ℝ P\nx p : P\nhp : p ∈ ↑s\n⊢ IsConnected {y | WOppSide s x y}\n[PROOFSTEP]\nhaveI : Nonempty s := ⟨⟨p, hp⟩⟩\n[GOAL]\ncase intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : NormedSpace ℝ V\ninst✝¹ : PseudoMetricSpace P\ninst✝ : NormedAddTorsor V P\ns : AffineSubspace ℝ P\nx p : P\nhp : p ∈ ↑s\nthis : Nonempty { x // x ∈ s }\n⊢ IsConnected {y | WOppSide s x y}\n[PROOFSTEP]\nby_cases hx : x ∈ s\n[GOAL]\ncase pos\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : NormedSpace ℝ V\ninst✝¹ : PseudoMetricSpace P\ninst✝ : NormedAddTorsor V P\ns : AffineSubspace ℝ P\nx p : P\nhp : p ∈ ↑s\nthis : Nonempty { x // x ∈ s }\nhx : x ∈ s\n⊢ IsConnected {y | WOppSide s x y}\n[PROOFSTEP]\nsimp only [wOppSide_of_left_mem, hx]\n[GOAL]\ncase pos\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : NormedSpace ℝ V\ninst✝¹ : PseudoMetricSpace P\ninst✝ : NormedAddTorsor V P\ns : AffineSubspace ℝ P\nx p : P\nhp : p ∈ ↑s\nthis : Nonempty { x // x ∈ s }\nhx : x ∈ s\n⊢ IsConnected {y | True}\n[PROOFSTEP]\nhave := AddTorsor.connectedSpace V P\n[GOAL]\ncase pos\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : NormedSpace ℝ V\ninst✝¹ : PseudoMetricSpace P\ninst✝ : NormedAddTorsor V P\ns : AffineSubspace ℝ P\nx p : P\nhp : p ∈ ↑s\nthis✝ : Nonempty { x // x ∈ s }\nhx : x ∈ s\nthis : ConnectedSpace P\n⊢ IsConnected {y | True}\n[PROOFSTEP]\nexact isConnected_univ\n[GOAL]\ncase neg\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : NormedSpace ℝ V\ninst✝¹ : PseudoMetricSpace P\ninst✝ : NormedAddTorsor V P\ns : AffineSubspace ℝ P\nx p : P\nhp : p ∈ ↑s\nthis : Nonempty { x // x ∈ s }\nhx : ¬x ∈ s\n⊢ IsConnected {y | WOppSide s x y}\n[PROOFSTEP]\nrw [setOf_wOppSide_eq_image2 hx hp, ← Set.image_prod]\n[GOAL]\ncase neg\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : NormedSpace ℝ V\ninst✝¹ : PseudoMetricSpace P\ninst✝ : NormedAddTorsor V P\ns : AffineSubspace ℝ P\nx p : P\nhp : p ∈ ↑s\nthis : Nonempty { x // x ∈ s }\nhx : ¬x ∈ s\n⊢ IsConnected ((fun x_1 => x_1.fst • (x -ᵥ p) +ᵥ x_1.snd) '' Set.Iic 0 ×ˢ ↑s)\n[PROOFSTEP]\nrefine'\n  (isConnected_Iic.prod (isConnected_iff_connectedSpace.2 _)).image _\n    ((continuous_fst.smul continuous_const).vadd continuous_snd).continuousOn\n[GOAL]\ncase neg\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : NormedSpace ℝ V\ninst✝¹ : PseudoMetricSpace P\ninst✝ : NormedAddTorsor V P\ns : AffineSubspace ℝ P\nx p : P\nhp : p ∈ ↑s\nthis : Nonempty { x // x ∈ s }\nhx : ¬x ∈ s\n⊢ ConnectedSpace ↑↑s\n[PROOFSTEP]\nconvert AddTorsor.connectedSpace s.direction s\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : NormedSpace ℝ V\ninst✝¹ : PseudoMetricSpace P\ninst✝ : NormedAddTorsor V P\ns : AffineSubspace ℝ P\nx : P\n⊢ IsPreconnected {y | WOppSide s x y}\n[PROOFSTEP]\nrcases Set.eq_empty_or_nonempty (s : Set P) with (h | h)\n[GOAL]\ncase inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : NormedSpace ℝ V\ninst✝¹ : PseudoMetricSpace P\ninst✝ : NormedAddTorsor V P\ns : AffineSubspace ℝ P\nx : P\nh : ↑s = ∅\n⊢ IsPreconnected {y | WOppSide s x y}\n[PROOFSTEP]\nrw [coe_eq_bot_iff] at h \n[GOAL]\ncase inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : NormedSpace ℝ V\ninst✝¹ : PseudoMetricSpace P\ninst✝ : NormedAddTorsor V P\ns : AffineSubspace ℝ P\nx : P\nh : s = ⊥\n⊢ IsPreconnected {y | WOppSide s x y}\n[PROOFSTEP]\nsimp only [h, not_wOppSide_bot]\n[GOAL]\ncase inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : NormedSpace ℝ V\ninst✝¹ : PseudoMetricSpace P\ninst✝ : NormedAddTorsor V P\ns : AffineSubspace ℝ P\nx : P\nh : s = ⊥\n⊢ IsPreconnected {y | False}\n[PROOFSTEP]\nexact isPreconnected_empty\n[GOAL]\ncase inr\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : NormedSpace ℝ V\ninst✝¹ : PseudoMetricSpace P\ninst✝ : NormedAddTorsor V P\ns : AffineSubspace ℝ P\nx : P\nh : Set.Nonempty ↑s\n⊢ IsPreconnected {y | WOppSide s x y}\n[PROOFSTEP]\nexact (isConnected_setOf_wOppSide x h).isPreconnected\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : NormedSpace ℝ V\ninst✝¹ : PseudoMetricSpace P\ninst✝ : NormedAddTorsor V P\ns : AffineSubspace ℝ P\nx : P\nhx : ¬x ∈ s\nh : Set.Nonempty ↑s\n⊢ IsConnected {y | SOppSide s x y}\n[PROOFSTEP]\nobtain ⟨p, hp⟩ := h\n[GOAL]\ncase intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : NormedSpace ℝ V\ninst✝¹ : PseudoMetricSpace P\ninst✝ : NormedAddTorsor V P\ns : AffineSubspace ℝ P\nx : P\nhx : ¬x ∈ s\np : P\nhp : p ∈ ↑s\n⊢ IsConnected {y | SOppSide s x y}\n[PROOFSTEP]\nhaveI : Nonempty s := ⟨⟨p, hp⟩⟩\n[GOAL]\ncase intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : NormedSpace ℝ V\ninst✝¹ : PseudoMetricSpace P\ninst✝ : NormedAddTorsor V P\ns : AffineSubspace ℝ P\nx : P\nhx : ¬x ∈ s\np : P\nhp : p ∈ ↑s\nthis : Nonempty { x // x ∈ s }\n⊢ IsConnected {y | SOppSide s x y}\n[PROOFSTEP]\nrw [setOf_sOppSide_eq_image2 hx hp, ← Set.image_prod]\n[GOAL]\ncase intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : NormedSpace ℝ V\ninst✝¹ : PseudoMetricSpace P\ninst✝ : NormedAddTorsor V P\ns : AffineSubspace ℝ P\nx : P\nhx : ¬x ∈ s\np : P\nhp : p ∈ ↑s\nthis : Nonempty { x // x ∈ s }\n⊢ IsConnected ((fun x_1 => x_1.fst • (x -ᵥ p) +ᵥ x_1.snd) '' Set.Iio 0 ×ˢ ↑s)\n[PROOFSTEP]\nrefine'\n  (isConnected_Iio.prod (isConnected_iff_connectedSpace.2 _)).image _\n    ((continuous_fst.smul continuous_const).vadd continuous_snd).continuousOn\n[GOAL]\ncase intro\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : NormedSpace ℝ V\ninst✝¹ : PseudoMetricSpace P\ninst✝ : NormedAddTorsor V P\ns : AffineSubspace ℝ P\nx : P\nhx : ¬x ∈ s\np : P\nhp : p ∈ ↑s\nthis : Nonempty { x // x ∈ s }\n⊢ ConnectedSpace ↑↑s\n[PROOFSTEP]\nconvert AddTorsor.connectedSpace s.direction s\n[GOAL]\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : NormedSpace ℝ V\ninst✝¹ : PseudoMetricSpace P\ninst✝ : NormedAddTorsor V P\ns : AffineSubspace ℝ P\nx : P\n⊢ IsPreconnected {y | SOppSide s x y}\n[PROOFSTEP]\nrcases Set.eq_empty_or_nonempty (s : Set P) with (h | h)\n[GOAL]\ncase inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : NormedSpace ℝ V\ninst✝¹ : PseudoMetricSpace P\ninst✝ : NormedAddTorsor V P\ns : AffineSubspace ℝ P\nx : P\nh : ↑s = ∅\n⊢ IsPreconnected {y | SOppSide s x y}\n[PROOFSTEP]\nrw [coe_eq_bot_iff] at h \n[GOAL]\ncase inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : NormedSpace ℝ V\ninst✝¹ : PseudoMetricSpace P\ninst✝ : NormedAddTorsor V P\ns : AffineSubspace ℝ P\nx : P\nh : s = ⊥\n⊢ IsPreconnected {y | SOppSide s x y}\n[PROOFSTEP]\nsimp only [h, not_sOppSide_bot]\n[GOAL]\ncase inl\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : NormedSpace ℝ V\ninst✝¹ : PseudoMetricSpace P\ninst✝ : NormedAddTorsor V P\ns : AffineSubspace ℝ P\nx : P\nh : s = ⊥\n⊢ IsPreconnected {y | False}\n[PROOFSTEP]\nexact isPreconnected_empty\n[GOAL]\ncase inr\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : NormedSpace ℝ V\ninst✝¹ : PseudoMetricSpace P\ninst✝ : NormedAddTorsor V P\ns : AffineSubspace ℝ P\nx : P\nh : Set.Nonempty ↑s\n⊢ IsPreconnected {y | SOppSide s x y}\n[PROOFSTEP]\nby_cases hx : x ∈ s\n[GOAL]\ncase pos\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : NormedSpace ℝ V\ninst✝¹ : PseudoMetricSpace P\ninst✝ : NormedAddTorsor V P\ns : AffineSubspace ℝ P\nx : P\nh : Set.Nonempty ↑s\nhx : x ∈ s\n⊢ IsPreconnected {y | SOppSide s x y}\n[PROOFSTEP]\nsimp only [hx, SOppSide, not_true, false_and_iff, and_false_iff]\n[GOAL]\ncase pos\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : NormedSpace ℝ V\ninst✝¹ : PseudoMetricSpace P\ninst✝ : NormedAddTorsor V P\ns : AffineSubspace ℝ P\nx : P\nh : Set.Nonempty ↑s\nhx : x ∈ s\n⊢ IsPreconnected {y | False}\n[PROOFSTEP]\nexact isPreconnected_empty\n[GOAL]\ncase neg\nR : Type u_1\nV : Type u_2\nV' : Type u_3\nP : Type u_4\nP' : Type u_5\ninst✝³ : SeminormedAddCommGroup V\ninst✝² : NormedSpace ℝ V\ninst✝¹ : PseudoMetricSpace P\ninst✝ : NormedAddTorsor V P\ns : AffineSubspace ℝ P\nx : P\nh : Set.Nonempty ↑s\nhx : ¬x ∈ s\n⊢ IsPreconnected {y | SOppSide s x y}\n[PROOFSTEP]\nexact (isConnected_setOf_sOppSide hx h).isPreconnected\n", "meta": {"mathlib_filename": "Mathlib.Analysis.Convex.Side", "llama_tokens": 78467, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7718434873426302, "lm_q2_score": 0.672331699179286, "lm_q1q2_score": 0.5189348433455363}}
{"text": "[GOAL]\nn : ℕ\nF : TypeVec n → Type u\ninst✝¹ : MvFunctor F\nq : MvQPF F\nG : TypeVec n → Type u\ninst✝ : MvFunctor G\nFG_abs : {α : TypeVec n} → F α → G α\nFG_repr : {α : TypeVec n} → G α → F α\nFG_abs_repr : ∀ {α : TypeVec n} (x : G α), FG_abs (FG_repr x) = x\nFG_abs_map : ∀ {α β : TypeVec n} (f : α ⟹ β) (x : F α), FG_abs (f <$$> x) = f <$$> FG_abs x\nα✝ : TypeVec n\nx : G α✝\n⊢ (fun {α} p => FG_abs (abs p)) ((fun {α} x => repr (FG_repr x)) x) = x\n[PROOFSTEP]\ndsimp\n[GOAL]\nn : ℕ\nF : TypeVec n → Type u\ninst✝¹ : MvFunctor F\nq : MvQPF F\nG : TypeVec n → Type u\ninst✝ : MvFunctor G\nFG_abs : {α : TypeVec n} → F α → G α\nFG_repr : {α : TypeVec n} → G α → F α\nFG_abs_repr : ∀ {α : TypeVec n} (x : G α), FG_abs (FG_repr x) = x\nFG_abs_map : ∀ {α β : TypeVec n} (f : α ⟹ β) (x : F α), FG_abs (f <$$> x) = f <$$> FG_abs x\nα✝ : TypeVec n\nx : G α✝\n⊢ FG_abs (abs (repr (FG_repr x))) = x\n[PROOFSTEP]\nrw [abs_repr, FG_abs_repr]\n[GOAL]\nn : ℕ\nF : TypeVec n → Type u\ninst✝¹ : MvFunctor F\nq : MvQPF F\nG : TypeVec n → Type u\ninst✝ : MvFunctor G\nFG_abs : {α : TypeVec n} → F α → G α\nFG_repr : {α : TypeVec n} → G α → F α\nFG_abs_repr : ∀ {α : TypeVec n} (x : G α), FG_abs (FG_repr x) = x\nFG_abs_map : ∀ {α β : TypeVec n} (f : α ⟹ β) (x : F α), FG_abs (f <$$> x) = f <$$> FG_abs x\nα✝ β✝ : TypeVec n\nf : α✝ ⟹ β✝\np : MvPFunctor.Obj (P F) α✝\n⊢ (fun {α} p => FG_abs (abs p)) (f <$$> p) = f <$$> (fun {α} p => FG_abs (abs p)) p\n[PROOFSTEP]\ndsimp\n[GOAL]\nn : ℕ\nF : TypeVec n → Type u\ninst✝¹ : MvFunctor F\nq : MvQPF F\nG : TypeVec n → Type u\ninst✝ : MvFunctor G\nFG_abs : {α : TypeVec n} → F α → G α\nFG_repr : {α : TypeVec n} → G α → F α\nFG_abs_repr : ∀ {α : TypeVec n} (x : G α), FG_abs (FG_repr x) = x\nFG_abs_map : ∀ {α β : TypeVec n} (f : α ⟹ β) (x : F α), FG_abs (f <$$> x) = f <$$> FG_abs x\nα✝ β✝ : TypeVec n\nf : α✝ ⟹ β✝\np : MvPFunctor.Obj (P F) α✝\n⊢ FG_abs (abs (f <$$> p)) = f <$$> FG_abs (abs p)\n[PROOFSTEP]\nrw [abs_map, FG_abs_map]\n", "meta": {"mathlib_filename": "Mathlib.Data.QPF.Multivariate.Constructions.Quot", "llama_tokens": 1097, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8333245911726382, "lm_q2_score": 0.6224593312018546, "lm_q1q2_score": 0.5187106676953793}}
{"text": "[GOAL]\nE : Type u_1\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module ℝ E\ninst✝² : TopologicalSpace E\ninst✝¹ : ContinuousAdd E\ninst✝ : ContinuousSMul ℝ E\ns : Set E\nx : E\nh : StarConvex ℝ x s\nhne : Set.Nonempty s\n⊢ ContractibleSpace ↑s\n[PROOFSTEP]\nrefine'\n  (contractible_iff_id_nullhomotopic s).2\n    ⟨⟨x, h.mem hne⟩, ⟨⟨⟨fun p => ⟨p.1.1 • x + (1 - p.1.1) • (p.2 : E), _⟩, _⟩, fun x => _, fun x => _⟩⟩⟩\n[GOAL]\ncase refine'_1\nE : Type u_1\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module ℝ E\ninst✝² : TopologicalSpace E\ninst✝¹ : ContinuousAdd E\ninst✝ : ContinuousSMul ℝ E\ns : Set E\nx : E\nh : StarConvex ℝ x s\nhne : Set.Nonempty s\np : ↑unitInterval × ↑s\n⊢ ↑p.fst • x + (1 - ↑p.fst) • ↑p.snd ∈ s\n[PROOFSTEP]\nexact h p.2.2 p.1.2.1 (sub_nonneg.2 p.1.2.2) (add_sub_cancel'_right _ _)\n[GOAL]\ncase refine'_2\nE : Type u_1\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module ℝ E\ninst✝² : TopologicalSpace E\ninst✝¹ : ContinuousAdd E\ninst✝ : ContinuousSMul ℝ E\ns : Set E\nx : E\nh : StarConvex ℝ x s\nhne : Set.Nonempty s\n⊢ Continuous fun p =>\n    { val := ↑p.fst • x + (1 - ↑p.fst) • ↑p.snd, property := (_ : ↑p.fst • x + (1 - ↑p.fst) • ↑p.snd ∈ s) }\n[PROOFSTEP]\nexact\n  ((continuous_subtype_val.fst'.smul continuous_const).add\n        ((continuous_const.sub continuous_subtype_val.fst').smul continuous_subtype_val.snd')).subtype_mk\n    _\n[GOAL]\ncase refine'_3\nE : Type u_1\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module ℝ E\ninst✝² : TopologicalSpace E\ninst✝¹ : ContinuousAdd E\ninst✝ : ContinuousSMul ℝ E\ns : Set E\nx✝ : E\nh : StarConvex ℝ x✝ s\nhne : Set.Nonempty s\nx : ↑s\n⊢ ContinuousMap.toFun\n      (ContinuousMap.mk fun p =>\n        { val := ↑p.fst • x✝ + (1 - ↑p.fst) • ↑p.snd, property := (_ : ↑p.fst • x✝ + (1 - ↑p.fst) • ↑p.snd ∈ s) })\n      (0, x) =\n    ↑(ContinuousMap.id ↑s) x\n[PROOFSTEP]\next1\n[GOAL]\ncase refine'_3.a\nE : Type u_1\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module ℝ E\ninst✝² : TopologicalSpace E\ninst✝¹ : ContinuousAdd E\ninst✝ : ContinuousSMul ℝ E\ns : Set E\nx✝ : E\nh : StarConvex ℝ x✝ s\nhne : Set.Nonempty s\nx : ↑s\n⊢ ↑(ContinuousMap.toFun\n        (ContinuousMap.mk fun p =>\n          { val := ↑p.fst • x✝ + (1 - ↑p.fst) • ↑p.snd, property := (_ : ↑p.fst • x✝ + (1 - ↑p.fst) • ↑p.snd ∈ s) })\n        (0, x)) =\n    ↑(↑(ContinuousMap.id ↑s) x)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase refine'_4\nE : Type u_1\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module ℝ E\ninst✝² : TopologicalSpace E\ninst✝¹ : ContinuousAdd E\ninst✝ : ContinuousSMul ℝ E\ns : Set E\nx✝ : E\nh : StarConvex ℝ x✝ s\nhne : Set.Nonempty s\nx : ↑s\n⊢ ContinuousMap.toFun\n      (ContinuousMap.mk fun p =>\n        { val := ↑p.fst • x✝ + (1 - ↑p.fst) • ↑p.snd, property := (_ : ↑p.fst • x✝ + (1 - ↑p.fst) • ↑p.snd ∈ s) })\n      (1, x) =\n    ↑(ContinuousMap.const ↑s { val := x✝, property := (_ : x✝ ∈ s) }) x\n[PROOFSTEP]\next1\n[GOAL]\ncase refine'_4.a\nE : Type u_1\ninst✝⁴ : AddCommGroup E\ninst✝³ : Module ℝ E\ninst✝² : TopologicalSpace E\ninst✝¹ : ContinuousAdd E\ninst✝ : ContinuousSMul ℝ E\ns : Set E\nx✝ : E\nh : StarConvex ℝ x✝ s\nhne : Set.Nonempty s\nx : ↑s\n⊢ ↑(ContinuousMap.toFun\n        (ContinuousMap.mk fun p =>\n          { val := ↑p.fst • x✝ + (1 - ↑p.fst) • ↑p.snd, property := (_ : ↑p.fst • x✝ + (1 - ↑p.fst) • ↑p.snd ∈ s) })\n        (1, x)) =\n    ↑(↑(ContinuousMap.const ↑s { val := x✝, property := (_ : x✝ ∈ s) }) x)\n[PROOFSTEP]\nsimp\n", "meta": {"mathlib_filename": "Mathlib.Analysis.Convex.Contractible", "llama_tokens": 1678, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7745833841649232, "lm_q2_score": 0.6688802735722128, "lm_q1q2_score": 0.5181035459047243}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\nh : α ≃ₜ β\n⊢ Homeomorph.trans h (Homeomorph.symm h) = Homeomorph.refl α\n[PROOFSTEP]\next\n[GOAL]\ncase H\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\nh : α ≃ₜ β\nx✝ : α\n⊢ ↑(Homeomorph.trans h (Homeomorph.symm h)) x✝ = ↑(Homeomorph.refl α) x✝\n[PROOFSTEP]\napply symm_apply_apply\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\nh : α ≃ₜ β\n⊢ Homeomorph.trans (Homeomorph.symm h) h = Homeomorph.refl β\n[PROOFSTEP]\next\n[GOAL]\ncase H\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\nh : α ≃ₜ β\nx✝ : β\n⊢ ↑(Homeomorph.trans (Homeomorph.symm h) h) x✝ = ↑(Homeomorph.refl β) x✝\n[PROOFSTEP]\napply apply_symm_apply\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\nf : α ≃ₜ β\ng : β → α\nhg : Function.RightInverse g ↑f\nthis : g = ↑(Homeomorph.symm f)\n⊢ Function.LeftInverse g ↑f\n[PROOFSTEP]\nconvert f.left_inv\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\nf : α ≃ₜ β\ng : β → α\nhg : Function.RightInverse g ↑f\nthis : g = ↑(Homeomorph.symm f)\n⊢ Function.RightInverse g ↑f\n[PROOFSTEP]\nconvert f.right_inv using 1\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\nf : α ≃ₜ β\ng : β → α\nhg : Function.RightInverse g ↑f\nthis : g = ↑(Homeomorph.symm f)\n⊢ Continuous\n    { toFun := ↑f, invFun := g, left_inv := (_ : Function.LeftInverse g ↑f),\n        right_inv := (_ : Function.RightInverse g ↑f) }.invFun\n[PROOFSTEP]\nconvert f.symm.continuous\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\nh : α ≃ₜ β\n⊢ Inducing (↑(Homeomorph.symm h) ∘ ↑h)\n[PROOFSTEP]\nsimp only [symm_comp_self, inducing_id]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\nh : α ≃ₜ β\n⊢ QuotientMap (↑h ∘ ↑(Homeomorph.symm h))\n[PROOFSTEP]\nsimp only [self_comp_symm, QuotientMap.id]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\nf : α → β\nhf : Embedding f\n⊢ Continuous (f ∘ (Equiv.ofInjective f (_ : Function.Injective f)).invFun)\n[PROOFSTEP]\nsimp [continuous_subtype_val]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\ns : Set β\nh : α ≃ₜ β\n⊢ IsCompact (↑h ⁻¹' s) ↔ IsCompact s\n[PROOFSTEP]\nrw [← image_symm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\ns : Set β\nh : α ≃ₜ β\n⊢ IsCompact (↑(Homeomorph.symm h) '' s) ↔ IsCompact s\n[PROOFSTEP]\nexact h.symm.isCompact_image\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\ns : Set α\nh : α ≃ₜ β\nhs : IsPreconnected (↑h '' s)\n⊢ IsPreconnected s\n[PROOFSTEP]\nsimpa only [image_symm, preimage_image] using hs.image _ h.symm.continuous.continuousOn\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\ns : Set β\nh : α ≃ₜ β\n⊢ IsPreconnected (↑h ⁻¹' s) ↔ IsPreconnected s\n[PROOFSTEP]\nrw [← image_symm, isPreconnected_image]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\ns : Set β\nh : α ≃ₜ β\n⊢ IsConnected (↑h ⁻¹' s) ↔ IsConnected s\n[PROOFSTEP]\nrw [← image_symm, isConnected_image]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\nh : α ≃ₜ β\n⊢ map (↑h) (cocompact α) = cocompact β\n[PROOFSTEP]\nrw [← h.comap_cocompact, map_comap_of_surjective h.surjective]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\nh : α ≃ₜ β\ns : Set α\n⊢ IsOpen (↑h '' s) ↔ IsOpen s\n[PROOFSTEP]\nrw [← preimage_symm, isOpen_preimage]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\nh : α ≃ₜ β\ns : Set β\n⊢ IsClosed (↑h ⁻¹' s) ↔ IsClosed s\n[PROOFSTEP]\nsimp only [← isOpen_compl_iff, ← preimage_compl, isOpen_preimage]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\nh : α ≃ₜ β\ns : Set α\n⊢ IsClosed (↑h '' s) ↔ IsClosed s\n[PROOFSTEP]\nrw [← preimage_symm, isClosed_preimage]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\nh : α ≃ₜ β\ns : Set α\n⊢ ↑h '' closure s = closure (↑h '' s)\n[PROOFSTEP]\nrw [← preimage_symm, preimage_closure]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\nh : α ≃ₜ β\ns : Set α\n⊢ ↑h '' interior s = interior (↑h '' s)\n[PROOFSTEP]\nrw [← preimage_symm, preimage_interior]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\nh : α ≃ₜ β\ns : Set α\n⊢ ↑h '' frontier s = frontier (↑h '' s)\n[PROOFSTEP]\nrw [← preimage_symm, preimage_frontier]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\nh : α ≃ₜ β\nx : α\n⊢ range ↑h ∈ 𝓝 (↑h x)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\nh : α ≃ₜ β\nx : α\n⊢ map (↑(Homeomorph.symm h)) (𝓝 (↑h x)) = 𝓝 x\n[PROOFSTEP]\nrw [h.symm.map_nhds_eq, h.symm_apply_apply]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\nh : α ≃ₜ β\ny : β\n⊢ comap (↑h) (𝓝 y) = 𝓝 (↑(Homeomorph.symm h) y)\n[PROOFSTEP]\nrw [h.nhds_eq_comap, h.apply_symm_apply]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\ni : LocallyConnectedSpace β\nh : α ≃ₜ β\n⊢ LocallyConnectedSpace α\n[PROOFSTEP]\nhave : ∀ x, (𝓝 x).HasBasis (fun s ↦ IsOpen s ∧ h x ∈ s ∧ IsConnected s) (h.symm '' ·) := fun x ↦\n  by\n  rw [← h.symm_map_nhds_eq]\n  exact (i.1 _).map _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\ni : LocallyConnectedSpace β\nh : α ≃ₜ β\nx : α\n⊢ HasBasis (𝓝 x) (fun s => IsOpen s ∧ ↑h x ∈ s ∧ IsConnected s) fun x => ↑(Homeomorph.symm h) '' x\n[PROOFSTEP]\nrw [← h.symm_map_nhds_eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\ni : LocallyConnectedSpace β\nh : α ≃ₜ β\nx : α\n⊢ HasBasis (map (↑(Homeomorph.symm h)) (𝓝 (↑h x))) (fun s => IsOpen s ∧ ↑h x ∈ s ∧ IsConnected s) fun x =>\n    ↑(Homeomorph.symm h) '' x\n[PROOFSTEP]\nexact (i.1 _).map _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\ni : LocallyConnectedSpace β\nh : α ≃ₜ β\nthis : ∀ (x : α), HasBasis (𝓝 x) (fun s => IsOpen s ∧ ↑h x ∈ s ∧ IsConnected s) fun x => ↑(Homeomorph.symm h) '' x\n⊢ LocallyConnectedSpace α\n[PROOFSTEP]\nrefine locallyConnectedSpace_of_connected_bases _ _ this fun _ _ hs ↦ ?_\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\ni : LocallyConnectedSpace β\nh : α ≃ₜ β\nthis : ∀ (x : α), HasBasis (𝓝 x) (fun s => IsOpen s ∧ ↑h x ∈ s ∧ IsConnected s) fun x => ↑(Homeomorph.symm h) '' x\nx✝¹ : α\nx✝ : Set β\nhs : IsOpen x✝ ∧ ↑h x✝¹ ∈ x✝ ∧ IsConnected x✝\n⊢ IsPreconnected (↑(Homeomorph.symm h) '' x✝)\n[PROOFSTEP]\nexact hs.2.2.2.image _ h.symm.continuous.continuousOn\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\ne : α ≃ β\nh₁ : Continuous ↑e\nh₂ : IsOpenMap ↑e\n⊢ Continuous e.invFun\n[PROOFSTEP]\nrw [continuous_def]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\ne : α ≃ β\nh₁ : Continuous ↑e\nh₂ : IsOpenMap ↑e\n⊢ ∀ (s : Set α), IsOpen s → IsOpen (e.invFun ⁻¹' s)\n[PROOFSTEP]\nintro s hs\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\ne : α ≃ β\nh₁ : Continuous ↑e\nh₂ : IsOpenMap ↑e\ns : Set α\nhs : IsOpen s\n⊢ IsOpen (e.invFun ⁻¹' s)\n[PROOFSTEP]\nconvert ← h₂ s hs using 1\n[GOAL]\ncase h.e'_3\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\ne : α ≃ β\nh₁ : Continuous ↑e\nh₂ : IsOpenMap ↑e\ns : Set α\nhs : IsOpen s\n⊢ ↑e '' s = e.invFun ⁻¹' s\n[PROOFSTEP]\napply e.image_eq_preimage\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\nh : α ≃ₜ β\nf : β → γ\nx : α\n⊢ range ↑h ∈ 𝓝 (↑h x)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\nh : α ≃ₜ β\nf : γ → α\n⊢ IsOpenMap (↑h ∘ f) ↔ IsOpenMap f\n[PROOFSTEP]\nrefine' ⟨_, fun hf => h.isOpenMap.comp hf⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\nh : α ≃ₜ β\nf : γ → α\n⊢ IsOpenMap (↑h ∘ f) → IsOpenMap f\n[PROOFSTEP]\nintro hf\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\nh : α ≃ₜ β\nf : γ → α\nhf : IsOpenMap (↑h ∘ f)\n⊢ IsOpenMap f\n[PROOFSTEP]\nrw [← Function.comp.left_id f, ← h.symm_comp_self, Function.comp.assoc]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\nh : α ≃ₜ β\nf : γ → α\nhf : IsOpenMap (↑h ∘ f)\n⊢ IsOpenMap (↑(Homeomorph.symm h) ∘ ↑h ∘ f)\n[PROOFSTEP]\nexact h.symm.isOpenMap.comp hf\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\nh : α ≃ₜ β\nf : β → γ\n⊢ IsOpenMap (f ∘ ↑h) ↔ IsOpenMap f\n[PROOFSTEP]\nrefine' ⟨_, fun hf => hf.comp h.isOpenMap⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\nh : α ≃ₜ β\nf : β → γ\n⊢ IsOpenMap (f ∘ ↑h) → IsOpenMap f\n[PROOFSTEP]\nintro hf\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\nh : α ≃ₜ β\nf : β → γ\nhf : IsOpenMap (f ∘ ↑h)\n⊢ IsOpenMap f\n[PROOFSTEP]\nrw [← Function.comp.right_id f, ← h.self_comp_symm, ← Function.comp.assoc]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : TopologicalSpace γ\ninst✝ : TopologicalSpace δ\nh : α ≃ₜ β\nf : β → γ\nhf : IsOpenMap (f ∘ ↑h)\n⊢ IsOpenMap ((f ∘ ↑h) ∘ ↑(Homeomorph.symm h))\n[PROOFSTEP]\nexact hf.comp h.symm.isOpenMap\n[GOAL]\nα : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : TopologicalSpace β✝\ninst✝³ : TopologicalSpace γ\ninst✝² : TopologicalSpace δ\nι : Type u_5\np : ι → Prop\nβ : ι → Type u_6\ninst✝¹ : (i : ι) → TopologicalSpace (β i)\ninst✝ : DecidablePred p\n⊢ Continuous (Equiv.piEquivPiSubtypeProd p β).toFun\n[PROOFSTEP]\napply Continuous.prod_mk\n[GOAL]\ncase hf\nα : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : TopologicalSpace β✝\ninst✝³ : TopologicalSpace γ\ninst✝² : TopologicalSpace δ\nι : Type u_5\np : ι → Prop\nβ : ι → Type u_6\ninst✝¹ : (i : ι) → TopologicalSpace (β i)\ninst✝ : DecidablePred p\n⊢ Continuous fun x x_1 => x ↑x_1\n[PROOFSTEP]\nexact continuous_pi fun j => continuous_apply j.1\n[GOAL]\ncase hg\nα : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : TopologicalSpace β✝\ninst✝³ : TopologicalSpace γ\ninst✝² : TopologicalSpace δ\nι : Type u_5\np : ι → Prop\nβ : ι → Type u_6\ninst✝¹ : (i : ι) → TopologicalSpace (β i)\ninst✝ : DecidablePred p\n⊢ Continuous fun x x_1 => x ↑x_1\n[PROOFSTEP]\nexact continuous_pi fun j => continuous_apply j.1\n[GOAL]\nα : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : TopologicalSpace β✝\ninst✝³ : TopologicalSpace γ\ninst✝² : TopologicalSpace δ\nι : Type u_5\np : ι → Prop\nβ : ι → Type u_6\ninst✝¹ : (i : ι) → TopologicalSpace (β i)\ninst✝ : DecidablePred p\nj : ι\n⊢ Continuous fun a => Equiv.invFun (Equiv.piEquivPiSubtypeProd p β) a j\n[PROOFSTEP]\ndsimp only [Equiv.piEquivPiSubtypeProd]\n[GOAL]\nα : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : TopologicalSpace β✝\ninst✝³ : TopologicalSpace γ\ninst✝² : TopologicalSpace δ\nι : Type u_5\np : ι → Prop\nβ : ι → Type u_6\ninst✝¹ : (i : ι) → TopologicalSpace (β i)\ninst✝ : DecidablePred p\nj : ι\n⊢ Continuous fun a => if h : p j then Prod.fst a { val := j, property := h } else Prod.snd a { val := j, property := h }\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nα : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : TopologicalSpace β✝\ninst✝³ : TopologicalSpace γ\ninst✝² : TopologicalSpace δ\nι : Type u_5\np : ι → Prop\nβ : ι → Type u_6\ninst✝¹ : (i : ι) → TopologicalSpace (β i)\ninst✝ : DecidablePred p\nj : ι\nh✝ : p j\n⊢ Continuous fun a => Prod.fst a { val := j, property := h✝ }\ncase neg\nα : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : TopologicalSpace β✝\ninst✝³ : TopologicalSpace γ\ninst✝² : TopologicalSpace δ\nι : Type u_5\np : ι → Prop\nβ : ι → Type u_6\ninst✝¹ : (i : ι) → TopologicalSpace (β i)\ninst✝ : DecidablePred p\nj : ι\nh✝ : ¬p j\n⊢ Continuous fun a => Prod.snd a { val := j, property := h✝ }\n[PROOFSTEP]\nexacts [(continuous_apply _).comp continuous_fst, (continuous_apply _).comp continuous_snd]\n[GOAL]\nα : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : TopologicalSpace β✝\ninst✝³ : TopologicalSpace γ\ninst✝² : TopologicalSpace δ\nι : Type u_5\ninst✝¹ : DecidableEq ι\ni : ι\nβ : ι → Type u_6\ninst✝ : (j : ι) → TopologicalSpace (β j)\nj : ι\n⊢ Continuous fun a => Equiv.invFun (Equiv.piSplitAt i β) a j\n[PROOFSTEP]\ndsimp only [Equiv.piSplitAt]\n[GOAL]\nα : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : TopologicalSpace β✝\ninst✝³ : TopologicalSpace γ\ninst✝² : TopologicalSpace δ\nι : Type u_5\ninst✝¹ : DecidableEq ι\ni : ι\nβ : ι → Type u_6\ninst✝ : (j : ι) → TopologicalSpace (β j)\nj : ι\n⊢ Continuous fun a => if h : j = i then (_ : i = j) ▸ a.fst else Prod.snd a { val := j, property := h }\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nα : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : TopologicalSpace β✝\ninst✝³ : TopologicalSpace γ\ninst✝² : TopologicalSpace δ\nι : Type u_5\ninst✝¹ : DecidableEq ι\ni : ι\nβ : ι → Type u_6\ninst✝ : (j : ι) → TopologicalSpace (β j)\nj : ι\nh : j = i\n⊢ Continuous fun a => (_ : i = j) ▸ a.fst\ncase neg\nα : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : TopologicalSpace β✝\ninst✝³ : TopologicalSpace γ\ninst✝² : TopologicalSpace δ\nι : Type u_5\ninst✝¹ : DecidableEq ι\ni : ι\nβ : ι → Type u_6\ninst✝ : (j : ι) → TopologicalSpace (β j)\nj : ι\nh : ¬j = i\n⊢ Continuous fun a => Prod.snd a { val := j, property := h }\n[PROOFSTEP]\nsubst h\n[GOAL]\ncase pos\nα : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : TopologicalSpace β✝\ninst✝³ : TopologicalSpace γ\ninst✝² : TopologicalSpace δ\nι : Type u_5\ninst✝¹ : DecidableEq ι\nβ : ι → Type u_6\ninst✝ : (j : ι) → TopologicalSpace (β j)\nj : ι\n⊢ Continuous fun a => (_ : j = j) ▸ a.fst\ncase neg\nα : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : TopologicalSpace β✝\ninst✝³ : TopologicalSpace γ\ninst✝² : TopologicalSpace δ\nι : Type u_5\ninst✝¹ : DecidableEq ι\ni : ι\nβ : ι → Type u_6\ninst✝ : (j : ι) → TopologicalSpace (β j)\nj : ι\nh : ¬j = i\n⊢ Continuous fun a => Prod.snd a { val := j, property := h }\n[PROOFSTEP]\nexacts [continuous_fst, (continuous_apply _).comp continuous_snd]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\nf : α ≃ β\nhf : Inducing ↑f\n⊢ Continuous\n    (↑f ∘\n      { toFun := f.toFun, invFun := f.invFun, left_inv := (_ : Function.LeftInverse f.invFun f.toFun),\n          right_inv := (_ : Function.RightInverse f.invFun f.toFun) }.invFun)\n[PROOFSTEP]\nsimpa using continuous_id\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : CompactSpace α\ninst✝ : T2Space β\nf : α ≃ β\nhf : Continuous ↑f\n⊢ Continuous ↑f.symm\n[PROOFSTEP]\nrw [continuous_iff_isClosed]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : CompactSpace α\ninst✝ : T2Space β\nf : α ≃ β\nhf : Continuous ↑f\n⊢ ∀ (s : Set α), IsClosed s → IsClosed (↑f.symm ⁻¹' s)\n[PROOFSTEP]\nintro C hC\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : CompactSpace α\ninst✝ : T2Space β\nf : α ≃ β\nhf : Continuous ↑f\nC : Set α\nhC : IsClosed C\n⊢ IsClosed (↑f.symm ⁻¹' C)\n[PROOFSTEP]\nhave hC' : IsClosed (f '' C) := (hC.isCompact.image hf).isClosed\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : TopologicalSpace β\ninst✝¹ : CompactSpace α\ninst✝ : T2Space β\nf : α ≃ β\nhf : Continuous ↑f\nC : Set α\nhC : IsClosed C\nhC' : IsClosed (↑f '' C)\n⊢ IsClosed (↑f.symm ⁻¹' C)\n[PROOFSTEP]\nrwa [Equiv.image_eq_preimage] at hC' \n", "meta": {"mathlib_filename": "Mathlib.Topology.Homeomorph", "llama_tokens": 9687, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7745833841649233, "lm_q2_score": 0.6688802603710085, "lm_q1q2_score": 0.5181035356792908}}
{"text": "[GOAL]\nE : Type u_1\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : TopologicalSpace E\ninst✝⁴ : TopologicalAddGroup E\ninst✝³ : T2Space E\ninst✝² : Module ℝ E\ninst✝¹ : ContinuousSMul ℝ E\ninst✝ : FiniteDimensional ℝ E\nx : E\nr : ℝ\n⊢ closedBall x r = ↑(ContinuousLinearEquiv.symm toEuclidean) '' Metric.closedBall (↑toEuclidean x) r\n[PROOFSTEP]\nrw [toEuclidean.image_symm_eq_preimage, closedBall_eq_preimage]\n[GOAL]\nE : Type u_1\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : TopologicalSpace E\ninst✝⁴ : TopologicalAddGroup E\ninst✝³ : T2Space E\ninst✝² : Module ℝ E\ninst✝¹ : ContinuousSMul ℝ E\ninst✝ : FiniteDimensional ℝ E\nx : E\nr : ℝ\n⊢ IsCompact (closedBall x r)\n[PROOFSTEP]\nrw [closedBall_eq_image]\n[GOAL]\nE : Type u_1\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : TopologicalSpace E\ninst✝⁴ : TopologicalAddGroup E\ninst✝³ : T2Space E\ninst✝² : Module ℝ E\ninst✝¹ : ContinuousSMul ℝ E\ninst✝ : FiniteDimensional ℝ E\nx : E\nr : ℝ\n⊢ IsCompact (↑(ContinuousLinearEquiv.symm toEuclidean) '' Metric.closedBall (↑toEuclidean x) r)\n[PROOFSTEP]\nexact (isCompact_closedBall _ _).image toEuclidean.symm.continuous\n[GOAL]\nE : Type u_1\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : TopologicalSpace E\ninst✝⁴ : TopologicalAddGroup E\ninst✝³ : T2Space E\ninst✝² : Module ℝ E\ninst✝¹ : ContinuousSMul ℝ E\ninst✝ : FiniteDimensional ℝ E\nx : E\nr : ℝ\nh : r ≠ 0\n⊢ closure (ball x r) = closedBall x r\n[PROOFSTEP]\nrw [ball_eq_preimage, ← toEuclidean.preimage_closure, closure_ball (toEuclidean x) h, closedBall_eq_preimage]\n[GOAL]\nE : Type u_1\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : TopologicalSpace E\ninst✝⁴ : TopologicalAddGroup E\ninst✝³ : T2Space E\ninst✝² : Module ℝ E\ninst✝¹ : ContinuousSMul ℝ E\ninst✝ : FiniteDimensional ℝ E\nR : ℝ\ns : Set E\nx : E\nhR : 0 < R\nhs : IsClosed s\nh : s ⊆ ball x R\n⊢ ∃ r, r ∈ Ioo 0 R ∧ s ⊆ ball x r\n[PROOFSTEP]\nrw [ball_eq_preimage, ← image_subset_iff] at h \n[GOAL]\nE : Type u_1\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : TopologicalSpace E\ninst✝⁴ : TopologicalAddGroup E\ninst✝³ : T2Space E\ninst✝² : Module ℝ E\ninst✝¹ : ContinuousSMul ℝ E\ninst✝ : FiniteDimensional ℝ E\nR : ℝ\ns : Set E\nx : E\nhR : 0 < R\nhs : IsClosed s\nh : ↑toEuclidean '' s ⊆ Metric.ball (↑toEuclidean x) R\n⊢ ∃ r, r ∈ Ioo 0 R ∧ s ⊆ ball x r\n[PROOFSTEP]\nrcases exists_pos_lt_subset_ball hR (toEuclidean.isClosed_image.2 hs) h with ⟨r, hr, hsr⟩\n[GOAL]\ncase intro.intro\nE : Type u_1\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : TopologicalSpace E\ninst✝⁴ : TopologicalAddGroup E\ninst✝³ : T2Space E\ninst✝² : Module ℝ E\ninst✝¹ : ContinuousSMul ℝ E\ninst✝ : FiniteDimensional ℝ E\nR : ℝ\ns : Set E\nx : E\nhR : 0 < R\nhs : IsClosed s\nh : ↑toEuclidean '' s ⊆ Metric.ball (↑toEuclidean x) R\nr : ℝ\nhr : r ∈ Ioo 0 R\nhsr : ↑toEuclidean '' s ⊆ Metric.ball (↑toEuclidean x) r\n⊢ ∃ r, r ∈ Ioo 0 R ∧ s ⊆ ball x r\n[PROOFSTEP]\nexact ⟨r, hr, image_subset_iff.1 hsr⟩\n[GOAL]\nE : Type u_1\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : TopologicalSpace E\ninst✝⁴ : TopologicalAddGroup E\ninst✝³ : T2Space E\ninst✝² : Module ℝ E\ninst✝¹ : ContinuousSMul ℝ E\ninst✝ : FiniteDimensional ℝ E\nx : E\n⊢ Filter.HasBasis (𝓝 x) (fun r => 0 < r) (closedBall x)\n[PROOFSTEP]\nrw [toEuclidean.toHomeomorph.nhds_eq_comap x]\n[GOAL]\nE : Type u_1\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : TopologicalSpace E\ninst✝⁴ : TopologicalAddGroup E\ninst✝³ : T2Space E\ninst✝² : Module ℝ E\ninst✝¹ : ContinuousSMul ℝ E\ninst✝ : FiniteDimensional ℝ E\nx : E\n⊢ Filter.HasBasis\n    (Filter.comap (↑(ContinuousLinearEquiv.toHomeomorph toEuclidean))\n      (𝓝 (↑(ContinuousLinearEquiv.toHomeomorph toEuclidean) x)))\n    (fun r => 0 < r) (closedBall x)\n[PROOFSTEP]\nexact Metric.nhds_basis_closedBall.comap _\n[GOAL]\nE : Type u_1\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : TopologicalSpace E\ninst✝⁴ : TopologicalAddGroup E\ninst✝³ : T2Space E\ninst✝² : Module ℝ E\ninst✝¹ : ContinuousSMul ℝ E\ninst✝ : FiniteDimensional ℝ E\nx : E\n⊢ Filter.HasBasis (𝓝 x) (fun r => 0 < r) (ball x)\n[PROOFSTEP]\nrw [toEuclidean.toHomeomorph.nhds_eq_comap x]\n[GOAL]\nE : Type u_1\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : TopologicalSpace E\ninst✝⁴ : TopologicalAddGroup E\ninst✝³ : T2Space E\ninst✝² : Module ℝ E\ninst✝¹ : ContinuousSMul ℝ E\ninst✝ : FiniteDimensional ℝ E\nx : E\n⊢ Filter.HasBasis\n    (Filter.comap (↑(ContinuousLinearEquiv.toHomeomorph toEuclidean))\n      (𝓝 (↑(ContinuousLinearEquiv.toHomeomorph toEuclidean) x)))\n    (fun r => 0 < r) (ball x)\n[PROOFSTEP]\nexact Metric.nhds_basis_ball.comap _\n[GOAL]\nE : Type u_1\ninst✝¹¹ : AddCommGroup E\ninst✝¹⁰ : TopologicalSpace E\ninst✝⁹ : TopologicalAddGroup E\ninst✝⁸ : T2Space E\ninst✝⁷ : Module ℝ E\ninst✝⁶ : ContinuousSMul ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\nF : Type u_2\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\nG : Type u_3\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace ℝ G\ninst✝ : FiniteDimensional ℝ G\nf g : F → G\nn : ℕ∞\nhf : ContDiff ℝ n f\nhg : ContDiff ℝ n g\nh : ∀ (x : F), f x ≠ g x\n⊢ ContDiff ℝ n fun x => Euclidean.dist (f x) (g x)\n[PROOFSTEP]\nsimp only [Euclidean.dist]\n[GOAL]\nE : Type u_1\ninst✝¹¹ : AddCommGroup E\ninst✝¹⁰ : TopologicalSpace E\ninst✝⁹ : TopologicalAddGroup E\ninst✝⁸ : T2Space E\ninst✝⁷ : Module ℝ E\ninst✝⁶ : ContinuousSMul ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\nF : Type u_2\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\nG : Type u_3\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace ℝ G\ninst✝ : FiniteDimensional ℝ G\nf g : F → G\nn : ℕ∞\nhf : ContDiff ℝ n f\nhg : ContDiff ℝ n g\nh : ∀ (x : F), f x ≠ g x\n⊢ ContDiff ℝ n fun x => Dist.dist (↑toEuclidean (f x)) (↑toEuclidean (g x))\n[PROOFSTEP]\napply @ContDiff.dist ℝ\n[GOAL]\ncase hf\nE : Type u_1\ninst✝¹¹ : AddCommGroup E\ninst✝¹⁰ : TopologicalSpace E\ninst✝⁹ : TopologicalAddGroup E\ninst✝⁸ : T2Space E\ninst✝⁷ : Module ℝ E\ninst✝⁶ : ContinuousSMul ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\nF : Type u_2\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\nG : Type u_3\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace ℝ G\ninst✝ : FiniteDimensional ℝ G\nf g : F → G\nn : ℕ∞\nhf : ContDiff ℝ n f\nhg : ContDiff ℝ n g\nh : ∀ (x : F), f x ≠ g x\n⊢ ContDiff ℝ n fun y => ↑toEuclidean (f y)\ncase hg\nE : Type u_1\ninst✝¹¹ : AddCommGroup E\ninst✝¹⁰ : TopologicalSpace E\ninst✝⁹ : TopologicalAddGroup E\ninst✝⁸ : T2Space E\ninst✝⁷ : Module ℝ E\ninst✝⁶ : ContinuousSMul ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\nF : Type u_2\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\nG : Type u_3\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace ℝ G\ninst✝ : FiniteDimensional ℝ G\nf g : F → G\nn : ℕ∞\nhf : ContDiff ℝ n f\nhg : ContDiff ℝ n g\nh : ∀ (x : F), f x ≠ g x\n⊢ ContDiff ℝ n fun y => ↑toEuclidean (g y)\ncase hne\nE : Type u_1\ninst✝¹¹ : AddCommGroup E\ninst✝¹⁰ : TopologicalSpace E\ninst✝⁹ : TopologicalAddGroup E\ninst✝⁸ : T2Space E\ninst✝⁷ : Module ℝ E\ninst✝⁶ : ContinuousSMul ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\nF : Type u_2\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\nG : Type u_3\ninst✝² : NormedAddCommGroup G\ninst✝¹ : NormedSpace ℝ G\ninst✝ : FiniteDimensional ℝ G\nf g : F → G\nn : ℕ∞\nhf : ContDiff ℝ n f\nhg : ContDiff ℝ n g\nh : ∀ (x : F), f x ≠ g x\n⊢ ∀ (x : F), ↑toEuclidean (f x) ≠ ↑toEuclidean (g x)\n[PROOFSTEP]\nexacts [(@toEuclidean G _ _ _ _ _ _ _).contDiff.comp hf, (@toEuclidean G _ _ _ _ _ _ _).contDiff.comp hg, fun x =>\n  toEuclidean.injective.ne (h x)]\n", "meta": {"mathlib_filename": "Mathlib.Analysis.InnerProductSpace.EuclideanDist", "llama_tokens": 3361, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7745833737577158, "lm_q2_score": 0.6688802603710086, "lm_q1q2_score": 0.5181035287181152}}
{"text": "[GOAL]\nX : Type u_1\nι : Type u_2\nY : ι → Type u_3\ninst✝² : TopologicalSpace X\ninst✝¹ : (i : ι) → TopologicalSpace (Y i)\ninst✝ : Nonempty X\n⊢ Function.Injective fun g => comp (sigmaMk g.fst) g.snd\n[PROOFSTEP]\nrintro ⟨i, g⟩ ⟨i', g'⟩ h\n[GOAL]\ncase mk.mk\nX : Type u_1\nι : Type u_2\nY : ι → Type u_3\ninst✝² : TopologicalSpace X\ninst✝¹ : (i : ι) → TopologicalSpace (Y i)\ninst✝ : Nonempty X\ni : ι\ng : C(X, Y i)\ni' : ι\ng' : C(X, Y i')\nh :\n  (fun g => comp (sigmaMk g.fst) g.snd) { fst := i, snd := g } =\n    (fun g => comp (sigmaMk g.fst) g.snd) { fst := i', snd := g' }\n⊢ { fst := i, snd := g } = { fst := i', snd := g' }\n[PROOFSTEP]\nobtain ⟨rfl, hg⟩ : i = i' ∧ HEq (⇑g) (⇑g') := Function.eq_of_sigmaMk_comp <| congr_arg FunLike.coe h\n[GOAL]\ncase mk.mk.intro\nX : Type u_1\nι : Type u_2\nY : ι → Type u_3\ninst✝² : TopologicalSpace X\ninst✝¹ : (i : ι) → TopologicalSpace (Y i)\ninst✝ : Nonempty X\ni : ι\ng g' : C(X, Y i)\nh :\n  (fun g => comp (sigmaMk g.fst) g.snd) { fst := i, snd := g } =\n    (fun g => comp (sigmaMk g.fst) g.snd) { fst := i, snd := g' }\nhg : HEq ↑g ↑g'\n⊢ { fst := i, snd := g } = { fst := i, snd := g' }\n[PROOFSTEP]\nsimpa using hg\n", "meta": {"mathlib_filename": "Mathlib.Topology.ContinuousFunction.Sigma", "llama_tokens": 597, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7826624789529376, "lm_q2_score": 0.6619228825191872, "lm_q1q2_score": 0.5180622041081412}}
{"text": "[GOAL]\nR : Type u\nA : Type w\nL : Type v\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nx : A ⊗[R] L\n⊢ ⁅x, x⁆ = 0\n[PROOFSTEP]\nsimp only [bracket_def]\n[GOAL]\nR : Type u\nA : Type w\nL : Type v\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nx : A ⊗[R] L\n⊢ ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) x) x = 0\n[PROOFSTEP]\nrefine' x.induction_on _ _ _\n[GOAL]\ncase refine'_1\nR : Type u\nA : Type w\nL : Type v\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nx : A ⊗[R] L\n⊢ ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) 0) 0 = 0\n[PROOFSTEP]\nsimp only [LinearMap.map_zero, eq_self_iff_true, LinearMap.zero_apply]\n[GOAL]\ncase refine'_2\nR : Type u\nA : Type w\nL : Type v\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nx : A ⊗[R] L\n⊢ ∀ (x : A) (y : L), ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (x ⊗ₜ[R] y)) (x ⊗ₜ[R] y) = 0\n[PROOFSTEP]\nintro a l\n[GOAL]\ncase refine'_2\nR : Type u\nA : Type w\nL : Type v\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nx : A ⊗[R] L\na : A\nl : L\n⊢ ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (a ⊗ₜ[R] l)) (a ⊗ₜ[R] l) = 0\n[PROOFSTEP]\nsimp only [bracket'_tmul, TensorProduct.tmul_zero, eq_self_iff_true, lie_self]\n[GOAL]\ncase refine'_3\nR : Type u\nA : Type w\nL : Type v\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nx : A ⊗[R] L\n⊢ ∀ (x y : A ⊗[R] L),\n    ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) x) x = 0 →\n      ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) y) y = 0 →\n        ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (x + y)) (x + y) = 0\n[PROOFSTEP]\nintro z₁ z₂ h₁ h₂\n[GOAL]\ncase refine'_3\nR : Type u\nA : Type w\nL : Type v\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nx z₁ z₂ : A ⊗[R] L\nh₁ : ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) z₁) z₁ = 0\nh₂ : ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) z₂) z₂ = 0\n⊢ ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (z₁ + z₂)) (z₁ + z₂) = 0\n[PROOFSTEP]\nsuffices bracket' R A L z₁ z₂ + bracket' R A L z₂ z₁ = 0 by\n  rw [LinearMap.map_add, LinearMap.map_add, LinearMap.add_apply, LinearMap.add_apply, h₁, h₂, zero_add, add_zero,\n    add_comm, this]\n[GOAL]\nR : Type u\nA : Type w\nL : Type v\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nx z₁ z₂ : A ⊗[R] L\nh₁ : ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) z₁) z₁ = 0\nh₂ : ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) z₂) z₂ = 0\nthis : ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) z₁) z₂ + ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) z₂) z₁ = 0\n⊢ ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (z₁ + z₂)) (z₁ + z₂) = 0\n[PROOFSTEP]\nrw [LinearMap.map_add, LinearMap.map_add, LinearMap.add_apply, LinearMap.add_apply, h₁, h₂, zero_add, add_zero,\n  add_comm, this]\n[GOAL]\ncase refine'_3\nR : Type u\nA : Type w\nL : Type v\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nx z₁ z₂ : A ⊗[R] L\nh₁ : ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) z₁) z₁ = 0\nh₂ : ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) z₂) z₂ = 0\n⊢ ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) z₁) z₂ + ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) z₂) z₁ = 0\n[PROOFSTEP]\nrefine' z₁.induction_on _ _ _\n[GOAL]\ncase refine'_3.refine'_1\nR : Type u\nA : Type w\nL : Type v\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nx z₁ z₂ : A ⊗[R] L\nh₁ : ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) z₁) z₁ = 0\nh₂ : ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) z₂) z₂ = 0\n⊢ ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) 0) z₂ + ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) z₂) 0 = 0\n[PROOFSTEP]\nsimp only [LinearMap.map_zero, add_zero, LinearMap.zero_apply]\n[GOAL]\ncase refine'_3.refine'_2\nR : Type u\nA : Type w\nL : Type v\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nx z₁ z₂ : A ⊗[R] L\nh₁ : ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) z₁) z₁ = 0\nh₂ : ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) z₂) z₂ = 0\n⊢ ∀ (x : A) (y : L),\n    ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (x ⊗ₜ[R] y)) z₂ +\n        ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) z₂) (x ⊗ₜ[R] y) =\n      0\n[PROOFSTEP]\nintro a₁ l₁\n[GOAL]\ncase refine'_3.refine'_2\nR : Type u\nA : Type w\nL : Type v\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nx z₁ z₂ : A ⊗[R] L\nh₁ : ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) z₁) z₁ = 0\nh₂ : ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) z₂) z₂ = 0\na₁ : A\nl₁ : L\n⊢ ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (a₁ ⊗ₜ[R] l₁)) z₂ +\n      ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) z₂) (a₁ ⊗ₜ[R] l₁) =\n    0\n[PROOFSTEP]\nrefine' z₂.induction_on _ _ _\n[GOAL]\ncase refine'_3.refine'_2.refine'_1\nR : Type u\nA : Type w\nL : Type v\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nx z₁ z₂ : A ⊗[R] L\nh₁ : ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) z₁) z₁ = 0\nh₂ : ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) z₂) z₂ = 0\na₁ : A\nl₁ : L\n⊢ ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (a₁ ⊗ₜ[R] l₁)) 0 +\n      ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) 0) (a₁ ⊗ₜ[R] l₁) =\n    0\n[PROOFSTEP]\nsimp only [LinearMap.map_zero, add_zero, LinearMap.zero_apply]\n[GOAL]\ncase refine'_3.refine'_2.refine'_2\nR : Type u\nA : Type w\nL : Type v\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nx z₁ z₂ : A ⊗[R] L\nh₁ : ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) z₁) z₁ = 0\nh₂ : ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) z₂) z₂ = 0\na₁ : A\nl₁ : L\n⊢ ∀ (x : A) (y : L),\n    ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (a₁ ⊗ₜ[R] l₁)) (x ⊗ₜ[R] y) +\n        ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (x ⊗ₜ[R] y)) (a₁ ⊗ₜ[R] l₁) =\n      0\n[PROOFSTEP]\nintro a₂ l₂\n[GOAL]\ncase refine'_3.refine'_2.refine'_2\nR : Type u\nA : Type w\nL : Type v\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nx z₁ z₂ : A ⊗[R] L\nh₁ : ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) z₁) z₁ = 0\nh₂ : ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) z₂) z₂ = 0\na₁ : A\nl₁ : L\na₂ : A\nl₂ : L\n⊢ ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (a₁ ⊗ₜ[R] l₁)) (a₂ ⊗ₜ[R] l₂) +\n      ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (a₂ ⊗ₜ[R] l₂)) (a₁ ⊗ₜ[R] l₁) =\n    0\n[PROOFSTEP]\nsimp only [← lie_skew l₂ l₁, mul_comm a₁ a₂, TensorProduct.tmul_neg, bracket'_tmul, add_right_neg]\n[GOAL]\ncase refine'_3.refine'_2.refine'_3\nR : Type u\nA : Type w\nL : Type v\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nx z₁ z₂ : A ⊗[R] L\nh₁ : ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) z₁) z₁ = 0\nh₂ : ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) z₂) z₂ = 0\na₁ : A\nl₁ : L\n⊢ ∀ (x y : A ⊗[R] L),\n    ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (a₁ ⊗ₜ[R] l₁)) x +\n          ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) x) (a₁ ⊗ₜ[R] l₁) =\n        0 →\n      ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (a₁ ⊗ₜ[R] l₁)) y +\n            ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) y) (a₁ ⊗ₜ[R] l₁) =\n          0 →\n        ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (a₁ ⊗ₜ[R] l₁)) (x + y) +\n            ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (x + y)) (a₁ ⊗ₜ[R] l₁) =\n          0\n[PROOFSTEP]\nintro y₁ y₂ hy₁ hy₂\n[GOAL]\ncase refine'_3.refine'_2.refine'_3\nR : Type u\nA : Type w\nL : Type v\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nx z₁ z₂ : A ⊗[R] L\nh₁ : ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) z₁) z₁ = 0\nh₂ : ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) z₂) z₂ = 0\na₁ : A\nl₁ : L\ny₁ y₂ : A ⊗[R] L\nhy₁ :\n  ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (a₁ ⊗ₜ[R] l₁)) y₁ +\n      ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) y₁) (a₁ ⊗ₜ[R] l₁) =\n    0\nhy₂ :\n  ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (a₁ ⊗ₜ[R] l₁)) y₂ +\n      ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) y₂) (a₁ ⊗ₜ[R] l₁) =\n    0\n⊢ ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (a₁ ⊗ₜ[R] l₁)) (y₁ + y₂) +\n      ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (y₁ + y₂)) (a₁ ⊗ₜ[R] l₁) =\n    0\n[PROOFSTEP]\nsimp only [hy₁, hy₂, add_add_add_comm, add_zero, LinearMap.add_apply, LinearMap.map_add]\n[GOAL]\ncase refine'_3.refine'_3\nR : Type u\nA : Type w\nL : Type v\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nx z₁ z₂ : A ⊗[R] L\nh₁ : ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) z₁) z₁ = 0\nh₂ : ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) z₂) z₂ = 0\n⊢ ∀ (x y : A ⊗[R] L),\n    ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) x) z₂ + ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) z₂) x = 0 →\n      ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) y) z₂ + ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) z₂) y = 0 →\n        ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (x + y)) z₂ +\n            ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) z₂) (x + y) =\n          0\n[PROOFSTEP]\nintro y₁ y₂ hy₁ hy₂\n[GOAL]\ncase refine'_3.refine'_3\nR : Type u\nA : Type w\nL : Type v\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nx z₁ z₂ : A ⊗[R] L\nh₁ : ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) z₁) z₁ = 0\nh₂ : ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) z₂) z₂ = 0\ny₁ y₂ : A ⊗[R] L\nhy₁ : ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) y₁) z₂ + ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) z₂) y₁ = 0\nhy₂ : ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) y₂) z₂ + ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) z₂) y₂ = 0\n⊢ ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (y₁ + y₂)) z₂ +\n      ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) z₂) (y₁ + y₂) =\n    0\n[PROOFSTEP]\nsimp only [add_add_add_comm, hy₁, hy₂, add_zero, LinearMap.add_apply, LinearMap.map_add]\n[GOAL]\nR : Type u\nA : Type w\nL : Type v\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nx y z : A ⊗[R] L\n⊢ ⁅x, ⁅y, z⁆⁆ = ⁅⁅x, y⁆, z⁆ + ⁅y, ⁅x, z⁆⁆\n[PROOFSTEP]\nsimp only [bracket_def]\n[GOAL]\nR : Type u\nA : Type w\nL : Type v\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nx y z : A ⊗[R] L\n⊢ ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) x) (↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) y) z) =\n    ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) x) y)) z +\n      ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) y) (↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) x) z)\n[PROOFSTEP]\nrefine' x.induction_on _ _ _\n[GOAL]\ncase refine'_1\nR : Type u\nA : Type w\nL : Type v\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nx y z : A ⊗[R] L\n⊢ ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) 0) (↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) y) z) =\n    ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) 0) y)) z +\n      ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) y) (↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) 0) z)\n[PROOFSTEP]\nsimp only [LinearMap.map_zero, add_zero, LinearMap.zero_apply]\n[GOAL]\ncase refine'_2\nR : Type u\nA : Type w\nL : Type v\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nx y z : A ⊗[R] L\n⊢ ∀ (x : A) (y_1 : L),\n    ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (x ⊗ₜ[R] y_1)) (↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) y) z) =\n      ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (x ⊗ₜ[R] y_1)) y)) z +\n        ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) y) (↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (x ⊗ₜ[R] y_1)) z)\n[PROOFSTEP]\nintro a₁ l₁\n[GOAL]\ncase refine'_2\nR : Type u\nA : Type w\nL : Type v\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nx y z : A ⊗[R] L\na₁ : A\nl₁ : L\n⊢ ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (a₁ ⊗ₜ[R] l₁)) (↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) y) z) =\n    ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (a₁ ⊗ₜ[R] l₁)) y)) z +\n      ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) y) (↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (a₁ ⊗ₜ[R] l₁)) z)\n[PROOFSTEP]\nrefine' y.induction_on _ _ _\n[GOAL]\ncase refine'_2.refine'_1\nR : Type u\nA : Type w\nL : Type v\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nx y z : A ⊗[R] L\na₁ : A\nl₁ : L\n⊢ ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (a₁ ⊗ₜ[R] l₁)) (↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) 0) z) =\n    ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (a₁ ⊗ₜ[R] l₁)) 0)) z +\n      ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) 0) (↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (a₁ ⊗ₜ[R] l₁)) z)\n[PROOFSTEP]\nsimp only [LinearMap.map_zero, add_zero, LinearMap.zero_apply]\n[GOAL]\ncase refine'_2.refine'_2\nR : Type u\nA : Type w\nL : Type v\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nx y z : A ⊗[R] L\na₁ : A\nl₁ : L\n⊢ ∀ (x : A) (y : L),\n    ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (a₁ ⊗ₜ[R] l₁))\n        (↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (x ⊗ₜ[R] y)) z) =\n      ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L)\n              (↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (a₁ ⊗ₜ[R] l₁)) (x ⊗ₜ[R] y)))\n          z +\n        ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (x ⊗ₜ[R] y))\n          (↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (a₁ ⊗ₜ[R] l₁)) z)\n[PROOFSTEP]\nintro a₂ l₂\n[GOAL]\ncase refine'_2.refine'_2\nR : Type u\nA : Type w\nL : Type v\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nx y z : A ⊗[R] L\na₁ : A\nl₁ : L\na₂ : A\nl₂ : L\n⊢ ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (a₁ ⊗ₜ[R] l₁))\n      (↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (a₂ ⊗ₜ[R] l₂)) z) =\n    ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L)\n            (↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (a₁ ⊗ₜ[R] l₁)) (a₂ ⊗ₜ[R] l₂)))\n        z +\n      ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (a₂ ⊗ₜ[R] l₂))\n        (↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (a₁ ⊗ₜ[R] l₁)) z)\n[PROOFSTEP]\nrefine' z.induction_on _ _ _\n[GOAL]\ncase refine'_2.refine'_2.refine'_1\nR : Type u\nA : Type w\nL : Type v\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nx y z : A ⊗[R] L\na₁ : A\nl₁ : L\na₂ : A\nl₂ : L\n⊢ ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (a₁ ⊗ₜ[R] l₁))\n      (↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (a₂ ⊗ₜ[R] l₂)) 0) =\n    ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L)\n            (↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (a₁ ⊗ₜ[R] l₁)) (a₂ ⊗ₜ[R] l₂)))\n        0 +\n      ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (a₂ ⊗ₜ[R] l₂))\n        (↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (a₁ ⊗ₜ[R] l₁)) 0)\n[PROOFSTEP]\nrw [LinearMap.map_zero, LinearMap.map_zero, LinearMap.map_zero, LinearMap.map_zero, add_zero]\n[GOAL]\ncase refine'_2.refine'_2.refine'_2\nR : Type u\nA : Type w\nL : Type v\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nx y z : A ⊗[R] L\na₁ : A\nl₁ : L\na₂ : A\nl₂ : L\n⊢ ∀ (x : A) (y : L),\n    ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (a₁ ⊗ₜ[R] l₁))\n        (↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (a₂ ⊗ₜ[R] l₂)) (x ⊗ₜ[R] y)) =\n      ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L)\n              (↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (a₁ ⊗ₜ[R] l₁)) (a₂ ⊗ₜ[R] l₂)))\n          (x ⊗ₜ[R] y) +\n        ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (a₂ ⊗ₜ[R] l₂))\n          (↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (a₁ ⊗ₜ[R] l₁)) (x ⊗ₜ[R] y))\n[PROOFSTEP]\nintro a₃ l₃\n[GOAL]\ncase refine'_2.refine'_2.refine'_2\nR : Type u\nA : Type w\nL : Type v\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nx y z : A ⊗[R] L\na₁ : A\nl₁ : L\na₂ : A\nl₂ : L\na₃ : A\nl₃ : L\n⊢ ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (a₁ ⊗ₜ[R] l₁))\n      (↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (a₂ ⊗ₜ[R] l₂)) (a₃ ⊗ₜ[R] l₃)) =\n    ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L)\n            (↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (a₁ ⊗ₜ[R] l₁)) (a₂ ⊗ₜ[R] l₂)))\n        (a₃ ⊗ₜ[R] l₃) +\n      ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (a₂ ⊗ₜ[R] l₂))\n        (↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (a₁ ⊗ₜ[R] l₁)) (a₃ ⊗ₜ[R] l₃))\n[PROOFSTEP]\nsimp only [bracket'_tmul]\n[GOAL]\ncase refine'_2.refine'_2.refine'_2\nR : Type u\nA : Type w\nL : Type v\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nx y z : A ⊗[R] L\na₁ : A\nl₁ : L\na₂ : A\nl₂ : L\na₃ : A\nl₃ : L\n⊢ (a₁ * (a₂ * a₃)) ⊗ₜ[R] ⁅l₁, ⁅l₂, l₃⁆⁆ = (a₁ * a₂ * a₃) ⊗ₜ[R] ⁅⁅l₁, l₂⁆, l₃⁆ + (a₂ * (a₁ * a₃)) ⊗ₜ[R] ⁅l₂, ⁅l₁, l₃⁆⁆\n[PROOFSTEP]\nrw [mul_left_comm a₂ a₁ a₃, mul_assoc, leibniz_lie, TensorProduct.tmul_add]\n[GOAL]\ncase refine'_2.refine'_2.refine'_3\nR : Type u\nA : Type w\nL : Type v\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nx y z : A ⊗[R] L\na₁ : A\nl₁ : L\na₂ : A\nl₂ : L\n⊢ ∀ (x y : A ⊗[R] L),\n    ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (a₁ ⊗ₜ[R] l₁))\n          (↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (a₂ ⊗ₜ[R] l₂)) x) =\n        ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L)\n                (↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (a₁ ⊗ₜ[R] l₁)) (a₂ ⊗ₜ[R] l₂)))\n            x +\n          ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (a₂ ⊗ₜ[R] l₂))\n            (↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (a₁ ⊗ₜ[R] l₁)) x) →\n      ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (a₁ ⊗ₜ[R] l₁))\n            (↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (a₂ ⊗ₜ[R] l₂)) y) =\n          ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L)\n                  (↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (a₁ ⊗ₜ[R] l₁)) (a₂ ⊗ₜ[R] l₂)))\n              y +\n            ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (a₂ ⊗ₜ[R] l₂))\n              (↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (a₁ ⊗ₜ[R] l₁)) y) →\n        ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (a₁ ⊗ₜ[R] l₁))\n            (↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (a₂ ⊗ₜ[R] l₂)) (x + y)) =\n          ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L)\n                  (↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (a₁ ⊗ₜ[R] l₁)) (a₂ ⊗ₜ[R] l₂)))\n              (x + y) +\n            ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (a₂ ⊗ₜ[R] l₂))\n              (↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (a₁ ⊗ₜ[R] l₁)) (x + y))\n[PROOFSTEP]\nintro u₁ u₂ h₁ h₂\n[GOAL]\ncase refine'_2.refine'_2.refine'_3\nR : Type u\nA : Type w\nL : Type v\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nx y z : A ⊗[R] L\na₁ : A\nl₁ : L\na₂ : A\nl₂ : L\nu₁ u₂ : A ⊗[R] L\nh₁ :\n  ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (a₁ ⊗ₜ[R] l₁))\n      (↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (a₂ ⊗ₜ[R] l₂)) u₁) =\n    ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L)\n            (↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (a₁ ⊗ₜ[R] l₁)) (a₂ ⊗ₜ[R] l₂)))\n        u₁ +\n      ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (a₂ ⊗ₜ[R] l₂))\n        (↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (a₁ ⊗ₜ[R] l₁)) u₁)\nh₂ :\n  ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (a₁ ⊗ₜ[R] l₁))\n      (↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (a₂ ⊗ₜ[R] l₂)) u₂) =\n    ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L)\n            (↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (a₁ ⊗ₜ[R] l₁)) (a₂ ⊗ₜ[R] l₂)))\n        u₂ +\n      ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (a₂ ⊗ₜ[R] l₂))\n        (↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (a₁ ⊗ₜ[R] l₁)) u₂)\n⊢ ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (a₁ ⊗ₜ[R] l₁))\n      (↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (a₂ ⊗ₜ[R] l₂)) (u₁ + u₂)) =\n    ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L)\n            (↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (a₁ ⊗ₜ[R] l₁)) (a₂ ⊗ₜ[R] l₂)))\n        (u₁ + u₂) +\n      ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (a₂ ⊗ₜ[R] l₂))\n        (↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (a₁ ⊗ₜ[R] l₁)) (u₁ + u₂))\n[PROOFSTEP]\nrw [map_add, map_add, map_add, map_add, map_add, h₁, h₂, add_add_add_comm]\n[GOAL]\ncase refine'_2.refine'_3\nR : Type u\nA : Type w\nL : Type v\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nx y z : A ⊗[R] L\na₁ : A\nl₁ : L\n⊢ ∀ (x y : A ⊗[R] L),\n    ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (a₁ ⊗ₜ[R] l₁)) (↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) x) z) =\n        ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (a₁ ⊗ₜ[R] l₁)) x))\n            z +\n          ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) x)\n            (↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (a₁ ⊗ₜ[R] l₁)) z) →\n      ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (a₁ ⊗ₜ[R] l₁)) (↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) y) z) =\n          ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (a₁ ⊗ₜ[R] l₁)) y))\n              z +\n            ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) y)\n              (↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (a₁ ⊗ₜ[R] l₁)) z) →\n        ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (a₁ ⊗ₜ[R] l₁))\n            (↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (x + y)) z) =\n          ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L)\n                  (↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (a₁ ⊗ₜ[R] l₁)) (x + y)))\n              z +\n            ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (x + y))\n              (↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (a₁ ⊗ₜ[R] l₁)) z)\n[PROOFSTEP]\nintro u₁ u₂ h₁ h₂\n[GOAL]\ncase refine'_2.refine'_3\nR : Type u\nA : Type w\nL : Type v\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nx y z : A ⊗[R] L\na₁ : A\nl₁ : L\nu₁ u₂ : A ⊗[R] L\nh₁ :\n  ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (a₁ ⊗ₜ[R] l₁)) (↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) u₁) z) =\n    ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (a₁ ⊗ₜ[R] l₁)) u₁)) z +\n      ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) u₁) (↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (a₁ ⊗ₜ[R] l₁)) z)\nh₂ :\n  ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (a₁ ⊗ₜ[R] l₁)) (↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) u₂) z) =\n    ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (a₁ ⊗ₜ[R] l₁)) u₂)) z +\n      ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) u₂) (↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (a₁ ⊗ₜ[R] l₁)) z)\n⊢ ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (a₁ ⊗ₜ[R] l₁))\n      (↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (u₁ + u₂)) z) =\n    ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L)\n            (↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (a₁ ⊗ₜ[R] l₁)) (u₁ + u₂)))\n        z +\n      ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (u₁ + u₂))\n        (↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (a₁ ⊗ₜ[R] l₁)) z)\n[PROOFSTEP]\nrw [map_add, LinearMap.add_apply, LinearMap.add_apply, map_add, map_add, map_add, LinearMap.add_apply, h₁, h₂,\n  add_add_add_comm]\n[GOAL]\ncase refine'_3\nR : Type u\nA : Type w\nL : Type v\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nx y z : A ⊗[R] L\n⊢ ∀ (x y_1 : A ⊗[R] L),\n    ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) x) (↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) y) z) =\n        ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) x) y)) z +\n          ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) y) (↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) x) z) →\n      ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) y_1) (↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) y) z) =\n          ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) y_1) y)) z +\n            ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) y) (↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) y_1) z) →\n        ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (x + y_1)) (↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) y) z) =\n          ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (x + y_1)) y)) z +\n            ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) y) (↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (x + y_1)) z)\n[PROOFSTEP]\nintro u₁ u₂ h₁ h₂\n[GOAL]\ncase refine'_3\nR : Type u\nA : Type w\nL : Type v\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nx y z u₁ u₂ : A ⊗[R] L\nh₁ :\n  ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) u₁) (↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) y) z) =\n    ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) u₁) y)) z +\n      ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) y) (↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) u₁) z)\nh₂ :\n  ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) u₂) (↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) y) z) =\n    ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) u₂) y)) z +\n      ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) y) (↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) u₂) z)\n⊢ ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (u₁ + u₂)) (↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) y) z) =\n    ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (u₁ + u₂)) y)) z +\n      ↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) y) (↑(↑(LieAlgebra.ExtendScalars.bracket' R A L) (u₁ + u₂)) z)\n[PROOFSTEP]\nrw [map_add, LinearMap.add_apply, LinearMap.add_apply, LinearMap.add_apply, map_add, map_add, LinearMap.add_apply, h₁,\n  h₂, add_add_add_comm]\n[GOAL]\nR : Type u\nA : Type w\nL : Type v\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nx y z : A ⊗[R] L\n⊢ ⁅x + y, z⁆ = ⁅x, z⁆ + ⁅y, z⁆\n[PROOFSTEP]\nsimp only [bracket_def, LinearMap.add_apply, LinearMap.map_add]\n[GOAL]\nR : Type u\nA : Type w\nL : Type v\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : Algebra R A\ninst✝¹ : LieRing L\ninst✝ : LieAlgebra R L\nx y z : A ⊗[R] L\n⊢ ⁅x, y + z⁆ = ⁅x, y⁆ + ⁅x, z⁆\n[PROOFSTEP]\nsimp only [bracket_def, LinearMap.map_add]\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Lie.BaseChange", "llama_tokens": 14217, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8175744806385542, "lm_q2_score": 0.6334102636778401, "lm_q1q2_score": 0.5178600673575399}}
{"text": "[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace 𝕜 E\ninst✝² : InnerProductSpace 𝕜 F\ninst✝¹ : CompleteSpace E\ninst✝ : CompleteSpace F\nT : E →L[𝕜] E\nhT : IsPositive T\nx : E\n⊢ 0 ≤ ↑re (inner x (↑T x))\n[PROOFSTEP]\nrw [inner_re_symm]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace 𝕜 E\ninst✝² : InnerProductSpace 𝕜 F\ninst✝¹ : CompleteSpace E\ninst✝ : CompleteSpace F\nT : E →L[𝕜] E\nhT : IsPositive T\nx : E\n⊢ 0 ≤ ↑re (inner (↑T x) x)\n[PROOFSTEP]\nexact hT.inner_nonneg_left x\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace 𝕜 E\ninst✝² : InnerProductSpace 𝕜 F\ninst✝¹ : CompleteSpace E\ninst✝ : CompleteSpace F\n⊢ IsPositive 0\n[PROOFSTEP]\nrefine' ⟨isSelfAdjoint_zero _, fun x => _⟩\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace 𝕜 E\ninst✝² : InnerProductSpace 𝕜 F\ninst✝¹ : CompleteSpace E\ninst✝ : CompleteSpace F\nx : E\n⊢ 0 ≤ reApplyInnerSelf 0 x\n[PROOFSTEP]\nchange 0 ≤ re ⟪_, _⟫\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace 𝕜 E\ninst✝² : InnerProductSpace 𝕜 F\ninst✝¹ : CompleteSpace E\ninst✝ : CompleteSpace F\nx : E\n⊢ 0 ≤ ↑re (inner (↑0 x) x)\n[PROOFSTEP]\nrw [zero_apply, inner_zero_left, ZeroHomClass.map_zero]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace 𝕜 E\ninst✝² : InnerProductSpace 𝕜 F\ninst✝¹ : CompleteSpace E\ninst✝ : CompleteSpace F\nT S : E →L[𝕜] E\nhT : IsPositive T\nhS : IsPositive S\n⊢ IsPositive (T + S)\n[PROOFSTEP]\nrefine' ⟨hT.isSelfAdjoint.add hS.isSelfAdjoint, fun x => _⟩\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace 𝕜 E\ninst✝² : InnerProductSpace 𝕜 F\ninst✝¹ : CompleteSpace E\ninst✝ : CompleteSpace F\nT S : E →L[𝕜] E\nhT : IsPositive T\nhS : IsPositive S\nx : E\n⊢ 0 ≤ reApplyInnerSelf (T + S) x\n[PROOFSTEP]\nrw [reApplyInnerSelf, add_apply, inner_add_left, map_add]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace 𝕜 E\ninst✝² : InnerProductSpace 𝕜 F\ninst✝¹ : CompleteSpace E\ninst✝ : CompleteSpace F\nT S : E →L[𝕜] E\nhT : IsPositive T\nhS : IsPositive S\nx : E\n⊢ 0 ≤ ↑re (inner (↑T x) x) + ↑re (inner (↑S x) x)\n[PROOFSTEP]\nexact add_nonneg (hT.inner_nonneg_left x) (hS.inner_nonneg_left x)\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace 𝕜 E\ninst✝² : InnerProductSpace 𝕜 F\ninst✝¹ : CompleteSpace E\ninst✝ : CompleteSpace F\nT : E →L[𝕜] E\nhT : IsPositive T\nS : E →L[𝕜] F\n⊢ IsPositive (comp S (comp T (↑adjoint S)))\n[PROOFSTEP]\nrefine' ⟨hT.isSelfAdjoint.conj_adjoint S, fun x => _⟩\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace 𝕜 E\ninst✝² : InnerProductSpace 𝕜 F\ninst✝¹ : CompleteSpace E\ninst✝ : CompleteSpace F\nT : E →L[𝕜] E\nhT : IsPositive T\nS : E →L[𝕜] F\nx : F\n⊢ 0 ≤ reApplyInnerSelf (comp S (comp T (↑adjoint S))) x\n[PROOFSTEP]\nrw [reApplyInnerSelf, comp_apply, ← adjoint_inner_right]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace 𝕜 E\ninst✝² : InnerProductSpace 𝕜 F\ninst✝¹ : CompleteSpace E\ninst✝ : CompleteSpace F\nT : E →L[𝕜] E\nhT : IsPositive T\nS : E →L[𝕜] F\nx : F\n⊢ 0 ≤ ↑re (inner (↑(comp T (↑adjoint S)) x) (↑(↑adjoint S) x))\n[PROOFSTEP]\nexact hT.inner_nonneg_left _\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace 𝕜 E\ninst✝² : InnerProductSpace 𝕜 F\ninst✝¹ : CompleteSpace E\ninst✝ : CompleteSpace F\nT : E →L[𝕜] E\nhT : IsPositive T\nS : F →L[𝕜] E\n⊢ IsPositive (comp (↑adjoint S) (comp T S))\n[PROOFSTEP]\nconvert hT.conj_adjoint (S†)\n[GOAL]\ncase h.e'_7.h.e'_24.h.e'_24\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace 𝕜 E\ninst✝² : InnerProductSpace 𝕜 F\ninst✝¹ : CompleteSpace E\ninst✝ : CompleteSpace F\nT : E →L[𝕜] E\nhT : IsPositive T\nS : F →L[𝕜] E\n⊢ S = ↑adjoint (↑adjoint S)\n[PROOFSTEP]\nrw [adjoint_adjoint]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : InnerProductSpace 𝕜 F\ninst✝² : CompleteSpace E\ninst✝¹ : CompleteSpace F\nU : Submodule 𝕜 E\nT : E →L[𝕜] E\nhT : IsPositive T\ninst✝ : CompleteSpace { x // x ∈ U }\n⊢ IsPositive\n    (comp (Submodule.subtypeL U)\n      (comp (orthogonalProjection U) (comp T (comp (Submodule.subtypeL U) (orthogonalProjection U)))))\n[PROOFSTEP]\nhave := hT.conj_adjoint (U.subtypeL ∘L orthogonalProjection U)\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : InnerProductSpace 𝕜 F\ninst✝² : CompleteSpace E\ninst✝¹ : CompleteSpace F\nU : Submodule 𝕜 E\nT : E →L[𝕜] E\nhT : IsPositive T\ninst✝ : CompleteSpace { x // x ∈ U }\nthis :\n  IsPositive\n    (comp (comp (Submodule.subtypeL U) (orthogonalProjection U))\n      (comp T (↑adjoint (comp (Submodule.subtypeL U) (orthogonalProjection U)))))\n⊢ IsPositive\n    (comp (Submodule.subtypeL U)\n      (comp (orthogonalProjection U) (comp T (comp (Submodule.subtypeL U) (orthogonalProjection U)))))\n[PROOFSTEP]\nrwa [(orthogonalProjection_isSelfAdjoint U).adjoint_eq] at this \n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : InnerProductSpace 𝕜 F\ninst✝² : CompleteSpace E\ninst✝¹ : CompleteSpace F\nT : E →L[𝕜] E\nhT : IsPositive T\nU : Submodule 𝕜 E\ninst✝ : CompleteSpace { x // x ∈ U }\n⊢ IsPositive (comp (orthogonalProjection U) (comp T (Submodule.subtypeL U)))\n[PROOFSTEP]\nhave := hT.conj_adjoint (orthogonalProjection U : E →L[𝕜] U)\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : InnerProductSpace 𝕜 F\ninst✝² : CompleteSpace E\ninst✝¹ : CompleteSpace F\nT : E →L[𝕜] E\nhT : IsPositive T\nU : Submodule 𝕜 E\ninst✝ : CompleteSpace { x // x ∈ U }\nthis : IsPositive (comp (orthogonalProjection U) (comp T (↑adjoint (orthogonalProjection U))))\n⊢ IsPositive (comp (orthogonalProjection U) (comp T (Submodule.subtypeL U)))\n[PROOFSTEP]\nrwa [U.adjoint_orthogonalProjection] at this \n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁹ : IsROrC 𝕜\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : InnerProductSpace 𝕜 E\ninst✝⁵ : InnerProductSpace 𝕜 F\ninst✝⁴ : CompleteSpace E\ninst✝³ : CompleteSpace F\nE' : Type u_4\ninst✝² : NormedAddCommGroup E'\ninst✝¹ : InnerProductSpace ℂ E'\ninst✝ : CompleteSpace E'\nT : E' →L[ℂ] E'\n⊢ IsPositive T ↔ ∀ (x : E'), ↑(↑re (inner (↑T x) x)) = inner (↑T x) x ∧ 0 ≤ ↑re (inner (↑T x) x)\n[PROOFSTEP]\nsimp_rw [IsPositive, forall_and, isSelfAdjoint_iff_isSymmetric, LinearMap.isSymmetric_iff_inner_map_self_real,\n  conj_eq_iff_re]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁹ : IsROrC 𝕜\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : InnerProductSpace 𝕜 E\ninst✝⁵ : InnerProductSpace 𝕜 F\ninst✝⁴ : CompleteSpace E\ninst✝³ : CompleteSpace F\nE' : Type u_4\ninst✝² : NormedAddCommGroup E'\ninst✝¹ : InnerProductSpace ℂ E'\ninst✝ : CompleteSpace E'\nT : E' →L[ℂ] E'\n⊢ ((∀ (v : E'), ↑(↑re (inner (↑↑T v) v)) = inner (↑↑T v) v) ∧ ∀ (x : E'), 0 ≤ reApplyInnerSelf T x) ↔\n    (∀ (x : E'), ↑(↑re (inner (↑T x) x)) = inner (↑T x) x) ∧ ∀ (x : E'), 0 ≤ ↑re (inner (↑T x) x)\n[PROOFSTEP]\nrfl\n", "meta": {"mathlib_filename": "Mathlib.Analysis.InnerProductSpace.Positive", "llama_tokens": 3866, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7549149868676283, "lm_q2_score": 0.685949467848392, "lm_q1q2_score": 0.5178335335126254}}
{"text": "[GOAL]\n𝕜 : Type u_1\ninst✝⁷ : NontriviallyNormedField 𝕜\nH : Type u_2\ninst✝⁶ : TopologicalSpace H\nE : Type u_3\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nI : ModelWithCorners 𝕜 E H\nR : Type u_4\ninst✝³ : Ring R\ninst✝² : TopologicalSpace R\ninst✝¹ : ChartedSpace H R\ninst✝ : SmoothRing I R\n⊢ Smooth I I fun a => -a\n[PROOFSTEP]\nsimpa only [neg_one_mul] using @smooth_mul_left 𝕜 _ H _ E _ _ I R _ _ _ _ (-1)\n[GOAL]\n𝕜 : Type u_1\ninst✝ : NontriviallyNormedField 𝕜\nsrc✝ : LieAddGroup 𝓘(𝕜, 𝕜) 𝕜 := normedSpaceLieAddGroup\n⊢ Smooth (ModelWithCorners.prod 𝓘(𝕜, 𝕜) 𝓘(𝕜, 𝕜)) 𝓘(𝕜, 𝕜) fun p => p.fst * p.snd\n[PROOFSTEP]\nrw [smooth_iff]\n[GOAL]\n𝕜 : Type u_1\ninst✝ : NontriviallyNormedField 𝕜\nsrc✝ : LieAddGroup 𝓘(𝕜, 𝕜) 𝕜 := normedSpaceLieAddGroup\n⊢ (Continuous fun p => p.fst * p.snd) ∧\n    ∀ (x : 𝕜 × 𝕜) (y : 𝕜),\n      ContDiffOn 𝕜 ⊤\n        (↑(extChartAt 𝓘(𝕜, 𝕜) y) ∘\n          (fun p => p.fst * p.snd) ∘ ↑(LocalEquiv.symm (extChartAt (ModelWithCorners.prod 𝓘(𝕜, 𝕜) 𝓘(𝕜, 𝕜)) x)))\n        ((extChartAt (ModelWithCorners.prod 𝓘(𝕜, 𝕜) 𝓘(𝕜, 𝕜)) x).target ∩\n          ↑(LocalEquiv.symm (extChartAt (ModelWithCorners.prod 𝓘(𝕜, 𝕜) 𝓘(𝕜, 𝕜)) x)) ⁻¹'\n            ((fun p => p.fst * p.snd) ⁻¹' (extChartAt 𝓘(𝕜, 𝕜) y).source))\n[PROOFSTEP]\nrefine' ⟨continuous_mul, fun x y => _⟩\n[GOAL]\n𝕜 : Type u_1\ninst✝ : NontriviallyNormedField 𝕜\nsrc✝ : LieAddGroup 𝓘(𝕜, 𝕜) 𝕜 := normedSpaceLieAddGroup\nx : 𝕜 × 𝕜\ny : 𝕜\n⊢ ContDiffOn 𝕜 ⊤\n    (↑(extChartAt 𝓘(𝕜, 𝕜) y) ∘\n      (fun p => p.fst * p.snd) ∘ ↑(LocalEquiv.symm (extChartAt (ModelWithCorners.prod 𝓘(𝕜, 𝕜) 𝓘(𝕜, 𝕜)) x)))\n    ((extChartAt (ModelWithCorners.prod 𝓘(𝕜, 𝕜) 𝓘(𝕜, 𝕜)) x).target ∩\n      ↑(LocalEquiv.symm (extChartAt (ModelWithCorners.prod 𝓘(𝕜, 𝕜) 𝓘(𝕜, 𝕜)) x)) ⁻¹'\n        ((fun p => p.fst * p.snd) ⁻¹' (extChartAt 𝓘(𝕜, 𝕜) y).source))\n[PROOFSTEP]\nsimp only [Prod.mk.eta, mfld_simps]\n[GOAL]\n𝕜 : Type u_1\ninst✝ : NontriviallyNormedField 𝕜\nsrc✝ : LieAddGroup 𝓘(𝕜, 𝕜) 𝕜 := normedSpaceLieAddGroup\nx : 𝕜 × 𝕜\ny : 𝕜\n⊢ ContDiffOn 𝕜 ⊤ (fun p => p.fst * p.snd) Set.univ\n[PROOFSTEP]\nrw [contDiffOn_univ]\n[GOAL]\n𝕜 : Type u_1\ninst✝ : NontriviallyNormedField 𝕜\nsrc✝ : LieAddGroup 𝓘(𝕜, 𝕜) 𝕜 := normedSpaceLieAddGroup\nx : 𝕜 × 𝕜\ny : 𝕜\n⊢ ContDiff 𝕜 ⊤ fun p => p.fst * p.snd\n[PROOFSTEP]\nexact contDiff_mul\n", "meta": {"mathlib_filename": "Mathlib.Geometry.Manifold.Algebra.Structures", "llama_tokens": 1214, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8791467770088162, "lm_q2_score": 0.588889130767832, "lm_q1q2_score": 0.5177199813300628}}
{"text": "[GOAL]\n𝕜 : Type u_1\ninst✝⁷ : CommRing 𝕜\nV : Type u_2\ninst✝⁶ : AddCommGroup V\ninst✝⁵ : Module 𝕜 V\ninst✝⁴ : MeasurableSpace V\nW : Type u_3\ninst✝³ : AddCommGroup W\ninst✝² : Module 𝕜 W\nE : Type u_4\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\ne : Multiplicative 𝕜 →* { x // x ∈ 𝕊 }\nμ : Measure V\nL : V →ₗ[𝕜] W →ₗ[𝕜] 𝕜\nf : V → E\nr : ℂ\n⊢ fourierIntegral e μ L (r • f) = r • fourierIntegral e μ L f\n[PROOFSTEP]\next1 w\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝⁷ : CommRing 𝕜\nV : Type u_2\ninst✝⁶ : AddCommGroup V\ninst✝⁵ : Module 𝕜 V\ninst✝⁴ : MeasurableSpace V\nW : Type u_3\ninst✝³ : AddCommGroup W\ninst✝² : Module 𝕜 W\nE : Type u_4\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\ne : Multiplicative 𝕜 →* { x // x ∈ 𝕊 }\nμ : Measure V\nL : V →ₗ[𝕜] W →ₗ[𝕜] 𝕜\nf : V → E\nr : ℂ\nw : W\n⊢ fourierIntegral e μ L (r • f) w = (r • fourierIntegral e μ L f) w\n[PROOFSTEP]\nsimp only [Pi.smul_apply, fourierIntegral, ← integral_smul]\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝⁷ : CommRing 𝕜\nV : Type u_2\ninst✝⁶ : AddCommGroup V\ninst✝⁵ : Module 𝕜 V\ninst✝⁴ : MeasurableSpace V\nW : Type u_3\ninst✝³ : AddCommGroup W\ninst✝² : Module 𝕜 W\nE : Type u_4\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\ne : Multiplicative 𝕜 →* { x // x ∈ 𝕊 }\nμ : Measure V\nL : V →ₗ[𝕜] W →ₗ[𝕜] 𝕜\nf : V → E\nr : ℂ\nw : W\n⊢ ∫ (v : V), ↑(↑e (↑Multiplicative.ofAdd (-↑(↑L v) w))) • r • f v ∂μ =\n    ∫ (a : V), r • ↑(↑e (↑Multiplicative.ofAdd (-↑(↑L a) w))) • f a ∂μ\n[PROOFSTEP]\ncongr\n[GOAL]\ncase h.e_f\n𝕜 : Type u_1\ninst✝⁷ : CommRing 𝕜\nV : Type u_2\ninst✝⁶ : AddCommGroup V\ninst✝⁵ : Module 𝕜 V\ninst✝⁴ : MeasurableSpace V\nW : Type u_3\ninst✝³ : AddCommGroup W\ninst✝² : Module 𝕜 W\nE : Type u_4\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\ne : Multiplicative 𝕜 →* { x // x ∈ 𝕊 }\nμ : Measure V\nL : V →ₗ[𝕜] W →ₗ[𝕜] 𝕜\nf : V → E\nr : ℂ\nw : W\n⊢ (fun v => ↑(↑e (↑Multiplicative.ofAdd (-↑(↑L v) w))) • r • f v) = fun a =>\n    r • ↑(↑e (↑Multiplicative.ofAdd (-↑(↑L a) w))) • f a\n[PROOFSTEP]\nfunext\n[GOAL]\ncase h.e_f.h\n𝕜 : Type u_1\ninst✝⁷ : CommRing 𝕜\nV : Type u_2\ninst✝⁶ : AddCommGroup V\ninst✝⁵ : Module 𝕜 V\ninst✝⁴ : MeasurableSpace V\nW : Type u_3\ninst✝³ : AddCommGroup W\ninst✝² : Module 𝕜 W\nE : Type u_4\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\ne : Multiplicative 𝕜 →* { x // x ∈ 𝕊 }\nμ : Measure V\nL : V →ₗ[𝕜] W →ₗ[𝕜] 𝕜\nf : V → E\nr : ℂ\nw : W\nx✝ : V\n⊢ ↑(↑e (↑Multiplicative.ofAdd (-↑(↑L x✝) w))) • r • f x✝ = r • ↑(↑e (↑Multiplicative.ofAdd (-↑(↑L x✝) w))) • f x✝\n[PROOFSTEP]\nrw [smul_comm]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁷ : CommRing 𝕜\nV : Type u_2\ninst✝⁶ : AddCommGroup V\ninst✝⁵ : Module 𝕜 V\ninst✝⁴ : MeasurableSpace V\nW : Type u_3\ninst✝³ : AddCommGroup W\ninst✝² : Module 𝕜 W\nE : Type u_4\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\ne : Multiplicative 𝕜 →* { x // x ∈ 𝕊 }\nμ : Measure V\nL : V →ₗ[𝕜] W →ₗ[𝕜] 𝕜\nf : V → E\nw : W\n⊢ ‖fourierIntegral e μ L f w‖ ≤ ∫ (v : V), ‖f v‖ ∂μ\n[PROOFSTEP]\nrefine' (norm_integral_le_integral_norm _).trans (le_of_eq _)\n[GOAL]\n𝕜 : Type u_1\ninst✝⁷ : CommRing 𝕜\nV : Type u_2\ninst✝⁶ : AddCommGroup V\ninst✝⁵ : Module 𝕜 V\ninst✝⁴ : MeasurableSpace V\nW : Type u_3\ninst✝³ : AddCommGroup W\ninst✝² : Module 𝕜 W\nE : Type u_4\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\ne : Multiplicative 𝕜 →* { x // x ∈ 𝕊 }\nμ : Measure V\nL : V →ₗ[𝕜] W →ₗ[𝕜] 𝕜\nf : V → E\nw : W\n⊢ ∫ (a : V), ‖↑(↑e (↑Multiplicative.ofAdd (-↑(↑L a) w))) • f a‖ ∂μ = ∫ (v : V), ‖f v‖ ∂μ\n[PROOFSTEP]\nsimp_rw [norm_smul, Complex.norm_eq_abs, abs_coe_circle, one_mul]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁹ : CommRing 𝕜\nV : Type u_2\ninst✝⁸ : AddCommGroup V\ninst✝⁷ : Module 𝕜 V\ninst✝⁶ : MeasurableSpace V\nW : Type u_3\ninst✝⁵ : AddCommGroup W\ninst✝⁴ : Module 𝕜 W\nE : Type u_4\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℂ E\ninst✝¹ : MeasurableAdd V\ne : Multiplicative 𝕜 →* { x // x ∈ 𝕊 }\nμ : Measure V\ninst✝ : Measure.IsAddRightInvariant μ\nL : V →ₗ[𝕜] W →ₗ[𝕜] 𝕜\nf : V → E\nv₀ : V\n⊢ fourierIntegral e μ L (f ∘ fun v => v + v₀) = fun w =>\n    ↑(↑e (↑Multiplicative.ofAdd (↑(↑L v₀) w))) • fourierIntegral e μ L f w\n[PROOFSTEP]\next1 w\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝⁹ : CommRing 𝕜\nV : Type u_2\ninst✝⁸ : AddCommGroup V\ninst✝⁷ : Module 𝕜 V\ninst✝⁶ : MeasurableSpace V\nW : Type u_3\ninst✝⁵ : AddCommGroup W\ninst✝⁴ : Module 𝕜 W\nE : Type u_4\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℂ E\ninst✝¹ : MeasurableAdd V\ne : Multiplicative 𝕜 →* { x // x ∈ 𝕊 }\nμ : Measure V\ninst✝ : Measure.IsAddRightInvariant μ\nL : V →ₗ[𝕜] W →ₗ[𝕜] 𝕜\nf : V → E\nv₀ : V\nw : W\n⊢ fourierIntegral e μ L (f ∘ fun v => v + v₀) w = ↑(↑e (↑Multiplicative.ofAdd (↑(↑L v₀) w))) • fourierIntegral e μ L f w\n[PROOFSTEP]\ndsimp only [fourierIntegral, Function.comp_apply]\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝⁹ : CommRing 𝕜\nV : Type u_2\ninst✝⁸ : AddCommGroup V\ninst✝⁷ : Module 𝕜 V\ninst✝⁶ : MeasurableSpace V\nW : Type u_3\ninst✝⁵ : AddCommGroup W\ninst✝⁴ : Module 𝕜 W\nE : Type u_4\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℂ E\ninst✝¹ : MeasurableAdd V\ne : Multiplicative 𝕜 →* { x // x ∈ 𝕊 }\nμ : Measure V\ninst✝ : Measure.IsAddRightInvariant μ\nL : V →ₗ[𝕜] W →ₗ[𝕜] 𝕜\nf : V → E\nv₀ : V\nw : W\n⊢ ∫ (v : V), ↑(↑e (↑Multiplicative.ofAdd (-↑(↑L v) w))) • f (v + v₀) ∂μ =\n    ↑(↑e (↑Multiplicative.ofAdd (↑(↑L v₀) w))) • ∫ (v : V), ↑(↑e (↑Multiplicative.ofAdd (-↑(↑L v) w))) • f v ∂μ\n[PROOFSTEP]\nconv in L _ => rw [← add_sub_cancel v v₀]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁹ : CommRing 𝕜\nV : Type u_2\ninst✝⁸ : AddCommGroup V\ninst✝⁷ : Module 𝕜 V\ninst✝⁶ : MeasurableSpace V\nW : Type u_3\ninst✝⁵ : AddCommGroup W\ninst✝⁴ : Module 𝕜 W\nE : Type u_4\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℂ E\ninst✝¹ : MeasurableAdd V\ne : Multiplicative 𝕜 →* { x // x ∈ 𝕊 }\nμ : Measure V\ninst✝ : Measure.IsAddRightInvariant μ\nL : V →ₗ[𝕜] W →ₗ[𝕜] 𝕜\nf : V → E\nv₀ : V\nw : W\nv : V\n| ↑L v\n[PROOFSTEP]\nrw [← add_sub_cancel v v₀]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁹ : CommRing 𝕜\nV : Type u_2\ninst✝⁸ : AddCommGroup V\ninst✝⁷ : Module 𝕜 V\ninst✝⁶ : MeasurableSpace V\nW : Type u_3\ninst✝⁵ : AddCommGroup W\ninst✝⁴ : Module 𝕜 W\nE : Type u_4\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℂ E\ninst✝¹ : MeasurableAdd V\ne : Multiplicative 𝕜 →* { x // x ∈ 𝕊 }\nμ : Measure V\ninst✝ : Measure.IsAddRightInvariant μ\nL : V →ₗ[𝕜] W →ₗ[𝕜] 𝕜\nf : V → E\nv₀ : V\nw : W\nv : V\n| ↑L v\n[PROOFSTEP]\nrw [← add_sub_cancel v v₀]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁹ : CommRing 𝕜\nV : Type u_2\ninst✝⁸ : AddCommGroup V\ninst✝⁷ : Module 𝕜 V\ninst✝⁶ : MeasurableSpace V\nW : Type u_3\ninst✝⁵ : AddCommGroup W\ninst✝⁴ : Module 𝕜 W\nE : Type u_4\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℂ E\ninst✝¹ : MeasurableAdd V\ne : Multiplicative 𝕜 →* { x // x ∈ 𝕊 }\nμ : Measure V\ninst✝ : Measure.IsAddRightInvariant μ\nL : V →ₗ[𝕜] W →ₗ[𝕜] 𝕜\nf : V → E\nv₀ : V\nw : W\nv : V\n| ↑L v\n[PROOFSTEP]\nrw [← add_sub_cancel v v₀]\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝⁹ : CommRing 𝕜\nV : Type u_2\ninst✝⁸ : AddCommGroup V\ninst✝⁷ : Module 𝕜 V\ninst✝⁶ : MeasurableSpace V\nW : Type u_3\ninst✝⁵ : AddCommGroup W\ninst✝⁴ : Module 𝕜 W\nE : Type u_4\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℂ E\ninst✝¹ : MeasurableAdd V\ne : Multiplicative 𝕜 →* { x // x ∈ 𝕊 }\nμ : Measure V\ninst✝ : Measure.IsAddRightInvariant μ\nL : V →ₗ[𝕜] W →ₗ[𝕜] 𝕜\nf : V → E\nv₀ : V\nw : W\n⊢ ∫ (v : V), ↑(↑e (↑Multiplicative.ofAdd (-↑(↑L (v + v₀ - v₀)) w))) • f (v + v₀) ∂μ =\n    ↑(↑e (↑Multiplicative.ofAdd (↑(↑L v₀) w))) • ∫ (v : V), ↑(↑e (↑Multiplicative.ofAdd (-↑(↑L v) w))) • f v ∂μ\n[PROOFSTEP]\nrw [integral_add_right_eq_self fun v : V => e[-L (v - v₀) w] • f v]\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝⁹ : CommRing 𝕜\nV : Type u_2\ninst✝⁸ : AddCommGroup V\ninst✝⁷ : Module 𝕜 V\ninst✝⁶ : MeasurableSpace V\nW : Type u_3\ninst✝⁵ : AddCommGroup W\ninst✝⁴ : Module 𝕜 W\nE : Type u_4\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℂ E\ninst✝¹ : MeasurableAdd V\ne : Multiplicative 𝕜 →* { x // x ∈ 𝕊 }\nμ : Measure V\ninst✝ : Measure.IsAddRightInvariant μ\nL : V →ₗ[𝕜] W →ₗ[𝕜] 𝕜\nf : V → E\nv₀ : V\nw : W\n⊢ ∫ (x : V), ↑(↑e (↑Multiplicative.ofAdd (-↑(↑L (x - v₀)) w))) • f x ∂μ =\n    ↑(↑e (↑Multiplicative.ofAdd (↑(↑L v₀) w))) • ∫ (v : V), ↑(↑e (↑Multiplicative.ofAdd (-↑(↑L v) w))) • f v ∂μ\n[PROOFSTEP]\ndsimp only\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝⁹ : CommRing 𝕜\nV : Type u_2\ninst✝⁸ : AddCommGroup V\ninst✝⁷ : Module 𝕜 V\ninst✝⁶ : MeasurableSpace V\nW : Type u_3\ninst✝⁵ : AddCommGroup W\ninst✝⁴ : Module 𝕜 W\nE : Type u_4\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℂ E\ninst✝¹ : MeasurableAdd V\ne : Multiplicative 𝕜 →* { x // x ∈ 𝕊 }\nμ : Measure V\ninst✝ : Measure.IsAddRightInvariant μ\nL : V →ₗ[𝕜] W →ₗ[𝕜] 𝕜\nf : V → E\nv₀ : V\nw : W\n⊢ ∫ (x : V), ↑(↑e (↑Multiplicative.ofAdd (-↑(↑L (x - v₀)) w))) • f x ∂μ =\n    ↑(↑e (↑Multiplicative.ofAdd (↑(↑L v₀) w))) • ∫ (v : V), ↑(↑e (↑Multiplicative.ofAdd (-↑(↑L v) w))) • f v ∂μ\n[PROOFSTEP]\nrw [← integral_smul]\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝⁹ : CommRing 𝕜\nV : Type u_2\ninst✝⁸ : AddCommGroup V\ninst✝⁷ : Module 𝕜 V\ninst✝⁶ : MeasurableSpace V\nW : Type u_3\ninst✝⁵ : AddCommGroup W\ninst✝⁴ : Module 𝕜 W\nE : Type u_4\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℂ E\ninst✝¹ : MeasurableAdd V\ne : Multiplicative 𝕜 →* { x // x ∈ 𝕊 }\nμ : Measure V\ninst✝ : Measure.IsAddRightInvariant μ\nL : V →ₗ[𝕜] W →ₗ[𝕜] 𝕜\nf : V → E\nv₀ : V\nw : W\n⊢ ∫ (x : V), ↑(↑e (↑Multiplicative.ofAdd (-↑(↑L (x - v₀)) w))) • f x ∂μ =\n    ∫ (a : V), ↑(↑e (↑Multiplicative.ofAdd (↑(↑L v₀) w))) • ↑(↑e (↑Multiplicative.ofAdd (-↑(↑L a) w))) • f a ∂μ\n[PROOFSTEP]\ncongr 1 with v\n[GOAL]\ncase h.e_f.h\n𝕜 : Type u_1\ninst✝⁹ : CommRing 𝕜\nV : Type u_2\ninst✝⁸ : AddCommGroup V\ninst✝⁷ : Module 𝕜 V\ninst✝⁶ : MeasurableSpace V\nW : Type u_3\ninst✝⁵ : AddCommGroup W\ninst✝⁴ : Module 𝕜 W\nE : Type u_4\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℂ E\ninst✝¹ : MeasurableAdd V\ne : Multiplicative 𝕜 →* { x // x ∈ 𝕊 }\nμ : Measure V\ninst✝ : Measure.IsAddRightInvariant μ\nL : V →ₗ[𝕜] W →ₗ[𝕜] 𝕜\nf : V → E\nv₀ : V\nw : W\nv : V\n⊢ ↑(↑e (↑Multiplicative.ofAdd (-↑(↑L (v - v₀)) w))) • f v =\n    ↑(↑e (↑Multiplicative.ofAdd (↑(↑L v₀) w))) • ↑(↑e (↑Multiplicative.ofAdd (-↑(↑L v) w))) • f v\n[PROOFSTEP]\nrw [← smul_assoc, smul_eq_mul, ← Submonoid.coe_mul, ← e.map_mul, ← ofAdd_add, ← LinearMap.neg_apply, ← sub_eq_add_neg, ←\n  LinearMap.sub_apply, LinearMap.map_sub, neg_sub]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹² : CommRing 𝕜\nV : Type u_2\ninst✝¹¹ : AddCommGroup V\ninst✝¹⁰ : Module 𝕜 V\ninst✝⁹ : MeasurableSpace V\nW : Type u_3\ninst✝⁸ : AddCommGroup W\ninst✝⁷ : Module 𝕜 W\nE : Type u_4\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℂ E\ninst✝⁴ : TopologicalSpace 𝕜\ninst✝³ : TopologicalRing 𝕜\ninst✝² : TopologicalSpace V\ninst✝¹ : BorelSpace V\ninst✝ : TopologicalSpace W\ne : Multiplicative 𝕜 →* { x // x ∈ 𝕊 }\nμ : Measure V\nL : V →ₗ[𝕜] W →ₗ[𝕜] 𝕜\nhe : Continuous ↑e\nhL : Continuous fun p => ↑(↑L p.fst) p.snd\nf : V → E\nw : W\n⊢ Integrable f ↔ Integrable fun v => ↑(↑e (↑Multiplicative.ofAdd (-↑(↑L v) w))) • f v\n[PROOFSTEP]\nhave aux : ∀ {g : V → E} (_ : Integrable g μ) (x : W), Integrable (fun v : V => e[-L v x] • g v) μ :=\n  by\n  intro g hg x\n  have c : Continuous fun v => e[-L v x] :=\n    by\n    refine' (continuous_induced_rng.mp he).comp (continuous_ofAdd.comp (Continuous.neg _))\n    exact hL.comp (continuous_prod_mk.mpr ⟨continuous_id, continuous_const⟩)\n  rw [← integrable_norm_iff (c.aestronglyMeasurable.smul hg.1)]\n  convert hg.norm using 2\n  rw [norm_smul, Complex.norm_eq_abs, abs_coe_circle, one_mul]\n    -- then use it for both directions\n[GOAL]\n𝕜 : Type u_1\ninst✝¹² : CommRing 𝕜\nV : Type u_2\ninst✝¹¹ : AddCommGroup V\ninst✝¹⁰ : Module 𝕜 V\ninst✝⁹ : MeasurableSpace V\nW : Type u_3\ninst✝⁸ : AddCommGroup W\ninst✝⁷ : Module 𝕜 W\nE : Type u_4\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℂ E\ninst✝⁴ : TopologicalSpace 𝕜\ninst✝³ : TopologicalRing 𝕜\ninst✝² : TopologicalSpace V\ninst✝¹ : BorelSpace V\ninst✝ : TopologicalSpace W\ne : Multiplicative 𝕜 →* { x // x ∈ 𝕊 }\nμ : Measure V\nL : V →ₗ[𝕜] W →ₗ[𝕜] 𝕜\nhe : Continuous ↑e\nhL : Continuous fun p => ↑(↑L p.fst) p.snd\nf : V → E\nw : W\n⊢ ∀ {g : V → E}, Integrable g → ∀ (x : W), Integrable fun v => ↑(↑e (↑Multiplicative.ofAdd (-↑(↑L v) x))) • g v\n[PROOFSTEP]\nintro g hg x\n[GOAL]\n𝕜 : Type u_1\ninst✝¹² : CommRing 𝕜\nV : Type u_2\ninst✝¹¹ : AddCommGroup V\ninst✝¹⁰ : Module 𝕜 V\ninst✝⁹ : MeasurableSpace V\nW : Type u_3\ninst✝⁸ : AddCommGroup W\ninst✝⁷ : Module 𝕜 W\nE : Type u_4\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℂ E\ninst✝⁴ : TopologicalSpace 𝕜\ninst✝³ : TopologicalRing 𝕜\ninst✝² : TopologicalSpace V\ninst✝¹ : BorelSpace V\ninst✝ : TopologicalSpace W\ne : Multiplicative 𝕜 →* { x // x ∈ 𝕊 }\nμ : Measure V\nL : V →ₗ[𝕜] W →ₗ[𝕜] 𝕜\nhe : Continuous ↑e\nhL : Continuous fun p => ↑(↑L p.fst) p.snd\nf : V → E\nw : W\ng : V → E\nhg : Integrable g\nx : W\n⊢ Integrable fun v => ↑(↑e (↑Multiplicative.ofAdd (-↑(↑L v) x))) • g v\n[PROOFSTEP]\nhave c : Continuous fun v => e[-L v x] :=\n  by\n  refine' (continuous_induced_rng.mp he).comp (continuous_ofAdd.comp (Continuous.neg _))\n  exact hL.comp (continuous_prod_mk.mpr ⟨continuous_id, continuous_const⟩)\n[GOAL]\n𝕜 : Type u_1\ninst✝¹² : CommRing 𝕜\nV : Type u_2\ninst✝¹¹ : AddCommGroup V\ninst✝¹⁰ : Module 𝕜 V\ninst✝⁹ : MeasurableSpace V\nW : Type u_3\ninst✝⁸ : AddCommGroup W\ninst✝⁷ : Module 𝕜 W\nE : Type u_4\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℂ E\ninst✝⁴ : TopologicalSpace 𝕜\ninst✝³ : TopologicalRing 𝕜\ninst✝² : TopologicalSpace V\ninst✝¹ : BorelSpace V\ninst✝ : TopologicalSpace W\ne : Multiplicative 𝕜 →* { x // x ∈ 𝕊 }\nμ : Measure V\nL : V →ₗ[𝕜] W →ₗ[𝕜] 𝕜\nhe : Continuous ↑e\nhL : Continuous fun p => ↑(↑L p.fst) p.snd\nf : V → E\nw : W\ng : V → E\nhg : Integrable g\nx : W\n⊢ Continuous fun v => ↑(↑e (↑Multiplicative.ofAdd (-↑(↑L v) x)))\n[PROOFSTEP]\nrefine' (continuous_induced_rng.mp he).comp (continuous_ofAdd.comp (Continuous.neg _))\n[GOAL]\n𝕜 : Type u_1\ninst✝¹² : CommRing 𝕜\nV : Type u_2\ninst✝¹¹ : AddCommGroup V\ninst✝¹⁰ : Module 𝕜 V\ninst✝⁹ : MeasurableSpace V\nW : Type u_3\ninst✝⁸ : AddCommGroup W\ninst✝⁷ : Module 𝕜 W\nE : Type u_4\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℂ E\ninst✝⁴ : TopologicalSpace 𝕜\ninst✝³ : TopologicalRing 𝕜\ninst✝² : TopologicalSpace V\ninst✝¹ : BorelSpace V\ninst✝ : TopologicalSpace W\ne : Multiplicative 𝕜 →* { x // x ∈ 𝕊 }\nμ : Measure V\nL : V →ₗ[𝕜] W →ₗ[𝕜] 𝕜\nhe : Continuous ↑e\nhL : Continuous fun p => ↑(↑L p.fst) p.snd\nf : V → E\nw : W\ng : V → E\nhg : Integrable g\nx : W\n⊢ Continuous fun v => ↑(↑L v) x\n[PROOFSTEP]\nexact hL.comp (continuous_prod_mk.mpr ⟨continuous_id, continuous_const⟩)\n[GOAL]\n𝕜 : Type u_1\ninst✝¹² : CommRing 𝕜\nV : Type u_2\ninst✝¹¹ : AddCommGroup V\ninst✝¹⁰ : Module 𝕜 V\ninst✝⁹ : MeasurableSpace V\nW : Type u_3\ninst✝⁸ : AddCommGroup W\ninst✝⁷ : Module 𝕜 W\nE : Type u_4\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℂ E\ninst✝⁴ : TopologicalSpace 𝕜\ninst✝³ : TopologicalRing 𝕜\ninst✝² : TopologicalSpace V\ninst✝¹ : BorelSpace V\ninst✝ : TopologicalSpace W\ne : Multiplicative 𝕜 →* { x // x ∈ 𝕊 }\nμ : Measure V\nL : V →ₗ[𝕜] W →ₗ[𝕜] 𝕜\nhe : Continuous ↑e\nhL : Continuous fun p => ↑(↑L p.fst) p.snd\nf : V → E\nw : W\ng : V → E\nhg : Integrable g\nx : W\nc : Continuous fun v => ↑(↑e (↑Multiplicative.ofAdd (-↑(↑L v) x)))\n⊢ Integrable fun v => ↑(↑e (↑Multiplicative.ofAdd (-↑(↑L v) x))) • g v\n[PROOFSTEP]\nrw [← integrable_norm_iff (c.aestronglyMeasurable.smul hg.1)]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹² : CommRing 𝕜\nV : Type u_2\ninst✝¹¹ : AddCommGroup V\ninst✝¹⁰ : Module 𝕜 V\ninst✝⁹ : MeasurableSpace V\nW : Type u_3\ninst✝⁸ : AddCommGroup W\ninst✝⁷ : Module 𝕜 W\nE : Type u_4\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℂ E\ninst✝⁴ : TopologicalSpace 𝕜\ninst✝³ : TopologicalRing 𝕜\ninst✝² : TopologicalSpace V\ninst✝¹ : BorelSpace V\ninst✝ : TopologicalSpace W\ne : Multiplicative 𝕜 →* { x // x ∈ 𝕊 }\nμ : Measure V\nL : V →ₗ[𝕜] W →ₗ[𝕜] 𝕜\nhe : Continuous ↑e\nhL : Continuous fun p => ↑(↑L p.fst) p.snd\nf : V → E\nw : W\ng : V → E\nhg : Integrable g\nx : W\nc : Continuous fun v => ↑(↑e (↑Multiplicative.ofAdd (-↑(↑L v) x)))\n⊢ Integrable fun a => ‖↑(↑e (↑Multiplicative.ofAdd (-↑(↑L a) x))) • g a‖\n[PROOFSTEP]\nconvert hg.norm using 2\n[GOAL]\ncase h.e'_5.h\n𝕜 : Type u_1\ninst✝¹² : CommRing 𝕜\nV : Type u_2\ninst✝¹¹ : AddCommGroup V\ninst✝¹⁰ : Module 𝕜 V\ninst✝⁹ : MeasurableSpace V\nW : Type u_3\ninst✝⁸ : AddCommGroup W\ninst✝⁷ : Module 𝕜 W\nE : Type u_4\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℂ E\ninst✝⁴ : TopologicalSpace 𝕜\ninst✝³ : TopologicalRing 𝕜\ninst✝² : TopologicalSpace V\ninst✝¹ : BorelSpace V\ninst✝ : TopologicalSpace W\ne : Multiplicative 𝕜 →* { x // x ∈ 𝕊 }\nμ : Measure V\nL : V →ₗ[𝕜] W →ₗ[𝕜] 𝕜\nhe : Continuous ↑e\nhL : Continuous fun p => ↑(↑L p.fst) p.snd\nf : V → E\nw : W\ng : V → E\nhg : Integrable g\nx : W\nc : Continuous fun v => ↑(↑e (↑Multiplicative.ofAdd (-↑(↑L v) x)))\nx✝ : V\n⊢ ‖↑(↑e (↑Multiplicative.ofAdd (-↑(↑L x✝) x))) • g x✝‖ = ‖g x✝‖\n[PROOFSTEP]\nrw [norm_smul, Complex.norm_eq_abs, abs_coe_circle, one_mul]\n  -- then use it for both directions\n[GOAL]\n𝕜 : Type u_1\ninst✝¹² : CommRing 𝕜\nV : Type u_2\ninst✝¹¹ : AddCommGroup V\ninst✝¹⁰ : Module 𝕜 V\ninst✝⁹ : MeasurableSpace V\nW : Type u_3\ninst✝⁸ : AddCommGroup W\ninst✝⁷ : Module 𝕜 W\nE : Type u_4\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℂ E\ninst✝⁴ : TopologicalSpace 𝕜\ninst✝³ : TopologicalRing 𝕜\ninst✝² : TopologicalSpace V\ninst✝¹ : BorelSpace V\ninst✝ : TopologicalSpace W\ne : Multiplicative 𝕜 →* { x // x ∈ 𝕊 }\nμ : Measure V\nL : V →ₗ[𝕜] W →ₗ[𝕜] 𝕜\nhe : Continuous ↑e\nhL : Continuous fun p => ↑(↑L p.fst) p.snd\nf : V → E\nw : W\naux : ∀ {g : V → E}, Integrable g → ∀ (x : W), Integrable fun v => ↑(↑e (↑Multiplicative.ofAdd (-↑(↑L v) x))) • g v\n⊢ Integrable f ↔ Integrable fun v => ↑(↑e (↑Multiplicative.ofAdd (-↑(↑L v) w))) • f v\n[PROOFSTEP]\nrefine' ⟨fun hf => aux hf w, fun hf => _⟩\n[GOAL]\n𝕜 : Type u_1\ninst✝¹² : CommRing 𝕜\nV : Type u_2\ninst✝¹¹ : AddCommGroup V\ninst✝¹⁰ : Module 𝕜 V\ninst✝⁹ : MeasurableSpace V\nW : Type u_3\ninst✝⁸ : AddCommGroup W\ninst✝⁷ : Module 𝕜 W\nE : Type u_4\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℂ E\ninst✝⁴ : TopologicalSpace 𝕜\ninst✝³ : TopologicalRing 𝕜\ninst✝² : TopologicalSpace V\ninst✝¹ : BorelSpace V\ninst✝ : TopologicalSpace W\ne : Multiplicative 𝕜 →* { x // x ∈ 𝕊 }\nμ : Measure V\nL : V →ₗ[𝕜] W →ₗ[𝕜] 𝕜\nhe : Continuous ↑e\nhL : Continuous fun p => ↑(↑L p.fst) p.snd\nf : V → E\nw : W\naux : ∀ {g : V → E}, Integrable g → ∀ (x : W), Integrable fun v => ↑(↑e (↑Multiplicative.ofAdd (-↑(↑L v) x))) • g v\nhf : Integrable fun v => ↑(↑e (↑Multiplicative.ofAdd (-↑(↑L v) w))) • f v\n⊢ Integrable f\n[PROOFSTEP]\nconvert aux hf (-w)\n[GOAL]\ncase h.e'_5.h\n𝕜 : Type u_1\ninst✝¹² : CommRing 𝕜\nV : Type u_2\ninst✝¹¹ : AddCommGroup V\ninst✝¹⁰ : Module 𝕜 V\ninst✝⁹ : MeasurableSpace V\nW : Type u_3\ninst✝⁸ : AddCommGroup W\ninst✝⁷ : Module 𝕜 W\nE : Type u_4\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℂ E\ninst✝⁴ : TopologicalSpace 𝕜\ninst✝³ : TopologicalRing 𝕜\ninst✝² : TopologicalSpace V\ninst✝¹ : BorelSpace V\ninst✝ : TopologicalSpace W\ne : Multiplicative 𝕜 →* { x // x ∈ 𝕊 }\nμ : Measure V\nL : V →ₗ[𝕜] W →ₗ[𝕜] 𝕜\nhe : Continuous ↑e\nhL : Continuous fun p => ↑(↑L p.fst) p.snd\nf : V → E\nw : W\naux : ∀ {g : V → E}, Integrable g → ∀ (x : W), Integrable fun v => ↑(↑e (↑Multiplicative.ofAdd (-↑(↑L v) x))) • g v\nhf : Integrable fun v => ↑(↑e (↑Multiplicative.ofAdd (-↑(↑L v) w))) • f v\nx✝ : V\n⊢ f x✝ = ↑(↑e (↑Multiplicative.ofAdd (-↑(↑L x✝) (-w)))) • ↑(↑e (↑Multiplicative.ofAdd (-↑(↑L x✝) w))) • f x✝\n[PROOFSTEP]\nrw [← smul_assoc, smul_eq_mul, ← Submonoid.coe_mul, ← MonoidHom.map_mul, ← ofAdd_add, LinearMap.map_neg, neg_neg, ←\n  sub_eq_add_neg, sub_self, ofAdd_zero, MonoidHom.map_one, Submonoid.coe_one, one_smul]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹³ : CommRing 𝕜\nV : Type u_2\ninst✝¹² : AddCommGroup V\ninst✝¹¹ : Module 𝕜 V\ninst✝¹⁰ : MeasurableSpace V\nW : Type u_3\ninst✝⁹ : AddCommGroup W\ninst✝⁸ : Module 𝕜 W\nE : Type u_4\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℂ E\ninst✝⁵ : TopologicalSpace 𝕜\ninst✝⁴ : TopologicalRing 𝕜\ninst✝³ : TopologicalSpace V\ninst✝² : BorelSpace V\ninst✝¹ : TopologicalSpace W\ne : Multiplicative 𝕜 →* { x // x ∈ 𝕊 }\nμ : Measure V\nL : V →ₗ[𝕜] W →ₗ[𝕜] 𝕜\ninst✝ : CompleteSpace E\nhe : Continuous ↑e\nhL : Continuous fun p => ↑(↑L p.fst) p.snd\nf g : V → E\nhf : Integrable f\nhg : Integrable g\n⊢ fourierIntegral e μ L f + fourierIntegral e μ L g = fourierIntegral e μ L (f + g)\n[PROOFSTEP]\next1 w\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝¹³ : CommRing 𝕜\nV : Type u_2\ninst✝¹² : AddCommGroup V\ninst✝¹¹ : Module 𝕜 V\ninst✝¹⁰ : MeasurableSpace V\nW : Type u_3\ninst✝⁹ : AddCommGroup W\ninst✝⁸ : Module 𝕜 W\nE : Type u_4\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℂ E\ninst✝⁵ : TopologicalSpace 𝕜\ninst✝⁴ : TopologicalRing 𝕜\ninst✝³ : TopologicalSpace V\ninst✝² : BorelSpace V\ninst✝¹ : TopologicalSpace W\ne : Multiplicative 𝕜 →* { x // x ∈ 𝕊 }\nμ : Measure V\nL : V →ₗ[𝕜] W →ₗ[𝕜] 𝕜\ninst✝ : CompleteSpace E\nhe : Continuous ↑e\nhL : Continuous fun p => ↑(↑L p.fst) p.snd\nf g : V → E\nhf : Integrable f\nhg : Integrable g\nw : W\n⊢ (fourierIntegral e μ L f + fourierIntegral e μ L g) w = fourierIntegral e μ L (f + g) w\n[PROOFSTEP]\ndsimp only [Pi.add_apply, fourierIntegral]\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝¹³ : CommRing 𝕜\nV : Type u_2\ninst✝¹² : AddCommGroup V\ninst✝¹¹ : Module 𝕜 V\ninst✝¹⁰ : MeasurableSpace V\nW : Type u_3\ninst✝⁹ : AddCommGroup W\ninst✝⁸ : Module 𝕜 W\nE : Type u_4\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℂ E\ninst✝⁵ : TopologicalSpace 𝕜\ninst✝⁴ : TopologicalRing 𝕜\ninst✝³ : TopologicalSpace V\ninst✝² : BorelSpace V\ninst✝¹ : TopologicalSpace W\ne : Multiplicative 𝕜 →* { x // x ∈ 𝕊 }\nμ : Measure V\nL : V →ₗ[𝕜] W →ₗ[𝕜] 𝕜\ninst✝ : CompleteSpace E\nhe : Continuous ↑e\nhL : Continuous fun p => ↑(↑L p.fst) p.snd\nf g : V → E\nhf : Integrable f\nhg : Integrable g\nw : W\n⊢ ∫ (v : V), ↑(↑e (↑Multiplicative.ofAdd (-↑(↑L v) w))) • f v ∂μ +\n      ∫ (v : V), ↑(↑e (↑Multiplicative.ofAdd (-↑(↑L v) w))) • g v ∂μ =\n    ∫ (v : V), ↑(↑e (↑Multiplicative.ofAdd (-↑(↑L v) w))) • (f v + g v) ∂μ\n[PROOFSTEP]\nsimp_rw [smul_add]\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝¹³ : CommRing 𝕜\nV : Type u_2\ninst✝¹² : AddCommGroup V\ninst✝¹¹ : Module 𝕜 V\ninst✝¹⁰ : MeasurableSpace V\nW : Type u_3\ninst✝⁹ : AddCommGroup W\ninst✝⁸ : Module 𝕜 W\nE : Type u_4\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℂ E\ninst✝⁵ : TopologicalSpace 𝕜\ninst✝⁴ : TopologicalRing 𝕜\ninst✝³ : TopologicalSpace V\ninst✝² : BorelSpace V\ninst✝¹ : TopologicalSpace W\ne : Multiplicative 𝕜 →* { x // x ∈ 𝕊 }\nμ : Measure V\nL : V →ₗ[𝕜] W →ₗ[𝕜] 𝕜\ninst✝ : CompleteSpace E\nhe : Continuous ↑e\nhL : Continuous fun p => ↑(↑L p.fst) p.snd\nf g : V → E\nhf : Integrable f\nhg : Integrable g\nw : W\n⊢ ∫ (v : V), ↑(↑e (↑Multiplicative.ofAdd (-↑(↑L v) w))) • f v ∂μ +\n      ∫ (v : V), ↑(↑e (↑Multiplicative.ofAdd (-↑(↑L v) w))) • g v ∂μ =\n    ∫ (v : V), ↑(↑e (↑Multiplicative.ofAdd (-↑(↑L v) w))) • f v + ↑(↑e (↑Multiplicative.ofAdd (-↑(↑L v) w))) • g v ∂μ\n[PROOFSTEP]\nrw [integral_add]\n[GOAL]\ncase h.hf\n𝕜 : Type u_1\ninst✝¹³ : CommRing 𝕜\nV : Type u_2\ninst✝¹² : AddCommGroup V\ninst✝¹¹ : Module 𝕜 V\ninst✝¹⁰ : MeasurableSpace V\nW : Type u_3\ninst✝⁹ : AddCommGroup W\ninst✝⁸ : Module 𝕜 W\nE : Type u_4\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℂ E\ninst✝⁵ : TopologicalSpace 𝕜\ninst✝⁴ : TopologicalRing 𝕜\ninst✝³ : TopologicalSpace V\ninst✝² : BorelSpace V\ninst✝¹ : TopologicalSpace W\ne : Multiplicative 𝕜 →* { x // x ∈ 𝕊 }\nμ : Measure V\nL : V →ₗ[𝕜] W →ₗ[𝕜] 𝕜\ninst✝ : CompleteSpace E\nhe : Continuous ↑e\nhL : Continuous fun p => ↑(↑L p.fst) p.snd\nf g : V → E\nhf : Integrable f\nhg : Integrable g\nw : W\n⊢ Integrable fun v => ↑(↑e (↑Multiplicative.ofAdd (-↑(↑L v) w))) • f v\n[PROOFSTEP]\nexact (fourier_integral_convergent_iff he hL w).mp hf\n[GOAL]\ncase h.hg\n𝕜 : Type u_1\ninst✝¹³ : CommRing 𝕜\nV : Type u_2\ninst✝¹² : AddCommGroup V\ninst✝¹¹ : Module 𝕜 V\ninst✝¹⁰ : MeasurableSpace V\nW : Type u_3\ninst✝⁹ : AddCommGroup W\ninst✝⁸ : Module 𝕜 W\nE : Type u_4\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℂ E\ninst✝⁵ : TopologicalSpace 𝕜\ninst✝⁴ : TopologicalRing 𝕜\ninst✝³ : TopologicalSpace V\ninst✝² : BorelSpace V\ninst✝¹ : TopologicalSpace W\ne : Multiplicative 𝕜 →* { x // x ∈ 𝕊 }\nμ : Measure V\nL : V →ₗ[𝕜] W →ₗ[𝕜] 𝕜\ninst✝ : CompleteSpace E\nhe : Continuous ↑e\nhL : Continuous fun p => ↑(↑L p.fst) p.snd\nf g : V → E\nhf : Integrable f\nhg : Integrable g\nw : W\n⊢ Integrable fun v => ↑(↑e (↑Multiplicative.ofAdd (-↑(↑L v) w))) • g v\n[PROOFSTEP]\nexact (fourier_integral_convergent_iff he hL w).mp hg\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁴ : CommRing 𝕜\nV : Type u_2\ninst✝¹³ : AddCommGroup V\ninst✝¹² : Module 𝕜 V\ninst✝¹¹ : MeasurableSpace V\nW : Type u_3\ninst✝¹⁰ : AddCommGroup W\ninst✝⁹ : Module 𝕜 W\nE : Type u_4\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℂ E\ninst✝⁶ : TopologicalSpace 𝕜\ninst✝⁵ : TopologicalRing 𝕜\ninst✝⁴ : TopologicalSpace V\ninst✝³ : BorelSpace V\ninst✝² : TopologicalSpace W\ne : Multiplicative 𝕜 →* { x // x ∈ 𝕊 }\nμ : Measure V\nL : V →ₗ[𝕜] W →ₗ[𝕜] 𝕜\ninst✝¹ : CompleteSpace E\ninst✝ : TopologicalSpace.FirstCountableTopology W\nhe : Continuous ↑e\nhL : Continuous fun p => ↑(↑L p.fst) p.snd\nf : V → E\nhf : Integrable f\n⊢ Continuous (fourierIntegral e μ L f)\n[PROOFSTEP]\napply continuous_of_dominated\n[GOAL]\ncase hF_meas\n𝕜 : Type u_1\ninst✝¹⁴ : CommRing 𝕜\nV : Type u_2\ninst✝¹³ : AddCommGroup V\ninst✝¹² : Module 𝕜 V\ninst✝¹¹ : MeasurableSpace V\nW : Type u_3\ninst✝¹⁰ : AddCommGroup W\ninst✝⁹ : Module 𝕜 W\nE : Type u_4\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℂ E\ninst✝⁶ : TopologicalSpace 𝕜\ninst✝⁵ : TopologicalRing 𝕜\ninst✝⁴ : TopologicalSpace V\ninst✝³ : BorelSpace V\ninst✝² : TopologicalSpace W\ne : Multiplicative 𝕜 →* { x // x ∈ 𝕊 }\nμ : Measure V\nL : V →ₗ[𝕜] W →ₗ[𝕜] 𝕜\ninst✝¹ : CompleteSpace E\ninst✝ : TopologicalSpace.FirstCountableTopology W\nhe : Continuous ↑e\nhL : Continuous fun p => ↑(↑L p.fst) p.snd\nf : V → E\nhf : Integrable f\n⊢ ∀ (x : W), AEStronglyMeasurable (fun a => ↑(↑e (↑Multiplicative.ofAdd (-↑(↑L a) x))) • f a) μ\n[PROOFSTEP]\nexact fun w => ((fourier_integral_convergent_iff he hL w).mp hf).1\n[GOAL]\ncase h_bound\n𝕜 : Type u_1\ninst✝¹⁴ : CommRing 𝕜\nV : Type u_2\ninst✝¹³ : AddCommGroup V\ninst✝¹² : Module 𝕜 V\ninst✝¹¹ : MeasurableSpace V\nW : Type u_3\ninst✝¹⁰ : AddCommGroup W\ninst✝⁹ : Module 𝕜 W\nE : Type u_4\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℂ E\ninst✝⁶ : TopologicalSpace 𝕜\ninst✝⁵ : TopologicalRing 𝕜\ninst✝⁴ : TopologicalSpace V\ninst✝³ : BorelSpace V\ninst✝² : TopologicalSpace W\ne : Multiplicative 𝕜 →* { x // x ∈ 𝕊 }\nμ : Measure V\nL : V →ₗ[𝕜] W →ₗ[𝕜] 𝕜\ninst✝¹ : CompleteSpace E\ninst✝ : TopologicalSpace.FirstCountableTopology W\nhe : Continuous ↑e\nhL : Continuous fun p => ↑(↑L p.fst) p.snd\nf : V → E\nhf : Integrable f\n⊢ ∀ (x : W), ∀ᵐ (a : V) ∂μ, ‖↑(↑e (↑Multiplicative.ofAdd (-↑(↑L a) x))) • f a‖ ≤ ?bound a\n[PROOFSTEP]\nrefine' fun w => ae_of_all _ fun v => _\n[GOAL]\ncase bound\n𝕜 : Type u_1\ninst✝¹⁴ : CommRing 𝕜\nV : Type u_2\ninst✝¹³ : AddCommGroup V\ninst✝¹² : Module 𝕜 V\ninst✝¹¹ : MeasurableSpace V\nW : Type u_3\ninst✝¹⁰ : AddCommGroup W\ninst✝⁹ : Module 𝕜 W\nE : Type u_4\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℂ E\ninst✝⁶ : TopologicalSpace 𝕜\ninst✝⁵ : TopologicalRing 𝕜\ninst✝⁴ : TopologicalSpace V\ninst✝³ : BorelSpace V\ninst✝² : TopologicalSpace W\ne : Multiplicative 𝕜 →* { x // x ∈ 𝕊 }\nμ : Measure V\nL : V →ₗ[𝕜] W →ₗ[𝕜] 𝕜\ninst✝¹ : CompleteSpace E\ninst✝ : TopologicalSpace.FirstCountableTopology W\nhe : Continuous ↑e\nhL : Continuous fun p => ↑(↑L p.fst) p.snd\nf : V → E\nhf : Integrable f\n⊢ V → ℝ\n[PROOFSTEP]\nexact fun v => ‖f v‖\n[GOAL]\ncase h_bound\n𝕜 : Type u_1\ninst✝¹⁴ : CommRing 𝕜\nV : Type u_2\ninst✝¹³ : AddCommGroup V\ninst✝¹² : Module 𝕜 V\ninst✝¹¹ : MeasurableSpace V\nW : Type u_3\ninst✝¹⁰ : AddCommGroup W\ninst✝⁹ : Module 𝕜 W\nE : Type u_4\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℂ E\ninst✝⁶ : TopologicalSpace 𝕜\ninst✝⁵ : TopologicalRing 𝕜\ninst✝⁴ : TopologicalSpace V\ninst✝³ : BorelSpace V\ninst✝² : TopologicalSpace W\ne : Multiplicative 𝕜 →* { x // x ∈ 𝕊 }\nμ : Measure V\nL : V →ₗ[𝕜] W →ₗ[𝕜] 𝕜\ninst✝¹ : CompleteSpace E\ninst✝ : TopologicalSpace.FirstCountableTopology W\nhe : Continuous ↑e\nhL : Continuous fun p => ↑(↑L p.fst) p.snd\nf : V → E\nhf : Integrable f\nw : W\nv : V\n⊢ ‖↑(↑e (↑Multiplicative.ofAdd (-↑(↑L v) w))) • f v‖ ≤ ‖f v‖\n[PROOFSTEP]\nrw [norm_smul, Complex.norm_eq_abs, abs_coe_circle, one_mul]\n[GOAL]\ncase bound_integrable\n𝕜 : Type u_1\ninst✝¹⁴ : CommRing 𝕜\nV : Type u_2\ninst✝¹³ : AddCommGroup V\ninst✝¹² : Module 𝕜 V\ninst✝¹¹ : MeasurableSpace V\nW : Type u_3\ninst✝¹⁰ : AddCommGroup W\ninst✝⁹ : Module 𝕜 W\nE : Type u_4\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℂ E\ninst✝⁶ : TopologicalSpace 𝕜\ninst✝⁵ : TopologicalRing 𝕜\ninst✝⁴ : TopologicalSpace V\ninst✝³ : BorelSpace V\ninst✝² : TopologicalSpace W\ne : Multiplicative 𝕜 →* { x // x ∈ 𝕊 }\nμ : Measure V\nL : V →ₗ[𝕜] W →ₗ[𝕜] 𝕜\ninst✝¹ : CompleteSpace E\ninst✝ : TopologicalSpace.FirstCountableTopology W\nhe : Continuous ↑e\nhL : Continuous fun p => ↑(↑L p.fst) p.snd\nf : V → E\nhf : Integrable f\n⊢ Integrable fun v => ‖f v‖\n[PROOFSTEP]\nexact hf.norm\n[GOAL]\ncase h_cont\n𝕜 : Type u_1\ninst✝¹⁴ : CommRing 𝕜\nV : Type u_2\ninst✝¹³ : AddCommGroup V\ninst✝¹² : Module 𝕜 V\ninst✝¹¹ : MeasurableSpace V\nW : Type u_3\ninst✝¹⁰ : AddCommGroup W\ninst✝⁹ : Module 𝕜 W\nE : Type u_4\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℂ E\ninst✝⁶ : TopologicalSpace 𝕜\ninst✝⁵ : TopologicalRing 𝕜\ninst✝⁴ : TopologicalSpace V\ninst✝³ : BorelSpace V\ninst✝² : TopologicalSpace W\ne : Multiplicative 𝕜 →* { x // x ∈ 𝕊 }\nμ : Measure V\nL : V →ₗ[𝕜] W →ₗ[𝕜] 𝕜\ninst✝¹ : CompleteSpace E\ninst✝ : TopologicalSpace.FirstCountableTopology W\nhe : Continuous ↑e\nhL : Continuous fun p => ↑(↑L p.fst) p.snd\nf : V → E\nhf : Integrable f\n⊢ ∀ᵐ (a : V) ∂μ, Continuous fun x => ↑(↑e (↑Multiplicative.ofAdd (-↑(↑L a) x))) • f a\n[PROOFSTEP]\nrw [continuous_induced_rng] at he \n[GOAL]\ncase h_cont\n𝕜 : Type u_1\ninst✝¹⁴ : CommRing 𝕜\nV : Type u_2\ninst✝¹³ : AddCommGroup V\ninst✝¹² : Module 𝕜 V\ninst✝¹¹ : MeasurableSpace V\nW : Type u_3\ninst✝¹⁰ : AddCommGroup W\ninst✝⁹ : Module 𝕜 W\nE : Type u_4\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℂ E\ninst✝⁶ : TopologicalSpace 𝕜\ninst✝⁵ : TopologicalRing 𝕜\ninst✝⁴ : TopologicalSpace V\ninst✝³ : BorelSpace V\ninst✝² : TopologicalSpace W\ne : Multiplicative 𝕜 →* { x // x ∈ 𝕊 }\nμ : Measure V\nL : V →ₗ[𝕜] W →ₗ[𝕜] 𝕜\ninst✝¹ : CompleteSpace E\ninst✝ : TopologicalSpace.FirstCountableTopology W\nhe : Continuous (Subtype.val ∘ ↑e)\nhL : Continuous fun p => ↑(↑L p.fst) p.snd\nf : V → E\nhf : Integrable f\n⊢ ∀ᵐ (a : V) ∂μ, Continuous fun x => ↑(↑e (↑Multiplicative.ofAdd (-↑(↑L a) x))) • f a\n[PROOFSTEP]\nrefine' ae_of_all _ fun v => (he.comp (continuous_ofAdd.comp _)).smul continuous_const\n[GOAL]\ncase h_cont\n𝕜 : Type u_1\ninst✝¹⁴ : CommRing 𝕜\nV : Type u_2\ninst✝¹³ : AddCommGroup V\ninst✝¹² : Module 𝕜 V\ninst✝¹¹ : MeasurableSpace V\nW : Type u_3\ninst✝¹⁰ : AddCommGroup W\ninst✝⁹ : Module 𝕜 W\nE : Type u_4\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℂ E\ninst✝⁶ : TopologicalSpace 𝕜\ninst✝⁵ : TopologicalRing 𝕜\ninst✝⁴ : TopologicalSpace V\ninst✝³ : BorelSpace V\ninst✝² : TopologicalSpace W\ne : Multiplicative 𝕜 →* { x // x ∈ 𝕊 }\nμ : Measure V\nL : V →ₗ[𝕜] W →ₗ[𝕜] 𝕜\ninst✝¹ : CompleteSpace E\ninst✝ : TopologicalSpace.FirstCountableTopology W\nhe : Continuous (Subtype.val ∘ ↑e)\nhL : Continuous fun p => ↑(↑L p.fst) p.snd\nf : V → E\nhf : Integrable f\nv : V\n⊢ Continuous fun x => -↑(↑L v) x\n[PROOFSTEP]\nrefine' (hL.comp (continuous_prod_mk.mpr ⟨continuous_const, continuous_id⟩)).neg\n[GOAL]\n⊢ (fun z => ↑expMapCircle (2 * π * ↑Multiplicative.toAdd z)) 1 = 1\n[PROOFSTEP]\nsimp only\n[GOAL]\n⊢ ↑expMapCircle (2 * π * ↑Multiplicative.toAdd 1) = 1\n[PROOFSTEP]\nrw [toAdd_one, mul_zero, expMapCircle_zero]\n[GOAL]\nx y : Multiplicative ℝ\n⊢ OneHom.toFun\n      { toFun := fun z => ↑expMapCircle (2 * π * ↑Multiplicative.toAdd z),\n        map_one' := (_ : (fun z => ↑expMapCircle (2 * π * ↑Multiplicative.toAdd z)) 1 = 1) }\n      (x * y) =\n    OneHom.toFun\n        { toFun := fun z => ↑expMapCircle (2 * π * ↑Multiplicative.toAdd z),\n          map_one' := (_ : (fun z => ↑expMapCircle (2 * π * ↑Multiplicative.toAdd z)) 1 = 1) }\n        x *\n      OneHom.toFun\n        { toFun := fun z => ↑expMapCircle (2 * π * ↑Multiplicative.toAdd z),\n          map_one' := (_ : (fun z => ↑expMapCircle (2 * π * ↑Multiplicative.toAdd z)) 1 = 1) }\n        y\n[PROOFSTEP]\nsimp only\n[GOAL]\nx y : Multiplicative ℝ\n⊢ ↑expMapCircle (2 * π * ↑Multiplicative.toAdd (x * y)) =\n    ↑expMapCircle (2 * π * ↑Multiplicative.toAdd x) * ↑expMapCircle (2 * π * ↑Multiplicative.toAdd y)\n[PROOFSTEP]\nrw [toAdd_mul, mul_add, expMapCircle_add]\n[GOAL]\nx : ℝ\n⊢ ↑(↑fourierChar (↑Multiplicative.ofAdd x)) = Complex.exp (↑(2 * π * x) * Complex.I)\n[PROOFSTEP]\nrfl\n[GOAL]\nE : Type u_1\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace ℂ E\nV : Type u_2\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module ℝ V\ninst✝² : MeasurableSpace V\nW : Type u_3\ninst✝¹ : AddCommGroup W\ninst✝ : Module ℝ W\nL : V →ₗ[ℝ] W →ₗ[ℝ] ℝ\nμ : Measure V\nf : V → E\nw : W\n⊢ VectorFourier.fourierIntegral fourierChar μ L f w =\n    ∫ (v : V), Complex.exp (↑(-2 * π * ↑(↑L v) w) * Complex.I) • f v ∂μ\n[PROOFSTEP]\nsimp_rw [VectorFourier.fourierIntegral, Real.fourierChar_apply, mul_neg, neg_mul]\n[GOAL]\nE✝ : Type u_1\ninst✝³ : NormedAddCommGroup E✝\ninst✝² : NormedSpace ℂ E✝\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nf : ℝ → E\nw : ℝ\n⊢ 𝓕 f w = ∫ (v : ℝ), Complex.exp (↑(-2 * π * v * w) * Complex.I) • f v\n[PROOFSTEP]\nsimp_rw [fourierIntegral_def, Real.fourierChar_apply, mul_neg, neg_mul, mul_assoc]\n", "meta": {"mathlib_filename": "Mathlib.Analysis.Fourier.FourierTransform", "llama_tokens": 16666, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8267117940706733, "lm_q2_score": 0.6261241842048092, "lm_q1q2_score": 0.5176242476349945}}
{"text": "[GOAL]\nn : ℕ\n⊢ ack 0 n = n + 1\n[PROOFSTEP]\nrw [ack]\n[GOAL]\nm : ℕ\n⊢ ack (m + 1) 0 = ack m 1\n[PROOFSTEP]\nrw [ack]\n[GOAL]\nm n : ℕ\n⊢ ack (m + 1) (n + 1) = ack m (ack (m + 1) n)\n[PROOFSTEP]\nrw [ack]\n[GOAL]\nn : ℕ\n⊢ ack 1 n = n + 2\n[PROOFSTEP]\ninduction' n with n IH\n[GOAL]\ncase zero\n⊢ ack 1 zero = zero + 2\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ\nn : ℕ\nIH : ack 1 n = n + 2\n⊢ ack 1 (succ n) = succ n + 2\n[PROOFSTEP]\nsimp [IH]\n[GOAL]\nn : ℕ\n⊢ ack 2 n = 2 * n + 3\n[PROOFSTEP]\ninduction' n with n IH\n[GOAL]\ncase zero\n⊢ ack 2 zero = 2 * zero + 3\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ\nn : ℕ\nIH : ack 2 n = 2 * n + 3\n⊢ ack 2 (succ n) = 2 * succ n + 3\n[PROOFSTEP]\nsimpa [mul_succ]\n[GOAL]\nn : ℕ\n⊢ ack 3 n = 2 ^ (n + 3) - 3\n[PROOFSTEP]\ninduction' n with n IH\n[GOAL]\ncase zero\n⊢ ack 3 zero = 2 ^ (zero + 3) - 3\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ\nn : ℕ\nIH : ack 3 n = 2 ^ (n + 3) - 3\n⊢ ack 3 (succ n) = 2 ^ (succ n + 3) - 3\n[PROOFSTEP]\nrw [ack_succ_succ, IH, ack_two, Nat.succ_add, Nat.pow_succ 2 (n + 3), mul_comm _ 2, Nat.mul_sub_left_distrib, ←\n  Nat.sub_add_comm, two_mul 3, Nat.add_sub_add_right]\n[GOAL]\ncase succ\nn : ℕ\nIH : ack 3 n = 2 ^ (n + 3) - 3\n⊢ 2 * 3 ≤ 2 * 2 ^ (n + 3)\n[PROOFSTEP]\nhave H : 2 * 3 ≤ 2 * 2 ^ 3 := by norm_num\n[GOAL]\nn : ℕ\nIH : ack 3 n = 2 ^ (n + 3) - 3\n⊢ 2 * 3 ≤ 2 * 2 ^ 3\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase succ\nn : ℕ\nIH : ack 3 n = 2 ^ (n + 3) - 3\nH : 2 * 3 ≤ 2 * 2 ^ 3\n⊢ 2 * 3 ≤ 2 * 2 ^ (n + 3)\n[PROOFSTEP]\napply H.trans\n[GOAL]\ncase succ\nn : ℕ\nIH : ack 3 n = 2 ^ (n + 3) - 3\nH : 2 * 3 ≤ 2 * 2 ^ 3\n⊢ 2 * 2 ^ 3 ≤ 2 * 2 ^ (n + 3)\n[PROOFSTEP]\nsimp [pow_le_pow]\n[GOAL]\nn : ℕ\n⊢ 0 < ack 0 n\n[PROOFSTEP]\nsimp\n[GOAL]\nm : ℕ\n⊢ 0 < ack (m + 1) 0\n[PROOFSTEP]\nrw [ack_succ_zero]\n[GOAL]\nm : ℕ\n⊢ 0 < ack m 1\n[PROOFSTEP]\napply ack_pos\n[GOAL]\nm n : ℕ\n⊢ 0 < ack (m + 1) (n + 1)\n[PROOFSTEP]\nrw [ack_succ_succ]\n[GOAL]\nm n : ℕ\n⊢ 0 < ack m (ack (m + 1) n)\n[PROOFSTEP]\napply ack_pos\n[GOAL]\nn : ℕ\n⊢ 1 < ack (0 + 1) n\n[PROOFSTEP]\nsimp\n[GOAL]\nm : ℕ\n⊢ 1 < ack (m + 1 + 1) 0\n[PROOFSTEP]\nrw [ack_succ_zero]\n[GOAL]\nm : ℕ\n⊢ 1 < ack (m + 1) 1\n[PROOFSTEP]\napply one_lt_ack_succ_left\n[GOAL]\nm n : ℕ\n⊢ 1 < ack (m + 1 + 1) (n + 1)\n[PROOFSTEP]\nrw [ack_succ_succ]\n[GOAL]\nm n : ℕ\n⊢ 1 < ack (m + 1) (ack (m + 1 + 1) n)\n[PROOFSTEP]\napply one_lt_ack_succ_left\n[GOAL]\nn : ℕ\n⊢ 1 < ack 0 (n + 1)\n[PROOFSTEP]\nsimp\n[GOAL]\nm n : ℕ\n⊢ 1 < ack (m + 1) (n + 1)\n[PROOFSTEP]\nrw [ack_succ_succ]\n[GOAL]\nm n : ℕ\n⊢ 1 < ack m (ack (m + 1) n)\n[PROOFSTEP]\ncases' exists_eq_succ_of_ne_zero (ack_pos (m + 1) n).ne' with h h\n[GOAL]\ncase intro\nm n h✝ : ℕ\nh : ack (m + 1) n = succ h✝\n⊢ 1 < ack m (ack (m + 1) n)\n[PROOFSTEP]\nrw [h]\n[GOAL]\ncase intro\nm n h✝ : ℕ\nh : ack (m + 1) n = succ h✝\n⊢ 1 < ack m (succ h✝)\n[PROOFSTEP]\napply one_lt_ack_succ_right\n[GOAL]\nn₁ n₂ : ℕ\nh : n₁ < n₂\n⊢ ack 0 n₁ < ack 0 n₂\n[PROOFSTEP]\nsimpa using h\n[GOAL]\nm n : ℕ\n_h : 0 < n + 1\n⊢ ack (m + 1) 0 < ack (m + 1) (n + 1)\n[PROOFSTEP]\nrw [ack_succ_zero, ack_succ_succ]\n[GOAL]\nm n : ℕ\n_h : 0 < n + 1\n⊢ ack m 1 < ack m (ack (m + 1) n)\n[PROOFSTEP]\nexact ack_strictMono_right _ (one_lt_ack_succ_left m n)\n[GOAL]\nm n₁ n₂ : ℕ\nh : n₁ + 1 < n₂ + 1\n⊢ ack (m + 1) (n₁ + 1) < ack (m + 1) (n₂ + 1)\n[PROOFSTEP]\nrw [ack_succ_succ, ack_succ_succ]\n[GOAL]\nm n₁ n₂ : ℕ\nh : n₁ + 1 < n₂ + 1\n⊢ ack m (ack (m + 1) n₁) < ack m (ack (m + 1) n₂)\n[PROOFSTEP]\napply ack_strictMono_right _ (ack_strictMono_right _ _)\n[GOAL]\nm n₁ n₂ : ℕ\nh : n₁ + 1 < n₂ + 1\n⊢ n₁ < n₂\n[PROOFSTEP]\nrwa [add_lt_add_iff_right] at h \n[GOAL]\nn : ℕ\n⊢ 0 + n < ack 0 n\n[PROOFSTEP]\nsimp\n[GOAL]\nm : ℕ\n⊢ m + 1 + 0 < ack (m + 1) 0\n[PROOFSTEP]\nsimpa using add_lt_ack m 1\n[GOAL]\nm n : ℕ\n⊢ m + 1 + n + 1 ≤ m + (m + n + 2)\n[PROOFSTEP]\nlinarith\n[GOAL]\nm n : ℕ\n⊢ m + n + 2 = succ (m + 1 + n)\n[PROOFSTEP]\nrw [succ_eq_add_one]\n[GOAL]\nm n : ℕ\n⊢ m + n + 2 = m + 1 + n + 1\n[PROOFSTEP]\nring_nf\n[GOAL]\nm : ℕ\n_h : 0 < m + 1\n⊢ ack 0 0 < ack (m + 1) 0\n[PROOFSTEP]\nsimpa using one_lt_ack_succ_right m 0\n[GOAL]\nm n : ℕ\nh : 0 < m + 1\n⊢ ack 0 (n + 1) < ack (m + 1) (n + 1)\n[PROOFSTEP]\nrw [ack_zero, ack_succ_succ]\n[GOAL]\nm n : ℕ\nh : 0 < m + 1\n⊢ n + 1 + 1 < ack m (ack (m + 1) n)\n[PROOFSTEP]\napply lt_of_le_of_lt (le_trans _ <| add_le_add_left (add_add_one_le_ack _ _) m) (add_lt_ack _ _)\n[GOAL]\nm n : ℕ\nh : 0 < m + 1\n⊢ n + 1 + 1 ≤ m + (m + 1 + n + 1)\n[PROOFSTEP]\nlinarith\n[GOAL]\nm₁ m₂ : ℕ\nh : m₁ + 1 < m₂ + 1\n⊢ ack (m₁ + 1) 0 < ack (m₂ + 1) 0\n[PROOFSTEP]\nsimpa using ack_strict_mono_left' 1 ((add_lt_add_iff_right 1).1 h)\n[GOAL]\nm₁ m₂ n : ℕ\nh : m₁ + 1 < m₂ + 1\n⊢ ack (m₁ + 1) (n + 1) < ack (m₂ + 1) (n + 1)\n[PROOFSTEP]\nrw [ack_succ_succ, ack_succ_succ]\n[GOAL]\nm₁ m₂ n : ℕ\nh : m₁ + 1 < m₂ + 1\n⊢ ack m₁ (ack (m₁ + 1) n) < ack m₂ (ack (m₂ + 1) n)\n[PROOFSTEP]\nexact\n  (ack_strict_mono_left' _ <| (add_lt_add_iff_right 1).1 h).trans (ack_strictMono_right _ <| ack_strict_mono_left' n h)\n[GOAL]\nm n : ℕ\n⊢ ack m (n + 1) ≤ ack (m + 1) n\n[PROOFSTEP]\ncases' n with n n\n[GOAL]\ncase zero\nm : ℕ\n⊢ ack m (zero + 1) ≤ ack (m + 1) zero\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\nm n : ℕ\n⊢ ack m (succ n + 1) ≤ ack (m + 1) (succ n)\n[PROOFSTEP]\nrw [ack_succ_succ, succ_eq_add_one]\n[GOAL]\ncase succ\nm n : ℕ\n⊢ ack m (n + 1 + 1) ≤ ack m (ack (m + 1) n)\n[PROOFSTEP]\napply ack_mono_right m (le_trans _ <| add_add_one_le_ack _ n)\n[GOAL]\nm n : ℕ\n⊢ n + 1 + 1 ≤ m + 1 + n + 1\n[PROOFSTEP]\nlinarith\n[GOAL]\nn : ℕ\n⊢ n ^ 2 ≤ 2 ^ (n + 1) - 3\n[PROOFSTEP]\ninduction' n with k hk\n[GOAL]\ncase zero\n⊢ zero ^ 2 ≤ 2 ^ (zero + 1) - 3\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase succ\nk : ℕ\nhk : k ^ 2 ≤ 2 ^ (k + 1) - 3\n⊢ succ k ^ 2 ≤ 2 ^ (succ k + 1) - 3\n[PROOFSTEP]\ncases' k with k k\n[GOAL]\ncase succ.zero\nhk : zero ^ 2 ≤ 2 ^ (zero + 1) - 3\n⊢ succ zero ^ 2 ≤ 2 ^ (succ zero + 1) - 3\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase succ.succ\nk : ℕ\nhk : succ k ^ 2 ≤ 2 ^ (succ k + 1) - 3\n⊢ succ (succ k) ^ 2 ≤ 2 ^ (succ (succ k) + 1) - 3\n[PROOFSTEP]\nrw [succ_eq_add_one, add_sq, Nat.pow_succ 2, mul_comm _ 2, two_mul (2 ^ _), add_tsub_assoc_of_le, add_comm (2 ^ _),\n  add_assoc]\n[GOAL]\ncase succ.succ\nk : ℕ\nhk : succ k ^ 2 ≤ 2 ^ (succ k + 1) - 3\n⊢ (k + 1) ^ 2 + (2 * (k + 1) * 1 + 1 ^ 2) ≤ 2 ^ (k + 2) - 3 + 2 ^ (k + 2)\n[PROOFSTEP]\napply Nat.add_le_add hk\n[GOAL]\ncase succ.succ\nk : ℕ\nhk : succ k ^ 2 ≤ 2 ^ (succ k + 1) - 3\n⊢ 2 * (k + 1) * 1 + 1 ^ 2 ≤ 2 ^ (k + 2)\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase succ.succ\nk : ℕ\nhk : succ k ^ 2 ≤ 2 ^ (succ k + 1) - 3\n⊢ 2 * (k + 1) + 1 ≤ 2 ^ (k + 2)\n[PROOFSTEP]\napply succ_le_of_lt\n[GOAL]\ncase succ.succ.h\nk : ℕ\nhk : succ k ^ 2 ≤ 2 ^ (succ k + 1) - 3\n⊢ 2 * (k + 1) < 2 ^ (k + 2)\n[PROOFSTEP]\nrw [Nat.pow_succ, mul_comm _ 2, mul_lt_mul_left (zero_lt_two' ℕ)]\n[GOAL]\ncase succ.succ.h\nk : ℕ\nhk : succ k ^ 2 ≤ 2 ^ (succ k + 1) - 3\n⊢ k + 1 < 2 ^ (k + 1)\n[PROOFSTEP]\napply lt_two_pow\n[GOAL]\ncase succ.succ.h\nk : ℕ\nhk : succ k ^ 2 ≤ 2 ^ (succ k + 1) - 3\n⊢ 3 ≤ 2 ^ (k + 2)\n[PROOFSTEP]\nrw [Nat.pow_succ, Nat.pow_succ]\n[GOAL]\ncase succ.succ.h\nk : ℕ\nhk : succ k ^ 2 ≤ 2 ^ (succ k + 1) - 3\n⊢ 3 ≤ 2 ^ k * 2 * 2\n[PROOFSTEP]\nlinarith [one_le_pow k 2 zero_lt_two]\n[GOAL]\nn : ℕ\n⊢ (ack 0 n + 1) ^ 2 ≤ ack (0 + 3) n\n[PROOFSTEP]\nsimpa using sq_le_two_pow_add_one_minus_three (n + 2)\n[GOAL]\nm : ℕ\n⊢ (ack (m + 1) 0 + 1) ^ 2 ≤ ack (m + 1 + 3) 0\n[PROOFSTEP]\nrw [ack_succ_zero, ack_succ_zero]\n[GOAL]\nm : ℕ\n⊢ (ack m 1 + 1) ^ 2 ≤ ack (m + 3) 1\n[PROOFSTEP]\napply ack_add_one_sq_lt_ack_add_three\n[GOAL]\nm n : ℕ\n⊢ (ack (m + 1) (n + 1) + 1) ^ 2 ≤ ack (m + 1 + 3) (n + 1)\n[PROOFSTEP]\nrw [ack_succ_succ, ack_succ_succ]\n[GOAL]\nm n : ℕ\n⊢ (ack m (ack (m + 1) n) + 1) ^ 2 ≤ ack (m + 3) (ack (m + 3 + 1) n)\n[PROOFSTEP]\napply (ack_add_one_sq_lt_ack_add_three _ _).trans (ack_mono_right _ <| ack_mono_left _ _)\n[GOAL]\nm n : ℕ\n⊢ m + 1 ≤ m + 3 + 1\n[PROOFSTEP]\nlinarith\n[GOAL]\nm n : ℕ\n⊢ m ≤ m + 2\n[PROOFSTEP]\nlinarith\n[GOAL]\nf : ℕ → ℕ\nhf : Nat.Primrec f\n⊢ ∃ m, ∀ (n : ℕ), f n < ack m n\n[PROOFSTEP]\ninduction' hf with f g hf hg IHf IHg f g hf hg IHf IHg f g hf hg IHf IHg\n[GOAL]\ncase zero\nf : ℕ → ℕ\n⊢ ∃ m, ∀ (n : ℕ), (fun x => 0) n < ack m n\n[PROOFSTEP]\nexact\n  ⟨0, ack_pos 0⟩\n    -- Successor function:\n[GOAL]\ncase succ\nf : ℕ → ℕ\n⊢ ∃ m, ∀ (n : ℕ), succ n < ack m n\n[PROOFSTEP]\nrefine' ⟨1, fun n => _⟩\n[GOAL]\ncase succ\nf : ℕ → ℕ\nn : ℕ\n⊢ succ n < ack 1 n\n[PROOFSTEP]\nrw [succ_eq_one_add]\n[GOAL]\ncase succ\nf : ℕ → ℕ\nn : ℕ\n⊢ 1 + n < ack 1 n\n[PROOFSTEP]\napply add_lt_ack\n[GOAL]\ncase left\nf : ℕ → ℕ\n⊢ ∃ m, ∀ (n : ℕ), (fun n => (unpair n).fst) n < ack m n\n[PROOFSTEP]\nrefine' ⟨0, fun n => _⟩\n[GOAL]\ncase left\nf : ℕ → ℕ\nn : ℕ\n⊢ (fun n => (unpair n).fst) n < ack 0 n\n[PROOFSTEP]\nrw [ack_zero, lt_succ_iff]\n[GOAL]\ncase left\nf : ℕ → ℕ\nn : ℕ\n⊢ (fun n => (unpair n).fst) n ≤ n\n[PROOFSTEP]\nexact unpair_left_le n\n[GOAL]\ncase right\nf : ℕ → ℕ\n⊢ ∃ m, ∀ (n : ℕ), (fun n => (unpair n).snd) n < ack m n\n[PROOFSTEP]\nrefine' ⟨0, fun n => _⟩\n[GOAL]\ncase right\nf : ℕ → ℕ\nn : ℕ\n⊢ (fun n => (unpair n).snd) n < ack 0 n\n[PROOFSTEP]\nrw [ack_zero, lt_succ_iff]\n[GOAL]\ncase right\nf : ℕ → ℕ\nn : ℕ\n⊢ (fun n => (unpair n).snd) n ≤ n\n[PROOFSTEP]\nexact unpair_right_le n\n[GOAL]\ncase pair\nf✝ f g : ℕ → ℕ\nhf : Nat.Primrec f\nhg : Nat.Primrec g\nIHf : ∃ m, ∀ (n : ℕ), f n < ack m n\nIHg : ∃ m, ∀ (n : ℕ), g n < ack m n\n⊢ ∃ m, ∀ (n : ℕ), (fun n => pair (f n) (g n)) n < ack m n\ncase comp\nf✝ f g : ℕ → ℕ\nhf : Nat.Primrec f\nhg : Nat.Primrec g\nIHf : ∃ m, ∀ (n : ℕ), f n < ack m n\nIHg : ∃ m, ∀ (n : ℕ), g n < ack m n\n⊢ ∃ m, ∀ (n : ℕ), (fun n => f (g n)) n < ack m n\ncase prec\nf✝ f g : ℕ → ℕ\nhf : Nat.Primrec f\nhg : Nat.Primrec g\nIHf : ∃ m, ∀ (n : ℕ), f n < ack m n\nIHg : ∃ m, ∀ (n : ℕ), g n < ack m n\n⊢ ∃ m, ∀ (n : ℕ), unpaired (fun z n => rec (f z) (fun y IH => g (pair z (pair y IH))) n) n < ack m n\n[PROOFSTEP]\nall_goals cases' IHf with a ha; cases' IHg with b hb\n[GOAL]\ncase pair\nf✝ f g : ℕ → ℕ\nhf : Nat.Primrec f\nhg : Nat.Primrec g\nIHf : ∃ m, ∀ (n : ℕ), f n < ack m n\nIHg : ∃ m, ∀ (n : ℕ), g n < ack m n\n⊢ ∃ m, ∀ (n : ℕ), (fun n => pair (f n) (g n)) n < ack m n\n[PROOFSTEP]\ncases' IHf with a ha\n[GOAL]\ncase pair.intro\nf✝ f g : ℕ → ℕ\nhf : Nat.Primrec f\nhg : Nat.Primrec g\nIHg : ∃ m, ∀ (n : ℕ), g n < ack m n\na : ℕ\nha : ∀ (n : ℕ), f n < ack a n\n⊢ ∃ m, ∀ (n : ℕ), (fun n => pair (f n) (g n)) n < ack m n\n[PROOFSTEP]\ncases' IHg with b hb\n[GOAL]\ncase comp\nf✝ f g : ℕ → ℕ\nhf : Nat.Primrec f\nhg : Nat.Primrec g\nIHf : ∃ m, ∀ (n : ℕ), f n < ack m n\nIHg : ∃ m, ∀ (n : ℕ), g n < ack m n\n⊢ ∃ m, ∀ (n : ℕ), (fun n => f (g n)) n < ack m n\n[PROOFSTEP]\ncases' IHf with a ha\n[GOAL]\ncase comp.intro\nf✝ f g : ℕ → ℕ\nhf : Nat.Primrec f\nhg : Nat.Primrec g\nIHg : ∃ m, ∀ (n : ℕ), g n < ack m n\na : ℕ\nha : ∀ (n : ℕ), f n < ack a n\n⊢ ∃ m, ∀ (n : ℕ), (fun n => f (g n)) n < ack m n\n[PROOFSTEP]\ncases' IHg with b hb\n[GOAL]\ncase prec\nf✝ f g : ℕ → ℕ\nhf : Nat.Primrec f\nhg : Nat.Primrec g\nIHf : ∃ m, ∀ (n : ℕ), f n < ack m n\nIHg : ∃ m, ∀ (n : ℕ), g n < ack m n\n⊢ ∃ m, ∀ (n : ℕ), unpaired (fun z n => rec (f z) (fun y IH => g (pair z (pair y IH))) n) n < ack m n\n[PROOFSTEP]\ncases' IHf with a ha\n[GOAL]\ncase prec.intro\nf✝ f g : ℕ → ℕ\nhf : Nat.Primrec f\nhg : Nat.Primrec g\nIHg : ∃ m, ∀ (n : ℕ), g n < ack m n\na : ℕ\nha : ∀ (n : ℕ), f n < ack a n\n⊢ ∃ m, ∀ (n : ℕ), unpaired (fun z n => rec (f z) (fun y IH => g (pair z (pair y IH))) n) n < ack m n\n[PROOFSTEP]\ncases' IHg with b hb\n[GOAL]\ncase pair.intro.intro\nf✝ f g : ℕ → ℕ\nhf : Nat.Primrec f\nhg : Nat.Primrec g\na : ℕ\nha : ∀ (n : ℕ), f n < ack a n\nb : ℕ\nhb : ∀ (n : ℕ), g n < ack b n\n⊢ ∃ m, ∀ (n : ℕ), (fun n => pair (f n) (g n)) n < ack m n\n[PROOFSTEP]\nrefine'\n  ⟨max a b + 3, fun n =>\n    (pair_lt_max_add_one_sq _ _).trans_le <|\n      (pow_le_pow_of_le_left (add_le_add_right _ _) 2).trans <| ack_add_one_sq_lt_ack_add_three _ _⟩\n[GOAL]\ncase pair.intro.intro\nf✝ f g : ℕ → ℕ\nhf : Nat.Primrec f\nhg : Nat.Primrec g\na : ℕ\nha : ∀ (n : ℕ), f n < ack a n\nb : ℕ\nhb : ∀ (n : ℕ), g n < ack b n\nn : ℕ\n⊢ max (f n) (g n) ≤ ack (max a b) n\n[PROOFSTEP]\nrw [max_ack_left]\n[GOAL]\ncase pair.intro.intro\nf✝ f g : ℕ → ℕ\nhf : Nat.Primrec f\nhg : Nat.Primrec g\na : ℕ\nha : ∀ (n : ℕ), f n < ack a n\nb : ℕ\nhb : ∀ (n : ℕ), g n < ack b n\nn : ℕ\n⊢ max (f n) (g n) ≤ max (ack a n) (ack b n)\n[PROOFSTEP]\nexact max_le_max (ha n).le (hb n).le\n[GOAL]\ncase comp.intro.intro\nf✝ f g : ℕ → ℕ\nhf : Nat.Primrec f\nhg : Nat.Primrec g\na : ℕ\nha : ∀ (n : ℕ), f n < ack a n\nb : ℕ\nhb : ∀ (n : ℕ), g n < ack b n\n⊢ ∃ m, ∀ (n : ℕ), (fun n => f (g n)) n < ack m n\n[PROOFSTEP]\nexact\n  ⟨max a b + 2, fun n => (ha _).trans <| (ack_strictMono_right a <| hb n).trans <| ack_ack_lt_ack_max_add_two a b n⟩\n    -- Primitive recursion operator:\n[GOAL]\ncase prec.intro.intro\nf✝ f g : ℕ → ℕ\nhf : Nat.Primrec f\nhg : Nat.Primrec g\na : ℕ\nha : ∀ (n : ℕ), f n < ack a n\nb : ℕ\nhb : ∀ (n : ℕ), g n < ack b n\n⊢ ∃ m, ∀ (n : ℕ), unpaired (fun z n => rec (f z) (fun y IH => g (pair z (pair y IH))) n) n < ack m n\n[PROOFSTEP]\nhave : ∀ {m n}, rec (f m) (fun y IH => g <| pair m <| pair y IH) n < ack (max a b + 9) (m + n) :=\n  by\n  intro m n\n  induction' n with n IH\n  · apply (ha m).trans (ack_strictMono_left m <| (le_max_left a b).trans_lt _)\n    linarith\n  ·\n    -- We get rid of the first `pair`.\n    simp only [ge_iff_le]\n    apply\n      (hb _).trans\n        ((ack_pair_lt _ _ _).trans_le _)\n          -- If m is the maximum, we get a very weak inequality.\n    cases' lt_or_le _ m with h₁ h₁\n    · rw [max_eq_left h₁.le]\n      exact ack_le_ack (Nat.add_le_add (le_max_right a b) <| by norm_num) (self_le_add_right m _)\n    rw [max_eq_right h₁]\n      -- We get rid of the second `pair`.\n    apply (ack_pair_lt _ _ _).le.trans\n    cases' lt_or_le _ n with h₂ h₂\n    · rw [max_eq_left h₂.le, add_assoc]\n      exact ack_le_ack (Nat.add_le_add (le_max_right a b) <| by norm_num) ((le_succ n).trans <| self_le_add_left _ _)\n    rw [max_eq_right h₂]\n      -- We now use the inductive hypothesis, and some simple algebraic manipulation.\n    apply (ack_strictMono_right _ IH).le.trans\n    rw [add_succ m, add_succ _ 8, succ_eq_add_one, succ_eq_add_one, ack_succ_succ (_ + 8), add_assoc]\n    exact\n      ack_mono_left _\n        (Nat.add_le_add (le_max_right a b) le_rfl)\n          -- The proof is now simple.\n[GOAL]\nf✝ f g : ℕ → ℕ\nhf : Nat.Primrec f\nhg : Nat.Primrec g\na : ℕ\nha : ∀ (n : ℕ), f n < ack a n\nb : ℕ\nhb : ∀ (n : ℕ), g n < ack b n\n⊢ ∀ {m n : ℕ}, rec (f m) (fun y IH => g (pair m (pair y IH))) n < ack (max a b + 9) (m + n)\n[PROOFSTEP]\nintro m n\n[GOAL]\nf✝ f g : ℕ → ℕ\nhf : Nat.Primrec f\nhg : Nat.Primrec g\na : ℕ\nha : ∀ (n : ℕ), f n < ack a n\nb : ℕ\nhb : ∀ (n : ℕ), g n < ack b n\nm n : ℕ\n⊢ rec (f m) (fun y IH => g (pair m (pair y IH))) n < ack (max a b + 9) (m + n)\n[PROOFSTEP]\ninduction' n with n IH\n[GOAL]\ncase zero\nf✝ f g : ℕ → ℕ\nhf : Nat.Primrec f\nhg : Nat.Primrec g\na : ℕ\nha : ∀ (n : ℕ), f n < ack a n\nb : ℕ\nhb : ∀ (n : ℕ), g n < ack b n\nm : ℕ\n⊢ rec (f m) (fun y IH => g (pair m (pair y IH))) zero < ack (max a b + 9) (m + zero)\n[PROOFSTEP]\napply (ha m).trans (ack_strictMono_left m <| (le_max_left a b).trans_lt _)\n[GOAL]\nf✝ f g : ℕ → ℕ\nhf : Nat.Primrec f\nhg : Nat.Primrec g\na : ℕ\nha : ∀ (n : ℕ), f n < ack a n\nb : ℕ\nhb : ∀ (n : ℕ), g n < ack b n\nm : ℕ\n⊢ max a b < max a b + 9\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase succ\nf✝ f g : ℕ → ℕ\nhf : Nat.Primrec f\nhg : Nat.Primrec g\na : ℕ\nha : ∀ (n : ℕ), f n < ack a n\nb : ℕ\nhb : ∀ (n : ℕ), g n < ack b n\nm n : ℕ\nIH : rec (f m) (fun y IH => g (pair m (pair y IH))) n < ack (max a b + 9) (m + n)\n⊢ rec (f m) (fun y IH => g (pair m (pair y IH))) (succ n) < ack (max a b + 9) (m + succ n)\n[PROOFSTEP]\nsimp only [ge_iff_le]\n[GOAL]\ncase succ\nf✝ f g : ℕ → ℕ\nhf : Nat.Primrec f\nhg : Nat.Primrec g\na : ℕ\nha : ∀ (n : ℕ), f n < ack a n\nb : ℕ\nhb : ∀ (n : ℕ), g n < ack b n\nm n : ℕ\nIH : rec (f m) (fun y IH => g (pair m (pair y IH))) n < ack (max a b + 9) (m + n)\n⊢ g (pair m (pair n (rec (f m) (fun y IH => g (pair m (pair y IH))) n))) < ack (max a b + 9) (m + succ n)\n[PROOFSTEP]\napply\n  (hb _).trans\n    ((ack_pair_lt _ _ _).trans_le _)\n      -- If m is the maximum, we get a very weak inequality.\n[GOAL]\nf✝ f g : ℕ → ℕ\nhf : Nat.Primrec f\nhg : Nat.Primrec g\na : ℕ\nha : ∀ (n : ℕ), f n < ack a n\nb : ℕ\nhb : ∀ (n : ℕ), g n < ack b n\nm n : ℕ\nIH : rec (f m) (fun y IH => g (pair m (pair y IH))) n < ack (max a b + 9) (m + n)\n⊢ ack (b + 4) (max m (pair n (rec (f m) (fun y IH => g (pair m (pair y IH))) n))) ≤ ack (max a b + 9) (m + succ n)\n[PROOFSTEP]\ncases' lt_or_le _ m with h₁ h₁\n[GOAL]\ncase inl\nf✝ f g : ℕ → ℕ\nhf : Nat.Primrec f\nhg : Nat.Primrec g\na : ℕ\nha : ∀ (n : ℕ), f n < ack a n\nb : ℕ\nhb : ∀ (n : ℕ), g n < ack b n\nm n : ℕ\nIH : rec (f m) (fun y IH => g (pair m (pair y IH))) n < ack (max a b + 9) (m + n)\nh₁ : ?m.127608 < m\n⊢ ack (b + 4) (max m (pair n (rec (f m) (fun y IH => g (pair m (pair y IH))) n))) ≤ ack (max a b + 9) (m + succ n)\n[PROOFSTEP]\nrw [max_eq_left h₁.le]\n[GOAL]\ncase inl\nf✝ f g : ℕ → ℕ\nhf : Nat.Primrec f\nhg : Nat.Primrec g\na : ℕ\nha : ∀ (n : ℕ), f n < ack a n\nb : ℕ\nhb : ∀ (n : ℕ), g n < ack b n\nm n : ℕ\nIH : rec (f m) (fun y IH => g (pair m (pair y IH))) n < ack (max a b + 9) (m + n)\nh₁ : pair n (rec (f m) (fun y IH => g (pair m (pair y IH))) n) < m\n⊢ ack (b + 4) m ≤ ack (max a b + 9) (m + succ n)\n[PROOFSTEP]\nexact ack_le_ack (Nat.add_le_add (le_max_right a b) <| by norm_num) (self_le_add_right m _)\n[GOAL]\nf✝ f g : ℕ → ℕ\nhf : Nat.Primrec f\nhg : Nat.Primrec g\na : ℕ\nha : ∀ (n : ℕ), f n < ack a n\nb : ℕ\nhb : ∀ (n : ℕ), g n < ack b n\nm n : ℕ\nIH : rec (f m) (fun y IH => g (pair m (pair y IH))) n < ack (max a b + 9) (m + n)\nh₁ : pair n (rec (f m) (fun y IH => g (pair m (pair y IH))) n) < m\n⊢ 4 ≤ 9\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase inr\nf✝ f g : ℕ → ℕ\nhf : Nat.Primrec f\nhg : Nat.Primrec g\na : ℕ\nha : ∀ (n : ℕ), f n < ack a n\nb : ℕ\nhb : ∀ (n : ℕ), g n < ack b n\nm n : ℕ\nIH : rec (f m) (fun y IH => g (pair m (pair y IH))) n < ack (max a b + 9) (m + n)\nh₁ : m ≤ pair n (rec (f m) (fun y IH => g (pair m (pair y IH))) n)\n⊢ ack (b + 4) (max m (pair n (rec (f m) (fun y IH => g (pair m (pair y IH))) n))) ≤ ack (max a b + 9) (m + succ n)\n[PROOFSTEP]\nrw [max_eq_right h₁]\n  -- We get rid of the second `pair`.\n[GOAL]\ncase inr\nf✝ f g : ℕ → ℕ\nhf : Nat.Primrec f\nhg : Nat.Primrec g\na : ℕ\nha : ∀ (n : ℕ), f n < ack a n\nb : ℕ\nhb : ∀ (n : ℕ), g n < ack b n\nm n : ℕ\nIH : rec (f m) (fun y IH => g (pair m (pair y IH))) n < ack (max a b + 9) (m + n)\nh₁ : m ≤ pair n (rec (f m) (fun y IH => g (pair m (pair y IH))) n)\n⊢ ack (b + 4) (pair n (rec (f m) (fun y IH => g (pair m (pair y IH))) n)) ≤ ack (max a b + 9) (m + succ n)\n[PROOFSTEP]\napply (ack_pair_lt _ _ _).le.trans\n[GOAL]\ncase inr\nf✝ f g : ℕ → ℕ\nhf : Nat.Primrec f\nhg : Nat.Primrec g\na : ℕ\nha : ∀ (n : ℕ), f n < ack a n\nb : ℕ\nhb : ∀ (n : ℕ), g n < ack b n\nm n : ℕ\nIH : rec (f m) (fun y IH => g (pair m (pair y IH))) n < ack (max a b + 9) (m + n)\nh₁ : m ≤ pair n (rec (f m) (fun y IH => g (pair m (pair y IH))) n)\n⊢ ack (b + 4 + 4) (max n (rec (f m) (fun y IH => g (pair m (pair y IH))) n)) ≤ ack (max a b + 9) (m + succ n)\n[PROOFSTEP]\ncases' lt_or_le _ n with h₂ h₂\n[GOAL]\ncase inr.inl\nf✝ f g : ℕ → ℕ\nhf : Nat.Primrec f\nhg : Nat.Primrec g\na : ℕ\nha : ∀ (n : ℕ), f n < ack a n\nb : ℕ\nhb : ∀ (n : ℕ), g n < ack b n\nm n : ℕ\nIH : rec (f m) (fun y IH => g (pair m (pair y IH))) n < ack (max a b + 9) (m + n)\nh₁ : m ≤ pair n (rec (f m) (fun y IH => g (pair m (pair y IH))) n)\nh₂ : ?m.127977 < n\n⊢ ack (b + 4 + 4) (max n (rec (f m) (fun y IH => g (pair m (pair y IH))) n)) ≤ ack (max a b + 9) (m + succ n)\n[PROOFSTEP]\nrw [max_eq_left h₂.le, add_assoc]\n[GOAL]\ncase inr.inl\nf✝ f g : ℕ → ℕ\nhf : Nat.Primrec f\nhg : Nat.Primrec g\na : ℕ\nha : ∀ (n : ℕ), f n < ack a n\nb : ℕ\nhb : ∀ (n : ℕ), g n < ack b n\nm n : ℕ\nIH : rec (f m) (fun y IH => g (pair m (pair y IH))) n < ack (max a b + 9) (m + n)\nh₁ : m ≤ pair n (rec (f m) (fun y IH => g (pair m (pair y IH))) n)\nh₂ : rec (f m) (fun y IH => g (pair m (pair y IH))) n < n\n⊢ ack (b + (4 + 4)) n ≤ ack (max a b + 9) (m + succ n)\n[PROOFSTEP]\nexact ack_le_ack (Nat.add_le_add (le_max_right a b) <| by norm_num) ((le_succ n).trans <| self_le_add_left _ _)\n[GOAL]\nf✝ f g : ℕ → ℕ\nhf : Nat.Primrec f\nhg : Nat.Primrec g\na : ℕ\nha : ∀ (n : ℕ), f n < ack a n\nb : ℕ\nhb : ∀ (n : ℕ), g n < ack b n\nm n : ℕ\nIH : rec (f m) (fun y IH => g (pair m (pair y IH))) n < ack (max a b + 9) (m + n)\nh₁ : m ≤ pair n (rec (f m) (fun y IH => g (pair m (pair y IH))) n)\nh₂ : rec (f m) (fun y IH => g (pair m (pair y IH))) n < n\n⊢ 4 + 4 ≤ 9\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase inr.inr\nf✝ f g : ℕ → ℕ\nhf : Nat.Primrec f\nhg : Nat.Primrec g\na : ℕ\nha : ∀ (n : ℕ), f n < ack a n\nb : ℕ\nhb : ∀ (n : ℕ), g n < ack b n\nm n : ℕ\nIH : rec (f m) (fun y IH => g (pair m (pair y IH))) n < ack (max a b + 9) (m + n)\nh₁ : m ≤ pair n (rec (f m) (fun y IH => g (pair m (pair y IH))) n)\nh₂ : n ≤ rec (f m) (fun y IH => g (pair m (pair y IH))) n\n⊢ ack (b + 4 + 4) (max n (rec (f m) (fun y IH => g (pair m (pair y IH))) n)) ≤ ack (max a b + 9) (m + succ n)\n[PROOFSTEP]\nrw [max_eq_right h₂]\n  -- We now use the inductive hypothesis, and some simple algebraic manipulation.\n[GOAL]\ncase inr.inr\nf✝ f g : ℕ → ℕ\nhf : Nat.Primrec f\nhg : Nat.Primrec g\na : ℕ\nha : ∀ (n : ℕ), f n < ack a n\nb : ℕ\nhb : ∀ (n : ℕ), g n < ack b n\nm n : ℕ\nIH : rec (f m) (fun y IH => g (pair m (pair y IH))) n < ack (max a b + 9) (m + n)\nh₁ : m ≤ pair n (rec (f m) (fun y IH => g (pair m (pair y IH))) n)\nh₂ : n ≤ rec (f m) (fun y IH => g (pair m (pair y IH))) n\n⊢ ack (b + 4 + 4) (rec (f m) (fun y IH => g (pair m (pair y IH))) n) ≤ ack (max a b + 9) (m + succ n)\n[PROOFSTEP]\napply (ack_strictMono_right _ IH).le.trans\n[GOAL]\ncase inr.inr\nf✝ f g : ℕ → ℕ\nhf : Nat.Primrec f\nhg : Nat.Primrec g\na : ℕ\nha : ∀ (n : ℕ), f n < ack a n\nb : ℕ\nhb : ∀ (n : ℕ), g n < ack b n\nm n : ℕ\nIH : rec (f m) (fun y IH => g (pair m (pair y IH))) n < ack (max a b + 9) (m + n)\nh₁ : m ≤ pair n (rec (f m) (fun y IH => g (pair m (pair y IH))) n)\nh₂ : n ≤ rec (f m) (fun y IH => g (pair m (pair y IH))) n\n⊢ ack (b + 4 + 4) (ack (max a b + 9) (m + n)) ≤ ack (max a b + 9) (m + succ n)\n[PROOFSTEP]\nrw [add_succ m, add_succ _ 8, succ_eq_add_one, succ_eq_add_one, ack_succ_succ (_ + 8), add_assoc]\n[GOAL]\ncase inr.inr\nf✝ f g : ℕ → ℕ\nhf : Nat.Primrec f\nhg : Nat.Primrec g\na : ℕ\nha : ∀ (n : ℕ), f n < ack a n\nb : ℕ\nhb : ∀ (n : ℕ), g n < ack b n\nm n : ℕ\nIH : rec (f m) (fun y IH => g (pair m (pair y IH))) n < ack (max a b + 9) (m + n)\nh₁ : m ≤ pair n (rec (f m) (fun y IH => g (pair m (pair y IH))) n)\nh₂ : n ≤ rec (f m) (fun y IH => g (pair m (pair y IH))) n\n⊢ ack (b + (4 + 4)) (ack (max a b + 8 + 1) (m + n)) ≤ ack (max a b + 8) (ack (max a b + 8 + 1) (m + n))\n[PROOFSTEP]\nexact\n  ack_mono_left _\n    (Nat.add_le_add (le_max_right a b) le_rfl)\n      -- The proof is now simple.\n[GOAL]\ncase prec.intro.intro\nf✝ f g : ℕ → ℕ\nhf : Nat.Primrec f\nhg : Nat.Primrec g\na : ℕ\nha : ∀ (n : ℕ), f n < ack a n\nb : ℕ\nhb : ∀ (n : ℕ), g n < ack b n\nthis : ∀ {m n : ℕ}, rec (f m) (fun y IH => g (pair m (pair y IH))) n < ack (max a b + 9) (m + n)\n⊢ ∃ m, ∀ (n : ℕ), unpaired (fun z n => rec (f z) (fun y IH => g (pair z (pair y IH))) n) n < ack m n\n[PROOFSTEP]\nexact ⟨max a b + 9, fun n => this.trans_le <| ack_mono_right _ <| unpair_add_le n⟩\n[GOAL]\nh : Nat.Primrec fun n => ack n n\n⊢ False\n[PROOFSTEP]\ncases' exists_lt_ack_of_nat_primrec h with m hm\n[GOAL]\ncase intro\nh : Nat.Primrec fun n => ack n n\nm : ℕ\nhm : ∀ (n : ℕ), ack n n < ack m n\n⊢ False\n[PROOFSTEP]\nexact (hm m).false\n[GOAL]\n⊢ ¬Primrec fun n => ack n n\n[PROOFSTEP]\nrw [Primrec.nat_iff]\n[GOAL]\n⊢ ¬Nat.Primrec fun n => ack n n\n[PROOFSTEP]\nexact not_nat_primrec_ack_self\n", "meta": {"mathlib_filename": "Mathlib.Computability.Ackermann", "llama_tokens": 12949, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8267118026095991, "lm_q2_score": 0.6261241772283034, "lm_q1q2_score": 0.5176242472138628}}
{"text": "[GOAL]\nα : Type u_1\nR : Type u_2\ninst✝⁶ : MeasurableSpace α\ninst✝⁵ : LinearOrderedRing R\ninst✝⁴ : FloorRing R\ninst✝³ : TopologicalSpace R\ninst✝² : OrderTopology R\ninst✝¹ : MeasurableSpace R\ninst✝ : OpensMeasurableSpace R\nx : R\n⊢ MeasurableSet (floor ⁻¹' {⌊x⌋})\n[PROOFSTEP]\nsimpa only [Int.preimage_floor_singleton] using measurableSet_Ico\n[GOAL]\nα : Type u_1\nR : Type u_2\ninst✝⁶ : MeasurableSpace α\ninst✝⁵ : LinearOrderedRing R\ninst✝⁴ : FloorRing R\ninst✝³ : TopologicalSpace R\ninst✝² : OrderTopology R\ninst✝¹ : MeasurableSpace R\ninst✝ : OpensMeasurableSpace R\nx : R\n⊢ MeasurableSet (ceil ⁻¹' {⌈x⌉})\n[PROOFSTEP]\nsimpa only [Int.preimage_ceil_singleton] using measurableSet_Ioc\n[GOAL]\nα : Type u_1\nR : Type u_2\ninst✝⁶ : MeasurableSpace α\ninst✝⁵ : LinearOrderedRing R\ninst✝⁴ : FloorRing R\ninst✝³ : TopologicalSpace R\ninst✝² : OrderTopology R\ninst✝¹ : MeasurableSpace R\ninst✝ : BorelSpace R\n⊢ Measurable Int.fract\n[PROOFSTEP]\nintro s hs\n[GOAL]\nα : Type u_1\nR : Type u_2\ninst✝⁶ : MeasurableSpace α\ninst✝⁵ : LinearOrderedRing R\ninst✝⁴ : FloorRing R\ninst✝³ : TopologicalSpace R\ninst✝² : OrderTopology R\ninst✝¹ : MeasurableSpace R\ninst✝ : BorelSpace R\ns : Set R\nhs : MeasurableSet s\n⊢ MeasurableSet (Int.fract ⁻¹' s)\n[PROOFSTEP]\nrw [Int.preimage_fract]\n[GOAL]\nα : Type u_1\nR : Type u_2\ninst✝⁶ : MeasurableSpace α\ninst✝⁵ : LinearOrderedRing R\ninst✝⁴ : FloorRing R\ninst✝³ : TopologicalSpace R\ninst✝² : OrderTopology R\ninst✝¹ : MeasurableSpace R\ninst✝ : BorelSpace R\ns : Set R\nhs : MeasurableSet s\n⊢ MeasurableSet (⋃ (m : ℤ), (fun x => x - ↑m) ⁻¹' (s ∩ Ico 0 1))\n[PROOFSTEP]\nexact MeasurableSet.iUnion fun z => measurable_id.sub_const _ (hs.inter measurableSet_Ico)\n[GOAL]\nα : Type u_1\nR : Type u_2\ninst✝⁶ : MeasurableSpace α\ninst✝⁵ : LinearOrderedRing R\ninst✝⁴ : FloorRing R\ninst✝³ : TopologicalSpace R\ninst✝² : OrderTopology R\ninst✝¹ : MeasurableSpace R\ninst✝ : BorelSpace R\ns : Set R\nhs : MeasurableSet s\n⊢ MeasurableSet (Int.fract '' s)\n[PROOFSTEP]\nsimp only [Int.image_fract, sub_eq_add_neg, image_add_right']\n[GOAL]\nα : Type u_1\nR : Type u_2\ninst✝⁶ : MeasurableSpace α\ninst✝⁵ : LinearOrderedRing R\ninst✝⁴ : FloorRing R\ninst✝³ : TopologicalSpace R\ninst✝² : OrderTopology R\ninst✝¹ : MeasurableSpace R\ninst✝ : BorelSpace R\ns : Set R\nhs : MeasurableSet s\n⊢ MeasurableSet (⋃ (m : ℤ), (fun x => x + ↑m) ⁻¹' s ∩ Ico 0 1)\n[PROOFSTEP]\nexact MeasurableSet.iUnion fun m => (measurable_add_const _ hs).inter measurableSet_Ico\n[GOAL]\nα : Type u_1\nR : Type u_2\ninst✝⁶ : MeasurableSpace α\ninst✝⁵ : LinearOrderedSemiring R\ninst✝⁴ : FloorSemiring R\ninst✝³ : TopologicalSpace R\ninst✝² : OrderTopology R\ninst✝¹ : MeasurableSpace R\ninst✝ : OpensMeasurableSpace R\nf : α → R\nn : R\n⊢ MeasurableSet (floor ⁻¹' {⌊n⌋₊})\n[PROOFSTEP]\ncases' eq_or_ne ⌊n⌋₊ 0 with h h\n[GOAL]\ncase inl\nα : Type u_1\nR : Type u_2\ninst✝⁶ : MeasurableSpace α\ninst✝⁵ : LinearOrderedSemiring R\ninst✝⁴ : FloorSemiring R\ninst✝³ : TopologicalSpace R\ninst✝² : OrderTopology R\ninst✝¹ : MeasurableSpace R\ninst✝ : OpensMeasurableSpace R\nf : α → R\nn : R\nh : ⌊n⌋₊ = 0\n⊢ MeasurableSet (floor ⁻¹' {⌊n⌋₊})\n[PROOFSTEP]\nsimp_all [h, Nat.preimage_floor_of_ne_zero, -floor_eq_zero]\n[GOAL]\ncase inr\nα : Type u_1\nR : Type u_2\ninst✝⁶ : MeasurableSpace α\ninst✝⁵ : LinearOrderedSemiring R\ninst✝⁴ : FloorSemiring R\ninst✝³ : TopologicalSpace R\ninst✝² : OrderTopology R\ninst✝¹ : MeasurableSpace R\ninst✝ : OpensMeasurableSpace R\nf : α → R\nn : R\nh : ⌊n⌋₊ ≠ 0\n⊢ MeasurableSet (floor ⁻¹' {⌊n⌋₊})\n[PROOFSTEP]\nsimp_all [h, Nat.preimage_floor_of_ne_zero, -floor_eq_zero]\n[GOAL]\nα : Type u_1\nR : Type u_2\ninst✝⁶ : MeasurableSpace α\ninst✝⁵ : LinearOrderedSemiring R\ninst✝⁴ : FloorSemiring R\ninst✝³ : TopologicalSpace R\ninst✝² : OrderTopology R\ninst✝¹ : MeasurableSpace R\ninst✝ : OpensMeasurableSpace R\nf : α → R\nn : R\n⊢ MeasurableSet (ceil ⁻¹' {⌈n⌉₊})\n[PROOFSTEP]\ncases' eq_or_ne ⌈n⌉₊ 0 with h h\n[GOAL]\ncase inl\nα : Type u_1\nR : Type u_2\ninst✝⁶ : MeasurableSpace α\ninst✝⁵ : LinearOrderedSemiring R\ninst✝⁴ : FloorSemiring R\ninst✝³ : TopologicalSpace R\ninst✝² : OrderTopology R\ninst✝¹ : MeasurableSpace R\ninst✝ : OpensMeasurableSpace R\nf : α → R\nn : R\nh : ⌈n⌉₊ = 0\n⊢ MeasurableSet (ceil ⁻¹' {⌈n⌉₊})\n[PROOFSTEP]\nsimp_all [h, Nat.preimage_ceil_of_ne_zero, -ceil_eq_zero]\n[GOAL]\ncase inr\nα : Type u_1\nR : Type u_2\ninst✝⁶ : MeasurableSpace α\ninst✝⁵ : LinearOrderedSemiring R\ninst✝⁴ : FloorSemiring R\ninst✝³ : TopologicalSpace R\ninst✝² : OrderTopology R\ninst✝¹ : MeasurableSpace R\ninst✝ : OpensMeasurableSpace R\nf : α → R\nn : R\nh : ⌈n⌉₊ ≠ 0\n⊢ MeasurableSet (ceil ⁻¹' {⌈n⌉₊})\n[PROOFSTEP]\nsimp_all [h, Nat.preimage_ceil_of_ne_zero, -ceil_eq_zero]\n", "meta": {"mathlib_filename": "Mathlib.MeasureTheory.Function.Floor", "llama_tokens": 2234, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8031737963569016, "lm_q2_score": 0.6442250928250375, "lm_q1q2_score": 0.5174247135126626}}
{"text": "[GOAL]\nf : ℕ →. ℕ\nhf : Partrec f\n⊢ Partrec₂ fun a m =>\n    Part.map (fun x => x + m) (Nat.rfind fun n => (fun m => decide (m = 0)) <$> f (Nat.pair a (n + m)))\n[PROOFSTEP]\nrefine'\n  Partrec.map ((@Partrec₂.unpaired' fun a b : ℕ => Nat.rfind fun n => (fun m => m = 0) <$> f (Nat.pair a (n + b))).1 _)\n    (Primrec.nat_add.comp Primrec.snd <| Primrec.snd.comp Primrec.fst).to_comp.to₂\n[GOAL]\nf : ℕ →. ℕ\nhf : Partrec f\n⊢ Partrec (unpaired fun a b => Nat.rfind fun n => (fun m => decide (m = 0)) <$> f (Nat.pair a (n + b)))\n[PROOFSTEP]\nhave :\n  Nat.Partrec\n    (fun a =>\n      Nat.rfind\n        (fun n =>\n          (fun m => decide (m = 0)) <$>\n            Nat.unpaired (fun a b => f (Nat.pair (Nat.unpair a).1 (b + (Nat.unpair a).2))) (Nat.pair a n))) :=\n  rfind\n    (Partrec₂.unpaired'.2\n      ((Partrec.nat_iff.2 hf).comp\n        (Primrec₂.pair.comp (Primrec.fst.comp <| Primrec.unpair.comp Primrec.fst)\n            (Primrec.nat_add.comp Primrec.snd (Primrec.snd.comp <| Primrec.unpair.comp Primrec.fst))).to_comp))\n[GOAL]\nf : ℕ →. ℕ\nhf : Partrec f\nthis :\n  Partrec fun a =>\n    Nat.rfind fun n =>\n      (fun m => decide (m = 0)) <$>\n        unpaired (fun a b => f (Nat.pair (unpair a).fst (b + (unpair a).snd))) (Nat.pair a n)\n⊢ Partrec (unpaired fun a b => Nat.rfind fun n => (fun m => decide (m = 0)) <$> f (Nat.pair a (n + b)))\n[PROOFSTEP]\nsimp at this \n[GOAL]\nf : ℕ →. ℕ\nhf : Partrec f\nthis :\n  Partrec fun a =>\n    Nat.rfind fun n => Part.map (fun m => decide (m = 0)) (f (Nat.pair (unpair a).fst (n + (unpair a).snd)))\n⊢ Partrec (unpaired fun a b => Nat.rfind fun n => (fun m => decide (m = 0)) <$> f (Nat.pair a (n + b)))\n[PROOFSTEP]\nexact this\n[GOAL]\nx✝ : Code.const 0 = Code.const 0\n⊢ 0 = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nn₁ n₂ : ℕ\nh : Code.const (n₁ + 1) = Code.const (n₂ + 1)\n⊢ n₁ + 1 = n₂ + 1\n[PROOFSTEP]\ndsimp [Nat.add_one, Nat.Partrec.Code.const] at h \n[GOAL]\nn₁ n₂ : ℕ\nh : comp succ (Code.const n₁) = comp succ (Code.const n₂)\n⊢ n₁ + 1 = n₂ + 1\n[PROOFSTEP]\ninjection h with h₁ h₂\n[GOAL]\nn₁ n₂ : ℕ\nh₁ : succ = succ\nh₂ : Code.const n₁ = Code.const n₂\n⊢ n₁ + 1 = n₂ + 1\n[PROOFSTEP]\nsimp only [const_inj h₂]\n[GOAL]\nn : ℕ\nm : ℕ := div2 (div2 n)\n⊢ m < n + 4\n[PROOFSTEP]\nsimp [Nat.div2_val]\n[GOAL]\nn : ℕ\nm : ℕ := div2 (div2 n)\n⊢ n / 2 / 2 < n + 4\n[PROOFSTEP]\nexact lt_of_le_of_lt (le_trans (Nat.div_le_self _ _) (Nat.div_le_self _ _)) (Nat.succ_le_succ (Nat.le_add_right _ _))\n[GOAL]\n⊢ encodeCode (ofNatCode 0) = 0\n[PROOFSTEP]\nsimp [ofNatCode, encodeCode]\n[GOAL]\n⊢ encodeCode (ofNatCode 1) = 1\n[PROOFSTEP]\nsimp [ofNatCode, encodeCode]\n[GOAL]\n⊢ encodeCode (ofNatCode 2) = 2\n[PROOFSTEP]\nsimp [ofNatCode, encodeCode]\n[GOAL]\n⊢ encodeCode (ofNatCode 3) = 3\n[PROOFSTEP]\nsimp [ofNatCode, encodeCode]\n[GOAL]\nn : ℕ\n⊢ encodeCode (ofNatCode (n + 4)) = n + 4\n[PROOFSTEP]\nlet m := n.div2.div2\n[GOAL]\nn : ℕ\nm : ℕ := div2 (div2 n)\n⊢ encodeCode (ofNatCode (n + 4)) = n + 4\n[PROOFSTEP]\nhave hm : m < n + 4 := by\n  simp [Nat.div2_val]\n  exact lt_of_le_of_lt (le_trans (Nat.div_le_self _ _) (Nat.div_le_self _ _)) (Nat.succ_le_succ (Nat.le_add_right _ _))\n[GOAL]\nn : ℕ\nm : ℕ := div2 (div2 n)\n⊢ m < n + 4\n[PROOFSTEP]\nsimp [Nat.div2_val]\n[GOAL]\nn : ℕ\nm : ℕ := div2 (div2 n)\n⊢ n / 2 / 2 < n + 4\n[PROOFSTEP]\nexact lt_of_le_of_lt (le_trans (Nat.div_le_self _ _) (Nat.div_le_self _ _)) (Nat.succ_le_succ (Nat.le_add_right _ _))\n[GOAL]\nn : ℕ\nm : ℕ := div2 (div2 n)\nhm : m < n + 4\n⊢ encodeCode (ofNatCode (n + 4)) = n + 4\n[PROOFSTEP]\nhave _m1 : m.unpair.1 < n + 4 := lt_of_le_of_lt m.unpair_left_le hm\n[GOAL]\nn : ℕ\nm : ℕ := div2 (div2 n)\nhm : m < n + 4\n_m1 : (unpair m).fst < n + 4\n⊢ encodeCode (ofNatCode (n + 4)) = n + 4\n[PROOFSTEP]\nhave _m2 : m.unpair.2 < n + 4 := lt_of_le_of_lt m.unpair_right_le hm\n[GOAL]\nn : ℕ\nm : ℕ := div2 (div2 n)\nhm : m < n + 4\n_m1 : (unpair m).fst < n + 4\n_m2 : (unpair m).snd < n + 4\n⊢ encodeCode (ofNatCode (n + 4)) = n + 4\n[PROOFSTEP]\nhave IH := encode_ofNatCode m\n[GOAL]\nn : ℕ\nm : ℕ := div2 (div2 n)\nhm : m < n + 4\n_m1 : (unpair m).fst < n + 4\n_m2 : (unpair m).snd < n + 4\nIH : encodeCode (ofNatCode m) = m\n⊢ encodeCode (ofNatCode (n + 4)) = n + 4\n[PROOFSTEP]\nhave IH1 := encode_ofNatCode m.unpair.1\n[GOAL]\nn : ℕ\nm : ℕ := div2 (div2 n)\nhm : m < n + 4\n_m1 : (unpair m).fst < n + 4\n_m2 : (unpair m).snd < n + 4\nIH : encodeCode (ofNatCode m) = m\nIH1 : encodeCode (ofNatCode (unpair m).fst) = (unpair m).fst\n⊢ encodeCode (ofNatCode (n + 4)) = n + 4\n[PROOFSTEP]\nhave IH2 := encode_ofNatCode m.unpair.2\n[GOAL]\nn : ℕ\nm : ℕ := div2 (div2 n)\nhm : m < n + 4\n_m1 : (unpair m).fst < n + 4\n_m2 : (unpair m).snd < n + 4\nIH : encodeCode (ofNatCode m) = m\nIH1 : encodeCode (ofNatCode (unpair m).fst) = (unpair m).fst\nIH2 : encodeCode (ofNatCode (unpair m).snd) = (unpair m).snd\n⊢ encodeCode (ofNatCode (n + 4)) = n + 4\n[PROOFSTEP]\nconv_rhs => rw [← Nat.bit_decomp n, ← Nat.bit_decomp n.div2]\n[GOAL]\nn : ℕ\nm : ℕ := div2 (div2 n)\nhm : m < n + 4\n_m1 : (unpair m).fst < n + 4\n_m2 : (unpair m).snd < n + 4\nIH : encodeCode (ofNatCode m) = m\nIH1 : encodeCode (ofNatCode (unpair m).fst) = (unpair m).fst\nIH2 : encodeCode (ofNatCode (unpair m).snd) = (unpair m).snd\n| n + 4\n[PROOFSTEP]\nrw [← Nat.bit_decomp n, ← Nat.bit_decomp n.div2]\n[GOAL]\nn : ℕ\nm : ℕ := div2 (div2 n)\nhm : m < n + 4\n_m1 : (unpair m).fst < n + 4\n_m2 : (unpair m).snd < n + 4\nIH : encodeCode (ofNatCode m) = m\nIH1 : encodeCode (ofNatCode (unpair m).fst) = (unpair m).fst\nIH2 : encodeCode (ofNatCode (unpair m).snd) = (unpair m).snd\n| n + 4\n[PROOFSTEP]\nrw [← Nat.bit_decomp n, ← Nat.bit_decomp n.div2]\n[GOAL]\nn : ℕ\nm : ℕ := div2 (div2 n)\nhm : m < n + 4\n_m1 : (unpair m).fst < n + 4\n_m2 : (unpair m).snd < n + 4\nIH : encodeCode (ofNatCode m) = m\nIH1 : encodeCode (ofNatCode (unpair m).fst) = (unpair m).fst\nIH2 : encodeCode (ofNatCode (unpair m).snd) = (unpair m).snd\n| n + 4\n[PROOFSTEP]\nrw [← Nat.bit_decomp n, ← Nat.bit_decomp n.div2]\n[GOAL]\nn : ℕ\nm : ℕ := div2 (div2 n)\nhm : m < n + 4\n_m1 : (unpair m).fst < n + 4\n_m2 : (unpair m).snd < n + 4\nIH : encodeCode (ofNatCode m) = m\nIH1 : encodeCode (ofNatCode (unpair m).fst) = (unpair m).fst\nIH2 : encodeCode (ofNatCode (unpair m).snd) = (unpair m).snd\n⊢ encodeCode (ofNatCode (n + 4)) = bit (bodd n) (bit (bodd (div2 n)) (div2 (div2 n))) + 4\n[PROOFSTEP]\nsimp [encodeCode, ofNatCode]\n[GOAL]\nn : ℕ\nm : ℕ := div2 (div2 n)\nhm : m < n + 4\n_m1 : (unpair m).fst < n + 4\n_m2 : (unpair m).snd < n + 4\nIH : encodeCode (ofNatCode m) = m\nIH1 : encodeCode (ofNatCode (unpair m).fst) = (unpair m).fst\nIH2 : encodeCode (ofNatCode (unpair m).snd) = (unpair m).snd\n⊢ encodeCode\n      (match bodd n, bodd (div2 n) with\n      | false, false => pair (ofNatCode (unpair (div2 (div2 n))).fst) (ofNatCode (unpair (div2 (div2 n))).snd)\n      | false, true => comp (ofNatCode (unpair (div2 (div2 n))).fst) (ofNatCode (unpair (div2 (div2 n))).snd)\n      | true, false => prec (ofNatCode (unpair (div2 (div2 n))).fst) (ofNatCode (unpair (div2 (div2 n))).snd)\n      | true, true => rfind' (ofNatCode (div2 (div2 n)))) =\n    bit (bodd n) (bit (bodd (div2 n)) (div2 (div2 n))) + 4\n[PROOFSTEP]\ncases n.bodd\n[GOAL]\ncase false\nn : ℕ\nm : ℕ := div2 (div2 n)\nhm : m < n + 4\n_m1 : (unpair m).fst < n + 4\n_m2 : (unpair m).snd < n + 4\nIH : encodeCode (ofNatCode m) = m\nIH1 : encodeCode (ofNatCode (unpair m).fst) = (unpair m).fst\nIH2 : encodeCode (ofNatCode (unpair m).snd) = (unpair m).snd\n⊢ encodeCode\n      (match false, bodd (div2 n) with\n      | false, false => pair (ofNatCode (unpair (div2 (div2 n))).fst) (ofNatCode (unpair (div2 (div2 n))).snd)\n      | false, true => comp (ofNatCode (unpair (div2 (div2 n))).fst) (ofNatCode (unpair (div2 (div2 n))).snd)\n      | true, false => prec (ofNatCode (unpair (div2 (div2 n))).fst) (ofNatCode (unpair (div2 (div2 n))).snd)\n      | true, true => rfind' (ofNatCode (div2 (div2 n)))) =\n    bit false (bit (bodd (div2 n)) (div2 (div2 n))) + 4\n[PROOFSTEP]\ncases n.div2.bodd\n[GOAL]\ncase true\nn : ℕ\nm : ℕ := div2 (div2 n)\nhm : m < n + 4\n_m1 : (unpair m).fst < n + 4\n_m2 : (unpair m).snd < n + 4\nIH : encodeCode (ofNatCode m) = m\nIH1 : encodeCode (ofNatCode (unpair m).fst) = (unpair m).fst\nIH2 : encodeCode (ofNatCode (unpair m).snd) = (unpair m).snd\n⊢ encodeCode\n      (match true, bodd (div2 n) with\n      | false, false => pair (ofNatCode (unpair (div2 (div2 n))).fst) (ofNatCode (unpair (div2 (div2 n))).snd)\n      | false, true => comp (ofNatCode (unpair (div2 (div2 n))).fst) (ofNatCode (unpair (div2 (div2 n))).snd)\n      | true, false => prec (ofNatCode (unpair (div2 (div2 n))).fst) (ofNatCode (unpair (div2 (div2 n))).snd)\n      | true, true => rfind' (ofNatCode (div2 (div2 n)))) =\n    bit true (bit (bodd (div2 n)) (div2 (div2 n))) + 4\n[PROOFSTEP]\ncases n.div2.bodd\n[GOAL]\ncase false.false\nn : ℕ\nm : ℕ := div2 (div2 n)\nhm : m < n + 4\n_m1 : (unpair m).fst < n + 4\n_m2 : (unpair m).snd < n + 4\nIH : encodeCode (ofNatCode m) = m\nIH1 : encodeCode (ofNatCode (unpair m).fst) = (unpair m).fst\nIH2 : encodeCode (ofNatCode (unpair m).snd) = (unpair m).snd\n⊢ encodeCode\n      (match false, false with\n      | false, false => pair (ofNatCode (unpair (div2 (div2 n))).fst) (ofNatCode (unpair (div2 (div2 n))).snd)\n      | false, true => comp (ofNatCode (unpair (div2 (div2 n))).fst) (ofNatCode (unpair (div2 (div2 n))).snd)\n      | true, false => prec (ofNatCode (unpair (div2 (div2 n))).fst) (ofNatCode (unpair (div2 (div2 n))).snd)\n      | true, true => rfind' (ofNatCode (div2 (div2 n)))) =\n    bit false (bit false (div2 (div2 n))) + 4\n[PROOFSTEP]\nsimp [encodeCode, ofNatCode, IH, IH1, IH2, Nat.bit_val]\n[GOAL]\ncase false.true\nn : ℕ\nm : ℕ := div2 (div2 n)\nhm : m < n + 4\n_m1 : (unpair m).fst < n + 4\n_m2 : (unpair m).snd < n + 4\nIH : encodeCode (ofNatCode m) = m\nIH1 : encodeCode (ofNatCode (unpair m).fst) = (unpair m).fst\nIH2 : encodeCode (ofNatCode (unpair m).snd) = (unpair m).snd\n⊢ encodeCode\n      (match false, true with\n      | false, false => pair (ofNatCode (unpair (div2 (div2 n))).fst) (ofNatCode (unpair (div2 (div2 n))).snd)\n      | false, true => comp (ofNatCode (unpair (div2 (div2 n))).fst) (ofNatCode (unpair (div2 (div2 n))).snd)\n      | true, false => prec (ofNatCode (unpair (div2 (div2 n))).fst) (ofNatCode (unpair (div2 (div2 n))).snd)\n      | true, true => rfind' (ofNatCode (div2 (div2 n)))) =\n    bit false (bit true (div2 (div2 n))) + 4\n[PROOFSTEP]\nsimp [encodeCode, ofNatCode, IH, IH1, IH2, Nat.bit_val]\n[GOAL]\ncase true.false\nn : ℕ\nm : ℕ := div2 (div2 n)\nhm : m < n + 4\n_m1 : (unpair m).fst < n + 4\n_m2 : (unpair m).snd < n + 4\nIH : encodeCode (ofNatCode m) = m\nIH1 : encodeCode (ofNatCode (unpair m).fst) = (unpair m).fst\nIH2 : encodeCode (ofNatCode (unpair m).snd) = (unpair m).snd\n⊢ encodeCode\n      (match true, false with\n      | false, false => pair (ofNatCode (unpair (div2 (div2 n))).fst) (ofNatCode (unpair (div2 (div2 n))).snd)\n      | false, true => comp (ofNatCode (unpair (div2 (div2 n))).fst) (ofNatCode (unpair (div2 (div2 n))).snd)\n      | true, false => prec (ofNatCode (unpair (div2 (div2 n))).fst) (ofNatCode (unpair (div2 (div2 n))).snd)\n      | true, true => rfind' (ofNatCode (div2 (div2 n)))) =\n    bit true (bit false (div2 (div2 n))) + 4\n[PROOFSTEP]\nsimp [encodeCode, ofNatCode, IH, IH1, IH2, Nat.bit_val]\n[GOAL]\ncase true.true\nn : ℕ\nm : ℕ := div2 (div2 n)\nhm : m < n + 4\n_m1 : (unpair m).fst < n + 4\n_m2 : (unpair m).snd < n + 4\nIH : encodeCode (ofNatCode m) = m\nIH1 : encodeCode (ofNatCode (unpair m).fst) = (unpair m).fst\nIH2 : encodeCode (ofNatCode (unpair m).snd) = (unpair m).snd\n⊢ encodeCode\n      (match true, true with\n      | false, false => pair (ofNatCode (unpair (div2 (div2 n))).fst) (ofNatCode (unpair (div2 (div2 n))).snd)\n      | false, true => comp (ofNatCode (unpair (div2 (div2 n))).fst) (ofNatCode (unpair (div2 (div2 n))).snd)\n      | true, false => prec (ofNatCode (unpair (div2 (div2 n))).fst) (ofNatCode (unpair (div2 (div2 n))).snd)\n      | true, true => rfind' (ofNatCode (div2 (div2 n)))) =\n    bit true (bit true (div2 (div2 n))) + 4\n[PROOFSTEP]\nsimp [encodeCode, ofNatCode, IH, IH1, IH2, Nat.bit_val]\n[GOAL]\nc : Code\n⊢ ofNatCode (encodeCode c) = c\n[PROOFSTEP]\ninduction c\n[GOAL]\ncase zero\n⊢ ofNatCode (encodeCode zero) = zero\n[PROOFSTEP]\ntry {rfl\n}\n[GOAL]\ncase zero\n⊢ ofNatCode (encodeCode zero) = zero\n[PROOFSTEP]\n{rfl\n}\n[GOAL]\ncase zero\n⊢ ofNatCode (encodeCode zero) = zero\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ\n⊢ ofNatCode (encodeCode succ) = succ\n[PROOFSTEP]\ntry {rfl\n}\n[GOAL]\ncase succ\n⊢ ofNatCode (encodeCode succ) = succ\n[PROOFSTEP]\n{rfl\n}\n[GOAL]\ncase succ\n⊢ ofNatCode (encodeCode succ) = succ\n[PROOFSTEP]\nrfl\n[GOAL]\ncase left\n⊢ ofNatCode (encodeCode left) = left\n[PROOFSTEP]\ntry {rfl\n}\n[GOAL]\ncase left\n⊢ ofNatCode (encodeCode left) = left\n[PROOFSTEP]\n{rfl\n}\n[GOAL]\ncase left\n⊢ ofNatCode (encodeCode left) = left\n[PROOFSTEP]\nrfl\n[GOAL]\ncase right\n⊢ ofNatCode (encodeCode right) = right\n[PROOFSTEP]\ntry {rfl\n}\n[GOAL]\ncase right\n⊢ ofNatCode (encodeCode right) = right\n[PROOFSTEP]\n{rfl\n}\n[GOAL]\ncase right\n⊢ ofNatCode (encodeCode right) = right\n[PROOFSTEP]\nrfl\n[GOAL]\ncase pair\na✝¹ a✝ : Code\na_ih✝¹ : ofNatCode (encodeCode a✝¹) = a✝¹\na_ih✝ : ofNatCode (encodeCode a✝) = a✝\n⊢ ofNatCode (encodeCode (pair a✝¹ a✝)) = pair a✝¹ a✝\n[PROOFSTEP]\ntry {rfl\n}\n[GOAL]\ncase pair\na✝¹ a✝ : Code\na_ih✝¹ : ofNatCode (encodeCode a✝¹) = a✝¹\na_ih✝ : ofNatCode (encodeCode a✝) = a✝\n⊢ ofNatCode (encodeCode (pair a✝¹ a✝)) = pair a✝¹ a✝\n[PROOFSTEP]\n{rfl\n}\n[GOAL]\ncase pair\na✝¹ a✝ : Code\na_ih✝¹ : ofNatCode (encodeCode a✝¹) = a✝¹\na_ih✝ : ofNatCode (encodeCode a✝) = a✝\n⊢ ofNatCode (encodeCode (pair a✝¹ a✝)) = pair a✝¹ a✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase comp\na✝¹ a✝ : Code\na_ih✝¹ : ofNatCode (encodeCode a✝¹) = a✝¹\na_ih✝ : ofNatCode (encodeCode a✝) = a✝\n⊢ ofNatCode (encodeCode (comp a✝¹ a✝)) = comp a✝¹ a✝\n[PROOFSTEP]\ntry {rfl\n}\n[GOAL]\ncase comp\na✝¹ a✝ : Code\na_ih✝¹ : ofNatCode (encodeCode a✝¹) = a✝¹\na_ih✝ : ofNatCode (encodeCode a✝) = a✝\n⊢ ofNatCode (encodeCode (comp a✝¹ a✝)) = comp a✝¹ a✝\n[PROOFSTEP]\n{rfl\n}\n[GOAL]\ncase comp\na✝¹ a✝ : Code\na_ih✝¹ : ofNatCode (encodeCode a✝¹) = a✝¹\na_ih✝ : ofNatCode (encodeCode a✝) = a✝\n⊢ ofNatCode (encodeCode (comp a✝¹ a✝)) = comp a✝¹ a✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase prec\na✝¹ a✝ : Code\na_ih✝¹ : ofNatCode (encodeCode a✝¹) = a✝¹\na_ih✝ : ofNatCode (encodeCode a✝) = a✝\n⊢ ofNatCode (encodeCode (prec a✝¹ a✝)) = prec a✝¹ a✝\n[PROOFSTEP]\ntry {rfl\n}\n[GOAL]\ncase prec\na✝¹ a✝ : Code\na_ih✝¹ : ofNatCode (encodeCode a✝¹) = a✝¹\na_ih✝ : ofNatCode (encodeCode a✝) = a✝\n⊢ ofNatCode (encodeCode (prec a✝¹ a✝)) = prec a✝¹ a✝\n[PROOFSTEP]\n{rfl\n}\n[GOAL]\ncase prec\na✝¹ a✝ : Code\na_ih✝¹ : ofNatCode (encodeCode a✝¹) = a✝¹\na_ih✝ : ofNatCode (encodeCode a✝) = a✝\n⊢ ofNatCode (encodeCode (prec a✝¹ a✝)) = prec a✝¹ a✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase rfind'\na✝ : Code\na_ih✝ : ofNatCode (encodeCode a✝) = a✝\n⊢ ofNatCode (encodeCode (rfind' a✝)) = rfind' a✝\n[PROOFSTEP]\ntry {rfl\n}\n[GOAL]\ncase rfind'\na✝ : Code\na_ih✝ : ofNatCode (encodeCode a✝) = a✝\n⊢ ofNatCode (encodeCode (rfind' a✝)) = rfind' a✝\n[PROOFSTEP]\n{rfl\n}\n[GOAL]\ncase rfind'\na✝ : Code\na_ih✝ : ofNatCode (encodeCode a✝) = a✝\n⊢ ofNatCode (encodeCode (rfind' a✝)) = rfind' a✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase pair\na✝¹ a✝ : Code\na_ih✝¹ : ofNatCode (encodeCode a✝¹) = a✝¹\na_ih✝ : ofNatCode (encodeCode a✝) = a✝\n⊢ ofNatCode (encodeCode (pair a✝¹ a✝)) = pair a✝¹ a✝\n[PROOFSTEP]\nsimp [encodeCode, ofNatCode, Nat.div2_val, *]\n[GOAL]\ncase comp\na✝¹ a✝ : Code\na_ih✝¹ : ofNatCode (encodeCode a✝¹) = a✝¹\na_ih✝ : ofNatCode (encodeCode a✝) = a✝\n⊢ ofNatCode (encodeCode (comp a✝¹ a✝)) = comp a✝¹ a✝\n[PROOFSTEP]\nsimp [encodeCode, ofNatCode, Nat.div2_val, *]\n[GOAL]\ncase prec\na✝¹ a✝ : Code\na_ih✝¹ : ofNatCode (encodeCode a✝¹) = a✝¹\na_ih✝ : ofNatCode (encodeCode a✝) = a✝\n⊢ ofNatCode (encodeCode (prec a✝¹ a✝)) = prec a✝¹ a✝\n[PROOFSTEP]\nsimp [encodeCode, ofNatCode, Nat.div2_val, *]\n[GOAL]\ncase rfind'\na✝ : Code\na_ih✝ : ofNatCode (encodeCode a✝) = a✝\n⊢ ofNatCode (encodeCode (rfind' a✝)) = rfind' a✝\n[PROOFSTEP]\nsimp [encodeCode, ofNatCode, Nat.div2_val, *]\n[GOAL]\ncf cg : Code\n⊢ encode cf < encode (pair cf cg) ∧ encode cg < encode (pair cf cg)\n[PROOFSTEP]\nsimp [encodeCode_eq, encodeCode]\n[GOAL]\ncf cg : Code\n⊢ encodeCode cf < 2 * (2 * Nat.pair (encodeCode cf) (encodeCode cg)) + 4 ∧\n    encodeCode cg < 2 * (2 * Nat.pair (encodeCode cf) (encodeCode cg)) + 4\n[PROOFSTEP]\nhave := Nat.mul_le_mul_right (Nat.pair cf.encodeCode cg.encodeCode) (by decide : 1 ≤ 2 * 2)\n[GOAL]\ncf cg : Code\n⊢ 1 ≤ 2 * 2\n[PROOFSTEP]\ndecide\n[GOAL]\ncf cg : Code\nthis : 1 * Nat.pair (encodeCode cf) (encodeCode cg) ≤ 2 * 2 * Nat.pair (encodeCode cf) (encodeCode cg)\n⊢ encodeCode cf < 2 * (2 * Nat.pair (encodeCode cf) (encodeCode cg)) + 4 ∧\n    encodeCode cg < 2 * (2 * Nat.pair (encodeCode cf) (encodeCode cg)) + 4\n[PROOFSTEP]\nrw [one_mul, mul_assoc] at this \n[GOAL]\ncf cg : Code\nthis : Nat.pair (encodeCode cf) (encodeCode cg) ≤ 2 * (2 * Nat.pair (encodeCode cf) (encodeCode cg))\n⊢ encodeCode cf < 2 * (2 * Nat.pair (encodeCode cf) (encodeCode cg)) + 4 ∧\n    encodeCode cg < 2 * (2 * Nat.pair (encodeCode cf) (encodeCode cg)) + 4\n[PROOFSTEP]\nhave := lt_of_le_of_lt this (lt_add_of_pos_right _ (by decide : 0 < 4))\n[GOAL]\ncf cg : Code\nthis : Nat.pair (encodeCode cf) (encodeCode cg) ≤ 2 * (2 * Nat.pair (encodeCode cf) (encodeCode cg))\n⊢ 0 < 4\n[PROOFSTEP]\ndecide\n[GOAL]\ncf cg : Code\nthis✝ : Nat.pair (encodeCode cf) (encodeCode cg) ≤ 2 * (2 * Nat.pair (encodeCode cf) (encodeCode cg))\nthis : Nat.pair (encodeCode cf) (encodeCode cg) < 2 * (2 * Nat.pair (encodeCode cf) (encodeCode cg)) + 4\n⊢ encodeCode cf < 2 * (2 * Nat.pair (encodeCode cf) (encodeCode cg)) + 4 ∧\n    encodeCode cg < 2 * (2 * Nat.pair (encodeCode cf) (encodeCode cg)) + 4\n[PROOFSTEP]\nexact ⟨lt_of_le_of_lt (Nat.left_le_pair _ _) this, lt_of_le_of_lt (Nat.right_le_pair _ _) this⟩\n[GOAL]\ncf cg : Code\n⊢ encode cf < encode (comp cf cg) ∧ encode cg < encode (comp cf cg)\n[PROOFSTEP]\nsuffices\n[GOAL]\ncf cg : Code\nthis : ?m.354291\n⊢ encode cf < encode (comp cf cg) ∧ encode cg < encode (comp cf cg)\ncase this cf cg : Code ⊢ ?m.354291\n[PROOFSTEP]\nexact (encode_lt_pair cf cg).imp (fun h => lt_trans h this) fun h => lt_trans h this\n[GOAL]\ncase this\ncf cg : Code\n⊢ encode (pair cf cg) < encode (comp cf cg)\n[PROOFSTEP]\nchange _\n[GOAL]\ncase this\ncf cg : Code\n⊢ encode (pair cf cg) < encode (comp cf cg)\n[PROOFSTEP]\nsimp [encodeCode_eq, encodeCode]\n[GOAL]\ncf cg : Code\n⊢ encode cf < encode (prec cf cg) ∧ encode cg < encode (prec cf cg)\n[PROOFSTEP]\nsuffices\n[GOAL]\ncf cg : Code\nthis : ?m.356899\n⊢ encode cf < encode (prec cf cg) ∧ encode cg < encode (prec cf cg)\ncase this cf cg : Code ⊢ ?m.356899\n[PROOFSTEP]\nexact (encode_lt_pair cf cg).imp (fun h => lt_trans h this) fun h => lt_trans h this\n[GOAL]\ncase this\ncf cg : Code\n⊢ encode (pair cf cg) < encode (prec cf cg)\n[PROOFSTEP]\nchange _\n[GOAL]\ncase this\ncf cg : Code\n⊢ encode (pair cf cg) < encode (prec cf cg)\n[PROOFSTEP]\nsimp [encodeCode_eq, encodeCode]\n[GOAL]\ncf : Code\n⊢ encode cf < encode (rfind' cf)\n[PROOFSTEP]\nsimp [encodeCode_eq, encodeCode]\n[GOAL]\ncf : Code\n⊢ encodeCode cf < 2 * (2 * encodeCode cf + 1) + 1 + 4\n[PROOFSTEP]\nhave := Nat.mul_le_mul_right cf.encodeCode (by decide : 1 ≤ 2 * 2)\n[GOAL]\ncf : Code\n⊢ 1 ≤ 2 * 2\n[PROOFSTEP]\ndecide\n[GOAL]\ncf : Code\nthis : 1 * encodeCode cf ≤ 2 * 2 * encodeCode cf\n⊢ encodeCode cf < 2 * (2 * encodeCode cf + 1) + 1 + 4\n[PROOFSTEP]\nrw [one_mul, mul_assoc] at this \n[GOAL]\ncf : Code\nthis : encodeCode cf ≤ 2 * (2 * encodeCode cf)\n⊢ encodeCode cf < 2 * (2 * encodeCode cf + 1) + 1 + 4\n[PROOFSTEP]\nrefine' lt_of_le_of_lt (le_trans this _) (lt_add_of_pos_right _ (by decide : 0 < 4))\n[GOAL]\ncf : Code\nthis : encodeCode cf ≤ 2 * (2 * encodeCode cf)\n⊢ 0 < 4\n[PROOFSTEP]\ndecide\n[GOAL]\ncf : Code\nthis : encodeCode cf ≤ 2 * (2 * encodeCode cf)\n⊢ 2 * (2 * encodeCode cf) ≤ 2 * (2 * encodeCode cf + 1) + 1\n[PROOFSTEP]\nexact\n  le_of_lt\n    (Nat.lt_succ_of_le <| Nat.mul_le_mul_left _ <| le_of_lt <| Nat.lt_succ_of_le <| Nat.mul_le_mul_left _ <| le_rfl)\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code × Code × σ × σ → σ\nhpr : Primrec₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Primrec₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Primrec₂ pc\nrf : α → Code × σ → σ\nhrf : Primrec₂ rf\n⊢ let PR := fun a cf cg hf hg => pr a (cf, cg, hf, hg);\n  let CO := fun a cf cg hf hg => co a (cf, cg, hf, hg);\n  let PC := fun a cf cg hf hg => pc a (cf, cg, hf, hg);\n  let RF := fun a cf hf => rf a (cf, hf);\n  let F := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR a) (CO a) (PC a) (RF a);\n  Primrec fun a => F a (c a)\n[PROOFSTEP]\nintros _ _ _ _ F\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code × Code × σ × σ → σ\nhpr : Primrec₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Primrec₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Primrec₂ pc\nrf : α → Code × σ → σ\nhrf : Primrec₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\n⊢ Primrec fun a => F a (c a)\n[PROOFSTEP]\nlet G₁ : (α × List σ) × ℕ × ℕ → Option σ := fun p =>\n  let a := p.1.1\n  let IH := p.1.2\n  let n := p.2.1\n  let m := p.2.2\n  (IH.get? m).bind fun s =>\n    (IH.get? m.unpair.1).bind fun s₁ =>\n      (IH.get? m.unpair.2).map fun s₂ =>\n        cond n.bodd\n          (cond n.div2.bodd (rf a (ofNat Code m, s)) (pc a (ofNat Code m.unpair.1, ofNat Code m.unpair.2, s₁, s₂)))\n          (cond n.div2.bodd (co a (ofNat Code m.unpair.1, ofNat Code m.unpair.2, s₁, s₂))\n            (pr a (ofNat Code m.unpair.1, ofNat Code m.unpair.2, s₁, s₂)))\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code × Code × σ × σ → σ\nhpr : Primrec₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Primrec₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Primrec₂ pc\nrf : α → Code × σ → σ\nhrf : Primrec₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\n⊢ Primrec fun a => F a (c a)\n[PROOFSTEP]\nhave : Primrec G₁ := by\n  refine' option_bind (list_get?.comp (snd.comp fst) (snd.comp snd)) _\n  unfold Primrec₂\n  refine' option_bind ((list_get?.comp (snd.comp fst) (fst.comp <| Primrec.unpair.comp (snd.comp snd))).comp fst) _\n  unfold Primrec₂\n  refine'\n    option_map ((list_get?.comp (snd.comp fst) (snd.comp <| Primrec.unpair.comp (snd.comp snd))).comp <| fst.comp fst) _\n  have a : Primrec (fun p : ((((α × List σ) × ℕ × ℕ) × σ) × σ) × σ => p.1.1.1.1.1) :=\n    fst.comp (fst.comp <| fst.comp <| fst.comp fst)\n  have n : Primrec (fun p : ((((α × List σ) × ℕ × ℕ) × σ) × σ) × σ => p.1.1.1.2.1) :=\n    fst.comp (snd.comp <| fst.comp <| fst.comp fst)\n  have m : Primrec (fun p : ((((α × List σ) × ℕ × ℕ) × σ) × σ) × σ => p.1.1.1.2.2) :=\n    snd.comp (snd.comp <| fst.comp <| fst.comp fst)\n  have m₁ := fst.comp (Primrec.unpair.comp m)\n  have m₂ := snd.comp (Primrec.unpair.comp m)\n  have s : Primrec (fun p : ((((α × List σ) × ℕ × ℕ) × σ) × σ) × σ => p.1.1.2) := snd.comp (fst.comp fst)\n  have s₁ : Primrec (fun p : ((((α × List σ) × ℕ × ℕ) × σ) × σ) × σ => p.1.2) := snd.comp fst\n  have s₂ : Primrec (fun p : ((((α × List σ) × ℕ × ℕ) × σ) × σ) × σ => p.2) := snd\n  unfold Primrec₂\n  exact\n    (nat_bodd.comp n).cond\n      ((nat_bodd.comp <| nat_div2.comp n).cond (hrf.comp a (((Primrec.ofNat Code).comp m).pair s))\n        (hpc.comp a (((Primrec.ofNat Code).comp m₁).pair <| ((Primrec.ofNat Code).comp m₂).pair <| s₁.pair s₂)))\n      (Primrec.cond (nat_bodd.comp <| nat_div2.comp n)\n        (hco.comp a (((Primrec.ofNat Code).comp m₁).pair <| ((Primrec.ofNat Code).comp m₂).pair <| s₁.pair s₂))\n        (hpr.comp a (((Primrec.ofNat Code).comp m₁).pair <| ((Primrec.ofNat Code).comp m₂).pair <| s₁.pair s₂)))\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code × Code × σ × σ → σ\nhpr : Primrec₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Primrec₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Primrec₂ pc\nrf : α → Code × σ → σ\nhrf : Primrec₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\n⊢ Primrec G₁\n[PROOFSTEP]\nrefine' option_bind (list_get?.comp (snd.comp fst) (snd.comp snd)) _\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code × Code × σ × σ → σ\nhpr : Primrec₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Primrec₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Primrec₂ pc\nrf : α → Code × σ → σ\nhrf : Primrec₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\n⊢ Primrec₂ fun p s =>\n    Option.bind (List.get? p.fst.snd (unpair p.snd.snd).fst) fun s₁ =>\n      Option.map\n        (fun s₂ =>\n          bif bodd p.snd.fst then\n            bif bodd (div2 p.snd.fst) then rf p.fst.fst (ofNat Code p.snd.snd, s)\n            else pc p.fst.fst (ofNat Code (unpair p.snd.snd).fst, ofNat Code (unpair p.snd.snd).snd, s₁, s₂)\n          else\n            bif bodd (div2 p.snd.fst) then\n              co p.fst.fst (ofNat Code (unpair p.snd.snd).fst, ofNat Code (unpair p.snd.snd).snd, s₁, s₂)\n            else pr p.fst.fst (ofNat Code (unpair p.snd.snd).fst, ofNat Code (unpair p.snd.snd).snd, s₁, s₂))\n        (List.get? p.fst.snd (unpair p.snd.snd).snd)\n[PROOFSTEP]\nunfold Primrec₂\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code × Code × σ × σ → σ\nhpr : Primrec₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Primrec₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Primrec₂ pc\nrf : α → Code × σ → σ\nhrf : Primrec₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\n⊢ Primrec fun p =>\n    (fun p s =>\n        Option.bind (List.get? p.fst.snd (unpair p.snd.snd).fst) fun s₁ =>\n          Option.map\n            (fun s₂ =>\n              bif bodd p.snd.fst then\n                bif bodd (div2 p.snd.fst) then rf p.fst.fst (ofNat Code p.snd.snd, s)\n                else pc p.fst.fst (ofNat Code (unpair p.snd.snd).fst, ofNat Code (unpair p.snd.snd).snd, s₁, s₂)\n              else\n                bif bodd (div2 p.snd.fst) then\n                  co p.fst.fst (ofNat Code (unpair p.snd.snd).fst, ofNat Code (unpair p.snd.snd).snd, s₁, s₂)\n                else pr p.fst.fst (ofNat Code (unpair p.snd.snd).fst, ofNat Code (unpair p.snd.snd).snd, s₁, s₂))\n            (List.get? p.fst.snd (unpair p.snd.snd).snd))\n      p.fst p.snd\n[PROOFSTEP]\nrefine' option_bind ((list_get?.comp (snd.comp fst) (fst.comp <| Primrec.unpair.comp (snd.comp snd))).comp fst) _\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code × Code × σ × σ → σ\nhpr : Primrec₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Primrec₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Primrec₂ pc\nrf : α → Code × σ → σ\nhrf : Primrec₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\n⊢ Primrec₂ fun p s₁ =>\n    Option.map\n      (fun s₂ =>\n        bif bodd p.fst.snd.fst then\n          bif bodd (div2 p.fst.snd.fst) then rf p.fst.fst.fst (ofNat Code p.fst.snd.snd, p.snd)\n          else pc p.fst.fst.fst (ofNat Code (unpair p.fst.snd.snd).fst, ofNat Code (unpair p.fst.snd.snd).snd, s₁, s₂)\n        else\n          bif bodd (div2 p.fst.snd.fst) then\n            co p.fst.fst.fst (ofNat Code (unpair p.fst.snd.snd).fst, ofNat Code (unpair p.fst.snd.snd).snd, s₁, s₂)\n          else pr p.fst.fst.fst (ofNat Code (unpair p.fst.snd.snd).fst, ofNat Code (unpair p.fst.snd.snd).snd, s₁, s₂))\n      (List.get? p.fst.fst.snd (unpair p.fst.snd.snd).snd)\n[PROOFSTEP]\nunfold Primrec₂\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code × Code × σ × σ → σ\nhpr : Primrec₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Primrec₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Primrec₂ pc\nrf : α → Code × σ → σ\nhrf : Primrec₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\n⊢ Primrec fun p =>\n    (fun p s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd p.fst.snd.fst then\n              bif bodd (div2 p.fst.snd.fst) then rf p.fst.fst.fst (ofNat Code p.fst.snd.snd, p.snd)\n              else\n                pc p.fst.fst.fst (ofNat Code (unpair p.fst.snd.snd).fst, ofNat Code (unpair p.fst.snd.snd).snd, s₁, s₂)\n            else\n              bif bodd (div2 p.fst.snd.fst) then\n                co p.fst.fst.fst (ofNat Code (unpair p.fst.snd.snd).fst, ofNat Code (unpair p.fst.snd.snd).snd, s₁, s₂)\n              else\n                pr p.fst.fst.fst (ofNat Code (unpair p.fst.snd.snd).fst, ofNat Code (unpair p.fst.snd.snd).snd, s₁, s₂))\n          (List.get? p.fst.fst.snd (unpair p.fst.snd.snd).snd))\n      p.fst p.snd\n[PROOFSTEP]\nrefine'\n  option_map ((list_get?.comp (snd.comp fst) (snd.comp <| Primrec.unpair.comp (snd.comp snd))).comp <| fst.comp fst) _\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code × Code × σ × σ → σ\nhpr : Primrec₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Primrec₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Primrec₂ pc\nrf : α → Code × σ → σ\nhrf : Primrec₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\n⊢ Primrec₂ fun p s₂ =>\n    bif bodd p.fst.fst.snd.fst then\n      bif bodd (div2 p.fst.fst.snd.fst) then rf p.fst.fst.fst.fst (ofNat Code p.fst.fst.snd.snd, p.fst.snd)\n      else\n        pc p.fst.fst.fst.fst\n          (ofNat Code (unpair p.fst.fst.snd.snd).fst, ofNat Code (unpair p.fst.fst.snd.snd).snd, p.snd, s₂)\n    else\n      bif bodd (div2 p.fst.fst.snd.fst) then\n        co p.fst.fst.fst.fst\n          (ofNat Code (unpair p.fst.fst.snd.snd).fst, ofNat Code (unpair p.fst.fst.snd.snd).snd, p.snd, s₂)\n      else\n        pr p.fst.fst.fst.fst\n          (ofNat Code (unpair p.fst.fst.snd.snd).fst, ofNat Code (unpair p.fst.fst.snd.snd).snd, p.snd, s₂)\n[PROOFSTEP]\nhave a : Primrec (fun p : ((((α × List σ) × ℕ × ℕ) × σ) × σ) × σ => p.1.1.1.1.1) :=\n  fst.comp (fst.comp <| fst.comp <| fst.comp fst)\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code × Code × σ × σ → σ\nhpr : Primrec₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Primrec₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Primrec₂ pc\nrf : α → Code × σ → σ\nhrf : Primrec₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\na : Primrec fun p => p.fst.fst.fst.fst.fst\n⊢ Primrec₂ fun p s₂ =>\n    bif bodd p.fst.fst.snd.fst then\n      bif bodd (div2 p.fst.fst.snd.fst) then rf p.fst.fst.fst.fst (ofNat Code p.fst.fst.snd.snd, p.fst.snd)\n      else\n        pc p.fst.fst.fst.fst\n          (ofNat Code (unpair p.fst.fst.snd.snd).fst, ofNat Code (unpair p.fst.fst.snd.snd).snd, p.snd, s₂)\n    else\n      bif bodd (div2 p.fst.fst.snd.fst) then\n        co p.fst.fst.fst.fst\n          (ofNat Code (unpair p.fst.fst.snd.snd).fst, ofNat Code (unpair p.fst.fst.snd.snd).snd, p.snd, s₂)\n      else\n        pr p.fst.fst.fst.fst\n          (ofNat Code (unpair p.fst.fst.snd.snd).fst, ofNat Code (unpair p.fst.fst.snd.snd).snd, p.snd, s₂)\n[PROOFSTEP]\nhave n : Primrec (fun p : ((((α × List σ) × ℕ × ℕ) × σ) × σ) × σ => p.1.1.1.2.1) :=\n  fst.comp (snd.comp <| fst.comp <| fst.comp fst)\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code × Code × σ × σ → σ\nhpr : Primrec₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Primrec₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Primrec₂ pc\nrf : α → Code × σ → σ\nhrf : Primrec₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\na : Primrec fun p => p.fst.fst.fst.fst.fst\nn : Primrec fun p => p.fst.fst.fst.snd.fst\n⊢ Primrec₂ fun p s₂ =>\n    bif bodd p.fst.fst.snd.fst then\n      bif bodd (div2 p.fst.fst.snd.fst) then rf p.fst.fst.fst.fst (ofNat Code p.fst.fst.snd.snd, p.fst.snd)\n      else\n        pc p.fst.fst.fst.fst\n          (ofNat Code (unpair p.fst.fst.snd.snd).fst, ofNat Code (unpair p.fst.fst.snd.snd).snd, p.snd, s₂)\n    else\n      bif bodd (div2 p.fst.fst.snd.fst) then\n        co p.fst.fst.fst.fst\n          (ofNat Code (unpair p.fst.fst.snd.snd).fst, ofNat Code (unpair p.fst.fst.snd.snd).snd, p.snd, s₂)\n      else\n        pr p.fst.fst.fst.fst\n          (ofNat Code (unpair p.fst.fst.snd.snd).fst, ofNat Code (unpair p.fst.fst.snd.snd).snd, p.snd, s₂)\n[PROOFSTEP]\nhave m : Primrec (fun p : ((((α × List σ) × ℕ × ℕ) × σ) × σ) × σ => p.1.1.1.2.2) :=\n  snd.comp (snd.comp <| fst.comp <| fst.comp fst)\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code × Code × σ × σ → σ\nhpr : Primrec₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Primrec₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Primrec₂ pc\nrf : α → Code × σ → σ\nhrf : Primrec₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\na : Primrec fun p => p.fst.fst.fst.fst.fst\nn : Primrec fun p => p.fst.fst.fst.snd.fst\nm : Primrec fun p => p.fst.fst.fst.snd.snd\n⊢ Primrec₂ fun p s₂ =>\n    bif bodd p.fst.fst.snd.fst then\n      bif bodd (div2 p.fst.fst.snd.fst) then rf p.fst.fst.fst.fst (ofNat Code p.fst.fst.snd.snd, p.fst.snd)\n      else\n        pc p.fst.fst.fst.fst\n          (ofNat Code (unpair p.fst.fst.snd.snd).fst, ofNat Code (unpair p.fst.fst.snd.snd).snd, p.snd, s₂)\n    else\n      bif bodd (div2 p.fst.fst.snd.fst) then\n        co p.fst.fst.fst.fst\n          (ofNat Code (unpair p.fst.fst.snd.snd).fst, ofNat Code (unpair p.fst.fst.snd.snd).snd, p.snd, s₂)\n      else\n        pr p.fst.fst.fst.fst\n          (ofNat Code (unpair p.fst.fst.snd.snd).fst, ofNat Code (unpair p.fst.fst.snd.snd).snd, p.snd, s₂)\n[PROOFSTEP]\nhave m₁ := fst.comp (Primrec.unpair.comp m)\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code × Code × σ × σ → σ\nhpr : Primrec₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Primrec₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Primrec₂ pc\nrf : α → Code × σ → σ\nhrf : Primrec₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\na : Primrec fun p => p.fst.fst.fst.fst.fst\nn : Primrec fun p => p.fst.fst.fst.snd.fst\nm : Primrec fun p => p.fst.fst.fst.snd.snd\nm₁ : Primrec fun a => (unpair a.fst.fst.fst.snd.snd).fst\n⊢ Primrec₂ fun p s₂ =>\n    bif bodd p.fst.fst.snd.fst then\n      bif bodd (div2 p.fst.fst.snd.fst) then rf p.fst.fst.fst.fst (ofNat Code p.fst.fst.snd.snd, p.fst.snd)\n      else\n        pc p.fst.fst.fst.fst\n          (ofNat Code (unpair p.fst.fst.snd.snd).fst, ofNat Code (unpair p.fst.fst.snd.snd).snd, p.snd, s₂)\n    else\n      bif bodd (div2 p.fst.fst.snd.fst) then\n        co p.fst.fst.fst.fst\n          (ofNat Code (unpair p.fst.fst.snd.snd).fst, ofNat Code (unpair p.fst.fst.snd.snd).snd, p.snd, s₂)\n      else\n        pr p.fst.fst.fst.fst\n          (ofNat Code (unpair p.fst.fst.snd.snd).fst, ofNat Code (unpair p.fst.fst.snd.snd).snd, p.snd, s₂)\n[PROOFSTEP]\nhave m₂ := snd.comp (Primrec.unpair.comp m)\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code × Code × σ × σ → σ\nhpr : Primrec₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Primrec₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Primrec₂ pc\nrf : α → Code × σ → σ\nhrf : Primrec₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\na : Primrec fun p => p.fst.fst.fst.fst.fst\nn : Primrec fun p => p.fst.fst.fst.snd.fst\nm : Primrec fun p => p.fst.fst.fst.snd.snd\nm₁ : Primrec fun a => (unpair a.fst.fst.fst.snd.snd).fst\nm₂ : Primrec fun a => (unpair a.fst.fst.fst.snd.snd).snd\n⊢ Primrec₂ fun p s₂ =>\n    bif bodd p.fst.fst.snd.fst then\n      bif bodd (div2 p.fst.fst.snd.fst) then rf p.fst.fst.fst.fst (ofNat Code p.fst.fst.snd.snd, p.fst.snd)\n      else\n        pc p.fst.fst.fst.fst\n          (ofNat Code (unpair p.fst.fst.snd.snd).fst, ofNat Code (unpair p.fst.fst.snd.snd).snd, p.snd, s₂)\n    else\n      bif bodd (div2 p.fst.fst.snd.fst) then\n        co p.fst.fst.fst.fst\n          (ofNat Code (unpair p.fst.fst.snd.snd).fst, ofNat Code (unpair p.fst.fst.snd.snd).snd, p.snd, s₂)\n      else\n        pr p.fst.fst.fst.fst\n          (ofNat Code (unpair p.fst.fst.snd.snd).fst, ofNat Code (unpair p.fst.fst.snd.snd).snd, p.snd, s₂)\n[PROOFSTEP]\nhave s : Primrec (fun p : ((((α × List σ) × ℕ × ℕ) × σ) × σ) × σ => p.1.1.2) := snd.comp (fst.comp fst)\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns✝ : α → σ\nhs : Primrec s✝\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code × Code × σ × σ → σ\nhpr : Primrec₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Primrec₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Primrec₂ pc\nrf : α → Code × σ → σ\nhrf : Primrec₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s✝ a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\na : Primrec fun p => p.fst.fst.fst.fst.fst\nn : Primrec fun p => p.fst.fst.fst.snd.fst\nm : Primrec fun p => p.fst.fst.fst.snd.snd\nm₁ : Primrec fun a => (unpair a.fst.fst.fst.snd.snd).fst\nm₂ : Primrec fun a => (unpair a.fst.fst.fst.snd.snd).snd\ns : Primrec fun p => p.fst.fst.snd\n⊢ Primrec₂ fun p s₂ =>\n    bif bodd p.fst.fst.snd.fst then\n      bif bodd (div2 p.fst.fst.snd.fst) then rf p.fst.fst.fst.fst (ofNat Code p.fst.fst.snd.snd, p.fst.snd)\n      else\n        pc p.fst.fst.fst.fst\n          (ofNat Code (unpair p.fst.fst.snd.snd).fst, ofNat Code (unpair p.fst.fst.snd.snd).snd, p.snd, s₂)\n    else\n      bif bodd (div2 p.fst.fst.snd.fst) then\n        co p.fst.fst.fst.fst\n          (ofNat Code (unpair p.fst.fst.snd.snd).fst, ofNat Code (unpair p.fst.fst.snd.snd).snd, p.snd, s₂)\n      else\n        pr p.fst.fst.fst.fst\n          (ofNat Code (unpair p.fst.fst.snd.snd).fst, ofNat Code (unpair p.fst.fst.snd.snd).snd, p.snd, s₂)\n[PROOFSTEP]\nhave s₁ : Primrec (fun p : ((((α × List σ) × ℕ × ℕ) × σ) × σ) × σ => p.1.2) := snd.comp fst\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns✝ : α → σ\nhs : Primrec s✝\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code × Code × σ × σ → σ\nhpr : Primrec₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Primrec₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Primrec₂ pc\nrf : α → Code × σ → σ\nhrf : Primrec₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s✝ a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\na : Primrec fun p => p.fst.fst.fst.fst.fst\nn : Primrec fun p => p.fst.fst.fst.snd.fst\nm : Primrec fun p => p.fst.fst.fst.snd.snd\nm₁ : Primrec fun a => (unpair a.fst.fst.fst.snd.snd).fst\nm₂ : Primrec fun a => (unpair a.fst.fst.fst.snd.snd).snd\ns : Primrec fun p => p.fst.fst.snd\ns₁ : Primrec fun p => p.fst.snd\n⊢ Primrec₂ fun p s₂ =>\n    bif bodd p.fst.fst.snd.fst then\n      bif bodd (div2 p.fst.fst.snd.fst) then rf p.fst.fst.fst.fst (ofNat Code p.fst.fst.snd.snd, p.fst.snd)\n      else\n        pc p.fst.fst.fst.fst\n          (ofNat Code (unpair p.fst.fst.snd.snd).fst, ofNat Code (unpair p.fst.fst.snd.snd).snd, p.snd, s₂)\n    else\n      bif bodd (div2 p.fst.fst.snd.fst) then\n        co p.fst.fst.fst.fst\n          (ofNat Code (unpair p.fst.fst.snd.snd).fst, ofNat Code (unpair p.fst.fst.snd.snd).snd, p.snd, s₂)\n      else\n        pr p.fst.fst.fst.fst\n          (ofNat Code (unpair p.fst.fst.snd.snd).fst, ofNat Code (unpair p.fst.fst.snd.snd).snd, p.snd, s₂)\n[PROOFSTEP]\nhave s₂ : Primrec (fun p : ((((α × List σ) × ℕ × ℕ) × σ) × σ) × σ => p.2) := snd\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns✝ : α → σ\nhs : Primrec s✝\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code × Code × σ × σ → σ\nhpr : Primrec₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Primrec₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Primrec₂ pc\nrf : α → Code × σ → σ\nhrf : Primrec₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s✝ a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\na : Primrec fun p => p.fst.fst.fst.fst.fst\nn : Primrec fun p => p.fst.fst.fst.snd.fst\nm : Primrec fun p => p.fst.fst.fst.snd.snd\nm₁ : Primrec fun a => (unpair a.fst.fst.fst.snd.snd).fst\nm₂ : Primrec fun a => (unpair a.fst.fst.fst.snd.snd).snd\ns : Primrec fun p => p.fst.fst.snd\ns₁ : Primrec fun p => p.fst.snd\ns₂ : Primrec fun p => p.snd\n⊢ Primrec₂ fun p s₂ =>\n    bif bodd p.fst.fst.snd.fst then\n      bif bodd (div2 p.fst.fst.snd.fst) then rf p.fst.fst.fst.fst (ofNat Code p.fst.fst.snd.snd, p.fst.snd)\n      else\n        pc p.fst.fst.fst.fst\n          (ofNat Code (unpair p.fst.fst.snd.snd).fst, ofNat Code (unpair p.fst.fst.snd.snd).snd, p.snd, s₂)\n    else\n      bif bodd (div2 p.fst.fst.snd.fst) then\n        co p.fst.fst.fst.fst\n          (ofNat Code (unpair p.fst.fst.snd.snd).fst, ofNat Code (unpair p.fst.fst.snd.snd).snd, p.snd, s₂)\n      else\n        pr p.fst.fst.fst.fst\n          (ofNat Code (unpair p.fst.fst.snd.snd).fst, ofNat Code (unpair p.fst.fst.snd.snd).snd, p.snd, s₂)\n[PROOFSTEP]\nunfold Primrec₂\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns✝ : α → σ\nhs : Primrec s✝\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code × Code × σ × σ → σ\nhpr : Primrec₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Primrec₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Primrec₂ pc\nrf : α → Code × σ → σ\nhrf : Primrec₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s✝ a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\na : Primrec fun p => p.fst.fst.fst.fst.fst\nn : Primrec fun p => p.fst.fst.fst.snd.fst\nm : Primrec fun p => p.fst.fst.fst.snd.snd\nm₁ : Primrec fun a => (unpair a.fst.fst.fst.snd.snd).fst\nm₂ : Primrec fun a => (unpair a.fst.fst.fst.snd.snd).snd\ns : Primrec fun p => p.fst.fst.snd\ns₁ : Primrec fun p => p.fst.snd\ns₂ : Primrec fun p => p.snd\n⊢ Primrec fun p =>\n    (fun p s₂ =>\n        bif bodd p.fst.fst.snd.fst then\n          bif bodd (div2 p.fst.fst.snd.fst) then rf p.fst.fst.fst.fst (ofNat Code p.fst.fst.snd.snd, p.fst.snd)\n          else\n            pc p.fst.fst.fst.fst\n              (ofNat Code (unpair p.fst.fst.snd.snd).fst, ofNat Code (unpair p.fst.fst.snd.snd).snd, p.snd, s₂)\n        else\n          bif bodd (div2 p.fst.fst.snd.fst) then\n            co p.fst.fst.fst.fst\n              (ofNat Code (unpair p.fst.fst.snd.snd).fst, ofNat Code (unpair p.fst.fst.snd.snd).snd, p.snd, s₂)\n          else\n            pr p.fst.fst.fst.fst\n              (ofNat Code (unpair p.fst.fst.snd.snd).fst, ofNat Code (unpair p.fst.fst.snd.snd).snd, p.snd, s₂))\n      p.fst p.snd\n[PROOFSTEP]\nexact\n  (nat_bodd.comp n).cond\n    ((nat_bodd.comp <| nat_div2.comp n).cond (hrf.comp a (((Primrec.ofNat Code).comp m).pair s))\n      (hpc.comp a (((Primrec.ofNat Code).comp m₁).pair <| ((Primrec.ofNat Code).comp m₂).pair <| s₁.pair s₂)))\n    (Primrec.cond (nat_bodd.comp <| nat_div2.comp n)\n      (hco.comp a (((Primrec.ofNat Code).comp m₁).pair <| ((Primrec.ofNat Code).comp m₂).pair <| s₁.pair s₂))\n      (hpr.comp a (((Primrec.ofNat Code).comp m₁).pair <| ((Primrec.ofNat Code).comp m₂).pair <| s₁.pair s₂)))\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code × Code × σ × σ → σ\nhpr : Primrec₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Primrec₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Primrec₂ pc\nrf : α → Code × σ → σ\nhrf : Primrec₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\nthis : Primrec G₁\n⊢ Primrec fun a => F a (c a)\n[PROOFSTEP]\nlet G : α → List σ → Option σ := fun a IH =>\n  IH.length.casesOn (some (z a)) fun n =>\n    n.casesOn (some (s a)) fun n =>\n      n.casesOn (some (l a)) fun n => n.casesOn (some (r a)) fun n => G₁ ((a, IH), n, n.div2.div2)\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code × Code × σ × σ → σ\nhpr : Primrec₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Primrec₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Primrec₂ pc\nrf : α → Code × σ → σ\nhrf : Primrec₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\nthis : Primrec G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\n⊢ Primrec fun a => F a (c a)\n[PROOFSTEP]\nhave : Primrec₂ G := by\n  unfold Primrec₂\n  refine nat_casesOn (list_length.comp snd) (option_some_iff.2 (hz.comp fst)) ?_\n  unfold Primrec₂\n  refine nat_casesOn snd (option_some_iff.2 (hs.comp (fst.comp fst))) ?_\n  unfold Primrec₂\n  refine nat_casesOn snd (option_some_iff.2 (hl.comp (fst.comp <| fst.comp fst))) ?_\n  unfold Primrec₂\n  refine nat_casesOn snd (option_some_iff.2 (hr.comp (fst.comp <| fst.comp <| fst.comp fst))) ?_\n  unfold Primrec₂\n  exact\n    this.comp <|\n      ((fst.pair snd).comp <| fst.comp <| fst.comp <| fst.comp <| fst).pair <|\n        snd.pair <| nat_div2.comp <| nat_div2.comp snd\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code × Code × σ × σ → σ\nhpr : Primrec₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Primrec₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Primrec₂ pc\nrf : α → Code × σ → σ\nhrf : Primrec₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\nthis : Primrec G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\n⊢ Primrec₂ G\n[PROOFSTEP]\nunfold Primrec₂\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code × Code × σ × σ → σ\nhpr : Primrec₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Primrec₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Primrec₂ pc\nrf : α → Code × σ → σ\nhrf : Primrec₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\nthis : Primrec G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\n⊢ Primrec fun p => G p.fst p.snd\n[PROOFSTEP]\nrefine nat_casesOn (list_length.comp snd) (option_some_iff.2 (hz.comp fst)) ?_\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code × Code × σ × σ → σ\nhpr : Primrec₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Primrec₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Primrec₂ pc\nrf : α → Code × σ → σ\nhrf : Primrec₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\nthis : Primrec G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\n⊢ Primrec₂ fun p n =>\n    (fun n =>\n        Nat.casesOn n (some (s p.fst)) fun n =>\n          Nat.casesOn n (some (l p.fst)) fun n =>\n            Nat.casesOn n (some (r p.fst)) fun n => G₁ ((p.fst, p.snd), n, div2 (div2 n)))\n      n\n[PROOFSTEP]\nunfold Primrec₂\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code × Code × σ × σ → σ\nhpr : Primrec₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Primrec₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Primrec₂ pc\nrf : α → Code × σ → σ\nhrf : Primrec₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\nthis : Primrec G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\n⊢ Primrec fun p =>\n    (fun p n =>\n        (fun n =>\n            Nat.casesOn n (some (s p.fst)) fun n =>\n              Nat.casesOn n (some (l p.fst)) fun n =>\n                Nat.casesOn n (some (r p.fst)) fun n => G₁ ((p.fst, p.snd), n, div2 (div2 n)))\n          n)\n      p.fst p.snd\n[PROOFSTEP]\nrefine nat_casesOn snd (option_some_iff.2 (hs.comp (fst.comp fst))) ?_\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code × Code × σ × σ → σ\nhpr : Primrec₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Primrec₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Primrec₂ pc\nrf : α → Code × σ → σ\nhrf : Primrec₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\nthis : Primrec G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\n⊢ Primrec₂ fun p n =>\n    (fun n =>\n        Nat.casesOn n (some (l p.fst.fst)) fun n =>\n          Nat.casesOn n (some (r p.fst.fst)) fun n => G₁ ((p.fst.fst, p.fst.snd), n, div2 (div2 n)))\n      n\n[PROOFSTEP]\nunfold Primrec₂\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code × Code × σ × σ → σ\nhpr : Primrec₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Primrec₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Primrec₂ pc\nrf : α → Code × σ → σ\nhrf : Primrec₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\nthis : Primrec G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\n⊢ Primrec fun p =>\n    (fun p n =>\n        (fun n =>\n            Nat.casesOn n (some (l p.fst.fst)) fun n =>\n              Nat.casesOn n (some (r p.fst.fst)) fun n => G₁ ((p.fst.fst, p.fst.snd), n, div2 (div2 n)))\n          n)\n      p.fst p.snd\n[PROOFSTEP]\nrefine nat_casesOn snd (option_some_iff.2 (hl.comp (fst.comp <| fst.comp fst))) ?_\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code × Code × σ × σ → σ\nhpr : Primrec₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Primrec₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Primrec₂ pc\nrf : α → Code × σ → σ\nhrf : Primrec₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\nthis : Primrec G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\n⊢ Primrec₂ fun p n =>\n    (fun n => Nat.casesOn n (some (r p.fst.fst.fst)) fun n => G₁ ((p.fst.fst.fst, p.fst.fst.snd), n, div2 (div2 n))) n\n[PROOFSTEP]\nunfold Primrec₂\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code × Code × σ × σ → σ\nhpr : Primrec₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Primrec₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Primrec₂ pc\nrf : α → Code × σ → σ\nhrf : Primrec₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\nthis : Primrec G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\n⊢ Primrec fun p =>\n    (fun p n =>\n        (fun n => Nat.casesOn n (some (r p.fst.fst.fst)) fun n => G₁ ((p.fst.fst.fst, p.fst.fst.snd), n, div2 (div2 n)))\n          n)\n      p.fst p.snd\n[PROOFSTEP]\nrefine nat_casesOn snd (option_some_iff.2 (hr.comp (fst.comp <| fst.comp <| fst.comp fst))) ?_\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code × Code × σ × σ → σ\nhpr : Primrec₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Primrec₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Primrec₂ pc\nrf : α → Code × σ → σ\nhrf : Primrec₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\nthis : Primrec G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\n⊢ Primrec₂ fun p n => (fun n => G₁ ((p.fst.fst.fst.fst, p.fst.fst.fst.snd), n, div2 (div2 n))) n\n[PROOFSTEP]\nunfold Primrec₂\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code × Code × σ × σ → σ\nhpr : Primrec₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Primrec₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Primrec₂ pc\nrf : α → Code × σ → σ\nhrf : Primrec₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\nthis : Primrec G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\n⊢ Primrec fun p => (fun p n => (fun n => G₁ ((p.fst.fst.fst.fst, p.fst.fst.fst.snd), n, div2 (div2 n))) n) p.fst p.snd\n[PROOFSTEP]\nexact\n  this.comp <|\n    ((fst.pair snd).comp <| fst.comp <| fst.comp <| fst.comp <| fst).pair <|\n      snd.pair <| nat_div2.comp <| nat_div2.comp snd\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code × Code × σ × σ → σ\nhpr : Primrec₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Primrec₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Primrec₂ pc\nrf : α → Code × σ → σ\nhrf : Primrec₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\nthis✝ : Primrec G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Primrec₂ G\n⊢ Primrec fun a => F a (c a)\n[PROOFSTEP]\nrefine'\n  ((nat_strong_rec (fun a n => F a (ofNat Code n)) this.to₂ fun a n => _).comp _root_.Primrec.id <|\n        encode_iff.2 hc).of_eq\n    fun a => by simp\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code × Code × σ × σ → σ\nhpr : Primrec₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Primrec₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Primrec₂ pc\nrf : α → Code × σ → σ\nhrf : Primrec₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\nthis✝ : Primrec G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Primrec₂ G\na : α\n⊢ F (id a) (ofNat Code (encode (c a))) = F a (c a)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code × Code × σ × σ → σ\nhpr : Primrec₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Primrec₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Primrec₂ pc\nrf : α → Code × σ → σ\nhrf : Primrec₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\nthis✝ : Primrec G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Primrec₂ G\na : α\nn : ℕ\n⊢ G (a, List.map ((fun a n => F a (ofNat Code n)) a) (List.range n)).fst\n      (a, List.map ((fun a n => F a (ofNat Code n)) a) (List.range n)).snd =\n    some ((fun a n => F a (ofNat Code n)) a n)\n[PROOFSTEP]\nsimp (config := { zeta := false })\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code × Code × σ × σ → σ\nhpr : Primrec₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Primrec₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Primrec₂ pc\nrf : α → Code × σ → σ\nhrf : Primrec₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\nthis✝ : Primrec G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Primrec₂ G\na : α\nn : ℕ\n⊢ G a (List.map (fun n => F a (ofNat Code n)) (List.range n)) = some (F a (ofNat Code n))\n[PROOFSTEP]\niterate 4 cases' n with n; · simp (config := { zeta := false }) [ofNatCode_eq, ofNatCode]; rfl\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code × Code × σ × σ → σ\nhpr : Primrec₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Primrec₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Primrec₂ pc\nrf : α → Code × σ → σ\nhrf : Primrec₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\nthis✝ : Primrec G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Primrec₂ G\na : α\nn : ℕ\n⊢ G a (List.map (fun n => F a (ofNat Code n)) (List.range n)) = some (F a (ofNat Code n))\n[PROOFSTEP]\ncases' n with n\n[GOAL]\ncase zero\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code × Code × σ × σ → σ\nhpr : Primrec₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Primrec₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Primrec₂ pc\nrf : α → Code × σ → σ\nhrf : Primrec₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\nthis✝ : Primrec G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Primrec₂ G\na : α\n⊢ G a (List.map (fun n => F a (ofNat Code n)) (List.range Nat.zero)) = some (F a (ofNat Code Nat.zero))\n[PROOFSTEP]\nsimp (config := { zeta := false }) [ofNatCode_eq, ofNatCode]\n[GOAL]\ncase zero\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code × Code × σ × σ → σ\nhpr : Primrec₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Primrec₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Primrec₂ pc\nrf : α → Code × σ → σ\nhrf : Primrec₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\nthis✝ : Primrec G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Primrec₂ G\na : α\n⊢ G a [] = some (F a zero)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code × Code × σ × σ → σ\nhpr : Primrec₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Primrec₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Primrec₂ pc\nrf : α → Code × σ → σ\nhrf : Primrec₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\nthis✝ : Primrec G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Primrec₂ G\na : α\nn : ℕ\n⊢ G a (List.map (fun n => F a (ofNat Code n)) (List.range (Nat.succ n))) = some (F a (ofNat Code (Nat.succ n)))\n[PROOFSTEP]\ncases' n with n\n[GOAL]\ncase succ.zero\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code × Code × σ × σ → σ\nhpr : Primrec₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Primrec₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Primrec₂ pc\nrf : α → Code × σ → σ\nhrf : Primrec₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\nthis✝ : Primrec G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Primrec₂ G\na : α\n⊢ G a (List.map (fun n => F a (ofNat Code n)) (List.range (Nat.succ Nat.zero))) =\n    some (F a (ofNat Code (Nat.succ Nat.zero)))\n[PROOFSTEP]\nsimp (config := { zeta := false }) [ofNatCode_eq, ofNatCode]\n[GOAL]\ncase succ.zero\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code × Code × σ × σ → σ\nhpr : Primrec₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Primrec₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Primrec₂ pc\nrf : α → Code × σ → σ\nhrf : Primrec₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\nthis✝ : Primrec G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Primrec₂ G\na : α\n⊢ G a [F a zero] = some (F a succ)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ.succ\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code × Code × σ × σ → σ\nhpr : Primrec₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Primrec₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Primrec₂ pc\nrf : α → Code × σ → σ\nhrf : Primrec₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\nthis✝ : Primrec G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Primrec₂ G\na : α\nn : ℕ\n⊢ G a (List.map (fun n => F a (ofNat Code n)) (List.range (Nat.succ (Nat.succ n)))) =\n    some (F a (ofNat Code (Nat.succ (Nat.succ n))))\n[PROOFSTEP]\ncases' n with n\n[GOAL]\ncase succ.succ.zero\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code × Code × σ × σ → σ\nhpr : Primrec₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Primrec₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Primrec₂ pc\nrf : α → Code × σ → σ\nhrf : Primrec₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\nthis✝ : Primrec G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Primrec₂ G\na : α\n⊢ G a (List.map (fun n => F a (ofNat Code n)) (List.range (Nat.succ (Nat.succ Nat.zero)))) =\n    some (F a (ofNat Code (Nat.succ (Nat.succ Nat.zero))))\n[PROOFSTEP]\nsimp (config := { zeta := false }) [ofNatCode_eq, ofNatCode]\n[GOAL]\ncase succ.succ.zero\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code × Code × σ × σ → σ\nhpr : Primrec₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Primrec₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Primrec₂ pc\nrf : α → Code × σ → σ\nhrf : Primrec₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\nthis✝ : Primrec G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Primrec₂ G\na : α\n⊢ G a [F a zero, F a succ] = some (F a left)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ.succ.succ\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code × Code × σ × σ → σ\nhpr : Primrec₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Primrec₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Primrec₂ pc\nrf : α → Code × σ → σ\nhrf : Primrec₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\nthis✝ : Primrec G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Primrec₂ G\na : α\nn : ℕ\n⊢ G a (List.map (fun n => F a (ofNat Code n)) (List.range (Nat.succ (Nat.succ (Nat.succ n))))) =\n    some (F a (ofNat Code (Nat.succ (Nat.succ (Nat.succ n)))))\n[PROOFSTEP]\ncases' n with n\n[GOAL]\ncase succ.succ.succ.zero\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code × Code × σ × σ → σ\nhpr : Primrec₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Primrec₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Primrec₂ pc\nrf : α → Code × σ → σ\nhrf : Primrec₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\nthis✝ : Primrec G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Primrec₂ G\na : α\n⊢ G a (List.map (fun n => F a (ofNat Code n)) (List.range (Nat.succ (Nat.succ (Nat.succ Nat.zero))))) =\n    some (F a (ofNat Code (Nat.succ (Nat.succ (Nat.succ Nat.zero)))))\n[PROOFSTEP]\nsimp (config := { zeta := false }) [ofNatCode_eq, ofNatCode]\n[GOAL]\ncase succ.succ.succ.zero\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code × Code × σ × σ → σ\nhpr : Primrec₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Primrec₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Primrec₂ pc\nrf : α → Code × σ → σ\nhrf : Primrec₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\nthis✝ : Primrec G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Primrec₂ G\na : α\n⊢ G a [F a zero, F a succ, F a left] = some (F a right)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ.succ.succ.succ\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code × Code × σ × σ → σ\nhpr : Primrec₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Primrec₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Primrec₂ pc\nrf : α → Code × σ → σ\nhrf : Primrec₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\nthis✝ : Primrec G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Primrec₂ G\na : α\nn : ℕ\n⊢ G a (List.map (fun n => F a (ofNat Code n)) (List.range (Nat.succ (Nat.succ (Nat.succ (Nat.succ n)))))) =\n    some (F a (ofNat Code (Nat.succ (Nat.succ (Nat.succ (Nat.succ n))))))\n[PROOFSTEP]\nsimp only []\n[GOAL]\ncase succ.succ.succ.succ\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code × Code × σ × σ → σ\nhpr : Primrec₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Primrec₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Primrec₂ pc\nrf : α → Code × σ → σ\nhrf : Primrec₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\nthis✝ : Primrec G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Primrec₂ G\na : α\nn : ℕ\n⊢ Nat.rec (some (z a))\n      (fun n_1 n_ih =>\n        Nat.rec (some (s a))\n          (fun n_2 n_ih =>\n            Nat.rec (some (l a))\n              (fun n_3 n_ih =>\n                Nat.rec (some (r a))\n                  (fun n_4 n_ih =>\n                    Option.bind\n                      (List.get?\n                        (List.map\n                          (fun n =>\n                            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n                              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n                              (fun cf hf => rf a (cf, hf)) (ofNat Code n))\n                          (List.range (Nat.succ (Nat.succ (Nat.succ (Nat.succ n))))))\n                        (div2 (div2 n_4)))\n                      fun s_1 =>\n                      Option.bind\n                        (List.get?\n                          (List.map\n                            (fun n =>\n                              rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n                                (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n                                (fun cf hf => rf a (cf, hf)) (ofNat Code n))\n                            (List.range (Nat.succ (Nat.succ (Nat.succ (Nat.succ n))))))\n                          (unpair (div2 (div2 n_4))).fst)\n                        fun s₁ =>\n                        Option.map\n                          (fun s₂ =>\n                            bif bodd n_4 then\n                              bif bodd (div2 n_4) then rf a (ofNat Code (div2 (div2 n_4)), s_1)\n                              else\n                                pc a\n                                  (ofNat Code (unpair (div2 (div2 n_4))).fst, ofNat Code (unpair (div2 (div2 n_4))).snd,\n                                    s₁, s₂)\n                            else\n                              bif bodd (div2 n_4) then\n                                co a\n                                  (ofNat Code (unpair (div2 (div2 n_4))).fst, ofNat Code (unpair (div2 (div2 n_4))).snd,\n                                    s₁, s₂)\n                              else\n                                pr a\n                                  (ofNat Code (unpair (div2 (div2 n_4))).fst, ofNat Code (unpair (div2 (div2 n_4))).snd,\n                                    s₁, s₂))\n                          (List.get?\n                            (List.map\n                              (fun n =>\n                                rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n                                  (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n                                  (fun cf hf => rf a (cf, hf)) (ofNat Code n))\n                              (List.range (Nat.succ (Nat.succ (Nat.succ (Nat.succ n))))))\n                            (unpair (div2 (div2 n_4))).snd))\n                  n_3)\n              n_2)\n          n_1)\n      (List.length\n        (List.map\n          (fun n =>\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code n))\n          (List.range (Nat.succ (Nat.succ (Nat.succ (Nat.succ n))))))) =\n    some\n      (rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg)) (fun cf cg hf hg => co a (cf, cg, hf, hg))\n        (fun cf cg hf hg => pc a (cf, cg, hf, hg)) (fun cf hf => rf a (cf, hf))\n        (ofNat Code (Nat.succ (Nat.succ (Nat.succ (Nat.succ n))))))\n[PROOFSTEP]\nrw [List.length_map, List.length_range]\n[GOAL]\ncase succ.succ.succ.succ\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code × Code × σ × σ → σ\nhpr : Primrec₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Primrec₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Primrec₂ pc\nrf : α → Code × σ → σ\nhrf : Primrec₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\nthis✝ : Primrec G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Primrec₂ G\na : α\nn : ℕ\n⊢ Nat.rec (some (z a))\n      (fun n_1 n_ih =>\n        Nat.rec (some (s a))\n          (fun n_2 n_ih =>\n            Nat.rec (some (l a))\n              (fun n_3 n_ih =>\n                Nat.rec (some (r a))\n                  (fun n_4 n_ih =>\n                    Option.bind\n                      (List.get?\n                        (List.map\n                          (fun n =>\n                            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n                              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n                              (fun cf hf => rf a (cf, hf)) (ofNat Code n))\n                          (List.range (Nat.succ (Nat.succ (Nat.succ (Nat.succ n))))))\n                        (div2 (div2 n_4)))\n                      fun s_1 =>\n                      Option.bind\n                        (List.get?\n                          (List.map\n                            (fun n =>\n                              rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n                                (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n                                (fun cf hf => rf a (cf, hf)) (ofNat Code n))\n                            (List.range (Nat.succ (Nat.succ (Nat.succ (Nat.succ n))))))\n                          (unpair (div2 (div2 n_4))).fst)\n                        fun s₁ =>\n                        Option.map\n                          (fun s₂ =>\n                            bif bodd n_4 then\n                              bif bodd (div2 n_4) then rf a (ofNat Code (div2 (div2 n_4)), s_1)\n                              else\n                                pc a\n                                  (ofNat Code (unpair (div2 (div2 n_4))).fst, ofNat Code (unpair (div2 (div2 n_4))).snd,\n                                    s₁, s₂)\n                            else\n                              bif bodd (div2 n_4) then\n                                co a\n                                  (ofNat Code (unpair (div2 (div2 n_4))).fst, ofNat Code (unpair (div2 (div2 n_4))).snd,\n                                    s₁, s₂)\n                              else\n                                pr a\n                                  (ofNat Code (unpair (div2 (div2 n_4))).fst, ofNat Code (unpair (div2 (div2 n_4))).snd,\n                                    s₁, s₂))\n                          (List.get?\n                            (List.map\n                              (fun n =>\n                                rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n                                  (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n                                  (fun cf hf => rf a (cf, hf)) (ofNat Code n))\n                              (List.range (Nat.succ (Nat.succ (Nat.succ (Nat.succ n))))))\n                            (unpair (div2 (div2 n_4))).snd))\n                  n_3)\n              n_2)\n          n_1)\n      (Nat.succ (Nat.succ (Nat.succ (Nat.succ n)))) =\n    some\n      (rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg)) (fun cf cg hf hg => co a (cf, cg, hf, hg))\n        (fun cf cg hf hg => pc a (cf, cg, hf, hg)) (fun cf hf => rf a (cf, hf))\n        (ofNat Code (Nat.succ (Nat.succ (Nat.succ (Nat.succ n))))))\n[PROOFSTEP]\nlet m := n.div2.div2\n[GOAL]\ncase succ.succ.succ.succ\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code × Code × σ × σ → σ\nhpr : Primrec₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Primrec₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Primrec₂ pc\nrf : α → Code × σ → σ\nhrf : Primrec₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\nthis✝ : Primrec G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Primrec₂ G\na : α\nn : ℕ\nm : ℕ := div2 (div2 n)\n⊢ Nat.rec (some (z a))\n      (fun n_1 n_ih =>\n        Nat.rec (some (s a))\n          (fun n_2 n_ih =>\n            Nat.rec (some (l a))\n              (fun n_3 n_ih =>\n                Nat.rec (some (r a))\n                  (fun n_4 n_ih =>\n                    Option.bind\n                      (List.get?\n                        (List.map\n                          (fun n =>\n                            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n                              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n                              (fun cf hf => rf a (cf, hf)) (ofNat Code n))\n                          (List.range (Nat.succ (Nat.succ (Nat.succ (Nat.succ n))))))\n                        (div2 (div2 n_4)))\n                      fun s_1 =>\n                      Option.bind\n                        (List.get?\n                          (List.map\n                            (fun n =>\n                              rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n                                (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n                                (fun cf hf => rf a (cf, hf)) (ofNat Code n))\n                            (List.range (Nat.succ (Nat.succ (Nat.succ (Nat.succ n))))))\n                          (unpair (div2 (div2 n_4))).fst)\n                        fun s₁ =>\n                        Option.map\n                          (fun s₂ =>\n                            bif bodd n_4 then\n                              bif bodd (div2 n_4) then rf a (ofNat Code (div2 (div2 n_4)), s_1)\n                              else\n                                pc a\n                                  (ofNat Code (unpair (div2 (div2 n_4))).fst, ofNat Code (unpair (div2 (div2 n_4))).snd,\n                                    s₁, s₂)\n                            else\n                              bif bodd (div2 n_4) then\n                                co a\n                                  (ofNat Code (unpair (div2 (div2 n_4))).fst, ofNat Code (unpair (div2 (div2 n_4))).snd,\n                                    s₁, s₂)\n                              else\n                                pr a\n                                  (ofNat Code (unpair (div2 (div2 n_4))).fst, ofNat Code (unpair (div2 (div2 n_4))).snd,\n                                    s₁, s₂))\n                          (List.get?\n                            (List.map\n                              (fun n =>\n                                rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n                                  (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n                                  (fun cf hf => rf a (cf, hf)) (ofNat Code n))\n                              (List.range (Nat.succ (Nat.succ (Nat.succ (Nat.succ n))))))\n                            (unpair (div2 (div2 n_4))).snd))\n                  n_3)\n              n_2)\n          n_1)\n      (Nat.succ (Nat.succ (Nat.succ (Nat.succ n)))) =\n    some\n      (rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg)) (fun cf cg hf hg => co a (cf, cg, hf, hg))\n        (fun cf cg hf hg => pc a (cf, cg, hf, hg)) (fun cf hf => rf a (cf, hf))\n        (ofNat Code (Nat.succ (Nat.succ (Nat.succ (Nat.succ n))))))\n[PROOFSTEP]\nshow G₁ ((a, (List.range (n + 4)).map fun n => F a (ofNat Code n)), n, m) = some (F a (ofNat Code (n + 4)))\n[GOAL]\ncase succ.succ.succ.succ\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code × Code × σ × σ → σ\nhpr : Primrec₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Primrec₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Primrec₂ pc\nrf : α → Code × σ → σ\nhrf : Primrec₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\nthis✝ : Primrec G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Primrec₂ G\na : α\nn : ℕ\nm : ℕ := div2 (div2 n)\n⊢ G₁ ((a, List.map (fun n => F a (ofNat Code n)) (List.range (n + 4))), n, m) = some (F a (ofNat Code (n + 4)))\n[PROOFSTEP]\nhave hm : m < n + 4 := by\n  simp [Nat.div2_val]\n  exact lt_of_le_of_lt (le_trans (Nat.div_le_self _ _) (Nat.div_le_self _ _)) (Nat.succ_le_succ (Nat.le_add_right _ _))\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code × Code × σ × σ → σ\nhpr : Primrec₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Primrec₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Primrec₂ pc\nrf : α → Code × σ → σ\nhrf : Primrec₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\nthis✝ : Primrec G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Primrec₂ G\na : α\nn : ℕ\nm : ℕ := div2 (div2 n)\n⊢ m < n + 4\n[PROOFSTEP]\nsimp [Nat.div2_val]\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code × Code × σ × σ → σ\nhpr : Primrec₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Primrec₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Primrec₂ pc\nrf : α → Code × σ → σ\nhrf : Primrec₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\nthis✝ : Primrec G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Primrec₂ G\na : α\nn : ℕ\nm : ℕ := div2 (div2 n)\n⊢ n / 2 / 2 < n + 4\n[PROOFSTEP]\nexact lt_of_le_of_lt (le_trans (Nat.div_le_self _ _) (Nat.div_le_self _ _)) (Nat.succ_le_succ (Nat.le_add_right _ _))\n[GOAL]\ncase succ.succ.succ.succ\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code × Code × σ × σ → σ\nhpr : Primrec₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Primrec₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Primrec₂ pc\nrf : α → Code × σ → σ\nhrf : Primrec₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\nthis✝ : Primrec G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Primrec₂ G\na : α\nn : ℕ\nm : ℕ := div2 (div2 n)\nhm : m < n + 4\n⊢ G₁ ((a, List.map (fun n => F a (ofNat Code n)) (List.range (n + 4))), n, m) = some (F a (ofNat Code (n + 4)))\n[PROOFSTEP]\nhave m1 : m.unpair.1 < n + 4 := lt_of_le_of_lt m.unpair_left_le hm\n[GOAL]\ncase succ.succ.succ.succ\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code × Code × σ × σ → σ\nhpr : Primrec₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Primrec₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Primrec₂ pc\nrf : α → Code × σ → σ\nhrf : Primrec₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\nthis✝ : Primrec G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Primrec₂ G\na : α\nn : ℕ\nm : ℕ := div2 (div2 n)\nhm : m < n + 4\nm1 : (unpair m).fst < n + 4\n⊢ G₁ ((a, List.map (fun n => F a (ofNat Code n)) (List.range (n + 4))), n, m) = some (F a (ofNat Code (n + 4)))\n[PROOFSTEP]\nhave m2 : m.unpair.2 < n + 4 := lt_of_le_of_lt m.unpair_right_le hm\n[GOAL]\ncase succ.succ.succ.succ\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code × Code × σ × σ → σ\nhpr : Primrec₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Primrec₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Primrec₂ pc\nrf : α → Code × σ → σ\nhrf : Primrec₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\nthis✝ : Primrec G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Primrec₂ G\na : α\nn : ℕ\nm : ℕ := div2 (div2 n)\nhm : m < n + 4\nm1 : (unpair m).fst < n + 4\nm2 : (unpair m).snd < n + 4\n⊢ G₁ ((a, List.map (fun n => F a (ofNat Code n)) (List.range (n + 4))), n, m) = some (F a (ofNat Code (n + 4)))\n[PROOFSTEP]\nsimp [List.get?_map, List.get?_range, hm, m1, m2]\n[GOAL]\ncase succ.succ.succ.succ\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code × Code × σ × σ → σ\nhpr : Primrec₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Primrec₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Primrec₂ pc\nrf : α → Code × σ → σ\nhrf : Primrec₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\nthis✝ : Primrec G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Primrec₂ G\na : α\nn : ℕ\nm : ℕ := div2 (div2 n)\nhm : m < n + 4\nm1 : (unpair m).fst < n + 4\nm2 : (unpair m).snd < n + 4\n⊢ (bif bodd n then\n      bif bodd (div2 n) then\n        rf a\n          (ofNat Code (div2 (div2 n)),\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (div2 (div2 n))))\n      else\n        pc a\n          (ofNat Code (unpair (div2 (div2 n))).fst, ofNat Code (unpair (div2 (div2 n))).snd,\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).fst),\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).snd))\n    else\n      bif bodd (div2 n) then\n        co a\n          (ofNat Code (unpair (div2 (div2 n))).fst, ofNat Code (unpair (div2 (div2 n))).snd,\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).fst),\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).snd))\n      else\n        pr a\n          (ofNat Code (unpair (div2 (div2 n))).fst, ofNat Code (unpair (div2 (div2 n))).snd,\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).fst),\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).snd))) =\n    rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg)) (fun cf cg hf hg => co a (cf, cg, hf, hg))\n      (fun cf cg hf hg => pc a (cf, cg, hf, hg)) (fun cf hf => rf a (cf, hf)) (ofNat Code (n + 4))\n[PROOFSTEP]\nrw [show ofNat Code (n + 4) = ofNatCode (n + 4) from rfl]\n[GOAL]\ncase succ.succ.succ.succ\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code × Code × σ × σ → σ\nhpr : Primrec₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Primrec₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Primrec₂ pc\nrf : α → Code × σ → σ\nhrf : Primrec₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\nthis✝ : Primrec G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Primrec₂ G\na : α\nn : ℕ\nm : ℕ := div2 (div2 n)\nhm : m < n + 4\nm1 : (unpair m).fst < n + 4\nm2 : (unpair m).snd < n + 4\n⊢ (bif bodd n then\n      bif bodd (div2 n) then\n        rf a\n          (ofNat Code (div2 (div2 n)),\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (div2 (div2 n))))\n      else\n        pc a\n          (ofNat Code (unpair (div2 (div2 n))).fst, ofNat Code (unpair (div2 (div2 n))).snd,\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).fst),\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).snd))\n    else\n      bif bodd (div2 n) then\n        co a\n          (ofNat Code (unpair (div2 (div2 n))).fst, ofNat Code (unpair (div2 (div2 n))).snd,\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).fst),\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).snd))\n      else\n        pr a\n          (ofNat Code (unpair (div2 (div2 n))).fst, ofNat Code (unpair (div2 (div2 n))).snd,\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).fst),\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).snd))) =\n    rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg)) (fun cf cg hf hg => co a (cf, cg, hf, hg))\n      (fun cf cg hf hg => pc a (cf, cg, hf, hg)) (fun cf hf => rf a (cf, hf)) (ofNatCode (n + 4))\n[PROOFSTEP]\nsimp [ofNatCode]\n[GOAL]\ncase succ.succ.succ.succ\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code × Code × σ × σ → σ\nhpr : Primrec₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Primrec₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Primrec₂ pc\nrf : α → Code × σ → σ\nhrf : Primrec₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\nthis✝ : Primrec G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Primrec₂ G\na : α\nn : ℕ\nm : ℕ := div2 (div2 n)\nhm : m < n + 4\nm1 : (unpair m).fst < n + 4\nm2 : (unpair m).snd < n + 4\n⊢ (bif bodd n then\n      bif bodd (div2 n) then\n        rf a\n          (ofNat Code (div2 (div2 n)),\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (div2 (div2 n))))\n      else\n        pc a\n          (ofNat Code (unpair (div2 (div2 n))).fst, ofNat Code (unpair (div2 (div2 n))).snd,\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).fst),\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).snd))\n    else\n      bif bodd (div2 n) then\n        co a\n          (ofNat Code (unpair (div2 (div2 n))).fst, ofNat Code (unpair (div2 (div2 n))).snd,\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).fst),\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).snd))\n      else\n        pr a\n          (ofNat Code (unpair (div2 (div2 n))).fst, ofNat Code (unpair (div2 (div2 n))).snd,\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).fst),\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).snd))) =\n    rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg)) (fun cf cg hf hg => co a (cf, cg, hf, hg))\n      (fun cf cg hf hg => pc a (cf, cg, hf, hg)) (fun cf hf => rf a (cf, hf))\n      (match bodd n, bodd (div2 n) with\n      | false, false => pair (ofNatCode (unpair (div2 (div2 n))).fst) (ofNatCode (unpair (div2 (div2 n))).snd)\n      | false, true => comp (ofNatCode (unpair (div2 (div2 n))).fst) (ofNatCode (unpair (div2 (div2 n))).snd)\n      | true, false => prec (ofNatCode (unpair (div2 (div2 n))).fst) (ofNatCode (unpair (div2 (div2 n))).snd)\n      | true, true => rfind' (ofNatCode (div2 (div2 n))))\n[PROOFSTEP]\ncases n.bodd\n[GOAL]\ncase succ.succ.succ.succ.false\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code × Code × σ × σ → σ\nhpr : Primrec₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Primrec₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Primrec₂ pc\nrf : α → Code × σ → σ\nhrf : Primrec₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\nthis✝ : Primrec G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Primrec₂ G\na : α\nn : ℕ\nm : ℕ := div2 (div2 n)\nhm : m < n + 4\nm1 : (unpair m).fst < n + 4\nm2 : (unpair m).snd < n + 4\n⊢ (bif false then\n      bif bodd (div2 n) then\n        rf a\n          (ofNat Code (div2 (div2 n)),\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (div2 (div2 n))))\n      else\n        pc a\n          (ofNat Code (unpair (div2 (div2 n))).fst, ofNat Code (unpair (div2 (div2 n))).snd,\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).fst),\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).snd))\n    else\n      bif bodd (div2 n) then\n        co a\n          (ofNat Code (unpair (div2 (div2 n))).fst, ofNat Code (unpair (div2 (div2 n))).snd,\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).fst),\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).snd))\n      else\n        pr a\n          (ofNat Code (unpair (div2 (div2 n))).fst, ofNat Code (unpair (div2 (div2 n))).snd,\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).fst),\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).snd))) =\n    rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg)) (fun cf cg hf hg => co a (cf, cg, hf, hg))\n      (fun cf cg hf hg => pc a (cf, cg, hf, hg)) (fun cf hf => rf a (cf, hf))\n      (match false, bodd (div2 n) with\n      | false, false => pair (ofNatCode (unpair (div2 (div2 n))).fst) (ofNatCode (unpair (div2 (div2 n))).snd)\n      | false, true => comp (ofNatCode (unpair (div2 (div2 n))).fst) (ofNatCode (unpair (div2 (div2 n))).snd)\n      | true, false => prec (ofNatCode (unpair (div2 (div2 n))).fst) (ofNatCode (unpair (div2 (div2 n))).snd)\n      | true, true => rfind' (ofNatCode (div2 (div2 n))))\n[PROOFSTEP]\ncases n.div2.bodd\n[GOAL]\ncase succ.succ.succ.succ.true\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code × Code × σ × σ → σ\nhpr : Primrec₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Primrec₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Primrec₂ pc\nrf : α → Code × σ → σ\nhrf : Primrec₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\nthis✝ : Primrec G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Primrec₂ G\na : α\nn : ℕ\nm : ℕ := div2 (div2 n)\nhm : m < n + 4\nm1 : (unpair m).fst < n + 4\nm2 : (unpair m).snd < n + 4\n⊢ (bif true then\n      bif bodd (div2 n) then\n        rf a\n          (ofNat Code (div2 (div2 n)),\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (div2 (div2 n))))\n      else\n        pc a\n          (ofNat Code (unpair (div2 (div2 n))).fst, ofNat Code (unpair (div2 (div2 n))).snd,\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).fst),\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).snd))\n    else\n      bif bodd (div2 n) then\n        co a\n          (ofNat Code (unpair (div2 (div2 n))).fst, ofNat Code (unpair (div2 (div2 n))).snd,\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).fst),\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).snd))\n      else\n        pr a\n          (ofNat Code (unpair (div2 (div2 n))).fst, ofNat Code (unpair (div2 (div2 n))).snd,\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).fst),\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).snd))) =\n    rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg)) (fun cf cg hf hg => co a (cf, cg, hf, hg))\n      (fun cf cg hf hg => pc a (cf, cg, hf, hg)) (fun cf hf => rf a (cf, hf))\n      (match true, bodd (div2 n) with\n      | false, false => pair (ofNatCode (unpair (div2 (div2 n))).fst) (ofNatCode (unpair (div2 (div2 n))).snd)\n      | false, true => comp (ofNatCode (unpair (div2 (div2 n))).fst) (ofNatCode (unpair (div2 (div2 n))).snd)\n      | true, false => prec (ofNatCode (unpair (div2 (div2 n))).fst) (ofNatCode (unpair (div2 (div2 n))).snd)\n      | true, true => rfind' (ofNatCode (div2 (div2 n))))\n[PROOFSTEP]\ncases n.div2.bodd\n[GOAL]\ncase succ.succ.succ.succ.false.false\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code × Code × σ × σ → σ\nhpr : Primrec₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Primrec₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Primrec₂ pc\nrf : α → Code × σ → σ\nhrf : Primrec₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\nthis✝ : Primrec G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Primrec₂ G\na : α\nn : ℕ\nm : ℕ := div2 (div2 n)\nhm : m < n + 4\nm1 : (unpair m).fst < n + 4\nm2 : (unpair m).snd < n + 4\n⊢ (bif false then\n      bif false then\n        rf a\n          (ofNat Code (div2 (div2 n)),\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (div2 (div2 n))))\n      else\n        pc a\n          (ofNat Code (unpair (div2 (div2 n))).fst, ofNat Code (unpair (div2 (div2 n))).snd,\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).fst),\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).snd))\n    else\n      bif false then\n        co a\n          (ofNat Code (unpair (div2 (div2 n))).fst, ofNat Code (unpair (div2 (div2 n))).snd,\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).fst),\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).snd))\n      else\n        pr a\n          (ofNat Code (unpair (div2 (div2 n))).fst, ofNat Code (unpair (div2 (div2 n))).snd,\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).fst),\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).snd))) =\n    rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg)) (fun cf cg hf hg => co a (cf, cg, hf, hg))\n      (fun cf cg hf hg => pc a (cf, cg, hf, hg)) (fun cf hf => rf a (cf, hf))\n      (match false, false with\n      | false, false => pair (ofNatCode (unpair (div2 (div2 n))).fst) (ofNatCode (unpair (div2 (div2 n))).snd)\n      | false, true => comp (ofNatCode (unpair (div2 (div2 n))).fst) (ofNatCode (unpair (div2 (div2 n))).snd)\n      | true, false => prec (ofNatCode (unpair (div2 (div2 n))).fst) (ofNatCode (unpair (div2 (div2 n))).snd)\n      | true, true => rfind' (ofNatCode (div2 (div2 n))))\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ.succ.succ.succ.false.true\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code × Code × σ × σ → σ\nhpr : Primrec₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Primrec₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Primrec₂ pc\nrf : α → Code × σ → σ\nhrf : Primrec₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\nthis✝ : Primrec G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Primrec₂ G\na : α\nn : ℕ\nm : ℕ := div2 (div2 n)\nhm : m < n + 4\nm1 : (unpair m).fst < n + 4\nm2 : (unpair m).snd < n + 4\n⊢ (bif false then\n      bif true then\n        rf a\n          (ofNat Code (div2 (div2 n)),\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (div2 (div2 n))))\n      else\n        pc a\n          (ofNat Code (unpair (div2 (div2 n))).fst, ofNat Code (unpair (div2 (div2 n))).snd,\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).fst),\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).snd))\n    else\n      bif true then\n        co a\n          (ofNat Code (unpair (div2 (div2 n))).fst, ofNat Code (unpair (div2 (div2 n))).snd,\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).fst),\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).snd))\n      else\n        pr a\n          (ofNat Code (unpair (div2 (div2 n))).fst, ofNat Code (unpair (div2 (div2 n))).snd,\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).fst),\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).snd))) =\n    rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg)) (fun cf cg hf hg => co a (cf, cg, hf, hg))\n      (fun cf cg hf hg => pc a (cf, cg, hf, hg)) (fun cf hf => rf a (cf, hf))\n      (match false, true with\n      | false, false => pair (ofNatCode (unpair (div2 (div2 n))).fst) (ofNatCode (unpair (div2 (div2 n))).snd)\n      | false, true => comp (ofNatCode (unpair (div2 (div2 n))).fst) (ofNatCode (unpair (div2 (div2 n))).snd)\n      | true, false => prec (ofNatCode (unpair (div2 (div2 n))).fst) (ofNatCode (unpair (div2 (div2 n))).snd)\n      | true, true => rfind' (ofNatCode (div2 (div2 n))))\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ.succ.succ.succ.true.false\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code × Code × σ × σ → σ\nhpr : Primrec₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Primrec₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Primrec₂ pc\nrf : α → Code × σ → σ\nhrf : Primrec₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\nthis✝ : Primrec G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Primrec₂ G\na : α\nn : ℕ\nm : ℕ := div2 (div2 n)\nhm : m < n + 4\nm1 : (unpair m).fst < n + 4\nm2 : (unpair m).snd < n + 4\n⊢ (bif true then\n      bif false then\n        rf a\n          (ofNat Code (div2 (div2 n)),\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (div2 (div2 n))))\n      else\n        pc a\n          (ofNat Code (unpair (div2 (div2 n))).fst, ofNat Code (unpair (div2 (div2 n))).snd,\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).fst),\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).snd))\n    else\n      bif false then\n        co a\n          (ofNat Code (unpair (div2 (div2 n))).fst, ofNat Code (unpair (div2 (div2 n))).snd,\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).fst),\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).snd))\n      else\n        pr a\n          (ofNat Code (unpair (div2 (div2 n))).fst, ofNat Code (unpair (div2 (div2 n))).snd,\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).fst),\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).snd))) =\n    rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg)) (fun cf cg hf hg => co a (cf, cg, hf, hg))\n      (fun cf cg hf hg => pc a (cf, cg, hf, hg)) (fun cf hf => rf a (cf, hf))\n      (match true, false with\n      | false, false => pair (ofNatCode (unpair (div2 (div2 n))).fst) (ofNatCode (unpair (div2 (div2 n))).snd)\n      | false, true => comp (ofNatCode (unpair (div2 (div2 n))).fst) (ofNatCode (unpair (div2 (div2 n))).snd)\n      | true, false => prec (ofNatCode (unpair (div2 (div2 n))).fst) (ofNatCode (unpair (div2 (div2 n))).snd)\n      | true, true => rfind' (ofNatCode (div2 (div2 n))))\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ.succ.succ.succ.true.true\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code × Code × σ × σ → σ\nhpr : Primrec₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Primrec₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Primrec₂ pc\nrf : α → Code × σ → σ\nhrf : Primrec₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\nthis✝ : Primrec G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Primrec₂ G\na : α\nn : ℕ\nm : ℕ := div2 (div2 n)\nhm : m < n + 4\nm1 : (unpair m).fst < n + 4\nm2 : (unpair m).snd < n + 4\n⊢ (bif true then\n      bif true then\n        rf a\n          (ofNat Code (div2 (div2 n)),\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (div2 (div2 n))))\n      else\n        pc a\n          (ofNat Code (unpair (div2 (div2 n))).fst, ofNat Code (unpair (div2 (div2 n))).snd,\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).fst),\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).snd))\n    else\n      bif true then\n        co a\n          (ofNat Code (unpair (div2 (div2 n))).fst, ofNat Code (unpair (div2 (div2 n))).snd,\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).fst),\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).snd))\n      else\n        pr a\n          (ofNat Code (unpair (div2 (div2 n))).fst, ofNat Code (unpair (div2 (div2 n))).snd,\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).fst),\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).snd))) =\n    rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg)) (fun cf cg hf hg => co a (cf, cg, hf, hg))\n      (fun cf cg hf hg => pc a (cf, cg, hf, hg)) (fun cf hf => rf a (cf, hf))\n      (match true, true with\n      | false, false => pair (ofNatCode (unpair (div2 (div2 n))).fst) (ofNatCode (unpair (div2 (div2 n))).snd)\n      | false, true => comp (ofNatCode (unpair (div2 (div2 n))).fst) (ofNatCode (unpair (div2 (div2 n))).snd)\n      | true, false => prec (ofNatCode (unpair (div2 (div2 n))).fst) (ofNatCode (unpair (div2 (div2 n))).snd)\n      | true, true => rfind' (ofNatCode (div2 (div2 n))))\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code → Code → σ → σ → σ\nhpr : Primrec fun a => pr a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nco : α → Code → Code → σ → σ → σ\nhco : Primrec fun a => co a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\npc : α → Code → Code → σ → σ → σ\nhpc : Primrec fun a => pc a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nrf : α → Code → σ → σ\nhrf : Primrec fun a => rf a.fst a.snd.fst a.snd.snd\n⊢ let F := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a);\n  Primrec fun a => F a (c a)\n[PROOFSTEP]\nintros F\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code → Code → σ → σ → σ\nhpr : Primrec fun a => pr a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nco : α → Code → Code → σ → σ → σ\nhco : Primrec fun a => co a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\npc : α → Code → Code → σ → σ → σ\nhpc : Primrec fun a => pc a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nrf : α → Code → σ → σ\nhrf : Primrec fun a => rf a.fst a.snd.fst a.snd.snd\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a)\n⊢ Primrec fun a => F a (c a)\n[PROOFSTEP]\nlet G₁ : (α × List σ) × ℕ × ℕ → Option σ := fun p =>\n  let a := p.1.1\n  let IH := p.1.2\n  let n := p.2.1\n  let m := p.2.2\n  (IH.get? m).bind fun s =>\n    (IH.get? m.unpair.1).bind fun s₁ =>\n      (IH.get? m.unpair.2).map fun s₂ =>\n        cond n.bodd\n          (cond n.div2.bodd (rf a (ofNat Code m) s) (pc a (ofNat Code m.unpair.1) (ofNat Code m.unpair.2) s₁ s₂))\n          (cond n.div2.bodd (co a (ofNat Code m.unpair.1) (ofNat Code m.unpair.2) s₁ s₂)\n            (pr a (ofNat Code m.unpair.1) (ofNat Code m.unpair.2) s₁ s₂))\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code → Code → σ → σ → σ\nhpr : Primrec fun a => pr a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nco : α → Code → Code → σ → σ → σ\nhco : Primrec fun a => co a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\npc : α → Code → Code → σ → σ → σ\nhpc : Primrec fun a => pc a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nrf : α → Code → σ → σ\nhrf : Primrec fun a => rf a.fst a.snd.fst a.snd.snd\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m) s\n              else pc a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n              else pr a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂)\n          (List.get? IH (unpair m).snd)\n⊢ Primrec fun a => F a (c a)\n[PROOFSTEP]\nhave : Primrec G₁ := by\n  refine' option_bind (list_get?.comp (snd.comp fst) (snd.comp snd)) _\n  unfold Primrec₂\n  refine' option_bind ((list_get?.comp (snd.comp fst) (fst.comp <| Primrec.unpair.comp (snd.comp snd))).comp fst) _\n  unfold Primrec₂\n  refine'\n    option_map ((list_get?.comp (snd.comp fst) (snd.comp <| Primrec.unpair.comp (snd.comp snd))).comp <| fst.comp fst) _\n  have a : Primrec (fun p : ((((α × List σ) × ℕ × ℕ) × σ) × σ) × σ => p.1.1.1.1.1) :=\n    fst.comp (fst.comp <| fst.comp <| fst.comp fst)\n  have n : Primrec (fun p : ((((α × List σ) × ℕ × ℕ) × σ) × σ) × σ => p.1.1.1.2.1) :=\n    fst.comp (snd.comp <| fst.comp <| fst.comp fst)\n  have m : Primrec (fun p : ((((α × List σ) × ℕ × ℕ) × σ) × σ) × σ => p.1.1.1.2.2) :=\n    snd.comp (snd.comp <| fst.comp <| fst.comp fst)\n  have m₁ := fst.comp (Primrec.unpair.comp m)\n  have m₂ := snd.comp (Primrec.unpair.comp m)\n  have s : Primrec (fun p : ((((α × List σ) × ℕ × ℕ) × σ) × σ) × σ => p.1.1.2) := snd.comp (fst.comp fst)\n  have s₁ : Primrec (fun p : ((((α × List σ) × ℕ × ℕ) × σ) × σ) × σ => p.1.2) := snd.comp fst\n  have s₂ : Primrec (fun p : ((((α × List σ) × ℕ × ℕ) × σ) × σ) × σ => p.2) := snd\n  have h₁ := hrf.comp <| a.pair (((Primrec.ofNat Code).comp m).pair s)\n  have h₂ :=\n    hpc.comp <| a.pair (((Primrec.ofNat Code).comp m₁).pair <| ((Primrec.ofNat Code).comp m₂).pair <| s₁.pair s₂)\n  have h₃ :=\n    hco.comp <| a.pair (((Primrec.ofNat Code).comp m₁).pair <| ((Primrec.ofNat Code).comp m₂).pair <| s₁.pair s₂)\n  have h₄ :=\n    hpr.comp <| a.pair (((Primrec.ofNat Code).comp m₁).pair <| ((Primrec.ofNat Code).comp m₂).pair <| s₁.pair s₂)\n  unfold Primrec₂\n  exact\n    (nat_bodd.comp n).cond ((nat_bodd.comp <| nat_div2.comp n).cond h₁ h₂)\n      (cond (nat_bodd.comp <| nat_div2.comp n) h₃ h₄)\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code → Code → σ → σ → σ\nhpr : Primrec fun a => pr a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nco : α → Code → Code → σ → σ → σ\nhco : Primrec fun a => co a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\npc : α → Code → Code → σ → σ → σ\nhpc : Primrec fun a => pc a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nrf : α → Code → σ → σ\nhrf : Primrec fun a => rf a.fst a.snd.fst a.snd.snd\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m) s\n              else pc a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n              else pr a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂)\n          (List.get? IH (unpair m).snd)\n⊢ Primrec G₁\n[PROOFSTEP]\nrefine' option_bind (list_get?.comp (snd.comp fst) (snd.comp snd)) _\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code → Code → σ → σ → σ\nhpr : Primrec fun a => pr a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nco : α → Code → Code → σ → σ → σ\nhco : Primrec fun a => co a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\npc : α → Code → Code → σ → σ → σ\nhpc : Primrec fun a => pc a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nrf : α → Code → σ → σ\nhrf : Primrec fun a => rf a.fst a.snd.fst a.snd.snd\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m) s\n              else pc a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n              else pr a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂)\n          (List.get? IH (unpair m).snd)\n⊢ Primrec₂ fun p s =>\n    Option.bind (List.get? p.fst.snd (unpair p.snd.snd).fst) fun s₁ =>\n      Option.map\n        (fun s₂ =>\n          bif bodd p.snd.fst then\n            bif bodd (div2 p.snd.fst) then rf p.fst.fst (ofNat Code p.snd.snd) s\n            else pc p.fst.fst (ofNat Code (unpair p.snd.snd).fst) (ofNat Code (unpair p.snd.snd).snd) s₁ s₂\n          else\n            bif bodd (div2 p.snd.fst) then\n              co p.fst.fst (ofNat Code (unpair p.snd.snd).fst) (ofNat Code (unpair p.snd.snd).snd) s₁ s₂\n            else pr p.fst.fst (ofNat Code (unpair p.snd.snd).fst) (ofNat Code (unpair p.snd.snd).snd) s₁ s₂)\n        (List.get? p.fst.snd (unpair p.snd.snd).snd)\n[PROOFSTEP]\nunfold Primrec₂\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code → Code → σ → σ → σ\nhpr : Primrec fun a => pr a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nco : α → Code → Code → σ → σ → σ\nhco : Primrec fun a => co a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\npc : α → Code → Code → σ → σ → σ\nhpc : Primrec fun a => pc a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nrf : α → Code → σ → σ\nhrf : Primrec fun a => rf a.fst a.snd.fst a.snd.snd\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m) s\n              else pc a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n              else pr a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂)\n          (List.get? IH (unpair m).snd)\n⊢ Primrec fun p =>\n    (fun p s =>\n        Option.bind (List.get? p.fst.snd (unpair p.snd.snd).fst) fun s₁ =>\n          Option.map\n            (fun s₂ =>\n              bif bodd p.snd.fst then\n                bif bodd (div2 p.snd.fst) then rf p.fst.fst (ofNat Code p.snd.snd) s\n                else pc p.fst.fst (ofNat Code (unpair p.snd.snd).fst) (ofNat Code (unpair p.snd.snd).snd) s₁ s₂\n              else\n                bif bodd (div2 p.snd.fst) then\n                  co p.fst.fst (ofNat Code (unpair p.snd.snd).fst) (ofNat Code (unpair p.snd.snd).snd) s₁ s₂\n                else pr p.fst.fst (ofNat Code (unpair p.snd.snd).fst) (ofNat Code (unpair p.snd.snd).snd) s₁ s₂)\n            (List.get? p.fst.snd (unpair p.snd.snd).snd))\n      p.fst p.snd\n[PROOFSTEP]\nrefine' option_bind ((list_get?.comp (snd.comp fst) (fst.comp <| Primrec.unpair.comp (snd.comp snd))).comp fst) _\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code → Code → σ → σ → σ\nhpr : Primrec fun a => pr a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nco : α → Code → Code → σ → σ → σ\nhco : Primrec fun a => co a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\npc : α → Code → Code → σ → σ → σ\nhpc : Primrec fun a => pc a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nrf : α → Code → σ → σ\nhrf : Primrec fun a => rf a.fst a.snd.fst a.snd.snd\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m) s\n              else pc a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n              else pr a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂)\n          (List.get? IH (unpair m).snd)\n⊢ Primrec₂ fun p s₁ =>\n    Option.map\n      (fun s₂ =>\n        bif bodd p.fst.snd.fst then\n          bif bodd (div2 p.fst.snd.fst) then rf p.fst.fst.fst (ofNat Code p.fst.snd.snd) p.snd\n          else pc p.fst.fst.fst (ofNat Code (unpair p.fst.snd.snd).fst) (ofNat Code (unpair p.fst.snd.snd).snd) s₁ s₂\n        else\n          bif bodd (div2 p.fst.snd.fst) then\n            co p.fst.fst.fst (ofNat Code (unpair p.fst.snd.snd).fst) (ofNat Code (unpair p.fst.snd.snd).snd) s₁ s₂\n          else pr p.fst.fst.fst (ofNat Code (unpair p.fst.snd.snd).fst) (ofNat Code (unpair p.fst.snd.snd).snd) s₁ s₂)\n      (List.get? p.fst.fst.snd (unpair p.fst.snd.snd).snd)\n[PROOFSTEP]\nunfold Primrec₂\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code → Code → σ → σ → σ\nhpr : Primrec fun a => pr a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nco : α → Code → Code → σ → σ → σ\nhco : Primrec fun a => co a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\npc : α → Code → Code → σ → σ → σ\nhpc : Primrec fun a => pc a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nrf : α → Code → σ → σ\nhrf : Primrec fun a => rf a.fst a.snd.fst a.snd.snd\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m) s\n              else pc a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n              else pr a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂)\n          (List.get? IH (unpair m).snd)\n⊢ Primrec fun p =>\n    (fun p s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd p.fst.snd.fst then\n              bif bodd (div2 p.fst.snd.fst) then rf p.fst.fst.fst (ofNat Code p.fst.snd.snd) p.snd\n              else\n                pc p.fst.fst.fst (ofNat Code (unpair p.fst.snd.snd).fst) (ofNat Code (unpair p.fst.snd.snd).snd) s₁ s₂\n            else\n              bif bodd (div2 p.fst.snd.fst) then\n                co p.fst.fst.fst (ofNat Code (unpair p.fst.snd.snd).fst) (ofNat Code (unpair p.fst.snd.snd).snd) s₁ s₂\n              else\n                pr p.fst.fst.fst (ofNat Code (unpair p.fst.snd.snd).fst) (ofNat Code (unpair p.fst.snd.snd).snd) s₁ s₂)\n          (List.get? p.fst.fst.snd (unpair p.fst.snd.snd).snd))\n      p.fst p.snd\n[PROOFSTEP]\nrefine'\n  option_map ((list_get?.comp (snd.comp fst) (snd.comp <| Primrec.unpair.comp (snd.comp snd))).comp <| fst.comp fst) _\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code → Code → σ → σ → σ\nhpr : Primrec fun a => pr a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nco : α → Code → Code → σ → σ → σ\nhco : Primrec fun a => co a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\npc : α → Code → Code → σ → σ → σ\nhpc : Primrec fun a => pc a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nrf : α → Code → σ → σ\nhrf : Primrec fun a => rf a.fst a.snd.fst a.snd.snd\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m) s\n              else pc a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n              else pr a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂)\n          (List.get? IH (unpair m).snd)\n⊢ Primrec₂ fun p s₂ =>\n    bif bodd p.fst.fst.snd.fst then\n      bif bodd (div2 p.fst.fst.snd.fst) then rf p.fst.fst.fst.fst (ofNat Code p.fst.fst.snd.snd) p.fst.snd\n      else\n        pc p.fst.fst.fst.fst (ofNat Code (unpair p.fst.fst.snd.snd).fst) (ofNat Code (unpair p.fst.fst.snd.snd).snd)\n          p.snd s₂\n    else\n      bif bodd (div2 p.fst.fst.snd.fst) then\n        co p.fst.fst.fst.fst (ofNat Code (unpair p.fst.fst.snd.snd).fst) (ofNat Code (unpair p.fst.fst.snd.snd).snd)\n          p.snd s₂\n      else\n        pr p.fst.fst.fst.fst (ofNat Code (unpair p.fst.fst.snd.snd).fst) (ofNat Code (unpair p.fst.fst.snd.snd).snd)\n          p.snd s₂\n[PROOFSTEP]\nhave a : Primrec (fun p : ((((α × List σ) × ℕ × ℕ) × σ) × σ) × σ => p.1.1.1.1.1) :=\n  fst.comp (fst.comp <| fst.comp <| fst.comp fst)\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code → Code → σ → σ → σ\nhpr : Primrec fun a => pr a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nco : α → Code → Code → σ → σ → σ\nhco : Primrec fun a => co a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\npc : α → Code → Code → σ → σ → σ\nhpc : Primrec fun a => pc a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nrf : α → Code → σ → σ\nhrf : Primrec fun a => rf a.fst a.snd.fst a.snd.snd\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m) s\n              else pc a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n              else pr a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂)\n          (List.get? IH (unpair m).snd)\na : Primrec fun p => p.fst.fst.fst.fst.fst\n⊢ Primrec₂ fun p s₂ =>\n    bif bodd p.fst.fst.snd.fst then\n      bif bodd (div2 p.fst.fst.snd.fst) then rf p.fst.fst.fst.fst (ofNat Code p.fst.fst.snd.snd) p.fst.snd\n      else\n        pc p.fst.fst.fst.fst (ofNat Code (unpair p.fst.fst.snd.snd).fst) (ofNat Code (unpair p.fst.fst.snd.snd).snd)\n          p.snd s₂\n    else\n      bif bodd (div2 p.fst.fst.snd.fst) then\n        co p.fst.fst.fst.fst (ofNat Code (unpair p.fst.fst.snd.snd).fst) (ofNat Code (unpair p.fst.fst.snd.snd).snd)\n          p.snd s₂\n      else\n        pr p.fst.fst.fst.fst (ofNat Code (unpair p.fst.fst.snd.snd).fst) (ofNat Code (unpair p.fst.fst.snd.snd).snd)\n          p.snd s₂\n[PROOFSTEP]\nhave n : Primrec (fun p : ((((α × List σ) × ℕ × ℕ) × σ) × σ) × σ => p.1.1.1.2.1) :=\n  fst.comp (snd.comp <| fst.comp <| fst.comp fst)\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code → Code → σ → σ → σ\nhpr : Primrec fun a => pr a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nco : α → Code → Code → σ → σ → σ\nhco : Primrec fun a => co a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\npc : α → Code → Code → σ → σ → σ\nhpc : Primrec fun a => pc a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nrf : α → Code → σ → σ\nhrf : Primrec fun a => rf a.fst a.snd.fst a.snd.snd\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m) s\n              else pc a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n              else pr a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂)\n          (List.get? IH (unpair m).snd)\na : Primrec fun p => p.fst.fst.fst.fst.fst\nn : Primrec fun p => p.fst.fst.fst.snd.fst\n⊢ Primrec₂ fun p s₂ =>\n    bif bodd p.fst.fst.snd.fst then\n      bif bodd (div2 p.fst.fst.snd.fst) then rf p.fst.fst.fst.fst (ofNat Code p.fst.fst.snd.snd) p.fst.snd\n      else\n        pc p.fst.fst.fst.fst (ofNat Code (unpair p.fst.fst.snd.snd).fst) (ofNat Code (unpair p.fst.fst.snd.snd).snd)\n          p.snd s₂\n    else\n      bif bodd (div2 p.fst.fst.snd.fst) then\n        co p.fst.fst.fst.fst (ofNat Code (unpair p.fst.fst.snd.snd).fst) (ofNat Code (unpair p.fst.fst.snd.snd).snd)\n          p.snd s₂\n      else\n        pr p.fst.fst.fst.fst (ofNat Code (unpair p.fst.fst.snd.snd).fst) (ofNat Code (unpair p.fst.fst.snd.snd).snd)\n          p.snd s₂\n[PROOFSTEP]\nhave m : Primrec (fun p : ((((α × List σ) × ℕ × ℕ) × σ) × σ) × σ => p.1.1.1.2.2) :=\n  snd.comp (snd.comp <| fst.comp <| fst.comp fst)\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code → Code → σ → σ → σ\nhpr : Primrec fun a => pr a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nco : α → Code → Code → σ → σ → σ\nhco : Primrec fun a => co a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\npc : α → Code → Code → σ → σ → σ\nhpc : Primrec fun a => pc a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nrf : α → Code → σ → σ\nhrf : Primrec fun a => rf a.fst a.snd.fst a.snd.snd\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m) s\n              else pc a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n              else pr a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂)\n          (List.get? IH (unpair m).snd)\na : Primrec fun p => p.fst.fst.fst.fst.fst\nn : Primrec fun p => p.fst.fst.fst.snd.fst\nm : Primrec fun p => p.fst.fst.fst.snd.snd\n⊢ Primrec₂ fun p s₂ =>\n    bif bodd p.fst.fst.snd.fst then\n      bif bodd (div2 p.fst.fst.snd.fst) then rf p.fst.fst.fst.fst (ofNat Code p.fst.fst.snd.snd) p.fst.snd\n      else\n        pc p.fst.fst.fst.fst (ofNat Code (unpair p.fst.fst.snd.snd).fst) (ofNat Code (unpair p.fst.fst.snd.snd).snd)\n          p.snd s₂\n    else\n      bif bodd (div2 p.fst.fst.snd.fst) then\n        co p.fst.fst.fst.fst (ofNat Code (unpair p.fst.fst.snd.snd).fst) (ofNat Code (unpair p.fst.fst.snd.snd).snd)\n          p.snd s₂\n      else\n        pr p.fst.fst.fst.fst (ofNat Code (unpair p.fst.fst.snd.snd).fst) (ofNat Code (unpair p.fst.fst.snd.snd).snd)\n          p.snd s₂\n[PROOFSTEP]\nhave m₁ := fst.comp (Primrec.unpair.comp m)\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code → Code → σ → σ → σ\nhpr : Primrec fun a => pr a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nco : α → Code → Code → σ → σ → σ\nhco : Primrec fun a => co a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\npc : α → Code → Code → σ → σ → σ\nhpc : Primrec fun a => pc a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nrf : α → Code → σ → σ\nhrf : Primrec fun a => rf a.fst a.snd.fst a.snd.snd\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m) s\n              else pc a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n              else pr a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂)\n          (List.get? IH (unpair m).snd)\na : Primrec fun p => p.fst.fst.fst.fst.fst\nn : Primrec fun p => p.fst.fst.fst.snd.fst\nm : Primrec fun p => p.fst.fst.fst.snd.snd\nm₁ : Primrec fun a => (unpair a.fst.fst.fst.snd.snd).fst\n⊢ Primrec₂ fun p s₂ =>\n    bif bodd p.fst.fst.snd.fst then\n      bif bodd (div2 p.fst.fst.snd.fst) then rf p.fst.fst.fst.fst (ofNat Code p.fst.fst.snd.snd) p.fst.snd\n      else\n        pc p.fst.fst.fst.fst (ofNat Code (unpair p.fst.fst.snd.snd).fst) (ofNat Code (unpair p.fst.fst.snd.snd).snd)\n          p.snd s₂\n    else\n      bif bodd (div2 p.fst.fst.snd.fst) then\n        co p.fst.fst.fst.fst (ofNat Code (unpair p.fst.fst.snd.snd).fst) (ofNat Code (unpair p.fst.fst.snd.snd).snd)\n          p.snd s₂\n      else\n        pr p.fst.fst.fst.fst (ofNat Code (unpair p.fst.fst.snd.snd).fst) (ofNat Code (unpair p.fst.fst.snd.snd).snd)\n          p.snd s₂\n[PROOFSTEP]\nhave m₂ := snd.comp (Primrec.unpair.comp m)\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code → Code → σ → σ → σ\nhpr : Primrec fun a => pr a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nco : α → Code → Code → σ → σ → σ\nhco : Primrec fun a => co a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\npc : α → Code → Code → σ → σ → σ\nhpc : Primrec fun a => pc a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nrf : α → Code → σ → σ\nhrf : Primrec fun a => rf a.fst a.snd.fst a.snd.snd\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m) s\n              else pc a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n              else pr a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂)\n          (List.get? IH (unpair m).snd)\na : Primrec fun p => p.fst.fst.fst.fst.fst\nn : Primrec fun p => p.fst.fst.fst.snd.fst\nm : Primrec fun p => p.fst.fst.fst.snd.snd\nm₁ : Primrec fun a => (unpair a.fst.fst.fst.snd.snd).fst\nm₂ : Primrec fun a => (unpair a.fst.fst.fst.snd.snd).snd\n⊢ Primrec₂ fun p s₂ =>\n    bif bodd p.fst.fst.snd.fst then\n      bif bodd (div2 p.fst.fst.snd.fst) then rf p.fst.fst.fst.fst (ofNat Code p.fst.fst.snd.snd) p.fst.snd\n      else\n        pc p.fst.fst.fst.fst (ofNat Code (unpair p.fst.fst.snd.snd).fst) (ofNat Code (unpair p.fst.fst.snd.snd).snd)\n          p.snd s₂\n    else\n      bif bodd (div2 p.fst.fst.snd.fst) then\n        co p.fst.fst.fst.fst (ofNat Code (unpair p.fst.fst.snd.snd).fst) (ofNat Code (unpair p.fst.fst.snd.snd).snd)\n          p.snd s₂\n      else\n        pr p.fst.fst.fst.fst (ofNat Code (unpair p.fst.fst.snd.snd).fst) (ofNat Code (unpair p.fst.fst.snd.snd).snd)\n          p.snd s₂\n[PROOFSTEP]\nhave s : Primrec (fun p : ((((α × List σ) × ℕ × ℕ) × σ) × σ) × σ => p.1.1.2) := snd.comp (fst.comp fst)\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns✝ : α → σ\nhs : Primrec s✝\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code → Code → σ → σ → σ\nhpr : Primrec fun a => pr a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nco : α → Code → Code → σ → σ → σ\nhco : Primrec fun a => co a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\npc : α → Code → Code → σ → σ → σ\nhpc : Primrec fun a => pc a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nrf : α → Code → σ → σ\nhrf : Primrec fun a => rf a.fst a.snd.fst a.snd.snd\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s✝ a) (l a) (r a) (pr a) (co a) (pc a) (rf a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m) s\n              else pc a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n              else pr a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂)\n          (List.get? IH (unpair m).snd)\na : Primrec fun p => p.fst.fst.fst.fst.fst\nn : Primrec fun p => p.fst.fst.fst.snd.fst\nm : Primrec fun p => p.fst.fst.fst.snd.snd\nm₁ : Primrec fun a => (unpair a.fst.fst.fst.snd.snd).fst\nm₂ : Primrec fun a => (unpair a.fst.fst.fst.snd.snd).snd\ns : Primrec fun p => p.fst.fst.snd\n⊢ Primrec₂ fun p s₂ =>\n    bif bodd p.fst.fst.snd.fst then\n      bif bodd (div2 p.fst.fst.snd.fst) then rf p.fst.fst.fst.fst (ofNat Code p.fst.fst.snd.snd) p.fst.snd\n      else\n        pc p.fst.fst.fst.fst (ofNat Code (unpair p.fst.fst.snd.snd).fst) (ofNat Code (unpair p.fst.fst.snd.snd).snd)\n          p.snd s₂\n    else\n      bif bodd (div2 p.fst.fst.snd.fst) then\n        co p.fst.fst.fst.fst (ofNat Code (unpair p.fst.fst.snd.snd).fst) (ofNat Code (unpair p.fst.fst.snd.snd).snd)\n          p.snd s₂\n      else\n        pr p.fst.fst.fst.fst (ofNat Code (unpair p.fst.fst.snd.snd).fst) (ofNat Code (unpair p.fst.fst.snd.snd).snd)\n          p.snd s₂\n[PROOFSTEP]\nhave s₁ : Primrec (fun p : ((((α × List σ) × ℕ × ℕ) × σ) × σ) × σ => p.1.2) := snd.comp fst\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns✝ : α → σ\nhs : Primrec s✝\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code → Code → σ → σ → σ\nhpr : Primrec fun a => pr a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nco : α → Code → Code → σ → σ → σ\nhco : Primrec fun a => co a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\npc : α → Code → Code → σ → σ → σ\nhpc : Primrec fun a => pc a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nrf : α → Code → σ → σ\nhrf : Primrec fun a => rf a.fst a.snd.fst a.snd.snd\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s✝ a) (l a) (r a) (pr a) (co a) (pc a) (rf a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m) s\n              else pc a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n              else pr a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂)\n          (List.get? IH (unpair m).snd)\na : Primrec fun p => p.fst.fst.fst.fst.fst\nn : Primrec fun p => p.fst.fst.fst.snd.fst\nm : Primrec fun p => p.fst.fst.fst.snd.snd\nm₁ : Primrec fun a => (unpair a.fst.fst.fst.snd.snd).fst\nm₂ : Primrec fun a => (unpair a.fst.fst.fst.snd.snd).snd\ns : Primrec fun p => p.fst.fst.snd\ns₁ : Primrec fun p => p.fst.snd\n⊢ Primrec₂ fun p s₂ =>\n    bif bodd p.fst.fst.snd.fst then\n      bif bodd (div2 p.fst.fst.snd.fst) then rf p.fst.fst.fst.fst (ofNat Code p.fst.fst.snd.snd) p.fst.snd\n      else\n        pc p.fst.fst.fst.fst (ofNat Code (unpair p.fst.fst.snd.snd).fst) (ofNat Code (unpair p.fst.fst.snd.snd).snd)\n          p.snd s₂\n    else\n      bif bodd (div2 p.fst.fst.snd.fst) then\n        co p.fst.fst.fst.fst (ofNat Code (unpair p.fst.fst.snd.snd).fst) (ofNat Code (unpair p.fst.fst.snd.snd).snd)\n          p.snd s₂\n      else\n        pr p.fst.fst.fst.fst (ofNat Code (unpair p.fst.fst.snd.snd).fst) (ofNat Code (unpair p.fst.fst.snd.snd).snd)\n          p.snd s₂\n[PROOFSTEP]\nhave s₂ : Primrec (fun p : ((((α × List σ) × ℕ × ℕ) × σ) × σ) × σ => p.2) := snd\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns✝ : α → σ\nhs : Primrec s✝\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code → Code → σ → σ → σ\nhpr : Primrec fun a => pr a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nco : α → Code → Code → σ → σ → σ\nhco : Primrec fun a => co a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\npc : α → Code → Code → σ → σ → σ\nhpc : Primrec fun a => pc a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nrf : α → Code → σ → σ\nhrf : Primrec fun a => rf a.fst a.snd.fst a.snd.snd\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s✝ a) (l a) (r a) (pr a) (co a) (pc a) (rf a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m) s\n              else pc a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n              else pr a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂)\n          (List.get? IH (unpair m).snd)\na : Primrec fun p => p.fst.fst.fst.fst.fst\nn : Primrec fun p => p.fst.fst.fst.snd.fst\nm : Primrec fun p => p.fst.fst.fst.snd.snd\nm₁ : Primrec fun a => (unpair a.fst.fst.fst.snd.snd).fst\nm₂ : Primrec fun a => (unpair a.fst.fst.fst.snd.snd).snd\ns : Primrec fun p => p.fst.fst.snd\ns₁ : Primrec fun p => p.fst.snd\ns₂ : Primrec fun p => p.snd\n⊢ Primrec₂ fun p s₂ =>\n    bif bodd p.fst.fst.snd.fst then\n      bif bodd (div2 p.fst.fst.snd.fst) then rf p.fst.fst.fst.fst (ofNat Code p.fst.fst.snd.snd) p.fst.snd\n      else\n        pc p.fst.fst.fst.fst (ofNat Code (unpair p.fst.fst.snd.snd).fst) (ofNat Code (unpair p.fst.fst.snd.snd).snd)\n          p.snd s₂\n    else\n      bif bodd (div2 p.fst.fst.snd.fst) then\n        co p.fst.fst.fst.fst (ofNat Code (unpair p.fst.fst.snd.snd).fst) (ofNat Code (unpair p.fst.fst.snd.snd).snd)\n          p.snd s₂\n      else\n        pr p.fst.fst.fst.fst (ofNat Code (unpair p.fst.fst.snd.snd).fst) (ofNat Code (unpair p.fst.fst.snd.snd).snd)\n          p.snd s₂\n[PROOFSTEP]\nhave h₁ := hrf.comp <| a.pair (((Primrec.ofNat Code).comp m).pair s)\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns✝ : α → σ\nhs : Primrec s✝\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code → Code → σ → σ → σ\nhpr : Primrec fun a => pr a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nco : α → Code → Code → σ → σ → σ\nhco : Primrec fun a => co a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\npc : α → Code → Code → σ → σ → σ\nhpc : Primrec fun a => pc a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nrf : α → Code → σ → σ\nhrf : Primrec fun a => rf a.fst a.snd.fst a.snd.snd\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s✝ a) (l a) (r a) (pr a) (co a) (pc a) (rf a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m) s\n              else pc a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n              else pr a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂)\n          (List.get? IH (unpair m).snd)\na : Primrec fun p => p.fst.fst.fst.fst.fst\nn : Primrec fun p => p.fst.fst.fst.snd.fst\nm : Primrec fun p => p.fst.fst.fst.snd.snd\nm₁ : Primrec fun a => (unpair a.fst.fst.fst.snd.snd).fst\nm₂ : Primrec fun a => (unpair a.fst.fst.fst.snd.snd).snd\ns : Primrec fun p => p.fst.fst.snd\ns₁ : Primrec fun p => p.fst.snd\ns₂ : Primrec fun p => p.snd\nh₁ :\n  Primrec fun a =>\n    rf (a.fst.fst.fst.fst.fst, ofNat Code a.fst.fst.fst.snd.snd, a.fst.fst.snd).fst\n      (a.fst.fst.fst.fst.fst, ofNat Code a.fst.fst.fst.snd.snd, a.fst.fst.snd).snd.fst\n      (a.fst.fst.fst.fst.fst, ofNat Code a.fst.fst.fst.snd.snd, a.fst.fst.snd).snd.snd\n⊢ Primrec₂ fun p s₂ =>\n    bif bodd p.fst.fst.snd.fst then\n      bif bodd (div2 p.fst.fst.snd.fst) then rf p.fst.fst.fst.fst (ofNat Code p.fst.fst.snd.snd) p.fst.snd\n      else\n        pc p.fst.fst.fst.fst (ofNat Code (unpair p.fst.fst.snd.snd).fst) (ofNat Code (unpair p.fst.fst.snd.snd).snd)\n          p.snd s₂\n    else\n      bif bodd (div2 p.fst.fst.snd.fst) then\n        co p.fst.fst.fst.fst (ofNat Code (unpair p.fst.fst.snd.snd).fst) (ofNat Code (unpair p.fst.fst.snd.snd).snd)\n          p.snd s₂\n      else\n        pr p.fst.fst.fst.fst (ofNat Code (unpair p.fst.fst.snd.snd).fst) (ofNat Code (unpair p.fst.fst.snd.snd).snd)\n          p.snd s₂\n[PROOFSTEP]\nhave h₂ := hpc.comp <| a.pair (((Primrec.ofNat Code).comp m₁).pair <| ((Primrec.ofNat Code).comp m₂).pair <| s₁.pair s₂)\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns✝ : α → σ\nhs : Primrec s✝\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code → Code → σ → σ → σ\nhpr : Primrec fun a => pr a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nco : α → Code → Code → σ → σ → σ\nhco : Primrec fun a => co a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\npc : α → Code → Code → σ → σ → σ\nhpc : Primrec fun a => pc a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nrf : α → Code → σ → σ\nhrf : Primrec fun a => rf a.fst a.snd.fst a.snd.snd\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s✝ a) (l a) (r a) (pr a) (co a) (pc a) (rf a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m) s\n              else pc a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n              else pr a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂)\n          (List.get? IH (unpair m).snd)\na : Primrec fun p => p.fst.fst.fst.fst.fst\nn : Primrec fun p => p.fst.fst.fst.snd.fst\nm : Primrec fun p => p.fst.fst.fst.snd.snd\nm₁ : Primrec fun a => (unpair a.fst.fst.fst.snd.snd).fst\nm₂ : Primrec fun a => (unpair a.fst.fst.fst.snd.snd).snd\ns : Primrec fun p => p.fst.fst.snd\ns₁ : Primrec fun p => p.fst.snd\ns₂ : Primrec fun p => p.snd\nh₁ :\n  Primrec fun a =>\n    rf (a.fst.fst.fst.fst.fst, ofNat Code a.fst.fst.fst.snd.snd, a.fst.fst.snd).fst\n      (a.fst.fst.fst.fst.fst, ofNat Code a.fst.fst.fst.snd.snd, a.fst.fst.snd).snd.fst\n      (a.fst.fst.fst.fst.fst, ofNat Code a.fst.fst.fst.snd.snd, a.fst.fst.snd).snd.snd\nh₂ :\n  Primrec fun a =>\n    pc\n      (a.fst.fst.fst.fst.fst, ofNat Code (unpair a.fst.fst.fst.snd.snd).fst,\n          ofNat Code (unpair a.fst.fst.fst.snd.snd).snd, a.fst.snd, a.snd).fst\n      (a.fst.fst.fst.fst.fst, ofNat Code (unpair a.fst.fst.fst.snd.snd).fst,\n            ofNat Code (unpair a.fst.fst.fst.snd.snd).snd, a.fst.snd, a.snd).snd.fst\n      (a.fst.fst.fst.fst.fst, ofNat Code (unpair a.fst.fst.fst.snd.snd).fst,\n              ofNat Code (unpair a.fst.fst.fst.snd.snd).snd, a.fst.snd, a.snd).snd.snd.fst\n      (a.fst.fst.fst.fst.fst, ofNat Code (unpair a.fst.fst.fst.snd.snd).fst,\n                ofNat Code (unpair a.fst.fst.fst.snd.snd).snd, a.fst.snd, a.snd).snd.snd.snd.fst\n      (a.fst.fst.fst.fst.fst, ofNat Code (unpair a.fst.fst.fst.snd.snd).fst,\n                ofNat Code (unpair a.fst.fst.fst.snd.snd).snd, a.fst.snd, a.snd).snd.snd.snd.snd\n⊢ Primrec₂ fun p s₂ =>\n    bif bodd p.fst.fst.snd.fst then\n      bif bodd (div2 p.fst.fst.snd.fst) then rf p.fst.fst.fst.fst (ofNat Code p.fst.fst.snd.snd) p.fst.snd\n      else\n        pc p.fst.fst.fst.fst (ofNat Code (unpair p.fst.fst.snd.snd).fst) (ofNat Code (unpair p.fst.fst.snd.snd).snd)\n          p.snd s₂\n    else\n      bif bodd (div2 p.fst.fst.snd.fst) then\n        co p.fst.fst.fst.fst (ofNat Code (unpair p.fst.fst.snd.snd).fst) (ofNat Code (unpair p.fst.fst.snd.snd).snd)\n          p.snd s₂\n      else\n        pr p.fst.fst.fst.fst (ofNat Code (unpair p.fst.fst.snd.snd).fst) (ofNat Code (unpair p.fst.fst.snd.snd).snd)\n          p.snd s₂\n[PROOFSTEP]\nhave h₃ := hco.comp <| a.pair (((Primrec.ofNat Code).comp m₁).pair <| ((Primrec.ofNat Code).comp m₂).pair <| s₁.pair s₂)\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns✝ : α → σ\nhs : Primrec s✝\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code → Code → σ → σ → σ\nhpr : Primrec fun a => pr a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nco : α → Code → Code → σ → σ → σ\nhco : Primrec fun a => co a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\npc : α → Code → Code → σ → σ → σ\nhpc : Primrec fun a => pc a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nrf : α → Code → σ → σ\nhrf : Primrec fun a => rf a.fst a.snd.fst a.snd.snd\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s✝ a) (l a) (r a) (pr a) (co a) (pc a) (rf a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m) s\n              else pc a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n              else pr a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂)\n          (List.get? IH (unpair m).snd)\na : Primrec fun p => p.fst.fst.fst.fst.fst\nn : Primrec fun p => p.fst.fst.fst.snd.fst\nm : Primrec fun p => p.fst.fst.fst.snd.snd\nm₁ : Primrec fun a => (unpair a.fst.fst.fst.snd.snd).fst\nm₂ : Primrec fun a => (unpair a.fst.fst.fst.snd.snd).snd\ns : Primrec fun p => p.fst.fst.snd\ns₁ : Primrec fun p => p.fst.snd\ns₂ : Primrec fun p => p.snd\nh₁ :\n  Primrec fun a =>\n    rf (a.fst.fst.fst.fst.fst, ofNat Code a.fst.fst.fst.snd.snd, a.fst.fst.snd).fst\n      (a.fst.fst.fst.fst.fst, ofNat Code a.fst.fst.fst.snd.snd, a.fst.fst.snd).snd.fst\n      (a.fst.fst.fst.fst.fst, ofNat Code a.fst.fst.fst.snd.snd, a.fst.fst.snd).snd.snd\nh₂ :\n  Primrec fun a =>\n    pc\n      (a.fst.fst.fst.fst.fst, ofNat Code (unpair a.fst.fst.fst.snd.snd).fst,\n          ofNat Code (unpair a.fst.fst.fst.snd.snd).snd, a.fst.snd, a.snd).fst\n      (a.fst.fst.fst.fst.fst, ofNat Code (unpair a.fst.fst.fst.snd.snd).fst,\n            ofNat Code (unpair a.fst.fst.fst.snd.snd).snd, a.fst.snd, a.snd).snd.fst\n      (a.fst.fst.fst.fst.fst, ofNat Code (unpair a.fst.fst.fst.snd.snd).fst,\n              ofNat Code (unpair a.fst.fst.fst.snd.snd).snd, a.fst.snd, a.snd).snd.snd.fst\n      (a.fst.fst.fst.fst.fst, ofNat Code (unpair a.fst.fst.fst.snd.snd).fst,\n                ofNat Code (unpair a.fst.fst.fst.snd.snd).snd, a.fst.snd, a.snd).snd.snd.snd.fst\n      (a.fst.fst.fst.fst.fst, ofNat Code (unpair a.fst.fst.fst.snd.snd).fst,\n                ofNat Code (unpair a.fst.fst.fst.snd.snd).snd, a.fst.snd, a.snd).snd.snd.snd.snd\nh₃ :\n  Primrec fun a =>\n    co\n      (a.fst.fst.fst.fst.fst, ofNat Code (unpair a.fst.fst.fst.snd.snd).fst,\n          ofNat Code (unpair a.fst.fst.fst.snd.snd).snd, a.fst.snd, a.snd).fst\n      (a.fst.fst.fst.fst.fst, ofNat Code (unpair a.fst.fst.fst.snd.snd).fst,\n            ofNat Code (unpair a.fst.fst.fst.snd.snd).snd, a.fst.snd, a.snd).snd.fst\n      (a.fst.fst.fst.fst.fst, ofNat Code (unpair a.fst.fst.fst.snd.snd).fst,\n              ofNat Code (unpair a.fst.fst.fst.snd.snd).snd, a.fst.snd, a.snd).snd.snd.fst\n      (a.fst.fst.fst.fst.fst, ofNat Code (unpair a.fst.fst.fst.snd.snd).fst,\n                ofNat Code (unpair a.fst.fst.fst.snd.snd).snd, a.fst.snd, a.snd).snd.snd.snd.fst\n      (a.fst.fst.fst.fst.fst, ofNat Code (unpair a.fst.fst.fst.snd.snd).fst,\n                ofNat Code (unpair a.fst.fst.fst.snd.snd).snd, a.fst.snd, a.snd).snd.snd.snd.snd\n⊢ Primrec₂ fun p s₂ =>\n    bif bodd p.fst.fst.snd.fst then\n      bif bodd (div2 p.fst.fst.snd.fst) then rf p.fst.fst.fst.fst (ofNat Code p.fst.fst.snd.snd) p.fst.snd\n      else\n        pc p.fst.fst.fst.fst (ofNat Code (unpair p.fst.fst.snd.snd).fst) (ofNat Code (unpair p.fst.fst.snd.snd).snd)\n          p.snd s₂\n    else\n      bif bodd (div2 p.fst.fst.snd.fst) then\n        co p.fst.fst.fst.fst (ofNat Code (unpair p.fst.fst.snd.snd).fst) (ofNat Code (unpair p.fst.fst.snd.snd).snd)\n          p.snd s₂\n      else\n        pr p.fst.fst.fst.fst (ofNat Code (unpair p.fst.fst.snd.snd).fst) (ofNat Code (unpair p.fst.fst.snd.snd).snd)\n          p.snd s₂\n[PROOFSTEP]\nhave h₄ := hpr.comp <| a.pair (((Primrec.ofNat Code).comp m₁).pair <| ((Primrec.ofNat Code).comp m₂).pair <| s₁.pair s₂)\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns✝ : α → σ\nhs : Primrec s✝\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code → Code → σ → σ → σ\nhpr : Primrec fun a => pr a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nco : α → Code → Code → σ → σ → σ\nhco : Primrec fun a => co a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\npc : α → Code → Code → σ → σ → σ\nhpc : Primrec fun a => pc a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nrf : α → Code → σ → σ\nhrf : Primrec fun a => rf a.fst a.snd.fst a.snd.snd\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s✝ a) (l a) (r a) (pr a) (co a) (pc a) (rf a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m) s\n              else pc a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n              else pr a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂)\n          (List.get? IH (unpair m).snd)\na : Primrec fun p => p.fst.fst.fst.fst.fst\nn : Primrec fun p => p.fst.fst.fst.snd.fst\nm : Primrec fun p => p.fst.fst.fst.snd.snd\nm₁ : Primrec fun a => (unpair a.fst.fst.fst.snd.snd).fst\nm₂ : Primrec fun a => (unpair a.fst.fst.fst.snd.snd).snd\ns : Primrec fun p => p.fst.fst.snd\ns₁ : Primrec fun p => p.fst.snd\ns₂ : Primrec fun p => p.snd\nh₁ :\n  Primrec fun a =>\n    rf (a.fst.fst.fst.fst.fst, ofNat Code a.fst.fst.fst.snd.snd, a.fst.fst.snd).fst\n      (a.fst.fst.fst.fst.fst, ofNat Code a.fst.fst.fst.snd.snd, a.fst.fst.snd).snd.fst\n      (a.fst.fst.fst.fst.fst, ofNat Code a.fst.fst.fst.snd.snd, a.fst.fst.snd).snd.snd\nh₂ :\n  Primrec fun a =>\n    pc\n      (a.fst.fst.fst.fst.fst, ofNat Code (unpair a.fst.fst.fst.snd.snd).fst,\n          ofNat Code (unpair a.fst.fst.fst.snd.snd).snd, a.fst.snd, a.snd).fst\n      (a.fst.fst.fst.fst.fst, ofNat Code (unpair a.fst.fst.fst.snd.snd).fst,\n            ofNat Code (unpair a.fst.fst.fst.snd.snd).snd, a.fst.snd, a.snd).snd.fst\n      (a.fst.fst.fst.fst.fst, ofNat Code (unpair a.fst.fst.fst.snd.snd).fst,\n              ofNat Code (unpair a.fst.fst.fst.snd.snd).snd, a.fst.snd, a.snd).snd.snd.fst\n      (a.fst.fst.fst.fst.fst, ofNat Code (unpair a.fst.fst.fst.snd.snd).fst,\n                ofNat Code (unpair a.fst.fst.fst.snd.snd).snd, a.fst.snd, a.snd).snd.snd.snd.fst\n      (a.fst.fst.fst.fst.fst, ofNat Code (unpair a.fst.fst.fst.snd.snd).fst,\n                ofNat Code (unpair a.fst.fst.fst.snd.snd).snd, a.fst.snd, a.snd).snd.snd.snd.snd\nh₃ :\n  Primrec fun a =>\n    co\n      (a.fst.fst.fst.fst.fst, ofNat Code (unpair a.fst.fst.fst.snd.snd).fst,\n          ofNat Code (unpair a.fst.fst.fst.snd.snd).snd, a.fst.snd, a.snd).fst\n      (a.fst.fst.fst.fst.fst, ofNat Code (unpair a.fst.fst.fst.snd.snd).fst,\n            ofNat Code (unpair a.fst.fst.fst.snd.snd).snd, a.fst.snd, a.snd).snd.fst\n      (a.fst.fst.fst.fst.fst, ofNat Code (unpair a.fst.fst.fst.snd.snd).fst,\n              ofNat Code (unpair a.fst.fst.fst.snd.snd).snd, a.fst.snd, a.snd).snd.snd.fst\n      (a.fst.fst.fst.fst.fst, ofNat Code (unpair a.fst.fst.fst.snd.snd).fst,\n                ofNat Code (unpair a.fst.fst.fst.snd.snd).snd, a.fst.snd, a.snd).snd.snd.snd.fst\n      (a.fst.fst.fst.fst.fst, ofNat Code (unpair a.fst.fst.fst.snd.snd).fst,\n                ofNat Code (unpair a.fst.fst.fst.snd.snd).snd, a.fst.snd, a.snd).snd.snd.snd.snd\nh₄ :\n  Primrec fun a =>\n    pr\n      (a.fst.fst.fst.fst.fst, ofNat Code (unpair a.fst.fst.fst.snd.snd).fst,\n          ofNat Code (unpair a.fst.fst.fst.snd.snd).snd, a.fst.snd, a.snd).fst\n      (a.fst.fst.fst.fst.fst, ofNat Code (unpair a.fst.fst.fst.snd.snd).fst,\n            ofNat Code (unpair a.fst.fst.fst.snd.snd).snd, a.fst.snd, a.snd).snd.fst\n      (a.fst.fst.fst.fst.fst, ofNat Code (unpair a.fst.fst.fst.snd.snd).fst,\n              ofNat Code (unpair a.fst.fst.fst.snd.snd).snd, a.fst.snd, a.snd).snd.snd.fst\n      (a.fst.fst.fst.fst.fst, ofNat Code (unpair a.fst.fst.fst.snd.snd).fst,\n                ofNat Code (unpair a.fst.fst.fst.snd.snd).snd, a.fst.snd, a.snd).snd.snd.snd.fst\n      (a.fst.fst.fst.fst.fst, ofNat Code (unpair a.fst.fst.fst.snd.snd).fst,\n                ofNat Code (unpair a.fst.fst.fst.snd.snd).snd, a.fst.snd, a.snd).snd.snd.snd.snd\n⊢ Primrec₂ fun p s₂ =>\n    bif bodd p.fst.fst.snd.fst then\n      bif bodd (div2 p.fst.fst.snd.fst) then rf p.fst.fst.fst.fst (ofNat Code p.fst.fst.snd.snd) p.fst.snd\n      else\n        pc p.fst.fst.fst.fst (ofNat Code (unpair p.fst.fst.snd.snd).fst) (ofNat Code (unpair p.fst.fst.snd.snd).snd)\n          p.snd s₂\n    else\n      bif bodd (div2 p.fst.fst.snd.fst) then\n        co p.fst.fst.fst.fst (ofNat Code (unpair p.fst.fst.snd.snd).fst) (ofNat Code (unpair p.fst.fst.snd.snd).snd)\n          p.snd s₂\n      else\n        pr p.fst.fst.fst.fst (ofNat Code (unpair p.fst.fst.snd.snd).fst) (ofNat Code (unpair p.fst.fst.snd.snd).snd)\n          p.snd s₂\n[PROOFSTEP]\nunfold Primrec₂\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns✝ : α → σ\nhs : Primrec s✝\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code → Code → σ → σ → σ\nhpr : Primrec fun a => pr a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nco : α → Code → Code → σ → σ → σ\nhco : Primrec fun a => co a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\npc : α → Code → Code → σ → σ → σ\nhpc : Primrec fun a => pc a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nrf : α → Code → σ → σ\nhrf : Primrec fun a => rf a.fst a.snd.fst a.snd.snd\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s✝ a) (l a) (r a) (pr a) (co a) (pc a) (rf a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m) s\n              else pc a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n              else pr a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂)\n          (List.get? IH (unpair m).snd)\na : Primrec fun p => p.fst.fst.fst.fst.fst\nn : Primrec fun p => p.fst.fst.fst.snd.fst\nm : Primrec fun p => p.fst.fst.fst.snd.snd\nm₁ : Primrec fun a => (unpair a.fst.fst.fst.snd.snd).fst\nm₂ : Primrec fun a => (unpair a.fst.fst.fst.snd.snd).snd\ns : Primrec fun p => p.fst.fst.snd\ns₁ : Primrec fun p => p.fst.snd\ns₂ : Primrec fun p => p.snd\nh₁ :\n  Primrec fun a =>\n    rf (a.fst.fst.fst.fst.fst, ofNat Code a.fst.fst.fst.snd.snd, a.fst.fst.snd).fst\n      (a.fst.fst.fst.fst.fst, ofNat Code a.fst.fst.fst.snd.snd, a.fst.fst.snd).snd.fst\n      (a.fst.fst.fst.fst.fst, ofNat Code a.fst.fst.fst.snd.snd, a.fst.fst.snd).snd.snd\nh₂ :\n  Primrec fun a =>\n    pc\n      (a.fst.fst.fst.fst.fst, ofNat Code (unpair a.fst.fst.fst.snd.snd).fst,\n          ofNat Code (unpair a.fst.fst.fst.snd.snd).snd, a.fst.snd, a.snd).fst\n      (a.fst.fst.fst.fst.fst, ofNat Code (unpair a.fst.fst.fst.snd.snd).fst,\n            ofNat Code (unpair a.fst.fst.fst.snd.snd).snd, a.fst.snd, a.snd).snd.fst\n      (a.fst.fst.fst.fst.fst, ofNat Code (unpair a.fst.fst.fst.snd.snd).fst,\n              ofNat Code (unpair a.fst.fst.fst.snd.snd).snd, a.fst.snd, a.snd).snd.snd.fst\n      (a.fst.fst.fst.fst.fst, ofNat Code (unpair a.fst.fst.fst.snd.snd).fst,\n                ofNat Code (unpair a.fst.fst.fst.snd.snd).snd, a.fst.snd, a.snd).snd.snd.snd.fst\n      (a.fst.fst.fst.fst.fst, ofNat Code (unpair a.fst.fst.fst.snd.snd).fst,\n                ofNat Code (unpair a.fst.fst.fst.snd.snd).snd, a.fst.snd, a.snd).snd.snd.snd.snd\nh₃ :\n  Primrec fun a =>\n    co\n      (a.fst.fst.fst.fst.fst, ofNat Code (unpair a.fst.fst.fst.snd.snd).fst,\n          ofNat Code (unpair a.fst.fst.fst.snd.snd).snd, a.fst.snd, a.snd).fst\n      (a.fst.fst.fst.fst.fst, ofNat Code (unpair a.fst.fst.fst.snd.snd).fst,\n            ofNat Code (unpair a.fst.fst.fst.snd.snd).snd, a.fst.snd, a.snd).snd.fst\n      (a.fst.fst.fst.fst.fst, ofNat Code (unpair a.fst.fst.fst.snd.snd).fst,\n              ofNat Code (unpair a.fst.fst.fst.snd.snd).snd, a.fst.snd, a.snd).snd.snd.fst\n      (a.fst.fst.fst.fst.fst, ofNat Code (unpair a.fst.fst.fst.snd.snd).fst,\n                ofNat Code (unpair a.fst.fst.fst.snd.snd).snd, a.fst.snd, a.snd).snd.snd.snd.fst\n      (a.fst.fst.fst.fst.fst, ofNat Code (unpair a.fst.fst.fst.snd.snd).fst,\n                ofNat Code (unpair a.fst.fst.fst.snd.snd).snd, a.fst.snd, a.snd).snd.snd.snd.snd\nh₄ :\n  Primrec fun a =>\n    pr\n      (a.fst.fst.fst.fst.fst, ofNat Code (unpair a.fst.fst.fst.snd.snd).fst,\n          ofNat Code (unpair a.fst.fst.fst.snd.snd).snd, a.fst.snd, a.snd).fst\n      (a.fst.fst.fst.fst.fst, ofNat Code (unpair a.fst.fst.fst.snd.snd).fst,\n            ofNat Code (unpair a.fst.fst.fst.snd.snd).snd, a.fst.snd, a.snd).snd.fst\n      (a.fst.fst.fst.fst.fst, ofNat Code (unpair a.fst.fst.fst.snd.snd).fst,\n              ofNat Code (unpair a.fst.fst.fst.snd.snd).snd, a.fst.snd, a.snd).snd.snd.fst\n      (a.fst.fst.fst.fst.fst, ofNat Code (unpair a.fst.fst.fst.snd.snd).fst,\n                ofNat Code (unpair a.fst.fst.fst.snd.snd).snd, a.fst.snd, a.snd).snd.snd.snd.fst\n      (a.fst.fst.fst.fst.fst, ofNat Code (unpair a.fst.fst.fst.snd.snd).fst,\n                ofNat Code (unpair a.fst.fst.fst.snd.snd).snd, a.fst.snd, a.snd).snd.snd.snd.snd\n⊢ Primrec fun p =>\n    (fun p s₂ =>\n        bif bodd p.fst.fst.snd.fst then\n          bif bodd (div2 p.fst.fst.snd.fst) then rf p.fst.fst.fst.fst (ofNat Code p.fst.fst.snd.snd) p.fst.snd\n          else\n            pc p.fst.fst.fst.fst (ofNat Code (unpair p.fst.fst.snd.snd).fst) (ofNat Code (unpair p.fst.fst.snd.snd).snd)\n              p.snd s₂\n        else\n          bif bodd (div2 p.fst.fst.snd.fst) then\n            co p.fst.fst.fst.fst (ofNat Code (unpair p.fst.fst.snd.snd).fst) (ofNat Code (unpair p.fst.fst.snd.snd).snd)\n              p.snd s₂\n          else\n            pr p.fst.fst.fst.fst (ofNat Code (unpair p.fst.fst.snd.snd).fst) (ofNat Code (unpair p.fst.fst.snd.snd).snd)\n              p.snd s₂)\n      p.fst p.snd\n[PROOFSTEP]\nexact\n  (nat_bodd.comp n).cond ((nat_bodd.comp <| nat_div2.comp n).cond h₁ h₂) (cond (nat_bodd.comp <| nat_div2.comp n) h₃ h₄)\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code → Code → σ → σ → σ\nhpr : Primrec fun a => pr a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nco : α → Code → Code → σ → σ → σ\nhco : Primrec fun a => co a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\npc : α → Code → Code → σ → σ → σ\nhpc : Primrec fun a => pc a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nrf : α → Code → σ → σ\nhrf : Primrec fun a => rf a.fst a.snd.fst a.snd.snd\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m) s\n              else pc a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n              else pr a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂)\n          (List.get? IH (unpair m).snd)\nthis : Primrec G₁\n⊢ Primrec fun a => F a (c a)\n[PROOFSTEP]\nlet G : α → List σ → Option σ := fun a IH =>\n  IH.length.casesOn (some (z a)) fun n =>\n    n.casesOn (some (s a)) fun n =>\n      n.casesOn (some (l a)) fun n => n.casesOn (some (r a)) fun n => G₁ ((a, IH), n, n.div2.div2)\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code → Code → σ → σ → σ\nhpr : Primrec fun a => pr a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nco : α → Code → Code → σ → σ → σ\nhco : Primrec fun a => co a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\npc : α → Code → Code → σ → σ → σ\nhpc : Primrec fun a => pc a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nrf : α → Code → σ → σ\nhrf : Primrec fun a => rf a.fst a.snd.fst a.snd.snd\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m) s\n              else pc a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n              else pr a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂)\n          (List.get? IH (unpair m).snd)\nthis : Primrec G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\n⊢ Primrec fun a => F a (c a)\n[PROOFSTEP]\nhave : Primrec₂ G := by\n  unfold Primrec₂\n  refine nat_casesOn (list_length.comp snd) (option_some_iff.2 (hz.comp fst)) ?_\n  unfold Primrec₂\n  refine nat_casesOn snd (option_some_iff.2 (hs.comp (fst.comp fst))) ?_\n  unfold Primrec₂\n  refine nat_casesOn snd (option_some_iff.2 (hl.comp (fst.comp <| fst.comp fst))) ?_\n  unfold Primrec₂\n  refine nat_casesOn snd (option_some_iff.2 (hr.comp (fst.comp <| fst.comp <| fst.comp fst))) ?_\n  unfold Primrec₂\n  exact\n    this.comp <|\n      ((fst.pair snd).comp <| fst.comp <| fst.comp <| fst.comp <| fst).pair <|\n        snd.pair <| nat_div2.comp <| nat_div2.comp snd\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code → Code → σ → σ → σ\nhpr : Primrec fun a => pr a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nco : α → Code → Code → σ → σ → σ\nhco : Primrec fun a => co a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\npc : α → Code → Code → σ → σ → σ\nhpc : Primrec fun a => pc a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nrf : α → Code → σ → σ\nhrf : Primrec fun a => rf a.fst a.snd.fst a.snd.snd\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m) s\n              else pc a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n              else pr a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂)\n          (List.get? IH (unpair m).snd)\nthis : Primrec G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\n⊢ Primrec₂ G\n[PROOFSTEP]\nunfold Primrec₂\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code → Code → σ → σ → σ\nhpr : Primrec fun a => pr a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nco : α → Code → Code → σ → σ → σ\nhco : Primrec fun a => co a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\npc : α → Code → Code → σ → σ → σ\nhpc : Primrec fun a => pc a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nrf : α → Code → σ → σ\nhrf : Primrec fun a => rf a.fst a.snd.fst a.snd.snd\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m) s\n              else pc a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n              else pr a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂)\n          (List.get? IH (unpair m).snd)\nthis : Primrec G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\n⊢ Primrec fun p => G p.fst p.snd\n[PROOFSTEP]\nrefine nat_casesOn (list_length.comp snd) (option_some_iff.2 (hz.comp fst)) ?_\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code → Code → σ → σ → σ\nhpr : Primrec fun a => pr a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nco : α → Code → Code → σ → σ → σ\nhco : Primrec fun a => co a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\npc : α → Code → Code → σ → σ → σ\nhpc : Primrec fun a => pc a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nrf : α → Code → σ → σ\nhrf : Primrec fun a => rf a.fst a.snd.fst a.snd.snd\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m) s\n              else pc a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n              else pr a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂)\n          (List.get? IH (unpair m).snd)\nthis : Primrec G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\n⊢ Primrec₂ fun p n =>\n    (fun n =>\n        Nat.casesOn n (some (s p.fst)) fun n =>\n          Nat.casesOn n (some (l p.fst)) fun n =>\n            Nat.casesOn n (some (r p.fst)) fun n => G₁ ((p.fst, p.snd), n, div2 (div2 n)))\n      n\n[PROOFSTEP]\nunfold Primrec₂\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code → Code → σ → σ → σ\nhpr : Primrec fun a => pr a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nco : α → Code → Code → σ → σ → σ\nhco : Primrec fun a => co a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\npc : α → Code → Code → σ → σ → σ\nhpc : Primrec fun a => pc a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nrf : α → Code → σ → σ\nhrf : Primrec fun a => rf a.fst a.snd.fst a.snd.snd\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m) s\n              else pc a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n              else pr a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂)\n          (List.get? IH (unpair m).snd)\nthis : Primrec G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\n⊢ Primrec fun p =>\n    (fun p n =>\n        (fun n =>\n            Nat.casesOn n (some (s p.fst)) fun n =>\n              Nat.casesOn n (some (l p.fst)) fun n =>\n                Nat.casesOn n (some (r p.fst)) fun n => G₁ ((p.fst, p.snd), n, div2 (div2 n)))\n          n)\n      p.fst p.snd\n[PROOFSTEP]\nrefine nat_casesOn snd (option_some_iff.2 (hs.comp (fst.comp fst))) ?_\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code → Code → σ → σ → σ\nhpr : Primrec fun a => pr a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nco : α → Code → Code → σ → σ → σ\nhco : Primrec fun a => co a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\npc : α → Code → Code → σ → σ → σ\nhpc : Primrec fun a => pc a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nrf : α → Code → σ → σ\nhrf : Primrec fun a => rf a.fst a.snd.fst a.snd.snd\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m) s\n              else pc a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n              else pr a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂)\n          (List.get? IH (unpair m).snd)\nthis : Primrec G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\n⊢ Primrec₂ fun p n =>\n    (fun n =>\n        Nat.casesOn n (some (l p.fst.fst)) fun n =>\n          Nat.casesOn n (some (r p.fst.fst)) fun n => G₁ ((p.fst.fst, p.fst.snd), n, div2 (div2 n)))\n      n\n[PROOFSTEP]\nunfold Primrec₂\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code → Code → σ → σ → σ\nhpr : Primrec fun a => pr a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nco : α → Code → Code → σ → σ → σ\nhco : Primrec fun a => co a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\npc : α → Code → Code → σ → σ → σ\nhpc : Primrec fun a => pc a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nrf : α → Code → σ → σ\nhrf : Primrec fun a => rf a.fst a.snd.fst a.snd.snd\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m) s\n              else pc a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n              else pr a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂)\n          (List.get? IH (unpair m).snd)\nthis : Primrec G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\n⊢ Primrec fun p =>\n    (fun p n =>\n        (fun n =>\n            Nat.casesOn n (some (l p.fst.fst)) fun n =>\n              Nat.casesOn n (some (r p.fst.fst)) fun n => G₁ ((p.fst.fst, p.fst.snd), n, div2 (div2 n)))\n          n)\n      p.fst p.snd\n[PROOFSTEP]\nrefine nat_casesOn snd (option_some_iff.2 (hl.comp (fst.comp <| fst.comp fst))) ?_\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code → Code → σ → σ → σ\nhpr : Primrec fun a => pr a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nco : α → Code → Code → σ → σ → σ\nhco : Primrec fun a => co a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\npc : α → Code → Code → σ → σ → σ\nhpc : Primrec fun a => pc a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nrf : α → Code → σ → σ\nhrf : Primrec fun a => rf a.fst a.snd.fst a.snd.snd\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m) s\n              else pc a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n              else pr a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂)\n          (List.get? IH (unpair m).snd)\nthis : Primrec G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\n⊢ Primrec₂ fun p n =>\n    (fun n => Nat.casesOn n (some (r p.fst.fst.fst)) fun n => G₁ ((p.fst.fst.fst, p.fst.fst.snd), n, div2 (div2 n))) n\n[PROOFSTEP]\nunfold Primrec₂\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code → Code → σ → σ → σ\nhpr : Primrec fun a => pr a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nco : α → Code → Code → σ → σ → σ\nhco : Primrec fun a => co a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\npc : α → Code → Code → σ → σ → σ\nhpc : Primrec fun a => pc a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nrf : α → Code → σ → σ\nhrf : Primrec fun a => rf a.fst a.snd.fst a.snd.snd\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m) s\n              else pc a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n              else pr a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂)\n          (List.get? IH (unpair m).snd)\nthis : Primrec G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\n⊢ Primrec fun p =>\n    (fun p n =>\n        (fun n => Nat.casesOn n (some (r p.fst.fst.fst)) fun n => G₁ ((p.fst.fst.fst, p.fst.fst.snd), n, div2 (div2 n)))\n          n)\n      p.fst p.snd\n[PROOFSTEP]\nrefine nat_casesOn snd (option_some_iff.2 (hr.comp (fst.comp <| fst.comp <| fst.comp fst))) ?_\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code → Code → σ → σ → σ\nhpr : Primrec fun a => pr a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nco : α → Code → Code → σ → σ → σ\nhco : Primrec fun a => co a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\npc : α → Code → Code → σ → σ → σ\nhpc : Primrec fun a => pc a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nrf : α → Code → σ → σ\nhrf : Primrec fun a => rf a.fst a.snd.fst a.snd.snd\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m) s\n              else pc a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n              else pr a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂)\n          (List.get? IH (unpair m).snd)\nthis : Primrec G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\n⊢ Primrec₂ fun p n => (fun n => G₁ ((p.fst.fst.fst.fst, p.fst.fst.fst.snd), n, div2 (div2 n))) n\n[PROOFSTEP]\nunfold Primrec₂\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code → Code → σ → σ → σ\nhpr : Primrec fun a => pr a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nco : α → Code → Code → σ → σ → σ\nhco : Primrec fun a => co a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\npc : α → Code → Code → σ → σ → σ\nhpc : Primrec fun a => pc a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nrf : α → Code → σ → σ\nhrf : Primrec fun a => rf a.fst a.snd.fst a.snd.snd\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m) s\n              else pc a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n              else pr a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂)\n          (List.get? IH (unpair m).snd)\nthis : Primrec G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\n⊢ Primrec fun p => (fun p n => (fun n => G₁ ((p.fst.fst.fst.fst, p.fst.fst.fst.snd), n, div2 (div2 n))) n) p.fst p.snd\n[PROOFSTEP]\nexact\n  this.comp <|\n    ((fst.pair snd).comp <| fst.comp <| fst.comp <| fst.comp <| fst).pair <|\n      snd.pair <| nat_div2.comp <| nat_div2.comp snd\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code → Code → σ → σ → σ\nhpr : Primrec fun a => pr a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nco : α → Code → Code → σ → σ → σ\nhco : Primrec fun a => co a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\npc : α → Code → Code → σ → σ → σ\nhpc : Primrec fun a => pc a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nrf : α → Code → σ → σ\nhrf : Primrec fun a => rf a.fst a.snd.fst a.snd.snd\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m) s\n              else pc a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n              else pr a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂)\n          (List.get? IH (unpair m).snd)\nthis✝ : Primrec G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Primrec₂ G\n⊢ Primrec fun a => F a (c a)\n[PROOFSTEP]\nrefine'\n  ((nat_strong_rec (fun a n => F a (ofNat Code n)) this.to₂ fun a n => _).comp _root_.Primrec.id <|\n        encode_iff.2 hc).of_eq\n    fun a => by simp\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code → Code → σ → σ → σ\nhpr : Primrec fun a => pr a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nco : α → Code → Code → σ → σ → σ\nhco : Primrec fun a => co a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\npc : α → Code → Code → σ → σ → σ\nhpc : Primrec fun a => pc a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nrf : α → Code → σ → σ\nhrf : Primrec fun a => rf a.fst a.snd.fst a.snd.snd\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m) s\n              else pc a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n              else pr a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂)\n          (List.get? IH (unpair m).snd)\nthis✝ : Primrec G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Primrec₂ G\na : α\n⊢ F (id a) (ofNat Code (encode (c a))) = F a (c a)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code → Code → σ → σ → σ\nhpr : Primrec fun a => pr a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nco : α → Code → Code → σ → σ → σ\nhco : Primrec fun a => co a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\npc : α → Code → Code → σ → σ → σ\nhpc : Primrec fun a => pc a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nrf : α → Code → σ → σ\nhrf : Primrec fun a => rf a.fst a.snd.fst a.snd.snd\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m) s\n              else pc a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n              else pr a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂)\n          (List.get? IH (unpair m).snd)\nthis✝ : Primrec G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Primrec₂ G\na : α\nn : ℕ\n⊢ G (a, List.map ((fun a n => F a (ofNat Code n)) a) (List.range n)).fst\n      (a, List.map ((fun a n => F a (ofNat Code n)) a) (List.range n)).snd =\n    some ((fun a n => F a (ofNat Code n)) a n)\n[PROOFSTEP]\nsimp (config := { zeta := false })\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code → Code → σ → σ → σ\nhpr : Primrec fun a => pr a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nco : α → Code → Code → σ → σ → σ\nhco : Primrec fun a => co a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\npc : α → Code → Code → σ → σ → σ\nhpc : Primrec fun a => pc a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nrf : α → Code → σ → σ\nhrf : Primrec fun a => rf a.fst a.snd.fst a.snd.snd\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m) s\n              else pc a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n              else pr a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂)\n          (List.get? IH (unpair m).snd)\nthis✝ : Primrec G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Primrec₂ G\na : α\nn : ℕ\n⊢ G a (List.map (fun n => F a (ofNat Code n)) (List.range n)) = some (F a (ofNat Code n))\n[PROOFSTEP]\niterate 4 cases' n with n; · simp (config := { zeta := false }) [ofNatCode_eq, ofNatCode]; rfl\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code → Code → σ → σ → σ\nhpr : Primrec fun a => pr a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nco : α → Code → Code → σ → σ → σ\nhco : Primrec fun a => co a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\npc : α → Code → Code → σ → σ → σ\nhpc : Primrec fun a => pc a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nrf : α → Code → σ → σ\nhrf : Primrec fun a => rf a.fst a.snd.fst a.snd.snd\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m) s\n              else pc a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n              else pr a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂)\n          (List.get? IH (unpair m).snd)\nthis✝ : Primrec G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Primrec₂ G\na : α\nn : ℕ\n⊢ G a (List.map (fun n => F a (ofNat Code n)) (List.range n)) = some (F a (ofNat Code n))\n[PROOFSTEP]\ncases' n with n\n[GOAL]\ncase zero\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code → Code → σ → σ → σ\nhpr : Primrec fun a => pr a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nco : α → Code → Code → σ → σ → σ\nhco : Primrec fun a => co a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\npc : α → Code → Code → σ → σ → σ\nhpc : Primrec fun a => pc a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nrf : α → Code → σ → σ\nhrf : Primrec fun a => rf a.fst a.snd.fst a.snd.snd\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m) s\n              else pc a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n              else pr a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂)\n          (List.get? IH (unpair m).snd)\nthis✝ : Primrec G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Primrec₂ G\na : α\n⊢ G a (List.map (fun n => F a (ofNat Code n)) (List.range Nat.zero)) = some (F a (ofNat Code Nat.zero))\n[PROOFSTEP]\nsimp (config := { zeta := false }) [ofNatCode_eq, ofNatCode]\n[GOAL]\ncase zero\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code → Code → σ → σ → σ\nhpr : Primrec fun a => pr a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nco : α → Code → Code → σ → σ → σ\nhco : Primrec fun a => co a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\npc : α → Code → Code → σ → σ → σ\nhpc : Primrec fun a => pc a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nrf : α → Code → σ → σ\nhrf : Primrec fun a => rf a.fst a.snd.fst a.snd.snd\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m) s\n              else pc a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n              else pr a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂)\n          (List.get? IH (unpair m).snd)\nthis✝ : Primrec G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Primrec₂ G\na : α\n⊢ G a [] = some (F a zero)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code → Code → σ → σ → σ\nhpr : Primrec fun a => pr a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nco : α → Code → Code → σ → σ → σ\nhco : Primrec fun a => co a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\npc : α → Code → Code → σ → σ → σ\nhpc : Primrec fun a => pc a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nrf : α → Code → σ → σ\nhrf : Primrec fun a => rf a.fst a.snd.fst a.snd.snd\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m) s\n              else pc a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n              else pr a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂)\n          (List.get? IH (unpair m).snd)\nthis✝ : Primrec G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Primrec₂ G\na : α\nn : ℕ\n⊢ G a (List.map (fun n => F a (ofNat Code n)) (List.range (Nat.succ n))) = some (F a (ofNat Code (Nat.succ n)))\n[PROOFSTEP]\ncases' n with n\n[GOAL]\ncase succ.zero\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code → Code → σ → σ → σ\nhpr : Primrec fun a => pr a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nco : α → Code → Code → σ → σ → σ\nhco : Primrec fun a => co a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\npc : α → Code → Code → σ → σ → σ\nhpc : Primrec fun a => pc a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nrf : α → Code → σ → σ\nhrf : Primrec fun a => rf a.fst a.snd.fst a.snd.snd\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m) s\n              else pc a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n              else pr a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂)\n          (List.get? IH (unpair m).snd)\nthis✝ : Primrec G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Primrec₂ G\na : α\n⊢ G a (List.map (fun n => F a (ofNat Code n)) (List.range (Nat.succ Nat.zero))) =\n    some (F a (ofNat Code (Nat.succ Nat.zero)))\n[PROOFSTEP]\nsimp (config := { zeta := false }) [ofNatCode_eq, ofNatCode]\n[GOAL]\ncase succ.zero\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code → Code → σ → σ → σ\nhpr : Primrec fun a => pr a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nco : α → Code → Code → σ → σ → σ\nhco : Primrec fun a => co a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\npc : α → Code → Code → σ → σ → σ\nhpc : Primrec fun a => pc a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nrf : α → Code → σ → σ\nhrf : Primrec fun a => rf a.fst a.snd.fst a.snd.snd\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m) s\n              else pc a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n              else pr a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂)\n          (List.get? IH (unpair m).snd)\nthis✝ : Primrec G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Primrec₂ G\na : α\n⊢ G a [F a zero] = some (F a succ)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ.succ\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code → Code → σ → σ → σ\nhpr : Primrec fun a => pr a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nco : α → Code → Code → σ → σ → σ\nhco : Primrec fun a => co a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\npc : α → Code → Code → σ → σ → σ\nhpc : Primrec fun a => pc a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nrf : α → Code → σ → σ\nhrf : Primrec fun a => rf a.fst a.snd.fst a.snd.snd\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m) s\n              else pc a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n              else pr a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂)\n          (List.get? IH (unpair m).snd)\nthis✝ : Primrec G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Primrec₂ G\na : α\nn : ℕ\n⊢ G a (List.map (fun n => F a (ofNat Code n)) (List.range (Nat.succ (Nat.succ n)))) =\n    some (F a (ofNat Code (Nat.succ (Nat.succ n))))\n[PROOFSTEP]\ncases' n with n\n[GOAL]\ncase succ.succ.zero\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code → Code → σ → σ → σ\nhpr : Primrec fun a => pr a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nco : α → Code → Code → σ → σ → σ\nhco : Primrec fun a => co a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\npc : α → Code → Code → σ → σ → σ\nhpc : Primrec fun a => pc a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nrf : α → Code → σ → σ\nhrf : Primrec fun a => rf a.fst a.snd.fst a.snd.snd\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m) s\n              else pc a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n              else pr a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂)\n          (List.get? IH (unpair m).snd)\nthis✝ : Primrec G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Primrec₂ G\na : α\n⊢ G a (List.map (fun n => F a (ofNat Code n)) (List.range (Nat.succ (Nat.succ Nat.zero)))) =\n    some (F a (ofNat Code (Nat.succ (Nat.succ Nat.zero))))\n[PROOFSTEP]\nsimp (config := { zeta := false }) [ofNatCode_eq, ofNatCode]\n[GOAL]\ncase succ.succ.zero\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code → Code → σ → σ → σ\nhpr : Primrec fun a => pr a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nco : α → Code → Code → σ → σ → σ\nhco : Primrec fun a => co a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\npc : α → Code → Code → σ → σ → σ\nhpc : Primrec fun a => pc a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nrf : α → Code → σ → σ\nhrf : Primrec fun a => rf a.fst a.snd.fst a.snd.snd\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m) s\n              else pc a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n              else pr a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂)\n          (List.get? IH (unpair m).snd)\nthis✝ : Primrec G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Primrec₂ G\na : α\n⊢ G a [F a zero, F a succ] = some (F a left)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ.succ.succ\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code → Code → σ → σ → σ\nhpr : Primrec fun a => pr a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nco : α → Code → Code → σ → σ → σ\nhco : Primrec fun a => co a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\npc : α → Code → Code → σ → σ → σ\nhpc : Primrec fun a => pc a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nrf : α → Code → σ → σ\nhrf : Primrec fun a => rf a.fst a.snd.fst a.snd.snd\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m) s\n              else pc a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n              else pr a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂)\n          (List.get? IH (unpair m).snd)\nthis✝ : Primrec G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Primrec₂ G\na : α\nn : ℕ\n⊢ G a (List.map (fun n => F a (ofNat Code n)) (List.range (Nat.succ (Nat.succ (Nat.succ n))))) =\n    some (F a (ofNat Code (Nat.succ (Nat.succ (Nat.succ n)))))\n[PROOFSTEP]\ncases' n with n\n[GOAL]\ncase succ.succ.succ.zero\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code → Code → σ → σ → σ\nhpr : Primrec fun a => pr a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nco : α → Code → Code → σ → σ → σ\nhco : Primrec fun a => co a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\npc : α → Code → Code → σ → σ → σ\nhpc : Primrec fun a => pc a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nrf : α → Code → σ → σ\nhrf : Primrec fun a => rf a.fst a.snd.fst a.snd.snd\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m) s\n              else pc a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n              else pr a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂)\n          (List.get? IH (unpair m).snd)\nthis✝ : Primrec G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Primrec₂ G\na : α\n⊢ G a (List.map (fun n => F a (ofNat Code n)) (List.range (Nat.succ (Nat.succ (Nat.succ Nat.zero))))) =\n    some (F a (ofNat Code (Nat.succ (Nat.succ (Nat.succ Nat.zero)))))\n[PROOFSTEP]\nsimp (config := { zeta := false }) [ofNatCode_eq, ofNatCode]\n[GOAL]\ncase succ.succ.succ.zero\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code → Code → σ → σ → σ\nhpr : Primrec fun a => pr a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nco : α → Code → Code → σ → σ → σ\nhco : Primrec fun a => co a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\npc : α → Code → Code → σ → σ → σ\nhpc : Primrec fun a => pc a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nrf : α → Code → σ → σ\nhrf : Primrec fun a => rf a.fst a.snd.fst a.snd.snd\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m) s\n              else pc a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n              else pr a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂)\n          (List.get? IH (unpair m).snd)\nthis✝ : Primrec G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Primrec₂ G\na : α\n⊢ G a [F a zero, F a succ, F a left] = some (F a right)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ.succ.succ.succ\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code → Code → σ → σ → σ\nhpr : Primrec fun a => pr a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nco : α → Code → Code → σ → σ → σ\nhco : Primrec fun a => co a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\npc : α → Code → Code → σ → σ → σ\nhpc : Primrec fun a => pc a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nrf : α → Code → σ → σ\nhrf : Primrec fun a => rf a.fst a.snd.fst a.snd.snd\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m) s\n              else pc a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n              else pr a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂)\n          (List.get? IH (unpair m).snd)\nthis✝ : Primrec G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Primrec₂ G\na : α\nn : ℕ\n⊢ G a (List.map (fun n => F a (ofNat Code n)) (List.range (Nat.succ (Nat.succ (Nat.succ (Nat.succ n)))))) =\n    some (F a (ofNat Code (Nat.succ (Nat.succ (Nat.succ (Nat.succ n))))))\n[PROOFSTEP]\nsimp only []\n[GOAL]\ncase succ.succ.succ.succ\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code → Code → σ → σ → σ\nhpr : Primrec fun a => pr a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nco : α → Code → Code → σ → σ → σ\nhco : Primrec fun a => co a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\npc : α → Code → Code → σ → σ → σ\nhpc : Primrec fun a => pc a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nrf : α → Code → σ → σ\nhrf : Primrec fun a => rf a.fst a.snd.fst a.snd.snd\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m) s\n              else pc a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n              else pr a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂)\n          (List.get? IH (unpair m).snd)\nthis✝ : Primrec G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Primrec₂ G\na : α\nn : ℕ\n⊢ Nat.rec (some (z a))\n      (fun n_1 n_ih =>\n        Nat.rec (some (s a))\n          (fun n_2 n_ih =>\n            Nat.rec (some (l a))\n              (fun n_3 n_ih =>\n                Nat.rec (some (r a))\n                  (fun n_4 n_ih =>\n                    Option.bind\n                      (List.get?\n                        (List.map (fun n => rec (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a) (ofNat Code n))\n                          (List.range (Nat.succ (Nat.succ (Nat.succ (Nat.succ n))))))\n                        (div2 (div2 n_4)))\n                      fun s_1 =>\n                      Option.bind\n                        (List.get?\n                          (List.map (fun n => rec (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a) (ofNat Code n))\n                            (List.range (Nat.succ (Nat.succ (Nat.succ (Nat.succ n))))))\n                          (unpair (div2 (div2 n_4))).fst)\n                        fun s₁ =>\n                        Option.map\n                          (fun s₂ =>\n                            bif bodd n_4 then\n                              bif bodd (div2 n_4) then rf a (ofNat Code (div2 (div2 n_4))) s_1\n                              else\n                                pc a (ofNat Code (unpair (div2 (div2 n_4))).fst)\n                                  (ofNat Code (unpair (div2 (div2 n_4))).snd) s₁ s₂\n                            else\n                              bif bodd (div2 n_4) then\n                                co a (ofNat Code (unpair (div2 (div2 n_4))).fst)\n                                  (ofNat Code (unpair (div2 (div2 n_4))).snd) s₁ s₂\n                              else\n                                pr a (ofNat Code (unpair (div2 (div2 n_4))).fst)\n                                  (ofNat Code (unpair (div2 (div2 n_4))).snd) s₁ s₂)\n                          (List.get?\n                            (List.map (fun n => rec (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a) (ofNat Code n))\n                              (List.range (Nat.succ (Nat.succ (Nat.succ (Nat.succ n))))))\n                            (unpair (div2 (div2 n_4))).snd))\n                  n_3)\n              n_2)\n          n_1)\n      (List.length\n        (List.map (fun n => rec (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a) (ofNat Code n))\n          (List.range (Nat.succ (Nat.succ (Nat.succ (Nat.succ n))))))) =\n    some\n      (rec (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a)\n        (ofNat Code (Nat.succ (Nat.succ (Nat.succ (Nat.succ n))))))\n[PROOFSTEP]\nrw [List.length_map, List.length_range]\n[GOAL]\ncase succ.succ.succ.succ\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code → Code → σ → σ → σ\nhpr : Primrec fun a => pr a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nco : α → Code → Code → σ → σ → σ\nhco : Primrec fun a => co a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\npc : α → Code → Code → σ → σ → σ\nhpc : Primrec fun a => pc a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nrf : α → Code → σ → σ\nhrf : Primrec fun a => rf a.fst a.snd.fst a.snd.snd\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m) s\n              else pc a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n              else pr a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂)\n          (List.get? IH (unpair m).snd)\nthis✝ : Primrec G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Primrec₂ G\na : α\nn : ℕ\n⊢ Nat.rec (some (z a))\n      (fun n_1 n_ih =>\n        Nat.rec (some (s a))\n          (fun n_2 n_ih =>\n            Nat.rec (some (l a))\n              (fun n_3 n_ih =>\n                Nat.rec (some (r a))\n                  (fun n_4 n_ih =>\n                    Option.bind\n                      (List.get?\n                        (List.map (fun n => rec (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a) (ofNat Code n))\n                          (List.range (Nat.succ (Nat.succ (Nat.succ (Nat.succ n))))))\n                        (div2 (div2 n_4)))\n                      fun s_1 =>\n                      Option.bind\n                        (List.get?\n                          (List.map (fun n => rec (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a) (ofNat Code n))\n                            (List.range (Nat.succ (Nat.succ (Nat.succ (Nat.succ n))))))\n                          (unpair (div2 (div2 n_4))).fst)\n                        fun s₁ =>\n                        Option.map\n                          (fun s₂ =>\n                            bif bodd n_4 then\n                              bif bodd (div2 n_4) then rf a (ofNat Code (div2 (div2 n_4))) s_1\n                              else\n                                pc a (ofNat Code (unpair (div2 (div2 n_4))).fst)\n                                  (ofNat Code (unpair (div2 (div2 n_4))).snd) s₁ s₂\n                            else\n                              bif bodd (div2 n_4) then\n                                co a (ofNat Code (unpair (div2 (div2 n_4))).fst)\n                                  (ofNat Code (unpair (div2 (div2 n_4))).snd) s₁ s₂\n                              else\n                                pr a (ofNat Code (unpair (div2 (div2 n_4))).fst)\n                                  (ofNat Code (unpair (div2 (div2 n_4))).snd) s₁ s₂)\n                          (List.get?\n                            (List.map (fun n => rec (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a) (ofNat Code n))\n                              (List.range (Nat.succ (Nat.succ (Nat.succ (Nat.succ n))))))\n                            (unpair (div2 (div2 n_4))).snd))\n                  n_3)\n              n_2)\n          n_1)\n      (Nat.succ (Nat.succ (Nat.succ (Nat.succ n)))) =\n    some\n      (rec (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a)\n        (ofNat Code (Nat.succ (Nat.succ (Nat.succ (Nat.succ n))))))\n[PROOFSTEP]\nlet m := n.div2.div2\n[GOAL]\ncase succ.succ.succ.succ\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code → Code → σ → σ → σ\nhpr : Primrec fun a => pr a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nco : α → Code → Code → σ → σ → σ\nhco : Primrec fun a => co a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\npc : α → Code → Code → σ → σ → σ\nhpc : Primrec fun a => pc a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nrf : α → Code → σ → σ\nhrf : Primrec fun a => rf a.fst a.snd.fst a.snd.snd\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m) s\n              else pc a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n              else pr a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂)\n          (List.get? IH (unpair m).snd)\nthis✝ : Primrec G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Primrec₂ G\na : α\nn : ℕ\nm : ℕ := div2 (div2 n)\n⊢ Nat.rec (some (z a))\n      (fun n_1 n_ih =>\n        Nat.rec (some (s a))\n          (fun n_2 n_ih =>\n            Nat.rec (some (l a))\n              (fun n_3 n_ih =>\n                Nat.rec (some (r a))\n                  (fun n_4 n_ih =>\n                    Option.bind\n                      (List.get?\n                        (List.map (fun n => rec (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a) (ofNat Code n))\n                          (List.range (Nat.succ (Nat.succ (Nat.succ (Nat.succ n))))))\n                        (div2 (div2 n_4)))\n                      fun s_1 =>\n                      Option.bind\n                        (List.get?\n                          (List.map (fun n => rec (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a) (ofNat Code n))\n                            (List.range (Nat.succ (Nat.succ (Nat.succ (Nat.succ n))))))\n                          (unpair (div2 (div2 n_4))).fst)\n                        fun s₁ =>\n                        Option.map\n                          (fun s₂ =>\n                            bif bodd n_4 then\n                              bif bodd (div2 n_4) then rf a (ofNat Code (div2 (div2 n_4))) s_1\n                              else\n                                pc a (ofNat Code (unpair (div2 (div2 n_4))).fst)\n                                  (ofNat Code (unpair (div2 (div2 n_4))).snd) s₁ s₂\n                            else\n                              bif bodd (div2 n_4) then\n                                co a (ofNat Code (unpair (div2 (div2 n_4))).fst)\n                                  (ofNat Code (unpair (div2 (div2 n_4))).snd) s₁ s₂\n                              else\n                                pr a (ofNat Code (unpair (div2 (div2 n_4))).fst)\n                                  (ofNat Code (unpair (div2 (div2 n_4))).snd) s₁ s₂)\n                          (List.get?\n                            (List.map (fun n => rec (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a) (ofNat Code n))\n                              (List.range (Nat.succ (Nat.succ (Nat.succ (Nat.succ n))))))\n                            (unpair (div2 (div2 n_4))).snd))\n                  n_3)\n              n_2)\n          n_1)\n      (Nat.succ (Nat.succ (Nat.succ (Nat.succ n)))) =\n    some\n      (rec (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a)\n        (ofNat Code (Nat.succ (Nat.succ (Nat.succ (Nat.succ n))))))\n[PROOFSTEP]\nshow G₁ ((a, (List.range (n + 4)).map fun n => F a (ofNat Code n)), n, m) = some (F a (ofNat Code (n + 4)))\n[GOAL]\ncase succ.succ.succ.succ\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code → Code → σ → σ → σ\nhpr : Primrec fun a => pr a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nco : α → Code → Code → σ → σ → σ\nhco : Primrec fun a => co a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\npc : α → Code → Code → σ → σ → σ\nhpc : Primrec fun a => pc a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nrf : α → Code → σ → σ\nhrf : Primrec fun a => rf a.fst a.snd.fst a.snd.snd\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m) s\n              else pc a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n              else pr a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂)\n          (List.get? IH (unpair m).snd)\nthis✝ : Primrec G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Primrec₂ G\na : α\nn : ℕ\nm : ℕ := div2 (div2 n)\n⊢ G₁ ((a, List.map (fun n => F a (ofNat Code n)) (List.range (n + 4))), n, m) = some (F a (ofNat Code (n + 4)))\n[PROOFSTEP]\nhave hm : m < n + 4 := by\n  simp [Nat.div2_val]\n  exact lt_of_le_of_lt (le_trans (Nat.div_le_self _ _) (Nat.div_le_self _ _)) (Nat.succ_le_succ (Nat.le_add_right _ _))\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code → Code → σ → σ → σ\nhpr : Primrec fun a => pr a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nco : α → Code → Code → σ → σ → σ\nhco : Primrec fun a => co a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\npc : α → Code → Code → σ → σ → σ\nhpc : Primrec fun a => pc a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nrf : α → Code → σ → σ\nhrf : Primrec fun a => rf a.fst a.snd.fst a.snd.snd\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m) s\n              else pc a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n              else pr a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂)\n          (List.get? IH (unpair m).snd)\nthis✝ : Primrec G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Primrec₂ G\na : α\nn : ℕ\nm : ℕ := div2 (div2 n)\n⊢ m < n + 4\n[PROOFSTEP]\nsimp [Nat.div2_val]\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code → Code → σ → σ → σ\nhpr : Primrec fun a => pr a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nco : α → Code → Code → σ → σ → σ\nhco : Primrec fun a => co a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\npc : α → Code → Code → σ → σ → σ\nhpc : Primrec fun a => pc a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nrf : α → Code → σ → σ\nhrf : Primrec fun a => rf a.fst a.snd.fst a.snd.snd\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m) s\n              else pc a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n              else pr a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂)\n          (List.get? IH (unpair m).snd)\nthis✝ : Primrec G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Primrec₂ G\na : α\nn : ℕ\nm : ℕ := div2 (div2 n)\n⊢ n / 2 / 2 < n + 4\n[PROOFSTEP]\nexact lt_of_le_of_lt (le_trans (Nat.div_le_self _ _) (Nat.div_le_self _ _)) (Nat.succ_le_succ (Nat.le_add_right _ _))\n[GOAL]\ncase succ.succ.succ.succ\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code → Code → σ → σ → σ\nhpr : Primrec fun a => pr a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nco : α → Code → Code → σ → σ → σ\nhco : Primrec fun a => co a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\npc : α → Code → Code → σ → σ → σ\nhpc : Primrec fun a => pc a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nrf : α → Code → σ → σ\nhrf : Primrec fun a => rf a.fst a.snd.fst a.snd.snd\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m) s\n              else pc a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n              else pr a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂)\n          (List.get? IH (unpair m).snd)\nthis✝ : Primrec G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Primrec₂ G\na : α\nn : ℕ\nm : ℕ := div2 (div2 n)\nhm : m < n + 4\n⊢ G₁ ((a, List.map (fun n => F a (ofNat Code n)) (List.range (n + 4))), n, m) = some (F a (ofNat Code (n + 4)))\n[PROOFSTEP]\nhave m1 : m.unpair.1 < n + 4 := lt_of_le_of_lt m.unpair_left_le hm\n[GOAL]\ncase succ.succ.succ.succ\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code → Code → σ → σ → σ\nhpr : Primrec fun a => pr a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nco : α → Code → Code → σ → σ → σ\nhco : Primrec fun a => co a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\npc : α → Code → Code → σ → σ → σ\nhpc : Primrec fun a => pc a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nrf : α → Code → σ → σ\nhrf : Primrec fun a => rf a.fst a.snd.fst a.snd.snd\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m) s\n              else pc a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n              else pr a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂)\n          (List.get? IH (unpair m).snd)\nthis✝ : Primrec G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Primrec₂ G\na : α\nn : ℕ\nm : ℕ := div2 (div2 n)\nhm : m < n + 4\nm1 : (unpair m).fst < n + 4\n⊢ G₁ ((a, List.map (fun n => F a (ofNat Code n)) (List.range (n + 4))), n, m) = some (F a (ofNat Code (n + 4)))\n[PROOFSTEP]\nhave m2 : m.unpair.2 < n + 4 := lt_of_le_of_lt m.unpair_right_le hm\n[GOAL]\ncase succ.succ.succ.succ\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code → Code → σ → σ → σ\nhpr : Primrec fun a => pr a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nco : α → Code → Code → σ → σ → σ\nhco : Primrec fun a => co a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\npc : α → Code → Code → σ → σ → σ\nhpc : Primrec fun a => pc a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nrf : α → Code → σ → σ\nhrf : Primrec fun a => rf a.fst a.snd.fst a.snd.snd\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m) s\n              else pc a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n              else pr a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂)\n          (List.get? IH (unpair m).snd)\nthis✝ : Primrec G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Primrec₂ G\na : α\nn : ℕ\nm : ℕ := div2 (div2 n)\nhm : m < n + 4\nm1 : (unpair m).fst < n + 4\nm2 : (unpair m).snd < n + 4\n⊢ G₁ ((a, List.map (fun n => F a (ofNat Code n)) (List.range (n + 4))), n, m) = some (F a (ofNat Code (n + 4)))\n[PROOFSTEP]\nsimp [List.get?_map, List.get?_range, hm, m1, m2]\n[GOAL]\ncase succ.succ.succ.succ\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code → Code → σ → σ → σ\nhpr : Primrec fun a => pr a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nco : α → Code → Code → σ → σ → σ\nhco : Primrec fun a => co a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\npc : α → Code → Code → σ → σ → σ\nhpc : Primrec fun a => pc a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nrf : α → Code → σ → σ\nhrf : Primrec fun a => rf a.fst a.snd.fst a.snd.snd\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m) s\n              else pc a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n              else pr a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂)\n          (List.get? IH (unpair m).snd)\nthis✝ : Primrec G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Primrec₂ G\na : α\nn : ℕ\nm : ℕ := div2 (div2 n)\nhm : m < n + 4\nm1 : (unpair m).fst < n + 4\nm2 : (unpair m).snd < n + 4\n⊢ (bif bodd n then\n      bif bodd (div2 n) then\n        rf a (ofNat Code (div2 (div2 n)))\n          (rec (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a) (ofNat Code (div2 (div2 n))))\n      else\n        pc a (ofNat Code (unpair (div2 (div2 n))).fst) (ofNat Code (unpair (div2 (div2 n))).snd)\n          (rec (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a) (ofNat Code (unpair (div2 (div2 n))).fst))\n          (rec (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a) (ofNat Code (unpair (div2 (div2 n))).snd))\n    else\n      bif bodd (div2 n) then\n        co a (ofNat Code (unpair (div2 (div2 n))).fst) (ofNat Code (unpair (div2 (div2 n))).snd)\n          (rec (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a) (ofNat Code (unpair (div2 (div2 n))).fst))\n          (rec (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a) (ofNat Code (unpair (div2 (div2 n))).snd))\n      else\n        pr a (ofNat Code (unpair (div2 (div2 n))).fst) (ofNat Code (unpair (div2 (div2 n))).snd)\n          (rec (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a) (ofNat Code (unpair (div2 (div2 n))).fst))\n          (rec (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a) (ofNat Code (unpair (div2 (div2 n))).snd))) =\n    rec (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a) (ofNat Code (n + 4))\n[PROOFSTEP]\nrw [show ofNat Code (n + 4) = ofNatCode (n + 4) from rfl]\n[GOAL]\ncase succ.succ.succ.succ\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code → Code → σ → σ → σ\nhpr : Primrec fun a => pr a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nco : α → Code → Code → σ → σ → σ\nhco : Primrec fun a => co a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\npc : α → Code → Code → σ → σ → σ\nhpc : Primrec fun a => pc a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nrf : α → Code → σ → σ\nhrf : Primrec fun a => rf a.fst a.snd.fst a.snd.snd\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m) s\n              else pc a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n              else pr a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂)\n          (List.get? IH (unpair m).snd)\nthis✝ : Primrec G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Primrec₂ G\na : α\nn : ℕ\nm : ℕ := div2 (div2 n)\nhm : m < n + 4\nm1 : (unpair m).fst < n + 4\nm2 : (unpair m).snd < n + 4\n⊢ (bif bodd n then\n      bif bodd (div2 n) then\n        rf a (ofNat Code (div2 (div2 n)))\n          (rec (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a) (ofNat Code (div2 (div2 n))))\n      else\n        pc a (ofNat Code (unpair (div2 (div2 n))).fst) (ofNat Code (unpair (div2 (div2 n))).snd)\n          (rec (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a) (ofNat Code (unpair (div2 (div2 n))).fst))\n          (rec (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a) (ofNat Code (unpair (div2 (div2 n))).snd))\n    else\n      bif bodd (div2 n) then\n        co a (ofNat Code (unpair (div2 (div2 n))).fst) (ofNat Code (unpair (div2 (div2 n))).snd)\n          (rec (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a) (ofNat Code (unpair (div2 (div2 n))).fst))\n          (rec (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a) (ofNat Code (unpair (div2 (div2 n))).snd))\n      else\n        pr a (ofNat Code (unpair (div2 (div2 n))).fst) (ofNat Code (unpair (div2 (div2 n))).snd)\n          (rec (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a) (ofNat Code (unpair (div2 (div2 n))).fst))\n          (rec (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a) (ofNat Code (unpair (div2 (div2 n))).snd))) =\n    rec (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a) (ofNatCode (n + 4))\n[PROOFSTEP]\nsimp [ofNatCode]\n[GOAL]\ncase succ.succ.succ.succ\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code → Code → σ → σ → σ\nhpr : Primrec fun a => pr a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nco : α → Code → Code → σ → σ → σ\nhco : Primrec fun a => co a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\npc : α → Code → Code → σ → σ → σ\nhpc : Primrec fun a => pc a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nrf : α → Code → σ → σ\nhrf : Primrec fun a => rf a.fst a.snd.fst a.snd.snd\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m) s\n              else pc a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n              else pr a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂)\n          (List.get? IH (unpair m).snd)\nthis✝ : Primrec G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Primrec₂ G\na : α\nn : ℕ\nm : ℕ := div2 (div2 n)\nhm : m < n + 4\nm1 : (unpair m).fst < n + 4\nm2 : (unpair m).snd < n + 4\n⊢ (bif bodd n then\n      bif bodd (div2 n) then\n        rf a (ofNat Code (div2 (div2 n)))\n          (rec (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a) (ofNat Code (div2 (div2 n))))\n      else\n        pc a (ofNat Code (unpair (div2 (div2 n))).fst) (ofNat Code (unpair (div2 (div2 n))).snd)\n          (rec (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a) (ofNat Code (unpair (div2 (div2 n))).fst))\n          (rec (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a) (ofNat Code (unpair (div2 (div2 n))).snd))\n    else\n      bif bodd (div2 n) then\n        co a (ofNat Code (unpair (div2 (div2 n))).fst) (ofNat Code (unpair (div2 (div2 n))).snd)\n          (rec (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a) (ofNat Code (unpair (div2 (div2 n))).fst))\n          (rec (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a) (ofNat Code (unpair (div2 (div2 n))).snd))\n      else\n        pr a (ofNat Code (unpair (div2 (div2 n))).fst) (ofNat Code (unpair (div2 (div2 n))).snd)\n          (rec (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a) (ofNat Code (unpair (div2 (div2 n))).fst))\n          (rec (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a) (ofNat Code (unpair (div2 (div2 n))).snd))) =\n    rec (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a)\n      (match bodd n, bodd (div2 n) with\n      | false, false => pair (ofNatCode (unpair (div2 (div2 n))).fst) (ofNatCode (unpair (div2 (div2 n))).snd)\n      | false, true => comp (ofNatCode (unpair (div2 (div2 n))).fst) (ofNatCode (unpair (div2 (div2 n))).snd)\n      | true, false => prec (ofNatCode (unpair (div2 (div2 n))).fst) (ofNatCode (unpair (div2 (div2 n))).snd)\n      | true, true => rfind' (ofNatCode (div2 (div2 n))))\n[PROOFSTEP]\ncases n.bodd\n[GOAL]\ncase succ.succ.succ.succ.false\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code → Code → σ → σ → σ\nhpr : Primrec fun a => pr a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nco : α → Code → Code → σ → σ → σ\nhco : Primrec fun a => co a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\npc : α → Code → Code → σ → σ → σ\nhpc : Primrec fun a => pc a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nrf : α → Code → σ → σ\nhrf : Primrec fun a => rf a.fst a.snd.fst a.snd.snd\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m) s\n              else pc a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n              else pr a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂)\n          (List.get? IH (unpair m).snd)\nthis✝ : Primrec G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Primrec₂ G\na : α\nn : ℕ\nm : ℕ := div2 (div2 n)\nhm : m < n + 4\nm1 : (unpair m).fst < n + 4\nm2 : (unpair m).snd < n + 4\n⊢ (bif false then\n      bif bodd (div2 n) then\n        rf a (ofNat Code (div2 (div2 n)))\n          (rec (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a) (ofNat Code (div2 (div2 n))))\n      else\n        pc a (ofNat Code (unpair (div2 (div2 n))).fst) (ofNat Code (unpair (div2 (div2 n))).snd)\n          (rec (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a) (ofNat Code (unpair (div2 (div2 n))).fst))\n          (rec (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a) (ofNat Code (unpair (div2 (div2 n))).snd))\n    else\n      bif bodd (div2 n) then\n        co a (ofNat Code (unpair (div2 (div2 n))).fst) (ofNat Code (unpair (div2 (div2 n))).snd)\n          (rec (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a) (ofNat Code (unpair (div2 (div2 n))).fst))\n          (rec (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a) (ofNat Code (unpair (div2 (div2 n))).snd))\n      else\n        pr a (ofNat Code (unpair (div2 (div2 n))).fst) (ofNat Code (unpair (div2 (div2 n))).snd)\n          (rec (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a) (ofNat Code (unpair (div2 (div2 n))).fst))\n          (rec (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a) (ofNat Code (unpair (div2 (div2 n))).snd))) =\n    rec (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a)\n      (match false, bodd (div2 n) with\n      | false, false => pair (ofNatCode (unpair (div2 (div2 n))).fst) (ofNatCode (unpair (div2 (div2 n))).snd)\n      | false, true => comp (ofNatCode (unpair (div2 (div2 n))).fst) (ofNatCode (unpair (div2 (div2 n))).snd)\n      | true, false => prec (ofNatCode (unpair (div2 (div2 n))).fst) (ofNatCode (unpair (div2 (div2 n))).snd)\n      | true, true => rfind' (ofNatCode (div2 (div2 n))))\n[PROOFSTEP]\ncases n.div2.bodd\n[GOAL]\ncase succ.succ.succ.succ.true\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code → Code → σ → σ → σ\nhpr : Primrec fun a => pr a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nco : α → Code → Code → σ → σ → σ\nhco : Primrec fun a => co a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\npc : α → Code → Code → σ → σ → σ\nhpc : Primrec fun a => pc a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nrf : α → Code → σ → σ\nhrf : Primrec fun a => rf a.fst a.snd.fst a.snd.snd\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m) s\n              else pc a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n              else pr a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂)\n          (List.get? IH (unpair m).snd)\nthis✝ : Primrec G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Primrec₂ G\na : α\nn : ℕ\nm : ℕ := div2 (div2 n)\nhm : m < n + 4\nm1 : (unpair m).fst < n + 4\nm2 : (unpair m).snd < n + 4\n⊢ (bif true then\n      bif bodd (div2 n) then\n        rf a (ofNat Code (div2 (div2 n)))\n          (rec (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a) (ofNat Code (div2 (div2 n))))\n      else\n        pc a (ofNat Code (unpair (div2 (div2 n))).fst) (ofNat Code (unpair (div2 (div2 n))).snd)\n          (rec (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a) (ofNat Code (unpair (div2 (div2 n))).fst))\n          (rec (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a) (ofNat Code (unpair (div2 (div2 n))).snd))\n    else\n      bif bodd (div2 n) then\n        co a (ofNat Code (unpair (div2 (div2 n))).fst) (ofNat Code (unpair (div2 (div2 n))).snd)\n          (rec (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a) (ofNat Code (unpair (div2 (div2 n))).fst))\n          (rec (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a) (ofNat Code (unpair (div2 (div2 n))).snd))\n      else\n        pr a (ofNat Code (unpair (div2 (div2 n))).fst) (ofNat Code (unpair (div2 (div2 n))).snd)\n          (rec (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a) (ofNat Code (unpair (div2 (div2 n))).fst))\n          (rec (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a) (ofNat Code (unpair (div2 (div2 n))).snd))) =\n    rec (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a)\n      (match true, bodd (div2 n) with\n      | false, false => pair (ofNatCode (unpair (div2 (div2 n))).fst) (ofNatCode (unpair (div2 (div2 n))).snd)\n      | false, true => comp (ofNatCode (unpair (div2 (div2 n))).fst) (ofNatCode (unpair (div2 (div2 n))).snd)\n      | true, false => prec (ofNatCode (unpair (div2 (div2 n))).fst) (ofNatCode (unpair (div2 (div2 n))).snd)\n      | true, true => rfind' (ofNatCode (div2 (div2 n))))\n[PROOFSTEP]\ncases n.div2.bodd\n[GOAL]\ncase succ.succ.succ.succ.false.false\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code → Code → σ → σ → σ\nhpr : Primrec fun a => pr a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nco : α → Code → Code → σ → σ → σ\nhco : Primrec fun a => co a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\npc : α → Code → Code → σ → σ → σ\nhpc : Primrec fun a => pc a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nrf : α → Code → σ → σ\nhrf : Primrec fun a => rf a.fst a.snd.fst a.snd.snd\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m) s\n              else pc a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n              else pr a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂)\n          (List.get? IH (unpair m).snd)\nthis✝ : Primrec G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Primrec₂ G\na : α\nn : ℕ\nm : ℕ := div2 (div2 n)\nhm : m < n + 4\nm1 : (unpair m).fst < n + 4\nm2 : (unpair m).snd < n + 4\n⊢ (bif false then\n      bif false then\n        rf a (ofNat Code (div2 (div2 n)))\n          (rec (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a) (ofNat Code (div2 (div2 n))))\n      else\n        pc a (ofNat Code (unpair (div2 (div2 n))).fst) (ofNat Code (unpair (div2 (div2 n))).snd)\n          (rec (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a) (ofNat Code (unpair (div2 (div2 n))).fst))\n          (rec (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a) (ofNat Code (unpair (div2 (div2 n))).snd))\n    else\n      bif false then\n        co a (ofNat Code (unpair (div2 (div2 n))).fst) (ofNat Code (unpair (div2 (div2 n))).snd)\n          (rec (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a) (ofNat Code (unpair (div2 (div2 n))).fst))\n          (rec (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a) (ofNat Code (unpair (div2 (div2 n))).snd))\n      else\n        pr a (ofNat Code (unpair (div2 (div2 n))).fst) (ofNat Code (unpair (div2 (div2 n))).snd)\n          (rec (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a) (ofNat Code (unpair (div2 (div2 n))).fst))\n          (rec (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a) (ofNat Code (unpair (div2 (div2 n))).snd))) =\n    rec (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a)\n      (match false, false with\n      | false, false => pair (ofNatCode (unpair (div2 (div2 n))).fst) (ofNatCode (unpair (div2 (div2 n))).snd)\n      | false, true => comp (ofNatCode (unpair (div2 (div2 n))).fst) (ofNatCode (unpair (div2 (div2 n))).snd)\n      | true, false => prec (ofNatCode (unpair (div2 (div2 n))).fst) (ofNatCode (unpair (div2 (div2 n))).snd)\n      | true, true => rfind' (ofNatCode (div2 (div2 n))))\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ.succ.succ.succ.false.true\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code → Code → σ → σ → σ\nhpr : Primrec fun a => pr a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nco : α → Code → Code → σ → σ → σ\nhco : Primrec fun a => co a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\npc : α → Code → Code → σ → σ → σ\nhpc : Primrec fun a => pc a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nrf : α → Code → σ → σ\nhrf : Primrec fun a => rf a.fst a.snd.fst a.snd.snd\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m) s\n              else pc a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n              else pr a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂)\n          (List.get? IH (unpair m).snd)\nthis✝ : Primrec G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Primrec₂ G\na : α\nn : ℕ\nm : ℕ := div2 (div2 n)\nhm : m < n + 4\nm1 : (unpair m).fst < n + 4\nm2 : (unpair m).snd < n + 4\n⊢ (bif false then\n      bif true then\n        rf a (ofNat Code (div2 (div2 n)))\n          (rec (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a) (ofNat Code (div2 (div2 n))))\n      else\n        pc a (ofNat Code (unpair (div2 (div2 n))).fst) (ofNat Code (unpair (div2 (div2 n))).snd)\n          (rec (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a) (ofNat Code (unpair (div2 (div2 n))).fst))\n          (rec (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a) (ofNat Code (unpair (div2 (div2 n))).snd))\n    else\n      bif true then\n        co a (ofNat Code (unpair (div2 (div2 n))).fst) (ofNat Code (unpair (div2 (div2 n))).snd)\n          (rec (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a) (ofNat Code (unpair (div2 (div2 n))).fst))\n          (rec (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a) (ofNat Code (unpair (div2 (div2 n))).snd))\n      else\n        pr a (ofNat Code (unpair (div2 (div2 n))).fst) (ofNat Code (unpair (div2 (div2 n))).snd)\n          (rec (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a) (ofNat Code (unpair (div2 (div2 n))).fst))\n          (rec (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a) (ofNat Code (unpair (div2 (div2 n))).snd))) =\n    rec (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a)\n      (match false, true with\n      | false, false => pair (ofNatCode (unpair (div2 (div2 n))).fst) (ofNatCode (unpair (div2 (div2 n))).snd)\n      | false, true => comp (ofNatCode (unpair (div2 (div2 n))).fst) (ofNatCode (unpair (div2 (div2 n))).snd)\n      | true, false => prec (ofNatCode (unpair (div2 (div2 n))).fst) (ofNatCode (unpair (div2 (div2 n))).snd)\n      | true, true => rfind' (ofNatCode (div2 (div2 n))))\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ.succ.succ.succ.true.false\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code → Code → σ → σ → σ\nhpr : Primrec fun a => pr a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nco : α → Code → Code → σ → σ → σ\nhco : Primrec fun a => co a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\npc : α → Code → Code → σ → σ → σ\nhpc : Primrec fun a => pc a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nrf : α → Code → σ → σ\nhrf : Primrec fun a => rf a.fst a.snd.fst a.snd.snd\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m) s\n              else pc a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n              else pr a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂)\n          (List.get? IH (unpair m).snd)\nthis✝ : Primrec G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Primrec₂ G\na : α\nn : ℕ\nm : ℕ := div2 (div2 n)\nhm : m < n + 4\nm1 : (unpair m).fst < n + 4\nm2 : (unpair m).snd < n + 4\n⊢ (bif true then\n      bif false then\n        rf a (ofNat Code (div2 (div2 n)))\n          (rec (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a) (ofNat Code (div2 (div2 n))))\n      else\n        pc a (ofNat Code (unpair (div2 (div2 n))).fst) (ofNat Code (unpair (div2 (div2 n))).snd)\n          (rec (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a) (ofNat Code (unpair (div2 (div2 n))).fst))\n          (rec (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a) (ofNat Code (unpair (div2 (div2 n))).snd))\n    else\n      bif false then\n        co a (ofNat Code (unpair (div2 (div2 n))).fst) (ofNat Code (unpair (div2 (div2 n))).snd)\n          (rec (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a) (ofNat Code (unpair (div2 (div2 n))).fst))\n          (rec (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a) (ofNat Code (unpair (div2 (div2 n))).snd))\n      else\n        pr a (ofNat Code (unpair (div2 (div2 n))).fst) (ofNat Code (unpair (div2 (div2 n))).snd)\n          (rec (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a) (ofNat Code (unpair (div2 (div2 n))).fst))\n          (rec (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a) (ofNat Code (unpair (div2 (div2 n))).snd))) =\n    rec (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a)\n      (match true, false with\n      | false, false => pair (ofNatCode (unpair (div2 (div2 n))).fst) (ofNatCode (unpair (div2 (div2 n))).snd)\n      | false, true => comp (ofNatCode (unpair (div2 (div2 n))).fst) (ofNatCode (unpair (div2 (div2 n))).snd)\n      | true, false => prec (ofNatCode (unpair (div2 (div2 n))).fst) (ofNatCode (unpair (div2 (div2 n))).snd)\n      | true, true => rfind' (ofNatCode (div2 (div2 n))))\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ.succ.succ.succ.true.true\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Primrec c\nz : α → σ\nhz : Primrec z\ns : α → σ\nhs : Primrec s\nl : α → σ\nhl : Primrec l\nr : α → σ\nhr : Primrec r\npr : α → Code → Code → σ → σ → σ\nhpr : Primrec fun a => pr a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nco : α → Code → Code → σ → σ → σ\nhco : Primrec fun a => co a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\npc : α → Code → Code → σ → σ → σ\nhpc : Primrec fun a => pc a.fst a.snd.fst a.snd.snd.fst a.snd.snd.snd.fst a.snd.snd.snd.snd\nrf : α → Code → σ → σ\nhrf : Primrec fun a => rf a.fst a.snd.fst a.snd.snd\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m) s\n              else pc a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂\n              else pr a (ofNat Code (unpair m).fst) (ofNat Code (unpair m).snd) s₁ s₂)\n          (List.get? IH (unpair m).snd)\nthis✝ : Primrec G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Primrec₂ G\na : α\nn : ℕ\nm : ℕ := div2 (div2 n)\nhm : m < n + 4\nm1 : (unpair m).fst < n + 4\nm2 : (unpair m).snd < n + 4\n⊢ (bif true then\n      bif true then\n        rf a (ofNat Code (div2 (div2 n)))\n          (rec (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a) (ofNat Code (div2 (div2 n))))\n      else\n        pc a (ofNat Code (unpair (div2 (div2 n))).fst) (ofNat Code (unpair (div2 (div2 n))).snd)\n          (rec (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a) (ofNat Code (unpair (div2 (div2 n))).fst))\n          (rec (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a) (ofNat Code (unpair (div2 (div2 n))).snd))\n    else\n      bif true then\n        co a (ofNat Code (unpair (div2 (div2 n))).fst) (ofNat Code (unpair (div2 (div2 n))).snd)\n          (rec (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a) (ofNat Code (unpair (div2 (div2 n))).fst))\n          (rec (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a) (ofNat Code (unpair (div2 (div2 n))).snd))\n      else\n        pr a (ofNat Code (unpair (div2 (div2 n))).fst) (ofNat Code (unpair (div2 (div2 n))).snd)\n          (rec (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a) (ofNat Code (unpair (div2 (div2 n))).fst))\n          (rec (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a) (ofNat Code (unpair (div2 (div2 n))).snd))) =\n    rec (z a) (s a) (l a) (r a) (pr a) (co a) (pc a) (rf a)\n      (match true, true with\n      | false, false => pair (ofNatCode (unpair (div2 (div2 n))).fst) (ofNatCode (unpair (div2 (div2 n))).snd)\n      | false, true => comp (ofNatCode (unpair (div2 (div2 n))).fst) (ofNatCode (unpair (div2 (div2 n))).snd)\n      | true, false => prec (ofNatCode (unpair (div2 (div2 n))).fst) (ofNatCode (unpair (div2 (div2 n))).snd)\n      | true, true => rfind' (ofNatCode (div2 (div2 n))))\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Computable c\nz : α → σ\nhz : Computable z\ns : α → σ\nhs : Computable s\nl : α → σ\nhl : Computable l\nr : α → σ\nhr : Computable r\npr : α → Code × Code × σ × σ → σ\nhpr : Computable₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Computable₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Computable₂ pc\nrf : α → Code × σ → σ\nhrf : Computable₂ rf\n⊢ let PR := fun a cf cg hf hg => pr a (cf, cg, hf, hg);\n  let CO := fun a cf cg hf hg => co a (cf, cg, hf, hg);\n  let PC := fun a cf cg hf hg => pc a (cf, cg, hf, hg);\n  let RF := fun a cf hf => rf a (cf, hf);\n  let F := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR a) (CO a) (PC a) (RF a);\n  Computable fun a => F a (c a)\n[PROOFSTEP]\nintros _ _ _ _ F\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Computable c\nz : α → σ\nhz : Computable z\ns : α → σ\nhs : Computable s\nl : α → σ\nhl : Computable l\nr : α → σ\nhr : Computable r\npr : α → Code × Code × σ × σ → σ\nhpr : Computable₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Computable₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Computable₂ pc\nrf : α → Code × σ → σ\nhrf : Computable₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\n⊢ Computable fun a => F a (c a)\n[PROOFSTEP]\nlet G₁ : (α × List σ) × ℕ × ℕ → Option σ := fun p =>\n  let a := p.1.1\n  let IH := p.1.2\n  let n := p.2.1\n  let m := p.2.2\n  (IH.get? m).bind fun s =>\n    (IH.get? m.unpair.1).bind fun s₁ =>\n      (IH.get? m.unpair.2).map fun s₂ =>\n        cond n.bodd\n          (cond n.div2.bodd (rf a (ofNat Code m, s)) (pc a (ofNat Code m.unpair.1, ofNat Code m.unpair.2, s₁, s₂)))\n          (cond n.div2.bodd (co a (ofNat Code m.unpair.1, ofNat Code m.unpair.2, s₁, s₂))\n            (pr a (ofNat Code m.unpair.1, ofNat Code m.unpair.2, s₁, s₂)))\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Computable c\nz : α → σ\nhz : Computable z\ns : α → σ\nhs : Computable s\nl : α → σ\nhl : Computable l\nr : α → σ\nhr : Computable r\npr : α → Code × Code × σ × σ → σ\nhpr : Computable₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Computable₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Computable₂ pc\nrf : α → Code × σ → σ\nhrf : Computable₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\n⊢ Computable fun a => F a (c a)\n[PROOFSTEP]\nhave : Computable G₁ := by\n  refine' option_bind (list_get?.comp (snd.comp fst) (snd.comp snd)) _\n  unfold Computable₂\n  refine' option_bind ((list_get?.comp (snd.comp fst) (fst.comp <| Computable.unpair.comp (snd.comp snd))).comp fst) _\n  unfold Computable₂\n  refine'\n    option_map\n      ((list_get?.comp (snd.comp fst) (snd.comp <| Computable.unpair.comp (snd.comp snd))).comp <| fst.comp fst) _\n  have a : Computable (fun p : ((((α × List σ) × ℕ × ℕ) × σ) × σ) × σ => p.1.1.1.1.1) :=\n    fst.comp (fst.comp <| fst.comp <| fst.comp fst)\n  have n : Computable (fun p : ((((α × List σ) × ℕ × ℕ) × σ) × σ) × σ => p.1.1.1.2.1) :=\n    fst.comp (snd.comp <| fst.comp <| fst.comp fst)\n  have m : Computable (fun p : ((((α × List σ) × ℕ × ℕ) × σ) × σ) × σ => p.1.1.1.2.2) :=\n    snd.comp (snd.comp <| fst.comp <| fst.comp fst)\n  have m₁ := fst.comp (Computable.unpair.comp m)\n  have m₂ := snd.comp (Computable.unpair.comp m)\n  have s : Computable (fun p : ((((α × List σ) × ℕ × ℕ) × σ) × σ) × σ => p.1.1.2) := snd.comp (fst.comp fst)\n  have s₁ : Computable (fun p : ((((α × List σ) × ℕ × ℕ) × σ) × σ) × σ => p.1.2) := snd.comp fst\n  have s₂ : Computable (fun p : ((((α × List σ) × ℕ × ℕ) × σ) × σ) × σ => p.2) := snd\n  exact\n    (nat_bodd.comp n).cond\n      ((nat_bodd.comp <| nat_div2.comp n).cond (hrf.comp a (((Computable.ofNat Code).comp m).pair s))\n        (hpc.comp a (((Computable.ofNat Code).comp m₁).pair <| ((Computable.ofNat Code).comp m₂).pair <| s₁.pair s₂)))\n      (Computable.cond (nat_bodd.comp <| nat_div2.comp n)\n        (hco.comp a (((Computable.ofNat Code).comp m₁).pair <| ((Computable.ofNat Code).comp m₂).pair <| s₁.pair s₂))\n        (hpr.comp a (((Computable.ofNat Code).comp m₁).pair <| ((Computable.ofNat Code).comp m₂).pair <| s₁.pair s₂)))\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Computable c\nz : α → σ\nhz : Computable z\ns : α → σ\nhs : Computable s\nl : α → σ\nhl : Computable l\nr : α → σ\nhr : Computable r\npr : α → Code × Code × σ × σ → σ\nhpr : Computable₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Computable₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Computable₂ pc\nrf : α → Code × σ → σ\nhrf : Computable₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\n⊢ Computable G₁\n[PROOFSTEP]\nrefine' option_bind (list_get?.comp (snd.comp fst) (snd.comp snd)) _\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Computable c\nz : α → σ\nhz : Computable z\ns : α → σ\nhs : Computable s\nl : α → σ\nhl : Computable l\nr : α → σ\nhr : Computable r\npr : α → Code × Code × σ × σ → σ\nhpr : Computable₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Computable₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Computable₂ pc\nrf : α → Code × σ → σ\nhrf : Computable₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\n⊢ Computable₂ fun p s =>\n    Option.bind (List.get? p.fst.snd (unpair p.snd.snd).fst) fun s₁ =>\n      Option.map\n        (fun s₂ =>\n          bif bodd p.snd.fst then\n            bif bodd (div2 p.snd.fst) then rf p.fst.fst (ofNat Code p.snd.snd, s)\n            else pc p.fst.fst (ofNat Code (unpair p.snd.snd).fst, ofNat Code (unpair p.snd.snd).snd, s₁, s₂)\n          else\n            bif bodd (div2 p.snd.fst) then\n              co p.fst.fst (ofNat Code (unpair p.snd.snd).fst, ofNat Code (unpair p.snd.snd).snd, s₁, s₂)\n            else pr p.fst.fst (ofNat Code (unpair p.snd.snd).fst, ofNat Code (unpair p.snd.snd).snd, s₁, s₂))\n        (List.get? p.fst.snd (unpair p.snd.snd).snd)\n[PROOFSTEP]\nunfold Computable₂\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Computable c\nz : α → σ\nhz : Computable z\ns : α → σ\nhs : Computable s\nl : α → σ\nhl : Computable l\nr : α → σ\nhr : Computable r\npr : α → Code × Code × σ × σ → σ\nhpr : Computable₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Computable₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Computable₂ pc\nrf : α → Code × σ → σ\nhrf : Computable₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\n⊢ Computable fun p =>\n    (fun p s =>\n        Option.bind (List.get? p.fst.snd (unpair p.snd.snd).fst) fun s₁ =>\n          Option.map\n            (fun s₂ =>\n              bif bodd p.snd.fst then\n                bif bodd (div2 p.snd.fst) then rf p.fst.fst (ofNat Code p.snd.snd, s)\n                else pc p.fst.fst (ofNat Code (unpair p.snd.snd).fst, ofNat Code (unpair p.snd.snd).snd, s₁, s₂)\n              else\n                bif bodd (div2 p.snd.fst) then\n                  co p.fst.fst (ofNat Code (unpair p.snd.snd).fst, ofNat Code (unpair p.snd.snd).snd, s₁, s₂)\n                else pr p.fst.fst (ofNat Code (unpair p.snd.snd).fst, ofNat Code (unpair p.snd.snd).snd, s₁, s₂))\n            (List.get? p.fst.snd (unpair p.snd.snd).snd))\n      p.fst p.snd\n[PROOFSTEP]\nrefine' option_bind ((list_get?.comp (snd.comp fst) (fst.comp <| Computable.unpair.comp (snd.comp snd))).comp fst) _\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Computable c\nz : α → σ\nhz : Computable z\ns : α → σ\nhs : Computable s\nl : α → σ\nhl : Computable l\nr : α → σ\nhr : Computable r\npr : α → Code × Code × σ × σ → σ\nhpr : Computable₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Computable₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Computable₂ pc\nrf : α → Code × σ → σ\nhrf : Computable₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\n⊢ Computable₂ fun p s₁ =>\n    Option.map\n      (fun s₂ =>\n        bif bodd p.fst.snd.fst then\n          bif bodd (div2 p.fst.snd.fst) then rf p.fst.fst.fst (ofNat Code p.fst.snd.snd, p.snd)\n          else pc p.fst.fst.fst (ofNat Code (unpair p.fst.snd.snd).fst, ofNat Code (unpair p.fst.snd.snd).snd, s₁, s₂)\n        else\n          bif bodd (div2 p.fst.snd.fst) then\n            co p.fst.fst.fst (ofNat Code (unpair p.fst.snd.snd).fst, ofNat Code (unpair p.fst.snd.snd).snd, s₁, s₂)\n          else pr p.fst.fst.fst (ofNat Code (unpair p.fst.snd.snd).fst, ofNat Code (unpair p.fst.snd.snd).snd, s₁, s₂))\n      (List.get? p.fst.fst.snd (unpair p.fst.snd.snd).snd)\n[PROOFSTEP]\nunfold Computable₂\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Computable c\nz : α → σ\nhz : Computable z\ns : α → σ\nhs : Computable s\nl : α → σ\nhl : Computable l\nr : α → σ\nhr : Computable r\npr : α → Code × Code × σ × σ → σ\nhpr : Computable₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Computable₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Computable₂ pc\nrf : α → Code × σ → σ\nhrf : Computable₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\n⊢ Computable fun p =>\n    (fun p s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd p.fst.snd.fst then\n              bif bodd (div2 p.fst.snd.fst) then rf p.fst.fst.fst (ofNat Code p.fst.snd.snd, p.snd)\n              else\n                pc p.fst.fst.fst (ofNat Code (unpair p.fst.snd.snd).fst, ofNat Code (unpair p.fst.snd.snd).snd, s₁, s₂)\n            else\n              bif bodd (div2 p.fst.snd.fst) then\n                co p.fst.fst.fst (ofNat Code (unpair p.fst.snd.snd).fst, ofNat Code (unpair p.fst.snd.snd).snd, s₁, s₂)\n              else\n                pr p.fst.fst.fst (ofNat Code (unpair p.fst.snd.snd).fst, ofNat Code (unpair p.fst.snd.snd).snd, s₁, s₂))\n          (List.get? p.fst.fst.snd (unpair p.fst.snd.snd).snd))\n      p.fst p.snd\n[PROOFSTEP]\nrefine'\n  option_map ((list_get?.comp (snd.comp fst) (snd.comp <| Computable.unpair.comp (snd.comp snd))).comp <| fst.comp fst)\n    _\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Computable c\nz : α → σ\nhz : Computable z\ns : α → σ\nhs : Computable s\nl : α → σ\nhl : Computable l\nr : α → σ\nhr : Computable r\npr : α → Code × Code × σ × σ → σ\nhpr : Computable₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Computable₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Computable₂ pc\nrf : α → Code × σ → σ\nhrf : Computable₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\n⊢ Computable₂ fun p s₂ =>\n    bif bodd p.fst.fst.snd.fst then\n      bif bodd (div2 p.fst.fst.snd.fst) then rf p.fst.fst.fst.fst (ofNat Code p.fst.fst.snd.snd, p.fst.snd)\n      else\n        pc p.fst.fst.fst.fst\n          (ofNat Code (unpair p.fst.fst.snd.snd).fst, ofNat Code (unpair p.fst.fst.snd.snd).snd, p.snd, s₂)\n    else\n      bif bodd (div2 p.fst.fst.snd.fst) then\n        co p.fst.fst.fst.fst\n          (ofNat Code (unpair p.fst.fst.snd.snd).fst, ofNat Code (unpair p.fst.fst.snd.snd).snd, p.snd, s₂)\n      else\n        pr p.fst.fst.fst.fst\n          (ofNat Code (unpair p.fst.fst.snd.snd).fst, ofNat Code (unpair p.fst.fst.snd.snd).snd, p.snd, s₂)\n[PROOFSTEP]\nhave a : Computable (fun p : ((((α × List σ) × ℕ × ℕ) × σ) × σ) × σ => p.1.1.1.1.1) :=\n  fst.comp (fst.comp <| fst.comp <| fst.comp fst)\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Computable c\nz : α → σ\nhz : Computable z\ns : α → σ\nhs : Computable s\nl : α → σ\nhl : Computable l\nr : α → σ\nhr : Computable r\npr : α → Code × Code × σ × σ → σ\nhpr : Computable₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Computable₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Computable₂ pc\nrf : α → Code × σ → σ\nhrf : Computable₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\na : Computable fun p => p.fst.fst.fst.fst.fst\n⊢ Computable₂ fun p s₂ =>\n    bif bodd p.fst.fst.snd.fst then\n      bif bodd (div2 p.fst.fst.snd.fst) then rf p.fst.fst.fst.fst (ofNat Code p.fst.fst.snd.snd, p.fst.snd)\n      else\n        pc p.fst.fst.fst.fst\n          (ofNat Code (unpair p.fst.fst.snd.snd).fst, ofNat Code (unpair p.fst.fst.snd.snd).snd, p.snd, s₂)\n    else\n      bif bodd (div2 p.fst.fst.snd.fst) then\n        co p.fst.fst.fst.fst\n          (ofNat Code (unpair p.fst.fst.snd.snd).fst, ofNat Code (unpair p.fst.fst.snd.snd).snd, p.snd, s₂)\n      else\n        pr p.fst.fst.fst.fst\n          (ofNat Code (unpair p.fst.fst.snd.snd).fst, ofNat Code (unpair p.fst.fst.snd.snd).snd, p.snd, s₂)\n[PROOFSTEP]\nhave n : Computable (fun p : ((((α × List σ) × ℕ × ℕ) × σ) × σ) × σ => p.1.1.1.2.1) :=\n  fst.comp (snd.comp <| fst.comp <| fst.comp fst)\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Computable c\nz : α → σ\nhz : Computable z\ns : α → σ\nhs : Computable s\nl : α → σ\nhl : Computable l\nr : α → σ\nhr : Computable r\npr : α → Code × Code × σ × σ → σ\nhpr : Computable₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Computable₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Computable₂ pc\nrf : α → Code × σ → σ\nhrf : Computable₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\na : Computable fun p => p.fst.fst.fst.fst.fst\nn : Computable fun p => p.fst.fst.fst.snd.fst\n⊢ Computable₂ fun p s₂ =>\n    bif bodd p.fst.fst.snd.fst then\n      bif bodd (div2 p.fst.fst.snd.fst) then rf p.fst.fst.fst.fst (ofNat Code p.fst.fst.snd.snd, p.fst.snd)\n      else\n        pc p.fst.fst.fst.fst\n          (ofNat Code (unpair p.fst.fst.snd.snd).fst, ofNat Code (unpair p.fst.fst.snd.snd).snd, p.snd, s₂)\n    else\n      bif bodd (div2 p.fst.fst.snd.fst) then\n        co p.fst.fst.fst.fst\n          (ofNat Code (unpair p.fst.fst.snd.snd).fst, ofNat Code (unpair p.fst.fst.snd.snd).snd, p.snd, s₂)\n      else\n        pr p.fst.fst.fst.fst\n          (ofNat Code (unpair p.fst.fst.snd.snd).fst, ofNat Code (unpair p.fst.fst.snd.snd).snd, p.snd, s₂)\n[PROOFSTEP]\nhave m : Computable (fun p : ((((α × List σ) × ℕ × ℕ) × σ) × σ) × σ => p.1.1.1.2.2) :=\n  snd.comp (snd.comp <| fst.comp <| fst.comp fst)\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Computable c\nz : α → σ\nhz : Computable z\ns : α → σ\nhs : Computable s\nl : α → σ\nhl : Computable l\nr : α → σ\nhr : Computable r\npr : α → Code × Code × σ × σ → σ\nhpr : Computable₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Computable₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Computable₂ pc\nrf : α → Code × σ → σ\nhrf : Computable₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\na : Computable fun p => p.fst.fst.fst.fst.fst\nn : Computable fun p => p.fst.fst.fst.snd.fst\nm : Computable fun p => p.fst.fst.fst.snd.snd\n⊢ Computable₂ fun p s₂ =>\n    bif bodd p.fst.fst.snd.fst then\n      bif bodd (div2 p.fst.fst.snd.fst) then rf p.fst.fst.fst.fst (ofNat Code p.fst.fst.snd.snd, p.fst.snd)\n      else\n        pc p.fst.fst.fst.fst\n          (ofNat Code (unpair p.fst.fst.snd.snd).fst, ofNat Code (unpair p.fst.fst.snd.snd).snd, p.snd, s₂)\n    else\n      bif bodd (div2 p.fst.fst.snd.fst) then\n        co p.fst.fst.fst.fst\n          (ofNat Code (unpair p.fst.fst.snd.snd).fst, ofNat Code (unpair p.fst.fst.snd.snd).snd, p.snd, s₂)\n      else\n        pr p.fst.fst.fst.fst\n          (ofNat Code (unpair p.fst.fst.snd.snd).fst, ofNat Code (unpair p.fst.fst.snd.snd).snd, p.snd, s₂)\n[PROOFSTEP]\nhave m₁ := fst.comp (Computable.unpair.comp m)\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Computable c\nz : α → σ\nhz : Computable z\ns : α → σ\nhs : Computable s\nl : α → σ\nhl : Computable l\nr : α → σ\nhr : Computable r\npr : α → Code × Code × σ × σ → σ\nhpr : Computable₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Computable₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Computable₂ pc\nrf : α → Code × σ → σ\nhrf : Computable₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\na : Computable fun p => p.fst.fst.fst.fst.fst\nn : Computable fun p => p.fst.fst.fst.snd.fst\nm : Computable fun p => p.fst.fst.fst.snd.snd\nm₁ : Computable fun a => (unpair a.fst.fst.fst.snd.snd).fst\n⊢ Computable₂ fun p s₂ =>\n    bif bodd p.fst.fst.snd.fst then\n      bif bodd (div2 p.fst.fst.snd.fst) then rf p.fst.fst.fst.fst (ofNat Code p.fst.fst.snd.snd, p.fst.snd)\n      else\n        pc p.fst.fst.fst.fst\n          (ofNat Code (unpair p.fst.fst.snd.snd).fst, ofNat Code (unpair p.fst.fst.snd.snd).snd, p.snd, s₂)\n    else\n      bif bodd (div2 p.fst.fst.snd.fst) then\n        co p.fst.fst.fst.fst\n          (ofNat Code (unpair p.fst.fst.snd.snd).fst, ofNat Code (unpair p.fst.fst.snd.snd).snd, p.snd, s₂)\n      else\n        pr p.fst.fst.fst.fst\n          (ofNat Code (unpair p.fst.fst.snd.snd).fst, ofNat Code (unpair p.fst.fst.snd.snd).snd, p.snd, s₂)\n[PROOFSTEP]\nhave m₂ := snd.comp (Computable.unpair.comp m)\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Computable c\nz : α → σ\nhz : Computable z\ns : α → σ\nhs : Computable s\nl : α → σ\nhl : Computable l\nr : α → σ\nhr : Computable r\npr : α → Code × Code × σ × σ → σ\nhpr : Computable₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Computable₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Computable₂ pc\nrf : α → Code × σ → σ\nhrf : Computable₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\na : Computable fun p => p.fst.fst.fst.fst.fst\nn : Computable fun p => p.fst.fst.fst.snd.fst\nm : Computable fun p => p.fst.fst.fst.snd.snd\nm₁ : Computable fun a => (unpair a.fst.fst.fst.snd.snd).fst\nm₂ : Computable fun a => (unpair a.fst.fst.fst.snd.snd).snd\n⊢ Computable₂ fun p s₂ =>\n    bif bodd p.fst.fst.snd.fst then\n      bif bodd (div2 p.fst.fst.snd.fst) then rf p.fst.fst.fst.fst (ofNat Code p.fst.fst.snd.snd, p.fst.snd)\n      else\n        pc p.fst.fst.fst.fst\n          (ofNat Code (unpair p.fst.fst.snd.snd).fst, ofNat Code (unpair p.fst.fst.snd.snd).snd, p.snd, s₂)\n    else\n      bif bodd (div2 p.fst.fst.snd.fst) then\n        co p.fst.fst.fst.fst\n          (ofNat Code (unpair p.fst.fst.snd.snd).fst, ofNat Code (unpair p.fst.fst.snd.snd).snd, p.snd, s₂)\n      else\n        pr p.fst.fst.fst.fst\n          (ofNat Code (unpair p.fst.fst.snd.snd).fst, ofNat Code (unpair p.fst.fst.snd.snd).snd, p.snd, s₂)\n[PROOFSTEP]\nhave s : Computable (fun p : ((((α × List σ) × ℕ × ℕ) × σ) × σ) × σ => p.1.1.2) := snd.comp (fst.comp fst)\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Computable c\nz : α → σ\nhz : Computable z\ns✝ : α → σ\nhs : Computable s✝\nl : α → σ\nhl : Computable l\nr : α → σ\nhr : Computable r\npr : α → Code × Code × σ × σ → σ\nhpr : Computable₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Computable₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Computable₂ pc\nrf : α → Code × σ → σ\nhrf : Computable₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s✝ a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\na : Computable fun p => p.fst.fst.fst.fst.fst\nn : Computable fun p => p.fst.fst.fst.snd.fst\nm : Computable fun p => p.fst.fst.fst.snd.snd\nm₁ : Computable fun a => (unpair a.fst.fst.fst.snd.snd).fst\nm₂ : Computable fun a => (unpair a.fst.fst.fst.snd.snd).snd\ns : Computable fun p => p.fst.fst.snd\n⊢ Computable₂ fun p s₂ =>\n    bif bodd p.fst.fst.snd.fst then\n      bif bodd (div2 p.fst.fst.snd.fst) then rf p.fst.fst.fst.fst (ofNat Code p.fst.fst.snd.snd, p.fst.snd)\n      else\n        pc p.fst.fst.fst.fst\n          (ofNat Code (unpair p.fst.fst.snd.snd).fst, ofNat Code (unpair p.fst.fst.snd.snd).snd, p.snd, s₂)\n    else\n      bif bodd (div2 p.fst.fst.snd.fst) then\n        co p.fst.fst.fst.fst\n          (ofNat Code (unpair p.fst.fst.snd.snd).fst, ofNat Code (unpair p.fst.fst.snd.snd).snd, p.snd, s₂)\n      else\n        pr p.fst.fst.fst.fst\n          (ofNat Code (unpair p.fst.fst.snd.snd).fst, ofNat Code (unpair p.fst.fst.snd.snd).snd, p.snd, s₂)\n[PROOFSTEP]\nhave s₁ : Computable (fun p : ((((α × List σ) × ℕ × ℕ) × σ) × σ) × σ => p.1.2) := snd.comp fst\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Computable c\nz : α → σ\nhz : Computable z\ns✝ : α → σ\nhs : Computable s✝\nl : α → σ\nhl : Computable l\nr : α → σ\nhr : Computable r\npr : α → Code × Code × σ × σ → σ\nhpr : Computable₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Computable₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Computable₂ pc\nrf : α → Code × σ → σ\nhrf : Computable₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s✝ a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\na : Computable fun p => p.fst.fst.fst.fst.fst\nn : Computable fun p => p.fst.fst.fst.snd.fst\nm : Computable fun p => p.fst.fst.fst.snd.snd\nm₁ : Computable fun a => (unpair a.fst.fst.fst.snd.snd).fst\nm₂ : Computable fun a => (unpair a.fst.fst.fst.snd.snd).snd\ns : Computable fun p => p.fst.fst.snd\ns₁ : Computable fun p => p.fst.snd\n⊢ Computable₂ fun p s₂ =>\n    bif bodd p.fst.fst.snd.fst then\n      bif bodd (div2 p.fst.fst.snd.fst) then rf p.fst.fst.fst.fst (ofNat Code p.fst.fst.snd.snd, p.fst.snd)\n      else\n        pc p.fst.fst.fst.fst\n          (ofNat Code (unpair p.fst.fst.snd.snd).fst, ofNat Code (unpair p.fst.fst.snd.snd).snd, p.snd, s₂)\n    else\n      bif bodd (div2 p.fst.fst.snd.fst) then\n        co p.fst.fst.fst.fst\n          (ofNat Code (unpair p.fst.fst.snd.snd).fst, ofNat Code (unpair p.fst.fst.snd.snd).snd, p.snd, s₂)\n      else\n        pr p.fst.fst.fst.fst\n          (ofNat Code (unpair p.fst.fst.snd.snd).fst, ofNat Code (unpair p.fst.fst.snd.snd).snd, p.snd, s₂)\n[PROOFSTEP]\nhave s₂ : Computable (fun p : ((((α × List σ) × ℕ × ℕ) × σ) × σ) × σ => p.2) := snd\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Computable c\nz : α → σ\nhz : Computable z\ns✝ : α → σ\nhs : Computable s✝\nl : α → σ\nhl : Computable l\nr : α → σ\nhr : Computable r\npr : α → Code × Code × σ × σ → σ\nhpr : Computable₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Computable₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Computable₂ pc\nrf : α → Code × σ → σ\nhrf : Computable₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s✝ a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\na : Computable fun p => p.fst.fst.fst.fst.fst\nn : Computable fun p => p.fst.fst.fst.snd.fst\nm : Computable fun p => p.fst.fst.fst.snd.snd\nm₁ : Computable fun a => (unpair a.fst.fst.fst.snd.snd).fst\nm₂ : Computable fun a => (unpair a.fst.fst.fst.snd.snd).snd\ns : Computable fun p => p.fst.fst.snd\ns₁ : Computable fun p => p.fst.snd\ns₂ : Computable fun p => p.snd\n⊢ Computable₂ fun p s₂ =>\n    bif bodd p.fst.fst.snd.fst then\n      bif bodd (div2 p.fst.fst.snd.fst) then rf p.fst.fst.fst.fst (ofNat Code p.fst.fst.snd.snd, p.fst.snd)\n      else\n        pc p.fst.fst.fst.fst\n          (ofNat Code (unpair p.fst.fst.snd.snd).fst, ofNat Code (unpair p.fst.fst.snd.snd).snd, p.snd, s₂)\n    else\n      bif bodd (div2 p.fst.fst.snd.fst) then\n        co p.fst.fst.fst.fst\n          (ofNat Code (unpair p.fst.fst.snd.snd).fst, ofNat Code (unpair p.fst.fst.snd.snd).snd, p.snd, s₂)\n      else\n        pr p.fst.fst.fst.fst\n          (ofNat Code (unpair p.fst.fst.snd.snd).fst, ofNat Code (unpair p.fst.fst.snd.snd).snd, p.snd, s₂)\n[PROOFSTEP]\nexact\n  (nat_bodd.comp n).cond\n    ((nat_bodd.comp <| nat_div2.comp n).cond (hrf.comp a (((Computable.ofNat Code).comp m).pair s))\n      (hpc.comp a (((Computable.ofNat Code).comp m₁).pair <| ((Computable.ofNat Code).comp m₂).pair <| s₁.pair s₂)))\n    (Computable.cond (nat_bodd.comp <| nat_div2.comp n)\n      (hco.comp a (((Computable.ofNat Code).comp m₁).pair <| ((Computable.ofNat Code).comp m₂).pair <| s₁.pair s₂))\n      (hpr.comp a (((Computable.ofNat Code).comp m₁).pair <| ((Computable.ofNat Code).comp m₂).pair <| s₁.pair s₂)))\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Computable c\nz : α → σ\nhz : Computable z\ns : α → σ\nhs : Computable s\nl : α → σ\nhl : Computable l\nr : α → σ\nhr : Computable r\npr : α → Code × Code × σ × σ → σ\nhpr : Computable₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Computable₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Computable₂ pc\nrf : α → Code × σ → σ\nhrf : Computable₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\nthis : Computable G₁\n⊢ Computable fun a => F a (c a)\n[PROOFSTEP]\nlet G : α → List σ → Option σ := fun a IH =>\n  IH.length.casesOn (some (z a)) fun n =>\n    n.casesOn (some (s a)) fun n =>\n      n.casesOn (some (l a)) fun n => n.casesOn (some (r a)) fun n => G₁ ((a, IH), n, n.div2.div2)\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Computable c\nz : α → σ\nhz : Computable z\ns : α → σ\nhs : Computable s\nl : α → σ\nhl : Computable l\nr : α → σ\nhr : Computable r\npr : α → Code × Code × σ × σ → σ\nhpr : Computable₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Computable₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Computable₂ pc\nrf : α → Code × σ → σ\nhrf : Computable₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\nthis : Computable G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\n⊢ Computable fun a => F a (c a)\n[PROOFSTEP]\nhave : Computable₂ G :=\n  Computable.nat_casesOn (list_length.comp snd) (option_some_iff.2 (hz.comp fst)) <|\n    Computable.nat_casesOn snd (option_some_iff.2 (hs.comp (fst.comp fst))) <|\n      Computable.nat_casesOn snd (option_some_iff.2 (hl.comp (fst.comp <| fst.comp fst))) <|\n        Computable.nat_casesOn snd (option_some_iff.2 (hr.comp (fst.comp <| fst.comp <| fst.comp fst)))\n          (this.comp <|\n            ((Computable.fst.pair snd).comp <| fst.comp <| fst.comp <| fst.comp <| fst).pair <|\n              snd.pair <| nat_div2.comp <| nat_div2.comp snd)\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Computable c\nz : α → σ\nhz : Computable z\ns : α → σ\nhs : Computable s\nl : α → σ\nhl : Computable l\nr : α → σ\nhr : Computable r\npr : α → Code × Code × σ × σ → σ\nhpr : Computable₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Computable₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Computable₂ pc\nrf : α → Code × σ → σ\nhrf : Computable₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\nthis✝ : Computable G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Computable₂ G\n⊢ Computable fun a => F a (c a)\n[PROOFSTEP]\nrefine'\n  ((nat_strong_rec (fun a n => F a (ofNat Code n)) this.to₂ fun a n => _).comp Computable.id <| encode_iff.2 hc).of_eq\n    fun a => by simp\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Computable c\nz : α → σ\nhz : Computable z\ns : α → σ\nhs : Computable s\nl : α → σ\nhl : Computable l\nr : α → σ\nhr : Computable r\npr : α → Code × Code × σ × σ → σ\nhpr : Computable₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Computable₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Computable₂ pc\nrf : α → Code × σ → σ\nhrf : Computable₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\nthis✝ : Computable G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Computable₂ G\na : α\n⊢ F (id a) (ofNat Code (encode (c a))) = F a (c a)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Computable c\nz : α → σ\nhz : Computable z\ns : α → σ\nhs : Computable s\nl : α → σ\nhl : Computable l\nr : α → σ\nhr : Computable r\npr : α → Code × Code × σ × σ → σ\nhpr : Computable₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Computable₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Computable₂ pc\nrf : α → Code × σ → σ\nhrf : Computable₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\nthis✝ : Computable G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Computable₂ G\na : α\nn : ℕ\n⊢ G (a, List.map ((fun a n => F a (ofNat Code n)) a) (List.range n)).fst\n      (a, List.map ((fun a n => F a (ofNat Code n)) a) (List.range n)).snd =\n    some ((fun a n => F a (ofNat Code n)) a n)\n[PROOFSTEP]\nsimp (config := { zeta := false })\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Computable c\nz : α → σ\nhz : Computable z\ns : α → σ\nhs : Computable s\nl : α → σ\nhl : Computable l\nr : α → σ\nhr : Computable r\npr : α → Code × Code × σ × σ → σ\nhpr : Computable₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Computable₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Computable₂ pc\nrf : α → Code × σ → σ\nhrf : Computable₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\nthis✝ : Computable G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Computable₂ G\na : α\nn : ℕ\n⊢ G a (List.map (fun n => F a (ofNat Code n)) (List.range n)) = some (F a (ofNat Code n))\n[PROOFSTEP]\niterate 4 cases' n with n; · simp (config := { zeta := false }) [ofNatCode_eq, ofNatCode]; rfl\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Computable c\nz : α → σ\nhz : Computable z\ns : α → σ\nhs : Computable s\nl : α → σ\nhl : Computable l\nr : α → σ\nhr : Computable r\npr : α → Code × Code × σ × σ → σ\nhpr : Computable₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Computable₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Computable₂ pc\nrf : α → Code × σ → σ\nhrf : Computable₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\nthis✝ : Computable G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Computable₂ G\na : α\nn : ℕ\n⊢ G a (List.map (fun n => F a (ofNat Code n)) (List.range n)) = some (F a (ofNat Code n))\n[PROOFSTEP]\ncases' n with n\n[GOAL]\ncase zero\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Computable c\nz : α → σ\nhz : Computable z\ns : α → σ\nhs : Computable s\nl : α → σ\nhl : Computable l\nr : α → σ\nhr : Computable r\npr : α → Code × Code × σ × σ → σ\nhpr : Computable₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Computable₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Computable₂ pc\nrf : α → Code × σ → σ\nhrf : Computable₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\nthis✝ : Computable G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Computable₂ G\na : α\n⊢ G a (List.map (fun n => F a (ofNat Code n)) (List.range Nat.zero)) = some (F a (ofNat Code Nat.zero))\n[PROOFSTEP]\nsimp (config := { zeta := false }) [ofNatCode_eq, ofNatCode]\n[GOAL]\ncase zero\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Computable c\nz : α → σ\nhz : Computable z\ns : α → σ\nhs : Computable s\nl : α → σ\nhl : Computable l\nr : α → σ\nhr : Computable r\npr : α → Code × Code × σ × σ → σ\nhpr : Computable₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Computable₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Computable₂ pc\nrf : α → Code × σ → σ\nhrf : Computable₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\nthis✝ : Computable G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Computable₂ G\na : α\n⊢ G a [] = some (F a zero)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Computable c\nz : α → σ\nhz : Computable z\ns : α → σ\nhs : Computable s\nl : α → σ\nhl : Computable l\nr : α → σ\nhr : Computable r\npr : α → Code × Code × σ × σ → σ\nhpr : Computable₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Computable₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Computable₂ pc\nrf : α → Code × σ → σ\nhrf : Computable₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\nthis✝ : Computable G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Computable₂ G\na : α\nn : ℕ\n⊢ G a (List.map (fun n => F a (ofNat Code n)) (List.range (Nat.succ n))) = some (F a (ofNat Code (Nat.succ n)))\n[PROOFSTEP]\ncases' n with n\n[GOAL]\ncase succ.zero\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Computable c\nz : α → σ\nhz : Computable z\ns : α → σ\nhs : Computable s\nl : α → σ\nhl : Computable l\nr : α → σ\nhr : Computable r\npr : α → Code × Code × σ × σ → σ\nhpr : Computable₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Computable₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Computable₂ pc\nrf : α → Code × σ → σ\nhrf : Computable₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\nthis✝ : Computable G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Computable₂ G\na : α\n⊢ G a (List.map (fun n => F a (ofNat Code n)) (List.range (Nat.succ Nat.zero))) =\n    some (F a (ofNat Code (Nat.succ Nat.zero)))\n[PROOFSTEP]\nsimp (config := { zeta := false }) [ofNatCode_eq, ofNatCode]\n[GOAL]\ncase succ.zero\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Computable c\nz : α → σ\nhz : Computable z\ns : α → σ\nhs : Computable s\nl : α → σ\nhl : Computable l\nr : α → σ\nhr : Computable r\npr : α → Code × Code × σ × σ → σ\nhpr : Computable₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Computable₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Computable₂ pc\nrf : α → Code × σ → σ\nhrf : Computable₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\nthis✝ : Computable G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Computable₂ G\na : α\n⊢ G a [F a zero] = some (F a succ)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ.succ\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Computable c\nz : α → σ\nhz : Computable z\ns : α → σ\nhs : Computable s\nl : α → σ\nhl : Computable l\nr : α → σ\nhr : Computable r\npr : α → Code × Code × σ × σ → σ\nhpr : Computable₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Computable₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Computable₂ pc\nrf : α → Code × σ → σ\nhrf : Computable₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\nthis✝ : Computable G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Computable₂ G\na : α\nn : ℕ\n⊢ G a (List.map (fun n => F a (ofNat Code n)) (List.range (Nat.succ (Nat.succ n)))) =\n    some (F a (ofNat Code (Nat.succ (Nat.succ n))))\n[PROOFSTEP]\ncases' n with n\n[GOAL]\ncase succ.succ.zero\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Computable c\nz : α → σ\nhz : Computable z\ns : α → σ\nhs : Computable s\nl : α → σ\nhl : Computable l\nr : α → σ\nhr : Computable r\npr : α → Code × Code × σ × σ → σ\nhpr : Computable₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Computable₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Computable₂ pc\nrf : α → Code × σ → σ\nhrf : Computable₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\nthis✝ : Computable G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Computable₂ G\na : α\n⊢ G a (List.map (fun n => F a (ofNat Code n)) (List.range (Nat.succ (Nat.succ Nat.zero)))) =\n    some (F a (ofNat Code (Nat.succ (Nat.succ Nat.zero))))\n[PROOFSTEP]\nsimp (config := { zeta := false }) [ofNatCode_eq, ofNatCode]\n[GOAL]\ncase succ.succ.zero\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Computable c\nz : α → σ\nhz : Computable z\ns : α → σ\nhs : Computable s\nl : α → σ\nhl : Computable l\nr : α → σ\nhr : Computable r\npr : α → Code × Code × σ × σ → σ\nhpr : Computable₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Computable₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Computable₂ pc\nrf : α → Code × σ → σ\nhrf : Computable₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\nthis✝ : Computable G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Computable₂ G\na : α\n⊢ G a [F a zero, F a succ] = some (F a left)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ.succ.succ\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Computable c\nz : α → σ\nhz : Computable z\ns : α → σ\nhs : Computable s\nl : α → σ\nhl : Computable l\nr : α → σ\nhr : Computable r\npr : α → Code × Code × σ × σ → σ\nhpr : Computable₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Computable₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Computable₂ pc\nrf : α → Code × σ → σ\nhrf : Computable₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\nthis✝ : Computable G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Computable₂ G\na : α\nn : ℕ\n⊢ G a (List.map (fun n => F a (ofNat Code n)) (List.range (Nat.succ (Nat.succ (Nat.succ n))))) =\n    some (F a (ofNat Code (Nat.succ (Nat.succ (Nat.succ n)))))\n[PROOFSTEP]\ncases' n with n\n[GOAL]\ncase succ.succ.succ.zero\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Computable c\nz : α → σ\nhz : Computable z\ns : α → σ\nhs : Computable s\nl : α → σ\nhl : Computable l\nr : α → σ\nhr : Computable r\npr : α → Code × Code × σ × σ → σ\nhpr : Computable₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Computable₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Computable₂ pc\nrf : α → Code × σ → σ\nhrf : Computable₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\nthis✝ : Computable G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Computable₂ G\na : α\n⊢ G a (List.map (fun n => F a (ofNat Code n)) (List.range (Nat.succ (Nat.succ (Nat.succ Nat.zero))))) =\n    some (F a (ofNat Code (Nat.succ (Nat.succ (Nat.succ Nat.zero)))))\n[PROOFSTEP]\nsimp (config := { zeta := false }) [ofNatCode_eq, ofNatCode]\n[GOAL]\ncase succ.succ.succ.zero\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Computable c\nz : α → σ\nhz : Computable z\ns : α → σ\nhs : Computable s\nl : α → σ\nhl : Computable l\nr : α → σ\nhr : Computable r\npr : α → Code × Code × σ × σ → σ\nhpr : Computable₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Computable₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Computable₂ pc\nrf : α → Code × σ → σ\nhrf : Computable₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\nthis✝ : Computable G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Computable₂ G\na : α\n⊢ G a [F a zero, F a succ, F a left] = some (F a right)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ.succ.succ.succ\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Computable c\nz : α → σ\nhz : Computable z\ns : α → σ\nhs : Computable s\nl : α → σ\nhl : Computable l\nr : α → σ\nhr : Computable r\npr : α → Code × Code × σ × σ → σ\nhpr : Computable₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Computable₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Computable₂ pc\nrf : α → Code × σ → σ\nhrf : Computable₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\nthis✝ : Computable G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Computable₂ G\na : α\nn : ℕ\n⊢ G a (List.map (fun n => F a (ofNat Code n)) (List.range (Nat.succ (Nat.succ (Nat.succ (Nat.succ n)))))) =\n    some (F a (ofNat Code (Nat.succ (Nat.succ (Nat.succ (Nat.succ n))))))\n[PROOFSTEP]\nsimp only []\n[GOAL]\ncase succ.succ.succ.succ\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Computable c\nz : α → σ\nhz : Computable z\ns : α → σ\nhs : Computable s\nl : α → σ\nhl : Computable l\nr : α → σ\nhr : Computable r\npr : α → Code × Code × σ × σ → σ\nhpr : Computable₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Computable₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Computable₂ pc\nrf : α → Code × σ → σ\nhrf : Computable₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\nthis✝ : Computable G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Computable₂ G\na : α\nn : ℕ\n⊢ Nat.rec (some (z a))\n      (fun n_1 n_ih =>\n        Nat.rec (some (s a))\n          (fun n_2 n_ih =>\n            Nat.rec (some (l a))\n              (fun n_3 n_ih =>\n                Nat.rec (some (r a))\n                  (fun n_4 n_ih =>\n                    Option.bind\n                      (List.get?\n                        (List.map\n                          (fun n =>\n                            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n                              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n                              (fun cf hf => rf a (cf, hf)) (ofNat Code n))\n                          (List.range (Nat.succ (Nat.succ (Nat.succ (Nat.succ n))))))\n                        (div2 (div2 n_4)))\n                      fun s_1 =>\n                      Option.bind\n                        (List.get?\n                          (List.map\n                            (fun n =>\n                              rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n                                (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n                                (fun cf hf => rf a (cf, hf)) (ofNat Code n))\n                            (List.range (Nat.succ (Nat.succ (Nat.succ (Nat.succ n))))))\n                          (unpair (div2 (div2 n_4))).fst)\n                        fun s₁ =>\n                        Option.map\n                          (fun s₂ =>\n                            bif bodd n_4 then\n                              bif bodd (div2 n_4) then rf a (ofNat Code (div2 (div2 n_4)), s_1)\n                              else\n                                pc a\n                                  (ofNat Code (unpair (div2 (div2 n_4))).fst, ofNat Code (unpair (div2 (div2 n_4))).snd,\n                                    s₁, s₂)\n                            else\n                              bif bodd (div2 n_4) then\n                                co a\n                                  (ofNat Code (unpair (div2 (div2 n_4))).fst, ofNat Code (unpair (div2 (div2 n_4))).snd,\n                                    s₁, s₂)\n                              else\n                                pr a\n                                  (ofNat Code (unpair (div2 (div2 n_4))).fst, ofNat Code (unpair (div2 (div2 n_4))).snd,\n                                    s₁, s₂))\n                          (List.get?\n                            (List.map\n                              (fun n =>\n                                rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n                                  (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n                                  (fun cf hf => rf a (cf, hf)) (ofNat Code n))\n                              (List.range (Nat.succ (Nat.succ (Nat.succ (Nat.succ n))))))\n                            (unpair (div2 (div2 n_4))).snd))\n                  n_3)\n              n_2)\n          n_1)\n      (List.length\n        (List.map\n          (fun n =>\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code n))\n          (List.range (Nat.succ (Nat.succ (Nat.succ (Nat.succ n))))))) =\n    some\n      (rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg)) (fun cf cg hf hg => co a (cf, cg, hf, hg))\n        (fun cf cg hf hg => pc a (cf, cg, hf, hg)) (fun cf hf => rf a (cf, hf))\n        (ofNat Code (Nat.succ (Nat.succ (Nat.succ (Nat.succ n))))))\n[PROOFSTEP]\nrw [List.length_map, List.length_range]\n[GOAL]\ncase succ.succ.succ.succ\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Computable c\nz : α → σ\nhz : Computable z\ns : α → σ\nhs : Computable s\nl : α → σ\nhl : Computable l\nr : α → σ\nhr : Computable r\npr : α → Code × Code × σ × σ → σ\nhpr : Computable₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Computable₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Computable₂ pc\nrf : α → Code × σ → σ\nhrf : Computable₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\nthis✝ : Computable G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Computable₂ G\na : α\nn : ℕ\n⊢ Nat.rec (some (z a))\n      (fun n_1 n_ih =>\n        Nat.rec (some (s a))\n          (fun n_2 n_ih =>\n            Nat.rec (some (l a))\n              (fun n_3 n_ih =>\n                Nat.rec (some (r a))\n                  (fun n_4 n_ih =>\n                    Option.bind\n                      (List.get?\n                        (List.map\n                          (fun n =>\n                            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n                              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n                              (fun cf hf => rf a (cf, hf)) (ofNat Code n))\n                          (List.range (Nat.succ (Nat.succ (Nat.succ (Nat.succ n))))))\n                        (div2 (div2 n_4)))\n                      fun s_1 =>\n                      Option.bind\n                        (List.get?\n                          (List.map\n                            (fun n =>\n                              rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n                                (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n                                (fun cf hf => rf a (cf, hf)) (ofNat Code n))\n                            (List.range (Nat.succ (Nat.succ (Nat.succ (Nat.succ n))))))\n                          (unpair (div2 (div2 n_4))).fst)\n                        fun s₁ =>\n                        Option.map\n                          (fun s₂ =>\n                            bif bodd n_4 then\n                              bif bodd (div2 n_4) then rf a (ofNat Code (div2 (div2 n_4)), s_1)\n                              else\n                                pc a\n                                  (ofNat Code (unpair (div2 (div2 n_4))).fst, ofNat Code (unpair (div2 (div2 n_4))).snd,\n                                    s₁, s₂)\n                            else\n                              bif bodd (div2 n_4) then\n                                co a\n                                  (ofNat Code (unpair (div2 (div2 n_4))).fst, ofNat Code (unpair (div2 (div2 n_4))).snd,\n                                    s₁, s₂)\n                              else\n                                pr a\n                                  (ofNat Code (unpair (div2 (div2 n_4))).fst, ofNat Code (unpair (div2 (div2 n_4))).snd,\n                                    s₁, s₂))\n                          (List.get?\n                            (List.map\n                              (fun n =>\n                                rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n                                  (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n                                  (fun cf hf => rf a (cf, hf)) (ofNat Code n))\n                              (List.range (Nat.succ (Nat.succ (Nat.succ (Nat.succ n))))))\n                            (unpair (div2 (div2 n_4))).snd))\n                  n_3)\n              n_2)\n          n_1)\n      (Nat.succ (Nat.succ (Nat.succ (Nat.succ n)))) =\n    some\n      (rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg)) (fun cf cg hf hg => co a (cf, cg, hf, hg))\n        (fun cf cg hf hg => pc a (cf, cg, hf, hg)) (fun cf hf => rf a (cf, hf))\n        (ofNat Code (Nat.succ (Nat.succ (Nat.succ (Nat.succ n))))))\n[PROOFSTEP]\nlet m := n.div2.div2\n[GOAL]\ncase succ.succ.succ.succ\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Computable c\nz : α → σ\nhz : Computable z\ns : α → σ\nhs : Computable s\nl : α → σ\nhl : Computable l\nr : α → σ\nhr : Computable r\npr : α → Code × Code × σ × σ → σ\nhpr : Computable₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Computable₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Computable₂ pc\nrf : α → Code × σ → σ\nhrf : Computable₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\nthis✝ : Computable G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Computable₂ G\na : α\nn : ℕ\nm : ℕ := div2 (div2 n)\n⊢ Nat.rec (some (z a))\n      (fun n_1 n_ih =>\n        Nat.rec (some (s a))\n          (fun n_2 n_ih =>\n            Nat.rec (some (l a))\n              (fun n_3 n_ih =>\n                Nat.rec (some (r a))\n                  (fun n_4 n_ih =>\n                    Option.bind\n                      (List.get?\n                        (List.map\n                          (fun n =>\n                            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n                              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n                              (fun cf hf => rf a (cf, hf)) (ofNat Code n))\n                          (List.range (Nat.succ (Nat.succ (Nat.succ (Nat.succ n))))))\n                        (div2 (div2 n_4)))\n                      fun s_1 =>\n                      Option.bind\n                        (List.get?\n                          (List.map\n                            (fun n =>\n                              rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n                                (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n                                (fun cf hf => rf a (cf, hf)) (ofNat Code n))\n                            (List.range (Nat.succ (Nat.succ (Nat.succ (Nat.succ n))))))\n                          (unpair (div2 (div2 n_4))).fst)\n                        fun s₁ =>\n                        Option.map\n                          (fun s₂ =>\n                            bif bodd n_4 then\n                              bif bodd (div2 n_4) then rf a (ofNat Code (div2 (div2 n_4)), s_1)\n                              else\n                                pc a\n                                  (ofNat Code (unpair (div2 (div2 n_4))).fst, ofNat Code (unpair (div2 (div2 n_4))).snd,\n                                    s₁, s₂)\n                            else\n                              bif bodd (div2 n_4) then\n                                co a\n                                  (ofNat Code (unpair (div2 (div2 n_4))).fst, ofNat Code (unpair (div2 (div2 n_4))).snd,\n                                    s₁, s₂)\n                              else\n                                pr a\n                                  (ofNat Code (unpair (div2 (div2 n_4))).fst, ofNat Code (unpair (div2 (div2 n_4))).snd,\n                                    s₁, s₂))\n                          (List.get?\n                            (List.map\n                              (fun n =>\n                                rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n                                  (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n                                  (fun cf hf => rf a (cf, hf)) (ofNat Code n))\n                              (List.range (Nat.succ (Nat.succ (Nat.succ (Nat.succ n))))))\n                            (unpair (div2 (div2 n_4))).snd))\n                  n_3)\n              n_2)\n          n_1)\n      (Nat.succ (Nat.succ (Nat.succ (Nat.succ n)))) =\n    some\n      (rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg)) (fun cf cg hf hg => co a (cf, cg, hf, hg))\n        (fun cf cg hf hg => pc a (cf, cg, hf, hg)) (fun cf hf => rf a (cf, hf))\n        (ofNat Code (Nat.succ (Nat.succ (Nat.succ (Nat.succ n))))))\n[PROOFSTEP]\nshow G₁ ((a, (List.range (n + 4)).map fun n => F a (ofNat Code n)), n, m) = some (F a (ofNat Code (n + 4)))\n[GOAL]\ncase succ.succ.succ.succ\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Computable c\nz : α → σ\nhz : Computable z\ns : α → σ\nhs : Computable s\nl : α → σ\nhl : Computable l\nr : α → σ\nhr : Computable r\npr : α → Code × Code × σ × σ → σ\nhpr : Computable₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Computable₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Computable₂ pc\nrf : α → Code × σ → σ\nhrf : Computable₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\nthis✝ : Computable G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Computable₂ G\na : α\nn : ℕ\nm : ℕ := div2 (div2 n)\n⊢ G₁ ((a, List.map (fun n => F a (ofNat Code n)) (List.range (n + 4))), n, m) = some (F a (ofNat Code (n + 4)))\n[PROOFSTEP]\nhave hm : m < n + 4 := by\n  simp [Nat.div2_val]\n  exact lt_of_le_of_lt (le_trans (Nat.div_le_self _ _) (Nat.div_le_self _ _)) (Nat.succ_le_succ (Nat.le_add_right _ _))\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Computable c\nz : α → σ\nhz : Computable z\ns : α → σ\nhs : Computable s\nl : α → σ\nhl : Computable l\nr : α → σ\nhr : Computable r\npr : α → Code × Code × σ × σ → σ\nhpr : Computable₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Computable₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Computable₂ pc\nrf : α → Code × σ → σ\nhrf : Computable₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\nthis✝ : Computable G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Computable₂ G\na : α\nn : ℕ\nm : ℕ := div2 (div2 n)\n⊢ m < n + 4\n[PROOFSTEP]\nsimp [Nat.div2_val]\n[GOAL]\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Computable c\nz : α → σ\nhz : Computable z\ns : α → σ\nhs : Computable s\nl : α → σ\nhl : Computable l\nr : α → σ\nhr : Computable r\npr : α → Code × Code × σ × σ → σ\nhpr : Computable₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Computable₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Computable₂ pc\nrf : α → Code × σ → σ\nhrf : Computable₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\nthis✝ : Computable G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Computable₂ G\na : α\nn : ℕ\nm : ℕ := div2 (div2 n)\n⊢ n / 2 / 2 < n + 4\n[PROOFSTEP]\nexact lt_of_le_of_lt (le_trans (Nat.div_le_self _ _) (Nat.div_le_self _ _)) (Nat.succ_le_succ (Nat.le_add_right _ _))\n[GOAL]\ncase succ.succ.succ.succ\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Computable c\nz : α → σ\nhz : Computable z\ns : α → σ\nhs : Computable s\nl : α → σ\nhl : Computable l\nr : α → σ\nhr : Computable r\npr : α → Code × Code × σ × σ → σ\nhpr : Computable₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Computable₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Computable₂ pc\nrf : α → Code × σ → σ\nhrf : Computable₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\nthis✝ : Computable G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Computable₂ G\na : α\nn : ℕ\nm : ℕ := div2 (div2 n)\nhm : m < n + 4\n⊢ G₁ ((a, List.map (fun n => F a (ofNat Code n)) (List.range (n + 4))), n, m) = some (F a (ofNat Code (n + 4)))\n[PROOFSTEP]\nhave m1 : m.unpair.1 < n + 4 := lt_of_le_of_lt m.unpair_left_le hm\n[GOAL]\ncase succ.succ.succ.succ\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Computable c\nz : α → σ\nhz : Computable z\ns : α → σ\nhs : Computable s\nl : α → σ\nhl : Computable l\nr : α → σ\nhr : Computable r\npr : α → Code × Code × σ × σ → σ\nhpr : Computable₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Computable₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Computable₂ pc\nrf : α → Code × σ → σ\nhrf : Computable₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\nthis✝ : Computable G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Computable₂ G\na : α\nn : ℕ\nm : ℕ := div2 (div2 n)\nhm : m < n + 4\nm1 : (unpair m).fst < n + 4\n⊢ G₁ ((a, List.map (fun n => F a (ofNat Code n)) (List.range (n + 4))), n, m) = some (F a (ofNat Code (n + 4)))\n[PROOFSTEP]\nhave m2 : m.unpair.2 < n + 4 := lt_of_le_of_lt m.unpair_right_le hm\n[GOAL]\ncase succ.succ.succ.succ\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Computable c\nz : α → σ\nhz : Computable z\ns : α → σ\nhs : Computable s\nl : α → σ\nhl : Computable l\nr : α → σ\nhr : Computable r\npr : α → Code × Code × σ × σ → σ\nhpr : Computable₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Computable₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Computable₂ pc\nrf : α → Code × σ → σ\nhrf : Computable₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\nthis✝ : Computable G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Computable₂ G\na : α\nn : ℕ\nm : ℕ := div2 (div2 n)\nhm : m < n + 4\nm1 : (unpair m).fst < n + 4\nm2 : (unpair m).snd < n + 4\n⊢ G₁ ((a, List.map (fun n => F a (ofNat Code n)) (List.range (n + 4))), n, m) = some (F a (ofNat Code (n + 4)))\n[PROOFSTEP]\nsimp [List.get?_map, List.get?_range, hm, m1, m2]\n[GOAL]\ncase succ.succ.succ.succ\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Computable c\nz : α → σ\nhz : Computable z\ns : α → σ\nhs : Computable s\nl : α → σ\nhl : Computable l\nr : α → σ\nhr : Computable r\npr : α → Code × Code × σ × σ → σ\nhpr : Computable₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Computable₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Computable₂ pc\nrf : α → Code × σ → σ\nhrf : Computable₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\nthis✝ : Computable G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Computable₂ G\na : α\nn : ℕ\nm : ℕ := div2 (div2 n)\nhm : m < n + 4\nm1 : (unpair m).fst < n + 4\nm2 : (unpair m).snd < n + 4\n⊢ (bif bodd n then\n      bif bodd (div2 n) then\n        rf a\n          (ofNat Code (div2 (div2 n)),\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (div2 (div2 n))))\n      else\n        pc a\n          (ofNat Code (unpair (div2 (div2 n))).fst, ofNat Code (unpair (div2 (div2 n))).snd,\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).fst),\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).snd))\n    else\n      bif bodd (div2 n) then\n        co a\n          (ofNat Code (unpair (div2 (div2 n))).fst, ofNat Code (unpair (div2 (div2 n))).snd,\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).fst),\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).snd))\n      else\n        pr a\n          (ofNat Code (unpair (div2 (div2 n))).fst, ofNat Code (unpair (div2 (div2 n))).snd,\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).fst),\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).snd))) =\n    rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg)) (fun cf cg hf hg => co a (cf, cg, hf, hg))\n      (fun cf cg hf hg => pc a (cf, cg, hf, hg)) (fun cf hf => rf a (cf, hf)) (ofNat Code (n + 4))\n[PROOFSTEP]\nrw [show ofNat Code (n + 4) = ofNatCode (n + 4) from rfl]\n[GOAL]\ncase succ.succ.succ.succ\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Computable c\nz : α → σ\nhz : Computable z\ns : α → σ\nhs : Computable s\nl : α → σ\nhl : Computable l\nr : α → σ\nhr : Computable r\npr : α → Code × Code × σ × σ → σ\nhpr : Computable₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Computable₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Computable₂ pc\nrf : α → Code × σ → σ\nhrf : Computable₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\nthis✝ : Computable G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Computable₂ G\na : α\nn : ℕ\nm : ℕ := div2 (div2 n)\nhm : m < n + 4\nm1 : (unpair m).fst < n + 4\nm2 : (unpair m).snd < n + 4\n⊢ (bif bodd n then\n      bif bodd (div2 n) then\n        rf a\n          (ofNat Code (div2 (div2 n)),\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (div2 (div2 n))))\n      else\n        pc a\n          (ofNat Code (unpair (div2 (div2 n))).fst, ofNat Code (unpair (div2 (div2 n))).snd,\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).fst),\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).snd))\n    else\n      bif bodd (div2 n) then\n        co a\n          (ofNat Code (unpair (div2 (div2 n))).fst, ofNat Code (unpair (div2 (div2 n))).snd,\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).fst),\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).snd))\n      else\n        pr a\n          (ofNat Code (unpair (div2 (div2 n))).fst, ofNat Code (unpair (div2 (div2 n))).snd,\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).fst),\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).snd))) =\n    rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg)) (fun cf cg hf hg => co a (cf, cg, hf, hg))\n      (fun cf cg hf hg => pc a (cf, cg, hf, hg)) (fun cf hf => rf a (cf, hf)) (ofNatCode (n + 4))\n[PROOFSTEP]\nsimp [ofNatCode]\n[GOAL]\ncase succ.succ.succ.succ\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Computable c\nz : α → σ\nhz : Computable z\ns : α → σ\nhs : Computable s\nl : α → σ\nhl : Computable l\nr : α → σ\nhr : Computable r\npr : α → Code × Code × σ × σ → σ\nhpr : Computable₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Computable₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Computable₂ pc\nrf : α → Code × σ → σ\nhrf : Computable₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\nthis✝ : Computable G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Computable₂ G\na : α\nn : ℕ\nm : ℕ := div2 (div2 n)\nhm : m < n + 4\nm1 : (unpair m).fst < n + 4\nm2 : (unpair m).snd < n + 4\n⊢ (bif bodd n then\n      bif bodd (div2 n) then\n        rf a\n          (ofNat Code (div2 (div2 n)),\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (div2 (div2 n))))\n      else\n        pc a\n          (ofNat Code (unpair (div2 (div2 n))).fst, ofNat Code (unpair (div2 (div2 n))).snd,\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).fst),\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).snd))\n    else\n      bif bodd (div2 n) then\n        co a\n          (ofNat Code (unpair (div2 (div2 n))).fst, ofNat Code (unpair (div2 (div2 n))).snd,\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).fst),\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).snd))\n      else\n        pr a\n          (ofNat Code (unpair (div2 (div2 n))).fst, ofNat Code (unpair (div2 (div2 n))).snd,\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).fst),\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).snd))) =\n    rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg)) (fun cf cg hf hg => co a (cf, cg, hf, hg))\n      (fun cf cg hf hg => pc a (cf, cg, hf, hg)) (fun cf hf => rf a (cf, hf))\n      (match bodd n, bodd (div2 n) with\n      | false, false => pair (ofNatCode (unpair (div2 (div2 n))).fst) (ofNatCode (unpair (div2 (div2 n))).snd)\n      | false, true => comp (ofNatCode (unpair (div2 (div2 n))).fst) (ofNatCode (unpair (div2 (div2 n))).snd)\n      | true, false => prec (ofNatCode (unpair (div2 (div2 n))).fst) (ofNatCode (unpair (div2 (div2 n))).snd)\n      | true, true => rfind' (ofNatCode (div2 (div2 n))))\n[PROOFSTEP]\ncases n.bodd\n[GOAL]\ncase succ.succ.succ.succ.false\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Computable c\nz : α → σ\nhz : Computable z\ns : α → σ\nhs : Computable s\nl : α → σ\nhl : Computable l\nr : α → σ\nhr : Computable r\npr : α → Code × Code × σ × σ → σ\nhpr : Computable₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Computable₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Computable₂ pc\nrf : α → Code × σ → σ\nhrf : Computable₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\nthis✝ : Computable G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Computable₂ G\na : α\nn : ℕ\nm : ℕ := div2 (div2 n)\nhm : m < n + 4\nm1 : (unpair m).fst < n + 4\nm2 : (unpair m).snd < n + 4\n⊢ (bif false then\n      bif bodd (div2 n) then\n        rf a\n          (ofNat Code (div2 (div2 n)),\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (div2 (div2 n))))\n      else\n        pc a\n          (ofNat Code (unpair (div2 (div2 n))).fst, ofNat Code (unpair (div2 (div2 n))).snd,\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).fst),\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).snd))\n    else\n      bif bodd (div2 n) then\n        co a\n          (ofNat Code (unpair (div2 (div2 n))).fst, ofNat Code (unpair (div2 (div2 n))).snd,\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).fst),\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).snd))\n      else\n        pr a\n          (ofNat Code (unpair (div2 (div2 n))).fst, ofNat Code (unpair (div2 (div2 n))).snd,\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).fst),\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).snd))) =\n    rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg)) (fun cf cg hf hg => co a (cf, cg, hf, hg))\n      (fun cf cg hf hg => pc a (cf, cg, hf, hg)) (fun cf hf => rf a (cf, hf))\n      (match false, bodd (div2 n) with\n      | false, false => pair (ofNatCode (unpair (div2 (div2 n))).fst) (ofNatCode (unpair (div2 (div2 n))).snd)\n      | false, true => comp (ofNatCode (unpair (div2 (div2 n))).fst) (ofNatCode (unpair (div2 (div2 n))).snd)\n      | true, false => prec (ofNatCode (unpair (div2 (div2 n))).fst) (ofNatCode (unpair (div2 (div2 n))).snd)\n      | true, true => rfind' (ofNatCode (div2 (div2 n))))\n[PROOFSTEP]\ncases n.div2.bodd\n[GOAL]\ncase succ.succ.succ.succ.true\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Computable c\nz : α → σ\nhz : Computable z\ns : α → σ\nhs : Computable s\nl : α → σ\nhl : Computable l\nr : α → σ\nhr : Computable r\npr : α → Code × Code × σ × σ → σ\nhpr : Computable₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Computable₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Computable₂ pc\nrf : α → Code × σ → σ\nhrf : Computable₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\nthis✝ : Computable G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Computable₂ G\na : α\nn : ℕ\nm : ℕ := div2 (div2 n)\nhm : m < n + 4\nm1 : (unpair m).fst < n + 4\nm2 : (unpair m).snd < n + 4\n⊢ (bif true then\n      bif bodd (div2 n) then\n        rf a\n          (ofNat Code (div2 (div2 n)),\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (div2 (div2 n))))\n      else\n        pc a\n          (ofNat Code (unpair (div2 (div2 n))).fst, ofNat Code (unpair (div2 (div2 n))).snd,\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).fst),\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).snd))\n    else\n      bif bodd (div2 n) then\n        co a\n          (ofNat Code (unpair (div2 (div2 n))).fst, ofNat Code (unpair (div2 (div2 n))).snd,\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).fst),\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).snd))\n      else\n        pr a\n          (ofNat Code (unpair (div2 (div2 n))).fst, ofNat Code (unpair (div2 (div2 n))).snd,\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).fst),\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).snd))) =\n    rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg)) (fun cf cg hf hg => co a (cf, cg, hf, hg))\n      (fun cf cg hf hg => pc a (cf, cg, hf, hg)) (fun cf hf => rf a (cf, hf))\n      (match true, bodd (div2 n) with\n      | false, false => pair (ofNatCode (unpair (div2 (div2 n))).fst) (ofNatCode (unpair (div2 (div2 n))).snd)\n      | false, true => comp (ofNatCode (unpair (div2 (div2 n))).fst) (ofNatCode (unpair (div2 (div2 n))).snd)\n      | true, false => prec (ofNatCode (unpair (div2 (div2 n))).fst) (ofNatCode (unpair (div2 (div2 n))).snd)\n      | true, true => rfind' (ofNatCode (div2 (div2 n))))\n[PROOFSTEP]\ncases n.div2.bodd\n[GOAL]\ncase succ.succ.succ.succ.false.false\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Computable c\nz : α → σ\nhz : Computable z\ns : α → σ\nhs : Computable s\nl : α → σ\nhl : Computable l\nr : α → σ\nhr : Computable r\npr : α → Code × Code × σ × σ → σ\nhpr : Computable₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Computable₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Computable₂ pc\nrf : α → Code × σ → σ\nhrf : Computable₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\nthis✝ : Computable G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Computable₂ G\na : α\nn : ℕ\nm : ℕ := div2 (div2 n)\nhm : m < n + 4\nm1 : (unpair m).fst < n + 4\nm2 : (unpair m).snd < n + 4\n⊢ (bif false then\n      bif false then\n        rf a\n          (ofNat Code (div2 (div2 n)),\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (div2 (div2 n))))\n      else\n        pc a\n          (ofNat Code (unpair (div2 (div2 n))).fst, ofNat Code (unpair (div2 (div2 n))).snd,\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).fst),\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).snd))\n    else\n      bif false then\n        co a\n          (ofNat Code (unpair (div2 (div2 n))).fst, ofNat Code (unpair (div2 (div2 n))).snd,\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).fst),\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).snd))\n      else\n        pr a\n          (ofNat Code (unpair (div2 (div2 n))).fst, ofNat Code (unpair (div2 (div2 n))).snd,\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).fst),\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).snd))) =\n    rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg)) (fun cf cg hf hg => co a (cf, cg, hf, hg))\n      (fun cf cg hf hg => pc a (cf, cg, hf, hg)) (fun cf hf => rf a (cf, hf))\n      (match false, false with\n      | false, false => pair (ofNatCode (unpair (div2 (div2 n))).fst) (ofNatCode (unpair (div2 (div2 n))).snd)\n      | false, true => comp (ofNatCode (unpair (div2 (div2 n))).fst) (ofNatCode (unpair (div2 (div2 n))).snd)\n      | true, false => prec (ofNatCode (unpair (div2 (div2 n))).fst) (ofNatCode (unpair (div2 (div2 n))).snd)\n      | true, true => rfind' (ofNatCode (div2 (div2 n))))\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ.succ.succ.succ.false.true\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Computable c\nz : α → σ\nhz : Computable z\ns : α → σ\nhs : Computable s\nl : α → σ\nhl : Computable l\nr : α → σ\nhr : Computable r\npr : α → Code × Code × σ × σ → σ\nhpr : Computable₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Computable₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Computable₂ pc\nrf : α → Code × σ → σ\nhrf : Computable₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\nthis✝ : Computable G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Computable₂ G\na : α\nn : ℕ\nm : ℕ := div2 (div2 n)\nhm : m < n + 4\nm1 : (unpair m).fst < n + 4\nm2 : (unpair m).snd < n + 4\n⊢ (bif false then\n      bif true then\n        rf a\n          (ofNat Code (div2 (div2 n)),\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (div2 (div2 n))))\n      else\n        pc a\n          (ofNat Code (unpair (div2 (div2 n))).fst, ofNat Code (unpair (div2 (div2 n))).snd,\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).fst),\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).snd))\n    else\n      bif true then\n        co a\n          (ofNat Code (unpair (div2 (div2 n))).fst, ofNat Code (unpair (div2 (div2 n))).snd,\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).fst),\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).snd))\n      else\n        pr a\n          (ofNat Code (unpair (div2 (div2 n))).fst, ofNat Code (unpair (div2 (div2 n))).snd,\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).fst),\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).snd))) =\n    rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg)) (fun cf cg hf hg => co a (cf, cg, hf, hg))\n      (fun cf cg hf hg => pc a (cf, cg, hf, hg)) (fun cf hf => rf a (cf, hf))\n      (match false, true with\n      | false, false => pair (ofNatCode (unpair (div2 (div2 n))).fst) (ofNatCode (unpair (div2 (div2 n))).snd)\n      | false, true => comp (ofNatCode (unpair (div2 (div2 n))).fst) (ofNatCode (unpair (div2 (div2 n))).snd)\n      | true, false => prec (ofNatCode (unpair (div2 (div2 n))).fst) (ofNatCode (unpair (div2 (div2 n))).snd)\n      | true, true => rfind' (ofNatCode (div2 (div2 n))))\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ.succ.succ.succ.true.false\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Computable c\nz : α → σ\nhz : Computable z\ns : α → σ\nhs : Computable s\nl : α → σ\nhl : Computable l\nr : α → σ\nhr : Computable r\npr : α → Code × Code × σ × σ → σ\nhpr : Computable₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Computable₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Computable₂ pc\nrf : α → Code × σ → σ\nhrf : Computable₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\nthis✝ : Computable G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Computable₂ G\na : α\nn : ℕ\nm : ℕ := div2 (div2 n)\nhm : m < n + 4\nm1 : (unpair m).fst < n + 4\nm2 : (unpair m).snd < n + 4\n⊢ (bif true then\n      bif false then\n        rf a\n          (ofNat Code (div2 (div2 n)),\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (div2 (div2 n))))\n      else\n        pc a\n          (ofNat Code (unpair (div2 (div2 n))).fst, ofNat Code (unpair (div2 (div2 n))).snd,\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).fst),\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).snd))\n    else\n      bif false then\n        co a\n          (ofNat Code (unpair (div2 (div2 n))).fst, ofNat Code (unpair (div2 (div2 n))).snd,\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).fst),\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).snd))\n      else\n        pr a\n          (ofNat Code (unpair (div2 (div2 n))).fst, ofNat Code (unpair (div2 (div2 n))).snd,\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).fst),\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).snd))) =\n    rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg)) (fun cf cg hf hg => co a (cf, cg, hf, hg))\n      (fun cf cg hf hg => pc a (cf, cg, hf, hg)) (fun cf hf => rf a (cf, hf))\n      (match true, false with\n      | false, false => pair (ofNatCode (unpair (div2 (div2 n))).fst) (ofNatCode (unpair (div2 (div2 n))).snd)\n      | false, true => comp (ofNatCode (unpair (div2 (div2 n))).fst) (ofNatCode (unpair (div2 (div2 n))).snd)\n      | true, false => prec (ofNatCode (unpair (div2 (div2 n))).fst) (ofNatCode (unpair (div2 (div2 n))).snd)\n      | true, true => rfind' (ofNatCode (div2 (div2 n))))\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ.succ.succ.succ.true.true\nα : Type u_1\nσ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable σ\nc : α → Code\nhc : Computable c\nz : α → σ\nhz : Computable z\ns : α → σ\nhs : Computable s\nl : α → σ\nhl : Computable l\nr : α → σ\nhr : Computable r\npr : α → Code × Code × σ × σ → σ\nhpr : Computable₂ pr\nco : α → Code × Code × σ × σ → σ\nhco : Computable₂ co\npc : α → Code × Code × σ × σ → σ\nhpc : Computable₂ pc\nrf : α → Code × σ → σ\nhrf : Computable₂ rf\nPR✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pr a (cf, cg, hf, hg)\nCO✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => co a (cf, cg, hf, hg)\nPC✝ : α → Code → Code → σ → σ → σ := fun a cf cg hf hg => pc a (cf, cg, hf, hg)\nRF✝ : α → Code → σ → σ := fun a cf hf => rf a (cf, hf)\nF : α → Code → σ := fun a c => Code.recOn c (z a) (s a) (l a) (r a) (PR✝ a) (CO✝ a) (PC✝ a) (RF✝ a)\nG₁ : (α × List σ) × ℕ × ℕ → Option σ :=\n  fun p =>\n    let a := p.fst.fst;\n    let IH := p.fst.snd;\n    let n := p.snd.fst;\n    let m := p.snd.snd;\n    Option.bind (List.get? IH m) fun s =>\n      Option.bind (List.get? IH (unpair m).fst) fun s₁ =>\n        Option.map\n          (fun s₂ =>\n            bif bodd n then\n              bif bodd (div2 n) then rf a (ofNat Code m, s)\n              else pc a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n            else\n              bif bodd (div2 n) then co a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂)\n              else pr a (ofNat Code (unpair m).fst, ofNat Code (unpair m).snd, s₁, s₂))\n          (List.get? IH (unpair m).snd)\nthis✝ : Computable G₁\nG : α → List σ → Option σ :=\n  fun a IH =>\n    Nat.casesOn (List.length IH) (some (z a)) fun n =>\n      Nat.casesOn n (some (s a)) fun n =>\n        Nat.casesOn n (some (l a)) fun n => Nat.casesOn n (some (r a)) fun n => G₁ ((a, IH), n, div2 (div2 n))\nthis : Computable₂ G\na : α\nn : ℕ\nm : ℕ := div2 (div2 n)\nhm : m < n + 4\nm1 : (unpair m).fst < n + 4\nm2 : (unpair m).snd < n + 4\n⊢ (bif true then\n      bif true then\n        rf a\n          (ofNat Code (div2 (div2 n)),\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (div2 (div2 n))))\n      else\n        pc a\n          (ofNat Code (unpair (div2 (div2 n))).fst, ofNat Code (unpair (div2 (div2 n))).snd,\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).fst),\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).snd))\n    else\n      bif true then\n        co a\n          (ofNat Code (unpair (div2 (div2 n))).fst, ofNat Code (unpair (div2 (div2 n))).snd,\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).fst),\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).snd))\n      else\n        pr a\n          (ofNat Code (unpair (div2 (div2 n))).fst, ofNat Code (unpair (div2 (div2 n))).snd,\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).fst),\n            rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg))\n              (fun cf cg hf hg => co a (cf, cg, hf, hg)) (fun cf cg hf hg => pc a (cf, cg, hf, hg))\n              (fun cf hf => rf a (cf, hf)) (ofNat Code (unpair (div2 (div2 n))).snd))) =\n    rec (z a) (s a) (l a) (r a) (fun cf cg hf hg => pr a (cf, cg, hf, hg)) (fun cf cg hf hg => co a (cf, cg, hf, hg))\n      (fun cf cg hf hg => pc a (cf, cg, hf, hg)) (fun cf hf => rf a (cf, hf))\n      (match true, true with\n      | false, false => pair (ofNatCode (unpair (div2 (div2 n))).fst) (ofNatCode (unpair (div2 (div2 n))).snd)\n      | false, true => comp (ofNatCode (unpair (div2 (div2 n))).fst) (ofNatCode (unpair (div2 (div2 n))).snd)\n      | true, false => prec (ofNatCode (unpair (div2 (div2 n))).fst) (ofNatCode (unpair (div2 (div2 n))).snd)\n      | true, true => rfind' (ofNatCode (div2 (div2 n))))\n[PROOFSTEP]\nrfl\n[GOAL]\ncf cg : Code\na : ℕ\n⊢ eval (prec cf cg) (Nat.pair a 0) = eval cf a\n[PROOFSTEP]\nrw [eval, Nat.unpaired, Nat.unpair_pair]\n[GOAL]\ncf cg : Code\na : ℕ\n⊢ Nat.rec (eval cf (a, 0).fst)\n      (fun y IH => do\n        let i ← IH\n        eval cg (Nat.pair (a, 0).fst (Nat.pair y i)))\n      (a, 0).snd =\n    eval cf a\n[PROOFSTEP]\nsimp (config := { Lean.Meta.Simp.neutralConfig with proj := true }) only []\n[GOAL]\ncf cg : Code\na : ℕ\n⊢ Nat.rec (eval cf a)\n      (fun y IH => do\n        let i ← IH\n        eval cg (Nat.pair a (Nat.pair y i)))\n      0 =\n    eval cf a\n[PROOFSTEP]\nrw [Nat.rec_zero]\n[GOAL]\ncf cg : Code\na k : ℕ\n⊢ eval (prec cf cg) (Nat.pair a (Nat.succ k)) = do\n    let ih ← eval (prec cf cg) (Nat.pair a k)\n    eval cg (Nat.pair a (Nat.pair k ih))\n[PROOFSTEP]\nrw [eval, Nat.unpaired, Part.bind_eq_bind, Nat.unpair_pair]\n[GOAL]\ncf cg : Code\na k : ℕ\n⊢ Nat.rec (eval cf (a, Nat.succ k).fst)\n      (fun y IH => do\n        let i ← IH\n        eval cg (Nat.pair (a, Nat.succ k).fst (Nat.pair y i)))\n      (a, Nat.succ k).snd =\n    Part.bind\n      (unpaired\n        (fun a n =>\n          Nat.rec (eval cf a)\n            (fun y IH => do\n              let i ← IH\n              eval cg (Nat.pair a (Nat.pair y i)))\n            n)\n        (Nat.pair a k))\n      fun ih => eval cg (Nat.pair a (Nat.pair k ih))\n[PROOFSTEP]\nsimp\n[GOAL]\nn m : ℕ\n⊢ eval (Code.const (n + 1)) m = Part.some (n + 1)\n[PROOFSTEP]\nsimp! [eval_const n m]\n[GOAL]\nn : ℕ\n⊢ eval Code.id n = Part.some n\n[PROOFSTEP]\nsimp! [Seq.seq]\n[GOAL]\nc : Code\nn x : ℕ\n⊢ eval (curry c n) x = eval c (Nat.pair n x)\n[PROOFSTEP]\nsimp! [Seq.seq]\n[GOAL]\nn : ℕ\n⊢ (fun b => comp succ (n, b).snd)^[id n] zero = Code.const n\n[PROOFSTEP]\nsimp\n[GOAL]\nn : ℕ\n⊢ (fun b => comp succ b)^[n] zero = Code.const n\n[PROOFSTEP]\ninduction n\n[GOAL]\ncase zero\n⊢ (fun b => comp succ b)^[Nat.zero] zero = Code.const Nat.zero\n[PROOFSTEP]\nsimp [*, Code.const, Function.iterate_succ', -Function.iterate_succ]\n[GOAL]\ncase succ\nn✝ : ℕ\nn_ih✝ : (fun b => comp succ b)^[n✝] zero = Code.const n✝\n⊢ (fun b => comp succ b)^[Nat.succ n✝] zero = Code.const (Nat.succ n✝)\n[PROOFSTEP]\nsimp [*, Code.const, Function.iterate_succ', -Function.iterate_succ]\n[GOAL]\nc₁ c₂ : Code\nn₁ n₂ : ℕ\nh : curry c₁ n₁ = curry c₂ n₂\n⊢ c₁ = c₂\n[PROOFSTEP]\ninjection h\n[GOAL]\nc₁ c₂ : Code\nn₁ n₂ : ℕ\nh : curry c₁ n₁ = curry c₂ n₂\n⊢ n₁ = n₂\n[PROOFSTEP]\ninjection h with h₁ h₂\n[GOAL]\nc₁ c₂ : Code\nn₁ n₂ : ℕ\nh₁ : c₁ = c₂\nh₂ : pair (Code.const n₁) Code.id = pair (Code.const n₂) Code.id\n⊢ n₁ = n₂\n[PROOFSTEP]\ninjection h₂ with h₃ h₄\n[GOAL]\nc₁ c₂ : Code\nn₁ n₂ : ℕ\nh₁ : c₁ = c₂\nh₃ : Code.const n₁ = Code.const n₂\nh₄ : Code.id = Code.id\n⊢ n₁ = n₂\n[PROOFSTEP]\nexact const_inj h₃\n[GOAL]\nf : ℕ →. ℕ\nh : Partrec f\n⊢ ∃ c, eval c = f\n[PROOFSTEP]\ninduction h\n[GOAL]\ncase zero\nf : ℕ →. ℕ\n⊢ ∃ c, eval c = pure 0\ncase succ\nf : ℕ →. ℕ\n⊢ ∃ c, eval c = ↑Nat.succ\ncase left\nf : ℕ →. ℕ\n⊢ ∃ c, eval c = ↑fun n => (unpair n).fst\ncase right\nf : ℕ →. ℕ\n⊢ ∃ c, eval c = ↑fun n => (unpair n).snd\ncase pair\nf f✝ g✝ : ℕ →. ℕ\na✝¹ : Partrec f✝\na✝ : Partrec g✝\na_ih✝¹ : ∃ c, eval c = f✝\na_ih✝ : ∃ c, eval c = g✝\n⊢ ∃ c, eval c = fun n => Seq.seq (Nat.pair <$> f✝ n) fun x => g✝ n\ncase comp\nf f✝ g✝ : ℕ →. ℕ\na✝¹ : Partrec f✝\na✝ : Partrec g✝\na_ih✝¹ : ∃ c, eval c = f✝\na_ih✝ : ∃ c, eval c = g✝\n⊢ ∃ c, eval c = fun n => g✝ n >>= f✝\ncase prec\nf f✝ g✝ : ℕ →. ℕ\na✝¹ : Partrec f✝\na✝ : Partrec g✝\na_ih✝¹ : ∃ c, eval c = f✝\na_ih✝ : ∃ c, eval c = g✝\n⊢ ∃ c,\n    eval c =\n      unpaired fun a n =>\n        Nat.rec (f✝ a)\n          (fun y IH => do\n            let i ← IH\n            g✝ (Nat.pair a (Nat.pair y i)))\n          n\ncase rfind\nf f✝ : ℕ →. ℕ\na✝ : Partrec f✝\na_ih✝ : ∃ c, eval c = f✝\n⊢ ∃ c, eval c = fun a => Nat.rfind fun n => (fun m => decide (m = 0)) <$> f✝ (Nat.pair a n)\n[PROOFSTEP]\ncase zero => exact ⟨zero, rfl⟩\n[GOAL]\nf : ℕ →. ℕ\n⊢ ∃ c, eval c = pure 0\n[PROOFSTEP]\ncase zero => exact ⟨zero, rfl⟩\n[GOAL]\nf : ℕ →. ℕ\n⊢ ∃ c, eval c = pure 0\n[PROOFSTEP]\nexact ⟨zero, rfl⟩\n[GOAL]\ncase succ\nf : ℕ →. ℕ\n⊢ ∃ c, eval c = ↑Nat.succ\ncase left\nf : ℕ →. ℕ\n⊢ ∃ c, eval c = ↑fun n => (unpair n).fst\ncase right\nf : ℕ →. ℕ\n⊢ ∃ c, eval c = ↑fun n => (unpair n).snd\ncase pair\nf f✝ g✝ : ℕ →. ℕ\na✝¹ : Partrec f✝\na✝ : Partrec g✝\na_ih✝¹ : ∃ c, eval c = f✝\na_ih✝ : ∃ c, eval c = g✝\n⊢ ∃ c, eval c = fun n => Seq.seq (Nat.pair <$> f✝ n) fun x => g✝ n\ncase comp\nf f✝ g✝ : ℕ →. ℕ\na✝¹ : Partrec f✝\na✝ : Partrec g✝\na_ih✝¹ : ∃ c, eval c = f✝\na_ih✝ : ∃ c, eval c = g✝\n⊢ ∃ c, eval c = fun n => g✝ n >>= f✝\ncase prec\nf f✝ g✝ : ℕ →. ℕ\na✝¹ : Partrec f✝\na✝ : Partrec g✝\na_ih✝¹ : ∃ c, eval c = f✝\na_ih✝ : ∃ c, eval c = g✝\n⊢ ∃ c,\n    eval c =\n      unpaired fun a n =>\n        Nat.rec (f✝ a)\n          (fun y IH => do\n            let i ← IH\n            g✝ (Nat.pair a (Nat.pair y i)))\n          n\ncase rfind\nf f✝ : ℕ →. ℕ\na✝ : Partrec f✝\na_ih✝ : ∃ c, eval c = f✝\n⊢ ∃ c, eval c = fun a => Nat.rfind fun n => (fun m => decide (m = 0)) <$> f✝ (Nat.pair a n)\n[PROOFSTEP]\ncase succ => exact ⟨succ, rfl⟩\n[GOAL]\nf : ℕ →. ℕ\n⊢ ∃ c, eval c = ↑Nat.succ\n[PROOFSTEP]\ncase succ => exact ⟨succ, rfl⟩\n[GOAL]\nf : ℕ →. ℕ\n⊢ ∃ c, eval c = ↑Nat.succ\n[PROOFSTEP]\nexact ⟨succ, rfl⟩\n[GOAL]\ncase left\nf : ℕ →. ℕ\n⊢ ∃ c, eval c = ↑fun n => (unpair n).fst\ncase right\nf : ℕ →. ℕ\n⊢ ∃ c, eval c = ↑fun n => (unpair n).snd\ncase pair\nf f✝ g✝ : ℕ →. ℕ\na✝¹ : Partrec f✝\na✝ : Partrec g✝\na_ih✝¹ : ∃ c, eval c = f✝\na_ih✝ : ∃ c, eval c = g✝\n⊢ ∃ c, eval c = fun n => Seq.seq (Nat.pair <$> f✝ n) fun x => g✝ n\ncase comp\nf f✝ g✝ : ℕ →. ℕ\na✝¹ : Partrec f✝\na✝ : Partrec g✝\na_ih✝¹ : ∃ c, eval c = f✝\na_ih✝ : ∃ c, eval c = g✝\n⊢ ∃ c, eval c = fun n => g✝ n >>= f✝\ncase prec\nf f✝ g✝ : ℕ →. ℕ\na✝¹ : Partrec f✝\na✝ : Partrec g✝\na_ih✝¹ : ∃ c, eval c = f✝\na_ih✝ : ∃ c, eval c = g✝\n⊢ ∃ c,\n    eval c =\n      unpaired fun a n =>\n        Nat.rec (f✝ a)\n          (fun y IH => do\n            let i ← IH\n            g✝ (Nat.pair a (Nat.pair y i)))\n          n\ncase rfind\nf f✝ : ℕ →. ℕ\na✝ : Partrec f✝\na_ih✝ : ∃ c, eval c = f✝\n⊢ ∃ c, eval c = fun a => Nat.rfind fun n => (fun m => decide (m = 0)) <$> f✝ (Nat.pair a n)\n[PROOFSTEP]\ncase left => exact ⟨left, rfl⟩\n[GOAL]\nf : ℕ →. ℕ\n⊢ ∃ c, eval c = ↑fun n => (unpair n).fst\n[PROOFSTEP]\ncase left => exact ⟨left, rfl⟩\n[GOAL]\nf : ℕ →. ℕ\n⊢ ∃ c, eval c = ↑fun n => (unpair n).fst\n[PROOFSTEP]\nexact ⟨left, rfl⟩\n[GOAL]\ncase right\nf : ℕ →. ℕ\n⊢ ∃ c, eval c = ↑fun n => (unpair n).snd\ncase pair\nf f✝ g✝ : ℕ →. ℕ\na✝¹ : Partrec f✝\na✝ : Partrec g✝\na_ih✝¹ : ∃ c, eval c = f✝\na_ih✝ : ∃ c, eval c = g✝\n⊢ ∃ c, eval c = fun n => Seq.seq (Nat.pair <$> f✝ n) fun x => g✝ n\ncase comp\nf f✝ g✝ : ℕ →. ℕ\na✝¹ : Partrec f✝\na✝ : Partrec g✝\na_ih✝¹ : ∃ c, eval c = f✝\na_ih✝ : ∃ c, eval c = g✝\n⊢ ∃ c, eval c = fun n => g✝ n >>= f✝\ncase prec\nf f✝ g✝ : ℕ →. ℕ\na✝¹ : Partrec f✝\na✝ : Partrec g✝\na_ih✝¹ : ∃ c, eval c = f✝\na_ih✝ : ∃ c, eval c = g✝\n⊢ ∃ c,\n    eval c =\n      unpaired fun a n =>\n        Nat.rec (f✝ a)\n          (fun y IH => do\n            let i ← IH\n            g✝ (Nat.pair a (Nat.pair y i)))\n          n\ncase rfind\nf f✝ : ℕ →. ℕ\na✝ : Partrec f✝\na_ih✝ : ∃ c, eval c = f✝\n⊢ ∃ c, eval c = fun a => Nat.rfind fun n => (fun m => decide (m = 0)) <$> f✝ (Nat.pair a n)\n[PROOFSTEP]\ncase right => exact ⟨right, rfl⟩\n[GOAL]\nf : ℕ →. ℕ\n⊢ ∃ c, eval c = ↑fun n => (unpair n).snd\n[PROOFSTEP]\ncase right => exact ⟨right, rfl⟩\n[GOAL]\nf : ℕ →. ℕ\n⊢ ∃ c, eval c = ↑fun n => (unpair n).snd\n[PROOFSTEP]\nexact ⟨right, rfl⟩\n[GOAL]\ncase pair\nf f✝ g✝ : ℕ →. ℕ\na✝¹ : Partrec f✝\na✝ : Partrec g✝\na_ih✝¹ : ∃ c, eval c = f✝\na_ih✝ : ∃ c, eval c = g✝\n⊢ ∃ c, eval c = fun n => Seq.seq (Nat.pair <$> f✝ n) fun x => g✝ n\ncase comp\nf f✝ g✝ : ℕ →. ℕ\na✝¹ : Partrec f✝\na✝ : Partrec g✝\na_ih✝¹ : ∃ c, eval c = f✝\na_ih✝ : ∃ c, eval c = g✝\n⊢ ∃ c, eval c = fun n => g✝ n >>= f✝\ncase prec\nf f✝ g✝ : ℕ →. ℕ\na✝¹ : Partrec f✝\na✝ : Partrec g✝\na_ih✝¹ : ∃ c, eval c = f✝\na_ih✝ : ∃ c, eval c = g✝\n⊢ ∃ c,\n    eval c =\n      unpaired fun a n =>\n        Nat.rec (f✝ a)\n          (fun y IH => do\n            let i ← IH\n            g✝ (Nat.pair a (Nat.pair y i)))\n          n\ncase rfind\nf f✝ : ℕ →. ℕ\na✝ : Partrec f✝\na_ih✝ : ∃ c, eval c = f✝\n⊢ ∃ c, eval c = fun a => Nat.rfind fun n => (fun m => decide (m = 0)) <$> f✝ (Nat.pair a n)\n[PROOFSTEP]\ncase pair f g pf pg hf hg =>\n  rcases hf with ⟨cf, rfl⟩; rcases hg with ⟨cg, rfl⟩\n  exact ⟨pair cf cg, rfl⟩\n[GOAL]\nf✝ f g : ℕ →. ℕ\npf : Partrec f\npg : Partrec g\nhf : ∃ c, eval c = f\nhg : ∃ c, eval c = g\n⊢ ∃ c, eval c = fun n => Seq.seq (Nat.pair <$> f n) fun x => g n\n[PROOFSTEP]\ncase pair f g pf pg hf hg =>\n  rcases hf with ⟨cf, rfl⟩; rcases hg with ⟨cg, rfl⟩\n  exact ⟨pair cf cg, rfl⟩\n[GOAL]\nf✝ f g : ℕ →. ℕ\npf : Partrec f\npg : Partrec g\nhf : ∃ c, eval c = f\nhg : ∃ c, eval c = g\n⊢ ∃ c, eval c = fun n => Seq.seq (Nat.pair <$> f n) fun x => g n\n[PROOFSTEP]\nrcases hf with ⟨cf, rfl⟩\n[GOAL]\ncase intro\nf g : ℕ →. ℕ\npg : Partrec g\nhg : ∃ c, eval c = g\ncf : Code\npf : Partrec (eval cf)\n⊢ ∃ c, eval c = fun n => Seq.seq (Nat.pair <$> eval cf n) fun x => g n\n[PROOFSTEP]\nrcases hg with ⟨cg, rfl⟩\n[GOAL]\ncase intro.intro\nf : ℕ →. ℕ\ncf : Code\npf : Partrec (eval cf)\ncg : Code\npg : Partrec (eval cg)\n⊢ ∃ c, eval c = fun n => Seq.seq (Nat.pair <$> eval cf n) fun x => eval cg n\n[PROOFSTEP]\nexact ⟨pair cf cg, rfl⟩\n[GOAL]\ncase comp\nf f✝ g✝ : ℕ →. ℕ\na✝¹ : Partrec f✝\na✝ : Partrec g✝\na_ih✝¹ : ∃ c, eval c = f✝\na_ih✝ : ∃ c, eval c = g✝\n⊢ ∃ c, eval c = fun n => g✝ n >>= f✝\ncase prec\nf f✝ g✝ : ℕ →. ℕ\na✝¹ : Partrec f✝\na✝ : Partrec g✝\na_ih✝¹ : ∃ c, eval c = f✝\na_ih✝ : ∃ c, eval c = g✝\n⊢ ∃ c,\n    eval c =\n      unpaired fun a n =>\n        Nat.rec (f✝ a)\n          (fun y IH => do\n            let i ← IH\n            g✝ (Nat.pair a (Nat.pair y i)))\n          n\ncase rfind\nf f✝ : ℕ →. ℕ\na✝ : Partrec f✝\na_ih✝ : ∃ c, eval c = f✝\n⊢ ∃ c, eval c = fun a => Nat.rfind fun n => (fun m => decide (m = 0)) <$> f✝ (Nat.pair a n)\n[PROOFSTEP]\ncase comp f g pf pg hf hg =>\n  rcases hf with ⟨cf, rfl⟩; rcases hg with ⟨cg, rfl⟩\n  exact ⟨comp cf cg, rfl⟩\n[GOAL]\nf✝ f g : ℕ →. ℕ\npf : Partrec f\npg : Partrec g\nhf : ∃ c, eval c = f\nhg : ∃ c, eval c = g\n⊢ ∃ c, eval c = fun n => g n >>= f\n[PROOFSTEP]\ncase comp f g pf pg hf hg =>\n  rcases hf with ⟨cf, rfl⟩; rcases hg with ⟨cg, rfl⟩\n  exact ⟨comp cf cg, rfl⟩\n[GOAL]\nf✝ f g : ℕ →. ℕ\npf : Partrec f\npg : Partrec g\nhf : ∃ c, eval c = f\nhg : ∃ c, eval c = g\n⊢ ∃ c, eval c = fun n => g n >>= f\n[PROOFSTEP]\nrcases hf with ⟨cf, rfl⟩\n[GOAL]\ncase intro\nf g : ℕ →. ℕ\npg : Partrec g\nhg : ∃ c, eval c = g\ncf : Code\npf : Partrec (eval cf)\n⊢ ∃ c, eval c = fun n => g n >>= eval cf\n[PROOFSTEP]\nrcases hg with ⟨cg, rfl⟩\n[GOAL]\ncase intro.intro\nf : ℕ →. ℕ\ncf : Code\npf : Partrec (eval cf)\ncg : Code\npg : Partrec (eval cg)\n⊢ ∃ c, eval c = fun n => eval cg n >>= eval cf\n[PROOFSTEP]\nexact ⟨comp cf cg, rfl⟩\n[GOAL]\ncase prec\nf f✝ g✝ : ℕ →. ℕ\na✝¹ : Partrec f✝\na✝ : Partrec g✝\na_ih✝¹ : ∃ c, eval c = f✝\na_ih✝ : ∃ c, eval c = g✝\n⊢ ∃ c,\n    eval c =\n      unpaired fun a n =>\n        Nat.rec (f✝ a)\n          (fun y IH => do\n            let i ← IH\n            g✝ (Nat.pair a (Nat.pair y i)))\n          n\ncase rfind\nf f✝ : ℕ →. ℕ\na✝ : Partrec f✝\na_ih✝ : ∃ c, eval c = f✝\n⊢ ∃ c, eval c = fun a => Nat.rfind fun n => (fun m => decide (m = 0)) <$> f✝ (Nat.pair a n)\n[PROOFSTEP]\ncase prec f g pf pg hf hg =>\n  rcases hf with ⟨cf, rfl⟩; rcases hg with ⟨cg, rfl⟩\n  exact ⟨prec cf cg, rfl⟩\n[GOAL]\nf✝ f g : ℕ →. ℕ\npf : Partrec f\npg : Partrec g\nhf : ∃ c, eval c = f\nhg : ∃ c, eval c = g\n⊢ ∃ c,\n    eval c =\n      unpaired fun a n =>\n        Nat.rec (f a)\n          (fun y IH => do\n            let i ← IH\n            g (Nat.pair a (Nat.pair y i)))\n          n\n[PROOFSTEP]\ncase prec f g pf pg hf hg =>\n  rcases hf with ⟨cf, rfl⟩; rcases hg with ⟨cg, rfl⟩\n  exact ⟨prec cf cg, rfl⟩\n[GOAL]\nf✝ f g : ℕ →. ℕ\npf : Partrec f\npg : Partrec g\nhf : ∃ c, eval c = f\nhg : ∃ c, eval c = g\n⊢ ∃ c,\n    eval c =\n      unpaired fun a n =>\n        Nat.rec (f a)\n          (fun y IH => do\n            let i ← IH\n            g (Nat.pair a (Nat.pair y i)))\n          n\n[PROOFSTEP]\nrcases hf with ⟨cf, rfl⟩\n[GOAL]\ncase intro\nf g : ℕ →. ℕ\npg : Partrec g\nhg : ∃ c, eval c = g\ncf : Code\npf : Partrec (eval cf)\n⊢ ∃ c,\n    eval c =\n      unpaired fun a n =>\n        Nat.rec (eval cf a)\n          (fun y IH => do\n            let i ← IH\n            g (Nat.pair a (Nat.pair y i)))\n          n\n[PROOFSTEP]\nrcases hg with ⟨cg, rfl⟩\n[GOAL]\ncase intro.intro\nf : ℕ →. ℕ\ncf : Code\npf : Partrec (eval cf)\ncg : Code\npg : Partrec (eval cg)\n⊢ ∃ c,\n    eval c =\n      unpaired fun a n =>\n        Nat.rec (eval cf a)\n          (fun y IH => do\n            let i ← IH\n            eval cg (Nat.pair a (Nat.pair y i)))\n          n\n[PROOFSTEP]\nexact ⟨prec cf cg, rfl⟩\n[GOAL]\ncase rfind\nf f✝ : ℕ →. ℕ\na✝ : Partrec f✝\na_ih✝ : ∃ c, eval c = f✝\n⊢ ∃ c, eval c = fun a => Nat.rfind fun n => (fun m => decide (m = 0)) <$> f✝ (Nat.pair a n)\n[PROOFSTEP]\ncase rfind f pf hf =>\n  rcases hf with ⟨cf, rfl⟩\n  refine' ⟨comp (rfind' cf) (pair Code.id zero), _⟩\n  simp [eval, Seq.seq, pure, PFun.pure, Part.map_id']\n[GOAL]\nf✝ f : ℕ →. ℕ\npf : Partrec f\nhf : ∃ c, eval c = f\n⊢ ∃ c, eval c = fun a => Nat.rfind fun n => (fun m => decide (m = 0)) <$> f (Nat.pair a n)\n[PROOFSTEP]\ncase rfind f pf hf =>\n  rcases hf with ⟨cf, rfl⟩\n  refine' ⟨comp (rfind' cf) (pair Code.id zero), _⟩\n  simp [eval, Seq.seq, pure, PFun.pure, Part.map_id']\n[GOAL]\nf✝ f : ℕ →. ℕ\npf : Partrec f\nhf : ∃ c, eval c = f\n⊢ ∃ c, eval c = fun a => Nat.rfind fun n => (fun m => decide (m = 0)) <$> f (Nat.pair a n)\n[PROOFSTEP]\nrcases hf with ⟨cf, rfl⟩\n[GOAL]\ncase intro\nf : ℕ →. ℕ\ncf : Code\npf : Partrec (eval cf)\n⊢ ∃ c, eval c = fun a => Nat.rfind fun n => (fun m => decide (m = 0)) <$> eval cf (Nat.pair a n)\n[PROOFSTEP]\nrefine' ⟨comp (rfind' cf) (pair Code.id zero), _⟩\n[GOAL]\ncase intro\nf : ℕ →. ℕ\ncf : Code\npf : Partrec (eval cf)\n⊢ eval (comp (rfind' cf) (pair Code.id zero)) = fun a =>\n    Nat.rfind fun n => (fun m => decide (m = 0)) <$> eval cf (Nat.pair a n)\n[PROOFSTEP]\nsimp [eval, Seq.seq, pure, PFun.pure, Part.map_id']\n[GOAL]\nf : ℕ →. ℕ\nh : ∃ c, eval c = f\n⊢ Partrec f\n[PROOFSTEP]\nrcases h with ⟨c, rfl⟩\n[GOAL]\ncase intro\nc : Code\n⊢ Partrec (eval c)\n[PROOFSTEP]\ninduction c\n[GOAL]\ncase intro.zero\n⊢ Partrec (eval zero)\ncase intro.succ\n⊢ Partrec (eval succ)\ncase intro.left\n⊢ Partrec (eval left)\ncase intro.right\n⊢ Partrec (eval right)\ncase intro.pair\na✝¹ a✝ : Code\na_ih✝¹ : Partrec (eval a✝¹)\na_ih✝ : Partrec (eval a✝)\n⊢ Partrec (eval (pair a✝¹ a✝))\ncase intro.comp\na✝¹ a✝ : Code\na_ih✝¹ : Partrec (eval a✝¹)\na_ih✝ : Partrec (eval a✝)\n⊢ Partrec (eval (comp a✝¹ a✝))\ncase intro.prec\na✝¹ a✝ : Code\na_ih✝¹ : Partrec (eval a✝¹)\na_ih✝ : Partrec (eval a✝)\n⊢ Partrec (eval (prec a✝¹ a✝))\ncase intro.rfind' a✝ : Code a_ih✝ : Partrec (eval a✝) ⊢ Partrec (eval (rfind' a✝))\n[PROOFSTEP]\ncase zero => exact Nat.Partrec.zero\n[GOAL]\n⊢ Partrec (eval zero)\n[PROOFSTEP]\ncase zero => exact Nat.Partrec.zero\n[GOAL]\n⊢ Partrec (eval zero)\n[PROOFSTEP]\nexact Nat.Partrec.zero\n[GOAL]\ncase intro.succ\n⊢ Partrec (eval succ)\ncase intro.left\n⊢ Partrec (eval left)\ncase intro.right\n⊢ Partrec (eval right)\ncase intro.pair\na✝¹ a✝ : Code\na_ih✝¹ : Partrec (eval a✝¹)\na_ih✝ : Partrec (eval a✝)\n⊢ Partrec (eval (pair a✝¹ a✝))\ncase intro.comp\na✝¹ a✝ : Code\na_ih✝¹ : Partrec (eval a✝¹)\na_ih✝ : Partrec (eval a✝)\n⊢ Partrec (eval (comp a✝¹ a✝))\ncase intro.prec\na✝¹ a✝ : Code\na_ih✝¹ : Partrec (eval a✝¹)\na_ih✝ : Partrec (eval a✝)\n⊢ Partrec (eval (prec a✝¹ a✝))\ncase intro.rfind' a✝ : Code a_ih✝ : Partrec (eval a✝) ⊢ Partrec (eval (rfind' a✝))\n[PROOFSTEP]\ncase succ => exact Nat.Partrec.succ\n[GOAL]\n⊢ Partrec (eval succ)\n[PROOFSTEP]\ncase succ => exact Nat.Partrec.succ\n[GOAL]\n⊢ Partrec (eval succ)\n[PROOFSTEP]\nexact Nat.Partrec.succ\n[GOAL]\ncase intro.left\n⊢ Partrec (eval left)\ncase intro.right\n⊢ Partrec (eval right)\ncase intro.pair\na✝¹ a✝ : Code\na_ih✝¹ : Partrec (eval a✝¹)\na_ih✝ : Partrec (eval a✝)\n⊢ Partrec (eval (pair a✝¹ a✝))\ncase intro.comp\na✝¹ a✝ : Code\na_ih✝¹ : Partrec (eval a✝¹)\na_ih✝ : Partrec (eval a✝)\n⊢ Partrec (eval (comp a✝¹ a✝))\ncase intro.prec\na✝¹ a✝ : Code\na_ih✝¹ : Partrec (eval a✝¹)\na_ih✝ : Partrec (eval a✝)\n⊢ Partrec (eval (prec a✝¹ a✝))\ncase intro.rfind' a✝ : Code a_ih✝ : Partrec (eval a✝) ⊢ Partrec (eval (rfind' a✝))\n[PROOFSTEP]\ncase left => exact Nat.Partrec.left\n[GOAL]\n⊢ Partrec (eval left)\n[PROOFSTEP]\ncase left => exact Nat.Partrec.left\n[GOAL]\n⊢ Partrec (eval left)\n[PROOFSTEP]\nexact Nat.Partrec.left\n[GOAL]\ncase intro.right\n⊢ Partrec (eval right)\ncase intro.pair\na✝¹ a✝ : Code\na_ih✝¹ : Partrec (eval a✝¹)\na_ih✝ : Partrec (eval a✝)\n⊢ Partrec (eval (pair a✝¹ a✝))\ncase intro.comp\na✝¹ a✝ : Code\na_ih✝¹ : Partrec (eval a✝¹)\na_ih✝ : Partrec (eval a✝)\n⊢ Partrec (eval (comp a✝¹ a✝))\ncase intro.prec\na✝¹ a✝ : Code\na_ih✝¹ : Partrec (eval a✝¹)\na_ih✝ : Partrec (eval a✝)\n⊢ Partrec (eval (prec a✝¹ a✝))\ncase intro.rfind' a✝ : Code a_ih✝ : Partrec (eval a✝) ⊢ Partrec (eval (rfind' a✝))\n[PROOFSTEP]\ncase right => exact Nat.Partrec.right\n[GOAL]\n⊢ Partrec (eval right)\n[PROOFSTEP]\ncase right => exact Nat.Partrec.right\n[GOAL]\n⊢ Partrec (eval right)\n[PROOFSTEP]\nexact Nat.Partrec.right\n[GOAL]\ncase intro.pair\na✝¹ a✝ : Code\na_ih✝¹ : Partrec (eval a✝¹)\na_ih✝ : Partrec (eval a✝)\n⊢ Partrec (eval (pair a✝¹ a✝))\ncase intro.comp\na✝¹ a✝ : Code\na_ih✝¹ : Partrec (eval a✝¹)\na_ih✝ : Partrec (eval a✝)\n⊢ Partrec (eval (comp a✝¹ a✝))\ncase intro.prec\na✝¹ a✝ : Code\na_ih✝¹ : Partrec (eval a✝¹)\na_ih✝ : Partrec (eval a✝)\n⊢ Partrec (eval (prec a✝¹ a✝))\ncase intro.rfind' a✝ : Code a_ih✝ : Partrec (eval a✝) ⊢ Partrec (eval (rfind' a✝))\n[PROOFSTEP]\ncase pair cf cg pf pg => exact pf.pair pg\n[GOAL]\ncf cg : Code\npf : Partrec (eval cf)\npg : Partrec (eval cg)\n⊢ Partrec (eval (pair cf cg))\n[PROOFSTEP]\ncase pair cf cg pf pg => exact pf.pair pg\n[GOAL]\ncf cg : Code\npf : Partrec (eval cf)\npg : Partrec (eval cg)\n⊢ Partrec (eval (pair cf cg))\n[PROOFSTEP]\nexact pf.pair pg\n[GOAL]\ncase intro.comp\na✝¹ a✝ : Code\na_ih✝¹ : Partrec (eval a✝¹)\na_ih✝ : Partrec (eval a✝)\n⊢ Partrec (eval (comp a✝¹ a✝))\ncase intro.prec\na✝¹ a✝ : Code\na_ih✝¹ : Partrec (eval a✝¹)\na_ih✝ : Partrec (eval a✝)\n⊢ Partrec (eval (prec a✝¹ a✝))\ncase intro.rfind' a✝ : Code a_ih✝ : Partrec (eval a✝) ⊢ Partrec (eval (rfind' a✝))\n[PROOFSTEP]\ncase comp cf cg pf pg => exact pf.comp pg\n[GOAL]\ncf cg : Code\npf : Partrec (eval cf)\npg : Partrec (eval cg)\n⊢ Partrec (eval (comp cf cg))\n[PROOFSTEP]\ncase comp cf cg pf pg => exact pf.comp pg\n[GOAL]\ncf cg : Code\npf : Partrec (eval cf)\npg : Partrec (eval cg)\n⊢ Partrec (eval (comp cf cg))\n[PROOFSTEP]\nexact pf.comp pg\n[GOAL]\ncase intro.prec\na✝¹ a✝ : Code\na_ih✝¹ : Partrec (eval a✝¹)\na_ih✝ : Partrec (eval a✝)\n⊢ Partrec (eval (prec a✝¹ a✝))\ncase intro.rfind' a✝ : Code a_ih✝ : Partrec (eval a✝) ⊢ Partrec (eval (rfind' a✝))\n[PROOFSTEP]\ncase prec cf cg pf pg => exact pf.prec pg\n[GOAL]\ncf cg : Code\npf : Partrec (eval cf)\npg : Partrec (eval cg)\n⊢ Partrec (eval (prec cf cg))\n[PROOFSTEP]\ncase prec cf cg pf pg => exact pf.prec pg\n[GOAL]\ncf cg : Code\npf : Partrec (eval cf)\npg : Partrec (eval cg)\n⊢ Partrec (eval (prec cf cg))\n[PROOFSTEP]\nexact pf.prec pg\n[GOAL]\ncase intro.rfind'\na✝ : Code\na_ih✝ : Partrec (eval a✝)\n⊢ Partrec (eval (rfind' a✝))\n[PROOFSTEP]\ncase rfind' cf pf => exact pf.rfind'\n[GOAL]\ncf : Code\npf : Partrec (eval cf)\n⊢ Partrec (eval (rfind' cf))\n[PROOFSTEP]\ncase rfind' cf pf => exact pf.rfind'\n[GOAL]\ncf : Code\npf : Partrec (eval cf)\n⊢ Partrec (eval (rfind' cf))\n[PROOFSTEP]\nexact pf.rfind'\n[GOAL]\nk : ℕ\ncf cg : Code\n⊢ (invImage (fun a => PSigma.casesOn a fun k snd => (k, snd)) Prod.instWellFoundedRelationProd).1\n    { fst := k + 1, snd := cf } { fst := Nat.succ k, snd := pair cf cg }\n[PROOFSTEP]\n{decreasing_with simp (config := { arith := true }) [Zero.zero]; done\n}\n[GOAL]\nk : ℕ\ncf cg : Code\n⊢ (invImage (fun a => PSigma.casesOn a fun k snd => (k, snd)) Prod.instWellFoundedRelationProd).1\n    { fst := k + 1, snd := cf } { fst := Nat.succ k, snd := pair cf cg }\n[PROOFSTEP]\ndecreasing_with simp (config := { arith := true }) [Zero.zero]; done\n[GOAL]\ncase h\nk : ℕ\ncf cg : Code\n⊢ sizeOf cf < sizeOf (pair cf cg)\n[PROOFSTEP]\nsimp (config := { arith := true }) [Zero.zero]\n[GOAL]\n\n[PROOFSTEP]\ndone\n[GOAL]\nk : ℕ\ncf cg : Code\n⊢ (invImage (fun a => PSigma.casesOn a fun k snd => (k, snd)) Prod.instWellFoundedRelationProd).1\n    { fst := k + 1, snd := cg } { fst := Nat.succ k, snd := pair cf cg }\n[PROOFSTEP]\n{decreasing_with simp (config := { arith := true }) [Zero.zero]; done\n}\n[GOAL]\nk : ℕ\ncf cg : Code\n⊢ (invImage (fun a => PSigma.casesOn a fun k snd => (k, snd)) Prod.instWellFoundedRelationProd).1\n    { fst := k + 1, snd := cg } { fst := Nat.succ k, snd := pair cf cg }\n[PROOFSTEP]\ndecreasing_with simp (config := { arith := true }) [Zero.zero]; done\n[GOAL]\ncase h\nk : ℕ\ncf cg : Code\n⊢ sizeOf cg < sizeOf (pair cf cg)\n[PROOFSTEP]\nsimp (config := { arith := true }) [Zero.zero]\n[GOAL]\n\n[PROOFSTEP]\ndone\n[GOAL]\nk : ℕ\ncf cg : Code\n⊢ (invImage (fun a => PSigma.casesOn a fun k snd => (k, snd)) Prod.instWellFoundedRelationProd).1\n    { fst := k + 1, snd := cg } { fst := Nat.succ k, snd := comp cf cg }\n[PROOFSTEP]\n{decreasing_with simp (config := { arith := true }) [Zero.zero]; done\n}\n[GOAL]\nk : ℕ\ncf cg : Code\n⊢ (invImage (fun a => PSigma.casesOn a fun k snd => (k, snd)) Prod.instWellFoundedRelationProd).1\n    { fst := k + 1, snd := cg } { fst := Nat.succ k, snd := comp cf cg }\n[PROOFSTEP]\ndecreasing_with simp (config := { arith := true }) [Zero.zero]; done\n[GOAL]\ncase h\nk : ℕ\ncf cg : Code\n⊢ sizeOf cg < sizeOf (comp cf cg)\n[PROOFSTEP]\nsimp (config := { arith := true }) [Zero.zero]\n[GOAL]\n\n[PROOFSTEP]\ndone\n[GOAL]\nk : ℕ\ncf cg : Code\n⊢ (invImage (fun a => PSigma.casesOn a fun k snd => (k, snd)) Prod.instWellFoundedRelationProd).1\n    { fst := k + 1, snd := cf } { fst := Nat.succ k, snd := comp cf cg }\n[PROOFSTEP]\n{decreasing_with simp (config := { arith := true }) [Zero.zero]; done\n}\n[GOAL]\nk : ℕ\ncf cg : Code\n⊢ (invImage (fun a => PSigma.casesOn a fun k snd => (k, snd)) Prod.instWellFoundedRelationProd).1\n    { fst := k + 1, snd := cf } { fst := Nat.succ k, snd := comp cf cg }\n[PROOFSTEP]\ndecreasing_with simp (config := { arith := true }) [Zero.zero]; done\n[GOAL]\ncase h\nk : ℕ\ncf cg : Code\n⊢ sizeOf cf < sizeOf (comp cf cg)\n[PROOFSTEP]\nsimp (config := { arith := true }) [Zero.zero]\n[GOAL]\n\n[PROOFSTEP]\ndone\n[GOAL]\nk : ℕ\ncf cg : Code\n⊢ (invImage (fun a => PSigma.casesOn a fun k snd => (k, snd)) Prod.instWellFoundedRelationProd).1\n    { fst := k + 1, snd := cf } { fst := Nat.succ k, snd := prec cf cg }\n[PROOFSTEP]\n{decreasing_with simp (config := { arith := true }) [Zero.zero]; done\n}\n[GOAL]\nk : ℕ\ncf cg : Code\n⊢ (invImage (fun a => PSigma.casesOn a fun k snd => (k, snd)) Prod.instWellFoundedRelationProd).1\n    { fst := k + 1, snd := cf } { fst := Nat.succ k, snd := prec cf cg }\n[PROOFSTEP]\ndecreasing_with simp (config := { arith := true }) [Zero.zero]; done\n[GOAL]\ncase h\nk : ℕ\ncf cg : Code\n⊢ sizeOf cf < sizeOf (prec cf cg)\n[PROOFSTEP]\nsimp (config := { arith := true }) [Zero.zero]\n[GOAL]\n\n[PROOFSTEP]\ndone\n[GOAL]\nk : ℕ\ncf cg : Code\n⊢ (invImage (fun a => PSigma.casesOn a fun k snd => (k, snd)) Prod.instWellFoundedRelationProd).1\n    { fst := k, snd := prec cf cg } { fst := Nat.succ k, snd := prec cf cg }\n[PROOFSTEP]\n{decreasing_with simp (config := { arith := true }) [Zero.zero]; done\n}\n[GOAL]\nk : ℕ\ncf cg : Code\n⊢ (invImage (fun a => PSigma.casesOn a fun k snd => (k, snd)) Prod.instWellFoundedRelationProd).1\n    { fst := k, snd := prec cf cg } { fst := Nat.succ k, snd := prec cf cg }\n[PROOFSTEP]\ndecreasing_with simp (config := { arith := true }) [Zero.zero]; done\n[GOAL]\ncase h\nk : ℕ\ncf cg : Code\n⊢ k < Nat.succ k\n[PROOFSTEP]\nsimp (config := { arith := true }) [Zero.zero]\n[GOAL]\n\n[PROOFSTEP]\ndone\n[GOAL]\nk : ℕ\ncf cg : Code\n⊢ (invImage (fun a => PSigma.casesOn a fun k snd => (k, snd)) Prod.instWellFoundedRelationProd).1\n    { fst := k + 1, snd := cg } { fst := Nat.succ k, snd := prec cf cg }\n[PROOFSTEP]\n{decreasing_with simp (config := { arith := true }) [Zero.zero]; done\n}\n[GOAL]\nk : ℕ\ncf cg : Code\n⊢ (invImage (fun a => PSigma.casesOn a fun k snd => (k, snd)) Prod.instWellFoundedRelationProd).1\n    { fst := k + 1, snd := cg } { fst := Nat.succ k, snd := prec cf cg }\n[PROOFSTEP]\ndecreasing_with simp (config := { arith := true }) [Zero.zero]; done\n[GOAL]\ncase h\nk : ℕ\ncf cg : Code\n⊢ sizeOf cg < sizeOf (prec cf cg)\n[PROOFSTEP]\nsimp (config := { arith := true }) [Zero.zero]\n[GOAL]\n\n[PROOFSTEP]\ndone\n[GOAL]\nk : ℕ\ncf : Code\n⊢ (invImage (fun a => PSigma.casesOn a fun k snd => (k, snd)) Prod.instWellFoundedRelationProd).1\n    { fst := k + 1, snd := cf } { fst := Nat.succ k, snd := rfind' cf }\n[PROOFSTEP]\n{decreasing_with simp (config := { arith := true }) [Zero.zero]; done\n}\n[GOAL]\nk : ℕ\ncf : Code\n⊢ (invImage (fun a => PSigma.casesOn a fun k snd => (k, snd)) Prod.instWellFoundedRelationProd).1\n    { fst := k + 1, snd := cf } { fst := Nat.succ k, snd := rfind' cf }\n[PROOFSTEP]\ndecreasing_with simp (config := { arith := true }) [Zero.zero]; done\n[GOAL]\ncase h\nk : ℕ\ncf : Code\n⊢ sizeOf cf < sizeOf (rfind' cf)\n[PROOFSTEP]\nsimp (config := { arith := true }) [Zero.zero]\n[GOAL]\n\n[PROOFSTEP]\ndone\n[GOAL]\nk : ℕ\ncf : Code\n⊢ (invImage (fun a => PSigma.casesOn a fun k snd => (k, snd)) Prod.instWellFoundedRelationProd).1\n    { fst := k, snd := rfind' cf } { fst := Nat.succ k, snd := rfind' cf }\n[PROOFSTEP]\n{decreasing_with simp (config := { arith := true }) [Zero.zero]; done\n}\n[GOAL]\nk : ℕ\ncf : Code\n⊢ (invImage (fun a => PSigma.casesOn a fun k snd => (k, snd)) Prod.instWellFoundedRelationProd).1\n    { fst := k, snd := rfind' cf } { fst := Nat.succ k, snd := rfind' cf }\n[PROOFSTEP]\ndecreasing_with simp (config := { arith := true }) [Zero.zero]; done\n[GOAL]\ncase h\nk : ℕ\ncf : Code\n⊢ k < Nat.succ k\n[PROOFSTEP]\nsimp (config := { arith := true }) [Zero.zero]\n[GOAL]\n\n[PROOFSTEP]\ndone\n[GOAL]\nc : Code\nn x : ℕ\nh : x ∈ evaln 0 c n\n⊢ n < 0\n[PROOFSTEP]\nsimp [evaln] at h \n[GOAL]\nk : ℕ\nc : Code\nn x : ℕ\nh : x ∈ evaln (k + 1) c n\n⊢ n < k + 1\n[PROOFSTEP]\nsuffices\n  ∀ {o : Option ℕ},\n    x ∈ do {\n        guard (n ≤ k);\n        o\n        } →\n      n < k + 1\n  by cases c <;> rw [evaln] at h  <;> exact this h\n[GOAL]\nk : ℕ\nc : Code\nn x : ℕ\nh : x ∈ evaln (k + 1) c n\nthis :\n  ∀ {o : Option ℕ},\n    (x ∈ do\n        guard (n ≤ k)\n        o) →\n      n < k + 1\n⊢ n < k + 1\n[PROOFSTEP]\ncases c\n[GOAL]\ncase zero\nk n x : ℕ\nthis :\n  ∀ {o : Option ℕ},\n    (x ∈ do\n        guard (n ≤ k)\n        o) →\n      n < k + 1\nh : x ∈ evaln (k + 1) zero n\n⊢ n < k + 1\n[PROOFSTEP]\nrw [evaln] at h \n[GOAL]\ncase succ\nk n x : ℕ\nthis :\n  ∀ {o : Option ℕ},\n    (x ∈ do\n        guard (n ≤ k)\n        o) →\n      n < k + 1\nh : x ∈ evaln (k + 1) succ n\n⊢ n < k + 1\n[PROOFSTEP]\nrw [evaln] at h \n[GOAL]\ncase left\nk n x : ℕ\nthis :\n  ∀ {o : Option ℕ},\n    (x ∈ do\n        guard (n ≤ k)\n        o) →\n      n < k + 1\nh : x ∈ evaln (k + 1) left n\n⊢ n < k + 1\n[PROOFSTEP]\nrw [evaln] at h \n[GOAL]\ncase right\nk n x : ℕ\nthis :\n  ∀ {o : Option ℕ},\n    (x ∈ do\n        guard (n ≤ k)\n        o) →\n      n < k + 1\nh : x ∈ evaln (k + 1) right n\n⊢ n < k + 1\n[PROOFSTEP]\nrw [evaln] at h \n[GOAL]\ncase pair\nk n x : ℕ\nthis :\n  ∀ {o : Option ℕ},\n    (x ∈ do\n        guard (n ≤ k)\n        o) →\n      n < k + 1\na✝¹ a✝ : Code\nh : x ∈ evaln (k + 1) (pair a✝¹ a✝) n\n⊢ n < k + 1\n[PROOFSTEP]\nrw [evaln] at h \n[GOAL]\ncase comp\nk n x : ℕ\nthis :\n  ∀ {o : Option ℕ},\n    (x ∈ do\n        guard (n ≤ k)\n        o) →\n      n < k + 1\na✝¹ a✝ : Code\nh : x ∈ evaln (k + 1) (comp a✝¹ a✝) n\n⊢ n < k + 1\n[PROOFSTEP]\nrw [evaln] at h \n[GOAL]\ncase prec\nk n x : ℕ\nthis :\n  ∀ {o : Option ℕ},\n    (x ∈ do\n        guard (n ≤ k)\n        o) →\n      n < k + 1\na✝¹ a✝ : Code\nh : x ∈ evaln (k + 1) (prec a✝¹ a✝) n\n⊢ n < k + 1\n[PROOFSTEP]\nrw [evaln] at h \n[GOAL]\ncase rfind'\nk n x : ℕ\nthis :\n  ∀ {o : Option ℕ},\n    (x ∈ do\n        guard (n ≤ k)\n        o) →\n      n < k + 1\na✝ : Code\nh : x ∈ evaln (k + 1) (rfind' a✝) n\n⊢ n < k + 1\n[PROOFSTEP]\nrw [evaln] at h \n[GOAL]\ncase zero\nk n x : ℕ\nthis :\n  ∀ {o : Option ℕ},\n    (x ∈ do\n        guard (n ≤ k)\n        o) →\n      n < k + 1\nh :\n  x ∈\n    (fun n => do\n        guard (n ≤ k)\n        pure 0)\n      n\n⊢ n < k + 1\n[PROOFSTEP]\nexact this h\n[GOAL]\ncase succ\nk n x : ℕ\nthis :\n  ∀ {o : Option ℕ},\n    (x ∈ do\n        guard (n ≤ k)\n        o) →\n      n < k + 1\nh :\n  x ∈\n    (fun n => do\n        guard (n ≤ k)\n        pure (Nat.succ n))\n      n\n⊢ n < k + 1\n[PROOFSTEP]\nexact this h\n[GOAL]\ncase left\nk n x : ℕ\nthis :\n  ∀ {o : Option ℕ},\n    (x ∈ do\n        guard (n ≤ k)\n        o) →\n      n < k + 1\nh :\n  x ∈\n    (fun n => do\n        guard (n ≤ k)\n        pure (unpair n).fst)\n      n\n⊢ n < k + 1\n[PROOFSTEP]\nexact this h\n[GOAL]\ncase right\nk n x : ℕ\nthis :\n  ∀ {o : Option ℕ},\n    (x ∈ do\n        guard (n ≤ k)\n        o) →\n      n < k + 1\nh :\n  x ∈\n    (fun n => do\n        guard (n ≤ k)\n        pure (unpair n).snd)\n      n\n⊢ n < k + 1\n[PROOFSTEP]\nexact this h\n[GOAL]\ncase pair\nk n x : ℕ\nthis :\n  ∀ {o : Option ℕ},\n    (x ∈ do\n        guard (n ≤ k)\n        o) →\n      n < k + 1\na✝¹ a✝ : Code\nh :\n  x ∈\n    (fun n => do\n        guard (n ≤ k)\n        Seq.seq (Nat.pair <$> evaln (k + 1) a✝¹ n) fun x => evaln (k + 1) a✝ n)\n      n\n⊢ n < k + 1\n[PROOFSTEP]\nexact this h\n[GOAL]\ncase comp\nk n x : ℕ\nthis :\n  ∀ {o : Option ℕ},\n    (x ∈ do\n        guard (n ≤ k)\n        o) →\n      n < k + 1\na✝¹ a✝ : Code\nh :\n  x ∈\n    (fun n => do\n        guard (n ≤ k)\n        let x ← evaln (k + 1) a✝ n\n        evaln (k + 1) a✝¹ x)\n      n\n⊢ n < k + 1\n[PROOFSTEP]\nexact this h\n[GOAL]\ncase prec\nk n x : ℕ\nthis :\n  ∀ {o : Option ℕ},\n    (x ∈ do\n        guard (n ≤ k)\n        o) →\n      n < k + 1\na✝¹ a✝ : Code\nh :\n  x ∈\n    (fun n => do\n        guard (n ≤ k)\n        unpaired\n            (fun a n =>\n              Nat.casesOn n (evaln (k + 1) a✝¹ a) fun y => do\n                let i ← evaln k (prec a✝¹ a✝) (Nat.pair a y)\n                evaln (k + 1) a✝ (Nat.pair a (Nat.pair y i)))\n            n)\n      n\n⊢ n < k + 1\n[PROOFSTEP]\nexact this h\n[GOAL]\ncase rfind'\nk n x : ℕ\nthis :\n  ∀ {o : Option ℕ},\n    (x ∈ do\n        guard (n ≤ k)\n        o) →\n      n < k + 1\na✝ : Code\nh :\n  x ∈\n    (fun n => do\n        guard (n ≤ k)\n        unpaired\n            (fun a m => do\n              let x ← evaln (k + 1) a✝ (Nat.pair a m)\n              if x = 0 then pure m else evaln k (rfind' a✝) (Nat.pair a (m + 1)))\n            n)\n      n\n⊢ n < k + 1\n[PROOFSTEP]\nexact this h\n[GOAL]\nk : ℕ\nc : Code\nn x : ℕ\nh : x ∈ evaln (k + 1) c n\n⊢ ∀ {o : Option ℕ},\n    (x ∈ do\n        guard (n ≤ k)\n        o) →\n      n < k + 1\n[PROOFSTEP]\nsimpa [Bind.bind] using Nat.lt_succ_of_le\n[GOAL]\nk₂ : ℕ\nc : Code\nn x : ℕ\nx✝ : 0 ≤ k₂\nh : x ∈ evaln 0 c n\n⊢ x ∈ evaln k₂ c n\n[PROOFSTEP]\nsimp [evaln] at h \n[GOAL]\nk k₂ : ℕ\nc : Code\nn x : ℕ\nhl : k + 1 ≤ k₂ + 1\nh : x ∈ evaln (k + 1) c n\n⊢ x ∈ evaln (k₂ + 1) c n\n[PROOFSTEP]\nhave hl' := Nat.le_of_succ_le_succ hl\n[GOAL]\nk k₂ : ℕ\nc : Code\nn x : ℕ\nhl : k + 1 ≤ k₂ + 1\nh : x ∈ evaln (k + 1) c n\nhl' : k ≤ k₂\n⊢ x ∈ evaln (k₂ + 1) c n\n[PROOFSTEP]\nhave :\n  ∀ {k k₂ n x : ℕ} {o₁ o₂ : Option ℕ},\n    k ≤ k₂ →\n      (x ∈ o₁ → x ∈ o₂) →\n        x ∈ do {\n            guard (n ≤ k);\n            o₁\n            } →\n          x ∈ do {\n            guard (n ≤ k₂);\n            o₂\n            } :=\n  by\n  simp [Bind.bind]\n  introv h h₁ h₂ h₃\n  exact ⟨le_trans h₂ h, h₁ h₃⟩\n[GOAL]\nk k₂ : ℕ\nc : Code\nn x : ℕ\nhl : k + 1 ≤ k₂ + 1\nh : x ∈ evaln (k + 1) c n\nhl' : k ≤ k₂\n⊢ ∀ {k k₂ n x : ℕ} {o₁ o₂ : Option ℕ},\n    k ≤ k₂ →\n      (x ∈ o₁ → x ∈ o₂) →\n        (x ∈ do\n            guard (n ≤ k)\n            o₁) →\n          x ∈ do\n            guard (n ≤ k₂)\n            o₂\n[PROOFSTEP]\nsimp [Bind.bind]\n[GOAL]\nk k₂ : ℕ\nc : Code\nn x : ℕ\nhl : k + 1 ≤ k₂ + 1\nh : x ∈ evaln (k + 1) c n\nhl' : k ≤ k₂\n⊢ ∀ {k k₂ n x : ℕ} {o₁ o₂ : Option ℕ}, k ≤ k₂ → (o₁ = some x → o₂ = some x) → n ≤ k → o₁ = some x → n ≤ k₂ ∧ o₂ = some x\n[PROOFSTEP]\nintrov h h₁ h₂ h₃\n[GOAL]\nk✝ k₂✝ : ℕ\nc : Code\nn✝ x✝ : ℕ\nhl : k✝ + 1 ≤ k₂✝ + 1\nh✝ : x✝ ∈ evaln (k✝ + 1) c n✝\nhl' : k✝ ≤ k₂✝\nk k₂ n x : ℕ\no₁ o₂ : Option ℕ\nh : k ≤ k₂\nh₁ : o₁ = some x → o₂ = some x\nh₂ : n ≤ k\nh₃ : o₁ = some x\n⊢ n ≤ k₂ ∧ o₂ = some x\n[PROOFSTEP]\nexact ⟨le_trans h₂ h, h₁ h₃⟩\n[GOAL]\nk k₂ : ℕ\nc : Code\nn x : ℕ\nhl : k + 1 ≤ k₂ + 1\nh : x ∈ evaln (k + 1) c n\nhl' : k ≤ k₂\nthis :\n  ∀ {k k₂ n x : ℕ} {o₁ o₂ : Option ℕ},\n    k ≤ k₂ →\n      (x ∈ o₁ → x ∈ o₂) →\n        (x ∈ do\n            guard (n ≤ k)\n            o₁) →\n          x ∈ do\n            guard (n ≤ k₂)\n            o₂\n⊢ x ∈ evaln (k₂ + 1) c n\n[PROOFSTEP]\nsimp at h ⊢\n[GOAL]\nk k₂ : ℕ\nc : Code\nn x : ℕ\nhl : k + 1 ≤ k₂ + 1\nhl' : k ≤ k₂\nthis :\n  ∀ {k k₂ n x : ℕ} {o₁ o₂ : Option ℕ},\n    k ≤ k₂ →\n      (x ∈ o₁ → x ∈ o₂) →\n        (x ∈ do\n            guard (n ≤ k)\n            o₁) →\n          x ∈ do\n            guard (n ≤ k₂)\n            o₂\nh : evaln (k + 1) c n = some x\n⊢ evaln (k₂ + 1) c n = some x\n[PROOFSTEP]\ninduction' c with cf cg hf hg cf cg hf hg cf cg hf hg cf hf generalizing x n\n[GOAL]\ncase zero\nk k₂ : ℕ\nc : Code\nn✝ x✝ : ℕ\nhl : k + 1 ≤ k₂ + 1\nhl' : k ≤ k₂\nthis :\n  ∀ {k k₂ n x : ℕ} {o₁ o₂ : Option ℕ},\n    k ≤ k₂ →\n      (x ∈ o₁ → x ∈ o₂) →\n        (x ∈ do\n            guard (n ≤ k)\n            o₁) →\n          x ∈ do\n            guard (n ≤ k₂)\n            o₂\nh✝ : evaln (k + 1) c n✝ = some x✝\nn x : ℕ\nh : evaln (k + 1) zero n = some x\n⊢ evaln (k₂ + 1) zero n = some x\n[PROOFSTEP]\nrw [evaln] at h ⊢\n[GOAL]\ncase succ\nk k₂ : ℕ\nc : Code\nn✝ x✝ : ℕ\nhl : k + 1 ≤ k₂ + 1\nhl' : k ≤ k₂\nthis :\n  ∀ {k k₂ n x : ℕ} {o₁ o₂ : Option ℕ},\n    k ≤ k₂ →\n      (x ∈ o₁ → x ∈ o₂) →\n        (x ∈ do\n            guard (n ≤ k)\n            o₁) →\n          x ∈ do\n            guard (n ≤ k₂)\n            o₂\nh✝ : evaln (k + 1) c n✝ = some x✝\nn x : ℕ\nh : evaln (k + 1) succ n = some x\n⊢ evaln (k₂ + 1) succ n = some x\n[PROOFSTEP]\nrw [evaln] at h ⊢\n[GOAL]\ncase left\nk k₂ : ℕ\nc : Code\nn✝ x✝ : ℕ\nhl : k + 1 ≤ k₂ + 1\nhl' : k ≤ k₂\nthis :\n  ∀ {k k₂ n x : ℕ} {o₁ o₂ : Option ℕ},\n    k ≤ k₂ →\n      (x ∈ o₁ → x ∈ o₂) →\n        (x ∈ do\n            guard (n ≤ k)\n            o₁) →\n          x ∈ do\n            guard (n ≤ k₂)\n            o₂\nh✝ : evaln (k + 1) c n✝ = some x✝\nn x : ℕ\nh : evaln (k + 1) left n = some x\n⊢ evaln (k₂ + 1) left n = some x\n[PROOFSTEP]\nrw [evaln] at h ⊢\n[GOAL]\ncase right\nk k₂ : ℕ\nc : Code\nn✝ x✝ : ℕ\nhl : k + 1 ≤ k₂ + 1\nhl' : k ≤ k₂\nthis :\n  ∀ {k k₂ n x : ℕ} {o₁ o₂ : Option ℕ},\n    k ≤ k₂ →\n      (x ∈ o₁ → x ∈ o₂) →\n        (x ∈ do\n            guard (n ≤ k)\n            o₁) →\n          x ∈ do\n            guard (n ≤ k₂)\n            o₂\nh✝ : evaln (k + 1) c n✝ = some x✝\nn x : ℕ\nh : evaln (k + 1) right n = some x\n⊢ evaln (k₂ + 1) right n = some x\n[PROOFSTEP]\nrw [evaln] at h ⊢\n[GOAL]\ncase pair\nk k₂ : ℕ\nc : Code\nn✝ x✝ : ℕ\nhl : k + 1 ≤ k₂ + 1\nhl' : k ≤ k₂\nthis :\n  ∀ {k k₂ n x : ℕ} {o₁ o₂ : Option ℕ},\n    k ≤ k₂ →\n      (x ∈ o₁ → x ∈ o₂) →\n        (x ∈ do\n            guard (n ≤ k)\n            o₁) →\n          x ∈ do\n            guard (n ≤ k₂)\n            o₂\nh✝ : evaln (k + 1) c n✝ = some x✝\ncf cg : Code\nhf : ∀ (n x : ℕ), evaln (k + 1) cf n = some x → evaln (k₂ + 1) cf n = some x\nhg : ∀ (n x : ℕ), evaln (k + 1) cg n = some x → evaln (k₂ + 1) cg n = some x\nn x : ℕ\nh : evaln (k + 1) (pair cf cg) n = some x\n⊢ evaln (k₂ + 1) (pair cf cg) n = some x\n[PROOFSTEP]\nrw [evaln] at h ⊢\n[GOAL]\ncase comp\nk k₂ : ℕ\nc : Code\nn✝ x✝ : ℕ\nhl : k + 1 ≤ k₂ + 1\nhl' : k ≤ k₂\nthis :\n  ∀ {k k₂ n x : ℕ} {o₁ o₂ : Option ℕ},\n    k ≤ k₂ →\n      (x ∈ o₁ → x ∈ o₂) →\n        (x ∈ do\n            guard (n ≤ k)\n            o₁) →\n          x ∈ do\n            guard (n ≤ k₂)\n            o₂\nh✝ : evaln (k + 1) c n✝ = some x✝\ncf cg : Code\nhf : ∀ (n x : ℕ), evaln (k + 1) cf n = some x → evaln (k₂ + 1) cf n = some x\nhg : ∀ (n x : ℕ), evaln (k + 1) cg n = some x → evaln (k₂ + 1) cg n = some x\nn x : ℕ\nh : evaln (k + 1) (comp cf cg) n = some x\n⊢ evaln (k₂ + 1) (comp cf cg) n = some x\n[PROOFSTEP]\nrw [evaln] at h ⊢\n[GOAL]\ncase prec\nk k₂ : ℕ\nc : Code\nn✝ x✝ : ℕ\nhl : k + 1 ≤ k₂ + 1\nhl' : k ≤ k₂\nthis :\n  ∀ {k k₂ n x : ℕ} {o₁ o₂ : Option ℕ},\n    k ≤ k₂ →\n      (x ∈ o₁ → x ∈ o₂) →\n        (x ∈ do\n            guard (n ≤ k)\n            o₁) →\n          x ∈ do\n            guard (n ≤ k₂)\n            o₂\nh✝ : evaln (k + 1) c n✝ = some x✝\ncf cg : Code\nhf : ∀ (n x : ℕ), evaln (k + 1) cf n = some x → evaln (k₂ + 1) cf n = some x\nhg : ∀ (n x : ℕ), evaln (k + 1) cg n = some x → evaln (k₂ + 1) cg n = some x\nn x : ℕ\nh : evaln (k + 1) (prec cf cg) n = some x\n⊢ evaln (k₂ + 1) (prec cf cg) n = some x\n[PROOFSTEP]\nrw [evaln] at h ⊢\n[GOAL]\ncase rfind'\nk k₂ : ℕ\nc : Code\nn✝ x✝ : ℕ\nhl : k + 1 ≤ k₂ + 1\nhl' : k ≤ k₂\nthis :\n  ∀ {k k₂ n x : ℕ} {o₁ o₂ : Option ℕ},\n    k ≤ k₂ →\n      (x ∈ o₁ → x ∈ o₂) →\n        (x ∈ do\n            guard (n ≤ k)\n            o₁) →\n          x ∈ do\n            guard (n ≤ k₂)\n            o₂\nh✝ : evaln (k + 1) c n✝ = some x✝\ncf : Code\nhf : ∀ (n x : ℕ), evaln (k + 1) cf n = some x → evaln (k₂ + 1) cf n = some x\nn x : ℕ\nh : evaln (k + 1) (rfind' cf) n = some x\n⊢ evaln (k₂ + 1) (rfind' cf) n = some x\n[PROOFSTEP]\nrw [evaln] at h ⊢\n[GOAL]\ncase zero\nk k₂ : ℕ\nc : Code\nn✝ x✝ : ℕ\nhl : k + 1 ≤ k₂ + 1\nhl' : k ≤ k₂\nthis :\n  ∀ {k k₂ n x : ℕ} {o₁ o₂ : Option ℕ},\n    k ≤ k₂ →\n      (x ∈ o₁ → x ∈ o₂) →\n        (x ∈ do\n            guard (n ≤ k)\n            o₁) →\n          x ∈ do\n            guard (n ≤ k₂)\n            o₂\nh✝ : evaln (k + 1) c n✝ = some x✝\nn x : ℕ\nh :\n  (fun n => do\n        guard (n ≤ k)\n        pure 0)\n      n =\n    some x\n⊢ (fun n => do\n        guard (n ≤ k₂)\n        pure 0)\n      n =\n    some x\n[PROOFSTEP]\nrefine' this hl' (fun h => _) h\n[GOAL]\ncase succ\nk k₂ : ℕ\nc : Code\nn✝ x✝ : ℕ\nhl : k + 1 ≤ k₂ + 1\nhl' : k ≤ k₂\nthis :\n  ∀ {k k₂ n x : ℕ} {o₁ o₂ : Option ℕ},\n    k ≤ k₂ →\n      (x ∈ o₁ → x ∈ o₂) →\n        (x ∈ do\n            guard (n ≤ k)\n            o₁) →\n          x ∈ do\n            guard (n ≤ k₂)\n            o₂\nh✝ : evaln (k + 1) c n✝ = some x✝\nn x : ℕ\nh :\n  (fun n => do\n        guard (n ≤ k)\n        pure (Nat.succ n))\n      n =\n    some x\n⊢ (fun n => do\n        guard (n ≤ k₂)\n        pure (Nat.succ n))\n      n =\n    some x\n[PROOFSTEP]\nrefine' this hl' (fun h => _) h\n[GOAL]\ncase left\nk k₂ : ℕ\nc : Code\nn✝ x✝ : ℕ\nhl : k + 1 ≤ k₂ + 1\nhl' : k ≤ k₂\nthis :\n  ∀ {k k₂ n x : ℕ} {o₁ o₂ : Option ℕ},\n    k ≤ k₂ →\n      (x ∈ o₁ → x ∈ o₂) →\n        (x ∈ do\n            guard (n ≤ k)\n            o₁) →\n          x ∈ do\n            guard (n ≤ k₂)\n            o₂\nh✝ : evaln (k + 1) c n✝ = some x✝\nn x : ℕ\nh :\n  (fun n => do\n        guard (n ≤ k)\n        pure (unpair n).fst)\n      n =\n    some x\n⊢ (fun n => do\n        guard (n ≤ k₂)\n        pure (unpair n).fst)\n      n =\n    some x\n[PROOFSTEP]\nrefine' this hl' (fun h => _) h\n[GOAL]\ncase right\nk k₂ : ℕ\nc : Code\nn✝ x✝ : ℕ\nhl : k + 1 ≤ k₂ + 1\nhl' : k ≤ k₂\nthis :\n  ∀ {k k₂ n x : ℕ} {o₁ o₂ : Option ℕ},\n    k ≤ k₂ →\n      (x ∈ o₁ → x ∈ o₂) →\n        (x ∈ do\n            guard (n ≤ k)\n            o₁) →\n          x ∈ do\n            guard (n ≤ k₂)\n            o₂\nh✝ : evaln (k + 1) c n✝ = some x✝\nn x : ℕ\nh :\n  (fun n => do\n        guard (n ≤ k)\n        pure (unpair n).snd)\n      n =\n    some x\n⊢ (fun n => do\n        guard (n ≤ k₂)\n        pure (unpair n).snd)\n      n =\n    some x\n[PROOFSTEP]\nrefine' this hl' (fun h => _) h\n[GOAL]\ncase pair\nk k₂ : ℕ\nc : Code\nn✝ x✝ : ℕ\nhl : k + 1 ≤ k₂ + 1\nhl' : k ≤ k₂\nthis :\n  ∀ {k k₂ n x : ℕ} {o₁ o₂ : Option ℕ},\n    k ≤ k₂ →\n      (x ∈ o₁ → x ∈ o₂) →\n        (x ∈ do\n            guard (n ≤ k)\n            o₁) →\n          x ∈ do\n            guard (n ≤ k₂)\n            o₂\nh✝ : evaln (k + 1) c n✝ = some x✝\ncf cg : Code\nhf : ∀ (n x : ℕ), evaln (k + 1) cf n = some x → evaln (k₂ + 1) cf n = some x\nhg : ∀ (n x : ℕ), evaln (k + 1) cg n = some x → evaln (k₂ + 1) cg n = some x\nn x : ℕ\nh :\n  (fun n => do\n        guard (n ≤ k)\n        Seq.seq (Nat.pair <$> evaln (k + 1) cf n) fun x => evaln (k + 1) cg n)\n      n =\n    some x\n⊢ (fun n => do\n        guard (n ≤ k₂)\n        Seq.seq (Nat.pair <$> evaln (k₂ + 1) cf n) fun x => evaln (k₂ + 1) cg n)\n      n =\n    some x\n[PROOFSTEP]\nrefine' this hl' (fun h => _) h\n[GOAL]\ncase comp\nk k₂ : ℕ\nc : Code\nn✝ x✝ : ℕ\nhl : k + 1 ≤ k₂ + 1\nhl' : k ≤ k₂\nthis :\n  ∀ {k k₂ n x : ℕ} {o₁ o₂ : Option ℕ},\n    k ≤ k₂ →\n      (x ∈ o₁ → x ∈ o₂) →\n        (x ∈ do\n            guard (n ≤ k)\n            o₁) →\n          x ∈ do\n            guard (n ≤ k₂)\n            o₂\nh✝ : evaln (k + 1) c n✝ = some x✝\ncf cg : Code\nhf : ∀ (n x : ℕ), evaln (k + 1) cf n = some x → evaln (k₂ + 1) cf n = some x\nhg : ∀ (n x : ℕ), evaln (k + 1) cg n = some x → evaln (k₂ + 1) cg n = some x\nn x : ℕ\nh :\n  (fun n => do\n        guard (n ≤ k)\n        let x ← evaln (k + 1) cg n\n        evaln (k + 1) cf x)\n      n =\n    some x\n⊢ (fun n => do\n        guard (n ≤ k₂)\n        let x ← evaln (k₂ + 1) cg n\n        evaln (k₂ + 1) cf x)\n      n =\n    some x\n[PROOFSTEP]\nrefine' this hl' (fun h => _) h\n[GOAL]\ncase prec\nk k₂ : ℕ\nc : Code\nn✝ x✝ : ℕ\nhl : k + 1 ≤ k₂ + 1\nhl' : k ≤ k₂\nthis :\n  ∀ {k k₂ n x : ℕ} {o₁ o₂ : Option ℕ},\n    k ≤ k₂ →\n      (x ∈ o₁ → x ∈ o₂) →\n        (x ∈ do\n            guard (n ≤ k)\n            o₁) →\n          x ∈ do\n            guard (n ≤ k₂)\n            o₂\nh✝ : evaln (k + 1) c n✝ = some x✝\ncf cg : Code\nhf : ∀ (n x : ℕ), evaln (k + 1) cf n = some x → evaln (k₂ + 1) cf n = some x\nhg : ∀ (n x : ℕ), evaln (k + 1) cg n = some x → evaln (k₂ + 1) cg n = some x\nn x : ℕ\nh :\n  (fun n => do\n        guard (n ≤ k)\n        unpaired\n            (fun a n =>\n              Nat.casesOn n (evaln (k + 1) cf a) fun y => do\n                let i ← evaln k (prec cf cg) (Nat.pair a y)\n                evaln (k + 1) cg (Nat.pair a (Nat.pair y i)))\n            n)\n      n =\n    some x\n⊢ (fun n => do\n        guard (n ≤ k₂)\n        unpaired\n            (fun a n =>\n              Nat.casesOn n (evaln (k₂ + 1) cf a) fun y => do\n                let i ← evaln k₂ (prec cf cg) (Nat.pair a y)\n                evaln (k₂ + 1) cg (Nat.pair a (Nat.pair y i)))\n            n)\n      n =\n    some x\n[PROOFSTEP]\nrefine' this hl' (fun h => _) h\n[GOAL]\ncase rfind'\nk k₂ : ℕ\nc : Code\nn✝ x✝ : ℕ\nhl : k + 1 ≤ k₂ + 1\nhl' : k ≤ k₂\nthis :\n  ∀ {k k₂ n x : ℕ} {o₁ o₂ : Option ℕ},\n    k ≤ k₂ →\n      (x ∈ o₁ → x ∈ o₂) →\n        (x ∈ do\n            guard (n ≤ k)\n            o₁) →\n          x ∈ do\n            guard (n ≤ k₂)\n            o₂\nh✝ : evaln (k + 1) c n✝ = some x✝\ncf : Code\nhf : ∀ (n x : ℕ), evaln (k + 1) cf n = some x → evaln (k₂ + 1) cf n = some x\nn x : ℕ\nh :\n  (fun n => do\n        guard (n ≤ k)\n        unpaired\n            (fun a m => do\n              let x ← evaln (k + 1) cf (Nat.pair a m)\n              if x = 0 then pure m else evaln k (rfind' cf) (Nat.pair a (m + 1)))\n            n)\n      n =\n    some x\n⊢ (fun n => do\n        guard (n ≤ k₂)\n        unpaired\n            (fun a m => do\n              let x ← evaln (k₂ + 1) cf (Nat.pair a m)\n              if x = 0 then pure m else evaln k₂ (rfind' cf) (Nat.pair a (m + 1)))\n            n)\n      n =\n    some x\n[PROOFSTEP]\nrefine' this hl' (fun h => _) h\n[GOAL]\ncase zero\nk k₂ : ℕ\nc : Code\nn✝ x✝ : ℕ\nhl : k + 1 ≤ k₂ + 1\nhl' : k ≤ k₂\nthis :\n  ∀ {k k₂ n x : ℕ} {o₁ o₂ : Option ℕ},\n    k ≤ k₂ →\n      (x ∈ o₁ → x ∈ o₂) →\n        (x ∈ do\n            guard (n ≤ k)\n            o₁) →\n          x ∈ do\n            guard (n ≤ k₂)\n            o₂\nh✝¹ : evaln (k + 1) c n✝ = some x✝\nn x : ℕ\nh✝ :\n  (fun n => do\n        guard (n ≤ k)\n        pure 0)\n      n =\n    some x\nh : x ∈ pure 0\n⊢ x ∈ pure 0\ncase succ\nk k₂ : ℕ\nc : Code\nn✝ x✝ : ℕ\nhl : k + 1 ≤ k₂ + 1\nhl' : k ≤ k₂\nthis :\n  ∀ {k k₂ n x : ℕ} {o₁ o₂ : Option ℕ},\n    k ≤ k₂ →\n      (x ∈ o₁ → x ∈ o₂) →\n        (x ∈ do\n            guard (n ≤ k)\n            o₁) →\n          x ∈ do\n            guard (n ≤ k₂)\n            o₂\nh✝¹ : evaln (k + 1) c n✝ = some x✝\nn x : ℕ\nh✝ :\n  (fun n => do\n        guard (n ≤ k)\n        pure (Nat.succ n))\n      n =\n    some x\nh : x ∈ pure (Nat.succ n)\n⊢ x ∈ pure (Nat.succ n)\ncase left\nk k₂ : ℕ\nc : Code\nn✝ x✝ : ℕ\nhl : k + 1 ≤ k₂ + 1\nhl' : k ≤ k₂\nthis :\n  ∀ {k k₂ n x : ℕ} {o₁ o₂ : Option ℕ},\n    k ≤ k₂ →\n      (x ∈ o₁ → x ∈ o₂) →\n        (x ∈ do\n            guard (n ≤ k)\n            o₁) →\n          x ∈ do\n            guard (n ≤ k₂)\n            o₂\nh✝¹ : evaln (k + 1) c n✝ = some x✝\nn x : ℕ\nh✝ :\n  (fun n => do\n        guard (n ≤ k)\n        pure (unpair n).fst)\n      n =\n    some x\nh : x ∈ pure (unpair n).fst\n⊢ x ∈ pure (unpair n).fst\ncase right\nk k₂ : ℕ\nc : Code\nn✝ x✝ : ℕ\nhl : k + 1 ≤ k₂ + 1\nhl' : k ≤ k₂\nthis :\n  ∀ {k k₂ n x : ℕ} {o₁ o₂ : Option ℕ},\n    k ≤ k₂ →\n      (x ∈ o₁ → x ∈ o₂) →\n        (x ∈ do\n            guard (n ≤ k)\n            o₁) →\n          x ∈ do\n            guard (n ≤ k₂)\n            o₂\nh✝¹ : evaln (k + 1) c n✝ = some x✝\nn x : ℕ\nh✝ :\n  (fun n => do\n        guard (n ≤ k)\n        pure (unpair n).snd)\n      n =\n    some x\nh : x ∈ pure (unpair n).snd\n⊢ x ∈ pure (unpair n).snd\ncase pair\nk k₂ : ℕ\nc : Code\nn✝ x✝ : ℕ\nhl : k + 1 ≤ k₂ + 1\nhl' : k ≤ k₂\nthis :\n  ∀ {k k₂ n x : ℕ} {o₁ o₂ : Option ℕ},\n    k ≤ k₂ →\n      (x ∈ o₁ → x ∈ o₂) →\n        (x ∈ do\n            guard (n ≤ k)\n            o₁) →\n          x ∈ do\n            guard (n ≤ k₂)\n            o₂\nh✝¹ : evaln (k + 1) c n✝ = some x✝\ncf cg : Code\nhf : ∀ (n x : ℕ), evaln (k + 1) cf n = some x → evaln (k₂ + 1) cf n = some x\nhg : ∀ (n x : ℕ), evaln (k + 1) cg n = some x → evaln (k₂ + 1) cg n = some x\nn x : ℕ\nh✝ :\n  (fun n => do\n        guard (n ≤ k)\n        Seq.seq (Nat.pair <$> evaln (k + 1) cf n) fun x => evaln (k + 1) cg n)\n      n =\n    some x\nh : x ∈ Seq.seq (Nat.pair <$> evaln (k + 1) cf n) fun x => evaln (k + 1) cg n\n⊢ x ∈ Seq.seq (Nat.pair <$> evaln (k₂ + 1) cf n) fun x => evaln (k₂ + 1) cg n\ncase comp\nk k₂ : ℕ\nc : Code\nn✝ x✝ : ℕ\nhl : k + 1 ≤ k₂ + 1\nhl' : k ≤ k₂\nthis :\n  ∀ {k k₂ n x : ℕ} {o₁ o₂ : Option ℕ},\n    k ≤ k₂ →\n      (x ∈ o₁ → x ∈ o₂) →\n        (x ∈ do\n            guard (n ≤ k)\n            o₁) →\n          x ∈ do\n            guard (n ≤ k₂)\n            o₂\nh✝¹ : evaln (k + 1) c n✝ = some x✝\ncf cg : Code\nhf : ∀ (n x : ℕ), evaln (k + 1) cf n = some x → evaln (k₂ + 1) cf n = some x\nhg : ∀ (n x : ℕ), evaln (k + 1) cg n = some x → evaln (k₂ + 1) cg n = some x\nn x : ℕ\nh✝ :\n  (fun n => do\n        guard (n ≤ k)\n        let x ← evaln (k + 1) cg n\n        evaln (k + 1) cf x)\n      n =\n    some x\nh :\n  x ∈ do\n    let x ← evaln (k + 1) cg n\n    evaln (k + 1) cf x\n⊢ x ∈ do\n    let x ← evaln (k₂ + 1) cg n\n    evaln (k₂ + 1) cf x\ncase prec\nk k₂ : ℕ\nc : Code\nn✝ x✝ : ℕ\nhl : k + 1 ≤ k₂ + 1\nhl' : k ≤ k₂\nthis :\n  ∀ {k k₂ n x : ℕ} {o₁ o₂ : Option ℕ},\n    k ≤ k₂ →\n      (x ∈ o₁ → x ∈ o₂) →\n        (x ∈ do\n            guard (n ≤ k)\n            o₁) →\n          x ∈ do\n            guard (n ≤ k₂)\n            o₂\nh✝¹ : evaln (k + 1) c n✝ = some x✝\ncf cg : Code\nhf : ∀ (n x : ℕ), evaln (k + 1) cf n = some x → evaln (k₂ + 1) cf n = some x\nhg : ∀ (n x : ℕ), evaln (k + 1) cg n = some x → evaln (k₂ + 1) cg n = some x\nn x : ℕ\nh✝ :\n  (fun n => do\n        guard (n ≤ k)\n        unpaired\n            (fun a n =>\n              Nat.casesOn n (evaln (k + 1) cf a) fun y => do\n                let i ← evaln k (prec cf cg) (Nat.pair a y)\n                evaln (k + 1) cg (Nat.pair a (Nat.pair y i)))\n            n)\n      n =\n    some x\nh :\n  x ∈\n    unpaired\n      (fun a n =>\n        Nat.casesOn n (evaln (k + 1) cf a) fun y => do\n          let i ← evaln k (prec cf cg) (Nat.pair a y)\n          evaln (k + 1) cg (Nat.pair a (Nat.pair y i)))\n      n\n⊢ x ∈\n    unpaired\n      (fun a n =>\n        Nat.casesOn n (evaln (k₂ + 1) cf a) fun y => do\n          let i ← evaln k₂ (prec cf cg) (Nat.pair a y)\n          evaln (k₂ + 1) cg (Nat.pair a (Nat.pair y i)))\n      n\ncase rfind'\nk k₂ : ℕ\nc : Code\nn✝ x✝ : ℕ\nhl : k + 1 ≤ k₂ + 1\nhl' : k ≤ k₂\nthis :\n  ∀ {k k₂ n x : ℕ} {o₁ o₂ : Option ℕ},\n    k ≤ k₂ →\n      (x ∈ o₁ → x ∈ o₂) →\n        (x ∈ do\n            guard (n ≤ k)\n            o₁) →\n          x ∈ do\n            guard (n ≤ k₂)\n            o₂\nh✝¹ : evaln (k + 1) c n✝ = some x✝\ncf : Code\nhf : ∀ (n x : ℕ), evaln (k + 1) cf n = some x → evaln (k₂ + 1) cf n = some x\nn x : ℕ\nh✝ :\n  (fun n => do\n        guard (n ≤ k)\n        unpaired\n            (fun a m => do\n              let x ← evaln (k + 1) cf (Nat.pair a m)\n              if x = 0 then pure m else evaln k (rfind' cf) (Nat.pair a (m + 1)))\n            n)\n      n =\n    some x\nh :\n  x ∈\n    unpaired\n      (fun a m => do\n        let x ← evaln (k + 1) cf (Nat.pair a m)\n        if x = 0 then pure m else evaln k (rfind' cf) (Nat.pair a (m + 1)))\n      n\n⊢ x ∈\n    unpaired\n      (fun a m => do\n        let x ← evaln (k₂ + 1) cf (Nat.pair a m)\n        if x = 0 then pure m else evaln k₂ (rfind' cf) (Nat.pair a (m + 1)))\n      n\n[PROOFSTEP]\niterate 4 exact h\n[GOAL]\ncase zero\nk k₂ : ℕ\nc : Code\nn✝ x✝ : ℕ\nhl : k + 1 ≤ k₂ + 1\nhl' : k ≤ k₂\nthis :\n  ∀ {k k₂ n x : ℕ} {o₁ o₂ : Option ℕ},\n    k ≤ k₂ →\n      (x ∈ o₁ → x ∈ o₂) →\n        (x ∈ do\n            guard (n ≤ k)\n            o₁) →\n          x ∈ do\n            guard (n ≤ k₂)\n            o₂\nh✝¹ : evaln (k + 1) c n✝ = some x✝\nn x : ℕ\nh✝ :\n  (fun n => do\n        guard (n ≤ k)\n        pure 0)\n      n =\n    some x\nh : x ∈ pure 0\n⊢ x ∈ pure 0\ncase succ\nk k₂ : ℕ\nc : Code\nn✝ x✝ : ℕ\nhl : k + 1 ≤ k₂ + 1\nhl' : k ≤ k₂\nthis :\n  ∀ {k k₂ n x : ℕ} {o₁ o₂ : Option ℕ},\n    k ≤ k₂ →\n      (x ∈ o₁ → x ∈ o₂) →\n        (x ∈ do\n            guard (n ≤ k)\n            o₁) →\n          x ∈ do\n            guard (n ≤ k₂)\n            o₂\nh✝¹ : evaln (k + 1) c n✝ = some x✝\nn x : ℕ\nh✝ :\n  (fun n => do\n        guard (n ≤ k)\n        pure (Nat.succ n))\n      n =\n    some x\nh : x ∈ pure (Nat.succ n)\n⊢ x ∈ pure (Nat.succ n)\ncase left\nk k₂ : ℕ\nc : Code\nn✝ x✝ : ℕ\nhl : k + 1 ≤ k₂ + 1\nhl' : k ≤ k₂\nthis :\n  ∀ {k k₂ n x : ℕ} {o₁ o₂ : Option ℕ},\n    k ≤ k₂ →\n      (x ∈ o₁ → x ∈ o₂) →\n        (x ∈ do\n            guard (n ≤ k)\n            o₁) →\n          x ∈ do\n            guard (n ≤ k₂)\n            o₂\nh✝¹ : evaln (k + 1) c n✝ = some x✝\nn x : ℕ\nh✝ :\n  (fun n => do\n        guard (n ≤ k)\n        pure (unpair n).fst)\n      n =\n    some x\nh : x ∈ pure (unpair n).fst\n⊢ x ∈ pure (unpair n).fst\ncase right\nk k₂ : ℕ\nc : Code\nn✝ x✝ : ℕ\nhl : k + 1 ≤ k₂ + 1\nhl' : k ≤ k₂\nthis :\n  ∀ {k k₂ n x : ℕ} {o₁ o₂ : Option ℕ},\n    k ≤ k₂ →\n      (x ∈ o₁ → x ∈ o₂) →\n        (x ∈ do\n            guard (n ≤ k)\n            o₁) →\n          x ∈ do\n            guard (n ≤ k₂)\n            o₂\nh✝¹ : evaln (k + 1) c n✝ = some x✝\nn x : ℕ\nh✝ :\n  (fun n => do\n        guard (n ≤ k)\n        pure (unpair n).snd)\n      n =\n    some x\nh : x ∈ pure (unpair n).snd\n⊢ x ∈ pure (unpair n).snd\ncase pair\nk k₂ : ℕ\nc : Code\nn✝ x✝ : ℕ\nhl : k + 1 ≤ k₂ + 1\nhl' : k ≤ k₂\nthis :\n  ∀ {k k₂ n x : ℕ} {o₁ o₂ : Option ℕ},\n    k ≤ k₂ →\n      (x ∈ o₁ → x ∈ o₂) →\n        (x ∈ do\n            guard (n ≤ k)\n            o₁) →\n          x ∈ do\n            guard (n ≤ k₂)\n            o₂\nh✝¹ : evaln (k + 1) c n✝ = some x✝\ncf cg : Code\nhf : ∀ (n x : ℕ), evaln (k + 1) cf n = some x → evaln (k₂ + 1) cf n = some x\nhg : ∀ (n x : ℕ), evaln (k + 1) cg n = some x → evaln (k₂ + 1) cg n = some x\nn x : ℕ\nh✝ :\n  (fun n => do\n        guard (n ≤ k)\n        Seq.seq (Nat.pair <$> evaln (k + 1) cf n) fun x => evaln (k + 1) cg n)\n      n =\n    some x\nh : x ∈ Seq.seq (Nat.pair <$> evaln (k + 1) cf n) fun x => evaln (k + 1) cg n\n⊢ x ∈ Seq.seq (Nat.pair <$> evaln (k₂ + 1) cf n) fun x => evaln (k₂ + 1) cg n\ncase comp\nk k₂ : ℕ\nc : Code\nn✝ x✝ : ℕ\nhl : k + 1 ≤ k₂ + 1\nhl' : k ≤ k₂\nthis :\n  ∀ {k k₂ n x : ℕ} {o₁ o₂ : Option ℕ},\n    k ≤ k₂ →\n      (x ∈ o₁ → x ∈ o₂) →\n        (x ∈ do\n            guard (n ≤ k)\n            o₁) →\n          x ∈ do\n            guard (n ≤ k₂)\n            o₂\nh✝¹ : evaln (k + 1) c n✝ = some x✝\ncf cg : Code\nhf : ∀ (n x : ℕ), evaln (k + 1) cf n = some x → evaln (k₂ + 1) cf n = some x\nhg : ∀ (n x : ℕ), evaln (k + 1) cg n = some x → evaln (k₂ + 1) cg n = some x\nn x : ℕ\nh✝ :\n  (fun n => do\n        guard (n ≤ k)\n        let x ← evaln (k + 1) cg n\n        evaln (k + 1) cf x)\n      n =\n    some x\nh :\n  x ∈ do\n    let x ← evaln (k + 1) cg n\n    evaln (k + 1) cf x\n⊢ x ∈ do\n    let x ← evaln (k₂ + 1) cg n\n    evaln (k₂ + 1) cf x\ncase prec\nk k₂ : ℕ\nc : Code\nn✝ x✝ : ℕ\nhl : k + 1 ≤ k₂ + 1\nhl' : k ≤ k₂\nthis :\n  ∀ {k k₂ n x : ℕ} {o₁ o₂ : Option ℕ},\n    k ≤ k₂ →\n      (x ∈ o₁ → x ∈ o₂) →\n        (x ∈ do\n            guard (n ≤ k)\n            o₁) →\n          x ∈ do\n            guard (n ≤ k₂)\n            o₂\nh✝¹ : evaln (k + 1) c n✝ = some x✝\ncf cg : Code\nhf : ∀ (n x : ℕ), evaln (k + 1) cf n = some x → evaln (k₂ + 1) cf n = some x\nhg : ∀ (n x : ℕ), evaln (k + 1) cg n = some x → evaln (k₂ + 1) cg n = some x\nn x : ℕ\nh✝ :\n  (fun n => do\n        guard (n ≤ k)\n        unpaired\n            (fun a n =>\n              Nat.casesOn n (evaln (k + 1) cf a) fun y => do\n                let i ← evaln k (prec cf cg) (Nat.pair a y)\n                evaln (k + 1) cg (Nat.pair a (Nat.pair y i)))\n            n)\n      n =\n    some x\nh :\n  x ∈\n    unpaired\n      (fun a n =>\n        Nat.casesOn n (evaln (k + 1) cf a) fun y => do\n          let i ← evaln k (prec cf cg) (Nat.pair a y)\n          evaln (k + 1) cg (Nat.pair a (Nat.pair y i)))\n      n\n⊢ x ∈\n    unpaired\n      (fun a n =>\n        Nat.casesOn n (evaln (k₂ + 1) cf a) fun y => do\n          let i ← evaln k₂ (prec cf cg) (Nat.pair a y)\n          evaln (k₂ + 1) cg (Nat.pair a (Nat.pair y i)))\n      n\ncase rfind'\nk k₂ : ℕ\nc : Code\nn✝ x✝ : ℕ\nhl : k + 1 ≤ k₂ + 1\nhl' : k ≤ k₂\nthis :\n  ∀ {k k₂ n x : ℕ} {o₁ o₂ : Option ℕ},\n    k ≤ k₂ →\n      (x ∈ o₁ → x ∈ o₂) →\n        (x ∈ do\n            guard (n ≤ k)\n            o₁) →\n          x ∈ do\n            guard (n ≤ k₂)\n            o₂\nh✝¹ : evaln (k + 1) c n✝ = some x✝\ncf : Code\nhf : ∀ (n x : ℕ), evaln (k + 1) cf n = some x → evaln (k₂ + 1) cf n = some x\nn x : ℕ\nh✝ :\n  (fun n => do\n        guard (n ≤ k)\n        unpaired\n            (fun a m => do\n              let x ← evaln (k + 1) cf (Nat.pair a m)\n              if x = 0 then pure m else evaln k (rfind' cf) (Nat.pair a (m + 1)))\n            n)\n      n =\n    some x\nh :\n  x ∈\n    unpaired\n      (fun a m => do\n        let x ← evaln (k + 1) cf (Nat.pair a m)\n        if x = 0 then pure m else evaln k (rfind' cf) (Nat.pair a (m + 1)))\n      n\n⊢ x ∈\n    unpaired\n      (fun a m => do\n        let x ← evaln (k₂ + 1) cf (Nat.pair a m)\n        if x = 0 then pure m else evaln k₂ (rfind' cf) (Nat.pair a (m + 1)))\n      n\n[PROOFSTEP]\nexact h\n[GOAL]\ncase succ\nk k₂ : ℕ\nc : Code\nn✝ x✝ : ℕ\nhl : k + 1 ≤ k₂ + 1\nhl' : k ≤ k₂\nthis :\n  ∀ {k k₂ n x : ℕ} {o₁ o₂ : Option ℕ},\n    k ≤ k₂ →\n      (x ∈ o₁ → x ∈ o₂) →\n        (x ∈ do\n            guard (n ≤ k)\n            o₁) →\n          x ∈ do\n            guard (n ≤ k₂)\n            o₂\nh✝¹ : evaln (k + 1) c n✝ = some x✝\nn x : ℕ\nh✝ :\n  (fun n => do\n        guard (n ≤ k)\n        pure (Nat.succ n))\n      n =\n    some x\nh : x ∈ pure (Nat.succ n)\n⊢ x ∈ pure (Nat.succ n)\ncase left\nk k₂ : ℕ\nc : Code\nn✝ x✝ : ℕ\nhl : k + 1 ≤ k₂ + 1\nhl' : k ≤ k₂\nthis :\n  ∀ {k k₂ n x : ℕ} {o₁ o₂ : Option ℕ},\n    k ≤ k₂ →\n      (x ∈ o₁ → x ∈ o₂) →\n        (x ∈ do\n            guard (n ≤ k)\n            o₁) →\n          x ∈ do\n            guard (n ≤ k₂)\n            o₂\nh✝¹ : evaln (k + 1) c n✝ = some x✝\nn x : ℕ\nh✝ :\n  (fun n => do\n        guard (n ≤ k)\n        pure (unpair n).fst)\n      n =\n    some x\nh : x ∈ pure (unpair n).fst\n⊢ x ∈ pure (unpair n).fst\ncase right\nk k₂ : ℕ\nc : Code\nn✝ x✝ : ℕ\nhl : k + 1 ≤ k₂ + 1\nhl' : k ≤ k₂\nthis :\n  ∀ {k k₂ n x : ℕ} {o₁ o₂ : Option ℕ},\n    k ≤ k₂ →\n      (x ∈ o₁ → x ∈ o₂) →\n        (x ∈ do\n            guard (n ≤ k)\n            o₁) →\n          x ∈ do\n            guard (n ≤ k₂)\n            o₂\nh✝¹ : evaln (k + 1) c n✝ = some x✝\nn x : ℕ\nh✝ :\n  (fun n => do\n        guard (n ≤ k)\n        pure (unpair n).snd)\n      n =\n    some x\nh : x ∈ pure (unpair n).snd\n⊢ x ∈ pure (unpair n).snd\ncase pair\nk k₂ : ℕ\nc : Code\nn✝ x✝ : ℕ\nhl : k + 1 ≤ k₂ + 1\nhl' : k ≤ k₂\nthis :\n  ∀ {k k₂ n x : ℕ} {o₁ o₂ : Option ℕ},\n    k ≤ k₂ →\n      (x ∈ o₁ → x ∈ o₂) →\n        (x ∈ do\n            guard (n ≤ k)\n            o₁) →\n          x ∈ do\n            guard (n ≤ k₂)\n            o₂\nh✝¹ : evaln (k + 1) c n✝ = some x✝\ncf cg : Code\nhf : ∀ (n x : ℕ), evaln (k + 1) cf n = some x → evaln (k₂ + 1) cf n = some x\nhg : ∀ (n x : ℕ), evaln (k + 1) cg n = some x → evaln (k₂ + 1) cg n = some x\nn x : ℕ\nh✝ :\n  (fun n => do\n        guard (n ≤ k)\n        Seq.seq (Nat.pair <$> evaln (k + 1) cf n) fun x => evaln (k + 1) cg n)\n      n =\n    some x\nh : x ∈ Seq.seq (Nat.pair <$> evaln (k + 1) cf n) fun x => evaln (k + 1) cg n\n⊢ x ∈ Seq.seq (Nat.pair <$> evaln (k₂ + 1) cf n) fun x => evaln (k₂ + 1) cg n\ncase comp\nk k₂ : ℕ\nc : Code\nn✝ x✝ : ℕ\nhl : k + 1 ≤ k₂ + 1\nhl' : k ≤ k₂\nthis :\n  ∀ {k k₂ n x : ℕ} {o₁ o₂ : Option ℕ},\n    k ≤ k₂ →\n      (x ∈ o₁ → x ∈ o₂) →\n        (x ∈ do\n            guard (n ≤ k)\n            o₁) →\n          x ∈ do\n            guard (n ≤ k₂)\n            o₂\nh✝¹ : evaln (k + 1) c n✝ = some x✝\ncf cg : Code\nhf : ∀ (n x : ℕ), evaln (k + 1) cf n = some x → evaln (k₂ + 1) cf n = some x\nhg : ∀ (n x : ℕ), evaln (k + 1) cg n = some x → evaln (k₂ + 1) cg n = some x\nn x : ℕ\nh✝ :\n  (fun n => do\n        guard (n ≤ k)\n        let x ← evaln (k + 1) cg n\n        evaln (k + 1) cf x)\n      n =\n    some x\nh :\n  x ∈ do\n    let x ← evaln (k + 1) cg n\n    evaln (k + 1) cf x\n⊢ x ∈ do\n    let x ← evaln (k₂ + 1) cg n\n    evaln (k₂ + 1) cf x\ncase prec\nk k₂ : ℕ\nc : Code\nn✝ x✝ : ℕ\nhl : k + 1 ≤ k₂ + 1\nhl' : k ≤ k₂\nthis :\n  ∀ {k k₂ n x : ℕ} {o₁ o₂ : Option ℕ},\n    k ≤ k₂ →\n      (x ∈ o₁ → x ∈ o₂) →\n        (x ∈ do\n            guard (n ≤ k)\n            o₁) →\n          x ∈ do\n            guard (n ≤ k₂)\n            o₂\nh✝¹ : evaln (k + 1) c n✝ = some x✝\ncf cg : Code\nhf : ∀ (n x : ℕ), evaln (k + 1) cf n = some x → evaln (k₂ + 1) cf n = some x\nhg : ∀ (n x : ℕ), evaln (k + 1) cg n = some x → evaln (k₂ + 1) cg n = some x\nn x : ℕ\nh✝ :\n  (fun n => do\n        guard (n ≤ k)\n        unpaired\n            (fun a n =>\n              Nat.casesOn n (evaln (k + 1) cf a) fun y => do\n                let i ← evaln k (prec cf cg) (Nat.pair a y)\n                evaln (k + 1) cg (Nat.pair a (Nat.pair y i)))\n            n)\n      n =\n    some x\nh :\n  x ∈\n    unpaired\n      (fun a n =>\n        Nat.casesOn n (evaln (k + 1) cf a) fun y => do\n          let i ← evaln k (prec cf cg) (Nat.pair a y)\n          evaln (k + 1) cg (Nat.pair a (Nat.pair y i)))\n      n\n⊢ x ∈\n    unpaired\n      (fun a n =>\n        Nat.casesOn n (evaln (k₂ + 1) cf a) fun y => do\n          let i ← evaln k₂ (prec cf cg) (Nat.pair a y)\n          evaln (k₂ + 1) cg (Nat.pair a (Nat.pair y i)))\n      n\ncase rfind'\nk k₂ : ℕ\nc : Code\nn✝ x✝ : ℕ\nhl : k + 1 ≤ k₂ + 1\nhl' : k ≤ k₂\nthis :\n  ∀ {k k₂ n x : ℕ} {o₁ o₂ : Option ℕ},\n    k ≤ k₂ →\n      (x ∈ o₁ → x ∈ o₂) →\n        (x ∈ do\n            guard (n ≤ k)\n            o₁) →\n          x ∈ do\n            guard (n ≤ k₂)\n            o₂\nh✝¹ : evaln (k + 1) c n✝ = some x✝\ncf : Code\nhf : ∀ (n x : ℕ), evaln (k + 1) cf n = some x → evaln (k₂ + 1) cf n = some x\nn x : ℕ\nh✝ :\n  (fun n => do\n        guard (n ≤ k)\n        unpaired\n            (fun a m => do\n              let x ← evaln (k + 1) cf (Nat.pair a m)\n              if x = 0 then pure m else evaln k (rfind' cf) (Nat.pair a (m + 1)))\n            n)\n      n =\n    some x\nh :\n  x ∈\n    unpaired\n      (fun a m => do\n        let x ← evaln (k + 1) cf (Nat.pair a m)\n        if x = 0 then pure m else evaln k (rfind' cf) (Nat.pair a (m + 1)))\n      n\n⊢ x ∈\n    unpaired\n      (fun a m => do\n        let x ← evaln (k₂ + 1) cf (Nat.pair a m)\n        if x = 0 then pure m else evaln k₂ (rfind' cf) (Nat.pair a (m + 1)))\n      n\n[PROOFSTEP]\nexact h\n[GOAL]\ncase left\nk k₂ : ℕ\nc : Code\nn✝ x✝ : ℕ\nhl : k + 1 ≤ k₂ + 1\nhl' : k ≤ k₂\nthis :\n  ∀ {k k₂ n x : ℕ} {o₁ o₂ : Option ℕ},\n    k ≤ k₂ →\n      (x ∈ o₁ → x ∈ o₂) →\n        (x ∈ do\n            guard (n ≤ k)\n            o₁) →\n          x ∈ do\n            guard (n ≤ k₂)\n            o₂\nh✝¹ : evaln (k + 1) c n✝ = some x✝\nn x : ℕ\nh✝ :\n  (fun n => do\n        guard (n ≤ k)\n        pure (unpair n).fst)\n      n =\n    some x\nh : x ∈ pure (unpair n).fst\n⊢ x ∈ pure (unpair n).fst\ncase right\nk k₂ : ℕ\nc : Code\nn✝ x✝ : ℕ\nhl : k + 1 ≤ k₂ + 1\nhl' : k ≤ k₂\nthis :\n  ∀ {k k₂ n x : ℕ} {o₁ o₂ : Option ℕ},\n    k ≤ k₂ →\n      (x ∈ o₁ → x ∈ o₂) →\n        (x ∈ do\n            guard (n ≤ k)\n            o₁) →\n          x ∈ do\n            guard (n ≤ k₂)\n            o₂\nh✝¹ : evaln (k + 1) c n✝ = some x✝\nn x : ℕ\nh✝ :\n  (fun n => do\n        guard (n ≤ k)\n        pure (unpair n).snd)\n      n =\n    some x\nh : x ∈ pure (unpair n).snd\n⊢ x ∈ pure (unpair n).snd\ncase pair\nk k₂ : ℕ\nc : Code\nn✝ x✝ : ℕ\nhl : k + 1 ≤ k₂ + 1\nhl' : k ≤ k₂\nthis :\n  ∀ {k k₂ n x : ℕ} {o₁ o₂ : Option ℕ},\n    k ≤ k₂ →\n      (x ∈ o₁ → x ∈ o₂) →\n        (x ∈ do\n            guard (n ≤ k)\n            o₁) →\n          x ∈ do\n            guard (n ≤ k₂)\n            o₂\nh✝¹ : evaln (k + 1) c n✝ = some x✝\ncf cg : Code\nhf : ∀ (n x : ℕ), evaln (k + 1) cf n = some x → evaln (k₂ + 1) cf n = some x\nhg : ∀ (n x : ℕ), evaln (k + 1) cg n = some x → evaln (k₂ + 1) cg n = some x\nn x : ℕ\nh✝ :\n  (fun n => do\n        guard (n ≤ k)\n        Seq.seq (Nat.pair <$> evaln (k + 1) cf n) fun x => evaln (k + 1) cg n)\n      n =\n    some x\nh : x ∈ Seq.seq (Nat.pair <$> evaln (k + 1) cf n) fun x => evaln (k + 1) cg n\n⊢ x ∈ Seq.seq (Nat.pair <$> evaln (k₂ + 1) cf n) fun x => evaln (k₂ + 1) cg n\ncase comp\nk k₂ : ℕ\nc : Code\nn✝ x✝ : ℕ\nhl : k + 1 ≤ k₂ + 1\nhl' : k ≤ k₂\nthis :\n  ∀ {k k₂ n x : ℕ} {o₁ o₂ : Option ℕ},\n    k ≤ k₂ →\n      (x ∈ o₁ → x ∈ o₂) →\n        (x ∈ do\n            guard (n ≤ k)\n            o₁) →\n          x ∈ do\n            guard (n ≤ k₂)\n            o₂\nh✝¹ : evaln (k + 1) c n✝ = some x✝\ncf cg : Code\nhf : ∀ (n x : ℕ), evaln (k + 1) cf n = some x → evaln (k₂ + 1) cf n = some x\nhg : ∀ (n x : ℕ), evaln (k + 1) cg n = some x → evaln (k₂ + 1) cg n = some x\nn x : ℕ\nh✝ :\n  (fun n => do\n        guard (n ≤ k)\n        let x ← evaln (k + 1) cg n\n        evaln (k + 1) cf x)\n      n =\n    some x\nh :\n  x ∈ do\n    let x ← evaln (k + 1) cg n\n    evaln (k + 1) cf x\n⊢ x ∈ do\n    let x ← evaln (k₂ + 1) cg n\n    evaln (k₂ + 1) cf x\ncase prec\nk k₂ : ℕ\nc : Code\nn✝ x✝ : ℕ\nhl : k + 1 ≤ k₂ + 1\nhl' : k ≤ k₂\nthis :\n  ∀ {k k₂ n x : ℕ} {o₁ o₂ : Option ℕ},\n    k ≤ k₂ →\n      (x ∈ o₁ → x ∈ o₂) →\n        (x ∈ do\n            guard (n ≤ k)\n            o₁) →\n          x ∈ do\n            guard (n ≤ k₂)\n            o₂\nh✝¹ : evaln (k + 1) c n✝ = some x✝\ncf cg : Code\nhf : ∀ (n x : ℕ), evaln (k + 1) cf n = some x → evaln (k₂ + 1) cf n = some x\nhg : ∀ (n x : ℕ), evaln (k + 1) cg n = some x → evaln (k₂ + 1) cg n = some x\nn x : ℕ\nh✝ :\n  (fun n => do\n        guard (n ≤ k)\n        unpaired\n            (fun a n =>\n              Nat.casesOn n (evaln (k + 1) cf a) fun y => do\n                let i ← evaln k (prec cf cg) (Nat.pair a y)\n                evaln (k + 1) cg (Nat.pair a (Nat.pair y i)))\n            n)\n      n =\n    some x\nh :\n  x ∈\n    unpaired\n      (fun a n =>\n        Nat.casesOn n (evaln (k + 1) cf a) fun y => do\n          let i ← evaln k (prec cf cg) (Nat.pair a y)\n          evaln (k + 1) cg (Nat.pair a (Nat.pair y i)))\n      n\n⊢ x ∈\n    unpaired\n      (fun a n =>\n        Nat.casesOn n (evaln (k₂ + 1) cf a) fun y => do\n          let i ← evaln k₂ (prec cf cg) (Nat.pair a y)\n          evaln (k₂ + 1) cg (Nat.pair a (Nat.pair y i)))\n      n\ncase rfind'\nk k₂ : ℕ\nc : Code\nn✝ x✝ : ℕ\nhl : k + 1 ≤ k₂ + 1\nhl' : k ≤ k₂\nthis :\n  ∀ {k k₂ n x : ℕ} {o₁ o₂ : Option ℕ},\n    k ≤ k₂ →\n      (x ∈ o₁ → x ∈ o₂) →\n        (x ∈ do\n            guard (n ≤ k)\n            o₁) →\n          x ∈ do\n            guard (n ≤ k₂)\n            o₂\nh✝¹ : evaln (k + 1) c n✝ = some x✝\ncf : Code\nhf : ∀ (n x : ℕ), evaln (k + 1) cf n = some x → evaln (k₂ + 1) cf n = some x\nn x : ℕ\nh✝ :\n  (fun n => do\n        guard (n ≤ k)\n        unpaired\n            (fun a m => do\n              let x ← evaln (k + 1) cf (Nat.pair a m)\n              if x = 0 then pure m else evaln k (rfind' cf) (Nat.pair a (m + 1)))\n            n)\n      n =\n    some x\nh :\n  x ∈\n    unpaired\n      (fun a m => do\n        let x ← evaln (k + 1) cf (Nat.pair a m)\n        if x = 0 then pure m else evaln k (rfind' cf) (Nat.pair a (m + 1)))\n      n\n⊢ x ∈\n    unpaired\n      (fun a m => do\n        let x ← evaln (k₂ + 1) cf (Nat.pair a m)\n        if x = 0 then pure m else evaln k₂ (rfind' cf) (Nat.pair a (m + 1)))\n      n\n[PROOFSTEP]\nexact h\n[GOAL]\ncase right\nk k₂ : ℕ\nc : Code\nn✝ x✝ : ℕ\nhl : k + 1 ≤ k₂ + 1\nhl' : k ≤ k₂\nthis :\n  ∀ {k k₂ n x : ℕ} {o₁ o₂ : Option ℕ},\n    k ≤ k₂ →\n      (x ∈ o₁ → x ∈ o₂) →\n        (x ∈ do\n            guard (n ≤ k)\n            o₁) →\n          x ∈ do\n            guard (n ≤ k₂)\n            o₂\nh✝¹ : evaln (k + 1) c n✝ = some x✝\nn x : ℕ\nh✝ :\n  (fun n => do\n        guard (n ≤ k)\n        pure (unpair n).snd)\n      n =\n    some x\nh : x ∈ pure (unpair n).snd\n⊢ x ∈ pure (unpair n).snd\ncase pair\nk k₂ : ℕ\nc : Code\nn✝ x✝ : ℕ\nhl : k + 1 ≤ k₂ + 1\nhl' : k ≤ k₂\nthis :\n  ∀ {k k₂ n x : ℕ} {o₁ o₂ : Option ℕ},\n    k ≤ k₂ →\n      (x ∈ o₁ → x ∈ o₂) →\n        (x ∈ do\n            guard (n ≤ k)\n            o₁) →\n          x ∈ do\n            guard (n ≤ k₂)\n            o₂\nh✝¹ : evaln (k + 1) c n✝ = some x✝\ncf cg : Code\nhf : ∀ (n x : ℕ), evaln (k + 1) cf n = some x → evaln (k₂ + 1) cf n = some x\nhg : ∀ (n x : ℕ), evaln (k + 1) cg n = some x → evaln (k₂ + 1) cg n = some x\nn x : ℕ\nh✝ :\n  (fun n => do\n        guard (n ≤ k)\n        Seq.seq (Nat.pair <$> evaln (k + 1) cf n) fun x => evaln (k + 1) cg n)\n      n =\n    some x\nh : x ∈ Seq.seq (Nat.pair <$> evaln (k + 1) cf n) fun x => evaln (k + 1) cg n\n⊢ x ∈ Seq.seq (Nat.pair <$> evaln (k₂ + 1) cf n) fun x => evaln (k₂ + 1) cg n\ncase comp\nk k₂ : ℕ\nc : Code\nn✝ x✝ : ℕ\nhl : k + 1 ≤ k₂ + 1\nhl' : k ≤ k₂\nthis :\n  ∀ {k k₂ n x : ℕ} {o₁ o₂ : Option ℕ},\n    k ≤ k₂ →\n      (x ∈ o₁ → x ∈ o₂) →\n        (x ∈ do\n            guard (n ≤ k)\n            o₁) →\n          x ∈ do\n            guard (n ≤ k₂)\n            o₂\nh✝¹ : evaln (k + 1) c n✝ = some x✝\ncf cg : Code\nhf : ∀ (n x : ℕ), evaln (k + 1) cf n = some x → evaln (k₂ + 1) cf n = some x\nhg : ∀ (n x : ℕ), evaln (k + 1) cg n = some x → evaln (k₂ + 1) cg n = some x\nn x : ℕ\nh✝ :\n  (fun n => do\n        guard (n ≤ k)\n        let x ← evaln (k + 1) cg n\n        evaln (k + 1) cf x)\n      n =\n    some x\nh :\n  x ∈ do\n    let x ← evaln (k + 1) cg n\n    evaln (k + 1) cf x\n⊢ x ∈ do\n    let x ← evaln (k₂ + 1) cg n\n    evaln (k₂ + 1) cf x\ncase prec\nk k₂ : ℕ\nc : Code\nn✝ x✝ : ℕ\nhl : k + 1 ≤ k₂ + 1\nhl' : k ≤ k₂\nthis :\n  ∀ {k k₂ n x : ℕ} {o₁ o₂ : Option ℕ},\n    k ≤ k₂ →\n      (x ∈ o₁ → x ∈ o₂) →\n        (x ∈ do\n            guard (n ≤ k)\n            o₁) →\n          x ∈ do\n            guard (n ≤ k₂)\n            o₂\nh✝¹ : evaln (k + 1) c n✝ = some x✝\ncf cg : Code\nhf : ∀ (n x : ℕ), evaln (k + 1) cf n = some x → evaln (k₂ + 1) cf n = some x\nhg : ∀ (n x : ℕ), evaln (k + 1) cg n = some x → evaln (k₂ + 1) cg n = some x\nn x : ℕ\nh✝ :\n  (fun n => do\n        guard (n ≤ k)\n        unpaired\n            (fun a n =>\n              Nat.casesOn n (evaln (k + 1) cf a) fun y => do\n                let i ← evaln k (prec cf cg) (Nat.pair a y)\n                evaln (k + 1) cg (Nat.pair a (Nat.pair y i)))\n            n)\n      n =\n    some x\nh :\n  x ∈\n    unpaired\n      (fun a n =>\n        Nat.casesOn n (evaln (k + 1) cf a) fun y => do\n          let i ← evaln k (prec cf cg) (Nat.pair a y)\n          evaln (k + 1) cg (Nat.pair a (Nat.pair y i)))\n      n\n⊢ x ∈\n    unpaired\n      (fun a n =>\n        Nat.casesOn n (evaln (k₂ + 1) cf a) fun y => do\n          let i ← evaln k₂ (prec cf cg) (Nat.pair a y)\n          evaln (k₂ + 1) cg (Nat.pair a (Nat.pair y i)))\n      n\ncase rfind'\nk k₂ : ℕ\nc : Code\nn✝ x✝ : ℕ\nhl : k + 1 ≤ k₂ + 1\nhl' : k ≤ k₂\nthis :\n  ∀ {k k₂ n x : ℕ} {o₁ o₂ : Option ℕ},\n    k ≤ k₂ →\n      (x ∈ o₁ → x ∈ o₂) →\n        (x ∈ do\n            guard (n ≤ k)\n            o₁) →\n          x ∈ do\n            guard (n ≤ k₂)\n            o₂\nh✝¹ : evaln (k + 1) c n✝ = some x✝\ncf : Code\nhf : ∀ (n x : ℕ), evaln (k + 1) cf n = some x → evaln (k₂ + 1) cf n = some x\nn x : ℕ\nh✝ :\n  (fun n => do\n        guard (n ≤ k)\n        unpaired\n            (fun a m => do\n              let x ← evaln (k + 1) cf (Nat.pair a m)\n              if x = 0 then pure m else evaln k (rfind' cf) (Nat.pair a (m + 1)))\n            n)\n      n =\n    some x\nh :\n  x ∈\n    unpaired\n      (fun a m => do\n        let x ← evaln (k + 1) cf (Nat.pair a m)\n        if x = 0 then pure m else evaln k (rfind' cf) (Nat.pair a (m + 1)))\n      n\n⊢ x ∈\n    unpaired\n      (fun a m => do\n        let x ← evaln (k₂ + 1) cf (Nat.pair a m)\n        if x = 0 then pure m else evaln k₂ (rfind' cf) (Nat.pair a (m + 1)))\n      n\n[PROOFSTEP]\nexact h\n[GOAL]\ncase pair\nk k₂ : ℕ\nc : Code\nn✝ x✝ : ℕ\nhl : k + 1 ≤ k₂ + 1\nhl' : k ≤ k₂\nthis :\n  ∀ {k k₂ n x : ℕ} {o₁ o₂ : Option ℕ},\n    k ≤ k₂ →\n      (x ∈ o₁ → x ∈ o₂) →\n        (x ∈ do\n            guard (n ≤ k)\n            o₁) →\n          x ∈ do\n            guard (n ≤ k₂)\n            o₂\nh✝¹ : evaln (k + 1) c n✝ = some x✝\ncf cg : Code\nhf : ∀ (n x : ℕ), evaln (k + 1) cf n = some x → evaln (k₂ + 1) cf n = some x\nhg : ∀ (n x : ℕ), evaln (k + 1) cg n = some x → evaln (k₂ + 1) cg n = some x\nn x : ℕ\nh✝ :\n  (fun n => do\n        guard (n ≤ k)\n        Seq.seq (Nat.pair <$> evaln (k + 1) cf n) fun x => evaln (k + 1) cg n)\n      n =\n    some x\nh : x ∈ Seq.seq (Nat.pair <$> evaln (k + 1) cf n) fun x => evaln (k + 1) cg n\n⊢ x ∈ Seq.seq (Nat.pair <$> evaln (k₂ + 1) cf n) fun x => evaln (k₂ + 1) cg n\n[PROOFSTEP]\nsimp [Seq.seq] at h ⊢\n[GOAL]\ncase pair\nk k₂ : ℕ\nc : Code\nn✝ x✝ : ℕ\nhl : k + 1 ≤ k₂ + 1\nhl' : k ≤ k₂\nthis :\n  ∀ {k k₂ n x : ℕ} {o₁ o₂ : Option ℕ},\n    k ≤ k₂ →\n      (x ∈ o₁ → x ∈ o₂) →\n        (x ∈ do\n            guard (n ≤ k)\n            o₁) →\n          x ∈ do\n            guard (n ≤ k₂)\n            o₂\nh✝¹ : evaln (k + 1) c n✝ = some x✝\ncf cg : Code\nhf : ∀ (n x : ℕ), evaln (k + 1) cf n = some x → evaln (k₂ + 1) cf n = some x\nhg : ∀ (n x : ℕ), evaln (k + 1) cg n = some x → evaln (k₂ + 1) cg n = some x\nn x : ℕ\nh✝ :\n  (fun n => do\n        guard (n ≤ k)\n        Seq.seq (Nat.pair <$> evaln (k + 1) cf n) fun x => evaln (k + 1) cg n)\n      n =\n    some x\nh : ∃ a, evaln (k + 1) cf n = some a ∧ ∃ a_1, evaln (k + 1) cg n = some a_1 ∧ Nat.pair a a_1 = x\n⊢ ∃ a, evaln (k₂ + 1) cf n = some a ∧ ∃ a_1, evaln (k₂ + 1) cg n = some a_1 ∧ Nat.pair a a_1 = x\n[PROOFSTEP]\nexact h.imp fun a => And.imp (hf _ _) <| Exists.imp fun b => And.imp_left (hg _ _)\n[GOAL]\ncase comp\nk k₂ : ℕ\nc : Code\nn✝ x✝ : ℕ\nhl : k + 1 ≤ k₂ + 1\nhl' : k ≤ k₂\nthis :\n  ∀ {k k₂ n x : ℕ} {o₁ o₂ : Option ℕ},\n    k ≤ k₂ →\n      (x ∈ o₁ → x ∈ o₂) →\n        (x ∈ do\n            guard (n ≤ k)\n            o₁) →\n          x ∈ do\n            guard (n ≤ k₂)\n            o₂\nh✝¹ : evaln (k + 1) c n✝ = some x✝\ncf cg : Code\nhf : ∀ (n x : ℕ), evaln (k + 1) cf n = some x → evaln (k₂ + 1) cf n = some x\nhg : ∀ (n x : ℕ), evaln (k + 1) cg n = some x → evaln (k₂ + 1) cg n = some x\nn x : ℕ\nh✝ :\n  (fun n => do\n        guard (n ≤ k)\n        let x ← evaln (k + 1) cg n\n        evaln (k + 1) cf x)\n      n =\n    some x\nh :\n  x ∈ do\n    let x ← evaln (k + 1) cg n\n    evaln (k + 1) cf x\n⊢ x ∈ do\n    let x ← evaln (k₂ + 1) cg n\n    evaln (k₂ + 1) cf x\n[PROOFSTEP]\nsimp [Bind.bind] at h ⊢\n[GOAL]\ncase comp\nk k₂ : ℕ\nc : Code\nn✝ x✝ : ℕ\nhl : k + 1 ≤ k₂ + 1\nhl' : k ≤ k₂\nthis :\n  ∀ {k k₂ n x : ℕ} {o₁ o₂ : Option ℕ},\n    k ≤ k₂ →\n      (x ∈ o₁ → x ∈ o₂) →\n        (x ∈ do\n            guard (n ≤ k)\n            o₁) →\n          x ∈ do\n            guard (n ≤ k₂)\n            o₂\nh✝¹ : evaln (k + 1) c n✝ = some x✝\ncf cg : Code\nhf : ∀ (n x : ℕ), evaln (k + 1) cf n = some x → evaln (k₂ + 1) cf n = some x\nhg : ∀ (n x : ℕ), evaln (k + 1) cg n = some x → evaln (k₂ + 1) cg n = some x\nn x : ℕ\nh✝ :\n  (fun n => do\n        guard (n ≤ k)\n        let x ← evaln (k + 1) cg n\n        evaln (k + 1) cf x)\n      n =\n    some x\nh : ∃ a, evaln (k + 1) cg n = some a ∧ evaln (k + 1) cf a = some x\n⊢ ∃ a, evaln (k₂ + 1) cg n = some a ∧ evaln (k₂ + 1) cf a = some x\n[PROOFSTEP]\nexact h.imp fun a => And.imp (hg _ _) (hf _ _)\n[GOAL]\ncase prec\nk k₂ : ℕ\nc : Code\nn✝ x✝ : ℕ\nhl : k + 1 ≤ k₂ + 1\nhl' : k ≤ k₂\nthis :\n  ∀ {k k₂ n x : ℕ} {o₁ o₂ : Option ℕ},\n    k ≤ k₂ →\n      (x ∈ o₁ → x ∈ o₂) →\n        (x ∈ do\n            guard (n ≤ k)\n            o₁) →\n          x ∈ do\n            guard (n ≤ k₂)\n            o₂\nh✝¹ : evaln (k + 1) c n✝ = some x✝\ncf cg : Code\nhf : ∀ (n x : ℕ), evaln (k + 1) cf n = some x → evaln (k₂ + 1) cf n = some x\nhg : ∀ (n x : ℕ), evaln (k + 1) cg n = some x → evaln (k₂ + 1) cg n = some x\nn x : ℕ\nh✝ :\n  (fun n => do\n        guard (n ≤ k)\n        unpaired\n            (fun a n =>\n              Nat.casesOn n (evaln (k + 1) cf a) fun y => do\n                let i ← evaln k (prec cf cg) (Nat.pair a y)\n                evaln (k + 1) cg (Nat.pair a (Nat.pair y i)))\n            n)\n      n =\n    some x\nh :\n  x ∈\n    unpaired\n      (fun a n =>\n        Nat.casesOn n (evaln (k + 1) cf a) fun y => do\n          let i ← evaln k (prec cf cg) (Nat.pair a y)\n          evaln (k + 1) cg (Nat.pair a (Nat.pair y i)))\n      n\n⊢ x ∈\n    unpaired\n      (fun a n =>\n        Nat.casesOn n (evaln (k₂ + 1) cf a) fun y => do\n          let i ← evaln k₂ (prec cf cg) (Nat.pair a y)\n          evaln (k₂ + 1) cg (Nat.pair a (Nat.pair y i)))\n      n\n[PROOFSTEP]\nrevert h\n[GOAL]\ncase prec\nk k₂ : ℕ\nc : Code\nn✝ x✝ : ℕ\nhl : k + 1 ≤ k₂ + 1\nhl' : k ≤ k₂\nthis :\n  ∀ {k k₂ n x : ℕ} {o₁ o₂ : Option ℕ},\n    k ≤ k₂ →\n      (x ∈ o₁ → x ∈ o₂) →\n        (x ∈ do\n            guard (n ≤ k)\n            o₁) →\n          x ∈ do\n            guard (n ≤ k₂)\n            o₂\nh✝ : evaln (k + 1) c n✝ = some x✝\ncf cg : Code\nhf : ∀ (n x : ℕ), evaln (k + 1) cf n = some x → evaln (k₂ + 1) cf n = some x\nhg : ∀ (n x : ℕ), evaln (k + 1) cg n = some x → evaln (k₂ + 1) cg n = some x\nn x : ℕ\nh :\n  (fun n => do\n        guard (n ≤ k)\n        unpaired\n            (fun a n =>\n              Nat.casesOn n (evaln (k + 1) cf a) fun y => do\n                let i ← evaln k (prec cf cg) (Nat.pair a y)\n                evaln (k + 1) cg (Nat.pair a (Nat.pair y i)))\n            n)\n      n =\n    some x\n⊢ x ∈\n      unpaired\n        (fun a n =>\n          Nat.casesOn n (evaln (k + 1) cf a) fun y => do\n            let i ← evaln k (prec cf cg) (Nat.pair a y)\n            evaln (k + 1) cg (Nat.pair a (Nat.pair y i)))\n        n →\n    x ∈\n      unpaired\n        (fun a n =>\n          Nat.casesOn n (evaln (k₂ + 1) cf a) fun y => do\n            let i ← evaln k₂ (prec cf cg) (Nat.pair a y)\n            evaln (k₂ + 1) cg (Nat.pair a (Nat.pair y i)))\n        n\n[PROOFSTEP]\nsimp [Bind.bind]\n[GOAL]\ncase prec\nk k₂ : ℕ\nc : Code\nn✝ x✝ : ℕ\nhl : k + 1 ≤ k₂ + 1\nhl' : k ≤ k₂\nthis :\n  ∀ {k k₂ n x : ℕ} {o₁ o₂ : Option ℕ},\n    k ≤ k₂ →\n      (x ∈ o₁ → x ∈ o₂) →\n        (x ∈ do\n            guard (n ≤ k)\n            o₁) →\n          x ∈ do\n            guard (n ≤ k₂)\n            o₂\nh✝ : evaln (k + 1) c n✝ = some x✝\ncf cg : Code\nhf : ∀ (n x : ℕ), evaln (k + 1) cf n = some x → evaln (k₂ + 1) cf n = some x\nhg : ∀ (n x : ℕ), evaln (k + 1) cg n = some x → evaln (k₂ + 1) cg n = some x\nn x : ℕ\nh :\n  (fun n => do\n        guard (n ≤ k)\n        unpaired\n            (fun a n =>\n              Nat.casesOn n (evaln (k + 1) cf a) fun y => do\n                let i ← evaln k (prec cf cg) (Nat.pair a y)\n                evaln (k + 1) cg (Nat.pair a (Nat.pair y i)))\n            n)\n      n =\n    some x\n⊢ Nat.rec (evaln (k + 1) cf (unpair n).fst)\n        (fun n_1 n_ih =>\n          Option.bind (evaln k (prec cf cg) (Nat.pair (unpair n).fst n_1)) fun i =>\n            evaln (k + 1) cg (Nat.pair (unpair n).fst (Nat.pair n_1 i)))\n        (unpair n).snd =\n      some x →\n    Nat.rec (evaln (k₂ + 1) cf (unpair n).fst)\n        (fun n_1 n_ih =>\n          Option.bind (evaln k₂ (prec cf cg) (Nat.pair (unpair n).fst n_1)) fun i =>\n            evaln (k₂ + 1) cg (Nat.pair (unpair n).fst (Nat.pair n_1 i)))\n        (unpair n).snd =\n      some x\n[PROOFSTEP]\ninduction n.unpair.2\n[GOAL]\ncase prec.zero\nk k₂ : ℕ\nc : Code\nn✝ x✝ : ℕ\nhl : k + 1 ≤ k₂ + 1\nhl' : k ≤ k₂\nthis :\n  ∀ {k k₂ n x : ℕ} {o₁ o₂ : Option ℕ},\n    k ≤ k₂ →\n      (x ∈ o₁ → x ∈ o₂) →\n        (x ∈ do\n            guard (n ≤ k)\n            o₁) →\n          x ∈ do\n            guard (n ≤ k₂)\n            o₂\nh✝ : evaln (k + 1) c n✝ = some x✝\ncf cg : Code\nhf : ∀ (n x : ℕ), evaln (k + 1) cf n = some x → evaln (k₂ + 1) cf n = some x\nhg : ∀ (n x : ℕ), evaln (k + 1) cg n = some x → evaln (k₂ + 1) cg n = some x\nn x : ℕ\nh :\n  (fun n => do\n        guard (n ≤ k)\n        unpaired\n            (fun a n =>\n              Nat.casesOn n (evaln (k + 1) cf a) fun y => do\n                let i ← evaln k (prec cf cg) (Nat.pair a y)\n                evaln (k + 1) cg (Nat.pair a (Nat.pair y i)))\n            n)\n      n =\n    some x\n⊢ Nat.rec (evaln (k + 1) cf (unpair n).fst)\n        (fun n_1 n_ih =>\n          Option.bind (evaln k (prec cf cg) (Nat.pair (unpair n).fst n_1)) fun i =>\n            evaln (k + 1) cg (Nat.pair (unpair n).fst (Nat.pair n_1 i)))\n        Nat.zero =\n      some x →\n    Nat.rec (evaln (k₂ + 1) cf (unpair n).fst)\n        (fun n_1 n_ih =>\n          Option.bind (evaln k₂ (prec cf cg) (Nat.pair (unpair n).fst n_1)) fun i =>\n            evaln (k₂ + 1) cg (Nat.pair (unpair n).fst (Nat.pair n_1 i)))\n        Nat.zero =\n      some x\n[PROOFSTEP]\nsimp\n[GOAL]\ncase prec.succ\nk k₂ : ℕ\nc : Code\nn✝¹ x✝ : ℕ\nhl : k + 1 ≤ k₂ + 1\nhl' : k ≤ k₂\nthis :\n  ∀ {k k₂ n x : ℕ} {o₁ o₂ : Option ℕ},\n    k ≤ k₂ →\n      (x ∈ o₁ → x ∈ o₂) →\n        (x ∈ do\n            guard (n ≤ k)\n            o₁) →\n          x ∈ do\n            guard (n ≤ k₂)\n            o₂\nh✝ : evaln (k + 1) c n✝¹ = some x✝\ncf cg : Code\nhf : ∀ (n x : ℕ), evaln (k + 1) cf n = some x → evaln (k₂ + 1) cf n = some x\nhg : ∀ (n x : ℕ), evaln (k + 1) cg n = some x → evaln (k₂ + 1) cg n = some x\nn x : ℕ\nh :\n  (fun n => do\n        guard (n ≤ k)\n        unpaired\n            (fun a n =>\n              Nat.casesOn n (evaln (k + 1) cf a) fun y => do\n                let i ← evaln k (prec cf cg) (Nat.pair a y)\n                evaln (k + 1) cg (Nat.pair a (Nat.pair y i)))\n            n)\n      n =\n    some x\nn✝ : ℕ\nn_ih✝ :\n  Nat.rec (evaln (k + 1) cf (unpair n).fst)\n        (fun n_1 n_ih =>\n          Option.bind (evaln k (prec cf cg) (Nat.pair (unpair n).fst n_1)) fun i =>\n            evaln (k + 1) cg (Nat.pair (unpair n).fst (Nat.pair n_1 i)))\n        n✝ =\n      some x →\n    Nat.rec (evaln (k₂ + 1) cf (unpair n).fst)\n        (fun n_1 n_ih =>\n          Option.bind (evaln k₂ (prec cf cg) (Nat.pair (unpair n).fst n_1)) fun i =>\n            evaln (k₂ + 1) cg (Nat.pair (unpair n).fst (Nat.pair n_1 i)))\n        n✝ =\n      some x\n⊢ Nat.rec (evaln (k + 1) cf (unpair n).fst)\n        (fun n_1 n_ih =>\n          Option.bind (evaln k (prec cf cg) (Nat.pair (unpair n).fst n_1)) fun i =>\n            evaln (k + 1) cg (Nat.pair (unpair n).fst (Nat.pair n_1 i)))\n        (Nat.succ n✝) =\n      some x →\n    Nat.rec (evaln (k₂ + 1) cf (unpair n).fst)\n        (fun n_1 n_ih =>\n          Option.bind (evaln k₂ (prec cf cg) (Nat.pair (unpair n).fst n_1)) fun i =>\n            evaln (k₂ + 1) cg (Nat.pair (unpair n).fst (Nat.pair n_1 i)))\n        (Nat.succ n✝) =\n      some x\n[PROOFSTEP]\nsimp\n[GOAL]\ncase prec.zero\nk k₂ : ℕ\nc : Code\nn✝ x✝ : ℕ\nhl : k + 1 ≤ k₂ + 1\nhl' : k ≤ k₂\nthis :\n  ∀ {k k₂ n x : ℕ} {o₁ o₂ : Option ℕ},\n    k ≤ k₂ →\n      (x ∈ o₁ → x ∈ o₂) →\n        (x ∈ do\n            guard (n ≤ k)\n            o₁) →\n          x ∈ do\n            guard (n ≤ k₂)\n            o₂\nh✝ : evaln (k + 1) c n✝ = some x✝\ncf cg : Code\nhf : ∀ (n x : ℕ), evaln (k + 1) cf n = some x → evaln (k₂ + 1) cf n = some x\nhg : ∀ (n x : ℕ), evaln (k + 1) cg n = some x → evaln (k₂ + 1) cg n = some x\nn x : ℕ\nh :\n  (fun n => do\n        guard (n ≤ k)\n        unpaired\n            (fun a n =>\n              Nat.casesOn n (evaln (k + 1) cf a) fun y => do\n                let i ← evaln k (prec cf cg) (Nat.pair a y)\n                evaln (k + 1) cg (Nat.pair a (Nat.pair y i)))\n            n)\n      n =\n    some x\n⊢ evaln (k + 1) cf (unpair n).fst = some x → evaln (k₂ + 1) cf (unpair n).fst = some x\n[PROOFSTEP]\napply hf\n[GOAL]\ncase prec.succ\nk k₂ : ℕ\nc : Code\nn✝¹ x✝ : ℕ\nhl : k + 1 ≤ k₂ + 1\nhl' : k ≤ k₂\nthis :\n  ∀ {k k₂ n x : ℕ} {o₁ o₂ : Option ℕ},\n    k ≤ k₂ →\n      (x ∈ o₁ → x ∈ o₂) →\n        (x ∈ do\n            guard (n ≤ k)\n            o₁) →\n          x ∈ do\n            guard (n ≤ k₂)\n            o₂\nh✝ : evaln (k + 1) c n✝¹ = some x✝\ncf cg : Code\nhf : ∀ (n x : ℕ), evaln (k + 1) cf n = some x → evaln (k₂ + 1) cf n = some x\nhg : ∀ (n x : ℕ), evaln (k + 1) cg n = some x → evaln (k₂ + 1) cg n = some x\nn x : ℕ\nh :\n  (fun n => do\n        guard (n ≤ k)\n        unpaired\n            (fun a n =>\n              Nat.casesOn n (evaln (k + 1) cf a) fun y => do\n                let i ← evaln k (prec cf cg) (Nat.pair a y)\n                evaln (k + 1) cg (Nat.pair a (Nat.pair y i)))\n            n)\n      n =\n    some x\nn✝ : ℕ\nn_ih✝ :\n  Nat.rec (evaln (k + 1) cf (unpair n).fst)\n        (fun n_1 n_ih =>\n          Option.bind (evaln k (prec cf cg) (Nat.pair (unpair n).fst n_1)) fun i =>\n            evaln (k + 1) cg (Nat.pair (unpair n).fst (Nat.pair n_1 i)))\n        n✝ =\n      some x →\n    Nat.rec (evaln (k₂ + 1) cf (unpair n).fst)\n        (fun n_1 n_ih =>\n          Option.bind (evaln k₂ (prec cf cg) (Nat.pair (unpair n).fst n_1)) fun i =>\n            evaln (k₂ + 1) cg (Nat.pair (unpair n).fst (Nat.pair n_1 i)))\n        n✝ =\n      some x\n⊢ ∀ (x_1 : ℕ),\n    evaln k (prec cf cg) (Nat.pair (unpair n).fst n✝) = some x_1 →\n      evaln (k + 1) cg (Nat.pair (unpair n).fst (Nat.pair n✝ x_1)) = some x →\n        ∃ a,\n          evaln k₂ (prec cf cg) (Nat.pair (unpair n).fst n✝) = some a ∧\n            evaln (k₂ + 1) cg (Nat.pair (unpair n).fst (Nat.pair n✝ a)) = some x\n[PROOFSTEP]\nexact fun y h₁ h₂ => ⟨y, evaln_mono hl' h₁, hg _ _ h₂⟩\n[GOAL]\ncase rfind'\nk k₂ : ℕ\nc : Code\nn✝ x✝ : ℕ\nhl : k + 1 ≤ k₂ + 1\nhl' : k ≤ k₂\nthis :\n  ∀ {k k₂ n x : ℕ} {o₁ o₂ : Option ℕ},\n    k ≤ k₂ →\n      (x ∈ o₁ → x ∈ o₂) →\n        (x ∈ do\n            guard (n ≤ k)\n            o₁) →\n          x ∈ do\n            guard (n ≤ k₂)\n            o₂\nh✝¹ : evaln (k + 1) c n✝ = some x✝\ncf : Code\nhf : ∀ (n x : ℕ), evaln (k + 1) cf n = some x → evaln (k₂ + 1) cf n = some x\nn x : ℕ\nh✝ :\n  (fun n => do\n        guard (n ≤ k)\n        unpaired\n            (fun a m => do\n              let x ← evaln (k + 1) cf (Nat.pair a m)\n              if x = 0 then pure m else evaln k (rfind' cf) (Nat.pair a (m + 1)))\n            n)\n      n =\n    some x\nh :\n  x ∈\n    unpaired\n      (fun a m => do\n        let x ← evaln (k + 1) cf (Nat.pair a m)\n        if x = 0 then pure m else evaln k (rfind' cf) (Nat.pair a (m + 1)))\n      n\n⊢ x ∈\n    unpaired\n      (fun a m => do\n        let x ← evaln (k₂ + 1) cf (Nat.pair a m)\n        if x = 0 then pure m else evaln k₂ (rfind' cf) (Nat.pair a (m + 1)))\n      n\n[PROOFSTEP]\nsimp [Bind.bind] at h ⊢\n[GOAL]\ncase rfind'\nk k₂ : ℕ\nc : Code\nn✝ x✝ : ℕ\nhl : k + 1 ≤ k₂ + 1\nhl' : k ≤ k₂\nthis :\n  ∀ {k k₂ n x : ℕ} {o₁ o₂ : Option ℕ},\n    k ≤ k₂ →\n      (x ∈ o₁ → x ∈ o₂) →\n        (x ∈ do\n            guard (n ≤ k)\n            o₁) →\n          x ∈ do\n            guard (n ≤ k₂)\n            o₂\nh✝¹ : evaln (k + 1) c n✝ = some x✝\ncf : Code\nhf : ∀ (n x : ℕ), evaln (k + 1) cf n = some x → evaln (k₂ + 1) cf n = some x\nn x : ℕ\nh✝ :\n  (fun n => do\n        guard (n ≤ k)\n        unpaired\n            (fun a m => do\n              let x ← evaln (k + 1) cf (Nat.pair a m)\n              if x = 0 then pure m else evaln k (rfind' cf) (Nat.pair a (m + 1)))\n            n)\n      n =\n    some x\nh :\n  ∃ a,\n    evaln (k + 1) cf n = some a ∧\n      (if a = 0 then pure (unpair n).snd else evaln k (rfind' cf) (Nat.pair (unpair n).fst ((unpair n).snd + 1))) =\n        some x\n⊢ ∃ a,\n    evaln (k₂ + 1) cf n = some a ∧\n      (if a = 0 then pure (unpair n).snd else evaln k₂ (rfind' cf) (Nat.pair (unpair n).fst ((unpair n).snd + 1))) =\n        some x\n[PROOFSTEP]\nrefine' h.imp fun x => And.imp (hf _ _) _\n[GOAL]\ncase rfind'\nk k₂ : ℕ\nc : Code\nn✝ x✝¹ : ℕ\nhl : k + 1 ≤ k₂ + 1\nhl' : k ≤ k₂\nthis :\n  ∀ {k k₂ n x : ℕ} {o₁ o₂ : Option ℕ},\n    k ≤ k₂ →\n      (x ∈ o₁ → x ∈ o₂) →\n        (x ∈ do\n            guard (n ≤ k)\n            o₁) →\n          x ∈ do\n            guard (n ≤ k₂)\n            o₂\nh✝¹ : evaln (k + 1) c n✝ = some x✝¹\ncf : Code\nhf : ∀ (n x : ℕ), evaln (k + 1) cf n = some x → evaln (k₂ + 1) cf n = some x\nn x✝ : ℕ\nh✝ :\n  (fun n => do\n        guard (n ≤ k)\n        unpaired\n            (fun a m => do\n              let x ← evaln (k + 1) cf (Nat.pair a m)\n              if x = 0 then pure m else evaln k (rfind' cf) (Nat.pair a (m + 1)))\n            n)\n      n =\n    some x✝\nh :\n  ∃ a,\n    evaln (k + 1) cf n = some a ∧\n      (if a = 0 then pure (unpair n).snd else evaln k (rfind' cf) (Nat.pair (unpair n).fst ((unpair n).snd + 1))) =\n        some x✝\nx : ℕ\n⊢ (if x = 0 then pure (unpair n).snd else evaln k (rfind' cf) (Nat.pair (unpair n).fst ((unpair n).snd + 1))) =\n      some x✝ →\n    (if x = 0 then pure (unpair n).snd else evaln k₂ (rfind' cf) (Nat.pair (unpair n).fst ((unpair n).snd + 1))) =\n      some x✝\n[PROOFSTEP]\nby_cases x0 : x = 0\n[GOAL]\ncase pos\nk k₂ : ℕ\nc : Code\nn✝ x✝¹ : ℕ\nhl : k + 1 ≤ k₂ + 1\nhl' : k ≤ k₂\nthis :\n  ∀ {k k₂ n x : ℕ} {o₁ o₂ : Option ℕ},\n    k ≤ k₂ →\n      (x ∈ o₁ → x ∈ o₂) →\n        (x ∈ do\n            guard (n ≤ k)\n            o₁) →\n          x ∈ do\n            guard (n ≤ k₂)\n            o₂\nh✝¹ : evaln (k + 1) c n✝ = some x✝¹\ncf : Code\nhf : ∀ (n x : ℕ), evaln (k + 1) cf n = some x → evaln (k₂ + 1) cf n = some x\nn x✝ : ℕ\nh✝ :\n  (fun n => do\n        guard (n ≤ k)\n        unpaired\n            (fun a m => do\n              let x ← evaln (k + 1) cf (Nat.pair a m)\n              if x = 0 then pure m else evaln k (rfind' cf) (Nat.pair a (m + 1)))\n            n)\n      n =\n    some x✝\nh :\n  ∃ a,\n    evaln (k + 1) cf n = some a ∧\n      (if a = 0 then pure (unpair n).snd else evaln k (rfind' cf) (Nat.pair (unpair n).fst ((unpair n).snd + 1))) =\n        some x✝\nx : ℕ\nx0 : x = 0\n⊢ (if x = 0 then pure (unpair n).snd else evaln k (rfind' cf) (Nat.pair (unpair n).fst ((unpair n).snd + 1))) =\n      some x✝ →\n    (if x = 0 then pure (unpair n).snd else evaln k₂ (rfind' cf) (Nat.pair (unpair n).fst ((unpair n).snd + 1))) =\n      some x✝\n[PROOFSTEP]\nsimp [x0]\n[GOAL]\ncase neg\nk k₂ : ℕ\nc : Code\nn✝ x✝¹ : ℕ\nhl : k + 1 ≤ k₂ + 1\nhl' : k ≤ k₂\nthis :\n  ∀ {k k₂ n x : ℕ} {o₁ o₂ : Option ℕ},\n    k ≤ k₂ →\n      (x ∈ o₁ → x ∈ o₂) →\n        (x ∈ do\n            guard (n ≤ k)\n            o₁) →\n          x ∈ do\n            guard (n ≤ k₂)\n            o₂\nh✝¹ : evaln (k + 1) c n✝ = some x✝¹\ncf : Code\nhf : ∀ (n x : ℕ), evaln (k + 1) cf n = some x → evaln (k₂ + 1) cf n = some x\nn x✝ : ℕ\nh✝ :\n  (fun n => do\n        guard (n ≤ k)\n        unpaired\n            (fun a m => do\n              let x ← evaln (k + 1) cf (Nat.pair a m)\n              if x = 0 then pure m else evaln k (rfind' cf) (Nat.pair a (m + 1)))\n            n)\n      n =\n    some x✝\nh :\n  ∃ a,\n    evaln (k + 1) cf n = some a ∧\n      (if a = 0 then pure (unpair n).snd else evaln k (rfind' cf) (Nat.pair (unpair n).fst ((unpair n).snd + 1))) =\n        some x✝\nx : ℕ\nx0 : ¬x = 0\n⊢ (if x = 0 then pure (unpair n).snd else evaln k (rfind' cf) (Nat.pair (unpair n).fst ((unpair n).snd + 1))) =\n      some x✝ →\n    (if x = 0 then pure (unpair n).snd else evaln k₂ (rfind' cf) (Nat.pair (unpair n).fst ((unpair n).snd + 1))) =\n      some x✝\n[PROOFSTEP]\nsimp [x0]\n[GOAL]\ncase neg\nk k₂ : ℕ\nc : Code\nn✝ x✝¹ : ℕ\nhl : k + 1 ≤ k₂ + 1\nhl' : k ≤ k₂\nthis :\n  ∀ {k k₂ n x : ℕ} {o₁ o₂ : Option ℕ},\n    k ≤ k₂ →\n      (x ∈ o₁ → x ∈ o₂) →\n        (x ∈ do\n            guard (n ≤ k)\n            o₁) →\n          x ∈ do\n            guard (n ≤ k₂)\n            o₂\nh✝¹ : evaln (k + 1) c n✝ = some x✝¹\ncf : Code\nhf : ∀ (n x : ℕ), evaln (k + 1) cf n = some x → evaln (k₂ + 1) cf n = some x\nn x✝ : ℕ\nh✝ :\n  (fun n => do\n        guard (n ≤ k)\n        unpaired\n            (fun a m => do\n              let x ← evaln (k + 1) cf (Nat.pair a m)\n              if x = 0 then pure m else evaln k (rfind' cf) (Nat.pair a (m + 1)))\n            n)\n      n =\n    some x✝\nh :\n  ∃ a,\n    evaln (k + 1) cf n = some a ∧\n      (if a = 0 then pure (unpair n).snd else evaln k (rfind' cf) (Nat.pair (unpair n).fst ((unpair n).snd + 1))) =\n        some x✝\nx : ℕ\nx0 : ¬x = 0\n⊢ evaln k (rfind' cf) (Nat.pair (unpair n).fst ((unpair n).snd + 1)) = some x✝ →\n    evaln k₂ (rfind' cf) (Nat.pair (unpair n).fst ((unpair n).snd + 1)) = some x✝\n[PROOFSTEP]\nexact evaln_mono hl'\n[GOAL]\nx✝ : Code\nn x : ℕ\nh : x ∈ evaln 0 x✝ n\n⊢ x ∈ eval x✝ n\n[PROOFSTEP]\nsimp [evaln] at h \n[GOAL]\nk : ℕ\nc : Code\nn x : ℕ\nh : x ∈ evaln (k + 1) c n\n⊢ x ∈ eval c n\n[PROOFSTEP]\ninduction' c with cf cg hf hg cf cg hf hg cf cg hf hg cf hf generalizing x n\n[GOAL]\ncase zero\nk : ℕ\nc : Code\nn✝ x✝ : ℕ\nh✝ : x✝ ∈ evaln (k + 1) c n✝\nn x : ℕ\nh : x ∈ evaln (k + 1) zero n\n⊢ x ∈ eval zero n\n[PROOFSTEP]\nsimp [eval, evaln, Bind.bind, Seq.seq] at h ⊢\n[GOAL]\ncase succ\nk : ℕ\nc : Code\nn✝ x✝ : ℕ\nh✝ : x✝ ∈ evaln (k + 1) c n✝\nn x : ℕ\nh : x ∈ evaln (k + 1) succ n\n⊢ x ∈ eval succ n\n[PROOFSTEP]\nsimp [eval, evaln, Bind.bind, Seq.seq] at h ⊢\n[GOAL]\ncase left\nk : ℕ\nc : Code\nn✝ x✝ : ℕ\nh✝ : x✝ ∈ evaln (k + 1) c n✝\nn x : ℕ\nh : x ∈ evaln (k + 1) left n\n⊢ x ∈ eval left n\n[PROOFSTEP]\nsimp [eval, evaln, Bind.bind, Seq.seq] at h ⊢\n[GOAL]\ncase right\nk : ℕ\nc : Code\nn✝ x✝ : ℕ\nh✝ : x✝ ∈ evaln (k + 1) c n✝\nn x : ℕ\nh : x ∈ evaln (k + 1) right n\n⊢ x ∈ eval right n\n[PROOFSTEP]\nsimp [eval, evaln, Bind.bind, Seq.seq] at h ⊢\n[GOAL]\ncase pair\nk : ℕ\nc : Code\nn✝ x✝ : ℕ\nh✝ : x✝ ∈ evaln (k + 1) c n✝\ncf cg : Code\nhf : ∀ (n x : ℕ), x ∈ evaln (k + 1) cf n → x ∈ eval cf n\nhg : ∀ (n x : ℕ), x ∈ evaln (k + 1) cg n → x ∈ eval cg n\nn x : ℕ\nh : x ∈ evaln (k + 1) (pair cf cg) n\n⊢ x ∈ eval (pair cf cg) n\n[PROOFSTEP]\nsimp [eval, evaln, Bind.bind, Seq.seq] at h ⊢\n[GOAL]\ncase comp\nk : ℕ\nc : Code\nn✝ x✝ : ℕ\nh✝ : x✝ ∈ evaln (k + 1) c n✝\ncf cg : Code\nhf : ∀ (n x : ℕ), x ∈ evaln (k + 1) cf n → x ∈ eval cf n\nhg : ∀ (n x : ℕ), x ∈ evaln (k + 1) cg n → x ∈ eval cg n\nn x : ℕ\nh : x ∈ evaln (k + 1) (comp cf cg) n\n⊢ x ∈ eval (comp cf cg) n\n[PROOFSTEP]\nsimp [eval, evaln, Bind.bind, Seq.seq] at h ⊢\n[GOAL]\ncase prec\nk : ℕ\nc : Code\nn✝ x✝ : ℕ\nh✝ : x✝ ∈ evaln (k + 1) c n✝\ncf cg : Code\nhf : ∀ (n x : ℕ), x ∈ evaln (k + 1) cf n → x ∈ eval cf n\nhg : ∀ (n x : ℕ), x ∈ evaln (k + 1) cg n → x ∈ eval cg n\nn x : ℕ\nh : x ∈ evaln (k + 1) (prec cf cg) n\n⊢ x ∈ eval (prec cf cg) n\n[PROOFSTEP]\nsimp [eval, evaln, Bind.bind, Seq.seq] at h ⊢\n[GOAL]\ncase rfind'\nk : ℕ\nc : Code\nn✝ x✝ : ℕ\nh✝ : x✝ ∈ evaln (k + 1) c n✝\ncf : Code\nhf : ∀ (n x : ℕ), x ∈ evaln (k + 1) cf n → x ∈ eval cf n\nn x : ℕ\nh : x ∈ evaln (k + 1) (rfind' cf) n\n⊢ x ∈ eval (rfind' cf) n\n[PROOFSTEP]\nsimp [eval, evaln, Bind.bind, Seq.seq] at h ⊢\n[GOAL]\ncase zero\nk : ℕ\nc : Code\nn✝ x✝ : ℕ\nh✝ : x✝ ∈ evaln (k + 1) c n✝\nn x : ℕ\nh : n ≤ k ∧ pure 0 = some x\n⊢ x ∈ pure 0 n\n[PROOFSTEP]\ncases' h with _ h\n[GOAL]\ncase succ\nk : ℕ\nc : Code\nn✝ x✝ : ℕ\nh✝ : x✝ ∈ evaln (k + 1) c n✝\nn x : ℕ\nh : n ≤ k ∧ pure (Nat.succ n) = some x\n⊢ x = Nat.succ n\n[PROOFSTEP]\ncases' h with _ h\n[GOAL]\ncase left\nk : ℕ\nc : Code\nn✝ x✝ : ℕ\nh✝ : x✝ ∈ evaln (k + 1) c n✝\nn x : ℕ\nh : n ≤ k ∧ pure (unpair n).fst = some x\n⊢ x = (unpair n).fst\n[PROOFSTEP]\ncases' h with _ h\n[GOAL]\ncase right\nk : ℕ\nc : Code\nn✝ x✝ : ℕ\nh✝ : x✝ ∈ evaln (k + 1) c n✝\nn x : ℕ\nh : n ≤ k ∧ pure (unpair n).snd = some x\n⊢ x = (unpair n).snd\n[PROOFSTEP]\ncases' h with _ h\n[GOAL]\ncase pair\nk : ℕ\nc : Code\nn✝ x✝ : ℕ\nh✝ : x✝ ∈ evaln (k + 1) c n✝\ncf cg : Code\nhf : ∀ (n x : ℕ), x ∈ evaln (k + 1) cf n → x ∈ eval cf n\nhg : ∀ (n x : ℕ), x ∈ evaln (k + 1) cg n → x ∈ eval cg n\nn x : ℕ\nh : n ≤ k ∧ ∃ a, evaln (k + 1) cf n = some a ∧ ∃ a_1, evaln (k + 1) cg n = some a_1 ∧ Nat.pair a a_1 = x\n⊢ ∃ a, a ∈ eval cf n ∧ ∃ a_1, a_1 ∈ eval cg n ∧ Nat.pair a a_1 = x\n[PROOFSTEP]\ncases' h with _ h\n[GOAL]\ncase comp\nk : ℕ\nc : Code\nn✝ x✝ : ℕ\nh✝ : x✝ ∈ evaln (k + 1) c n✝\ncf cg : Code\nhf : ∀ (n x : ℕ), x ∈ evaln (k + 1) cf n → x ∈ eval cf n\nhg : ∀ (n x : ℕ), x ∈ evaln (k + 1) cg n → x ∈ eval cg n\nn x : ℕ\nh : n ≤ k ∧ ∃ a, evaln (k + 1) cg n = some a ∧ evaln (k + 1) cf a = some x\n⊢ ∃ a, a ∈ eval cg n ∧ x ∈ eval cf a\n[PROOFSTEP]\ncases' h with _ h\n[GOAL]\ncase prec\nk : ℕ\nc : Code\nn✝ x✝ : ℕ\nh✝ : x✝ ∈ evaln (k + 1) c n✝\ncf cg : Code\nhf : ∀ (n x : ℕ), x ∈ evaln (k + 1) cf n → x ∈ eval cf n\nhg : ∀ (n x : ℕ), x ∈ evaln (k + 1) cg n → x ∈ eval cg n\nn x : ℕ\nh :\n  n ≤ k ∧\n    Nat.rec (evaln (k + 1) cf (unpair n).fst)\n        (fun n_1 n_ih =>\n          Option.bind (evaln k (prec cf cg) (Nat.pair (unpair n).fst n_1)) fun i =>\n            evaln (k + 1) cg (Nat.pair (unpair n).fst (Nat.pair n_1 i)))\n        (unpair n).snd =\n      some x\n⊢ x ∈\n    Nat.rec (eval cf (unpair n).fst)\n      (fun y IH => Part.bind IH fun i => eval cg (Nat.pair (unpair n).fst (Nat.pair y i))) (unpair n).snd\n[PROOFSTEP]\ncases' h with _ h\n[GOAL]\ncase rfind'\nk : ℕ\nc : Code\nn✝ x✝ : ℕ\nh✝ : x✝ ∈ evaln (k + 1) c n✝\ncf : Code\nhf : ∀ (n x : ℕ), x ∈ evaln (k + 1) cf n → x ∈ eval cf n\nn x : ℕ\nh :\n  n ≤ k ∧\n    ∃ a,\n      evaln (k + 1) cf n = some a ∧\n        (if a = 0 then pure (unpair n).snd else evaln k (rfind' cf) (Nat.pair (unpair n).fst ((unpair n).snd + 1))) =\n          some x\n⊢ ∃ a,\n    (0 ∈ eval cf (Nat.pair (unpair n).fst (a + (unpair n).snd)) ∧\n        ∀ {m : ℕ}, m < a → ∃ a, a ∈ eval cf (Nat.pair (unpair n).fst (m + (unpair n).snd)) ∧ ¬a = 0) ∧\n      a + (unpair n).snd = x\n[PROOFSTEP]\ncases' h with _ h\n[GOAL]\ncase zero.intro\nk : ℕ\nc : Code\nn✝ x✝ : ℕ\nh✝ : x✝ ∈ evaln (k + 1) c n✝\nn x : ℕ\nleft✝ : n ≤ k\nh : pure 0 = some x\n⊢ x ∈ pure 0 n\ncase succ.intro\nk : ℕ\nc : Code\nn✝ x✝ : ℕ\nh✝ : x✝ ∈ evaln (k + 1) c n✝\nn x : ℕ\nleft✝ : n ≤ k\nh : pure (Nat.succ n) = some x\n⊢ x = Nat.succ n\ncase left.intro\nk : ℕ\nc : Code\nn✝ x✝ : ℕ\nh✝ : x✝ ∈ evaln (k + 1) c n✝\nn x : ℕ\nleft✝ : n ≤ k\nh : pure (unpair n).fst = some x\n⊢ x = (unpair n).fst\ncase right.intro\nk : ℕ\nc : Code\nn✝ x✝ : ℕ\nh✝ : x✝ ∈ evaln (k + 1) c n✝\nn x : ℕ\nleft✝ : n ≤ k\nh : pure (unpair n).snd = some x\n⊢ x = (unpair n).snd\ncase pair.intro\nk : ℕ\nc : Code\nn✝ x✝ : ℕ\nh✝ : x✝ ∈ evaln (k + 1) c n✝\ncf cg : Code\nhf : ∀ (n x : ℕ), x ∈ evaln (k + 1) cf n → x ∈ eval cf n\nhg : ∀ (n x : ℕ), x ∈ evaln (k + 1) cg n → x ∈ eval cg n\nn x : ℕ\nleft✝ : n ≤ k\nh : ∃ a, evaln (k + 1) cf n = some a ∧ ∃ a_1, evaln (k + 1) cg n = some a_1 ∧ Nat.pair a a_1 = x\n⊢ ∃ a, a ∈ eval cf n ∧ ∃ a_1, a_1 ∈ eval cg n ∧ Nat.pair a a_1 = x\ncase comp.intro\nk : ℕ\nc : Code\nn✝ x✝ : ℕ\nh✝ : x✝ ∈ evaln (k + 1) c n✝\ncf cg : Code\nhf : ∀ (n x : ℕ), x ∈ evaln (k + 1) cf n → x ∈ eval cf n\nhg : ∀ (n x : ℕ), x ∈ evaln (k + 1) cg n → x ∈ eval cg n\nn x : ℕ\nleft✝ : n ≤ k\nh : ∃ a, evaln (k + 1) cg n = some a ∧ evaln (k + 1) cf a = some x\n⊢ ∃ a, a ∈ eval cg n ∧ x ∈ eval cf a\ncase prec.intro\nk : ℕ\nc : Code\nn✝ x✝ : ℕ\nh✝ : x✝ ∈ evaln (k + 1) c n✝\ncf cg : Code\nhf : ∀ (n x : ℕ), x ∈ evaln (k + 1) cf n → x ∈ eval cf n\nhg : ∀ (n x : ℕ), x ∈ evaln (k + 1) cg n → x ∈ eval cg n\nn x : ℕ\nleft✝ : n ≤ k\nh :\n  Nat.rec (evaln (k + 1) cf (unpair n).fst)\n      (fun n_1 n_ih =>\n        Option.bind (evaln k (prec cf cg) (Nat.pair (unpair n).fst n_1)) fun i =>\n          evaln (k + 1) cg (Nat.pair (unpair n).fst (Nat.pair n_1 i)))\n      (unpair n).snd =\n    some x\n⊢ x ∈\n    Nat.rec (eval cf (unpair n).fst)\n      (fun y IH => Part.bind IH fun i => eval cg (Nat.pair (unpair n).fst (Nat.pair y i))) (unpair n).snd\ncase rfind'.intro\nk : ℕ\nc : Code\nn✝ x✝ : ℕ\nh✝ : x✝ ∈ evaln (k + 1) c n✝\ncf : Code\nhf : ∀ (n x : ℕ), x ∈ evaln (k + 1) cf n → x ∈ eval cf n\nn x : ℕ\nleft✝ : n ≤ k\nh :\n  ∃ a,\n    evaln (k + 1) cf n = some a ∧\n      (if a = 0 then pure (unpair n).snd else evaln k (rfind' cf) (Nat.pair (unpair n).fst ((unpair n).snd + 1))) =\n        some x\n⊢ ∃ a,\n    (0 ∈ eval cf (Nat.pair (unpair n).fst (a + (unpair n).snd)) ∧\n        ∀ {m : ℕ}, m < a → ∃ a, a ∈ eval cf (Nat.pair (unpair n).fst (m + (unpair n).snd)) ∧ ¬a = 0) ∧\n      a + (unpair n).snd = x\n[PROOFSTEP]\niterate 4 simpa [pure, PFun.pure, eq_comm] using h\n[GOAL]\ncase zero.intro\nk : ℕ\nc : Code\nn✝ x✝ : ℕ\nh✝ : x✝ ∈ evaln (k + 1) c n✝\nn x : ℕ\nleft✝ : n ≤ k\nh : pure 0 = some x\n⊢ x ∈ pure 0 n\ncase succ.intro\nk : ℕ\nc : Code\nn✝ x✝ : ℕ\nh✝ : x✝ ∈ evaln (k + 1) c n✝\nn x : ℕ\nleft✝ : n ≤ k\nh : pure (Nat.succ n) = some x\n⊢ x = Nat.succ n\ncase left.intro\nk : ℕ\nc : Code\nn✝ x✝ : ℕ\nh✝ : x✝ ∈ evaln (k + 1) c n✝\nn x : ℕ\nleft✝ : n ≤ k\nh : pure (unpair n).fst = some x\n⊢ x = (unpair n).fst\ncase right.intro\nk : ℕ\nc : Code\nn✝ x✝ : ℕ\nh✝ : x✝ ∈ evaln (k + 1) c n✝\nn x : ℕ\nleft✝ : n ≤ k\nh : pure (unpair n).snd = some x\n⊢ x = (unpair n).snd\ncase pair.intro\nk : ℕ\nc : Code\nn✝ x✝ : ℕ\nh✝ : x✝ ∈ evaln (k + 1) c n✝\ncf cg : Code\nhf : ∀ (n x : ℕ), x ∈ evaln (k + 1) cf n → x ∈ eval cf n\nhg : ∀ (n x : ℕ), x ∈ evaln (k + 1) cg n → x ∈ eval cg n\nn x : ℕ\nleft✝ : n ≤ k\nh : ∃ a, evaln (k + 1) cf n = some a ∧ ∃ a_1, evaln (k + 1) cg n = some a_1 ∧ Nat.pair a a_1 = x\n⊢ ∃ a, a ∈ eval cf n ∧ ∃ a_1, a_1 ∈ eval cg n ∧ Nat.pair a a_1 = x\ncase comp.intro\nk : ℕ\nc : Code\nn✝ x✝ : ℕ\nh✝ : x✝ ∈ evaln (k + 1) c n✝\ncf cg : Code\nhf : ∀ (n x : ℕ), x ∈ evaln (k + 1) cf n → x ∈ eval cf n\nhg : ∀ (n x : ℕ), x ∈ evaln (k + 1) cg n → x ∈ eval cg n\nn x : ℕ\nleft✝ : n ≤ k\nh : ∃ a, evaln (k + 1) cg n = some a ∧ evaln (k + 1) cf a = some x\n⊢ ∃ a, a ∈ eval cg n ∧ x ∈ eval cf a\ncase prec.intro\nk : ℕ\nc : Code\nn✝ x✝ : ℕ\nh✝ : x✝ ∈ evaln (k + 1) c n✝\ncf cg : Code\nhf : ∀ (n x : ℕ), x ∈ evaln (k + 1) cf n → x ∈ eval cf n\nhg : ∀ (n x : ℕ), x ∈ evaln (k + 1) cg n → x ∈ eval cg n\nn x : ℕ\nleft✝ : n ≤ k\nh :\n  Nat.rec (evaln (k + 1) cf (unpair n).fst)\n      (fun n_1 n_ih =>\n        Option.bind (evaln k (prec cf cg) (Nat.pair (unpair n).fst n_1)) fun i =>\n          evaln (k + 1) cg (Nat.pair (unpair n).fst (Nat.pair n_1 i)))\n      (unpair n).snd =\n    some x\n⊢ x ∈\n    Nat.rec (eval cf (unpair n).fst)\n      (fun y IH => Part.bind IH fun i => eval cg (Nat.pair (unpair n).fst (Nat.pair y i))) (unpair n).snd\ncase rfind'.intro\nk : ℕ\nc : Code\nn✝ x✝ : ℕ\nh✝ : x✝ ∈ evaln (k + 1) c n✝\ncf : Code\nhf : ∀ (n x : ℕ), x ∈ evaln (k + 1) cf n → x ∈ eval cf n\nn x : ℕ\nleft✝ : n ≤ k\nh :\n  ∃ a,\n    evaln (k + 1) cf n = some a ∧\n      (if a = 0 then pure (unpair n).snd else evaln k (rfind' cf) (Nat.pair (unpair n).fst ((unpair n).snd + 1))) =\n        some x\n⊢ ∃ a,\n    (0 ∈ eval cf (Nat.pair (unpair n).fst (a + (unpair n).snd)) ∧\n        ∀ {m : ℕ}, m < a → ∃ a, a ∈ eval cf (Nat.pair (unpair n).fst (m + (unpair n).snd)) ∧ ¬a = 0) ∧\n      a + (unpair n).snd = x\n[PROOFSTEP]\nsimpa [pure, PFun.pure, eq_comm] using h\n[GOAL]\ncase succ.intro\nk : ℕ\nc : Code\nn✝ x✝ : ℕ\nh✝ : x✝ ∈ evaln (k + 1) c n✝\nn x : ℕ\nleft✝ : n ≤ k\nh : pure (Nat.succ n) = some x\n⊢ x = Nat.succ n\ncase left.intro\nk : ℕ\nc : Code\nn✝ x✝ : ℕ\nh✝ : x✝ ∈ evaln (k + 1) c n✝\nn x : ℕ\nleft✝ : n ≤ k\nh : pure (unpair n).fst = some x\n⊢ x = (unpair n).fst\ncase right.intro\nk : ℕ\nc : Code\nn✝ x✝ : ℕ\nh✝ : x✝ ∈ evaln (k + 1) c n✝\nn x : ℕ\nleft✝ : n ≤ k\nh : pure (unpair n).snd = some x\n⊢ x = (unpair n).snd\ncase pair.intro\nk : ℕ\nc : Code\nn✝ x✝ : ℕ\nh✝ : x✝ ∈ evaln (k + 1) c n✝\ncf cg : Code\nhf : ∀ (n x : ℕ), x ∈ evaln (k + 1) cf n → x ∈ eval cf n\nhg : ∀ (n x : ℕ), x ∈ evaln (k + 1) cg n → x ∈ eval cg n\nn x : ℕ\nleft✝ : n ≤ k\nh : ∃ a, evaln (k + 1) cf n = some a ∧ ∃ a_1, evaln (k + 1) cg n = some a_1 ∧ Nat.pair a a_1 = x\n⊢ ∃ a, a ∈ eval cf n ∧ ∃ a_1, a_1 ∈ eval cg n ∧ Nat.pair a a_1 = x\ncase comp.intro\nk : ℕ\nc : Code\nn✝ x✝ : ℕ\nh✝ : x✝ ∈ evaln (k + 1) c n✝\ncf cg : Code\nhf : ∀ (n x : ℕ), x ∈ evaln (k + 1) cf n → x ∈ eval cf n\nhg : ∀ (n x : ℕ), x ∈ evaln (k + 1) cg n → x ∈ eval cg n\nn x : ℕ\nleft✝ : n ≤ k\nh : ∃ a, evaln (k + 1) cg n = some a ∧ evaln (k + 1) cf a = some x\n⊢ ∃ a, a ∈ eval cg n ∧ x ∈ eval cf a\ncase prec.intro\nk : ℕ\nc : Code\nn✝ x✝ : ℕ\nh✝ : x✝ ∈ evaln (k + 1) c n✝\ncf cg : Code\nhf : ∀ (n x : ℕ), x ∈ evaln (k + 1) cf n → x ∈ eval cf n\nhg : ∀ (n x : ℕ), x ∈ evaln (k + 1) cg n → x ∈ eval cg n\nn x : ℕ\nleft✝ : n ≤ k\nh :\n  Nat.rec (evaln (k + 1) cf (unpair n).fst)\n      (fun n_1 n_ih =>\n        Option.bind (evaln k (prec cf cg) (Nat.pair (unpair n).fst n_1)) fun i =>\n          evaln (k + 1) cg (Nat.pair (unpair n).fst (Nat.pair n_1 i)))\n      (unpair n).snd =\n    some x\n⊢ x ∈\n    Nat.rec (eval cf (unpair n).fst)\n      (fun y IH => Part.bind IH fun i => eval cg (Nat.pair (unpair n).fst (Nat.pair y i))) (unpair n).snd\ncase rfind'.intro\nk : ℕ\nc : Code\nn✝ x✝ : ℕ\nh✝ : x✝ ∈ evaln (k + 1) c n✝\ncf : Code\nhf : ∀ (n x : ℕ), x ∈ evaln (k + 1) cf n → x ∈ eval cf n\nn x : ℕ\nleft✝ : n ≤ k\nh :\n  ∃ a,\n    evaln (k + 1) cf n = some a ∧\n      (if a = 0 then pure (unpair n).snd else evaln k (rfind' cf) (Nat.pair (unpair n).fst ((unpair n).snd + 1))) =\n        some x\n⊢ ∃ a,\n    (0 ∈ eval cf (Nat.pair (unpair n).fst (a + (unpair n).snd)) ∧\n        ∀ {m : ℕ}, m < a → ∃ a, a ∈ eval cf (Nat.pair (unpair n).fst (m + (unpair n).snd)) ∧ ¬a = 0) ∧\n      a + (unpair n).snd = x\n[PROOFSTEP]\nsimpa [pure, PFun.pure, eq_comm] using h\n[GOAL]\ncase left.intro\nk : ℕ\nc : Code\nn✝ x✝ : ℕ\nh✝ : x✝ ∈ evaln (k + 1) c n✝\nn x : ℕ\nleft✝ : n ≤ k\nh : pure (unpair n).fst = some x\n⊢ x = (unpair n).fst\ncase right.intro\nk : ℕ\nc : Code\nn✝ x✝ : ℕ\nh✝ : x✝ ∈ evaln (k + 1) c n✝\nn x : ℕ\nleft✝ : n ≤ k\nh : pure (unpair n).snd = some x\n⊢ x = (unpair n).snd\ncase pair.intro\nk : ℕ\nc : Code\nn✝ x✝ : ℕ\nh✝ : x✝ ∈ evaln (k + 1) c n✝\ncf cg : Code\nhf : ∀ (n x : ℕ), x ∈ evaln (k + 1) cf n → x ∈ eval cf n\nhg : ∀ (n x : ℕ), x ∈ evaln (k + 1) cg n → x ∈ eval cg n\nn x : ℕ\nleft✝ : n ≤ k\nh : ∃ a, evaln (k + 1) cf n = some a ∧ ∃ a_1, evaln (k + 1) cg n = some a_1 ∧ Nat.pair a a_1 = x\n⊢ ∃ a, a ∈ eval cf n ∧ ∃ a_1, a_1 ∈ eval cg n ∧ Nat.pair a a_1 = x\ncase comp.intro\nk : ℕ\nc : Code\nn✝ x✝ : ℕ\nh✝ : x✝ ∈ evaln (k + 1) c n✝\ncf cg : Code\nhf : ∀ (n x : ℕ), x ∈ evaln (k + 1) cf n → x ∈ eval cf n\nhg : ∀ (n x : ℕ), x ∈ evaln (k + 1) cg n → x ∈ eval cg n\nn x : ℕ\nleft✝ : n ≤ k\nh : ∃ a, evaln (k + 1) cg n = some a ∧ evaln (k + 1) cf a = some x\n⊢ ∃ a, a ∈ eval cg n ∧ x ∈ eval cf a\ncase prec.intro\nk : ℕ\nc : Code\nn✝ x✝ : ℕ\nh✝ : x✝ ∈ evaln (k + 1) c n✝\ncf cg : Code\nhf : ∀ (n x : ℕ), x ∈ evaln (k + 1) cf n → x ∈ eval cf n\nhg : ∀ (n x : ℕ), x ∈ evaln (k + 1) cg n → x ∈ eval cg n\nn x : ℕ\nleft✝ : n ≤ k\nh :\n  Nat.rec (evaln (k + 1) cf (unpair n).fst)\n      (fun n_1 n_ih =>\n        Option.bind (evaln k (prec cf cg) (Nat.pair (unpair n).fst n_1)) fun i =>\n          evaln (k + 1) cg (Nat.pair (unpair n).fst (Nat.pair n_1 i)))\n      (unpair n).snd =\n    some x\n⊢ x ∈\n    Nat.rec (eval cf (unpair n).fst)\n      (fun y IH => Part.bind IH fun i => eval cg (Nat.pair (unpair n).fst (Nat.pair y i))) (unpair n).snd\ncase rfind'.intro\nk : ℕ\nc : Code\nn✝ x✝ : ℕ\nh✝ : x✝ ∈ evaln (k + 1) c n✝\ncf : Code\nhf : ∀ (n x : ℕ), x ∈ evaln (k + 1) cf n → x ∈ eval cf n\nn x : ℕ\nleft✝ : n ≤ k\nh :\n  ∃ a,\n    evaln (k + 1) cf n = some a ∧\n      (if a = 0 then pure (unpair n).snd else evaln k (rfind' cf) (Nat.pair (unpair n).fst ((unpair n).snd + 1))) =\n        some x\n⊢ ∃ a,\n    (0 ∈ eval cf (Nat.pair (unpair n).fst (a + (unpair n).snd)) ∧\n        ∀ {m : ℕ}, m < a → ∃ a, a ∈ eval cf (Nat.pair (unpair n).fst (m + (unpair n).snd)) ∧ ¬a = 0) ∧\n      a + (unpair n).snd = x\n[PROOFSTEP]\nsimpa [pure, PFun.pure, eq_comm] using h\n[GOAL]\ncase right.intro\nk : ℕ\nc : Code\nn✝ x✝ : ℕ\nh✝ : x✝ ∈ evaln (k + 1) c n✝\nn x : ℕ\nleft✝ : n ≤ k\nh : pure (unpair n).snd = some x\n⊢ x = (unpair n).snd\ncase pair.intro\nk : ℕ\nc : Code\nn✝ x✝ : ℕ\nh✝ : x✝ ∈ evaln (k + 1) c n✝\ncf cg : Code\nhf : ∀ (n x : ℕ), x ∈ evaln (k + 1) cf n → x ∈ eval cf n\nhg : ∀ (n x : ℕ), x ∈ evaln (k + 1) cg n → x ∈ eval cg n\nn x : ℕ\nleft✝ : n ≤ k\nh : ∃ a, evaln (k + 1) cf n = some a ∧ ∃ a_1, evaln (k + 1) cg n = some a_1 ∧ Nat.pair a a_1 = x\n⊢ ∃ a, a ∈ eval cf n ∧ ∃ a_1, a_1 ∈ eval cg n ∧ Nat.pair a a_1 = x\ncase comp.intro\nk : ℕ\nc : Code\nn✝ x✝ : ℕ\nh✝ : x✝ ∈ evaln (k + 1) c n✝\ncf cg : Code\nhf : ∀ (n x : ℕ), x ∈ evaln (k + 1) cf n → x ∈ eval cf n\nhg : ∀ (n x : ℕ), x ∈ evaln (k + 1) cg n → x ∈ eval cg n\nn x : ℕ\nleft✝ : n ≤ k\nh : ∃ a, evaln (k + 1) cg n = some a ∧ evaln (k + 1) cf a = some x\n⊢ ∃ a, a ∈ eval cg n ∧ x ∈ eval cf a\ncase prec.intro\nk : ℕ\nc : Code\nn✝ x✝ : ℕ\nh✝ : x✝ ∈ evaln (k + 1) c n✝\ncf cg : Code\nhf : ∀ (n x : ℕ), x ∈ evaln (k + 1) cf n → x ∈ eval cf n\nhg : ∀ (n x : ℕ), x ∈ evaln (k + 1) cg n → x ∈ eval cg n\nn x : ℕ\nleft✝ : n ≤ k\nh :\n  Nat.rec (evaln (k + 1) cf (unpair n).fst)\n      (fun n_1 n_ih =>\n        Option.bind (evaln k (prec cf cg) (Nat.pair (unpair n).fst n_1)) fun i =>\n          evaln (k + 1) cg (Nat.pair (unpair n).fst (Nat.pair n_1 i)))\n      (unpair n).snd =\n    some x\n⊢ x ∈\n    Nat.rec (eval cf (unpair n).fst)\n      (fun y IH => Part.bind IH fun i => eval cg (Nat.pair (unpair n).fst (Nat.pair y i))) (unpair n).snd\ncase rfind'.intro\nk : ℕ\nc : Code\nn✝ x✝ : ℕ\nh✝ : x✝ ∈ evaln (k + 1) c n✝\ncf : Code\nhf : ∀ (n x : ℕ), x ∈ evaln (k + 1) cf n → x ∈ eval cf n\nn x : ℕ\nleft✝ : n ≤ k\nh :\n  ∃ a,\n    evaln (k + 1) cf n = some a ∧\n      (if a = 0 then pure (unpair n).snd else evaln k (rfind' cf) (Nat.pair (unpair n).fst ((unpair n).snd + 1))) =\n        some x\n⊢ ∃ a,\n    (0 ∈ eval cf (Nat.pair (unpair n).fst (a + (unpair n).snd)) ∧\n        ∀ {m : ℕ}, m < a → ∃ a, a ∈ eval cf (Nat.pair (unpair n).fst (m + (unpair n).snd)) ∧ ¬a = 0) ∧\n      a + (unpair n).snd = x\n[PROOFSTEP]\nsimpa [pure, PFun.pure, eq_comm] using h\n[GOAL]\ncase pair.intro\nk : ℕ\nc : Code\nn✝ x✝ : ℕ\nh✝ : x✝ ∈ evaln (k + 1) c n✝\ncf cg : Code\nhf : ∀ (n x : ℕ), x ∈ evaln (k + 1) cf n → x ∈ eval cf n\nhg : ∀ (n x : ℕ), x ∈ evaln (k + 1) cg n → x ∈ eval cg n\nn x : ℕ\nleft✝ : n ≤ k\nh : ∃ a, evaln (k + 1) cf n = some a ∧ ∃ a_1, evaln (k + 1) cg n = some a_1 ∧ Nat.pair a a_1 = x\n⊢ ∃ a, a ∈ eval cf n ∧ ∃ a_1, a_1 ∈ eval cg n ∧ Nat.pair a a_1 = x\n[PROOFSTEP]\nrcases h with ⟨y, ef, z, eg, rfl⟩\n[GOAL]\ncase pair.intro.intro.intro.intro.intro\nk : ℕ\nc : Code\nn✝ x : ℕ\nh : x ∈ evaln (k + 1) c n✝\ncf cg : Code\nhf : ∀ (n x : ℕ), x ∈ evaln (k + 1) cf n → x ∈ eval cf n\nhg : ∀ (n x : ℕ), x ∈ evaln (k + 1) cg n → x ∈ eval cg n\nn : ℕ\nleft✝ : n ≤ k\ny : ℕ\nef : evaln (k + 1) cf n = some y\nz : ℕ\neg : evaln (k + 1) cg n = some z\n⊢ ∃ a, a ∈ eval cf n ∧ ∃ a_1, a_1 ∈ eval cg n ∧ Nat.pair a a_1 = Nat.pair y z\n[PROOFSTEP]\nexact ⟨_, hf _ _ ef, _, hg _ _ eg, rfl⟩\n[GOAL]\ncase comp.intro\nk : ℕ\nc : Code\nn✝ x✝ : ℕ\nh✝ : x✝ ∈ evaln (k + 1) c n✝\ncf cg : Code\nhf : ∀ (n x : ℕ), x ∈ evaln (k + 1) cf n → x ∈ eval cf n\nhg : ∀ (n x : ℕ), x ∈ evaln (k + 1) cg n → x ∈ eval cg n\nn x : ℕ\nleft✝ : n ≤ k\nh : ∃ a, evaln (k + 1) cg n = some a ∧ evaln (k + 1) cf a = some x\n⊢ ∃ a, a ∈ eval cg n ∧ x ∈ eval cf a\n[PROOFSTEP]\nrcases h with ⟨y, eg, ef⟩\n[GOAL]\ncase comp.intro.intro.intro\nk : ℕ\nc : Code\nn✝ x✝ : ℕ\nh : x✝ ∈ evaln (k + 1) c n✝\ncf cg : Code\nhf : ∀ (n x : ℕ), x ∈ evaln (k + 1) cf n → x ∈ eval cf n\nhg : ∀ (n x : ℕ), x ∈ evaln (k + 1) cg n → x ∈ eval cg n\nn x : ℕ\nleft✝ : n ≤ k\ny : ℕ\neg : evaln (k + 1) cg n = some y\nef : evaln (k + 1) cf y = some x\n⊢ ∃ a, a ∈ eval cg n ∧ x ∈ eval cf a\n[PROOFSTEP]\nexact ⟨_, hg _ _ eg, hf _ _ ef⟩\n[GOAL]\ncase prec.intro\nk : ℕ\nc : Code\nn✝ x✝ : ℕ\nh✝ : x✝ ∈ evaln (k + 1) c n✝\ncf cg : Code\nhf : ∀ (n x : ℕ), x ∈ evaln (k + 1) cf n → x ∈ eval cf n\nhg : ∀ (n x : ℕ), x ∈ evaln (k + 1) cg n → x ∈ eval cg n\nn x : ℕ\nleft✝ : n ≤ k\nh :\n  Nat.rec (evaln (k + 1) cf (unpair n).fst)\n      (fun n_1 n_ih =>\n        Option.bind (evaln k (prec cf cg) (Nat.pair (unpair n).fst n_1)) fun i =>\n          evaln (k + 1) cg (Nat.pair (unpair n).fst (Nat.pair n_1 i)))\n      (unpair n).snd =\n    some x\n⊢ x ∈\n    Nat.rec (eval cf (unpair n).fst)\n      (fun y IH => Part.bind IH fun i => eval cg (Nat.pair (unpair n).fst (Nat.pair y i))) (unpair n).snd\n[PROOFSTEP]\nrevert h\n[GOAL]\ncase prec.intro\nk : ℕ\nc : Code\nn✝ x✝ : ℕ\nh : x✝ ∈ evaln (k + 1) c n✝\ncf cg : Code\nhf : ∀ (n x : ℕ), x ∈ evaln (k + 1) cf n → x ∈ eval cf n\nhg : ∀ (n x : ℕ), x ∈ evaln (k + 1) cg n → x ∈ eval cg n\nn x : ℕ\nleft✝ : n ≤ k\n⊢ Nat.rec (evaln (k + 1) cf (unpair n).fst)\n        (fun n_1 n_ih =>\n          Option.bind (evaln k (prec cf cg) (Nat.pair (unpair n).fst n_1)) fun i =>\n            evaln (k + 1) cg (Nat.pair (unpair n).fst (Nat.pair n_1 i)))\n        (unpair n).snd =\n      some x →\n    x ∈\n      Nat.rec (eval cf (unpair n).fst)\n        (fun y IH => Part.bind IH fun i => eval cg (Nat.pair (unpair n).fst (Nat.pair y i))) (unpair n).snd\n[PROOFSTEP]\ninduction' n.unpair.2 with m IH generalizing x\n[GOAL]\ncase prec.intro.zero\nk : ℕ\nc : Code\nn✝ x✝¹ : ℕ\nh : x✝¹ ∈ evaln (k + 1) c n✝\ncf cg : Code\nhf : ∀ (n x : ℕ), x ∈ evaln (k + 1) cf n → x ∈ eval cf n\nhg : ∀ (n x : ℕ), x ∈ evaln (k + 1) cg n → x ∈ eval cg n\nn x✝ : ℕ\nleft✝ : n ≤ k\nx : ℕ\n⊢ Nat.rec (evaln (k + 1) cf (unpair n).fst)\n        (fun n_1 n_ih =>\n          Option.bind (evaln k (prec cf cg) (Nat.pair (unpair n).fst n_1)) fun i =>\n            evaln (k + 1) cg (Nat.pair (unpair n).fst (Nat.pair n_1 i)))\n        Nat.zero =\n      some x →\n    x ∈\n      Nat.rec (eval cf (unpair n).fst)\n        (fun y IH => Part.bind IH fun i => eval cg (Nat.pair (unpair n).fst (Nat.pair y i))) Nat.zero\n[PROOFSTEP]\nsimp\n[GOAL]\ncase prec.intro.succ\nk : ℕ\nc : Code\nn✝ x✝¹ : ℕ\nh : x✝¹ ∈ evaln (k + 1) c n✝\ncf cg : Code\nhf : ∀ (n x : ℕ), x ∈ evaln (k + 1) cf n → x ∈ eval cf n\nhg : ∀ (n x : ℕ), x ∈ evaln (k + 1) cg n → x ∈ eval cg n\nn x✝ : ℕ\nleft✝ : n ≤ k\nm : ℕ\nIH :\n  ∀ (x : ℕ),\n    Nat.rec (evaln (k + 1) cf (unpair n).fst)\n          (fun n_1 n_ih =>\n            Option.bind (evaln k (prec cf cg) (Nat.pair (unpair n).fst n_1)) fun i =>\n              evaln (k + 1) cg (Nat.pair (unpair n).fst (Nat.pair n_1 i)))\n          m =\n        some x →\n      x ∈\n        Nat.rec (eval cf (unpair n).fst)\n          (fun y IH => Part.bind IH fun i => eval cg (Nat.pair (unpair n).fst (Nat.pair y i))) m\nx : ℕ\n⊢ Nat.rec (evaln (k + 1) cf (unpair n).fst)\n        (fun n_1 n_ih =>\n          Option.bind (evaln k (prec cf cg) (Nat.pair (unpair n).fst n_1)) fun i =>\n            evaln (k + 1) cg (Nat.pair (unpair n).fst (Nat.pair n_1 i)))\n        (Nat.succ m) =\n      some x →\n    x ∈\n      Nat.rec (eval cf (unpair n).fst)\n        (fun y IH => Part.bind IH fun i => eval cg (Nat.pair (unpair n).fst (Nat.pair y i))) (Nat.succ m)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase prec.intro.zero\nk : ℕ\nc : Code\nn✝ x✝¹ : ℕ\nh : x✝¹ ∈ evaln (k + 1) c n✝\ncf cg : Code\nhf : ∀ (n x : ℕ), x ∈ evaln (k + 1) cf n → x ∈ eval cf n\nhg : ∀ (n x : ℕ), x ∈ evaln (k + 1) cg n → x ∈ eval cg n\nn x✝ : ℕ\nleft✝ : n ≤ k\nx : ℕ\n⊢ evaln (k + 1) cf (unpair n).fst = some x → x ∈ eval cf (unpair n).fst\n[PROOFSTEP]\napply hf\n[GOAL]\ncase prec.intro.succ\nk : ℕ\nc : Code\nn✝ x✝¹ : ℕ\nh : x✝¹ ∈ evaln (k + 1) c n✝\ncf cg : Code\nhf : ∀ (n x : ℕ), x ∈ evaln (k + 1) cf n → x ∈ eval cf n\nhg : ∀ (n x : ℕ), x ∈ evaln (k + 1) cg n → x ∈ eval cg n\nn x✝ : ℕ\nleft✝ : n ≤ k\nm : ℕ\nIH :\n  ∀ (x : ℕ),\n    Nat.rec (evaln (k + 1) cf (unpair n).fst)\n          (fun n_1 n_ih =>\n            Option.bind (evaln k (prec cf cg) (Nat.pair (unpair n).fst n_1)) fun i =>\n              evaln (k + 1) cg (Nat.pair (unpair n).fst (Nat.pair n_1 i)))\n          m =\n        some x →\n      x ∈\n        Nat.rec (eval cf (unpair n).fst)\n          (fun y IH => Part.bind IH fun i => eval cg (Nat.pair (unpair n).fst (Nat.pair y i))) m\nx : ℕ\n⊢ ∀ (x_1 : ℕ),\n    evaln k (prec cf cg) (Nat.pair (unpair n).fst m) = some x_1 →\n      evaln (k + 1) cg (Nat.pair (unpair n).fst (Nat.pair m x_1)) = some x →\n        ∃ a,\n          a ∈\n              Nat.rec (eval cf (unpair n).fst)\n                (fun y IH => Part.bind IH fun i => eval cg (Nat.pair (unpair n).fst (Nat.pair y i))) m ∧\n            x ∈ eval cg (Nat.pair (unpair n).fst (Nat.pair m a))\n[PROOFSTEP]\nrefine' fun y h₁ h₂ => ⟨y, IH _ _, _⟩\n[GOAL]\ncase prec.intro.succ.refine'_1\nk : ℕ\nc : Code\nn✝ x✝¹ : ℕ\nh : x✝¹ ∈ evaln (k + 1) c n✝\ncf cg : Code\nhf : ∀ (n x : ℕ), x ∈ evaln (k + 1) cf n → x ∈ eval cf n\nhg : ∀ (n x : ℕ), x ∈ evaln (k + 1) cg n → x ∈ eval cg n\nn x✝ : ℕ\nleft✝ : n ≤ k\nm : ℕ\nIH :\n  ∀ (x : ℕ),\n    Nat.rec (evaln (k + 1) cf (unpair n).fst)\n          (fun n_1 n_ih =>\n            Option.bind (evaln k (prec cf cg) (Nat.pair (unpair n).fst n_1)) fun i =>\n              evaln (k + 1) cg (Nat.pair (unpair n).fst (Nat.pair n_1 i)))\n          m =\n        some x →\n      x ∈\n        Nat.rec (eval cf (unpair n).fst)\n          (fun y IH => Part.bind IH fun i => eval cg (Nat.pair (unpair n).fst (Nat.pair y i))) m\nx y : ℕ\nh₁ : evaln k (prec cf cg) (Nat.pair (unpair n).fst m) = some y\nh₂ : evaln (k + 1) cg (Nat.pair (unpair n).fst (Nat.pair m y)) = some x\n⊢ Nat.rec (evaln (k + 1) cf (unpair n).fst)\n      (fun n_1 n_ih =>\n        Option.bind (evaln k (prec cf cg) (Nat.pair (unpair n).fst n_1)) fun i =>\n          evaln (k + 1) cg (Nat.pair (unpair n).fst (Nat.pair n_1 i)))\n      m =\n    some y\n[PROOFSTEP]\nhave := evaln_mono k.le_succ h₁\n[GOAL]\ncase prec.intro.succ.refine'_1\nk : ℕ\nc : Code\nn✝ x✝¹ : ℕ\nh : x✝¹ ∈ evaln (k + 1) c n✝\ncf cg : Code\nhf : ∀ (n x : ℕ), x ∈ evaln (k + 1) cf n → x ∈ eval cf n\nhg : ∀ (n x : ℕ), x ∈ evaln (k + 1) cg n → x ∈ eval cg n\nn x✝ : ℕ\nleft✝ : n ≤ k\nm : ℕ\nIH :\n  ∀ (x : ℕ),\n    Nat.rec (evaln (k + 1) cf (unpair n).fst)\n          (fun n_1 n_ih =>\n            Option.bind (evaln k (prec cf cg) (Nat.pair (unpair n).fst n_1)) fun i =>\n              evaln (k + 1) cg (Nat.pair (unpair n).fst (Nat.pair n_1 i)))\n          m =\n        some x →\n      x ∈\n        Nat.rec (eval cf (unpair n).fst)\n          (fun y IH => Part.bind IH fun i => eval cg (Nat.pair (unpair n).fst (Nat.pair y i))) m\nx y : ℕ\nh₁ : evaln k (prec cf cg) (Nat.pair (unpair n).fst m) = some y\nh₂ : evaln (k + 1) cg (Nat.pair (unpair n).fst (Nat.pair m y)) = some x\nthis : y ∈ evaln (Nat.succ k) (prec cf cg) (Nat.pair (unpair n).fst m)\n⊢ Nat.rec (evaln (k + 1) cf (unpair n).fst)\n      (fun n_1 n_ih =>\n        Option.bind (evaln k (prec cf cg) (Nat.pair (unpair n).fst n_1)) fun i =>\n          evaln (k + 1) cg (Nat.pair (unpair n).fst (Nat.pair n_1 i)))\n      m =\n    some y\n[PROOFSTEP]\nsimp [evaln, Bind.bind] at this \n[GOAL]\ncase prec.intro.succ.refine'_1\nk : ℕ\nc : Code\nn✝ x✝¹ : ℕ\nh : x✝¹ ∈ evaln (k + 1) c n✝\ncf cg : Code\nhf : ∀ (n x : ℕ), x ∈ evaln (k + 1) cf n → x ∈ eval cf n\nhg : ∀ (n x : ℕ), x ∈ evaln (k + 1) cg n → x ∈ eval cg n\nn x✝ : ℕ\nleft✝ : n ≤ k\nm : ℕ\nIH :\n  ∀ (x : ℕ),\n    Nat.rec (evaln (k + 1) cf (unpair n).fst)\n          (fun n_1 n_ih =>\n            Option.bind (evaln k (prec cf cg) (Nat.pair (unpair n).fst n_1)) fun i =>\n              evaln (k + 1) cg (Nat.pair (unpair n).fst (Nat.pair n_1 i)))\n          m =\n        some x →\n      x ∈\n        Nat.rec (eval cf (unpair n).fst)\n          (fun y IH => Part.bind IH fun i => eval cg (Nat.pair (unpair n).fst (Nat.pair y i))) m\nx y : ℕ\nh₁ : evaln k (prec cf cg) (Nat.pair (unpair n).fst m) = some y\nh₂ : evaln (k + 1) cg (Nat.pair (unpair n).fst (Nat.pair m y)) = some x\nthis :\n  Nat.pair (unpair n).fst m ≤ k ∧\n    Nat.rec (evaln (k + 1) cf (unpair n).fst)\n        (fun n_1 n_ih =>\n          Option.bind (evaln k (prec cf cg) (Nat.pair (unpair n).fst n_1)) fun i =>\n            evaln (k + 1) cg (Nat.pair (unpair n).fst (Nat.pair n_1 i)))\n        m =\n      some y\n⊢ Nat.rec (evaln (k + 1) cf (unpair n).fst)\n      (fun n_1 n_ih =>\n        Option.bind (evaln k (prec cf cg) (Nat.pair (unpair n).fst n_1)) fun i =>\n          evaln (k + 1) cg (Nat.pair (unpair n).fst (Nat.pair n_1 i)))\n      m =\n    some y\n[PROOFSTEP]\nexact this.2\n[GOAL]\ncase prec.intro.succ.refine'_2\nk : ℕ\nc : Code\nn✝ x✝¹ : ℕ\nh : x✝¹ ∈ evaln (k + 1) c n✝\ncf cg : Code\nhf : ∀ (n x : ℕ), x ∈ evaln (k + 1) cf n → x ∈ eval cf n\nhg : ∀ (n x : ℕ), x ∈ evaln (k + 1) cg n → x ∈ eval cg n\nn x✝ : ℕ\nleft✝ : n ≤ k\nm : ℕ\nIH :\n  ∀ (x : ℕ),\n    Nat.rec (evaln (k + 1) cf (unpair n).fst)\n          (fun n_1 n_ih =>\n            Option.bind (evaln k (prec cf cg) (Nat.pair (unpair n).fst n_1)) fun i =>\n              evaln (k + 1) cg (Nat.pair (unpair n).fst (Nat.pair n_1 i)))\n          m =\n        some x →\n      x ∈\n        Nat.rec (eval cf (unpair n).fst)\n          (fun y IH => Part.bind IH fun i => eval cg (Nat.pair (unpair n).fst (Nat.pair y i))) m\nx y : ℕ\nh₁ : evaln k (prec cf cg) (Nat.pair (unpair n).fst m) = some y\nh₂ : evaln (k + 1) cg (Nat.pair (unpair n).fst (Nat.pair m y)) = some x\n⊢ x ∈ eval cg (Nat.pair (unpair n).fst (Nat.pair m y))\n[PROOFSTEP]\nexact hg _ _ h₂\n[GOAL]\ncase rfind'.intro\nk : ℕ\nc : Code\nn✝ x✝ : ℕ\nh✝ : x✝ ∈ evaln (k + 1) c n✝\ncf : Code\nhf : ∀ (n x : ℕ), x ∈ evaln (k + 1) cf n → x ∈ eval cf n\nn x : ℕ\nleft✝ : n ≤ k\nh :\n  ∃ a,\n    evaln (k + 1) cf n = some a ∧\n      (if a = 0 then pure (unpair n).snd else evaln k (rfind' cf) (Nat.pair (unpair n).fst ((unpair n).snd + 1))) =\n        some x\n⊢ ∃ a,\n    (0 ∈ eval cf (Nat.pair (unpair n).fst (a + (unpair n).snd)) ∧\n        ∀ {m : ℕ}, m < a → ∃ a, a ∈ eval cf (Nat.pair (unpair n).fst (m + (unpair n).snd)) ∧ ¬a = 0) ∧\n      a + (unpair n).snd = x\n[PROOFSTEP]\nrcases h with ⟨m, h₁, h₂⟩\n[GOAL]\ncase rfind'.intro.intro.intro\nk : ℕ\nc : Code\nn✝ x✝ : ℕ\nh : x✝ ∈ evaln (k + 1) c n✝\ncf : Code\nhf : ∀ (n x : ℕ), x ∈ evaln (k + 1) cf n → x ∈ eval cf n\nn x : ℕ\nleft✝ : n ≤ k\nm : ℕ\nh₁ : evaln (k + 1) cf n = some m\nh₂ :\n  (if m = 0 then pure (unpair n).snd else evaln k (rfind' cf) (Nat.pair (unpair n).fst ((unpair n).snd + 1))) = some x\n⊢ ∃ a,\n    (0 ∈ eval cf (Nat.pair (unpair n).fst (a + (unpair n).snd)) ∧\n        ∀ {m : ℕ}, m < a → ∃ a, a ∈ eval cf (Nat.pair (unpair n).fst (m + (unpair n).snd)) ∧ ¬a = 0) ∧\n      a + (unpair n).snd = x\n[PROOFSTEP]\nby_cases m0 : m = 0\n[GOAL]\ncase pos\nk : ℕ\nc : Code\nn✝ x✝ : ℕ\nh : x✝ ∈ evaln (k + 1) c n✝\ncf : Code\nhf : ∀ (n x : ℕ), x ∈ evaln (k + 1) cf n → x ∈ eval cf n\nn x : ℕ\nleft✝ : n ≤ k\nm : ℕ\nh₁ : evaln (k + 1) cf n = some m\nh₂ :\n  (if m = 0 then pure (unpair n).snd else evaln k (rfind' cf) (Nat.pair (unpair n).fst ((unpair n).snd + 1))) = some x\nm0 : m = 0\n⊢ ∃ a,\n    (0 ∈ eval cf (Nat.pair (unpair n).fst (a + (unpair n).snd)) ∧\n        ∀ {m : ℕ}, m < a → ∃ a, a ∈ eval cf (Nat.pair (unpair n).fst (m + (unpair n).snd)) ∧ ¬a = 0) ∧\n      a + (unpair n).snd = x\n[PROOFSTEP]\nsimp [m0] at h₂ \n[GOAL]\ncase neg\nk : ℕ\nc : Code\nn✝ x✝ : ℕ\nh : x✝ ∈ evaln (k + 1) c n✝\ncf : Code\nhf : ∀ (n x : ℕ), x ∈ evaln (k + 1) cf n → x ∈ eval cf n\nn x : ℕ\nleft✝ : n ≤ k\nm : ℕ\nh₁ : evaln (k + 1) cf n = some m\nh₂ :\n  (if m = 0 then pure (unpair n).snd else evaln k (rfind' cf) (Nat.pair (unpair n).fst ((unpair n).snd + 1))) = some x\nm0 : ¬m = 0\n⊢ ∃ a,\n    (0 ∈ eval cf (Nat.pair (unpair n).fst (a + (unpair n).snd)) ∧\n        ∀ {m : ℕ}, m < a → ∃ a, a ∈ eval cf (Nat.pair (unpair n).fst (m + (unpair n).snd)) ∧ ¬a = 0) ∧\n      a + (unpair n).snd = x\n[PROOFSTEP]\nsimp [m0] at h₂ \n[GOAL]\ncase pos\nk : ℕ\nc : Code\nn✝ x✝ : ℕ\nh : x✝ ∈ evaln (k + 1) c n✝\ncf : Code\nhf : ∀ (n x : ℕ), x ∈ evaln (k + 1) cf n → x ∈ eval cf n\nn x : ℕ\nleft✝ : n ≤ k\nm : ℕ\nh₁ : evaln (k + 1) cf n = some m\nm0 : m = 0\nh₂ : pure (unpair n).snd = some x\n⊢ ∃ a,\n    (0 ∈ eval cf (Nat.pair (unpair n).fst (a + (unpair n).snd)) ∧\n        ∀ {m : ℕ}, m < a → ∃ a, a ∈ eval cf (Nat.pair (unpair n).fst (m + (unpair n).snd)) ∧ ¬a = 0) ∧\n      a + (unpair n).snd = x\n[PROOFSTEP]\nexact ⟨0, ⟨by simpa [m0] using hf _ _ h₁, fun {m} => (Nat.not_lt_zero _).elim⟩, by injection h₂ with h₂; simp [h₂]⟩\n[GOAL]\nk : ℕ\nc : Code\nn✝ x✝ : ℕ\nh : x✝ ∈ evaln (k + 1) c n✝\ncf : Code\nhf : ∀ (n x : ℕ), x ∈ evaln (k + 1) cf n → x ∈ eval cf n\nn x : ℕ\nleft✝ : n ≤ k\nm : ℕ\nh₁ : evaln (k + 1) cf n = some m\nm0 : m = 0\nh₂ : pure (unpair n).snd = some x\n⊢ 0 ∈ eval cf (Nat.pair (unpair n).fst (0 + (unpair n).snd))\n[PROOFSTEP]\nsimpa [m0] using hf _ _ h₁\n[GOAL]\nk : ℕ\nc : Code\nn✝ x✝ : ℕ\nh : x✝ ∈ evaln (k + 1) c n✝\ncf : Code\nhf : ∀ (n x : ℕ), x ∈ evaln (k + 1) cf n → x ∈ eval cf n\nn x : ℕ\nleft✝ : n ≤ k\nm : ℕ\nh₁ : evaln (k + 1) cf n = some m\nm0 : m = 0\nh₂ : pure (unpair n).snd = some x\n⊢ 0 + (unpair n).snd = x\n[PROOFSTEP]\ninjection h₂ with h₂\n[GOAL]\nk : ℕ\nc : Code\nn✝ x✝ : ℕ\nh : x✝ ∈ evaln (k + 1) c n✝\ncf : Code\nhf : ∀ (n x : ℕ), x ∈ evaln (k + 1) cf n → x ∈ eval cf n\nn x : ℕ\nleft✝ : n ≤ k\nm : ℕ\nh₁ : evaln (k + 1) cf n = some m\nm0 : m = 0\nh₂ : (unpair n).snd = x\n⊢ 0 + (unpair n).snd = x\n[PROOFSTEP]\nsimp [h₂]\n[GOAL]\ncase neg\nk : ℕ\nc : Code\nn✝ x✝ : ℕ\nh : x✝ ∈ evaln (k + 1) c n✝\ncf : Code\nhf : ∀ (n x : ℕ), x ∈ evaln (k + 1) cf n → x ∈ eval cf n\nn x : ℕ\nleft✝ : n ≤ k\nm : ℕ\nh₁ : evaln (k + 1) cf n = some m\nm0 : ¬m = 0\nh₂ : evaln k (rfind' cf) (Nat.pair (unpair n).fst ((unpair n).snd + 1)) = some x\n⊢ ∃ a,\n    (0 ∈ eval cf (Nat.pair (unpair n).fst (a + (unpair n).snd)) ∧\n        ∀ {m : ℕ}, m < a → ∃ a, a ∈ eval cf (Nat.pair (unpair n).fst (m + (unpair n).snd)) ∧ ¬a = 0) ∧\n      a + (unpair n).snd = x\n[PROOFSTEP]\nhave := evaln_sound h₂\n[GOAL]\ncase neg\nk : ℕ\nc : Code\nn✝ x✝ : ℕ\nh : x✝ ∈ evaln (k + 1) c n✝\ncf : Code\nhf : ∀ (n x : ℕ), x ∈ evaln (k + 1) cf n → x ∈ eval cf n\nn x : ℕ\nleft✝ : n ≤ k\nm : ℕ\nh₁ : evaln (k + 1) cf n = some m\nm0 : ¬m = 0\nh₂ : evaln k (rfind' cf) (Nat.pair (unpair n).fst ((unpair n).snd + 1)) = some x\nthis : x ∈ eval (rfind' cf) (Nat.pair (unpair n).fst ((unpair n).snd + 1))\n⊢ ∃ a,\n    (0 ∈ eval cf (Nat.pair (unpair n).fst (a + (unpair n).snd)) ∧\n        ∀ {m : ℕ}, m < a → ∃ a, a ∈ eval cf (Nat.pair (unpair n).fst (m + (unpair n).snd)) ∧ ¬a = 0) ∧\n      a + (unpair n).snd = x\n[PROOFSTEP]\nsimp [eval] at this \n[GOAL]\ncase neg\nk : ℕ\nc : Code\nn✝ x✝ : ℕ\nh : x✝ ∈ evaln (k + 1) c n✝\ncf : Code\nhf : ∀ (n x : ℕ), x ∈ evaln (k + 1) cf n → x ∈ eval cf n\nn x : ℕ\nleft✝ : n ≤ k\nm : ℕ\nh₁ : evaln (k + 1) cf n = some m\nm0 : ¬m = 0\nh₂ : evaln k (rfind' cf) (Nat.pair (unpair n).fst ((unpair n).snd + 1)) = some x\nthis :\n  ∃ a,\n    (0 ∈ eval cf (Nat.pair (unpair n).fst (a + ((unpair n).snd + 1))) ∧\n        ∀ {m : ℕ}, m < a → ∃ a, a ∈ eval cf (Nat.pair (unpair n).fst (m + ((unpair n).snd + 1))) ∧ ¬a = 0) ∧\n      a + ((unpair n).snd + 1) = x\n⊢ ∃ a,\n    (0 ∈ eval cf (Nat.pair (unpair n).fst (a + (unpair n).snd)) ∧\n        ∀ {m : ℕ}, m < a → ∃ a, a ∈ eval cf (Nat.pair (unpair n).fst (m + (unpair n).snd)) ∧ ¬a = 0) ∧\n      a + (unpair n).snd = x\n[PROOFSTEP]\nrcases this with ⟨y, ⟨hy₁, hy₂⟩, rfl⟩\n[GOAL]\ncase neg.intro.intro.intro\nk : ℕ\nc : Code\nn✝ x : ℕ\nh : x ∈ evaln (k + 1) c n✝\ncf : Code\nhf : ∀ (n x : ℕ), x ∈ evaln (k + 1) cf n → x ∈ eval cf n\nn : ℕ\nleft✝ : n ≤ k\nm : ℕ\nh₁ : evaln (k + 1) cf n = some m\nm0 : ¬m = 0\ny : ℕ\nhy₁ : 0 ∈ eval cf (Nat.pair (unpair n).fst (y + ((unpair n).snd + 1)))\nhy₂ : ∀ {m : ℕ}, m < y → ∃ a, a ∈ eval cf (Nat.pair (unpair n).fst (m + ((unpair n).snd + 1))) ∧ ¬a = 0\nh₂ : evaln k (rfind' cf) (Nat.pair (unpair n).fst ((unpair n).snd + 1)) = some (y + ((unpair n).snd + 1))\n⊢ ∃ a,\n    (0 ∈ eval cf (Nat.pair (unpair n).fst (a + (unpair n).snd)) ∧\n        ∀ {m : ℕ}, m < a → ∃ a, a ∈ eval cf (Nat.pair (unpair n).fst (m + (unpair n).snd)) ∧ ¬a = 0) ∧\n      a + (unpair n).snd = y + ((unpair n).snd + 1)\n[PROOFSTEP]\nrefine' ⟨y + 1, ⟨by simpa [add_comm, add_left_comm] using hy₁, fun {i} im => _⟩, by simp [add_comm, add_left_comm]⟩\n[GOAL]\nk : ℕ\nc : Code\nn✝ x : ℕ\nh : x ∈ evaln (k + 1) c n✝\ncf : Code\nhf : ∀ (n x : ℕ), x ∈ evaln (k + 1) cf n → x ∈ eval cf n\nn : ℕ\nleft✝ : n ≤ k\nm : ℕ\nh₁ : evaln (k + 1) cf n = some m\nm0 : ¬m = 0\ny : ℕ\nhy₁ : 0 ∈ eval cf (Nat.pair (unpair n).fst (y + ((unpair n).snd + 1)))\nhy₂ : ∀ {m : ℕ}, m < y → ∃ a, a ∈ eval cf (Nat.pair (unpair n).fst (m + ((unpair n).snd + 1))) ∧ ¬a = 0\nh₂ : evaln k (rfind' cf) (Nat.pair (unpair n).fst ((unpair n).snd + 1)) = some (y + ((unpair n).snd + 1))\n⊢ 0 ∈ eval cf (Nat.pair (unpair n).fst (y + 1 + (unpair n).snd))\n[PROOFSTEP]\nsimpa [add_comm, add_left_comm] using hy₁\n[GOAL]\nk : ℕ\nc : Code\nn✝ x : ℕ\nh : x ∈ evaln (k + 1) c n✝\ncf : Code\nhf : ∀ (n x : ℕ), x ∈ evaln (k + 1) cf n → x ∈ eval cf n\nn : ℕ\nleft✝ : n ≤ k\nm : ℕ\nh₁ : evaln (k + 1) cf n = some m\nm0 : ¬m = 0\ny : ℕ\nhy₁ : 0 ∈ eval cf (Nat.pair (unpair n).fst (y + ((unpair n).snd + 1)))\nhy₂ : ∀ {m : ℕ}, m < y → ∃ a, a ∈ eval cf (Nat.pair (unpair n).fst (m + ((unpair n).snd + 1))) ∧ ¬a = 0\nh₂ : evaln k (rfind' cf) (Nat.pair (unpair n).fst ((unpair n).snd + 1)) = some (y + ((unpair n).snd + 1))\n⊢ y + 1 + (unpair n).snd = y + ((unpair n).snd + 1)\n[PROOFSTEP]\nsimp [add_comm, add_left_comm]\n[GOAL]\ncase neg.intro.intro.intro\nk : ℕ\nc : Code\nn✝ x : ℕ\nh : x ∈ evaln (k + 1) c n✝\ncf : Code\nhf : ∀ (n x : ℕ), x ∈ evaln (k + 1) cf n → x ∈ eval cf n\nn : ℕ\nleft✝ : n ≤ k\nm : ℕ\nh₁ : evaln (k + 1) cf n = some m\nm0 : ¬m = 0\ny : ℕ\nhy₁ : 0 ∈ eval cf (Nat.pair (unpair n).fst (y + ((unpair n).snd + 1)))\nhy₂ : ∀ {m : ℕ}, m < y → ∃ a, a ∈ eval cf (Nat.pair (unpair n).fst (m + ((unpair n).snd + 1))) ∧ ¬a = 0\nh₂ : evaln k (rfind' cf) (Nat.pair (unpair n).fst ((unpair n).snd + 1)) = some (y + ((unpair n).snd + 1))\ni : ℕ\nim : i < y + 1\n⊢ ∃ a, a ∈ eval cf (Nat.pair (unpair n).fst (i + (unpair n).snd)) ∧ ¬a = 0\n[PROOFSTEP]\ncases' i with i\n[GOAL]\ncase neg.intro.intro.intro.zero\nk : ℕ\nc : Code\nn✝ x : ℕ\nh : x ∈ evaln (k + 1) c n✝\ncf : Code\nhf : ∀ (n x : ℕ), x ∈ evaln (k + 1) cf n → x ∈ eval cf n\nn : ℕ\nleft✝ : n ≤ k\nm : ℕ\nh₁ : evaln (k + 1) cf n = some m\nm0 : ¬m = 0\ny : ℕ\nhy₁ : 0 ∈ eval cf (Nat.pair (unpair n).fst (y + ((unpair n).snd + 1)))\nhy₂ : ∀ {m : ℕ}, m < y → ∃ a, a ∈ eval cf (Nat.pair (unpair n).fst (m + ((unpair n).snd + 1))) ∧ ¬a = 0\nh₂ : evaln k (rfind' cf) (Nat.pair (unpair n).fst ((unpair n).snd + 1)) = some (y + ((unpair n).snd + 1))\nim : Nat.zero < y + 1\n⊢ ∃ a, a ∈ eval cf (Nat.pair (unpair n).fst (Nat.zero + (unpair n).snd)) ∧ ¬a = 0\n[PROOFSTEP]\nexact ⟨m, by simpa using hf _ _ h₁, m0⟩\n[GOAL]\nk : ℕ\nc : Code\nn✝ x : ℕ\nh : x ∈ evaln (k + 1) c n✝\ncf : Code\nhf : ∀ (n x : ℕ), x ∈ evaln (k + 1) cf n → x ∈ eval cf n\nn : ℕ\nleft✝ : n ≤ k\nm : ℕ\nh₁ : evaln (k + 1) cf n = some m\nm0 : ¬m = 0\ny : ℕ\nhy₁ : 0 ∈ eval cf (Nat.pair (unpair n).fst (y + ((unpair n).snd + 1)))\nhy₂ : ∀ {m : ℕ}, m < y → ∃ a, a ∈ eval cf (Nat.pair (unpair n).fst (m + ((unpair n).snd + 1))) ∧ ¬a = 0\nh₂ : evaln k (rfind' cf) (Nat.pair (unpair n).fst ((unpair n).snd + 1)) = some (y + ((unpair n).snd + 1))\nim : Nat.zero < y + 1\n⊢ m ∈ eval cf (Nat.pair (unpair n).fst (Nat.zero + (unpair n).snd))\n[PROOFSTEP]\nsimpa using hf _ _ h₁\n[GOAL]\ncase neg.intro.intro.intro.succ\nk : ℕ\nc : Code\nn✝ x : ℕ\nh : x ∈ evaln (k + 1) c n✝\ncf : Code\nhf : ∀ (n x : ℕ), x ∈ evaln (k + 1) cf n → x ∈ eval cf n\nn : ℕ\nleft✝ : n ≤ k\nm : ℕ\nh₁ : evaln (k + 1) cf n = some m\nm0 : ¬m = 0\ny : ℕ\nhy₁ : 0 ∈ eval cf (Nat.pair (unpair n).fst (y + ((unpair n).snd + 1)))\nhy₂ : ∀ {m : ℕ}, m < y → ∃ a, a ∈ eval cf (Nat.pair (unpair n).fst (m + ((unpair n).snd + 1))) ∧ ¬a = 0\nh₂ : evaln k (rfind' cf) (Nat.pair (unpair n).fst ((unpair n).snd + 1)) = some (y + ((unpair n).snd + 1))\ni : ℕ\nim : Nat.succ i < y + 1\n⊢ ∃ a, a ∈ eval cf (Nat.pair (unpair n).fst (Nat.succ i + (unpair n).snd)) ∧ ¬a = 0\n[PROOFSTEP]\nrcases hy₂ (Nat.lt_of_succ_lt_succ im) with ⟨z, hz, z0⟩\n[GOAL]\ncase neg.intro.intro.intro.succ.intro.intro\nk : ℕ\nc : Code\nn✝ x : ℕ\nh : x ∈ evaln (k + 1) c n✝\ncf : Code\nhf : ∀ (n x : ℕ), x ∈ evaln (k + 1) cf n → x ∈ eval cf n\nn : ℕ\nleft✝ : n ≤ k\nm : ℕ\nh₁ : evaln (k + 1) cf n = some m\nm0 : ¬m = 0\ny : ℕ\nhy₁ : 0 ∈ eval cf (Nat.pair (unpair n).fst (y + ((unpair n).snd + 1)))\nhy₂ : ∀ {m : ℕ}, m < y → ∃ a, a ∈ eval cf (Nat.pair (unpair n).fst (m + ((unpair n).snd + 1))) ∧ ¬a = 0\nh₂ : evaln k (rfind' cf) (Nat.pair (unpair n).fst ((unpair n).snd + 1)) = some (y + ((unpair n).snd + 1))\ni : ℕ\nim : Nat.succ i < y + 1\nz : ℕ\nhz : z ∈ eval cf (Nat.pair (unpair n).fst (i + ((unpair n).snd + 1)))\nz0 : ¬z = 0\n⊢ ∃ a, a ∈ eval cf (Nat.pair (unpair n).fst (Nat.succ i + (unpair n).snd)) ∧ ¬a = 0\n[PROOFSTEP]\nexact ⟨z, by simpa [Nat.succ_eq_add_one, add_comm, add_left_comm] using hz, z0⟩\n[GOAL]\nk : ℕ\nc : Code\nn✝ x : ℕ\nh : x ∈ evaln (k + 1) c n✝\ncf : Code\nhf : ∀ (n x : ℕ), x ∈ evaln (k + 1) cf n → x ∈ eval cf n\nn : ℕ\nleft✝ : n ≤ k\nm : ℕ\nh₁ : evaln (k + 1) cf n = some m\nm0 : ¬m = 0\ny : ℕ\nhy₁ : 0 ∈ eval cf (Nat.pair (unpair n).fst (y + ((unpair n).snd + 1)))\nhy₂ : ∀ {m : ℕ}, m < y → ∃ a, a ∈ eval cf (Nat.pair (unpair n).fst (m + ((unpair n).snd + 1))) ∧ ¬a = 0\nh₂ : evaln k (rfind' cf) (Nat.pair (unpair n).fst ((unpair n).snd + 1)) = some (y + ((unpair n).snd + 1))\ni : ℕ\nim : Nat.succ i < y + 1\nz : ℕ\nhz : z ∈ eval cf (Nat.pair (unpair n).fst (i + ((unpair n).snd + 1)))\nz0 : ¬z = 0\n⊢ z ∈ eval cf (Nat.pair (unpair n).fst (Nat.succ i + (unpair n).snd))\n[PROOFSTEP]\nsimpa [Nat.succ_eq_add_one, add_comm, add_left_comm] using hz\n[GOAL]\nc : Code\nn x : ℕ\nh : x ∈ eval c n\n⊢ ∃ k, x ∈ evaln k c n\n[PROOFSTEP]\nrsuffices ⟨k, h⟩ : ∃ k, x ∈ evaln (k + 1) c n\n[GOAL]\ncase intro\nc : Code\nn x : ℕ\nh✝ : x ∈ eval c n\nk : ℕ\nh : x ∈ evaln (k + 1) c n\n⊢ ∃ k, x ∈ evaln k c n\n[PROOFSTEP]\nexact ⟨k + 1, h⟩\n[GOAL]\nc : Code\nn x : ℕ\nh : x ∈ eval c n\n⊢ ∃ k, x ∈ evaln (k + 1) c n\n[PROOFSTEP]\ninduction c generalizing n x\n[GOAL]\ncase zero\nn x : ℕ\nh : x ∈ eval zero n\n⊢ ∃ k, x ∈ evaln (k + 1) zero n\n[PROOFSTEP]\nsimp [eval, evaln, pure, PFun.pure, Seq.seq, Bind.bind] at h ⊢\n[GOAL]\ncase succ\nn x : ℕ\nh : x ∈ eval succ n\n⊢ ∃ k, x ∈ evaln (k + 1) succ n\n[PROOFSTEP]\nsimp [eval, evaln, pure, PFun.pure, Seq.seq, Bind.bind] at h ⊢\n[GOAL]\ncase left\nn x : ℕ\nh : x ∈ eval left n\n⊢ ∃ k, x ∈ evaln (k + 1) left n\n[PROOFSTEP]\nsimp [eval, evaln, pure, PFun.pure, Seq.seq, Bind.bind] at h ⊢\n[GOAL]\ncase right\nn x : ℕ\nh : x ∈ eval right n\n⊢ ∃ k, x ∈ evaln (k + 1) right n\n[PROOFSTEP]\nsimp [eval, evaln, pure, PFun.pure, Seq.seq, Bind.bind] at h ⊢\n[GOAL]\ncase pair\na✝¹ a✝ : Code\na_ih✝¹ : ∀ {n x : ℕ}, x ∈ eval a✝¹ n → ∃ k, x ∈ evaln (k + 1) a✝¹ n\na_ih✝ : ∀ {n x : ℕ}, x ∈ eval a✝ n → ∃ k, x ∈ evaln (k + 1) a✝ n\nn x : ℕ\nh : x ∈ eval (pair a✝¹ a✝) n\n⊢ ∃ k, x ∈ evaln (k + 1) (pair a✝¹ a✝) n\n[PROOFSTEP]\nsimp [eval, evaln, pure, PFun.pure, Seq.seq, Bind.bind] at h ⊢\n[GOAL]\ncase comp\na✝¹ a✝ : Code\na_ih✝¹ : ∀ {n x : ℕ}, x ∈ eval a✝¹ n → ∃ k, x ∈ evaln (k + 1) a✝¹ n\na_ih✝ : ∀ {n x : ℕ}, x ∈ eval a✝ n → ∃ k, x ∈ evaln (k + 1) a✝ n\nn x : ℕ\nh : x ∈ eval (comp a✝¹ a✝) n\n⊢ ∃ k, x ∈ evaln (k + 1) (comp a✝¹ a✝) n\n[PROOFSTEP]\nsimp [eval, evaln, pure, PFun.pure, Seq.seq, Bind.bind] at h ⊢\n[GOAL]\ncase prec\na✝¹ a✝ : Code\na_ih✝¹ : ∀ {n x : ℕ}, x ∈ eval a✝¹ n → ∃ k, x ∈ evaln (k + 1) a✝¹ n\na_ih✝ : ∀ {n x : ℕ}, x ∈ eval a✝ n → ∃ k, x ∈ evaln (k + 1) a✝ n\nn x : ℕ\nh : x ∈ eval (prec a✝¹ a✝) n\n⊢ ∃ k, x ∈ evaln (k + 1) (prec a✝¹ a✝) n\n[PROOFSTEP]\nsimp [eval, evaln, pure, PFun.pure, Seq.seq, Bind.bind] at h ⊢\n[GOAL]\ncase rfind'\na✝ : Code\na_ih✝ : ∀ {n x : ℕ}, x ∈ eval a✝ n → ∃ k, x ∈ evaln (k + 1) a✝ n\nn x : ℕ\nh : x ∈ eval (rfind' a✝) n\n⊢ ∃ k, x ∈ evaln (k + 1) (rfind' a✝) n\n[PROOFSTEP]\nsimp [eval, evaln, pure, PFun.pure, Seq.seq, Bind.bind] at h ⊢\n[GOAL]\ncase zero\nn x : ℕ\nh : x = 0\n⊢ (∃ x, n ≤ x) ∧ 0 = x\ncase succ\nn x : ℕ\nh : x = Nat.succ n\n⊢ (∃ x, n ≤ x) ∧ Nat.succ n = x\ncase left\nn x : ℕ\nh : x = (unpair n).fst\n⊢ (∃ x, n ≤ x) ∧ (unpair n).fst = x\ncase right\nn x : ℕ\nh : x = (unpair n).snd\n⊢ (∃ x, n ≤ x) ∧ (unpair n).snd = x\ncase pair\na✝¹ a✝ : Code\na_ih✝¹ : ∀ {n x : ℕ}, x ∈ eval a✝¹ n → ∃ k, x ∈ evaln (k + 1) a✝¹ n\na_ih✝ : ∀ {n x : ℕ}, x ∈ eval a✝ n → ∃ k, x ∈ evaln (k + 1) a✝ n\nn x : ℕ\nh : ∃ a, a ∈ eval a✝¹ n ∧ ∃ a_1, a_1 ∈ eval a✝ n ∧ Nat.pair a a_1 = x\n⊢ ∃ k, n ≤ k ∧ ∃ a, evaln (k + 1) a✝¹ n = some a ∧ ∃ a_1, evaln (k + 1) a✝ n = some a_1 ∧ Nat.pair a a_1 = x\ncase comp\na✝¹ a✝ : Code\na_ih✝¹ : ∀ {n x : ℕ}, x ∈ eval a✝¹ n → ∃ k, x ∈ evaln (k + 1) a✝¹ n\na_ih✝ : ∀ {n x : ℕ}, x ∈ eval a✝ n → ∃ k, x ∈ evaln (k + 1) a✝ n\nn x : ℕ\nh : ∃ a, a ∈ eval a✝ n ∧ x ∈ eval a✝¹ a\n⊢ ∃ k, n ≤ k ∧ ∃ a, evaln (k + 1) a✝ n = some a ∧ evaln (k + 1) a✝¹ a = some x\ncase prec\na✝¹ a✝ : Code\na_ih✝¹ : ∀ {n x : ℕ}, x ∈ eval a✝¹ n → ∃ k, x ∈ evaln (k + 1) a✝¹ n\na_ih✝ : ∀ {n x : ℕ}, x ∈ eval a✝ n → ∃ k, x ∈ evaln (k + 1) a✝ n\nn x : ℕ\nh :\n  x ∈\n    Nat.rec (eval a✝¹ (unpair n).fst)\n      (fun y IH => Part.bind IH fun i => eval a✝ (Nat.pair (unpair n).fst (Nat.pair y i))) (unpair n).snd\n⊢ ∃ k,\n    n ≤ k ∧\n      Nat.rec (evaln (k + 1) a✝¹ (unpair n).fst)\n          (fun n_1 n_ih =>\n            Option.bind (evaln k (prec a✝¹ a✝) (Nat.pair (unpair n).fst n_1)) fun i =>\n              evaln (k + 1) a✝ (Nat.pair (unpair n).fst (Nat.pair n_1 i)))\n          (unpair n).snd =\n        some x\ncase rfind'\na✝ : Code\na_ih✝ : ∀ {n x : ℕ}, x ∈ eval a✝ n → ∃ k, x ∈ evaln (k + 1) a✝ n\nn x : ℕ\nh :\n  ∃ a,\n    (0 ∈ eval a✝ (Nat.pair (unpair n).fst (a + (unpair n).snd)) ∧\n        ∀ {m : ℕ}, m < a → ∃ a, a ∈ eval a✝ (Nat.pair (unpair n).fst (m + (unpair n).snd)) ∧ ¬a = 0) ∧\n      a + (unpair n).snd = x\n⊢ ∃ k,\n    n ≤ k ∧\n      ∃ a,\n        evaln (k + 1) a✝ n = some a ∧\n          (if a = 0 then some (unpair n).snd else evaln k (rfind' a✝) (Nat.pair (unpair n).fst ((unpair n).snd + 1))) =\n            some x\n[PROOFSTEP]\niterate 4 exact ⟨⟨_, le_rfl⟩, h.symm⟩\n[GOAL]\ncase zero\nn x : ℕ\nh : x = 0\n⊢ (∃ x, n ≤ x) ∧ 0 = x\ncase succ\nn x : ℕ\nh : x = Nat.succ n\n⊢ (∃ x, n ≤ x) ∧ Nat.succ n = x\ncase left\nn x : ℕ\nh : x = (unpair n).fst\n⊢ (∃ x, n ≤ x) ∧ (unpair n).fst = x\ncase right\nn x : ℕ\nh : x = (unpair n).snd\n⊢ (∃ x, n ≤ x) ∧ (unpair n).snd = x\ncase pair\na✝¹ a✝ : Code\na_ih✝¹ : ∀ {n x : ℕ}, x ∈ eval a✝¹ n → ∃ k, x ∈ evaln (k + 1) a✝¹ n\na_ih✝ : ∀ {n x : ℕ}, x ∈ eval a✝ n → ∃ k, x ∈ evaln (k + 1) a✝ n\nn x : ℕ\nh : ∃ a, a ∈ eval a✝¹ n ∧ ∃ a_1, a_1 ∈ eval a✝ n ∧ Nat.pair a a_1 = x\n⊢ ∃ k, n ≤ k ∧ ∃ a, evaln (k + 1) a✝¹ n = some a ∧ ∃ a_1, evaln (k + 1) a✝ n = some a_1 ∧ Nat.pair a a_1 = x\ncase comp\na✝¹ a✝ : Code\na_ih✝¹ : ∀ {n x : ℕ}, x ∈ eval a✝¹ n → ∃ k, x ∈ evaln (k + 1) a✝¹ n\na_ih✝ : ∀ {n x : ℕ}, x ∈ eval a✝ n → ∃ k, x ∈ evaln (k + 1) a✝ n\nn x : ℕ\nh : ∃ a, a ∈ eval a✝ n ∧ x ∈ eval a✝¹ a\n⊢ ∃ k, n ≤ k ∧ ∃ a, evaln (k + 1) a✝ n = some a ∧ evaln (k + 1) a✝¹ a = some x\ncase prec\na✝¹ a✝ : Code\na_ih✝¹ : ∀ {n x : ℕ}, x ∈ eval a✝¹ n → ∃ k, x ∈ evaln (k + 1) a✝¹ n\na_ih✝ : ∀ {n x : ℕ}, x ∈ eval a✝ n → ∃ k, x ∈ evaln (k + 1) a✝ n\nn x : ℕ\nh :\n  x ∈\n    Nat.rec (eval a✝¹ (unpair n).fst)\n      (fun y IH => Part.bind IH fun i => eval a✝ (Nat.pair (unpair n).fst (Nat.pair y i))) (unpair n).snd\n⊢ ∃ k,\n    n ≤ k ∧\n      Nat.rec (evaln (k + 1) a✝¹ (unpair n).fst)\n          (fun n_1 n_ih =>\n            Option.bind (evaln k (prec a✝¹ a✝) (Nat.pair (unpair n).fst n_1)) fun i =>\n              evaln (k + 1) a✝ (Nat.pair (unpair n).fst (Nat.pair n_1 i)))\n          (unpair n).snd =\n        some x\ncase rfind'\na✝ : Code\na_ih✝ : ∀ {n x : ℕ}, x ∈ eval a✝ n → ∃ k, x ∈ evaln (k + 1) a✝ n\nn x : ℕ\nh :\n  ∃ a,\n    (0 ∈ eval a✝ (Nat.pair (unpair n).fst (a + (unpair n).snd)) ∧\n        ∀ {m : ℕ}, m < a → ∃ a, a ∈ eval a✝ (Nat.pair (unpair n).fst (m + (unpair n).snd)) ∧ ¬a = 0) ∧\n      a + (unpair n).snd = x\n⊢ ∃ k,\n    n ≤ k ∧\n      ∃ a,\n        evaln (k + 1) a✝ n = some a ∧\n          (if a = 0 then some (unpair n).snd else evaln k (rfind' a✝) (Nat.pair (unpair n).fst ((unpair n).snd + 1))) =\n            some x\n[PROOFSTEP]\nexact ⟨⟨_, le_rfl⟩, h.symm⟩\n[GOAL]\ncase succ\nn x : ℕ\nh : x = Nat.succ n\n⊢ (∃ x, n ≤ x) ∧ Nat.succ n = x\ncase left\nn x : ℕ\nh : x = (unpair n).fst\n⊢ (∃ x, n ≤ x) ∧ (unpair n).fst = x\ncase right\nn x : ℕ\nh : x = (unpair n).snd\n⊢ (∃ x, n ≤ x) ∧ (unpair n).snd = x\ncase pair\na✝¹ a✝ : Code\na_ih✝¹ : ∀ {n x : ℕ}, x ∈ eval a✝¹ n → ∃ k, x ∈ evaln (k + 1) a✝¹ n\na_ih✝ : ∀ {n x : ℕ}, x ∈ eval a✝ n → ∃ k, x ∈ evaln (k + 1) a✝ n\nn x : ℕ\nh : ∃ a, a ∈ eval a✝¹ n ∧ ∃ a_1, a_1 ∈ eval a✝ n ∧ Nat.pair a a_1 = x\n⊢ ∃ k, n ≤ k ∧ ∃ a, evaln (k + 1) a✝¹ n = some a ∧ ∃ a_1, evaln (k + 1) a✝ n = some a_1 ∧ Nat.pair a a_1 = x\ncase comp\na✝¹ a✝ : Code\na_ih✝¹ : ∀ {n x : ℕ}, x ∈ eval a✝¹ n → ∃ k, x ∈ evaln (k + 1) a✝¹ n\na_ih✝ : ∀ {n x : ℕ}, x ∈ eval a✝ n → ∃ k, x ∈ evaln (k + 1) a✝ n\nn x : ℕ\nh : ∃ a, a ∈ eval a✝ n ∧ x ∈ eval a✝¹ a\n⊢ ∃ k, n ≤ k ∧ ∃ a, evaln (k + 1) a✝ n = some a ∧ evaln (k + 1) a✝¹ a = some x\ncase prec\na✝¹ a✝ : Code\na_ih✝¹ : ∀ {n x : ℕ}, x ∈ eval a✝¹ n → ∃ k, x ∈ evaln (k + 1) a✝¹ n\na_ih✝ : ∀ {n x : ℕ}, x ∈ eval a✝ n → ∃ k, x ∈ evaln (k + 1) a✝ n\nn x : ℕ\nh :\n  x ∈\n    Nat.rec (eval a✝¹ (unpair n).fst)\n      (fun y IH => Part.bind IH fun i => eval a✝ (Nat.pair (unpair n).fst (Nat.pair y i))) (unpair n).snd\n⊢ ∃ k,\n    n ≤ k ∧\n      Nat.rec (evaln (k + 1) a✝¹ (unpair n).fst)\n          (fun n_1 n_ih =>\n            Option.bind (evaln k (prec a✝¹ a✝) (Nat.pair (unpair n).fst n_1)) fun i =>\n              evaln (k + 1) a✝ (Nat.pair (unpair n).fst (Nat.pair n_1 i)))\n          (unpair n).snd =\n        some x\ncase rfind'\na✝ : Code\na_ih✝ : ∀ {n x : ℕ}, x ∈ eval a✝ n → ∃ k, x ∈ evaln (k + 1) a✝ n\nn x : ℕ\nh :\n  ∃ a,\n    (0 ∈ eval a✝ (Nat.pair (unpair n).fst (a + (unpair n).snd)) ∧\n        ∀ {m : ℕ}, m < a → ∃ a, a ∈ eval a✝ (Nat.pair (unpair n).fst (m + (unpair n).snd)) ∧ ¬a = 0) ∧\n      a + (unpair n).snd = x\n⊢ ∃ k,\n    n ≤ k ∧\n      ∃ a,\n        evaln (k + 1) a✝ n = some a ∧\n          (if a = 0 then some (unpair n).snd else evaln k (rfind' a✝) (Nat.pair (unpair n).fst ((unpair n).snd + 1))) =\n            some x\n[PROOFSTEP]\nexact ⟨⟨_, le_rfl⟩, h.symm⟩\n[GOAL]\ncase left\nn x : ℕ\nh : x = (unpair n).fst\n⊢ (∃ x, n ≤ x) ∧ (unpair n).fst = x\ncase right\nn x : ℕ\nh : x = (unpair n).snd\n⊢ (∃ x, n ≤ x) ∧ (unpair n).snd = x\ncase pair\na✝¹ a✝ : Code\na_ih✝¹ : ∀ {n x : ℕ}, x ∈ eval a✝¹ n → ∃ k, x ∈ evaln (k + 1) a✝¹ n\na_ih✝ : ∀ {n x : ℕ}, x ∈ eval a✝ n → ∃ k, x ∈ evaln (k + 1) a✝ n\nn x : ℕ\nh : ∃ a, a ∈ eval a✝¹ n ∧ ∃ a_1, a_1 ∈ eval a✝ n ∧ Nat.pair a a_1 = x\n⊢ ∃ k, n ≤ k ∧ ∃ a, evaln (k + 1) a✝¹ n = some a ∧ ∃ a_1, evaln (k + 1) a✝ n = some a_1 ∧ Nat.pair a a_1 = x\ncase comp\na✝¹ a✝ : Code\na_ih✝¹ : ∀ {n x : ℕ}, x ∈ eval a✝¹ n → ∃ k, x ∈ evaln (k + 1) a✝¹ n\na_ih✝ : ∀ {n x : ℕ}, x ∈ eval a✝ n → ∃ k, x ∈ evaln (k + 1) a✝ n\nn x : ℕ\nh : ∃ a, a ∈ eval a✝ n ∧ x ∈ eval a✝¹ a\n⊢ ∃ k, n ≤ k ∧ ∃ a, evaln (k + 1) a✝ n = some a ∧ evaln (k + 1) a✝¹ a = some x\ncase prec\na✝¹ a✝ : Code\na_ih✝¹ : ∀ {n x : ℕ}, x ∈ eval a✝¹ n → ∃ k, x ∈ evaln (k + 1) a✝¹ n\na_ih✝ : ∀ {n x : ℕ}, x ∈ eval a✝ n → ∃ k, x ∈ evaln (k + 1) a✝ n\nn x : ℕ\nh :\n  x ∈\n    Nat.rec (eval a✝¹ (unpair n).fst)\n      (fun y IH => Part.bind IH fun i => eval a✝ (Nat.pair (unpair n).fst (Nat.pair y i))) (unpair n).snd\n⊢ ∃ k,\n    n ≤ k ∧\n      Nat.rec (evaln (k + 1) a✝¹ (unpair n).fst)\n          (fun n_1 n_ih =>\n            Option.bind (evaln k (prec a✝¹ a✝) (Nat.pair (unpair n).fst n_1)) fun i =>\n              evaln (k + 1) a✝ (Nat.pair (unpair n).fst (Nat.pair n_1 i)))\n          (unpair n).snd =\n        some x\ncase rfind'\na✝ : Code\na_ih✝ : ∀ {n x : ℕ}, x ∈ eval a✝ n → ∃ k, x ∈ evaln (k + 1) a✝ n\nn x : ℕ\nh :\n  ∃ a,\n    (0 ∈ eval a✝ (Nat.pair (unpair n).fst (a + (unpair n).snd)) ∧\n        ∀ {m : ℕ}, m < a → ∃ a, a ∈ eval a✝ (Nat.pair (unpair n).fst (m + (unpair n).snd)) ∧ ¬a = 0) ∧\n      a + (unpair n).snd = x\n⊢ ∃ k,\n    n ≤ k ∧\n      ∃ a,\n        evaln (k + 1) a✝ n = some a ∧\n          (if a = 0 then some (unpair n).snd else evaln k (rfind' a✝) (Nat.pair (unpair n).fst ((unpair n).snd + 1))) =\n            some x\n[PROOFSTEP]\nexact ⟨⟨_, le_rfl⟩, h.symm⟩\n[GOAL]\ncase right\nn x : ℕ\nh : x = (unpair n).snd\n⊢ (∃ x, n ≤ x) ∧ (unpair n).snd = x\ncase pair\na✝¹ a✝ : Code\na_ih✝¹ : ∀ {n x : ℕ}, x ∈ eval a✝¹ n → ∃ k, x ∈ evaln (k + 1) a✝¹ n\na_ih✝ : ∀ {n x : ℕ}, x ∈ eval a✝ n → ∃ k, x ∈ evaln (k + 1) a✝ n\nn x : ℕ\nh : ∃ a, a ∈ eval a✝¹ n ∧ ∃ a_1, a_1 ∈ eval a✝ n ∧ Nat.pair a a_1 = x\n⊢ ∃ k, n ≤ k ∧ ∃ a, evaln (k + 1) a✝¹ n = some a ∧ ∃ a_1, evaln (k + 1) a✝ n = some a_1 ∧ Nat.pair a a_1 = x\ncase comp\na✝¹ a✝ : Code\na_ih✝¹ : ∀ {n x : ℕ}, x ∈ eval a✝¹ n → ∃ k, x ∈ evaln (k + 1) a✝¹ n\na_ih✝ : ∀ {n x : ℕ}, x ∈ eval a✝ n → ∃ k, x ∈ evaln (k + 1) a✝ n\nn x : ℕ\nh : ∃ a, a ∈ eval a✝ n ∧ x ∈ eval a✝¹ a\n⊢ ∃ k, n ≤ k ∧ ∃ a, evaln (k + 1) a✝ n = some a ∧ evaln (k + 1) a✝¹ a = some x\ncase prec\na✝¹ a✝ : Code\na_ih✝¹ : ∀ {n x : ℕ}, x ∈ eval a✝¹ n → ∃ k, x ∈ evaln (k + 1) a✝¹ n\na_ih✝ : ∀ {n x : ℕ}, x ∈ eval a✝ n → ∃ k, x ∈ evaln (k + 1) a✝ n\nn x : ℕ\nh :\n  x ∈\n    Nat.rec (eval a✝¹ (unpair n).fst)\n      (fun y IH => Part.bind IH fun i => eval a✝ (Nat.pair (unpair n).fst (Nat.pair y i))) (unpair n).snd\n⊢ ∃ k,\n    n ≤ k ∧\n      Nat.rec (evaln (k + 1) a✝¹ (unpair n).fst)\n          (fun n_1 n_ih =>\n            Option.bind (evaln k (prec a✝¹ a✝) (Nat.pair (unpair n).fst n_1)) fun i =>\n              evaln (k + 1) a✝ (Nat.pair (unpair n).fst (Nat.pair n_1 i)))\n          (unpair n).snd =\n        some x\ncase rfind'\na✝ : Code\na_ih✝ : ∀ {n x : ℕ}, x ∈ eval a✝ n → ∃ k, x ∈ evaln (k + 1) a✝ n\nn x : ℕ\nh :\n  ∃ a,\n    (0 ∈ eval a✝ (Nat.pair (unpair n).fst (a + (unpair n).snd)) ∧\n        ∀ {m : ℕ}, m < a → ∃ a, a ∈ eval a✝ (Nat.pair (unpair n).fst (m + (unpair n).snd)) ∧ ¬a = 0) ∧\n      a + (unpair n).snd = x\n⊢ ∃ k,\n    n ≤ k ∧\n      ∃ a,\n        evaln (k + 1) a✝ n = some a ∧\n          (if a = 0 then some (unpair n).snd else evaln k (rfind' a✝) (Nat.pair (unpair n).fst ((unpair n).snd + 1))) =\n            some x\n[PROOFSTEP]\nexact ⟨⟨_, le_rfl⟩, h.symm⟩\n[GOAL]\ncase pair\na✝¹ a✝ : Code\na_ih✝¹ : ∀ {n x : ℕ}, x ∈ eval a✝¹ n → ∃ k, x ∈ evaln (k + 1) a✝¹ n\na_ih✝ : ∀ {n x : ℕ}, x ∈ eval a✝ n → ∃ k, x ∈ evaln (k + 1) a✝ n\nn x : ℕ\nh : ∃ a, a ∈ eval a✝¹ n ∧ ∃ a_1, a_1 ∈ eval a✝ n ∧ Nat.pair a a_1 = x\n⊢ ∃ k, n ≤ k ∧ ∃ a, evaln (k + 1) a✝¹ n = some a ∧ ∃ a_1, evaln (k + 1) a✝ n = some a_1 ∧ Nat.pair a a_1 = x\ncase comp\na✝¹ a✝ : Code\na_ih✝¹ : ∀ {n x : ℕ}, x ∈ eval a✝¹ n → ∃ k, x ∈ evaln (k + 1) a✝¹ n\na_ih✝ : ∀ {n x : ℕ}, x ∈ eval a✝ n → ∃ k, x ∈ evaln (k + 1) a✝ n\nn x : ℕ\nh : ∃ a, a ∈ eval a✝ n ∧ x ∈ eval a✝¹ a\n⊢ ∃ k, n ≤ k ∧ ∃ a, evaln (k + 1) a✝ n = some a ∧ evaln (k + 1) a✝¹ a = some x\ncase prec\na✝¹ a✝ : Code\na_ih✝¹ : ∀ {n x : ℕ}, x ∈ eval a✝¹ n → ∃ k, x ∈ evaln (k + 1) a✝¹ n\na_ih✝ : ∀ {n x : ℕ}, x ∈ eval a✝ n → ∃ k, x ∈ evaln (k + 1) a✝ n\nn x : ℕ\nh :\n  x ∈\n    Nat.rec (eval a✝¹ (unpair n).fst)\n      (fun y IH => Part.bind IH fun i => eval a✝ (Nat.pair (unpair n).fst (Nat.pair y i))) (unpair n).snd\n⊢ ∃ k,\n    n ≤ k ∧\n      Nat.rec (evaln (k + 1) a✝¹ (unpair n).fst)\n          (fun n_1 n_ih =>\n            Option.bind (evaln k (prec a✝¹ a✝) (Nat.pair (unpair n).fst n_1)) fun i =>\n              evaln (k + 1) a✝ (Nat.pair (unpair n).fst (Nat.pair n_1 i)))\n          (unpair n).snd =\n        some x\ncase rfind'\na✝ : Code\na_ih✝ : ∀ {n x : ℕ}, x ∈ eval a✝ n → ∃ k, x ∈ evaln (k + 1) a✝ n\nn x : ℕ\nh :\n  ∃ a,\n    (0 ∈ eval a✝ (Nat.pair (unpair n).fst (a + (unpair n).snd)) ∧\n        ∀ {m : ℕ}, m < a → ∃ a, a ∈ eval a✝ (Nat.pair (unpair n).fst (m + (unpair n).snd)) ∧ ¬a = 0) ∧\n      a + (unpair n).snd = x\n⊢ ∃ k,\n    n ≤ k ∧\n      ∃ a,\n        evaln (k + 1) a✝ n = some a ∧\n          (if a = 0 then some (unpair n).snd else evaln k (rfind' a✝) (Nat.pair (unpair n).fst ((unpair n).snd + 1))) =\n            some x\n[PROOFSTEP]\ncase pair cf cg hf hg =>\n  rcases h with ⟨x, hx, y, hy, rfl⟩\n  rcases hf hx with ⟨k₁, hk₁⟩; rcases hg hy with ⟨k₂, hk₂⟩\n  refine' ⟨max k₁ k₂, _⟩\n  refine'\n    ⟨le_max_of_le_left <| Nat.le_of_lt_succ <| evaln_bound hk₁, _, evaln_mono (Nat.succ_le_succ <| le_max_left _ _) hk₁,\n      _, evaln_mono (Nat.succ_le_succ <| le_max_right _ _) hk₂, rfl⟩\n[GOAL]\ncf cg : Code\nhf : ∀ {n x : ℕ}, x ∈ eval cf n → ∃ k, x ∈ evaln (k + 1) cf n\nhg : ∀ {n x : ℕ}, x ∈ eval cg n → ∃ k, x ∈ evaln (k + 1) cg n\nn x : ℕ\nh : ∃ a, a ∈ eval cf n ∧ ∃ a_1, a_1 ∈ eval cg n ∧ Nat.pair a a_1 = x\n⊢ ∃ k, n ≤ k ∧ ∃ a, evaln (k + 1) cf n = some a ∧ ∃ a_1, evaln (k + 1) cg n = some a_1 ∧ Nat.pair a a_1 = x\n[PROOFSTEP]\ncase pair cf cg hf hg =>\n  rcases h with ⟨x, hx, y, hy, rfl⟩\n  rcases hf hx with ⟨k₁, hk₁⟩; rcases hg hy with ⟨k₂, hk₂⟩\n  refine' ⟨max k₁ k₂, _⟩\n  refine'\n    ⟨le_max_of_le_left <| Nat.le_of_lt_succ <| evaln_bound hk₁, _, evaln_mono (Nat.succ_le_succ <| le_max_left _ _) hk₁,\n      _, evaln_mono (Nat.succ_le_succ <| le_max_right _ _) hk₂, rfl⟩\n[GOAL]\ncf cg : Code\nhf : ∀ {n x : ℕ}, x ∈ eval cf n → ∃ k, x ∈ evaln (k + 1) cf n\nhg : ∀ {n x : ℕ}, x ∈ eval cg n → ∃ k, x ∈ evaln (k + 1) cg n\nn x : ℕ\nh : ∃ a, a ∈ eval cf n ∧ ∃ a_1, a_1 ∈ eval cg n ∧ Nat.pair a a_1 = x\n⊢ ∃ k, n ≤ k ∧ ∃ a, evaln (k + 1) cf n = some a ∧ ∃ a_1, evaln (k + 1) cg n = some a_1 ∧ Nat.pair a a_1 = x\n[PROOFSTEP]\nrcases h with ⟨x, hx, y, hy, rfl⟩\n[GOAL]\ncase intro.intro.intro.intro\ncf cg : Code\nhf : ∀ {n x : ℕ}, x ∈ eval cf n → ∃ k, x ∈ evaln (k + 1) cf n\nhg : ∀ {n x : ℕ}, x ∈ eval cg n → ∃ k, x ∈ evaln (k + 1) cg n\nn x : ℕ\nhx : x ∈ eval cf n\ny : ℕ\nhy : y ∈ eval cg n\n⊢ ∃ k, n ≤ k ∧ ∃ a, evaln (k + 1) cf n = some a ∧ ∃ a_1, evaln (k + 1) cg n = some a_1 ∧ Nat.pair a a_1 = Nat.pair x y\n[PROOFSTEP]\nrcases hf hx with ⟨k₁, hk₁⟩\n[GOAL]\ncase intro.intro.intro.intro.intro\ncf cg : Code\nhf : ∀ {n x : ℕ}, x ∈ eval cf n → ∃ k, x ∈ evaln (k + 1) cf n\nhg : ∀ {n x : ℕ}, x ∈ eval cg n → ∃ k, x ∈ evaln (k + 1) cg n\nn x : ℕ\nhx : x ∈ eval cf n\ny : ℕ\nhy : y ∈ eval cg n\nk₁ : ℕ\nhk₁ : x ∈ evaln (k₁ + 1) cf n\n⊢ ∃ k, n ≤ k ∧ ∃ a, evaln (k + 1) cf n = some a ∧ ∃ a_1, evaln (k + 1) cg n = some a_1 ∧ Nat.pair a a_1 = Nat.pair x y\n[PROOFSTEP]\nrcases hg hy with ⟨k₂, hk₂⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\ncf cg : Code\nhf : ∀ {n x : ℕ}, x ∈ eval cf n → ∃ k, x ∈ evaln (k + 1) cf n\nhg : ∀ {n x : ℕ}, x ∈ eval cg n → ∃ k, x ∈ evaln (k + 1) cg n\nn x : ℕ\nhx : x ∈ eval cf n\ny : ℕ\nhy : y ∈ eval cg n\nk₁ : ℕ\nhk₁ : x ∈ evaln (k₁ + 1) cf n\nk₂ : ℕ\nhk₂ : y ∈ evaln (k₂ + 1) cg n\n⊢ ∃ k, n ≤ k ∧ ∃ a, evaln (k + 1) cf n = some a ∧ ∃ a_1, evaln (k + 1) cg n = some a_1 ∧ Nat.pair a a_1 = Nat.pair x y\n[PROOFSTEP]\nrefine' ⟨max k₁ k₂, _⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\ncf cg : Code\nhf : ∀ {n x : ℕ}, x ∈ eval cf n → ∃ k, x ∈ evaln (k + 1) cf n\nhg : ∀ {n x : ℕ}, x ∈ eval cg n → ∃ k, x ∈ evaln (k + 1) cg n\nn x : ℕ\nhx : x ∈ eval cf n\ny : ℕ\nhy : y ∈ eval cg n\nk₁ : ℕ\nhk₁ : x ∈ evaln (k₁ + 1) cf n\nk₂ : ℕ\nhk₂ : y ∈ evaln (k₂ + 1) cg n\n⊢ n ≤ max k₁ k₂ ∧\n    ∃ a,\n      evaln (max k₁ k₂ + 1) cf n = some a ∧ ∃ a_1, evaln (max k₁ k₂ + 1) cg n = some a_1 ∧ Nat.pair a a_1 = Nat.pair x y\n[PROOFSTEP]\nrefine'\n  ⟨le_max_of_le_left <| Nat.le_of_lt_succ <| evaln_bound hk₁, _, evaln_mono (Nat.succ_le_succ <| le_max_left _ _) hk₁,\n    _, evaln_mono (Nat.succ_le_succ <| le_max_right _ _) hk₂, rfl⟩\n[GOAL]\ncase comp\na✝¹ a✝ : Code\na_ih✝¹ : ∀ {n x : ℕ}, x ∈ eval a✝¹ n → ∃ k, x ∈ evaln (k + 1) a✝¹ n\na_ih✝ : ∀ {n x : ℕ}, x ∈ eval a✝ n → ∃ k, x ∈ evaln (k + 1) a✝ n\nn x : ℕ\nh : ∃ a, a ∈ eval a✝ n ∧ x ∈ eval a✝¹ a\n⊢ ∃ k, n ≤ k ∧ ∃ a, evaln (k + 1) a✝ n = some a ∧ evaln (k + 1) a✝¹ a = some x\ncase prec\na✝¹ a✝ : Code\na_ih✝¹ : ∀ {n x : ℕ}, x ∈ eval a✝¹ n → ∃ k, x ∈ evaln (k + 1) a✝¹ n\na_ih✝ : ∀ {n x : ℕ}, x ∈ eval a✝ n → ∃ k, x ∈ evaln (k + 1) a✝ n\nn x : ℕ\nh :\n  x ∈\n    Nat.rec (eval a✝¹ (unpair n).fst)\n      (fun y IH => Part.bind IH fun i => eval a✝ (Nat.pair (unpair n).fst (Nat.pair y i))) (unpair n).snd\n⊢ ∃ k,\n    n ≤ k ∧\n      Nat.rec (evaln (k + 1) a✝¹ (unpair n).fst)\n          (fun n_1 n_ih =>\n            Option.bind (evaln k (prec a✝¹ a✝) (Nat.pair (unpair n).fst n_1)) fun i =>\n              evaln (k + 1) a✝ (Nat.pair (unpair n).fst (Nat.pair n_1 i)))\n          (unpair n).snd =\n        some x\ncase rfind'\na✝ : Code\na_ih✝ : ∀ {n x : ℕ}, x ∈ eval a✝ n → ∃ k, x ∈ evaln (k + 1) a✝ n\nn x : ℕ\nh :\n  ∃ a,\n    (0 ∈ eval a✝ (Nat.pair (unpair n).fst (a + (unpair n).snd)) ∧\n        ∀ {m : ℕ}, m < a → ∃ a, a ∈ eval a✝ (Nat.pair (unpair n).fst (m + (unpair n).snd)) ∧ ¬a = 0) ∧\n      a + (unpair n).snd = x\n⊢ ∃ k,\n    n ≤ k ∧\n      ∃ a,\n        evaln (k + 1) a✝ n = some a ∧\n          (if a = 0 then some (unpair n).snd else evaln k (rfind' a✝) (Nat.pair (unpair n).fst ((unpair n).snd + 1))) =\n            some x\n[PROOFSTEP]\ncase comp cf cg hf hg =>\n  rcases h with ⟨y, hy, hx⟩\n  rcases hg hy with ⟨k₁, hk₁⟩; rcases hf hx with ⟨k₂, hk₂⟩\n  refine' ⟨max k₁ k₂, _⟩\n  exact\n    ⟨le_max_of_le_left <| Nat.le_of_lt_succ <| evaln_bound hk₁, _, evaln_mono (Nat.succ_le_succ <| le_max_left _ _) hk₁,\n      evaln_mono (Nat.succ_le_succ <| le_max_right _ _) hk₂⟩\n[GOAL]\ncf cg : Code\nhf : ∀ {n x : ℕ}, x ∈ eval cf n → ∃ k, x ∈ evaln (k + 1) cf n\nhg : ∀ {n x : ℕ}, x ∈ eval cg n → ∃ k, x ∈ evaln (k + 1) cg n\nn x : ℕ\nh : ∃ a, a ∈ eval cg n ∧ x ∈ eval cf a\n⊢ ∃ k, n ≤ k ∧ ∃ a, evaln (k + 1) cg n = some a ∧ evaln (k + 1) cf a = some x\n[PROOFSTEP]\ncase comp cf cg hf hg =>\n  rcases h with ⟨y, hy, hx⟩\n  rcases hg hy with ⟨k₁, hk₁⟩; rcases hf hx with ⟨k₂, hk₂⟩\n  refine' ⟨max k₁ k₂, _⟩\n  exact\n    ⟨le_max_of_le_left <| Nat.le_of_lt_succ <| evaln_bound hk₁, _, evaln_mono (Nat.succ_le_succ <| le_max_left _ _) hk₁,\n      evaln_mono (Nat.succ_le_succ <| le_max_right _ _) hk₂⟩\n[GOAL]\ncf cg : Code\nhf : ∀ {n x : ℕ}, x ∈ eval cf n → ∃ k, x ∈ evaln (k + 1) cf n\nhg : ∀ {n x : ℕ}, x ∈ eval cg n → ∃ k, x ∈ evaln (k + 1) cg n\nn x : ℕ\nh : ∃ a, a ∈ eval cg n ∧ x ∈ eval cf a\n⊢ ∃ k, n ≤ k ∧ ∃ a, evaln (k + 1) cg n = some a ∧ evaln (k + 1) cf a = some x\n[PROOFSTEP]\nrcases h with ⟨y, hy, hx⟩\n[GOAL]\ncase intro.intro\ncf cg : Code\nhf : ∀ {n x : ℕ}, x ∈ eval cf n → ∃ k, x ∈ evaln (k + 1) cf n\nhg : ∀ {n x : ℕ}, x ∈ eval cg n → ∃ k, x ∈ evaln (k + 1) cg n\nn x y : ℕ\nhy : y ∈ eval cg n\nhx : x ∈ eval cf y\n⊢ ∃ k, n ≤ k ∧ ∃ a, evaln (k + 1) cg n = some a ∧ evaln (k + 1) cf a = some x\n[PROOFSTEP]\nrcases hg hy with ⟨k₁, hk₁⟩\n[GOAL]\ncase intro.intro.intro\ncf cg : Code\nhf : ∀ {n x : ℕ}, x ∈ eval cf n → ∃ k, x ∈ evaln (k + 1) cf n\nhg : ∀ {n x : ℕ}, x ∈ eval cg n → ∃ k, x ∈ evaln (k + 1) cg n\nn x y : ℕ\nhy : y ∈ eval cg n\nhx : x ∈ eval cf y\nk₁ : ℕ\nhk₁ : y ∈ evaln (k₁ + 1) cg n\n⊢ ∃ k, n ≤ k ∧ ∃ a, evaln (k + 1) cg n = some a ∧ evaln (k + 1) cf a = some x\n[PROOFSTEP]\nrcases hf hx with ⟨k₂, hk₂⟩\n[GOAL]\ncase intro.intro.intro.intro\ncf cg : Code\nhf : ∀ {n x : ℕ}, x ∈ eval cf n → ∃ k, x ∈ evaln (k + 1) cf n\nhg : ∀ {n x : ℕ}, x ∈ eval cg n → ∃ k, x ∈ evaln (k + 1) cg n\nn x y : ℕ\nhy : y ∈ eval cg n\nhx : x ∈ eval cf y\nk₁ : ℕ\nhk₁ : y ∈ evaln (k₁ + 1) cg n\nk₂ : ℕ\nhk₂ : x ∈ evaln (k₂ + 1) cf y\n⊢ ∃ k, n ≤ k ∧ ∃ a, evaln (k + 1) cg n = some a ∧ evaln (k + 1) cf a = some x\n[PROOFSTEP]\nrefine' ⟨max k₁ k₂, _⟩\n[GOAL]\ncase intro.intro.intro.intro\ncf cg : Code\nhf : ∀ {n x : ℕ}, x ∈ eval cf n → ∃ k, x ∈ evaln (k + 1) cf n\nhg : ∀ {n x : ℕ}, x ∈ eval cg n → ∃ k, x ∈ evaln (k + 1) cg n\nn x y : ℕ\nhy : y ∈ eval cg n\nhx : x ∈ eval cf y\nk₁ : ℕ\nhk₁ : y ∈ evaln (k₁ + 1) cg n\nk₂ : ℕ\nhk₂ : x ∈ evaln (k₂ + 1) cf y\n⊢ n ≤ max k₁ k₂ ∧ ∃ a, evaln (max k₁ k₂ + 1) cg n = some a ∧ evaln (max k₁ k₂ + 1) cf a = some x\n[PROOFSTEP]\nexact\n  ⟨le_max_of_le_left <| Nat.le_of_lt_succ <| evaln_bound hk₁, _, evaln_mono (Nat.succ_le_succ <| le_max_left _ _) hk₁,\n    evaln_mono (Nat.succ_le_succ <| le_max_right _ _) hk₂⟩\n[GOAL]\ncase prec\na✝¹ a✝ : Code\na_ih✝¹ : ∀ {n x : ℕ}, x ∈ eval a✝¹ n → ∃ k, x ∈ evaln (k + 1) a✝¹ n\na_ih✝ : ∀ {n x : ℕ}, x ∈ eval a✝ n → ∃ k, x ∈ evaln (k + 1) a✝ n\nn x : ℕ\nh :\n  x ∈\n    Nat.rec (eval a✝¹ (unpair n).fst)\n      (fun y IH => Part.bind IH fun i => eval a✝ (Nat.pair (unpair n).fst (Nat.pair y i))) (unpair n).snd\n⊢ ∃ k,\n    n ≤ k ∧\n      Nat.rec (evaln (k + 1) a✝¹ (unpair n).fst)\n          (fun n_1 n_ih =>\n            Option.bind (evaln k (prec a✝¹ a✝) (Nat.pair (unpair n).fst n_1)) fun i =>\n              evaln (k + 1) a✝ (Nat.pair (unpair n).fst (Nat.pair n_1 i)))\n          (unpair n).snd =\n        some x\ncase rfind'\na✝ : Code\na_ih✝ : ∀ {n x : ℕ}, x ∈ eval a✝ n → ∃ k, x ∈ evaln (k + 1) a✝ n\nn x : ℕ\nh :\n  ∃ a,\n    (0 ∈ eval a✝ (Nat.pair (unpair n).fst (a + (unpair n).snd)) ∧\n        ∀ {m : ℕ}, m < a → ∃ a, a ∈ eval a✝ (Nat.pair (unpair n).fst (m + (unpair n).snd)) ∧ ¬a = 0) ∧\n      a + (unpair n).snd = x\n⊢ ∃ k,\n    n ≤ k ∧\n      ∃ a,\n        evaln (k + 1) a✝ n = some a ∧\n          (if a = 0 then some (unpair n).snd else evaln k (rfind' a✝) (Nat.pair (unpair n).fst ((unpair n).snd + 1))) =\n            some x\n[PROOFSTEP]\ncase prec cf cg hf hg =>\n  revert h\n  generalize n.unpair.1 = n₁; generalize n.unpair.2 = n₂\n  induction' n₂ with m IH generalizing x n <;> simp\n  · intro h\n    rcases hf h with ⟨k, hk⟩\n    exact ⟨_, le_max_left _ _, evaln_mono (Nat.succ_le_succ <| le_max_right _ _) hk⟩\n  · intro y hy hx\n    rcases IH hy with ⟨k₁, nk₁, hk₁⟩\n    rcases hg hx with ⟨k₂, hk₂⟩\n    refine'\n      ⟨(max k₁ k₂).succ, Nat.le_succ_of_le <| le_max_of_le_left <| le_trans (le_max_left _ (Nat.pair n₁ m)) nk₁, y,\n        evaln_mono (Nat.succ_le_succ <| le_max_left _ _) _,\n        evaln_mono (Nat.succ_le_succ <| Nat.le_succ_of_le <| le_max_right _ _) hk₂⟩\n    simp [evaln, Bind.bind]\n    exact ⟨le_trans (le_max_right _ _) nk₁, hk₁⟩\n[GOAL]\ncf cg : Code\nhf : ∀ {n x : ℕ}, x ∈ eval cf n → ∃ k, x ∈ evaln (k + 1) cf n\nhg : ∀ {n x : ℕ}, x ∈ eval cg n → ∃ k, x ∈ evaln (k + 1) cg n\nn x : ℕ\nh :\n  x ∈\n    Nat.rec (eval cf (unpair n).fst)\n      (fun y IH => Part.bind IH fun i => eval cg (Nat.pair (unpair n).fst (Nat.pair y i))) (unpair n).snd\n⊢ ∃ k,\n    n ≤ k ∧\n      Nat.rec (evaln (k + 1) cf (unpair n).fst)\n          (fun n_1 n_ih =>\n            Option.bind (evaln k (prec cf cg) (Nat.pair (unpair n).fst n_1)) fun i =>\n              evaln (k + 1) cg (Nat.pair (unpair n).fst (Nat.pair n_1 i)))\n          (unpair n).snd =\n        some x\n[PROOFSTEP]\ncase prec cf cg hf hg =>\n  revert h\n  generalize n.unpair.1 = n₁; generalize n.unpair.2 = n₂\n  induction' n₂ with m IH generalizing x n <;> simp\n  · intro h\n    rcases hf h with ⟨k, hk⟩\n    exact ⟨_, le_max_left _ _, evaln_mono (Nat.succ_le_succ <| le_max_right _ _) hk⟩\n  · intro y hy hx\n    rcases IH hy with ⟨k₁, nk₁, hk₁⟩\n    rcases hg hx with ⟨k₂, hk₂⟩\n    refine'\n      ⟨(max k₁ k₂).succ, Nat.le_succ_of_le <| le_max_of_le_left <| le_trans (le_max_left _ (Nat.pair n₁ m)) nk₁, y,\n        evaln_mono (Nat.succ_le_succ <| le_max_left _ _) _,\n        evaln_mono (Nat.succ_le_succ <| Nat.le_succ_of_le <| le_max_right _ _) hk₂⟩\n    simp [evaln, Bind.bind]\n    exact ⟨le_trans (le_max_right _ _) nk₁, hk₁⟩\n[GOAL]\ncf cg : Code\nhf : ∀ {n x : ℕ}, x ∈ eval cf n → ∃ k, x ∈ evaln (k + 1) cf n\nhg : ∀ {n x : ℕ}, x ∈ eval cg n → ∃ k, x ∈ evaln (k + 1) cg n\nn x : ℕ\nh :\n  x ∈\n    Nat.rec (eval cf (unpair n).fst)\n      (fun y IH => Part.bind IH fun i => eval cg (Nat.pair (unpair n).fst (Nat.pair y i))) (unpair n).snd\n⊢ ∃ k,\n    n ≤ k ∧\n      Nat.rec (evaln (k + 1) cf (unpair n).fst)\n          (fun n_1 n_ih =>\n            Option.bind (evaln k (prec cf cg) (Nat.pair (unpair n).fst n_1)) fun i =>\n              evaln (k + 1) cg (Nat.pair (unpair n).fst (Nat.pair n_1 i)))\n          (unpair n).snd =\n        some x\n[PROOFSTEP]\nrevert h\n[GOAL]\ncf cg : Code\nhf : ∀ {n x : ℕ}, x ∈ eval cf n → ∃ k, x ∈ evaln (k + 1) cf n\nhg : ∀ {n x : ℕ}, x ∈ eval cg n → ∃ k, x ∈ evaln (k + 1) cg n\nn x : ℕ\n⊢ x ∈\n      Nat.rec (eval cf (unpair n).fst)\n        (fun y IH => Part.bind IH fun i => eval cg (Nat.pair (unpair n).fst (Nat.pair y i))) (unpair n).snd →\n    ∃ k,\n      n ≤ k ∧\n        Nat.rec (evaln (k + 1) cf (unpair n).fst)\n            (fun n_1 n_ih =>\n              Option.bind (evaln k (prec cf cg) (Nat.pair (unpair n).fst n_1)) fun i =>\n                evaln (k + 1) cg (Nat.pair (unpair n).fst (Nat.pair n_1 i)))\n            (unpair n).snd =\n          some x\n[PROOFSTEP]\ngeneralize n.unpair.1 = n₁\n[GOAL]\ncf cg : Code\nhf : ∀ {n x : ℕ}, x ∈ eval cf n → ∃ k, x ∈ evaln (k + 1) cf n\nhg : ∀ {n x : ℕ}, x ∈ eval cg n → ∃ k, x ∈ evaln (k + 1) cg n\nn x n₁ : ℕ\n⊢ x ∈ Nat.rec (eval cf n₁) (fun y IH => Part.bind IH fun i => eval cg (Nat.pair n₁ (Nat.pair y i))) (unpair n).snd →\n    ∃ k,\n      n ≤ k ∧\n        Nat.rec (evaln (k + 1) cf n₁)\n            (fun n n_ih =>\n              Option.bind (evaln k (prec cf cg) (Nat.pair n₁ n)) fun i => evaln (k + 1) cg (Nat.pair n₁ (Nat.pair n i)))\n            (unpair n).snd =\n          some x\n[PROOFSTEP]\ngeneralize n.unpair.2 = n₂\n[GOAL]\ncf cg : Code\nhf : ∀ {n x : ℕ}, x ∈ eval cf n → ∃ k, x ∈ evaln (k + 1) cf n\nhg : ∀ {n x : ℕ}, x ∈ eval cg n → ∃ k, x ∈ evaln (k + 1) cg n\nn x n₁ n₂ : ℕ\n⊢ x ∈ Nat.rec (eval cf n₁) (fun y IH => Part.bind IH fun i => eval cg (Nat.pair n₁ (Nat.pair y i))) n₂ →\n    ∃ k,\n      n ≤ k ∧\n        Nat.rec (evaln (k + 1) cf n₁)\n            (fun n n_ih =>\n              Option.bind (evaln k (prec cf cg) (Nat.pair n₁ n)) fun i => evaln (k + 1) cg (Nat.pair n₁ (Nat.pair n i)))\n            n₂ =\n          some x\n[PROOFSTEP]\ninduction' n₂ with m IH generalizing x n\n[GOAL]\ncase zero\ncf cg : Code\nhf : ∀ {n x : ℕ}, x ∈ eval cf n → ∃ k, x ∈ evaln (k + 1) cf n\nhg : ∀ {n x : ℕ}, x ∈ eval cg n → ∃ k, x ∈ evaln (k + 1) cg n\nn✝ x✝ n₁ n x : ℕ\n⊢ x ∈ Nat.rec (eval cf n₁) (fun y IH => Part.bind IH fun i => eval cg (Nat.pair n₁ (Nat.pair y i))) Nat.zero →\n    ∃ k,\n      n ≤ k ∧\n        Nat.rec (evaln (k + 1) cf n₁)\n            (fun n n_ih =>\n              Option.bind (evaln k (prec cf cg) (Nat.pair n₁ n)) fun i => evaln (k + 1) cg (Nat.pair n₁ (Nat.pair n i)))\n            Nat.zero =\n          some x\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\ncf cg : Code\nhf : ∀ {n x : ℕ}, x ∈ eval cf n → ∃ k, x ∈ evaln (k + 1) cf n\nhg : ∀ {n x : ℕ}, x ∈ eval cg n → ∃ k, x ∈ evaln (k + 1) cg n\nn✝ x✝ n₁ m : ℕ\nIH :\n  ∀ {n x : ℕ},\n    x ∈ Nat.rec (eval cf n₁) (fun y IH => Part.bind IH fun i => eval cg (Nat.pair n₁ (Nat.pair y i))) m →\n      ∃ k,\n        n ≤ k ∧\n          Nat.rec (evaln (k + 1) cf n₁)\n              (fun n n_ih =>\n                Option.bind (evaln k (prec cf cg) (Nat.pair n₁ n)) fun i =>\n                  evaln (k + 1) cg (Nat.pair n₁ (Nat.pair n i)))\n              m =\n            some x\nn x : ℕ\n⊢ x ∈ Nat.rec (eval cf n₁) (fun y IH => Part.bind IH fun i => eval cg (Nat.pair n₁ (Nat.pair y i))) (Nat.succ m) →\n    ∃ k,\n      n ≤ k ∧\n        Nat.rec (evaln (k + 1) cf n₁)\n            (fun n n_ih =>\n              Option.bind (evaln k (prec cf cg) (Nat.pair n₁ n)) fun i => evaln (k + 1) cg (Nat.pair n₁ (Nat.pair n i)))\n            (Nat.succ m) =\n          some x\n[PROOFSTEP]\nsimp\n[GOAL]\ncase zero\ncf cg : Code\nhf : ∀ {n x : ℕ}, x ∈ eval cf n → ∃ k, x ∈ evaln (k + 1) cf n\nhg : ∀ {n x : ℕ}, x ∈ eval cg n → ∃ k, x ∈ evaln (k + 1) cg n\nn✝ x✝ n₁ n x : ℕ\n⊢ x ∈ eval cf n₁ → ∃ k, n ≤ k ∧ evaln (k + 1) cf n₁ = some x\n[PROOFSTEP]\nintro h\n[GOAL]\ncase zero\ncf cg : Code\nhf : ∀ {n x : ℕ}, x ∈ eval cf n → ∃ k, x ∈ evaln (k + 1) cf n\nhg : ∀ {n x : ℕ}, x ∈ eval cg n → ∃ k, x ∈ evaln (k + 1) cg n\nn✝ x✝ n₁ n x : ℕ\nh : x ∈ eval cf n₁\n⊢ ∃ k, n ≤ k ∧ evaln (k + 1) cf n₁ = some x\n[PROOFSTEP]\nrcases hf h with ⟨k, hk⟩\n[GOAL]\ncase zero.intro\ncf cg : Code\nhf : ∀ {n x : ℕ}, x ∈ eval cf n → ∃ k, x ∈ evaln (k + 1) cf n\nhg : ∀ {n x : ℕ}, x ∈ eval cg n → ∃ k, x ∈ evaln (k + 1) cg n\nn✝ x✝ n₁ n x : ℕ\nh : x ∈ eval cf n₁\nk : ℕ\nhk : x ∈ evaln (k + 1) cf n₁\n⊢ ∃ k, n ≤ k ∧ evaln (k + 1) cf n₁ = some x\n[PROOFSTEP]\nexact ⟨_, le_max_left _ _, evaln_mono (Nat.succ_le_succ <| le_max_right _ _) hk⟩\n[GOAL]\ncase succ\ncf cg : Code\nhf : ∀ {n x : ℕ}, x ∈ eval cf n → ∃ k, x ∈ evaln (k + 1) cf n\nhg : ∀ {n x : ℕ}, x ∈ eval cg n → ∃ k, x ∈ evaln (k + 1) cg n\nn✝ x✝ n₁ m : ℕ\nIH :\n  ∀ {n x : ℕ},\n    x ∈ Nat.rec (eval cf n₁) (fun y IH => Part.bind IH fun i => eval cg (Nat.pair n₁ (Nat.pair y i))) m →\n      ∃ k,\n        n ≤ k ∧\n          Nat.rec (evaln (k + 1) cf n₁)\n              (fun n n_ih =>\n                Option.bind (evaln k (prec cf cg) (Nat.pair n₁ n)) fun i =>\n                  evaln (k + 1) cg (Nat.pair n₁ (Nat.pair n i)))\n              m =\n            some x\nn x : ℕ\n⊢ ∀ (x_1 : ℕ),\n    x_1 ∈ Nat.rec (eval cf n₁) (fun y IH => Part.bind IH fun i => eval cg (Nat.pair n₁ (Nat.pair y i))) m →\n      x ∈ eval cg (Nat.pair n₁ (Nat.pair m x_1)) →\n        ∃ k,\n          n ≤ k ∧\n            ∃ a, evaln k (prec cf cg) (Nat.pair n₁ m) = some a ∧ evaln (k + 1) cg (Nat.pair n₁ (Nat.pair m a)) = some x\n[PROOFSTEP]\nintro y hy hx\n[GOAL]\ncase succ\ncf cg : Code\nhf : ∀ {n x : ℕ}, x ∈ eval cf n → ∃ k, x ∈ evaln (k + 1) cf n\nhg : ∀ {n x : ℕ}, x ∈ eval cg n → ∃ k, x ∈ evaln (k + 1) cg n\nn✝ x✝ n₁ m : ℕ\nIH :\n  ∀ {n x : ℕ},\n    x ∈ Nat.rec (eval cf n₁) (fun y IH => Part.bind IH fun i => eval cg (Nat.pair n₁ (Nat.pair y i))) m →\n      ∃ k,\n        n ≤ k ∧\n          Nat.rec (evaln (k + 1) cf n₁)\n              (fun n n_ih =>\n                Option.bind (evaln k (prec cf cg) (Nat.pair n₁ n)) fun i =>\n                  evaln (k + 1) cg (Nat.pair n₁ (Nat.pair n i)))\n              m =\n            some x\nn x y : ℕ\nhy : y ∈ Nat.rec (eval cf n₁) (fun y IH => Part.bind IH fun i => eval cg (Nat.pair n₁ (Nat.pair y i))) m\nhx : x ∈ eval cg (Nat.pair n₁ (Nat.pair m y))\n⊢ ∃ k,\n    n ≤ k ∧ ∃ a, evaln k (prec cf cg) (Nat.pair n₁ m) = some a ∧ evaln (k + 1) cg (Nat.pair n₁ (Nat.pair m a)) = some x\n[PROOFSTEP]\nrcases IH hy with ⟨k₁, nk₁, hk₁⟩\n[GOAL]\ncase succ.intro.intro\ncf cg : Code\nhf : ∀ {n x : ℕ}, x ∈ eval cf n → ∃ k, x ∈ evaln (k + 1) cf n\nhg : ∀ {n x : ℕ}, x ∈ eval cg n → ∃ k, x ∈ evaln (k + 1) cg n\nn✝ x✝ n₁ m : ℕ\nIH :\n  ∀ {n x : ℕ},\n    x ∈ Nat.rec (eval cf n₁) (fun y IH => Part.bind IH fun i => eval cg (Nat.pair n₁ (Nat.pair y i))) m →\n      ∃ k,\n        n ≤ k ∧\n          Nat.rec (evaln (k + 1) cf n₁)\n              (fun n n_ih =>\n                Option.bind (evaln k (prec cf cg) (Nat.pair n₁ n)) fun i =>\n                  evaln (k + 1) cg (Nat.pair n₁ (Nat.pair n i)))\n              m =\n            some x\nn x y : ℕ\nhy : y ∈ Nat.rec (eval cf n₁) (fun y IH => Part.bind IH fun i => eval cg (Nat.pair n₁ (Nat.pair y i))) m\nhx : x ∈ eval cg (Nat.pair n₁ (Nat.pair m y))\nk₁ : ℕ\nnk₁ : ?m.1242894 ≤ k₁\nhk₁ :\n  Nat.rec (evaln (k₁ + 1) cf n₁)\n      (fun n n_ih =>\n        Option.bind (evaln k₁ (prec cf cg) (Nat.pair n₁ n)) fun i => evaln (k₁ + 1) cg (Nat.pair n₁ (Nat.pair n i)))\n      m =\n    some y\n⊢ ∃ k,\n    n ≤ k ∧ ∃ a, evaln k (prec cf cg) (Nat.pair n₁ m) = some a ∧ evaln (k + 1) cg (Nat.pair n₁ (Nat.pair m a)) = some x\n[PROOFSTEP]\nrcases hg hx with ⟨k₂, hk₂⟩\n[GOAL]\ncase succ.intro.intro.intro\ncf cg : Code\nhf : ∀ {n x : ℕ}, x ∈ eval cf n → ∃ k, x ∈ evaln (k + 1) cf n\nhg : ∀ {n x : ℕ}, x ∈ eval cg n → ∃ k, x ∈ evaln (k + 1) cg n\nn✝ x✝ n₁ m : ℕ\nIH :\n  ∀ {n x : ℕ},\n    x ∈ Nat.rec (eval cf n₁) (fun y IH => Part.bind IH fun i => eval cg (Nat.pair n₁ (Nat.pair y i))) m →\n      ∃ k,\n        n ≤ k ∧\n          Nat.rec (evaln (k + 1) cf n₁)\n              (fun n n_ih =>\n                Option.bind (evaln k (prec cf cg) (Nat.pair n₁ n)) fun i =>\n                  evaln (k + 1) cg (Nat.pair n₁ (Nat.pair n i)))\n              m =\n            some x\nn x y : ℕ\nhy : y ∈ Nat.rec (eval cf n₁) (fun y IH => Part.bind IH fun i => eval cg (Nat.pair n₁ (Nat.pair y i))) m\nhx : x ∈ eval cg (Nat.pair n₁ (Nat.pair m y))\nk₁ : ℕ\nnk₁ : ?m.1242894 ≤ k₁\nhk₁ :\n  Nat.rec (evaln (k₁ + 1) cf n₁)\n      (fun n n_ih =>\n        Option.bind (evaln k₁ (prec cf cg) (Nat.pair n₁ n)) fun i => evaln (k₁ + 1) cg (Nat.pair n₁ (Nat.pair n i)))\n      m =\n    some y\nk₂ : ℕ\nhk₂ : x ∈ evaln (k₂ + 1) cg (Nat.pair n₁ (Nat.pair m y))\n⊢ ∃ k,\n    n ≤ k ∧ ∃ a, evaln k (prec cf cg) (Nat.pair n₁ m) = some a ∧ evaln (k + 1) cg (Nat.pair n₁ (Nat.pair m a)) = some x\n[PROOFSTEP]\nrefine'\n  ⟨(max k₁ k₂).succ, Nat.le_succ_of_le <| le_max_of_le_left <| le_trans (le_max_left _ (Nat.pair n₁ m)) nk₁, y,\n    evaln_mono (Nat.succ_le_succ <| le_max_left _ _) _,\n    evaln_mono (Nat.succ_le_succ <| Nat.le_succ_of_le <| le_max_right _ _) hk₂⟩\n[GOAL]\ncase succ.intro.intro.intro\ncf cg : Code\nhf : ∀ {n x : ℕ}, x ∈ eval cf n → ∃ k, x ∈ evaln (k + 1) cf n\nhg : ∀ {n x : ℕ}, x ∈ eval cg n → ∃ k, x ∈ evaln (k + 1) cg n\nn✝ x✝ n₁ m : ℕ\nIH :\n  ∀ {n x : ℕ},\n    x ∈ Nat.rec (eval cf n₁) (fun y IH => Part.bind IH fun i => eval cg (Nat.pair n₁ (Nat.pair y i))) m →\n      ∃ k,\n        n ≤ k ∧\n          Nat.rec (evaln (k + 1) cf n₁)\n              (fun n n_ih =>\n                Option.bind (evaln k (prec cf cg) (Nat.pair n₁ n)) fun i =>\n                  evaln (k + 1) cg (Nat.pair n₁ (Nat.pair n i)))\n              m =\n            some x\nn x y : ℕ\nhy : y ∈ Nat.rec (eval cf n₁) (fun y IH => Part.bind IH fun i => eval cg (Nat.pair n₁ (Nat.pair y i))) m\nhx : x ∈ eval cg (Nat.pair n₁ (Nat.pair m y))\nk₁ : ℕ\nnk₁ : max n (Nat.pair n₁ m) ≤ k₁\nhk₁ :\n  Nat.rec (evaln (k₁ + 1) cf n₁)\n      (fun n n_ih =>\n        Option.bind (evaln k₁ (prec cf cg) (Nat.pair n₁ n)) fun i => evaln (k₁ + 1) cg (Nat.pair n₁ (Nat.pair n i)))\n      m =\n    some y\nk₂ : ℕ\nhk₂ : x ∈ evaln (k₂ + 1) cg (Nat.pair n₁ (Nat.pair m y))\n⊢ y ∈ evaln (Nat.succ k₁) (prec cf cg) (Nat.pair n₁ m)\n[PROOFSTEP]\nsimp [evaln, Bind.bind]\n[GOAL]\ncase succ.intro.intro.intro\ncf cg : Code\nhf : ∀ {n x : ℕ}, x ∈ eval cf n → ∃ k, x ∈ evaln (k + 1) cf n\nhg : ∀ {n x : ℕ}, x ∈ eval cg n → ∃ k, x ∈ evaln (k + 1) cg n\nn✝ x✝ n₁ m : ℕ\nIH :\n  ∀ {n x : ℕ},\n    x ∈ Nat.rec (eval cf n₁) (fun y IH => Part.bind IH fun i => eval cg (Nat.pair n₁ (Nat.pair y i))) m →\n      ∃ k,\n        n ≤ k ∧\n          Nat.rec (evaln (k + 1) cf n₁)\n              (fun n n_ih =>\n                Option.bind (evaln k (prec cf cg) (Nat.pair n₁ n)) fun i =>\n                  evaln (k + 1) cg (Nat.pair n₁ (Nat.pair n i)))\n              m =\n            some x\nn x y : ℕ\nhy : y ∈ Nat.rec (eval cf n₁) (fun y IH => Part.bind IH fun i => eval cg (Nat.pair n₁ (Nat.pair y i))) m\nhx : x ∈ eval cg (Nat.pair n₁ (Nat.pair m y))\nk₁ : ℕ\nnk₁ : max n (Nat.pair n₁ m) ≤ k₁\nhk₁ :\n  Nat.rec (evaln (k₁ + 1) cf n₁)\n      (fun n n_ih =>\n        Option.bind (evaln k₁ (prec cf cg) (Nat.pair n₁ n)) fun i => evaln (k₁ + 1) cg (Nat.pair n₁ (Nat.pair n i)))\n      m =\n    some y\nk₂ : ℕ\nhk₂ : x ∈ evaln (k₂ + 1) cg (Nat.pair n₁ (Nat.pair m y))\n⊢ Nat.pair n₁ m ≤ k₁ ∧\n    Nat.rec (evaln (k₁ + 1) cf n₁)\n        (fun n n_ih =>\n          Option.bind (evaln k₁ (prec cf cg) (Nat.pair n₁ n)) fun i => evaln (k₁ + 1) cg (Nat.pair n₁ (Nat.pair n i)))\n        m =\n      some y\n[PROOFSTEP]\nexact ⟨le_trans (le_max_right _ _) nk₁, hk₁⟩\n[GOAL]\ncase rfind'\na✝ : Code\na_ih✝ : ∀ {n x : ℕ}, x ∈ eval a✝ n → ∃ k, x ∈ evaln (k + 1) a✝ n\nn x : ℕ\nh :\n  ∃ a,\n    (0 ∈ eval a✝ (Nat.pair (unpair n).fst (a + (unpair n).snd)) ∧\n        ∀ {m : ℕ}, m < a → ∃ a, a ∈ eval a✝ (Nat.pair (unpair n).fst (m + (unpair n).snd)) ∧ ¬a = 0) ∧\n      a + (unpair n).snd = x\n⊢ ∃ k,\n    n ≤ k ∧\n      ∃ a,\n        evaln (k + 1) a✝ n = some a ∧\n          (if a = 0 then some (unpair n).snd else evaln k (rfind' a✝) (Nat.pair (unpair n).fst ((unpair n).snd + 1))) =\n            some x\n[PROOFSTEP]\ncase rfind' cf hf =>\n  rcases h with ⟨y, ⟨hy₁, hy₂⟩, rfl⟩\n  suffices ∃ k, y + n.unpair.2 ∈ evaln (k + 1) (rfind' cf) (Nat.pair n.unpair.1 n.unpair.2) by simpa [evaln, Bind.bind]\n  revert hy₁ hy₂\n  generalize n.unpair.2 = m\n  intro hy₁ hy₂\n  induction' y with y IH generalizing m <;> simp [evaln, Bind.bind]\n  · simp at hy₁ \n    rcases hf hy₁ with ⟨k, hk⟩\n    exact ⟨_, Nat.le_of_lt_succ <| evaln_bound hk, _, hk, by simp; rfl⟩\n  · rcases hy₂ (Nat.succ_pos _) with ⟨a, ha, a0⟩\n    rcases hf ha with ⟨k₁, hk₁⟩\n    rcases IH m.succ (by simpa [Nat.succ_eq_add_one, add_comm, add_left_comm] using hy₁) fun {i} hi => by\n        simpa [Nat.succ_eq_add_one, add_comm, add_left_comm] using hy₂ (Nat.succ_lt_succ hi) with\n      ⟨k₂, hk₂⟩\n    use(max k₁ k₂).succ\n    rw [zero_add] at hk₁ \n    use Nat.le_succ_of_le <| le_max_of_le_left <| Nat.le_of_lt_succ <| evaln_bound hk₁\n    use a\n    use evaln_mono (Nat.succ_le_succ <| Nat.le_succ_of_le <| le_max_left _ _) hk₁\n    simpa [Nat.succ_eq_add_one, a0, -max_eq_left, -max_eq_right, add_comm, add_left_comm] using\n      evaln_mono (Nat.succ_le_succ <| le_max_right _ _) hk₂\n[GOAL]\ncf : Code\nhf : ∀ {n x : ℕ}, x ∈ eval cf n → ∃ k, x ∈ evaln (k + 1) cf n\nn x : ℕ\nh :\n  ∃ a,\n    (0 ∈ eval cf (Nat.pair (unpair n).fst (a + (unpair n).snd)) ∧\n        ∀ {m : ℕ}, m < a → ∃ a, a ∈ eval cf (Nat.pair (unpair n).fst (m + (unpair n).snd)) ∧ ¬a = 0) ∧\n      a + (unpair n).snd = x\n⊢ ∃ k,\n    n ≤ k ∧\n      ∃ a,\n        evaln (k + 1) cf n = some a ∧\n          (if a = 0 then some (unpair n).snd else evaln k (rfind' cf) (Nat.pair (unpair n).fst ((unpair n).snd + 1))) =\n            some x\n[PROOFSTEP]\ncase rfind' cf hf =>\n  rcases h with ⟨y, ⟨hy₁, hy₂⟩, rfl⟩\n  suffices ∃ k, y + n.unpair.2 ∈ evaln (k + 1) (rfind' cf) (Nat.pair n.unpair.1 n.unpair.2) by simpa [evaln, Bind.bind]\n  revert hy₁ hy₂\n  generalize n.unpair.2 = m\n  intro hy₁ hy₂\n  induction' y with y IH generalizing m <;> simp [evaln, Bind.bind]\n  · simp at hy₁ \n    rcases hf hy₁ with ⟨k, hk⟩\n    exact ⟨_, Nat.le_of_lt_succ <| evaln_bound hk, _, hk, by simp; rfl⟩\n  · rcases hy₂ (Nat.succ_pos _) with ⟨a, ha, a0⟩\n    rcases hf ha with ⟨k₁, hk₁⟩\n    rcases IH m.succ (by simpa [Nat.succ_eq_add_one, add_comm, add_left_comm] using hy₁) fun {i} hi => by\n        simpa [Nat.succ_eq_add_one, add_comm, add_left_comm] using hy₂ (Nat.succ_lt_succ hi) with\n      ⟨k₂, hk₂⟩\n    use(max k₁ k₂).succ\n    rw [zero_add] at hk₁ \n    use Nat.le_succ_of_le <| le_max_of_le_left <| Nat.le_of_lt_succ <| evaln_bound hk₁\n    use a\n    use evaln_mono (Nat.succ_le_succ <| Nat.le_succ_of_le <| le_max_left _ _) hk₁\n    simpa [Nat.succ_eq_add_one, a0, -max_eq_left, -max_eq_right, add_comm, add_left_comm] using\n      evaln_mono (Nat.succ_le_succ <| le_max_right _ _) hk₂\n[GOAL]\ncf : Code\nhf : ∀ {n x : ℕ}, x ∈ eval cf n → ∃ k, x ∈ evaln (k + 1) cf n\nn x : ℕ\nh :\n  ∃ a,\n    (0 ∈ eval cf (Nat.pair (unpair n).fst (a + (unpair n).snd)) ∧\n        ∀ {m : ℕ}, m < a → ∃ a, a ∈ eval cf (Nat.pair (unpair n).fst (m + (unpair n).snd)) ∧ ¬a = 0) ∧\n      a + (unpair n).snd = x\n⊢ ∃ k,\n    n ≤ k ∧\n      ∃ a,\n        evaln (k + 1) cf n = some a ∧\n          (if a = 0 then some (unpair n).snd else evaln k (rfind' cf) (Nat.pair (unpair n).fst ((unpair n).snd + 1))) =\n            some x\n[PROOFSTEP]\nrcases h with ⟨y, ⟨hy₁, hy₂⟩, rfl⟩\n[GOAL]\ncase intro.intro.intro\ncf : Code\nhf : ∀ {n x : ℕ}, x ∈ eval cf n → ∃ k, x ∈ evaln (k + 1) cf n\nn y : ℕ\nhy₁ : 0 ∈ eval cf (Nat.pair (unpair n).fst (y + (unpair n).snd))\nhy₂ : ∀ {m : ℕ}, m < y → ∃ a, a ∈ eval cf (Nat.pair (unpair n).fst (m + (unpair n).snd)) ∧ ¬a = 0\n⊢ ∃ k,\n    n ≤ k ∧\n      ∃ a,\n        evaln (k + 1) cf n = some a ∧\n          (if a = 0 then some (unpair n).snd else evaln k (rfind' cf) (Nat.pair (unpair n).fst ((unpair n).snd + 1))) =\n            some (y + (unpair n).snd)\n[PROOFSTEP]\nsuffices ∃ k, y + n.unpair.2 ∈ evaln (k + 1) (rfind' cf) (Nat.pair n.unpair.1 n.unpair.2) by simpa [evaln, Bind.bind]\n[GOAL]\ncf : Code\nhf : ∀ {n x : ℕ}, x ∈ eval cf n → ∃ k, x ∈ evaln (k + 1) cf n\nn y : ℕ\nhy₁ : 0 ∈ eval cf (Nat.pair (unpair n).fst (y + (unpair n).snd))\nhy₂ : ∀ {m : ℕ}, m < y → ∃ a, a ∈ eval cf (Nat.pair (unpair n).fst (m + (unpair n).snd)) ∧ ¬a = 0\nthis : ∃ k, y + (unpair n).snd ∈ evaln (k + 1) (rfind' cf) (Nat.pair (unpair n).fst (unpair n).snd)\n⊢ ∃ k,\n    n ≤ k ∧\n      ∃ a,\n        evaln (k + 1) cf n = some a ∧\n          (if a = 0 then some (unpair n).snd else evaln k (rfind' cf) (Nat.pair (unpair n).fst ((unpair n).snd + 1))) =\n            some (y + (unpair n).snd)\n[PROOFSTEP]\nsimpa [evaln, Bind.bind]\n[GOAL]\ncase intro.intro.intro\ncf : Code\nhf : ∀ {n x : ℕ}, x ∈ eval cf n → ∃ k, x ∈ evaln (k + 1) cf n\nn y : ℕ\nhy₁ : 0 ∈ eval cf (Nat.pair (unpair n).fst (y + (unpair n).snd))\nhy₂ : ∀ {m : ℕ}, m < y → ∃ a, a ∈ eval cf (Nat.pair (unpair n).fst (m + (unpair n).snd)) ∧ ¬a = 0\n⊢ ∃ k, y + (unpair n).snd ∈ evaln (k + 1) (rfind' cf) (Nat.pair (unpair n).fst (unpair n).snd)\n[PROOFSTEP]\nrevert hy₁ hy₂\n[GOAL]\ncase intro.intro.intro\ncf : Code\nhf : ∀ {n x : ℕ}, x ∈ eval cf n → ∃ k, x ∈ evaln (k + 1) cf n\nn y : ℕ\n⊢ 0 ∈ eval cf (Nat.pair (unpair n).fst (y + (unpair n).snd)) →\n    (∀ {m : ℕ}, m < y → ∃ a, a ∈ eval cf (Nat.pair (unpair n).fst (m + (unpair n).snd)) ∧ ¬a = 0) →\n      ∃ k, y + (unpair n).snd ∈ evaln (k + 1) (rfind' cf) (Nat.pair (unpair n).fst (unpair n).snd)\n[PROOFSTEP]\ngeneralize n.unpair.2 = m\n[GOAL]\ncase intro.intro.intro\ncf : Code\nhf : ∀ {n x : ℕ}, x ∈ eval cf n → ∃ k, x ∈ evaln (k + 1) cf n\nn y m : ℕ\n⊢ 0 ∈ eval cf (Nat.pair (unpair n).fst (y + m)) →\n    (∀ {m_1 : ℕ}, m_1 < y → ∃ a, a ∈ eval cf (Nat.pair (unpair n).fst (m_1 + m)) ∧ ¬a = 0) →\n      ∃ k, y + m ∈ evaln (k + 1) (rfind' cf) (Nat.pair (unpair n).fst m)\n[PROOFSTEP]\nintro hy₁ hy₂\n[GOAL]\ncase intro.intro.intro\ncf : Code\nhf : ∀ {n x : ℕ}, x ∈ eval cf n → ∃ k, x ∈ evaln (k + 1) cf n\nn y m : ℕ\nhy₁ : 0 ∈ eval cf (Nat.pair (unpair n).fst (y + m))\nhy₂ : ∀ {m_1 : ℕ}, m_1 < y → ∃ a, a ∈ eval cf (Nat.pair (unpair n).fst (m_1 + m)) ∧ ¬a = 0\n⊢ ∃ k, y + m ∈ evaln (k + 1) (rfind' cf) (Nat.pair (unpair n).fst m)\n[PROOFSTEP]\ninduction' y with y IH generalizing m\n[GOAL]\ncase intro.intro.intro.zero\ncf : Code\nhf : ∀ {n x : ℕ}, x ∈ eval cf n → ∃ k, x ∈ evaln (k + 1) cf n\nn y m✝ : ℕ\nhy₁✝ : 0 ∈ eval cf (Nat.pair (unpair n).fst (y + m✝))\nhy₂✝ : ∀ {m : ℕ}, m < y → ∃ a, a ∈ eval cf (Nat.pair (unpair n).fst (m + m✝)) ∧ ¬a = 0\nm : ℕ\nhy₁ : 0 ∈ eval cf (Nat.pair (unpair n).fst (Nat.zero + m))\nhy₂ : ∀ {m_1 : ℕ}, m_1 < Nat.zero → ∃ a, a ∈ eval cf (Nat.pair (unpair n).fst (m_1 + m)) ∧ ¬a = 0\n⊢ ∃ k, Nat.zero + m ∈ evaln (k + 1) (rfind' cf) (Nat.pair (unpair n).fst m)\n[PROOFSTEP]\nsimp [evaln, Bind.bind]\n[GOAL]\ncase intro.intro.intro.succ\ncf : Code\nhf : ∀ {n x : ℕ}, x ∈ eval cf n → ∃ k, x ∈ evaln (k + 1) cf n\nn y✝ m✝ : ℕ\nhy₁✝ : 0 ∈ eval cf (Nat.pair (unpair n).fst (y✝ + m✝))\nhy₂✝ : ∀ {m : ℕ}, m < y✝ → ∃ a, a ∈ eval cf (Nat.pair (unpair n).fst (m + m✝)) ∧ ¬a = 0\ny : ℕ\nIH :\n  ∀ (m : ℕ),\n    0 ∈ eval cf (Nat.pair (unpair n).fst (y + m)) →\n      (∀ {m_1 : ℕ}, m_1 < y → ∃ a, a ∈ eval cf (Nat.pair (unpair n).fst (m_1 + m)) ∧ ¬a = 0) →\n        ∃ k, y + m ∈ evaln (k + 1) (rfind' cf) (Nat.pair (unpair n).fst m)\nm : ℕ\nhy₁ : 0 ∈ eval cf (Nat.pair (unpair n).fst (Nat.succ y + m))\nhy₂ : ∀ {m_1 : ℕ}, m_1 < Nat.succ y → ∃ a, a ∈ eval cf (Nat.pair (unpair n).fst (m_1 + m)) ∧ ¬a = 0\n⊢ ∃ k, Nat.succ y + m ∈ evaln (k + 1) (rfind' cf) (Nat.pair (unpair n).fst m)\n[PROOFSTEP]\nsimp [evaln, Bind.bind]\n[GOAL]\ncase intro.intro.intro.zero\ncf : Code\nhf : ∀ {n x : ℕ}, x ∈ eval cf n → ∃ k, x ∈ evaln (k + 1) cf n\nn y m✝ : ℕ\nhy₁✝ : 0 ∈ eval cf (Nat.pair (unpair n).fst (y + m✝))\nhy₂✝ : ∀ {m : ℕ}, m < y → ∃ a, a ∈ eval cf (Nat.pair (unpair n).fst (m + m✝)) ∧ ¬a = 0\nm : ℕ\nhy₁ : 0 ∈ eval cf (Nat.pair (unpair n).fst (Nat.zero + m))\nhy₂ : ∀ {m_1 : ℕ}, m_1 < Nat.zero → ∃ a, a ∈ eval cf (Nat.pair (unpair n).fst (m_1 + m)) ∧ ¬a = 0\n⊢ ∃ k,\n    Nat.pair (unpair n).fst m ≤ k ∧\n      ∃ a,\n        evaln (k + 1) cf (Nat.pair (unpair n).fst m) = some a ∧\n          (if a = 0 then pure m else evaln k (rfind' cf) (Nat.pair (unpair n).fst (m + 1))) = some m\n[PROOFSTEP]\nsimp at hy₁ \n[GOAL]\ncase intro.intro.intro.zero\ncf : Code\nhf : ∀ {n x : ℕ}, x ∈ eval cf n → ∃ k, x ∈ evaln (k + 1) cf n\nn y m✝ : ℕ\nhy₁✝ : 0 ∈ eval cf (Nat.pair (unpair n).fst (y + m✝))\nhy₂✝ : ∀ {m : ℕ}, m < y → ∃ a, a ∈ eval cf (Nat.pair (unpair n).fst (m + m✝)) ∧ ¬a = 0\nm : ℕ\nhy₂ : ∀ {m_1 : ℕ}, m_1 < Nat.zero → ∃ a, a ∈ eval cf (Nat.pair (unpair n).fst (m_1 + m)) ∧ ¬a = 0\nhy₁ : 0 ∈ eval cf (Nat.pair (unpair n).fst m)\n⊢ ∃ k,\n    Nat.pair (unpair n).fst m ≤ k ∧\n      ∃ a,\n        evaln (k + 1) cf (Nat.pair (unpair n).fst m) = some a ∧\n          (if a = 0 then pure m else evaln k (rfind' cf) (Nat.pair (unpair n).fst (m + 1))) = some m\n[PROOFSTEP]\nrcases hf hy₁ with ⟨k, hk⟩\n[GOAL]\ncase intro.intro.intro.zero.intro\ncf : Code\nhf : ∀ {n x : ℕ}, x ∈ eval cf n → ∃ k, x ∈ evaln (k + 1) cf n\nn y m✝ : ℕ\nhy₁✝ : 0 ∈ eval cf (Nat.pair (unpair n).fst (y + m✝))\nhy₂✝ : ∀ {m : ℕ}, m < y → ∃ a, a ∈ eval cf (Nat.pair (unpair n).fst (m + m✝)) ∧ ¬a = 0\nm : ℕ\nhy₂ : ∀ {m_1 : ℕ}, m_1 < Nat.zero → ∃ a, a ∈ eval cf (Nat.pair (unpair n).fst (m_1 + m)) ∧ ¬a = 0\nhy₁ : 0 ∈ eval cf (Nat.pair (unpair n).fst m)\nk : ℕ\nhk : 0 ∈ evaln (k + 1) cf (Nat.pair (unpair n).fst m)\n⊢ ∃ k,\n    Nat.pair (unpair n).fst m ≤ k ∧\n      ∃ a,\n        evaln (k + 1) cf (Nat.pair (unpair n).fst m) = some a ∧\n          (if a = 0 then pure m else evaln k (rfind' cf) (Nat.pair (unpair n).fst (m + 1))) = some m\n[PROOFSTEP]\nexact ⟨_, Nat.le_of_lt_succ <| evaln_bound hk, _, hk, by simp; rfl⟩\n[GOAL]\ncf : Code\nhf : ∀ {n x : ℕ}, x ∈ eval cf n → ∃ k, x ∈ evaln (k + 1) cf n\nn y m✝ : ℕ\nhy₁✝ : 0 ∈ eval cf (Nat.pair (unpair n).fst (y + m✝))\nhy₂✝ : ∀ {m : ℕ}, m < y → ∃ a, a ∈ eval cf (Nat.pair (unpair n).fst (m + m✝)) ∧ ¬a = 0\nm : ℕ\nhy₂ : ∀ {m_1 : ℕ}, m_1 < Nat.zero → ∃ a, a ∈ eval cf (Nat.pair (unpair n).fst (m_1 + m)) ∧ ¬a = 0\nhy₁ : 0 ∈ eval cf (Nat.pair (unpair n).fst m)\nk : ℕ\nhk : 0 ∈ evaln (k + 1) cf (Nat.pair (unpair n).fst m)\n⊢ (if 0 = 0 then pure m else evaln k (rfind' cf) (Nat.pair (unpair n).fst (m + 1))) = some m\n[PROOFSTEP]\nsimp\n[GOAL]\ncf : Code\nhf : ∀ {n x : ℕ}, x ∈ eval cf n → ∃ k, x ∈ evaln (k + 1) cf n\nn y m✝ : ℕ\nhy₁✝ : 0 ∈ eval cf (Nat.pair (unpair n).fst (y + m✝))\nhy₂✝ : ∀ {m : ℕ}, m < y → ∃ a, a ∈ eval cf (Nat.pair (unpair n).fst (m + m✝)) ∧ ¬a = 0\nm : ℕ\nhy₂ : ∀ {m_1 : ℕ}, m_1 < Nat.zero → ∃ a, a ∈ eval cf (Nat.pair (unpair n).fst (m_1 + m)) ∧ ¬a = 0\nhy₁ : 0 ∈ eval cf (Nat.pair (unpair n).fst m)\nk : ℕ\nhk : 0 ∈ evaln (k + 1) cf (Nat.pair (unpair n).fst m)\n⊢ pure m = some m\n[PROOFSTEP]\nrfl\n[GOAL]\ncase intro.intro.intro.succ\ncf : Code\nhf : ∀ {n x : ℕ}, x ∈ eval cf n → ∃ k, x ∈ evaln (k + 1) cf n\nn y✝ m✝ : ℕ\nhy₁✝ : 0 ∈ eval cf (Nat.pair (unpair n).fst (y✝ + m✝))\nhy₂✝ : ∀ {m : ℕ}, m < y✝ → ∃ a, a ∈ eval cf (Nat.pair (unpair n).fst (m + m✝)) ∧ ¬a = 0\ny : ℕ\nIH :\n  ∀ (m : ℕ),\n    0 ∈ eval cf (Nat.pair (unpair n).fst (y + m)) →\n      (∀ {m_1 : ℕ}, m_1 < y → ∃ a, a ∈ eval cf (Nat.pair (unpair n).fst (m_1 + m)) ∧ ¬a = 0) →\n        ∃ k, y + m ∈ evaln (k + 1) (rfind' cf) (Nat.pair (unpair n).fst m)\nm : ℕ\nhy₁ : 0 ∈ eval cf (Nat.pair (unpair n).fst (Nat.succ y + m))\nhy₂ : ∀ {m_1 : ℕ}, m_1 < Nat.succ y → ∃ a, a ∈ eval cf (Nat.pair (unpair n).fst (m_1 + m)) ∧ ¬a = 0\n⊢ ∃ k,\n    Nat.pair (unpair n).fst m ≤ k ∧\n      ∃ a,\n        evaln (k + 1) cf (Nat.pair (unpair n).fst m) = some a ∧\n          (if a = 0 then pure m else evaln k (rfind' cf) (Nat.pair (unpair n).fst (m + 1))) = some (Nat.succ y + m)\n[PROOFSTEP]\nrcases hy₂ (Nat.succ_pos _) with ⟨a, ha, a0⟩\n[GOAL]\ncase intro.intro.intro.succ.intro.intro\ncf : Code\nhf : ∀ {n x : ℕ}, x ∈ eval cf n → ∃ k, x ∈ evaln (k + 1) cf n\nn y✝ m✝ : ℕ\nhy₁✝ : 0 ∈ eval cf (Nat.pair (unpair n).fst (y✝ + m✝))\nhy₂✝ : ∀ {m : ℕ}, m < y✝ → ∃ a, a ∈ eval cf (Nat.pair (unpair n).fst (m + m✝)) ∧ ¬a = 0\ny : ℕ\nIH :\n  ∀ (m : ℕ),\n    0 ∈ eval cf (Nat.pair (unpair n).fst (y + m)) →\n      (∀ {m_1 : ℕ}, m_1 < y → ∃ a, a ∈ eval cf (Nat.pair (unpair n).fst (m_1 + m)) ∧ ¬a = 0) →\n        ∃ k, y + m ∈ evaln (k + 1) (rfind' cf) (Nat.pair (unpair n).fst m)\nm : ℕ\nhy₁ : 0 ∈ eval cf (Nat.pair (unpair n).fst (Nat.succ y + m))\nhy₂ : ∀ {m_1 : ℕ}, m_1 < Nat.succ y → ∃ a, a ∈ eval cf (Nat.pair (unpair n).fst (m_1 + m)) ∧ ¬a = 0\na : ℕ\nha : a ∈ eval cf (Nat.pair (unpair n).fst (0 + m))\na0 : ¬a = 0\n⊢ ∃ k,\n    Nat.pair (unpair n).fst m ≤ k ∧\n      ∃ a,\n        evaln (k + 1) cf (Nat.pair (unpair n).fst m) = some a ∧\n          (if a = 0 then pure m else evaln k (rfind' cf) (Nat.pair (unpair n).fst (m + 1))) = some (Nat.succ y + m)\n[PROOFSTEP]\nrcases hf ha with ⟨k₁, hk₁⟩\n[GOAL]\ncase intro.intro.intro.succ.intro.intro.intro\ncf : Code\nhf : ∀ {n x : ℕ}, x ∈ eval cf n → ∃ k, x ∈ evaln (k + 1) cf n\nn y✝ m✝ : ℕ\nhy₁✝ : 0 ∈ eval cf (Nat.pair (unpair n).fst (y✝ + m✝))\nhy₂✝ : ∀ {m : ℕ}, m < y✝ → ∃ a, a ∈ eval cf (Nat.pair (unpair n).fst (m + m✝)) ∧ ¬a = 0\ny : ℕ\nIH :\n  ∀ (m : ℕ),\n    0 ∈ eval cf (Nat.pair (unpair n).fst (y + m)) →\n      (∀ {m_1 : ℕ}, m_1 < y → ∃ a, a ∈ eval cf (Nat.pair (unpair n).fst (m_1 + m)) ∧ ¬a = 0) →\n        ∃ k, y + m ∈ evaln (k + 1) (rfind' cf) (Nat.pair (unpair n).fst m)\nm : ℕ\nhy₁ : 0 ∈ eval cf (Nat.pair (unpair n).fst (Nat.succ y + m))\nhy₂ : ∀ {m_1 : ℕ}, m_1 < Nat.succ y → ∃ a, a ∈ eval cf (Nat.pair (unpair n).fst (m_1 + m)) ∧ ¬a = 0\na : ℕ\nha : a ∈ eval cf (Nat.pair (unpair n).fst (0 + m))\na0 : ¬a = 0\nk₁ : ℕ\nhk₁ : a ∈ evaln (k₁ + 1) cf (Nat.pair (unpair n).fst (0 + m))\n⊢ ∃ k,\n    Nat.pair (unpair n).fst m ≤ k ∧\n      ∃ a,\n        evaln (k + 1) cf (Nat.pair (unpair n).fst m) = some a ∧\n          (if a = 0 then pure m else evaln k (rfind' cf) (Nat.pair (unpair n).fst (m + 1))) = some (Nat.succ y + m)\n[PROOFSTEP]\nrcases IH m.succ (by simpa [Nat.succ_eq_add_one, add_comm, add_left_comm] using hy₁) fun {i} hi => by\n    simpa [Nat.succ_eq_add_one, add_comm, add_left_comm] using hy₂ (Nat.succ_lt_succ hi) with\n  ⟨k₂, hk₂⟩\n[GOAL]\ncf : Code\nhf : ∀ {n x : ℕ}, x ∈ eval cf n → ∃ k, x ∈ evaln (k + 1) cf n\nn y✝ m✝ : ℕ\nhy₁✝ : 0 ∈ eval cf (Nat.pair (unpair n).fst (y✝ + m✝))\nhy₂✝ : ∀ {m : ℕ}, m < y✝ → ∃ a, a ∈ eval cf (Nat.pair (unpair n).fst (m + m✝)) ∧ ¬a = 0\ny : ℕ\nIH :\n  ∀ (m : ℕ),\n    0 ∈ eval cf (Nat.pair (unpair n).fst (y + m)) →\n      (∀ {m_1 : ℕ}, m_1 < y → ∃ a, a ∈ eval cf (Nat.pair (unpair n).fst (m_1 + m)) ∧ ¬a = 0) →\n        ∃ k, y + m ∈ evaln (k + 1) (rfind' cf) (Nat.pair (unpair n).fst m)\nm : ℕ\nhy₁ : 0 ∈ eval cf (Nat.pair (unpair n).fst (Nat.succ y + m))\nhy₂ : ∀ {m_1 : ℕ}, m_1 < Nat.succ y → ∃ a, a ∈ eval cf (Nat.pair (unpair n).fst (m_1 + m)) ∧ ¬a = 0\na : ℕ\nha : a ∈ eval cf (Nat.pair (unpair n).fst (0 + m))\na0 : ¬a = 0\nk₁ : ℕ\nhk₁ : a ∈ evaln (k₁ + 1) cf (Nat.pair (unpair n).fst (0 + m))\n⊢ 0 ∈ eval cf (Nat.pair (unpair n).fst (y + Nat.succ m))\n[PROOFSTEP]\nsimpa [Nat.succ_eq_add_one, add_comm, add_left_comm] using hy₁\n[GOAL]\ncf : Code\nhf : ∀ {n x : ℕ}, x ∈ eval cf n → ∃ k, x ∈ evaln (k + 1) cf n\nn y✝ m✝ : ℕ\nhy₁✝ : 0 ∈ eval cf (Nat.pair (unpair n).fst (y✝ + m✝))\nhy₂✝ : ∀ {m : ℕ}, m < y✝ → ∃ a, a ∈ eval cf (Nat.pair (unpair n).fst (m + m✝)) ∧ ¬a = 0\ny : ℕ\nIH :\n  ∀ (m : ℕ),\n    0 ∈ eval cf (Nat.pair (unpair n).fst (y + m)) →\n      (∀ {m_1 : ℕ}, m_1 < y → ∃ a, a ∈ eval cf (Nat.pair (unpair n).fst (m_1 + m)) ∧ ¬a = 0) →\n        ∃ k, y + m ∈ evaln (k + 1) (rfind' cf) (Nat.pair (unpair n).fst m)\nm : ℕ\nhy₁ : 0 ∈ eval cf (Nat.pair (unpair n).fst (Nat.succ y + m))\nhy₂ : ∀ {m_1 : ℕ}, m_1 < Nat.succ y → ∃ a, a ∈ eval cf (Nat.pair (unpair n).fst (m_1 + m)) ∧ ¬a = 0\na : ℕ\nha : a ∈ eval cf (Nat.pair (unpair n).fst (0 + m))\na0 : ¬a = 0\nk₁ : ℕ\nhk₁ : a ∈ evaln (k₁ + 1) cf (Nat.pair (unpair n).fst (0 + m))\ni : ℕ\nhi : i < y\n⊢ ∃ a, a ∈ eval cf (Nat.pair (unpair n).fst (i + Nat.succ m)) ∧ ¬a = 0\n[PROOFSTEP]\nsimpa [Nat.succ_eq_add_one, add_comm, add_left_comm] using hy₂ (Nat.succ_lt_succ hi)\n[GOAL]\ncase intro.intro.intro.succ.intro.intro.intro.intro\ncf : Code\nhf : ∀ {n x : ℕ}, x ∈ eval cf n → ∃ k, x ∈ evaln (k + 1) cf n\nn y✝ m✝ : ℕ\nhy₁✝ : 0 ∈ eval cf (Nat.pair (unpair n).fst (y✝ + m✝))\nhy₂✝ : ∀ {m : ℕ}, m < y✝ → ∃ a, a ∈ eval cf (Nat.pair (unpair n).fst (m + m✝)) ∧ ¬a = 0\ny : ℕ\nIH :\n  ∀ (m : ℕ),\n    0 ∈ eval cf (Nat.pair (unpair n).fst (y + m)) →\n      (∀ {m_1 : ℕ}, m_1 < y → ∃ a, a ∈ eval cf (Nat.pair (unpair n).fst (m_1 + m)) ∧ ¬a = 0) →\n        ∃ k, y + m ∈ evaln (k + 1) (rfind' cf) (Nat.pair (unpair n).fst m)\nm : ℕ\nhy₁ : 0 ∈ eval cf (Nat.pair (unpair n).fst (Nat.succ y + m))\nhy₂ : ∀ {m_1 : ℕ}, m_1 < Nat.succ y → ∃ a, a ∈ eval cf (Nat.pair (unpair n).fst (m_1 + m)) ∧ ¬a = 0\na : ℕ\nha : a ∈ eval cf (Nat.pair (unpair n).fst (0 + m))\na0 : ¬a = 0\nk₁ : ℕ\nhk₁ : a ∈ evaln (k₁ + 1) cf (Nat.pair (unpair n).fst (0 + m))\nk₂ : ℕ\nhk₂ : y + Nat.succ m ∈ evaln (k₂ + 1) (rfind' cf) (Nat.pair (unpair n).fst (Nat.succ m))\n⊢ ∃ k,\n    Nat.pair (unpair n).fst m ≤ k ∧\n      ∃ a,\n        evaln (k + 1) cf (Nat.pair (unpair n).fst m) = some a ∧\n          (if a = 0 then pure m else evaln k (rfind' cf) (Nat.pair (unpair n).fst (m + 1))) = some (Nat.succ y + m)\n[PROOFSTEP]\nuse(max k₁ k₂).succ\n[GOAL]\ncase h\ncf : Code\nhf : ∀ {n x : ℕ}, x ∈ eval cf n → ∃ k, x ∈ evaln (k + 1) cf n\nn y✝ m✝ : ℕ\nhy₁✝ : 0 ∈ eval cf (Nat.pair (unpair n).fst (y✝ + m✝))\nhy₂✝ : ∀ {m : ℕ}, m < y✝ → ∃ a, a ∈ eval cf (Nat.pair (unpair n).fst (m + m✝)) ∧ ¬a = 0\ny : ℕ\nIH :\n  ∀ (m : ℕ),\n    0 ∈ eval cf (Nat.pair (unpair n).fst (y + m)) →\n      (∀ {m_1 : ℕ}, m_1 < y → ∃ a, a ∈ eval cf (Nat.pair (unpair n).fst (m_1 + m)) ∧ ¬a = 0) →\n        ∃ k, y + m ∈ evaln (k + 1) (rfind' cf) (Nat.pair (unpair n).fst m)\nm : ℕ\nhy₁ : 0 ∈ eval cf (Nat.pair (unpair n).fst (Nat.succ y + m))\nhy₂ : ∀ {m_1 : ℕ}, m_1 < Nat.succ y → ∃ a, a ∈ eval cf (Nat.pair (unpair n).fst (m_1 + m)) ∧ ¬a = 0\na : ℕ\nha : a ∈ eval cf (Nat.pair (unpair n).fst (0 + m))\na0 : ¬a = 0\nk₁ : ℕ\nhk₁ : a ∈ evaln (k₁ + 1) cf (Nat.pair (unpair n).fst (0 + m))\nk₂ : ℕ\nhk₂ : y + Nat.succ m ∈ evaln (k₂ + 1) (rfind' cf) (Nat.pair (unpair n).fst (Nat.succ m))\n⊢ Nat.pair (unpair n).fst m ≤ Nat.succ (max k₁ k₂) ∧\n    ∃ a,\n      evaln (Nat.succ (max k₁ k₂) + 1) cf (Nat.pair (unpair n).fst m) = some a ∧\n        (if a = 0 then pure m else evaln (Nat.succ (max k₁ k₂)) (rfind' cf) (Nat.pair (unpair n).fst (m + 1))) =\n          some (Nat.succ y + m)\n[PROOFSTEP]\nrw [zero_add] at hk₁ \n[GOAL]\ncase h\ncf : Code\nhf : ∀ {n x : ℕ}, x ∈ eval cf n → ∃ k, x ∈ evaln (k + 1) cf n\nn y✝ m✝ : ℕ\nhy₁✝ : 0 ∈ eval cf (Nat.pair (unpair n).fst (y✝ + m✝))\nhy₂✝ : ∀ {m : ℕ}, m < y✝ → ∃ a, a ∈ eval cf (Nat.pair (unpair n).fst (m + m✝)) ∧ ¬a = 0\ny : ℕ\nIH :\n  ∀ (m : ℕ),\n    0 ∈ eval cf (Nat.pair (unpair n).fst (y + m)) →\n      (∀ {m_1 : ℕ}, m_1 < y → ∃ a, a ∈ eval cf (Nat.pair (unpair n).fst (m_1 + m)) ∧ ¬a = 0) →\n        ∃ k, y + m ∈ evaln (k + 1) (rfind' cf) (Nat.pair (unpair n).fst m)\nm : ℕ\nhy₁ : 0 ∈ eval cf (Nat.pair (unpair n).fst (Nat.succ y + m))\nhy₂ : ∀ {m_1 : ℕ}, m_1 < Nat.succ y → ∃ a, a ∈ eval cf (Nat.pair (unpair n).fst (m_1 + m)) ∧ ¬a = 0\na : ℕ\nha : a ∈ eval cf (Nat.pair (unpair n).fst (0 + m))\na0 : ¬a = 0\nk₁ : ℕ\nhk₁ : a ∈ evaln (k₁ + 1) cf (Nat.pair (unpair n).fst m)\nk₂ : ℕ\nhk₂ : y + Nat.succ m ∈ evaln (k₂ + 1) (rfind' cf) (Nat.pair (unpair n).fst (Nat.succ m))\n⊢ Nat.pair (unpair n).fst m ≤ Nat.succ (max k₁ k₂) ∧\n    ∃ a,\n      evaln (Nat.succ (max k₁ k₂) + 1) cf (Nat.pair (unpair n).fst m) = some a ∧\n        (if a = 0 then pure m else evaln (Nat.succ (max k₁ k₂)) (rfind' cf) (Nat.pair (unpair n).fst (m + 1))) =\n          some (Nat.succ y + m)\n[PROOFSTEP]\nuse Nat.le_succ_of_le <| le_max_of_le_left <| Nat.le_of_lt_succ <| evaln_bound hk₁\n[GOAL]\ncase right\ncf : Code\nhf : ∀ {n x : ℕ}, x ∈ eval cf n → ∃ k, x ∈ evaln (k + 1) cf n\nn y✝ m✝ : ℕ\nhy₁✝ : 0 ∈ eval cf (Nat.pair (unpair n).fst (y✝ + m✝))\nhy₂✝ : ∀ {m : ℕ}, m < y✝ → ∃ a, a ∈ eval cf (Nat.pair (unpair n).fst (m + m✝)) ∧ ¬a = 0\ny : ℕ\nIH :\n  ∀ (m : ℕ),\n    0 ∈ eval cf (Nat.pair (unpair n).fst (y + m)) →\n      (∀ {m_1 : ℕ}, m_1 < y → ∃ a, a ∈ eval cf (Nat.pair (unpair n).fst (m_1 + m)) ∧ ¬a = 0) →\n        ∃ k, y + m ∈ evaln (k + 1) (rfind' cf) (Nat.pair (unpair n).fst m)\nm : ℕ\nhy₁ : 0 ∈ eval cf (Nat.pair (unpair n).fst (Nat.succ y + m))\nhy₂ : ∀ {m_1 : ℕ}, m_1 < Nat.succ y → ∃ a, a ∈ eval cf (Nat.pair (unpair n).fst (m_1 + m)) ∧ ¬a = 0\na : ℕ\nha : a ∈ eval cf (Nat.pair (unpair n).fst (0 + m))\na0 : ¬a = 0\nk₁ : ℕ\nhk₁ : a ∈ evaln (k₁ + 1) cf (Nat.pair (unpair n).fst m)\nk₂ : ℕ\nhk₂ : y + Nat.succ m ∈ evaln (k₂ + 1) (rfind' cf) (Nat.pair (unpair n).fst (Nat.succ m))\n⊢ ∃ a,\n    evaln (Nat.succ (max k₁ k₂) + 1) cf (Nat.pair (unpair n).fst m) = some a ∧\n      (if a = 0 then pure m else evaln (Nat.succ (max k₁ k₂)) (rfind' cf) (Nat.pair (unpair n).fst (m + 1))) =\n        some (Nat.succ y + m)\n[PROOFSTEP]\nuse a\n[GOAL]\ncase h\ncf : Code\nhf : ∀ {n x : ℕ}, x ∈ eval cf n → ∃ k, x ∈ evaln (k + 1) cf n\nn y✝ m✝ : ℕ\nhy₁✝ : 0 ∈ eval cf (Nat.pair (unpair n).fst (y✝ + m✝))\nhy₂✝ : ∀ {m : ℕ}, m < y✝ → ∃ a, a ∈ eval cf (Nat.pair (unpair n).fst (m + m✝)) ∧ ¬a = 0\ny : ℕ\nIH :\n  ∀ (m : ℕ),\n    0 ∈ eval cf (Nat.pair (unpair n).fst (y + m)) →\n      (∀ {m_1 : ℕ}, m_1 < y → ∃ a, a ∈ eval cf (Nat.pair (unpair n).fst (m_1 + m)) ∧ ¬a = 0) →\n        ∃ k, y + m ∈ evaln (k + 1) (rfind' cf) (Nat.pair (unpair n).fst m)\nm : ℕ\nhy₁ : 0 ∈ eval cf (Nat.pair (unpair n).fst (Nat.succ y + m))\nhy₂ : ∀ {m_1 : ℕ}, m_1 < Nat.succ y → ∃ a, a ∈ eval cf (Nat.pair (unpair n).fst (m_1 + m)) ∧ ¬a = 0\na : ℕ\nha : a ∈ eval cf (Nat.pair (unpair n).fst (0 + m))\na0 : ¬a = 0\nk₁ : ℕ\nhk₁ : a ∈ evaln (k₁ + 1) cf (Nat.pair (unpair n).fst m)\nk₂ : ℕ\nhk₂ : y + Nat.succ m ∈ evaln (k₂ + 1) (rfind' cf) (Nat.pair (unpair n).fst (Nat.succ m))\n⊢ evaln (Nat.succ (max k₁ k₂) + 1) cf (Nat.pair (unpair n).fst m) = some a ∧\n    (if a = 0 then pure m else evaln (Nat.succ (max k₁ k₂)) (rfind' cf) (Nat.pair (unpair n).fst (m + 1))) =\n      some (Nat.succ y + m)\n[PROOFSTEP]\nuse evaln_mono (Nat.succ_le_succ <| Nat.le_succ_of_le <| le_max_left _ _) hk₁\n[GOAL]\ncase right\ncf : Code\nhf : ∀ {n x : ℕ}, x ∈ eval cf n → ∃ k, x ∈ evaln (k + 1) cf n\nn y✝ m✝ : ℕ\nhy₁✝ : 0 ∈ eval cf (Nat.pair (unpair n).fst (y✝ + m✝))\nhy₂✝ : ∀ {m : ℕ}, m < y✝ → ∃ a, a ∈ eval cf (Nat.pair (unpair n).fst (m + m✝)) ∧ ¬a = 0\ny : ℕ\nIH :\n  ∀ (m : ℕ),\n    0 ∈ eval cf (Nat.pair (unpair n).fst (y + m)) →\n      (∀ {m_1 : ℕ}, m_1 < y → ∃ a, a ∈ eval cf (Nat.pair (unpair n).fst (m_1 + m)) ∧ ¬a = 0) →\n        ∃ k, y + m ∈ evaln (k + 1) (rfind' cf) (Nat.pair (unpair n).fst m)\nm : ℕ\nhy₁ : 0 ∈ eval cf (Nat.pair (unpair n).fst (Nat.succ y + m))\nhy₂ : ∀ {m_1 : ℕ}, m_1 < Nat.succ y → ∃ a, a ∈ eval cf (Nat.pair (unpair n).fst (m_1 + m)) ∧ ¬a = 0\na : ℕ\nha : a ∈ eval cf (Nat.pair (unpair n).fst (0 + m))\na0 : ¬a = 0\nk₁ : ℕ\nhk₁ : a ∈ evaln (k₁ + 1) cf (Nat.pair (unpair n).fst m)\nk₂ : ℕ\nhk₂ : y + Nat.succ m ∈ evaln (k₂ + 1) (rfind' cf) (Nat.pair (unpair n).fst (Nat.succ m))\n⊢ (if a = 0 then pure m else evaln (Nat.succ (max k₁ k₂)) (rfind' cf) (Nat.pair (unpair n).fst (m + 1))) =\n    some (Nat.succ y + m)\n[PROOFSTEP]\nsimpa [Nat.succ_eq_add_one, a0, -max_eq_left, -max_eq_right, add_comm, add_left_comm] using\n  evaln_mono (Nat.succ_le_succ <| le_max_right _ _) hk₂\n[GOAL]\n⊢ Primrec Nat.Partrec.Code.G\n[PROOFSTEP]\nhave a := (Primrec.ofNat (ℕ × Code)).comp (Primrec.list_length (α := List (Option ℕ)))\n[GOAL]\na : Primrec fun a => ofNat (ℕ × Code) (List.length a)\n⊢ Primrec Nat.Partrec.Code.G\n[PROOFSTEP]\nhave k := Primrec.fst.comp a\n[GOAL]\na : Primrec fun a => ofNat (ℕ × Code) (List.length a)\nk : Primrec fun a => (ofNat (ℕ × Code) (List.length a)).fst\n⊢ Primrec Nat.Partrec.Code.G\n[PROOFSTEP]\nrefine' Primrec.option_some.comp (Primrec.list_map (Primrec.list_range.comp k) (_ : Primrec _))\n[GOAL]\na : Primrec fun a => ofNat (ℕ × Code) (List.length a)\nk : Primrec fun a => (ofNat (ℕ × Code) (List.length a)).fst\n⊢ Primrec fun p =>\n    (fun a n =>\n        Nat.casesOn (ofNat (ℕ × Code) (List.length a)).fst Option.none fun k' =>\n          Code.recOn (ofNat (ℕ × Code) (List.length a)).snd (some 0) (some (Nat.succ n)) (some (unpair n).fst)\n            (some (unpair n).snd)\n            (fun cf cg x x => do\n              let x ← Nat.Partrec.Code.lup a ((ofNat (ℕ × Code) (List.length a)).fst, cf) n\n              let y ← Nat.Partrec.Code.lup a ((ofNat (ℕ × Code) (List.length a)).fst, cg) n\n              some (Nat.pair x y))\n            (fun cf cg x x => do\n              let x ← Nat.Partrec.Code.lup a ((ofNat (ℕ × Code) (List.length a)).fst, cg) n\n              Nat.Partrec.Code.lup a ((ofNat (ℕ × Code) (List.length a)).fst, cf) x)\n            (fun cf cg x x =>\n              let z := (unpair n).fst;\n              Nat.casesOn (unpair n).snd (Nat.Partrec.Code.lup a ((ofNat (ℕ × Code) (List.length a)).fst, cf) z)\n                fun y => do\n                let i ← Nat.Partrec.Code.lup a (k', (ofNat (ℕ × Code) (List.length a)).snd) (Nat.pair z y)\n                Nat.Partrec.Code.lup a ((ofNat (ℕ × Code) (List.length a)).fst, cg) (Nat.pair z (Nat.pair y i)))\n            fun cf x =>\n            let z := (unpair n).fst;\n            let m := (unpair n).snd;\n            do\n            let x ← Nat.Partrec.Code.lup a ((ofNat (ℕ × Code) (List.length a)).fst, cf) (Nat.pair z m)\n            Nat.casesOn x (some m) fun x =>\n                Nat.Partrec.Code.lup a (k', (ofNat (ℕ × Code) (List.length a)).snd) (Nat.pair z (m + 1)))\n      p.fst p.snd\n[PROOFSTEP]\nreplace k := k.comp (Primrec.fst (β := ℕ))\n[GOAL]\na : Primrec fun a => ofNat (ℕ × Code) (List.length a)\nk : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst)).fst\n⊢ Primrec fun p =>\n    (fun a n =>\n        Nat.casesOn (ofNat (ℕ × Code) (List.length a)).fst Option.none fun k' =>\n          Code.recOn (ofNat (ℕ × Code) (List.length a)).snd (some 0) (some (Nat.succ n)) (some (unpair n).fst)\n            (some (unpair n).snd)\n            (fun cf cg x x => do\n              let x ← Nat.Partrec.Code.lup a ((ofNat (ℕ × Code) (List.length a)).fst, cf) n\n              let y ← Nat.Partrec.Code.lup a ((ofNat (ℕ × Code) (List.length a)).fst, cg) n\n              some (Nat.pair x y))\n            (fun cf cg x x => do\n              let x ← Nat.Partrec.Code.lup a ((ofNat (ℕ × Code) (List.length a)).fst, cg) n\n              Nat.Partrec.Code.lup a ((ofNat (ℕ × Code) (List.length a)).fst, cf) x)\n            (fun cf cg x x =>\n              let z := (unpair n).fst;\n              Nat.casesOn (unpair n).snd (Nat.Partrec.Code.lup a ((ofNat (ℕ × Code) (List.length a)).fst, cf) z)\n                fun y => do\n                let i ← Nat.Partrec.Code.lup a (k', (ofNat (ℕ × Code) (List.length a)).snd) (Nat.pair z y)\n                Nat.Partrec.Code.lup a ((ofNat (ℕ × Code) (List.length a)).fst, cg) (Nat.pair z (Nat.pair y i)))\n            fun cf x =>\n            let z := (unpair n).fst;\n            let m := (unpair n).snd;\n            do\n            let x ← Nat.Partrec.Code.lup a ((ofNat (ℕ × Code) (List.length a)).fst, cf) (Nat.pair z m)\n            Nat.casesOn x (some m) fun x =>\n                Nat.Partrec.Code.lup a (k', (ofNat (ℕ × Code) (List.length a)).snd) (Nat.pair z (m + 1)))\n      p.fst p.snd\n[PROOFSTEP]\nhave n := Primrec.snd (α := List (List (Option ℕ))) (β := ℕ)\n[GOAL]\na : Primrec fun a => ofNat (ℕ × Code) (List.length a)\nk : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst)).fst\nn : Primrec Prod.snd\n⊢ Primrec fun p =>\n    (fun a n =>\n        Nat.casesOn (ofNat (ℕ × Code) (List.length a)).fst Option.none fun k' =>\n          Code.recOn (ofNat (ℕ × Code) (List.length a)).snd (some 0) (some (Nat.succ n)) (some (unpair n).fst)\n            (some (unpair n).snd)\n            (fun cf cg x x => do\n              let x ← Nat.Partrec.Code.lup a ((ofNat (ℕ × Code) (List.length a)).fst, cf) n\n              let y ← Nat.Partrec.Code.lup a ((ofNat (ℕ × Code) (List.length a)).fst, cg) n\n              some (Nat.pair x y))\n            (fun cf cg x x => do\n              let x ← Nat.Partrec.Code.lup a ((ofNat (ℕ × Code) (List.length a)).fst, cg) n\n              Nat.Partrec.Code.lup a ((ofNat (ℕ × Code) (List.length a)).fst, cf) x)\n            (fun cf cg x x =>\n              let z := (unpair n).fst;\n              Nat.casesOn (unpair n).snd (Nat.Partrec.Code.lup a ((ofNat (ℕ × Code) (List.length a)).fst, cf) z)\n                fun y => do\n                let i ← Nat.Partrec.Code.lup a (k', (ofNat (ℕ × Code) (List.length a)).snd) (Nat.pair z y)\n                Nat.Partrec.Code.lup a ((ofNat (ℕ × Code) (List.length a)).fst, cg) (Nat.pair z (Nat.pair y i)))\n            fun cf x =>\n            let z := (unpair n).fst;\n            let m := (unpair n).snd;\n            do\n            let x ← Nat.Partrec.Code.lup a ((ofNat (ℕ × Code) (List.length a)).fst, cf) (Nat.pair z m)\n            Nat.casesOn x (some m) fun x =>\n                Nat.Partrec.Code.lup a (k', (ofNat (ℕ × Code) (List.length a)).snd) (Nat.pair z (m + 1)))\n      p.fst p.snd\n[PROOFSTEP]\nrefine' Primrec.nat_casesOn k (_root_.Primrec.const Option.none) (_ : Primrec _)\n[GOAL]\na : Primrec fun a => ofNat (ℕ × Code) (List.length a)\nk : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst)).fst\nn : Primrec Prod.snd\n⊢ Primrec fun p =>\n    (fun p n =>\n        (fun k' =>\n            Code.recOn (ofNat (ℕ × Code) (List.length p.fst)).snd (some 0) (some (Nat.succ p.snd))\n              (some (unpair p.snd).fst) (some (unpair p.snd).snd)\n              (fun cf cg x x => do\n                let x ← Nat.Partrec.Code.lup p.fst ((ofNat (ℕ × Code) (List.length p.fst)).fst, cf) p.snd\n                let y ← Nat.Partrec.Code.lup p.fst ((ofNat (ℕ × Code) (List.length p.fst)).fst, cg) p.snd\n                some (Nat.pair x y))\n              (fun cf cg x x => do\n                let x ← Nat.Partrec.Code.lup p.fst ((ofNat (ℕ × Code) (List.length p.fst)).fst, cg) p.snd\n                Nat.Partrec.Code.lup p.fst ((ofNat (ℕ × Code) (List.length p.fst)).fst, cf) x)\n              (fun cf cg x x =>\n                let z := (unpair p.snd).fst;\n                Nat.casesOn (unpair p.snd).snd\n                  (Nat.Partrec.Code.lup p.fst ((ofNat (ℕ × Code) (List.length p.fst)).fst, cf) z) fun y => do\n                  let i ← Nat.Partrec.Code.lup p.fst (k', (ofNat (ℕ × Code) (List.length p.fst)).snd) (Nat.pair z y)\n                  Nat.Partrec.Code.lup p.fst ((ofNat (ℕ × Code) (List.length p.fst)).fst, cg)\n                      (Nat.pair z (Nat.pair y i)))\n              fun cf x =>\n              let z := (unpair p.snd).fst;\n              let m := (unpair p.snd).snd;\n              do\n              let x ← Nat.Partrec.Code.lup p.fst ((ofNat (ℕ × Code) (List.length p.fst)).fst, cf) (Nat.pair z m)\n              Nat.casesOn x (some m) fun x =>\n                  Nat.Partrec.Code.lup p.fst (k', (ofNat (ℕ × Code) (List.length p.fst)).snd) (Nat.pair z (m + 1)))\n          n)\n      p.fst p.snd\n[PROOFSTEP]\nhave k := k.comp (Primrec.fst (β := ℕ))\n[GOAL]\na : Primrec fun a => ofNat (ℕ × Code) (List.length a)\nk✝ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst)).fst\nn : Primrec Prod.snd\nk : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).fst\n⊢ Primrec fun p =>\n    (fun p n =>\n        (fun k' =>\n            Code.recOn (ofNat (ℕ × Code) (List.length p.fst)).snd (some 0) (some (Nat.succ p.snd))\n              (some (unpair p.snd).fst) (some (unpair p.snd).snd)\n              (fun cf cg x x => do\n                let x ← Nat.Partrec.Code.lup p.fst ((ofNat (ℕ × Code) (List.length p.fst)).fst, cf) p.snd\n                let y ← Nat.Partrec.Code.lup p.fst ((ofNat (ℕ × Code) (List.length p.fst)).fst, cg) p.snd\n                some (Nat.pair x y))\n              (fun cf cg x x => do\n                let x ← Nat.Partrec.Code.lup p.fst ((ofNat (ℕ × Code) (List.length p.fst)).fst, cg) p.snd\n                Nat.Partrec.Code.lup p.fst ((ofNat (ℕ × Code) (List.length p.fst)).fst, cf) x)\n              (fun cf cg x x =>\n                let z := (unpair p.snd).fst;\n                Nat.casesOn (unpair p.snd).snd\n                  (Nat.Partrec.Code.lup p.fst ((ofNat (ℕ × Code) (List.length p.fst)).fst, cf) z) fun y => do\n                  let i ← Nat.Partrec.Code.lup p.fst (k', (ofNat (ℕ × Code) (List.length p.fst)).snd) (Nat.pair z y)\n                  Nat.Partrec.Code.lup p.fst ((ofNat (ℕ × Code) (List.length p.fst)).fst, cg)\n                      (Nat.pair z (Nat.pair y i)))\n              fun cf x =>\n              let z := (unpair p.snd).fst;\n              let m := (unpair p.snd).snd;\n              do\n              let x ← Nat.Partrec.Code.lup p.fst ((ofNat (ℕ × Code) (List.length p.fst)).fst, cf) (Nat.pair z m)\n              Nat.casesOn x (some m) fun x =>\n                  Nat.Partrec.Code.lup p.fst (k', (ofNat (ℕ × Code) (List.length p.fst)).snd) (Nat.pair z (m + 1)))\n          n)\n      p.fst p.snd\n[PROOFSTEP]\nhave n := n.comp (Primrec.fst (β := ℕ))\n[GOAL]\na : Primrec fun a => ofNat (ℕ × Code) (List.length a)\nk✝ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst)).fst\nn✝ : Primrec Prod.snd\nk : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).fst\nn : Primrec fun a => a.fst.snd\n⊢ Primrec fun p =>\n    (fun p n =>\n        (fun k' =>\n            Code.recOn (ofNat (ℕ × Code) (List.length p.fst)).snd (some 0) (some (Nat.succ p.snd))\n              (some (unpair p.snd).fst) (some (unpair p.snd).snd)\n              (fun cf cg x x => do\n                let x ← Nat.Partrec.Code.lup p.fst ((ofNat (ℕ × Code) (List.length p.fst)).fst, cf) p.snd\n                let y ← Nat.Partrec.Code.lup p.fst ((ofNat (ℕ × Code) (List.length p.fst)).fst, cg) p.snd\n                some (Nat.pair x y))\n              (fun cf cg x x => do\n                let x ← Nat.Partrec.Code.lup p.fst ((ofNat (ℕ × Code) (List.length p.fst)).fst, cg) p.snd\n                Nat.Partrec.Code.lup p.fst ((ofNat (ℕ × Code) (List.length p.fst)).fst, cf) x)\n              (fun cf cg x x =>\n                let z := (unpair p.snd).fst;\n                Nat.casesOn (unpair p.snd).snd\n                  (Nat.Partrec.Code.lup p.fst ((ofNat (ℕ × Code) (List.length p.fst)).fst, cf) z) fun y => do\n                  let i ← Nat.Partrec.Code.lup p.fst (k', (ofNat (ℕ × Code) (List.length p.fst)).snd) (Nat.pair z y)\n                  Nat.Partrec.Code.lup p.fst ((ofNat (ℕ × Code) (List.length p.fst)).fst, cg)\n                      (Nat.pair z (Nat.pair y i)))\n              fun cf x =>\n              let z := (unpair p.snd).fst;\n              let m := (unpair p.snd).snd;\n              do\n              let x ← Nat.Partrec.Code.lup p.fst ((ofNat (ℕ × Code) (List.length p.fst)).fst, cf) (Nat.pair z m)\n              Nat.casesOn x (some m) fun x =>\n                  Nat.Partrec.Code.lup p.fst (k', (ofNat (ℕ × Code) (List.length p.fst)).snd) (Nat.pair z (m + 1)))\n          n)\n      p.fst p.snd\n[PROOFSTEP]\nhave k' := Primrec.snd (α := List (List (Option ℕ)) × ℕ) (β := ℕ)\n[GOAL]\na : Primrec fun a => ofNat (ℕ × Code) (List.length a)\nk✝ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst)).fst\nn✝ : Primrec Prod.snd\nk : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).fst\nn : Primrec fun a => a.fst.snd\nk' : Primrec Prod.snd\n⊢ Primrec fun p =>\n    (fun p n =>\n        (fun k' =>\n            Code.recOn (ofNat (ℕ × Code) (List.length p.fst)).snd (some 0) (some (Nat.succ p.snd))\n              (some (unpair p.snd).fst) (some (unpair p.snd).snd)\n              (fun cf cg x x => do\n                let x ← Nat.Partrec.Code.lup p.fst ((ofNat (ℕ × Code) (List.length p.fst)).fst, cf) p.snd\n                let y ← Nat.Partrec.Code.lup p.fst ((ofNat (ℕ × Code) (List.length p.fst)).fst, cg) p.snd\n                some (Nat.pair x y))\n              (fun cf cg x x => do\n                let x ← Nat.Partrec.Code.lup p.fst ((ofNat (ℕ × Code) (List.length p.fst)).fst, cg) p.snd\n                Nat.Partrec.Code.lup p.fst ((ofNat (ℕ × Code) (List.length p.fst)).fst, cf) x)\n              (fun cf cg x x =>\n                let z := (unpair p.snd).fst;\n                Nat.casesOn (unpair p.snd).snd\n                  (Nat.Partrec.Code.lup p.fst ((ofNat (ℕ × Code) (List.length p.fst)).fst, cf) z) fun y => do\n                  let i ← Nat.Partrec.Code.lup p.fst (k', (ofNat (ℕ × Code) (List.length p.fst)).snd) (Nat.pair z y)\n                  Nat.Partrec.Code.lup p.fst ((ofNat (ℕ × Code) (List.length p.fst)).fst, cg)\n                      (Nat.pair z (Nat.pair y i)))\n              fun cf x =>\n              let z := (unpair p.snd).fst;\n              let m := (unpair p.snd).snd;\n              do\n              let x ← Nat.Partrec.Code.lup p.fst ((ofNat (ℕ × Code) (List.length p.fst)).fst, cf) (Nat.pair z m)\n              Nat.casesOn x (some m) fun x =>\n                  Nat.Partrec.Code.lup p.fst (k', (ofNat (ℕ × Code) (List.length p.fst)).snd) (Nat.pair z (m + 1)))\n          n)\n      p.fst p.snd\n[PROOFSTEP]\nhave c := Primrec.snd.comp (a.comp <| (Primrec.fst (β := ℕ)).comp (Primrec.fst (β := ℕ)))\n[GOAL]\na : Primrec fun a => ofNat (ℕ × Code) (List.length a)\nk✝ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst)).fst\nn✝ : Primrec Prod.snd\nk : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).fst\nn : Primrec fun a => a.fst.snd\nk' : Primrec Prod.snd\nc : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).snd\n⊢ Primrec fun p =>\n    (fun p n =>\n        (fun k' =>\n            Code.recOn (ofNat (ℕ × Code) (List.length p.fst)).snd (some 0) (some (Nat.succ p.snd))\n              (some (unpair p.snd).fst) (some (unpair p.snd).snd)\n              (fun cf cg x x => do\n                let x ← Nat.Partrec.Code.lup p.fst ((ofNat (ℕ × Code) (List.length p.fst)).fst, cf) p.snd\n                let y ← Nat.Partrec.Code.lup p.fst ((ofNat (ℕ × Code) (List.length p.fst)).fst, cg) p.snd\n                some (Nat.pair x y))\n              (fun cf cg x x => do\n                let x ← Nat.Partrec.Code.lup p.fst ((ofNat (ℕ × Code) (List.length p.fst)).fst, cg) p.snd\n                Nat.Partrec.Code.lup p.fst ((ofNat (ℕ × Code) (List.length p.fst)).fst, cf) x)\n              (fun cf cg x x =>\n                let z := (unpair p.snd).fst;\n                Nat.casesOn (unpair p.snd).snd\n                  (Nat.Partrec.Code.lup p.fst ((ofNat (ℕ × Code) (List.length p.fst)).fst, cf) z) fun y => do\n                  let i ← Nat.Partrec.Code.lup p.fst (k', (ofNat (ℕ × Code) (List.length p.fst)).snd) (Nat.pair z y)\n                  Nat.Partrec.Code.lup p.fst ((ofNat (ℕ × Code) (List.length p.fst)).fst, cg)\n                      (Nat.pair z (Nat.pair y i)))\n              fun cf x =>\n              let z := (unpair p.snd).fst;\n              let m := (unpair p.snd).snd;\n              do\n              let x ← Nat.Partrec.Code.lup p.fst ((ofNat (ℕ × Code) (List.length p.fst)).fst, cf) (Nat.pair z m)\n              Nat.casesOn x (some m) fun x =>\n                  Nat.Partrec.Code.lup p.fst (k', (ofNat (ℕ × Code) (List.length p.fst)).snd) (Nat.pair z (m + 1)))\n          n)\n      p.fst p.snd\n[PROOFSTEP]\napply\n  Nat.Partrec.Code.rec_prim c (_root_.Primrec.const (some 0)) (Primrec.option_some.comp (_root_.Primrec.succ.comp n))\n    (Primrec.option_some.comp (Primrec.fst.comp <| Primrec.unpair.comp n))\n    (Primrec.option_some.comp (Primrec.snd.comp <| Primrec.unpair.comp n))\n[GOAL]\ncase hpr\na : Primrec fun a => ofNat (ℕ × Code) (List.length a)\nk✝ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst)).fst\nn✝ : Primrec Prod.snd\nk : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).fst\nn : Primrec fun a => a.fst.snd\nk' : Primrec Prod.snd\nc : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).snd\n⊢ Primrec fun a => do\n    let x ←\n      Nat.Partrec.Code.lup a.fst.fst.fst ((ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst, a.snd.fst) a.fst.fst.snd\n    let y ←\n      Nat.Partrec.Code.lup a.fst.fst.fst ((ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst, a.snd.snd.fst)\n          a.fst.fst.snd\n    some (Nat.pair x y)\n[PROOFSTEP]\nhave L :=\n  (Primrec.fst.comp Primrec.fst).comp\n    (Primrec.fst (α := (List (List (Option ℕ)) × ℕ) × ℕ) (β := Code × Code × Option ℕ × Option ℕ))\n[GOAL]\ncase hpr\na : Primrec fun a => ofNat (ℕ × Code) (List.length a)\nk✝ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst)).fst\nn✝ : Primrec Prod.snd\nk : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).fst\nn : Primrec fun a => a.fst.snd\nk' : Primrec Prod.snd\nc : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).snd\nL : Primrec fun a => a.fst.fst.fst\n⊢ Primrec fun a => do\n    let x ←\n      Nat.Partrec.Code.lup a.fst.fst.fst ((ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst, a.snd.fst) a.fst.fst.snd\n    let y ←\n      Nat.Partrec.Code.lup a.fst.fst.fst ((ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst, a.snd.snd.fst)\n          a.fst.fst.snd\n    some (Nat.pair x y)\n[PROOFSTEP]\nhave k := k.comp (Primrec.fst (β := Code × Code × Option ℕ × Option ℕ))\n[GOAL]\ncase hpr\na : Primrec fun a => ofNat (ℕ × Code) (List.length a)\nk✝¹ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst)).fst\nn✝ : Primrec Prod.snd\nk✝ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).fst\nn : Primrec fun a => a.fst.snd\nk' : Primrec Prod.snd\nc : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).snd\nL : Primrec fun a => a.fst.fst.fst\nk : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst\n⊢ Primrec fun a => do\n    let x ←\n      Nat.Partrec.Code.lup a.fst.fst.fst ((ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst, a.snd.fst) a.fst.fst.snd\n    let y ←\n      Nat.Partrec.Code.lup a.fst.fst.fst ((ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst, a.snd.snd.fst)\n          a.fst.fst.snd\n    some (Nat.pair x y)\n[PROOFSTEP]\nhave n := n.comp (Primrec.fst (β := Code × Code × Option ℕ × Option ℕ))\n[GOAL]\ncase hpr\na : Primrec fun a => ofNat (ℕ × Code) (List.length a)\nk✝¹ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst)).fst\nn✝¹ : Primrec Prod.snd\nk✝ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).fst\nn✝ : Primrec fun a => a.fst.snd\nk' : Primrec Prod.snd\nc : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).snd\nL : Primrec fun a => a.fst.fst.fst\nk : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst\nn : Primrec fun a => a.fst.fst.snd\n⊢ Primrec fun a => do\n    let x ←\n      Nat.Partrec.Code.lup a.fst.fst.fst ((ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst, a.snd.fst) a.fst.fst.snd\n    let y ←\n      Nat.Partrec.Code.lup a.fst.fst.fst ((ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst, a.snd.snd.fst)\n          a.fst.fst.snd\n    some (Nat.pair x y)\n[PROOFSTEP]\nhave cf :=\n  Primrec.fst.comp (Primrec.snd (α := (List (List (Option ℕ)) × ℕ) × ℕ) (β := Code × Code × Option ℕ × Option ℕ))\n[GOAL]\ncase hpr\na : Primrec fun a => ofNat (ℕ × Code) (List.length a)\nk✝¹ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst)).fst\nn✝¹ : Primrec Prod.snd\nk✝ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).fst\nn✝ : Primrec fun a => a.fst.snd\nk' : Primrec Prod.snd\nc : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).snd\nL : Primrec fun a => a.fst.fst.fst\nk : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst\nn : Primrec fun a => a.fst.fst.snd\ncf : Primrec fun a => a.snd.fst\n⊢ Primrec fun a => do\n    let x ←\n      Nat.Partrec.Code.lup a.fst.fst.fst ((ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst, a.snd.fst) a.fst.fst.snd\n    let y ←\n      Nat.Partrec.Code.lup a.fst.fst.fst ((ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst, a.snd.snd.fst)\n          a.fst.fst.snd\n    some (Nat.pair x y)\n[PROOFSTEP]\nhave cg :=\n  (Primrec.fst.comp Primrec.snd).comp\n    (Primrec.snd (α := (List (List (Option ℕ)) × ℕ) × ℕ) (β := Code × Code × Option ℕ × Option ℕ))\n[GOAL]\ncase hpr\na : Primrec fun a => ofNat (ℕ × Code) (List.length a)\nk✝¹ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst)).fst\nn✝¹ : Primrec Prod.snd\nk✝ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).fst\nn✝ : Primrec fun a => a.fst.snd\nk' : Primrec Prod.snd\nc : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).snd\nL : Primrec fun a => a.fst.fst.fst\nk : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst\nn : Primrec fun a => a.fst.fst.snd\ncf : Primrec fun a => a.snd.fst\ncg : Primrec fun a => a.snd.snd.fst\n⊢ Primrec fun a => do\n    let x ←\n      Nat.Partrec.Code.lup a.fst.fst.fst ((ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst, a.snd.fst) a.fst.fst.snd\n    let y ←\n      Nat.Partrec.Code.lup a.fst.fst.fst ((ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst, a.snd.snd.fst)\n          a.fst.fst.snd\n    some (Nat.pair x y)\n[PROOFSTEP]\nrefine Primrec.option_bind (hlup.comp <| L.pair <| (k.pair cf).pair n) ?_\n[GOAL]\ncase hpr\na : Primrec fun a => ofNat (ℕ × Code) (List.length a)\nk✝¹ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst)).fst\nn✝¹ : Primrec Prod.snd\nk✝ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).fst\nn✝ : Primrec fun a => a.fst.snd\nk' : Primrec Prod.snd\nc : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).snd\nL : Primrec fun a => a.fst.fst.fst\nk : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst\nn : Primrec fun a => a.fst.fst.snd\ncf : Primrec fun a => a.snd.fst\ncg : Primrec fun a => a.snd.snd.fst\n⊢ Primrec₂ fun a x => do\n    let y ←\n      Nat.Partrec.Code.lup a.fst.fst.fst ((ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst, a.snd.snd.fst)\n          a.fst.fst.snd\n    some (Nat.pair x y)\n[PROOFSTEP]\nunfold Primrec₂\n[GOAL]\ncase hpr\na : Primrec fun a => ofNat (ℕ × Code) (List.length a)\nk✝¹ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst)).fst\nn✝¹ : Primrec Prod.snd\nk✝ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).fst\nn✝ : Primrec fun a => a.fst.snd\nk' : Primrec Prod.snd\nc : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).snd\nL : Primrec fun a => a.fst.fst.fst\nk : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst\nn : Primrec fun a => a.fst.fst.snd\ncf : Primrec fun a => a.snd.fst\ncg : Primrec fun a => a.snd.snd.fst\n⊢ Primrec fun p =>\n    (fun a x => do\n        let y ←\n          Nat.Partrec.Code.lup a.fst.fst.fst ((ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst, a.snd.snd.fst)\n              a.fst.fst.snd\n        some (Nat.pair x y))\n      p.fst p.snd\n[PROOFSTEP]\nconv =>\n  congr\n  · ext p\n    dsimp only []\n    erw [Option.bind_eq_bind, ← Option.map_eq_bind]\n[GOAL]\na : Primrec fun a => ofNat (ℕ × Code) (List.length a)\nk✝¹ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst)).fst\nn✝¹ : Primrec Prod.snd\nk✝ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).fst\nn✝ : Primrec fun a => a.fst.snd\nk' : Primrec Prod.snd\nc : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).snd\nL : Primrec fun a => a.fst.fst.fst\nk : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst\nn : Primrec fun a => a.fst.fst.snd\ncf : Primrec fun a => a.snd.fst\ncg : Primrec fun a => a.snd.snd.fst\n| Primrec fun p =>\n    (fun a x => do\n        let y ←\n          Nat.Partrec.Code.lup a.fst.fst.fst ((ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst, a.snd.snd.fst)\n              a.fst.fst.snd\n        some (Nat.pair x y))\n      p.fst p.snd\n[PROOFSTEP]\n  congr\n  · ext p\n    dsimp only []\n    erw [Option.bind_eq_bind, ← Option.map_eq_bind]\n[GOAL]\na : Primrec fun a => ofNat (ℕ × Code) (List.length a)\nk✝¹ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst)).fst\nn✝¹ : Primrec Prod.snd\nk✝ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).fst\nn✝ : Primrec fun a => a.fst.snd\nk' : Primrec Prod.snd\nc : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).snd\nL : Primrec fun a => a.fst.fst.fst\nk : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst\nn : Primrec fun a => a.fst.fst.snd\ncf : Primrec fun a => a.snd.fst\ncg : Primrec fun a => a.snd.snd.fst\n| Primrec fun p =>\n    (fun a x => do\n        let y ←\n          Nat.Partrec.Code.lup a.fst.fst.fst ((ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst, a.snd.snd.fst)\n              a.fst.fst.snd\n        some (Nat.pair x y))\n      p.fst p.snd\n[PROOFSTEP]\n  congr\n  · ext p\n    dsimp only []\n    erw [Option.bind_eq_bind, ← Option.map_eq_bind]\n[GOAL]\na : Primrec fun a => ofNat (ℕ × Code) (List.length a)\nk✝¹ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst)).fst\nn✝¹ : Primrec Prod.snd\nk✝ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).fst\nn✝ : Primrec fun a => a.fst.snd\nk' : Primrec Prod.snd\nc : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).snd\nL : Primrec fun a => a.fst.fst.fst\nk : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst\nn : Primrec fun a => a.fst.fst.snd\ncf : Primrec fun a => a.snd.fst\ncg : Primrec fun a => a.snd.snd.fst\n| Primrec fun p =>\n    (fun a x => do\n        let y ←\n          Nat.Partrec.Code.lup a.fst.fst.fst ((ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst, a.snd.snd.fst)\n              a.fst.fst.snd\n        some (Nat.pair x y))\n      p.fst p.snd\n[PROOFSTEP]\ncongr\n[GOAL]\ncase f\na : Primrec fun a => ofNat (ℕ × Code) (List.length a)\nk✝¹ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst)).fst\nn✝¹ : Primrec Prod.snd\nk✝ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).fst\nn✝ : Primrec fun a => a.fst.snd\nk' : Primrec Prod.snd\nc : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).snd\nL : Primrec fun a => a.fst.fst.fst\nk : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst\nn : Primrec fun a => a.fst.fst.snd\ncf : Primrec fun a => a.snd.fst\ncg : Primrec fun a => a.snd.snd.fst\n| fun p =>\n    (fun a x => do\n        let y ←\n          Nat.Partrec.Code.lup a.fst.fst.fst ((ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst, a.snd.snd.fst)\n              a.fst.fst.snd\n        some (Nat.pair x y))\n      p.fst p.snd\n[PROOFSTEP]\n· ext p\n  dsimp only []\n  erw [Option.bind_eq_bind, ← Option.map_eq_bind]\n[GOAL]\ncase f\na : Primrec fun a => ofNat (ℕ × Code) (List.length a)\nk✝¹ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst)).fst\nn✝¹ : Primrec Prod.snd\nk✝ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).fst\nn✝ : Primrec fun a => a.fst.snd\nk' : Primrec Prod.snd\nc : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).snd\nL : Primrec fun a => a.fst.fst.fst\nk : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst\nn : Primrec fun a => a.fst.fst.snd\ncf : Primrec fun a => a.snd.fst\ncg : Primrec fun a => a.snd.snd.fst\n| fun p =>\n    (fun a x => do\n        let y ←\n          Nat.Partrec.Code.lup a.fst.fst.fst ((ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst, a.snd.snd.fst)\n              a.fst.fst.snd\n        some (Nat.pair x y))\n      p.fst p.snd\n[PROOFSTEP]\n  ext p\n  dsimp only []\n  erw [Option.bind_eq_bind, ← Option.map_eq_bind]\n[GOAL]\ncase f\na : Primrec fun a => ofNat (ℕ × Code) (List.length a)\nk✝¹ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst)).fst\nn✝¹ : Primrec Prod.snd\nk✝ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).fst\nn✝ : Primrec fun a => a.fst.snd\nk' : Primrec Prod.snd\nc : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).snd\nL : Primrec fun a => a.fst.fst.fst\nk : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst\nn : Primrec fun a => a.fst.fst.snd\ncf : Primrec fun a => a.snd.fst\ncg : Primrec fun a => a.snd.snd.fst\n| fun p =>\n    (fun a x => do\n        let y ←\n          Nat.Partrec.Code.lup a.fst.fst.fst ((ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst, a.snd.snd.fst)\n              a.fst.fst.snd\n        some (Nat.pair x y))\n      p.fst p.snd\n[PROOFSTEP]\n  ext p\n  dsimp only []\n  erw [Option.bind_eq_bind, ← Option.map_eq_bind]\n[GOAL]\ncase f\na : Primrec fun a => ofNat (ℕ × Code) (List.length a)\nk✝¹ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst)).fst\nn✝¹ : Primrec Prod.snd\nk✝ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).fst\nn✝ : Primrec fun a => a.fst.snd\nk' : Primrec Prod.snd\nc : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).snd\nL : Primrec fun a => a.fst.fst.fst\nk : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst\nn : Primrec fun a => a.fst.fst.snd\ncf : Primrec fun a => a.snd.fst\ncg : Primrec fun a => a.snd.snd.fst\n| fun p =>\n    (fun a x => do\n        let y ←\n          Nat.Partrec.Code.lup a.fst.fst.fst ((ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst, a.snd.snd.fst)\n              a.fst.fst.snd\n        some (Nat.pair x y))\n      p.fst p.snd\n[PROOFSTEP]\next p\n[GOAL]\ncase f.h\na : Primrec fun a => ofNat (ℕ × Code) (List.length a)\nk✝¹ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst)).fst\nn✝¹ : Primrec Prod.snd\nk✝ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).fst\nn✝ : Primrec fun a => a.fst.snd\nk' : Primrec Prod.snd\nc : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).snd\nL : Primrec fun a => a.fst.fst.fst\nk : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst\nn : Primrec fun a => a.fst.fst.snd\ncf : Primrec fun a => a.snd.fst\ncg : Primrec fun a => a.snd.snd.fst\np : (((List (List (Option ℕ)) × ℕ) × ℕ) × Code × Code × Option ℕ × Option ℕ) × ℕ\n| (fun a x => do\n      let y ←\n        Nat.Partrec.Code.lup a.fst.fst.fst ((ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst, a.snd.snd.fst)\n            a.fst.fst.snd\n      some (Nat.pair x y))\n    p.fst p.snd\n[PROOFSTEP]\ndsimp only []\n[GOAL]\ncase f.h\na : Primrec fun a => ofNat (ℕ × Code) (List.length a)\nk✝¹ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst)).fst\nn✝¹ : Primrec Prod.snd\nk✝ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).fst\nn✝ : Primrec fun a => a.fst.snd\nk' : Primrec Prod.snd\nc : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).snd\nL : Primrec fun a => a.fst.fst.fst\nk : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst\nn : Primrec fun a => a.fst.fst.snd\ncf : Primrec fun a => a.snd.fst\ncg : Primrec fun a => a.snd.snd.fst\np : (((List (List (Option ℕ)) × ℕ) × ℕ) × Code × Code × Option ℕ × Option ℕ) × ℕ\n| do\n    let y ←\n      Nat.Partrec.Code.lup p.fst.fst.fst.fst ((ofNat (ℕ × Code) (List.length p.fst.fst.fst.fst)).fst, p.fst.snd.snd.fst)\n          p.fst.fst.fst.snd\n    some (Nat.pair p.snd y)\n[PROOFSTEP]\nerw [Option.bind_eq_bind, ← Option.map_eq_bind]\n[GOAL]\ncase hpr\na : Primrec fun a => ofNat (ℕ × Code) (List.length a)\nk✝¹ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst)).fst\nn✝¹ : Primrec Prod.snd\nk✝ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).fst\nn✝ : Primrec fun a => a.fst.snd\nk' : Primrec Prod.snd\nc : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).snd\nL : Primrec fun a => a.fst.fst.fst\nk : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst\nn : Primrec fun a => a.fst.fst.snd\ncf : Primrec fun a => a.snd.fst\ncg : Primrec fun a => a.snd.snd.fst\n⊢ Primrec fun p =>\n    Option.map (fun y => Nat.pair p.snd y)\n      (Nat.Partrec.Code.lup p.fst.fst.fst.fst\n        ((ofNat (ℕ × Code) (List.length p.fst.fst.fst.fst)).fst, p.fst.snd.snd.fst) p.fst.fst.fst.snd)\n[PROOFSTEP]\nrefine Primrec.option_map ((hlup.comp <| L.pair <| (k.pair cg).pair n).comp Primrec.fst) ?_\n[GOAL]\ncase hpr\na : Primrec fun a => ofNat (ℕ × Code) (List.length a)\nk✝¹ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst)).fst\nn✝¹ : Primrec Prod.snd\nk✝ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).fst\nn✝ : Primrec fun a => a.fst.snd\nk' : Primrec Prod.snd\nc : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).snd\nL : Primrec fun a => a.fst.fst.fst\nk : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst\nn : Primrec fun a => a.fst.fst.snd\ncf : Primrec fun a => a.snd.fst\ncg : Primrec fun a => a.snd.snd.fst\n⊢ Primrec₂ fun p y => Nat.pair p.snd y\n[PROOFSTEP]\nunfold Primrec₂\n[GOAL]\ncase hpr\na : Primrec fun a => ofNat (ℕ × Code) (List.length a)\nk✝¹ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst)).fst\nn✝¹ : Primrec Prod.snd\nk✝ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).fst\nn✝ : Primrec fun a => a.fst.snd\nk' : Primrec Prod.snd\nc : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).snd\nL : Primrec fun a => a.fst.fst.fst\nk : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst\nn : Primrec fun a => a.fst.fst.snd\ncf : Primrec fun a => a.snd.fst\ncg : Primrec fun a => a.snd.snd.fst\n⊢ Primrec fun p => (fun p y => Nat.pair p.snd y) p.fst p.snd\n[PROOFSTEP]\nexact Primrec₂.natPair.comp (Primrec.snd.comp Primrec.fst) Primrec.snd\n[GOAL]\ncase hco\na : Primrec fun a => ofNat (ℕ × Code) (List.length a)\nk✝ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst)).fst\nn✝ : Primrec Prod.snd\nk : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).fst\nn : Primrec fun a => a.fst.snd\nk' : Primrec Prod.snd\nc : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).snd\n⊢ Primrec fun a => do\n    let x ←\n      Nat.Partrec.Code.lup a.fst.fst.fst ((ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst, a.snd.snd.fst)\n          a.fst.fst.snd\n    Nat.Partrec.Code.lup a.fst.fst.fst ((ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst, a.snd.fst) x\n[PROOFSTEP]\nhave L :=\n  (Primrec.fst.comp Primrec.fst).comp\n    (Primrec.fst (α := (List (List (Option ℕ)) × ℕ) × ℕ) (β := Code × Code × Option ℕ × Option ℕ))\n[GOAL]\ncase hco\na : Primrec fun a => ofNat (ℕ × Code) (List.length a)\nk✝ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst)).fst\nn✝ : Primrec Prod.snd\nk : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).fst\nn : Primrec fun a => a.fst.snd\nk' : Primrec Prod.snd\nc : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).snd\nL : Primrec fun a => a.fst.fst.fst\n⊢ Primrec fun a => do\n    let x ←\n      Nat.Partrec.Code.lup a.fst.fst.fst ((ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst, a.snd.snd.fst)\n          a.fst.fst.snd\n    Nat.Partrec.Code.lup a.fst.fst.fst ((ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst, a.snd.fst) x\n[PROOFSTEP]\nhave k := k.comp (Primrec.fst (β := Code × Code × Option ℕ × Option ℕ))\n[GOAL]\ncase hco\na : Primrec fun a => ofNat (ℕ × Code) (List.length a)\nk✝¹ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst)).fst\nn✝ : Primrec Prod.snd\nk✝ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).fst\nn : Primrec fun a => a.fst.snd\nk' : Primrec Prod.snd\nc : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).snd\nL : Primrec fun a => a.fst.fst.fst\nk : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst\n⊢ Primrec fun a => do\n    let x ←\n      Nat.Partrec.Code.lup a.fst.fst.fst ((ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst, a.snd.snd.fst)\n          a.fst.fst.snd\n    Nat.Partrec.Code.lup a.fst.fst.fst ((ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst, a.snd.fst) x\n[PROOFSTEP]\nhave n := n.comp (Primrec.fst (β := Code × Code × Option ℕ × Option ℕ))\n[GOAL]\ncase hco\na : Primrec fun a => ofNat (ℕ × Code) (List.length a)\nk✝¹ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst)).fst\nn✝¹ : Primrec Prod.snd\nk✝ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).fst\nn✝ : Primrec fun a => a.fst.snd\nk' : Primrec Prod.snd\nc : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).snd\nL : Primrec fun a => a.fst.fst.fst\nk : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst\nn : Primrec fun a => a.fst.fst.snd\n⊢ Primrec fun a => do\n    let x ←\n      Nat.Partrec.Code.lup a.fst.fst.fst ((ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst, a.snd.snd.fst)\n          a.fst.fst.snd\n    Nat.Partrec.Code.lup a.fst.fst.fst ((ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst, a.snd.fst) x\n[PROOFSTEP]\nhave cf :=\n  Primrec.fst.comp (Primrec.snd (α := (List (List (Option ℕ)) × ℕ) × ℕ) (β := Code × Code × Option ℕ × Option ℕ))\n[GOAL]\ncase hco\na : Primrec fun a => ofNat (ℕ × Code) (List.length a)\nk✝¹ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst)).fst\nn✝¹ : Primrec Prod.snd\nk✝ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).fst\nn✝ : Primrec fun a => a.fst.snd\nk' : Primrec Prod.snd\nc : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).snd\nL : Primrec fun a => a.fst.fst.fst\nk : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst\nn : Primrec fun a => a.fst.fst.snd\ncf : Primrec fun a => a.snd.fst\n⊢ Primrec fun a => do\n    let x ←\n      Nat.Partrec.Code.lup a.fst.fst.fst ((ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst, a.snd.snd.fst)\n          a.fst.fst.snd\n    Nat.Partrec.Code.lup a.fst.fst.fst ((ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst, a.snd.fst) x\n[PROOFSTEP]\nhave cg :=\n  (Primrec.fst.comp Primrec.snd).comp\n    (Primrec.snd (α := (List (List (Option ℕ)) × ℕ) × ℕ) (β := Code × Code × Option ℕ × Option ℕ))\n[GOAL]\ncase hco\na : Primrec fun a => ofNat (ℕ × Code) (List.length a)\nk✝¹ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst)).fst\nn✝¹ : Primrec Prod.snd\nk✝ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).fst\nn✝ : Primrec fun a => a.fst.snd\nk' : Primrec Prod.snd\nc : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).snd\nL : Primrec fun a => a.fst.fst.fst\nk : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst\nn : Primrec fun a => a.fst.fst.snd\ncf : Primrec fun a => a.snd.fst\ncg : Primrec fun a => a.snd.snd.fst\n⊢ Primrec fun a => do\n    let x ←\n      Nat.Partrec.Code.lup a.fst.fst.fst ((ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst, a.snd.snd.fst)\n          a.fst.fst.snd\n    Nat.Partrec.Code.lup a.fst.fst.fst ((ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst, a.snd.fst) x\n[PROOFSTEP]\nrefine Primrec.option_bind (hlup.comp <| L.pair <| (k.pair cg).pair n) ?_\n[GOAL]\ncase hco\na : Primrec fun a => ofNat (ℕ × Code) (List.length a)\nk✝¹ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst)).fst\nn✝¹ : Primrec Prod.snd\nk✝ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).fst\nn✝ : Primrec fun a => a.fst.snd\nk' : Primrec Prod.snd\nc : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).snd\nL : Primrec fun a => a.fst.fst.fst\nk : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst\nn : Primrec fun a => a.fst.fst.snd\ncf : Primrec fun a => a.snd.fst\ncg : Primrec fun a => a.snd.snd.fst\n⊢ Primrec₂ fun a x =>\n    Nat.Partrec.Code.lup a.fst.fst.fst ((ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst, a.snd.fst) x\n[PROOFSTEP]\nunfold Primrec₂\n[GOAL]\ncase hco\na : Primrec fun a => ofNat (ℕ × Code) (List.length a)\nk✝¹ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst)).fst\nn✝¹ : Primrec Prod.snd\nk✝ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).fst\nn✝ : Primrec fun a => a.fst.snd\nk' : Primrec Prod.snd\nc : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).snd\nL : Primrec fun a => a.fst.fst.fst\nk : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst\nn : Primrec fun a => a.fst.fst.snd\ncf : Primrec fun a => a.snd.fst\ncg : Primrec fun a => a.snd.snd.fst\n⊢ Primrec fun p =>\n    (fun a x => Nat.Partrec.Code.lup a.fst.fst.fst ((ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst, a.snd.fst) x)\n      p.fst p.snd\n[PROOFSTEP]\nhave h := hlup.comp ((L.comp Primrec.fst).pair <| ((k.pair cf).comp Primrec.fst).pair Primrec.snd)\n[GOAL]\ncase hco\na : Primrec fun a => ofNat (ℕ × Code) (List.length a)\nk✝¹ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst)).fst\nn✝¹ : Primrec Prod.snd\nk✝ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).fst\nn✝ : Primrec fun a => a.fst.snd\nk' : Primrec Prod.snd\nc : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).snd\nL : Primrec fun a => a.fst.fst.fst\nk : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst\nn : Primrec fun a => a.fst.fst.snd\ncf : Primrec fun a => a.snd.fst\ncg : Primrec fun a => a.snd.snd.fst\nh :\n  Primrec fun a =>\n    Nat.Partrec.Code.lup\n      (a.fst.fst.fst.fst, ((ofNat (ℕ × Code) (List.length a.fst.fst.fst.fst)).fst, a.fst.snd.fst), a.snd).fst\n      (a.fst.fst.fst.fst, ((ofNat (ℕ × Code) (List.length a.fst.fst.fst.fst)).fst, a.fst.snd.fst), a.snd).snd.fst\n      (a.fst.fst.fst.fst, ((ofNat (ℕ × Code) (List.length a.fst.fst.fst.fst)).fst, a.fst.snd.fst), a.snd).snd.snd\n⊢ Primrec fun p =>\n    (fun a x => Nat.Partrec.Code.lup a.fst.fst.fst ((ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst, a.snd.fst) x)\n      p.fst p.snd\n[PROOFSTEP]\nexact h\n[GOAL]\ncase hpc\na : Primrec fun a => ofNat (ℕ × Code) (List.length a)\nk✝ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst)).fst\nn✝ : Primrec Prod.snd\nk : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).fst\nn : Primrec fun a => a.fst.snd\nk' : Primrec Prod.snd\nc : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).snd\n⊢ Primrec fun a =>\n    let z := (unpair a.fst.fst.snd).fst;\n    Nat.casesOn (unpair a.fst.fst.snd).snd\n      (Nat.Partrec.Code.lup a.fst.fst.fst ((ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst, a.snd.fst) z) fun y => do\n      let i ←\n        Nat.Partrec.Code.lup a.fst.fst.fst (a.fst.snd, (ofNat (ℕ × Code) (List.length a.fst.fst.fst)).snd)\n            (Nat.pair z y)\n      Nat.Partrec.Code.lup a.fst.fst.fst ((ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst, a.snd.snd.fst)\n          (Nat.pair z (Nat.pair y i))\n[PROOFSTEP]\nhave L :=\n  (Primrec.fst.comp Primrec.fst).comp\n    (Primrec.fst (α := (List (List (Option ℕ)) × ℕ) × ℕ) (β := Code × Code × Option ℕ × Option ℕ))\n[GOAL]\ncase hpc\na : Primrec fun a => ofNat (ℕ × Code) (List.length a)\nk✝ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst)).fst\nn✝ : Primrec Prod.snd\nk : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).fst\nn : Primrec fun a => a.fst.snd\nk' : Primrec Prod.snd\nc : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).snd\nL : Primrec fun a => a.fst.fst.fst\n⊢ Primrec fun a =>\n    let z := (unpair a.fst.fst.snd).fst;\n    Nat.casesOn (unpair a.fst.fst.snd).snd\n      (Nat.Partrec.Code.lup a.fst.fst.fst ((ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst, a.snd.fst) z) fun y => do\n      let i ←\n        Nat.Partrec.Code.lup a.fst.fst.fst (a.fst.snd, (ofNat (ℕ × Code) (List.length a.fst.fst.fst)).snd)\n            (Nat.pair z y)\n      Nat.Partrec.Code.lup a.fst.fst.fst ((ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst, a.snd.snd.fst)\n          (Nat.pair z (Nat.pair y i))\n[PROOFSTEP]\nhave k := k.comp (Primrec.fst (β := Code × Code × Option ℕ × Option ℕ))\n[GOAL]\ncase hpc\na : Primrec fun a => ofNat (ℕ × Code) (List.length a)\nk✝¹ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst)).fst\nn✝ : Primrec Prod.snd\nk✝ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).fst\nn : Primrec fun a => a.fst.snd\nk' : Primrec Prod.snd\nc : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).snd\nL : Primrec fun a => a.fst.fst.fst\nk : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst\n⊢ Primrec fun a =>\n    let z := (unpair a.fst.fst.snd).fst;\n    Nat.casesOn (unpair a.fst.fst.snd).snd\n      (Nat.Partrec.Code.lup a.fst.fst.fst ((ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst, a.snd.fst) z) fun y => do\n      let i ←\n        Nat.Partrec.Code.lup a.fst.fst.fst (a.fst.snd, (ofNat (ℕ × Code) (List.length a.fst.fst.fst)).snd)\n            (Nat.pair z y)\n      Nat.Partrec.Code.lup a.fst.fst.fst ((ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst, a.snd.snd.fst)\n          (Nat.pair z (Nat.pair y i))\n[PROOFSTEP]\nhave n := n.comp (Primrec.fst (β := Code × Code × Option ℕ × Option ℕ))\n[GOAL]\ncase hpc\na : Primrec fun a => ofNat (ℕ × Code) (List.length a)\nk✝¹ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst)).fst\nn✝¹ : Primrec Prod.snd\nk✝ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).fst\nn✝ : Primrec fun a => a.fst.snd\nk' : Primrec Prod.snd\nc : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).snd\nL : Primrec fun a => a.fst.fst.fst\nk : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst\nn : Primrec fun a => a.fst.fst.snd\n⊢ Primrec fun a =>\n    let z := (unpair a.fst.fst.snd).fst;\n    Nat.casesOn (unpair a.fst.fst.snd).snd\n      (Nat.Partrec.Code.lup a.fst.fst.fst ((ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst, a.snd.fst) z) fun y => do\n      let i ←\n        Nat.Partrec.Code.lup a.fst.fst.fst (a.fst.snd, (ofNat (ℕ × Code) (List.length a.fst.fst.fst)).snd)\n            (Nat.pair z y)\n      Nat.Partrec.Code.lup a.fst.fst.fst ((ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst, a.snd.snd.fst)\n          (Nat.pair z (Nat.pair y i))\n[PROOFSTEP]\nhave cf :=\n  Primrec.fst.comp (Primrec.snd (α := (List (List (Option ℕ)) × ℕ) × ℕ) (β := Code × Code × Option ℕ × Option ℕ))\n[GOAL]\ncase hpc\na : Primrec fun a => ofNat (ℕ × Code) (List.length a)\nk✝¹ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst)).fst\nn✝¹ : Primrec Prod.snd\nk✝ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).fst\nn✝ : Primrec fun a => a.fst.snd\nk' : Primrec Prod.snd\nc : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).snd\nL : Primrec fun a => a.fst.fst.fst\nk : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst\nn : Primrec fun a => a.fst.fst.snd\ncf : Primrec fun a => a.snd.fst\n⊢ Primrec fun a =>\n    let z := (unpair a.fst.fst.snd).fst;\n    Nat.casesOn (unpair a.fst.fst.snd).snd\n      (Nat.Partrec.Code.lup a.fst.fst.fst ((ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst, a.snd.fst) z) fun y => do\n      let i ←\n        Nat.Partrec.Code.lup a.fst.fst.fst (a.fst.snd, (ofNat (ℕ × Code) (List.length a.fst.fst.fst)).snd)\n            (Nat.pair z y)\n      Nat.Partrec.Code.lup a.fst.fst.fst ((ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst, a.snd.snd.fst)\n          (Nat.pair z (Nat.pair y i))\n[PROOFSTEP]\nhave cg :=\n  (Primrec.fst.comp Primrec.snd).comp\n    (Primrec.snd (α := (List (List (Option ℕ)) × ℕ) × ℕ) (β := Code × Code × Option ℕ × Option ℕ))\n[GOAL]\ncase hpc\na : Primrec fun a => ofNat (ℕ × Code) (List.length a)\nk✝¹ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst)).fst\nn✝¹ : Primrec Prod.snd\nk✝ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).fst\nn✝ : Primrec fun a => a.fst.snd\nk' : Primrec Prod.snd\nc : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).snd\nL : Primrec fun a => a.fst.fst.fst\nk : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst\nn : Primrec fun a => a.fst.fst.snd\ncf : Primrec fun a => a.snd.fst\ncg : Primrec fun a => a.snd.snd.fst\n⊢ Primrec fun a =>\n    let z := (unpair a.fst.fst.snd).fst;\n    Nat.casesOn (unpair a.fst.fst.snd).snd\n      (Nat.Partrec.Code.lup a.fst.fst.fst ((ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst, a.snd.fst) z) fun y => do\n      let i ←\n        Nat.Partrec.Code.lup a.fst.fst.fst (a.fst.snd, (ofNat (ℕ × Code) (List.length a.fst.fst.fst)).snd)\n            (Nat.pair z y)\n      Nat.Partrec.Code.lup a.fst.fst.fst ((ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst, a.snd.snd.fst)\n          (Nat.pair z (Nat.pair y i))\n[PROOFSTEP]\nhave z := Primrec.fst.comp (Primrec.unpair.comp n)\n[GOAL]\ncase hpc\na : Primrec fun a => ofNat (ℕ × Code) (List.length a)\nk✝¹ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst)).fst\nn✝¹ : Primrec Prod.snd\nk✝ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).fst\nn✝ : Primrec fun a => a.fst.snd\nk' : Primrec Prod.snd\nc : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).snd\nL : Primrec fun a => a.fst.fst.fst\nk : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst\nn : Primrec fun a => a.fst.fst.snd\ncf : Primrec fun a => a.snd.fst\ncg : Primrec fun a => a.snd.snd.fst\nz : Primrec fun a => (unpair a.fst.fst.snd).fst\n⊢ Primrec fun a =>\n    let z := (unpair a.fst.fst.snd).fst;\n    Nat.casesOn (unpair a.fst.fst.snd).snd\n      (Nat.Partrec.Code.lup a.fst.fst.fst ((ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst, a.snd.fst) z) fun y => do\n      let i ←\n        Nat.Partrec.Code.lup a.fst.fst.fst (a.fst.snd, (ofNat (ℕ × Code) (List.length a.fst.fst.fst)).snd)\n            (Nat.pair z y)\n      Nat.Partrec.Code.lup a.fst.fst.fst ((ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst, a.snd.snd.fst)\n          (Nat.pair z (Nat.pair y i))\n[PROOFSTEP]\nrefine'\n  Primrec.nat_casesOn (Primrec.snd.comp (Primrec.unpair.comp n)) (hlup.comp <| L.pair <| (k.pair cf).pair z)\n    (_ : Primrec _)\n[GOAL]\ncase hpc\na : Primrec fun a => ofNat (ℕ × Code) (List.length a)\nk✝¹ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst)).fst\nn✝¹ : Primrec Prod.snd\nk✝ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).fst\nn✝ : Primrec fun a => a.fst.snd\nk' : Primrec Prod.snd\nc : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).snd\nL : Primrec fun a => a.fst.fst.fst\nk : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst\nn : Primrec fun a => a.fst.fst.snd\ncf : Primrec fun a => a.snd.fst\ncg : Primrec fun a => a.snd.snd.fst\nz : Primrec fun a => (unpair a.fst.fst.snd).fst\n⊢ Primrec fun p =>\n    (fun a n =>\n        (fun y => do\n            let i ←\n              Nat.Partrec.Code.lup a.fst.fst.fst (a.fst.snd, (ofNat (ℕ × Code) (List.length a.fst.fst.fst)).snd)\n                  (Nat.pair (unpair a.fst.fst.snd).fst y)\n            Nat.Partrec.Code.lup a.fst.fst.fst ((ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst, a.snd.snd.fst)\n                (Nat.pair (unpair a.fst.fst.snd).fst (Nat.pair y i)))\n          n)\n      p.fst p.snd\n[PROOFSTEP]\nhave L := L.comp (Primrec.fst (β := ℕ))\n[GOAL]\ncase hpc\na : Primrec fun a => ofNat (ℕ × Code) (List.length a)\nk✝¹ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst)).fst\nn✝¹ : Primrec Prod.snd\nk✝ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).fst\nn✝ : Primrec fun a => a.fst.snd\nk' : Primrec Prod.snd\nc : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).snd\nL✝ : Primrec fun a => a.fst.fst.fst\nk : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst\nn : Primrec fun a => a.fst.fst.snd\ncf : Primrec fun a => a.snd.fst\ncg : Primrec fun a => a.snd.snd.fst\nz : Primrec fun a => (unpair a.fst.fst.snd).fst\nL : Primrec fun a => a.fst.fst.fst.fst\n⊢ Primrec fun p =>\n    (fun a n =>\n        (fun y => do\n            let i ←\n              Nat.Partrec.Code.lup a.fst.fst.fst (a.fst.snd, (ofNat (ℕ × Code) (List.length a.fst.fst.fst)).snd)\n                  (Nat.pair (unpair a.fst.fst.snd).fst y)\n            Nat.Partrec.Code.lup a.fst.fst.fst ((ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst, a.snd.snd.fst)\n                (Nat.pair (unpair a.fst.fst.snd).fst (Nat.pair y i)))\n          n)\n      p.fst p.snd\n[PROOFSTEP]\nhave z := z.comp (Primrec.fst (β := ℕ))\n[GOAL]\ncase hpc\na : Primrec fun a => ofNat (ℕ × Code) (List.length a)\nk✝¹ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst)).fst\nn✝¹ : Primrec Prod.snd\nk✝ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).fst\nn✝ : Primrec fun a => a.fst.snd\nk' : Primrec Prod.snd\nc : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).snd\nL✝ : Primrec fun a => a.fst.fst.fst\nk : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst\nn : Primrec fun a => a.fst.fst.snd\ncf : Primrec fun a => a.snd.fst\ncg : Primrec fun a => a.snd.snd.fst\nz✝ : Primrec fun a => (unpair a.fst.fst.snd).fst\nL : Primrec fun a => a.fst.fst.fst.fst\nz : Primrec fun a => (unpair a.fst.fst.fst.snd).fst\n⊢ Primrec fun p =>\n    (fun a n =>\n        (fun y => do\n            let i ←\n              Nat.Partrec.Code.lup a.fst.fst.fst (a.fst.snd, (ofNat (ℕ × Code) (List.length a.fst.fst.fst)).snd)\n                  (Nat.pair (unpair a.fst.fst.snd).fst y)\n            Nat.Partrec.Code.lup a.fst.fst.fst ((ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst, a.snd.snd.fst)\n                (Nat.pair (unpair a.fst.fst.snd).fst (Nat.pair y i)))\n          n)\n      p.fst p.snd\n[PROOFSTEP]\nhave y := Primrec.snd (α := ((List (List (Option ℕ)) × ℕ) × ℕ) × Code × Code × Option ℕ × Option ℕ) (β := ℕ)\n[GOAL]\ncase hpc\na : Primrec fun a => ofNat (ℕ × Code) (List.length a)\nk✝¹ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst)).fst\nn✝¹ : Primrec Prod.snd\nk✝ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).fst\nn✝ : Primrec fun a => a.fst.snd\nk' : Primrec Prod.snd\nc : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).snd\nL✝ : Primrec fun a => a.fst.fst.fst\nk : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst\nn : Primrec fun a => a.fst.fst.snd\ncf : Primrec fun a => a.snd.fst\ncg : Primrec fun a => a.snd.snd.fst\nz✝ : Primrec fun a => (unpair a.fst.fst.snd).fst\nL : Primrec fun a => a.fst.fst.fst.fst\nz : Primrec fun a => (unpair a.fst.fst.fst.snd).fst\ny : Primrec Prod.snd\n⊢ Primrec fun p =>\n    (fun a n =>\n        (fun y => do\n            let i ←\n              Nat.Partrec.Code.lup a.fst.fst.fst (a.fst.snd, (ofNat (ℕ × Code) (List.length a.fst.fst.fst)).snd)\n                  (Nat.pair (unpair a.fst.fst.snd).fst y)\n            Nat.Partrec.Code.lup a.fst.fst.fst ((ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst, a.snd.snd.fst)\n                (Nat.pair (unpair a.fst.fst.snd).fst (Nat.pair y i)))\n          n)\n      p.fst p.snd\n[PROOFSTEP]\nhave h₁ := hlup.comp <| L.pair <| (((k'.pair c).comp Primrec.fst).comp Primrec.fst).pair (Primrec₂.natPair.comp z y)\n[GOAL]\ncase hpc\na : Primrec fun a => ofNat (ℕ × Code) (List.length a)\nk✝¹ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst)).fst\nn✝¹ : Primrec Prod.snd\nk✝ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).fst\nn✝ : Primrec fun a => a.fst.snd\nk' : Primrec Prod.snd\nc : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).snd\nL✝ : Primrec fun a => a.fst.fst.fst\nk : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst\nn : Primrec fun a => a.fst.fst.snd\ncf : Primrec fun a => a.snd.fst\ncg : Primrec fun a => a.snd.snd.fst\nz✝ : Primrec fun a => (unpair a.fst.fst.snd).fst\nL : Primrec fun a => a.fst.fst.fst.fst\nz : Primrec fun a => (unpair a.fst.fst.fst.snd).fst\ny : Primrec Prod.snd\nh₁ :\n  Primrec fun a =>\n    Nat.Partrec.Code.lup\n      (a.fst.fst.fst.fst, (a.fst.fst.snd, (ofNat (ℕ × Code) (List.length a.fst.fst.fst.fst)).snd),\n          Nat.pair (unpair a.fst.fst.fst.snd).fst a.snd).fst\n      (a.fst.fst.fst.fst, (a.fst.fst.snd, (ofNat (ℕ × Code) (List.length a.fst.fst.fst.fst)).snd),\n            Nat.pair (unpair a.fst.fst.fst.snd).fst a.snd).snd.fst\n      (a.fst.fst.fst.fst, (a.fst.fst.snd, (ofNat (ℕ × Code) (List.length a.fst.fst.fst.fst)).snd),\n            Nat.pair (unpair a.fst.fst.fst.snd).fst a.snd).snd.snd\n⊢ Primrec fun p =>\n    (fun a n =>\n        (fun y => do\n            let i ←\n              Nat.Partrec.Code.lup a.fst.fst.fst (a.fst.snd, (ofNat (ℕ × Code) (List.length a.fst.fst.fst)).snd)\n                  (Nat.pair (unpair a.fst.fst.snd).fst y)\n            Nat.Partrec.Code.lup a.fst.fst.fst ((ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst, a.snd.snd.fst)\n                (Nat.pair (unpair a.fst.fst.snd).fst (Nat.pair y i)))\n          n)\n      p.fst p.snd\n[PROOFSTEP]\nrefine' Primrec.option_bind h₁ (_ : Primrec _)\n[GOAL]\ncase hpc\na : Primrec fun a => ofNat (ℕ × Code) (List.length a)\nk✝¹ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst)).fst\nn✝¹ : Primrec Prod.snd\nk✝ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).fst\nn✝ : Primrec fun a => a.fst.snd\nk' : Primrec Prod.snd\nc : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).snd\nL✝ : Primrec fun a => a.fst.fst.fst\nk : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst\nn : Primrec fun a => a.fst.fst.snd\ncf : Primrec fun a => a.snd.fst\ncg : Primrec fun a => a.snd.snd.fst\nz✝ : Primrec fun a => (unpair a.fst.fst.snd).fst\nL : Primrec fun a => a.fst.fst.fst.fst\nz : Primrec fun a => (unpair a.fst.fst.fst.snd).fst\ny : Primrec Prod.snd\nh₁ :\n  Primrec fun a =>\n    Nat.Partrec.Code.lup\n      (a.fst.fst.fst.fst, (a.fst.fst.snd, (ofNat (ℕ × Code) (List.length a.fst.fst.fst.fst)).snd),\n          Nat.pair (unpair a.fst.fst.fst.snd).fst a.snd).fst\n      (a.fst.fst.fst.fst, (a.fst.fst.snd, (ofNat (ℕ × Code) (List.length a.fst.fst.fst.fst)).snd),\n            Nat.pair (unpair a.fst.fst.fst.snd).fst a.snd).snd.fst\n      (a.fst.fst.fst.fst, (a.fst.fst.snd, (ofNat (ℕ × Code) (List.length a.fst.fst.fst.fst)).snd),\n            Nat.pair (unpair a.fst.fst.fst.snd).fst a.snd).snd.snd\n⊢ Primrec fun p =>\n    (fun p i =>\n        Nat.Partrec.Code.lup p.fst.fst.fst.fst\n          ((ofNat (ℕ × Code) (List.length p.fst.fst.fst.fst)).fst, p.fst.snd.snd.fst)\n          (Nat.pair (unpair p.fst.fst.fst.snd).fst (Nat.pair p.snd i)))\n      p.fst p.snd\n[PROOFSTEP]\nhave z := z.comp (Primrec.fst (β := ℕ))\n[GOAL]\ncase hpc\na : Primrec fun a => ofNat (ℕ × Code) (List.length a)\nk✝¹ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst)).fst\nn✝¹ : Primrec Prod.snd\nk✝ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).fst\nn✝ : Primrec fun a => a.fst.snd\nk' : Primrec Prod.snd\nc : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).snd\nL✝ : Primrec fun a => a.fst.fst.fst\nk : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst\nn : Primrec fun a => a.fst.fst.snd\ncf : Primrec fun a => a.snd.fst\ncg : Primrec fun a => a.snd.snd.fst\nz✝¹ : Primrec fun a => (unpair a.fst.fst.snd).fst\nL : Primrec fun a => a.fst.fst.fst.fst\nz✝ : Primrec fun a => (unpair a.fst.fst.fst.snd).fst\ny : Primrec Prod.snd\nh₁ :\n  Primrec fun a =>\n    Nat.Partrec.Code.lup\n      (a.fst.fst.fst.fst, (a.fst.fst.snd, (ofNat (ℕ × Code) (List.length a.fst.fst.fst.fst)).snd),\n          Nat.pair (unpair a.fst.fst.fst.snd).fst a.snd).fst\n      (a.fst.fst.fst.fst, (a.fst.fst.snd, (ofNat (ℕ × Code) (List.length a.fst.fst.fst.fst)).snd),\n            Nat.pair (unpair a.fst.fst.fst.snd).fst a.snd).snd.fst\n      (a.fst.fst.fst.fst, (a.fst.fst.snd, (ofNat (ℕ × Code) (List.length a.fst.fst.fst.fst)).snd),\n            Nat.pair (unpair a.fst.fst.fst.snd).fst a.snd).snd.snd\nz : Primrec fun a => (unpair a.fst.fst.fst.fst.snd).fst\n⊢ Primrec fun p =>\n    (fun p i =>\n        Nat.Partrec.Code.lup p.fst.fst.fst.fst\n          ((ofNat (ℕ × Code) (List.length p.fst.fst.fst.fst)).fst, p.fst.snd.snd.fst)\n          (Nat.pair (unpair p.fst.fst.fst.snd).fst (Nat.pair p.snd i)))\n      p.fst p.snd\n[PROOFSTEP]\nhave y := y.comp (Primrec.fst (β := ℕ))\n[GOAL]\ncase hpc\na : Primrec fun a => ofNat (ℕ × Code) (List.length a)\nk✝¹ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst)).fst\nn✝¹ : Primrec Prod.snd\nk✝ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).fst\nn✝ : Primrec fun a => a.fst.snd\nk' : Primrec Prod.snd\nc : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).snd\nL✝ : Primrec fun a => a.fst.fst.fst\nk : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst\nn : Primrec fun a => a.fst.fst.snd\ncf : Primrec fun a => a.snd.fst\ncg : Primrec fun a => a.snd.snd.fst\nz✝¹ : Primrec fun a => (unpair a.fst.fst.snd).fst\nL : Primrec fun a => a.fst.fst.fst.fst\nz✝ : Primrec fun a => (unpair a.fst.fst.fst.snd).fst\ny✝ : Primrec Prod.snd\nh₁ :\n  Primrec fun a =>\n    Nat.Partrec.Code.lup\n      (a.fst.fst.fst.fst, (a.fst.fst.snd, (ofNat (ℕ × Code) (List.length a.fst.fst.fst.fst)).snd),\n          Nat.pair (unpair a.fst.fst.fst.snd).fst a.snd).fst\n      (a.fst.fst.fst.fst, (a.fst.fst.snd, (ofNat (ℕ × Code) (List.length a.fst.fst.fst.fst)).snd),\n            Nat.pair (unpair a.fst.fst.fst.snd).fst a.snd).snd.fst\n      (a.fst.fst.fst.fst, (a.fst.fst.snd, (ofNat (ℕ × Code) (List.length a.fst.fst.fst.fst)).snd),\n            Nat.pair (unpair a.fst.fst.fst.snd).fst a.snd).snd.snd\nz : Primrec fun a => (unpair a.fst.fst.fst.fst.snd).fst\ny : Primrec fun a => a.fst.snd\n⊢ Primrec fun p =>\n    (fun p i =>\n        Nat.Partrec.Code.lup p.fst.fst.fst.fst\n          ((ofNat (ℕ × Code) (List.length p.fst.fst.fst.fst)).fst, p.fst.snd.snd.fst)\n          (Nat.pair (unpair p.fst.fst.fst.snd).fst (Nat.pair p.snd i)))\n      p.fst p.snd\n[PROOFSTEP]\nhave i := Primrec.snd (α := (((List (List (Option ℕ)) × ℕ) × ℕ) × Code × Code × Option ℕ × Option ℕ) × ℕ) (β := ℕ)\n[GOAL]\ncase hpc\na : Primrec fun a => ofNat (ℕ × Code) (List.length a)\nk✝¹ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst)).fst\nn✝¹ : Primrec Prod.snd\nk✝ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).fst\nn✝ : Primrec fun a => a.fst.snd\nk' : Primrec Prod.snd\nc : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).snd\nL✝ : Primrec fun a => a.fst.fst.fst\nk : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst\nn : Primrec fun a => a.fst.fst.snd\ncf : Primrec fun a => a.snd.fst\ncg : Primrec fun a => a.snd.snd.fst\nz✝¹ : Primrec fun a => (unpair a.fst.fst.snd).fst\nL : Primrec fun a => a.fst.fst.fst.fst\nz✝ : Primrec fun a => (unpair a.fst.fst.fst.snd).fst\ny✝ : Primrec Prod.snd\nh₁ :\n  Primrec fun a =>\n    Nat.Partrec.Code.lup\n      (a.fst.fst.fst.fst, (a.fst.fst.snd, (ofNat (ℕ × Code) (List.length a.fst.fst.fst.fst)).snd),\n          Nat.pair (unpair a.fst.fst.fst.snd).fst a.snd).fst\n      (a.fst.fst.fst.fst, (a.fst.fst.snd, (ofNat (ℕ × Code) (List.length a.fst.fst.fst.fst)).snd),\n            Nat.pair (unpair a.fst.fst.fst.snd).fst a.snd).snd.fst\n      (a.fst.fst.fst.fst, (a.fst.fst.snd, (ofNat (ℕ × Code) (List.length a.fst.fst.fst.fst)).snd),\n            Nat.pair (unpair a.fst.fst.fst.snd).fst a.snd).snd.snd\nz : Primrec fun a => (unpair a.fst.fst.fst.fst.snd).fst\ny : Primrec fun a => a.fst.snd\ni : Primrec Prod.snd\n⊢ Primrec fun p =>\n    (fun p i =>\n        Nat.Partrec.Code.lup p.fst.fst.fst.fst\n          ((ofNat (ℕ × Code) (List.length p.fst.fst.fst.fst)).fst, p.fst.snd.snd.fst)\n          (Nat.pair (unpair p.fst.fst.fst.snd).fst (Nat.pair p.snd i)))\n      p.fst p.snd\n[PROOFSTEP]\nhave h₂ :=\n  hlup.comp\n    ((L.comp Primrec.fst).pair <|\n      ((k.pair cg).comp <| Primrec.fst.comp Primrec.fst).pair <| Primrec₂.natPair.comp z <| Primrec₂.natPair.comp y i)\n[GOAL]\ncase hpc\na : Primrec fun a => ofNat (ℕ × Code) (List.length a)\nk✝¹ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst)).fst\nn✝¹ : Primrec Prod.snd\nk✝ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).fst\nn✝ : Primrec fun a => a.fst.snd\nk' : Primrec Prod.snd\nc : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).snd\nL✝ : Primrec fun a => a.fst.fst.fst\nk : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst\nn : Primrec fun a => a.fst.fst.snd\ncf : Primrec fun a => a.snd.fst\ncg : Primrec fun a => a.snd.snd.fst\nz✝¹ : Primrec fun a => (unpair a.fst.fst.snd).fst\nL : Primrec fun a => a.fst.fst.fst.fst\nz✝ : Primrec fun a => (unpair a.fst.fst.fst.snd).fst\ny✝ : Primrec Prod.snd\nh₁ :\n  Primrec fun a =>\n    Nat.Partrec.Code.lup\n      (a.fst.fst.fst.fst, (a.fst.fst.snd, (ofNat (ℕ × Code) (List.length a.fst.fst.fst.fst)).snd),\n          Nat.pair (unpair a.fst.fst.fst.snd).fst a.snd).fst\n      (a.fst.fst.fst.fst, (a.fst.fst.snd, (ofNat (ℕ × Code) (List.length a.fst.fst.fst.fst)).snd),\n            Nat.pair (unpair a.fst.fst.fst.snd).fst a.snd).snd.fst\n      (a.fst.fst.fst.fst, (a.fst.fst.snd, (ofNat (ℕ × Code) (List.length a.fst.fst.fst.fst)).snd),\n            Nat.pair (unpair a.fst.fst.fst.snd).fst a.snd).snd.snd\nz : Primrec fun a => (unpair a.fst.fst.fst.fst.snd).fst\ny : Primrec fun a => a.fst.snd\ni : Primrec Prod.snd\nh₂ :\n  Primrec fun a =>\n    Nat.Partrec.Code.lup\n      (a.fst.fst.fst.fst.fst, ((ofNat (ℕ × Code) (List.length a.fst.fst.fst.fst.fst)).fst, a.fst.fst.snd.snd.fst),\n          Nat.pair (unpair a.fst.fst.fst.fst.snd).fst (Nat.pair a.fst.snd a.snd)).fst\n      (a.fst.fst.fst.fst.fst, ((ofNat (ℕ × Code) (List.length a.fst.fst.fst.fst.fst)).fst, a.fst.fst.snd.snd.fst),\n            Nat.pair (unpair a.fst.fst.fst.fst.snd).fst (Nat.pair a.fst.snd a.snd)).snd.fst\n      (a.fst.fst.fst.fst.fst, ((ofNat (ℕ × Code) (List.length a.fst.fst.fst.fst.fst)).fst, a.fst.fst.snd.snd.fst),\n            Nat.pair (unpair a.fst.fst.fst.fst.snd).fst (Nat.pair a.fst.snd a.snd)).snd.snd\n⊢ Primrec fun p =>\n    (fun p i =>\n        Nat.Partrec.Code.lup p.fst.fst.fst.fst\n          ((ofNat (ℕ × Code) (List.length p.fst.fst.fst.fst)).fst, p.fst.snd.snd.fst)\n          (Nat.pair (unpair p.fst.fst.fst.snd).fst (Nat.pair p.snd i)))\n      p.fst p.snd\n[PROOFSTEP]\nexact h₂\n[GOAL]\ncase hrf\na : Primrec fun a => ofNat (ℕ × Code) (List.length a)\nk✝ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst)).fst\nn✝ : Primrec Prod.snd\nk : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).fst\nn : Primrec fun a => a.fst.snd\nk' : Primrec Prod.snd\nc : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).snd\n⊢ Primrec fun a =>\n    let z := (unpair a.fst.fst.snd).fst;\n    let m := (unpair a.fst.fst.snd).snd;\n    do\n    let x ←\n      Nat.Partrec.Code.lup a.fst.fst.fst ((ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst, a.snd.fst) (Nat.pair z m)\n    Nat.casesOn x (some m) fun x =>\n        Nat.Partrec.Code.lup a.fst.fst.fst (a.fst.snd, (ofNat (ℕ × Code) (List.length a.fst.fst.fst)).snd)\n          (Nat.pair z (m + 1))\n[PROOFSTEP]\nhave L :=\n  (Primrec.fst.comp Primrec.fst).comp (Primrec.fst (α := (List (List (Option ℕ)) × ℕ) × ℕ) (β := Code × Option ℕ))\n[GOAL]\ncase hrf\na : Primrec fun a => ofNat (ℕ × Code) (List.length a)\nk✝ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst)).fst\nn✝ : Primrec Prod.snd\nk : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).fst\nn : Primrec fun a => a.fst.snd\nk' : Primrec Prod.snd\nc : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).snd\nL : Primrec fun a => a.fst.fst.fst\n⊢ Primrec fun a =>\n    let z := (unpair a.fst.fst.snd).fst;\n    let m := (unpair a.fst.fst.snd).snd;\n    do\n    let x ←\n      Nat.Partrec.Code.lup a.fst.fst.fst ((ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst, a.snd.fst) (Nat.pair z m)\n    Nat.casesOn x (some m) fun x =>\n        Nat.Partrec.Code.lup a.fst.fst.fst (a.fst.snd, (ofNat (ℕ × Code) (List.length a.fst.fst.fst)).snd)\n          (Nat.pair z (m + 1))\n[PROOFSTEP]\nhave k := k.comp (Primrec.fst (β := Code × Option ℕ))\n[GOAL]\ncase hrf\na : Primrec fun a => ofNat (ℕ × Code) (List.length a)\nk✝¹ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst)).fst\nn✝ : Primrec Prod.snd\nk✝ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).fst\nn : Primrec fun a => a.fst.snd\nk' : Primrec Prod.snd\nc : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).snd\nL : Primrec fun a => a.fst.fst.fst\nk : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst\n⊢ Primrec fun a =>\n    let z := (unpair a.fst.fst.snd).fst;\n    let m := (unpair a.fst.fst.snd).snd;\n    do\n    let x ←\n      Nat.Partrec.Code.lup a.fst.fst.fst ((ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst, a.snd.fst) (Nat.pair z m)\n    Nat.casesOn x (some m) fun x =>\n        Nat.Partrec.Code.lup a.fst.fst.fst (a.fst.snd, (ofNat (ℕ × Code) (List.length a.fst.fst.fst)).snd)\n          (Nat.pair z (m + 1))\n[PROOFSTEP]\nhave n := n.comp (Primrec.fst (β := Code × Option ℕ))\n[GOAL]\ncase hrf\na : Primrec fun a => ofNat (ℕ × Code) (List.length a)\nk✝¹ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst)).fst\nn✝¹ : Primrec Prod.snd\nk✝ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).fst\nn✝ : Primrec fun a => a.fst.snd\nk' : Primrec Prod.snd\nc : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).snd\nL : Primrec fun a => a.fst.fst.fst\nk : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst\nn : Primrec fun a => a.fst.fst.snd\n⊢ Primrec fun a =>\n    let z := (unpair a.fst.fst.snd).fst;\n    let m := (unpair a.fst.fst.snd).snd;\n    do\n    let x ←\n      Nat.Partrec.Code.lup a.fst.fst.fst ((ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst, a.snd.fst) (Nat.pair z m)\n    Nat.casesOn x (some m) fun x =>\n        Nat.Partrec.Code.lup a.fst.fst.fst (a.fst.snd, (ofNat (ℕ × Code) (List.length a.fst.fst.fst)).snd)\n          (Nat.pair z (m + 1))\n[PROOFSTEP]\nhave cf := Primrec.fst.comp (Primrec.snd (α := (List (List (Option ℕ)) × ℕ) × ℕ) (β := Code × Option ℕ))\n[GOAL]\ncase hrf\na : Primrec fun a => ofNat (ℕ × Code) (List.length a)\nk✝¹ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst)).fst\nn✝¹ : Primrec Prod.snd\nk✝ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).fst\nn✝ : Primrec fun a => a.fst.snd\nk' : Primrec Prod.snd\nc : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).snd\nL : Primrec fun a => a.fst.fst.fst\nk : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst\nn : Primrec fun a => a.fst.fst.snd\ncf : Primrec fun a => a.snd.fst\n⊢ Primrec fun a =>\n    let z := (unpair a.fst.fst.snd).fst;\n    let m := (unpair a.fst.fst.snd).snd;\n    do\n    let x ←\n      Nat.Partrec.Code.lup a.fst.fst.fst ((ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst, a.snd.fst) (Nat.pair z m)\n    Nat.casesOn x (some m) fun x =>\n        Nat.Partrec.Code.lup a.fst.fst.fst (a.fst.snd, (ofNat (ℕ × Code) (List.length a.fst.fst.fst)).snd)\n          (Nat.pair z (m + 1))\n[PROOFSTEP]\nhave z := Primrec.fst.comp (Primrec.unpair.comp n)\n[GOAL]\ncase hrf\na : Primrec fun a => ofNat (ℕ × Code) (List.length a)\nk✝¹ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst)).fst\nn✝¹ : Primrec Prod.snd\nk✝ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).fst\nn✝ : Primrec fun a => a.fst.snd\nk' : Primrec Prod.snd\nc : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).snd\nL : Primrec fun a => a.fst.fst.fst\nk : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst\nn : Primrec fun a => a.fst.fst.snd\ncf : Primrec fun a => a.snd.fst\nz : Primrec fun a => (unpair a.fst.fst.snd).fst\n⊢ Primrec fun a =>\n    let z := (unpair a.fst.fst.snd).fst;\n    let m := (unpair a.fst.fst.snd).snd;\n    do\n    let x ←\n      Nat.Partrec.Code.lup a.fst.fst.fst ((ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst, a.snd.fst) (Nat.pair z m)\n    Nat.casesOn x (some m) fun x =>\n        Nat.Partrec.Code.lup a.fst.fst.fst (a.fst.snd, (ofNat (ℕ × Code) (List.length a.fst.fst.fst)).snd)\n          (Nat.pair z (m + 1))\n[PROOFSTEP]\nhave m := Primrec.snd.comp (Primrec.unpair.comp n)\n[GOAL]\ncase hrf\na : Primrec fun a => ofNat (ℕ × Code) (List.length a)\nk✝¹ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst)).fst\nn✝¹ : Primrec Prod.snd\nk✝ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).fst\nn✝ : Primrec fun a => a.fst.snd\nk' : Primrec Prod.snd\nc : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).snd\nL : Primrec fun a => a.fst.fst.fst\nk : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst\nn : Primrec fun a => a.fst.fst.snd\ncf : Primrec fun a => a.snd.fst\nz : Primrec fun a => (unpair a.fst.fst.snd).fst\nm : Primrec fun a => (unpair a.fst.fst.snd).snd\n⊢ Primrec fun a =>\n    let z := (unpair a.fst.fst.snd).fst;\n    let m := (unpair a.fst.fst.snd).snd;\n    do\n    let x ←\n      Nat.Partrec.Code.lup a.fst.fst.fst ((ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst, a.snd.fst) (Nat.pair z m)\n    Nat.casesOn x (some m) fun x =>\n        Nat.Partrec.Code.lup a.fst.fst.fst (a.fst.snd, (ofNat (ℕ × Code) (List.length a.fst.fst.fst)).snd)\n          (Nat.pair z (m + 1))\n[PROOFSTEP]\nhave h₁ := hlup.comp <| L.pair <| (k.pair cf).pair (Primrec₂.natPair.comp z m)\n[GOAL]\ncase hrf\na : Primrec fun a => ofNat (ℕ × Code) (List.length a)\nk✝¹ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst)).fst\nn✝¹ : Primrec Prod.snd\nk✝ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).fst\nn✝ : Primrec fun a => a.fst.snd\nk' : Primrec Prod.snd\nc : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).snd\nL : Primrec fun a => a.fst.fst.fst\nk : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst\nn : Primrec fun a => a.fst.fst.snd\ncf : Primrec fun a => a.snd.fst\nz : Primrec fun a => (unpair a.fst.fst.snd).fst\nm : Primrec fun a => (unpair a.fst.fst.snd).snd\nh₁ :\n  Primrec fun a =>\n    Nat.Partrec.Code.lup\n      (a.fst.fst.fst, ((ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst, a.snd.fst),\n          Nat.pair (unpair a.fst.fst.snd).fst (unpair a.fst.fst.snd).snd).fst\n      (a.fst.fst.fst, ((ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst, a.snd.fst),\n            Nat.pair (unpair a.fst.fst.snd).fst (unpair a.fst.fst.snd).snd).snd.fst\n      (a.fst.fst.fst, ((ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst, a.snd.fst),\n            Nat.pair (unpair a.fst.fst.snd).fst (unpair a.fst.fst.snd).snd).snd.snd\n⊢ Primrec fun a =>\n    let z := (unpair a.fst.fst.snd).fst;\n    let m := (unpair a.fst.fst.snd).snd;\n    do\n    let x ←\n      Nat.Partrec.Code.lup a.fst.fst.fst ((ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst, a.snd.fst) (Nat.pair z m)\n    Nat.casesOn x (some m) fun x =>\n        Nat.Partrec.Code.lup a.fst.fst.fst (a.fst.snd, (ofNat (ℕ × Code) (List.length a.fst.fst.fst)).snd)\n          (Nat.pair z (m + 1))\n[PROOFSTEP]\nrefine' Primrec.option_bind h₁ (_ : Primrec _)\n[GOAL]\ncase hrf\na : Primrec fun a => ofNat (ℕ × Code) (List.length a)\nk✝¹ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst)).fst\nn✝¹ : Primrec Prod.snd\nk✝ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).fst\nn✝ : Primrec fun a => a.fst.snd\nk' : Primrec Prod.snd\nc : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).snd\nL : Primrec fun a => a.fst.fst.fst\nk : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst\nn : Primrec fun a => a.fst.fst.snd\ncf : Primrec fun a => a.snd.fst\nz : Primrec fun a => (unpair a.fst.fst.snd).fst\nm : Primrec fun a => (unpair a.fst.fst.snd).snd\nh₁ :\n  Primrec fun a =>\n    Nat.Partrec.Code.lup\n      (a.fst.fst.fst, ((ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst, a.snd.fst),\n          Nat.pair (unpair a.fst.fst.snd).fst (unpair a.fst.fst.snd).snd).fst\n      (a.fst.fst.fst, ((ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst, a.snd.fst),\n            Nat.pair (unpair a.fst.fst.snd).fst (unpair a.fst.fst.snd).snd).snd.fst\n      (a.fst.fst.fst, ((ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst, a.snd.fst),\n            Nat.pair (unpair a.fst.fst.snd).fst (unpair a.fst.fst.snd).snd).snd.snd\n⊢ Primrec fun p =>\n    (fun a x =>\n        Nat.casesOn x (some (unpair a.fst.fst.snd).snd) fun x =>\n          Nat.Partrec.Code.lup a.fst.fst.fst (a.fst.snd, (ofNat (ℕ × Code) (List.length a.fst.fst.fst)).snd)\n            (Nat.pair (unpair a.fst.fst.snd).fst ((unpair a.fst.fst.snd).snd + 1)))\n      p.fst p.snd\n[PROOFSTEP]\nhave m := m.comp (Primrec.fst (β := ℕ))\n[GOAL]\ncase hrf\na : Primrec fun a => ofNat (ℕ × Code) (List.length a)\nk✝¹ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst)).fst\nn✝¹ : Primrec Prod.snd\nk✝ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).fst\nn✝ : Primrec fun a => a.fst.snd\nk' : Primrec Prod.snd\nc : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).snd\nL : Primrec fun a => a.fst.fst.fst\nk : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst\nn : Primrec fun a => a.fst.fst.snd\ncf : Primrec fun a => a.snd.fst\nz : Primrec fun a => (unpair a.fst.fst.snd).fst\nm✝ : Primrec fun a => (unpair a.fst.fst.snd).snd\nh₁ :\n  Primrec fun a =>\n    Nat.Partrec.Code.lup\n      (a.fst.fst.fst, ((ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst, a.snd.fst),\n          Nat.pair (unpair a.fst.fst.snd).fst (unpair a.fst.fst.snd).snd).fst\n      (a.fst.fst.fst, ((ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst, a.snd.fst),\n            Nat.pair (unpair a.fst.fst.snd).fst (unpair a.fst.fst.snd).snd).snd.fst\n      (a.fst.fst.fst, ((ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst, a.snd.fst),\n            Nat.pair (unpair a.fst.fst.snd).fst (unpair a.fst.fst.snd).snd).snd.snd\nm : Primrec fun a => (unpair a.fst.fst.fst.snd).snd\n⊢ Primrec fun p =>\n    (fun a x =>\n        Nat.casesOn x (some (unpair a.fst.fst.snd).snd) fun x =>\n          Nat.Partrec.Code.lup a.fst.fst.fst (a.fst.snd, (ofNat (ℕ × Code) (List.length a.fst.fst.fst)).snd)\n            (Nat.pair (unpair a.fst.fst.snd).fst ((unpair a.fst.fst.snd).snd + 1)))\n      p.fst p.snd\n[PROOFSTEP]\nrefine Primrec.nat_casesOn Primrec.snd (Primrec.option_some.comp m) ?_\n[GOAL]\ncase hrf\na : Primrec fun a => ofNat (ℕ × Code) (List.length a)\nk✝¹ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst)).fst\nn✝¹ : Primrec Prod.snd\nk✝ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).fst\nn✝ : Primrec fun a => a.fst.snd\nk' : Primrec Prod.snd\nc : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).snd\nL : Primrec fun a => a.fst.fst.fst\nk : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst\nn : Primrec fun a => a.fst.fst.snd\ncf : Primrec fun a => a.snd.fst\nz : Primrec fun a => (unpair a.fst.fst.snd).fst\nm✝ : Primrec fun a => (unpair a.fst.fst.snd).snd\nh₁ :\n  Primrec fun a =>\n    Nat.Partrec.Code.lup\n      (a.fst.fst.fst, ((ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst, a.snd.fst),\n          Nat.pair (unpair a.fst.fst.snd).fst (unpair a.fst.fst.snd).snd).fst\n      (a.fst.fst.fst, ((ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst, a.snd.fst),\n            Nat.pair (unpair a.fst.fst.snd).fst (unpair a.fst.fst.snd).snd).snd.fst\n      (a.fst.fst.fst, ((ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst, a.snd.fst),\n            Nat.pair (unpair a.fst.fst.snd).fst (unpair a.fst.fst.snd).snd).snd.snd\nm : Primrec fun a => (unpair a.fst.fst.fst.snd).snd\n⊢ Primrec₂ fun p n =>\n    (fun x =>\n        Nat.Partrec.Code.lup p.fst.fst.fst.fst (p.fst.fst.snd, (ofNat (ℕ × Code) (List.length p.fst.fst.fst.fst)).snd)\n          (Nat.pair (unpair p.fst.fst.fst.snd).fst ((unpair p.fst.fst.fst.snd).snd + 1)))\n      n\n[PROOFSTEP]\nunfold Primrec₂\n[GOAL]\ncase hrf\na : Primrec fun a => ofNat (ℕ × Code) (List.length a)\nk✝¹ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst)).fst\nn✝¹ : Primrec Prod.snd\nk✝ : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).fst\nn✝ : Primrec fun a => a.fst.snd\nk' : Primrec Prod.snd\nc : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst)).snd\nL : Primrec fun a => a.fst.fst.fst\nk : Primrec fun a => (ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst\nn : Primrec fun a => a.fst.fst.snd\ncf : Primrec fun a => a.snd.fst\nz : Primrec fun a => (unpair a.fst.fst.snd).fst\nm✝ : Primrec fun a => (unpair a.fst.fst.snd).snd\nh₁ :\n  Primrec fun a =>\n    Nat.Partrec.Code.lup\n      (a.fst.fst.fst, ((ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst, a.snd.fst),\n          Nat.pair (unpair a.fst.fst.snd).fst (unpair a.fst.fst.snd).snd).fst\n      (a.fst.fst.fst, ((ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst, a.snd.fst),\n            Nat.pair (unpair a.fst.fst.snd).fst (unpair a.fst.fst.snd).snd).snd.fst\n      (a.fst.fst.fst, ((ofNat (ℕ × Code) (List.length a.fst.fst.fst)).fst, a.snd.fst),\n            Nat.pair (unpair a.fst.fst.snd).fst (unpair a.fst.fst.snd).snd).snd.snd\nm : Primrec fun a => (unpair a.fst.fst.fst.snd).snd\n⊢ Primrec fun p =>\n    (fun p n =>\n        (fun x =>\n            Nat.Partrec.Code.lup p.fst.fst.fst.fst\n              (p.fst.fst.snd, (ofNat (ℕ × Code) (List.length p.fst.fst.fst.fst)).snd)\n              (Nat.pair (unpair p.fst.fst.fst.snd).fst ((unpair p.fst.fst.fst.snd).snd + 1)))\n          n)\n      p.fst p.snd\n[PROOFSTEP]\nexact\n  (hlup.comp\n        ((L.comp Primrec.fst).pair <|\n          ((k'.pair c).comp <| Primrec.fst.comp Primrec.fst).pair\n            (Primrec₂.natPair.comp (z.comp Primrec.fst) (_root_.Primrec.succ.comp m)))).comp\n    Primrec.fst\n[GOAL]\nk : ℕ\nc : Code\nn : ℕ\n⊢ (Option.bind (Option.map (evaln k c) (List.get? (List.range k) n)) fun b => b) = evaln k c n\n[PROOFSTEP]\nby_cases kn : n < k\n[GOAL]\ncase pos\nk : ℕ\nc : Code\nn : ℕ\nkn : n < k\n⊢ (Option.bind (Option.map (evaln k c) (List.get? (List.range k) n)) fun b => b) = evaln k c n\n[PROOFSTEP]\nsimp [List.get?_range kn]\n[GOAL]\ncase neg\nk : ℕ\nc : Code\nn : ℕ\nkn : ¬n < k\n⊢ (Option.bind (Option.map (evaln k c) (List.get? (List.range k) n)) fun b => b) = evaln k c n\n[PROOFSTEP]\nrw [List.get?_len_le]\n[GOAL]\ncase neg\nk : ℕ\nc : Code\nn : ℕ\nkn : ¬n < k\n⊢ (Option.bind (Option.map (evaln k c) Option.none) fun b => b) = evaln k c n\n[PROOFSTEP]\ncases e : evaln k c n\n[GOAL]\ncase neg.none\nk : ℕ\nc : Code\nn : ℕ\nkn : ¬n < k\ne : evaln k c n = Option.none\n⊢ (Option.bind (Option.map (evaln k c) Option.none) fun b => b) = Option.none\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg.some\nk : ℕ\nc : Code\nn : ℕ\nkn : ¬n < k\nval✝ : ℕ\ne : evaln k c n = some val✝\n⊢ (Option.bind (Option.map (evaln k c) Option.none) fun b => b) = some val✝\n[PROOFSTEP]\nexact kn.elim (evaln_bound e)\n[GOAL]\ncase neg\nk : ℕ\nc : Code\nn : ℕ\nkn : ¬n < k\n⊢ List.length (List.range k) ≤ n\n[PROOFSTEP]\nsimpa using kn\n[GOAL]\nx✝ : Unit\np : ℕ\n⊢ Nat.Partrec.Code.G\n      (x✝,\n          List.map\n            (fun n =>\n              let a := ofNat (ℕ × Code) n;\n              List.map (evaln a.fst a.snd) (List.range a.fst))\n            (List.range p)).snd =\n    some\n      (let a := ofNat (ℕ × Code) p;\n      List.map (evaln a.fst a.snd) (List.range a.fst))\n[PROOFSTEP]\nsimp only [G, prod_ofNat_val, ofNat_nat, List.length_map, List.length_range, Nat.pair_unpair, Option.some_inj]\n[GOAL]\nx✝ : Unit\np : ℕ\n⊢ List.map\n      (fun n =>\n        Nat.rec Option.none\n          (fun n_1 n_ih =>\n            rec (some 0) (some (Nat.succ n)) (some (unpair n).fst) (some (unpair n).snd)\n              (fun cf cg x x => do\n                let x ←\n                  Nat.Partrec.Code.lup\n                      (List.map\n                        (fun n =>\n                          List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                        (List.range p))\n                      ((unpair p).fst, cf) n\n                let y ←\n                  Nat.Partrec.Code.lup\n                      (List.map\n                        (fun n =>\n                          List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                        (List.range p))\n                      ((unpair p).fst, cg) n\n                some (Nat.pair x y))\n              (fun cf cg x x => do\n                let x ←\n                  Nat.Partrec.Code.lup\n                      (List.map\n                        (fun n =>\n                          List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                        (List.range p))\n                      ((unpair p).fst, cg) n\n                Nat.Partrec.Code.lup\n                    (List.map\n                      (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                      (List.range p))\n                    ((unpair p).fst, cf) x)\n              (fun cf cg x x =>\n                Nat.rec\n                  (Nat.Partrec.Code.lup\n                    (List.map\n                      (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                      (List.range p))\n                    ((unpair p).fst, cf) (unpair n).fst)\n                  (fun n_2 n_ih => do\n                    let i ←\n                      Nat.Partrec.Code.lup\n                          (List.map\n                            (fun n =>\n                              List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                            (List.range p))\n                          (n_1, ofNat Code (unpair p).snd) (Nat.pair (unpair n).fst n_2)\n                    Nat.Partrec.Code.lup\n                        (List.map\n                          (fun n =>\n                            List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                          (List.range p))\n                        ((unpair p).fst, cg) (Nat.pair (unpair n).fst (Nat.pair n_2 i)))\n                  (unpair n).snd)\n              (fun cf x => do\n                let x ←\n                  Nat.Partrec.Code.lup\n                      (List.map\n                        (fun n =>\n                          List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                        (List.range p))\n                      ((unpair p).fst, cf) n\n                Nat.rec (some (unpair n).snd)\n                    (fun n_2 n_ih =>\n                      Nat.Partrec.Code.lup\n                        (List.map\n                          (fun n =>\n                            List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                          (List.range p))\n                        (n_1, ofNat Code (unpair p).snd) (Nat.pair (unpair n).fst ((unpair n).snd + 1)))\n                    x)\n              (ofNat Code (unpair p).snd))\n          (unpair p).fst)\n      (List.range (unpair p).fst) =\n    List.map (evaln (unpair p).fst (ofNat Code (unpair p).snd)) (List.range (unpair p).fst)\n[PROOFSTEP]\nrefine List.map_congr fun n => ?_\n[GOAL]\nx✝ : Unit\np n : ℕ\n⊢ n ∈ List.range (unpair p).fst →\n    Nat.rec Option.none\n        (fun n_1 n_ih =>\n          rec (some 0) (some (Nat.succ n)) (some (unpair n).fst) (some (unpair n).snd)\n            (fun cf cg x x => do\n              let x ←\n                Nat.Partrec.Code.lup\n                    (List.map\n                      (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                      (List.range p))\n                    ((unpair p).fst, cf) n\n              let y ←\n                Nat.Partrec.Code.lup\n                    (List.map\n                      (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                      (List.range p))\n                    ((unpair p).fst, cg) n\n              some (Nat.pair x y))\n            (fun cf cg x x => do\n              let x ←\n                Nat.Partrec.Code.lup\n                    (List.map\n                      (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                      (List.range p))\n                    ((unpair p).fst, cg) n\n              Nat.Partrec.Code.lup\n                  (List.map\n                    (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                    (List.range p))\n                  ((unpair p).fst, cf) x)\n            (fun cf cg x x =>\n              Nat.rec\n                (Nat.Partrec.Code.lup\n                  (List.map\n                    (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                    (List.range p))\n                  ((unpair p).fst, cf) (unpair n).fst)\n                (fun n_2 n_ih => do\n                  let i ←\n                    Nat.Partrec.Code.lup\n                        (List.map\n                          (fun n =>\n                            List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                          (List.range p))\n                        (n_1, ofNat Code (unpair p).snd) (Nat.pair (unpair n).fst n_2)\n                  Nat.Partrec.Code.lup\n                      (List.map\n                        (fun n =>\n                          List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                        (List.range p))\n                      ((unpair p).fst, cg) (Nat.pair (unpair n).fst (Nat.pair n_2 i)))\n                (unpair n).snd)\n            (fun cf x => do\n              let x ←\n                Nat.Partrec.Code.lup\n                    (List.map\n                      (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                      (List.range p))\n                    ((unpair p).fst, cf) n\n              Nat.rec (some (unpair n).snd)\n                  (fun n_2 n_ih =>\n                    Nat.Partrec.Code.lup\n                      (List.map\n                        (fun n =>\n                          List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                        (List.range p))\n                      (n_1, ofNat Code (unpair p).snd) (Nat.pair (unpair n).fst ((unpair n).snd + 1)))\n                  x)\n            (ofNat Code (unpair p).snd))\n        (unpair p).fst =\n      evaln (unpair p).fst (ofNat Code (unpair p).snd) n\n[PROOFSTEP]\nhave : List.range p = List.range (Nat.pair p.unpair.1 (encode (ofNat Code p.unpair.2))) := by simp\n[GOAL]\nx✝ : Unit\np n : ℕ\n⊢ List.range p = List.range (Nat.pair (unpair p).fst (encode (ofNat Code (unpair p).snd)))\n[PROOFSTEP]\nsimp\n[GOAL]\nx✝ : Unit\np n : ℕ\nthis : List.range p = List.range (Nat.pair (unpair p).fst (encode (ofNat Code (unpair p).snd)))\n⊢ n ∈ List.range (unpair p).fst →\n    Nat.rec Option.none\n        (fun n_1 n_ih =>\n          rec (some 0) (some (Nat.succ n)) (some (unpair n).fst) (some (unpair n).snd)\n            (fun cf cg x x => do\n              let x ←\n                Nat.Partrec.Code.lup\n                    (List.map\n                      (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                      (List.range p))\n                    ((unpair p).fst, cf) n\n              let y ←\n                Nat.Partrec.Code.lup\n                    (List.map\n                      (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                      (List.range p))\n                    ((unpair p).fst, cg) n\n              some (Nat.pair x y))\n            (fun cf cg x x => do\n              let x ←\n                Nat.Partrec.Code.lup\n                    (List.map\n                      (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                      (List.range p))\n                    ((unpair p).fst, cg) n\n              Nat.Partrec.Code.lup\n                  (List.map\n                    (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                    (List.range p))\n                  ((unpair p).fst, cf) x)\n            (fun cf cg x x =>\n              Nat.rec\n                (Nat.Partrec.Code.lup\n                  (List.map\n                    (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                    (List.range p))\n                  ((unpair p).fst, cf) (unpair n).fst)\n                (fun n_2 n_ih => do\n                  let i ←\n                    Nat.Partrec.Code.lup\n                        (List.map\n                          (fun n =>\n                            List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                          (List.range p))\n                        (n_1, ofNat Code (unpair p).snd) (Nat.pair (unpair n).fst n_2)\n                  Nat.Partrec.Code.lup\n                      (List.map\n                        (fun n =>\n                          List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                        (List.range p))\n                      ((unpair p).fst, cg) (Nat.pair (unpair n).fst (Nat.pair n_2 i)))\n                (unpair n).snd)\n            (fun cf x => do\n              let x ←\n                Nat.Partrec.Code.lup\n                    (List.map\n                      (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                      (List.range p))\n                    ((unpair p).fst, cf) n\n              Nat.rec (some (unpair n).snd)\n                  (fun n_2 n_ih =>\n                    Nat.Partrec.Code.lup\n                      (List.map\n                        (fun n =>\n                          List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                        (List.range p))\n                      (n_1, ofNat Code (unpair p).snd) (Nat.pair (unpair n).fst ((unpair n).snd + 1)))\n                  x)\n            (ofNat Code (unpair p).snd))\n        (unpair p).fst =\n      evaln (unpair p).fst (ofNat Code (unpair p).snd) n\n[PROOFSTEP]\nrw [this]\n[GOAL]\nx✝ : Unit\np n : ℕ\nthis : List.range p = List.range (Nat.pair (unpair p).fst (encode (ofNat Code (unpair p).snd)))\n⊢ n ∈ List.range (unpair p).fst →\n    Nat.rec Option.none\n        (fun n_1 n_ih =>\n          rec (some 0) (some (Nat.succ n)) (some (unpair n).fst) (some (unpair n).snd)\n            (fun cf cg x x => do\n              let x ←\n                Nat.Partrec.Code.lup\n                    (List.map\n                      (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                      (List.range (Nat.pair (unpair p).fst (encode (ofNat Code (unpair p).snd)))))\n                    ((unpair p).fst, cf) n\n              let y ←\n                Nat.Partrec.Code.lup\n                    (List.map\n                      (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                      (List.range (Nat.pair (unpair p).fst (encode (ofNat Code (unpair p).snd)))))\n                    ((unpair p).fst, cg) n\n              some (Nat.pair x y))\n            (fun cf cg x x => do\n              let x ←\n                Nat.Partrec.Code.lup\n                    (List.map\n                      (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                      (List.range (Nat.pair (unpair p).fst (encode (ofNat Code (unpair p).snd)))))\n                    ((unpair p).fst, cg) n\n              Nat.Partrec.Code.lup\n                  (List.map\n                    (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                    (List.range (Nat.pair (unpair p).fst (encode (ofNat Code (unpair p).snd)))))\n                  ((unpair p).fst, cf) x)\n            (fun cf cg x x =>\n              Nat.rec\n                (Nat.Partrec.Code.lup\n                  (List.map\n                    (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                    (List.range (Nat.pair (unpair p).fst (encode (ofNat Code (unpair p).snd)))))\n                  ((unpair p).fst, cf) (unpair n).fst)\n                (fun n_2 n_ih => do\n                  let i ←\n                    Nat.Partrec.Code.lup\n                        (List.map\n                          (fun n =>\n                            List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                          (List.range (Nat.pair (unpair p).fst (encode (ofNat Code (unpair p).snd)))))\n                        (n_1, ofNat Code (unpair p).snd) (Nat.pair (unpair n).fst n_2)\n                  Nat.Partrec.Code.lup\n                      (List.map\n                        (fun n =>\n                          List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                        (List.range (Nat.pair (unpair p).fst (encode (ofNat Code (unpair p).snd)))))\n                      ((unpair p).fst, cg) (Nat.pair (unpair n).fst (Nat.pair n_2 i)))\n                (unpair n).snd)\n            (fun cf x => do\n              let x ←\n                Nat.Partrec.Code.lup\n                    (List.map\n                      (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                      (List.range (Nat.pair (unpair p).fst (encode (ofNat Code (unpair p).snd)))))\n                    ((unpair p).fst, cf) n\n              Nat.rec (some (unpair n).snd)\n                  (fun n_2 n_ih =>\n                    Nat.Partrec.Code.lup\n                      (List.map\n                        (fun n =>\n                          List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                        (List.range (Nat.pair (unpair p).fst (encode (ofNat Code (unpair p).snd)))))\n                      (n_1, ofNat Code (unpair p).snd) (Nat.pair (unpair n).fst ((unpair n).snd + 1)))\n                  x)\n            (ofNat Code (unpair p).snd))\n        (unpair p).fst =\n      evaln (unpair p).fst (ofNat Code (unpair p).snd) n\n[PROOFSTEP]\ngeneralize p.unpair.1 = k\n[GOAL]\nx✝ : Unit\np n : ℕ\nthis : List.range p = List.range (Nat.pair (unpair p).fst (encode (ofNat Code (unpair p).snd)))\nk : ℕ\n⊢ n ∈ List.range k →\n    Nat.rec Option.none\n        (fun n_1 n_ih =>\n          rec (some 0) (some (Nat.succ n)) (some (unpair n).fst) (some (unpair n).snd)\n            (fun cf cg x x => do\n              let x ←\n                Nat.Partrec.Code.lup\n                    (List.map\n                      (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                      (List.range (Nat.pair k (encode (ofNat Code (unpair p).snd)))))\n                    (k, cf) n\n              let y ←\n                Nat.Partrec.Code.lup\n                    (List.map\n                      (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                      (List.range (Nat.pair k (encode (ofNat Code (unpair p).snd)))))\n                    (k, cg) n\n              some (Nat.pair x y))\n            (fun cf cg x x => do\n              let x ←\n                Nat.Partrec.Code.lup\n                    (List.map\n                      (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                      (List.range (Nat.pair k (encode (ofNat Code (unpair p).snd)))))\n                    (k, cg) n\n              Nat.Partrec.Code.lup\n                  (List.map\n                    (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                    (List.range (Nat.pair k (encode (ofNat Code (unpair p).snd)))))\n                  (k, cf) x)\n            (fun cf cg x x =>\n              Nat.rec\n                (Nat.Partrec.Code.lup\n                  (List.map\n                    (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                    (List.range (Nat.pair k (encode (ofNat Code (unpair p).snd)))))\n                  (k, cf) (unpair n).fst)\n                (fun n_2 n_ih => do\n                  let i ←\n                    Nat.Partrec.Code.lup\n                        (List.map\n                          (fun n =>\n                            List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                          (List.range (Nat.pair k (encode (ofNat Code (unpair p).snd)))))\n                        (n_1, ofNat Code (unpair p).snd) (Nat.pair (unpair n).fst n_2)\n                  Nat.Partrec.Code.lup\n                      (List.map\n                        (fun n =>\n                          List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                        (List.range (Nat.pair k (encode (ofNat Code (unpair p).snd)))))\n                      (k, cg) (Nat.pair (unpair n).fst (Nat.pair n_2 i)))\n                (unpair n).snd)\n            (fun cf x => do\n              let x ←\n                Nat.Partrec.Code.lup\n                    (List.map\n                      (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                      (List.range (Nat.pair k (encode (ofNat Code (unpair p).snd)))))\n                    (k, cf) n\n              Nat.rec (some (unpair n).snd)\n                  (fun n_2 n_ih =>\n                    Nat.Partrec.Code.lup\n                      (List.map\n                        (fun n =>\n                          List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                        (List.range (Nat.pair k (encode (ofNat Code (unpair p).snd)))))\n                      (n_1, ofNat Code (unpair p).snd) (Nat.pair (unpair n).fst ((unpair n).snd + 1)))\n                  x)\n            (ofNat Code (unpair p).snd))\n        k =\n      evaln k (ofNat Code (unpair p).snd) n\n[PROOFSTEP]\ngeneralize ofNat Code p.unpair.2 = c\n[GOAL]\nx✝ : Unit\np n : ℕ\nthis : List.range p = List.range (Nat.pair (unpair p).fst (encode (ofNat Code (unpair p).snd)))\nk : ℕ\nc : Code\n⊢ n ∈ List.range k →\n    Nat.rec Option.none\n        (fun n_1 n_ih =>\n          rec (some 0) (some (Nat.succ n)) (some (unpair n).fst) (some (unpair n).snd)\n            (fun cf cg x x => do\n              let x ←\n                Nat.Partrec.Code.lup\n                    (List.map\n                      (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                      (List.range (Nat.pair k (encode c))))\n                    (k, cf) n\n              let y ←\n                Nat.Partrec.Code.lup\n                    (List.map\n                      (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                      (List.range (Nat.pair k (encode c))))\n                    (k, cg) n\n              some (Nat.pair x y))\n            (fun cf cg x x => do\n              let x ←\n                Nat.Partrec.Code.lup\n                    (List.map\n                      (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                      (List.range (Nat.pair k (encode c))))\n                    (k, cg) n\n              Nat.Partrec.Code.lup\n                  (List.map\n                    (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                    (List.range (Nat.pair k (encode c))))\n                  (k, cf) x)\n            (fun cf cg x x =>\n              Nat.rec\n                (Nat.Partrec.Code.lup\n                  (List.map\n                    (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                    (List.range (Nat.pair k (encode c))))\n                  (k, cf) (unpair n).fst)\n                (fun n_2 n_ih => do\n                  let i ←\n                    Nat.Partrec.Code.lup\n                        (List.map\n                          (fun n =>\n                            List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                          (List.range (Nat.pair k (encode c))))\n                        (n_1, c) (Nat.pair (unpair n).fst n_2)\n                  Nat.Partrec.Code.lup\n                      (List.map\n                        (fun n =>\n                          List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                        (List.range (Nat.pair k (encode c))))\n                      (k, cg) (Nat.pair (unpair n).fst (Nat.pair n_2 i)))\n                (unpair n).snd)\n            (fun cf x => do\n              let x ←\n                Nat.Partrec.Code.lup\n                    (List.map\n                      (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                      (List.range (Nat.pair k (encode c))))\n                    (k, cf) n\n              Nat.rec (some (unpair n).snd)\n                  (fun n_2 n_ih =>\n                    Nat.Partrec.Code.lup\n                      (List.map\n                        (fun n =>\n                          List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                        (List.range (Nat.pair k (encode c))))\n                      (n_1, c) (Nat.pair (unpair n).fst ((unpair n).snd + 1)))\n                  x)\n            c)\n        k =\n      evaln k c n\n[PROOFSTEP]\nintro nk\n[GOAL]\nx✝ : Unit\np n : ℕ\nthis : List.range p = List.range (Nat.pair (unpair p).fst (encode (ofNat Code (unpair p).snd)))\nk : ℕ\nc : Code\nnk : n ∈ List.range k\n⊢ Nat.rec Option.none\n      (fun n_1 n_ih =>\n        rec (some 0) (some (Nat.succ n)) (some (unpair n).fst) (some (unpair n).snd)\n          (fun cf cg x x => do\n            let x ←\n              Nat.Partrec.Code.lup\n                  (List.map\n                    (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                    (List.range (Nat.pair k (encode c))))\n                  (k, cf) n\n            let y ←\n              Nat.Partrec.Code.lup\n                  (List.map\n                    (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                    (List.range (Nat.pair k (encode c))))\n                  (k, cg) n\n            some (Nat.pair x y))\n          (fun cf cg x x => do\n            let x ←\n              Nat.Partrec.Code.lup\n                  (List.map\n                    (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                    (List.range (Nat.pair k (encode c))))\n                  (k, cg) n\n            Nat.Partrec.Code.lup\n                (List.map\n                  (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                  (List.range (Nat.pair k (encode c))))\n                (k, cf) x)\n          (fun cf cg x x =>\n            Nat.rec\n              (Nat.Partrec.Code.lup\n                (List.map\n                  (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                  (List.range (Nat.pair k (encode c))))\n                (k, cf) (unpair n).fst)\n              (fun n_2 n_ih => do\n                let i ←\n                  Nat.Partrec.Code.lup\n                      (List.map\n                        (fun n =>\n                          List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                        (List.range (Nat.pair k (encode c))))\n                      (n_1, c) (Nat.pair (unpair n).fst n_2)\n                Nat.Partrec.Code.lup\n                    (List.map\n                      (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                      (List.range (Nat.pair k (encode c))))\n                    (k, cg) (Nat.pair (unpair n).fst (Nat.pair n_2 i)))\n              (unpair n).snd)\n          (fun cf x => do\n            let x ←\n              Nat.Partrec.Code.lup\n                  (List.map\n                    (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                    (List.range (Nat.pair k (encode c))))\n                  (k, cf) n\n            Nat.rec (some (unpair n).snd)\n                (fun n_2 n_ih =>\n                  Nat.Partrec.Code.lup\n                    (List.map\n                      (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                      (List.range (Nat.pair k (encode c))))\n                    (n_1, c) (Nat.pair (unpair n).fst ((unpair n).snd + 1)))\n                x)\n          c)\n      k =\n    evaln k c n\n[PROOFSTEP]\ncases' k with k'\n[GOAL]\ncase zero\nx✝ : Unit\np n : ℕ\nthis : List.range p = List.range (Nat.pair (unpair p).fst (encode (ofNat Code (unpair p).snd)))\nc : Code\nnk : n ∈ List.range Nat.zero\n⊢ Nat.rec Option.none\n      (fun n_1 n_ih =>\n        rec (some 0) (some (Nat.succ n)) (some (unpair n).fst) (some (unpair n).snd)\n          (fun cf cg x x => do\n            let x ←\n              Nat.Partrec.Code.lup\n                  (List.map\n                    (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                    (List.range (Nat.pair Nat.zero (encode c))))\n                  (Nat.zero, cf) n\n            let y ←\n              Nat.Partrec.Code.lup\n                  (List.map\n                    (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                    (List.range (Nat.pair Nat.zero (encode c))))\n                  (Nat.zero, cg) n\n            some (Nat.pair x y))\n          (fun cf cg x x => do\n            let x ←\n              Nat.Partrec.Code.lup\n                  (List.map\n                    (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                    (List.range (Nat.pair Nat.zero (encode c))))\n                  (Nat.zero, cg) n\n            Nat.Partrec.Code.lup\n                (List.map\n                  (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                  (List.range (Nat.pair Nat.zero (encode c))))\n                (Nat.zero, cf) x)\n          (fun cf cg x x =>\n            Nat.rec\n              (Nat.Partrec.Code.lup\n                (List.map\n                  (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                  (List.range (Nat.pair Nat.zero (encode c))))\n                (Nat.zero, cf) (unpair n).fst)\n              (fun n_2 n_ih => do\n                let i ←\n                  Nat.Partrec.Code.lup\n                      (List.map\n                        (fun n =>\n                          List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                        (List.range (Nat.pair Nat.zero (encode c))))\n                      (n_1, c) (Nat.pair (unpair n).fst n_2)\n                Nat.Partrec.Code.lup\n                    (List.map\n                      (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                      (List.range (Nat.pair Nat.zero (encode c))))\n                    (Nat.zero, cg) (Nat.pair (unpair n).fst (Nat.pair n_2 i)))\n              (unpair n).snd)\n          (fun cf x => do\n            let x ←\n              Nat.Partrec.Code.lup\n                  (List.map\n                    (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                    (List.range (Nat.pair Nat.zero (encode c))))\n                  (Nat.zero, cf) n\n            Nat.rec (some (unpair n).snd)\n                (fun n_2 n_ih =>\n                  Nat.Partrec.Code.lup\n                    (List.map\n                      (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                      (List.range (Nat.pair Nat.zero (encode c))))\n                    (n_1, c) (Nat.pair (unpair n).fst ((unpair n).snd + 1)))\n                x)\n          c)\n      Nat.zero =\n    evaln Nat.zero c n\n[PROOFSTEP]\nsimp [evaln]\n[GOAL]\ncase succ\nx✝ : Unit\np n : ℕ\nthis : List.range p = List.range (Nat.pair (unpair p).fst (encode (ofNat Code (unpair p).snd)))\nc : Code\nk' : ℕ\nnk : n ∈ List.range (Nat.succ k')\n⊢ Nat.rec Option.none\n      (fun n_1 n_ih =>\n        rec (some 0) (some (Nat.succ n)) (some (unpair n).fst) (some (unpair n).snd)\n          (fun cf cg x x => do\n            let x ←\n              Nat.Partrec.Code.lup\n                  (List.map\n                    (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                    (List.range (Nat.pair (Nat.succ k') (encode c))))\n                  (Nat.succ k', cf) n\n            let y ←\n              Nat.Partrec.Code.lup\n                  (List.map\n                    (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                    (List.range (Nat.pair (Nat.succ k') (encode c))))\n                  (Nat.succ k', cg) n\n            some (Nat.pair x y))\n          (fun cf cg x x => do\n            let x ←\n              Nat.Partrec.Code.lup\n                  (List.map\n                    (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                    (List.range (Nat.pair (Nat.succ k') (encode c))))\n                  (Nat.succ k', cg) n\n            Nat.Partrec.Code.lup\n                (List.map\n                  (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                  (List.range (Nat.pair (Nat.succ k') (encode c))))\n                (Nat.succ k', cf) x)\n          (fun cf cg x x =>\n            Nat.rec\n              (Nat.Partrec.Code.lup\n                (List.map\n                  (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                  (List.range (Nat.pair (Nat.succ k') (encode c))))\n                (Nat.succ k', cf) (unpair n).fst)\n              (fun n_2 n_ih => do\n                let i ←\n                  Nat.Partrec.Code.lup\n                      (List.map\n                        (fun n =>\n                          List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                        (List.range (Nat.pair (Nat.succ k') (encode c))))\n                      (n_1, c) (Nat.pair (unpair n).fst n_2)\n                Nat.Partrec.Code.lup\n                    (List.map\n                      (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                      (List.range (Nat.pair (Nat.succ k') (encode c))))\n                    (Nat.succ k', cg) (Nat.pair (unpair n).fst (Nat.pair n_2 i)))\n              (unpair n).snd)\n          (fun cf x => do\n            let x ←\n              Nat.Partrec.Code.lup\n                  (List.map\n                    (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                    (List.range (Nat.pair (Nat.succ k') (encode c))))\n                  (Nat.succ k', cf) n\n            Nat.rec (some (unpair n).snd)\n                (fun n_2 n_ih =>\n                  Nat.Partrec.Code.lup\n                    (List.map\n                      (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                      (List.range (Nat.pair (Nat.succ k') (encode c))))\n                    (n_1, c) (Nat.pair (unpair n).fst ((unpair n).snd + 1)))\n                x)\n          c)\n      (Nat.succ k') =\n    evaln (Nat.succ k') c n\n[PROOFSTEP]\nlet k := k' + 1\n[GOAL]\ncase succ\nx✝ : Unit\np n : ℕ\nthis : List.range p = List.range (Nat.pair (unpair p).fst (encode (ofNat Code (unpair p).snd)))\nc : Code\nk' : ℕ\nnk : n ∈ List.range (Nat.succ k')\nk : ℕ := k' + 1\n⊢ Nat.rec Option.none\n      (fun n_1 n_ih =>\n        rec (some 0) (some (Nat.succ n)) (some (unpair n).fst) (some (unpair n).snd)\n          (fun cf cg x x => do\n            let x ←\n              Nat.Partrec.Code.lup\n                  (List.map\n                    (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                    (List.range (Nat.pair (Nat.succ k') (encode c))))\n                  (Nat.succ k', cf) n\n            let y ←\n              Nat.Partrec.Code.lup\n                  (List.map\n                    (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                    (List.range (Nat.pair (Nat.succ k') (encode c))))\n                  (Nat.succ k', cg) n\n            some (Nat.pair x y))\n          (fun cf cg x x => do\n            let x ←\n              Nat.Partrec.Code.lup\n                  (List.map\n                    (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                    (List.range (Nat.pair (Nat.succ k') (encode c))))\n                  (Nat.succ k', cg) n\n            Nat.Partrec.Code.lup\n                (List.map\n                  (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                  (List.range (Nat.pair (Nat.succ k') (encode c))))\n                (Nat.succ k', cf) x)\n          (fun cf cg x x =>\n            Nat.rec\n              (Nat.Partrec.Code.lup\n                (List.map\n                  (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                  (List.range (Nat.pair (Nat.succ k') (encode c))))\n                (Nat.succ k', cf) (unpair n).fst)\n              (fun n_2 n_ih => do\n                let i ←\n                  Nat.Partrec.Code.lup\n                      (List.map\n                        (fun n =>\n                          List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                        (List.range (Nat.pair (Nat.succ k') (encode c))))\n                      (n_1, c) (Nat.pair (unpair n).fst n_2)\n                Nat.Partrec.Code.lup\n                    (List.map\n                      (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                      (List.range (Nat.pair (Nat.succ k') (encode c))))\n                    (Nat.succ k', cg) (Nat.pair (unpair n).fst (Nat.pair n_2 i)))\n              (unpair n).snd)\n          (fun cf x => do\n            let x ←\n              Nat.Partrec.Code.lup\n                  (List.map\n                    (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                    (List.range (Nat.pair (Nat.succ k') (encode c))))\n                  (Nat.succ k', cf) n\n            Nat.rec (some (unpair n).snd)\n                (fun n_2 n_ih =>\n                  Nat.Partrec.Code.lup\n                    (List.map\n                      (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                      (List.range (Nat.pair (Nat.succ k') (encode c))))\n                    (n_1, c) (Nat.pair (unpair n).fst ((unpair n).snd + 1)))\n                x)\n          c)\n      (Nat.succ k') =\n    evaln (Nat.succ k') c n\n[PROOFSTEP]\nsimp only [show k'.succ = k from rfl]\n[GOAL]\ncase succ\nx✝ : Unit\np n : ℕ\nthis : List.range p = List.range (Nat.pair (unpair p).fst (encode (ofNat Code (unpair p).snd)))\nc : Code\nk' : ℕ\nnk : n ∈ List.range (Nat.succ k')\nk : ℕ := k' + 1\n⊢ rec (some 0) (some (Nat.succ n)) (some (unpair n).fst) (some (unpair n).snd)\n      (fun cf cg x x => do\n        let x ←\n          Nat.Partrec.Code.lup\n              (List.map\n                (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                (List.range (Nat.pair (k' + 1) (encode c))))\n              (k' + 1, cf) n\n        let y ←\n          Nat.Partrec.Code.lup\n              (List.map\n                (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                (List.range (Nat.pair (k' + 1) (encode c))))\n              (k' + 1, cg) n\n        some (Nat.pair x y))\n      (fun cf cg x x => do\n        let x ←\n          Nat.Partrec.Code.lup\n              (List.map\n                (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                (List.range (Nat.pair (k' + 1) (encode c))))\n              (k' + 1, cg) n\n        Nat.Partrec.Code.lup\n            (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n              (List.range (Nat.pair (k' + 1) (encode c))))\n            (k' + 1, cf) x)\n      (fun cf cg x x =>\n        Nat.rec\n          (Nat.Partrec.Code.lup\n            (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n              (List.range (Nat.pair (k' + 1) (encode c))))\n            (k' + 1, cf) (unpair n).fst)\n          (fun n_1 n_ih => do\n            let i ←\n              Nat.Partrec.Code.lup\n                  (List.map\n                    (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                    (List.range (Nat.pair (k' + 1) (encode c))))\n                  (k', c) (Nat.pair (unpair n).fst n_1)\n            Nat.Partrec.Code.lup\n                (List.map\n                  (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                  (List.range (Nat.pair (k' + 1) (encode c))))\n                (k' + 1, cg) (Nat.pair (unpair n).fst (Nat.pair n_1 i)))\n          (unpair n).snd)\n      (fun cf x => do\n        let x ←\n          Nat.Partrec.Code.lup\n              (List.map\n                (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                (List.range (Nat.pair (k' + 1) (encode c))))\n              (k' + 1, cf) n\n        Nat.rec (some (unpair n).snd)\n            (fun n_1 n_ih =>\n              Nat.Partrec.Code.lup\n                (List.map\n                  (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                  (List.range (Nat.pair (k' + 1) (encode c))))\n                (k', c) (Nat.pair (unpair n).fst ((unpair n).snd + 1)))\n            x)\n      c =\n    evaln (k' + 1) c n\n[PROOFSTEP]\nsimp [Nat.lt_succ_iff] at nk \n[GOAL]\ncase succ\nx✝ : Unit\np n : ℕ\nthis : List.range p = List.range (Nat.pair (unpair p).fst (encode (ofNat Code (unpair p).snd)))\nc : Code\nk' : ℕ\nk : ℕ := k' + 1\nnk : n ≤ k'\n⊢ rec (some 0) (some (Nat.succ n)) (some (unpair n).fst) (some (unpair n).snd)\n      (fun cf cg x x => do\n        let x ←\n          Nat.Partrec.Code.lup\n              (List.map\n                (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                (List.range (Nat.pair (k' + 1) (encode c))))\n              (k' + 1, cf) n\n        let y ←\n          Nat.Partrec.Code.lup\n              (List.map\n                (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                (List.range (Nat.pair (k' + 1) (encode c))))\n              (k' + 1, cg) n\n        some (Nat.pair x y))\n      (fun cf cg x x => do\n        let x ←\n          Nat.Partrec.Code.lup\n              (List.map\n                (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                (List.range (Nat.pair (k' + 1) (encode c))))\n              (k' + 1, cg) n\n        Nat.Partrec.Code.lup\n            (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n              (List.range (Nat.pair (k' + 1) (encode c))))\n            (k' + 1, cf) x)\n      (fun cf cg x x =>\n        Nat.rec\n          (Nat.Partrec.Code.lup\n            (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n              (List.range (Nat.pair (k' + 1) (encode c))))\n            (k' + 1, cf) (unpair n).fst)\n          (fun n_1 n_ih => do\n            let i ←\n              Nat.Partrec.Code.lup\n                  (List.map\n                    (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                    (List.range (Nat.pair (k' + 1) (encode c))))\n                  (k', c) (Nat.pair (unpair n).fst n_1)\n            Nat.Partrec.Code.lup\n                (List.map\n                  (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                  (List.range (Nat.pair (k' + 1) (encode c))))\n                (k' + 1, cg) (Nat.pair (unpair n).fst (Nat.pair n_1 i)))\n          (unpair n).snd)\n      (fun cf x => do\n        let x ←\n          Nat.Partrec.Code.lup\n              (List.map\n                (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                (List.range (Nat.pair (k' + 1) (encode c))))\n              (k' + 1, cf) n\n        Nat.rec (some (unpair n).snd)\n            (fun n_1 n_ih =>\n              Nat.Partrec.Code.lup\n                (List.map\n                  (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                  (List.range (Nat.pair (k' + 1) (encode c))))\n                (k', c) (Nat.pair (unpair n).fst ((unpair n).snd + 1)))\n            x)\n      c =\n    evaln (k' + 1) c n\n[PROOFSTEP]\nhave hg :\n  ∀ {k' c' n},\n    Nat.pair k' (encode c') < Nat.pair k (encode c) →\n      lup\n          ((List.range (Nat.pair k (encode c))).map fun n =>\n            (List.range n.unpair.1).map (evaln n.unpair.1 (ofNat Code n.unpair.2)))\n          (k', c') n =\n        evaln k' c' n :=\n  by\n  intro k₁ c₁ n₁ hl\n  simp [lup, List.get?_range hl, evaln_map, Bind.bind]\n[GOAL]\nx✝ : Unit\np n : ℕ\nthis : List.range p = List.range (Nat.pair (unpair p).fst (encode (ofNat Code (unpair p).snd)))\nc : Code\nk' : ℕ\nk : ℕ := k' + 1\nnk : n ≤ k'\n⊢ ∀ {k' : ℕ} {c' : Code} {n : ℕ},\n    Nat.pair k' (encode c') < Nat.pair k (encode c) →\n      Nat.Partrec.Code.lup\n          (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n            (List.range (Nat.pair k (encode c))))\n          (k', c') n =\n        evaln k' c' n\n[PROOFSTEP]\nintro k₁ c₁ n₁ hl\n[GOAL]\nx✝ : Unit\np n : ℕ\nthis : List.range p = List.range (Nat.pair (unpair p).fst (encode (ofNat Code (unpair p).snd)))\nc : Code\nk' : ℕ\nk : ℕ := k' + 1\nnk : n ≤ k'\nk₁ : ℕ\nc₁ : Code\nn₁ : ℕ\nhl : Nat.pair k₁ (encode c₁) < Nat.pair k (encode c)\n⊢ Nat.Partrec.Code.lup\n      (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n        (List.range (Nat.pair k (encode c))))\n      (k₁, c₁) n₁ =\n    evaln k₁ c₁ n₁\n[PROOFSTEP]\nsimp [lup, List.get?_range hl, evaln_map, Bind.bind]\n[GOAL]\ncase succ\nx✝ : Unit\np n : ℕ\nthis : List.range p = List.range (Nat.pair (unpair p).fst (encode (ofNat Code (unpair p).snd)))\nc : Code\nk' : ℕ\nk : ℕ := k' + 1\nnk : n ≤ k'\nhg :\n  ∀ {k' : ℕ} {c' : Code} {n : ℕ},\n    Nat.pair k' (encode c') < Nat.pair k (encode c) →\n      Nat.Partrec.Code.lup\n          (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n            (List.range (Nat.pair k (encode c))))\n          (k', c') n =\n        evaln k' c' n\n⊢ rec (some 0) (some (Nat.succ n)) (some (unpair n).fst) (some (unpair n).snd)\n      (fun cf cg x x => do\n        let x ←\n          Nat.Partrec.Code.lup\n              (List.map\n                (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                (List.range (Nat.pair (k' + 1) (encode c))))\n              (k' + 1, cf) n\n        let y ←\n          Nat.Partrec.Code.lup\n              (List.map\n                (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                (List.range (Nat.pair (k' + 1) (encode c))))\n              (k' + 1, cg) n\n        some (Nat.pair x y))\n      (fun cf cg x x => do\n        let x ←\n          Nat.Partrec.Code.lup\n              (List.map\n                (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                (List.range (Nat.pair (k' + 1) (encode c))))\n              (k' + 1, cg) n\n        Nat.Partrec.Code.lup\n            (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n              (List.range (Nat.pair (k' + 1) (encode c))))\n            (k' + 1, cf) x)\n      (fun cf cg x x =>\n        Nat.rec\n          (Nat.Partrec.Code.lup\n            (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n              (List.range (Nat.pair (k' + 1) (encode c))))\n            (k' + 1, cf) (unpair n).fst)\n          (fun n_1 n_ih => do\n            let i ←\n              Nat.Partrec.Code.lup\n                  (List.map\n                    (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                    (List.range (Nat.pair (k' + 1) (encode c))))\n                  (k', c) (Nat.pair (unpair n).fst n_1)\n            Nat.Partrec.Code.lup\n                (List.map\n                  (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                  (List.range (Nat.pair (k' + 1) (encode c))))\n                (k' + 1, cg) (Nat.pair (unpair n).fst (Nat.pair n_1 i)))\n          (unpair n).snd)\n      (fun cf x => do\n        let x ←\n          Nat.Partrec.Code.lup\n              (List.map\n                (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                (List.range (Nat.pair (k' + 1) (encode c))))\n              (k' + 1, cf) n\n        Nat.rec (some (unpair n).snd)\n            (fun n_1 n_ih =>\n              Nat.Partrec.Code.lup\n                (List.map\n                  (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                  (List.range (Nat.pair (k' + 1) (encode c))))\n                (k', c) (Nat.pair (unpair n).fst ((unpair n).snd + 1)))\n            x)\n      c =\n    evaln (k' + 1) c n\n[PROOFSTEP]\ncases' c with cf cg cf cg cf cg cf\n[GOAL]\ncase succ.zero\nx✝ : Unit\np n : ℕ\nthis : List.range p = List.range (Nat.pair (unpair p).fst (encode (ofNat Code (unpair p).snd)))\nk' : ℕ\nk : ℕ := k' + 1\nnk : n ≤ k'\nhg :\n  ∀ {k' : ℕ} {c' : Code} {n : ℕ},\n    Nat.pair k' (encode c') < Nat.pair k (encode zero) →\n      Nat.Partrec.Code.lup\n          (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n            (List.range (Nat.pair k (encode zero))))\n          (k', c') n =\n        evaln k' c' n\n⊢ rec (some 0) (some (Nat.succ n)) (some (unpair n).fst) (some (unpair n).snd)\n      (fun cf cg x x => do\n        let x ←\n          Nat.Partrec.Code.lup\n              (List.map\n                (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                (List.range (Nat.pair (k' + 1) (encode zero))))\n              (k' + 1, cf) n\n        let y ←\n          Nat.Partrec.Code.lup\n              (List.map\n                (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                (List.range (Nat.pair (k' + 1) (encode zero))))\n              (k' + 1, cg) n\n        some (Nat.pair x y))\n      (fun cf cg x x => do\n        let x ←\n          Nat.Partrec.Code.lup\n              (List.map\n                (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                (List.range (Nat.pair (k' + 1) (encode zero))))\n              (k' + 1, cg) n\n        Nat.Partrec.Code.lup\n            (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n              (List.range (Nat.pair (k' + 1) (encode zero))))\n            (k' + 1, cf) x)\n      (fun cf cg x x =>\n        Nat.rec\n          (Nat.Partrec.Code.lup\n            (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n              (List.range (Nat.pair (k' + 1) (encode zero))))\n            (k' + 1, cf) (unpair n).fst)\n          (fun n_1 n_ih => do\n            let i ←\n              Nat.Partrec.Code.lup\n                  (List.map\n                    (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                    (List.range (Nat.pair (k' + 1) (encode zero))))\n                  (k', zero) (Nat.pair (unpair n).fst n_1)\n            Nat.Partrec.Code.lup\n                (List.map\n                  (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                  (List.range (Nat.pair (k' + 1) (encode zero))))\n                (k' + 1, cg) (Nat.pair (unpair n).fst (Nat.pair n_1 i)))\n          (unpair n).snd)\n      (fun cf x => do\n        let x ←\n          Nat.Partrec.Code.lup\n              (List.map\n                (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                (List.range (Nat.pair (k' + 1) (encode zero))))\n              (k' + 1, cf) n\n        Nat.rec (some (unpair n).snd)\n            (fun n_1 n_ih =>\n              Nat.Partrec.Code.lup\n                (List.map\n                  (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                  (List.range (Nat.pair (k' + 1) (encode zero))))\n                (k', zero) (Nat.pair (unpair n).fst ((unpair n).snd + 1)))\n            x)\n      zero =\n    evaln (k' + 1) zero n\n[PROOFSTEP]\nsimp [evaln, nk, Bind.bind, Functor.map, Seq.seq, pure]\n[GOAL]\ncase succ.succ\nx✝ : Unit\np n : ℕ\nthis : List.range p = List.range (Nat.pair (unpair p).fst (encode (ofNat Code (unpair p).snd)))\nk' : ℕ\nk : ℕ := k' + 1\nnk : n ≤ k'\nhg :\n  ∀ {k' : ℕ} {c' : Code} {n : ℕ},\n    Nat.pair k' (encode c') < Nat.pair k (encode succ) →\n      Nat.Partrec.Code.lup\n          (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n            (List.range (Nat.pair k (encode succ))))\n          (k', c') n =\n        evaln k' c' n\n⊢ rec (some 0) (some (Nat.succ n)) (some (unpair n).fst) (some (unpair n).snd)\n      (fun cf cg x x => do\n        let x ←\n          Nat.Partrec.Code.lup\n              (List.map\n                (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                (List.range (Nat.pair (k' + 1) (encode succ))))\n              (k' + 1, cf) n\n        let y ←\n          Nat.Partrec.Code.lup\n              (List.map\n                (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                (List.range (Nat.pair (k' + 1) (encode succ))))\n              (k' + 1, cg) n\n        some (Nat.pair x y))\n      (fun cf cg x x => do\n        let x ←\n          Nat.Partrec.Code.lup\n              (List.map\n                (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                (List.range (Nat.pair (k' + 1) (encode succ))))\n              (k' + 1, cg) n\n        Nat.Partrec.Code.lup\n            (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n              (List.range (Nat.pair (k' + 1) (encode succ))))\n            (k' + 1, cf) x)\n      (fun cf cg x x =>\n        Nat.rec\n          (Nat.Partrec.Code.lup\n            (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n              (List.range (Nat.pair (k' + 1) (encode succ))))\n            (k' + 1, cf) (unpair n).fst)\n          (fun n_1 n_ih => do\n            let i ←\n              Nat.Partrec.Code.lup\n                  (List.map\n                    (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                    (List.range (Nat.pair (k' + 1) (encode succ))))\n                  (k', succ) (Nat.pair (unpair n).fst n_1)\n            Nat.Partrec.Code.lup\n                (List.map\n                  (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                  (List.range (Nat.pair (k' + 1) (encode succ))))\n                (k' + 1, cg) (Nat.pair (unpair n).fst (Nat.pair n_1 i)))\n          (unpair n).snd)\n      (fun cf x => do\n        let x ←\n          Nat.Partrec.Code.lup\n              (List.map\n                (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                (List.range (Nat.pair (k' + 1) (encode succ))))\n              (k' + 1, cf) n\n        Nat.rec (some (unpair n).snd)\n            (fun n_1 n_ih =>\n              Nat.Partrec.Code.lup\n                (List.map\n                  (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                  (List.range (Nat.pair (k' + 1) (encode succ))))\n                (k', succ) (Nat.pair (unpair n).fst ((unpair n).snd + 1)))\n            x)\n      succ =\n    evaln (k' + 1) succ n\n[PROOFSTEP]\nsimp [evaln, nk, Bind.bind, Functor.map, Seq.seq, pure]\n[GOAL]\ncase succ.left\nx✝ : Unit\np n : ℕ\nthis : List.range p = List.range (Nat.pair (unpair p).fst (encode (ofNat Code (unpair p).snd)))\nk' : ℕ\nk : ℕ := k' + 1\nnk : n ≤ k'\nhg :\n  ∀ {k' : ℕ} {c' : Code} {n : ℕ},\n    Nat.pair k' (encode c') < Nat.pair k (encode left) →\n      Nat.Partrec.Code.lup\n          (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n            (List.range (Nat.pair k (encode left))))\n          (k', c') n =\n        evaln k' c' n\n⊢ rec (some 0) (some (Nat.succ n)) (some (unpair n).fst) (some (unpair n).snd)\n      (fun cf cg x x => do\n        let x ←\n          Nat.Partrec.Code.lup\n              (List.map\n                (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                (List.range (Nat.pair (k' + 1) (encode left))))\n              (k' + 1, cf) n\n        let y ←\n          Nat.Partrec.Code.lup\n              (List.map\n                (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                (List.range (Nat.pair (k' + 1) (encode left))))\n              (k' + 1, cg) n\n        some (Nat.pair x y))\n      (fun cf cg x x => do\n        let x ←\n          Nat.Partrec.Code.lup\n              (List.map\n                (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                (List.range (Nat.pair (k' + 1) (encode left))))\n              (k' + 1, cg) n\n        Nat.Partrec.Code.lup\n            (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n              (List.range (Nat.pair (k' + 1) (encode left))))\n            (k' + 1, cf) x)\n      (fun cf cg x x =>\n        Nat.rec\n          (Nat.Partrec.Code.lup\n            (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n              (List.range (Nat.pair (k' + 1) (encode left))))\n            (k' + 1, cf) (unpair n).fst)\n          (fun n_1 n_ih => do\n            let i ←\n              Nat.Partrec.Code.lup\n                  (List.map\n                    (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                    (List.range (Nat.pair (k' + 1) (encode left))))\n                  (k', left) (Nat.pair (unpair n).fst n_1)\n            Nat.Partrec.Code.lup\n                (List.map\n                  (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                  (List.range (Nat.pair (k' + 1) (encode left))))\n                (k' + 1, cg) (Nat.pair (unpair n).fst (Nat.pair n_1 i)))\n          (unpair n).snd)\n      (fun cf x => do\n        let x ←\n          Nat.Partrec.Code.lup\n              (List.map\n                (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                (List.range (Nat.pair (k' + 1) (encode left))))\n              (k' + 1, cf) n\n        Nat.rec (some (unpair n).snd)\n            (fun n_1 n_ih =>\n              Nat.Partrec.Code.lup\n                (List.map\n                  (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                  (List.range (Nat.pair (k' + 1) (encode left))))\n                (k', left) (Nat.pair (unpair n).fst ((unpair n).snd + 1)))\n            x)\n      left =\n    evaln (k' + 1) left n\n[PROOFSTEP]\nsimp [evaln, nk, Bind.bind, Functor.map, Seq.seq, pure]\n[GOAL]\ncase succ.right\nx✝ : Unit\np n : ℕ\nthis : List.range p = List.range (Nat.pair (unpair p).fst (encode (ofNat Code (unpair p).snd)))\nk' : ℕ\nk : ℕ := k' + 1\nnk : n ≤ k'\nhg :\n  ∀ {k' : ℕ} {c' : Code} {n : ℕ},\n    Nat.pair k' (encode c') < Nat.pair k (encode right) →\n      Nat.Partrec.Code.lup\n          (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n            (List.range (Nat.pair k (encode right))))\n          (k', c') n =\n        evaln k' c' n\n⊢ rec (some 0) (some (Nat.succ n)) (some (unpair n).fst) (some (unpair n).snd)\n      (fun cf cg x x => do\n        let x ←\n          Nat.Partrec.Code.lup\n              (List.map\n                (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                (List.range (Nat.pair (k' + 1) (encode right))))\n              (k' + 1, cf) n\n        let y ←\n          Nat.Partrec.Code.lup\n              (List.map\n                (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                (List.range (Nat.pair (k' + 1) (encode right))))\n              (k' + 1, cg) n\n        some (Nat.pair x y))\n      (fun cf cg x x => do\n        let x ←\n          Nat.Partrec.Code.lup\n              (List.map\n                (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                (List.range (Nat.pair (k' + 1) (encode right))))\n              (k' + 1, cg) n\n        Nat.Partrec.Code.lup\n            (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n              (List.range (Nat.pair (k' + 1) (encode right))))\n            (k' + 1, cf) x)\n      (fun cf cg x x =>\n        Nat.rec\n          (Nat.Partrec.Code.lup\n            (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n              (List.range (Nat.pair (k' + 1) (encode right))))\n            (k' + 1, cf) (unpair n).fst)\n          (fun n_1 n_ih => do\n            let i ←\n              Nat.Partrec.Code.lup\n                  (List.map\n                    (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                    (List.range (Nat.pair (k' + 1) (encode right))))\n                  (k', right) (Nat.pair (unpair n).fst n_1)\n            Nat.Partrec.Code.lup\n                (List.map\n                  (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                  (List.range (Nat.pair (k' + 1) (encode right))))\n                (k' + 1, cg) (Nat.pair (unpair n).fst (Nat.pair n_1 i)))\n          (unpair n).snd)\n      (fun cf x => do\n        let x ←\n          Nat.Partrec.Code.lup\n              (List.map\n                (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                (List.range (Nat.pair (k' + 1) (encode right))))\n              (k' + 1, cf) n\n        Nat.rec (some (unpair n).snd)\n            (fun n_1 n_ih =>\n              Nat.Partrec.Code.lup\n                (List.map\n                  (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                  (List.range (Nat.pair (k' + 1) (encode right))))\n                (k', right) (Nat.pair (unpair n).fst ((unpair n).snd + 1)))\n            x)\n      right =\n    evaln (k' + 1) right n\n[PROOFSTEP]\nsimp [evaln, nk, Bind.bind, Functor.map, Seq.seq, pure]\n[GOAL]\ncase succ.pair\nx✝ : Unit\np n : ℕ\nthis : List.range p = List.range (Nat.pair (unpair p).fst (encode (ofNat Code (unpair p).snd)))\nk' : ℕ\nk : ℕ := k' + 1\nnk : n ≤ k'\ncf cg : Code\nhg :\n  ∀ {k' : ℕ} {c' : Code} {n : ℕ},\n    Nat.pair k' (encode c') < Nat.pair k (encode (pair cf cg)) →\n      Nat.Partrec.Code.lup\n          (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n            (List.range (Nat.pair k (encode (pair cf cg)))))\n          (k', c') n =\n        evaln k' c' n\n⊢ rec (some 0) (some (Nat.succ n)) (some (unpair n).fst) (some (unpair n).snd)\n      (fun cf_1 cg_1 x x => do\n        let x ←\n          Nat.Partrec.Code.lup\n              (List.map\n                (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                (List.range (Nat.pair (k' + 1) (encode (pair cf cg)))))\n              (k' + 1, cf_1) n\n        let y ←\n          Nat.Partrec.Code.lup\n              (List.map\n                (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                (List.range (Nat.pair (k' + 1) (encode (pair cf cg)))))\n              (k' + 1, cg_1) n\n        some (Nat.pair x y))\n      (fun cf_1 cg_1 x x => do\n        let x ←\n          Nat.Partrec.Code.lup\n              (List.map\n                (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                (List.range (Nat.pair (k' + 1) (encode (pair cf cg)))))\n              (k' + 1, cg_1) n\n        Nat.Partrec.Code.lup\n            (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n              (List.range (Nat.pair (k' + 1) (encode (pair cf cg)))))\n            (k' + 1, cf_1) x)\n      (fun cf_1 cg_1 x x =>\n        Nat.rec\n          (Nat.Partrec.Code.lup\n            (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n              (List.range (Nat.pair (k' + 1) (encode (pair cf cg)))))\n            (k' + 1, cf_1) (unpair n).fst)\n          (fun n_1 n_ih => do\n            let i ←\n              Nat.Partrec.Code.lup\n                  (List.map\n                    (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                    (List.range (Nat.pair (k' + 1) (encode (pair cf cg)))))\n                  (k', pair cf cg) (Nat.pair (unpair n).fst n_1)\n            Nat.Partrec.Code.lup\n                (List.map\n                  (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                  (List.range (Nat.pair (k' + 1) (encode (pair cf cg)))))\n                (k' + 1, cg_1) (Nat.pair (unpair n).fst (Nat.pair n_1 i)))\n          (unpair n).snd)\n      (fun cf_1 x => do\n        let x ←\n          Nat.Partrec.Code.lup\n              (List.map\n                (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                (List.range (Nat.pair (k' + 1) (encode (pair cf cg)))))\n              (k' + 1, cf_1) n\n        Nat.rec (some (unpair n).snd)\n            (fun n_1 n_ih =>\n              Nat.Partrec.Code.lup\n                (List.map\n                  (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                  (List.range (Nat.pair (k' + 1) (encode (pair cf cg)))))\n                (k', pair cf cg) (Nat.pair (unpair n).fst ((unpair n).snd + 1)))\n            x)\n      (pair cf cg) =\n    evaln (k' + 1) (pair cf cg) n\n[PROOFSTEP]\nsimp [evaln, nk, Bind.bind, Functor.map, Seq.seq, pure]\n[GOAL]\ncase succ.comp\nx✝ : Unit\np n : ℕ\nthis : List.range p = List.range (Nat.pair (unpair p).fst (encode (ofNat Code (unpair p).snd)))\nk' : ℕ\nk : ℕ := k' + 1\nnk : n ≤ k'\ncf cg : Code\nhg :\n  ∀ {k' : ℕ} {c' : Code} {n : ℕ},\n    Nat.pair k' (encode c') < Nat.pair k (encode (comp cf cg)) →\n      Nat.Partrec.Code.lup\n          (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n            (List.range (Nat.pair k (encode (comp cf cg)))))\n          (k', c') n =\n        evaln k' c' n\n⊢ rec (some 0) (some (Nat.succ n)) (some (unpair n).fst) (some (unpair n).snd)\n      (fun cf_1 cg_1 x x => do\n        let x ←\n          Nat.Partrec.Code.lup\n              (List.map\n                (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                (List.range (Nat.pair (k' + 1) (encode (comp cf cg)))))\n              (k' + 1, cf_1) n\n        let y ←\n          Nat.Partrec.Code.lup\n              (List.map\n                (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                (List.range (Nat.pair (k' + 1) (encode (comp cf cg)))))\n              (k' + 1, cg_1) n\n        some (Nat.pair x y))\n      (fun cf_1 cg_1 x x => do\n        let x ←\n          Nat.Partrec.Code.lup\n              (List.map\n                (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                (List.range (Nat.pair (k' + 1) (encode (comp cf cg)))))\n              (k' + 1, cg_1) n\n        Nat.Partrec.Code.lup\n            (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n              (List.range (Nat.pair (k' + 1) (encode (comp cf cg)))))\n            (k' + 1, cf_1) x)\n      (fun cf_1 cg_1 x x =>\n        Nat.rec\n          (Nat.Partrec.Code.lup\n            (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n              (List.range (Nat.pair (k' + 1) (encode (comp cf cg)))))\n            (k' + 1, cf_1) (unpair n).fst)\n          (fun n_1 n_ih => do\n            let i ←\n              Nat.Partrec.Code.lup\n                  (List.map\n                    (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                    (List.range (Nat.pair (k' + 1) (encode (comp cf cg)))))\n                  (k', comp cf cg) (Nat.pair (unpair n).fst n_1)\n            Nat.Partrec.Code.lup\n                (List.map\n                  (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                  (List.range (Nat.pair (k' + 1) (encode (comp cf cg)))))\n                (k' + 1, cg_1) (Nat.pair (unpair n).fst (Nat.pair n_1 i)))\n          (unpair n).snd)\n      (fun cf_1 x => do\n        let x ←\n          Nat.Partrec.Code.lup\n              (List.map\n                (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                (List.range (Nat.pair (k' + 1) (encode (comp cf cg)))))\n              (k' + 1, cf_1) n\n        Nat.rec (some (unpair n).snd)\n            (fun n_1 n_ih =>\n              Nat.Partrec.Code.lup\n                (List.map\n                  (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                  (List.range (Nat.pair (k' + 1) (encode (comp cf cg)))))\n                (k', comp cf cg) (Nat.pair (unpair n).fst ((unpair n).snd + 1)))\n            x)\n      (comp cf cg) =\n    evaln (k' + 1) (comp cf cg) n\n[PROOFSTEP]\nsimp [evaln, nk, Bind.bind, Functor.map, Seq.seq, pure]\n[GOAL]\ncase succ.prec\nx✝ : Unit\np n : ℕ\nthis : List.range p = List.range (Nat.pair (unpair p).fst (encode (ofNat Code (unpair p).snd)))\nk' : ℕ\nk : ℕ := k' + 1\nnk : n ≤ k'\ncf cg : Code\nhg :\n  ∀ {k' : ℕ} {c' : Code} {n : ℕ},\n    Nat.pair k' (encode c') < Nat.pair k (encode (prec cf cg)) →\n      Nat.Partrec.Code.lup\n          (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n            (List.range (Nat.pair k (encode (prec cf cg)))))\n          (k', c') n =\n        evaln k' c' n\n⊢ rec (some 0) (some (Nat.succ n)) (some (unpair n).fst) (some (unpair n).snd)\n      (fun cf_1 cg_1 x x => do\n        let x ←\n          Nat.Partrec.Code.lup\n              (List.map\n                (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                (List.range (Nat.pair (k' + 1) (encode (prec cf cg)))))\n              (k' + 1, cf_1) n\n        let y ←\n          Nat.Partrec.Code.lup\n              (List.map\n                (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                (List.range (Nat.pair (k' + 1) (encode (prec cf cg)))))\n              (k' + 1, cg_1) n\n        some (Nat.pair x y))\n      (fun cf_1 cg_1 x x => do\n        let x ←\n          Nat.Partrec.Code.lup\n              (List.map\n                (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                (List.range (Nat.pair (k' + 1) (encode (prec cf cg)))))\n              (k' + 1, cg_1) n\n        Nat.Partrec.Code.lup\n            (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n              (List.range (Nat.pair (k' + 1) (encode (prec cf cg)))))\n            (k' + 1, cf_1) x)\n      (fun cf_1 cg_1 x x =>\n        Nat.rec\n          (Nat.Partrec.Code.lup\n            (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n              (List.range (Nat.pair (k' + 1) (encode (prec cf cg)))))\n            (k' + 1, cf_1) (unpair n).fst)\n          (fun n_1 n_ih => do\n            let i ←\n              Nat.Partrec.Code.lup\n                  (List.map\n                    (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                    (List.range (Nat.pair (k' + 1) (encode (prec cf cg)))))\n                  (k', prec cf cg) (Nat.pair (unpair n).fst n_1)\n            Nat.Partrec.Code.lup\n                (List.map\n                  (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                  (List.range (Nat.pair (k' + 1) (encode (prec cf cg)))))\n                (k' + 1, cg_1) (Nat.pair (unpair n).fst (Nat.pair n_1 i)))\n          (unpair n).snd)\n      (fun cf_1 x => do\n        let x ←\n          Nat.Partrec.Code.lup\n              (List.map\n                (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                (List.range (Nat.pair (k' + 1) (encode (prec cf cg)))))\n              (k' + 1, cf_1) n\n        Nat.rec (some (unpair n).snd)\n            (fun n_1 n_ih =>\n              Nat.Partrec.Code.lup\n                (List.map\n                  (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                  (List.range (Nat.pair (k' + 1) (encode (prec cf cg)))))\n                (k', prec cf cg) (Nat.pair (unpair n).fst ((unpair n).snd + 1)))\n            x)\n      (prec cf cg) =\n    evaln (k' + 1) (prec cf cg) n\n[PROOFSTEP]\nsimp [evaln, nk, Bind.bind, Functor.map, Seq.seq, pure]\n[GOAL]\ncase succ.rfind'\nx✝ : Unit\np n : ℕ\nthis : List.range p = List.range (Nat.pair (unpair p).fst (encode (ofNat Code (unpair p).snd)))\nk' : ℕ\nk : ℕ := k' + 1\nnk : n ≤ k'\ncf : Code\nhg :\n  ∀ {k' : ℕ} {c' : Code} {n : ℕ},\n    Nat.pair k' (encode c') < Nat.pair k (encode (rfind' cf)) →\n      Nat.Partrec.Code.lup\n          (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n            (List.range (Nat.pair k (encode (rfind' cf)))))\n          (k', c') n =\n        evaln k' c' n\n⊢ rec (some 0) (some (Nat.succ n)) (some (unpair n).fst) (some (unpair n).snd)\n      (fun cf_1 cg x x => do\n        let x ←\n          Nat.Partrec.Code.lup\n              (List.map\n                (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                (List.range (Nat.pair (k' + 1) (encode (rfind' cf)))))\n              (k' + 1, cf_1) n\n        let y ←\n          Nat.Partrec.Code.lup\n              (List.map\n                (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                (List.range (Nat.pair (k' + 1) (encode (rfind' cf)))))\n              (k' + 1, cg) n\n        some (Nat.pair x y))\n      (fun cf_1 cg x x => do\n        let x ←\n          Nat.Partrec.Code.lup\n              (List.map\n                (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                (List.range (Nat.pair (k' + 1) (encode (rfind' cf)))))\n              (k' + 1, cg) n\n        Nat.Partrec.Code.lup\n            (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n              (List.range (Nat.pair (k' + 1) (encode (rfind' cf)))))\n            (k' + 1, cf_1) x)\n      (fun cf_1 cg x x =>\n        Nat.rec\n          (Nat.Partrec.Code.lup\n            (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n              (List.range (Nat.pair (k' + 1) (encode (rfind' cf)))))\n            (k' + 1, cf_1) (unpair n).fst)\n          (fun n_1 n_ih => do\n            let i ←\n              Nat.Partrec.Code.lup\n                  (List.map\n                    (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                    (List.range (Nat.pair (k' + 1) (encode (rfind' cf)))))\n                  (k', rfind' cf) (Nat.pair (unpair n).fst n_1)\n            Nat.Partrec.Code.lup\n                (List.map\n                  (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                  (List.range (Nat.pair (k' + 1) (encode (rfind' cf)))))\n                (k' + 1, cg) (Nat.pair (unpair n).fst (Nat.pair n_1 i)))\n          (unpair n).snd)\n      (fun cf_1 x => do\n        let x ←\n          Nat.Partrec.Code.lup\n              (List.map\n                (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                (List.range (Nat.pair (k' + 1) (encode (rfind' cf)))))\n              (k' + 1, cf_1) n\n        Nat.rec (some (unpair n).snd)\n            (fun n_1 n_ih =>\n              Nat.Partrec.Code.lup\n                (List.map\n                  (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n                  (List.range (Nat.pair (k' + 1) (encode (rfind' cf)))))\n                (k', rfind' cf) (Nat.pair (unpair n).fst ((unpair n).snd + 1)))\n            x)\n      (rfind' cf) =\n    evaln (k' + 1) (rfind' cf) n\n[PROOFSTEP]\nsimp [evaln, nk, Bind.bind, Functor.map, Seq.seq, pure]\n[GOAL]\ncase succ.pair\nx✝ : Unit\np n : ℕ\nthis : List.range p = List.range (Nat.pair (unpair p).fst (encode (ofNat Code (unpair p).snd)))\nk' : ℕ\nk : ℕ := k' + 1\nnk : n ≤ k'\ncf cg : Code\nhg :\n  ∀ {k' : ℕ} {c' : Code} {n : ℕ},\n    Nat.pair k' (encode c') < Nat.pair k (encode (pair cf cg)) →\n      Nat.Partrec.Code.lup\n          (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n            (List.range (Nat.pair k (encode (pair cf cg)))))\n          (k', c') n =\n        evaln k' c' n\n⊢ (Option.bind\n      (Nat.Partrec.Code.lup\n        (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n          (List.range (Nat.pair (k' + 1) (encode (pair cf cg)))))\n        (k' + 1, cf) n)\n      fun x =>\n      Option.bind\n        (Nat.Partrec.Code.lup\n          (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n            (List.range (Nat.pair (k' + 1) (encode (pair cf cg)))))\n          (k' + 1, cg) n)\n        fun y => some (Nat.pair x y)) =\n    Option.bind (Option.map Nat.pair (evaln (k' + 1) cf n)) fun y => Option.map y (evaln (k' + 1) cg n)\n[PROOFSTEP]\ncases' encode_lt_pair cf cg with lf lg\n[GOAL]\ncase succ.pair.intro\nx✝ : Unit\np n : ℕ\nthis : List.range p = List.range (Nat.pair (unpair p).fst (encode (ofNat Code (unpair p).snd)))\nk' : ℕ\nk : ℕ := k' + 1\nnk : n ≤ k'\ncf cg : Code\nhg :\n  ∀ {k' : ℕ} {c' : Code} {n : ℕ},\n    Nat.pair k' (encode c') < Nat.pair k (encode (pair cf cg)) →\n      Nat.Partrec.Code.lup\n          (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n            (List.range (Nat.pair k (encode (pair cf cg)))))\n          (k', c') n =\n        evaln k' c' n\nlf : encode cf < encode (pair cf cg)\nlg : encode cg < encode (pair cf cg)\n⊢ (Option.bind\n      (Nat.Partrec.Code.lup\n        (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n          (List.range (Nat.pair (k' + 1) (encode (pair cf cg)))))\n        (k' + 1, cf) n)\n      fun x =>\n      Option.bind\n        (Nat.Partrec.Code.lup\n          (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n            (List.range (Nat.pair (k' + 1) (encode (pair cf cg)))))\n          (k' + 1, cg) n)\n        fun y => some (Nat.pair x y)) =\n    Option.bind (Option.map Nat.pair (evaln (k' + 1) cf n)) fun y => Option.map y (evaln (k' + 1) cg n)\n[PROOFSTEP]\nrw [hg (Nat.pair_lt_pair_right _ lf), hg (Nat.pair_lt_pair_right _ lg)]\n[GOAL]\ncase succ.pair.intro\nx✝ : Unit\np n : ℕ\nthis : List.range p = List.range (Nat.pair (unpair p).fst (encode (ofNat Code (unpair p).snd)))\nk' : ℕ\nk : ℕ := k' + 1\nnk : n ≤ k'\ncf cg : Code\nhg :\n  ∀ {k' : ℕ} {c' : Code} {n : ℕ},\n    Nat.pair k' (encode c') < Nat.pair k (encode (pair cf cg)) →\n      Nat.Partrec.Code.lup\n          (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n            (List.range (Nat.pair k (encode (pair cf cg)))))\n          (k', c') n =\n        evaln k' c' n\nlf : encode cf < encode (pair cf cg)\nlg : encode cg < encode (pair cf cg)\n⊢ (Option.bind (evaln k cf n) fun x => Option.bind (evaln k cg n) fun y => some (Nat.pair x y)) =\n    Option.bind (Option.map Nat.pair (evaln (k' + 1) cf n)) fun y => Option.map y (evaln (k' + 1) cg n)\n[PROOFSTEP]\ncases evaln k cf n\n[GOAL]\ncase succ.pair.intro.none\nx✝ : Unit\np n : ℕ\nthis : List.range p = List.range (Nat.pair (unpair p).fst (encode (ofNat Code (unpair p).snd)))\nk' : ℕ\nk : ℕ := k' + 1\nnk : n ≤ k'\ncf cg : Code\nhg :\n  ∀ {k' : ℕ} {c' : Code} {n : ℕ},\n    Nat.pair k' (encode c') < Nat.pair k (encode (pair cf cg)) →\n      Nat.Partrec.Code.lup\n          (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n            (List.range (Nat.pair k (encode (pair cf cg)))))\n          (k', c') n =\n        evaln k' c' n\nlf : encode cf < encode (pair cf cg)\nlg : encode cg < encode (pair cf cg)\n⊢ (Option.bind Option.none fun x => Option.bind (evaln k cg n) fun y => some (Nat.pair x y)) =\n    Option.bind (Option.map Nat.pair Option.none) fun y => Option.map y (evaln (k' + 1) cg n)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ.pair.intro.some\nx✝ : Unit\np n : ℕ\nthis : List.range p = List.range (Nat.pair (unpair p).fst (encode (ofNat Code (unpair p).snd)))\nk' : ℕ\nk : ℕ := k' + 1\nnk : n ≤ k'\ncf cg : Code\nhg :\n  ∀ {k' : ℕ} {c' : Code} {n : ℕ},\n    Nat.pair k' (encode c') < Nat.pair k (encode (pair cf cg)) →\n      Nat.Partrec.Code.lup\n          (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n            (List.range (Nat.pair k (encode (pair cf cg)))))\n          (k', c') n =\n        evaln k' c' n\nlf : encode cf < encode (pair cf cg)\nlg : encode cg < encode (pair cf cg)\nval✝ : ℕ\n⊢ (Option.bind (some val✝) fun x => Option.bind (evaln k cg n) fun y => some (Nat.pair x y)) =\n    Option.bind (Option.map Nat.pair (some val✝)) fun y => Option.map y (evaln (k' + 1) cg n)\n[PROOFSTEP]\ncases evaln k cg n\n[GOAL]\ncase succ.pair.intro.some.none\nx✝ : Unit\np n : ℕ\nthis : List.range p = List.range (Nat.pair (unpair p).fst (encode (ofNat Code (unpair p).snd)))\nk' : ℕ\nk : ℕ := k' + 1\nnk : n ≤ k'\ncf cg : Code\nhg :\n  ∀ {k' : ℕ} {c' : Code} {n : ℕ},\n    Nat.pair k' (encode c') < Nat.pair k (encode (pair cf cg)) →\n      Nat.Partrec.Code.lup\n          (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n            (List.range (Nat.pair k (encode (pair cf cg)))))\n          (k', c') n =\n        evaln k' c' n\nlf : encode cf < encode (pair cf cg)\nlg : encode cg < encode (pair cf cg)\nval✝ : ℕ\n⊢ (Option.bind (some val✝) fun x => Option.bind Option.none fun y => some (Nat.pair x y)) =\n    Option.bind (Option.map Nat.pair (some val✝)) fun y => Option.map y Option.none\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ.pair.intro.some.some\nx✝ : Unit\np n : ℕ\nthis : List.range p = List.range (Nat.pair (unpair p).fst (encode (ofNat Code (unpair p).snd)))\nk' : ℕ\nk : ℕ := k' + 1\nnk : n ≤ k'\ncf cg : Code\nhg :\n  ∀ {k' : ℕ} {c' : Code} {n : ℕ},\n    Nat.pair k' (encode c') < Nat.pair k (encode (pair cf cg)) →\n      Nat.Partrec.Code.lup\n          (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n            (List.range (Nat.pair k (encode (pair cf cg)))))\n          (k', c') n =\n        evaln k' c' n\nlf : encode cf < encode (pair cf cg)\nlg : encode cg < encode (pair cf cg)\nval✝¹ val✝ : ℕ\n⊢ (Option.bind (some val✝¹) fun x => Option.bind (some val✝) fun y => some (Nat.pair x y)) =\n    Option.bind (Option.map Nat.pair (some val✝¹)) fun y => Option.map y (some val✝)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ.comp\nx✝ : Unit\np n : ℕ\nthis : List.range p = List.range (Nat.pair (unpair p).fst (encode (ofNat Code (unpair p).snd)))\nk' : ℕ\nk : ℕ := k' + 1\nnk : n ≤ k'\ncf cg : Code\nhg :\n  ∀ {k' : ℕ} {c' : Code} {n : ℕ},\n    Nat.pair k' (encode c') < Nat.pair k (encode (comp cf cg)) →\n      Nat.Partrec.Code.lup\n          (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n            (List.range (Nat.pair k (encode (comp cf cg)))))\n          (k', c') n =\n        evaln k' c' n\n⊢ (Option.bind\n      (Nat.Partrec.Code.lup\n        (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n          (List.range (Nat.pair (k' + 1) (encode (comp cf cg)))))\n        (k' + 1, cg) n)\n      fun x =>\n      Nat.Partrec.Code.lup\n        (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n          (List.range (Nat.pair (k' + 1) (encode (comp cf cg)))))\n        (k' + 1, cf) x) =\n    Option.bind (evaln (k' + 1) cg n) fun x => evaln (k' + 1) cf x\n[PROOFSTEP]\ncases' encode_lt_comp cf cg with lf lg\n[GOAL]\ncase succ.comp.intro\nx✝ : Unit\np n : ℕ\nthis : List.range p = List.range (Nat.pair (unpair p).fst (encode (ofNat Code (unpair p).snd)))\nk' : ℕ\nk : ℕ := k' + 1\nnk : n ≤ k'\ncf cg : Code\nhg :\n  ∀ {k' : ℕ} {c' : Code} {n : ℕ},\n    Nat.pair k' (encode c') < Nat.pair k (encode (comp cf cg)) →\n      Nat.Partrec.Code.lup\n          (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n            (List.range (Nat.pair k (encode (comp cf cg)))))\n          (k', c') n =\n        evaln k' c' n\nlf : encode cf < encode (comp cf cg)\nlg : encode cg < encode (comp cf cg)\n⊢ (Option.bind\n      (Nat.Partrec.Code.lup\n        (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n          (List.range (Nat.pair (k' + 1) (encode (comp cf cg)))))\n        (k' + 1, cg) n)\n      fun x =>\n      Nat.Partrec.Code.lup\n        (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n          (List.range (Nat.pair (k' + 1) (encode (comp cf cg)))))\n        (k' + 1, cf) x) =\n    Option.bind (evaln (k' + 1) cg n) fun x => evaln (k' + 1) cf x\n[PROOFSTEP]\nrw [hg (Nat.pair_lt_pair_right _ lg)]\n[GOAL]\ncase succ.comp.intro\nx✝ : Unit\np n : ℕ\nthis : List.range p = List.range (Nat.pair (unpair p).fst (encode (ofNat Code (unpair p).snd)))\nk' : ℕ\nk : ℕ := k' + 1\nnk : n ≤ k'\ncf cg : Code\nhg :\n  ∀ {k' : ℕ} {c' : Code} {n : ℕ},\n    Nat.pair k' (encode c') < Nat.pair k (encode (comp cf cg)) →\n      Nat.Partrec.Code.lup\n          (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n            (List.range (Nat.pair k (encode (comp cf cg)))))\n          (k', c') n =\n        evaln k' c' n\nlf : encode cf < encode (comp cf cg)\nlg : encode cg < encode (comp cf cg)\n⊢ (Option.bind (evaln k cg n) fun x =>\n      Nat.Partrec.Code.lup\n        (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n          (List.range (Nat.pair (k' + 1) (encode (comp cf cg)))))\n        (k' + 1, cf) x) =\n    Option.bind (evaln (k' + 1) cg n) fun x => evaln (k' + 1) cf x\n[PROOFSTEP]\ncases evaln k cg n\n[GOAL]\ncase succ.comp.intro.none\nx✝ : Unit\np n : ℕ\nthis : List.range p = List.range (Nat.pair (unpair p).fst (encode (ofNat Code (unpair p).snd)))\nk' : ℕ\nk : ℕ := k' + 1\nnk : n ≤ k'\ncf cg : Code\nhg :\n  ∀ {k' : ℕ} {c' : Code} {n : ℕ},\n    Nat.pair k' (encode c') < Nat.pair k (encode (comp cf cg)) →\n      Nat.Partrec.Code.lup\n          (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n            (List.range (Nat.pair k (encode (comp cf cg)))))\n          (k', c') n =\n        evaln k' c' n\nlf : encode cf < encode (comp cf cg)\nlg : encode cg < encode (comp cf cg)\n⊢ (Option.bind Option.none fun x =>\n      Nat.Partrec.Code.lup\n        (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n          (List.range (Nat.pair (k' + 1) (encode (comp cf cg)))))\n        (k' + 1, cf) x) =\n    Option.bind Option.none fun x => evaln (k' + 1) cf x\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ.comp.intro.some\nx✝ : Unit\np n : ℕ\nthis : List.range p = List.range (Nat.pair (unpair p).fst (encode (ofNat Code (unpair p).snd)))\nk' : ℕ\nk : ℕ := k' + 1\nnk : n ≤ k'\ncf cg : Code\nhg :\n  ∀ {k' : ℕ} {c' : Code} {n : ℕ},\n    Nat.pair k' (encode c') < Nat.pair k (encode (comp cf cg)) →\n      Nat.Partrec.Code.lup\n          (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n            (List.range (Nat.pair k (encode (comp cf cg)))))\n          (k', c') n =\n        evaln k' c' n\nlf : encode cf < encode (comp cf cg)\nlg : encode cg < encode (comp cf cg)\nval✝ : ℕ\n⊢ (Option.bind (some val✝) fun x =>\n      Nat.Partrec.Code.lup\n        (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n          (List.range (Nat.pair (k' + 1) (encode (comp cf cg)))))\n        (k' + 1, cf) x) =\n    Option.bind (some val✝) fun x => evaln (k' + 1) cf x\n[PROOFSTEP]\nsimp [hg (Nat.pair_lt_pair_right _ lf)]\n[GOAL]\ncase succ.prec\nx✝ : Unit\np n : ℕ\nthis : List.range p = List.range (Nat.pair (unpair p).fst (encode (ofNat Code (unpair p).snd)))\nk' : ℕ\nk : ℕ := k' + 1\nnk : n ≤ k'\ncf cg : Code\nhg :\n  ∀ {k' : ℕ} {c' : Code} {n : ℕ},\n    Nat.pair k' (encode c') < Nat.pair k (encode (prec cf cg)) →\n      Nat.Partrec.Code.lup\n          (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n            (List.range (Nat.pair k (encode (prec cf cg)))))\n          (k', c') n =\n        evaln k' c' n\n⊢ Nat.rec\n      (Nat.Partrec.Code.lup\n        (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n          (List.range (Nat.pair (k' + 1) (encode (prec cf cg)))))\n        (k' + 1, cf) (unpair n).fst)\n      (fun n_1 n_ih =>\n        Option.bind\n          (Nat.Partrec.Code.lup\n            (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n              (List.range (Nat.pair (k' + 1) (encode (prec cf cg)))))\n            (k', prec cf cg) (Nat.pair (unpair n).fst n_1))\n          fun i =>\n          Nat.Partrec.Code.lup\n            (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n              (List.range (Nat.pair (k' + 1) (encode (prec cf cg)))))\n            (k' + 1, cg) (Nat.pair (unpair n).fst (Nat.pair n_1 i)))\n      (unpair n).snd =\n    Nat.rec (evaln (k' + 1) cf (unpair n).fst)\n      (fun n_1 n_ih =>\n        Option.bind (evaln k' (prec cf cg) (Nat.pair (unpair n).fst n_1)) fun i =>\n          evaln (k' + 1) cg (Nat.pair (unpair n).fst (Nat.pair n_1 i)))\n      (unpair n).snd\n[PROOFSTEP]\ncases' encode_lt_prec cf cg with lf lg\n[GOAL]\ncase succ.prec.intro\nx✝ : Unit\np n : ℕ\nthis : List.range p = List.range (Nat.pair (unpair p).fst (encode (ofNat Code (unpair p).snd)))\nk' : ℕ\nk : ℕ := k' + 1\nnk : n ≤ k'\ncf cg : Code\nhg :\n  ∀ {k' : ℕ} {c' : Code} {n : ℕ},\n    Nat.pair k' (encode c') < Nat.pair k (encode (prec cf cg)) →\n      Nat.Partrec.Code.lup\n          (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n            (List.range (Nat.pair k (encode (prec cf cg)))))\n          (k', c') n =\n        evaln k' c' n\nlf : encode cf < encode (prec cf cg)\nlg : encode cg < encode (prec cf cg)\n⊢ Nat.rec\n      (Nat.Partrec.Code.lup\n        (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n          (List.range (Nat.pair (k' + 1) (encode (prec cf cg)))))\n        (k' + 1, cf) (unpair n).fst)\n      (fun n_1 n_ih =>\n        Option.bind\n          (Nat.Partrec.Code.lup\n            (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n              (List.range (Nat.pair (k' + 1) (encode (prec cf cg)))))\n            (k', prec cf cg) (Nat.pair (unpair n).fst n_1))\n          fun i =>\n          Nat.Partrec.Code.lup\n            (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n              (List.range (Nat.pair (k' + 1) (encode (prec cf cg)))))\n            (k' + 1, cg) (Nat.pair (unpair n).fst (Nat.pair n_1 i)))\n      (unpair n).snd =\n    Nat.rec (evaln (k' + 1) cf (unpair n).fst)\n      (fun n_1 n_ih =>\n        Option.bind (evaln k' (prec cf cg) (Nat.pair (unpair n).fst n_1)) fun i =>\n          evaln (k' + 1) cg (Nat.pair (unpair n).fst (Nat.pair n_1 i)))\n      (unpair n).snd\n[PROOFSTEP]\nrw [hg (Nat.pair_lt_pair_right _ lf)]\n[GOAL]\ncase succ.prec.intro\nx✝ : Unit\np n : ℕ\nthis : List.range p = List.range (Nat.pair (unpair p).fst (encode (ofNat Code (unpair p).snd)))\nk' : ℕ\nk : ℕ := k' + 1\nnk : n ≤ k'\ncf cg : Code\nhg :\n  ∀ {k' : ℕ} {c' : Code} {n : ℕ},\n    Nat.pair k' (encode c') < Nat.pair k (encode (prec cf cg)) →\n      Nat.Partrec.Code.lup\n          (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n            (List.range (Nat.pair k (encode (prec cf cg)))))\n          (k', c') n =\n        evaln k' c' n\nlf : encode cf < encode (prec cf cg)\nlg : encode cg < encode (prec cf cg)\n⊢ Nat.rec (evaln k cf (unpair n).fst)\n      (fun n_1 n_ih =>\n        Option.bind\n          (Nat.Partrec.Code.lup\n            (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n              (List.range (Nat.pair (k' + 1) (encode (prec cf cg)))))\n            (k', prec cf cg) (Nat.pair (unpair n).fst n_1))\n          fun i =>\n          Nat.Partrec.Code.lup\n            (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n              (List.range (Nat.pair (k' + 1) (encode (prec cf cg)))))\n            (k' + 1, cg) (Nat.pair (unpair n).fst (Nat.pair n_1 i)))\n      (unpair n).snd =\n    Nat.rec (evaln (k' + 1) cf (unpair n).fst)\n      (fun n_1 n_ih =>\n        Option.bind (evaln k' (prec cf cg) (Nat.pair (unpair n).fst n_1)) fun i =>\n          evaln (k' + 1) cg (Nat.pair (unpair n).fst (Nat.pair n_1 i)))\n      (unpair n).snd\n[PROOFSTEP]\ncases n.unpair.2\n[GOAL]\ncase succ.prec.intro.zero\nx✝ : Unit\np n : ℕ\nthis : List.range p = List.range (Nat.pair (unpair p).fst (encode (ofNat Code (unpair p).snd)))\nk' : ℕ\nk : ℕ := k' + 1\nnk : n ≤ k'\ncf cg : Code\nhg :\n  ∀ {k' : ℕ} {c' : Code} {n : ℕ},\n    Nat.pair k' (encode c') < Nat.pair k (encode (prec cf cg)) →\n      Nat.Partrec.Code.lup\n          (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n            (List.range (Nat.pair k (encode (prec cf cg)))))\n          (k', c') n =\n        evaln k' c' n\nlf : encode cf < encode (prec cf cg)\nlg : encode cg < encode (prec cf cg)\n⊢ Nat.rec (evaln k cf (unpair n).fst)\n      (fun n_1 n_ih =>\n        Option.bind\n          (Nat.Partrec.Code.lup\n            (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n              (List.range (Nat.pair (k' + 1) (encode (prec cf cg)))))\n            (k', prec cf cg) (Nat.pair (unpair n).fst n_1))\n          fun i =>\n          Nat.Partrec.Code.lup\n            (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n              (List.range (Nat.pair (k' + 1) (encode (prec cf cg)))))\n            (k' + 1, cg) (Nat.pair (unpair n).fst (Nat.pair n_1 i)))\n      Nat.zero =\n    Nat.rec (evaln (k' + 1) cf (unpair n).fst)\n      (fun n_1 n_ih =>\n        Option.bind (evaln k' (prec cf cg) (Nat.pair (unpair n).fst n_1)) fun i =>\n          evaln (k' + 1) cg (Nat.pair (unpair n).fst (Nat.pair n_1 i)))\n      Nat.zero\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ.prec.intro.succ\nx✝ : Unit\np n : ℕ\nthis : List.range p = List.range (Nat.pair (unpair p).fst (encode (ofNat Code (unpair p).snd)))\nk' : ℕ\nk : ℕ := k' + 1\nnk : n ≤ k'\ncf cg : Code\nhg :\n  ∀ {k' : ℕ} {c' : Code} {n : ℕ},\n    Nat.pair k' (encode c') < Nat.pair k (encode (prec cf cg)) →\n      Nat.Partrec.Code.lup\n          (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n            (List.range (Nat.pair k (encode (prec cf cg)))))\n          (k', c') n =\n        evaln k' c' n\nlf : encode cf < encode (prec cf cg)\nlg : encode cg < encode (prec cf cg)\nn✝ : ℕ\n⊢ Nat.rec (evaln k cf (unpair n).fst)\n      (fun n_1 n_ih =>\n        Option.bind\n          (Nat.Partrec.Code.lup\n            (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n              (List.range (Nat.pair (k' + 1) (encode (prec cf cg)))))\n            (k', prec cf cg) (Nat.pair (unpair n).fst n_1))\n          fun i =>\n          Nat.Partrec.Code.lup\n            (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n              (List.range (Nat.pair (k' + 1) (encode (prec cf cg)))))\n            (k' + 1, cg) (Nat.pair (unpair n).fst (Nat.pair n_1 i)))\n      (Nat.succ n✝) =\n    Nat.rec (evaln (k' + 1) cf (unpair n).fst)\n      (fun n_1 n_ih =>\n        Option.bind (evaln k' (prec cf cg) (Nat.pair (unpair n).fst n_1)) fun i =>\n          evaln (k' + 1) cg (Nat.pair (unpair n).fst (Nat.pair n_1 i)))\n      (Nat.succ n✝)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ.prec.intro.succ\nx✝ : Unit\np n : ℕ\nthis : List.range p = List.range (Nat.pair (unpair p).fst (encode (ofNat Code (unpair p).snd)))\nk' : ℕ\nk : ℕ := k' + 1\nnk : n ≤ k'\ncf cg : Code\nhg :\n  ∀ {k' : ℕ} {c' : Code} {n : ℕ},\n    Nat.pair k' (encode c') < Nat.pair k (encode (prec cf cg)) →\n      Nat.Partrec.Code.lup\n          (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n            (List.range (Nat.pair k (encode (prec cf cg)))))\n          (k', c') n =\n        evaln k' c' n\nlf : encode cf < encode (prec cf cg)\nlg : encode cg < encode (prec cf cg)\nn✝ : ℕ\n⊢ (Option.bind\n      (Nat.Partrec.Code.lup\n        (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n          (List.range (Nat.pair (k' + 1) (encode (prec cf cg)))))\n        (k', prec cf cg) (Nat.pair (unpair n).fst n✝))\n      fun i =>\n      Nat.Partrec.Code.lup\n        (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n          (List.range (Nat.pair (k' + 1) (encode (prec cf cg)))))\n        (k' + 1, cg) (Nat.pair (unpair n).fst (Nat.pair n✝ i))) =\n    Option.bind (evaln k' (prec cf cg) (Nat.pair (unpair n).fst n✝)) fun i =>\n      evaln (k' + 1) cg (Nat.pair (unpair n).fst (Nat.pair n✝ i))\n[PROOFSTEP]\nrw [hg (Nat.pair_lt_pair_left _ k'.lt_succ_self)]\n[GOAL]\ncase succ.prec.intro.succ\nx✝ : Unit\np n : ℕ\nthis : List.range p = List.range (Nat.pair (unpair p).fst (encode (ofNat Code (unpair p).snd)))\nk' : ℕ\nk : ℕ := k' + 1\nnk : n ≤ k'\ncf cg : Code\nhg :\n  ∀ {k' : ℕ} {c' : Code} {n : ℕ},\n    Nat.pair k' (encode c') < Nat.pair k (encode (prec cf cg)) →\n      Nat.Partrec.Code.lup\n          (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n            (List.range (Nat.pair k (encode (prec cf cg)))))\n          (k', c') n =\n        evaln k' c' n\nlf : encode cf < encode (prec cf cg)\nlg : encode cg < encode (prec cf cg)\nn✝ : ℕ\n⊢ (Option.bind (evaln k' (prec cf cg) (Nat.pair (unpair n).fst n✝)) fun i =>\n      Nat.Partrec.Code.lup\n        (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n          (List.range (Nat.pair (k' + 1) (encode (prec cf cg)))))\n        (k' + 1, cg) (Nat.pair (unpair n).fst (Nat.pair n✝ i))) =\n    Option.bind (evaln k' (prec cf cg) (Nat.pair (unpair n).fst n✝)) fun i =>\n      evaln (k' + 1) cg (Nat.pair (unpair n).fst (Nat.pair n✝ i))\n[PROOFSTEP]\ncases evaln k' _ _\n[GOAL]\ncase succ.prec.intro.succ.none\nx✝ : Unit\np n : ℕ\nthis : List.range p = List.range (Nat.pair (unpair p).fst (encode (ofNat Code (unpair p).snd)))\nk' : ℕ\nk : ℕ := k' + 1\nnk : n ≤ k'\ncf cg : Code\nhg :\n  ∀ {k' : ℕ} {c' : Code} {n : ℕ},\n    Nat.pair k' (encode c') < Nat.pair k (encode (prec cf cg)) →\n      Nat.Partrec.Code.lup\n          (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n            (List.range (Nat.pair k (encode (prec cf cg)))))\n          (k', c') n =\n        evaln k' c' n\nlf : encode cf < encode (prec cf cg)\nlg : encode cg < encode (prec cf cg)\nn✝ : ℕ\n⊢ (Option.bind Option.none fun i =>\n      Nat.Partrec.Code.lup\n        (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n          (List.range (Nat.pair (k' + 1) (encode (prec cf cg)))))\n        (k' + 1, cg) (Nat.pair (unpair n).fst (Nat.pair n✝ i))) =\n    Option.bind Option.none fun i => evaln (k' + 1) cg (Nat.pair (unpair n).fst (Nat.pair n✝ i))\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ.prec.intro.succ.some\nx✝ : Unit\np n : ℕ\nthis : List.range p = List.range (Nat.pair (unpair p).fst (encode (ofNat Code (unpair p).snd)))\nk' : ℕ\nk : ℕ := k' + 1\nnk : n ≤ k'\ncf cg : Code\nhg :\n  ∀ {k' : ℕ} {c' : Code} {n : ℕ},\n    Nat.pair k' (encode c') < Nat.pair k (encode (prec cf cg)) →\n      Nat.Partrec.Code.lup\n          (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n            (List.range (Nat.pair k (encode (prec cf cg)))))\n          (k', c') n =\n        evaln k' c' n\nlf : encode cf < encode (prec cf cg)\nlg : encode cg < encode (prec cf cg)\nn✝ val✝ : ℕ\n⊢ (Option.bind (some val✝) fun i =>\n      Nat.Partrec.Code.lup\n        (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n          (List.range (Nat.pair (k' + 1) (encode (prec cf cg)))))\n        (k' + 1, cg) (Nat.pair (unpair n).fst (Nat.pair n✝ i))) =\n    Option.bind (some val✝) fun i => evaln (k' + 1) cg (Nat.pair (unpair n).fst (Nat.pair n✝ i))\n[PROOFSTEP]\nsimp [hg (Nat.pair_lt_pair_right _ lg)]\n[GOAL]\ncase succ.rfind'\nx✝ : Unit\np n : ℕ\nthis : List.range p = List.range (Nat.pair (unpair p).fst (encode (ofNat Code (unpair p).snd)))\nk' : ℕ\nk : ℕ := k' + 1\nnk : n ≤ k'\ncf : Code\nhg :\n  ∀ {k' : ℕ} {c' : Code} {n : ℕ},\n    Nat.pair k' (encode c') < Nat.pair k (encode (rfind' cf)) →\n      Nat.Partrec.Code.lup\n          (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n            (List.range (Nat.pair k (encode (rfind' cf)))))\n          (k', c') n =\n        evaln k' c' n\n⊢ (Option.bind\n      (Nat.Partrec.Code.lup\n        (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n          (List.range (Nat.pair (k' + 1) (encode (rfind' cf)))))\n        (k' + 1, cf) n)\n      fun x =>\n      Nat.rec (some (unpair n).snd)\n        (fun n_1 n_ih =>\n          Nat.Partrec.Code.lup\n            (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n              (List.range (Nat.pair (k' + 1) (encode (rfind' cf)))))\n            (k', rfind' cf) (Nat.pair (unpair n).fst ((unpair n).snd + 1)))\n        x) =\n    Option.bind (evaln (k' + 1) cf n) fun x =>\n      if x = 0 then some (unpair n).snd else evaln k' (rfind' cf) (Nat.pair (unpair n).fst ((unpair n).snd + 1))\n[PROOFSTEP]\nhave lf := encode_lt_rfind' cf\n[GOAL]\ncase succ.rfind'\nx✝ : Unit\np n : ℕ\nthis : List.range p = List.range (Nat.pair (unpair p).fst (encode (ofNat Code (unpair p).snd)))\nk' : ℕ\nk : ℕ := k' + 1\nnk : n ≤ k'\ncf : Code\nhg :\n  ∀ {k' : ℕ} {c' : Code} {n : ℕ},\n    Nat.pair k' (encode c') < Nat.pair k (encode (rfind' cf)) →\n      Nat.Partrec.Code.lup\n          (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n            (List.range (Nat.pair k (encode (rfind' cf)))))\n          (k', c') n =\n        evaln k' c' n\nlf : encode cf < encode (rfind' cf)\n⊢ (Option.bind\n      (Nat.Partrec.Code.lup\n        (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n          (List.range (Nat.pair (k' + 1) (encode (rfind' cf)))))\n        (k' + 1, cf) n)\n      fun x =>\n      Nat.rec (some (unpair n).snd)\n        (fun n_1 n_ih =>\n          Nat.Partrec.Code.lup\n            (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n              (List.range (Nat.pair (k' + 1) (encode (rfind' cf)))))\n            (k', rfind' cf) (Nat.pair (unpair n).fst ((unpair n).snd + 1)))\n        x) =\n    Option.bind (evaln (k' + 1) cf n) fun x =>\n      if x = 0 then some (unpair n).snd else evaln k' (rfind' cf) (Nat.pair (unpair n).fst ((unpair n).snd + 1))\n[PROOFSTEP]\nrw [hg (Nat.pair_lt_pair_right _ lf)]\n[GOAL]\ncase succ.rfind'\nx✝ : Unit\np n : ℕ\nthis : List.range p = List.range (Nat.pair (unpair p).fst (encode (ofNat Code (unpair p).snd)))\nk' : ℕ\nk : ℕ := k' + 1\nnk : n ≤ k'\ncf : Code\nhg :\n  ∀ {k' : ℕ} {c' : Code} {n : ℕ},\n    Nat.pair k' (encode c') < Nat.pair k (encode (rfind' cf)) →\n      Nat.Partrec.Code.lup\n          (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n            (List.range (Nat.pair k (encode (rfind' cf)))))\n          (k', c') n =\n        evaln k' c' n\nlf : encode cf < encode (rfind' cf)\n⊢ (Option.bind (evaln k cf n) fun x =>\n      Nat.rec (some (unpair n).snd)\n        (fun n_1 n_ih =>\n          Nat.Partrec.Code.lup\n            (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n              (List.range (Nat.pair (k' + 1) (encode (rfind' cf)))))\n            (k', rfind' cf) (Nat.pair (unpair n).fst ((unpair n).snd + 1)))\n        x) =\n    Option.bind (evaln (k' + 1) cf n) fun x =>\n      if x = 0 then some (unpair n).snd else evaln k' (rfind' cf) (Nat.pair (unpair n).fst ((unpair n).snd + 1))\n[PROOFSTEP]\ncases' evaln k cf n with x\n[GOAL]\ncase succ.rfind'.none\nx✝ : Unit\np n : ℕ\nthis : List.range p = List.range (Nat.pair (unpair p).fst (encode (ofNat Code (unpair p).snd)))\nk' : ℕ\nk : ℕ := k' + 1\nnk : n ≤ k'\ncf : Code\nhg :\n  ∀ {k' : ℕ} {c' : Code} {n : ℕ},\n    Nat.pair k' (encode c') < Nat.pair k (encode (rfind' cf)) →\n      Nat.Partrec.Code.lup\n          (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n            (List.range (Nat.pair k (encode (rfind' cf)))))\n          (k', c') n =\n        evaln k' c' n\nlf : encode cf < encode (rfind' cf)\n⊢ (Option.bind Option.none fun x =>\n      Nat.rec (some (unpair n).snd)\n        (fun n_1 n_ih =>\n          Nat.Partrec.Code.lup\n            (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n              (List.range (Nat.pair (k' + 1) (encode (rfind' cf)))))\n            (k', rfind' cf) (Nat.pair (unpair n).fst ((unpair n).snd + 1)))\n        x) =\n    Option.bind Option.none fun x =>\n      if x = 0 then some (unpair n).snd else evaln k' (rfind' cf) (Nat.pair (unpair n).fst ((unpair n).snd + 1))\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ.rfind'.some\nx✝ : Unit\np n : ℕ\nthis : List.range p = List.range (Nat.pair (unpair p).fst (encode (ofNat Code (unpair p).snd)))\nk' : ℕ\nk : ℕ := k' + 1\nnk : n ≤ k'\ncf : Code\nhg :\n  ∀ {k' : ℕ} {c' : Code} {n : ℕ},\n    Nat.pair k' (encode c') < Nat.pair k (encode (rfind' cf)) →\n      Nat.Partrec.Code.lup\n          (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n            (List.range (Nat.pair k (encode (rfind' cf)))))\n          (k', c') n =\n        evaln k' c' n\nlf : encode cf < encode (rfind' cf)\nx : ℕ\n⊢ (Option.bind (some x) fun x =>\n      Nat.rec (some (unpair n).snd)\n        (fun n_1 n_ih =>\n          Nat.Partrec.Code.lup\n            (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n              (List.range (Nat.pair (k' + 1) (encode (rfind' cf)))))\n            (k', rfind' cf) (Nat.pair (unpair n).fst ((unpair n).snd + 1)))\n        x) =\n    Option.bind (some x) fun x =>\n      if x = 0 then some (unpair n).snd else evaln k' (rfind' cf) (Nat.pair (unpair n).fst ((unpair n).snd + 1))\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ.rfind'.some\nx✝ : Unit\np n : ℕ\nthis : List.range p = List.range (Nat.pair (unpair p).fst (encode (ofNat Code (unpair p).snd)))\nk' : ℕ\nk : ℕ := k' + 1\nnk : n ≤ k'\ncf : Code\nhg :\n  ∀ {k' : ℕ} {c' : Code} {n : ℕ},\n    Nat.pair k' (encode c') < Nat.pair k (encode (rfind' cf)) →\n      Nat.Partrec.Code.lup\n          (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n            (List.range (Nat.pair k (encode (rfind' cf)))))\n          (k', c') n =\n        evaln k' c' n\nlf : encode cf < encode (rfind' cf)\nx : ℕ\n⊢ Nat.rec (some (unpair n).snd)\n      (fun n_1 n_ih =>\n        Nat.Partrec.Code.lup\n          (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n            (List.range (Nat.pair (k' + 1) (encode (rfind' cf)))))\n          (k', rfind' cf) (Nat.pair (unpair n).fst ((unpair n).snd + 1)))\n      x =\n    if x = 0 then some (unpair n).snd else evaln k' (rfind' cf) (Nat.pair (unpair n).fst ((unpair n).snd + 1))\n[PROOFSTEP]\ncases x\n[GOAL]\ncase succ.rfind'.some.zero\nx✝ : Unit\np n : ℕ\nthis : List.range p = List.range (Nat.pair (unpair p).fst (encode (ofNat Code (unpair p).snd)))\nk' : ℕ\nk : ℕ := k' + 1\nnk : n ≤ k'\ncf : Code\nhg :\n  ∀ {k' : ℕ} {c' : Code} {n : ℕ},\n    Nat.pair k' (encode c') < Nat.pair k (encode (rfind' cf)) →\n      Nat.Partrec.Code.lup\n          (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n            (List.range (Nat.pair k (encode (rfind' cf)))))\n          (k', c') n =\n        evaln k' c' n\nlf : encode cf < encode (rfind' cf)\n⊢ Nat.rec (some (unpair n).snd)\n      (fun n_1 n_ih =>\n        Nat.Partrec.Code.lup\n          (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n            (List.range (Nat.pair (k' + 1) (encode (rfind' cf)))))\n          (k', rfind' cf) (Nat.pair (unpair n).fst ((unpair n).snd + 1)))\n      Nat.zero =\n    if Nat.zero = 0 then some (unpair n).snd else evaln k' (rfind' cf) (Nat.pair (unpair n).fst ((unpair n).snd + 1))\n[PROOFSTEP]\nsimp [Nat.succ_ne_zero]\n[GOAL]\ncase succ.rfind'.some.succ\nx✝ : Unit\np n : ℕ\nthis : List.range p = List.range (Nat.pair (unpair p).fst (encode (ofNat Code (unpair p).snd)))\nk' : ℕ\nk : ℕ := k' + 1\nnk : n ≤ k'\ncf : Code\nhg :\n  ∀ {k' : ℕ} {c' : Code} {n : ℕ},\n    Nat.pair k' (encode c') < Nat.pair k (encode (rfind' cf)) →\n      Nat.Partrec.Code.lup\n          (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n            (List.range (Nat.pair k (encode (rfind' cf)))))\n          (k', c') n =\n        evaln k' c' n\nlf : encode cf < encode (rfind' cf)\nn✝ : ℕ\n⊢ Nat.rec (some (unpair n).snd)\n      (fun n_1 n_ih =>\n        Nat.Partrec.Code.lup\n          (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n            (List.range (Nat.pair (k' + 1) (encode (rfind' cf)))))\n          (k', rfind' cf) (Nat.pair (unpair n).fst ((unpair n).snd + 1)))\n      (Nat.succ n✝) =\n    if Nat.succ n✝ = 0 then some (unpair n).snd else evaln k' (rfind' cf) (Nat.pair (unpair n).fst ((unpair n).snd + 1))\n[PROOFSTEP]\nsimp [Nat.succ_ne_zero]\n[GOAL]\ncase succ.rfind'.some.succ\nx✝ : Unit\np n : ℕ\nthis : List.range p = List.range (Nat.pair (unpair p).fst (encode (ofNat Code (unpair p).snd)))\nk' : ℕ\nk : ℕ := k' + 1\nnk : n ≤ k'\ncf : Code\nhg :\n  ∀ {k' : ℕ} {c' : Code} {n : ℕ},\n    Nat.pair k' (encode c') < Nat.pair k (encode (rfind' cf)) →\n      Nat.Partrec.Code.lup\n          (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n            (List.range (Nat.pair k (encode (rfind' cf)))))\n          (k', c') n =\n        evaln k' c' n\nlf : encode cf < encode (rfind' cf)\nn✝ : ℕ\n⊢ Nat.Partrec.Code.lup\n      (List.map (fun n => List.map (evaln (unpair n).fst (ofNat Code (unpair n).snd)) (List.range (unpair n).fst))\n        (List.range (Nat.pair (k' + 1) (encode (rfind' cf)))))\n      (k', rfind' cf) (Nat.pair (unpair n).fst ((unpair n).snd + 1)) =\n    evaln k' (rfind' cf) (Nat.pair (unpair n).fst ((unpair n).snd + 1))\n[PROOFSTEP]\nrw [hg (Nat.pair_lt_pair_left _ k'.lt_succ_self)]\n[GOAL]\nthis :\n  Primrec₂ fun x n =>\n    let a := ofNat (ℕ × Code) n;\n    List.map (evaln a.fst a.snd) (List.range a.fst)\nx✝ : (ℕ × Code) × ℕ\nk : ℕ\nc : Code\nn : ℕ\n⊢ (Option.bind\n      (List.get?\n        (let a := ofNat (ℕ × Code) (encode ((k, c), n).fst);\n        List.map (evaln a.fst a.snd) (List.range a.fst))\n        ((k, c), n).snd)\n      fun b => (((k, c), n), b).snd) =\n    evaln ((k, c), n).fst.fst ((k, c), n).fst.snd ((k, c), n).snd\n[PROOFSTEP]\nsimp [evaln_map]\n[GOAL]\nc : Code\nn x : ℕ\n⊢ x ∈ eval c n ↔ x ∈ rfindOpt fun k => evaln k c n\n[PROOFSTEP]\nrefine' evaln_complete.trans (Nat.rfindOpt_mono _).symm\n[GOAL]\nc : Code\nn x : ℕ\n⊢ ∀ {a m n_1 : ℕ}, m ≤ n_1 → a ∈ evaln m c n → a ∈ evaln n_1 c n\n[PROOFSTEP]\nintro a m n hl\n[GOAL]\nc : Code\nn✝ x a m n : ℕ\nhl : m ≤ n\n⊢ a ∈ evaln m c n✝ → a ∈ evaln n c n✝\n[PROOFSTEP]\napply evaln_mono hl\n[GOAL]\na : Code × ℕ\n⊢ (rfindOpt fun b =>\n      evaln (((a, b).snd, (a, b).fst.fst), (a, b).fst.snd).fst.fst\n        (((a, b).snd, (a, b).fst.fst), (a, b).fst.snd).fst.snd (((a, b).snd, (a, b).fst.fst), (a, b).fst.snd).snd) =\n    eval a.fst a.snd\n[PROOFSTEP]\nsimp [eval_eq_rfindOpt]\n[GOAL]\nf : Code → Code\nhf : Computable f\ng : ℕ → ℕ → Part ℕ :=\n  fun x y => do\n    let b ← eval (ofNat Code x) x\n    eval (ofNat Code b) y\nthis : Partrec₂ g\ncg : Code\neg : eval cg = fun n => Part.bind ↑(decode n) fun a => Part.map encode ((fun p => g p.fst p.snd) a)\n⊢ ∀ (a n : ℕ), eval cg (Nat.pair a n) = Part.map encode (g a n)\n[PROOFSTEP]\nsimp [eg]\n[GOAL]\nf : Code → Code\nhf : Computable f\ng : ℕ → ℕ → Part ℕ :=\n  fun x y => do\n    let b ← eval (ofNat Code x) x\n    eval (ofNat Code b) y\nthis✝ : Partrec₂ g\ncg : Code\neg : eval cg = fun n => Part.bind ↑(decode n) fun a => Part.map encode ((fun p => g p.fst p.snd) a)\neg' : ∀ (a n : ℕ), eval cg (Nat.pair a n) = Part.map encode (g a n)\nF : ℕ → Code := fun x => f (curry cg x)\nthis : Computable F\ncF : Code\neF : eval cF = fun n => Part.bind ↑(decode n) fun a => Part.map encode (↑F a)\n⊢ eval cF (encode cF) = Part.some (encode (F (encode cF)))\n[PROOFSTEP]\nsimp [eF]\n[GOAL]\nf : Code → Code\nhf : Computable f\ng : ℕ → ℕ → Part ℕ :=\n  fun x y => do\n    let b ← eval (ofNat Code x) x\n    eval (ofNat Code b) y\nthis✝ : Partrec₂ g\ncg : Code\neg : eval cg = fun n => Part.bind ↑(decode n) fun a => Part.map encode ((fun p => g p.fst p.snd) a)\neg' : ∀ (a n : ℕ), eval cg (Nat.pair a n) = Part.map encode (g a n)\nF : ℕ → Code := fun x => f (curry cg x)\nthis : Computable F\ncF : Code\neF : eval cF = fun n => Part.bind ↑(decode n) fun a => Part.map encode (↑F a)\neF' : eval cF (encode cF) = Part.some (encode (F (encode cF)))\nn : ℕ\n⊢ eval (f (curry cg (encode cF))) n = eval (curry cg (encode cF)) n\n[PROOFSTEP]\nsimp [eg', eF', Part.map_id']\n[GOAL]\nf : Code → ℕ →. ℕ\nhf : Partrec₂ f\ncf : Code\nef : eval cf = fun n => Part.bind ↑(decode n) fun a => Part.map encode ((fun p => f p.fst p.snd) a)\nc : Code\ne : eval (curry cf (encode c)) = eval c\nn : ℕ\n⊢ eval c n = f c n\n[PROOFSTEP]\nsimp [e.symm, ef, Part.map_id']\n", "meta": {"mathlib_filename": "Mathlib.Computability.PartrecCode", "llama_tokens": 431280, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7690802370707283, "lm_q2_score": 0.6723316926137812, "lm_q1q2_score": 0.5170770175455709}}
{"text": "[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\ns t : Closeds α\nh : s.carrier = t.carrier\n⊢ s = t\n[PROOFSTEP]\ncases s\n[GOAL]\ncase mk\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\nt : Closeds α\ncarrier✝ : Set α\nclosed'✝ : IsClosed carrier✝\nh : { carrier := carrier✝, closed' := closed'✝ }.carrier = t.carrier\n⊢ { carrier := carrier✝, closed' := closed'✝ } = t\n[PROOFSTEP]\ncases t\n[GOAL]\ncase mk.mk\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\ncarrier✝¹ : Set α\nclosed'✝¹ : IsClosed carrier✝¹\ncarrier✝ : Set α\nclosed'✝ : IsClosed carrier✝\nh : { carrier := carrier✝¹, closed' := closed'✝¹ }.carrier = { carrier := carrier✝, closed' := closed'✝ }.carrier\n⊢ { carrier := carrier✝¹, closed' := closed'✝¹ } = { carrier := carrier✝, closed' := closed'✝ }\n[PROOFSTEP]\ncongr\n[GOAL]\nι✝ : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\nι : Sort u_4\nx : α\ns : ι → Closeds α\n⊢ x ∈ iInf s ↔ ∀ (i : ι), x ∈ s i\n[PROOFSTEP]\nsimp [iInf]\n[GOAL]\nι✝ : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\nι : Sort u_4\ns : ι → Closeds α\n⊢ ↑(⨅ (i : ι), s i) = ⋂ (i : ι), ↑(s i)\n[PROOFSTEP]\next\n[GOAL]\ncase h\nι✝ : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\nι : Sort u_4\ns : ι → Closeds α\nx✝ : α\n⊢ x✝ ∈ ↑(⨅ (i : ι), s i) ↔ x✝ ∈ ⋂ (i : ι), ↑(s i)\n[PROOFSTEP]\nsimp\n[GOAL]\nι✝ : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\nι : Sort u_4\ns : ι → Closeds α\n⊢ ⨅ (i : ι), s i = { carrier := ⋂ (i : ι), ↑(s i), closed' := (_ : IsClosed (⋂ (i : ι), ↑(s i))) }\n[PROOFSTEP]\next1\n[GOAL]\ncase h\nι✝ : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\nι : Sort u_4\ns : ι → Closeds α\n⊢ ↑(⨅ (i : ι), s i) = ↑{ carrier := ⋂ (i : ι), ↑(s i), closed' := (_ : IsClosed (⋂ (i : ι), ↑(s i))) }\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\nsrc✝ : CompleteLattice (Closeds α) := inferInstanceAs (CompleteLattice (Closeds α))\na : Closeds α\ns : Set (Closeds α)\n⊢ ↑(⨅ (b : Closeds α) (_ : b ∈ s), a ⊔ b) = ↑(a ⊔ sInf s)\n[PROOFSTEP]\nsimp only [coe_sup, coe_iInf, coe_sInf, Set.union_iInter₂]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\ns : Closeds α\n⊢ (Opens.compl ∘ ↑ofDual) ((↑toDual ∘ compl) s) = s\n[PROOFSTEP]\nsimp [Closeds.compl_compl]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\ns : (Opens α)ᵒᵈ\n⊢ (↑toDual ∘ compl) ((Opens.compl ∘ ↑ofDual) s) = s\n[PROOFSTEP]\nsimp [Opens.compl_compl]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\ns : Opens α\n⊢ (Closeds.compl ∘ ↑ofDual) ((↑toDual ∘ compl) s) = s\n[PROOFSTEP]\nsimp [Opens.compl_compl]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\ns : (Closeds α)ᵒᵈ\n⊢ (↑toDual ∘ compl) ((Closeds.compl ∘ ↑ofDual) s) = s\n[PROOFSTEP]\nsimp [Closeds.compl_compl]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : T1Space α\ns : Closeds α\n⊢ IsAtom s ↔ ∃ x, s = singleton x\n[PROOFSTEP]\nhave : IsAtom (s : Set α) ↔ IsAtom s :=\n  by\n  refine' Closeds.gi.isAtom_iff' rfl (fun t ht => _) s\n  obtain ⟨x, rfl⟩ := t.isAtom_iff.mp ht\n  exact closure_singleton\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : T1Space α\ns : Closeds α\n⊢ IsAtom ↑s ↔ IsAtom s\n[PROOFSTEP]\nrefine' Closeds.gi.isAtom_iff' rfl (fun t ht => _) s\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : T1Space α\ns : Closeds α\nt : Set α\nht : IsAtom t\n⊢ ↑(Closeds.closure t) = t\n[PROOFSTEP]\nobtain ⟨x, rfl⟩ := t.isAtom_iff.mp ht\n[GOAL]\ncase intro\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : T1Space α\ns : Closeds α\nx : α\nht : IsAtom {x}\n⊢ ↑(Closeds.closure {x}) = {x}\n[PROOFSTEP]\nexact closure_singleton\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : T1Space α\ns : Closeds α\nthis : IsAtom ↑s ↔ IsAtom s\n⊢ IsAtom s ↔ ∃ x, s = singleton x\n[PROOFSTEP]\nsimp only [← this, (s : Set α).isAtom_iff, SetLike.ext'_iff, Closeds.singleton_coe]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : T1Space α\ns : Opens α\n⊢ IsCoatom s ↔ ∃ x, s = Closeds.compl (Closeds.singleton x)\n[PROOFSTEP]\nrw [← s.compl_compl, ← isAtom_dual_iff_isCoatom]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : T1Space α\ns : Opens α\n⊢ IsAtom (↑toDual (Closeds.compl (compl s))) ↔ ∃ x, Closeds.compl (compl s) = Closeds.compl (Closeds.singleton x)\n[PROOFSTEP]\nchange IsAtom (Closeds.complOrderIso α s.compl) ↔ _\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : T1Space α\ns : Opens α\n⊢ IsAtom (↑(Closeds.complOrderIso α) (compl s)) ↔ ∃ x, Closeds.compl (compl s) = Closeds.compl (Closeds.singleton x)\n[PROOFSTEP]\nsimp only [(Closeds.complOrderIso α).isAtom_iff, Closeds.isAtom_iff, Closeds.compl_bijective.injective.eq_iff]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\ns t : Clopens α\nh : (fun s => s.carrier) s = (fun s => s.carrier) t\n⊢ s = t\n[PROOFSTEP]\ncases s\n[GOAL]\ncase mk\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\nt : Clopens α\ncarrier✝ : Set α\nclopen'✝ : IsClopen carrier✝\nh : (fun s => s.carrier) { carrier := carrier✝, clopen' := clopen'✝ } = (fun s => s.carrier) t\n⊢ { carrier := carrier✝, clopen' := clopen'✝ } = t\n[PROOFSTEP]\ncases t\n[GOAL]\ncase mk.mk\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSpace β\ncarrier✝¹ : Set α\nclopen'✝¹ : IsClopen carrier✝¹\ncarrier✝ : Set α\nclopen'✝ : IsClopen carrier✝\nh :\n  (fun s => s.carrier) { carrier := carrier✝¹, clopen' := clopen'✝¹ } =\n    (fun s => s.carrier) { carrier := carrier✝, clopen' := clopen'✝ }\n⊢ { carrier := carrier✝¹, clopen' := clopen'✝¹ } = { carrier := carrier✝, clopen' := clopen'✝ }\n[PROOFSTEP]\ncongr\n", "meta": {"mathlib_filename": "Mathlib.Topology.Sets.Closeds", "llama_tokens": 3277, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7690802370707281, "lm_q2_score": 0.6723316926137812, "lm_q1q2_score": 0.5170770175455708}}
{"text": "[GOAL]\nι✝ : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹¹ : IsROrC 𝕜\nE : Type u_4\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁸ : NormedAddCommGroup E'\ninst✝⁷ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝⁴ : NormedAddCommGroup F'\ninst✝³ : InnerProductSpace ℝ F'\nι : Type u_8\ninst✝² : Fintype ι\nf : ι → Type u_9\ninst✝¹ : (i : ι) → NormedAddCommGroup (f i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (f i)\nx : PiLp 2 f\n⊢ ‖x‖ ^ 2 = ↑re (inner x x)\n[PROOFSTEP]\nsimp only [PiLp.norm_sq_eq_of_L2, map_sum, ← norm_sq_eq_inner, one_div]\n[GOAL]\nι✝ : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹¹ : IsROrC 𝕜\nE : Type u_4\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁸ : NormedAddCommGroup E'\ninst✝⁷ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝⁴ : NormedAddCommGroup F'\ninst✝³ : InnerProductSpace ℝ F'\nι : Type u_8\ninst✝² : Fintype ι\nf : ι → Type u_9\ninst✝¹ : (i : ι) → NormedAddCommGroup (f i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (f i)\n⊢ ∀ (x y : PiLp 2 f), ↑(starRingEnd 𝕜) (inner y x) = inner x y\n[PROOFSTEP]\nintro x y\n[GOAL]\nι✝ : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹¹ : IsROrC 𝕜\nE : Type u_4\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁸ : NormedAddCommGroup E'\ninst✝⁷ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝⁴ : NormedAddCommGroup F'\ninst✝³ : InnerProductSpace ℝ F'\nι : Type u_8\ninst✝² : Fintype ι\nf : ι → Type u_9\ninst✝¹ : (i : ι) → NormedAddCommGroup (f i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (f i)\nx y : PiLp 2 f\n⊢ ↑(starRingEnd 𝕜) (inner y x) = inner x y\n[PROOFSTEP]\nunfold inner\n[GOAL]\nι✝ : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹¹ : IsROrC 𝕜\nE : Type u_4\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁸ : NormedAddCommGroup E'\ninst✝⁷ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝⁴ : NormedAddCommGroup F'\ninst✝³ : InnerProductSpace ℝ F'\nι : Type u_8\ninst✝² : Fintype ι\nf : ι → Type u_9\ninst✝¹ : (i : ι) → NormedAddCommGroup (f i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (f i)\nx y : PiLp 2 f\n⊢ ↑(starRingEnd 𝕜) ({ inner := fun x y => ∑ i : ι, InnerProductSpace.toInner.1 (x i) (y i) }.1 y x) =\n    { inner := fun x y => ∑ i : ι, InnerProductSpace.toInner.1 (x i) (y i) }.1 x y\n[PROOFSTEP]\nrw [map_sum]\n[GOAL]\nι✝ : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹¹ : IsROrC 𝕜\nE : Type u_4\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁸ : NormedAddCommGroup E'\ninst✝⁷ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝⁴ : NormedAddCommGroup F'\ninst✝³ : InnerProductSpace ℝ F'\nι : Type u_8\ninst✝² : Fintype ι\nf : ι → Type u_9\ninst✝¹ : (i : ι) → NormedAddCommGroup (f i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (f i)\nx y : PiLp 2 f\n⊢ ∑ x_1 : ι, ↑(starRingEnd 𝕜) (InnerProductSpace.toInner.1 (y x_1) (x x_1)) =\n    { inner := fun x y => ∑ i : ι, InnerProductSpace.toInner.1 (x i) (y i) }.1 x y\n[PROOFSTEP]\napply Finset.sum_congr rfl\n[GOAL]\nι✝ : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹¹ : IsROrC 𝕜\nE : Type u_4\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁸ : NormedAddCommGroup E'\ninst✝⁷ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝⁴ : NormedAddCommGroup F'\ninst✝³ : InnerProductSpace ℝ F'\nι : Type u_8\ninst✝² : Fintype ι\nf : ι → Type u_9\ninst✝¹ : (i : ι) → NormedAddCommGroup (f i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (f i)\nx y : PiLp 2 f\n⊢ ∀ (x_1 : ι),\n    x_1 ∈ Finset.univ →\n      ↑(starRingEnd 𝕜) (InnerProductSpace.toInner.1 (y x_1) (x x_1)) = InnerProductSpace.toInner.1 (x x_1) (y x_1)\n[PROOFSTEP]\nrintro z -\n[GOAL]\nι✝ : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹¹ : IsROrC 𝕜\nE : Type u_4\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁸ : NormedAddCommGroup E'\ninst✝⁷ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝⁴ : NormedAddCommGroup F'\ninst✝³ : InnerProductSpace ℝ F'\nι : Type u_8\ninst✝² : Fintype ι\nf : ι → Type u_9\ninst✝¹ : (i : ι) → NormedAddCommGroup (f i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (f i)\nx y : PiLp 2 f\nz : ι\n⊢ ↑(starRingEnd 𝕜) (InnerProductSpace.toInner.1 (y z) (x z)) = InnerProductSpace.toInner.1 (x z) (y z)\n[PROOFSTEP]\napply inner_conj_symm\n[GOAL]\nι✝ : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹¹ : IsROrC 𝕜\nE : Type u_4\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁸ : NormedAddCommGroup E'\ninst✝⁷ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝⁴ : NormedAddCommGroup F'\ninst✝³ : InnerProductSpace ℝ F'\nι : Type u_8\ninst✝² : Fintype ι\nf : ι → Type u_9\ninst✝¹ : (i : ι) → NormedAddCommGroup (f i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (f i)\nx y z : PiLp 2 f\n⊢ ∑ i : ι, inner (x i + y i) (z i) = ∑ i : ι, inner (x i) (z i) + ∑ i : ι, inner (y i) (z i)\n[PROOFSTEP]\nsimp only [inner_add_left, Finset.sum_add_distrib]\n[GOAL]\nι✝ : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹¹ : IsROrC 𝕜\nE : Type u_4\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁸ : NormedAddCommGroup E'\ninst✝⁷ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝⁴ : NormedAddCommGroup F'\ninst✝³ : InnerProductSpace ℝ F'\nι : Type u_8\ninst✝² : Fintype ι\nf : ι → Type u_9\ninst✝¹ : (i : ι) → NormedAddCommGroup (f i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (f i)\nx y : PiLp 2 f\nr : 𝕜\n⊢ ∑ i : ι, inner (r • x i) (y i) = ↑(starRingEnd 𝕜) r * ∑ i : ι, inner (x i) (y i)\n[PROOFSTEP]\nsimp only [Finset.mul_sum, inner_smul_left]\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜✝ : Type u_3\ninst✝¹⁰ : IsROrC 𝕜✝\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : InnerProductSpace 𝕜✝ E\nE' : Type u_5\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜✝ E'\nF : Type u_6\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝³ : NormedAddCommGroup F'\ninst✝² : InnerProductSpace ℝ F'\n𝕜 : Type u_8\ninst✝¹ : IsROrC 𝕜\nn : Type u_9\ninst✝ : Fintype n\nx : EuclideanSpace 𝕜 n\n⊢ ‖x‖ = Real.sqrt (∑ i : n, ‖x i‖ ^ 2)\n[PROOFSTEP]\nsimpa only [Real.coe_sqrt, NNReal.coe_sum] using congr_arg ((↑) : ℝ≥0 → ℝ) x.nnnorm_eq\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝⁹ : IsROrC 𝕜\nE : Type u_4\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁶ : NormedAddCommGroup E'\ninst✝⁵ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝² : NormedAddCommGroup F'\ninst✝¹ : InnerProductSpace ℝ F'\ninst✝ : Fintype ι\n⊢ FiniteDimensional 𝕜 (EuclideanSpace 𝕜 ι)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝⁹ : IsROrC 𝕜\nE : Type u_4\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁶ : NormedAddCommGroup E'\ninst✝⁵ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝² : NormedAddCommGroup F'\ninst✝¹ : InnerProductSpace ℝ F'\ninst✝ : Fintype ι\n⊢ InnerProductSpace 𝕜 (EuclideanSpace 𝕜 ι)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝⁹ : IsROrC 𝕜\nE : Type u_4\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁶ : NormedAddCommGroup E'\ninst✝⁵ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝² : NormedAddCommGroup F'\ninst✝¹ : InnerProductSpace ℝ F'\ninst✝ : Fintype ι\n⊢ FiniteDimensional.finrank 𝕜 (EuclideanSpace 𝕜 ι) = Fintype.card ι\n[PROOFSTEP]\nsimp [EuclideanSpace, PiLp, WithLp]\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝⁹ : IsROrC 𝕜\nE : Type u_4\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁶ : NormedAddCommGroup E'\ninst✝⁵ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝² : NormedAddCommGroup F'\ninst✝¹ : InnerProductSpace ℝ F'\ninst✝ : Fintype ι\nn : ℕ\n⊢ FiniteDimensional.finrank 𝕜 (EuclideanSpace 𝕜 (Fin n)) = n\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹⁰ : IsROrC 𝕜\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝³ : NormedAddCommGroup F'\ninst✝² : InnerProductSpace ℝ F'\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nV : ι → Submodule 𝕜 E\nhV : IsInternal V\nhV' : OrthogonalFamily 𝕜 (fun i => { x // x ∈ V i }) fun i => subtypeₗᵢ (V i)\n⊢ E ≃ₗᵢ[𝕜] PiLp 2 fun i => { x // x ∈ V i }\n[PROOFSTEP]\nlet e₁ := DirectSum.linearEquivFunOnFintype 𝕜 ι fun i => V i\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹⁰ : IsROrC 𝕜\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝³ : NormedAddCommGroup F'\ninst✝² : InnerProductSpace ℝ F'\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nV : ι → Submodule 𝕜 E\nhV : IsInternal V\nhV' : OrthogonalFamily 𝕜 (fun i => { x // x ∈ V i }) fun i => subtypeₗᵢ (V i)\ne₁ : (⨁ (i : ι), { x // x ∈ V i }) ≃ₗ[𝕜] (i : ι) → { x // x ∈ V i } :=\n  linearEquivFunOnFintype 𝕜 ι fun i => { x // x ∈ V i }\n⊢ E ≃ₗᵢ[𝕜] PiLp 2 fun i => { x // x ∈ V i }\n[PROOFSTEP]\nlet e₂ := LinearEquiv.ofBijective (DirectSum.coeLinearMap V) hV\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹⁰ : IsROrC 𝕜\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝³ : NormedAddCommGroup F'\ninst✝² : InnerProductSpace ℝ F'\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nV : ι → Submodule 𝕜 E\nhV : IsInternal V\nhV' : OrthogonalFamily 𝕜 (fun i => { x // x ∈ V i }) fun i => subtypeₗᵢ (V i)\ne₁ : (⨁ (i : ι), { x // x ∈ V i }) ≃ₗ[𝕜] (i : ι) → { x // x ∈ V i } :=\n  linearEquivFunOnFintype 𝕜 ι fun i => { x // x ∈ V i }\ne₂ : (⨁ (i : ι), { x // x ∈ V i }) ≃ₗ[𝕜] E := LinearEquiv.ofBijective (coeLinearMap V) hV\n⊢ E ≃ₗᵢ[𝕜] PiLp 2 fun i => { x // x ∈ V i }\n[PROOFSTEP]\nrefine' LinearEquiv.isometryOfInner (e₂.symm.trans e₁) _\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹⁰ : IsROrC 𝕜\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝³ : NormedAddCommGroup F'\ninst✝² : InnerProductSpace ℝ F'\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nV : ι → Submodule 𝕜 E\nhV : IsInternal V\nhV' : OrthogonalFamily 𝕜 (fun i => { x // x ∈ V i }) fun i => subtypeₗᵢ (V i)\ne₁ : (⨁ (i : ι), { x // x ∈ V i }) ≃ₗ[𝕜] (i : ι) → { x // x ∈ V i } :=\n  linearEquivFunOnFintype 𝕜 ι fun i => { x // x ∈ V i }\ne₂ : (⨁ (i : ι), { x // x ∈ V i }) ≃ₗ[𝕜] E := LinearEquiv.ofBijective (coeLinearMap V) hV\n⊢ ∀ (x y : E),\n    inner (↑(LinearEquiv.trans (LinearEquiv.symm e₂) e₁) x) (↑(LinearEquiv.trans (LinearEquiv.symm e₂) e₁) y) =\n      inner x y\n[PROOFSTEP]\nsuffices ∀ (v w : PiLp 2 fun i => V i), ⟪v, w⟫ = ⟪e₂ (e₁.symm v), e₂ (e₁.symm w)⟫\n  by\n  intro v₀ w₀\n  convert this (e₁ (e₂.symm v₀)) (e₁ (e₂.symm w₀)) <;>\n    simp only [LinearEquiv.symm_apply_apply, LinearEquiv.apply_symm_apply]\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹⁰ : IsROrC 𝕜\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝³ : NormedAddCommGroup F'\ninst✝² : InnerProductSpace ℝ F'\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nV : ι → Submodule 𝕜 E\nhV : IsInternal V\nhV' : OrthogonalFamily 𝕜 (fun i => { x // x ∈ V i }) fun i => subtypeₗᵢ (V i)\ne₁ : (⨁ (i : ι), { x // x ∈ V i }) ≃ₗ[𝕜] (i : ι) → { x // x ∈ V i } :=\n  linearEquivFunOnFintype 𝕜 ι fun i => { x // x ∈ V i }\ne₂ : (⨁ (i : ι), { x // x ∈ V i }) ≃ₗ[𝕜] E := LinearEquiv.ofBijective (coeLinearMap V) hV\nthis :\n  ∀ (v w : PiLp 2 fun i => { x // x ∈ V i }),\n    inner v w = inner (↑e₂ (↑(LinearEquiv.symm e₁) v)) (↑e₂ (↑(LinearEquiv.symm e₁) w))\n⊢ ∀ (x y : E),\n    inner (↑(LinearEquiv.trans (LinearEquiv.symm e₂) e₁) x) (↑(LinearEquiv.trans (LinearEquiv.symm e₂) e₁) y) =\n      inner x y\n[PROOFSTEP]\nintro v₀ w₀\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹⁰ : IsROrC 𝕜\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝³ : NormedAddCommGroup F'\ninst✝² : InnerProductSpace ℝ F'\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nV : ι → Submodule 𝕜 E\nhV : IsInternal V\nhV' : OrthogonalFamily 𝕜 (fun i => { x // x ∈ V i }) fun i => subtypeₗᵢ (V i)\ne₁ : (⨁ (i : ι), { x // x ∈ V i }) ≃ₗ[𝕜] (i : ι) → { x // x ∈ V i } :=\n  linearEquivFunOnFintype 𝕜 ι fun i => { x // x ∈ V i }\ne₂ : (⨁ (i : ι), { x // x ∈ V i }) ≃ₗ[𝕜] E := LinearEquiv.ofBijective (coeLinearMap V) hV\nthis :\n  ∀ (v w : PiLp 2 fun i => { x // x ∈ V i }),\n    inner v w = inner (↑e₂ (↑(LinearEquiv.symm e₁) v)) (↑e₂ (↑(LinearEquiv.symm e₁) w))\nv₀ w₀ : E\n⊢ inner (↑(LinearEquiv.trans (LinearEquiv.symm e₂) e₁) v₀) (↑(LinearEquiv.trans (LinearEquiv.symm e₂) e₁) w₀) =\n    inner v₀ w₀\n[PROOFSTEP]\nconvert this (e₁ (e₂.symm v₀)) (e₁ (e₂.symm w₀))\n[GOAL]\ncase h.e'_3.h.e'_4\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹⁰ : IsROrC 𝕜\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝³ : NormedAddCommGroup F'\ninst✝² : InnerProductSpace ℝ F'\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nV : ι → Submodule 𝕜 E\nhV : IsInternal V\nhV' : OrthogonalFamily 𝕜 (fun i => { x // x ∈ V i }) fun i => subtypeₗᵢ (V i)\ne₁ : (⨁ (i : ι), { x // x ∈ V i }) ≃ₗ[𝕜] (i : ι) → { x // x ∈ V i } :=\n  linearEquivFunOnFintype 𝕜 ι fun i => { x // x ∈ V i }\ne₂ : (⨁ (i : ι), { x // x ∈ V i }) ≃ₗ[𝕜] E := LinearEquiv.ofBijective (coeLinearMap V) hV\nthis :\n  ∀ (v w : PiLp 2 fun i => { x // x ∈ V i }),\n    inner v w = inner (↑e₂ (↑(LinearEquiv.symm e₁) v)) (↑e₂ (↑(LinearEquiv.symm e₁) w))\nv₀ w₀ : E\n⊢ v₀ = ↑e₂ (↑(LinearEquiv.symm e₁) (↑e₁ (↑(LinearEquiv.symm e₂) v₀)))\n[PROOFSTEP]\nsimp only [LinearEquiv.symm_apply_apply, LinearEquiv.apply_symm_apply]\n[GOAL]\ncase h.e'_3.h.e'_5\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹⁰ : IsROrC 𝕜\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝³ : NormedAddCommGroup F'\ninst✝² : InnerProductSpace ℝ F'\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nV : ι → Submodule 𝕜 E\nhV : IsInternal V\nhV' : OrthogonalFamily 𝕜 (fun i => { x // x ∈ V i }) fun i => subtypeₗᵢ (V i)\ne₁ : (⨁ (i : ι), { x // x ∈ V i }) ≃ₗ[𝕜] (i : ι) → { x // x ∈ V i } :=\n  linearEquivFunOnFintype 𝕜 ι fun i => { x // x ∈ V i }\ne₂ : (⨁ (i : ι), { x // x ∈ V i }) ≃ₗ[𝕜] E := LinearEquiv.ofBijective (coeLinearMap V) hV\nthis :\n  ∀ (v w : PiLp 2 fun i => { x // x ∈ V i }),\n    inner v w = inner (↑e₂ (↑(LinearEquiv.symm e₁) v)) (↑e₂ (↑(LinearEquiv.symm e₁) w))\nv₀ w₀ : E\n⊢ w₀ = ↑e₂ (↑(LinearEquiv.symm e₁) (↑e₁ (↑(LinearEquiv.symm e₂) w₀)))\n[PROOFSTEP]\nsimp only [LinearEquiv.symm_apply_apply, LinearEquiv.apply_symm_apply]\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹⁰ : IsROrC 𝕜\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝³ : NormedAddCommGroup F'\ninst✝² : InnerProductSpace ℝ F'\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nV : ι → Submodule 𝕜 E\nhV : IsInternal V\nhV' : OrthogonalFamily 𝕜 (fun i => { x // x ∈ V i }) fun i => subtypeₗᵢ (V i)\ne₁ : (⨁ (i : ι), { x // x ∈ V i }) ≃ₗ[𝕜] (i : ι) → { x // x ∈ V i } :=\n  linearEquivFunOnFintype 𝕜 ι fun i => { x // x ∈ V i }\ne₂ : (⨁ (i : ι), { x // x ∈ V i }) ≃ₗ[𝕜] E := LinearEquiv.ofBijective (coeLinearMap V) hV\n⊢ ∀ (v w : PiLp 2 fun i => { x // x ∈ V i }),\n    inner v w = inner (↑e₂ (↑(LinearEquiv.symm e₁) v)) (↑e₂ (↑(LinearEquiv.symm e₁) w))\n[PROOFSTEP]\nintro v w\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹⁰ : IsROrC 𝕜\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝³ : NormedAddCommGroup F'\ninst✝² : InnerProductSpace ℝ F'\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nV : ι → Submodule 𝕜 E\nhV : IsInternal V\nhV' : OrthogonalFamily 𝕜 (fun i => { x // x ∈ V i }) fun i => subtypeₗᵢ (V i)\ne₁ : (⨁ (i : ι), { x // x ∈ V i }) ≃ₗ[𝕜] (i : ι) → { x // x ∈ V i } :=\n  linearEquivFunOnFintype 𝕜 ι fun i => { x // x ∈ V i }\ne₂ : (⨁ (i : ι), { x // x ∈ V i }) ≃ₗ[𝕜] E := LinearEquiv.ofBijective (coeLinearMap V) hV\nv w : PiLp 2 fun i => { x // x ∈ V i }\n⊢ inner v w = inner (↑e₂ (↑(LinearEquiv.symm e₁) v)) (↑e₂ (↑(LinearEquiv.symm e₁) w))\n[PROOFSTEP]\ntrans ⟪∑ i, (V i).subtypeₗᵢ (v i), ∑ i, (V i).subtypeₗᵢ (w i)⟫\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹⁰ : IsROrC 𝕜\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝³ : NormedAddCommGroup F'\ninst✝² : InnerProductSpace ℝ F'\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nV : ι → Submodule 𝕜 E\nhV : IsInternal V\nhV' : OrthogonalFamily 𝕜 (fun i => { x // x ∈ V i }) fun i => subtypeₗᵢ (V i)\ne₁ : (⨁ (i : ι), { x // x ∈ V i }) ≃ₗ[𝕜] (i : ι) → { x // x ∈ V i } :=\n  linearEquivFunOnFintype 𝕜 ι fun i => { x // x ∈ V i }\ne₂ : (⨁ (i : ι), { x // x ∈ V i }) ≃ₗ[𝕜] E := LinearEquiv.ofBijective (coeLinearMap V) hV\nv w : PiLp 2 fun i => { x // x ∈ V i }\n⊢ inner v w = inner (∑ i : ι, ↑(subtypeₗᵢ (V i)) (v i)) (∑ i : ι, ↑(subtypeₗᵢ (V i)) (w i))\n[PROOFSTEP]\nsimp only [sum_inner, hV'.inner_right_fintype, PiLp.inner_apply]\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹⁰ : IsROrC 𝕜\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝³ : NormedAddCommGroup F'\ninst✝² : InnerProductSpace ℝ F'\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nV : ι → Submodule 𝕜 E\nhV : IsInternal V\nhV' : OrthogonalFamily 𝕜 (fun i => { x // x ∈ V i }) fun i => subtypeₗᵢ (V i)\ne₁ : (⨁ (i : ι), { x // x ∈ V i }) ≃ₗ[𝕜] (i : ι) → { x // x ∈ V i } :=\n  linearEquivFunOnFintype 𝕜 ι fun i => { x // x ∈ V i }\ne₂ : (⨁ (i : ι), { x // x ∈ V i }) ≃ₗ[𝕜] E := LinearEquiv.ofBijective (coeLinearMap V) hV\nv w : PiLp 2 fun i => { x // x ∈ V i }\n⊢ inner (∑ i : ι, ↑(subtypeₗᵢ (V i)) (v i)) (∑ i : ι, ↑(subtypeₗᵢ (V i)) (w i)) =\n    inner (↑e₂ (↑(LinearEquiv.symm e₁) v)) (↑e₂ (↑(LinearEquiv.symm e₁) w))\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_a.e_s\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹⁰ : IsROrC 𝕜\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝³ : NormedAddCommGroup F'\ninst✝² : InnerProductSpace ℝ F'\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nV : ι → Submodule 𝕜 E\nhV : IsInternal V\nhV' : OrthogonalFamily 𝕜 (fun i => { x // x ∈ V i }) fun i => subtypeₗᵢ (V i)\ne₁ : (⨁ (i : ι), { x // x ∈ V i }) ≃ₗ[𝕜] (i : ι) → { x // x ∈ V i } :=\n  linearEquivFunOnFintype 𝕜 ι fun i => { x // x ∈ V i }\ne₂ : (⨁ (i : ι), { x // x ∈ V i }) ≃ₗ[𝕜] E := LinearEquiv.ofBijective (coeLinearMap V) hV\nv w : PiLp 2 fun i => { x // x ∈ V i }\n⊢ Finset.univ =\n    Multiset.toFinset ↑{ val := Finset.univ.val, property := (_ : ∀ (x : ι), x ∈ Finset.univ.val ∨ v x = 0) }\n[PROOFSTEP]\nsimp\n[GOAL]\ncase e_a.e_s\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹⁰ : IsROrC 𝕜\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝³ : NormedAddCommGroup F'\ninst✝² : InnerProductSpace ℝ F'\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nV : ι → Submodule 𝕜 E\nhV : IsInternal V\nhV' : OrthogonalFamily 𝕜 (fun i => { x // x ∈ V i }) fun i => subtypeₗᵢ (V i)\ne₁ : (⨁ (i : ι), { x // x ∈ V i }) ≃ₗ[𝕜] (i : ι) → { x // x ∈ V i } :=\n  linearEquivFunOnFintype 𝕜 ι fun i => { x // x ∈ V i }\ne₂ : (⨁ (i : ι), { x // x ∈ V i }) ≃ₗ[𝕜] E := LinearEquiv.ofBijective (coeLinearMap V) hV\nv w : PiLp 2 fun i => { x // x ∈ V i }\n⊢ Finset.univ =\n    Multiset.toFinset ↑{ val := Finset.univ.val, property := (_ : ∀ (x : ι), x ∈ Finset.univ.val ∨ w x = 0) }\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹⁰ : IsROrC 𝕜\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝³ : NormedAddCommGroup F'\ninst✝² : InnerProductSpace ℝ F'\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nV : ι → Submodule 𝕜 E\nhV : IsInternal V\nhV' : OrthogonalFamily 𝕜 (fun i => { x // x ∈ V i }) fun i => subtypeₗᵢ (V i)\nw : PiLp 2 fun i => { x // x ∈ V i }\n⊢ ↑(LinearIsometryEquiv.symm (isometryL2OfOrthogonalFamily hV hV')) w = ∑ i : ι, ↑(w i)\n[PROOFSTEP]\nclassical\nlet e₁ := DirectSum.linearEquivFunOnFintype 𝕜 ι fun i => V i\nlet e₂ := LinearEquiv.ofBijective (DirectSum.coeLinearMap V) hV\nsuffices ∀ v : ⨁ i, V i, e₂ v = ∑ i, e₁ v i by exact this (e₁.symm w)\nintro v\nsimp [DirectSum.coeLinearMap, DirectSum.toModule, DFinsupp.lsum, DFinsupp.sumAddHom_apply]\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹⁰ : IsROrC 𝕜\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝³ : NormedAddCommGroup F'\ninst✝² : InnerProductSpace ℝ F'\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nV : ι → Submodule 𝕜 E\nhV : IsInternal V\nhV' : OrthogonalFamily 𝕜 (fun i => { x // x ∈ V i }) fun i => subtypeₗᵢ (V i)\nw : PiLp 2 fun i => { x // x ∈ V i }\n⊢ ↑(LinearIsometryEquiv.symm (isometryL2OfOrthogonalFamily hV hV')) w = ∑ i : ι, ↑(w i)\n[PROOFSTEP]\nlet e₁ := DirectSum.linearEquivFunOnFintype 𝕜 ι fun i => V i\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹⁰ : IsROrC 𝕜\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝³ : NormedAddCommGroup F'\ninst✝² : InnerProductSpace ℝ F'\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nV : ι → Submodule 𝕜 E\nhV : IsInternal V\nhV' : OrthogonalFamily 𝕜 (fun i => { x // x ∈ V i }) fun i => subtypeₗᵢ (V i)\nw : PiLp 2 fun i => { x // x ∈ V i }\ne₁ : (⨁ (i : ι), { x // x ∈ V i }) ≃ₗ[𝕜] (i : ι) → { x // x ∈ V i } :=\n  linearEquivFunOnFintype 𝕜 ι fun i => { x // x ∈ V i }\n⊢ ↑(LinearIsometryEquiv.symm (isometryL2OfOrthogonalFamily hV hV')) w = ∑ i : ι, ↑(w i)\n[PROOFSTEP]\nlet e₂ := LinearEquiv.ofBijective (DirectSum.coeLinearMap V) hV\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹⁰ : IsROrC 𝕜\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝³ : NormedAddCommGroup F'\ninst✝² : InnerProductSpace ℝ F'\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nV : ι → Submodule 𝕜 E\nhV : IsInternal V\nhV' : OrthogonalFamily 𝕜 (fun i => { x // x ∈ V i }) fun i => subtypeₗᵢ (V i)\nw : PiLp 2 fun i => { x // x ∈ V i }\ne₁ : (⨁ (i : ι), { x // x ∈ V i }) ≃ₗ[𝕜] (i : ι) → { x // x ∈ V i } :=\n  linearEquivFunOnFintype 𝕜 ι fun i => { x // x ∈ V i }\ne₂ : (⨁ (i : ι), { x // x ∈ V i }) ≃ₗ[𝕜] E := LinearEquiv.ofBijective (coeLinearMap V) hV\n⊢ ↑(LinearIsometryEquiv.symm (isometryL2OfOrthogonalFamily hV hV')) w = ∑ i : ι, ↑(w i)\n[PROOFSTEP]\nsuffices ∀ v : ⨁ i, V i, e₂ v = ∑ i, e₁ v i by exact this (e₁.symm w)\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹⁰ : IsROrC 𝕜\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝³ : NormedAddCommGroup F'\ninst✝² : InnerProductSpace ℝ F'\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nV : ι → Submodule 𝕜 E\nhV : IsInternal V\nhV' : OrthogonalFamily 𝕜 (fun i => { x // x ∈ V i }) fun i => subtypeₗᵢ (V i)\nw : PiLp 2 fun i => { x // x ∈ V i }\ne₁ : (⨁ (i : ι), { x // x ∈ V i }) ≃ₗ[𝕜] (i : ι) → { x // x ∈ V i } :=\n  linearEquivFunOnFintype 𝕜 ι fun i => { x // x ∈ V i }\ne₂ : (⨁ (i : ι), { x // x ∈ V i }) ≃ₗ[𝕜] E := LinearEquiv.ofBijective (coeLinearMap V) hV\nthis : ∀ (v : ⨁ (i : ι), { x // x ∈ V i }), ↑e₂ v = ∑ i : ι, ↑(↑e₁ v i)\n⊢ ↑(LinearIsometryEquiv.symm (isometryL2OfOrthogonalFamily hV hV')) w = ∑ i : ι, ↑(w i)\n[PROOFSTEP]\nexact this (e₁.symm w)\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹⁰ : IsROrC 𝕜\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝³ : NormedAddCommGroup F'\ninst✝² : InnerProductSpace ℝ F'\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nV : ι → Submodule 𝕜 E\nhV : IsInternal V\nhV' : OrthogonalFamily 𝕜 (fun i => { x // x ∈ V i }) fun i => subtypeₗᵢ (V i)\nw : PiLp 2 fun i => { x // x ∈ V i }\ne₁ : (⨁ (i : ι), { x // x ∈ V i }) ≃ₗ[𝕜] (i : ι) → { x // x ∈ V i } :=\n  linearEquivFunOnFintype 𝕜 ι fun i => { x // x ∈ V i }\ne₂ : (⨁ (i : ι), { x // x ∈ V i }) ≃ₗ[𝕜] E := LinearEquiv.ofBijective (coeLinearMap V) hV\n⊢ ∀ (v : ⨁ (i : ι), { x // x ∈ V i }), ↑e₂ v = ∑ i : ι, ↑(↑e₁ v i)\n[PROOFSTEP]\nintro v\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹⁰ : IsROrC 𝕜\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝³ : NormedAddCommGroup F'\ninst✝² : InnerProductSpace ℝ F'\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nV : ι → Submodule 𝕜 E\nhV : IsInternal V\nhV' : OrthogonalFamily 𝕜 (fun i => { x // x ∈ V i }) fun i => subtypeₗᵢ (V i)\nw : PiLp 2 fun i => { x // x ∈ V i }\ne₁ : (⨁ (i : ι), { x // x ∈ V i }) ≃ₗ[𝕜] (i : ι) → { x // x ∈ V i } :=\n  linearEquivFunOnFintype 𝕜 ι fun i => { x // x ∈ V i }\ne₂ : (⨁ (i : ι), { x // x ∈ V i }) ≃ₗ[𝕜] E := LinearEquiv.ofBijective (coeLinearMap V) hV\nv : ⨁ (i : ι), { x // x ∈ V i }\n⊢ ↑e₂ v = ∑ i : ι, ↑(↑e₁ v i)\n[PROOFSTEP]\nsimp [DirectSum.coeLinearMap, DirectSum.toModule, DFinsupp.lsum, DFinsupp.sumAddHom_apply]\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹⁰ : IsROrC 𝕜\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝³ : NormedAddCommGroup F'\ninst✝² : InnerProductSpace ℝ F'\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\ni : ι\na : 𝕜\nj : ι\n⊢ single i a j = if j = i then a else 0\n[PROOFSTEP]\nrw [EuclideanSpace.single, PiLp.equiv_symm_apply, ← Pi.single_apply i a j]\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹⁰ : IsROrC 𝕜\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝³ : NormedAddCommGroup F'\ninst✝² : InnerProductSpace ℝ F'\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\ni : ι\na : 𝕜\nv : EuclideanSpace 𝕜 ι\n⊢ inner (single i a) v = ↑(starRingEnd 𝕜) a * v i\n[PROOFSTEP]\nsimp [apply_ite conj]\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹⁰ : IsROrC 𝕜\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝³ : NormedAddCommGroup F'\ninst✝² : InnerProductSpace ℝ F'\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\ni : ι\na : 𝕜\nv : EuclideanSpace 𝕜 ι\n⊢ inner v (single i a) = a * ↑(starRingEnd ((fun x => 𝕜) i)) (v i)\n[PROOFSTEP]\nsimp [apply_ite conj, mul_comm]\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹⁰ : IsROrC 𝕜\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝³ : NormedAddCommGroup F'\ninst✝² : InnerProductSpace ℝ F'\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\n⊢ Orthonormal 𝕜 fun i => single i 1\n[PROOFSTEP]\nsimp_rw [orthonormal_iff_ite, EuclideanSpace.inner_single_left, map_one, one_mul, EuclideanSpace.single_apply]\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹⁰ : IsROrC 𝕜\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝³ : NormedAddCommGroup F'\ninst✝² : InnerProductSpace ℝ F'\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\n⊢ ι → ι → True\n[PROOFSTEP]\nintros\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹⁰ : IsROrC 𝕜\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝³ : NormedAddCommGroup F'\ninst✝² : InnerProductSpace ℝ F'\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\ni✝ j✝ : ι\n⊢ True\n[PROOFSTEP]\ntrivial\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝⁹ : IsROrC 𝕜\nE : Type u_4\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁶ : NormedAddCommGroup E'\ninst✝⁵ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝² : NormedAddCommGroup F'\ninst✝¹ : InnerProductSpace ℝ F'\ninst✝ : Fintype ι\nf g : OrthonormalBasis ι 𝕜 E\nh : f.repr = g.repr\n⊢ f = g\n[PROOFSTEP]\ncases f\n[GOAL]\ncase ofRepr\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝⁹ : IsROrC 𝕜\nE : Type u_4\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁶ : NormedAddCommGroup E'\ninst✝⁵ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝² : NormedAddCommGroup F'\ninst✝¹ : InnerProductSpace ℝ F'\ninst✝ : Fintype ι\ng : OrthonormalBasis ι 𝕜 E\nrepr✝ : E ≃ₗᵢ[𝕜] EuclideanSpace 𝕜 ι\nh : { repr := repr✝ }.repr = g.repr\n⊢ { repr := repr✝ } = g\n[PROOFSTEP]\ncases g\n[GOAL]\ncase ofRepr.ofRepr\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝⁹ : IsROrC 𝕜\nE : Type u_4\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁶ : NormedAddCommGroup E'\ninst✝⁵ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝² : NormedAddCommGroup F'\ninst✝¹ : InnerProductSpace ℝ F'\ninst✝ : Fintype ι\nrepr✝¹ repr✝ : E ≃ₗᵢ[𝕜] EuclideanSpace 𝕜 ι\nh : { repr := repr✝¹ }.repr = { repr := repr✝ }.repr\n⊢ { repr := repr✝¹ } = { repr := repr✝ }\n[PROOFSTEP]\ncongr\n  -- Porting note: `CoeFun` → `FunLike`\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝⁹ : IsROrC 𝕜\nE : Type u_4\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁶ : NormedAddCommGroup E'\ninst✝⁵ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝² : NormedAddCommGroup F'\ninst✝¹ : InnerProductSpace ℝ F'\ninst✝ : Fintype ι\nb : OrthonormalBasis ι 𝕜 E\ni : ι\n⊢ E\n[PROOFSTEP]\nclassical exact b.repr.symm (EuclideanSpace.single i (1 : 𝕜))\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝⁹ : IsROrC 𝕜\nE : Type u_4\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁶ : NormedAddCommGroup E'\ninst✝⁵ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝² : NormedAddCommGroup F'\ninst✝¹ : InnerProductSpace ℝ F'\ninst✝ : Fintype ι\nb : OrthonormalBasis ι 𝕜 E\ni : ι\n⊢ E\n[PROOFSTEP]\nexact b.repr.symm (EuclideanSpace.single i (1 : 𝕜))\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝⁹ : IsROrC 𝕜\nE : Type u_4\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁶ : NormedAddCommGroup E'\ninst✝⁵ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝² : NormedAddCommGroup F'\ninst✝¹ : InnerProductSpace ℝ F'\ninst✝ : Fintype ι\nb b' : OrthonormalBasis ι 𝕜 E\nh :\n  (fun b i => ↑(LinearIsometryEquiv.symm b.repr) (EuclideanSpace.single i 1)) b =\n    (fun b i => ↑(LinearIsometryEquiv.symm b.repr) (EuclideanSpace.single i 1)) b'\n⊢ ↑(LinearEquiv.symm b.repr.toLinearEquiv) = ↑(LinearEquiv.symm b'.repr.toLinearEquiv)\n[PROOFSTEP]\nclassical\nrw [← LinearMap.cancel_right (PiLp.linearEquiv 2 𝕜 (fun _ => 𝕜)).symm.surjective]\nsimp only [LinearIsometryEquiv.toLinearEquiv_symm]\nrefine LinearMap.pi_ext fun i k => ?_\nhave : k = k • (1 : 𝕜) := by rw [smul_eq_mul, mul_one]\nrw [this, Pi.single_smul]\nreplace h := congr_fun h i\nsimp only [LinearEquiv.comp_coe, SMulHomClass.map_smul, LinearEquiv.coe_coe, LinearEquiv.trans_apply,\n  WithLp.linearEquiv_symm_apply, PiLp.equiv_symm_single, LinearIsometryEquiv.coe_toLinearEquiv] at h ⊢\nrw [h]\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝⁹ : IsROrC 𝕜\nE : Type u_4\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁶ : NormedAddCommGroup E'\ninst✝⁵ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝² : NormedAddCommGroup F'\ninst✝¹ : InnerProductSpace ℝ F'\ninst✝ : Fintype ι\nb b' : OrthonormalBasis ι 𝕜 E\nh :\n  (fun b i => ↑(LinearIsometryEquiv.symm b.repr) (EuclideanSpace.single i 1)) b =\n    (fun b i => ↑(LinearIsometryEquiv.symm b.repr) (EuclideanSpace.single i 1)) b'\n⊢ ↑(LinearEquiv.symm b.repr.toLinearEquiv) = ↑(LinearEquiv.symm b'.repr.toLinearEquiv)\n[PROOFSTEP]\nrw [← LinearMap.cancel_right (PiLp.linearEquiv 2 𝕜 (fun _ => 𝕜)).symm.surjective]\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝⁹ : IsROrC 𝕜\nE : Type u_4\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁶ : NormedAddCommGroup E'\ninst✝⁵ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝² : NormedAddCommGroup F'\ninst✝¹ : InnerProductSpace ℝ F'\ninst✝ : Fintype ι\nb b' : OrthonormalBasis ι 𝕜 E\nh :\n  (fun b i => ↑(LinearIsometryEquiv.symm b.repr) (EuclideanSpace.single i 1)) b =\n    (fun b i => ↑(LinearIsometryEquiv.symm b.repr) (EuclideanSpace.single i 1)) b'\n⊢ LinearMap.comp ↑(LinearEquiv.symm b.repr.toLinearEquiv) ↑(LinearEquiv.symm (PiLp.linearEquiv 2 𝕜 fun x => 𝕜)) =\n    LinearMap.comp ↑(LinearEquiv.symm b'.repr.toLinearEquiv) ↑(LinearEquiv.symm (PiLp.linearEquiv 2 𝕜 fun x => 𝕜))\n[PROOFSTEP]\nsimp only [LinearIsometryEquiv.toLinearEquiv_symm]\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝⁹ : IsROrC 𝕜\nE : Type u_4\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁶ : NormedAddCommGroup E'\ninst✝⁵ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝² : NormedAddCommGroup F'\ninst✝¹ : InnerProductSpace ℝ F'\ninst✝ : Fintype ι\nb b' : OrthonormalBasis ι 𝕜 E\nh :\n  (fun b i => ↑(LinearIsometryEquiv.symm b.repr) (EuclideanSpace.single i 1)) b =\n    (fun b i => ↑(LinearIsometryEquiv.symm b.repr) (EuclideanSpace.single i 1)) b'\n⊢ LinearMap.comp ↑(LinearIsometryEquiv.symm b.repr).toLinearEquiv\n      ↑(LinearEquiv.symm (PiLp.linearEquiv 2 𝕜 fun x => 𝕜)) =\n    LinearMap.comp ↑(LinearIsometryEquiv.symm b'.repr).toLinearEquiv\n      ↑(LinearEquiv.symm (PiLp.linearEquiv 2 𝕜 fun x => 𝕜))\n[PROOFSTEP]\nrefine LinearMap.pi_ext fun i k => ?_\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝⁹ : IsROrC 𝕜\nE : Type u_4\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁶ : NormedAddCommGroup E'\ninst✝⁵ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝² : NormedAddCommGroup F'\ninst✝¹ : InnerProductSpace ℝ F'\ninst✝ : Fintype ι\nb b' : OrthonormalBasis ι 𝕜 E\nh :\n  (fun b i => ↑(LinearIsometryEquiv.symm b.repr) (EuclideanSpace.single i 1)) b =\n    (fun b i => ↑(LinearIsometryEquiv.symm b.repr) (EuclideanSpace.single i 1)) b'\ni : ι\nk : 𝕜\n⊢ ↑(LinearMap.comp ↑(LinearIsometryEquiv.symm b.repr).toLinearEquiv\n          ↑(LinearEquiv.symm (PiLp.linearEquiv 2 𝕜 fun x => 𝕜)))\n      (Pi.single i k) =\n    ↑(LinearMap.comp ↑(LinearIsometryEquiv.symm b'.repr).toLinearEquiv\n          ↑(LinearEquiv.symm (PiLp.linearEquiv 2 𝕜 fun x => 𝕜)))\n      (Pi.single i k)\n[PROOFSTEP]\nhave : k = k • (1 : 𝕜) := by rw [smul_eq_mul, mul_one]\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝⁹ : IsROrC 𝕜\nE : Type u_4\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁶ : NormedAddCommGroup E'\ninst✝⁵ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝² : NormedAddCommGroup F'\ninst✝¹ : InnerProductSpace ℝ F'\ninst✝ : Fintype ι\nb b' : OrthonormalBasis ι 𝕜 E\nh :\n  (fun b i => ↑(LinearIsometryEquiv.symm b.repr) (EuclideanSpace.single i 1)) b =\n    (fun b i => ↑(LinearIsometryEquiv.symm b.repr) (EuclideanSpace.single i 1)) b'\ni : ι\nk : 𝕜\n⊢ k = k • 1\n[PROOFSTEP]\nrw [smul_eq_mul, mul_one]\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝⁹ : IsROrC 𝕜\nE : Type u_4\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁶ : NormedAddCommGroup E'\ninst✝⁵ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝² : NormedAddCommGroup F'\ninst✝¹ : InnerProductSpace ℝ F'\ninst✝ : Fintype ι\nb b' : OrthonormalBasis ι 𝕜 E\nh :\n  (fun b i => ↑(LinearIsometryEquiv.symm b.repr) (EuclideanSpace.single i 1)) b =\n    (fun b i => ↑(LinearIsometryEquiv.symm b.repr) (EuclideanSpace.single i 1)) b'\ni : ι\nk : 𝕜\nthis : k = k • 1\n⊢ ↑(LinearMap.comp ↑(LinearIsometryEquiv.symm b.repr).toLinearEquiv\n          ↑(LinearEquiv.symm (PiLp.linearEquiv 2 𝕜 fun x => 𝕜)))\n      (Pi.single i k) =\n    ↑(LinearMap.comp ↑(LinearIsometryEquiv.symm b'.repr).toLinearEquiv\n          ↑(LinearEquiv.symm (PiLp.linearEquiv 2 𝕜 fun x => 𝕜)))\n      (Pi.single i k)\n[PROOFSTEP]\nrw [this, Pi.single_smul]\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝⁹ : IsROrC 𝕜\nE : Type u_4\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁶ : NormedAddCommGroup E'\ninst✝⁵ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝² : NormedAddCommGroup F'\ninst✝¹ : InnerProductSpace ℝ F'\ninst✝ : Fintype ι\nb b' : OrthonormalBasis ι 𝕜 E\nh :\n  (fun b i => ↑(LinearIsometryEquiv.symm b.repr) (EuclideanSpace.single i 1)) b =\n    (fun b i => ↑(LinearIsometryEquiv.symm b.repr) (EuclideanSpace.single i 1)) b'\ni : ι\nk : 𝕜\nthis : k = k • 1\n⊢ ↑(LinearMap.comp ↑(LinearIsometryEquiv.symm b.repr).toLinearEquiv\n          ↑(LinearEquiv.symm (PiLp.linearEquiv 2 𝕜 fun x => 𝕜)))\n      (k • Pi.single i 1) =\n    ↑(LinearMap.comp ↑(LinearIsometryEquiv.symm b'.repr).toLinearEquiv\n          ↑(LinearEquiv.symm (PiLp.linearEquiv 2 𝕜 fun x => 𝕜)))\n      (k • Pi.single i 1)\n[PROOFSTEP]\nreplace h := congr_fun h i\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝⁹ : IsROrC 𝕜\nE : Type u_4\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁶ : NormedAddCommGroup E'\ninst✝⁵ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝² : NormedAddCommGroup F'\ninst✝¹ : InnerProductSpace ℝ F'\ninst✝ : Fintype ι\nb b' : OrthonormalBasis ι 𝕜 E\ni : ι\nk : 𝕜\nthis : k = k • 1\nh :\n  (fun b i => ↑(LinearIsometryEquiv.symm b.repr) (EuclideanSpace.single i 1)) b i =\n    (fun b i => ↑(LinearIsometryEquiv.symm b.repr) (EuclideanSpace.single i 1)) b' i\n⊢ ↑(LinearMap.comp ↑(LinearIsometryEquiv.symm b.repr).toLinearEquiv\n          ↑(LinearEquiv.symm (PiLp.linearEquiv 2 𝕜 fun x => 𝕜)))\n      (k • Pi.single i 1) =\n    ↑(LinearMap.comp ↑(LinearIsometryEquiv.symm b'.repr).toLinearEquiv\n          ↑(LinearEquiv.symm (PiLp.linearEquiv 2 𝕜 fun x => 𝕜)))\n      (k • Pi.single i 1)\n[PROOFSTEP]\nsimp only [LinearEquiv.comp_coe, SMulHomClass.map_smul, LinearEquiv.coe_coe, LinearEquiv.trans_apply,\n  WithLp.linearEquiv_symm_apply, PiLp.equiv_symm_single, LinearIsometryEquiv.coe_toLinearEquiv] at h ⊢\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝⁹ : IsROrC 𝕜\nE : Type u_4\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁶ : NormedAddCommGroup E'\ninst✝⁵ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝² : NormedAddCommGroup F'\ninst✝¹ : InnerProductSpace ℝ F'\ninst✝ : Fintype ι\nb b' : OrthonormalBasis ι 𝕜 E\ni : ι\nk : 𝕜\nthis : k = k • 1\nh :\n  ↑(LinearIsometryEquiv.symm b.repr) (EuclideanSpace.single i 1) =\n    ↑(LinearIsometryEquiv.symm b'.repr) (EuclideanSpace.single i 1)\n⊢ k • ↑(LinearIsometryEquiv.symm b.repr) (EuclideanSpace.single i 1) =\n    k • ↑(LinearIsometryEquiv.symm b'.repr) (EuclideanSpace.single i 1)\n[PROOFSTEP]\nrw [h]\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹⁰ : IsROrC 𝕜\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝³ : NormedAddCommGroup F'\ninst✝² : InnerProductSpace ℝ F'\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\ne : E ≃ₗᵢ[𝕜] EuclideanSpace 𝕜 ι\n⊢ ↑{ repr := e } = fun i => ↑(LinearIsometryEquiv.symm e) (EuclideanSpace.single i 1)\n[PROOFSTEP]\ndsimp only [FunLike.coe]\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹⁰ : IsROrC 𝕜\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝³ : NormedAddCommGroup F'\ninst✝² : InnerProductSpace ℝ F'\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\ne : E ≃ₗᵢ[𝕜] EuclideanSpace 𝕜 ι\n⊢ (fun i => EquivLike.coe (LinearIsometryEquiv.symm e) (EuclideanSpace.single i 1)) = fun i =>\n    EquivLike.coe (LinearIsometryEquiv.symm e) (EuclideanSpace.single i 1)\n[PROOFSTEP]\nfunext\n[GOAL]\ncase h\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹⁰ : IsROrC 𝕜\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝³ : NormedAddCommGroup F'\ninst✝² : InnerProductSpace ℝ F'\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\ne : E ≃ₗᵢ[𝕜] EuclideanSpace 𝕜 ι\nx✝ : ι\n⊢ EquivLike.coe (LinearIsometryEquiv.symm e) (EuclideanSpace.single x✝ 1) =\n    EquivLike.coe (LinearIsometryEquiv.symm e) (EuclideanSpace.single x✝ 1)\n[PROOFSTEP]\ncongr!\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹⁰ : IsROrC 𝕜\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝³ : NormedAddCommGroup F'\ninst✝² : InnerProductSpace ℝ F'\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nb : OrthonormalBasis ι 𝕜 E\ni : ι\n⊢ ↑(LinearIsometryEquiv.symm b.repr) (EuclideanSpace.single i 1) = ↑b i\n[PROOFSTEP]\ndsimp only [FunLike.coe]\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹⁰ : IsROrC 𝕜\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝³ : NormedAddCommGroup F'\ninst✝² : InnerProductSpace ℝ F'\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nb : OrthonormalBasis ι 𝕜 E\ni : ι\n⊢ EquivLike.coe (LinearIsometryEquiv.symm b.repr) (EuclideanSpace.single i 1) =\n    EquivLike.coe (LinearIsometryEquiv.symm b.repr) (EuclideanSpace.single i 1)\n[PROOFSTEP]\ncongr!\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹⁰ : IsROrC 𝕜\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝³ : NormedAddCommGroup F'\ninst✝² : InnerProductSpace ℝ F'\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nb : OrthonormalBasis ι 𝕜 E\ni : ι\n⊢ ↑b.repr (↑b i) = EuclideanSpace.single i 1\n[PROOFSTEP]\nrw [← b.repr_symm_single i, LinearIsometryEquiv.apply_symm_apply]\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝⁹ : IsROrC 𝕜\nE : Type u_4\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁶ : NormedAddCommGroup E'\ninst✝⁵ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝² : NormedAddCommGroup F'\ninst✝¹ : InnerProductSpace ℝ F'\ninst✝ : Fintype ι\nb : OrthonormalBasis ι 𝕜 E\nv : E\ni : ι\n⊢ ↑b.repr v i = inner (↑b i) v\n[PROOFSTEP]\nclassical\nrw [← b.repr.inner_map_map (b i) v, b.repr_self i, EuclideanSpace.inner_single_left]\nsimp only [one_mul, eq_self_iff_true, map_one]\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝⁹ : IsROrC 𝕜\nE : Type u_4\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁶ : NormedAddCommGroup E'\ninst✝⁵ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝² : NormedAddCommGroup F'\ninst✝¹ : InnerProductSpace ℝ F'\ninst✝ : Fintype ι\nb : OrthonormalBasis ι 𝕜 E\nv : E\ni : ι\n⊢ ↑b.repr v i = inner (↑b i) v\n[PROOFSTEP]\nrw [← b.repr.inner_map_map (b i) v, b.repr_self i, EuclideanSpace.inner_single_left]\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝⁹ : IsROrC 𝕜\nE : Type u_4\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁶ : NormedAddCommGroup E'\ninst✝⁵ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝² : NormedAddCommGroup F'\ninst✝¹ : InnerProductSpace ℝ F'\ninst✝ : Fintype ι\nb : OrthonormalBasis ι 𝕜 E\nv : E\ni : ι\n⊢ ↑b.repr v i = ↑(starRingEnd 𝕜) 1 * ↑b.repr v i\n[PROOFSTEP]\nsimp only [one_mul, eq_self_iff_true, map_one]\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝⁹ : IsROrC 𝕜\nE : Type u_4\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁶ : NormedAddCommGroup E'\ninst✝⁵ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝² : NormedAddCommGroup F'\ninst✝¹ : InnerProductSpace ℝ F'\ninst✝ : Fintype ι\nb : OrthonormalBasis ι 𝕜 E\n⊢ Orthonormal 𝕜 ↑b\n[PROOFSTEP]\nclassical\nrw [orthonormal_iff_ite]\nintro i j\nrw [← b.repr.inner_map_map (b i) (b j), b.repr_self i, b.repr_self j, EuclideanSpace.inner_single_left,\n  EuclideanSpace.single_apply, map_one, one_mul]\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝⁹ : IsROrC 𝕜\nE : Type u_4\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁶ : NormedAddCommGroup E'\ninst✝⁵ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝² : NormedAddCommGroup F'\ninst✝¹ : InnerProductSpace ℝ F'\ninst✝ : Fintype ι\nb : OrthonormalBasis ι 𝕜 E\n⊢ Orthonormal 𝕜 ↑b\n[PROOFSTEP]\nrw [orthonormal_iff_ite]\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝⁹ : IsROrC 𝕜\nE : Type u_4\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁶ : NormedAddCommGroup E'\ninst✝⁵ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝² : NormedAddCommGroup F'\ninst✝¹ : InnerProductSpace ℝ F'\ninst✝ : Fintype ι\nb : OrthonormalBasis ι 𝕜 E\n⊢ ∀ (i j : ι), inner (↑b i) (↑b j) = if i = j then 1 else 0\n[PROOFSTEP]\nintro i j\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝⁹ : IsROrC 𝕜\nE : Type u_4\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁶ : NormedAddCommGroup E'\ninst✝⁵ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝² : NormedAddCommGroup F'\ninst✝¹ : InnerProductSpace ℝ F'\ninst✝ : Fintype ι\nb : OrthonormalBasis ι 𝕜 E\ni j : ι\n⊢ inner (↑b i) (↑b j) = if i = j then 1 else 0\n[PROOFSTEP]\nrw [← b.repr.inner_map_map (b i) (b j), b.repr_self i, b.repr_self j, EuclideanSpace.inner_single_left,\n  EuclideanSpace.single_apply, map_one, one_mul]\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝⁹ : IsROrC 𝕜\nE : Type u_4\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁶ : NormedAddCommGroup E'\ninst✝⁵ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝² : NormedAddCommGroup F'\ninst✝¹ : InnerProductSpace ℝ F'\ninst✝ : Fintype ι\nb : OrthonormalBasis ι 𝕜 E\n⊢ ↑(OrthonormalBasis.toBasis b) = ↑b\n[PROOFSTEP]\nrw [OrthonormalBasis.toBasis]\n  -- Porting note: was `change`\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝⁹ : IsROrC 𝕜\nE : Type u_4\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁶ : NormedAddCommGroup E'\ninst✝⁵ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝² : NormedAddCommGroup F'\ninst✝¹ : InnerProductSpace ℝ F'\ninst✝ : Fintype ι\nb : OrthonormalBasis ι 𝕜 E\n⊢ ↑(Basis.ofEquivFun b.repr.toLinearEquiv) = ↑b\n[PROOFSTEP]\next j\n[GOAL]\ncase h\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝⁹ : IsROrC 𝕜\nE : Type u_4\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁶ : NormedAddCommGroup E'\ninst✝⁵ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝² : NormedAddCommGroup F'\ninst✝¹ : InnerProductSpace ℝ F'\ninst✝ : Fintype ι\nb : OrthonormalBasis ι 𝕜 E\nj : ι\n⊢ ↑(Basis.ofEquivFun b.repr.toLinearEquiv) j = ↑b j\n[PROOFSTEP]\nclassical\nrw [Basis.coe_ofEquivFun]\ncongr\n[GOAL]\ncase h\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝⁹ : IsROrC 𝕜\nE : Type u_4\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁶ : NormedAddCommGroup E'\ninst✝⁵ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝² : NormedAddCommGroup F'\ninst✝¹ : InnerProductSpace ℝ F'\ninst✝ : Fintype ι\nb : OrthonormalBasis ι 𝕜 E\nj : ι\n⊢ ↑(Basis.ofEquivFun b.repr.toLinearEquiv) j = ↑b j\n[PROOFSTEP]\nrw [Basis.coe_ofEquivFun]\n[GOAL]\ncase h\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝⁹ : IsROrC 𝕜\nE : Type u_4\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁶ : NormedAddCommGroup E'\ninst✝⁵ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝² : NormedAddCommGroup F'\ninst✝¹ : InnerProductSpace ℝ F'\ninst✝ : Fintype ι\nb : OrthonormalBasis ι 𝕜 E\nj : ι\n⊢ (fun i => ↑(LinearEquiv.symm b.repr.toLinearEquiv) (update 0 i 1)) j = ↑b j\n[PROOFSTEP]\ncongr\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝⁹ : IsROrC 𝕜\nE : Type u_4\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁶ : NormedAddCommGroup E'\ninst✝⁵ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝² : NormedAddCommGroup F'\ninst✝¹ : InnerProductSpace ℝ F'\ninst✝ : Fintype ι\nb : OrthonormalBasis ι 𝕜 E\nx : E\ni : ι\n⊢ ↑(↑(OrthonormalBasis.toBasis b).repr x) i = ↑b.repr x i\n[PROOFSTEP]\nrw [← Basis.equivFun_apply, OrthonormalBasis.coe_toBasis_repr, LinearIsometryEquiv.coe_toLinearEquiv]\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝⁹ : IsROrC 𝕜\nE : Type u_4\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁶ : NormedAddCommGroup E'\ninst✝⁵ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝² : NormedAddCommGroup F'\ninst✝¹ : InnerProductSpace ℝ F'\ninst✝ : Fintype ι\nb : OrthonormalBasis ι 𝕜 E\nx : E\n⊢ ∑ i : ι, ↑b.repr x i • ↑b i = x\n[PROOFSTEP]\nsimp_rw [← b.coe_toBasis_repr_apply, ← b.coe_toBasis]\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝⁹ : IsROrC 𝕜\nE : Type u_4\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁶ : NormedAddCommGroup E'\ninst✝⁵ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝² : NormedAddCommGroup F'\ninst✝¹ : InnerProductSpace ℝ F'\ninst✝ : Fintype ι\nb : OrthonormalBasis ι 𝕜 E\nx : E\n⊢ ∑ x_1 : ι, ↑(↑(OrthonormalBasis.toBasis b).repr x) x_1 • ↑(OrthonormalBasis.toBasis b) x_1 = x\n[PROOFSTEP]\nexact b.toBasis.sum_repr x\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝⁹ : IsROrC 𝕜\nE : Type u_4\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁶ : NormedAddCommGroup E'\ninst✝⁵ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝² : NormedAddCommGroup F'\ninst✝¹ : InnerProductSpace ℝ F'\ninst✝ : Fintype ι\nb : OrthonormalBasis ι 𝕜 E\nv : EuclideanSpace 𝕜 ι\n⊢ ∑ i : ι, v i • ↑b i = ↑(LinearIsometryEquiv.symm b.repr) v\n[PROOFSTEP]\nsimpa using (b.toBasis.equivFun_symm_apply v).symm\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝⁹ : IsROrC 𝕜\nE : Type u_4\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁶ : NormedAddCommGroup E'\ninst✝⁵ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝² : NormedAddCommGroup F'\ninst✝¹ : InnerProductSpace ℝ F'\ninst✝ : Fintype ι\nb : OrthonormalBasis ι 𝕜 E\nx y : E\n⊢ ∑ i : ι, inner x (↑b i) * inner (↑b i) y = inner x y\n[PROOFSTEP]\nhave := congr_arg (innerSL 𝕜 x) (b.sum_repr y)\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝⁹ : IsROrC 𝕜\nE : Type u_4\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁶ : NormedAddCommGroup E'\ninst✝⁵ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝² : NormedAddCommGroup F'\ninst✝¹ : InnerProductSpace ℝ F'\ninst✝ : Fintype ι\nb : OrthonormalBasis ι 𝕜 E\nx y : E\nthis : ↑(↑(innerSL 𝕜) x) (∑ i : ι, ↑b.repr y i • ↑b i) = ↑(↑(innerSL 𝕜) x) y\n⊢ ∑ i : ι, inner x (↑b i) * inner (↑b i) y = inner x y\n[PROOFSTEP]\nrw [map_sum] at this \n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝⁹ : IsROrC 𝕜\nE : Type u_4\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁶ : NormedAddCommGroup E'\ninst✝⁵ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝² : NormedAddCommGroup F'\ninst✝¹ : InnerProductSpace ℝ F'\ninst✝ : Fintype ι\nb : OrthonormalBasis ι 𝕜 E\nx y : E\nthis : ∑ x_1 : ι, ↑(↑(innerSL 𝕜) x) (↑b.repr y x_1 • ↑b x_1) = ↑(↑(innerSL 𝕜) x) y\n⊢ ∑ i : ι, inner x (↑b i) * inner (↑b i) y = inner x y\n[PROOFSTEP]\nconvert this\n[GOAL]\ncase h.e'_2.a\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝⁹ : IsROrC 𝕜\nE : Type u_4\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁶ : NormedAddCommGroup E'\ninst✝⁵ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝² : NormedAddCommGroup F'\ninst✝¹ : InnerProductSpace ℝ F'\ninst✝ : Fintype ι\nb : OrthonormalBasis ι 𝕜 E\nx y : E\nthis : ∑ x_1 : ι, ↑(↑(innerSL 𝕜) x) (↑b.repr y x_1 • ↑b x_1) = ↑(↑(innerSL 𝕜) x) y\nx✝ : ι\na✝ : x✝ ∈ Finset.univ\n⊢ inner x (↑b x✝) * inner (↑b x✝) y = ↑(↑(innerSL 𝕜) x) (↑b.repr y x✝ • ↑b x✝)\n[PROOFSTEP]\nrw [SMulHomClass.map_smul, b.repr_apply_apply, mul_comm]\n[GOAL]\ncase h.e'_2.a\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝⁹ : IsROrC 𝕜\nE : Type u_4\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁶ : NormedAddCommGroup E'\ninst✝⁵ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝² : NormedAddCommGroup F'\ninst✝¹ : InnerProductSpace ℝ F'\ninst✝ : Fintype ι\nb : OrthonormalBasis ι 𝕜 E\nx y : E\nthis : ∑ x_1 : ι, ↑(↑(innerSL 𝕜) x) (↑b.repr y x_1 • ↑b x_1) = ↑(↑(innerSL 𝕜) x) y\nx✝ : ι\na✝ : x✝ ∈ Finset.univ\n⊢ inner (↑b x✝) y * inner x (↑b x✝) = inner (↑b x✝) y • ↑(↑(innerSL 𝕜) x) (↑b x✝)\n[PROOFSTEP]\nsimp only [innerSL_apply, smul_eq_mul]\n  -- Porting note: was `rfl`\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹⁰ : IsROrC 𝕜\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝³ : NormedAddCommGroup F'\ninst✝² : InnerProductSpace ℝ F'\ninst✝¹ : Fintype ι\nU : Submodule 𝕜 E\ninst✝ : CompleteSpace { x // x ∈ U }\nb : OrthonormalBasis ι 𝕜 { x // x ∈ U }\nx : E\n⊢ ↑(orthogonalProjection U) x = ∑ i : ι, inner (↑(↑b i)) x • ↑b i\n[PROOFSTEP]\nsimpa only [b.repr_apply_apply, inner_orthogonalProjection_eq_of_mem_left] using\n  (b.sum_repr (orthogonalProjection U x)).symm\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝⁹ : IsROrC 𝕜\nE : Type u_4\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁶ : NormedAddCommGroup E'\ninst✝⁵ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝² : NormedAddCommGroup F'\ninst✝¹ : InnerProductSpace ℝ F'\ninst✝ : Fintype ι\nv : Basis ι 𝕜 E\nhv : Orthonormal 𝕜 ↑v\n⊢ ∀ (x y : E), inner (↑(Basis.equivFun v) x) (↑(Basis.equivFun v) y) = inner x y\n[PROOFSTEP]\nintro x y\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝⁹ : IsROrC 𝕜\nE : Type u_4\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁶ : NormedAddCommGroup E'\ninst✝⁵ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝² : NormedAddCommGroup F'\ninst✝¹ : InnerProductSpace ℝ F'\ninst✝ : Fintype ι\nv : Basis ι 𝕜 E\nhv : Orthonormal 𝕜 ↑v\nx y : E\n⊢ inner (↑(Basis.equivFun v) x) (↑(Basis.equivFun v) y) = inner x y\n[PROOFSTEP]\nlet p : EuclideanSpace 𝕜 ι := v.equivFun x\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝⁹ : IsROrC 𝕜\nE : Type u_4\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁶ : NormedAddCommGroup E'\ninst✝⁵ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝² : NormedAddCommGroup F'\ninst✝¹ : InnerProductSpace ℝ F'\ninst✝ : Fintype ι\nv : Basis ι 𝕜 E\nhv : Orthonormal 𝕜 ↑v\nx y : E\np : EuclideanSpace 𝕜 ι := ↑(Basis.equivFun v) x\n⊢ inner (↑(Basis.equivFun v) x) (↑(Basis.equivFun v) y) = inner x y\n[PROOFSTEP]\nlet q : EuclideanSpace 𝕜 ι := v.equivFun y\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝⁹ : IsROrC 𝕜\nE : Type u_4\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁶ : NormedAddCommGroup E'\ninst✝⁵ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝² : NormedAddCommGroup F'\ninst✝¹ : InnerProductSpace ℝ F'\ninst✝ : Fintype ι\nv : Basis ι 𝕜 E\nhv : Orthonormal 𝕜 ↑v\nx y : E\np : EuclideanSpace 𝕜 ι := ↑(Basis.equivFun v) x\nq : EuclideanSpace 𝕜 ι := ↑(Basis.equivFun v) y\n⊢ inner (↑(Basis.equivFun v) x) (↑(Basis.equivFun v) y) = inner x y\n[PROOFSTEP]\nhave key : ⟪p, q⟫ = ⟪∑ i, p i • v i, ∑ i, q i • v i⟫ := by simp [sum_inner, inner_smul_left, hv.inner_right_fintype]\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝⁹ : IsROrC 𝕜\nE : Type u_4\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁶ : NormedAddCommGroup E'\ninst✝⁵ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝² : NormedAddCommGroup F'\ninst✝¹ : InnerProductSpace ℝ F'\ninst✝ : Fintype ι\nv : Basis ι 𝕜 E\nhv : Orthonormal 𝕜 ↑v\nx y : E\np : EuclideanSpace 𝕜 ι := ↑(Basis.equivFun v) x\nq : EuclideanSpace 𝕜 ι := ↑(Basis.equivFun v) y\n⊢ inner p q = inner (∑ i : ι, p i • ↑v i) (∑ i : ι, q i • ↑v i)\n[PROOFSTEP]\nsimp [sum_inner, inner_smul_left, hv.inner_right_fintype]\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝⁹ : IsROrC 𝕜\nE : Type u_4\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁶ : NormedAddCommGroup E'\ninst✝⁵ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝² : NormedAddCommGroup F'\ninst✝¹ : InnerProductSpace ℝ F'\ninst✝ : Fintype ι\nv : Basis ι 𝕜 E\nhv : Orthonormal 𝕜 ↑v\nx y : E\np : EuclideanSpace 𝕜 ι := ↑(Basis.equivFun v) x\nq : EuclideanSpace 𝕜 ι := ↑(Basis.equivFun v) y\nkey : inner p q = inner (∑ i : ι, p i • ↑v i) (∑ i : ι, q i • ↑v i)\n⊢ inner (↑(Basis.equivFun v) x) (↑(Basis.equivFun v) y) = inner x y\n[PROOFSTEP]\nconvert key\n[GOAL]\ncase h.e'_3.h.e'_4\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝⁹ : IsROrC 𝕜\nE : Type u_4\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁶ : NormedAddCommGroup E'\ninst✝⁵ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝² : NormedAddCommGroup F'\ninst✝¹ : InnerProductSpace ℝ F'\ninst✝ : Fintype ι\nv : Basis ι 𝕜 E\nhv : Orthonormal 𝕜 ↑v\nx y : E\np : EuclideanSpace 𝕜 ι := ↑(Basis.equivFun v) x\nq : EuclideanSpace 𝕜 ι := ↑(Basis.equivFun v) y\nkey : inner p q = inner (∑ i : ι, p i • ↑v i) (∑ i : ι, q i • ↑v i)\n⊢ x = ∑ i : ι, p i • ↑v i\n[PROOFSTEP]\nrw [← v.equivFun.symm_apply_apply x, v.equivFun_symm_apply]\n[GOAL]\ncase h.e'_3.h.e'_5\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝⁹ : IsROrC 𝕜\nE : Type u_4\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁶ : NormedAddCommGroup E'\ninst✝⁵ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝² : NormedAddCommGroup F'\ninst✝¹ : InnerProductSpace ℝ F'\ninst✝ : Fintype ι\nv : Basis ι 𝕜 E\nhv : Orthonormal 𝕜 ↑v\nx y : E\np : EuclideanSpace 𝕜 ι := ↑(Basis.equivFun v) x\nq : EuclideanSpace 𝕜 ι := ↑(Basis.equivFun v) y\nkey : inner p q = inner (∑ i : ι, p i • ↑v i) (∑ i : ι, q i • ↑v i)\n⊢ y = ∑ i : ι, q i • ↑v i\n[PROOFSTEP]\nrw [← v.equivFun.symm_apply_apply y, v.equivFun_symm_apply]\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝⁹ : IsROrC 𝕜\nE : Type u_4\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁶ : NormedAddCommGroup E'\ninst✝⁵ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝² : NormedAddCommGroup F'\ninst✝¹ : InnerProductSpace ℝ F'\ninst✝ : Fintype ι\nv : Basis ι 𝕜 E\nhv : Orthonormal 𝕜 ↑v\n⊢ OrthonormalBasis.toBasis (Basis.toOrthonormalBasis v hv) = v\n[PROOFSTEP]\nsimp [Basis.toOrthonormalBasis, OrthonormalBasis.toBasis]\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝⁹ : IsROrC 𝕜\nE : Type u_4\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁶ : NormedAddCommGroup E'\ninst✝⁵ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝² : NormedAddCommGroup F'\ninst✝¹ : InnerProductSpace ℝ F'\ninst✝ : Fintype ι\nv : Basis ι 𝕜 E\nhv : Orthonormal 𝕜 ↑v\n⊢ ↑(Basis.toOrthonormalBasis v hv) = ↑(OrthonormalBasis.toBasis (Basis.toOrthonormalBasis v hv))\n[PROOFSTEP]\nclassical rw [OrthonormalBasis.coe_toBasis]\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝⁹ : IsROrC 𝕜\nE : Type u_4\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁶ : NormedAddCommGroup E'\ninst✝⁵ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝² : NormedAddCommGroup F'\ninst✝¹ : InnerProductSpace ℝ F'\ninst✝ : Fintype ι\nv : Basis ι 𝕜 E\nhv : Orthonormal 𝕜 ↑v\n⊢ ↑(Basis.toOrthonormalBasis v hv) = ↑(OrthonormalBasis.toBasis (Basis.toOrthonormalBasis v hv))\n[PROOFSTEP]\nrw [OrthonormalBasis.coe_toBasis]\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝⁹ : IsROrC 𝕜\nE : Type u_4\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁶ : NormedAddCommGroup E'\ninst✝⁵ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝² : NormedAddCommGroup F'\ninst✝¹ : InnerProductSpace ℝ F'\ninst✝ : Fintype ι\nv : Basis ι 𝕜 E\nhv : Orthonormal 𝕜 ↑v\n⊢ ↑(OrthonormalBasis.toBasis (Basis.toOrthonormalBasis v hv)) = ↑v\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝⁹ : IsROrC 𝕜\nE : Type u_4\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁶ : NormedAddCommGroup E'\ninst✝⁵ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝² : NormedAddCommGroup F'\ninst✝¹ : InnerProductSpace ℝ F'\ninst✝ : Fintype ι\nv : ι → E\nhon : Orthonormal 𝕜 v\nhsp : ⊤ ≤ span 𝕜 (range v)\n⊢ Orthonormal 𝕜 ↑(Basis.mk (_ : LinearIndependent 𝕜 v) hsp)\n[PROOFSTEP]\nrwa [Basis.coe_mk]\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝⁹ : IsROrC 𝕜\nE : Type u_4\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁶ : NormedAddCommGroup E'\ninst✝⁵ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝² : NormedAddCommGroup F'\ninst✝¹ : InnerProductSpace ℝ F'\ninst✝ : Fintype ι\nv : ι → E\nhon : Orthonormal 𝕜 v\nhsp : ⊤ ≤ span 𝕜 (range v)\n⊢ ↑(OrthonormalBasis.mk hon hsp) = v\n[PROOFSTEP]\nclassical rw [OrthonormalBasis.mk, _root_.Basis.coe_toOrthonormalBasis, Basis.coe_mk]\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝⁹ : IsROrC 𝕜\nE : Type u_4\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁶ : NormedAddCommGroup E'\ninst✝⁵ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝² : NormedAddCommGroup F'\ninst✝¹ : InnerProductSpace ℝ F'\ninst✝ : Fintype ι\nv : ι → E\nhon : Orthonormal 𝕜 v\nhsp : ⊤ ≤ span 𝕜 (range v)\n⊢ ↑(OrthonormalBasis.mk hon hsp) = v\n[PROOFSTEP]\nrw [OrthonormalBasis.mk, _root_.Basis.coe_toOrthonormalBasis, Basis.coe_mk]\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹⁰ : IsROrC 𝕜\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝³ : NormedAddCommGroup F'\ninst✝² : InnerProductSpace ℝ F'\ninst✝¹ : Fintype ι\nv : ι → E\ninst✝ : DecidableEq E\nv' : ι' → E\nh : Orthonormal 𝕜 v'\ns : Finset ι'\ne₀' : Basis { x // x ∈ s } 𝕜 { x // x ∈ span 𝕜 (range (v' ∘ Subtype.val)) } :=\n  Basis.span (_ : LinearIndependent 𝕜 (v' ∘ Subtype.val))\n⊢ Orthonormal 𝕜 ↑e₀'\n[PROOFSTEP]\nconvert orthonormal_span (h.comp ((↑) : s → ι') Subtype.val_injective)\n[GOAL]\ncase h.e'_7.h.h.e'_3\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹⁰ : IsROrC 𝕜\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝³ : NormedAddCommGroup F'\ninst✝² : InnerProductSpace ℝ F'\ninst✝¹ : Fintype ι\nv : ι → E\ninst✝ : DecidableEq E\nv' : ι' → E\nh : Orthonormal 𝕜 v'\ns : Finset ι'\ne₀' : Basis { x // x ∈ s } 𝕜 { x // x ∈ span 𝕜 (range (v' ∘ Subtype.val)) } :=\n  Basis.span (_ : LinearIndependent 𝕜 (v' ∘ Subtype.val))\nx✝ : { x // x ∈ s }\n⊢ ↑(↑e₀' x✝) = (v' ∘ Subtype.val) x✝\n[PROOFSTEP]\nsimp [Basis.span_apply]\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹⁰ : IsROrC 𝕜\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝³ : NormedAddCommGroup F'\ninst✝² : InnerProductSpace ℝ F'\ninst✝¹ : Fintype ι\nv : ι → E\ninst✝ : DecidableEq E\nv' : ι' → E\nh : Orthonormal 𝕜 v'\ns : Finset ι'\ne₀' : Basis { x // x ∈ s } 𝕜 { x // x ∈ span 𝕜 (range (v' ∘ Subtype.val)) } :=\n  Basis.span (_ : LinearIndependent 𝕜 (v' ∘ Subtype.val))\ne₀ : OrthonormalBasis { x // x ∈ s } 𝕜 { x // x ∈ span 𝕜 (range (v' ∘ Subtype.val)) } :=\n  OrthonormalBasis.mk (_ : Orthonormal 𝕜 ↑e₀') (_ : ⊤ ≤ span 𝕜 (range ↑e₀'))\n⊢ span 𝕜 ↑(Finset.image v' s) = span 𝕜 (range (v' ∘ Subtype.val))\n[PROOFSTEP]\nrw [Finset.coe_image, image_eq_range]\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹⁰ : IsROrC 𝕜\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝³ : NormedAddCommGroup F'\ninst✝² : InnerProductSpace ℝ F'\ninst✝¹ : Fintype ι\nv : ι → E\ninst✝ : DecidableEq E\nv' : ι' → E\nh : Orthonormal 𝕜 v'\ns : Finset ι'\ne₀' : Basis { x // x ∈ s } 𝕜 { x // x ∈ span 𝕜 (range (v' ∘ Subtype.val)) } :=\n  Basis.span (_ : LinearIndependent 𝕜 (v' ∘ Subtype.val))\ne₀ : OrthonormalBasis { x // x ∈ s } 𝕜 { x // x ∈ span 𝕜 (range (v' ∘ Subtype.val)) } :=\n  OrthonormalBasis.mk (_ : Orthonormal 𝕜 ↑e₀') (_ : ⊤ ≤ span 𝕜 (range ↑e₀'))\n⊢ span 𝕜 (range fun x => v' ↑x) = span 𝕜 (range (v' ∘ Subtype.val))\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹⁰ : IsROrC 𝕜\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝³ : NormedAddCommGroup F'\ninst✝² : InnerProductSpace ℝ F'\ninst✝¹ : Fintype ι\nv : ι → E\ninst✝ : DecidableEq E\nv' : ι' → E\nh : Orthonormal 𝕜 v'\ns : Finset ι'\ni : { x // x ∈ s }\n⊢ ↑(↑(OrthonormalBasis.span h s) i) = v' ↑i\n[PROOFSTEP]\nsimp only [OrthonormalBasis.span, Basis.span_apply, LinearIsometryEquiv.ofEq_symm, OrthonormalBasis.map_apply,\n  OrthonormalBasis.coe_mk, LinearIsometryEquiv.coe_ofEq_apply, comp_apply]\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝⁹ : IsROrC 𝕜\nE : Type u_4\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁶ : NormedAddCommGroup E'\ninst✝⁵ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝² : NormedAddCommGroup F'\ninst✝¹ : InnerProductSpace ℝ F'\ninst✝ : Fintype ι\nv : ι → E\nhon : Orthonormal 𝕜 v\nhsp : (span 𝕜 (range v))ᗮ = ⊥\n⊢ ⊤ ≤ span 𝕜 (range v)\n[PROOFSTEP]\nrefine' Eq.ge _\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝⁹ : IsROrC 𝕜\nE : Type u_4\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁶ : NormedAddCommGroup E'\ninst✝⁵ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝² : NormedAddCommGroup F'\ninst✝¹ : InnerProductSpace ℝ F'\ninst✝ : Fintype ι\nv : ι → E\nhon : Orthonormal 𝕜 v\nhsp : (span 𝕜 (range v))ᗮ = ⊥\n⊢ span 𝕜 (range v) = ⊤\n[PROOFSTEP]\nhaveI : FiniteDimensional 𝕜 (span 𝕜 (range v)) := FiniteDimensional.span_of_finite 𝕜 (finite_range v)\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝⁹ : IsROrC 𝕜\nE : Type u_4\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁶ : NormedAddCommGroup E'\ninst✝⁵ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝² : NormedAddCommGroup F'\ninst✝¹ : InnerProductSpace ℝ F'\ninst✝ : Fintype ι\nv : ι → E\nhon : Orthonormal 𝕜 v\nhsp : (span 𝕜 (range v))ᗮ = ⊥\nthis : FiniteDimensional 𝕜 { x // x ∈ span 𝕜 (range v) }\n⊢ span 𝕜 (range v) = ⊤\n[PROOFSTEP]\nhaveI : CompleteSpace (span 𝕜 (range v)) := FiniteDimensional.complete 𝕜 _\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝⁹ : IsROrC 𝕜\nE : Type u_4\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁶ : NormedAddCommGroup E'\ninst✝⁵ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝² : NormedAddCommGroup F'\ninst✝¹ : InnerProductSpace ℝ F'\ninst✝ : Fintype ι\nv : ι → E\nhon : Orthonormal 𝕜 v\nhsp : (span 𝕜 (range v))ᗮ = ⊥\nthis✝ : FiniteDimensional 𝕜 { x // x ∈ span 𝕜 (range v) }\nthis : CompleteSpace { x // x ∈ span 𝕜 (range v) }\n⊢ span 𝕜 (range v) = ⊤\n[PROOFSTEP]\nrwa [orthogonal_eq_bot_iff] at hsp \n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹⁰ : IsROrC 𝕜\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝³ : NormedAddCommGroup F'\ninst✝² : InnerProductSpace ℝ F'\ninst✝¹ : Fintype ι\nv : ι → E\ninst✝ : Fintype ι'\nb : OrthonormalBasis ι 𝕜 E\ne : ι ≃ ι'\ni' : ι'\n⊢ ↑(reindex b e) i' = ↑b (↑e.symm i')\n[PROOFSTEP]\nclassical\ndsimp [reindex]\nrw [coe_ofRepr]\ndsimp\nrw [← b.repr_symm_single, LinearIsometryEquiv.piLpCongrLeft_symm, EuclideanSpace.piLpCongrLeft_single]\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹⁰ : IsROrC 𝕜\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝³ : NormedAddCommGroup F'\ninst✝² : InnerProductSpace ℝ F'\ninst✝¹ : Fintype ι\nv : ι → E\ninst✝ : Fintype ι'\nb : OrthonormalBasis ι 𝕜 E\ne : ι ≃ ι'\ni' : ι'\n⊢ ↑(reindex b e) i' = ↑b (↑e.symm i')\n[PROOFSTEP]\ndsimp [reindex]\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹⁰ : IsROrC 𝕜\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝³ : NormedAddCommGroup F'\ninst✝² : InnerProductSpace ℝ F'\ninst✝¹ : Fintype ι\nv : ι → E\ninst✝ : Fintype ι'\nb : OrthonormalBasis ι 𝕜 E\ne : ι ≃ ι'\ni' : ι'\n⊢ ↑{ repr := LinearIsometryEquiv.trans b.repr (LinearIsometryEquiv.piLpCongrLeft 2 𝕜 𝕜 e) } i' = ↑b (↑e.symm i')\n[PROOFSTEP]\nrw [coe_ofRepr]\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹⁰ : IsROrC 𝕜\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝³ : NormedAddCommGroup F'\ninst✝² : InnerProductSpace ℝ F'\ninst✝¹ : Fintype ι\nv : ι → E\ninst✝ : Fintype ι'\nb : OrthonormalBasis ι 𝕜 E\ne : ι ≃ ι'\ni' : ι'\n⊢ (fun i =>\n        ↑(LinearIsometryEquiv.symm (LinearIsometryEquiv.trans b.repr (LinearIsometryEquiv.piLpCongrLeft 2 𝕜 𝕜 e)))\n          (EuclideanSpace.single i 1))\n      i' =\n    ↑b (↑e.symm i')\n[PROOFSTEP]\ndsimp\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹⁰ : IsROrC 𝕜\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝³ : NormedAddCommGroup F'\ninst✝² : InnerProductSpace ℝ F'\ninst✝¹ : Fintype ι\nv : ι → E\ninst✝ : Fintype ι'\nb : OrthonormalBasis ι 𝕜 E\ne : ι ≃ ι'\ni' : ι'\n⊢ ↑(LinearIsometryEquiv.symm b.repr)\n      (↑(LinearIsometryEquiv.symm (LinearIsometryEquiv.piLpCongrLeft 2 𝕜 𝕜 e)) (EuclideanSpace.single i' 1)) =\n    ↑b (↑e.symm i')\n[PROOFSTEP]\nrw [← b.repr_symm_single, LinearIsometryEquiv.piLpCongrLeft_symm, EuclideanSpace.piLpCongrLeft_single]\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹⁰ : IsROrC 𝕜\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝³ : NormedAddCommGroup F'\ninst✝² : InnerProductSpace ℝ F'\ninst✝¹ : Fintype ι\nv : ι → E\ninst✝ : Fintype ι'\nb : OrthonormalBasis ι 𝕜 E\ne : ι ≃ ι'\nx : E\ni' : ι'\n⊢ ↑(reindex b e).repr x i' = ↑b.repr x (↑e.symm i')\n[PROOFSTEP]\nclassical rw [OrthonormalBasis.repr_apply_apply, b.repr_apply_apply, OrthonormalBasis.coe_reindex, comp_apply]\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹⁰ : IsROrC 𝕜\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝³ : NormedAddCommGroup F'\ninst✝² : InnerProductSpace ℝ F'\ninst✝¹ : Fintype ι\nv : ι → E\ninst✝ : Fintype ι'\nb : OrthonormalBasis ι 𝕜 E\ne : ι ≃ ι'\nx : E\ni' : ι'\n⊢ ↑(reindex b e).repr x i' = ↑b.repr x (↑e.symm i')\n[PROOFSTEP]\nrw [OrthonormalBasis.repr_apply_apply, b.repr_apply_apply, OrthonormalBasis.coe_reindex, comp_apply]\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝⁹ : IsROrC 𝕜\nE : Type u_4\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁶ : NormedAddCommGroup E'\ninst✝⁵ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝² : NormedAddCommGroup F'\ninst✝¹ : InnerProductSpace ℝ F'\ninst✝ : Fintype ι\n⊢ Orthonormal ℝ ↑basisOneI\n[PROOFSTEP]\nrw [orthonormal_iff_ite]\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝⁹ : IsROrC 𝕜\nE : Type u_4\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁶ : NormedAddCommGroup E'\ninst✝⁵ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝² : NormedAddCommGroup F'\ninst✝¹ : InnerProductSpace ℝ F'\ninst✝ : Fintype ι\n⊢ ∀ (i j : Fin 2), inner (↑basisOneI i) (↑basisOneI j) = if i = j then 1 else 0\n[PROOFSTEP]\nintro i\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝⁹ : IsROrC 𝕜\nE : Type u_4\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁶ : NormedAddCommGroup E'\ninst✝⁵ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝² : NormedAddCommGroup F'\ninst✝¹ : InnerProductSpace ℝ F'\ninst✝ : Fintype ι\ni : Fin 2\n⊢ ∀ (j : Fin 2), inner (↑basisOneI i) (↑basisOneI j) = if i = j then 1 else 0\n[PROOFSTEP]\nfin_cases i\n[GOAL]\ncase head\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝⁹ : IsROrC 𝕜\nE : Type u_4\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁶ : NormedAddCommGroup E'\ninst✝⁵ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝² : NormedAddCommGroup F'\ninst✝¹ : InnerProductSpace ℝ F'\ninst✝ : Fintype ι\n⊢ ∀ (j : Fin 2),\n    inner (↑basisOneI { val := 0, isLt := (_ : 0 < 2) }) (↑basisOneI j) =\n      if { val := 0, isLt := (_ : 0 < 2) } = j then 1 else 0\n[PROOFSTEP]\nintro j\n[GOAL]\ncase tail.head\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝⁹ : IsROrC 𝕜\nE : Type u_4\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁶ : NormedAddCommGroup E'\ninst✝⁵ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝² : NormedAddCommGroup F'\ninst✝¹ : InnerProductSpace ℝ F'\ninst✝ : Fintype ι\n⊢ ∀ (j : Fin 2),\n    inner (↑basisOneI { val := 1, isLt := (_ : (fun a => a < 2) 1) }) (↑basisOneI j) =\n      if { val := 1, isLt := (_ : (fun a => a < 2) 1) } = j then 1 else 0\n[PROOFSTEP]\nintro j\n[GOAL]\ncase head\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝⁹ : IsROrC 𝕜\nE : Type u_4\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁶ : NormedAddCommGroup E'\ninst✝⁵ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝² : NormedAddCommGroup F'\ninst✝¹ : InnerProductSpace ℝ F'\ninst✝ : Fintype ι\nj : Fin 2\n⊢ inner (↑basisOneI { val := 0, isLt := (_ : 0 < 2) }) (↑basisOneI j) =\n    if { val := 0, isLt := (_ : 0 < 2) } = j then 1 else 0\n[PROOFSTEP]\nfin_cases j\n[GOAL]\ncase tail.head\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝⁹ : IsROrC 𝕜\nE : Type u_4\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁶ : NormedAddCommGroup E'\ninst✝⁵ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝² : NormedAddCommGroup F'\ninst✝¹ : InnerProductSpace ℝ F'\ninst✝ : Fintype ι\nj : Fin 2\n⊢ inner (↑basisOneI { val := 1, isLt := (_ : (fun a => a < 2) 1) }) (↑basisOneI j) =\n    if { val := 1, isLt := (_ : (fun a => a < 2) 1) } = j then 1 else 0\n[PROOFSTEP]\nfin_cases j\n[GOAL]\ncase head.head\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝⁹ : IsROrC 𝕜\nE : Type u_4\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁶ : NormedAddCommGroup E'\ninst✝⁵ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝² : NormedAddCommGroup F'\ninst✝¹ : InnerProductSpace ℝ F'\ninst✝ : Fintype ι\n⊢ inner (↑basisOneI { val := 0, isLt := (_ : 0 < 2) }) (↑basisOneI { val := 0, isLt := (_ : 0 < 2) }) =\n    if { val := 0, isLt := (_ : 0 < 2) } = { val := 0, isLt := (_ : 0 < 2) } then 1 else 0\n[PROOFSTEP]\nsimp [real_inner_eq_re_inner]\n[GOAL]\ncase head.tail.head\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝⁹ : IsROrC 𝕜\nE : Type u_4\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁶ : NormedAddCommGroup E'\ninst✝⁵ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝² : NormedAddCommGroup F'\ninst✝¹ : InnerProductSpace ℝ F'\ninst✝ : Fintype ι\n⊢ inner (↑basisOneI { val := 0, isLt := (_ : 0 < 2) }) (↑basisOneI { val := 1, isLt := (_ : (fun a => a < 2) 1) }) =\n    if { val := 0, isLt := (_ : 0 < 2) } = { val := 1, isLt := (_ : (fun a => a < 2) 1) } then 1 else 0\n[PROOFSTEP]\nsimp [real_inner_eq_re_inner]\n[GOAL]\ncase tail.head.head\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝⁹ : IsROrC 𝕜\nE : Type u_4\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁶ : NormedAddCommGroup E'\ninst✝⁵ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝² : NormedAddCommGroup F'\ninst✝¹ : InnerProductSpace ℝ F'\ninst✝ : Fintype ι\n⊢ inner (↑basisOneI { val := 1, isLt := (_ : (fun a => a < 2) 1) }) (↑basisOneI { val := 0, isLt := (_ : 0 < 2) }) =\n    if { val := 1, isLt := (_ : (fun a => a < 2) 1) } = { val := 0, isLt := (_ : 0 < 2) } then 1 else 0\n[PROOFSTEP]\nsimp [real_inner_eq_re_inner]\n[GOAL]\ncase tail.head.tail.head\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝⁹ : IsROrC 𝕜\nE : Type u_4\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁶ : NormedAddCommGroup E'\ninst✝⁵ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝² : NormedAddCommGroup F'\ninst✝¹ : InnerProductSpace ℝ F'\ninst✝ : Fintype ι\n⊢ inner (↑basisOneI { val := 1, isLt := (_ : (fun a => a < 2) 1) })\n      (↑basisOneI { val := 1, isLt := (_ : (fun a => a < 2) 1) }) =\n    if { val := 1, isLt := (_ : (fun a => a < 2) 1) } = { val := 1, isLt := (_ : (fun a => a < 2) 1) } then 1 else 0\n[PROOFSTEP]\nsimp [real_inner_eq_re_inner]\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝⁹ : IsROrC 𝕜\nE : Type u_4\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁶ : NormedAddCommGroup E'\ninst✝⁵ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝² : NormedAddCommGroup F'\ninst✝¹ : InnerProductSpace ℝ F'\ninst✝ : Fintype ι\n⊢ ↑orthonormalBasisOneI = ![1, I]\n[PROOFSTEP]\nsimp [Complex.orthonormalBasisOneI]\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝⁹ : IsROrC 𝕜\nE : Type u_4\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁶ : NormedAddCommGroup E'\ninst✝⁵ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝² : NormedAddCommGroup F'\ninst✝¹ : InnerProductSpace ℝ F'\ninst✝ : Fintype ι\nv : OrthonormalBasis (Fin 2) ℝ F\nf : F ≃ₗᵢ[ℝ] F'\n⊢ isometryOfOrthonormal (OrthonormalBasis.map v f) = LinearIsometryEquiv.trans (isometryOfOrthonormal v) f\n[PROOFSTEP]\nsimp [Complex.isometryOfOrthonormal, LinearIsometryEquiv.trans_assoc, OrthonormalBasis.map]\n  -- Porting note: `LinearIsometryEquiv.trans_assoc` doesn't trigger in the `simp` above\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝⁹ : IsROrC 𝕜\nE : Type u_4\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁶ : NormedAddCommGroup E'\ninst✝⁵ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝² : NormedAddCommGroup F'\ninst✝¹ : InnerProductSpace ℝ F'\ninst✝ : Fintype ι\nv : OrthonormalBasis (Fin 2) ℝ F\nf : F ≃ₗᵢ[ℝ] F'\n⊢ LinearIsometryEquiv.trans orthonormalBasisOneI.repr (LinearIsometryEquiv.trans (LinearIsometryEquiv.symm v.repr) f) =\n    LinearIsometryEquiv.trans (LinearIsometryEquiv.trans orthonormalBasisOneI.repr (LinearIsometryEquiv.symm v.repr)) f\n[PROOFSTEP]\nrw [LinearIsometryEquiv.trans_assoc]\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝⁹ : IsROrC 𝕜\nE : Type u_4\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁶ : NormedAddCommGroup E'\ninst✝⁵ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝² : NormedAddCommGroup F'\ninst✝¹ : InnerProductSpace ℝ F'\ninst✝ : Fintype ι\nv : OrthonormalBasis (Fin 2) ℝ F\nf : F\n⊢ ↑(LinearIsometryEquiv.symm (isometryOfOrthonormal v)) f =\n    ↑(↑(Basis.coord (OrthonormalBasis.toBasis v) 0) f) + ↑(↑(Basis.coord (OrthonormalBasis.toBasis v) 1) f) * I\n[PROOFSTEP]\nsimp [Complex.isometryOfOrthonormal]\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝⁹ : IsROrC 𝕜\nE : Type u_4\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁶ : NormedAddCommGroup E'\ninst✝⁵ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝² : NormedAddCommGroup F'\ninst✝¹ : InnerProductSpace ℝ F'\ninst✝ : Fintype ι\nv : OrthonormalBasis (Fin 2) ℝ F\nz : ℂ\n⊢ ↑(isometryOfOrthonormal v) z = z.re • ↑v 0 + z.im • ↑v 1\n[PROOFSTEP]\nrw [Complex.isometryOfOrthonormal, LinearIsometryEquiv.trans_apply]\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝⁹ : IsROrC 𝕜\nE : Type u_4\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁶ : NormedAddCommGroup E'\ninst✝⁵ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝² : NormedAddCommGroup F'\ninst✝¹ : InnerProductSpace ℝ F'\ninst✝ : Fintype ι\nv : OrthonormalBasis (Fin 2) ℝ F\nz : ℂ\n⊢ ↑(LinearIsometryEquiv.symm v.repr) (↑orthonormalBasisOneI.repr z) = z.re • ↑v 0 + z.im • ↑v 1\n[PROOFSTEP]\nsimp [← v.sum_repr_symm]\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹⁰ : IsROrC 𝕜\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝³ : NormedAddCommGroup F'\ninst✝² : InnerProductSpace ℝ F'\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\na b : OrthonormalBasis ι 𝕜 E\n⊢ Basis.toMatrix (OrthonormalBasis.toBasis a) ↑b ∈ Matrix.unitaryGroup ι 𝕜\n[PROOFSTEP]\nrw [Matrix.mem_unitaryGroup_iff']\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹⁰ : IsROrC 𝕜\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝³ : NormedAddCommGroup F'\ninst✝² : InnerProductSpace ℝ F'\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\na b : OrthonormalBasis ι 𝕜 E\n⊢ star (Basis.toMatrix (OrthonormalBasis.toBasis a) ↑b) * Basis.toMatrix (OrthonormalBasis.toBasis a) ↑b = 1\n[PROOFSTEP]\next i j\n[GOAL]\ncase a.h\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹⁰ : IsROrC 𝕜\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝³ : NormedAddCommGroup F'\ninst✝² : InnerProductSpace ℝ F'\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\na b : OrthonormalBasis ι 𝕜 E\ni j : ι\n⊢ (star (Basis.toMatrix (OrthonormalBasis.toBasis a) ↑b) * Basis.toMatrix (OrthonormalBasis.toBasis a) ↑b) i j =\n    OfNat.ofNat 1 i j\n[PROOFSTEP]\nconvert a.repr.inner_map_map (b i) (b j)\n[GOAL]\ncase h.e'_3\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹⁰ : IsROrC 𝕜\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝³ : NormedAddCommGroup F'\ninst✝² : InnerProductSpace ℝ F'\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\na b : OrthonormalBasis ι 𝕜 E\ni j : ι\n⊢ OfNat.ofNat 1 i j = inner (↑b i) (↑b j)\n[PROOFSTEP]\nrw [orthonormal_iff_ite.mp b.orthonormal i j]\n[GOAL]\ncase h.e'_3\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹⁰ : IsROrC 𝕜\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝³ : NormedAddCommGroup F'\ninst✝² : InnerProductSpace ℝ F'\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\na b : OrthonormalBasis ι 𝕜 E\ni j : ι\n⊢ OfNat.ofNat 1 i j = if i = j then 1 else 0\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹⁰ : IsROrC 𝕜\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝³ : NormedAddCommGroup F'\ninst✝² : InnerProductSpace ℝ F'\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\na b : OrthonormalBasis ι 𝕜 E\n⊢ ‖↑(Basis.det (OrthonormalBasis.toBasis a)) ↑b‖ = 1\n[PROOFSTEP]\nhave : (normSq (a.toBasis.det b) : 𝕜) = 1 := by\n  simpa [IsROrC.mul_conj] using (Matrix.det_of_mem_unitary (a.toMatrix_orthonormalBasis_mem_unitary b)).2\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹⁰ : IsROrC 𝕜\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝³ : NormedAddCommGroup F'\ninst✝² : InnerProductSpace ℝ F'\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\na b : OrthonormalBasis ι 𝕜 E\n⊢ ↑(↑normSq (↑(Basis.det (OrthonormalBasis.toBasis a)) ↑b)) = 1\n[PROOFSTEP]\nsimpa [IsROrC.mul_conj] using (Matrix.det_of_mem_unitary (a.toMatrix_orthonormalBasis_mem_unitary b)).2\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹⁰ : IsROrC 𝕜\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝³ : NormedAddCommGroup F'\ninst✝² : InnerProductSpace ℝ F'\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\na b : OrthonormalBasis ι 𝕜 E\nthis : ↑(↑normSq (↑(Basis.det (OrthonormalBasis.toBasis a)) ↑b)) = 1\n⊢ ‖↑(Basis.det (OrthonormalBasis.toBasis a)) ↑b‖ = 1\n[PROOFSTEP]\nnorm_cast at this \n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹⁰ : IsROrC 𝕜\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝³ : NormedAddCommGroup F'\ninst✝² : InnerProductSpace ℝ F'\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\na b : OrthonormalBasis ι 𝕜 E\nthis : ↑normSq (↑(Basis.det (OrthonormalBasis.toBasis a)) ↑b) = 1\n⊢ ‖↑(Basis.det (OrthonormalBasis.toBasis a)) ↑b‖ = 1\n[PROOFSTEP]\nrwa [← sqrt_normSq_eq_norm, sqrt_eq_one]\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹⁰ : IsROrC 𝕜\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝³ : NormedAddCommGroup F'\ninst✝² : InnerProductSpace ℝ F'\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\na b : OrthonormalBasis ι ℝ F\n⊢ ↑(Basis.det (OrthonormalBasis.toBasis a)) ↑b = 1 ∨ ↑(Basis.det (OrthonormalBasis.toBasis a)) ↑b = -1\n[PROOFSTEP]\nrw [← sq_eq_one_iff]\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹⁰ : IsROrC 𝕜\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝³ : NormedAddCommGroup F'\ninst✝² : InnerProductSpace ℝ F'\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\na b : OrthonormalBasis ι ℝ F\n⊢ ↑(Basis.det (OrthonormalBasis.toBasis a)) ↑b ^ 2 = 1\n[PROOFSTEP]\nsimpa [unitary, sq] using Matrix.det_of_mem_unitary (a.toMatrix_orthonormalBasis_mem_unitary b)\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹¹ : IsROrC 𝕜\nE : Type u_4\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁸ : NormedAddCommGroup E'\ninst✝⁷ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝⁴ : NormedAddCommGroup F'\ninst✝³ : InnerProductSpace ℝ F'\ninst✝² : Fintype ι\nv : Set E\nA : ι → Submodule 𝕜 E\nhV : OrthogonalFamily 𝕜 (fun i => { x // x ∈ A i }) fun i => subtypeₗᵢ (A i)\ninst✝¹ : DecidableEq ι\nhV_sum : IsInternal fun i => A i\nα : ι → Type u_8\ninst✝ : (i : ι) → Fintype (α i)\nv_family : (i : ι) → OrthonormalBasis (α i) 𝕜 { x // x ∈ A i }\n⊢ Orthonormal 𝕜 ↑(collectedBasis hV_sum fun i => OrthonormalBasis.toBasis (v_family i))\n[PROOFSTEP]\nsimpa using hV.orthonormal_sigma_orthonormal (show ∀ i, Orthonormal 𝕜 (v_family i).toBasis by simp)\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹¹ : IsROrC 𝕜\nE : Type u_4\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁸ : NormedAddCommGroup E'\ninst✝⁷ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝⁴ : NormedAddCommGroup F'\ninst✝³ : InnerProductSpace ℝ F'\ninst✝² : Fintype ι\nv : Set E\nA : ι → Submodule 𝕜 E\nhV : OrthogonalFamily 𝕜 (fun i => { x // x ∈ A i }) fun i => subtypeₗᵢ (A i)\ninst✝¹ : DecidableEq ι\nhV_sum : IsInternal fun i => A i\nα : ι → Type u_8\ninst✝ : (i : ι) → Fintype (α i)\nv_family : (i : ι) → OrthonormalBasis (α i) 𝕜 { x // x ∈ A i }\n⊢ ∀ (i : ι), Orthonormal 𝕜 ↑(OrthonormalBasis.toBasis (v_family i))\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹¹ : IsROrC 𝕜\nE : Type u_4\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁸ : NormedAddCommGroup E'\ninst✝⁷ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝⁴ : NormedAddCommGroup F'\ninst✝³ : InnerProductSpace ℝ F'\ninst✝² : Fintype ι\nv✝ : Set E\nA : ι → Submodule 𝕜 E\ninst✝¹ : DecidableEq ι\nh : IsInternal A\nα : ι → Type u_8\ninst✝ : (i : ι) → Fintype (α i)\nhV : OrthogonalFamily 𝕜 (fun i => { x // x ∈ A i }) fun i => subtypeₗᵢ (A i)\nv : (i : ι) → OrthonormalBasis (α i) 𝕜 { x // x ∈ A i }\na : (i : ι) × α i\n⊢ ↑(collectedOrthonormalBasis hV h v) a ∈ A a.fst\n[PROOFSTEP]\nsimp [DirectSum.IsInternal.collectedOrthonormalBasis]\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹⁰ : IsROrC 𝕜\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝³ : NormedAddCommGroup F'\ninst✝² : InnerProductSpace ℝ F'\ninst✝¹ : Fintype ι\nv : Set E\nA : ι → Submodule 𝕜 E\ninst✝ : FiniteDimensional 𝕜 E\nhv : Orthonormal 𝕜 Subtype.val\n⊢ ∃ u b, v ⊆ ↑u ∧ ↑b = Subtype.val\n[PROOFSTEP]\nobtain ⟨u₀, hu₀s, hu₀, hu₀_max⟩ := exists_maximal_orthonormal hv\n[GOAL]\ncase intro.intro.intro\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹⁰ : IsROrC 𝕜\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝³ : NormedAddCommGroup F'\ninst✝² : InnerProductSpace ℝ F'\ninst✝¹ : Fintype ι\nv : Set E\nA : ι → Submodule 𝕜 E\ninst✝ : FiniteDimensional 𝕜 E\nhv : Orthonormal 𝕜 Subtype.val\nu₀ : Set E\nhu₀s : u₀ ⊇ v\nhu₀ : Orthonormal 𝕜 Subtype.val\nhu₀_max : ∀ (u : Set E), u ⊇ u₀ → Orthonormal 𝕜 Subtype.val → u = u₀\n⊢ ∃ u b, v ⊆ ↑u ∧ ↑b = Subtype.val\n[PROOFSTEP]\nrw [maximal_orthonormal_iff_orthogonalComplement_eq_bot hu₀] at hu₀_max \n[GOAL]\ncase intro.intro.intro\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹⁰ : IsROrC 𝕜\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝³ : NormedAddCommGroup F'\ninst✝² : InnerProductSpace ℝ F'\ninst✝¹ : Fintype ι\nv : Set E\nA : ι → Submodule 𝕜 E\ninst✝ : FiniteDimensional 𝕜 E\nhv : Orthonormal 𝕜 Subtype.val\nu₀ : Set E\nhu₀s : u₀ ⊇ v\nhu₀ : Orthonormal 𝕜 Subtype.val\nhu₀_max : (span 𝕜 u₀)ᗮ = ⊥\n⊢ ∃ u b, v ⊆ ↑u ∧ ↑b = Subtype.val\n[PROOFSTEP]\nhave hu₀_finite : u₀.Finite := hu₀.linearIndependent.finite\n[GOAL]\ncase intro.intro.intro\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹⁰ : IsROrC 𝕜\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝³ : NormedAddCommGroup F'\ninst✝² : InnerProductSpace ℝ F'\ninst✝¹ : Fintype ι\nv : Set E\nA : ι → Submodule 𝕜 E\ninst✝ : FiniteDimensional 𝕜 E\nhv : Orthonormal 𝕜 Subtype.val\nu₀ : Set E\nhu₀s : u₀ ⊇ v\nhu₀ : Orthonormal 𝕜 Subtype.val\nhu₀_max : (span 𝕜 u₀)ᗮ = ⊥\nhu₀_finite : Set.Finite u₀\n⊢ ∃ u b, v ⊆ ↑u ∧ ↑b = Subtype.val\n[PROOFSTEP]\nlet u : Finset E := hu₀_finite.toFinset\n[GOAL]\ncase intro.intro.intro\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹⁰ : IsROrC 𝕜\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝³ : NormedAddCommGroup F'\ninst✝² : InnerProductSpace ℝ F'\ninst✝¹ : Fintype ι\nv : Set E\nA : ι → Submodule 𝕜 E\ninst✝ : FiniteDimensional 𝕜 E\nhv : Orthonormal 𝕜 Subtype.val\nu₀ : Set E\nhu₀s : u₀ ⊇ v\nhu₀ : Orthonormal 𝕜 Subtype.val\nhu₀_max : (span 𝕜 u₀)ᗮ = ⊥\nhu₀_finite : Set.Finite u₀\nu : Finset E := Finite.toFinset hu₀_finite\n⊢ ∃ u b, v ⊆ ↑u ∧ ↑b = Subtype.val\n[PROOFSTEP]\nlet fu : ↥u ≃ ↥u₀ := Equiv.cast (congr_arg (↥) hu₀_finite.coe_toFinset)\n[GOAL]\ncase intro.intro.intro\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹⁰ : IsROrC 𝕜\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝³ : NormedAddCommGroup F'\ninst✝² : InnerProductSpace ℝ F'\ninst✝¹ : Fintype ι\nv : Set E\nA : ι → Submodule 𝕜 E\ninst✝ : FiniteDimensional 𝕜 E\nhv : Orthonormal 𝕜 Subtype.val\nu₀ : Set E\nhu₀s : u₀ ⊇ v\nhu₀ : Orthonormal 𝕜 Subtype.val\nhu₀_max : (span 𝕜 u₀)ᗮ = ⊥\nhu₀_finite : Set.Finite u₀\nu : Finset E := Finite.toFinset hu₀_finite\nfu : { x // x ∈ u } ≃ ↑u₀ := Equiv.cast (_ : ↑↑(Finite.toFinset hu₀_finite) = ↑u₀)\n⊢ ∃ u b, v ⊆ ↑u ∧ ↑b = Subtype.val\n[PROOFSTEP]\nhave hfu : ((↑) : u → E) = ((↑) : u₀ → E) ∘ fu := by ext; simp\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹⁰ : IsROrC 𝕜\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝³ : NormedAddCommGroup F'\ninst✝² : InnerProductSpace ℝ F'\ninst✝¹ : Fintype ι\nv : Set E\nA : ι → Submodule 𝕜 E\ninst✝ : FiniteDimensional 𝕜 E\nhv : Orthonormal 𝕜 Subtype.val\nu₀ : Set E\nhu₀s : u₀ ⊇ v\nhu₀ : Orthonormal 𝕜 Subtype.val\nhu₀_max : (span 𝕜 u₀)ᗮ = ⊥\nhu₀_finite : Set.Finite u₀\nu : Finset E := Finite.toFinset hu₀_finite\nfu : { x // x ∈ u } ≃ ↑u₀ := Equiv.cast (_ : ↑↑(Finite.toFinset hu₀_finite) = ↑u₀)\n⊢ Subtype.val = Subtype.val ∘ ↑fu\n[PROOFSTEP]\next\n[GOAL]\ncase h\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹⁰ : IsROrC 𝕜\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝³ : NormedAddCommGroup F'\ninst✝² : InnerProductSpace ℝ F'\ninst✝¹ : Fintype ι\nv : Set E\nA : ι → Submodule 𝕜 E\ninst✝ : FiniteDimensional 𝕜 E\nhv : Orthonormal 𝕜 Subtype.val\nu₀ : Set E\nhu₀s : u₀ ⊇ v\nhu₀ : Orthonormal 𝕜 Subtype.val\nhu₀_max : (span 𝕜 u₀)ᗮ = ⊥\nhu₀_finite : Set.Finite u₀\nu : Finset E := Finite.toFinset hu₀_finite\nfu : { x // x ∈ u } ≃ ↑u₀ := Equiv.cast (_ : ↑↑(Finite.toFinset hu₀_finite) = ↑u₀)\nx✝ : { x // x ∈ u }\n⊢ ↑x✝ = (Subtype.val ∘ ↑fu) x✝\n[PROOFSTEP]\nsimp\n[GOAL]\ncase intro.intro.intro\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹⁰ : IsROrC 𝕜\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝³ : NormedAddCommGroup F'\ninst✝² : InnerProductSpace ℝ F'\ninst✝¹ : Fintype ι\nv : Set E\nA : ι → Submodule 𝕜 E\ninst✝ : FiniteDimensional 𝕜 E\nhv : Orthonormal 𝕜 Subtype.val\nu₀ : Set E\nhu₀s : u₀ ⊇ v\nhu₀ : Orthonormal 𝕜 Subtype.val\nhu₀_max : (span 𝕜 u₀)ᗮ = ⊥\nhu₀_finite : Set.Finite u₀\nu : Finset E := Finite.toFinset hu₀_finite\nfu : { x // x ∈ u } ≃ ↑u₀ := Equiv.cast (_ : ↑↑(Finite.toFinset hu₀_finite) = ↑u₀)\nhfu : Subtype.val = Subtype.val ∘ ↑fu\n⊢ ∃ u b, v ⊆ ↑u ∧ ↑b = Subtype.val\n[PROOFSTEP]\nhave hu : Orthonormal 𝕜 ((↑) : u → E) := by simpa [hfu] using hu₀.comp _ fu.injective\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹⁰ : IsROrC 𝕜\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝³ : NormedAddCommGroup F'\ninst✝² : InnerProductSpace ℝ F'\ninst✝¹ : Fintype ι\nv : Set E\nA : ι → Submodule 𝕜 E\ninst✝ : FiniteDimensional 𝕜 E\nhv : Orthonormal 𝕜 Subtype.val\nu₀ : Set E\nhu₀s : u₀ ⊇ v\nhu₀ : Orthonormal 𝕜 Subtype.val\nhu₀_max : (span 𝕜 u₀)ᗮ = ⊥\nhu₀_finite : Set.Finite u₀\nu : Finset E := Finite.toFinset hu₀_finite\nfu : { x // x ∈ u } ≃ ↑u₀ := Equiv.cast (_ : ↑↑(Finite.toFinset hu₀_finite) = ↑u₀)\nhfu : Subtype.val = Subtype.val ∘ ↑fu\n⊢ Orthonormal 𝕜 Subtype.val\n[PROOFSTEP]\nsimpa [hfu] using hu₀.comp _ fu.injective\n[GOAL]\ncase intro.intro.intro\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹⁰ : IsROrC 𝕜\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝³ : NormedAddCommGroup F'\ninst✝² : InnerProductSpace ℝ F'\ninst✝¹ : Fintype ι\nv : Set E\nA : ι → Submodule 𝕜 E\ninst✝ : FiniteDimensional 𝕜 E\nhv : Orthonormal 𝕜 Subtype.val\nu₀ : Set E\nhu₀s : u₀ ⊇ v\nhu₀ : Orthonormal 𝕜 Subtype.val\nhu₀_max : (span 𝕜 u₀)ᗮ = ⊥\nhu₀_finite : Set.Finite u₀\nu : Finset E := Finite.toFinset hu₀_finite\nfu : { x // x ∈ u } ≃ ↑u₀ := Equiv.cast (_ : ↑↑(Finite.toFinset hu₀_finite) = ↑u₀)\nhfu : Subtype.val = Subtype.val ∘ ↑fu\nhu : Orthonormal 𝕜 Subtype.val\n⊢ ∃ u b, v ⊆ ↑u ∧ ↑b = Subtype.val\n[PROOFSTEP]\nrefine' ⟨u, OrthonormalBasis.mkOfOrthogonalEqBot hu _, _, _⟩\n[GOAL]\ncase intro.intro.intro.refine'_1\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹⁰ : IsROrC 𝕜\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝³ : NormedAddCommGroup F'\ninst✝² : InnerProductSpace ℝ F'\ninst✝¹ : Fintype ι\nv : Set E\nA : ι → Submodule 𝕜 E\ninst✝ : FiniteDimensional 𝕜 E\nhv : Orthonormal 𝕜 Subtype.val\nu₀ : Set E\nhu₀s : u₀ ⊇ v\nhu₀ : Orthonormal 𝕜 Subtype.val\nhu₀_max : (span 𝕜 u₀)ᗮ = ⊥\nhu₀_finite : Set.Finite u₀\nu : Finset E := Finite.toFinset hu₀_finite\nfu : { x // x ∈ u } ≃ ↑u₀ := Equiv.cast (_ : ↑↑(Finite.toFinset hu₀_finite) = ↑u₀)\nhfu : Subtype.val = Subtype.val ∘ ↑fu\nhu : Orthonormal 𝕜 Subtype.val\n⊢ (span 𝕜 (range Subtype.val))ᗮ = ⊥\n[PROOFSTEP]\nsimpa using hu₀_max\n[GOAL]\ncase intro.intro.intro.refine'_2\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹⁰ : IsROrC 𝕜\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝³ : NormedAddCommGroup F'\ninst✝² : InnerProductSpace ℝ F'\ninst✝¹ : Fintype ι\nv : Set E\nA : ι → Submodule 𝕜 E\ninst✝ : FiniteDimensional 𝕜 E\nhv : Orthonormal 𝕜 Subtype.val\nu₀ : Set E\nhu₀s : u₀ ⊇ v\nhu₀ : Orthonormal 𝕜 Subtype.val\nhu₀_max : (span 𝕜 u₀)ᗮ = ⊥\nhu₀_finite : Set.Finite u₀\nu : Finset E := Finite.toFinset hu₀_finite\nfu : { x // x ∈ u } ≃ ↑u₀ := Equiv.cast (_ : ↑↑(Finite.toFinset hu₀_finite) = ↑u₀)\nhfu : Subtype.val = Subtype.val ∘ ↑fu\nhu : Orthonormal 𝕜 Subtype.val\n⊢ v ⊆ ↑u\n[PROOFSTEP]\nsimpa using hu₀s\n[GOAL]\ncase intro.intro.intro.refine'_3\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹⁰ : IsROrC 𝕜\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝³ : NormedAddCommGroup F'\ninst✝² : InnerProductSpace ℝ F'\ninst✝¹ : Fintype ι\nv : Set E\nA : ι → Submodule 𝕜 E\ninst✝ : FiniteDimensional 𝕜 E\nhv : Orthonormal 𝕜 Subtype.val\nu₀ : Set E\nhu₀s : u₀ ⊇ v\nhu₀ : Orthonormal 𝕜 Subtype.val\nhu₀_max : (span 𝕜 u₀)ᗮ = ⊥\nhu₀_finite : Set.Finite u₀\nu : Finset E := Finite.toFinset hu₀_finite\nfu : { x // x ∈ u } ≃ ↑u₀ := Equiv.cast (_ : ↑↑(Finite.toFinset hu₀_finite) = ↑u₀)\nhfu : Subtype.val = Subtype.val ∘ ↑fu\nhu : Orthonormal 𝕜 Subtype.val\n⊢ ↑(OrthonormalBasis.mkOfOrthogonalEqBot hu (_ : (span 𝕜 (range Subtype.val))ᗮ = ⊥)) = Subtype.val\n[PROOFSTEP]\nsimp\n[GOAL]\nι✝ : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹¹ : IsROrC 𝕜\nE : Type u_4\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁸ : NormedAddCommGroup E'\ninst✝⁷ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝⁴ : NormedAddCommGroup F'\ninst✝³ : InnerProductSpace ℝ F'\ninst✝² : Fintype ι✝\nv✝ : Set E\nA : ι✝ → Submodule 𝕜 E\ninst✝¹ : FiniteDimensional 𝕜 E\nι : Type u_8\ninst✝ : Fintype ι\ncard_ι : finrank 𝕜 E = Fintype.card ι\nv : ι → E\ns : Set ι\nhv : Orthonormal 𝕜 (restrict s v)\n⊢ ∃ b, ∀ (i : ι), i ∈ s → ↑b i = v i\n[PROOFSTEP]\nhave hsv : Injective (s.restrict v) := hv.linearIndependent.injective\n[GOAL]\nι✝ : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹¹ : IsROrC 𝕜\nE : Type u_4\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁸ : NormedAddCommGroup E'\ninst✝⁷ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝⁴ : NormedAddCommGroup F'\ninst✝³ : InnerProductSpace ℝ F'\ninst✝² : Fintype ι✝\nv✝ : Set E\nA : ι✝ → Submodule 𝕜 E\ninst✝¹ : FiniteDimensional 𝕜 E\nι : Type u_8\ninst✝ : Fintype ι\ncard_ι : finrank 𝕜 E = Fintype.card ι\nv : ι → E\ns : Set ι\nhv : Orthonormal 𝕜 (restrict s v)\nhsv : Injective (restrict s v)\n⊢ ∃ b, ∀ (i : ι), i ∈ s → ↑b i = v i\n[PROOFSTEP]\nhave hX : Orthonormal 𝕜 ((↑) : Set.range (s.restrict v) → E) := by rwa [orthonormal_subtype_range hsv]\n[GOAL]\nι✝ : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹¹ : IsROrC 𝕜\nE : Type u_4\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁸ : NormedAddCommGroup E'\ninst✝⁷ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝⁴ : NormedAddCommGroup F'\ninst✝³ : InnerProductSpace ℝ F'\ninst✝² : Fintype ι✝\nv✝ : Set E\nA : ι✝ → Submodule 𝕜 E\ninst✝¹ : FiniteDimensional 𝕜 E\nι : Type u_8\ninst✝ : Fintype ι\ncard_ι : finrank 𝕜 E = Fintype.card ι\nv : ι → E\ns : Set ι\nhv : Orthonormal 𝕜 (restrict s v)\nhsv : Injective (restrict s v)\n⊢ Orthonormal 𝕜 Subtype.val\n[PROOFSTEP]\nrwa [orthonormal_subtype_range hsv]\n[GOAL]\nι✝ : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹¹ : IsROrC 𝕜\nE : Type u_4\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁸ : NormedAddCommGroup E'\ninst✝⁷ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝⁴ : NormedAddCommGroup F'\ninst✝³ : InnerProductSpace ℝ F'\ninst✝² : Fintype ι✝\nv✝ : Set E\nA : ι✝ → Submodule 𝕜 E\ninst✝¹ : FiniteDimensional 𝕜 E\nι : Type u_8\ninst✝ : Fintype ι\ncard_ι : finrank 𝕜 E = Fintype.card ι\nv : ι → E\ns : Set ι\nhv : Orthonormal 𝕜 (restrict s v)\nhsv : Injective (restrict s v)\nhX : Orthonormal 𝕜 Subtype.val\n⊢ ∃ b, ∀ (i : ι), i ∈ s → ↑b i = v i\n[PROOFSTEP]\nobtain ⟨Y, b₀, hX, hb₀⟩ := hX.exists_orthonormalBasis_extension\n[GOAL]\ncase intro.intro.intro\nι✝ : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹¹ : IsROrC 𝕜\nE : Type u_4\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁸ : NormedAddCommGroup E'\ninst✝⁷ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝⁴ : NormedAddCommGroup F'\ninst✝³ : InnerProductSpace ℝ F'\ninst✝² : Fintype ι✝\nv✝ : Set E\nA : ι✝ → Submodule 𝕜 E\ninst✝¹ : FiniteDimensional 𝕜 E\nι : Type u_8\ninst✝ : Fintype ι\ncard_ι : finrank 𝕜 E = Fintype.card ι\nv : ι → E\ns : Set ι\nhv : Orthonormal 𝕜 (restrict s v)\nhsv : Injective (restrict s v)\nhX✝ : Orthonormal 𝕜 Subtype.val\nY : Finset E\nb₀ : OrthonormalBasis { x // x ∈ Y } 𝕜 E\nhX : range (restrict s v) ⊆ ↑Y\nhb₀ : ↑b₀ = Subtype.val\n⊢ ∃ b, ∀ (i : ι), i ∈ s → ↑b i = v i\n[PROOFSTEP]\nhave hιY : Fintype.card ι = Y.card := by\n  refine' card_ι.symm.trans _\n  exact FiniteDimensional.finrank_eq_card_finset_basis b₀.toBasis\n[GOAL]\nι✝ : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹¹ : IsROrC 𝕜\nE : Type u_4\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁸ : NormedAddCommGroup E'\ninst✝⁷ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝⁴ : NormedAddCommGroup F'\ninst✝³ : InnerProductSpace ℝ F'\ninst✝² : Fintype ι✝\nv✝ : Set E\nA : ι✝ → Submodule 𝕜 E\ninst✝¹ : FiniteDimensional 𝕜 E\nι : Type u_8\ninst✝ : Fintype ι\ncard_ι : finrank 𝕜 E = Fintype.card ι\nv : ι → E\ns : Set ι\nhv : Orthonormal 𝕜 (restrict s v)\nhsv : Injective (restrict s v)\nhX✝ : Orthonormal 𝕜 Subtype.val\nY : Finset E\nb₀ : OrthonormalBasis { x // x ∈ Y } 𝕜 E\nhX : range (restrict s v) ⊆ ↑Y\nhb₀ : ↑b₀ = Subtype.val\n⊢ Fintype.card ι = Finset.card Y\n[PROOFSTEP]\nrefine' card_ι.symm.trans _\n[GOAL]\nι✝ : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹¹ : IsROrC 𝕜\nE : Type u_4\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁸ : NormedAddCommGroup E'\ninst✝⁷ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝⁴ : NormedAddCommGroup F'\ninst✝³ : InnerProductSpace ℝ F'\ninst✝² : Fintype ι✝\nv✝ : Set E\nA : ι✝ → Submodule 𝕜 E\ninst✝¹ : FiniteDimensional 𝕜 E\nι : Type u_8\ninst✝ : Fintype ι\ncard_ι : finrank 𝕜 E = Fintype.card ι\nv : ι → E\ns : Set ι\nhv : Orthonormal 𝕜 (restrict s v)\nhsv : Injective (restrict s v)\nhX✝ : Orthonormal 𝕜 Subtype.val\nY : Finset E\nb₀ : OrthonormalBasis { x // x ∈ Y } 𝕜 E\nhX : range (restrict s v) ⊆ ↑Y\nhb₀ : ↑b₀ = Subtype.val\n⊢ finrank 𝕜 E = Finset.card Y\n[PROOFSTEP]\nexact FiniteDimensional.finrank_eq_card_finset_basis b₀.toBasis\n[GOAL]\ncase intro.intro.intro\nι✝ : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹¹ : IsROrC 𝕜\nE : Type u_4\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁸ : NormedAddCommGroup E'\ninst✝⁷ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝⁴ : NormedAddCommGroup F'\ninst✝³ : InnerProductSpace ℝ F'\ninst✝² : Fintype ι✝\nv✝ : Set E\nA : ι✝ → Submodule 𝕜 E\ninst✝¹ : FiniteDimensional 𝕜 E\nι : Type u_8\ninst✝ : Fintype ι\ncard_ι : finrank 𝕜 E = Fintype.card ι\nv : ι → E\ns : Set ι\nhv : Orthonormal 𝕜 (restrict s v)\nhsv : Injective (restrict s v)\nhX✝ : Orthonormal 𝕜 Subtype.val\nY : Finset E\nb₀ : OrthonormalBasis { x // x ∈ Y } 𝕜 E\nhX : range (restrict s v) ⊆ ↑Y\nhb₀ : ↑b₀ = Subtype.val\nhιY : Fintype.card ι = Finset.card Y\n⊢ ∃ b, ∀ (i : ι), i ∈ s → ↑b i = v i\n[PROOFSTEP]\nhave hvsY : s.MapsTo v Y := (s.mapsTo_image v).mono_right (by rwa [← range_restrict])\n[GOAL]\nι✝ : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹¹ : IsROrC 𝕜\nE : Type u_4\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁸ : NormedAddCommGroup E'\ninst✝⁷ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝⁴ : NormedAddCommGroup F'\ninst✝³ : InnerProductSpace ℝ F'\ninst✝² : Fintype ι✝\nv✝ : Set E\nA : ι✝ → Submodule 𝕜 E\ninst✝¹ : FiniteDimensional 𝕜 E\nι : Type u_8\ninst✝ : Fintype ι\ncard_ι : finrank 𝕜 E = Fintype.card ι\nv : ι → E\ns : Set ι\nhv : Orthonormal 𝕜 (restrict s v)\nhsv : Injective (restrict s v)\nhX✝ : Orthonormal 𝕜 Subtype.val\nY : Finset E\nb₀ : OrthonormalBasis { x // x ∈ Y } 𝕜 E\nhX : range (restrict s v) ⊆ ↑Y\nhb₀ : ↑b₀ = Subtype.val\nhιY : Fintype.card ι = Finset.card Y\n⊢ v '' s ⊆ ↑Y\n[PROOFSTEP]\nrwa [← range_restrict]\n[GOAL]\ncase intro.intro.intro\nι✝ : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹¹ : IsROrC 𝕜\nE : Type u_4\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁸ : NormedAddCommGroup E'\ninst✝⁷ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝⁴ : NormedAddCommGroup F'\ninst✝³ : InnerProductSpace ℝ F'\ninst✝² : Fintype ι✝\nv✝ : Set E\nA : ι✝ → Submodule 𝕜 E\ninst✝¹ : FiniteDimensional 𝕜 E\nι : Type u_8\ninst✝ : Fintype ι\ncard_ι : finrank 𝕜 E = Fintype.card ι\nv : ι → E\ns : Set ι\nhv : Orthonormal 𝕜 (restrict s v)\nhsv : Injective (restrict s v)\nhX✝ : Orthonormal 𝕜 Subtype.val\nY : Finset E\nb₀ : OrthonormalBasis { x // x ∈ Y } 𝕜 E\nhX : range (restrict s v) ⊆ ↑Y\nhb₀ : ↑b₀ = Subtype.val\nhιY : Fintype.card ι = Finset.card Y\nhvsY : MapsTo v s ↑Y\n⊢ ∃ b, ∀ (i : ι), i ∈ s → ↑b i = v i\n[PROOFSTEP]\nhave hsv' : Set.InjOn v s := by\n  rw [Set.injOn_iff_injective]\n  exact hsv\n[GOAL]\nι✝ : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹¹ : IsROrC 𝕜\nE : Type u_4\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁸ : NormedAddCommGroup E'\ninst✝⁷ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝⁴ : NormedAddCommGroup F'\ninst✝³ : InnerProductSpace ℝ F'\ninst✝² : Fintype ι✝\nv✝ : Set E\nA : ι✝ → Submodule 𝕜 E\ninst✝¹ : FiniteDimensional 𝕜 E\nι : Type u_8\ninst✝ : Fintype ι\ncard_ι : finrank 𝕜 E = Fintype.card ι\nv : ι → E\ns : Set ι\nhv : Orthonormal 𝕜 (restrict s v)\nhsv : Injective (restrict s v)\nhX✝ : Orthonormal 𝕜 Subtype.val\nY : Finset E\nb₀ : OrthonormalBasis { x // x ∈ Y } 𝕜 E\nhX : range (restrict s v) ⊆ ↑Y\nhb₀ : ↑b₀ = Subtype.val\nhιY : Fintype.card ι = Finset.card Y\nhvsY : MapsTo v s ↑Y\n⊢ InjOn v s\n[PROOFSTEP]\nrw [Set.injOn_iff_injective]\n[GOAL]\nι✝ : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹¹ : IsROrC 𝕜\nE : Type u_4\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁸ : NormedAddCommGroup E'\ninst✝⁷ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝⁴ : NormedAddCommGroup F'\ninst✝³ : InnerProductSpace ℝ F'\ninst✝² : Fintype ι✝\nv✝ : Set E\nA : ι✝ → Submodule 𝕜 E\ninst✝¹ : FiniteDimensional 𝕜 E\nι : Type u_8\ninst✝ : Fintype ι\ncard_ι : finrank 𝕜 E = Fintype.card ι\nv : ι → E\ns : Set ι\nhv : Orthonormal 𝕜 (restrict s v)\nhsv : Injective (restrict s v)\nhX✝ : Orthonormal 𝕜 Subtype.val\nY : Finset E\nb₀ : OrthonormalBasis { x // x ∈ Y } 𝕜 E\nhX : range (restrict s v) ⊆ ↑Y\nhb₀ : ↑b₀ = Subtype.val\nhιY : Fintype.card ι = Finset.card Y\nhvsY : MapsTo v s ↑Y\n⊢ Injective (restrict s v)\n[PROOFSTEP]\nexact hsv\n[GOAL]\ncase intro.intro.intro\nι✝ : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹¹ : IsROrC 𝕜\nE : Type u_4\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁸ : NormedAddCommGroup E'\ninst✝⁷ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝⁴ : NormedAddCommGroup F'\ninst✝³ : InnerProductSpace ℝ F'\ninst✝² : Fintype ι✝\nv✝ : Set E\nA : ι✝ → Submodule 𝕜 E\ninst✝¹ : FiniteDimensional 𝕜 E\nι : Type u_8\ninst✝ : Fintype ι\ncard_ι : finrank 𝕜 E = Fintype.card ι\nv : ι → E\ns : Set ι\nhv : Orthonormal 𝕜 (restrict s v)\nhsv : Injective (restrict s v)\nhX✝ : Orthonormal 𝕜 Subtype.val\nY : Finset E\nb₀ : OrthonormalBasis { x // x ∈ Y } 𝕜 E\nhX : range (restrict s v) ⊆ ↑Y\nhb₀ : ↑b₀ = Subtype.val\nhιY : Fintype.card ι = Finset.card Y\nhvsY : MapsTo v s ↑Y\nhsv' : InjOn v s\n⊢ ∃ b, ∀ (i : ι), i ∈ s → ↑b i = v i\n[PROOFSTEP]\nobtain ⟨g, hg⟩ := hvsY.exists_equiv_extend_of_card_eq hιY hsv'\n[GOAL]\ncase intro.intro.intro.intro\nι✝ : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹¹ : IsROrC 𝕜\nE : Type u_4\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁸ : NormedAddCommGroup E'\ninst✝⁷ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝⁴ : NormedAddCommGroup F'\ninst✝³ : InnerProductSpace ℝ F'\ninst✝² : Fintype ι✝\nv✝ : Set E\nA : ι✝ → Submodule 𝕜 E\ninst✝¹ : FiniteDimensional 𝕜 E\nι : Type u_8\ninst✝ : Fintype ι\ncard_ι : finrank 𝕜 E = Fintype.card ι\nv : ι → E\ns : Set ι\nhv : Orthonormal 𝕜 (restrict s v)\nhsv : Injective (restrict s v)\nhX✝ : Orthonormal 𝕜 Subtype.val\nY : Finset E\nb₀ : OrthonormalBasis { x // x ∈ Y } 𝕜 E\nhX : range (restrict s v) ⊆ ↑Y\nhb₀ : ↑b₀ = Subtype.val\nhιY : Fintype.card ι = Finset.card Y\nhvsY : MapsTo v s ↑Y\nhsv' : InjOn v s\ng : ι ≃ { x // x ∈ Y }\nhg : ∀ (i : ι), i ∈ s → ↑(↑g i) = v i\n⊢ ∃ b, ∀ (i : ι), i ∈ s → ↑b i = v i\n[PROOFSTEP]\nuse b₀.reindex g.symm\n[GOAL]\ncase h\nι✝ : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹¹ : IsROrC 𝕜\nE : Type u_4\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁸ : NormedAddCommGroup E'\ninst✝⁷ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝⁴ : NormedAddCommGroup F'\ninst✝³ : InnerProductSpace ℝ F'\ninst✝² : Fintype ι✝\nv✝ : Set E\nA : ι✝ → Submodule 𝕜 E\ninst✝¹ : FiniteDimensional 𝕜 E\nι : Type u_8\ninst✝ : Fintype ι\ncard_ι : finrank 𝕜 E = Fintype.card ι\nv : ι → E\ns : Set ι\nhv : Orthonormal 𝕜 (restrict s v)\nhsv : Injective (restrict s v)\nhX✝ : Orthonormal 𝕜 Subtype.val\nY : Finset E\nb₀ : OrthonormalBasis { x // x ∈ Y } 𝕜 E\nhX : range (restrict s v) ⊆ ↑Y\nhb₀ : ↑b₀ = Subtype.val\nhιY : Fintype.card ι = Finset.card Y\nhvsY : MapsTo v s ↑Y\nhsv' : InjOn v s\ng : ι ≃ { x // x ∈ Y }\nhg : ∀ (i : ι), i ∈ s → ↑(↑g i) = v i\n⊢ ∀ (i : ι), i ∈ s → ↑(OrthonormalBasis.reindex b₀ g.symm) i = v i\n[PROOFSTEP]\nintro i hi\n[GOAL]\ncase h\nι✝ : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹¹ : IsROrC 𝕜\nE : Type u_4\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁸ : NormedAddCommGroup E'\ninst✝⁷ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝⁴ : NormedAddCommGroup F'\ninst✝³ : InnerProductSpace ℝ F'\ninst✝² : Fintype ι✝\nv✝ : Set E\nA : ι✝ → Submodule 𝕜 E\ninst✝¹ : FiniteDimensional 𝕜 E\nι : Type u_8\ninst✝ : Fintype ι\ncard_ι : finrank 𝕜 E = Fintype.card ι\nv : ι → E\ns : Set ι\nhv : Orthonormal 𝕜 (restrict s v)\nhsv : Injective (restrict s v)\nhX✝ : Orthonormal 𝕜 Subtype.val\nY : Finset E\nb₀ : OrthonormalBasis { x // x ∈ Y } 𝕜 E\nhX : range (restrict s v) ⊆ ↑Y\nhb₀ : ↑b₀ = Subtype.val\nhιY : Fintype.card ι = Finset.card Y\nhvsY : MapsTo v s ↑Y\nhsv' : InjOn v s\ng : ι ≃ { x // x ∈ Y }\nhg : ∀ (i : ι), i ∈ s → ↑(↑g i) = v i\ni : ι\nhi : i ∈ s\n⊢ ↑(OrthonormalBasis.reindex b₀ g.symm) i = v i\n[PROOFSTEP]\nsimp [hb₀, hg i hi]\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹⁰ : IsROrC 𝕜\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝³ : NormedAddCommGroup F'\ninst✝² : InnerProductSpace ℝ F'\ninst✝¹ : Fintype ι\nv : Set E\nA : ι → Submodule 𝕜 E\ninst✝ : FiniteDimensional 𝕜 E\n⊢ OrthonormalBasis (Fin (finrank 𝕜 E)) 𝕜 E\n[PROOFSTEP]\nlet b := Classical.choose (Classical.choose_spec <| exists_orthonormalBasis 𝕜 E)\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹⁰ : IsROrC 𝕜\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝³ : NormedAddCommGroup F'\ninst✝² : InnerProductSpace ℝ F'\ninst✝¹ : Fintype ι\nv : Set E\nA : ι → Submodule 𝕜 E\ninst✝ : FiniteDimensional 𝕜 E\nb : OrthonormalBasis { x // x ∈ Classical.choose (_ : ∃ w b, ↑b = Subtype.val) } 𝕜 E :=\n  Classical.choose (_ : ∃ b, ↑b = Subtype.val)\n⊢ OrthonormalBasis (Fin (finrank 𝕜 E)) 𝕜 E\n[PROOFSTEP]\nrw [finrank_eq_card_basis b.toBasis]\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹⁰ : IsROrC 𝕜\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝³ : NormedAddCommGroup F'\ninst✝² : InnerProductSpace ℝ F'\ninst✝¹ : Fintype ι\nv : Set E\nA : ι → Submodule 𝕜 E\ninst✝ : FiniteDimensional 𝕜 E\nb : OrthonormalBasis { x // x ∈ Classical.choose (_ : ∃ w b, ↑b = Subtype.val) } 𝕜 E :=\n  Classical.choose (_ : ∃ b, ↑b = Subtype.val)\n⊢ OrthonormalBasis (Fin (Fintype.card { x // x ∈ Classical.choose (_ : ∃ w b, ↑b = Subtype.val) })) 𝕜 E\n[PROOFSTEP]\nexact b.reindex (Fintype.equivFinOfCardEq rfl)\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹⁰ : IsROrC 𝕜\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝³ : NormedAddCommGroup F'\ninst✝² : InnerProductSpace ℝ F'\ninst✝¹ : Fintype ι\nv : Set E\nA : ι → Submodule 𝕜 E\ninst✝ : FiniteDimensional 𝕜 E\nb : OrthonormalBasis ι ℝ ℝ\n⊢ (↑b = fun x => 1) ∨ ↑b = fun x => -1\n[PROOFSTEP]\nhave : Unique ι := b.toBasis.unique\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹⁰ : IsROrC 𝕜\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝³ : NormedAddCommGroup F'\ninst✝² : InnerProductSpace ℝ F'\ninst✝¹ : Fintype ι\nv : Set E\nA : ι → Submodule 𝕜 E\ninst✝ : FiniteDimensional 𝕜 E\nb : OrthonormalBasis ι ℝ ℝ\nthis : Unique ι\n⊢ (↑b = fun x => 1) ∨ ↑b = fun x => -1\n[PROOFSTEP]\nhave : b default = 1 ∨ b default = -1 :=\n  by\n  have : ‖b default‖ = 1 := b.orthonormal.1 _\n  rwa [Real.norm_eq_abs, abs_eq (zero_le_one' ℝ)] at this \n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹⁰ : IsROrC 𝕜\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝³ : NormedAddCommGroup F'\ninst✝² : InnerProductSpace ℝ F'\ninst✝¹ : Fintype ι\nv : Set E\nA : ι → Submodule 𝕜 E\ninst✝ : FiniteDimensional 𝕜 E\nb : OrthonormalBasis ι ℝ ℝ\nthis : Unique ι\n⊢ ↑b default = 1 ∨ ↑b default = -1\n[PROOFSTEP]\nhave : ‖b default‖ = 1 := b.orthonormal.1 _\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹⁰ : IsROrC 𝕜\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝³ : NormedAddCommGroup F'\ninst✝² : InnerProductSpace ℝ F'\ninst✝¹ : Fintype ι\nv : Set E\nA : ι → Submodule 𝕜 E\ninst✝ : FiniteDimensional 𝕜 E\nb : OrthonormalBasis ι ℝ ℝ\nthis✝ : Unique ι\nthis : ‖↑b default‖ = 1\n⊢ ↑b default = 1 ∨ ↑b default = -1\n[PROOFSTEP]\nrwa [Real.norm_eq_abs, abs_eq (zero_le_one' ℝ)] at this \n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹⁰ : IsROrC 𝕜\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝³ : NormedAddCommGroup F'\ninst✝² : InnerProductSpace ℝ F'\ninst✝¹ : Fintype ι\nv : Set E\nA : ι → Submodule 𝕜 E\ninst✝ : FiniteDimensional 𝕜 E\nb : OrthonormalBasis ι ℝ ℝ\nthis✝ : Unique ι\nthis : ↑b default = 1 ∨ ↑b default = -1\n⊢ (↑b = fun x => 1) ∨ ↑b = fun x => -1\n[PROOFSTEP]\nrw [eq_const_of_unique b]\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹⁰ : IsROrC 𝕜\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝³ : NormedAddCommGroup F'\ninst✝² : InnerProductSpace ℝ F'\ninst✝¹ : Fintype ι\nv : Set E\nA : ι → Submodule 𝕜 E\ninst✝ : FiniteDimensional 𝕜 E\nb : OrthonormalBasis ι ℝ ℝ\nthis✝ : Unique ι\nthis : ↑b default = 1 ∨ ↑b default = -1\n⊢ (const ι (↑b default) = fun x => 1) ∨ const ι (↑b default) = fun x => -1\n[PROOFSTEP]\nrefine' this.imp _ _\n[GOAL]\ncase refine'_1\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹⁰ : IsROrC 𝕜\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝³ : NormedAddCommGroup F'\ninst✝² : InnerProductSpace ℝ F'\ninst✝¹ : Fintype ι\nv : Set E\nA : ι → Submodule 𝕜 E\ninst✝ : FiniteDimensional 𝕜 E\nb : OrthonormalBasis ι ℝ ℝ\nthis✝ : Unique ι\nthis : ↑b default = 1 ∨ ↑b default = -1\n⊢ ↑b default = 1 → const ι (↑b default) = fun x => 1\n[PROOFSTEP]\nintro\n[GOAL]\ncase refine'_1\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹⁰ : IsROrC 𝕜\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝³ : NormedAddCommGroup F'\ninst✝² : InnerProductSpace ℝ F'\ninst✝¹ : Fintype ι\nv : Set E\nA : ι → Submodule 𝕜 E\ninst✝ : FiniteDimensional 𝕜 E\nb : OrthonormalBasis ι ℝ ℝ\nthis✝ : Unique ι\nthis : ↑b default = 1 ∨ ↑b default = -1\na✝ : ↑b default = 1\n⊢ const ι (↑b default) = fun x => 1\n[PROOFSTEP]\next\n[GOAL]\ncase refine'_1.h\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹⁰ : IsROrC 𝕜\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝³ : NormedAddCommGroup F'\ninst✝² : InnerProductSpace ℝ F'\ninst✝¹ : Fintype ι\nv : Set E\nA : ι → Submodule 𝕜 E\ninst✝ : FiniteDimensional 𝕜 E\nb : OrthonormalBasis ι ℝ ℝ\nthis✝ : Unique ι\nthis : ↑b default = 1 ∨ ↑b default = -1\na✝ : ↑b default = 1\nx✝ : ι\n⊢ const ι (↑b default) x✝ = 1\n[PROOFSTEP]\nsimp [*]\n[GOAL]\ncase refine'_2\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹⁰ : IsROrC 𝕜\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝³ : NormedAddCommGroup F'\ninst✝² : InnerProductSpace ℝ F'\ninst✝¹ : Fintype ι\nv : Set E\nA : ι → Submodule 𝕜 E\ninst✝ : FiniteDimensional 𝕜 E\nb : OrthonormalBasis ι ℝ ℝ\nthis✝ : Unique ι\nthis : ↑b default = 1 ∨ ↑b default = -1\n⊢ ↑b default = -1 → const ι (↑b default) = fun x => -1\n[PROOFSTEP]\nintro\n[GOAL]\ncase refine'_2\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹⁰ : IsROrC 𝕜\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝³ : NormedAddCommGroup F'\ninst✝² : InnerProductSpace ℝ F'\ninst✝¹ : Fintype ι\nv : Set E\nA : ι → Submodule 𝕜 E\ninst✝ : FiniteDimensional 𝕜 E\nb : OrthonormalBasis ι ℝ ℝ\nthis✝ : Unique ι\nthis : ↑b default = 1 ∨ ↑b default = -1\na✝ : ↑b default = -1\n⊢ const ι (↑b default) = fun x => -1\n[PROOFSTEP]\next\n[GOAL]\ncase refine'_2.h\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹⁰ : IsROrC 𝕜\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝³ : NormedAddCommGroup F'\ninst✝² : InnerProductSpace ℝ F'\ninst✝¹ : Fintype ι\nv : Set E\nA : ι → Submodule 𝕜 E\ninst✝ : FiniteDimensional 𝕜 E\nb : OrthonormalBasis ι ℝ ℝ\nthis✝ : Unique ι\nthis : ↑b default = 1 ∨ ↑b default = -1\na✝ : ↑b default = -1\nx✝ : ι\n⊢ const ι (↑b default) x✝ = -1\n[PROOFSTEP]\nsimp [*]\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹¹ : IsROrC 𝕜\nE : Type u_4\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁸ : NormedAddCommGroup E'\ninst✝⁷ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝⁴ : NormedAddCommGroup F'\ninst✝³ : InnerProductSpace ℝ F'\ninst✝² : Fintype ι\nv : Set E\nA : ι → Submodule 𝕜 E\ninst✝¹ : FiniteDimensional 𝕜 E\nn : ℕ\nhn : finrank 𝕜 E = n\ninst✝ : DecidableEq ι\nV : ι → Submodule 𝕜 E\nhV : IsInternal V\na : Fin n\nhV' : OrthogonalFamily 𝕜 (fun i => { x // x ∈ V i }) fun i => subtypeₗᵢ (V i)\n⊢ ↑(subordinateOrthonormalBasis hn hV hV') a ∈ V (subordinateOrthonormalBasisIndex hn hV a hV')\n[PROOFSTEP]\nsimpa only [DirectSum.IsInternal.subordinateOrthonormalBasis, OrthonormalBasis.coe_reindex,\n  DirectSum.IsInternal.subordinateOrthonormalBasisIndex] using\n  hV.collectedOrthonormalBasis_mem hV' (fun i => stdOrthonormalBasis 𝕜 (V i))\n    ((hV.sigmaOrthonormalBasisIndexEquiv hn hV').symm a)\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹² : IsROrC 𝕜\nE : Type u_4\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝⁵ : NormedAddCommGroup F'\ninst✝⁴ : InnerProductSpace ℝ F'\ninst✝³ : Fintype ι\nV : Type u_8\ninst✝² : NormedAddCommGroup V\ninst✝¹ : InnerProductSpace 𝕜 V\ninst✝ : FiniteDimensional 𝕜 V\nS : Submodule 𝕜 V\nL✝ L : { x // x ∈ S } →ₗᵢ[𝕜] V\n⊢ V →ₗᵢ[𝕜] V\n[PROOFSTEP]\nlet d := finrank 𝕜 Sᗮ\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹² : IsROrC 𝕜\nE : Type u_4\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝⁵ : NormedAddCommGroup F'\ninst✝⁴ : InnerProductSpace ℝ F'\ninst✝³ : Fintype ι\nV : Type u_8\ninst✝² : NormedAddCommGroup V\ninst✝¹ : InnerProductSpace 𝕜 V\ninst✝ : FiniteDimensional 𝕜 V\nS : Submodule 𝕜 V\nL✝ L : { x // x ∈ S } →ₗᵢ[𝕜] V\nd : ℕ := finrank 𝕜 { x // x ∈ Sᗮ }\n⊢ V →ₗᵢ[𝕜] V\n[PROOFSTEP]\nlet LS := LinearMap.range L.toLinearMap\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹² : IsROrC 𝕜\nE : Type u_4\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝⁵ : NormedAddCommGroup F'\ninst✝⁴ : InnerProductSpace ℝ F'\ninst✝³ : Fintype ι\nV : Type u_8\ninst✝² : NormedAddCommGroup V\ninst✝¹ : InnerProductSpace 𝕜 V\ninst✝ : FiniteDimensional 𝕜 V\nS : Submodule 𝕜 V\nL✝ L : { x // x ∈ S } →ₗᵢ[𝕜] V\nd : ℕ := finrank 𝕜 { x // x ∈ Sᗮ }\nLS : Submodule 𝕜 V := LinearMap.range L.toLinearMap\n⊢ V →ₗᵢ[𝕜] V\n[PROOFSTEP]\nhave E : Sᗮ ≃ₗᵢ[𝕜] LSᗮ :=\n  by\n  have dim_LS_perp : finrank 𝕜 LSᗮ = d :=\n    calc\n      finrank 𝕜 LSᗮ = finrank 𝕜 V - finrank 𝕜 LS := by\n        simp only [← LS.finrank_add_finrank_orthogonal, add_tsub_cancel_left]\n      _ = finrank 𝕜 V - finrank 𝕜 S := by simp only [LinearMap.finrank_range_of_inj L.injective]\n      _ = finrank 𝕜 Sᗮ := by simp only [← S.finrank_add_finrank_orthogonal, add_tsub_cancel_left]\n  exact (stdOrthonormalBasis 𝕜 Sᗮ).repr.trans ((stdOrthonormalBasis 𝕜 LSᗮ).reindex <| finCongr dim_LS_perp).repr.symm\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹² : IsROrC 𝕜\nE : Type u_4\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝⁵ : NormedAddCommGroup F'\ninst✝⁴ : InnerProductSpace ℝ F'\ninst✝³ : Fintype ι\nV : Type u_8\ninst✝² : NormedAddCommGroup V\ninst✝¹ : InnerProductSpace 𝕜 V\ninst✝ : FiniteDimensional 𝕜 V\nS : Submodule 𝕜 V\nL✝ L : { x // x ∈ S } →ₗᵢ[𝕜] V\nd : ℕ := finrank 𝕜 { x // x ∈ Sᗮ }\nLS : Submodule 𝕜 V := LinearMap.range L.toLinearMap\n⊢ { x // x ∈ Sᗮ } ≃ₗᵢ[𝕜] { x // x ∈ LSᗮ }\n[PROOFSTEP]\nhave dim_LS_perp : finrank 𝕜 LSᗮ = d :=\n  calc\n    finrank 𝕜 LSᗮ = finrank 𝕜 V - finrank 𝕜 LS := by\n      simp only [← LS.finrank_add_finrank_orthogonal, add_tsub_cancel_left]\n    _ = finrank 𝕜 V - finrank 𝕜 S := by simp only [LinearMap.finrank_range_of_inj L.injective]\n    _ = finrank 𝕜 Sᗮ := by simp only [← S.finrank_add_finrank_orthogonal, add_tsub_cancel_left]\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹² : IsROrC 𝕜\nE : Type u_4\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝⁵ : NormedAddCommGroup F'\ninst✝⁴ : InnerProductSpace ℝ F'\ninst✝³ : Fintype ι\nV : Type u_8\ninst✝² : NormedAddCommGroup V\ninst✝¹ : InnerProductSpace 𝕜 V\ninst✝ : FiniteDimensional 𝕜 V\nS : Submodule 𝕜 V\nL✝ L : { x // x ∈ S } →ₗᵢ[𝕜] V\nd : ℕ := finrank 𝕜 { x // x ∈ Sᗮ }\nLS : Submodule 𝕜 V := LinearMap.range L.toLinearMap\n⊢ finrank 𝕜 { x // x ∈ LSᗮ } = finrank 𝕜 V - finrank 𝕜 { x // x ∈ LS }\n[PROOFSTEP]\nsimp only [← LS.finrank_add_finrank_orthogonal, add_tsub_cancel_left]\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹² : IsROrC 𝕜\nE : Type u_4\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝⁵ : NormedAddCommGroup F'\ninst✝⁴ : InnerProductSpace ℝ F'\ninst✝³ : Fintype ι\nV : Type u_8\ninst✝² : NormedAddCommGroup V\ninst✝¹ : InnerProductSpace 𝕜 V\ninst✝ : FiniteDimensional 𝕜 V\nS : Submodule 𝕜 V\nL✝ L : { x // x ∈ S } →ₗᵢ[𝕜] V\nd : ℕ := finrank 𝕜 { x // x ∈ Sᗮ }\nLS : Submodule 𝕜 V := LinearMap.range L.toLinearMap\n⊢ finrank 𝕜 V - finrank 𝕜 { x // x ∈ LS } = finrank 𝕜 V - finrank 𝕜 { x // x ∈ S }\n[PROOFSTEP]\nsimp only [LinearMap.finrank_range_of_inj L.injective]\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹² : IsROrC 𝕜\nE : Type u_4\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝⁵ : NormedAddCommGroup F'\ninst✝⁴ : InnerProductSpace ℝ F'\ninst✝³ : Fintype ι\nV : Type u_8\ninst✝² : NormedAddCommGroup V\ninst✝¹ : InnerProductSpace 𝕜 V\ninst✝ : FiniteDimensional 𝕜 V\nS : Submodule 𝕜 V\nL✝ L : { x // x ∈ S } →ₗᵢ[𝕜] V\nd : ℕ := finrank 𝕜 { x // x ∈ Sᗮ }\nLS : Submodule 𝕜 V := LinearMap.range L.toLinearMap\n⊢ finrank 𝕜 V - finrank 𝕜 { x // x ∈ S } = finrank 𝕜 { x // x ∈ Sᗮ }\n[PROOFSTEP]\nsimp only [← S.finrank_add_finrank_orthogonal, add_tsub_cancel_left]\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹² : IsROrC 𝕜\nE : Type u_4\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝⁵ : NormedAddCommGroup F'\ninst✝⁴ : InnerProductSpace ℝ F'\ninst✝³ : Fintype ι\nV : Type u_8\ninst✝² : NormedAddCommGroup V\ninst✝¹ : InnerProductSpace 𝕜 V\ninst✝ : FiniteDimensional 𝕜 V\nS : Submodule 𝕜 V\nL✝ L : { x // x ∈ S } →ₗᵢ[𝕜] V\nd : ℕ := finrank 𝕜 { x // x ∈ Sᗮ }\nLS : Submodule 𝕜 V := LinearMap.range L.toLinearMap\ndim_LS_perp : finrank 𝕜 { x // x ∈ LSᗮ } = d\n⊢ { x // x ∈ Sᗮ } ≃ₗᵢ[𝕜] { x // x ∈ LSᗮ }\n[PROOFSTEP]\nexact (stdOrthonormalBasis 𝕜 Sᗮ).repr.trans ((stdOrthonormalBasis 𝕜 LSᗮ).reindex <| finCongr dim_LS_perp).repr.symm\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹² : IsROrC 𝕜\nE✝ : Type u_4\ninst✝¹¹ : NormedAddCommGroup E✝\ninst✝¹⁰ : InnerProductSpace 𝕜 E✝\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝⁵ : NormedAddCommGroup F'\ninst✝⁴ : InnerProductSpace ℝ F'\ninst✝³ : Fintype ι\nV : Type u_8\ninst✝² : NormedAddCommGroup V\ninst✝¹ : InnerProductSpace 𝕜 V\ninst✝ : FiniteDimensional 𝕜 V\nS : Submodule 𝕜 V\nL✝ L : { x // x ∈ S } →ₗᵢ[𝕜] V\nd : ℕ := finrank 𝕜 { x // x ∈ Sᗮ }\nLS : Submodule 𝕜 V := LinearMap.range L.toLinearMap\nE : { x // x ∈ Sᗮ } ≃ₗᵢ[𝕜] { x // x ∈ LSᗮ }\n⊢ V →ₗᵢ[𝕜] V\n[PROOFSTEP]\nlet L3 := LSᗮ.subtypeₗᵢ.comp E.toLinearIsometry\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹² : IsROrC 𝕜\nE✝ : Type u_4\ninst✝¹¹ : NormedAddCommGroup E✝\ninst✝¹⁰ : InnerProductSpace 𝕜 E✝\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝⁵ : NormedAddCommGroup F'\ninst✝⁴ : InnerProductSpace ℝ F'\ninst✝³ : Fintype ι\nV : Type u_8\ninst✝² : NormedAddCommGroup V\ninst✝¹ : InnerProductSpace 𝕜 V\ninst✝ : FiniteDimensional 𝕜 V\nS : Submodule 𝕜 V\nL✝ L : { x // x ∈ S } →ₗᵢ[𝕜] V\nd : ℕ := finrank 𝕜 { x // x ∈ Sᗮ }\nLS : Submodule 𝕜 V := LinearMap.range L.toLinearMap\nE : { x // x ∈ Sᗮ } ≃ₗᵢ[𝕜] { x // x ∈ LSᗮ }\nL3 : { x // x ∈ Sᗮ } →ₗᵢ[𝕜] V := comp (subtypeₗᵢ LSᗮ) (LinearIsometryEquiv.toLinearIsometry E)\n⊢ V →ₗᵢ[𝕜] V\n[PROOFSTEP]\nhaveI : CompleteSpace S := FiniteDimensional.complete 𝕜 S\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹² : IsROrC 𝕜\nE✝ : Type u_4\ninst✝¹¹ : NormedAddCommGroup E✝\ninst✝¹⁰ : InnerProductSpace 𝕜 E✝\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝⁵ : NormedAddCommGroup F'\ninst✝⁴ : InnerProductSpace ℝ F'\ninst✝³ : Fintype ι\nV : Type u_8\ninst✝² : NormedAddCommGroup V\ninst✝¹ : InnerProductSpace 𝕜 V\ninst✝ : FiniteDimensional 𝕜 V\nS : Submodule 𝕜 V\nL✝ L : { x // x ∈ S } →ₗᵢ[𝕜] V\nd : ℕ := finrank 𝕜 { x // x ∈ Sᗮ }\nLS : Submodule 𝕜 V := LinearMap.range L.toLinearMap\nE : { x // x ∈ Sᗮ } ≃ₗᵢ[𝕜] { x // x ∈ LSᗮ }\nL3 : { x // x ∈ Sᗮ } →ₗᵢ[𝕜] V := comp (subtypeₗᵢ LSᗮ) (LinearIsometryEquiv.toLinearIsometry E)\nthis : CompleteSpace { x // x ∈ S }\n⊢ V →ₗᵢ[𝕜] V\n[PROOFSTEP]\nhaveI : CompleteSpace V := FiniteDimensional.complete 𝕜 V\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹² : IsROrC 𝕜\nE✝ : Type u_4\ninst✝¹¹ : NormedAddCommGroup E✝\ninst✝¹⁰ : InnerProductSpace 𝕜 E✝\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝⁵ : NormedAddCommGroup F'\ninst✝⁴ : InnerProductSpace ℝ F'\ninst✝³ : Fintype ι\nV : Type u_8\ninst✝² : NormedAddCommGroup V\ninst✝¹ : InnerProductSpace 𝕜 V\ninst✝ : FiniteDimensional 𝕜 V\nS : Submodule 𝕜 V\nL✝ L : { x // x ∈ S } →ₗᵢ[𝕜] V\nd : ℕ := finrank 𝕜 { x // x ∈ Sᗮ }\nLS : Submodule 𝕜 V := LinearMap.range L.toLinearMap\nE : { x // x ∈ Sᗮ } ≃ₗᵢ[𝕜] { x // x ∈ LSᗮ }\nL3 : { x // x ∈ Sᗮ } →ₗᵢ[𝕜] V := comp (subtypeₗᵢ LSᗮ) (LinearIsometryEquiv.toLinearIsometry E)\nthis✝ : CompleteSpace { x // x ∈ S }\nthis : CompleteSpace V\n⊢ V →ₗᵢ[𝕜] V\n[PROOFSTEP]\nlet p1 := (orthogonalProjection S).toLinearMap\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹² : IsROrC 𝕜\nE✝ : Type u_4\ninst✝¹¹ : NormedAddCommGroup E✝\ninst✝¹⁰ : InnerProductSpace 𝕜 E✝\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝⁵ : NormedAddCommGroup F'\ninst✝⁴ : InnerProductSpace ℝ F'\ninst✝³ : Fintype ι\nV : Type u_8\ninst✝² : NormedAddCommGroup V\ninst✝¹ : InnerProductSpace 𝕜 V\ninst✝ : FiniteDimensional 𝕜 V\nS : Submodule 𝕜 V\nL✝ L : { x // x ∈ S } →ₗᵢ[𝕜] V\nd : ℕ := finrank 𝕜 { x // x ∈ Sᗮ }\nLS : Submodule 𝕜 V := LinearMap.range L.toLinearMap\nE : { x // x ∈ Sᗮ } ≃ₗᵢ[𝕜] { x // x ∈ LSᗮ }\nL3 : { x // x ∈ Sᗮ } →ₗᵢ[𝕜] V := comp (subtypeₗᵢ LSᗮ) (LinearIsometryEquiv.toLinearIsometry E)\nthis✝ : CompleteSpace { x // x ∈ S }\nthis : CompleteSpace V\np1 : V →ₗ[𝕜] { x // x ∈ S } := ↑(orthogonalProjection S)\n⊢ V →ₗᵢ[𝕜] V\n[PROOFSTEP]\nlet p2 := (orthogonalProjection Sᗮ).toLinearMap\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹² : IsROrC 𝕜\nE✝ : Type u_4\ninst✝¹¹ : NormedAddCommGroup E✝\ninst✝¹⁰ : InnerProductSpace 𝕜 E✝\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝⁵ : NormedAddCommGroup F'\ninst✝⁴ : InnerProductSpace ℝ F'\ninst✝³ : Fintype ι\nV : Type u_8\ninst✝² : NormedAddCommGroup V\ninst✝¹ : InnerProductSpace 𝕜 V\ninst✝ : FiniteDimensional 𝕜 V\nS : Submodule 𝕜 V\nL✝ L : { x // x ∈ S } →ₗᵢ[𝕜] V\nd : ℕ := finrank 𝕜 { x // x ∈ Sᗮ }\nLS : Submodule 𝕜 V := LinearMap.range L.toLinearMap\nE : { x // x ∈ Sᗮ } ≃ₗᵢ[𝕜] { x // x ∈ LSᗮ }\nL3 : { x // x ∈ Sᗮ } →ₗᵢ[𝕜] V := comp (subtypeₗᵢ LSᗮ) (LinearIsometryEquiv.toLinearIsometry E)\nthis✝ : CompleteSpace { x // x ∈ S }\nthis : CompleteSpace V\np1 : V →ₗ[𝕜] { x // x ∈ S } := ↑(orthogonalProjection S)\np2 : V →ₗ[𝕜] { x // x ∈ Sᗮ } := ↑(orthogonalProjection Sᗮ)\n⊢ V →ₗᵢ[𝕜] V\n[PROOFSTEP]\nlet M := L.toLinearMap.comp p1 + L3.toLinearMap.comp p2\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹² : IsROrC 𝕜\nE✝ : Type u_4\ninst✝¹¹ : NormedAddCommGroup E✝\ninst✝¹⁰ : InnerProductSpace 𝕜 E✝\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝⁵ : NormedAddCommGroup F'\ninst✝⁴ : InnerProductSpace ℝ F'\ninst✝³ : Fintype ι\nV : Type u_8\ninst✝² : NormedAddCommGroup V\ninst✝¹ : InnerProductSpace 𝕜 V\ninst✝ : FiniteDimensional 𝕜 V\nS : Submodule 𝕜 V\nL✝ L : { x // x ∈ S } →ₗᵢ[𝕜] V\nd : ℕ := finrank 𝕜 { x // x ∈ Sᗮ }\nLS : Submodule 𝕜 V := LinearMap.range L.toLinearMap\nE : { x // x ∈ Sᗮ } ≃ₗᵢ[𝕜] { x // x ∈ LSᗮ }\nL3 : { x // x ∈ Sᗮ } →ₗᵢ[𝕜] V := comp (subtypeₗᵢ LSᗮ) (LinearIsometryEquiv.toLinearIsometry E)\nthis✝ : CompleteSpace { x // x ∈ S }\nthis : CompleteSpace V\np1 : V →ₗ[𝕜] { x // x ∈ S } := ↑(orthogonalProjection S)\np2 : V →ₗ[𝕜] { x // x ∈ Sᗮ } := ↑(orthogonalProjection Sᗮ)\nM : V →ₗ[𝕜] V := LinearMap.comp L.toLinearMap p1 + LinearMap.comp L3.toLinearMap p2\n⊢ V →ₗᵢ[𝕜] V\n[PROOFSTEP]\nhave M_norm_map : ∀ x : V, ‖M x‖ = ‖x‖ := by\n  intro x\n  have Mx_decomp : M x = L (p1 x) + L3 (p2 x) := by\n    simp only [LinearMap.add_apply, LinearMap.comp_apply, LinearMap.comp_apply, LinearIsometry.coe_toLinearMap]\n      -- Mx_decomp is the orthogonal decomposition of M x\n  have Mx_orth : ⟪L (p1 x), L3 (p2 x)⟫ = 0 :=\n    by\n    have Lp1x : L (p1 x) ∈ LinearMap.range L.toLinearMap := LinearMap.mem_range_self L.toLinearMap (p1 x)\n    have Lp2x : L3 (p2 x) ∈ (LinearMap.range L.toLinearMap)ᗮ :=\n      by\n      simp only [LinearIsometry.coe_comp, Function.comp_apply, Submodule.coe_subtypeₗᵢ, ← Submodule.range_subtype LSᗮ]\n      apply LinearMap.mem_range_self\n    apply Submodule.inner_right_of_mem_orthogonal Lp1x Lp2x\n  rw [← sq_eq_sq (norm_nonneg _) (norm_nonneg _), norm_sq_eq_add_norm_sq_projection x S]\n  simp only [sq, Mx_decomp]\n  rw [norm_add_sq_eq_norm_sq_add_norm_sq_of_inner_eq_zero (L (p1 x)) (L3 (p2 x)) Mx_orth]\n  simp only [LinearIsometry.norm_map, _root_.add_left_inj, mul_eq_mul_left_iff, norm_eq_zero, true_or_iff,\n    eq_self_iff_true, ContinuousLinearMap.coe_coe, Submodule.coe_norm, Submodule.coe_eq_zero]\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹² : IsROrC 𝕜\nE✝ : Type u_4\ninst✝¹¹ : NormedAddCommGroup E✝\ninst✝¹⁰ : InnerProductSpace 𝕜 E✝\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝⁵ : NormedAddCommGroup F'\ninst✝⁴ : InnerProductSpace ℝ F'\ninst✝³ : Fintype ι\nV : Type u_8\ninst✝² : NormedAddCommGroup V\ninst✝¹ : InnerProductSpace 𝕜 V\ninst✝ : FiniteDimensional 𝕜 V\nS : Submodule 𝕜 V\nL✝ L : { x // x ∈ S } →ₗᵢ[𝕜] V\nd : ℕ := finrank 𝕜 { x // x ∈ Sᗮ }\nLS : Submodule 𝕜 V := LinearMap.range L.toLinearMap\nE : { x // x ∈ Sᗮ } ≃ₗᵢ[𝕜] { x // x ∈ LSᗮ }\nL3 : { x // x ∈ Sᗮ } →ₗᵢ[𝕜] V := comp (subtypeₗᵢ LSᗮ) (LinearIsometryEquiv.toLinearIsometry E)\nthis✝ : CompleteSpace { x // x ∈ S }\nthis : CompleteSpace V\np1 : V →ₗ[𝕜] { x // x ∈ S } := ↑(orthogonalProjection S)\np2 : V →ₗ[𝕜] { x // x ∈ Sᗮ } := ↑(orthogonalProjection Sᗮ)\nM : V →ₗ[𝕜] V := LinearMap.comp L.toLinearMap p1 + LinearMap.comp L3.toLinearMap p2\n⊢ ∀ (x : V), ‖↑M x‖ = ‖x‖\n[PROOFSTEP]\nintro x\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹² : IsROrC 𝕜\nE✝ : Type u_4\ninst✝¹¹ : NormedAddCommGroup E✝\ninst✝¹⁰ : InnerProductSpace 𝕜 E✝\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝⁵ : NormedAddCommGroup F'\ninst✝⁴ : InnerProductSpace ℝ F'\ninst✝³ : Fintype ι\nV : Type u_8\ninst✝² : NormedAddCommGroup V\ninst✝¹ : InnerProductSpace 𝕜 V\ninst✝ : FiniteDimensional 𝕜 V\nS : Submodule 𝕜 V\nL✝ L : { x // x ∈ S } →ₗᵢ[𝕜] V\nd : ℕ := finrank 𝕜 { x // x ∈ Sᗮ }\nLS : Submodule 𝕜 V := LinearMap.range L.toLinearMap\nE : { x // x ∈ Sᗮ } ≃ₗᵢ[𝕜] { x // x ∈ LSᗮ }\nL3 : { x // x ∈ Sᗮ } →ₗᵢ[𝕜] V := comp (subtypeₗᵢ LSᗮ) (LinearIsometryEquiv.toLinearIsometry E)\nthis✝ : CompleteSpace { x // x ∈ S }\nthis : CompleteSpace V\np1 : V →ₗ[𝕜] { x // x ∈ S } := ↑(orthogonalProjection S)\np2 : V →ₗ[𝕜] { x // x ∈ Sᗮ } := ↑(orthogonalProjection Sᗮ)\nM : V →ₗ[𝕜] V := LinearMap.comp L.toLinearMap p1 + LinearMap.comp L3.toLinearMap p2\nx : V\n⊢ ‖↑M x‖ = ‖x‖\n[PROOFSTEP]\nhave Mx_decomp : M x = L (p1 x) + L3 (p2 x) := by\n  simp only [LinearMap.add_apply, LinearMap.comp_apply, LinearMap.comp_apply, LinearIsometry.coe_toLinearMap]\n    -- Mx_decomp is the orthogonal decomposition of M x\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹² : IsROrC 𝕜\nE✝ : Type u_4\ninst✝¹¹ : NormedAddCommGroup E✝\ninst✝¹⁰ : InnerProductSpace 𝕜 E✝\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝⁵ : NormedAddCommGroup F'\ninst✝⁴ : InnerProductSpace ℝ F'\ninst✝³ : Fintype ι\nV : Type u_8\ninst✝² : NormedAddCommGroup V\ninst✝¹ : InnerProductSpace 𝕜 V\ninst✝ : FiniteDimensional 𝕜 V\nS : Submodule 𝕜 V\nL✝ L : { x // x ∈ S } →ₗᵢ[𝕜] V\nd : ℕ := finrank 𝕜 { x // x ∈ Sᗮ }\nLS : Submodule 𝕜 V := LinearMap.range L.toLinearMap\nE : { x // x ∈ Sᗮ } ≃ₗᵢ[𝕜] { x // x ∈ LSᗮ }\nL3 : { x // x ∈ Sᗮ } →ₗᵢ[𝕜] V := comp (subtypeₗᵢ LSᗮ) (LinearIsometryEquiv.toLinearIsometry E)\nthis✝ : CompleteSpace { x // x ∈ S }\nthis : CompleteSpace V\np1 : V →ₗ[𝕜] { x // x ∈ S } := ↑(orthogonalProjection S)\np2 : V →ₗ[𝕜] { x // x ∈ Sᗮ } := ↑(orthogonalProjection Sᗮ)\nM : V →ₗ[𝕜] V := LinearMap.comp L.toLinearMap p1 + LinearMap.comp L3.toLinearMap p2\nx : V\n⊢ ↑M x = ↑L (↑p1 x) + ↑L3 (↑p2 x)\n[PROOFSTEP]\nsimp only [LinearMap.add_apply, LinearMap.comp_apply, LinearMap.comp_apply, LinearIsometry.coe_toLinearMap]\n  -- Mx_decomp is the orthogonal decomposition of M x\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹² : IsROrC 𝕜\nE✝ : Type u_4\ninst✝¹¹ : NormedAddCommGroup E✝\ninst✝¹⁰ : InnerProductSpace 𝕜 E✝\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝⁵ : NormedAddCommGroup F'\ninst✝⁴ : InnerProductSpace ℝ F'\ninst✝³ : Fintype ι\nV : Type u_8\ninst✝² : NormedAddCommGroup V\ninst✝¹ : InnerProductSpace 𝕜 V\ninst✝ : FiniteDimensional 𝕜 V\nS : Submodule 𝕜 V\nL✝ L : { x // x ∈ S } →ₗᵢ[𝕜] V\nd : ℕ := finrank 𝕜 { x // x ∈ Sᗮ }\nLS : Submodule 𝕜 V := LinearMap.range L.toLinearMap\nE : { x // x ∈ Sᗮ } ≃ₗᵢ[𝕜] { x // x ∈ LSᗮ }\nL3 : { x // x ∈ Sᗮ } →ₗᵢ[𝕜] V := comp (subtypeₗᵢ LSᗮ) (LinearIsometryEquiv.toLinearIsometry E)\nthis✝ : CompleteSpace { x // x ∈ S }\nthis : CompleteSpace V\np1 : V →ₗ[𝕜] { x // x ∈ S } := ↑(orthogonalProjection S)\np2 : V →ₗ[𝕜] { x // x ∈ Sᗮ } := ↑(orthogonalProjection Sᗮ)\nM : V →ₗ[𝕜] V := LinearMap.comp L.toLinearMap p1 + LinearMap.comp L3.toLinearMap p2\nx : V\nMx_decomp : ↑M x = ↑L (↑p1 x) + ↑L3 (↑p2 x)\n⊢ ‖↑M x‖ = ‖x‖\n[PROOFSTEP]\nhave Mx_orth : ⟪L (p1 x), L3 (p2 x)⟫ = 0 :=\n  by\n  have Lp1x : L (p1 x) ∈ LinearMap.range L.toLinearMap := LinearMap.mem_range_self L.toLinearMap (p1 x)\n  have Lp2x : L3 (p2 x) ∈ (LinearMap.range L.toLinearMap)ᗮ :=\n    by\n    simp only [LinearIsometry.coe_comp, Function.comp_apply, Submodule.coe_subtypeₗᵢ, ← Submodule.range_subtype LSᗮ]\n    apply LinearMap.mem_range_self\n  apply Submodule.inner_right_of_mem_orthogonal Lp1x Lp2x\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹² : IsROrC 𝕜\nE✝ : Type u_4\ninst✝¹¹ : NormedAddCommGroup E✝\ninst✝¹⁰ : InnerProductSpace 𝕜 E✝\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝⁵ : NormedAddCommGroup F'\ninst✝⁴ : InnerProductSpace ℝ F'\ninst✝³ : Fintype ι\nV : Type u_8\ninst✝² : NormedAddCommGroup V\ninst✝¹ : InnerProductSpace 𝕜 V\ninst✝ : FiniteDimensional 𝕜 V\nS : Submodule 𝕜 V\nL✝ L : { x // x ∈ S } →ₗᵢ[𝕜] V\nd : ℕ := finrank 𝕜 { x // x ∈ Sᗮ }\nLS : Submodule 𝕜 V := LinearMap.range L.toLinearMap\nE : { x // x ∈ Sᗮ } ≃ₗᵢ[𝕜] { x // x ∈ LSᗮ }\nL3 : { x // x ∈ Sᗮ } →ₗᵢ[𝕜] V := comp (subtypeₗᵢ LSᗮ) (LinearIsometryEquiv.toLinearIsometry E)\nthis✝ : CompleteSpace { x // x ∈ S }\nthis : CompleteSpace V\np1 : V →ₗ[𝕜] { x // x ∈ S } := ↑(orthogonalProjection S)\np2 : V →ₗ[𝕜] { x // x ∈ Sᗮ } := ↑(orthogonalProjection Sᗮ)\nM : V →ₗ[𝕜] V := LinearMap.comp L.toLinearMap p1 + LinearMap.comp L3.toLinearMap p2\nx : V\nMx_decomp : ↑M x = ↑L (↑p1 x) + ↑L3 (↑p2 x)\n⊢ inner (↑L (↑p1 x)) (↑L3 (↑p2 x)) = 0\n[PROOFSTEP]\nhave Lp1x : L (p1 x) ∈ LinearMap.range L.toLinearMap := LinearMap.mem_range_self L.toLinearMap (p1 x)\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹² : IsROrC 𝕜\nE✝ : Type u_4\ninst✝¹¹ : NormedAddCommGroup E✝\ninst✝¹⁰ : InnerProductSpace 𝕜 E✝\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝⁵ : NormedAddCommGroup F'\ninst✝⁴ : InnerProductSpace ℝ F'\ninst✝³ : Fintype ι\nV : Type u_8\ninst✝² : NormedAddCommGroup V\ninst✝¹ : InnerProductSpace 𝕜 V\ninst✝ : FiniteDimensional 𝕜 V\nS : Submodule 𝕜 V\nL✝ L : { x // x ∈ S } →ₗᵢ[𝕜] V\nd : ℕ := finrank 𝕜 { x // x ∈ Sᗮ }\nLS : Submodule 𝕜 V := LinearMap.range L.toLinearMap\nE : { x // x ∈ Sᗮ } ≃ₗᵢ[𝕜] { x // x ∈ LSᗮ }\nL3 : { x // x ∈ Sᗮ } →ₗᵢ[𝕜] V := comp (subtypeₗᵢ LSᗮ) (LinearIsometryEquiv.toLinearIsometry E)\nthis✝ : CompleteSpace { x // x ∈ S }\nthis : CompleteSpace V\np1 : V →ₗ[𝕜] { x // x ∈ S } := ↑(orthogonalProjection S)\np2 : V →ₗ[𝕜] { x // x ∈ Sᗮ } := ↑(orthogonalProjection Sᗮ)\nM : V →ₗ[𝕜] V := LinearMap.comp L.toLinearMap p1 + LinearMap.comp L3.toLinearMap p2\nx : V\nMx_decomp : ↑M x = ↑L (↑p1 x) + ↑L3 (↑p2 x)\nLp1x : ↑L (↑p1 x) ∈ LinearMap.range L.toLinearMap\n⊢ inner (↑L (↑p1 x)) (↑L3 (↑p2 x)) = 0\n[PROOFSTEP]\nhave Lp2x : L3 (p2 x) ∈ (LinearMap.range L.toLinearMap)ᗮ :=\n  by\n  simp only [LinearIsometry.coe_comp, Function.comp_apply, Submodule.coe_subtypeₗᵢ, ← Submodule.range_subtype LSᗮ]\n  apply LinearMap.mem_range_self\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹² : IsROrC 𝕜\nE✝ : Type u_4\ninst✝¹¹ : NormedAddCommGroup E✝\ninst✝¹⁰ : InnerProductSpace 𝕜 E✝\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝⁵ : NormedAddCommGroup F'\ninst✝⁴ : InnerProductSpace ℝ F'\ninst✝³ : Fintype ι\nV : Type u_8\ninst✝² : NormedAddCommGroup V\ninst✝¹ : InnerProductSpace 𝕜 V\ninst✝ : FiniteDimensional 𝕜 V\nS : Submodule 𝕜 V\nL✝ L : { x // x ∈ S } →ₗᵢ[𝕜] V\nd : ℕ := finrank 𝕜 { x // x ∈ Sᗮ }\nLS : Submodule 𝕜 V := LinearMap.range L.toLinearMap\nE : { x // x ∈ Sᗮ } ≃ₗᵢ[𝕜] { x // x ∈ LSᗮ }\nL3 : { x // x ∈ Sᗮ } →ₗᵢ[𝕜] V := comp (subtypeₗᵢ LSᗮ) (LinearIsometryEquiv.toLinearIsometry E)\nthis✝ : CompleteSpace { x // x ∈ S }\nthis : CompleteSpace V\np1 : V →ₗ[𝕜] { x // x ∈ S } := ↑(orthogonalProjection S)\np2 : V →ₗ[𝕜] { x // x ∈ Sᗮ } := ↑(orthogonalProjection Sᗮ)\nM : V →ₗ[𝕜] V := LinearMap.comp L.toLinearMap p1 + LinearMap.comp L3.toLinearMap p2\nx : V\nMx_decomp : ↑M x = ↑L (↑p1 x) + ↑L3 (↑p2 x)\nLp1x : ↑L (↑p1 x) ∈ LinearMap.range L.toLinearMap\n⊢ ↑L3 (↑p2 x) ∈ (LinearMap.range L.toLinearMap)ᗮ\n[PROOFSTEP]\nsimp only [LinearIsometry.coe_comp, Function.comp_apply, Submodule.coe_subtypeₗᵢ, ← Submodule.range_subtype LSᗮ]\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹² : IsROrC 𝕜\nE✝ : Type u_4\ninst✝¹¹ : NormedAddCommGroup E✝\ninst✝¹⁰ : InnerProductSpace 𝕜 E✝\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝⁵ : NormedAddCommGroup F'\ninst✝⁴ : InnerProductSpace ℝ F'\ninst✝³ : Fintype ι\nV : Type u_8\ninst✝² : NormedAddCommGroup V\ninst✝¹ : InnerProductSpace 𝕜 V\ninst✝ : FiniteDimensional 𝕜 V\nS : Submodule 𝕜 V\nL✝ L : { x // x ∈ S } →ₗᵢ[𝕜] V\nd : ℕ := finrank 𝕜 { x // x ∈ Sᗮ }\nLS : Submodule 𝕜 V := LinearMap.range L.toLinearMap\nE : { x // x ∈ Sᗮ } ≃ₗᵢ[𝕜] { x // x ∈ LSᗮ }\nL3 : { x // x ∈ Sᗮ } →ₗᵢ[𝕜] V := comp (subtypeₗᵢ LSᗮ) (LinearIsometryEquiv.toLinearIsometry E)\nthis✝ : CompleteSpace { x // x ∈ S }\nthis : CompleteSpace V\np1 : V →ₗ[𝕜] { x // x ∈ S } := ↑(orthogonalProjection S)\np2 : V →ₗ[𝕜] { x // x ∈ Sᗮ } := ↑(orthogonalProjection Sᗮ)\nM : V →ₗ[𝕜] V := LinearMap.comp L.toLinearMap p1 + LinearMap.comp L3.toLinearMap p2\nx : V\nMx_decomp : ↑M x = ↑L (↑p1 x) + ↑L3 (↑p2 x)\nLp1x : ↑L (↑p1 x) ∈ LinearMap.range L.toLinearMap\n⊢ ↑(Submodule.subtype (LinearMap.range L.toLinearMap)ᗮ)\n      (↑(LinearIsometryEquiv.toLinearIsometry E) (↑↑(orthogonalProjection Sᗮ) x)) ∈\n    LinearMap.range (Submodule.subtype (LinearMap.range L.toLinearMap)ᗮ)\n[PROOFSTEP]\napply LinearMap.mem_range_self\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹² : IsROrC 𝕜\nE✝ : Type u_4\ninst✝¹¹ : NormedAddCommGroup E✝\ninst✝¹⁰ : InnerProductSpace 𝕜 E✝\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝⁵ : NormedAddCommGroup F'\ninst✝⁴ : InnerProductSpace ℝ F'\ninst✝³ : Fintype ι\nV : Type u_8\ninst✝² : NormedAddCommGroup V\ninst✝¹ : InnerProductSpace 𝕜 V\ninst✝ : FiniteDimensional 𝕜 V\nS : Submodule 𝕜 V\nL✝ L : { x // x ∈ S } →ₗᵢ[𝕜] V\nd : ℕ := finrank 𝕜 { x // x ∈ Sᗮ }\nLS : Submodule 𝕜 V := LinearMap.range L.toLinearMap\nE : { x // x ∈ Sᗮ } ≃ₗᵢ[𝕜] { x // x ∈ LSᗮ }\nL3 : { x // x ∈ Sᗮ } →ₗᵢ[𝕜] V := comp (subtypeₗᵢ LSᗮ) (LinearIsometryEquiv.toLinearIsometry E)\nthis✝ : CompleteSpace { x // x ∈ S }\nthis : CompleteSpace V\np1 : V →ₗ[𝕜] { x // x ∈ S } := ↑(orthogonalProjection S)\np2 : V →ₗ[𝕜] { x // x ∈ Sᗮ } := ↑(orthogonalProjection Sᗮ)\nM : V →ₗ[𝕜] V := LinearMap.comp L.toLinearMap p1 + LinearMap.comp L3.toLinearMap p2\nx : V\nMx_decomp : ↑M x = ↑L (↑p1 x) + ↑L3 (↑p2 x)\nLp1x : ↑L (↑p1 x) ∈ LinearMap.range L.toLinearMap\nLp2x : ↑L3 (↑p2 x) ∈ (LinearMap.range L.toLinearMap)ᗮ\n⊢ inner (↑L (↑p1 x)) (↑L3 (↑p2 x)) = 0\n[PROOFSTEP]\napply Submodule.inner_right_of_mem_orthogonal Lp1x Lp2x\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹² : IsROrC 𝕜\nE✝ : Type u_4\ninst✝¹¹ : NormedAddCommGroup E✝\ninst✝¹⁰ : InnerProductSpace 𝕜 E✝\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝⁵ : NormedAddCommGroup F'\ninst✝⁴ : InnerProductSpace ℝ F'\ninst✝³ : Fintype ι\nV : Type u_8\ninst✝² : NormedAddCommGroup V\ninst✝¹ : InnerProductSpace 𝕜 V\ninst✝ : FiniteDimensional 𝕜 V\nS : Submodule 𝕜 V\nL✝ L : { x // x ∈ S } →ₗᵢ[𝕜] V\nd : ℕ := finrank 𝕜 { x // x ∈ Sᗮ }\nLS : Submodule 𝕜 V := LinearMap.range L.toLinearMap\nE : { x // x ∈ Sᗮ } ≃ₗᵢ[𝕜] { x // x ∈ LSᗮ }\nL3 : { x // x ∈ Sᗮ } →ₗᵢ[𝕜] V := comp (subtypeₗᵢ LSᗮ) (LinearIsometryEquiv.toLinearIsometry E)\nthis✝ : CompleteSpace { x // x ∈ S }\nthis : CompleteSpace V\np1 : V →ₗ[𝕜] { x // x ∈ S } := ↑(orthogonalProjection S)\np2 : V →ₗ[𝕜] { x // x ∈ Sᗮ } := ↑(orthogonalProjection Sᗮ)\nM : V →ₗ[𝕜] V := LinearMap.comp L.toLinearMap p1 + LinearMap.comp L3.toLinearMap p2\nx : V\nMx_decomp : ↑M x = ↑L (↑p1 x) + ↑L3 (↑p2 x)\nMx_orth : inner (↑L (↑p1 x)) (↑L3 (↑p2 x)) = 0\n⊢ ‖↑M x‖ = ‖x‖\n[PROOFSTEP]\nrw [← sq_eq_sq (norm_nonneg _) (norm_nonneg _), norm_sq_eq_add_norm_sq_projection x S]\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹² : IsROrC 𝕜\nE✝ : Type u_4\ninst✝¹¹ : NormedAddCommGroup E✝\ninst✝¹⁰ : InnerProductSpace 𝕜 E✝\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝⁵ : NormedAddCommGroup F'\ninst✝⁴ : InnerProductSpace ℝ F'\ninst✝³ : Fintype ι\nV : Type u_8\ninst✝² : NormedAddCommGroup V\ninst✝¹ : InnerProductSpace 𝕜 V\ninst✝ : FiniteDimensional 𝕜 V\nS : Submodule 𝕜 V\nL✝ L : { x // x ∈ S } →ₗᵢ[𝕜] V\nd : ℕ := finrank 𝕜 { x // x ∈ Sᗮ }\nLS : Submodule 𝕜 V := LinearMap.range L.toLinearMap\nE : { x // x ∈ Sᗮ } ≃ₗᵢ[𝕜] { x // x ∈ LSᗮ }\nL3 : { x // x ∈ Sᗮ } →ₗᵢ[𝕜] V := comp (subtypeₗᵢ LSᗮ) (LinearIsometryEquiv.toLinearIsometry E)\nthis✝ : CompleteSpace { x // x ∈ S }\nthis : CompleteSpace V\np1 : V →ₗ[𝕜] { x // x ∈ S } := ↑(orthogonalProjection S)\np2 : V →ₗ[𝕜] { x // x ∈ Sᗮ } := ↑(orthogonalProjection Sᗮ)\nM : V →ₗ[𝕜] V := LinearMap.comp L.toLinearMap p1 + LinearMap.comp L3.toLinearMap p2\nx : V\nMx_decomp : ↑M x = ↑L (↑p1 x) + ↑L3 (↑p2 x)\nMx_orth : inner (↑L (↑p1 x)) (↑L3 (↑p2 x)) = 0\n⊢ ‖↑M x‖ ^ 2 = ‖↑(orthogonalProjection S) x‖ ^ 2 + ‖↑(orthogonalProjection Sᗮ) x‖ ^ 2\n[PROOFSTEP]\nsimp only [sq, Mx_decomp]\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹² : IsROrC 𝕜\nE✝ : Type u_4\ninst✝¹¹ : NormedAddCommGroup E✝\ninst✝¹⁰ : InnerProductSpace 𝕜 E✝\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝⁵ : NormedAddCommGroup F'\ninst✝⁴ : InnerProductSpace ℝ F'\ninst✝³ : Fintype ι\nV : Type u_8\ninst✝² : NormedAddCommGroup V\ninst✝¹ : InnerProductSpace 𝕜 V\ninst✝ : FiniteDimensional 𝕜 V\nS : Submodule 𝕜 V\nL✝ L : { x // x ∈ S } →ₗᵢ[𝕜] V\nd : ℕ := finrank 𝕜 { x // x ∈ Sᗮ }\nLS : Submodule 𝕜 V := LinearMap.range L.toLinearMap\nE : { x // x ∈ Sᗮ } ≃ₗᵢ[𝕜] { x // x ∈ LSᗮ }\nL3 : { x // x ∈ Sᗮ } →ₗᵢ[𝕜] V := comp (subtypeₗᵢ LSᗮ) (LinearIsometryEquiv.toLinearIsometry E)\nthis✝ : CompleteSpace { x // x ∈ S }\nthis : CompleteSpace V\np1 : V →ₗ[𝕜] { x // x ∈ S } := ↑(orthogonalProjection S)\np2 : V →ₗ[𝕜] { x // x ∈ Sᗮ } := ↑(orthogonalProjection Sᗮ)\nM : V →ₗ[𝕜] V := LinearMap.comp L.toLinearMap p1 + LinearMap.comp L3.toLinearMap p2\nx : V\nMx_decomp : ↑M x = ↑L (↑p1 x) + ↑L3 (↑p2 x)\nMx_orth : inner (↑L (↑p1 x)) (↑L3 (↑p2 x)) = 0\n⊢ ‖↑L (↑↑(orthogonalProjection S) x) +\n          ↑(comp (subtypeₗᵢ (LinearMap.range L.toLinearMap)ᗮ) (LinearIsometryEquiv.toLinearIsometry E))\n            (↑↑(orthogonalProjection Sᗮ) x)‖ *\n      ‖↑L (↑↑(orthogonalProjection S) x) +\n          ↑(comp (subtypeₗᵢ (LinearMap.range L.toLinearMap)ᗮ) (LinearIsometryEquiv.toLinearIsometry E))\n            (↑↑(orthogonalProjection Sᗮ) x)‖ =\n    ‖↑(orthogonalProjection S) x‖ * ‖↑(orthogonalProjection S) x‖ +\n      ‖↑(orthogonalProjection Sᗮ) x‖ * ‖↑(orthogonalProjection Sᗮ) x‖\n[PROOFSTEP]\nrw [norm_add_sq_eq_norm_sq_add_norm_sq_of_inner_eq_zero (L (p1 x)) (L3 (p2 x)) Mx_orth]\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹² : IsROrC 𝕜\nE✝ : Type u_4\ninst✝¹¹ : NormedAddCommGroup E✝\ninst✝¹⁰ : InnerProductSpace 𝕜 E✝\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝⁵ : NormedAddCommGroup F'\ninst✝⁴ : InnerProductSpace ℝ F'\ninst✝³ : Fintype ι\nV : Type u_8\ninst✝² : NormedAddCommGroup V\ninst✝¹ : InnerProductSpace 𝕜 V\ninst✝ : FiniteDimensional 𝕜 V\nS : Submodule 𝕜 V\nL✝ L : { x // x ∈ S } →ₗᵢ[𝕜] V\nd : ℕ := finrank 𝕜 { x // x ∈ Sᗮ }\nLS : Submodule 𝕜 V := LinearMap.range L.toLinearMap\nE : { x // x ∈ Sᗮ } ≃ₗᵢ[𝕜] { x // x ∈ LSᗮ }\nL3 : { x // x ∈ Sᗮ } →ₗᵢ[𝕜] V := comp (subtypeₗᵢ LSᗮ) (LinearIsometryEquiv.toLinearIsometry E)\nthis✝ : CompleteSpace { x // x ∈ S }\nthis : CompleteSpace V\np1 : V →ₗ[𝕜] { x // x ∈ S } := ↑(orthogonalProjection S)\np2 : V →ₗ[𝕜] { x // x ∈ Sᗮ } := ↑(orthogonalProjection Sᗮ)\nM : V →ₗ[𝕜] V := LinearMap.comp L.toLinearMap p1 + LinearMap.comp L3.toLinearMap p2\nx : V\nMx_decomp : ↑M x = ↑L (↑p1 x) + ↑L3 (↑p2 x)\nMx_orth : inner (↑L (↑p1 x)) (↑L3 (↑p2 x)) = 0\n⊢ ‖↑L (↑p1 x)‖ * ‖↑L (↑p1 x)‖ + ‖↑L3 (↑p2 x)‖ * ‖↑L3 (↑p2 x)‖ =\n    ‖↑(orthogonalProjection S) x‖ * ‖↑(orthogonalProjection S) x‖ +\n      ‖↑(orthogonalProjection Sᗮ) x‖ * ‖↑(orthogonalProjection Sᗮ) x‖\n[PROOFSTEP]\nsimp only [LinearIsometry.norm_map, _root_.add_left_inj, mul_eq_mul_left_iff, norm_eq_zero, true_or_iff,\n  eq_self_iff_true, ContinuousLinearMap.coe_coe, Submodule.coe_norm, Submodule.coe_eq_zero]\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹² : IsROrC 𝕜\nE✝ : Type u_4\ninst✝¹¹ : NormedAddCommGroup E✝\ninst✝¹⁰ : InnerProductSpace 𝕜 E✝\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝⁵ : NormedAddCommGroup F'\ninst✝⁴ : InnerProductSpace ℝ F'\ninst✝³ : Fintype ι\nV : Type u_8\ninst✝² : NormedAddCommGroup V\ninst✝¹ : InnerProductSpace 𝕜 V\ninst✝ : FiniteDimensional 𝕜 V\nS : Submodule 𝕜 V\nL✝ L : { x // x ∈ S } →ₗᵢ[𝕜] V\nd : ℕ := finrank 𝕜 { x // x ∈ Sᗮ }\nLS : Submodule 𝕜 V := LinearMap.range L.toLinearMap\nE : { x // x ∈ Sᗮ } ≃ₗᵢ[𝕜] { x // x ∈ LSᗮ }\nL3 : { x // x ∈ Sᗮ } →ₗᵢ[𝕜] V := comp (subtypeₗᵢ LSᗮ) (LinearIsometryEquiv.toLinearIsometry E)\nthis✝ : CompleteSpace { x // x ∈ S }\nthis : CompleteSpace V\np1 : V →ₗ[𝕜] { x // x ∈ S } := ↑(orthogonalProjection S)\np2 : V →ₗ[𝕜] { x // x ∈ Sᗮ } := ↑(orthogonalProjection Sᗮ)\nM : V →ₗ[𝕜] V := LinearMap.comp L.toLinearMap p1 + LinearMap.comp L3.toLinearMap p2\nM_norm_map : ∀ (x : V), ‖↑M x‖ = ‖x‖\n⊢ V →ₗᵢ[𝕜] V\n[PROOFSTEP]\nexact\n  { toLinearMap := M\n    norm_map' := M_norm_map }\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹² : IsROrC 𝕜\nE : Type u_4\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝⁵ : NormedAddCommGroup F'\ninst✝⁴ : InnerProductSpace ℝ F'\ninst✝³ : Fintype ι\nV : Type u_8\ninst✝² : NormedAddCommGroup V\ninst✝¹ : InnerProductSpace 𝕜 V\ninst✝ : FiniteDimensional 𝕜 V\nS : Submodule 𝕜 V\nL✝ L : { x // x ∈ S } →ₗᵢ[𝕜] V\ns : { x // x ∈ S }\n⊢ ↑(extend L) ↑s = ↑L s\n[PROOFSTEP]\nhaveI : CompleteSpace S := FiniteDimensional.complete 𝕜 S\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹² : IsROrC 𝕜\nE : Type u_4\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝⁵ : NormedAddCommGroup F'\ninst✝⁴ : InnerProductSpace ℝ F'\ninst✝³ : Fintype ι\nV : Type u_8\ninst✝² : NormedAddCommGroup V\ninst✝¹ : InnerProductSpace 𝕜 V\ninst✝ : FiniteDimensional 𝕜 V\nS : Submodule 𝕜 V\nL✝ L : { x // x ∈ S } →ₗᵢ[𝕜] V\ns : { x // x ∈ S }\nthis : CompleteSpace { x // x ∈ S }\n⊢ ↑(extend L) ↑s = ↑L s\n[PROOFSTEP]\nsimp only [LinearIsometry.extend, ← LinearIsometry.coe_toLinearMap]\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹² : IsROrC 𝕜\nE : Type u_4\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝⁵ : NormedAddCommGroup F'\ninst✝⁴ : InnerProductSpace ℝ F'\ninst✝³ : Fintype ι\nV : Type u_8\ninst✝² : NormedAddCommGroup V\ninst✝¹ : InnerProductSpace 𝕜 V\ninst✝ : FiniteDimensional 𝕜 V\nS : Submodule 𝕜 V\nL✝ L : { x // x ∈ S } →ₗᵢ[𝕜] V\ns : { x // x ∈ S }\nthis : CompleteSpace { x // x ∈ S }\n⊢ ↑(LinearMap.comp L.toLinearMap ↑(orthogonalProjection S) +\n          LinearMap.comp\n            (comp (subtypeₗᵢ (LinearMap.range L.toLinearMap)ᗮ)\n                (LinearIsometryEquiv.toLinearIsometry\n                  (LinearIsometryEquiv.trans (stdOrthonormalBasis 𝕜 { x // x ∈ Sᗮ }).repr\n                    (LinearIsometryEquiv.symm\n                      (OrthonormalBasis.reindex (stdOrthonormalBasis 𝕜 { x // x ∈ (LinearMap.range L.toLinearMap)ᗮ })\n                          (finCongr\n                            (_ :\n                              finrank 𝕜 { x // x ∈ (LinearMap.range L.toLinearMap)ᗮ } =\n                                finrank 𝕜 { x // x ∈ Sᗮ }))).repr)))).toLinearMap\n            ↑(orthogonalProjection Sᗮ))\n      ↑s =\n    ↑L.toLinearMap s\n[PROOFSTEP]\nsimp only [add_right_eq_self, LinearIsometry.coe_toLinearMap, LinearIsometryEquiv.coe_toLinearIsometry,\n  LinearIsometry.coe_comp, Function.comp_apply, orthogonalProjection_mem_subspace_eq_self, LinearMap.coe_comp,\n  ContinuousLinearMap.coe_coe, Submodule.coeSubtype, LinearMap.add_apply, Submodule.coe_eq_zero,\n  LinearIsometryEquiv.map_eq_zero_iff, Submodule.coe_subtypeₗᵢ,\n  orthogonalProjection_mem_subspace_orthogonalComplement_eq_zero, Submodule.orthogonal_orthogonal, Submodule.coe_mem]\n[GOAL]\nι : Type u_1\nι' : Type u_2\n𝕜 : Type u_3\ninst✝¹⁰ : IsROrC 𝕜\nE : Type u_4\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : InnerProductSpace 𝕜 E\nE' : Type u_5\ninst✝⁷ : NormedAddCommGroup E'\ninst✝⁶ : InnerProductSpace 𝕜 E'\nF : Type u_6\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\nF' : Type u_7\ninst✝³ : NormedAddCommGroup F'\ninst✝² : InnerProductSpace ℝ F'\ninst✝¹ : Fintype ι\nm : Type u_8\nn : Type u_9\ninst✝ : Fintype n\nA B : Matrix m n 𝕜\ni j : m\n⊢ inner (↑(PiLp.equiv 2 fun i => 𝕜).symm (A i)) (↑(PiLp.equiv 2 fun i => 𝕜).symm (B j)) = (B * Aᴴ) j i\n[PROOFSTEP]\nsimp_rw [EuclideanSpace.inner_piLp_equiv_symm, Matrix.mul_apply', Matrix.dotProduct_comm, Matrix.conjTranspose_apply,\n  Pi.star_def]\n", "meta": {"mathlib_filename": "Mathlib.Analysis.InnerProductSpace.PiL2", "llama_tokens": 84606, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8354835330070839, "lm_q2_score": 0.6187804337438501, "lm_q1q2_score": 0.5169808629399676}}
{"text": "[GOAL]\nα : Type u_1\ng : GeneralizedContinuedFraction α\nn : ℕ\n⊢ TerminatedAt g n ↔ Stream'.Seq.TerminatedAt g.s n\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\ng : GeneralizedContinuedFraction α\nn : ℕ\n⊢ TerminatedAt g n ↔ Stream'.Seq.get? g.s n = none\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\ng : GeneralizedContinuedFraction α\nn : ℕ\n⊢ Stream'.Seq.get? (partialNumerators g) n = none ↔ Stream'.Seq.get? g.s n = none\n[PROOFSTEP]\ncases s_nth_eq : g.s.get? n\n[GOAL]\ncase none\nα : Type u_1\ng : GeneralizedContinuedFraction α\nn : ℕ\ns_nth_eq : Stream'.Seq.get? g.s n = none\n⊢ Stream'.Seq.get? (partialNumerators g) n = none ↔ none = none\n[PROOFSTEP]\nsimp [partialNumerators, s_nth_eq]\n[GOAL]\ncase some\nα : Type u_1\ng : GeneralizedContinuedFraction α\nn : ℕ\nval✝ : Pair α\ns_nth_eq : Stream'.Seq.get? g.s n = some val✝\n⊢ Stream'.Seq.get? (partialNumerators g) n = none ↔ some val✝ = none\n[PROOFSTEP]\nsimp [partialNumerators, s_nth_eq]\n[GOAL]\nα : Type u_1\ng : GeneralizedContinuedFraction α\nn : ℕ\n⊢ TerminatedAt g n ↔ Stream'.Seq.get? (partialNumerators g) n = none\n[PROOFSTEP]\nrw [terminatedAt_iff_s_none, part_num_none_iff_s_none]\n[GOAL]\nα : Type u_1\ng : GeneralizedContinuedFraction α\nn : ℕ\n⊢ Stream'.Seq.get? (partialDenominators g) n = none ↔ Stream'.Seq.get? g.s n = none\n[PROOFSTEP]\ncases s_nth_eq : g.s.get? n\n[GOAL]\ncase none\nα : Type u_1\ng : GeneralizedContinuedFraction α\nn : ℕ\ns_nth_eq : Stream'.Seq.get? g.s n = none\n⊢ Stream'.Seq.get? (partialDenominators g) n = none ↔ none = none\n[PROOFSTEP]\nsimp [partialDenominators, s_nth_eq]\n[GOAL]\ncase some\nα : Type u_1\ng : GeneralizedContinuedFraction α\nn : ℕ\nval✝ : Pair α\ns_nth_eq : Stream'.Seq.get? g.s n = some val✝\n⊢ Stream'.Seq.get? (partialDenominators g) n = none ↔ some val✝ = none\n[PROOFSTEP]\nsimp [partialDenominators, s_nth_eq]\n[GOAL]\nα : Type u_1\ng : GeneralizedContinuedFraction α\nn : ℕ\n⊢ TerminatedAt g n ↔ Stream'.Seq.get? (partialDenominators g) n = none\n[PROOFSTEP]\nrw [terminatedAt_iff_s_none, part_denom_none_iff_s_none]\n[GOAL]\nα : Type u_1\ng : GeneralizedContinuedFraction α\nn : ℕ\ngp : Pair α\ns_nth_eq : Stream'.Seq.get? g.s n = some gp\n⊢ Stream'.Seq.get? (partialNumerators g) n = some gp.a\n[PROOFSTEP]\nsimp [partialNumerators, s_nth_eq]\n[GOAL]\nα : Type u_1\ng : GeneralizedContinuedFraction α\nn : ℕ\ngp : Pair α\ns_nth_eq : Stream'.Seq.get? g.s n = some gp\n⊢ Stream'.Seq.get? (partialDenominators g) n = some gp.b\n[PROOFSTEP]\nsimp [partialDenominators, s_nth_eq]\n[GOAL]\nα : Type u_1\ng : GeneralizedContinuedFraction α\nn : ℕ\na : α\nnth_part_num_eq : Stream'.Seq.get? (partialNumerators g) n = some a\n⊢ ∃ gp, Stream'.Seq.get? g.s n = some gp ∧ gp.a = a\n[PROOFSTEP]\nsimpa [partialNumerators, Stream'.Seq.map_get?] using nth_part_num_eq\n[GOAL]\nα : Type u_1\ng : GeneralizedContinuedFraction α\nn : ℕ\nb : α\nnth_part_denom_eq : Stream'.Seq.get? (partialDenominators g) n = some b\n⊢ ∃ gp, Stream'.Seq.get? g.s n = some gp ∧ gp.b = b\n[PROOFSTEP]\nsimpa [partialDenominators, Stream'.Seq.map_get?] using nth_part_denom_eq\n[GOAL]\nK : Type u_1\ng : GeneralizedContinuedFraction K\nn : ℕ\ninst✝ : DivisionRing K\nA : K\nnth_num_eq : numerators g n = A\n⊢ ∃ conts, continuants g n = conts ∧ conts.a = A\n[PROOFSTEP]\nsimpa\n[GOAL]\nK : Type u_1\ng : GeneralizedContinuedFraction K\nn : ℕ\ninst✝ : DivisionRing K\nB : K\nnth_denom_eq : denominators g n = B\n⊢ ∃ conts, continuants g n = conts ∧ conts.b = B\n[PROOFSTEP]\nsimpa\n[GOAL]\nK : Type u_1\ng : GeneralizedContinuedFraction K\nn : ℕ\ninst✝ : DivisionRing K\n⊢ convergents g 0 = g.h\n[PROOFSTEP]\nsimp [convergent_eq_num_div_denom, num_eq_conts_a, denom_eq_conts_b, div_one]\n[GOAL]\nK : Type u_1\ng : GeneralizedContinuedFraction K\nn : ℕ\ninst✝ : DivisionRing K\ngp : Pair K\nzeroth_s_eq : Stream'.Seq.get? g.s 0 = some gp\n⊢ continuantsAux g 2 = { a := gp.b * g.h + gp.a, b := gp.b }\n[PROOFSTEP]\nsimp [zeroth_s_eq, continuantsAux, nextContinuants, nextDenominator, nextNumerator]\n[GOAL]\nK : Type u_1\ng : GeneralizedContinuedFraction K\nn : ℕ\ninst✝ : DivisionRing K\ngp : Pair K\nzeroth_s_eq : Stream'.Seq.get? g.s 0 = some gp\n⊢ continuants g 1 = { a := gp.b * g.h + gp.a, b := gp.b }\n[PROOFSTEP]\nsimp [nth_cont_eq_succ_nth_cont_aux]\n  -- porting note: simp used to work here, but now it can't figure out that 1 + 1 = 2\n[GOAL]\nK : Type u_1\ng : GeneralizedContinuedFraction K\nn : ℕ\ninst✝ : DivisionRing K\ngp : Pair K\nzeroth_s_eq : Stream'.Seq.get? g.s 0 = some gp\n⊢ continuantsAux g (1 + 1) = { a := gp.b * g.h + gp.a, b := gp.b }\n[PROOFSTEP]\nconvert second_continuant_aux_eq zeroth_s_eq\n[GOAL]\nK : Type u_1\ng : GeneralizedContinuedFraction K\nn : ℕ\ninst✝ : DivisionRing K\ngp : Pair K\nzeroth_s_eq : Stream'.Seq.get? g.s 0 = some gp\n⊢ numerators g 1 = gp.b * g.h + gp.a\n[PROOFSTEP]\nsimp [num_eq_conts_a, first_continuant_eq zeroth_s_eq]\n[GOAL]\nK : Type u_1\ng : GeneralizedContinuedFraction K\nn : ℕ\ninst✝ : DivisionRing K\ngp : Pair K\nzeroth_s_eq : Stream'.Seq.get? g.s 0 = some gp\n⊢ denominators g 1 = gp.b\n[PROOFSTEP]\nsimp [denom_eq_conts_b, first_continuant_eq zeroth_s_eq]\n[GOAL]\nK : Type u_1\ng : GeneralizedContinuedFraction K\nn : ℕ\ninst✝ : DivisionRing K\n⊢ convergents' g 0 = g.h\n[PROOFSTEP]\nsimp [convergents']\n[GOAL]\nK : Type u_1\ng : GeneralizedContinuedFraction K\nn✝ : ℕ\ninst✝ : DivisionRing K\ns : Stream'.Seq (Pair K)\nh : Stream'.Seq.head s = none\nn : ℕ\n⊢ convergents'Aux s (n + 1) = 0\n[PROOFSTEP]\nsimp [convergents'Aux, h, convergents'Aux.match_1]\n[GOAL]\nK : Type u_1\ng : GeneralizedContinuedFraction K\nn✝ : ℕ\ninst✝ : DivisionRing K\ns : Stream'.Seq (Pair K)\np : Pair K\nh : Stream'.Seq.head s = some p\nn : ℕ\n⊢ convergents'Aux s (n + 1) = p.a / (p.b + convergents'Aux (Stream'.Seq.tail s) n)\n[PROOFSTEP]\nsimp [convergents'Aux, h, convergents'Aux.match_1]\n", "meta": {"mathlib_filename": "Mathlib.Algebra.ContinuedFractions.Translations", "llama_tokens": 2568, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7490872131147275, "lm_q2_score": 0.6893056231680121, "lm_q1q2_score": 0.5163500282432367}}
{"text": "[GOAL]\np : ℕ\nR : Type u_1\nS : Type u_2\nT : Type u_3\nhp : Fact (Nat.Prime p)\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : CommRing T\nα : Type u_4\nβ : Type u_5\nf : α → β\nhf : Injective f\n⊢ Injective (mapFun f)\n[PROOFSTEP]\nintros _ _ h\n[GOAL]\np : ℕ\nR : Type u_1\nS : Type u_2\nT : Type u_3\nhp : Fact (Nat.Prime p)\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : CommRing T\nα : Type u_4\nβ : Type u_5\nf : α → β\nhf : Injective f\na₁✝ a₂✝ : 𝕎 α\nh : mapFun f a₁✝ = mapFun f a₂✝\n⊢ a₁✝ = a₂✝\n[PROOFSTEP]\next p\n[GOAL]\ncase h\np✝ : ℕ\nR : Type u_1\nS : Type u_2\nT : Type u_3\nhp : Fact (Nat.Prime p✝)\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : CommRing T\nα : Type u_4\nβ : Type u_5\nf : α → β\nhf : Injective f\na₁✝ a₂✝ : WittVector p✝ α\nh : mapFun f a₁✝ = mapFun f a₂✝\np : ℕ\n⊢ coeff a₁✝ p = coeff a₂✝ p\n[PROOFSTEP]\nexact hf (congr_arg (fun x => coeff x p) h : _)\n[GOAL]\np : ℕ\nR : Type u_1\nS : Type u_2\nT : Type u_3\nhp : Fact (Nat.Prime p)\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : CommRing T\nα : Type u_4\nβ : Type u_5\nf : α → β\nhf : Surjective f\nx : 𝕎 β\n⊢ mapFun f (mk p fun n => Classical.choose (_ : ∃ a, f a = coeff x n)) = x\n[PROOFSTEP]\next n\n[GOAL]\ncase h\np : ℕ\nR : Type u_1\nS : Type u_2\nT : Type u_3\nhp : Fact (Nat.Prime p)\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : CommRing T\nα : Type u_4\nβ : Type u_5\nf : α → β\nhf : Surjective f\nx : 𝕎 β\nn : ℕ\n⊢ coeff (mapFun f (mk p fun n => Classical.choose (_ : ∃ a, f a = coeff x n))) n = coeff x n\n[PROOFSTEP]\nsimp only [mapFun, coeff_mk, comp_apply, Classical.choose_spec (hf (x.coeff n))]\n[GOAL]\np : ℕ\nR : Type u_1\nS : Type u_2\nT : Type u_3\nhp : Fact (Nat.Prime p)\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : CommRing T\nα : Type u_4\nβ : Type u_5\nf : R →+* S\nx y : 𝕎 R\n⊢ mapFun (↑f) 0 = 0\n[PROOFSTEP]\nmap_fun_tac\n[GOAL]\np : ℕ\nR : Type u_1\nS : Type u_2\nT : Type u_3\nhp : Fact (Nat.Prime p)\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : CommRing T\nα : Type u_4\nβ : Type u_5\nf : R →+* S\nx y : 𝕎 R\n⊢ mapFun (↑f) 1 = 1\n[PROOFSTEP]\nmap_fun_tac\n[GOAL]\np : ℕ\nR : Type u_1\nS : Type u_2\nT : Type u_3\nhp : Fact (Nat.Prime p)\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : CommRing T\nα : Type u_4\nβ : Type u_5\nf : R →+* S\nx y : 𝕎 R\n⊢ mapFun (↑f) (x + y) = mapFun (↑f) x + mapFun (↑f) y\n[PROOFSTEP]\nmap_fun_tac\n[GOAL]\np : ℕ\nR : Type u_1\nS : Type u_2\nT : Type u_3\nhp : Fact (Nat.Prime p)\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : CommRing T\nα : Type u_4\nβ : Type u_5\nf : R →+* S\nx y : 𝕎 R\n⊢ mapFun (↑f) (x - y) = mapFun (↑f) x - mapFun (↑f) y\n[PROOFSTEP]\nmap_fun_tac\n[GOAL]\np : ℕ\nR : Type u_1\nS : Type u_2\nT : Type u_3\nhp : Fact (Nat.Prime p)\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : CommRing T\nα : Type u_4\nβ : Type u_5\nf : R →+* S\nx y : 𝕎 R\n⊢ mapFun (↑f) (x * y) = mapFun (↑f) x * mapFun (↑f) y\n[PROOFSTEP]\nmap_fun_tac\n[GOAL]\np : ℕ\nR : Type u_1\nS : Type u_2\nT : Type u_3\nhp : Fact (Nat.Prime p)\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : CommRing T\nα : Type u_4\nβ : Type u_5\nf : R →+* S\nx y : 𝕎 R\n⊢ mapFun (↑f) (-x) = -mapFun (↑f) x\n[PROOFSTEP]\nmap_fun_tac\n[GOAL]\np : ℕ\nR : Type u_1\nS : Type u_2\nT : Type u_3\nhp : Fact (Nat.Prime p)\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : CommRing T\nα : Type u_4\nβ : Type u_5\nf : R →+* S\nx y : 𝕎 R\nn : ℕ\n⊢ mapFun (↑f) (n • x) = n • mapFun (↑f) x\n[PROOFSTEP]\nmap_fun_tac\n[GOAL]\np : ℕ\nR : Type u_1\nS : Type u_2\nT : Type u_3\nhp : Fact (Nat.Prime p)\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : CommRing T\nα : Type u_4\nβ : Type u_5\nf : R →+* S\nx y : 𝕎 R\nz : ℤ\n⊢ mapFun (↑f) (z • x) = z • mapFun (↑f) x\n[PROOFSTEP]\nmap_fun_tac\n[GOAL]\np : ℕ\nR : Type u_1\nS : Type u_2\nT : Type u_3\nhp : Fact (Nat.Prime p)\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : CommRing T\nα : Type u_4\nβ : Type u_5\nf : R →+* S\nx y : 𝕎 R\nn : ℕ\n⊢ mapFun (↑f) (x ^ n) = mapFun (↑f) x ^ n\n[PROOFSTEP]\nmap_fun_tac\n[GOAL]\np : ℕ\nR : Type u_1\nS : Type u_2\nT : Type u_3\nhp : Fact (Nat.Prime p)\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : CommRing T\nα : Type u_4\nβ : Type u_5\nf : R →+* S\nx y : 𝕎 R\nn : ℕ\n⊢ mapFun (↑f) (Nat.unaryCast n) = ↑n\n[PROOFSTEP]\ninduction n\n[GOAL]\ncase zero\np : ℕ\nR : Type u_1\nS : Type u_2\nT : Type u_3\nhp : Fact (Nat.Prime p)\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : CommRing T\nα : Type u_4\nβ : Type u_5\nf : R →+* S\nx y : 𝕎 R\n⊢ mapFun (↑f) (Nat.unaryCast Nat.zero) = ↑Nat.zero\n[PROOFSTEP]\nsimp [*, Nat.unaryCast, add, one, zero]\n[GOAL]\ncase succ\np : ℕ\nR : Type u_1\nS : Type u_2\nT : Type u_3\nhp : Fact (Nat.Prime p)\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : CommRing T\nα : Type u_4\nβ : Type u_5\nf : R →+* S\nx y : 𝕎 R\nn✝ : ℕ\nn_ih✝ : mapFun (↑f) (Nat.unaryCast n✝) = ↑n✝\n⊢ mapFun (↑f) (Nat.unaryCast (Nat.succ n✝)) = ↑(Nat.succ n✝)\n[PROOFSTEP]\nsimp [*, Nat.unaryCast, add, one, zero]\n[GOAL]\ncase zero\np : ℕ\nR : Type u_1\nS : Type u_2\nT : Type u_3\nhp : Fact (Nat.Prime p)\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : CommRing T\nα : Type u_4\nβ : Type u_5\nf : R →+* S\nx y : 𝕎 R\n⊢ 0 = ↑0\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ\np : ℕ\nR : Type u_1\nS : Type u_2\nT : Type u_3\nhp : Fact (Nat.Prime p)\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : CommRing T\nα : Type u_4\nβ : Type u_5\nf : R →+* S\nx y : 𝕎 R\nn✝ : ℕ\nn_ih✝ : mapFun (↑f) (Nat.unaryCast n✝) = ↑n✝\n⊢ ↑n✝ + 1 = ↑(Nat.succ n✝)\n[PROOFSTEP]\nrfl\n[GOAL]\np : ℕ\nR : Type u_1\nS : Type u_2\nT : Type u_3\nhp : Fact (Nat.Prime p)\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : CommRing T\nα : Type u_4\nβ : Type u_5\nf : R →+* S\nx y : 𝕎 R\nn : ℤ\n⊢ mapFun (↑f) (Int.castDef n) = ↑n\n[PROOFSTEP]\ncases n\n[GOAL]\ncase ofNat\np : ℕ\nR : Type u_1\nS : Type u_2\nT : Type u_3\nhp : Fact (Nat.Prime p)\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : CommRing T\nα : Type u_4\nβ : Type u_5\nf : R →+* S\nx y : 𝕎 R\na✝ : ℕ\n⊢ mapFun (↑f) (Int.castDef (Int.ofNat a✝)) = ↑(Int.ofNat a✝)\n[PROOFSTEP]\nsimp [*, Int.castDef, add, one, neg, zero, nat_cast]\n[GOAL]\ncase negSucc\np : ℕ\nR : Type u_1\nS : Type u_2\nT : Type u_3\nhp : Fact (Nat.Prime p)\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : CommRing T\nα : Type u_4\nβ : Type u_5\nf : R →+* S\nx y : 𝕎 R\na✝ : ℕ\n⊢ mapFun (↑f) (Int.castDef (Int.negSucc a✝)) = ↑(Int.negSucc a✝)\n[PROOFSTEP]\nsimp [*, Int.castDef, add, one, neg, zero, nat_cast]\n[GOAL]\ncase ofNat\np : ℕ\nR : Type u_1\nS : Type u_2\nT : Type u_3\nhp : Fact (Nat.Prime p)\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : CommRing T\nα : Type u_4\nβ : Type u_5\nf : R →+* S\nx y : 𝕎 R\na✝ : ℕ\n⊢ ↑a✝ = ↑↑a✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase negSucc\np : ℕ\nR : Type u_1\nS : Type u_2\nT : Type u_3\nhp : Fact (Nat.Prime p)\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : CommRing T\nα : Type u_4\nβ : Type u_5\nf : R →+* S\nx y : 𝕎 R\na✝ : ℕ\n⊢ -↑(a✝ + 1) = ↑(Int.negSucc a✝)\n[PROOFSTEP]\nrfl\n[GOAL]\np : ℕ\nR✝ : Type u_1\nS : Type u_2\nT : Type u_3\nhp : Fact (Nat.Prime p)\ninst✝² : CommRing R✝\ninst✝¹ : CommRing S\ninst✝ : CommRing T\nα : Type u_4\nβ : Type u_5\nx y : 𝕎 R✝\nR : Type u_6\ni : Fin 0\nj : ℕ\n⊢ coeff ![] j = ![]\n[PROOFSTEP]\nrcases i with ⟨_ | _ | _ | _ | i_val, ⟨⟩⟩\n[GOAL]\np : ℕ\nR : Type u_1\nS : Type u_2\nT : Type u_3\nhp : Fact (Nat.Prime p)\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : CommRing T\nα : Type u_4\nβ : Type u_5\nx y : 𝕎 R\n⊢ WittVector.ghostFun 0 = 0\n[PROOFSTEP]\nghost_fun_tac 0,![]\n[GOAL]\np : ℕ\nR : Type u_1\nS : Type u_2\nT : Type u_3\nhp : Fact (Nat.Prime p)\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : CommRing T\nα : Type u_4\nβ : Type u_5\nx y : 𝕎 R\n⊢ WittVector.ghostFun 1 = 1\n[PROOFSTEP]\nghost_fun_tac 1,![]\n[GOAL]\np : ℕ\nR : Type u_1\nS : Type u_2\nT : Type u_3\nhp : Fact (Nat.Prime p)\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : CommRing T\nα : Type u_4\nβ : Type u_5\nx y : 𝕎 R\n⊢ WittVector.ghostFun (x + y) = WittVector.ghostFun x + WittVector.ghostFun y\n[PROOFSTEP]\nghost_fun_tac X 0 + X 1,![x.coeff, y.coeff]\n[GOAL]\np : ℕ\nR : Type u_1\nS : Type u_2\nT : Type u_3\nhp : Fact (Nat.Prime p)\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : CommRing T\nα : Type u_4\nβ : Type u_5\nx y : 𝕎 R\ni : ℕ\n⊢ WittVector.ghostFun (Nat.unaryCast i) = ↑i\n[PROOFSTEP]\ninduction i\n[GOAL]\ncase zero\np : ℕ\nR : Type u_1\nS : Type u_2\nT : Type u_3\nhp : Fact (Nat.Prime p)\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : CommRing T\nα : Type u_4\nβ : Type u_5\nx y : 𝕎 R\n⊢ WittVector.ghostFun (Nat.unaryCast Nat.zero) = ↑Nat.zero\n[PROOFSTEP]\nsimp [*, Nat.unaryCast, ghostFun_zero, ghostFun_one, ghostFun_add, -Pi.coe_nat]\n[GOAL]\ncase succ\np : ℕ\nR : Type u_1\nS : Type u_2\nT : Type u_3\nhp : Fact (Nat.Prime p)\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : CommRing T\nα : Type u_4\nβ : Type u_5\nx y : 𝕎 R\nn✝ : ℕ\nn_ih✝ : WittVector.ghostFun (Nat.unaryCast n✝) = ↑n✝\n⊢ WittVector.ghostFun (Nat.unaryCast (Nat.succ n✝)) = ↑(Nat.succ n✝)\n[PROOFSTEP]\nsimp [*, Nat.unaryCast, ghostFun_zero, ghostFun_one, ghostFun_add, -Pi.coe_nat]\n[GOAL]\np : ℕ\nR : Type u_1\nS : Type u_2\nT : Type u_3\nhp : Fact (Nat.Prime p)\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : CommRing T\nα : Type u_4\nβ : Type u_5\nx y : 𝕎 R\n⊢ WittVector.ghostFun (x - y) = WittVector.ghostFun x - WittVector.ghostFun y\n[PROOFSTEP]\nghost_fun_tac X 0 - X 1,![x.coeff, y.coeff]\n[GOAL]\np : ℕ\nR : Type u_1\nS : Type u_2\nT : Type u_3\nhp : Fact (Nat.Prime p)\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : CommRing T\nα : Type u_4\nβ : Type u_5\nx y : 𝕎 R\n⊢ WittVector.ghostFun (x * y) = WittVector.ghostFun x * WittVector.ghostFun y\n[PROOFSTEP]\nghost_fun_tac X 0 * X 1,![x.coeff, y.coeff]\n[GOAL]\np : ℕ\nR : Type u_1\nS : Type u_2\nT : Type u_3\nhp : Fact (Nat.Prime p)\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : CommRing T\nα : Type u_4\nβ : Type u_5\nx y : 𝕎 R\n⊢ WittVector.ghostFun (-x) = -WittVector.ghostFun x\n[PROOFSTEP]\nghost_fun_tac-X 0,![x.coeff]\n[GOAL]\np : ℕ\nR : Type u_1\nS : Type u_2\nT : Type u_3\nhp : Fact (Nat.Prime p)\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : CommRing T\nα : Type u_4\nβ : Type u_5\nx y : 𝕎 R\ni : ℤ\n⊢ WittVector.ghostFun (Int.castDef i) = ↑i\n[PROOFSTEP]\ncases i\n[GOAL]\ncase ofNat\np : ℕ\nR : Type u_1\nS : Type u_2\nT : Type u_3\nhp : Fact (Nat.Prime p)\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : CommRing T\nα : Type u_4\nβ : Type u_5\nx y : 𝕎 R\na✝ : ℕ\n⊢ WittVector.ghostFun (Int.castDef (Int.ofNat a✝)) = ↑(Int.ofNat a✝)\n[PROOFSTEP]\nsimp [*, Int.castDef, ghostFun_nat_cast, ghostFun_neg, -Pi.coe_nat, -Pi.coe_int]\n[GOAL]\ncase negSucc\np : ℕ\nR : Type u_1\nS : Type u_2\nT : Type u_3\nhp : Fact (Nat.Prime p)\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : CommRing T\nα : Type u_4\nβ : Type u_5\nx y : 𝕎 R\na✝ : ℕ\n⊢ WittVector.ghostFun (Int.castDef (Int.negSucc a✝)) = ↑(Int.negSucc a✝)\n[PROOFSTEP]\nsimp [*, Int.castDef, ghostFun_nat_cast, ghostFun_neg, -Pi.coe_nat, -Pi.coe_int]\n[GOAL]\np : ℕ\nR : Type u_1\nS : Type u_2\nT : Type u_3\nhp : Fact (Nat.Prime p)\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : CommRing T\nα : Type u_4\nβ : Type u_5\nx y : 𝕎 R\nm : ℕ\n⊢ WittVector.ghostFun (m • x) = m • WittVector.ghostFun x\n[PROOFSTEP]\nghost_fun_tac m • (X 0 : MvPolynomial _ ℤ),![x.coeff]\n[GOAL]\np : ℕ\nR : Type u_1\nS : Type u_2\nT : Type u_3\nhp : Fact (Nat.Prime p)\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : CommRing T\nα : Type u_4\nβ : Type u_5\nx y : 𝕎 R\nm : ℤ\n⊢ WittVector.ghostFun (m • x) = m • WittVector.ghostFun x\n[PROOFSTEP]\nghost_fun_tac m • (X 0 : MvPolynomial _ ℤ),![x.coeff]\n[GOAL]\np : ℕ\nR : Type u_1\nS : Type u_2\nT : Type u_3\nhp : Fact (Nat.Prime p)\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : CommRing T\nα : Type u_4\nβ : Type u_5\nx y : 𝕎 R\nm : ℕ\n⊢ WittVector.ghostFun (x ^ m) = WittVector.ghostFun x ^ m\n[PROOFSTEP]\nghost_fun_tac X 0 ^ m,![x.coeff]\n[GOAL]\np : ℕ\nR : Type u_1\nS : Type u_2\nT : Type u_3\nhp : Fact (Nat.Prime p)\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : CommRing T\nα : Type u_4\nβ : Type u_5\ninst✝ : Invertible ↑p\n⊢ LeftInverse (fun x => mk p fun n => ↑(aeval x) (xInTermsOfW p R n)) WittVector.ghostFun\n[PROOFSTEP]\nintro x\n[GOAL]\np : ℕ\nR : Type u_1\nS : Type u_2\nT : Type u_3\nhp : Fact (Nat.Prime p)\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : CommRing T\nα : Type u_4\nβ : Type u_5\ninst✝ : Invertible ↑p\nx : 𝕎 R\n⊢ (fun x => mk p fun n => ↑(aeval x) (xInTermsOfW p R n)) (WittVector.ghostFun x) = x\n[PROOFSTEP]\next n\n[GOAL]\ncase h\np : ℕ\nR : Type u_1\nS : Type u_2\nT : Type u_3\nhp : Fact (Nat.Prime p)\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : CommRing T\nα : Type u_4\nβ : Type u_5\ninst✝ : Invertible ↑p\nx : 𝕎 R\nn : ℕ\n⊢ coeff ((fun x => mk p fun n => ↑(aeval x) (xInTermsOfW p R n)) (WittVector.ghostFun x)) n = coeff x n\n[PROOFSTEP]\nhave := bind₁_wittPolynomial_xInTermsOfW p R n\n[GOAL]\ncase h\np : ℕ\nR : Type u_1\nS : Type u_2\nT : Type u_3\nhp : Fact (Nat.Prime p)\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : CommRing T\nα : Type u_4\nβ : Type u_5\ninst✝ : Invertible ↑p\nx : 𝕎 R\nn : ℕ\nthis : ↑(bind₁ (W_ R)) (xInTermsOfW p R n) = X n\n⊢ coeff ((fun x => mk p fun n => ↑(aeval x) (xInTermsOfW p R n)) (WittVector.ghostFun x)) n = coeff x n\n[PROOFSTEP]\napply_fun aeval x.coeff at this \n[GOAL]\ncase h\np : ℕ\nR : Type u_1\nS : Type u_2\nT : Type u_3\nhp : Fact (Nat.Prime p)\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : CommRing T\nα : Type u_4\nβ : Type u_5\ninst✝ : Invertible ↑p\nx : 𝕎 R\nn : ℕ\nthis : ↑(aeval x.coeff) (↑(bind₁ (W_ R)) (xInTermsOfW p R n)) = ↑(aeval x.coeff) (X n)\n⊢ coeff ((fun x => mk p fun n => ↑(aeval x) (xInTermsOfW p R n)) (WittVector.ghostFun x)) n = coeff x n\n[PROOFSTEP]\nsimpa only [aeval_bind₁, aeval_X, ghostFun, aeval_wittPolynomial]\n[GOAL]\np : ℕ\nR : Type u_1\nS : Type u_2\nT : Type u_3\nhp : Fact (Nat.Prime p)\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : CommRing T\nα : Type u_4\nβ : Type u_5\ninst✝ : Invertible ↑p\n⊢ Function.RightInverse (fun x => mk p fun n => ↑(aeval x) (xInTermsOfW p R n)) WittVector.ghostFun\n[PROOFSTEP]\nintro x\n[GOAL]\np : ℕ\nR : Type u_1\nS : Type u_2\nT : Type u_3\nhp : Fact (Nat.Prime p)\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : CommRing T\nα : Type u_4\nβ : Type u_5\ninst✝ : Invertible ↑p\nx : ℕ → R\n⊢ WittVector.ghostFun ((fun x => mk p fun n => ↑(aeval x) (xInTermsOfW p R n)) x) = x\n[PROOFSTEP]\next n\n[GOAL]\ncase h\np : ℕ\nR : Type u_1\nS : Type u_2\nT : Type u_3\nhp : Fact (Nat.Prime p)\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : CommRing T\nα : Type u_4\nβ : Type u_5\ninst✝ : Invertible ↑p\nx : ℕ → R\nn : ℕ\n⊢ WittVector.ghostFun ((fun x => mk p fun n => ↑(aeval x) (xInTermsOfW p R n)) x) n = x n\n[PROOFSTEP]\nhave := bind₁_xInTermsOfW_wittPolynomial p R n\n[GOAL]\ncase h\np : ℕ\nR : Type u_1\nS : Type u_2\nT : Type u_3\nhp : Fact (Nat.Prime p)\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : CommRing T\nα : Type u_4\nβ : Type u_5\ninst✝ : Invertible ↑p\nx : ℕ → R\nn : ℕ\nthis : ↑(bind₁ (xInTermsOfW p R)) (W_ R n) = X n\n⊢ WittVector.ghostFun ((fun x => mk p fun n => ↑(aeval x) (xInTermsOfW p R n)) x) n = x n\n[PROOFSTEP]\napply_fun aeval x at this \n[GOAL]\ncase h\np : ℕ\nR : Type u_1\nS : Type u_2\nT : Type u_3\nhp : Fact (Nat.Prime p)\ninst✝³ : CommRing R\ninst✝² : CommRing S\ninst✝¹ : CommRing T\nα : Type u_4\nβ : Type u_5\ninst✝ : Invertible ↑p\nx : ℕ → R\nn : ℕ\nthis : ↑(aeval x) (↑(bind₁ (xInTermsOfW p R)) (W_ R n)) = ↑(aeval x) (X n)\n⊢ WittVector.ghostFun ((fun x => mk p fun n => ↑(aeval x) (xInTermsOfW p R n)) x) n = x n\n[PROOFSTEP]\nsimpa only [aeval_bind₁, aeval_X, ghostFun, aeval_wittPolynomial]\n[GOAL]\np : ℕ\nR : Type u_1\nS : Type u_2\nT : Type u_3\nhp : Fact (Nat.Prime p)\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : CommRing T\nα : Type u_4\nβ : Type u_5\n⊢ (fun x => coeff x 0) 1 = 1\n[PROOFSTEP]\nsimp\n[GOAL]\np : ℕ\nR : Type u_1\nS : Type u_2\nT : Type u_3\nhp : Fact (Nat.Prime p)\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : CommRing T\nα : Type u_4\nβ : Type u_5\n⊢ OneHom.toFun\n      (↑{ toOneHom := { toFun := fun x => coeff x 0, map_one' := (_ : coeff 1 0 = 1) },\n          map_mul' := (_ : ∀ (x y : 𝕎 R), coeff (x * y) 0 = coeff x 0 * coeff y 0) })\n      0 =\n    0\n[PROOFSTEP]\nsimp\n", "meta": {"mathlib_filename": "Mathlib.RingTheory.WittVector.Basic", "llama_tokens": 8625, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8104789086703224, "lm_q2_score": 0.6370308013713525, "lm_q1q2_score": 0.5163000286848346}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : TopologicalSpace β\ninst✝¹ : AddZeroClass β\ninst✝ : ContinuousAdd β\nl : Filter α\nf g : α → β\nhf : ZeroAtFilter l f\nhg : ZeroAtFilter l g\n⊢ ZeroAtFilter l (f + g)\n[PROOFSTEP]\nsimpa using hf.add hg\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : TopologicalSpace β\ninst✝¹ : AddGroup β\ninst✝ : ContinuousNeg β\nl : Filter α\nf : α → β\nhf : ZeroAtFilter l f\n⊢ ZeroAtFilter l (-f)\n[PROOFSTEP]\nsimpa using hf.neg\n[GOAL]\nα : Type u_1\nβ : Type u_2\n𝕜 : Type u_3\ninst✝⁵ : TopologicalSpace 𝕜\ninst✝⁴ : TopologicalSpace β\ninst✝³ : Zero 𝕜\ninst✝² : Zero β\ninst✝¹ : SMulWithZero 𝕜 β\ninst✝ : ContinuousSMul 𝕜 β\nl : Filter α\nf : α → β\nc : 𝕜\nhf : ZeroAtFilter l f\n⊢ ZeroAtFilter l (c • f)\n[PROOFSTEP]\nsimpa using hf.const_smul c\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : NormedAddCommGroup β\nl : Filter α\nf : α → β\nhf : ZeroAtFilter l f\n⊢ BoundedAtFilter l f\n[PROOFSTEP]\nrw [ZeroAtFilter, ← Asymptotics.isLittleO_const_iff (one_ne_zero' ℝ)] at hf \n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : NormedAddCommGroup β\nl : Filter α\nf : α → β\nhf : f =o[l] fun _x => 1\n⊢ BoundedAtFilter l f\n[PROOFSTEP]\nexact hf.isBigO\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : NormedAddCommGroup β\nl : Filter α\nf g : α → β\nhf : BoundedAtFilter l f\nhg : BoundedAtFilter l g\n⊢ BoundedAtFilter l (f + g)\n[PROOFSTEP]\nsimpa using hf.add hg\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : NormedField β\nl : Filter α\nf g : α → β\nhf : BoundedAtFilter l f\nhg : BoundedAtFilter l g\n⊢ BoundedAtFilter l (f * g)\n[PROOFSTEP]\nrefine' (hf.mul hg).trans _\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : NormedField β\nl : Filter α\nf g : α → β\nhf : BoundedAtFilter l f\nhg : BoundedAtFilter l g\n⊢ (fun x => OfNat.ofNat 1 x * OfNat.ofNat 1 x) =O[l] 1\n[PROOFSTEP]\nconvert Asymptotics.isBigO_refl (E := ℝ) _ l\n[GOAL]\ncase h.e'_8.h\nα : Type u_1\nβ : Type u_2\ninst✝ : NormedField β\nl : Filter α\nf g : α → β\nhf : BoundedAtFilter l f\nhg : BoundedAtFilter l g\nx✝ : α\n⊢ OfNat.ofNat 1 x✝ = OfNat.ofNat 1 x✝ * OfNat.ofNat 1 x✝\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : NormedField β\nl : Filter α\n⊢ Subalgebra β (α → β)\n[PROOFSTEP]\nrefine' Submodule.toSubalgebra (boundedFilterSubmodule l) _ fun f g hf hg ↦ _\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\ninst✝ : NormedField β\nl : Filter α\n⊢ 1 ∈ boundedFilterSubmodule l\n[PROOFSTEP]\nexact const_boundedAtFilter l (1 : β)\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\ninst✝ : NormedField β\nl : Filter α\nf g : α → β\nhf : f ∈ boundedFilterSubmodule l\nhg : g ∈ boundedFilterSubmodule l\n⊢ f * g ∈ boundedFilterSubmodule l\n[PROOFSTEP]\nsimpa only [Pi.one_apply, mul_one, norm_mul] using hf.mul hg\n", "meta": {"mathlib_filename": "Mathlib.Order.Filter.ZeroAndBoundedAtFilter", "llama_tokens": 1283, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7248702761768249, "lm_q2_score": 0.7122321720225278, "lm_q1q2_score": 0.5162759312359896}}
{"text": "[GOAL]\nR : Type u_1\nn : ℕ\ninst✝ : CommRing R\na b x✝ y✝ x y p : R\nh : p ∣ x - y\n⊢ p ∣ ∑ i in range n, x ^ i * y ^ (n - 1 - i) ↔ p ∣ ↑n * y ^ (n - 1)\n[PROOFSTEP]\nrw [← mem_span_singleton, ← Ideal.Quotient.eq] at h \n[GOAL]\nR : Type u_1\nn : ℕ\ninst✝ : CommRing R\na b x✝ y✝ x y p : R\nh : ↑(Ideal.Quotient.mk (span {p})) x = ↑(Ideal.Quotient.mk (span {p})) y\n⊢ p ∣ ∑ i in range n, x ^ i * y ^ (n - 1 - i) ↔ p ∣ ↑n * y ^ (n - 1)\n[PROOFSTEP]\nsimp only [← mem_span_singleton, ← eq_zero_iff_mem, RingHom.map_geom_sum₂, h, geom_sum₂_self, _root_.map_mul, map_pow,\n  map_natCast]\n[GOAL]\nR : Type u_1\nn : ℕ\ninst✝ : CommRing R\na b x✝ y✝ x y p : R\nh : p ∣ x - y\n⊢ p ∣ ∑ i in range n, x ^ i * y ^ (n - 1 - i) ↔ p ∣ ↑n * x ^ (n - 1)\n[PROOFSTEP]\nrw [geom_sum₂_comm, dvd_geom_sum₂_iff_of_dvd_sub]\n[GOAL]\nR : Type u_1\nn : ℕ\ninst✝ : CommRing R\na b x✝ y✝ x y p : R\nh : p ∣ x - y\n⊢ p ∣ y - x\n[PROOFSTEP]\nsimpa using h.neg_right\n[GOAL]\nR : Type u_1\nn✝ : ℕ\ninst✝ : CommRing R\na b x✝ y p x : R\nn : ℕ\n⊢ p ^ 2 ∣ (x + p) ^ n - x ^ (n - 1) * p * ↑n - x ^ n\n[PROOFSTEP]\ncases' n with n n\n[GOAL]\ncase zero\nR : Type u_1\nn : ℕ\ninst✝ : CommRing R\na b x✝ y p x : R\n⊢ p ^ 2 ∣ (x + p) ^ Nat.zero - x ^ (Nat.zero - 1) * p * ↑Nat.zero - x ^ Nat.zero\n[PROOFSTEP]\nsimp only [pow_zero, Nat.cast_zero, sub_zero, sub_self, dvd_zero, Nat.zero_eq, mul_zero]\n[GOAL]\ncase succ\nR : Type u_1\nn✝ : ℕ\ninst✝ : CommRing R\na b x✝ y p x : R\nn : ℕ\n⊢ p ^ 2 ∣ (x + p) ^ Nat.succ n - x ^ (Nat.succ n - 1) * p * ↑(Nat.succ n) - x ^ Nat.succ n\n[PROOFSTEP]\nsimp only [Nat.succ_sub_succ_eq_sub, tsub_zero, Nat.cast_succ, add_pow, Finset.sum_range_succ, Nat.choose_self,\n  Nat.succ_sub _, tsub_self, pow_one, Nat.choose_succ_self_right, pow_zero, mul_one, Nat.cast_zero, zero_add,\n  Nat.succ_eq_add_one, add_tsub_cancel_left]\n[GOAL]\ncase succ\nR : Type u_1\nn✝ : ℕ\ninst✝ : CommRing R\na b x✝ y p x : R\nn : ℕ\n⊢ p ^ 2 ∣\n    ∑ m in range n, x ^ m * p ^ (n + 1 - m) * ↑(Nat.choose (n + 1) m) + x ^ n * p * (↑n + 1) + x ^ (n + 1) -\n        x ^ n * p * (↑n + 1) -\n      x ^ (n + 1)\n[PROOFSTEP]\nsuffices p ^ 2 ∣ ∑ i : ℕ in range n, x ^ i * p ^ (n + 1 - i) * ↑((n + 1).choose i) by convert this; abel\n[GOAL]\nR : Type u_1\nn✝ : ℕ\ninst✝ : CommRing R\na b x✝ y p x : R\nn : ℕ\nthis : p ^ 2 ∣ ∑ i in range n, x ^ i * p ^ (n + 1 - i) * ↑(Nat.choose (n + 1) i)\n⊢ p ^ 2 ∣\n    ∑ m in range n, x ^ m * p ^ (n + 1 - m) * ↑(Nat.choose (n + 1) m) + x ^ n * p * (↑n + 1) + x ^ (n + 1) -\n        x ^ n * p * (↑n + 1) -\n      x ^ (n + 1)\n[PROOFSTEP]\nconvert this\n[GOAL]\ncase h.e'_4\nR : Type u_1\nn✝ : ℕ\ninst✝ : CommRing R\na b x✝ y p x : R\nn : ℕ\nthis : p ^ 2 ∣ ∑ i in range n, x ^ i * p ^ (n + 1 - i) * ↑(Nat.choose (n + 1) i)\n⊢ ∑ m in range n, x ^ m * p ^ (n + 1 - m) * ↑(Nat.choose (n + 1) m) + x ^ n * p * (↑n + 1) + x ^ (n + 1) -\n        x ^ n * p * (↑n + 1) -\n      x ^ (n + 1) =\n    ∑ i in range n, x ^ i * p ^ (n + 1 - i) * ↑(Nat.choose (n + 1) i)\n[PROOFSTEP]\nabel\n[GOAL]\ncase h.e'_4\nR : Type u_1\nn✝ : ℕ\ninst✝ : CommRing R\na b x✝ y p x : R\nn : ℕ\nthis : p ^ 2 ∣ ∑ i in range n, x ^ i * p ^ (n + 1 - i) * ↑(Nat.choose (n + 1) i)\n⊢ ∑ m in range n, x ^ m * p ^ (n + 1 - m) * ↑(Nat.choose (n + 1) m) + x ^ n * p * (↑n + 1) + x ^ (n + 1) -\n        x ^ n * p * (↑n + 1) -\n      x ^ (n + 1) =\n    ∑ i in range n, x ^ i * p ^ (n + 1 - i) * ↑(Nat.choose (n + 1) i)\n[PROOFSTEP]\nabel\n[GOAL]\ncase succ\nR : Type u_1\nn✝ : ℕ\ninst✝ : CommRing R\na b x✝ y p x : R\nn : ℕ\n⊢ p ^ 2 ∣ ∑ i in range n, x ^ i * p ^ (n + 1 - i) * ↑(Nat.choose (n + 1) i)\n[PROOFSTEP]\napply Finset.dvd_sum\n[GOAL]\ncase succ.h\nR : Type u_1\nn✝ : ℕ\ninst✝ : CommRing R\na b x✝ y p x : R\nn : ℕ\n⊢ ∀ (x_1 : ℕ), x_1 ∈ range n → p ^ 2 ∣ x ^ x_1 * p ^ (n + 1 - x_1) * ↑(Nat.choose (n + 1) x_1)\n[PROOFSTEP]\nintro y hy\n[GOAL]\ncase succ.h\nR : Type u_1\nn✝ : ℕ\ninst✝ : CommRing R\na b x✝ y✝ p x : R\nn y : ℕ\nhy : y ∈ range n\n⊢ p ^ 2 ∣ x ^ y * p ^ (n + 1 - y) * ↑(Nat.choose (n + 1) y)\n[PROOFSTEP]\ncalc\n  p ^ 2 ∣ p ^ (n + 1 - y) := pow_dvd_pow p (le_tsub_of_add_le_left (by linarith [Finset.mem_range.mp hy]))\n  _ ∣ x ^ y * p ^ (n + 1 - y) * ↑((n + 1).choose y) := dvd_mul_of_dvd_left (dvd_mul_left _ _) _\n[GOAL]\nR : Type u_1\nn✝ : ℕ\ninst✝ : CommRing R\na b x✝ y✝ p x : R\nn y : ℕ\nhy : y ∈ range n\n⊢ y + 2 ≤ n + 1\n[PROOFSTEP]\nlinarith [Finset.mem_range.mp hy]\n[GOAL]\nR : Type u_1\nn : ℕ\ninst✝ : CommRing R\na b x y : R\np : ℕ\nhp : Odd p\n⊢ ↑p ^ 2 ∣ ∑ i in range p, (a + ↑p * b) ^ i * a ^ (p - 1 - i) - ↑p * a ^ (p - 1)\n[PROOFSTEP]\nhave h1 : ∀ (i : ℕ), (p : R) ^ 2 ∣ (a + ↑p * b) ^ i - (a ^ (i - 1) * (↑p * b) * i + a ^ i) :=\n  by\n  intro i\n  calc\n    ↑p ^ 2 ∣ (↑p * b) ^ 2 := by simp only [mul_pow, dvd_mul_right]\n    _ ∣ (a + ↑p * b) ^ i - (a ^ (i - 1) * (↑p * b) * ↑i + a ^ i) := by\n      simp only [sq_dvd_add_pow_sub_sub (↑p * b) a i, ← sub_sub]\n[GOAL]\nR : Type u_1\nn : ℕ\ninst✝ : CommRing R\na b x y : R\np : ℕ\nhp : Odd p\n⊢ ∀ (i : ℕ), ↑p ^ 2 ∣ (a + ↑p * b) ^ i - (a ^ (i - 1) * (↑p * b) * ↑i + a ^ i)\n[PROOFSTEP]\nintro i\n[GOAL]\nR : Type u_1\nn : ℕ\ninst✝ : CommRing R\na b x y : R\np : ℕ\nhp : Odd p\ni : ℕ\n⊢ ↑p ^ 2 ∣ (a + ↑p * b) ^ i - (a ^ (i - 1) * (↑p * b) * ↑i + a ^ i)\n[PROOFSTEP]\ncalc\n  ↑p ^ 2 ∣ (↑p * b) ^ 2 := by simp only [mul_pow, dvd_mul_right]\n  _ ∣ (a + ↑p * b) ^ i - (a ^ (i - 1) * (↑p * b) * ↑i + a ^ i) := by\n    simp only [sq_dvd_add_pow_sub_sub (↑p * b) a i, ← sub_sub]\n[GOAL]\nR : Type u_1\nn : ℕ\ninst✝ : CommRing R\na b x y : R\np : ℕ\nhp : Odd p\ni : ℕ\n⊢ ↑p ^ 2 ∣ (↑p * b) ^ 2\n[PROOFSTEP]\nsimp only [mul_pow, dvd_mul_right]\n[GOAL]\nR : Type u_1\nn : ℕ\ninst✝ : CommRing R\na b x y : R\np : ℕ\nhp : Odd p\ni : ℕ\n⊢ (↑p * b) ^ 2 ∣ (a + ↑p * b) ^ i - (a ^ (i - 1) * (↑p * b) * ↑i + a ^ i)\n[PROOFSTEP]\nsimp only [sq_dvd_add_pow_sub_sub (↑p * b) a i, ← sub_sub]\n[GOAL]\nR : Type u_1\nn : ℕ\ninst✝ : CommRing R\na b x y : R\np : ℕ\nhp : Odd p\nh1 : ∀ (i : ℕ), ↑p ^ 2 ∣ (a + ↑p * b) ^ i - (a ^ (i - 1) * (↑p * b) * ↑i + a ^ i)\n⊢ ↑p ^ 2 ∣ ∑ i in range p, (a + ↑p * b) ^ i * a ^ (p - 1 - i) - ↑p * a ^ (p - 1)\n[PROOFSTEP]\nsimp_rw [← mem_span_singleton, ← Ideal.Quotient.eq] at *\n[GOAL]\nR : Type u_1\nn : ℕ\ninst✝ : CommRing R\na b x y : R\np : ℕ\nhp : Odd p\nh1 :\n  ∀ (i : ℕ),\n    ↑(Ideal.Quotient.mk (span {↑p ^ 2})) ((a + ↑p * b) ^ i) =\n      ↑(Ideal.Quotient.mk (span {↑p ^ 2})) (a ^ (i - 1) * (↑p * b) * ↑i + a ^ i)\n⊢ ↑(Ideal.Quotient.mk (span {↑p ^ 2})) (∑ i in range p, (a + ↑p * b) ^ i * a ^ (p - 1 - i)) =\n    ↑(Ideal.Quotient.mk (span {↑p ^ 2})) (↑p * a ^ (p - 1))\n[PROOFSTEP]\nlet s : R := (p : R) ^ 2\n[GOAL]\nR : Type u_1\nn : ℕ\ninst✝ : CommRing R\na b x y : R\np : ℕ\nhp : Odd p\nh1 :\n  ∀ (i : ℕ),\n    ↑(Ideal.Quotient.mk (span {↑p ^ 2})) ((a + ↑p * b) ^ i) =\n      ↑(Ideal.Quotient.mk (span {↑p ^ 2})) (a ^ (i - 1) * (↑p * b) * ↑i + a ^ i)\ns : R := ↑p ^ 2\n⊢ ↑(Ideal.Quotient.mk (span {↑p ^ 2})) (∑ i in range p, (a + ↑p * b) ^ i * a ^ (p - 1 - i)) =\n    ↑(Ideal.Quotient.mk (span {↑p ^ 2})) (↑p * a ^ (p - 1))\n[PROOFSTEP]\ncalc\n  (Ideal.Quotient.mk (span { s })) (∑ i in range p, (a + (p : R) * b) ^ i * a ^ (p - 1 - i)) =\n      ∑ i : ℕ in Finset.range p, mk (span { s }) ((a ^ (i - 1) * (↑p * b) * ↑i + a ^ i) * a ^ (p - 1 - i)) :=\n    by simp_rw [RingHom.map_geom_sum₂, ← map_pow, h1, ← _root_.map_mul]\n  _ =\n      mk (span { s }) (∑ x : ℕ in Finset.range p, a ^ (x - 1) * (a ^ (p - 1 - x) * (↑p * (b * ↑x)))) +\n        mk (span { s }) (∑ x : ℕ in Finset.range p, a ^ (x + (p - 1 - x))) :=\n    by\n    ring_nf\n    simp only [← pow_add, map_add, Finset.sum_add_distrib, ← map_sum]\n    congr\n    simp [pow_add a, mul_assoc]\n  _ =\n      mk (span { s }) (∑ x : ℕ in Finset.range p, a ^ (x - 1) * (a ^ (p - 1 - x) * (↑p * (b * ↑x)))) +\n        mk (span { s }) (∑ x : ℕ in Finset.range p, a ^ (p - 1)) :=\n    by\n    rw [add_right_inj]\n    have : ∀ (x : ℕ), (hx : x ∈ range p) → a ^ (x + (p - 1 - x)) = a ^ (p - 1) :=\n      by\n      intro x hx\n      rw [← Nat.add_sub_assoc _ x, Nat.add_sub_cancel_left]\n      exact Nat.le_pred_of_lt (Finset.mem_range.mp hx)\n    rw [Finset.sum_congr rfl this]\n  _ =\n      mk (span { s }) (∑ x : ℕ in Finset.range p, a ^ (x - 1) * (a ^ (p - 1 - x) * (↑p * (b * ↑x)))) +\n        mk (span { s }) (↑p * a ^ (p - 1)) :=\n    by simp only [add_right_inj, Finset.sum_const, Finset.card_range, nsmul_eq_mul]\n  _ = mk (span { s }) (↑p * b * ∑ x : ℕ in Finset.range p, a ^ (p - 2) * x) + mk (span { s }) (↑p * a ^ (p - 1)) :=\n    by\n    simp only [Finset.mul_sum, ← mul_assoc, ← pow_add]\n    rw [Finset.sum_congr rfl]\n    rintro (⟨⟩ | ⟨x⟩) hx\n    · rw [Nat.cast_zero, mul_zero, mul_zero]\n    · have : x.succ - 1 + (p - 1 - x.succ) = p - 2 :=\n        by\n        rw [← Nat.add_sub_assoc (Nat.le_pred_of_lt (Finset.mem_range.mp hx))]\n        exact congr_arg Nat.pred (Nat.add_sub_cancel_left _ _)\n      rw [this]\n      ring1\n  _ = mk (span { s }) (↑p * a ^ (p - 1)) :=\n    by\n    have : Finset.sum (range p) (fun (x : ℕ) ↦ (x : R)) = ((Finset.sum (range p) (fun (x : ℕ) ↦ (x : ℕ)))) := by\n      simp only [Nat.cast_sum]\n    simp only [add_left_eq_self, ← Finset.mul_sum, this]\n    norm_cast\n    simp only [Finset.sum_range_id]\n    norm_cast\n    simp only [Nat.cast_mul, _root_.map_mul, Nat.mul_div_assoc p (even_iff_two_dvd.mp (Nat.Odd.sub_odd hp odd_one))]\n    ring_nf\n    rw [mul_assoc, mul_assoc]\n    refine' mul_eq_zero_of_left _ _\n    refine' Ideal.Quotient.eq_zero_iff_mem.mpr _\n    simp [mem_span_singleton]\n[GOAL]\nR : Type u_1\nn : ℕ\ninst✝ : CommRing R\na b x y : R\np : ℕ\nhp : Odd p\nh1 :\n  ∀ (i : ℕ),\n    ↑(Ideal.Quotient.mk (span {↑p ^ 2})) ((a + ↑p * b) ^ i) =\n      ↑(Ideal.Quotient.mk (span {↑p ^ 2})) (a ^ (i - 1) * (↑p * b) * ↑i + a ^ i)\ns : R := ↑p ^ 2\n⊢ ↑(Ideal.Quotient.mk (span {s})) (∑ i in range p, (a + ↑p * b) ^ i * a ^ (p - 1 - i)) =\n    ∑ i in range p, ↑(Ideal.Quotient.mk (span {s})) ((a ^ (i - 1) * (↑p * b) * ↑i + a ^ i) * a ^ (p - 1 - i))\n[PROOFSTEP]\nsimp_rw [RingHom.map_geom_sum₂, ← map_pow, h1, ← _root_.map_mul]\n[GOAL]\nR : Type u_1\nn : ℕ\ninst✝ : CommRing R\na b x y : R\np : ℕ\nhp : Odd p\nh1 :\n  ∀ (i : ℕ),\n    ↑(Ideal.Quotient.mk (span {↑p ^ 2})) ((a + ↑p * b) ^ i) =\n      ↑(Ideal.Quotient.mk (span {↑p ^ 2})) (a ^ (i - 1) * (↑p * b) * ↑i + a ^ i)\ns : R := ↑p ^ 2\n⊢ ∑ i in range p, ↑(Ideal.Quotient.mk (span {s})) ((a ^ (i - 1) * (↑p * b) * ↑i + a ^ i) * a ^ (p - 1 - i)) =\n    ↑(Ideal.Quotient.mk (span {s})) (∑ x in range p, a ^ (x - 1) * (a ^ (p - 1 - x) * (↑p * (b * ↑x)))) +\n      ↑(Ideal.Quotient.mk (span {s})) (∑ x in range p, a ^ (x + (p - 1 - x)))\n[PROOFSTEP]\nring_nf\n[GOAL]\nR : Type u_1\nn : ℕ\ninst✝ : CommRing R\na b x y : R\np : ℕ\nhp : Odd p\nh1 :\n  ∀ (i : ℕ),\n    ↑(Ideal.Quotient.mk (span {↑p ^ 2})) ((a + ↑p * b) ^ i) =\n      ↑(Ideal.Quotient.mk (span {↑p ^ 2})) (a ^ (i - 1) * (↑p * b) * ↑i + a ^ i)\ns : R := ↑p ^ 2\n⊢ ∑ x in range p,\n      ↑(Ideal.Quotient.mk (span {↑p ^ 2})) (a ^ (x - 1) * a ^ (p - 1 - x) * ↑p * b * ↑x + a ^ x * a ^ (p - 1 - x)) =\n    ↑(Ideal.Quotient.mk (span {↑p ^ 2})) (∑ x in range p, a ^ (x - 1) * (a ^ (p - 1 - x) * (↑p * (b * ↑x)))) +\n      ↑(Ideal.Quotient.mk (span {↑p ^ 2})) (∑ x in range p, a ^ (x + (p - 1 - x)))\n[PROOFSTEP]\nsimp only [← pow_add, map_add, Finset.sum_add_distrib, ← map_sum]\n[GOAL]\nR : Type u_1\nn : ℕ\ninst✝ : CommRing R\na b x y : R\np : ℕ\nhp : Odd p\nh1 :\n  ∀ (i : ℕ),\n    ↑(Ideal.Quotient.mk (span {↑p ^ 2})) ((a + ↑p * b) ^ i) =\n      ↑(Ideal.Quotient.mk (span {↑p ^ 2})) (a ^ (i - 1) * (↑p * b) * ↑i + a ^ i)\ns : R := ↑p ^ 2\n⊢ ↑(Ideal.Quotient.mk (span {↑p ^ 2})) (∑ x in range p, a ^ (x - 1 + (p - 1 - x)) * ↑p * b * ↑x) +\n      ↑(Ideal.Quotient.mk (span {↑p ^ 2})) (∑ x in range p, a ^ (x + (p - 1 - x))) =\n    ↑(Ideal.Quotient.mk (span {↑p ^ 2})) (∑ x in range p, a ^ (x - 1) * (a ^ (p - 1 - x) * (↑p * (b * ↑x)))) +\n      ↑(Ideal.Quotient.mk (span {↑p ^ 2})) (∑ x in range p, a ^ (x + (p - 1 - x)))\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_a.h.e_6.h.e_f\nR : Type u_1\nn : ℕ\ninst✝ : CommRing R\na b x y : R\np : ℕ\nhp : Odd p\nh1 :\n  ∀ (i : ℕ),\n    ↑(Ideal.Quotient.mk (span {↑p ^ 2})) ((a + ↑p * b) ^ i) =\n      ↑(Ideal.Quotient.mk (span {↑p ^ 2})) (a ^ (i - 1) * (↑p * b) * ↑i + a ^ i)\ns : R := ↑p ^ 2\n⊢ (fun x => a ^ (x - 1 + (p - 1 - x)) * ↑p * b * ↑x) = fun x => a ^ (x - 1) * (a ^ (p - 1 - x) * (↑p * (b * ↑x)))\n[PROOFSTEP]\nsimp [pow_add a, mul_assoc]\n[GOAL]\nR : Type u_1\nn : ℕ\ninst✝ : CommRing R\na b x y : R\np : ℕ\nhp : Odd p\nh1 :\n  ∀ (i : ℕ),\n    ↑(Ideal.Quotient.mk (span {↑p ^ 2})) ((a + ↑p * b) ^ i) =\n      ↑(Ideal.Quotient.mk (span {↑p ^ 2})) (a ^ (i - 1) * (↑p * b) * ↑i + a ^ i)\ns : R := ↑p ^ 2\n⊢ ↑(Ideal.Quotient.mk (span {s})) (∑ x in range p, a ^ (x - 1) * (a ^ (p - 1 - x) * (↑p * (b * ↑x)))) +\n      ↑(Ideal.Quotient.mk (span {s})) (∑ x in range p, a ^ (x + (p - 1 - x))) =\n    ↑(Ideal.Quotient.mk (span {s})) (∑ x in range p, a ^ (x - 1) * (a ^ (p - 1 - x) * (↑p * (b * ↑x)))) +\n      ↑(Ideal.Quotient.mk (span {s})) (∑ x in range p, a ^ (p - 1))\n[PROOFSTEP]\nrw [add_right_inj]\n[GOAL]\nR : Type u_1\nn : ℕ\ninst✝ : CommRing R\na b x y : R\np : ℕ\nhp : Odd p\nh1 :\n  ∀ (i : ℕ),\n    ↑(Ideal.Quotient.mk (span {↑p ^ 2})) ((a + ↑p * b) ^ i) =\n      ↑(Ideal.Quotient.mk (span {↑p ^ 2})) (a ^ (i - 1) * (↑p * b) * ↑i + a ^ i)\ns : R := ↑p ^ 2\n⊢ ↑(Ideal.Quotient.mk (span {s})) (∑ x in range p, a ^ (x + (p - 1 - x))) =\n    ↑(Ideal.Quotient.mk (span {s})) (∑ x in range p, a ^ (p - 1))\n[PROOFSTEP]\nhave : ∀ (x : ℕ), (hx : x ∈ range p) → a ^ (x + (p - 1 - x)) = a ^ (p - 1) :=\n  by\n  intro x hx\n  rw [← Nat.add_sub_assoc _ x, Nat.add_sub_cancel_left]\n  exact Nat.le_pred_of_lt (Finset.mem_range.mp hx)\n[GOAL]\nR : Type u_1\nn : ℕ\ninst✝ : CommRing R\na b x y : R\np : ℕ\nhp : Odd p\nh1 :\n  ∀ (i : ℕ),\n    ↑(Ideal.Quotient.mk (span {↑p ^ 2})) ((a + ↑p * b) ^ i) =\n      ↑(Ideal.Quotient.mk (span {↑p ^ 2})) (a ^ (i - 1) * (↑p * b) * ↑i + a ^ i)\ns : R := ↑p ^ 2\n⊢ ∀ (x : ℕ), x ∈ range p → a ^ (x + (p - 1 - x)) = a ^ (p - 1)\n[PROOFSTEP]\nintro x hx\n[GOAL]\nR : Type u_1\nn : ℕ\ninst✝ : CommRing R\na b x✝ y : R\np : ℕ\nhp : Odd p\nh1 :\n  ∀ (i : ℕ),\n    ↑(Ideal.Quotient.mk (span {↑p ^ 2})) ((a + ↑p * b) ^ i) =\n      ↑(Ideal.Quotient.mk (span {↑p ^ 2})) (a ^ (i - 1) * (↑p * b) * ↑i + a ^ i)\ns : R := ↑p ^ 2\nx : ℕ\nhx : x ∈ range p\n⊢ a ^ (x + (p - 1 - x)) = a ^ (p - 1)\n[PROOFSTEP]\nrw [← Nat.add_sub_assoc _ x, Nat.add_sub_cancel_left]\n[GOAL]\nR : Type u_1\nn : ℕ\ninst✝ : CommRing R\na b x✝ y : R\np : ℕ\nhp : Odd p\nh1 :\n  ∀ (i : ℕ),\n    ↑(Ideal.Quotient.mk (span {↑p ^ 2})) ((a + ↑p * b) ^ i) =\n      ↑(Ideal.Quotient.mk (span {↑p ^ 2})) (a ^ (i - 1) * (↑p * b) * ↑i + a ^ i)\ns : R := ↑p ^ 2\nx : ℕ\nhx : x ∈ range p\n⊢ x ≤ p - 1\n[PROOFSTEP]\nexact Nat.le_pred_of_lt (Finset.mem_range.mp hx)\n[GOAL]\nR : Type u_1\nn : ℕ\ninst✝ : CommRing R\na b x y : R\np : ℕ\nhp : Odd p\nh1 :\n  ∀ (i : ℕ),\n    ↑(Ideal.Quotient.mk (span {↑p ^ 2})) ((a + ↑p * b) ^ i) =\n      ↑(Ideal.Quotient.mk (span {↑p ^ 2})) (a ^ (i - 1) * (↑p * b) * ↑i + a ^ i)\ns : R := ↑p ^ 2\nthis : ∀ (x : ℕ), x ∈ range p → a ^ (x + (p - 1 - x)) = a ^ (p - 1)\n⊢ ↑(Ideal.Quotient.mk (span {s})) (∑ x in range p, a ^ (x + (p - 1 - x))) =\n    ↑(Ideal.Quotient.mk (span {s})) (∑ x in range p, a ^ (p - 1))\n[PROOFSTEP]\nrw [Finset.sum_congr rfl this]\n[GOAL]\nR : Type u_1\nn : ℕ\ninst✝ : CommRing R\na b x y : R\np : ℕ\nhp : Odd p\nh1 :\n  ∀ (i : ℕ),\n    ↑(Ideal.Quotient.mk (span {↑p ^ 2})) ((a + ↑p * b) ^ i) =\n      ↑(Ideal.Quotient.mk (span {↑p ^ 2})) (a ^ (i - 1) * (↑p * b) * ↑i + a ^ i)\ns : R := ↑p ^ 2\n⊢ ↑(Ideal.Quotient.mk (span {s})) (∑ x in range p, a ^ (x - 1) * (a ^ (p - 1 - x) * (↑p * (b * ↑x)))) +\n      ↑(Ideal.Quotient.mk (span {s})) (∑ x in range p, a ^ (p - 1)) =\n    ↑(Ideal.Quotient.mk (span {s})) (∑ x in range p, a ^ (x - 1) * (a ^ (p - 1 - x) * (↑p * (b * ↑x)))) +\n      ↑(Ideal.Quotient.mk (span {s})) (↑p * a ^ (p - 1))\n[PROOFSTEP]\nsimp only [add_right_inj, Finset.sum_const, Finset.card_range, nsmul_eq_mul]\n[GOAL]\nR : Type u_1\nn : ℕ\ninst✝ : CommRing R\na b x y : R\np : ℕ\nhp : Odd p\nh1 :\n  ∀ (i : ℕ),\n    ↑(Ideal.Quotient.mk (span {↑p ^ 2})) ((a + ↑p * b) ^ i) =\n      ↑(Ideal.Quotient.mk (span {↑p ^ 2})) (a ^ (i - 1) * (↑p * b) * ↑i + a ^ i)\ns : R := ↑p ^ 2\n⊢ ↑(Ideal.Quotient.mk (span {s})) (∑ x in range p, a ^ (x - 1) * (a ^ (p - 1 - x) * (↑p * (b * ↑x)))) +\n      ↑(Ideal.Quotient.mk (span {s})) (↑p * a ^ (p - 1)) =\n    ↑(Ideal.Quotient.mk (span {s})) (↑p * b * ∑ x in range p, a ^ (p - 2) * ↑x) +\n      ↑(Ideal.Quotient.mk (span {s})) (↑p * a ^ (p - 1))\n[PROOFSTEP]\nsimp only [Finset.mul_sum, ← mul_assoc, ← pow_add]\n[GOAL]\nR : Type u_1\nn : ℕ\ninst✝ : CommRing R\na b x y : R\np : ℕ\nhp : Odd p\nh1 :\n  ∀ (i : ℕ),\n    ↑(Ideal.Quotient.mk (span {↑p ^ 2})) ((a + ↑p * b) ^ i) =\n      ↑(Ideal.Quotient.mk (span {↑p ^ 2})) (a ^ (i - 1) * (↑p * b) * ↑i + a ^ i)\ns : R := ↑p ^ 2\n⊢ ↑(Ideal.Quotient.mk (span {↑p ^ 2})) (∑ x in range p, a ^ (x - 1 + (p - 1 - x)) * ↑p * b * ↑x) +\n      ↑(Ideal.Quotient.mk (span {↑p ^ 2})) (↑p * a ^ (p - 1)) =\n    ↑(Ideal.Quotient.mk (span {↑p ^ 2})) (∑ x in range p, ↑p * b * a ^ (p - 2) * ↑x) +\n      ↑(Ideal.Quotient.mk (span {↑p ^ 2})) (↑p * a ^ (p - 1))\n[PROOFSTEP]\nrw [Finset.sum_congr rfl]\n[GOAL]\nR : Type u_1\nn : ℕ\ninst✝ : CommRing R\na b x y : R\np : ℕ\nhp : Odd p\nh1 :\n  ∀ (i : ℕ),\n    ↑(Ideal.Quotient.mk (span {↑p ^ 2})) ((a + ↑p * b) ^ i) =\n      ↑(Ideal.Quotient.mk (span {↑p ^ 2})) (a ^ (i - 1) * (↑p * b) * ↑i + a ^ i)\ns : R := ↑p ^ 2\n⊢ ∀ (x : ℕ), x ∈ range p → a ^ (x - 1 + (p - 1 - x)) * ↑p * b * ↑x = ↑p * b * a ^ (p - 2) * ↑x\n[PROOFSTEP]\nrintro (⟨⟩ | ⟨x⟩) hx\n[GOAL]\ncase zero\nR : Type u_1\nn : ℕ\ninst✝ : CommRing R\na b x y : R\np : ℕ\nhp : Odd p\nh1 :\n  ∀ (i : ℕ),\n    ↑(Ideal.Quotient.mk (span {↑p ^ 2})) ((a + ↑p * b) ^ i) =\n      ↑(Ideal.Quotient.mk (span {↑p ^ 2})) (a ^ (i - 1) * (↑p * b) * ↑i + a ^ i)\ns : R := ↑p ^ 2\nhx : Nat.zero ∈ range p\n⊢ a ^ (Nat.zero - 1 + (p - 1 - Nat.zero)) * ↑p * b * ↑Nat.zero = ↑p * b * a ^ (p - 2) * ↑Nat.zero\n[PROOFSTEP]\nrw [Nat.cast_zero, mul_zero, mul_zero]\n[GOAL]\ncase succ\nR : Type u_1\nn : ℕ\ninst✝ : CommRing R\na b x✝ y : R\np : ℕ\nhp : Odd p\nh1 :\n  ∀ (i : ℕ),\n    ↑(Ideal.Quotient.mk (span {↑p ^ 2})) ((a + ↑p * b) ^ i) =\n      ↑(Ideal.Quotient.mk (span {↑p ^ 2})) (a ^ (i - 1) * (↑p * b) * ↑i + a ^ i)\ns : R := ↑p ^ 2\nx : ℕ\nhx : Nat.succ x ∈ range p\n⊢ a ^ (Nat.succ x - 1 + (p - 1 - Nat.succ x)) * ↑p * b * ↑(Nat.succ x) = ↑p * b * a ^ (p - 2) * ↑(Nat.succ x)\n[PROOFSTEP]\nhave : x.succ - 1 + (p - 1 - x.succ) = p - 2 :=\n  by\n  rw [← Nat.add_sub_assoc (Nat.le_pred_of_lt (Finset.mem_range.mp hx))]\n  exact congr_arg Nat.pred (Nat.add_sub_cancel_left _ _)\n[GOAL]\nR : Type u_1\nn : ℕ\ninst✝ : CommRing R\na b x✝ y : R\np : ℕ\nhp : Odd p\nh1 :\n  ∀ (i : ℕ),\n    ↑(Ideal.Quotient.mk (span {↑p ^ 2})) ((a + ↑p * b) ^ i) =\n      ↑(Ideal.Quotient.mk (span {↑p ^ 2})) (a ^ (i - 1) * (↑p * b) * ↑i + a ^ i)\ns : R := ↑p ^ 2\nx : ℕ\nhx : Nat.succ x ∈ range p\n⊢ Nat.succ x - 1 + (p - 1 - Nat.succ x) = p - 2\n[PROOFSTEP]\nrw [← Nat.add_sub_assoc (Nat.le_pred_of_lt (Finset.mem_range.mp hx))]\n[GOAL]\nR : Type u_1\nn : ℕ\ninst✝ : CommRing R\na b x✝ y : R\np : ℕ\nhp : Odd p\nh1 :\n  ∀ (i : ℕ),\n    ↑(Ideal.Quotient.mk (span {↑p ^ 2})) ((a + ↑p * b) ^ i) =\n      ↑(Ideal.Quotient.mk (span {↑p ^ 2})) (a ^ (i - 1) * (↑p * b) * ↑i + a ^ i)\ns : R := ↑p ^ 2\nx : ℕ\nhx : Nat.succ x ∈ range p\n⊢ Nat.succ x - 1 + (p - 1) - Nat.succ x = p - 2\n[PROOFSTEP]\nexact congr_arg Nat.pred (Nat.add_sub_cancel_left _ _)\n[GOAL]\ncase succ\nR : Type u_1\nn : ℕ\ninst✝ : CommRing R\na b x✝ y : R\np : ℕ\nhp : Odd p\nh1 :\n  ∀ (i : ℕ),\n    ↑(Ideal.Quotient.mk (span {↑p ^ 2})) ((a + ↑p * b) ^ i) =\n      ↑(Ideal.Quotient.mk (span {↑p ^ 2})) (a ^ (i - 1) * (↑p * b) * ↑i + a ^ i)\ns : R := ↑p ^ 2\nx : ℕ\nhx : Nat.succ x ∈ range p\nthis : Nat.succ x - 1 + (p - 1 - Nat.succ x) = p - 2\n⊢ a ^ (Nat.succ x - 1 + (p - 1 - Nat.succ x)) * ↑p * b * ↑(Nat.succ x) = ↑p * b * a ^ (p - 2) * ↑(Nat.succ x)\n[PROOFSTEP]\nrw [this]\n[GOAL]\ncase succ\nR : Type u_1\nn : ℕ\ninst✝ : CommRing R\na b x✝ y : R\np : ℕ\nhp : Odd p\nh1 :\n  ∀ (i : ℕ),\n    ↑(Ideal.Quotient.mk (span {↑p ^ 2})) ((a + ↑p * b) ^ i) =\n      ↑(Ideal.Quotient.mk (span {↑p ^ 2})) (a ^ (i - 1) * (↑p * b) * ↑i + a ^ i)\ns : R := ↑p ^ 2\nx : ℕ\nhx : Nat.succ x ∈ range p\nthis : Nat.succ x - 1 + (p - 1 - Nat.succ x) = p - 2\n⊢ a ^ (p - 2) * ↑p * b * ↑(Nat.succ x) = ↑p * b * a ^ (p - 2) * ↑(Nat.succ x)\n[PROOFSTEP]\nring1\n[GOAL]\nR : Type u_1\nn : ℕ\ninst✝ : CommRing R\na b x y : R\np : ℕ\nhp : Odd p\nh1 :\n  ∀ (i : ℕ),\n    ↑(Ideal.Quotient.mk (span {↑p ^ 2})) ((a + ↑p * b) ^ i) =\n      ↑(Ideal.Quotient.mk (span {↑p ^ 2})) (a ^ (i - 1) * (↑p * b) * ↑i + a ^ i)\ns : R := ↑p ^ 2\n⊢ ↑(Ideal.Quotient.mk (span {s})) (↑p * b * ∑ x in range p, a ^ (p - 2) * ↑x) +\n      ↑(Ideal.Quotient.mk (span {s})) (↑p * a ^ (p - 1)) =\n    ↑(Ideal.Quotient.mk (span {s})) (↑p * a ^ (p - 1))\n[PROOFSTEP]\nhave : Finset.sum (range p) (fun (x : ℕ) ↦ (x : R)) = ((Finset.sum (range p) (fun (x : ℕ) ↦ (x : ℕ)))) := by\n  simp only [Nat.cast_sum]\n[GOAL]\nR : Type u_1\nn : ℕ\ninst✝ : CommRing R\na b x y : R\np : ℕ\nhp : Odd p\nh1 :\n  ∀ (i : ℕ),\n    ↑(Ideal.Quotient.mk (span {↑p ^ 2})) ((a + ↑p * b) ^ i) =\n      ↑(Ideal.Quotient.mk (span {↑p ^ 2})) (a ^ (i - 1) * (↑p * b) * ↑i + a ^ i)\ns : R := ↑p ^ 2\n⊢ ∑ x in range p, ↑x = ↑(∑ x in range p, x)\n[PROOFSTEP]\nsimp only [Nat.cast_sum]\n[GOAL]\nR : Type u_1\nn : ℕ\ninst✝ : CommRing R\na b x y : R\np : ℕ\nhp : Odd p\nh1 :\n  ∀ (i : ℕ),\n    ↑(Ideal.Quotient.mk (span {↑p ^ 2})) ((a + ↑p * b) ^ i) =\n      ↑(Ideal.Quotient.mk (span {↑p ^ 2})) (a ^ (i - 1) * (↑p * b) * ↑i + a ^ i)\ns : R := ↑p ^ 2\nthis : ∑ x in range p, ↑x = ↑(∑ x in range p, x)\n⊢ ↑(Ideal.Quotient.mk (span {s})) (↑p * b * ∑ x in range p, a ^ (p - 2) * ↑x) +\n      ↑(Ideal.Quotient.mk (span {s})) (↑p * a ^ (p - 1)) =\n    ↑(Ideal.Quotient.mk (span {s})) (↑p * a ^ (p - 1))\n[PROOFSTEP]\nsimp only [add_left_eq_self, ← Finset.mul_sum, this]\n[GOAL]\nR : Type u_1\nn : ℕ\ninst✝ : CommRing R\na b x y : R\np : ℕ\nhp : Odd p\nh1 :\n  ∀ (i : ℕ),\n    ↑(Ideal.Quotient.mk (span {↑p ^ 2})) ((a + ↑p * b) ^ i) =\n      ↑(Ideal.Quotient.mk (span {↑p ^ 2})) (a ^ (i - 1) * (↑p * b) * ↑i + a ^ i)\ns : R := ↑p ^ 2\nthis : ∑ x in range p, ↑x = ↑(∑ x in range p, x)\n⊢ ↑(Ideal.Quotient.mk (span {↑p ^ 2})) (↑p * b * (a ^ (p - 2) * ↑(∑ x in range p, x))) = 0\n[PROOFSTEP]\nnorm_cast\n[GOAL]\nR : Type u_1\nn : ℕ\ninst✝ : CommRing R\na b x y : R\np : ℕ\nhp : Odd p\nh1 :\n  ∀ (i : ℕ),\n    ↑(Ideal.Quotient.mk (span {↑p ^ 2})) ((a + ↑p * b) ^ i) =\n      ↑(Ideal.Quotient.mk (span {↑p ^ 2})) (a ^ (i - 1) * (↑p * b) * ↑i + a ^ i)\ns : R := ↑p ^ 2\nthis : ∑ x in range p, ↑x = ↑(∑ x in range p, x)\n⊢ ↑(Ideal.Quotient.mk (span {↑p ^ 2})) (↑p * b * (a ^ (p - 2) * ↑(∑ x in range p, x))) = 0\n[PROOFSTEP]\nsimp only [Finset.sum_range_id]\n[GOAL]\nR : Type u_1\nn : ℕ\ninst✝ : CommRing R\na b x y : R\np : ℕ\nhp : Odd p\nh1 :\n  ∀ (i : ℕ),\n    ↑(Ideal.Quotient.mk (span {↑p ^ 2})) ((a + ↑p * b) ^ i) =\n      ↑(Ideal.Quotient.mk (span {↑p ^ 2})) (a ^ (i - 1) * (↑p * b) * ↑i + a ^ i)\ns : R := ↑p ^ 2\nthis : ∑ x in range p, ↑x = ↑(∑ x in range p, x)\n⊢ ↑(Ideal.Quotient.mk (span {↑p ^ 2})) (↑p * b * (a ^ (p - 2) * ↑(p * (p - 1) / 2))) = 0\n[PROOFSTEP]\nnorm_cast\n[GOAL]\nR : Type u_1\nn : ℕ\ninst✝ : CommRing R\na b x y : R\np : ℕ\nhp : Odd p\nh1 :\n  ∀ (i : ℕ),\n    ↑(Ideal.Quotient.mk (span {↑p ^ 2})) ((a + ↑p * b) ^ i) =\n      ↑(Ideal.Quotient.mk (span {↑p ^ 2})) (a ^ (i - 1) * (↑p * b) * ↑i + a ^ i)\ns : R := ↑p ^ 2\nthis : ∑ x in range p, ↑x = ↑(∑ x in range p, x)\n⊢ ↑(Ideal.Quotient.mk (span {↑p ^ 2})) (↑p * b * (a ^ (p - 2) * ↑(p * (p - 1) / 2))) = 0\n[PROOFSTEP]\nsimp only [Nat.cast_mul, _root_.map_mul, Nat.mul_div_assoc p (even_iff_two_dvd.mp (Nat.Odd.sub_odd hp odd_one))]\n[GOAL]\nR : Type u_1\nn : ℕ\ninst✝ : CommRing R\na b x y : R\np : ℕ\nhp : Odd p\nh1 :\n  ∀ (i : ℕ),\n    ↑(Ideal.Quotient.mk (span {↑p ^ 2})) ((a + ↑p * b) ^ i) =\n      ↑(Ideal.Quotient.mk (span {↑p ^ 2})) (a ^ (i - 1) * (↑p * b) * ↑i + a ^ i)\ns : R := ↑p ^ 2\nthis : ∑ x in range p, ↑x = ↑(∑ x in range p, x)\n⊢ ↑(Ideal.Quotient.mk (span {↑p ^ 2})) ↑p * ↑(Ideal.Quotient.mk (span {↑p ^ 2})) b *\n      (↑(Ideal.Quotient.mk (span {↑p ^ 2})) (a ^ (p - 2)) *\n        (↑(Ideal.Quotient.mk (span {↑p ^ 2})) ↑p * ↑(Ideal.Quotient.mk (span {↑p ^ 2})) ↑((p - 1) / 2))) =\n    0\n[PROOFSTEP]\nring_nf\n[GOAL]\nR : Type u_1\nn : ℕ\ninst✝ : CommRing R\na b x y : R\np : ℕ\nhp : Odd p\nh1 :\n  ∀ (i : ℕ),\n    ↑(Ideal.Quotient.mk (span {↑p ^ 2})) ((a + ↑p * b) ^ i) =\n      ↑(Ideal.Quotient.mk (span {↑p ^ 2})) (a ^ (i - 1) * (↑p * b) * ↑i + a ^ i)\ns : R := ↑p ^ 2\nthis : ∑ x in range p, ↑x = ↑(∑ x in range p, x)\n⊢ ↑(Ideal.Quotient.mk (span {↑p ^ 2})) ↑p ^ 2 * ↑(Ideal.Quotient.mk (span {↑p ^ 2})) b *\n        ↑(Ideal.Quotient.mk (span {↑p ^ 2})) (a ^ (p - 2)) *\n      ↑(Ideal.Quotient.mk (span {↑p ^ 2})) ↑((p - 1) / 2) =\n    0\n[PROOFSTEP]\nrw [mul_assoc, mul_assoc]\n[GOAL]\nR : Type u_1\nn : ℕ\ninst✝ : CommRing R\na b x y : R\np : ℕ\nhp : Odd p\nh1 :\n  ∀ (i : ℕ),\n    ↑(Ideal.Quotient.mk (span {↑p ^ 2})) ((a + ↑p * b) ^ i) =\n      ↑(Ideal.Quotient.mk (span {↑p ^ 2})) (a ^ (i - 1) * (↑p * b) * ↑i + a ^ i)\ns : R := ↑p ^ 2\nthis : ∑ x in range p, ↑x = ↑(∑ x in range p, x)\n⊢ ↑(Ideal.Quotient.mk (span {↑p ^ 2})) ↑p ^ 2 *\n      (↑(Ideal.Quotient.mk (span {↑p ^ 2})) b *\n        (↑(Ideal.Quotient.mk (span {↑p ^ 2})) (a ^ (p - 2)) * ↑(Ideal.Quotient.mk (span {↑p ^ 2})) ↑((p - 1) / 2))) =\n    0\n[PROOFSTEP]\nrefine' mul_eq_zero_of_left _ _\n[GOAL]\nR : Type u_1\nn : ℕ\ninst✝ : CommRing R\na b x y : R\np : ℕ\nhp : Odd p\nh1 :\n  ∀ (i : ℕ),\n    ↑(Ideal.Quotient.mk (span {↑p ^ 2})) ((a + ↑p * b) ^ i) =\n      ↑(Ideal.Quotient.mk (span {↑p ^ 2})) (a ^ (i - 1) * (↑p * b) * ↑i + a ^ i)\ns : R := ↑p ^ 2\nthis : ∑ x in range p, ↑x = ↑(∑ x in range p, x)\n⊢ ↑(Ideal.Quotient.mk (span {↑p ^ 2})) ↑p ^ 2 = 0\n[PROOFSTEP]\nrefine' Ideal.Quotient.eq_zero_iff_mem.mpr _\n[GOAL]\nR : Type u_1\nn : ℕ\ninst✝ : CommRing R\na b x y : R\np : ℕ\nhp : Odd p\nh1 :\n  ∀ (i : ℕ),\n    ↑(Ideal.Quotient.mk (span {↑p ^ 2})) ((a + ↑p * b) ^ i) =\n      ↑(Ideal.Quotient.mk (span {↑p ^ 2})) (a ^ (i - 1) * (↑p * b) * ↑i + a ^ i)\ns : R := ↑p ^ 2\nthis : ∑ x in range p, ↑x = ↑(∑ x in range p, x)\n⊢ (fun x => x ^ 2) ↑p ∈ span {↑p ^ 2}\n[PROOFSTEP]\nsimp [mem_span_singleton]\n[GOAL]\nR : Type u_1\nn✝ : ℕ\ninst✝² : CommRing R\na b x✝ y✝ : R\np✝ : ℕ\ninst✝¹ : IsDomain R\ninst✝ : DecidableRel fun x x_1 => x ∣ x_1\np : R\nhp : Prime p\nx y : R\nhxy : p ∣ x - y\nhx : ¬p ∣ x\nn : ℕ\nhn : ¬p ∣ ↑n\n⊢ multiplicity p (x ^ n - y ^ n) = multiplicity p (x - y)\n[PROOFSTEP]\nrw [← geom_sum₂_mul, multiplicity.mul hp, multiplicity_eq_zero.2 (not_dvd_geom_sum₂ hp hxy hx hn), zero_add]\n[GOAL]\nR : Type u_1\nn : ℕ\ninst✝² : CommRing R\na b x y : R\np : ℕ\ninst✝¹ : IsDomain R\ninst✝ : DecidableRel fun x x_1 => x ∣ x_1\nhp : Prime ↑p\nhp1 : Odd p\nhxy : ↑p ∣ x - y\nhx : ¬↑p ∣ x\n⊢ multiplicity (↑p) (∑ i in range p, x ^ i * y ^ (p - 1 - i)) = 1\n[PROOFSTEP]\nrw [← Nat.cast_one]\n[GOAL]\nR : Type u_1\nn : ℕ\ninst✝² : CommRing R\na b x y : R\np : ℕ\ninst✝¹ : IsDomain R\ninst✝ : DecidableRel fun x x_1 => x ∣ x_1\nhp : Prime ↑p\nhp1 : Odd p\nhxy : ↑p ∣ x - y\nhx : ¬↑p ∣ x\n⊢ multiplicity (↑p) (∑ i in range p, x ^ i * y ^ (p - ↑1 - i)) = 1\n[PROOFSTEP]\nrefine' multiplicity.eq_coe_iff.2 ⟨_, _⟩\n[GOAL]\ncase refine'_1\nR : Type u_1\nn : ℕ\ninst✝² : CommRing R\na b x y : R\np : ℕ\ninst✝¹ : IsDomain R\ninst✝ : DecidableRel fun x x_1 => x ∣ x_1\nhp : Prime ↑p\nhp1 : Odd p\nhxy : ↑p ∣ x - y\nhx : ¬↑p ∣ x\n⊢ ↑p ^ 1 ∣ ∑ i in range p, x ^ i * y ^ (p - ↑1 - i)\n[PROOFSTEP]\nrw [pow_one]\n[GOAL]\ncase refine'_1\nR : Type u_1\nn : ℕ\ninst✝² : CommRing R\na b x y : R\np : ℕ\ninst✝¹ : IsDomain R\ninst✝ : DecidableRel fun x x_1 => x ∣ x_1\nhp : Prime ↑p\nhp1 : Odd p\nhxy : ↑p ∣ x - y\nhx : ¬↑p ∣ x\n⊢ ↑p ∣ ∑ i in range p, x ^ i * y ^ (p - ↑1 - i)\n[PROOFSTEP]\nexact dvd_geom_sum₂_self hxy\n[GOAL]\ncase refine'_2\nR : Type u_1\nn : ℕ\ninst✝² : CommRing R\na b x y : R\np : ℕ\ninst✝¹ : IsDomain R\ninst✝ : DecidableRel fun x x_1 => x ∣ x_1\nhp : Prime ↑p\nhp1 : Odd p\nhxy : ↑p ∣ x - y\nhx : ¬↑p ∣ x\n⊢ ¬↑p ^ (1 + 1) ∣ ∑ i in range p, x ^ i * y ^ (p - ↑1 - i)\n[PROOFSTEP]\nrw [dvd_iff_dvd_of_dvd_sub hxy] at hx \n[GOAL]\ncase refine'_2\nR : Type u_1\nn : ℕ\ninst✝² : CommRing R\na b x y : R\np : ℕ\ninst✝¹ : IsDomain R\ninst✝ : DecidableRel fun x x_1 => x ∣ x_1\nhp : Prime ↑p\nhp1 : Odd p\nhxy : ↑p ∣ x - y\nhx : ¬↑p ∣ y\n⊢ ¬↑p ^ (1 + 1) ∣ ∑ i in range p, x ^ i * y ^ (p - ↑1 - i)\n[PROOFSTEP]\ncases' hxy with k hk\n[GOAL]\ncase refine'_2.intro\nR : Type u_1\nn : ℕ\ninst✝² : CommRing R\na b x y : R\np : ℕ\ninst✝¹ : IsDomain R\ninst✝ : DecidableRel fun x x_1 => x ∣ x_1\nhp : Prime ↑p\nhp1 : Odd p\nhx : ¬↑p ∣ y\nk : R\nhk : x - y = ↑p * k\n⊢ ¬↑p ^ (1 + 1) ∣ ∑ i in range p, x ^ i * y ^ (p - ↑1 - i)\n[PROOFSTEP]\nrw [one_add_one_eq_two, eq_add_of_sub_eq' hk]\n[GOAL]\ncase refine'_2.intro\nR : Type u_1\nn : ℕ\ninst✝² : CommRing R\na b x y : R\np : ℕ\ninst✝¹ : IsDomain R\ninst✝ : DecidableRel fun x x_1 => x ∣ x_1\nhp : Prime ↑p\nhp1 : Odd p\nhx : ¬↑p ∣ y\nk : R\nhk : x - y = ↑p * k\n⊢ ¬↑p ^ 2 ∣ ∑ i in range p, (y + ↑p * k) ^ i * y ^ (p - ↑1 - i)\n[PROOFSTEP]\nrefine' mt (dvd_iff_dvd_of_dvd_sub (@odd_sq_dvd_geom_sum₂_sub _ _ y k _ hp1)).mp _\n[GOAL]\ncase refine'_2.intro\nR : Type u_1\nn : ℕ\ninst✝² : CommRing R\na b x y : R\np : ℕ\ninst✝¹ : IsDomain R\ninst✝ : DecidableRel fun x x_1 => x ∣ x_1\nhp : Prime ↑p\nhp1 : Odd p\nhx : ¬↑p ∣ y\nk : R\nhk : x - y = ↑p * k\n⊢ ¬↑p ^ 2 ∣ ↑p * y ^ (p - 1)\n[PROOFSTEP]\nrw [pow_two, mul_dvd_mul_iff_left hp.ne_zero]\n[GOAL]\ncase refine'_2.intro\nR : Type u_1\nn : ℕ\ninst✝² : CommRing R\na b x y : R\np : ℕ\ninst✝¹ : IsDomain R\ninst✝ : DecidableRel fun x x_1 => x ∣ x_1\nhp : Prime ↑p\nhp1 : Odd p\nhx : ¬↑p ∣ y\nk : R\nhk : x - y = ↑p * k\n⊢ ¬↑p ∣ y ^ (p - 1)\n[PROOFSTEP]\nexact mt hp.dvd_of_dvd_pow hx\n[GOAL]\nR : Type u_1\nn : ℕ\ninst✝² : CommRing R\na b x y : R\np : ℕ\ninst✝¹ : IsDomain R\ninst✝ : DecidableRel fun x x_1 => x ∣ x_1\nhp : Prime ↑p\nhp1 : Odd p\nhxy : ↑p ∣ x - y\nhx : ¬↑p ∣ x\n⊢ multiplicity (↑p) (x ^ p - y ^ p) = multiplicity (↑p) (x - y) + 1\n[PROOFSTEP]\nrw [← geom_sum₂_mul, multiplicity.mul hp, geom_sum₂_eq_one hp hp1 hxy hx, add_comm]\n[GOAL]\nR : Type u_1\nn : ℕ\ninst✝² : CommRing R\na✝ b x y : R\np : ℕ\ninst✝¹ : IsDomain R\ninst✝ : DecidableRel fun x x_1 => x ∣ x_1\nhp : Prime ↑p\nhp1 : Odd p\nhxy : ↑p ∣ x - y\nhx : ¬↑p ∣ x\na : ℕ\n⊢ multiplicity (↑p) (x ^ p ^ a - y ^ p ^ a) = multiplicity (↑p) (x - y) + ↑a\n[PROOFSTEP]\ninduction' a with a h_ind\n[GOAL]\ncase zero\nR : Type u_1\nn : ℕ\ninst✝² : CommRing R\na b x y : R\np : ℕ\ninst✝¹ : IsDomain R\ninst✝ : DecidableRel fun x x_1 => x ∣ x_1\nhp : Prime ↑p\nhp1 : Odd p\nhxy : ↑p ∣ x - y\nhx : ¬↑p ∣ x\n⊢ multiplicity (↑p) (x ^ p ^ Nat.zero - y ^ p ^ Nat.zero) = multiplicity (↑p) (x - y) + ↑Nat.zero\n[PROOFSTEP]\nrw [Nat.cast_zero, add_zero, pow_zero, pow_one, pow_one]\n[GOAL]\ncase succ\nR : Type u_1\nn : ℕ\ninst✝² : CommRing R\na✝ b x y : R\np : ℕ\ninst✝¹ : IsDomain R\ninst✝ : DecidableRel fun x x_1 => x ∣ x_1\nhp : Prime ↑p\nhp1 : Odd p\nhxy : ↑p ∣ x - y\nhx : ¬↑p ∣ x\na : ℕ\nh_ind : multiplicity (↑p) (x ^ p ^ a - y ^ p ^ a) = multiplicity (↑p) (x - y) + ↑a\n⊢ multiplicity (↑p) (x ^ p ^ Nat.succ a - y ^ p ^ Nat.succ a) = multiplicity (↑p) (x - y) + ↑(Nat.succ a)\n[PROOFSTEP]\nrw [← Nat.add_one, Nat.cast_add, Nat.cast_one, ← add_assoc, ← h_ind, pow_succ', pow_mul, pow_mul]\n[GOAL]\ncase succ\nR : Type u_1\nn : ℕ\ninst✝² : CommRing R\na✝ b x y : R\np : ℕ\ninst✝¹ : IsDomain R\ninst✝ : DecidableRel fun x x_1 => x ∣ x_1\nhp : Prime ↑p\nhp1 : Odd p\nhxy : ↑p ∣ x - y\nhx : ¬↑p ∣ x\na : ℕ\nh_ind : multiplicity (↑p) (x ^ p ^ a - y ^ p ^ a) = multiplicity (↑p) (x - y) + ↑a\n⊢ multiplicity (↑p) ((x ^ p ^ a) ^ p - (y ^ p ^ a) ^ p) = multiplicity (↑p) (x ^ p ^ a - y ^ p ^ a) + 1\n[PROOFSTEP]\napply pow_prime_sub_pow_prime hp hp1\n[GOAL]\ncase succ.hxy\nR : Type u_1\nn : ℕ\ninst✝² : CommRing R\na✝ b x y : R\np : ℕ\ninst✝¹ : IsDomain R\ninst✝ : DecidableRel fun x x_1 => x ∣ x_1\nhp : Prime ↑p\nhp1 : Odd p\nhxy : ↑p ∣ x - y\nhx : ¬↑p ∣ x\na : ℕ\nh_ind : multiplicity (↑p) (x ^ p ^ a - y ^ p ^ a) = multiplicity (↑p) (x - y) + ↑a\n⊢ ↑p ∣ x ^ p ^ a - y ^ p ^ a\n[PROOFSTEP]\nrw [← geom_sum₂_mul]\n[GOAL]\ncase succ.hxy\nR : Type u_1\nn : ℕ\ninst✝² : CommRing R\na✝ b x y : R\np : ℕ\ninst✝¹ : IsDomain R\ninst✝ : DecidableRel fun x x_1 => x ∣ x_1\nhp : Prime ↑p\nhp1 : Odd p\nhxy : ↑p ∣ x - y\nhx : ¬↑p ∣ x\na : ℕ\nh_ind : multiplicity (↑p) (x ^ p ^ a - y ^ p ^ a) = multiplicity (↑p) (x - y) + ↑a\n⊢ ↑p ∣ (∑ i in range (p ^ a), x ^ i * y ^ (p ^ a - 1 - i)) * (x - y)\n[PROOFSTEP]\nexact dvd_mul_of_dvd_right hxy _\n[GOAL]\ncase succ.hx\nR : Type u_1\nn : ℕ\ninst✝² : CommRing R\na✝ b x y : R\np : ℕ\ninst✝¹ : IsDomain R\ninst✝ : DecidableRel fun x x_1 => x ∣ x_1\nhp : Prime ↑p\nhp1 : Odd p\nhxy : ↑p ∣ x - y\nhx : ¬↑p ∣ x\na : ℕ\nh_ind : multiplicity (↑p) (x ^ p ^ a - y ^ p ^ a) = multiplicity (↑p) (x - y) + ↑a\n⊢ ¬↑p ∣ x ^ p ^ a\n[PROOFSTEP]\nexact fun h => hx (hp.dvd_of_dvd_pow h)\n[GOAL]\nR : Type u_1\nn✝ : ℕ\ninst✝ : CommRing R\na b x✝ y✝ : R\np : ℕ\nhp : Nat.Prime p\nhp1 : Odd p\nx y : ℤ\nhxy : ↑p ∣ x - y\nhx : ¬↑p ∣ x\nn : ℕ\n⊢ multiplicity (↑p) (x ^ n - y ^ n) = multiplicity (↑p) (x - y) + multiplicity p n\n[PROOFSTEP]\ncases' n with n\n[GOAL]\ncase zero\nR : Type u_1\nn : ℕ\ninst✝ : CommRing R\na b x✝ y✝ : R\np : ℕ\nhp : Nat.Prime p\nhp1 : Odd p\nx y : ℤ\nhxy : ↑p ∣ x - y\nhx : ¬↑p ∣ x\n⊢ multiplicity (↑p) (x ^ Nat.zero - y ^ Nat.zero) = multiplicity (↑p) (x - y) + multiplicity p Nat.zero\n[PROOFSTEP]\nsimp only [multiplicity.zero, add_top, pow_zero, sub_self, Nat.zero_eq]\n[GOAL]\ncase succ\nR : Type u_1\nn✝ : ℕ\ninst✝ : CommRing R\na b x✝ y✝ : R\np : ℕ\nhp : Nat.Prime p\nhp1 : Odd p\nx y : ℤ\nhxy : ↑p ∣ x - y\nhx : ¬↑p ∣ x\nn : ℕ\n⊢ multiplicity (↑p) (x ^ Nat.succ n - y ^ Nat.succ n) = multiplicity (↑p) (x - y) + multiplicity p (Nat.succ n)\n[PROOFSTEP]\nhave h : (multiplicity _ _).Dom := finite_nat_iff.mpr ⟨hp.ne_one, n.succ_pos⟩\n[GOAL]\ncase succ\nR : Type u_1\nn✝ : ℕ\ninst✝ : CommRing R\na b x✝ y✝ : R\np : ℕ\nhp : Nat.Prime p\nhp1 : Odd p\nx y : ℤ\nhxy : ↑p ∣ x - y\nhx : ¬↑p ∣ x\nn : ℕ\nh : (multiplicity p (Nat.succ n)).Dom\n⊢ multiplicity (↑p) (x ^ Nat.succ n - y ^ Nat.succ n) = multiplicity (↑p) (x - y) + multiplicity p (Nat.succ n)\n[PROOFSTEP]\nrcases eq_coe_iff.mp (PartENat.natCast_get h).symm with ⟨⟨k, hk⟩, hpn⟩\n[GOAL]\ncase succ.intro.intro\nR : Type u_1\nn✝ : ℕ\ninst✝ : CommRing R\na b x✝ y✝ : R\np : ℕ\nhp : Nat.Prime p\nhp1 : Odd p\nx y : ℤ\nhxy : ↑p ∣ x - y\nhx : ¬↑p ∣ x\nn : ℕ\nh : (multiplicity p (Nat.succ n)).Dom\nhpn : ¬p ^ (Part.get (multiplicity p (Nat.succ n)) h + 1) ∣ Nat.succ n\nk : ℕ\nhk : Nat.succ n = p ^ Part.get (multiplicity p (Nat.succ n)) h * k\n⊢ multiplicity (↑p) (x ^ Nat.succ n - y ^ Nat.succ n) = multiplicity (↑p) (x - y) + multiplicity p (Nat.succ n)\n[PROOFSTEP]\nconv_lhs => rw [hk, pow_mul, pow_mul]\n[GOAL]\nR : Type u_1\nn✝ : ℕ\ninst✝ : CommRing R\na b x✝ y✝ : R\np : ℕ\nhp : Nat.Prime p\nhp1 : Odd p\nx y : ℤ\nhxy : ↑p ∣ x - y\nhx : ¬↑p ∣ x\nn : ℕ\nh : (multiplicity p (Nat.succ n)).Dom\nhpn : ¬p ^ (Part.get (multiplicity p (Nat.succ n)) h + 1) ∣ Nat.succ n\nk : ℕ\nhk : Nat.succ n = p ^ Part.get (multiplicity p (Nat.succ n)) h * k\n| multiplicity (↑p) (x ^ Nat.succ n - y ^ Nat.succ n)\n[PROOFSTEP]\nrw [hk, pow_mul, pow_mul]\n[GOAL]\nR : Type u_1\nn✝ : ℕ\ninst✝ : CommRing R\na b x✝ y✝ : R\np : ℕ\nhp : Nat.Prime p\nhp1 : Odd p\nx y : ℤ\nhxy : ↑p ∣ x - y\nhx : ¬↑p ∣ x\nn : ℕ\nh : (multiplicity p (Nat.succ n)).Dom\nhpn : ¬p ^ (Part.get (multiplicity p (Nat.succ n)) h + 1) ∣ Nat.succ n\nk : ℕ\nhk : Nat.succ n = p ^ Part.get (multiplicity p (Nat.succ n)) h * k\n| multiplicity (↑p) (x ^ Nat.succ n - y ^ Nat.succ n)\n[PROOFSTEP]\nrw [hk, pow_mul, pow_mul]\n[GOAL]\nR : Type u_1\nn✝ : ℕ\ninst✝ : CommRing R\na b x✝ y✝ : R\np : ℕ\nhp : Nat.Prime p\nhp1 : Odd p\nx y : ℤ\nhxy : ↑p ∣ x - y\nhx : ¬↑p ∣ x\nn : ℕ\nh : (multiplicity p (Nat.succ n)).Dom\nhpn : ¬p ^ (Part.get (multiplicity p (Nat.succ n)) h + 1) ∣ Nat.succ n\nk : ℕ\nhk : Nat.succ n = p ^ Part.get (multiplicity p (Nat.succ n)) h * k\n| multiplicity (↑p) (x ^ Nat.succ n - y ^ Nat.succ n)\n[PROOFSTEP]\nrw [hk, pow_mul, pow_mul]\n[GOAL]\ncase succ.intro.intro\nR : Type u_1\nn✝ : ℕ\ninst✝ : CommRing R\na b x✝ y✝ : R\np : ℕ\nhp : Nat.Prime p\nhp1 : Odd p\nx y : ℤ\nhxy : ↑p ∣ x - y\nhx : ¬↑p ∣ x\nn : ℕ\nh : (multiplicity p (Nat.succ n)).Dom\nhpn : ¬p ^ (Part.get (multiplicity p (Nat.succ n)) h + 1) ∣ Nat.succ n\nk : ℕ\nhk : Nat.succ n = p ^ Part.get (multiplicity p (Nat.succ n)) h * k\n⊢ multiplicity (↑p)\n      ((x ^ p ^ Part.get (multiplicity p (Nat.succ n)) h) ^ k -\n        (y ^ p ^ Part.get (multiplicity p (Nat.succ n)) h) ^ k) =\n    multiplicity (↑p) (x - y) + multiplicity p (Nat.succ n)\n[PROOFSTEP]\nrw [Nat.prime_iff_prime_int] at hp \n[GOAL]\ncase succ.intro.intro\nR : Type u_1\nn✝ : ℕ\ninst✝ : CommRing R\na b x✝ y✝ : R\np : ℕ\nhp : Prime ↑p\nhp1 : Odd p\nx y : ℤ\nhxy : ↑p ∣ x - y\nhx : ¬↑p ∣ x\nn : ℕ\nh : (multiplicity p (Nat.succ n)).Dom\nhpn : ¬p ^ (Part.get (multiplicity p (Nat.succ n)) h + 1) ∣ Nat.succ n\nk : ℕ\nhk : Nat.succ n = p ^ Part.get (multiplicity p (Nat.succ n)) h * k\n⊢ multiplicity (↑p)\n      ((x ^ p ^ Part.get (multiplicity p (Nat.succ n)) h) ^ k -\n        (y ^ p ^ Part.get (multiplicity p (Nat.succ n)) h) ^ k) =\n    multiplicity (↑p) (x - y) + multiplicity p (Nat.succ n)\n[PROOFSTEP]\nrw [pow_sub_pow_of_prime hp, pow_prime_pow_sub_pow_prime_pow hp hp1 hxy hx, PartENat.natCast_get]\n[GOAL]\ncase succ.intro.intro.hxy\nR : Type u_1\nn✝ : ℕ\ninst✝ : CommRing R\na b x✝ y✝ : R\np : ℕ\nhp : Prime ↑p\nhp1 : Odd p\nx y : ℤ\nhxy : ↑p ∣ x - y\nhx : ¬↑p ∣ x\nn : ℕ\nh : (multiplicity p (Nat.succ n)).Dom\nhpn : ¬p ^ (Part.get (multiplicity p (Nat.succ n)) h + 1) ∣ Nat.succ n\nk : ℕ\nhk : Nat.succ n = p ^ Part.get (multiplicity p (Nat.succ n)) h * k\n⊢ ↑p ∣ x ^ p ^ Part.get (multiplicity p (Nat.succ n)) h - y ^ p ^ Part.get (multiplicity p (Nat.succ n)) h\n[PROOFSTEP]\nrw [← geom_sum₂_mul]\n[GOAL]\ncase succ.intro.intro.hxy\nR : Type u_1\nn✝ : ℕ\ninst✝ : CommRing R\na b x✝ y✝ : R\np : ℕ\nhp : Prime ↑p\nhp1 : Odd p\nx y : ℤ\nhxy : ↑p ∣ x - y\nhx : ¬↑p ∣ x\nn : ℕ\nh : (multiplicity p (Nat.succ n)).Dom\nhpn : ¬p ^ (Part.get (multiplicity p (Nat.succ n)) h + 1) ∣ Nat.succ n\nk : ℕ\nhk : Nat.succ n = p ^ Part.get (multiplicity p (Nat.succ n)) h * k\n⊢ ↑p ∣\n    (∑ i in range (p ^ Part.get (multiplicity p (Nat.succ n)) h),\n        x ^ i * y ^ (p ^ Part.get (multiplicity p (Nat.succ n)) h - 1 - i)) *\n      (x - y)\n[PROOFSTEP]\nexact dvd_mul_of_dvd_right hxy _\n[GOAL]\ncase succ.intro.intro.hx\nR : Type u_1\nn✝ : ℕ\ninst✝ : CommRing R\na b x✝ y✝ : R\np : ℕ\nhp : Prime ↑p\nhp1 : Odd p\nx y : ℤ\nhxy : ↑p ∣ x - y\nhx : ¬↑p ∣ x\nn : ℕ\nh : (multiplicity p (Nat.succ n)).Dom\nhpn : ¬p ^ (Part.get (multiplicity p (Nat.succ n)) h + 1) ∣ Nat.succ n\nk : ℕ\nhk : Nat.succ n = p ^ Part.get (multiplicity p (Nat.succ n)) h * k\n⊢ ¬↑p ∣ x ^ p ^ Part.get (multiplicity p (Nat.succ n)) h\n[PROOFSTEP]\nexact fun h => hx (hp.dvd_of_dvd_pow h)\n[GOAL]\ncase succ.intro.intro.hn\nR : Type u_1\nn✝ : ℕ\ninst✝ : CommRing R\na b x✝ y✝ : R\np : ℕ\nhp : Prime ↑p\nhp1 : Odd p\nx y : ℤ\nhxy : ↑p ∣ x - y\nhx : ¬↑p ∣ x\nn : ℕ\nh : (multiplicity p (Nat.succ n)).Dom\nhpn : ¬p ^ (Part.get (multiplicity p (Nat.succ n)) h + 1) ∣ Nat.succ n\nk : ℕ\nhk : Nat.succ n = p ^ Part.get (multiplicity p (Nat.succ n)) h * k\n⊢ ¬↑p ∣ ↑k\n[PROOFSTEP]\nrw [Int.coe_nat_dvd]\n[GOAL]\ncase succ.intro.intro.hn\nR : Type u_1\nn✝ : ℕ\ninst✝ : CommRing R\na b x✝ y✝ : R\np : ℕ\nhp : Prime ↑p\nhp1 : Odd p\nx y : ℤ\nhxy : ↑p ∣ x - y\nhx : ¬↑p ∣ x\nn : ℕ\nh : (multiplicity p (Nat.succ n)).Dom\nhpn : ¬p ^ (Part.get (multiplicity p (Nat.succ n)) h + 1) ∣ Nat.succ n\nk : ℕ\nhk : Nat.succ n = p ^ Part.get (multiplicity p (Nat.succ n)) h * k\n⊢ ¬p ∣ k\n[PROOFSTEP]\nrintro ⟨c, rfl⟩\n[GOAL]\ncase succ.intro.intro.hn.intro\nR : Type u_1\nn✝ : ℕ\ninst✝ : CommRing R\na b x✝ y✝ : R\np : ℕ\nhp : Prime ↑p\nhp1 : Odd p\nx y : ℤ\nhxy : ↑p ∣ x - y\nhx : ¬↑p ∣ x\nn : ℕ\nh : (multiplicity p (Nat.succ n)).Dom\nhpn : ¬p ^ (Part.get (multiplicity p (Nat.succ n)) h + 1) ∣ Nat.succ n\nc : ℕ\nhk : Nat.succ n = p ^ Part.get (multiplicity p (Nat.succ n)) h * (p * c)\n⊢ False\n[PROOFSTEP]\nrefine' hpn ⟨c, _⟩\n[GOAL]\ncase succ.intro.intro.hn.intro\nR : Type u_1\nn✝ : ℕ\ninst✝ : CommRing R\na b x✝ y✝ : R\np : ℕ\nhp : Prime ↑p\nhp1 : Odd p\nx y : ℤ\nhxy : ↑p ∣ x - y\nhx : ¬↑p ∣ x\nn : ℕ\nh : (multiplicity p (Nat.succ n)).Dom\nhpn : ¬p ^ (Part.get (multiplicity p (Nat.succ n)) h + 1) ∣ Nat.succ n\nc : ℕ\nhk : Nat.succ n = p ^ Part.get (multiplicity p (Nat.succ n)) h * (p * c)\n⊢ Nat.succ n = p ^ (Part.get (multiplicity p (Nat.succ n)) h + 1) * c\n[PROOFSTEP]\nrwa [pow_succ', mul_assoc]\n[GOAL]\nR : Type u_1\nn✝ : ℕ\ninst✝ : CommRing R\na b x✝ y✝ : R\np : ℕ\nhp : Nat.Prime p\nhp1 : Odd p\nx y : ℤ\nhxy : ↑p ∣ x + y\nhx : ¬↑p ∣ x\nn : ℕ\nhn : Odd n\n⊢ multiplicity (↑p) (x ^ n + y ^ n) = multiplicity (↑p) (x + y) + multiplicity p n\n[PROOFSTEP]\nrw [← sub_neg_eq_add] at hxy \n[GOAL]\nR : Type u_1\nn✝ : ℕ\ninst✝ : CommRing R\na b x✝ y✝ : R\np : ℕ\nhp : Nat.Prime p\nhp1 : Odd p\nx y : ℤ\nhxy : ↑p ∣ x - -y\nhx : ¬↑p ∣ x\nn : ℕ\nhn : Odd n\n⊢ multiplicity (↑p) (x ^ n + y ^ n) = multiplicity (↑p) (x + y) + multiplicity p n\n[PROOFSTEP]\nrw [← sub_neg_eq_add, ← sub_neg_eq_add, ← Odd.neg_pow hn]\n[GOAL]\nR : Type u_1\nn✝ : ℕ\ninst✝ : CommRing R\na b x✝ y✝ : R\np : ℕ\nhp : Nat.Prime p\nhp1 : Odd p\nx y : ℤ\nhxy : ↑p ∣ x - -y\nhx : ¬↑p ∣ x\nn : ℕ\nhn : Odd n\n⊢ multiplicity (↑p) (x ^ n - (-y) ^ n) = multiplicity (↑p) (x - -y) + multiplicity p n\n[PROOFSTEP]\nexact Int.pow_sub_pow hp hp1 hxy hx n\n[GOAL]\nR : Type u_1\nn✝ : ℕ\ninst✝ : CommRing R\na b x✝ y✝ : R\np : ℕ\nhp : Nat.Prime p\nhp1 : Odd p\nx y : ℕ\nhxy : p ∣ x - y\nhx : ¬p ∣ x\nn : ℕ\n⊢ multiplicity p (x ^ n - y ^ n) = multiplicity p (x - y) + multiplicity p n\n[PROOFSTEP]\nobtain hyx | hyx := le_total y x\n[GOAL]\ncase inl\nR : Type u_1\nn✝ : ℕ\ninst✝ : CommRing R\na b x✝ y✝ : R\np : ℕ\nhp : Nat.Prime p\nhp1 : Odd p\nx y : ℕ\nhxy : p ∣ x - y\nhx : ¬p ∣ x\nn : ℕ\nhyx : y ≤ x\n⊢ multiplicity p (x ^ n - y ^ n) = multiplicity p (x - y) + multiplicity p n\n[PROOFSTEP]\niterate 2 rw [← Int.coe_nat_multiplicity]\n[GOAL]\ncase inl\nR : Type u_1\nn✝ : ℕ\ninst✝ : CommRing R\na b x✝ y✝ : R\np : ℕ\nhp : Nat.Prime p\nhp1 : Odd p\nx y : ℕ\nhxy : p ∣ x - y\nhx : ¬p ∣ x\nn : ℕ\nhyx : y ≤ x\n⊢ multiplicity p (x ^ n - y ^ n) = multiplicity p (x - y) + multiplicity p n\n[PROOFSTEP]\nrw [← Int.coe_nat_multiplicity]\n[GOAL]\ncase inl\nR : Type u_1\nn✝ : ℕ\ninst✝ : CommRing R\na b x✝ y✝ : R\np : ℕ\nhp : Nat.Prime p\nhp1 : Odd p\nx y : ℕ\nhxy : p ∣ x - y\nhx : ¬p ∣ x\nn : ℕ\nhyx : y ≤ x\n⊢ multiplicity ↑p ↑(x ^ n - y ^ n) = multiplicity p (x - y) + multiplicity p n\n[PROOFSTEP]\nrw [← Int.coe_nat_multiplicity]\n[GOAL]\ncase inl\nR : Type u_1\nn✝ : ℕ\ninst✝ : CommRing R\na b x✝ y✝ : R\np : ℕ\nhp : Nat.Prime p\nhp1 : Odd p\nx y : ℕ\nhxy : p ∣ x - y\nhx : ¬p ∣ x\nn : ℕ\nhyx : y ≤ x\n⊢ multiplicity ↑p ↑(x ^ n - y ^ n) = multiplicity ↑p ↑(x - y) + multiplicity p n\n[PROOFSTEP]\nrw [Int.ofNat_sub (Nat.pow_le_pow_of_le_left hyx n)]\n[GOAL]\ncase inl\nR : Type u_1\nn✝ : ℕ\ninst✝ : CommRing R\na b x✝ y✝ : R\np : ℕ\nhp : Nat.Prime p\nhp1 : Odd p\nx y : ℕ\nhxy : p ∣ x - y\nhx : ¬p ∣ x\nn : ℕ\nhyx : y ≤ x\n⊢ multiplicity (↑p) (↑(x ^ n) - ↑(y ^ n)) = multiplicity ↑p ↑(x - y) + multiplicity p n\n[PROOFSTEP]\nrw [← Int.coe_nat_dvd] at hxy hx \n[GOAL]\ncase inl\nR : Type u_1\nn✝ : ℕ\ninst✝ : CommRing R\na b x✝ y✝ : R\np : ℕ\nhp : Nat.Prime p\nhp1 : Odd p\nx y : ℕ\nhxy : ↑p ∣ ↑(x - y)\nhx : ¬↑p ∣ ↑x\nn : ℕ\nhyx : y ≤ x\n⊢ multiplicity (↑p) (↑(x ^ n) - ↑(y ^ n)) = multiplicity ↑p ↑(x - y) + multiplicity p n\n[PROOFSTEP]\nrw [Int.coe_nat_sub hyx] at *\n[GOAL]\ncase inl\nR : Type u_1\nn✝ : ℕ\ninst✝ : CommRing R\na b x✝ y✝ : R\np : ℕ\nhp : Nat.Prime p\nhp1 : Odd p\nx y : ℕ\nhxy : ↑p ∣ ↑x - ↑y\nhx : ¬↑p ∣ ↑x\nn : ℕ\nhyx : y ≤ x\n⊢ multiplicity (↑p) (↑(x ^ n) - ↑(y ^ n)) = multiplicity (↑p) (↑x - ↑y) + multiplicity p n\n[PROOFSTEP]\npush_cast at *\n[GOAL]\ncase inl\nR : Type u_1\nn✝ : ℕ\ninst✝ : CommRing R\na b x✝ y✝ : R\np : ℕ\nhp : Nat.Prime p\nhp1 : Odd p\nx y : ℕ\nhxy : ↑p ∣ ↑x - ↑y\nhx : ¬↑p ∣ ↑x\nn : ℕ\nhyx : y ≤ x\n⊢ multiplicity (↑p) (↑x ^ n - ↑y ^ n) = multiplicity (↑p) (↑x - ↑y) + multiplicity p n\n[PROOFSTEP]\nexact Int.pow_sub_pow hp hp1 hxy hx n\n[GOAL]\ncase inr\nR : Type u_1\nn✝ : ℕ\ninst✝ : CommRing R\na b x✝ y✝ : R\np : ℕ\nhp : Nat.Prime p\nhp1 : Odd p\nx y : ℕ\nhxy : p ∣ x - y\nhx : ¬p ∣ x\nn : ℕ\nhyx : x ≤ y\n⊢ multiplicity p (x ^ n - y ^ n) = multiplicity p (x - y) + multiplicity p n\n[PROOFSTEP]\nsimp only [Nat.sub_eq_zero_iff_le.mpr hyx, Nat.sub_eq_zero_iff_le.mpr (Nat.pow_le_pow_of_le_left hyx n),\n  multiplicity.zero, PartENat.top_add]\n[GOAL]\nR : Type u_1\nn✝ : ℕ\ninst✝ : CommRing R\na b x✝ y✝ : R\np : ℕ\nhp : Nat.Prime p\nhp1 : Odd p\nx y : ℕ\nhxy : p ∣ x + y\nhx : ¬p ∣ x\nn : ℕ\nhn : Odd n\n⊢ multiplicity p (x ^ n + y ^ n) = multiplicity p (x + y) + multiplicity p n\n[PROOFSTEP]\niterate 2 rw [← Int.coe_nat_multiplicity]\n[GOAL]\nR : Type u_1\nn✝ : ℕ\ninst✝ : CommRing R\na b x✝ y✝ : R\np : ℕ\nhp : Nat.Prime p\nhp1 : Odd p\nx y : ℕ\nhxy : p ∣ x + y\nhx : ¬p ∣ x\nn : ℕ\nhn : Odd n\n⊢ multiplicity p (x ^ n + y ^ n) = multiplicity p (x + y) + multiplicity p n\n[PROOFSTEP]\nrw [← Int.coe_nat_multiplicity]\n[GOAL]\nR : Type u_1\nn✝ : ℕ\ninst✝ : CommRing R\na b x✝ y✝ : R\np : ℕ\nhp : Nat.Prime p\nhp1 : Odd p\nx y : ℕ\nhxy : p ∣ x + y\nhx : ¬p ∣ x\nn : ℕ\nhn : Odd n\n⊢ multiplicity ↑p ↑(x ^ n + y ^ n) = multiplicity p (x + y) + multiplicity p n\n[PROOFSTEP]\nrw [← Int.coe_nat_multiplicity]\n[GOAL]\nR : Type u_1\nn✝ : ℕ\ninst✝ : CommRing R\na b x✝ y✝ : R\np : ℕ\nhp : Nat.Prime p\nhp1 : Odd p\nx y : ℕ\nhxy : p ∣ x + y\nhx : ¬p ∣ x\nn : ℕ\nhn : Odd n\n⊢ multiplicity ↑p ↑(x ^ n + y ^ n) = multiplicity ↑p ↑(x + y) + multiplicity p n\n[PROOFSTEP]\nrw [← Int.coe_nat_dvd] at hxy hx \n[GOAL]\nR : Type u_1\nn✝ : ℕ\ninst✝ : CommRing R\na b x✝ y✝ : R\np : ℕ\nhp : Nat.Prime p\nhp1 : Odd p\nx y : ℕ\nhxy : ↑p ∣ ↑(x + y)\nhx : ¬↑p ∣ ↑x\nn : ℕ\nhn : Odd n\n⊢ multiplicity ↑p ↑(x ^ n + y ^ n) = multiplicity ↑p ↑(x + y) + multiplicity p n\n[PROOFSTEP]\npush_cast at *\n[GOAL]\nR : Type u_1\nn✝ : ℕ\ninst✝ : CommRing R\na b x✝ y✝ : R\np : ℕ\nhp : Nat.Prime p\nhp1 : Odd p\nx y : ℕ\nhx : ¬↑p ∣ ↑x\nn : ℕ\nhn : Odd n\nhxy : ↑p ∣ ↑x + ↑y\n⊢ multiplicity (↑p) (↑x ^ n + ↑y ^ n) = multiplicity (↑p) (↑x + ↑y) + multiplicity p n\n[PROOFSTEP]\nexact Int.pow_add_pow hp hp1 hxy hx hn\n[GOAL]\nR : Type u_1\nn✝ : ℕ\ninst✝ : CommRing R\nx y : R\nn : ℕ\n⊢ x ^ 2 ^ n - y ^ 2 ^ n = (∏ i in range n, (x ^ 2 ^ i + y ^ 2 ^ i)) * (x - y)\n[PROOFSTEP]\ninduction' n with d hd\n[GOAL]\ncase zero\nR : Type u_1\nn : ℕ\ninst✝ : CommRing R\nx y : R\n⊢ x ^ 2 ^ Nat.zero - y ^ 2 ^ Nat.zero = (∏ i in range Nat.zero, (x ^ 2 ^ i + y ^ 2 ^ i)) * (x - y)\n[PROOFSTEP]\nsimp only [pow_zero, pow_one, range_zero, prod_empty, one_mul, Nat.zero_eq]\n[GOAL]\ncase succ\nR : Type u_1\nn : ℕ\ninst✝ : CommRing R\nx y : R\nd : ℕ\nhd : x ^ 2 ^ d - y ^ 2 ^ d = (∏ i in range d, (x ^ 2 ^ i + y ^ 2 ^ i)) * (x - y)\n⊢ x ^ 2 ^ Nat.succ d - y ^ 2 ^ Nat.succ d = (∏ i in range (Nat.succ d), (x ^ 2 ^ i + y ^ 2 ^ i)) * (x - y)\n[PROOFSTEP]\nsuffices x ^ 2 ^ d.succ - y ^ 2 ^ d.succ = (x ^ 2 ^ d + y ^ 2 ^ d) * (x ^ 2 ^ d - y ^ 2 ^ d) by\n  rw [this, hd, Finset.prod_range_succ, ← mul_assoc, mul_comm (x ^ 2 ^ d + y ^ 2 ^ d)]\n[GOAL]\nR : Type u_1\nn : ℕ\ninst✝ : CommRing R\nx y : R\nd : ℕ\nhd : x ^ 2 ^ d - y ^ 2 ^ d = (∏ i in range d, (x ^ 2 ^ i + y ^ 2 ^ i)) * (x - y)\nthis : x ^ 2 ^ Nat.succ d - y ^ 2 ^ Nat.succ d = (x ^ 2 ^ d + y ^ 2 ^ d) * (x ^ 2 ^ d - y ^ 2 ^ d)\n⊢ x ^ 2 ^ Nat.succ d - y ^ 2 ^ Nat.succ d = (∏ i in range (Nat.succ d), (x ^ 2 ^ i + y ^ 2 ^ i)) * (x - y)\n[PROOFSTEP]\nrw [this, hd, Finset.prod_range_succ, ← mul_assoc, mul_comm (x ^ 2 ^ d + y ^ 2 ^ d)]\n[GOAL]\ncase succ\nR : Type u_1\nn : ℕ\ninst✝ : CommRing R\nx y : R\nd : ℕ\nhd : x ^ 2 ^ d - y ^ 2 ^ d = (∏ i in range d, (x ^ 2 ^ i + y ^ 2 ^ i)) * (x - y)\n⊢ x ^ 2 ^ Nat.succ d - y ^ 2 ^ Nat.succ d = (x ^ 2 ^ d + y ^ 2 ^ d) * (x ^ 2 ^ d - y ^ 2 ^ d)\n[PROOFSTEP]\nrw [Nat.succ_eq_add_one]\n[GOAL]\ncase succ\nR : Type u_1\nn : ℕ\ninst✝ : CommRing R\nx y : R\nd : ℕ\nhd : x ^ 2 ^ d - y ^ 2 ^ d = (∏ i in range d, (x ^ 2 ^ i + y ^ 2 ^ i)) * (x - y)\n⊢ x ^ 2 ^ (d + 1) - y ^ 2 ^ (d + 1) = (x ^ 2 ^ d + y ^ 2 ^ d) * (x ^ 2 ^ d - y ^ 2 ^ d)\n[PROOFSTEP]\nring\n[GOAL]\nR : Type u_1\nn : ℕ\nx : ℤ\n⊢ Odd x → x ^ 2 % 4 = 1\n[PROOFSTEP]\nintro hx\n[GOAL]\nR : Type u_1\nn : ℕ\nx : ℤ\nhx : Odd x\n⊢ x ^ 2 % 4 = 1\n[PROOFSTEP]\nunfold Odd at hx \n[GOAL]\nR : Type u_1\nn : ℕ\nx : ℤ\nhx : ∃ k, x = 2 * k + 1\n⊢ x ^ 2 % 4 = 1\n[PROOFSTEP]\nrcases hx with ⟨_, rfl⟩\n[GOAL]\ncase intro\nR : Type u_1\nn : ℕ\nw✝ : ℤ\n⊢ (2 * w✝ + 1) ^ 2 % 4 = 1\n[PROOFSTEP]\nring_nf\n[GOAL]\ncase intro\nR : Type u_1\nn : ℕ\nw✝ : ℤ\n⊢ (1 + w✝ * 4 + w✝ ^ 2 * 4) % 4 = 1\n[PROOFSTEP]\nrw [add_assoc, ← add_mul, Int.add_mul_emod_self]\n[GOAL]\ncase intro\nR : Type u_1\nn : ℕ\nw✝ : ℤ\n⊢ 1 % 4 = 1\n[PROOFSTEP]\nnorm_num\n[GOAL]\nR : Type u_1\nn : ℕ\nx y : ℤ\nhx : ¬2 ∣ x\nhxy : 4 ∣ x - y\ni : ℕ\n⊢ multiplicity 2 (x ^ 2 ^ i + y ^ 2 ^ i) = ↑1\n[PROOFSTEP]\nhave hx_odd : Odd x := by rwa [Int.odd_iff_not_even, even_iff_two_dvd]\n[GOAL]\nR : Type u_1\nn : ℕ\nx y : ℤ\nhx : ¬2 ∣ x\nhxy : 4 ∣ x - y\ni : ℕ\n⊢ Odd x\n[PROOFSTEP]\nrwa [Int.odd_iff_not_even, even_iff_two_dvd]\n[GOAL]\nR : Type u_1\nn : ℕ\nx y : ℤ\nhx : ¬2 ∣ x\nhxy : 4 ∣ x - y\ni : ℕ\nhx_odd : Odd x\n⊢ multiplicity 2 (x ^ 2 ^ i + y ^ 2 ^ i) = ↑1\n[PROOFSTEP]\nhave hxy_even : Even (x - y) := even_iff_two_dvd.mpr (dvd_trans (by norm_num) hxy)\n[GOAL]\nR : Type u_1\nn : ℕ\nx y : ℤ\nhx : ¬2 ∣ x\nhxy : 4 ∣ x - y\ni : ℕ\nhx_odd : Odd x\n⊢ 2 ∣ 4\n[PROOFSTEP]\nnorm_num\n[GOAL]\nR : Type u_1\nn : ℕ\nx y : ℤ\nhx : ¬2 ∣ x\nhxy : 4 ∣ x - y\ni : ℕ\nhx_odd : Odd x\nhxy_even : Even (x - y)\n⊢ multiplicity 2 (x ^ 2 ^ i + y ^ 2 ^ i) = ↑1\n[PROOFSTEP]\nhave hy_odd : Odd y := by simpa using hx_odd.sub_even hxy_even\n[GOAL]\nR : Type u_1\nn : ℕ\nx y : ℤ\nhx : ¬2 ∣ x\nhxy : 4 ∣ x - y\ni : ℕ\nhx_odd : Odd x\nhxy_even : Even (x - y)\n⊢ Odd y\n[PROOFSTEP]\nsimpa using hx_odd.sub_even hxy_even\n[GOAL]\nR : Type u_1\nn : ℕ\nx y : ℤ\nhx : ¬2 ∣ x\nhxy : 4 ∣ x - y\ni : ℕ\nhx_odd : Odd x\nhxy_even : Even (x - y)\nhy_odd : Odd y\n⊢ multiplicity 2 (x ^ 2 ^ i + y ^ 2 ^ i) = ↑1\n[PROOFSTEP]\nrefine' multiplicity.eq_coe_iff.mpr ⟨_, _⟩\n[GOAL]\ncase refine'_1\nR : Type u_1\nn : ℕ\nx y : ℤ\nhx : ¬2 ∣ x\nhxy : 4 ∣ x - y\ni : ℕ\nhx_odd : Odd x\nhxy_even : Even (x - y)\nhy_odd : Odd y\n⊢ 2 ^ 1 ∣ x ^ 2 ^ i + y ^ 2 ^ i\n[PROOFSTEP]\nrw [pow_one, ← even_iff_two_dvd]\n[GOAL]\ncase refine'_1\nR : Type u_1\nn : ℕ\nx y : ℤ\nhx : ¬2 ∣ x\nhxy : 4 ∣ x - y\ni : ℕ\nhx_odd : Odd x\nhxy_even : Even (x - y)\nhy_odd : Odd y\n⊢ Even (x ^ 2 ^ i + y ^ 2 ^ i)\n[PROOFSTEP]\nexact hx_odd.pow.add_odd hy_odd.pow\n[GOAL]\ncase refine'_2\nR : Type u_1\nn : ℕ\nx y : ℤ\nhx : ¬2 ∣ x\nhxy : 4 ∣ x - y\ni : ℕ\nhx_odd : Odd x\nhxy_even : Even (x - y)\nhy_odd : Odd y\n⊢ ¬2 ^ (1 + 1) ∣ x ^ 2 ^ i + y ^ 2 ^ i\n[PROOFSTEP]\ncases' i with i\n[GOAL]\ncase refine'_2.zero\nR : Type u_1\nn : ℕ\nx y : ℤ\nhx : ¬2 ∣ x\nhxy : 4 ∣ x - y\nhx_odd : Odd x\nhxy_even : Even (x - y)\nhy_odd : Odd y\n⊢ ¬2 ^ (1 + 1) ∣ x ^ 2 ^ Nat.zero + y ^ 2 ^ Nat.zero\n[PROOFSTEP]\nintro hxy'\n[GOAL]\ncase refine'_2.zero\nR : Type u_1\nn : ℕ\nx y : ℤ\nhx : ¬2 ∣ x\nhxy : 4 ∣ x - y\nhx_odd : Odd x\nhxy_even : Even (x - y)\nhy_odd : Odd y\nhxy' : 2 ^ (1 + 1) ∣ x ^ 2 ^ Nat.zero + y ^ 2 ^ Nat.zero\n⊢ False\n[PROOFSTEP]\nhave : 2 * 2 ∣ 2 * x := by\n  have := dvd_add hxy hxy'\n  norm_num at *\n  rw [two_mul]\n  exact this\n[GOAL]\nR : Type u_1\nn : ℕ\nx y : ℤ\nhx : ¬2 ∣ x\nhxy : 4 ∣ x - y\nhx_odd : Odd x\nhxy_even : Even (x - y)\nhy_odd : Odd y\nhxy' : 2 ^ (1 + 1) ∣ x ^ 2 ^ Nat.zero + y ^ 2 ^ Nat.zero\n⊢ 2 * 2 ∣ 2 * x\n[PROOFSTEP]\nhave := dvd_add hxy hxy'\n[GOAL]\nR : Type u_1\nn : ℕ\nx y : ℤ\nhx : ¬2 ∣ x\nhxy : 4 ∣ x - y\nhx_odd : Odd x\nhxy_even : Even (x - y)\nhy_odd : Odd y\nhxy' : 2 ^ (1 + 1) ∣ x ^ 2 ^ Nat.zero + y ^ 2 ^ Nat.zero\nthis : 4 ∣ x - y + (x ^ 2 ^ Nat.zero + y ^ 2 ^ Nat.zero)\n⊢ 2 * 2 ∣ 2 * x\n[PROOFSTEP]\nnorm_num at *\n[GOAL]\nR : Type u_1\nn : ℕ\nx y : ℤ\nhxy : 4 ∣ x - y\nhxy_even : Even (x - y)\nhx : x % 2 = 1\nhx_odd : ¬Even x\nhy_odd : ¬Even y\nhxy' : 4 ∣ x + y\nthis : 4 ∣ x + x\n⊢ 4 ∣ 2 * x\n[PROOFSTEP]\nrw [two_mul]\n[GOAL]\nR : Type u_1\nn : ℕ\nx y : ℤ\nhxy : 4 ∣ x - y\nhxy_even : Even (x - y)\nhx : x % 2 = 1\nhx_odd : ¬Even x\nhy_odd : ¬Even y\nhxy' : 4 ∣ x + y\nthis : 4 ∣ x + x\n⊢ 4 ∣ x + x\n[PROOFSTEP]\nexact this\n[GOAL]\ncase refine'_2.zero\nR : Type u_1\nn : ℕ\nx y : ℤ\nhx : ¬2 ∣ x\nhxy : 4 ∣ x - y\nhx_odd : Odd x\nhxy_even : Even (x - y)\nhy_odd : Odd y\nhxy' : 2 ^ (1 + 1) ∣ x ^ 2 ^ Nat.zero + y ^ 2 ^ Nat.zero\nthis : 2 * 2 ∣ 2 * x\n⊢ False\n[PROOFSTEP]\nhave : 2 ∣ x := (mul_dvd_mul_iff_left (by norm_num)).mp this\n[GOAL]\nR : Type u_1\nn : ℕ\nx y : ℤ\nhx : ¬2 ∣ x\nhxy : 4 ∣ x - y\nhx_odd : Odd x\nhxy_even : Even (x - y)\nhy_odd : Odd y\nhxy' : 2 ^ (1 + 1) ∣ x ^ 2 ^ Nat.zero + y ^ 2 ^ Nat.zero\nthis : 2 * 2 ∣ 2 * x\n⊢ 2 ≠ 0\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase refine'_2.zero\nR : Type u_1\nn : ℕ\nx y : ℤ\nhx : ¬2 ∣ x\nhxy : 4 ∣ x - y\nhx_odd : Odd x\nhxy_even : Even (x - y)\nhy_odd : Odd y\nhxy' : 2 ^ (1 + 1) ∣ x ^ 2 ^ Nat.zero + y ^ 2 ^ Nat.zero\nthis✝ : 2 * 2 ∣ 2 * x\nthis : 2 ∣ x\n⊢ False\n[PROOFSTEP]\ncontradiction\n[GOAL]\ncase refine'_2.succ\nR : Type u_1\nn : ℕ\nx y : ℤ\nhx : ¬2 ∣ x\nhxy : 4 ∣ x - y\nhx_odd : Odd x\nhxy_even : Even (x - y)\nhy_odd : Odd y\ni : ℕ\n⊢ ¬2 ^ (1 + 1) ∣ x ^ 2 ^ Nat.succ i + y ^ 2 ^ Nat.succ i\n[PROOFSTEP]\nsuffices ∀ x : ℤ, Odd x → x ^ 2 ^ (i + 1) % 4 = 1\n  by\n  rw [show (2 ^ (1 + 1) : ℤ) = 4 by norm_num, Int.dvd_iff_emod_eq_zero, Int.add_emod, this _ hx_odd, this _ hy_odd]\n  norm_num\n[GOAL]\nR : Type u_1\nn : ℕ\nx y : ℤ\nhx : ¬2 ∣ x\nhxy : 4 ∣ x - y\nhx_odd : Odd x\nhxy_even : Even (x - y)\nhy_odd : Odd y\ni : ℕ\nthis : ∀ (x : ℤ), Odd x → x ^ 2 ^ (i + 1) % 4 = 1\n⊢ ¬2 ^ (1 + 1) ∣ x ^ 2 ^ Nat.succ i + y ^ 2 ^ Nat.succ i\n[PROOFSTEP]\nrw [show (2 ^ (1 + 1) : ℤ) = 4 by norm_num, Int.dvd_iff_emod_eq_zero, Int.add_emod, this _ hx_odd, this _ hy_odd]\n[GOAL]\nR : Type u_1\nn : ℕ\nx y : ℤ\nhx : ¬2 ∣ x\nhxy : 4 ∣ x - y\nhx_odd : Odd x\nhxy_even : Even (x - y)\nhy_odd : Odd y\ni : ℕ\nthis : ∀ (x : ℤ), Odd x → x ^ 2 ^ (i + 1) % 4 = 1\n⊢ 2 ^ (1 + 1) = 4\n[PROOFSTEP]\nnorm_num\n[GOAL]\nR : Type u_1\nn : ℕ\nx y : ℤ\nhx : ¬2 ∣ x\nhxy : 4 ∣ x - y\nhx_odd : Odd x\nhxy_even : Even (x - y)\nhy_odd : Odd y\ni : ℕ\nthis : ∀ (x : ℤ), Odd x → x ^ 2 ^ (i + 1) % 4 = 1\n⊢ ¬(1 + 1) % 4 = 0\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase refine'_2.succ\nR : Type u_1\nn : ℕ\nx y : ℤ\nhx : ¬2 ∣ x\nhxy : 4 ∣ x - y\nhx_odd : Odd x\nhxy_even : Even (x - y)\nhy_odd : Odd y\ni : ℕ\n⊢ ∀ (x : ℤ), Odd x → x ^ 2 ^ (i + 1) % 4 = 1\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase refine'_2.succ\nR : Type u_1\nn : ℕ\nx✝ y : ℤ\nhx✝ : ¬2 ∣ x✝\nhxy : 4 ∣ x✝ - y\nhx_odd : Odd x✝\nhxy_even : Even (x✝ - y)\nhy_odd : Odd y\ni : ℕ\nx : ℤ\nhx : Odd x\n⊢ x ^ 2 ^ (i + 1) % 4 = 1\n[PROOFSTEP]\nrw [pow_succ, mul_comm, pow_mul, Int.sq_mod_four_eq_one_of_odd hx.pow]\n[GOAL]\nR : Type u_1\nn✝ : ℕ\nx y : ℤ\nn : ℕ\nhxy : 4 ∣ x - y\nhx : ¬2 ∣ x\n⊢ multiplicity 2 (x ^ 2 ^ n - y ^ 2 ^ n) = multiplicity 2 (x - y) + ↑n\n[PROOFSTEP]\nsimp only [pow_two_pow_sub_pow_two_pow n, multiplicity.mul Int.prime_two, multiplicity.Finset.prod Int.prime_two,\n  add_comm, Nat.cast_one, Finset.sum_const, Finset.card_range, nsmul_one,\n  Int.two_pow_two_pow_add_two_pow_two_pow hx hxy]\n[GOAL]\nR : Type u_1\nn✝ : ℕ\nx y : ℤ\nn : ℕ\nhxy : 4 ∣ x - y\nhx : ¬2 ∣ x\n⊢ multiplicity 2 (x ^ n - y ^ n) = multiplicity 2 (x - y) + multiplicity 2 ↑n\n[PROOFSTEP]\nhave hx_odd : Odd x := by rwa [Int.odd_iff_not_even, even_iff_two_dvd]\n[GOAL]\nR : Type u_1\nn✝ : ℕ\nx y : ℤ\nn : ℕ\nhxy : 4 ∣ x - y\nhx : ¬2 ∣ x\n⊢ Odd x\n[PROOFSTEP]\nrwa [Int.odd_iff_not_even, even_iff_two_dvd]\n[GOAL]\nR : Type u_1\nn✝ : ℕ\nx y : ℤ\nn : ℕ\nhxy : 4 ∣ x - y\nhx : ¬2 ∣ x\nhx_odd : Odd x\n⊢ multiplicity 2 (x ^ n - y ^ n) = multiplicity 2 (x - y) + multiplicity 2 ↑n\n[PROOFSTEP]\nhave hxy_even : Even (x - y) := even_iff_two_dvd.mpr (dvd_trans (by norm_num) hxy)\n[GOAL]\nR : Type u_1\nn✝ : ℕ\nx y : ℤ\nn : ℕ\nhxy : 4 ∣ x - y\nhx : ¬2 ∣ x\nhx_odd : Odd x\n⊢ 2 ∣ 4\n[PROOFSTEP]\nnorm_num\n[GOAL]\nR : Type u_1\nn✝ : ℕ\nx y : ℤ\nn : ℕ\nhxy : 4 ∣ x - y\nhx : ¬2 ∣ x\nhx_odd : Odd x\nhxy_even : Even (x - y)\n⊢ multiplicity 2 (x ^ n - y ^ n) = multiplicity 2 (x - y) + multiplicity 2 ↑n\n[PROOFSTEP]\nhave hy_odd : Odd y := by simpa using hx_odd.sub_even hxy_even\n[GOAL]\nR : Type u_1\nn✝ : ℕ\nx y : ℤ\nn : ℕ\nhxy : 4 ∣ x - y\nhx : ¬2 ∣ x\nhx_odd : Odd x\nhxy_even : Even (x - y)\n⊢ Odd y\n[PROOFSTEP]\nsimpa using hx_odd.sub_even hxy_even\n[GOAL]\nR : Type u_1\nn✝ : ℕ\nx y : ℤ\nn : ℕ\nhxy : 4 ∣ x - y\nhx : ¬2 ∣ x\nhx_odd : Odd x\nhxy_even : Even (x - y)\nhy_odd : Odd y\n⊢ multiplicity 2 (x ^ n - y ^ n) = multiplicity 2 (x - y) + multiplicity 2 ↑n\n[PROOFSTEP]\ncases' n with n\n[GOAL]\ncase zero\nR : Type u_1\nn : ℕ\nx y : ℤ\nhxy : 4 ∣ x - y\nhx : ¬2 ∣ x\nhx_odd : Odd x\nhxy_even : Even (x - y)\nhy_odd : Odd y\n⊢ multiplicity 2 (x ^ Nat.zero - y ^ Nat.zero) = multiplicity 2 (x - y) + multiplicity 2 ↑Nat.zero\n[PROOFSTEP]\nsimp only [pow_zero, sub_self, multiplicity.zero, Int.ofNat_zero, Nat.zero_eq, add_top]\n[GOAL]\ncase succ\nR : Type u_1\nn✝ : ℕ\nx y : ℤ\nhxy : 4 ∣ x - y\nhx : ¬2 ∣ x\nhx_odd : Odd x\nhxy_even : Even (x - y)\nhy_odd : Odd y\nn : ℕ\n⊢ multiplicity 2 (x ^ Nat.succ n - y ^ Nat.succ n) = multiplicity 2 (x - y) + multiplicity 2 ↑(Nat.succ n)\n[PROOFSTEP]\nhave h : (multiplicity 2 n.succ).Dom := multiplicity.finite_nat_iff.mpr ⟨by norm_num, n.succ_pos⟩\n[GOAL]\nR : Type u_1\nn✝ : ℕ\nx y : ℤ\nhxy : 4 ∣ x - y\nhx : ¬2 ∣ x\nhx_odd : Odd x\nhxy_even : Even (x - y)\nhy_odd : Odd y\nn : ℕ\n⊢ 2 ≠ 1\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase succ\nR : Type u_1\nn✝ : ℕ\nx y : ℤ\nhxy : 4 ∣ x - y\nhx : ¬2 ∣ x\nhx_odd : Odd x\nhxy_even : Even (x - y)\nhy_odd : Odd y\nn : ℕ\nh : (multiplicity 2 (Nat.succ n)).Dom\n⊢ multiplicity 2 (x ^ Nat.succ n - y ^ Nat.succ n) = multiplicity 2 (x - y) + multiplicity 2 ↑(Nat.succ n)\n[PROOFSTEP]\nrcases multiplicity.eq_coe_iff.mp (PartENat.natCast_get h).symm with ⟨⟨k, hk⟩, hpn⟩\n[GOAL]\ncase succ.intro.intro\nR : Type u_1\nn✝ : ℕ\nx y : ℤ\nhxy : 4 ∣ x - y\nhx : ¬2 ∣ x\nhx_odd : Odd x\nhxy_even : Even (x - y)\nhy_odd : Odd y\nn : ℕ\nh : (multiplicity 2 (Nat.succ n)).Dom\nhpn : ¬2 ^ (Part.get (multiplicity 2 (Nat.succ n)) h + 1) ∣ Nat.succ n\nk : ℕ\nhk : Nat.succ n = 2 ^ Part.get (multiplicity 2 (Nat.succ n)) h * k\n⊢ multiplicity 2 (x ^ Nat.succ n - y ^ Nat.succ n) = multiplicity 2 (x - y) + multiplicity 2 ↑(Nat.succ n)\n[PROOFSTEP]\nrw [hk, pow_mul, pow_mul, multiplicity.pow_sub_pow_of_prime, Int.two_pow_two_pow_sub_pow_two_pow _ hxy hx, ← hk,\n  PartENat.natCast_get]\n[GOAL]\ncase succ.intro.intro\nR : Type u_1\nn✝ : ℕ\nx y : ℤ\nhxy : 4 ∣ x - y\nhx : ¬2 ∣ x\nhx_odd : Odd x\nhxy_even : Even (x - y)\nhy_odd : Odd y\nn : ℕ\nh : (multiplicity 2 (Nat.succ n)).Dom\nhpn : ¬2 ^ (Part.get (multiplicity 2 (Nat.succ n)) h + 1) ∣ Nat.succ n\nk : ℕ\nhk : Nat.succ n = 2 ^ Part.get (multiplicity 2 (Nat.succ n)) h * k\n⊢ multiplicity 2 (x - y) + multiplicity 2 (Nat.succ n) = multiplicity 2 (x - y) + multiplicity 2 ↑(Nat.succ n)\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase succ.intro.intro.hp\nR : Type u_1\nn✝ : ℕ\nx y : ℤ\nhxy : 4 ∣ x - y\nhx : ¬2 ∣ x\nhx_odd : Odd x\nhxy_even : Even (x - y)\nhy_odd : Odd y\nn : ℕ\nh : (multiplicity 2 (Nat.succ n)).Dom\nhpn : ¬2 ^ (Part.get (multiplicity 2 (Nat.succ n)) h + 1) ∣ Nat.succ n\nk : ℕ\nhk : Nat.succ n = 2 ^ Part.get (multiplicity 2 (Nat.succ n)) h * k\n⊢ Prime 2\n[PROOFSTEP]\nexact Int.prime_two\n[GOAL]\ncase succ.intro.intro.hxy\nR : Type u_1\nn✝ : ℕ\nx y : ℤ\nhxy : 4 ∣ x - y\nhx : ¬2 ∣ x\nhx_odd : Odd x\nhxy_even : Even (x - y)\nhy_odd : Odd y\nn : ℕ\nh : (multiplicity 2 (Nat.succ n)).Dom\nhpn : ¬2 ^ (Part.get (multiplicity 2 (Nat.succ n)) h + 1) ∣ Nat.succ n\nk : ℕ\nhk : Nat.succ n = 2 ^ Part.get (multiplicity 2 (Nat.succ n)) h * k\n⊢ 2 ∣ x ^ 2 ^ Part.get (multiplicity 2 (Nat.succ n)) h - y ^ 2 ^ Part.get (multiplicity 2 (Nat.succ n)) h\n[PROOFSTEP]\nsimpa only [even_iff_two_dvd] using hx_odd.pow.sub_odd hy_odd.pow\n[GOAL]\ncase succ.intro.intro.hx\nR : Type u_1\nn✝ : ℕ\nx y : ℤ\nhxy : 4 ∣ x - y\nhx : ¬2 ∣ x\nhx_odd : Odd x\nhxy_even : Even (x - y)\nhy_odd : Odd y\nn : ℕ\nh : (multiplicity 2 (Nat.succ n)).Dom\nhpn : ¬2 ^ (Part.get (multiplicity 2 (Nat.succ n)) h + 1) ∣ Nat.succ n\nk : ℕ\nhk : Nat.succ n = 2 ^ Part.get (multiplicity 2 (Nat.succ n)) h * k\n⊢ ¬2 ∣ x ^ 2 ^ Part.get (multiplicity 2 (Nat.succ n)) h\n[PROOFSTEP]\nsimpa only [even_iff_two_dvd, Int.odd_iff_not_even] using hx_odd.pow\n[GOAL]\ncase succ.intro.intro.hn\nR : Type u_1\nn✝ : ℕ\nx y : ℤ\nhxy : 4 ∣ x - y\nhx : ¬2 ∣ x\nhx_odd : Odd x\nhxy_even : Even (x - y)\nhy_odd : Odd y\nn : ℕ\nh : (multiplicity 2 (Nat.succ n)).Dom\nhpn : ¬2 ^ (Part.get (multiplicity 2 (Nat.succ n)) h + 1) ∣ Nat.succ n\nk : ℕ\nhk : Nat.succ n = 2 ^ Part.get (multiplicity 2 (Nat.succ n)) h * k\n⊢ ¬2 ∣ ↑k\n[PROOFSTEP]\nerw [Int.coe_nat_dvd]\n  -- `erw` to deal with `2 : ℤ` vs `(2 : ℕ) : ℤ`\n[GOAL]\ncase succ.intro.intro.hn\nR : Type u_1\nn✝ : ℕ\nx y : ℤ\nhxy : 4 ∣ x - y\nhx : ¬2 ∣ x\nhx_odd : Odd x\nhxy_even : Even (x - y)\nhy_odd : Odd y\nn : ℕ\nh : (multiplicity 2 (Nat.succ n)).Dom\nhpn : ¬2 ^ (Part.get (multiplicity 2 (Nat.succ n)) h + 1) ∣ Nat.succ n\nk : ℕ\nhk : Nat.succ n = 2 ^ Part.get (multiplicity 2 (Nat.succ n)) h * k\n⊢ ¬2 ∣ k\n[PROOFSTEP]\ncontrapose! hpn\n[GOAL]\ncase succ.intro.intro.hn\nR : Type u_1\nn✝ : ℕ\nx y : ℤ\nhxy : 4 ∣ x - y\nhx : ¬2 ∣ x\nhx_odd : Odd x\nhxy_even : Even (x - y)\nhy_odd : Odd y\nn : ℕ\nh : (multiplicity 2 (Nat.succ n)).Dom\nk : ℕ\nhk : Nat.succ n = 2 ^ Part.get (multiplicity 2 (Nat.succ n)) h * k\nhpn : 2 ∣ k\n⊢ 2 ^ (Part.get (multiplicity 2 (Nat.succ n)) h + 1) ∣ Nat.succ n\n[PROOFSTEP]\nrw [pow_succ']\n[GOAL]\ncase succ.intro.intro.hn\nR : Type u_1\nn✝ : ℕ\nx y : ℤ\nhxy : 4 ∣ x - y\nhx : ¬2 ∣ x\nhx_odd : Odd x\nhxy_even : Even (x - y)\nhy_odd : Odd y\nn : ℕ\nh : (multiplicity 2 (Nat.succ n)).Dom\nk : ℕ\nhk : Nat.succ n = 2 ^ Part.get (multiplicity 2 (Nat.succ n)) h * k\nhpn : 2 ∣ k\n⊢ 2 ^ Part.get (multiplicity 2 (Nat.succ n)) h * 2 ∣ Nat.succ n\n[PROOFSTEP]\nconv_rhs => rw [hk]\n[GOAL]\nR : Type u_1\nn✝ : ℕ\nx y : ℤ\nhxy : 4 ∣ x - y\nhx : ¬2 ∣ x\nhx_odd : Odd x\nhxy_even : Even (x - y)\nhy_odd : Odd y\nn : ℕ\nh : (multiplicity 2 (Nat.succ n)).Dom\nk : ℕ\nhk : Nat.succ n = 2 ^ Part.get (multiplicity 2 (Nat.succ n)) h * k\nhpn : 2 ∣ k\n| Nat.succ n\n[PROOFSTEP]\nrw [hk]\n[GOAL]\nR : Type u_1\nn✝ : ℕ\nx y : ℤ\nhxy : 4 ∣ x - y\nhx : ¬2 ∣ x\nhx_odd : Odd x\nhxy_even : Even (x - y)\nhy_odd : Odd y\nn : ℕ\nh : (multiplicity 2 (Nat.succ n)).Dom\nk : ℕ\nhk : Nat.succ n = 2 ^ Part.get (multiplicity 2 (Nat.succ n)) h * k\nhpn : 2 ∣ k\n| Nat.succ n\n[PROOFSTEP]\nrw [hk]\n[GOAL]\nR : Type u_1\nn✝ : ℕ\nx y : ℤ\nhxy : 4 ∣ x - y\nhx : ¬2 ∣ x\nhx_odd : Odd x\nhxy_even : Even (x - y)\nhy_odd : Odd y\nn : ℕ\nh : (multiplicity 2 (Nat.succ n)).Dom\nk : ℕ\nhk : Nat.succ n = 2 ^ Part.get (multiplicity 2 (Nat.succ n)) h * k\nhpn : 2 ∣ k\n| Nat.succ n\n[PROOFSTEP]\nrw [hk]\n[GOAL]\ncase succ.intro.intro.hn\nR : Type u_1\nn✝ : ℕ\nx y : ℤ\nhxy : 4 ∣ x - y\nhx : ¬2 ∣ x\nhx_odd : Odd x\nhxy_even : Even (x - y)\nhy_odd : Odd y\nn : ℕ\nh : (multiplicity 2 (Nat.succ n)).Dom\nk : ℕ\nhk : Nat.succ n = 2 ^ Part.get (multiplicity 2 (Nat.succ n)) h * k\nhpn : 2 ∣ k\n⊢ 2 ^ Part.get (multiplicity 2 (Nat.succ n)) h * 2 ∣ 2 ^ Part.get (multiplicity 2 (Nat.succ n)) h * k\n[PROOFSTEP]\nexact mul_dvd_mul_left _ hpn\n[GOAL]\nR : Type u_1\nn✝ : ℕ\nx y : ℤ\nn : ℕ\nhxy : 2 ∣ x - y\nhx : ¬2 ∣ x\nhn : Even n\n⊢ multiplicity 2 (x ^ n - y ^ n) + 1 = multiplicity 2 (x + y) + multiplicity 2 (x - y) + multiplicity 2 ↑n\n[PROOFSTEP]\nhave hy : Odd y := by\n  rw [← even_iff_two_dvd, ← Int.odd_iff_not_even] at hx \n  replace hxy := (@even_neg _ _ (x - y)).mpr (even_iff_two_dvd.mpr hxy)\n  convert Even.add_odd hxy hx\n  abel\n[GOAL]\nR : Type u_1\nn✝ : ℕ\nx y : ℤ\nn : ℕ\nhxy : 2 ∣ x - y\nhx : ¬2 ∣ x\nhn : Even n\n⊢ Odd y\n[PROOFSTEP]\nrw [← even_iff_two_dvd, ← Int.odd_iff_not_even] at hx \n[GOAL]\nR : Type u_1\nn✝ : ℕ\nx y : ℤ\nn : ℕ\nhxy : 2 ∣ x - y\nhx : Odd x\nhn : Even n\n⊢ Odd y\n[PROOFSTEP]\nreplace hxy := (@even_neg _ _ (x - y)).mpr (even_iff_two_dvd.mpr hxy)\n[GOAL]\nR : Type u_1\nn✝ : ℕ\nx y : ℤ\nn : ℕ\nhx : Odd x\nhn : Even n\nhxy : Even (-(x - y))\n⊢ Odd y\n[PROOFSTEP]\nconvert Even.add_odd hxy hx\n[GOAL]\ncase h.e'_3\nR : Type u_1\nn✝ : ℕ\nx y : ℤ\nn : ℕ\nhx : Odd x\nhn : Even n\nhxy : Even (-(x - y))\n⊢ y = -(x - y) + x\n[PROOFSTEP]\nabel\n[GOAL]\ncase h.e'_3\nR : Type u_1\nn✝ : ℕ\nx y : ℤ\nn : ℕ\nhx : Odd x\nhn : Even n\nhxy : Even (-(x - y))\n⊢ y = -(x - y) + x\n[PROOFSTEP]\nabel\n[GOAL]\nR : Type u_1\nn✝ : ℕ\nx y : ℤ\nn : ℕ\nhxy : 2 ∣ x - y\nhx : ¬2 ∣ x\nhn : Even n\nhy : Odd y\n⊢ multiplicity 2 (x ^ n - y ^ n) + 1 = multiplicity 2 (x + y) + multiplicity 2 (x - y) + multiplicity 2 ↑n\n[PROOFSTEP]\ncases' hn with d hd\n[GOAL]\ncase intro\nR : Type u_1\nn✝ : ℕ\nx y : ℤ\nn : ℕ\nhxy : 2 ∣ x - y\nhx : ¬2 ∣ x\nhy : Odd y\nd : ℕ\nhd : n = d + d\n⊢ multiplicity 2 (x ^ n - y ^ n) + 1 = multiplicity 2 (x + y) + multiplicity 2 (x - y) + multiplicity 2 ↑n\n[PROOFSTEP]\nsubst hd\n[GOAL]\ncase intro\nR : Type u_1\nn : ℕ\nx y : ℤ\nhxy : 2 ∣ x - y\nhx : ¬2 ∣ x\nhy : Odd y\nd : ℕ\n⊢ multiplicity 2 (x ^ (d + d) - y ^ (d + d)) + 1 =\n    multiplicity 2 (x + y) + multiplicity 2 (x - y) + multiplicity 2 ↑(d + d)\n[PROOFSTEP]\nsimp only [← two_mul, pow_mul]\n[GOAL]\ncase intro\nR : Type u_1\nn : ℕ\nx y : ℤ\nhxy : 2 ∣ x - y\nhx : ¬2 ∣ x\nhy : Odd y\nd : ℕ\n⊢ multiplicity 2 ((x ^ 2) ^ d - (y ^ 2) ^ d) + 1 =\n    multiplicity 2 (x + y) + multiplicity 2 (x - y) + multiplicity 2 ↑(2 * d)\n[PROOFSTEP]\nhave hxy4 : 4 ∣ x ^ 2 - y ^ 2 :=\n  by\n  rw [Int.dvd_iff_emod_eq_zero, Int.sub_emod, Int.sq_mod_four_eq_one_of_odd _, Int.sq_mod_four_eq_one_of_odd hy]\n  · norm_num\n  · simp only [Int.odd_iff_not_even, even_iff_two_dvd, hx, not_false_iff]\n[GOAL]\nR : Type u_1\nn : ℕ\nx y : ℤ\nhxy : 2 ∣ x - y\nhx : ¬2 ∣ x\nhy : Odd y\nd : ℕ\n⊢ 4 ∣ x ^ 2 - y ^ 2\n[PROOFSTEP]\nrw [Int.dvd_iff_emod_eq_zero, Int.sub_emod, Int.sq_mod_four_eq_one_of_odd _, Int.sq_mod_four_eq_one_of_odd hy]\n[GOAL]\nR : Type u_1\nn : ℕ\nx y : ℤ\nhxy : 2 ∣ x - y\nhx : ¬2 ∣ x\nhy : Odd y\nd : ℕ\n⊢ (1 - 1) % 4 = 0\n[PROOFSTEP]\nnorm_num\n[GOAL]\nR : Type u_1\nn : ℕ\nx y : ℤ\nhxy : 2 ∣ x - y\nhx : ¬2 ∣ x\nhy : Odd y\nd : ℕ\n⊢ Odd x\n[PROOFSTEP]\nsimp only [Int.odd_iff_not_even, even_iff_two_dvd, hx, not_false_iff]\n[GOAL]\ncase intro\nR : Type u_1\nn : ℕ\nx y : ℤ\nhxy : 2 ∣ x - y\nhx : ¬2 ∣ x\nhy : Odd y\nd : ℕ\nhxy4 : 4 ∣ x ^ 2 - y ^ 2\n⊢ multiplicity 2 ((x ^ 2) ^ d - (y ^ 2) ^ d) + 1 =\n    multiplicity 2 (x + y) + multiplicity 2 (x - y) + multiplicity 2 ↑(2 * d)\n[PROOFSTEP]\nrw [Int.two_pow_sub_pow' d hxy4 _, sq_sub_sq, ← Int.ofNat_mul_out, multiplicity.mul Int.prime_two,\n  multiplicity.mul Int.prime_two]\n[GOAL]\ncase intro\nR : Type u_1\nn : ℕ\nx y : ℤ\nhxy : 2 ∣ x - y\nhx : ¬2 ∣ x\nhy : Odd y\nd : ℕ\nhxy4 : 4 ∣ x ^ 2 - y ^ 2\n⊢ multiplicity 2 (x + y) + multiplicity 2 (x - y) + multiplicity 2 ↑d + 1 =\n    multiplicity 2 (x + y) + multiplicity 2 (x - y) + (multiplicity 2 ↑2 + multiplicity 2 ↑d)\nR : Type u_1 n : ℕ x y : ℤ hxy : 2 ∣ x - y hx : ¬2 ∣ x hy : Odd y d : ℕ hxy4 : 4 ∣ x ^ 2 - y ^ 2 ⊢ ¬2 ∣ x ^ 2\n[PROOFSTEP]\nsuffices multiplicity (2 : ℤ) ↑(2 : ℕ) = 1 by rw [this, add_comm (1 : PartENat), ← add_assoc]\n[GOAL]\nR : Type u_1\nn : ℕ\nx y : ℤ\nhxy : 2 ∣ x - y\nhx : ¬2 ∣ x\nhy : Odd y\nd : ℕ\nhxy4 : 4 ∣ x ^ 2 - y ^ 2\nthis : multiplicity 2 ↑2 = 1\n⊢ multiplicity 2 (x + y) + multiplicity 2 (x - y) + multiplicity 2 ↑d + 1 =\n    multiplicity 2 (x + y) + multiplicity 2 (x - y) + (multiplicity 2 ↑2 + multiplicity 2 ↑d)\n[PROOFSTEP]\nrw [this, add_comm (1 : PartENat), ← add_assoc]\n[GOAL]\ncase intro\nR : Type u_1\nn : ℕ\nx y : ℤ\nhxy : 2 ∣ x - y\nhx : ¬2 ∣ x\nhy : Odd y\nd : ℕ\nhxy4 : 4 ∣ x ^ 2 - y ^ 2\n⊢ multiplicity 2 ↑2 = 1\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase intro\nR : Type u_1\nn : ℕ\nx y : ℤ\nhxy : 2 ∣ x - y\nhx : ¬2 ∣ x\nhy : Odd y\nd : ℕ\nhxy4 : 4 ∣ x ^ 2 - y ^ 2\n⊢ multiplicity 2 2 = 1\n[PROOFSTEP]\nrw [multiplicity.multiplicity_self _ _]\n[GOAL]\nR : Type u_1\nn : ℕ\nx y : ℤ\nhxy : 2 ∣ x - y\nhx : ¬2 ∣ x\nhy : Odd y\nd : ℕ\nhxy4 : 4 ∣ x ^ 2 - y ^ 2\n⊢ ¬IsUnit 2\n[PROOFSTEP]\napply Prime.not_unit\n[GOAL]\ncase hp\nR : Type u_1\nn : ℕ\nx y : ℤ\nhxy : 2 ∣ x - y\nhx : ¬2 ∣ x\nhy : Odd y\nd : ℕ\nhxy4 : 4 ∣ x ^ 2 - y ^ 2\n⊢ Prime 2\n[PROOFSTEP]\nsimp only [← Nat.prime_iff, Nat.prime_two]\n[GOAL]\nR : Type u_1\nn : ℕ\nx y : ℤ\nhxy : 2 ∣ x - y\nhx : ¬2 ∣ x\nhy : Odd y\nd : ℕ\nhxy4 : 4 ∣ x ^ 2 - y ^ 2\n⊢ 2 ≠ 0\n[PROOFSTEP]\nexact two_ne_zero\n[GOAL]\nR : Type u_1\nn : ℕ\nx y : ℤ\nhxy : 2 ∣ x - y\nhx : ¬2 ∣ x\nhy : Odd y\nd : ℕ\nhxy4 : 4 ∣ x ^ 2 - y ^ 2\n⊢ ¬2 ∣ x ^ 2\n[PROOFSTEP]\nrw [← even_iff_two_dvd, ← Int.odd_iff_not_even]\n[GOAL]\nR : Type u_1\nn : ℕ\nx y : ℤ\nhxy : 2 ∣ x - y\nhx : ¬2 ∣ x\nhy : Odd y\nd : ℕ\nhxy4 : 4 ∣ x ^ 2 - y ^ 2\n⊢ Odd (x ^ 2)\n[PROOFSTEP]\napply Odd.pow\n[GOAL]\ncase hm\nR : Type u_1\nn : ℕ\nx y : ℤ\nhxy : 2 ∣ x - y\nhx : ¬2 ∣ x\nhy : Odd y\nd : ℕ\nhxy4 : 4 ∣ x ^ 2 - y ^ 2\n⊢ Odd x\n[PROOFSTEP]\nsimp only [Int.odd_iff_not_even, even_iff_two_dvd, hx, not_false_iff]\n[GOAL]\nR : Type u_1\nn✝ x y : ℕ\nhxy : 2 ∣ x - y\nhx : ¬2 ∣ x\nn : ℕ\nhn : Even n\n⊢ multiplicity 2 (x ^ n - y ^ n) + 1 = multiplicity 2 (x + y) + multiplicity 2 (x - y) + multiplicity 2 n\n[PROOFSTEP]\nobtain hyx | hyx := le_total y x\n[GOAL]\ncase inl\nR : Type u_1\nn✝ x y : ℕ\nhxy : 2 ∣ x - y\nhx : ¬2 ∣ x\nn : ℕ\nhn : Even n\nhyx : y ≤ x\n⊢ multiplicity 2 (x ^ n - y ^ n) + 1 = multiplicity 2 (x + y) + multiplicity 2 (x - y) + multiplicity 2 n\n[PROOFSTEP]\niterate 3 rw [← multiplicity.Int.coe_nat_multiplicity]\n[GOAL]\ncase inl\nR : Type u_1\nn✝ x y : ℕ\nhxy : 2 ∣ x - y\nhx : ¬2 ∣ x\nn : ℕ\nhn : Even n\nhyx : y ≤ x\n⊢ multiplicity 2 (x ^ n - y ^ n) + 1 = multiplicity 2 (x + y) + multiplicity 2 (x - y) + multiplicity 2 n\n[PROOFSTEP]\nrw [← multiplicity.Int.coe_nat_multiplicity]\n[GOAL]\ncase inl\nR : Type u_1\nn✝ x y : ℕ\nhxy : 2 ∣ x - y\nhx : ¬2 ∣ x\nn : ℕ\nhn : Even n\nhyx : y ≤ x\n⊢ multiplicity ↑2 ↑(x ^ n - y ^ n) + 1 = multiplicity 2 (x + y) + multiplicity 2 (x - y) + multiplicity 2 n\n[PROOFSTEP]\nrw [← multiplicity.Int.coe_nat_multiplicity]\n[GOAL]\ncase inl\nR : Type u_1\nn✝ x y : ℕ\nhxy : 2 ∣ x - y\nhx : ¬2 ∣ x\nn : ℕ\nhn : Even n\nhyx : y ≤ x\n⊢ multiplicity ↑2 ↑(x ^ n - y ^ n) + 1 = multiplicity ↑2 ↑(x + y) + multiplicity 2 (x - y) + multiplicity 2 n\n[PROOFSTEP]\nrw [← multiplicity.Int.coe_nat_multiplicity]\n[GOAL]\ncase inl\nR : Type u_1\nn✝ x y : ℕ\nhxy : 2 ∣ x - y\nhx : ¬2 ∣ x\nn : ℕ\nhn : Even n\nhyx : y ≤ x\n⊢ multiplicity ↑2 ↑(x ^ n - y ^ n) + 1 = multiplicity ↑2 ↑(x + y) + multiplicity ↑2 ↑(x - y) + multiplicity 2 n\n[PROOFSTEP]\nsimp only [Int.ofNat_sub hyx, Int.ofNat_sub (pow_le_pow_of_le_left' hyx _), Int.ofNat_add, Int.coe_nat_pow]\n[GOAL]\ncase inl\nR : Type u_1\nn✝ x y : ℕ\nhxy : 2 ∣ x - y\nhx : ¬2 ∣ x\nn : ℕ\nhn : Even n\nhyx : y ≤ x\n⊢ multiplicity (↑2) (↑x ^ n - ↑y ^ n) + 1 = multiplicity (↑2) (↑x + ↑y) + multiplicity (↑2) (↑x - ↑y) + multiplicity 2 n\n[PROOFSTEP]\nrw [← Int.coe_nat_dvd] at hx \n[GOAL]\ncase inl\nR : Type u_1\nn✝ x y : ℕ\nhxy : 2 ∣ x - y\nhx : ¬↑2 ∣ ↑x\nn : ℕ\nhn : Even n\nhyx : y ≤ x\n⊢ multiplicity (↑2) (↑x ^ n - ↑y ^ n) + 1 = multiplicity (↑2) (↑x + ↑y) + multiplicity (↑2) (↑x - ↑y) + multiplicity 2 n\n[PROOFSTEP]\nrw [← Int.coe_nat_dvd, Int.ofNat_sub hyx] at hxy \n[GOAL]\ncase inl\nR : Type u_1\nn✝ x y : ℕ\nhxy : ↑2 ∣ ↑x - ↑y\nhx : ¬↑2 ∣ ↑x\nn : ℕ\nhn : Even n\nhyx : y ≤ x\n⊢ multiplicity (↑2) (↑x ^ n - ↑y ^ n) + 1 = multiplicity (↑2) (↑x + ↑y) + multiplicity (↑2) (↑x - ↑y) + multiplicity 2 n\n[PROOFSTEP]\nconvert Int.two_pow_sub_pow hxy hx hn using 2\n[GOAL]\ncase h.e'_3.h.e'_6\nR : Type u_1\nn✝ x y : ℕ\nhxy : ↑2 ∣ ↑x - ↑y\nhx : ¬↑2 ∣ ↑x\nn : ℕ\nhn : Even n\nhyx : y ≤ x\n⊢ multiplicity 2 n = multiplicity 2 ↑n\n[PROOFSTEP]\nrw [← multiplicity.Int.coe_nat_multiplicity]\n[GOAL]\ncase h.e'_3.h.e'_6\nR : Type u_1\nn✝ x y : ℕ\nhxy : ↑2 ∣ ↑x - ↑y\nhx : ¬↑2 ∣ ↑x\nn : ℕ\nhn : Even n\nhyx : y ≤ x\n⊢ multiplicity ↑2 ↑n = multiplicity 2 ↑n\n[PROOFSTEP]\nrfl\n[GOAL]\ncase inr\nR : Type u_1\nn✝ x y : ℕ\nhxy : 2 ∣ x - y\nhx : ¬2 ∣ x\nn : ℕ\nhn : Even n\nhyx : x ≤ y\n⊢ multiplicity 2 (x ^ n - y ^ n) + 1 = multiplicity 2 (x + y) + multiplicity 2 (x - y) + multiplicity 2 n\n[PROOFSTEP]\nsimp only [Nat.sub_eq_zero_iff_le.mpr hyx, Nat.sub_eq_zero_iff_le.mpr (pow_le_pow_of_le_left' hyx n), multiplicity.zero,\n  PartENat.top_add, PartENat.add_top]\n[GOAL]\nR : Type u_1\nn✝ x y : ℕ\nhyx : y < x\nhxy : 2 ∣ x - y\nhx : ¬2 ∣ x\nn : ℕ\nhn : 0 < n\nhneven : Even n\n⊢ padicValNat 2 (x ^ n - y ^ n) + 1 = padicValNat 2 (x + y) + padicValNat 2 (x - y) + padicValNat 2 n\n[PROOFSTEP]\nsimp only [← PartENat.natCast_inj, Nat.cast_add]\n[GOAL]\nR : Type u_1\nn✝ x y : ℕ\nhyx : y < x\nhxy : 2 ∣ x - y\nhx : ¬2 ∣ x\nn : ℕ\nhn : 0 < n\nhneven : Even n\n⊢ ↑(padicValNat 2 (x ^ n - y ^ n)) + ↑1 = ↑(padicValNat 2 (x + y)) + ↑(padicValNat 2 (x - y)) + ↑(padicValNat 2 n)\n[PROOFSTEP]\niterate 4 rw [padicValNat_def, PartENat.natCast_get]\n[GOAL]\nR : Type u_1\nn✝ x y : ℕ\nhyx : y < x\nhxy : 2 ∣ x - y\nhx : ¬2 ∣ x\nn : ℕ\nhn : 0 < n\nhneven : Even n\n⊢ ↑(padicValNat 2 (x ^ n - y ^ n)) + ↑1 = ↑(padicValNat 2 (x + y)) + ↑(padicValNat 2 (x - y)) + ↑(padicValNat 2 n)\n[PROOFSTEP]\nrw [padicValNat_def, PartENat.natCast_get]\n[GOAL]\nR : Type u_1\nn✝ x y : ℕ\nhyx : y < x\nhxy : 2 ∣ x - y\nhx : ¬2 ∣ x\nn : ℕ\nhn : 0 < n\nhneven : Even n\n⊢ multiplicity 2 (x ^ n - y ^ n) + ↑1 = ↑(padicValNat 2 (x + y)) + ↑(padicValNat 2 (x - y)) + ↑(padicValNat 2 n)\nR : Type u_1\nn✝ x y : ℕ\nhyx : y < x\nhxy : 2 ∣ x - y\nhx : ¬2 ∣ x\nn : ℕ\nhn : 0 < n\nhneven : Even n\n⊢ 0 < x ^ n - y ^ n\nR : Type u_1 n✝ x y : ℕ hyx : y < x hxy : 2 ∣ x - y hx : ¬2 ∣ x n : ℕ hn : 0 < n hneven : Even n ⊢ 0 < x ^ n - y ^ n\n[PROOFSTEP]\nrw [padicValNat_def, PartENat.natCast_get]\n[GOAL]\nR : Type u_1\nn✝ x y : ℕ\nhyx : y < x\nhxy : 2 ∣ x - y\nhx : ¬2 ∣ x\nn : ℕ\nhn : 0 < n\nhneven : Even n\n⊢ multiplicity 2 (x ^ n - y ^ n) + ↑1 = multiplicity 2 (x + y) + ↑(padicValNat 2 (x - y)) + ↑(padicValNat 2 n)\nR : Type u_1\nn✝ x y : ℕ\nhyx : y < x\nhxy : 2 ∣ x - y\nhx : ¬2 ∣ x\nn : ℕ\nhn : 0 < n\nhneven : Even n\n⊢ 0 < x + y\nR : Type u_1\nn✝ x y : ℕ\nhyx : y < x\nhxy : 2 ∣ x - y\nhx : ¬2 ∣ x\nn : ℕ\nhn : 0 < n\nhneven : Even n\n⊢ 0 < x + y\nR : Type u_1\nn✝ x y : ℕ\nhyx : y < x\nhxy : 2 ∣ x - y\nhx : ¬2 ∣ x\nn : ℕ\nhn : 0 < n\nhneven : Even n\n⊢ 0 < x ^ n - y ^ n\nR : Type u_1 n✝ x y : ℕ hyx : y < x hxy : 2 ∣ x - y hx : ¬2 ∣ x n : ℕ hn : 0 < n hneven : Even n ⊢ 0 < x ^ n - y ^ n\n[PROOFSTEP]\nrw [padicValNat_def, PartENat.natCast_get]\n[GOAL]\nR : Type u_1\nn✝ x y : ℕ\nhyx : y < x\nhxy : 2 ∣ x - y\nhx : ¬2 ∣ x\nn : ℕ\nhn : 0 < n\nhneven : Even n\n⊢ multiplicity 2 (x ^ n - y ^ n) + ↑1 = multiplicity 2 (x + y) + multiplicity 2 (x - y) + ↑(padicValNat 2 n)\nR : Type u_1\nn✝ x y : ℕ\nhyx : y < x\nhxy : 2 ∣ x - y\nhx : ¬2 ∣ x\nn : ℕ\nhn : 0 < n\nhneven : Even n\n⊢ 0 < x - y\nR : Type u_1\nn✝ x y : ℕ\nhyx : y < x\nhxy : 2 ∣ x - y\nhx : ¬2 ∣ x\nn : ℕ\nhn : 0 < n\nhneven : Even n\n⊢ 0 < x - y\nR : Type u_1\nn✝ x y : ℕ\nhyx : y < x\nhxy : 2 ∣ x - y\nhx : ¬2 ∣ x\nn : ℕ\nhn : 0 < n\nhneven : Even n\n⊢ 0 < x + y\nR : Type u_1\nn✝ x y : ℕ\nhyx : y < x\nhxy : 2 ∣ x - y\nhx : ¬2 ∣ x\nn : ℕ\nhn : 0 < n\nhneven : Even n\n⊢ 0 < x + y\nR : Type u_1\nn✝ x y : ℕ\nhyx : y < x\nhxy : 2 ∣ x - y\nhx : ¬2 ∣ x\nn : ℕ\nhn : 0 < n\nhneven : Even n\n⊢ 0 < x ^ n - y ^ n\nR : Type u_1 n✝ x y : ℕ hyx : y < x hxy : 2 ∣ x - y hx : ¬2 ∣ x n : ℕ hn : 0 < n hneven : Even n ⊢ 0 < x ^ n - y ^ n\n[PROOFSTEP]\nrw [padicValNat_def, PartENat.natCast_get]\n[GOAL]\nR : Type u_1\nn✝ x y : ℕ\nhyx : y < x\nhxy : 2 ∣ x - y\nhx : ¬2 ∣ x\nn : ℕ\nhn : 0 < n\nhneven : Even n\n⊢ multiplicity 2 (x ^ n - y ^ n) + ↑1 = multiplicity 2 (x + y) + multiplicity 2 (x - y) + multiplicity 2 n\n[PROOFSTEP]\nconvert Nat.two_pow_sub_pow hxy hx hneven using 2\n[GOAL]\nR : Type u_1\nn✝ x y : ℕ\nhyx : y < x\nhxy : 2 ∣ x - y\nhx : ¬2 ∣ x\nn : ℕ\nhn : 0 < n\nhneven : Even n\n⊢ 0 < n\n[PROOFSTEP]\nexact hn\n[GOAL]\nR : Type u_1\nn✝ x y : ℕ\nhyx : y < x\nhxy : 2 ∣ x - y\nhx : ¬2 ∣ x\nn : ℕ\nhn : 0 < n\nhneven : Even n\n⊢ 0 < x - y\n[PROOFSTEP]\nexact Nat.sub_pos_of_lt hyx\n[GOAL]\nR : Type u_1\nn✝ x y : ℕ\nhyx : y < x\nhxy : 2 ∣ x - y\nhx : ¬2 ∣ x\nn : ℕ\nhn : 0 < n\nhneven : Even n\n⊢ 0 < x + y\n[PROOFSTEP]\nlinarith\n[GOAL]\nR : Type u_1\nn✝ x y : ℕ\nhyx : y < x\nhxy : 2 ∣ x - y\nhx : ¬2 ∣ x\nn : ℕ\nhn : 0 < n\nhneven : Even n\n⊢ 0 < x ^ n - y ^ n\n[PROOFSTEP]\nsimp only [tsub_pos_iff_lt, pow_lt_pow_of_lt_left hyx (@zero_le' _ y _) hn]\n[GOAL]\nR : Type u_1\nn✝ x y p : ℕ\nhp : Fact (Nat.Prime p)\nhp1 : Odd p\nhyx : y < x\nhxy : p ∣ x - y\nhx : ¬p ∣ x\nn : ℕ\nhn : 0 < n\n⊢ padicValNat p (x ^ n - y ^ n) = padicValNat p (x - y) + padicValNat p n\n[PROOFSTEP]\nrw [← PartENat.natCast_inj, Nat.cast_add]\n[GOAL]\nR : Type u_1\nn✝ x y p : ℕ\nhp : Fact (Nat.Prime p)\nhp1 : Odd p\nhyx : y < x\nhxy : p ∣ x - y\nhx : ¬p ∣ x\nn : ℕ\nhn : 0 < n\n⊢ ↑(padicValNat p (x ^ n - y ^ n)) = ↑(padicValNat p (x - y)) + ↑(padicValNat p n)\n[PROOFSTEP]\niterate 3 rw [padicValNat_def, PartENat.natCast_get]\n[GOAL]\nR : Type u_1\nn✝ x y p : ℕ\nhp : Fact (Nat.Prime p)\nhp1 : Odd p\nhyx : y < x\nhxy : p ∣ x - y\nhx : ¬p ∣ x\nn : ℕ\nhn : 0 < n\n⊢ ↑(padicValNat p (x ^ n - y ^ n)) = ↑(padicValNat p (x - y)) + ↑(padicValNat p n)\n[PROOFSTEP]\nrw [padicValNat_def, PartENat.natCast_get]\n[GOAL]\nR : Type u_1\nn✝ x y p : ℕ\nhp : Fact (Nat.Prime p)\nhp1 : Odd p\nhyx : y < x\nhxy : p ∣ x - y\nhx : ¬p ∣ x\nn : ℕ\nhn : 0 < n\n⊢ multiplicity p (x ^ n - y ^ n) = ↑(padicValNat p (x - y)) + ↑(padicValNat p n)\nR : Type u_1\nn✝ x y p : ℕ\nhp : Fact (Nat.Prime p)\nhp1 : Odd p\nhyx : y < x\nhxy : p ∣ x - y\nhx : ¬p ∣ x\nn : ℕ\nhn : 0 < n\n⊢ 0 < x ^ n - y ^ n\nR : Type u_1\nn✝ x y p : ℕ\nhp : Fact (Nat.Prime p)\nhp1 : Odd p\nhyx : y < x\nhxy : p ∣ x - y\nhx : ¬p ∣ x\nn : ℕ\nhn : 0 < n\n⊢ 0 < x ^ n - y ^ n\n[PROOFSTEP]\nrw [padicValNat_def, PartENat.natCast_get]\n[GOAL]\nR : Type u_1\nn✝ x y p : ℕ\nhp : Fact (Nat.Prime p)\nhp1 : Odd p\nhyx : y < x\nhxy : p ∣ x - y\nhx : ¬p ∣ x\nn : ℕ\nhn : 0 < n\n⊢ multiplicity p (x ^ n - y ^ n) = multiplicity p (x - y) + ↑(padicValNat p n)\nR : Type u_1\nn✝ x y p : ℕ\nhp : Fact (Nat.Prime p)\nhp1 : Odd p\nhyx : y < x\nhxy : p ∣ x - y\nhx : ¬p ∣ x\nn : ℕ\nhn : 0 < n\n⊢ 0 < x - y\nR : Type u_1\nn✝ x y p : ℕ\nhp : Fact (Nat.Prime p)\nhp1 : Odd p\nhyx : y < x\nhxy : p ∣ x - y\nhx : ¬p ∣ x\nn : ℕ\nhn : 0 < n\n⊢ 0 < x - y\nR : Type u_1\nn✝ x y p : ℕ\nhp : Fact (Nat.Prime p)\nhp1 : Odd p\nhyx : y < x\nhxy : p ∣ x - y\nhx : ¬p ∣ x\nn : ℕ\nhn : 0 < n\n⊢ 0 < x ^ n - y ^ n\nR : Type u_1\nn✝ x y p : ℕ\nhp : Fact (Nat.Prime p)\nhp1 : Odd p\nhyx : y < x\nhxy : p ∣ x - y\nhx : ¬p ∣ x\nn : ℕ\nhn : 0 < n\n⊢ 0 < x ^ n - y ^ n\n[PROOFSTEP]\nrw [padicValNat_def, PartENat.natCast_get]\n[GOAL]\nR : Type u_1\nn✝ x y p : ℕ\nhp : Fact (Nat.Prime p)\nhp1 : Odd p\nhyx : y < x\nhxy : p ∣ x - y\nhx : ¬p ∣ x\nn : ℕ\nhn : 0 < n\n⊢ multiplicity p (x ^ n - y ^ n) = multiplicity p (x - y) + multiplicity p n\n[PROOFSTEP]\nexact multiplicity.Nat.pow_sub_pow hp.out hp1 hxy hx n\n[GOAL]\nR : Type u_1\nn✝ x y p : ℕ\nhp : Fact (Nat.Prime p)\nhp1 : Odd p\nhyx : y < x\nhxy : p ∣ x - y\nhx : ¬p ∣ x\nn : ℕ\nhn : 0 < n\n⊢ 0 < n\n[PROOFSTEP]\nexact hn\n[GOAL]\nR : Type u_1\nn✝ x y p : ℕ\nhp : Fact (Nat.Prime p)\nhp1 : Odd p\nhyx : y < x\nhxy : p ∣ x - y\nhx : ¬p ∣ x\nn : ℕ\nhn : 0 < n\n⊢ 0 < x - y\n[PROOFSTEP]\nexact Nat.sub_pos_of_lt hyx\n[GOAL]\nR : Type u_1\nn✝ x y p : ℕ\nhp : Fact (Nat.Prime p)\nhp1 : Odd p\nhyx : y < x\nhxy : p ∣ x - y\nhx : ¬p ∣ x\nn : ℕ\nhn : 0 < n\n⊢ 0 < x ^ n - y ^ n\n[PROOFSTEP]\nexact Nat.sub_pos_of_lt (Nat.pow_lt_pow_of_lt_left hyx hn)\n[GOAL]\nR : Type u_1\nn✝ x y p : ℕ\nhp : Fact (Nat.Prime p)\nhp1 : Odd p\nhxy : p ∣ x + y\nhx : ¬p ∣ x\nn : ℕ\nhn : Odd n\n⊢ padicValNat p (x ^ n + y ^ n) = padicValNat p (x + y) + padicValNat p n\n[PROOFSTEP]\ncases' y with y\n[GOAL]\ncase zero\nR : Type u_1\nn✝ x p : ℕ\nhp : Fact (Nat.Prime p)\nhp1 : Odd p\nhx : ¬p ∣ x\nn : ℕ\nhn : Odd n\nhxy : p ∣ x + Nat.zero\n⊢ padicValNat p (x ^ n + Nat.zero ^ n) = padicValNat p (x + Nat.zero) + padicValNat p n\n[PROOFSTEP]\ncontradiction\n[GOAL]\ncase succ\nR : Type u_1\nn✝ x p : ℕ\nhp : Fact (Nat.Prime p)\nhp1 : Odd p\nhx : ¬p ∣ x\nn : ℕ\nhn : Odd n\ny : ℕ\nhxy : p ∣ x + Nat.succ y\n⊢ padicValNat p (x ^ n + Nat.succ y ^ n) = padicValNat p (x + Nat.succ y) + padicValNat p n\n[PROOFSTEP]\nrw [← PartENat.natCast_inj, Nat.cast_add]\n[GOAL]\ncase succ\nR : Type u_1\nn✝ x p : ℕ\nhp : Fact (Nat.Prime p)\nhp1 : Odd p\nhx : ¬p ∣ x\nn : ℕ\nhn : Odd n\ny : ℕ\nhxy : p ∣ x + Nat.succ y\n⊢ ↑(padicValNat p (x ^ n + Nat.succ y ^ n)) = ↑(padicValNat p (x + Nat.succ y)) + ↑(padicValNat p n)\n[PROOFSTEP]\niterate 3 rw [padicValNat_def, PartENat.natCast_get]\n[GOAL]\ncase succ\nR : Type u_1\nn✝ x p : ℕ\nhp : Fact (Nat.Prime p)\nhp1 : Odd p\nhx : ¬p ∣ x\nn : ℕ\nhn : Odd n\ny : ℕ\nhxy : p ∣ x + Nat.succ y\n⊢ ↑(padicValNat p (x ^ n + Nat.succ y ^ n)) = ↑(padicValNat p (x + Nat.succ y)) + ↑(padicValNat p n)\n[PROOFSTEP]\nrw [padicValNat_def, PartENat.natCast_get]\n[GOAL]\ncase succ\nR : Type u_1\nn✝ x p : ℕ\nhp : Fact (Nat.Prime p)\nhp1 : Odd p\nhx : ¬p ∣ x\nn : ℕ\nhn : Odd n\ny : ℕ\nhxy : p ∣ x + Nat.succ y\n⊢ multiplicity p (x ^ n + Nat.succ y ^ n) = ↑(padicValNat p (x + Nat.succ y)) + ↑(padicValNat p n)\ncase succ\nR : Type u_1\nn✝ x p : ℕ\nhp : Fact (Nat.Prime p)\nhp1 : Odd p\nhx : ¬p ∣ x\nn : ℕ\nhn : Odd n\ny : ℕ\nhxy : p ∣ x + Nat.succ y\n⊢ 0 < x ^ n + Nat.succ y ^ n\ncase succ\nR : Type u_1\nn✝ x p : ℕ\nhp : Fact (Nat.Prime p)\nhp1 : Odd p\nhx : ¬p ∣ x\nn : ℕ\nhn : Odd n\ny : ℕ\nhxy : p ∣ x + Nat.succ y\n⊢ 0 < x ^ n + Nat.succ y ^ n\n[PROOFSTEP]\nrw [padicValNat_def, PartENat.natCast_get]\n[GOAL]\ncase succ\nR : Type u_1\nn✝ x p : ℕ\nhp : Fact (Nat.Prime p)\nhp1 : Odd p\nhx : ¬p ∣ x\nn : ℕ\nhn : Odd n\ny : ℕ\nhxy : p ∣ x + Nat.succ y\n⊢ multiplicity p (x ^ n + Nat.succ y ^ n) = multiplicity p (x + Nat.succ y) + ↑(padicValNat p n)\ncase succ\nR : Type u_1\nn✝ x p : ℕ\nhp : Fact (Nat.Prime p)\nhp1 : Odd p\nhx : ¬p ∣ x\nn : ℕ\nhn : Odd n\ny : ℕ\nhxy : p ∣ x + Nat.succ y\n⊢ 0 < x + Nat.succ y\ncase succ\nR : Type u_1\nn✝ x p : ℕ\nhp : Fact (Nat.Prime p)\nhp1 : Odd p\nhx : ¬p ∣ x\nn : ℕ\nhn : Odd n\ny : ℕ\nhxy : p ∣ x + Nat.succ y\n⊢ 0 < x + Nat.succ y\ncase succ\nR : Type u_1\nn✝ x p : ℕ\nhp : Fact (Nat.Prime p)\nhp1 : Odd p\nhx : ¬p ∣ x\nn : ℕ\nhn : Odd n\ny : ℕ\nhxy : p ∣ x + Nat.succ y\n⊢ 0 < x ^ n + Nat.succ y ^ n\ncase succ\nR : Type u_1\nn✝ x p : ℕ\nhp : Fact (Nat.Prime p)\nhp1 : Odd p\nhx : ¬p ∣ x\nn : ℕ\nhn : Odd n\ny : ℕ\nhxy : p ∣ x + Nat.succ y\n⊢ 0 < x ^ n + Nat.succ y ^ n\n[PROOFSTEP]\nrw [padicValNat_def, PartENat.natCast_get]\n[GOAL]\ncase succ\nR : Type u_1\nn✝ x p : ℕ\nhp : Fact (Nat.Prime p)\nhp1 : Odd p\nhx : ¬p ∣ x\nn : ℕ\nhn : Odd n\ny : ℕ\nhxy : p ∣ x + Nat.succ y\n⊢ multiplicity p (x ^ n + Nat.succ y ^ n) = multiplicity p (x + Nat.succ y) + multiplicity p n\n[PROOFSTEP]\nexact multiplicity.Nat.pow_add_pow hp.out hp1 hxy hx hn\n[GOAL]\ncase succ\nR : Type u_1\nn✝ x p : ℕ\nhp : Fact (Nat.Prime p)\nhp1 : Odd p\nhx : ¬p ∣ x\nn : ℕ\nhn : Odd n\ny : ℕ\nhxy : p ∣ x + Nat.succ y\n⊢ 0 < n\n[PROOFSTEP]\nexact Odd.pos hn\n[GOAL]\ncase succ\nR : Type u_1\nn✝ x p : ℕ\nhp : Fact (Nat.Prime p)\nhp1 : Odd p\nhx : ¬p ∣ x\nn : ℕ\nhn : Odd n\ny : ℕ\nhxy : p ∣ x + Nat.succ y\n⊢ 0 < x + Nat.succ y\n[PROOFSTEP]\nsimp only [add_pos_iff, Nat.succ_pos', or_true_iff]\n[GOAL]\ncase succ\nR : Type u_1\nn✝ x p : ℕ\nhp : Fact (Nat.Prime p)\nhp1 : Odd p\nhx : ¬p ∣ x\nn : ℕ\nhn : Odd n\ny : ℕ\nhxy : p ∣ x + Nat.succ y\n⊢ 0 < x ^ n + Nat.succ y ^ n\n[PROOFSTEP]\nexact Nat.lt_add_left _ _ _ (pow_pos y.succ_pos _)\n", "meta": {"mathlib_filename": "Mathlib.NumberTheory.Multiplicity", "llama_tokens": 45745, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7718435083355188, "lm_q2_score": 0.6688802537704063, "lm_q1q2_score": 0.5162708817265025}}
{"text": "[GOAL]\nn b : ℕ\nh : ProbablePrime n b\nh₁ : 1 ≤ n\nh₂ : 1 ≤ b\n⊢ coprime n b\n[PROOFSTEP]\nby_cases h₃ : 2 ≤ n\n[GOAL]\ncase pos\nn b : ℕ\nh : ProbablePrime n b\nh₁ : 1 ≤ n\nh₂ : 1 ≤ b\nh₃ : 2 ≤ n\n⊢ coprime n b\n[PROOFSTEP]\napply Nat.coprime_of_dvd\n[GOAL]\ncase pos.H\nn b : ℕ\nh : ProbablePrime n b\nh₁ : 1 ≤ n\nh₂ : 1 ≤ b\nh₃ : 2 ≤ n\n⊢ ∀ (k : ℕ), Prime k → k ∣ n → ¬k ∣ b\n[PROOFSTEP]\nrintro k hk ⟨m, rfl⟩\n  ⟨j, rfl⟩\n      -- Because prime numbers do not divide 1, it suffices to show that `k ∣ 1` to prove a\n          -- contradiction\n[GOAL]\ncase pos.H.intro.intro\nk : ℕ\nhk : Prime k\nm : ℕ\nh₁ : 1 ≤ k * m\nh₃ : 2 ≤ k * m\nj : ℕ\nh₂ : 1 ≤ k * j\nh : ProbablePrime (k * m) (k * j)\n⊢ False\n[PROOFSTEP]\napply Nat.Prime.not_dvd_one hk\n[GOAL]\ncase pos.H.intro.intro\nk : ℕ\nhk : Prime k\nm : ℕ\nh₁ : 1 ≤ k * m\nh₃ : 2 ≤ k * m\nj : ℕ\nh₂ : 1 ≤ k * j\nh : ProbablePrime (k * m) (k * j)\n⊢ k ∣ 1\n[PROOFSTEP]\nreplace h := dvd_of_mul_right_dvd h\n[GOAL]\ncase pos.H.intro.intro\nk : ℕ\nhk : Prime k\nm : ℕ\nh₁ : 1 ≤ k * m\nh₃ : 2 ≤ k * m\nj : ℕ\nh₂ : 1 ≤ k * j\nh : k ∣ (k * j) ^ (k * m - 1) - 1\n⊢ k ∣ 1\n[PROOFSTEP]\nrw [Nat.dvd_add_iff_right h, Nat.sub_add_cancel (Nat.one_le_pow _ _ h₂)]\n  -- Since `k` divides `b`, `k` also divides any power of `b` except `b ^ 0`. Therefore, it\n      -- suffices to show that `n - 1` isn't zero. However, we know that `n - 1` isn't zero because we\n      -- assumed `2 ≤ n` when doing `by_cases`.\n[GOAL]\ncase pos.H.intro.intro\nk : ℕ\nhk : Prime k\nm : ℕ\nh₁ : 1 ≤ k * m\nh₃ : 2 ≤ k * m\nj : ℕ\nh₂ : 1 ≤ k * j\nh : k ∣ (k * j) ^ (k * m - 1) - 1\n⊢ k ∣ (k * j) ^ (k * m - 1)\n[PROOFSTEP]\nrefine' dvd_of_mul_right_dvd (dvd_pow_self (k * j) _)\n[GOAL]\ncase pos.H.intro.intro\nk : ℕ\nhk : Prime k\nm : ℕ\nh₁ : 1 ≤ k * m\nh₃ : 2 ≤ k * m\nj : ℕ\nh₂ : 1 ≤ k * j\nh : k ∣ (k * j) ^ (k * m - 1) - 1\n⊢ k * m - 1 ≠ 0\n[PROOFSTEP]\nlinarith [tsub_pos_of_lt (one_lt_two.trans_le h₃)]\n  -- If `n = 1`, then it follows trivially that `n` is coprime with `b`.\n[GOAL]\ncase neg\nn b : ℕ\nh : ProbablePrime n b\nh₁ : 1 ≤ n\nh₂ : 1 ≤ b\nh₃ : ¬2 ≤ n\n⊢ coprime n b\n[PROOFSTEP]\nrw [show n = 1 by linarith]\n[GOAL]\nn b : ℕ\nh : ProbablePrime n b\nh₁ : 1 ≤ n\nh₂ : 1 ≤ b\nh₃ : ¬2 ≤ n\n⊢ n = 1\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase neg\nn b : ℕ\nh : ProbablePrime n b\nh₁ : 1 ≤ n\nh₂ : 1 ≤ b\nh₃ : ¬2 ≤ n\n⊢ coprime 1 b\n[PROOFSTEP]\nnorm_num\n[GOAL]\nn b : ℕ\nh : 1 ≤ b\n⊢ ProbablePrime n b ↔ b ^ (n - 1) ≡ 1 [MOD n]\n[PROOFSTEP]\nhave : 1 ≤ b ^ (n - 1) :=\n  one_le_pow_of_one_le h\n    (n - 1)\n      -- For exact_mod_cast\n[GOAL]\nn b : ℕ\nh : 1 ≤ b\nthis : 1 ≤ b ^ (n - 1)\n⊢ ProbablePrime n b ↔ b ^ (n - 1) ≡ 1 [MOD n]\n[PROOFSTEP]\nrw [Nat.ModEq.comm]\n[GOAL]\nn b : ℕ\nh : 1 ≤ b\nthis : 1 ≤ b ^ (n - 1)\n⊢ ProbablePrime n b ↔ 1 ≡ b ^ (n - 1) [MOD n]\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nn b : ℕ\nh : 1 ≤ b\nthis : 1 ≤ b ^ (n - 1)\n⊢ ProbablePrime n b → 1 ≡ b ^ (n - 1) [MOD n]\n[PROOFSTEP]\nintro h₁\n[GOAL]\ncase mp\nn b : ℕ\nh : 1 ≤ b\nthis : 1 ≤ b ^ (n - 1)\nh₁ : ProbablePrime n b\n⊢ 1 ≡ b ^ (n - 1) [MOD n]\n[PROOFSTEP]\napply Nat.modEq_of_dvd\n[GOAL]\ncase mp.a\nn b : ℕ\nh : 1 ≤ b\nthis : 1 ≤ b ^ (n - 1)\nh₁ : ProbablePrime n b\n⊢ ↑n ∣ ↑(b ^ (n - 1)) - ↑1\n[PROOFSTEP]\nexact_mod_cast h₁\n[GOAL]\ncase mpr\nn b : ℕ\nh : 1 ≤ b\nthis : 1 ≤ b ^ (n - 1)\n⊢ 1 ≡ b ^ (n - 1) [MOD n] → ProbablePrime n b\n[PROOFSTEP]\nintro h₁\n[GOAL]\ncase mpr\nn b : ℕ\nh : 1 ≤ b\nthis : 1 ≤ b ^ (n - 1)\nh₁ : 1 ≡ b ^ (n - 1) [MOD n]\n⊢ ProbablePrime n b\n[PROOFSTEP]\nexact_mod_cast Nat.ModEq.dvd h₁\n[GOAL]\nn b : ℕ\nh : FermatPsp n b\nh₁ : 1 ≤ b\n⊢ coprime n b\n[PROOFSTEP]\nrcases h with ⟨hp, _, hn₂⟩\n[GOAL]\ncase intro.intro\nn b : ℕ\nh₁ : 1 ≤ b\nhp : ProbablePrime n b\nleft✝ : ¬Prime n\nhn₂ : 1 < n\n⊢ coprime n b\n[PROOFSTEP]\nexact coprime_of_probablePrime hp (by linarith) h₁\n[GOAL]\nn b : ℕ\nh₁ : 1 ≤ b\nhp : ProbablePrime n b\nleft✝ : ¬Prime n\nhn₂ : 1 < n\n⊢ 1 ≤ n\n[PROOFSTEP]\nlinarith\n[GOAL]\nn : ℕ\nh₁ : 1 < n\nh₂ : ¬Prime n\n⊢ FermatPsp n 1\n[PROOFSTEP]\nrefine' ⟨show n ∣ 1 ^ (n - 1) - 1 from _, h₂, h₁⟩\n[GOAL]\nn : ℕ\nh₁ : 1 < n\nh₂ : ¬Prime n\n⊢ n ∣ 1 ^ (n - 1) - 1\n[PROOFSTEP]\nexact show 0 = 1 ^ (n - 1) - 1 by norm_num ▸ dvd_zero n\n[GOAL]\nn : ℕ\nh₁ : 1 < n\nh₂ : ¬Prime n\n⊢ 0 = 1 ^ (n - 1) - 1\n[PROOFSTEP]\nnorm_num\n[GOAL]\na b : ℕ\nha : 2 ≤ a\nhb : 2 ≤ b\n⊢ 2 ≤ (a ^ b - 1) / (a - 1)\n[PROOFSTEP]\nchange 1 < _\n[GOAL]\na b : ℕ\nha : 2 ≤ a\nhb : 2 ≤ b\n⊢ 1 < (a ^ b - 1) / (a - 1)\n[PROOFSTEP]\nhave h₁ : a - 1 ∣ a ^ b - 1 := by simpa only [one_pow] using nat_sub_dvd_pow_sub_pow a 1 b\n[GOAL]\na b : ℕ\nha : 2 ≤ a\nhb : 2 ≤ b\n⊢ a - 1 ∣ a ^ b - 1\n[PROOFSTEP]\nsimpa only [one_pow] using nat_sub_dvd_pow_sub_pow a 1 b\n[GOAL]\na b : ℕ\nha : 2 ≤ a\nhb : 2 ≤ b\nh₁ : a - 1 ∣ a ^ b - 1\n⊢ 1 < (a ^ b - 1) / (a - 1)\n[PROOFSTEP]\nrw [Nat.lt_div_iff_mul_lt h₁, mul_one, tsub_lt_tsub_iff_right (Nat.le_of_succ_le ha)]\n[GOAL]\na b : ℕ\nha : 2 ≤ a\nhb : 2 ≤ b\nh₁ : a - 1 ∣ a ^ b - 1\n⊢ a < a ^ b\n[PROOFSTEP]\nconvert pow_lt_pow (Nat.lt_of_succ_le ha) hb\n[GOAL]\ncase h.e'_3\na b : ℕ\nha : 2 ≤ a\nhb : 2 ≤ b\nh₁ : a - 1 ∣ a ^ b - 1\n⊢ a = a ^ 1\n[PROOFSTEP]\nrw [pow_one]\n[GOAL]\na b : ℕ\nha : 2 ≤ a\nhb : 2 < b\n⊢ 2 ≤ (a ^ b + 1) / (a + 1)\n[PROOFSTEP]\nrw [Nat.le_div_iff_mul_le (Nat.zero_lt_succ _)]\n[GOAL]\na b : ℕ\nha : 2 ≤ a\nhb : 2 < b\n⊢ 2 * succ a ≤ a ^ b + 1\n[PROOFSTEP]\napply Nat.succ_le_succ\n[GOAL]\ncase a\na b : ℕ\nha : 2 ≤ a\nhb : 2 < b\n⊢ Nat.mul 2 a + 1 ≤ a ^ b\n[PROOFSTEP]\ncalc\n  2 * a + 1 ≤ a ^ 2 * a := by nlinarith\n  _ = a ^ 3 := by rw [pow_succ a 2]\n  _ ≤ a ^ b := pow_le_pow (Nat.le_of_succ_le ha) hb\n[GOAL]\na b : ℕ\nha : 2 ≤ a\nhb : 2 < b\n⊢ 2 * a + 1 ≤ a ^ 2 * a\n[PROOFSTEP]\nnlinarith\n[GOAL]\na b : ℕ\nha : 2 ≤ a\nhb : 2 < b\n⊢ a ^ 2 * a = a ^ 3\n[PROOFSTEP]\nrw [pow_succ a 2]\n[GOAL]\nb p : ℕ\nx✝ : 2 ≤ b\nhp : Odd p\n⊢ (b ^ p - 1) / (b - 1) * ((b ^ p + 1) / (b + 1)) = (b ^ (2 * p) - 1) / (b ^ 2 - 1)\n[PROOFSTEP]\nhave q₁ : b - 1 ∣ b ^ p - 1 := by simpa only [one_pow] using nat_sub_dvd_pow_sub_pow b 1 p\n[GOAL]\nb p : ℕ\nx✝ : 2 ≤ b\nhp : Odd p\n⊢ b - 1 ∣ b ^ p - 1\n[PROOFSTEP]\nsimpa only [one_pow] using nat_sub_dvd_pow_sub_pow b 1 p\n[GOAL]\nb p : ℕ\nx✝ : 2 ≤ b\nhp : Odd p\nq₁ : b - 1 ∣ b ^ p - 1\n⊢ (b ^ p - 1) / (b - 1) * ((b ^ p + 1) / (b + 1)) = (b ^ (2 * p) - 1) / (b ^ 2 - 1)\n[PROOFSTEP]\nhave q₂ : b + 1 ∣ b ^ p + 1 := by simpa only [one_pow] using hp.nat_add_dvd_pow_add_pow b 1\n[GOAL]\nb p : ℕ\nx✝ : 2 ≤ b\nhp : Odd p\nq₁ : b - 1 ∣ b ^ p - 1\n⊢ b + 1 ∣ b ^ p + 1\n[PROOFSTEP]\nsimpa only [one_pow] using hp.nat_add_dvd_pow_add_pow b 1\n[GOAL]\nb p : ℕ\nx✝ : 2 ≤ b\nhp : Odd p\nq₁ : b - 1 ∣ b ^ p - 1\nq₂ : b + 1 ∣ b ^ p + 1\n⊢ (b ^ p - 1) / (b - 1) * ((b ^ p + 1) / (b + 1)) = (b ^ (2 * p) - 1) / (b ^ 2 - 1)\n[PROOFSTEP]\nconvert Nat.div_mul_div_comm q₁ q₂ using 2\n[GOAL]\ncase h.e'_3.h.e'_5\nb p : ℕ\nx✝ : 2 ≤ b\nhp : Odd p\nq₁ : b - 1 ∣ b ^ p - 1\nq₂ : b + 1 ∣ b ^ p + 1\n⊢ b ^ (2 * p) - 1 = (b ^ p - 1) * (b ^ p + 1)\n[PROOFSTEP]\nrw [mul_comm (_ - 1), ← Nat.sq_sub_sq]\n[GOAL]\ncase h.e'_3.h.e'_6\nb p : ℕ\nx✝ : 2 ≤ b\nhp : Odd p\nq₁ : b - 1 ∣ b ^ p - 1\nq₂ : b + 1 ∣ b ^ p + 1\n⊢ b ^ 2 - 1 = (b - 1) * (b + 1)\n[PROOFSTEP]\nrw [mul_comm (_ - 1), ← Nat.sq_sub_sq]\n[GOAL]\ncase h.e'_3.h.e'_5\nb p : ℕ\nx✝ : 2 ≤ b\nhp : Odd p\nq₁ : b - 1 ∣ b ^ p - 1\nq₂ : b + 1 ∣ b ^ p + 1\n⊢ b ^ (2 * p) - 1 = (b ^ p) ^ 2 - 1 ^ 2\n[PROOFSTEP]\nring_nf\n[GOAL]\ncase h.e'_3.h.e'_6\nb p : ℕ\nx✝ : 2 ≤ b\nhp : Odd p\nq₁ : b - 1 ∣ b ^ p - 1\nq₂ : b + 1 ∣ b ^ p + 1\n⊢ b ^ 2 - 1 = b ^ 2 - 1 ^ 2\n[PROOFSTEP]\nsimp\n[GOAL]\nb p : ℕ\nhb : 0 < b\nhp : 1 ≤ p\nhi_bsquared : 1 ≤ b ^ 2\n⊢ b ^ (2 * p) - 1 - (b ^ 2 - 1) = b ^ (2 * p) - (1 + (b ^ 2 - 1))\n[PROOFSTEP]\nrw [Nat.sub_sub]\n[GOAL]\nb p : ℕ\nhb : 0 < b\nhp : 1 ≤ p\nhi_bsquared : 1 ≤ b ^ 2\n⊢ b ^ (2 * p) - (1 + (b ^ 2 - 1)) = b ^ (2 * p) - (1 + b ^ 2 - 1)\n[PROOFSTEP]\nrw [Nat.add_sub_assoc hi_bsquared]\n[GOAL]\nb p : ℕ\nhb : 0 < b\nhp : 1 ≤ p\nhi_bsquared : 1 ≤ b ^ 2\n⊢ b ^ (2 * p) - (1 + b ^ 2 - 1) = b ^ (2 * p) - b ^ 2\n[PROOFSTEP]\nrw [Nat.add_sub_cancel_left]\n[GOAL]\nb p : ℕ\nhb : 0 < b\nhp : 1 ≤ p\nhi_bsquared : 1 ≤ b ^ 2\n⊢ b ^ (2 * p) - b ^ 2 = b ^ (p * 2) - b ^ 2\n[PROOFSTEP]\nrw [mul_comm]\n[GOAL]\nb p : ℕ\nhb : 0 < b\nhp : 1 ≤ p\nhi_bsquared : 1 ≤ b ^ 2\n⊢ b ^ (p * 2) - b ^ 2 = (b ^ p) ^ 2 - b ^ 2\n[PROOFSTEP]\nrw [pow_mul]\n[GOAL]\nb p : ℕ\nhb : 0 < b\nhp : 1 ≤ p\nhi_bsquared : 1 ≤ b ^ 2\n⊢ (b ^ p) ^ 2 - b ^ 2 = (b ^ p + b) * (b ^ p - b)\n[PROOFSTEP]\nrw [Nat.sq_sub_sq]\n[GOAL]\nb p : ℕ\nhb : 0 < b\nhp : 1 ≤ p\nhi_bsquared : 1 ≤ b ^ 2\n⊢ (b ^ p + b) * (b ^ p - b) = (b ^ p - b) * (b ^ p + b)\n[PROOFSTEP]\nrw [mul_comm]\n[GOAL]\nb p : ℕ\nhb : 0 < b\nhp : 1 ≤ p\nhi_bsquared : 1 ≤ b ^ 2\n⊢ (b ^ p - b) * (b ^ p + b) = (b ^ (p - 1 + 1) - b) * (b ^ p + b)\n[PROOFSTEP]\nrw [Nat.sub_add_cancel hp]\n[GOAL]\nb p : ℕ\nhb : 0 < b\nhp : 1 ≤ p\nhi_bsquared : 1 ≤ b ^ 2\n⊢ (b ^ (p - 1 + 1) - b) * (b ^ p + b) = (b * b ^ (p - 1) - b) * (b ^ p + b)\n[PROOFSTEP]\nrw [pow_succ']\n[GOAL]\nb p : ℕ\nhb : 0 < b\nhp : 1 ≤ p\nhi_bsquared : 1 ≤ b ^ 2\n⊢ (b * b ^ (p - 1) - b) * (b ^ p + b) = (b * b ^ (p - 1) - b * 1) * (b ^ p + b)\n[PROOFSTEP]\nrw [mul_one]\n[GOAL]\nb p : ℕ\nhb : 0 < b\nhp : 1 ≤ p\nhi_bsquared : 1 ≤ b ^ 2\n⊢ (b * b ^ (p - 1) - b * 1) * (b ^ p + b) = b * (b ^ (p - 1) - 1) * (b ^ p + b)\n[PROOFSTEP]\nrw [Nat.mul_sub_left_distrib]\n[GOAL]\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nnot_dvd : ¬p ∣ b * (b ^ 2 - 1)\n⊢ FermatPsp (Nat.psp_from_prime b p) b\n[PROOFSTEP]\nunfold psp_from_prime\n[GOAL]\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nnot_dvd : ¬p ∣ b * (b ^ 2 - 1)\n⊢ FermatPsp ((b ^ p - 1) / (b - 1) * ((b ^ p + 1) / (b + 1))) b\n[PROOFSTEP]\nset A := (b ^ p - 1) / (b - 1)\n[GOAL]\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nnot_dvd : ¬p ∣ b * (b ^ 2 - 1)\nA : ℕ := (b ^ p - 1) / (b - 1)\n⊢ FermatPsp (A * ((b ^ p + 1) / (b + 1))) b\n[PROOFSTEP]\nset B :=\n  (b ^ p + 1) /\n    (b + 1)\n      -- Inequalities\n[GOAL]\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nnot_dvd : ¬p ∣ b * (b ^ 2 - 1)\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\n⊢ FermatPsp (A * B) b\n[PROOFSTEP]\nhave hi_A : 1 < A := a_id_helper (Nat.succ_le_iff.mp b_ge_two) (Nat.Prime.one_lt p_prime)\n[GOAL]\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nnot_dvd : ¬p ∣ b * (b ^ 2 - 1)\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nhi_A : 1 < A\n⊢ FermatPsp (A * B) b\n[PROOFSTEP]\nhave hi_B : 1 < B := b_id_helper (Nat.succ_le_iff.mp b_ge_two) p_gt_two\n[GOAL]\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nnot_dvd : ¬p ∣ b * (b ^ 2 - 1)\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nhi_A : 1 < A\nhi_B : 1 < B\n⊢ FermatPsp (A * B) b\n[PROOFSTEP]\nhave hi_AB : 1 < A * B := one_lt_mul'' hi_A hi_B\n[GOAL]\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nnot_dvd : ¬p ∣ b * (b ^ 2 - 1)\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nhi_A : 1 < A\nhi_B : 1 < B\nhi_AB : 1 < A * B\n⊢ FermatPsp (A * B) b\n[PROOFSTEP]\nhave hi_b : 0 < b := by linarith\n[GOAL]\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nnot_dvd : ¬p ∣ b * (b ^ 2 - 1)\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nhi_A : 1 < A\nhi_B : 1 < B\nhi_AB : 1 < A * B\n⊢ 0 < b\n[PROOFSTEP]\nlinarith\n[GOAL]\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nnot_dvd : ¬p ∣ b * (b ^ 2 - 1)\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nhi_A : 1 < A\nhi_B : 1 < B\nhi_AB : 1 < A * B\nhi_b : 0 < b\n⊢ FermatPsp (A * B) b\n[PROOFSTEP]\nhave hi_p : 1 ≤ p := Nat.one_le_of_lt p_gt_two\n[GOAL]\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nnot_dvd : ¬p ∣ b * (b ^ 2 - 1)\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nhi_A : 1 < A\nhi_B : 1 < B\nhi_AB : 1 < A * B\nhi_b : 0 < b\nhi_p : 1 ≤ p\n⊢ FermatPsp (A * B) b\n[PROOFSTEP]\nhave hi_bsquared : 0 < b ^ 2 - 1 := by\n  -- Porting note: was `by nlinarith [Nat.one_le_pow 2 b hi_b]`\n  have h0 := mul_le_mul b_ge_two b_ge_two zero_le_two hi_b.le\n  have h1 : 1 < 2 * 2 := by linarith\n  have := tsub_pos_of_lt (h1.trans_le h0)\n  rwa [pow_two]\n[GOAL]\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nnot_dvd : ¬p ∣ b * (b ^ 2 - 1)\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nhi_A : 1 < A\nhi_B : 1 < B\nhi_AB : 1 < A * B\nhi_b : 0 < b\nhi_p : 1 ≤ p\n⊢ 0 < b ^ 2 - 1\n[PROOFSTEP]\nhave h0 := mul_le_mul b_ge_two b_ge_two zero_le_two hi_b.le\n[GOAL]\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nnot_dvd : ¬p ∣ b * (b ^ 2 - 1)\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nhi_A : 1 < A\nhi_B : 1 < B\nhi_AB : 1 < A * B\nhi_b : 0 < b\nhi_p : 1 ≤ p\nh0 : 2 * 2 ≤ b * b\n⊢ 0 < b ^ 2 - 1\n[PROOFSTEP]\nhave h1 : 1 < 2 * 2 := by linarith\n[GOAL]\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nnot_dvd : ¬p ∣ b * (b ^ 2 - 1)\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nhi_A : 1 < A\nhi_B : 1 < B\nhi_AB : 1 < A * B\nhi_b : 0 < b\nhi_p : 1 ≤ p\nh0 : 2 * 2 ≤ b * b\n⊢ 1 < 2 * 2\n[PROOFSTEP]\nlinarith\n[GOAL]\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nnot_dvd : ¬p ∣ b * (b ^ 2 - 1)\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nhi_A : 1 < A\nhi_B : 1 < B\nhi_AB : 1 < A * B\nhi_b : 0 < b\nhi_p : 1 ≤ p\nh0 : 2 * 2 ≤ b * b\nh1 : 1 < 2 * 2\n⊢ 0 < b ^ 2 - 1\n[PROOFSTEP]\nhave := tsub_pos_of_lt (h1.trans_le h0)\n[GOAL]\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nnot_dvd : ¬p ∣ b * (b ^ 2 - 1)\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nhi_A : 1 < A\nhi_B : 1 < B\nhi_AB : 1 < A * B\nhi_b : 0 < b\nhi_p : 1 ≤ p\nh0 : 2 * 2 ≤ b * b\nh1 : 1 < 2 * 2\nthis : 0 < b * b - 1\n⊢ 0 < b ^ 2 - 1\n[PROOFSTEP]\nrwa [pow_two]\n[GOAL]\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nnot_dvd : ¬p ∣ b * (b ^ 2 - 1)\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nhi_A : 1 < A\nhi_B : 1 < B\nhi_AB : 1 < A * B\nhi_b : 0 < b\nhi_p : 1 ≤ p\nhi_bsquared : 0 < b ^ 2 - 1\n⊢ FermatPsp (A * B) b\n[PROOFSTEP]\nhave hi_bpowtwop : 1 ≤ b ^ (2 * p) := Nat.one_le_pow (2 * p) b hi_b\n[GOAL]\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nnot_dvd : ¬p ∣ b * (b ^ 2 - 1)\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nhi_A : 1 < A\nhi_B : 1 < B\nhi_AB : 1 < A * B\nhi_b : 0 < b\nhi_p : 1 ≤ p\nhi_bsquared : 0 < b ^ 2 - 1\nhi_bpowtwop : 1 ≤ b ^ (2 * p)\n⊢ FermatPsp (A * B) b\n[PROOFSTEP]\nhave hi_bpowpsubone : 1 ≤ b ^ (p - 1) := Nat.one_le_pow (p - 1) b hi_b\n[GOAL]\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nnot_dvd : ¬p ∣ b * (b ^ 2 - 1)\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nhi_A : 1 < A\nhi_B : 1 < B\nhi_AB : 1 < A * B\nhi_b : 0 < b\nhi_p : 1 ≤ p\nhi_bsquared : 0 < b ^ 2 - 1\nhi_bpowtwop : 1 ≤ b ^ (2 * p)\nhi_bpowpsubone : 1 ≤ b ^ (p - 1)\n⊢ FermatPsp (A * B) b\n[PROOFSTEP]\nhave p_odd : Odd p := p_prime.odd_of_ne_two p_gt_two.ne.symm\n[GOAL]\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nnot_dvd : ¬p ∣ b * (b ^ 2 - 1)\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nhi_A : 1 < A\nhi_B : 1 < B\nhi_AB : 1 < A * B\nhi_b : 0 < b\nhi_p : 1 ≤ p\nhi_bsquared : 0 < b ^ 2 - 1\nhi_bpowtwop : 1 ≤ b ^ (2 * p)\nhi_bpowpsubone : 1 ≤ b ^ (p - 1)\np_odd : Odd p\n⊢ FermatPsp (A * B) b\n[PROOFSTEP]\nhave AB_not_prime : ¬Nat.Prime (A * B) := Nat.not_prime_mul hi_A hi_B\n[GOAL]\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nnot_dvd : ¬p ∣ b * (b ^ 2 - 1)\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nhi_A : 1 < A\nhi_B : 1 < B\nhi_AB : 1 < A * B\nhi_b : 0 < b\nhi_p : 1 ≤ p\nhi_bsquared : 0 < b ^ 2 - 1\nhi_bpowtwop : 1 ≤ b ^ (2 * p)\nhi_bpowpsubone : 1 ≤ b ^ (p - 1)\np_odd : Odd p\nAB_not_prime : ¬Prime (A * B)\n⊢ FermatPsp (A * B) b\n[PROOFSTEP]\nhave AB_id : A * B = (b ^ (2 * p) - 1) / (b ^ 2 - 1) := AB_id_helper _ _ b_ge_two p_odd\n[GOAL]\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nnot_dvd : ¬p ∣ b * (b ^ 2 - 1)\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nhi_A : 1 < A\nhi_B : 1 < B\nhi_AB : 1 < A * B\nhi_b : 0 < b\nhi_p : 1 ≤ p\nhi_bsquared : 0 < b ^ 2 - 1\nhi_bpowtwop : 1 ≤ b ^ (2 * p)\nhi_bpowpsubone : 1 ≤ b ^ (p - 1)\np_odd : Odd p\nAB_not_prime : ¬Prime (A * B)\nAB_id : A * B = (b ^ (2 * p) - 1) / (b ^ 2 - 1)\n⊢ FermatPsp (A * B) b\n[PROOFSTEP]\nhave hd : b ^ 2 - 1 ∣ b ^ (2 * p) - 1 := by simpa only [one_pow, pow_mul] using nat_sub_dvd_pow_sub_pow _ 1 p\n[GOAL]\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nnot_dvd : ¬p ∣ b * (b ^ 2 - 1)\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nhi_A : 1 < A\nhi_B : 1 < B\nhi_AB : 1 < A * B\nhi_b : 0 < b\nhi_p : 1 ≤ p\nhi_bsquared : 0 < b ^ 2 - 1\nhi_bpowtwop : 1 ≤ b ^ (2 * p)\nhi_bpowpsubone : 1 ≤ b ^ (p - 1)\np_odd : Odd p\nAB_not_prime : ¬Prime (A * B)\nAB_id : A * B = (b ^ (2 * p) - 1) / (b ^ 2 - 1)\n⊢ b ^ 2 - 1 ∣ b ^ (2 * p) - 1\n[PROOFSTEP]\nsimpa only [one_pow, pow_mul] using nat_sub_dvd_pow_sub_pow _ 1 p\n[GOAL]\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nnot_dvd : ¬p ∣ b * (b ^ 2 - 1)\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nhi_A : 1 < A\nhi_B : 1 < B\nhi_AB : 1 < A * B\nhi_b : 0 < b\nhi_p : 1 ≤ p\nhi_bsquared : 0 < b ^ 2 - 1\nhi_bpowtwop : 1 ≤ b ^ (2 * p)\nhi_bpowpsubone : 1 ≤ b ^ (p - 1)\np_odd : Odd p\nAB_not_prime : ¬Prime (A * B)\nAB_id : A * B = (b ^ (2 * p) - 1) / (b ^ 2 - 1)\nhd : b ^ 2 - 1 ∣ b ^ (2 * p) - 1\n⊢ FermatPsp (A * B) b\n[PROOFSTEP]\nrefine'\n  ⟨_, AB_not_prime, hi_AB⟩\n    -- Used to prove that `2 * p * (b ^ 2 - 1) ∣ (b ^ 2 - 1) * (A * B - 1)`.\n[GOAL]\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nnot_dvd : ¬p ∣ b * (b ^ 2 - 1)\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nhi_A : 1 < A\nhi_B : 1 < B\nhi_AB : 1 < A * B\nhi_b : 0 < b\nhi_p : 1 ≤ p\nhi_bsquared : 0 < b ^ 2 - 1\nhi_bpowtwop : 1 ≤ b ^ (2 * p)\nhi_bpowpsubone : 1 ≤ b ^ (p - 1)\np_odd : Odd p\nAB_not_prime : ¬Prime (A * B)\nAB_id : A * B = (b ^ (2 * p) - 1) / (b ^ 2 - 1)\nhd : b ^ 2 - 1 ∣ b ^ (2 * p) - 1\n⊢ ProbablePrime (A * B) b\n[PROOFSTEP]\nhave ha₁ : (b ^ 2 - 1) * (A * B - 1) = b * (b ^ (p - 1) - 1) * (b ^ p + b) :=\n  by\n  apply_fun fun x => x * (b ^ 2 - 1) at AB_id \n  rw [Nat.div_mul_cancel hd] at AB_id \n  apply_fun fun x => x - (b ^ 2 - 1) at AB_id \n  nth_rw 2 [← one_mul (b ^ 2 - 1)] at AB_id \n  rw [← Nat.mul_sub_right_distrib, mul_comm] at AB_id \n  rw [AB_id]\n  exact bp_helper hi_b hi_p\n[GOAL]\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nnot_dvd : ¬p ∣ b * (b ^ 2 - 1)\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nhi_A : 1 < A\nhi_B : 1 < B\nhi_AB : 1 < A * B\nhi_b : 0 < b\nhi_p : 1 ≤ p\nhi_bsquared : 0 < b ^ 2 - 1\nhi_bpowtwop : 1 ≤ b ^ (2 * p)\nhi_bpowpsubone : 1 ≤ b ^ (p - 1)\np_odd : Odd p\nAB_not_prime : ¬Prime (A * B)\nAB_id : A * B = (b ^ (2 * p) - 1) / (b ^ 2 - 1)\nhd : b ^ 2 - 1 ∣ b ^ (2 * p) - 1\n⊢ (b ^ 2 - 1) * (A * B - 1) = b * (b ^ (p - 1) - 1) * (b ^ p + b)\n[PROOFSTEP]\napply_fun fun x => x * (b ^ 2 - 1) at AB_id \n[GOAL]\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nnot_dvd : ¬p ∣ b * (b ^ 2 - 1)\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nhi_A : 1 < A\nhi_B : 1 < B\nhi_AB : 1 < A * B\nhi_b : 0 < b\nhi_p : 1 ≤ p\nhi_bsquared : 0 < b ^ 2 - 1\nhi_bpowtwop : 1 ≤ b ^ (2 * p)\nhi_bpowpsubone : 1 ≤ b ^ (p - 1)\np_odd : Odd p\nAB_not_prime : ¬Prime (A * B)\nhd : b ^ 2 - 1 ∣ b ^ (2 * p) - 1\nAB_id : A * B * (b ^ 2 - 1) = (b ^ (2 * p) - 1) / (b ^ 2 - 1) * (b ^ 2 - 1)\n⊢ (b ^ 2 - 1) * (A * B - 1) = b * (b ^ (p - 1) - 1) * (b ^ p + b)\n[PROOFSTEP]\nrw [Nat.div_mul_cancel hd] at AB_id \n[GOAL]\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nnot_dvd : ¬p ∣ b * (b ^ 2 - 1)\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nhi_A : 1 < A\nhi_B : 1 < B\nhi_AB : 1 < A * B\nhi_b : 0 < b\nhi_p : 1 ≤ p\nhi_bsquared : 0 < b ^ 2 - 1\nhi_bpowtwop : 1 ≤ b ^ (2 * p)\nhi_bpowpsubone : 1 ≤ b ^ (p - 1)\np_odd : Odd p\nAB_not_prime : ¬Prime (A * B)\nhd : b ^ 2 - 1 ∣ b ^ (2 * p) - 1\nAB_id : A * B * (b ^ 2 - 1) = b ^ (2 * p) - 1\n⊢ (b ^ 2 - 1) * (A * B - 1) = b * (b ^ (p - 1) - 1) * (b ^ p + b)\n[PROOFSTEP]\napply_fun fun x => x - (b ^ 2 - 1) at AB_id \n[GOAL]\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nnot_dvd : ¬p ∣ b * (b ^ 2 - 1)\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nhi_A : 1 < A\nhi_B : 1 < B\nhi_AB : 1 < A * B\nhi_b : 0 < b\nhi_p : 1 ≤ p\nhi_bsquared : 0 < b ^ 2 - 1\nhi_bpowtwop : 1 ≤ b ^ (2 * p)\nhi_bpowpsubone : 1 ≤ b ^ (p - 1)\np_odd : Odd p\nAB_not_prime : ¬Prime (A * B)\nhd : b ^ 2 - 1 ∣ b ^ (2 * p) - 1\nAB_id : A * B * (b ^ 2 - 1) - (b ^ 2 - 1) = b ^ (2 * p) - 1 - (b ^ 2 - 1)\n⊢ (b ^ 2 - 1) * (A * B - 1) = b * (b ^ (p - 1) - 1) * (b ^ p + b)\n[PROOFSTEP]\nnth_rw 2 [← one_mul (b ^ 2 - 1)] at AB_id \n[GOAL]\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nnot_dvd : ¬p ∣ b * (b ^ 2 - 1)\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nhi_A : 1 < A\nhi_B : 1 < B\nhi_AB : 1 < A * B\nhi_b : 0 < b\nhi_p : 1 ≤ p\nhi_bsquared : 0 < b ^ 2 - 1\nhi_bpowtwop : 1 ≤ b ^ (2 * p)\nhi_bpowpsubone : 1 ≤ b ^ (p - 1)\np_odd : Odd p\nAB_not_prime : ¬Prime (A * B)\nhd : b ^ 2 - 1 ∣ b ^ (2 * p) - 1\nAB_id : A * B * (b ^ 2 - 1) - 1 * (b ^ 2 - 1) = b ^ (2 * p) - 1 - (b ^ 2 - 1)\n⊢ (b ^ 2 - 1) * (A * B - 1) = b * (b ^ (p - 1) - 1) * (b ^ p + b)\n[PROOFSTEP]\nrw [← Nat.mul_sub_right_distrib, mul_comm] at AB_id \n[GOAL]\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nnot_dvd : ¬p ∣ b * (b ^ 2 - 1)\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nhi_A : 1 < A\nhi_B : 1 < B\nhi_AB : 1 < A * B\nhi_b : 0 < b\nhi_p : 1 ≤ p\nhi_bsquared : 0 < b ^ 2 - 1\nhi_bpowtwop : 1 ≤ b ^ (2 * p)\nhi_bpowpsubone : 1 ≤ b ^ (p - 1)\np_odd : Odd p\nAB_not_prime : ¬Prime (A * B)\nhd : b ^ 2 - 1 ∣ b ^ (2 * p) - 1\nAB_id : (b ^ 2 - 1) * (A * B - 1) = b ^ (2 * p) - 1 - (b ^ 2 - 1)\n⊢ (b ^ 2 - 1) * (A * B - 1) = b * (b ^ (p - 1) - 1) * (b ^ p + b)\n[PROOFSTEP]\nrw [AB_id]\n[GOAL]\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nnot_dvd : ¬p ∣ b * (b ^ 2 - 1)\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nhi_A : 1 < A\nhi_B : 1 < B\nhi_AB : 1 < A * B\nhi_b : 0 < b\nhi_p : 1 ≤ p\nhi_bsquared : 0 < b ^ 2 - 1\nhi_bpowtwop : 1 ≤ b ^ (2 * p)\nhi_bpowpsubone : 1 ≤ b ^ (p - 1)\np_odd : Odd p\nAB_not_prime : ¬Prime (A * B)\nhd : b ^ 2 - 1 ∣ b ^ (2 * p) - 1\nAB_id : (b ^ 2 - 1) * (A * B - 1) = b ^ (2 * p) - 1 - (b ^ 2 - 1)\n⊢ b ^ (2 * p) - 1 - (b ^ 2 - 1) = b * (b ^ (p - 1) - 1) * (b ^ p + b)\n[PROOFSTEP]\nexact bp_helper hi_b hi_p\n[GOAL]\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nnot_dvd : ¬p ∣ b * (b ^ 2 - 1)\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nhi_A : 1 < A\nhi_B : 1 < B\nhi_AB : 1 < A * B\nhi_b : 0 < b\nhi_p : 1 ≤ p\nhi_bsquared : 0 < b ^ 2 - 1\nhi_bpowtwop : 1 ≤ b ^ (2 * p)\nhi_bpowpsubone : 1 ≤ b ^ (p - 1)\np_odd : Odd p\nAB_not_prime : ¬Prime (A * B)\nAB_id : A * B = (b ^ (2 * p) - 1) / (b ^ 2 - 1)\nhd : b ^ 2 - 1 ∣ b ^ (2 * p) - 1\nha₁ : (b ^ 2 - 1) * (A * B - 1) = b * (b ^ (p - 1) - 1) * (b ^ p + b)\n⊢ ProbablePrime (A * B) b\n[PROOFSTEP]\nhave ha₂ : 2 ∣ b ^ p + b := by\n  -- Porting note: golfedrw [← even_iff_two_dvd, Nat.even_add, Nat.even_pow' p_prime.ne_zero]\n    -- Since `b` isn't divisible by `p`, `b` is coprime with `p`. we can use Fermat's Little Theorem\n      -- to prove this.\n[GOAL]\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nnot_dvd : ¬p ∣ b * (b ^ 2 - 1)\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nhi_A : 1 < A\nhi_B : 1 < B\nhi_AB : 1 < A * B\nhi_b : 0 < b\nhi_p : 1 ≤ p\nhi_bsquared : 0 < b ^ 2 - 1\nhi_bpowtwop : 1 ≤ b ^ (2 * p)\nhi_bpowpsubone : 1 ≤ b ^ (p - 1)\np_odd : Odd p\nAB_not_prime : ¬Prime (A * B)\nAB_id : A * B = (b ^ (2 * p) - 1) / (b ^ 2 - 1)\nhd : b ^ 2 - 1 ∣ b ^ (2 * p) - 1\nha₁ : (b ^ 2 - 1) * (A * B - 1) = b * (b ^ (p - 1) - 1) * (b ^ p + b)\n⊢ 2 ∣ b ^ p + b\n[PROOFSTEP]\nrw [← even_iff_two_dvd, Nat.even_add, Nat.even_pow' p_prime.ne_zero]\n  -- Since `b` isn't divisible by `p`, `b` is coprime with `p`. we can use Fermat's Little Theorem\n    -- to prove this.\n[GOAL]\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nnot_dvd : ¬p ∣ b * (b ^ 2 - 1)\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nhi_A : 1 < A\nhi_B : 1 < B\nhi_AB : 1 < A * B\nhi_b : 0 < b\nhi_p : 1 ≤ p\nhi_bsquared : 0 < b ^ 2 - 1\nhi_bpowtwop : 1 ≤ b ^ (2 * p)\nhi_bpowpsubone : 1 ≤ b ^ (p - 1)\np_odd : Odd p\nAB_not_prime : ¬Prime (A * B)\nAB_id : A * B = (b ^ (2 * p) - 1) / (b ^ 2 - 1)\nhd : b ^ 2 - 1 ∣ b ^ (2 * p) - 1\nha₁ : (b ^ 2 - 1) * (A * B - 1) = b * (b ^ (p - 1) - 1) * (b ^ p + b)\nha₂ : 2 ∣ b ^ p + b\n⊢ ProbablePrime (A * B) b\n[PROOFSTEP]\nhave ha₃ : p ∣ b ^ (p - 1) - 1 :=\n  by\n  have : ¬p ∣ b := mt (fun h : p ∣ b => dvd_mul_of_dvd_left h _) not_dvd\n  have : p.coprime b := Or.resolve_right (Nat.coprime_or_dvd_of_prime p_prime b) this\n  have : IsCoprime (b : ℤ) ↑p := this.symm.isCoprime\n  have : ↑b ^ (p - 1) ≡ 1 [ZMOD ↑p] := Int.ModEq.pow_card_sub_one_eq_one p_prime this\n  have : ↑p ∣ ↑b ^ (p - 1) - ↑1 := by exact_mod_cast Int.ModEq.dvd (Int.ModEq.symm this)\n  exact_mod_cast this\n[GOAL]\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nnot_dvd : ¬p ∣ b * (b ^ 2 - 1)\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nhi_A : 1 < A\nhi_B : 1 < B\nhi_AB : 1 < A * B\nhi_b : 0 < b\nhi_p : 1 ≤ p\nhi_bsquared : 0 < b ^ 2 - 1\nhi_bpowtwop : 1 ≤ b ^ (2 * p)\nhi_bpowpsubone : 1 ≤ b ^ (p - 1)\np_odd : Odd p\nAB_not_prime : ¬Prime (A * B)\nAB_id : A * B = (b ^ (2 * p) - 1) / (b ^ 2 - 1)\nhd : b ^ 2 - 1 ∣ b ^ (2 * p) - 1\nha₁ : (b ^ 2 - 1) * (A * B - 1) = b * (b ^ (p - 1) - 1) * (b ^ p + b)\nha₂ : 2 ∣ b ^ p + b\n⊢ p ∣ b ^ (p - 1) - 1\n[PROOFSTEP]\nhave : ¬p ∣ b := mt (fun h : p ∣ b => dvd_mul_of_dvd_left h _) not_dvd\n[GOAL]\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nnot_dvd : ¬p ∣ b * (b ^ 2 - 1)\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nhi_A : 1 < A\nhi_B : 1 < B\nhi_AB : 1 < A * B\nhi_b : 0 < b\nhi_p : 1 ≤ p\nhi_bsquared : 0 < b ^ 2 - 1\nhi_bpowtwop : 1 ≤ b ^ (2 * p)\nhi_bpowpsubone : 1 ≤ b ^ (p - 1)\np_odd : Odd p\nAB_not_prime : ¬Prime (A * B)\nAB_id : A * B = (b ^ (2 * p) - 1) / (b ^ 2 - 1)\nhd : b ^ 2 - 1 ∣ b ^ (2 * p) - 1\nha₁ : (b ^ 2 - 1) * (A * B - 1) = b * (b ^ (p - 1) - 1) * (b ^ p + b)\nha₂ : 2 ∣ b ^ p + b\nthis : ¬p ∣ b\n⊢ p ∣ b ^ (p - 1) - 1\n[PROOFSTEP]\nhave : p.coprime b := Or.resolve_right (Nat.coprime_or_dvd_of_prime p_prime b) this\n[GOAL]\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nnot_dvd : ¬p ∣ b * (b ^ 2 - 1)\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nhi_A : 1 < A\nhi_B : 1 < B\nhi_AB : 1 < A * B\nhi_b : 0 < b\nhi_p : 1 ≤ p\nhi_bsquared : 0 < b ^ 2 - 1\nhi_bpowtwop : 1 ≤ b ^ (2 * p)\nhi_bpowpsubone : 1 ≤ b ^ (p - 1)\np_odd : Odd p\nAB_not_prime : ¬Prime (A * B)\nAB_id : A * B = (b ^ (2 * p) - 1) / (b ^ 2 - 1)\nhd : b ^ 2 - 1 ∣ b ^ (2 * p) - 1\nha₁ : (b ^ 2 - 1) * (A * B - 1) = b * (b ^ (p - 1) - 1) * (b ^ p + b)\nha₂ : 2 ∣ b ^ p + b\nthis✝ : ¬p ∣ b\nthis : coprime p b\n⊢ p ∣ b ^ (p - 1) - 1\n[PROOFSTEP]\nhave : IsCoprime (b : ℤ) ↑p := this.symm.isCoprime\n[GOAL]\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nnot_dvd : ¬p ∣ b * (b ^ 2 - 1)\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nhi_A : 1 < A\nhi_B : 1 < B\nhi_AB : 1 < A * B\nhi_b : 0 < b\nhi_p : 1 ≤ p\nhi_bsquared : 0 < b ^ 2 - 1\nhi_bpowtwop : 1 ≤ b ^ (2 * p)\nhi_bpowpsubone : 1 ≤ b ^ (p - 1)\np_odd : Odd p\nAB_not_prime : ¬Prime (A * B)\nAB_id : A * B = (b ^ (2 * p) - 1) / (b ^ 2 - 1)\nhd : b ^ 2 - 1 ∣ b ^ (2 * p) - 1\nha₁ : (b ^ 2 - 1) * (A * B - 1) = b * (b ^ (p - 1) - 1) * (b ^ p + b)\nha₂ : 2 ∣ b ^ p + b\nthis✝¹ : ¬p ∣ b\nthis✝ : coprime p b\nthis : IsCoprime ↑b ↑p\n⊢ p ∣ b ^ (p - 1) - 1\n[PROOFSTEP]\nhave : ↑b ^ (p - 1) ≡ 1 [ZMOD ↑p] := Int.ModEq.pow_card_sub_one_eq_one p_prime this\n[GOAL]\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nnot_dvd : ¬p ∣ b * (b ^ 2 - 1)\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nhi_A : 1 < A\nhi_B : 1 < B\nhi_AB : 1 < A * B\nhi_b : 0 < b\nhi_p : 1 ≤ p\nhi_bsquared : 0 < b ^ 2 - 1\nhi_bpowtwop : 1 ≤ b ^ (2 * p)\nhi_bpowpsubone : 1 ≤ b ^ (p - 1)\np_odd : Odd p\nAB_not_prime : ¬Prime (A * B)\nAB_id : A * B = (b ^ (2 * p) - 1) / (b ^ 2 - 1)\nhd : b ^ 2 - 1 ∣ b ^ (2 * p) - 1\nha₁ : (b ^ 2 - 1) * (A * B - 1) = b * (b ^ (p - 1) - 1) * (b ^ p + b)\nha₂ : 2 ∣ b ^ p + b\nthis✝² : ¬p ∣ b\nthis✝¹ : coprime p b\nthis✝ : IsCoprime ↑b ↑p\nthis : ↑b ^ (p - 1) ≡ 1 [ZMOD ↑p]\n⊢ p ∣ b ^ (p - 1) - 1\n[PROOFSTEP]\nhave : ↑p ∣ ↑b ^ (p - 1) - ↑1 := by exact_mod_cast Int.ModEq.dvd (Int.ModEq.symm this)\n[GOAL]\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nnot_dvd : ¬p ∣ b * (b ^ 2 - 1)\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nhi_A : 1 < A\nhi_B : 1 < B\nhi_AB : 1 < A * B\nhi_b : 0 < b\nhi_p : 1 ≤ p\nhi_bsquared : 0 < b ^ 2 - 1\nhi_bpowtwop : 1 ≤ b ^ (2 * p)\nhi_bpowpsubone : 1 ≤ b ^ (p - 1)\np_odd : Odd p\nAB_not_prime : ¬Prime (A * B)\nAB_id : A * B = (b ^ (2 * p) - 1) / (b ^ 2 - 1)\nhd : b ^ 2 - 1 ∣ b ^ (2 * p) - 1\nha₁ : (b ^ 2 - 1) * (A * B - 1) = b * (b ^ (p - 1) - 1) * (b ^ p + b)\nha₂ : 2 ∣ b ^ p + b\nthis✝² : ¬p ∣ b\nthis✝¹ : coprime p b\nthis✝ : IsCoprime ↑b ↑p\nthis : ↑b ^ (p - 1) ≡ 1 [ZMOD ↑p]\n⊢ p ∣ b ^ (p - 1) - 1\n[PROOFSTEP]\nexact_mod_cast Int.ModEq.dvd (Int.ModEq.symm this)\n[GOAL]\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nnot_dvd : ¬p ∣ b * (b ^ 2 - 1)\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nhi_A : 1 < A\nhi_B : 1 < B\nhi_AB : 1 < A * B\nhi_b : 0 < b\nhi_p : 1 ≤ p\nhi_bsquared : 0 < b ^ 2 - 1\nhi_bpowtwop : 1 ≤ b ^ (2 * p)\nhi_bpowpsubone : 1 ≤ b ^ (p - 1)\np_odd : Odd p\nAB_not_prime : ¬Prime (A * B)\nAB_id : A * B = (b ^ (2 * p) - 1) / (b ^ 2 - 1)\nhd : b ^ 2 - 1 ∣ b ^ (2 * p) - 1\nha₁ : (b ^ 2 - 1) * (A * B - 1) = b * (b ^ (p - 1) - 1) * (b ^ p + b)\nha₂ : 2 ∣ b ^ p + b\nthis✝³ : ¬p ∣ b\nthis✝² : coprime p b\nthis✝¹ : IsCoprime ↑b ↑p\nthis✝ : ↑b ^ (p - 1) ≡ 1 [ZMOD ↑p]\nthis : p ∣ b ^ (p - 1) - 1\n⊢ p ∣ b ^ (p - 1) - 1\n[PROOFSTEP]\nexact_mod_cast this\n[GOAL]\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nnot_dvd : ¬p ∣ b * (b ^ 2 - 1)\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nhi_A : 1 < A\nhi_B : 1 < B\nhi_AB : 1 < A * B\nhi_b : 0 < b\nhi_p : 1 ≤ p\nhi_bsquared : 0 < b ^ 2 - 1\nhi_bpowtwop : 1 ≤ b ^ (2 * p)\nhi_bpowpsubone : 1 ≤ b ^ (p - 1)\np_odd : Odd p\nAB_not_prime : ¬Prime (A * B)\nAB_id : A * B = (b ^ (2 * p) - 1) / (b ^ 2 - 1)\nhd : b ^ 2 - 1 ∣ b ^ (2 * p) - 1\nha₁ : (b ^ 2 - 1) * (A * B - 1) = b * (b ^ (p - 1) - 1) * (b ^ p + b)\nha₂ : 2 ∣ b ^ p + b\nha₃ : p ∣ b ^ (p - 1) - 1\n⊢ ProbablePrime (A * B) b\n[PROOFSTEP]\nhave ha₄ : b ^ 2 - 1 ∣ b ^ (p - 1) - 1 := by\n  cases' p_odd with k hk\n  have : 2 ∣ p - 1 := ⟨k, by simp [hk]⟩\n  cases' this with c hc\n  have : b ^ 2 - 1 ∣ (b ^ 2) ^ c - 1 := by simpa only [one_pow] using nat_sub_dvd_pow_sub_pow _ 1 c\n  have : b ^ 2 - 1 ∣ b ^ (2 * c) - 1 := by rwa [← pow_mul] at this \n  rwa [← hc] at this \n[GOAL]\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nnot_dvd : ¬p ∣ b * (b ^ 2 - 1)\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nhi_A : 1 < A\nhi_B : 1 < B\nhi_AB : 1 < A * B\nhi_b : 0 < b\nhi_p : 1 ≤ p\nhi_bsquared : 0 < b ^ 2 - 1\nhi_bpowtwop : 1 ≤ b ^ (2 * p)\nhi_bpowpsubone : 1 ≤ b ^ (p - 1)\np_odd : Odd p\nAB_not_prime : ¬Prime (A * B)\nAB_id : A * B = (b ^ (2 * p) - 1) / (b ^ 2 - 1)\nhd : b ^ 2 - 1 ∣ b ^ (2 * p) - 1\nha₁ : (b ^ 2 - 1) * (A * B - 1) = b * (b ^ (p - 1) - 1) * (b ^ p + b)\nha₂ : 2 ∣ b ^ p + b\nha₃ : p ∣ b ^ (p - 1) - 1\n⊢ b ^ 2 - 1 ∣ b ^ (p - 1) - 1\n[PROOFSTEP]\ncases' p_odd with k hk\n[GOAL]\ncase intro\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nnot_dvd : ¬p ∣ b * (b ^ 2 - 1)\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nhi_A : 1 < A\nhi_B : 1 < B\nhi_AB : 1 < A * B\nhi_b : 0 < b\nhi_p : 1 ≤ p\nhi_bsquared : 0 < b ^ 2 - 1\nhi_bpowtwop : 1 ≤ b ^ (2 * p)\nhi_bpowpsubone : 1 ≤ b ^ (p - 1)\nAB_not_prime : ¬Prime (A * B)\nAB_id : A * B = (b ^ (2 * p) - 1) / (b ^ 2 - 1)\nhd : b ^ 2 - 1 ∣ b ^ (2 * p) - 1\nha₁ : (b ^ 2 - 1) * (A * B - 1) = b * (b ^ (p - 1) - 1) * (b ^ p + b)\nha₂ : 2 ∣ b ^ p + b\nha₃ : p ∣ b ^ (p - 1) - 1\nk : ℕ\nhk : p = 2 * k + 1\n⊢ b ^ 2 - 1 ∣ b ^ (p - 1) - 1\n[PROOFSTEP]\nhave : 2 ∣ p - 1 := ⟨k, by simp [hk]⟩\n[GOAL]\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nnot_dvd : ¬p ∣ b * (b ^ 2 - 1)\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nhi_A : 1 < A\nhi_B : 1 < B\nhi_AB : 1 < A * B\nhi_b : 0 < b\nhi_p : 1 ≤ p\nhi_bsquared : 0 < b ^ 2 - 1\nhi_bpowtwop : 1 ≤ b ^ (2 * p)\nhi_bpowpsubone : 1 ≤ b ^ (p - 1)\nAB_not_prime : ¬Prime (A * B)\nAB_id : A * B = (b ^ (2 * p) - 1) / (b ^ 2 - 1)\nhd : b ^ 2 - 1 ∣ b ^ (2 * p) - 1\nha₁ : (b ^ 2 - 1) * (A * B - 1) = b * (b ^ (p - 1) - 1) * (b ^ p + b)\nha₂ : 2 ∣ b ^ p + b\nha₃ : p ∣ b ^ (p - 1) - 1\nk : ℕ\nhk : p = 2 * k + 1\n⊢ p - 1 = 2 * k\n[PROOFSTEP]\nsimp [hk]\n[GOAL]\ncase intro\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nnot_dvd : ¬p ∣ b * (b ^ 2 - 1)\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nhi_A : 1 < A\nhi_B : 1 < B\nhi_AB : 1 < A * B\nhi_b : 0 < b\nhi_p : 1 ≤ p\nhi_bsquared : 0 < b ^ 2 - 1\nhi_bpowtwop : 1 ≤ b ^ (2 * p)\nhi_bpowpsubone : 1 ≤ b ^ (p - 1)\nAB_not_prime : ¬Prime (A * B)\nAB_id : A * B = (b ^ (2 * p) - 1) / (b ^ 2 - 1)\nhd : b ^ 2 - 1 ∣ b ^ (2 * p) - 1\nha₁ : (b ^ 2 - 1) * (A * B - 1) = b * (b ^ (p - 1) - 1) * (b ^ p + b)\nha₂ : 2 ∣ b ^ p + b\nha₃ : p ∣ b ^ (p - 1) - 1\nk : ℕ\nhk : p = 2 * k + 1\nthis : 2 ∣ p - 1\n⊢ b ^ 2 - 1 ∣ b ^ (p - 1) - 1\n[PROOFSTEP]\ncases' this with c hc\n[GOAL]\ncase intro.intro\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nnot_dvd : ¬p ∣ b * (b ^ 2 - 1)\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nhi_A : 1 < A\nhi_B : 1 < B\nhi_AB : 1 < A * B\nhi_b : 0 < b\nhi_p : 1 ≤ p\nhi_bsquared : 0 < b ^ 2 - 1\nhi_bpowtwop : 1 ≤ b ^ (2 * p)\nhi_bpowpsubone : 1 ≤ b ^ (p - 1)\nAB_not_prime : ¬Prime (A * B)\nAB_id : A * B = (b ^ (2 * p) - 1) / (b ^ 2 - 1)\nhd : b ^ 2 - 1 ∣ b ^ (2 * p) - 1\nha₁ : (b ^ 2 - 1) * (A * B - 1) = b * (b ^ (p - 1) - 1) * (b ^ p + b)\nha₂ : 2 ∣ b ^ p + b\nha₃ : p ∣ b ^ (p - 1) - 1\nk : ℕ\nhk : p = 2 * k + 1\nc : ℕ\nhc : p - 1 = 2 * c\n⊢ b ^ 2 - 1 ∣ b ^ (p - 1) - 1\n[PROOFSTEP]\nhave : b ^ 2 - 1 ∣ (b ^ 2) ^ c - 1 := by simpa only [one_pow] using nat_sub_dvd_pow_sub_pow _ 1 c\n[GOAL]\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nnot_dvd : ¬p ∣ b * (b ^ 2 - 1)\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nhi_A : 1 < A\nhi_B : 1 < B\nhi_AB : 1 < A * B\nhi_b : 0 < b\nhi_p : 1 ≤ p\nhi_bsquared : 0 < b ^ 2 - 1\nhi_bpowtwop : 1 ≤ b ^ (2 * p)\nhi_bpowpsubone : 1 ≤ b ^ (p - 1)\nAB_not_prime : ¬Prime (A * B)\nAB_id : A * B = (b ^ (2 * p) - 1) / (b ^ 2 - 1)\nhd : b ^ 2 - 1 ∣ b ^ (2 * p) - 1\nha₁ : (b ^ 2 - 1) * (A * B - 1) = b * (b ^ (p - 1) - 1) * (b ^ p + b)\nha₂ : 2 ∣ b ^ p + b\nha₃ : p ∣ b ^ (p - 1) - 1\nk : ℕ\nhk : p = 2 * k + 1\nc : ℕ\nhc : p - 1 = 2 * c\n⊢ b ^ 2 - 1 ∣ (b ^ 2) ^ c - 1\n[PROOFSTEP]\nsimpa only [one_pow] using nat_sub_dvd_pow_sub_pow _ 1 c\n[GOAL]\ncase intro.intro\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nnot_dvd : ¬p ∣ b * (b ^ 2 - 1)\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nhi_A : 1 < A\nhi_B : 1 < B\nhi_AB : 1 < A * B\nhi_b : 0 < b\nhi_p : 1 ≤ p\nhi_bsquared : 0 < b ^ 2 - 1\nhi_bpowtwop : 1 ≤ b ^ (2 * p)\nhi_bpowpsubone : 1 ≤ b ^ (p - 1)\nAB_not_prime : ¬Prime (A * B)\nAB_id : A * B = (b ^ (2 * p) - 1) / (b ^ 2 - 1)\nhd : b ^ 2 - 1 ∣ b ^ (2 * p) - 1\nha₁ : (b ^ 2 - 1) * (A * B - 1) = b * (b ^ (p - 1) - 1) * (b ^ p + b)\nha₂ : 2 ∣ b ^ p + b\nha₃ : p ∣ b ^ (p - 1) - 1\nk : ℕ\nhk : p = 2 * k + 1\nc : ℕ\nhc : p - 1 = 2 * c\nthis : b ^ 2 - 1 ∣ (b ^ 2) ^ c - 1\n⊢ b ^ 2 - 1 ∣ b ^ (p - 1) - 1\n[PROOFSTEP]\nhave : b ^ 2 - 1 ∣ b ^ (2 * c) - 1 := by rwa [← pow_mul] at this \n[GOAL]\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nnot_dvd : ¬p ∣ b * (b ^ 2 - 1)\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nhi_A : 1 < A\nhi_B : 1 < B\nhi_AB : 1 < A * B\nhi_b : 0 < b\nhi_p : 1 ≤ p\nhi_bsquared : 0 < b ^ 2 - 1\nhi_bpowtwop : 1 ≤ b ^ (2 * p)\nhi_bpowpsubone : 1 ≤ b ^ (p - 1)\nAB_not_prime : ¬Prime (A * B)\nAB_id : A * B = (b ^ (2 * p) - 1) / (b ^ 2 - 1)\nhd : b ^ 2 - 1 ∣ b ^ (2 * p) - 1\nha₁ : (b ^ 2 - 1) * (A * B - 1) = b * (b ^ (p - 1) - 1) * (b ^ p + b)\nha₂ : 2 ∣ b ^ p + b\nha₃ : p ∣ b ^ (p - 1) - 1\nk : ℕ\nhk : p = 2 * k + 1\nc : ℕ\nhc : p - 1 = 2 * c\nthis : b ^ 2 - 1 ∣ (b ^ 2) ^ c - 1\n⊢ b ^ 2 - 1 ∣ b ^ (2 * c) - 1\n[PROOFSTEP]\nrwa [← pow_mul] at this \n[GOAL]\ncase intro.intro\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nnot_dvd : ¬p ∣ b * (b ^ 2 - 1)\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nhi_A : 1 < A\nhi_B : 1 < B\nhi_AB : 1 < A * B\nhi_b : 0 < b\nhi_p : 1 ≤ p\nhi_bsquared : 0 < b ^ 2 - 1\nhi_bpowtwop : 1 ≤ b ^ (2 * p)\nhi_bpowpsubone : 1 ≤ b ^ (p - 1)\nAB_not_prime : ¬Prime (A * B)\nAB_id : A * B = (b ^ (2 * p) - 1) / (b ^ 2 - 1)\nhd : b ^ 2 - 1 ∣ b ^ (2 * p) - 1\nha₁ : (b ^ 2 - 1) * (A * B - 1) = b * (b ^ (p - 1) - 1) * (b ^ p + b)\nha₂ : 2 ∣ b ^ p + b\nha₃ : p ∣ b ^ (p - 1) - 1\nk : ℕ\nhk : p = 2 * k + 1\nc : ℕ\nhc : p - 1 = 2 * c\nthis✝ : b ^ 2 - 1 ∣ (b ^ 2) ^ c - 1\nthis : b ^ 2 - 1 ∣ b ^ (2 * c) - 1\n⊢ b ^ 2 - 1 ∣ b ^ (p - 1) - 1\n[PROOFSTEP]\nrwa [← hc] at this \n[GOAL]\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nnot_dvd : ¬p ∣ b * (b ^ 2 - 1)\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nhi_A : 1 < A\nhi_B : 1 < B\nhi_AB : 1 < A * B\nhi_b : 0 < b\nhi_p : 1 ≤ p\nhi_bsquared : 0 < b ^ 2 - 1\nhi_bpowtwop : 1 ≤ b ^ (2 * p)\nhi_bpowpsubone : 1 ≤ b ^ (p - 1)\np_odd : Odd p\nAB_not_prime : ¬Prime (A * B)\nAB_id : A * B = (b ^ (2 * p) - 1) / (b ^ 2 - 1)\nhd : b ^ 2 - 1 ∣ b ^ (2 * p) - 1\nha₁ : (b ^ 2 - 1) * (A * B - 1) = b * (b ^ (p - 1) - 1) * (b ^ p + b)\nha₂ : 2 ∣ b ^ p + b\nha₃ : p ∣ b ^ (p - 1) - 1\nha₄ : b ^ 2 - 1 ∣ b ^ (p - 1) - 1\n⊢ ProbablePrime (A * B) b\n[PROOFSTEP]\nhave ha₅ : 2 * p * (b ^ 2 - 1) ∣ (b ^ 2 - 1) * (A * B - 1) :=\n  by\n  suffices q : 2 * p * (b ^ 2 - 1) ∣ b * (b ^ (p - 1) - 1) * (b ^ p + b)\n  ·\n    rwa [ha₁]\n      -- We already proved that `b ^ 2 - 1 ∣ b ^ (p - 1) - 1`.\n          -- Since `2 ∣ b ^ p + b` and `p ∣ b ^ p + b`, if we show that 2 and p are coprime, then we\n          -- know that `2 * p ∣ b ^ p + b`\n  have q₁ : Nat.coprime p (b ^ 2 - 1) :=\n    haveI q₂ : ¬p ∣ b ^ 2 - 1 := by\n      rw [mul_comm] at not_dvd \n      exact mt (fun h : p ∣ b ^ 2 - 1 => dvd_mul_of_dvd_left h _) not_dvd\n    (Nat.Prime.coprime_iff_not_dvd p_prime).mpr q₂\n  have q₂ : p * (b ^ 2 - 1) ∣ b ^ (p - 1) - 1 := Nat.coprime.mul_dvd_of_dvd_of_dvd q₁ ha₃ ha₄\n  have q₃ : p * (b ^ 2 - 1) * 2 ∣ (b ^ (p - 1) - 1) * (b ^ p + b) := mul_dvd_mul q₂ ha₂\n  have q₄ : p * (b ^ 2 - 1) * 2 ∣ b * ((b ^ (p - 1) - 1) * (b ^ p + b)) := dvd_mul_of_dvd_right q₃ _\n  rwa [mul_assoc, mul_comm, mul_assoc b]\n[GOAL]\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nnot_dvd : ¬p ∣ b * (b ^ 2 - 1)\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nhi_A : 1 < A\nhi_B : 1 < B\nhi_AB : 1 < A * B\nhi_b : 0 < b\nhi_p : 1 ≤ p\nhi_bsquared : 0 < b ^ 2 - 1\nhi_bpowtwop : 1 ≤ b ^ (2 * p)\nhi_bpowpsubone : 1 ≤ b ^ (p - 1)\np_odd : Odd p\nAB_not_prime : ¬Prime (A * B)\nAB_id : A * B = (b ^ (2 * p) - 1) / (b ^ 2 - 1)\nhd : b ^ 2 - 1 ∣ b ^ (2 * p) - 1\nha₁ : (b ^ 2 - 1) * (A * B - 1) = b * (b ^ (p - 1) - 1) * (b ^ p + b)\nha₂ : 2 ∣ b ^ p + b\nha₃ : p ∣ b ^ (p - 1) - 1\nha₄ : b ^ 2 - 1 ∣ b ^ (p - 1) - 1\n⊢ 2 * p * (b ^ 2 - 1) ∣ (b ^ 2 - 1) * (A * B - 1)\n[PROOFSTEP]\nsuffices q : 2 * p * (b ^ 2 - 1) ∣ b * (b ^ (p - 1) - 1) * (b ^ p + b)\n[GOAL]\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nnot_dvd : ¬p ∣ b * (b ^ 2 - 1)\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nhi_A : 1 < A\nhi_B : 1 < B\nhi_AB : 1 < A * B\nhi_b : 0 < b\nhi_p : 1 ≤ p\nhi_bsquared : 0 < b ^ 2 - 1\nhi_bpowtwop : 1 ≤ b ^ (2 * p)\nhi_bpowpsubone : 1 ≤ b ^ (p - 1)\np_odd : Odd p\nAB_not_prime : ¬Prime (A * B)\nAB_id : A * B = (b ^ (2 * p) - 1) / (b ^ 2 - 1)\nhd : b ^ 2 - 1 ∣ b ^ (2 * p) - 1\nha₁ : (b ^ 2 - 1) * (A * B - 1) = b * (b ^ (p - 1) - 1) * (b ^ p + b)\nha₂ : 2 ∣ b ^ p + b\nha₃ : p ∣ b ^ (p - 1) - 1\nha₄ : b ^ 2 - 1 ∣ b ^ (p - 1) - 1\nq : 2 * p * (b ^ 2 - 1) ∣ b * (b ^ (p - 1) - 1) * (b ^ p + b)\n⊢ 2 * p * (b ^ 2 - 1) ∣ (b ^ 2 - 1) * (A * B - 1)\n[PROOFSTEP]\nrwa [ha₁]\n  -- We already proved that `b ^ 2 - 1 ∣ b ^ (p - 1) - 1`.\n      -- Since `2 ∣ b ^ p + b` and `p ∣ b ^ p + b`, if we show that 2 and p are coprime, then we\n      -- know that `2 * p ∣ b ^ p + b`\n[GOAL]\ncase q\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nnot_dvd : ¬p ∣ b * (b ^ 2 - 1)\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nhi_A : 1 < A\nhi_B : 1 < B\nhi_AB : 1 < A * B\nhi_b : 0 < b\nhi_p : 1 ≤ p\nhi_bsquared : 0 < b ^ 2 - 1\nhi_bpowtwop : 1 ≤ b ^ (2 * p)\nhi_bpowpsubone : 1 ≤ b ^ (p - 1)\np_odd : Odd p\nAB_not_prime : ¬Prime (A * B)\nAB_id : A * B = (b ^ (2 * p) - 1) / (b ^ 2 - 1)\nhd : b ^ 2 - 1 ∣ b ^ (2 * p) - 1\nha₁ : (b ^ 2 - 1) * (A * B - 1) = b * (b ^ (p - 1) - 1) * (b ^ p + b)\nha₂ : 2 ∣ b ^ p + b\nha₃ : p ∣ b ^ (p - 1) - 1\nha₄ : b ^ 2 - 1 ∣ b ^ (p - 1) - 1\n⊢ 2 * p * (b ^ 2 - 1) ∣ b * (b ^ (p - 1) - 1) * (b ^ p + b)\n[PROOFSTEP]\nhave q₁ : Nat.coprime p (b ^ 2 - 1) :=\n  haveI q₂ : ¬p ∣ b ^ 2 - 1 := by\n    rw [mul_comm] at not_dvd \n    exact mt (fun h : p ∣ b ^ 2 - 1 => dvd_mul_of_dvd_left h _) not_dvd\n  (Nat.Prime.coprime_iff_not_dvd p_prime).mpr q₂\n[GOAL]\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nnot_dvd : ¬p ∣ b * (b ^ 2 - 1)\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nhi_A : 1 < A\nhi_B : 1 < B\nhi_AB : 1 < A * B\nhi_b : 0 < b\nhi_p : 1 ≤ p\nhi_bsquared : 0 < b ^ 2 - 1\nhi_bpowtwop : 1 ≤ b ^ (2 * p)\nhi_bpowpsubone : 1 ≤ b ^ (p - 1)\np_odd : Odd p\nAB_not_prime : ¬Prime (A * B)\nAB_id : A * B = (b ^ (2 * p) - 1) / (b ^ 2 - 1)\nhd : b ^ 2 - 1 ∣ b ^ (2 * p) - 1\nha₁ : (b ^ 2 - 1) * (A * B - 1) = b * (b ^ (p - 1) - 1) * (b ^ p + b)\nha₂ : 2 ∣ b ^ p + b\nha₃ : p ∣ b ^ (p - 1) - 1\nha₄ : b ^ 2 - 1 ∣ b ^ (p - 1) - 1\n⊢ ¬p ∣ b ^ 2 - 1\n[PROOFSTEP]\nrw [mul_comm] at not_dvd \n[GOAL]\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nnot_dvd : ¬p ∣ (b ^ 2 - 1) * b\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nhi_A : 1 < A\nhi_B : 1 < B\nhi_AB : 1 < A * B\nhi_b : 0 < b\nhi_p : 1 ≤ p\nhi_bsquared : 0 < b ^ 2 - 1\nhi_bpowtwop : 1 ≤ b ^ (2 * p)\nhi_bpowpsubone : 1 ≤ b ^ (p - 1)\np_odd : Odd p\nAB_not_prime : ¬Prime (A * B)\nAB_id : A * B = (b ^ (2 * p) - 1) / (b ^ 2 - 1)\nhd : b ^ 2 - 1 ∣ b ^ (2 * p) - 1\nha₁ : (b ^ 2 - 1) * (A * B - 1) = b * (b ^ (p - 1) - 1) * (b ^ p + b)\nha₂ : 2 ∣ b ^ p + b\nha₃ : p ∣ b ^ (p - 1) - 1\nha₄ : b ^ 2 - 1 ∣ b ^ (p - 1) - 1\n⊢ ¬p ∣ b ^ 2 - 1\n[PROOFSTEP]\nexact mt (fun h : p ∣ b ^ 2 - 1 => dvd_mul_of_dvd_left h _) not_dvd\n[GOAL]\ncase q\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nnot_dvd : ¬p ∣ b * (b ^ 2 - 1)\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nhi_A : 1 < A\nhi_B : 1 < B\nhi_AB : 1 < A * B\nhi_b : 0 < b\nhi_p : 1 ≤ p\nhi_bsquared : 0 < b ^ 2 - 1\nhi_bpowtwop : 1 ≤ b ^ (2 * p)\nhi_bpowpsubone : 1 ≤ b ^ (p - 1)\np_odd : Odd p\nAB_not_prime : ¬Prime (A * B)\nAB_id : A * B = (b ^ (2 * p) - 1) / (b ^ 2 - 1)\nhd : b ^ 2 - 1 ∣ b ^ (2 * p) - 1\nha₁ : (b ^ 2 - 1) * (A * B - 1) = b * (b ^ (p - 1) - 1) * (b ^ p + b)\nha₂ : 2 ∣ b ^ p + b\nha₃ : p ∣ b ^ (p - 1) - 1\nha₄ : b ^ 2 - 1 ∣ b ^ (p - 1) - 1\nq₁ : coprime p (b ^ 2 - 1)\n⊢ 2 * p * (b ^ 2 - 1) ∣ b * (b ^ (p - 1) - 1) * (b ^ p + b)\n[PROOFSTEP]\nhave q₂ : p * (b ^ 2 - 1) ∣ b ^ (p - 1) - 1 := Nat.coprime.mul_dvd_of_dvd_of_dvd q₁ ha₃ ha₄\n[GOAL]\ncase q\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nnot_dvd : ¬p ∣ b * (b ^ 2 - 1)\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nhi_A : 1 < A\nhi_B : 1 < B\nhi_AB : 1 < A * B\nhi_b : 0 < b\nhi_p : 1 ≤ p\nhi_bsquared : 0 < b ^ 2 - 1\nhi_bpowtwop : 1 ≤ b ^ (2 * p)\nhi_bpowpsubone : 1 ≤ b ^ (p - 1)\np_odd : Odd p\nAB_not_prime : ¬Prime (A * B)\nAB_id : A * B = (b ^ (2 * p) - 1) / (b ^ 2 - 1)\nhd : b ^ 2 - 1 ∣ b ^ (2 * p) - 1\nha₁ : (b ^ 2 - 1) * (A * B - 1) = b * (b ^ (p - 1) - 1) * (b ^ p + b)\nha₂ : 2 ∣ b ^ p + b\nha₃ : p ∣ b ^ (p - 1) - 1\nha₄ : b ^ 2 - 1 ∣ b ^ (p - 1) - 1\nq₁ : coprime p (b ^ 2 - 1)\nq₂ : p * (b ^ 2 - 1) ∣ b ^ (p - 1) - 1\n⊢ 2 * p * (b ^ 2 - 1) ∣ b * (b ^ (p - 1) - 1) * (b ^ p + b)\n[PROOFSTEP]\nhave q₃ : p * (b ^ 2 - 1) * 2 ∣ (b ^ (p - 1) - 1) * (b ^ p + b) := mul_dvd_mul q₂ ha₂\n[GOAL]\ncase q\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nnot_dvd : ¬p ∣ b * (b ^ 2 - 1)\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nhi_A : 1 < A\nhi_B : 1 < B\nhi_AB : 1 < A * B\nhi_b : 0 < b\nhi_p : 1 ≤ p\nhi_bsquared : 0 < b ^ 2 - 1\nhi_bpowtwop : 1 ≤ b ^ (2 * p)\nhi_bpowpsubone : 1 ≤ b ^ (p - 1)\np_odd : Odd p\nAB_not_prime : ¬Prime (A * B)\nAB_id : A * B = (b ^ (2 * p) - 1) / (b ^ 2 - 1)\nhd : b ^ 2 - 1 ∣ b ^ (2 * p) - 1\nha₁ : (b ^ 2 - 1) * (A * B - 1) = b * (b ^ (p - 1) - 1) * (b ^ p + b)\nha₂ : 2 ∣ b ^ p + b\nha₃ : p ∣ b ^ (p - 1) - 1\nha₄ : b ^ 2 - 1 ∣ b ^ (p - 1) - 1\nq₁ : coprime p (b ^ 2 - 1)\nq₂ : p * (b ^ 2 - 1) ∣ b ^ (p - 1) - 1\nq₃ : p * (b ^ 2 - 1) * 2 ∣ (b ^ (p - 1) - 1) * (b ^ p + b)\n⊢ 2 * p * (b ^ 2 - 1) ∣ b * (b ^ (p - 1) - 1) * (b ^ p + b)\n[PROOFSTEP]\nhave q₄ : p * (b ^ 2 - 1) * 2 ∣ b * ((b ^ (p - 1) - 1) * (b ^ p + b)) := dvd_mul_of_dvd_right q₃ _\n[GOAL]\ncase q\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nnot_dvd : ¬p ∣ b * (b ^ 2 - 1)\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nhi_A : 1 < A\nhi_B : 1 < B\nhi_AB : 1 < A * B\nhi_b : 0 < b\nhi_p : 1 ≤ p\nhi_bsquared : 0 < b ^ 2 - 1\nhi_bpowtwop : 1 ≤ b ^ (2 * p)\nhi_bpowpsubone : 1 ≤ b ^ (p - 1)\np_odd : Odd p\nAB_not_prime : ¬Prime (A * B)\nAB_id : A * B = (b ^ (2 * p) - 1) / (b ^ 2 - 1)\nhd : b ^ 2 - 1 ∣ b ^ (2 * p) - 1\nha₁ : (b ^ 2 - 1) * (A * B - 1) = b * (b ^ (p - 1) - 1) * (b ^ p + b)\nha₂ : 2 ∣ b ^ p + b\nha₃ : p ∣ b ^ (p - 1) - 1\nha₄ : b ^ 2 - 1 ∣ b ^ (p - 1) - 1\nq₁ : coprime p (b ^ 2 - 1)\nq₂ : p * (b ^ 2 - 1) ∣ b ^ (p - 1) - 1\nq₃ : p * (b ^ 2 - 1) * 2 ∣ (b ^ (p - 1) - 1) * (b ^ p + b)\nq₄ : p * (b ^ 2 - 1) * 2 ∣ b * ((b ^ (p - 1) - 1) * (b ^ p + b))\n⊢ 2 * p * (b ^ 2 - 1) ∣ b * (b ^ (p - 1) - 1) * (b ^ p + b)\n[PROOFSTEP]\nrwa [mul_assoc, mul_comm, mul_assoc b]\n[GOAL]\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nnot_dvd : ¬p ∣ b * (b ^ 2 - 1)\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nhi_A : 1 < A\nhi_B : 1 < B\nhi_AB : 1 < A * B\nhi_b : 0 < b\nhi_p : 1 ≤ p\nhi_bsquared : 0 < b ^ 2 - 1\nhi_bpowtwop : 1 ≤ b ^ (2 * p)\nhi_bpowpsubone : 1 ≤ b ^ (p - 1)\np_odd : Odd p\nAB_not_prime : ¬Prime (A * B)\nAB_id : A * B = (b ^ (2 * p) - 1) / (b ^ 2 - 1)\nhd : b ^ 2 - 1 ∣ b ^ (2 * p) - 1\nha₁ : (b ^ 2 - 1) * (A * B - 1) = b * (b ^ (p - 1) - 1) * (b ^ p + b)\nha₂ : 2 ∣ b ^ p + b\nha₃ : p ∣ b ^ (p - 1) - 1\nha₄ : b ^ 2 - 1 ∣ b ^ (p - 1) - 1\nha₅ : 2 * p * (b ^ 2 - 1) ∣ (b ^ 2 - 1) * (A * B - 1)\n⊢ ProbablePrime (A * B) b\n[PROOFSTEP]\nhave ha₆ : 2 * p ∣ A * B - 1 := by\n  rw [mul_comm] at ha₅ \n  exact Nat.dvd_of_mul_dvd_mul_left hi_bsquared ha₅\n[GOAL]\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nnot_dvd : ¬p ∣ b * (b ^ 2 - 1)\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nhi_A : 1 < A\nhi_B : 1 < B\nhi_AB : 1 < A * B\nhi_b : 0 < b\nhi_p : 1 ≤ p\nhi_bsquared : 0 < b ^ 2 - 1\nhi_bpowtwop : 1 ≤ b ^ (2 * p)\nhi_bpowpsubone : 1 ≤ b ^ (p - 1)\np_odd : Odd p\nAB_not_prime : ¬Prime (A * B)\nAB_id : A * B = (b ^ (2 * p) - 1) / (b ^ 2 - 1)\nhd : b ^ 2 - 1 ∣ b ^ (2 * p) - 1\nha₁ : (b ^ 2 - 1) * (A * B - 1) = b * (b ^ (p - 1) - 1) * (b ^ p + b)\nha₂ : 2 ∣ b ^ p + b\nha₃ : p ∣ b ^ (p - 1) - 1\nha₄ : b ^ 2 - 1 ∣ b ^ (p - 1) - 1\nha₅ : 2 * p * (b ^ 2 - 1) ∣ (b ^ 2 - 1) * (A * B - 1)\n⊢ 2 * p ∣ A * B - 1\n[PROOFSTEP]\nrw [mul_comm] at ha₅ \n[GOAL]\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nnot_dvd : ¬p ∣ b * (b ^ 2 - 1)\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nhi_A : 1 < A\nhi_B : 1 < B\nhi_AB : 1 < A * B\nhi_b : 0 < b\nhi_p : 1 ≤ p\nhi_bsquared : 0 < b ^ 2 - 1\nhi_bpowtwop : 1 ≤ b ^ (2 * p)\nhi_bpowpsubone : 1 ≤ b ^ (p - 1)\np_odd : Odd p\nAB_not_prime : ¬Prime (A * B)\nAB_id : A * B = (b ^ (2 * p) - 1) / (b ^ 2 - 1)\nhd : b ^ 2 - 1 ∣ b ^ (2 * p) - 1\nha₁ : (b ^ 2 - 1) * (A * B - 1) = b * (b ^ (p - 1) - 1) * (b ^ p + b)\nha₂ : 2 ∣ b ^ p + b\nha₃ : p ∣ b ^ (p - 1) - 1\nha₄ : b ^ 2 - 1 ∣ b ^ (p - 1) - 1\nha₅ : (b ^ 2 - 1) * (2 * p) ∣ (b ^ 2 - 1) * (A * B - 1)\n⊢ 2 * p ∣ A * B - 1\n[PROOFSTEP]\nexact Nat.dvd_of_mul_dvd_mul_left hi_bsquared ha₅\n[GOAL]\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nnot_dvd : ¬p ∣ b * (b ^ 2 - 1)\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nhi_A : 1 < A\nhi_B : 1 < B\nhi_AB : 1 < A * B\nhi_b : 0 < b\nhi_p : 1 ≤ p\nhi_bsquared : 0 < b ^ 2 - 1\nhi_bpowtwop : 1 ≤ b ^ (2 * p)\nhi_bpowpsubone : 1 ≤ b ^ (p - 1)\np_odd : Odd p\nAB_not_prime : ¬Prime (A * B)\nAB_id : A * B = (b ^ (2 * p) - 1) / (b ^ 2 - 1)\nhd : b ^ 2 - 1 ∣ b ^ (2 * p) - 1\nha₁ : (b ^ 2 - 1) * (A * B - 1) = b * (b ^ (p - 1) - 1) * (b ^ p + b)\nha₂ : 2 ∣ b ^ p + b\nha₃ : p ∣ b ^ (p - 1) - 1\nha₄ : b ^ 2 - 1 ∣ b ^ (p - 1) - 1\nha₅ : 2 * p * (b ^ 2 - 1) ∣ (b ^ 2 - 1) * (A * B - 1)\nha₆ : 2 * p ∣ A * B - 1\n⊢ ProbablePrime (A * B) b\n[PROOFSTEP]\nhave ha₇ : A * B ∣ b ^ (2 * p) - 1 := by\n  use b ^ 2 - 1\n  have : A * B * (b ^ 2 - 1) = (b ^ (2 * p) - 1) / (b ^ 2 - 1) * (b ^ 2 - 1) :=\n    congr_arg (fun x : ℕ => x * (b ^ 2 - 1)) AB_id\n  simpa only [add_comm, Nat.div_mul_cancel hd, Nat.sub_add_cancel hi_bpowtwop] using this.symm\n[GOAL]\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nnot_dvd : ¬p ∣ b * (b ^ 2 - 1)\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nhi_A : 1 < A\nhi_B : 1 < B\nhi_AB : 1 < A * B\nhi_b : 0 < b\nhi_p : 1 ≤ p\nhi_bsquared : 0 < b ^ 2 - 1\nhi_bpowtwop : 1 ≤ b ^ (2 * p)\nhi_bpowpsubone : 1 ≤ b ^ (p - 1)\np_odd : Odd p\nAB_not_prime : ¬Prime (A * B)\nAB_id : A * B = (b ^ (2 * p) - 1) / (b ^ 2 - 1)\nhd : b ^ 2 - 1 ∣ b ^ (2 * p) - 1\nha₁ : (b ^ 2 - 1) * (A * B - 1) = b * (b ^ (p - 1) - 1) * (b ^ p + b)\nha₂ : 2 ∣ b ^ p + b\nha₃ : p ∣ b ^ (p - 1) - 1\nha₄ : b ^ 2 - 1 ∣ b ^ (p - 1) - 1\nha₅ : 2 * p * (b ^ 2 - 1) ∣ (b ^ 2 - 1) * (A * B - 1)\nha₆ : 2 * p ∣ A * B - 1\n⊢ A * B ∣ b ^ (2 * p) - 1\n[PROOFSTEP]\nuse b ^ 2 - 1\n[GOAL]\ncase h\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nnot_dvd : ¬p ∣ b * (b ^ 2 - 1)\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nhi_A : 1 < A\nhi_B : 1 < B\nhi_AB : 1 < A * B\nhi_b : 0 < b\nhi_p : 1 ≤ p\nhi_bsquared : 0 < b ^ 2 - 1\nhi_bpowtwop : 1 ≤ b ^ (2 * p)\nhi_bpowpsubone : 1 ≤ b ^ (p - 1)\np_odd : Odd p\nAB_not_prime : ¬Prime (A * B)\nAB_id : A * B = (b ^ (2 * p) - 1) / (b ^ 2 - 1)\nhd : b ^ 2 - 1 ∣ b ^ (2 * p) - 1\nha₁ : (b ^ 2 - 1) * (A * B - 1) = b * (b ^ (p - 1) - 1) * (b ^ p + b)\nha₂ : 2 ∣ b ^ p + b\nha₃ : p ∣ b ^ (p - 1) - 1\nha₄ : b ^ 2 - 1 ∣ b ^ (p - 1) - 1\nha₅ : 2 * p * (b ^ 2 - 1) ∣ (b ^ 2 - 1) * (A * B - 1)\nha₆ : 2 * p ∣ A * B - 1\n⊢ b ^ (2 * p) - 1 = A * B * (b ^ 2 - 1)\n[PROOFSTEP]\nhave : A * B * (b ^ 2 - 1) = (b ^ (2 * p) - 1) / (b ^ 2 - 1) * (b ^ 2 - 1) :=\n  congr_arg (fun x : ℕ => x * (b ^ 2 - 1)) AB_id\n[GOAL]\ncase h\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nnot_dvd : ¬p ∣ b * (b ^ 2 - 1)\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nhi_A : 1 < A\nhi_B : 1 < B\nhi_AB : 1 < A * B\nhi_b : 0 < b\nhi_p : 1 ≤ p\nhi_bsquared : 0 < b ^ 2 - 1\nhi_bpowtwop : 1 ≤ b ^ (2 * p)\nhi_bpowpsubone : 1 ≤ b ^ (p - 1)\np_odd : Odd p\nAB_not_prime : ¬Prime (A * B)\nAB_id : A * B = (b ^ (2 * p) - 1) / (b ^ 2 - 1)\nhd : b ^ 2 - 1 ∣ b ^ (2 * p) - 1\nha₁ : (b ^ 2 - 1) * (A * B - 1) = b * (b ^ (p - 1) - 1) * (b ^ p + b)\nha₂ : 2 ∣ b ^ p + b\nha₃ : p ∣ b ^ (p - 1) - 1\nha₄ : b ^ 2 - 1 ∣ b ^ (p - 1) - 1\nha₅ : 2 * p * (b ^ 2 - 1) ∣ (b ^ 2 - 1) * (A * B - 1)\nha₆ : 2 * p ∣ A * B - 1\nthis : A * B * (b ^ 2 - 1) = (b ^ (2 * p) - 1) / (b ^ 2 - 1) * (b ^ 2 - 1)\n⊢ b ^ (2 * p) - 1 = A * B * (b ^ 2 - 1)\n[PROOFSTEP]\nsimpa only [add_comm, Nat.div_mul_cancel hd, Nat.sub_add_cancel hi_bpowtwop] using this.symm\n[GOAL]\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nnot_dvd : ¬p ∣ b * (b ^ 2 - 1)\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nhi_A : 1 < A\nhi_B : 1 < B\nhi_AB : 1 < A * B\nhi_b : 0 < b\nhi_p : 1 ≤ p\nhi_bsquared : 0 < b ^ 2 - 1\nhi_bpowtwop : 1 ≤ b ^ (2 * p)\nhi_bpowpsubone : 1 ≤ b ^ (p - 1)\np_odd : Odd p\nAB_not_prime : ¬Prime (A * B)\nAB_id : A * B = (b ^ (2 * p) - 1) / (b ^ 2 - 1)\nhd : b ^ 2 - 1 ∣ b ^ (2 * p) - 1\nha₁ : (b ^ 2 - 1) * (A * B - 1) = b * (b ^ (p - 1) - 1) * (b ^ p + b)\nha₂ : 2 ∣ b ^ p + b\nha₃ : p ∣ b ^ (p - 1) - 1\nha₄ : b ^ 2 - 1 ∣ b ^ (p - 1) - 1\nha₅ : 2 * p * (b ^ 2 - 1) ∣ (b ^ 2 - 1) * (A * B - 1)\nha₆ : 2 * p ∣ A * B - 1\nha₇ : A * B ∣ b ^ (2 * p) - 1\n⊢ ProbablePrime (A * B) b\n[PROOFSTEP]\ncases' ha₆ with q hq\n[GOAL]\ncase intro\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nnot_dvd : ¬p ∣ b * (b ^ 2 - 1)\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nhi_A : 1 < A\nhi_B : 1 < B\nhi_AB : 1 < A * B\nhi_b : 0 < b\nhi_p : 1 ≤ p\nhi_bsquared : 0 < b ^ 2 - 1\nhi_bpowtwop : 1 ≤ b ^ (2 * p)\nhi_bpowpsubone : 1 ≤ b ^ (p - 1)\np_odd : Odd p\nAB_not_prime : ¬Prime (A * B)\nAB_id : A * B = (b ^ (2 * p) - 1) / (b ^ 2 - 1)\nhd : b ^ 2 - 1 ∣ b ^ (2 * p) - 1\nha₁ : (b ^ 2 - 1) * (A * B - 1) = b * (b ^ (p - 1) - 1) * (b ^ p + b)\nha₂ : 2 ∣ b ^ p + b\nha₃ : p ∣ b ^ (p - 1) - 1\nha₄ : b ^ 2 - 1 ∣ b ^ (p - 1) - 1\nha₅ : 2 * p * (b ^ 2 - 1) ∣ (b ^ 2 - 1) * (A * B - 1)\nha₇ : A * B ∣ b ^ (2 * p) - 1\nq : ℕ\nhq : A * B - 1 = 2 * p * q\n⊢ ProbablePrime (A * B) b\n[PROOFSTEP]\nhave ha₈ : b ^ (2 * p) - 1 ∣ b ^ (A * B - 1) - 1 := by\n  simpa only [one_pow, pow_mul, hq] using nat_sub_dvd_pow_sub_pow _ 1 q\n[GOAL]\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nnot_dvd : ¬p ∣ b * (b ^ 2 - 1)\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nhi_A : 1 < A\nhi_B : 1 < B\nhi_AB : 1 < A * B\nhi_b : 0 < b\nhi_p : 1 ≤ p\nhi_bsquared : 0 < b ^ 2 - 1\nhi_bpowtwop : 1 ≤ b ^ (2 * p)\nhi_bpowpsubone : 1 ≤ b ^ (p - 1)\np_odd : Odd p\nAB_not_prime : ¬Prime (A * B)\nAB_id : A * B = (b ^ (2 * p) - 1) / (b ^ 2 - 1)\nhd : b ^ 2 - 1 ∣ b ^ (2 * p) - 1\nha₁ : (b ^ 2 - 1) * (A * B - 1) = b * (b ^ (p - 1) - 1) * (b ^ p + b)\nha₂ : 2 ∣ b ^ p + b\nha₃ : p ∣ b ^ (p - 1) - 1\nha₄ : b ^ 2 - 1 ∣ b ^ (p - 1) - 1\nha₅ : 2 * p * (b ^ 2 - 1) ∣ (b ^ 2 - 1) * (A * B - 1)\nha₇ : A * B ∣ b ^ (2 * p) - 1\nq : ℕ\nhq : A * B - 1 = 2 * p * q\n⊢ b ^ (2 * p) - 1 ∣ b ^ (A * B - 1) - 1\n[PROOFSTEP]\nsimpa only [one_pow, pow_mul, hq] using nat_sub_dvd_pow_sub_pow _ 1 q\n[GOAL]\ncase intro\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nnot_dvd : ¬p ∣ b * (b ^ 2 - 1)\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nhi_A : 1 < A\nhi_B : 1 < B\nhi_AB : 1 < A * B\nhi_b : 0 < b\nhi_p : 1 ≤ p\nhi_bsquared : 0 < b ^ 2 - 1\nhi_bpowtwop : 1 ≤ b ^ (2 * p)\nhi_bpowpsubone : 1 ≤ b ^ (p - 1)\np_odd : Odd p\nAB_not_prime : ¬Prime (A * B)\nAB_id : A * B = (b ^ (2 * p) - 1) / (b ^ 2 - 1)\nhd : b ^ 2 - 1 ∣ b ^ (2 * p) - 1\nha₁ : (b ^ 2 - 1) * (A * B - 1) = b * (b ^ (p - 1) - 1) * (b ^ p + b)\nha₂ : 2 ∣ b ^ p + b\nha₃ : p ∣ b ^ (p - 1) - 1\nha₄ : b ^ 2 - 1 ∣ b ^ (p - 1) - 1\nha₅ : 2 * p * (b ^ 2 - 1) ∣ (b ^ 2 - 1) * (A * B - 1)\nha₇ : A * B ∣ b ^ (2 * p) - 1\nq : ℕ\nhq : A * B - 1 = 2 * p * q\nha₈ : b ^ (2 * p) - 1 ∣ b ^ (A * B - 1) - 1\n⊢ ProbablePrime (A * B) b\n[PROOFSTEP]\nexact dvd_trans ha₇ ha₈\n[GOAL]\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\n⊢ p < Nat.psp_from_prime b p\n[PROOFSTEP]\nunfold psp_from_prime\n[GOAL]\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\n⊢ p < (b ^ p - 1) / (b - 1) * ((b ^ p + 1) / (b + 1))\n[PROOFSTEP]\nset A := (b ^ p - 1) / (b - 1)\n[GOAL]\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nA : ℕ := (b ^ p - 1) / (b - 1)\n⊢ p < A * ((b ^ p + 1) / (b + 1))\n[PROOFSTEP]\nset B := (b ^ p + 1) / (b + 1)\n[GOAL]\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\n⊢ p < A * B\n[PROOFSTEP]\nrw [show A * B = (b ^ (2 * p) - 1) / (b ^ 2 - 1) from\n    AB_id_helper _ _ b_ge_two (p_prime.odd_of_ne_two p_gt_two.ne.symm)]\n[GOAL]\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\n⊢ p < (b ^ (2 * p) - 1) / (b ^ 2 - 1)\n[PROOFSTEP]\nhave AB_dvd : b ^ 2 - 1 ∣ b ^ (2 * p) - 1 := by simpa only [one_pow, pow_mul] using nat_sub_dvd_pow_sub_pow _ 1 p\n[GOAL]\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\n⊢ b ^ 2 - 1 ∣ b ^ (2 * p) - 1\n[PROOFSTEP]\nsimpa only [one_pow, pow_mul] using nat_sub_dvd_pow_sub_pow _ 1 p\n[GOAL]\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nAB_dvd : b ^ 2 - 1 ∣ b ^ (2 * p) - 1\n⊢ p < (b ^ (2 * p) - 1) / (b ^ 2 - 1)\n[PROOFSTEP]\nsuffices h : p * (b ^ 2 - 1) < b ^ (2 * p) - 1\n[GOAL]\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nAB_dvd : b ^ 2 - 1 ∣ b ^ (2 * p) - 1\nh : p * (b ^ 2 - 1) < b ^ (2 * p) - 1\n⊢ p < (b ^ (2 * p) - 1) / (b ^ 2 - 1)\n[PROOFSTEP]\nhave h₁ : p * (b ^ 2 - 1) / (b ^ 2 - 1) < (b ^ (2 * p) - 1) / (b ^ 2 - 1) := Nat.div_lt_div_of_lt_of_dvd AB_dvd h\n[GOAL]\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nAB_dvd : b ^ 2 - 1 ∣ b ^ (2 * p) - 1\nh : p * (b ^ 2 - 1) < b ^ (2 * p) - 1\nh₁ : p * (b ^ 2 - 1) / (b ^ 2 - 1) < (b ^ (2 * p) - 1) / (b ^ 2 - 1)\n⊢ p < (b ^ (2 * p) - 1) / (b ^ 2 - 1)\n[PROOFSTEP]\nhave h₂ : 0 < b ^ 2 - 1 := by linarith [show 3 ≤ b ^ 2 - 1 from le_tsub_of_add_le_left (show 4 ≤ b ^ 2 by nlinarith)]\n[GOAL]\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nAB_dvd : b ^ 2 - 1 ∣ b ^ (2 * p) - 1\nh : p * (b ^ 2 - 1) < b ^ (2 * p) - 1\nh₁ : p * (b ^ 2 - 1) / (b ^ 2 - 1) < (b ^ (2 * p) - 1) / (b ^ 2 - 1)\n⊢ 0 < b ^ 2 - 1\n[PROOFSTEP]\nlinarith [show 3 ≤ b ^ 2 - 1 from le_tsub_of_add_le_left (show 4 ≤ b ^ 2 by nlinarith)]\n[GOAL]\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nAB_dvd : b ^ 2 - 1 ∣ b ^ (2 * p) - 1\nh : p * (b ^ 2 - 1) < b ^ (2 * p) - 1\nh₁ : p * (b ^ 2 - 1) / (b ^ 2 - 1) < (b ^ (2 * p) - 1) / (b ^ 2 - 1)\n⊢ 4 ≤ b ^ 2\n[PROOFSTEP]\nnlinarith\n[GOAL]\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nAB_dvd : b ^ 2 - 1 ∣ b ^ (2 * p) - 1\nh : p * (b ^ 2 - 1) < b ^ (2 * p) - 1\nh₁ : p * (b ^ 2 - 1) / (b ^ 2 - 1) < (b ^ (2 * p) - 1) / (b ^ 2 - 1)\nh₂ : 0 < b ^ 2 - 1\n⊢ p < (b ^ (2 * p) - 1) / (b ^ 2 - 1)\n[PROOFSTEP]\nrwa [Nat.mul_div_cancel _ h₂] at h₁ \n[GOAL]\ncase h\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nAB_dvd : b ^ 2 - 1 ∣ b ^ (2 * p) - 1\n⊢ p * (b ^ 2 - 1) < b ^ (2 * p) - 1\n[PROOFSTEP]\nrw [Nat.mul_sub_left_distrib, mul_one, pow_mul]\n[GOAL]\ncase h\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nAB_dvd : b ^ 2 - 1 ∣ b ^ (2 * p) - 1\n⊢ p * b ^ 2 - p < (b ^ 2) ^ p - 1\n[PROOFSTEP]\nconv_rhs => rw [← Nat.sub_add_cancel (show 1 ≤ p by linarith)]\n[GOAL]\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nAB_dvd : b ^ 2 - 1 ∣ b ^ (2 * p) - 1\n| (b ^ 2) ^ p - 1\n[PROOFSTEP]\nrw [← Nat.sub_add_cancel (show 1 ≤ p by linarith)]\n[GOAL]\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nAB_dvd : b ^ 2 - 1 ∣ b ^ (2 * p) - 1\n| (b ^ 2) ^ p - 1\n[PROOFSTEP]\nrw [← Nat.sub_add_cancel (show 1 ≤ p by linarith)]\n[GOAL]\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nAB_dvd : b ^ 2 - 1 ∣ b ^ (2 * p) - 1\n| (b ^ 2) ^ p - 1\n[PROOFSTEP]\nrw [← Nat.sub_add_cancel (show 1 ≤ p by linarith)]\n[GOAL]\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nAB_dvd : b ^ 2 - 1 ∣ b ^ (2 * p) - 1\n⊢ 1 ≤ p\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase h\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nAB_dvd : b ^ 2 - 1 ∣ b ^ (2 * p) - 1\n⊢ p * b ^ 2 - p < (b ^ 2) ^ (p - 1 + 1) - 1\n[PROOFSTEP]\nrw [pow_succ (b ^ 2)]\n[GOAL]\ncase h\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nAB_dvd : b ^ 2 - 1 ∣ b ^ (2 * p) - 1\n⊢ p * b ^ 2 - p < (b ^ 2) ^ (p - 1) * b ^ 2 - 1\n[PROOFSTEP]\nsuffices h : p * b ^ 2 < (b ^ 2) ^ (p - 1) * b ^ 2\n[GOAL]\ncase h\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nAB_dvd : b ^ 2 - 1 ∣ b ^ (2 * p) - 1\nh : p * b ^ 2 < (b ^ 2) ^ (p - 1) * b ^ 2\n⊢ p * b ^ 2 - p < (b ^ 2) ^ (p - 1) * b ^ 2 - 1\n[PROOFSTEP]\napply gt_of_ge_of_gt\n[GOAL]\ncase h.h₁\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nAB_dvd : b ^ 2 - 1 ∣ b ^ (2 * p) - 1\nh : p * b ^ 2 < (b ^ 2) ^ (p - 1) * b ^ 2\n⊢ (b ^ 2) ^ (p - 1) * b ^ 2 - 1 ≥ ?h.b\n[PROOFSTEP]\nexact tsub_le_tsub_left (one_le_of_lt p_gt_two) ((b ^ 2) ^ (p - 1) * b ^ 2)\n[GOAL]\ncase h.h₂\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nAB_dvd : b ^ 2 - 1 ∣ b ^ (2 * p) - 1\nh : p * b ^ 2 < (b ^ 2) ^ (p - 1) * b ^ 2\n⊢ (b ^ 2) ^ (p - 1) * b ^ 2 - p > p * b ^ 2 - p\n[PROOFSTEP]\nhave : p ≤ p * b ^ 2 := Nat.le_mul_of_pos_right (show 0 < b ^ 2 by nlinarith)\n[GOAL]\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nAB_dvd : b ^ 2 - 1 ∣ b ^ (2 * p) - 1\nh : p * b ^ 2 < (b ^ 2) ^ (p - 1) * b ^ 2\n⊢ 0 < b ^ 2\n[PROOFSTEP]\nnlinarith\n[GOAL]\ncase h.h₂\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nAB_dvd : b ^ 2 - 1 ∣ b ^ (2 * p) - 1\nh : p * b ^ 2 < (b ^ 2) ^ (p - 1) * b ^ 2\nthis : p ≤ p * b ^ 2\n⊢ (b ^ 2) ^ (p - 1) * b ^ 2 - p > p * b ^ 2 - p\n[PROOFSTEP]\nexact tsub_lt_tsub_right_of_le this h\n[GOAL]\ncase h\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nAB_dvd : b ^ 2 - 1 ∣ b ^ (2 * p) - 1\n⊢ p * b ^ 2 < (b ^ 2) ^ (p - 1) * b ^ 2\n[PROOFSTEP]\nsuffices h : p < (b ^ 2) ^ (p - 1)\n[GOAL]\ncase h\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nAB_dvd : b ^ 2 - 1 ∣ b ^ (2 * p) - 1\nh : p < (b ^ 2) ^ (p - 1)\n⊢ p * b ^ 2 < (b ^ 2) ^ (p - 1) * b ^ 2\n[PROOFSTEP]\nhave : 4 ≤ b ^ 2 := by nlinarith\n[GOAL]\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nAB_dvd : b ^ 2 - 1 ∣ b ^ (2 * p) - 1\nh : p < (b ^ 2) ^ (p - 1)\n⊢ 4 ≤ b ^ 2\n[PROOFSTEP]\nnlinarith\n[GOAL]\ncase h\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nAB_dvd : b ^ 2 - 1 ∣ b ^ (2 * p) - 1\nh : p < (b ^ 2) ^ (p - 1)\nthis : 4 ≤ b ^ 2\n⊢ p * b ^ 2 < (b ^ 2) ^ (p - 1) * b ^ 2\n[PROOFSTEP]\nhave : 0 < b ^ 2 := by linarith\n[GOAL]\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nAB_dvd : b ^ 2 - 1 ∣ b ^ (2 * p) - 1\nh : p < (b ^ 2) ^ (p - 1)\nthis : 4 ≤ b ^ 2\n⊢ 0 < b ^ 2\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase h\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nAB_dvd : b ^ 2 - 1 ∣ b ^ (2 * p) - 1\nh : p < (b ^ 2) ^ (p - 1)\nthis✝ : 4 ≤ b ^ 2\nthis : 0 < b ^ 2\n⊢ p * b ^ 2 < (b ^ 2) ^ (p - 1) * b ^ 2\n[PROOFSTEP]\nexact mul_lt_mul_of_pos_right h this\n[GOAL]\ncase h\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nAB_dvd : b ^ 2 - 1 ∣ b ^ (2 * p) - 1\n⊢ p < (b ^ 2) ^ (p - 1)\n[PROOFSTEP]\nrw [← pow_mul, Nat.mul_sub_left_distrib, mul_one]\n[GOAL]\ncase h\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nAB_dvd : b ^ 2 - 1 ∣ b ^ (2 * p) - 1\n⊢ p < b ^ (2 * p - 2)\n[PROOFSTEP]\nhave : 2 ≤ 2 * p - 2 := le_tsub_of_add_le_left (show 4 ≤ 2 * p by linarith)\n[GOAL]\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nAB_dvd : b ^ 2 - 1 ∣ b ^ (2 * p) - 1\n⊢ 4 ≤ 2 * p\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase h\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nAB_dvd : b ^ 2 - 1 ∣ b ^ (2 * p) - 1\nthis : 2 ≤ 2 * p - 2\n⊢ p < b ^ (2 * p - 2)\n[PROOFSTEP]\nhave : 2 + p ≤ 2 * p := by linarith\n[GOAL]\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nAB_dvd : b ^ 2 - 1 ∣ b ^ (2 * p) - 1\nthis : 2 ≤ 2 * p - 2\n⊢ 2 + p ≤ 2 * p\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase h\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nAB_dvd : b ^ 2 - 1 ∣ b ^ (2 * p) - 1\nthis✝ : 2 ≤ 2 * p - 2\nthis : 2 + p ≤ 2 * p\n⊢ p < b ^ (2 * p - 2)\n[PROOFSTEP]\nhave : p ≤ 2 * p - 2 := le_tsub_of_add_le_left this\n[GOAL]\ncase h\nb : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\np_prime : Prime p\np_gt_two : 2 < p\nA : ℕ := (b ^ p - 1) / (b - 1)\nB : ℕ := (b ^ p + 1) / (b + 1)\nAB_dvd : b ^ 2 - 1 ∣ b ^ (2 * p) - 1\nthis✝¹ : 2 ≤ 2 * p - 2\nthis✝ : 2 + p ≤ 2 * p\nthis : p ≤ 2 * p - 2\n⊢ p < b ^ (2 * p - 2)\n[PROOFSTEP]\nexact Nat.lt_of_le_of_lt this (pow_gt_exponent _ b_ge_two)\n[GOAL]\nb : ℕ\nh : 1 ≤ b\nm : ℕ\n⊢ ∃ n, FermatPsp n b ∧ m ≤ n\n[PROOFSTEP]\nby_cases b_ge_two : 2 ≤ b\n[GOAL]\ncase pos\nb : ℕ\nh : 1 ≤ b\nm : ℕ\nb_ge_two : 2 ≤ b\n⊢ ∃ n, FermatPsp n b ∧ m ≤ n\n[PROOFSTEP]\nhave h := Nat.exists_infinite_primes (b * (b ^ 2 - 1) + 1 + m)\n[GOAL]\ncase pos\nb : ℕ\nh✝ : 1 ≤ b\nm : ℕ\nb_ge_two : 2 ≤ b\nh : ∃ p, b * (b ^ 2 - 1) + 1 + m ≤ p ∧ Prime p\n⊢ ∃ n, FermatPsp n b ∧ m ≤ n\n[PROOFSTEP]\ncases' h with p hp\n[GOAL]\ncase pos.intro\nb : ℕ\nh : 1 ≤ b\nm : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\nhp : b * (b ^ 2 - 1) + 1 + m ≤ p ∧ Prime p\n⊢ ∃ n, FermatPsp n b ∧ m ≤ n\n[PROOFSTEP]\ncases' hp with hp₁ hp₂\n[GOAL]\ncase pos.intro.intro\nb : ℕ\nh : 1 ≤ b\nm : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\nhp₁ : b * (b ^ 2 - 1) + 1 + m ≤ p\nhp₂ : Prime p\n⊢ ∃ n, FermatPsp n b ∧ m ≤ n\n[PROOFSTEP]\nhave h₁ : 0 < b := pos_of_gt (Nat.succ_le_iff.mp b_ge_two)\n[GOAL]\ncase pos.intro.intro\nb : ℕ\nh : 1 ≤ b\nm : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\nhp₁ : b * (b ^ 2 - 1) + 1 + m ≤ p\nhp₂ : Prime p\nh₁ : 0 < b\n⊢ ∃ n, FermatPsp n b ∧ m ≤ n\n[PROOFSTEP]\nhave h₂ : 4 ≤ b ^ 2 := pow_le_pow_of_le_left' b_ge_two 2\n[GOAL]\ncase pos.intro.intro\nb : ℕ\nh : 1 ≤ b\nm : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\nhp₁ : b * (b ^ 2 - 1) + 1 + m ≤ p\nhp₂ : Prime p\nh₁ : 0 < b\nh₂ : 4 ≤ b ^ 2\n⊢ ∃ n, FermatPsp n b ∧ m ≤ n\n[PROOFSTEP]\nhave h₃ : 0 < b ^ 2 - 1 := tsub_pos_of_lt (gt_of_ge_of_gt h₂ (by norm_num))\n[GOAL]\nb : ℕ\nh : 1 ≤ b\nm : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\nhp₁ : b * (b ^ 2 - 1) + 1 + m ≤ p\nhp₂ : Prime p\nh₁ : 0 < b\nh₂ : 4 ≤ b ^ 2\n⊢ 4 > 1\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase pos.intro.intro\nb : ℕ\nh : 1 ≤ b\nm : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\nhp₁ : b * (b ^ 2 - 1) + 1 + m ≤ p\nhp₂ : Prime p\nh₁ : 0 < b\nh₂ : 4 ≤ b ^ 2\nh₃ : 0 < b ^ 2 - 1\n⊢ ∃ n, FermatPsp n b ∧ m ≤ n\n[PROOFSTEP]\nhave h₄ : 0 < b * (b ^ 2 - 1) := mul_pos h₁ h₃\n[GOAL]\ncase pos.intro.intro\nb : ℕ\nh : 1 ≤ b\nm : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\nhp₁ : b * (b ^ 2 - 1) + 1 + m ≤ p\nhp₂ : Prime p\nh₁ : 0 < b\nh₂ : 4 ≤ b ^ 2\nh₃ : 0 < b ^ 2 - 1\nh₄ : 0 < b * (b ^ 2 - 1)\n⊢ ∃ n, FermatPsp n b ∧ m ≤ n\n[PROOFSTEP]\nhave h₅ : b * (b ^ 2 - 1) < p := by linarith\n[GOAL]\nb : ℕ\nh : 1 ≤ b\nm : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\nhp₁ : b * (b ^ 2 - 1) + 1 + m ≤ p\nhp₂ : Prime p\nh₁ : 0 < b\nh₂ : 4 ≤ b ^ 2\nh₃ : 0 < b ^ 2 - 1\nh₄ : 0 < b * (b ^ 2 - 1)\n⊢ b * (b ^ 2 - 1) < p\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase pos.intro.intro\nb : ℕ\nh : 1 ≤ b\nm : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\nhp₁ : b * (b ^ 2 - 1) + 1 + m ≤ p\nhp₂ : Prime p\nh₁ : 0 < b\nh₂ : 4 ≤ b ^ 2\nh₃ : 0 < b ^ 2 - 1\nh₄ : 0 < b * (b ^ 2 - 1)\nh₅ : b * (b ^ 2 - 1) < p\n⊢ ∃ n, FermatPsp n b ∧ m ≤ n\n[PROOFSTEP]\nhave h₆ : ¬p ∣ b * (b ^ 2 - 1) := Nat.not_dvd_of_pos_of_lt h₄ h₅\n[GOAL]\ncase pos.intro.intro\nb : ℕ\nh : 1 ≤ b\nm : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\nhp₁ : b * (b ^ 2 - 1) + 1 + m ≤ p\nhp₂ : Prime p\nh₁ : 0 < b\nh₂ : 4 ≤ b ^ 2\nh₃ : 0 < b ^ 2 - 1\nh₄ : 0 < b * (b ^ 2 - 1)\nh₅ : b * (b ^ 2 - 1) < p\nh₆ : ¬p ∣ b * (b ^ 2 - 1)\n⊢ ∃ n, FermatPsp n b ∧ m ≤ n\n[PROOFSTEP]\nhave h₇ : b ≤ b * (b ^ 2 - 1) := Nat.le_mul_of_pos_right h₃\n[GOAL]\ncase pos.intro.intro\nb : ℕ\nh : 1 ≤ b\nm : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\nhp₁ : b * (b ^ 2 - 1) + 1 + m ≤ p\nhp₂ : Prime p\nh₁ : 0 < b\nh₂ : 4 ≤ b ^ 2\nh₃ : 0 < b ^ 2 - 1\nh₄ : 0 < b * (b ^ 2 - 1)\nh₅ : b * (b ^ 2 - 1) < p\nh₆ : ¬p ∣ b * (b ^ 2 - 1)\nh₇ : b ≤ b * (b ^ 2 - 1)\n⊢ ∃ n, FermatPsp n b ∧ m ≤ n\n[PROOFSTEP]\nhave h₈ : 2 ≤ b * (b ^ 2 - 1) := le_trans b_ge_two h₇\n[GOAL]\ncase pos.intro.intro\nb : ℕ\nh : 1 ≤ b\nm : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\nhp₁ : b * (b ^ 2 - 1) + 1 + m ≤ p\nhp₂ : Prime p\nh₁ : 0 < b\nh₂ : 4 ≤ b ^ 2\nh₃ : 0 < b ^ 2 - 1\nh₄ : 0 < b * (b ^ 2 - 1)\nh₅ : b * (b ^ 2 - 1) < p\nh₆ : ¬p ∣ b * (b ^ 2 - 1)\nh₇ : b ≤ b * (b ^ 2 - 1)\nh₈ : 2 ≤ b * (b ^ 2 - 1)\n⊢ ∃ n, FermatPsp n b ∧ m ≤ n\n[PROOFSTEP]\nhave h₉ : 2 < p := gt_of_gt_of_ge h₅ h₈\n[GOAL]\ncase pos.intro.intro\nb : ℕ\nh : 1 ≤ b\nm : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\nhp₁ : b * (b ^ 2 - 1) + 1 + m ≤ p\nhp₂ : Prime p\nh₁ : 0 < b\nh₂ : 4 ≤ b ^ 2\nh₃ : 0 < b ^ 2 - 1\nh₄ : 0 < b * (b ^ 2 - 1)\nh₅ : b * (b ^ 2 - 1) < p\nh₆ : ¬p ∣ b * (b ^ 2 - 1)\nh₇ : b ≤ b * (b ^ 2 - 1)\nh₈ : 2 ≤ b * (b ^ 2 - 1)\nh₉ : 2 < p\n⊢ ∃ n, FermatPsp n b ∧ m ≤ n\n[PROOFSTEP]\nhave h₁₀ := psp_from_prime_gt_p b_ge_two hp₂ h₉\n[GOAL]\ncase pos.intro.intro\nb : ℕ\nh : 1 ≤ b\nm : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\nhp₁ : b * (b ^ 2 - 1) + 1 + m ≤ p\nhp₂ : Prime p\nh₁ : 0 < b\nh₂ : 4 ≤ b ^ 2\nh₃ : 0 < b ^ 2 - 1\nh₄ : 0 < b * (b ^ 2 - 1)\nh₅ : b * (b ^ 2 - 1) < p\nh₆ : ¬p ∣ b * (b ^ 2 - 1)\nh₇ : b ≤ b * (b ^ 2 - 1)\nh₈ : 2 ≤ b * (b ^ 2 - 1)\nh₉ : 2 < p\nh₁₀ : p < Nat.psp_from_prime b p\n⊢ ∃ n, FermatPsp n b ∧ m ≤ n\n[PROOFSTEP]\nuse psp_from_prime b p\n[GOAL]\ncase h\nb : ℕ\nh : 1 ≤ b\nm : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\nhp₁ : b * (b ^ 2 - 1) + 1 + m ≤ p\nhp₂ : Prime p\nh₁ : 0 < b\nh₂ : 4 ≤ b ^ 2\nh₃ : 0 < b ^ 2 - 1\nh₄ : 0 < b * (b ^ 2 - 1)\nh₅ : b * (b ^ 2 - 1) < p\nh₆ : ¬p ∣ b * (b ^ 2 - 1)\nh₇ : b ≤ b * (b ^ 2 - 1)\nh₈ : 2 ≤ b * (b ^ 2 - 1)\nh₉ : 2 < p\nh₁₀ : p < Nat.psp_from_prime b p\n⊢ FermatPsp (Nat.psp_from_prime b p) b ∧ m ≤ Nat.psp_from_prime b p\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.left\nb : ℕ\nh : 1 ≤ b\nm : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\nhp₁ : b * (b ^ 2 - 1) + 1 + m ≤ p\nhp₂ : Prime p\nh₁ : 0 < b\nh₂ : 4 ≤ b ^ 2\nh₃ : 0 < b ^ 2 - 1\nh₄ : 0 < b * (b ^ 2 - 1)\nh₅ : b * (b ^ 2 - 1) < p\nh₆ : ¬p ∣ b * (b ^ 2 - 1)\nh₇ : b ≤ b * (b ^ 2 - 1)\nh₈ : 2 ≤ b * (b ^ 2 - 1)\nh₉ : 2 < p\nh₁₀ : p < Nat.psp_from_prime b p\n⊢ FermatPsp (Nat.psp_from_prime b p) b\n[PROOFSTEP]\nexact psp_from_prime_psp b_ge_two hp₂ h₉ h₆\n[GOAL]\ncase h.right\nb : ℕ\nh : 1 ≤ b\nm : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\nhp₁ : b * (b ^ 2 - 1) + 1 + m ≤ p\nhp₂ : Prime p\nh₁ : 0 < b\nh₂ : 4 ≤ b ^ 2\nh₃ : 0 < b ^ 2 - 1\nh₄ : 0 < b * (b ^ 2 - 1)\nh₅ : b * (b ^ 2 - 1) < p\nh₆ : ¬p ∣ b * (b ^ 2 - 1)\nh₇ : b ≤ b * (b ^ 2 - 1)\nh₈ : 2 ≤ b * (b ^ 2 - 1)\nh₉ : 2 < p\nh₁₀ : p < Nat.psp_from_prime b p\n⊢ m ≤ Nat.psp_from_prime b p\n[PROOFSTEP]\nexact\n  le_trans (show m ≤ p by linarith)\n    (le_of_lt h₁₀)\n      -- If `¬2 ≤ b`, then `b = 1`. Since all composite numbers are pseudoprimes to base 1, we can pick\n        -- any composite number greater than m. We choose `2 * (m + 2)` because it is greater than `m` and\n        -- is composite for all natural numbers `m`.\n[GOAL]\nb : ℕ\nh : 1 ≤ b\nm : ℕ\nb_ge_two : 2 ≤ b\np : ℕ\nhp₁ : b * (b ^ 2 - 1) + 1 + m ≤ p\nhp₂ : Prime p\nh₁ : 0 < b\nh₂ : 4 ≤ b ^ 2\nh₃ : 0 < b ^ 2 - 1\nh₄ : 0 < b * (b ^ 2 - 1)\nh₅ : b * (b ^ 2 - 1) < p\nh₆ : ¬p ∣ b * (b ^ 2 - 1)\nh₇ : b ≤ b * (b ^ 2 - 1)\nh₈ : 2 ≤ b * (b ^ 2 - 1)\nh₉ : 2 < p\nh₁₀ : p < Nat.psp_from_prime b p\n⊢ m ≤ p\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase neg\nb : ℕ\nh : 1 ≤ b\nm : ℕ\nb_ge_two : ¬2 ≤ b\n⊢ ∃ n, FermatPsp n b ∧ m ≤ n\n[PROOFSTEP]\nhave h₁ : b = 1 := by linarith\n[GOAL]\nb : ℕ\nh : 1 ≤ b\nm : ℕ\nb_ge_two : ¬2 ≤ b\n⊢ b = 1\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase neg\nb : ℕ\nh : 1 ≤ b\nm : ℕ\nb_ge_two : ¬2 ≤ b\nh₁ : b = 1\n⊢ ∃ n, FermatPsp n b ∧ m ≤ n\n[PROOFSTEP]\nrw [h₁]\n[GOAL]\ncase neg\nb : ℕ\nh : 1 ≤ b\nm : ℕ\nb_ge_two : ¬2 ≤ b\nh₁ : b = 1\n⊢ ∃ n, FermatPsp n 1 ∧ m ≤ n\n[PROOFSTEP]\nuse 2 * (m + 2)\n[GOAL]\ncase h\nb : ℕ\nh : 1 ≤ b\nm : ℕ\nb_ge_two : ¬2 ≤ b\nh₁ : b = 1\n⊢ FermatPsp (2 * (m + 2)) 1 ∧ m ≤ 2 * (m + 2)\n[PROOFSTEP]\nhave : ¬Nat.Prime (2 * (m + 2)) := Nat.not_prime_mul (by norm_num) (by norm_num)\n[GOAL]\nb : ℕ\nh : 1 ≤ b\nm : ℕ\nb_ge_two : ¬2 ≤ b\nh₁ : b = 1\n⊢ 1 < 2\n[PROOFSTEP]\nnorm_num\n[GOAL]\nb : ℕ\nh : 1 ≤ b\nm : ℕ\nb_ge_two : ¬2 ≤ b\nh₁ : b = 1\n⊢ 1 < m + 2\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase h\nb : ℕ\nh : 1 ≤ b\nm : ℕ\nb_ge_two : ¬2 ≤ b\nh₁ : b = 1\nthis : ¬Prime (2 * (m + 2))\n⊢ FermatPsp (2 * (m + 2)) 1 ∧ m ≤ 2 * (m + 2)\n[PROOFSTEP]\nexact ⟨fermatPsp_base_one (by linarith) this, by linarith⟩\n[GOAL]\nb : ℕ\nh : 1 ≤ b\nm : ℕ\nb_ge_two : ¬2 ≤ b\nh₁ : b = 1\nthis : ¬Prime (2 * (m + 2))\n⊢ 1 < 2 * (m + 2)\n[PROOFSTEP]\nlinarith\n[GOAL]\nb : ℕ\nh : 1 ≤ b\nm : ℕ\nb_ge_two : ¬2 ≤ b\nh₁ : b = 1\nthis : ¬Prime (2 * (m + 2))\n⊢ m ≤ 2 * (m + 2)\n[PROOFSTEP]\nlinarith\n[GOAL]\nb : ℕ\nh : 1 ≤ b\n⊢ ∃ᶠ (n : ℕ) in Filter.atTop, FermatPsp n b\n[PROOFSTEP]\nrefine' Filter.frequently_atTop.2 fun n => _\n[GOAL]\nb : ℕ\nh : 1 ≤ b\nn : ℕ\n⊢ ∃ b_1, b_1 ≥ n ∧ FermatPsp b_1 b\n[PROOFSTEP]\nobtain ⟨p, hp⟩ := exists_infinite_pseudoprimes h n\n[GOAL]\ncase intro\nb : ℕ\nh : 1 ≤ b\nn p : ℕ\nhp : FermatPsp p b ∧ n ≤ p\n⊢ ∃ b_1, b_1 ≥ n ∧ FermatPsp b_1 b\n[PROOFSTEP]\nexact ⟨p, hp.2, hp.1⟩\n", "meta": {"mathlib_filename": "Mathlib.NumberTheory.FermatPsp", "llama_tokens": 46117, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8244619091240701, "lm_q2_score": 0.6261241772283034, "lm_q1q2_score": 0.5162155345063847}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\nl : List α\n⊢ join [l] = l\n[PROOFSTEP]\nrw [join, join, append_nil]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nl : List α\nL : List (List α)\n⊢ join (l :: L) = [] ↔ ∀ (l_1 : List α), l_1 ∈ l :: L → l_1 = []\n[PROOFSTEP]\nsimp only [join, append_eq_nil, join_eq_nil, forall_mem_cons]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nL₁ L₂ : List (List α)\n⊢ join (L₁ ++ L₂) = join L₁ ++ join L₂\n[PROOFSTEP]\ninduction L₁\n[GOAL]\ncase nil\nα : Type u_1\nβ : Type u_2\nL₂ : List (List α)\n⊢ join ([] ++ L₂) = join [] ++ join L₂\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\nα : Type u_1\nβ : Type u_2\nL₂ : List (List α)\nhead✝ : List α\ntail✝ : List (List α)\ntail_ih✝ : join (tail✝ ++ L₂) = join tail✝ ++ join L₂\n⊢ join (head✝ :: tail✝ ++ L₂) = join (head✝ :: tail✝) ++ join L₂\n[PROOFSTEP]\nsimp [*]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nL : List (List α)\nl : List α\n⊢ join (concat L l) = join L ++ l\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : DecidablePred fun l => isEmpty l = false\nL : List (List α)\n⊢ join (filter (fun l => decide (isEmpty l = false)) ([] :: L)) = join ([] :: L)\n[PROOFSTEP]\nsimp [join_filter_isEmpty_eq_false (L := L), isEmpty_iff_eq_nil]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : DecidablePred fun l => isEmpty l = false\na : α\nl : List α\nL : List (List α)\n⊢ join (filter (fun l => decide (isEmpty l = false)) ((a :: l) :: L)) = join ((a :: l) :: L)\n[PROOFSTEP]\nhave cons_not_empty : isEmpty (a :: l) = false := rfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : DecidablePred fun l => isEmpty l = false\na : α\nl : List α\nL : List (List α)\ncons_not_empty : isEmpty (a :: l) = false\n⊢ join (filter (fun l => decide (isEmpty l = false)) ((a :: l) :: L)) = join ((a :: l) :: L)\n[PROOFSTEP]\nsimp [join_filter_isEmpty_eq_false (L := L), cons_not_empty]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : DecidablePred fun l => l ≠ []\nL : List (List α)\n⊢ join (filter (fun l => decide (l ≠ [])) L) = join L\n[PROOFSTEP]\nsimp [join_filter_isEmpty_eq_false, ← isEmpty_iff_eq_nil]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nl : List (List (List α))\n⊢ join (join l) = join (map join l)\n[PROOFSTEP]\ninduction l\n[GOAL]\ncase nil\nα : Type u_1\nβ : Type u_2\n⊢ join (join []) = join (map join [])\n[PROOFSTEP]\nsimp [*]\n[GOAL]\ncase cons\nα : Type u_1\nβ : Type u_2\nhead✝ : List (List α)\ntail✝ : List (List (List α))\ntail_ih✝ : join (join tail✝) = join (map join tail✝)\n⊢ join (join (head✝ :: tail✝)) = join (map join (head✝ :: tail✝))\n[PROOFSTEP]\nsimp [*]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nL : List (List α)\n⊢ length (join L) = sum (map length L)\n[PROOFSTEP]\ninduction L <;> [rfl; simp only [*, join, map, sum_cons, length_append]]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nL : List (List α)\n⊢ length (join L) = sum (map length L)\n[PROOFSTEP]\ninduction L\n[GOAL]\ncase nil\nα : Type u_1\nβ : Type u_2\n⊢ length (join []) = sum (map length [])\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\nα : Type u_1\nβ : Type u_2\nhead✝ : List α\ntail✝ : List (List α)\ntail_ih✝ : length (join tail✝) = sum (map length tail✝)\n⊢ length (join (head✝ :: tail✝)) = sum (map length (head✝ :: tail✝))\n[PROOFSTEP]\nsimp only [*, join, map, sum_cons, length_append]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nl : List α\nf : α → List β\n⊢ length (List.bind l f) = sum (map (length ∘ f) l)\n[PROOFSTEP]\nrw [List.bind, length_join, map_map]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nl : List α\nf : α → List β\n⊢ (∀ (l_1 : List β), l_1 ∈ map f l → l_1 = []) ↔ ∀ (x : α), x ∈ l → f x = []\n[PROOFSTEP]\nsimp only [mem_map, forall_exists_index, and_imp, forall_apply_eq_imp_iff₂]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nL : List (List α)\ni : ℕ\n⊢ take (sum (take i (map length L))) (join L) = join (take i L)\n[PROOFSTEP]\ninduction L generalizing i\n[GOAL]\ncase nil\nα : Type u_1\nβ : Type u_2\ni : ℕ\n⊢ take (sum (take i (map length []))) (join []) = join (take i [])\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\nα : Type u_1\nβ : Type u_2\nhead✝ : List α\ntail✝ : List (List α)\ntail_ih✝ : ∀ (i : ℕ), take (sum (take i (map length tail✝))) (join tail✝) = join (take i tail✝)\ni : ℕ\n⊢ take (sum (take i (map length (head✝ :: tail✝)))) (join (head✝ :: tail✝)) = join (take i (head✝ :: tail✝))\n[PROOFSTEP]\ncases i\n[GOAL]\ncase cons.zero\nα : Type u_1\nβ : Type u_2\nhead✝ : List α\ntail✝ : List (List α)\ntail_ih✝ : ∀ (i : ℕ), take (sum (take i (map length tail✝))) (join tail✝) = join (take i tail✝)\n⊢ take (sum (take Nat.zero (map length (head✝ :: tail✝)))) (join (head✝ :: tail✝)) =\n    join (take Nat.zero (head✝ :: tail✝))\n[PROOFSTEP]\nsimp [take_append, *]\n[GOAL]\ncase cons.succ\nα : Type u_1\nβ : Type u_2\nhead✝ : List α\ntail✝ : List (List α)\ntail_ih✝ : ∀ (i : ℕ), take (sum (take i (map length tail✝))) (join tail✝) = join (take i tail✝)\nn✝ : ℕ\n⊢ take (sum (take (Nat.succ n✝) (map length (head✝ :: tail✝)))) (join (head✝ :: tail✝)) =\n    join (take (Nat.succ n✝) (head✝ :: tail✝))\n[PROOFSTEP]\nsimp [take_append, *]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nL : List (List α)\ni : ℕ\n⊢ drop (sum (take i (map length L))) (join L) = join (drop i L)\n[PROOFSTEP]\ninduction L generalizing i\n[GOAL]\ncase nil\nα : Type u_1\nβ : Type u_2\ni : ℕ\n⊢ drop (sum (take i (map length []))) (join []) = join (drop i [])\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\nα : Type u_1\nβ : Type u_2\nhead✝ : List α\ntail✝ : List (List α)\ntail_ih✝ : ∀ (i : ℕ), drop (sum (take i (map length tail✝))) (join tail✝) = join (drop i tail✝)\ni : ℕ\n⊢ drop (sum (take i (map length (head✝ :: tail✝)))) (join (head✝ :: tail✝)) = join (drop i (head✝ :: tail✝))\n[PROOFSTEP]\ncases i\n[GOAL]\ncase cons.zero\nα : Type u_1\nβ : Type u_2\nhead✝ : List α\ntail✝ : List (List α)\ntail_ih✝ : ∀ (i : ℕ), drop (sum (take i (map length tail✝))) (join tail✝) = join (drop i tail✝)\n⊢ drop (sum (take Nat.zero (map length (head✝ :: tail✝)))) (join (head✝ :: tail✝)) =\n    join (drop Nat.zero (head✝ :: tail✝))\n[PROOFSTEP]\nsimp [drop_append, *]\n[GOAL]\ncase cons.succ\nα : Type u_1\nβ : Type u_2\nhead✝ : List α\ntail✝ : List (List α)\ntail_ih✝ : ∀ (i : ℕ), drop (sum (take i (map length tail✝))) (join tail✝) = join (drop i tail✝)\nn✝ : ℕ\n⊢ drop (sum (take (Nat.succ n✝) (map length (head✝ :: tail✝)))) (join (head✝ :: tail✝)) =\n    join (drop (Nat.succ n✝) (head✝ :: tail✝))\n[PROOFSTEP]\nsimp [drop_append, *]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nL : List α\ni : Fin (length L)\n⊢ drop (↑i) (take (↑i + 1) L) = [get L i]\n[PROOFSTEP]\ninduction' L with head tail ih\n[GOAL]\ncase nil\nα : Type u_1\nβ : Type u_2\nL : List α\ni✝ : Fin (length L)\ni : Fin (length [])\n⊢ drop (↑i) (take (↑i + 1) []) = [get [] i]\n[PROOFSTEP]\nexact (Nat.not_succ_le_zero i i.isLt).elim\n[GOAL]\ncase cons\nα : Type u_1\nβ : Type u_2\nL : List α\ni✝ : Fin (length L)\nhead : α\ntail : List α\nih : ∀ (i : Fin (length tail)), drop (↑i) (take (↑i + 1) tail) = [get tail i]\ni : Fin (length (head :: tail))\n⊢ drop (↑i) (take (↑i + 1) (head :: tail)) = [get (head :: tail) i]\n[PROOFSTEP]\nrcases i with ⟨_ | i, hi⟩\n[GOAL]\ncase cons.mk.zero\nα : Type u_1\nβ : Type u_2\nL : List α\ni : Fin (length L)\nhead : α\ntail : List α\nih : ∀ (i : Fin (length tail)), drop (↑i) (take (↑i + 1) tail) = [get tail i]\nhi : Nat.zero < length (head :: tail)\n⊢ drop (↑{ val := Nat.zero, isLt := hi }) (take (↑{ val := Nat.zero, isLt := hi } + 1) (head :: tail)) =\n    [get (head :: tail) { val := Nat.zero, isLt := hi }]\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons.mk.succ\nα : Type u_1\nβ : Type u_2\nL : List α\ni✝ : Fin (length L)\nhead : α\ntail : List α\nih : ∀ (i : Fin (length tail)), drop (↑i) (take (↑i + 1) tail) = [get tail i]\ni : ℕ\nhi : Nat.succ i < length (head :: tail)\n⊢ drop (↑{ val := Nat.succ i, isLt := hi }) (take (↑{ val := Nat.succ i, isLt := hi } + 1) (head :: tail)) =\n    [get (head :: tail) { val := Nat.succ i, isLt := hi }]\n[PROOFSTEP]\nsimpa using ih ⟨i, Nat.lt_of_succ_lt_succ hi⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nL : List α\ni : ℕ\nhi : i < length L\n⊢ drop i (take (i + 1) L) = [nthLe L i hi]\n[PROOFSTEP]\ninduction' L with head tail generalizing i\n[GOAL]\ncase nil\nα : Type u_1\nβ : Type u_2\nL : List α\ni✝ : ℕ\nhi✝ : i✝ < length L\ni : ℕ\nhi : i < length []\n⊢ drop i (take (i + 1) []) = [nthLe [] i hi]\n[PROOFSTEP]\nsimp only [length] at hi \n[GOAL]\ncase nil\nα : Type u_1\nβ : Type u_2\nL : List α\ni✝ : ℕ\nhi✝ : i✝ < length L\ni : ℕ\nhi : i < 0\n⊢ drop i (take (i + 1) []) = [nthLe [] i hi]\n[PROOFSTEP]\nexact (Nat.not_succ_le_zero i hi).elim\n[GOAL]\ncase cons\nα : Type u_1\nβ : Type u_2\nL : List α\ni✝ : ℕ\nhi✝ : i✝ < length L\nhead : α\ntail : List α\ntail_ih✝ : ∀ {i : ℕ} (hi : i < length tail), drop i (take (i + 1) tail) = [nthLe tail i hi]\ni : ℕ\nhi : i < length (head :: tail)\n⊢ drop i (take (i + 1) (head :: tail)) = [nthLe (head :: tail) i hi]\n[PROOFSTEP]\ncases' i with i hi\n[GOAL]\ncase cons.zero\nα : Type u_1\nβ : Type u_2\nL : List α\ni : ℕ\nhi✝ : i < length L\nhead : α\ntail : List α\ntail_ih✝ : ∀ {i : ℕ} (hi : i < length tail), drop i (take (i + 1) tail) = [nthLe tail i hi]\nhi : Nat.zero < length (head :: tail)\n⊢ drop Nat.zero (take (Nat.zero + 1) (head :: tail)) = [nthLe (head :: tail) Nat.zero hi]\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons.zero\nα : Type u_1\nβ : Type u_2\nL : List α\ni : ℕ\nhi✝ : i < length L\nhead : α\ntail : List α\ntail_ih✝ : ∀ {i : ℕ} (hi : i < length tail), drop i (take (i + 1) tail) = [nthLe tail i hi]\nhi : Nat.zero < length (head :: tail)\n⊢ head = nthLe (head :: tail) 0 hi\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons.succ\nα : Type u_1\nβ : Type u_2\nL : List α\ni✝ : ℕ\nhi✝ : i✝ < length L\nhead : α\ntail : List α\ntail_ih✝ : ∀ {i : ℕ} (hi : i < length tail), drop i (take (i + 1) tail) = [nthLe tail i hi]\ni : ℕ\nhi : Nat.succ i < length (head :: tail)\n⊢ drop (Nat.succ i) (take (Nat.succ i + 1) (head :: tail)) = [nthLe (head :: tail) (Nat.succ i) hi]\n[PROOFSTEP]\nhave : i < tail.length := by\n  simp at hi \n  exact Nat.lt_of_succ_lt_succ hi\n[GOAL]\nα : Type u_1\nβ : Type u_2\nL : List α\ni✝ : ℕ\nhi✝ : i✝ < length L\nhead : α\ntail : List α\ntail_ih✝ : ∀ {i : ℕ} (hi : i < length tail), drop i (take (i + 1) tail) = [nthLe tail i hi]\ni : ℕ\nhi : Nat.succ i < length (head :: tail)\n⊢ i < length tail\n[PROOFSTEP]\nsimp at hi \n[GOAL]\nα : Type u_1\nβ : Type u_2\nL : List α\ni✝ : ℕ\nhi✝ : i✝ < length L\nhead : α\ntail : List α\ntail_ih✝ : ∀ {i : ℕ} (hi : i < length tail), drop i (take (i + 1) tail) = [nthLe tail i hi]\ni : ℕ\nhi : Nat.succ i < Nat.succ (length tail)\n⊢ i < length tail\n[PROOFSTEP]\nexact Nat.lt_of_succ_lt_succ hi\n[GOAL]\ncase cons.succ\nα : Type u_1\nβ : Type u_2\nL : List α\ni✝ : ℕ\nhi✝ : i✝ < length L\nhead : α\ntail : List α\ntail_ih✝ : ∀ {i : ℕ} (hi : i < length tail), drop i (take (i + 1) tail) = [nthLe tail i hi]\ni : ℕ\nhi : Nat.succ i < length (head :: tail)\nthis : i < length tail\n⊢ drop (Nat.succ i) (take (Nat.succ i + 1) (head :: tail)) = [nthLe (head :: tail) (Nat.succ i) hi]\n[PROOFSTEP]\nsimp [*]\n[GOAL]\ncase cons.succ\nα : Type u_1\nβ : Type u_2\nL : List α\ni✝ : ℕ\nhi✝ : i✝ < length L\nhead : α\ntail : List α\ntail_ih✝ : ∀ {i : ℕ} (hi : i < length tail), drop i (take (i + 1) tail) = [nthLe tail i hi]\ni : ℕ\nhi : Nat.succ i < length (head :: tail)\nthis : i < length tail\n⊢ nthLe tail i (_ : i < length tail) = nthLe (head :: tail) (Nat.succ i) hi\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nL : List (List α)\ni : Fin (length L)\n⊢ drop (sum (take (↑i) (map length L))) (take (sum (take (↑i + 1) (map length L))) (join L)) = get L i\n[PROOFSTEP]\nhave : (L.map length).take i = ((L.take (i + 1)).map length).take i := by simp [map_take, take_take]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nL : List (List α)\ni : Fin (length L)\n⊢ take (↑i) (map length L) = take (↑i) (map length (take (↑i + 1) L))\n[PROOFSTEP]\nsimp [map_take, take_take]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nL : List (List α)\ni : Fin (length L)\nthis : take (↑i) (map length L) = take (↑i) (map length (take (↑i + 1) L))\n⊢ drop (sum (take (↑i) (map length L))) (take (sum (take (↑i + 1) (map length L))) (join L)) = get L i\n[PROOFSTEP]\nsimp only [this, length_map, take_sum_join, drop_sum_join, drop_take_succ_eq_cons_get, join, append_nil]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nL : List (List α)\ni : ℕ\nhi : i < length L\n⊢ drop (sum (take i (map length L))) (take (sum (take (i + 1) (map length L))) (join L)) = nthLe L i hi\n[PROOFSTEP]\nhave : (L.map length).take i = ((L.take (i + 1)).map length).take i := by simp [map_take, take_take]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nL : List (List α)\ni : ℕ\nhi : i < length L\n⊢ take i (map length L) = take i (map length (take (i + 1) L))\n[PROOFSTEP]\nsimp [map_take, take_take]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nL : List (List α)\ni : ℕ\nhi : i < length L\nthis : take i (map length L) = take i (map length (take (i + 1) L))\n⊢ drop (sum (take i (map length L))) (take (sum (take (i + 1) (map length L))) (join L)) = nthLe L i hi\n[PROOFSTEP]\nsimp [take_sum_join, this, drop_sum_join, drop_take_succ_eq_cons_nthLe _ hi]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nL : List (List α)\ni j : ℕ\nhi : i < length L\nhj : j < length (nthLe L i hi)\n⊢ sum (take i (map length L)) + j < sum (take (i + 1) (map length L))\n[PROOFSTEP]\nsimp [hi, sum_take_succ, hj]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nL : List (List α)\ni j : ℕ\nhi : i < length L\nhj : j < length (nthLe L i hi)\n⊢ sum (take i (map length L)) + j < length (join L)\n[PROOFSTEP]\nconvert lt_of_lt_of_le (sum_take_map_length_lt1 L hi hj) (monotone_sum_take _ hi)\n[GOAL]\ncase h.e'_4\nα : Type u_1\nβ : Type u_2\nL : List (List α)\ni j : ℕ\nhi : i < length L\nhj : j < length (nthLe L i hi)\n⊢ length (join L) = (fun i => sum (take i (map length L))) (length L)\n[PROOFSTEP]\nhave : L.length = (L.map length).length := by simp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nL : List (List α)\ni j : ℕ\nhi : i < length L\nhj : j < length (nthLe L i hi)\n⊢ length L = length (map length L)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.e'_4\nα : Type u_1\nβ : Type u_2\nL : List (List α)\ni j : ℕ\nhi : i < length L\nhj : j < length (nthLe L i hi)\nthis : length L = length (map length L)\n⊢ length (join L) = (fun i => sum (take i (map length L))) (length L)\n[PROOFSTEP]\nsimp [this, -length_map]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nL : List (List α)\ni j : ℕ\nhi : i < length L\nhj : j < length (nthLe L i hi)\n⊢ nthLe (join L) (sum (take i (map length L)) + j) (_ : sum (take i (map length L)) + j < length (join L)) =\n    nthLe (nthLe L i hi) j hj\n[PROOFSTEP]\nhave := nthLe_take L.join (sum_take_map_length_lt2 L hi hj) (sum_take_map_length_lt1 L hi hj)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nL : List (List α)\ni j : ℕ\nhi : i < length L\nhj : j < length (nthLe L i hi)\nthis :\n  nthLe (join L) (sum (take i (map length L)) + j) (_ : sum (take i (map length L)) + j < length (join L)) =\n    nthLe (take (sum (take (i + 1) (map length L))) (join L)) (sum (take i (map length L)) + j)\n      (_ : sum (take i (map length L)) + j < length (take (sum (take (i + 1) (map length L))) (join L)))\n⊢ nthLe (join L) (sum (take i (map length L)) + j) (_ : sum (take i (map length L)) + j < length (join L)) =\n    nthLe (nthLe L i hi) j hj\n[PROOFSTEP]\nrw [this, nthLe_drop, nthLe_of_eq (drop_take_succ_join_eq_nthLe L hi)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nL L' : List (List α)\n⊢ L = L' ↔ join L = join L' ∧ map length L = map length L'\n[PROOFSTEP]\nrefine' ⟨fun H => by simp [H], _⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nL L' : List (List α)\nH : L = L'\n⊢ join L = join L' ∧ map length L = map length L'\n[PROOFSTEP]\nsimp [H]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nL L' : List (List α)\n⊢ join L = join L' ∧ map length L = map length L' → L = L'\n[PROOFSTEP]\nrintro ⟨join_eq, length_eq⟩\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nL L' : List (List α)\njoin_eq : join L = join L'\nlength_eq : map length L = map length L'\n⊢ L = L'\n[PROOFSTEP]\napply ext_get\n[GOAL]\ncase intro.hl\nα : Type u_1\nβ : Type u_2\nL L' : List (List α)\njoin_eq : join L = join L'\nlength_eq : map length L = map length L'\n⊢ length L = length L'\n[PROOFSTEP]\nhave : length (map length L) = length (map length L') := by rw [length_eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nL L' : List (List α)\njoin_eq : join L = join L'\nlength_eq : map length L = map length L'\n⊢ length (map length L) = length (map length L')\n[PROOFSTEP]\nrw [length_eq]\n[GOAL]\ncase intro.hl\nα : Type u_1\nβ : Type u_2\nL L' : List (List α)\njoin_eq : join L = join L'\nlength_eq : map length L = map length L'\nthis : length (map length L) = length (map length L')\n⊢ length L = length L'\n[PROOFSTEP]\nsimpa using this\n[GOAL]\ncase intro.h\nα : Type u_1\nβ : Type u_2\nL L' : List (List α)\njoin_eq : join L = join L'\nlength_eq : map length L = map length L'\n⊢ ∀ (n : ℕ) (h₁ : n < length L) (h₂ : n < length L'), get L { val := n, isLt := h₁ } = get L' { val := n, isLt := h₂ }\n[PROOFSTEP]\nintro n h₁ h₂\n[GOAL]\ncase intro.h\nα : Type u_1\nβ : Type u_2\nL L' : List (List α)\njoin_eq : join L = join L'\nlength_eq : map length L = map length L'\nn : ℕ\nh₁ : n < length L\nh₂ : n < length L'\n⊢ get L { val := n, isLt := h₁ } = get L' { val := n, isLt := h₂ }\n[PROOFSTEP]\nrw [← drop_take_succ_join_eq_get, ← drop_take_succ_join_eq_get, join_eq, length_eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nL : List (List α)\nh : L ≠ []\n⊢ join (drop (length L - 1) L) = getLast L h\n[PROOFSTEP]\ninduction L using List.reverseRecOn\n[GOAL]\ncase H0\nα : Type u_1\nβ : Type u_2\nh : [] ≠ []\n⊢ join (drop (length [] - 1) []) = getLast [] h\n[PROOFSTEP]\ncases h rfl\n[GOAL]\ncase H1\nα : Type u_1\nβ : Type u_2\nl✝ : List (List α)\na✝¹ : List α\na✝ : ∀ (h : l✝ ≠ []), join (drop (length l✝ - 1) l✝) = getLast l✝ h\nh : l✝ ++ [a✝¹] ≠ []\n⊢ join (drop (length (l✝ ++ [a✝¹]) - 1) (l✝ ++ [a✝¹])) = getLast (l✝ ++ [a✝¹]) h\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nL : List (List α)\nx : List α\n⊢ x ++ join (map (fun l => l ++ x) L) = join (map (fun l => x ++ l) L) ++ x\n[PROOFSTEP]\ninduction' L with _ _ ih\n[GOAL]\ncase nil\nα : Type u_1\nβ : Type u_2\nx : List α\n⊢ x ++ join (map (fun l => l ++ x) []) = join (map (fun l => x ++ l) []) ++ x\n[PROOFSTEP]\nrw [map_nil, join, append_nil, map_nil, join, nil_append]\n[GOAL]\ncase cons\nα : Type u_1\nβ : Type u_2\nx head✝ : List α\ntail✝ : List (List α)\nih : x ++ join (map (fun l => l ++ x) tail✝) = join (map (fun l => x ++ l) tail✝) ++ x\n⊢ x ++ join (map (fun l => l ++ x) (head✝ :: tail✝)) = join (map (fun l => x ++ l) (head✝ :: tail✝)) ++ x\n[PROOFSTEP]\nrw [map_cons, join, map_cons, join, append_assoc, ih, append_assoc, append_assoc]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nL : List (List α)\n⊢ reverse (join L) = join (reverse (map reverse L))\n[PROOFSTEP]\ninduction' L with _ _ ih\n[GOAL]\ncase nil\nα : Type u_1\nβ : Type u_2\n⊢ reverse (join []) = join (reverse (map reverse []))\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\nα : Type u_1\nβ : Type u_2\nhead✝ : List α\ntail✝ : List (List α)\nih : reverse (join tail✝) = join (reverse (map reverse tail✝))\n⊢ reverse (join (head✝ :: tail✝)) = join (reverse (map reverse (head✝ :: tail✝)))\n[PROOFSTEP]\nrw [join, reverse_append, ih, map_cons, reverse_cons', join_concat]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nL : List (List α)\n⊢ join (reverse L) = reverse (join (map reverse L))\n[PROOFSTEP]\nsimpa [reverse_reverse, map_reverse] using congr_arg List.reverse (reverse_join L.reverse)\n", "meta": {"mathlib_filename": "Mathlib.Data.List.Join", "llama_tokens": 8648, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7090191214879991, "lm_q2_score": 0.7279754489059774, "lm_q1q2_score": 0.5161485132481478}}
{"text": "[GOAL]\n⊢ SuccOrder (Fin 0)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase le_succ\n⊢ ∀ (a : Fin 0), a ≤ ?succ a\n[PROOFSTEP]\nfirst\n| assumption\n| intro a; exact elim0 a\n[GOAL]\ncase le_succ\n⊢ ∀ (a : Fin 0), a ≤ ?succ a\n[PROOFSTEP]\nassumption\n[GOAL]\ncase le_succ\n⊢ ∀ (a : Fin 0), a ≤ ?succ a\n[PROOFSTEP]\nintro a\n[GOAL]\ncase le_succ\na : Fin 0\n⊢ a ≤ ?succ a\n[PROOFSTEP]\nexact elim0 a\n[GOAL]\ncase max_of_succ_le\n⊢ ∀ {a : Fin 0}, ?succ a ≤ a → IsMax a\n[PROOFSTEP]\nfirst\n| assumption\n| intro a; exact elim0 a\n[GOAL]\ncase max_of_succ_le\n⊢ ∀ {a : Fin 0}, ?succ a ≤ a → IsMax a\n[PROOFSTEP]\nassumption\n[GOAL]\ncase max_of_succ_le\n⊢ ∀ {a : Fin 0}, ?succ a ≤ a → IsMax a\n[PROOFSTEP]\nintro a\n[GOAL]\ncase max_of_succ_le\na : Fin 0\n⊢ ?succ a ≤ a → IsMax a\n[PROOFSTEP]\nexact elim0 a\n[GOAL]\ncase succ_le_of_lt\n⊢ ∀ {a b : Fin 0}, a < b → ?succ a ≤ b\n[PROOFSTEP]\nfirst\n| assumption\n| intro a; exact elim0 a\n[GOAL]\ncase succ_le_of_lt\n⊢ ∀ {a b : Fin 0}, a < b → ?succ a ≤ b\n[PROOFSTEP]\nassumption\n[GOAL]\ncase succ_le_of_lt\n⊢ ∀ {a b : Fin 0}, a < b → ?succ a ≤ b\n[PROOFSTEP]\nintro a\n[GOAL]\ncase succ_le_of_lt\na : Fin 0\n⊢ ∀ {b : Fin 0}, a < b → ?succ a ≤ b\n[PROOFSTEP]\nexact elim0 a\n[GOAL]\ncase le_of_lt_succ\n⊢ ∀ {a b : Fin 0}, a < ?succ b → a ≤ b\n[PROOFSTEP]\nfirst\n| assumption\n| intro a; exact elim0 a\n[GOAL]\ncase le_of_lt_succ\n⊢ ∀ {a b : Fin 0}, a < ?succ b → a ≤ b\n[PROOFSTEP]\nassumption\n[GOAL]\ncase le_of_lt_succ\n⊢ ∀ {a b : Fin 0}, a < ?succ b → a ≤ b\n[PROOFSTEP]\nintro a\n[GOAL]\ncase le_of_lt_succ\na : Fin 0\n⊢ ∀ {b : Fin 0}, a < ?succ b → a ≤ b\n[PROOFSTEP]\nexact elim0 a\n[GOAL]\ncase succ\n⊢ Fin 0 → Fin 0\n[PROOFSTEP]\nfirst\n| assumption\n| intro a; exact elim0 a\n[GOAL]\ncase succ\n⊢ Fin 0 → Fin 0\n[PROOFSTEP]\nassumption\n[GOAL]\ncase succ\n⊢ Fin 0 → Fin 0\n[PROOFSTEP]\nintro a\n[GOAL]\ncase succ\na : Fin 0\n⊢ Fin 0\n[PROOFSTEP]\nexact elim0 a\n[GOAL]\nn : ℕ\n⊢ ∀ {a : Fin (n + 1)}, ¬IsMax a → ∀ (b : Fin (n + 1)), a < b ↔ (fun i => if i < last n then i + 1 else i) a ≤ b\n[PROOFSTEP]\nintro a ha b\n[GOAL]\nn : ℕ\na : Fin (n + 1)\nha : ¬IsMax a\nb : Fin (n + 1)\n⊢ a < b ↔ (fun i => if i < last n then i + 1 else i) a ≤ b\n[PROOFSTEP]\nrw [isMax_iff_eq_top, eq_top_iff, not_le, top_eq_last] at ha \n[GOAL]\nn : ℕ\na : Fin (n + 1)\nha✝ : ¬IsMax a\nha : a < last n\nb : Fin (n + 1)\n⊢ a < b ↔ (fun i => if i < last n then i + 1 else i) a ≤ b\n[PROOFSTEP]\ndsimp\n[GOAL]\nn : ℕ\na : Fin (n + 1)\nha✝ : ¬IsMax a\nha : a < last n\nb : Fin (n + 1)\n⊢ a < b ↔ (if a < last n then a + 1 else a) ≤ b\n[PROOFSTEP]\nrw [if_pos ha, lt_iff_val_lt_val, le_iff_val_le_val, val_add_one_of_lt ha]\n[GOAL]\nn : ℕ\na : Fin (n + 1)\nha✝ : ¬IsMax a\nha : a < last n\nb : Fin (n + 1)\n⊢ ↑a < ↑b ↔ ↑a + 1 ≤ ↑b\n[PROOFSTEP]\nexact Nat.lt_iff_add_one_le\n[GOAL]\nn : ℕ\n⊢ ∀ (a : Fin (n + 1)), IsMax a → (fun i => if i < last n then i + 1 else i) a = a\n[PROOFSTEP]\nintro a ha\n[GOAL]\nn : ℕ\na : Fin (n + 1)\nha : IsMax a\n⊢ (fun i => if i < last n then i + 1 else i) a = a\n[PROOFSTEP]\nrw [isMax_iff_eq_top, top_eq_last] at ha \n[GOAL]\nn : ℕ\na : Fin (n + 1)\nha✝ : IsMax a\nha : a = last n\n⊢ (fun i => if i < last n then i + 1 else i) a = a\n[PROOFSTEP]\ndsimp\n[GOAL]\nn : ℕ\na : Fin (n + 1)\nha✝ : IsMax a\nha : a = last n\n⊢ (if a < last n then a + 1 else a) = a\n[PROOFSTEP]\nrw [if_neg ha.not_lt]\n[GOAL]\n⊢ PredOrder (Fin 0)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase pred_le\n⊢ ∀ (a : Fin 0), ?pred a ≤ a\n[PROOFSTEP]\nfirst\n| assumption\n| intro a; exact elim0 a\n[GOAL]\ncase pred_le\n⊢ ∀ (a : Fin 0), ?pred a ≤ a\n[PROOFSTEP]\nassumption\n[GOAL]\ncase pred_le\n⊢ ∀ (a : Fin 0), ?pred a ≤ a\n[PROOFSTEP]\nintro a\n[GOAL]\ncase pred_le\na : Fin 0\n⊢ ?pred a ≤ a\n[PROOFSTEP]\nexact elim0 a\n[GOAL]\ncase min_of_le_pred\n⊢ ∀ {a : Fin 0}, a ≤ ?pred a → IsMin a\n[PROOFSTEP]\nfirst\n| assumption\n| intro a; exact elim0 a\n[GOAL]\ncase min_of_le_pred\n⊢ ∀ {a : Fin 0}, a ≤ ?pred a → IsMin a\n[PROOFSTEP]\nassumption\n[GOAL]\ncase min_of_le_pred\n⊢ ∀ {a : Fin 0}, a ≤ ?pred a → IsMin a\n[PROOFSTEP]\nintro a\n[GOAL]\ncase min_of_le_pred\na : Fin 0\n⊢ a ≤ ?pred a → IsMin a\n[PROOFSTEP]\nexact elim0 a\n[GOAL]\ncase le_pred_of_lt\n⊢ ∀ {a b : Fin 0}, a < b → a ≤ ?pred b\n[PROOFSTEP]\nfirst\n| assumption\n| intro a; exact elim0 a\n[GOAL]\ncase le_pred_of_lt\n⊢ ∀ {a b : Fin 0}, a < b → a ≤ ?pred b\n[PROOFSTEP]\nassumption\n[GOAL]\ncase le_pred_of_lt\n⊢ ∀ {a b : Fin 0}, a < b → a ≤ ?pred b\n[PROOFSTEP]\nintro a\n[GOAL]\ncase le_pred_of_lt\na : Fin 0\n⊢ ∀ {b : Fin 0}, a < b → a ≤ ?pred b\n[PROOFSTEP]\nexact elim0 a\n[GOAL]\ncase le_of_pred_lt\n⊢ ∀ {a b : Fin 0}, ?pred a < b → a ≤ b\n[PROOFSTEP]\nfirst\n| assumption\n| intro a; exact elim0 a\n[GOAL]\ncase le_of_pred_lt\n⊢ ∀ {a b : Fin 0}, ?pred a < b → a ≤ b\n[PROOFSTEP]\nassumption\n[GOAL]\ncase le_of_pred_lt\n⊢ ∀ {a b : Fin 0}, ?pred a < b → a ≤ b\n[PROOFSTEP]\nintro a\n[GOAL]\ncase le_of_pred_lt\na : Fin 0\n⊢ ∀ {b : Fin 0}, ?pred a < b → a ≤ b\n[PROOFSTEP]\nexact elim0 a\n[GOAL]\ncase pred\n⊢ Fin 0 → Fin 0\n[PROOFSTEP]\nfirst\n| assumption\n| intro a; exact elim0 a\n[GOAL]\ncase pred\n⊢ Fin 0 → Fin 0\n[PROOFSTEP]\nassumption\n[GOAL]\ncase pred\n⊢ Fin 0 → Fin 0\n[PROOFSTEP]\nintro a\n[GOAL]\ncase pred\na : Fin 0\n⊢ Fin 0\n[PROOFSTEP]\nexact elim0 a\n[GOAL]\nn : ℕ\n⊢ ∀ {a : Fin (n + 1)}, ¬IsMin a → ∀ (b : Fin (n + 1)), b ≤ (fun x => if x = 0 then 0 else x - 1) a ↔ b < a\n[PROOFSTEP]\nintro a ha b\n[GOAL]\nn : ℕ\na : Fin (n + 1)\nha : ¬IsMin a\nb : Fin (n + 1)\n⊢ b ≤ (fun x => if x = 0 then 0 else x - 1) a ↔ b < a\n[PROOFSTEP]\nrw [isMin_iff_eq_bot, eq_bot_iff, not_le, bot_eq_zero] at ha \n[GOAL]\nn : ℕ\na : Fin (n + 1)\nha✝ : ¬IsMin a\nha : 0 < a\nb : Fin (n + 1)\n⊢ b ≤ (fun x => if x = 0 then 0 else x - 1) a ↔ b < a\n[PROOFSTEP]\ndsimp\n[GOAL]\nn : ℕ\na : Fin (n + 1)\nha✝ : ¬IsMin a\nha : 0 < a\nb : Fin (n + 1)\n⊢ (b ≤ if a = 0 then 0 else a - 1) ↔ b < a\n[PROOFSTEP]\nrw [if_neg ha.ne', lt_iff_val_lt_val, le_iff_val_le_val, coe_sub_one, if_neg ha.ne', le_tsub_iff_right, Iff.comm]\n[GOAL]\nn : ℕ\na : Fin (n + 1)\nha✝ : ¬IsMin a\nha : 0 < a\nb : Fin (n + 1)\n⊢ ↑b < ↑a ↔ ↑b + 1 ≤ ↑a\nn : ℕ a : Fin (n + 1) ha✝ : ¬IsMin a ha : 0 < a b : Fin (n + 1) ⊢ 1 ≤ ↑a\n[PROOFSTEP]\nexact Nat.lt_iff_add_one_le\n[GOAL]\nn : ℕ\na : Fin (n + 1)\nha✝ : ¬IsMin a\nha : 0 < a\nb : Fin (n + 1)\n⊢ 1 ≤ ↑a\n[PROOFSTEP]\nexact ha\n[GOAL]\nn : ℕ\n⊢ ∀ (a : Fin (n + 1)), IsMin a → (fun x => if x = 0 then 0 else x - 1) a = a\n[PROOFSTEP]\nintro a ha\n[GOAL]\nn : ℕ\na : Fin (n + 1)\nha : IsMin a\n⊢ (fun x => if x = 0 then 0 else x - 1) a = a\n[PROOFSTEP]\nrw [isMin_iff_eq_bot, bot_eq_zero] at ha \n[GOAL]\nn : ℕ\na : Fin (n + 1)\nha✝ : IsMin a\nha : a = 0\n⊢ (fun x => if x = 0 then 0 else x - 1) a = a\n[PROOFSTEP]\ndsimp\n[GOAL]\nn : ℕ\na : Fin (n + 1)\nha✝ : IsMin a\nha : a = 0\n⊢ (if a = 0 then 0 else a - 1) = a\n[PROOFSTEP]\nrwa [if_pos ha, eq_comm]\n", "meta": {"mathlib_filename": "Mathlib.Data.Fin.SuccPred", "llama_tokens": 3491, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7879311856832191, "lm_q2_score": 0.6548947357776795, "lm_q1q2_score": 0.5160119856590055}}
{"text": "[GOAL]\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nw : ι → ℝ\n⊢ IsometryEquiv (weightedSumSquares ℝ w) (weightedSumSquares ℝ (sign ∘ w))\n[PROOFSTEP]\nlet u i := if h : w i = 0 then (1 : ℝˣ) else Units.mk0 (w i) h\n[GOAL]\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nw : ι → ℝ\nu : ι → ℝˣ := fun i => if h : w i = 0 then 1 else Units.mk0 (w i) h\n⊢ IsometryEquiv (weightedSumSquares ℝ w) (weightedSumSquares ℝ (sign ∘ w))\n[PROOFSTEP]\nhave hu' : ∀ i : ι, (Real.sign (u i) * u i) ^ (-(1 / 2 : ℝ)) ≠ 0 :=\n  by\n  intro i\n  refine' (ne_of_lt (Real.rpow_pos_of_pos (sign_mul_pos_of_ne_zero _ <| Units.ne_zero _) _)).symm\n[GOAL]\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nw : ι → ℝ\nu : ι → ℝˣ := fun i => if h : w i = 0 then 1 else Units.mk0 (w i) h\n⊢ ∀ (i : ι), (sign ↑(u i) * ↑(u i)) ^ (-(1 / 2)) ≠ 0\n[PROOFSTEP]\nintro i\n[GOAL]\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nw : ι → ℝ\nu : ι → ℝˣ := fun i => if h : w i = 0 then 1 else Units.mk0 (w i) h\ni : ι\n⊢ (sign ↑(u i) * ↑(u i)) ^ (-(1 / 2)) ≠ 0\n[PROOFSTEP]\nrefine' (ne_of_lt (Real.rpow_pos_of_pos (sign_mul_pos_of_ne_zero _ <| Units.ne_zero _) _)).symm\n[GOAL]\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nw : ι → ℝ\nu : ι → ℝˣ := fun i => if h : w i = 0 then 1 else Units.mk0 (w i) h\nhu' : ∀ (i : ι), (sign ↑(u i) * ↑(u i)) ^ (-(1 / 2)) ≠ 0\n⊢ IsometryEquiv (weightedSumSquares ℝ w) (weightedSumSquares ℝ (sign ∘ w))\n[PROOFSTEP]\nconvert\n  (weightedSumSquares ℝ w).isometryEquivBasisRepr\n    ((Pi.basisFun ℝ ι).unitsSMul fun i => (isUnit_iff_ne_zero.2 <| hu' i).unit)\n[GOAL]\ncase h.e'_10\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nw : ι → ℝ\nu : ι → ℝˣ := fun i => if h : w i = 0 then 1 else Units.mk0 (w i) h\nhu' : ∀ (i : ι), (sign ↑(u i) * ↑(u i)) ^ (-(1 / 2)) ≠ 0\n⊢ weightedSumSquares ℝ (sign ∘ w) =\n    basisRepr (weightedSumSquares ℝ w)\n      (Basis.unitsSMul (Pi.basisFun ℝ ι) fun i => IsUnit.unit (_ : IsUnit ((sign ↑(u i) * ↑(u i)) ^ (-(1 / 2)))))\n[PROOFSTEP]\next1 v\n[GOAL]\ncase h.e'_10.H\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nw : ι → ℝ\nu : ι → ℝˣ := fun i => if h : w i = 0 then 1 else Units.mk0 (w i) h\nhu' : ∀ (i : ι), (sign ↑(u i) * ↑(u i)) ^ (-(1 / 2)) ≠ 0\nv : ι → ℝ\n⊢ ↑(weightedSumSquares ℝ (sign ∘ w)) v =\n    ↑(basisRepr (weightedSumSquares ℝ w)\n          (Basis.unitsSMul (Pi.basisFun ℝ ι) fun i => IsUnit.unit (_ : IsUnit ((sign ↑(u i) * ↑(u i)) ^ (-(1 / 2))))))\n      v\n[PROOFSTEP]\nrw [basisRepr_apply, weightedSumSquares_apply, weightedSumSquares_apply]\n[GOAL]\ncase h.e'_10.H\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nw : ι → ℝ\nu : ι → ℝˣ := fun i => if h : w i = 0 then 1 else Units.mk0 (w i) h\nhu' : ∀ (i : ι), (sign ↑(u i) * ↑(u i)) ^ (-(1 / 2)) ≠ 0\nv : ι → ℝ\n⊢ ∑ i : ι, (sign ∘ w) i • (v i * v i) =\n    ∑ i : ι,\n      w i •\n        (Finset.sum univ\n            (fun i =>\n              v i •\n                ↑(Basis.unitsSMul (Pi.basisFun ℝ ι) fun i =>\n                      IsUnit.unit (_ : IsUnit ((sign ↑(u i) * ↑(u i)) ^ (-(1 / 2)))))\n                  i)\n            i *\n          Finset.sum univ\n            (fun i =>\n              v i •\n                ↑(Basis.unitsSMul (Pi.basisFun ℝ ι) fun i =>\n                      IsUnit.unit (_ : IsUnit ((sign ↑(u i) * ↑(u i)) ^ (-(1 / 2)))))\n                  i)\n            i)\n[PROOFSTEP]\nrefine' sum_congr rfl fun j hj => _\n[GOAL]\ncase h.e'_10.H\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nw : ι → ℝ\nu : ι → ℝˣ := fun i => if h : w i = 0 then 1 else Units.mk0 (w i) h\nhu' : ∀ (i : ι), (sign ↑(u i) * ↑(u i)) ^ (-(1 / 2)) ≠ 0\nv : ι → ℝ\nj : ι\nhj : j ∈ univ\n⊢ (sign ∘ w) j • (v j * v j) =\n    w j •\n      (Finset.sum univ\n          (fun i =>\n            v i •\n              ↑(Basis.unitsSMul (Pi.basisFun ℝ ι) fun i =>\n                    IsUnit.unit (_ : IsUnit ((sign ↑(u i) * ↑(u i)) ^ (-(1 / 2)))))\n                i)\n          j *\n        Finset.sum univ\n          (fun i =>\n            v i •\n              ↑(Basis.unitsSMul (Pi.basisFun ℝ ι) fun i =>\n                    IsUnit.unit (_ : IsUnit ((sign ↑(u i) * ↑(u i)) ^ (-(1 / 2)))))\n                i)\n          j)\n[PROOFSTEP]\nhave hsum :\n  (∑ i : ι, v i • ((isUnit_iff_ne_zero.2 <| hu' i).unit : ℝ) • (Pi.basisFun ℝ ι) i) j =\n    v j • (Real.sign (u j) * u j) ^ (-(1 / 2 : ℝ)) :=\n  by\n  rw [Finset.sum_apply, sum_eq_single j, Pi.basisFun_apply, IsUnit.unit_spec, LinearMap.stdBasis_apply, Pi.smul_apply,\n    Pi.smul_apply, Function.update_same, smul_eq_mul, smul_eq_mul, smul_eq_mul, mul_one]\n  intro i _ hij\n  rw [Pi.basisFun_apply, LinearMap.stdBasis_apply, Pi.smul_apply, Pi.smul_apply, Function.update_noteq hij.symm,\n    Pi.zero_apply, smul_eq_mul, smul_eq_mul, mul_zero, mul_zero]\n  intro hj'; exact False.elim (hj' hj)\n[GOAL]\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nw : ι → ℝ\nu : ι → ℝˣ := fun i => if h : w i = 0 then 1 else Units.mk0 (w i) h\nhu' : ∀ (i : ι), (sign ↑(u i) * ↑(u i)) ^ (-(1 / 2)) ≠ 0\nv : ι → ℝ\nj : ι\nhj : j ∈ univ\n⊢ Finset.sum univ\n      (fun i => v i • ↑(IsUnit.unit (_ : IsUnit ((sign ↑(u i) * ↑(u i)) ^ (-(1 / 2))))) • ↑(Pi.basisFun ℝ ι) i) j =\n    v j • (sign ↑(u j) * ↑(u j)) ^ (-(1 / 2))\n[PROOFSTEP]\nrw [Finset.sum_apply, sum_eq_single j, Pi.basisFun_apply, IsUnit.unit_spec, LinearMap.stdBasis_apply, Pi.smul_apply,\n  Pi.smul_apply, Function.update_same, smul_eq_mul, smul_eq_mul, smul_eq_mul, mul_one]\n[GOAL]\ncase h₀\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nw : ι → ℝ\nu : ι → ℝˣ := fun i => if h : w i = 0 then 1 else Units.mk0 (w i) h\nhu' : ∀ (i : ι), (sign ↑(u i) * ↑(u i)) ^ (-(1 / 2)) ≠ 0\nv : ι → ℝ\nj : ι\nhj : j ∈ univ\n⊢ ∀ (b : ι),\n    b ∈ univ →\n      b ≠ j → (v b • ↑(IsUnit.unit (_ : IsUnit ((sign ↑(u b) * ↑(u b)) ^ (-(1 / 2))))) • ↑(Pi.basisFun ℝ ι) b) j = 0\ncase h₁\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nw : ι → ℝ\nu : ι → ℝˣ := fun i => if h : w i = 0 then 1 else Units.mk0 (w i) h\nhu' : ∀ (i : ι), (sign ↑(u i) * ↑(u i)) ^ (-(1 / 2)) ≠ 0\nv : ι → ℝ\nj : ι\nhj : j ∈ univ\n⊢ ¬j ∈ univ → (v j • ↑(IsUnit.unit (_ : IsUnit ((sign ↑(u j) * ↑(u j)) ^ (-(1 / 2))))) • ↑(Pi.basisFun ℝ ι) j) j = 0\n[PROOFSTEP]\nintro i _ hij\n[GOAL]\ncase h₀\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nw : ι → ℝ\nu : ι → ℝˣ := fun i => if h : w i = 0 then 1 else Units.mk0 (w i) h\nhu' : ∀ (i : ι), (sign ↑(u i) * ↑(u i)) ^ (-(1 / 2)) ≠ 0\nv : ι → ℝ\nj : ι\nhj : j ∈ univ\ni : ι\na✝ : i ∈ univ\nhij : i ≠ j\n⊢ (v i • ↑(IsUnit.unit (_ : IsUnit ((sign ↑(u i) * ↑(u i)) ^ (-(1 / 2))))) • ↑(Pi.basisFun ℝ ι) i) j = 0\ncase h₁\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nw : ι → ℝ\nu : ι → ℝˣ := fun i => if h : w i = 0 then 1 else Units.mk0 (w i) h\nhu' : ∀ (i : ι), (sign ↑(u i) * ↑(u i)) ^ (-(1 / 2)) ≠ 0\nv : ι → ℝ\nj : ι\nhj : j ∈ univ\n⊢ ¬j ∈ univ → (v j • ↑(IsUnit.unit (_ : IsUnit ((sign ↑(u j) * ↑(u j)) ^ (-(1 / 2))))) • ↑(Pi.basisFun ℝ ι) j) j = 0\n[PROOFSTEP]\nrw [Pi.basisFun_apply, LinearMap.stdBasis_apply, Pi.smul_apply, Pi.smul_apply, Function.update_noteq hij.symm,\n  Pi.zero_apply, smul_eq_mul, smul_eq_mul, mul_zero, mul_zero]\n[GOAL]\ncase h₁\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nw : ι → ℝ\nu : ι → ℝˣ := fun i => if h : w i = 0 then 1 else Units.mk0 (w i) h\nhu' : ∀ (i : ι), (sign ↑(u i) * ↑(u i)) ^ (-(1 / 2)) ≠ 0\nv : ι → ℝ\nj : ι\nhj : j ∈ univ\n⊢ ¬j ∈ univ → (v j • ↑(IsUnit.unit (_ : IsUnit ((sign ↑(u j) * ↑(u j)) ^ (-(1 / 2))))) • ↑(Pi.basisFun ℝ ι) j) j = 0\n[PROOFSTEP]\nintro hj'\n[GOAL]\ncase h₁\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nw : ι → ℝ\nu : ι → ℝˣ := fun i => if h : w i = 0 then 1 else Units.mk0 (w i) h\nhu' : ∀ (i : ι), (sign ↑(u i) * ↑(u i)) ^ (-(1 / 2)) ≠ 0\nv : ι → ℝ\nj : ι\nhj : j ∈ univ\nhj' : ¬j ∈ univ\n⊢ (v j • ↑(IsUnit.unit (_ : IsUnit ((sign ↑(u j) * ↑(u j)) ^ (-(1 / 2))))) • ↑(Pi.basisFun ℝ ι) j) j = 0\n[PROOFSTEP]\nexact False.elim (hj' hj)\n[GOAL]\ncase h.e'_10.H\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nw : ι → ℝ\nu : ι → ℝˣ := fun i => if h : w i = 0 then 1 else Units.mk0 (w i) h\nhu' : ∀ (i : ι), (sign ↑(u i) * ↑(u i)) ^ (-(1 / 2)) ≠ 0\nv : ι → ℝ\nj : ι\nhj : j ∈ univ\nhsum :\n  Finset.sum univ\n      (fun i => v i • ↑(IsUnit.unit (_ : IsUnit ((sign ↑(u i) * ↑(u i)) ^ (-(1 / 2))))) • ↑(Pi.basisFun ℝ ι) i) j =\n    v j • (sign ↑(u j) * ↑(u j)) ^ (-(1 / 2))\n⊢ (sign ∘ w) j • (v j * v j) =\n    w j •\n      (Finset.sum univ\n          (fun i =>\n            v i •\n              ↑(Basis.unitsSMul (Pi.basisFun ℝ ι) fun i =>\n                    IsUnit.unit (_ : IsUnit ((sign ↑(u i) * ↑(u i)) ^ (-(1 / 2)))))\n                i)\n          j *\n        Finset.sum univ\n          (fun i =>\n            v i •\n              ↑(Basis.unitsSMul (Pi.basisFun ℝ ι) fun i =>\n                    IsUnit.unit (_ : IsUnit ((sign ↑(u i) * ↑(u i)) ^ (-(1 / 2)))))\n                i)\n          j)\n[PROOFSTEP]\nsimp_rw [Basis.unitsSMul_apply]\n[GOAL]\ncase h.e'_10.H\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nw : ι → ℝ\nu : ι → ℝˣ := fun i => if h : w i = 0 then 1 else Units.mk0 (w i) h\nhu' : ∀ (i : ι), (sign ↑(u i) * ↑(u i)) ^ (-(1 / 2)) ≠ 0\nv : ι → ℝ\nj : ι\nhj : j ∈ univ\nhsum :\n  Finset.sum univ\n      (fun i => v i • ↑(IsUnit.unit (_ : IsUnit ((sign ↑(u i) * ↑(u i)) ^ (-(1 / 2))))) • ↑(Pi.basisFun ℝ ι) i) j =\n    v j • (sign ↑(u j) * ↑(u j)) ^ (-(1 / 2))\n⊢ (sign ∘ w) j • (v j * v j) =\n    w j •\n      (Finset.sum univ\n          (fun x => v x • IsUnit.unit (_ : IsUnit ((sign ↑(u x) * ↑(u x)) ^ (-(1 / 2)))) • ↑(Pi.basisFun ℝ ι) x) j *\n        Finset.sum univ\n          (fun x => v x • IsUnit.unit (_ : IsUnit ((sign ↑(u x) * ↑(u x)) ^ (-(1 / 2)))) • ↑(Pi.basisFun ℝ ι) x) j)\n[PROOFSTEP]\nerw [hsum]\n[GOAL]\ncase h.e'_10.H\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nw : ι → ℝ\nu : ι → ℝˣ := fun i => if h : w i = 0 then 1 else Units.mk0 (w i) h\nhu' : ∀ (i : ι), (sign ↑(u i) * ↑(u i)) ^ (-(1 / 2)) ≠ 0\nv : ι → ℝ\nj : ι\nhj : j ∈ univ\nhsum :\n  Finset.sum univ\n      (fun i => v i • ↑(IsUnit.unit (_ : IsUnit ((sign ↑(u i) * ↑(u i)) ^ (-(1 / 2))))) • ↑(Pi.basisFun ℝ ι) i) j =\n    v j • (sign ↑(u j) * ↑(u j)) ^ (-(1 / 2))\n⊢ (sign ∘ w) j • (v j * v j) =\n    w j • (v j • (sign ↑(u j) * ↑(u j)) ^ (-(1 / 2)) * v j • (sign ↑(u j) * ↑(u j)) ^ (-(1 / 2)))\n[PROOFSTEP]\nsimp only [Function.comp, smul_eq_mul]\n[GOAL]\ncase h.e'_10.H\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nw : ι → ℝ\nu : ι → ℝˣ := fun i => if h : w i = 0 then 1 else Units.mk0 (w i) h\nhu' : ∀ (i : ι), (sign ↑(u i) * ↑(u i)) ^ (-(1 / 2)) ≠ 0\nv : ι → ℝ\nj : ι\nhj : j ∈ univ\nhsum :\n  Finset.sum univ\n      (fun i => v i • ↑(IsUnit.unit (_ : IsUnit ((sign ↑(u i) * ↑(u i)) ^ (-(1 / 2))))) • ↑(Pi.basisFun ℝ ι) i) j =\n    v j • (sign ↑(u j) * ↑(u j)) ^ (-(1 / 2))\n⊢ sign (w j) * (v j * v j) =\n    w j *\n      (v j *\n          (sign ↑(if h : w j = 0 then 1 else Units.mk0 (w j) h) * ↑(if h : w j = 0 then 1 else Units.mk0 (w j) h)) ^\n            (-(1 / 2)) *\n        (v j *\n          (sign ↑(if h : w j = 0 then 1 else Units.mk0 (w j) h) * ↑(if h : w j = 0 then 1 else Units.mk0 (w j) h)) ^\n            (-(1 / 2))))\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nw : ι → ℝ\nu : ι → ℝˣ := fun i => if h : w i = 0 then 1 else Units.mk0 (w i) h\nhu' : ∀ (i : ι), (sign ↑(u i) * ↑(u i)) ^ (-(1 / 2)) ≠ 0\nv : ι → ℝ\nj : ι\nhj : j ∈ univ\nhsum :\n  Finset.sum univ\n      (fun i => v i • ↑(IsUnit.unit (_ : IsUnit ((sign ↑(u i) * ↑(u i)) ^ (-(1 / 2))))) • ↑(Pi.basisFun ℝ ι) i) j =\n    v j • (sign ↑(u j) * ↑(u j)) ^ (-(1 / 2))\nh : w j = 0\n⊢ sign (w j) * (v j * v j) = w j * (v j * (sign ↑1 * ↑1) ^ (-(1 / 2)) * (v j * (sign ↑1 * ↑1) ^ (-(1 / 2))))\n[PROOFSTEP]\nsimp only [h, zero_smul, zero_mul, Real.sign_zero]\n[GOAL]\ncase neg\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nw : ι → ℝ\nu : ι → ℝˣ := fun i => if h : w i = 0 then 1 else Units.mk0 (w i) h\nhu' : ∀ (i : ι), (sign ↑(u i) * ↑(u i)) ^ (-(1 / 2)) ≠ 0\nv : ι → ℝ\nj : ι\nhj : j ∈ univ\nhsum :\n  Finset.sum univ\n      (fun i => v i • ↑(IsUnit.unit (_ : IsUnit ((sign ↑(u i) * ↑(u i)) ^ (-(1 / 2))))) • ↑(Pi.basisFun ℝ ι) i) j =\n    v j • (sign ↑(u j) * ↑(u j)) ^ (-(1 / 2))\nh : ¬w j = 0\n⊢ sign (w j) * (v j * v j) =\n    w j *\n      (v j * (sign ↑(Units.mk0 (w j) h) * ↑(Units.mk0 (w j) h)) ^ (-(1 / 2)) *\n        (v j * (sign ↑(Units.mk0 (w j) h) * ↑(Units.mk0 (w j) h)) ^ (-(1 / 2))))\n[PROOFSTEP]\nhave hwu : w j = u j := by simp only [dif_neg h, Units.val_mk0]\n[GOAL]\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nw : ι → ℝ\nu : ι → ℝˣ := fun i => if h : w i = 0 then 1 else Units.mk0 (w i) h\nhu' : ∀ (i : ι), (sign ↑(u i) * ↑(u i)) ^ (-(1 / 2)) ≠ 0\nv : ι → ℝ\nj : ι\nhj : j ∈ univ\nhsum :\n  Finset.sum univ\n      (fun i => v i • ↑(IsUnit.unit (_ : IsUnit ((sign ↑(u i) * ↑(u i)) ^ (-(1 / 2))))) • ↑(Pi.basisFun ℝ ι) i) j =\n    v j • (sign ↑(u j) * ↑(u j)) ^ (-(1 / 2))\nh : ¬w j = 0\n⊢ w j = ↑(u j)\n[PROOFSTEP]\nsimp only [dif_neg h, Units.val_mk0]\n[GOAL]\ncase neg\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nw : ι → ℝ\nu : ι → ℝˣ := fun i => if h : w i = 0 then 1 else Units.mk0 (w i) h\nhu' : ∀ (i : ι), (sign ↑(u i) * ↑(u i)) ^ (-(1 / 2)) ≠ 0\nv : ι → ℝ\nj : ι\nhj : j ∈ univ\nhsum :\n  Finset.sum univ\n      (fun i => v i • ↑(IsUnit.unit (_ : IsUnit ((sign ↑(u i) * ↑(u i)) ^ (-(1 / 2))))) • ↑(Pi.basisFun ℝ ι) i) j =\n    v j • (sign ↑(u j) * ↑(u j)) ^ (-(1 / 2))\nh : ¬w j = 0\nhwu : w j = ↑(u j)\n⊢ sign (w j) * (v j * v j) =\n    w j *\n      (v j * (sign ↑(Units.mk0 (w j) h) * ↑(Units.mk0 (w j) h)) ^ (-(1 / 2)) *\n        (v j * (sign ↑(Units.mk0 (w j) h) * ↑(Units.mk0 (w j) h)) ^ (-(1 / 2))))\n[PROOFSTEP]\nsimp only [Units.val_mk0]\n[GOAL]\ncase neg\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nw : ι → ℝ\nu : ι → ℝˣ := fun i => if h : w i = 0 then 1 else Units.mk0 (w i) h\nhu' : ∀ (i : ι), (sign ↑(u i) * ↑(u i)) ^ (-(1 / 2)) ≠ 0\nv : ι → ℝ\nj : ι\nhj : j ∈ univ\nhsum :\n  Finset.sum univ\n      (fun i => v i • ↑(IsUnit.unit (_ : IsUnit ((sign ↑(u i) * ↑(u i)) ^ (-(1 / 2))))) • ↑(Pi.basisFun ℝ ι) i) j =\n    v j • (sign ↑(u j) * ↑(u j)) ^ (-(1 / 2))\nh : ¬w j = 0\nhwu : w j = ↑(u j)\n⊢ sign (w j) * (v j * v j) = w j * (v j * (sign (w j) * w j) ^ (-(1 / 2)) * (v j * (sign (w j) * w j) ^ (-(1 / 2))))\n[PROOFSTEP]\nrw [hwu]\n[GOAL]\ncase neg\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nw : ι → ℝ\nu : ι → ℝˣ := fun i => if h : w i = 0 then 1 else Units.mk0 (w i) h\nhu' : ∀ (i : ι), (sign ↑(u i) * ↑(u i)) ^ (-(1 / 2)) ≠ 0\nv : ι → ℝ\nj : ι\nhj : j ∈ univ\nhsum :\n  Finset.sum univ\n      (fun i => v i • ↑(IsUnit.unit (_ : IsUnit ((sign ↑(u i) * ↑(u i)) ^ (-(1 / 2))))) • ↑(Pi.basisFun ℝ ι) i) j =\n    v j • (sign ↑(u j) * ↑(u j)) ^ (-(1 / 2))\nh : ¬w j = 0\nhwu : w j = ↑(u j)\n⊢ sign ↑(u j) * (v j * v j) =\n    ↑(u j) * (v j * (sign ↑(u j) * ↑(u j)) ^ (-(1 / 2)) * (v j * (sign ↑(u j) * ↑(u j)) ^ (-(1 / 2))))\n[PROOFSTEP]\nsuffices\n  (u j : ℝ).sign * v j * v j =\n    (Real.sign (u j) * u j) ^ (-(1 / 2 : ℝ)) * (Real.sign (u j) * u j) ^ (-(1 / 2 : ℝ)) * u j * v j * v j\n  by erw [← mul_assoc, this]; ring\n[GOAL]\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nw : ι → ℝ\nu : ι → ℝˣ := fun i => if h : w i = 0 then 1 else Units.mk0 (w i) h\nhu' : ∀ (i : ι), (sign ↑(u i) * ↑(u i)) ^ (-(1 / 2)) ≠ 0\nv : ι → ℝ\nj : ι\nhj : j ∈ univ\nhsum :\n  Finset.sum univ\n      (fun i => v i • ↑(IsUnit.unit (_ : IsUnit ((sign ↑(u i) * ↑(u i)) ^ (-(1 / 2))))) • ↑(Pi.basisFun ℝ ι) i) j =\n    v j • (sign ↑(u j) * ↑(u j)) ^ (-(1 / 2))\nh : ¬w j = 0\nhwu : w j = ↑(u j)\nthis :\n  sign ↑(u j) * v j * v j =\n    (sign ↑(u j) * ↑(u j)) ^ (-(1 / 2)) * (sign ↑(u j) * ↑(u j)) ^ (-(1 / 2)) * ↑(u j) * v j * v j\n⊢ sign ↑(u j) * (v j * v j) =\n    ↑(u j) * (v j * (sign ↑(u j) * ↑(u j)) ^ (-(1 / 2)) * (v j * (sign ↑(u j) * ↑(u j)) ^ (-(1 / 2))))\n[PROOFSTEP]\nerw [← mul_assoc, this]\n[GOAL]\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nw : ι → ℝ\nu : ι → ℝˣ := fun i => if h : w i = 0 then 1 else Units.mk0 (w i) h\nhu' : ∀ (i : ι), (sign ↑(u i) * ↑(u i)) ^ (-(1 / 2)) ≠ 0\nv : ι → ℝ\nj : ι\nhj : j ∈ univ\nhsum :\n  Finset.sum univ\n      (fun i => v i • ↑(IsUnit.unit (_ : IsUnit ((sign ↑(u i) * ↑(u i)) ^ (-(1 / 2))))) • ↑(Pi.basisFun ℝ ι) i) j =\n    v j • (sign ↑(u j) * ↑(u j)) ^ (-(1 / 2))\nh : ¬w j = 0\nhwu : w j = ↑(u j)\nthis :\n  sign ↑(u j) * v j * v j =\n    (sign ↑(u j) * ↑(u j)) ^ (-(1 / 2)) * (sign ↑(u j) * ↑(u j)) ^ (-(1 / 2)) * ↑(u j) * v j * v j\n⊢ (sign ↑(u j) * ↑(u j)) ^ (-(1 / 2)) * (sign ↑(u j) * ↑(u j)) ^ (-(1 / 2)) * ↑(u j) * v j * v j =\n    ↑(u j) * (v j * (sign ↑(u j) * ↑(u j)) ^ (-(1 / 2)) * (v j * (sign ↑(u j) * ↑(u j)) ^ (-(1 / 2))))\n[PROOFSTEP]\nring\n[GOAL]\ncase neg\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nw : ι → ℝ\nu : ι → ℝˣ := fun i => if h : w i = 0 then 1 else Units.mk0 (w i) h\nhu' : ∀ (i : ι), (sign ↑(u i) * ↑(u i)) ^ (-(1 / 2)) ≠ 0\nv : ι → ℝ\nj : ι\nhj : j ∈ univ\nhsum :\n  Finset.sum univ\n      (fun i => v i • ↑(IsUnit.unit (_ : IsUnit ((sign ↑(u i) * ↑(u i)) ^ (-(1 / 2))))) • ↑(Pi.basisFun ℝ ι) i) j =\n    v j • (sign ↑(u j) * ↑(u j)) ^ (-(1 / 2))\nh : ¬w j = 0\nhwu : w j = ↑(u j)\n⊢ sign ↑(u j) * v j * v j =\n    (sign ↑(u j) * ↑(u j)) ^ (-(1 / 2)) * (sign ↑(u j) * ↑(u j)) ^ (-(1 / 2)) * ↑(u j) * v j * v j\n[PROOFSTEP]\nrw [← Real.rpow_add (sign_mul_pos_of_ne_zero _ <| Units.ne_zero _), show -(1 / 2 : ℝ) + -(1 / 2) = -1 by ring,\n  Real.rpow_neg_one, mul_inv, inv_sign, mul_assoc (Real.sign (u j)) (u j)⁻¹, inv_mul_cancel (Units.ne_zero _), mul_one]\n[GOAL]\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nw : ι → ℝ\nu : ι → ℝˣ := fun i => if h : w i = 0 then 1 else Units.mk0 (w i) h\nhu' : ∀ (i : ι), (sign ↑(u i) * ↑(u i)) ^ (-(1 / 2)) ≠ 0\nv : ι → ℝ\nj : ι\nhj : j ∈ univ\nhsum :\n  Finset.sum univ\n      (fun i => v i • ↑(IsUnit.unit (_ : IsUnit ((sign ↑(u i) * ↑(u i)) ^ (-(1 / 2))))) • ↑(Pi.basisFun ℝ ι) i) j =\n    v j • (sign ↑(u j) * ↑(u j)) ^ (-(1 / 2))\nh : ¬w j = 0\nhwu : w j = ↑(u j)\n⊢ -(1 / 2) + -(1 / 2) = -1\n[PROOFSTEP]\nring\n", "meta": {"mathlib_filename": "Mathlib.LinearAlgebra.QuadraticForm.Real", "llama_tokens": 9686, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.787931190663057, "lm_q2_score": 0.6548947290421275, "lm_q1q2_score": 0.5160119836131236}}
{"text": "[GOAL]\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁷ : Semiring R\ninst✝⁶ : TopologicalSpace F\ninst✝⁵ : TopologicalSpace B\ne✝ : Pretrivialization F TotalSpace.proj\nx : TotalSpace F E\nb✝ : B\ny : E b✝\ninst✝⁴ : AddCommMonoid F\ninst✝³ : Module R F\ninst✝² : (x : B) → AddCommMonoid (E x)\ninst✝¹ : (x : B) → Module R (E x)\ne : Pretrivialization F TotalSpace.proj\ninst✝ : Pretrivialization.IsLinear R e\nb : B\n⊢ F →ₗ[R] E b\n[PROOFSTEP]\nrefine' IsLinearMap.mk' (e.symm b) _\n[GOAL]\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁷ : Semiring R\ninst✝⁶ : TopologicalSpace F\ninst✝⁵ : TopologicalSpace B\ne✝ : Pretrivialization F TotalSpace.proj\nx : TotalSpace F E\nb✝ : B\ny : E b✝\ninst✝⁴ : AddCommMonoid F\ninst✝³ : Module R F\ninst✝² : (x : B) → AddCommMonoid (E x)\ninst✝¹ : (x : B) → Module R (E x)\ne : Pretrivialization F TotalSpace.proj\ninst✝ : Pretrivialization.IsLinear R e\nb : B\n⊢ IsLinearMap R (Pretrivialization.symm e b)\n[PROOFSTEP]\nby_cases hb : b ∈ e.baseSet\n[GOAL]\ncase pos\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁷ : Semiring R\ninst✝⁶ : TopologicalSpace F\ninst✝⁵ : TopologicalSpace B\ne✝ : Pretrivialization F TotalSpace.proj\nx : TotalSpace F E\nb✝ : B\ny : E b✝\ninst✝⁴ : AddCommMonoid F\ninst✝³ : Module R F\ninst✝² : (x : B) → AddCommMonoid (E x)\ninst✝¹ : (x : B) → Module R (E x)\ne : Pretrivialization F TotalSpace.proj\ninst✝ : Pretrivialization.IsLinear R e\nb : B\nhb : b ∈ e.baseSet\n⊢ IsLinearMap R (Pretrivialization.symm e b)\n[PROOFSTEP]\nexact\n  (((e.linear R hb).mk' _).inverse (e.symm b) (e.symm_apply_apply_mk hb) fun v ↦\n      congr_arg Prod.snd <| e.apply_mk_symm hb v).isLinear\n[GOAL]\ncase neg\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁷ : Semiring R\ninst✝⁶ : TopologicalSpace F\ninst✝⁵ : TopologicalSpace B\ne✝ : Pretrivialization F TotalSpace.proj\nx : TotalSpace F E\nb✝ : B\ny : E b✝\ninst✝⁴ : AddCommMonoid F\ninst✝³ : Module R F\ninst✝² : (x : B) → AddCommMonoid (E x)\ninst✝¹ : (x : B) → Module R (E x)\ne : Pretrivialization F TotalSpace.proj\ninst✝ : Pretrivialization.IsLinear R e\nb : B\nhb : ¬b ∈ e.baseSet\n⊢ IsLinearMap R (Pretrivialization.symm e b)\n[PROOFSTEP]\nrw [e.coe_symm_of_not_mem hb]\n[GOAL]\ncase neg\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁷ : Semiring R\ninst✝⁶ : TopologicalSpace F\ninst✝⁵ : TopologicalSpace B\ne✝ : Pretrivialization F TotalSpace.proj\nx : TotalSpace F E\nb✝ : B\ny : E b✝\ninst✝⁴ : AddCommMonoid F\ninst✝³ : Module R F\ninst✝² : (x : B) → AddCommMonoid (E x)\ninst✝¹ : (x : B) → Module R (E x)\ne : Pretrivialization F TotalSpace.proj\ninst✝ : Pretrivialization.IsLinear R e\nb : B\nhb : ¬b ∈ e.baseSet\n⊢ IsLinearMap R 0\n[PROOFSTEP]\nexact (0 : F →ₗ[R] E b).isLinear\n[GOAL]\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁷ : Semiring R\ninst✝⁶ : TopologicalSpace F\ninst✝⁵ : TopologicalSpace B\ne✝ : Pretrivialization F TotalSpace.proj\nx : TotalSpace F E\nb✝ : B\ny : E b✝\ninst✝⁴ : AddCommMonoid F\ninst✝³ : Module R F\ninst✝² : (x : B) → AddCommMonoid (E x)\ninst✝¹ : (x : B) → Module R (E x)\ne : Pretrivialization F TotalSpace.proj\ninst✝ : Pretrivialization.IsLinear R e\nb : B\nhb : b ∈ e.baseSet\nv : F\n⊢ AddHom.toFun\n      {\n          toAddHom :=\n            { toFun := fun y => (↑e { proj := b, snd := y }).snd,\n              map_add' :=\n                (_ :\n                  ∀ (v w : E b),\n                    (↑e { proj := b, snd := v + w }).snd =\n                      (↑e { proj := b, snd := v }).snd + (↑e { proj := b, snd := w }).snd) },\n          map_smul' :=\n            (_ :\n              ∀ (c : R) (v : E b),\n                (↑e { proj := b, snd := c • v }).snd = c • (↑e { proj := b, snd := v }).snd) }.toAddHom\n      (Pretrivialization.symm e b v) =\n    v\n[PROOFSTEP]\nsimp_rw [e.apply_mk_symm hb v]\n[GOAL]\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁷ : Semiring R\ninst✝⁶ : TopologicalSpace F\ninst✝⁵ : TopologicalSpace B\ne✝ : Pretrivialization F TotalSpace.proj\nx : TotalSpace F E\nb✝ : B\ny : E b✝\ninst✝⁴ : AddCommMonoid F\ninst✝³ : Module R F\ninst✝² : (x : B) → AddCommMonoid (E x)\ninst✝¹ : (x : B) → Module R (E x)\ne : Pretrivialization F TotalSpace.proj\ninst✝ : Pretrivialization.IsLinear R e\nb : B\n⊢ ↑(Pretrivialization.linearMapAt R e b) = fun y => if b ∈ e.baseSet then (↑e { proj := b, snd := y }).snd else 0\n[PROOFSTEP]\nrw [Pretrivialization.linearMapAt]\n[GOAL]\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁷ : Semiring R\ninst✝⁶ : TopologicalSpace F\ninst✝⁵ : TopologicalSpace B\ne✝ : Pretrivialization F TotalSpace.proj\nx : TotalSpace F E\nb✝ : B\ny : E b✝\ninst✝⁴ : AddCommMonoid F\ninst✝³ : Module R F\ninst✝² : (x : B) → AddCommMonoid (E x)\ninst✝¹ : (x : B) → Module R (E x)\ne : Pretrivialization F TotalSpace.proj\ninst✝ : Pretrivialization.IsLinear R e\nb : B\n⊢ ↑(if hb : b ∈ e.baseSet then ↑(linearEquivAt R e b hb) else 0) = fun y =>\n    if b ∈ e.baseSet then (↑e { proj := b, snd := y }).snd else 0\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁷ : Semiring R\ninst✝⁶ : TopologicalSpace F\ninst✝⁵ : TopologicalSpace B\ne✝ : Pretrivialization F TotalSpace.proj\nx : TotalSpace F E\nb✝ : B\ny : E b✝\ninst✝⁴ : AddCommMonoid F\ninst✝³ : Module R F\ninst✝² : (x : B) → AddCommMonoid (E x)\ninst✝¹ : (x : B) → Module R (E x)\ne : Pretrivialization F TotalSpace.proj\ninst✝ : Pretrivialization.IsLinear R e\nb : B\nh✝ : b ∈ e.baseSet\n⊢ ↑↑(linearEquivAt R e b h✝) = fun y => (↑e { proj := b, snd := y }).snd\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁷ : Semiring R\ninst✝⁶ : TopologicalSpace F\ninst✝⁵ : TopologicalSpace B\ne✝ : Pretrivialization F TotalSpace.proj\nx : TotalSpace F E\nb✝ : B\ny : E b✝\ninst✝⁴ : AddCommMonoid F\ninst✝³ : Module R F\ninst✝² : (x : B) → AddCommMonoid (E x)\ninst✝¹ : (x : B) → Module R (E x)\ne : Pretrivialization F TotalSpace.proj\ninst✝ : Pretrivialization.IsLinear R e\nb : B\nh✝ : ¬b ∈ e.baseSet\n⊢ ↑0 = fun y => 0\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁷ : Semiring R\ninst✝⁶ : TopologicalSpace F\ninst✝⁵ : TopologicalSpace B\ne✝ : Pretrivialization F TotalSpace.proj\nx : TotalSpace F E\nb✝ : B\ny : E b✝\ninst✝⁴ : AddCommMonoid F\ninst✝³ : Module R F\ninst✝² : (x : B) → AddCommMonoid (E x)\ninst✝¹ : (x : B) → Module R (E x)\ne : Pretrivialization F TotalSpace.proj\ninst✝ : Pretrivialization.IsLinear R e\nb : B\nhb : b ∈ e.baseSet\n⊢ ↑(Pretrivialization.linearMapAt R e b) = fun y => (↑e { proj := b, snd := y }).snd\n[PROOFSTEP]\nsimp_rw [coe_linearMapAt, if_pos hb]\n[GOAL]\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁷ : Semiring R\ninst✝⁶ : TopologicalSpace F\ninst✝⁵ : TopologicalSpace B\ne✝ : Pretrivialization F TotalSpace.proj\nx : TotalSpace F E\nb✝ : B\ny✝ : E b✝\ninst✝⁴ : AddCommMonoid F\ninst✝³ : Module R F\ninst✝² : (x : B) → AddCommMonoid (E x)\ninst✝¹ : (x : B) → Module R (E x)\ne : Pretrivialization F TotalSpace.proj\ninst✝ : Pretrivialization.IsLinear R e\nb : B\ny : E b\n⊢ ↑(Pretrivialization.linearMapAt R e b) y = if b ∈ e.baseSet then (↑e { proj := b, snd := y }).snd else 0\n[PROOFSTEP]\nrw [coe_linearMapAt]\n[GOAL]\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁷ : Semiring R\ninst✝⁶ : TopologicalSpace F\ninst✝⁵ : TopologicalSpace B\ne✝ : Pretrivialization F TotalSpace.proj\nx : TotalSpace F E\nb✝ : B\ny✝ : E b✝\ninst✝⁴ : AddCommMonoid F\ninst✝³ : Module R F\ninst✝² : (x : B) → AddCommMonoid (E x)\ninst✝¹ : (x : B) → Module R (E x)\ne : Pretrivialization F TotalSpace.proj\ninst✝ : Pretrivialization.IsLinear R e\nb : B\nhb : b ∈ e.baseSet\ny : E b\n⊢ ↑(Pretrivialization.symmₗ R e b) (↑(Pretrivialization.linearMapAt R e b) y) = y\n[PROOFSTEP]\nrw [e.linearMapAt_def_of_mem hb]\n[GOAL]\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁷ : Semiring R\ninst✝⁶ : TopologicalSpace F\ninst✝⁵ : TopologicalSpace B\ne✝ : Pretrivialization F TotalSpace.proj\nx : TotalSpace F E\nb✝ : B\ny✝ : E b✝\ninst✝⁴ : AddCommMonoid F\ninst✝³ : Module R F\ninst✝² : (x : B) → AddCommMonoid (E x)\ninst✝¹ : (x : B) → Module R (E x)\ne : Pretrivialization F TotalSpace.proj\ninst✝ : Pretrivialization.IsLinear R e\nb : B\nhb : b ∈ e.baseSet\ny : E b\n⊢ ↑(Pretrivialization.symmₗ R e b) (↑↑(linearEquivAt R e b hb) y) = y\n[PROOFSTEP]\nexact (e.linearEquivAt R b hb).left_inv y\n[GOAL]\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁷ : Semiring R\ninst✝⁶ : TopologicalSpace F\ninst✝⁵ : TopologicalSpace B\ne✝ : Pretrivialization F TotalSpace.proj\nx : TotalSpace F E\nb✝ : B\ny✝ : E b✝\ninst✝⁴ : AddCommMonoid F\ninst✝³ : Module R F\ninst✝² : (x : B) → AddCommMonoid (E x)\ninst✝¹ : (x : B) → Module R (E x)\ne : Pretrivialization F TotalSpace.proj\ninst✝ : Pretrivialization.IsLinear R e\nb : B\nhb : b ∈ e.baseSet\ny : F\n⊢ ↑(Pretrivialization.linearMapAt R e b) (↑(Pretrivialization.symmₗ R e b) y) = y\n[PROOFSTEP]\nrw [e.linearMapAt_def_of_mem hb]\n[GOAL]\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁷ : Semiring R\ninst✝⁶ : TopologicalSpace F\ninst✝⁵ : TopologicalSpace B\ne✝ : Pretrivialization F TotalSpace.proj\nx : TotalSpace F E\nb✝ : B\ny✝ : E b✝\ninst✝⁴ : AddCommMonoid F\ninst✝³ : Module R F\ninst✝² : (x : B) → AddCommMonoid (E x)\ninst✝¹ : (x : B) → Module R (E x)\ne : Pretrivialization F TotalSpace.proj\ninst✝ : Pretrivialization.IsLinear R e\nb : B\nhb : b ∈ e.baseSet\ny : F\n⊢ ↑↑(linearEquivAt R e b hb) (↑(Pretrivialization.symmₗ R e b) y) = y\n[PROOFSTEP]\nexact (e.linearEquivAt R b hb).right_inv y\n[GOAL]\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁸ : Semiring R\ninst✝⁷ : TopologicalSpace F\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace (TotalSpace F E)\ne✝ : Trivialization F TotalSpace.proj\nx : TotalSpace F E\nb✝ : B\ny : E b✝\ninst✝⁴ : AddCommMonoid F\ninst✝³ : Module R F\ninst✝² : (x : B) → AddCommMonoid (E x)\ninst✝¹ : (x : B) → Module R (E x)\ne : Trivialization F TotalSpace.proj\ninst✝ : Trivialization.IsLinear R e\nb : B\nhb : b ∈ e.baseSet\n⊢ ↑(Trivialization.linearMapAt R e b) = fun y => (↑e { proj := b, snd := y }).snd\n[PROOFSTEP]\nsimp_rw [coe_linearMapAt, if_pos hb]\n[GOAL]\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁸ : Semiring R\ninst✝⁷ : TopologicalSpace F\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace (TotalSpace F E)\ne✝ : Trivialization F TotalSpace.proj\nx : TotalSpace F E\nb✝ : B\ny✝ : E b✝\ninst✝⁴ : AddCommMonoid F\ninst✝³ : Module R F\ninst✝² : (x : B) → AddCommMonoid (E x)\ninst✝¹ : (x : B) → Module R (E x)\ne : Trivialization F TotalSpace.proj\ninst✝ : Trivialization.IsLinear R e\nb : B\ny : E b\n⊢ ↑(Trivialization.linearMapAt R e b) y = if b ∈ e.baseSet then (↑e { proj := b, snd := y }).snd else 0\n[PROOFSTEP]\nrw [coe_linearMapAt]\n[GOAL]\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁹ : Semiring R\ninst✝⁸ : TopologicalSpace F\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : TopologicalSpace (TotalSpace F E)\ne✝ : Trivialization F TotalSpace.proj\nx : TotalSpace F E\nb✝ : B\ny : E b✝\ninst✝⁵ : AddCommMonoid F\ninst✝⁴ : Module R F\ninst✝³ : (x : B) → AddCommMonoid (E x)\ninst✝² : (x : B) → Module R (E x)\ne e' : Trivialization F TotalSpace.proj\ninst✝¹ : Trivialization.IsLinear R e\ninst✝ : Trivialization.IsLinear R e'\nb : B\n⊢ Continuous\n    (↑(if hb : b ∈ e.baseSet ∩ e'.baseSet then\n            LinearEquiv.trans (LinearEquiv.symm (linearEquivAt R e b (_ : b ∈ e.baseSet)))\n              (linearEquivAt R e' b (_ : b ∈ e'.baseSet))\n          else LinearEquiv.refl R F)).toAddHom.toFun\n[PROOFSTEP]\nby_cases hb : b ∈ e.baseSet ∩ e'.baseSet\n[GOAL]\ncase pos\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁹ : Semiring R\ninst✝⁸ : TopologicalSpace F\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : TopologicalSpace (TotalSpace F E)\ne✝ : Trivialization F TotalSpace.proj\nx : TotalSpace F E\nb✝ : B\ny : E b✝\ninst✝⁵ : AddCommMonoid F\ninst✝⁴ : Module R F\ninst✝³ : (x : B) → AddCommMonoid (E x)\ninst✝² : (x : B) → Module R (E x)\ne e' : Trivialization F TotalSpace.proj\ninst✝¹ : Trivialization.IsLinear R e\ninst✝ : Trivialization.IsLinear R e'\nb : B\nhb : b ∈ e.baseSet ∩ e'.baseSet\n⊢ Continuous\n    (↑(if hb : b ∈ e.baseSet ∩ e'.baseSet then\n            LinearEquiv.trans (LinearEquiv.symm (linearEquivAt R e b (_ : b ∈ e.baseSet)))\n              (linearEquivAt R e' b (_ : b ∈ e'.baseSet))\n          else LinearEquiv.refl R F)).toAddHom.toFun\n[PROOFSTEP]\nrw [dif_pos hb]\n[GOAL]\ncase pos\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁹ : Semiring R\ninst✝⁸ : TopologicalSpace F\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : TopologicalSpace (TotalSpace F E)\ne✝ : Trivialization F TotalSpace.proj\nx : TotalSpace F E\nb✝ : B\ny : E b✝\ninst✝⁵ : AddCommMonoid F\ninst✝⁴ : Module R F\ninst✝³ : (x : B) → AddCommMonoid (E x)\ninst✝² : (x : B) → Module R (E x)\ne e' : Trivialization F TotalSpace.proj\ninst✝¹ : Trivialization.IsLinear R e\ninst✝ : Trivialization.IsLinear R e'\nb : B\nhb : b ∈ e.baseSet ∩ e'.baseSet\n⊢ Continuous\n    (↑(LinearEquiv.trans (LinearEquiv.symm (linearEquivAt R e b (_ : b ∈ e.baseSet)))\n            (linearEquivAt R e' b (_ : b ∈ e'.baseSet)))).toAddHom.toFun\n[PROOFSTEP]\nrefine' (e'.continuousOn.comp_continuous _ _).snd\n[GOAL]\ncase pos.refine'_1\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁹ : Semiring R\ninst✝⁸ : TopologicalSpace F\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : TopologicalSpace (TotalSpace F E)\ne✝ : Trivialization F TotalSpace.proj\nx : TotalSpace F E\nb✝ : B\ny : E b✝\ninst✝⁵ : AddCommMonoid F\ninst✝⁴ : Module R F\ninst✝³ : (x : B) → AddCommMonoid (E x)\ninst✝² : (x : B) → Module R (E x)\ne e' : Trivialization F TotalSpace.proj\ninst✝¹ : Trivialization.IsLinear R e\ninst✝ : Trivialization.IsLinear R e'\nb : B\nhb : b ∈ e.baseSet ∩ e'.baseSet\n⊢ Continuous fun a => { proj := b, snd := ↑↑(LinearEquiv.symm (linearEquivAt R e b (_ : b ∈ e.baseSet))) a }\n[PROOFSTEP]\nexact e.continuousOn_symm.comp_continuous (Continuous.Prod.mk b) fun y => mk_mem_prod hb.1 (mem_univ y)\n[GOAL]\ncase pos.refine'_2\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁹ : Semiring R\ninst✝⁸ : TopologicalSpace F\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : TopologicalSpace (TotalSpace F E)\ne✝ : Trivialization F TotalSpace.proj\nx : TotalSpace F E\nb✝ : B\ny : E b✝\ninst✝⁵ : AddCommMonoid F\ninst✝⁴ : Module R F\ninst✝³ : (x : B) → AddCommMonoid (E x)\ninst✝² : (x : B) → Module R (E x)\ne e' : Trivialization F TotalSpace.proj\ninst✝¹ : Trivialization.IsLinear R e\ninst✝ : Trivialization.IsLinear R e'\nb : B\nhb : b ∈ e.baseSet ∩ e'.baseSet\n⊢ ∀ (x : F), { proj := b, snd := ↑↑(LinearEquiv.symm (linearEquivAt R e b (_ : b ∈ e.baseSet))) x } ∈ e'.source\n[PROOFSTEP]\nexact fun y => e'.mem_source.mpr hb.2\n[GOAL]\ncase neg\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁹ : Semiring R\ninst✝⁸ : TopologicalSpace F\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : TopologicalSpace (TotalSpace F E)\ne✝ : Trivialization F TotalSpace.proj\nx : TotalSpace F E\nb✝ : B\ny : E b✝\ninst✝⁵ : AddCommMonoid F\ninst✝⁴ : Module R F\ninst✝³ : (x : B) → AddCommMonoid (E x)\ninst✝² : (x : B) → Module R (E x)\ne e' : Trivialization F TotalSpace.proj\ninst✝¹ : Trivialization.IsLinear R e\ninst✝ : Trivialization.IsLinear R e'\nb : B\nhb : ¬b ∈ e.baseSet ∩ e'.baseSet\n⊢ Continuous\n    (↑(if hb : b ∈ e.baseSet ∩ e'.baseSet then\n            LinearEquiv.trans (LinearEquiv.symm (linearEquivAt R e b (_ : b ∈ e.baseSet)))\n              (linearEquivAt R e' b (_ : b ∈ e'.baseSet))\n          else LinearEquiv.refl R F)).toAddHom.toFun\n[PROOFSTEP]\nrw [dif_neg hb]\n[GOAL]\ncase neg\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁹ : Semiring R\ninst✝⁸ : TopologicalSpace F\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : TopologicalSpace (TotalSpace F E)\ne✝ : Trivialization F TotalSpace.proj\nx : TotalSpace F E\nb✝ : B\ny : E b✝\ninst✝⁵ : AddCommMonoid F\ninst✝⁴ : Module R F\ninst✝³ : (x : B) → AddCommMonoid (E x)\ninst✝² : (x : B) → Module R (E x)\ne e' : Trivialization F TotalSpace.proj\ninst✝¹ : Trivialization.IsLinear R e\ninst✝ : Trivialization.IsLinear R e'\nb : B\nhb : ¬b ∈ e.baseSet ∩ e'.baseSet\n⊢ Continuous (↑(LinearEquiv.refl R F)).toAddHom.toFun\n[PROOFSTEP]\nexact continuous_id\n[GOAL]\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁹ : Semiring R\ninst✝⁸ : TopologicalSpace F\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : TopologicalSpace (TotalSpace F E)\ne✝ : Trivialization F TotalSpace.proj\nx : TotalSpace F E\nb✝ : B\ny : E b✝\ninst✝⁵ : AddCommMonoid F\ninst✝⁴ : Module R F\ninst✝³ : (x : B) → AddCommMonoid (E x)\ninst✝² : (x : B) → Module R (E x)\ne e' : Trivialization F TotalSpace.proj\ninst✝¹ : Trivialization.IsLinear R e\ninst✝ : Trivialization.IsLinear R e'\nb : B\n⊢ Continuous\n    (if hb : b ∈ e.baseSet ∩ e'.baseSet then\n        LinearEquiv.trans (LinearEquiv.symm (linearEquivAt R e b (_ : b ∈ e.baseSet)))\n          (linearEquivAt R e' b (_ : b ∈ e'.baseSet))\n      else LinearEquiv.refl R F).invFun\n[PROOFSTEP]\nby_cases hb : b ∈ e.baseSet ∩ e'.baseSet\n[GOAL]\ncase pos\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁹ : Semiring R\ninst✝⁸ : TopologicalSpace F\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : TopologicalSpace (TotalSpace F E)\ne✝ : Trivialization F TotalSpace.proj\nx : TotalSpace F E\nb✝ : B\ny : E b✝\ninst✝⁵ : AddCommMonoid F\ninst✝⁴ : Module R F\ninst✝³ : (x : B) → AddCommMonoid (E x)\ninst✝² : (x : B) → Module R (E x)\ne e' : Trivialization F TotalSpace.proj\ninst✝¹ : Trivialization.IsLinear R e\ninst✝ : Trivialization.IsLinear R e'\nb : B\nhb : b ∈ e.baseSet ∩ e'.baseSet\n⊢ Continuous\n    (if hb : b ∈ e.baseSet ∩ e'.baseSet then\n        LinearEquiv.trans (LinearEquiv.symm (linearEquivAt R e b (_ : b ∈ e.baseSet)))\n          (linearEquivAt R e' b (_ : b ∈ e'.baseSet))\n      else LinearEquiv.refl R F).invFun\n[PROOFSTEP]\nrw [dif_pos hb]\n[GOAL]\ncase pos\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁹ : Semiring R\ninst✝⁸ : TopologicalSpace F\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : TopologicalSpace (TotalSpace F E)\ne✝ : Trivialization F TotalSpace.proj\nx : TotalSpace F E\nb✝ : B\ny : E b✝\ninst✝⁵ : AddCommMonoid F\ninst✝⁴ : Module R F\ninst✝³ : (x : B) → AddCommMonoid (E x)\ninst✝² : (x : B) → Module R (E x)\ne e' : Trivialization F TotalSpace.proj\ninst✝¹ : Trivialization.IsLinear R e\ninst✝ : Trivialization.IsLinear R e'\nb : B\nhb : b ∈ e.baseSet ∩ e'.baseSet\n⊢ Continuous\n    (LinearEquiv.trans (LinearEquiv.symm (linearEquivAt R e b (_ : b ∈ e.baseSet)))\n        (linearEquivAt R e' b (_ : b ∈ e'.baseSet))).invFun\n[PROOFSTEP]\nrefine' (e.continuousOn.comp_continuous _ _).snd\n[GOAL]\ncase pos.refine'_1\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁹ : Semiring R\ninst✝⁸ : TopologicalSpace F\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : TopologicalSpace (TotalSpace F E)\ne✝ : Trivialization F TotalSpace.proj\nx : TotalSpace F E\nb✝ : B\ny : E b✝\ninst✝⁵ : AddCommMonoid F\ninst✝⁴ : Module R F\ninst✝³ : (x : B) → AddCommMonoid (E x)\ninst✝² : (x : B) → Module R (E x)\ne e' : Trivialization F TotalSpace.proj\ninst✝¹ : Trivialization.IsLinear R e\ninst✝ : Trivialization.IsLinear R e'\nb : B\nhb : b ∈ e.baseSet ∩ e'.baseSet\n⊢ Continuous fun a => { proj := b, snd := ↑(LinearEquiv.toEquiv (linearEquivAt R e' b (_ : b ∈ e'.baseSet))).symm a }\ncase pos.refine'_2\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁹ : Semiring R\ninst✝⁸ : TopologicalSpace F\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : TopologicalSpace (TotalSpace F E)\ne✝ : Trivialization F TotalSpace.proj\nx : TotalSpace F E\nb✝ : B\ny : E b✝\ninst✝⁵ : AddCommMonoid F\ninst✝⁴ : Module R F\ninst✝³ : (x : B) → AddCommMonoid (E x)\ninst✝² : (x : B) → Module R (E x)\ne e' : Trivialization F TotalSpace.proj\ninst✝¹ : Trivialization.IsLinear R e\ninst✝ : Trivialization.IsLinear R e'\nb : B\nhb : b ∈ e.baseSet ∩ e'.baseSet\n⊢ ∀ (x : F), { proj := b, snd := ↑(LinearEquiv.toEquiv (linearEquivAt R e' b (_ : b ∈ e'.baseSet))).symm x } ∈ e.source\n[PROOFSTEP]\nexact e'.continuousOn_symm.comp_continuous (Continuous.Prod.mk b) fun y => mk_mem_prod hb.2 (mem_univ y)\n[GOAL]\ncase pos.refine'_2\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁹ : Semiring R\ninst✝⁸ : TopologicalSpace F\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : TopologicalSpace (TotalSpace F E)\ne✝ : Trivialization F TotalSpace.proj\nx : TotalSpace F E\nb✝ : B\ny : E b✝\ninst✝⁵ : AddCommMonoid F\ninst✝⁴ : Module R F\ninst✝³ : (x : B) → AddCommMonoid (E x)\ninst✝² : (x : B) → Module R (E x)\ne e' : Trivialization F TotalSpace.proj\ninst✝¹ : Trivialization.IsLinear R e\ninst✝ : Trivialization.IsLinear R e'\nb : B\nhb : b ∈ e.baseSet ∩ e'.baseSet\n⊢ ∀ (x : F), { proj := b, snd := ↑(LinearEquiv.toEquiv (linearEquivAt R e' b (_ : b ∈ e'.baseSet))).symm x } ∈ e.source\n[PROOFSTEP]\nexact fun y => e.mem_source.mpr hb.1\n[GOAL]\ncase neg\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁹ : Semiring R\ninst✝⁸ : TopologicalSpace F\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : TopologicalSpace (TotalSpace F E)\ne✝ : Trivialization F TotalSpace.proj\nx : TotalSpace F E\nb✝ : B\ny : E b✝\ninst✝⁵ : AddCommMonoid F\ninst✝⁴ : Module R F\ninst✝³ : (x : B) → AddCommMonoid (E x)\ninst✝² : (x : B) → Module R (E x)\ne e' : Trivialization F TotalSpace.proj\ninst✝¹ : Trivialization.IsLinear R e\ninst✝ : Trivialization.IsLinear R e'\nb : B\nhb : ¬b ∈ e.baseSet ∩ e'.baseSet\n⊢ Continuous\n    (if hb : b ∈ e.baseSet ∩ e'.baseSet then\n        LinearEquiv.trans (LinearEquiv.symm (linearEquivAt R e b (_ : b ∈ e.baseSet)))\n          (linearEquivAt R e' b (_ : b ∈ e'.baseSet))\n      else LinearEquiv.refl R F).invFun\n[PROOFSTEP]\nrw [dif_neg hb]\n[GOAL]\ncase neg\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁹ : Semiring R\ninst✝⁸ : TopologicalSpace F\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : TopologicalSpace (TotalSpace F E)\ne✝ : Trivialization F TotalSpace.proj\nx : TotalSpace F E\nb✝ : B\ny : E b✝\ninst✝⁵ : AddCommMonoid F\ninst✝⁴ : Module R F\ninst✝³ : (x : B) → AddCommMonoid (E x)\ninst✝² : (x : B) → Module R (E x)\ne e' : Trivialization F TotalSpace.proj\ninst✝¹ : Trivialization.IsLinear R e\ninst✝ : Trivialization.IsLinear R e'\nb : B\nhb : ¬b ∈ e.baseSet ∩ e'.baseSet\n⊢ Continuous (LinearEquiv.refl R F).invFun\n[PROOFSTEP]\nexact continuous_id\n[GOAL]\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁹ : Semiring R\ninst✝⁸ : TopologicalSpace F\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : TopologicalSpace (TotalSpace F E)\ne✝ : Trivialization F TotalSpace.proj\nx : TotalSpace F E\nb✝ : B\ny : E b✝\ninst✝⁵ : AddCommMonoid F\ninst✝⁴ : Module R F\ninst✝³ : (x : B) → AddCommMonoid (E x)\ninst✝² : (x : B) → Module R (E x)\ne e' : Trivialization F TotalSpace.proj\ninst✝¹ : Trivialization.IsLinear R e\ninst✝ : Trivialization.IsLinear R e'\nb : B\nhb : b ∈ e'.baseSet ∩ e.baseSet\n⊢ ContinuousLinearEquiv.symm (coordChangeL R e e' b) = coordChangeL R e' e b\n[PROOFSTEP]\napply ContinuousLinearEquiv.toLinearEquiv_injective\n[GOAL]\ncase a\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁹ : Semiring R\ninst✝⁸ : TopologicalSpace F\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : TopologicalSpace (TotalSpace F E)\ne✝ : Trivialization F TotalSpace.proj\nx : TotalSpace F E\nb✝ : B\ny : E b✝\ninst✝⁵ : AddCommMonoid F\ninst✝⁴ : Module R F\ninst✝³ : (x : B) → AddCommMonoid (E x)\ninst✝² : (x : B) → Module R (E x)\ne e' : Trivialization F TotalSpace.proj\ninst✝¹ : Trivialization.IsLinear R e\ninst✝ : Trivialization.IsLinear R e'\nb : B\nhb : b ∈ e'.baseSet ∩ e.baseSet\n⊢ (ContinuousLinearEquiv.symm (coordChangeL R e e' b)).toLinearEquiv = (coordChangeL R e' e b).toLinearEquiv\n[PROOFSTEP]\nrw [coe_coordChangeL' e' e hb, (coordChangeL R e e' b).symm_toLinearEquiv, coe_coordChangeL' e e' hb.symm,\n  LinearEquiv.trans_symm, LinearEquiv.symm_symm]\n[GOAL]\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁹ : Semiring R\ninst✝⁸ : TopologicalSpace F\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : TopologicalSpace (TotalSpace F E)\ne✝ : Trivialization F TotalSpace.proj\nx : TotalSpace F E\nb✝ : B\ny✝ : E b✝\ninst✝⁵ : AddCommMonoid F\ninst✝⁴ : Module R F\ninst✝³ : (x : B) → AddCommMonoid (E x)\ninst✝² : (x : B) → Module R (E x)\ne e' : Trivialization F TotalSpace.proj\ninst✝¹ : Trivialization.IsLinear R e\ninst✝ : Trivialization.IsLinear R e'\nb : B\nhb : b ∈ e.baseSet ∩ e'.baseSet\ny : F\n⊢ (b, ↑(coordChangeL R e e' b) y) = ↑e' { proj := b, snd := Trivialization.symm e b y }\n[PROOFSTEP]\next\n[GOAL]\ncase h₁\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁹ : Semiring R\ninst✝⁸ : TopologicalSpace F\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : TopologicalSpace (TotalSpace F E)\ne✝ : Trivialization F TotalSpace.proj\nx : TotalSpace F E\nb✝ : B\ny✝ : E b✝\ninst✝⁵ : AddCommMonoid F\ninst✝⁴ : Module R F\ninst✝³ : (x : B) → AddCommMonoid (E x)\ninst✝² : (x : B) → Module R (E x)\ne e' : Trivialization F TotalSpace.proj\ninst✝¹ : Trivialization.IsLinear R e\ninst✝ : Trivialization.IsLinear R e'\nb : B\nhb : b ∈ e.baseSet ∩ e'.baseSet\ny : F\n⊢ (b, ↑(coordChangeL R e e' b) y).fst = (↑e' { proj := b, snd := Trivialization.symm e b y }).fst\n[PROOFSTEP]\nrw [e.mk_symm hb.1 y, e'.coe_fst', e.proj_symm_apply' hb.1]\n[GOAL]\ncase h₁\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁹ : Semiring R\ninst✝⁸ : TopologicalSpace F\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : TopologicalSpace (TotalSpace F E)\ne✝ : Trivialization F TotalSpace.proj\nx : TotalSpace F E\nb✝ : B\ny✝ : E b✝\ninst✝⁵ : AddCommMonoid F\ninst✝⁴ : Module R F\ninst✝³ : (x : B) → AddCommMonoid (E x)\ninst✝² : (x : B) → Module R (E x)\ne e' : Trivialization F TotalSpace.proj\ninst✝¹ : Trivialization.IsLinear R e\ninst✝ : Trivialization.IsLinear R e'\nb : B\nhb : b ∈ e.baseSet ∩ e'.baseSet\ny : F\n⊢ (↑(LocalHomeomorph.symm e.toLocalHomeomorph) (b, y)).proj ∈ e'.baseSet\n[PROOFSTEP]\nrw [e.proj_symm_apply' hb.1]\n[GOAL]\ncase h₁\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁹ : Semiring R\ninst✝⁸ : TopologicalSpace F\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : TopologicalSpace (TotalSpace F E)\ne✝ : Trivialization F TotalSpace.proj\nx : TotalSpace F E\nb✝ : B\ny✝ : E b✝\ninst✝⁵ : AddCommMonoid F\ninst✝⁴ : Module R F\ninst✝³ : (x : B) → AddCommMonoid (E x)\ninst✝² : (x : B) → Module R (E x)\ne e' : Trivialization F TotalSpace.proj\ninst✝¹ : Trivialization.IsLinear R e\ninst✝ : Trivialization.IsLinear R e'\nb : B\nhb : b ∈ e.baseSet ∩ e'.baseSet\ny : F\n⊢ b ∈ e'.baseSet\n[PROOFSTEP]\nexact hb.2\n[GOAL]\ncase h₂\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁹ : Semiring R\ninst✝⁸ : TopologicalSpace F\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : TopologicalSpace (TotalSpace F E)\ne✝ : Trivialization F TotalSpace.proj\nx : TotalSpace F E\nb✝ : B\ny✝ : E b✝\ninst✝⁵ : AddCommMonoid F\ninst✝⁴ : Module R F\ninst✝³ : (x : B) → AddCommMonoid (E x)\ninst✝² : (x : B) → Module R (E x)\ne e' : Trivialization F TotalSpace.proj\ninst✝¹ : Trivialization.IsLinear R e\ninst✝ : Trivialization.IsLinear R e'\nb : B\nhb : b ∈ e.baseSet ∩ e'.baseSet\ny : F\n⊢ (b, ↑(coordChangeL R e e' b) y).snd = (↑e' { proj := b, snd := Trivialization.symm e b y }).snd\n[PROOFSTEP]\nexact e.coordChangeL_apply e' hb y\n[GOAL]\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁹ : Semiring R\ninst✝⁸ : TopologicalSpace F\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : TopologicalSpace (TotalSpace F E)\ne✝ : Trivialization F TotalSpace.proj\nx : TotalSpace F E\nb✝ : B\ny : E b✝\ninst✝⁵ : AddCommMonoid F\ninst✝⁴ : Module R F\ninst✝³ : (x : B) → AddCommMonoid (E x)\ninst✝² : (x : B) → Module R (E x)\ne e' : Trivialization F TotalSpace.proj\ninst✝¹ : Trivialization.IsLinear R e\ninst✝ : Trivialization.IsLinear R e'\nb : B\nhb : b ∈ e.baseSet ∩ e'.baseSet\nv : F\n⊢ ↑e' (↑(LocalHomeomorph.symm e.toLocalHomeomorph) (b, v)) = (b, ↑(coordChangeL R e e' b) v)\n[PROOFSTEP]\nrw [e.mk_coordChangeL e' hb, e.mk_symm hb.1]\n[GOAL]\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁹ : Semiring R\ninst✝⁸ : TopologicalSpace F\ninst✝⁷ : TopologicalSpace B\ninst✝⁶ : TopologicalSpace (TotalSpace F E)\ne✝ : Trivialization F TotalSpace.proj\nx : TotalSpace F E\nb✝ : B\ny✝ : E b✝\ninst✝⁵ : AddCommMonoid F\ninst✝⁴ : Module R F\ninst✝³ : (x : B) → AddCommMonoid (E x)\ninst✝² : (x : B) → Module R (E x)\ne e' : Trivialization F TotalSpace.proj\ninst✝¹ : Trivialization.IsLinear R e\ninst✝ : Trivialization.IsLinear R e'\nb : B\nhb : b ∈ e.baseSet ∩ e'.baseSet\ny : F\n⊢ ↑(coordChangeL R e e' b) y = (↑e' (↑(LocalHomeomorph.symm e.toLocalHomeomorph) (b, y))).snd\n[PROOFSTEP]\nrw [e.coordChangeL_apply e' hb, e.mk_symm hb.1]\n[GOAL]\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁹ : NontriviallyNormedField R\ninst✝⁸ : (x : B) → AddCommMonoid (E x)\ninst✝⁷ : (x : B) → Module R (E x)\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace R F\ninst✝⁴ : TopologicalSpace B\ninst✝³ : TopologicalSpace (TotalSpace F E)\ninst✝² : (x : B) → TopologicalSpace (E x)\ninst✝¹ : FiberBundle F E\ne : Trivialization F TotalSpace.proj\ninst✝ : Trivialization.IsLinear R e\nb : B\nsrc✝ : E b →ₗ[R] F := Trivialization.linearMapAt R e b\n⊢ Continuous\n    {\n          toAddHom :=\n            { toFun := ↑(Trivialization.linearMapAt R e b),\n              map_add' :=\n                (_ :\n                  ∀ (x y : E b),\n                    AddHom.toFun src✝.toAddHom (x + y) = AddHom.toFun src✝.toAddHom x + AddHom.toFun src✝.toAddHom y) },\n          map_smul' :=\n            (_ :\n              ∀ (r : R) (x : E b),\n                AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom.toFun\n[PROOFSTEP]\ndsimp\n[GOAL]\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁹ : NontriviallyNormedField R\ninst✝⁸ : (x : B) → AddCommMonoid (E x)\ninst✝⁷ : (x : B) → Module R (E x)\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace R F\ninst✝⁴ : TopologicalSpace B\ninst✝³ : TopologicalSpace (TotalSpace F E)\ninst✝² : (x : B) → TopologicalSpace (E x)\ninst✝¹ : FiberBundle F E\ne : Trivialization F TotalSpace.proj\ninst✝ : Trivialization.IsLinear R e\nb : B\nsrc✝ : E b →ₗ[R] F := Trivialization.linearMapAt R e b\n⊢ Continuous ↑(Trivialization.linearMapAt R e b)\n[PROOFSTEP]\nrw [e.coe_linearMapAt b]\n[GOAL]\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁹ : NontriviallyNormedField R\ninst✝⁸ : (x : B) → AddCommMonoid (E x)\ninst✝⁷ : (x : B) → Module R (E x)\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace R F\ninst✝⁴ : TopologicalSpace B\ninst✝³ : TopologicalSpace (TotalSpace F E)\ninst✝² : (x : B) → TopologicalSpace (E x)\ninst✝¹ : FiberBundle F E\ne : Trivialization F TotalSpace.proj\ninst✝ : Trivialization.IsLinear R e\nb : B\nsrc✝ : E b →ₗ[R] F := Trivialization.linearMapAt R e b\n⊢ Continuous fun y => if b ∈ e.baseSet then (↑e { proj := b, snd := y }).snd else 0\n[PROOFSTEP]\nrefine' continuous_if_const _ (fun hb => _) fun _ => continuous_zero\n[GOAL]\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁹ : NontriviallyNormedField R\ninst✝⁸ : (x : B) → AddCommMonoid (E x)\ninst✝⁷ : (x : B) → Module R (E x)\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace R F\ninst✝⁴ : TopologicalSpace B\ninst✝³ : TopologicalSpace (TotalSpace F E)\ninst✝² : (x : B) → TopologicalSpace (E x)\ninst✝¹ : FiberBundle F E\ne : Trivialization F TotalSpace.proj\ninst✝ : Trivialization.IsLinear R e\nb : B\nsrc✝ : E b →ₗ[R] F := Trivialization.linearMapAt R e b\nhb : b ∈ e.baseSet\n⊢ Continuous fun y => (↑e { proj := b, snd := y }).snd\n[PROOFSTEP]\nexact\n  (e.continuousOn.comp_continuous (FiberBundle.totalSpaceMk_inducing F E b).continuous fun x => e.mem_source.mpr hb).snd\n[GOAL]\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁹ : NontriviallyNormedField R\ninst✝⁸ : (x : B) → AddCommMonoid (E x)\ninst✝⁷ : (x : B) → Module R (E x)\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace R F\ninst✝⁴ : TopologicalSpace B\ninst✝³ : TopologicalSpace (TotalSpace F E)\ninst✝² : (x : B) → TopologicalSpace (E x)\ninst✝¹ : FiberBundle F E\ne : Trivialization F TotalSpace.proj\ninst✝ : Trivialization.IsLinear R e\nb : B\nsrc✝ : F →ₗ[R] E b := Trivialization.symmₗ R e b\n⊢ Continuous\n    {\n          toAddHom :=\n            { toFun := Trivialization.symm e b,\n              map_add' :=\n                (_ :\n                  ∀ (x y : F),\n                    AddHom.toFun src✝.toAddHom (x + y) = AddHom.toFun src✝.toAddHom x + AddHom.toFun src✝.toAddHom y) },\n          map_smul' :=\n            (_ :\n              ∀ (r : R) (x : F),\n                AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom.toFun\n[PROOFSTEP]\nby_cases hb : b ∈ e.baseSet\n[GOAL]\ncase pos\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁹ : NontriviallyNormedField R\ninst✝⁸ : (x : B) → AddCommMonoid (E x)\ninst✝⁷ : (x : B) → Module R (E x)\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace R F\ninst✝⁴ : TopologicalSpace B\ninst✝³ : TopologicalSpace (TotalSpace F E)\ninst✝² : (x : B) → TopologicalSpace (E x)\ninst✝¹ : FiberBundle F E\ne : Trivialization F TotalSpace.proj\ninst✝ : Trivialization.IsLinear R e\nb : B\nsrc✝ : F →ₗ[R] E b := Trivialization.symmₗ R e b\nhb : b ∈ e.baseSet\n⊢ Continuous\n    {\n          toAddHom :=\n            { toFun := Trivialization.symm e b,\n              map_add' :=\n                (_ :\n                  ∀ (x y : F),\n                    AddHom.toFun src✝.toAddHom (x + y) = AddHom.toFun src✝.toAddHom x + AddHom.toFun src✝.toAddHom y) },\n          map_smul' :=\n            (_ :\n              ∀ (r : R) (x : F),\n                AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom.toFun\n[PROOFSTEP]\nrw [(FiberBundle.totalSpaceMk_inducing F E b).continuous_iff]\n[GOAL]\ncase pos\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁹ : NontriviallyNormedField R\ninst✝⁸ : (x : B) → AddCommMonoid (E x)\ninst✝⁷ : (x : B) → Module R (E x)\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace R F\ninst✝⁴ : TopologicalSpace B\ninst✝³ : TopologicalSpace (TotalSpace F E)\ninst✝² : (x : B) → TopologicalSpace (E x)\ninst✝¹ : FiberBundle F E\ne : Trivialization F TotalSpace.proj\ninst✝ : Trivialization.IsLinear R e\nb : B\nsrc✝ : F →ₗ[R] E b := Trivialization.symmₗ R e b\nhb : b ∈ e.baseSet\n⊢ Continuous\n    (TotalSpace.mk b ∘\n      {\n            toAddHom :=\n              { toFun := Trivialization.symm e b,\n                map_add' :=\n                  (_ :\n                    ∀ (x y : F),\n                      AddHom.toFun src✝.toAddHom (x + y) =\n                        AddHom.toFun src✝.toAddHom x + AddHom.toFun src✝.toAddHom y) },\n            map_smul' :=\n              (_ :\n                ∀ (r : R) (x : F),\n                  AddHom.toFun src✝.toAddHom (r • x) =\n                    ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom.toFun)\n[PROOFSTEP]\nexact e.continuousOn_symm.comp_continuous (continuous_const.prod_mk continuous_id) fun x ↦ mk_mem_prod hb (mem_univ x)\n[GOAL]\ncase neg\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁹ : NontriviallyNormedField R\ninst✝⁸ : (x : B) → AddCommMonoid (E x)\ninst✝⁷ : (x : B) → Module R (E x)\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace R F\ninst✝⁴ : TopologicalSpace B\ninst✝³ : TopologicalSpace (TotalSpace F E)\ninst✝² : (x : B) → TopologicalSpace (E x)\ninst✝¹ : FiberBundle F E\ne : Trivialization F TotalSpace.proj\ninst✝ : Trivialization.IsLinear R e\nb : B\nsrc✝ : F →ₗ[R] E b := Trivialization.symmₗ R e b\nhb : ¬b ∈ e.baseSet\n⊢ Continuous\n    {\n          toAddHom :=\n            { toFun := Trivialization.symm e b,\n              map_add' :=\n                (_ :\n                  ∀ (x y : F),\n                    AddHom.toFun src✝.toAddHom (x + y) = AddHom.toFun src✝.toAddHom x + AddHom.toFun src✝.toAddHom y) },\n          map_smul' :=\n            (_ :\n              ∀ (r : R) (x : F),\n                AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom.toFun\n[PROOFSTEP]\nrefine' continuous_zero.congr fun x => (e.symm_apply_of_not_mem hb x).symm\n[GOAL]\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁹ : NontriviallyNormedField R\ninst✝⁸ : (x : B) → AddCommMonoid (E x)\ninst✝⁷ : (x : B) → Module R (E x)\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace R F\ninst✝⁴ : TopologicalSpace B\ninst✝³ : TopologicalSpace (TotalSpace F E)\ninst✝² : (x : B) → TopologicalSpace (E x)\ninst✝¹ : FiberBundle F E\ne : Trivialization F TotalSpace.proj\ninst✝ : Trivialization.IsLinear R e\nb : B\nhb : b ∈ e.baseSet\nz : E b\n⊢ ↑e { proj := b, snd := z } = (b, ↑(continuousLinearEquivAt R e b hb) z)\n[PROOFSTEP]\next\n[GOAL]\ncase h₁\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁹ : NontriviallyNormedField R\ninst✝⁸ : (x : B) → AddCommMonoid (E x)\ninst✝⁷ : (x : B) → Module R (E x)\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace R F\ninst✝⁴ : TopologicalSpace B\ninst✝³ : TopologicalSpace (TotalSpace F E)\ninst✝² : (x : B) → TopologicalSpace (E x)\ninst✝¹ : FiberBundle F E\ne : Trivialization F TotalSpace.proj\ninst✝ : Trivialization.IsLinear R e\nb : B\nhb : b ∈ e.baseSet\nz : E b\n⊢ (↑e { proj := b, snd := z }).fst = (b, ↑(continuousLinearEquivAt R e b hb) z).fst\n[PROOFSTEP]\nrefine' e.coe_fst _\n[GOAL]\ncase h₁\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁹ : NontriviallyNormedField R\ninst✝⁸ : (x : B) → AddCommMonoid (E x)\ninst✝⁷ : (x : B) → Module R (E x)\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace R F\ninst✝⁴ : TopologicalSpace B\ninst✝³ : TopologicalSpace (TotalSpace F E)\ninst✝² : (x : B) → TopologicalSpace (E x)\ninst✝¹ : FiberBundle F E\ne : Trivialization F TotalSpace.proj\ninst✝ : Trivialization.IsLinear R e\nb : B\nhb : b ∈ e.baseSet\nz : E b\n⊢ { proj := b, snd := z } ∈ e.source\n[PROOFSTEP]\nrw [e.source_eq]\n[GOAL]\ncase h₁\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁹ : NontriviallyNormedField R\ninst✝⁸ : (x : B) → AddCommMonoid (E x)\ninst✝⁷ : (x : B) → Module R (E x)\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace R F\ninst✝⁴ : TopologicalSpace B\ninst✝³ : TopologicalSpace (TotalSpace F E)\ninst✝² : (x : B) → TopologicalSpace (E x)\ninst✝¹ : FiberBundle F E\ne : Trivialization F TotalSpace.proj\ninst✝ : Trivialization.IsLinear R e\nb : B\nhb : b ∈ e.baseSet\nz : E b\n⊢ { proj := b, snd := z } ∈ TotalSpace.proj ⁻¹' e.baseSet\n[PROOFSTEP]\nexact hb\n[GOAL]\ncase h₂\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁹ : NontriviallyNormedField R\ninst✝⁸ : (x : B) → AddCommMonoid (E x)\ninst✝⁷ : (x : B) → Module R (E x)\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace R F\ninst✝⁴ : TopologicalSpace B\ninst✝³ : TopologicalSpace (TotalSpace F E)\ninst✝² : (x : B) → TopologicalSpace (E x)\ninst✝¹ : FiberBundle F E\ne : Trivialization F TotalSpace.proj\ninst✝ : Trivialization.IsLinear R e\nb : B\nhb : b ∈ e.baseSet\nz : E b\n⊢ (↑e { proj := b, snd := z }).snd = (b, ↑(continuousLinearEquivAt R e b hb) z).snd\n[PROOFSTEP]\nsimp only [coe_coe, continuousLinearEquivAt_apply]\n[GOAL]\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁹ : NontriviallyNormedField R\ninst✝⁸ : (x : B) → AddCommMonoid (E x)\ninst✝⁷ : (x : B) → Module R (E x)\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace R F\ninst✝⁴ : TopologicalSpace B\ninst✝³ : TopologicalSpace (TotalSpace F E)\ninst✝² : (x : B) → TopologicalSpace (E x)\ninst✝¹ : FiberBundle F E\ne : Trivialization F TotalSpace.proj\ninst✝ : Trivialization.IsLinear R e\nx : B\nhx : x ∈ e.baseSet\n⊢ ↑e (zeroSection F E x) = (x, 0)\n[PROOFSTEP]\nsimp_rw [zeroSection, e.apply_eq_prod_continuousLinearEquivAt R x hx 0, map_zero]\n[GOAL]\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁹ : NontriviallyNormedField R\ninst✝⁸ : (x : B) → AddCommMonoid (E x)\ninst✝⁷ : (x : B) → Module R (E x)\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace R F\ninst✝⁴ : TopologicalSpace B\ninst✝³ : TopologicalSpace (TotalSpace F E)\ninst✝² : (x : B) → TopologicalSpace (E x)\ninst✝¹ : FiberBundle F E\ne : Trivialization F TotalSpace.proj\ninst✝ : Trivialization.IsLinear R e\nb : B\nhb : b ∈ e.baseSet\nz : F\n⊢ ↑(LocalHomeomorph.symm e.toLocalHomeomorph) (b, z) =\n    { proj := b, snd := ↑(ContinuousLinearEquiv.symm (continuousLinearEquivAt R e b hb)) z }\n[PROOFSTEP]\nhave h : (b, z) ∈ e.target\n[GOAL]\ncase h\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁹ : NontriviallyNormedField R\ninst✝⁸ : (x : B) → AddCommMonoid (E x)\ninst✝⁷ : (x : B) → Module R (E x)\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace R F\ninst✝⁴ : TopologicalSpace B\ninst✝³ : TopologicalSpace (TotalSpace F E)\ninst✝² : (x : B) → TopologicalSpace (E x)\ninst✝¹ : FiberBundle F E\ne : Trivialization F TotalSpace.proj\ninst✝ : Trivialization.IsLinear R e\nb : B\nhb : b ∈ e.baseSet\nz : F\n⊢ (b, z) ∈ e.target\n[PROOFSTEP]\nrw [e.target_eq]\n[GOAL]\ncase h\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁹ : NontriviallyNormedField R\ninst✝⁸ : (x : B) → AddCommMonoid (E x)\ninst✝⁷ : (x : B) → Module R (E x)\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace R F\ninst✝⁴ : TopologicalSpace B\ninst✝³ : TopologicalSpace (TotalSpace F E)\ninst✝² : (x : B) → TopologicalSpace (E x)\ninst✝¹ : FiberBundle F E\ne : Trivialization F TotalSpace.proj\ninst✝ : Trivialization.IsLinear R e\nb : B\nhb : b ∈ e.baseSet\nz : F\n⊢ (b, z) ∈ e.baseSet ×ˢ univ\n[PROOFSTEP]\nexact ⟨hb, mem_univ _⟩\n[GOAL]\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁹ : NontriviallyNormedField R\ninst✝⁸ : (x : B) → AddCommMonoid (E x)\ninst✝⁷ : (x : B) → Module R (E x)\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace R F\ninst✝⁴ : TopologicalSpace B\ninst✝³ : TopologicalSpace (TotalSpace F E)\ninst✝² : (x : B) → TopologicalSpace (E x)\ninst✝¹ : FiberBundle F E\ne : Trivialization F TotalSpace.proj\ninst✝ : Trivialization.IsLinear R e\nb : B\nhb : b ∈ e.baseSet\nz : F\nh : (b, z) ∈ e.target\n⊢ ↑(LocalHomeomorph.symm e.toLocalHomeomorph) (b, z) =\n    { proj := b, snd := ↑(ContinuousLinearEquiv.symm (continuousLinearEquivAt R e b hb)) z }\n[PROOFSTEP]\napply e.injOn (e.map_target h)\n[GOAL]\ncase a\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁹ : NontriviallyNormedField R\ninst✝⁸ : (x : B) → AddCommMonoid (E x)\ninst✝⁷ : (x : B) → Module R (E x)\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace R F\ninst✝⁴ : TopologicalSpace B\ninst✝³ : TopologicalSpace (TotalSpace F E)\ninst✝² : (x : B) → TopologicalSpace (E x)\ninst✝¹ : FiberBundle F E\ne : Trivialization F TotalSpace.proj\ninst✝ : Trivialization.IsLinear R e\nb : B\nhb : b ∈ e.baseSet\nz : F\nh : (b, z) ∈ e.target\n⊢ { proj := b, snd := ↑(ContinuousLinearEquiv.symm (continuousLinearEquivAt R e b hb)) z } ∈ e.source\n[PROOFSTEP]\nsimpa only [e.source_eq, mem_preimage]\n[GOAL]\ncase a\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁹ : NontriviallyNormedField R\ninst✝⁸ : (x : B) → AddCommMonoid (E x)\ninst✝⁷ : (x : B) → Module R (E x)\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace R F\ninst✝⁴ : TopologicalSpace B\ninst✝³ : TopologicalSpace (TotalSpace F E)\ninst✝² : (x : B) → TopologicalSpace (E x)\ninst✝¹ : FiberBundle F E\ne : Trivialization F TotalSpace.proj\ninst✝ : Trivialization.IsLinear R e\nb : B\nhb : b ∈ e.baseSet\nz : F\nh : (b, z) ∈ e.target\n⊢ ↑e.toLocalHomeomorph (↑(LocalHomeomorph.symm e.toLocalHomeomorph) (b, z)) =\n    ↑e.toLocalHomeomorph { proj := b, snd := ↑(ContinuousLinearEquiv.symm (continuousLinearEquivAt R e b hb)) z }\n[PROOFSTEP]\nsimp_rw [e.right_inv h, coe_coe, e.apply_eq_prod_continuousLinearEquivAt R b hb, ContinuousLinearEquiv.apply_symm_apply]\n[GOAL]\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝¹⁰ : NontriviallyNormedField R\ninst✝⁹ : (x : B) → AddCommMonoid (E x)\ninst✝⁸ : (x : B) → Module R (E x)\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace R F\ninst✝⁵ : TopologicalSpace B\ninst✝⁴ : TopologicalSpace (TotalSpace F E)\ninst✝³ : (x : B) → TopologicalSpace (E x)\ninst✝² : FiberBundle F E\ne e' : Trivialization F TotalSpace.proj\ninst✝¹ : Trivialization.IsLinear R e\ninst✝ : Trivialization.IsLinear R e'\nb : B\nhb : b ∈ e.baseSet ∩ e'.baseSet\n⊢ ContinuousLinearEquiv.trans (ContinuousLinearEquiv.symm (continuousLinearEquivAt R e b (_ : b ∈ e.baseSet)))\n      (continuousLinearEquivAt R e' b (_ : b ∈ e'.baseSet)) =\n    coordChangeL R e e' b\n[PROOFSTEP]\next v\n[GOAL]\ncase h.h\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝¹⁰ : NontriviallyNormedField R\ninst✝⁹ : (x : B) → AddCommMonoid (E x)\ninst✝⁸ : (x : B) → Module R (E x)\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace R F\ninst✝⁵ : TopologicalSpace B\ninst✝⁴ : TopologicalSpace (TotalSpace F E)\ninst✝³ : (x : B) → TopologicalSpace (E x)\ninst✝² : FiberBundle F E\ne e' : Trivialization F TotalSpace.proj\ninst✝¹ : Trivialization.IsLinear R e\ninst✝ : Trivialization.IsLinear R e'\nb : B\nhb : b ∈ e.baseSet ∩ e'.baseSet\nv : F\n⊢ ↑(ContinuousLinearEquiv.trans (ContinuousLinearEquiv.symm (continuousLinearEquivAt R e b (_ : b ∈ e.baseSet)))\n          (continuousLinearEquivAt R e' b (_ : b ∈ e'.baseSet)))\n      v =\n    ↑(coordChangeL R e e' b) v\n[PROOFSTEP]\nrw [coordChangeL_apply e e' hb]\n[GOAL]\ncase h.h\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝¹⁰ : NontriviallyNormedField R\ninst✝⁹ : (x : B) → AddCommMonoid (E x)\ninst✝⁸ : (x : B) → Module R (E x)\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace R F\ninst✝⁵ : TopologicalSpace B\ninst✝⁴ : TopologicalSpace (TotalSpace F E)\ninst✝³ : (x : B) → TopologicalSpace (E x)\ninst✝² : FiberBundle F E\ne e' : Trivialization F TotalSpace.proj\ninst✝¹ : Trivialization.IsLinear R e\ninst✝ : Trivialization.IsLinear R e'\nb : B\nhb : b ∈ e.baseSet ∩ e'.baseSet\nv : F\n⊢ ↑(ContinuousLinearEquiv.trans (ContinuousLinearEquiv.symm (continuousLinearEquivAt R e b (_ : b ∈ e.baseSet)))\n          (continuousLinearEquivAt R e' b (_ : b ∈ e'.baseSet)))\n      v =\n    (↑e' { proj := b, snd := Trivialization.symm e b v }).snd\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁸ : NontriviallyNormedField R\ninst✝⁷ : (x : B) → AddCommMonoid (E x)\ninst✝⁶ : (x : B) → Module R (E x)\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace R F\ninst✝³ : TopologicalSpace B\ninst✝² : TopologicalSpace (TotalSpace F E)\ninst✝¹ : (x : B) → TopologicalSpace (E x)\ninst✝ : FiberBundle F E\nι : Type u_5\nZ : VectorBundleCore R B F ι\ni j k : ι\nx : B\nhx : x ∈ baseSet Z i ∩ baseSet Z j ∩ baseSet Z k\n⊢ ContinuousLinearMap.comp (coordChange Z j k x) (coordChange Z i j x) = coordChange Z i k x\n[PROOFSTEP]\next v\n[GOAL]\ncase h\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁸ : NontriviallyNormedField R\ninst✝⁷ : (x : B) → AddCommMonoid (E x)\ninst✝⁶ : (x : B) → Module R (E x)\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace R F\ninst✝³ : TopologicalSpace B\ninst✝² : TopologicalSpace (TotalSpace F E)\ninst✝¹ : (x : B) → TopologicalSpace (E x)\ninst✝ : FiberBundle F E\nι : Type u_5\nZ : VectorBundleCore R B F ι\ni j k : ι\nx : B\nhx : x ∈ baseSet Z i ∩ baseSet Z j ∩ baseSet Z k\nv : F\n⊢ ↑(ContinuousLinearMap.comp (coordChange Z j k x) (coordChange Z i j x)) v = ↑(coordChange Z i k x) v\n[PROOFSTEP]\nexact Z.coordChange_comp i j k x hx v\n[GOAL]\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁸ : NontriviallyNormedField R\ninst✝⁷ : (x : B) → AddCommMonoid (E x)\ninst✝⁶ : (x : B) → Module R (E x)\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace R F\ninst✝³ : TopologicalSpace B\ninst✝² : TopologicalSpace (TotalSpace F E)\ninst✝¹ : (x : B) → TopologicalSpace (E x)\ninst✝ : FiberBundle F E\nι : Type u_5\nZ : VectorBundleCore R B F ι\nb : B\na : F\ni : ι\nx : B\nx✝² : x ∈ (localTriv Z i).baseSet\nx✝¹ x✝ : Fiber Z x\n⊢ (↑(localTriv Z i) { proj := x, snd := x✝¹ + x✝ }).snd =\n    (↑(localTriv Z i) { proj := x, snd := x✝¹ }).snd + (↑(localTriv Z i) { proj := x, snd := x✝ }).snd\n[PROOFSTEP]\nsimp only [map_add, localTriv_apply, mfld_simps]\n[GOAL]\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁸ : NontriviallyNormedField R\ninst✝⁷ : (x : B) → AddCommMonoid (E x)\ninst✝⁶ : (x : B) → Module R (E x)\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace R F\ninst✝³ : TopologicalSpace B\ninst✝² : TopologicalSpace (TotalSpace F E)\ninst✝¹ : (x : B) → TopologicalSpace (E x)\ninst✝ : FiberBundle F E\nι : Type u_5\nZ : VectorBundleCore R B F ι\nb : B\na : F\ni : ι\nx : B\nx✝² : x ∈ (localTriv Z i).baseSet\nx✝¹ : R\nx✝ : Fiber Z x\n⊢ (↑(localTriv Z i) { proj := x, snd := x✝¹ • x✝ }).snd = x✝¹ • (↑(localTriv Z i) { proj := x, snd := x✝ }).snd\n[PROOFSTEP]\nsimp only [map_smul, localTriv_apply, mfld_simps]\n[GOAL]\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁸ : NontriviallyNormedField R\ninst✝⁷ : (x : B) → AddCommMonoid (E x)\ninst✝⁶ : (x : B) → Module R (E x)\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace R F\ninst✝³ : TopologicalSpace B\ninst✝² : TopologicalSpace (TotalSpace F E)\ninst✝¹ : (x : B) → TopologicalSpace (E x)\ninst✝ : FiberBundle F E\nι : Type u_5\nZ : VectorBundleCore R B F ι\nb✝ : B\na : F\ni j : ι\nb : B\nhb : b ∈ baseSet Z i\nv : F\n⊢ Trivialization.symm (localTriv Z i) b v = ↑(coordChange Z i (indexAt Z b) b) v\n[PROOFSTEP]\napply (Z.localTriv i).symm_apply hb v\n[GOAL]\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁸ : NontriviallyNormedField R\ninst✝⁷ : (x : B) → AddCommMonoid (E x)\ninst✝⁶ : (x : B) → Module R (E x)\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace R F\ninst✝³ : TopologicalSpace B\ninst✝² : TopologicalSpace (TotalSpace F E)\ninst✝¹ : (x : B) → TopologicalSpace (E x)\ninst✝ : FiberBundle F E\nι : Type u_5\nZ : VectorBundleCore R B F ι\nb✝ : B\na : F\ni j : ι\nb : B\nhb : b ∈ baseSet Z i ∩ baseSet Z j\nv : F\n⊢ ↑(Trivialization.coordChangeL R (localTriv Z i) (localTriv Z j) b) v = ↑(coordChange Z i j b) v\n[PROOFSTEP]\nrw [Trivialization.coordChangeL_apply', localTriv_symm_fst, localTriv_apply, coordChange_comp]\n[GOAL]\ncase a\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁸ : NontriviallyNormedField R\ninst✝⁷ : (x : B) → AddCommMonoid (E x)\ninst✝⁶ : (x : B) → Module R (E x)\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace R F\ninst✝³ : TopologicalSpace B\ninst✝² : TopologicalSpace (TotalSpace F E)\ninst✝¹ : (x : B) → TopologicalSpace (E x)\ninst✝ : FiberBundle F E\nι : Type u_5\nZ : VectorBundleCore R B F ι\nb✝ : B\na : F\ni j : ι\nb : B\nhb : b ∈ baseSet Z i ∩ baseSet Z j\nv : F\n⊢ { proj := (b, v).fst, snd := ↑(coordChange Z i (indexAt Z (b, v).fst) (b, v).fst) (b, v).snd }.proj ∈\n    baseSet Z i ∩\n        baseSet Z\n          (indexAt Z\n            { proj := (b, v).fst, snd := ↑(coordChange Z i (indexAt Z (b, v).fst) (b, v).fst) (b, v).snd }.proj) ∩\n      baseSet Z j\ncase hb\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁸ : NontriviallyNormedField R\ninst✝⁷ : (x : B) → AddCommMonoid (E x)\ninst✝⁶ : (x : B) → Module R (E x)\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace R F\ninst✝³ : TopologicalSpace B\ninst✝² : TopologicalSpace (TotalSpace F E)\ninst✝¹ : (x : B) → TopologicalSpace (E x)\ninst✝ : FiberBundle F E\nι : Type u_5\nZ : VectorBundleCore R B F ι\nb✝ : B\na : F\ni j : ι\nb : B\nhb : b ∈ baseSet Z i ∩ baseSet Z j\nv : F\n⊢ b ∈ (localTriv Z i).baseSet ∩ (localTriv Z j).baseSet\n[PROOFSTEP]\nexacts [⟨⟨hb.1, Z.mem_baseSet_at b⟩, hb.2⟩, hb]\n[GOAL]\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁸ : NontriviallyNormedField R\ninst✝⁷ : (x : B) → AddCommMonoid (E x)\ninst✝⁶ : (x : B) → Module R (E x)\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace R F\ninst✝³ : TopologicalSpace B\ninst✝² : TopologicalSpace (TotalSpace F E)\ninst✝¹ : (x : B) → TopologicalSpace (E x)\ninst✝ : FiberBundle F E\nι : Type u_5\nZ : VectorBundleCore R B F ι\nb : B\na : F\ni j : ι\n⊢ { proj := b, snd := a } ∈ (localTrivAt Z b).toLocalHomeomorph.toLocalEquiv.source\n[PROOFSTEP]\nrw [localTrivAt, mem_localTriv_source]\n[GOAL]\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁸ : NontriviallyNormedField R\ninst✝⁷ : (x : B) → AddCommMonoid (E x)\ninst✝⁶ : (x : B) → Module R (E x)\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace R F\ninst✝³ : TopologicalSpace B\ninst✝² : TopologicalSpace (TotalSpace F E)\ninst✝¹ : (x : B) → TopologicalSpace (E x)\ninst✝ : FiberBundle F E\nι : Type u_5\nZ : VectorBundleCore R B F ι\nb : B\na : F\ni j : ι\n⊢ { proj := b, snd := a }.proj ∈ baseSet Z (indexAt Z b)\n[PROOFSTEP]\nexact Z.mem_baseSet_at b\n[GOAL]\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁸ : NontriviallyNormedField R\ninst✝⁷ : (x : B) → AddCommMonoid (E x)\ninst✝⁶ : (x : B) → Module R (E x)\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace R F\ninst✝³ : TopologicalSpace B\ninst✝² : TopologicalSpace (TotalSpace F E)\ninst✝¹ : (x : B) → TopologicalSpace (E x)\ninst✝ : FiberBundle F E\nι : Type u_5\nZ : VectorBundleCore R B F ι\nb : B\na : F\ni j : ι\n⊢ ∀ (e : Trivialization F TotalSpace.proj) [inst : MemTrivializationAtlas e], Trivialization.IsLinear R e\n[PROOFSTEP]\nrintro _ ⟨i, rfl⟩\n[GOAL]\ncase mk.intro\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁸ : NontriviallyNormedField R\ninst✝⁷ : (x : B) → AddCommMonoid (E x)\ninst✝⁶ : (x : B) → Module R (E x)\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace R F\ninst✝³ : TopologicalSpace B\ninst✝² : TopologicalSpace (TotalSpace F E)\ninst✝¹ : (x : B) → TopologicalSpace (E x)\ninst✝ : FiberBundle F E\nι : Type u_5\nZ : VectorBundleCore R B F ι\nb : B\na : F\ni✝ j i : ι\n⊢ Trivialization.IsLinear R (FiberBundleCore.localTriv (toFiberBundleCore Z) i)\n[PROOFSTEP]\napply localTriv.isLinear\n[GOAL]\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁸ : NontriviallyNormedField R\ninst✝⁷ : (x : B) → AddCommMonoid (E x)\ninst✝⁶ : (x : B) → Module R (E x)\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace R F\ninst✝³ : TopologicalSpace B\ninst✝² : TopologicalSpace (TotalSpace F E)\ninst✝¹ : (x : B) → TopologicalSpace (E x)\ninst✝ : FiberBundle F E\nι : Type u_5\nZ : VectorBundleCore R B F ι\nb : B\na : F\ni j : ι\n⊢ ∀ (e e' : Trivialization F TotalSpace.proj) [inst : MemTrivializationAtlas e] [inst_1 : MemTrivializationAtlas e'],\n    ContinuousOn (fun b => ↑(Trivialization.coordChangeL R e e' b)) (e.baseSet ∩ e'.baseSet)\n[PROOFSTEP]\nrintro _ _ ⟨i, rfl⟩ ⟨i', rfl⟩\n[GOAL]\ncase mk.intro.mk.intro\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁸ : NontriviallyNormedField R\ninst✝⁷ : (x : B) → AddCommMonoid (E x)\ninst✝⁶ : (x : B) → Module R (E x)\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace R F\ninst✝³ : TopologicalSpace B\ninst✝² : TopologicalSpace (TotalSpace F E)\ninst✝¹ : (x : B) → TopologicalSpace (E x)\ninst✝ : FiberBundle F E\nι : Type u_5\nZ : VectorBundleCore R B F ι\nb : B\na : F\ni✝ j i i' : ι\n⊢ ContinuousOn\n    (fun b =>\n      ↑(Trivialization.coordChangeL R (FiberBundleCore.localTriv (toFiberBundleCore Z) i)\n          (FiberBundleCore.localTriv (toFiberBundleCore Z) i') b))\n    ((FiberBundleCore.localTriv (toFiberBundleCore Z) i).baseSet ∩\n      (FiberBundleCore.localTriv (toFiberBundleCore Z) i').baseSet)\n[PROOFSTEP]\nrefine' (Z.continuousOn_coordChange i i').congr fun b hb => _\n[GOAL]\ncase mk.intro.mk.intro\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁸ : NontriviallyNormedField R\ninst✝⁷ : (x : B) → AddCommMonoid (E x)\ninst✝⁶ : (x : B) → Module R (E x)\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace R F\ninst✝³ : TopologicalSpace B\ninst✝² : TopologicalSpace (TotalSpace F E)\ninst✝¹ : (x : B) → TopologicalSpace (E x)\ninst✝ : FiberBundle F E\nι : Type u_5\nZ : VectorBundleCore R B F ι\nb✝ : B\na : F\ni✝ j i i' : ι\nb : B\nhb : b ∈ baseSet Z i ∩ baseSet Z i'\n⊢ ↑(Trivialization.coordChangeL R (FiberBundleCore.localTriv (toFiberBundleCore Z) i)\n        (FiberBundleCore.localTriv (toFiberBundleCore Z) i') b) =\n    coordChange Z i i' b\n[PROOFSTEP]\next v\n[GOAL]\ncase mk.intro.mk.intro.h\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁸ : NontriviallyNormedField R\ninst✝⁷ : (x : B) → AddCommMonoid (E x)\ninst✝⁶ : (x : B) → Module R (E x)\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace R F\ninst✝³ : TopologicalSpace B\ninst✝² : TopologicalSpace (TotalSpace F E)\ninst✝¹ : (x : B) → TopologicalSpace (E x)\ninst✝ : FiberBundle F E\nι : Type u_5\nZ : VectorBundleCore R B F ι\nb✝ : B\na : F\ni✝ j i i' : ι\nb : B\nhb : b ∈ baseSet Z i ∩ baseSet Z i'\nv : F\n⊢ ↑↑(Trivialization.coordChangeL R (FiberBundleCore.localTriv (toFiberBundleCore Z) i)\n            (FiberBundleCore.localTriv (toFiberBundleCore Z) i') b)\n      v =\n    ↑(coordChange Z i i' b) v\n[PROOFSTEP]\nexact Z.localTriv_coordChange_eq i i' hb v\n[GOAL]\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁸ : NontriviallyNormedField R\ninst✝⁷ : (x : B) → AddCommMonoid (E x)\ninst✝⁶ : (x : B) → Module R (E x)\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace R F\ninst✝³ : TopologicalSpace B\ninst✝² : TopologicalSpace (TotalSpace F E)\ninst✝¹ : (x : B) → TopologicalSpace (E x)\ninst✝ : FiberBundle F E\nι : Type u_5\nZ : VectorBundleCore R B F ι\nb✝ : B\na : F\ni j : ι\nb : B\nhb : b ∈ baseSet Z i\n⊢ Trivialization.continuousLinearMapAt R (localTriv Z i) b = coordChange Z (indexAt Z b) i b\n[PROOFSTEP]\next1 v\n[GOAL]\ncase h\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁸ : NontriviallyNormedField R\ninst✝⁷ : (x : B) → AddCommMonoid (E x)\ninst✝⁶ : (x : B) → Module R (E x)\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace R F\ninst✝³ : TopologicalSpace B\ninst✝² : TopologicalSpace (TotalSpace F E)\ninst✝¹ : (x : B) → TopologicalSpace (E x)\ninst✝ : FiberBundle F E\nι : Type u_5\nZ : VectorBundleCore R B F ι\nb✝ : B\na : F\ni j : ι\nb : B\nhb : b ∈ baseSet Z i\nv : Fiber Z b\n⊢ ↑(Trivialization.continuousLinearMapAt R (localTriv Z i) b) v = ↑(coordChange Z (indexAt Z b) i b) v\n[PROOFSTEP]\nrw [(Z.localTriv i).continuousLinearMapAt_apply R, (Z.localTriv i).coe_linearMapAt_of_mem]\n[GOAL]\ncase h\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁸ : NontriviallyNormedField R\ninst✝⁷ : (x : B) → AddCommMonoid (E x)\ninst✝⁶ : (x : B) → Module R (E x)\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace R F\ninst✝³ : TopologicalSpace B\ninst✝² : TopologicalSpace (TotalSpace F E)\ninst✝¹ : (x : B) → TopologicalSpace (E x)\ninst✝ : FiberBundle F E\nι : Type u_5\nZ : VectorBundleCore R B F ι\nb✝ : B\na : F\ni j : ι\nb : B\nhb : b ∈ baseSet Z i\nv : Fiber Z b\n⊢ (fun y => (↑(localTriv Z i) { proj := b, snd := y }).snd) v = ↑(coordChange Z (indexAt Z b) i b) v\ncase h\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁸ : NontriviallyNormedField R\ninst✝⁷ : (x : B) → AddCommMonoid (E x)\ninst✝⁶ : (x : B) → Module R (E x)\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace R F\ninst✝³ : TopologicalSpace B\ninst✝² : TopologicalSpace (TotalSpace F E)\ninst✝¹ : (x : B) → TopologicalSpace (E x)\ninst✝ : FiberBundle F E\nι : Type u_5\nZ : VectorBundleCore R B F ι\nb✝ : B\na : F\ni j : ι\nb : B\nhb : b ∈ baseSet Z i\nv : Fiber Z b\n⊢ b ∈ (localTriv Z i).baseSet\n[PROOFSTEP]\nexacts [rfl, hb]\n[GOAL]\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁸ : NontriviallyNormedField R\ninst✝⁷ : (x : B) → AddCommMonoid (E x)\ninst✝⁶ : (x : B) → Module R (E x)\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace R F\ninst✝³ : TopologicalSpace B\ninst✝² : TopologicalSpace (TotalSpace F E)\ninst✝¹ : (x : B) → TopologicalSpace (E x)\ninst✝ : FiberBundle F E\nι : Type u_5\nZ : VectorBundleCore R B F ι\nb✝ : B\na : F\ni j : ι\nb : B\nhb : b ∈ baseSet Z i\n⊢ Trivialization.symmL R (localTriv Z i) b = coordChange Z i (indexAt Z b) b\n[PROOFSTEP]\next1 v\n[GOAL]\ncase h\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁸ : NontriviallyNormedField R\ninst✝⁷ : (x : B) → AddCommMonoid (E x)\ninst✝⁶ : (x : B) → Module R (E x)\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace R F\ninst✝³ : TopologicalSpace B\ninst✝² : TopologicalSpace (TotalSpace F E)\ninst✝¹ : (x : B) → TopologicalSpace (E x)\ninst✝ : FiberBundle F E\nι : Type u_5\nZ : VectorBundleCore R B F ι\nb✝ : B\na : F\ni j : ι\nb : B\nhb : b ∈ baseSet Z i\nv : F\n⊢ ↑(Trivialization.symmL R (localTriv Z i) b) v = ↑(coordChange Z i (indexAt Z b) b) v\n[PROOFSTEP]\nrw [(Z.localTriv i).symmL_apply R, (Z.localTriv i).symm_apply]\n[GOAL]\ncase h\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁸ : NontriviallyNormedField R\ninst✝⁷ : (x : B) → AddCommMonoid (E x)\ninst✝⁶ : (x : B) → Module R (E x)\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace R F\ninst✝³ : TopologicalSpace B\ninst✝² : TopologicalSpace (TotalSpace F E)\ninst✝¹ : (x : B) → TopologicalSpace (E x)\ninst✝ : FiberBundle F E\nι : Type u_5\nZ : VectorBundleCore R B F ι\nb✝ : B\na : F\ni j : ι\nb : B\nhb : b ∈ baseSet Z i\nv : F\n⊢ cast (_ : Fiber Z (↑(LocalHomeomorph.symm (localTriv Z i).toLocalHomeomorph) (b, v)).proj = Fiber Z b)\n      (↑(LocalHomeomorph.symm (localTriv Z i).toLocalHomeomorph) (b, v)).snd =\n    ↑(coordChange Z i (indexAt Z b) b) v\ncase h.hb\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁸ : NontriviallyNormedField R\ninst✝⁷ : (x : B) → AddCommMonoid (E x)\ninst✝⁶ : (x : B) → Module R (E x)\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace R F\ninst✝³ : TopologicalSpace B\ninst✝² : TopologicalSpace (TotalSpace F E)\ninst✝¹ : (x : B) → TopologicalSpace (E x)\ninst✝ : FiberBundle F E\nι : Type u_5\nZ : VectorBundleCore R B F ι\nb✝ : B\na : F\ni j : ι\nb : B\nhb : b ∈ baseSet Z i\nv : F\n⊢ b ∈ (localTriv Z i).baseSet\n[PROOFSTEP]\nexacts [rfl, hb]\n[GOAL]\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁶ : NontriviallyNormedField R\ninst✝⁵ : (x : B) → AddCommMonoid (E x)\ninst✝⁴ : (x : B) → Module R (E x)\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace R F\ninst✝¹ : TopologicalSpace B\ninst✝ : (x : B) → TopologicalSpace (E x)\na : VectorPrebundle R F E\ne e' : Pretrivialization F TotalSpace.proj\nhe : e ∈ a.pretrivializationAtlas\nhe' : e' ∈ a.pretrivializationAtlas\nb : B\nhb : b ∈ e.baseSet ∩ e'.baseSet\nv : F\n⊢ (b, ↑(coordChange a he he' b) v) = ↑e' { proj := b, snd := Pretrivialization.symm e b v }\n[PROOFSTEP]\next\n[GOAL]\ncase h₁\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁶ : NontriviallyNormedField R\ninst✝⁵ : (x : B) → AddCommMonoid (E x)\ninst✝⁴ : (x : B) → Module R (E x)\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace R F\ninst✝¹ : TopologicalSpace B\ninst✝ : (x : B) → TopologicalSpace (E x)\na : VectorPrebundle R F E\ne e' : Pretrivialization F TotalSpace.proj\nhe : e ∈ a.pretrivializationAtlas\nhe' : e' ∈ a.pretrivializationAtlas\nb : B\nhb : b ∈ e.baseSet ∩ e'.baseSet\nv : F\n⊢ (b, ↑(coordChange a he he' b) v).fst = (↑e' { proj := b, snd := Pretrivialization.symm e b v }).fst\n[PROOFSTEP]\nrw [e.mk_symm hb.1 v, e'.coe_fst', e.proj_symm_apply' hb.1]\n[GOAL]\ncase h₁\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁶ : NontriviallyNormedField R\ninst✝⁵ : (x : B) → AddCommMonoid (E x)\ninst✝⁴ : (x : B) → Module R (E x)\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace R F\ninst✝¹ : TopologicalSpace B\ninst✝ : (x : B) → TopologicalSpace (E x)\na : VectorPrebundle R F E\ne e' : Pretrivialization F TotalSpace.proj\nhe : e ∈ a.pretrivializationAtlas\nhe' : e' ∈ a.pretrivializationAtlas\nb : B\nhb : b ∈ e.baseSet ∩ e'.baseSet\nv : F\n⊢ (↑(LocalEquiv.symm e.toLocalEquiv) (b, v)).proj ∈ e'.baseSet\n[PROOFSTEP]\nrw [e.proj_symm_apply' hb.1]\n[GOAL]\ncase h₁\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁶ : NontriviallyNormedField R\ninst✝⁵ : (x : B) → AddCommMonoid (E x)\ninst✝⁴ : (x : B) → Module R (E x)\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace R F\ninst✝¹ : TopologicalSpace B\ninst✝ : (x : B) → TopologicalSpace (E x)\na : VectorPrebundle R F E\ne e' : Pretrivialization F TotalSpace.proj\nhe : e ∈ a.pretrivializationAtlas\nhe' : e' ∈ a.pretrivializationAtlas\nb : B\nhb : b ∈ e.baseSet ∩ e'.baseSet\nv : F\n⊢ b ∈ e'.baseSet\n[PROOFSTEP]\nexact hb.2\n[GOAL]\ncase h₂\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁶ : NontriviallyNormedField R\ninst✝⁵ : (x : B) → AddCommMonoid (E x)\ninst✝⁴ : (x : B) → Module R (E x)\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace R F\ninst✝¹ : TopologicalSpace B\ninst✝ : (x : B) → TopologicalSpace (E x)\na : VectorPrebundle R F E\ne e' : Pretrivialization F TotalSpace.proj\nhe : e ∈ a.pretrivializationAtlas\nhe' : e' ∈ a.pretrivializationAtlas\nb : B\nhb : b ∈ e.baseSet ∩ e'.baseSet\nv : F\n⊢ (b, ↑(coordChange a he he' b) v).snd = (↑e' { proj := b, snd := Pretrivialization.symm e b v }).snd\n[PROOFSTEP]\nexact a.coordChange_apply he he' hb v\n[GOAL]\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁶ : NontriviallyNormedField R\ninst✝⁵ : (x : B) → AddCommMonoid (E x)\ninst✝⁴ : (x : B) → Module R (E x)\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace R F\ninst✝¹ : TopologicalSpace B\ninst✝ : (x : B) → TopologicalSpace (E x)\na : VectorPrebundle R F E\ne : Pretrivialization F TotalSpace.proj\nhe : e ∈ a.pretrivializationAtlas\ne' : Pretrivialization F TotalSpace.proj\nhe' : e' ∈ a.pretrivializationAtlas\n⊢ ContinuousOn (↑e ∘ ↑(LocalEquiv.symm e'.toLocalEquiv)) (e'.target ∩ ↑(LocalEquiv.symm e'.toLocalEquiv) ⁻¹' e.source)\n[PROOFSTEP]\nhave : ContinuousOn (fun x : B × F ↦ a.coordChange he' he x.1 x.2) ((e'.baseSet ∩ e.baseSet) ×ˢ univ) :=\n  isBoundedBilinearMapApply.continuous.comp_continuousOn ((a.continuousOn_coordChange he' he).prod_map continuousOn_id)\n[GOAL]\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁶ : NontriviallyNormedField R\ninst✝⁵ : (x : B) → AddCommMonoid (E x)\ninst✝⁴ : (x : B) → Module R (E x)\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace R F\ninst✝¹ : TopologicalSpace B\ninst✝ : (x : B) → TopologicalSpace (E x)\na : VectorPrebundle R F E\ne : Pretrivialization F TotalSpace.proj\nhe : e ∈ a.pretrivializationAtlas\ne' : Pretrivialization F TotalSpace.proj\nhe' : e' ∈ a.pretrivializationAtlas\nthis : ContinuousOn (fun x => ↑(coordChange a he' he x.fst) x.snd) ((e'.baseSet ∩ e.baseSet) ×ˢ univ)\n⊢ ContinuousOn (↑e ∘ ↑(LocalEquiv.symm e'.toLocalEquiv)) (e'.target ∩ ↑(LocalEquiv.symm e'.toLocalEquiv) ⁻¹' e.source)\n[PROOFSTEP]\nrw [e.target_inter_preimage_symm_source_eq e', inter_comm]\n[GOAL]\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁶ : NontriviallyNormedField R\ninst✝⁵ : (x : B) → AddCommMonoid (E x)\ninst✝⁴ : (x : B) → Module R (E x)\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace R F\ninst✝¹ : TopologicalSpace B\ninst✝ : (x : B) → TopologicalSpace (E x)\na : VectorPrebundle R F E\ne : Pretrivialization F TotalSpace.proj\nhe : e ∈ a.pretrivializationAtlas\ne' : Pretrivialization F TotalSpace.proj\nhe' : e' ∈ a.pretrivializationAtlas\nthis : ContinuousOn (fun x => ↑(coordChange a he' he x.fst) x.snd) ((e'.baseSet ∩ e.baseSet) ×ˢ univ)\n⊢ ContinuousOn (↑e ∘ ↑(LocalEquiv.symm e'.toLocalEquiv)) ((e'.baseSet ∩ e.baseSet) ×ˢ univ)\n[PROOFSTEP]\nrefine' (continuousOn_fst.prod this).congr _\n[GOAL]\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁶ : NontriviallyNormedField R\ninst✝⁵ : (x : B) → AddCommMonoid (E x)\ninst✝⁴ : (x : B) → Module R (E x)\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace R F\ninst✝¹ : TopologicalSpace B\ninst✝ : (x : B) → TopologicalSpace (E x)\na : VectorPrebundle R F E\ne : Pretrivialization F TotalSpace.proj\nhe : e ∈ a.pretrivializationAtlas\ne' : Pretrivialization F TotalSpace.proj\nhe' : e' ∈ a.pretrivializationAtlas\nthis : ContinuousOn (fun x => ↑(coordChange a he' he x.fst) x.snd) ((e'.baseSet ∩ e.baseSet) ×ˢ univ)\n⊢ EqOn (↑e ∘ ↑(LocalEquiv.symm e'.toLocalEquiv)) (fun x => (x.fst, ↑(coordChange a he' he x.fst) x.snd))\n    ((e'.baseSet ∩ e.baseSet) ×ˢ univ)\n[PROOFSTEP]\nrintro ⟨b, f⟩ ⟨hb, -⟩\n[GOAL]\ncase mk.intro\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁶ : NontriviallyNormedField R\ninst✝⁵ : (x : B) → AddCommMonoid (E x)\ninst✝⁴ : (x : B) → Module R (E x)\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace R F\ninst✝¹ : TopologicalSpace B\ninst✝ : (x : B) → TopologicalSpace (E x)\na : VectorPrebundle R F E\ne : Pretrivialization F TotalSpace.proj\nhe : e ∈ a.pretrivializationAtlas\ne' : Pretrivialization F TotalSpace.proj\nhe' : e' ∈ a.pretrivializationAtlas\nthis : ContinuousOn (fun x => ↑(coordChange a he' he x.fst) x.snd) ((e'.baseSet ∩ e.baseSet) ×ˢ univ)\nb : B\nf : F\nhb : (b, f).fst ∈ e'.baseSet ∩ e.baseSet\n⊢ (↑e ∘ ↑(LocalEquiv.symm e'.toLocalEquiv)) (b, f) = (fun x => (x.fst, ↑(coordChange a he' he x.fst) x.snd)) (b, f)\n[PROOFSTEP]\ndsimp only [Function.comp, Prod.map]\n[GOAL]\ncase mk.intro\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁶ : NontriviallyNormedField R\ninst✝⁵ : (x : B) → AddCommMonoid (E x)\ninst✝⁴ : (x : B) → Module R (E x)\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace R F\ninst✝¹ : TopologicalSpace B\ninst✝ : (x : B) → TopologicalSpace (E x)\na : VectorPrebundle R F E\ne : Pretrivialization F TotalSpace.proj\nhe : e ∈ a.pretrivializationAtlas\ne' : Pretrivialization F TotalSpace.proj\nhe' : e' ∈ a.pretrivializationAtlas\nthis : ContinuousOn (fun x => ↑(coordChange a he' he x.fst) x.snd) ((e'.baseSet ∩ e.baseSet) ×ˢ univ)\nb : B\nf : F\nhb : (b, f).fst ∈ e'.baseSet ∩ e.baseSet\n⊢ ↑e (↑(LocalEquiv.symm e'.toLocalEquiv) (b, f)) = (b, ↑(coordChange a he' he b) f)\n[PROOFSTEP]\nrw [a.mk_coordChange _ _ hb, e'.mk_symm hb.1]\n[GOAL]\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁶ : NontriviallyNormedField R\ninst✝⁵ : (x : B) → AddCommMonoid (E x)\ninst✝⁴ : (x : B) → Module R (E x)\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace R F\ninst✝¹ : TopologicalSpace B\ninst✝ : (x : B) → TopologicalSpace (E x)\na : VectorPrebundle R F E\nthis✝ : TopologicalSpace (TotalSpace F E) := totalSpaceTopology a\nthis : FiberBundle F E := toFiberBundle a\n⊢ ∀ (e : Trivialization F TotalSpace.proj) [inst : MemTrivializationAtlas e], Trivialization.IsLinear R e\n[PROOFSTEP]\nrintro _ ⟨e, he, rfl⟩\n[GOAL]\ncase mk.intro.intro\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁶ : NontriviallyNormedField R\ninst✝⁵ : (x : B) → AddCommMonoid (E x)\ninst✝⁴ : (x : B) → Module R (E x)\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace R F\ninst✝¹ : TopologicalSpace B\ninst✝ : (x : B) → TopologicalSpace (E x)\na : VectorPrebundle R F E\nthis✝ : TopologicalSpace (TotalSpace F E) := totalSpaceTopology a\nthis : FiberBundle F E := toFiberBundle a\ne : Pretrivialization F TotalSpace.proj\nhe : e ∈ (toFiberPrebundle a).pretrivializationAtlas\n⊢ Trivialization.IsLinear R (FiberPrebundle.trivializationOfMemPretrivializationAtlas (toFiberPrebundle a) he)\n[PROOFSTEP]\napply linear_trivializationOfMemPretrivializationAtlas\n[GOAL]\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁶ : NontriviallyNormedField R\ninst✝⁵ : (x : B) → AddCommMonoid (E x)\ninst✝⁴ : (x : B) → Module R (E x)\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace R F\ninst✝¹ : TopologicalSpace B\ninst✝ : (x : B) → TopologicalSpace (E x)\na : VectorPrebundle R F E\nthis✝ : TopologicalSpace (TotalSpace F E) := totalSpaceTopology a\nthis : FiberBundle F E := toFiberBundle a\n⊢ ∀ (e e' : Trivialization F TotalSpace.proj) [inst : MemTrivializationAtlas e] [inst_1 : MemTrivializationAtlas e'],\n    ContinuousOn (fun b => ↑(Trivialization.coordChangeL R e e' b)) (e.baseSet ∩ e'.baseSet)\n[PROOFSTEP]\nrintro _ _ ⟨e, he, rfl⟩ ⟨e', he', rfl⟩\n[GOAL]\ncase mk.intro.intro.mk.intro.intro\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁶ : NontriviallyNormedField R\ninst✝⁵ : (x : B) → AddCommMonoid (E x)\ninst✝⁴ : (x : B) → Module R (E x)\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace R F\ninst✝¹ : TopologicalSpace B\ninst✝ : (x : B) → TopologicalSpace (E x)\na : VectorPrebundle R F E\nthis✝ : TopologicalSpace (TotalSpace F E) := totalSpaceTopology a\nthis : FiberBundle F E := toFiberBundle a\ne : Pretrivialization F TotalSpace.proj\nhe : e ∈ (toFiberPrebundle a).pretrivializationAtlas\ne' : Pretrivialization F TotalSpace.proj\nhe' : e' ∈ (toFiberPrebundle a).pretrivializationAtlas\n⊢ ContinuousOn\n    (fun b =>\n      ↑(Trivialization.coordChangeL R (FiberPrebundle.trivializationOfMemPretrivializationAtlas (toFiberPrebundle a) he)\n          (FiberPrebundle.trivializationOfMemPretrivializationAtlas (toFiberPrebundle a) he') b))\n    ((FiberPrebundle.trivializationOfMemPretrivializationAtlas (toFiberPrebundle a) he).baseSet ∩\n      (FiberPrebundle.trivializationOfMemPretrivializationAtlas (toFiberPrebundle a) he').baseSet)\n[PROOFSTEP]\nrefine (a.continuousOn_coordChange he he').congr fun b hb ↦ ?_\n[GOAL]\ncase mk.intro.intro.mk.intro.intro\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁶ : NontriviallyNormedField R\ninst✝⁵ : (x : B) → AddCommMonoid (E x)\ninst✝⁴ : (x : B) → Module R (E x)\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace R F\ninst✝¹ : TopologicalSpace B\ninst✝ : (x : B) → TopologicalSpace (E x)\na : VectorPrebundle R F E\nthis✝ : TopologicalSpace (TotalSpace F E) := totalSpaceTopology a\nthis : FiberBundle F E := toFiberBundle a\ne : Pretrivialization F TotalSpace.proj\nhe : e ∈ (toFiberPrebundle a).pretrivializationAtlas\ne' : Pretrivialization F TotalSpace.proj\nhe' : e' ∈ (toFiberPrebundle a).pretrivializationAtlas\nb : B\nhb : b ∈ e.baseSet ∩ e'.baseSet\n⊢ ↑(Trivialization.coordChangeL R (FiberPrebundle.trivializationOfMemPretrivializationAtlas (toFiberPrebundle a) he)\n        (FiberPrebundle.trivializationOfMemPretrivializationAtlas (toFiberPrebundle a) he') b) =\n    coordChange a he he' b\n[PROOFSTEP]\next v\n[GOAL]\ncase mk.intro.intro.mk.intro.intro.h\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁶ : NontriviallyNormedField R\ninst✝⁵ : (x : B) → AddCommMonoid (E x)\ninst✝⁴ : (x : B) → Module R (E x)\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace R F\ninst✝¹ : TopologicalSpace B\ninst✝ : (x : B) → TopologicalSpace (E x)\na : VectorPrebundle R F E\nthis✝ : TopologicalSpace (TotalSpace F E) := totalSpaceTopology a\nthis : FiberBundle F E := toFiberBundle a\ne : Pretrivialization F TotalSpace.proj\nhe : e ∈ (toFiberPrebundle a).pretrivializationAtlas\ne' : Pretrivialization F TotalSpace.proj\nhe' : e' ∈ (toFiberPrebundle a).pretrivializationAtlas\nb : B\nhb : b ∈ e.baseSet ∩ e'.baseSet\nv : F\n⊢ ↑↑(Trivialization.coordChangeL R (FiberPrebundle.trivializationOfMemPretrivializationAtlas (toFiberPrebundle a) he)\n            (FiberPrebundle.trivializationOfMemPretrivializationAtlas (toFiberPrebundle a) he') b)\n      v =\n    ↑(coordChange a he he' b) v\n[PROOFSTEP]\nhaveI h₁ := a.linear_trivializationOfMemPretrivializationAtlas he\n[GOAL]\ncase mk.intro.intro.mk.intro.intro.h\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁶ : NontriviallyNormedField R\ninst✝⁵ : (x : B) → AddCommMonoid (E x)\ninst✝⁴ : (x : B) → Module R (E x)\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace R F\ninst✝¹ : TopologicalSpace B\ninst✝ : (x : B) → TopologicalSpace (E x)\na : VectorPrebundle R F E\nthis✝ : TopologicalSpace (TotalSpace F E) := totalSpaceTopology a\nthis : FiberBundle F E := toFiberBundle a\ne : Pretrivialization F TotalSpace.proj\nhe : e ∈ (toFiberPrebundle a).pretrivializationAtlas\ne' : Pretrivialization F TotalSpace.proj\nhe' : e' ∈ (toFiberPrebundle a).pretrivializationAtlas\nb : B\nhb : b ∈ e.baseSet ∩ e'.baseSet\nv : F\nh₁ : Trivialization.IsLinear R (trivializationOfMemPretrivializationAtlas a he)\n⊢ ↑↑(Trivialization.coordChangeL R (FiberPrebundle.trivializationOfMemPretrivializationAtlas (toFiberPrebundle a) he)\n            (FiberPrebundle.trivializationOfMemPretrivializationAtlas (toFiberPrebundle a) he') b)\n      v =\n    ↑(coordChange a he he' b) v\n[PROOFSTEP]\nhaveI h₂ := a.linear_trivializationOfMemPretrivializationAtlas he'\n[GOAL]\ncase mk.intro.intro.mk.intro.intro.h\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁶ : NontriviallyNormedField R\ninst✝⁵ : (x : B) → AddCommMonoid (E x)\ninst✝⁴ : (x : B) → Module R (E x)\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace R F\ninst✝¹ : TopologicalSpace B\ninst✝ : (x : B) → TopologicalSpace (E x)\na : VectorPrebundle R F E\nthis✝ : TopologicalSpace (TotalSpace F E) := totalSpaceTopology a\nthis : FiberBundle F E := toFiberBundle a\ne : Pretrivialization F TotalSpace.proj\nhe : e ∈ (toFiberPrebundle a).pretrivializationAtlas\ne' : Pretrivialization F TotalSpace.proj\nhe' : e' ∈ (toFiberPrebundle a).pretrivializationAtlas\nb : B\nhb : b ∈ e.baseSet ∩ e'.baseSet\nv : F\nh₁ : Trivialization.IsLinear R (trivializationOfMemPretrivializationAtlas a he)\nh₂ : Trivialization.IsLinear R (trivializationOfMemPretrivializationAtlas a he')\n⊢ ↑↑(Trivialization.coordChangeL R (FiberPrebundle.trivializationOfMemPretrivializationAtlas (toFiberPrebundle a) he)\n            (FiberPrebundle.trivializationOfMemPretrivializationAtlas (toFiberPrebundle a) he') b)\n      v =\n    ↑(coordChange a he he' b) v\n[PROOFSTEP]\nrw [trivializationOfMemPretrivializationAtlas] at h₁ h₂ \n[GOAL]\ncase mk.intro.intro.mk.intro.intro.h\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁶ : NontriviallyNormedField R\ninst✝⁵ : (x : B) → AddCommMonoid (E x)\ninst✝⁴ : (x : B) → Module R (E x)\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace R F\ninst✝¹ : TopologicalSpace B\ninst✝ : (x : B) → TopologicalSpace (E x)\na : VectorPrebundle R F E\nthis✝ : TopologicalSpace (TotalSpace F E) := totalSpaceTopology a\nthis : FiberBundle F E := toFiberBundle a\ne : Pretrivialization F TotalSpace.proj\nhe : e ∈ (toFiberPrebundle a).pretrivializationAtlas\ne' : Pretrivialization F TotalSpace.proj\nhe' : e' ∈ (toFiberPrebundle a).pretrivializationAtlas\nb : B\nhb : b ∈ e.baseSet ∩ e'.baseSet\nv : F\nh₁ : Trivialization.IsLinear R (FiberPrebundle.trivializationOfMemPretrivializationAtlas (toFiberPrebundle a) he)\nh₂ : Trivialization.IsLinear R (FiberPrebundle.trivializationOfMemPretrivializationAtlas (toFiberPrebundle a) he')\n⊢ ↑↑(Trivialization.coordChangeL R (FiberPrebundle.trivializationOfMemPretrivializationAtlas (toFiberPrebundle a) he)\n            (FiberPrebundle.trivializationOfMemPretrivializationAtlas (toFiberPrebundle a) he') b)\n      v =\n    ↑(coordChange a he he' b) v\n[PROOFSTEP]\nrw [a.coordChange_apply he he' hb v, ContinuousLinearEquiv.coe_coe, Trivialization.coordChangeL_apply]\n[GOAL]\ncase mk.intro.intro.mk.intro.intro.h\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁶ : NontriviallyNormedField R\ninst✝⁵ : (x : B) → AddCommMonoid (E x)\ninst✝⁴ : (x : B) → Module R (E x)\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace R F\ninst✝¹ : TopologicalSpace B\ninst✝ : (x : B) → TopologicalSpace (E x)\na : VectorPrebundle R F E\nthis✝ : TopologicalSpace (TotalSpace F E) := totalSpaceTopology a\nthis : FiberBundle F E := toFiberBundle a\ne : Pretrivialization F TotalSpace.proj\nhe : e ∈ (toFiberPrebundle a).pretrivializationAtlas\ne' : Pretrivialization F TotalSpace.proj\nhe' : e' ∈ (toFiberPrebundle a).pretrivializationAtlas\nb : B\nhb : b ∈ e.baseSet ∩ e'.baseSet\nv : F\nh₁ : Trivialization.IsLinear R (FiberPrebundle.trivializationOfMemPretrivializationAtlas (toFiberPrebundle a) he)\nh₂ : Trivialization.IsLinear R (FiberPrebundle.trivializationOfMemPretrivializationAtlas (toFiberPrebundle a) he')\n⊢ (↑(FiberPrebundle.trivializationOfMemPretrivializationAtlas (toFiberPrebundle a) he')\n        { proj := b,\n          snd :=\n            Trivialization.symm (FiberPrebundle.trivializationOfMemPretrivializationAtlas (toFiberPrebundle a) he) b\n              v }).snd =\n    (↑e' { proj := b, snd := Pretrivialization.symm e b v }).snd\ncase mk.intro.intro.mk.intro.intro.h.hb\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝⁶ : NontriviallyNormedField R\ninst✝⁵ : (x : B) → AddCommMonoid (E x)\ninst✝⁴ : (x : B) → Module R (E x)\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace R F\ninst✝¹ : TopologicalSpace B\ninst✝ : (x : B) → TopologicalSpace (E x)\na : VectorPrebundle R F E\nthis✝ : TopologicalSpace (TotalSpace F E) := totalSpaceTopology a\nthis : FiberBundle F E := toFiberBundle a\ne : Pretrivialization F TotalSpace.proj\nhe : e ∈ (toFiberPrebundle a).pretrivializationAtlas\ne' : Pretrivialization F TotalSpace.proj\nhe' : e' ∈ (toFiberPrebundle a).pretrivializationAtlas\nb : B\nhb : b ∈ e.baseSet ∩ e'.baseSet\nv : F\nh₁ : Trivialization.IsLinear R (FiberPrebundle.trivializationOfMemPretrivializationAtlas (toFiberPrebundle a) he)\nh₂ : Trivialization.IsLinear R (FiberPrebundle.trivializationOfMemPretrivializationAtlas (toFiberPrebundle a) he')\n⊢ b ∈\n    (FiberPrebundle.trivializationOfMemPretrivializationAtlas (toFiberPrebundle a) he).baseSet ∩\n      (FiberPrebundle.trivializationOfMemPretrivializationAtlas (toFiberPrebundle a) he').baseSet\n[PROOFSTEP]\nexacts [rfl, hb]\n[GOAL]\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝²² : NontriviallyNormedField R\ninst✝²¹ : (x : B) → AddCommMonoid (E x)\ninst✝²⁰ : (x : B) → Module R (E x)\ninst✝¹⁹ : NormedAddCommGroup F\ninst✝¹⁸ : NormedSpace R F\ninst✝¹⁷ : TopologicalSpace B\ninst✝¹⁶ : (x : B) → TopologicalSpace (E x)\n𝕜₁ : Type u_5\n𝕜₂ : Type u_6\ninst✝¹⁵ : NontriviallyNormedField 𝕜₁\ninst✝¹⁴ : NontriviallyNormedField 𝕜₂\nσ : 𝕜₁ →+* 𝕜₂\nB' : Type u_7\ninst✝¹³ : TopologicalSpace B'\ninst✝¹² : NormedSpace 𝕜₁ F\ninst✝¹¹ : (x : B) → Module 𝕜₁ (E x)\ninst✝¹⁰ : TopologicalSpace (TotalSpace F E)\nF' : Type u_8\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜₂ F'\nE' : B' → Type u_9\ninst✝⁷ : (x : B') → AddCommMonoid (E' x)\ninst✝⁶ : (x : B') → Module 𝕜₂ (E' x)\ninst✝⁵ : TopologicalSpace (TotalSpace F' E')\ninst✝⁴ : FiberBundle F E\ninst✝³ : VectorBundle 𝕜₁ F E\ninst✝² : (x : B') → TopologicalSpace (E' x)\ninst✝¹ : FiberBundle F' E'\ninst✝ : VectorBundle 𝕜₂ F' E'\nx₀ x : B\ny₀ y : B'\nϕ : E x →SL[σ] E' y\nhx : x ∈ (trivializationAt F E x₀).baseSet\nhy : y ∈ (trivializationAt F' E' y₀).baseSet\n⊢ inCoordinates F E F' E' x₀ x y₀ y ϕ =\n    comp (↑(Trivialization.continuousLinearEquivAt 𝕜₂ (trivializationAt F' E' y₀) y hy))\n      (comp ϕ ↑(ContinuousLinearEquiv.symm (Trivialization.continuousLinearEquivAt 𝕜₁ (trivializationAt F E x₀) x hx)))\n[PROOFSTEP]\next\n[GOAL]\ncase h\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝²² : NontriviallyNormedField R\ninst✝²¹ : (x : B) → AddCommMonoid (E x)\ninst✝²⁰ : (x : B) → Module R (E x)\ninst✝¹⁹ : NormedAddCommGroup F\ninst✝¹⁸ : NormedSpace R F\ninst✝¹⁷ : TopologicalSpace B\ninst✝¹⁶ : (x : B) → TopologicalSpace (E x)\n𝕜₁ : Type u_5\n𝕜₂ : Type u_6\ninst✝¹⁵ : NontriviallyNormedField 𝕜₁\ninst✝¹⁴ : NontriviallyNormedField 𝕜₂\nσ : 𝕜₁ →+* 𝕜₂\nB' : Type u_7\ninst✝¹³ : TopologicalSpace B'\ninst✝¹² : NormedSpace 𝕜₁ F\ninst✝¹¹ : (x : B) → Module 𝕜₁ (E x)\ninst✝¹⁰ : TopologicalSpace (TotalSpace F E)\nF' : Type u_8\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜₂ F'\nE' : B' → Type u_9\ninst✝⁷ : (x : B') → AddCommMonoid (E' x)\ninst✝⁶ : (x : B') → Module 𝕜₂ (E' x)\ninst✝⁵ : TopologicalSpace (TotalSpace F' E')\ninst✝⁴ : FiberBundle F E\ninst✝³ : VectorBundle 𝕜₁ F E\ninst✝² : (x : B') → TopologicalSpace (E' x)\ninst✝¹ : FiberBundle F' E'\ninst✝ : VectorBundle 𝕜₂ F' E'\nx₀ x : B\ny₀ y : B'\nϕ : E x →SL[σ] E' y\nhx : x ∈ (trivializationAt F E x₀).baseSet\nhy : y ∈ (trivializationAt F' E' y₀).baseSet\nx✝ : F\n⊢ ↑(inCoordinates F E F' E' x₀ x y₀ y ϕ) x✝ =\n    ↑(comp (↑(Trivialization.continuousLinearEquivAt 𝕜₂ (trivializationAt F' E' y₀) y hy))\n          (comp ϕ\n            ↑(ContinuousLinearEquiv.symm (Trivialization.continuousLinearEquivAt 𝕜₁ (trivializationAt F E x₀) x hx))))\n      x✝\n[PROOFSTEP]\nsimp_rw [inCoordinates, ContinuousLinearMap.coe_comp', ContinuousLinearEquiv.coe_coe,\n  Trivialization.coe_continuousLinearEquivAt_eq, Trivialization.symm_continuousLinearEquivAt_eq]\n[GOAL]\nR : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\ninst✝²² : NontriviallyNormedField R\ninst✝²¹ : (x : B) → AddCommMonoid (E x)\ninst✝²⁰ : (x : B) → Module R (E x)\ninst✝¹⁹ : NormedAddCommGroup F\ninst✝¹⁸ : NormedSpace R F\ninst✝¹⁷ : TopologicalSpace B\ninst✝¹⁶ : (x : B) → TopologicalSpace (E x)\n𝕜₁ : Type u_5\n𝕜₂ : Type u_6\ninst✝¹⁵ : NontriviallyNormedField 𝕜₁\ninst✝¹⁴ : NontriviallyNormedField 𝕜₂\nσ : 𝕜₁ →+* 𝕜₂\nB' : Type u_7\ninst✝¹³ : TopologicalSpace B'\ninst✝¹² : NormedSpace 𝕜₁ F\ninst✝¹¹ : (x : B) → Module 𝕜₁ (E x)\ninst✝¹⁰ : TopologicalSpace (TotalSpace F E)\nF' : Type u_8\ninst✝⁹ : NormedAddCommGroup F'\ninst✝⁸ : NormedSpace 𝕜₂ F'\nE' : B' → Type u_9\ninst✝⁷ : (x : B') → AddCommMonoid (E' x)\ninst✝⁶ : (x : B') → Module 𝕜₂ (E' x)\ninst✝⁵ : TopologicalSpace (TotalSpace F' E')\ninst✝⁴ : FiberBundle F E\ninst✝³ : VectorBundle 𝕜₁ F E\ninst✝² : (x : B') → TopologicalSpace (E' x)\ninst✝¹ : FiberBundle F' E'\ninst✝ : VectorBundle 𝕜₂ F' E'\nι : Type u_10\nι' : Type u_11\nZ : VectorBundleCore 𝕜₁ B F ι\nZ' : VectorBundleCore 𝕜₂ B' F' ι'\nx₀ x : B\ny₀ y : B'\nϕ : F →SL[σ] F'\nhx : x ∈ VectorBundleCore.baseSet Z (VectorBundleCore.indexAt Z x₀)\nhy : y ∈ VectorBundleCore.baseSet Z' (VectorBundleCore.indexAt Z' y₀)\n⊢ inCoordinates F (VectorBundleCore.Fiber Z) F' (VectorBundleCore.Fiber Z') x₀ x y₀ y ϕ =\n    comp (VectorBundleCore.coordChange Z' (VectorBundleCore.indexAt Z' y) (VectorBundleCore.indexAt Z' y₀) y)\n      (comp ϕ (VectorBundleCore.coordChange Z (VectorBundleCore.indexAt Z x₀) (VectorBundleCore.indexAt Z x) x))\n[PROOFSTEP]\nsimp_rw [inCoordinates, Z'.trivializationAt_continuousLinearMapAt hy, Z.trivializationAt_symmL hx]\n", "meta": {"mathlib_filename": "Mathlib.Topology.VectorBundle.Basic", "llama_tokens": 38059, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7634837527911056, "lm_q2_score": 0.6757646075489392, "lm_q1q2_score": 0.5159352985748727}}
{"text": "[GOAL]\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : CommGroup α\ne : α\nx : Finset α × Finset α\n⊢ (mulDysonEtransform e x).fst * (mulDysonEtransform e x).snd ⊆ x.fst * x.snd\n[PROOFSTEP]\nrefine' union_mul_inter_subset_union.trans (union_subset Subset.rfl _)\n[GOAL]\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : CommGroup α\ne : α\nx : Finset α × Finset α\n⊢ e • x.snd * e⁻¹ • x.fst ⊆ x.fst * x.snd\n[PROOFSTEP]\nrw [mul_smul_comm, smul_mul_assoc, inv_smul_smul, mul_comm]\n[GOAL]\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : CommGroup α\ne : α\nx : Finset α × Finset α\n⊢ Finset.card (mulDysonEtransform e x).fst + Finset.card (mulDysonEtransform e x).snd =\n    Finset.card x.fst + Finset.card x.snd\n[PROOFSTEP]\ndsimp\n[GOAL]\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : CommGroup α\ne : α\nx : Finset α × Finset α\n⊢ Finset.card (x.fst ∪ e • x.snd) + Finset.card (x.snd ∩ e⁻¹ • x.fst) = Finset.card x.fst + Finset.card x.snd\n[PROOFSTEP]\nrw [← card_smul_finset e (_ ∩ _), smul_finset_inter, smul_inv_smul, inter_comm, card_union_add_card_inter,\n  card_smul_finset]\n[GOAL]\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : CommGroup α\ne : α\nx : Finset α × Finset α\n⊢ mulDysonEtransform e (mulDysonEtransform e x) = mulDysonEtransform e x\n[PROOFSTEP]\next : 1\n[GOAL]\ncase h₁\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : CommGroup α\ne : α\nx : Finset α × Finset α\n⊢ (mulDysonEtransform e (mulDysonEtransform e x)).fst = (mulDysonEtransform e x).fst\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h₂\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : CommGroup α\ne : α\nx : Finset α × Finset α\n⊢ (mulDysonEtransform e (mulDysonEtransform e x)).snd = (mulDysonEtransform e x).snd\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h₁\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : CommGroup α\ne : α\nx : Finset α × Finset α\n⊢ x.fst ∪ e • x.snd ∪ e • (x.snd ∩ e⁻¹ • x.fst) = x.fst ∪ e • x.snd\n[PROOFSTEP]\nrw [smul_finset_inter, smul_inv_smul, inter_comm, union_eq_left_iff_subset]\n[GOAL]\ncase h₁\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : CommGroup α\ne : α\nx : Finset α × Finset α\n⊢ x.fst ∩ e • x.snd ⊆ x.fst ∪ e • x.snd\n[PROOFSTEP]\nexact inter_subset_union\n[GOAL]\ncase h₂\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : CommGroup α\ne : α\nx : Finset α × Finset α\n⊢ x.snd ∩ e⁻¹ • x.fst ∩ e⁻¹ • (x.fst ∪ e • x.snd) = x.snd ∩ e⁻¹ • x.fst\n[PROOFSTEP]\nrw [smul_finset_union, inv_smul_smul, union_comm, inter_eq_left_iff_subset]\n[GOAL]\ncase h₂\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : CommGroup α\ne : α\nx : Finset α × Finset α\n⊢ x.snd ∩ e⁻¹ • x.fst ⊆ x.snd ∪ e⁻¹ • x.fst\n[PROOFSTEP]\nexact inter_subset_union\n[GOAL]\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : CommGroup α\ne : α\nx : Finset α × Finset α\n⊢ e • (mulDysonEtransform e x).snd ⊆ (mulDysonEtransform e x).fst\n[PROOFSTEP]\ndsimp\n[GOAL]\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : CommGroup α\ne : α\nx : Finset α × Finset α\n⊢ e • (x.snd ∩ e⁻¹ • x.fst) ⊆ x.fst ∪ e • x.snd\n[PROOFSTEP]\nrw [smul_finset_inter, smul_inv_smul, inter_comm]\n[GOAL]\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : CommGroup α\ne : α\nx : Finset α × Finset α\n⊢ x.fst ∩ e • x.snd ⊆ x.fst ∪ e • x.snd\n[PROOFSTEP]\nexact inter_subset_union\n[GOAL]\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Group α\ne : α\nx : Finset α × Finset α\n⊢ mulEtransformLeft 1 x = x\n[PROOFSTEP]\nsimp [mulEtransformLeft]\n[GOAL]\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Group α\ne : α\nx : Finset α × Finset α\n⊢ mulEtransformRight 1 x = x\n[PROOFSTEP]\nsimp [mulEtransformRight]\n[GOAL]\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Group α\ne : α\nx : Finset α × Finset α\n⊢ (mulEtransformLeft e x).fst * (mulEtransformLeft e x).snd ⊆ x.fst * x.snd\n[PROOFSTEP]\nrefine' inter_mul_union_subset_union.trans (union_subset Subset.rfl _)\n[GOAL]\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Group α\ne : α\nx : Finset α × Finset α\n⊢ op e • x.fst * e⁻¹ • x.snd ⊆ x.fst * x.snd\n[PROOFSTEP]\nrw [op_smul_finset_mul_eq_mul_smul_finset, smul_inv_smul]\n[GOAL]\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Group α\ne : α\nx : Finset α × Finset α\n⊢ (mulEtransformRight e x).fst * (mulEtransformRight e x).snd ⊆ x.fst * x.snd\n[PROOFSTEP]\nrefine' union_mul_inter_subset_union.trans (union_subset Subset.rfl _)\n[GOAL]\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Group α\ne : α\nx : Finset α × Finset α\n⊢ op e • x.fst * e⁻¹ • x.snd ⊆ x.fst * x.snd\n[PROOFSTEP]\nrw [op_smul_finset_mul_eq_mul_smul_finset, smul_inv_smul]\n[GOAL]\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Group α\ne : α\nx : Finset α × Finset α\n⊢ Finset.card x.fst + Finset.card (op e • x.fst) = 2 * Finset.card x.fst\n[PROOFSTEP]\nrw [card_smul_finset, two_mul]\n[GOAL]\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Group α\ne : α\nx : Finset α × Finset α\n⊢ Finset.card x.snd + Finset.card (e⁻¹ • x.snd) = 2 * Finset.card x.snd\n[PROOFSTEP]\nrw [card_smul_finset, two_mul]\n[GOAL]\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : Group α\ne : α\nx : Finset α × Finset α\n⊢ card (mulEtransformLeft e x).fst + card (mulEtransformLeft e x).snd +\n      (card (mulEtransformRight e x).fst + card (mulEtransformRight e x).snd) =\n    card x.fst + card x.snd + (card x.fst + card x.snd)\n[PROOFSTEP]\nrw [add_add_add_comm, mulEtransformLeft.card, mulEtransformRight.card, ← mul_add, two_mul]\n[GOAL]\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : CommGroup α\ne : α\nx : Finset α × Finset α\n⊢ mulEtransformLeft e⁻¹ x = Prod.swap (mulEtransformRight e (Prod.swap x))\n[PROOFSTEP]\nsimp [-op_inv, op_smul_eq_smul, mulEtransformLeft, mulEtransformRight]\n[GOAL]\nα : Type u_1\ninst✝¹ : DecidableEq α\ninst✝ : CommGroup α\ne : α\nx : Finset α × Finset α\n⊢ mulEtransformRight e⁻¹ x = Prod.swap (mulEtransformLeft e (Prod.swap x))\n[PROOFSTEP]\nsimp [-op_inv, op_smul_eq_smul, mulEtransformLeft, mulEtransformRight]\n", "meta": {"mathlib_filename": "Mathlib.Combinatorics.Additive.Etransform", "llama_tokens": 2739, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7520125848754472, "lm_q2_score": 0.6859494678483918, "lm_q1q2_score": 0.5158426324106066}}
{"text": "[GOAL]\n𝕜 : Type u_1\nV₁ : Type u_2\nV₂ : Type u_3\nP₁ : Type u_4\nP₂ : Type u_5\ninst✝¹¹ : NormedField 𝕜\ninst✝¹⁰ : NormedAddCommGroup V₁\ninst✝⁹ : SeminormedAddCommGroup V₂\ninst✝⁸ : NormedSpace 𝕜 V₁\ninst✝⁷ : NormedSpace 𝕜 V₂\ninst✝⁶ : MetricSpace P₁\ninst✝⁵ : PseudoMetricSpace P₂\ninst✝⁴ : NormedAddTorsor V₁ P₁\ninst✝³ : NormedAddTorsor V₂ P₂\ninst✝² : FiniteDimensional 𝕜 V₁\ninst✝¹ : FiniteDimensional 𝕜 V₂\ninst✝ : Inhabited P₁\nli : P₁ →ᵃⁱ[𝕜] P₂\nh : finrank 𝕜 V₁ = finrank 𝕜 V₂\np : P₁\n⊢ ↑li p = ↑(LinearIsometry.toLinearIsometryEquiv (AffineIsometry.linearIsometry li) h) (p -ᵥ default) +ᵥ ↑li default\n[PROOFSTEP]\nsimp\n[GOAL]\n𝕜 : Type u\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁵ : AddCommGroup F'\ninst✝⁴ : Module 𝕜 F'\ninst✝³ : TopologicalSpace F'\ninst✝² : TopologicalAddGroup F'\ninst✝¹ : ContinuousSMul 𝕜 F'\ninst✝ : CompleteSpace 𝕜\n⊢ Continuous fun f => det f\n[PROOFSTEP]\nchange\n  Continuous fun f : E →L[𝕜] E =>\n    LinearMap.det\n      (f : E →ₗ[𝕜] E)\n        -- Porting note: this could be easier with `det_cases`\n[GOAL]\n𝕜 : Type u\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁵ : AddCommGroup F'\ninst✝⁴ : Module 𝕜 F'\ninst✝³ : TopologicalSpace F'\ninst✝² : TopologicalAddGroup F'\ninst✝¹ : ContinuousSMul 𝕜 F'\ninst✝ : CompleteSpace 𝕜\n⊢ Continuous fun f => ↑LinearMap.det ↑f\n[PROOFSTEP]\nby_cases h : ∃ s : Finset E, Nonempty (Basis (↥s) 𝕜 E)\n[GOAL]\ncase pos\n𝕜 : Type u\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁵ : AddCommGroup F'\ninst✝⁴ : Module 𝕜 F'\ninst✝³ : TopologicalSpace F'\ninst✝² : TopologicalAddGroup F'\ninst✝¹ : ContinuousSMul 𝕜 F'\ninst✝ : CompleteSpace 𝕜\nh : ∃ s, Nonempty (Basis { x // x ∈ s } 𝕜 E)\n⊢ Continuous fun f => ↑LinearMap.det ↑f\n[PROOFSTEP]\nrcases h with ⟨s, ⟨b⟩⟩\n[GOAL]\ncase pos.intro.intro\n𝕜 : Type u\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁵ : AddCommGroup F'\ninst✝⁴ : Module 𝕜 F'\ninst✝³ : TopologicalSpace F'\ninst✝² : TopologicalAddGroup F'\ninst✝¹ : ContinuousSMul 𝕜 F'\ninst✝ : CompleteSpace 𝕜\ns : Finset E\nb : Basis { x // x ∈ s } 𝕜 E\n⊢ Continuous fun f => ↑LinearMap.det ↑f\n[PROOFSTEP]\nhaveI : FiniteDimensional 𝕜 E := FiniteDimensional.of_fintype_basis b\n[GOAL]\ncase pos.intro.intro\n𝕜 : Type u\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁵ : AddCommGroup F'\ninst✝⁴ : Module 𝕜 F'\ninst✝³ : TopologicalSpace F'\ninst✝² : TopologicalAddGroup F'\ninst✝¹ : ContinuousSMul 𝕜 F'\ninst✝ : CompleteSpace 𝕜\ns : Finset E\nb : Basis { x // x ∈ s } 𝕜 E\nthis : FiniteDimensional 𝕜 E\n⊢ Continuous fun f => ↑LinearMap.det ↑f\n[PROOFSTEP]\nsimp_rw [LinearMap.det_eq_det_toMatrix_of_finset b]\n[GOAL]\ncase pos.intro.intro\n𝕜 : Type u\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁵ : AddCommGroup F'\ninst✝⁴ : Module 𝕜 F'\ninst✝³ : TopologicalSpace F'\ninst✝² : TopologicalAddGroup F'\ninst✝¹ : ContinuousSMul 𝕜 F'\ninst✝ : CompleteSpace 𝕜\ns : Finset E\nb : Basis { x // x ∈ s } 𝕜 E\nthis : FiniteDimensional 𝕜 E\n⊢ Continuous fun f => Matrix.det (↑(LinearMap.toMatrix b b) ↑f)\n[PROOFSTEP]\nrefine' Continuous.matrix_det _\n[GOAL]\ncase pos.intro.intro\n𝕜 : Type u\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁵ : AddCommGroup F'\ninst✝⁴ : Module 𝕜 F'\ninst✝³ : TopologicalSpace F'\ninst✝² : TopologicalAddGroup F'\ninst✝¹ : ContinuousSMul 𝕜 F'\ninst✝ : CompleteSpace 𝕜\ns : Finset E\nb : Basis { x // x ∈ s } 𝕜 E\nthis : FiniteDimensional 𝕜 E\n⊢ Continuous fun f => ↑(LinearMap.toMatrix b b) ↑f\n[PROOFSTEP]\nexact ((LinearMap.toMatrix b b).toLinearMap.comp (ContinuousLinearMap.coeLM 𝕜)).continuous_of_finiteDimensional\n[GOAL]\ncase neg\n𝕜 : Type u\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁵ : AddCommGroup F'\ninst✝⁴ : Module 𝕜 F'\ninst✝³ : TopologicalSpace F'\ninst✝² : TopologicalAddGroup F'\ninst✝¹ : ContinuousSMul 𝕜 F'\ninst✝ : CompleteSpace 𝕜\nh : ¬∃ s, Nonempty (Basis { x // x ∈ s } 𝕜 E)\n⊢ Continuous fun f => ↑LinearMap.det ↑f\n[PROOFSTEP]\nrw [LinearMap.det_def]\n[GOAL]\ncase neg\n𝕜 : Type u\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁵ : AddCommGroup F'\ninst✝⁴ : Module 𝕜 F'\ninst✝³ : TopologicalSpace F'\ninst✝² : TopologicalAddGroup F'\ninst✝¹ : ContinuousSMul 𝕜 F'\ninst✝ : CompleteSpace 𝕜\nh : ¬∃ s, Nonempty (Basis { x // x ∈ s } 𝕜 E)\n⊢ Continuous fun f =>\n    ↑(if H : ∃ s, Nonempty (Basis { x // x ∈ s } 𝕜 E) then\n          LinearMap.detAux (Trunc.mk (Nonempty.some (_ : Nonempty (Basis { x // x ∈ Exists.choose H } 𝕜 E))))\n        else 1)\n      ↑f\n[PROOFSTEP]\nsimpa only [h, MonoidHom.one_apply, dif_neg, not_false_iff] using continuous_const\n[GOAL]\n𝕜 : Type u\ninst✝¹³ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedSpace 𝕜 E\nF : Type w\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁸ : AddCommGroup F'\ninst✝⁷ : Module 𝕜 F'\ninst✝⁶ : TopologicalSpace F'\ninst✝⁵ : TopologicalAddGroup F'\ninst✝⁴ : ContinuousSMul 𝕜 F'\ninst✝³ : CompleteSpace 𝕜\nE' : Type u_1\ninst✝² : NormedAddCommGroup E'\ninst✝¹ : NormedSpace ℝ E'\ninst✝ : FiniteDimensional ℝ E'\n⊢ 0 < lipschitzExtensionConstant E'\n[PROOFSTEP]\nrw [lipschitzExtensionConstant]\n[GOAL]\n𝕜 : Type u\ninst✝¹³ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedSpace 𝕜 E\nF : Type w\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁸ : AddCommGroup F'\ninst✝⁷ : Module 𝕜 F'\ninst✝⁶ : TopologicalSpace F'\ninst✝⁵ : TopologicalAddGroup F'\ninst✝⁴ : ContinuousSMul 𝕜 F'\ninst✝³ : CompleteSpace 𝕜\nE' : Type u_1\ninst✝² : NormedAddCommGroup E'\ninst✝¹ : NormedSpace ℝ E'\ninst✝ : FiniteDimensional ℝ E'\n⊢ 0 <\n    let A := LinearEquiv.toContinuousLinearEquiv (Basis.equivFun (Basis.ofVectorSpace ℝ E'));\n    max (‖↑(ContinuousLinearEquiv.symm A)‖₊ * ‖↑A‖₊) 1\n[PROOFSTEP]\nexact zero_lt_one.trans_le (le_max_right _ _)\n[GOAL]\n𝕜 : Type u\ninst✝¹⁴ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type w\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁹ : AddCommGroup F'\ninst✝⁸ : Module 𝕜 F'\ninst✝⁷ : TopologicalSpace F'\ninst✝⁶ : TopologicalAddGroup F'\ninst✝⁵ : ContinuousSMul 𝕜 F'\ninst✝⁴ : CompleteSpace 𝕜\nα : Type u_1\ninst✝³ : PseudoMetricSpace α\nE' : Type u_2\ninst✝² : NormedAddCommGroup E'\ninst✝¹ : NormedSpace ℝ E'\ninst✝ : FiniteDimensional ℝ E'\ns : Set α\nf : α → E'\nK : ℝ≥0\nhf : LipschitzOnWith K f s\n⊢ ∃ g, LipschitzWith (lipschitzExtensionConstant E' * K) g ∧ EqOn f g s\n[PROOFSTEP]\nlet ι : Type _ := Basis.ofVectorSpaceIndex ℝ E'\n[GOAL]\n𝕜 : Type u\ninst✝¹⁴ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type w\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁹ : AddCommGroup F'\ninst✝⁸ : Module 𝕜 F'\ninst✝⁷ : TopologicalSpace F'\ninst✝⁶ : TopologicalAddGroup F'\ninst✝⁵ : ContinuousSMul 𝕜 F'\ninst✝⁴ : CompleteSpace 𝕜\nα : Type u_1\ninst✝³ : PseudoMetricSpace α\nE' : Type u_2\ninst✝² : NormedAddCommGroup E'\ninst✝¹ : NormedSpace ℝ E'\ninst✝ : FiniteDimensional ℝ E'\ns : Set α\nf : α → E'\nK : ℝ≥0\nhf : LipschitzOnWith K f s\nι : Type u_2 := ↑(Basis.ofVectorSpaceIndex ℝ E')\n⊢ ∃ g, LipschitzWith (lipschitzExtensionConstant E' * K) g ∧ EqOn f g s\n[PROOFSTEP]\nlet A := (Basis.ofVectorSpace ℝ E').equivFun.toContinuousLinearEquiv\n[GOAL]\n𝕜 : Type u\ninst✝¹⁴ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type w\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁹ : AddCommGroup F'\ninst✝⁸ : Module 𝕜 F'\ninst✝⁷ : TopologicalSpace F'\ninst✝⁶ : TopologicalAddGroup F'\ninst✝⁵ : ContinuousSMul 𝕜 F'\ninst✝⁴ : CompleteSpace 𝕜\nα : Type u_1\ninst✝³ : PseudoMetricSpace α\nE' : Type u_2\ninst✝² : NormedAddCommGroup E'\ninst✝¹ : NormedSpace ℝ E'\ninst✝ : FiniteDimensional ℝ E'\ns : Set α\nf : α → E'\nK : ℝ≥0\nhf : LipschitzOnWith K f s\nι : Type u_2 := ↑(Basis.ofVectorSpaceIndex ℝ E')\nA : E' ≃L[ℝ] ↑(Basis.ofVectorSpaceIndex ℝ E') → ℝ :=\n  LinearEquiv.toContinuousLinearEquiv (Basis.equivFun (Basis.ofVectorSpace ℝ E'))\n⊢ ∃ g, LipschitzWith (lipschitzExtensionConstant E' * K) g ∧ EqOn f g s\n[PROOFSTEP]\nhave LA : LipschitzWith ‖A.toContinuousLinearMap‖₊ A := by apply A.lipschitz\n[GOAL]\n𝕜 : Type u\ninst✝¹⁴ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type w\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁹ : AddCommGroup F'\ninst✝⁸ : Module 𝕜 F'\ninst✝⁷ : TopologicalSpace F'\ninst✝⁶ : TopologicalAddGroup F'\ninst✝⁵ : ContinuousSMul 𝕜 F'\ninst✝⁴ : CompleteSpace 𝕜\nα : Type u_1\ninst✝³ : PseudoMetricSpace α\nE' : Type u_2\ninst✝² : NormedAddCommGroup E'\ninst✝¹ : NormedSpace ℝ E'\ninst✝ : FiniteDimensional ℝ E'\ns : Set α\nf : α → E'\nK : ℝ≥0\nhf : LipschitzOnWith K f s\nι : Type u_2 := ↑(Basis.ofVectorSpaceIndex ℝ E')\nA : E' ≃L[ℝ] ↑(Basis.ofVectorSpaceIndex ℝ E') → ℝ :=\n  LinearEquiv.toContinuousLinearEquiv (Basis.equivFun (Basis.ofVectorSpace ℝ E'))\n⊢ LipschitzWith ‖↑A‖₊ ↑A\n[PROOFSTEP]\napply A.lipschitz\n[GOAL]\n𝕜 : Type u\ninst✝¹⁴ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type w\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁹ : AddCommGroup F'\ninst✝⁸ : Module 𝕜 F'\ninst✝⁷ : TopologicalSpace F'\ninst✝⁶ : TopologicalAddGroup F'\ninst✝⁵ : ContinuousSMul 𝕜 F'\ninst✝⁴ : CompleteSpace 𝕜\nα : Type u_1\ninst✝³ : PseudoMetricSpace α\nE' : Type u_2\ninst✝² : NormedAddCommGroup E'\ninst✝¹ : NormedSpace ℝ E'\ninst✝ : FiniteDimensional ℝ E'\ns : Set α\nf : α → E'\nK : ℝ≥0\nhf : LipschitzOnWith K f s\nι : Type u_2 := ↑(Basis.ofVectorSpaceIndex ℝ E')\nA : E' ≃L[ℝ] ↑(Basis.ofVectorSpaceIndex ℝ E') → ℝ :=\n  LinearEquiv.toContinuousLinearEquiv (Basis.equivFun (Basis.ofVectorSpace ℝ E'))\nLA : LipschitzWith ‖↑A‖₊ ↑A\n⊢ ∃ g, LipschitzWith (lipschitzExtensionConstant E' * K) g ∧ EqOn f g s\n[PROOFSTEP]\nhave L : LipschitzOnWith (‖A.toContinuousLinearMap‖₊ * K) (A ∘ f) s := LA.comp_lipschitzOnWith hf\n[GOAL]\n𝕜 : Type u\ninst✝¹⁴ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type w\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁹ : AddCommGroup F'\ninst✝⁸ : Module 𝕜 F'\ninst✝⁷ : TopologicalSpace F'\ninst✝⁶ : TopologicalAddGroup F'\ninst✝⁵ : ContinuousSMul 𝕜 F'\ninst✝⁴ : CompleteSpace 𝕜\nα : Type u_1\ninst✝³ : PseudoMetricSpace α\nE' : Type u_2\ninst✝² : NormedAddCommGroup E'\ninst✝¹ : NormedSpace ℝ E'\ninst✝ : FiniteDimensional ℝ E'\ns : Set α\nf : α → E'\nK : ℝ≥0\nhf : LipschitzOnWith K f s\nι : Type u_2 := ↑(Basis.ofVectorSpaceIndex ℝ E')\nA : E' ≃L[ℝ] ↑(Basis.ofVectorSpaceIndex ℝ E') → ℝ :=\n  LinearEquiv.toContinuousLinearEquiv (Basis.equivFun (Basis.ofVectorSpace ℝ E'))\nLA : LipschitzWith ‖↑A‖₊ ↑A\nL : LipschitzOnWith (‖↑A‖₊ * K) (↑A ∘ f) s\n⊢ ∃ g, LipschitzWith (lipschitzExtensionConstant E' * K) g ∧ EqOn f g s\n[PROOFSTEP]\nobtain ⟨g, hg, gs⟩ : ∃ g : α → ι → ℝ, LipschitzWith (‖A.toContinuousLinearMap‖₊ * K) g ∧ EqOn (A ∘ f) g s := L.extend_pi\n[GOAL]\ncase intro.intro\n𝕜 : Type u\ninst✝¹⁴ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type w\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁹ : AddCommGroup F'\ninst✝⁸ : Module 𝕜 F'\ninst✝⁷ : TopologicalSpace F'\ninst✝⁶ : TopologicalAddGroup F'\ninst✝⁵ : ContinuousSMul 𝕜 F'\ninst✝⁴ : CompleteSpace 𝕜\nα : Type u_1\ninst✝³ : PseudoMetricSpace α\nE' : Type u_2\ninst✝² : NormedAddCommGroup E'\ninst✝¹ : NormedSpace ℝ E'\ninst✝ : FiniteDimensional ℝ E'\ns : Set α\nf : α → E'\nK : ℝ≥0\nhf : LipschitzOnWith K f s\nι : Type u_2 := ↑(Basis.ofVectorSpaceIndex ℝ E')\nA : E' ≃L[ℝ] ↑(Basis.ofVectorSpaceIndex ℝ E') → ℝ :=\n  LinearEquiv.toContinuousLinearEquiv (Basis.equivFun (Basis.ofVectorSpace ℝ E'))\nLA : LipschitzWith ‖↑A‖₊ ↑A\nL : LipschitzOnWith (‖↑A‖₊ * K) (↑A ∘ f) s\ng : α → ι → ℝ\nhg : LipschitzWith (‖↑A‖₊ * K) g\ngs : EqOn (↑A ∘ f) g s\n⊢ ∃ g, LipschitzWith (lipschitzExtensionConstant E' * K) g ∧ EqOn f g s\n[PROOFSTEP]\nrefine' ⟨A.symm ∘ g, _, _⟩\n[GOAL]\ncase intro.intro.refine'_1\n𝕜 : Type u\ninst✝¹⁴ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type w\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁹ : AddCommGroup F'\ninst✝⁸ : Module 𝕜 F'\ninst✝⁷ : TopologicalSpace F'\ninst✝⁶ : TopologicalAddGroup F'\ninst✝⁵ : ContinuousSMul 𝕜 F'\ninst✝⁴ : CompleteSpace 𝕜\nα : Type u_1\ninst✝³ : PseudoMetricSpace α\nE' : Type u_2\ninst✝² : NormedAddCommGroup E'\ninst✝¹ : NormedSpace ℝ E'\ninst✝ : FiniteDimensional ℝ E'\ns : Set α\nf : α → E'\nK : ℝ≥0\nhf : LipschitzOnWith K f s\nι : Type u_2 := ↑(Basis.ofVectorSpaceIndex ℝ E')\nA : E' ≃L[ℝ] ↑(Basis.ofVectorSpaceIndex ℝ E') → ℝ :=\n  LinearEquiv.toContinuousLinearEquiv (Basis.equivFun (Basis.ofVectorSpace ℝ E'))\nLA : LipschitzWith ‖↑A‖₊ ↑A\nL : LipschitzOnWith (‖↑A‖₊ * K) (↑A ∘ f) s\ng : α → ι → ℝ\nhg : LipschitzWith (‖↑A‖₊ * K) g\ngs : EqOn (↑A ∘ f) g s\n⊢ LipschitzWith (lipschitzExtensionConstant E' * K) (↑(ContinuousLinearEquiv.symm A) ∘ g)\n[PROOFSTEP]\nhave LAsymm : LipschitzWith ‖A.symm.toContinuousLinearMap‖₊ A.symm := by apply A.symm.lipschitz\n[GOAL]\n𝕜 : Type u\ninst✝¹⁴ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type w\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁹ : AddCommGroup F'\ninst✝⁸ : Module 𝕜 F'\ninst✝⁷ : TopologicalSpace F'\ninst✝⁶ : TopologicalAddGroup F'\ninst✝⁵ : ContinuousSMul 𝕜 F'\ninst✝⁴ : CompleteSpace 𝕜\nα : Type u_1\ninst✝³ : PseudoMetricSpace α\nE' : Type u_2\ninst✝² : NormedAddCommGroup E'\ninst✝¹ : NormedSpace ℝ E'\ninst✝ : FiniteDimensional ℝ E'\ns : Set α\nf : α → E'\nK : ℝ≥0\nhf : LipschitzOnWith K f s\nι : Type u_2 := ↑(Basis.ofVectorSpaceIndex ℝ E')\nA : E' ≃L[ℝ] ↑(Basis.ofVectorSpaceIndex ℝ E') → ℝ :=\n  LinearEquiv.toContinuousLinearEquiv (Basis.equivFun (Basis.ofVectorSpace ℝ E'))\nLA : LipschitzWith ‖↑A‖₊ ↑A\nL : LipschitzOnWith (‖↑A‖₊ * K) (↑A ∘ f) s\ng : α → ι → ℝ\nhg : LipschitzWith (‖↑A‖₊ * K) g\ngs : EqOn (↑A ∘ f) g s\n⊢ LipschitzWith ‖↑(ContinuousLinearEquiv.symm A)‖₊ ↑(ContinuousLinearEquiv.symm A)\n[PROOFSTEP]\napply A.symm.lipschitz\n[GOAL]\ncase intro.intro.refine'_1\n𝕜 : Type u\ninst✝¹⁴ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type w\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁹ : AddCommGroup F'\ninst✝⁸ : Module 𝕜 F'\ninst✝⁷ : TopologicalSpace F'\ninst✝⁶ : TopologicalAddGroup F'\ninst✝⁵ : ContinuousSMul 𝕜 F'\ninst✝⁴ : CompleteSpace 𝕜\nα : Type u_1\ninst✝³ : PseudoMetricSpace α\nE' : Type u_2\ninst✝² : NormedAddCommGroup E'\ninst✝¹ : NormedSpace ℝ E'\ninst✝ : FiniteDimensional ℝ E'\ns : Set α\nf : α → E'\nK : ℝ≥0\nhf : LipschitzOnWith K f s\nι : Type u_2 := ↑(Basis.ofVectorSpaceIndex ℝ E')\nA : E' ≃L[ℝ] ↑(Basis.ofVectorSpaceIndex ℝ E') → ℝ :=\n  LinearEquiv.toContinuousLinearEquiv (Basis.equivFun (Basis.ofVectorSpace ℝ E'))\nLA : LipschitzWith ‖↑A‖₊ ↑A\nL : LipschitzOnWith (‖↑A‖₊ * K) (↑A ∘ f) s\ng : α → ι → ℝ\nhg : LipschitzWith (‖↑A‖₊ * K) g\ngs : EqOn (↑A ∘ f) g s\nLAsymm : LipschitzWith ‖↑(ContinuousLinearEquiv.symm A)‖₊ ↑(ContinuousLinearEquiv.symm A)\n⊢ LipschitzWith (lipschitzExtensionConstant E' * K) (↑(ContinuousLinearEquiv.symm A) ∘ g)\n[PROOFSTEP]\napply (LAsymm.comp hg).weaken\n[GOAL]\ncase intro.intro.refine'_1\n𝕜 : Type u\ninst✝¹⁴ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type w\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁹ : AddCommGroup F'\ninst✝⁸ : Module 𝕜 F'\ninst✝⁷ : TopologicalSpace F'\ninst✝⁶ : TopologicalAddGroup F'\ninst✝⁵ : ContinuousSMul 𝕜 F'\ninst✝⁴ : CompleteSpace 𝕜\nα : Type u_1\ninst✝³ : PseudoMetricSpace α\nE' : Type u_2\ninst✝² : NormedAddCommGroup E'\ninst✝¹ : NormedSpace ℝ E'\ninst✝ : FiniteDimensional ℝ E'\ns : Set α\nf : α → E'\nK : ℝ≥0\nhf : LipschitzOnWith K f s\nι : Type u_2 := ↑(Basis.ofVectorSpaceIndex ℝ E')\nA : E' ≃L[ℝ] ↑(Basis.ofVectorSpaceIndex ℝ E') → ℝ :=\n  LinearEquiv.toContinuousLinearEquiv (Basis.equivFun (Basis.ofVectorSpace ℝ E'))\nLA : LipschitzWith ‖↑A‖₊ ↑A\nL : LipschitzOnWith (‖↑A‖₊ * K) (↑A ∘ f) s\ng : α → ι → ℝ\nhg : LipschitzWith (‖↑A‖₊ * K) g\ngs : EqOn (↑A ∘ f) g s\nLAsymm : LipschitzWith ‖↑(ContinuousLinearEquiv.symm A)‖₊ ↑(ContinuousLinearEquiv.symm A)\n⊢ ‖↑(ContinuousLinearEquiv.symm A)‖₊ * (‖↑A‖₊ * K) ≤ lipschitzExtensionConstant E' * K\n[PROOFSTEP]\nrw [lipschitzExtensionConstant, ← mul_assoc]\n[GOAL]\ncase intro.intro.refine'_1\n𝕜 : Type u\ninst✝¹⁴ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type w\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁹ : AddCommGroup F'\ninst✝⁸ : Module 𝕜 F'\ninst✝⁷ : TopologicalSpace F'\ninst✝⁶ : TopologicalAddGroup F'\ninst✝⁵ : ContinuousSMul 𝕜 F'\ninst✝⁴ : CompleteSpace 𝕜\nα : Type u_1\ninst✝³ : PseudoMetricSpace α\nE' : Type u_2\ninst✝² : NormedAddCommGroup E'\ninst✝¹ : NormedSpace ℝ E'\ninst✝ : FiniteDimensional ℝ E'\ns : Set α\nf : α → E'\nK : ℝ≥0\nhf : LipschitzOnWith K f s\nι : Type u_2 := ↑(Basis.ofVectorSpaceIndex ℝ E')\nA : E' ≃L[ℝ] ↑(Basis.ofVectorSpaceIndex ℝ E') → ℝ :=\n  LinearEquiv.toContinuousLinearEquiv (Basis.equivFun (Basis.ofVectorSpace ℝ E'))\nLA : LipschitzWith ‖↑A‖₊ ↑A\nL : LipschitzOnWith (‖↑A‖₊ * K) (↑A ∘ f) s\ng : α → ι → ℝ\nhg : LipschitzWith (‖↑A‖₊ * K) g\ngs : EqOn (↑A ∘ f) g s\nLAsymm : LipschitzWith ‖↑(ContinuousLinearEquiv.symm A)‖₊ ↑(ContinuousLinearEquiv.symm A)\n⊢ ‖↑(ContinuousLinearEquiv.symm A)‖₊ * ‖↑A‖₊ * K ≤\n    (let A := LinearEquiv.toContinuousLinearEquiv (Basis.equivFun (Basis.ofVectorSpace ℝ E'));\n      max (‖↑(ContinuousLinearEquiv.symm A)‖₊ * ‖↑A‖₊) 1) *\n      K\n[PROOFSTEP]\nrefine' mul_le_mul' (le_max_left _ _) le_rfl\n[GOAL]\ncase intro.intro.refine'_2\n𝕜 : Type u\ninst✝¹⁴ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type w\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁹ : AddCommGroup F'\ninst✝⁸ : Module 𝕜 F'\ninst✝⁷ : TopologicalSpace F'\ninst✝⁶ : TopologicalAddGroup F'\ninst✝⁵ : ContinuousSMul 𝕜 F'\ninst✝⁴ : CompleteSpace 𝕜\nα : Type u_1\ninst✝³ : PseudoMetricSpace α\nE' : Type u_2\ninst✝² : NormedAddCommGroup E'\ninst✝¹ : NormedSpace ℝ E'\ninst✝ : FiniteDimensional ℝ E'\ns : Set α\nf : α → E'\nK : ℝ≥0\nhf : LipschitzOnWith K f s\nι : Type u_2 := ↑(Basis.ofVectorSpaceIndex ℝ E')\nA : E' ≃L[ℝ] ↑(Basis.ofVectorSpaceIndex ℝ E') → ℝ :=\n  LinearEquiv.toContinuousLinearEquiv (Basis.equivFun (Basis.ofVectorSpace ℝ E'))\nLA : LipschitzWith ‖↑A‖₊ ↑A\nL : LipschitzOnWith (‖↑A‖₊ * K) (↑A ∘ f) s\ng : α → ι → ℝ\nhg : LipschitzWith (‖↑A‖₊ * K) g\ngs : EqOn (↑A ∘ f) g s\n⊢ EqOn f (↑(ContinuousLinearEquiv.symm A) ∘ g) s\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase intro.intro.refine'_2\n𝕜 : Type u\ninst✝¹⁴ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type w\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁹ : AddCommGroup F'\ninst✝⁸ : Module 𝕜 F'\ninst✝⁷ : TopologicalSpace F'\ninst✝⁶ : TopologicalAddGroup F'\ninst✝⁵ : ContinuousSMul 𝕜 F'\ninst✝⁴ : CompleteSpace 𝕜\nα : Type u_1\ninst✝³ : PseudoMetricSpace α\nE' : Type u_2\ninst✝² : NormedAddCommGroup E'\ninst✝¹ : NormedSpace ℝ E'\ninst✝ : FiniteDimensional ℝ E'\ns : Set α\nf : α → E'\nK : ℝ≥0\nhf : LipschitzOnWith K f s\nι : Type u_2 := ↑(Basis.ofVectorSpaceIndex ℝ E')\nA : E' ≃L[ℝ] ↑(Basis.ofVectorSpaceIndex ℝ E') → ℝ :=\n  LinearEquiv.toContinuousLinearEquiv (Basis.equivFun (Basis.ofVectorSpace ℝ E'))\nLA : LipschitzWith ‖↑A‖₊ ↑A\nL : LipschitzOnWith (‖↑A‖₊ * K) (↑A ∘ f) s\ng : α → ι → ℝ\nhg : LipschitzWith (‖↑A‖₊ * K) g\ngs : EqOn (↑A ∘ f) g s\nx : α\nhx : x ∈ s\n⊢ f x = (↑(ContinuousLinearEquiv.symm A) ∘ g) x\n[PROOFSTEP]\nhave : A (f x) = g x := gs hx\n[GOAL]\ncase intro.intro.refine'_2\n𝕜 : Type u\ninst✝¹⁴ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace 𝕜 E\nF : Type w\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁹ : AddCommGroup F'\ninst✝⁸ : Module 𝕜 F'\ninst✝⁷ : TopologicalSpace F'\ninst✝⁶ : TopologicalAddGroup F'\ninst✝⁵ : ContinuousSMul 𝕜 F'\ninst✝⁴ : CompleteSpace 𝕜\nα : Type u_1\ninst✝³ : PseudoMetricSpace α\nE' : Type u_2\ninst✝² : NormedAddCommGroup E'\ninst✝¹ : NormedSpace ℝ E'\ninst✝ : FiniteDimensional ℝ E'\ns : Set α\nf : α → E'\nK : ℝ≥0\nhf : LipschitzOnWith K f s\nι : Type u_2 := ↑(Basis.ofVectorSpaceIndex ℝ E')\nA : E' ≃L[ℝ] ↑(Basis.ofVectorSpaceIndex ℝ E') → ℝ :=\n  LinearEquiv.toContinuousLinearEquiv (Basis.equivFun (Basis.ofVectorSpace ℝ E'))\nLA : LipschitzWith ‖↑A‖₊ ↑A\nL : LipschitzOnWith (‖↑A‖₊ * K) (↑A ∘ f) s\ng : α → ι → ℝ\nhg : LipschitzWith (‖↑A‖₊ * K) g\ngs : EqOn (↑A ∘ f) g s\nx : α\nhx : x ∈ s\nthis : ↑A (f x) = g x\n⊢ f x = (↑(ContinuousLinearEquiv.symm A) ∘ g) x\n[PROOFSTEP]\nsimp only [(· ∘ ·), ← this, A.symm_apply_apply]\n[GOAL]\n𝕜 : Type u\ninst✝¹¹ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁸ : NormedAddCommGroup F\ninst✝⁷ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁶ : AddCommGroup F'\ninst✝⁵ : Module 𝕜 F'\ninst✝⁴ : TopologicalSpace F'\ninst✝³ : TopologicalAddGroup F'\ninst✝² : ContinuousSMul 𝕜 F'\ninst✝¹ : CompleteSpace 𝕜\ninst✝ : FiniteDimensional 𝕜 E\nf : E →ₗ[𝕜] F\nhf : ker f = ⊥\n⊢ ∃ K, K > 0 ∧ AntilipschitzWith K ↑f\n[PROOFSTEP]\ncases subsingleton_or_nontrivial E\n[GOAL]\ncase inl\n𝕜 : Type u\ninst✝¹¹ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁸ : NormedAddCommGroup F\ninst✝⁷ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁶ : AddCommGroup F'\ninst✝⁵ : Module 𝕜 F'\ninst✝⁴ : TopologicalSpace F'\ninst✝³ : TopologicalAddGroup F'\ninst✝² : ContinuousSMul 𝕜 F'\ninst✝¹ : CompleteSpace 𝕜\ninst✝ : FiniteDimensional 𝕜 E\nf : E →ₗ[𝕜] F\nhf : ker f = ⊥\nh✝ : Subsingleton E\n⊢ ∃ K, K > 0 ∧ AntilipschitzWith K ↑f\n[PROOFSTEP]\nexact ⟨1, zero_lt_one, AntilipschitzWith.of_subsingleton⟩\n[GOAL]\ncase inr\n𝕜 : Type u\ninst✝¹¹ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁸ : NormedAddCommGroup F\ninst✝⁷ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁶ : AddCommGroup F'\ninst✝⁵ : Module 𝕜 F'\ninst✝⁴ : TopologicalSpace F'\ninst✝³ : TopologicalAddGroup F'\ninst✝² : ContinuousSMul 𝕜 F'\ninst✝¹ : CompleteSpace 𝕜\ninst✝ : FiniteDimensional 𝕜 E\nf : E →ₗ[𝕜] F\nhf : ker f = ⊥\nh✝ : Nontrivial E\n⊢ ∃ K, K > 0 ∧ AntilipschitzWith K ↑f\n[PROOFSTEP]\nrw [LinearMap.ker_eq_bot] at hf \n[GOAL]\ncase inr\n𝕜 : Type u\ninst✝¹¹ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁸ : NormedAddCommGroup F\ninst✝⁷ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁶ : AddCommGroup F'\ninst✝⁵ : Module 𝕜 F'\ninst✝⁴ : TopologicalSpace F'\ninst✝³ : TopologicalAddGroup F'\ninst✝² : ContinuousSMul 𝕜 F'\ninst✝¹ : CompleteSpace 𝕜\ninst✝ : FiniteDimensional 𝕜 E\nf : E →ₗ[𝕜] F\nhf : Function.Injective ↑f\nh✝ : Nontrivial E\n⊢ ∃ K, K > 0 ∧ AntilipschitzWith K ↑f\n[PROOFSTEP]\nlet e : E ≃L[𝕜] LinearMap.range f := (LinearEquiv.ofInjective f hf).toContinuousLinearEquiv\n[GOAL]\ncase inr\n𝕜 : Type u\ninst✝¹¹ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁸ : NormedAddCommGroup F\ninst✝⁷ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁶ : AddCommGroup F'\ninst✝⁵ : Module 𝕜 F'\ninst✝⁴ : TopologicalSpace F'\ninst✝³ : TopologicalAddGroup F'\ninst✝² : ContinuousSMul 𝕜 F'\ninst✝¹ : CompleteSpace 𝕜\ninst✝ : FiniteDimensional 𝕜 E\nf : E →ₗ[𝕜] F\nhf : Function.Injective ↑f\nh✝ : Nontrivial E\ne : E ≃L[𝕜] { x // x ∈ range f } := LinearEquiv.toContinuousLinearEquiv (LinearEquiv.ofInjective f hf)\n⊢ ∃ K, K > 0 ∧ AntilipschitzWith K ↑f\n[PROOFSTEP]\nexact ⟨_, e.nnnorm_symm_pos, e.antilipschitz⟩\n[GOAL]\n𝕜 : Type u\ninst✝¹¹ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁸ : NormedAddCommGroup F\ninst✝⁷ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁶ : AddCommGroup F'\ninst✝⁵ : Module 𝕜 F'\ninst✝⁴ : TopologicalSpace F'\ninst✝³ : TopologicalAddGroup F'\ninst✝² : ContinuousSMul 𝕜 F'\ninst✝¹ : CompleteSpace 𝕜\nι : Type u_1\ninst✝ : Finite ι\nf : ι → E\nhf : LinearIndependent 𝕜 f\n⊢ ∀ᶠ (g : ι → E) in 𝓝 f, LinearIndependent 𝕜 g\n[PROOFSTEP]\ncases nonempty_fintype ι\n[GOAL]\ncase intro\n𝕜 : Type u\ninst✝¹¹ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁸ : NormedAddCommGroup F\ninst✝⁷ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁶ : AddCommGroup F'\ninst✝⁵ : Module 𝕜 F'\ninst✝⁴ : TopologicalSpace F'\ninst✝³ : TopologicalAddGroup F'\ninst✝² : ContinuousSMul 𝕜 F'\ninst✝¹ : CompleteSpace 𝕜\nι : Type u_1\ninst✝ : Finite ι\nf : ι → E\nhf : LinearIndependent 𝕜 f\nval✝ : Fintype ι\n⊢ ∀ᶠ (g : ι → E) in 𝓝 f, LinearIndependent 𝕜 g\n[PROOFSTEP]\nsimp only [Fintype.linearIndependent_iff'] at hf ⊢\n[GOAL]\ncase intro\n𝕜 : Type u\ninst✝¹¹ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁸ : NormedAddCommGroup F\ninst✝⁷ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁶ : AddCommGroup F'\ninst✝⁵ : Module 𝕜 F'\ninst✝⁴ : TopologicalSpace F'\ninst✝³ : TopologicalAddGroup F'\ninst✝² : ContinuousSMul 𝕜 F'\ninst✝¹ : CompleteSpace 𝕜\nι : Type u_1\ninst✝ : Finite ι\nf : ι → E\nval✝ : Fintype ι\nhf : LinearMap.ker (↑(LinearMap.lsum 𝕜 (fun x => 𝕜) ℕ) fun i => LinearMap.smulRight LinearMap.id (f i)) = ⊥\n⊢ ∀ᶠ (g : ι → E) in 𝓝 f,\n    LinearMap.ker (↑(LinearMap.lsum 𝕜 (fun x => 𝕜) ℕ) fun i => LinearMap.smulRight LinearMap.id (g i)) = ⊥\n[PROOFSTEP]\nrcases LinearMap.exists_antilipschitzWith _ hf with ⟨K, K0, hK⟩\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u\ninst✝¹¹ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁸ : NormedAddCommGroup F\ninst✝⁷ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁶ : AddCommGroup F'\ninst✝⁵ : Module 𝕜 F'\ninst✝⁴ : TopologicalSpace F'\ninst✝³ : TopologicalAddGroup F'\ninst✝² : ContinuousSMul 𝕜 F'\ninst✝¹ : CompleteSpace 𝕜\nι : Type u_1\ninst✝ : Finite ι\nf : ι → E\nval✝ : Fintype ι\nhf : LinearMap.ker (↑(LinearMap.lsum 𝕜 (fun x => 𝕜) ℕ) fun i => LinearMap.smulRight LinearMap.id (f i)) = ⊥\nK : ℝ≥0\nK0 : K > 0\nhK : AntilipschitzWith K ↑(↑(LinearMap.lsum 𝕜 (fun x => 𝕜) ℕ) fun i => LinearMap.smulRight LinearMap.id (f i))\n⊢ ∀ᶠ (g : ι → E) in 𝓝 f,\n    LinearMap.ker (↑(LinearMap.lsum 𝕜 (fun x => 𝕜) ℕ) fun i => LinearMap.smulRight LinearMap.id (g i)) = ⊥\n[PROOFSTEP]\nhave : Tendsto (fun g : ι → E => ∑ i, ‖g i - f i‖) (𝓝 f) (𝓝 <| ∑ i, ‖f i - f i‖) :=\n  tendsto_finset_sum _ fun i _ => Tendsto.norm <| ((continuous_apply i).tendsto _).sub tendsto_const_nhds\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u\ninst✝¹¹ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁸ : NormedAddCommGroup F\ninst✝⁷ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁶ : AddCommGroup F'\ninst✝⁵ : Module 𝕜 F'\ninst✝⁴ : TopologicalSpace F'\ninst✝³ : TopologicalAddGroup F'\ninst✝² : ContinuousSMul 𝕜 F'\ninst✝¹ : CompleteSpace 𝕜\nι : Type u_1\ninst✝ : Finite ι\nf : ι → E\nval✝ : Fintype ι\nhf : LinearMap.ker (↑(LinearMap.lsum 𝕜 (fun x => 𝕜) ℕ) fun i => LinearMap.smulRight LinearMap.id (f i)) = ⊥\nK : ℝ≥0\nK0 : K > 0\nhK : AntilipschitzWith K ↑(↑(LinearMap.lsum 𝕜 (fun x => 𝕜) ℕ) fun i => LinearMap.smulRight LinearMap.id (f i))\nthis : Tendsto (fun g => ∑ i : ι, ‖g i - f i‖) (𝓝 f) (𝓝 (∑ i : ι, ‖f i - f i‖))\n⊢ ∀ᶠ (g : ι → E) in 𝓝 f,\n    LinearMap.ker (↑(LinearMap.lsum 𝕜 (fun x => 𝕜) ℕ) fun i => LinearMap.smulRight LinearMap.id (g i)) = ⊥\n[PROOFSTEP]\nsimp only [sub_self, norm_zero, Finset.sum_const_zero] at this \n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u\ninst✝¹¹ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁸ : NormedAddCommGroup F\ninst✝⁷ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁶ : AddCommGroup F'\ninst✝⁵ : Module 𝕜 F'\ninst✝⁴ : TopologicalSpace F'\ninst✝³ : TopologicalAddGroup F'\ninst✝² : ContinuousSMul 𝕜 F'\ninst✝¹ : CompleteSpace 𝕜\nι : Type u_1\ninst✝ : Finite ι\nf : ι → E\nval✝ : Fintype ι\nhf : LinearMap.ker (↑(LinearMap.lsum 𝕜 (fun x => 𝕜) ℕ) fun i => LinearMap.smulRight LinearMap.id (f i)) = ⊥\nK : ℝ≥0\nK0 : K > 0\nhK : AntilipschitzWith K ↑(↑(LinearMap.lsum 𝕜 (fun x => 𝕜) ℕ) fun i => LinearMap.smulRight LinearMap.id (f i))\nthis : Tendsto (fun g => ∑ i : ι, ‖g i - f i‖) (𝓝 f) (𝓝 0)\n⊢ ∀ᶠ (g : ι → E) in 𝓝 f,\n    LinearMap.ker (↑(LinearMap.lsum 𝕜 (fun x => 𝕜) ℕ) fun i => LinearMap.smulRight LinearMap.id (g i)) = ⊥\n[PROOFSTEP]\nrefine' (this.eventually (gt_mem_nhds <| inv_pos.2 K0)).mono fun g hg => _\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u\ninst✝¹¹ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁸ : NormedAddCommGroup F\ninst✝⁷ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁶ : AddCommGroup F'\ninst✝⁵ : Module 𝕜 F'\ninst✝⁴ : TopologicalSpace F'\ninst✝³ : TopologicalAddGroup F'\ninst✝² : ContinuousSMul 𝕜 F'\ninst✝¹ : CompleteSpace 𝕜\nι : Type u_1\ninst✝ : Finite ι\nf : ι → E\nval✝ : Fintype ι\nhf : LinearMap.ker (↑(LinearMap.lsum 𝕜 (fun x => 𝕜) ℕ) fun i => LinearMap.smulRight LinearMap.id (f i)) = ⊥\nK : ℝ≥0\nK0 : K > 0\nhK : AntilipschitzWith K ↑(↑(LinearMap.lsum 𝕜 (fun x => 𝕜) ℕ) fun i => LinearMap.smulRight LinearMap.id (f i))\nthis : Tendsto (fun g => ∑ i : ι, ‖g i - f i‖) (𝓝 f) (𝓝 0)\ng : ι → E\nhg : ∑ i : ι, ‖g i - f i‖ < ((fun a => ↑a) K)⁻¹\n⊢ LinearMap.ker (↑(LinearMap.lsum 𝕜 (fun x => 𝕜) ℕ) fun i => LinearMap.smulRight LinearMap.id (g i)) = ⊥\n[PROOFSTEP]\nreplace hg : ∑ i, ‖g i - f i‖₊ < K⁻¹\n[GOAL]\ncase hg\n𝕜 : Type u\ninst✝¹¹ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁸ : NormedAddCommGroup F\ninst✝⁷ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁶ : AddCommGroup F'\ninst✝⁵ : Module 𝕜 F'\ninst✝⁴ : TopologicalSpace F'\ninst✝³ : TopologicalAddGroup F'\ninst✝² : ContinuousSMul 𝕜 F'\ninst✝¹ : CompleteSpace 𝕜\nι : Type u_1\ninst✝ : Finite ι\nf : ι → E\nval✝ : Fintype ι\nhf : LinearMap.ker (↑(LinearMap.lsum 𝕜 (fun x => 𝕜) ℕ) fun i => LinearMap.smulRight LinearMap.id (f i)) = ⊥\nK : ℝ≥0\nK0 : K > 0\nhK : AntilipschitzWith K ↑(↑(LinearMap.lsum 𝕜 (fun x => 𝕜) ℕ) fun i => LinearMap.smulRight LinearMap.id (f i))\nthis : Tendsto (fun g => ∑ i : ι, ‖g i - f i‖) (𝓝 f) (𝓝 0)\ng : ι → E\nhg : ∑ i : ι, ‖g i - f i‖ < ((fun a => ↑a) K)⁻¹\n⊢ ∑ i : ι, ‖g i - f i‖₊ < K⁻¹\n[PROOFSTEP]\nrw [← NNReal.coe_lt_coe]\n[GOAL]\ncase hg\n𝕜 : Type u\ninst✝¹¹ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁸ : NormedAddCommGroup F\ninst✝⁷ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁶ : AddCommGroup F'\ninst✝⁵ : Module 𝕜 F'\ninst✝⁴ : TopologicalSpace F'\ninst✝³ : TopologicalAddGroup F'\ninst✝² : ContinuousSMul 𝕜 F'\ninst✝¹ : CompleteSpace 𝕜\nι : Type u_1\ninst✝ : Finite ι\nf : ι → E\nval✝ : Fintype ι\nhf : LinearMap.ker (↑(LinearMap.lsum 𝕜 (fun x => 𝕜) ℕ) fun i => LinearMap.smulRight LinearMap.id (f i)) = ⊥\nK : ℝ≥0\nK0 : K > 0\nhK : AntilipschitzWith K ↑(↑(LinearMap.lsum 𝕜 (fun x => 𝕜) ℕ) fun i => LinearMap.smulRight LinearMap.id (f i))\nthis : Tendsto (fun g => ∑ i : ι, ‖g i - f i‖) (𝓝 f) (𝓝 0)\ng : ι → E\nhg : ∑ i : ι, ‖g i - f i‖ < ((fun a => ↑a) K)⁻¹\n⊢ ↑(∑ i : ι, ‖g i - f i‖₊) < ↑K⁻¹\n[PROOFSTEP]\npush_cast\n[GOAL]\ncase hg\n𝕜 : Type u\ninst✝¹¹ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁸ : NormedAddCommGroup F\ninst✝⁷ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁶ : AddCommGroup F'\ninst✝⁵ : Module 𝕜 F'\ninst✝⁴ : TopologicalSpace F'\ninst✝³ : TopologicalAddGroup F'\ninst✝² : ContinuousSMul 𝕜 F'\ninst✝¹ : CompleteSpace 𝕜\nι : Type u_1\ninst✝ : Finite ι\nf : ι → E\nval✝ : Fintype ι\nhf : LinearMap.ker (↑(LinearMap.lsum 𝕜 (fun x => 𝕜) ℕ) fun i => LinearMap.smulRight LinearMap.id (f i)) = ⊥\nK : ℝ≥0\nK0 : K > 0\nhK : AntilipschitzWith K ↑(↑(LinearMap.lsum 𝕜 (fun x => 𝕜) ℕ) fun i => LinearMap.smulRight LinearMap.id (f i))\nthis : Tendsto (fun g => ∑ i : ι, ‖g i - f i‖) (𝓝 f) (𝓝 0)\ng : ι → E\nhg : ∑ i : ι, ‖g i - f i‖ < ((fun a => ↑a) K)⁻¹\n⊢ ∑ x : ι, ‖g x - f x‖ < (↑K)⁻¹\n[PROOFSTEP]\nexact hg\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u\ninst✝¹¹ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁸ : NormedAddCommGroup F\ninst✝⁷ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁶ : AddCommGroup F'\ninst✝⁵ : Module 𝕜 F'\ninst✝⁴ : TopologicalSpace F'\ninst✝³ : TopologicalAddGroup F'\ninst✝² : ContinuousSMul 𝕜 F'\ninst✝¹ : CompleteSpace 𝕜\nι : Type u_1\ninst✝ : Finite ι\nf : ι → E\nval✝ : Fintype ι\nhf : LinearMap.ker (↑(LinearMap.lsum 𝕜 (fun x => 𝕜) ℕ) fun i => LinearMap.smulRight LinearMap.id (f i)) = ⊥\nK : ℝ≥0\nK0 : K > 0\nhK : AntilipschitzWith K ↑(↑(LinearMap.lsum 𝕜 (fun x => 𝕜) ℕ) fun i => LinearMap.smulRight LinearMap.id (f i))\nthis : Tendsto (fun g => ∑ i : ι, ‖g i - f i‖) (𝓝 f) (𝓝 0)\ng : ι → E\nhg : ∑ i : ι, ‖g i - f i‖₊ < K⁻¹\n⊢ LinearMap.ker (↑(LinearMap.lsum 𝕜 (fun x => 𝕜) ℕ) fun i => LinearMap.smulRight LinearMap.id (g i)) = ⊥\n[PROOFSTEP]\nrw [LinearMap.ker_eq_bot]\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u\ninst✝¹¹ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁸ : NormedAddCommGroup F\ninst✝⁷ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁶ : AddCommGroup F'\ninst✝⁵ : Module 𝕜 F'\ninst✝⁴ : TopologicalSpace F'\ninst✝³ : TopologicalAddGroup F'\ninst✝² : ContinuousSMul 𝕜 F'\ninst✝¹ : CompleteSpace 𝕜\nι : Type u_1\ninst✝ : Finite ι\nf : ι → E\nval✝ : Fintype ι\nhf : LinearMap.ker (↑(LinearMap.lsum 𝕜 (fun x => 𝕜) ℕ) fun i => LinearMap.smulRight LinearMap.id (f i)) = ⊥\nK : ℝ≥0\nK0 : K > 0\nhK : AntilipschitzWith K ↑(↑(LinearMap.lsum 𝕜 (fun x => 𝕜) ℕ) fun i => LinearMap.smulRight LinearMap.id (f i))\nthis : Tendsto (fun g => ∑ i : ι, ‖g i - f i‖) (𝓝 f) (𝓝 0)\ng : ι → E\nhg : ∑ i : ι, ‖g i - f i‖₊ < K⁻¹\n⊢ Function.Injective ↑(↑(LinearMap.lsum 𝕜 (fun x => 𝕜) ℕ) fun i => LinearMap.smulRight LinearMap.id (g i))\n[PROOFSTEP]\nrefine' (hK.add_sub_lipschitzWith (LipschitzWith.of_dist_le_mul fun v u => _) hg).injective\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u\ninst✝¹¹ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁸ : NormedAddCommGroup F\ninst✝⁷ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁶ : AddCommGroup F'\ninst✝⁵ : Module 𝕜 F'\ninst✝⁴ : TopologicalSpace F'\ninst✝³ : TopologicalAddGroup F'\ninst✝² : ContinuousSMul 𝕜 F'\ninst✝¹ : CompleteSpace 𝕜\nι : Type u_1\ninst✝ : Finite ι\nf : ι → E\nval✝ : Fintype ι\nhf : LinearMap.ker (↑(LinearMap.lsum 𝕜 (fun x => 𝕜) ℕ) fun i => LinearMap.smulRight LinearMap.id (f i)) = ⊥\nK : ℝ≥0\nK0 : K > 0\nhK : AntilipschitzWith K ↑(↑(LinearMap.lsum 𝕜 (fun x => 𝕜) ℕ) fun i => LinearMap.smulRight LinearMap.id (f i))\nthis : Tendsto (fun g => ∑ i : ι, ‖g i - f i‖) (𝓝 f) (𝓝 0)\ng : ι → E\nhg : ∑ i : ι, ‖g i - f i‖₊ < K⁻¹\nv u : ι → 𝕜\n⊢ dist\n      ((↑(↑(LinearMap.lsum 𝕜 (fun x => 𝕜) ℕ) fun i => LinearMap.smulRight LinearMap.id (g i)) -\n          ↑(↑(LinearMap.lsum 𝕜 (fun x => 𝕜) ℕ) fun i => LinearMap.smulRight LinearMap.id (f i)))\n        v)\n      ((↑(↑(LinearMap.lsum 𝕜 (fun x => 𝕜) ℕ) fun i => LinearMap.smulRight LinearMap.id (g i)) -\n          ↑(↑(LinearMap.lsum 𝕜 (fun x => 𝕜) ℕ) fun i => LinearMap.smulRight LinearMap.id (f i)))\n        u) ≤\n    ↑(∑ i : ι, ‖g i - f i‖₊) * dist v u\n[PROOFSTEP]\nsimp only [dist_eq_norm, LinearMap.lsum_apply, Pi.sub_apply, LinearMap.sum_apply, LinearMap.comp_apply,\n  LinearMap.proj_apply, LinearMap.smulRight_apply, LinearMap.id_apply, ← Finset.sum_sub_distrib, ← smul_sub, ← sub_smul,\n  NNReal.coe_sum, coe_nnnorm, Finset.sum_mul]\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u\ninst✝¹¹ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁸ : NormedAddCommGroup F\ninst✝⁷ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁶ : AddCommGroup F'\ninst✝⁵ : Module 𝕜 F'\ninst✝⁴ : TopologicalSpace F'\ninst✝³ : TopologicalAddGroup F'\ninst✝² : ContinuousSMul 𝕜 F'\ninst✝¹ : CompleteSpace 𝕜\nι : Type u_1\ninst✝ : Finite ι\nf : ι → E\nval✝ : Fintype ι\nhf : LinearMap.ker (↑(LinearMap.lsum 𝕜 (fun x => 𝕜) ℕ) fun i => LinearMap.smulRight LinearMap.id (f i)) = ⊥\nK : ℝ≥0\nK0 : K > 0\nhK : AntilipschitzWith K ↑(↑(LinearMap.lsum 𝕜 (fun x => 𝕜) ℕ) fun i => LinearMap.smulRight LinearMap.id (f i))\nthis : Tendsto (fun g => ∑ i : ι, ‖g i - f i‖) (𝓝 f) (𝓝 0)\ng : ι → E\nhg : ∑ i : ι, ‖g i - f i‖₊ < K⁻¹\nv u : ι → 𝕜\n⊢ ‖∑ x : ι, (v x - u x) • (g x - f x)‖ ≤ ∑ x : ι, ‖g x - f x‖ * ‖v - u‖\n[PROOFSTEP]\nrefine' norm_sum_le_of_le _ fun i _ => _\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u\ninst✝¹¹ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁸ : NormedAddCommGroup F\ninst✝⁷ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁶ : AddCommGroup F'\ninst✝⁵ : Module 𝕜 F'\ninst✝⁴ : TopologicalSpace F'\ninst✝³ : TopologicalAddGroup F'\ninst✝² : ContinuousSMul 𝕜 F'\ninst✝¹ : CompleteSpace 𝕜\nι : Type u_1\ninst✝ : Finite ι\nf : ι → E\nval✝ : Fintype ι\nhf : LinearMap.ker (↑(LinearMap.lsum 𝕜 (fun x => 𝕜) ℕ) fun i => LinearMap.smulRight LinearMap.id (f i)) = ⊥\nK : ℝ≥0\nK0 : K > 0\nhK : AntilipschitzWith K ↑(↑(LinearMap.lsum 𝕜 (fun x => 𝕜) ℕ) fun i => LinearMap.smulRight LinearMap.id (f i))\nthis : Tendsto (fun g => ∑ i : ι, ‖g i - f i‖) (𝓝 f) (𝓝 0)\ng : ι → E\nhg : ∑ i : ι, ‖g i - f i‖₊ < K⁻¹\nv u : ι → 𝕜\ni : ι\nx✝ : i ∈ Finset.univ\n⊢ ‖(v i - u i) • (g i - f i)‖ ≤ ‖g i - f i‖ * ‖v - u‖\n[PROOFSTEP]\nrw [norm_smul, mul_comm]\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u\ninst✝¹¹ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁸ : NormedAddCommGroup F\ninst✝⁷ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁶ : AddCommGroup F'\ninst✝⁵ : Module 𝕜 F'\ninst✝⁴ : TopologicalSpace F'\ninst✝³ : TopologicalAddGroup F'\ninst✝² : ContinuousSMul 𝕜 F'\ninst✝¹ : CompleteSpace 𝕜\nι : Type u_1\ninst✝ : Finite ι\nf : ι → E\nval✝ : Fintype ι\nhf : LinearMap.ker (↑(LinearMap.lsum 𝕜 (fun x => 𝕜) ℕ) fun i => LinearMap.smulRight LinearMap.id (f i)) = ⊥\nK : ℝ≥0\nK0 : K > 0\nhK : AntilipschitzWith K ↑(↑(LinearMap.lsum 𝕜 (fun x => 𝕜) ℕ) fun i => LinearMap.smulRight LinearMap.id (f i))\nthis : Tendsto (fun g => ∑ i : ι, ‖g i - f i‖) (𝓝 f) (𝓝 0)\ng : ι → E\nhg : ∑ i : ι, ‖g i - f i‖₊ < K⁻¹\nv u : ι → 𝕜\ni : ι\nx✝ : i ∈ Finset.univ\n⊢ ‖g i - f i‖ * ‖v i - u i‖ ≤ ‖g i - f i‖ * ‖v - u‖\n[PROOFSTEP]\ngcongr\n[GOAL]\ncase intro.intro.intro.h\n𝕜 : Type u\ninst✝¹¹ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁸ : NormedAddCommGroup F\ninst✝⁷ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁶ : AddCommGroup F'\ninst✝⁵ : Module 𝕜 F'\ninst✝⁴ : TopologicalSpace F'\ninst✝³ : TopologicalAddGroup F'\ninst✝² : ContinuousSMul 𝕜 F'\ninst✝¹ : CompleteSpace 𝕜\nι : Type u_1\ninst✝ : Finite ι\nf : ι → E\nval✝ : Fintype ι\nhf : LinearMap.ker (↑(LinearMap.lsum 𝕜 (fun x => 𝕜) ℕ) fun i => LinearMap.smulRight LinearMap.id (f i)) = ⊥\nK : ℝ≥0\nK0 : K > 0\nhK : AntilipschitzWith K ↑(↑(LinearMap.lsum 𝕜 (fun x => 𝕜) ℕ) fun i => LinearMap.smulRight LinearMap.id (f i))\nthis : Tendsto (fun g => ∑ i : ι, ‖g i - f i‖) (𝓝 f) (𝓝 0)\ng : ι → E\nhg : ∑ i : ι, ‖g i - f i‖₊ < K⁻¹\nv u : ι → 𝕜\ni : ι\nx✝ : i ∈ Finset.univ\n⊢ ‖v i - u i‖ ≤ ‖v - u‖\n[PROOFSTEP]\nexact norm_le_pi_norm (v - u) i\n[GOAL]\n𝕜 : Type u\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁵ : AddCommGroup F'\ninst✝⁴ : Module 𝕜 F'\ninst✝³ : TopologicalSpace F'\ninst✝² : TopologicalAddGroup F'\ninst✝¹ : ContinuousSMul 𝕜 F'\ninst✝ : CompleteSpace 𝕜\nn : ℕ\n⊢ IsOpen {f | ↑n ≤ LinearMap.rank ↑f}\n[PROOFSTEP]\nsimp only [LinearMap.le_rank_iff_exists_linearIndependent_finset, setOf_exists, ← exists_prop]\n[GOAL]\n𝕜 : Type u\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁵ : AddCommGroup F'\ninst✝⁴ : Module 𝕜 F'\ninst✝³ : TopologicalSpace F'\ninst✝² : TopologicalAddGroup F'\ninst✝¹ : ContinuousSMul 𝕜 F'\ninst✝ : CompleteSpace 𝕜\nn : ℕ\n⊢ IsOpen (⋃ (i : Finset E) (_ : Finset.card i = n), {x | LinearIndependent 𝕜 fun x_1 => ↑↑x ↑x_1})\n[PROOFSTEP]\nrefine' isOpen_biUnion fun t _ => _\n[GOAL]\n𝕜 : Type u\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁵ : AddCommGroup F'\ninst✝⁴ : Module 𝕜 F'\ninst✝³ : TopologicalSpace F'\ninst✝² : TopologicalAddGroup F'\ninst✝¹ : ContinuousSMul 𝕜 F'\ninst✝ : CompleteSpace 𝕜\nn : ℕ\nt : Finset E\nx✝ : t ∈ fun i => Finset.card i = n\n⊢ IsOpen {x | LinearIndependent 𝕜 fun x_1 => ↑↑x ↑x_1}\n[PROOFSTEP]\nhave : Continuous fun f : E →L[𝕜] F => fun x : (t : Set E) => f x :=\n  continuous_pi fun x => (ContinuousLinearMap.apply 𝕜 F (x : E)).continuous\n[GOAL]\n𝕜 : Type u\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁵ : AddCommGroup F'\ninst✝⁴ : Module 𝕜 F'\ninst✝³ : TopologicalSpace F'\ninst✝² : TopologicalAddGroup F'\ninst✝¹ : ContinuousSMul 𝕜 F'\ninst✝ : CompleteSpace 𝕜\nn : ℕ\nt : Finset E\nx✝ : t ∈ fun i => Finset.card i = n\nthis : Continuous fun f x => ↑f ↑x\n⊢ IsOpen {x | LinearIndependent 𝕜 fun x_1 => ↑↑x ↑x_1}\n[PROOFSTEP]\nexact isOpen_setOf_linearIndependent.preimage this\n[GOAL]\n𝕜 : Type u\ninst✝¹¹ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁸ : NormedAddCommGroup F\ninst✝⁷ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁶ : AddCommGroup F'\ninst✝⁵ : Module 𝕜 F'\ninst✝⁴ : TopologicalSpace F'\ninst✝³ : TopologicalAddGroup F'\ninst✝² : ContinuousSMul 𝕜 F'\ninst✝¹ : CompleteSpace 𝕜\nι : Type u_1\ninst✝ : Fintype ι\nv : Basis ι 𝕜 E\nu : E →L[𝕜] F\nM : ℝ≥0\nhu : ∀ (i : ι), ‖↑u (↑v i)‖₊ ≤ M\ne : E\n⊢ ‖↑u e‖₊ ≤ Fintype.card ι • ‖↑(equivFunL v)‖₊ * M * ‖e‖₊\n[PROOFSTEP]\nset φ := v.equivFunL.toContinuousLinearMap\n[GOAL]\n𝕜 : Type u\ninst✝¹¹ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁸ : NormedAddCommGroup F\ninst✝⁷ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁶ : AddCommGroup F'\ninst✝⁵ : Module 𝕜 F'\ninst✝⁴ : TopologicalSpace F'\ninst✝³ : TopologicalAddGroup F'\ninst✝² : ContinuousSMul 𝕜 F'\ninst✝¹ : CompleteSpace 𝕜\nι : Type u_1\ninst✝ : Fintype ι\nv : Basis ι 𝕜 E\nu : E →L[𝕜] F\nM : ℝ≥0\nhu : ∀ (i : ι), ‖↑u (↑v i)‖₊ ≤ M\ne : E\nφ : E →L[𝕜] ι → 𝕜 := ↑(equivFunL v)\n⊢ ‖↑u e‖₊ ≤ Fintype.card ι • ‖φ‖₊ * M * ‖e‖₊\n[PROOFSTEP]\ncalc\n  ‖u e‖₊ = ‖u (∑ i, v.equivFun e i • v i)‖₊ := by rw [v.sum_equivFun]\n  _ = ‖∑ i, v.equivFun e i • (u <| v i)‖₊ := by simp [u.map_sum, LinearMap.map_smul]\n  _ ≤ ∑ i, ‖v.equivFun e i • (u <| v i)‖₊ := (nnnorm_sum_le _ _)\n  _ = ∑ i, ‖v.equivFun e i‖₊ * ‖u (v i)‖₊ := by simp only [nnnorm_smul]\n  _ ≤ ∑ i, ‖v.equivFun e i‖₊ * M := by gcongr; apply hu\n  _ = (∑ i, ‖v.equivFun e i‖₊) * M := Finset.sum_mul.symm\n  _ ≤ Fintype.card ι • (‖φ‖₊ * ‖e‖₊) * M := by\n    gcongr\n    calc\n      ∑ i, ‖v.equivFun e i‖₊ ≤ Fintype.card ι • ‖φ e‖₊ := Pi.sum_nnnorm_apply_le_nnnorm _\n      _ ≤ Fintype.card ι • (‖φ‖₊ * ‖e‖₊) := nsmul_le_nsmul_of_le_right (φ.le_op_nnnorm e) _\n  _ = Fintype.card ι • ‖φ‖₊ * M * ‖e‖₊ := by simp only [smul_mul_assoc, mul_right_comm]\n[GOAL]\n𝕜 : Type u\ninst✝¹¹ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁸ : NormedAddCommGroup F\ninst✝⁷ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁶ : AddCommGroup F'\ninst✝⁵ : Module 𝕜 F'\ninst✝⁴ : TopologicalSpace F'\ninst✝³ : TopologicalAddGroup F'\ninst✝² : ContinuousSMul 𝕜 F'\ninst✝¹ : CompleteSpace 𝕜\nι : Type u_1\ninst✝ : Fintype ι\nv : Basis ι 𝕜 E\nu : E →L[𝕜] F\nM : ℝ≥0\nhu : ∀ (i : ι), ‖↑u (↑v i)‖₊ ≤ M\ne : E\nφ : E →L[𝕜] ι → 𝕜 := ↑(equivFunL v)\n⊢ ‖↑u e‖₊ = ‖↑u (∑ i : ι, ↑(equivFun v) e i • ↑v i)‖₊\n[PROOFSTEP]\nrw [v.sum_equivFun]\n[GOAL]\n𝕜 : Type u\ninst✝¹¹ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁸ : NormedAddCommGroup F\ninst✝⁷ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁶ : AddCommGroup F'\ninst✝⁵ : Module 𝕜 F'\ninst✝⁴ : TopologicalSpace F'\ninst✝³ : TopologicalAddGroup F'\ninst✝² : ContinuousSMul 𝕜 F'\ninst✝¹ : CompleteSpace 𝕜\nι : Type u_1\ninst✝ : Fintype ι\nv : Basis ι 𝕜 E\nu : E →L[𝕜] F\nM : ℝ≥0\nhu : ∀ (i : ι), ‖↑u (↑v i)‖₊ ≤ M\ne : E\nφ : E →L[𝕜] ι → 𝕜 := ↑(equivFunL v)\n⊢ ‖↑u (∑ i : ι, ↑(equivFun v) e i • ↑v i)‖₊ = ‖∑ i : ι, ↑(equivFun v) e i • ↑u (↑v i)‖₊\n[PROOFSTEP]\nsimp [u.map_sum, LinearMap.map_smul]\n[GOAL]\n𝕜 : Type u\ninst✝¹¹ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁸ : NormedAddCommGroup F\ninst✝⁷ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁶ : AddCommGroup F'\ninst✝⁵ : Module 𝕜 F'\ninst✝⁴ : TopologicalSpace F'\ninst✝³ : TopologicalAddGroup F'\ninst✝² : ContinuousSMul 𝕜 F'\ninst✝¹ : CompleteSpace 𝕜\nι : Type u_1\ninst✝ : Fintype ι\nv : Basis ι 𝕜 E\nu : E →L[𝕜] F\nM : ℝ≥0\nhu : ∀ (i : ι), ‖↑u (↑v i)‖₊ ≤ M\ne : E\nφ : E →L[𝕜] ι → 𝕜 := ↑(equivFunL v)\n⊢ ∑ i : ι, ‖↑(equivFun v) e i • ↑u (↑v i)‖₊ = ∑ i : ι, ‖↑(equivFun v) e i‖₊ * ‖↑u (↑v i)‖₊\n[PROOFSTEP]\nsimp only [nnnorm_smul]\n[GOAL]\n𝕜 : Type u\ninst✝¹¹ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁸ : NormedAddCommGroup F\ninst✝⁷ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁶ : AddCommGroup F'\ninst✝⁵ : Module 𝕜 F'\ninst✝⁴ : TopologicalSpace F'\ninst✝³ : TopologicalAddGroup F'\ninst✝² : ContinuousSMul 𝕜 F'\ninst✝¹ : CompleteSpace 𝕜\nι : Type u_1\ninst✝ : Fintype ι\nv : Basis ι 𝕜 E\nu : E →L[𝕜] F\nM : ℝ≥0\nhu : ∀ (i : ι), ‖↑u (↑v i)‖₊ ≤ M\ne : E\nφ : E →L[𝕜] ι → 𝕜 := ↑(equivFunL v)\n⊢ ∑ i : ι, ‖↑(equivFun v) e i‖₊ * ‖↑u (↑v i)‖₊ ≤ ∑ i : ι, ‖↑(equivFun v) e i‖₊ * M\n[PROOFSTEP]\ngcongr\n[GOAL]\ncase h.bc\n𝕜 : Type u\ninst✝¹¹ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁸ : NormedAddCommGroup F\ninst✝⁷ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁶ : AddCommGroup F'\ninst✝⁵ : Module 𝕜 F'\ninst✝⁴ : TopologicalSpace F'\ninst✝³ : TopologicalAddGroup F'\ninst✝² : ContinuousSMul 𝕜 F'\ninst✝¹ : CompleteSpace 𝕜\nι : Type u_1\ninst✝ : Fintype ι\nv : Basis ι 𝕜 E\nu : E →L[𝕜] F\nM : ℝ≥0\nhu : ∀ (i : ι), ‖↑u (↑v i)‖₊ ≤ M\ne : E\nφ : E →L[𝕜] ι → 𝕜 := ↑(equivFunL v)\ni✝ : ι\na✝ : i✝ ∈ Finset.univ\n⊢ ‖↑u (↑v i✝)‖₊ ≤ M\n[PROOFSTEP]\napply hu\n[GOAL]\n𝕜 : Type u\ninst✝¹¹ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁸ : NormedAddCommGroup F\ninst✝⁷ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁶ : AddCommGroup F'\ninst✝⁵ : Module 𝕜 F'\ninst✝⁴ : TopologicalSpace F'\ninst✝³ : TopologicalAddGroup F'\ninst✝² : ContinuousSMul 𝕜 F'\ninst✝¹ : CompleteSpace 𝕜\nι : Type u_1\ninst✝ : Fintype ι\nv : Basis ι 𝕜 E\nu : E →L[𝕜] F\nM : ℝ≥0\nhu : ∀ (i : ι), ‖↑u (↑v i)‖₊ ≤ M\ne : E\nφ : E →L[𝕜] ι → 𝕜 := ↑(equivFunL v)\n⊢ (∑ i : ι, ‖↑(equivFun v) e i‖₊) * M ≤ Fintype.card ι • (‖φ‖₊ * ‖e‖₊) * M\n[PROOFSTEP]\ngcongr\n[GOAL]\ncase bc\n𝕜 : Type u\ninst✝¹¹ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁸ : NormedAddCommGroup F\ninst✝⁷ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁶ : AddCommGroup F'\ninst✝⁵ : Module 𝕜 F'\ninst✝⁴ : TopologicalSpace F'\ninst✝³ : TopologicalAddGroup F'\ninst✝² : ContinuousSMul 𝕜 F'\ninst✝¹ : CompleteSpace 𝕜\nι : Type u_1\ninst✝ : Fintype ι\nv : Basis ι 𝕜 E\nu : E →L[𝕜] F\nM : ℝ≥0\nhu : ∀ (i : ι), ‖↑u (↑v i)‖₊ ≤ M\ne : E\nφ : E →L[𝕜] ι → 𝕜 := ↑(equivFunL v)\n⊢ ∑ i : ι, ‖↑(equivFun v) e i‖₊ ≤ Fintype.card ι • (‖φ‖₊ * ‖e‖₊)\n[PROOFSTEP]\ncalc\n  ∑ i, ‖v.equivFun e i‖₊ ≤ Fintype.card ι • ‖φ e‖₊ := Pi.sum_nnnorm_apply_le_nnnorm _\n  _ ≤ Fintype.card ι • (‖φ‖₊ * ‖e‖₊) := nsmul_le_nsmul_of_le_right (φ.le_op_nnnorm e) _\n[GOAL]\n𝕜 : Type u\ninst✝¹¹ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁸ : NormedAddCommGroup F\ninst✝⁷ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁶ : AddCommGroup F'\ninst✝⁵ : Module 𝕜 F'\ninst✝⁴ : TopologicalSpace F'\ninst✝³ : TopologicalAddGroup F'\ninst✝² : ContinuousSMul 𝕜 F'\ninst✝¹ : CompleteSpace 𝕜\nι : Type u_1\ninst✝ : Fintype ι\nv : Basis ι 𝕜 E\nu : E →L[𝕜] F\nM : ℝ≥0\nhu : ∀ (i : ι), ‖↑u (↑v i)‖₊ ≤ M\ne : E\nφ : E →L[𝕜] ι → 𝕜 := ↑(equivFunL v)\n⊢ Fintype.card ι • (‖φ‖₊ * ‖e‖₊) * M = Fintype.card ι • ‖φ‖₊ * M * ‖e‖₊\n[PROOFSTEP]\nsimp only [smul_mul_assoc, mul_right_comm]\n[GOAL]\n𝕜 : Type u\ninst✝¹¹ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁸ : NormedAddCommGroup F\ninst✝⁷ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁶ : AddCommGroup F'\ninst✝⁵ : Module 𝕜 F'\ninst✝⁴ : TopologicalSpace F'\ninst✝³ : TopologicalAddGroup F'\ninst✝² : ContinuousSMul 𝕜 F'\ninst✝¹ : CompleteSpace 𝕜\nι : Type u_1\ninst✝ : Fintype ι\nv : Basis ι 𝕜 E\nu : E →L[𝕜] F\nM : ℝ\nhM : 0 ≤ M\nhu : ∀ (i : ι), ‖↑u (↑v i)‖ ≤ M\n⊢ ‖u‖ ≤ Fintype.card ι • ‖↑(equivFunL v)‖ * M\n[PROOFSTEP]\nsimpa using NNReal.coe_le_coe.mpr (v.op_nnnorm_le ⟨M, hM⟩ hu)\n[GOAL]\n𝕜 : Type u\ninst✝¹¹ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁸ : NormedAddCommGroup F\ninst✝⁷ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁶ : AddCommGroup F'\ninst✝⁵ : Module 𝕜 F'\ninst✝⁴ : TopologicalSpace F'\ninst✝³ : TopologicalAddGroup F'\ninst✝² : ContinuousSMul 𝕜 F'\ninst✝¹ : CompleteSpace 𝕜\nι : Type u_1\ninst✝ : Finite ι\nv : Basis ι 𝕜 E\n⊢ ∃ C, C > 0 ∧ ∀ {u : E →L[𝕜] F} (M : ℝ≥0), (∀ (i : ι), ‖↑u (↑v i)‖₊ ≤ M) → ‖u‖₊ ≤ C * M\n[PROOFSTEP]\ncases nonempty_fintype ι\n[GOAL]\ncase intro\n𝕜 : Type u\ninst✝¹¹ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁸ : NormedAddCommGroup F\ninst✝⁷ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁶ : AddCommGroup F'\ninst✝⁵ : Module 𝕜 F'\ninst✝⁴ : TopologicalSpace F'\ninst✝³ : TopologicalAddGroup F'\ninst✝² : ContinuousSMul 𝕜 F'\ninst✝¹ : CompleteSpace 𝕜\nι : Type u_1\ninst✝ : Finite ι\nv : Basis ι 𝕜 E\nval✝ : Fintype ι\n⊢ ∃ C, C > 0 ∧ ∀ {u : E →L[𝕜] F} (M : ℝ≥0), (∀ (i : ι), ‖↑u (↑v i)‖₊ ≤ M) → ‖u‖₊ ≤ C * M\n[PROOFSTEP]\nexact\n  ⟨max (Fintype.card ι • ‖v.equivFunL.toContinuousLinearMap‖₊) 1, zero_lt_one.trans_le (le_max_right _ _),\n    fun {u} M hu => (v.op_nnnorm_le M hu).trans <| mul_le_mul_of_nonneg_right (le_max_left _ _) (zero_le M)⟩\n[GOAL]\n𝕜 : Type u\ninst✝¹¹ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁸ : NormedAddCommGroup F\ninst✝⁷ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁶ : AddCommGroup F'\ninst✝⁵ : Module 𝕜 F'\ninst✝⁴ : TopologicalSpace F'\ninst✝³ : TopologicalAddGroup F'\ninst✝² : ContinuousSMul 𝕜 F'\ninst✝¹ : CompleteSpace 𝕜\nι : Type u_1\ninst✝ : Finite ι\nv : Basis ι 𝕜 E\n⊢ ∃ C, C > 0 ∧ ∀ {u : E →L[𝕜] F} {M : ℝ}, 0 ≤ M → (∀ (i : ι), ‖↑u (↑v i)‖ ≤ M) → ‖u‖ ≤ C * M\n[PROOFSTEP]\nobtain ⟨C, hC, h⟩ :=\n  v.exists_op_nnnorm_le (F := F)\n    -- Porting note: used `Subtype.forall'` below\n[GOAL]\ncase intro.intro\n𝕜 : Type u\ninst✝¹¹ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁸ : NormedAddCommGroup F\ninst✝⁷ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁶ : AddCommGroup F'\ninst✝⁵ : Module 𝕜 F'\ninst✝⁴ : TopologicalSpace F'\ninst✝³ : TopologicalAddGroup F'\ninst✝² : ContinuousSMul 𝕜 F'\ninst✝¹ : CompleteSpace 𝕜\nι : Type u_1\ninst✝ : Finite ι\nv : Basis ι 𝕜 E\nC : ℝ≥0\nhC : C > 0\nh : ∀ {u : E →L[𝕜] F} (M : ℝ≥0), (∀ (i : ι), ‖↑u (↑v i)‖₊ ≤ M) → ‖u‖₊ ≤ C * M\n⊢ ∃ C, C > 0 ∧ ∀ {u : E →L[𝕜] F} {M : ℝ}, 0 ≤ M → (∀ (i : ι), ‖↑u (↑v i)‖ ≤ M) → ‖u‖ ≤ C * M\n[PROOFSTEP]\nrefine ⟨C, hC, ?_⟩\n[GOAL]\ncase intro.intro\n𝕜 : Type u\ninst✝¹¹ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁸ : NormedAddCommGroup F\ninst✝⁷ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁶ : AddCommGroup F'\ninst✝⁵ : Module 𝕜 F'\ninst✝⁴ : TopologicalSpace F'\ninst✝³ : TopologicalAddGroup F'\ninst✝² : ContinuousSMul 𝕜 F'\ninst✝¹ : CompleteSpace 𝕜\nι : Type u_1\ninst✝ : Finite ι\nv : Basis ι 𝕜 E\nC : ℝ≥0\nhC : C > 0\nh : ∀ {u : E →L[𝕜] F} (M : ℝ≥0), (∀ (i : ι), ‖↑u (↑v i)‖₊ ≤ M) → ‖u‖₊ ≤ C * M\n⊢ ∀ {u : E →L[𝕜] F} {M : ℝ}, 0 ≤ M → (∀ (i : ι), ‖↑u (↑v i)‖ ≤ M) → ‖u‖ ≤ ↑C * M\n[PROOFSTEP]\nintro u M hM H\n[GOAL]\ncase intro.intro\n𝕜 : Type u\ninst✝¹¹ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁸ : NormedAddCommGroup F\ninst✝⁷ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁶ : AddCommGroup F'\ninst✝⁵ : Module 𝕜 F'\ninst✝⁴ : TopologicalSpace F'\ninst✝³ : TopologicalAddGroup F'\ninst✝² : ContinuousSMul 𝕜 F'\ninst✝¹ : CompleteSpace 𝕜\nι : Type u_1\ninst✝ : Finite ι\nv : Basis ι 𝕜 E\nC : ℝ≥0\nhC : C > 0\nh : ∀ {u : E →L[𝕜] F} (M : ℝ≥0), (∀ (i : ι), ‖↑u (↑v i)‖₊ ≤ M) → ‖u‖₊ ≤ C * M\nu : E →L[𝕜] F\nM : ℝ\nhM : 0 ≤ M\nH : ∀ (i : ι), ‖↑u (↑v i)‖ ≤ M\n⊢ ‖u‖ ≤ ↑C * M\n[PROOFSTEP]\nsimpa using h ⟨M, hM⟩ H\n[GOAL]\n𝕜 : Type u\ninst✝¹² : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁷ : AddCommGroup F'\ninst✝⁶ : Module 𝕜 F'\ninst✝⁵ : TopologicalSpace F'\ninst✝⁴ : TopologicalAddGroup F'\ninst✝³ : ContinuousSMul 𝕜 F'\ninst✝² : CompleteSpace 𝕜\ninst✝¹ : FiniteDimensional 𝕜 E\ninst✝ : SecondCountableTopology F\n⊢ SecondCountableTopology (E →L[𝕜] F)\n[PROOFSTEP]\nset d := FiniteDimensional.finrank 𝕜 E\n[GOAL]\n𝕜 : Type u\ninst✝¹² : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁷ : AddCommGroup F'\ninst✝⁶ : Module 𝕜 F'\ninst✝⁵ : TopologicalSpace F'\ninst✝⁴ : TopologicalAddGroup F'\ninst✝³ : ContinuousSMul 𝕜 F'\ninst✝² : CompleteSpace 𝕜\ninst✝¹ : FiniteDimensional 𝕜 E\ninst✝ : SecondCountableTopology F\nd : ℕ := finrank 𝕜 E\n⊢ SecondCountableTopology (E →L[𝕜] F)\n[PROOFSTEP]\nsuffices ∀ ε > (0 : ℝ), ∃ n : (E →L[𝕜] F) → Fin d → ℕ, ∀ f g : E →L[𝕜] F, n f = n g → dist f g ≤ ε from\n  Metric.secondCountable_of_countable_discretization fun ε ε_pos => ⟨Fin d → ℕ, by infer_instance, this ε ε_pos⟩\n[GOAL]\n𝕜 : Type u\ninst✝¹² : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁷ : AddCommGroup F'\ninst✝⁶ : Module 𝕜 F'\ninst✝⁵ : TopologicalSpace F'\ninst✝⁴ : TopologicalAddGroup F'\ninst✝³ : ContinuousSMul 𝕜 F'\ninst✝² : CompleteSpace 𝕜\ninst✝¹ : FiniteDimensional 𝕜 E\ninst✝ : SecondCountableTopology F\nd : ℕ := finrank 𝕜 E\nthis : ∀ (ε : ℝ), ε > 0 → ∃ n, ∀ (f g : E →L[𝕜] F), n f = n g → dist f g ≤ ε\nε : ℝ\nε_pos : ε > 0\n⊢ Encodable (Fin d → ℕ)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\n𝕜 : Type u\ninst✝¹² : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁷ : AddCommGroup F'\ninst✝⁶ : Module 𝕜 F'\ninst✝⁵ : TopologicalSpace F'\ninst✝⁴ : TopologicalAddGroup F'\ninst✝³ : ContinuousSMul 𝕜 F'\ninst✝² : CompleteSpace 𝕜\ninst✝¹ : FiniteDimensional 𝕜 E\ninst✝ : SecondCountableTopology F\nd : ℕ := finrank 𝕜 E\n⊢ ∀ (ε : ℝ), ε > 0 → ∃ n, ∀ (f g : E →L[𝕜] F), n f = n g → dist f g ≤ ε\n[PROOFSTEP]\nintro ε ε_pos\n[GOAL]\n𝕜 : Type u\ninst✝¹² : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁷ : AddCommGroup F'\ninst✝⁶ : Module 𝕜 F'\ninst✝⁵ : TopologicalSpace F'\ninst✝⁴ : TopologicalAddGroup F'\ninst✝³ : ContinuousSMul 𝕜 F'\ninst✝² : CompleteSpace 𝕜\ninst✝¹ : FiniteDimensional 𝕜 E\ninst✝ : SecondCountableTopology F\nd : ℕ := finrank 𝕜 E\nε : ℝ\nε_pos : ε > 0\n⊢ ∃ n, ∀ (f g : E →L[𝕜] F), n f = n g → dist f g ≤ ε\n[PROOFSTEP]\nobtain ⟨u : ℕ → F, hu : DenseRange u⟩ := exists_dense_seq F\n[GOAL]\ncase intro\n𝕜 : Type u\ninst✝¹² : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁷ : AddCommGroup F'\ninst✝⁶ : Module 𝕜 F'\ninst✝⁵ : TopologicalSpace F'\ninst✝⁴ : TopologicalAddGroup F'\ninst✝³ : ContinuousSMul 𝕜 F'\ninst✝² : CompleteSpace 𝕜\ninst✝¹ : FiniteDimensional 𝕜 E\ninst✝ : SecondCountableTopology F\nd : ℕ := finrank 𝕜 E\nε : ℝ\nε_pos : ε > 0\nu : ℕ → F\nhu : DenseRange u\n⊢ ∃ n, ∀ (f g : E →L[𝕜] F), n f = n g → dist f g ≤ ε\n[PROOFSTEP]\nlet v := FiniteDimensional.finBasis 𝕜 E\n[GOAL]\ncase intro\n𝕜 : Type u\ninst✝¹² : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁷ : AddCommGroup F'\ninst✝⁶ : Module 𝕜 F'\ninst✝⁵ : TopologicalSpace F'\ninst✝⁴ : TopologicalAddGroup F'\ninst✝³ : ContinuousSMul 𝕜 F'\ninst✝² : CompleteSpace 𝕜\ninst✝¹ : FiniteDimensional 𝕜 E\ninst✝ : SecondCountableTopology F\nd : ℕ := finrank 𝕜 E\nε : ℝ\nε_pos : ε > 0\nu : ℕ → F\nhu : DenseRange u\nv : Basis (Fin (finrank 𝕜 E)) 𝕜 E := finBasis 𝕜 E\n⊢ ∃ n, ∀ (f g : E →L[𝕜] F), n f = n g → dist f g ≤ ε\n[PROOFSTEP]\nobtain ⟨C : ℝ, C_pos : 0 < C, hC : ∀ {φ : E →L[𝕜] F} {M : ℝ}, 0 ≤ M → (∀ i, ‖φ (v i)‖ ≤ M) → ‖φ‖ ≤ C * M⟩ :=\n  v.exists_op_norm_le (E := E) (F := F)\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u\ninst✝¹² : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁷ : AddCommGroup F'\ninst✝⁶ : Module 𝕜 F'\ninst✝⁵ : TopologicalSpace F'\ninst✝⁴ : TopologicalAddGroup F'\ninst✝³ : ContinuousSMul 𝕜 F'\ninst✝² : CompleteSpace 𝕜\ninst✝¹ : FiniteDimensional 𝕜 E\ninst✝ : SecondCountableTopology F\nd : ℕ := finrank 𝕜 E\nε : ℝ\nε_pos : ε > 0\nu : ℕ → F\nhu : DenseRange u\nv : Basis (Fin (finrank 𝕜 E)) 𝕜 E := finBasis 𝕜 E\nC : ℝ\nC_pos : 0 < C\nhC : ∀ {φ : E →L[𝕜] F} {M : ℝ}, 0 ≤ M → (∀ (i : Fin (finrank 𝕜 E)), ‖↑φ (↑v i)‖ ≤ M) → ‖φ‖ ≤ C * M\n⊢ ∃ n, ∀ (f g : E →L[𝕜] F), n f = n g → dist f g ≤ ε\n[PROOFSTEP]\nhave h_2C : 0 < 2 * C := mul_pos zero_lt_two C_pos\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u\ninst✝¹² : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁷ : AddCommGroup F'\ninst✝⁶ : Module 𝕜 F'\ninst✝⁵ : TopologicalSpace F'\ninst✝⁴ : TopologicalAddGroup F'\ninst✝³ : ContinuousSMul 𝕜 F'\ninst✝² : CompleteSpace 𝕜\ninst✝¹ : FiniteDimensional 𝕜 E\ninst✝ : SecondCountableTopology F\nd : ℕ := finrank 𝕜 E\nε : ℝ\nε_pos : ε > 0\nu : ℕ → F\nhu : DenseRange u\nv : Basis (Fin (finrank 𝕜 E)) 𝕜 E := finBasis 𝕜 E\nC : ℝ\nC_pos : 0 < C\nhC : ∀ {φ : E →L[𝕜] F} {M : ℝ}, 0 ≤ M → (∀ (i : Fin (finrank 𝕜 E)), ‖↑φ (↑v i)‖ ≤ M) → ‖φ‖ ≤ C * M\nh_2C : 0 < 2 * C\n⊢ ∃ n, ∀ (f g : E →L[𝕜] F), n f = n g → dist f g ≤ ε\n[PROOFSTEP]\nhave hε2C : 0 < ε / (2 * C) := div_pos ε_pos h_2C\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u\ninst✝¹² : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁷ : AddCommGroup F'\ninst✝⁶ : Module 𝕜 F'\ninst✝⁵ : TopologicalSpace F'\ninst✝⁴ : TopologicalAddGroup F'\ninst✝³ : ContinuousSMul 𝕜 F'\ninst✝² : CompleteSpace 𝕜\ninst✝¹ : FiniteDimensional 𝕜 E\ninst✝ : SecondCountableTopology F\nd : ℕ := finrank 𝕜 E\nε : ℝ\nε_pos : ε > 0\nu : ℕ → F\nhu : DenseRange u\nv : Basis (Fin (finrank 𝕜 E)) 𝕜 E := finBasis 𝕜 E\nC : ℝ\nC_pos : 0 < C\nhC : ∀ {φ : E →L[𝕜] F} {M : ℝ}, 0 ≤ M → (∀ (i : Fin (finrank 𝕜 E)), ‖↑φ (↑v i)‖ ≤ M) → ‖φ‖ ≤ C * M\nh_2C : 0 < 2 * C\nhε2C : 0 < ε / (2 * C)\n⊢ ∃ n, ∀ (f g : E →L[𝕜] F), n f = n g → dist f g ≤ ε\n[PROOFSTEP]\nhave : ∀ φ : E →L[𝕜] F, ∃ n : Fin d → ℕ, ‖φ - (v.constrL <| u ∘ n)‖ ≤ ε / 2 :=\n  by\n  intro φ\n  have : ∀ i, ∃ n, ‖φ (v i) - u n‖ ≤ ε / (2 * C) :=\n    by\n    simp only [norm_sub_rev]\n    intro i\n    have : φ (v i) ∈ closure (range u) := hu _\n    obtain ⟨n, hn⟩ : ∃ n, ‖u n - φ (v i)‖ < ε / (2 * C) :=\n      by\n      rw [mem_closure_iff_nhds_basis Metric.nhds_basis_ball] at this \n      specialize this (ε / (2 * C)) hε2C\n      simpa [dist_eq_norm]\n    exact ⟨n, le_of_lt hn⟩\n  choose n hn using this\n  use n\n  replace hn : ∀ i : Fin d, ‖(φ - (v.constrL <| u ∘ n)) (v i)‖ ≤ ε / (2 * C)\n  · simp [hn]\n  have : C * (ε / (2 * C)) = ε / 2 := by\n    rw [eq_div_iff (two_ne_zero : (2 : ℝ) ≠ 0), mul_comm, ← mul_assoc, mul_div_cancel' _ (ne_of_gt h_2C)]\n  specialize hC (le_of_lt hε2C) hn\n  rwa [this] at hC \n[GOAL]\n𝕜 : Type u\ninst✝¹² : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁷ : AddCommGroup F'\ninst✝⁶ : Module 𝕜 F'\ninst✝⁵ : TopologicalSpace F'\ninst✝⁴ : TopologicalAddGroup F'\ninst✝³ : ContinuousSMul 𝕜 F'\ninst✝² : CompleteSpace 𝕜\ninst✝¹ : FiniteDimensional 𝕜 E\ninst✝ : SecondCountableTopology F\nd : ℕ := finrank 𝕜 E\nε : ℝ\nε_pos : ε > 0\nu : ℕ → F\nhu : DenseRange u\nv : Basis (Fin (finrank 𝕜 E)) 𝕜 E := finBasis 𝕜 E\nC : ℝ\nC_pos : 0 < C\nhC : ∀ {φ : E →L[𝕜] F} {M : ℝ}, 0 ≤ M → (∀ (i : Fin (finrank 𝕜 E)), ‖↑φ (↑v i)‖ ≤ M) → ‖φ‖ ≤ C * M\nh_2C : 0 < 2 * C\nhε2C : 0 < ε / (2 * C)\n⊢ ∀ (φ : E →L[𝕜] F), ∃ n, ‖φ - Basis.constrL v (u ∘ n)‖ ≤ ε / 2\n[PROOFSTEP]\nintro φ\n[GOAL]\n𝕜 : Type u\ninst✝¹² : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁷ : AddCommGroup F'\ninst✝⁶ : Module 𝕜 F'\ninst✝⁵ : TopologicalSpace F'\ninst✝⁴ : TopologicalAddGroup F'\ninst✝³ : ContinuousSMul 𝕜 F'\ninst✝² : CompleteSpace 𝕜\ninst✝¹ : FiniteDimensional 𝕜 E\ninst✝ : SecondCountableTopology F\nd : ℕ := finrank 𝕜 E\nε : ℝ\nε_pos : ε > 0\nu : ℕ → F\nhu : DenseRange u\nv : Basis (Fin (finrank 𝕜 E)) 𝕜 E := finBasis 𝕜 E\nC : ℝ\nC_pos : 0 < C\nhC : ∀ {φ : E →L[𝕜] F} {M : ℝ}, 0 ≤ M → (∀ (i : Fin (finrank 𝕜 E)), ‖↑φ (↑v i)‖ ≤ M) → ‖φ‖ ≤ C * M\nh_2C : 0 < 2 * C\nhε2C : 0 < ε / (2 * C)\nφ : E →L[𝕜] F\n⊢ ∃ n, ‖φ - Basis.constrL v (u ∘ n)‖ ≤ ε / 2\n[PROOFSTEP]\nhave : ∀ i, ∃ n, ‖φ (v i) - u n‖ ≤ ε / (2 * C) :=\n  by\n  simp only [norm_sub_rev]\n  intro i\n  have : φ (v i) ∈ closure (range u) := hu _\n  obtain ⟨n, hn⟩ : ∃ n, ‖u n - φ (v i)‖ < ε / (2 * C) :=\n    by\n    rw [mem_closure_iff_nhds_basis Metric.nhds_basis_ball] at this \n    specialize this (ε / (2 * C)) hε2C\n    simpa [dist_eq_norm]\n  exact ⟨n, le_of_lt hn⟩\n[GOAL]\n𝕜 : Type u\ninst✝¹² : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁷ : AddCommGroup F'\ninst✝⁶ : Module 𝕜 F'\ninst✝⁵ : TopologicalSpace F'\ninst✝⁴ : TopologicalAddGroup F'\ninst✝³ : ContinuousSMul 𝕜 F'\ninst✝² : CompleteSpace 𝕜\ninst✝¹ : FiniteDimensional 𝕜 E\ninst✝ : SecondCountableTopology F\nd : ℕ := finrank 𝕜 E\nε : ℝ\nε_pos : ε > 0\nu : ℕ → F\nhu : DenseRange u\nv : Basis (Fin (finrank 𝕜 E)) 𝕜 E := finBasis 𝕜 E\nC : ℝ\nC_pos : 0 < C\nhC : ∀ {φ : E →L[𝕜] F} {M : ℝ}, 0 ≤ M → (∀ (i : Fin (finrank 𝕜 E)), ‖↑φ (↑v i)‖ ≤ M) → ‖φ‖ ≤ C * M\nh_2C : 0 < 2 * C\nhε2C : 0 < ε / (2 * C)\nφ : E →L[𝕜] F\n⊢ ∀ (i : Fin (finrank 𝕜 E)), ∃ n, ‖↑φ (↑v i) - u n‖ ≤ ε / (2 * C)\n[PROOFSTEP]\nsimp only [norm_sub_rev]\n[GOAL]\n𝕜 : Type u\ninst✝¹² : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁷ : AddCommGroup F'\ninst✝⁶ : Module 𝕜 F'\ninst✝⁵ : TopologicalSpace F'\ninst✝⁴ : TopologicalAddGroup F'\ninst✝³ : ContinuousSMul 𝕜 F'\ninst✝² : CompleteSpace 𝕜\ninst✝¹ : FiniteDimensional 𝕜 E\ninst✝ : SecondCountableTopology F\nd : ℕ := finrank 𝕜 E\nε : ℝ\nε_pos : ε > 0\nu : ℕ → F\nhu : DenseRange u\nv : Basis (Fin (finrank 𝕜 E)) 𝕜 E := finBasis 𝕜 E\nC : ℝ\nC_pos : 0 < C\nhC : ∀ {φ : E →L[𝕜] F} {M : ℝ}, 0 ≤ M → (∀ (i : Fin (finrank 𝕜 E)), ‖↑φ (↑v i)‖ ≤ M) → ‖φ‖ ≤ C * M\nh_2C : 0 < 2 * C\nhε2C : 0 < ε / (2 * C)\nφ : E →L[𝕜] F\n⊢ ∀ (i : Fin (finrank 𝕜 E)), ∃ n, ‖u n - ↑φ (↑(finBasis 𝕜 E) i)‖ ≤ ε / (2 * C)\n[PROOFSTEP]\nintro i\n[GOAL]\n𝕜 : Type u\ninst✝¹² : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁷ : AddCommGroup F'\ninst✝⁶ : Module 𝕜 F'\ninst✝⁵ : TopologicalSpace F'\ninst✝⁴ : TopologicalAddGroup F'\ninst✝³ : ContinuousSMul 𝕜 F'\ninst✝² : CompleteSpace 𝕜\ninst✝¹ : FiniteDimensional 𝕜 E\ninst✝ : SecondCountableTopology F\nd : ℕ := finrank 𝕜 E\nε : ℝ\nε_pos : ε > 0\nu : ℕ → F\nhu : DenseRange u\nv : Basis (Fin (finrank 𝕜 E)) 𝕜 E := finBasis 𝕜 E\nC : ℝ\nC_pos : 0 < C\nhC : ∀ {φ : E →L[𝕜] F} {M : ℝ}, 0 ≤ M → (∀ (i : Fin (finrank 𝕜 E)), ‖↑φ (↑v i)‖ ≤ M) → ‖φ‖ ≤ C * M\nh_2C : 0 < 2 * C\nhε2C : 0 < ε / (2 * C)\nφ : E →L[𝕜] F\ni : Fin (finrank 𝕜 E)\n⊢ ∃ n, ‖u n - ↑φ (↑(finBasis 𝕜 E) i)‖ ≤ ε / (2 * C)\n[PROOFSTEP]\nhave : φ (v i) ∈ closure (range u) := hu _\n[GOAL]\n𝕜 : Type u\ninst✝¹² : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁷ : AddCommGroup F'\ninst✝⁶ : Module 𝕜 F'\ninst✝⁵ : TopologicalSpace F'\ninst✝⁴ : TopologicalAddGroup F'\ninst✝³ : ContinuousSMul 𝕜 F'\ninst✝² : CompleteSpace 𝕜\ninst✝¹ : FiniteDimensional 𝕜 E\ninst✝ : SecondCountableTopology F\nd : ℕ := finrank 𝕜 E\nε : ℝ\nε_pos : ε > 0\nu : ℕ → F\nhu : DenseRange u\nv : Basis (Fin (finrank 𝕜 E)) 𝕜 E := finBasis 𝕜 E\nC : ℝ\nC_pos : 0 < C\nhC : ∀ {φ : E →L[𝕜] F} {M : ℝ}, 0 ≤ M → (∀ (i : Fin (finrank 𝕜 E)), ‖↑φ (↑v i)‖ ≤ M) → ‖φ‖ ≤ C * M\nh_2C : 0 < 2 * C\nhε2C : 0 < ε / (2 * C)\nφ : E →L[𝕜] F\ni : Fin (finrank 𝕜 E)\nthis : ↑φ (↑v i) ∈ closure (range u)\n⊢ ∃ n, ‖u n - ↑φ (↑(finBasis 𝕜 E) i)‖ ≤ ε / (2 * C)\n[PROOFSTEP]\nobtain ⟨n, hn⟩ : ∃ n, ‖u n - φ (v i)‖ < ε / (2 * C) :=\n  by\n  rw [mem_closure_iff_nhds_basis Metric.nhds_basis_ball] at this \n  specialize this (ε / (2 * C)) hε2C\n  simpa [dist_eq_norm]\n[GOAL]\n𝕜 : Type u\ninst✝¹² : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁷ : AddCommGroup F'\ninst✝⁶ : Module 𝕜 F'\ninst✝⁵ : TopologicalSpace F'\ninst✝⁴ : TopologicalAddGroup F'\ninst✝³ : ContinuousSMul 𝕜 F'\ninst✝² : CompleteSpace 𝕜\ninst✝¹ : FiniteDimensional 𝕜 E\ninst✝ : SecondCountableTopology F\nd : ℕ := finrank 𝕜 E\nε : ℝ\nε_pos : ε > 0\nu : ℕ → F\nhu : DenseRange u\nv : Basis (Fin (finrank 𝕜 E)) 𝕜 E := finBasis 𝕜 E\nC : ℝ\nC_pos : 0 < C\nhC : ∀ {φ : E →L[𝕜] F} {M : ℝ}, 0 ≤ M → (∀ (i : Fin (finrank 𝕜 E)), ‖↑φ (↑v i)‖ ≤ M) → ‖φ‖ ≤ C * M\nh_2C : 0 < 2 * C\nhε2C : 0 < ε / (2 * C)\nφ : E →L[𝕜] F\ni : Fin (finrank 𝕜 E)\nthis : ↑φ (↑v i) ∈ closure (range u)\n⊢ ∃ n, ‖u n - ↑φ (↑v i)‖ < ε / (2 * C)\n[PROOFSTEP]\nrw [mem_closure_iff_nhds_basis Metric.nhds_basis_ball] at this \n[GOAL]\n𝕜 : Type u\ninst✝¹² : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁷ : AddCommGroup F'\ninst✝⁶ : Module 𝕜 F'\ninst✝⁵ : TopologicalSpace F'\ninst✝⁴ : TopologicalAddGroup F'\ninst✝³ : ContinuousSMul 𝕜 F'\ninst✝² : CompleteSpace 𝕜\ninst✝¹ : FiniteDimensional 𝕜 E\ninst✝ : SecondCountableTopology F\nd : ℕ := finrank 𝕜 E\nε : ℝ\nε_pos : ε > 0\nu : ℕ → F\nhu : DenseRange u\nv : Basis (Fin (finrank 𝕜 E)) 𝕜 E := finBasis 𝕜 E\nC : ℝ\nC_pos : 0 < C\nhC : ∀ {φ : E →L[𝕜] F} {M : ℝ}, 0 ≤ M → (∀ (i : Fin (finrank 𝕜 E)), ‖↑φ (↑v i)‖ ≤ M) → ‖φ‖ ≤ C * M\nh_2C : 0 < 2 * C\nhε2C : 0 < ε / (2 * C)\nφ : E →L[𝕜] F\ni : Fin (finrank 𝕜 E)\nthis : ∀ (i_1 : ℝ), 0 < i_1 → ∃ y, y ∈ range u ∧ y ∈ Metric.ball (↑φ (↑v i)) i_1\n⊢ ∃ n, ‖u n - ↑φ (↑v i)‖ < ε / (2 * C)\n[PROOFSTEP]\nspecialize this (ε / (2 * C)) hε2C\n[GOAL]\n𝕜 : Type u\ninst✝¹² : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁷ : AddCommGroup F'\ninst✝⁶ : Module 𝕜 F'\ninst✝⁵ : TopologicalSpace F'\ninst✝⁴ : TopologicalAddGroup F'\ninst✝³ : ContinuousSMul 𝕜 F'\ninst✝² : CompleteSpace 𝕜\ninst✝¹ : FiniteDimensional 𝕜 E\ninst✝ : SecondCountableTopology F\nd : ℕ := finrank 𝕜 E\nε : ℝ\nε_pos : ε > 0\nu : ℕ → F\nhu : DenseRange u\nv : Basis (Fin (finrank 𝕜 E)) 𝕜 E := finBasis 𝕜 E\nC : ℝ\nC_pos : 0 < C\nhC : ∀ {φ : E →L[𝕜] F} {M : ℝ}, 0 ≤ M → (∀ (i : Fin (finrank 𝕜 E)), ‖↑φ (↑v i)‖ ≤ M) → ‖φ‖ ≤ C * M\nh_2C : 0 < 2 * C\nhε2C : 0 < ε / (2 * C)\nφ : E →L[𝕜] F\ni : Fin (finrank 𝕜 E)\nthis : ∃ y, y ∈ range u ∧ y ∈ Metric.ball (↑φ (↑v i)) (ε / (2 * C))\n⊢ ∃ n, ‖u n - ↑φ (↑v i)‖ < ε / (2 * C)\n[PROOFSTEP]\nsimpa [dist_eq_norm]\n[GOAL]\ncase intro\n𝕜 : Type u\ninst✝¹² : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁷ : AddCommGroup F'\ninst✝⁶ : Module 𝕜 F'\ninst✝⁵ : TopologicalSpace F'\ninst✝⁴ : TopologicalAddGroup F'\ninst✝³ : ContinuousSMul 𝕜 F'\ninst✝² : CompleteSpace 𝕜\ninst✝¹ : FiniteDimensional 𝕜 E\ninst✝ : SecondCountableTopology F\nd : ℕ := finrank 𝕜 E\nε : ℝ\nε_pos : ε > 0\nu : ℕ → F\nhu : DenseRange u\nv : Basis (Fin (finrank 𝕜 E)) 𝕜 E := finBasis 𝕜 E\nC : ℝ\nC_pos : 0 < C\nhC : ∀ {φ : E →L[𝕜] F} {M : ℝ}, 0 ≤ M → (∀ (i : Fin (finrank 𝕜 E)), ‖↑φ (↑v i)‖ ≤ M) → ‖φ‖ ≤ C * M\nh_2C : 0 < 2 * C\nhε2C : 0 < ε / (2 * C)\nφ : E →L[𝕜] F\ni : Fin (finrank 𝕜 E)\nthis : ↑φ (↑v i) ∈ closure (range u)\nn : ℕ\nhn : ‖u n - ↑φ (↑v i)‖ < ε / (2 * C)\n⊢ ∃ n, ‖u n - ↑φ (↑(finBasis 𝕜 E) i)‖ ≤ ε / (2 * C)\n[PROOFSTEP]\nexact ⟨n, le_of_lt hn⟩\n[GOAL]\n𝕜 : Type u\ninst✝¹² : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁷ : AddCommGroup F'\ninst✝⁶ : Module 𝕜 F'\ninst✝⁵ : TopologicalSpace F'\ninst✝⁴ : TopologicalAddGroup F'\ninst✝³ : ContinuousSMul 𝕜 F'\ninst✝² : CompleteSpace 𝕜\ninst✝¹ : FiniteDimensional 𝕜 E\ninst✝ : SecondCountableTopology F\nd : ℕ := finrank 𝕜 E\nε : ℝ\nε_pos : ε > 0\nu : ℕ → F\nhu : DenseRange u\nv : Basis (Fin (finrank 𝕜 E)) 𝕜 E := finBasis 𝕜 E\nC : ℝ\nC_pos : 0 < C\nhC : ∀ {φ : E →L[𝕜] F} {M : ℝ}, 0 ≤ M → (∀ (i : Fin (finrank 𝕜 E)), ‖↑φ (↑v i)‖ ≤ M) → ‖φ‖ ≤ C * M\nh_2C : 0 < 2 * C\nhε2C : 0 < ε / (2 * C)\nφ : E →L[𝕜] F\nthis : ∀ (i : Fin (finrank 𝕜 E)), ∃ n, ‖↑φ (↑v i) - u n‖ ≤ ε / (2 * C)\n⊢ ∃ n, ‖φ - Basis.constrL v (u ∘ n)‖ ≤ ε / 2\n[PROOFSTEP]\nchoose n hn using this\n[GOAL]\n𝕜 : Type u\ninst✝¹² : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁷ : AddCommGroup F'\ninst✝⁶ : Module 𝕜 F'\ninst✝⁵ : TopologicalSpace F'\ninst✝⁴ : TopologicalAddGroup F'\ninst✝³ : ContinuousSMul 𝕜 F'\ninst✝² : CompleteSpace 𝕜\ninst✝¹ : FiniteDimensional 𝕜 E\ninst✝ : SecondCountableTopology F\nd : ℕ := finrank 𝕜 E\nε : ℝ\nε_pos : ε > 0\nu : ℕ → F\nhu : DenseRange u\nv : Basis (Fin (finrank 𝕜 E)) 𝕜 E := finBasis 𝕜 E\nC : ℝ\nC_pos : 0 < C\nhC : ∀ {φ : E →L[𝕜] F} {M : ℝ}, 0 ≤ M → (∀ (i : Fin (finrank 𝕜 E)), ‖↑φ (↑v i)‖ ≤ M) → ‖φ‖ ≤ C * M\nh_2C : 0 < 2 * C\nhε2C : 0 < ε / (2 * C)\nφ : E →L[𝕜] F\nn : Fin (finrank 𝕜 E) → ℕ\nhn : ∀ (i : Fin (finrank 𝕜 E)), ‖↑φ (↑v i) - u (n i)‖ ≤ ε / (2 * C)\n⊢ ∃ n, ‖φ - Basis.constrL v (u ∘ n)‖ ≤ ε / 2\n[PROOFSTEP]\nuse n\n[GOAL]\ncase h\n𝕜 : Type u\ninst✝¹² : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁷ : AddCommGroup F'\ninst✝⁶ : Module 𝕜 F'\ninst✝⁵ : TopologicalSpace F'\ninst✝⁴ : TopologicalAddGroup F'\ninst✝³ : ContinuousSMul 𝕜 F'\ninst✝² : CompleteSpace 𝕜\ninst✝¹ : FiniteDimensional 𝕜 E\ninst✝ : SecondCountableTopology F\nd : ℕ := finrank 𝕜 E\nε : ℝ\nε_pos : ε > 0\nu : ℕ → F\nhu : DenseRange u\nv : Basis (Fin (finrank 𝕜 E)) 𝕜 E := finBasis 𝕜 E\nC : ℝ\nC_pos : 0 < C\nhC : ∀ {φ : E →L[𝕜] F} {M : ℝ}, 0 ≤ M → (∀ (i : Fin (finrank 𝕜 E)), ‖↑φ (↑v i)‖ ≤ M) → ‖φ‖ ≤ C * M\nh_2C : 0 < 2 * C\nhε2C : 0 < ε / (2 * C)\nφ : E →L[𝕜] F\nn : Fin (finrank 𝕜 E) → ℕ\nhn : ∀ (i : Fin (finrank 𝕜 E)), ‖↑φ (↑v i) - u (n i)‖ ≤ ε / (2 * C)\n⊢ ‖φ - Basis.constrL v (u ∘ n)‖ ≤ ε / 2\n[PROOFSTEP]\nreplace hn : ∀ i : Fin d, ‖(φ - (v.constrL <| u ∘ n)) (v i)‖ ≤ ε / (2 * C)\n[GOAL]\ncase hn\n𝕜 : Type u\ninst✝¹² : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁷ : AddCommGroup F'\ninst✝⁶ : Module 𝕜 F'\ninst✝⁵ : TopologicalSpace F'\ninst✝⁴ : TopologicalAddGroup F'\ninst✝³ : ContinuousSMul 𝕜 F'\ninst✝² : CompleteSpace 𝕜\ninst✝¹ : FiniteDimensional 𝕜 E\ninst✝ : SecondCountableTopology F\nd : ℕ := finrank 𝕜 E\nε : ℝ\nε_pos : ε > 0\nu : ℕ → F\nhu : DenseRange u\nv : Basis (Fin (finrank 𝕜 E)) 𝕜 E := finBasis 𝕜 E\nC : ℝ\nC_pos : 0 < C\nhC : ∀ {φ : E →L[𝕜] F} {M : ℝ}, 0 ≤ M → (∀ (i : Fin (finrank 𝕜 E)), ‖↑φ (↑v i)‖ ≤ M) → ‖φ‖ ≤ C * M\nh_2C : 0 < 2 * C\nhε2C : 0 < ε / (2 * C)\nφ : E →L[𝕜] F\nn : Fin (finrank 𝕜 E) → ℕ\nhn : ∀ (i : Fin (finrank 𝕜 E)), ‖↑φ (↑v i) - u (n i)‖ ≤ ε / (2 * C)\n⊢ ∀ (i : Fin d), ‖↑(φ - Basis.constrL v (u ∘ n)) (↑v i)‖ ≤ ε / (2 * C)\n[PROOFSTEP]\nsimp [hn]\n[GOAL]\ncase h\n𝕜 : Type u\ninst✝¹² : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁷ : AddCommGroup F'\ninst✝⁶ : Module 𝕜 F'\ninst✝⁵ : TopologicalSpace F'\ninst✝⁴ : TopologicalAddGroup F'\ninst✝³ : ContinuousSMul 𝕜 F'\ninst✝² : CompleteSpace 𝕜\ninst✝¹ : FiniteDimensional 𝕜 E\ninst✝ : SecondCountableTopology F\nd : ℕ := finrank 𝕜 E\nε : ℝ\nε_pos : ε > 0\nu : ℕ → F\nhu : DenseRange u\nv : Basis (Fin (finrank 𝕜 E)) 𝕜 E := finBasis 𝕜 E\nC : ℝ\nC_pos : 0 < C\nhC : ∀ {φ : E →L[𝕜] F} {M : ℝ}, 0 ≤ M → (∀ (i : Fin (finrank 𝕜 E)), ‖↑φ (↑v i)‖ ≤ M) → ‖φ‖ ≤ C * M\nh_2C : 0 < 2 * C\nhε2C : 0 < ε / (2 * C)\nφ : E →L[𝕜] F\nn : Fin (finrank 𝕜 E) → ℕ\nhn : ∀ (i : Fin d), ‖↑(φ - Basis.constrL v (u ∘ n)) (↑v i)‖ ≤ ε / (2 * C)\n⊢ ‖φ - Basis.constrL v (u ∘ n)‖ ≤ ε / 2\n[PROOFSTEP]\nhave : C * (ε / (2 * C)) = ε / 2 := by\n  rw [eq_div_iff (two_ne_zero : (2 : ℝ) ≠ 0), mul_comm, ← mul_assoc, mul_div_cancel' _ (ne_of_gt h_2C)]\n[GOAL]\n𝕜 : Type u\ninst✝¹² : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁷ : AddCommGroup F'\ninst✝⁶ : Module 𝕜 F'\ninst✝⁵ : TopologicalSpace F'\ninst✝⁴ : TopologicalAddGroup F'\ninst✝³ : ContinuousSMul 𝕜 F'\ninst✝² : CompleteSpace 𝕜\ninst✝¹ : FiniteDimensional 𝕜 E\ninst✝ : SecondCountableTopology F\nd : ℕ := finrank 𝕜 E\nε : ℝ\nε_pos : ε > 0\nu : ℕ → F\nhu : DenseRange u\nv : Basis (Fin (finrank 𝕜 E)) 𝕜 E := finBasis 𝕜 E\nC : ℝ\nC_pos : 0 < C\nhC : ∀ {φ : E →L[𝕜] F} {M : ℝ}, 0 ≤ M → (∀ (i : Fin (finrank 𝕜 E)), ‖↑φ (↑v i)‖ ≤ M) → ‖φ‖ ≤ C * M\nh_2C : 0 < 2 * C\nhε2C : 0 < ε / (2 * C)\nφ : E →L[𝕜] F\nn : Fin (finrank 𝕜 E) → ℕ\nhn : ∀ (i : Fin d), ‖↑(φ - Basis.constrL v (u ∘ n)) (↑v i)‖ ≤ ε / (2 * C)\n⊢ C * (ε / (2 * C)) = ε / 2\n[PROOFSTEP]\nrw [eq_div_iff (two_ne_zero : (2 : ℝ) ≠ 0), mul_comm, ← mul_assoc, mul_div_cancel' _ (ne_of_gt h_2C)]\n[GOAL]\ncase h\n𝕜 : Type u\ninst✝¹² : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁷ : AddCommGroup F'\ninst✝⁶ : Module 𝕜 F'\ninst✝⁵ : TopologicalSpace F'\ninst✝⁴ : TopologicalAddGroup F'\ninst✝³ : ContinuousSMul 𝕜 F'\ninst✝² : CompleteSpace 𝕜\ninst✝¹ : FiniteDimensional 𝕜 E\ninst✝ : SecondCountableTopology F\nd : ℕ := finrank 𝕜 E\nε : ℝ\nε_pos : ε > 0\nu : ℕ → F\nhu : DenseRange u\nv : Basis (Fin (finrank 𝕜 E)) 𝕜 E := finBasis 𝕜 E\nC : ℝ\nC_pos : 0 < C\nhC : ∀ {φ : E →L[𝕜] F} {M : ℝ}, 0 ≤ M → (∀ (i : Fin (finrank 𝕜 E)), ‖↑φ (↑v i)‖ ≤ M) → ‖φ‖ ≤ C * M\nh_2C : 0 < 2 * C\nhε2C : 0 < ε / (2 * C)\nφ : E →L[𝕜] F\nn : Fin (finrank 𝕜 E) → ℕ\nhn : ∀ (i : Fin d), ‖↑(φ - Basis.constrL v (u ∘ n)) (↑v i)‖ ≤ ε / (2 * C)\nthis : C * (ε / (2 * C)) = ε / 2\n⊢ ‖φ - Basis.constrL v (u ∘ n)‖ ≤ ε / 2\n[PROOFSTEP]\nspecialize hC (le_of_lt hε2C) hn\n[GOAL]\ncase h\n𝕜 : Type u\ninst✝¹² : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁷ : AddCommGroup F'\ninst✝⁶ : Module 𝕜 F'\ninst✝⁵ : TopologicalSpace F'\ninst✝⁴ : TopologicalAddGroup F'\ninst✝³ : ContinuousSMul 𝕜 F'\ninst✝² : CompleteSpace 𝕜\ninst✝¹ : FiniteDimensional 𝕜 E\ninst✝ : SecondCountableTopology F\nd : ℕ := finrank 𝕜 E\nε : ℝ\nε_pos : ε > 0\nu : ℕ → F\nhu : DenseRange u\nv : Basis (Fin (finrank 𝕜 E)) 𝕜 E := finBasis 𝕜 E\nC : ℝ\nC_pos : 0 < C\nh_2C : 0 < 2 * C\nhε2C : 0 < ε / (2 * C)\nφ : E →L[𝕜] F\nn : Fin (finrank 𝕜 E) → ℕ\nhn : ∀ (i : Fin d), ‖↑(φ - Basis.constrL v (u ∘ n)) (↑v i)‖ ≤ ε / (2 * C)\nthis : C * (ε / (2 * C)) = ε / 2\nhC : ‖φ - Basis.constrL v (u ∘ n)‖ ≤ C * (ε / (2 * C))\n⊢ ‖φ - Basis.constrL v (u ∘ n)‖ ≤ ε / 2\n[PROOFSTEP]\nrwa [this] at hC \n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u\ninst✝¹² : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁷ : AddCommGroup F'\ninst✝⁶ : Module 𝕜 F'\ninst✝⁵ : TopologicalSpace F'\ninst✝⁴ : TopologicalAddGroup F'\ninst✝³ : ContinuousSMul 𝕜 F'\ninst✝² : CompleteSpace 𝕜\ninst✝¹ : FiniteDimensional 𝕜 E\ninst✝ : SecondCountableTopology F\nd : ℕ := finrank 𝕜 E\nε : ℝ\nε_pos : ε > 0\nu : ℕ → F\nhu : DenseRange u\nv : Basis (Fin (finrank 𝕜 E)) 𝕜 E := finBasis 𝕜 E\nC : ℝ\nC_pos : 0 < C\nhC : ∀ {φ : E →L[𝕜] F} {M : ℝ}, 0 ≤ M → (∀ (i : Fin (finrank 𝕜 E)), ‖↑φ (↑v i)‖ ≤ M) → ‖φ‖ ≤ C * M\nh_2C : 0 < 2 * C\nhε2C : 0 < ε / (2 * C)\nthis : ∀ (φ : E →L[𝕜] F), ∃ n, ‖φ - Basis.constrL v (u ∘ n)‖ ≤ ε / 2\n⊢ ∃ n, ∀ (f g : E →L[𝕜] F), n f = n g → dist f g ≤ ε\n[PROOFSTEP]\nchoose n hn using this\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u\ninst✝¹² : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁷ : AddCommGroup F'\ninst✝⁶ : Module 𝕜 F'\ninst✝⁵ : TopologicalSpace F'\ninst✝⁴ : TopologicalAddGroup F'\ninst✝³ : ContinuousSMul 𝕜 F'\ninst✝² : CompleteSpace 𝕜\ninst✝¹ : FiniteDimensional 𝕜 E\ninst✝ : SecondCountableTopology F\nd : ℕ := finrank 𝕜 E\nε : ℝ\nε_pos : ε > 0\nu : ℕ → F\nhu : DenseRange u\nv : Basis (Fin (finrank 𝕜 E)) 𝕜 E := finBasis 𝕜 E\nC : ℝ\nC_pos : 0 < C\nhC : ∀ {φ : E →L[𝕜] F} {M : ℝ}, 0 ≤ M → (∀ (i : Fin (finrank 𝕜 E)), ‖↑φ (↑v i)‖ ≤ M) → ‖φ‖ ≤ C * M\nh_2C : 0 < 2 * C\nhε2C : 0 < ε / (2 * C)\nn : (E →L[𝕜] F) → Fin d → ℕ\nhn : ∀ (φ : E →L[𝕜] F), ‖φ - Basis.constrL v (u ∘ n φ)‖ ≤ ε / 2\n⊢ ∃ n, ∀ (f g : E →L[𝕜] F), n f = n g → dist f g ≤ ε\n[PROOFSTEP]\nset Φ := fun φ : E →L[𝕜] F => v.constrL <| u ∘ n φ\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u\ninst✝¹² : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁷ : AddCommGroup F'\ninst✝⁶ : Module 𝕜 F'\ninst✝⁵ : TopologicalSpace F'\ninst✝⁴ : TopologicalAddGroup F'\ninst✝³ : ContinuousSMul 𝕜 F'\ninst✝² : CompleteSpace 𝕜\ninst✝¹ : FiniteDimensional 𝕜 E\ninst✝ : SecondCountableTopology F\nd : ℕ := finrank 𝕜 E\nε : ℝ\nε_pos : ε > 0\nu : ℕ → F\nhu : DenseRange u\nv : Basis (Fin (finrank 𝕜 E)) 𝕜 E := finBasis 𝕜 E\nC : ℝ\nC_pos : 0 < C\nhC : ∀ {φ : E →L[𝕜] F} {M : ℝ}, 0 ≤ M → (∀ (i : Fin (finrank 𝕜 E)), ‖↑φ (↑v i)‖ ≤ M) → ‖φ‖ ≤ C * M\nh_2C : 0 < 2 * C\nhε2C : 0 < ε / (2 * C)\nn : (E →L[𝕜] F) → Fin d → ℕ\nhn : ∀ (φ : E →L[𝕜] F), ‖φ - Basis.constrL v (u ∘ n φ)‖ ≤ ε / 2\nΦ : (E →L[𝕜] F) → E →L[𝕜] F := fun φ => Basis.constrL v (u ∘ n φ)\n⊢ ∃ n, ∀ (f g : E →L[𝕜] F), n f = n g → dist f g ≤ ε\n[PROOFSTEP]\nchange ∀ z, dist z (Φ z) ≤ ε / 2 at hn \n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u\ninst✝¹² : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁷ : AddCommGroup F'\ninst✝⁶ : Module 𝕜 F'\ninst✝⁵ : TopologicalSpace F'\ninst✝⁴ : TopologicalAddGroup F'\ninst✝³ : ContinuousSMul 𝕜 F'\ninst✝² : CompleteSpace 𝕜\ninst✝¹ : FiniteDimensional 𝕜 E\ninst✝ : SecondCountableTopology F\nd : ℕ := finrank 𝕜 E\nε : ℝ\nε_pos : ε > 0\nu : ℕ → F\nhu : DenseRange u\nv : Basis (Fin (finrank 𝕜 E)) 𝕜 E := finBasis 𝕜 E\nC : ℝ\nC_pos : 0 < C\nhC : ∀ {φ : E →L[𝕜] F} {M : ℝ}, 0 ≤ M → (∀ (i : Fin (finrank 𝕜 E)), ‖↑φ (↑v i)‖ ≤ M) → ‖φ‖ ≤ C * M\nh_2C : 0 < 2 * C\nhε2C : 0 < ε / (2 * C)\nn : (E →L[𝕜] F) → Fin d → ℕ\nΦ : (E →L[𝕜] F) → E →L[𝕜] F := fun φ => Basis.constrL v (u ∘ n φ)\nhn : ∀ (z : E →L[𝕜] F), dist z (Φ z) ≤ ε / 2\n⊢ ∃ n, ∀ (f g : E →L[𝕜] F), n f = n g → dist f g ≤ ε\n[PROOFSTEP]\nuse n\n[GOAL]\ncase h\n𝕜 : Type u\ninst✝¹² : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁷ : AddCommGroup F'\ninst✝⁶ : Module 𝕜 F'\ninst✝⁵ : TopologicalSpace F'\ninst✝⁴ : TopologicalAddGroup F'\ninst✝³ : ContinuousSMul 𝕜 F'\ninst✝² : CompleteSpace 𝕜\ninst✝¹ : FiniteDimensional 𝕜 E\ninst✝ : SecondCountableTopology F\nd : ℕ := finrank 𝕜 E\nε : ℝ\nε_pos : ε > 0\nu : ℕ → F\nhu : DenseRange u\nv : Basis (Fin (finrank 𝕜 E)) 𝕜 E := finBasis 𝕜 E\nC : ℝ\nC_pos : 0 < C\nhC : ∀ {φ : E →L[𝕜] F} {M : ℝ}, 0 ≤ M → (∀ (i : Fin (finrank 𝕜 E)), ‖↑φ (↑v i)‖ ≤ M) → ‖φ‖ ≤ C * M\nh_2C : 0 < 2 * C\nhε2C : 0 < ε / (2 * C)\nn : (E →L[𝕜] F) → Fin d → ℕ\nΦ : (E →L[𝕜] F) → E →L[𝕜] F := fun φ => Basis.constrL v (u ∘ n φ)\nhn : ∀ (z : E →L[𝕜] F), dist z (Φ z) ≤ ε / 2\n⊢ ∀ (f g : E →L[𝕜] F), n f = n g → dist f g ≤ ε\n[PROOFSTEP]\nintro x y hxy\n[GOAL]\ncase h\n𝕜 : Type u\ninst✝¹² : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁷ : AddCommGroup F'\ninst✝⁶ : Module 𝕜 F'\ninst✝⁵ : TopologicalSpace F'\ninst✝⁴ : TopologicalAddGroup F'\ninst✝³ : ContinuousSMul 𝕜 F'\ninst✝² : CompleteSpace 𝕜\ninst✝¹ : FiniteDimensional 𝕜 E\ninst✝ : SecondCountableTopology F\nd : ℕ := finrank 𝕜 E\nε : ℝ\nε_pos : ε > 0\nu : ℕ → F\nhu : DenseRange u\nv : Basis (Fin (finrank 𝕜 E)) 𝕜 E := finBasis 𝕜 E\nC : ℝ\nC_pos : 0 < C\nhC : ∀ {φ : E →L[𝕜] F} {M : ℝ}, 0 ≤ M → (∀ (i : Fin (finrank 𝕜 E)), ‖↑φ (↑v i)‖ ≤ M) → ‖φ‖ ≤ C * M\nh_2C : 0 < 2 * C\nhε2C : 0 < ε / (2 * C)\nn : (E →L[𝕜] F) → Fin d → ℕ\nΦ : (E →L[𝕜] F) → E →L[𝕜] F := fun φ => Basis.constrL v (u ∘ n φ)\nhn : ∀ (z : E →L[𝕜] F), dist z (Φ z) ≤ ε / 2\nx y : E →L[𝕜] F\nhxy : n x = n y\n⊢ dist x y ≤ ε\n[PROOFSTEP]\ncalc\n  dist x y ≤ dist x (Φ x) + dist (Φ x) y := dist_triangle _ _ _\n  _ = dist x (Φ x) + dist y (Φ y) := by simp [hxy, dist_comm]\n  _ ≤ ε := by linarith [hn x, hn y]\n[GOAL]\n𝕜 : Type u\ninst✝¹² : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁷ : AddCommGroup F'\ninst✝⁶ : Module 𝕜 F'\ninst✝⁵ : TopologicalSpace F'\ninst✝⁴ : TopologicalAddGroup F'\ninst✝³ : ContinuousSMul 𝕜 F'\ninst✝² : CompleteSpace 𝕜\ninst✝¹ : FiniteDimensional 𝕜 E\ninst✝ : SecondCountableTopology F\nd : ℕ := finrank 𝕜 E\nε : ℝ\nε_pos : ε > 0\nu : ℕ → F\nhu : DenseRange u\nv : Basis (Fin (finrank 𝕜 E)) 𝕜 E := finBasis 𝕜 E\nC : ℝ\nC_pos : 0 < C\nhC : ∀ {φ : E →L[𝕜] F} {M : ℝ}, 0 ≤ M → (∀ (i : Fin (finrank 𝕜 E)), ‖↑φ (↑v i)‖ ≤ M) → ‖φ‖ ≤ C * M\nh_2C : 0 < 2 * C\nhε2C : 0 < ε / (2 * C)\nn : (E →L[𝕜] F) → Fin d → ℕ\nΦ : (E →L[𝕜] F) → E →L[𝕜] F := fun φ => Basis.constrL v (u ∘ n φ)\nhn : ∀ (z : E →L[𝕜] F), dist z (Φ z) ≤ ε / 2\nx y : E →L[𝕜] F\nhxy : n x = n y\n⊢ dist x (Φ x) + dist (Φ x) y = dist x (Φ x) + dist y (Φ y)\n[PROOFSTEP]\nsimp [hxy, dist_comm]\n[GOAL]\n𝕜 : Type u\ninst✝¹² : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁷ : AddCommGroup F'\ninst✝⁶ : Module 𝕜 F'\ninst✝⁵ : TopologicalSpace F'\ninst✝⁴ : TopologicalAddGroup F'\ninst✝³ : ContinuousSMul 𝕜 F'\ninst✝² : CompleteSpace 𝕜\ninst✝¹ : FiniteDimensional 𝕜 E\ninst✝ : SecondCountableTopology F\nd : ℕ := finrank 𝕜 E\nε : ℝ\nε_pos : ε > 0\nu : ℕ → F\nhu : DenseRange u\nv : Basis (Fin (finrank 𝕜 E)) 𝕜 E := finBasis 𝕜 E\nC : ℝ\nC_pos : 0 < C\nhC : ∀ {φ : E →L[𝕜] F} {M : ℝ}, 0 ≤ M → (∀ (i : Fin (finrank 𝕜 E)), ‖↑φ (↑v i)‖ ≤ M) → ‖φ‖ ≤ C * M\nh_2C : 0 < 2 * C\nhε2C : 0 < ε / (2 * C)\nn : (E →L[𝕜] F) → Fin d → ℕ\nΦ : (E →L[𝕜] F) → E →L[𝕜] F := fun φ => Basis.constrL v (u ∘ n φ)\nhn : ∀ (z : E →L[𝕜] F), dist z (Φ z) ≤ ε / 2\nx y : E →L[𝕜] F\nhxy : n x = n y\n⊢ dist x (Φ x) + dist y (Φ y) ≤ ε\n[PROOFSTEP]\nlinarith [hn x, hn y]\n[GOAL]\n𝕜 : Type u\ninst✝¹¹ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁸ : NormedAddCommGroup F\ninst✝⁷ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁶ : AddCommGroup F'\ninst✝⁵ : Module 𝕜 F'\ninst✝⁴ : TopologicalSpace F'\ninst✝³ : TopologicalAddGroup F'\ninst✝² : ContinuousSMul 𝕜 F'\ninst✝¹ : CompleteSpace 𝕜\ninst✝ : FiniteDimensional 𝕜 E\n⊢ CompleteSpace E\n[PROOFSTEP]\nset e := ContinuousLinearEquiv.ofFinrankEq (@finrank_fin_fun 𝕜 _ _ (finrank 𝕜 E)).symm\n[GOAL]\n𝕜 : Type u\ninst✝¹¹ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁸ : NormedAddCommGroup F\ninst✝⁷ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁶ : AddCommGroup F'\ninst✝⁵ : Module 𝕜 F'\ninst✝⁴ : TopologicalSpace F'\ninst✝³ : TopologicalAddGroup F'\ninst✝² : ContinuousSMul 𝕜 F'\ninst✝¹ : CompleteSpace 𝕜\ninst✝ : FiniteDimensional 𝕜 E\ne : E ≃L[𝕜] Fin (finrank 𝕜 E) → 𝕜 :=\n  ContinuousLinearEquiv.ofFinrankEq (_ : finrank 𝕜 E = finrank 𝕜 (Fin (finrank 𝕜 E) → 𝕜))\n⊢ CompleteSpace E\n[PROOFSTEP]\nhave : UniformEmbedding e.toLinearEquiv.toEquiv.symm := e.symm.uniformEmbedding\n[GOAL]\n𝕜 : Type u\ninst✝¹¹ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁸ : NormedAddCommGroup F\ninst✝⁷ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁶ : AddCommGroup F'\ninst✝⁵ : Module 𝕜 F'\ninst✝⁴ : TopologicalSpace F'\ninst✝³ : TopologicalAddGroup F'\ninst✝² : ContinuousSMul 𝕜 F'\ninst✝¹ : CompleteSpace 𝕜\ninst✝ : FiniteDimensional 𝕜 E\ne : E ≃L[𝕜] Fin (finrank 𝕜 E) → 𝕜 :=\n  ContinuousLinearEquiv.ofFinrankEq (_ : finrank 𝕜 E = finrank 𝕜 (Fin (finrank 𝕜 E) → 𝕜))\nthis : UniformEmbedding ↑(LinearEquiv.toEquiv e.toLinearEquiv).symm\n⊢ CompleteSpace E\n[PROOFSTEP]\nexact (completeSpace_congr this).1 (by infer_instance)\n[GOAL]\n𝕜 : Type u\ninst✝¹¹ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁸ : NormedAddCommGroup F\ninst✝⁷ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁶ : AddCommGroup F'\ninst✝⁵ : Module 𝕜 F'\ninst✝⁴ : TopologicalSpace F'\ninst✝³ : TopologicalAddGroup F'\ninst✝² : ContinuousSMul 𝕜 F'\ninst✝¹ : CompleteSpace 𝕜\ninst✝ : FiniteDimensional 𝕜 E\ne : E ≃L[𝕜] Fin (finrank 𝕜 E) → 𝕜 :=\n  ContinuousLinearEquiv.ofFinrankEq (_ : finrank 𝕜 E = finrank 𝕜 (Fin (finrank 𝕜 E) → 𝕜))\nthis : UniformEmbedding ↑(LinearEquiv.toEquiv e.toLinearEquiv).symm\n⊢ CompleteSpace (Fin (finrank 𝕜 E) → 𝕜)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\n𝕜 : Type u\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁵ : AddCommGroup F'\ninst✝⁴ : Module 𝕜 F'\ninst✝³ : TopologicalSpace F'\ninst✝² : TopologicalAddGroup F'\ninst✝¹ : ContinuousSMul 𝕜 F'\ninst✝ : CompleteSpace 𝕜\nc : 𝕜\nhc : 1 < ‖c‖\nR : ℝ\nhR : ‖c‖ < R\nh : ¬FiniteDimensional 𝕜 E\ns : Finset E\n⊢ ∃ x, ‖x‖ ≤ R ∧ ∀ (y : E), y ∈ s → 1 ≤ ‖y - x‖\n[PROOFSTEP]\nlet F := Submodule.span 𝕜 (s : Set E)\n[GOAL]\n𝕜 : Type u\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nF✝ : Type w\ninst✝⁷ : NormedAddCommGroup F✝\ninst✝⁶ : NormedSpace 𝕜 F✝\nF' : Type x\ninst✝⁵ : AddCommGroup F'\ninst✝⁴ : Module 𝕜 F'\ninst✝³ : TopologicalSpace F'\ninst✝² : TopologicalAddGroup F'\ninst✝¹ : ContinuousSMul 𝕜 F'\ninst✝ : CompleteSpace 𝕜\nc : 𝕜\nhc : 1 < ‖c‖\nR : ℝ\nhR : ‖c‖ < R\nh : ¬FiniteDimensional 𝕜 E\ns : Finset E\nF : Submodule 𝕜 E := Submodule.span 𝕜 ↑s\n⊢ ∃ x, ‖x‖ ≤ R ∧ ∀ (y : E), y ∈ s → 1 ≤ ‖y - x‖\n[PROOFSTEP]\nhaveI : FiniteDimensional 𝕜 F :=\n  Module.finite_def.2 ((Submodule.fg_top _).2 (Submodule.fg_def.2 ⟨s, Finset.finite_toSet _, rfl⟩))\n[GOAL]\n𝕜 : Type u\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nF✝ : Type w\ninst✝⁷ : NormedAddCommGroup F✝\ninst✝⁶ : NormedSpace 𝕜 F✝\nF' : Type x\ninst✝⁵ : AddCommGroup F'\ninst✝⁴ : Module 𝕜 F'\ninst✝³ : TopologicalSpace F'\ninst✝² : TopologicalAddGroup F'\ninst✝¹ : ContinuousSMul 𝕜 F'\ninst✝ : CompleteSpace 𝕜\nc : 𝕜\nhc : 1 < ‖c‖\nR : ℝ\nhR : ‖c‖ < R\nh : ¬FiniteDimensional 𝕜 E\ns : Finset E\nF : Submodule 𝕜 E := Submodule.span 𝕜 ↑s\nthis : FiniteDimensional 𝕜 { x // x ∈ F }\n⊢ ∃ x, ‖x‖ ≤ R ∧ ∀ (y : E), y ∈ s → 1 ≤ ‖y - x‖\n[PROOFSTEP]\nhave Fclosed : IsClosed (F : Set E) := Submodule.closed_of_finiteDimensional _\n[GOAL]\n𝕜 : Type u\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nF✝ : Type w\ninst✝⁷ : NormedAddCommGroup F✝\ninst✝⁶ : NormedSpace 𝕜 F✝\nF' : Type x\ninst✝⁵ : AddCommGroup F'\ninst✝⁴ : Module 𝕜 F'\ninst✝³ : TopologicalSpace F'\ninst✝² : TopologicalAddGroup F'\ninst✝¹ : ContinuousSMul 𝕜 F'\ninst✝ : CompleteSpace 𝕜\nc : 𝕜\nhc : 1 < ‖c‖\nR : ℝ\nhR : ‖c‖ < R\nh : ¬FiniteDimensional 𝕜 E\ns : Finset E\nF : Submodule 𝕜 E := Submodule.span 𝕜 ↑s\nthis : FiniteDimensional 𝕜 { x // x ∈ F }\nFclosed : IsClosed ↑F\n⊢ ∃ x, ‖x‖ ≤ R ∧ ∀ (y : E), y ∈ s → 1 ≤ ‖y - x‖\n[PROOFSTEP]\nhave : ∃ x, x ∉ F := by\n  contrapose! h\n  have : (⊤ : Submodule 𝕜 E) = F := by\n    ext x\n    simp [h]\n  have : FiniteDimensional 𝕜 (⊤ : Submodule 𝕜 E) := by rwa [this]\n  refine' Module.finite_def.2 ((Submodule.fg_top _).1 (Module.finite_def.1 this))\n[GOAL]\n𝕜 : Type u\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nF✝ : Type w\ninst✝⁷ : NormedAddCommGroup F✝\ninst✝⁶ : NormedSpace 𝕜 F✝\nF' : Type x\ninst✝⁵ : AddCommGroup F'\ninst✝⁴ : Module 𝕜 F'\ninst✝³ : TopologicalSpace F'\ninst✝² : TopologicalAddGroup F'\ninst✝¹ : ContinuousSMul 𝕜 F'\ninst✝ : CompleteSpace 𝕜\nc : 𝕜\nhc : 1 < ‖c‖\nR : ℝ\nhR : ‖c‖ < R\nh : ¬FiniteDimensional 𝕜 E\ns : Finset E\nF : Submodule 𝕜 E := Submodule.span 𝕜 ↑s\nthis : FiniteDimensional 𝕜 { x // x ∈ F }\nFclosed : IsClosed ↑F\n⊢ ∃ x, ¬x ∈ F\n[PROOFSTEP]\ncontrapose! h\n[GOAL]\n𝕜 : Type u\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nF✝ : Type w\ninst✝⁷ : NormedAddCommGroup F✝\ninst✝⁶ : NormedSpace 𝕜 F✝\nF' : Type x\ninst✝⁵ : AddCommGroup F'\ninst✝⁴ : Module 𝕜 F'\ninst✝³ : TopologicalSpace F'\ninst✝² : TopologicalAddGroup F'\ninst✝¹ : ContinuousSMul 𝕜 F'\ninst✝ : CompleteSpace 𝕜\nc : 𝕜\nhc : 1 < ‖c‖\nR : ℝ\nhR : ‖c‖ < R\ns : Finset E\nF : Submodule 𝕜 E := Submodule.span 𝕜 ↑s\nthis : FiniteDimensional 𝕜 { x // x ∈ F }\nFclosed : IsClosed ↑F\nh : ∀ (x : E), x ∈ Submodule.span 𝕜 ↑s\n⊢ FiniteDimensional 𝕜 E\n[PROOFSTEP]\nhave : (⊤ : Submodule 𝕜 E) = F := by\n  ext x\n  simp [h]\n[GOAL]\n𝕜 : Type u\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nF✝ : Type w\ninst✝⁷ : NormedAddCommGroup F✝\ninst✝⁶ : NormedSpace 𝕜 F✝\nF' : Type x\ninst✝⁵ : AddCommGroup F'\ninst✝⁴ : Module 𝕜 F'\ninst✝³ : TopologicalSpace F'\ninst✝² : TopologicalAddGroup F'\ninst✝¹ : ContinuousSMul 𝕜 F'\ninst✝ : CompleteSpace 𝕜\nc : 𝕜\nhc : 1 < ‖c‖\nR : ℝ\nhR : ‖c‖ < R\ns : Finset E\nF : Submodule 𝕜 E := Submodule.span 𝕜 ↑s\nthis : FiniteDimensional 𝕜 { x // x ∈ F }\nFclosed : IsClosed ↑F\nh : ∀ (x : E), x ∈ Submodule.span 𝕜 ↑s\n⊢ ⊤ = F\n[PROOFSTEP]\next x\n[GOAL]\ncase h\n𝕜 : Type u\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nF✝ : Type w\ninst✝⁷ : NormedAddCommGroup F✝\ninst✝⁶ : NormedSpace 𝕜 F✝\nF' : Type x\ninst✝⁵ : AddCommGroup F'\ninst✝⁴ : Module 𝕜 F'\ninst✝³ : TopologicalSpace F'\ninst✝² : TopologicalAddGroup F'\ninst✝¹ : ContinuousSMul 𝕜 F'\ninst✝ : CompleteSpace 𝕜\nc : 𝕜\nhc : 1 < ‖c‖\nR : ℝ\nhR : ‖c‖ < R\ns : Finset E\nF : Submodule 𝕜 E := Submodule.span 𝕜 ↑s\nthis : FiniteDimensional 𝕜 { x // x ∈ F }\nFclosed : IsClosed ↑F\nh : ∀ (x : E), x ∈ Submodule.span 𝕜 ↑s\nx : E\n⊢ x ∈ ⊤ ↔ x ∈ F\n[PROOFSTEP]\nsimp [h]\n[GOAL]\n𝕜 : Type u\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nF✝ : Type w\ninst✝⁷ : NormedAddCommGroup F✝\ninst✝⁶ : NormedSpace 𝕜 F✝\nF' : Type x\ninst✝⁵ : AddCommGroup F'\ninst✝⁴ : Module 𝕜 F'\ninst✝³ : TopologicalSpace F'\ninst✝² : TopologicalAddGroup F'\ninst✝¹ : ContinuousSMul 𝕜 F'\ninst✝ : CompleteSpace 𝕜\nc : 𝕜\nhc : 1 < ‖c‖\nR : ℝ\nhR : ‖c‖ < R\ns : Finset E\nF : Submodule 𝕜 E := Submodule.span 𝕜 ↑s\nthis✝ : FiniteDimensional 𝕜 { x // x ∈ F }\nFclosed : IsClosed ↑F\nh : ∀ (x : E), x ∈ Submodule.span 𝕜 ↑s\nthis : ⊤ = F\n⊢ FiniteDimensional 𝕜 E\n[PROOFSTEP]\nhave : FiniteDimensional 𝕜 (⊤ : Submodule 𝕜 E) := by rwa [this]\n[GOAL]\n𝕜 : Type u\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nF✝ : Type w\ninst✝⁷ : NormedAddCommGroup F✝\ninst✝⁶ : NormedSpace 𝕜 F✝\nF' : Type x\ninst✝⁵ : AddCommGroup F'\ninst✝⁴ : Module 𝕜 F'\ninst✝³ : TopologicalSpace F'\ninst✝² : TopologicalAddGroup F'\ninst✝¹ : ContinuousSMul 𝕜 F'\ninst✝ : CompleteSpace 𝕜\nc : 𝕜\nhc : 1 < ‖c‖\nR : ℝ\nhR : ‖c‖ < R\ns : Finset E\nF : Submodule 𝕜 E := Submodule.span 𝕜 ↑s\nthis✝ : FiniteDimensional 𝕜 { x // x ∈ F }\nFclosed : IsClosed ↑F\nh : ∀ (x : E), x ∈ Submodule.span 𝕜 ↑s\nthis : ⊤ = F\n⊢ FiniteDimensional 𝕜 { x // x ∈ ⊤ }\n[PROOFSTEP]\nrwa [this]\n[GOAL]\n𝕜 : Type u\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nF✝ : Type w\ninst✝⁷ : NormedAddCommGroup F✝\ninst✝⁶ : NormedSpace 𝕜 F✝\nF' : Type x\ninst✝⁵ : AddCommGroup F'\ninst✝⁴ : Module 𝕜 F'\ninst✝³ : TopologicalSpace F'\ninst✝² : TopologicalAddGroup F'\ninst✝¹ : ContinuousSMul 𝕜 F'\ninst✝ : CompleteSpace 𝕜\nc : 𝕜\nhc : 1 < ‖c‖\nR : ℝ\nhR : ‖c‖ < R\ns : Finset E\nF : Submodule 𝕜 E := Submodule.span 𝕜 ↑s\nthis✝¹ : FiniteDimensional 𝕜 { x // x ∈ F }\nFclosed : IsClosed ↑F\nh : ∀ (x : E), x ∈ Submodule.span 𝕜 ↑s\nthis✝ : ⊤ = F\nthis : FiniteDimensional 𝕜 { x // x ∈ ⊤ }\n⊢ FiniteDimensional 𝕜 E\n[PROOFSTEP]\nrefine' Module.finite_def.2 ((Submodule.fg_top _).1 (Module.finite_def.1 this))\n[GOAL]\n𝕜 : Type u\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nF✝ : Type w\ninst✝⁷ : NormedAddCommGroup F✝\ninst✝⁶ : NormedSpace 𝕜 F✝\nF' : Type x\ninst✝⁵ : AddCommGroup F'\ninst✝⁴ : Module 𝕜 F'\ninst✝³ : TopologicalSpace F'\ninst✝² : TopologicalAddGroup F'\ninst✝¹ : ContinuousSMul 𝕜 F'\ninst✝ : CompleteSpace 𝕜\nc : 𝕜\nhc : 1 < ‖c‖\nR : ℝ\nhR : ‖c‖ < R\nh : ¬FiniteDimensional 𝕜 E\ns : Finset E\nF : Submodule 𝕜 E := Submodule.span 𝕜 ↑s\nthis✝ : FiniteDimensional 𝕜 { x // x ∈ F }\nFclosed : IsClosed ↑F\nthis : ∃ x, ¬x ∈ F\n⊢ ∃ x, ‖x‖ ≤ R ∧ ∀ (y : E), y ∈ s → 1 ≤ ‖y - x‖\n[PROOFSTEP]\nobtain ⟨x, xR, hx⟩ : ∃ x : E, ‖x‖ ≤ R ∧ ∀ y : E, y ∈ F → 1 ≤ ‖x - y‖ := riesz_lemma_of_norm_lt hc hR Fclosed this\n[GOAL]\ncase intro.intro\n𝕜 : Type u\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nF✝ : Type w\ninst✝⁷ : NormedAddCommGroup F✝\ninst✝⁶ : NormedSpace 𝕜 F✝\nF' : Type x\ninst✝⁵ : AddCommGroup F'\ninst✝⁴ : Module 𝕜 F'\ninst✝³ : TopologicalSpace F'\ninst✝² : TopologicalAddGroup F'\ninst✝¹ : ContinuousSMul 𝕜 F'\ninst✝ : CompleteSpace 𝕜\nc : 𝕜\nhc : 1 < ‖c‖\nR : ℝ\nhR : ‖c‖ < R\nh : ¬FiniteDimensional 𝕜 E\ns : Finset E\nF : Submodule 𝕜 E := Submodule.span 𝕜 ↑s\nthis✝ : FiniteDimensional 𝕜 { x // x ∈ F }\nFclosed : IsClosed ↑F\nthis : ∃ x, ¬x ∈ F\nx : E\nxR : ‖x‖ ≤ R\nhx : ∀ (y : E), y ∈ F → 1 ≤ ‖x - y‖\n⊢ ∃ x, ‖x‖ ≤ R ∧ ∀ (y : E), y ∈ s → 1 ≤ ‖y - x‖\n[PROOFSTEP]\nhave hx' : ∀ y : E, y ∈ F → 1 ≤ ‖y - x‖ := by\n  intro y hy\n  rw [← norm_neg]\n  simpa using hx y hy\n[GOAL]\n𝕜 : Type u\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nF✝ : Type w\ninst✝⁷ : NormedAddCommGroup F✝\ninst✝⁶ : NormedSpace 𝕜 F✝\nF' : Type x\ninst✝⁵ : AddCommGroup F'\ninst✝⁴ : Module 𝕜 F'\ninst✝³ : TopologicalSpace F'\ninst✝² : TopologicalAddGroup F'\ninst✝¹ : ContinuousSMul 𝕜 F'\ninst✝ : CompleteSpace 𝕜\nc : 𝕜\nhc : 1 < ‖c‖\nR : ℝ\nhR : ‖c‖ < R\nh : ¬FiniteDimensional 𝕜 E\ns : Finset E\nF : Submodule 𝕜 E := Submodule.span 𝕜 ↑s\nthis✝ : FiniteDimensional 𝕜 { x // x ∈ F }\nFclosed : IsClosed ↑F\nthis : ∃ x, ¬x ∈ F\nx : E\nxR : ‖x‖ ≤ R\nhx : ∀ (y : E), y ∈ F → 1 ≤ ‖x - y‖\n⊢ ∀ (y : E), y ∈ F → 1 ≤ ‖y - x‖\n[PROOFSTEP]\nintro y hy\n[GOAL]\n𝕜 : Type u\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nF✝ : Type w\ninst✝⁷ : NormedAddCommGroup F✝\ninst✝⁶ : NormedSpace 𝕜 F✝\nF' : Type x\ninst✝⁵ : AddCommGroup F'\ninst✝⁴ : Module 𝕜 F'\ninst✝³ : TopologicalSpace F'\ninst✝² : TopologicalAddGroup F'\ninst✝¹ : ContinuousSMul 𝕜 F'\ninst✝ : CompleteSpace 𝕜\nc : 𝕜\nhc : 1 < ‖c‖\nR : ℝ\nhR : ‖c‖ < R\nh : ¬FiniteDimensional 𝕜 E\ns : Finset E\nF : Submodule 𝕜 E := Submodule.span 𝕜 ↑s\nthis✝ : FiniteDimensional 𝕜 { x // x ∈ F }\nFclosed : IsClosed ↑F\nthis : ∃ x, ¬x ∈ F\nx : E\nxR : ‖x‖ ≤ R\nhx : ∀ (y : E), y ∈ F → 1 ≤ ‖x - y‖\ny : E\nhy : y ∈ F\n⊢ 1 ≤ ‖y - x‖\n[PROOFSTEP]\nrw [← norm_neg]\n[GOAL]\n𝕜 : Type u\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nF✝ : Type w\ninst✝⁷ : NormedAddCommGroup F✝\ninst✝⁶ : NormedSpace 𝕜 F✝\nF' : Type x\ninst✝⁵ : AddCommGroup F'\ninst✝⁴ : Module 𝕜 F'\ninst✝³ : TopologicalSpace F'\ninst✝² : TopologicalAddGroup F'\ninst✝¹ : ContinuousSMul 𝕜 F'\ninst✝ : CompleteSpace 𝕜\nc : 𝕜\nhc : 1 < ‖c‖\nR : ℝ\nhR : ‖c‖ < R\nh : ¬FiniteDimensional 𝕜 E\ns : Finset E\nF : Submodule 𝕜 E := Submodule.span 𝕜 ↑s\nthis✝ : FiniteDimensional 𝕜 { x // x ∈ F }\nFclosed : IsClosed ↑F\nthis : ∃ x, ¬x ∈ F\nx : E\nxR : ‖x‖ ≤ R\nhx : ∀ (y : E), y ∈ F → 1 ≤ ‖x - y‖\ny : E\nhy : y ∈ F\n⊢ 1 ≤ ‖-(y - x)‖\n[PROOFSTEP]\nsimpa using hx y hy\n[GOAL]\ncase intro.intro\n𝕜 : Type u\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nF✝ : Type w\ninst✝⁷ : NormedAddCommGroup F✝\ninst✝⁶ : NormedSpace 𝕜 F✝\nF' : Type x\ninst✝⁵ : AddCommGroup F'\ninst✝⁴ : Module 𝕜 F'\ninst✝³ : TopologicalSpace F'\ninst✝² : TopologicalAddGroup F'\ninst✝¹ : ContinuousSMul 𝕜 F'\ninst✝ : CompleteSpace 𝕜\nc : 𝕜\nhc : 1 < ‖c‖\nR : ℝ\nhR : ‖c‖ < R\nh : ¬FiniteDimensional 𝕜 E\ns : Finset E\nF : Submodule 𝕜 E := Submodule.span 𝕜 ↑s\nthis✝ : FiniteDimensional 𝕜 { x // x ∈ F }\nFclosed : IsClosed ↑F\nthis : ∃ x, ¬x ∈ F\nx : E\nxR : ‖x‖ ≤ R\nhx : ∀ (y : E), y ∈ F → 1 ≤ ‖x - y‖\nhx' : ∀ (y : E), y ∈ F → 1 ≤ ‖y - x‖\n⊢ ∃ x, ‖x‖ ≤ R ∧ ∀ (y : E), y ∈ s → 1 ≤ ‖y - x‖\n[PROOFSTEP]\nexact ⟨x, xR, fun y hy => hx' _ (Submodule.subset_span hy)⟩\n[GOAL]\n𝕜 : Type u\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁵ : AddCommGroup F'\ninst✝⁴ : Module 𝕜 F'\ninst✝³ : TopologicalSpace F'\ninst✝² : TopologicalAddGroup F'\ninst✝¹ : ContinuousSMul 𝕜 F'\ninst✝ : CompleteSpace 𝕜\nc : 𝕜\nhc : 1 < ‖c‖\nR : ℝ\nhR : ‖c‖ < R\nh : ¬FiniteDimensional 𝕜 E\n⊢ ∃ f, (∀ (n : ℕ), ‖f n‖ ≤ R) ∧ ∀ (m n : ℕ), m ≠ n → 1 ≤ ‖f m - f n‖\n[PROOFSTEP]\nhave : IsSymm E fun x y : E => 1 ≤ ‖x - y‖ := by\n  constructor\n  intro x y hxy\n  rw [← norm_neg]\n  simpa\n[GOAL]\n𝕜 : Type u\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁵ : AddCommGroup F'\ninst✝⁴ : Module 𝕜 F'\ninst✝³ : TopologicalSpace F'\ninst✝² : TopologicalAddGroup F'\ninst✝¹ : ContinuousSMul 𝕜 F'\ninst✝ : CompleteSpace 𝕜\nc : 𝕜\nhc : 1 < ‖c‖\nR : ℝ\nhR : ‖c‖ < R\nh : ¬FiniteDimensional 𝕜 E\n⊢ IsSymm E fun x y => 1 ≤ ‖x - y‖\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase symm\n𝕜 : Type u\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁵ : AddCommGroup F'\ninst✝⁴ : Module 𝕜 F'\ninst✝³ : TopologicalSpace F'\ninst✝² : TopologicalAddGroup F'\ninst✝¹ : ContinuousSMul 𝕜 F'\ninst✝ : CompleteSpace 𝕜\nc : 𝕜\nhc : 1 < ‖c‖\nR : ℝ\nhR : ‖c‖ < R\nh : ¬FiniteDimensional 𝕜 E\n⊢ ∀ (a b : E), 1 ≤ ‖a - b‖ → 1 ≤ ‖b - a‖\n[PROOFSTEP]\nintro x y hxy\n[GOAL]\ncase symm\n𝕜 : Type u\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁵ : AddCommGroup F'\ninst✝⁴ : Module 𝕜 F'\ninst✝³ : TopologicalSpace F'\ninst✝² : TopologicalAddGroup F'\ninst✝¹ : ContinuousSMul 𝕜 F'\ninst✝ : CompleteSpace 𝕜\nc : 𝕜\nhc : 1 < ‖c‖\nR : ℝ\nhR : ‖c‖ < R\nh : ¬FiniteDimensional 𝕜 E\nx y : E\nhxy : 1 ≤ ‖x - y‖\n⊢ 1 ≤ ‖y - x‖\n[PROOFSTEP]\nrw [← norm_neg]\n[GOAL]\ncase symm\n𝕜 : Type u\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁵ : AddCommGroup F'\ninst✝⁴ : Module 𝕜 F'\ninst✝³ : TopologicalSpace F'\ninst✝² : TopologicalAddGroup F'\ninst✝¹ : ContinuousSMul 𝕜 F'\ninst✝ : CompleteSpace 𝕜\nc : 𝕜\nhc : 1 < ‖c‖\nR : ℝ\nhR : ‖c‖ < R\nh : ¬FiniteDimensional 𝕜 E\nx y : E\nhxy : 1 ≤ ‖x - y‖\n⊢ 1 ≤ ‖-(y - x)‖\n[PROOFSTEP]\nsimpa\n[GOAL]\n𝕜 : Type u\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁵ : AddCommGroup F'\ninst✝⁴ : Module 𝕜 F'\ninst✝³ : TopologicalSpace F'\ninst✝² : TopologicalAddGroup F'\ninst✝¹ : ContinuousSMul 𝕜 F'\ninst✝ : CompleteSpace 𝕜\nc : 𝕜\nhc : 1 < ‖c‖\nR : ℝ\nhR : ‖c‖ < R\nh : ¬FiniteDimensional 𝕜 E\nthis : IsSymm E fun x y => 1 ≤ ‖x - y‖\n⊢ ∃ f, (∀ (n : ℕ), ‖f n‖ ≤ R) ∧ ∀ (m n : ℕ), m ≠ n → 1 ≤ ‖f m - f n‖\n[PROOFSTEP]\napply exists_seq_of_forall_finset_exists' (fun x : E => ‖x‖ ≤ R) fun (x : E) (y : E) => 1 ≤ ‖x - y‖\n[GOAL]\n𝕜 : Type u\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁵ : AddCommGroup F'\ninst✝⁴ : Module 𝕜 F'\ninst✝³ : TopologicalSpace F'\ninst✝² : TopologicalAddGroup F'\ninst✝¹ : ContinuousSMul 𝕜 F'\ninst✝ : CompleteSpace 𝕜\nc : 𝕜\nhc : 1 < ‖c‖\nR : ℝ\nhR : ‖c‖ < R\nh : ¬FiniteDimensional 𝕜 E\nthis : IsSymm E fun x y => 1 ≤ ‖x - y‖\n⊢ ∀ (s : Finset E), (∀ (x : E), x ∈ s → ‖x‖ ≤ R) → ∃ y, ‖y‖ ≤ R ∧ ∀ (x : E), x ∈ s → 1 ≤ ‖x - y‖\n[PROOFSTEP]\nrintro s -\n[GOAL]\n𝕜 : Type u\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁵ : AddCommGroup F'\ninst✝⁴ : Module 𝕜 F'\ninst✝³ : TopologicalSpace F'\ninst✝² : TopologicalAddGroup F'\ninst✝¹ : ContinuousSMul 𝕜 F'\ninst✝ : CompleteSpace 𝕜\nc : 𝕜\nhc : 1 < ‖c‖\nR : ℝ\nhR : ‖c‖ < R\nh : ¬FiniteDimensional 𝕜 E\nthis : IsSymm E fun x y => 1 ≤ ‖x - y‖\ns : Finset E\n⊢ ∃ y, ‖y‖ ≤ R ∧ ∀ (x : E), x ∈ s → 1 ≤ ‖x - y‖\n[PROOFSTEP]\nexact exists_norm_le_le_norm_sub_of_finset hc hR h s\n[GOAL]\n𝕜 : Type u\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁵ : AddCommGroup F'\ninst✝⁴ : Module 𝕜 F'\ninst✝³ : TopologicalSpace F'\ninst✝² : TopologicalAddGroup F'\ninst✝¹ : ContinuousSMul 𝕜 F'\ninst✝ : CompleteSpace 𝕜\nh : ¬FiniteDimensional 𝕜 E\n⊢ ∃ R f, 1 < R ∧ (∀ (n : ℕ), ‖f n‖ ≤ R) ∧ ∀ (m n : ℕ), m ≠ n → 1 ≤ ‖f m - f n‖\n[PROOFSTEP]\nobtain ⟨c, hc⟩ : ∃ c : 𝕜, 1 < ‖c‖ := NormedField.exists_one_lt_norm 𝕜\n[GOAL]\ncase intro\n𝕜 : Type u\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁵ : AddCommGroup F'\ninst✝⁴ : Module 𝕜 F'\ninst✝³ : TopologicalSpace F'\ninst✝² : TopologicalAddGroup F'\ninst✝¹ : ContinuousSMul 𝕜 F'\ninst✝ : CompleteSpace 𝕜\nh : ¬FiniteDimensional 𝕜 E\nc : 𝕜\nhc : 1 < ‖c‖\n⊢ ∃ R f, 1 < R ∧ (∀ (n : ℕ), ‖f n‖ ≤ R) ∧ ∀ (m n : ℕ), m ≠ n → 1 ≤ ‖f m - f n‖\n[PROOFSTEP]\nhave A : ‖c‖ < ‖c‖ + 1 := by linarith\n[GOAL]\n𝕜 : Type u\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁵ : AddCommGroup F'\ninst✝⁴ : Module 𝕜 F'\ninst✝³ : TopologicalSpace F'\ninst✝² : TopologicalAddGroup F'\ninst✝¹ : ContinuousSMul 𝕜 F'\ninst✝ : CompleteSpace 𝕜\nh : ¬FiniteDimensional 𝕜 E\nc : 𝕜\nhc : 1 < ‖c‖\n⊢ ‖c‖ < ‖c‖ + 1\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase intro\n𝕜 : Type u\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁵ : AddCommGroup F'\ninst✝⁴ : Module 𝕜 F'\ninst✝³ : TopologicalSpace F'\ninst✝² : TopologicalAddGroup F'\ninst✝¹ : ContinuousSMul 𝕜 F'\ninst✝ : CompleteSpace 𝕜\nh : ¬FiniteDimensional 𝕜 E\nc : 𝕜\nhc : 1 < ‖c‖\nA : ‖c‖ < ‖c‖ + 1\n⊢ ∃ R f, 1 < R ∧ (∀ (n : ℕ), ‖f n‖ ≤ R) ∧ ∀ (m n : ℕ), m ≠ n → 1 ≤ ‖f m - f n‖\n[PROOFSTEP]\nrcases exists_seq_norm_le_one_le_norm_sub' hc A h with ⟨f, hf⟩\n[GOAL]\ncase intro.intro\n𝕜 : Type u\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁵ : AddCommGroup F'\ninst✝⁴ : Module 𝕜 F'\ninst✝³ : TopologicalSpace F'\ninst✝² : TopologicalAddGroup F'\ninst✝¹ : ContinuousSMul 𝕜 F'\ninst✝ : CompleteSpace 𝕜\nh : ¬FiniteDimensional 𝕜 E\nc : 𝕜\nhc : 1 < ‖c‖\nA : ‖c‖ < ‖c‖ + 1\nf : ℕ → E\nhf : (∀ (n : ℕ), ‖f n‖ ≤ ‖c‖ + 1) ∧ ∀ (m n : ℕ), m ≠ n → 1 ≤ ‖f m - f n‖\n⊢ ∃ R f, 1 < R ∧ (∀ (n : ℕ), ‖f n‖ ≤ R) ∧ ∀ (m n : ℕ), m ≠ n → 1 ≤ ‖f m - f n‖\n[PROOFSTEP]\nexact ⟨‖c‖ + 1, f, hc.trans A, hf.1, hf.2⟩\n[GOAL]\n𝕜 : Type u\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁵ : AddCommGroup F'\ninst✝⁴ : Module 𝕜 F'\ninst✝³ : TopologicalSpace F'\ninst✝² : TopologicalAddGroup F'\ninst✝¹ : ContinuousSMul 𝕜 F'\ninst✝ : CompleteSpace 𝕜\nr : ℝ\nrpos : 0 < r\nh : IsCompact (Metric.closedBall 0 r)\n⊢ FiniteDimensional 𝕜 E\n[PROOFSTEP]\nby_contra hfin\n[GOAL]\n𝕜 : Type u\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁵ : AddCommGroup F'\ninst✝⁴ : Module 𝕜 F'\ninst✝³ : TopologicalSpace F'\ninst✝² : TopologicalAddGroup F'\ninst✝¹ : ContinuousSMul 𝕜 F'\ninst✝ : CompleteSpace 𝕜\nr : ℝ\nrpos : 0 < r\nh : IsCompact (Metric.closedBall 0 r)\nhfin : ¬FiniteDimensional 𝕜 E\n⊢ False\n[PROOFSTEP]\nobtain ⟨R, f, Rgt, fle, lef⟩ : ∃ (R : ℝ) (f : ℕ → E), 1 < R ∧ (∀ n, ‖f n‖ ≤ R) ∧ ∀ m n, m ≠ n → 1 ≤ ‖f m - f n‖ :=\n  exists_seq_norm_le_one_le_norm_sub hfin\n[GOAL]\ncase intro.intro.intro.intro\n𝕜 : Type u\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁵ : AddCommGroup F'\ninst✝⁴ : Module 𝕜 F'\ninst✝³ : TopologicalSpace F'\ninst✝² : TopologicalAddGroup F'\ninst✝¹ : ContinuousSMul 𝕜 F'\ninst✝ : CompleteSpace 𝕜\nr : ℝ\nrpos : 0 < r\nh : IsCompact (Metric.closedBall 0 r)\nhfin : ¬FiniteDimensional 𝕜 E\nR : ℝ\nf : ℕ → E\nRgt : 1 < R\nfle : ∀ (n : ℕ), ‖f n‖ ≤ R\nlef : ∀ (m n : ℕ), m ≠ n → 1 ≤ ‖f m - f n‖\n⊢ False\n[PROOFSTEP]\nhave rRpos : 0 < r / R := div_pos rpos (zero_lt_one.trans Rgt)\n[GOAL]\ncase intro.intro.intro.intro\n𝕜 : Type u\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁵ : AddCommGroup F'\ninst✝⁴ : Module 𝕜 F'\ninst✝³ : TopologicalSpace F'\ninst✝² : TopologicalAddGroup F'\ninst✝¹ : ContinuousSMul 𝕜 F'\ninst✝ : CompleteSpace 𝕜\nr : ℝ\nrpos : 0 < r\nh : IsCompact (Metric.closedBall 0 r)\nhfin : ¬FiniteDimensional 𝕜 E\nR : ℝ\nf : ℕ → E\nRgt : 1 < R\nfle : ∀ (n : ℕ), ‖f n‖ ≤ R\nlef : ∀ (m n : ℕ), m ≠ n → 1 ≤ ‖f m - f n‖\nrRpos : 0 < r / R\n⊢ False\n[PROOFSTEP]\nobtain ⟨c, hc⟩ : ∃ c : 𝕜, 0 < ‖c‖ ∧ ‖c‖ < r / R := NormedField.exists_norm_lt _ rRpos\n[GOAL]\ncase intro.intro.intro.intro.intro\n𝕜 : Type u\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁵ : AddCommGroup F'\ninst✝⁴ : Module 𝕜 F'\ninst✝³ : TopologicalSpace F'\ninst✝² : TopologicalAddGroup F'\ninst✝¹ : ContinuousSMul 𝕜 F'\ninst✝ : CompleteSpace 𝕜\nr : ℝ\nrpos : 0 < r\nh : IsCompact (Metric.closedBall 0 r)\nhfin : ¬FiniteDimensional 𝕜 E\nR : ℝ\nf : ℕ → E\nRgt : 1 < R\nfle : ∀ (n : ℕ), ‖f n‖ ≤ R\nlef : ∀ (m n : ℕ), m ≠ n → 1 ≤ ‖f m - f n‖\nrRpos : 0 < r / R\nc : 𝕜\nhc : 0 < ‖c‖ ∧ ‖c‖ < r / R\n⊢ False\n[PROOFSTEP]\nlet g := fun n : ℕ => c • f n\n[GOAL]\ncase intro.intro.intro.intro.intro\n𝕜 : Type u\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁵ : AddCommGroup F'\ninst✝⁴ : Module 𝕜 F'\ninst✝³ : TopologicalSpace F'\ninst✝² : TopologicalAddGroup F'\ninst✝¹ : ContinuousSMul 𝕜 F'\ninst✝ : CompleteSpace 𝕜\nr : ℝ\nrpos : 0 < r\nh : IsCompact (Metric.closedBall 0 r)\nhfin : ¬FiniteDimensional 𝕜 E\nR : ℝ\nf : ℕ → E\nRgt : 1 < R\nfle : ∀ (n : ℕ), ‖f n‖ ≤ R\nlef : ∀ (m n : ℕ), m ≠ n → 1 ≤ ‖f m - f n‖\nrRpos : 0 < r / R\nc : 𝕜\nhc : 0 < ‖c‖ ∧ ‖c‖ < r / R\ng : ℕ → E := fun n => c • f n\n⊢ False\n[PROOFSTEP]\nhave A : ∀ n, g n ∈ Metric.closedBall (0 : E) r := by\n  intro n\n  simp only [norm_smul, dist_zero_right, Metric.mem_closedBall]\n  calc\n    ‖c‖ * ‖f n‖ ≤ r / R * R := by gcongr; exact hc.2.le; apply fle\n    _ = r := by\n      field_simp [(zero_lt_one.trans Rgt).ne']\n        -- Porting note: moved type ascriptions because of exists_prop changes\n[GOAL]\n𝕜 : Type u\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁵ : AddCommGroup F'\ninst✝⁴ : Module 𝕜 F'\ninst✝³ : TopologicalSpace F'\ninst✝² : TopologicalAddGroup F'\ninst✝¹ : ContinuousSMul 𝕜 F'\ninst✝ : CompleteSpace 𝕜\nr : ℝ\nrpos : 0 < r\nh : IsCompact (Metric.closedBall 0 r)\nhfin : ¬FiniteDimensional 𝕜 E\nR : ℝ\nf : ℕ → E\nRgt : 1 < R\nfle : ∀ (n : ℕ), ‖f n‖ ≤ R\nlef : ∀ (m n : ℕ), m ≠ n → 1 ≤ ‖f m - f n‖\nrRpos : 0 < r / R\nc : 𝕜\nhc : 0 < ‖c‖ ∧ ‖c‖ < r / R\ng : ℕ → E := fun n => c • f n\n⊢ ∀ (n : ℕ), g n ∈ Metric.closedBall 0 r\n[PROOFSTEP]\nintro n\n[GOAL]\n𝕜 : Type u\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁵ : AddCommGroup F'\ninst✝⁴ : Module 𝕜 F'\ninst✝³ : TopologicalSpace F'\ninst✝² : TopologicalAddGroup F'\ninst✝¹ : ContinuousSMul 𝕜 F'\ninst✝ : CompleteSpace 𝕜\nr : ℝ\nrpos : 0 < r\nh : IsCompact (Metric.closedBall 0 r)\nhfin : ¬FiniteDimensional 𝕜 E\nR : ℝ\nf : ℕ → E\nRgt : 1 < R\nfle : ∀ (n : ℕ), ‖f n‖ ≤ R\nlef : ∀ (m n : ℕ), m ≠ n → 1 ≤ ‖f m - f n‖\nrRpos : 0 < r / R\nc : 𝕜\nhc : 0 < ‖c‖ ∧ ‖c‖ < r / R\ng : ℕ → E := fun n => c • f n\nn : ℕ\n⊢ g n ∈ Metric.closedBall 0 r\n[PROOFSTEP]\nsimp only [norm_smul, dist_zero_right, Metric.mem_closedBall]\n[GOAL]\n𝕜 : Type u\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁵ : AddCommGroup F'\ninst✝⁴ : Module 𝕜 F'\ninst✝³ : TopologicalSpace F'\ninst✝² : TopologicalAddGroup F'\ninst✝¹ : ContinuousSMul 𝕜 F'\ninst✝ : CompleteSpace 𝕜\nr : ℝ\nrpos : 0 < r\nh : IsCompact (Metric.closedBall 0 r)\nhfin : ¬FiniteDimensional 𝕜 E\nR : ℝ\nf : ℕ → E\nRgt : 1 < R\nfle : ∀ (n : ℕ), ‖f n‖ ≤ R\nlef : ∀ (m n : ℕ), m ≠ n → 1 ≤ ‖f m - f n‖\nrRpos : 0 < r / R\nc : 𝕜\nhc : 0 < ‖c‖ ∧ ‖c‖ < r / R\ng : ℕ → E := fun n => c • f n\nn : ℕ\n⊢ ‖c‖ * ‖f n‖ ≤ r\n[PROOFSTEP]\ncalc\n  ‖c‖ * ‖f n‖ ≤ r / R * R := by gcongr; exact hc.2.le; apply fle\n  _ = r := by\n    field_simp [(zero_lt_one.trans Rgt).ne']\n      -- Porting note: moved type ascriptions because of exists_prop changes\n[GOAL]\n𝕜 : Type u\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁵ : AddCommGroup F'\ninst✝⁴ : Module 𝕜 F'\ninst✝³ : TopologicalSpace F'\ninst✝² : TopologicalAddGroup F'\ninst✝¹ : ContinuousSMul 𝕜 F'\ninst✝ : CompleteSpace 𝕜\nr : ℝ\nrpos : 0 < r\nh : IsCompact (Metric.closedBall 0 r)\nhfin : ¬FiniteDimensional 𝕜 E\nR : ℝ\nf : ℕ → E\nRgt : 1 < R\nfle : ∀ (n : ℕ), ‖f n‖ ≤ R\nlef : ∀ (m n : ℕ), m ≠ n → 1 ≤ ‖f m - f n‖\nrRpos : 0 < r / R\nc : 𝕜\nhc : 0 < ‖c‖ ∧ ‖c‖ < r / R\ng : ℕ → E := fun n => c • f n\nn : ℕ\n⊢ ‖c‖ * ‖f n‖ ≤ r / R * R\n[PROOFSTEP]\ngcongr\n[GOAL]\ncase h₁\n𝕜 : Type u\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁵ : AddCommGroup F'\ninst✝⁴ : Module 𝕜 F'\ninst✝³ : TopologicalSpace F'\ninst✝² : TopologicalAddGroup F'\ninst✝¹ : ContinuousSMul 𝕜 F'\ninst✝ : CompleteSpace 𝕜\nr : ℝ\nrpos : 0 < r\nh : IsCompact (Metric.closedBall 0 r)\nhfin : ¬FiniteDimensional 𝕜 E\nR : ℝ\nf : ℕ → E\nRgt : 1 < R\nfle : ∀ (n : ℕ), ‖f n‖ ≤ R\nlef : ∀ (m n : ℕ), m ≠ n → 1 ≤ ‖f m - f n‖\nrRpos : 0 < r / R\nc : 𝕜\nhc : 0 < ‖c‖ ∧ ‖c‖ < r / R\ng : ℕ → E := fun n => c • f n\nn : ℕ\n⊢ ‖c‖ ≤ r / R\ncase h₂\n𝕜 : Type u\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁵ : AddCommGroup F'\ninst✝⁴ : Module 𝕜 F'\ninst✝³ : TopologicalSpace F'\ninst✝² : TopologicalAddGroup F'\ninst✝¹ : ContinuousSMul 𝕜 F'\ninst✝ : CompleteSpace 𝕜\nr : ℝ\nrpos : 0 < r\nh : IsCompact (Metric.closedBall 0 r)\nhfin : ¬FiniteDimensional 𝕜 E\nR : ℝ\nf : ℕ → E\nRgt : 1 < R\nfle : ∀ (n : ℕ), ‖f n‖ ≤ R\nlef : ∀ (m n : ℕ), m ≠ n → 1 ≤ ‖f m - f n‖\nrRpos : 0 < r / R\nc : 𝕜\nhc : 0 < ‖c‖ ∧ ‖c‖ < r / R\ng : ℕ → E := fun n => c • f n\nn : ℕ\n⊢ ‖f n‖ ≤ R\n[PROOFSTEP]\nexact hc.2.le\n[GOAL]\ncase h₂\n𝕜 : Type u\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁵ : AddCommGroup F'\ninst✝⁴ : Module 𝕜 F'\ninst✝³ : TopologicalSpace F'\ninst✝² : TopologicalAddGroup F'\ninst✝¹ : ContinuousSMul 𝕜 F'\ninst✝ : CompleteSpace 𝕜\nr : ℝ\nrpos : 0 < r\nh : IsCompact (Metric.closedBall 0 r)\nhfin : ¬FiniteDimensional 𝕜 E\nR : ℝ\nf : ℕ → E\nRgt : 1 < R\nfle : ∀ (n : ℕ), ‖f n‖ ≤ R\nlef : ∀ (m n : ℕ), m ≠ n → 1 ≤ ‖f m - f n‖\nrRpos : 0 < r / R\nc : 𝕜\nhc : 0 < ‖c‖ ∧ ‖c‖ < r / R\ng : ℕ → E := fun n => c • f n\nn : ℕ\n⊢ ‖f n‖ ≤ R\n[PROOFSTEP]\napply fle\n[GOAL]\n𝕜 : Type u\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁵ : AddCommGroup F'\ninst✝⁴ : Module 𝕜 F'\ninst✝³ : TopologicalSpace F'\ninst✝² : TopologicalAddGroup F'\ninst✝¹ : ContinuousSMul 𝕜 F'\ninst✝ : CompleteSpace 𝕜\nr : ℝ\nrpos : 0 < r\nh : IsCompact (Metric.closedBall 0 r)\nhfin : ¬FiniteDimensional 𝕜 E\nR : ℝ\nf : ℕ → E\nRgt : 1 < R\nfle : ∀ (n : ℕ), ‖f n‖ ≤ R\nlef : ∀ (m n : ℕ), m ≠ n → 1 ≤ ‖f m - f n‖\nrRpos : 0 < r / R\nc : 𝕜\nhc : 0 < ‖c‖ ∧ ‖c‖ < r / R\ng : ℕ → E := fun n => c • f n\nn : ℕ\n⊢ r / R * R = r\n[PROOFSTEP]\nfield_simp [(zero_lt_one.trans Rgt).ne']\n  -- Porting note: moved type ascriptions because of exists_prop changes\n[GOAL]\ncase intro.intro.intro.intro.intro\n𝕜 : Type u\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁵ : AddCommGroup F'\ninst✝⁴ : Module 𝕜 F'\ninst✝³ : TopologicalSpace F'\ninst✝² : TopologicalAddGroup F'\ninst✝¹ : ContinuousSMul 𝕜 F'\ninst✝ : CompleteSpace 𝕜\nr : ℝ\nrpos : 0 < r\nh : IsCompact (Metric.closedBall 0 r)\nhfin : ¬FiniteDimensional 𝕜 E\nR : ℝ\nf : ℕ → E\nRgt : 1 < R\nfle : ∀ (n : ℕ), ‖f n‖ ≤ R\nlef : ∀ (m n : ℕ), m ≠ n → 1 ≤ ‖f m - f n‖\nrRpos : 0 < r / R\nc : 𝕜\nhc : 0 < ‖c‖ ∧ ‖c‖ < r / R\ng : ℕ → E := fun n => c • f n\nA : ∀ (n : ℕ), g n ∈ Metric.closedBall 0 r\n⊢ False\n[PROOFSTEP]\nobtain\n  ⟨x : E, _ : x ∈ Metric.closedBall (0 : E) r, φ : ℕ → ℕ, φmono : StrictMono φ, φlim : Tendsto (g ∘ φ) atTop (𝓝 x)⟩ :=\n  h.tendsto_subseq A\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro\n𝕜 : Type u\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁵ : AddCommGroup F'\ninst✝⁴ : Module 𝕜 F'\ninst✝³ : TopologicalSpace F'\ninst✝² : TopologicalAddGroup F'\ninst✝¹ : ContinuousSMul 𝕜 F'\ninst✝ : CompleteSpace 𝕜\nr : ℝ\nrpos : 0 < r\nh : IsCompact (Metric.closedBall 0 r)\nhfin : ¬FiniteDimensional 𝕜 E\nR : ℝ\nf : ℕ → E\nRgt : 1 < R\nfle : ∀ (n : ℕ), ‖f n‖ ≤ R\nlef : ∀ (m n : ℕ), m ≠ n → 1 ≤ ‖f m - f n‖\nrRpos : 0 < r / R\nc : 𝕜\nhc : 0 < ‖c‖ ∧ ‖c‖ < r / R\ng : ℕ → E := fun n => c • f n\nA : ∀ (n : ℕ), g n ∈ Metric.closedBall 0 r\nx : E\nleft✝ : x ∈ Metric.closedBall 0 r\nφ : ℕ → ℕ\nφmono : StrictMono φ\nφlim : Tendsto (g ∘ φ) atTop (𝓝 x)\n⊢ False\n[PROOFSTEP]\nhave B : CauchySeq (g ∘ φ) := φlim.cauchySeq\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro\n𝕜 : Type u\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁵ : AddCommGroup F'\ninst✝⁴ : Module 𝕜 F'\ninst✝³ : TopologicalSpace F'\ninst✝² : TopologicalAddGroup F'\ninst✝¹ : ContinuousSMul 𝕜 F'\ninst✝ : CompleteSpace 𝕜\nr : ℝ\nrpos : 0 < r\nh : IsCompact (Metric.closedBall 0 r)\nhfin : ¬FiniteDimensional 𝕜 E\nR : ℝ\nf : ℕ → E\nRgt : 1 < R\nfle : ∀ (n : ℕ), ‖f n‖ ≤ R\nlef : ∀ (m n : ℕ), m ≠ n → 1 ≤ ‖f m - f n‖\nrRpos : 0 < r / R\nc : 𝕜\nhc : 0 < ‖c‖ ∧ ‖c‖ < r / R\ng : ℕ → E := fun n => c • f n\nA : ∀ (n : ℕ), g n ∈ Metric.closedBall 0 r\nx : E\nleft✝ : x ∈ Metric.closedBall 0 r\nφ : ℕ → ℕ\nφmono : StrictMono φ\nφlim : Tendsto (g ∘ φ) atTop (𝓝 x)\nB : CauchySeq (g ∘ φ)\n⊢ False\n[PROOFSTEP]\nobtain ⟨N, hN⟩ : ∃ N : ℕ, ∀ n : ℕ, N ≤ n → dist ((g ∘ φ) n) ((g ∘ φ) N) < ‖c‖ := Metric.cauchySeq_iff'.1 B ‖c‖ hc.1\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\n𝕜 : Type u\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁵ : AddCommGroup F'\ninst✝⁴ : Module 𝕜 F'\ninst✝³ : TopologicalSpace F'\ninst✝² : TopologicalAddGroup F'\ninst✝¹ : ContinuousSMul 𝕜 F'\ninst✝ : CompleteSpace 𝕜\nr : ℝ\nrpos : 0 < r\nh : IsCompact (Metric.closedBall 0 r)\nhfin : ¬FiniteDimensional 𝕜 E\nR : ℝ\nf : ℕ → E\nRgt : 1 < R\nfle : ∀ (n : ℕ), ‖f n‖ ≤ R\nlef : ∀ (m n : ℕ), m ≠ n → 1 ≤ ‖f m - f n‖\nrRpos : 0 < r / R\nc : 𝕜\nhc : 0 < ‖c‖ ∧ ‖c‖ < r / R\ng : ℕ → E := fun n => c • f n\nA : ∀ (n : ℕ), g n ∈ Metric.closedBall 0 r\nx : E\nleft✝ : x ∈ Metric.closedBall 0 r\nφ : ℕ → ℕ\nφmono : StrictMono φ\nφlim : Tendsto (g ∘ φ) atTop (𝓝 x)\nB : CauchySeq (g ∘ φ)\nN : ℕ\nhN : ∀ (n : ℕ), N ≤ n → dist ((g ∘ φ) n) ((g ∘ φ) N) < ‖c‖\n⊢ False\n[PROOFSTEP]\napply lt_irrefl ‖c‖\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\n𝕜 : Type u\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁵ : AddCommGroup F'\ninst✝⁴ : Module 𝕜 F'\ninst✝³ : TopologicalSpace F'\ninst✝² : TopologicalAddGroup F'\ninst✝¹ : ContinuousSMul 𝕜 F'\ninst✝ : CompleteSpace 𝕜\nr : ℝ\nrpos : 0 < r\nh : IsCompact (Metric.closedBall 0 r)\nhfin : ¬FiniteDimensional 𝕜 E\nR : ℝ\nf : ℕ → E\nRgt : 1 < R\nfle : ∀ (n : ℕ), ‖f n‖ ≤ R\nlef : ∀ (m n : ℕ), m ≠ n → 1 ≤ ‖f m - f n‖\nrRpos : 0 < r / R\nc : 𝕜\nhc : 0 < ‖c‖ ∧ ‖c‖ < r / R\ng : ℕ → E := fun n => c • f n\nA : ∀ (n : ℕ), g n ∈ Metric.closedBall 0 r\nx : E\nleft✝ : x ∈ Metric.closedBall 0 r\nφ : ℕ → ℕ\nφmono : StrictMono φ\nφlim : Tendsto (g ∘ φ) atTop (𝓝 x)\nB : CauchySeq (g ∘ φ)\nN : ℕ\nhN : ∀ (n : ℕ), N ≤ n → dist ((g ∘ φ) n) ((g ∘ φ) N) < ‖c‖\n⊢ ‖c‖ < ‖c‖\n[PROOFSTEP]\ncalc\n  ‖c‖ ≤ dist (g (φ (N + 1))) (g (φ N)) := by\n    conv_lhs => rw [← mul_one ‖c‖]\n    simp only [dist_eq_norm, ← smul_sub, norm_smul]\n    gcongr\n    apply lef _ _ (ne_of_gt _)\n    exact φmono (Nat.lt_succ_self N)\n  _ < ‖c‖ := hN (N + 1) (Nat.le_succ N)\n[GOAL]\n𝕜 : Type u\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁵ : AddCommGroup F'\ninst✝⁴ : Module 𝕜 F'\ninst✝³ : TopologicalSpace F'\ninst✝² : TopologicalAddGroup F'\ninst✝¹ : ContinuousSMul 𝕜 F'\ninst✝ : CompleteSpace 𝕜\nr : ℝ\nrpos : 0 < r\nh : IsCompact (Metric.closedBall 0 r)\nhfin : ¬FiniteDimensional 𝕜 E\nR : ℝ\nf : ℕ → E\nRgt : 1 < R\nfle : ∀ (n : ℕ), ‖f n‖ ≤ R\nlef : ∀ (m n : ℕ), m ≠ n → 1 ≤ ‖f m - f n‖\nrRpos : 0 < r / R\nc : 𝕜\nhc : 0 < ‖c‖ ∧ ‖c‖ < r / R\ng : ℕ → E := fun n => c • f n\nA : ∀ (n : ℕ), g n ∈ Metric.closedBall 0 r\nx : E\nleft✝ : x ∈ Metric.closedBall 0 r\nφ : ℕ → ℕ\nφmono : StrictMono φ\nφlim : Tendsto (g ∘ φ) atTop (𝓝 x)\nB : CauchySeq (g ∘ φ)\nN : ℕ\nhN : ∀ (n : ℕ), N ≤ n → dist ((g ∘ φ) n) ((g ∘ φ) N) < ‖c‖\n⊢ ‖c‖ ≤ dist (g (φ (N + 1))) (g (φ N))\n[PROOFSTEP]\nconv_lhs => rw [← mul_one ‖c‖]\n[GOAL]\n𝕜 : Type u\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁵ : AddCommGroup F'\ninst✝⁴ : Module 𝕜 F'\ninst✝³ : TopologicalSpace F'\ninst✝² : TopologicalAddGroup F'\ninst✝¹ : ContinuousSMul 𝕜 F'\ninst✝ : CompleteSpace 𝕜\nr : ℝ\nrpos : 0 < r\nh : IsCompact (Metric.closedBall 0 r)\nhfin : ¬FiniteDimensional 𝕜 E\nR : ℝ\nf : ℕ → E\nRgt : 1 < R\nfle : ∀ (n : ℕ), ‖f n‖ ≤ R\nlef : ∀ (m n : ℕ), m ≠ n → 1 ≤ ‖f m - f n‖\nrRpos : 0 < r / R\nc : 𝕜\nhc : 0 < ‖c‖ ∧ ‖c‖ < r / R\ng : ℕ → E := fun n => c • f n\nA : ∀ (n : ℕ), g n ∈ Metric.closedBall 0 r\nx : E\nleft✝ : x ∈ Metric.closedBall 0 r\nφ : ℕ → ℕ\nφmono : StrictMono φ\nφlim : Tendsto (g ∘ φ) atTop (𝓝 x)\nB : CauchySeq (g ∘ φ)\nN : ℕ\nhN : ∀ (n : ℕ), N ≤ n → dist ((g ∘ φ) n) ((g ∘ φ) N) < ‖c‖\n| ‖c‖\n[PROOFSTEP]\nrw [← mul_one ‖c‖]\n[GOAL]\n𝕜 : Type u\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁵ : AddCommGroup F'\ninst✝⁴ : Module 𝕜 F'\ninst✝³ : TopologicalSpace F'\ninst✝² : TopologicalAddGroup F'\ninst✝¹ : ContinuousSMul 𝕜 F'\ninst✝ : CompleteSpace 𝕜\nr : ℝ\nrpos : 0 < r\nh : IsCompact (Metric.closedBall 0 r)\nhfin : ¬FiniteDimensional 𝕜 E\nR : ℝ\nf : ℕ → E\nRgt : 1 < R\nfle : ∀ (n : ℕ), ‖f n‖ ≤ R\nlef : ∀ (m n : ℕ), m ≠ n → 1 ≤ ‖f m - f n‖\nrRpos : 0 < r / R\nc : 𝕜\nhc : 0 < ‖c‖ ∧ ‖c‖ < r / R\ng : ℕ → E := fun n => c • f n\nA : ∀ (n : ℕ), g n ∈ Metric.closedBall 0 r\nx : E\nleft✝ : x ∈ Metric.closedBall 0 r\nφ : ℕ → ℕ\nφmono : StrictMono φ\nφlim : Tendsto (g ∘ φ) atTop (𝓝 x)\nB : CauchySeq (g ∘ φ)\nN : ℕ\nhN : ∀ (n : ℕ), N ≤ n → dist ((g ∘ φ) n) ((g ∘ φ) N) < ‖c‖\n| ‖c‖\n[PROOFSTEP]\nrw [← mul_one ‖c‖]\n[GOAL]\n𝕜 : Type u\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁵ : AddCommGroup F'\ninst✝⁴ : Module 𝕜 F'\ninst✝³ : TopologicalSpace F'\ninst✝² : TopologicalAddGroup F'\ninst✝¹ : ContinuousSMul 𝕜 F'\ninst✝ : CompleteSpace 𝕜\nr : ℝ\nrpos : 0 < r\nh : IsCompact (Metric.closedBall 0 r)\nhfin : ¬FiniteDimensional 𝕜 E\nR : ℝ\nf : ℕ → E\nRgt : 1 < R\nfle : ∀ (n : ℕ), ‖f n‖ ≤ R\nlef : ∀ (m n : ℕ), m ≠ n → 1 ≤ ‖f m - f n‖\nrRpos : 0 < r / R\nc : 𝕜\nhc : 0 < ‖c‖ ∧ ‖c‖ < r / R\ng : ℕ → E := fun n => c • f n\nA : ∀ (n : ℕ), g n ∈ Metric.closedBall 0 r\nx : E\nleft✝ : x ∈ Metric.closedBall 0 r\nφ : ℕ → ℕ\nφmono : StrictMono φ\nφlim : Tendsto (g ∘ φ) atTop (𝓝 x)\nB : CauchySeq (g ∘ φ)\nN : ℕ\nhN : ∀ (n : ℕ), N ≤ n → dist ((g ∘ φ) n) ((g ∘ φ) N) < ‖c‖\n| ‖c‖\n[PROOFSTEP]\nrw [← mul_one ‖c‖]\n[GOAL]\n𝕜 : Type u\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁵ : AddCommGroup F'\ninst✝⁴ : Module 𝕜 F'\ninst✝³ : TopologicalSpace F'\ninst✝² : TopologicalAddGroup F'\ninst✝¹ : ContinuousSMul 𝕜 F'\ninst✝ : CompleteSpace 𝕜\nr : ℝ\nrpos : 0 < r\nh : IsCompact (Metric.closedBall 0 r)\nhfin : ¬FiniteDimensional 𝕜 E\nR : ℝ\nf : ℕ → E\nRgt : 1 < R\nfle : ∀ (n : ℕ), ‖f n‖ ≤ R\nlef : ∀ (m n : ℕ), m ≠ n → 1 ≤ ‖f m - f n‖\nrRpos : 0 < r / R\nc : 𝕜\nhc : 0 < ‖c‖ ∧ ‖c‖ < r / R\ng : ℕ → E := fun n => c • f n\nA : ∀ (n : ℕ), g n ∈ Metric.closedBall 0 r\nx : E\nleft✝ : x ∈ Metric.closedBall 0 r\nφ : ℕ → ℕ\nφmono : StrictMono φ\nφlim : Tendsto (g ∘ φ) atTop (𝓝 x)\nB : CauchySeq (g ∘ φ)\nN : ℕ\nhN : ∀ (n : ℕ), N ≤ n → dist ((g ∘ φ) n) ((g ∘ φ) N) < ‖c‖\n⊢ ‖c‖ * 1 ≤ dist (g (φ (N + 1))) (g (φ N))\n[PROOFSTEP]\nsimp only [dist_eq_norm, ← smul_sub, norm_smul]\n[GOAL]\n𝕜 : Type u\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁵ : AddCommGroup F'\ninst✝⁴ : Module 𝕜 F'\ninst✝³ : TopologicalSpace F'\ninst✝² : TopologicalAddGroup F'\ninst✝¹ : ContinuousSMul 𝕜 F'\ninst✝ : CompleteSpace 𝕜\nr : ℝ\nrpos : 0 < r\nh : IsCompact (Metric.closedBall 0 r)\nhfin : ¬FiniteDimensional 𝕜 E\nR : ℝ\nf : ℕ → E\nRgt : 1 < R\nfle : ∀ (n : ℕ), ‖f n‖ ≤ R\nlef : ∀ (m n : ℕ), m ≠ n → 1 ≤ ‖f m - f n‖\nrRpos : 0 < r / R\nc : 𝕜\nhc : 0 < ‖c‖ ∧ ‖c‖ < r / R\ng : ℕ → E := fun n => c • f n\nA : ∀ (n : ℕ), g n ∈ Metric.closedBall 0 r\nx : E\nleft✝ : x ∈ Metric.closedBall 0 r\nφ : ℕ → ℕ\nφmono : StrictMono φ\nφlim : Tendsto (g ∘ φ) atTop (𝓝 x)\nB : CauchySeq (g ∘ φ)\nN : ℕ\nhN : ∀ (n : ℕ), N ≤ n → dist ((g ∘ φ) n) ((g ∘ φ) N) < ‖c‖\n⊢ ‖c‖ * 1 ≤ ‖c‖ * ‖f (φ (N + 1)) - f (φ N)‖\n[PROOFSTEP]\ngcongr\n[GOAL]\ncase h\n𝕜 : Type u\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁵ : AddCommGroup F'\ninst✝⁴ : Module 𝕜 F'\ninst✝³ : TopologicalSpace F'\ninst✝² : TopologicalAddGroup F'\ninst✝¹ : ContinuousSMul 𝕜 F'\ninst✝ : CompleteSpace 𝕜\nr : ℝ\nrpos : 0 < r\nh : IsCompact (Metric.closedBall 0 r)\nhfin : ¬FiniteDimensional 𝕜 E\nR : ℝ\nf : ℕ → E\nRgt : 1 < R\nfle : ∀ (n : ℕ), ‖f n‖ ≤ R\nlef : ∀ (m n : ℕ), m ≠ n → 1 ≤ ‖f m - f n‖\nrRpos : 0 < r / R\nc : 𝕜\nhc : 0 < ‖c‖ ∧ ‖c‖ < r / R\ng : ℕ → E := fun n => c • f n\nA : ∀ (n : ℕ), g n ∈ Metric.closedBall 0 r\nx : E\nleft✝ : x ∈ Metric.closedBall 0 r\nφ : ℕ → ℕ\nφmono : StrictMono φ\nφlim : Tendsto (g ∘ φ) atTop (𝓝 x)\nB : CauchySeq (g ∘ φ)\nN : ℕ\nhN : ∀ (n : ℕ), N ≤ n → dist ((g ∘ φ) n) ((g ∘ φ) N) < ‖c‖\n⊢ 1 ≤ ‖f (φ (N + 1)) - f (φ N)‖\n[PROOFSTEP]\napply lef _ _ (ne_of_gt _)\n[GOAL]\n𝕜 : Type u\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁵ : AddCommGroup F'\ninst✝⁴ : Module 𝕜 F'\ninst✝³ : TopologicalSpace F'\ninst✝² : TopologicalAddGroup F'\ninst✝¹ : ContinuousSMul 𝕜 F'\ninst✝ : CompleteSpace 𝕜\nr : ℝ\nrpos : 0 < r\nh : IsCompact (Metric.closedBall 0 r)\nhfin : ¬FiniteDimensional 𝕜 E\nR : ℝ\nf : ℕ → E\nRgt : 1 < R\nfle : ∀ (n : ℕ), ‖f n‖ ≤ R\nlef : ∀ (m n : ℕ), m ≠ n → 1 ≤ ‖f m - f n‖\nrRpos : 0 < r / R\nc : 𝕜\nhc : 0 < ‖c‖ ∧ ‖c‖ < r / R\ng : ℕ → E := fun n => c • f n\nA : ∀ (n : ℕ), g n ∈ Metric.closedBall 0 r\nx : E\nleft✝ : x ∈ Metric.closedBall 0 r\nφ : ℕ → ℕ\nφmono : StrictMono φ\nφlim : Tendsto (g ∘ φ) atTop (𝓝 x)\nB : CauchySeq (g ∘ φ)\nN : ℕ\nhN : ∀ (n : ℕ), N ≤ n → dist ((g ∘ φ) n) ((g ∘ φ) N) < ‖c‖\n⊢ φ N < φ (N + 1)\n[PROOFSTEP]\nexact φmono (Nat.lt_succ_self N)\n[GOAL]\n𝕜 : Type u\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁵ : AddCommGroup F'\ninst✝⁴ : Module 𝕜 F'\ninst✝³ : TopologicalSpace F'\ninst✝² : TopologicalAddGroup F'\ninst✝¹ : ContinuousSMul 𝕜 F'\ninst✝ : CompleteSpace 𝕜\nr : ℝ\nrpos : 0 < r\nc : E\nh : IsCompact (Metric.closedBall c r)\n⊢ FiniteDimensional 𝕜 E\n[PROOFSTEP]\napply finiteDimensional_of_isCompact_closed_ball₀ 𝕜 rpos\n[GOAL]\n𝕜 : Type u\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁵ : AddCommGroup F'\ninst✝⁴ : Module 𝕜 F'\ninst✝³ : TopologicalSpace F'\ninst✝² : TopologicalAddGroup F'\ninst✝¹ : ContinuousSMul 𝕜 F'\ninst✝ : CompleteSpace 𝕜\nr : ℝ\nrpos : 0 < r\nc : E\nh : IsCompact (Metric.closedBall c r)\n⊢ IsCompact (Metric.closedBall 0 r)\n[PROOFSTEP]\nhave : Continuous fun x => -c + x := continuous_const.add continuous_id\n[GOAL]\n𝕜 : Type u\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁵ : AddCommGroup F'\ninst✝⁴ : Module 𝕜 F'\ninst✝³ : TopologicalSpace F'\ninst✝² : TopologicalAddGroup F'\ninst✝¹ : ContinuousSMul 𝕜 F'\ninst✝ : CompleteSpace 𝕜\nr : ℝ\nrpos : 0 < r\nc : E\nh : IsCompact (Metric.closedBall c r)\nthis : Continuous fun x => -c + x\n⊢ IsCompact (Metric.closedBall 0 r)\n[PROOFSTEP]\nsimpa using h.image this\n[GOAL]\n𝕜 : Type u\ninst✝¹³ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedSpace 𝕜 E\nF : Type w\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁸ : AddCommGroup F'\ninst✝⁷ : Module 𝕜 F'\ninst✝⁶ : TopologicalSpace F'\ninst✝⁵ : TopologicalAddGroup F'\ninst✝⁴ : ContinuousSMul 𝕜 F'\ninst✝³ : CompleteSpace 𝕜\nX : Type u_1\ninst✝² : TopologicalSpace X\ninst✝¹ : One X\ninst✝ : T2Space X\nf : E → X\nhf : HasCompactMulSupport f\nh'f : Continuous f\n⊢ f = 1 ∨ FiniteDimensional 𝕜 E\n[PROOFSTEP]\nby_cases h : ∀ x, f x = 1\n[GOAL]\ncase pos\n𝕜 : Type u\ninst✝¹³ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedSpace 𝕜 E\nF : Type w\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁸ : AddCommGroup F'\ninst✝⁷ : Module 𝕜 F'\ninst✝⁶ : TopologicalSpace F'\ninst✝⁵ : TopologicalAddGroup F'\ninst✝⁴ : ContinuousSMul 𝕜 F'\ninst✝³ : CompleteSpace 𝕜\nX : Type u_1\ninst✝² : TopologicalSpace X\ninst✝¹ : One X\ninst✝ : T2Space X\nf : E → X\nhf : HasCompactMulSupport f\nh'f : Continuous f\nh : ∀ (x : E), f x = 1\n⊢ f = 1 ∨ FiniteDimensional 𝕜 E\n[PROOFSTEP]\napply Or.inl\n[GOAL]\ncase pos.h\n𝕜 : Type u\ninst✝¹³ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedSpace 𝕜 E\nF : Type w\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁸ : AddCommGroup F'\ninst✝⁷ : Module 𝕜 F'\ninst✝⁶ : TopologicalSpace F'\ninst✝⁵ : TopologicalAddGroup F'\ninst✝⁴ : ContinuousSMul 𝕜 F'\ninst✝³ : CompleteSpace 𝕜\nX : Type u_1\ninst✝² : TopologicalSpace X\ninst✝¹ : One X\ninst✝ : T2Space X\nf : E → X\nhf : HasCompactMulSupport f\nh'f : Continuous f\nh : ∀ (x : E), f x = 1\n⊢ f = 1\n[PROOFSTEP]\next x\n[GOAL]\ncase pos.h.h\n𝕜 : Type u\ninst✝¹³ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedSpace 𝕜 E\nF : Type w\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁸ : AddCommGroup F'\ninst✝⁷ : Module 𝕜 F'\ninst✝⁶ : TopologicalSpace F'\ninst✝⁵ : TopologicalAddGroup F'\ninst✝⁴ : ContinuousSMul 𝕜 F'\ninst✝³ : CompleteSpace 𝕜\nX : Type u_1\ninst✝² : TopologicalSpace X\ninst✝¹ : One X\ninst✝ : T2Space X\nf : E → X\nhf : HasCompactMulSupport f\nh'f : Continuous f\nh : ∀ (x : E), f x = 1\nx : E\n⊢ f x = OfNat.ofNat 1 x\n[PROOFSTEP]\nexact h x\n[GOAL]\ncase neg\n𝕜 : Type u\ninst✝¹³ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedSpace 𝕜 E\nF : Type w\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁸ : AddCommGroup F'\ninst✝⁷ : Module 𝕜 F'\ninst✝⁶ : TopologicalSpace F'\ninst✝⁵ : TopologicalAddGroup F'\ninst✝⁴ : ContinuousSMul 𝕜 F'\ninst✝³ : CompleteSpace 𝕜\nX : Type u_1\ninst✝² : TopologicalSpace X\ninst✝¹ : One X\ninst✝ : T2Space X\nf : E → X\nhf : HasCompactMulSupport f\nh'f : Continuous f\nh : ¬∀ (x : E), f x = 1\n⊢ f = 1 ∨ FiniteDimensional 𝕜 E\n[PROOFSTEP]\napply Or.inr\n[GOAL]\ncase neg.h\n𝕜 : Type u\ninst✝¹³ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedSpace 𝕜 E\nF : Type w\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁸ : AddCommGroup F'\ninst✝⁷ : Module 𝕜 F'\ninst✝⁶ : TopologicalSpace F'\ninst✝⁵ : TopologicalAddGroup F'\ninst✝⁴ : ContinuousSMul 𝕜 F'\ninst✝³ : CompleteSpace 𝕜\nX : Type u_1\ninst✝² : TopologicalSpace X\ninst✝¹ : One X\ninst✝ : T2Space X\nf : E → X\nhf : HasCompactMulSupport f\nh'f : Continuous f\nh : ¬∀ (x : E), f x = 1\n⊢ FiniteDimensional 𝕜 E\n[PROOFSTEP]\npush_neg at h \n[GOAL]\ncase neg.h\n𝕜 : Type u\ninst✝¹³ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedSpace 𝕜 E\nF : Type w\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁸ : AddCommGroup F'\ninst✝⁷ : Module 𝕜 F'\ninst✝⁶ : TopologicalSpace F'\ninst✝⁵ : TopologicalAddGroup F'\ninst✝⁴ : ContinuousSMul 𝕜 F'\ninst✝³ : CompleteSpace 𝕜\nX : Type u_1\ninst✝² : TopologicalSpace X\ninst✝¹ : One X\ninst✝ : T2Space X\nf : E → X\nhf : HasCompactMulSupport f\nh'f : Continuous f\nh : ∃ x, f x ≠ 1\n⊢ FiniteDimensional 𝕜 E\n[PROOFSTEP]\nobtain ⟨x, hx⟩ : ∃ x, f x ≠ 1 := h\n[GOAL]\ncase neg.h.intro\n𝕜 : Type u\ninst✝¹³ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedSpace 𝕜 E\nF : Type w\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁸ : AddCommGroup F'\ninst✝⁷ : Module 𝕜 F'\ninst✝⁶ : TopologicalSpace F'\ninst✝⁵ : TopologicalAddGroup F'\ninst✝⁴ : ContinuousSMul 𝕜 F'\ninst✝³ : CompleteSpace 𝕜\nX : Type u_1\ninst✝² : TopologicalSpace X\ninst✝¹ : One X\ninst✝ : T2Space X\nf : E → X\nhf : HasCompactMulSupport f\nh'f : Continuous f\nx : E\nhx : f x ≠ 1\n⊢ FiniteDimensional 𝕜 E\n[PROOFSTEP]\nhave : Function.mulSupport f ∈ 𝓝 x := h'f.isOpen_mulSupport.mem_nhds hx\n[GOAL]\ncase neg.h.intro\n𝕜 : Type u\ninst✝¹³ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedSpace 𝕜 E\nF : Type w\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁸ : AddCommGroup F'\ninst✝⁷ : Module 𝕜 F'\ninst✝⁶ : TopologicalSpace F'\ninst✝⁵ : TopologicalAddGroup F'\ninst✝⁴ : ContinuousSMul 𝕜 F'\ninst✝³ : CompleteSpace 𝕜\nX : Type u_1\ninst✝² : TopologicalSpace X\ninst✝¹ : One X\ninst✝ : T2Space X\nf : E → X\nhf : HasCompactMulSupport f\nh'f : Continuous f\nx : E\nhx : f x ≠ 1\nthis : Function.mulSupport f ∈ 𝓝 x\n⊢ FiniteDimensional 𝕜 E\n[PROOFSTEP]\nobtain ⟨r : ℝ, rpos : 0 < r, hr : Metric.closedBall x r ⊆ Function.mulSupport f⟩ :=\n  Metric.nhds_basis_closedBall.mem_iff.1 this\n[GOAL]\ncase neg.h.intro.intro.intro\n𝕜 : Type u\ninst✝¹³ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedSpace 𝕜 E\nF : Type w\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁸ : AddCommGroup F'\ninst✝⁷ : Module 𝕜 F'\ninst✝⁶ : TopologicalSpace F'\ninst✝⁵ : TopologicalAddGroup F'\ninst✝⁴ : ContinuousSMul 𝕜 F'\ninst✝³ : CompleteSpace 𝕜\nX : Type u_1\ninst✝² : TopologicalSpace X\ninst✝¹ : One X\ninst✝ : T2Space X\nf : E → X\nhf : HasCompactMulSupport f\nh'f : Continuous f\nx : E\nhx : f x ≠ 1\nthis : Function.mulSupport f ∈ 𝓝 x\nr : ℝ\nrpos : 0 < r\nhr : Metric.closedBall x r ⊆ Function.mulSupport f\n⊢ FiniteDimensional 𝕜 E\n[PROOFSTEP]\nhave : IsCompact (Metric.closedBall x r) :=\n  isCompact_of_isClosed_subset hf Metric.isClosed_ball (hr.trans (subset_mulTSupport _))\n[GOAL]\ncase neg.h.intro.intro.intro\n𝕜 : Type u\ninst✝¹³ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : NormedSpace 𝕜 E\nF : Type w\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁸ : AddCommGroup F'\ninst✝⁷ : Module 𝕜 F'\ninst✝⁶ : TopologicalSpace F'\ninst✝⁵ : TopologicalAddGroup F'\ninst✝⁴ : ContinuousSMul 𝕜 F'\ninst✝³ : CompleteSpace 𝕜\nX : Type u_1\ninst✝² : TopologicalSpace X\ninst✝¹ : One X\ninst✝ : T2Space X\nf : E → X\nhf : HasCompactMulSupport f\nh'f : Continuous f\nx : E\nhx : f x ≠ 1\nthis✝ : Function.mulSupport f ∈ 𝓝 x\nr : ℝ\nrpos : 0 < r\nhr : Metric.closedBall x r ⊆ Function.mulSupport f\nthis : IsCompact (Metric.closedBall x r)\n⊢ FiniteDimensional 𝕜 E\n[PROOFSTEP]\nexact finiteDimensional_of_isCompact_closedBall 𝕜 rpos this\n[GOAL]\n𝕜 : Type u\ninst✝¹¹ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁸ : NormedAddCommGroup F\ninst✝⁷ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁶ : AddCommGroup F'\ninst✝⁵ : Module 𝕜 F'\ninst✝⁴ : TopologicalSpace F'\ninst✝³ : TopologicalAddGroup F'\ninst✝² : ContinuousSMul 𝕜 F'\ninst✝¹ : CompleteSpace 𝕜\nf : E →ₗ[𝕜] F\nhf : LinearMap.ker f = ⊥\ninst✝ : FiniteDimensional 𝕜 E\ng : E ≃ₗ[𝕜] { x // x ∈ LinearMap.range f } := ofInjective f (_ : Function.Injective ↑f)\nsrc✝ : Embedding (Subtype.val ∘ ↑(ContinuousLinearEquiv.toHomeomorph (toContinuousLinearEquiv g))) :=\n  Embedding.comp embedding_subtype_val\n    (Homeomorph.embedding (ContinuousLinearEquiv.toHomeomorph (toContinuousLinearEquiv g)))\n⊢ IsClosed (range ↑f)\n[PROOFSTEP]\nhaveI := f.finiteDimensional_range\n[GOAL]\n𝕜 : Type u\ninst✝¹¹ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁸ : NormedAddCommGroup F\ninst✝⁷ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁶ : AddCommGroup F'\ninst✝⁵ : Module 𝕜 F'\ninst✝⁴ : TopologicalSpace F'\ninst✝³ : TopologicalAddGroup F'\ninst✝² : ContinuousSMul 𝕜 F'\ninst✝¹ : CompleteSpace 𝕜\nf : E →ₗ[𝕜] F\nhf : LinearMap.ker f = ⊥\ninst✝ : FiniteDimensional 𝕜 E\ng : E ≃ₗ[𝕜] { x // x ∈ LinearMap.range f } := ofInjective f (_ : Function.Injective ↑f)\nsrc✝ : Embedding (Subtype.val ∘ ↑(ContinuousLinearEquiv.toHomeomorph (toContinuousLinearEquiv g))) :=\n  Embedding.comp embedding_subtype_val\n    (Homeomorph.embedding (ContinuousLinearEquiv.toHomeomorph (toContinuousLinearEquiv g)))\nthis : FiniteDimensional 𝕜 { x // x ∈ LinearMap.range f }\n⊢ IsClosed (range ↑f)\n[PROOFSTEP]\nsimpa [LinearMap.range_coe f] using f.range.closed_of_finiteDimensional\n[GOAL]\n𝕜 : Type u\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁵ : AddCommGroup F'\ninst✝⁴ : Module 𝕜 F'\ninst✝³ : TopologicalSpace F'\ninst✝² : TopologicalAddGroup F'\ninst✝¹ : ContinuousSMul 𝕜 F'\ninst✝ : CompleteSpace 𝕜\nc : E\n⊢ IsClosedMap fun x => x • c\n[PROOFSTEP]\nby_cases hc : c = 0\n[GOAL]\ncase pos\n𝕜 : Type u\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁵ : AddCommGroup F'\ninst✝⁴ : Module 𝕜 F'\ninst✝³ : TopologicalSpace F'\ninst✝² : TopologicalAddGroup F'\ninst✝¹ : ContinuousSMul 𝕜 F'\ninst✝ : CompleteSpace 𝕜\nc : E\nhc : c = 0\n⊢ IsClosedMap fun x => x • c\n[PROOFSTEP]\nsimp_rw [hc, smul_zero]\n[GOAL]\ncase pos\n𝕜 : Type u\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁵ : AddCommGroup F'\ninst✝⁴ : Module 𝕜 F'\ninst✝³ : TopologicalSpace F'\ninst✝² : TopologicalAddGroup F'\ninst✝¹ : ContinuousSMul 𝕜 F'\ninst✝ : CompleteSpace 𝕜\nc : E\nhc : c = 0\n⊢ IsClosedMap fun x => 0\n[PROOFSTEP]\nexact isClosedMap_const\n[GOAL]\ncase neg\n𝕜 : Type u\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁷ : NormedAddCommGroup F\ninst✝⁶ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁵ : AddCommGroup F'\ninst✝⁴ : Module 𝕜 F'\ninst✝³ : TopologicalSpace F'\ninst✝² : TopologicalAddGroup F'\ninst✝¹ : ContinuousSMul 𝕜 F'\ninst✝ : CompleteSpace 𝕜\nc : E\nhc : ¬c = 0\n⊢ IsClosedMap fun x => x • c\n[PROOFSTEP]\nexact (closedEmbedding_smul_left hc).isClosedMap\n[GOAL]\n𝕜 : Type u\ninst✝¹² : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁷ : AddCommGroup F'\ninst✝⁶ : Module 𝕜 F'\ninst✝⁵ : TopologicalSpace F'\ninst✝⁴ : TopologicalAddGroup F'\ninst✝³ : ContinuousSMul 𝕜 F'\ninst✝² : CompleteSpace 𝕜\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nsrc✝ : ((ι → 𝕜) →L[𝕜] E) ≃ₗ[𝕜] ι → E :=\n  LinearEquiv.trans (LinearEquiv.symm LinearMap.toContinuousLinearMap) (LinearEquiv.piRing 𝕜 E ι 𝕜)\n⊢ Continuous\n    (↑{ toLinearMap := ↑src✝, invFun := src✝.invFun, left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),\n            right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }).toAddHom.toFun\n[PROOFSTEP]\nrefine' continuous_pi fun i => _\n[GOAL]\n𝕜 : Type u\ninst✝¹² : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁷ : AddCommGroup F'\ninst✝⁶ : Module 𝕜 F'\ninst✝⁵ : TopologicalSpace F'\ninst✝⁴ : TopologicalAddGroup F'\ninst✝³ : ContinuousSMul 𝕜 F'\ninst✝² : CompleteSpace 𝕜\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nsrc✝ : ((ι → 𝕜) →L[𝕜] E) ≃ₗ[𝕜] ι → E :=\n  LinearEquiv.trans (LinearEquiv.symm LinearMap.toContinuousLinearMap) (LinearEquiv.piRing 𝕜 E ι 𝕜)\ni : ι\n⊢ Continuous fun a =>\n    AddHom.toFun\n      (↑{ toLinearMap := ↑src✝, invFun := src✝.invFun, left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),\n            right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }).toAddHom\n      a i\n[PROOFSTEP]\nexact (ContinuousLinearMap.apply 𝕜 E (Pi.single i 1)).continuous\n[GOAL]\n𝕜 : Type u\ninst✝¹² : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁷ : AddCommGroup F'\ninst✝⁶ : Module 𝕜 F'\ninst✝⁵ : TopologicalSpace F'\ninst✝⁴ : TopologicalAddGroup F'\ninst✝³ : ContinuousSMul 𝕜 F'\ninst✝² : CompleteSpace 𝕜\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nsrc✝ : ((ι → 𝕜) →L[𝕜] E) ≃ₗ[𝕜] ι → E :=\n  LinearEquiv.trans (LinearEquiv.symm LinearMap.toContinuousLinearMap) (LinearEquiv.piRing 𝕜 E ι 𝕜)\n⊢ Continuous\n    { toLinearMap := ↑src✝, invFun := src✝.invFun, left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),\n        right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }.invFun\n[PROOFSTEP]\nsimp_rw [LinearEquiv.invFun_eq_symm, LinearEquiv.trans_symm, LinearEquiv.symm_symm]\n  -- Note: added explicit type and removed `change` that tried to achieve the same\n[GOAL]\n𝕜 : Type u\ninst✝¹² : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁷ : AddCommGroup F'\ninst✝⁶ : Module 𝕜 F'\ninst✝⁵ : TopologicalSpace F'\ninst✝⁴ : TopologicalAddGroup F'\ninst✝³ : ContinuousSMul 𝕜 F'\ninst✝² : CompleteSpace 𝕜\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nsrc✝ : ((ι → 𝕜) →L[𝕜] E) ≃ₗ[𝕜] ι → E :=\n  LinearEquiv.trans (LinearEquiv.symm LinearMap.toContinuousLinearMap) (LinearEquiv.piRing 𝕜 E ι 𝕜)\n⊢ Continuous ↑(LinearEquiv.trans (LinearEquiv.symm (LinearEquiv.piRing 𝕜 E ι 𝕜)) LinearMap.toContinuousLinearMap)\n[PROOFSTEP]\nrefine\n  AddMonoidHomClass.continuous_of_bound\n    (LinearMap.toContinuousLinearMap.toLinearMap.comp (LinearEquiv.piRing 𝕜 E ι 𝕜).symm.toLinearMap)\n    (Fintype.card ι : ℝ) fun g => ?_\n[GOAL]\n𝕜 : Type u\ninst✝¹² : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁷ : AddCommGroup F'\ninst✝⁶ : Module 𝕜 F'\ninst✝⁵ : TopologicalSpace F'\ninst✝⁴ : TopologicalAddGroup F'\ninst✝³ : ContinuousSMul 𝕜 F'\ninst✝² : CompleteSpace 𝕜\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nsrc✝ : ((ι → 𝕜) →L[𝕜] E) ≃ₗ[𝕜] ι → E :=\n  LinearEquiv.trans (LinearEquiv.symm LinearMap.toContinuousLinearMap) (LinearEquiv.piRing 𝕜 E ι 𝕜)\ng : ι → E\n⊢ ‖↑(LinearMap.comp ↑LinearMap.toContinuousLinearMap ↑(LinearEquiv.symm (LinearEquiv.piRing 𝕜 E ι 𝕜))) g‖ ≤\n    ↑(Fintype.card ι) * ‖g‖\n[PROOFSTEP]\nrw [← nsmul_eq_mul]\n[GOAL]\n𝕜 : Type u\ninst✝¹² : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁷ : AddCommGroup F'\ninst✝⁶ : Module 𝕜 F'\ninst✝⁵ : TopologicalSpace F'\ninst✝⁴ : TopologicalAddGroup F'\ninst✝³ : ContinuousSMul 𝕜 F'\ninst✝² : CompleteSpace 𝕜\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nsrc✝ : ((ι → 𝕜) →L[𝕜] E) ≃ₗ[𝕜] ι → E :=\n  LinearEquiv.trans (LinearEquiv.symm LinearMap.toContinuousLinearMap) (LinearEquiv.piRing 𝕜 E ι 𝕜)\ng : ι → E\n⊢ ‖↑(LinearMap.comp ↑LinearMap.toContinuousLinearMap ↑(LinearEquiv.symm (LinearEquiv.piRing 𝕜 E ι 𝕜))) g‖ ≤\n    Fintype.card ι • ‖g‖\n[PROOFSTEP]\nrefine op_norm_le_bound _ (nsmul_nonneg (norm_nonneg g) (Fintype.card ι)) fun t => ?_\n[GOAL]\n𝕜 : Type u\ninst✝¹² : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁷ : AddCommGroup F'\ninst✝⁶ : Module 𝕜 F'\ninst✝⁵ : TopologicalSpace F'\ninst✝⁴ : TopologicalAddGroup F'\ninst✝³ : ContinuousSMul 𝕜 F'\ninst✝² : CompleteSpace 𝕜\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nsrc✝ : ((ι → 𝕜) →L[𝕜] E) ≃ₗ[𝕜] ι → E :=\n  LinearEquiv.trans (LinearEquiv.symm LinearMap.toContinuousLinearMap) (LinearEquiv.piRing 𝕜 E ι 𝕜)\ng : ι → E\nt : ι → 𝕜\n⊢ ‖↑(↑(LinearMap.comp ↑LinearMap.toContinuousLinearMap ↑(LinearEquiv.symm (LinearEquiv.piRing 𝕜 E ι 𝕜))) g) t‖ ≤\n    Fintype.card ι • ‖g‖ * ‖t‖\n[PROOFSTEP]\nsimp_rw [LinearMap.coe_comp, LinearEquiv.coe_toLinearMap, Function.comp_apply, LinearMap.coe_toContinuousLinearMap',\n  LinearEquiv.piRing_symm_apply]\n[GOAL]\n𝕜 : Type u\ninst✝¹² : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁷ : AddCommGroup F'\ninst✝⁶ : Module 𝕜 F'\ninst✝⁵ : TopologicalSpace F'\ninst✝⁴ : TopologicalAddGroup F'\ninst✝³ : ContinuousSMul 𝕜 F'\ninst✝² : CompleteSpace 𝕜\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nsrc✝ : ((ι → 𝕜) →L[𝕜] E) ≃ₗ[𝕜] ι → E :=\n  LinearEquiv.trans (LinearEquiv.symm LinearMap.toContinuousLinearMap) (LinearEquiv.piRing 𝕜 E ι 𝕜)\ng : ι → E\nt : ι → 𝕜\n⊢ ‖∑ i : ι, t i • g i‖ ≤ Fintype.card ι • ‖g‖ * ‖t‖\n[PROOFSTEP]\napply le_trans (norm_sum_le _ _)\n[GOAL]\n𝕜 : Type u\ninst✝¹² : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁷ : AddCommGroup F'\ninst✝⁶ : Module 𝕜 F'\ninst✝⁵ : TopologicalSpace F'\ninst✝⁴ : TopologicalAddGroup F'\ninst✝³ : ContinuousSMul 𝕜 F'\ninst✝² : CompleteSpace 𝕜\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nsrc✝ : ((ι → 𝕜) →L[𝕜] E) ≃ₗ[𝕜] ι → E :=\n  LinearEquiv.trans (LinearEquiv.symm LinearMap.toContinuousLinearMap) (LinearEquiv.piRing 𝕜 E ι 𝕜)\ng : ι → E\nt : ι → 𝕜\n⊢ ∑ i : ι, ‖t i • g i‖ ≤ Fintype.card ι • ‖g‖ * ‖t‖\n[PROOFSTEP]\nrw [smul_mul_assoc]\n[GOAL]\n𝕜 : Type u\ninst✝¹² : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁷ : AddCommGroup F'\ninst✝⁶ : Module 𝕜 F'\ninst✝⁵ : TopologicalSpace F'\ninst✝⁴ : TopologicalAddGroup F'\ninst✝³ : ContinuousSMul 𝕜 F'\ninst✝² : CompleteSpace 𝕜\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nsrc✝ : ((ι → 𝕜) →L[𝕜] E) ≃ₗ[𝕜] ι → E :=\n  LinearEquiv.trans (LinearEquiv.symm LinearMap.toContinuousLinearMap) (LinearEquiv.piRing 𝕜 E ι 𝕜)\ng : ι → E\nt : ι → 𝕜\n⊢ ∑ i : ι, ‖t i • g i‖ ≤ Fintype.card ι • (‖g‖ * ‖t‖)\n[PROOFSTEP]\nrefine' Finset.sum_le_card_nsmul _ _ _ fun i _ => _\n[GOAL]\n𝕜 : Type u\ninst✝¹² : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁷ : AddCommGroup F'\ninst✝⁶ : Module 𝕜 F'\ninst✝⁵ : TopologicalSpace F'\ninst✝⁴ : TopologicalAddGroup F'\ninst✝³ : ContinuousSMul 𝕜 F'\ninst✝² : CompleteSpace 𝕜\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nsrc✝ : ((ι → 𝕜) →L[𝕜] E) ≃ₗ[𝕜] ι → E :=\n  LinearEquiv.trans (LinearEquiv.symm LinearMap.toContinuousLinearMap) (LinearEquiv.piRing 𝕜 E ι 𝕜)\ng : ι → E\nt : ι → 𝕜\ni : ι\nx✝ : i ∈ Finset.univ\n⊢ ‖t i • g i‖ ≤ ‖g‖ * ‖t‖\n[PROOFSTEP]\nrw [norm_smul, mul_comm]\n[GOAL]\n𝕜 : Type u\ninst✝¹² : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁷ : AddCommGroup F'\ninst✝⁶ : Module 𝕜 F'\ninst✝⁵ : TopologicalSpace F'\ninst✝⁴ : TopologicalAddGroup F'\ninst✝³ : ContinuousSMul 𝕜 F'\ninst✝² : CompleteSpace 𝕜\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nsrc✝ : ((ι → 𝕜) →L[𝕜] E) ≃ₗ[𝕜] ι → E :=\n  LinearEquiv.trans (LinearEquiv.symm LinearMap.toContinuousLinearMap) (LinearEquiv.piRing 𝕜 E ι 𝕜)\ng : ι → E\nt : ι → 𝕜\ni : ι\nx✝ : i ∈ Finset.univ\n⊢ ‖g i‖ * ‖t i‖ ≤ ‖g‖ * ‖t‖\n[PROOFSTEP]\ngcongr\n[GOAL]\ncase h₁\n𝕜 : Type u\ninst✝¹² : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁷ : AddCommGroup F'\ninst✝⁶ : Module 𝕜 F'\ninst✝⁵ : TopologicalSpace F'\ninst✝⁴ : TopologicalAddGroup F'\ninst✝³ : ContinuousSMul 𝕜 F'\ninst✝² : CompleteSpace 𝕜\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nsrc✝ : ((ι → 𝕜) →L[𝕜] E) ≃ₗ[𝕜] ι → E :=\n  LinearEquiv.trans (LinearEquiv.symm LinearMap.toContinuousLinearMap) (LinearEquiv.piRing 𝕜 E ι 𝕜)\ng : ι → E\nt : ι → 𝕜\ni : ι\nx✝ : i ∈ Finset.univ\n⊢ ‖g i‖ ≤ ‖g‖\n[PROOFSTEP]\napply norm_le_pi_norm\n[GOAL]\ncase h₂\n𝕜 : Type u\ninst✝¹² : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁷ : AddCommGroup F'\ninst✝⁶ : Module 𝕜 F'\ninst✝⁵ : TopologicalSpace F'\ninst✝⁴ : TopologicalAddGroup F'\ninst✝³ : ContinuousSMul 𝕜 F'\ninst✝² : CompleteSpace 𝕜\nι : Type u_1\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nsrc✝ : ((ι → 𝕜) →L[𝕜] E) ≃ₗ[𝕜] ι → E :=\n  LinearEquiv.trans (LinearEquiv.symm LinearMap.toContinuousLinearMap) (LinearEquiv.piRing 𝕜 E ι 𝕜)\ng : ι → E\nt : ι → 𝕜\ni : ι\nx✝ : i ∈ Finset.univ\n⊢ ‖t i‖ ≤ ‖t‖\n[PROOFSTEP]\napply norm_le_pi_norm\n[GOAL]\n𝕜 : Type u\ninst✝¹² : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁷ : AddCommGroup F'\ninst✝⁶ : Module 𝕜 F'\ninst✝⁵ : TopologicalSpace F'\ninst✝⁴ : TopologicalAddGroup F'\ninst✝³ : ContinuousSMul 𝕜 F'\ninst✝² : CompleteSpace 𝕜\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : FiniteDimensional 𝕜 E\nf : X → E →L[𝕜] F\ns : Set X\n⊢ ContinuousOn f s ↔ ∀ (y : E), ContinuousOn (fun x => ↑(f x) y) s\n[PROOFSTEP]\nrefine' ⟨fun h y => (ContinuousLinearMap.apply 𝕜 F y).continuous.comp_continuousOn h, fun h => _⟩\n[GOAL]\n𝕜 : Type u\ninst✝¹² : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁷ : AddCommGroup F'\ninst✝⁶ : Module 𝕜 F'\ninst✝⁵ : TopologicalSpace F'\ninst✝⁴ : TopologicalAddGroup F'\ninst✝³ : ContinuousSMul 𝕜 F'\ninst✝² : CompleteSpace 𝕜\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : FiniteDimensional 𝕜 E\nf : X → E →L[𝕜] F\ns : Set X\nh : ∀ (y : E), ContinuousOn (fun x => ↑(f x) y) s\n⊢ ContinuousOn f s\n[PROOFSTEP]\nlet d := finrank 𝕜 E\n[GOAL]\n𝕜 : Type u\ninst✝¹² : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁷ : AddCommGroup F'\ninst✝⁶ : Module 𝕜 F'\ninst✝⁵ : TopologicalSpace F'\ninst✝⁴ : TopologicalAddGroup F'\ninst✝³ : ContinuousSMul 𝕜 F'\ninst✝² : CompleteSpace 𝕜\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : FiniteDimensional 𝕜 E\nf : X → E →L[𝕜] F\ns : Set X\nh : ∀ (y : E), ContinuousOn (fun x => ↑(f x) y) s\nd : ℕ := finrank 𝕜 E\n⊢ ContinuousOn f s\n[PROOFSTEP]\nhave hd : d = finrank 𝕜 (Fin d → 𝕜) := (finrank_fin_fun 𝕜).symm\n[GOAL]\n𝕜 : Type u\ninst✝¹² : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁷ : AddCommGroup F'\ninst✝⁶ : Module 𝕜 F'\ninst✝⁵ : TopologicalSpace F'\ninst✝⁴ : TopologicalAddGroup F'\ninst✝³ : ContinuousSMul 𝕜 F'\ninst✝² : CompleteSpace 𝕜\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : FiniteDimensional 𝕜 E\nf : X → E →L[𝕜] F\ns : Set X\nh : ∀ (y : E), ContinuousOn (fun x => ↑(f x) y) s\nd : ℕ := finrank 𝕜 E\nhd : d = finrank 𝕜 (Fin d → 𝕜)\n⊢ ContinuousOn f s\n[PROOFSTEP]\nlet e₁ : E ≃L[𝕜] Fin d → 𝕜 := ContinuousLinearEquiv.ofFinrankEq hd\n[GOAL]\n𝕜 : Type u\ninst✝¹² : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁷ : AddCommGroup F'\ninst✝⁶ : Module 𝕜 F'\ninst✝⁵ : TopologicalSpace F'\ninst✝⁴ : TopologicalAddGroup F'\ninst✝³ : ContinuousSMul 𝕜 F'\ninst✝² : CompleteSpace 𝕜\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : FiniteDimensional 𝕜 E\nf : X → E →L[𝕜] F\ns : Set X\nh : ∀ (y : E), ContinuousOn (fun x => ↑(f x) y) s\nd : ℕ := finrank 𝕜 E\nhd : d = finrank 𝕜 (Fin d → 𝕜)\ne₁ : E ≃L[𝕜] Fin d → 𝕜 := ContinuousLinearEquiv.ofFinrankEq hd\n⊢ ContinuousOn f s\n[PROOFSTEP]\nlet e₂ : (E →L[𝕜] F) ≃L[𝕜] Fin d → F := (e₁.arrowCongr (1 : F ≃L[𝕜] F)).trans (ContinuousLinearEquiv.piRing (Fin d))\n[GOAL]\n𝕜 : Type u\ninst✝¹² : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁷ : AddCommGroup F'\ninst✝⁶ : Module 𝕜 F'\ninst✝⁵ : TopologicalSpace F'\ninst✝⁴ : TopologicalAddGroup F'\ninst✝³ : ContinuousSMul 𝕜 F'\ninst✝² : CompleteSpace 𝕜\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : FiniteDimensional 𝕜 E\nf : X → E →L[𝕜] F\ns : Set X\nh : ∀ (y : E), ContinuousOn (fun x => ↑(f x) y) s\nd : ℕ := finrank 𝕜 E\nhd : d = finrank 𝕜 (Fin d → 𝕜)\ne₁ : E ≃L[𝕜] Fin d → 𝕜 := ContinuousLinearEquiv.ofFinrankEq hd\ne₂ : (E →L[𝕜] F) ≃L[𝕜] Fin d → F :=\n  ContinuousLinearEquiv.trans (ContinuousLinearEquiv.arrowCongr e₁ 1) (ContinuousLinearEquiv.piRing (Fin d))\n⊢ ContinuousOn f s\n[PROOFSTEP]\nrw [← Function.comp.left_id f, ← e₂.symm_comp_self]\n[GOAL]\n𝕜 : Type u\ninst✝¹² : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁷ : AddCommGroup F'\ninst✝⁶ : Module 𝕜 F'\ninst✝⁵ : TopologicalSpace F'\ninst✝⁴ : TopologicalAddGroup F'\ninst✝³ : ContinuousSMul 𝕜 F'\ninst✝² : CompleteSpace 𝕜\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : FiniteDimensional 𝕜 E\nf : X → E →L[𝕜] F\ns : Set X\nh : ∀ (y : E), ContinuousOn (fun x => ↑(f x) y) s\nd : ℕ := finrank 𝕜 E\nhd : d = finrank 𝕜 (Fin d → 𝕜)\ne₁ : E ≃L[𝕜] Fin d → 𝕜 := ContinuousLinearEquiv.ofFinrankEq hd\ne₂ : (E →L[𝕜] F) ≃L[𝕜] Fin d → F :=\n  ContinuousLinearEquiv.trans (ContinuousLinearEquiv.arrowCongr e₁ 1) (ContinuousLinearEquiv.piRing (Fin d))\n⊢ ContinuousOn ((↑(ContinuousLinearEquiv.symm e₂) ∘ ↑e₂) ∘ f) s\n[PROOFSTEP]\nexact e₂.symm.continuous.comp_continuousOn (continuousOn_pi.mpr fun i => h _)\n[GOAL]\n𝕜 : Type u\ninst✝¹² : NontriviallyNormedField 𝕜\nE : Type v\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nF : Type w\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace 𝕜 F\nF' : Type x\ninst✝⁷ : AddCommGroup F'\ninst✝⁶ : Module 𝕜 F'\ninst✝⁵ : TopologicalSpace F'\ninst✝⁴ : TopologicalAddGroup F'\ninst✝³ : ContinuousSMul 𝕜 F'\ninst✝² : CompleteSpace 𝕜\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : FiniteDimensional 𝕜 E\nf : X → E →L[𝕜] F\n⊢ Continuous f ↔ ∀ (y : E), Continuous fun x => ↑(f x) y\n[PROOFSTEP]\nsimp_rw [continuous_iff_continuousOn_univ, continuousOn_clm_apply]\n[GOAL]\n𝕜 : Type u\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\ninst✝¹ : ProperSpace 𝕜\ninst✝ : FiniteDimensional 𝕜 E\n⊢ ProperSpace E\n[PROOFSTEP]\nset e := ContinuousLinearEquiv.ofFinrankEq (@finrank_fin_fun 𝕜 _ _ (finrank 𝕜 E)).symm\n[GOAL]\n𝕜 : Type u\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type v\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\ninst✝¹ : ProperSpace 𝕜\ninst✝ : FiniteDimensional 𝕜 E\ne : E ≃L[𝕜] Fin (finrank 𝕜 E) → 𝕜 :=\n  ContinuousLinearEquiv.ofFinrankEq (_ : finrank 𝕜 E = finrank 𝕜 (Fin (finrank 𝕜 E) → 𝕜))\n⊢ ProperSpace E\n[PROOFSTEP]\nexact e.symm.antilipschitz.properSpace e.symm.continuous e.symm.surjective\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nx : E\ns : Set E\nhx : x ∈ s\nhs : s ≠ univ\n⊢ ∃ y, y ∈ frontier s ∧ Metric.infDist x sᶜ = dist x y\n[PROOFSTEP]\nrcases Metric.exists_mem_closure_infDist_eq_dist (nonempty_compl.2 hs) x with ⟨y, hys, hyd⟩\n[GOAL]\ncase intro.intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nx : E\ns : Set E\nhx : x ∈ s\nhs : s ≠ univ\ny : E\nhys : y ∈ closure sᶜ\nhyd : Metric.infDist x sᶜ = dist x y\n⊢ ∃ y, y ∈ frontier s ∧ Metric.infDist x sᶜ = dist x y\n[PROOFSTEP]\nrw [closure_compl] at hys \n[GOAL]\ncase intro.intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nx : E\ns : Set E\nhx : x ∈ s\nhs : s ≠ univ\ny : E\nhys : y ∈ (interior s)ᶜ\nhyd : Metric.infDist x sᶜ = dist x y\n⊢ ∃ y, y ∈ frontier s ∧ Metric.infDist x sᶜ = dist x y\n[PROOFSTEP]\nrefine' ⟨y, ⟨Metric.closedBall_infDist_compl_subset_closure hx <| Metric.mem_closedBall.2 <| ge_of_eq _, hys⟩, hyd⟩\n[GOAL]\ncase intro.intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nx : E\ns : Set E\nhx : x ∈ s\nhs : s ≠ univ\ny : E\nhys : y ∈ (interior s)ᶜ\nhyd : Metric.infDist x sᶜ = dist x y\n⊢ Metric.infDist x sᶜ = dist y x\n[PROOFSTEP]\nrwa [dist_comm]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : Nontrivial E\nx : E\nK : Set E\nhK : IsCompact K\nhx : x ∈ K\n⊢ ∃ y, y ∈ frontier K ∧ Metric.infDist x Kᶜ = dist x y\n[PROOFSTEP]\nobtain hx' | hx' : x ∈ interior K ∪ frontier K :=\n  by\n  rw [← closure_eq_interior_union_frontier]\n  exact subset_closure hx\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : Nontrivial E\nx : E\nK : Set E\nhK : IsCompact K\nhx : x ∈ K\n⊢ x ∈ interior K ∪ frontier K\n[PROOFSTEP]\nrw [← closure_eq_interior_union_frontier]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : Nontrivial E\nx : E\nK : Set E\nhK : IsCompact K\nhx : x ∈ K\n⊢ x ∈ closure K\n[PROOFSTEP]\nexact subset_closure hx\n[GOAL]\ncase inl\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : Nontrivial E\nx : E\nK : Set E\nhK : IsCompact K\nhx : x ∈ K\nhx' : x ∈ interior K\n⊢ ∃ y, y ∈ frontier K ∧ Metric.infDist x Kᶜ = dist x y\n[PROOFSTEP]\nrw [mem_interior_iff_mem_nhds, Metric.nhds_basis_closedBall.mem_iff] at hx' \n[GOAL]\ncase inl\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : Nontrivial E\nx : E\nK : Set E\nhK : IsCompact K\nhx : x ∈ K\nhx' : ∃ i, 0 < i ∧ Metric.closedBall x i ⊆ K\n⊢ ∃ y, y ∈ frontier K ∧ Metric.infDist x Kᶜ = dist x y\n[PROOFSTEP]\nrcases hx' with ⟨r, hr₀, hrK⟩\n[GOAL]\ncase inl.intro.intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : Nontrivial E\nx : E\nK : Set E\nhK : IsCompact K\nhx : x ∈ K\nr : ℝ\nhr₀ : 0 < r\nhrK : Metric.closedBall x r ⊆ K\n⊢ ∃ y, y ∈ frontier K ∧ Metric.infDist x Kᶜ = dist x y\n[PROOFSTEP]\nhave : FiniteDimensional ℝ E :=\n  finiteDimensional_of_isCompact_closedBall ℝ hr₀ (isCompact_of_isClosed_subset hK Metric.isClosed_ball hrK)\n[GOAL]\ncase inl.intro.intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : Nontrivial E\nx : E\nK : Set E\nhK : IsCompact K\nhx : x ∈ K\nr : ℝ\nhr₀ : 0 < r\nhrK : Metric.closedBall x r ⊆ K\nthis : FiniteDimensional ℝ E\n⊢ ∃ y, y ∈ frontier K ∧ Metric.infDist x Kᶜ = dist x y\n[PROOFSTEP]\nexact exists_mem_frontier_infDist_compl_eq_dist hx hK.ne_univ\n[GOAL]\ncase inr\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : Nontrivial E\nx : E\nK : Set E\nhK : IsCompact K\nhx : x ∈ K\nhx' : x ∈ frontier K\n⊢ ∃ y, y ∈ frontier K ∧ Metric.infDist x Kᶜ = dist x y\n[PROOFSTEP]\nrefine' ⟨x, hx', _⟩\n[GOAL]\ncase inr\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : Nontrivial E\nx : E\nK : Set E\nhK : IsCompact K\nhx : x ∈ K\nhx' : x ∈ frontier K\n⊢ Metric.infDist x Kᶜ = dist x x\n[PROOFSTEP]\nrw [frontier_eq_closure_inter_closure] at hx' \n[GOAL]\ncase inr\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : Nontrivial E\nx : E\nK : Set E\nhK : IsCompact K\nhx : x ∈ K\nhx' : x ∈ closure K ∩ closure Kᶜ\n⊢ Metric.infDist x Kᶜ = dist x x\n[PROOFSTEP]\nrw [Metric.infDist_zero_of_mem_closure hx'.2, dist_self]\n[GOAL]\nα : Type u_1\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nf : α → E\n⊢ (Summable fun x => ‖f x‖) ↔ Summable f\n[PROOFSTEP]\nrefine'\n  ⟨summable_of_summable_norm, fun hf => _⟩\n    -- First we use a finite basis to reduce the problem to the case `E = Fin N → ℝ`\n[GOAL]\nα : Type u_1\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nf : α → E\nhf : Summable f\n⊢ Summable fun x => ‖f x‖\n[PROOFSTEP]\nsuffices ∀ {N : ℕ} {g : α → Fin N → ℝ}, Summable g → Summable fun x => ‖g x‖\n  by\n  obtain v := finBasis ℝ E\n  set e := v.equivFunL\n  have : Summable fun x => ‖e (f x)‖ := this (e.summable.2 hf)\n  refine' summable_of_norm_bounded _ (this.mul_left ↑‖(e.symm : (Fin (finrank ℝ E) → ℝ) →L[ℝ] E)‖₊) fun i => _\n  simpa using (e.symm : (Fin (finrank ℝ E) → ℝ) →L[ℝ] E).le_op_norm (e <| f i)\n[GOAL]\nα : Type u_1\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nf : α → E\nhf : Summable f\nthis : ∀ {N : ℕ} {g : α → Fin N → ℝ}, Summable g → Summable fun x => ‖g x‖\n⊢ Summable fun x => ‖f x‖\n[PROOFSTEP]\nobtain v := finBasis ℝ E\n[GOAL]\nα : Type u_1\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nf : α → E\nhf : Summable f\nthis : ∀ {N : ℕ} {g : α → Fin N → ℝ}, Summable g → Summable fun x => ‖g x‖\nv : Basis (Fin (finrank ℝ E)) ℝ E\n⊢ Summable fun x => ‖f x‖\n[PROOFSTEP]\nset e := v.equivFunL\n[GOAL]\nα : Type u_1\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nf : α → E\nhf : Summable f\nthis : ∀ {N : ℕ} {g : α → Fin N → ℝ}, Summable g → Summable fun x => ‖g x‖\nv : Basis (Fin (finrank ℝ E)) ℝ E\ne : E ≃L[ℝ] Fin (finrank ℝ E) → ℝ := Basis.equivFunL v\n⊢ Summable fun x => ‖f x‖\n[PROOFSTEP]\nhave : Summable fun x => ‖e (f x)‖ := this (e.summable.2 hf)\n[GOAL]\nα : Type u_1\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nf : α → E\nhf : Summable f\nthis✝ : ∀ {N : ℕ} {g : α → Fin N → ℝ}, Summable g → Summable fun x => ‖g x‖\nv : Basis (Fin (finrank ℝ E)) ℝ E\ne : E ≃L[ℝ] Fin (finrank ℝ E) → ℝ := Basis.equivFunL v\nthis : Summable fun x => ‖↑e (f x)‖\n⊢ Summable fun x => ‖f x‖\n[PROOFSTEP]\nrefine' summable_of_norm_bounded _ (this.mul_left ↑‖(e.symm : (Fin (finrank ℝ E) → ℝ) →L[ℝ] E)‖₊) fun i => _\n[GOAL]\nα : Type u_1\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nf : α → E\nhf : Summable f\nthis✝ : ∀ {N : ℕ} {g : α → Fin N → ℝ}, Summable g → Summable fun x => ‖g x‖\nv : Basis (Fin (finrank ℝ E)) ℝ E\ne : E ≃L[ℝ] Fin (finrank ℝ E) → ℝ := Basis.equivFunL v\nthis : Summable fun x => ‖↑e (f x)‖\ni : α\n⊢ ‖‖f i‖‖ ≤ ↑‖↑(ContinuousLinearEquiv.symm e)‖₊ * ‖↑e (f i)‖\n[PROOFSTEP]\nsimpa using (e.symm : (Fin (finrank ℝ E) → ℝ) →L[ℝ] E).le_op_norm (e <| f i)\n[GOAL]\nα : Type u_1\nE : Type u_2\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : FiniteDimensional ℝ E\nf : α → E\nhf : Summable f\n⊢ ∀ {N : ℕ} {g : α → Fin N → ℝ}, Summable g → Summable fun x => ‖g x‖\n[PROOFSTEP]\nclear! E\n[GOAL]\nα : Type u_1\n⊢ ∀ {N : ℕ} {g : α → Fin N → ℝ}, Summable g → Summable fun x => ‖g x‖\n[PROOFSTEP]\nintro N g hg\n[GOAL]\nα : Type u_1\nN : ℕ\ng : α → Fin N → ℝ\nhg : Summable g\n⊢ Summable fun x => ‖g x‖\n[PROOFSTEP]\nhave : ∀ i, Summable fun x => ‖g x i‖ := fun i => (Pi.summable.1 hg i).abs\n[GOAL]\nα : Type u_1\nN : ℕ\ng : α → Fin N → ℝ\nhg : Summable g\nthis : ∀ (i : Fin N), Summable fun x => ‖g x i‖\n⊢ Summable fun x => ‖g x‖\n[PROOFSTEP]\nrefine' summable_of_norm_bounded _ (summable_sum fun i (_ : i ∈ Finset.univ) => this i) fun x => _\n[GOAL]\nα : Type u_1\nN : ℕ\ng : α → Fin N → ℝ\nhg : Summable g\nthis : ∀ (i : Fin N), Summable fun x => ‖g x i‖\nx : α\n⊢ ‖‖g x‖‖ ≤ ∑ i : Fin N, ‖g x i‖\n[PROOFSTEP]\nrw [norm_norm, pi_norm_le_iff_of_nonneg]\n[GOAL]\nα : Type u_1\nN : ℕ\ng : α → Fin N → ℝ\nhg : Summable g\nthis : ∀ (i : Fin N), Summable fun x => ‖g x i‖\nx : α\n⊢ ∀ (i : Fin N), ‖g x i‖ ≤ ∑ i : Fin N, ‖g x i‖\n[PROOFSTEP]\nrefine' fun i => Finset.single_le_sum (f := fun i => ‖g x i‖) (fun i _ => _) (Finset.mem_univ i)\n[GOAL]\nα : Type u_1\nN : ℕ\ng : α → Fin N → ℝ\nhg : Summable g\nthis : ∀ (i : Fin N), Summable fun x => ‖g x i‖\nx : α\ni✝ i : Fin N\nx✝ : i ∈ Finset.univ\n⊢ 0 ≤ (fun i => ‖g x i‖) i\n[PROOFSTEP]\nexact norm_nonneg (g x i)\n[GOAL]\nα : Type u_1\nN : ℕ\ng : α → Fin N → ℝ\nhg : Summable g\nthis : ∀ (i : Fin N), Summable fun x => ‖g x i‖\nx : α\n⊢ 0 ≤ ∑ i : Fin N, ‖g x i‖\n[PROOFSTEP]\nexact Finset.sum_nonneg fun _ _ => norm_nonneg _\n", "meta": {"mathlib_filename": "Mathlib.Analysis.NormedSpace.FiniteDimension", "llama_tokens": 85376, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8006920116079208, "lm_q2_score": 0.6442251064863697, "lm_q1q2_score": 0.5158258964408983}}
{"text": "[GOAL]\nα : Type u_1\nf : Bool → α\n⊢ range f = {f false, f true}\n[PROOFSTEP]\nrw [← image_univ, univ_eq, image_pair]\n", "meta": {"mathlib_filename": "Mathlib.Data.Bool.Set", "llama_tokens": 55, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES\n\n", "lm_q1_score": 0.8006920020959544, "lm_q2_score": 0.6442251064863697, "lm_q1q2_score": 0.5158258903130507}}
{"text": "[GOAL]\nM : Type u_1\nN : Type u_2\ninst✝¹ : CommMonoid M\ninst✝ : AddCommMonoid N\nn : ℕ\nf : ℕ × ℕ → M\n⊢ ∏ p in antidiagonal (n + 1), f p = f (0, n + 1) * ∏ p in antidiagonal n, f (p.fst + 1, p.snd)\n[PROOFSTEP]\nrw [antidiagonal_succ, prod_cons, prod_map]\n[GOAL]\nM : Type u_1\nN : Type u_2\ninst✝¹ : CommMonoid M\ninst✝ : AddCommMonoid N\nn : ℕ\nf : ℕ × ℕ → M\n⊢ f (0, n + 1) *\n      ∏ x in antidiagonal n,\n        f\n          (↑(Function.Embedding.prodMap { toFun := Nat.succ, inj' := Nat.succ_injective } (Function.Embedding.refl ℕ))\n            x) =\n    f (0, n + 1) * ∏ p in antidiagonal n, f (p.fst + 1, p.snd)\n[PROOFSTEP]\nrfl\n[GOAL]\nM : Type u_1\nN : Type u_2\ninst✝¹ : CommMonoid M\ninst✝ : AddCommMonoid N\nn : ℕ\nf : ℕ × ℕ → M\n⊢ ∏ p in antidiagonal n, f (Prod.swap p) = ∏ p in antidiagonal n, f p\n[PROOFSTEP]\nconv_lhs => rw [← map_swap_antidiagonal, Finset.prod_map]\n[GOAL]\nM : Type u_1\nN : Type u_2\ninst✝¹ : CommMonoid M\ninst✝ : AddCommMonoid N\nn : ℕ\nf : ℕ × ℕ → M\n| ∏ p in antidiagonal n, f (Prod.swap p)\n[PROOFSTEP]\nrw [← map_swap_antidiagonal, Finset.prod_map]\n[GOAL]\nM : Type u_1\nN : Type u_2\ninst✝¹ : CommMonoid M\ninst✝ : AddCommMonoid N\nn : ℕ\nf : ℕ × ℕ → M\n| ∏ p in antidiagonal n, f (Prod.swap p)\n[PROOFSTEP]\nrw [← map_swap_antidiagonal, Finset.prod_map]\n[GOAL]\nM : Type u_1\nN : Type u_2\ninst✝¹ : CommMonoid M\ninst✝ : AddCommMonoid N\nn : ℕ\nf : ℕ × ℕ → M\n| ∏ p in antidiagonal n, f (Prod.swap p)\n[PROOFSTEP]\nrw [← map_swap_antidiagonal, Finset.prod_map]\n[GOAL]\nM : Type u_1\nN : Type u_2\ninst✝¹ : CommMonoid M\ninst✝ : AddCommMonoid N\nn : ℕ\nf : ℕ × ℕ → M\n⊢ ∏ p in antidiagonal (n + 1), f p = f (n + 1, 0) * ∏ p in antidiagonal n, f (p.fst, p.snd + 1)\n[PROOFSTEP]\nrw [← prod_antidiagonal_swap, prod_antidiagonal_succ, ← prod_antidiagonal_swap]\n[GOAL]\nM : Type u_1\nN : Type u_2\ninst✝¹ : CommMonoid M\ninst✝ : AddCommMonoid N\nn : ℕ\nf : ℕ × ℕ → M\n⊢ f (Prod.swap (0, n + 1)) * ∏ p in antidiagonal n, f (Prod.swap ((Prod.swap p).fst + 1, (Prod.swap p).snd)) =\n    f (n + 1, 0) * ∏ p in antidiagonal n, f (p.fst, p.snd + 1)\n[PROOFSTEP]\nrfl\n[GOAL]\nM : Type u_1\nN : Type u_2\ninst✝¹ : CommMonoid M\ninst✝ : AddCommMonoid N\nn : ℕ\nf : ℕ × ℕ → ℕ → M\np : ℕ × ℕ\nhp : p ∈ antidiagonal n\n⊢ f p n = f p (p.fst + p.snd)\n[PROOFSTEP]\nrw [Nat.mem_antidiagonal.1 hp]\n", "meta": {"mathlib_filename": "Mathlib.Algebra.BigOperators.NatAntidiagonal", "llama_tokens": 1224, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7371581510799253, "lm_q2_score": 0.6992544273261176, "lm_q1q2_score": 0.5154611007821729}}
{"text": "[GOAL]\nn : Type ?u.20\nm : Type ?u.8\ninst✝⁴ : Fintype m\ninst✝³ : DecidableEq m\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\nR : Type ?u.35\ninst✝ : Fintype R\n⊢ Fintype (Matrix m n R)\n[PROOFSTEP]\nunfold Matrix\n[GOAL]\nn : Type ?u.20\nm : Type ?u.8\ninst✝⁴ : Fintype m\ninst✝³ : DecidableEq m\ninst✝² : Fintype n\ninst✝¹ : DecidableEq n\nR : Type ?u.35\ninst✝ : Fintype R\n⊢ Fintype (m → n → R)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nR : Type u_1\ninst✝² : Semiring R\nl : Type u_2\nm : Type u_3\nn : Type u_4\ninst✝¹ : Fintype m\ninst✝ : DecidableEq m\nM : Matrix m n R\ni : m\nj : n\n⊢ vecMul (↑(LinearMap.stdBasis R (fun x => R) i) 1) M j = M i j\n[PROOFSTEP]\nhave : (∑ i', (if i = i' then 1 else 0) * M i' j) = M i j := by\n  simp_rw [boole_mul, Finset.sum_ite_eq, Finset.mem_univ, if_true]\n[GOAL]\nR : Type u_1\ninst✝² : Semiring R\nl : Type u_2\nm : Type u_3\nn : Type u_4\ninst✝¹ : Fintype m\ninst✝ : DecidableEq m\nM : Matrix m n R\ni : m\nj : n\n⊢ ∑ i' : m, (if i = i' then 1 else 0) * M i' j = M i j\n[PROOFSTEP]\nsimp_rw [boole_mul, Finset.sum_ite_eq, Finset.mem_univ, if_true]\n[GOAL]\nR : Type u_1\ninst✝² : Semiring R\nl : Type u_2\nm : Type u_3\nn : Type u_4\ninst✝¹ : Fintype m\ninst✝ : DecidableEq m\nM : Matrix m n R\ni : m\nj : n\nthis : ∑ i' : m, (if i = i' then 1 else 0) * M i' j = M i j\n⊢ vecMul (↑(LinearMap.stdBasis R (fun x => R) i) 1) M j = M i j\n[PROOFSTEP]\nsimp only [vecMul, dotProduct]\n[GOAL]\nR : Type u_1\ninst✝² : Semiring R\nl : Type u_2\nm : Type u_3\nn : Type u_4\ninst✝¹ : Fintype m\ninst✝ : DecidableEq m\nM : Matrix m n R\ni : m\nj : n\nthis : ∑ i' : m, (if i = i' then 1 else 0) * M i' j = M i j\n⊢ ∑ x : m, ↑(LinearMap.stdBasis R (fun x => R) i) 1 x * M x j = M i j\n[PROOFSTEP]\nconvert this\n[GOAL]\ncase h.e'_2.a.h.e'_5\nR : Type u_1\ninst✝² : Semiring R\nl : Type u_2\nm : Type u_3\nn : Type u_4\ninst✝¹ : Fintype m\ninst✝ : DecidableEq m\nM : Matrix m n R\ni : m\nj : n\nthis : ∑ i' : m, (if i = i' then 1 else 0) * M i' j = M i j\nx✝ : m\na✝ : x✝ ∈ Finset.univ\n⊢ ↑(LinearMap.stdBasis R (fun x => R) i) 1 x✝ = if i = x✝ then 1 else 0\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nR : Type u_1\ninst✝² : Semiring R\nl : Type u_2\nm : Type u_3\nn : Type u_4\ninst✝¹ : Fintype m\ninst✝ : DecidableEq m\nM : Matrix m n R\ni : m\nj : n\nthis : ∑ i' : m, (if i = i' then 1 else 0) * M i' j = M i j\nx✝ : m\na✝ : x✝ ∈ Finset.univ\nh : i = x✝\n⊢ ↑(LinearMap.stdBasis R (fun x => R) i) 1 x✝ = 1\n[PROOFSTEP]\nsimp only [stdBasis_apply]\n[GOAL]\ncase neg\nR : Type u_1\ninst✝² : Semiring R\nl : Type u_2\nm : Type u_3\nn : Type u_4\ninst✝¹ : Fintype m\ninst✝ : DecidableEq m\nM : Matrix m n R\ni : m\nj : n\nthis : ∑ i' : m, (if i = i' then 1 else 0) * M i' j = M i j\nx✝ : m\na✝ : x✝ ∈ Finset.univ\nh : ¬i = x✝\n⊢ ↑(LinearMap.stdBasis R (fun x => R) i) 1 x✝ = 0\n[PROOFSTEP]\nsimp only [stdBasis_apply]\n[GOAL]\ncase pos\nR : Type u_1\ninst✝² : Semiring R\nl : Type u_2\nm : Type u_3\nn : Type u_4\ninst✝¹ : Fintype m\ninst✝ : DecidableEq m\nM : Matrix m n R\ni : m\nj : n\nthis : ∑ i' : m, (if i = i' then 1 else 0) * M i' j = M i j\nx✝ : m\na✝ : x✝ ∈ Finset.univ\nh : i = x✝\n⊢ Function.update 0 i 1 x✝ = 1\n[PROOFSTEP]\nrw [h, Function.update_same]\n[GOAL]\ncase neg\nR : Type u_1\ninst✝² : Semiring R\nl : Type u_2\nm : Type u_3\nn : Type u_4\ninst✝¹ : Fintype m\ninst✝ : DecidableEq m\nM : Matrix m n R\ni : m\nj : n\nthis : ∑ i' : m, (if i = i' then 1 else 0) * M i' j = M i j\nx✝ : m\na✝ : x✝ ∈ Finset.univ\nh : ¬i = x✝\n⊢ Function.update 0 i 1 x✝ = 0\n[PROOFSTEP]\nrw [Function.update_noteq (Ne.symm h), Pi.zero_apply]\n[GOAL]\nR : Type u_1\ninst✝² : Semiring R\nl : Type u_2\nm : Type u_3\nn : Type u_4\ninst✝¹ : Fintype m\ninst✝ : DecidableEq m\nf g : (m → R) →ₗ[R] n → R\n⊢ (fun f i j => ↑f (↑(stdBasis R (fun x => R) i) 1) j) (f + g) =\n    (fun f i j => ↑f (↑(stdBasis R (fun x => R) i) 1) j) f + (fun f i j => ↑f (↑(stdBasis R (fun x => R) i) 1) j) g\n[PROOFSTEP]\next i j\n[GOAL]\ncase a.h\nR : Type u_1\ninst✝² : Semiring R\nl : Type u_2\nm : Type u_3\nn : Type u_4\ninst✝¹ : Fintype m\ninst✝ : DecidableEq m\nf g : (m → R) →ₗ[R] n → R\ni : m\nj : n\n⊢ (fun f i j => ↑f (↑(stdBasis R (fun x => R) i) 1) j) (f + g) i j =\n    ((fun f i j => ↑f (↑(stdBasis R (fun x => R) i) 1) j) f + (fun f i j => ↑f (↑(stdBasis R (fun x => R) i) 1) j) g) i\n      j\n[PROOFSTEP]\nsimp only [Pi.add_apply, LinearMap.add_apply, Matrix.add_apply]\n[GOAL]\nR : Type u_1\ninst✝² : Semiring R\nl : Type u_2\nm : Type u_3\nn : Type u_4\ninst✝¹ : Fintype m\ninst✝ : DecidableEq m\nc : Rᵐᵒᵖ\nf : (m → R) →ₗ[R] n → R\n⊢ AddHom.toFun\n      { toFun := fun f i j => ↑f (↑(stdBasis R (fun x => R) i) 1) j,\n        map_add' :=\n          (_ :\n            ∀ (f g : (m → R) →ₗ[R] n → R),\n              (fun f i j => ↑f (↑(stdBasis R (fun x => R) i) 1) j) (f + g) =\n                (fun f i j => ↑f (↑(stdBasis R (fun x => R) i) 1) j) f +\n                  (fun f i j => ↑f (↑(stdBasis R (fun x => R) i) 1) j) g) }\n      (c • f) =\n    ↑(RingHom.id Rᵐᵒᵖ) c •\n      AddHom.toFun\n        { toFun := fun f i j => ↑f (↑(stdBasis R (fun x => R) i) 1) j,\n          map_add' :=\n            (_ :\n              ∀ (f g : (m → R) →ₗ[R] n → R),\n                (fun f i j => ↑f (↑(stdBasis R (fun x => R) i) 1) j) (f + g) =\n                  (fun f i j => ↑f (↑(stdBasis R (fun x => R) i) 1) j) f +\n                    (fun f i j => ↑f (↑(stdBasis R (fun x => R) i) 1) j) g) }\n        f\n[PROOFSTEP]\next i j\n[GOAL]\ncase a.h\nR : Type u_1\ninst✝² : Semiring R\nl : Type u_2\nm : Type u_3\nn : Type u_4\ninst✝¹ : Fintype m\ninst✝ : DecidableEq m\nc : Rᵐᵒᵖ\nf : (m → R) →ₗ[R] n → R\ni : m\nj : n\n⊢ AddHom.toFun\n      { toFun := fun f i j => ↑f (↑(stdBasis R (fun x => R) i) 1) j,\n        map_add' :=\n          (_ :\n            ∀ (f g : (m → R) →ₗ[R] n → R),\n              (fun f i j => ↑f (↑(stdBasis R (fun x => R) i) 1) j) (f + g) =\n                (fun f i j => ↑f (↑(stdBasis R (fun x => R) i) 1) j) f +\n                  (fun f i j => ↑f (↑(stdBasis R (fun x => R) i) 1) j) g) }\n      (c • f) i j =\n    (↑(RingHom.id Rᵐᵒᵖ) c •\n        AddHom.toFun\n          { toFun := fun f i j => ↑f (↑(stdBasis R (fun x => R) i) 1) j,\n            map_add' :=\n              (_ :\n                ∀ (f g : (m → R) →ₗ[R] n → R),\n                  (fun f i j => ↑f (↑(stdBasis R (fun x => R) i) 1) j) (f + g) =\n                    (fun f i j => ↑f (↑(stdBasis R (fun x => R) i) 1) j) f +\n                      (fun f i j => ↑f (↑(stdBasis R (fun x => R) i) 1) j) g) }\n          f)\n      i j\n[PROOFSTEP]\nsimp only [Pi.smul_apply, LinearMap.smul_apply, RingHom.id_apply, Matrix.smul_apply]\n[GOAL]\nR : Type u_1\ninst✝² : Semiring R\nl : Type u_2\nm : Type u_3\nn : Type u_4\ninst✝¹ : Fintype m\ninst✝ : DecidableEq m\nf : (m → R) →ₗ[R] n → R\n⊢ vecMulLinear\n      (AddHom.toFun\n        {\n            toAddHom :=\n              { toFun := fun f i j => ↑f (↑(stdBasis R (fun x => R) i) 1) j,\n                map_add' :=\n                  (_ :\n                    ∀ (f g : (m → R) →ₗ[R] n → R),\n                      (fun f i j => ↑f (↑(stdBasis R (fun x => R) i) 1) j) (f + g) =\n                        (fun f i j => ↑f (↑(stdBasis R (fun x => R) i) 1) j) f +\n                          (fun f i j => ↑f (↑(stdBasis R (fun x => R) i) 1) j) g) },\n            map_smul' :=\n              (_ :\n                ∀ (c : Rᵐᵒᵖ) (f : (m → R) →ₗ[R] n → R),\n                  AddHom.toFun\n                      { toFun := fun f i j => ↑f (↑(stdBasis R (fun x => R) i) 1) j,\n                        map_add' :=\n                          (_ :\n                            ∀ (f g : (m → R) →ₗ[R] n → R),\n                              (fun f i j => ↑f (↑(stdBasis R (fun x => R) i) 1) j) (f + g) =\n                                (fun f i j => ↑f (↑(stdBasis R (fun x => R) i) 1) j) f +\n                                  (fun f i j => ↑f (↑(stdBasis R (fun x => R) i) 1) j) g) }\n                      (c • f) =\n                    ↑(RingHom.id Rᵐᵒᵖ) c •\n                      AddHom.toFun\n                        { toFun := fun f i j => ↑f (↑(stdBasis R (fun x => R) i) 1) j,\n                          map_add' :=\n                            (_ :\n                              ∀ (f g : (m → R) →ₗ[R] n → R),\n                                (fun f i j => ↑f (↑(stdBasis R (fun x => R) i) 1) j) (f + g) =\n                                  (fun f i j => ↑f (↑(stdBasis R (fun x => R) i) 1) j) f +\n                                    (fun f i j => ↑f (↑(stdBasis R (fun x => R) i) 1) j) g) }\n                        f) }.toAddHom\n        f) =\n    f\n[PROOFSTEP]\napply (Pi.basisFun R m).ext\n[GOAL]\nR : Type u_1\ninst✝² : Semiring R\nl : Type u_2\nm : Type u_3\nn : Type u_4\ninst✝¹ : Fintype m\ninst✝ : DecidableEq m\nf : (m → R) →ₗ[R] n → R\n⊢ ∀ (i : m),\n    ↑(vecMulLinear\n            (AddHom.toFun\n              {\n                  toAddHom :=\n                    { toFun := fun f i j => ↑f (↑(stdBasis R (fun x => R) i) 1) j,\n                      map_add' :=\n                        (_ :\n                          ∀ (f g : (m → R) →ₗ[R] n → R),\n                            (fun f i j => ↑f (↑(stdBasis R (fun x => R) i) 1) j) (f + g) =\n                              (fun f i j => ↑f (↑(stdBasis R (fun x => R) i) 1) j) f +\n                                (fun f i j => ↑f (↑(stdBasis R (fun x => R) i) 1) j) g) },\n                  map_smul' :=\n                    (_ :\n                      ∀ (c : Rᵐᵒᵖ) (f : (m → R) →ₗ[R] n → R),\n                        AddHom.toFun\n                            { toFun := fun f i j => ↑f (↑(stdBasis R (fun x => R) i) 1) j,\n                              map_add' :=\n                                (_ :\n                                  ∀ (f g : (m → R) →ₗ[R] n → R),\n                                    (fun f i j => ↑f (↑(stdBasis R (fun x => R) i) 1) j) (f + g) =\n                                      (fun f i j => ↑f (↑(stdBasis R (fun x => R) i) 1) j) f +\n                                        (fun f i j => ↑f (↑(stdBasis R (fun x => R) i) 1) j) g) }\n                            (c • f) =\n                          ↑(RingHom.id Rᵐᵒᵖ) c •\n                            AddHom.toFun\n                              { toFun := fun f i j => ↑f (↑(stdBasis R (fun x => R) i) 1) j,\n                                map_add' :=\n                                  (_ :\n                                    ∀ (f g : (m → R) →ₗ[R] n → R),\n                                      (fun f i j => ↑f (↑(stdBasis R (fun x => R) i) 1) j) (f + g) =\n                                        (fun f i j => ↑f (↑(stdBasis R (fun x => R) i) 1) j) f +\n                                          (fun f i j => ↑f (↑(stdBasis R (fun x => R) i) 1) j) g) }\n                              f) }.toAddHom\n              f))\n        (↑(Pi.basisFun R m) i) =\n      ↑f (↑(Pi.basisFun R m) i)\n[PROOFSTEP]\nintro j\n[GOAL]\nR : Type u_1\ninst✝² : Semiring R\nl : Type u_2\nm : Type u_3\nn : Type u_4\ninst✝¹ : Fintype m\ninst✝ : DecidableEq m\nf : (m → R) →ₗ[R] n → R\nj : m\n⊢ ↑(vecMulLinear\n          (AddHom.toFun\n            {\n                toAddHom :=\n                  { toFun := fun f i j => ↑f (↑(stdBasis R (fun x => R) i) 1) j,\n                    map_add' :=\n                      (_ :\n                        ∀ (f g : (m → R) →ₗ[R] n → R),\n                          (fun f i j => ↑f (↑(stdBasis R (fun x => R) i) 1) j) (f + g) =\n                            (fun f i j => ↑f (↑(stdBasis R (fun x => R) i) 1) j) f +\n                              (fun f i j => ↑f (↑(stdBasis R (fun x => R) i) 1) j) g) },\n                map_smul' :=\n                  (_ :\n                    ∀ (c : Rᵐᵒᵖ) (f : (m → R) →ₗ[R] n → R),\n                      AddHom.toFun\n                          { toFun := fun f i j => ↑f (↑(stdBasis R (fun x => R) i) 1) j,\n                            map_add' :=\n                              (_ :\n                                ∀ (f g : (m → R) →ₗ[R] n → R),\n                                  (fun f i j => ↑f (↑(stdBasis R (fun x => R) i) 1) j) (f + g) =\n                                    (fun f i j => ↑f (↑(stdBasis R (fun x => R) i) 1) j) f +\n                                      (fun f i j => ↑f (↑(stdBasis R (fun x => R) i) 1) j) g) }\n                          (c • f) =\n                        ↑(RingHom.id Rᵐᵒᵖ) c •\n                          AddHom.toFun\n                            { toFun := fun f i j => ↑f (↑(stdBasis R (fun x => R) i) 1) j,\n                              map_add' :=\n                                (_ :\n                                  ∀ (f g : (m → R) →ₗ[R] n → R),\n                                    (fun f i j => ↑f (↑(stdBasis R (fun x => R) i) 1) j) (f + g) =\n                                      (fun f i j => ↑f (↑(stdBasis R (fun x => R) i) 1) j) f +\n                                        (fun f i j => ↑f (↑(stdBasis R (fun x => R) i) 1) j) g) }\n                            f) }.toAddHom\n            f))\n      (↑(Pi.basisFun R m) j) =\n    ↑f (↑(Pi.basisFun R m) j)\n[PROOFSTEP]\next i\n[GOAL]\ncase h\nR : Type u_1\ninst✝² : Semiring R\nl : Type u_2\nm : Type u_3\nn : Type u_4\ninst✝¹ : Fintype m\ninst✝ : DecidableEq m\nf : (m → R) →ₗ[R] n → R\nj : m\ni : n\n⊢ ↑(vecMulLinear\n          (AddHom.toFun\n            {\n                toAddHom :=\n                  { toFun := fun f i j => ↑f (↑(stdBasis R (fun x => R) i) 1) j,\n                    map_add' :=\n                      (_ :\n                        ∀ (f g : (m → R) →ₗ[R] n → R),\n                          (fun f i j => ↑f (↑(stdBasis R (fun x => R) i) 1) j) (f + g) =\n                            (fun f i j => ↑f (↑(stdBasis R (fun x => R) i) 1) j) f +\n                              (fun f i j => ↑f (↑(stdBasis R (fun x => R) i) 1) j) g) },\n                map_smul' :=\n                  (_ :\n                    ∀ (c : Rᵐᵒᵖ) (f : (m → R) →ₗ[R] n → R),\n                      AddHom.toFun\n                          { toFun := fun f i j => ↑f (↑(stdBasis R (fun x => R) i) 1) j,\n                            map_add' :=\n                              (_ :\n                                ∀ (f g : (m → R) →ₗ[R] n → R),\n                                  (fun f i j => ↑f (↑(stdBasis R (fun x => R) i) 1) j) (f + g) =\n                                    (fun f i j => ↑f (↑(stdBasis R (fun x => R) i) 1) j) f +\n                                      (fun f i j => ↑f (↑(stdBasis R (fun x => R) i) 1) j) g) }\n                          (c • f) =\n                        ↑(RingHom.id Rᵐᵒᵖ) c •\n                          AddHom.toFun\n                            { toFun := fun f i j => ↑f (↑(stdBasis R (fun x => R) i) 1) j,\n                              map_add' :=\n                                (_ :\n                                  ∀ (f g : (m → R) →ₗ[R] n → R),\n                                    (fun f i j => ↑f (↑(stdBasis R (fun x => R) i) 1) j) (f + g) =\n                                      (fun f i j => ↑f (↑(stdBasis R (fun x => R) i) 1) j) f +\n                                        (fun f i j => ↑f (↑(stdBasis R (fun x => R) i) 1) j) g) }\n                            f) }.toAddHom\n            f))\n      (↑(Pi.basisFun R m) j) i =\n    ↑f (↑(Pi.basisFun R m) j) i\n[PROOFSTEP]\nsimp only [Pi.basisFun_apply, Matrix.vecMul_stdBasis, Matrix.vecMulLinear_apply]\n[GOAL]\nR : Type u_1\ninst✝² : Semiring R\nl : Type u_2\nm : Type u_3\nn : Type u_4\ninst✝¹ : Fintype m\ninst✝ : DecidableEq m\nM : Matrix m n R\n⊢ AddHom.toFun\n      {\n          toAddHom :=\n            { toFun := fun f i j => ↑f (↑(stdBasis R (fun x => R) i) 1) j,\n              map_add' :=\n                (_ :\n                  ∀ (f g : (m → R) →ₗ[R] n → R),\n                    (fun f i j => ↑f (↑(stdBasis R (fun x => R) i) 1) j) (f + g) =\n                      (fun f i j => ↑f (↑(stdBasis R (fun x => R) i) 1) j) f +\n                        (fun f i j => ↑f (↑(stdBasis R (fun x => R) i) 1) j) g) },\n          map_smul' :=\n            (_ :\n              ∀ (c : Rᵐᵒᵖ) (f : (m → R) →ₗ[R] n → R),\n                AddHom.toFun\n                    { toFun := fun f i j => ↑f (↑(stdBasis R (fun x => R) i) 1) j,\n                      map_add' :=\n                        (_ :\n                          ∀ (f g : (m → R) →ₗ[R] n → R),\n                            (fun f i j => ↑f (↑(stdBasis R (fun x => R) i) 1) j) (f + g) =\n                              (fun f i j => ↑f (↑(stdBasis R (fun x => R) i) 1) j) f +\n                                (fun f i j => ↑f (↑(stdBasis R (fun x => R) i) 1) j) g) }\n                    (c • f) =\n                  ↑(RingHom.id Rᵐᵒᵖ) c •\n                    AddHom.toFun\n                      { toFun := fun f i j => ↑f (↑(stdBasis R (fun x => R) i) 1) j,\n                        map_add' :=\n                          (_ :\n                            ∀ (f g : (m → R) →ₗ[R] n → R),\n                              (fun f i j => ↑f (↑(stdBasis R (fun x => R) i) 1) j) (f + g) =\n                                (fun f i j => ↑f (↑(stdBasis R (fun x => R) i) 1) j) f +\n                                  (fun f i j => ↑f (↑(stdBasis R (fun x => R) i) 1) j) g) }\n                      f) }.toAddHom\n      (vecMulLinear M) =\n    M\n[PROOFSTEP]\next i j\n[GOAL]\ncase a.h\nR : Type u_1\ninst✝² : Semiring R\nl : Type u_2\nm : Type u_3\nn : Type u_4\ninst✝¹ : Fintype m\ninst✝ : DecidableEq m\nM : Matrix m n R\ni : m\nj : n\n⊢ AddHom.toFun\n      {\n          toAddHom :=\n            { toFun := fun f i j => ↑f (↑(stdBasis R (fun x => R) i) 1) j,\n              map_add' :=\n                (_ :\n                  ∀ (f g : (m → R) →ₗ[R] n → R),\n                    (fun f i j => ↑f (↑(stdBasis R (fun x => R) i) 1) j) (f + g) =\n                      (fun f i j => ↑f (↑(stdBasis R (fun x => R) i) 1) j) f +\n                        (fun f i j => ↑f (↑(stdBasis R (fun x => R) i) 1) j) g) },\n          map_smul' :=\n            (_ :\n              ∀ (c : Rᵐᵒᵖ) (f : (m → R) →ₗ[R] n → R),\n                AddHom.toFun\n                    { toFun := fun f i j => ↑f (↑(stdBasis R (fun x => R) i) 1) j,\n                      map_add' :=\n                        (_ :\n                          ∀ (f g : (m → R) →ₗ[R] n → R),\n                            (fun f i j => ↑f (↑(stdBasis R (fun x => R) i) 1) j) (f + g) =\n                              (fun f i j => ↑f (↑(stdBasis R (fun x => R) i) 1) j) f +\n                                (fun f i j => ↑f (↑(stdBasis R (fun x => R) i) 1) j) g) }\n                    (c • f) =\n                  ↑(RingHom.id Rᵐᵒᵖ) c •\n                    AddHom.toFun\n                      { toFun := fun f i j => ↑f (↑(stdBasis R (fun x => R) i) 1) j,\n                        map_add' :=\n                          (_ :\n                            ∀ (f g : (m → R) →ₗ[R] n → R),\n                              (fun f i j => ↑f (↑(stdBasis R (fun x => R) i) 1) j) (f + g) =\n                                (fun f i j => ↑f (↑(stdBasis R (fun x => R) i) 1) j) f +\n                                  (fun f i j => ↑f (↑(stdBasis R (fun x => R) i) 1) j) g) }\n                      f) }.toAddHom\n      (vecMulLinear M) i j =\n    M i j\n[PROOFSTEP]\nsimp only [Matrix.vecMul_stdBasis, Matrix.vecMulLinear_apply]\n[GOAL]\nR : Type u_1\ninst✝² : Semiring R\nl : Type u_2\nm : Type u_3\nn : Type u_4\ninst✝¹ : Fintype m\ninst✝ : DecidableEq m\n⊢ ↑toLinearMapRight' 1 = LinearMap.id\n[PROOFSTEP]\next\n[GOAL]\ncase h.h.h\nR : Type u_1\ninst✝² : Semiring R\nl : Type u_2\nm : Type u_3\nn : Type u_4\ninst✝¹ : Fintype m\ninst✝ : DecidableEq m\ni✝ x✝ : m\n⊢ ↑(comp (↑toLinearMapRight' 1) (single i✝)) 1 x✝ = ↑(comp LinearMap.id (single i✝)) 1 x✝\n[PROOFSTEP]\nsimp [LinearMap.one_apply, stdBasis_apply]\n[GOAL]\nR : Type u_1\ninst✝⁴ : Semiring R\nl : Type u_2\nm : Type u_3\nn : Type u_4\ninst✝³ : Fintype m\ninst✝² : DecidableEq m\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nM : Matrix m n R\nM' : Matrix n m R\nhMM' : M * M' = 1\nhM'M : M' * M = 1\nsrc✝ : (fun x => (n → R) →ₗ[R] m → R) M' := ↑(LinearEquiv.symm toMatrixRight') M'\nx : n → R\n⊢ ↑(↑toLinearMapRight' M)\n      (AddHom.toFun\n        {\n            toAddHom :=\n              { toFun := ↑(↑toLinearMapRight' M'),\n                map_add' :=\n                  (_ :\n                    ∀ (x y : n → R),\n                      AddHom.toFun src✝.toAddHom (x + y) =\n                        AddHom.toFun src✝.toAddHom x + AddHom.toFun src✝.toAddHom y) },\n            map_smul' :=\n              (_ :\n                ∀ (r : R) (x : n → R),\n                  AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n        x) =\n    x\n[PROOFSTEP]\ndsimp only\n  -- porting note: needed due to non-flat structures\n[GOAL]\nR : Type u_1\ninst✝⁴ : Semiring R\nl : Type u_2\nm : Type u_3\nn : Type u_4\ninst✝³ : Fintype m\ninst✝² : DecidableEq m\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nM : Matrix m n R\nM' : Matrix n m R\nhMM' : M * M' = 1\nhM'M : M' * M = 1\nsrc✝ : (fun x => (n → R) →ₗ[R] m → R) M' := ↑(LinearEquiv.symm toMatrixRight') M'\nx : n → R\n⊢ ↑(↑toLinearMapRight' M) (↑(↑toLinearMapRight' M') x) = x\n[PROOFSTEP]\nrw [← Matrix.toLinearMapRight'_mul_apply, hM'M, Matrix.toLinearMapRight'_one, id_apply]\n[GOAL]\nR : Type u_1\ninst✝⁴ : Semiring R\nl : Type u_2\nm : Type u_3\nn : Type u_4\ninst✝³ : Fintype m\ninst✝² : DecidableEq m\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nM : Matrix m n R\nM' : Matrix n m R\nhMM' : M * M' = 1\nhM'M : M' * M = 1\nsrc✝ : (fun x => (n → R) →ₗ[R] m → R) M' := ↑(LinearEquiv.symm toMatrixRight') M'\nx : m → R\n⊢ AddHom.toFun\n      {\n          toAddHom :=\n            { toFun := ↑(↑toLinearMapRight' M'),\n              map_add' :=\n                (_ :\n                  ∀ (x y : n → R),\n                    AddHom.toFun src✝.toAddHom (x + y) = AddHom.toFun src✝.toAddHom x + AddHom.toFun src✝.toAddHom y) },\n          map_smul' :=\n            (_ :\n              ∀ (r : R) (x : n → R),\n                AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n      (↑(↑toLinearMapRight' M) x) =\n    x\n[PROOFSTEP]\ndsimp only\n  -- porting note: needed due to non-flat structures\n[GOAL]\nR : Type u_1\ninst✝⁴ : Semiring R\nl : Type u_2\nm : Type u_3\nn : Type u_4\ninst✝³ : Fintype m\ninst✝² : DecidableEq m\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nM : Matrix m n R\nM' : Matrix n m R\nhMM' : M * M' = 1\nhM'M : M' * M = 1\nsrc✝ : (fun x => (n → R) →ₗ[R] m → R) M' := ↑(LinearEquiv.symm toMatrixRight') M'\nx : m → R\n⊢ ↑(↑toLinearMapRight' M') (↑(↑toLinearMapRight' M) x) = x\n[PROOFSTEP]\nrw [← Matrix.toLinearMapRight'_mul_apply, hMM', Matrix.toLinearMapRight'_one, id_apply]\n[GOAL]\nR : Type u_1\ninst✝² : CommSemiring R\nk : Type u_2\nl : Type u_3\nm : Type u_4\nn : Type u_5\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\n⊢ mulVecLin 1 = LinearMap.id\n[PROOFSTEP]\next\n[GOAL]\ncase h.h.h\nR : Type u_1\ninst✝² : CommSemiring R\nk : Type u_2\nl : Type u_3\nm : Type u_4\nn : Type u_5\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\ni✝ x✝ : n\n⊢ ↑(comp (mulVecLin 1) (single i✝)) 1 x✝ = ↑(comp LinearMap.id (single i✝)) 1 x✝\n[PROOFSTEP]\nsimp [Matrix.one_apply, Pi.single_apply]\n[GOAL]\nR : Type u_1\ninst✝¹ : CommSemiring R\nk : Type u_2\nl : Type u_3\nm : Type u_4\nn : Type u_5\ninst✝ : Fintype n\nM : Matrix n n R\n⊢ ker (mulVecLin M) = ⊥ ↔ ∀ (v : n → R), mulVec M v = 0 → v = 0\n[PROOFSTEP]\nsimp only [Submodule.eq_bot_iff, LinearMap.mem_ker, Matrix.mulVecLin_apply]\n[GOAL]\nR : Type u_1\ninst✝¹ : CommSemiring R\nk : Type u_2\nl : Type u_3\nm : Type u_4\nn : Type u_5\ninst✝ : Fintype n\nM : Matrix m n R\n⊢ LinearMap.range (mulVecLin M) = span R (Set.range Mᵀ)\n[PROOFSTEP]\nletI := Classical.decEq n\n[GOAL]\nR : Type u_1\ninst✝¹ : CommSemiring R\nk : Type u_2\nl : Type u_3\nm : Type u_4\nn : Type u_5\ninst✝ : Fintype n\nM : Matrix m n R\nthis : DecidableEq n := Classical.decEq n\n⊢ LinearMap.range (mulVecLin M) = span R (Set.range Mᵀ)\n[PROOFSTEP]\nsimp_rw [range_eq_map, ← iSup_range_stdBasis, Submodule.map_iSup, range_eq_map, ← Ideal.span_singleton_one, Ideal.span,\n  Submodule.map_span, image_image, image_singleton, Matrix.mulVecLin_apply, M.mulVec_stdBasis_apply, iSup_span,\n  range_eq_iUnion]\n[GOAL]\nR : Type u_1\ninst✝² : CommSemiring R\nk : Type u_2\nl : Type u_3\nm : Type u_4\nn : Type u_5\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nf g : (n → R) →ₗ[R] m → R\n⊢ (fun f => ↑of fun i j => ↑f (↑(stdBasis R (fun x => R) j) 1) i) (f + g) =\n    (fun f => ↑of fun i j => ↑f (↑(stdBasis R (fun x => R) j) 1) i) f +\n      (fun f => ↑of fun i j => ↑f (↑(stdBasis R (fun x => R) j) 1) i) g\n[PROOFSTEP]\next i j\n[GOAL]\ncase a.h\nR : Type u_1\ninst✝² : CommSemiring R\nk : Type u_2\nl : Type u_3\nm : Type u_4\nn : Type u_5\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nf g : (n → R) →ₗ[R] m → R\ni : m\nj : n\n⊢ (fun f => ↑of fun i j => ↑f (↑(stdBasis R (fun x => R) j) 1) i) (f + g) i j =\n    ((fun f => ↑of fun i j => ↑f (↑(stdBasis R (fun x => R) j) 1) i) f +\n        (fun f => ↑of fun i j => ↑f (↑(stdBasis R (fun x => R) j) 1) i) g)\n      i j\n[PROOFSTEP]\nsimp only [Pi.add_apply, LinearMap.add_apply, of_apply, Matrix.add_apply]\n[GOAL]\nR : Type u_1\ninst✝² : CommSemiring R\nk : Type u_2\nl : Type u_3\nm : Type u_4\nn : Type u_5\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nc : R\nf : (n → R) →ₗ[R] m → R\n⊢ AddHom.toFun\n      { toFun := fun f => ↑of fun i j => ↑f (↑(stdBasis R (fun x => R) j) 1) i,\n        map_add' :=\n          (_ :\n            ∀ (f g : (n → R) →ₗ[R] m → R),\n              (fun f => ↑of fun i j => ↑f (↑(stdBasis R (fun x => R) j) 1) i) (f + g) =\n                (fun f => ↑of fun i j => ↑f (↑(stdBasis R (fun x => R) j) 1) i) f +\n                  (fun f => ↑of fun i j => ↑f (↑(stdBasis R (fun x => R) j) 1) i) g) }\n      (c • f) =\n    ↑(RingHom.id R) c •\n      AddHom.toFun\n        { toFun := fun f => ↑of fun i j => ↑f (↑(stdBasis R (fun x => R) j) 1) i,\n          map_add' :=\n            (_ :\n              ∀ (f g : (n → R) →ₗ[R] m → R),\n                (fun f => ↑of fun i j => ↑f (↑(stdBasis R (fun x => R) j) 1) i) (f + g) =\n                  (fun f => ↑of fun i j => ↑f (↑(stdBasis R (fun x => R) j) 1) i) f +\n                    (fun f => ↑of fun i j => ↑f (↑(stdBasis R (fun x => R) j) 1) i) g) }\n        f\n[PROOFSTEP]\next i j\n[GOAL]\ncase a.h\nR : Type u_1\ninst✝² : CommSemiring R\nk : Type u_2\nl : Type u_3\nm : Type u_4\nn : Type u_5\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nc : R\nf : (n → R) →ₗ[R] m → R\ni : m\nj : n\n⊢ AddHom.toFun\n      { toFun := fun f => ↑of fun i j => ↑f (↑(stdBasis R (fun x => R) j) 1) i,\n        map_add' :=\n          (_ :\n            ∀ (f g : (n → R) →ₗ[R] m → R),\n              (fun f => ↑of fun i j => ↑f (↑(stdBasis R (fun x => R) j) 1) i) (f + g) =\n                (fun f => ↑of fun i j => ↑f (↑(stdBasis R (fun x => R) j) 1) i) f +\n                  (fun f => ↑of fun i j => ↑f (↑(stdBasis R (fun x => R) j) 1) i) g) }\n      (c • f) i j =\n    (↑(RingHom.id R) c •\n        AddHom.toFun\n          { toFun := fun f => ↑of fun i j => ↑f (↑(stdBasis R (fun x => R) j) 1) i,\n            map_add' :=\n              (_ :\n                ∀ (f g : (n → R) →ₗ[R] m → R),\n                  (fun f => ↑of fun i j => ↑f (↑(stdBasis R (fun x => R) j) 1) i) (f + g) =\n                    (fun f => ↑of fun i j => ↑f (↑(stdBasis R (fun x => R) j) 1) i) f +\n                      (fun f => ↑of fun i j => ↑f (↑(stdBasis R (fun x => R) j) 1) i) g) }\n          f)\n      i j\n[PROOFSTEP]\nsimp only [Pi.smul_apply, LinearMap.smul_apply, RingHom.id_apply, of_apply, Matrix.smul_apply]\n[GOAL]\nR : Type u_1\ninst✝² : CommSemiring R\nk : Type u_2\nl : Type u_3\nm : Type u_4\nn : Type u_5\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nf : (n → R) →ₗ[R] m → R\n⊢ mulVecLin\n      (AddHom.toFun\n        {\n            toAddHom :=\n              { toFun := fun f => ↑of fun i j => ↑f (↑(stdBasis R (fun x => R) j) 1) i,\n                map_add' :=\n                  (_ :\n                    ∀ (f g : (n → R) →ₗ[R] m → R),\n                      (fun f => ↑of fun i j => ↑f (↑(stdBasis R (fun x => R) j) 1) i) (f + g) =\n                        (fun f => ↑of fun i j => ↑f (↑(stdBasis R (fun x => R) j) 1) i) f +\n                          (fun f => ↑of fun i j => ↑f (↑(stdBasis R (fun x => R) j) 1) i) g) },\n            map_smul' :=\n              (_ :\n                ∀ (c : R) (f : (n → R) →ₗ[R] m → R),\n                  AddHom.toFun\n                      { toFun := fun f => ↑of fun i j => ↑f (↑(stdBasis R (fun x => R) j) 1) i,\n                        map_add' :=\n                          (_ :\n                            ∀ (f g : (n → R) →ₗ[R] m → R),\n                              (fun f => ↑of fun i j => ↑f (↑(stdBasis R (fun x => R) j) 1) i) (f + g) =\n                                (fun f => ↑of fun i j => ↑f (↑(stdBasis R (fun x => R) j) 1) i) f +\n                                  (fun f => ↑of fun i j => ↑f (↑(stdBasis R (fun x => R) j) 1) i) g) }\n                      (c • f) =\n                    ↑(RingHom.id R) c •\n                      AddHom.toFun\n                        { toFun := fun f => ↑of fun i j => ↑f (↑(stdBasis R (fun x => R) j) 1) i,\n                          map_add' :=\n                            (_ :\n                              ∀ (f g : (n → R) →ₗ[R] m → R),\n                                (fun f => ↑of fun i j => ↑f (↑(stdBasis R (fun x => R) j) 1) i) (f + g) =\n                                  (fun f => ↑of fun i j => ↑f (↑(stdBasis R (fun x => R) j) 1) i) f +\n                                    (fun f => ↑of fun i j => ↑f (↑(stdBasis R (fun x => R) j) 1) i) g) }\n                        f) }.toAddHom\n        f) =\n    f\n[PROOFSTEP]\napply (Pi.basisFun R n).ext\n[GOAL]\nR : Type u_1\ninst✝² : CommSemiring R\nk : Type u_2\nl : Type u_3\nm : Type u_4\nn : Type u_5\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nf : (n → R) →ₗ[R] m → R\n⊢ ∀ (i : n),\n    ↑(mulVecLin\n            (AddHom.toFun\n              {\n                  toAddHom :=\n                    { toFun := fun f => ↑of fun i j => ↑f (↑(stdBasis R (fun x => R) j) 1) i,\n                      map_add' :=\n                        (_ :\n                          ∀ (f g : (n → R) →ₗ[R] m → R),\n                            (fun f => ↑of fun i j => ↑f (↑(stdBasis R (fun x => R) j) 1) i) (f + g) =\n                              (fun f => ↑of fun i j => ↑f (↑(stdBasis R (fun x => R) j) 1) i) f +\n                                (fun f => ↑of fun i j => ↑f (↑(stdBasis R (fun x => R) j) 1) i) g) },\n                  map_smul' :=\n                    (_ :\n                      ∀ (c : R) (f : (n → R) →ₗ[R] m → R),\n                        AddHom.toFun\n                            { toFun := fun f => ↑of fun i j => ↑f (↑(stdBasis R (fun x => R) j) 1) i,\n                              map_add' :=\n                                (_ :\n                                  ∀ (f g : (n → R) →ₗ[R] m → R),\n                                    (fun f => ↑of fun i j => ↑f (↑(stdBasis R (fun x => R) j) 1) i) (f + g) =\n                                      (fun f => ↑of fun i j => ↑f (↑(stdBasis R (fun x => R) j) 1) i) f +\n                                        (fun f => ↑of fun i j => ↑f (↑(stdBasis R (fun x => R) j) 1) i) g) }\n                            (c • f) =\n                          ↑(RingHom.id R) c •\n                            AddHom.toFun\n                              { toFun := fun f => ↑of fun i j => ↑f (↑(stdBasis R (fun x => R) j) 1) i,\n                                map_add' :=\n                                  (_ :\n                                    ∀ (f g : (n → R) →ₗ[R] m → R),\n                                      (fun f => ↑of fun i j => ↑f (↑(stdBasis R (fun x => R) j) 1) i) (f + g) =\n                                        (fun f => ↑of fun i j => ↑f (↑(stdBasis R (fun x => R) j) 1) i) f +\n                                          (fun f => ↑of fun i j => ↑f (↑(stdBasis R (fun x => R) j) 1) i) g) }\n                              f) }.toAddHom\n              f))\n        (↑(Pi.basisFun R n) i) =\n      ↑f (↑(Pi.basisFun R n) i)\n[PROOFSTEP]\nintro j\n[GOAL]\nR : Type u_1\ninst✝² : CommSemiring R\nk : Type u_2\nl : Type u_3\nm : Type u_4\nn : Type u_5\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nf : (n → R) →ₗ[R] m → R\nj : n\n⊢ ↑(mulVecLin\n          (AddHom.toFun\n            {\n                toAddHom :=\n                  { toFun := fun f => ↑of fun i j => ↑f (↑(stdBasis R (fun x => R) j) 1) i,\n                    map_add' :=\n                      (_ :\n                        ∀ (f g : (n → R) →ₗ[R] m → R),\n                          (fun f => ↑of fun i j => ↑f (↑(stdBasis R (fun x => R) j) 1) i) (f + g) =\n                            (fun f => ↑of fun i j => ↑f (↑(stdBasis R (fun x => R) j) 1) i) f +\n                              (fun f => ↑of fun i j => ↑f (↑(stdBasis R (fun x => R) j) 1) i) g) },\n                map_smul' :=\n                  (_ :\n                    ∀ (c : R) (f : (n → R) →ₗ[R] m → R),\n                      AddHom.toFun\n                          { toFun := fun f => ↑of fun i j => ↑f (↑(stdBasis R (fun x => R) j) 1) i,\n                            map_add' :=\n                              (_ :\n                                ∀ (f g : (n → R) →ₗ[R] m → R),\n                                  (fun f => ↑of fun i j => ↑f (↑(stdBasis R (fun x => R) j) 1) i) (f + g) =\n                                    (fun f => ↑of fun i j => ↑f (↑(stdBasis R (fun x => R) j) 1) i) f +\n                                      (fun f => ↑of fun i j => ↑f (↑(stdBasis R (fun x => R) j) 1) i) g) }\n                          (c • f) =\n                        ↑(RingHom.id R) c •\n                          AddHom.toFun\n                            { toFun := fun f => ↑of fun i j => ↑f (↑(stdBasis R (fun x => R) j) 1) i,\n                              map_add' :=\n                                (_ :\n                                  ∀ (f g : (n → R) →ₗ[R] m → R),\n                                    (fun f => ↑of fun i j => ↑f (↑(stdBasis R (fun x => R) j) 1) i) (f + g) =\n                                      (fun f => ↑of fun i j => ↑f (↑(stdBasis R (fun x => R) j) 1) i) f +\n                                        (fun f => ↑of fun i j => ↑f (↑(stdBasis R (fun x => R) j) 1) i) g) }\n                            f) }.toAddHom\n            f))\n      (↑(Pi.basisFun R n) j) =\n    ↑f (↑(Pi.basisFun R n) j)\n[PROOFSTEP]\next i\n[GOAL]\ncase h\nR : Type u_1\ninst✝² : CommSemiring R\nk : Type u_2\nl : Type u_3\nm : Type u_4\nn : Type u_5\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nf : (n → R) →ₗ[R] m → R\nj : n\ni : m\n⊢ ↑(mulVecLin\n          (AddHom.toFun\n            {\n                toAddHom :=\n                  { toFun := fun f => ↑of fun i j => ↑f (↑(stdBasis R (fun x => R) j) 1) i,\n                    map_add' :=\n                      (_ :\n                        ∀ (f g : (n → R) →ₗ[R] m → R),\n                          (fun f => ↑of fun i j => ↑f (↑(stdBasis R (fun x => R) j) 1) i) (f + g) =\n                            (fun f => ↑of fun i j => ↑f (↑(stdBasis R (fun x => R) j) 1) i) f +\n                              (fun f => ↑of fun i j => ↑f (↑(stdBasis R (fun x => R) j) 1) i) g) },\n                map_smul' :=\n                  (_ :\n                    ∀ (c : R) (f : (n → R) →ₗ[R] m → R),\n                      AddHom.toFun\n                          { toFun := fun f => ↑of fun i j => ↑f (↑(stdBasis R (fun x => R) j) 1) i,\n                            map_add' :=\n                              (_ :\n                                ∀ (f g : (n → R) →ₗ[R] m → R),\n                                  (fun f => ↑of fun i j => ↑f (↑(stdBasis R (fun x => R) j) 1) i) (f + g) =\n                                    (fun f => ↑of fun i j => ↑f (↑(stdBasis R (fun x => R) j) 1) i) f +\n                                      (fun f => ↑of fun i j => ↑f (↑(stdBasis R (fun x => R) j) 1) i) g) }\n                          (c • f) =\n                        ↑(RingHom.id R) c •\n                          AddHom.toFun\n                            { toFun := fun f => ↑of fun i j => ↑f (↑(stdBasis R (fun x => R) j) 1) i,\n                              map_add' :=\n                                (_ :\n                                  ∀ (f g : (n → R) →ₗ[R] m → R),\n                                    (fun f => ↑of fun i j => ↑f (↑(stdBasis R (fun x => R) j) 1) i) (f + g) =\n                                      (fun f => ↑of fun i j => ↑f (↑(stdBasis R (fun x => R) j) 1) i) f +\n                                        (fun f => ↑of fun i j => ↑f (↑(stdBasis R (fun x => R) j) 1) i) g) }\n                            f) }.toAddHom\n            f))\n      (↑(Pi.basisFun R n) j) i =\n    ↑f (↑(Pi.basisFun R n) j) i\n[PROOFSTEP]\nsimp only [Pi.basisFun_apply, Matrix.mulVec_stdBasis, Matrix.mulVecLin_apply, of_apply]\n[GOAL]\nR : Type u_1\ninst✝² : CommSemiring R\nk : Type u_2\nl : Type u_3\nm : Type u_4\nn : Type u_5\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nM : Matrix m n R\n⊢ AddHom.toFun\n      {\n          toAddHom :=\n            { toFun := fun f => ↑of fun i j => ↑f (↑(stdBasis R (fun x => R) j) 1) i,\n              map_add' :=\n                (_ :\n                  ∀ (f g : (n → R) →ₗ[R] m → R),\n                    (fun f => ↑of fun i j => ↑f (↑(stdBasis R (fun x => R) j) 1) i) (f + g) =\n                      (fun f => ↑of fun i j => ↑f (↑(stdBasis R (fun x => R) j) 1) i) f +\n                        (fun f => ↑of fun i j => ↑f (↑(stdBasis R (fun x => R) j) 1) i) g) },\n          map_smul' :=\n            (_ :\n              ∀ (c : R) (f : (n → R) →ₗ[R] m → R),\n                AddHom.toFun\n                    { toFun := fun f => ↑of fun i j => ↑f (↑(stdBasis R (fun x => R) j) 1) i,\n                      map_add' :=\n                        (_ :\n                          ∀ (f g : (n → R) →ₗ[R] m → R),\n                            (fun f => ↑of fun i j => ↑f (↑(stdBasis R (fun x => R) j) 1) i) (f + g) =\n                              (fun f => ↑of fun i j => ↑f (↑(stdBasis R (fun x => R) j) 1) i) f +\n                                (fun f => ↑of fun i j => ↑f (↑(stdBasis R (fun x => R) j) 1) i) g) }\n                    (c • f) =\n                  ↑(RingHom.id R) c •\n                    AddHom.toFun\n                      { toFun := fun f => ↑of fun i j => ↑f (↑(stdBasis R (fun x => R) j) 1) i,\n                        map_add' :=\n                          (_ :\n                            ∀ (f g : (n → R) →ₗ[R] m → R),\n                              (fun f => ↑of fun i j => ↑f (↑(stdBasis R (fun x => R) j) 1) i) (f + g) =\n                                (fun f => ↑of fun i j => ↑f (↑(stdBasis R (fun x => R) j) 1) i) f +\n                                  (fun f => ↑of fun i j => ↑f (↑(stdBasis R (fun x => R) j) 1) i) g) }\n                      f) }.toAddHom\n      (mulVecLin M) =\n    M\n[PROOFSTEP]\next i j\n[GOAL]\ncase a.h\nR : Type u_1\ninst✝² : CommSemiring R\nk : Type u_2\nl : Type u_3\nm : Type u_4\nn : Type u_5\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nM : Matrix m n R\ni : m\nj : n\n⊢ AddHom.toFun\n      {\n          toAddHom :=\n            { toFun := fun f => ↑of fun i j => ↑f (↑(stdBasis R (fun x => R) j) 1) i,\n              map_add' :=\n                (_ :\n                  ∀ (f g : (n → R) →ₗ[R] m → R),\n                    (fun f => ↑of fun i j => ↑f (↑(stdBasis R (fun x => R) j) 1) i) (f + g) =\n                      (fun f => ↑of fun i j => ↑f (↑(stdBasis R (fun x => R) j) 1) i) f +\n                        (fun f => ↑of fun i j => ↑f (↑(stdBasis R (fun x => R) j) 1) i) g) },\n          map_smul' :=\n            (_ :\n              ∀ (c : R) (f : (n → R) →ₗ[R] m → R),\n                AddHom.toFun\n                    { toFun := fun f => ↑of fun i j => ↑f (↑(stdBasis R (fun x => R) j) 1) i,\n                      map_add' :=\n                        (_ :\n                          ∀ (f g : (n → R) →ₗ[R] m → R),\n                            (fun f => ↑of fun i j => ↑f (↑(stdBasis R (fun x => R) j) 1) i) (f + g) =\n                              (fun f => ↑of fun i j => ↑f (↑(stdBasis R (fun x => R) j) 1) i) f +\n                                (fun f => ↑of fun i j => ↑f (↑(stdBasis R (fun x => R) j) 1) i) g) }\n                    (c • f) =\n                  ↑(RingHom.id R) c •\n                    AddHom.toFun\n                      { toFun := fun f => ↑of fun i j => ↑f (↑(stdBasis R (fun x => R) j) 1) i,\n                        map_add' :=\n                          (_ :\n                            ∀ (f g : (n → R) →ₗ[R] m → R),\n                              (fun f => ↑of fun i j => ↑f (↑(stdBasis R (fun x => R) j) 1) i) (f + g) =\n                                (fun f => ↑of fun i j => ↑f (↑(stdBasis R (fun x => R) j) 1) i) f +\n                                  (fun f => ↑of fun i j => ↑f (↑(stdBasis R (fun x => R) j) 1) i) g) }\n                      f) }.toAddHom\n      (mulVecLin M) i j =\n    M i j\n[PROOFSTEP]\nsimp only [Matrix.mulVec_stdBasis, Matrix.mulVecLin_apply, of_apply]\n[GOAL]\nR : Type u_1\ninst✝² : CommSemiring R\nk : Type u_2\nl : Type u_3\nm : Type u_4\nn : Type u_5\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nf : (n → R) →ₗ[R] m → R\ni : m\nj : n\n⊢ ↑toMatrix' f i j = ↑f (fun j' => if j' = j then 1 else 0) i\n[PROOFSTEP]\nsimp only [LinearMap.toMatrix', LinearEquiv.coe_mk, of_apply]\n[GOAL]\nR : Type u_1\ninst✝² : CommSemiring R\nk : Type u_2\nl : Type u_3\nm : Type u_4\nn : Type u_5\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nf : (n → R) →ₗ[R] m → R\ni : m\nj : n\n⊢ ↑f (↑(stdBasis R (fun x => R) j) 1) i = ↑f (fun j' => if j' = j then 1 else 0) i\n[PROOFSTEP]\nrefine\n  congr_fun ?_\n    _\n      -- porting note: `congr` didn't do this\n[GOAL]\nR : Type u_1\ninst✝² : CommSemiring R\nk : Type u_2\nl : Type u_3\nm : Type u_4\nn : Type u_5\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nf : (n → R) →ₗ[R] m → R\ni : m\nj : n\n⊢ ↑f (↑(stdBasis R (fun x => R) j) 1) = ↑f fun j' => if j' = j then 1 else 0\n[PROOFSTEP]\ncongr\n[GOAL]\ncase h.e_6.h\nR : Type u_1\ninst✝² : CommSemiring R\nk : Type u_2\nl : Type u_3\nm : Type u_4\nn : Type u_5\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nf : (n → R) →ₗ[R] m → R\ni : m\nj : n\n⊢ ↑(stdBasis R (fun x => R) j) 1 = fun j' => if j' = j then 1 else 0\n[PROOFSTEP]\next j'\n[GOAL]\ncase h.e_6.h.h\nR : Type u_1\ninst✝² : CommSemiring R\nk : Type u_2\nl : Type u_3\nm : Type u_4\nn : Type u_5\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nf : (n → R) →ₗ[R] m → R\ni : m\nj j' : n\n⊢ ↑(stdBasis R (fun x => R) j) 1 j' = if j' = j then 1 else 0\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nR : Type u_1\ninst✝² : CommSemiring R\nk : Type u_2\nl : Type u_3\nm : Type u_4\nn : Type u_5\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nf : (n → R) →ₗ[R] m → R\ni : m\nj j' : n\nh : j' = j\n⊢ ↑(stdBasis R (fun x => R) j) 1 j' = 1\n[PROOFSTEP]\nrw [h, stdBasis_same]\n[GOAL]\ncase neg\nR : Type u_1\ninst✝² : CommSemiring R\nk : Type u_2\nl : Type u_3\nm : Type u_4\nn : Type u_5\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nf : (n → R) →ₗ[R] m → R\ni : m\nj j' : n\nh : ¬j' = j\n⊢ ↑(stdBasis R (fun x => R) j) 1 j' = 0\n[PROOFSTEP]\napply stdBasis_ne _ _ _ _ h\n[GOAL]\nR : Type u_1\ninst✝² : CommSemiring R\nk : Type u_2\nl : Type u_3\nm : Type u_4\nn : Type u_5\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\n⊢ ↑toMatrix' id = 1\n[PROOFSTEP]\next\n[GOAL]\ncase a.h\nR : Type u_1\ninst✝² : CommSemiring R\nk : Type u_2\nl : Type u_3\nm : Type u_4\nn : Type u_5\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\ni✝ x✝ : n\n⊢ ↑toMatrix' id i✝ x✝ = OfNat.ofNat 1 i✝ x✝\n[PROOFSTEP]\nrw [Matrix.one_apply, LinearMap.toMatrix'_apply, id_apply]\n[GOAL]\nR : Type u_1\ninst✝⁴ : CommSemiring R\nk : Type u_2\nl : Type u_3\nm : Type u_4\nn : Type u_5\ninst✝³ : Fintype n\ninst✝² : DecidableEq n\ninst✝¹ : Fintype m\ninst✝ : DecidableEq m\nM : Matrix l m R\nN : Matrix m n R\nx : n → R\n⊢ ↑(↑toLin' (M * N)) x = ↑(↑toLin' M) (↑(↑toLin' N) x)\n[PROOFSTEP]\nrw [Matrix.toLin'_mul, LinearMap.comp_apply]\n[GOAL]\nR : Type u_1\ninst✝⁴ : CommSemiring R\nk : Type u_2\nl : Type u_3\nm : Type u_4\nn : Type u_5\ninst✝³ : Fintype n\ninst✝² : DecidableEq n\ninst✝¹ : Fintype l\ninst✝ : DecidableEq l\nf : (n → R) →ₗ[R] m → R\ng : (l → R) →ₗ[R] n → R\n⊢ ↑toMatrix' (comp f g) = ↑toMatrix' f * ↑toMatrix' g\n[PROOFSTEP]\nsuffices f.comp g = Matrix.toLin' (LinearMap.toMatrix' f * LinearMap.toMatrix' g) by\n  rw [this, LinearMap.toMatrix'_toLin']\n[GOAL]\nR : Type u_1\ninst✝⁴ : CommSemiring R\nk : Type u_2\nl : Type u_3\nm : Type u_4\nn : Type u_5\ninst✝³ : Fintype n\ninst✝² : DecidableEq n\ninst✝¹ : Fintype l\ninst✝ : DecidableEq l\nf : (n → R) →ₗ[R] m → R\ng : (l → R) →ₗ[R] n → R\nthis : comp f g = ↑toLin' (↑toMatrix' f * ↑toMatrix' g)\n⊢ ↑toMatrix' (comp f g) = ↑toMatrix' f * ↑toMatrix' g\n[PROOFSTEP]\nrw [this, LinearMap.toMatrix'_toLin']\n[GOAL]\nR : Type u_1\ninst✝⁴ : CommSemiring R\nk : Type u_2\nl : Type u_3\nm : Type u_4\nn : Type u_5\ninst✝³ : Fintype n\ninst✝² : DecidableEq n\ninst✝¹ : Fintype l\ninst✝ : DecidableEq l\nf : (n → R) →ₗ[R] m → R\ng : (l → R) →ₗ[R] n → R\n⊢ comp f g = ↑toLin' (↑toMatrix' f * ↑toMatrix' g)\n[PROOFSTEP]\nrw [Matrix.toLin'_mul, Matrix.toLin'_toMatrix', Matrix.toLin'_toMatrix']\n[GOAL]\nR : Type u_1\ninst✝² : CommSemiring R\nk : Type u_2\nl : Type u_3\nm : Type u_4\nn : Type u_5\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nx : R\n⊢ ↑toMatrix' (↑(algebraMap R (Module.End R (n → R))) x) = ↑(scalar n) x\n[PROOFSTEP]\nsimp [Module.algebraMap_end_eq_smul_id]\n[GOAL]\nR : Type u_1\ninst✝⁴ : CommSemiring R\nk : Type u_2\nl : Type u_3\nm : Type u_4\nn : Type u_5\ninst✝³ : Fintype n\ninst✝² : DecidableEq n\ninst✝¹ : Fintype m\ninst✝ : DecidableEq m\nM : Matrix m n R\nM' : Matrix n m R\nhMM' : M * M' = 1\nhM'M : M' * M = 1\nsrc✝ : (fun x => (m → R) →ₗ[R] n → R) M' := ↑toLin' M'\nx : m → R\n⊢ ↑(↑toLin' M)\n      (AddHom.toFun\n        {\n            toAddHom :=\n              { toFun := ↑(↑toLin' M'),\n                map_add' :=\n                  (_ :\n                    ∀ (x y : m → R),\n                      AddHom.toFun src✝.toAddHom (x + y) =\n                        AddHom.toFun src✝.toAddHom x + AddHom.toFun src✝.toAddHom y) },\n            map_smul' :=\n              (_ :\n                ∀ (r : R) (x : m → R),\n                  AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n        x) =\n    x\n[PROOFSTEP]\nrw [← Matrix.toLin'_mul_apply, hMM', Matrix.toLin'_one, id_apply]\n[GOAL]\nR : Type u_1\ninst✝⁴ : CommSemiring R\nk : Type u_2\nl : Type u_3\nm : Type u_4\nn : Type u_5\ninst✝³ : Fintype n\ninst✝² : DecidableEq n\ninst✝¹ : Fintype m\ninst✝ : DecidableEq m\nM : Matrix m n R\nM' : Matrix n m R\nhMM' : M * M' = 1\nhM'M : M' * M = 1\nsrc✝ : (fun x => (m → R) →ₗ[R] n → R) M' := ↑toLin' M'\nx : n → R\n⊢ AddHom.toFun\n      {\n          toAddHom :=\n            { toFun := ↑(↑toLin' M'),\n              map_add' :=\n                (_ :\n                  ∀ (x y : m → R),\n                    AddHom.toFun src✝.toAddHom (x + y) = AddHom.toFun src✝.toAddHom x + AddHom.toFun src✝.toAddHom y) },\n          map_smul' :=\n            (_ :\n              ∀ (r : R) (x : m → R),\n                AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n      (↑(↑toLin' M) x) =\n    x\n[PROOFSTEP]\nsimp only\n[GOAL]\nR : Type u_1\ninst✝⁴ : CommSemiring R\nk : Type u_2\nl : Type u_3\nm : Type u_4\nn : Type u_5\ninst✝³ : Fintype n\ninst✝² : DecidableEq n\ninst✝¹ : Fintype m\ninst✝ : DecidableEq m\nM : Matrix m n R\nM' : Matrix n m R\nhMM' : M * M' = 1\nhM'M : M' * M = 1\nsrc✝ : (fun x => (m → R) →ₗ[R] n → R) M' := ↑toLin' M'\nx : n → R\n⊢ ↑(↑toLin' M') (↑(↑toLin' M) x) = x\n[PROOFSTEP]\nrw [← Matrix.toLin'_mul_apply, hM'M, Matrix.toLin'_one, id_apply]\n[GOAL]\nR : Type u_1\ninst✝² : CommSemiring R\nk : Type u_2\nl : Type u_3\nm : Type u_4\nn : Type u_5\ninst✝¹ : Fintype n\ninst✝ : DecidableEq n\nf : (n → R) →ₗ[R] n → R\ni j : n\n⊢ ↑toMatrixAlgEquiv' f i j = ↑f (fun j' => if j' = j then 1 else 0) i\n[PROOFSTEP]\nsimp [LinearMap.toMatrixAlgEquiv']\n[GOAL]\nR : Type u_1\ninst✝⁷ : CommSemiring R\nl : Type u_2\nm : Type u_3\nn : Type u_4\ninst✝⁶ : Fintype n\ninst✝⁵ : Fintype m\ninst✝⁴ : DecidableEq n\nM₁ : Type u_5\nM₂ : Type u_6\ninst✝³ : AddCommMonoid M₁\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M₁\ninst✝ : Module R M₂\nv₁ : Basis n R M₁\nv₂ : Basis m R M₂\nf : M₁ →ₗ[R] M₂\n⊢ ↑(toLin v₁ v₂) (↑(toMatrix v₁ v₂) f) = f\n[PROOFSTEP]\nrw [← Matrix.toLin_symm, LinearEquiv.apply_symm_apply]\n[GOAL]\nR : Type u_1\ninst✝⁷ : CommSemiring R\nl : Type u_2\nm : Type u_3\nn : Type u_4\ninst✝⁶ : Fintype n\ninst✝⁵ : Fintype m\ninst✝⁴ : DecidableEq n\nM₁ : Type u_5\nM₂ : Type u_6\ninst✝³ : AddCommMonoid M₁\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M₁\ninst✝ : Module R M₂\nv₁ : Basis n R M₁\nv₂ : Basis m R M₂\nM : Matrix m n R\n⊢ ↑(toMatrix v₁ v₂) (↑(toLin v₁ v₂) M) = M\n[PROOFSTEP]\nrw [← Matrix.toLin_symm, LinearEquiv.symm_apply_apply]\n[GOAL]\nR : Type u_1\ninst✝⁷ : CommSemiring R\nl : Type u_2\nm : Type u_3\nn : Type u_4\ninst✝⁶ : Fintype n\ninst✝⁵ : Fintype m\ninst✝⁴ : DecidableEq n\nM₁ : Type u_5\nM₂ : Type u_6\ninst✝³ : AddCommMonoid M₁\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M₁\ninst✝ : Module R M₂\nv₁ : Basis n R M₁\nv₂ : Basis m R M₂\nf : M₁ →ₗ[R] M₂\ni : m\nj : n\n⊢ ↑(toMatrix v₁ v₂) f i j = ↑(↑v₂.repr (↑f (↑v₁ j))) i\n[PROOFSTEP]\nrw [LinearMap.toMatrix, LinearEquiv.trans_apply, LinearMap.toMatrix'_apply, LinearEquiv.arrowCongr_apply,\n  Basis.equivFun_symm_apply, Finset.sum_eq_single j, if_pos rfl, one_smul, Basis.equivFun_apply]\n[GOAL]\ncase h₀\nR : Type u_1\ninst✝⁷ : CommSemiring R\nl : Type u_2\nm : Type u_3\nn : Type u_4\ninst✝⁶ : Fintype n\ninst✝⁵ : Fintype m\ninst✝⁴ : DecidableEq n\nM₁ : Type u_5\nM₂ : Type u_6\ninst✝³ : AddCommMonoid M₁\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M₁\ninst✝ : Module R M₂\nv₁ : Basis n R M₁\nv₂ : Basis m R M₂\nf : M₁ →ₗ[R] M₂\ni : m\nj : n\n⊢ ∀ (b : n), b ∈ Finset.univ → b ≠ j → (if b = j then 1 else 0) • ↑v₁ b = 0\n[PROOFSTEP]\nintro j' _ hj'\n[GOAL]\ncase h₀\nR : Type u_1\ninst✝⁷ : CommSemiring R\nl : Type u_2\nm : Type u_3\nn : Type u_4\ninst✝⁶ : Fintype n\ninst✝⁵ : Fintype m\ninst✝⁴ : DecidableEq n\nM₁ : Type u_5\nM₂ : Type u_6\ninst✝³ : AddCommMonoid M₁\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M₁\ninst✝ : Module R M₂\nv₁ : Basis n R M₁\nv₂ : Basis m R M₂\nf : M₁ →ₗ[R] M₂\ni : m\nj j' : n\na✝ : j' ∈ Finset.univ\nhj' : j' ≠ j\n⊢ (if j' = j then 1 else 0) • ↑v₁ j' = 0\n[PROOFSTEP]\nrw [if_neg hj', zero_smul]\n[GOAL]\ncase h₁\nR : Type u_1\ninst✝⁷ : CommSemiring R\nl : Type u_2\nm : Type u_3\nn : Type u_4\ninst✝⁶ : Fintype n\ninst✝⁵ : Fintype m\ninst✝⁴ : DecidableEq n\nM₁ : Type u_5\nM₂ : Type u_6\ninst✝³ : AddCommMonoid M₁\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M₁\ninst✝ : Module R M₂\nv₁ : Basis n R M₁\nv₂ : Basis m R M₂\nf : M₁ →ₗ[R] M₂\ni : m\nj : n\n⊢ ¬j ∈ Finset.univ → (if j = j then 1 else 0) • ↑v₁ j = 0\n[PROOFSTEP]\nintro hj\n[GOAL]\ncase h₁\nR : Type u_1\ninst✝⁷ : CommSemiring R\nl : Type u_2\nm : Type u_3\nn : Type u_4\ninst✝⁶ : Fintype n\ninst✝⁵ : Fintype m\ninst✝⁴ : DecidableEq n\nM₁ : Type u_5\nM₂ : Type u_6\ninst✝³ : AddCommMonoid M₁\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M₁\ninst✝ : Module R M₂\nv₁ : Basis n R M₁\nv₂ : Basis m R M₂\nf : M₁ →ₗ[R] M₂\ni : m\nj : n\nhj : ¬j ∈ Finset.univ\n⊢ (if j = j then 1 else 0) • ↑v₁ j = 0\n[PROOFSTEP]\nhave := Finset.mem_univ j\n[GOAL]\ncase h₁\nR : Type u_1\ninst✝⁷ : CommSemiring R\nl : Type u_2\nm : Type u_3\nn : Type u_4\ninst✝⁶ : Fintype n\ninst✝⁵ : Fintype m\ninst✝⁴ : DecidableEq n\nM₁ : Type u_5\nM₂ : Type u_6\ninst✝³ : AddCommMonoid M₁\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M₁\ninst✝ : Module R M₂\nv₁ : Basis n R M₁\nv₂ : Basis m R M₂\nf : M₁ →ₗ[R] M₂\ni : m\nj : n\nhj : ¬j ∈ Finset.univ\nthis : j ∈ Finset.univ\n⊢ (if j = j then 1 else 0) • ↑v₁ j = 0\n[PROOFSTEP]\ncontradiction\n[GOAL]\nR : Type u_1\ninst✝⁷ : CommSemiring R\nl : Type u_2\nm : Type u_3\nn : Type u_4\ninst✝⁶ : Fintype n\ninst✝⁵ : Fintype m\ninst✝⁴ : DecidableEq n\nM₁ : Type u_5\nM₂ : Type u_6\ninst✝³ : AddCommMonoid M₁\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M₁\ninst✝ : Module R M₂\nv₁ : Basis n R M₁\nv₂ : Basis m R M₂\nM : Matrix m n R\nv : M₁\n⊢ ↑(LinearEquiv.symm (Basis.equivFun v₂)) (↑(↑toLin' M) ↑(↑v₁.repr v)) = ∑ j : m, mulVec M (↑(↑v₁.repr v)) j • ↑v₂ j\n[PROOFSTEP]\nrw [Matrix.toLin'_apply, v₂.equivFun_symm_apply]\n[GOAL]\nR : Type u_1\ninst✝⁷ : CommSemiring R\nl : Type u_2\nm : Type u_3\nn : Type u_4\ninst✝⁶ : Fintype n\ninst✝⁵ : Fintype m\ninst✝⁴ : DecidableEq n\nM₁ : Type u_5\nM₂ : Type u_6\ninst✝³ : AddCommMonoid M₁\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M₁\ninst✝ : Module R M₂\nv₁ : Basis n R M₁\nv₂ : Basis m R M₂\nM : Matrix m n R\ni : n\n⊢ ↑(↑(toLin v₁ v₂) M) (↑v₁ i) = ∑ j : m, M j i • ↑v₂ j\n[PROOFSTEP]\nrw [Matrix.toLin_apply, Finset.sum_congr rfl fun j _hj => ?_]\n[GOAL]\nR : Type u_1\ninst✝⁷ : CommSemiring R\nl : Type u_2\nm : Type u_3\nn : Type u_4\ninst✝⁶ : Fintype n\ninst✝⁵ : Fintype m\ninst✝⁴ : DecidableEq n\nM₁ : Type u_5\nM₂ : Type u_6\ninst✝³ : AddCommMonoid M₁\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M₁\ninst✝ : Module R M₂\nv₁ : Basis n R M₁\nv₂ : Basis m R M₂\nM : Matrix m n R\ni : n\nj : m\n_hj : j ∈ Finset.univ\n⊢ mulVec M (↑(↑v₁.repr (↑v₁ i))) j • ↑v₂ j = M j i • ↑v₂ j\n[PROOFSTEP]\nrw [Basis.repr_self, Matrix.mulVec, dotProduct, Finset.sum_eq_single i, Finsupp.single_eq_same, mul_one]\n[GOAL]\ncase h₀\nR : Type u_1\ninst✝⁷ : CommSemiring R\nl : Type u_2\nm : Type u_3\nn : Type u_4\ninst✝⁶ : Fintype n\ninst✝⁵ : Fintype m\ninst✝⁴ : DecidableEq n\nM₁ : Type u_5\nM₂ : Type u_6\ninst✝³ : AddCommMonoid M₁\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M₁\ninst✝ : Module R M₂\nv₁ : Basis n R M₁\nv₂ : Basis m R M₂\nM : Matrix m n R\ni : n\nj : m\n_hj : j ∈ Finset.univ\n⊢ ∀ (b : n), b ∈ Finset.univ → b ≠ i → M j b * ↑(Finsupp.single i 1) b = 0\n[PROOFSTEP]\nintro i' _ i'_ne\n[GOAL]\ncase h₀\nR : Type u_1\ninst✝⁷ : CommSemiring R\nl : Type u_2\nm : Type u_3\nn : Type u_4\ninst✝⁶ : Fintype n\ninst✝⁵ : Fintype m\ninst✝⁴ : DecidableEq n\nM₁ : Type u_5\nM₂ : Type u_6\ninst✝³ : AddCommMonoid M₁\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M₁\ninst✝ : Module R M₂\nv₁ : Basis n R M₁\nv₂ : Basis m R M₂\nM : Matrix m n R\ni : n\nj : m\n_hj : j ∈ Finset.univ\ni' : n\na✝ : i' ∈ Finset.univ\ni'_ne : i' ≠ i\n⊢ M j i' * ↑(Finsupp.single i 1) i' = 0\n[PROOFSTEP]\nrw [Finsupp.single_eq_of_ne i'_ne.symm, mul_zero]\n[GOAL]\ncase h₁\nR : Type u_1\ninst✝⁷ : CommSemiring R\nl : Type u_2\nm : Type u_3\nn : Type u_4\ninst✝⁶ : Fintype n\ninst✝⁵ : Fintype m\ninst✝⁴ : DecidableEq n\nM₁ : Type u_5\nM₂ : Type u_6\ninst✝³ : AddCommMonoid M₁\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M₁\ninst✝ : Module R M₂\nv₁ : Basis n R M₁\nv₂ : Basis m R M₂\nM : Matrix m n R\ni : n\nj : m\n_hj : j ∈ Finset.univ\n⊢ ¬i ∈ Finset.univ → M j i * ↑(Finsupp.single i 1) i = 0\n[PROOFSTEP]\nintros\n[GOAL]\ncase h₁\nR : Type u_1\ninst✝⁷ : CommSemiring R\nl : Type u_2\nm : Type u_3\nn : Type u_4\ninst✝⁶ : Fintype n\ninst✝⁵ : Fintype m\ninst✝⁴ : DecidableEq n\nM₁ : Type u_5\nM₂ : Type u_6\ninst✝³ : AddCommMonoid M₁\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M₁\ninst✝ : Module R M₂\nv₁ : Basis n R M₁\nv₂ : Basis m R M₂\nM : Matrix m n R\ni : n\nj : m\n_hj : j ∈ Finset.univ\na✝ : ¬i ∈ Finset.univ\n⊢ M j i * ↑(Finsupp.single i 1) i = 0\n[PROOFSTEP]\nhave := Finset.mem_univ i\n[GOAL]\ncase h₁\nR : Type u_1\ninst✝⁷ : CommSemiring R\nl : Type u_2\nm : Type u_3\nn : Type u_4\ninst✝⁶ : Fintype n\ninst✝⁵ : Fintype m\ninst✝⁴ : DecidableEq n\nM₁ : Type u_5\nM₂ : Type u_6\ninst✝³ : AddCommMonoid M₁\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M₁\ninst✝ : Module R M₂\nv₁ : Basis n R M₁\nv₂ : Basis m R M₂\nM : Matrix m n R\ni : n\nj : m\n_hj : j ∈ Finset.univ\na✝ : ¬i ∈ Finset.univ\nthis : i ∈ Finset.univ\n⊢ M j i * ↑(Finsupp.single i 1) i = 0\n[PROOFSTEP]\ncontradiction\n[GOAL]\nR : Type u_1\ninst✝⁷ : CommSemiring R\nl : Type u_2\nm : Type u_3\nn : Type u_4\ninst✝⁶ : Fintype n\ninst✝⁵ : Fintype m\ninst✝⁴ : DecidableEq n\nM₁ : Type u_5\nM₂ : Type u_6\ninst✝³ : AddCommMonoid M₁\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M₁\ninst✝ : Module R M₂\nv₁ : Basis n R M₁\nv₂ : Basis m R M₂\n⊢ ↑(toMatrix v₁ v₁) id = 1\n[PROOFSTEP]\next i j\n[GOAL]\ncase a.h\nR : Type u_1\ninst✝⁷ : CommSemiring R\nl : Type u_2\nm : Type u_3\nn : Type u_4\ninst✝⁶ : Fintype n\ninst✝⁵ : Fintype m\ninst✝⁴ : DecidableEq n\nM₁ : Type u_5\nM₂ : Type u_6\ninst✝³ : AddCommMonoid M₁\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M₁\ninst✝ : Module R M₂\nv₁ : Basis n R M₁\nv₂ : Basis m R M₂\ni j : n\n⊢ ↑(toMatrix v₁ v₁) id i j = OfNat.ofNat 1 i j\n[PROOFSTEP]\nsimp [LinearMap.toMatrix_apply, Matrix.one_apply, Finsupp.single_apply, eq_comm]\n[GOAL]\nR : Type u_1\ninst✝⁷ : CommSemiring R\nl : Type u_2\nm : Type u_3\nn : Type u_4\ninst✝⁶ : Fintype n\ninst✝⁵ : Fintype m\ninst✝⁴ : DecidableEq n\nM₁ : Type u_5\nM₂ : Type u_6\ninst✝³ : AddCommMonoid M₁\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M₁\ninst✝ : Module R M₂\nv₁ : Basis n R M₁\nv₂ : Basis m R M₂\n⊢ ↑(toLin v₁ v₁) 1 = LinearMap.id\n[PROOFSTEP]\nrw [← LinearMap.toMatrix_id v₁, Matrix.toLin_toMatrix]\n[GOAL]\nR : Type u_1\ninst✝⁹ : CommSemiring R\nl : Type u_2\nm : Type u_3\nn : Type u_4\ninst✝⁸ : Fintype n\ninst✝⁷ : Fintype m\ninst✝⁶ : DecidableEq n\nM₁ : Type u_5\nM₂ : Type u_6\ninst✝⁵ : AddCommMonoid M₁\ninst✝⁴ : AddCommMonoid M₂\ninst✝³ : Module R M₁\ninst✝² : Module R M₂\nv₁ : Basis n R M₁\nv₂ : Basis m R M₂\ninst✝¹ : DecidableEq M₁\ninst✝ : DecidableEq M₂\nf : M₁ →ₗ[R] M₂\nk : m\ni : n\n⊢ ↑(toMatrix (Basis.reindexRange v₁) (Basis.reindexRange v₂)) f\n      { val := ↑v₂ k, property := (_ : ↑v₂ k ∈ Set.range ↑v₂) }\n      { val := ↑v₁ i, property := (_ : ↑v₁ i ∈ Set.range ↑v₁) } =\n    ↑(toMatrix v₁ v₂) f k i\n[PROOFSTEP]\nsimp_rw [LinearMap.toMatrix_apply, Basis.reindexRange_self, Basis.reindexRange_repr]\n[GOAL]\nR : Type u_1\ninst✝¹¹ : CommSemiring R\nl : Type u_2\nm : Type u_3\nn : Type u_4\ninst✝¹⁰ : Fintype n\ninst✝⁹ : Fintype m\ninst✝⁸ : DecidableEq n\nM₁ : Type u_5\nM₂ : Type u_6\ninst✝⁷ : AddCommMonoid M₁\ninst✝⁶ : AddCommMonoid M₂\ninst✝⁵ : Module R M₁\ninst✝⁴ : Module R M₂\nv₁ : Basis n R M₁\nv₂ : Basis m R M₂\nM₃ : Type u_7\ninst✝³ : AddCommMonoid M₃\ninst✝² : Module R M₃\nv₃ : Basis l R M₃\ninst✝¹ : Fintype l\ninst✝ : DecidableEq m\nf : M₂ →ₗ[R] M₃\ng : M₁ →ₗ[R] M₂\n⊢ ↑(toMatrix v₁ v₃) (comp f g) = ↑(toMatrix v₂ v₃) f * ↑(toMatrix v₁ v₂) g\n[PROOFSTEP]\nsimp_rw [LinearMap.toMatrix, LinearEquiv.trans_apply, LinearEquiv.arrowCongr_comp _ v₂.equivFun,\n  LinearMap.toMatrix'_comp]\n[GOAL]\nR : Type u_1\ninst✝⁹ : CommSemiring R\nl : Type u_2\nm : Type u_3\nn : Type u_4\ninst✝⁸ : Fintype n\ninst✝⁷ : Fintype m\ninst✝⁶ : DecidableEq n\nM₁ : Type u_5\nM₂ : Type u_6\ninst✝⁵ : AddCommMonoid M₁\ninst✝⁴ : AddCommMonoid M₂\ninst✝³ : Module R M₁\ninst✝² : Module R M₂\nv₁ : Basis n R M₁\nv₂ : Basis m R M₂\nM₃ : Type u_7\ninst✝¹ : AddCommMonoid M₃\ninst✝ : Module R M₃\nv₃ : Basis l R M₃\nf g : M₁ →ₗ[R] M₁\n⊢ ↑(toMatrix v₁ v₁) (f * g) = ↑(toMatrix v₁ v₁) f * ↑(toMatrix v₁ v₁) g\n[PROOFSTEP]\nrw [LinearMap.mul_eq_comp, LinearMap.toMatrix_comp v₁ v₁ v₁ f g]\n[GOAL]\nR : Type u_1\ninst✝⁹ : CommSemiring R\nl : Type u_2\nm : Type u_3\nn : Type u_4\ninst✝⁸ : Fintype n\ninst✝⁷ : Fintype m\ninst✝⁶ : DecidableEq n\nM₁ : Type u_5\nM₂ : Type u_6\ninst✝⁵ : AddCommMonoid M₁\ninst✝⁴ : AddCommMonoid M₂\ninst✝³ : Module R M₁\ninst✝² : Module R M₂\nv₁ : Basis n R M₁\nv₂ : Basis m R M₂\nM₃ : Type u_7\ninst✝¹ : AddCommMonoid M₃\ninst✝ : Module R M₃\nv₃ : Basis l R M₃\nx : R\n⊢ ↑(toMatrix v₁ v₁) (↑(algebraMap R (Module.End R M₁)) x) = ↑(scalar n) x\n[PROOFSTEP]\nsimp [Module.algebraMap_end_eq_smul_id, LinearMap.toMatrix_id]\n[GOAL]\nR : Type u_1\ninst✝⁹ : CommSemiring R\nl : Type u_2\nm : Type u_3\nn : Type u_4\ninst✝⁸ : Fintype n\ninst✝⁷ : Fintype m\ninst✝⁶ : DecidableEq n\nM₁ : Type u_5\nM₂ : Type u_6\ninst✝⁵ : AddCommMonoid M₁\ninst✝⁴ : AddCommMonoid M₂\ninst✝³ : Module R M₁\ninst✝² : Module R M₂\nv₁ : Basis n R M₁\nv₂ : Basis m R M₂\nM₃ : Type u_7\ninst✝¹ : AddCommMonoid M₃\ninst✝ : Module R M₃\nv₃ : Basis l R M₃\nf : M₁ →ₗ[R] M₂\nx : M₁\n⊢ mulVec (↑(toMatrix v₁ v₂) f) ↑(↑v₁.repr x) = ↑(↑v₂.repr (↑f x))\n[PROOFSTEP]\next i\n[GOAL]\ncase h\nR : Type u_1\ninst✝⁹ : CommSemiring R\nl : Type u_2\nm : Type u_3\nn : Type u_4\ninst✝⁸ : Fintype n\ninst✝⁷ : Fintype m\ninst✝⁶ : DecidableEq n\nM₁ : Type u_5\nM₂ : Type u_6\ninst✝⁵ : AddCommMonoid M₁\ninst✝⁴ : AddCommMonoid M₂\ninst✝³ : Module R M₁\ninst✝² : Module R M₂\nv₁ : Basis n R M₁\nv₂ : Basis m R M₂\nM₃ : Type u_7\ninst✝¹ : AddCommMonoid M₃\ninst✝ : Module R M₃\nv₃ : Basis l R M₃\nf : M₁ →ₗ[R] M₂\nx : M₁\ni : m\n⊢ mulVec (↑(toMatrix v₁ v₂) f) (↑(↑v₁.repr x)) i = ↑(↑v₂.repr (↑f x)) i\n[PROOFSTEP]\nrw [← Matrix.toLin'_apply, LinearMap.toMatrix, LinearEquiv.trans_apply, Matrix.toLin'_toMatrix',\n  LinearEquiv.arrowCongr_apply, v₂.equivFun_apply]\n[GOAL]\ncase h\nR : Type u_1\ninst✝⁹ : CommSemiring R\nl : Type u_2\nm : Type u_3\nn : Type u_4\ninst✝⁸ : Fintype n\ninst✝⁷ : Fintype m\ninst✝⁶ : DecidableEq n\nM₁ : Type u_5\nM₂ : Type u_6\ninst✝⁵ : AddCommMonoid M₁\ninst✝⁴ : AddCommMonoid M₂\ninst✝³ : Module R M₁\ninst✝² : Module R M₂\nv₁ : Basis n R M₁\nv₂ : Basis m R M₂\nM₃ : Type u_7\ninst✝¹ : AddCommMonoid M₃\ninst✝ : Module R M₃\nv₃ : Basis l R M₃\nf : M₁ →ₗ[R] M₂\nx : M₁\ni : m\n⊢ ↑(↑v₂.repr (↑f (↑(LinearEquiv.symm (Basis.equivFun v₁)) ↑(↑v₁.repr x)))) i = ↑(↑v₂.repr (↑f x)) i\n[PROOFSTEP]\ncongr\n[GOAL]\ncase h.e_a.h.e_6.h.h.e_6.h\nR : Type u_1\ninst✝⁹ : CommSemiring R\nl : Type u_2\nm : Type u_3\nn : Type u_4\ninst✝⁸ : Fintype n\ninst✝⁷ : Fintype m\ninst✝⁶ : DecidableEq n\nM₁ : Type u_5\nM₂ : Type u_6\ninst✝⁵ : AddCommMonoid M₁\ninst✝⁴ : AddCommMonoid M₂\ninst✝³ : Module R M₁\ninst✝² : Module R M₂\nv₁ : Basis n R M₁\nv₂ : Basis m R M₂\nM₃ : Type u_7\ninst✝¹ : AddCommMonoid M₃\ninst✝ : Module R M₃\nv₃ : Basis l R M₃\nf : M₁ →ₗ[R] M₂\nx : M₁\ni : m\n⊢ ↑(LinearEquiv.symm (Basis.equivFun v₁)) ↑(↑v₁.repr x) = x\n[PROOFSTEP]\nexact v₁.equivFun.symm_apply_apply x\n[GOAL]\nR : Type u_1\ninst✝¹¹ : CommSemiring R\nl : Type u_2\nm : Type u_3\nn : Type u_4\ninst✝¹⁰ : Fintype n\ninst✝⁹ : Fintype m\ninst✝⁸ : DecidableEq n\nM₁ : Type u_5\nM₂ : Type u_6\ninst✝⁷ : AddCommMonoid M₁\ninst✝⁶ : AddCommMonoid M₂\ninst✝⁵ : Module R M₁\ninst✝⁴ : Module R M₂\nv₁ : Basis n R M₁\nv₂ : Basis m R M₂\nM₃ : Type u_7\ninst✝³ : AddCommMonoid M₃\ninst✝² : Module R M₃\nv₃ : Basis l R M₃\ninst✝¹ : Fintype l\ninst✝ : DecidableEq l\nb : Basis l R M₁\nb' : Basis l R M₂\n⊢ ↑(toMatrix b' b) ↑(Basis.equiv b' b (Equiv.refl l)) = 1\n[PROOFSTEP]\next i j\n[GOAL]\ncase a.h\nR : Type u_1\ninst✝¹¹ : CommSemiring R\nl : Type u_2\nm : Type u_3\nn : Type u_4\ninst✝¹⁰ : Fintype n\ninst✝⁹ : Fintype m\ninst✝⁸ : DecidableEq n\nM₁ : Type u_5\nM₂ : Type u_6\ninst✝⁷ : AddCommMonoid M₁\ninst✝⁶ : AddCommMonoid M₂\ninst✝⁵ : Module R M₁\ninst✝⁴ : Module R M₂\nv₁ : Basis n R M₁\nv₂ : Basis m R M₂\nM₃ : Type u_7\ninst✝³ : AddCommMonoid M₃\ninst✝² : Module R M₃\nv₃ : Basis l R M₃\ninst✝¹ : Fintype l\ninst✝ : DecidableEq l\nb : Basis l R M₁\nb' : Basis l R M₂\ni j : l\n⊢ ↑(toMatrix b' b) (↑(Basis.equiv b' b (Equiv.refl l))) i j = OfNat.ofNat 1 i j\n[PROOFSTEP]\nsimp [LinearMap.toMatrix_apply, Matrix.one_apply, Finsupp.single_apply, eq_comm]\n[GOAL]\nR : Type u_1\ninst✝¹¹ : CommSemiring R\nl : Type u_2\nm : Type u_3\nn : Type u_4\ninst✝¹⁰ : Fintype n\ninst✝⁹ : Fintype m\ninst✝⁸ : DecidableEq n\nM₁ : Type u_5\nM₂ : Type u_6\ninst✝⁷ : AddCommMonoid M₁\ninst✝⁶ : AddCommMonoid M₂\ninst✝⁵ : Module R M₁\ninst✝⁴ : Module R M₂\nv₁ : Basis n R M₁\nv₂ : Basis m R M₂\nM₃ : Type u_7\ninst✝³ : AddCommMonoid M₃\ninst✝² : Module R M₃\nv₃ : Basis l R M₃\ninst✝¹ : Fintype l\ninst✝ : DecidableEq m\nA : Matrix l m R\nB : Matrix m n R\n⊢ ↑(toLin v₁ v₃) (A * B) = comp (↑(toLin v₂ v₃) A) (↑(toLin v₁ v₂) B)\n[PROOFSTEP]\napply (LinearMap.toMatrix v₁ v₃).injective\n[GOAL]\ncase a\nR : Type u_1\ninst✝¹¹ : CommSemiring R\nl : Type u_2\nm : Type u_3\nn : Type u_4\ninst✝¹⁰ : Fintype n\ninst✝⁹ : Fintype m\ninst✝⁸ : DecidableEq n\nM₁ : Type u_5\nM₂ : Type u_6\ninst✝⁷ : AddCommMonoid M₁\ninst✝⁶ : AddCommMonoid M₂\ninst✝⁵ : Module R M₁\ninst✝⁴ : Module R M₂\nv₁ : Basis n R M₁\nv₂ : Basis m R M₂\nM₃ : Type u_7\ninst✝³ : AddCommMonoid M₃\ninst✝² : Module R M₃\nv₃ : Basis l R M₃\ninst✝¹ : Fintype l\ninst✝ : DecidableEq m\nA : Matrix l m R\nB : Matrix m n R\n⊢ ↑(toMatrix v₁ v₃) (↑(toLin v₁ v₃) (A * B)) = ↑(toMatrix v₁ v₃) (comp (↑(toLin v₂ v₃) A) (↑(toLin v₁ v₂) B))\n[PROOFSTEP]\nhaveI : DecidableEq l := fun _ _ => Classical.propDecidable _\n[GOAL]\ncase a\nR : Type u_1\ninst✝¹¹ : CommSemiring R\nl : Type u_2\nm : Type u_3\nn : Type u_4\ninst✝¹⁰ : Fintype n\ninst✝⁹ : Fintype m\ninst✝⁸ : DecidableEq n\nM₁ : Type u_5\nM₂ : Type u_6\ninst✝⁷ : AddCommMonoid M₁\ninst✝⁶ : AddCommMonoid M₂\ninst✝⁵ : Module R M₁\ninst✝⁴ : Module R M₂\nv₁ : Basis n R M₁\nv₂ : Basis m R M₂\nM₃ : Type u_7\ninst✝³ : AddCommMonoid M₃\ninst✝² : Module R M₃\nv₃ : Basis l R M₃\ninst✝¹ : Fintype l\ninst✝ : DecidableEq m\nA : Matrix l m R\nB : Matrix m n R\nthis : DecidableEq l\n⊢ ↑(toMatrix v₁ v₃) (↑(toLin v₁ v₃) (A * B)) = ↑(toMatrix v₁ v₃) (comp (↑(toLin v₂ v₃) A) (↑(toLin v₁ v₂) B))\n[PROOFSTEP]\nrw [LinearMap.toMatrix_comp v₁ v₂ v₃]\n[GOAL]\ncase a\nR : Type u_1\ninst✝¹¹ : CommSemiring R\nl : Type u_2\nm : Type u_3\nn : Type u_4\ninst✝¹⁰ : Fintype n\ninst✝⁹ : Fintype m\ninst✝⁸ : DecidableEq n\nM₁ : Type u_5\nM₂ : Type u_6\ninst✝⁷ : AddCommMonoid M₁\ninst✝⁶ : AddCommMonoid M₂\ninst✝⁵ : Module R M₁\ninst✝⁴ : Module R M₂\nv₁ : Basis n R M₁\nv₂ : Basis m R M₂\nM₃ : Type u_7\ninst✝³ : AddCommMonoid M₃\ninst✝² : Module R M₃\nv₃ : Basis l R M₃\ninst✝¹ : Fintype l\ninst✝ : DecidableEq m\nA : Matrix l m R\nB : Matrix m n R\nthis : DecidableEq l\n⊢ ↑(toMatrix v₁ v₃) (↑(toLin v₁ v₃) (A * B)) =\n    ↑(toMatrix v₂ v₃) (↑(toLin v₂ v₃) A) * ↑(toMatrix v₁ v₂) (↑(toLin v₁ v₂) B)\n[PROOFSTEP]\nrepeat' rw [LinearMap.toMatrix_toLin]\n[GOAL]\ncase a\nR : Type u_1\ninst✝¹¹ : CommSemiring R\nl : Type u_2\nm : Type u_3\nn : Type u_4\ninst✝¹⁰ : Fintype n\ninst✝⁹ : Fintype m\ninst✝⁸ : DecidableEq n\nM₁ : Type u_5\nM₂ : Type u_6\ninst✝⁷ : AddCommMonoid M₁\ninst✝⁶ : AddCommMonoid M₂\ninst✝⁵ : Module R M₁\ninst✝⁴ : Module R M₂\nv₁ : Basis n R M₁\nv₂ : Basis m R M₂\nM₃ : Type u_7\ninst✝³ : AddCommMonoid M₃\ninst✝² : Module R M₃\nv₃ : Basis l R M₃\ninst✝¹ : Fintype l\ninst✝ : DecidableEq m\nA : Matrix l m R\nB : Matrix m n R\nthis : DecidableEq l\n⊢ ↑(toMatrix v₁ v₃) (↑(toLin v₁ v₃) (A * B)) =\n    ↑(toMatrix v₂ v₃) (↑(toLin v₂ v₃) A) * ↑(toMatrix v₁ v₂) (↑(toLin v₁ v₂) B)\n[PROOFSTEP]\nrw [LinearMap.toMatrix_toLin]\n[GOAL]\ncase a\nR : Type u_1\ninst✝¹¹ : CommSemiring R\nl : Type u_2\nm : Type u_3\nn : Type u_4\ninst✝¹⁰ : Fintype n\ninst✝⁹ : Fintype m\ninst✝⁸ : DecidableEq n\nM₁ : Type u_5\nM₂ : Type u_6\ninst✝⁷ : AddCommMonoid M₁\ninst✝⁶ : AddCommMonoid M₂\ninst✝⁵ : Module R M₁\ninst✝⁴ : Module R M₂\nv₁ : Basis n R M₁\nv₂ : Basis m R M₂\nM₃ : Type u_7\ninst✝³ : AddCommMonoid M₃\ninst✝² : Module R M₃\nv₃ : Basis l R M₃\ninst✝¹ : Fintype l\ninst✝ : DecidableEq m\nA : Matrix l m R\nB : Matrix m n R\nthis : DecidableEq l\n⊢ A * B = ↑(toMatrix v₂ v₃) (↑(toLin v₂ v₃) A) * ↑(toMatrix v₁ v₂) (↑(toLin v₁ v₂) B)\n[PROOFSTEP]\nrw [LinearMap.toMatrix_toLin]\n[GOAL]\ncase a\nR : Type u_1\ninst✝¹¹ : CommSemiring R\nl : Type u_2\nm : Type u_3\nn : Type u_4\ninst✝¹⁰ : Fintype n\ninst✝⁹ : Fintype m\ninst✝⁸ : DecidableEq n\nM₁ : Type u_5\nM₂ : Type u_6\ninst✝⁷ : AddCommMonoid M₁\ninst✝⁶ : AddCommMonoid M₂\ninst✝⁵ : Module R M₁\ninst✝⁴ : Module R M₂\nv₁ : Basis n R M₁\nv₂ : Basis m R M₂\nM₃ : Type u_7\ninst✝³ : AddCommMonoid M₃\ninst✝² : Module R M₃\nv₃ : Basis l R M₃\ninst✝¹ : Fintype l\ninst✝ : DecidableEq m\nA : Matrix l m R\nB : Matrix m n R\nthis : DecidableEq l\n⊢ A * B = A * ↑(toMatrix v₁ v₂) (↑(toLin v₁ v₂) B)\n[PROOFSTEP]\nrw [LinearMap.toMatrix_toLin]\n[GOAL]\nR : Type u_1\ninst✝¹¹ : CommSemiring R\nl : Type u_2\nm : Type u_3\nn : Type u_4\ninst✝¹⁰ : Fintype n\ninst✝⁹ : Fintype m\ninst✝⁸ : DecidableEq n\nM₁ : Type u_5\nM₂ : Type u_6\ninst✝⁷ : AddCommMonoid M₁\ninst✝⁶ : AddCommMonoid M₂\ninst✝⁵ : Module R M₁\ninst✝⁴ : Module R M₂\nv₁ : Basis n R M₁\nv₂ : Basis m R M₂\nM₃ : Type u_7\ninst✝³ : AddCommMonoid M₃\ninst✝² : Module R M₃\nv₃ : Basis l R M₃\ninst✝¹ : Fintype l\ninst✝ : DecidableEq m\nA : Matrix l m R\nB : Matrix m n R\nx : M₁\n⊢ ↑(↑(toLin v₁ v₃) (A * B)) x = ↑(↑(toLin v₂ v₃) A) (↑(↑(toLin v₁ v₂) B) x)\n[PROOFSTEP]\nrw [Matrix.toLin_mul v₁ v₂, LinearMap.comp_apply]\n[GOAL]\nR : Type u_1\ninst✝¹⁰ : CommSemiring R\nl : Type u_2\nm : Type u_3\nn : Type u_4\ninst✝⁹ : Fintype n\ninst✝⁸ : Fintype m\ninst✝⁷ : DecidableEq n\nM₁ : Type u_5\nM₂ : Type u_6\ninst✝⁶ : AddCommMonoid M₁\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : Module R M₁\ninst✝³ : Module R M₂\nv₁ : Basis n R M₁\nv₂ : Basis m R M₂\nM₃ : Type u_7\ninst✝² : AddCommMonoid M₃\ninst✝¹ : Module R M₃\nv₃ : Basis l R M₃\ninst✝ : DecidableEq m\nM : Matrix m n R\nM' : Matrix n m R\nhMM' : M * M' = 1\nhM'M : M' * M = 1\nsrc✝ : (fun x => M₁ →ₗ[R] M₂) M := ↑(toLin v₁ v₂) M\nx : M₁\n⊢ ↑(↑(toLin v₂ v₁) M')\n      (AddHom.toFun\n        {\n            toAddHom :=\n              { toFun := ↑(↑(toLin v₁ v₂) M),\n                map_add' :=\n                  (_ :\n                    ∀ (x y : M₁),\n                      AddHom.toFun src✝.toAddHom (x + y) =\n                        AddHom.toFun src✝.toAddHom x + AddHom.toFun src✝.toAddHom y) },\n            map_smul' :=\n              (_ :\n                ∀ (r : R) (x : M₁),\n                  AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n        x) =\n    x\n[PROOFSTEP]\nrw [← Matrix.toLin_mul_apply, hM'M, Matrix.toLin_one, id_apply]\n[GOAL]\nR : Type u_1\ninst✝¹⁰ : CommSemiring R\nl : Type u_2\nm : Type u_3\nn : Type u_4\ninst✝⁹ : Fintype n\ninst✝⁸ : Fintype m\ninst✝⁷ : DecidableEq n\nM₁ : Type u_5\nM₂ : Type u_6\ninst✝⁶ : AddCommMonoid M₁\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : Module R M₁\ninst✝³ : Module R M₂\nv₁ : Basis n R M₁\nv₂ : Basis m R M₂\nM₃ : Type u_7\ninst✝² : AddCommMonoid M₃\ninst✝¹ : Module R M₃\nv₃ : Basis l R M₃\ninst✝ : DecidableEq m\nM : Matrix m n R\nM' : Matrix n m R\nhMM' : M * M' = 1\nhM'M : M' * M = 1\nsrc✝ : (fun x => M₁ →ₗ[R] M₂) M := ↑(toLin v₁ v₂) M\nx : M₂\n⊢ AddHom.toFun\n      {\n          toAddHom :=\n            { toFun := ↑(↑(toLin v₁ v₂) M),\n              map_add' :=\n                (_ :\n                  ∀ (x y : M₁),\n                    AddHom.toFun src✝.toAddHom (x + y) = AddHom.toFun src✝.toAddHom x + AddHom.toFun src✝.toAddHom y) },\n          map_smul' :=\n            (_ :\n              ∀ (r : R) (x : M₁),\n                AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n      (↑(↑(toLin v₂ v₁) M') x) =\n    x\n[PROOFSTEP]\nsimp only\n[GOAL]\nR : Type u_1\ninst✝¹⁰ : CommSemiring R\nl : Type u_2\nm : Type u_3\nn : Type u_4\ninst✝⁹ : Fintype n\ninst✝⁸ : Fintype m\ninst✝⁷ : DecidableEq n\nM₁ : Type u_5\nM₂ : Type u_6\ninst✝⁶ : AddCommMonoid M₁\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : Module R M₁\ninst✝³ : Module R M₂\nv₁ : Basis n R M₁\nv₂ : Basis m R M₂\nM₃ : Type u_7\ninst✝² : AddCommMonoid M₃\ninst✝¹ : Module R M₃\nv₃ : Basis l R M₃\ninst✝ : DecidableEq m\nM : Matrix m n R\nM' : Matrix n m R\nhMM' : M * M' = 1\nhM'M : M' * M = 1\nsrc✝ : (fun x => M₁ →ₗ[R] M₂) M := ↑(toLin v₁ v₂) M\nx : M₂\n⊢ ↑(↑(toLin v₁ v₂) M) (↑(↑(toLin v₂ v₁) M') x) = x\n[PROOFSTEP]\nrw [← Matrix.toLin_mul_apply, hMM', Matrix.toLin_one, id_apply]\n[GOAL]\nR : Type u_1\ninst✝⁹ : CommSemiring R\nl : Type u_2\nm : Type u_3\nn : Type u_4\ninst✝⁸ : Fintype n\ninst✝⁷ : Fintype m\ninst✝⁶ : DecidableEq n\nM₁ : Type u_5\nM₂ : Type u_6\ninst✝⁵ : AddCommMonoid M₁\ninst✝⁴ : AddCommMonoid M₂\ninst✝³ : Module R M₁\ninst✝² : Module R M₂\nv₁ : Basis n R M₁\nv₂ : Basis m R M₂\nM₃ : Type u_7\ninst✝¹ : AddCommMonoid M₃\ninst✝ : Module R M₃\nv₃ : Basis l R M₃\nf : M₁ →ₗ[R] M₁\n⊢ ↑(toLinAlgEquiv v₁) (↑(toMatrixAlgEquiv v₁) f) = f\n[PROOFSTEP]\nrw [← Matrix.toLinAlgEquiv_symm, AlgEquiv.apply_symm_apply]\n[GOAL]\nR : Type u_1\ninst✝⁹ : CommSemiring R\nl : Type u_2\nm : Type u_3\nn : Type u_4\ninst✝⁸ : Fintype n\ninst✝⁷ : Fintype m\ninst✝⁶ : DecidableEq n\nM₁ : Type u_5\nM₂ : Type u_6\ninst✝⁵ : AddCommMonoid M₁\ninst✝⁴ : AddCommMonoid M₂\ninst✝³ : Module R M₁\ninst✝² : Module R M₂\nv₁ : Basis n R M₁\nv₂ : Basis m R M₂\nM₃ : Type u_7\ninst✝¹ : AddCommMonoid M₃\ninst✝ : Module R M₃\nv₃ : Basis l R M₃\nM : Matrix n n R\n⊢ ↑(toMatrixAlgEquiv v₁) (↑(toLinAlgEquiv v₁) M) = M\n[PROOFSTEP]\nrw [← Matrix.toLinAlgEquiv_symm, AlgEquiv.symm_apply_apply]\n[GOAL]\nR : Type u_1\ninst✝⁹ : CommSemiring R\nl : Type u_2\nm : Type u_3\nn : Type u_4\ninst✝⁸ : Fintype n\ninst✝⁷ : Fintype m\ninst✝⁶ : DecidableEq n\nM₁ : Type u_5\nM₂ : Type u_6\ninst✝⁵ : AddCommMonoid M₁\ninst✝⁴ : AddCommMonoid M₂\ninst✝³ : Module R M₁\ninst✝² : Module R M₂\nv₁ : Basis n R M₁\nv₂ : Basis m R M₂\nM₃ : Type u_7\ninst✝¹ : AddCommMonoid M₃\ninst✝ : Module R M₃\nv₃ : Basis l R M₃\nf : M₁ →ₗ[R] M₁\ni j : n\n⊢ ↑(toMatrixAlgEquiv v₁) f i j = ↑(↑v₁.repr (↑f (↑v₁ j))) i\n[PROOFSTEP]\nsimp [LinearMap.toMatrixAlgEquiv, LinearMap.toMatrix_apply]\n[GOAL]\nR : Type u_1\ninst✝⁹ : CommSemiring R\nl : Type u_2\nm : Type u_3\nn : Type u_4\ninst✝⁸ : Fintype n\ninst✝⁷ : Fintype m\ninst✝⁶ : DecidableEq n\nM₁ : Type u_5\nM₂ : Type u_6\ninst✝⁵ : AddCommMonoid M₁\ninst✝⁴ : AddCommMonoid M₂\ninst✝³ : Module R M₁\ninst✝² : Module R M₂\nv₁ : Basis n R M₁\nv₂ : Basis m R M₂\nM₃ : Type u_7\ninst✝¹ : AddCommMonoid M₃\ninst✝ : Module R M₃\nv₃ : Basis l R M₃\nM : Matrix n n R\nv : M₁\n⊢ ↑(LinearEquiv.symm (Basis.equivFun v₁)) (↑(↑toLinAlgEquiv' M) ↑(↑v₁.repr v)) =\n    ∑ j : n, mulVec M (↑(↑v₁.repr v)) j • ↑v₁ j\n[PROOFSTEP]\nrw [Matrix.toLinAlgEquiv'_apply, v₁.equivFun_symm_apply]\n[GOAL]\nR : Type u_1\ninst✝⁹ : CommSemiring R\nl : Type u_2\nm : Type u_3\nn : Type u_4\ninst✝⁸ : Fintype n\ninst✝⁷ : Fintype m\ninst✝⁶ : DecidableEq n\nM₁ : Type u_5\nM₂ : Type u_6\ninst✝⁵ : AddCommMonoid M₁\ninst✝⁴ : AddCommMonoid M₂\ninst✝³ : Module R M₁\ninst✝² : Module R M₂\nv₁ : Basis n R M₁\nv₂ : Basis m R M₂\nM₃ : Type u_7\ninst✝¹ : AddCommMonoid M₃\ninst✝ : Module R M₃\nv₃ : Basis l R M₃\n⊢ ↑(toMatrixAlgEquiv v₁) id = 1\n[PROOFSTEP]\nsimp_rw [LinearMap.toMatrixAlgEquiv, AlgEquiv.ofLinearEquiv_apply, LinearMap.toMatrix_id]\n[GOAL]\nR : Type u_1\ninst✝⁹ : CommSemiring R\nl : Type u_2\nm : Type u_3\nn : Type u_4\ninst✝⁸ : Fintype n\ninst✝⁷ : Fintype m\ninst✝⁶ : DecidableEq n\nM₁ : Type u_5\nM₂ : Type u_6\ninst✝⁵ : AddCommMonoid M₁\ninst✝⁴ : AddCommMonoid M₂\ninst✝³ : Module R M₁\ninst✝² : Module R M₂\nv₁ : Basis n R M₁\nv₂ : Basis m R M₂\nM₃ : Type u_7\ninst✝¹ : AddCommMonoid M₃\ninst✝ : Module R M₃\nv₃ : Basis l R M₃\n⊢ ↑(toLinAlgEquiv v₁) 1 = LinearMap.id\n[PROOFSTEP]\nrw [← LinearMap.toMatrixAlgEquiv_id v₁, Matrix.toLinAlgEquiv_toMatrixAlgEquiv]\n[GOAL]\nR : Type u_1\ninst✝¹⁰ : CommSemiring R\nl : Type u_2\nm : Type u_3\nn : Type u_4\ninst✝⁹ : Fintype n\ninst✝⁸ : Fintype m\ninst✝⁷ : DecidableEq n\nM₁ : Type u_5\nM₂ : Type u_6\ninst✝⁶ : AddCommMonoid M₁\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : Module R M₁\ninst✝³ : Module R M₂\nv₁ : Basis n R M₁\nv₂ : Basis m R M₂\nM₃ : Type u_7\ninst✝² : AddCommMonoid M₃\ninst✝¹ : Module R M₃\nv₃ : Basis l R M₃\ninst✝ : DecidableEq M₁\nf : M₁ →ₗ[R] M₁\nk i : n\n⊢ ↑(toMatrixAlgEquiv (Basis.reindexRange v₁)) f { val := ↑v₁ k, property := (_ : ↑v₁ k ∈ Set.range ↑v₁) }\n      { val := ↑v₁ i, property := (_ : ↑v₁ i ∈ Set.range ↑v₁) } =\n    ↑(toMatrixAlgEquiv v₁) f k i\n[PROOFSTEP]\nsimp_rw [LinearMap.toMatrixAlgEquiv_apply, Basis.reindexRange_self, Basis.reindexRange_repr]\n[GOAL]\nR : Type u_1\ninst✝⁹ : CommSemiring R\nl : Type u_2\nm : Type u_3\nn : Type u_4\ninst✝⁸ : Fintype n\ninst✝⁷ : Fintype m\ninst✝⁶ : DecidableEq n\nM₁ : Type u_5\nM₂ : Type u_6\ninst✝⁵ : AddCommMonoid M₁\ninst✝⁴ : AddCommMonoid M₂\ninst✝³ : Module R M₁\ninst✝² : Module R M₂\nv₁ : Basis n R M₁\nv₂ : Basis m R M₂\nM₃ : Type u_7\ninst✝¹ : AddCommMonoid M₃\ninst✝ : Module R M₃\nv₃ : Basis l R M₃\nf g : M₁ →ₗ[R] M₁\n⊢ ↑(toMatrixAlgEquiv v₁) (comp f g) = ↑(toMatrixAlgEquiv v₁) f * ↑(toMatrixAlgEquiv v₁) g\n[PROOFSTEP]\nsimp [LinearMap.toMatrixAlgEquiv, LinearMap.toMatrix_comp v₁ v₁ v₁ f g]\n[GOAL]\nR : Type u_1\ninst✝⁹ : CommSemiring R\nl : Type u_2\nm : Type u_3\nn : Type u_4\ninst✝⁸ : Fintype n\ninst✝⁷ : Fintype m\ninst✝⁶ : DecidableEq n\nM₁ : Type u_5\nM₂ : Type u_6\ninst✝⁵ : AddCommMonoid M₁\ninst✝⁴ : AddCommMonoid M₂\ninst✝³ : Module R M₁\ninst✝² : Module R M₂\nv₁ : Basis n R M₁\nv₂ : Basis m R M₂\nM₃ : Type u_7\ninst✝¹ : AddCommMonoid M₃\ninst✝ : Module R M₃\nv₃ : Basis l R M₃\nf g : M₁ →ₗ[R] M₁\n⊢ ↑(toMatrixAlgEquiv v₁) (f * g) = ↑(toMatrixAlgEquiv v₁) f * ↑(toMatrixAlgEquiv v₁) g\n[PROOFSTEP]\nrw [LinearMap.mul_eq_comp, LinearMap.toMatrixAlgEquiv_comp v₁ f g]\n[GOAL]\nR : Type u_1\ninst✝⁹ : CommSemiring R\nl : Type u_2\nm : Type u_3\nn : Type u_4\ninst✝⁸ : Fintype n\ninst✝⁷ : Fintype m\ninst✝⁶ : DecidableEq n\nM₁ : Type u_5\nM₂ : Type u_6\ninst✝⁵ : AddCommMonoid M₁\ninst✝⁴ : AddCommMonoid M₂\ninst✝³ : Module R M₁\ninst✝² : Module R M₂\nv₁ : Basis n R M₁\nv₂ : Basis m R M₂\nM₃ : Type u_7\ninst✝¹ : AddCommMonoid M₃\ninst✝ : Module R M₃\nv₃ : Basis l R M₃\nA B : Matrix n n R\n⊢ ↑(toLinAlgEquiv v₁) (A * B) = comp (↑(toLinAlgEquiv v₁) A) (↑(toLinAlgEquiv v₁) B)\n[PROOFSTEP]\nconvert Matrix.toLin_mul v₁ v₁ v₁ A B\n[GOAL]\nR : Type u_1\ninst✝⁹ : CommSemiring R\nl : Type u_2\nm : Type u_3\nn : Type u_4\ninst✝⁸ : Fintype n\ninst✝⁷ : Fintype m\ninst✝⁶ : DecidableEq n\nM₁ : Type u_5\nM₂ : Type u_6\ninst✝⁵ : AddCommMonoid M₁\ninst✝⁴ : AddCommMonoid M₂\ninst✝³ : Module R M₁\ninst✝² : Module R M₂\nv₁ : Basis n R M₁\nv₂ : Basis m R M₂\nM₃ : Type u_7\ninst✝¹ : AddCommMonoid M₃\ninst✝ : Module R M₃\nv₃ : Basis l R M₃\na b c d : R\nx : R × R\n⊢ ↑(↑(toLin (Basis.finTwoProd R) (Basis.finTwoProd R)) (↑of ![![a, b], ![c, d]])) x =\n    (a * x.fst + b * x.snd, c * x.fst + d * x.snd)\n[PROOFSTEP]\nsimp [Matrix.toLin_apply, Matrix.mulVec, Matrix.dotProduct, (Prod.smul_mk)]\n[GOAL]\nR : Type u_1\ninst✝⁹ : CommSemiring R\nl : Type u_2\nm : Type u_3\nn : Type u_4\ninst✝⁸ : Fintype n\ninst✝⁷ : Fintype m\ninst✝⁶ : DecidableEq n\nM₁ : Type u_5\nM₂ : Type u_6\ninst✝⁵ : AddCommMonoid M₁\ninst✝⁴ : AddCommMonoid M₂\ninst✝³ : Module R M₁\ninst✝² : Module R M₂\nv₁ : Basis n R M₁\nv₂ : Basis m R M₂\nM₃ : Type u_7\ninst✝¹ : AddCommMonoid M₃\ninst✝ : Module R M₃\nv₃ : Basis l R M₃\nx : R\n⊢ ↑(toMatrix v₁ v₁) (DistribMulAction.toLinearMap R M₁ x) = Matrix.diagonal fun x_1 => x\n[PROOFSTEP]\next\n[GOAL]\ncase a.h\nR : Type u_1\ninst✝⁹ : CommSemiring R\nl : Type u_2\nm : Type u_3\nn : Type u_4\ninst✝⁸ : Fintype n\ninst✝⁷ : Fintype m\ninst✝⁶ : DecidableEq n\nM₁ : Type u_5\nM₂ : Type u_6\ninst✝⁵ : AddCommMonoid M₁\ninst✝⁴ : AddCommMonoid M₂\ninst✝³ : Module R M₁\ninst✝² : Module R M₂\nv₁ : Basis n R M₁\nv₂ : Basis m R M₂\nM₃ : Type u_7\ninst✝¹ : AddCommMonoid M₃\ninst✝ : Module R M₃\nv₃ : Basis l R M₃\nx : R\ni✝ x✝ : n\n⊢ ↑(toMatrix v₁ v₁) (DistribMulAction.toLinearMap R M₁ x) i✝ x✝ = Matrix.diagonal (fun x_1 => x) i✝ x✝\n[PROOFSTEP]\nrw [LinearMap.toMatrix_apply, DistribMulAction.toLinearMap_apply, LinearEquiv.map_smul, Basis.repr_self,\n  Finsupp.smul_single_one, Finsupp.single_eq_pi_single, Matrix.diagonal_apply, Pi.single_apply]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝⁴ : CommRing R\ninst✝³ : Ring S\ninst✝² : Algebra R S\nm : Type u_3\ninst✝¹ : Fintype m\ninst✝ : DecidableEq m\nb : Basis m R S\nx : S\ni j : m\n⊢ ↑(toMatrix b b) (↑(lmul R S) x) i j = ↑(↑b.repr (x * ↑b j)) i\n[PROOFSTEP]\nsimp only [LinearMap.toMatrix_apply', coe_lmul_eq_mul, LinearMap.mul_apply']\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝⁴ : CommRing R\ninst✝³ : Ring S\ninst✝² : Algebra R S\nm : Type u_3\ninst✝¹ : Fintype m\ninst✝ : DecidableEq m\nb : Basis m R S\n⊢ (fun x => ↑(toMatrix b b) (↑(lmul R S) x)) 1 = 1\n[PROOFSTEP]\ndsimp only\n  -- porting node: needed due to new-style structures\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝⁴ : CommRing R\ninst✝³ : Ring S\ninst✝² : Algebra R S\nm : Type u_3\ninst✝¹ : Fintype m\ninst✝ : DecidableEq m\nb : Basis m R S\n⊢ ↑(toMatrix b b) (↑(lmul R S) 1) = 1\n[PROOFSTEP]\nrw [AlgHom.map_one, LinearMap.toMatrix_one]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝⁴ : CommRing R\ninst✝³ : Ring S\ninst✝² : Algebra R S\nm : Type u_3\ninst✝¹ : Fintype m\ninst✝ : DecidableEq m\nb : Basis m R S\nx y : S\n⊢ OneHom.toFun\n      { toFun := fun x => ↑(toMatrix b b) (↑(lmul R S) x),\n        map_one' := (_ : (fun x => ↑(toMatrix b b) (↑(lmul R S) x)) 1 = 1) }\n      (x * y) =\n    OneHom.toFun\n        { toFun := fun x => ↑(toMatrix b b) (↑(lmul R S) x),\n          map_one' := (_ : (fun x => ↑(toMatrix b b) (↑(lmul R S) x)) 1 = 1) }\n        x *\n      OneHom.toFun\n        { toFun := fun x => ↑(toMatrix b b) (↑(lmul R S) x),\n          map_one' := (_ : (fun x => ↑(toMatrix b b) (↑(lmul R S) x)) 1 = 1) }\n        y\n[PROOFSTEP]\ndsimp only\n  -- porting node: needed due to new-style structures\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝⁴ : CommRing R\ninst✝³ : Ring S\ninst✝² : Algebra R S\nm : Type u_3\ninst✝¹ : Fintype m\ninst✝ : DecidableEq m\nb : Basis m R S\nx y : S\n⊢ ↑(toMatrix b b) (↑(lmul R S) (x * y)) = ↑(toMatrix b b) (↑(lmul R S) x) * ↑(toMatrix b b) (↑(lmul R S) y)\n[PROOFSTEP]\nrw [AlgHom.map_mul, LinearMap.toMatrix_mul]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝⁴ : CommRing R\ninst✝³ : Ring S\ninst✝² : Algebra R S\nm : Type u_3\ninst✝¹ : Fintype m\ninst✝ : DecidableEq m\nb : Basis m R S\n⊢ OneHom.toFun\n      (↑{\n          toOneHom :=\n            { toFun := fun x => ↑(toMatrix b b) (↑(lmul R S) x),\n              map_one' := (_ : (fun x => ↑(toMatrix b b) (↑(lmul R S) x)) 1 = 1) },\n          map_mul' :=\n            (_ :\n              ∀ (x y : S),\n                OneHom.toFun\n                    { toFun := fun x => ↑(toMatrix b b) (↑(lmul R S) x),\n                      map_one' := (_ : (fun x => ↑(toMatrix b b) (↑(lmul R S) x)) 1 = 1) }\n                    (x * y) =\n                  OneHom.toFun\n                      { toFun := fun x => ↑(toMatrix b b) (↑(lmul R S) x),\n                        map_one' := (_ : (fun x => ↑(toMatrix b b) (↑(lmul R S) x)) 1 = 1) }\n                      x *\n                    OneHom.toFun\n                      { toFun := fun x => ↑(toMatrix b b) (↑(lmul R S) x),\n                        map_one' := (_ : (fun x => ↑(toMatrix b b) (↑(lmul R S) x)) 1 = 1) }\n                      y) })\n      0 =\n    0\n[PROOFSTEP]\ndsimp only\n  -- porting node: needed due to new-style structures\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝⁴ : CommRing R\ninst✝³ : Ring S\ninst✝² : Algebra R S\nm : Type u_3\ninst✝¹ : Fintype m\ninst✝ : DecidableEq m\nb : Basis m R S\n⊢ ↑(toMatrix b b) (↑(lmul R S) 0) = 0\n[PROOFSTEP]\nrw [AlgHom.map_zero, LinearEquiv.map_zero]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝⁴ : CommRing R\ninst✝³ : Ring S\ninst✝² : Algebra R S\nm : Type u_3\ninst✝¹ : Fintype m\ninst✝ : DecidableEq m\nb : Basis m R S\nx y : S\n⊢ OneHom.toFun\n      (↑{\n          toOneHom :=\n            { toFun := fun x => ↑(toMatrix b b) (↑(lmul R S) x),\n              map_one' := (_ : (fun x => ↑(toMatrix b b) (↑(lmul R S) x)) 1 = 1) },\n          map_mul' :=\n            (_ :\n              ∀ (x y : S),\n                OneHom.toFun\n                    { toFun := fun x => ↑(toMatrix b b) (↑(lmul R S) x),\n                      map_one' := (_ : (fun x => ↑(toMatrix b b) (↑(lmul R S) x)) 1 = 1) }\n                    (x * y) =\n                  OneHom.toFun\n                      { toFun := fun x => ↑(toMatrix b b) (↑(lmul R S) x),\n                        map_one' := (_ : (fun x => ↑(toMatrix b b) (↑(lmul R S) x)) 1 = 1) }\n                      x *\n                    OneHom.toFun\n                      { toFun := fun x => ↑(toMatrix b b) (↑(lmul R S) x),\n                        map_one' := (_ : (fun x => ↑(toMatrix b b) (↑(lmul R S) x)) 1 = 1) }\n                      y) })\n      (x + y) =\n    OneHom.toFun\n        (↑{\n            toOneHom :=\n              { toFun := fun x => ↑(toMatrix b b) (↑(lmul R S) x),\n                map_one' := (_ : (fun x => ↑(toMatrix b b) (↑(lmul R S) x)) 1 = 1) },\n            map_mul' :=\n              (_ :\n                ∀ (x y : S),\n                  OneHom.toFun\n                      { toFun := fun x => ↑(toMatrix b b) (↑(lmul R S) x),\n                        map_one' := (_ : (fun x => ↑(toMatrix b b) (↑(lmul R S) x)) 1 = 1) }\n                      (x * y) =\n                    OneHom.toFun\n                        { toFun := fun x => ↑(toMatrix b b) (↑(lmul R S) x),\n                          map_one' := (_ : (fun x => ↑(toMatrix b b) (↑(lmul R S) x)) 1 = 1) }\n                        x *\n                      OneHom.toFun\n                        { toFun := fun x => ↑(toMatrix b b) (↑(lmul R S) x),\n                          map_one' := (_ : (fun x => ↑(toMatrix b b) (↑(lmul R S) x)) 1 = 1) }\n                        y) })\n        x +\n      OneHom.toFun\n        (↑{\n            toOneHom :=\n              { toFun := fun x => ↑(toMatrix b b) (↑(lmul R S) x),\n                map_one' := (_ : (fun x => ↑(toMatrix b b) (↑(lmul R S) x)) 1 = 1) },\n            map_mul' :=\n              (_ :\n                ∀ (x y : S),\n                  OneHom.toFun\n                      { toFun := fun x => ↑(toMatrix b b) (↑(lmul R S) x),\n                        map_one' := (_ : (fun x => ↑(toMatrix b b) (↑(lmul R S) x)) 1 = 1) }\n                      (x * y) =\n                    OneHom.toFun\n                        { toFun := fun x => ↑(toMatrix b b) (↑(lmul R S) x),\n                          map_one' := (_ : (fun x => ↑(toMatrix b b) (↑(lmul R S) x)) 1 = 1) }\n                        x *\n                      OneHom.toFun\n                        { toFun := fun x => ↑(toMatrix b b) (↑(lmul R S) x),\n                          map_one' := (_ : (fun x => ↑(toMatrix b b) (↑(lmul R S) x)) 1 = 1) }\n                        y) })\n        y\n[PROOFSTEP]\ndsimp only\n  -- porting node: needed due to new-style structures\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝⁴ : CommRing R\ninst✝³ : Ring S\ninst✝² : Algebra R S\nm : Type u_3\ninst✝¹ : Fintype m\ninst✝ : DecidableEq m\nb : Basis m R S\nx y : S\n⊢ ↑(toMatrix b b) (↑(lmul R S) (x + y)) = ↑(toMatrix b b) (↑(lmul R S) x) + ↑(toMatrix b b) (↑(lmul R S) y)\n[PROOFSTEP]\nrw [AlgHom.map_add, LinearEquiv.map_add]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝⁴ : CommRing R\ninst✝³ : Ring S\ninst✝² : Algebra R S\nm : Type u_3\ninst✝¹ : Fintype m\ninst✝ : DecidableEq m\nb : Basis m R S\nr : R\n⊢ OneHom.toFun\n      (↑↑{\n            toMonoidHom :=\n              {\n                toOneHom :=\n                  { toFun := fun x => ↑(toMatrix b b) (↑(lmul R S) x),\n                    map_one' := (_ : (fun x => ↑(toMatrix b b) (↑(lmul R S) x)) 1 = 1) },\n                map_mul' :=\n                  (_ :\n                    ∀ (x y : S),\n                      OneHom.toFun\n                          { toFun := fun x => ↑(toMatrix b b) (↑(lmul R S) x),\n                            map_one' := (_ : (fun x => ↑(toMatrix b b) (↑(lmul R S) x)) 1 = 1) }\n                          (x * y) =\n                        OneHom.toFun\n                            { toFun := fun x => ↑(toMatrix b b) (↑(lmul R S) x),\n                              map_one' := (_ : (fun x => ↑(toMatrix b b) (↑(lmul R S) x)) 1 = 1) }\n                            x *\n                          OneHom.toFun\n                            { toFun := fun x => ↑(toMatrix b b) (↑(lmul R S) x),\n                              map_one' := (_ : (fun x => ↑(toMatrix b b) (↑(lmul R S) x)) 1 = 1) }\n                            y) },\n            map_zero' :=\n              (_ :\n                OneHom.toFun\n                    (↑{\n                        toOneHom :=\n                          { toFun := fun x => ↑(toMatrix b b) (↑(lmul R S) x),\n                            map_one' := (_ : (fun x => ↑(toMatrix b b) (↑(lmul R S) x)) 1 = 1) },\n                        map_mul' :=\n                          (_ :\n                            ∀ (x y : S),\n                              OneHom.toFun\n                                  { toFun := fun x => ↑(toMatrix b b) (↑(lmul R S) x),\n                                    map_one' := (_ : (fun x => ↑(toMatrix b b) (↑(lmul R S) x)) 1 = 1) }\n                                  (x * y) =\n                                OneHom.toFun\n                                    { toFun := fun x => ↑(toMatrix b b) (↑(lmul R S) x),\n                                      map_one' := (_ : (fun x => ↑(toMatrix b b) (↑(lmul R S) x)) 1 = 1) }\n                                    x *\n                                  OneHom.toFun\n                                    { toFun := fun x => ↑(toMatrix b b) (↑(lmul R S) x),\n                                      map_one' := (_ : (fun x => ↑(toMatrix b b) (↑(lmul R S) x)) 1 = 1) }\n                                    y) })\n                    0 =\n                  0),\n            map_add' :=\n              (_ :\n                ∀ (x y : S),\n                  OneHom.toFun\n                      (↑{\n                          toOneHom :=\n                            { toFun := fun x => ↑(toMatrix b b) (↑(lmul R S) x),\n                              map_one' := (_ : (fun x => ↑(toMatrix b b) (↑(lmul R S) x)) 1 = 1) },\n                          map_mul' :=\n                            (_ :\n                              ∀ (x y : S),\n                                OneHom.toFun\n                                    { toFun := fun x => ↑(toMatrix b b) (↑(lmul R S) x),\n                                      map_one' := (_ : (fun x => ↑(toMatrix b b) (↑(lmul R S) x)) 1 = 1) }\n                                    (x * y) =\n                                  OneHom.toFun\n                                      { toFun := fun x => ↑(toMatrix b b) (↑(lmul R S) x),\n                                        map_one' := (_ : (fun x => ↑(toMatrix b b) (↑(lmul R S) x)) 1 = 1) }\n                                      x *\n                                    OneHom.toFun\n                                      { toFun := fun x => ↑(toMatrix b b) (↑(lmul R S) x),\n                                        map_one' := (_ : (fun x => ↑(toMatrix b b) (↑(lmul R S) x)) 1 = 1) }\n                                      y) })\n                      (x + y) =\n                    OneHom.toFun\n                        (↑{\n                            toOneHom :=\n                              { toFun := fun x => ↑(toMatrix b b) (↑(lmul R S) x),\n                                map_one' := (_ : (fun x => ↑(toMatrix b b) (↑(lmul R S) x)) 1 = 1) },\n                            map_mul' :=\n                              (_ :\n                                ∀ (x y : S),\n                                  OneHom.toFun\n                                      { toFun := fun x => ↑(toMatrix b b) (↑(lmul R S) x),\n                                        map_one' := (_ : (fun x => ↑(toMatrix b b) (↑(lmul R S) x)) 1 = 1) }\n                                      (x * y) =\n                                    OneHom.toFun\n                                        { toFun := fun x => ↑(toMatrix b b) (↑(lmul R S) x),\n                                          map_one' := (_ : (fun x => ↑(toMatrix b b) (↑(lmul R S) x)) 1 = 1) }\n                                        x *\n                                      OneHom.toFun\n                                        { toFun := fun x => ↑(toMatrix b b) (↑(lmul R S) x),\n                                          map_one' := (_ : (fun x => ↑(toMatrix b b) (↑(lmul R S) x)) 1 = 1) }\n                                        y) })\n                        x +\n                      OneHom.toFun\n                        (↑{\n                            toOneHom :=\n                              { toFun := fun x => ↑(toMatrix b b) (↑(lmul R S) x),\n                                map_one' := (_ : (fun x => ↑(toMatrix b b) (↑(lmul R S) x)) 1 = 1) },\n                            map_mul' :=\n                              (_ :\n                                ∀ (x y : S),\n                                  OneHom.toFun\n                                      { toFun := fun x => ↑(toMatrix b b) (↑(lmul R S) x),\n                                        map_one' := (_ : (fun x => ↑(toMatrix b b) (↑(lmul R S) x)) 1 = 1) }\n                                      (x * y) =\n                                    OneHom.toFun\n                                        { toFun := fun x => ↑(toMatrix b b) (↑(lmul R S) x),\n                                          map_one' := (_ : (fun x => ↑(toMatrix b b) (↑(lmul R S) x)) 1 = 1) }\n                                        x *\n                                      OneHom.toFun\n                                        { toFun := fun x => ↑(toMatrix b b) (↑(lmul R S) x),\n                                          map_one' := (_ : (fun x => ↑(toMatrix b b) (↑(lmul R S) x)) 1 = 1) }\n                                        y) })\n                        y) })\n      (↑(algebraMap R S) r) =\n    ↑(algebraMap R (Matrix m m R)) r\n[PROOFSTEP]\ndsimp only\n  -- porting node: needed due to new-style structures\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝⁴ : CommRing R\ninst✝³ : Ring S\ninst✝² : Algebra R S\nm : Type u_3\ninst✝¹ : Fintype m\ninst✝ : DecidableEq m\nb : Basis m R S\nr : R\n⊢ ↑(toMatrix b b) (↑(lmul R S) (↑(algebraMap R S) r)) = ↑(algebraMap R (Matrix m m R)) r\n[PROOFSTEP]\next\n[GOAL]\ncase a.h\nR : Type u_1\nS : Type u_2\ninst✝⁴ : CommRing R\ninst✝³ : Ring S\ninst✝² : Algebra R S\nm : Type u_3\ninst✝¹ : Fintype m\ninst✝ : DecidableEq m\nb : Basis m R S\nr : R\ni✝ x✝ : m\n⊢ ↑(toMatrix b b) (↑(lmul R S) (↑(algebraMap R S) r)) i✝ x✝ = ↑(algebraMap R (Matrix m m R)) r i✝ x✝\n[PROOFSTEP]\nrw [lmul_algebraMap, toMatrix_lsmul, algebraMap_eq_diagonal, Pi.algebraMap_def, Algebra.id.map_eq_self]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝⁴ : CommRing R\ninst✝³ : Ring S\ninst✝² : Algebra R S\nm : Type u_3\ninst✝¹ : Fintype m\ninst✝ : DecidableEq m\nb : Basis m R S\nx : S\ni j : m\n⊢ ↑(leftMulMatrix b) x i j = ↑(↑b.repr (x * ↑b j)) i\n[PROOFSTEP]\nrw [leftMulMatrix_apply, toMatrix_lmul' b x i j]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝⁴ : CommRing R\ninst✝³ : Ring S\ninst✝² : Algebra R S\nm : Type u_3\ninst✝¹ : Fintype m\ninst✝ : DecidableEq m\nb : Basis m R S\nx x' : S\nh : ↑(leftMulMatrix b) x = ↑(leftMulMatrix b) x'\n⊢ ↑(↑(lmul R S) x) 1 = ↑(↑(lmul R S) x') 1\n[PROOFSTEP]\nrw [(LinearMap.toMatrix b b).injective h]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing S\ninst✝⁸ : Ring T\ninst✝⁷ : Algebra R S\ninst✝⁶ : Algebra S T\ninst✝⁵ : Algebra R T\ninst✝⁴ : IsScalarTower R S T\nm : Type u_4\nn : Type u_5\ninst✝³ : Fintype m\ninst✝² : Fintype n\ninst✝¹ : DecidableEq m\ninst✝ : DecidableEq n\nb : Basis m R S\nc : Basis n S T\nx : T\nik jk : m × n\n⊢ ↑(leftMulMatrix (Basis.smul b c)) x ik jk = ↑(leftMulMatrix b) (↑(leftMulMatrix c) x ik.snd jk.snd) ik.fst jk.fst\n[PROOFSTEP]\nsimp only [leftMulMatrix_apply, LinearMap.toMatrix_apply, mul_comm, Basis.smul_apply, Basis.smul_repr,\n  Finsupp.smul_apply, id.smul_eq_mul, LinearEquiv.map_smul, mul_smul_comm, coe_lmul_eq_mul, LinearMap.mul_apply']\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing S\ninst✝⁸ : Ring T\ninst✝⁷ : Algebra R S\ninst✝⁶ : Algebra S T\ninst✝⁵ : Algebra R T\ninst✝⁴ : IsScalarTower R S T\nm : Type u_4\nn : Type u_5\ninst✝³ : Fintype m\ninst✝² : Fintype n\ninst✝¹ : DecidableEq m\ninst✝ : DecidableEq n\nb : Basis m R S\nc : Basis n S T\nx : S\n⊢ ↑(leftMulMatrix (Basis.smul b c)) (↑(algebraMap S T) x) = blockDiagonal fun x_1 => ↑(leftMulMatrix b) x\n[PROOFSTEP]\next ⟨i, k⟩ ⟨j, k'⟩\n[GOAL]\ncase a.mk.h.mk\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing S\ninst✝⁸ : Ring T\ninst✝⁷ : Algebra R S\ninst✝⁶ : Algebra S T\ninst✝⁵ : Algebra R T\ninst✝⁴ : IsScalarTower R S T\nm : Type u_4\nn : Type u_5\ninst✝³ : Fintype m\ninst✝² : Fintype n\ninst✝¹ : DecidableEq m\ninst✝ : DecidableEq n\nb : Basis m R S\nc : Basis n S T\nx : S\ni : m\nk : n\nj : m\nk' : n\n⊢ ↑(leftMulMatrix (Basis.smul b c)) (↑(algebraMap S T) x) (i, k) (j, k') =\n    blockDiagonal (fun x_1 => ↑(leftMulMatrix b) x) (i, k) (j, k')\n[PROOFSTEP]\nrw [smul_leftMulMatrix, AlgHom.commutes, blockDiagonal_apply, algebraMap_matrix_apply]\n[GOAL]\ncase a.mk.h.mk\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing S\ninst✝⁸ : Ring T\ninst✝⁷ : Algebra R S\ninst✝⁶ : Algebra S T\ninst✝⁵ : Algebra R T\ninst✝⁴ : IsScalarTower R S T\nm : Type u_4\nn : Type u_5\ninst✝³ : Fintype m\ninst✝² : Fintype n\ninst✝¹ : DecidableEq m\ninst✝ : DecidableEq n\nb : Basis m R S\nc : Basis n S T\nx : S\ni : m\nk : n\nj : m\nk' : n\n⊢ ↑(leftMulMatrix b) (if (i, k).snd = (j, k').snd then ↑(algebraMap S S) x else 0) (i, k).fst (j, k').fst =\n    if (i, k).snd = (j, k').snd then ↑(leftMulMatrix b) x (i, k).fst (j, k').fst else 0\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing S\ninst✝⁸ : Ring T\ninst✝⁷ : Algebra R S\ninst✝⁶ : Algebra S T\ninst✝⁵ : Algebra R T\ninst✝⁴ : IsScalarTower R S T\nm : Type u_4\nn : Type u_5\ninst✝³ : Fintype m\ninst✝² : Fintype n\ninst✝¹ : DecidableEq m\ninst✝ : DecidableEq n\nb : Basis m R S\nc : Basis n S T\nx : S\ni : m\nk : n\nj : m\nk' : n\nh : (i, k).snd = (j, k').snd\n⊢ ↑(leftMulMatrix b) (if (i, k).snd = (j, k').snd then ↑(algebraMap S S) x else 0) (i, k).fst (j, k').fst =\n    ↑(leftMulMatrix b) x (i, k).fst (j, k').fst\n[PROOFSTEP]\nsimp only at h \n[GOAL]\ncase neg\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing S\ninst✝⁸ : Ring T\ninst✝⁷ : Algebra R S\ninst✝⁶ : Algebra S T\ninst✝⁵ : Algebra R T\ninst✝⁴ : IsScalarTower R S T\nm : Type u_4\nn : Type u_5\ninst✝³ : Fintype m\ninst✝² : Fintype n\ninst✝¹ : DecidableEq m\ninst✝ : DecidableEq n\nb : Basis m R S\nc : Basis n S T\nx : S\ni : m\nk : n\nj : m\nk' : n\nh : ¬(i, k).snd = (j, k').snd\n⊢ ↑(leftMulMatrix b) (if (i, k).snd = (j, k').snd then ↑(algebraMap S S) x else 0) (i, k).fst (j, k').fst = 0\n[PROOFSTEP]\nsimp only at h \n[GOAL]\ncase pos\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing S\ninst✝⁸ : Ring T\ninst✝⁷ : Algebra R S\ninst✝⁶ : Algebra S T\ninst✝⁵ : Algebra R T\ninst✝⁴ : IsScalarTower R S T\nm : Type u_4\nn : Type u_5\ninst✝³ : Fintype m\ninst✝² : Fintype n\ninst✝¹ : DecidableEq m\ninst✝ : DecidableEq n\nb : Basis m R S\nc : Basis n S T\nx : S\ni : m\nk : n\nj : m\nk' : n\nh : k = k'\n⊢ ↑(leftMulMatrix b) (if (i, k).snd = (j, k').snd then ↑(algebraMap S S) x else 0) (i, k).fst (j, k').fst =\n    ↑(leftMulMatrix b) x (i, k).fst (j, k').fst\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase neg\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing S\ninst✝⁸ : Ring T\ninst✝⁷ : Algebra R S\ninst✝⁶ : Algebra S T\ninst✝⁵ : Algebra R T\ninst✝⁴ : IsScalarTower R S T\nm : Type u_4\nn : Type u_5\ninst✝³ : Fintype m\ninst✝² : Fintype n\ninst✝¹ : DecidableEq m\ninst✝ : DecidableEq n\nb : Basis m R S\nc : Basis n S T\nx : S\ni : m\nk : n\nj : m\nk' : n\nh : ¬k = k'\n⊢ ↑(leftMulMatrix b) (if (i, k).snd = (j, k').snd then ↑(algebraMap S S) x else 0) (i, k).fst (j, k').fst = 0\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing S\ninst✝⁸ : Ring T\ninst✝⁷ : Algebra R S\ninst✝⁶ : Algebra S T\ninst✝⁵ : Algebra R T\ninst✝⁴ : IsScalarTower R S T\nm : Type u_4\nn : Type u_5\ninst✝³ : Fintype m\ninst✝² : Fintype n\ninst✝¹ : DecidableEq m\ninst✝ : DecidableEq n\nb : Basis m R S\nc : Basis n S T\nx : S\ni j : m\nk : n\n⊢ ↑(leftMulMatrix (Basis.smul b c)) (↑(algebraMap S T) x) (i, k) (j, k) = ↑(leftMulMatrix b) x i j\n[PROOFSTEP]\nrw [smul_leftMulMatrix_algebraMap, blockDiagonal_apply_eq]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : CommRing S\ninst✝⁸ : Ring T\ninst✝⁷ : Algebra R S\ninst✝⁶ : Algebra S T\ninst✝⁵ : Algebra R T\ninst✝⁴ : IsScalarTower R S T\nm : Type u_4\nn : Type u_5\ninst✝³ : Fintype m\ninst✝² : Fintype n\ninst✝¹ : DecidableEq m\ninst✝ : DecidableEq n\nb : Basis m R S\nc : Basis n S T\nx : S\ni j : m\nk k' : n\nh : k ≠ k'\n⊢ ↑(leftMulMatrix (Basis.smul b c)) (↑(algebraMap S T) x) (i, k) (j, k') = 0\n[PROOFSTEP]\nrw [smul_leftMulMatrix_algebraMap, blockDiagonal_apply_ne _ _ _ h]\n[GOAL]\nR : Type v\ninst✝⁷ : CommRing R\nn : Type u_1\ninst✝⁶ : DecidableEq n\nM : Type u_2\nM₁ : Type u_3\nM₂ : Type u_4\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Module R M\ninst✝³ : AddCommGroup M₁\ninst✝² : Module R M₁\ninst✝¹ : AddCommGroup M₂\ninst✝ : Module R M₂\ne : M₁ ≃ₗ[R] M₂\nsrc✝ : Module.End R M₁ ≃ₗ[R] Module.End R M₂ := conj e\nf g : Module.End R M₁\n⊢ Equiv.toFun\n      { toFun := src✝.toFun, invFun := src✝.invFun, left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),\n        right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }\n      (f * g) =\n    Equiv.toFun\n        { toFun := src✝.toFun, invFun := src✝.invFun, left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),\n          right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }\n        f *\n      Equiv.toFun\n        { toFun := src✝.toFun, invFun := src✝.invFun, left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),\n          right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }\n        g\n[PROOFSTEP]\napply e.arrowCongr_comp\n[GOAL]\nR : Type v\ninst✝⁷ : CommRing R\nn : Type u_1\ninst✝⁶ : DecidableEq n\nM : Type u_2\nM₁ : Type u_3\nM₂ : Type u_4\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Module R M\ninst✝³ : AddCommGroup M₁\ninst✝² : Module R M₁\ninst✝¹ : AddCommGroup M₂\ninst✝ : Module R M₂\ne : M₁ ≃ₗ[R] M₂\nsrc✝ : Module.End R M₁ ≃ₗ[R] Module.End R M₂ := conj e\nr : R\n⊢ Equiv.toFun\n      { toFun := src✝.toFun, invFun := src✝.invFun, left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),\n        right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }\n      (↑(algebraMap R (Module.End R M₁)) r) =\n    ↑(algebraMap R (Module.End R M₂)) r\n[PROOFSTEP]\nchange e.conj (r • LinearMap.id) = r • LinearMap.id\n[GOAL]\nR : Type v\ninst✝⁷ : CommRing R\nn : Type u_1\ninst✝⁶ : DecidableEq n\nM : Type u_2\nM₁ : Type u_3\nM₂ : Type u_4\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Module R M\ninst✝³ : AddCommGroup M₁\ninst✝² : Module R M₁\ninst✝¹ : AddCommGroup M₂\ninst✝ : Module R M₂\ne : M₁ ≃ₗ[R] M₂\nsrc✝ : Module.End R M₁ ≃ₗ[R] Module.End R M₂ := conj e\nr : R\n⊢ ↑(conj e) (r • LinearMap.id) = r • LinearMap.id\n[PROOFSTEP]\nrw [LinearEquiv.map_smul, LinearEquiv.conj_id]\n", "meta": {"mathlib_filename": "Mathlib.LinearAlgebra.Matrix.ToLin", "llama_tokens": 45910, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7905303087996142, "lm_q2_score": 0.6513548646660542, "lm_q1q2_score": 0.5149157623025867}}
{"text": "[GOAL]\n𝕜 : Type u_1\ninst✝¹¹ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝⁸ : NormedAddCommGroup F\ninst✝⁷ : NormedSpace 𝕜 F\nG : Type u_4\ninst✝⁶ : NormedAddCommGroup G\ninst✝⁵ : NormedSpace 𝕜 G\nG' : Type u_5\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace 𝕜 G'\nf f₀ f₁ g : E → F\nf' f₀' f₁' g' e : E →L[𝕜] F\nx : E\ns t : Set E\nL L₁ L₂ : Filter E\nι : Type u_6\ninst✝² : Fintype ι\nF' : ι → Type u_7\ninst✝¹ : (i : ι) → NormedAddCommGroup (F' i)\ninst✝ : (i : ι) → NormedSpace 𝕜 (F' i)\nφ : (i : ι) → E → F' i\nφ' : (i : ι) → E →L[𝕜] F' i\nΦ : E → (i : ι) → F' i\nΦ' : E →L[𝕜] (i : ι) → F' i\n⊢ HasStrictFDerivAt Φ Φ' x ↔ ∀ (i : ι), HasStrictFDerivAt (fun x => Φ x i) (comp (proj i) Φ') x\n[PROOFSTEP]\nsimp only [HasStrictFDerivAt, ContinuousLinearMap.coe_pi]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹¹ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝⁸ : NormedAddCommGroup F\ninst✝⁷ : NormedSpace 𝕜 F\nG : Type u_4\ninst✝⁶ : NormedAddCommGroup G\ninst✝⁵ : NormedSpace 𝕜 G\nG' : Type u_5\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace 𝕜 G'\nf f₀ f₁ g : E → F\nf' f₀' f₁' g' e : E →L[𝕜] F\nx : E\ns t : Set E\nL L₁ L₂ : Filter E\nι : Type u_6\ninst✝² : Fintype ι\nF' : ι → Type u_7\ninst✝¹ : (i : ι) → NormedAddCommGroup (F' i)\ninst✝ : (i : ι) → NormedSpace 𝕜 (F' i)\nφ : (i : ι) → E → F' i\nφ' : (i : ι) → E →L[𝕜] F' i\nΦ : E → (i : ι) → F' i\nΦ' : E →L[𝕜] (i : ι) → F' i\n⊢ ((fun p => Φ p.fst - Φ p.snd - ↑Φ' (p.fst - p.snd)) =o[𝓝 (x, x)] fun p => p.fst - p.snd) ↔\n    ∀ (i : ι),\n      (fun p => Φ p.fst i - Φ p.snd i - ↑(comp (proj i) Φ') (p.fst - p.snd)) =o[𝓝 (x, x)] fun p => p.fst - p.snd\n[PROOFSTEP]\nexact isLittleO_pi\n[GOAL]\n𝕜 : Type u_1\ninst✝¹¹ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝⁸ : NormedAddCommGroup F\ninst✝⁷ : NormedSpace 𝕜 F\nG : Type u_4\ninst✝⁶ : NormedAddCommGroup G\ninst✝⁵ : NormedSpace 𝕜 G\nG' : Type u_5\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace 𝕜 G'\nf f₀ f₁ g : E → F\nf' f₀' f₁' g' e : E →L[𝕜] F\nx : E\ns t : Set E\nL L₁ L₂ : Filter E\nι : Type u_6\ninst✝² : Fintype ι\nF' : ι → Type u_7\ninst✝¹ : (i : ι) → NormedAddCommGroup (F' i)\ninst✝ : (i : ι) → NormedSpace 𝕜 (F' i)\nφ : (i : ι) → E → F' i\nφ' : (i : ι) → E →L[𝕜] F' i\nΦ : E → (i : ι) → F' i\nΦ' : E →L[𝕜] (i : ι) → F' i\n⊢ HasFDerivAtFilter Φ Φ' x L ↔ ∀ (i : ι), HasFDerivAtFilter (fun x => Φ x i) (comp (proj i) Φ') x L\n[PROOFSTEP]\nsimp only [HasFDerivAtFilter, ContinuousLinearMap.coe_pi]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹¹ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝⁸ : NormedAddCommGroup F\ninst✝⁷ : NormedSpace 𝕜 F\nG : Type u_4\ninst✝⁶ : NormedAddCommGroup G\ninst✝⁵ : NormedSpace 𝕜 G\nG' : Type u_5\ninst✝⁴ : NormedAddCommGroup G'\ninst✝³ : NormedSpace 𝕜 G'\nf f₀ f₁ g : E → F\nf' f₀' f₁' g' e : E →L[𝕜] F\nx : E\ns t : Set E\nL L₁ L₂ : Filter E\nι : Type u_6\ninst✝² : Fintype ι\nF' : ι → Type u_7\ninst✝¹ : (i : ι) → NormedAddCommGroup (F' i)\ninst✝ : (i : ι) → NormedSpace 𝕜 (F' i)\nφ : (i : ι) → E → F' i\nφ' : (i : ι) → E →L[𝕜] F' i\nΦ : E → (i : ι) → F' i\nΦ' : E →L[𝕜] (i : ι) → F' i\n⊢ ((fun x' => Φ x' - Φ x - ↑Φ' (x' - x)) =o[L] fun x' => x' - x) ↔\n    ∀ (i : ι), (fun x' => Φ x' i - Φ x i - ↑(comp (proj i) Φ') (x' - x)) =o[L] fun x' => x' - x\n[PROOFSTEP]\nexact isLittleO_pi\n", "meta": {"mathlib_filename": "Mathlib.Analysis.Calculus.FDeriv.Prod", "llama_tokens": 1875, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8128673223709251, "lm_q2_score": 0.6334102775181399, "lm_q1q2_score": 0.514878516248395}}
{"text": "[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring A\ninst✝ : Algebra R A\ns t : Set A\nh1 : FG (↑Subalgebra.toSubmodule (adjoin R s))\nh2 : FG (↑Subalgebra.toSubmodule (adjoin { x // x ∈ adjoin R s } t))\n⊢ FG (↑Subalgebra.toSubmodule (adjoin R (s ∪ t)))\n[PROOFSTEP]\nrcases fg_def.1 h1 with ⟨p, hp, hp'⟩\n[GOAL]\ncase intro.intro\nR : Type u\nA : Type v\nB : Type w\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring A\ninst✝ : Algebra R A\ns t : Set A\nh1 : FG (↑Subalgebra.toSubmodule (adjoin R s))\nh2 : FG (↑Subalgebra.toSubmodule (adjoin { x // x ∈ adjoin R s } t))\np : Set A\nhp : Set.Finite p\nhp' : span R p = ↑Subalgebra.toSubmodule (adjoin R s)\n⊢ FG (↑Subalgebra.toSubmodule (adjoin R (s ∪ t)))\n[PROOFSTEP]\nrcases fg_def.1 h2 with ⟨q, hq, hq'⟩\n[GOAL]\ncase intro.intro.intro.intro\nR : Type u\nA : Type v\nB : Type w\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring A\ninst✝ : Algebra R A\ns t : Set A\nh1 : FG (↑Subalgebra.toSubmodule (adjoin R s))\nh2 : FG (↑Subalgebra.toSubmodule (adjoin { x // x ∈ adjoin R s } t))\np : Set A\nhp : Set.Finite p\nhp' : span R p = ↑Subalgebra.toSubmodule (adjoin R s)\nq : Set A\nhq : Set.Finite q\nhq' : span { x // x ∈ adjoin R s } q = ↑Subalgebra.toSubmodule (adjoin { x // x ∈ adjoin R s } t)\n⊢ FG (↑Subalgebra.toSubmodule (adjoin R (s ∪ t)))\n[PROOFSTEP]\nrefine' fg_def.2 ⟨p * q, hp.mul hq, le_antisymm _ _⟩\n[GOAL]\ncase intro.intro.intro.intro.refine'_1\nR : Type u\nA : Type v\nB : Type w\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring A\ninst✝ : Algebra R A\ns t : Set A\nh1 : FG (↑Subalgebra.toSubmodule (adjoin R s))\nh2 : FG (↑Subalgebra.toSubmodule (adjoin { x // x ∈ adjoin R s } t))\np : Set A\nhp : Set.Finite p\nhp' : span R p = ↑Subalgebra.toSubmodule (adjoin R s)\nq : Set A\nhq : Set.Finite q\nhq' : span { x // x ∈ adjoin R s } q = ↑Subalgebra.toSubmodule (adjoin { x // x ∈ adjoin R s } t)\n⊢ span R (p * q) ≤ ↑Subalgebra.toSubmodule (adjoin R (s ∪ t))\n[PROOFSTEP]\nrw [span_le]\n[GOAL]\ncase intro.intro.intro.intro.refine'_1\nR : Type u\nA : Type v\nB : Type w\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring A\ninst✝ : Algebra R A\ns t : Set A\nh1 : FG (↑Subalgebra.toSubmodule (adjoin R s))\nh2 : FG (↑Subalgebra.toSubmodule (adjoin { x // x ∈ adjoin R s } t))\np : Set A\nhp : Set.Finite p\nhp' : span R p = ↑Subalgebra.toSubmodule (adjoin R s)\nq : Set A\nhq : Set.Finite q\nhq' : span { x // x ∈ adjoin R s } q = ↑Subalgebra.toSubmodule (adjoin { x // x ∈ adjoin R s } t)\n⊢ p * q ⊆ ↑(↑Subalgebra.toSubmodule (adjoin R (s ∪ t)))\n[PROOFSTEP]\nrintro _ ⟨x, y, hx, hy, rfl⟩\n[GOAL]\ncase intro.intro.intro.intro.refine'_1.intro.intro.intro.intro\nR : Type u\nA : Type v\nB : Type w\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring A\ninst✝ : Algebra R A\ns t : Set A\nh1 : FG (↑Subalgebra.toSubmodule (adjoin R s))\nh2 : FG (↑Subalgebra.toSubmodule (adjoin { x // x ∈ adjoin R s } t))\np : Set A\nhp : Set.Finite p\nhp' : span R p = ↑Subalgebra.toSubmodule (adjoin R s)\nq : Set A\nhq : Set.Finite q\nhq' : span { x // x ∈ adjoin R s } q = ↑Subalgebra.toSubmodule (adjoin { x // x ∈ adjoin R s } t)\nx y : A\nhx : x ∈ p\nhy : y ∈ q\n⊢ (fun x x_1 => x * x_1) x y ∈ ↑(↑Subalgebra.toSubmodule (adjoin R (s ∪ t)))\n[PROOFSTEP]\nchange x * y ∈ adjoin R (s ∪ t)\n[GOAL]\ncase intro.intro.intro.intro.refine'_1.intro.intro.intro.intro\nR : Type u\nA : Type v\nB : Type w\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring A\ninst✝ : Algebra R A\ns t : Set A\nh1 : FG (↑Subalgebra.toSubmodule (adjoin R s))\nh2 : FG (↑Subalgebra.toSubmodule (adjoin { x // x ∈ adjoin R s } t))\np : Set A\nhp : Set.Finite p\nhp' : span R p = ↑Subalgebra.toSubmodule (adjoin R s)\nq : Set A\nhq : Set.Finite q\nhq' : span { x // x ∈ adjoin R s } q = ↑Subalgebra.toSubmodule (adjoin { x // x ∈ adjoin R s } t)\nx y : A\nhx : x ∈ p\nhy : y ∈ q\n⊢ x * y ∈ adjoin R (s ∪ t)\n[PROOFSTEP]\nrefine' Subalgebra.mul_mem _ _ _\n[GOAL]\ncase intro.intro.intro.intro.refine'_1.intro.intro.intro.intro.refine'_1\nR : Type u\nA : Type v\nB : Type w\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring A\ninst✝ : Algebra R A\ns t : Set A\nh1 : FG (↑Subalgebra.toSubmodule (adjoin R s))\nh2 : FG (↑Subalgebra.toSubmodule (adjoin { x // x ∈ adjoin R s } t))\np : Set A\nhp : Set.Finite p\nhp' : span R p = ↑Subalgebra.toSubmodule (adjoin R s)\nq : Set A\nhq : Set.Finite q\nhq' : span { x // x ∈ adjoin R s } q = ↑Subalgebra.toSubmodule (adjoin { x // x ∈ adjoin R s } t)\nx y : A\nhx : x ∈ p\nhy : y ∈ q\n⊢ x ∈ adjoin R (s ∪ t)\n[PROOFSTEP]\nhave : x ∈ Subalgebra.toSubmodule (adjoin R s) := by\n  rw [← hp']\n  exact subset_span hx\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring A\ninst✝ : Algebra R A\ns t : Set A\nh1 : FG (↑Subalgebra.toSubmodule (adjoin R s))\nh2 : FG (↑Subalgebra.toSubmodule (adjoin { x // x ∈ adjoin R s } t))\np : Set A\nhp : Set.Finite p\nhp' : span R p = ↑Subalgebra.toSubmodule (adjoin R s)\nq : Set A\nhq : Set.Finite q\nhq' : span { x // x ∈ adjoin R s } q = ↑Subalgebra.toSubmodule (adjoin { x // x ∈ adjoin R s } t)\nx y : A\nhx : x ∈ p\nhy : y ∈ q\n⊢ x ∈ ↑Subalgebra.toSubmodule (adjoin R s)\n[PROOFSTEP]\nrw [← hp']\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring A\ninst✝ : Algebra R A\ns t : Set A\nh1 : FG (↑Subalgebra.toSubmodule (adjoin R s))\nh2 : FG (↑Subalgebra.toSubmodule (adjoin { x // x ∈ adjoin R s } t))\np : Set A\nhp : Set.Finite p\nhp' : span R p = ↑Subalgebra.toSubmodule (adjoin R s)\nq : Set A\nhq : Set.Finite q\nhq' : span { x // x ∈ adjoin R s } q = ↑Subalgebra.toSubmodule (adjoin { x // x ∈ adjoin R s } t)\nx y : A\nhx : x ∈ p\nhy : y ∈ q\n⊢ x ∈ span R p\n[PROOFSTEP]\nexact subset_span hx\n[GOAL]\ncase intro.intro.intro.intro.refine'_1.intro.intro.intro.intro.refine'_1\nR : Type u\nA : Type v\nB : Type w\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring A\ninst✝ : Algebra R A\ns t : Set A\nh1 : FG (↑Subalgebra.toSubmodule (adjoin R s))\nh2 : FG (↑Subalgebra.toSubmodule (adjoin { x // x ∈ adjoin R s } t))\np : Set A\nhp : Set.Finite p\nhp' : span R p = ↑Subalgebra.toSubmodule (adjoin R s)\nq : Set A\nhq : Set.Finite q\nhq' : span { x // x ∈ adjoin R s } q = ↑Subalgebra.toSubmodule (adjoin { x // x ∈ adjoin R s } t)\nx y : A\nhx : x ∈ p\nhy : y ∈ q\nthis : x ∈ ↑Subalgebra.toSubmodule (adjoin R s)\n⊢ x ∈ adjoin R (s ∪ t)\n[PROOFSTEP]\nexact adjoin_mono (Set.subset_union_left _ _) this\n[GOAL]\ncase intro.intro.intro.intro.refine'_1.intro.intro.intro.intro.refine'_2\nR : Type u\nA : Type v\nB : Type w\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring A\ninst✝ : Algebra R A\ns t : Set A\nh1 : FG (↑Subalgebra.toSubmodule (adjoin R s))\nh2 : FG (↑Subalgebra.toSubmodule (adjoin { x // x ∈ adjoin R s } t))\np : Set A\nhp : Set.Finite p\nhp' : span R p = ↑Subalgebra.toSubmodule (adjoin R s)\nq : Set A\nhq : Set.Finite q\nhq' : span { x // x ∈ adjoin R s } q = ↑Subalgebra.toSubmodule (adjoin { x // x ∈ adjoin R s } t)\nx y : A\nhx : x ∈ p\nhy : y ∈ q\n⊢ y ∈ adjoin R (s ∪ t)\n[PROOFSTEP]\nhave : y ∈ Subalgebra.toSubmodule (adjoin (adjoin R s) t) :=\n  by\n  rw [← hq']\n  exact subset_span hy\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring A\ninst✝ : Algebra R A\ns t : Set A\nh1 : FG (↑Subalgebra.toSubmodule (adjoin R s))\nh2 : FG (↑Subalgebra.toSubmodule (adjoin { x // x ∈ adjoin R s } t))\np : Set A\nhp : Set.Finite p\nhp' : span R p = ↑Subalgebra.toSubmodule (adjoin R s)\nq : Set A\nhq : Set.Finite q\nhq' : span { x // x ∈ adjoin R s } q = ↑Subalgebra.toSubmodule (adjoin { x // x ∈ adjoin R s } t)\nx y : A\nhx : x ∈ p\nhy : y ∈ q\n⊢ y ∈ ↑Subalgebra.toSubmodule (adjoin { x // x ∈ adjoin R s } t)\n[PROOFSTEP]\nrw [← hq']\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring A\ninst✝ : Algebra R A\ns t : Set A\nh1 : FG (↑Subalgebra.toSubmodule (adjoin R s))\nh2 : FG (↑Subalgebra.toSubmodule (adjoin { x // x ∈ adjoin R s } t))\np : Set A\nhp : Set.Finite p\nhp' : span R p = ↑Subalgebra.toSubmodule (adjoin R s)\nq : Set A\nhq : Set.Finite q\nhq' : span { x // x ∈ adjoin R s } q = ↑Subalgebra.toSubmodule (adjoin { x // x ∈ adjoin R s } t)\nx y : A\nhx : x ∈ p\nhy : y ∈ q\n⊢ y ∈ span { x // x ∈ adjoin R s } q\n[PROOFSTEP]\nexact subset_span hy\n[GOAL]\ncase intro.intro.intro.intro.refine'_1.intro.intro.intro.intro.refine'_2\nR : Type u\nA : Type v\nB : Type w\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring A\ninst✝ : Algebra R A\ns t : Set A\nh1 : FG (↑Subalgebra.toSubmodule (adjoin R s))\nh2 : FG (↑Subalgebra.toSubmodule (adjoin { x // x ∈ adjoin R s } t))\np : Set A\nhp : Set.Finite p\nhp' : span R p = ↑Subalgebra.toSubmodule (adjoin R s)\nq : Set A\nhq : Set.Finite q\nhq' : span { x // x ∈ adjoin R s } q = ↑Subalgebra.toSubmodule (adjoin { x // x ∈ adjoin R s } t)\nx y : A\nhx : x ∈ p\nhy : y ∈ q\nthis : y ∈ ↑Subalgebra.toSubmodule (adjoin { x // x ∈ adjoin R s } t)\n⊢ y ∈ adjoin R (s ∪ t)\n[PROOFSTEP]\nchange y ∈ adjoin R (s ∪ t)\n[GOAL]\ncase intro.intro.intro.intro.refine'_1.intro.intro.intro.intro.refine'_2\nR : Type u\nA : Type v\nB : Type w\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring A\ninst✝ : Algebra R A\ns t : Set A\nh1 : FG (↑Subalgebra.toSubmodule (adjoin R s))\nh2 : FG (↑Subalgebra.toSubmodule (adjoin { x // x ∈ adjoin R s } t))\np : Set A\nhp : Set.Finite p\nhp' : span R p = ↑Subalgebra.toSubmodule (adjoin R s)\nq : Set A\nhq : Set.Finite q\nhq' : span { x // x ∈ adjoin R s } q = ↑Subalgebra.toSubmodule (adjoin { x // x ∈ adjoin R s } t)\nx y : A\nhx : x ∈ p\nhy : y ∈ q\nthis : y ∈ ↑Subalgebra.toSubmodule (adjoin { x // x ∈ adjoin R s } t)\n⊢ y ∈ adjoin R (s ∪ t)\n[PROOFSTEP]\nrwa [adjoin_union_eq_adjoin_adjoin]\n[GOAL]\ncase intro.intro.intro.intro.refine'_2\nR : Type u\nA : Type v\nB : Type w\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring A\ninst✝ : Algebra R A\ns t : Set A\nh1 : FG (↑Subalgebra.toSubmodule (adjoin R s))\nh2 : FG (↑Subalgebra.toSubmodule (adjoin { x // x ∈ adjoin R s } t))\np : Set A\nhp : Set.Finite p\nhp' : span R p = ↑Subalgebra.toSubmodule (adjoin R s)\nq : Set A\nhq : Set.Finite q\nhq' : span { x // x ∈ adjoin R s } q = ↑Subalgebra.toSubmodule (adjoin { x // x ∈ adjoin R s } t)\n⊢ ↑Subalgebra.toSubmodule (adjoin R (s ∪ t)) ≤ span R (p * q)\n[PROOFSTEP]\nintro r hr\n[GOAL]\ncase intro.intro.intro.intro.refine'_2\nR : Type u\nA : Type v\nB : Type w\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring A\ninst✝ : Algebra R A\ns t : Set A\nh1 : FG (↑Subalgebra.toSubmodule (adjoin R s))\nh2 : FG (↑Subalgebra.toSubmodule (adjoin { x // x ∈ adjoin R s } t))\np : Set A\nhp : Set.Finite p\nhp' : span R p = ↑Subalgebra.toSubmodule (adjoin R s)\nq : Set A\nhq : Set.Finite q\nhq' : span { x // x ∈ adjoin R s } q = ↑Subalgebra.toSubmodule (adjoin { x // x ∈ adjoin R s } t)\nr : A\nhr : r ∈ ↑Subalgebra.toSubmodule (adjoin R (s ∪ t))\n⊢ r ∈ span R (p * q)\n[PROOFSTEP]\nchange r ∈ adjoin R (s ∪ t) at hr \n[GOAL]\ncase intro.intro.intro.intro.refine'_2\nR : Type u\nA : Type v\nB : Type w\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring A\ninst✝ : Algebra R A\ns t : Set A\nh1 : FG (↑Subalgebra.toSubmodule (adjoin R s))\nh2 : FG (↑Subalgebra.toSubmodule (adjoin { x // x ∈ adjoin R s } t))\np : Set A\nhp : Set.Finite p\nhp' : span R p = ↑Subalgebra.toSubmodule (adjoin R s)\nq : Set A\nhq : Set.Finite q\nhq' : span { x // x ∈ adjoin R s } q = ↑Subalgebra.toSubmodule (adjoin { x // x ∈ adjoin R s } t)\nr : A\nhr : r ∈ adjoin R (s ∪ t)\n⊢ r ∈ span R (p * q)\n[PROOFSTEP]\nrw [adjoin_union_eq_adjoin_adjoin] at hr \n[GOAL]\ncase intro.intro.intro.intro.refine'_2\nR : Type u\nA : Type v\nB : Type w\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring A\ninst✝ : Algebra R A\ns t : Set A\nh1 : FG (↑Subalgebra.toSubmodule (adjoin R s))\nh2 : FG (↑Subalgebra.toSubmodule (adjoin { x // x ∈ adjoin R s } t))\np : Set A\nhp : Set.Finite p\nhp' : span R p = ↑Subalgebra.toSubmodule (adjoin R s)\nq : Set A\nhq : Set.Finite q\nhq' : span { x // x ∈ adjoin R s } q = ↑Subalgebra.toSubmodule (adjoin { x // x ∈ adjoin R s } t)\nr : A\nhr : r ∈ Subalgebra.restrictScalars R (adjoin { x // x ∈ adjoin R s } t)\n⊢ r ∈ span R (p * q)\n[PROOFSTEP]\nchange r ∈ Subalgebra.toSubmodule (adjoin (adjoin R s) t) at hr \n[GOAL]\ncase intro.intro.intro.intro.refine'_2\nR : Type u\nA : Type v\nB : Type w\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring A\ninst✝ : Algebra R A\ns t : Set A\nh1 : FG (↑Subalgebra.toSubmodule (adjoin R s))\nh2 : FG (↑Subalgebra.toSubmodule (adjoin { x // x ∈ adjoin R s } t))\np : Set A\nhp : Set.Finite p\nhp' : span R p = ↑Subalgebra.toSubmodule (adjoin R s)\nq : Set A\nhq : Set.Finite q\nhq' : span { x // x ∈ adjoin R s } q = ↑Subalgebra.toSubmodule (adjoin { x // x ∈ adjoin R s } t)\nr : A\nhr : r ∈ ↑Subalgebra.toSubmodule (adjoin { x // x ∈ adjoin R s } t)\n⊢ r ∈ span R (p * q)\n[PROOFSTEP]\nrw [← hq', ← Set.image_id q, Finsupp.mem_span_image_iff_total (adjoin R s)] at hr \n[GOAL]\ncase intro.intro.intro.intro.refine'_2\nR : Type u\nA : Type v\nB : Type w\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring A\ninst✝ : Algebra R A\ns t : Set A\nh1 : FG (↑Subalgebra.toSubmodule (adjoin R s))\nh2 : FG (↑Subalgebra.toSubmodule (adjoin { x // x ∈ adjoin R s } t))\np : Set A\nhp : Set.Finite p\nhp' : span R p = ↑Subalgebra.toSubmodule (adjoin R s)\nq : Set A\nhq : Set.Finite q\nhq' : span { x // x ∈ adjoin R s } q = ↑Subalgebra.toSubmodule (adjoin { x // x ∈ adjoin R s } t)\nr : A\nhr :\n  ∃ l,\n    l ∈ Finsupp.supported { x // x ∈ adjoin R s } { x // x ∈ adjoin R s } q ∧\n      ↑(Finsupp.total A A { x // x ∈ adjoin R s } _root_.id) l = r\n⊢ r ∈ span R (p * q)\n[PROOFSTEP]\nrcases hr with ⟨l, hlq, rfl⟩\n[GOAL]\ncase intro.intro.intro.intro.refine'_2.intro.intro\nR : Type u\nA : Type v\nB : Type w\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring A\ninst✝ : Algebra R A\ns t : Set A\nh1 : FG (↑Subalgebra.toSubmodule (adjoin R s))\nh2 : FG (↑Subalgebra.toSubmodule (adjoin { x // x ∈ adjoin R s } t))\np : Set A\nhp : Set.Finite p\nhp' : span R p = ↑Subalgebra.toSubmodule (adjoin R s)\nq : Set A\nhq : Set.Finite q\nhq' : span { x // x ∈ adjoin R s } q = ↑Subalgebra.toSubmodule (adjoin { x // x ∈ adjoin R s } t)\nl : A →₀ { x // x ∈ adjoin R s }\nhlq : l ∈ Finsupp.supported { x // x ∈ adjoin R s } { x // x ∈ adjoin R s } q\n⊢ ↑(Finsupp.total A A { x // x ∈ adjoin R s } _root_.id) l ∈ span R (p * q)\n[PROOFSTEP]\nhave := @Finsupp.total_apply A A (adjoin R s)\n[GOAL]\ncase intro.intro.intro.intro.refine'_2.intro.intro\nR : Type u\nA : Type v\nB : Type w\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring A\ninst✝ : Algebra R A\ns t : Set A\nh1 : FG (↑Subalgebra.toSubmodule (adjoin R s))\nh2 : FG (↑Subalgebra.toSubmodule (adjoin { x // x ∈ adjoin R s } t))\np : Set A\nhp : Set.Finite p\nhp' : span R p = ↑Subalgebra.toSubmodule (adjoin R s)\nq : Set A\nhq : Set.Finite q\nhq' : span { x // x ∈ adjoin R s } q = ↑Subalgebra.toSubmodule (adjoin { x // x ∈ adjoin R s } t)\nl : A →₀ { x // x ∈ adjoin R s }\nhlq : l ∈ Finsupp.supported { x // x ∈ adjoin R s } { x // x ∈ adjoin R s } q\nthis :\n  ∀ [inst : Semiring { x // x ∈ adjoin R s }] [inst_1 : AddCommMonoid A] [inst_2 : Module { x // x ∈ adjoin R s } A]\n    {v : A → A} (l : A →₀ { x // x ∈ adjoin R s }),\n    ↑(Finsupp.total A A { x // x ∈ adjoin R s } v) l = Finsupp.sum l fun i a => a • v i\n⊢ ↑(Finsupp.total A A { x // x ∈ adjoin R s } _root_.id) l ∈ span R (p * q)\n[PROOFSTEP]\nrw [this, Finsupp.sum]\n[GOAL]\ncase intro.intro.intro.intro.refine'_2.intro.intro\nR : Type u\nA : Type v\nB : Type w\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring A\ninst✝ : Algebra R A\ns t : Set A\nh1 : FG (↑Subalgebra.toSubmodule (adjoin R s))\nh2 : FG (↑Subalgebra.toSubmodule (adjoin { x // x ∈ adjoin R s } t))\np : Set A\nhp : Set.Finite p\nhp' : span R p = ↑Subalgebra.toSubmodule (adjoin R s)\nq : Set A\nhq : Set.Finite q\nhq' : span { x // x ∈ adjoin R s } q = ↑Subalgebra.toSubmodule (adjoin { x // x ∈ adjoin R s } t)\nl : A →₀ { x // x ∈ adjoin R s }\nhlq : l ∈ Finsupp.supported { x // x ∈ adjoin R s } { x // x ∈ adjoin R s } q\nthis :\n  ∀ [inst : Semiring { x // x ∈ adjoin R s }] [inst_1 : AddCommMonoid A] [inst_2 : Module { x // x ∈ adjoin R s } A]\n    {v : A → A} (l : A →₀ { x // x ∈ adjoin R s }),\n    ↑(Finsupp.total A A { x // x ∈ adjoin R s } v) l = Finsupp.sum l fun i a => a • v i\n⊢ (Finset.sum l.support fun a => ↑l a • _root_.id a) ∈ span R (p * q)\n[PROOFSTEP]\nrefine' sum_mem _\n[GOAL]\ncase intro.intro.intro.intro.refine'_2.intro.intro\nR : Type u\nA : Type v\nB : Type w\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring A\ninst✝ : Algebra R A\ns t : Set A\nh1 : FG (↑Subalgebra.toSubmodule (adjoin R s))\nh2 : FG (↑Subalgebra.toSubmodule (adjoin { x // x ∈ adjoin R s } t))\np : Set A\nhp : Set.Finite p\nhp' : span R p = ↑Subalgebra.toSubmodule (adjoin R s)\nq : Set A\nhq : Set.Finite q\nhq' : span { x // x ∈ adjoin R s } q = ↑Subalgebra.toSubmodule (adjoin { x // x ∈ adjoin R s } t)\nl : A →₀ { x // x ∈ adjoin R s }\nhlq : l ∈ Finsupp.supported { x // x ∈ adjoin R s } { x // x ∈ adjoin R s } q\nthis :\n  ∀ [inst : Semiring { x // x ∈ adjoin R s }] [inst_1 : AddCommMonoid A] [inst_2 : Module { x // x ∈ adjoin R s } A]\n    {v : A → A} (l : A →₀ { x // x ∈ adjoin R s }),\n    ↑(Finsupp.total A A { x // x ∈ adjoin R s } v) l = Finsupp.sum l fun i a => a • v i\n⊢ ∀ (c : A), c ∈ l.support → ↑l c • _root_.id c ∈ span R (p * q)\n[PROOFSTEP]\nintro z hz\n[GOAL]\ncase intro.intro.intro.intro.refine'_2.intro.intro\nR : Type u\nA : Type v\nB : Type w\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring A\ninst✝ : Algebra R A\ns t : Set A\nh1 : FG (↑Subalgebra.toSubmodule (adjoin R s))\nh2 : FG (↑Subalgebra.toSubmodule (adjoin { x // x ∈ adjoin R s } t))\np : Set A\nhp : Set.Finite p\nhp' : span R p = ↑Subalgebra.toSubmodule (adjoin R s)\nq : Set A\nhq : Set.Finite q\nhq' : span { x // x ∈ adjoin R s } q = ↑Subalgebra.toSubmodule (adjoin { x // x ∈ adjoin R s } t)\nl : A →₀ { x // x ∈ adjoin R s }\nhlq : l ∈ Finsupp.supported { x // x ∈ adjoin R s } { x // x ∈ adjoin R s } q\nthis :\n  ∀ [inst : Semiring { x // x ∈ adjoin R s }] [inst_1 : AddCommMonoid A] [inst_2 : Module { x // x ∈ adjoin R s } A]\n    {v : A → A} (l : A →₀ { x // x ∈ adjoin R s }),\n    ↑(Finsupp.total A A { x // x ∈ adjoin R s } v) l = Finsupp.sum l fun i a => a • v i\nz : A\nhz : z ∈ l.support\n⊢ ↑l z • _root_.id z ∈ span R (p * q)\n[PROOFSTEP]\nchange (l z).1 * _ ∈ _\n[GOAL]\ncase intro.intro.intro.intro.refine'_2.intro.intro\nR : Type u\nA : Type v\nB : Type w\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring A\ninst✝ : Algebra R A\ns t : Set A\nh1 : FG (↑Subalgebra.toSubmodule (adjoin R s))\nh2 : FG (↑Subalgebra.toSubmodule (adjoin { x // x ∈ adjoin R s } t))\np : Set A\nhp : Set.Finite p\nhp' : span R p = ↑Subalgebra.toSubmodule (adjoin R s)\nq : Set A\nhq : Set.Finite q\nhq' : span { x // x ∈ adjoin R s } q = ↑Subalgebra.toSubmodule (adjoin { x // x ∈ adjoin R s } t)\nl : A →₀ { x // x ∈ adjoin R s }\nhlq : l ∈ Finsupp.supported { x // x ∈ adjoin R s } { x // x ∈ adjoin R s } q\nthis :\n  ∀ [inst : Semiring { x // x ∈ adjoin R s }] [inst_1 : AddCommMonoid A] [inst_2 : Module { x // x ∈ adjoin R s } A]\n    {v : A → A} (l : A →₀ { x // x ∈ adjoin R s }),\n    ↑(Finsupp.total A A { x // x ∈ adjoin R s } v) l = Finsupp.sum l fun i a => a • v i\nz : A\nhz : z ∈ l.support\n⊢ ↑(↑l z) * _root_.id z ∈ span R (p * q)\n[PROOFSTEP]\nhave : (l z).1 ∈ Subalgebra.toSubmodule (adjoin R s) := (l z).2\n[GOAL]\ncase intro.intro.intro.intro.refine'_2.intro.intro\nR : Type u\nA : Type v\nB : Type w\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring A\ninst✝ : Algebra R A\ns t : Set A\nh1 : FG (↑Subalgebra.toSubmodule (adjoin R s))\nh2 : FG (↑Subalgebra.toSubmodule (adjoin { x // x ∈ adjoin R s } t))\np : Set A\nhp : Set.Finite p\nhp' : span R p = ↑Subalgebra.toSubmodule (adjoin R s)\nq : Set A\nhq : Set.Finite q\nhq' : span { x // x ∈ adjoin R s } q = ↑Subalgebra.toSubmodule (adjoin { x // x ∈ adjoin R s } t)\nl : A →₀ { x // x ∈ adjoin R s }\nhlq : l ∈ Finsupp.supported { x // x ∈ adjoin R s } { x // x ∈ adjoin R s } q\nthis✝ :\n  ∀ [inst : Semiring { x // x ∈ adjoin R s }] [inst_1 : AddCommMonoid A] [inst_2 : Module { x // x ∈ adjoin R s } A]\n    {v : A → A} (l : A →₀ { x // x ∈ adjoin R s }),\n    ↑(Finsupp.total A A { x // x ∈ adjoin R s } v) l = Finsupp.sum l fun i a => a • v i\nz : A\nhz : z ∈ l.support\nthis : ↑(↑l z) ∈ ↑Subalgebra.toSubmodule (adjoin R s)\n⊢ ↑(↑l z) * _root_.id z ∈ span R (p * q)\n[PROOFSTEP]\nrw [← hp', ← Set.image_id p, Finsupp.mem_span_image_iff_total R] at this \n[GOAL]\ncase intro.intro.intro.intro.refine'_2.intro.intro\nR : Type u\nA : Type v\nB : Type w\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring A\ninst✝ : Algebra R A\ns t : Set A\nh1 : FG (↑Subalgebra.toSubmodule (adjoin R s))\nh2 : FG (↑Subalgebra.toSubmodule (adjoin { x // x ∈ adjoin R s } t))\np : Set A\nhp : Set.Finite p\nhp' : span R p = ↑Subalgebra.toSubmodule (adjoin R s)\nq : Set A\nhq : Set.Finite q\nhq' : span { x // x ∈ adjoin R s } q = ↑Subalgebra.toSubmodule (adjoin { x // x ∈ adjoin R s } t)\nl : A →₀ { x // x ∈ adjoin R s }\nhlq : l ∈ Finsupp.supported { x // x ∈ adjoin R s } { x // x ∈ adjoin R s } q\nthis✝ :\n  ∀ [inst : Semiring { x // x ∈ adjoin R s }] [inst_1 : AddCommMonoid A] [inst_2 : Module { x // x ∈ adjoin R s } A]\n    {v : A → A} (l : A →₀ { x // x ∈ adjoin R s }),\n    ↑(Finsupp.total A A { x // x ∈ adjoin R s } v) l = Finsupp.sum l fun i a => a • v i\nz : A\nhz : z ∈ l.support\nthis : ∃ l_1, l_1 ∈ Finsupp.supported R R p ∧ ↑(Finsupp.total A A R _root_.id) l_1 = ↑(↑l z)\n⊢ ↑(↑l z) * _root_.id z ∈ span R (p * q)\n[PROOFSTEP]\nrcases this with ⟨l2, hlp, hl⟩\n[GOAL]\ncase intro.intro.intro.intro.refine'_2.intro.intro.intro.intro\nR : Type u\nA : Type v\nB : Type w\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring A\ninst✝ : Algebra R A\ns t : Set A\nh1 : FG (↑Subalgebra.toSubmodule (adjoin R s))\nh2 : FG (↑Subalgebra.toSubmodule (adjoin { x // x ∈ adjoin R s } t))\np : Set A\nhp : Set.Finite p\nhp' : span R p = ↑Subalgebra.toSubmodule (adjoin R s)\nq : Set A\nhq : Set.Finite q\nhq' : span { x // x ∈ adjoin R s } q = ↑Subalgebra.toSubmodule (adjoin { x // x ∈ adjoin R s } t)\nl : A →₀ { x // x ∈ adjoin R s }\nhlq : l ∈ Finsupp.supported { x // x ∈ adjoin R s } { x // x ∈ adjoin R s } q\nthis :\n  ∀ [inst : Semiring { x // x ∈ adjoin R s }] [inst_1 : AddCommMonoid A] [inst_2 : Module { x // x ∈ adjoin R s } A]\n    {v : A → A} (l : A →₀ { x // x ∈ adjoin R s }),\n    ↑(Finsupp.total A A { x // x ∈ adjoin R s } v) l = Finsupp.sum l fun i a => a • v i\nz : A\nhz : z ∈ l.support\nl2 : A →₀ R\nhlp : l2 ∈ Finsupp.supported R R p\nhl : ↑(Finsupp.total A A R _root_.id) l2 = ↑(↑l z)\n⊢ ↑(↑l z) * _root_.id z ∈ span R (p * q)\n[PROOFSTEP]\nhave := @Finsupp.total_apply A A R\n[GOAL]\ncase intro.intro.intro.intro.refine'_2.intro.intro.intro.intro\nR : Type u\nA : Type v\nB : Type w\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring A\ninst✝ : Algebra R A\ns t : Set A\nh1 : FG (↑Subalgebra.toSubmodule (adjoin R s))\nh2 : FG (↑Subalgebra.toSubmodule (adjoin { x // x ∈ adjoin R s } t))\np : Set A\nhp : Set.Finite p\nhp' : span R p = ↑Subalgebra.toSubmodule (adjoin R s)\nq : Set A\nhq : Set.Finite q\nhq' : span { x // x ∈ adjoin R s } q = ↑Subalgebra.toSubmodule (adjoin { x // x ∈ adjoin R s } t)\nl : A →₀ { x // x ∈ adjoin R s }\nhlq : l ∈ Finsupp.supported { x // x ∈ adjoin R s } { x // x ∈ adjoin R s } q\nthis✝ :\n  ∀ [inst : Semiring { x // x ∈ adjoin R s }] [inst_1 : AddCommMonoid A] [inst_2 : Module { x // x ∈ adjoin R s } A]\n    {v : A → A} (l : A →₀ { x // x ∈ adjoin R s }),\n    ↑(Finsupp.total A A { x // x ∈ adjoin R s } v) l = Finsupp.sum l fun i a => a • v i\nz : A\nhz : z ∈ l.support\nl2 : A →₀ R\nhlp : l2 ∈ Finsupp.supported R R p\nhl : ↑(Finsupp.total A A R _root_.id) l2 = ↑(↑l z)\nthis :\n  ∀ [inst : Semiring R] [inst_1 : AddCommMonoid A] [inst_2 : Module R A] {v : A → A} (l : A →₀ R),\n    ↑(Finsupp.total A A R v) l = Finsupp.sum l fun i a => a • v i\n⊢ ↑(↑l z) * _root_.id z ∈ span R (p * q)\n[PROOFSTEP]\nrw [this] at hl \n[GOAL]\ncase intro.intro.intro.intro.refine'_2.intro.intro.intro.intro\nR : Type u\nA : Type v\nB : Type w\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring A\ninst✝ : Algebra R A\ns t : Set A\nh1 : FG (↑Subalgebra.toSubmodule (adjoin R s))\nh2 : FG (↑Subalgebra.toSubmodule (adjoin { x // x ∈ adjoin R s } t))\np : Set A\nhp : Set.Finite p\nhp' : span R p = ↑Subalgebra.toSubmodule (adjoin R s)\nq : Set A\nhq : Set.Finite q\nhq' : span { x // x ∈ adjoin R s } q = ↑Subalgebra.toSubmodule (adjoin { x // x ∈ adjoin R s } t)\nl : A →₀ { x // x ∈ adjoin R s }\nhlq : l ∈ Finsupp.supported { x // x ∈ adjoin R s } { x // x ∈ adjoin R s } q\nthis✝ :\n  ∀ [inst : Semiring { x // x ∈ adjoin R s }] [inst_1 : AddCommMonoid A] [inst_2 : Module { x // x ∈ adjoin R s } A]\n    {v : A → A} (l : A →₀ { x // x ∈ adjoin R s }),\n    ↑(Finsupp.total A A { x // x ∈ adjoin R s } v) l = Finsupp.sum l fun i a => a • v i\nz : A\nhz : z ∈ l.support\nl2 : A →₀ R\nhlp : l2 ∈ Finsupp.supported R R p\nhl : (Finsupp.sum l2 fun i a => a • _root_.id i) = ↑(↑l z)\nthis :\n  ∀ [inst : Semiring R] [inst_1 : AddCommMonoid A] [inst_2 : Module R A] {v : A → A} (l : A →₀ R),\n    ↑(Finsupp.total A A R v) l = Finsupp.sum l fun i a => a • v i\n⊢ ↑(↑l z) * _root_.id z ∈ span R (p * q)\n[PROOFSTEP]\nrw [← hl, Finsupp.sum_mul]\n[GOAL]\ncase intro.intro.intro.intro.refine'_2.intro.intro.intro.intro\nR : Type u\nA : Type v\nB : Type w\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring A\ninst✝ : Algebra R A\ns t : Set A\nh1 : FG (↑Subalgebra.toSubmodule (adjoin R s))\nh2 : FG (↑Subalgebra.toSubmodule (adjoin { x // x ∈ adjoin R s } t))\np : Set A\nhp : Set.Finite p\nhp' : span R p = ↑Subalgebra.toSubmodule (adjoin R s)\nq : Set A\nhq : Set.Finite q\nhq' : span { x // x ∈ adjoin R s } q = ↑Subalgebra.toSubmodule (adjoin { x // x ∈ adjoin R s } t)\nl : A →₀ { x // x ∈ adjoin R s }\nhlq : l ∈ Finsupp.supported { x // x ∈ adjoin R s } { x // x ∈ adjoin R s } q\nthis✝ :\n  ∀ [inst : Semiring { x // x ∈ adjoin R s }] [inst_1 : AddCommMonoid A] [inst_2 : Module { x // x ∈ adjoin R s } A]\n    {v : A → A} (l : A →₀ { x // x ∈ adjoin R s }),\n    ↑(Finsupp.total A A { x // x ∈ adjoin R s } v) l = Finsupp.sum l fun i a => a • v i\nz : A\nhz : z ∈ l.support\nl2 : A →₀ R\nhlp : l2 ∈ Finsupp.supported R R p\nhl : (Finsupp.sum l2 fun i a => a • _root_.id i) = ↑(↑l z)\nthis :\n  ∀ [inst : Semiring R] [inst_1 : AddCommMonoid A] [inst_2 : Module R A] {v : A → A} (l : A →₀ R),\n    ↑(Finsupp.total A A R v) l = Finsupp.sum l fun i a => a • v i\n⊢ (Finsupp.sum l2 fun a c => c • _root_.id a * _root_.id z) ∈ span R (p * q)\n[PROOFSTEP]\nrefine' sum_mem _\n[GOAL]\ncase intro.intro.intro.intro.refine'_2.intro.intro.intro.intro\nR : Type u\nA : Type v\nB : Type w\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring A\ninst✝ : Algebra R A\ns t : Set A\nh1 : FG (↑Subalgebra.toSubmodule (adjoin R s))\nh2 : FG (↑Subalgebra.toSubmodule (adjoin { x // x ∈ adjoin R s } t))\np : Set A\nhp : Set.Finite p\nhp' : span R p = ↑Subalgebra.toSubmodule (adjoin R s)\nq : Set A\nhq : Set.Finite q\nhq' : span { x // x ∈ adjoin R s } q = ↑Subalgebra.toSubmodule (adjoin { x // x ∈ adjoin R s } t)\nl : A →₀ { x // x ∈ adjoin R s }\nhlq : l ∈ Finsupp.supported { x // x ∈ adjoin R s } { x // x ∈ adjoin R s } q\nthis✝ :\n  ∀ [inst : Semiring { x // x ∈ adjoin R s }] [inst_1 : AddCommMonoid A] [inst_2 : Module { x // x ∈ adjoin R s } A]\n    {v : A → A} (l : A →₀ { x // x ∈ adjoin R s }),\n    ↑(Finsupp.total A A { x // x ∈ adjoin R s } v) l = Finsupp.sum l fun i a => a • v i\nz : A\nhz : z ∈ l.support\nl2 : A →₀ R\nhlp : l2 ∈ Finsupp.supported R R p\nhl : (Finsupp.sum l2 fun i a => a • _root_.id i) = ↑(↑l z)\nthis :\n  ∀ [inst : Semiring R] [inst_1 : AddCommMonoid A] [inst_2 : Module R A] {v : A → A} (l : A →₀ R),\n    ↑(Finsupp.total A A R v) l = Finsupp.sum l fun i a => a • v i\n⊢ ∀ (c : A), c ∈ l2.support → (fun a c => c • _root_.id a * _root_.id z) c (↑l2 c) ∈ span R (p * q)\n[PROOFSTEP]\nintro t ht\n[GOAL]\ncase intro.intro.intro.intro.refine'_2.intro.intro.intro.intro\nR : Type u\nA : Type v\nB : Type w\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring A\ninst✝ : Algebra R A\ns t✝ : Set A\nh1 : FG (↑Subalgebra.toSubmodule (adjoin R s))\nh2 : FG (↑Subalgebra.toSubmodule (adjoin { x // x ∈ adjoin R s } t✝))\np : Set A\nhp : Set.Finite p\nhp' : span R p = ↑Subalgebra.toSubmodule (adjoin R s)\nq : Set A\nhq : Set.Finite q\nhq' : span { x // x ∈ adjoin R s } q = ↑Subalgebra.toSubmodule (adjoin { x // x ∈ adjoin R s } t✝)\nl : A →₀ { x // x ∈ adjoin R s }\nhlq : l ∈ Finsupp.supported { x // x ∈ adjoin R s } { x // x ∈ adjoin R s } q\nthis✝ :\n  ∀ [inst : Semiring { x // x ∈ adjoin R s }] [inst_1 : AddCommMonoid A] [inst_2 : Module { x // x ∈ adjoin R s } A]\n    {v : A → A} (l : A →₀ { x // x ∈ adjoin R s }),\n    ↑(Finsupp.total A A { x // x ∈ adjoin R s } v) l = Finsupp.sum l fun i a => a • v i\nz : A\nhz : z ∈ l.support\nl2 : A →₀ R\nhlp : l2 ∈ Finsupp.supported R R p\nhl : (Finsupp.sum l2 fun i a => a • _root_.id i) = ↑(↑l z)\nthis :\n  ∀ [inst : Semiring R] [inst_1 : AddCommMonoid A] [inst_2 : Module R A] {v : A → A} (l : A →₀ R),\n    ↑(Finsupp.total A A R v) l = Finsupp.sum l fun i a => a • v i\nt : A\nht : t ∈ l2.support\n⊢ (fun a c => c • _root_.id a * _root_.id z) t (↑l2 t) ∈ span R (p * q)\n[PROOFSTEP]\nchange _ * _ ∈ _\n[GOAL]\ncase intro.intro.intro.intro.refine'_2.intro.intro.intro.intro\nR : Type u\nA : Type v\nB : Type w\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring A\ninst✝ : Algebra R A\ns t✝ : Set A\nh1 : FG (↑Subalgebra.toSubmodule (adjoin R s))\nh2 : FG (↑Subalgebra.toSubmodule (adjoin { x // x ∈ adjoin R s } t✝))\np : Set A\nhp : Set.Finite p\nhp' : span R p = ↑Subalgebra.toSubmodule (adjoin R s)\nq : Set A\nhq : Set.Finite q\nhq' : span { x // x ∈ adjoin R s } q = ↑Subalgebra.toSubmodule (adjoin { x // x ∈ adjoin R s } t✝)\nl : A →₀ { x // x ∈ adjoin R s }\nhlq : l ∈ Finsupp.supported { x // x ∈ adjoin R s } { x // x ∈ adjoin R s } q\nthis✝ :\n  ∀ [inst : Semiring { x // x ∈ adjoin R s }] [inst_1 : AddCommMonoid A] [inst_2 : Module { x // x ∈ adjoin R s } A]\n    {v : A → A} (l : A →₀ { x // x ∈ adjoin R s }),\n    ↑(Finsupp.total A A { x // x ∈ adjoin R s } v) l = Finsupp.sum l fun i a => a • v i\nz : A\nhz : z ∈ l.support\nl2 : A →₀ R\nhlp : l2 ∈ Finsupp.supported R R p\nhl : (Finsupp.sum l2 fun i a => a • _root_.id i) = ↑(↑l z)\nthis :\n  ∀ [inst : Semiring R] [inst_1 : AddCommMonoid A] [inst_2 : Module R A] {v : A → A} (l : A →₀ R),\n    ↑(Finsupp.total A A R v) l = Finsupp.sum l fun i a => a • v i\nt : A\nht : t ∈ l2.support\n⊢ ↑l2 t • _root_.id t * _root_.id z ∈ span R (p * q)\n[PROOFSTEP]\nrw [smul_mul_assoc]\n[GOAL]\ncase intro.intro.intro.intro.refine'_2.intro.intro.intro.intro\nR : Type u\nA : Type v\nB : Type w\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring A\ninst✝ : Algebra R A\ns t✝ : Set A\nh1 : FG (↑Subalgebra.toSubmodule (adjoin R s))\nh2 : FG (↑Subalgebra.toSubmodule (adjoin { x // x ∈ adjoin R s } t✝))\np : Set A\nhp : Set.Finite p\nhp' : span R p = ↑Subalgebra.toSubmodule (adjoin R s)\nq : Set A\nhq : Set.Finite q\nhq' : span { x // x ∈ adjoin R s } q = ↑Subalgebra.toSubmodule (adjoin { x // x ∈ adjoin R s } t✝)\nl : A →₀ { x // x ∈ adjoin R s }\nhlq : l ∈ Finsupp.supported { x // x ∈ adjoin R s } { x // x ∈ adjoin R s } q\nthis✝ :\n  ∀ [inst : Semiring { x // x ∈ adjoin R s }] [inst_1 : AddCommMonoid A] [inst_2 : Module { x // x ∈ adjoin R s } A]\n    {v : A → A} (l : A →₀ { x // x ∈ adjoin R s }),\n    ↑(Finsupp.total A A { x // x ∈ adjoin R s } v) l = Finsupp.sum l fun i a => a • v i\nz : A\nhz : z ∈ l.support\nl2 : A →₀ R\nhlp : l2 ∈ Finsupp.supported R R p\nhl : (Finsupp.sum l2 fun i a => a • _root_.id i) = ↑(↑l z)\nthis :\n  ∀ [inst : Semiring R] [inst_1 : AddCommMonoid A] [inst_2 : Module R A] {v : A → A} (l : A →₀ R),\n    ↑(Finsupp.total A A R v) l = Finsupp.sum l fun i a => a • v i\nt : A\nht : t ∈ l2.support\n⊢ ↑l2 t • (_root_.id t * _root_.id z) ∈ span R (p * q)\n[PROOFSTEP]\nrefine' smul_mem _ _ _\n[GOAL]\ncase intro.intro.intro.intro.refine'_2.intro.intro.intro.intro\nR : Type u\nA : Type v\nB : Type w\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring A\ninst✝ : Algebra R A\ns t✝ : Set A\nh1 : FG (↑Subalgebra.toSubmodule (adjoin R s))\nh2 : FG (↑Subalgebra.toSubmodule (adjoin { x // x ∈ adjoin R s } t✝))\np : Set A\nhp : Set.Finite p\nhp' : span R p = ↑Subalgebra.toSubmodule (adjoin R s)\nq : Set A\nhq : Set.Finite q\nhq' : span { x // x ∈ adjoin R s } q = ↑Subalgebra.toSubmodule (adjoin { x // x ∈ adjoin R s } t✝)\nl : A →₀ { x // x ∈ adjoin R s }\nhlq : l ∈ Finsupp.supported { x // x ∈ adjoin R s } { x // x ∈ adjoin R s } q\nthis✝ :\n  ∀ [inst : Semiring { x // x ∈ adjoin R s }] [inst_1 : AddCommMonoid A] [inst_2 : Module { x // x ∈ adjoin R s } A]\n    {v : A → A} (l : A →₀ { x // x ∈ adjoin R s }),\n    ↑(Finsupp.total A A { x // x ∈ adjoin R s } v) l = Finsupp.sum l fun i a => a • v i\nz : A\nhz : z ∈ l.support\nl2 : A →₀ R\nhlp : l2 ∈ Finsupp.supported R R p\nhl : (Finsupp.sum l2 fun i a => a • _root_.id i) = ↑(↑l z)\nthis :\n  ∀ [inst : Semiring R] [inst_1 : AddCommMonoid A] [inst_2 : Module R A] {v : A → A} (l : A →₀ R),\n    ↑(Finsupp.total A A R v) l = Finsupp.sum l fun i a => a • v i\nt : A\nht : t ∈ l2.support\n⊢ _root_.id t * _root_.id z ∈ span R (p * q)\n[PROOFSTEP]\nexact subset_span ⟨t, z, hlp ht, hlq hz, rfl⟩\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁴ : CommSemiring R\ninst✝³ : Semiring A\ninst✝² : Algebra R A\ninst✝¹ : Semiring B\ninst✝ : Algebra R B\nS : Subalgebra R A\nx✝ : Submodule.FG (↑toSubmodule S)\nt : Finset A\nht : span R ↑t = ↑toSubmodule S\nx : A\nhx : x ∈ ↑toSubmodule S\n⊢ x ∈ span R ↑t\n[PROOFSTEP]\nrw [ht]\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁴ : CommSemiring R\ninst✝³ : Semiring A\ninst✝² : Algebra R A\ninst✝¹ : Semiring B\ninst✝ : Algebra R B\nS : Subalgebra R A\nx✝ : Submodule.FG (↑toSubmodule S)\nt : Finset A\nht : span R ↑t = ↑toSubmodule S\nx : A\nhx : x ∈ ↑toSubmodule S\n⊢ x ∈ ↑toSubmodule S\n[PROOFSTEP]\nexact hx\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁴ : CommSemiring R\ninst✝³ : Semiring A\ninst✝² : Algebra R A\ninst✝¹ : Semiring B\ninst✝ : Algebra R B\nh : Submodule.FG ⊤\ns : Finset A\nhs : span R ↑s = ⊤\n⊢ ↑toSubmodule (Algebra.adjoin R ↑s) = ↑toSubmodule ⊤\n[PROOFSTEP]\nrw [Algebra.top_toSubmodule, eq_top_iff, ← hs, span_le]\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁴ : CommSemiring R\ninst✝³ : Semiring A\ninst✝² : Algebra R A\ninst✝¹ : Semiring B\ninst✝ : Algebra R B\nh : Submodule.FG ⊤\ns : Finset A\nhs : span R ↑s = ⊤\n⊢ ↑s ⊆ ↑(↑toSubmodule (Algebra.adjoin R ↑s))\n[PROOFSTEP]\nexact Algebra.subset_adjoin\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁴ : CommSemiring R\ninst✝³ : Semiring A\ninst✝² : Algebra R A\ninst✝¹ : Semiring B\ninst✝ : Algebra R B\nS : Subalgebra R A\nT : Subalgebra R B\nhS : FG S\nhT : FG T\n⊢ FG (Subalgebra.prod S T)\n[PROOFSTEP]\nobtain ⟨s, hs⟩ := fg_def.1 hS\n[GOAL]\ncase intro\nR : Type u\nA : Type v\nB : Type w\ninst✝⁴ : CommSemiring R\ninst✝³ : Semiring A\ninst✝² : Algebra R A\ninst✝¹ : Semiring B\ninst✝ : Algebra R B\nS : Subalgebra R A\nT : Subalgebra R B\nhS : FG S\nhT : FG T\ns : Set A\nhs : Set.Finite s ∧ Algebra.adjoin R s = S\n⊢ FG (Subalgebra.prod S T)\n[PROOFSTEP]\nobtain ⟨t, ht⟩ := fg_def.1 hT\n[GOAL]\ncase intro.intro\nR : Type u\nA : Type v\nB : Type w\ninst✝⁴ : CommSemiring R\ninst✝³ : Semiring A\ninst✝² : Algebra R A\ninst✝¹ : Semiring B\ninst✝ : Algebra R B\nS : Subalgebra R A\nT : Subalgebra R B\nhS : FG S\nhT : FG T\ns : Set A\nhs : Set.Finite s ∧ Algebra.adjoin R s = S\nt : Set B\nht : Set.Finite t ∧ Algebra.adjoin R t = T\n⊢ FG (Subalgebra.prod S T)\n[PROOFSTEP]\nrw [← hs.2, ← ht.2]\n[GOAL]\ncase intro.intro\nR : Type u\nA : Type v\nB : Type w\ninst✝⁴ : CommSemiring R\ninst✝³ : Semiring A\ninst✝² : Algebra R A\ninst✝¹ : Semiring B\ninst✝ : Algebra R B\nS : Subalgebra R A\nT : Subalgebra R B\nhS : FG S\nhT : FG T\ns : Set A\nhs : Set.Finite s ∧ Algebra.adjoin R s = S\nt : Set B\nht : Set.Finite t ∧ Algebra.adjoin R t = T\n⊢ FG (Subalgebra.prod (Algebra.adjoin R s) (Algebra.adjoin R t))\n[PROOFSTEP]\nexact\n  fg_def.2\n    ⟨LinearMap.inl R A B '' (s ∪ {1}) ∪ LinearMap.inr R A B '' (t ∪ {1}),\n      Set.Finite.union (Set.Finite.image _ (Set.Finite.union hs.1 (Set.finite_singleton _)))\n        (Set.Finite.image _ (Set.Finite.union ht.1 (Set.finite_singleton _))),\n      Algebra.adjoin_inl_union_inr_eq_prod R s t⟩\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁴ : CommSemiring R\ninst✝³ : Semiring A\ninst✝² : Algebra R A\ninst✝¹ : Semiring B\ninst✝ : Algebra R B\nS : Subalgebra R A\nf : A →ₐ[R] B\nhs✝ : FG S\ns : Finset A\nhs : Algebra.adjoin R ↑s = S\n⊢ Algebra.adjoin R ↑(Finset.image (↑f) s) = Subalgebra.map f S\n[PROOFSTEP]\nrw [Finset.coe_image, Algebra.adjoin_image, hs]\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁴ : CommSemiring R\ninst✝³ : Semiring A\ninst✝² : Algebra R A\ninst✝¹ : Semiring B\ninst✝ : Algebra R B\nS : Subalgebra R A\nf : A →ₐ[R] B\nhf : Function.Injective ↑f\nhs✝ : FG (map f S)\ns : Finset B\nhs : Algebra.adjoin R ↑s = map f S\n⊢ map f\n      (Algebra.adjoin R\n        ↑(Finset.preimage s ↑f\n            (_ : ∀ (x : A), x ∈ ↑f ⁻¹' ↑s → ∀ (x_2 : A), x_2 ∈ ↑f ⁻¹' ↑s → ↑f x = ↑f x_2 → x = x_2))) =\n    map f S\n[PROOFSTEP]\nrw [← Algebra.adjoin_image, Finset.coe_preimage, Set.image_preimage_eq_of_subset, hs]\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁴ : CommSemiring R\ninst✝³ : Semiring A\ninst✝² : Algebra R A\ninst✝¹ : Semiring B\ninst✝ : Algebra R B\nS : Subalgebra R A\nf : A →ₐ[R] B\nhf : Function.Injective ↑f\nhs✝ : FG (map f S)\ns : Finset B\nhs : Algebra.adjoin R ↑s = map f S\n⊢ ↑s ⊆ Set.range ↑f\n[PROOFSTEP]\nrw [← AlgHom.coe_range, ← Algebra.adjoin_le_iff, hs, ← Algebra.map_top]\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁴ : CommSemiring R\ninst✝³ : Semiring A\ninst✝² : Algebra R A\ninst✝¹ : Semiring B\ninst✝ : Algebra R B\nS : Subalgebra R A\nf : A →ₐ[R] B\nhf : Function.Injective ↑f\nhs✝ : FG (map f S)\ns : Finset B\nhs : Algebra.adjoin R ↑s = map f S\n⊢ map f S ≤ map f ⊤\n[PROOFSTEP]\nexact map_mono le_top\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁴ : CommSemiring R\ninst✝³ : Semiring A\ninst✝² : Algebra R A\ninst✝¹ : Semiring B\ninst✝ : Algebra R B\nS : Subalgebra R A\nh : FG ⊤\n⊢ FG S\n[PROOFSTEP]\nrw [← S.range_val, ← Algebra.map_top]\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁴ : CommSemiring R\ninst✝³ : Semiring A\ninst✝² : Algebra R A\ninst✝¹ : Semiring B\ninst✝ : Algebra R B\nS : Subalgebra R A\nh : FG ⊤\n⊢ FG (map (val S) ⊤)\n[PROOFSTEP]\nexact FG.map _ h\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁴ : CommSemiring R\ninst✝³ : Semiring A\ninst✝² : Algebra R A\ninst✝¹ : Semiring B\ninst✝ : Algebra R B\nS : Subalgebra R A\nh : FG S\n⊢ FG (map (val S) ⊤)\n[PROOFSTEP]\nrw [Algebra.map_top, range_val]\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁴ : CommSemiring R\ninst✝³ : Semiring A\ninst✝² : Algebra R A\ninst✝¹ : Semiring B\ninst✝ : Algebra R B\nS : Subalgebra R A\nh : FG S\n⊢ FG S\n[PROOFSTEP]\nexact h\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁵ : CommSemiring R\ninst✝⁴ : Semiring A\ninst✝³ : Algebra R A\ninst✝² : Semiring B\ninst✝¹ : Algebra R B\ninst✝ : IsNoetherian R A\nP : Subalgebra R A → Prop\nbase : P ⊥\nih : ∀ (S : Subalgebra R A) (x : A), P S → P (Algebra.adjoin R (insert x ↑S))\nS : Subalgebra R A\n⊢ P S\n[PROOFSTEP]\nclassical\nobtain ⟨t, rfl⟩ := S.fg_of_noetherian\nrefine' Finset.induction_on t _ _\n· simpa using base\nintro x t _ h\nrw [Finset.coe_insert]\nsimpa only [Algebra.adjoin_insert_adjoin] using ih _ x h\n[GOAL]\nR : Type u\nA : Type v\nB : Type w\ninst✝⁵ : CommSemiring R\ninst✝⁴ : Semiring A\ninst✝³ : Algebra R A\ninst✝² : Semiring B\ninst✝¹ : Algebra R B\ninst✝ : IsNoetherian R A\nP : Subalgebra R A → Prop\nbase : P ⊥\nih : ∀ (S : Subalgebra R A) (x : A), P S → P (Algebra.adjoin R (insert x ↑S))\nS : Subalgebra R A\n⊢ P S\n[PROOFSTEP]\nobtain ⟨t, rfl⟩ := S.fg_of_noetherian\n[GOAL]\ncase intro\nR : Type u\nA : Type v\nB : Type w\ninst✝⁵ : CommSemiring R\ninst✝⁴ : Semiring A\ninst✝³ : Algebra R A\ninst✝² : Semiring B\ninst✝¹ : Algebra R B\ninst✝ : IsNoetherian R A\nP : Subalgebra R A → Prop\nbase : P ⊥\nih : ∀ (S : Subalgebra R A) (x : A), P S → P (Algebra.adjoin R (insert x ↑S))\nt : Finset A\n⊢ P (Algebra.adjoin R ↑t)\n[PROOFSTEP]\nrefine' Finset.induction_on t _ _\n[GOAL]\ncase intro.refine'_1\nR : Type u\nA : Type v\nB : Type w\ninst✝⁵ : CommSemiring R\ninst✝⁴ : Semiring A\ninst✝³ : Algebra R A\ninst✝² : Semiring B\ninst✝¹ : Algebra R B\ninst✝ : IsNoetherian R A\nP : Subalgebra R A → Prop\nbase : P ⊥\nih : ∀ (S : Subalgebra R A) (x : A), P S → P (Algebra.adjoin R (insert x ↑S))\nt : Finset A\n⊢ P (Algebra.adjoin R ↑∅)\n[PROOFSTEP]\nsimpa using base\n[GOAL]\ncase intro.refine'_2\nR : Type u\nA : Type v\nB : Type w\ninst✝⁵ : CommSemiring R\ninst✝⁴ : Semiring A\ninst✝³ : Algebra R A\ninst✝² : Semiring B\ninst✝¹ : Algebra R B\ninst✝ : IsNoetherian R A\nP : Subalgebra R A → Prop\nbase : P ⊥\nih : ∀ (S : Subalgebra R A) (x : A), P S → P (Algebra.adjoin R (insert x ↑S))\nt : Finset A\n⊢ ∀ ⦃a : A⦄ {s : Finset A}, ¬a ∈ s → P (Algebra.adjoin R ↑s) → P (Algebra.adjoin R ↑(insert a s))\n[PROOFSTEP]\nintro x t _ h\n[GOAL]\ncase intro.refine'_2\nR : Type u\nA : Type v\nB : Type w\ninst✝⁵ : CommSemiring R\ninst✝⁴ : Semiring A\ninst✝³ : Algebra R A\ninst✝² : Semiring B\ninst✝¹ : Algebra R B\ninst✝ : IsNoetherian R A\nP : Subalgebra R A → Prop\nbase : P ⊥\nih : ∀ (S : Subalgebra R A) (x : A), P S → P (Algebra.adjoin R (insert x ↑S))\nt✝ : Finset A\nx : A\nt : Finset A\na✝ : ¬x ∈ t\nh : P (Algebra.adjoin R ↑t)\n⊢ P (Algebra.adjoin R ↑(insert x t))\n[PROOFSTEP]\nrw [Finset.coe_insert]\n[GOAL]\ncase intro.refine'_2\nR : Type u\nA : Type v\nB : Type w\ninst✝⁵ : CommSemiring R\ninst✝⁴ : Semiring A\ninst✝³ : Algebra R A\ninst✝² : Semiring B\ninst✝¹ : Algebra R B\ninst✝ : IsNoetherian R A\nP : Subalgebra R A → Prop\nbase : P ⊥\nih : ∀ (S : Subalgebra R A) (x : A), P S → P (Algebra.adjoin R (insert x ↑S))\nt✝ : Finset A\nx : A\nt : Finset A\na✝ : ¬x ∈ t\nh : P (Algebra.adjoin R ↑t)\n⊢ P (Algebra.adjoin R (insert x ↑t))\n[PROOFSTEP]\nsimpa only [Algebra.adjoin_insert_adjoin] using ih _ x h\n", "meta": {"mathlib_filename": "Mathlib.RingTheory.Adjoin.FG", "llama_tokens": 19103, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES\n\n", "lm_q1_score": 0.8128673178375734, "lm_q2_score": 0.6334102705979902, "lm_q1q2_score": 0.5148785077517598}}
{"text": "[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : LinearOrderedAddCommGroup β\ninst✝¹ : Module α β\ninst✝ : OrderedSMul α β\ns : Finset ι\nσ : Perm ι\nf : ι → α\ng : ι → β\nhfg : MonovaryOn f g ↑s\n⊢ (∑ i in s, f i) • ∑ i in s, g i ≤ card s • ∑ i in s, f i • g i\n[PROOFSTEP]\nclassical\nobtain ⟨σ, hσ, hs⟩ := s.countable_toSet.exists_cycleOn\nrw [← card_range s.card, sum_smul_sum_eq_sum_perm hσ]\nexact\n  sum_le_card_nsmul _ _ _ fun n _ =>\n    hfg.sum_smul_comp_perm_le_sum_smul fun x hx => hs fun h => hx <| IsFixedPt.perm_pow h _\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : LinearOrderedAddCommGroup β\ninst✝¹ : Module α β\ninst✝ : OrderedSMul α β\ns : Finset ι\nσ : Perm ι\nf : ι → α\ng : ι → β\nhfg : MonovaryOn f g ↑s\n⊢ (∑ i in s, f i) • ∑ i in s, g i ≤ card s • ∑ i in s, f i • g i\n[PROOFSTEP]\nobtain ⟨σ, hσ, hs⟩ := s.countable_toSet.exists_cycleOn\n[GOAL]\ncase intro.intro\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : LinearOrderedAddCommGroup β\ninst✝¹ : Module α β\ninst✝ : OrderedSMul α β\ns : Finset ι\nσ✝ : Perm ι\nf : ι → α\ng : ι → β\nhfg : MonovaryOn f g ↑s\nσ : Perm ι\nhσ : IsCycleOn σ ↑s\nhs : {x | ↑σ x ≠ x} ⊆ ↑s\n⊢ (∑ i in s, f i) • ∑ i in s, g i ≤ card s • ∑ i in s, f i • g i\n[PROOFSTEP]\nrw [← card_range s.card, sum_smul_sum_eq_sum_perm hσ]\n[GOAL]\ncase intro.intro\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : LinearOrderedAddCommGroup β\ninst✝¹ : Module α β\ninst✝ : OrderedSMul α β\ns : Finset ι\nσ✝ : Perm ι\nf : ι → α\ng : ι → β\nhfg : MonovaryOn f g ↑s\nσ : Perm ι\nhσ : IsCycleOn σ ↑s\nhs : {x | ↑σ x ≠ x} ⊆ ↑s\n⊢ ∑ k in range (card s), ∑ i in s, f i • g (↑(σ ^ k) i) ≤ card (range (card s)) • ∑ i in s, f i • g i\n[PROOFSTEP]\nexact\n  sum_le_card_nsmul _ _ _ fun n _ =>\n    hfg.sum_smul_comp_perm_le_sum_smul fun x hx => hs fun h => hx <| IsFixedPt.perm_pow h _\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝³ : LinearOrderedRing α\ninst✝² : LinearOrderedAddCommGroup β\ninst✝¹ : Module α β\ninst✝ : OrderedSMul α β\ns : Finset ι\nσ : Perm ι\nf : ι → α\ng : ι → β\nhfg : AntivaryOn f g ↑s\n⊢ card s • ∑ i in s, f i • g i ≤ (∑ i in s, f i) • ∑ i in s, g i\n[PROOFSTEP]\nrefine hfg.dual_right.sum_smul_sum_le_card_smul_sum\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝⁴ : LinearOrderedRing α\ninst✝³ : LinearOrderedAddCommGroup β\ninst✝² : Module α β\ninst✝¹ : OrderedSMul α β\ns : Finset ι\nσ : Perm ι\nf : ι → α\ng : ι → β\ninst✝ : Fintype ι\nhfg : Antivary f g\n⊢ Fintype.card ι • ∑ i : ι, f i • g i ≤ (∑ i : ι, f i) • ∑ i : ι, g i\n[PROOFSTEP]\nrefine (hfg.dual_right.monovaryOn _).sum_smul_sum_le_card_smul_sum\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedRing α\ns : Finset ι\nσ : Perm ι\nf g : ι → α\nhfg : MonovaryOn f g ↑s\n⊢ (∑ i in s, f i) * ∑ i in s, g i ≤ ↑(card s) * ∑ i in s, f i * g i\n[PROOFSTEP]\nrw [← nsmul_eq_mul]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedRing α\ns : Finset ι\nσ : Perm ι\nf g : ι → α\nhfg : MonovaryOn f g ↑s\n⊢ (∑ i in s, f i) * ∑ i in s, g i ≤ card s • ∑ i in s, f i * g i\n[PROOFSTEP]\nexact hfg.sum_smul_sum_le_card_smul_sum\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedRing α\ns : Finset ι\nσ : Perm ι\nf g : ι → α\nhfg : AntivaryOn f g ↑s\n⊢ ↑(card s) * ∑ i in s, f i * g i ≤ (∑ i in s, f i) * ∑ i in s, g i\n[PROOFSTEP]\nrw [← nsmul_eq_mul]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedRing α\ns : Finset ι\nσ : Perm ι\nf g : ι → α\nhfg : AntivaryOn f g ↑s\n⊢ card s • ∑ i in s, f i * g i ≤ (∑ i in s, f i) * ∑ i in s, g i\n[PROOFSTEP]\nexact hfg.card_smul_sum_le_sum_smul_sum\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedRing α\ns : Finset ι\nσ : Perm ι\nf g : ι → α\n⊢ (∑ i in s, f i) ^ 2 ≤ ↑(card s) * ∑ i in s, f i ^ 2\n[PROOFSTEP]\nsimp_rw [sq]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedRing α\ns : Finset ι\nσ : Perm ι\nf g : ι → α\n⊢ (∑ i in s, f i) * ∑ i in s, f i ≤ ↑(card s) * ∑ x in s, f x * f x\n[PROOFSTEP]\nexact (monovaryOn_self _ _).sum_mul_sum_le_card_mul_sum\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedField α\ns : Finset ι\nf : ι → α\n⊢ ((∑ i in s, f i) / ↑(card s)) ^ 2 ≤ (∑ i in s, f i ^ 2) / ↑(card s)\n[PROOFSTEP]\nobtain rfl | hs := s.eq_empty_or_nonempty\n[GOAL]\ncase inl\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedField α\nf : ι → α\n⊢ ((∑ i in ∅, f i) / ↑(card ∅)) ^ 2 ≤ (∑ i in ∅, f i ^ 2) / ↑(card ∅)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedField α\ns : Finset ι\nf : ι → α\nhs : Finset.Nonempty s\n⊢ ((∑ i in s, f i) / ↑(card s)) ^ 2 ≤ (∑ i in s, f i ^ 2) / ↑(card s)\n[PROOFSTEP]\nrw [← card_pos, ← @Nat.cast_pos α] at hs \n[GOAL]\ncase inr\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedField α\ns : Finset ι\nf : ι → α\nhs : 0 < ↑(card s)\n⊢ ((∑ i in s, f i) / ↑(card s)) ^ 2 ≤ (∑ i in s, f i ^ 2) / ↑(card s)\n[PROOFSTEP]\nrw [div_pow, div_le_div_iff (sq_pos_of_ne_zero _ hs.ne') hs, sq (s.card : α), mul_left_comm, ← mul_assoc]\n[GOAL]\ncase inr\nι : Type u_1\nα : Type u_2\nβ : Type u_3\ninst✝ : LinearOrderedField α\ns : Finset ι\nf : ι → α\nhs : 0 < ↑(card s)\n⊢ (∑ i in s, f i) ^ 2 * ↑(card s) ≤ (↑(card s) * ∑ i in s, f i ^ 2) * ↑(card s)\n[PROOFSTEP]\nexact mul_le_mul_of_nonneg_right sq_sum_le_card_mul_sum_sq hs.le\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Order.Chebyshev", "llama_tokens": 2845, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8221891305219504, "lm_q2_score": 0.6261241772283034, "lm_q1q2_score": 0.5147924928741103}}
{"text": "[GOAL]\nC : Type u₁\nD : Type u₂\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : Category.{v₂, u₂} D\ninst✝³ : Preadditive C\ninst✝² : Preadditive D\nF : C ⥤ D\ninst✝¹ : Additive F\nJ✝ : Type\ninst✝ : Fintype J✝\nf✝ : J✝ → C\nb✝ : Bicone f✝\nhb : Bicone.IsBilimit b✝\n⊢ (Finset.sum Finset.univ fun j => Bicone.π (mapBicone F b✝) j ≫ Bicone.ι (mapBicone F b✝) j) = 𝟙 (mapBicone F b✝).pt\n[PROOFSTEP]\nsimp_rw [F.mapBicone_π, F.mapBicone_ι, ← F.map_comp]\n[GOAL]\nC : Type u₁\nD : Type u₂\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : Category.{v₂, u₂} D\ninst✝³ : Preadditive C\ninst✝² : Preadditive D\nF : C ⥤ D\ninst✝¹ : Additive F\nJ✝ : Type\ninst✝ : Fintype J✝\nf✝ : J✝ → C\nb✝ : Bicone f✝\nhb : Bicone.IsBilimit b✝\n⊢ (Finset.sum Finset.univ fun x => F.map (Bicone.π b✝ x ≫ Bicone.ι b✝ x)) = 𝟙 (mapBicone F b✝).pt\n[PROOFSTEP]\nerw [← F.map_sum, ← F.map_id, IsBilimit.total hb]\n[GOAL]\nC : Type u₁\nD : Type u₂\ninst✝⁶ : Category.{v₁, u₁} C\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : Preadditive C\ninst✝³ : Preadditive D\nF : C ⥤ D\ninst✝² : HasBinaryBiproducts C\ninst✝¹ : PreservesZeroMorphisms F\ninst✝ : PreservesBinaryBiproducts F\nX Y : C\nf g : X ⟶ Y\n⊢ F.map (f + g) = F.map f + F.map g\n[PROOFSTEP]\nrw [biprod.add_eq_lift_id_desc, F.map_comp, ← biprod.lift_mapBiprod, ← biprod.mapBiprod_hom_desc, Category.assoc,\n  Iso.inv_hom_id_assoc, F.map_id, biprod.add_eq_lift_id_desc]\n[GOAL]\nC : Type u_1\nD : Type u_2\ninst✝⁴ : Category.{?u.46335, u_1} C\ninst✝³ : Category.{?u.46339, u_2} D\ninst✝² : Preadditive C\ninst✝¹ : Preadditive D\ne : C ≌ D\ninst✝ : Functor.Additive e.functor\nf g : D\nf✝ g✝ : f ⟶ g\n⊢ e.functor.map (e.inverse.map (f✝ + g✝)) = e.functor.map (e.inverse.map f✝ + e.inverse.map g✝)\n[PROOFSTEP]\nsimp\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Preadditive.AdditiveFunctor", "llama_tokens": 965, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES\n\n", "lm_q1_score": 0.8221891261650247, "lm_q2_score": 0.6261241702517975, "lm_q1q2_score": 0.5147924844101265}}
{"text": "[GOAL]\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : IsCofiltered J\nF : J ⥤ TopCatMax\nC : Cone F\nhC : IsLimit C\nT : (j : J) → Set (Set ↑(F.obj j))\nhT : ∀ (j : J), IsTopologicalBasis (T j)\nuniv : ∀ (i : J), Set.univ ∈ T i\ninter : ∀ (i : J) (U1 U2 : Set ↑(F.obj i)), U1 ∈ T i → U2 ∈ T i → U1 ∩ U2 ∈ T i\ncompat : ∀ (i j : J) (f : i ⟶ j) (V : Set ↑(F.obj j)), V ∈ T j → ↑(F.map f) ⁻¹' V ∈ T i\n⊢ IsTopologicalBasis {U | ∃ j V, V ∈ T j ∧ U = ↑(NatTrans.app C.π j) ⁻¹' V}\n[PROOFSTEP]\nclassical\n  -- The limit cone for `F` whose topology is defined as an infimum.\nlet D := limitConeInfi F\nlet E : C.pt ≅ D.pt := hC.conePointUniqueUpToIso (limitConeInfiIsLimit _)\nhave hE : Inducing E.hom := (TopCat.homeoOfIso E).inducing\nsuffices IsTopologicalBasis {U : Set D.pt | ∃ (j : _) (V : Set (F.obj j)), V ∈ T j ∧ U = D.π.app j ⁻¹' V}\n  by\n  convert this.inducing hE\n  ext U0\n  constructor\n  · rintro ⟨j, V, hV, rfl⟩\n    refine' ⟨D.π.app j ⁻¹' V, ⟨j, V, hV, rfl⟩, rfl⟩\n  · rintro ⟨W, ⟨j, V, hV, rfl⟩, rfl⟩\n    refine'\n      ⟨j, V, hV, rfl⟩\n        -- Using `D`, we can apply the characterization of the topological basis of a\n          -- topology defined as an infimum...\nconvert isTopologicalBasis_iInf hT fun j (x : D.pt) => D.π.app j x using 1\next U0\nconstructor\n· rintro ⟨j, V, hV, rfl⟩\n  let U : ∀ i, Set (F.obj i) := fun i => if h : i = j then by rw [h]; exact V else Set.univ\n  refine' ⟨U, { j }, _, _⟩\n  · rintro i h\n    rw [Finset.mem_singleton] at h \n    dsimp\n    rw [dif_pos h]\n    subst h\n    exact hV\n  · dsimp\n    simp\n· rintro ⟨U, G, h1, h2⟩\n  obtain ⟨j, hj⟩ := IsCofiltered.inf_objs_exists G\n  let g : ∀ (e) (_he : e ∈ G), j ⟶ e := fun _ he => (hj he).some\n  let Vs : J → Set (F.obj j) := fun e => if h : e ∈ G then F.map (g e h) ⁻¹' U e else Set.univ\n  let V : Set (F.obj j) := ⋂ (e : J) (_he : e ∈ G), Vs e\n  refine' ⟨j, V, _, _⟩\n  ·\n    -- An intermediate claim used to apply induction along `G : Finset J` later on.\n    have :\n      ∀ (S : Set (Set (F.obj j))) (E : Finset J) (P : J → Set (F.obj j)) (_univ : Set.univ ∈ S)\n        (_inter : ∀ A B : Set (F.obj j), A ∈ S → B ∈ S → A ∩ B ∈ S) (_cond : ∀ (e : J) (_he : e ∈ E), P e ∈ S),\n        (⋂ (e) (_he : e ∈ E), P e) ∈ S :=\n      by\n      intro S E\n      induction E using Finset.induction_on with\n      | empty =>\n        intro P he _hh\n        simpa\n      | @insert a E _ha hh1 =>\n        intro hh2 hh3 hh4 hh5\n        rw [Finset.set_biInter_insert]\n        refine' hh4 _ _ (hh5 _ (Finset.mem_insert_self _ _)) (hh1 _ hh3 hh4 _)\n        intro e he\n        exact\n          hh5 e\n            (Finset.mem_insert_of_mem he)\n              -- use the intermediate claim to finish off the goal using `univ` and `inter`.\n    refine' this _ _ _ (univ _) (inter _) _\n    intro e he\n    dsimp\n    rw [dif_pos he]\n    exact compat j e (g e he) (U e) (h1 e he)\n  ·\n    -- conclude...\n    rw [h2]\n    change _ = (D.π.app j) ⁻¹' ⋂ (e : J) (_ : e ∈ G), Vs e\n    rw [Set.preimage_iInter]\n    apply congrArg\n    ext1 e\n    erw [Set.preimage_iInter]\n    apply congrArg\n    ext1 he\n    change (D.π.app e) ⁻¹' U e = (D.π.app j) ⁻¹' if h : e ∈ G then F.map (g e h) ⁻¹' U e else Set.univ\n    rw [dif_pos he, ← Set.preimage_comp]\n    apply congrFun\n    apply congrArg\n    rw [← coe_comp, D.w]\n    rfl\n[GOAL]\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : IsCofiltered J\nF : J ⥤ TopCatMax\nC : Cone F\nhC : IsLimit C\nT : (j : J) → Set (Set ↑(F.obj j))\nhT : ∀ (j : J), IsTopologicalBasis (T j)\nuniv : ∀ (i : J), Set.univ ∈ T i\ninter : ∀ (i : J) (U1 U2 : Set ↑(F.obj i)), U1 ∈ T i → U2 ∈ T i → U1 ∩ U2 ∈ T i\ncompat : ∀ (i j : J) (f : i ⟶ j) (V : Set ↑(F.obj j)), V ∈ T j → ↑(F.map f) ⁻¹' V ∈ T i\n⊢ IsTopologicalBasis {U | ∃ j V, V ∈ T j ∧ U = ↑(NatTrans.app C.π j) ⁻¹' V}\n[PROOFSTEP]\nlet D := limitConeInfi F\n[GOAL]\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : IsCofiltered J\nF : J ⥤ TopCatMax\nC : Cone F\nhC : IsLimit C\nT : (j : J) → Set (Set ↑(F.obj j))\nhT : ∀ (j : J), IsTopologicalBasis (T j)\nuniv : ∀ (i : J), Set.univ ∈ T i\ninter : ∀ (i : J) (U1 U2 : Set ↑(F.obj i)), U1 ∈ T i → U2 ∈ T i → U1 ∩ U2 ∈ T i\ncompat : ∀ (i j : J) (f : i ⟶ j) (V : Set ↑(F.obj j)), V ∈ T j → ↑(F.map f) ⁻¹' V ∈ T i\nD : Cone F := limitConeInfi F\n⊢ IsTopologicalBasis {U | ∃ j V, V ∈ T j ∧ U = ↑(NatTrans.app C.π j) ⁻¹' V}\n[PROOFSTEP]\nlet E : C.pt ≅ D.pt := hC.conePointUniqueUpToIso (limitConeInfiIsLimit _)\n[GOAL]\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : IsCofiltered J\nF : J ⥤ TopCatMax\nC : Cone F\nhC : IsLimit C\nT : (j : J) → Set (Set ↑(F.obj j))\nhT : ∀ (j : J), IsTopologicalBasis (T j)\nuniv : ∀ (i : J), Set.univ ∈ T i\ninter : ∀ (i : J) (U1 U2 : Set ↑(F.obj i)), U1 ∈ T i → U2 ∈ T i → U1 ∩ U2 ∈ T i\ncompat : ∀ (i j : J) (f : i ⟶ j) (V : Set ↑(F.obj j)), V ∈ T j → ↑(F.map f) ⁻¹' V ∈ T i\nD : Cone F := limitConeInfi F\nE : C.pt ≅ D.pt := IsLimit.conePointUniqueUpToIso hC (limitConeInfiIsLimit F)\n⊢ IsTopologicalBasis {U | ∃ j V, V ∈ T j ∧ U = ↑(NatTrans.app C.π j) ⁻¹' V}\n[PROOFSTEP]\nhave hE : Inducing E.hom := (TopCat.homeoOfIso E).inducing\n[GOAL]\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : IsCofiltered J\nF : J ⥤ TopCatMax\nC : Cone F\nhC : IsLimit C\nT : (j : J) → Set (Set ↑(F.obj j))\nhT : ∀ (j : J), IsTopologicalBasis (T j)\nuniv : ∀ (i : J), Set.univ ∈ T i\ninter : ∀ (i : J) (U1 U2 : Set ↑(F.obj i)), U1 ∈ T i → U2 ∈ T i → U1 ∩ U2 ∈ T i\ncompat : ∀ (i j : J) (f : i ⟶ j) (V : Set ↑(F.obj j)), V ∈ T j → ↑(F.map f) ⁻¹' V ∈ T i\nD : Cone F := limitConeInfi F\nE : C.pt ≅ D.pt := IsLimit.conePointUniqueUpToIso hC (limitConeInfiIsLimit F)\nhE : Inducing ↑E.hom\n⊢ IsTopologicalBasis {U | ∃ j V, V ∈ T j ∧ U = ↑(NatTrans.app C.π j) ⁻¹' V}\n[PROOFSTEP]\nsuffices IsTopologicalBasis {U : Set D.pt | ∃ (j : _) (V : Set (F.obj j)), V ∈ T j ∧ U = D.π.app j ⁻¹' V}\n  by\n  convert this.inducing hE\n  ext U0\n  constructor\n  · rintro ⟨j, V, hV, rfl⟩\n    refine' ⟨D.π.app j ⁻¹' V, ⟨j, V, hV, rfl⟩, rfl⟩\n  · rintro ⟨W, ⟨j, V, hV, rfl⟩, rfl⟩\n    refine'\n      ⟨j, V, hV, rfl⟩\n        -- Using `D`, we can apply the characterization of the topological basis of a\n          -- topology defined as an infimum...\n[GOAL]\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : IsCofiltered J\nF : J ⥤ TopCatMax\nC : Cone F\nhC : IsLimit C\nT : (j : J) → Set (Set ↑(F.obj j))\nhT : ∀ (j : J), IsTopologicalBasis (T j)\nuniv : ∀ (i : J), Set.univ ∈ T i\ninter : ∀ (i : J) (U1 U2 : Set ↑(F.obj i)), U1 ∈ T i → U2 ∈ T i → U1 ∩ U2 ∈ T i\ncompat : ∀ (i j : J) (f : i ⟶ j) (V : Set ↑(F.obj j)), V ∈ T j → ↑(F.map f) ⁻¹' V ∈ T i\nD : Cone F := limitConeInfi F\nE : C.pt ≅ D.pt := IsLimit.conePointUniqueUpToIso hC (limitConeInfiIsLimit F)\nhE : Inducing ↑E.hom\nthis : IsTopologicalBasis {U | ∃ j V, V ∈ T j ∧ U = ↑(NatTrans.app D.π j) ⁻¹' V}\n⊢ IsTopologicalBasis {U | ∃ j V, V ∈ T j ∧ U = ↑(NatTrans.app C.π j) ⁻¹' V}\n[PROOFSTEP]\nconvert this.inducing hE\n[GOAL]\ncase h.e'_3.h\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : IsCofiltered J\nF : J ⥤ TopCatMax\nC : Cone F\nhC : IsLimit C\nT : (j : J) → Set (Set ↑(F.obj j))\nhT : ∀ (j : J), IsTopologicalBasis (T j)\nuniv : ∀ (i : J), Set.univ ∈ T i\ninter : ∀ (i : J) (U1 U2 : Set ↑(F.obj i)), U1 ∈ T i → U2 ∈ T i → U1 ∩ U2 ∈ T i\ncompat : ∀ (i j : J) (f : i ⟶ j) (V : Set ↑(F.obj j)), V ∈ T j → ↑(F.map f) ⁻¹' V ∈ T i\nD : Cone F := limitConeInfi F\nE : C.pt ≅ D.pt := IsLimit.conePointUniqueUpToIso hC (limitConeInfiIsLimit F)\nhE : Inducing ↑E.hom\nthis : IsTopologicalBasis {U | ∃ j V, V ∈ T j ∧ U = ↑(NatTrans.app D.π j) ⁻¹' V}\ne_1✝ : ↑C.pt = (forget TopCat).obj C.pt\n⊢ {U | ∃ j V, V ∈ T j ∧ U = ↑(NatTrans.app C.π j) ⁻¹' V} =\n    Set.preimage ↑E.hom '' {U | ∃ j V, V ∈ T j ∧ U = ↑(NatTrans.app D.π j) ⁻¹' V}\n[PROOFSTEP]\next U0\n[GOAL]\ncase h.e'_3.h.h\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : IsCofiltered J\nF : J ⥤ TopCatMax\nC : Cone F\nhC : IsLimit C\nT : (j : J) → Set (Set ↑(F.obj j))\nhT : ∀ (j : J), IsTopologicalBasis (T j)\nuniv : ∀ (i : J), Set.univ ∈ T i\ninter : ∀ (i : J) (U1 U2 : Set ↑(F.obj i)), U1 ∈ T i → U2 ∈ T i → U1 ∩ U2 ∈ T i\ncompat : ∀ (i j : J) (f : i ⟶ j) (V : Set ↑(F.obj j)), V ∈ T j → ↑(F.map f) ⁻¹' V ∈ T i\nD : Cone F := limitConeInfi F\nE : C.pt ≅ D.pt := IsLimit.conePointUniqueUpToIso hC (limitConeInfiIsLimit F)\nhE : Inducing ↑E.hom\nthis : IsTopologicalBasis {U | ∃ j V, V ∈ T j ∧ U = ↑(NatTrans.app D.π j) ⁻¹' V}\ne_1✝ : ↑C.pt = (forget TopCat).obj C.pt\nU0 : Set ↑C.pt\n⊢ U0 ∈ {U | ∃ j V, V ∈ T j ∧ U = ↑(NatTrans.app C.π j) ⁻¹' V} ↔\n    U0 ∈ Set.preimage ↑E.hom '' {U | ∃ j V, V ∈ T j ∧ U = ↑(NatTrans.app D.π j) ⁻¹' V}\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.e'_3.h.h.mp\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : IsCofiltered J\nF : J ⥤ TopCatMax\nC : Cone F\nhC : IsLimit C\nT : (j : J) → Set (Set ↑(F.obj j))\nhT : ∀ (j : J), IsTopologicalBasis (T j)\nuniv : ∀ (i : J), Set.univ ∈ T i\ninter : ∀ (i : J) (U1 U2 : Set ↑(F.obj i)), U1 ∈ T i → U2 ∈ T i → U1 ∩ U2 ∈ T i\ncompat : ∀ (i j : J) (f : i ⟶ j) (V : Set ↑(F.obj j)), V ∈ T j → ↑(F.map f) ⁻¹' V ∈ T i\nD : Cone F := limitConeInfi F\nE : C.pt ≅ D.pt := IsLimit.conePointUniqueUpToIso hC (limitConeInfiIsLimit F)\nhE : Inducing ↑E.hom\nthis : IsTopologicalBasis {U | ∃ j V, V ∈ T j ∧ U = ↑(NatTrans.app D.π j) ⁻¹' V}\ne_1✝ : ↑C.pt = (forget TopCat).obj C.pt\nU0 : Set ↑C.pt\n⊢ U0 ∈ {U | ∃ j V, V ∈ T j ∧ U = ↑(NatTrans.app C.π j) ⁻¹' V} →\n    U0 ∈ Set.preimage ↑E.hom '' {U | ∃ j V, V ∈ T j ∧ U = ↑(NatTrans.app D.π j) ⁻¹' V}\n[PROOFSTEP]\nrintro ⟨j, V, hV, rfl⟩\n[GOAL]\ncase h.e'_3.h.h.mp.intro.intro.intro\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : IsCofiltered J\nF : J ⥤ TopCatMax\nC : Cone F\nhC : IsLimit C\nT : (j : J) → Set (Set ↑(F.obj j))\nhT : ∀ (j : J), IsTopologicalBasis (T j)\nuniv : ∀ (i : J), Set.univ ∈ T i\ninter : ∀ (i : J) (U1 U2 : Set ↑(F.obj i)), U1 ∈ T i → U2 ∈ T i → U1 ∩ U2 ∈ T i\ncompat : ∀ (i j : J) (f : i ⟶ j) (V : Set ↑(F.obj j)), V ∈ T j → ↑(F.map f) ⁻¹' V ∈ T i\nD : Cone F := limitConeInfi F\nE : C.pt ≅ D.pt := IsLimit.conePointUniqueUpToIso hC (limitConeInfiIsLimit F)\nhE : Inducing ↑E.hom\nthis : IsTopologicalBasis {U | ∃ j V, V ∈ T j ∧ U = ↑(NatTrans.app D.π j) ⁻¹' V}\ne_1✝ : ↑C.pt = (forget TopCat).obj C.pt\nj : J\nV : Set ↑(F.obj j)\nhV : V ∈ T j\n⊢ ↑(NatTrans.app C.π j) ⁻¹' V ∈ Set.preimage ↑E.hom '' {U | ∃ j V, V ∈ T j ∧ U = ↑(NatTrans.app D.π j) ⁻¹' V}\n[PROOFSTEP]\nrefine' ⟨D.π.app j ⁻¹' V, ⟨j, V, hV, rfl⟩, rfl⟩\n[GOAL]\ncase h.e'_3.h.h.mpr\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : IsCofiltered J\nF : J ⥤ TopCatMax\nC : Cone F\nhC : IsLimit C\nT : (j : J) → Set (Set ↑(F.obj j))\nhT : ∀ (j : J), IsTopologicalBasis (T j)\nuniv : ∀ (i : J), Set.univ ∈ T i\ninter : ∀ (i : J) (U1 U2 : Set ↑(F.obj i)), U1 ∈ T i → U2 ∈ T i → U1 ∩ U2 ∈ T i\ncompat : ∀ (i j : J) (f : i ⟶ j) (V : Set ↑(F.obj j)), V ∈ T j → ↑(F.map f) ⁻¹' V ∈ T i\nD : Cone F := limitConeInfi F\nE : C.pt ≅ D.pt := IsLimit.conePointUniqueUpToIso hC (limitConeInfiIsLimit F)\nhE : Inducing ↑E.hom\nthis : IsTopologicalBasis {U | ∃ j V, V ∈ T j ∧ U = ↑(NatTrans.app D.π j) ⁻¹' V}\ne_1✝ : ↑C.pt = (forget TopCat).obj C.pt\nU0 : Set ↑C.pt\n⊢ U0 ∈ Set.preimage ↑E.hom '' {U | ∃ j V, V ∈ T j ∧ U = ↑(NatTrans.app D.π j) ⁻¹' V} →\n    U0 ∈ {U | ∃ j V, V ∈ T j ∧ U = ↑(NatTrans.app C.π j) ⁻¹' V}\n[PROOFSTEP]\nrintro ⟨W, ⟨j, V, hV, rfl⟩, rfl⟩\n[GOAL]\ncase h.e'_3.h.h.mpr.intro.intro.intro.intro.intro\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : IsCofiltered J\nF : J ⥤ TopCatMax\nC : Cone F\nhC : IsLimit C\nT : (j : J) → Set (Set ↑(F.obj j))\nhT : ∀ (j : J), IsTopologicalBasis (T j)\nuniv : ∀ (i : J), Set.univ ∈ T i\ninter : ∀ (i : J) (U1 U2 : Set ↑(F.obj i)), U1 ∈ T i → U2 ∈ T i → U1 ∩ U2 ∈ T i\ncompat : ∀ (i j : J) (f : i ⟶ j) (V : Set ↑(F.obj j)), V ∈ T j → ↑(F.map f) ⁻¹' V ∈ T i\nD : Cone F := limitConeInfi F\nE : C.pt ≅ D.pt := IsLimit.conePointUniqueUpToIso hC (limitConeInfiIsLimit F)\nhE : Inducing ↑E.hom\nthis : IsTopologicalBasis {U | ∃ j V, V ∈ T j ∧ U = ↑(NatTrans.app D.π j) ⁻¹' V}\ne_1✝ : ↑C.pt = (forget TopCat).obj C.pt\nj : J\nV : Set ↑(F.obj j)\nhV : V ∈ T j\n⊢ ↑E.hom ⁻¹' (↑(NatTrans.app D.π j) ⁻¹' V) ∈ {U | ∃ j V, V ∈ T j ∧ U = ↑(NatTrans.app C.π j) ⁻¹' V}\n[PROOFSTEP]\nrefine'\n  ⟨j, V, hV, rfl⟩\n    -- Using `D`, we can apply the characterization of the topological basis of a\n      -- topology defined as an infimum...\n[GOAL]\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : IsCofiltered J\nF : J ⥤ TopCatMax\nC : Cone F\nhC : IsLimit C\nT : (j : J) → Set (Set ↑(F.obj j))\nhT : ∀ (j : J), IsTopologicalBasis (T j)\nuniv : ∀ (i : J), Set.univ ∈ T i\ninter : ∀ (i : J) (U1 U2 : Set ↑(F.obj i)), U1 ∈ T i → U2 ∈ T i → U1 ∩ U2 ∈ T i\ncompat : ∀ (i j : J) (f : i ⟶ j) (V : Set ↑(F.obj j)), V ∈ T j → ↑(F.map f) ⁻¹' V ∈ T i\nD : Cone F := limitConeInfi F\nE : C.pt ≅ D.pt := IsLimit.conePointUniqueUpToIso hC (limitConeInfiIsLimit F)\nhE : Inducing ↑E.hom\n⊢ IsTopologicalBasis {U | ∃ j V, V ∈ T j ∧ U = ↑(NatTrans.app D.π j) ⁻¹' V}\n[PROOFSTEP]\nconvert isTopologicalBasis_iInf hT fun j (x : D.pt) => D.π.app j x using 1\n[GOAL]\ncase h.e'_3\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : IsCofiltered J\nF : J ⥤ TopCatMax\nC : Cone F\nhC : IsLimit C\nT : (j : J) → Set (Set ↑(F.obj j))\nhT : ∀ (j : J), IsTopologicalBasis (T j)\nuniv : ∀ (i : J), Set.univ ∈ T i\ninter : ∀ (i : J) (U1 U2 : Set ↑(F.obj i)), U1 ∈ T i → U2 ∈ T i → U1 ∩ U2 ∈ T i\ncompat : ∀ (i j : J) (f : i ⟶ j) (V : Set ↑(F.obj j)), V ∈ T j → ↑(F.map f) ⁻¹' V ∈ T i\nD : Cone F := limitConeInfi F\nE : C.pt ≅ D.pt := IsLimit.conePointUniqueUpToIso hC (limitConeInfiIsLimit F)\nhE : Inducing ↑E.hom\n⊢ {U | ∃ j V, V ∈ T j ∧ U = ↑(NatTrans.app D.π j) ⁻¹' V} =\n    {S |\n      ∃ U F_1,\n        (∀ (i : J), i ∈ F_1 → U i ∈ T i) ∧ S = ⋂ (i : J) (_ : i ∈ F_1), (fun x => ↑(NatTrans.app D.π i) x) ⁻¹' U i}\n[PROOFSTEP]\next U0\n[GOAL]\ncase h.e'_3.h\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : IsCofiltered J\nF : J ⥤ TopCatMax\nC : Cone F\nhC : IsLimit C\nT : (j : J) → Set (Set ↑(F.obj j))\nhT : ∀ (j : J), IsTopologicalBasis (T j)\nuniv : ∀ (i : J), Set.univ ∈ T i\ninter : ∀ (i : J) (U1 U2 : Set ↑(F.obj i)), U1 ∈ T i → U2 ∈ T i → U1 ∩ U2 ∈ T i\ncompat : ∀ (i j : J) (f : i ⟶ j) (V : Set ↑(F.obj j)), V ∈ T j → ↑(F.map f) ⁻¹' V ∈ T i\nD : Cone F := limitConeInfi F\nE : C.pt ≅ D.pt := IsLimit.conePointUniqueUpToIso hC (limitConeInfiIsLimit F)\nhE : Inducing ↑E.hom\nU0 : Set ↑D.pt\n⊢ U0 ∈ {U | ∃ j V, V ∈ T j ∧ U = ↑(NatTrans.app D.π j) ⁻¹' V} ↔\n    U0 ∈\n      {S |\n        ∃ U F_1,\n          (∀ (i : J), i ∈ F_1 → U i ∈ T i) ∧ S = ⋂ (i : J) (_ : i ∈ F_1), (fun x => ↑(NatTrans.app D.π i) x) ⁻¹' U i}\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.e'_3.h.mp\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : IsCofiltered J\nF : J ⥤ TopCatMax\nC : Cone F\nhC : IsLimit C\nT : (j : J) → Set (Set ↑(F.obj j))\nhT : ∀ (j : J), IsTopologicalBasis (T j)\nuniv : ∀ (i : J), Set.univ ∈ T i\ninter : ∀ (i : J) (U1 U2 : Set ↑(F.obj i)), U1 ∈ T i → U2 ∈ T i → U1 ∩ U2 ∈ T i\ncompat : ∀ (i j : J) (f : i ⟶ j) (V : Set ↑(F.obj j)), V ∈ T j → ↑(F.map f) ⁻¹' V ∈ T i\nD : Cone F := limitConeInfi F\nE : C.pt ≅ D.pt := IsLimit.conePointUniqueUpToIso hC (limitConeInfiIsLimit F)\nhE : Inducing ↑E.hom\nU0 : Set ↑D.pt\n⊢ U0 ∈ {U | ∃ j V, V ∈ T j ∧ U = ↑(NatTrans.app D.π j) ⁻¹' V} →\n    U0 ∈\n      {S |\n        ∃ U F_1,\n          (∀ (i : J), i ∈ F_1 → U i ∈ T i) ∧ S = ⋂ (i : J) (_ : i ∈ F_1), (fun x => ↑(NatTrans.app D.π i) x) ⁻¹' U i}\n[PROOFSTEP]\nrintro ⟨j, V, hV, rfl⟩\n[GOAL]\ncase h.e'_3.h.mp.intro.intro.intro\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : IsCofiltered J\nF : J ⥤ TopCatMax\nC : Cone F\nhC : IsLimit C\nT : (j : J) → Set (Set ↑(F.obj j))\nhT : ∀ (j : J), IsTopologicalBasis (T j)\nuniv : ∀ (i : J), Set.univ ∈ T i\ninter : ∀ (i : J) (U1 U2 : Set ↑(F.obj i)), U1 ∈ T i → U2 ∈ T i → U1 ∩ U2 ∈ T i\ncompat : ∀ (i j : J) (f : i ⟶ j) (V : Set ↑(F.obj j)), V ∈ T j → ↑(F.map f) ⁻¹' V ∈ T i\nD : Cone F := limitConeInfi F\nE : C.pt ≅ D.pt := IsLimit.conePointUniqueUpToIso hC (limitConeInfiIsLimit F)\nhE : Inducing ↑E.hom\nj : J\nV : Set ↑(F.obj j)\nhV : V ∈ T j\n⊢ ↑(NatTrans.app D.π j) ⁻¹' V ∈\n    {S |\n      ∃ U F_1,\n        (∀ (i : J), i ∈ F_1 → U i ∈ T i) ∧ S = ⋂ (i : J) (_ : i ∈ F_1), (fun x => ↑(NatTrans.app D.π i) x) ⁻¹' U i}\n[PROOFSTEP]\nlet U : ∀ i, Set (F.obj i) := fun i => if h : i = j then by rw [h]; exact V else Set.univ\n[GOAL]\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : IsCofiltered J\nF : J ⥤ TopCatMax\nC : Cone F\nhC : IsLimit C\nT : (j : J) → Set (Set ↑(F.obj j))\nhT : ∀ (j : J), IsTopologicalBasis (T j)\nuniv : ∀ (i : J), Set.univ ∈ T i\ninter : ∀ (i : J) (U1 U2 : Set ↑(F.obj i)), U1 ∈ T i → U2 ∈ T i → U1 ∩ U2 ∈ T i\ncompat : ∀ (i j : J) (f : i ⟶ j) (V : Set ↑(F.obj j)), V ∈ T j → ↑(F.map f) ⁻¹' V ∈ T i\nD : Cone F := limitConeInfi F\nE : C.pt ≅ D.pt := IsLimit.conePointUniqueUpToIso hC (limitConeInfiIsLimit F)\nhE : Inducing ↑E.hom\nj : J\nV : Set ↑(F.obj j)\nhV : V ∈ T j\ni : J\nh : i = j\n⊢ Set ↑(F.obj i)\n[PROOFSTEP]\nrw [h]\n[GOAL]\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : IsCofiltered J\nF : J ⥤ TopCatMax\nC : Cone F\nhC : IsLimit C\nT : (j : J) → Set (Set ↑(F.obj j))\nhT : ∀ (j : J), IsTopologicalBasis (T j)\nuniv : ∀ (i : J), Set.univ ∈ T i\ninter : ∀ (i : J) (U1 U2 : Set ↑(F.obj i)), U1 ∈ T i → U2 ∈ T i → U1 ∩ U2 ∈ T i\ncompat : ∀ (i j : J) (f : i ⟶ j) (V : Set ↑(F.obj j)), V ∈ T j → ↑(F.map f) ⁻¹' V ∈ T i\nD : Cone F := limitConeInfi F\nE : C.pt ≅ D.pt := IsLimit.conePointUniqueUpToIso hC (limitConeInfiIsLimit F)\nhE : Inducing ↑E.hom\nj : J\nV : Set ↑(F.obj j)\nhV : V ∈ T j\ni : J\nh : i = j\n⊢ Set ↑(F.obj j)\n[PROOFSTEP]\nexact V\n[GOAL]\ncase h.e'_3.h.mp.intro.intro.intro\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : IsCofiltered J\nF : J ⥤ TopCatMax\nC : Cone F\nhC : IsLimit C\nT : (j : J) → Set (Set ↑(F.obj j))\nhT : ∀ (j : J), IsTopologicalBasis (T j)\nuniv : ∀ (i : J), Set.univ ∈ T i\ninter : ∀ (i : J) (U1 U2 : Set ↑(F.obj i)), U1 ∈ T i → U2 ∈ T i → U1 ∩ U2 ∈ T i\ncompat : ∀ (i j : J) (f : i ⟶ j) (V : Set ↑(F.obj j)), V ∈ T j → ↑(F.map f) ⁻¹' V ∈ T i\nD : Cone F := limitConeInfi F\nE : C.pt ≅ D.pt := IsLimit.conePointUniqueUpToIso hC (limitConeInfiIsLimit F)\nhE : Inducing ↑E.hom\nj : J\nV : Set ↑(F.obj j)\nhV : V ∈ T j\nU : (i : J) → Set ↑(F.obj i) := fun i => if h : i = j then Eq.mpr (_ : Set ↑(F.obj i) = Set ↑(F.obj j)) V else Set.univ\n⊢ ↑(NatTrans.app D.π j) ⁻¹' V ∈\n    {S |\n      ∃ U F_1,\n        (∀ (i : J), i ∈ F_1 → U i ∈ T i) ∧ S = ⋂ (i : J) (_ : i ∈ F_1), (fun x => ↑(NatTrans.app D.π i) x) ⁻¹' U i}\n[PROOFSTEP]\nrefine' ⟨U, { j }, _, _⟩\n[GOAL]\ncase h.e'_3.h.mp.intro.intro.intro.refine'_1\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : IsCofiltered J\nF : J ⥤ TopCatMax\nC : Cone F\nhC : IsLimit C\nT : (j : J) → Set (Set ↑(F.obj j))\nhT : ∀ (j : J), IsTopologicalBasis (T j)\nuniv : ∀ (i : J), Set.univ ∈ T i\ninter : ∀ (i : J) (U1 U2 : Set ↑(F.obj i)), U1 ∈ T i → U2 ∈ T i → U1 ∩ U2 ∈ T i\ncompat : ∀ (i j : J) (f : i ⟶ j) (V : Set ↑(F.obj j)), V ∈ T j → ↑(F.map f) ⁻¹' V ∈ T i\nD : Cone F := limitConeInfi F\nE : C.pt ≅ D.pt := IsLimit.conePointUniqueUpToIso hC (limitConeInfiIsLimit F)\nhE : Inducing ↑E.hom\nj : J\nV : Set ↑(F.obj j)\nhV : V ∈ T j\nU : (i : J) → Set ↑(F.obj i) := fun i => if h : i = j then Eq.mpr (_ : Set ↑(F.obj i) = Set ↑(F.obj j)) V else Set.univ\n⊢ ∀ (i : J), i ∈ {j} → U i ∈ T i\n[PROOFSTEP]\nrintro i h\n[GOAL]\ncase h.e'_3.h.mp.intro.intro.intro.refine'_1\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : IsCofiltered J\nF : J ⥤ TopCatMax\nC : Cone F\nhC : IsLimit C\nT : (j : J) → Set (Set ↑(F.obj j))\nhT : ∀ (j : J), IsTopologicalBasis (T j)\nuniv : ∀ (i : J), Set.univ ∈ T i\ninter : ∀ (i : J) (U1 U2 : Set ↑(F.obj i)), U1 ∈ T i → U2 ∈ T i → U1 ∩ U2 ∈ T i\ncompat : ∀ (i j : J) (f : i ⟶ j) (V : Set ↑(F.obj j)), V ∈ T j → ↑(F.map f) ⁻¹' V ∈ T i\nD : Cone F := limitConeInfi F\nE : C.pt ≅ D.pt := IsLimit.conePointUniqueUpToIso hC (limitConeInfiIsLimit F)\nhE : Inducing ↑E.hom\nj : J\nV : Set ↑(F.obj j)\nhV : V ∈ T j\nU : (i : J) → Set ↑(F.obj i) := fun i => if h : i = j then Eq.mpr (_ : Set ↑(F.obj i) = Set ↑(F.obj j)) V else Set.univ\ni : J\nh : i ∈ {j}\n⊢ U i ∈ T i\n[PROOFSTEP]\nrw [Finset.mem_singleton] at h \n[GOAL]\ncase h.e'_3.h.mp.intro.intro.intro.refine'_1\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : IsCofiltered J\nF : J ⥤ TopCatMax\nC : Cone F\nhC : IsLimit C\nT : (j : J) → Set (Set ↑(F.obj j))\nhT : ∀ (j : J), IsTopologicalBasis (T j)\nuniv : ∀ (i : J), Set.univ ∈ T i\ninter : ∀ (i : J) (U1 U2 : Set ↑(F.obj i)), U1 ∈ T i → U2 ∈ T i → U1 ∩ U2 ∈ T i\ncompat : ∀ (i j : J) (f : i ⟶ j) (V : Set ↑(F.obj j)), V ∈ T j → ↑(F.map f) ⁻¹' V ∈ T i\nD : Cone F := limitConeInfi F\nE : C.pt ≅ D.pt := IsLimit.conePointUniqueUpToIso hC (limitConeInfiIsLimit F)\nhE : Inducing ↑E.hom\nj : J\nV : Set ↑(F.obj j)\nhV : V ∈ T j\nU : (i : J) → Set ↑(F.obj i) := fun i => if h : i = j then Eq.mpr (_ : Set ↑(F.obj i) = Set ↑(F.obj j)) V else Set.univ\ni : J\nh : i = j\n⊢ U i ∈ T i\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h.e'_3.h.mp.intro.intro.intro.refine'_1\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : IsCofiltered J\nF : J ⥤ TopCatMax\nC : Cone F\nhC : IsLimit C\nT : (j : J) → Set (Set ↑(F.obj j))\nhT : ∀ (j : J), IsTopologicalBasis (T j)\nuniv : ∀ (i : J), Set.univ ∈ T i\ninter : ∀ (i : J) (U1 U2 : Set ↑(F.obj i)), U1 ∈ T i → U2 ∈ T i → U1 ∩ U2 ∈ T i\ncompat : ∀ (i j : J) (f : i ⟶ j) (V : Set ↑(F.obj j)), V ∈ T j → ↑(F.map f) ⁻¹' V ∈ T i\nD : Cone F := limitConeInfi F\nE : C.pt ≅ D.pt := IsLimit.conePointUniqueUpToIso hC (limitConeInfiIsLimit F)\nhE : Inducing ↑E.hom\nj : J\nV : Set ↑(F.obj j)\nhV : V ∈ T j\nU : (i : J) → Set ↑(F.obj i) := fun i => if h : i = j then Eq.mpr (_ : Set ↑(F.obj i) = Set ↑(F.obj j)) V else Set.univ\ni : J\nh : i = j\n⊢ (if h : i = j then cast (_ : Set ↑(F.obj j) = Set ↑(F.obj i)) V else Set.univ) ∈ T i\n[PROOFSTEP]\nrw [dif_pos h]\n[GOAL]\ncase h.e'_3.h.mp.intro.intro.intro.refine'_1\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : IsCofiltered J\nF : J ⥤ TopCatMax\nC : Cone F\nhC : IsLimit C\nT : (j : J) → Set (Set ↑(F.obj j))\nhT : ∀ (j : J), IsTopologicalBasis (T j)\nuniv : ∀ (i : J), Set.univ ∈ T i\ninter : ∀ (i : J) (U1 U2 : Set ↑(F.obj i)), U1 ∈ T i → U2 ∈ T i → U1 ∩ U2 ∈ T i\ncompat : ∀ (i j : J) (f : i ⟶ j) (V : Set ↑(F.obj j)), V ∈ T j → ↑(F.map f) ⁻¹' V ∈ T i\nD : Cone F := limitConeInfi F\nE : C.pt ≅ D.pt := IsLimit.conePointUniqueUpToIso hC (limitConeInfiIsLimit F)\nhE : Inducing ↑E.hom\nj : J\nV : Set ↑(F.obj j)\nhV : V ∈ T j\nU : (i : J) → Set ↑(F.obj i) := fun i => if h : i = j then Eq.mpr (_ : Set ↑(F.obj i) = Set ↑(F.obj j)) V else Set.univ\ni : J\nh : i = j\n⊢ cast (_ : Set ↑(F.obj j) = Set ↑(F.obj i)) V ∈ T i\n[PROOFSTEP]\nsubst h\n[GOAL]\ncase h.e'_3.h.mp.intro.intro.intro.refine'_1\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : IsCofiltered J\nF : J ⥤ TopCatMax\nC : Cone F\nhC : IsLimit C\nT : (j : J) → Set (Set ↑(F.obj j))\nhT : ∀ (j : J), IsTopologicalBasis (T j)\nuniv : ∀ (i : J), Set.univ ∈ T i\ninter : ∀ (i : J) (U1 U2 : Set ↑(F.obj i)), U1 ∈ T i → U2 ∈ T i → U1 ∩ U2 ∈ T i\ncompat : ∀ (i j : J) (f : i ⟶ j) (V : Set ↑(F.obj j)), V ∈ T j → ↑(F.map f) ⁻¹' V ∈ T i\nD : Cone F := limitConeInfi F\nE : C.pt ≅ D.pt := IsLimit.conePointUniqueUpToIso hC (limitConeInfiIsLimit F)\nhE : Inducing ↑E.hom\ni : J\nV : Set ↑(F.obj i)\nhV : V ∈ T i\nU : (i : J) → Set ↑(F.obj i) :=\n  fun i_1 => if h : i_1 = i then Eq.mpr (_ : Set ↑(F.obj i_1) = Set ↑(F.obj i)) V else Set.univ\n⊢ cast (_ : Set ↑(F.obj i) = Set ↑(F.obj i)) V ∈ T i\n[PROOFSTEP]\nexact hV\n[GOAL]\ncase h.e'_3.h.mp.intro.intro.intro.refine'_2\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : IsCofiltered J\nF : J ⥤ TopCatMax\nC : Cone F\nhC : IsLimit C\nT : (j : J) → Set (Set ↑(F.obj j))\nhT : ∀ (j : J), IsTopologicalBasis (T j)\nuniv : ∀ (i : J), Set.univ ∈ T i\ninter : ∀ (i : J) (U1 U2 : Set ↑(F.obj i)), U1 ∈ T i → U2 ∈ T i → U1 ∩ U2 ∈ T i\ncompat : ∀ (i j : J) (f : i ⟶ j) (V : Set ↑(F.obj j)), V ∈ T j → ↑(F.map f) ⁻¹' V ∈ T i\nD : Cone F := limitConeInfi F\nE : C.pt ≅ D.pt := IsLimit.conePointUniqueUpToIso hC (limitConeInfiIsLimit F)\nhE : Inducing ↑E.hom\nj : J\nV : Set ↑(F.obj j)\nhV : V ∈ T j\nU : (i : J) → Set ↑(F.obj i) := fun i => if h : i = j then Eq.mpr (_ : Set ↑(F.obj i) = Set ↑(F.obj j)) V else Set.univ\n⊢ ↑(NatTrans.app D.π j) ⁻¹' V = ⋂ (i : J) (_ : i ∈ {j}), (fun x => ↑(NatTrans.app D.π i) x) ⁻¹' U i\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h.e'_3.h.mp.intro.intro.intro.refine'_2\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : IsCofiltered J\nF : J ⥤ TopCatMax\nC : Cone F\nhC : IsLimit C\nT : (j : J) → Set (Set ↑(F.obj j))\nhT : ∀ (j : J), IsTopologicalBasis (T j)\nuniv : ∀ (i : J), Set.univ ∈ T i\ninter : ∀ (i : J) (U1 U2 : Set ↑(F.obj i)), U1 ∈ T i → U2 ∈ T i → U1 ∩ U2 ∈ T i\ncompat : ∀ (i j : J) (f : i ⟶ j) (V : Set ↑(F.obj j)), V ∈ T j → ↑(F.map f) ⁻¹' V ∈ T i\nD : Cone F := limitConeInfi F\nE : C.pt ≅ D.pt := IsLimit.conePointUniqueUpToIso hC (limitConeInfiIsLimit F)\nhE : Inducing ↑E.hom\nj : J\nV : Set ↑(F.obj j)\nhV : V ∈ T j\nU : (i : J) → Set ↑(F.obj i) := fun i => if h : i = j then Eq.mpr (_ : Set ↑(F.obj i) = Set ↑(F.obj j)) V else Set.univ\n⊢ ↑(NatTrans.app (limitConeInfi F).π j) ⁻¹' V =\n    ⋂ (i : J) (_ : i ∈ {j}),\n      (fun x => ↑(NatTrans.app (limitConeInfi F).π i) x) ⁻¹'\n        if h : i = j then cast (_ : Set ↑(F.obj j) = Set ↑(F.obj i)) V else Set.univ\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.e'_3.h.mpr\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : IsCofiltered J\nF : J ⥤ TopCatMax\nC : Cone F\nhC : IsLimit C\nT : (j : J) → Set (Set ↑(F.obj j))\nhT : ∀ (j : J), IsTopologicalBasis (T j)\nuniv : ∀ (i : J), Set.univ ∈ T i\ninter : ∀ (i : J) (U1 U2 : Set ↑(F.obj i)), U1 ∈ T i → U2 ∈ T i → U1 ∩ U2 ∈ T i\ncompat : ∀ (i j : J) (f : i ⟶ j) (V : Set ↑(F.obj j)), V ∈ T j → ↑(F.map f) ⁻¹' V ∈ T i\nD : Cone F := limitConeInfi F\nE : C.pt ≅ D.pt := IsLimit.conePointUniqueUpToIso hC (limitConeInfiIsLimit F)\nhE : Inducing ↑E.hom\nU0 : Set ↑D.pt\n⊢ U0 ∈\n      {S |\n        ∃ U F_1,\n          (∀ (i : J), i ∈ F_1 → U i ∈ T i) ∧ S = ⋂ (i : J) (_ : i ∈ F_1), (fun x => ↑(NatTrans.app D.π i) x) ⁻¹' U i} →\n    U0 ∈ {U | ∃ j V, V ∈ T j ∧ U = ↑(NatTrans.app D.π j) ⁻¹' V}\n[PROOFSTEP]\nrintro ⟨U, G, h1, h2⟩\n[GOAL]\ncase h.e'_3.h.mpr.intro.intro.intro\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : IsCofiltered J\nF : J ⥤ TopCatMax\nC : Cone F\nhC : IsLimit C\nT : (j : J) → Set (Set ↑(F.obj j))\nhT : ∀ (j : J), IsTopologicalBasis (T j)\nuniv : ∀ (i : J), Set.univ ∈ T i\ninter : ∀ (i : J) (U1 U2 : Set ↑(F.obj i)), U1 ∈ T i → U2 ∈ T i → U1 ∩ U2 ∈ T i\ncompat : ∀ (i j : J) (f : i ⟶ j) (V : Set ↑(F.obj j)), V ∈ T j → ↑(F.map f) ⁻¹' V ∈ T i\nD : Cone F := limitConeInfi F\nE : C.pt ≅ D.pt := IsLimit.conePointUniqueUpToIso hC (limitConeInfiIsLimit F)\nhE : Inducing ↑E.hom\nU0 : Set ↑D.pt\nU : (i : J) → Set ↑(F.obj i)\nG : Finset J\nh1 : ∀ (i : J), i ∈ G → U i ∈ T i\nh2 : U0 = ⋂ (i : J) (_ : i ∈ G), (fun x => ↑(NatTrans.app D.π i) x) ⁻¹' U i\n⊢ U0 ∈ {U | ∃ j V, V ∈ T j ∧ U = ↑(NatTrans.app D.π j) ⁻¹' V}\n[PROOFSTEP]\nobtain ⟨j, hj⟩ := IsCofiltered.inf_objs_exists G\n[GOAL]\ncase h.e'_3.h.mpr.intro.intro.intro.intro\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : IsCofiltered J\nF : J ⥤ TopCatMax\nC : Cone F\nhC : IsLimit C\nT : (j : J) → Set (Set ↑(F.obj j))\nhT : ∀ (j : J), IsTopologicalBasis (T j)\nuniv : ∀ (i : J), Set.univ ∈ T i\ninter : ∀ (i : J) (U1 U2 : Set ↑(F.obj i)), U1 ∈ T i → U2 ∈ T i → U1 ∩ U2 ∈ T i\ncompat : ∀ (i j : J) (f : i ⟶ j) (V : Set ↑(F.obj j)), V ∈ T j → ↑(F.map f) ⁻¹' V ∈ T i\nD : Cone F := limitConeInfi F\nE : C.pt ≅ D.pt := IsLimit.conePointUniqueUpToIso hC (limitConeInfiIsLimit F)\nhE : Inducing ↑E.hom\nU0 : Set ↑D.pt\nU : (i : J) → Set ↑(F.obj i)\nG : Finset J\nh1 : ∀ (i : J), i ∈ G → U i ∈ T i\nh2 : U0 = ⋂ (i : J) (_ : i ∈ G), (fun x => ↑(NatTrans.app D.π i) x) ⁻¹' U i\nj : J\nhj : ∀ {X : J}, X ∈ G → Nonempty (j ⟶ X)\n⊢ U0 ∈ {U | ∃ j V, V ∈ T j ∧ U = ↑(NatTrans.app D.π j) ⁻¹' V}\n[PROOFSTEP]\nlet g : ∀ (e) (_he : e ∈ G), j ⟶ e := fun _ he => (hj he).some\n[GOAL]\ncase h.e'_3.h.mpr.intro.intro.intro.intro\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : IsCofiltered J\nF : J ⥤ TopCatMax\nC : Cone F\nhC : IsLimit C\nT : (j : J) → Set (Set ↑(F.obj j))\nhT : ∀ (j : J), IsTopologicalBasis (T j)\nuniv : ∀ (i : J), Set.univ ∈ T i\ninter : ∀ (i : J) (U1 U2 : Set ↑(F.obj i)), U1 ∈ T i → U2 ∈ T i → U1 ∩ U2 ∈ T i\ncompat : ∀ (i j : J) (f : i ⟶ j) (V : Set ↑(F.obj j)), V ∈ T j → ↑(F.map f) ⁻¹' V ∈ T i\nD : Cone F := limitConeInfi F\nE : C.pt ≅ D.pt := IsLimit.conePointUniqueUpToIso hC (limitConeInfiIsLimit F)\nhE : Inducing ↑E.hom\nU0 : Set ↑D.pt\nU : (i : J) → Set ↑(F.obj i)\nG : Finset J\nh1 : ∀ (i : J), i ∈ G → U i ∈ T i\nh2 : U0 = ⋂ (i : J) (_ : i ∈ G), (fun x => ↑(NatTrans.app D.π i) x) ⁻¹' U i\nj : J\nhj : ∀ {X : J}, X ∈ G → Nonempty (j ⟶ X)\ng : (e : J) → e ∈ G → (j ⟶ e) := fun x he => Nonempty.some (_ : Nonempty (j ⟶ x))\n⊢ U0 ∈ {U | ∃ j V, V ∈ T j ∧ U = ↑(NatTrans.app D.π j) ⁻¹' V}\n[PROOFSTEP]\nlet Vs : J → Set (F.obj j) := fun e => if h : e ∈ G then F.map (g e h) ⁻¹' U e else Set.univ\n[GOAL]\ncase h.e'_3.h.mpr.intro.intro.intro.intro\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : IsCofiltered J\nF : J ⥤ TopCatMax\nC : Cone F\nhC : IsLimit C\nT : (j : J) → Set (Set ↑(F.obj j))\nhT : ∀ (j : J), IsTopologicalBasis (T j)\nuniv : ∀ (i : J), Set.univ ∈ T i\ninter : ∀ (i : J) (U1 U2 : Set ↑(F.obj i)), U1 ∈ T i → U2 ∈ T i → U1 ∩ U2 ∈ T i\ncompat : ∀ (i j : J) (f : i ⟶ j) (V : Set ↑(F.obj j)), V ∈ T j → ↑(F.map f) ⁻¹' V ∈ T i\nD : Cone F := limitConeInfi F\nE : C.pt ≅ D.pt := IsLimit.conePointUniqueUpToIso hC (limitConeInfiIsLimit F)\nhE : Inducing ↑E.hom\nU0 : Set ↑D.pt\nU : (i : J) → Set ↑(F.obj i)\nG : Finset J\nh1 : ∀ (i : J), i ∈ G → U i ∈ T i\nh2 : U0 = ⋂ (i : J) (_ : i ∈ G), (fun x => ↑(NatTrans.app D.π i) x) ⁻¹' U i\nj : J\nhj : ∀ {X : J}, X ∈ G → Nonempty (j ⟶ X)\ng : (e : J) → e ∈ G → (j ⟶ e) := fun x he => Nonempty.some (_ : Nonempty (j ⟶ x))\nVs : J → Set ↑(F.obj j) := fun e => if h : e ∈ G then ↑(F.map (g e h)) ⁻¹' U e else Set.univ\n⊢ U0 ∈ {U | ∃ j V, V ∈ T j ∧ U = ↑(NatTrans.app D.π j) ⁻¹' V}\n[PROOFSTEP]\nlet V : Set (F.obj j) := ⋂ (e : J) (_he : e ∈ G), Vs e\n[GOAL]\ncase h.e'_3.h.mpr.intro.intro.intro.intro\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : IsCofiltered J\nF : J ⥤ TopCatMax\nC : Cone F\nhC : IsLimit C\nT : (j : J) → Set (Set ↑(F.obj j))\nhT : ∀ (j : J), IsTopologicalBasis (T j)\nuniv : ∀ (i : J), Set.univ ∈ T i\ninter : ∀ (i : J) (U1 U2 : Set ↑(F.obj i)), U1 ∈ T i → U2 ∈ T i → U1 ∩ U2 ∈ T i\ncompat : ∀ (i j : J) (f : i ⟶ j) (V : Set ↑(F.obj j)), V ∈ T j → ↑(F.map f) ⁻¹' V ∈ T i\nD : Cone F := limitConeInfi F\nE : C.pt ≅ D.pt := IsLimit.conePointUniqueUpToIso hC (limitConeInfiIsLimit F)\nhE : Inducing ↑E.hom\nU0 : Set ↑D.pt\nU : (i : J) → Set ↑(F.obj i)\nG : Finset J\nh1 : ∀ (i : J), i ∈ G → U i ∈ T i\nh2 : U0 = ⋂ (i : J) (_ : i ∈ G), (fun x => ↑(NatTrans.app D.π i) x) ⁻¹' U i\nj : J\nhj : ∀ {X : J}, X ∈ G → Nonempty (j ⟶ X)\ng : (e : J) → e ∈ G → (j ⟶ e) := fun x he => Nonempty.some (_ : Nonempty (j ⟶ x))\nVs : J → Set ↑(F.obj j) := fun e => if h : e ∈ G then ↑(F.map (g e h)) ⁻¹' U e else Set.univ\nV : Set ↑(F.obj j) := ⋂ (e : J) (_ : e ∈ G), Vs e\n⊢ U0 ∈ {U | ∃ j V, V ∈ T j ∧ U = ↑(NatTrans.app D.π j) ⁻¹' V}\n[PROOFSTEP]\nrefine' ⟨j, V, _, _⟩\n[GOAL]\ncase h.e'_3.h.mpr.intro.intro.intro.intro.refine'_1\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : IsCofiltered J\nF : J ⥤ TopCatMax\nC : Cone F\nhC : IsLimit C\nT : (j : J) → Set (Set ↑(F.obj j))\nhT : ∀ (j : J), IsTopologicalBasis (T j)\nuniv : ∀ (i : J), Set.univ ∈ T i\ninter : ∀ (i : J) (U1 U2 : Set ↑(F.obj i)), U1 ∈ T i → U2 ∈ T i → U1 ∩ U2 ∈ T i\ncompat : ∀ (i j : J) (f : i ⟶ j) (V : Set ↑(F.obj j)), V ∈ T j → ↑(F.map f) ⁻¹' V ∈ T i\nD : Cone F := limitConeInfi F\nE : C.pt ≅ D.pt := IsLimit.conePointUniqueUpToIso hC (limitConeInfiIsLimit F)\nhE : Inducing ↑E.hom\nU0 : Set ↑D.pt\nU : (i : J) → Set ↑(F.obj i)\nG : Finset J\nh1 : ∀ (i : J), i ∈ G → U i ∈ T i\nh2 : U0 = ⋂ (i : J) (_ : i ∈ G), (fun x => ↑(NatTrans.app D.π i) x) ⁻¹' U i\nj : J\nhj : ∀ {X : J}, X ∈ G → Nonempty (j ⟶ X)\ng : (e : J) → e ∈ G → (j ⟶ e) := fun x he => Nonempty.some (_ : Nonempty (j ⟶ x))\nVs : J → Set ↑(F.obj j) := fun e => if h : e ∈ G then ↑(F.map (g e h)) ⁻¹' U e else Set.univ\nV : Set ↑(F.obj j) := ⋂ (e : J) (_ : e ∈ G), Vs e\n⊢ V ∈ T j\n[PROOFSTEP]\nhave :\n  ∀ (S : Set (Set (F.obj j))) (E : Finset J) (P : J → Set (F.obj j)) (_univ : Set.univ ∈ S)\n    (_inter : ∀ A B : Set (F.obj j), A ∈ S → B ∈ S → A ∩ B ∈ S) (_cond : ∀ (e : J) (_he : e ∈ E), P e ∈ S),\n    (⋂ (e) (_he : e ∈ E), P e) ∈ S :=\n  by\n  intro S E\n  induction E using Finset.induction_on with\n  | empty =>\n    intro P he _hh\n    simpa\n  | @insert a E _ha hh1 =>\n    intro hh2 hh3 hh4 hh5\n    rw [Finset.set_biInter_insert]\n    refine' hh4 _ _ (hh5 _ (Finset.mem_insert_self _ _)) (hh1 _ hh3 hh4 _)\n    intro e he\n    exact\n      hh5 e\n        (Finset.mem_insert_of_mem he)\n          -- use the intermediate claim to finish off the goal using `univ` and `inter`.\n[GOAL]\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : IsCofiltered J\nF : J ⥤ TopCatMax\nC : Cone F\nhC : IsLimit C\nT : (j : J) → Set (Set ↑(F.obj j))\nhT : ∀ (j : J), IsTopologicalBasis (T j)\nuniv : ∀ (i : J), Set.univ ∈ T i\ninter : ∀ (i : J) (U1 U2 : Set ↑(F.obj i)), U1 ∈ T i → U2 ∈ T i → U1 ∩ U2 ∈ T i\ncompat : ∀ (i j : J) (f : i ⟶ j) (V : Set ↑(F.obj j)), V ∈ T j → ↑(F.map f) ⁻¹' V ∈ T i\nD : Cone F := limitConeInfi F\nE : C.pt ≅ D.pt := IsLimit.conePointUniqueUpToIso hC (limitConeInfiIsLimit F)\nhE : Inducing ↑E.hom\nU0 : Set ↑D.pt\nU : (i : J) → Set ↑(F.obj i)\nG : Finset J\nh1 : ∀ (i : J), i ∈ G → U i ∈ T i\nh2 : U0 = ⋂ (i : J) (_ : i ∈ G), (fun x => ↑(NatTrans.app D.π i) x) ⁻¹' U i\nj : J\nhj : ∀ {X : J}, X ∈ G → Nonempty (j ⟶ X)\ng : (e : J) → e ∈ G → (j ⟶ e) := fun x he => Nonempty.some (_ : Nonempty (j ⟶ x))\nVs : J → Set ↑(F.obj j) := fun e => if h : e ∈ G then ↑(F.map (g e h)) ⁻¹' U e else Set.univ\nV : Set ↑(F.obj j) := ⋂ (e : J) (_ : e ∈ G), Vs e\n⊢ ∀ (S : Set (Set ↑(F.obj j))) (E : Finset J) (P : J → Set ↑(F.obj j)),\n    Set.univ ∈ S →\n      (∀ (A B : Set ↑(F.obj j)), A ∈ S → B ∈ S → A ∩ B ∈ S) →\n        (∀ (e : J), e ∈ E → P e ∈ S) → ⋂ (e : J) (_ : e ∈ E), P e ∈ S\n[PROOFSTEP]\nintro S E\n[GOAL]\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : IsCofiltered J\nF : J ⥤ TopCatMax\nC : Cone F\nhC : IsLimit C\nT : (j : J) → Set (Set ↑(F.obj j))\nhT : ∀ (j : J), IsTopologicalBasis (T j)\nuniv : ∀ (i : J), Set.univ ∈ T i\ninter : ∀ (i : J) (U1 U2 : Set ↑(F.obj i)), U1 ∈ T i → U2 ∈ T i → U1 ∩ U2 ∈ T i\ncompat : ∀ (i j : J) (f : i ⟶ j) (V : Set ↑(F.obj j)), V ∈ T j → ↑(F.map f) ⁻¹' V ∈ T i\nD : Cone F := limitConeInfi F\nE✝ : C.pt ≅ D.pt := IsLimit.conePointUniqueUpToIso hC (limitConeInfiIsLimit F)\nhE : Inducing ↑E✝.hom\nU0 : Set ↑D.pt\nU : (i : J) → Set ↑(F.obj i)\nG : Finset J\nh1 : ∀ (i : J), i ∈ G → U i ∈ T i\nh2 : U0 = ⋂ (i : J) (_ : i ∈ G), (fun x => ↑(NatTrans.app D.π i) x) ⁻¹' U i\nj : J\nhj : ∀ {X : J}, X ∈ G → Nonempty (j ⟶ X)\ng : (e : J) → e ∈ G → (j ⟶ e) := fun x he => Nonempty.some (_ : Nonempty (j ⟶ x))\nVs : J → Set ↑(F.obj j) := fun e => if h : e ∈ G then ↑(F.map (g e h)) ⁻¹' U e else Set.univ\nV : Set ↑(F.obj j) := ⋂ (e : J) (_ : e ∈ G), Vs e\nS : Set (Set ↑(F.obj j))\nE : Finset J\n⊢ ∀ (P : J → Set ↑(F.obj j)),\n    Set.univ ∈ S →\n      (∀ (A B : Set ↑(F.obj j)), A ∈ S → B ∈ S → A ∩ B ∈ S) →\n        (∀ (e : J), e ∈ E → P e ∈ S) → ⋂ (e : J) (_ : e ∈ E), P e ∈ S\n[PROOFSTEP]\ninduction E using Finset.induction_on with\n| empty =>\n  intro P he _hh\n  simpa\n| @insert a E _ha hh1 =>\n  intro hh2 hh3 hh4 hh5\n  rw [Finset.set_biInter_insert]\n  refine' hh4 _ _ (hh5 _ (Finset.mem_insert_self _ _)) (hh1 _ hh3 hh4 _)\n  intro e he\n  exact\n    hh5 e\n      (Finset.mem_insert_of_mem he)\n        -- use the intermediate claim to finish off the goal using `univ` and `inter`.\n[GOAL]\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : IsCofiltered J\nF : J ⥤ TopCatMax\nC : Cone F\nhC : IsLimit C\nT : (j : J) → Set (Set ↑(F.obj j))\nhT : ∀ (j : J), IsTopologicalBasis (T j)\nuniv : ∀ (i : J), Set.univ ∈ T i\ninter : ∀ (i : J) (U1 U2 : Set ↑(F.obj i)), U1 ∈ T i → U2 ∈ T i → U1 ∩ U2 ∈ T i\ncompat : ∀ (i j : J) (f : i ⟶ j) (V : Set ↑(F.obj j)), V ∈ T j → ↑(F.map f) ⁻¹' V ∈ T i\nD : Cone F := limitConeInfi F\nE✝ : C.pt ≅ D.pt := IsLimit.conePointUniqueUpToIso hC (limitConeInfiIsLimit F)\nhE : Inducing ↑E✝.hom\nU0 : Set ↑D.pt\nU : (i : J) → Set ↑(F.obj i)\nG : Finset J\nh1 : ∀ (i : J), i ∈ G → U i ∈ T i\nh2 : U0 = ⋂ (i : J) (_ : i ∈ G), (fun x => ↑(NatTrans.app D.π i) x) ⁻¹' U i\nj : J\nhj : ∀ {X : J}, X ∈ G → Nonempty (j ⟶ X)\ng : (e : J) → e ∈ G → (j ⟶ e) := fun x he => Nonempty.some (_ : Nonempty (j ⟶ x))\nVs : J → Set ↑(F.obj j) := fun e => if h : e ∈ G then ↑(F.map (g e h)) ⁻¹' U e else Set.univ\nV : Set ↑(F.obj j) := ⋂ (e : J) (_ : e ∈ G), Vs e\nS : Set (Set ↑(F.obj j))\nE : Finset J\n⊢ ∀ (P : J → Set ↑(F.obj j)),\n    Set.univ ∈ S →\n      (∀ (A B : Set ↑(F.obj j)), A ∈ S → B ∈ S → A ∩ B ∈ S) →\n        (∀ (e : J), e ∈ E → P e ∈ S) → ⋂ (e : J) (_ : e ∈ E), P e ∈ S\n[PROOFSTEP]\ninduction E using Finset.induction_on with\n| empty =>\n  intro P he _hh\n  simpa\n| @insert a E _ha hh1 =>\n  intro hh2 hh3 hh4 hh5\n  rw [Finset.set_biInter_insert]\n  refine' hh4 _ _ (hh5 _ (Finset.mem_insert_self _ _)) (hh1 _ hh3 hh4 _)\n  intro e he\n  exact\n    hh5 e\n      (Finset.mem_insert_of_mem he)\n        -- use the intermediate claim to finish off the goal using `univ` and `inter`.\n[GOAL]\ncase empty\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : IsCofiltered J\nF : J ⥤ TopCatMax\nC : Cone F\nhC : IsLimit C\nT : (j : J) → Set (Set ↑(F.obj j))\nhT : ∀ (j : J), IsTopologicalBasis (T j)\nuniv : ∀ (i : J), Set.univ ∈ T i\ninter : ∀ (i : J) (U1 U2 : Set ↑(F.obj i)), U1 ∈ T i → U2 ∈ T i → U1 ∩ U2 ∈ T i\ncompat : ∀ (i j : J) (f : i ⟶ j) (V : Set ↑(F.obj j)), V ∈ T j → ↑(F.map f) ⁻¹' V ∈ T i\nD : Cone F := limitConeInfi F\nE : C.pt ≅ D.pt := IsLimit.conePointUniqueUpToIso hC (limitConeInfiIsLimit F)\nhE : Inducing ↑E.hom\nU0 : Set ↑D.pt\nU : (i : J) → Set ↑(F.obj i)\nG : Finset J\nh1 : ∀ (i : J), i ∈ G → U i ∈ T i\nh2 : U0 = ⋂ (i : J) (_ : i ∈ G), (fun x => ↑(NatTrans.app D.π i) x) ⁻¹' U i\nj : J\nhj : ∀ {X : J}, X ∈ G → Nonempty (j ⟶ X)\ng : (e : J) → e ∈ G → (j ⟶ e) := fun x he => Nonempty.some (_ : Nonempty (j ⟶ x))\nVs : J → Set ↑(F.obj j) := fun e => if h : e ∈ G then ↑(F.map (g e h)) ⁻¹' U e else Set.univ\nV : Set ↑(F.obj j) := ⋂ (e : J) (_ : e ∈ G), Vs e\nS : Set (Set ↑(F.obj j))\n⊢ ∀ (P : J → Set ↑(F.obj j)),\n    Set.univ ∈ S →\n      (∀ (A B : Set ↑(F.obj j)), A ∈ S → B ∈ S → A ∩ B ∈ S) →\n        (∀ (e : J), e ∈ ∅ → P e ∈ S) → ⋂ (e : J) (_ : e ∈ ∅), P e ∈ S\n[PROOFSTEP]\n\n| empty =>\n  intro P he _hh\n  simpa\n[GOAL]\ncase empty\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : IsCofiltered J\nF : J ⥤ TopCatMax\nC : Cone F\nhC : IsLimit C\nT : (j : J) → Set (Set ↑(F.obj j))\nhT : ∀ (j : J), IsTopologicalBasis (T j)\nuniv : ∀ (i : J), Set.univ ∈ T i\ninter : ∀ (i : J) (U1 U2 : Set ↑(F.obj i)), U1 ∈ T i → U2 ∈ T i → U1 ∩ U2 ∈ T i\ncompat : ∀ (i j : J) (f : i ⟶ j) (V : Set ↑(F.obj j)), V ∈ T j → ↑(F.map f) ⁻¹' V ∈ T i\nD : Cone F := limitConeInfi F\nE : C.pt ≅ D.pt := IsLimit.conePointUniqueUpToIso hC (limitConeInfiIsLimit F)\nhE : Inducing ↑E.hom\nU0 : Set ↑D.pt\nU : (i : J) → Set ↑(F.obj i)\nG : Finset J\nh1 : ∀ (i : J), i ∈ G → U i ∈ T i\nh2 : U0 = ⋂ (i : J) (_ : i ∈ G), (fun x => ↑(NatTrans.app D.π i) x) ⁻¹' U i\nj : J\nhj : ∀ {X : J}, X ∈ G → Nonempty (j ⟶ X)\ng : (e : J) → e ∈ G → (j ⟶ e) := fun x he => Nonempty.some (_ : Nonempty (j ⟶ x))\nVs : J → Set ↑(F.obj j) := fun e => if h : e ∈ G then ↑(F.map (g e h)) ⁻¹' U e else Set.univ\nV : Set ↑(F.obj j) := ⋂ (e : J) (_ : e ∈ G), Vs e\nS : Set (Set ↑(F.obj j))\n⊢ ∀ (P : J → Set ↑(F.obj j)),\n    Set.univ ∈ S →\n      (∀ (A B : Set ↑(F.obj j)), A ∈ S → B ∈ S → A ∩ B ∈ S) →\n        (∀ (e : J), e ∈ ∅ → P e ∈ S) → ⋂ (e : J) (_ : e ∈ ∅), P e ∈ S\n[PROOFSTEP]\nintro P he _hh\n[GOAL]\ncase empty\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : IsCofiltered J\nF : J ⥤ TopCatMax\nC : Cone F\nhC : IsLimit C\nT : (j : J) → Set (Set ↑(F.obj j))\nhT : ∀ (j : J), IsTopologicalBasis (T j)\nuniv : ∀ (i : J), Set.univ ∈ T i\ninter : ∀ (i : J) (U1 U2 : Set ↑(F.obj i)), U1 ∈ T i → U2 ∈ T i → U1 ∩ U2 ∈ T i\ncompat : ∀ (i j : J) (f : i ⟶ j) (V : Set ↑(F.obj j)), V ∈ T j → ↑(F.map f) ⁻¹' V ∈ T i\nD : Cone F := limitConeInfi F\nE : C.pt ≅ D.pt := IsLimit.conePointUniqueUpToIso hC (limitConeInfiIsLimit F)\nhE : Inducing ↑E.hom\nU0 : Set ↑D.pt\nU : (i : J) → Set ↑(F.obj i)\nG : Finset J\nh1 : ∀ (i : J), i ∈ G → U i ∈ T i\nh2 : U0 = ⋂ (i : J) (_ : i ∈ G), (fun x => ↑(NatTrans.app D.π i) x) ⁻¹' U i\nj : J\nhj : ∀ {X : J}, X ∈ G → Nonempty (j ⟶ X)\ng : (e : J) → e ∈ G → (j ⟶ e) := fun x he => Nonempty.some (_ : Nonempty (j ⟶ x))\nVs : J → Set ↑(F.obj j) := fun e => if h : e ∈ G then ↑(F.map (g e h)) ⁻¹' U e else Set.univ\nV : Set ↑(F.obj j) := ⋂ (e : J) (_ : e ∈ G), Vs e\nS : Set (Set ↑(F.obj j))\nP : J → Set ↑(F.obj j)\nhe : Set.univ ∈ S\n_hh : ∀ (A B : Set ↑(F.obj j)), A ∈ S → B ∈ S → A ∩ B ∈ S\n⊢ (∀ (e : J), e ∈ ∅ → P e ∈ S) → ⋂ (e : J) (_ : e ∈ ∅), P e ∈ S\n[PROOFSTEP]\nsimpa\n[GOAL]\ncase insert\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : IsCofiltered J\nF : J ⥤ TopCatMax\nC : Cone F\nhC : IsLimit C\nT : (j : J) → Set (Set ↑(F.obj j))\nhT : ∀ (j : J), IsTopologicalBasis (T j)\nuniv : ∀ (i : J), Set.univ ∈ T i\ninter : ∀ (i : J) (U1 U2 : Set ↑(F.obj i)), U1 ∈ T i → U2 ∈ T i → U1 ∩ U2 ∈ T i\ncompat : ∀ (i j : J) (f : i ⟶ j) (V : Set ↑(F.obj j)), V ∈ T j → ↑(F.map f) ⁻¹' V ∈ T i\nD : Cone F := limitConeInfi F\nE✝ : C.pt ≅ D.pt := IsLimit.conePointUniqueUpToIso hC (limitConeInfiIsLimit F)\nhE : Inducing ↑E✝.hom\nU0 : Set ↑D.pt\nU : (i : J) → Set ↑(F.obj i)\nG : Finset J\nh1 : ∀ (i : J), i ∈ G → U i ∈ T i\nh2 : U0 = ⋂ (i : J) (_ : i ∈ G), (fun x => ↑(NatTrans.app D.π i) x) ⁻¹' U i\nj : J\nhj : ∀ {X : J}, X ∈ G → Nonempty (j ⟶ X)\ng : (e : J) → e ∈ G → (j ⟶ e) := fun x he => Nonempty.some (_ : Nonempty (j ⟶ x))\nVs : J → Set ↑(F.obj j) := fun e => if h : e ∈ G then ↑(F.map (g e h)) ⁻¹' U e else Set.univ\nV : Set ↑(F.obj j) := ⋂ (e : J) (_ : e ∈ G), Vs e\nS : Set (Set ↑(F.obj j))\na : J\nE : Finset J\n_ha : ¬a ∈ E\nhh1 :\n  ∀ (P : J → Set ↑(F.obj j)),\n    Set.univ ∈ S →\n      (∀ (A B : Set ↑(F.obj j)), A ∈ S → B ∈ S → A ∩ B ∈ S) →\n        (∀ (e : J), e ∈ E → P e ∈ S) → ⋂ (e : J) (_ : e ∈ E), P e ∈ S\n⊢ ∀ (P : J → Set ↑(F.obj j)),\n    Set.univ ∈ S →\n      (∀ (A B : Set ↑(F.obj j)), A ∈ S → B ∈ S → A ∩ B ∈ S) →\n        (∀ (e : J), e ∈ insert a E → P e ∈ S) → ⋂ (e : J) (_ : e ∈ insert a E), P e ∈ S\n[PROOFSTEP]\n\n| @insert a E _ha hh1 =>\n  intro hh2 hh3 hh4 hh5\n  rw [Finset.set_biInter_insert]\n  refine' hh4 _ _ (hh5 _ (Finset.mem_insert_self _ _)) (hh1 _ hh3 hh4 _)\n  intro e he\n  exact\n    hh5 e\n      (Finset.mem_insert_of_mem he)\n        -- use the intermediate claim to finish off the goal using `univ` and `inter`.\n[GOAL]\ncase insert\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : IsCofiltered J\nF : J ⥤ TopCatMax\nC : Cone F\nhC : IsLimit C\nT : (j : J) → Set (Set ↑(F.obj j))\nhT : ∀ (j : J), IsTopologicalBasis (T j)\nuniv : ∀ (i : J), Set.univ ∈ T i\ninter : ∀ (i : J) (U1 U2 : Set ↑(F.obj i)), U1 ∈ T i → U2 ∈ T i → U1 ∩ U2 ∈ T i\ncompat : ∀ (i j : J) (f : i ⟶ j) (V : Set ↑(F.obj j)), V ∈ T j → ↑(F.map f) ⁻¹' V ∈ T i\nD : Cone F := limitConeInfi F\nE✝ : C.pt ≅ D.pt := IsLimit.conePointUniqueUpToIso hC (limitConeInfiIsLimit F)\nhE : Inducing ↑E✝.hom\nU0 : Set ↑D.pt\nU : (i : J) → Set ↑(F.obj i)\nG : Finset J\nh1 : ∀ (i : J), i ∈ G → U i ∈ T i\nh2 : U0 = ⋂ (i : J) (_ : i ∈ G), (fun x => ↑(NatTrans.app D.π i) x) ⁻¹' U i\nj : J\nhj : ∀ {X : J}, X ∈ G → Nonempty (j ⟶ X)\ng : (e : J) → e ∈ G → (j ⟶ e) := fun x he => Nonempty.some (_ : Nonempty (j ⟶ x))\nVs : J → Set ↑(F.obj j) := fun e => if h : e ∈ G then ↑(F.map (g e h)) ⁻¹' U e else Set.univ\nV : Set ↑(F.obj j) := ⋂ (e : J) (_ : e ∈ G), Vs e\nS : Set (Set ↑(F.obj j))\na : J\nE : Finset J\n_ha : ¬a ∈ E\nhh1 :\n  ∀ (P : J → Set ↑(F.obj j)),\n    Set.univ ∈ S →\n      (∀ (A B : Set ↑(F.obj j)), A ∈ S → B ∈ S → A ∩ B ∈ S) →\n        (∀ (e : J), e ∈ E → P e ∈ S) → ⋂ (e : J) (_ : e ∈ E), P e ∈ S\n⊢ ∀ (P : J → Set ↑(F.obj j)),\n    Set.univ ∈ S →\n      (∀ (A B : Set ↑(F.obj j)), A ∈ S → B ∈ S → A ∩ B ∈ S) →\n        (∀ (e : J), e ∈ insert a E → P e ∈ S) → ⋂ (e : J) (_ : e ∈ insert a E), P e ∈ S\n[PROOFSTEP]\nintro hh2 hh3 hh4 hh5\n[GOAL]\ncase insert\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : IsCofiltered J\nF : J ⥤ TopCatMax\nC : Cone F\nhC : IsLimit C\nT : (j : J) → Set (Set ↑(F.obj j))\nhT : ∀ (j : J), IsTopologicalBasis (T j)\nuniv : ∀ (i : J), Set.univ ∈ T i\ninter : ∀ (i : J) (U1 U2 : Set ↑(F.obj i)), U1 ∈ T i → U2 ∈ T i → U1 ∩ U2 ∈ T i\ncompat : ∀ (i j : J) (f : i ⟶ j) (V : Set ↑(F.obj j)), V ∈ T j → ↑(F.map f) ⁻¹' V ∈ T i\nD : Cone F := limitConeInfi F\nE✝ : C.pt ≅ D.pt := IsLimit.conePointUniqueUpToIso hC (limitConeInfiIsLimit F)\nhE : Inducing ↑E✝.hom\nU0 : Set ↑D.pt\nU : (i : J) → Set ↑(F.obj i)\nG : Finset J\nh1 : ∀ (i : J), i ∈ G → U i ∈ T i\nh2 : U0 = ⋂ (i : J) (_ : i ∈ G), (fun x => ↑(NatTrans.app D.π i) x) ⁻¹' U i\nj : J\nhj : ∀ {X : J}, X ∈ G → Nonempty (j ⟶ X)\ng : (e : J) → e ∈ G → (j ⟶ e) := fun x he => Nonempty.some (_ : Nonempty (j ⟶ x))\nVs : J → Set ↑(F.obj j) := fun e => if h : e ∈ G then ↑(F.map (g e h)) ⁻¹' U e else Set.univ\nV : Set ↑(F.obj j) := ⋂ (e : J) (_ : e ∈ G), Vs e\nS : Set (Set ↑(F.obj j))\na : J\nE : Finset J\n_ha : ¬a ∈ E\nhh1 :\n  ∀ (P : J → Set ↑(F.obj j)),\n    Set.univ ∈ S →\n      (∀ (A B : Set ↑(F.obj j)), A ∈ S → B ∈ S → A ∩ B ∈ S) →\n        (∀ (e : J), e ∈ E → P e ∈ S) → ⋂ (e : J) (_ : e ∈ E), P e ∈ S\nhh2 : J → Set ↑(F.obj j)\nhh3 : Set.univ ∈ S\nhh4 : ∀ (A B : Set ↑(F.obj j)), A ∈ S → B ∈ S → A ∩ B ∈ S\nhh5 : ∀ (e : J), e ∈ insert a E → hh2 e ∈ S\n⊢ ⋂ (e : J) (_ : e ∈ insert a E), hh2 e ∈ S\n[PROOFSTEP]\nrw [Finset.set_biInter_insert]\n[GOAL]\ncase insert\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : IsCofiltered J\nF : J ⥤ TopCatMax\nC : Cone F\nhC : IsLimit C\nT : (j : J) → Set (Set ↑(F.obj j))\nhT : ∀ (j : J), IsTopologicalBasis (T j)\nuniv : ∀ (i : J), Set.univ ∈ T i\ninter : ∀ (i : J) (U1 U2 : Set ↑(F.obj i)), U1 ∈ T i → U2 ∈ T i → U1 ∩ U2 ∈ T i\ncompat : ∀ (i j : J) (f : i ⟶ j) (V : Set ↑(F.obj j)), V ∈ T j → ↑(F.map f) ⁻¹' V ∈ T i\nD : Cone F := limitConeInfi F\nE✝ : C.pt ≅ D.pt := IsLimit.conePointUniqueUpToIso hC (limitConeInfiIsLimit F)\nhE : Inducing ↑E✝.hom\nU0 : Set ↑D.pt\nU : (i : J) → Set ↑(F.obj i)\nG : Finset J\nh1 : ∀ (i : J), i ∈ G → U i ∈ T i\nh2 : U0 = ⋂ (i : J) (_ : i ∈ G), (fun x => ↑(NatTrans.app D.π i) x) ⁻¹' U i\nj : J\nhj : ∀ {X : J}, X ∈ G → Nonempty (j ⟶ X)\ng : (e : J) → e ∈ G → (j ⟶ e) := fun x he => Nonempty.some (_ : Nonempty (j ⟶ x))\nVs : J → Set ↑(F.obj j) := fun e => if h : e ∈ G then ↑(F.map (g e h)) ⁻¹' U e else Set.univ\nV : Set ↑(F.obj j) := ⋂ (e : J) (_ : e ∈ G), Vs e\nS : Set (Set ↑(F.obj j))\na : J\nE : Finset J\n_ha : ¬a ∈ E\nhh1 :\n  ∀ (P : J → Set ↑(F.obj j)),\n    Set.univ ∈ S →\n      (∀ (A B : Set ↑(F.obj j)), A ∈ S → B ∈ S → A ∩ B ∈ S) →\n        (∀ (e : J), e ∈ E → P e ∈ S) → ⋂ (e : J) (_ : e ∈ E), P e ∈ S\nhh2 : J → Set ↑(F.obj j)\nhh3 : Set.univ ∈ S\nhh4 : ∀ (A B : Set ↑(F.obj j)), A ∈ S → B ∈ S → A ∩ B ∈ S\nhh5 : ∀ (e : J), e ∈ insert a E → hh2 e ∈ S\n⊢ hh2 a ∩ ⋂ (x : J) (_ : x ∈ E), hh2 x ∈ S\n[PROOFSTEP]\nrefine' hh4 _ _ (hh5 _ (Finset.mem_insert_self _ _)) (hh1 _ hh3 hh4 _)\n[GOAL]\ncase insert\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : IsCofiltered J\nF : J ⥤ TopCatMax\nC : Cone F\nhC : IsLimit C\nT : (j : J) → Set (Set ↑(F.obj j))\nhT : ∀ (j : J), IsTopologicalBasis (T j)\nuniv : ∀ (i : J), Set.univ ∈ T i\ninter : ∀ (i : J) (U1 U2 : Set ↑(F.obj i)), U1 ∈ T i → U2 ∈ T i → U1 ∩ U2 ∈ T i\ncompat : ∀ (i j : J) (f : i ⟶ j) (V : Set ↑(F.obj j)), V ∈ T j → ↑(F.map f) ⁻¹' V ∈ T i\nD : Cone F := limitConeInfi F\nE✝ : C.pt ≅ D.pt := IsLimit.conePointUniqueUpToIso hC (limitConeInfiIsLimit F)\nhE : Inducing ↑E✝.hom\nU0 : Set ↑D.pt\nU : (i : J) → Set ↑(F.obj i)\nG : Finset J\nh1 : ∀ (i : J), i ∈ G → U i ∈ T i\nh2 : U0 = ⋂ (i : J) (_ : i ∈ G), (fun x => ↑(NatTrans.app D.π i) x) ⁻¹' U i\nj : J\nhj : ∀ {X : J}, X ∈ G → Nonempty (j ⟶ X)\ng : (e : J) → e ∈ G → (j ⟶ e) := fun x he => Nonempty.some (_ : Nonempty (j ⟶ x))\nVs : J → Set ↑(F.obj j) := fun e => if h : e ∈ G then ↑(F.map (g e h)) ⁻¹' U e else Set.univ\nV : Set ↑(F.obj j) := ⋂ (e : J) (_ : e ∈ G), Vs e\nS : Set (Set ↑(F.obj j))\na : J\nE : Finset J\n_ha : ¬a ∈ E\nhh1 :\n  ∀ (P : J → Set ↑(F.obj j)),\n    Set.univ ∈ S →\n      (∀ (A B : Set ↑(F.obj j)), A ∈ S → B ∈ S → A ∩ B ∈ S) →\n        (∀ (e : J), e ∈ E → P e ∈ S) → ⋂ (e : J) (_ : e ∈ E), P e ∈ S\nhh2 : J → Set ↑(F.obj j)\nhh3 : Set.univ ∈ S\nhh4 : ∀ (A B : Set ↑(F.obj j)), A ∈ S → B ∈ S → A ∩ B ∈ S\nhh5 : ∀ (e : J), e ∈ insert a E → hh2 e ∈ S\n⊢ ∀ (e : J), e ∈ E → hh2 e ∈ S\n[PROOFSTEP]\nintro e he\n[GOAL]\ncase insert\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : IsCofiltered J\nF : J ⥤ TopCatMax\nC : Cone F\nhC : IsLimit C\nT : (j : J) → Set (Set ↑(F.obj j))\nhT : ∀ (j : J), IsTopologicalBasis (T j)\nuniv : ∀ (i : J), Set.univ ∈ T i\ninter : ∀ (i : J) (U1 U2 : Set ↑(F.obj i)), U1 ∈ T i → U2 ∈ T i → U1 ∩ U2 ∈ T i\ncompat : ∀ (i j : J) (f : i ⟶ j) (V : Set ↑(F.obj j)), V ∈ T j → ↑(F.map f) ⁻¹' V ∈ T i\nD : Cone F := limitConeInfi F\nE✝ : C.pt ≅ D.pt := IsLimit.conePointUniqueUpToIso hC (limitConeInfiIsLimit F)\nhE : Inducing ↑E✝.hom\nU0 : Set ↑D.pt\nU : (i : J) → Set ↑(F.obj i)\nG : Finset J\nh1 : ∀ (i : J), i ∈ G → U i ∈ T i\nh2 : U0 = ⋂ (i : J) (_ : i ∈ G), (fun x => ↑(NatTrans.app D.π i) x) ⁻¹' U i\nj : J\nhj : ∀ {X : J}, X ∈ G → Nonempty (j ⟶ X)\ng : (e : J) → e ∈ G → (j ⟶ e) := fun x he => Nonempty.some (_ : Nonempty (j ⟶ x))\nVs : J → Set ↑(F.obj j) := fun e => if h : e ∈ G then ↑(F.map (g e h)) ⁻¹' U e else Set.univ\nV : Set ↑(F.obj j) := ⋂ (e : J) (_ : e ∈ G), Vs e\nS : Set (Set ↑(F.obj j))\na : J\nE : Finset J\n_ha : ¬a ∈ E\nhh1 :\n  ∀ (P : J → Set ↑(F.obj j)),\n    Set.univ ∈ S →\n      (∀ (A B : Set ↑(F.obj j)), A ∈ S → B ∈ S → A ∩ B ∈ S) →\n        (∀ (e : J), e ∈ E → P e ∈ S) → ⋂ (e : J) (_ : e ∈ E), P e ∈ S\nhh2 : J → Set ↑(F.obj j)\nhh3 : Set.univ ∈ S\nhh4 : ∀ (A B : Set ↑(F.obj j)), A ∈ S → B ∈ S → A ∩ B ∈ S\nhh5 : ∀ (e : J), e ∈ insert a E → hh2 e ∈ S\ne : J\nhe : e ∈ E\n⊢ hh2 e ∈ S\n[PROOFSTEP]\nexact\n  hh5 e\n    (Finset.mem_insert_of_mem he)\n      -- use the intermediate claim to finish off the goal using `univ` and `inter`.\n[GOAL]\ncase h.e'_3.h.mpr.intro.intro.intro.intro.refine'_1\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : IsCofiltered J\nF : J ⥤ TopCatMax\nC : Cone F\nhC : IsLimit C\nT : (j : J) → Set (Set ↑(F.obj j))\nhT : ∀ (j : J), IsTopologicalBasis (T j)\nuniv : ∀ (i : J), Set.univ ∈ T i\ninter : ∀ (i : J) (U1 U2 : Set ↑(F.obj i)), U1 ∈ T i → U2 ∈ T i → U1 ∩ U2 ∈ T i\ncompat : ∀ (i j : J) (f : i ⟶ j) (V : Set ↑(F.obj j)), V ∈ T j → ↑(F.map f) ⁻¹' V ∈ T i\nD : Cone F := limitConeInfi F\nE : C.pt ≅ D.pt := IsLimit.conePointUniqueUpToIso hC (limitConeInfiIsLimit F)\nhE : Inducing ↑E.hom\nU0 : Set ↑D.pt\nU : (i : J) → Set ↑(F.obj i)\nG : Finset J\nh1 : ∀ (i : J), i ∈ G → U i ∈ T i\nh2 : U0 = ⋂ (i : J) (_ : i ∈ G), (fun x => ↑(NatTrans.app D.π i) x) ⁻¹' U i\nj : J\nhj : ∀ {X : J}, X ∈ G → Nonempty (j ⟶ X)\ng : (e : J) → e ∈ G → (j ⟶ e) := fun x he => Nonempty.some (_ : Nonempty (j ⟶ x))\nVs : J → Set ↑(F.obj j) := fun e => if h : e ∈ G then ↑(F.map (g e h)) ⁻¹' U e else Set.univ\nV : Set ↑(F.obj j) := ⋂ (e : J) (_ : e ∈ G), Vs e\nthis :\n  ∀ (S : Set (Set ↑(F.obj j))) (E : Finset J) (P : J → Set ↑(F.obj j)),\n    Set.univ ∈ S →\n      (∀ (A B : Set ↑(F.obj j)), A ∈ S → B ∈ S → A ∩ B ∈ S) →\n        (∀ (e : J), e ∈ E → P e ∈ S) → ⋂ (e : J) (_ : e ∈ E), P e ∈ S\n⊢ V ∈ T j\n[PROOFSTEP]\nrefine' this _ _ _ (univ _) (inter _) _\n[GOAL]\ncase h.e'_3.h.mpr.intro.intro.intro.intro.refine'_1\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : IsCofiltered J\nF : J ⥤ TopCatMax\nC : Cone F\nhC : IsLimit C\nT : (j : J) → Set (Set ↑(F.obj j))\nhT : ∀ (j : J), IsTopologicalBasis (T j)\nuniv : ∀ (i : J), Set.univ ∈ T i\ninter : ∀ (i : J) (U1 U2 : Set ↑(F.obj i)), U1 ∈ T i → U2 ∈ T i → U1 ∩ U2 ∈ T i\ncompat : ∀ (i j : J) (f : i ⟶ j) (V : Set ↑(F.obj j)), V ∈ T j → ↑(F.map f) ⁻¹' V ∈ T i\nD : Cone F := limitConeInfi F\nE : C.pt ≅ D.pt := IsLimit.conePointUniqueUpToIso hC (limitConeInfiIsLimit F)\nhE : Inducing ↑E.hom\nU0 : Set ↑D.pt\nU : (i : J) → Set ↑(F.obj i)\nG : Finset J\nh1 : ∀ (i : J), i ∈ G → U i ∈ T i\nh2 : U0 = ⋂ (i : J) (_ : i ∈ G), (fun x => ↑(NatTrans.app D.π i) x) ⁻¹' U i\nj : J\nhj : ∀ {X : J}, X ∈ G → Nonempty (j ⟶ X)\ng : (e : J) → e ∈ G → (j ⟶ e) := fun x he => Nonempty.some (_ : Nonempty (j ⟶ x))\nVs : J → Set ↑(F.obj j) := fun e => if h : e ∈ G then ↑(F.map (g e h)) ⁻¹' U e else Set.univ\nV : Set ↑(F.obj j) := ⋂ (e : J) (_ : e ∈ G), Vs e\nthis :\n  ∀ (S : Set (Set ↑(F.obj j))) (E : Finset J) (P : J → Set ↑(F.obj j)),\n    Set.univ ∈ S →\n      (∀ (A B : Set ↑(F.obj j)), A ∈ S → B ∈ S → A ∩ B ∈ S) →\n        (∀ (e : J), e ∈ E → P e ∈ S) → ⋂ (e : J) (_ : e ∈ E), P e ∈ S\n⊢ ∀ (e : J), e ∈ G → Vs e ∈ T j\n[PROOFSTEP]\nintro e he\n[GOAL]\ncase h.e'_3.h.mpr.intro.intro.intro.intro.refine'_1\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : IsCofiltered J\nF : J ⥤ TopCatMax\nC : Cone F\nhC : IsLimit C\nT : (j : J) → Set (Set ↑(F.obj j))\nhT : ∀ (j : J), IsTopologicalBasis (T j)\nuniv : ∀ (i : J), Set.univ ∈ T i\ninter : ∀ (i : J) (U1 U2 : Set ↑(F.obj i)), U1 ∈ T i → U2 ∈ T i → U1 ∩ U2 ∈ T i\ncompat : ∀ (i j : J) (f : i ⟶ j) (V : Set ↑(F.obj j)), V ∈ T j → ↑(F.map f) ⁻¹' V ∈ T i\nD : Cone F := limitConeInfi F\nE : C.pt ≅ D.pt := IsLimit.conePointUniqueUpToIso hC (limitConeInfiIsLimit F)\nhE : Inducing ↑E.hom\nU0 : Set ↑D.pt\nU : (i : J) → Set ↑(F.obj i)\nG : Finset J\nh1 : ∀ (i : J), i ∈ G → U i ∈ T i\nh2 : U0 = ⋂ (i : J) (_ : i ∈ G), (fun x => ↑(NatTrans.app D.π i) x) ⁻¹' U i\nj : J\nhj : ∀ {X : J}, X ∈ G → Nonempty (j ⟶ X)\ng : (e : J) → e ∈ G → (j ⟶ e) := fun x he => Nonempty.some (_ : Nonempty (j ⟶ x))\nVs : J → Set ↑(F.obj j) := fun e => if h : e ∈ G then ↑(F.map (g e h)) ⁻¹' U e else Set.univ\nV : Set ↑(F.obj j) := ⋂ (e : J) (_ : e ∈ G), Vs e\nthis :\n  ∀ (S : Set (Set ↑(F.obj j))) (E : Finset J) (P : J → Set ↑(F.obj j)),\n    Set.univ ∈ S →\n      (∀ (A B : Set ↑(F.obj j)), A ∈ S → B ∈ S → A ∩ B ∈ S) →\n        (∀ (e : J), e ∈ E → P e ∈ S) → ⋂ (e : J) (_ : e ∈ E), P e ∈ S\ne : J\nhe : e ∈ G\n⊢ Vs e ∈ T j\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h.e'_3.h.mpr.intro.intro.intro.intro.refine'_1\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : IsCofiltered J\nF : J ⥤ TopCatMax\nC : Cone F\nhC : IsLimit C\nT : (j : J) → Set (Set ↑(F.obj j))\nhT : ∀ (j : J), IsTopologicalBasis (T j)\nuniv : ∀ (i : J), Set.univ ∈ T i\ninter : ∀ (i : J) (U1 U2 : Set ↑(F.obj i)), U1 ∈ T i → U2 ∈ T i → U1 ∩ U2 ∈ T i\ncompat : ∀ (i j : J) (f : i ⟶ j) (V : Set ↑(F.obj j)), V ∈ T j → ↑(F.map f) ⁻¹' V ∈ T i\nD : Cone F := limitConeInfi F\nE : C.pt ≅ D.pt := IsLimit.conePointUniqueUpToIso hC (limitConeInfiIsLimit F)\nhE : Inducing ↑E.hom\nU0 : Set ↑D.pt\nU : (i : J) → Set ↑(F.obj i)\nG : Finset J\nh1 : ∀ (i : J), i ∈ G → U i ∈ T i\nh2 : U0 = ⋂ (i : J) (_ : i ∈ G), (fun x => ↑(NatTrans.app D.π i) x) ⁻¹' U i\nj : J\nhj : ∀ {X : J}, X ∈ G → Nonempty (j ⟶ X)\ng : (e : J) → e ∈ G → (j ⟶ e) := fun x he => Nonempty.some (_ : Nonempty (j ⟶ x))\nVs : J → Set ↑(F.obj j) := fun e => if h : e ∈ G then ↑(F.map (g e h)) ⁻¹' U e else Set.univ\nV : Set ↑(F.obj j) := ⋂ (e : J) (_ : e ∈ G), Vs e\nthis :\n  ∀ (S : Set (Set ↑(F.obj j))) (E : Finset J) (P : J → Set ↑(F.obj j)),\n    Set.univ ∈ S →\n      (∀ (A B : Set ↑(F.obj j)), A ∈ S → B ∈ S → A ∩ B ∈ S) →\n        (∀ (e : J), e ∈ E → P e ∈ S) → ⋂ (e : J) (_ : e ∈ E), P e ∈ S\ne : J\nhe : e ∈ G\n⊢ (if h : e ∈ G then ↑(F.map (Nonempty.some (_ : Nonempty (j ⟶ e)))) ⁻¹' U e else Set.univ) ∈ T j\n[PROOFSTEP]\nrw [dif_pos he]\n[GOAL]\ncase h.e'_3.h.mpr.intro.intro.intro.intro.refine'_1\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : IsCofiltered J\nF : J ⥤ TopCatMax\nC : Cone F\nhC : IsLimit C\nT : (j : J) → Set (Set ↑(F.obj j))\nhT : ∀ (j : J), IsTopologicalBasis (T j)\nuniv : ∀ (i : J), Set.univ ∈ T i\ninter : ∀ (i : J) (U1 U2 : Set ↑(F.obj i)), U1 ∈ T i → U2 ∈ T i → U1 ∩ U2 ∈ T i\ncompat : ∀ (i j : J) (f : i ⟶ j) (V : Set ↑(F.obj j)), V ∈ T j → ↑(F.map f) ⁻¹' V ∈ T i\nD : Cone F := limitConeInfi F\nE : C.pt ≅ D.pt := IsLimit.conePointUniqueUpToIso hC (limitConeInfiIsLimit F)\nhE : Inducing ↑E.hom\nU0 : Set ↑D.pt\nU : (i : J) → Set ↑(F.obj i)\nG : Finset J\nh1 : ∀ (i : J), i ∈ G → U i ∈ T i\nh2 : U0 = ⋂ (i : J) (_ : i ∈ G), (fun x => ↑(NatTrans.app D.π i) x) ⁻¹' U i\nj : J\nhj : ∀ {X : J}, X ∈ G → Nonempty (j ⟶ X)\ng : (e : J) → e ∈ G → (j ⟶ e) := fun x he => Nonempty.some (_ : Nonempty (j ⟶ x))\nVs : J → Set ↑(F.obj j) := fun e => if h : e ∈ G then ↑(F.map (g e h)) ⁻¹' U e else Set.univ\nV : Set ↑(F.obj j) := ⋂ (e : J) (_ : e ∈ G), Vs e\nthis :\n  ∀ (S : Set (Set ↑(F.obj j))) (E : Finset J) (P : J → Set ↑(F.obj j)),\n    Set.univ ∈ S →\n      (∀ (A B : Set ↑(F.obj j)), A ∈ S → B ∈ S → A ∩ B ∈ S) →\n        (∀ (e : J), e ∈ E → P e ∈ S) → ⋂ (e : J) (_ : e ∈ E), P e ∈ S\ne : J\nhe : e ∈ G\n⊢ ↑(F.map (Nonempty.some (_ : Nonempty (j ⟶ e)))) ⁻¹' U e ∈ T j\n[PROOFSTEP]\nexact compat j e (g e he) (U e) (h1 e he)\n[GOAL]\ncase h.e'_3.h.mpr.intro.intro.intro.intro.refine'_2\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : IsCofiltered J\nF : J ⥤ TopCatMax\nC : Cone F\nhC : IsLimit C\nT : (j : J) → Set (Set ↑(F.obj j))\nhT : ∀ (j : J), IsTopologicalBasis (T j)\nuniv : ∀ (i : J), Set.univ ∈ T i\ninter : ∀ (i : J) (U1 U2 : Set ↑(F.obj i)), U1 ∈ T i → U2 ∈ T i → U1 ∩ U2 ∈ T i\ncompat : ∀ (i j : J) (f : i ⟶ j) (V : Set ↑(F.obj j)), V ∈ T j → ↑(F.map f) ⁻¹' V ∈ T i\nD : Cone F := limitConeInfi F\nE : C.pt ≅ D.pt := IsLimit.conePointUniqueUpToIso hC (limitConeInfiIsLimit F)\nhE : Inducing ↑E.hom\nU0 : Set ↑D.pt\nU : (i : J) → Set ↑(F.obj i)\nG : Finset J\nh1 : ∀ (i : J), i ∈ G → U i ∈ T i\nh2 : U0 = ⋂ (i : J) (_ : i ∈ G), (fun x => ↑(NatTrans.app D.π i) x) ⁻¹' U i\nj : J\nhj : ∀ {X : J}, X ∈ G → Nonempty (j ⟶ X)\ng : (e : J) → e ∈ G → (j ⟶ e) := fun x he => Nonempty.some (_ : Nonempty (j ⟶ x))\nVs : J → Set ↑(F.obj j) := fun e => if h : e ∈ G then ↑(F.map (g e h)) ⁻¹' U e else Set.univ\nV : Set ↑(F.obj j) := ⋂ (e : J) (_ : e ∈ G), Vs e\n⊢ U0 = ↑(NatTrans.app D.π j) ⁻¹' V\n[PROOFSTEP]\nrw [h2]\n[GOAL]\ncase h.e'_3.h.mpr.intro.intro.intro.intro.refine'_2\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : IsCofiltered J\nF : J ⥤ TopCatMax\nC : Cone F\nhC : IsLimit C\nT : (j : J) → Set (Set ↑(F.obj j))\nhT : ∀ (j : J), IsTopologicalBasis (T j)\nuniv : ∀ (i : J), Set.univ ∈ T i\ninter : ∀ (i : J) (U1 U2 : Set ↑(F.obj i)), U1 ∈ T i → U2 ∈ T i → U1 ∩ U2 ∈ T i\ncompat : ∀ (i j : J) (f : i ⟶ j) (V : Set ↑(F.obj j)), V ∈ T j → ↑(F.map f) ⁻¹' V ∈ T i\nD : Cone F := limitConeInfi F\nE : C.pt ≅ D.pt := IsLimit.conePointUniqueUpToIso hC (limitConeInfiIsLimit F)\nhE : Inducing ↑E.hom\nU0 : Set ↑D.pt\nU : (i : J) → Set ↑(F.obj i)\nG : Finset J\nh1 : ∀ (i : J), i ∈ G → U i ∈ T i\nh2 : U0 = ⋂ (i : J) (_ : i ∈ G), (fun x => ↑(NatTrans.app D.π i) x) ⁻¹' U i\nj : J\nhj : ∀ {X : J}, X ∈ G → Nonempty (j ⟶ X)\ng : (e : J) → e ∈ G → (j ⟶ e) := fun x he => Nonempty.some (_ : Nonempty (j ⟶ x))\nVs : J → Set ↑(F.obj j) := fun e => if h : e ∈ G then ↑(F.map (g e h)) ⁻¹' U e else Set.univ\nV : Set ↑(F.obj j) := ⋂ (e : J) (_ : e ∈ G), Vs e\n⊢ ⋂ (i : J) (_ : i ∈ G), (fun x => ↑(NatTrans.app D.π i) x) ⁻¹' U i = ↑(NatTrans.app D.π j) ⁻¹' V\n[PROOFSTEP]\nchange _ = (D.π.app j) ⁻¹' ⋂ (e : J) (_ : e ∈ G), Vs e\n[GOAL]\ncase h.e'_3.h.mpr.intro.intro.intro.intro.refine'_2\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : IsCofiltered J\nF : J ⥤ TopCatMax\nC : Cone F\nhC : IsLimit C\nT : (j : J) → Set (Set ↑(F.obj j))\nhT : ∀ (j : J), IsTopologicalBasis (T j)\nuniv : ∀ (i : J), Set.univ ∈ T i\ninter : ∀ (i : J) (U1 U2 : Set ↑(F.obj i)), U1 ∈ T i → U2 ∈ T i → U1 ∩ U2 ∈ T i\ncompat : ∀ (i j : J) (f : i ⟶ j) (V : Set ↑(F.obj j)), V ∈ T j → ↑(F.map f) ⁻¹' V ∈ T i\nD : Cone F := limitConeInfi F\nE : C.pt ≅ D.pt := IsLimit.conePointUniqueUpToIso hC (limitConeInfiIsLimit F)\nhE : Inducing ↑E.hom\nU0 : Set ↑D.pt\nU : (i : J) → Set ↑(F.obj i)\nG : Finset J\nh1 : ∀ (i : J), i ∈ G → U i ∈ T i\nh2 : U0 = ⋂ (i : J) (_ : i ∈ G), (fun x => ↑(NatTrans.app D.π i) x) ⁻¹' U i\nj : J\nhj : ∀ {X : J}, X ∈ G → Nonempty (j ⟶ X)\ng : (e : J) → e ∈ G → (j ⟶ e) := fun x he => Nonempty.some (_ : Nonempty (j ⟶ x))\nVs : J → Set ↑(F.obj j) := fun e => if h : e ∈ G then ↑(F.map (g e h)) ⁻¹' U e else Set.univ\nV : Set ↑(F.obj j) := ⋂ (e : J) (_ : e ∈ G), Vs e\n⊢ ⋂ (i : J) (_ : i ∈ G), (fun x => ↑(NatTrans.app D.π i) x) ⁻¹' U i =\n    ↑(NatTrans.app D.π j) ⁻¹' ⋂ (e : J) (_ : e ∈ G), Vs e\n[PROOFSTEP]\nrw [Set.preimage_iInter]\n[GOAL]\ncase h.e'_3.h.mpr.intro.intro.intro.intro.refine'_2\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : IsCofiltered J\nF : J ⥤ TopCatMax\nC : Cone F\nhC : IsLimit C\nT : (j : J) → Set (Set ↑(F.obj j))\nhT : ∀ (j : J), IsTopologicalBasis (T j)\nuniv : ∀ (i : J), Set.univ ∈ T i\ninter : ∀ (i : J) (U1 U2 : Set ↑(F.obj i)), U1 ∈ T i → U2 ∈ T i → U1 ∩ U2 ∈ T i\ncompat : ∀ (i j : J) (f : i ⟶ j) (V : Set ↑(F.obj j)), V ∈ T j → ↑(F.map f) ⁻¹' V ∈ T i\nD : Cone F := limitConeInfi F\nE : C.pt ≅ D.pt := IsLimit.conePointUniqueUpToIso hC (limitConeInfiIsLimit F)\nhE : Inducing ↑E.hom\nU0 : Set ↑D.pt\nU : (i : J) → Set ↑(F.obj i)\nG : Finset J\nh1 : ∀ (i : J), i ∈ G → U i ∈ T i\nh2 : U0 = ⋂ (i : J) (_ : i ∈ G), (fun x => ↑(NatTrans.app D.π i) x) ⁻¹' U i\nj : J\nhj : ∀ {X : J}, X ∈ G → Nonempty (j ⟶ X)\ng : (e : J) → e ∈ G → (j ⟶ e) := fun x he => Nonempty.some (_ : Nonempty (j ⟶ x))\nVs : J → Set ↑(F.obj j) := fun e => if h : e ∈ G then ↑(F.map (g e h)) ⁻¹' U e else Set.univ\nV : Set ↑(F.obj j) := ⋂ (e : J) (_ : e ∈ G), Vs e\n⊢ ⋂ (i : J) (_ : i ∈ G), (fun x => ↑(NatTrans.app D.π i) x) ⁻¹' U i =\n    ⋂ (i : J), ↑(NatTrans.app D.π j) ⁻¹' ⋂ (_ : i ∈ G), Vs i\n[PROOFSTEP]\napply congrArg\n[GOAL]\ncase h.e'_3.h.mpr.intro.intro.intro.intro.refine'_2.h\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : IsCofiltered J\nF : J ⥤ TopCatMax\nC : Cone F\nhC : IsLimit C\nT : (j : J) → Set (Set ↑(F.obj j))\nhT : ∀ (j : J), IsTopologicalBasis (T j)\nuniv : ∀ (i : J), Set.univ ∈ T i\ninter : ∀ (i : J) (U1 U2 : Set ↑(F.obj i)), U1 ∈ T i → U2 ∈ T i → U1 ∩ U2 ∈ T i\ncompat : ∀ (i j : J) (f : i ⟶ j) (V : Set ↑(F.obj j)), V ∈ T j → ↑(F.map f) ⁻¹' V ∈ T i\nD : Cone F := limitConeInfi F\nE : C.pt ≅ D.pt := IsLimit.conePointUniqueUpToIso hC (limitConeInfiIsLimit F)\nhE : Inducing ↑E.hom\nU0 : Set ↑D.pt\nU : (i : J) → Set ↑(F.obj i)\nG : Finset J\nh1 : ∀ (i : J), i ∈ G → U i ∈ T i\nh2 : U0 = ⋂ (i : J) (_ : i ∈ G), (fun x => ↑(NatTrans.app D.π i) x) ⁻¹' U i\nj : J\nhj : ∀ {X : J}, X ∈ G → Nonempty (j ⟶ X)\ng : (e : J) → e ∈ G → (j ⟶ e) := fun x he => Nonempty.some (_ : Nonempty (j ⟶ x))\nVs : J → Set ↑(F.obj j) := fun e => if h : e ∈ G then ↑(F.map (g e h)) ⁻¹' U e else Set.univ\nV : Set ↑(F.obj j) := ⋂ (e : J) (_ : e ∈ G), Vs e\n⊢ (fun i => ⋂ (_ : i ∈ G), (fun x => ↑(NatTrans.app D.π i) x) ⁻¹' U i) = fun i =>\n    ↑(NatTrans.app D.π j) ⁻¹' ⋂ (_ : i ∈ G), Vs i\n[PROOFSTEP]\next1 e\n[GOAL]\ncase h.e'_3.h.mpr.intro.intro.intro.intro.refine'_2.h.h\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : IsCofiltered J\nF : J ⥤ TopCatMax\nC : Cone F\nhC : IsLimit C\nT : (j : J) → Set (Set ↑(F.obj j))\nhT : ∀ (j : J), IsTopologicalBasis (T j)\nuniv : ∀ (i : J), Set.univ ∈ T i\ninter : ∀ (i : J) (U1 U2 : Set ↑(F.obj i)), U1 ∈ T i → U2 ∈ T i → U1 ∩ U2 ∈ T i\ncompat : ∀ (i j : J) (f : i ⟶ j) (V : Set ↑(F.obj j)), V ∈ T j → ↑(F.map f) ⁻¹' V ∈ T i\nD : Cone F := limitConeInfi F\nE : C.pt ≅ D.pt := IsLimit.conePointUniqueUpToIso hC (limitConeInfiIsLimit F)\nhE : Inducing ↑E.hom\nU0 : Set ↑D.pt\nU : (i : J) → Set ↑(F.obj i)\nG : Finset J\nh1 : ∀ (i : J), i ∈ G → U i ∈ T i\nh2 : U0 = ⋂ (i : J) (_ : i ∈ G), (fun x => ↑(NatTrans.app D.π i) x) ⁻¹' U i\nj : J\nhj : ∀ {X : J}, X ∈ G → Nonempty (j ⟶ X)\ng : (e : J) → e ∈ G → (j ⟶ e) := fun x he => Nonempty.some (_ : Nonempty (j ⟶ x))\nVs : J → Set ↑(F.obj j) := fun e => if h : e ∈ G then ↑(F.map (g e h)) ⁻¹' U e else Set.univ\nV : Set ↑(F.obj j) := ⋂ (e : J) (_ : e ∈ G), Vs e\ne : J\n⊢ ⋂ (_ : e ∈ G), (fun x => ↑(NatTrans.app D.π e) x) ⁻¹' U e = ↑(NatTrans.app D.π j) ⁻¹' ⋂ (_ : e ∈ G), Vs e\n[PROOFSTEP]\nerw [Set.preimage_iInter]\n[GOAL]\ncase h.e'_3.h.mpr.intro.intro.intro.intro.refine'_2.h.h\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : IsCofiltered J\nF : J ⥤ TopCatMax\nC : Cone F\nhC : IsLimit C\nT : (j : J) → Set (Set ↑(F.obj j))\nhT : ∀ (j : J), IsTopologicalBasis (T j)\nuniv : ∀ (i : J), Set.univ ∈ T i\ninter : ∀ (i : J) (U1 U2 : Set ↑(F.obj i)), U1 ∈ T i → U2 ∈ T i → U1 ∩ U2 ∈ T i\ncompat : ∀ (i j : J) (f : i ⟶ j) (V : Set ↑(F.obj j)), V ∈ T j → ↑(F.map f) ⁻¹' V ∈ T i\nD : Cone F := limitConeInfi F\nE : C.pt ≅ D.pt := IsLimit.conePointUniqueUpToIso hC (limitConeInfiIsLimit F)\nhE : Inducing ↑E.hom\nU0 : Set ↑D.pt\nU : (i : J) → Set ↑(F.obj i)\nG : Finset J\nh1 : ∀ (i : J), i ∈ G → U i ∈ T i\nh2 : U0 = ⋂ (i : J) (_ : i ∈ G), (fun x => ↑(NatTrans.app D.π i) x) ⁻¹' U i\nj : J\nhj : ∀ {X : J}, X ∈ G → Nonempty (j ⟶ X)\ng : (e : J) → e ∈ G → (j ⟶ e) := fun x he => Nonempty.some (_ : Nonempty (j ⟶ x))\nVs : J → Set ↑(F.obj j) := fun e => if h : e ∈ G then ↑(F.map (g e h)) ⁻¹' U e else Set.univ\nV : Set ↑(F.obj j) := ⋂ (e : J) (_ : e ∈ G), Vs e\ne : J\n⊢ ⋂ (_ : e ∈ G), (fun x => ↑(NatTrans.app D.π e) x) ⁻¹' U e = ⋂ (_ : e ∈ G), ↑(NatTrans.app D.π j) ⁻¹' Vs e\n[PROOFSTEP]\napply congrArg\n[GOAL]\ncase h.e'_3.h.mpr.intro.intro.intro.intro.refine'_2.h.h.h\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : IsCofiltered J\nF : J ⥤ TopCatMax\nC : Cone F\nhC : IsLimit C\nT : (j : J) → Set (Set ↑(F.obj j))\nhT : ∀ (j : J), IsTopologicalBasis (T j)\nuniv : ∀ (i : J), Set.univ ∈ T i\ninter : ∀ (i : J) (U1 U2 : Set ↑(F.obj i)), U1 ∈ T i → U2 ∈ T i → U1 ∩ U2 ∈ T i\ncompat : ∀ (i j : J) (f : i ⟶ j) (V : Set ↑(F.obj j)), V ∈ T j → ↑(F.map f) ⁻¹' V ∈ T i\nD : Cone F := limitConeInfi F\nE : C.pt ≅ D.pt := IsLimit.conePointUniqueUpToIso hC (limitConeInfiIsLimit F)\nhE : Inducing ↑E.hom\nU0 : Set ↑D.pt\nU : (i : J) → Set ↑(F.obj i)\nG : Finset J\nh1 : ∀ (i : J), i ∈ G → U i ∈ T i\nh2 : U0 = ⋂ (i : J) (_ : i ∈ G), (fun x => ↑(NatTrans.app D.π i) x) ⁻¹' U i\nj : J\nhj : ∀ {X : J}, X ∈ G → Nonempty (j ⟶ X)\ng : (e : J) → e ∈ G → (j ⟶ e) := fun x he => Nonempty.some (_ : Nonempty (j ⟶ x))\nVs : J → Set ↑(F.obj j) := fun e => if h : e ∈ G then ↑(F.map (g e h)) ⁻¹' U e else Set.univ\nV : Set ↑(F.obj j) := ⋂ (e : J) (_ : e ∈ G), Vs e\ne : J\n⊢ (fun x => (fun x => ↑(NatTrans.app D.π e) x) ⁻¹' U e) = fun i => ↑(NatTrans.app D.π j) ⁻¹' Vs e\n[PROOFSTEP]\next1 he\n[GOAL]\ncase h.e'_3.h.mpr.intro.intro.intro.intro.refine'_2.h.h.h.h\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : IsCofiltered J\nF : J ⥤ TopCatMax\nC : Cone F\nhC : IsLimit C\nT : (j : J) → Set (Set ↑(F.obj j))\nhT : ∀ (j : J), IsTopologicalBasis (T j)\nuniv : ∀ (i : J), Set.univ ∈ T i\ninter : ∀ (i : J) (U1 U2 : Set ↑(F.obj i)), U1 ∈ T i → U2 ∈ T i → U1 ∩ U2 ∈ T i\ncompat : ∀ (i j : J) (f : i ⟶ j) (V : Set ↑(F.obj j)), V ∈ T j → ↑(F.map f) ⁻¹' V ∈ T i\nD : Cone F := limitConeInfi F\nE : C.pt ≅ D.pt := IsLimit.conePointUniqueUpToIso hC (limitConeInfiIsLimit F)\nhE : Inducing ↑E.hom\nU0 : Set ↑D.pt\nU : (i : J) → Set ↑(F.obj i)\nG : Finset J\nh1 : ∀ (i : J), i ∈ G → U i ∈ T i\nh2 : U0 = ⋂ (i : J) (_ : i ∈ G), (fun x => ↑(NatTrans.app D.π i) x) ⁻¹' U i\nj : J\nhj : ∀ {X : J}, X ∈ G → Nonempty (j ⟶ X)\ng : (e : J) → e ∈ G → (j ⟶ e) := fun x he => Nonempty.some (_ : Nonempty (j ⟶ x))\nVs : J → Set ↑(F.obj j) := fun e => if h : e ∈ G then ↑(F.map (g e h)) ⁻¹' U e else Set.univ\nV : Set ↑(F.obj j) := ⋂ (e : J) (_ : e ∈ G), Vs e\ne : J\nhe : e ∈ G\n⊢ (fun x => ↑(NatTrans.app D.π e) x) ⁻¹' U e = ↑(NatTrans.app D.π j) ⁻¹' Vs e\n[PROOFSTEP]\nchange (D.π.app e) ⁻¹' U e = (D.π.app j) ⁻¹' if h : e ∈ G then F.map (g e h) ⁻¹' U e else Set.univ\n[GOAL]\ncase h.e'_3.h.mpr.intro.intro.intro.intro.refine'_2.h.h.h.h\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : IsCofiltered J\nF : J ⥤ TopCatMax\nC : Cone F\nhC : IsLimit C\nT : (j : J) → Set (Set ↑(F.obj j))\nhT : ∀ (j : J), IsTopologicalBasis (T j)\nuniv : ∀ (i : J), Set.univ ∈ T i\ninter : ∀ (i : J) (U1 U2 : Set ↑(F.obj i)), U1 ∈ T i → U2 ∈ T i → U1 ∩ U2 ∈ T i\ncompat : ∀ (i j : J) (f : i ⟶ j) (V : Set ↑(F.obj j)), V ∈ T j → ↑(F.map f) ⁻¹' V ∈ T i\nD : Cone F := limitConeInfi F\nE : C.pt ≅ D.pt := IsLimit.conePointUniqueUpToIso hC (limitConeInfiIsLimit F)\nhE : Inducing ↑E.hom\nU0 : Set ↑D.pt\nU : (i : J) → Set ↑(F.obj i)\nG : Finset J\nh1 : ∀ (i : J), i ∈ G → U i ∈ T i\nh2 : U0 = ⋂ (i : J) (_ : i ∈ G), (fun x => ↑(NatTrans.app D.π i) x) ⁻¹' U i\nj : J\nhj : ∀ {X : J}, X ∈ G → Nonempty (j ⟶ X)\ng : (e : J) → e ∈ G → (j ⟶ e) := fun x he => Nonempty.some (_ : Nonempty (j ⟶ x))\nVs : J → Set ↑(F.obj j) := fun e => if h : e ∈ G then ↑(F.map (g e h)) ⁻¹' U e else Set.univ\nV : Set ↑(F.obj j) := ⋂ (e : J) (_ : e ∈ G), Vs e\ne : J\nhe : e ∈ G\n⊢ ↑(NatTrans.app D.π e) ⁻¹' U e = ↑(NatTrans.app D.π j) ⁻¹' if h : e ∈ G then ↑(F.map (g e h)) ⁻¹' U e else Set.univ\n[PROOFSTEP]\nrw [dif_pos he, ← Set.preimage_comp]\n[GOAL]\ncase h.e'_3.h.mpr.intro.intro.intro.intro.refine'_2.h.h.h.h\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : IsCofiltered J\nF : J ⥤ TopCatMax\nC : Cone F\nhC : IsLimit C\nT : (j : J) → Set (Set ↑(F.obj j))\nhT : ∀ (j : J), IsTopologicalBasis (T j)\nuniv : ∀ (i : J), Set.univ ∈ T i\ninter : ∀ (i : J) (U1 U2 : Set ↑(F.obj i)), U1 ∈ T i → U2 ∈ T i → U1 ∩ U2 ∈ T i\ncompat : ∀ (i j : J) (f : i ⟶ j) (V : Set ↑(F.obj j)), V ∈ T j → ↑(F.map f) ⁻¹' V ∈ T i\nD : Cone F := limitConeInfi F\nE : C.pt ≅ D.pt := IsLimit.conePointUniqueUpToIso hC (limitConeInfiIsLimit F)\nhE : Inducing ↑E.hom\nU0 : Set ↑D.pt\nU : (i : J) → Set ↑(F.obj i)\nG : Finset J\nh1 : ∀ (i : J), i ∈ G → U i ∈ T i\nh2 : U0 = ⋂ (i : J) (_ : i ∈ G), (fun x => ↑(NatTrans.app D.π i) x) ⁻¹' U i\nj : J\nhj : ∀ {X : J}, X ∈ G → Nonempty (j ⟶ X)\ng : (e : J) → e ∈ G → (j ⟶ e) := fun x he => Nonempty.some (_ : Nonempty (j ⟶ x))\nVs : J → Set ↑(F.obj j) := fun e => if h : e ∈ G then ↑(F.map (g e h)) ⁻¹' U e else Set.univ\nV : Set ↑(F.obj j) := ⋂ (e : J) (_ : e ∈ G), Vs e\ne : J\nhe : e ∈ G\n⊢ ↑(NatTrans.app D.π e) ⁻¹' U e = ↑(F.map (g e he)) ∘ ↑(NatTrans.app D.π j) ⁻¹' U e\n[PROOFSTEP]\napply congrFun\n[GOAL]\ncase h.e'_3.h.mpr.intro.intro.intro.intro.refine'_2.h.h.h.h.h\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : IsCofiltered J\nF : J ⥤ TopCatMax\nC : Cone F\nhC : IsLimit C\nT : (j : J) → Set (Set ↑(F.obj j))\nhT : ∀ (j : J), IsTopologicalBasis (T j)\nuniv : ∀ (i : J), Set.univ ∈ T i\ninter : ∀ (i : J) (U1 U2 : Set ↑(F.obj i)), U1 ∈ T i → U2 ∈ T i → U1 ∩ U2 ∈ T i\ncompat : ∀ (i j : J) (f : i ⟶ j) (V : Set ↑(F.obj j)), V ∈ T j → ↑(F.map f) ⁻¹' V ∈ T i\nD : Cone F := limitConeInfi F\nE : C.pt ≅ D.pt := IsLimit.conePointUniqueUpToIso hC (limitConeInfiIsLimit F)\nhE : Inducing ↑E.hom\nU0 : Set ↑D.pt\nU : (i : J) → Set ↑(F.obj i)\nG : Finset J\nh1 : ∀ (i : J), i ∈ G → U i ∈ T i\nh2 : U0 = ⋂ (i : J) (_ : i ∈ G), (fun x => ↑(NatTrans.app D.π i) x) ⁻¹' U i\nj : J\nhj : ∀ {X : J}, X ∈ G → Nonempty (j ⟶ X)\ng : (e : J) → e ∈ G → (j ⟶ e) := fun x he => Nonempty.some (_ : Nonempty (j ⟶ x))\nVs : J → Set ↑(F.obj j) := fun e => if h : e ∈ G then ↑(F.map (g e h)) ⁻¹' U e else Set.univ\nV : Set ↑(F.obj j) := ⋂ (e : J) (_ : e ∈ G), Vs e\ne : J\nhe : e ∈ G\n⊢ Set.preimage ↑(NatTrans.app D.π e) = Set.preimage (↑(F.map (g e he)) ∘ ↑(NatTrans.app D.π j))\n[PROOFSTEP]\napply congrArg\n[GOAL]\ncase h.e'_3.h.mpr.intro.intro.intro.intro.refine'_2.h.h.h.h.h.h\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : IsCofiltered J\nF : J ⥤ TopCatMax\nC : Cone F\nhC : IsLimit C\nT : (j : J) → Set (Set ↑(F.obj j))\nhT : ∀ (j : J), IsTopologicalBasis (T j)\nuniv : ∀ (i : J), Set.univ ∈ T i\ninter : ∀ (i : J) (U1 U2 : Set ↑(F.obj i)), U1 ∈ T i → U2 ∈ T i → U1 ∩ U2 ∈ T i\ncompat : ∀ (i j : J) (f : i ⟶ j) (V : Set ↑(F.obj j)), V ∈ T j → ↑(F.map f) ⁻¹' V ∈ T i\nD : Cone F := limitConeInfi F\nE : C.pt ≅ D.pt := IsLimit.conePointUniqueUpToIso hC (limitConeInfiIsLimit F)\nhE : Inducing ↑E.hom\nU0 : Set ↑D.pt\nU : (i : J) → Set ↑(F.obj i)\nG : Finset J\nh1 : ∀ (i : J), i ∈ G → U i ∈ T i\nh2 : U0 = ⋂ (i : J) (_ : i ∈ G), (fun x => ↑(NatTrans.app D.π i) x) ⁻¹' U i\nj : J\nhj : ∀ {X : J}, X ∈ G → Nonempty (j ⟶ X)\ng : (e : J) → e ∈ G → (j ⟶ e) := fun x he => Nonempty.some (_ : Nonempty (j ⟶ x))\nVs : J → Set ↑(F.obj j) := fun e => if h : e ∈ G then ↑(F.map (g e h)) ⁻¹' U e else Set.univ\nV : Set ↑(F.obj j) := ⋂ (e : J) (_ : e ∈ G), Vs e\ne : J\nhe : e ∈ G\n⊢ ↑(NatTrans.app D.π e) = ↑(F.map (g e he)) ∘ ↑(NatTrans.app D.π j)\n[PROOFSTEP]\nrw [← coe_comp, D.w]\n[GOAL]\ncase h.e'_3.h.mpr.intro.intro.intro.intro.refine'_2.h.h.h.h.h.h\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : IsCofiltered J\nF : J ⥤ TopCatMax\nC : Cone F\nhC : IsLimit C\nT : (j : J) → Set (Set ↑(F.obj j))\nhT : ∀ (j : J), IsTopologicalBasis (T j)\nuniv : ∀ (i : J), Set.univ ∈ T i\ninter : ∀ (i : J) (U1 U2 : Set ↑(F.obj i)), U1 ∈ T i → U2 ∈ T i → U1 ∩ U2 ∈ T i\ncompat : ∀ (i j : J) (f : i ⟶ j) (V : Set ↑(F.obj j)), V ∈ T j → ↑(F.map f) ⁻¹' V ∈ T i\nD : Cone F := limitConeInfi F\nE : C.pt ≅ D.pt := IsLimit.conePointUniqueUpToIso hC (limitConeInfiIsLimit F)\nhE : Inducing ↑E.hom\nU0 : Set ↑D.pt\nU : (i : J) → Set ↑(F.obj i)\nG : Finset J\nh1 : ∀ (i : J), i ∈ G → U i ∈ T i\nh2 : U0 = ⋂ (i : J) (_ : i ∈ G), (fun x => ↑(NatTrans.app D.π i) x) ⁻¹' U i\nj : J\nhj : ∀ {X : J}, X ∈ G → Nonempty (j ⟶ X)\ng : (e : J) → e ∈ G → (j ⟶ e) := fun x he => Nonempty.some (_ : Nonempty (j ⟶ x))\nVs : J → Set ↑(F.obj j) := fun e => if h : e ∈ G then ↑(F.map (g e h)) ⁻¹' U e else Set.univ\nV : Set ↑(F.obj j) := ⋂ (e : J) (_ : e ∈ G), Vs e\ne : J\nhe : e ∈ G\n⊢ ↑(NatTrans.app D.π e) = ↑(NatTrans.app D.π e)\n[PROOFSTEP]\nrfl\n", "meta": {"mathlib_filename": "Mathlib.Topology.Category.TopCat.Limits.Cofiltered", "llama_tokens": 39302, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8080672181749421, "lm_q2_score": 0.6370307944803831, "lm_q1q2_score": 0.5147637019875364}}
{"text": "[GOAL]\nR : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nQ : QuadraticForm R M\nl : List M\nf : M →ₗ[R] N →ₗ[R] N\nhf : ∀ (m : M) (x : N), ↑(↑f m) (↑(↑f m) x) = ↑Q m • x\nn : N\n⊢ ↑(↑(foldr Q f hf) n) (List.prod (List.map (↑(ι Q)) l)) = List.foldr (fun m n => ↑(↑f m) n) n l\n[PROOFSTEP]\ninduction' l with hd tl ih\n[GOAL]\ncase nil\nR : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nQ : QuadraticForm R M\nf : M →ₗ[R] N →ₗ[R] N\nhf : ∀ (m : M) (x : N), ↑(↑f m) (↑(↑f m) x) = ↑Q m • x\nn : N\n⊢ ↑(↑(foldr Q f hf) n) (List.prod (List.map ↑(ι Q) [])) = List.foldr (fun m n => ↑(↑f m) n) n []\n[PROOFSTEP]\nrw [List.map_nil, List.prod_nil, List.foldr_nil, foldr_one]\n[GOAL]\ncase cons\nR : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nQ : QuadraticForm R M\nf : M →ₗ[R] N →ₗ[R] N\nhf : ∀ (m : M) (x : N), ↑(↑f m) (↑(↑f m) x) = ↑Q m • x\nn : N\nhd : M\ntl : List M\nih : ↑(↑(foldr Q f hf) n) (List.prod (List.map (↑(ι Q)) tl)) = List.foldr (fun m n => ↑(↑f m) n) n tl\n⊢ ↑(↑(foldr Q f hf) n) (List.prod (List.map (↑(ι Q)) (hd :: tl))) = List.foldr (fun m n => ↑(↑f m) n) n (hd :: tl)\n[PROOFSTEP]\nrw [List.map_cons, List.prod_cons, List.foldr_cons, foldr_mul, foldr_ι, ih]\n[GOAL]\nR : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nQ : QuadraticForm R M\nf : M →ₗ[R] N →ₗ[R] N\nhf : ∀ (m : M) (x : N), ↑(↑f m) (↑(↑f m) x) = ↑Q m • x\nn : N\nm : M\n⊢ ↑(↑(foldl Q f hf) n) (↑(ι Q) m) = ↑(↑f m) n\n[PROOFSTEP]\nrw [← foldr_reverse, reverse_ι, foldr_ι]\n[GOAL]\nR : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nQ : QuadraticForm R M\nf : M →ₗ[R] N →ₗ[R] N\nhf : ∀ (m : M) (x : N), ↑(↑f m) (↑(↑f m) x) = ↑Q m • x\nn : N\nr : R\n⊢ ↑(↑(foldl Q f hf) n) (↑(algebraMap R (CliffordAlgebra Q)) r) = r • n\n[PROOFSTEP]\nrw [← foldr_reverse, reverse.commutes, foldr_algebraMap]\n[GOAL]\nR : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nQ : QuadraticForm R M\nf : M →ₗ[R] N →ₗ[R] N\nhf : ∀ (m : M) (x : N), ↑(↑f m) (↑(↑f m) x) = ↑Q m • x\nn : N\n⊢ ↑(↑(foldl Q f hf) n) 1 = n\n[PROOFSTEP]\nrw [← foldr_reverse, reverse.map_one, foldr_one]\n[GOAL]\nR : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nQ : QuadraticForm R M\nf : M →ₗ[R] N →ₗ[R] N\nhf : ∀ (m : M) (x : N), ↑(↑f m) (↑(↑f m) x) = ↑Q m • x\nn : N\na b : CliffordAlgebra Q\n⊢ ↑(↑(foldl Q f hf) n) (a * b) = ↑(↑(foldl Q f hf) (↑(↑(foldl Q f hf) n) a)) b\n[PROOFSTEP]\nrw [← foldr_reverse, ← foldr_reverse, ← foldr_reverse, reverse.map_mul, foldr_mul]\n[GOAL]\nR : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nQ : QuadraticForm R M\nl : List M\nf : M →ₗ[R] N →ₗ[R] N\nhf : ∀ (m : M) (x : N), ↑(↑f m) (↑(↑f m) x) = ↑Q m • x\nn : N\n⊢ ↑(↑(foldl Q f hf) n) (List.prod (List.map (↑(ι Q)) l)) = List.foldl (fun m n => ↑(↑f n) m) n l\n[PROOFSTEP]\nrw [← foldr_reverse, reverse_prod_map_ι, ← List.map_reverse, foldr_prod_map_ι, List.foldr_reverse]\n[GOAL]\nR : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nQ : QuadraticForm R M\nP : CliffordAlgebra Q → Prop\nhr : ∀ (r : R), P (↑(algebraMap R (CliffordAlgebra Q)) r)\nh_add : ∀ (x y : CliffordAlgebra Q), P x → P y → P (x + y)\nh_ι_mul : ∀ (m : M) (x : CliffordAlgebra Q), P x → P (x * ↑(ι Q) m)\n⊢ ∀ (x : CliffordAlgebra Q), P x\n[PROOFSTEP]\nintro x\n[GOAL]\nR : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nQ : QuadraticForm R M\nP : CliffordAlgebra Q → Prop\nhr : ∀ (r : R), P (↑(algebraMap R (CliffordAlgebra Q)) r)\nh_add : ∀ (x y : CliffordAlgebra Q), P x → P y → P (x + y)\nh_ι_mul : ∀ (m : M) (x : CliffordAlgebra Q), P x → P (x * ↑(ι Q) m)\nx : CliffordAlgebra Q\n⊢ P x\n[PROOFSTEP]\nhave : x ∈ ⊤ := Submodule.mem_top (R := R)\n[GOAL]\nR : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nQ : QuadraticForm R M\nP : CliffordAlgebra Q → Prop\nhr : ∀ (r : R), P (↑(algebraMap R (CliffordAlgebra Q)) r)\nh_add : ∀ (x y : CliffordAlgebra Q), P x → P y → P (x + y)\nh_ι_mul : ∀ (m : M) (x : CliffordAlgebra Q), P x → P (x * ↑(ι Q) m)\nx : CliffordAlgebra Q\nthis : x ∈ ⊤\n⊢ P x\n[PROOFSTEP]\nrw [← iSup_ι_range_eq_top] at this \n[GOAL]\nR : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nQ : QuadraticForm R M\nP : CliffordAlgebra Q → Prop\nhr : ∀ (r : R), P (↑(algebraMap R (CliffordAlgebra Q)) r)\nh_add : ∀ (x y : CliffordAlgebra Q), P x → P y → P (x + y)\nh_ι_mul : ∀ (m : M) (x : CliffordAlgebra Q), P x → P (x * ↑(ι Q) m)\nx : CliffordAlgebra Q\nthis : x ∈ ⨆ (i : ℕ), LinearMap.range (ι Q) ^ i\n⊢ P x\n[PROOFSTEP]\ninduction this using Submodule.iSup_induction' with\n  -- _ this (fun i x hx => ?_) _ h_add\n| hp i x hx =>\n  induction hx using Submodule.pow_induction_on_right' with\n  | hr r => exact hr r\n  | hadd _x _y _i _ _ ihx ihy => exact h_add _ _ ihx ihy\n  | hmul _i x _hx px m hm =>\n    obtain ⟨m, rfl⟩ := hm\n    exact h_ι_mul _ _ px\n| h0 => simpa only [map_zero] using hr 0\n| hadd _x _y _ _ ihx ihy => exact h_add _ _ ihx ihy\n[GOAL]\nR : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nQ : QuadraticForm R M\nP : CliffordAlgebra Q → Prop\nhr : ∀ (r : R), P (↑(algebraMap R (CliffordAlgebra Q)) r)\nh_add : ∀ (x y : CliffordAlgebra Q), P x → P y → P (x + y)\nh_ι_mul : ∀ (m : M) (x : CliffordAlgebra Q), P x → P (x * ↑(ι Q) m)\nx : CliffordAlgebra Q\nthis : x ∈ ⨆ (i : ℕ), LinearMap.range (ι Q) ^ i\n⊢ P x\n[PROOFSTEP]\ninduction this using Submodule.iSup_induction' with\n  -- _ this (fun i x hx => ?_) _ h_add\n| hp i x hx =>\n  induction hx using Submodule.pow_induction_on_right' with\n  | hr r => exact hr r\n  | hadd _x _y _i _ _ ihx ihy => exact h_add _ _ ihx ihy\n  | hmul _i x _hx px m hm =>\n    obtain ⟨m, rfl⟩ := hm\n    exact h_ι_mul _ _ px\n| h0 => simpa only [map_zero] using hr 0\n| hadd _x _y _ _ ihx ihy => exact h_add _ _ ihx ihy\n[GOAL]\ncase hp\nR : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nQ : QuadraticForm R M\nP : CliffordAlgebra Q → Prop\nhr : ∀ (r : R), P (↑(algebraMap R (CliffordAlgebra Q)) r)\nh_add : ∀ (x y : CliffordAlgebra Q), P x → P y → P (x + y)\nh_ι_mul : ∀ (m : M) (x : CliffordAlgebra Q), P x → P (x * ↑(ι Q) m)\nx✝ : CliffordAlgebra Q\ni : ℕ\nx : CliffordAlgebra Q\nhx : x ∈ LinearMap.range (ι Q) ^ i\n⊢ P x\n[PROOFSTEP]\n\n| hp i x hx =>\n  induction hx using Submodule.pow_induction_on_right' with\n  | hr r => exact hr r\n  | hadd _x _y _i _ _ ihx ihy => exact h_add _ _ ihx ihy\n  | hmul _i x _hx px m hm =>\n    obtain ⟨m, rfl⟩ := hm\n    exact h_ι_mul _ _ px\n[GOAL]\ncase hp\nR : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nQ : QuadraticForm R M\nP : CliffordAlgebra Q → Prop\nhr : ∀ (r : R), P (↑(algebraMap R (CliffordAlgebra Q)) r)\nh_add : ∀ (x y : CliffordAlgebra Q), P x → P y → P (x + y)\nh_ι_mul : ∀ (m : M) (x : CliffordAlgebra Q), P x → P (x * ↑(ι Q) m)\nx✝ : CliffordAlgebra Q\ni : ℕ\nx : CliffordAlgebra Q\nhx : x ∈ LinearMap.range (ι Q) ^ i\n⊢ P x\n[PROOFSTEP]\ninduction hx using Submodule.pow_induction_on_right' with\n| hr r => exact hr r\n| hadd _x _y _i _ _ ihx ihy => exact h_add _ _ ihx ihy\n| hmul _i x _hx px m hm =>\n  obtain ⟨m, rfl⟩ := hm\n  exact h_ι_mul _ _ px\n[GOAL]\ncase hp\nR : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nQ : QuadraticForm R M\nP : CliffordAlgebra Q → Prop\nhr : ∀ (r : R), P (↑(algebraMap R (CliffordAlgebra Q)) r)\nh_add : ∀ (x y : CliffordAlgebra Q), P x → P y → P (x + y)\nh_ι_mul : ∀ (m : M) (x : CliffordAlgebra Q), P x → P (x * ↑(ι Q) m)\nx✝ : CliffordAlgebra Q\ni : ℕ\nx : CliffordAlgebra Q\nhx : x ∈ LinearMap.range (ι Q) ^ i\n⊢ P x\n[PROOFSTEP]\ninduction hx using Submodule.pow_induction_on_right' with\n| hr r => exact hr r\n| hadd _x _y _i _ _ ihx ihy => exact h_add _ _ ihx ihy\n| hmul _i x _hx px m hm =>\n  obtain ⟨m, rfl⟩ := hm\n  exact h_ι_mul _ _ px\n[GOAL]\ncase hp.hr\nR : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nQ : QuadraticForm R M\nP : CliffordAlgebra Q → Prop\nhr : ∀ (r : R), P (↑(algebraMap R (CliffordAlgebra Q)) r)\nh_add : ∀ (x y : CliffordAlgebra Q), P x → P y → P (x + y)\nh_ι_mul : ∀ (m : M) (x : CliffordAlgebra Q), P x → P (x * ↑(ι Q) m)\nx✝ : CliffordAlgebra Q\ni : ℕ\nx : CliffordAlgebra Q\nr : R\n⊢ P (↑(algebraMap R (CliffordAlgebra Q)) r)\n[PROOFSTEP]\n\n| hr r => exact hr r\n[GOAL]\ncase hp.hr\nR : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nQ : QuadraticForm R M\nP : CliffordAlgebra Q → Prop\nhr : ∀ (r : R), P (↑(algebraMap R (CliffordAlgebra Q)) r)\nh_add : ∀ (x y : CliffordAlgebra Q), P x → P y → P (x + y)\nh_ι_mul : ∀ (m : M) (x : CliffordAlgebra Q), P x → P (x * ↑(ι Q) m)\nx✝ : CliffordAlgebra Q\ni : ℕ\nx : CliffordAlgebra Q\nr : R\n⊢ P (↑(algebraMap R (CliffordAlgebra Q)) r)\n[PROOFSTEP]\nexact hr r\n[GOAL]\ncase hp.hadd\nR : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nQ : QuadraticForm R M\nP : CliffordAlgebra Q → Prop\nhr : ∀ (r : R), P (↑(algebraMap R (CliffordAlgebra Q)) r)\nh_add : ∀ (x y : CliffordAlgebra Q), P x → P y → P (x + y)\nh_ι_mul : ∀ (m : M) (x : CliffordAlgebra Q), P x → P (x * ↑(ι Q) m)\nx✝ : CliffordAlgebra Q\ni : ℕ\nx _x _y : CliffordAlgebra Q\n_i : ℕ\nhx✝ : _x ∈ LinearMap.range (ι Q) ^ _i\nhy✝ : _y ∈ LinearMap.range (ι Q) ^ _i\nihx : P _x\nihy : P _y\n⊢ P (_x + _y)\n[PROOFSTEP]\n\n| hadd _x _y _i _ _ ihx ihy => exact h_add _ _ ihx ihy\n[GOAL]\ncase hp.hadd\nR : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nQ : QuadraticForm R M\nP : CliffordAlgebra Q → Prop\nhr : ∀ (r : R), P (↑(algebraMap R (CliffordAlgebra Q)) r)\nh_add : ∀ (x y : CliffordAlgebra Q), P x → P y → P (x + y)\nh_ι_mul : ∀ (m : M) (x : CliffordAlgebra Q), P x → P (x * ↑(ι Q) m)\nx✝ : CliffordAlgebra Q\ni : ℕ\nx _x _y : CliffordAlgebra Q\n_i : ℕ\nhx✝ : _x ∈ LinearMap.range (ι Q) ^ _i\nhy✝ : _y ∈ LinearMap.range (ι Q) ^ _i\nihx : P _x\nihy : P _y\n⊢ P (_x + _y)\n[PROOFSTEP]\nexact h_add _ _ ihx ihy\n[GOAL]\ncase hp.hmul\nR : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nQ : QuadraticForm R M\nP : CliffordAlgebra Q → Prop\nhr : ∀ (r : R), P (↑(algebraMap R (CliffordAlgebra Q)) r)\nh_add : ∀ (x y : CliffordAlgebra Q), P x → P y → P (x + y)\nh_ι_mul : ∀ (m : M) (x : CliffordAlgebra Q), P x → P (x * ↑(ι Q) m)\nx✝¹ : CliffordAlgebra Q\ni : ℕ\nx✝ : CliffordAlgebra Q\n_i : ℕ\nx : CliffordAlgebra Q\n_hx : x ∈ LinearMap.range (ι Q) ^ _i\npx : P x\nm : CliffordAlgebra Q\nhm : m ∈ LinearMap.range (ι Q)\n⊢ P (x * m)\n[PROOFSTEP]\n\n| hmul _i x _hx px m hm =>\n  obtain ⟨m, rfl⟩ := hm\n  exact h_ι_mul _ _ px\n[GOAL]\ncase hp.hmul\nR : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nQ : QuadraticForm R M\nP : CliffordAlgebra Q → Prop\nhr : ∀ (r : R), P (↑(algebraMap R (CliffordAlgebra Q)) r)\nh_add : ∀ (x y : CliffordAlgebra Q), P x → P y → P (x + y)\nh_ι_mul : ∀ (m : M) (x : CliffordAlgebra Q), P x → P (x * ↑(ι Q) m)\nx✝¹ : CliffordAlgebra Q\ni : ℕ\nx✝ : CliffordAlgebra Q\n_i : ℕ\nx : CliffordAlgebra Q\n_hx : x ∈ LinearMap.range (ι Q) ^ _i\npx : P x\nm : CliffordAlgebra Q\nhm : m ∈ LinearMap.range (ι Q)\n⊢ P (x * m)\n[PROOFSTEP]\nobtain ⟨m, rfl⟩ := hm\n[GOAL]\ncase hp.hmul.intro\nR : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nQ : QuadraticForm R M\nP : CliffordAlgebra Q → Prop\nhr : ∀ (r : R), P (↑(algebraMap R (CliffordAlgebra Q)) r)\nh_add : ∀ (x y : CliffordAlgebra Q), P x → P y → P (x + y)\nh_ι_mul : ∀ (m : M) (x : CliffordAlgebra Q), P x → P (x * ↑(ι Q) m)\nx✝¹ : CliffordAlgebra Q\ni : ℕ\nx✝ : CliffordAlgebra Q\n_i : ℕ\nx : CliffordAlgebra Q\n_hx : x ∈ LinearMap.range (ι Q) ^ _i\npx : P x\nm : M\n⊢ P (x * ↑(ι Q) m)\n[PROOFSTEP]\nexact h_ι_mul _ _ px\n[GOAL]\ncase h0\nR : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nQ : QuadraticForm R M\nP : CliffordAlgebra Q → Prop\nhr : ∀ (r : R), P (↑(algebraMap R (CliffordAlgebra Q)) r)\nh_add : ∀ (x y : CliffordAlgebra Q), P x → P y → P (x + y)\nh_ι_mul : ∀ (m : M) (x : CliffordAlgebra Q), P x → P (x * ↑(ι Q) m)\nx : CliffordAlgebra Q\n⊢ P 0\n[PROOFSTEP]\n\n| h0 => simpa only [map_zero] using hr 0\n[GOAL]\ncase h0\nR : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nQ : QuadraticForm R M\nP : CliffordAlgebra Q → Prop\nhr : ∀ (r : R), P (↑(algebraMap R (CliffordAlgebra Q)) r)\nh_add : ∀ (x y : CliffordAlgebra Q), P x → P y → P (x + y)\nh_ι_mul : ∀ (m : M) (x : CliffordAlgebra Q), P x → P (x * ↑(ι Q) m)\nx : CliffordAlgebra Q\n⊢ P 0\n[PROOFSTEP]\nsimpa only [map_zero] using hr 0\n[GOAL]\ncase hadd\nR : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nQ : QuadraticForm R M\nP : CliffordAlgebra Q → Prop\nhr : ∀ (r : R), P (↑(algebraMap R (CliffordAlgebra Q)) r)\nh_add : ∀ (x y : CliffordAlgebra Q), P x → P y → P (x + y)\nh_ι_mul : ∀ (m : M) (x : CliffordAlgebra Q), P x → P (x * ↑(ι Q) m)\nx _x _y : CliffordAlgebra Q\nhx✝ : _x ∈ ⨆ (i : ℕ), LinearMap.range (ι Q) ^ i\nhy✝ : _y ∈ ⨆ (i : ℕ), LinearMap.range (ι Q) ^ i\nihx : P _x\nihy : P _y\n⊢ P (_x + _y)\n[PROOFSTEP]\n\n| hadd _x _y _ _ ihx ihy => exact h_add _ _ ihx ihy\n[GOAL]\ncase hadd\nR : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nQ : QuadraticForm R M\nP : CliffordAlgebra Q → Prop\nhr : ∀ (r : R), P (↑(algebraMap R (CliffordAlgebra Q)) r)\nh_add : ∀ (x y : CliffordAlgebra Q), P x → P y → P (x + y)\nh_ι_mul : ∀ (m : M) (x : CliffordAlgebra Q), P x → P (x * ↑(ι Q) m)\nx _x _y : CliffordAlgebra Q\nhx✝ : _x ∈ ⨆ (i : ℕ), LinearMap.range (ι Q) ^ i\nhy✝ : _y ∈ ⨆ (i : ℕ), LinearMap.range (ι Q) ^ i\nihx : P _x\nihy : P _y\n⊢ P (_x + _y)\n[PROOFSTEP]\nexact h_add _ _ ihx ihy\n[GOAL]\nR : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nQ : QuadraticForm R M\nP : CliffordAlgebra Q → Prop\nhr : ∀ (r : R), P (↑(algebraMap R (CliffordAlgebra Q)) r)\nh_add : ∀ (x y : CliffordAlgebra Q), P x → P y → P (x + y)\nh_mul_ι : ∀ (x : CliffordAlgebra Q) (m : M), P x → P (↑(ι Q) m * x)\n⊢ ∀ (x : CliffordAlgebra Q), P x\n[PROOFSTEP]\nrefine' reverse_involutive.surjective.forall.2 _\n[GOAL]\nR : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nQ : QuadraticForm R M\nP : CliffordAlgebra Q → Prop\nhr : ∀ (r : R), P (↑(algebraMap R (CliffordAlgebra Q)) r)\nh_add : ∀ (x y : CliffordAlgebra Q), P x → P y → P (x + y)\nh_mul_ι : ∀ (x : CliffordAlgebra Q) (m : M), P x → P (↑(ι Q) m * x)\n⊢ ∀ (x : CliffordAlgebra Q), P (↑reverse x)\n[PROOFSTEP]\nintro x\n[GOAL]\nR : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nQ : QuadraticForm R M\nP : CliffordAlgebra Q → Prop\nhr : ∀ (r : R), P (↑(algebraMap R (CliffordAlgebra Q)) r)\nh_add : ∀ (x y : CliffordAlgebra Q), P x → P y → P (x + y)\nh_mul_ι : ∀ (x : CliffordAlgebra Q) (m : M), P x → P (↑(ι Q) m * x)\nx : CliffordAlgebra Q\n⊢ P (↑reverse x)\n[PROOFSTEP]\ninduction' x using CliffordAlgebra.right_induction with r x y hx hy m x hx\n[GOAL]\ncase hr\nR : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nQ : QuadraticForm R M\nP : CliffordAlgebra Q → Prop\nhr : ∀ (r : R), P (↑(algebraMap R (CliffordAlgebra Q)) r)\nh_add : ∀ (x y : CliffordAlgebra Q), P x → P y → P (x + y)\nh_mul_ι : ∀ (x : CliffordAlgebra Q) (m : M), P x → P (↑(ι Q) m * x)\nr : R\n⊢ P (↑reverse (↑(algebraMap R (CliffordAlgebra Q)) r))\n[PROOFSTEP]\nsimpa only [reverse.commutes] using hr r\n[GOAL]\ncase h_add\nR : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nQ : QuadraticForm R M\nP : CliffordAlgebra Q → Prop\nhr : ∀ (r : R), P (↑(algebraMap R (CliffordAlgebra Q)) r)\nh_add : ∀ (x y : CliffordAlgebra Q), P x → P y → P (x + y)\nh_mul_ι : ∀ (x : CliffordAlgebra Q) (m : M), P x → P (↑(ι Q) m * x)\nx y : CliffordAlgebra Q\nhx : P (↑reverse x)\nhy : P (↑reverse y)\n⊢ P (↑reverse (x + y))\n[PROOFSTEP]\nsimpa only [map_add] using h_add _ _ hx hy\n[GOAL]\ncase h_ι_mul\nR : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nQ : QuadraticForm R M\nP : CliffordAlgebra Q → Prop\nhr : ∀ (r : R), P (↑(algebraMap R (CliffordAlgebra Q)) r)\nh_add : ∀ (x y : CliffordAlgebra Q), P x → P y → P (x + y)\nh_mul_ι : ∀ (x : CliffordAlgebra Q) (m : M), P x → P (↑(ι Q) m * x)\nm : M\nx : CliffordAlgebra Q\nhx : P (↑reverse x)\n⊢ P (↑reverse (x * ↑(ι Q) m))\n[PROOFSTEP]\nsimpa only [reverse.map_mul, reverse_ι] using h_mul_ι _ _ hx\n[GOAL]\nR : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nQ : QuadraticForm R M\nf : M →ₗ[R] CliffordAlgebra Q × N →ₗ[R] N\n⊢ M →ₗ[R] Module.End R (CliffordAlgebra Q × N)\n[PROOFSTEP]\nhave v_mul := (Algebra.lmul R (CliffordAlgebra Q)).toLinearMap ∘ₗ ι Q\n[GOAL]\nR : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nQ : QuadraticForm R M\nf : M →ₗ[R] CliffordAlgebra Q × N →ₗ[R] N\nv_mul : M →ₗ[R] Module.End R (CliffordAlgebra Q)\n⊢ M →ₗ[R] Module.End R (CliffordAlgebra Q × N)\n[PROOFSTEP]\nhave l := v_mul.compl₂ (LinearMap.fst _ _ N)\n[GOAL]\nR : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nQ : QuadraticForm R M\nf : M →ₗ[R] CliffordAlgebra Q × N →ₗ[R] N\nv_mul : M →ₗ[R] Module.End R (CliffordAlgebra Q)\nl : M →ₗ[R] CliffordAlgebra Q × N →ₗ[R] CliffordAlgebra Q\n⊢ M →ₗ[R] Module.End R (CliffordAlgebra Q × N)\n[PROOFSTEP]\nexact\n  { toFun := fun m => (l m).prod (f m)\n    map_add' := fun v₂ v₂ =>\n      LinearMap.ext fun x => Prod.ext (LinearMap.congr_fun (l.map_add _ _) x) (LinearMap.congr_fun (f.map_add _ _) x)\n    map_smul' := fun c v =>\n      LinearMap.ext fun x =>\n        Prod.ext (LinearMap.congr_fun (l.map_smul _ _) x) (LinearMap.congr_fun (f.map_smul _ _) x) }\n[GOAL]\nR : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nQ : QuadraticForm R M\nf : M →ₗ[R] CliffordAlgebra Q × N →ₗ[R] N\nhf : ∀ (m : M) (x : CliffordAlgebra Q) (fx : N), ↑(↑f m) (↑(ι Q) m * x, ↑(↑f m) (x, fx)) = ↑Q m • fx\nv : M\nx_fx : CliffordAlgebra Q × N\n⊢ ↑(↑(foldr'Aux Q f) v) (↑(↑(foldr'Aux Q f) v) x_fx) = ↑Q v • x_fx\n[PROOFSTEP]\ncases' x_fx with x fx\n[GOAL]\ncase mk\nR : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nQ : QuadraticForm R M\nf : M →ₗ[R] CliffordAlgebra Q × N →ₗ[R] N\nhf : ∀ (m : M) (x : CliffordAlgebra Q) (fx : N), ↑(↑f m) (↑(ι Q) m * x, ↑(↑f m) (x, fx)) = ↑Q m • fx\nv : M\nx : CliffordAlgebra Q\nfx : N\n⊢ ↑(↑(foldr'Aux Q f) v) (↑(↑(foldr'Aux Q f) v) (x, fx)) = ↑Q v • (x, fx)\n[PROOFSTEP]\nsimp only [foldr'Aux_apply_apply]\n[GOAL]\ncase mk\nR : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nQ : QuadraticForm R M\nf : M →ₗ[R] CliffordAlgebra Q × N →ₗ[R] N\nhf : ∀ (m : M) (x : CliffordAlgebra Q) (fx : N), ↑(↑f m) (↑(ι Q) m * x, ↑(↑f m) (x, fx)) = ↑Q m • fx\nv : M\nx : CliffordAlgebra Q\nfx : N\n⊢ (↑(ι Q) v * (↑(ι Q) v * x), ↑(↑f v) (↑(ι Q) v * x, ↑(↑f v) (x, fx))) = ↑Q v • (x, fx)\n[PROOFSTEP]\nrw [← mul_assoc, ι_sq_scalar, ← Algebra.smul_def, hf, Prod.smul_mk]\n[GOAL]\nR : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nQ : QuadraticForm R M\nf : M →ₗ[R] CliffordAlgebra Q × N →ₗ[R] N\nhf : ∀ (m : M) (x : CliffordAlgebra Q) (fx : N), ↑(↑f m) (↑(ι Q) m * x, ↑(↑f m) (x, fx)) = ↑Q m • fx\nn : N\nm : M\nx : CliffordAlgebra Q\n⊢ ↑(foldr' Q f hf n) (↑(ι Q) m * x) = ↑(↑f m) (x, ↑(foldr' Q f hf n) x)\n[PROOFSTEP]\ndsimp [foldr']\n[GOAL]\nR : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nQ : QuadraticForm R M\nf : M →ₗ[R] CliffordAlgebra Q × N →ₗ[R] N\nhf : ∀ (m : M) (x : CliffordAlgebra Q) (fx : N), ↑(↑f m) (↑(ι Q) m * x, ↑(↑f m) (x, fx)) = ↑Q m • fx\nn : N\nm : M\nx : CliffordAlgebra Q\n⊢ (↑(↑(foldr Q (foldr'Aux Q f)\n                (_ :\n                  ∀ (v : M) (x_fx : CliffordAlgebra Q × N),\n                    ↑(↑(foldr'Aux Q f) v) (↑(↑(foldr'Aux Q f) v) x_fx) = ↑Q v • x_fx))\n            (1, n))\n        (↑(ι Q) m * x)).snd =\n    ↑(↑f m)\n      (x,\n        (↑(↑(foldr Q (foldr'Aux Q f)\n                    (_ :\n                      ∀ (v : M) (x_fx : CliffordAlgebra Q × N),\n                        ↑(↑(foldr'Aux Q f) v) (↑(↑(foldr'Aux Q f) v) x_fx) = ↑Q v • x_fx))\n                (1, n))\n            x).snd)\n[PROOFSTEP]\nrw [foldr_mul, foldr_ι, foldr'Aux_apply_apply]\n[GOAL]\nR : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nQ : QuadraticForm R M\nf : M →ₗ[R] CliffordAlgebra Q × N →ₗ[R] N\nhf : ∀ (m : M) (x : CliffordAlgebra Q) (fx : N), ↑(↑f m) (↑(ι Q) m * x, ↑(↑f m) (x, fx)) = ↑Q m • fx\nn : N\nm : M\nx : CliffordAlgebra Q\n⊢ (↑(ι Q) m *\n          (↑(↑(foldr Q (foldr'Aux Q f)\n                      (_ :\n                        ∀ (v : M) (x_fx : CliffordAlgebra Q × N),\n                          ↑(↑(foldr'Aux Q f) v) (↑(↑(foldr'Aux Q f) v) x_fx) = ↑Q v • x_fx))\n                  (1, n))\n              x).fst,\n        ↑(↑f m)\n          (↑(↑(foldr Q (foldr'Aux Q f)\n                    (_ :\n                      ∀ (v : M) (x_fx : CliffordAlgebra Q × N),\n                        ↑(↑(foldr'Aux Q f) v) (↑(↑(foldr'Aux Q f) v) x_fx) = ↑Q v • x_fx))\n                (1, n))\n            x)).snd =\n    ↑(↑f m)\n      (x,\n        (↑(↑(foldr Q (foldr'Aux Q f)\n                    (_ :\n                      ∀ (v : M) (x_fx : CliffordAlgebra Q × N),\n                        ↑(↑(foldr'Aux Q f) v) (↑(↑(foldr'Aux Q f) v) x_fx) = ↑Q v • x_fx))\n                (1, n))\n            x).snd)\n[PROOFSTEP]\nrefine' congr_arg (f m) (Prod.mk.eta.symm.trans _)\n[GOAL]\nR : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nQ : QuadraticForm R M\nf : M →ₗ[R] CliffordAlgebra Q × N →ₗ[R] N\nhf : ∀ (m : M) (x : CliffordAlgebra Q) (fx : N), ↑(↑f m) (↑(ι Q) m * x, ↑(↑f m) (x, fx)) = ↑Q m • fx\nn : N\nm : M\nx : CliffordAlgebra Q\n⊢ ((↑(↑(foldr Q (foldr'Aux Q f)\n                  (_ :\n                    ∀ (v : M) (x_fx : CliffordAlgebra Q × N),\n                      ↑(↑(foldr'Aux Q f) v) (↑(↑(foldr'Aux Q f) v) x_fx) = ↑Q v • x_fx))\n              (1, n))\n          x).fst,\n      (↑(↑(foldr Q (foldr'Aux Q f)\n                  (_ :\n                    ∀ (v : M) (x_fx : CliffordAlgebra Q × N),\n                      ↑(↑(foldr'Aux Q f) v) (↑(↑(foldr'Aux Q f) v) x_fx) = ↑Q v • x_fx))\n              (1, n))\n          x).snd) =\n    (x,\n      (↑(↑(foldr Q (foldr'Aux Q f)\n                  (_ :\n                    ∀ (v : M) (x_fx : CliffordAlgebra Q × N),\n                      ↑(↑(foldr'Aux Q f) v) (↑(↑(foldr'Aux Q f) v) x_fx) = ↑Q v • x_fx))\n              (1, n))\n          x).snd)\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_fst\nR : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nQ : QuadraticForm R M\nf : M →ₗ[R] CliffordAlgebra Q × N →ₗ[R] N\nhf : ∀ (m : M) (x : CliffordAlgebra Q) (fx : N), ↑(↑f m) (↑(ι Q) m * x, ↑(↑f m) (x, fx)) = ↑Q m • fx\nn : N\nm : M\nx : CliffordAlgebra Q\n⊢ (↑(↑(foldr Q (foldr'Aux Q f)\n                (_ :\n                  ∀ (v : M) (x_fx : CliffordAlgebra Q × N),\n                    ↑(↑(foldr'Aux Q f) v) (↑(↑(foldr'Aux Q f) v) x_fx) = ↑Q v • x_fx))\n            (1, n))\n        x).fst =\n    x\n[PROOFSTEP]\ninduction' x using CliffordAlgebra.left_induction with r x y hx hy m x hx\n[GOAL]\ncase e_fst.hr\nR : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nQ : QuadraticForm R M\nf : M →ₗ[R] CliffordAlgebra Q × N →ₗ[R] N\nhf : ∀ (m : M) (x : CliffordAlgebra Q) (fx : N), ↑(↑f m) (↑(ι Q) m * x, ↑(↑f m) (x, fx)) = ↑Q m • fx\nn : N\nm : M\nr : R\n⊢ (↑(↑(foldr Q (foldr'Aux Q f)\n                (_ :\n                  ∀ (v : M) (x_fx : CliffordAlgebra Q × N),\n                    ↑(↑(foldr'Aux Q f) v) (↑(↑(foldr'Aux Q f) v) x_fx) = ↑Q v • x_fx))\n            (1, n))\n        (↑(algebraMap R (CliffordAlgebra Q)) r)).fst =\n    ↑(algebraMap R (CliffordAlgebra Q)) r\n[PROOFSTEP]\nsimp_rw [foldr_algebraMap, Prod.smul_mk, Algebra.algebraMap_eq_smul_one]\n[GOAL]\ncase e_fst.h_add\nR : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nQ : QuadraticForm R M\nf : M →ₗ[R] CliffordAlgebra Q × N →ₗ[R] N\nhf : ∀ (m : M) (x : CliffordAlgebra Q) (fx : N), ↑(↑f m) (↑(ι Q) m * x, ↑(↑f m) (x, fx)) = ↑Q m • fx\nn : N\nm : M\nx y : CliffordAlgebra Q\nhx :\n  (↑(↑(foldr Q (foldr'Aux Q f)\n                (_ :\n                  ∀ (v : M) (x_fx : CliffordAlgebra Q × N),\n                    ↑(↑(foldr'Aux Q f) v) (↑(↑(foldr'Aux Q f) v) x_fx) = ↑Q v • x_fx))\n            (1, n))\n        x).fst =\n    x\nhy :\n  (↑(↑(foldr Q (foldr'Aux Q f)\n                (_ :\n                  ∀ (v : M) (x_fx : CliffordAlgebra Q × N),\n                    ↑(↑(foldr'Aux Q f) v) (↑(↑(foldr'Aux Q f) v) x_fx) = ↑Q v • x_fx))\n            (1, n))\n        y).fst =\n    y\n⊢ (↑(↑(foldr Q (foldr'Aux Q f)\n                (_ :\n                  ∀ (v : M) (x_fx : CliffordAlgebra Q × N),\n                    ↑(↑(foldr'Aux Q f) v) (↑(↑(foldr'Aux Q f) v) x_fx) = ↑Q v • x_fx))\n            (1, n))\n        (x + y)).fst =\n    x + y\n[PROOFSTEP]\nrw [map_add, Prod.fst_add, hx, hy]\n[GOAL]\ncase e_fst.h_mul_ι\nR : Type u_1\nM : Type u_2\nN : Type u_3\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : AddCommGroup N\ninst✝¹ : Module R M\ninst✝ : Module R N\nQ : QuadraticForm R M\nf : M →ₗ[R] CliffordAlgebra Q × N →ₗ[R] N\nhf : ∀ (m : M) (x : CliffordAlgebra Q) (fx : N), ↑(↑f m) (↑(ι Q) m * x, ↑(↑f m) (x, fx)) = ↑Q m • fx\nn : N\nm✝ : M\nm : CliffordAlgebra Q\nx : M\nhx :\n  (↑(↑(foldr Q (foldr'Aux Q f)\n                (_ :\n                  ∀ (v : M) (x_fx : CliffordAlgebra Q × N),\n                    ↑(↑(foldr'Aux Q f) v) (↑(↑(foldr'Aux Q f) v) x_fx) = ↑Q v • x_fx))\n            (1, n))\n        m).fst =\n    m\n⊢ (↑(↑(foldr Q (foldr'Aux Q f)\n                (_ :\n                  ∀ (v : M) (x_fx : CliffordAlgebra Q × N),\n                    ↑(↑(foldr'Aux Q f) v) (↑(↑(foldr'Aux Q f) v) x_fx) = ↑Q v • x_fx))\n            (1, n))\n        (↑(ι Q) x * m)).fst =\n    ↑(ι Q) x * m\n[PROOFSTEP]\nrw [foldr_mul, foldr_ι, foldr'Aux_apply_apply, hx]\n", "meta": {"mathlib_filename": "Mathlib.LinearAlgebra.CliffordAlgebra.Fold", "llama_tokens": 14319, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7772998714925402, "lm_q2_score": 0.6619228825191872, "lm_q1q2_score": 0.514512571520136}}
{"text": "[GOAL]\nn : ℕ\n⊢ ∀ (a : ℕ), a ∈ toFinset (factors n) ↔ (fun p => if Prime p then padicValNat p n else 0) a ≠ 0\n[PROOFSTEP]\nrcases eq_or_ne n 0 with (rfl | hn0)\n[GOAL]\ncase inl\n⊢ ∀ (a : ℕ), a ∈ toFinset (factors 0) ↔ (fun p => if Prime p then padicValNat p 0 else 0) a ≠ 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\nn : ℕ\nhn0 : n ≠ 0\n⊢ ∀ (a : ℕ), a ∈ toFinset (factors n) ↔ (fun p => if Prime p then padicValNat p n else 0) a ≠ 0\n[PROOFSTEP]\nsimp only [mem_factors hn0, mem_toFinset, Ne.def, ite_eq_right_iff, not_forall, exists_prop, and_congr_right_iff]\n[GOAL]\ncase inr\nn : ℕ\nhn0 : n ≠ 0\n⊢ ∀ (a : ℕ), Prime a → (a ∣ n ↔ ¬padicValNat a n = 0)\n[PROOFSTEP]\nrintro p hp\n[GOAL]\ncase inr\nn : ℕ\nhn0 : n ≠ 0\np : ℕ\nhp : Prime p\n⊢ p ∣ n ↔ ¬padicValNat p n = 0\n[PROOFSTEP]\nhaveI := fact_iff.mpr hp\n[GOAL]\ncase inr\nn : ℕ\nhn0 : n ≠ 0\np : ℕ\nhp : Prime p\nthis : Fact (Prime p)\n⊢ p ∣ n ↔ ¬padicValNat p n = 0\n[PROOFSTEP]\nexact dvd_iff_padicValNat_ne_zero hn0\n[GOAL]\nn p : ℕ\npp : Prime p\n⊢ ↑(factorization n) p = padicValNat p n\n[PROOFSTEP]\nsimpa [factorization] using absurd pp\n[GOAL]\nn p : ℕ\n⊢ count p (factors n) = ↑(factorization n) p\n[PROOFSTEP]\nrcases n.eq_zero_or_pos with (rfl | hn0)\n[GOAL]\ncase inl\np : ℕ\n⊢ count p (factors 0) = ↑(factorization 0) p\n[PROOFSTEP]\nsimp [factorization, count]\n[GOAL]\ncase inr\nn p : ℕ\nhn0 : n > 0\n⊢ count p (factors n) = ↑(factorization n) p\n[PROOFSTEP]\nby_cases pp : p.Prime\n[GOAL]\ncase pos\nn p : ℕ\nhn0 : n > 0\npp : Prime p\n⊢ count p (factors n) = ↑(factorization n) p\ncase neg n p : ℕ hn0 : n > 0 pp : ¬Prime p ⊢ count p (factors n) = ↑(factorization n) p\n[PROOFSTEP]\ncase neg =>\n  rw [count_eq_zero_of_not_mem (mt prime_of_mem_factors pp)]\n  simp [factorization, pp]\n[GOAL]\nn p : ℕ\nhn0 : n > 0\npp : ¬Prime p\n⊢ count p (factors n) = ↑(factorization n) p\n[PROOFSTEP]\ncase neg =>\n  rw [count_eq_zero_of_not_mem (mt prime_of_mem_factors pp)]\n  simp [factorization, pp]\n[GOAL]\nn p : ℕ\nhn0 : n > 0\npp : ¬Prime p\n⊢ count p (factors n) = ↑(factorization n) p\n[PROOFSTEP]\nrw [count_eq_zero_of_not_mem (mt prime_of_mem_factors pp)]\n[GOAL]\nn p : ℕ\nhn0 : n > 0\npp : ¬Prime p\n⊢ 0 = ↑(factorization n) p\n[PROOFSTEP]\nsimp [factorization, pp]\n[GOAL]\ncase pos\nn p : ℕ\nhn0 : n > 0\npp : Prime p\n⊢ count p (factors n) = ↑(factorization n) p\n[PROOFSTEP]\nsimp only [factorization, coe_mk, pp, if_true]\n[GOAL]\ncase pos\nn p : ℕ\nhn0 : n > 0\npp : Prime p\n⊢ count p (factors n) = padicValNat p n\n[PROOFSTEP]\nrw [← PartENat.natCast_inj, padicValNat_def' pp.ne_one hn0,\n  UniqueFactorizationMonoid.multiplicity_eq_count_normalizedFactors pp hn0.ne']\n[GOAL]\ncase pos\nn p : ℕ\nhn0 : n > 0\npp : Prime p\n⊢ ↑(count p (factors n)) = ↑(Multiset.count (↑normalize p) (UniqueFactorizationMonoid.normalizedFactors n))\n[PROOFSTEP]\nsimp [factors_eq]\n[GOAL]\nn : ℕ\n⊢ factorization n = ↑Multiset.toFinsupp ↑(factors n)\n[PROOFSTEP]\next p\n[GOAL]\ncase h\nn p : ℕ\n⊢ ↑(factorization n) p = ↑(↑Multiset.toFinsupp ↑(factors n)) p\n[PROOFSTEP]\nsimp\n[GOAL]\nn p : ℕ\npp : Prime p\nhn : n ≠ 0\n⊢ multiplicity p n = ↑(↑(factorization n) p)\n[PROOFSTEP]\nsimp [factorization, pp, padicValNat_def' pp.ne_one hn.bot_lt]\n[GOAL]\nn : ℕ\nhn : n ≠ 0\n⊢ (Finsupp.prod (factorization n) fun x x_1 => x ^ x_1) = n\n[PROOFSTEP]\nrw [factorization_eq_factors_multiset n]\n[GOAL]\nn : ℕ\nhn : n ≠ 0\n⊢ (Finsupp.prod (↑Multiset.toFinsupp ↑(factors n)) fun x x_1 => x ^ x_1) = n\n[PROOFSTEP]\nsimp only [← prod_toMultiset, factorization, Multiset.coe_prod, Multiset.toFinsupp_toMultiset]\n[GOAL]\nn : ℕ\nhn : n ≠ 0\n⊢ List.prod (factors n) = n\n[PROOFSTEP]\nexact prod_factors hn\n[GOAL]\na b : ℕ\nha : a ≠ 0\nhb : b ≠ 0\nh : ∀ (p : ℕ), ↑(factorization a) p = ↑(factorization b) p\n⊢ factors a ~ factors b\n[PROOFSTEP]\nsimpa only [List.perm_iff_count, factors_count_eq] using h\n[GOAL]\na : ℕ\nha : a ∈ {x | x ≠ 0}\nb : ℕ\nhb : b ∈ {x | x ≠ 0}\nh : factorization a = factorization b\np : ℕ\n⊢ ↑(factorization a) p = ↑(factorization b) p\n[PROOFSTEP]\nsimp [h]\n[GOAL]\n⊢ factorization 0 = 0\n[PROOFSTEP]\nsimp [factorization]\n[GOAL]\n⊢ factorization 1 = 0\n[PROOFSTEP]\nsimp [factorization]\n[GOAL]\nn : ℕ\n⊢ (factorization n).support = toFinset (factors n)\n[PROOFSTEP]\nsimp [factorization]\n[GOAL]\nn p : ℕ\n⊢ p ∈ (factorization n).support ↔ p ∈ factors n\n[PROOFSTEP]\nsimp only [support_factorization, List.mem_toFinset]\n[GOAL]\nn p : ℕ\n⊢ ↑(factorization n) p = 0 ↔ ¬Prime p ∨ ¬p ∣ n ∨ n = 0\n[PROOFSTEP]\nrw [← not_mem_support_iff, support_factorization, mem_toFinset]\n[GOAL]\nn p : ℕ\n⊢ ¬p ∈ factors n ↔ ¬Prime p ∨ ¬p ∣ n ∨ n = 0\n[PROOFSTEP]\nrcases eq_or_ne n 0 with (rfl | hn)\n[GOAL]\ncase inl\np : ℕ\n⊢ ¬p ∈ factors 0 ↔ ¬Prime p ∨ ¬p ∣ 0 ∨ 0 = 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\nn p : ℕ\nhn : n ≠ 0\n⊢ ¬p ∈ factors n ↔ ¬Prime p ∨ ¬p ∣ n ∨ n = 0\n[PROOFSTEP]\nsimp [hn, Nat.mem_factors, not_and_or, -not_and]\n[GOAL]\nn p : ℕ\nhp : ¬Prime p\n⊢ ↑(factorization n) p = 0\n[PROOFSTEP]\nsimp [factorization_eq_zero_iff, hp]\n[GOAL]\nn p : ℕ\nh : ¬p ∣ n\n⊢ ↑(factorization n) p = 0\n[PROOFSTEP]\nsimp [factorization_eq_zero_iff, h]\n[GOAL]\nn p : ℕ\nhp : Prime p\nhn : n ≠ 0\nh : p ∣ n\n⊢ 0 < ↑(factorization n) p\n[PROOFSTEP]\nrwa [← factors_count_eq, count_pos, mem_factors_iff_dvd hn hp]\n[GOAL]\np r i : ℕ\nhr : ¬p ∣ r\n⊢ ↑(factorization (p * i + r)) p = 0\n[PROOFSTEP]\napply factorization_eq_zero_of_not_dvd\n[GOAL]\ncase h\np r i : ℕ\nhr : ¬p ∣ r\n⊢ ¬p ∣ p * i + r\n[PROOFSTEP]\nrwa [← Nat.dvd_add_iff_right (Dvd.intro i rfl)]\n[GOAL]\np r i : ℕ\npp : Prime p\nhr0 : r ≠ 0\n⊢ ¬p ∣ r ↔ ↑(factorization (p * i + r)) p = 0\n[PROOFSTEP]\nrefine' ⟨factorization_eq_zero_of_remainder i, fun h => _⟩\n[GOAL]\np r i : ℕ\npp : Prime p\nhr0 : r ≠ 0\nh : ↑(factorization (p * i + r)) p = 0\n⊢ ¬p ∣ r\n[PROOFSTEP]\nrw [factorization_eq_zero_iff] at h \n[GOAL]\np r i : ℕ\npp : Prime p\nhr0 : r ≠ 0\nh : ¬Prime p ∨ ¬p ∣ p * i + r ∨ p * i + r = 0\n⊢ ¬p ∣ r\n[PROOFSTEP]\ncontrapose! h\n[GOAL]\np r i : ℕ\npp : Prime p\nhr0 : r ≠ 0\nh : p ∣ r\n⊢ Prime p ∧ p ∣ p * i + r ∧ p * i + r ≠ 0\n[PROOFSTEP]\nrefine' ⟨pp, _, _⟩\n[GOAL]\ncase refine'_1\np r i : ℕ\npp : Prime p\nhr0 : r ≠ 0\nh : p ∣ r\n⊢ p ∣ p * i + r\n[PROOFSTEP]\nrwa [← Nat.dvd_add_iff_right (dvd_mul_right p i)]\n[GOAL]\ncase refine'_2\np r i : ℕ\npp : Prime p\nhr0 : r ≠ 0\nh : p ∣ r\n⊢ p * i + r ≠ 0\n[PROOFSTEP]\ncontrapose! hr0\n[GOAL]\ncase refine'_2\np r i : ℕ\npp : Prime p\nh : p ∣ r\nhr0 : p * i + r = 0\n⊢ r = 0\n[PROOFSTEP]\nexact (add_eq_zero_iff.mp hr0).2\n[GOAL]\nn : ℕ\n⊢ factorization n = 0 ↔ n = 0 ∨ n = 1\n[PROOFSTEP]\nrw [factorization_eq_factors_multiset n]\n[GOAL]\nn : ℕ\n⊢ ↑Multiset.toFinsupp ↑(factors n) = 0 ↔ n = 0 ∨ n = 1\n[PROOFSTEP]\nsimp [factorization, AddEquiv.map_eq_zero_iff, Multiset.coe_eq_zero]\n[GOAL]\na b : ℕ\nha : a ≠ 0\nhb : b ≠ 0\n⊢ factorization (a * b) = factorization a + factorization b\n[PROOFSTEP]\next p\n[GOAL]\ncase h\na b : ℕ\nha : a ≠ 0\nhb : b ≠ 0\np : ℕ\n⊢ ↑(factorization (a * b)) p = ↑(factorization a + factorization b) p\n[PROOFSTEP]\nsimp only [add_apply, ← factors_count_eq, perm_iff_count.mp (perm_factors_mul ha hb) p, count_append]\n[GOAL]\na b : ℕ\nha : a ≠ 0\nhb : b ≠ 0\n⊢ (factorization (a * b)).support = (factorization a).support ∪ (factorization b).support\n[PROOFSTEP]\next q\n[GOAL]\ncase a\na b : ℕ\nha : a ≠ 0\nhb : b ≠ 0\nq : ℕ\n⊢ q ∈ (factorization (a * b)).support ↔ q ∈ (factorization a).support ∪ (factorization b).support\n[PROOFSTEP]\nsimp only [Finset.mem_union, factor_iff_mem_factorization]\n[GOAL]\ncase a\na b : ℕ\nha : a ≠ 0\nhb : b ≠ 0\nq : ℕ\n⊢ q ∈ factors (a * b) ↔ q ∈ factors a ∨ q ∈ factors b\n[PROOFSTEP]\nexact mem_factors_mul ha hb\n[GOAL]\nn : ℕ\nβ : Type u_1\ninst✝ : CommMonoid β\nf : ℕ → β\n⊢ (Finsupp.prod (factorization n) fun p x => f p) = ∏ p in toFinset (factors n), f p\n[PROOFSTEP]\napply prod_congr support_factorization\n[GOAL]\nn : ℕ\nβ : Type u_1\ninst✝ : CommMonoid β\nf : ℕ → β\n⊢ ∀ (x : ℕ), x ∈ toFinset (factors n) → (fun p x => f p) x (↑(factorization n) x) = f x\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nS : Finset α\ng : α → ℕ\nhS : ∀ (x : α), x ∈ S → g x ≠ 0\n⊢ factorization (Finset.prod S g) = ∑ x in S, factorization (g x)\n[PROOFSTEP]\nclassical\next p\nrefine' Finset.induction_on' S ?_ ?_\n· simp\n· intro x T hxS hTS hxT IH\n  have hT : T.prod g ≠ 0 := prod_ne_zero_iff.mpr fun x hx => hS x (hTS hx)\n  simp [prod_insert hxT, sum_insert hxT, ← IH, factorization_mul (hS x hxS) hT]\n[GOAL]\nα : Type u_1\nS : Finset α\ng : α → ℕ\nhS : ∀ (x : α), x ∈ S → g x ≠ 0\n⊢ factorization (Finset.prod S g) = ∑ x in S, factorization (g x)\n[PROOFSTEP]\next p\n[GOAL]\ncase h\nα : Type u_1\nS : Finset α\ng : α → ℕ\nhS : ∀ (x : α), x ∈ S → g x ≠ 0\np : ℕ\n⊢ ↑(factorization (Finset.prod S g)) p = ↑(∑ x in S, factorization (g x)) p\n[PROOFSTEP]\nrefine' Finset.induction_on' S ?_ ?_\n[GOAL]\ncase h.refine'_1\nα : Type u_1\nS : Finset α\ng : α → ℕ\nhS : ∀ (x : α), x ∈ S → g x ≠ 0\np : ℕ\n⊢ ↑(factorization (Finset.prod ∅ g)) p = ↑(∑ x in ∅, factorization (g x)) p\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.refine'_2\nα : Type u_1\nS : Finset α\ng : α → ℕ\nhS : ∀ (x : α), x ∈ S → g x ≠ 0\np : ℕ\n⊢ ∀ {a : α} {s : Finset α},\n    a ∈ S →\n      s ⊆ S →\n        ¬a ∈ s →\n          ↑(factorization (Finset.prod s g)) p = ↑(∑ x in s, factorization (g x)) p →\n            ↑(factorization (Finset.prod (insert a s) g)) p = ↑(∑ x in insert a s, factorization (g x)) p\n[PROOFSTEP]\nintro x T hxS hTS hxT IH\n[GOAL]\ncase h.refine'_2\nα : Type u_1\nS : Finset α\ng : α → ℕ\nhS : ∀ (x : α), x ∈ S → g x ≠ 0\np : ℕ\nx : α\nT : Finset α\nhxS : x ∈ S\nhTS : T ⊆ S\nhxT : ¬x ∈ T\nIH : ↑(factorization (Finset.prod T g)) p = ↑(∑ x in T, factorization (g x)) p\n⊢ ↑(factorization (Finset.prod (insert x T) g)) p = ↑(∑ x in insert x T, factorization (g x)) p\n[PROOFSTEP]\nhave hT : T.prod g ≠ 0 := prod_ne_zero_iff.mpr fun x hx => hS x (hTS hx)\n[GOAL]\ncase h.refine'_2\nα : Type u_1\nS : Finset α\ng : α → ℕ\nhS : ∀ (x : α), x ∈ S → g x ≠ 0\np : ℕ\nx : α\nT : Finset α\nhxS : x ∈ S\nhTS : T ⊆ S\nhxT : ¬x ∈ T\nIH : ↑(factorization (Finset.prod T g)) p = ↑(∑ x in T, factorization (g x)) p\nhT : Finset.prod T g ≠ 0\n⊢ ↑(factorization (Finset.prod (insert x T) g)) p = ↑(∑ x in insert x T, factorization (g x)) p\n[PROOFSTEP]\nsimp [prod_insert hxT, sum_insert hxT, ← IH, factorization_mul (hS x hxS) hT]\n[GOAL]\nn k : ℕ\n⊢ factorization (n ^ k) = k • factorization n\n[PROOFSTEP]\ninduction' k with k ih\n[GOAL]\ncase zero\nn : ℕ\n⊢ factorization (n ^ zero) = zero • factorization n\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\nn k : ℕ\nih : factorization (n ^ k) = k • factorization n\n⊢ factorization (n ^ succ k) = succ k • factorization n\n[PROOFSTEP]\nrcases eq_or_ne n 0 with (rfl | hn)\n[GOAL]\ncase succ.inl\nk : ℕ\nih : factorization (0 ^ k) = k • factorization 0\n⊢ factorization (0 ^ succ k) = succ k • factorization 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ.inr\nn k : ℕ\nih : factorization (n ^ k) = k • factorization n\nhn : n ≠ 0\n⊢ factorization (n ^ succ k) = succ k • factorization n\n[PROOFSTEP]\nrw [pow_succ, mul_comm, factorization_mul hn (pow_ne_zero _ hn), ih, succ_eq_one_add, add_smul, one_smul]\n[GOAL]\np : ℕ\nhp : Prime p\n⊢ Nat.factorization p = single p 1\n[PROOFSTEP]\next q\n[GOAL]\ncase h\np : ℕ\nhp : Prime p\nq : ℕ\n⊢ ↑(Nat.factorization p) q = ↑(single p 1) q\n[PROOFSTEP]\nrw [← factors_count_eq, factors_prime hp, single_apply, count_singleton', if_congr eq_comm]\n[GOAL]\ncase h.h_t\np : ℕ\nhp : Prime p\nq : ℕ\n⊢ 1 = 1\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h.h_e\np : ℕ\nhp : Prime p\nq : ℕ\n⊢ 0 = 0\n[PROOFSTEP]\nrfl\n[GOAL]\np : ℕ\nhp : Prime p\n⊢ ↑(Nat.factorization p) p = 1\n[PROOFSTEP]\nsimp [hp]\n[GOAL]\np k : ℕ\nhp : Prime p\n⊢ Nat.factorization (p ^ k) = single p k\n[PROOFSTEP]\nsimp [hp]\n[GOAL]\nn p k : ℕ\nhn : n ≠ 0\nh : factorization n = single p k\n⊢ n = p ^ k\n[PROOFSTEP]\nrw [← Nat.factorization_prod_pow_eq_self hn, h, Finsupp.prod_single_index]\n[GOAL]\nn p k : ℕ\nhn : n ≠ 0\nh : factorization n = single p k\n⊢ p ^ 0 = 1\n[PROOFSTEP]\nsimp\n[GOAL]\np q : ℕ\nhp : Prime p\nh : ↑(Nat.factorization p) q ≠ 0\n⊢ p = q\n[PROOFSTEP]\nsimpa [hp.factorization, single_apply] using h\n[GOAL]\nf : ℕ →₀ ℕ\nhf : ∀ (p : ℕ), p ∈ f.support → Prime p\n⊢ factorization (Finsupp.prod f fun x x_1 => x ^ x_1) = f\n[PROOFSTEP]\nhave h : ∀ x : ℕ, x ∈ f.support → x ^ f x ≠ 0 := fun p hp => pow_ne_zero _ (Prime.ne_zero (hf p hp))\n[GOAL]\nf : ℕ →₀ ℕ\nhf : ∀ (p : ℕ), p ∈ f.support → Prime p\nh : ∀ (x : ℕ), x ∈ f.support → x ^ ↑f x ≠ 0\n⊢ factorization (Finsupp.prod f fun x x_1 => x ^ x_1) = f\n[PROOFSTEP]\nsimp only [Finsupp.prod, factorization_prod h]\n[GOAL]\nf : ℕ →₀ ℕ\nhf : ∀ (p : ℕ), p ∈ f.support → Prime p\nh : ∀ (x : ℕ), x ∈ f.support → x ^ ↑f x ≠ 0\n⊢ ∑ x in f.support, factorization (x ^ ↑f x) = f\n[PROOFSTEP]\nconv =>\n  rhs\n  rw [(sum_single f).symm]\n[GOAL]\nf : ℕ →₀ ℕ\nhf : ∀ (p : ℕ), p ∈ f.support → Prime p\nh : ∀ (x : ℕ), x ∈ f.support → x ^ ↑f x ≠ 0\n| ∑ x in f.support, factorization (x ^ ↑f x) = f\n[PROOFSTEP]\n  rhs\n  rw [(sum_single f).symm]\n[GOAL]\nf : ℕ →₀ ℕ\nhf : ∀ (p : ℕ), p ∈ f.support → Prime p\nh : ∀ (x : ℕ), x ∈ f.support → x ^ ↑f x ≠ 0\n| ∑ x in f.support, factorization (x ^ ↑f x) = f\n[PROOFSTEP]\n  rhs\n  rw [(sum_single f).symm]\n[GOAL]\nf : ℕ →₀ ℕ\nhf : ∀ (p : ℕ), p ∈ f.support → Prime p\nh : ∀ (x : ℕ), x ∈ f.support → x ^ ↑f x ≠ 0\n| ∑ x in f.support, factorization (x ^ ↑f x) = f\n[PROOFSTEP]\nrhs\n[GOAL]\nf : ℕ →₀ ℕ\nhf : ∀ (p : ℕ), p ∈ f.support → Prime p\nh : ∀ (x : ℕ), x ∈ f.support → x ^ ↑f x ≠ 0\n| f\n[PROOFSTEP]\nrw [(sum_single f).symm]\n[GOAL]\nf : ℕ →₀ ℕ\nhf : ∀ (p : ℕ), p ∈ f.support → Prime p\nh : ∀ (x : ℕ), x ∈ f.support → x ^ ↑f x ≠ 0\n⊢ ∑ x in f.support, factorization (x ^ ↑f x) = Finsupp.sum f single\n[PROOFSTEP]\nexact sum_congr rfl fun p hp => Prime.factorization_pow (hf p hp)\n[GOAL]\nn : ℕ\nf : ℕ →₀ ℕ\nhn : n ≠ 0\nhf : ∀ (p : ℕ), p ∈ f.support → Prime p\nh : f = factorization n\n⊢ (Finsupp.prod f fun x x_1 => x ^ x_1) = n\n[PROOFSTEP]\nrw [h, factorization_prod_pow_eq_self hn]\n[GOAL]\nn : ℕ\nf : ℕ →₀ ℕ\nhn : n ≠ 0\nhf : ∀ (p : ℕ), p ∈ f.support → Prime p\nh : (Finsupp.prod f fun x x_1 => x ^ x_1) = n\n⊢ f = factorization n\n[PROOFSTEP]\nrw [← h, prod_pow_factorization_eq_self hf]\n[GOAL]\nn : ℕ+\n⊢ ↑(↑factorizationEquiv n) = factorization ↑n\n[PROOFSTEP]\ncases n\n[GOAL]\ncase mk\nval✝ : ℕ\nproperty✝ : 0 < val✝\n⊢ ↑(↑factorizationEquiv { val := val✝, property := property✝ }) = factorization ↑{ val := val✝, property := property✝ }\n[PROOFSTEP]\nrfl\n[GOAL]\nn p : ℕ\nhp : ¬Prime p\n⊢ p ^ ↑(factorization n) p = 1\n[PROOFSTEP]\nsimp [factorization_eq_zero_of_non_prime n hp]\n[GOAL]\nn p : ℕ\nhp : ¬Prime p\n⊢ n / p ^ ↑(factorization n) p = n\n[PROOFSTEP]\nsimp [factorization_eq_zero_of_non_prime n hp]\n[GOAL]\nn p : ℕ\n⊢ p ^ ↑(factorization n) p ∣ n\n[PROOFSTEP]\nby_cases hp : p.Prime\n[GOAL]\ncase pos\nn p : ℕ\nhp : Prime p\n⊢ p ^ ↑(factorization n) p ∣ n\ncase neg n p : ℕ hp : ¬Prime p ⊢ p ^ ↑(factorization n) p ∣ n\n[PROOFSTEP]\ncase neg => simp [hp]\n[GOAL]\nn p : ℕ\nhp : ¬Prime p\n⊢ p ^ ↑(factorization n) p ∣ n\n[PROOFSTEP]\ncase neg => simp [hp]\n[GOAL]\nn p : ℕ\nhp : ¬Prime p\n⊢ p ^ ↑(factorization n) p ∣ n\n[PROOFSTEP]\nsimp [hp]\n[GOAL]\ncase pos\nn p : ℕ\nhp : Prime p\n⊢ p ^ ↑(factorization n) p ∣ n\n[PROOFSTEP]\nrw [← factors_count_eq]\n[GOAL]\ncase pos\nn p : ℕ\nhp : Prime p\n⊢ p ^ count p (factors n) ∣ n\n[PROOFSTEP]\napply dvd_of_factors_subperm (pow_ne_zero _ hp.ne_zero)\n[GOAL]\ncase pos\nn p : ℕ\nhp : Prime p\n⊢ factors (p ^ count p (factors n)) <+~ factors n\n[PROOFSTEP]\nrw [hp.factors_pow, List.subperm_ext_iff]\n[GOAL]\ncase pos\nn p : ℕ\nhp : Prime p\n⊢ ∀ (x : ℕ), x ∈ replicate (count p (factors n)) p → count x (replicate (count p (factors n)) p) ≤ count x (factors n)\n[PROOFSTEP]\nintro q hq\n[GOAL]\ncase pos\nn p : ℕ\nhp : Prime p\nq : ℕ\nhq : q ∈ replicate (count p (factors n)) p\n⊢ count q (replicate (count p (factors n)) p) ≤ count q (factors n)\n[PROOFSTEP]\nsimp [List.eq_of_mem_replicate hq]\n[GOAL]\nn p : ℕ\n⊢ 0 < p ^ ↑(factorization n) p\n[PROOFSTEP]\nby_cases pp : p.Prime\n[GOAL]\ncase pos\nn p : ℕ\npp : Prime p\n⊢ 0 < p ^ ↑(factorization n) p\n[PROOFSTEP]\nsimp [pow_pos pp.pos]\n[GOAL]\ncase neg\nn p : ℕ\npp : ¬Prime p\n⊢ 0 < p ^ ↑(factorization n) p\n[PROOFSTEP]\nsimp [pp]\n[GOAL]\nn p : ℕ\nhn : n ≠ 0\n⊢ 0 < n / p ^ ↑(factorization n) p\n[PROOFSTEP]\ncases' em' p.Prime with pp pp\n[GOAL]\ncase inl\nn p : ℕ\nhn : n ≠ 0\npp : ¬Prime p\n⊢ 0 < n / p ^ ↑(factorization n) p\n[PROOFSTEP]\nsimpa [Nat.factorization_eq_zero_of_non_prime n pp] using hn.bot_lt\n[GOAL]\ncase inr\nn p : ℕ\nhn : n ≠ 0\npp : Prime p\n⊢ 0 < n / p ^ ↑(factorization n) p\n[PROOFSTEP]\nexact Nat.div_pos (ord_proj_le p hn) (ord_proj_pos n p)\n[GOAL]\na b p : ℕ\nha : a ≠ 0\nhb : b ≠ 0\n⊢ p ^ ↑(factorization (a * b)) p = p ^ ↑(factorization a) p * p ^ ↑(factorization b) p\n[PROOFSTEP]\nsimp [factorization_mul ha hb, pow_add]\n[GOAL]\na b p : ℕ\n⊢ a * b / p ^ ↑(factorization (a * b)) p = a / p ^ ↑(factorization a) p * (b / p ^ ↑(factorization b) p)\n[PROOFSTEP]\nrcases eq_or_ne a 0 with (rfl | ha)\n[GOAL]\ncase inl\nb p : ℕ\n⊢ 0 * b / p ^ ↑(factorization (0 * b)) p = 0 / p ^ ↑(factorization 0) p * (b / p ^ ↑(factorization b) p)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\na b p : ℕ\nha : a ≠ 0\n⊢ a * b / p ^ ↑(factorization (a * b)) p = a / p ^ ↑(factorization a) p * (b / p ^ ↑(factorization b) p)\n[PROOFSTEP]\nrcases eq_or_ne b 0 with (rfl | hb)\n[GOAL]\ncase inr.inl\na p : ℕ\nha : a ≠ 0\n⊢ a * 0 / p ^ ↑(factorization (a * 0)) p = a / p ^ ↑(factorization a) p * (0 / p ^ ↑(factorization 0) p)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr.inr\na b p : ℕ\nha : a ≠ 0\nhb : b ≠ 0\n⊢ a * b / p ^ ↑(factorization (a * b)) p = a / p ^ ↑(factorization a) p * (b / p ^ ↑(factorization b) p)\n[PROOFSTEP]\nsimp only [ord_proj_mul p ha hb]\n[GOAL]\ncase inr.inr\na b p : ℕ\nha : a ≠ 0\nhb : b ≠ 0\n⊢ a * b / (p ^ ↑(factorization a) p * p ^ ↑(factorization b) p) =\n    a / p ^ ↑(factorization a) p * (b / p ^ ↑(factorization b) p)\n[PROOFSTEP]\nrw [mul_div_mul_comm_of_dvd_dvd (ord_proj_dvd a p) (ord_proj_dvd b p)]\n[GOAL]\nn p : ℕ\nh : p ∈ (factorization n).support\n⊢ p ∣ n\n[PROOFSTEP]\nrcases eq_or_ne n 0 with (rfl | hn)\n[GOAL]\ncase inl\np : ℕ\nh : p ∈ (factorization 0).support\n⊢ p ∣ 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\nn p : ℕ\nh : p ∈ (factorization n).support\nhn : n ≠ 0\n⊢ p ∣ n\n[PROOFSTEP]\nsimp [← mem_factors_iff_dvd hn (prime_of_mem_factorization h), factor_iff_mem_factorization.mp h]\n[GOAL]\nn p : ℕ\nhn : n ≠ 0\n⊢ ↑(factorization n) p < n\n[PROOFSTEP]\nby_cases pp : p.Prime\n[GOAL]\ncase pos\nn p : ℕ\nhn : n ≠ 0\npp : Prime p\n⊢ ↑(factorization n) p < n\ncase neg n p : ℕ hn : n ≠ 0 pp : ¬Prime p ⊢ ↑(factorization n) p < n\n[PROOFSTEP]\ncase neg =>\n  simp [factorization_eq_zero_of_non_prime n pp]\n  exact hn.bot_lt\n[GOAL]\nn p : ℕ\nhn : n ≠ 0\npp : ¬Prime p\n⊢ ↑(factorization n) p < n\n[PROOFSTEP]\ncase neg =>\n  simp [factorization_eq_zero_of_non_prime n pp]\n  exact hn.bot_lt\n[GOAL]\nn p : ℕ\nhn : n ≠ 0\npp : ¬Prime p\n⊢ ↑(factorization n) p < n\n[PROOFSTEP]\nsimp [factorization_eq_zero_of_non_prime n pp]\n[GOAL]\nn p : ℕ\nhn : n ≠ 0\npp : ¬Prime p\n⊢ 0 < n\n[PROOFSTEP]\nexact hn.bot_lt\n[GOAL]\ncase pos\nn p : ℕ\nhn : n ≠ 0\npp : Prime p\n⊢ ↑(factorization n) p < n\n[PROOFSTEP]\nrw [← pow_lt_iff_lt_right pp.two_le]\n[GOAL]\ncase pos\nn p : ℕ\nhn : n ≠ 0\npp : Prime p\n⊢ p ^ ↑(factorization n) p < p ^ n\n[PROOFSTEP]\napply lt_of_le_of_lt (ord_proj_le p hn)\n[GOAL]\ncase pos\nn p : ℕ\nhn : n ≠ 0\npp : Prime p\n⊢ n < p ^ n\n[PROOFSTEP]\nexact lt_of_lt_of_le (lt_two_pow n) (pow_le_pow_of_le_left pp.two_le n)\n[GOAL]\nn p b : ℕ\nhb : n ≤ p ^ b\n⊢ ↑(factorization n) p ≤ b\n[PROOFSTEP]\nrcases eq_or_ne n 0 with (rfl | hn)\n[GOAL]\ncase inl\np b : ℕ\nhb : 0 ≤ p ^ b\n⊢ ↑(factorization 0) p ≤ b\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\nn p b : ℕ\nhb : n ≤ p ^ b\nhn : n ≠ 0\n⊢ ↑(factorization n) p ≤ b\n[PROOFSTEP]\nby_cases pp : p.Prime\n[GOAL]\ncase pos\nn p b : ℕ\nhb : n ≤ p ^ b\nhn : n ≠ 0\npp : Prime p\n⊢ ↑(factorization n) p ≤ b\n[PROOFSTEP]\nexact (pow_le_iff_le_right pp.two_le).1 (le_trans (ord_proj_le p hn) hb)\n[GOAL]\ncase neg\nn p b : ℕ\nhb : n ≤ p ^ b\nhn : n ≠ 0\npp : ¬Prime p\n⊢ ↑(factorization n) p ≤ b\n[PROOFSTEP]\nsimp [factorization_eq_zero_of_non_prime n pp]\n[GOAL]\nd n : ℕ\nhd : d ≠ 0\nhn : n ≠ 0\n⊢ factorization d ≤ factorization n ↔ d ∣ n\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nd n : ℕ\nhd : d ≠ 0\nhn : n ≠ 0\n⊢ factorization d ≤ factorization n → d ∣ n\n[PROOFSTEP]\nintro hdn\n[GOAL]\ncase mp\nd n : ℕ\nhd : d ≠ 0\nhn : n ≠ 0\nhdn : factorization d ≤ factorization n\n⊢ d ∣ n\n[PROOFSTEP]\nset K := n.factorization - d.factorization with hK\n[GOAL]\ncase mp\nd n : ℕ\nhd : d ≠ 0\nhn : n ≠ 0\nhdn : factorization d ≤ factorization n\nK : ℕ →₀ ℕ := factorization n - factorization d\nhK : K = factorization n - factorization d\n⊢ d ∣ n\n[PROOFSTEP]\nuse K.prod (· ^ ·)\n[GOAL]\ncase h\nd n : ℕ\nhd : d ≠ 0\nhn : n ≠ 0\nhdn : factorization d ≤ factorization n\nK : ℕ →₀ ℕ := factorization n - factorization d\nhK : K = factorization n - factorization d\n⊢ n = d * Finsupp.prod K fun x x_1 => x ^ x_1\n[PROOFSTEP]\nrw [← factorization_prod_pow_eq_self hn, ← factorization_prod_pow_eq_self hd, ←\n  Finsupp.prod_add_index' pow_zero pow_add, hK, add_tsub_cancel_of_le hdn]\n[GOAL]\ncase mpr\nd n : ℕ\nhd : d ≠ 0\nhn : n ≠ 0\n⊢ d ∣ n → factorization d ≤ factorization n\n[PROOFSTEP]\nrintro ⟨c, rfl⟩\n[GOAL]\ncase mpr.intro\nd : ℕ\nhd : d ≠ 0\nc : ℕ\nhn : d * c ≠ 0\n⊢ factorization d ≤ factorization (d * c)\n[PROOFSTEP]\nrw [factorization_mul hd (right_ne_zero_of_mul hn)]\n[GOAL]\ncase mpr.intro\nd : ℕ\nhd : d ≠ 0\nc : ℕ\nhn : d * c ≠ 0\n⊢ factorization d ≤ factorization d + factorization c\n[PROOFSTEP]\nsimp\n[GOAL]\nd n : ℕ\nhd : d ≠ 0\nhn : n ≠ 0\n⊢ (∀ (p : ℕ), Prime p → ↑(factorization d) p ≤ ↑(factorization n) p) ↔ d ∣ n\n[PROOFSTEP]\nrw [← factorization_le_iff_dvd hd hn]\n[GOAL]\nd n : ℕ\nhd : d ≠ 0\nhn : n ≠ 0\n⊢ (∀ (p : ℕ), Prime p → ↑(factorization d) p ≤ ↑(factorization n) p) ↔ factorization d ≤ factorization n\n[PROOFSTEP]\nrefine' ⟨fun h p => (em p.Prime).elim (h p) fun hp => _, fun h p _ => h p⟩\n[GOAL]\nd n : ℕ\nhd : d ≠ 0\nhn : n ≠ 0\nh : ∀ (p : ℕ), Prime p → ↑(factorization d) p ≤ ↑(factorization n) p\np : ℕ\nhp : ¬Prime p\n⊢ ↑(factorization d) p ≤ ↑(factorization n) p\n[PROOFSTEP]\nsimp_rw [factorization_eq_zero_of_non_prime _ hp, le_refl]\n[GOAL]\nn p : ℕ\nhn : n ≠ 0\nhp : Prime p\n⊢ ¬p ^ (↑(factorization n) p + 1) ∣ n\n[PROOFSTEP]\nintro h\n[GOAL]\nn p : ℕ\nhn : n ≠ 0\nhp : Prime p\nh : p ^ (↑(factorization n) p + 1) ∣ n\n⊢ False\n[PROOFSTEP]\nrw [← factorization_le_iff_dvd (pow_pos hp.pos _).ne' hn] at h \n[GOAL]\nn p : ℕ\nhn : n ≠ 0\nhp : Prime p\nh : factorization (p ^ (↑(factorization n) p + 1)) ≤ factorization n\n⊢ False\n[PROOFSTEP]\nsimpa [hp.factorization] using h p\n[GOAL]\na b : ℕ\nhb : b ≠ 0\n⊢ factorization a ≤ factorization (a * b)\n[PROOFSTEP]\nrcases eq_or_ne a 0 with (rfl | ha)\n[GOAL]\ncase inl\nb : ℕ\nhb : b ≠ 0\n⊢ factorization 0 ≤ factorization (0 * b)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\na b : ℕ\nhb : b ≠ 0\nha : a ≠ 0\n⊢ factorization a ≤ factorization (a * b)\n[PROOFSTEP]\nrw [factorization_le_iff_dvd ha <| mul_ne_zero ha hb]\n[GOAL]\ncase inr\na b : ℕ\nhb : b ≠ 0\nha : a ≠ 0\n⊢ a ∣ a * b\n[PROOFSTEP]\nexact Dvd.intro b rfl\n[GOAL]\na b : ℕ\nha : a ≠ 0\n⊢ factorization b ≤ factorization (a * b)\n[PROOFSTEP]\nrw [mul_comm]\n[GOAL]\na b : ℕ\nha : a ≠ 0\n⊢ factorization b ≤ factorization (b * a)\n[PROOFSTEP]\napply factorization_le_factorization_mul_left ha\n[GOAL]\np k n : ℕ\npp : Prime p\nhn : n ≠ 0\n⊢ p ^ k ∣ n ↔ k ≤ ↑(Nat.factorization n) p\n[PROOFSTEP]\nrw [← factorization_le_iff_dvd (pow_pos pp.pos k).ne' hn, pp.factorization_pow, single_le_iff]\n[GOAL]\np k n : ℕ\npp : Prime p\nhn : n ≠ 0\n⊢ p ^ k ∣ n ↔ p ^ k ∣ p ^ ↑(Nat.factorization n) p\n[PROOFSTEP]\nrw [pow_dvd_pow_iff_le_right pp.one_lt, pp.pow_dvd_iff_le_factorization hn]\n[GOAL]\np n : ℕ\npp : Prime p\nhn : n ≠ 0\n⊢ p ∣ n ↔ p ^ 1 ∣ n\n[PROOFSTEP]\nsimp\n[GOAL]\na b : ℕ\nha : a ≠ 0\nhab : a < b\n⊢ ∃ p, ↑(factorization a) p < ↑(factorization b) p\n[PROOFSTEP]\nhave hb : b ≠ 0 := (ha.bot_lt.trans hab).ne'\n[GOAL]\na b : ℕ\nha : a ≠ 0\nhab : a < b\nhb : b ≠ 0\n⊢ ∃ p, ↑(factorization a) p < ↑(factorization b) p\n[PROOFSTEP]\ncontrapose! hab\n[GOAL]\na b : ℕ\nha : a ≠ 0\nhb : b ≠ 0\nhab : ∀ (p : ℕ), ↑(factorization b) p ≤ ↑(factorization a) p\n⊢ b ≤ a\n[PROOFSTEP]\nrw [← Finsupp.le_def, factorization_le_iff_dvd hb ha] at hab \n[GOAL]\na b : ℕ\nha : a ≠ 0\nhb : b ≠ 0\nhab : b ∣ a\n⊢ b ≤ a\n[PROOFSTEP]\nexact le_of_dvd ha.bot_lt hab\n[GOAL]\nd n : ℕ\nh : d ∣ n\n⊢ factorization (n / d) = factorization n - factorization d\n[PROOFSTEP]\nrcases eq_or_ne d 0 with (rfl | hd)\n[GOAL]\ncase inl\nn : ℕ\nh : 0 ∣ n\n⊢ factorization (n / 0) = factorization n - factorization 0\n[PROOFSTEP]\nsimp [zero_dvd_iff.mp h]\n[GOAL]\ncase inr\nd n : ℕ\nh : d ∣ n\nhd : d ≠ 0\n⊢ factorization (n / d) = factorization n - factorization d\n[PROOFSTEP]\nrcases eq_or_ne n 0 with (rfl | hn)\n[GOAL]\ncase inr.inl\nd : ℕ\nhd : d ≠ 0\nh : d ∣ 0\n⊢ factorization (0 / d) = factorization 0 - factorization d\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr.inr\nd n : ℕ\nh : d ∣ n\nhd : d ≠ 0\nhn : n ≠ 0\n⊢ factorization (n / d) = factorization n - factorization d\n[PROOFSTEP]\napply add_left_injective d.factorization\n[GOAL]\ncase inr.inr.a\nd n : ℕ\nh : d ∣ n\nhd : d ≠ 0\nhn : n ≠ 0\n⊢ (fun x => x + factorization d) (factorization (n / d)) =\n    (fun x => x + factorization d) (factorization n - factorization d)\n[PROOFSTEP]\nsimp only\n[GOAL]\ncase inr.inr.a\nd n : ℕ\nh : d ∣ n\nhd : d ≠ 0\nhn : n ≠ 0\n⊢ factorization (n / d) + factorization d = factorization n - factorization d + factorization d\n[PROOFSTEP]\nrw [tsub_add_cancel_of_le <| (Nat.factorization_le_iff_dvd hd hn).mpr h, ←\n  Nat.factorization_mul (Nat.div_pos (Nat.le_of_dvd hn.bot_lt h) hd.bot_lt).ne' hd, Nat.div_mul_cancel h]\n[GOAL]\nn p : ℕ\nhp : Prime p\nhn : n ≠ 0\n⊢ ¬p ∣ n / p ^ ↑(factorization n) p\n[PROOFSTEP]\nrw [Nat.Prime.dvd_iff_one_le_factorization hp (ord_compl_pos p hn).ne']\n[GOAL]\nn p : ℕ\nhp : Prime p\nhn : n ≠ 0\n⊢ ¬1 ≤ ↑(factorization (n / p ^ ↑(factorization n) p)) p\n[PROOFSTEP]\nrw [Nat.factorization_div (Nat.ord_proj_dvd n p)]\n[GOAL]\nn p : ℕ\nhp : Prime p\nhn : n ≠ 0\n⊢ ¬1 ≤ ↑(factorization n - factorization (p ^ ↑(factorization n) p)) p\n[PROOFSTEP]\nsimp [hp.factorization]\n[GOAL]\nn p : ℕ\n⊢ factorization (n / p ^ ↑(factorization n) p) = Finsupp.erase p (factorization n)\n[PROOFSTEP]\nrcases eq_or_ne n 0 with (rfl | hn)\n[GOAL]\ncase inl\np : ℕ\n⊢ factorization (0 / p ^ ↑(factorization 0) p) = Finsupp.erase p (factorization 0)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\nn p : ℕ\nhn : n ≠ 0\n⊢ factorization (n / p ^ ↑(factorization n) p) = Finsupp.erase p (factorization n)\n[PROOFSTEP]\nby_cases pp : p.Prime\n[GOAL]\ncase pos\nn p : ℕ\nhn : n ≠ 0\npp : Prime p\n⊢ factorization (n / p ^ ↑(factorization n) p) = Finsupp.erase p (factorization n)\ncase neg\nn p : ℕ\nhn : n ≠ 0\npp : ¬Prime p\n⊢ factorization (n / p ^ ↑(factorization n) p) = Finsupp.erase p (factorization n)\n[PROOFSTEP]\ncase neg =>\n  -- porting note: needed to solve side goal explicitly\n  rw [Finsupp.erase_of_not_mem_support]\n  · simp [pp]\n  · simp [mt prime_of_mem_factors pp]\n[GOAL]\nn p : ℕ\nhn : n ≠ 0\npp : ¬Prime p\n⊢ factorization (n / p ^ ↑(factorization n) p) = Finsupp.erase p (factorization n)\n[PROOFSTEP]\ncase neg =>\n  -- porting note: needed to solve side goal explicitly\n  rw [Finsupp.erase_of_not_mem_support]\n  · simp [pp]\n  · simp [mt prime_of_mem_factors pp]\n[GOAL]\nn p : ℕ\nhn : n ≠ 0\npp : ¬Prime p\n⊢ factorization (n / p ^ ↑(factorization n) p) = Finsupp.erase p (factorization n)\n[PROOFSTEP]\nrw [Finsupp.erase_of_not_mem_support]\n[GOAL]\nn p : ℕ\nhn : n ≠ 0\npp : ¬Prime p\n⊢ factorization (n / p ^ ↑(factorization n) p) = factorization n\n[PROOFSTEP]\nsimp [pp]\n[GOAL]\nn p : ℕ\nhn : n ≠ 0\npp : ¬Prime p\n⊢ ¬p ∈ (factorization n).support\n[PROOFSTEP]\nsimp [mt prime_of_mem_factors pp]\n[GOAL]\ncase pos\nn p : ℕ\nhn : n ≠ 0\npp : Prime p\n⊢ factorization (n / p ^ ↑(factorization n) p) = Finsupp.erase p (factorization n)\n[PROOFSTEP]\next q\n[GOAL]\ncase pos.h\nn p : ℕ\nhn : n ≠ 0\npp : Prime p\nq : ℕ\n⊢ ↑(factorization (n / p ^ ↑(factorization n) p)) q = ↑(Finsupp.erase p (factorization n)) q\n[PROOFSTEP]\nrcases eq_or_ne q p with (rfl | hqp)\n[GOAL]\ncase pos.h.inl\nn : ℕ\nhn : n ≠ 0\nq : ℕ\npp : Prime q\n⊢ ↑(factorization (n / q ^ ↑(factorization n) q)) q = ↑(Finsupp.erase q (factorization n)) q\n[PROOFSTEP]\nsimp only [Finsupp.erase_same, factorization_eq_zero_iff, not_dvd_ord_compl pp hn]\n[GOAL]\ncase pos.h.inl\nn : ℕ\nhn : n ≠ 0\nq : ℕ\npp : Prime q\n⊢ ¬Prime q ∨ True ∨ n / q ^ ↑(factorization n) q = 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase pos.h.inr\nn p : ℕ\nhn : n ≠ 0\npp : Prime p\nq : ℕ\nhqp : q ≠ p\n⊢ ↑(factorization (n / p ^ ↑(factorization n) p)) q = ↑(Finsupp.erase p (factorization n)) q\n[PROOFSTEP]\nrw [Finsupp.erase_ne hqp, factorization_div (ord_proj_dvd n p)]\n[GOAL]\ncase pos.h.inr\nn p : ℕ\nhn : n ≠ 0\npp : Prime p\nq : ℕ\nhqp : q ≠ p\n⊢ ↑(factorization n - factorization (p ^ ↑(factorization n) p)) q = ↑(factorization n) q\n[PROOFSTEP]\nsimp [pp.factorization, hqp.symm]\n[GOAL]\np d n : ℕ\nhdn : d ∣ n\nhpd : ¬p ∣ d\n⊢ d ∣ n / p ^ ↑(factorization n) p\n[PROOFSTEP]\nrcases eq_or_ne n 0 with (rfl | hn0)\n[GOAL]\ncase inl\np d : ℕ\nhpd : ¬p ∣ d\nhdn : d ∣ 0\n⊢ d ∣ 0 / p ^ ↑(factorization 0) p\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\np d n : ℕ\nhdn : d ∣ n\nhpd : ¬p ∣ d\nhn0 : n ≠ 0\n⊢ d ∣ n / p ^ ↑(factorization n) p\n[PROOFSTEP]\nrcases eq_or_ne d 0 with (rfl | hd0)\n[GOAL]\ncase inr.inl\np n : ℕ\nhn0 : n ≠ 0\nhdn : 0 ∣ n\nhpd : ¬p ∣ 0\n⊢ 0 ∣ n / p ^ ↑(factorization n) p\n[PROOFSTEP]\nsimp at hpd \n[GOAL]\ncase inr.inr\np d n : ℕ\nhdn : d ∣ n\nhpd : ¬p ∣ d\nhn0 : n ≠ 0\nhd0 : d ≠ 0\n⊢ d ∣ n / p ^ ↑(factorization n) p\n[PROOFSTEP]\nrw [← factorization_le_iff_dvd hd0 (ord_compl_pos p hn0).ne', factorization_ord_compl]\n[GOAL]\ncase inr.inr\np d n : ℕ\nhdn : d ∣ n\nhpd : ¬p ∣ d\nhn0 : n ≠ 0\nhd0 : d ≠ 0\n⊢ factorization d ≤ Finsupp.erase p (factorization n)\n[PROOFSTEP]\nintro q\n[GOAL]\ncase inr.inr\np d n : ℕ\nhdn : d ∣ n\nhpd : ¬p ∣ d\nhn0 : n ≠ 0\nhd0 : d ≠ 0\nq : ℕ\n⊢ ↑(factorization d) q ≤ ↑(Finsupp.erase p (factorization n)) q\n[PROOFSTEP]\nrcases eq_or_ne q p with (rfl | hqp)\n[GOAL]\ncase inr.inr.inl\nd n : ℕ\nhdn : d ∣ n\nhn0 : n ≠ 0\nhd0 : d ≠ 0\nq : ℕ\nhpd : ¬q ∣ d\n⊢ ↑(factorization d) q ≤ ↑(Finsupp.erase q (factorization n)) q\n[PROOFSTEP]\nsimp [factorization_eq_zero_iff, hpd]\n[GOAL]\ncase inr.inr.inr\np d n : ℕ\nhdn : d ∣ n\nhpd : ¬p ∣ d\nhn0 : n ≠ 0\nhd0 : d ≠ 0\nq : ℕ\nhqp : q ≠ p\n⊢ ↑(factorization d) q ≤ ↑(Finsupp.erase p (factorization n)) q\n[PROOFSTEP]\nsimp [hqp, (factorization_le_iff_dvd hd0 hn0).2 hdn q]\n[GOAL]\nd n : ℕ\nhd : d ≠ 0\nhdn : d ≤ n\n⊢ d ∣ n ↔ factorization (n / d) = factorization n - factorization d\n[PROOFSTEP]\nrefine' ⟨factorization_div, _⟩\n[GOAL]\nd n : ℕ\nhd : d ≠ 0\nhdn : d ≤ n\n⊢ factorization (n / d) = factorization n - factorization d → d ∣ n\n[PROOFSTEP]\nrcases eq_or_lt_of_le hdn with (rfl | hd_lt_n)\n[GOAL]\ncase inl\nd : ℕ\nhd : d ≠ 0\nhdn : d ≤ d\n⊢ factorization (d / d) = factorization d - factorization d → d ∣ d\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\nd n : ℕ\nhd : d ≠ 0\nhdn : d ≤ n\nhd_lt_n : d < n\n⊢ factorization (n / d) = factorization n - factorization d → d ∣ n\n[PROOFSTEP]\nhave h1 : n / d ≠ 0 := fun H => Nat.lt_asymm hd_lt_n ((Nat.div_eq_zero_iff hd.bot_lt).mp H)\n[GOAL]\ncase inr\nd n : ℕ\nhd : d ≠ 0\nhdn : d ≤ n\nhd_lt_n : d < n\nh1 : n / d ≠ 0\n⊢ factorization (n / d) = factorization n - factorization d → d ∣ n\n[PROOFSTEP]\nintro h\n[GOAL]\ncase inr\nd n : ℕ\nhd : d ≠ 0\nhdn : d ≤ n\nhd_lt_n : d < n\nh1 : n / d ≠ 0\nh : factorization (n / d) = factorization n - factorization d\n⊢ d ∣ n\n[PROOFSTEP]\nrw [dvd_iff_le_div_mul n d]\n[GOAL]\ncase inr\nd n : ℕ\nhd : d ≠ 0\nhdn : d ≤ n\nhd_lt_n : d < n\nh1 : n / d ≠ 0\nh : factorization (n / d) = factorization n - factorization d\n⊢ n ≤ n / d * d\n[PROOFSTEP]\nby_contra h2\n[GOAL]\ncase inr\nd n : ℕ\nhd : d ≠ 0\nhdn : d ≤ n\nhd_lt_n : d < n\nh1 : n / d ≠ 0\nh : factorization (n / d) = factorization n - factorization d\nh2 : ¬n ≤ n / d * d\n⊢ False\n[PROOFSTEP]\ncases' exists_factorization_lt_of_lt (mul_ne_zero h1 hd) (not_le.mp h2) with p hp\n[GOAL]\ncase inr.intro\nd n : ℕ\nhd : d ≠ 0\nhdn : d ≤ n\nhd_lt_n : d < n\nh1 : n / d ≠ 0\nh : factorization (n / d) = factorization n - factorization d\nh2 : ¬n ≤ n / d * d\np : ℕ\nhp : ↑(factorization (n / d * d)) p < ↑(factorization n) p\n⊢ False\n[PROOFSTEP]\nrwa [factorization_mul h1 hd, add_apply, ← lt_tsub_iff_right, h, tsub_apply, lt_self_iff_false] at hp \n[GOAL]\na b : ℕ\nhb0 : b ≠ 0\nhab : a ∣ b\np : ℕ\n⊢ p ^ ↑(factorization a) p ∣ p ^ ↑(factorization b) p\n[PROOFSTEP]\nrcases em' p.Prime with (pp | pp)\n[GOAL]\ncase inl\na b : ℕ\nhb0 : b ≠ 0\nhab : a ∣ b\np : ℕ\npp : ¬Prime p\n⊢ p ^ ↑(factorization a) p ∣ p ^ ↑(factorization b) p\n[PROOFSTEP]\nsimp [pp]\n[GOAL]\ncase inr\na b : ℕ\nhb0 : b ≠ 0\nhab : a ∣ b\np : ℕ\npp : Prime p\n⊢ p ^ ↑(factorization a) p ∣ p ^ ↑(factorization b) p\n[PROOFSTEP]\nrcases eq_or_ne a 0 with (rfl | ha0)\n[GOAL]\ncase inr.inl\nb : ℕ\nhb0 : b ≠ 0\np : ℕ\npp : Prime p\nhab : 0 ∣ b\n⊢ p ^ ↑(factorization 0) p ∣ p ^ ↑(factorization b) p\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr.inr\na b : ℕ\nhb0 : b ≠ 0\nhab : a ∣ b\np : ℕ\npp : Prime p\nha0 : a ≠ 0\n⊢ p ^ ↑(factorization a) p ∣ p ^ ↑(factorization b) p\n[PROOFSTEP]\nrw [pow_dvd_pow_iff_le_right pp.one_lt]\n[GOAL]\ncase inr.inr\na b : ℕ\nhb0 : b ≠ 0\nhab : a ∣ b\np : ℕ\npp : Prime p\nha0 : a ≠ 0\n⊢ ↑(factorization a) p ≤ ↑(factorization b) p\n[PROOFSTEP]\nexact (factorization_le_iff_dvd ha0 hb0).2 hab p\n[GOAL]\na b : ℕ\nha0 : a ≠ 0\nhb0 : b ≠ 0\n⊢ (∀ (p : ℕ), p ^ ↑(factorization a) p ∣ p ^ ↑(factorization b) p) ↔ a ∣ b\n[PROOFSTEP]\nrefine' ⟨fun h => _, fun hab p => ord_proj_dvd_ord_proj_of_dvd hb0 hab p⟩\n[GOAL]\na b : ℕ\nha0 : a ≠ 0\nhb0 : b ≠ 0\nh : ∀ (p : ℕ), p ^ ↑(factorization a) p ∣ p ^ ↑(factorization b) p\n⊢ a ∣ b\n[PROOFSTEP]\nrw [← factorization_le_iff_dvd ha0 hb0]\n[GOAL]\na b : ℕ\nha0 : a ≠ 0\nhb0 : b ≠ 0\nh : ∀ (p : ℕ), p ^ ↑(factorization a) p ∣ p ^ ↑(factorization b) p\n⊢ factorization a ≤ factorization b\n[PROOFSTEP]\nintro q\n[GOAL]\na b : ℕ\nha0 : a ≠ 0\nhb0 : b ≠ 0\nh : ∀ (p : ℕ), p ^ ↑(factorization a) p ∣ p ^ ↑(factorization b) p\nq : ℕ\n⊢ ↑(factorization a) q ≤ ↑(factorization b) q\n[PROOFSTEP]\nrcases le_or_lt q 1 with (hq_le | hq1)\n[GOAL]\ncase inl\na b : ℕ\nha0 : a ≠ 0\nhb0 : b ≠ 0\nh : ∀ (p : ℕ), p ^ ↑(factorization a) p ∣ p ^ ↑(factorization b) p\nq : ℕ\nhq_le : q ≤ 1\n⊢ ↑(factorization a) q ≤ ↑(factorization b) q\n[PROOFSTEP]\ninterval_cases q\n[GOAL]\ncase inl.«0»\na b : ℕ\nha0 : a ≠ 0\nhb0 : b ≠ 0\nh : ∀ (p : ℕ), p ^ ↑(factorization a) p ∣ p ^ ↑(factorization b) p\nq : ℕ\nhq_le : 0 ≤ 1\n⊢ ↑(factorization a) 0 ≤ ↑(factorization b) 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inl.«1»\na b : ℕ\nha0 : a ≠ 0\nhb0 : b ≠ 0\nh : ∀ (p : ℕ), p ^ ↑(factorization a) p ∣ p ^ ↑(factorization b) p\nq : ℕ\nhq_le : 1 ≤ 1\n⊢ ↑(factorization a) 1 ≤ ↑(factorization b) 1\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\na b : ℕ\nha0 : a ≠ 0\nhb0 : b ≠ 0\nh : ∀ (p : ℕ), p ^ ↑(factorization a) p ∣ p ^ ↑(factorization b) p\nq : ℕ\nhq1 : 1 < q\n⊢ ↑(factorization a) q ≤ ↑(factorization b) q\n[PROOFSTEP]\nexact (pow_dvd_pow_iff_le_right hq1).1 (h q)\n[GOAL]\na b : ℕ\nhab : a ∣ b\np : ℕ\n⊢ a / p ^ ↑(factorization a) p ∣ b / p ^ ↑(factorization b) p\n[PROOFSTEP]\nrcases em' p.Prime with (pp | pp)\n[GOAL]\ncase inl\na b : ℕ\nhab : a ∣ b\np : ℕ\npp : ¬Prime p\n⊢ a / p ^ ↑(factorization a) p ∣ b / p ^ ↑(factorization b) p\n[PROOFSTEP]\nsimp [pp, hab]\n[GOAL]\ncase inr\na b : ℕ\nhab : a ∣ b\np : ℕ\npp : Prime p\n⊢ a / p ^ ↑(factorization a) p ∣ b / p ^ ↑(factorization b) p\n[PROOFSTEP]\nrcases eq_or_ne b 0 with (rfl | hb0)\n[GOAL]\ncase inr.inl\na p : ℕ\npp : Prime p\nhab : a ∣ 0\n⊢ a / p ^ ↑(factorization a) p ∣ 0 / p ^ ↑(factorization 0) p\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr.inr\na b : ℕ\nhab : a ∣ b\np : ℕ\npp : Prime p\nhb0 : b ≠ 0\n⊢ a / p ^ ↑(factorization a) p ∣ b / p ^ ↑(factorization b) p\n[PROOFSTEP]\nrcases eq_or_ne a 0 with (rfl | ha0)\n[GOAL]\ncase inr.inr.inl\nb p : ℕ\npp : Prime p\nhb0 : b ≠ 0\nhab : 0 ∣ b\n⊢ 0 / p ^ ↑(factorization 0) p ∣ b / p ^ ↑(factorization b) p\n[PROOFSTEP]\ncases hb0 (zero_dvd_iff.1 hab)\n[GOAL]\ncase inr.inr.inr\na b : ℕ\nhab : a ∣ b\np : ℕ\npp : Prime p\nhb0 : b ≠ 0\nha0 : a ≠ 0\n⊢ a / p ^ ↑(factorization a) p ∣ b / p ^ ↑(factorization b) p\n[PROOFSTEP]\nhave ha := (Nat.div_pos (ord_proj_le p ha0) (ord_proj_pos a p)).ne'\n[GOAL]\ncase inr.inr.inr\na b : ℕ\nhab : a ∣ b\np : ℕ\npp : Prime p\nhb0 : b ≠ 0\nha0 : a ≠ 0\nha : a / p ^ ↑(factorization a) p ≠ 0\n⊢ a / p ^ ↑(factorization a) p ∣ b / p ^ ↑(factorization b) p\n[PROOFSTEP]\nhave hb := (Nat.div_pos (ord_proj_le p hb0) (ord_proj_pos b p)).ne'\n[GOAL]\ncase inr.inr.inr\na b : ℕ\nhab : a ∣ b\np : ℕ\npp : Prime p\nhb0 : b ≠ 0\nha0 : a ≠ 0\nha : a / p ^ ↑(factorization a) p ≠ 0\nhb : b / p ^ ↑(factorization b) p ≠ 0\n⊢ a / p ^ ↑(factorization a) p ∣ b / p ^ ↑(factorization b) p\n[PROOFSTEP]\nrw [← factorization_le_iff_dvd ha hb, factorization_ord_compl a p, factorization_ord_compl b p]\n[GOAL]\ncase inr.inr.inr\na b : ℕ\nhab : a ∣ b\np : ℕ\npp : Prime p\nhb0 : b ≠ 0\nha0 : a ≠ 0\nha : a / p ^ ↑(factorization a) p ≠ 0\nhb : b / p ^ ↑(factorization b) p ≠ 0\n⊢ Finsupp.erase p (factorization a) ≤ Finsupp.erase p (factorization b)\n[PROOFSTEP]\nintro q\n[GOAL]\ncase inr.inr.inr\na b : ℕ\nhab : a ∣ b\np : ℕ\npp : Prime p\nhb0 : b ≠ 0\nha0 : a ≠ 0\nha : a / p ^ ↑(factorization a) p ≠ 0\nhb : b / p ^ ↑(factorization b) p ≠ 0\nq : ℕ\n⊢ ↑(Finsupp.erase p (factorization a)) q ≤ ↑(Finsupp.erase p (factorization b)) q\n[PROOFSTEP]\nrcases eq_or_ne q p with (rfl | hqp)\n[GOAL]\ncase inr.inr.inr.inl\na b : ℕ\nhab : a ∣ b\nhb0 : b ≠ 0\nha0 : a ≠ 0\nq : ℕ\npp : Prime q\nha : a / q ^ ↑(factorization a) q ≠ 0\nhb : b / q ^ ↑(factorization b) q ≠ 0\n⊢ ↑(Finsupp.erase q (factorization a)) q ≤ ↑(Finsupp.erase q (factorization b)) q\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr.inr.inr.inr\na b : ℕ\nhab : a ∣ b\np : ℕ\npp : Prime p\nhb0 : b ≠ 0\nha0 : a ≠ 0\nha : a / p ^ ↑(factorization a) p ≠ 0\nhb : b / p ^ ↑(factorization b) p ≠ 0\nq : ℕ\nhqp : q ≠ p\n⊢ ↑(Finsupp.erase p (factorization a)) q ≤ ↑(Finsupp.erase p (factorization b)) q\n[PROOFSTEP]\nsimp_rw [erase_ne hqp]\n[GOAL]\ncase inr.inr.inr.inr\na b : ℕ\nhab : a ∣ b\np : ℕ\npp : Prime p\nhb0 : b ≠ 0\nha0 : a ≠ 0\nha : a / p ^ ↑(factorization a) p ≠ 0\nhb : b / p ^ ↑(factorization b) p ≠ 0\nq : ℕ\nhqp : q ≠ p\n⊢ ↑(factorization a) q ≤ ↑(factorization b) q\n[PROOFSTEP]\nexact (factorization_le_iff_dvd ha0 hb0).2 hab q\n[GOAL]\na b : ℕ\n⊢ (∀ (p : ℕ), a / p ^ ↑(factorization a) p ∣ b / p ^ ↑(factorization b) p) ↔ a ∣ b\n[PROOFSTEP]\nrefine' ⟨fun h => _, fun hab p => ord_compl_dvd_ord_compl_of_dvd hab p⟩\n[GOAL]\na b : ℕ\nh : ∀ (p : ℕ), a / p ^ ↑(factorization a) p ∣ b / p ^ ↑(factorization b) p\n⊢ a ∣ b\n[PROOFSTEP]\nrcases eq_or_ne b 0 with (rfl | hb0)\n[GOAL]\ncase inl\na : ℕ\nh : ∀ (p : ℕ), a / p ^ ↑(factorization a) p ∣ 0 / p ^ ↑(factorization 0) p\n⊢ a ∣ 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\na b : ℕ\nh : ∀ (p : ℕ), a / p ^ ↑(factorization a) p ∣ b / p ^ ↑(factorization b) p\nhb0 : b ≠ 0\n⊢ a ∣ b\n[PROOFSTEP]\nby_cases pa : a.Prime\n[GOAL]\ncase pos\na b : ℕ\nh : ∀ (p : ℕ), a / p ^ ↑(factorization a) p ∣ b / p ^ ↑(factorization b) p\nhb0 : b ≠ 0\npa : Prime a\n⊢ a ∣ b\ncase neg\na b : ℕ\nh : ∀ (p : ℕ), a / p ^ ↑(factorization a) p ∣ b / p ^ ↑(factorization b) p\nhb0 : b ≠ 0\npa : ¬Prime a\n⊢ a ∣ b\n[PROOFSTEP]\ncase neg => simpa [pa] using h a\n[GOAL]\na b : ℕ\nh : ∀ (p : ℕ), a / p ^ ↑(factorization a) p ∣ b / p ^ ↑(factorization b) p\nhb0 : b ≠ 0\npa : ¬Prime a\n⊢ a ∣ b\n[PROOFSTEP]\ncase neg => simpa [pa] using h a\n[GOAL]\na b : ℕ\nh : ∀ (p : ℕ), a / p ^ ↑(factorization a) p ∣ b / p ^ ↑(factorization b) p\nhb0 : b ≠ 0\npa : ¬Prime a\n⊢ a ∣ b\n[PROOFSTEP]\nsimpa [pa] using h a\n[GOAL]\ncase pos\na b : ℕ\nh : ∀ (p : ℕ), a / p ^ ↑(factorization a) p ∣ b / p ^ ↑(factorization b) p\nhb0 : b ≠ 0\npa : Prime a\n⊢ a ∣ b\n[PROOFSTEP]\nby_cases pb : b.Prime\n[GOAL]\ncase pos\na b : ℕ\nh : ∀ (p : ℕ), a / p ^ ↑(factorization a) p ∣ b / p ^ ↑(factorization b) p\nhb0 : b ≠ 0\npa : Prime a\npb : Prime b\n⊢ a ∣ b\ncase neg\na b : ℕ\nh : ∀ (p : ℕ), a / p ^ ↑(factorization a) p ∣ b / p ^ ↑(factorization b) p\nhb0 : b ≠ 0\npa : Prime a\npb : ¬Prime b\n⊢ a ∣ b\n[PROOFSTEP]\ncase neg => simpa [pb] using h b\n[GOAL]\na b : ℕ\nh : ∀ (p : ℕ), a / p ^ ↑(factorization a) p ∣ b / p ^ ↑(factorization b) p\nhb0 : b ≠ 0\npa : Prime a\npb : ¬Prime b\n⊢ a ∣ b\n[PROOFSTEP]\ncase neg => simpa [pb] using h b\n[GOAL]\na b : ℕ\nh : ∀ (p : ℕ), a / p ^ ↑(factorization a) p ∣ b / p ^ ↑(factorization b) p\nhb0 : b ≠ 0\npa : Prime a\npb : ¬Prime b\n⊢ a ∣ b\n[PROOFSTEP]\nsimpa [pb] using h b\n[GOAL]\ncase pos\na b : ℕ\nh : ∀ (p : ℕ), a / p ^ ↑(factorization a) p ∣ b / p ^ ↑(factorization b) p\nhb0 : b ≠ 0\npa : Prime a\npb : Prime b\n⊢ a ∣ b\n[PROOFSTEP]\nrw [prime_dvd_prime_iff_eq pa pb]\n[GOAL]\ncase pos\na b : ℕ\nh : ∀ (p : ℕ), a / p ^ ↑(factorization a) p ∣ b / p ^ ↑(factorization b) p\nhb0 : b ≠ 0\npa : Prime a\npb : Prime b\n⊢ a = b\n[PROOFSTEP]\nby_contra hab\n[GOAL]\ncase pos\na b : ℕ\nh : ∀ (p : ℕ), a / p ^ ↑(factorization a) p ∣ b / p ^ ↑(factorization b) p\nhb0 : b ≠ 0\npa : Prime a\npb : Prime b\nhab : ¬a = b\n⊢ False\n[PROOFSTEP]\napply pa.ne_one\n[GOAL]\ncase pos\na b : ℕ\nh : ∀ (p : ℕ), a / p ^ ↑(factorization a) p ∣ b / p ^ ↑(factorization b) p\nhb0 : b ≠ 0\npa : Prime a\npb : Prime b\nhab : ¬a = b\n⊢ a = 1\n[PROOFSTEP]\nrw [← Nat.dvd_one, ← Nat.mul_dvd_mul_iff_left hb0.bot_lt, mul_one]\n[GOAL]\ncase pos\na b : ℕ\nh : ∀ (p : ℕ), a / p ^ ↑(factorization a) p ∣ b / p ^ ↑(factorization b) p\nhb0 : b ≠ 0\npa : Prime a\npb : Prime b\nhab : ¬a = b\n⊢ b * a ∣ b\n[PROOFSTEP]\nsimpa [Prime.factorization_self pb, Prime.factorization pa, hab] using h b\n[GOAL]\nn d : ℕ\n⊢ d ∣ n ↔ ∀ (p k : ℕ), Prime p → p ^ k ∣ d → p ^ k ∣ n\n[PROOFSTEP]\nrcases eq_or_ne n 0 with (rfl | hn)\n[GOAL]\ncase inl\nd : ℕ\n⊢ d ∣ 0 ↔ ∀ (p k : ℕ), Prime p → p ^ k ∣ d → p ^ k ∣ 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\nn d : ℕ\nhn : n ≠ 0\n⊢ d ∣ n ↔ ∀ (p k : ℕ), Prime p → p ^ k ∣ d → p ^ k ∣ n\n[PROOFSTEP]\nrcases eq_or_ne d 0 with (rfl | hd)\n[GOAL]\ncase inr.inl\nn : ℕ\nhn : n ≠ 0\n⊢ 0 ∣ n ↔ ∀ (p k : ℕ), Prime p → p ^ k ∣ 0 → p ^ k ∣ n\n[PROOFSTEP]\nsimp only [zero_dvd_iff, hn, false_iff_iff, not_forall]\n[GOAL]\ncase inr.inl\nn : ℕ\nhn : n ≠ 0\n⊢ ∃ x x_1 h x_2, ¬x ^ x_1 ∣ n\n[PROOFSTEP]\nexact ⟨2, n, prime_two, dvd_zero _, mt (le_of_dvd hn.bot_lt) (lt_two_pow n).not_le⟩\n[GOAL]\ncase inr.inr\nn d : ℕ\nhn : n ≠ 0\nhd : d ≠ 0\n⊢ d ∣ n ↔ ∀ (p k : ℕ), Prime p → p ^ k ∣ d → p ^ k ∣ n\n[PROOFSTEP]\nrefine' ⟨fun h p k _ hpkd => dvd_trans hpkd h, _⟩\n[GOAL]\ncase inr.inr\nn d : ℕ\nhn : n ≠ 0\nhd : d ≠ 0\n⊢ (∀ (p k : ℕ), Prime p → p ^ k ∣ d → p ^ k ∣ n) → d ∣ n\n[PROOFSTEP]\nrw [← factorization_prime_le_iff_dvd hd hn]\n[GOAL]\ncase inr.inr\nn d : ℕ\nhn : n ≠ 0\nhd : d ≠ 0\n⊢ (∀ (p k : ℕ), Prime p → p ^ k ∣ d → p ^ k ∣ n) → ∀ (p : ℕ), Prime p → ↑(factorization d) p ≤ ↑(factorization n) p\n[PROOFSTEP]\nintro h p pp\n[GOAL]\ncase inr.inr\nn d : ℕ\nhn : n ≠ 0\nhd : d ≠ 0\nh : ∀ (p k : ℕ), Prime p → p ^ k ∣ d → p ^ k ∣ n\np : ℕ\npp : Prime p\n⊢ ↑(factorization d) p ≤ ↑(factorization n) p\n[PROOFSTEP]\nsimp_rw [← pp.pow_dvd_iff_le_factorization hn]\n[GOAL]\ncase inr.inr\nn d : ℕ\nhn : n ≠ 0\nhd : d ≠ 0\nh : ∀ (p k : ℕ), Prime p → p ^ k ∣ d → p ^ k ∣ n\np : ℕ\npp : Prime p\n⊢ p ^ ↑(factorization d) p ∣ n\n[PROOFSTEP]\nexact h p _ pp (ord_proj_dvd _ _)\n[GOAL]\nn : ℕ\n⊢ ∏ p in toFinset (factors n), p ∣ n\n[PROOFSTEP]\nby_cases hn : n = 0\n[GOAL]\ncase pos\nn : ℕ\nhn : n = 0\n⊢ ∏ p in toFinset (factors n), p ∣ n\n[PROOFSTEP]\nsubst hn\n[GOAL]\ncase pos\n⊢ ∏ p in toFinset (factors 0), p ∣ 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg\nn : ℕ\nhn : ¬n = 0\n⊢ ∏ p in toFinset (factors n), p ∣ n\n[PROOFSTEP]\nsimpa [prod_factors hn] using Multiset.toFinset_prod_dvd_prod (n.factors : Multiset ℕ)\n[GOAL]\na b : ℕ\nha_pos : a ≠ 0\nhb_pos : b ≠ 0\n⊢ factorization (gcd a b) = factorization a ⊓ factorization b\n[PROOFSTEP]\nlet dfac := a.factorization ⊓ b.factorization\n[GOAL]\na b : ℕ\nha_pos : a ≠ 0\nhb_pos : b ≠ 0\ndfac : ℕ →₀ ℕ := factorization a ⊓ factorization b\n⊢ factorization (gcd a b) = factorization a ⊓ factorization b\n[PROOFSTEP]\nlet d := dfac.prod Nat.pow\n[GOAL]\na b : ℕ\nha_pos : a ≠ 0\nhb_pos : b ≠ 0\ndfac : ℕ →₀ ℕ := factorization a ⊓ factorization b\nd : ℕ := Finsupp.prod dfac Nat.pow\n⊢ factorization (gcd a b) = factorization a ⊓ factorization b\n[PROOFSTEP]\nhave dfac_prime : ∀ p : ℕ, p ∈ dfac.support → Prime p :=\n  by\n  intro p hp\n  have : p ∈ a.factors ∧ p ∈ b.factors := by simpa using hp\n  exact prime_of_mem_factors this.1\n[GOAL]\na b : ℕ\nha_pos : a ≠ 0\nhb_pos : b ≠ 0\ndfac : ℕ →₀ ℕ := factorization a ⊓ factorization b\nd : ℕ := Finsupp.prod dfac Nat.pow\n⊢ ∀ (p : ℕ), p ∈ dfac.support → Prime p\n[PROOFSTEP]\nintro p hp\n[GOAL]\na b : ℕ\nha_pos : a ≠ 0\nhb_pos : b ≠ 0\ndfac : ℕ →₀ ℕ := factorization a ⊓ factorization b\nd : ℕ := Finsupp.prod dfac Nat.pow\np : ℕ\nhp : p ∈ dfac.support\n⊢ Prime p\n[PROOFSTEP]\nhave : p ∈ a.factors ∧ p ∈ b.factors := by simpa using hp\n[GOAL]\na b : ℕ\nha_pos : a ≠ 0\nhb_pos : b ≠ 0\ndfac : ℕ →₀ ℕ := factorization a ⊓ factorization b\nd : ℕ := Finsupp.prod dfac Nat.pow\np : ℕ\nhp : p ∈ dfac.support\n⊢ p ∈ factors a ∧ p ∈ factors b\n[PROOFSTEP]\nsimpa using hp\n[GOAL]\na b : ℕ\nha_pos : a ≠ 0\nhb_pos : b ≠ 0\ndfac : ℕ →₀ ℕ := factorization a ⊓ factorization b\nd : ℕ := Finsupp.prod dfac Nat.pow\np : ℕ\nhp : p ∈ dfac.support\nthis : p ∈ factors a ∧ p ∈ factors b\n⊢ Prime p\n[PROOFSTEP]\nexact prime_of_mem_factors this.1\n[GOAL]\na b : ℕ\nha_pos : a ≠ 0\nhb_pos : b ≠ 0\ndfac : ℕ →₀ ℕ := factorization a ⊓ factorization b\nd : ℕ := Finsupp.prod dfac Nat.pow\ndfac_prime : ∀ (p : ℕ), p ∈ dfac.support → Prime p\n⊢ factorization (gcd a b) = factorization a ⊓ factorization b\n[PROOFSTEP]\nhave h1 : d.factorization = dfac := prod_pow_factorization_eq_self dfac_prime\n[GOAL]\na b : ℕ\nha_pos : a ≠ 0\nhb_pos : b ≠ 0\ndfac : ℕ →₀ ℕ := factorization a ⊓ factorization b\nd : ℕ := Finsupp.prod dfac Nat.pow\ndfac_prime : ∀ (p : ℕ), p ∈ dfac.support → Prime p\nh1 : factorization d = dfac\n⊢ factorization (gcd a b) = factorization a ⊓ factorization b\n[PROOFSTEP]\nhave hd_pos : d ≠ 0 := (factorizationEquiv.invFun ⟨dfac, dfac_prime⟩).2.ne'\n[GOAL]\na b : ℕ\nha_pos : a ≠ 0\nhb_pos : b ≠ 0\ndfac : ℕ →₀ ℕ := factorization a ⊓ factorization b\nd : ℕ := Finsupp.prod dfac Nat.pow\ndfac_prime : ∀ (p : ℕ), p ∈ dfac.support → Prime p\nh1 : factorization d = dfac\nhd_pos : d ≠ 0\n⊢ factorization (gcd a b) = factorization a ⊓ factorization b\n[PROOFSTEP]\nsuffices d = gcd a b by rwa [← this]\n[GOAL]\na b : ℕ\nha_pos : a ≠ 0\nhb_pos : b ≠ 0\ndfac : ℕ →₀ ℕ := factorization a ⊓ factorization b\nd : ℕ := Finsupp.prod dfac Nat.pow\ndfac_prime : ∀ (p : ℕ), p ∈ dfac.support → Prime p\nh1 : factorization d = dfac\nhd_pos : d ≠ 0\nthis : d = gcd a b\n⊢ factorization (gcd a b) = factorization a ⊓ factorization b\n[PROOFSTEP]\nrwa [← this]\n[GOAL]\na b : ℕ\nha_pos : a ≠ 0\nhb_pos : b ≠ 0\ndfac : ℕ →₀ ℕ := factorization a ⊓ factorization b\nd : ℕ := Finsupp.prod dfac Nat.pow\ndfac_prime : ∀ (p : ℕ), p ∈ dfac.support → Prime p\nh1 : factorization d = dfac\nhd_pos : d ≠ 0\n⊢ d = gcd a b\n[PROOFSTEP]\napply gcd_greatest\n[GOAL]\ncase hda\na b : ℕ\nha_pos : a ≠ 0\nhb_pos : b ≠ 0\ndfac : ℕ →₀ ℕ := factorization a ⊓ factorization b\nd : ℕ := Finsupp.prod dfac Nat.pow\ndfac_prime : ∀ (p : ℕ), p ∈ dfac.support → Prime p\nh1 : factorization d = dfac\nhd_pos : d ≠ 0\n⊢ d ∣ a\n[PROOFSTEP]\nrw [← factorization_le_iff_dvd hd_pos ha_pos, h1]\n[GOAL]\ncase hda\na b : ℕ\nha_pos : a ≠ 0\nhb_pos : b ≠ 0\ndfac : ℕ →₀ ℕ := factorization a ⊓ factorization b\nd : ℕ := Finsupp.prod dfac Nat.pow\ndfac_prime : ∀ (p : ℕ), p ∈ dfac.support → Prime p\nh1 : factorization d = dfac\nhd_pos : d ≠ 0\n⊢ dfac ≤ factorization a\n[PROOFSTEP]\nexact inf_le_left\n[GOAL]\ncase hdb\na b : ℕ\nha_pos : a ≠ 0\nhb_pos : b ≠ 0\ndfac : ℕ →₀ ℕ := factorization a ⊓ factorization b\nd : ℕ := Finsupp.prod dfac Nat.pow\ndfac_prime : ∀ (p : ℕ), p ∈ dfac.support → Prime p\nh1 : factorization d = dfac\nhd_pos : d ≠ 0\n⊢ d ∣ b\n[PROOFSTEP]\nrw [← factorization_le_iff_dvd hd_pos hb_pos, h1]\n[GOAL]\ncase hdb\na b : ℕ\nha_pos : a ≠ 0\nhb_pos : b ≠ 0\ndfac : ℕ →₀ ℕ := factorization a ⊓ factorization b\nd : ℕ := Finsupp.prod dfac Nat.pow\ndfac_prime : ∀ (p : ℕ), p ∈ dfac.support → Prime p\nh1 : factorization d = dfac\nhd_pos : d ≠ 0\n⊢ dfac ≤ factorization b\n[PROOFSTEP]\nexact inf_le_right\n[GOAL]\ncase hd\na b : ℕ\nha_pos : a ≠ 0\nhb_pos : b ≠ 0\ndfac : ℕ →₀ ℕ := factorization a ⊓ factorization b\nd : ℕ := Finsupp.prod dfac Nat.pow\ndfac_prime : ∀ (p : ℕ), p ∈ dfac.support → Prime p\nh1 : factorization d = dfac\nhd_pos : d ≠ 0\n⊢ ∀ (e : ℕ), e ∣ a → e ∣ b → e ∣ d\n[PROOFSTEP]\nintro e hea heb\n[GOAL]\ncase hd\na b : ℕ\nha_pos : a ≠ 0\nhb_pos : b ≠ 0\ndfac : ℕ →₀ ℕ := factorization a ⊓ factorization b\nd : ℕ := Finsupp.prod dfac Nat.pow\ndfac_prime : ∀ (p : ℕ), p ∈ dfac.support → Prime p\nh1 : factorization d = dfac\nhd_pos : d ≠ 0\ne : ℕ\nhea : e ∣ a\nheb : e ∣ b\n⊢ e ∣ d\n[PROOFSTEP]\nrcases Decidable.eq_or_ne e 0 with (rfl | he_pos)\n[GOAL]\ncase hd.inl\na b : ℕ\nha_pos : a ≠ 0\nhb_pos : b ≠ 0\ndfac : ℕ →₀ ℕ := factorization a ⊓ factorization b\nd : ℕ := Finsupp.prod dfac Nat.pow\ndfac_prime : ∀ (p : ℕ), p ∈ dfac.support → Prime p\nh1 : factorization d = dfac\nhd_pos : d ≠ 0\nhea : 0 ∣ a\nheb : 0 ∣ b\n⊢ 0 ∣ d\n[PROOFSTEP]\nsimp only [zero_dvd_iff] at hea \n[GOAL]\ncase hd.inl\na b : ℕ\nha_pos : a ≠ 0\nhb_pos : b ≠ 0\ndfac : ℕ →₀ ℕ := factorization a ⊓ factorization b\nd : ℕ := Finsupp.prod dfac Nat.pow\ndfac_prime : ∀ (p : ℕ), p ∈ dfac.support → Prime p\nh1 : factorization d = dfac\nhd_pos : d ≠ 0\nheb : 0 ∣ b\nhea : a = 0\n⊢ 0 ∣ d\n[PROOFSTEP]\ncontradiction\n[GOAL]\ncase hd.inr\na b : ℕ\nha_pos : a ≠ 0\nhb_pos : b ≠ 0\ndfac : ℕ →₀ ℕ := factorization a ⊓ factorization b\nd : ℕ := Finsupp.prod dfac Nat.pow\ndfac_prime : ∀ (p : ℕ), p ∈ dfac.support → Prime p\nh1 : factorization d = dfac\nhd_pos : d ≠ 0\ne : ℕ\nhea : e ∣ a\nheb : e ∣ b\nhe_pos : e ≠ 0\n⊢ e ∣ d\n[PROOFSTEP]\nhave hea' := (factorization_le_iff_dvd he_pos ha_pos).mpr hea\n[GOAL]\ncase hd.inr\na b : ℕ\nha_pos : a ≠ 0\nhb_pos : b ≠ 0\ndfac : ℕ →₀ ℕ := factorization a ⊓ factorization b\nd : ℕ := Finsupp.prod dfac Nat.pow\ndfac_prime : ∀ (p : ℕ), p ∈ dfac.support → Prime p\nh1 : factorization d = dfac\nhd_pos : d ≠ 0\ne : ℕ\nhea : e ∣ a\nheb : e ∣ b\nhe_pos : e ≠ 0\nhea' : factorization e ≤ factorization a\n⊢ e ∣ d\n[PROOFSTEP]\nhave heb' := (factorization_le_iff_dvd he_pos hb_pos).mpr heb\n[GOAL]\ncase hd.inr\na b : ℕ\nha_pos : a ≠ 0\nhb_pos : b ≠ 0\ndfac : ℕ →₀ ℕ := factorization a ⊓ factorization b\nd : ℕ := Finsupp.prod dfac Nat.pow\ndfac_prime : ∀ (p : ℕ), p ∈ dfac.support → Prime p\nh1 : factorization d = dfac\nhd_pos : d ≠ 0\ne : ℕ\nhea : e ∣ a\nheb : e ∣ b\nhe_pos : e ≠ 0\nhea' : factorization e ≤ factorization a\nheb' : factorization e ≤ factorization b\n⊢ e ∣ d\n[PROOFSTEP]\nsimp [← factorization_le_iff_dvd he_pos hd_pos, h1, hea', heb']\n[GOAL]\na b : ℕ\nha : a ≠ 0\nhb : b ≠ 0\n⊢ factorization (lcm a b) = factorization a ⊔ factorization b\n[PROOFSTEP]\nrw [← add_right_inj (a.gcd b).factorization, ←\n  factorization_mul (mt gcd_eq_zero_iff.1 fun h => ha h.1) (lcm_ne_zero ha hb), gcd_mul_lcm, factorization_gcd ha hb,\n  factorization_mul ha hb]\n[GOAL]\na b : ℕ\nha : a ≠ 0\nhb : b ≠ 0\n⊢ factorization a + factorization b = factorization a ⊓ factorization b + factorization a ⊔ factorization b\n[PROOFSTEP]\next1\n[GOAL]\ncase h\na b : ℕ\nha : a ≠ 0\nhb : b ≠ 0\na✝ : ℕ\n⊢ ↑(factorization a + factorization b) a✝ = ↑(factorization a ⊓ factorization b + factorization a ⊔ factorization b) a✝\n[PROOFSTEP]\nexact (min_add_max _ _).symm\n[GOAL]\nβ : Type u_1\ninst✝ : CommMonoid β\nm n : ℕ\nf : ℕ → β\n⊢ Finset.prod (toFinset (factors (gcd m n))) f * Finset.prod (toFinset (factors (m * n))) f =\n    Finset.prod (toFinset (factors m)) f * Finset.prod (toFinset (factors n)) f\n[PROOFSTEP]\nrcases eq_or_ne n 0 with (rfl | hm0)\n[GOAL]\ncase inl\nβ : Type u_1\ninst✝ : CommMonoid β\nm : ℕ\nf : ℕ → β\n⊢ Finset.prod (toFinset (factors (gcd m 0))) f * Finset.prod (toFinset (factors (m * 0))) f =\n    Finset.prod (toFinset (factors m)) f * Finset.prod (toFinset (factors 0)) f\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\nβ : Type u_1\ninst✝ : CommMonoid β\nm n : ℕ\nf : ℕ → β\nhm0 : n ≠ 0\n⊢ Finset.prod (toFinset (factors (gcd m n))) f * Finset.prod (toFinset (factors (m * n))) f =\n    Finset.prod (toFinset (factors m)) f * Finset.prod (toFinset (factors n)) f\n[PROOFSTEP]\nrcases eq_or_ne m 0 with (rfl | hn0)\n[GOAL]\ncase inr.inl\nβ : Type u_1\ninst✝ : CommMonoid β\nn : ℕ\nf : ℕ → β\nhm0 : n ≠ 0\n⊢ Finset.prod (toFinset (factors (gcd 0 n))) f * Finset.prod (toFinset (factors (0 * n))) f =\n    Finset.prod (toFinset (factors 0)) f * Finset.prod (toFinset (factors n)) f\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr.inr\nβ : Type u_1\ninst✝ : CommMonoid β\nm n : ℕ\nf : ℕ → β\nhm0 : n ≠ 0\nhn0 : m ≠ 0\n⊢ Finset.prod (toFinset (factors (gcd m n))) f * Finset.prod (toFinset (factors (m * n))) f =\n    Finset.prod (toFinset (factors m)) f * Finset.prod (toFinset (factors n)) f\n[PROOFSTEP]\nrw [← @Finset.prod_union_inter _ _ m.factors.toFinset n.factors.toFinset, mul_comm]\n[GOAL]\ncase inr.inr\nβ : Type u_1\ninst✝ : CommMonoid β\nm n : ℕ\nf : ℕ → β\nhm0 : n ≠ 0\nhn0 : m ≠ 0\n⊢ Finset.prod (toFinset (factors (m * n))) f * Finset.prod (toFinset (factors (gcd m n))) f =\n    (∏ x in toFinset (factors m) ∪ toFinset (factors n), f x) * ∏ x in toFinset (factors m) ∩ toFinset (factors n), f x\n[PROOFSTEP]\ncongr\n[GOAL]\ncase inr.inr.e_a.e_s\nβ : Type u_1\ninst✝ : CommMonoid β\nm n : ℕ\nf : ℕ → β\nhm0 : n ≠ 0\nhn0 : m ≠ 0\n⊢ toFinset (factors (m * n)) = toFinset (factors m) ∪ toFinset (factors n)\n[PROOFSTEP]\napply factors_mul_toFinset\n[GOAL]\ncase inr.inr.e_a.e_s.ha\nβ : Type u_1\ninst✝ : CommMonoid β\nm n : ℕ\nf : ℕ → β\nhm0 : n ≠ 0\nhn0 : m ≠ 0\n⊢ m ≠ 0\n[PROOFSTEP]\nassumption\n[GOAL]\ncase inr.inr.e_a.e_s.hb\nβ : Type u_1\ninst✝ : CommMonoid β\nm n : ℕ\nf : ℕ → β\nhm0 : n ≠ 0\nhn0 : m ≠ 0\n⊢ n ≠ 0\n[PROOFSTEP]\nassumption\n[GOAL]\ncase inr.inr.e_a.e_s\nβ : Type u_1\ninst✝ : CommMonoid β\nm n : ℕ\nf : ℕ → β\nhm0 : n ≠ 0\nhn0 : m ≠ 0\n⊢ toFinset (factors (gcd m n)) = toFinset (factors m) ∩ toFinset (factors n)\n[PROOFSTEP]\nsimp only [← support_factorization, factorization_gcd hn0 hm0, Finsupp.support_inf]\n[GOAL]\nn p : ℕ\npp : Prime p\nhn : n ≠ 0\n⊢ {i | i ≠ 0 ∧ p ^ i ∣ n} = Set.Icc 1 (↑(factorization n) p)\n[PROOFSTEP]\next\n[GOAL]\ncase h\nn p : ℕ\npp : Prime p\nhn : n ≠ 0\nx✝ : ℕ\n⊢ x✝ ∈ {i | i ≠ 0 ∧ p ^ i ∣ n} ↔ x✝ ∈ Set.Icc 1 (↑(factorization n) p)\n[PROOFSTEP]\nsimp [lt_succ_iff, one_le_iff_ne_zero, pp.pow_dvd_iff_le_factorization hn]\n[GOAL]\nn p : ℕ\npp : Prime p\n⊢ Icc 1 (↑(factorization n) p) = Finset.filter (fun i => p ^ i ∣ n) (Ico 1 n)\n[PROOFSTEP]\nrcases eq_or_ne n 0 with (rfl | hn)\n[GOAL]\ncase inl\np : ℕ\npp : Prime p\n⊢ Icc 1 (↑(factorization 0) p) = Finset.filter (fun i => p ^ i ∣ 0) (Ico 1 0)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\nn p : ℕ\npp : Prime p\nhn : n ≠ 0\n⊢ Icc 1 (↑(factorization n) p) = Finset.filter (fun i => p ^ i ∣ n) (Ico 1 n)\n[PROOFSTEP]\next x\n[GOAL]\ncase inr.a\nn p : ℕ\npp : Prime p\nhn : n ≠ 0\nx : (fun x => ℕ) p\n⊢ x ∈ Icc 1 (↑(factorization n) p) ↔ x ∈ Finset.filter (fun i => p ^ i ∣ n) (Ico 1 n)\n[PROOFSTEP]\nsimp only [mem_Icc, Finset.mem_filter, mem_Ico, and_assoc, and_congr_right_iff, pp.pow_dvd_iff_le_factorization hn,\n  iff_and_self]\n[GOAL]\ncase inr.a\nn p : ℕ\npp : Prime p\nhn : n ≠ 0\nx : (fun x => ℕ) p\n⊢ 1 ≤ x → x ≤ ↑(factorization n) p → x < n\n[PROOFSTEP]\nexact fun _ H => lt_of_le_of_lt H (factorization_lt p hn)\n[GOAL]\nn p : ℕ\npp : Prime p\n⊢ ↑(factorization n) p = card (Finset.filter (fun i => p ^ i ∣ n) (Ico 1 n))\n[PROOFSTEP]\nsimp [← Icc_factorization_eq_pow_dvd n pp]\n[GOAL]\nn p b : ℕ\npp : Prime p\nhn : n ≠ 0\nhb : n ≤ p ^ b\n⊢ Finset.filter (fun i => p ^ i ∣ n) (Ico 1 n) = Finset.filter (fun i => p ^ i ∣ n) (Icc 1 b)\n[PROOFSTEP]\next x\n[GOAL]\ncase a\nn p b : ℕ\npp : Prime p\nhn : n ≠ 0\nhb : n ≤ p ^ b\nx : ℕ\n⊢ x ∈ Finset.filter (fun i => p ^ i ∣ n) (Ico 1 n) ↔ x ∈ Finset.filter (fun i => p ^ i ∣ n) (Icc 1 b)\n[PROOFSTEP]\nsimp only [Finset.mem_filter, mem_Ico, mem_Icc, and_congr_left_iff, and_congr_right_iff]\n[GOAL]\ncase a\nn p b : ℕ\npp : Prime p\nhn : n ≠ 0\nhb : n ≤ p ^ b\nx : ℕ\n⊢ p ^ x ∣ n → 1 ≤ x → (x < n ↔ x ≤ b)\n[PROOFSTEP]\nrintro h1 -\n[GOAL]\ncase a\nn p b : ℕ\npp : Prime p\nhn : n ≠ 0\nhb : n ≤ p ^ b\nx : ℕ\nh1 : p ^ x ∣ n\n⊢ x < n ↔ x ≤ b\n[PROOFSTEP]\nsimp [lt_of_pow_dvd_right hn pp.two_le h1, (pow_le_iff_le_right pp.two_le).1 ((le_of_dvd hn.bot_lt h1).trans hb)]\n[GOAL]\np a b : ℕ\nhab : coprime a b\n⊢ ↑(factorization (a * b)) p = ↑(factorization a) p + ↑(factorization b) p\n[PROOFSTEP]\nsimp only [← factors_count_eq, perm_iff_count.mp (perm_factors_mul_of_coprime hab), count_append]\n[GOAL]\na b : ℕ\nhab : coprime a b\n⊢ factorization (a * b) = factorization a + factorization b\n[PROOFSTEP]\next q\n[GOAL]\ncase h\na b : ℕ\nhab : coprime a b\nq : ℕ\n⊢ ↑(factorization (a * b)) q = ↑(factorization a + factorization b) q\n[PROOFSTEP]\nrw [Finsupp.add_apply, factorization_mul_apply_of_coprime hab]\n[GOAL]\np a b : ℕ\nhab : coprime a b\nhpa : p ∈ factors a\n⊢ ↑(factorization (a * b)) p = ↑(factorization a) p\n[PROOFSTEP]\nrw [factorization_mul_apply_of_coprime hab, ← factors_count_eq, ← factors_count_eq,\n  count_eq_zero_of_not_mem (coprime_factors_disjoint hab hpa), add_zero]\n[GOAL]\np a b : ℕ\nhab : coprime a b\nhpb : p ∈ factors b\n⊢ ↑(factorization (a * b)) p = ↑(factorization b) p\n[PROOFSTEP]\nrw [mul_comm]\n[GOAL]\np a b : ℕ\nhab : coprime a b\nhpb : p ∈ factors b\n⊢ ↑(factorization (b * a)) p = ↑(factorization b) p\n[PROOFSTEP]\nexact factorization_eq_of_coprime_left (coprime_comm.mp hab) hpb\n[GOAL]\na b : ℕ\nhab : coprime a b\n⊢ _root_.Disjoint (factorization a).support (factorization b).support\n[PROOFSTEP]\nsimpa only [support_factorization] using disjoint_toFinset_iff_disjoint.mpr (coprime_factors_disjoint hab)\n[GOAL]\na b : ℕ\nhab : coprime a b\n⊢ (factorization (a * b)).support = (factorization a).support ∪ (factorization b).support\n[PROOFSTEP]\nrw [factorization_mul_of_coprime hab]\n[GOAL]\na b : ℕ\nhab : coprime a b\n⊢ (factorization a + factorization b).support = (factorization a).support ∪ (factorization b).support\n[PROOFSTEP]\nexact support_add_eq (factorization_disjoint_of_coprime hab)\n[GOAL]\nP : ℕ → Sort u_1\nh0 : P 0\nh1 : P 1\nh : (a p n : ℕ) → Prime p → ¬p ∣ a → 0 < n → P a → P (p ^ n * a)\na n k : ℕ\nhk : (m : ℕ) → m < k + 2 → P m\n⊢ P (k + 2)\n[PROOFSTEP]\nlet p := (k + 2).minFac\n[GOAL]\nP : ℕ → Sort u_1\nh0 : P 0\nh1 : P 1\nh : (a p n : ℕ) → Prime p → ¬p ∣ a → 0 < n → P a → P (p ^ n * a)\na n k : ℕ\nhk : (m : ℕ) → m < k + 2 → P m\np : ℕ := minFac (k + 2)\n⊢ P (k + 2)\n[PROOFSTEP]\nhave hp : Prime p :=\n  minFac_prime\n    (succ_succ_ne_one k)\n      -- the awkward `let` stuff here is because `factorization` is noncomputable (Finsupp);\n            -- we get around this by using the computable `factors.count`, and rewriting when we want\n            -- to use the `factorization` API\n[GOAL]\nP : ℕ → Sort u_1\nh0 : P 0\nh1 : P 1\nh : (a p n : ℕ) → Prime p → ¬p ∣ a → 0 < n → P a → P (p ^ n * a)\na n k : ℕ\nhk : (m : ℕ) → m < k + 2 → P m\np : ℕ := minFac (k + 2)\nhp : Prime p\n⊢ P (k + 2)\n[PROOFSTEP]\nlet t := (k + 2).factors.count p\n[GOAL]\nP : ℕ → Sort u_1\nh0 : P 0\nh1 : P 1\nh : (a p n : ℕ) → Prime p → ¬p ∣ a → 0 < n → P a → P (p ^ n * a)\na n k : ℕ\nhk : (m : ℕ) → m < k + 2 → P m\np : ℕ := minFac (k + 2)\nhp : Prime p\nt : ℕ := count p (factors (k + 2))\n⊢ P (k + 2)\n[PROOFSTEP]\nhave ht : t = (k + 2).factorization p := factors_count_eq\n[GOAL]\nP : ℕ → Sort u_1\nh0 : P 0\nh1 : P 1\nh : (a p n : ℕ) → Prime p → ¬p ∣ a → 0 < n → P a → P (p ^ n * a)\na n k : ℕ\nhk : (m : ℕ) → m < k + 2 → P m\np : ℕ := minFac (k + 2)\nhp : Prime p\nt : ℕ := count p (factors (k + 2))\nht : t = ↑(factorization (k + 2)) p\n⊢ P (k + 2)\n[PROOFSTEP]\nhave hpt : p ^ t ∣ k + 2 := by\n  rw [ht]\n  exact ord_proj_dvd _ _\n[GOAL]\nP : ℕ → Sort u_1\nh0 : P 0\nh1 : P 1\nh : (a p n : ℕ) → Prime p → ¬p ∣ a → 0 < n → P a → P (p ^ n * a)\na n k : ℕ\nhk : (m : ℕ) → m < k + 2 → P m\np : ℕ := minFac (k + 2)\nhp : Prime p\nt : ℕ := count p (factors (k + 2))\nht : t = ↑(factorization (k + 2)) p\n⊢ p ^ t ∣ k + 2\n[PROOFSTEP]\nrw [ht]\n[GOAL]\nP : ℕ → Sort u_1\nh0 : P 0\nh1 : P 1\nh : (a p n : ℕ) → Prime p → ¬p ∣ a → 0 < n → P a → P (p ^ n * a)\na n k : ℕ\nhk : (m : ℕ) → m < k + 2 → P m\np : ℕ := minFac (k + 2)\nhp : Prime p\nt : ℕ := count p (factors (k + 2))\nht : t = ↑(factorization (k + 2)) p\n⊢ p ^ ↑(factorization (k + 2)) p ∣ k + 2\n[PROOFSTEP]\nexact ord_proj_dvd _ _\n[GOAL]\nP : ℕ → Sort u_1\nh0 : P 0\nh1 : P 1\nh : (a p n : ℕ) → Prime p → ¬p ∣ a → 0 < n → P a → P (p ^ n * a)\na n k : ℕ\nhk : (m : ℕ) → m < k + 2 → P m\np : ℕ := minFac (k + 2)\nhp : Prime p\nt : ℕ := count p (factors (k + 2))\nht : t = ↑(factorization (k + 2)) p\nhpt : p ^ t ∣ k + 2\n⊢ P (k + 2)\n[PROOFSTEP]\nhave htp : 0 < t := by\n  rw [ht]\n  exact hp.factorization_pos_of_dvd (Nat.succ_ne_zero _) (minFac_dvd _)\n[GOAL]\nP : ℕ → Sort u_1\nh0 : P 0\nh1 : P 1\nh : (a p n : ℕ) → Prime p → ¬p ∣ a → 0 < n → P a → P (p ^ n * a)\na n k : ℕ\nhk : (m : ℕ) → m < k + 2 → P m\np : ℕ := minFac (k + 2)\nhp : Prime p\nt : ℕ := count p (factors (k + 2))\nht : t = ↑(factorization (k + 2)) p\nhpt : p ^ t ∣ k + 2\n⊢ 0 < t\n[PROOFSTEP]\nrw [ht]\n[GOAL]\nP : ℕ → Sort u_1\nh0 : P 0\nh1 : P 1\nh : (a p n : ℕ) → Prime p → ¬p ∣ a → 0 < n → P a → P (p ^ n * a)\na n k : ℕ\nhk : (m : ℕ) → m < k + 2 → P m\np : ℕ := minFac (k + 2)\nhp : Prime p\nt : ℕ := count p (factors (k + 2))\nht : t = ↑(factorization (k + 2)) p\nhpt : p ^ t ∣ k + 2\n⊢ 0 < ↑(factorization (k + 2)) p\n[PROOFSTEP]\nexact hp.factorization_pos_of_dvd (Nat.succ_ne_zero _) (minFac_dvd _)\n[GOAL]\nP : ℕ → Sort u_1\nh0 : P 0\nh1 : P 1\nh : (a p n : ℕ) → Prime p → ¬p ∣ a → 0 < n → P a → P (p ^ n * a)\na n k : ℕ\nhk : (m : ℕ) → m < k + 2 → P m\np : ℕ := minFac (k + 2)\nhp : Prime p\nt : ℕ := count p (factors (k + 2))\nht : t = ↑(factorization (k + 2)) p\nhpt : p ^ t ∣ k + 2\nhtp : 0 < t\n⊢ P (k + 2)\n[PROOFSTEP]\nconvert h ((k + 2) / p ^ t) p t hp _ _ _ using 1\n[GOAL]\ncase h.e'_1\nP : ℕ → Sort u_1\nh0 : P 0\nh1 : P 1\nh : (a p n : ℕ) → Prime p → ¬p ∣ a → 0 < n → P a → P (p ^ n * a)\na n k : ℕ\nhk : (m : ℕ) → m < k + 2 → P m\np : ℕ := minFac (k + 2)\nhp : Prime p\nt : ℕ := count p (factors (k + 2))\nht : t = ↑(factorization (k + 2)) p\nhpt : p ^ t ∣ k + 2\nhtp : 0 < t\n⊢ k + 2 = p ^ t * ((k + 2) / p ^ t)\n[PROOFSTEP]\nrw [Nat.mul_div_cancel' hpt]\n[GOAL]\ncase convert_1\nP : ℕ → Sort u_1\nh0 : P 0\nh1 : P 1\nh : (a p n : ℕ) → Prime p → ¬p ∣ a → 0 < n → P a → P (p ^ n * a)\na n k : ℕ\nhk : (m : ℕ) → m < k + 2 → P m\np : ℕ := minFac (k + 2)\nhp : Prime p\nt : ℕ := count p (factors (k + 2))\nht : t = ↑(factorization (k + 2)) p\nhpt : p ^ t ∣ k + 2\nhtp : 0 < t\n⊢ ¬p ∣ (k + 2) / p ^ t\n[PROOFSTEP]\nrw [Nat.dvd_div_iff hpt, ← pow_succ, ht]\n[GOAL]\ncase convert_1\nP : ℕ → Sort u_1\nh0 : P 0\nh1 : P 1\nh : (a p n : ℕ) → Prime p → ¬p ∣ a → 0 < n → P a → P (p ^ n * a)\na n k : ℕ\nhk : (m : ℕ) → m < k + 2 → P m\np : ℕ := minFac (k + 2)\nhp : Prime p\nt : ℕ := count p (factors (k + 2))\nht : t = ↑(factorization (k + 2)) p\nhpt : p ^ t ∣ k + 2\nhtp : 0 < t\n⊢ ¬p ^ succ (↑(factorization (k + 2)) p) ∣ k + 2\n[PROOFSTEP]\nexact pow_succ_factorization_not_dvd (k + 1).succ_ne_zero hp\n[GOAL]\ncase convert_2\nP : ℕ → Sort u_1\nh0 : P 0\nh1 : P 1\nh : (a p n : ℕ) → Prime p → ¬p ∣ a → 0 < n → P a → P (p ^ n * a)\na n k : ℕ\nhk : (m : ℕ) → m < k + 2 → P m\np : ℕ := minFac (k + 2)\nhp : Prime p\nt : ℕ := count p (factors (k + 2))\nht : t = ↑(factorization (k + 2)) p\nhpt : p ^ t ∣ k + 2\nhtp : 0 < t\n⊢ 0 < t\n[PROOFSTEP]\nexact htp\n[GOAL]\ncase convert_3\nP : ℕ → Sort u_1\nh0 : P 0\nh1 : P 1\nh : (a p n : ℕ) → Prime p → ¬p ∣ a → 0 < n → P a → P (p ^ n * a)\na n k : ℕ\nhk : (m : ℕ) → m < k + 2 → P m\np : ℕ := minFac (k + 2)\nhp : Prime p\nt : ℕ := count p (factors (k + 2))\nht : t = ↑(factorization (k + 2)) p\nhpt : p ^ t ∣ k + 2\nhtp : 0 < t\n⊢ P ((k + 2) / p ^ t)\n[PROOFSTEP]\napply hk _ (Nat.div_lt_of_lt_mul _)\n[GOAL]\nP : ℕ → Sort u_1\nh0 : P 0\nh1 : P 1\nh : (a p n : ℕ) → Prime p → ¬p ∣ a → 0 < n → P a → P (p ^ n * a)\na n k : ℕ\nhk : (m : ℕ) → m < k + 2 → P m\np : ℕ := minFac (k + 2)\nhp : Prime p\nt : ℕ := count p (factors (k + 2))\nht : t = ↑(factorization (k + 2)) p\nhpt : p ^ t ∣ k + 2\nhtp : 0 < t\n⊢ k + 2 < p ^ t * (k + 2)\n[PROOFSTEP]\nrw [lt_mul_iff_one_lt_left Nat.succ_pos', one_lt_pow_iff htp.ne]\n[GOAL]\nP : ℕ → Sort u_1\nh0 : P 0\nh1 : P 1\nh : (a p n : ℕ) → Prime p → ¬p ∣ a → 0 < n → P a → P (p ^ n * a)\na n k : ℕ\nhk : (m : ℕ) → m < k + 2 → P m\np : ℕ := minFac (k + 2)\nhp : Prime p\nt : ℕ := count p (factors (k + 2))\nht : t = ↑(factorization (k + 2)) p\nhpt : p ^ t ∣ k + 2\nhtp : 0 < t\n⊢ 1 < p\n[PROOFSTEP]\nexact hp.one_lt\n[GOAL]\nP : ℕ → Sort u_1\nhp : (p n : ℕ) → Prime p → 0 < n → P (p ^ n)\nh0 : P 0\nh1 : P 1\nh : (a b : ℕ) → 1 < a → 1 < b → coprime a b → P a → P b → P (a * b)\n⊢ (a p n : ℕ) → Prime p → ¬p ∣ a → 0 < n → P a → P (p ^ n * a)\n[PROOFSTEP]\nintro a p n hp' hpa hn hPa\n[GOAL]\nP : ℕ → Sort u_1\nhp : (p n : ℕ) → Prime p → 0 < n → P (p ^ n)\nh0 : P 0\nh1 : P 1\nh : (a b : ℕ) → 1 < a → 1 < b → coprime a b → P a → P b → P (a * b)\na p n : ℕ\nhp' : Prime p\nhpa : ¬p ∣ a\nhn : 0 < n\nhPa : P a\n⊢ P (p ^ n * a)\n[PROOFSTEP]\nby_cases ha1 : a = 1\n[GOAL]\ncase pos\nP : ℕ → Sort u_1\nhp : (p n : ℕ) → Prime p → 0 < n → P (p ^ n)\nh0 : P 0\nh1 : P 1\nh : (a b : ℕ) → 1 < a → 1 < b → coprime a b → P a → P b → P (a * b)\na p n : ℕ\nhp' : Prime p\nhpa : ¬p ∣ a\nhn : 0 < n\nhPa : P a\nha1 : a = 1\n⊢ P (p ^ n * a)\n[PROOFSTEP]\nrw [ha1, mul_one]\n[GOAL]\ncase pos\nP : ℕ → Sort u_1\nhp : (p n : ℕ) → Prime p → 0 < n → P (p ^ n)\nh0 : P 0\nh1 : P 1\nh : (a b : ℕ) → 1 < a → 1 < b → coprime a b → P a → P b → P (a * b)\na p n : ℕ\nhp' : Prime p\nhpa : ¬p ∣ a\nhn : 0 < n\nhPa : P a\nha1 : a = 1\n⊢ P (p ^ n)\n[PROOFSTEP]\nexact hp p n hp' hn\n[GOAL]\ncase neg\nP : ℕ → Sort u_1\nhp : (p n : ℕ) → Prime p → 0 < n → P (p ^ n)\nh0 : P 0\nh1 : P 1\nh : (a b : ℕ) → 1 < a → 1 < b → coprime a b → P a → P b → P (a * b)\na p n : ℕ\nhp' : Prime p\nhpa : ¬p ∣ a\nhn : 0 < n\nhPa : P a\nha1 : ¬a = 1\n⊢ P (p ^ n * a)\n[PROOFSTEP]\nrefine' h (p ^ n) a (hp'.one_lt.trans_le (le_self_pow hn.ne' _)) _ _ (hp _ _ hp' hn) hPa\n[GOAL]\ncase neg.refine'_1\nP : ℕ → Sort u_1\nhp : (p n : ℕ) → Prime p → 0 < n → P (p ^ n)\nh0 : P 0\nh1 : P 1\nh : (a b : ℕ) → 1 < a → 1 < b → coprime a b → P a → P b → P (a * b)\na p n : ℕ\nhp' : Prime p\nhpa : ¬p ∣ a\nhn : 0 < n\nhPa : P a\nha1 : ¬a = 1\n⊢ 1 < a\n[PROOFSTEP]\ncontrapose! hpa\n[GOAL]\ncase neg.refine'_1\nP : ℕ → Sort u_1\nhp : (p n : ℕ) → Prime p → 0 < n → P (p ^ n)\nh0 : P 0\nh1 : P 1\nh : (a b : ℕ) → 1 < a → 1 < b → coprime a b → P a → P b → P (a * b)\na p n : ℕ\nhp' : Prime p\nhn : 0 < n\nhPa : P a\nha1 : ¬a = 1\nhpa : a ≤ 1\n⊢ p ∣ a\n[PROOFSTEP]\nsimp [lt_one_iff.1 (lt_of_le_of_ne hpa ha1)]\n[GOAL]\ncase neg.refine'_2\nP : ℕ → Sort u_1\nhp : (p n : ℕ) → Prime p → 0 < n → P (p ^ n)\nh0 : P 0\nh1 : P 1\nh : (a b : ℕ) → 1 < a → 1 < b → coprime a b → P a → P b → P (a * b)\na p n : ℕ\nhp' : Prime p\nhpa : ¬p ∣ a\nhn : 0 < n\nhPa : P a\nha1 : ¬a = 1\n⊢ coprime (p ^ n) a\n[PROOFSTEP]\nsimpa [hn, Prime.coprime_iff_not_dvd hp']\n[GOAL]\nP : ℕ → Sort u_1\nh0 : P 0\nh1 : P 1\nhp : (p : ℕ) → Prime p → P p\nh : (a b : ℕ) → P a → P b → P (a * b)\np n✝ : ℕ\nhp' : Prime p\nn : ℕ\nhn : P (p ^ n)\n⊢ P (p ^ succ n)\n[PROOFSTEP]\nrw [pow_succ]\n[GOAL]\nP : ℕ → Sort u_1\nh0 : P 0\nh1 : P 1\nhp : (p : ℕ) → Prime p → P p\nh : (a b : ℕ) → P a → P b → P (a * b)\np n✝ : ℕ\nhp' : Prime p\nn : ℕ\nhn : P (p ^ n)\n⊢ P (p ^ n * p)\n[PROOFSTEP]\napply h _ _ hn (hp p hp')\n[GOAL]\nβ : Type u_1\ninst✝ : CommMonoid β\nf : ℕ → β\nh_mult : ∀ (x y : ℕ), coprime x y → f (x * y) = f x * f y\nhf : f 1 = 1\n⊢ ∀ {n : ℕ}, n ≠ 0 → f n = Finsupp.prod (factorization n) fun p k => f (p ^ k)\n[PROOFSTEP]\napply Nat.recOnPosPrimePosCoprime\n[GOAL]\ncase hp\nβ : Type u_1\ninst✝ : CommMonoid β\nf : ℕ → β\nh_mult : ∀ (x y : ℕ), coprime x y → f (x * y) = f x * f y\nhf : f 1 = 1\n⊢ ∀ (p n : ℕ), Prime p → 0 < n → p ^ n ≠ 0 → f (p ^ n) = Finsupp.prod (factorization (p ^ n)) fun p k => f (p ^ k)\n[PROOFSTEP]\nrintro p k hp -\n  -\n      -- Porting note: replaced `simp` with `rw`\n[GOAL]\ncase hp\nβ : Type u_1\ninst✝ : CommMonoid β\nf : ℕ → β\nh_mult : ∀ (x y : ℕ), coprime x y → f (x * y) = f x * f y\nhf : f 1 = 1\np k : ℕ\nhp : Prime p\n⊢ f (p ^ k) = Finsupp.prod (factorization (p ^ k)) fun p k => f (p ^ k)\n[PROOFSTEP]\nrw [Prime.factorization_pow hp, Finsupp.prod_single_index _]\n[GOAL]\nβ : Type u_1\ninst✝ : CommMonoid β\nf : ℕ → β\nh_mult : ∀ (x y : ℕ), coprime x y → f (x * y) = f x * f y\nhf : f 1 = 1\np k : ℕ\nhp : Prime p\n⊢ f (p ^ 0) = 1\n[PROOFSTEP]\nrwa [pow_zero]\n[GOAL]\ncase h0\nβ : Type u_1\ninst✝ : CommMonoid β\nf : ℕ → β\nh_mult : ∀ (x y : ℕ), coprime x y → f (x * y) = f x * f y\nhf : f 1 = 1\n⊢ 0 ≠ 0 → f 0 = Finsupp.prod (factorization 0) fun p k => f (p ^ k)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h1\nβ : Type u_1\ninst✝ : CommMonoid β\nf : ℕ → β\nh_mult : ∀ (x y : ℕ), coprime x y → f (x * y) = f x * f y\nhf : f 1 = 1\n⊢ 1 ≠ 0 → f 1 = Finsupp.prod (factorization 1) fun p k => f (p ^ k)\n[PROOFSTEP]\nrintro -\n[GOAL]\ncase h1\nβ : Type u_1\ninst✝ : CommMonoid β\nf : ℕ → β\nh_mult : ∀ (x y : ℕ), coprime x y → f (x * y) = f x * f y\nhf : f 1 = 1\n⊢ f 1 = Finsupp.prod (factorization 1) fun p k => f (p ^ k)\n[PROOFSTEP]\nrw [factorization_one, hf]\n[GOAL]\ncase h1\nβ : Type u_1\ninst✝ : CommMonoid β\nf : ℕ → β\nh_mult : ∀ (x y : ℕ), coprime x y → f (x * y) = f x * f y\nhf : f 1 = 1\n⊢ 1 = Finsupp.prod 0 fun p k => f (p ^ k)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h\nβ : Type u_1\ninst✝ : CommMonoid β\nf : ℕ → β\nh_mult : ∀ (x y : ℕ), coprime x y → f (x * y) = f x * f y\nhf : f 1 = 1\n⊢ ∀ (a b : ℕ),\n    1 < a →\n      1 < b →\n        coprime a b →\n          (a ≠ 0 → f a = Finsupp.prod (factorization a) fun p k => f (p ^ k)) →\n            (b ≠ 0 → f b = Finsupp.prod (factorization b) fun p k => f (p ^ k)) →\n              a * b ≠ 0 → f (a * b) = Finsupp.prod (factorization (a * b)) fun p k => f (p ^ k)\n[PROOFSTEP]\nintro a b _ _ hab ha hb hab_pos\n[GOAL]\ncase h\nβ : Type u_1\ninst✝ : CommMonoid β\nf : ℕ → β\nh_mult : ∀ (x y : ℕ), coprime x y → f (x * y) = f x * f y\nhf : f 1 = 1\na b : ℕ\na✝¹ : 1 < a\na✝ : 1 < b\nhab : coprime a b\nha : a ≠ 0 → f a = Finsupp.prod (factorization a) fun p k => f (p ^ k)\nhb : b ≠ 0 → f b = Finsupp.prod (factorization b) fun p k => f (p ^ k)\nhab_pos : a * b ≠ 0\n⊢ f (a * b) = Finsupp.prod (factorization (a * b)) fun p k => f (p ^ k)\n[PROOFSTEP]\nrw [h_mult a b hab, ha (left_ne_zero_of_mul hab_pos), hb (right_ne_zero_of_mul hab_pos),\n  factorization_mul_of_coprime hab, ← prod_add_index_of_disjoint]\n[GOAL]\ncase h.hd\nβ : Type u_1\ninst✝ : CommMonoid β\nf : ℕ → β\nh_mult : ∀ (x y : ℕ), coprime x y → f (x * y) = f x * f y\nhf : f 1 = 1\na b : ℕ\na✝¹ : 1 < a\na✝ : 1 < b\nhab : coprime a b\nha : a ≠ 0 → f a = Finsupp.prod (factorization a) fun p k => f (p ^ k)\nhb : b ≠ 0 → f b = Finsupp.prod (factorization b) fun p k => f (p ^ k)\nhab_pos : a * b ≠ 0\n⊢ _root_.Disjoint (factorization a).support (factorization b).support\n[PROOFSTEP]\nconvert factorization_disjoint_of_coprime hab\n[GOAL]\nβ : Type u_1\ninst✝ : CommMonoid β\nf : ℕ → β\nh_mult : ∀ (x y : ℕ), coprime x y → f (x * y) = f x * f y\nhf0 : f 0 = 1\nhf1 : f 1 = 1\n⊢ ∀ {n : ℕ}, f n = Finsupp.prod (factorization n) fun p k => f (p ^ k)\n[PROOFSTEP]\napply Nat.recOnPosPrimePosCoprime\n[GOAL]\ncase hp\nβ : Type u_1\ninst✝ : CommMonoid β\nf : ℕ → β\nh_mult : ∀ (x y : ℕ), coprime x y → f (x * y) = f x * f y\nhf0 : f 0 = 1\nhf1 : f 1 = 1\n⊢ ∀ (p n : ℕ), Prime p → 0 < n → f (p ^ n) = Finsupp.prod (factorization (p ^ n)) fun p k => f (p ^ k)\n[PROOFSTEP]\nrintro p k hp -\n[GOAL]\ncase hp\nβ : Type u_1\ninst✝ : CommMonoid β\nf : ℕ → β\nh_mult : ∀ (x y : ℕ), coprime x y → f (x * y) = f x * f y\nhf0 : f 0 = 1\nhf1 : f 1 = 1\np k : ℕ\nhp : Prime p\n⊢ f (p ^ k) = Finsupp.prod (factorization (p ^ k)) fun p k => f (p ^ k)\n[PROOFSTEP]\nsimp only [hp.factorization_pow]\n[GOAL]\ncase hp\nβ : Type u_1\ninst✝ : CommMonoid β\nf : ℕ → β\nh_mult : ∀ (x y : ℕ), coprime x y → f (x * y) = f x * f y\nhf0 : f 0 = 1\nhf1 : f 1 = 1\np k : ℕ\nhp : Prime p\n⊢ f (p ^ k) = Finsupp.prod (single p k) fun p k => f (p ^ k)\n[PROOFSTEP]\nrw [prod_single_index _]\n[GOAL]\nβ : Type u_1\ninst✝ : CommMonoid β\nf : ℕ → β\nh_mult : ∀ (x y : ℕ), coprime x y → f (x * y) = f x * f y\nhf0 : f 0 = 1\nhf1 : f 1 = 1\np k : ℕ\nhp : Prime p\n⊢ f (p ^ 0) = 1\n[PROOFSTEP]\nsimp [hf1]\n[GOAL]\ncase h0\nβ : Type u_1\ninst✝ : CommMonoid β\nf : ℕ → β\nh_mult : ∀ (x y : ℕ), coprime x y → f (x * y) = f x * f y\nhf0 : f 0 = 1\nhf1 : f 1 = 1\n⊢ f 0 = Finsupp.prod (factorization 0) fun p k => f (p ^ k)\n[PROOFSTEP]\nsimp [hf0]\n[GOAL]\ncase h1\nβ : Type u_1\ninst✝ : CommMonoid β\nf : ℕ → β\nh_mult : ∀ (x y : ℕ), coprime x y → f (x * y) = f x * f y\nhf0 : f 0 = 1\nhf1 : f 1 = 1\n⊢ f 1 = Finsupp.prod (factorization 1) fun p k => f (p ^ k)\n[PROOFSTEP]\nrw [factorization_one, hf1]\n[GOAL]\ncase h1\nβ : Type u_1\ninst✝ : CommMonoid β\nf : ℕ → β\nh_mult : ∀ (x y : ℕ), coprime x y → f (x * y) = f x * f y\nhf0 : f 0 = 1\nhf1 : f 1 = 1\n⊢ 1 = Finsupp.prod 0 fun p k => f (p ^ k)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h\nβ : Type u_1\ninst✝ : CommMonoid β\nf : ℕ → β\nh_mult : ∀ (x y : ℕ), coprime x y → f (x * y) = f x * f y\nhf0 : f 0 = 1\nhf1 : f 1 = 1\n⊢ ∀ (a b : ℕ),\n    1 < a →\n      1 < b →\n        coprime a b →\n          (f a = Finsupp.prod (factorization a) fun p k => f (p ^ k)) →\n            (f b = Finsupp.prod (factorization b) fun p k => f (p ^ k)) →\n              f (a * b) = Finsupp.prod (factorization (a * b)) fun p k => f (p ^ k)\n[PROOFSTEP]\nintro a b _ _ hab ha hb\n[GOAL]\ncase h\nβ : Type u_1\ninst✝ : CommMonoid β\nf : ℕ → β\nh_mult : ∀ (x y : ℕ), coprime x y → f (x * y) = f x * f y\nhf0 : f 0 = 1\nhf1 : f 1 = 1\na b : ℕ\na✝¹ : 1 < a\na✝ : 1 < b\nhab : coprime a b\nha : f a = Finsupp.prod (factorization a) fun p k => f (p ^ k)\nhb : f b = Finsupp.prod (factorization b) fun p k => f (p ^ k)\n⊢ f (a * b) = Finsupp.prod (factorization (a * b)) fun p k => f (p ^ k)\n[PROOFSTEP]\nrw [h_mult a b hab, ha, hb, factorization_mul_of_coprime hab, ← prod_add_index_of_disjoint]\n[GOAL]\ncase h.hd\nβ : Type u_1\ninst✝ : CommMonoid β\nf : ℕ → β\nh_mult : ∀ (x y : ℕ), coprime x y → f (x * y) = f x * f y\nhf0 : f 0 = 1\nhf1 : f 1 = 1\na b : ℕ\na✝¹ : 1 < a\na✝ : 1 < b\nhab : coprime a b\nha : f a = Finsupp.prod (factorization a) fun p k => f (p ^ k)\nhb : f b = Finsupp.prod (factorization b) fun p k => f (p ^ k)\n⊢ _root_.Disjoint (factorization a).support (factorization b).support\n[PROOFSTEP]\nexact factorization_disjoint_of_coprime hab\n[GOAL]\na b : ℕ\nha : a ≠ 0\nhb : b ≠ 0\n⊢ a = b ↔ ∀ (p : ℕ), Prime p → padicValNat p a = padicValNat p b\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\na b : ℕ\nha : a ≠ 0\nhb : b ≠ 0\n⊢ a = b → ∀ (p : ℕ), Prime p → padicValNat p a = padicValNat p b\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase mp\na : ℕ\nha hb : a ≠ 0\n⊢ ∀ (p : ℕ), Prime p → padicValNat p a = padicValNat p a\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mpr\na b : ℕ\nha : a ≠ 0\nhb : b ≠ 0\n⊢ (∀ (p : ℕ), Prime p → padicValNat p a = padicValNat p b) → a = b\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\na b : ℕ\nha : a ≠ 0\nhb : b ≠ 0\nh : ∀ (p : ℕ), Prime p → padicValNat p a = padicValNat p b\n⊢ a = b\n[PROOFSTEP]\nrefine' eq_of_factorization_eq ha hb fun p => _\n[GOAL]\ncase mpr\na b : ℕ\nha : a ≠ 0\nhb : b ≠ 0\nh : ∀ (p : ℕ), Prime p → padicValNat p a = padicValNat p b\np : ℕ\n⊢ ↑(factorization a) p = ↑(factorization b) p\n[PROOFSTEP]\nby_cases pp : p.Prime\n[GOAL]\ncase pos\na b : ℕ\nha : a ≠ 0\nhb : b ≠ 0\nh : ∀ (p : ℕ), Prime p → padicValNat p a = padicValNat p b\np : ℕ\npp : Prime p\n⊢ ↑(factorization a) p = ↑(factorization b) p\n[PROOFSTEP]\nsimp [factorization_def, pp, h p pp]\n[GOAL]\ncase neg\na b : ℕ\nha : a ≠ 0\nhb : b ≠ 0\nh : ∀ (p : ℕ), Prime p → padicValNat p a = padicValNat p b\np : ℕ\npp : ¬Prime p\n⊢ ↑(factorization a) p = ↑(factorization b) p\n[PROOFSTEP]\nsimp [factorization_eq_zero_of_non_prime, pp]\n[GOAL]\nn : ℕ\nhn : n ≠ 0\nm : ℕ\npr : n < m\n⊢ ∏ p in Finset.filter Prime (Finset.range m), p ^ padicValNat p n = n\n[PROOFSTEP]\nconv =>\n  rhs\n  rw [← factorization_prod_pow_eq_self hn]\n[GOAL]\nn : ℕ\nhn : n ≠ 0\nm : ℕ\npr : n < m\n| ∏ p in Finset.filter Prime (Finset.range m), p ^ padicValNat p n = n\n[PROOFSTEP]\n  rhs\n  rw [← factorization_prod_pow_eq_self hn]\n[GOAL]\nn : ℕ\nhn : n ≠ 0\nm : ℕ\npr : n < m\n| ∏ p in Finset.filter Prime (Finset.range m), p ^ padicValNat p n = n\n[PROOFSTEP]\n  rhs\n  rw [← factorization_prod_pow_eq_self hn]\n[GOAL]\nn : ℕ\nhn : n ≠ 0\nm : ℕ\npr : n < m\n| ∏ p in Finset.filter Prime (Finset.range m), p ^ padicValNat p n = n\n[PROOFSTEP]\nrhs\n[GOAL]\nn : ℕ\nhn : n ≠ 0\nm : ℕ\npr : n < m\n| n\n[PROOFSTEP]\nrw [← factorization_prod_pow_eq_self hn]\n[GOAL]\nn : ℕ\nhn : n ≠ 0\nm : ℕ\npr : n < m\n⊢ ∏ p in Finset.filter Prime (Finset.range m), p ^ padicValNat p n = Finsupp.prod (factorization n) fun x x_1 => x ^ x_1\n[PROOFSTEP]\nrw [eq_comm]\n[GOAL]\nn : ℕ\nhn : n ≠ 0\nm : ℕ\npr : n < m\n⊢ (Finsupp.prod (factorization n) fun x x_1 => x ^ x_1) =\n    ∏ p in Finset.filter Prime (Finset.range m), p ^ padicValNat p n\n[PROOFSTEP]\napply Finset.prod_subset_one_on_sdiff\n[GOAL]\ncase h\nn : ℕ\nhn : n ≠ 0\nm : ℕ\npr : n < m\n⊢ (factorization n).support ⊆ Finset.filter Prime (Finset.range m)\n[PROOFSTEP]\nexact fun p hp =>\n  Finset.mem_filter.mpr\n    ⟨Finset.mem_range.mpr (gt_of_gt_of_ge pr (le_of_mem_factorization hp)), prime_of_mem_factorization hp⟩\n[GOAL]\ncase hg\nn : ℕ\nhn : n ≠ 0\nm : ℕ\npr : n < m\n⊢ ∀ (x : ℕ), x ∈ Finset.filter Prime (Finset.range m) \\ (factorization n).support → x ^ padicValNat x n = 1\n[PROOFSTEP]\nintro p hp\n[GOAL]\ncase hg\nn : ℕ\nhn : n ≠ 0\nm : ℕ\npr : n < m\np : ℕ\nhp : p ∈ Finset.filter Prime (Finset.range m) \\ (factorization n).support\n⊢ p ^ padicValNat p n = 1\n[PROOFSTEP]\ncases' Finset.mem_sdiff.mp hp with hp1 hp2\n[GOAL]\ncase hg.intro\nn : ℕ\nhn : n ≠ 0\nm : ℕ\npr : n < m\np : ℕ\nhp : p ∈ Finset.filter Prime (Finset.range m) \\ (factorization n).support\nhp1 : p ∈ Finset.filter Prime (Finset.range m)\nhp2 : ¬p ∈ (factorization n).support\n⊢ p ^ padicValNat p n = 1\n[PROOFSTEP]\nrw [← factorization_def n (Finset.mem_filter.mp hp1).2]\n[GOAL]\ncase hg.intro\nn : ℕ\nhn : n ≠ 0\nm : ℕ\npr : n < m\np : ℕ\nhp : p ∈ Finset.filter Prime (Finset.range m) \\ (factorization n).support\nhp1 : p ∈ Finset.filter Prime (Finset.range m)\nhp2 : ¬p ∈ (factorization n).support\n⊢ p ^ ↑(factorization n) p = 1\n[PROOFSTEP]\nsimp [Finsupp.not_mem_support_iff.mp hp2]\n[GOAL]\ncase hfg\nn : ℕ\nhn : n ≠ 0\nm : ℕ\npr : n < m\n⊢ ∀ (x : ℕ), x ∈ (factorization n).support → (fun x x_1 => x ^ x_1) x (↑(factorization n) x) = x ^ padicValNat x n\n[PROOFSTEP]\nintro p hp\n[GOAL]\ncase hfg\nn : ℕ\nhn : n ≠ 0\nm : ℕ\npr : n < m\np : ℕ\nhp : p ∈ (factorization n).support\n⊢ (fun x x_1 => x ^ x_1) p (↑(factorization n) p) = p ^ padicValNat p n\n[PROOFSTEP]\nsimp [factorization_def n (prime_of_mem_factorization hp)]\n[GOAL]\nn p : ℕ\n⊢ card (Finset.filter (fun e => p ∣ e + 1) (Finset.range n)) = n / p\n[PROOFSTEP]\ninduction' n with n hn\n[GOAL]\ncase zero\np : ℕ\n⊢ card (Finset.filter (fun e => p ∣ e + 1) (Finset.range zero)) = zero / p\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\np n : ℕ\nhn : card (Finset.filter (fun e => p ∣ e + 1) (Finset.range n)) = n / p\n⊢ card (Finset.filter (fun e => p ∣ e + 1) (Finset.range (succ n))) = succ n / p\n[PROOFSTEP]\nsimp [Nat.succ_div, add_ite, add_zero, Finset.range_succ, filter_insert, apply_ite card, card_insert_of_not_mem, hn]\n[GOAL]\nn p : ℕ\n⊢ card (Finset.filter (fun x => p ∣ x) (Ioc 0 n)) = n / p\n[PROOFSTEP]\ninduction' n with n IH\n[GOAL]\ncase zero\np : ℕ\n⊢ card (Finset.filter (fun x => p ∣ x) (Ioc 0 zero)) = zero / p\n[PROOFSTEP]\nsimp\n  -- TODO: Golf away `h1` after Yaël PRs a lemma asserting this\n[GOAL]\ncase succ\np n : ℕ\nIH : card (Finset.filter (fun x => p ∣ x) (Ioc 0 n)) = n / p\n⊢ card (Finset.filter (fun x => p ∣ x) (Ioc 0 (succ n))) = succ n / p\n[PROOFSTEP]\nhave h1 : Ioc 0 n.succ = insert n.succ (Ioc 0 n) :=\n  by\n  rcases n.eq_zero_or_pos with (rfl | hn)\n  · simp\n  simp_rw [← Ico_succ_succ, Ico_insert_right (succ_le_succ hn.le), Ico_succ_right]\n[GOAL]\np n : ℕ\nIH : card (Finset.filter (fun x => p ∣ x) (Ioc 0 n)) = n / p\n⊢ Ioc 0 (succ n) = insert (succ n) (Ioc 0 n)\n[PROOFSTEP]\nrcases n.eq_zero_or_pos with (rfl | hn)\n[GOAL]\ncase inl\np : ℕ\nIH : card (Finset.filter (fun x => p ∣ x) (Ioc 0 0)) = 0 / p\n⊢ Ioc 0 (succ 0) = insert (succ 0) (Ioc 0 0)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\np n : ℕ\nIH : card (Finset.filter (fun x => p ∣ x) (Ioc 0 n)) = n / p\nhn : n > 0\n⊢ Ioc 0 (succ n) = insert (succ n) (Ioc 0 n)\n[PROOFSTEP]\nsimp_rw [← Ico_succ_succ, Ico_insert_right (succ_le_succ hn.le), Ico_succ_right]\n[GOAL]\ncase succ\np n : ℕ\nIH : card (Finset.filter (fun x => p ∣ x) (Ioc 0 n)) = n / p\nh1 : Ioc 0 (succ n) = insert (succ n) (Ioc 0 n)\n⊢ card (Finset.filter (fun x => p ∣ x) (Ioc 0 (succ n))) = succ n / p\n[PROOFSTEP]\nsimp [Nat.succ_div, add_ite, add_zero, h1, filter_insert, apply_ite card, card_insert_eq_ite, IH, Finset.mem_filter,\n  mem_Ioc, not_le.2 (lt_add_one n), Nat.succ_eq_add_one]\n", "meta": {"mathlib_filename": "Mathlib.Data.Nat.Factorization.Basic", "llama_tokens": 40703, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7772998611746912, "lm_q2_score": 0.6619228825191872, "lm_q1q2_score": 0.5145125646905157}}
{"text": "[GOAL]\nα : Type ?u.337\nlt : α → α → Bool\na : Array α\ni : Fin (Array.size a)\nleft : ℕ := 2 * ↑i + 1\nright : ℕ := left + 1\n⊢ ↑i ≤ 2 * ↑i\n[PROOFSTEP]\nrw [Nat.succ_mul, Nat.one_mul]\n[GOAL]\nα : Type ?u.337\nlt : α → α → Bool\na : Array α\ni : Fin (Array.size a)\nleft : ℕ := 2 * ↑i + 1\nright : ℕ := left + 1\n⊢ ↑i ≤ ↑i + ↑i\n[PROOFSTEP]\nexact Nat.le_add_left i i\n[GOAL]\nα : Type ?u.337\nlt : α → α → Bool\na : Array α\ni : Fin (Array.size a)\nleft : ℕ := 2 * ↑i + 1\nright : ℕ := left + 1\nleft_le : ↑i ≤ left\nright_le : ↑i ≤ right\ni_le : i ≤ i\nj✝ j : { j // i ≤ j }\nh : ¬↑i = ↑↑j\na' : Array α := Array.swap a i ↑j\n⊢ ↑↑j < Array.size a'\n[PROOFSTEP]\nrw [a.size_swap i j]\n[GOAL]\nα : Type ?u.337\nlt : α → α → Bool\na : Array α\ni : Fin (Array.size a)\nleft : ℕ := 2 * ↑i + 1\nright : ℕ := left + 1\nleft_le : ↑i ≤ left\nright_le : ↑i ≤ right\ni_le : i ≤ i\nj✝ j : { j // i ≤ j }\nh : ¬↑i = ↑↑j\na' : Array α := Array.swap a i ↑j\n⊢ ↑↑j < Array.size a\n[PROOFSTEP]\nexact j.1.2\n[GOAL]\nα : Type ?u.337\nlt : α → α → Bool\na : Array α\ni : Fin (Array.size a)\nleft : ℕ := 2 * ↑i + 1\nright : ℕ := left + 1\nleft_le : ↑i ≤ left\nright_le : ↑i ≤ right\ni_le : i ≤ i\nj✝ j : { j // i ≤ j }\nh : ¬↑i = ↑↑j\na' : Array α := Array.swap a i ↑j\nj' : Fin (Array.size a') := { val := ↑↑j, isLt := ?m.5009 }\n⊢ Array.size a' - ↑↑j < Array.size a - ↑i\n[PROOFSTEP]\nrw [a.size_swap i j]\n[GOAL]\nα : Type ?u.337\nlt : α → α → Bool\na : Array α\ni : Fin (Array.size a)\nleft : ℕ := 2 * ↑i + 1\nright : ℕ := left + 1\nleft_le : ↑i ≤ left\nright_le : ↑i ≤ right\ni_le : i ≤ i\nj✝ j : { j // i ≤ j }\nh : ¬↑i = ↑↑j\na' : Array α := Array.swap a i ↑j\nj' : Fin (Array.size a') := { val := ↑↑j, isLt := ?m.5009 }\n⊢ Array.size a - ↑↑j < Array.size a - ↑i\n[PROOFSTEP]\nexact Nat.sub_lt_sub_left i.2 <| Nat.lt_of_le_of_ne j.2 h\n[GOAL]\nα : Type u_1\na : Array α\ni : Fin (Array.size a)\nleft : ℕ := 2 * ↑i + 1\nright : ℕ := left + 1\nleft_le : ↑i ≤ left\nright_le : ↑i ≤ right\ni_le : i ≤ i\nj : { j // i ≤ j }\nh : ¬↑i = ↑↑j\na' : Array α := Array.swap a i ↑j\nj' : Fin (Array.size a') := { val := ↑↑j, isLt := (_ : ↑↑j < Array.size a') }\nthis : Array.size a' - ↑↑j < Array.size a - ↑i\n⊢ (invImage (fun a => PSigma.casesOn a fun a snd => Array.size a - ↑snd) instWellFoundedRelation).1\n    { fst := a', snd := j' } { fst := a, snd := i }\n[PROOFSTEP]\nassumption\n[GOAL]\nα : Type ?u.8277\nlt : α → α → Bool\na : Array α\ni : Fin (Array.size a)\ni0 : ¬↑i = 0\nthis : (↑i - 1) / 2 < ↑i\nj : Fin (Array.size a) := { val := (↑i - 1) / 2, isLt := (_ : (↑i - 1) / 2 < Array.size a) }\na' : Array α := Array.swap a i j\n⊢ ↑j < Array.size a'\n[PROOFSTEP]\nrw [a.size_swap i j]\n[GOAL]\nα : Type ?u.8277\nlt : α → α → Bool\na : Array α\ni : Fin (Array.size a)\ni0 : ¬↑i = 0\nthis : (↑i - 1) / 2 < ↑i\nj : Fin (Array.size a) := { val := (↑i - 1) / 2, isLt := (_ : (↑i - 1) / 2 < Array.size a) }\na' : Array α := Array.swap a i j\n⊢ ↑j < Array.size a\n[PROOFSTEP]\nexact j.2\n[GOAL]\nα : Type u_1\nlt : α → α → Bool\na : Array α\ni : Fin (Array.size a)\ni0 : ¬↑i = 0\nthis : (↑i - 1) / 2 < ↑i\nj : Fin (Array.size a) := { val := (↑i - 1) / 2, isLt := (_ : (↑i - 1) / 2 < Array.size a) }\nh✝ : lt (Array.get a j) (Array.get a i) = true\na' : Array α := Array.swap a i j\n⊢ (invImage (fun a => PSigma.casesOn a fun a snd => ↑snd) instWellFoundedRelation).1\n    { fst := a', snd := { val := ↑j, isLt := (_ : ↑j < Array.size a') } } { fst := a, snd := i }\n[PROOFSTEP]\nassumption\n[GOAL]\nα : Type ?u.10435\nlt : α → α → Bool\nself : BinaryHeap α lt\nx : α\nn : ℕ := size self\n⊢ n < Array.size (Array.push self.arr x)\n[PROOFSTEP]\nrw [Array.size_push]\n[GOAL]\nα : Type ?u.10435\nlt : α → α → Bool\nself : BinaryHeap α lt\nx : α\nn : ℕ := size self\n⊢ n < Array.size self.arr + 1\n[PROOFSTEP]\napply Nat.lt_succ_self\n[GOAL]\nα : Type u_1\nlt : α → α → Bool\nself : BinaryHeap α lt\nx : α\n⊢ size (insert self x) = size self + 1\n[PROOFSTEP]\nsimp [insert, size, size_heapifyUp]\n[GOAL]\nα : Type ?u.11234\nlt : α → α → Bool\nself : BinaryHeap α lt\ne : Array.size self.arr = 0\n⊢ size self = size self - 1\n[PROOFSTEP]\nsimp [size, e]\n[GOAL]\nα : Type ?u.11234\nlt : α → α → Bool\nself : BinaryHeap α lt\nn : ℕ\ne : Array.size self.arr = Nat.succ n\n⊢ 0 < Array.size self.arr\n[PROOFSTEP]\nrw [e]\n[GOAL]\nα : Type ?u.11234\nlt : α → α → Bool\nself : BinaryHeap α lt\nn : ℕ\ne : Array.size self.arr = Nat.succ n\n⊢ 0 < Nat.succ n\n[PROOFSTEP]\napply Nat.succ_pos\n[GOAL]\nα : Type ?u.11234\nlt : α → α → Bool\nself : BinaryHeap α lt\nn : ℕ\ne : Array.size self.arr = Nat.succ n\nh0 : 0 < Array.size self.arr\n⊢ n < Array.size self.arr\n[PROOFSTEP]\nrw [e]\n[GOAL]\nα : Type ?u.11234\nlt : α → α → Bool\nself : BinaryHeap α lt\nn : ℕ\ne : Array.size self.arr = Nat.succ n\nh0 : 0 < Array.size self.arr\n⊢ n < Nat.succ n\n[PROOFSTEP]\napply Nat.lt_succ_self\n[GOAL]\nα : Type ?u.11234\nlt : α → α → Bool\nself : BinaryHeap α lt\nn : ℕ\ne : Array.size self.arr = Nat.succ n\nh0 : 0 < Array.size self.arr\nhn : n < Array.size self.arr\nhn0 : 0 < n\na : Array α := Array.pop (Array.swap self.arr { val := 0, isLt := h0 } { val := n, isLt := hn })\n⊢ 0 < Array.size a\n[PROOFSTEP]\nrwa [Array.size_pop, Array.size_swap, e]\n[GOAL]\nα : Type ?u.11234\nlt : α → α → Bool\nself : BinaryHeap α lt\nn : ℕ\ne : Array.size self.arr = Nat.succ n\nh0 : 0 < Array.size self.arr\nhn : n < Array.size self.arr\nhn0 : 0 < n\na : Array α := Array.pop (Array.swap self.arr { val := 0, isLt := h0 } { val := n, isLt := hn })\n⊢ size { arr := ↑(heapifyDown lt a { val := 0, isLt := (_ : 0 < Array.size a) }) } = size self - 1\n[PROOFSTEP]\nsimp [size]\n[GOAL]\nα : Type ?u.11234\nlt : α → α → Bool\nself : BinaryHeap α lt\nn : ℕ\ne : Array.size self.arr = Nat.succ n\nh0 : 0 < Array.size self.arr\nhn : n < Array.size self.arr\nhn0 : ¬0 < n\n⊢ size { arr := Array.pop self.arr } = size self - 1\n[PROOFSTEP]\nsimp [size]\n[GOAL]\nα : Type u_1\nx : α\nlt : α → α → Bool\nself : BinaryHeap α lt\ne : max self = some x\nh : ¬0 < Array.size self.arr\n⊢ False\n[PROOFSTEP]\nsimp [BinaryHeap.max, Array.get?, h] at e \n[GOAL]\nα : Type ?u.16836\nlt : α → α → Bool\nself : BinaryHeap α lt\nx m : α\ne : max self = some m\na : Array α := Array.set self.arr { val := 0, isLt := (_ : 0 < size self) } x\n⊢ 0 < Array.size a\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type ?u.16836\nlt : α → α → Bool\nself : BinaryHeap α lt\nx m : α\ne : max self = some m\na : Array α := Array.set self.arr { val := 0, isLt := (_ : 0 < size self) } x\n⊢ 0 < Array.size self.arr\n[PROOFSTEP]\nexact size_pos_of_max e\n[GOAL]\nα : Type ?u.18030\nlt : α → α → Bool\nself : BinaryHeap α lt\nx m : α\ne : max self = some m\na : Array α := Array.set self.arr { val := 0, isLt := (_ : 0 < size self) } x\n⊢ 0 < Array.size a\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type ?u.18030\nlt : α → α → Bool\nself : BinaryHeap α lt\nx m : α\ne : max self = some m\na : Array α := Array.set self.arr { val := 0, isLt := (_ : 0 < size self) } x\n⊢ 0 < Array.size self.arr\n[PROOFSTEP]\nexact size_pos_of_max e\n[GOAL]\nα : Type ?u.19048\nlt : α → α → Bool\nself : BinaryHeap α lt\ni : Fin (size self)\nx : α\n⊢ ↑i < Array.size (Array.set self.arr i x)\n[PROOFSTEP]\nrw [self.1.size_set]\n[GOAL]\nα : Type ?u.19048\nlt : α → α → Bool\nself : BinaryHeap α lt\ni : Fin (size self)\nx : α\n⊢ ↑i < Array.size self.arr\n[PROOFSTEP]\nexact i.2\n[GOAL]\nα : Type ?u.19626\nlt : α → α → Bool\nself : BinaryHeap α lt\ni : Fin (size self)\nx : α\n⊢ ↑i < Array.size (Array.set self.arr i x)\n[PROOFSTEP]\nrw [self.1.size_set]\n[GOAL]\nα : Type ?u.19626\nlt : α → α → Bool\nself : BinaryHeap α lt\ni : Fin (size self)\nx : α\n⊢ ↑i < Array.size self.arr\n[PROOFSTEP]\nexact i.2\n[GOAL]\nα : Type ?u.20451\na✝ : Array α\nlt : α → α → Bool\ngt : α → α → Bool := fun y x => lt x y\na : BinaryHeap α gt\nout : Array α\nx : α\ne : BinaryHeap.max a = some x\n⊢ BinaryHeap.size (BinaryHeap.popMax a) < BinaryHeap.size a\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type ?u.20451\na✝ : Array α\nlt : α → α → Bool\ngt : α → α → Bool := fun y x => lt x y\na : BinaryHeap α gt\nout : Array α\nx : α\ne : BinaryHeap.max a = some x\n⊢ BinaryHeap.size a - 1 < BinaryHeap.size a\n[PROOFSTEP]\nexact Nat.sub_lt (BinaryHeap.size_pos_of_max e) Nat.zero_lt_one\n[GOAL]\nα : Type u_1\nlt : α → α → Bool\na : BinaryHeap α fun y x => lt x y\nout : Array α\ngt : α → α → Bool := fun y x => lt x y\nx : α\ne : BinaryHeap.max a = some x\nthis : BinaryHeap.size (BinaryHeap.popMax a) < BinaryHeap.size a\n⊢ (invImage (fun a => PSigma.casesOn a fun a snd => BinaryHeap.size a) instWellFoundedRelation).1\n    { fst := BinaryHeap.popMax a, snd := push out x } { fst := a, snd := out }\n[PROOFSTEP]\nassumption\n", "meta": {"mathlib_filename": "Mathlib.Data.BinaryHeap", "llama_tokens": 4068, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7690802264851919, "lm_q2_score": 0.6688802603710085, "lm_q1q2_score": 0.5144225821376093}}
{"text": "[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝ : Mul α\na : α\nx✝ : IsSquare (op a)\nc : αᵐᵒᵖ\nhc : op a = c * c\n⊢ a = unop c * unop c\n[PROOFSTEP]\nrw [← unop_mul, ← hc, unop_op]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝ : Mul α\na : α\nx✝ : IsSquare a\nc : α\nhc : a = c * c\n⊢ IsSquare (op a)\n[PROOFSTEP]\nsimp [hc]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝² : MulOneClass α\ninst✝¹ : MulOneClass β\ninst✝ : MonoidHomClass F α β\nm : α\nf : F\n⊢ IsSquare m → IsSquare (↑f m)\n[PROOFSTEP]\nrintro ⟨m, rfl⟩\n[GOAL]\ncase intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝² : MulOneClass α\ninst✝¹ : MulOneClass β\ninst✝ : MonoidHomClass F α β\nf : F\nm : α\n⊢ IsSquare (↑f (m * m))\n[PROOFSTEP]\nexact ⟨f m, by simp⟩\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝² : MulOneClass α\ninst✝¹ : MulOneClass β\ninst✝ : MonoidHomClass F α β\nf : F\nm : α\n⊢ ↑f (m * m) = ↑f m * ↑f m\n[PROOFSTEP]\nsimp\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝ : Monoid α\nn : ℕ\na m : α\n⊢ IsSquare m ↔ ∃ c, m = c ^ 2\n[PROOFSTEP]\nsimp [IsSquare, pow_two]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝ : Monoid α\nn✝ : ℕ\na : α\nn : ℕ\n⊢ IsSquare a → IsSquare (a ^ n)\n[PROOFSTEP]\nrintro ⟨a, rfl⟩\n[GOAL]\ncase intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝ : Monoid α\nn✝ n : ℕ\na : α\n⊢ IsSquare ((a * a) ^ n)\n[PROOFSTEP]\nexact ⟨a ^ n, (Commute.refl _).mul_pow _⟩\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝ : Monoid α\nn : ℕ\na : α\n⊢ Even n → ∀ (a : α), IsSquare (a ^ n)\n[PROOFSTEP]\nrintro ⟨n, rfl⟩ a\n[GOAL]\ncase intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝ : Monoid α\na✝ : α\nn : ℕ\na : α\n⊢ IsSquare (a ^ (n + n))\n[PROOFSTEP]\nexact ⟨a ^ n, pow_add _ _ _⟩\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝¹ : Monoid α\nn : ℕ\na : α\ninst✝ : HasDistribNeg α\n⊢ Even n → ∀ (a : α), (-a) ^ n = a ^ n\n[PROOFSTEP]\nrintro ⟨c, rfl⟩ a\n[GOAL]\ncase intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝¹ : Monoid α\na✝ : α\ninst✝ : HasDistribNeg α\nc : ℕ\na : α\n⊢ (-a) ^ (c + c) = a ^ (c + c)\n[PROOFSTEP]\nsimp_rw [← two_mul, pow_mul, neg_sq]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝¹ : Monoid α\nn : ℕ\na : α\ninst✝ : HasDistribNeg α\nh : Even n\n⊢ (-1) ^ n = 1\n[PROOFSTEP]\nrw [h.neg_pow, one_pow]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝ : CommSemigroup α\na b : α\n⊢ IsSquare a → IsSquare b → IsSquare (a * b)\n[PROOFSTEP]\nrintro ⟨a, rfl⟩ ⟨b, rfl⟩\n[GOAL]\ncase intro.intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝ : CommSemigroup α\na b : α\n⊢ IsSquare (a * a * (b * b))\n[PROOFSTEP]\nexact ⟨a * b, mul_mul_mul_comm _ _ _ _⟩\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝ : DivisionMonoid α\na : α\n⊢ IsSquare a⁻¹ ↔ IsSquare a\n[PROOFSTEP]\nrefine' ⟨fun h => _, fun h => _⟩\n[GOAL]\ncase refine'_1\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝ : DivisionMonoid α\na : α\nh : IsSquare a⁻¹\n⊢ IsSquare a\n[PROOFSTEP]\nrw [← isSquare_op_iff, ← inv_inv a]\n[GOAL]\ncase refine'_1\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝ : DivisionMonoid α\na : α\nh : IsSquare a⁻¹\n⊢ IsSquare (op a⁻¹⁻¹)\n[PROOFSTEP]\nexact h.map (MulEquiv.inv' α)\n[GOAL]\ncase refine'_2\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝ : DivisionMonoid α\na : α\nh : IsSquare a\n⊢ IsSquare a⁻¹\n[PROOFSTEP]\nexact ((isSquare_op_iff a).mpr h).map (MulEquiv.inv' α).symm\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝ : DivisionMonoid α\na : α\nn : ℤ\n⊢ IsSquare a → IsSquare (a ^ n)\n[PROOFSTEP]\nrintro ⟨a, rfl⟩\n[GOAL]\ncase intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝ : DivisionMonoid α\nn : ℤ\na : α\n⊢ IsSquare ((a * a) ^ n)\n[PROOFSTEP]\nexact ⟨a ^ n, (Commute.refl _).mul_zpow _⟩\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝¹ : DivisionMonoid α\na : α\ninst✝ : HasDistribNeg α\nn : ℤ\n⊢ Even n → ∀ (a : α), (-a) ^ n = a ^ n\n[PROOFSTEP]\nrintro ⟨c, rfl⟩ a\n[GOAL]\ncase intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝¹ : DivisionMonoid α\na✝ : α\ninst✝ : HasDistribNeg α\nc : ℤ\na : α\n⊢ (-a) ^ (c + c) = a ^ (c + c)\n[PROOFSTEP]\nexact zpow_bit0_neg _ _\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝¹ : DivisionMonoid α\na : α\ninst✝ : HasDistribNeg α\nn : ℤ\nh : Even n\n⊢ (-1) ^ n = 1\n[PROOFSTEP]\nrw [h.neg_zpow, one_zpow]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝¹ : SubtractionMonoid α\ninst✝ : LinearOrder α\na : α\n⊢ Even |a| ↔ Even a\n[PROOFSTEP]\ncases abs_choice a\n[GOAL]\ncase inl\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝¹ : SubtractionMonoid α\ninst✝ : LinearOrder α\na : α\nh✝ : |a| = a\n⊢ Even |a| ↔ Even a\n[PROOFSTEP]\nhave h : abs a = a := by assumption\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝¹ : SubtractionMonoid α\ninst✝ : LinearOrder α\na : α\nh✝ : |a| = a\n⊢ |a| = a\n[PROOFSTEP]\nassumption\n[GOAL]\ncase inl\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝¹ : SubtractionMonoid α\ninst✝ : LinearOrder α\na : α\nh✝ h : |a| = a\n⊢ Even |a| ↔ Even a\n[PROOFSTEP]\nsimp only [h, even_neg]\n[GOAL]\ncase inr\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝¹ : SubtractionMonoid α\ninst✝ : LinearOrder α\na : α\nh✝ : |a| = -a\n⊢ Even |a| ↔ Even a\n[PROOFSTEP]\nhave h : abs a = -a := by assumption\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝¹ : SubtractionMonoid α\ninst✝ : LinearOrder α\na : α\nh✝ : |a| = -a\n⊢ |a| = -a\n[PROOFSTEP]\nassumption\n[GOAL]\ncase inr\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝¹ : SubtractionMonoid α\ninst✝ : LinearOrder α\na : α\nh✝ h : |a| = -a\n⊢ Even |a| ↔ Even a\n[PROOFSTEP]\nsimp only [h, even_neg]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝ : DivisionCommMonoid α\na b : α\nha : IsSquare a\nhb : IsSquare b\n⊢ IsSquare (a / b)\n[PROOFSTEP]\nrw [div_eq_mul_inv]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝ : DivisionCommMonoid α\na b : α\nha : IsSquare a\nhb : IsSquare b\n⊢ IsSquare (a * b⁻¹)\n[PROOFSTEP]\nexact ha.mul hb.inv\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝ : Group α\nn : ℤ\n⊢ Even n → ∀ (a : α), IsSquare (a ^ n)\n[PROOFSTEP]\nrintro ⟨n, rfl⟩ a\n[GOAL]\ncase intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝ : Group α\nn : ℤ\na : α\n⊢ IsSquare (a ^ (n + n))\n[PROOFSTEP]\nexact ⟨a ^ n, zpow_add _ _ _⟩\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝³ : CanonicallyLinearOrderedAddMonoid α\ninst✝² : Sub α\ninst✝¹ : OrderedSub α\ninst✝ : ContravariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\nm n : α\nhm : Even m\nhn : Even n\n⊢ Even (m - n)\n[PROOFSTEP]\nobtain ⟨a, rfl⟩ := hm\n[GOAL]\ncase intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝³ : CanonicallyLinearOrderedAddMonoid α\ninst✝² : Sub α\ninst✝¹ : OrderedSub α\ninst✝ : ContravariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\nn : α\nhn : Even n\na : α\n⊢ Even (a + a - n)\n[PROOFSTEP]\nobtain ⟨b, rfl⟩ := hn\n[GOAL]\ncase intro.intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝³ : CanonicallyLinearOrderedAddMonoid α\ninst✝² : Sub α\ninst✝¹ : OrderedSub α\ninst✝ : ContravariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\na b : α\n⊢ Even (a + a - (b + b))\n[PROOFSTEP]\nrefine' ⟨a - b, _⟩\n[GOAL]\ncase intro.intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝³ : CanonicallyLinearOrderedAddMonoid α\ninst✝² : Sub α\ninst✝¹ : OrderedSub α\ninst✝ : ContravariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\na b : α\n⊢ a + a - (b + b) = a - b + (a - b)\n[PROOFSTEP]\nobtain h | h := le_total a b\n[GOAL]\ncase intro.intro.inl\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝³ : CanonicallyLinearOrderedAddMonoid α\ninst✝² : Sub α\ninst✝¹ : OrderedSub α\ninst✝ : ContravariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\na b : α\nh : a ≤ b\n⊢ a + a - (b + b) = a - b + (a - b)\n[PROOFSTEP]\nrw [tsub_eq_zero_of_le h, tsub_eq_zero_of_le (add_le_add h h), add_zero]\n[GOAL]\ncase intro.intro.inr\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝³ : CanonicallyLinearOrderedAddMonoid α\ninst✝² : Sub α\ninst✝¹ : OrderedSub α\ninst✝ : ContravariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\na b : α\nh : b ≤ a\n⊢ a + a - (b + b) = a - b + (a - b)\n[PROOFSTEP]\nexact (tsub_add_tsub_comm h h).symm\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝¹ : Semiring α\ninst✝ : Semiring β\nm✝ n m : α\n⊢ Even m ↔ ∃ c, m = 2 * c\n[PROOFSTEP]\nsimp [even_iff_exists_two_nsmul]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝¹ : Semiring α\ninst✝ : Semiring β\nm n a : α\n⊢ Even a ↔ 2 ∣ a\n[PROOFSTEP]\nsimp [Even, Dvd.dvd, two_mul]\n[GOAL]\nF : Type u_1\nα✝ : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝² : Semiring α✝\ninst✝¹ : Semiring β\nm n : α✝\nα : Type u_5\ninst✝ : Semiring α\n⊢ (Set.range fun x => 2 * x) = {a | Even a}\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nF : Type u_1\nα✝ : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝² : Semiring α✝\ninst✝¹ : Semiring β\nm n : α✝\nα : Type u_5\ninst✝ : Semiring α\nx : α\n⊢ (x ∈ Set.range fun x => 2 * x) ↔ x ∈ {a | Even a}\n[PROOFSTEP]\nsimp [eq_comm, two_mul, Even]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝¹ : Semiring α\ninst✝ : Semiring β\nm n : α\n⊢ 2 = 1 + 1\n[PROOFSTEP]\nrw [one_add_one_eq_two]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝¹ : Semiring α\ninst✝ : Semiring β\nm n : α\nhm : Even m\na : ℕ\nx✝ : a + 1 ≠ 0\n⊢ Even (m ^ (a + 1))\n[PROOFSTEP]\nrw [pow_succ]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝¹ : Semiring α\ninst✝ : Semiring β\nm n : α\nhm : Even m\na : ℕ\nx✝ : a + 1 ≠ 0\n⊢ Even (m * m ^ a)\n[PROOFSTEP]\nexact hm.mul_right _\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝¹ : Semiring α\ninst✝ : Semiring β\nm n a b : α\n⊢ a = 2 * b + 1 ↔ a = bit1 b\n[PROOFSTEP]\nrw [two_mul]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝¹ : Semiring α\ninst✝ : Semiring β\nm n a b : α\n⊢ a = b + b + 1 ↔ a = bit1 b\n[PROOFSTEP]\nrfl\n[GOAL]\nF : Type u_1\nα✝ : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝² : Semiring α✝\ninst✝¹ : Semiring β\nm n : α✝\nα : Type u_5\ninst✝ : Semiring α\n⊢ (Set.range fun x => 2 * x + 1) = {a | Odd a}\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nF : Type u_1\nα✝ : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝² : Semiring α✝\ninst✝¹ : Semiring β\nm n : α✝\nα : Type u_5\ninst✝ : Semiring α\nx : α\n⊢ (x ∈ Set.range fun x => 2 * x + 1) ↔ x ∈ {a | Odd a}\n[PROOFSTEP]\nsimp [Odd, eq_comm]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝¹ : Semiring α\ninst✝ : Semiring β\nm n : α\n⊢ Even m → Odd n → Odd (m + n)\n[PROOFSTEP]\nrintro ⟨m, rfl⟩ ⟨n, rfl⟩\n[GOAL]\ncase intro.intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝¹ : Semiring α\ninst✝ : Semiring β\nm n : α\n⊢ Odd (m + m + (2 * n + 1))\n[PROOFSTEP]\nexact ⟨m + n, by rw [mul_add, ← two_mul, add_assoc]⟩\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝¹ : Semiring α\ninst✝ : Semiring β\nm n : α\n⊢ m + m + (2 * n + 1) = 2 * (m + n) + 1\n[PROOFSTEP]\nrw [mul_add, ← two_mul, add_assoc]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝¹ : Semiring α\ninst✝ : Semiring β\nm n : α\nhe : Even m\nho : Odd n\n⊢ Odd (n + m)\n[PROOFSTEP]\nsimp only [he.add_odd ho, add_comm n m]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝¹ : Semiring α\ninst✝ : Semiring β\nm n : α\nhm : Odd m\nhn : Even n\n⊢ Odd (m + n)\n[PROOFSTEP]\nrw [add_comm]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝¹ : Semiring α\ninst✝ : Semiring β\nm n : α\nhm : Odd m\nhn : Even n\n⊢ Odd (n + m)\n[PROOFSTEP]\nexact hn.add_odd hm\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝¹ : Semiring α\ninst✝ : Semiring β\nm n : α\n⊢ Odd m → Odd n → Even (m + n)\n[PROOFSTEP]\nrintro ⟨m, rfl⟩ ⟨n, rfl⟩\n[GOAL]\ncase intro.intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝¹ : Semiring α\ninst✝ : Semiring β\nm n : α\n⊢ Even (2 * m + 1 + (2 * n + 1))\n[PROOFSTEP]\nrefine' ⟨n + m + 1, _⟩\n[GOAL]\ncase intro.intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝¹ : Semiring α\ninst✝ : Semiring β\nm n : α\n⊢ 2 * m + 1 + (2 * n + 1) = n + m + 1 + (n + m + 1)\n[PROOFSTEP]\nrw [two_mul, two_mul]\n[GOAL]\ncase intro.intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝¹ : Semiring α\ninst✝ : Semiring β\nm n : α\n⊢ m + m + 1 + (n + n + 1) = n + m + 1 + (n + m + 1)\n[PROOFSTEP]\nac_rfl\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝¹ : Semiring α\ninst✝ : Semiring β\nm n : α\n⊢ Odd (m + (m + 1))\n[PROOFSTEP]\nsimp [← add_assoc]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝¹ : Semiring α\ninst✝ : Semiring β\nm n : α\n⊢ Odd (m + 1 + m)\n[PROOFSTEP]\nsimp [add_comm _ m]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝¹ : Semiring α\ninst✝ : Semiring β\nm n : α\n⊢ Odd (m + (1 + m))\n[PROOFSTEP]\nsimp [add_comm 1 m]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝¹ : Semiring α\ninst✝ : Semiring β\nm n : α\n⊢ Odd (1 + m + m)\n[PROOFSTEP]\nsimp [add_comm 1 m]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝² : Semiring α\ninst✝¹ : Semiring β\nm n : α\ninst✝ : RingHomClass F α β\nf : F\n⊢ Odd m → Odd (↑f m)\n[PROOFSTEP]\nrintro ⟨m, rfl⟩\n[GOAL]\ncase intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝² : Semiring α\ninst✝¹ : Semiring β\nn : α\ninst✝ : RingHomClass F α β\nf : F\nm : α\n⊢ Odd (↑f (2 * m + 1))\n[PROOFSTEP]\nexact ⟨f m, by simp [two_mul]⟩\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝² : Semiring α\ninst✝¹ : Semiring β\nn : α\ninst✝ : RingHomClass F α β\nf : F\nm : α\n⊢ ↑f (2 * m + 1) = 2 * ↑f m + 1\n[PROOFSTEP]\nsimp [two_mul]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝¹ : Semiring α\ninst✝ : Semiring β\nm n : α\n⊢ Odd m → Odd n → Odd (m * n)\n[PROOFSTEP]\nrintro ⟨m, rfl⟩ ⟨n, rfl⟩\n[GOAL]\ncase intro.intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝¹ : Semiring α\ninst✝ : Semiring β\nm n : α\n⊢ Odd ((2 * m + 1) * (2 * n + 1))\n[PROOFSTEP]\nrefine' ⟨2 * m * n + n + m, _⟩\n[GOAL]\ncase intro.intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝¹ : Semiring α\ninst✝ : Semiring β\nm n : α\n⊢ (2 * m + 1) * (2 * n + 1) = 2 * (2 * m * n + n + m) + 1\n[PROOFSTEP]\nrw [mul_add, add_mul, mul_one, ← add_assoc, one_mul, mul_assoc, ← mul_add, ← mul_add, ← mul_assoc, ← Nat.cast_two, ←\n  Nat.cast_comm]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝¹ : Semiring α\ninst✝ : Semiring β\nm n : α\nhm : Odd m\n⊢ Odd (m ^ 0)\n[PROOFSTEP]\nrw [pow_zero]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝¹ : Semiring α\ninst✝ : Semiring β\nm n : α\nhm : Odd m\n⊢ Odd 1\n[PROOFSTEP]\nexact odd_one\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝¹ : Semiring α\ninst✝ : Semiring β\nm n : α\nhm : Odd m\na : ℕ\n⊢ Odd (m ^ (a + 1))\n[PROOFSTEP]\nrw [pow_succ]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝¹ : Semiring α\ninst✝ : Semiring β\nm n : α\nhm : Odd m\na : ℕ\n⊢ Odd (m * m ^ a)\n[PROOFSTEP]\nexact hm.mul <| Odd.pow hm\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝¹ : Monoid α\ninst✝ : HasDistribNeg α\na : α\nn : ℕ\n⊢ Odd n → ∀ (a : α), (-a) ^ n = -a ^ n\n[PROOFSTEP]\nrintro ⟨c, rfl⟩ a\n[GOAL]\ncase intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝¹ : Monoid α\ninst✝ : HasDistribNeg α\na✝ : α\nc : ℕ\na : α\n⊢ (-a) ^ (2 * c + 1) = -a ^ (2 * c + 1)\n[PROOFSTEP]\nsimp_rw [pow_add, pow_mul, neg_sq, pow_one, mul_neg]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝¹ : Monoid α\ninst✝ : HasDistribNeg α\na : α\nn : ℕ\nh : Odd n\n⊢ (-1) ^ n = -1\n[PROOFSTEP]\nrw [h.neg_pow, one_pow]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝¹ : CanonicallyOrderedCommSemiring α\ninst✝ : Nontrivial α\nn : α\nhn : Odd n\n⊢ 0 < n\n[PROOFSTEP]\nobtain ⟨k, rfl⟩ := hn\n[GOAL]\ncase intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝¹ : CanonicallyOrderedCommSemiring α\ninst✝ : Nontrivial α\nk : α\n⊢ 0 < 2 * k + 1\n[PROOFSTEP]\nrw [pos_iff_ne_zero, Ne.def, add_eq_zero_iff, not_and']\n[GOAL]\ncase intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝¹ : CanonicallyOrderedCommSemiring α\ninst✝ : Nontrivial α\nk : α\n⊢ 1 = 0 → ¬2 * k = 0\n[PROOFSTEP]\nexact fun h => (one_ne_zero h).elim\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝ : Ring α\na b : α\nn : ℕ\n⊢ Even (-2)\n[PROOFSTEP]\nsimp only [even_neg, even_two]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝ : Ring α\na b : α\nn : ℕ\nhp : Odd a\n⊢ Odd (-a)\n[PROOFSTEP]\nobtain ⟨k, hk⟩ := hp\n[GOAL]\ncase intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝ : Ring α\na b : α\nn : ℕ\nk : α\nhk : a = 2 * k + 1\n⊢ Odd (-a)\n[PROOFSTEP]\nuse-(k + 1)\n[GOAL]\ncase h\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝ : Ring α\na b : α\nn : ℕ\nk : α\nhk : a = 2 * k + 1\n⊢ -a = 2 * -(k + 1) + 1\n[PROOFSTEP]\nrw [mul_neg, mul_add, neg_add, add_assoc, two_mul (1 : α), neg_add, neg_add_cancel_right, ← neg_add, hk]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝ : Ring α\na b : α\nn : ℕ\n⊢ Odd (-1)\n[PROOFSTEP]\nsimp\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝ : Ring α\na b : α\nn : ℕ\nha : Odd a\nhb : Even b\n⊢ Odd (a - b)\n[PROOFSTEP]\nrw [sub_eq_add_neg]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝ : Ring α\na b : α\nn : ℕ\nha : Odd a\nhb : Even b\n⊢ Odd (a + -b)\n[PROOFSTEP]\nexact ha.add_even hb.neg\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝ : Ring α\na b : α\nn : ℕ\nha : Even a\nhb : Odd b\n⊢ Odd (a - b)\n[PROOFSTEP]\nrw [sub_eq_add_neg]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝ : Ring α\na b : α\nn : ℕ\nha : Even a\nhb : Odd b\n⊢ Odd (a + -b)\n[PROOFSTEP]\nexact ha.add_odd hb.neg\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝ : Ring α\na b : α\nn : ℕ\nha : Odd a\nhb : Odd b\n⊢ Even (a - b)\n[PROOFSTEP]\nrw [sub_eq_add_neg]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝ : Ring α\na b : α\nn : ℕ\nha : Odd a\nhb : Odd b\n⊢ Even (a + -b)\n[PROOFSTEP]\nexact ha.add_odd hb.neg\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝¹ : Ring α\na b : α\nn : ℕ\ninst✝ : LinearOrder α\n⊢ Odd |a| ↔ Odd a\n[PROOFSTEP]\ncases' abs_choice a with h h\n[GOAL]\ncase inl\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝¹ : Ring α\na b : α\nn : ℕ\ninst✝ : LinearOrder α\nh : |a| = a\n⊢ Odd |a| ↔ Odd a\n[PROOFSTEP]\nsimp only [h, odd_neg]\n[GOAL]\ncase inr\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝¹ : Ring α\na b : α\nn : ℕ\ninst✝ : LinearOrder α\nh : |a| = -a\n⊢ Odd |a| ↔ Odd a\n[PROOFSTEP]\nsimp only [h, odd_neg]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝ : LinearOrderedRing R\na✝ : R\nn : ℕ\nhn : Even n\na : R\n⊢ 0 ≤ a ^ n\n[PROOFSTEP]\ncases' hn with k hk\n[GOAL]\ncase intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝ : LinearOrderedRing R\na✝ : R\nn : ℕ\na : R\nk : ℕ\nhk : n = k + k\n⊢ 0 ≤ a ^ n\n[PROOFSTEP]\nsimpa only [hk, two_mul] using pow_bit0_nonneg a k\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝ : LinearOrderedRing R\na : R\nn : ℕ\nhn : Even n\nha : a ≠ 0\n⊢ 0 < a ^ n\n[PROOFSTEP]\ncases' hn with k hk\n[GOAL]\ncase intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝ : LinearOrderedRing R\na : R\nn : ℕ\nha : a ≠ 0\nk : ℕ\nhk : n = k + k\n⊢ 0 < a ^ n\n[PROOFSTEP]\nsimpa only [hk, two_mul] using pow_bit0_pos ha k\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝ : LinearOrderedRing R\na : R\nn : ℕ\nhn : Odd n\nha : a ≤ 0\n⊢ a ^ n ≤ 0\n[PROOFSTEP]\ncases' hn with k hk\n[GOAL]\ncase intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝ : LinearOrderedRing R\na : R\nn : ℕ\nha : a ≤ 0\nk : ℕ\nhk : n = 2 * k + 1\n⊢ a ^ n ≤ 0\n[PROOFSTEP]\nsimpa only [hk, two_mul] using pow_bit1_nonpos_iff.mpr ha\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝ : LinearOrderedRing R\na : R\nn : ℕ\nhn : Odd n\nha : a < 0\n⊢ a ^ n < 0\n[PROOFSTEP]\ncases' hn with k hk\n[GOAL]\ncase intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝ : LinearOrderedRing R\na : R\nn : ℕ\nha : a < 0\nk : ℕ\nhk : n = 2 * k + 1\n⊢ a ^ n < 0\n[PROOFSTEP]\nsimpa only [hk, two_mul] using pow_bit1_neg_iff.mpr ha\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝ : LinearOrderedRing R\na : R\nn : ℕ\nhn : Even n\nh₀ : 0 < n\nh : 0 < a ^ n\nha : a = 0\n⊢ False\n[PROOFSTEP]\nrw [ha, zero_pow h₀] at h \n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝ : LinearOrderedRing R\na : R\nn : ℕ\nhn : Even n\nh₀ : 0 < n\nh : 0 < 0\nha : a = 0\n⊢ False\n[PROOFSTEP]\nexact lt_irrefl 0 h\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝ : LinearOrderedRing R\na✝ : R\nn p : ℕ\nhp : Even p\na : R\n⊢ |a| ^ p = a ^ p\n[PROOFSTEP]\nrw [← abs_pow, abs_eq_self]\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝ : LinearOrderedRing R\na✝ : R\nn p : ℕ\nhp : Even p\na : R\n⊢ 0 ≤ a ^ p\n[PROOFSTEP]\nexact hp.pow_nonneg _\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝ : LinearOrderedRing R\na : R\nn : ℕ\nhn : Odd n\n⊢ StrictMono fun a => a ^ n\n[PROOFSTEP]\ncases' hn with k hk\n[GOAL]\ncase intro\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nR : Type u_4\ninst✝ : LinearOrderedRing R\na : R\nn k : ℕ\nhk : n = 2 * k + 1\n⊢ StrictMono fun a => a ^ n\n[PROOFSTEP]\nsimpa only [hk, two_mul] using strictMono_pow_bit1 _\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Parity", "llama_tokens": 11493, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7853085909370422, "lm_q2_score": 0.6548947223065754, "lm_q1q2_score": 0.5142944515866823}}
{"text": "[GOAL]\nα : Type u_1\ninst✝ : OrderedSemiring α\na b : α\nha : a = 0\nhb : b = 0\n⊢ a + b = 0\n[PROOFSTEP]\nsimp [*]\n[GOAL]\nα : Type u_1\ninst✝ : OrderedSemiring α\na b : α\nha : a = 0\nhb : b ≤ 0\n⊢ a + b ≤ 0\n[PROOFSTEP]\nsimp [*]\n[GOAL]\nα : Type u_1\ninst✝ : OrderedSemiring α\na b : α\nha : a = 0\nhb : b < 0\n⊢ a + b < 0\n[PROOFSTEP]\nsimp [*]\n[GOAL]\nα : Type u_1\ninst✝ : OrderedSemiring α\na b : α\nha : a ≤ 0\nhb : b = 0\n⊢ a + b ≤ 0\n[PROOFSTEP]\nsimp [*]\n[GOAL]\nα : Type u_1\ninst✝ : OrderedSemiring α\na b : α\nha : a < 0\nhb : b = 0\n⊢ a + b < 0\n[PROOFSTEP]\nsimp [*]\n[GOAL]\nα : Type u_1\ninst✝ : StrictOrderedRing α\na b : α\nha : a < 0\nhb : 0 < b\nthis : -b * a > 0\n⊢ 0 < -(b * a)\n[PROOFSTEP]\nsimpa\n[GOAL]\nα : Type u_1\ninst✝ : OrderedRing α\na b : α\nha : a ≤ 0\nhb : 0 < b\nthis : -b * a ≥ 0\n⊢ b * a ≤ 0\n[PROOFSTEP]\nsimpa\n  -- used alongside `mul_neg` and `mul_nonpos`, so has the same argument pattern for uniformity\n[GOAL]\nα : Type u_1\ninst✝ : OrderedSemiring α\na b : α\nha : a = 0\nx✝ : 0 < b\n⊢ b * a = 0\n[PROOFSTEP]\nsimp [*]\n[GOAL]\nα : Type u_1\nR : α → α → Prop\ninst✝ : Semiring α\na b : α\nx✝ : R a 0\nh : b = 0\n⊢ a * b = 0\n[PROOFSTEP]\nsimp [h]\n  -- used in the `nlinarith` normalization steps. The `_` argument is for uniformity.\n[GOAL]\nα : Type u_1\nR : α → α → Prop\ninst✝ : Semiring α\na b : α\nh : a = 0\nx✝ : R b 0\n⊢ a * b = 0\n[PROOFSTEP]\nsimp [h]\n", "meta": {"mathlib_filename": "Mathlib.Tactic.Linarith.Lemmas", "llama_tokens": 725, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7217432062975979, "lm_q2_score": 0.7122321842389469, "lm_q1q2_score": 0.514048740280959}}
{"text": "[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝² : OrderedSemiring 𝕜\ninst✝¹ : AddCommMonoid E\ninst✝ : SMul 𝕜 E\ns : Set E\nx✝ y✝ x y : E\n⊢ [x-[𝕜]y] = (fun p => p.fst • x + p.snd • y) '' {p | 0 ≤ p.fst ∧ 0 ≤ p.snd ∧ p.fst + p.snd = 1}\n[PROOFSTEP]\nsimp only [segment, image, Prod.exists, mem_setOf_eq, exists_prop, and_assoc]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝² : OrderedSemiring 𝕜\ninst✝¹ : AddCommMonoid E\ninst✝ : SMul 𝕜 E\ns : Set E\nx✝ y✝ x y : E\n⊢ openSegment 𝕜 x y = (fun p => p.fst • x + p.snd • y) '' {p | 0 < p.fst ∧ 0 < p.snd ∧ p.fst + p.snd = 1}\n[PROOFSTEP]\nsimp only [openSegment, image, Prod.exists, mem_setOf_eq, exists_prop, and_assoc]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝² : OrderedSemiring 𝕜\ninst✝¹ : AddCommMonoid E\ninst✝ : MulActionWithZero 𝕜 E\nx y : E\n⊢ 1 • x + 0 • y = x\n[PROOFSTEP]\nrw [zero_smul, one_smul, add_zero]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝² : OrderedSemiring 𝕜\ninst✝¹ : AddCommMonoid E\ninst✝ : Module 𝕜 E\ns : Set E\nx✝¹ y z✝ x z : E\nx✝ : z ∈ [x-[𝕜]x]\na b : 𝕜\nw✝¹ : 0 ≤ a\nw✝ : 0 ≤ b\nhab : a + b = 1\nhz : a • x + b • x = z\n⊢ z ∈ {x}\n[PROOFSTEP]\nsimpa only [(add_smul _ _ _).symm, mem_singleton_iff, hab, one_smul, eq_comm] using hz\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝² : OrderedSemiring 𝕜\ninst✝¹ : AddCommMonoid E\ninst✝ : Module 𝕜 E\ns : Set E\nx✝ y✝ z x y : E\n⊢ insert x (insert y (openSegment 𝕜 x y)) = [x-[𝕜]y]\n[PROOFSTEP]\nsimp only [subset_antisymm_iff, insert_subset_iff, left_mem_segment, right_mem_segment, openSegment_subset_segment,\n  true_and_iff]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝² : OrderedSemiring 𝕜\ninst✝¹ : AddCommMonoid E\ninst✝ : Module 𝕜 E\ns : Set E\nx✝ y✝ z x y : E\n⊢ [x-[𝕜]y] ⊆ insert x (insert y (openSegment 𝕜 x y))\n[PROOFSTEP]\nrintro z ⟨a, b, ha, hb, hab, rfl⟩\n[GOAL]\ncase intro.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝² : OrderedSemiring 𝕜\ninst✝¹ : AddCommMonoid E\ninst✝ : Module 𝕜 E\ns : Set E\nx✝ y✝ z x y : E\na b : 𝕜\nha : 0 ≤ a\nhb : 0 ≤ b\nhab : a + b = 1\n⊢ a • x + b • y ∈ insert x (insert y (openSegment 𝕜 x y))\n[PROOFSTEP]\nrefine' hb.eq_or_gt.imp _ fun hb' => ha.eq_or_gt.imp _ fun ha' => _\n[GOAL]\ncase intro.intro.intro.intro.intro.refine'_1\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝² : OrderedSemiring 𝕜\ninst✝¹ : AddCommMonoid E\ninst✝ : Module 𝕜 E\ns : Set E\nx✝ y✝ z x y : E\na b : 𝕜\nha : 0 ≤ a\nhb : 0 ≤ b\nhab : a + b = 1\n⊢ b = 0 → a • x + b • y = x\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase intro.intro.intro.intro.intro.refine'_1\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝² : OrderedSemiring 𝕜\ninst✝¹ : AddCommMonoid E\ninst✝ : Module 𝕜 E\ns : Set E\nx✝ y✝ z x y : E\na : 𝕜\nha : 0 ≤ a\nhb : 0 ≤ 0\nhab : a + 0 = 1\n⊢ a • x + 0 • y = x\n[PROOFSTEP]\nrw [← add_zero a, hab, one_smul, zero_smul, add_zero]\n[GOAL]\ncase intro.intro.intro.intro.intro.refine'_2\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝² : OrderedSemiring 𝕜\ninst✝¹ : AddCommMonoid E\ninst✝ : Module 𝕜 E\ns : Set E\nx✝ y✝ z x y : E\na b : 𝕜\nha : 0 ≤ a\nhb : 0 ≤ b\nhab : a + b = 1\nhb' : 0 < b\n⊢ a = 0 → a • x + b • y = y\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase intro.intro.intro.intro.intro.refine'_2\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝² : OrderedSemiring 𝕜\ninst✝¹ : AddCommMonoid E\ninst✝ : Module 𝕜 E\ns : Set E\nx✝ y✝ z x y : E\nb : 𝕜\nhb : 0 ≤ b\nhb' : 0 < b\nha : 0 ≤ 0\nhab : 0 + b = 1\n⊢ 0 • x + b • y = y\n[PROOFSTEP]\nrw [← zero_add b, hab, one_smul, zero_smul, zero_add]\n[GOAL]\ncase intro.intro.intro.intro.intro.refine'_3\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝² : OrderedSemiring 𝕜\ninst✝¹ : AddCommMonoid E\ninst✝ : Module 𝕜 E\ns : Set E\nx✝ y✝ z x y : E\na b : 𝕜\nha : 0 ≤ a\nhb : 0 ≤ b\nhab : a + b = 1\nhb' : 0 < b\nha' : 0 < a\n⊢ a • x + b • y ∈ openSegment 𝕜 x y\n[PROOFSTEP]\nexact ⟨a, b, ha', hb', hab, rfl⟩\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝² : OrderedSemiring 𝕜\ninst✝¹ : AddCommMonoid E\ninst✝ : Module 𝕜 E\ns : Set E\nx y z : E\nhx : x ≠ z\nhy : y ≠ z\nhz : z ∈ [x-[𝕜]y]\n⊢ z ∈ openSegment 𝕜 x y\n[PROOFSTEP]\nrw [← insert_endpoints_openSegment] at hz \n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝² : OrderedSemiring 𝕜\ninst✝¹ : AddCommMonoid E\ninst✝ : Module 𝕜 E\ns : Set E\nx y z : E\nhx : x ≠ z\nhy : y ≠ z\nhz : z ∈ insert x (insert y (openSegment 𝕜 x y))\n⊢ z ∈ openSegment 𝕜 x y\n[PROOFSTEP]\nexact (hz.resolve_left hx.symm).resolve_left hy.symm\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝² : OrderedSemiring 𝕜\ninst✝¹ : AddCommMonoid E\ninst✝ : Module 𝕜 E\ns : Set E\nx y z : E\nhx : x ∈ s\nhy : y ∈ s\n⊢ openSegment 𝕜 x y ⊆ s ↔ [x-[𝕜]y] ⊆ s\n[PROOFSTEP]\nsimp only [← insert_endpoints_openSegment, insert_subset_iff, *, true_and_iff]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝⁷ : OrderedRing 𝕜\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : AddCommGroup G\ninst✝³ : Module 𝕜 E\ninst✝² : Module 𝕜 F\ninst✝¹ : Nontrivial 𝕜\ninst✝ : DenselyOrdered 𝕜\nx z : E\nx✝ : z ∈ openSegment 𝕜 x x\na b : 𝕜\nw✝¹ : 0 < a\nw✝ : 0 < b\nhab : a + b = 1\nhz : a • x + b • x = z\n⊢ z ∈ {x}\n[PROOFSTEP]\nsimpa only [← add_smul, mem_singleton_iff, hab, one_smul, eq_comm] using hz\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝⁷ : OrderedRing 𝕜\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : AddCommGroup G\ninst✝³ : Module 𝕜 E\ninst✝² : Module 𝕜 F\ninst✝¹ : Nontrivial 𝕜\ninst✝ : DenselyOrdered 𝕜\nx z : E\nh : z = x\n⊢ z ∈ openSegment 𝕜 x x\n[PROOFSTEP]\nobtain ⟨a, ha₀, ha₁⟩ := DenselyOrdered.dense (0 : 𝕜) 1 zero_lt_one\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝⁷ : OrderedRing 𝕜\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : AddCommGroup G\ninst✝³ : Module 𝕜 E\ninst✝² : Module 𝕜 F\ninst✝¹ : Nontrivial 𝕜\ninst✝ : DenselyOrdered 𝕜\nx z : E\nh : z = x\na : 𝕜\nha₀ : 0 < a\nha₁ : a < 1\n⊢ z ∈ openSegment 𝕜 x x\n[PROOFSTEP]\nrefine' ⟨a, 1 - a, ha₀, sub_pos_of_lt ha₁, add_sub_cancel'_right _ _, _⟩\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝⁷ : OrderedRing 𝕜\ninst✝⁶ : AddCommGroup E\ninst✝⁵ : AddCommGroup F\ninst✝⁴ : AddCommGroup G\ninst✝³ : Module 𝕜 E\ninst✝² : Module 𝕜 F\ninst✝¹ : Nontrivial 𝕜\ninst✝ : DenselyOrdered 𝕜\nx z : E\nh : z = x\na : 𝕜\nha₀ : 0 < a\nha₁ : a < 1\n⊢ a • x + (1 - a) • x = z\n[PROOFSTEP]\nrw [← add_smul, add_sub_cancel'_right, one_smul, h]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝⁵ : OrderedRing 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : AddCommGroup F\ninst✝² : AddCommGroup G\ninst✝¹ : Module 𝕜 E\ninst✝ : Module 𝕜 F\nx y z : E\nx✝ : z ∈ [x-[𝕜]y]\na b : 𝕜\nha : 0 ≤ a\nhb : 0 ≤ b\nhab : a + b = 1\nhz : a • x + b • y = z\n⊢ (fun θ => (a + b - θ) • x + θ • y) b = a • x + b • y\n[PROOFSTEP]\nsimp only [add_sub_cancel]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝⁵ : OrderedRing 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : AddCommGroup F\ninst✝² : AddCommGroup G\ninst✝¹ : Module 𝕜 E\ninst✝ : Module 𝕜 F\nx y z : E\nx✝ : z ∈ openSegment 𝕜 x y\na b : 𝕜\nha : 0 < a\nhb : 0 < b\nhab : a + b = 1\nhz : a • x + b • y = z\n⊢ (fun θ => (a + b - θ) • x + θ • y) b = a • x + b • y\n[PROOFSTEP]\nsimp only [add_sub_cancel]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝⁵ : OrderedRing 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : AddCommGroup F\ninst✝² : AddCommGroup G\ninst✝¹ : Module 𝕜 E\ninst✝ : Module 𝕜 F\nx y : E\n⊢ [x-[𝕜]y] = (fun θ => x + θ • (y - x)) '' Icc 0 1\n[PROOFSTEP]\nconvert segment_eq_image 𝕜 x y using 2\n[GOAL]\ncase h.e'_3.h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝⁵ : OrderedRing 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : AddCommGroup F\ninst✝² : AddCommGroup G\ninst✝¹ : Module 𝕜 E\ninst✝ : Module 𝕜 F\nx y : E\na✝¹ : 𝕜\na✝ : a✝¹ ∈ Icc 0 1\n⊢ x + a✝¹ • (y - x) = (1 - a✝¹) • x + a✝¹ • y\n[PROOFSTEP]\nsimp only [smul_sub, sub_smul, one_smul]\n[GOAL]\ncase h.e'_3.h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝⁵ : OrderedRing 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : AddCommGroup F\ninst✝² : AddCommGroup G\ninst✝¹ : Module 𝕜 E\ninst✝ : Module 𝕜 F\nx y : E\na✝¹ : 𝕜\na✝ : a✝¹ ∈ Icc 0 1\n⊢ x + (a✝¹ • y - a✝¹ • x) = x - a✝¹ • x + a✝¹ • y\n[PROOFSTEP]\nabel\n[GOAL]\ncase h.e'_3.h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝⁵ : OrderedRing 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : AddCommGroup F\ninst✝² : AddCommGroup G\ninst✝¹ : Module 𝕜 E\ninst✝ : Module 𝕜 F\nx y : E\na✝¹ : 𝕜\na✝ : a✝¹ ∈ Icc 0 1\n⊢ x + (a✝¹ • y - a✝¹ • x) = x - a✝¹ • x + a✝¹ • y\n[PROOFSTEP]\nabel\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝⁵ : OrderedRing 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : AddCommGroup F\ninst✝² : AddCommGroup G\ninst✝¹ : Module 𝕜 E\ninst✝ : Module 𝕜 F\nx y : E\n⊢ openSegment 𝕜 x y = (fun θ => x + θ • (y - x)) '' Ioo 0 1\n[PROOFSTEP]\nconvert openSegment_eq_image 𝕜 x y using 2\n[GOAL]\ncase h.e'_3.h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝⁵ : OrderedRing 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : AddCommGroup F\ninst✝² : AddCommGroup G\ninst✝¹ : Module 𝕜 E\ninst✝ : Module 𝕜 F\nx y : E\na✝¹ : 𝕜\na✝ : a✝¹ ∈ Ioo 0 1\n⊢ x + a✝¹ • (y - x) = (1 - a✝¹) • x + a✝¹ • y\n[PROOFSTEP]\nsimp only [smul_sub, sub_smul, one_smul]\n[GOAL]\ncase h.e'_3.h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝⁵ : OrderedRing 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : AddCommGroup F\ninst✝² : AddCommGroup G\ninst✝¹ : Module 𝕜 E\ninst✝ : Module 𝕜 F\nx y : E\na✝¹ : 𝕜\na✝ : a✝¹ ∈ Ioo 0 1\n⊢ x + (a✝¹ • y - a✝¹ • x) = x - a✝¹ • x + a✝¹ • y\n[PROOFSTEP]\nabel\n[GOAL]\ncase h.e'_3.h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝⁵ : OrderedRing 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : AddCommGroup F\ninst✝² : AddCommGroup G\ninst✝¹ : Module 𝕜 E\ninst✝ : Module 𝕜 F\nx y : E\na✝¹ : 𝕜\na✝ : a✝¹ ∈ Ioo 0 1\n⊢ x + (a✝¹ • y - a✝¹ • x) = x - a✝¹ • x + a✝¹ • y\n[PROOFSTEP]\nabel\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝⁵ : OrderedRing 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : AddCommGroup F\ninst✝² : AddCommGroup G\ninst✝¹ : Module 𝕜 E\ninst✝ : Module 𝕜 F\nx y : E\n⊢ [x-[𝕜]y] = ↑(AffineMap.lineMap x y) '' Icc 0 1\n[PROOFSTEP]\nconvert segment_eq_image 𝕜 x y using 2\n[GOAL]\ncase h.e'_3.h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝⁵ : OrderedRing 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : AddCommGroup F\ninst✝² : AddCommGroup G\ninst✝¹ : Module 𝕜 E\ninst✝ : Module 𝕜 F\nx y : E\na✝¹ : 𝕜\na✝ : a✝¹ ∈ Icc 0 1\n⊢ ↑(AffineMap.lineMap x y) a✝¹ = (1 - a✝¹) • x + a✝¹ • y\n[PROOFSTEP]\nexact AffineMap.lineMap_apply_module _ _ _\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝⁵ : OrderedRing 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : AddCommGroup F\ninst✝² : AddCommGroup G\ninst✝¹ : Module 𝕜 E\ninst✝ : Module 𝕜 F\nx y : E\n⊢ openSegment 𝕜 x y = ↑(AffineMap.lineMap x y) '' Ioo 0 1\n[PROOFSTEP]\nconvert openSegment_eq_image 𝕜 x y using 2\n[GOAL]\ncase h.e'_3.h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝⁵ : OrderedRing 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : AddCommGroup F\ninst✝² : AddCommGroup G\ninst✝¹ : Module 𝕜 E\ninst✝ : Module 𝕜 F\nx y : E\na✝¹ : 𝕜\na✝ : a✝¹ ∈ Ioo 0 1\n⊢ ↑(AffineMap.lineMap x y) a✝¹ = (1 - a✝¹) • x + a✝¹ • y\n[PROOFSTEP]\nexact AffineMap.lineMap_apply_module _ _ _\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝⁵ : OrderedRing 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : AddCommGroup F\ninst✝² : AddCommGroup G\ninst✝¹ : Module 𝕜 E\ninst✝ : Module 𝕜 F\nf : E →ᵃ[𝕜] F\na b : E\nx : F\n⊢ x ∈ ↑f '' [a-[𝕜]b] ↔ x ∈ [↑f a-[𝕜]↑f b]\n[PROOFSTEP]\nsimp_rw [segment_eq_image_lineMap, mem_image, exists_exists_and_eq_and, AffineMap.apply_lineMap]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝⁵ : OrderedRing 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : AddCommGroup F\ninst✝² : AddCommGroup G\ninst✝¹ : Module 𝕜 E\ninst✝ : Module 𝕜 F\nf : E →ᵃ[𝕜] F\na b : E\nx : F\n⊢ x ∈ ↑f '' openSegment 𝕜 a b ↔ x ∈ openSegment 𝕜 (↑f a) (↑f b)\n[PROOFSTEP]\nsimp_rw [openSegment_eq_image_lineMap, mem_image, exists_exists_and_eq_and, AffineMap.apply_lineMap]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝⁵ : OrderedRing 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : AddCommGroup F\ninst✝² : AddCommGroup G\ninst✝¹ : Module 𝕜 E\ninst✝ : Module 𝕜 F\na x b c : E\n⊢ a + x ∈ [a + b-[𝕜]a + c] ↔ x ∈ [b-[𝕜]c]\n[PROOFSTEP]\nsimp_rw [← vadd_eq_add, ← vadd_segment, vadd_mem_vadd_set_iff]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝⁵ : OrderedRing 𝕜\ninst✝⁴ : AddCommGroup E\ninst✝³ : AddCommGroup F\ninst✝² : AddCommGroup G\ninst✝¹ : Module 𝕜 E\ninst✝ : Module 𝕜 F\na x b c : E\n⊢ a + x ∈ openSegment 𝕜 (a + b) (a + c) ↔ x ∈ openSegment 𝕜 b c\n[PROOFSTEP]\nsimp_rw [← vadd_eq_add, ← vadd_openSegment, vadd_mem_vadd_set_iff]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝² : StrictOrderedCommRing 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\nx y z : E\nh : x ∈ [y-[𝕜]z]\n⊢ SameRay 𝕜 (x - y) (z - x)\n[PROOFSTEP]\nrw [segment_eq_image'] at h \n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝² : StrictOrderedCommRing 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\nx y z : E\nh : x ∈ (fun θ => y + θ • (z - y)) '' Icc 0 1\n⊢ SameRay 𝕜 (x - y) (z - x)\n[PROOFSTEP]\nrcases h with ⟨θ, ⟨hθ₀, hθ₁⟩, rfl⟩\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝² : StrictOrderedCommRing 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ny z : E\nθ : 𝕜\nhθ₀ : 0 ≤ θ\nhθ₁ : θ ≤ 1\n⊢ SameRay 𝕜 ((fun θ => y + θ • (z - y)) θ - y) (z - (fun θ => y + θ • (z - y)) θ)\n[PROOFSTEP]\nsimpa only [add_sub_cancel', ← sub_sub, sub_smul, one_smul] using\n  (SameRay.sameRay_nonneg_smul_left (z - y) hθ₀).nonneg_smul_right (sub_nonneg.2 hθ₁)\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝³ : LinearOrderedRing 𝕜\ninst✝² : AddCommGroup E\ninst✝¹ : Module 𝕜 E\nx✝ y✝ : E\ninst✝ : Invertible 2\nx y : E\n⊢ midpoint 𝕜 x y ∈ [x-[𝕜]y]\n[PROOFSTEP]\nrw [segment_eq_image_lineMap]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝³ : LinearOrderedRing 𝕜\ninst✝² : AddCommGroup E\ninst✝¹ : Module 𝕜 E\nx✝ y✝ : E\ninst✝ : Invertible 2\nx y : E\n⊢ midpoint 𝕜 x y ∈ ↑(AffineMap.lineMap x y) '' Icc 0 1\n[PROOFSTEP]\nexact ⟨⅟2, ⟨invOf_nonneg.mpr zero_le_two, invOf_le_one one_le_two⟩, rfl⟩\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝³ : LinearOrderedRing 𝕜\ninst✝² : AddCommGroup E\ninst✝¹ : Module 𝕜 E\nx✝ y✝ : E\ninst✝ : Invertible 2\nx y : E\n⊢ x ∈ [x - y-[𝕜]x + y]\n[PROOFSTEP]\nconvert @midpoint_mem_segment 𝕜 _ _ _ _ _ _ _\n[GOAL]\ncase h.e'_4\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝³ : LinearOrderedRing 𝕜\ninst✝² : AddCommGroup E\ninst✝¹ : Module 𝕜 E\nx✝ y✝ : E\ninst✝ : Invertible 2\nx y : E\n⊢ x = midpoint 𝕜 (x - y) (x + y)\n[PROOFSTEP]\nrw [midpoint_sub_add]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝³ : LinearOrderedRing 𝕜\ninst✝² : AddCommGroup E\ninst✝¹ : Module 𝕜 E\nx✝ y✝ : E\ninst✝ : Invertible 2\nx y : E\n⊢ x ∈ [x + y-[𝕜]x - y]\n[PROOFSTEP]\nconvert @midpoint_mem_segment 𝕜 _ _ _ _ _ _ _\n[GOAL]\ncase h.e'_4\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝³ : LinearOrderedRing 𝕜\ninst✝² : AddCommGroup E\ninst✝¹ : Module 𝕜 E\nx✝ y✝ : E\ninst✝ : Invertible 2\nx y : E\n⊢ x = midpoint 𝕜 (x + y) (x - y)\n[PROOFSTEP]\nrw [midpoint_add_sub]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝⁴ : LinearOrderedRing 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\nx y : E\ninst✝¹ : DenselyOrdered 𝕜\ninst✝ : NoZeroSMulDivisors 𝕜 E\n⊢ x ∈ openSegment 𝕜 x y ↔ x = y\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝⁴ : LinearOrderedRing 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\nx y : E\ninst✝¹ : DenselyOrdered 𝕜\ninst✝ : NoZeroSMulDivisors 𝕜 E\n⊢ x ∈ openSegment 𝕜 x y → x = y\n[PROOFSTEP]\nrintro ⟨a, b, _, hb, hab, hx⟩\n[GOAL]\ncase mp.intro.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝⁴ : LinearOrderedRing 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\nx y : E\ninst✝¹ : DenselyOrdered 𝕜\ninst✝ : NoZeroSMulDivisors 𝕜 E\na b : 𝕜\nw✝ : 0 < a\nhb : 0 < b\nhab : a + b = 1\nhx : a • x + b • y = x\n⊢ x = y\n[PROOFSTEP]\nrefine' smul_right_injective _ hb.ne' ((add_right_inj (a • x)).1 _)\n[GOAL]\ncase mp.intro.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝⁴ : LinearOrderedRing 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\nx y : E\ninst✝¹ : DenselyOrdered 𝕜\ninst✝ : NoZeroSMulDivisors 𝕜 E\na b : 𝕜\nw✝ : 0 < a\nhb : 0 < b\nhab : a + b = 1\nhx : a • x + b • y = x\n⊢ a • x + (fun x x_1 => x • x_1) b x = a • x + (fun x x_1 => x • x_1) b y\n[PROOFSTEP]\nrw [hx, ← add_smul, hab, one_smul]\n[GOAL]\ncase mpr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝⁴ : LinearOrderedRing 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\nx y : E\ninst✝¹ : DenselyOrdered 𝕜\ninst✝ : NoZeroSMulDivisors 𝕜 E\n⊢ x = y → x ∈ openSegment 𝕜 x y\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase mpr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝⁴ : LinearOrderedRing 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\nx : E\ninst✝¹ : DenselyOrdered 𝕜\ninst✝ : NoZeroSMulDivisors 𝕜 E\n⊢ x ∈ openSegment 𝕜 x x\n[PROOFSTEP]\nrw [openSegment_same]\n[GOAL]\ncase mpr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝⁴ : LinearOrderedRing 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\nx : E\ninst✝¹ : DenselyOrdered 𝕜\ninst✝ : NoZeroSMulDivisors 𝕜 E\n⊢ x ∈ {x}\n[PROOFSTEP]\nexact mem_singleton _\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝⁴ : LinearOrderedRing 𝕜\ninst✝³ : AddCommGroup E\ninst✝² : Module 𝕜 E\nx y : E\ninst✝¹ : DenselyOrdered 𝕜\ninst✝ : NoZeroSMulDivisors 𝕜 E\n⊢ y ∈ openSegment 𝕜 x y ↔ x = y\n[PROOFSTEP]\nrw [openSegment_symm, left_mem_openSegment_iff, eq_comm]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝² : LinearOrderedSemifield 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\nx y z : E\n⊢ x ∈ [y-[𝕜]z] ↔ ∃ a b, 0 ≤ a ∧ 0 ≤ b ∧ 0 < a + b ∧ (a / (a + b)) • y + (b / (a + b)) • z = x\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝² : LinearOrderedSemifield 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\nx y z : E\n⊢ x ∈ [y-[𝕜]z] → ∃ a b, 0 ≤ a ∧ 0 ≤ b ∧ 0 < a + b ∧ (a / (a + b)) • y + (b / (a + b)) • z = x\n[PROOFSTEP]\nrintro ⟨a, b, ha, hb, hab, rfl⟩\n[GOAL]\ncase mp.intro.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝² : LinearOrderedSemifield 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ny z : E\na b : 𝕜\nha : 0 ≤ a\nhb : 0 ≤ b\nhab : a + b = 1\n⊢ ∃ a_1 b_1, 0 ≤ a_1 ∧ 0 ≤ b_1 ∧ 0 < a_1 + b_1 ∧ (a_1 / (a_1 + b_1)) • y + (b_1 / (a_1 + b_1)) • z = a • y + b • z\n[PROOFSTEP]\nuse a, b, ha, hb\n[GOAL]\ncase right\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝² : LinearOrderedSemifield 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ny z : E\na b : 𝕜\nha : 0 ≤ a\nhb : 0 ≤ b\nhab : a + b = 1\n⊢ 0 < a + b ∧ (a / (a + b)) • y + (b / (a + b)) • z = a • y + b • z\n[PROOFSTEP]\nsimp [*]\n[GOAL]\ncase mpr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝² : LinearOrderedSemifield 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\nx y z : E\n⊢ (∃ a b, 0 ≤ a ∧ 0 ≤ b ∧ 0 < a + b ∧ (a / (a + b)) • y + (b / (a + b)) • z = x) → x ∈ [y-[𝕜]z]\n[PROOFSTEP]\nrintro ⟨a, b, ha, hb, hab, rfl⟩\n[GOAL]\ncase mpr.intro.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝² : LinearOrderedSemifield 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ny z : E\na b : 𝕜\nha : 0 ≤ a\nhb : 0 ≤ b\nhab : 0 < a + b\n⊢ (a / (a + b)) • y + (b / (a + b)) • z ∈ [y-[𝕜]z]\n[PROOFSTEP]\nrefine' ⟨a / (a + b), b / (a + b), by positivity, by positivity, _, rfl⟩\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝² : LinearOrderedSemifield 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ny z : E\na b : 𝕜\nha : 0 ≤ a\nhb : 0 ≤ b\nhab : 0 < a + b\n⊢ 0 ≤ a / (a + b)\n[PROOFSTEP]\npositivity\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝² : LinearOrderedSemifield 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ny z : E\na b : 𝕜\nha : 0 ≤ a\nhb : 0 ≤ b\nhab : 0 < a + b\n⊢ 0 ≤ b / (a + b)\n[PROOFSTEP]\npositivity\n[GOAL]\ncase mpr.intro.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝² : LinearOrderedSemifield 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ny z : E\na b : 𝕜\nha : 0 ≤ a\nhb : 0 ≤ b\nhab : 0 < a + b\n⊢ a / (a + b) + b / (a + b) = 1\n[PROOFSTEP]\nrw [← add_div, div_self hab.ne']\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝² : LinearOrderedSemifield 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\nx y z : E\n⊢ x ∈ openSegment 𝕜 y z ↔ ∃ a b, 0 < a ∧ 0 < b ∧ (a / (a + b)) • y + (b / (a + b)) • z = x\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝² : LinearOrderedSemifield 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\nx y z : E\n⊢ x ∈ openSegment 𝕜 y z → ∃ a b, 0 < a ∧ 0 < b ∧ (a / (a + b)) • y + (b / (a + b)) • z = x\n[PROOFSTEP]\nrintro ⟨a, b, ha, hb, hab, rfl⟩\n[GOAL]\ncase mp.intro.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝² : LinearOrderedSemifield 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ny z : E\na b : 𝕜\nha : 0 < a\nhb : 0 < b\nhab : a + b = 1\n⊢ ∃ a_1 b_1, 0 < a_1 ∧ 0 < b_1 ∧ (a_1 / (a_1 + b_1)) • y + (b_1 / (a_1 + b_1)) • z = a • y + b • z\n[PROOFSTEP]\nuse a, b, ha, hb\n[GOAL]\ncase right\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝² : LinearOrderedSemifield 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ny z : E\na b : 𝕜\nha : 0 < a\nhb : 0 < b\nhab : a + b = 1\n⊢ (a / (a + b)) • y + (b / (a + b)) • z = a • y + b • z\n[PROOFSTEP]\nrw [hab, div_one, div_one]\n[GOAL]\ncase mpr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝² : LinearOrderedSemifield 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\nx y z : E\n⊢ (∃ a b, 0 < a ∧ 0 < b ∧ (a / (a + b)) • y + (b / (a + b)) • z = x) → x ∈ openSegment 𝕜 y z\n[PROOFSTEP]\nrintro ⟨a, b, ha, hb, rfl⟩\n[GOAL]\ncase mpr.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝² : LinearOrderedSemifield 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ny z : E\na b : 𝕜\nha : 0 < a\nhb : 0 < b\n⊢ (a / (a + b)) • y + (b / (a + b)) • z ∈ openSegment 𝕜 y z\n[PROOFSTEP]\nhave hab : 0 < a + b := by positivity\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝² : LinearOrderedSemifield 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ny z : E\na b : 𝕜\nha : 0 < a\nhb : 0 < b\n⊢ 0 < a + b\n[PROOFSTEP]\npositivity\n[GOAL]\ncase mpr.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝² : LinearOrderedSemifield 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ny z : E\na b : 𝕜\nha : 0 < a\nhb : 0 < b\nhab : 0 < a + b\n⊢ (a / (a + b)) • y + (b / (a + b)) • z ∈ openSegment 𝕜 y z\n[PROOFSTEP]\nrefine' ⟨a / (a + b), b / (a + b), by positivity, by positivity, _, rfl⟩\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝² : LinearOrderedSemifield 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ny z : E\na b : 𝕜\nha : 0 < a\nhb : 0 < b\nhab : 0 < a + b\n⊢ 0 < a / (a + b)\n[PROOFSTEP]\npositivity\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝² : LinearOrderedSemifield 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ny z : E\na b : 𝕜\nha : 0 < a\nhb : 0 < b\nhab : 0 < a + b\n⊢ 0 < b / (a + b)\n[PROOFSTEP]\npositivity\n[GOAL]\ncase mpr.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝² : LinearOrderedSemifield 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\ny z : E\na b : 𝕜\nha : 0 < a\nhb : 0 < b\nhab : 0 < a + b\n⊢ a / (a + b) + b / (a + b) = 1\n[PROOFSTEP]\nrw [← add_div, div_self hab.ne']\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\nx y z : E\n⊢ x ∈ [y-[𝕜]z] ↔ SameRay 𝕜 (x - y) (z - x)\n[PROOFSTEP]\nrefine' ⟨sameRay_of_mem_segment, fun h => _⟩\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\nx y z : E\nh : SameRay 𝕜 (x - y) (z - x)\n⊢ x ∈ [y-[𝕜]z]\n[PROOFSTEP]\nrcases h.exists_eq_smul_add with ⟨a, b, ha, hb, hab, hxy, hzx⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\nx y z : E\nh : SameRay 𝕜 (x - y) (z - x)\na b : 𝕜\nha : 0 ≤ a\nhb : 0 ≤ b\nhab : a + b = 1\nhxy : x - y = a • (x - y + (z - x))\nhzx : z - x = b • (x - y + (z - x))\n⊢ x ∈ [y-[𝕜]z]\n[PROOFSTEP]\nrw [add_comm, sub_add_sub_cancel] at hxy hzx \n[GOAL]\ncase intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\nx y z : E\nh : SameRay 𝕜 (x - y) (z - x)\na b : 𝕜\nha : 0 ≤ a\nhb : 0 ≤ b\nhab : a + b = 1\nhxy : x - y = a • (z - y)\nhzx : z - x = b • (z - y)\n⊢ x ∈ [y-[𝕜]z]\n[PROOFSTEP]\nrw [← mem_segment_translate _ (-x), neg_add_self]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\nx y z : E\nh : SameRay 𝕜 (x - y) (z - x)\na b : 𝕜\nha : 0 ≤ a\nhb : 0 ≤ b\nhab : a + b = 1\nhxy : x - y = a • (z - y)\nhzx : z - x = b • (z - y)\n⊢ 0 ∈ [-x + y-[𝕜]-x + z]\n[PROOFSTEP]\nrefine' ⟨b, a, hb, ha, add_comm a b ▸ hab, _⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\nx y z : E\nh : SameRay 𝕜 (x - y) (z - x)\na b : 𝕜\nha : 0 ≤ a\nhb : 0 ≤ b\nhab : a + b = 1\nhxy : x - y = a • (z - y)\nhzx : z - x = b • (z - y)\n⊢ b • (-x + y) + a • (-x + z) = 0\n[PROOFSTEP]\nrw [← sub_eq_neg_add, ← neg_sub, hxy, ← sub_eq_neg_add, hzx, smul_neg, smul_comm, neg_add_self]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\nx✝ y✝ z✝ x y z : E\nhz : z ∈ range ↑(lineMap x y)\n⊢ openSegment 𝕜 x y ⊆ insert z (openSegment 𝕜 x z ∪ openSegment 𝕜 z y)\n[PROOFSTEP]\nrcases hz with ⟨c, rfl⟩\n[GOAL]\ncase intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\nx✝ y✝ z x y : E\nc : 𝕜\n⊢ openSegment 𝕜 x y ⊆\n    insert (↑(lineMap x y) c) (openSegment 𝕜 x (↑(lineMap x y) c) ∪ openSegment 𝕜 (↑(lineMap x y) c) y)\n[PROOFSTEP]\nsimp only [openSegment_eq_image_lineMap, ← mapsTo']\n[GOAL]\ncase intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\nx✝ y✝ z x y : E\nc : 𝕜\n⊢ MapsTo (fun a => ↑(lineMap x y) a) (Ioo 0 1)\n    (insert (↑(lineMap x y) c)\n      ((fun a => ↑(lineMap x (↑(lineMap x y) c)) a) '' Ioo 0 1 ∪\n        (fun a => ↑(lineMap (↑(lineMap x y) c) y) a) '' Ioo 0 1))\n[PROOFSTEP]\nrintro a ⟨h₀, h₁⟩\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\nx✝ y✝ z x y : E\nc a : 𝕜\nh₀ : 0 < a\nh₁ : a < 1\n⊢ (fun a => ↑(lineMap x y) a) a ∈\n    insert (↑(lineMap x y) c)\n      ((fun a => ↑(lineMap x (↑(lineMap x y) c)) a) '' Ioo 0 1 ∪\n        (fun a => ↑(lineMap (↑(lineMap x y) c) y) a) '' Ioo 0 1)\n[PROOFSTEP]\nrcases lt_trichotomy a c with (hac | rfl | hca)\n[GOAL]\ncase intro.intro.inl\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\nx✝ y✝ z x y : E\nc a : 𝕜\nh₀ : 0 < a\nh₁ : a < 1\nhac : a < c\n⊢ (fun a => ↑(lineMap x y) a) a ∈\n    insert (↑(lineMap x y) c)\n      ((fun a => ↑(lineMap x (↑(lineMap x y) c)) a) '' Ioo 0 1 ∪\n        (fun a => ↑(lineMap (↑(lineMap x y) c) y) a) '' Ioo 0 1)\n[PROOFSTEP]\nright\n[GOAL]\ncase intro.intro.inl.h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\nx✝ y✝ z x y : E\nc a : 𝕜\nh₀ : 0 < a\nh₁ : a < 1\nhac : a < c\n⊢ (fun a => ↑(lineMap x y) a) a ∈\n    (fun a => ↑(lineMap x (↑(lineMap x y) c)) a) '' Ioo 0 1 ∪ (fun a => ↑(lineMap (↑(lineMap x y) c) y) a) '' Ioo 0 1\n[PROOFSTEP]\nleft\n[GOAL]\ncase intro.intro.inl.h.h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\nx✝ y✝ z x y : E\nc a : 𝕜\nh₀ : 0 < a\nh₁ : a < 1\nhac : a < c\n⊢ (fun a => ↑(lineMap x y) a) a ∈ (fun a => ↑(lineMap x (↑(lineMap x y) c)) a) '' Ioo 0 1\n[PROOFSTEP]\nhave hc : 0 < c := h₀.trans hac\n[GOAL]\ncase intro.intro.inl.h.h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\nx✝ y✝ z x y : E\nc a : 𝕜\nh₀ : 0 < a\nh₁ : a < 1\nhac : a < c\nhc : 0 < c\n⊢ (fun a => ↑(lineMap x y) a) a ∈ (fun a => ↑(lineMap x (↑(lineMap x y) c)) a) '' Ioo 0 1\n[PROOFSTEP]\nrefine' ⟨a / c, ⟨div_pos h₀ hc, (div_lt_one hc).2 hac⟩, _⟩\n[GOAL]\ncase intro.intro.inl.h.h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\nx✝ y✝ z x y : E\nc a : 𝕜\nh₀ : 0 < a\nh₁ : a < 1\nhac : a < c\nhc : 0 < c\n⊢ (fun a => ↑(lineMap x (↑(lineMap x y) c)) a) (a / c) = (fun a => ↑(lineMap x y) a) a\n[PROOFSTEP]\nsimp only [← homothety_eq_lineMap, ← homothety_mul_apply, div_mul_cancel _ hc.ne']\n[GOAL]\ncase intro.intro.inr.inl\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\nx✝ y✝ z x y : E\na : 𝕜\nh₀ : 0 < a\nh₁ : a < 1\n⊢ (fun a => ↑(lineMap x y) a) a ∈\n    insert (↑(lineMap x y) a)\n      ((fun a_1 => ↑(lineMap x (↑(lineMap x y) a)) a_1) '' Ioo 0 1 ∪\n        (fun a_1 => ↑(lineMap (↑(lineMap x y) a) y) a_1) '' Ioo 0 1)\n[PROOFSTEP]\nleft\n[GOAL]\ncase intro.intro.inr.inl.h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\nx✝ y✝ z x y : E\na : 𝕜\nh₀ : 0 < a\nh₁ : a < 1\n⊢ (fun a => ↑(lineMap x y) a) a = ↑(lineMap x y) a\n[PROOFSTEP]\nrfl\n[GOAL]\ncase intro.intro.inr.inr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\nx✝ y✝ z x y : E\nc a : 𝕜\nh₀ : 0 < a\nh₁ : a < 1\nhca : c < a\n⊢ (fun a => ↑(lineMap x y) a) a ∈\n    insert (↑(lineMap x y) c)\n      ((fun a => ↑(lineMap x (↑(lineMap x y) c)) a) '' Ioo 0 1 ∪\n        (fun a => ↑(lineMap (↑(lineMap x y) c) y) a) '' Ioo 0 1)\n[PROOFSTEP]\nright\n[GOAL]\ncase intro.intro.inr.inr.h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\nx✝ y✝ z x y : E\nc a : 𝕜\nh₀ : 0 < a\nh₁ : a < 1\nhca : c < a\n⊢ (fun a => ↑(lineMap x y) a) a ∈\n    (fun a => ↑(lineMap x (↑(lineMap x y) c)) a) '' Ioo 0 1 ∪ (fun a => ↑(lineMap (↑(lineMap x y) c) y) a) '' Ioo 0 1\n[PROOFSTEP]\nright\n[GOAL]\ncase intro.intro.inr.inr.h.h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\nx✝ y✝ z x y : E\nc a : 𝕜\nh₀ : 0 < a\nh₁ : a < 1\nhca : c < a\n⊢ (fun a => ↑(lineMap x y) a) a ∈ (fun a => ↑(lineMap (↑(lineMap x y) c) y) a) '' Ioo 0 1\n[PROOFSTEP]\nhave hc : 0 < 1 - c := sub_pos.2 (hca.trans h₁)\n[GOAL]\ncase intro.intro.inr.inr.h.h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\nx✝ y✝ z x y : E\nc a : 𝕜\nh₀ : 0 < a\nh₁ : a < 1\nhca : c < a\nhc : 0 < 1 - c\n⊢ (fun a => ↑(lineMap x y) a) a ∈ (fun a => ↑(lineMap (↑(lineMap x y) c) y) a) '' Ioo 0 1\n[PROOFSTEP]\nsimp only [← lineMap_apply_one_sub y]\n[GOAL]\ncase intro.intro.inr.inr.h.h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\nx✝ y✝ z x y : E\nc a : 𝕜\nh₀ : 0 < a\nh₁ : a < 1\nhca : c < a\nhc : 0 < 1 - c\n⊢ ↑(lineMap y x) (1 - a) ∈ (fun a => ↑(lineMap y (↑(lineMap y x) (1 - c))) (1 - a)) '' Ioo 0 1\n[PROOFSTEP]\nrefine' ⟨(a - c) / (1 - c), ⟨div_pos (sub_pos.2 hca) hc, (div_lt_one hc).2 <| sub_lt_sub_right h₁ _⟩, _⟩\n[GOAL]\ncase intro.intro.inr.inr.h.h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : AddCommGroup E\ninst✝ : Module 𝕜 E\nx✝ y✝ z x y : E\nc a : 𝕜\nh₀ : 0 < a\nh₁ : a < 1\nhca : c < a\nhc : 0 < 1 - c\n⊢ (fun a => ↑(lineMap y (↑(lineMap y x) (1 - c))) (1 - a)) ((a - c) / (1 - c)) = ↑(lineMap y x) (1 - a)\n[PROOFSTEP]\nsimp only [← homothety_eq_lineMap, ← homothety_mul_apply, sub_mul, one_mul, div_mul_cancel _ hc.ne',\n  sub_sub_sub_cancel_right]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝³ : OrderedSemiring 𝕜\ninst✝² : OrderedAddCommMonoid E\ninst✝¹ : Module 𝕜 E\ninst✝ : OrderedSMul 𝕜 E\nx y : E\nh : x ≤ y\n⊢ [x-[𝕜]y] ⊆ Icc x y\n[PROOFSTEP]\nrintro z ⟨a, b, ha, hb, hab, rfl⟩\n[GOAL]\ncase intro.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝³ : OrderedSemiring 𝕜\ninst✝² : OrderedAddCommMonoid E\ninst✝¹ : Module 𝕜 E\ninst✝ : OrderedSMul 𝕜 E\nx y : E\nh : x ≤ y\na b : 𝕜\nha : 0 ≤ a\nhb : 0 ≤ b\nhab : a + b = 1\n⊢ a • x + b • y ∈ Icc x y\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase intro.intro.intro.intro.intro.left\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝³ : OrderedSemiring 𝕜\ninst✝² : OrderedAddCommMonoid E\ninst✝¹ : Module 𝕜 E\ninst✝ : OrderedSMul 𝕜 E\nx y : E\nh : x ≤ y\na b : 𝕜\nha : 0 ≤ a\nhb : 0 ≤ b\nhab : a + b = 1\n⊢ x ≤ a • x + b • y\ncase intro.intro.intro.intro.intro.right\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝³ : OrderedSemiring 𝕜\ninst✝² : OrderedAddCommMonoid E\ninst✝¹ : Module 𝕜 E\ninst✝ : OrderedSMul 𝕜 E\nx y : E\nh : x ≤ y\na b : 𝕜\nha : 0 ≤ a\nhb : 0 ≤ b\nhab : a + b = 1\n⊢ a • x + b • y ≤ y\n[PROOFSTEP]\ncalc\n  x = a • x + b • x := (Convex.combo_self hab _).symm\n  _ ≤ a • x + b • y := by gcongr\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝³ : OrderedSemiring 𝕜\ninst✝² : OrderedAddCommMonoid E\ninst✝¹ : Module 𝕜 E\ninst✝ : OrderedSMul 𝕜 E\nx y : E\nh : x ≤ y\na b : 𝕜\nha : 0 ≤ a\nhb : 0 ≤ b\nhab : a + b = 1\n⊢ a • x + b • x ≤ a • x + b • y\n[PROOFSTEP]\ngcongr\n[GOAL]\ncase intro.intro.intro.intro.intro.right\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝³ : OrderedSemiring 𝕜\ninst✝² : OrderedAddCommMonoid E\ninst✝¹ : Module 𝕜 E\ninst✝ : OrderedSMul 𝕜 E\nx y : E\nh : x ≤ y\na b : 𝕜\nha : 0 ≤ a\nhb : 0 ≤ b\nhab : a + b = 1\n⊢ a • x + b • y ≤ y\n[PROOFSTEP]\ncalc\n  a • x + b • y ≤ a • y + b • y := by gcongr\n  _ = y := Convex.combo_self hab _\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝³ : OrderedSemiring 𝕜\ninst✝² : OrderedAddCommMonoid E\ninst✝¹ : Module 𝕜 E\ninst✝ : OrderedSMul 𝕜 E\nx y : E\nh : x ≤ y\na b : 𝕜\nha : 0 ≤ a\nhb : 0 ≤ b\nhab : a + b = 1\n⊢ a • x + b • y ≤ a • y + b • y\n[PROOFSTEP]\ngcongr\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝³ : OrderedSemiring 𝕜\ninst✝² : OrderedCancelAddCommMonoid E\ninst✝¹ : Module 𝕜 E\ninst✝ : OrderedSMul 𝕜 E\nx y : E\nh : x < y\n⊢ openSegment 𝕜 x y ⊆ Ioo x y\n[PROOFSTEP]\nrintro z ⟨a, b, ha, hb, hab, rfl⟩\n[GOAL]\ncase intro.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝³ : OrderedSemiring 𝕜\ninst✝² : OrderedCancelAddCommMonoid E\ninst✝¹ : Module 𝕜 E\ninst✝ : OrderedSMul 𝕜 E\nx y : E\nh : x < y\na b : 𝕜\nha : 0 < a\nhb : 0 < b\nhab : a + b = 1\n⊢ a • x + b • y ∈ Ioo x y\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase intro.intro.intro.intro.intro.left\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝³ : OrderedSemiring 𝕜\ninst✝² : OrderedCancelAddCommMonoid E\ninst✝¹ : Module 𝕜 E\ninst✝ : OrderedSMul 𝕜 E\nx y : E\nh : x < y\na b : 𝕜\nha : 0 < a\nhb : 0 < b\nhab : a + b = 1\n⊢ x < a • x + b • y\ncase intro.intro.intro.intro.intro.right\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝³ : OrderedSemiring 𝕜\ninst✝² : OrderedCancelAddCommMonoid E\ninst✝¹ : Module 𝕜 E\ninst✝ : OrderedSMul 𝕜 E\nx y : E\nh : x < y\na b : 𝕜\nha : 0 < a\nhb : 0 < b\nhab : a + b = 1\n⊢ a • x + b • y < y\n[PROOFSTEP]\ncalc\n  x = a • x + b • x := (Convex.combo_self hab _).symm\n  _ < a • x + b • y := by gcongr\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝³ : OrderedSemiring 𝕜\ninst✝² : OrderedCancelAddCommMonoid E\ninst✝¹ : Module 𝕜 E\ninst✝ : OrderedSMul 𝕜 E\nx y : E\nh : x < y\na b : 𝕜\nha : 0 < a\nhb : 0 < b\nhab : a + b = 1\n⊢ a • x + b • x < a • x + b • y\n[PROOFSTEP]\ngcongr\n[GOAL]\ncase intro.intro.intro.intro.intro.right\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝³ : OrderedSemiring 𝕜\ninst✝² : OrderedCancelAddCommMonoid E\ninst✝¹ : Module 𝕜 E\ninst✝ : OrderedSMul 𝕜 E\nx y : E\nh : x < y\na b : 𝕜\nha : 0 < a\nhb : 0 < b\nhab : a + b = 1\n⊢ a • x + b • y < y\n[PROOFSTEP]\ncalc\n  a • x + b • y < a • y + b • y := by gcongr\n  _ = y := Convex.combo_self hab _\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝³ : OrderedSemiring 𝕜\ninst✝² : OrderedCancelAddCommMonoid E\ninst✝¹ : Module 𝕜 E\ninst✝ : OrderedSMul 𝕜 E\nx y : E\nh : x < y\na b : 𝕜\nha : 0 < a\nhb : 0 < b\nhab : a + b = 1\n⊢ a • x + b • y < a • y + b • y\n[PROOFSTEP]\ngcongr\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝³ : OrderedSemiring 𝕜\ninst✝² : LinearOrderedAddCommMonoid E\ninst✝¹ : Module 𝕜 E\ninst✝ : OrderedSMul 𝕜 E\na b : 𝕜\nx y : E\n⊢ [x-[𝕜]y] ⊆ uIcc x y\n[PROOFSTEP]\ncases' le_total x y with h h\n[GOAL]\ncase inl\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝³ : OrderedSemiring 𝕜\ninst✝² : LinearOrderedAddCommMonoid E\ninst✝¹ : Module 𝕜 E\ninst✝ : OrderedSMul 𝕜 E\na b : 𝕜\nx y : E\nh : x ≤ y\n⊢ [x-[𝕜]y] ⊆ uIcc x y\n[PROOFSTEP]\nrw [uIcc_of_le h]\n[GOAL]\ncase inl\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝³ : OrderedSemiring 𝕜\ninst✝² : LinearOrderedAddCommMonoid E\ninst✝¹ : Module 𝕜 E\ninst✝ : OrderedSMul 𝕜 E\na b : 𝕜\nx y : E\nh : x ≤ y\n⊢ [x-[𝕜]y] ⊆ Icc x y\n[PROOFSTEP]\nexact segment_subset_Icc h\n[GOAL]\ncase inr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝³ : OrderedSemiring 𝕜\ninst✝² : LinearOrderedAddCommMonoid E\ninst✝¹ : Module 𝕜 E\ninst✝ : OrderedSMul 𝕜 E\na b : 𝕜\nx y : E\nh : y ≤ x\n⊢ [x-[𝕜]y] ⊆ uIcc x y\n[PROOFSTEP]\nrw [uIcc_of_ge h, segment_symm]\n[GOAL]\ncase inr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝³ : OrderedSemiring 𝕜\ninst✝² : LinearOrderedAddCommMonoid E\ninst✝¹ : Module 𝕜 E\ninst✝ : OrderedSMul 𝕜 E\na b : 𝕜\nx y : E\nh : y ≤ x\n⊢ [y-[𝕜]x] ⊆ Icc y x\n[PROOFSTEP]\nexact segment_subset_Icc h\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝ : LinearOrderedField 𝕜\nx y z : 𝕜\n⊢ Icc x y ⊆ [x-[𝕜]y]\n[PROOFSTEP]\nrintro z ⟨hxz, hyz⟩\n[GOAL]\ncase intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝ : LinearOrderedField 𝕜\nx y z✝ z : 𝕜\nhxz : x ≤ z\nhyz : z ≤ y\n⊢ z ∈ [x-[𝕜]y]\n[PROOFSTEP]\nobtain rfl | h := (hxz.trans hyz).eq_or_lt\n[GOAL]\ncase intro.inl\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝ : LinearOrderedField 𝕜\nx z✝ z : 𝕜\nhxz : x ≤ z\nhyz : z ≤ x\n⊢ z ∈ [x-[𝕜]x]\n[PROOFSTEP]\nrw [segment_same]\n[GOAL]\ncase intro.inl\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝ : LinearOrderedField 𝕜\nx z✝ z : 𝕜\nhxz : x ≤ z\nhyz : z ≤ x\n⊢ z ∈ {x}\n[PROOFSTEP]\nexact hyz.antisymm hxz\n[GOAL]\ncase intro.inr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝ : LinearOrderedField 𝕜\nx y z✝ z : 𝕜\nhxz : x ≤ z\nhyz : z ≤ y\nh : x < y\n⊢ z ∈ [x-[𝕜]y]\n[PROOFSTEP]\nrw [← sub_nonneg] at hxz hyz \n[GOAL]\ncase intro.inr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝ : LinearOrderedField 𝕜\nx y z✝ z : 𝕜\nhxz✝ : x ≤ z\nhxz : 0 ≤ z - x\nhyz✝ : z ≤ y\nhyz : 0 ≤ y - z\nh : x < y\n⊢ z ∈ [x-[𝕜]y]\n[PROOFSTEP]\nrw [← sub_pos] at h \n[GOAL]\ncase intro.inr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝ : LinearOrderedField 𝕜\nx y z✝ z : 𝕜\nhxz✝ : x ≤ z\nhxz : 0 ≤ z - x\nhyz✝ : z ≤ y\nhyz : 0 ≤ y - z\nh✝ : x < y\nh : 0 < y - x\n⊢ z ∈ [x-[𝕜]y]\n[PROOFSTEP]\nrefine' ⟨(y - z) / (y - x), (z - x) / (y - x), div_nonneg hyz h.le, div_nonneg hxz h.le, _, _⟩\n[GOAL]\ncase intro.inr.refine'_1\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝ : LinearOrderedField 𝕜\nx y z✝ z : 𝕜\nhxz✝ : x ≤ z\nhxz : 0 ≤ z - x\nhyz✝ : z ≤ y\nhyz : 0 ≤ y - z\nh✝ : x < y\nh : 0 < y - x\n⊢ (y - z) / (y - x) + (z - x) / (y - x) = 1\n[PROOFSTEP]\nrw [← add_div, sub_add_sub_cancel, div_self h.ne']\n[GOAL]\ncase intro.inr.refine'_2\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝ : LinearOrderedField 𝕜\nx y z✝ z : 𝕜\nhxz✝ : x ≤ z\nhxz : 0 ≤ z - x\nhyz✝ : z ≤ y\nhyz : 0 ≤ y - z\nh✝ : x < y\nh : 0 < y - x\n⊢ ((y - z) / (y - x)) • x + ((z - x) / (y - x)) • y = z\n[PROOFSTEP]\nrw [smul_eq_mul, smul_eq_mul, ← mul_div_right_comm, ← mul_div_right_comm, ← add_div, div_eq_iff h.ne', add_comm,\n  sub_mul, sub_mul, mul_comm x, sub_add_sub_cancel, mul_sub]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝ : LinearOrderedField 𝕜\nx✝ y✝ z x y : 𝕜\n⊢ [x-[𝕜]y] = Icc (min x y) (max x y)\n[PROOFSTEP]\ncases' le_total x y with h h\n[GOAL]\ncase inl\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝ : LinearOrderedField 𝕜\nx✝ y✝ z x y : 𝕜\nh : x ≤ y\n⊢ [x-[𝕜]y] = Icc (min x y) (max x y)\n[PROOFSTEP]\nrw [segment_eq_Icc h, max_eq_right h, min_eq_left h]\n[GOAL]\ncase inr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝ : LinearOrderedField 𝕜\nx✝ y✝ z x y : 𝕜\nh : y ≤ x\n⊢ [x-[𝕜]y] = Icc (min x y) (max x y)\n[PROOFSTEP]\nrw [segment_symm, segment_eq_Icc h, max_eq_left h, min_eq_right h]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝ : LinearOrderedField 𝕜\nx y z : 𝕜\nhxy : x ≠ y\n⊢ openSegment 𝕜 x y = Ioo (min x y) (max x y)\n[PROOFSTEP]\ncases' hxy.lt_or_lt with h h\n[GOAL]\ncase inl\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝ : LinearOrderedField 𝕜\nx y z : 𝕜\nhxy : x ≠ y\nh : x < y\n⊢ openSegment 𝕜 x y = Ioo (min x y) (max x y)\n[PROOFSTEP]\nrw [openSegment_eq_Ioo h, max_eq_right h.le, min_eq_left h.le]\n[GOAL]\ncase inr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝ : LinearOrderedField 𝕜\nx y z : 𝕜\nhxy : x ≠ y\nh : y < x\n⊢ openSegment 𝕜 x y = Ioo (min x y) (max x y)\n[PROOFSTEP]\nrw [openSegment_symm, openSegment_eq_Ioo h, max_eq_left h.le, min_eq_right h.le]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝ : LinearOrderedField 𝕜\nx y z : 𝕜\nh : x ≤ y\n⊢ z ∈ Icc x y ↔ ∃ a b, 0 ≤ a ∧ 0 ≤ b ∧ a + b = 1 ∧ a * x + b * y = z\n[PROOFSTEP]\nrw [← segment_eq_Icc h]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝ : LinearOrderedField 𝕜\nx y z : 𝕜\nh : x ≤ y\n⊢ z ∈ [x-[𝕜]y] ↔ ∃ a b, 0 ≤ a ∧ 0 ≤ b ∧ a + b = 1 ∧ a * x + b * y = z\n[PROOFSTEP]\nsimp_rw [← exists_prop]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝ : LinearOrderedField 𝕜\nx y z : 𝕜\nh : x ≤ y\n⊢ z ∈ [x-[𝕜]y] ↔ ∃ a b _h _h _h, a * x + b * y = z\n[PROOFSTEP]\nrfl\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝ : LinearOrderedField 𝕜\nx y z : 𝕜\nh : x < y\n⊢ z ∈ Ioo x y ↔ ∃ a b, 0 < a ∧ 0 < b ∧ a + b = 1 ∧ a * x + b * y = z\n[PROOFSTEP]\nrw [← openSegment_eq_Ioo h]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝ : LinearOrderedField 𝕜\nx y z : 𝕜\nh : x < y\n⊢ z ∈ openSegment 𝕜 x y ↔ ∃ a b, 0 < a ∧ 0 < b ∧ a + b = 1 ∧ a * x + b * y = z\n[PROOFSTEP]\nsimp_rw [← exists_prop]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝ : LinearOrderedField 𝕜\nx y z : 𝕜\nh : x < y\n⊢ z ∈ openSegment 𝕜 x y ↔ ∃ a b _h _h _h, a * x + b * y = z\n[PROOFSTEP]\nrfl\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝ : LinearOrderedField 𝕜\nx y z : 𝕜\nh : x < y\n⊢ z ∈ Ioc x y ↔ ∃ a b, 0 ≤ a ∧ 0 < b ∧ a + b = 1 ∧ a * x + b * y = z\n[PROOFSTEP]\nrefine' ⟨fun hz => _, _⟩\n[GOAL]\ncase refine'_1\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝ : LinearOrderedField 𝕜\nx y z : 𝕜\nh : x < y\nhz : z ∈ Ioc x y\n⊢ ∃ a b, 0 ≤ a ∧ 0 < b ∧ a + b = 1 ∧ a * x + b * y = z\n[PROOFSTEP]\nobtain ⟨a, b, ha, hb, hab, rfl⟩ := (Convex.mem_Icc h.le).1 (Ioc_subset_Icc_self hz)\n[GOAL]\ncase refine'_1.intro.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝ : LinearOrderedField 𝕜\nx y : 𝕜\nh : x < y\na b : 𝕜\nha : 0 ≤ a\nhb : 0 ≤ b\nhab : a + b = 1\nhz : a * x + b * y ∈ Ioc x y\n⊢ ∃ a_1 b_1, 0 ≤ a_1 ∧ 0 < b_1 ∧ a_1 + b_1 = 1 ∧ a_1 * x + b_1 * y = a * x + b * y\n[PROOFSTEP]\nobtain rfl | hb' := hb.eq_or_lt\n[GOAL]\ncase refine'_1.intro.intro.intro.intro.intro.inl\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝ : LinearOrderedField 𝕜\nx y : 𝕜\nh : x < y\na : 𝕜\nha : 0 ≤ a\nhb : 0 ≤ 0\nhab : a + 0 = 1\nhz : a * x + 0 * y ∈ Ioc x y\n⊢ ∃ a_1 b, 0 ≤ a_1 ∧ 0 < b ∧ a_1 + b = 1 ∧ a_1 * x + b * y = a * x + 0 * y\n[PROOFSTEP]\nrw [add_zero] at hab \n[GOAL]\ncase refine'_1.intro.intro.intro.intro.intro.inl\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝ : LinearOrderedField 𝕜\nx y : 𝕜\nh : x < y\na : 𝕜\nha : 0 ≤ a\nhb : 0 ≤ 0\nhab : a = 1\nhz : a * x + 0 * y ∈ Ioc x y\n⊢ ∃ a_1 b, 0 ≤ a_1 ∧ 0 < b ∧ a_1 + b = 1 ∧ a_1 * x + b * y = a * x + 0 * y\n[PROOFSTEP]\nrw [hab, one_mul, zero_mul, add_zero] at hz \n[GOAL]\ncase refine'_1.intro.intro.intro.intro.intro.inl\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝ : LinearOrderedField 𝕜\nx y : 𝕜\nh : x < y\na : 𝕜\nha : 0 ≤ a\nhb : 0 ≤ 0\nhab : a = 1\nhz : x ∈ Ioc x y\n⊢ ∃ a_1 b, 0 ≤ a_1 ∧ 0 < b ∧ a_1 + b = 1 ∧ a_1 * x + b * y = a * x + 0 * y\n[PROOFSTEP]\nexact (hz.1.ne rfl).elim\n[GOAL]\ncase refine'_1.intro.intro.intro.intro.intro.inr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝ : LinearOrderedField 𝕜\nx y : 𝕜\nh : x < y\na b : 𝕜\nha : 0 ≤ a\nhb : 0 ≤ b\nhab : a + b = 1\nhz : a * x + b * y ∈ Ioc x y\nhb' : 0 < b\n⊢ ∃ a_1 b_1, 0 ≤ a_1 ∧ 0 < b_1 ∧ a_1 + b_1 = 1 ∧ a_1 * x + b_1 * y = a * x + b * y\n[PROOFSTEP]\nexact ⟨a, b, ha, hb', hab, rfl⟩\n[GOAL]\ncase refine'_2\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝ : LinearOrderedField 𝕜\nx y z : 𝕜\nh : x < y\n⊢ (∃ a b, 0 ≤ a ∧ 0 < b ∧ a + b = 1 ∧ a * x + b * y = z) → z ∈ Ioc x y\n[PROOFSTEP]\nrintro ⟨a, b, ha, hb, hab, rfl⟩\n[GOAL]\ncase refine'_2.intro.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝ : LinearOrderedField 𝕜\nx y : 𝕜\nh : x < y\na b : 𝕜\nha : 0 ≤ a\nhb : 0 < b\nhab : a + b = 1\n⊢ a * x + b * y ∈ Ioc x y\n[PROOFSTEP]\nobtain rfl | ha' := ha.eq_or_lt\n[GOAL]\ncase refine'_2.intro.intro.intro.intro.intro.inl\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝ : LinearOrderedField 𝕜\nx y : 𝕜\nh : x < y\nb : 𝕜\nhb : 0 < b\nha : 0 ≤ 0\nhab : 0 + b = 1\n⊢ 0 * x + b * y ∈ Ioc x y\n[PROOFSTEP]\nrw [zero_add] at hab \n[GOAL]\ncase refine'_2.intro.intro.intro.intro.intro.inl\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝ : LinearOrderedField 𝕜\nx y : 𝕜\nh : x < y\nb : 𝕜\nhb : 0 < b\nha : 0 ≤ 0\nhab : b = 1\n⊢ 0 * x + b * y ∈ Ioc x y\n[PROOFSTEP]\nrwa [hab, one_mul, zero_mul, zero_add, right_mem_Ioc]\n[GOAL]\ncase refine'_2.intro.intro.intro.intro.intro.inr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝ : LinearOrderedField 𝕜\nx y : 𝕜\nh : x < y\na b : 𝕜\nha : 0 ≤ a\nhb : 0 < b\nhab : a + b = 1\nha' : 0 < a\n⊢ a * x + b * y ∈ Ioc x y\n[PROOFSTEP]\nexact Ioo_subset_Ioc_self ((Convex.mem_Ioo h).2 ⟨a, b, ha', hb, hab, rfl⟩)\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝ : LinearOrderedField 𝕜\nx y z : 𝕜\nh : x < y\n⊢ z ∈ Ico x y ↔ ∃ a b, 0 < a ∧ 0 ≤ b ∧ a + b = 1 ∧ a * x + b * y = z\n[PROOFSTEP]\nrefine' ⟨fun hz => _, _⟩\n[GOAL]\ncase refine'_1\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝ : LinearOrderedField 𝕜\nx y z : 𝕜\nh : x < y\nhz : z ∈ Ico x y\n⊢ ∃ a b, 0 < a ∧ 0 ≤ b ∧ a + b = 1 ∧ a * x + b * y = z\n[PROOFSTEP]\nobtain ⟨a, b, ha, hb, hab, rfl⟩ := (Convex.mem_Icc h.le).1 (Ico_subset_Icc_self hz)\n[GOAL]\ncase refine'_1.intro.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝ : LinearOrderedField 𝕜\nx y : 𝕜\nh : x < y\na b : 𝕜\nha : 0 ≤ a\nhb : 0 ≤ b\nhab : a + b = 1\nhz : a * x + b * y ∈ Ico x y\n⊢ ∃ a_1 b_1, 0 < a_1 ∧ 0 ≤ b_1 ∧ a_1 + b_1 = 1 ∧ a_1 * x + b_1 * y = a * x + b * y\n[PROOFSTEP]\nobtain rfl | ha' := ha.eq_or_lt\n[GOAL]\ncase refine'_1.intro.intro.intro.intro.intro.inl\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝ : LinearOrderedField 𝕜\nx y : 𝕜\nh : x < y\nb : 𝕜\nhb : 0 ≤ b\nha : 0 ≤ 0\nhab : 0 + b = 1\nhz : 0 * x + b * y ∈ Ico x y\n⊢ ∃ a b_1, 0 < a ∧ 0 ≤ b_1 ∧ a + b_1 = 1 ∧ a * x + b_1 * y = 0 * x + b * y\n[PROOFSTEP]\nrw [zero_add] at hab \n[GOAL]\ncase refine'_1.intro.intro.intro.intro.intro.inl\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝ : LinearOrderedField 𝕜\nx y : 𝕜\nh : x < y\nb : 𝕜\nhb : 0 ≤ b\nha : 0 ≤ 0\nhab : b = 1\nhz : 0 * x + b * y ∈ Ico x y\n⊢ ∃ a b_1, 0 < a ∧ 0 ≤ b_1 ∧ a + b_1 = 1 ∧ a * x + b_1 * y = 0 * x + b * y\n[PROOFSTEP]\nrw [hab, one_mul, zero_mul, zero_add] at hz \n[GOAL]\ncase refine'_1.intro.intro.intro.intro.intro.inl\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝ : LinearOrderedField 𝕜\nx y : 𝕜\nh : x < y\nb : 𝕜\nhb : 0 ≤ b\nha : 0 ≤ 0\nhab : b = 1\nhz : y ∈ Ico x y\n⊢ ∃ a b_1, 0 < a ∧ 0 ≤ b_1 ∧ a + b_1 = 1 ∧ a * x + b_1 * y = 0 * x + b * y\n[PROOFSTEP]\nexact (hz.2.ne rfl).elim\n[GOAL]\ncase refine'_1.intro.intro.intro.intro.intro.inr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝ : LinearOrderedField 𝕜\nx y : 𝕜\nh : x < y\na b : 𝕜\nha : 0 ≤ a\nhb : 0 ≤ b\nhab : a + b = 1\nhz : a * x + b * y ∈ Ico x y\nha' : 0 < a\n⊢ ∃ a_1 b_1, 0 < a_1 ∧ 0 ≤ b_1 ∧ a_1 + b_1 = 1 ∧ a_1 * x + b_1 * y = a * x + b * y\n[PROOFSTEP]\nexact ⟨a, b, ha', hb, hab, rfl⟩\n[GOAL]\ncase refine'_2\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝ : LinearOrderedField 𝕜\nx y z : 𝕜\nh : x < y\n⊢ (∃ a b, 0 < a ∧ 0 ≤ b ∧ a + b = 1 ∧ a * x + b * y = z) → z ∈ Ico x y\n[PROOFSTEP]\nrintro ⟨a, b, ha, hb, hab, rfl⟩\n[GOAL]\ncase refine'_2.intro.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝ : LinearOrderedField 𝕜\nx y : 𝕜\nh : x < y\na b : 𝕜\nha : 0 < a\nhb : 0 ≤ b\nhab : a + b = 1\n⊢ a * x + b * y ∈ Ico x y\n[PROOFSTEP]\nobtain rfl | hb' := hb.eq_or_lt\n[GOAL]\ncase refine'_2.intro.intro.intro.intro.intro.inl\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝ : LinearOrderedField 𝕜\nx y : 𝕜\nh : x < y\na : 𝕜\nha : 0 < a\nhb : 0 ≤ 0\nhab : a + 0 = 1\n⊢ a * x + 0 * y ∈ Ico x y\n[PROOFSTEP]\nrw [add_zero] at hab \n[GOAL]\ncase refine'_2.intro.intro.intro.intro.intro.inl\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝ : LinearOrderedField 𝕜\nx y : 𝕜\nh : x < y\na : 𝕜\nha : 0 < a\nhb : 0 ≤ 0\nhab : a = 1\n⊢ a * x + 0 * y ∈ Ico x y\n[PROOFSTEP]\nrwa [hab, one_mul, zero_mul, add_zero, left_mem_Ico]\n[GOAL]\ncase refine'_2.intro.intro.intro.intro.intro.inr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝ : LinearOrderedField 𝕜\nx y : 𝕜\nh : x < y\na b : 𝕜\nha : 0 < a\nhb : 0 ≤ b\nhab : a + b = 1\nhb' : 0 < b\n⊢ a * x + b * y ∈ Ico x y\n[PROOFSTEP]\nexact Ioo_subset_Ico_self ((Convex.mem_Ioo h).2 ⟨a, b, ha, hb', hab, rfl⟩)\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝⁴ : OrderedSemiring 𝕜\ninst✝³ : AddCommMonoid E\ninst✝² : AddCommMonoid F\ninst✝¹ : Module 𝕜 E\ninst✝ : Module 𝕜 F\nx y : E × F\n⊢ [x-[𝕜]y] ⊆ [x.fst-[𝕜]y.fst] ×ˢ [x.snd-[𝕜]y.snd]\n[PROOFSTEP]\nrintro z ⟨a, b, ha, hb, hab, hz⟩\n[GOAL]\ncase intro.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝⁴ : OrderedSemiring 𝕜\ninst✝³ : AddCommMonoid E\ninst✝² : AddCommMonoid F\ninst✝¹ : Module 𝕜 E\ninst✝ : Module 𝕜 F\nx y z : E × F\na b : 𝕜\nha : 0 ≤ a\nhb : 0 ≤ b\nhab : a + b = 1\nhz : a • x + b • y = z\n⊢ z ∈ [x.fst-[𝕜]y.fst] ×ˢ [x.snd-[𝕜]y.snd]\n[PROOFSTEP]\nexact ⟨⟨a, b, ha, hb, hab, congr_arg Prod.fst hz⟩, a, b, ha, hb, hab, congr_arg Prod.snd hz⟩\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝⁴ : OrderedSemiring 𝕜\ninst✝³ : AddCommMonoid E\ninst✝² : AddCommMonoid F\ninst✝¹ : Module 𝕜 E\ninst✝ : Module 𝕜 F\nx y : E × F\n⊢ openSegment 𝕜 x y ⊆ openSegment 𝕜 x.fst y.fst ×ˢ openSegment 𝕜 x.snd y.snd\n[PROOFSTEP]\nrintro z ⟨a, b, ha, hb, hab, hz⟩\n[GOAL]\ncase intro.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝⁴ : OrderedSemiring 𝕜\ninst✝³ : AddCommMonoid E\ninst✝² : AddCommMonoid F\ninst✝¹ : Module 𝕜 E\ninst✝ : Module 𝕜 F\nx y z : E × F\na b : 𝕜\nha : 0 < a\nhb : 0 < b\nhab : a + b = 1\nhz : a • x + b • y = z\n⊢ z ∈ openSegment 𝕜 x.fst y.fst ×ˢ openSegment 𝕜 x.snd y.snd\n[PROOFSTEP]\nexact ⟨⟨a, b, ha, hb, hab, congr_arg Prod.fst hz⟩, a, b, ha, hb, hab, congr_arg Prod.snd hz⟩\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝⁴ : OrderedSemiring 𝕜\ninst✝³ : AddCommMonoid E\ninst✝² : AddCommMonoid F\ninst✝¹ : Module 𝕜 E\ninst✝ : Module 𝕜 F\nx₁ x₂ : E\ny : F\n⊢ (fun x => (x, y)) '' [x₁-[𝕜]x₂] = [(x₁, y)-[𝕜](x₂, y)]\n[PROOFSTEP]\next ⟨x', y'⟩\n[GOAL]\ncase h.mk\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝⁴ : OrderedSemiring 𝕜\ninst✝³ : AddCommMonoid E\ninst✝² : AddCommMonoid F\ninst✝¹ : Module 𝕜 E\ninst✝ : Module 𝕜 F\nx₁ x₂ : E\ny : F\nx' : E\ny' : F\n⊢ (x', y') ∈ (fun x => (x, y)) '' [x₁-[𝕜]x₂] ↔ (x', y') ∈ [(x₁, y)-[𝕜](x₂, y)]\n[PROOFSTEP]\nsimp_rw [Set.mem_image, segment, Set.mem_setOf, Prod.smul_mk, Prod.mk_add_mk, Prod.mk.inj_iff, ← exists_and_right,\n  @exists_comm E, exists_eq_left']\n[GOAL]\ncase h.mk\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝⁴ : OrderedSemiring 𝕜\ninst✝³ : AddCommMonoid E\ninst✝² : AddCommMonoid F\ninst✝¹ : Module 𝕜 E\ninst✝ : Module 𝕜 F\nx₁ x₂ : E\ny : F\nx' : E\ny' : F\n⊢ (∃ b b_1 h h h, b • x₁ + b_1 • x₂ = x' ∧ y = y') ↔ ∃ a b h h h, a • x₁ + b • x₂ = x' ∧ a • y + b • y = y'\n[PROOFSTEP]\nrefine' exists₅_congr fun a b ha hb hab => _\n[GOAL]\ncase h.mk\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝⁴ : OrderedSemiring 𝕜\ninst✝³ : AddCommMonoid E\ninst✝² : AddCommMonoid F\ninst✝¹ : Module 𝕜 E\ninst✝ : Module 𝕜 F\nx₁ x₂ : E\ny : F\nx' : E\ny' : F\na b : 𝕜\nha : 0 ≤ a\nhb : 0 ≤ b\nhab : a + b = 1\n⊢ a • x₁ + b • x₂ = x' ∧ y = y' ↔ a • x₁ + b • x₂ = x' ∧ a • y + b • y = y'\n[PROOFSTEP]\nrw [Convex.combo_self hab]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝⁴ : OrderedSemiring 𝕜\ninst✝³ : AddCommMonoid E\ninst✝² : AddCommMonoid F\ninst✝¹ : Module 𝕜 E\ninst✝ : Module 𝕜 F\nx : E\ny₁ y₂ : F\n⊢ (fun y => (x, y)) '' [y₁-[𝕜]y₂] = [(x, y₁)-[𝕜](x, y₂)]\n[PROOFSTEP]\next ⟨x', y'⟩\n[GOAL]\ncase h.mk\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝⁴ : OrderedSemiring 𝕜\ninst✝³ : AddCommMonoid E\ninst✝² : AddCommMonoid F\ninst✝¹ : Module 𝕜 E\ninst✝ : Module 𝕜 F\nx : E\ny₁ y₂ : F\nx' : E\ny' : F\n⊢ (x', y') ∈ (fun y => (x, y)) '' [y₁-[𝕜]y₂] ↔ (x', y') ∈ [(x, y₁)-[𝕜](x, y₂)]\n[PROOFSTEP]\nsimp_rw [Set.mem_image, segment, Set.mem_setOf, Prod.smul_mk, Prod.mk_add_mk, Prod.mk.inj_iff, ← exists_and_right,\n  @exists_comm F, exists_eq_left']\n[GOAL]\ncase h.mk\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝⁴ : OrderedSemiring 𝕜\ninst✝³ : AddCommMonoid E\ninst✝² : AddCommMonoid F\ninst✝¹ : Module 𝕜 E\ninst✝ : Module 𝕜 F\nx : E\ny₁ y₂ : F\nx' : E\ny' : F\n⊢ (∃ b b_1 h h h, x = x' ∧ b • y₁ + b_1 • y₂ = y') ↔ ∃ a b h h h, a • x + b • x = x' ∧ a • y₁ + b • y₂ = y'\n[PROOFSTEP]\nrefine' exists₅_congr fun a b ha hb hab => _\n[GOAL]\ncase h.mk\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝⁴ : OrderedSemiring 𝕜\ninst✝³ : AddCommMonoid E\ninst✝² : AddCommMonoid F\ninst✝¹ : Module 𝕜 E\ninst✝ : Module 𝕜 F\nx : E\ny₁ y₂ : F\nx' : E\ny' : F\na b : 𝕜\nha : 0 ≤ a\nhb : 0 ≤ b\nhab : a + b = 1\n⊢ x = x' ∧ a • y₁ + b • y₂ = y' ↔ a • x + b • x = x' ∧ a • y₁ + b • y₂ = y'\n[PROOFSTEP]\nrw [Convex.combo_self hab]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝⁴ : OrderedSemiring 𝕜\ninst✝³ : AddCommMonoid E\ninst✝² : AddCommMonoid F\ninst✝¹ : Module 𝕜 E\ninst✝ : Module 𝕜 F\nx₁ x₂ : E\ny : F\n⊢ (fun x => (x, y)) '' openSegment 𝕜 x₁ x₂ = openSegment 𝕜 (x₁, y) (x₂, y)\n[PROOFSTEP]\next ⟨x', y'⟩\n[GOAL]\ncase h.mk\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝⁴ : OrderedSemiring 𝕜\ninst✝³ : AddCommMonoid E\ninst✝² : AddCommMonoid F\ninst✝¹ : Module 𝕜 E\ninst✝ : Module 𝕜 F\nx₁ x₂ : E\ny : F\nx' : E\ny' : F\n⊢ (x', y') ∈ (fun x => (x, y)) '' openSegment 𝕜 x₁ x₂ ↔ (x', y') ∈ openSegment 𝕜 (x₁, y) (x₂, y)\n[PROOFSTEP]\nsimp_rw [Set.mem_image, openSegment, Set.mem_setOf, Prod.smul_mk, Prod.mk_add_mk, Prod.mk.inj_iff, ← exists_and_right,\n  @exists_comm E, exists_eq_left']\n[GOAL]\ncase h.mk\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝⁴ : OrderedSemiring 𝕜\ninst✝³ : AddCommMonoid E\ninst✝² : AddCommMonoid F\ninst✝¹ : Module 𝕜 E\ninst✝ : Module 𝕜 F\nx₁ x₂ : E\ny : F\nx' : E\ny' : F\n⊢ (∃ b b_1 h h h, b • x₁ + b_1 • x₂ = x' ∧ y = y') ↔ ∃ a b h h h, a • x₁ + b • x₂ = x' ∧ a • y + b • y = y'\n[PROOFSTEP]\nrefine' exists₅_congr fun a b ha hb hab => _\n[GOAL]\ncase h.mk\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝⁴ : OrderedSemiring 𝕜\ninst✝³ : AddCommMonoid E\ninst✝² : AddCommMonoid F\ninst✝¹ : Module 𝕜 E\ninst✝ : Module 𝕜 F\nx₁ x₂ : E\ny : F\nx' : E\ny' : F\na b : 𝕜\nha : 0 < a\nhb : 0 < b\nhab : a + b = 1\n⊢ a • x₁ + b • x₂ = x' ∧ y = y' ↔ a • x₁ + b • x₂ = x' ∧ a • y + b • y = y'\n[PROOFSTEP]\nrw [Convex.combo_self hab]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝⁴ : OrderedSemiring 𝕜\ninst✝³ : AddCommMonoid E\ninst✝² : AddCommMonoid F\ninst✝¹ : Module 𝕜 E\ninst✝ : Module 𝕜 F\nx : E\ny₁ y₂ : F\n⊢ (fun y => (x, y)) '' openSegment 𝕜 y₁ y₂ = openSegment 𝕜 (x, y₁) (x, y₂)\n[PROOFSTEP]\next ⟨x', y'⟩\n[GOAL]\ncase h.mk\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝⁴ : OrderedSemiring 𝕜\ninst✝³ : AddCommMonoid E\ninst✝² : AddCommMonoid F\ninst✝¹ : Module 𝕜 E\ninst✝ : Module 𝕜 F\nx : E\ny₁ y₂ : F\nx' : E\ny' : F\n⊢ (x', y') ∈ (fun y => (x, y)) '' openSegment 𝕜 y₁ y₂ ↔ (x', y') ∈ openSegment 𝕜 (x, y₁) (x, y₂)\n[PROOFSTEP]\nsimp_rw [Set.mem_image, openSegment, Set.mem_setOf, Prod.smul_mk, Prod.mk_add_mk, Prod.mk.inj_iff, ← exists_and_right,\n  @exists_comm F, exists_eq_left']\n[GOAL]\ncase h.mk\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝⁴ : OrderedSemiring 𝕜\ninst✝³ : AddCommMonoid E\ninst✝² : AddCommMonoid F\ninst✝¹ : Module 𝕜 E\ninst✝ : Module 𝕜 F\nx : E\ny₁ y₂ : F\nx' : E\ny' : F\n⊢ (∃ b b_1 h h h, x = x' ∧ b • y₁ + b_1 • y₂ = y') ↔ ∃ a b h h h, a • x + b • x = x' ∧ a • y₁ + b • y₂ = y'\n[PROOFSTEP]\nrefine' exists₅_congr fun a b ha hb hab => _\n[GOAL]\ncase h.mk\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝⁴ : OrderedSemiring 𝕜\ninst✝³ : AddCommMonoid E\ninst✝² : AddCommMonoid F\ninst✝¹ : Module 𝕜 E\ninst✝ : Module 𝕜 F\nx : E\ny₁ y₂ : F\nx' : E\ny' : F\na b : 𝕜\nha : 0 < a\nhb : 0 < b\nhab : a + b = 1\n⊢ x = x' ∧ a • y₁ + b • y₂ = y' ↔ a • x + b • x = x' ∧ a • y₁ + b • y₂ = y'\n[PROOFSTEP]\nrw [Convex.combo_self hab]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝² : OrderedSemiring 𝕜\ninst✝¹ : (i : ι) → AddCommMonoid (π i)\ninst✝ : (i : ι) → Module 𝕜 (π i)\ns : Set ι\nx y : (i : ι) → π i\n⊢ [x-[𝕜]y] ⊆ pi s fun i => [x i-[𝕜]y i]\n[PROOFSTEP]\nrintro z ⟨a, b, ha, hb, hab, hz⟩ i -\n[GOAL]\ncase intro.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝² : OrderedSemiring 𝕜\ninst✝¹ : (i : ι) → AddCommMonoid (π i)\ninst✝ : (i : ι) → Module 𝕜 (π i)\ns : Set ι\nx y z : (i : ι) → π i\na b : 𝕜\nha : 0 ≤ a\nhb : 0 ≤ b\nhab : a + b = 1\nhz : a • x + b • y = z\ni : ι\n⊢ z i ∈ (fun i => [x i-[𝕜]y i]) i\n[PROOFSTEP]\nexact ⟨a, b, ha, hb, hab, congr_fun hz i⟩\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝² : OrderedSemiring 𝕜\ninst✝¹ : (i : ι) → AddCommMonoid (π i)\ninst✝ : (i : ι) → Module 𝕜 (π i)\ns : Set ι\nx y : (i : ι) → π i\n⊢ openSegment 𝕜 x y ⊆ pi s fun i => openSegment 𝕜 (x i) (y i)\n[PROOFSTEP]\nrintro z ⟨a, b, ha, hb, hab, hz⟩ i -\n[GOAL]\ncase intro.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝² : OrderedSemiring 𝕜\ninst✝¹ : (i : ι) → AddCommMonoid (π i)\ninst✝ : (i : ι) → Module 𝕜 (π i)\ns : Set ι\nx y z : (i : ι) → π i\na b : 𝕜\nha : 0 < a\nhb : 0 < b\nhab : a + b = 1\nhz : a • x + b • y = z\ni : ι\n⊢ z i ∈ (fun i => openSegment 𝕜 (x i) (y i)) i\n[PROOFSTEP]\nexact ⟨a, b, ha, hb, hab, congr_fun hz i⟩\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝³ : OrderedSemiring 𝕜\ninst✝² : (i : ι) → AddCommMonoid (π i)\ninst✝¹ : (i : ι) → Module 𝕜 (π i)\ns : Set ι\ninst✝ : DecidableEq ι\ni : ι\nx₁ x₂ : π i\ny : (i : ι) → π i\n⊢ update y i '' [x₁-[𝕜]x₂] = [update y i x₁-[𝕜]update y i x₂]\n[PROOFSTEP]\next z\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝³ : OrderedSemiring 𝕜\ninst✝² : (i : ι) → AddCommMonoid (π i)\ninst✝¹ : (i : ι) → Module 𝕜 (π i)\ns : Set ι\ninst✝ : DecidableEq ι\ni : ι\nx₁ x₂ : π i\ny z : (a : ι) → π a\n⊢ z ∈ update y i '' [x₁-[𝕜]x₂] ↔ z ∈ [update y i x₁-[𝕜]update y i x₂]\n[PROOFSTEP]\nsimp_rw [Set.mem_image, segment, Set.mem_setOf, ← update_smul, ← update_add, update_eq_iff, ← exists_and_right,\n  @exists_comm (π i), exists_eq_left']\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝³ : OrderedSemiring 𝕜\ninst✝² : (i : ι) → AddCommMonoid (π i)\ninst✝¹ : (i : ι) → Module 𝕜 (π i)\ns : Set ι\ninst✝ : DecidableEq ι\ni : ι\nx₁ x₂ : π i\ny z : (a : ι) → π a\n⊢ (∃ b b_1 h h h, b • x₁ + b_1 • x₂ = z i ∧ ∀ (x : ι), x ≠ i → y x = z x) ↔\n    ∃ a b h h h, a • x₁ + b • x₂ = z i ∧ ∀ (x : ι), x ≠ i → (a • y + b • y) x = z x\n[PROOFSTEP]\nrefine' exists₅_congr fun a b ha hb hab => _\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝³ : OrderedSemiring 𝕜\ninst✝² : (i : ι) → AddCommMonoid (π i)\ninst✝¹ : (i : ι) → Module 𝕜 (π i)\ns : Set ι\ninst✝ : DecidableEq ι\ni : ι\nx₁ x₂ : π i\ny z : (a : ι) → π a\na b : 𝕜\nha : 0 ≤ a\nhb : 0 ≤ b\nhab : a + b = 1\n⊢ (a • x₁ + b • x₂ = z i ∧ ∀ (x : ι), x ≠ i → y x = z x) ↔\n    a • x₁ + b • x₂ = z i ∧ ∀ (x : ι), x ≠ i → (a • y + b • y) x = z x\n[PROOFSTEP]\nrw [Convex.combo_self hab]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝³ : OrderedSemiring 𝕜\ninst✝² : (i : ι) → AddCommMonoid (π i)\ninst✝¹ : (i : ι) → Module 𝕜 (π i)\ns : Set ι\ninst✝ : DecidableEq ι\ni : ι\nx₁ x₂ : π i\ny : (i : ι) → π i\n⊢ update y i '' openSegment 𝕜 x₁ x₂ = openSegment 𝕜 (update y i x₁) (update y i x₂)\n[PROOFSTEP]\next z\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝³ : OrderedSemiring 𝕜\ninst✝² : (i : ι) → AddCommMonoid (π i)\ninst✝¹ : (i : ι) → Module 𝕜 (π i)\ns : Set ι\ninst✝ : DecidableEq ι\ni : ι\nx₁ x₂ : π i\ny z : (a : ι) → π a\n⊢ z ∈ update y i '' openSegment 𝕜 x₁ x₂ ↔ z ∈ openSegment 𝕜 (update y i x₁) (update y i x₂)\n[PROOFSTEP]\nsimp_rw [Set.mem_image, openSegment, Set.mem_setOf, ← update_smul, ← update_add, update_eq_iff, ← exists_and_right,\n  @exists_comm (π i), exists_eq_left']\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝³ : OrderedSemiring 𝕜\ninst✝² : (i : ι) → AddCommMonoid (π i)\ninst✝¹ : (i : ι) → Module 𝕜 (π i)\ns : Set ι\ninst✝ : DecidableEq ι\ni : ι\nx₁ x₂ : π i\ny z : (a : ι) → π a\n⊢ (∃ b b_1 h h h, b • x₁ + b_1 • x₂ = z i ∧ ∀ (x : ι), x ≠ i → y x = z x) ↔\n    ∃ a b h h h, a • x₁ + b • x₂ = z i ∧ ∀ (x : ι), x ≠ i → (a • y + b • y) x = z x\n[PROOFSTEP]\nrefine' exists₅_congr fun a b ha hb hab => _\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\nG : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝³ : OrderedSemiring 𝕜\ninst✝² : (i : ι) → AddCommMonoid (π i)\ninst✝¹ : (i : ι) → Module 𝕜 (π i)\ns : Set ι\ninst✝ : DecidableEq ι\ni : ι\nx₁ x₂ : π i\ny z : (a : ι) → π a\na b : 𝕜\nha : 0 < a\nhb : 0 < b\nhab : a + b = 1\n⊢ (a • x₁ + b • x₂ = z i ∧ ∀ (x : ι), x ≠ i → y x = z x) ↔\n    a • x₁ + b • x₂ = z i ∧ ∀ (x : ι), x ≠ i → (a • y + b • y) x = z x\n[PROOFSTEP]\nrw [Convex.combo_self hab]\n", "meta": {"mathlib_filename": "Mathlib.Analysis.Convex.Segment", "llama_tokens": 37442, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8354835371034368, "lm_q2_score": 0.6150878555160665, "lm_q1q2_score": 0.5138957771559309}}
{"text": "[GOAL]\nι α : Type v\nU : ι → α\ninst✝ : CompleteLattice α\ns : Cocone (diagram U)\n⊢ (cocone U).pt ≤ s.pt\n[PROOFSTEP]\napply CompleteSemilatticeSup.sSup_le\n[GOAL]\ncase a\nι α : Type v\nU : ι → α\ninst✝ : CompleteLattice α\ns : Cocone (diagram U)\n⊢ ∀ (b : α), b ∈ Set.range U → b ≤ s.pt\n[PROOFSTEP]\nrintro _ ⟨j, rfl⟩\n[GOAL]\ncase a.intro\nι α : Type v\nU : ι → α\ninst✝ : CompleteLattice α\ns : Cocone (diagram U)\nj : ι\n⊢ U j ≤ s.pt\n[PROOFSTEP]\nexact (s.ι.app (single j)).le\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Category.Pairwise", "llama_tokens": 236, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES\n\n", "lm_q1_score": 0.7799929002541067, "lm_q2_score": 0.658417500561683, "lm_q1q2_score": 0.5135609758411671}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\nι✝ : Type u_3\ninst✝¹ : PseudoMetricSpace α\nι : Type u_4\ninst✝ : TopologicalSpace β\nF : ι → β → α\nx₀ : β\n⊢ EquicontinuousAt F x₀ ↔\n    ∀ (ε : ℝ), ε > 0 → ∃ U, U ∈ 𝓝 x₀ ∧ ∀ (x : β), x ∈ U → ∀ (x' : β), x' ∈ U → ∀ (i : ι), dist (F i x) (F i x') < ε\n[PROOFSTEP]\nrw [equicontinuousAt_iff_pair]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι✝ : Type u_3\ninst✝¹ : PseudoMetricSpace α\nι : Type u_4\ninst✝ : TopologicalSpace β\nF : ι → β → α\nx₀ : β\n⊢ (∀ (U : Set (α × α)), U ∈ 𝓤 α → ∃ V, V ∈ 𝓝 x₀ ∧ ∀ (x : β), x ∈ V → ∀ (y : β), y ∈ V → ∀ (i : ι), (F i x, F i y) ∈ U) ↔\n    ∀ (ε : ℝ), ε > 0 → ∃ U, U ∈ 𝓝 x₀ ∧ ∀ (x : β), x ∈ U → ∀ (x' : β), x' ∈ U → ∀ (i : ι), dist (F i x) (F i x') < ε\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type u_1\nβ : Type u_2\nι✝ : Type u_3\ninst✝¹ : PseudoMetricSpace α\nι : Type u_4\ninst✝ : TopologicalSpace β\nF : ι → β → α\nx₀ : β\n⊢ (∀ (U : Set (α × α)), U ∈ 𝓤 α → ∃ V, V ∈ 𝓝 x₀ ∧ ∀ (x : β), x ∈ V → ∀ (y : β), y ∈ V → ∀ (i : ι), (F i x, F i y) ∈ U) →\n    ∀ (ε : ℝ), ε > 0 → ∃ U, U ∈ 𝓝 x₀ ∧ ∀ (x : β), x ∈ U → ∀ (x' : β), x' ∈ U → ∀ (i : ι), dist (F i x) (F i x') < ε\n[PROOFSTEP]\nintro H\n[GOAL]\ncase mpr\nα : Type u_1\nβ : Type u_2\nι✝ : Type u_3\ninst✝¹ : PseudoMetricSpace α\nι : Type u_4\ninst✝ : TopologicalSpace β\nF : ι → β → α\nx₀ : β\n⊢ (∀ (ε : ℝ), ε > 0 → ∃ U, U ∈ 𝓝 x₀ ∧ ∀ (x : β), x ∈ U → ∀ (x' : β), x' ∈ U → ∀ (i : ι), dist (F i x) (F i x') < ε) →\n    ∀ (U : Set (α × α)), U ∈ 𝓤 α → ∃ V, V ∈ 𝓝 x₀ ∧ ∀ (x : β), x ∈ V → ∀ (y : β), y ∈ V → ∀ (i : ι), (F i x, F i y) ∈ U\n[PROOFSTEP]\nintro H\n[GOAL]\ncase mp\nα : Type u_1\nβ : Type u_2\nι✝ : Type u_3\ninst✝¹ : PseudoMetricSpace α\nι : Type u_4\ninst✝ : TopologicalSpace β\nF : ι → β → α\nx₀ : β\nH : ∀ (U : Set (α × α)), U ∈ 𝓤 α → ∃ V, V ∈ 𝓝 x₀ ∧ ∀ (x : β), x ∈ V → ∀ (y : β), y ∈ V → ∀ (i : ι), (F i x, F i y) ∈ U\n⊢ ∀ (ε : ℝ), ε > 0 → ∃ U, U ∈ 𝓝 x₀ ∧ ∀ (x : β), x ∈ U → ∀ (x' : β), x' ∈ U → ∀ (i : ι), dist (F i x) (F i x') < ε\n[PROOFSTEP]\nintro ε hε\n[GOAL]\ncase mp\nα : Type u_1\nβ : Type u_2\nι✝ : Type u_3\ninst✝¹ : PseudoMetricSpace α\nι : Type u_4\ninst✝ : TopologicalSpace β\nF : ι → β → α\nx₀ : β\nH : ∀ (U : Set (α × α)), U ∈ 𝓤 α → ∃ V, V ∈ 𝓝 x₀ ∧ ∀ (x : β), x ∈ V → ∀ (y : β), y ∈ V → ∀ (i : ι), (F i x, F i y) ∈ U\nε : ℝ\nhε : ε > 0\n⊢ ∃ U, U ∈ 𝓝 x₀ ∧ ∀ (x : β), x ∈ U → ∀ (x' : β), x' ∈ U → ∀ (i : ι), dist (F i x) (F i x') < ε\n[PROOFSTEP]\nexact H _ (dist_mem_uniformity hε)\n[GOAL]\ncase mpr\nα : Type u_1\nβ : Type u_2\nι✝ : Type u_3\ninst✝¹ : PseudoMetricSpace α\nι : Type u_4\ninst✝ : TopologicalSpace β\nF : ι → β → α\nx₀ : β\nH : ∀ (ε : ℝ), ε > 0 → ∃ U, U ∈ 𝓝 x₀ ∧ ∀ (x : β), x ∈ U → ∀ (x' : β), x' ∈ U → ∀ (i : ι), dist (F i x) (F i x') < ε\n⊢ ∀ (U : Set (α × α)), U ∈ 𝓤 α → ∃ V, V ∈ 𝓝 x₀ ∧ ∀ (x : β), x ∈ V → ∀ (y : β), y ∈ V → ∀ (i : ι), (F i x, F i y) ∈ U\n[PROOFSTEP]\nintro U hU\n[GOAL]\ncase mpr\nα : Type u_1\nβ : Type u_2\nι✝ : Type u_3\ninst✝¹ : PseudoMetricSpace α\nι : Type u_4\ninst✝ : TopologicalSpace β\nF : ι → β → α\nx₀ : β\nH : ∀ (ε : ℝ), ε > 0 → ∃ U, U ∈ 𝓝 x₀ ∧ ∀ (x : β), x ∈ U → ∀ (x' : β), x' ∈ U → ∀ (i : ι), dist (F i x) (F i x') < ε\nU : Set (α × α)\nhU : U ∈ 𝓤 α\n⊢ ∃ V, V ∈ 𝓝 x₀ ∧ ∀ (x : β), x ∈ V → ∀ (y : β), y ∈ V → ∀ (i : ι), (F i x, F i y) ∈ U\n[PROOFSTEP]\nrcases mem_uniformity_dist.mp hU with ⟨ε, hε, hεU⟩\n[GOAL]\ncase mpr.intro.intro\nα : Type u_1\nβ : Type u_2\nι✝ : Type u_3\ninst✝¹ : PseudoMetricSpace α\nι : Type u_4\ninst✝ : TopologicalSpace β\nF : ι → β → α\nx₀ : β\nH : ∀ (ε : ℝ), ε > 0 → ∃ U, U ∈ 𝓝 x₀ ∧ ∀ (x : β), x ∈ U → ∀ (x' : β), x' ∈ U → ∀ (i : ι), dist (F i x) (F i x') < ε\nU : Set (α × α)\nhU : U ∈ 𝓤 α\nε : ℝ\nhε : ε > 0\nhεU : ∀ {a b : α}, dist a b < ε → (a, b) ∈ U\n⊢ ∃ V, V ∈ 𝓝 x₀ ∧ ∀ (x : β), x ∈ V → ∀ (y : β), y ∈ V → ∀ (i : ι), (F i x, F i y) ∈ U\n[PROOFSTEP]\nrefine' Exists.imp (fun V => And.imp_right fun h => _) (H _ hε)\n[GOAL]\ncase mpr.intro.intro\nα : Type u_1\nβ : Type u_2\nι✝ : Type u_3\ninst✝¹ : PseudoMetricSpace α\nι : Type u_4\ninst✝ : TopologicalSpace β\nF : ι → β → α\nx₀ : β\nH : ∀ (ε : ℝ), ε > 0 → ∃ U, U ∈ 𝓝 x₀ ∧ ∀ (x : β), x ∈ U → ∀ (x' : β), x' ∈ U → ∀ (i : ι), dist (F i x) (F i x') < ε\nU : Set (α × α)\nhU : U ∈ 𝓤 α\nε : ℝ\nhε : ε > 0\nhεU : ∀ {a b : α}, dist a b < ε → (a, b) ∈ U\nV : Set β\nh : ∀ (x : β), x ∈ V → ∀ (x' : β), x' ∈ V → ∀ (i : ι), dist (F i x) (F i x') < ε\n⊢ ∀ (x : β), x ∈ V → ∀ (y : β), y ∈ V → ∀ (i : ι), (F i x, F i y) ∈ U\n[PROOFSTEP]\nexact fun x hx x' hx' i => hεU (h _ hx _ hx' i)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι✝ : Type u_3\ninst✝¹ : PseudoMetricSpace α\nι : Type u_4\ninst✝ : TopologicalSpace β\nx₀ : β\nb : β → ℝ\nb_lim : Tendsto b (𝓝 x₀) (𝓝 0)\nF : ι → β → α\nH : ∀ᶠ (x : β) in 𝓝 x₀, ∀ (i : ι), dist (F i x₀) (F i x) ≤ b x\n⊢ EquicontinuousAt F x₀\n[PROOFSTEP]\nrw [Metric.equicontinuousAt_iff_right]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι✝ : Type u_3\ninst✝¹ : PseudoMetricSpace α\nι : Type u_4\ninst✝ : TopologicalSpace β\nx₀ : β\nb : β → ℝ\nb_lim : Tendsto b (𝓝 x₀) (𝓝 0)\nF : ι → β → α\nH : ∀ᶠ (x : β) in 𝓝 x₀, ∀ (i : ι), dist (F i x₀) (F i x) ≤ b x\n⊢ ∀ (ε : ℝ), ε > 0 → ∀ᶠ (x : β) in 𝓝 x₀, ∀ (i : ι), dist (F i x₀) (F i x) < ε\n[PROOFSTEP]\nintro ε ε0\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι✝ : Type u_3\ninst✝¹ : PseudoMetricSpace α\nι : Type u_4\ninst✝ : TopologicalSpace β\nx₀ : β\nb : β → ℝ\nb_lim : Tendsto b (𝓝 x₀) (𝓝 0)\nF : ι → β → α\nH : ∀ᶠ (x : β) in 𝓝 x₀, ∀ (i : ι), dist (F i x₀) (F i x) ≤ b x\nε : ℝ\nε0 : ε > 0\n⊢ ∀ᶠ (x : β) in 𝓝 x₀, ∀ (i : ι), dist (F i x₀) (F i x) < ε\n[PROOFSTEP]\nfilter_upwards [Filter.mem_map.mp <| b_lim (Iio_mem_nhds ε0), H] using fun x hx₁ hx₂ i => (hx₂ i).trans_lt hx₁\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι✝ : Type u_3\ninst✝¹ : PseudoMetricSpace α\nι : Type u_4\ninst✝ : PseudoMetricSpace β\nb : ℝ → ℝ\nb_lim : Tendsto b (𝓝 0) (𝓝 0)\nF : ι → β → α\nH : ∀ (x y : β) (i : ι), dist (F i x) (F i y) ≤ b (dist x y)\n⊢ UniformEquicontinuous F\n[PROOFSTEP]\nrw [Metric.uniformEquicontinuous_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι✝ : Type u_3\ninst✝¹ : PseudoMetricSpace α\nι : Type u_4\ninst✝ : PseudoMetricSpace β\nb : ℝ → ℝ\nb_lim : Tendsto b (𝓝 0) (𝓝 0)\nF : ι → β → α\nH : ∀ (x y : β) (i : ι), dist (F i x) (F i y) ≤ b (dist x y)\n⊢ ∀ (ε : ℝ), ε > 0 → ∃ δ, δ > 0 ∧ ∀ (x y : β), dist x y < δ → ∀ (i : ι), dist (F i x) (F i y) < ε\n[PROOFSTEP]\nintro ε ε0\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι✝ : Type u_3\ninst✝¹ : PseudoMetricSpace α\nι : Type u_4\ninst✝ : PseudoMetricSpace β\nb : ℝ → ℝ\nb_lim : Tendsto b (𝓝 0) (𝓝 0)\nF : ι → β → α\nH : ∀ (x y : β) (i : ι), dist (F i x) (F i y) ≤ b (dist x y)\nε : ℝ\nε0 : ε > 0\n⊢ ∃ δ, δ > 0 ∧ ∀ (x y : β), dist x y < δ → ∀ (i : ι), dist (F i x) (F i y) < ε\n[PROOFSTEP]\nrcases tendsto_nhds_nhds.1 b_lim ε ε0 with ⟨δ, δ0, hδ⟩\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nι✝ : Type u_3\ninst✝¹ : PseudoMetricSpace α\nι : Type u_4\ninst✝ : PseudoMetricSpace β\nb : ℝ → ℝ\nb_lim : Tendsto b (𝓝 0) (𝓝 0)\nF : ι → β → α\nH : ∀ (x y : β) (i : ι), dist (F i x) (F i y) ≤ b (dist x y)\nε : ℝ\nε0 : ε > 0\nδ : ℝ\nδ0 : δ > 0\nhδ : ∀ {x : ℝ}, dist x 0 < δ → dist (b x) 0 < ε\n⊢ ∃ δ, δ > 0 ∧ ∀ (x y : β), dist x y < δ → ∀ (i : ι), dist (F i x) (F i y) < ε\n[PROOFSTEP]\nrefine' ⟨δ, δ0, fun x y hxy i => _⟩\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nι✝ : Type u_3\ninst✝¹ : PseudoMetricSpace α\nι : Type u_4\ninst✝ : PseudoMetricSpace β\nb : ℝ → ℝ\nb_lim : Tendsto b (𝓝 0) (𝓝 0)\nF : ι → β → α\nH : ∀ (x y : β) (i : ι), dist (F i x) (F i y) ≤ b (dist x y)\nε : ℝ\nε0 : ε > 0\nδ : ℝ\nδ0 : δ > 0\nhδ : ∀ {x : ℝ}, dist x 0 < δ → dist (b x) 0 < ε\nx y : β\nhxy : dist x y < δ\ni : ι\n⊢ dist (F i x) (F i y) < ε\n[PROOFSTEP]\ncalc\n  dist (F i x) (F i y) ≤ b (dist x y) := H x y i\n  _ ≤ |b (dist x y)| := (le_abs_self _)\n  _ = dist (b (dist x y)) 0 := by simp [Real.dist_eq]\n  _ < ε := hδ (by simpa only [Real.dist_eq, tsub_zero, abs_dist] using hxy)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι✝ : Type u_3\ninst✝¹ : PseudoMetricSpace α\nι : Type u_4\ninst✝ : PseudoMetricSpace β\nb : ℝ → ℝ\nb_lim : Tendsto b (𝓝 0) (𝓝 0)\nF : ι → β → α\nH : ∀ (x y : β) (i : ι), dist (F i x) (F i y) ≤ b (dist x y)\nε : ℝ\nε0 : ε > 0\nδ : ℝ\nδ0 : δ > 0\nhδ : ∀ {x : ℝ}, dist x 0 < δ → dist (b x) 0 < ε\nx y : β\nhxy : dist x y < δ\ni : ι\n⊢ |b (dist x y)| = dist (b (dist x y)) 0\n[PROOFSTEP]\nsimp [Real.dist_eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι✝ : Type u_3\ninst✝¹ : PseudoMetricSpace α\nι : Type u_4\ninst✝ : PseudoMetricSpace β\nb : ℝ → ℝ\nb_lim : Tendsto b (𝓝 0) (𝓝 0)\nF : ι → β → α\nH : ∀ (x y : β) (i : ι), dist (F i x) (F i y) ≤ b (dist x y)\nε : ℝ\nε0 : ε > 0\nδ : ℝ\nδ0 : δ > 0\nhδ : ∀ {x : ℝ}, dist x 0 < δ → dist (b x) 0 < ε\nx y : β\nhxy : dist x y < δ\ni : ι\n⊢ dist (dist x y) 0 < δ\n[PROOFSTEP]\nsimpa only [Real.dist_eq, tsub_zero, abs_dist] using hxy\n", "meta": {"mathlib_filename": "Mathlib.Topology.MetricSpace.Equicontinuity", "llama_tokens": 5108, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8104789086703225, "lm_q2_score": 0.6334102636778401, "lm_q1q2_score": 0.513365659246197}}
{"text": "[GOAL]\nB : Type u\ninst✝ : Bicategory B\na b c d e : B\nf g h : a ⟶ b\nη : f ⟶ g\nθ : g ⟶ h\n⊢ η ⊗≫ θ = η ≫ θ\n[PROOFSTEP]\ndsimp [bicategoricalComp]\n[GOAL]\nB : Type u\ninst✝ : Bicategory B\na b c d e : B\nf g h : a ⟶ b\nη : f ⟶ g\nθ : g ⟶ h\n⊢ η ≫ 𝟙 g ≫ θ = η ≫ θ\n[PROOFSTEP]\nsimp\n", "meta": {"mathlib_filename": "Mathlib.Tactic.CategoryTheory.BicategoryCoherence", "llama_tokens": 167, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES\n\n", "lm_q1_score": 0.8198933183101078, "lm_q2_score": 0.6261241772283034, "lm_q1q2_score": 0.5133550293418997}}
{"text": "[GOAL]\nα : Type u_1\nn : ℕ\nxs : Vector α n\nx : α\n⊢ reverse (x ::ᵥ xs) = snoc (reverse xs) x\n[PROOFSTEP]\ncases xs\n[GOAL]\ncase mk\nα : Type u_1\nn : ℕ\nx : α\nval✝ : List α\nproperty✝ : List.length val✝ = n\n⊢ reverse (x ::ᵥ { val := val✝, property := property✝ }) = snoc (reverse { val := val✝, property := property✝ }) x\n[PROOFSTEP]\nsimp only [reverse, cons, toList_mk, List.reverse_cons, snoc]\n[GOAL]\ncase mk\nα : Type u_1\nn : ℕ\nx : α\nval✝ : List α\nproperty✝ : List.length val✝ = n\n⊢ { val := List.reverse val✝ ++ [x],\n      property := (_ : (fun l => List.length l = Nat.succ n) (List.reverse val✝ ++ [x])) } =\n    append { val := List.reverse val✝, property := (_ : (fun l => List.length l = n) (List.reverse val✝)) }\n      { val := [x], property := (_ : Nat.succ (List.length []) = Nat.succ 0) }\n[PROOFSTEP]\ncongr\n[GOAL]\nα : Type u_1\nn : ℕ\nxs : Vector α n\nx : α\n⊢ reverse (snoc xs x) = x ::ᵥ reverse xs\n[PROOFSTEP]\ncases xs\n[GOAL]\ncase mk\nα : Type u_1\nn : ℕ\nx : α\nval✝ : List α\nproperty✝ : List.length val✝ = n\n⊢ reverse (snoc { val := val✝, property := property✝ } x) = x ::ᵥ reverse { val := val✝, property := property✝ }\n[PROOFSTEP]\nsimp only [reverse, snoc, cons, toList_mk]\n[GOAL]\ncase mk\nα : Type u_1\nn : ℕ\nx : α\nval✝ : List α\nproperty✝ : List.length val✝ = n\n⊢ {\n      val :=\n        List.reverse\n          (toList\n            (append { val := val✝, property := property✝ }\n              { val := [x], property := (_ : Nat.succ (List.length []) = Nat.succ 0) })),\n      property :=\n        (_ :\n          (fun l => List.length l = n + 1)\n            (List.reverse\n              (toList\n                (append { val := val✝, property := property✝ }\n                  { val := [x], property := (_ : Nat.succ (List.length []) = Nat.succ 0) })))) } =\n    { val := x :: List.reverse val✝, property := (_ : Nat.succ (List.length (List.reverse val✝)) = Nat.succ n) }\n[PROOFSTEP]\ncongr\n[GOAL]\ncase mk.e_val\nα : Type u_1\nn : ℕ\nx : α\nval✝ : List α\nproperty✝ : List.length val✝ = n\n⊢ List.reverse\n      (toList\n        (append { val := val✝, property := property✝ }\n          { val := [x], property := (_ : Nat.succ (List.length []) = Nat.succ 0) })) =\n    x :: List.reverse val✝\n[PROOFSTEP]\nsimp [toList, (· ++ ·), Vector.append, Append.append]\n[GOAL]\ncase mk.e_val\nα : Type u_1\nn : ℕ\nx : α\nval✝ : List α\nproperty✝ : List.length val✝ = n\n⊢ [] ++ [x] ++ List.reverse val✝ = x :: List.reverse val✝\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nn : ℕ\nxs : Vector α n\nval : α\n⊢ replicate (n + 1) val = snoc (replicate n val) val\n[PROOFSTEP]\nclear xs\n[GOAL]\nα : Type u_1\nn : ℕ\nval : α\n⊢ replicate (n + 1) val = snoc (replicate n val) val\n[PROOFSTEP]\ninduction n\n[GOAL]\ncase zero\nα : Type u_1\nn : ℕ\nval : α\n⊢ replicate (Nat.zero + 1) val = snoc (replicate Nat.zero val) val\ncase succ\nα : Type u_1\nn : ℕ\nval : α\nn✝ : ℕ\nn_ih✝ : replicate (n✝ + 1) val = snoc (replicate n✝ val) val\n⊢ replicate (Nat.succ n✝ + 1) val = snoc (replicate (Nat.succ n✝) val) val\n[PROOFSTEP]\ncase zero => rfl\n[GOAL]\nα : Type u_1\nn : ℕ\nval : α\n⊢ replicate (Nat.zero + 1) val = snoc (replicate Nat.zero val) val\n[PROOFSTEP]\ncase zero => rfl\n[GOAL]\nα : Type u_1\nn : ℕ\nval : α\n⊢ replicate (Nat.zero + 1) val = snoc (replicate Nat.zero val) val\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ\nα : Type u_1\nn : ℕ\nval : α\nn✝ : ℕ\nn_ih✝ : replicate (n✝ + 1) val = snoc (replicate n✝ val) val\n⊢ replicate (Nat.succ n✝ + 1) val = snoc (replicate (Nat.succ n✝) val) val\n[PROOFSTEP]\ncase succ n ih =>\n  rw [replicate_succ]\n  conv => {rhs; rw [replicate_succ]}\n  rw [snoc_cons, ih]\n[GOAL]\nα : Type u_1\nn✝ : ℕ\nval : α\nn : ℕ\nih : replicate (n + 1) val = snoc (replicate n val) val\n⊢ replicate (Nat.succ n + 1) val = snoc (replicate (Nat.succ n) val) val\n[PROOFSTEP]\ncase succ n ih =>\n  rw [replicate_succ]\n  conv => {rhs; rw [replicate_succ]}\n  rw [snoc_cons, ih]\n[GOAL]\nα : Type u_1\nn✝ : ℕ\nval : α\nn : ℕ\nih : replicate (n + 1) val = snoc (replicate n val) val\n⊢ replicate (Nat.succ n + 1) val = snoc (replicate (Nat.succ n) val) val\n[PROOFSTEP]\nrw [replicate_succ]\n[GOAL]\nα : Type u_1\nn✝ : ℕ\nval : α\nn : ℕ\nih : replicate (n + 1) val = snoc (replicate n val) val\n⊢ val ::ᵥ replicate (n + 1) val = snoc (replicate (Nat.succ n) val) val\n[PROOFSTEP]\nconv => {rhs; rw [replicate_succ]}\n[GOAL]\nα : Type u_1\nn✝ : ℕ\nval : α\nn : ℕ\nih : replicate (n + 1) val = snoc (replicate n val) val\n| val ::ᵥ replicate (n + 1) val = snoc (replicate (Nat.succ n) val) val\n[PROOFSTEP]\n{rhs; rw [replicate_succ]}\n[GOAL]\nα : Type u_1\nn✝ : ℕ\nval : α\nn : ℕ\nih : replicate (n + 1) val = snoc (replicate n val) val\n| val ::ᵥ replicate (n + 1) val = snoc (replicate (Nat.succ n) val) val\n[PROOFSTEP]\n{rhs; rw [replicate_succ]}\n[GOAL]\nα : Type u_1\nn✝ : ℕ\nval : α\nn : ℕ\nih : replicate (n + 1) val = snoc (replicate n val) val\n| val ::ᵥ replicate (n + 1) val = snoc (replicate (Nat.succ n) val) val\n[PROOFSTEP]\nrhs\n[GOAL]\nα : Type u_1\nn✝ : ℕ\nval : α\nn : ℕ\nih : replicate (n + 1) val = snoc (replicate n val) val\n| snoc (replicate (Nat.succ n) val) val\n[PROOFSTEP]\nrw [replicate_succ]\n[GOAL]\nα : Type u_1\nn✝ : ℕ\nval : α\nn : ℕ\nih : replicate (n + 1) val = snoc (replicate n val) val\n⊢ val ::ᵥ replicate (n + 1) val = snoc (val ::ᵥ replicate n val) val\n[PROOFSTEP]\nrw [snoc_cons, ih]\n[GOAL]\nα : Type ?u.2475\nC : {n : ℕ} → Vector α n → Sort u_1\nn : ℕ\nv : Vector α n\nnil : C Vector.nil\nsnoc : {n : ℕ} → (xs : Vector α n) → (x : α) → C xs → C (Vector.snoc xs x)\n⊢ (fun {n} v => C (reverse v)) (reverse v) = C v\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type ?u.2475\nC : {n : ℕ} → Vector α n → Sort u_1\nn✝ : ℕ\nv : Vector α n✝\nnil : C Vector.nil\nsnoc : {n : ℕ} → (xs : Vector α n) → (x : α) → C xs → C (Vector.snoc xs x)\nn : ℕ\nx : α\nxs : Vector α n\nr : C (reverse xs)\n⊢ C (Vector.snoc (reverse xs) x) = (fun {n} v => C (reverse v)) (x ::ᵥ xs)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type ?u.2985\nβ : Type ?u.2988\nC : {n : ℕ} → Vector α n → Vector β n → Sort u_1\nn : ℕ\nv : Vector α n\nw : Vector β n\nnil : C Vector.nil Vector.nil\nsnoc :\n  {n : ℕ} →\n    (xs : Vector α n) → (ys : Vector β n) → (x : α) → (y : β) → C xs ys → C (Vector.snoc xs x) (Vector.snoc ys y)\n⊢ (fun {n} v w => C (reverse v) (reverse w)) (reverse v) (reverse w) = C v w\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type ?u.2985\nβ : Type ?u.2988\nC : {n : ℕ} → Vector α n → Vector β n → Sort u_1\nn✝ : ℕ\nv : Vector α n✝\nw : Vector β n✝\nnil : C Vector.nil Vector.nil\nsnoc :\n  {n : ℕ} →\n    (xs : Vector α n) → (ys : Vector β n) → (x : α) → (y : β) → C xs ys → C (Vector.snoc xs x) (Vector.snoc ys y)\nn : ℕ\nx : α\ny : β\nxs : Vector α n\nys : Vector β n\nr : C (reverse xs) (reverse ys)\n⊢ C (Vector.snoc (reverse xs) x) (Vector.snoc (reverse ys) y) =\n    (fun {n} v w => C (reverse v) (reverse w)) (x ::ᵥ xs) (y ::ᵥ ys)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_2\nn : ℕ\nxs : Vector α n\nα✝ : Type u_1\nf : α → α✝\nx : α\n⊢ map f (snoc xs x) = snoc (map f xs) (f x)\n[PROOFSTEP]\ninduction xs using Vector.inductionOn\n[GOAL]\ncase h_nil\nα : Type u_2\nn : ℕ\nxs : Vector α n\nα✝ : Type u_1\nf : α → α✝\nx : α\n⊢ map f (snoc nil x) = snoc (map f nil) (f x)\n[PROOFSTEP]\nsimp_all\n[GOAL]\ncase h_cons\nα : Type u_2\nn : ℕ\nxs : Vector α n\nα✝ : Type u_1\nf : α → α✝\nx : α\nn✝ : ℕ\nx✝ : α\nw✝ : Vector α n✝\na✝ : map f (snoc w✝ x) = snoc (map f w✝) (f x)\n⊢ map f (snoc (x✝ ::ᵥ w✝) x) = snoc (map f (x✝ ::ᵥ w✝)) (f x)\n[PROOFSTEP]\nsimp_all\n[GOAL]\nα : Type u_2\nn : ℕ\nxs : Vector α n\nα✝ : Type\nβ✝ : Type u_1\nf : α → α✝ → α✝ × β✝\nx : α\ns : α✝\n⊢ mapAccumr f (snoc xs x) s =\n    let q := f x s;\n    let r := mapAccumr f xs q.fst;\n    (r.fst, snoc r.snd q.snd)\n[PROOFSTEP]\ninduction xs using Vector.inductionOn\n[GOAL]\ncase h_nil\nα : Type u_2\nn : ℕ\nxs : Vector α n\nα✝ : Type\nβ✝ : Type u_1\nf : α → α✝ → α✝ × β✝\nx : α\ns : α✝\n⊢ mapAccumr f (snoc nil x) s =\n    let q := f x s;\n    let r := mapAccumr f nil q.fst;\n    (r.fst, snoc r.snd q.snd)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h_cons\nα : Type u_2\nn : ℕ\nxs : Vector α n\nα✝ : Type\nβ✝ : Type u_1\nf : α → α✝ → α✝ × β✝\nx : α\ns : α✝\nn✝ : ℕ\nx✝ : α\nw✝ : Vector α n✝\na✝ :\n  mapAccumr f (snoc w✝ x) s =\n    let q := f x s;\n    let r := mapAccumr f w✝ q.fst;\n    (r.fst, snoc r.snd q.snd)\n⊢ mapAccumr f (snoc (x✝ ::ᵥ w✝) x) s =\n    let q := f x s;\n    let r := mapAccumr f (x✝ ::ᵥ w✝) q.fst;\n    (r.fst, snoc r.snd q.snd)\n[PROOFSTEP]\nsimp [*]\n[GOAL]\nα : Type u_2\nn : ℕ\nβ : Type u_3\nxs : Vector α n\nys : Vector β n\nα✝ : Type u_1\nf : α → β → α✝\nx : α\ny : β\n⊢ map₂ f (snoc xs x) (snoc ys y) = snoc (map₂ f xs ys) (f x y)\n[PROOFSTEP]\ninduction xs, ys using Vector.inductionOn₂\n[GOAL]\ncase nil\nα : Type u_2\nn : ℕ\nβ : Type u_3\nxs : Vector α n\nys : Vector β n\nα✝ : Type u_1\nf : α → β → α✝\nx : α\ny : β\n⊢ map₂ f (snoc nil x) (snoc nil y) = snoc (map₂ f nil nil) (f x y)\n[PROOFSTEP]\nsimp_all\n[GOAL]\ncase cons\nα : Type u_2\nn : ℕ\nβ : Type u_3\nxs : Vector α n\nys : Vector β n\nα✝ : Type u_1\nf : α → β → α✝\nx : α\ny : β\nn✝ : ℕ\na✝¹ : α\nb✝ : β\nx✝ : Vector α n✝\ny✝ : Vector β n✝\na✝ : map₂ f (snoc x✝ x) (snoc y✝ y) = snoc (map₂ f x✝ y✝) (f x y)\n⊢ map₂ f (snoc (a✝¹ ::ᵥ x✝) x) (snoc (b✝ ::ᵥ y✝) y) = snoc (map₂ f (a✝¹ ::ᵥ x✝) (b✝ ::ᵥ y✝)) (f x y)\n[PROOFSTEP]\nsimp_all\n[GOAL]\nα : Type\nn : ℕ\nβ : Type\nxs : Vector α n\nys : Vector β n\nσ φ : Type\nc : σ\nf : α → β → σ → σ × φ\nx : α\ny : β\n⊢ mapAccumr₂ f (snoc xs x) (snoc ys y) c =\n    let q := f x y c;\n    let r := mapAccumr₂ f xs ys q.fst;\n    (r.fst, snoc r.snd q.snd)\n[PROOFSTEP]\ninduction xs, ys using Vector.inductionOn₂\n[GOAL]\ncase nil\nα : Type\nn : ℕ\nβ : Type\nxs : Vector α n\nys : Vector β n\nσ φ : Type\nc : σ\nf : α → β → σ → σ × φ\nx : α\ny : β\n⊢ mapAccumr₂ f (snoc nil x) (snoc nil y) c =\n    let q := f x y c;\n    let r := mapAccumr₂ f nil nil q.fst;\n    (r.fst, snoc r.snd q.snd)\n[PROOFSTEP]\nsimp_all\n[GOAL]\ncase cons\nα : Type\nn : ℕ\nβ : Type\nxs : Vector α n\nys : Vector β n\nσ φ : Type\nc : σ\nf : α → β → σ → σ × φ\nx : α\ny : β\nn✝ : ℕ\na✝¹ : α\nb✝ : β\nx✝ : Vector α n✝\ny✝ : Vector β n✝\na✝ :\n  mapAccumr₂ f (snoc x✝ x) (snoc y✝ y) c =\n    let q := f x y c;\n    let r := mapAccumr₂ f x✝ y✝ q.fst;\n    (r.fst, snoc r.snd q.snd)\n⊢ mapAccumr₂ f (snoc (a✝¹ ::ᵥ x✝) x) (snoc (b✝ ::ᵥ y✝) y) c =\n    let q := f x y c;\n    let r := mapAccumr₂ f (a✝¹ ::ᵥ x✝) (b✝ ::ᵥ y✝) q.fst;\n    (r.fst, snoc r.snd q.snd)\n[PROOFSTEP]\nsimp_all\n", "meta": {"mathlib_filename": "Mathlib.Data.Vector.Snoc", "llama_tokens": 5181, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7520125737597972, "lm_q2_score": 0.6825737344123242, "lm_q1q2_score": 0.5133040307962482}}
{"text": "[GOAL]\nz : ℂ\n⊢ HasSum (fun n => (z * I) ^ (2 * n) / ↑(2 * n)!) (cos z)\n[PROOFSTEP]\nrw [Complex.cos, Complex.exp_eq_exp_ℂ]\n[GOAL]\nz : ℂ\n⊢ HasSum (fun n => (z * I) ^ (2 * n) / ↑(2 * n)!) ((_root_.exp ℂ (z * I) + _root_.exp ℂ (-z * I)) / 2)\n[PROOFSTEP]\nhave := ((expSeries_div_hasSum_exp ℂ (z * Complex.I)).add (expSeries_div_hasSum_exp ℂ (-z * Complex.I))).div_const 2\n[GOAL]\nz : ℂ\nthis :\n  HasSum (fun i => ((z * I) ^ i / ↑i ! + (-z * I) ^ i / ↑i !) / 2) ((_root_.exp ℂ (z * I) + _root_.exp ℂ (-z * I)) / 2)\n⊢ HasSum (fun n => (z * I) ^ (2 * n) / ↑(2 * n)!) ((_root_.exp ℂ (z * I) + _root_.exp ℂ (-z * I)) / 2)\n[PROOFSTEP]\nreplace := (Nat.divModEquiv 2).symm.hasSum_iff.mpr this\n[GOAL]\nz : ℂ\nthis :\n  HasSum ((fun i => ((z * I) ^ i / ↑i ! + (-z * I) ^ i / ↑i !) / 2) ∘ ↑(Nat.divModEquiv 2).symm)\n    ((_root_.exp ℂ (z * I) + _root_.exp ℂ (-z * I)) / 2)\n⊢ HasSum (fun n => (z * I) ^ (2 * n) / ↑(2 * n)!) ((_root_.exp ℂ (z * I) + _root_.exp ℂ (-z * I)) / 2)\n[PROOFSTEP]\ndsimp [Function.comp] at this \n[GOAL]\nz : ℂ\nthis :\n  HasSum\n    (fun x =>\n      ((z * I) ^ (x.fst * 2 + ↑x.snd) / ↑(x.fst * 2 + ↑x.snd)! +\n          (-z * I) ^ (x.fst * 2 + ↑x.snd) / ↑(x.fst * 2 + ↑x.snd)!) /\n        2)\n    ((_root_.exp ℂ (z * I) + _root_.exp ℂ (-z * I)) / 2)\n⊢ HasSum (fun n => (z * I) ^ (2 * n) / ↑(2 * n)!) ((_root_.exp ℂ (z * I) + _root_.exp ℂ (-z * I)) / 2)\n[PROOFSTEP]\nsimp_rw [← mul_comm 2 _] at this \n[GOAL]\nz : ℂ\nthis :\n  HasSum\n    (fun x =>\n      ((z * I) ^ (2 * x.fst + ↑x.snd) / ↑(2 * x.fst + ↑x.snd)! +\n          (-z * I) ^ (2 * x.fst + ↑x.snd) / ↑(2 * x.fst + ↑x.snd)!) /\n        2)\n    ((_root_.exp ℂ (z * I) + _root_.exp ℂ (-z * I)) / 2)\n⊢ HasSum (fun n => (z * I) ^ (2 * n) / ↑(2 * n)!) ((_root_.exp ℂ (z * I) + _root_.exp ℂ (-z * I)) / 2)\n[PROOFSTEP]\nrefine' this.prod_fiberwise fun k => _\n[GOAL]\nz : ℂ\nthis :\n  HasSum\n    (fun x =>\n      ((z * I) ^ (2 * x.fst + ↑x.snd) / ↑(2 * x.fst + ↑x.snd)! +\n          (-z * I) ^ (2 * x.fst + ↑x.snd) / ↑(2 * x.fst + ↑x.snd)!) /\n        2)\n    ((_root_.exp ℂ (z * I) + _root_.exp ℂ (-z * I)) / 2)\nk : ℕ\n⊢ HasSum\n    (fun c =>\n      ((z * I) ^ (2 * (k, c).fst + ↑(k, c).snd) / ↑(2 * (k, c).fst + ↑(k, c).snd)! +\n          (-z * I) ^ (2 * (k, c).fst + ↑(k, c).snd) / ↑(2 * (k, c).fst + ↑(k, c).snd)!) /\n        2)\n    ((z * I) ^ (2 * k) / ↑(2 * k)!)\n[PROOFSTEP]\ndsimp only\n[GOAL]\nz : ℂ\nthis :\n  HasSum\n    (fun x =>\n      ((z * I) ^ (2 * x.fst + ↑x.snd) / ↑(2 * x.fst + ↑x.snd)! +\n          (-z * I) ^ (2 * x.fst + ↑x.snd) / ↑(2 * x.fst + ↑x.snd)!) /\n        2)\n    ((_root_.exp ℂ (z * I) + _root_.exp ℂ (-z * I)) / 2)\nk : ℕ\n⊢ HasSum (fun c => ((z * I) ^ (2 * k + ↑c) / ↑(2 * k + ↑c)! + (-z * I) ^ (2 * k + ↑c) / ↑(2 * k + ↑c)!) / 2)\n    ((z * I) ^ (2 * k) / ↑(2 * k)!)\n[PROOFSTEP]\nconvert hasSum_fintype (_ : Fin 2 → ℂ) using 1\n[GOAL]\ncase h.e'_6\nz : ℂ\nthis :\n  HasSum\n    (fun x =>\n      ((z * I) ^ (2 * x.fst + ↑x.snd) / ↑(2 * x.fst + ↑x.snd)! +\n          (-z * I) ^ (2 * x.fst + ↑x.snd) / ↑(2 * x.fst + ↑x.snd)!) /\n        2)\n    ((_root_.exp ℂ (z * I) + _root_.exp ℂ (-z * I)) / 2)\nk : ℕ\n⊢ (z * I) ^ (2 * k) / ↑(2 * k)! =\n    Finset.sum Finset.univ fun b =>\n      ((z * I) ^ (2 * k + ↑b) / ↑(2 * k + ↑b)! + (-z * I) ^ (2 * k + ↑b) / ↑(2 * k + ↑b)!) / 2\n[PROOFSTEP]\nrw [Fin.sum_univ_two]\n[GOAL]\ncase h.e'_6\nz : ℂ\nthis :\n  HasSum\n    (fun x =>\n      ((z * I) ^ (2 * x.fst + ↑x.snd) / ↑(2 * x.fst + ↑x.snd)! +\n          (-z * I) ^ (2 * x.fst + ↑x.snd) / ↑(2 * x.fst + ↑x.snd)!) /\n        2)\n    ((_root_.exp ℂ (z * I) + _root_.exp ℂ (-z * I)) / 2)\nk : ℕ\n⊢ (z * I) ^ (2 * k) / ↑(2 * k)! =\n    ((z * I) ^ (2 * k + ↑0) / ↑(2 * k + ↑0)! + (-z * I) ^ (2 * k + ↑0) / ↑(2 * k + ↑0)!) / 2 +\n      ((z * I) ^ (2 * k + ↑1) / ↑(2 * k + ↑1)! + (-z * I) ^ (2 * k + ↑1) / ↑(2 * k + ↑1)!) / 2\n[PROOFSTEP]\nsimp_rw [Fin.val_zero, Fin.val_one, add_zero, pow_succ', pow_mul, mul_pow, neg_sq, ← two_mul, neg_mul, mul_neg, neg_div,\n  add_right_neg, zero_div, add_zero, mul_div_cancel_left _ (two_ne_zero : (2 : ℂ) ≠ 0)]\n[GOAL]\nz : ℂ\n⊢ HasSum (fun n => (z * I) ^ (2 * n + 1) / ↑(2 * n + 1)! / I) (sin z)\n[PROOFSTEP]\nrw [Complex.sin, Complex.exp_eq_exp_ℂ]\n[GOAL]\nz : ℂ\n⊢ HasSum (fun n => (z * I) ^ (2 * n + 1) / ↑(2 * n + 1)! / I) ((_root_.exp ℂ (-z * I) - _root_.exp ℂ (z * I)) * I / 2)\n[PROOFSTEP]\nhave :=\n  (((expSeries_div_hasSum_exp ℂ (-z * Complex.I)).sub (expSeries_div_hasSum_exp ℂ (z * Complex.I))).mul_right\n        Complex.I).div_const\n    2\n[GOAL]\nz : ℂ\nthis :\n  HasSum (fun i => ((-z * I) ^ i / ↑i ! - (z * I) ^ i / ↑i !) * I / 2)\n    ((_root_.exp ℂ (-z * I) - _root_.exp ℂ (z * I)) * I / 2)\n⊢ HasSum (fun n => (z * I) ^ (2 * n + 1) / ↑(2 * n + 1)! / I) ((_root_.exp ℂ (-z * I) - _root_.exp ℂ (z * I)) * I / 2)\n[PROOFSTEP]\nreplace := (Nat.divModEquiv 2).symm.hasSum_iff.mpr this\n[GOAL]\nz : ℂ\nthis :\n  HasSum ((fun i => ((-z * I) ^ i / ↑i ! - (z * I) ^ i / ↑i !) * I / 2) ∘ ↑(Nat.divModEquiv 2).symm)\n    ((_root_.exp ℂ (-z * I) - _root_.exp ℂ (z * I)) * I / 2)\n⊢ HasSum (fun n => (z * I) ^ (2 * n + 1) / ↑(2 * n + 1)! / I) ((_root_.exp ℂ (-z * I) - _root_.exp ℂ (z * I)) * I / 2)\n[PROOFSTEP]\ndsimp [Function.comp] at this \n[GOAL]\nz : ℂ\nthis :\n  HasSum\n    (fun x =>\n      ((-z * I) ^ (x.fst * 2 + ↑x.snd) / ↑(x.fst * 2 + ↑x.snd)! -\n            (z * I) ^ (x.fst * 2 + ↑x.snd) / ↑(x.fst * 2 + ↑x.snd)!) *\n          I /\n        2)\n    ((_root_.exp ℂ (-z * I) - _root_.exp ℂ (z * I)) * I / 2)\n⊢ HasSum (fun n => (z * I) ^ (2 * n + 1) / ↑(2 * n + 1)! / I) ((_root_.exp ℂ (-z * I) - _root_.exp ℂ (z * I)) * I / 2)\n[PROOFSTEP]\nsimp_rw [← mul_comm 2 _] at this \n[GOAL]\nz : ℂ\nthis :\n  HasSum\n    (fun x =>\n      ((-z * I) ^ (2 * x.fst + ↑x.snd) / ↑(2 * x.fst + ↑x.snd)! -\n            (z * I) ^ (2 * x.fst + ↑x.snd) / ↑(2 * x.fst + ↑x.snd)!) *\n          I /\n        2)\n    ((_root_.exp ℂ (-z * I) - _root_.exp ℂ (z * I)) * I / 2)\n⊢ HasSum (fun n => (z * I) ^ (2 * n + 1) / ↑(2 * n + 1)! / I) ((_root_.exp ℂ (-z * I) - _root_.exp ℂ (z * I)) * I / 2)\n[PROOFSTEP]\nrefine' this.prod_fiberwise fun k => _\n[GOAL]\nz : ℂ\nthis :\n  HasSum\n    (fun x =>\n      ((-z * I) ^ (2 * x.fst + ↑x.snd) / ↑(2 * x.fst + ↑x.snd)! -\n            (z * I) ^ (2 * x.fst + ↑x.snd) / ↑(2 * x.fst + ↑x.snd)!) *\n          I /\n        2)\n    ((_root_.exp ℂ (-z * I) - _root_.exp ℂ (z * I)) * I / 2)\nk : ℕ\n⊢ HasSum\n    (fun c =>\n      ((-z * I) ^ (2 * (k, c).fst + ↑(k, c).snd) / ↑(2 * (k, c).fst + ↑(k, c).snd)! -\n            (z * I) ^ (2 * (k, c).fst + ↑(k, c).snd) / ↑(2 * (k, c).fst + ↑(k, c).snd)!) *\n          I /\n        2)\n    ((z * I) ^ (2 * k + 1) / ↑(2 * k + 1)! / I)\n[PROOFSTEP]\ndsimp only\n[GOAL]\nz : ℂ\nthis :\n  HasSum\n    (fun x =>\n      ((-z * I) ^ (2 * x.fst + ↑x.snd) / ↑(2 * x.fst + ↑x.snd)! -\n            (z * I) ^ (2 * x.fst + ↑x.snd) / ↑(2 * x.fst + ↑x.snd)!) *\n          I /\n        2)\n    ((_root_.exp ℂ (-z * I) - _root_.exp ℂ (z * I)) * I / 2)\nk : ℕ\n⊢ HasSum (fun c => ((-z * I) ^ (2 * k + ↑c) / ↑(2 * k + ↑c)! - (z * I) ^ (2 * k + ↑c) / ↑(2 * k + ↑c)!) * I / 2)\n    ((z * I) ^ (2 * k + 1) / ↑(2 * k + 1)! / I)\n[PROOFSTEP]\nconvert hasSum_fintype (_ : Fin 2 → ℂ) using 1\n[GOAL]\ncase h.e'_6\nz : ℂ\nthis :\n  HasSum\n    (fun x =>\n      ((-z * I) ^ (2 * x.fst + ↑x.snd) / ↑(2 * x.fst + ↑x.snd)! -\n            (z * I) ^ (2 * x.fst + ↑x.snd) / ↑(2 * x.fst + ↑x.snd)!) *\n          I /\n        2)\n    ((_root_.exp ℂ (-z * I) - _root_.exp ℂ (z * I)) * I / 2)\nk : ℕ\n⊢ (z * I) ^ (2 * k + 1) / ↑(2 * k + 1)! / I =\n    Finset.sum Finset.univ fun b =>\n      ((-z * I) ^ (2 * k + ↑b) / ↑(2 * k + ↑b)! - (z * I) ^ (2 * k + ↑b) / ↑(2 * k + ↑b)!) * I / 2\n[PROOFSTEP]\nrw [Fin.sum_univ_two]\n[GOAL]\ncase h.e'_6\nz : ℂ\nthis :\n  HasSum\n    (fun x =>\n      ((-z * I) ^ (2 * x.fst + ↑x.snd) / ↑(2 * x.fst + ↑x.snd)! -\n            (z * I) ^ (2 * x.fst + ↑x.snd) / ↑(2 * x.fst + ↑x.snd)!) *\n          I /\n        2)\n    ((_root_.exp ℂ (-z * I) - _root_.exp ℂ (z * I)) * I / 2)\nk : ℕ\n⊢ (z * I) ^ (2 * k + 1) / ↑(2 * k + 1)! / I =\n    ((-z * I) ^ (2 * k + ↑0) / ↑(2 * k + ↑0)! - (z * I) ^ (2 * k + ↑0) / ↑(2 * k + ↑0)!) * I / 2 +\n      ((-z * I) ^ (2 * k + ↑1) / ↑(2 * k + ↑1)! - (z * I) ^ (2 * k + ↑1) / ↑(2 * k + ↑1)!) * I / 2\n[PROOFSTEP]\nsimp_rw [Fin.val_zero, Fin.val_one, add_zero, pow_succ', pow_mul, mul_pow, neg_sq, sub_self, zero_mul, zero_div,\n  zero_add, neg_mul, mul_neg, neg_div, ← neg_add', ← two_mul, neg_mul, neg_div, mul_assoc,\n  mul_div_cancel_left _ (two_ne_zero : (2 : ℂ) ≠ 0), Complex.div_I]\n[GOAL]\nz : ℂ\n⊢ HasSum (fun n => (-1) ^ n * z ^ (2 * n) / ↑(2 * n)!) (cos z)\n[PROOFSTEP]\nconvert Complex.hasSum_cos' z using 1\n[GOAL]\ncase h.e'_5\nz : ℂ\n⊢ (fun n => (-1) ^ n * z ^ (2 * n) / ↑(2 * n)!) = fun n => (z * I) ^ (2 * n) / ↑(2 * n)!\n[PROOFSTEP]\nsimp_rw [mul_pow, pow_mul, Complex.I_sq, mul_comm]\n[GOAL]\nz : ℂ\n⊢ HasSum (fun n => (-1) ^ n * z ^ (2 * n + 1) / ↑(2 * n + 1)!) (sin z)\n[PROOFSTEP]\nconvert Complex.hasSum_sin' z using 1\n[GOAL]\ncase h.e'_5\nz : ℂ\n⊢ (fun n => (-1) ^ n * z ^ (2 * n + 1) / ↑(2 * n + 1)!) = fun n => (z * I) ^ (2 * n + 1) / ↑(2 * n + 1)! / I\n[PROOFSTEP]\nsimp_rw [mul_pow, pow_succ', pow_mul, Complex.I_sq, ← mul_assoc, mul_div_assoc, div_right_comm,\n  div_self Complex.I_ne_zero, mul_comm _ ((-1 : ℂ) ^ _), mul_one_div, mul_div_assoc, mul_assoc]\n[GOAL]\nr : ℝ\n⊢ HasSum (fun n => (-1) ^ n * r ^ (2 * n) / ↑(2 * n)!) (cos r)\n[PROOFSTEP]\nexact_mod_cast Complex.hasSum_cos r\n[GOAL]\nr : ℝ\n⊢ HasSum (fun n => (-1) ^ n * r ^ (2 * n + 1) / ↑(2 * n + 1)!) (sin r)\n[PROOFSTEP]\nexact_mod_cast Complex.hasSum_sin r\n", "meta": {"mathlib_filename": "Mathlib.Analysis.SpecialFunctions.Trigonometric.Series", "llama_tokens": 5172, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8006920020959544, "lm_q2_score": 0.640635868562172, "lm_q1q2_score": 0.5129520162135262}}
{"text": "[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : HasContDiffBump E\ninst✝ : MeasurableSpace E\nc : E\nf : ContDiffBump c\nx✝ : E\nn : ℕ∞\nμ : Measure E\nx : E\n⊢ ContDiffBump.normed f μ (c - x) = ContDiffBump.normed f μ (c + x)\n[PROOFSTEP]\nsimp_rw [f.normed_def, f.sub]\n[GOAL]\nE : Type u_1\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : HasContDiffBump E\ninst✝ : MeasurableSpace E\nc : E\nf✝ : ContDiffBump c\nx✝ : E\nn : ℕ∞\nμ : Measure E\nf : ContDiffBump 0\nx : E\n⊢ ContDiffBump.normed f μ (-x) = ContDiffBump.normed f μ x\n[PROOFSTEP]\nsimp_rw [f.normed_def, f.neg]\n[GOAL]\nE : Type u_1\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : HasContDiffBump E\ninst✝⁴ : MeasurableSpace E\nc : E\nf : ContDiffBump c\nx : E\nn : ℕ∞\nμ : Measure E\ninst✝³ : BorelSpace E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : IsLocallyFiniteMeasure μ\ninst✝ : IsOpenPosMeasure μ\n⊢ 0 < ∫ (x : E), ↑f x ∂μ\n[PROOFSTEP]\nrefine' (integral_pos_iff_support_of_nonneg f.nonneg' f.integrable).mpr _\n[GOAL]\nE : Type u_1\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : HasContDiffBump E\ninst✝⁴ : MeasurableSpace E\nc : E\nf : ContDiffBump c\nx : E\nn : ℕ∞\nμ : Measure E\ninst✝³ : BorelSpace E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : IsLocallyFiniteMeasure μ\ninst✝ : IsOpenPosMeasure μ\n⊢ 0 < ↑↑μ (support fun i => ↑f i)\n[PROOFSTEP]\nrw [f.support_eq]\n[GOAL]\nE : Type u_1\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : HasContDiffBump E\ninst✝⁴ : MeasurableSpace E\nc : E\nf : ContDiffBump c\nx : E\nn : ℕ∞\nμ : Measure E\ninst✝³ : BorelSpace E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : IsLocallyFiniteMeasure μ\ninst✝ : IsOpenPosMeasure μ\n⊢ 0 < ↑↑μ (ball c f.rOut)\n[PROOFSTEP]\nexact measure_ball_pos μ c f.rOut_pos\n[GOAL]\nE : Type u_1\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : HasContDiffBump E\ninst✝⁴ : MeasurableSpace E\nc : E\nf : ContDiffBump c\nx : E\nn : ℕ∞\nμ : Measure E\ninst✝³ : BorelSpace E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : IsLocallyFiniteMeasure μ\ninst✝ : IsOpenPosMeasure μ\n⊢ ∫ (x : E), ContDiffBump.normed f μ x ∂μ = 1\n[PROOFSTEP]\nsimp_rw [ContDiffBump.normed, div_eq_mul_inv, mul_comm (f _), ← smul_eq_mul, integral_smul]\n[GOAL]\nE : Type u_1\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : HasContDiffBump E\ninst✝⁴ : MeasurableSpace E\nc : E\nf : ContDiffBump c\nx : E\nn : ℕ∞\nμ : Measure E\ninst✝³ : BorelSpace E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : IsLocallyFiniteMeasure μ\ninst✝ : IsOpenPosMeasure μ\n⊢ (∫ (x : E), ↑f x ∂μ)⁻¹ • ∫ (x : E), ↑f x ∂μ = 1\n[PROOFSTEP]\nexact inv_mul_cancel f.integral_pos.ne'\n[GOAL]\nE : Type u_1\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : HasContDiffBump E\ninst✝⁴ : MeasurableSpace E\nc : E\nf : ContDiffBump c\nx : E\nn : ℕ∞\nμ : Measure E\ninst✝³ : BorelSpace E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : IsLocallyFiniteMeasure μ\ninst✝ : IsOpenPosMeasure μ\n⊢ support (ContDiffBump.normed f μ) = ball c f.rOut\n[PROOFSTEP]\nunfold ContDiffBump.normed\n[GOAL]\nE : Type u_1\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : HasContDiffBump E\ninst✝⁴ : MeasurableSpace E\nc : E\nf : ContDiffBump c\nx : E\nn : ℕ∞\nμ : Measure E\ninst✝³ : BorelSpace E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : IsLocallyFiniteMeasure μ\ninst✝ : IsOpenPosMeasure μ\n⊢ (support fun x => ↑f x / ∫ (x : E), ↑f x ∂μ) = ball c f.rOut\n[PROOFSTEP]\nrw [support_div, f.support_eq, support_const f.integral_pos.ne', inter_univ]\n[GOAL]\nE : Type u_1\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : HasContDiffBump E\ninst✝⁴ : MeasurableSpace E\nc : E\nf : ContDiffBump c\nx : E\nn : ℕ∞\nμ : Measure E\ninst✝³ : BorelSpace E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : IsLocallyFiniteMeasure μ\ninst✝ : IsOpenPosMeasure μ\n⊢ tsupport (ContDiffBump.normed f μ) = closedBall c f.rOut\n[PROOFSTEP]\nrw [tsupport, f.support_normed_eq, closure_ball _ f.rOut_pos.ne']\n[GOAL]\nE : Type u_1\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : HasContDiffBump E\ninst✝⁴ : MeasurableSpace E\nc : E\nf : ContDiffBump c\nx : E\nn : ℕ∞\nμ : Measure E\ninst✝³ : BorelSpace E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : IsLocallyFiniteMeasure μ\ninst✝ : IsOpenPosMeasure μ\n⊢ HasCompactSupport (ContDiffBump.normed f μ)\n[PROOFSTEP]\nsimp only [HasCompactSupport, f.tsupport_normed_eq (μ := μ), isCompact_closedBall]\n[GOAL]\nE : Type u_1\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : HasContDiffBump E\ninst✝⁴ : MeasurableSpace E\nc : E\nf : ContDiffBump c\nx : E\nn : ℕ∞\nμ : Measure E\ninst✝³ : BorelSpace E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : IsLocallyFiniteMeasure μ\ninst✝ : IsOpenPosMeasure μ\nι : Type u_2\nφ : ι → ContDiffBump c\nl : Filter ι\nhφ : Tendsto (fun i => (φ i).rOut) l (𝓝 0)\n⊢ Tendsto (fun i => support fun x => ContDiffBump.normed (φ i) μ x) l (smallSets (𝓝 c))\n[PROOFSTEP]\nsimp_rw [NormedAddCommGroup.tendsto_nhds_zero, Real.norm_eq_abs, abs_eq_self.mpr (φ _).rOut_pos.le] at hφ \n[GOAL]\nE : Type u_1\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : HasContDiffBump E\ninst✝⁴ : MeasurableSpace E\nc : E\nf : ContDiffBump c\nx : E\nn : ℕ∞\nμ : Measure E\ninst✝³ : BorelSpace E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : IsLocallyFiniteMeasure μ\ninst✝ : IsOpenPosMeasure μ\nι : Type u_2\nφ : ι → ContDiffBump c\nl : Filter ι\nhφ : ∀ (ε : ℝ), ε > 0 → ∀ᶠ (x : ι) in l, (φ x).rOut < ε\n⊢ Tendsto (fun i => support fun x => ContDiffBump.normed (φ i) μ x) l (smallSets (𝓝 c))\n[PROOFSTEP]\nrw [nhds_basis_ball.smallSets.tendsto_right_iff]\n[GOAL]\nE : Type u_1\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : HasContDiffBump E\ninst✝⁴ : MeasurableSpace E\nc : E\nf : ContDiffBump c\nx : E\nn : ℕ∞\nμ : Measure E\ninst✝³ : BorelSpace E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : IsLocallyFiniteMeasure μ\ninst✝ : IsOpenPosMeasure μ\nι : Type u_2\nφ : ι → ContDiffBump c\nl : Filter ι\nhφ : ∀ (ε : ℝ), ε > 0 → ∀ᶠ (x : ι) in l, (φ x).rOut < ε\n⊢ ∀ (i : ℝ), 0 < i → ∀ᶠ (x : ι) in l, (support fun x_1 => ContDiffBump.normed (φ x) μ x_1) ∈ 𝒫 ball c i\n[PROOFSTEP]\nrefine fun ε hε ↦ (hφ ε hε).mono fun i hi ↦ ?_\n[GOAL]\nE : Type u_1\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : HasContDiffBump E\ninst✝⁴ : MeasurableSpace E\nc : E\nf : ContDiffBump c\nx : E\nn : ℕ∞\nμ : Measure E\ninst✝³ : BorelSpace E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : IsLocallyFiniteMeasure μ\ninst✝ : IsOpenPosMeasure μ\nι : Type u_2\nφ : ι → ContDiffBump c\nl : Filter ι\nhφ : ∀ (ε : ℝ), ε > 0 → ∀ᶠ (x : ι) in l, (φ x).rOut < ε\nε : ℝ\nhε : 0 < ε\ni : ι\nhi : (φ i).rOut < ε\n⊢ (support fun x => ContDiffBump.normed (φ i) μ x) ∈ 𝒫 ball c ε\n[PROOFSTEP]\nrw [(φ i).support_normed_eq]\n[GOAL]\nE : Type u_1\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : HasContDiffBump E\ninst✝⁴ : MeasurableSpace E\nc : E\nf : ContDiffBump c\nx : E\nn : ℕ∞\nμ : Measure E\ninst✝³ : BorelSpace E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : IsLocallyFiniteMeasure μ\ninst✝ : IsOpenPosMeasure μ\nι : Type u_2\nφ : ι → ContDiffBump c\nl : Filter ι\nhφ : ∀ (ε : ℝ), ε > 0 → ∀ᶠ (x : ι) in l, (φ x).rOut < ε\nε : ℝ\nhε : 0 < ε\ni : ι\nhi : (φ i).rOut < ε\n⊢ ball c (φ i).rOut ∈ 𝒫 ball c ε\n[PROOFSTEP]\nexact ball_subset_ball hi.le\n[GOAL]\nE : Type u_1\ninst✝¹⁰ : NormedAddCommGroup E\ninst✝⁹ : NormedSpace ℝ E\ninst✝⁸ : HasContDiffBump E\ninst✝⁷ : MeasurableSpace E\nc : E\nf : ContDiffBump c\nx : E\nn : ℕ∞\nμ : Measure E\ninst✝⁶ : BorelSpace E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : IsLocallyFiniteMeasure μ\ninst✝³ : IsOpenPosMeasure μ\nX : Type u_2\ninst✝² : NormedAddCommGroup X\ninst✝¹ : NormedSpace ℝ X\ninst✝ : CompleteSpace X\nz : X\n⊢ ∫ (x : E), ContDiffBump.normed f μ x • z ∂μ = z\n[PROOFSTEP]\nsimp_rw [integral_smul_const, f.integral_normed (μ := μ), one_smul]\n[GOAL]\nE : Type u_1\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : HasContDiffBump E\ninst✝⁴ : MeasurableSpace E\nc : E\nf : ContDiffBump c\nx : E\nn : ℕ∞\nμ : Measure E\ninst✝³ : BorelSpace E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : IsLocallyFiniteMeasure μ\ninst✝ : IsOpenPosMeasure μ\n⊢ ENNReal.toReal (↑↑μ (closedBall c f.rIn)) ≤ ∫ (x : E), ↑f x ∂μ\n[PROOFSTEP]\ncalc\n  (μ (closedBall c f.rIn)).toReal = ∫ x in closedBall c f.rIn, 1 ∂μ := by simp\n  _ = ∫ x in closedBall c f.rIn, f x ∂μ :=\n    (set_integral_congr (measurableSet_closedBall) (fun x hx ↦ (one_of_mem_closedBall f hx).symm))\n  _ ≤ ∫ x, f x ∂μ := set_integral_le_integral f.integrable (eventually_of_forall (fun x ↦ f.nonneg))\n[GOAL]\nE : Type u_1\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : HasContDiffBump E\ninst✝⁴ : MeasurableSpace E\nc : E\nf : ContDiffBump c\nx : E\nn : ℕ∞\nμ : Measure E\ninst✝³ : BorelSpace E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : IsLocallyFiniteMeasure μ\ninst✝ : IsOpenPosMeasure μ\n⊢ ENNReal.toReal (↑↑μ (closedBall c f.rIn)) = ∫ (x : E) in closedBall c f.rIn, 1 ∂μ\n[PROOFSTEP]\nsimp\n[GOAL]\nE : Type u_1\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : HasContDiffBump E\ninst✝⁴ : MeasurableSpace E\nc : E\nf : ContDiffBump c\nx✝ : E\nn : ℕ∞\nμ : Measure E\ninst✝³ : BorelSpace E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : IsLocallyFiniteMeasure μ\ninst✝ : IsOpenPosMeasure μ\nx : E\n⊢ ContDiffBump.normed f μ x ≤ 1 / ENNReal.toReal (↑↑μ (closedBall c f.rIn))\n[PROOFSTEP]\nrw [normed_def]\n[GOAL]\nE : Type u_1\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : HasContDiffBump E\ninst✝⁴ : MeasurableSpace E\nc : E\nf : ContDiffBump c\nx✝ : E\nn : ℕ∞\nμ : Measure E\ninst✝³ : BorelSpace E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : IsLocallyFiniteMeasure μ\ninst✝ : IsOpenPosMeasure μ\nx : E\n⊢ ↑f x / ∫ (x : E), ↑f x ∂μ ≤ 1 / ENNReal.toReal (↑↑μ (closedBall c f.rIn))\n[PROOFSTEP]\ngcongr\n[GOAL]\ncase hd\nE : Type u_1\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : HasContDiffBump E\ninst✝⁴ : MeasurableSpace E\nc : E\nf : ContDiffBump c\nx✝ : E\nn : ℕ∞\nμ : Measure E\ninst✝³ : BorelSpace E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : IsLocallyFiniteMeasure μ\ninst✝ : IsOpenPosMeasure μ\nx : E\n⊢ 0 < ENNReal.toReal (↑↑μ (closedBall c f.rIn))\n[PROOFSTEP]\nexact ENNReal.toReal_pos (measure_closedBall_pos _ _ f.rIn_pos).ne' measure_closedBall_lt_top.ne\n[GOAL]\ncase hac\nE : Type u_1\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : HasContDiffBump E\ninst✝⁴ : MeasurableSpace E\nc : E\nf : ContDiffBump c\nx✝ : E\nn : ℕ∞\nμ : Measure E\ninst✝³ : BorelSpace E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : IsLocallyFiniteMeasure μ\ninst✝ : IsOpenPosMeasure μ\nx : E\n⊢ ↑f x ≤ 1\n[PROOFSTEP]\nexact f.le_one\n[GOAL]\ncase hbd\nE : Type u_1\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : HasContDiffBump E\ninst✝⁴ : MeasurableSpace E\nc : E\nf : ContDiffBump c\nx✝ : E\nn : ℕ∞\nμ : Measure E\ninst✝³ : BorelSpace E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : IsLocallyFiniteMeasure μ\ninst✝ : IsOpenPosMeasure μ\nx : E\n⊢ ENNReal.toReal (↑↑μ (closedBall c f.rIn)) ≤ ∫ (x : E), ↑f x ∂μ\n[PROOFSTEP]\nexact f.measure_closedBall_le_integral μ\n[GOAL]\nE : Type u_1\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : HasContDiffBump E\ninst✝⁴ : MeasurableSpace E\nc : E\nf : ContDiffBump c\nx : E\nn : ℕ∞\nμ : Measure E\ninst✝³ : BorelSpace E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : IsLocallyFiniteMeasure μ\ninst✝ : IsOpenPosMeasure μ\n⊢ ∫ (x : E), ↑f x ∂μ ≤ ENNReal.toReal (↑↑μ (closedBall c f.rOut))\n[PROOFSTEP]\ncalc\n  ∫ x, f x ∂μ = ∫ x in closedBall c f.rOut, f x ∂μ :=\n    by\n    apply (set_integral_eq_integral_of_forall_compl_eq_zero (fun x hx ↦ ?_)).symm\n    apply f.zero_of_le_dist (le_of_lt _)\n    simpa using hx\n  _ ≤ ∫ x in closedBall c f.rOut, 1 ∂μ :=\n    by\n    apply set_integral_mono f.integrable.integrableOn _ (fun x ↦ f.le_one)\n    simp [measure_closedBall_lt_top]\n  _ = (μ (closedBall c f.rOut)).toReal := by simp\n[GOAL]\nE : Type u_1\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : HasContDiffBump E\ninst✝⁴ : MeasurableSpace E\nc : E\nf : ContDiffBump c\nx : E\nn : ℕ∞\nμ : Measure E\ninst✝³ : BorelSpace E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : IsLocallyFiniteMeasure μ\ninst✝ : IsOpenPosMeasure μ\n⊢ ∫ (x : E), ↑f x ∂μ = ∫ (x : E) in closedBall c f.rOut, ↑f x ∂μ\n[PROOFSTEP]\napply (set_integral_eq_integral_of_forall_compl_eq_zero (fun x hx ↦ ?_)).symm\n[GOAL]\nE : Type u_1\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : HasContDiffBump E\ninst✝⁴ : MeasurableSpace E\nc : E\nf : ContDiffBump c\nx✝ : E\nn : ℕ∞\nμ : Measure E\ninst✝³ : BorelSpace E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : IsLocallyFiniteMeasure μ\ninst✝ : IsOpenPosMeasure μ\nx : E\nhx : ¬x ∈ closedBall c f.rOut\n⊢ ↑f x = 0\n[PROOFSTEP]\napply f.zero_of_le_dist (le_of_lt _)\n[GOAL]\nE : Type u_1\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : HasContDiffBump E\ninst✝⁴ : MeasurableSpace E\nc : E\nf : ContDiffBump c\nx✝ : E\nn : ℕ∞\nμ : Measure E\ninst✝³ : BorelSpace E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : IsLocallyFiniteMeasure μ\ninst✝ : IsOpenPosMeasure μ\nx : E\nhx : ¬x ∈ closedBall c f.rOut\n⊢ f.rOut < dist x c\n[PROOFSTEP]\nsimpa using hx\n[GOAL]\nE : Type u_1\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : HasContDiffBump E\ninst✝⁴ : MeasurableSpace E\nc : E\nf : ContDiffBump c\nx : E\nn : ℕ∞\nμ : Measure E\ninst✝³ : BorelSpace E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : IsLocallyFiniteMeasure μ\ninst✝ : IsOpenPosMeasure μ\n⊢ ∫ (x : E) in closedBall c f.rOut, ↑f x ∂μ ≤ ∫ (x : E) in closedBall c f.rOut, 1 ∂μ\n[PROOFSTEP]\napply set_integral_mono f.integrable.integrableOn _ (fun x ↦ f.le_one)\n[GOAL]\nE : Type u_1\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : HasContDiffBump E\ninst✝⁴ : MeasurableSpace E\nc : E\nf : ContDiffBump c\nx : E\nn : ℕ∞\nμ : Measure E\ninst✝³ : BorelSpace E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : IsLocallyFiniteMeasure μ\ninst✝ : IsOpenPosMeasure μ\n⊢ IntegrableOn (fun x => 1) (closedBall c f.rOut)\n[PROOFSTEP]\nsimp [measure_closedBall_lt_top]\n[GOAL]\nE : Type u_1\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : HasContDiffBump E\ninst✝⁴ : MeasurableSpace E\nc : E\nf : ContDiffBump c\nx : E\nn : ℕ∞\nμ : Measure E\ninst✝³ : BorelSpace E\ninst✝² : FiniteDimensional ℝ E\ninst✝¹ : IsLocallyFiniteMeasure μ\ninst✝ : IsOpenPosMeasure μ\n⊢ ∫ (x : E) in closedBall c f.rOut, 1 ∂μ = ENNReal.toReal (↑↑μ (closedBall c f.rOut))\n[PROOFSTEP]\nsimp\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : HasContDiffBump E\ninst✝⁵ : MeasurableSpace E\nc : E\nf : ContDiffBump c\nx : E\nn : ℕ∞\nμ : Measure E\ninst✝⁴ : BorelSpace E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : IsLocallyFiniteMeasure μ\ninst✝¹ : IsOpenPosMeasure μ\ninst✝ : IsAddHaarMeasure μ\nK : ℝ\nh : f.rOut ≤ K * f.rIn\n⊢ ENNReal.toReal (↑↑μ (closedBall c f.rOut)) / K ^ finrank ℝ E ≤ ∫ (x : E), ↑f x ∂μ\n[PROOFSTEP]\nhave K_pos : 0 < K := by simpa [f.rIn_pos, not_lt.2 f.rIn_pos.le] using mul_pos_iff.1 (f.rOut_pos.trans_le h)\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : HasContDiffBump E\ninst✝⁵ : MeasurableSpace E\nc : E\nf : ContDiffBump c\nx : E\nn : ℕ∞\nμ : Measure E\ninst✝⁴ : BorelSpace E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : IsLocallyFiniteMeasure μ\ninst✝¹ : IsOpenPosMeasure μ\ninst✝ : IsAddHaarMeasure μ\nK : ℝ\nh : f.rOut ≤ K * f.rIn\n⊢ 0 < K\n[PROOFSTEP]\nsimpa [f.rIn_pos, not_lt.2 f.rIn_pos.le] using mul_pos_iff.1 (f.rOut_pos.trans_le h)\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : HasContDiffBump E\ninst✝⁵ : MeasurableSpace E\nc : E\nf : ContDiffBump c\nx : E\nn : ℕ∞\nμ : Measure E\ninst✝⁴ : BorelSpace E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : IsLocallyFiniteMeasure μ\ninst✝¹ : IsOpenPosMeasure μ\ninst✝ : IsAddHaarMeasure μ\nK : ℝ\nh : f.rOut ≤ K * f.rIn\nK_pos : 0 < K\n⊢ ENNReal.toReal (↑↑μ (closedBall c f.rOut)) / K ^ finrank ℝ E ≤ ∫ (x : E), ↑f x ∂μ\n[PROOFSTEP]\napply le_trans _ (f.measure_closedBall_le_integral μ)\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : HasContDiffBump E\ninst✝⁵ : MeasurableSpace E\nc : E\nf : ContDiffBump c\nx : E\nn : ℕ∞\nμ : Measure E\ninst✝⁴ : BorelSpace E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : IsLocallyFiniteMeasure μ\ninst✝¹ : IsOpenPosMeasure μ\ninst✝ : IsAddHaarMeasure μ\nK : ℝ\nh : f.rOut ≤ K * f.rIn\nK_pos : 0 < K\n⊢ ENNReal.toReal (↑↑μ (closedBall c f.rOut)) / K ^ finrank ℝ E ≤ ENNReal.toReal (↑↑μ (closedBall c f.rIn))\n[PROOFSTEP]\nrw [div_le_iff (pow_pos K_pos _), addHaar_closedBall' _ _ f.rIn_pos.le, addHaar_closedBall' _ _ f.rOut_pos.le,\n  ENNReal.toReal_mul, ENNReal.toReal_mul, ENNReal.toReal_ofReal (pow_nonneg f.rOut_pos.le _),\n  ENNReal.toReal_ofReal (pow_nonneg f.rIn_pos.le _), mul_assoc, mul_comm _ (K ^ _), ← mul_assoc, ← mul_pow,\n  mul_comm _ K]\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : HasContDiffBump E\ninst✝⁵ : MeasurableSpace E\nc : E\nf : ContDiffBump c\nx : E\nn : ℕ∞\nμ : Measure E\ninst✝⁴ : BorelSpace E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : IsLocallyFiniteMeasure μ\ninst✝¹ : IsOpenPosMeasure μ\ninst✝ : IsAddHaarMeasure μ\nK : ℝ\nh : f.rOut ≤ K * f.rIn\nK_pos : 0 < K\n⊢ f.rOut ^ finrank ℝ E * ENNReal.toReal (↑↑μ (closedBall 0 1)) ≤\n    (K * f.rIn) ^ finrank ℝ E * ENNReal.toReal (↑↑μ (closedBall 0 1))\n[PROOFSTEP]\ngcongr\n[GOAL]\ncase h.ha\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : HasContDiffBump E\ninst✝⁵ : MeasurableSpace E\nc : E\nf : ContDiffBump c\nx : E\nn : ℕ∞\nμ : Measure E\ninst✝⁴ : BorelSpace E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : IsLocallyFiniteMeasure μ\ninst✝¹ : IsOpenPosMeasure μ\ninst✝ : IsAddHaarMeasure μ\nK : ℝ\nh : f.rOut ≤ K * f.rIn\nK_pos : 0 < K\n⊢ 0 ≤ f.rOut\n[PROOFSTEP]\nexact f.rOut_pos.le\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : HasContDiffBump E\ninst✝⁵ : MeasurableSpace E\nc : E\nf : ContDiffBump c\nx✝ : E\nn : ℕ∞\nμ : Measure E\ninst✝⁴ : BorelSpace E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : IsLocallyFiniteMeasure μ\ninst✝¹ : IsOpenPosMeasure μ\ninst✝ : IsAddHaarMeasure μ\nK : ℝ\nh : f.rOut ≤ K * f.rIn\nx : E\n⊢ ContDiffBump.normed f μ x ≤ K ^ finrank ℝ E / ENNReal.toReal (↑↑μ (closedBall c f.rOut))\n[PROOFSTEP]\nhave K_pos : 0 < K := by simpa [f.rIn_pos, not_lt.2 f.rIn_pos.le] using mul_pos_iff.1 (f.rOut_pos.trans_le h)\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : HasContDiffBump E\ninst✝⁵ : MeasurableSpace E\nc : E\nf : ContDiffBump c\nx✝ : E\nn : ℕ∞\nμ : Measure E\ninst✝⁴ : BorelSpace E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : IsLocallyFiniteMeasure μ\ninst✝¹ : IsOpenPosMeasure μ\ninst✝ : IsAddHaarMeasure μ\nK : ℝ\nh : f.rOut ≤ K * f.rIn\nx : E\n⊢ 0 < K\n[PROOFSTEP]\nsimpa [f.rIn_pos, not_lt.2 f.rIn_pos.le] using mul_pos_iff.1 (f.rOut_pos.trans_le h)\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : HasContDiffBump E\ninst✝⁵ : MeasurableSpace E\nc : E\nf : ContDiffBump c\nx✝ : E\nn : ℕ∞\nμ : Measure E\ninst✝⁴ : BorelSpace E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : IsLocallyFiniteMeasure μ\ninst✝¹ : IsOpenPosMeasure μ\ninst✝ : IsAddHaarMeasure μ\nK : ℝ\nh : f.rOut ≤ K * f.rIn\nx : E\nK_pos : 0 < K\n⊢ ContDiffBump.normed f μ x ≤ K ^ finrank ℝ E / ENNReal.toReal (↑↑μ (closedBall c f.rOut))\n[PROOFSTEP]\nhave : f x / ∫ y, f y ∂μ ≤ 1 / ∫ y, f y ∂μ := by\n  gcongr\n  · exact f.integral_pos.le\n  · exact f.le_one\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : HasContDiffBump E\ninst✝⁵ : MeasurableSpace E\nc : E\nf : ContDiffBump c\nx✝ : E\nn : ℕ∞\nμ : Measure E\ninst✝⁴ : BorelSpace E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : IsLocallyFiniteMeasure μ\ninst✝¹ : IsOpenPosMeasure μ\ninst✝ : IsAddHaarMeasure μ\nK : ℝ\nh : f.rOut ≤ K * f.rIn\nx : E\nK_pos : 0 < K\n⊢ ↑f x / ∫ (y : E), ↑f y ∂μ ≤ 1 / ∫ (y : E), ↑f y ∂μ\n[PROOFSTEP]\ngcongr\n[GOAL]\ncase hc\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : HasContDiffBump E\ninst✝⁵ : MeasurableSpace E\nc : E\nf : ContDiffBump c\nx✝ : E\nn : ℕ∞\nμ : Measure E\ninst✝⁴ : BorelSpace E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : IsLocallyFiniteMeasure μ\ninst✝¹ : IsOpenPosMeasure μ\ninst✝ : IsAddHaarMeasure μ\nK : ℝ\nh : f.rOut ≤ K * f.rIn\nx : E\nK_pos : 0 < K\n⊢ 0 ≤ ∫ (y : E), ↑f y ∂μ\n[PROOFSTEP]\nexact f.integral_pos.le\n[GOAL]\ncase h\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : HasContDiffBump E\ninst✝⁵ : MeasurableSpace E\nc : E\nf : ContDiffBump c\nx✝ : E\nn : ℕ∞\nμ : Measure E\ninst✝⁴ : BorelSpace E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : IsLocallyFiniteMeasure μ\ninst✝¹ : IsOpenPosMeasure μ\ninst✝ : IsAddHaarMeasure μ\nK : ℝ\nh : f.rOut ≤ K * f.rIn\nx : E\nK_pos : 0 < K\n⊢ ↑f x ≤ 1\n[PROOFSTEP]\nexact f.le_one\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : HasContDiffBump E\ninst✝⁵ : MeasurableSpace E\nc : E\nf : ContDiffBump c\nx✝ : E\nn : ℕ∞\nμ : Measure E\ninst✝⁴ : BorelSpace E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : IsLocallyFiniteMeasure μ\ninst✝¹ : IsOpenPosMeasure μ\ninst✝ : IsAddHaarMeasure μ\nK : ℝ\nh : f.rOut ≤ K * f.rIn\nx : E\nK_pos : 0 < K\nthis : ↑f x / ∫ (y : E), ↑f y ∂μ ≤ 1 / ∫ (y : E), ↑f y ∂μ\n⊢ ContDiffBump.normed f μ x ≤ K ^ finrank ℝ E / ENNReal.toReal (↑↑μ (closedBall c f.rOut))\n[PROOFSTEP]\napply this.trans\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : HasContDiffBump E\ninst✝⁵ : MeasurableSpace E\nc : E\nf : ContDiffBump c\nx✝ : E\nn : ℕ∞\nμ : Measure E\ninst✝⁴ : BorelSpace E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : IsLocallyFiniteMeasure μ\ninst✝¹ : IsOpenPosMeasure μ\ninst✝ : IsAddHaarMeasure μ\nK : ℝ\nh : f.rOut ≤ K * f.rIn\nx : E\nK_pos : 0 < K\nthis : ↑f x / ∫ (y : E), ↑f y ∂μ ≤ 1 / ∫ (y : E), ↑f y ∂μ\n⊢ 1 / ∫ (y : E), ↑f y ∂μ ≤ K ^ finrank ℝ E / ENNReal.toReal (↑↑μ (closedBall c f.rOut))\n[PROOFSTEP]\nrw [div_le_div_iff f.integral_pos, one_mul, ← div_le_iff' (pow_pos K_pos _)]\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : HasContDiffBump E\ninst✝⁵ : MeasurableSpace E\nc : E\nf : ContDiffBump c\nx✝ : E\nn : ℕ∞\nμ : Measure E\ninst✝⁴ : BorelSpace E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : IsLocallyFiniteMeasure μ\ninst✝¹ : IsOpenPosMeasure μ\ninst✝ : IsAddHaarMeasure μ\nK : ℝ\nh : f.rOut ≤ K * f.rIn\nx : E\nK_pos : 0 < K\nthis : ↑f x / ∫ (y : E), ↑f y ∂μ ≤ 1 / ∫ (y : E), ↑f y ∂μ\n⊢ ENNReal.toReal (↑↑μ (closedBall c f.rOut)) / K ^ finrank ℝ E ≤ ∫ (x : E), ↑f x ∂μ\n[PROOFSTEP]\nexact f.measure_closedBall_div_le_integral μ K h\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : HasContDiffBump E\ninst✝⁵ : MeasurableSpace E\nc : E\nf : ContDiffBump c\nx✝ : E\nn : ℕ∞\nμ : Measure E\ninst✝⁴ : BorelSpace E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : IsLocallyFiniteMeasure μ\ninst✝¹ : IsOpenPosMeasure μ\ninst✝ : IsAddHaarMeasure μ\nK : ℝ\nh : f.rOut ≤ K * f.rIn\nx : E\nK_pos : 0 < K\nthis : ↑f x / ∫ (y : E), ↑f y ∂μ ≤ 1 / ∫ (y : E), ↑f y ∂μ\n⊢ 0 < ENNReal.toReal (↑↑μ (closedBall c f.rOut))\n[PROOFSTEP]\nexact ENNReal.toReal_pos (measure_closedBall_pos _ _ f.rOut_pos).ne' measure_closedBall_lt_top.ne\n", "meta": {"mathlib_filename": "Mathlib.Analysis.Calculus.BumpFunction.Normed", "llama_tokens": 11540, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8006920068519376, "lm_q2_score": 0.6406358411176238, "lm_q1q2_score": 0.5129519972857493}}
{"text": "[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nX : (C × D) × E\n⊢ (𝟭 ((C × D) × E)).obj X = (associator C D E ⋙ inverseAssociator C D E).obj X\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\nX : C × D × E\n⊢ (inverseAssociator C D E ⋙ associator C D E).obj X = (𝟭 (C × D × E)).obj X\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\n⊢ IsEquivalence (associativity C D E).functor\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nE : Type u₃\ninst✝ : Category.{v₃, u₃} E\n⊢ IsEquivalence (associativity C D E).inverse\n[PROOFSTEP]\ninfer_instance\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Products.Associator", "llama_tokens": 456, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8006919925839875, "lm_q2_score": 0.6406358411176238, "lm_q1q2_score": 0.512951988145189}}
{"text": "[GOAL]\nf : Natβ Natα.zero → WType Natβ\n⊢ ofNat (toNat (mk Natα.zero f)) = mk Natα.zero f\n[PROOFSTEP]\nrw [toNat, ofNat]\n[GOAL]\nf : Natβ Natα.zero → WType Natβ\n⊢ mk Natα.zero Empty.elim = mk Natα.zero f\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_f\nf : Natβ Natα.zero → WType Natβ\n⊢ Empty.elim = f\n[PROOFSTEP]\next x\n[GOAL]\ncase e_f.h\nf : Natβ Natα.zero → WType Natβ\nx : Empty\n⊢ Empty.elim x = f x\n[PROOFSTEP]\ncases x\n[GOAL]\nf : Natβ Natα.succ → WType Natβ\n⊢ ofNat (toNat (mk Natα.succ f)) = mk Natα.succ f\n[PROOFSTEP]\nsimp only [toNat, ofNat, leftInverse_nat (f ()), mk.injEq, heq_eq_eq, true_and]\n[GOAL]\nf : Natβ Natα.succ → WType Natβ\n⊢ (fun x => f ()) = f\n[PROOFSTEP]\nrfl\n[GOAL]\nn : ℕ\n⊢ toNat (ofNat (Nat.succ n)) = Nat.succ n\n[PROOFSTEP]\nrw [ofNat, toNat, rightInverse_nat n]\n[GOAL]\nγ : Type u\nf : Listβ γ Listα.nil → WType (Listβ γ)\n⊢ ofList γ (toList γ (mk Listα.nil f)) = mk Listα.nil f\n[PROOFSTEP]\nsimp only [toList, ofList, mk.injEq, heq_eq_eq, true_and]\n[GOAL]\nγ : Type u\nf : Listβ γ Listα.nil → WType (Listβ γ)\n⊢ PEmpty.elim = f\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nγ : Type u\nf : Listβ γ Listα.nil → WType (Listβ γ)\nx : PEmpty\n⊢ PEmpty.elim x = f x\n[PROOFSTEP]\ncases x\n[GOAL]\nγ : Type u\nx : γ\nf : Listβ γ (Listα.cons x) → WType (Listβ γ)\n⊢ ofList γ (toList γ (mk (Listα.cons x) f)) = mk (Listα.cons x) f\n[PROOFSTEP]\nsimp only [ofList, leftInverse_list (f PUnit.unit), mk.injEq, heq_eq_eq, true_and]\n[GOAL]\nγ : Type u\nx : γ\nf : Listβ γ (Listα.cons x) → WType (Listβ γ)\n⊢ (fun x => f PUnit.unit) = f\n[PROOFSTEP]\nrfl\n[GOAL]\nγ : Type u\nhd : γ\ntl : List γ\n⊢ toList γ (ofList γ (hd :: tl)) = hd :: tl\n[PROOFSTEP]\nsimp only [toList, rightInverse_list tl]\n", "meta": {"mathlib_filename": "Mathlib.Data.W.Constructions", "llama_tokens": 833, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7549149978955811, "lm_q2_score": 0.679178699175393, "lm_q1q2_score": 0.5127221862587154}}
{"text": "[GOAL]\nG : Type u_1\ninst✝² : NormedAddCommGroup G\ninst✝¹ : CompleteSpace G\nH : Type u_2\ninst✝ : NormedAddCommGroup H\nf : NormedAddGroupHom G H\nK : AddSubgroup H\nC ε : ℝ\nhC : 0 < C\nhε : 0 < ε\nhyp : NormedAddGroupHom.SurjectiveOnWith f K C\n⊢ NormedAddGroupHom.SurjectiveOnWith f (AddSubgroup.topologicalClosure K) (C + ε)\n[PROOFSTEP]\nrintro (h : H)\n  (h_in : h ∈ K.topologicalClosure)\n    -- We first get rid of the easy case where `h = 0`.\n[GOAL]\nG : Type u_1\ninst✝² : NormedAddCommGroup G\ninst✝¹ : CompleteSpace G\nH : Type u_2\ninst✝ : NormedAddCommGroup H\nf : NormedAddGroupHom G H\nK : AddSubgroup H\nC ε : ℝ\nhC : 0 < C\nhε : 0 < ε\nhyp : NormedAddGroupHom.SurjectiveOnWith f K C\nh : H\nh_in : h ∈ AddSubgroup.topologicalClosure K\n⊢ ∃ g, ↑f g = h ∧ ‖g‖ ≤ (C + ε) * ‖h‖\n[PROOFSTEP]\nby_cases hyp_h : h = 0\n[GOAL]\ncase pos\nG : Type u_1\ninst✝² : NormedAddCommGroup G\ninst✝¹ : CompleteSpace G\nH : Type u_2\ninst✝ : NormedAddCommGroup H\nf : NormedAddGroupHom G H\nK : AddSubgroup H\nC ε : ℝ\nhC : 0 < C\nhε : 0 < ε\nhyp : NormedAddGroupHom.SurjectiveOnWith f K C\nh : H\nh_in : h ∈ AddSubgroup.topologicalClosure K\nhyp_h : h = 0\n⊢ ∃ g, ↑f g = h ∧ ‖g‖ ≤ (C + ε) * ‖h‖\n[PROOFSTEP]\nrw [hyp_h]\n[GOAL]\ncase pos\nG : Type u_1\ninst✝² : NormedAddCommGroup G\ninst✝¹ : CompleteSpace G\nH : Type u_2\ninst✝ : NormedAddCommGroup H\nf : NormedAddGroupHom G H\nK : AddSubgroup H\nC ε : ℝ\nhC : 0 < C\nhε : 0 < ε\nhyp : NormedAddGroupHom.SurjectiveOnWith f K C\nh : H\nh_in : h ∈ AddSubgroup.topologicalClosure K\nhyp_h : h = 0\n⊢ ∃ g, ↑f g = 0 ∧ ‖g‖ ≤ (C + ε) * ‖0‖\n[PROOFSTEP]\nuse 0\n[GOAL]\ncase h\nG : Type u_1\ninst✝² : NormedAddCommGroup G\ninst✝¹ : CompleteSpace G\nH : Type u_2\ninst✝ : NormedAddCommGroup H\nf : NormedAddGroupHom G H\nK : AddSubgroup H\nC ε : ℝ\nhC : 0 < C\nhε : 0 < ε\nhyp : NormedAddGroupHom.SurjectiveOnWith f K C\nh : H\nh_in : h ∈ AddSubgroup.topologicalClosure K\nhyp_h : h = 0\n⊢ ↑f 0 = 0 ∧ ‖0‖ ≤ (C + ε) * ‖0‖\n[PROOFSTEP]\nsimp\n  /- The desired preimage will be constructed as the sum of a series. Convergence of\n      the series will be guaranteed by completeness of `G`. We first write `h` as the sum\n      of a sequence `v` of elements of `K` which starts close to `h` and then quickly goes to zero.\n      The sequence `b` below quantifies this. -/\n[GOAL]\ncase neg\nG : Type u_1\ninst✝² : NormedAddCommGroup G\ninst✝¹ : CompleteSpace G\nH : Type u_2\ninst✝ : NormedAddCommGroup H\nf : NormedAddGroupHom G H\nK : AddSubgroup H\nC ε : ℝ\nhC : 0 < C\nhε : 0 < ε\nhyp : NormedAddGroupHom.SurjectiveOnWith f K C\nh : H\nh_in : h ∈ AddSubgroup.topologicalClosure K\nhyp_h : ¬h = 0\n⊢ ∃ g, ↑f g = h ∧ ‖g‖ ≤ (C + ε) * ‖h‖\n[PROOFSTEP]\nset b : ℕ → ℝ := fun i => (1 / 2) ^ i * (ε * ‖h‖ / 2) / C\n[GOAL]\ncase neg\nG : Type u_1\ninst✝² : NormedAddCommGroup G\ninst✝¹ : CompleteSpace G\nH : Type u_2\ninst✝ : NormedAddCommGroup H\nf : NormedAddGroupHom G H\nK : AddSubgroup H\nC ε : ℝ\nhC : 0 < C\nhε : 0 < ε\nhyp : NormedAddGroupHom.SurjectiveOnWith f K C\nh : H\nh_in : h ∈ AddSubgroup.topologicalClosure K\nhyp_h : ¬h = 0\nb : ℕ → ℝ := fun i => (1 / 2) ^ i * (ε * ‖h‖ / 2) / C\n⊢ ∃ g, ↑f g = h ∧ ‖g‖ ≤ (C + ε) * ‖h‖\n[PROOFSTEP]\nhave b_pos : ∀ i, 0 < b i := by\n  intro i\n  field_simp [hC]\n  exact div_pos (mul_pos hε (norm_pos_iff.mpr hyp_h)) (mul_pos (by norm_num : (0 : ℝ) < 2 ^ i * 2) hC)\n[GOAL]\nG : Type u_1\ninst✝² : NormedAddCommGroup G\ninst✝¹ : CompleteSpace G\nH : Type u_2\ninst✝ : NormedAddCommGroup H\nf : NormedAddGroupHom G H\nK : AddSubgroup H\nC ε : ℝ\nhC : 0 < C\nhε : 0 < ε\nhyp : NormedAddGroupHom.SurjectiveOnWith f K C\nh : H\nh_in : h ∈ AddSubgroup.topologicalClosure K\nhyp_h : ¬h = 0\nb : ℕ → ℝ := fun i => (1 / 2) ^ i * (ε * ‖h‖ / 2) / C\n⊢ ∀ (i : ℕ), 0 < b i\n[PROOFSTEP]\nintro i\n[GOAL]\nG : Type u_1\ninst✝² : NormedAddCommGroup G\ninst✝¹ : CompleteSpace G\nH : Type u_2\ninst✝ : NormedAddCommGroup H\nf : NormedAddGroupHom G H\nK : AddSubgroup H\nC ε : ℝ\nhC : 0 < C\nhε : 0 < ε\nhyp : NormedAddGroupHom.SurjectiveOnWith f K C\nh : H\nh_in : h ∈ AddSubgroup.topologicalClosure K\nhyp_h : ¬h = 0\nb : ℕ → ℝ := fun i => (1 / 2) ^ i * (ε * ‖h‖ / 2) / C\ni : ℕ\n⊢ 0 < b i\n[PROOFSTEP]\nfield_simp [hC]\n[GOAL]\nG : Type u_1\ninst✝² : NormedAddCommGroup G\ninst✝¹ : CompleteSpace G\nH : Type u_2\ninst✝ : NormedAddCommGroup H\nf : NormedAddGroupHom G H\nK : AddSubgroup H\nC ε : ℝ\nhC : 0 < C\nhε : 0 < ε\nhyp : NormedAddGroupHom.SurjectiveOnWith f K C\nh : H\nh_in : h ∈ AddSubgroup.topologicalClosure K\nhyp_h : ¬h = 0\nb : ℕ → ℝ := fun i => (1 / 2) ^ i * (ε * ‖h‖ / 2) / C\ni : ℕ\n⊢ 0 < ε * ‖h‖ / (2 ^ i * 2 * C)\n[PROOFSTEP]\nexact div_pos (mul_pos hε (norm_pos_iff.mpr hyp_h)) (mul_pos (by norm_num : (0 : ℝ) < 2 ^ i * 2) hC)\n[GOAL]\nG : Type u_1\ninst✝² : NormedAddCommGroup G\ninst✝¹ : CompleteSpace G\nH : Type u_2\ninst✝ : NormedAddCommGroup H\nf : NormedAddGroupHom G H\nK : AddSubgroup H\nC ε : ℝ\nhC : 0 < C\nhε : 0 < ε\nhyp : NormedAddGroupHom.SurjectiveOnWith f K C\nh : H\nh_in : h ∈ AddSubgroup.topologicalClosure K\nhyp_h : ¬h = 0\nb : ℕ → ℝ := fun i => (1 / 2) ^ i * (ε * ‖h‖ / 2) / C\ni : ℕ\n⊢ 0 < 2 ^ i * 2\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase neg\nG : Type u_1\ninst✝² : NormedAddCommGroup G\ninst✝¹ : CompleteSpace G\nH : Type u_2\ninst✝ : NormedAddCommGroup H\nf : NormedAddGroupHom G H\nK : AddSubgroup H\nC ε : ℝ\nhC : 0 < C\nhε : 0 < ε\nhyp : NormedAddGroupHom.SurjectiveOnWith f K C\nh : H\nh_in : h ∈ AddSubgroup.topologicalClosure K\nhyp_h : ¬h = 0\nb : ℕ → ℝ := fun i => (1 / 2) ^ i * (ε * ‖h‖ / 2) / C\nb_pos : ∀ (i : ℕ), 0 < b i\n⊢ ∃ g, ↑f g = h ∧ ‖g‖ ≤ (C + ε) * ‖h‖\n[PROOFSTEP]\nobtain\n  ⟨v : ℕ → H, lim_v : Tendsto (fun n : ℕ => ∑ k in range (n + 1), v k) atTop (𝓝 h), v_in : ∀ n, v n ∈ K, hv₀ :\n    ‖v 0 - h‖ < b 0, hv : ∀ n > 0, ‖v n‖ < b n⟩ :=\n  controlled_sum_of_mem_closure h_in b_pos\n[GOAL]\ncase neg.intro.intro.intro.intro\nG : Type u_1\ninst✝² : NormedAddCommGroup G\ninst✝¹ : CompleteSpace G\nH : Type u_2\ninst✝ : NormedAddCommGroup H\nf : NormedAddGroupHom G H\nK : AddSubgroup H\nC ε : ℝ\nhC : 0 < C\nhε : 0 < ε\nhyp : NormedAddGroupHom.SurjectiveOnWith f K C\nh : H\nh_in : h ∈ AddSubgroup.topologicalClosure K\nhyp_h : ¬h = 0\nb : ℕ → ℝ := fun i => (1 / 2) ^ i * (ε * ‖h‖ / 2) / C\nb_pos : ∀ (i : ℕ), 0 < b i\nv : ℕ → H\nlim_v : Tendsto (fun n => ∑ k in range (n + 1), v k) atTop (𝓝 h)\nv_in : ∀ (n : ℕ), v n ∈ K\nhv₀ : ‖v 0 - h‖ < b 0\nhv : ∀ (n : ℕ), n > 0 → ‖v n‖ < b n\n⊢ ∃ g, ↑f g = h ∧ ‖g‖ ≤ (C + ε) * ‖h‖\n[PROOFSTEP]\nhave : ∀ n, ∃ m' : G, f m' = v n ∧ ‖m'‖ ≤ C * ‖v n‖ := fun n : ℕ => hyp (v n) (v_in n)\n[GOAL]\ncase neg.intro.intro.intro.intro\nG : Type u_1\ninst✝² : NormedAddCommGroup G\ninst✝¹ : CompleteSpace G\nH : Type u_2\ninst✝ : NormedAddCommGroup H\nf : NormedAddGroupHom G H\nK : AddSubgroup H\nC ε : ℝ\nhC : 0 < C\nhε : 0 < ε\nhyp : NormedAddGroupHom.SurjectiveOnWith f K C\nh : H\nh_in : h ∈ AddSubgroup.topologicalClosure K\nhyp_h : ¬h = 0\nb : ℕ → ℝ := fun i => (1 / 2) ^ i * (ε * ‖h‖ / 2) / C\nb_pos : ∀ (i : ℕ), 0 < b i\nv : ℕ → H\nlim_v : Tendsto (fun n => ∑ k in range (n + 1), v k) atTop (𝓝 h)\nv_in : ∀ (n : ℕ), v n ∈ K\nhv₀ : ‖v 0 - h‖ < b 0\nhv : ∀ (n : ℕ), n > 0 → ‖v n‖ < b n\nthis : ∀ (n : ℕ), ∃ m', ↑f m' = v n ∧ ‖m'‖ ≤ C * ‖v n‖\n⊢ ∃ g, ↑f g = h ∧ ‖g‖ ≤ (C + ε) * ‖h‖\n[PROOFSTEP]\nchoose u hu hnorm_u using this\n[GOAL]\ncase neg.intro.intro.intro.intro\nG : Type u_1\ninst✝² : NormedAddCommGroup G\ninst✝¹ : CompleteSpace G\nH : Type u_2\ninst✝ : NormedAddCommGroup H\nf : NormedAddGroupHom G H\nK : AddSubgroup H\nC ε : ℝ\nhC : 0 < C\nhε : 0 < ε\nhyp : NormedAddGroupHom.SurjectiveOnWith f K C\nh : H\nh_in : h ∈ AddSubgroup.topologicalClosure K\nhyp_h : ¬h = 0\nb : ℕ → ℝ := fun i => (1 / 2) ^ i * (ε * ‖h‖ / 2) / C\nb_pos : ∀ (i : ℕ), 0 < b i\nv : ℕ → H\nlim_v : Tendsto (fun n => ∑ k in range (n + 1), v k) atTop (𝓝 h)\nv_in : ∀ (n : ℕ), v n ∈ K\nhv₀ : ‖v 0 - h‖ < b 0\nhv : ∀ (n : ℕ), n > 0 → ‖v n‖ < b n\nu : ℕ → G\nhu : ∀ (n : ℕ), ↑f (u n) = v n\nhnorm_u : ∀ (n : ℕ), ‖u n‖ ≤ C * ‖v n‖\n⊢ ∃ g, ↑f g = h ∧ ‖g‖ ≤ (C + ε) * ‖h‖\n[PROOFSTEP]\nset s : ℕ → G := fun n => ∑ k in range (n + 1), u k\n[GOAL]\ncase neg.intro.intro.intro.intro\nG : Type u_1\ninst✝² : NormedAddCommGroup G\ninst✝¹ : CompleteSpace G\nH : Type u_2\ninst✝ : NormedAddCommGroup H\nf : NormedAddGroupHom G H\nK : AddSubgroup H\nC ε : ℝ\nhC : 0 < C\nhε : 0 < ε\nhyp : NormedAddGroupHom.SurjectiveOnWith f K C\nh : H\nh_in : h ∈ AddSubgroup.topologicalClosure K\nhyp_h : ¬h = 0\nb : ℕ → ℝ := fun i => (1 / 2) ^ i * (ε * ‖h‖ / 2) / C\nb_pos : ∀ (i : ℕ), 0 < b i\nv : ℕ → H\nlim_v : Tendsto (fun n => ∑ k in range (n + 1), v k) atTop (𝓝 h)\nv_in : ∀ (n : ℕ), v n ∈ K\nhv₀ : ‖v 0 - h‖ < b 0\nhv : ∀ (n : ℕ), n > 0 → ‖v n‖ < b n\nu : ℕ → G\nhu : ∀ (n : ℕ), ↑f (u n) = v n\nhnorm_u : ∀ (n : ℕ), ‖u n‖ ≤ C * ‖v n‖\ns : ℕ → G := fun n => ∑ k in range (n + 1), u k\n⊢ ∃ g, ↑f g = h ∧ ‖g‖ ≤ (C + ε) * ‖h‖\n[PROOFSTEP]\nhave : CauchySeq s :=\n  by\n  apply NormedAddCommGroup.cauchy_series_of_le_geometric'' (by norm_num) one_half_lt_one\n  rintro n (hn : n ≥ 1)\n  calc\n    ‖u n‖ ≤ C * ‖v n‖ := hnorm_u n\n    _ ≤ C * b n := by gcongr; exact (hv _ <| Nat.succ_le_iff.mp hn).le\n    _ = (1 / 2) ^ n * (ε * ‖h‖ / 2) := by simp [mul_div_cancel' _ hC.ne.symm]\n    _ = ε * ‖h‖ / 2 * (1 / 2) ^ n :=\n      mul_comm _\n        _\n          -- We now show that the limit `g` of `s` is the desired preimage.\n[GOAL]\nG : Type u_1\ninst✝² : NormedAddCommGroup G\ninst✝¹ : CompleteSpace G\nH : Type u_2\ninst✝ : NormedAddCommGroup H\nf : NormedAddGroupHom G H\nK : AddSubgroup H\nC ε : ℝ\nhC : 0 < C\nhε : 0 < ε\nhyp : NormedAddGroupHom.SurjectiveOnWith f K C\nh : H\nh_in : h ∈ AddSubgroup.topologicalClosure K\nhyp_h : ¬h = 0\nb : ℕ → ℝ := fun i => (1 / 2) ^ i * (ε * ‖h‖ / 2) / C\nb_pos : ∀ (i : ℕ), 0 < b i\nv : ℕ → H\nlim_v : Tendsto (fun n => ∑ k in range (n + 1), v k) atTop (𝓝 h)\nv_in : ∀ (n : ℕ), v n ∈ K\nhv₀ : ‖v 0 - h‖ < b 0\nhv : ∀ (n : ℕ), n > 0 → ‖v n‖ < b n\nu : ℕ → G\nhu : ∀ (n : ℕ), ↑f (u n) = v n\nhnorm_u : ∀ (n : ℕ), ‖u n‖ ≤ C * ‖v n‖\ns : ℕ → G := fun n => ∑ k in range (n + 1), u k\n⊢ CauchySeq s\n[PROOFSTEP]\napply NormedAddCommGroup.cauchy_series_of_le_geometric'' (by norm_num) one_half_lt_one\n[GOAL]\nG : Type u_1\ninst✝² : NormedAddCommGroup G\ninst✝¹ : CompleteSpace G\nH : Type u_2\ninst✝ : NormedAddCommGroup H\nf : NormedAddGroupHom G H\nK : AddSubgroup H\nC ε : ℝ\nhC : 0 < C\nhε : 0 < ε\nhyp : NormedAddGroupHom.SurjectiveOnWith f K C\nh : H\nh_in : h ∈ AddSubgroup.topologicalClosure K\nhyp_h : ¬h = 0\nb : ℕ → ℝ := fun i => (1 / 2) ^ i * (ε * ‖h‖ / 2) / C\nb_pos : ∀ (i : ℕ), 0 < b i\nv : ℕ → H\nlim_v : Tendsto (fun n => ∑ k in range (n + 1), v k) atTop (𝓝 h)\nv_in : ∀ (n : ℕ), v n ∈ K\nhv₀ : ‖v 0 - h‖ < b 0\nhv : ∀ (n : ℕ), n > 0 → ‖v n‖ < b n\nu : ℕ → G\nhu : ∀ (n : ℕ), ↑f (u n) = v n\nhnorm_u : ∀ (n : ℕ), ‖u n‖ ≤ C * ‖v n‖\ns : ℕ → G := fun n => ∑ k in range (n + 1), u k\n⊢ 0 < 1 / 2\n[PROOFSTEP]\nnorm_num\n[GOAL]\nG : Type u_1\ninst✝² : NormedAddCommGroup G\ninst✝¹ : CompleteSpace G\nH : Type u_2\ninst✝ : NormedAddCommGroup H\nf : NormedAddGroupHom G H\nK : AddSubgroup H\nC ε : ℝ\nhC : 0 < C\nhε : 0 < ε\nhyp : NormedAddGroupHom.SurjectiveOnWith f K C\nh : H\nh_in : h ∈ AddSubgroup.topologicalClosure K\nhyp_h : ¬h = 0\nb : ℕ → ℝ := fun i => (1 / 2) ^ i * (ε * ‖h‖ / 2) / C\nb_pos : ∀ (i : ℕ), 0 < b i\nv : ℕ → H\nlim_v : Tendsto (fun n => ∑ k in range (n + 1), v k) atTop (𝓝 h)\nv_in : ∀ (n : ℕ), v n ∈ K\nhv₀ : ‖v 0 - h‖ < b 0\nhv : ∀ (n : ℕ), n > 0 → ‖v n‖ < b n\nu : ℕ → G\nhu : ∀ (n : ℕ), ↑f (u n) = v n\nhnorm_u : ∀ (n : ℕ), ‖u n‖ ≤ C * ‖v n‖\ns : ℕ → G := fun n => ∑ k in range (n + 1), u k\n⊢ ∀ (n : ℕ), n ≥ ?m.14929 → ‖u n‖ ≤ ?m.14927 * (1 / 2) ^ n\nG : Type u_1\ninst✝² : NormedAddCommGroup G\ninst✝¹ : CompleteSpace G\nH : Type u_2\ninst✝ : NormedAddCommGroup H\nf : NormedAddGroupHom G H\nK : AddSubgroup H\nC ε : ℝ\nhC : 0 < C\nhε : 0 < ε\nhyp : NormedAddGroupHom.SurjectiveOnWith f K C\nh : H\nh_in : h ∈ AddSubgroup.topologicalClosure K\nhyp_h : ¬h = 0\nb : ℕ → ℝ := fun i => (1 / 2) ^ i * (ε * ‖h‖ / 2) / C\nb_pos : ∀ (i : ℕ), 0 < b i\nv : ℕ → H\nlim_v : Tendsto (fun n => ∑ k in range (n + 1), v k) atTop (𝓝 h)\nv_in : ∀ (n : ℕ), v n ∈ K\nhv₀ : ‖v 0 - h‖ < b 0\nhv : ∀ (n : ℕ), n > 0 → ‖v n‖ < b n\nu : ℕ → G\nhu : ∀ (n : ℕ), ↑f (u n) = v n\nhnorm_u : ∀ (n : ℕ), ‖u n‖ ≤ C * ‖v n‖\ns : ℕ → G := fun n => ∑ k in range (n + 1), u k\n⊢ ℝ\nG : Type u_1\ninst✝² : NormedAddCommGroup G\ninst✝¹ : CompleteSpace G\nH : Type u_2\ninst✝ : NormedAddCommGroup H\nf : NormedAddGroupHom G H\nK : AddSubgroup H\nC ε : ℝ\nhC : 0 < C\nhε : 0 < ε\nhyp : NormedAddGroupHom.SurjectiveOnWith f K C\nh : H\nh_in : h ∈ AddSubgroup.topologicalClosure K\nhyp_h : ¬h = 0\nb : ℕ → ℝ := fun i => (1 / 2) ^ i * (ε * ‖h‖ / 2) / C\nb_pos : ∀ (i : ℕ), 0 < b i\nv : ℕ → H\nlim_v : Tendsto (fun n => ∑ k in range (n + 1), v k) atTop (𝓝 h)\nv_in : ∀ (n : ℕ), v n ∈ K\nhv₀ : ‖v 0 - h‖ < b 0\nhv : ∀ (n : ℕ), n > 0 → ‖v n‖ < b n\nu : ℕ → G\nhu : ∀ (n : ℕ), ↑f (u n) = v n\nhnorm_u : ∀ (n : ℕ), ‖u n‖ ≤ C * ‖v n‖\ns : ℕ → G := fun n => ∑ k in range (n + 1), u k\n⊢ ℕ\n[PROOFSTEP]\nrintro n (hn : n ≥ 1)\n[GOAL]\nG : Type u_1\ninst✝² : NormedAddCommGroup G\ninst✝¹ : CompleteSpace G\nH : Type u_2\ninst✝ : NormedAddCommGroup H\nf : NormedAddGroupHom G H\nK : AddSubgroup H\nC ε : ℝ\nhC : 0 < C\nhε : 0 < ε\nhyp : NormedAddGroupHom.SurjectiveOnWith f K C\nh : H\nh_in : h ∈ AddSubgroup.topologicalClosure K\nhyp_h : ¬h = 0\nb : ℕ → ℝ := fun i => (1 / 2) ^ i * (ε * ‖h‖ / 2) / C\nb_pos : ∀ (i : ℕ), 0 < b i\nv : ℕ → H\nlim_v : Tendsto (fun n => ∑ k in range (n + 1), v k) atTop (𝓝 h)\nv_in : ∀ (n : ℕ), v n ∈ K\nhv₀ : ‖v 0 - h‖ < b 0\nhv : ∀ (n : ℕ), n > 0 → ‖v n‖ < b n\nu : ℕ → G\nhu : ∀ (n : ℕ), ↑f (u n) = v n\nhnorm_u : ∀ (n : ℕ), ‖u n‖ ≤ C * ‖v n‖\ns : ℕ → G := fun n => ∑ k in range (n + 1), u k\nn : ℕ\nhn : n ≥ 1\n⊢ ‖u n‖ ≤ ?m.14927 * (1 / 2) ^ n\nG : Type u_1\ninst✝² : NormedAddCommGroup G\ninst✝¹ : CompleteSpace G\nH : Type u_2\ninst✝ : NormedAddCommGroup H\nf : NormedAddGroupHom G H\nK : AddSubgroup H\nC ε : ℝ\nhC : 0 < C\nhε : 0 < ε\nhyp : NormedAddGroupHom.SurjectiveOnWith f K C\nh : H\nh_in : h ∈ AddSubgroup.topologicalClosure K\nhyp_h : ¬h = 0\nb : ℕ → ℝ := fun i => (1 / 2) ^ i * (ε * ‖h‖ / 2) / C\nb_pos : ∀ (i : ℕ), 0 < b i\nv : ℕ → H\nlim_v : Tendsto (fun n => ∑ k in range (n + 1), v k) atTop (𝓝 h)\nv_in : ∀ (n : ℕ), v n ∈ K\nhv₀ : ‖v 0 - h‖ < b 0\nhv : ∀ (n : ℕ), n > 0 → ‖v n‖ < b n\nu : ℕ → G\nhu : ∀ (n : ℕ), ↑f (u n) = v n\nhnorm_u : ∀ (n : ℕ), ‖u n‖ ≤ C * ‖v n‖\ns : ℕ → G := fun n => ∑ k in range (n + 1), u k\n⊢ ℝ\n[PROOFSTEP]\ncalc\n  ‖u n‖ ≤ C * ‖v n‖ := hnorm_u n\n  _ ≤ C * b n := by gcongr; exact (hv _ <| Nat.succ_le_iff.mp hn).le\n  _ = (1 / 2) ^ n * (ε * ‖h‖ / 2) := by simp [mul_div_cancel' _ hC.ne.symm]\n  _ = ε * ‖h‖ / 2 * (1 / 2) ^ n :=\n    mul_comm _\n      _\n        -- We now show that the limit `g` of `s` is the desired preimage.\n[GOAL]\nG : Type u_1\ninst✝² : NormedAddCommGroup G\ninst✝¹ : CompleteSpace G\nH : Type u_2\ninst✝ : NormedAddCommGroup H\nf : NormedAddGroupHom G H\nK : AddSubgroup H\nC ε : ℝ\nhC : 0 < C\nhε : 0 < ε\nhyp : NormedAddGroupHom.SurjectiveOnWith f K C\nh : H\nh_in : h ∈ AddSubgroup.topologicalClosure K\nhyp_h : ¬h = 0\nb : ℕ → ℝ := fun i => (1 / 2) ^ i * (ε * ‖h‖ / 2) / C\nb_pos : ∀ (i : ℕ), 0 < b i\nv : ℕ → H\nlim_v : Tendsto (fun n => ∑ k in range (n + 1), v k) atTop (𝓝 h)\nv_in : ∀ (n : ℕ), v n ∈ K\nhv₀ : ‖v 0 - h‖ < b 0\nhv : ∀ (n : ℕ), n > 0 → ‖v n‖ < b n\nu : ℕ → G\nhu : ∀ (n : ℕ), ↑f (u n) = v n\nhnorm_u : ∀ (n : ℕ), ‖u n‖ ≤ C * ‖v n‖\ns : ℕ → G := fun n => ∑ k in range (n + 1), u k\nn : ℕ\nhn : n ≥ 1\n⊢ C * ‖v n‖ ≤ C * b n\n[PROOFSTEP]\ngcongr\n[GOAL]\ncase h\nG : Type u_1\ninst✝² : NormedAddCommGroup G\ninst✝¹ : CompleteSpace G\nH : Type u_2\ninst✝ : NormedAddCommGroup H\nf : NormedAddGroupHom G H\nK : AddSubgroup H\nC ε : ℝ\nhC : 0 < C\nhε : 0 < ε\nhyp : NormedAddGroupHom.SurjectiveOnWith f K C\nh : H\nh_in : h ∈ AddSubgroup.topologicalClosure K\nhyp_h : ¬h = 0\nb : ℕ → ℝ := fun i => (1 / 2) ^ i * (ε * ‖h‖ / 2) / C\nb_pos : ∀ (i : ℕ), 0 < b i\nv : ℕ → H\nlim_v : Tendsto (fun n => ∑ k in range (n + 1), v k) atTop (𝓝 h)\nv_in : ∀ (n : ℕ), v n ∈ K\nhv₀ : ‖v 0 - h‖ < b 0\nhv : ∀ (n : ℕ), n > 0 → ‖v n‖ < b n\nu : ℕ → G\nhu : ∀ (n : ℕ), ↑f (u n) = v n\nhnorm_u : ∀ (n : ℕ), ‖u n‖ ≤ C * ‖v n‖\ns : ℕ → G := fun n => ∑ k in range (n + 1), u k\nn : ℕ\nhn : n ≥ 1\n⊢ ‖v n‖ ≤ b n\n[PROOFSTEP]\nexact (hv _ <| Nat.succ_le_iff.mp hn).le\n[GOAL]\nG : Type u_1\ninst✝² : NormedAddCommGroup G\ninst✝¹ : CompleteSpace G\nH : Type u_2\ninst✝ : NormedAddCommGroup H\nf : NormedAddGroupHom G H\nK : AddSubgroup H\nC ε : ℝ\nhC : 0 < C\nhε : 0 < ε\nhyp : NormedAddGroupHom.SurjectiveOnWith f K C\nh : H\nh_in : h ∈ AddSubgroup.topologicalClosure K\nhyp_h : ¬h = 0\nb : ℕ → ℝ := fun i => (1 / 2) ^ i * (ε * ‖h‖ / 2) / C\nb_pos : ∀ (i : ℕ), 0 < b i\nv : ℕ → H\nlim_v : Tendsto (fun n => ∑ k in range (n + 1), v k) atTop (𝓝 h)\nv_in : ∀ (n : ℕ), v n ∈ K\nhv₀ : ‖v 0 - h‖ < b 0\nhv : ∀ (n : ℕ), n > 0 → ‖v n‖ < b n\nu : ℕ → G\nhu : ∀ (n : ℕ), ↑f (u n) = v n\nhnorm_u : ∀ (n : ℕ), ‖u n‖ ≤ C * ‖v n‖\ns : ℕ → G := fun n => ∑ k in range (n + 1), u k\nn : ℕ\nhn : n ≥ 1\n⊢ C * b n = (1 / 2) ^ n * (ε * ‖h‖ / 2)\n[PROOFSTEP]\nsimp [mul_div_cancel' _ hC.ne.symm]\n[GOAL]\ncase neg.intro.intro.intro.intro\nG : Type u_1\ninst✝² : NormedAddCommGroup G\ninst✝¹ : CompleteSpace G\nH : Type u_2\ninst✝ : NormedAddCommGroup H\nf : NormedAddGroupHom G H\nK : AddSubgroup H\nC ε : ℝ\nhC : 0 < C\nhε : 0 < ε\nhyp : NormedAddGroupHom.SurjectiveOnWith f K C\nh : H\nh_in : h ∈ AddSubgroup.topologicalClosure K\nhyp_h : ¬h = 0\nb : ℕ → ℝ := fun i => (1 / 2) ^ i * (ε * ‖h‖ / 2) / C\nb_pos : ∀ (i : ℕ), 0 < b i\nv : ℕ → H\nlim_v : Tendsto (fun n => ∑ k in range (n + 1), v k) atTop (𝓝 h)\nv_in : ∀ (n : ℕ), v n ∈ K\nhv₀ : ‖v 0 - h‖ < b 0\nhv : ∀ (n : ℕ), n > 0 → ‖v n‖ < b n\nu : ℕ → G\nhu : ∀ (n : ℕ), ↑f (u n) = v n\nhnorm_u : ∀ (n : ℕ), ‖u n‖ ≤ C * ‖v n‖\ns : ℕ → G := fun n => ∑ k in range (n + 1), u k\nthis : CauchySeq s\n⊢ ∃ g, ↑f g = h ∧ ‖g‖ ≤ (C + ε) * ‖h‖\n[PROOFSTEP]\nobtain ⟨g : G, hg⟩ := cauchySeq_tendsto_of_complete this\n[GOAL]\ncase neg.intro.intro.intro.intro.intro\nG : Type u_1\ninst✝² : NormedAddCommGroup G\ninst✝¹ : CompleteSpace G\nH : Type u_2\ninst✝ : NormedAddCommGroup H\nf : NormedAddGroupHom G H\nK : AddSubgroup H\nC ε : ℝ\nhC : 0 < C\nhε : 0 < ε\nhyp : NormedAddGroupHom.SurjectiveOnWith f K C\nh : H\nh_in : h ∈ AddSubgroup.topologicalClosure K\nhyp_h : ¬h = 0\nb : ℕ → ℝ := fun i => (1 / 2) ^ i * (ε * ‖h‖ / 2) / C\nb_pos : ∀ (i : ℕ), 0 < b i\nv : ℕ → H\nlim_v : Tendsto (fun n => ∑ k in range (n + 1), v k) atTop (𝓝 h)\nv_in : ∀ (n : ℕ), v n ∈ K\nhv₀ : ‖v 0 - h‖ < b 0\nhv : ∀ (n : ℕ), n > 0 → ‖v n‖ < b n\nu : ℕ → G\nhu : ∀ (n : ℕ), ↑f (u n) = v n\nhnorm_u : ∀ (n : ℕ), ‖u n‖ ≤ C * ‖v n‖\ns : ℕ → G := fun n => ∑ k in range (n + 1), u k\nthis : CauchySeq s\ng : G\nhg : Tendsto s atTop (𝓝 g)\n⊢ ∃ g, ↑f g = h ∧ ‖g‖ ≤ (C + ε) * ‖h‖\n[PROOFSTEP]\nrefine' ⟨g, _, _⟩\n[GOAL]\ncase neg.intro.intro.intro.intro.intro.refine'_1\nG : Type u_1\ninst✝² : NormedAddCommGroup G\ninst✝¹ : CompleteSpace G\nH : Type u_2\ninst✝ : NormedAddCommGroup H\nf : NormedAddGroupHom G H\nK : AddSubgroup H\nC ε : ℝ\nhC : 0 < C\nhε : 0 < ε\nhyp : NormedAddGroupHom.SurjectiveOnWith f K C\nh : H\nh_in : h ∈ AddSubgroup.topologicalClosure K\nhyp_h : ¬h = 0\nb : ℕ → ℝ := fun i => (1 / 2) ^ i * (ε * ‖h‖ / 2) / C\nb_pos : ∀ (i : ℕ), 0 < b i\nv : ℕ → H\nlim_v : Tendsto (fun n => ∑ k in range (n + 1), v k) atTop (𝓝 h)\nv_in : ∀ (n : ℕ), v n ∈ K\nhv₀ : ‖v 0 - h‖ < b 0\nhv : ∀ (n : ℕ), n > 0 → ‖v n‖ < b n\nu : ℕ → G\nhu : ∀ (n : ℕ), ↑f (u n) = v n\nhnorm_u : ∀ (n : ℕ), ‖u n‖ ≤ C * ‖v n‖\ns : ℕ → G := fun n => ∑ k in range (n + 1), u k\nthis : CauchySeq s\ng : G\nhg : Tendsto s atTop (𝓝 g)\n⊢ ↑f g = h\n[PROOFSTEP]\nhave : f ∘ s = fun n => ∑ k in range (n + 1), v k := by\n  ext n\n  simp [map_sum, hu]\n    /- In the above equality, the left-hand-side converges to `f g` by continuity of `f` and\n          definition of `g` while the right-hand-side converges to `h` by construction of `v` so\n          `g` is indeed a preimage of `h`. -/\n[GOAL]\nG : Type u_1\ninst✝² : NormedAddCommGroup G\ninst✝¹ : CompleteSpace G\nH : Type u_2\ninst✝ : NormedAddCommGroup H\nf : NormedAddGroupHom G H\nK : AddSubgroup H\nC ε : ℝ\nhC : 0 < C\nhε : 0 < ε\nhyp : NormedAddGroupHom.SurjectiveOnWith f K C\nh : H\nh_in : h ∈ AddSubgroup.topologicalClosure K\nhyp_h : ¬h = 0\nb : ℕ → ℝ := fun i => (1 / 2) ^ i * (ε * ‖h‖ / 2) / C\nb_pos : ∀ (i : ℕ), 0 < b i\nv : ℕ → H\nlim_v : Tendsto (fun n => ∑ k in range (n + 1), v k) atTop (𝓝 h)\nv_in : ∀ (n : ℕ), v n ∈ K\nhv₀ : ‖v 0 - h‖ < b 0\nhv : ∀ (n : ℕ), n > 0 → ‖v n‖ < b n\nu : ℕ → G\nhu : ∀ (n : ℕ), ↑f (u n) = v n\nhnorm_u : ∀ (n : ℕ), ‖u n‖ ≤ C * ‖v n‖\ns : ℕ → G := fun n => ∑ k in range (n + 1), u k\nthis : CauchySeq s\ng : G\nhg : Tendsto s atTop (𝓝 g)\n⊢ ↑f ∘ s = fun n => ∑ k in range (n + 1), v k\n[PROOFSTEP]\next n\n[GOAL]\ncase h\nG : Type u_1\ninst✝² : NormedAddCommGroup G\ninst✝¹ : CompleteSpace G\nH : Type u_2\ninst✝ : NormedAddCommGroup H\nf : NormedAddGroupHom G H\nK : AddSubgroup H\nC ε : ℝ\nhC : 0 < C\nhε : 0 < ε\nhyp : NormedAddGroupHom.SurjectiveOnWith f K C\nh : H\nh_in : h ∈ AddSubgroup.topologicalClosure K\nhyp_h : ¬h = 0\nb : ℕ → ℝ := fun i => (1 / 2) ^ i * (ε * ‖h‖ / 2) / C\nb_pos : ∀ (i : ℕ), 0 < b i\nv : ℕ → H\nlim_v : Tendsto (fun n => ∑ k in range (n + 1), v k) atTop (𝓝 h)\nv_in : ∀ (n : ℕ), v n ∈ K\nhv₀ : ‖v 0 - h‖ < b 0\nhv : ∀ (n : ℕ), n > 0 → ‖v n‖ < b n\nu : ℕ → G\nhu : ∀ (n : ℕ), ↑f (u n) = v n\nhnorm_u : ∀ (n : ℕ), ‖u n‖ ≤ C * ‖v n‖\ns : ℕ → G := fun n => ∑ k in range (n + 1), u k\nthis : CauchySeq s\ng : G\nhg : Tendsto s atTop (𝓝 g)\nn : ℕ\n⊢ (↑f ∘ s) n = ∑ k in range (n + 1), v k\n[PROOFSTEP]\nsimp [map_sum, hu]\n  /- In the above equality, the left-hand-side converges to `f g` by continuity of `f` and\n        definition of `g` while the right-hand-side converges to `h` by construction of `v` so\n        `g` is indeed a preimage of `h`. -/\n[GOAL]\ncase neg.intro.intro.intro.intro.intro.refine'_1\nG : Type u_1\ninst✝² : NormedAddCommGroup G\ninst✝¹ : CompleteSpace G\nH : Type u_2\ninst✝ : NormedAddCommGroup H\nf : NormedAddGroupHom G H\nK : AddSubgroup H\nC ε : ℝ\nhC : 0 < C\nhε : 0 < ε\nhyp : NormedAddGroupHom.SurjectiveOnWith f K C\nh : H\nh_in : h ∈ AddSubgroup.topologicalClosure K\nhyp_h : ¬h = 0\nb : ℕ → ℝ := fun i => (1 / 2) ^ i * (ε * ‖h‖ / 2) / C\nb_pos : ∀ (i : ℕ), 0 < b i\nv : ℕ → H\nlim_v : Tendsto (fun n => ∑ k in range (n + 1), v k) atTop (𝓝 h)\nv_in : ∀ (n : ℕ), v n ∈ K\nhv₀ : ‖v 0 - h‖ < b 0\nhv : ∀ (n : ℕ), n > 0 → ‖v n‖ < b n\nu : ℕ → G\nhu : ∀ (n : ℕ), ↑f (u n) = v n\nhnorm_u : ∀ (n : ℕ), ‖u n‖ ≤ C * ‖v n‖\ns : ℕ → G := fun n => ∑ k in range (n + 1), u k\nthis✝ : CauchySeq s\ng : G\nhg : Tendsto s atTop (𝓝 g)\nthis : ↑f ∘ s = fun n => ∑ k in range (n + 1), v k\n⊢ ↑f g = h\n[PROOFSTEP]\nrw [← this] at lim_v \n[GOAL]\ncase neg.intro.intro.intro.intro.intro.refine'_1\nG : Type u_1\ninst✝² : NormedAddCommGroup G\ninst✝¹ : CompleteSpace G\nH : Type u_2\ninst✝ : NormedAddCommGroup H\nf : NormedAddGroupHom G H\nK : AddSubgroup H\nC ε : ℝ\nhC : 0 < C\nhε : 0 < ε\nhyp : NormedAddGroupHom.SurjectiveOnWith f K C\nh : H\nh_in : h ∈ AddSubgroup.topologicalClosure K\nhyp_h : ¬h = 0\nb : ℕ → ℝ := fun i => (1 / 2) ^ i * (ε * ‖h‖ / 2) / C\nb_pos : ∀ (i : ℕ), 0 < b i\nv : ℕ → H\nv_in : ∀ (n : ℕ), v n ∈ K\nhv₀ : ‖v 0 - h‖ < b 0\nhv : ∀ (n : ℕ), n > 0 → ‖v n‖ < b n\nu : ℕ → G\nhu : ∀ (n : ℕ), ↑f (u n) = v n\nhnorm_u : ∀ (n : ℕ), ‖u n‖ ≤ C * ‖v n‖\ns : ℕ → G := fun n => ∑ k in range (n + 1), u k\nlim_v : Tendsto (↑f ∘ s) atTop (𝓝 h)\nthis✝ : CauchySeq s\ng : G\nhg : Tendsto s atTop (𝓝 g)\nthis : ↑f ∘ s = fun n => ∑ k in range (n + 1), v k\n⊢ ↑f g = h\n[PROOFSTEP]\nexact tendsto_nhds_unique ((f.continuous.tendsto g).comp hg) lim_v\n[GOAL]\ncase neg.intro.intro.intro.intro.intro.refine'_2\nG : Type u_1\ninst✝² : NormedAddCommGroup G\ninst✝¹ : CompleteSpace G\nH : Type u_2\ninst✝ : NormedAddCommGroup H\nf : NormedAddGroupHom G H\nK : AddSubgroup H\nC ε : ℝ\nhC : 0 < C\nhε : 0 < ε\nhyp : NormedAddGroupHom.SurjectiveOnWith f K C\nh : H\nh_in : h ∈ AddSubgroup.topologicalClosure K\nhyp_h : ¬h = 0\nb : ℕ → ℝ := fun i => (1 / 2) ^ i * (ε * ‖h‖ / 2) / C\nb_pos : ∀ (i : ℕ), 0 < b i\nv : ℕ → H\nlim_v : Tendsto (fun n => ∑ k in range (n + 1), v k) atTop (𝓝 h)\nv_in : ∀ (n : ℕ), v n ∈ K\nhv₀ : ‖v 0 - h‖ < b 0\nhv : ∀ (n : ℕ), n > 0 → ‖v n‖ < b n\nu : ℕ → G\nhu : ∀ (n : ℕ), ↑f (u n) = v n\nhnorm_u : ∀ (n : ℕ), ‖u n‖ ≤ C * ‖v n‖\ns : ℕ → G := fun n => ∑ k in range (n + 1), u k\nthis : CauchySeq s\ng : G\nhg : Tendsto s atTop (𝓝 g)\n⊢ ‖g‖ ≤ (C + ε) * ‖h‖\n[PROOFSTEP]\nsuffices : ∀ n, ‖s n‖ ≤ (C + ε) * ‖h‖\n[GOAL]\ncase neg.intro.intro.intro.intro.intro.refine'_2\nG : Type u_1\ninst✝² : NormedAddCommGroup G\ninst✝¹ : CompleteSpace G\nH : Type u_2\ninst✝ : NormedAddCommGroup H\nf : NormedAddGroupHom G H\nK : AddSubgroup H\nC ε : ℝ\nhC : 0 < C\nhε : 0 < ε\nhyp : NormedAddGroupHom.SurjectiveOnWith f K C\nh : H\nh_in : h ∈ AddSubgroup.topologicalClosure K\nhyp_h : ¬h = 0\nb : ℕ → ℝ := fun i => (1 / 2) ^ i * (ε * ‖h‖ / 2) / C\nb_pos : ∀ (i : ℕ), 0 < b i\nv : ℕ → H\nlim_v : Tendsto (fun n => ∑ k in range (n + 1), v k) atTop (𝓝 h)\nv_in : ∀ (n : ℕ), v n ∈ K\nhv₀ : ‖v 0 - h‖ < b 0\nhv : ∀ (n : ℕ), n > 0 → ‖v n‖ < b n\nu : ℕ → G\nhu : ∀ (n : ℕ), ↑f (u n) = v n\nhnorm_u : ∀ (n : ℕ), ‖u n‖ ≤ C * ‖v n‖\ns : ℕ → G := fun n => ∑ k in range (n + 1), u k\nthis✝ : CauchySeq s\ng : G\nhg : Tendsto s atTop (𝓝 g)\nthis : ∀ (n : ℕ), ‖s n‖ ≤ (C + ε) * ‖h‖\n⊢ ‖g‖ ≤ (C + ε) * ‖h‖\ncase this\nG : Type u_1\ninst✝² : NormedAddCommGroup G\ninst✝¹ : CompleteSpace G\nH : Type u_2\ninst✝ : NormedAddCommGroup H\nf : NormedAddGroupHom G H\nK : AddSubgroup H\nC ε : ℝ\nhC : 0 < C\nhε : 0 < ε\nhyp : NormedAddGroupHom.SurjectiveOnWith f K C\nh : H\nh_in : h ∈ AddSubgroup.topologicalClosure K\nhyp_h : ¬h = 0\nb : ℕ → ℝ := fun i => (1 / 2) ^ i * (ε * ‖h‖ / 2) / C\nb_pos : ∀ (i : ℕ), 0 < b i\nv : ℕ → H\nlim_v : Tendsto (fun n => ∑ k in range (n + 1), v k) atTop (𝓝 h)\nv_in : ∀ (n : ℕ), v n ∈ K\nhv₀ : ‖v 0 - h‖ < b 0\nhv : ∀ (n : ℕ), n > 0 → ‖v n‖ < b n\nu : ℕ → G\nhu : ∀ (n : ℕ), ↑f (u n) = v n\nhnorm_u : ∀ (n : ℕ), ‖u n‖ ≤ C * ‖v n‖\ns : ℕ → G := fun n => ∑ k in range (n + 1), u k\nthis : CauchySeq s\ng : G\nhg : Tendsto s atTop (𝓝 g)\n⊢ ∀ (n : ℕ), ‖s n‖ ≤ (C + ε) * ‖h‖\n[PROOFSTEP]\nexact le_of_tendsto' (continuous_norm.continuousAt.tendsto.comp hg) this\n[GOAL]\ncase this\nG : Type u_1\ninst✝² : NormedAddCommGroup G\ninst✝¹ : CompleteSpace G\nH : Type u_2\ninst✝ : NormedAddCommGroup H\nf : NormedAddGroupHom G H\nK : AddSubgroup H\nC ε : ℝ\nhC : 0 < C\nhε : 0 < ε\nhyp : NormedAddGroupHom.SurjectiveOnWith f K C\nh : H\nh_in : h ∈ AddSubgroup.topologicalClosure K\nhyp_h : ¬h = 0\nb : ℕ → ℝ := fun i => (1 / 2) ^ i * (ε * ‖h‖ / 2) / C\nb_pos : ∀ (i : ℕ), 0 < b i\nv : ℕ → H\nlim_v : Tendsto (fun n => ∑ k in range (n + 1), v k) atTop (𝓝 h)\nv_in : ∀ (n : ℕ), v n ∈ K\nhv₀ : ‖v 0 - h‖ < b 0\nhv : ∀ (n : ℕ), n > 0 → ‖v n‖ < b n\nu : ℕ → G\nhu : ∀ (n : ℕ), ↑f (u n) = v n\nhnorm_u : ∀ (n : ℕ), ‖u n‖ ≤ C * ‖v n‖\ns : ℕ → G := fun n => ∑ k in range (n + 1), u k\nthis : CauchySeq s\ng : G\nhg : Tendsto s atTop (𝓝 g)\n⊢ ∀ (n : ℕ), ‖s n‖ ≤ (C + ε) * ‖h‖\n[PROOFSTEP]\nintro n\n[GOAL]\ncase this\nG : Type u_1\ninst✝² : NormedAddCommGroup G\ninst✝¹ : CompleteSpace G\nH : Type u_2\ninst✝ : NormedAddCommGroup H\nf : NormedAddGroupHom G H\nK : AddSubgroup H\nC ε : ℝ\nhC : 0 < C\nhε : 0 < ε\nhyp : NormedAddGroupHom.SurjectiveOnWith f K C\nh : H\nh_in : h ∈ AddSubgroup.topologicalClosure K\nhyp_h : ¬h = 0\nb : ℕ → ℝ := fun i => (1 / 2) ^ i * (ε * ‖h‖ / 2) / C\nb_pos : ∀ (i : ℕ), 0 < b i\nv : ℕ → H\nlim_v : Tendsto (fun n => ∑ k in range (n + 1), v k) atTop (𝓝 h)\nv_in : ∀ (n : ℕ), v n ∈ K\nhv₀ : ‖v 0 - h‖ < b 0\nhv : ∀ (n : ℕ), n > 0 → ‖v n‖ < b n\nu : ℕ → G\nhu : ∀ (n : ℕ), ↑f (u n) = v n\nhnorm_u : ∀ (n : ℕ), ‖u n‖ ≤ C * ‖v n‖\ns : ℕ → G := fun n => ∑ k in range (n + 1), u k\nthis : CauchySeq s\ng : G\nhg : Tendsto s atTop (𝓝 g)\nn : ℕ\n⊢ ‖s n‖ ≤ (C + ε) * ‖h‖\n[PROOFSTEP]\nhave hnorm₀ : ‖u 0‖ ≤ C * b 0 + C * ‖h‖ :=\n  by\n  have :=\n    calc\n      ‖v 0‖ ≤ ‖h‖ + ‖v 0 - h‖ := norm_le_insert' _ _\n      _ ≤ ‖h‖ + b 0 := by gcongr\n  calc\n    ‖u 0‖ ≤ C * ‖v 0‖ := hnorm_u 0\n    _ ≤ C * (‖h‖ + b 0) := by gcongr\n    _ = C * b 0 + C * ‖h‖ := by rw [add_comm, mul_add]\n[GOAL]\nG : Type u_1\ninst✝² : NormedAddCommGroup G\ninst✝¹ : CompleteSpace G\nH : Type u_2\ninst✝ : NormedAddCommGroup H\nf : NormedAddGroupHom G H\nK : AddSubgroup H\nC ε : ℝ\nhC : 0 < C\nhε : 0 < ε\nhyp : NormedAddGroupHom.SurjectiveOnWith f K C\nh : H\nh_in : h ∈ AddSubgroup.topologicalClosure K\nhyp_h : ¬h = 0\nb : ℕ → ℝ := fun i => (1 / 2) ^ i * (ε * ‖h‖ / 2) / C\nb_pos : ∀ (i : ℕ), 0 < b i\nv : ℕ → H\nlim_v : Tendsto (fun n => ∑ k in range (n + 1), v k) atTop (𝓝 h)\nv_in : ∀ (n : ℕ), v n ∈ K\nhv₀ : ‖v 0 - h‖ < b 0\nhv : ∀ (n : ℕ), n > 0 → ‖v n‖ < b n\nu : ℕ → G\nhu : ∀ (n : ℕ), ↑f (u n) = v n\nhnorm_u : ∀ (n : ℕ), ‖u n‖ ≤ C * ‖v n‖\ns : ℕ → G := fun n => ∑ k in range (n + 1), u k\nthis : CauchySeq s\ng : G\nhg : Tendsto s atTop (𝓝 g)\nn : ℕ\n⊢ ‖u 0‖ ≤ C * b 0 + C * ‖h‖\n[PROOFSTEP]\nhave :=\n  calc\n    ‖v 0‖ ≤ ‖h‖ + ‖v 0 - h‖ := norm_le_insert' _ _\n    _ ≤ ‖h‖ + b 0 := by gcongr\n[GOAL]\nG : Type u_1\ninst✝² : NormedAddCommGroup G\ninst✝¹ : CompleteSpace G\nH : Type u_2\ninst✝ : NormedAddCommGroup H\nf : NormedAddGroupHom G H\nK : AddSubgroup H\nC ε : ℝ\nhC : 0 < C\nhε : 0 < ε\nhyp : NormedAddGroupHom.SurjectiveOnWith f K C\nh : H\nh_in : h ∈ AddSubgroup.topologicalClosure K\nhyp_h : ¬h = 0\nb : ℕ → ℝ := fun i => (1 / 2) ^ i * (ε * ‖h‖ / 2) / C\nb_pos : ∀ (i : ℕ), 0 < b i\nv : ℕ → H\nlim_v : Tendsto (fun n => ∑ k in range (n + 1), v k) atTop (𝓝 h)\nv_in : ∀ (n : ℕ), v n ∈ K\nhv₀ : ‖v 0 - h‖ < b 0\nhv : ∀ (n : ℕ), n > 0 → ‖v n‖ < b n\nu : ℕ → G\nhu : ∀ (n : ℕ), ↑f (u n) = v n\nhnorm_u : ∀ (n : ℕ), ‖u n‖ ≤ C * ‖v n‖\ns : ℕ → G := fun n => ∑ k in range (n + 1), u k\nthis : CauchySeq s\ng : G\nhg : Tendsto s atTop (𝓝 g)\nn : ℕ\n⊢ ‖h‖ + ‖v 0 - h‖ ≤ ‖h‖ + b 0\n[PROOFSTEP]\ngcongr\n[GOAL]\nG : Type u_1\ninst✝² : NormedAddCommGroup G\ninst✝¹ : CompleteSpace G\nH : Type u_2\ninst✝ : NormedAddCommGroup H\nf : NormedAddGroupHom G H\nK : AddSubgroup H\nC ε : ℝ\nhC : 0 < C\nhε : 0 < ε\nhyp : NormedAddGroupHom.SurjectiveOnWith f K C\nh : H\nh_in : h ∈ AddSubgroup.topologicalClosure K\nhyp_h : ¬h = 0\nb : ℕ → ℝ := fun i => (1 / 2) ^ i * (ε * ‖h‖ / 2) / C\nb_pos : ∀ (i : ℕ), 0 < b i\nv : ℕ → H\nlim_v : Tendsto (fun n => ∑ k in range (n + 1), v k) atTop (𝓝 h)\nv_in : ∀ (n : ℕ), v n ∈ K\nhv₀ : ‖v 0 - h‖ < b 0\nhv : ∀ (n : ℕ), n > 0 → ‖v n‖ < b n\nu : ℕ → G\nhu : ∀ (n : ℕ), ↑f (u n) = v n\nhnorm_u : ∀ (n : ℕ), ‖u n‖ ≤ C * ‖v n‖\ns : ℕ → G := fun n => ∑ k in range (n + 1), u k\nthis✝ : CauchySeq s\ng : G\nhg : Tendsto s atTop (𝓝 g)\nn : ℕ\nthis : ‖v 0‖ ≤ ‖h‖ + b 0\n⊢ ‖u 0‖ ≤ C * b 0 + C * ‖h‖\n[PROOFSTEP]\ncalc\n  ‖u 0‖ ≤ C * ‖v 0‖ := hnorm_u 0\n  _ ≤ C * (‖h‖ + b 0) := by gcongr\n  _ = C * b 0 + C * ‖h‖ := by rw [add_comm, mul_add]\n[GOAL]\nG : Type u_1\ninst✝² : NormedAddCommGroup G\ninst✝¹ : CompleteSpace G\nH : Type u_2\ninst✝ : NormedAddCommGroup H\nf : NormedAddGroupHom G H\nK : AddSubgroup H\nC ε : ℝ\nhC : 0 < C\nhε : 0 < ε\nhyp : NormedAddGroupHom.SurjectiveOnWith f K C\nh : H\nh_in : h ∈ AddSubgroup.topologicalClosure K\nhyp_h : ¬h = 0\nb : ℕ → ℝ := fun i => (1 / 2) ^ i * (ε * ‖h‖ / 2) / C\nb_pos : ∀ (i : ℕ), 0 < b i\nv : ℕ → H\nlim_v : Tendsto (fun n => ∑ k in range (n + 1), v k) atTop (𝓝 h)\nv_in : ∀ (n : ℕ), v n ∈ K\nhv₀ : ‖v 0 - h‖ < b 0\nhv : ∀ (n : ℕ), n > 0 → ‖v n‖ < b n\nu : ℕ → G\nhu : ∀ (n : ℕ), ↑f (u n) = v n\nhnorm_u : ∀ (n : ℕ), ‖u n‖ ≤ C * ‖v n‖\ns : ℕ → G := fun n => ∑ k in range (n + 1), u k\nthis✝ : CauchySeq s\ng : G\nhg : Tendsto s atTop (𝓝 g)\nn : ℕ\nthis : ‖v 0‖ ≤ ‖h‖ + b 0\n⊢ C * ‖v 0‖ ≤ C * (‖h‖ + b 0)\n[PROOFSTEP]\ngcongr\n[GOAL]\nG : Type u_1\ninst✝² : NormedAddCommGroup G\ninst✝¹ : CompleteSpace G\nH : Type u_2\ninst✝ : NormedAddCommGroup H\nf : NormedAddGroupHom G H\nK : AddSubgroup H\nC ε : ℝ\nhC : 0 < C\nhε : 0 < ε\nhyp : NormedAddGroupHom.SurjectiveOnWith f K C\nh : H\nh_in : h ∈ AddSubgroup.topologicalClosure K\nhyp_h : ¬h = 0\nb : ℕ → ℝ := fun i => (1 / 2) ^ i * (ε * ‖h‖ / 2) / C\nb_pos : ∀ (i : ℕ), 0 < b i\nv : ℕ → H\nlim_v : Tendsto (fun n => ∑ k in range (n + 1), v k) atTop (𝓝 h)\nv_in : ∀ (n : ℕ), v n ∈ K\nhv₀ : ‖v 0 - h‖ < b 0\nhv : ∀ (n : ℕ), n > 0 → ‖v n‖ < b n\nu : ℕ → G\nhu : ∀ (n : ℕ), ↑f (u n) = v n\nhnorm_u : ∀ (n : ℕ), ‖u n‖ ≤ C * ‖v n‖\ns : ℕ → G := fun n => ∑ k in range (n + 1), u k\nthis✝ : CauchySeq s\ng : G\nhg : Tendsto s atTop (𝓝 g)\nn : ℕ\nthis : ‖v 0‖ ≤ ‖h‖ + b 0\n⊢ C * (‖h‖ + b 0) = C * b 0 + C * ‖h‖\n[PROOFSTEP]\nrw [add_comm, mul_add]\n[GOAL]\ncase this\nG : Type u_1\ninst✝² : NormedAddCommGroup G\ninst✝¹ : CompleteSpace G\nH : Type u_2\ninst✝ : NormedAddCommGroup H\nf : NormedAddGroupHom G H\nK : AddSubgroup H\nC ε : ℝ\nhC : 0 < C\nhε : 0 < ε\nhyp : NormedAddGroupHom.SurjectiveOnWith f K C\nh : H\nh_in : h ∈ AddSubgroup.topologicalClosure K\nhyp_h : ¬h = 0\nb : ℕ → ℝ := fun i => (1 / 2) ^ i * (ε * ‖h‖ / 2) / C\nb_pos : ∀ (i : ℕ), 0 < b i\nv : ℕ → H\nlim_v : Tendsto (fun n => ∑ k in range (n + 1), v k) atTop (𝓝 h)\nv_in : ∀ (n : ℕ), v n ∈ K\nhv₀ : ‖v 0 - h‖ < b 0\nhv : ∀ (n : ℕ), n > 0 → ‖v n‖ < b n\nu : ℕ → G\nhu : ∀ (n : ℕ), ↑f (u n) = v n\nhnorm_u : ∀ (n : ℕ), ‖u n‖ ≤ C * ‖v n‖\ns : ℕ → G := fun n => ∑ k in range (n + 1), u k\nthis : CauchySeq s\ng : G\nhg : Tendsto s atTop (𝓝 g)\nn : ℕ\nhnorm₀ : ‖u 0‖ ≤ C * b 0 + C * ‖h‖\n⊢ ‖s n‖ ≤ (C + ε) * ‖h‖\n[PROOFSTEP]\nhave : (∑ k in range (n + 1), C * b k) ≤ ε * ‖h‖ :=\n  calc\n    (∑ k in range (n + 1), C * b k) = (∑ k in range (n + 1), (1 / 2 : ℝ) ^ k) * (ε * ‖h‖ / 2) := by\n      simp only [mul_div_cancel' _ hC.ne.symm, ← sum_mul]\n    _ ≤ 2 * (ε * ‖h‖ / 2) := by gcongr; apply sum_geometric_two_le\n    _ = ε * ‖h‖ := mul_div_cancel' _ two_ne_zero\n[GOAL]\nG : Type u_1\ninst✝² : NormedAddCommGroup G\ninst✝¹ : CompleteSpace G\nH : Type u_2\ninst✝ : NormedAddCommGroup H\nf : NormedAddGroupHom G H\nK : AddSubgroup H\nC ε : ℝ\nhC : 0 < C\nhε : 0 < ε\nhyp : NormedAddGroupHom.SurjectiveOnWith f K C\nh : H\nh_in : h ∈ AddSubgroup.topologicalClosure K\nhyp_h : ¬h = 0\nb : ℕ → ℝ := fun i => (1 / 2) ^ i * (ε * ‖h‖ / 2) / C\nb_pos : ∀ (i : ℕ), 0 < b i\nv : ℕ → H\nlim_v : Tendsto (fun n => ∑ k in range (n + 1), v k) atTop (𝓝 h)\nv_in : ∀ (n : ℕ), v n ∈ K\nhv₀ : ‖v 0 - h‖ < b 0\nhv : ∀ (n : ℕ), n > 0 → ‖v n‖ < b n\nu : ℕ → G\nhu : ∀ (n : ℕ), ↑f (u n) = v n\nhnorm_u : ∀ (n : ℕ), ‖u n‖ ≤ C * ‖v n‖\ns : ℕ → G := fun n => ∑ k in range (n + 1), u k\nthis : CauchySeq s\ng : G\nhg : Tendsto s atTop (𝓝 g)\nn : ℕ\nhnorm₀ : ‖u 0‖ ≤ C * b 0 + C * ‖h‖\n⊢ ∑ k in range (n + 1), C * b k = (∑ k in range (n + 1), (1 / 2) ^ k) * (ε * ‖h‖ / 2)\n[PROOFSTEP]\nsimp only [mul_div_cancel' _ hC.ne.symm, ← sum_mul]\n[GOAL]\nG : Type u_1\ninst✝² : NormedAddCommGroup G\ninst✝¹ : CompleteSpace G\nH : Type u_2\ninst✝ : NormedAddCommGroup H\nf : NormedAddGroupHom G H\nK : AddSubgroup H\nC ε : ℝ\nhC : 0 < C\nhε : 0 < ε\nhyp : NormedAddGroupHom.SurjectiveOnWith f K C\nh : H\nh_in : h ∈ AddSubgroup.topologicalClosure K\nhyp_h : ¬h = 0\nb : ℕ → ℝ := fun i => (1 / 2) ^ i * (ε * ‖h‖ / 2) / C\nb_pos : ∀ (i : ℕ), 0 < b i\nv : ℕ → H\nlim_v : Tendsto (fun n => ∑ k in range (n + 1), v k) atTop (𝓝 h)\nv_in : ∀ (n : ℕ), v n ∈ K\nhv₀ : ‖v 0 - h‖ < b 0\nhv : ∀ (n : ℕ), n > 0 → ‖v n‖ < b n\nu : ℕ → G\nhu : ∀ (n : ℕ), ↑f (u n) = v n\nhnorm_u : ∀ (n : ℕ), ‖u n‖ ≤ C * ‖v n‖\ns : ℕ → G := fun n => ∑ k in range (n + 1), u k\nthis : CauchySeq s\ng : G\nhg : Tendsto s atTop (𝓝 g)\nn : ℕ\nhnorm₀ : ‖u 0‖ ≤ C * b 0 + C * ‖h‖\n⊢ (∑ k in range (n + 1), (1 / 2) ^ k) * (ε * ‖h‖ / 2) ≤ 2 * (ε * ‖h‖ / 2)\n[PROOFSTEP]\ngcongr\n[GOAL]\ncase h\nG : Type u_1\ninst✝² : NormedAddCommGroup G\ninst✝¹ : CompleteSpace G\nH : Type u_2\ninst✝ : NormedAddCommGroup H\nf : NormedAddGroupHom G H\nK : AddSubgroup H\nC ε : ℝ\nhC : 0 < C\nhε : 0 < ε\nhyp : NormedAddGroupHom.SurjectiveOnWith f K C\nh : H\nh_in : h ∈ AddSubgroup.topologicalClosure K\nhyp_h : ¬h = 0\nb : ℕ → ℝ := fun i => (1 / 2) ^ i * (ε * ‖h‖ / 2) / C\nb_pos : ∀ (i : ℕ), 0 < b i\nv : ℕ → H\nlim_v : Tendsto (fun n => ∑ k in range (n + 1), v k) atTop (𝓝 h)\nv_in : ∀ (n : ℕ), v n ∈ K\nhv₀ : ‖v 0 - h‖ < b 0\nhv : ∀ (n : ℕ), n > 0 → ‖v n‖ < b n\nu : ℕ → G\nhu : ∀ (n : ℕ), ↑f (u n) = v n\nhnorm_u : ∀ (n : ℕ), ‖u n‖ ≤ C * ‖v n‖\ns : ℕ → G := fun n => ∑ k in range (n + 1), u k\nthis : CauchySeq s\ng : G\nhg : Tendsto s atTop (𝓝 g)\nn : ℕ\nhnorm₀ : ‖u 0‖ ≤ C * b 0 + C * ‖h‖\n⊢ ∑ k in range (n + 1), (1 / 2) ^ k ≤ 2\n[PROOFSTEP]\napply sum_geometric_two_le\n[GOAL]\ncase this\nG : Type u_1\ninst✝² : NormedAddCommGroup G\ninst✝¹ : CompleteSpace G\nH : Type u_2\ninst✝ : NormedAddCommGroup H\nf : NormedAddGroupHom G H\nK : AddSubgroup H\nC ε : ℝ\nhC : 0 < C\nhε : 0 < ε\nhyp : NormedAddGroupHom.SurjectiveOnWith f K C\nh : H\nh_in : h ∈ AddSubgroup.topologicalClosure K\nhyp_h : ¬h = 0\nb : ℕ → ℝ := fun i => (1 / 2) ^ i * (ε * ‖h‖ / 2) / C\nb_pos : ∀ (i : ℕ), 0 < b i\nv : ℕ → H\nlim_v : Tendsto (fun n => ∑ k in range (n + 1), v k) atTop (𝓝 h)\nv_in : ∀ (n : ℕ), v n ∈ K\nhv₀ : ‖v 0 - h‖ < b 0\nhv : ∀ (n : ℕ), n > 0 → ‖v n‖ < b n\nu : ℕ → G\nhu : ∀ (n : ℕ), ↑f (u n) = v n\nhnorm_u : ∀ (n : ℕ), ‖u n‖ ≤ C * ‖v n‖\ns : ℕ → G := fun n => ∑ k in range (n + 1), u k\nthis✝ : CauchySeq s\ng : G\nhg : Tendsto s atTop (𝓝 g)\nn : ℕ\nhnorm₀ : ‖u 0‖ ≤ C * b 0 + C * ‖h‖\nthis : ∑ k in range (n + 1), C * b k ≤ ε * ‖h‖\n⊢ ‖s n‖ ≤ (C + ε) * ‖h‖\n[PROOFSTEP]\ncalc\n  ‖s n‖ ≤ ∑ k in range (n + 1), ‖u k‖ := norm_sum_le _ _\n  _ = (∑ k in range n, ‖u (k + 1)‖) + ‖u 0‖ := (sum_range_succ' _ _)\n  _ ≤ (∑ k in range n, C * ‖v (k + 1)‖) + ‖u 0‖ := by gcongr; apply hnorm_u\n  _ ≤ (∑ k in range n, C * b (k + 1)) + (C * b 0 + C * ‖h‖) := by gcongr with k; exact (hv _ k.succ_pos).le\n  _ = (∑ k in range (n + 1), C * b k) + C * ‖h‖ := by rw [← add_assoc, sum_range_succ']\n  _ ≤ (C + ε) * ‖h‖ := by\n    rw [add_comm, add_mul]\n    apply add_le_add_left this\n[GOAL]\nG : Type u_1\ninst✝² : NormedAddCommGroup G\ninst✝¹ : CompleteSpace G\nH : Type u_2\ninst✝ : NormedAddCommGroup H\nf : NormedAddGroupHom G H\nK : AddSubgroup H\nC ε : ℝ\nhC : 0 < C\nhε : 0 < ε\nhyp : NormedAddGroupHom.SurjectiveOnWith f K C\nh : H\nh_in : h ∈ AddSubgroup.topologicalClosure K\nhyp_h : ¬h = 0\nb : ℕ → ℝ := fun i => (1 / 2) ^ i * (ε * ‖h‖ / 2) / C\nb_pos : ∀ (i : ℕ), 0 < b i\nv : ℕ → H\nlim_v : Tendsto (fun n => ∑ k in range (n + 1), v k) atTop (𝓝 h)\nv_in : ∀ (n : ℕ), v n ∈ K\nhv₀ : ‖v 0 - h‖ < b 0\nhv : ∀ (n : ℕ), n > 0 → ‖v n‖ < b n\nu : ℕ → G\nhu : ∀ (n : ℕ), ↑f (u n) = v n\nhnorm_u : ∀ (n : ℕ), ‖u n‖ ≤ C * ‖v n‖\ns : ℕ → G := fun n => ∑ k in range (n + 1), u k\nthis✝ : CauchySeq s\ng : G\nhg : Tendsto s atTop (𝓝 g)\nn : ℕ\nhnorm₀ : ‖u 0‖ ≤ C * b 0 + C * ‖h‖\nthis : ∑ k in range (n + 1), C * b k ≤ ε * ‖h‖\n⊢ ∑ k in range n, ‖u (k + 1)‖ + ‖u 0‖ ≤ ∑ k in range n, C * ‖v (k + 1)‖ + ‖u 0‖\n[PROOFSTEP]\ngcongr\n[GOAL]\ncase bc.h\nG : Type u_1\ninst✝² : NormedAddCommGroup G\ninst✝¹ : CompleteSpace G\nH : Type u_2\ninst✝ : NormedAddCommGroup H\nf : NormedAddGroupHom G H\nK : AddSubgroup H\nC ε : ℝ\nhC : 0 < C\nhε : 0 < ε\nhyp : NormedAddGroupHom.SurjectiveOnWith f K C\nh : H\nh_in : h ∈ AddSubgroup.topologicalClosure K\nhyp_h : ¬h = 0\nb : ℕ → ℝ := fun i => (1 / 2) ^ i * (ε * ‖h‖ / 2) / C\nb_pos : ∀ (i : ℕ), 0 < b i\nv : ℕ → H\nlim_v : Tendsto (fun n => ∑ k in range (n + 1), v k) atTop (𝓝 h)\nv_in : ∀ (n : ℕ), v n ∈ K\nhv₀ : ‖v 0 - h‖ < b 0\nhv : ∀ (n : ℕ), n > 0 → ‖v n‖ < b n\nu : ℕ → G\nhu : ∀ (n : ℕ), ↑f (u n) = v n\nhnorm_u : ∀ (n : ℕ), ‖u n‖ ≤ C * ‖v n‖\ns : ℕ → G := fun n => ∑ k in range (n + 1), u k\nthis✝ : CauchySeq s\ng : G\nhg : Tendsto s atTop (𝓝 g)\nn : ℕ\nhnorm₀ : ‖u 0‖ ≤ C * b 0 + C * ‖h‖\nthis : ∑ k in range (n + 1), C * b k ≤ ε * ‖h‖\ni✝ : ℕ\na✝ : i✝ ∈ range n\n⊢ ‖u (i✝ + 1)‖ ≤ C * ‖v (i✝ + 1)‖\n[PROOFSTEP]\napply hnorm_u\n[GOAL]\nG : Type u_1\ninst✝² : NormedAddCommGroup G\ninst✝¹ : CompleteSpace G\nH : Type u_2\ninst✝ : NormedAddCommGroup H\nf : NormedAddGroupHom G H\nK : AddSubgroup H\nC ε : ℝ\nhC : 0 < C\nhε : 0 < ε\nhyp : NormedAddGroupHom.SurjectiveOnWith f K C\nh : H\nh_in : h ∈ AddSubgroup.topologicalClosure K\nhyp_h : ¬h = 0\nb : ℕ → ℝ := fun i => (1 / 2) ^ i * (ε * ‖h‖ / 2) / C\nb_pos : ∀ (i : ℕ), 0 < b i\nv : ℕ → H\nlim_v : Tendsto (fun n => ∑ k in range (n + 1), v k) atTop (𝓝 h)\nv_in : ∀ (n : ℕ), v n ∈ K\nhv₀ : ‖v 0 - h‖ < b 0\nhv : ∀ (n : ℕ), n > 0 → ‖v n‖ < b n\nu : ℕ → G\nhu : ∀ (n : ℕ), ↑f (u n) = v n\nhnorm_u : ∀ (n : ℕ), ‖u n‖ ≤ C * ‖v n‖\ns : ℕ → G := fun n => ∑ k in range (n + 1), u k\nthis✝ : CauchySeq s\ng : G\nhg : Tendsto s atTop (𝓝 g)\nn : ℕ\nhnorm₀ : ‖u 0‖ ≤ C * b 0 + C * ‖h‖\nthis : ∑ k in range (n + 1), C * b k ≤ ε * ‖h‖\n⊢ ∑ k in range n, C * ‖v (k + 1)‖ + ‖u 0‖ ≤ ∑ k in range n, C * b (k + 1) + (C * b 0 + C * ‖h‖)\n[PROOFSTEP]\ngcongr with k\n[GOAL]\ncase h₁.h.h\nG : Type u_1\ninst✝² : NormedAddCommGroup G\ninst✝¹ : CompleteSpace G\nH : Type u_2\ninst✝ : NormedAddCommGroup H\nf : NormedAddGroupHom G H\nK : AddSubgroup H\nC ε : ℝ\nhC : 0 < C\nhε : 0 < ε\nhyp : NormedAddGroupHom.SurjectiveOnWith f K C\nh : H\nh_in : h ∈ AddSubgroup.topologicalClosure K\nhyp_h : ¬h = 0\nb : ℕ → ℝ := fun i => (1 / 2) ^ i * (ε * ‖h‖ / 2) / C\nb_pos : ∀ (i : ℕ), 0 < b i\nv : ℕ → H\nlim_v : Tendsto (fun n => ∑ k in range (n + 1), v k) atTop (𝓝 h)\nv_in : ∀ (n : ℕ), v n ∈ K\nhv₀ : ‖v 0 - h‖ < b 0\nhv : ∀ (n : ℕ), n > 0 → ‖v n‖ < b n\nu : ℕ → G\nhu : ∀ (n : ℕ), ↑f (u n) = v n\nhnorm_u : ∀ (n : ℕ), ‖u n‖ ≤ C * ‖v n‖\ns : ℕ → G := fun n => ∑ k in range (n + 1), u k\nthis✝ : CauchySeq s\ng : G\nhg : Tendsto s atTop (𝓝 g)\nn : ℕ\nhnorm₀ : ‖u 0‖ ≤ C * b 0 + C * ‖h‖\nthis : ∑ k in range (n + 1), C * b k ≤ ε * ‖h‖\nk : ℕ\na✝ : k ∈ range n\n⊢ ‖v (k + 1)‖ ≤ b (k + 1)\n[PROOFSTEP]\nexact (hv _ k.succ_pos).le\n[GOAL]\nG : Type u_1\ninst✝² : NormedAddCommGroup G\ninst✝¹ : CompleteSpace G\nH : Type u_2\ninst✝ : NormedAddCommGroup H\nf : NormedAddGroupHom G H\nK : AddSubgroup H\nC ε : ℝ\nhC : 0 < C\nhε : 0 < ε\nhyp : NormedAddGroupHom.SurjectiveOnWith f K C\nh : H\nh_in : h ∈ AddSubgroup.topologicalClosure K\nhyp_h : ¬h = 0\nb : ℕ → ℝ := fun i => (1 / 2) ^ i * (ε * ‖h‖ / 2) / C\nb_pos : ∀ (i : ℕ), 0 < b i\nv : ℕ → H\nlim_v : Tendsto (fun n => ∑ k in range (n + 1), v k) atTop (𝓝 h)\nv_in : ∀ (n : ℕ), v n ∈ K\nhv₀ : ‖v 0 - h‖ < b 0\nhv : ∀ (n : ℕ), n > 0 → ‖v n‖ < b n\nu : ℕ → G\nhu : ∀ (n : ℕ), ↑f (u n) = v n\nhnorm_u : ∀ (n : ℕ), ‖u n‖ ≤ C * ‖v n‖\ns : ℕ → G := fun n => ∑ k in range (n + 1), u k\nthis✝ : CauchySeq s\ng : G\nhg : Tendsto s atTop (𝓝 g)\nn : ℕ\nhnorm₀ : ‖u 0‖ ≤ C * b 0 + C * ‖h‖\nthis : ∑ k in range (n + 1), C * b k ≤ ε * ‖h‖\n⊢ ∑ k in range n, C * b (k + 1) + (C * b 0 + C * ‖h‖) = ∑ k in range (n + 1), C * b k + C * ‖h‖\n[PROOFSTEP]\nrw [← add_assoc, sum_range_succ']\n[GOAL]\nG : Type u_1\ninst✝² : NormedAddCommGroup G\ninst✝¹ : CompleteSpace G\nH : Type u_2\ninst✝ : NormedAddCommGroup H\nf : NormedAddGroupHom G H\nK : AddSubgroup H\nC ε : ℝ\nhC : 0 < C\nhε : 0 < ε\nhyp : NormedAddGroupHom.SurjectiveOnWith f K C\nh : H\nh_in : h ∈ AddSubgroup.topologicalClosure K\nhyp_h : ¬h = 0\nb : ℕ → ℝ := fun i => (1 / 2) ^ i * (ε * ‖h‖ / 2) / C\nb_pos : ∀ (i : ℕ), 0 < b i\nv : ℕ → H\nlim_v : Tendsto (fun n => ∑ k in range (n + 1), v k) atTop (𝓝 h)\nv_in : ∀ (n : ℕ), v n ∈ K\nhv₀ : ‖v 0 - h‖ < b 0\nhv : ∀ (n : ℕ), n > 0 → ‖v n‖ < b n\nu : ℕ → G\nhu : ∀ (n : ℕ), ↑f (u n) = v n\nhnorm_u : ∀ (n : ℕ), ‖u n‖ ≤ C * ‖v n‖\ns : ℕ → G := fun n => ∑ k in range (n + 1), u k\nthis✝ : CauchySeq s\ng : G\nhg : Tendsto s atTop (𝓝 g)\nn : ℕ\nhnorm₀ : ‖u 0‖ ≤ C * b 0 + C * ‖h‖\nthis : ∑ k in range (n + 1), C * b k ≤ ε * ‖h‖\n⊢ ∑ k in range (n + 1), C * b k + C * ‖h‖ ≤ (C + ε) * ‖h‖\n[PROOFSTEP]\nrw [add_comm, add_mul]\n[GOAL]\nG : Type u_1\ninst✝² : NormedAddCommGroup G\ninst✝¹ : CompleteSpace G\nH : Type u_2\ninst✝ : NormedAddCommGroup H\nf : NormedAddGroupHom G H\nK : AddSubgroup H\nC ε : ℝ\nhC : 0 < C\nhε : 0 < ε\nhyp : NormedAddGroupHom.SurjectiveOnWith f K C\nh : H\nh_in : h ∈ AddSubgroup.topologicalClosure K\nhyp_h : ¬h = 0\nb : ℕ → ℝ := fun i => (1 / 2) ^ i * (ε * ‖h‖ / 2) / C\nb_pos : ∀ (i : ℕ), 0 < b i\nv : ℕ → H\nlim_v : Tendsto (fun n => ∑ k in range (n + 1), v k) atTop (𝓝 h)\nv_in : ∀ (n : ℕ), v n ∈ K\nhv₀ : ‖v 0 - h‖ < b 0\nhv : ∀ (n : ℕ), n > 0 → ‖v n‖ < b n\nu : ℕ → G\nhu : ∀ (n : ℕ), ↑f (u n) = v n\nhnorm_u : ∀ (n : ℕ), ‖u n‖ ≤ C * ‖v n‖\ns : ℕ → G := fun n => ∑ k in range (n + 1), u k\nthis✝ : CauchySeq s\ng : G\nhg : Tendsto s atTop (𝓝 g)\nn : ℕ\nhnorm₀ : ‖u 0‖ ≤ C * b 0 + C * ‖h‖\nthis : ∑ k in range (n + 1), C * b k ≤ ε * ‖h‖\n⊢ C * ‖h‖ + ∑ k in range (n + 1), C * b k ≤ C * ‖h‖ + ε * ‖h‖\n[PROOFSTEP]\napply add_le_add_left this\n[GOAL]\nG : Type u_1\ninst✝³ : NormedAddCommGroup G\ninst✝² : CompleteSpace G\nH : Type u_2\ninst✝¹ : NormedAddCommGroup H\nf : NormedAddGroupHom G H\nK : Type u_3\ninst✝ : SeminormedAddCommGroup K\nj : NormedAddGroupHom K H\nhj : ∀ (x : K), ‖↑j x‖ = ‖x‖\nC ε : ℝ\nhC : 0 < C\nhε : 0 < ε\nhyp : ∀ (k : K), ∃ g, ↑f g = ↑j k ∧ ‖g‖ ≤ C * ‖k‖\n⊢ NormedAddGroupHom.SurjectiveOnWith f (AddSubgroup.topologicalClosure (NormedAddGroupHom.range j)) (C + ε)\n[PROOFSTEP]\nreplace hyp : ∀ h ∈ j.range, ∃ g, f g = h ∧ ‖g‖ ≤ C * ‖h‖\n[GOAL]\ncase hyp\nG : Type u_1\ninst✝³ : NormedAddCommGroup G\ninst✝² : CompleteSpace G\nH : Type u_2\ninst✝¹ : NormedAddCommGroup H\nf : NormedAddGroupHom G H\nK : Type u_3\ninst✝ : SeminormedAddCommGroup K\nj : NormedAddGroupHom K H\nhj : ∀ (x : K), ‖↑j x‖ = ‖x‖\nC ε : ℝ\nhC : 0 < C\nhε : 0 < ε\nhyp : ∀ (k : K), ∃ g, ↑f g = ↑j k ∧ ‖g‖ ≤ C * ‖k‖\n⊢ ∀ (h : H), h ∈ NormedAddGroupHom.range j → ∃ g, ↑f g = h ∧ ‖g‖ ≤ C * ‖h‖\n[PROOFSTEP]\nintro h h_in\n[GOAL]\ncase hyp\nG : Type u_1\ninst✝³ : NormedAddCommGroup G\ninst✝² : CompleteSpace G\nH : Type u_2\ninst✝¹ : NormedAddCommGroup H\nf : NormedAddGroupHom G H\nK : Type u_3\ninst✝ : SeminormedAddCommGroup K\nj : NormedAddGroupHom K H\nhj : ∀ (x : K), ‖↑j x‖ = ‖x‖\nC ε : ℝ\nhC : 0 < C\nhε : 0 < ε\nhyp : ∀ (k : K), ∃ g, ↑f g = ↑j k ∧ ‖g‖ ≤ C * ‖k‖\nh : H\nh_in : h ∈ NormedAddGroupHom.range j\n⊢ ∃ g, ↑f g = h ∧ ‖g‖ ≤ C * ‖h‖\n[PROOFSTEP]\nrcases(j.mem_range _).mp h_in with ⟨k, rfl⟩\n[GOAL]\ncase hyp.intro\nG : Type u_1\ninst✝³ : NormedAddCommGroup G\ninst✝² : CompleteSpace G\nH : Type u_2\ninst✝¹ : NormedAddCommGroup H\nf : NormedAddGroupHom G H\nK : Type u_3\ninst✝ : SeminormedAddCommGroup K\nj : NormedAddGroupHom K H\nhj : ∀ (x : K), ‖↑j x‖ = ‖x‖\nC ε : ℝ\nhC : 0 < C\nhε : 0 < ε\nhyp : ∀ (k : K), ∃ g, ↑f g = ↑j k ∧ ‖g‖ ≤ C * ‖k‖\nk : K\nh_in : ↑j k ∈ NormedAddGroupHom.range j\n⊢ ∃ g, ↑f g = ↑j k ∧ ‖g‖ ≤ C * ‖↑j k‖\n[PROOFSTEP]\nrw [hj]\n[GOAL]\ncase hyp.intro\nG : Type u_1\ninst✝³ : NormedAddCommGroup G\ninst✝² : CompleteSpace G\nH : Type u_2\ninst✝¹ : NormedAddCommGroup H\nf : NormedAddGroupHom G H\nK : Type u_3\ninst✝ : SeminormedAddCommGroup K\nj : NormedAddGroupHom K H\nhj : ∀ (x : K), ‖↑j x‖ = ‖x‖\nC ε : ℝ\nhC : 0 < C\nhε : 0 < ε\nhyp : ∀ (k : K), ∃ g, ↑f g = ↑j k ∧ ‖g‖ ≤ C * ‖k‖\nk : K\nh_in : ↑j k ∈ NormedAddGroupHom.range j\n⊢ ∃ g, ↑f g = ↑j k ∧ ‖g‖ ≤ C * ‖k‖\n[PROOFSTEP]\nexact hyp k\n[GOAL]\nG : Type u_1\ninst✝³ : NormedAddCommGroup G\ninst✝² : CompleteSpace G\nH : Type u_2\ninst✝¹ : NormedAddCommGroup H\nf : NormedAddGroupHom G H\nK : Type u_3\ninst✝ : SeminormedAddCommGroup K\nj : NormedAddGroupHom K H\nhj : ∀ (x : K), ‖↑j x‖ = ‖x‖\nC ε : ℝ\nhC : 0 < C\nhε : 0 < ε\nhyp : ∀ (h : H), h ∈ NormedAddGroupHom.range j → ∃ g, ↑f g = h ∧ ‖g‖ ≤ C * ‖h‖\n⊢ NormedAddGroupHom.SurjectiveOnWith f (AddSubgroup.topologicalClosure (NormedAddGroupHom.range j)) (C + ε)\n[PROOFSTEP]\nexact controlled_closure_of_complete hC hε hyp\n", "meta": {"mathlib_filename": "Mathlib.Analysis.Normed.Group.ControlledClosure", "llama_tokens": 25292, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7549149758396752, "lm_q2_score": 0.679178686187839, "lm_q1q2_score": 0.5127221614743148}}
{"text": "[GOAL]\nα✝ : Sort u_1\nβ : Sort u_2\nα : Sort u_3\nh : Finite α\nf : α ≃ β\n⊢ Finite β\n[PROOFSTEP]\ncases' h with n e\n[GOAL]\ncase intro\nα✝ : Sort u_1\nβ : Sort u_2\nα : Sort u_3\nf : α ≃ β\nn : ℕ\ne : α ≃ Fin n\n⊢ Finite β\n[PROOFSTEP]\nexact Finite.intro (f.symm.trans e)\n", "meta": {"mathlib_filename": "Mathlib.Data.Finite.Defs", "llama_tokens": 145, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES\n\n", "lm_q1_score": 0.7956581000631541, "lm_q2_score": 0.6442251064863697, "lm_q1q2_score": 0.512582924239928}}
{"text": "[GOAL]\nα : Type u\nι : Type v\ninst✝¹ : MetricSpace α\ninst✝ : ProperSpace α\nc : ι → α\nx : α\nr✝ : ℝ\ns : Set α\nr : ι → ℝ\nhs : IsClosed s\nuf : ∀ (x : α), x ∈ s → Set.Finite {i | x ∈ ball (c i) (r i)}\nus : s ⊆ ⋃ (i : ι), ball (c i) (r i)\n⊢ ∃ r', s ⊆ ⋃ (i : ι), ball (c i) (r' i) ∧ ∀ (i : ι), r' i < r i\n[PROOFSTEP]\nrcases exists_subset_iUnion_closed_subset hs (fun i => @isOpen_ball _ _ (c i) (r i)) uf us with ⟨v, hsv, hvc, hcv⟩\n[GOAL]\ncase intro.intro.intro\nα : Type u\nι : Type v\ninst✝¹ : MetricSpace α\ninst✝ : ProperSpace α\nc : ι → α\nx : α\nr✝ : ℝ\ns : Set α\nr : ι → ℝ\nhs : IsClosed s\nuf : ∀ (x : α), x ∈ s → Set.Finite {i | x ∈ ball (c i) (r i)}\nus : s ⊆ ⋃ (i : ι), ball (c i) (r i)\nv : ι → Set α\nhsv : s ⊆ iUnion v\nhvc : ∀ (i : ι), IsClosed (v i)\nhcv : ∀ (i : ι), v i ⊆ ball (c i) (r i)\n⊢ ∃ r', s ⊆ ⋃ (i : ι), ball (c i) (r' i) ∧ ∀ (i : ι), r' i < r i\n[PROOFSTEP]\nhave := fun i => exists_lt_subset_ball (hvc i) (hcv i)\n[GOAL]\ncase intro.intro.intro\nα : Type u\nι : Type v\ninst✝¹ : MetricSpace α\ninst✝ : ProperSpace α\nc : ι → α\nx : α\nr✝ : ℝ\ns : Set α\nr : ι → ℝ\nhs : IsClosed s\nuf : ∀ (x : α), x ∈ s → Set.Finite {i | x ∈ ball (c i) (r i)}\nus : s ⊆ ⋃ (i : ι), ball (c i) (r i)\nv : ι → Set α\nhsv : s ⊆ iUnion v\nhvc : ∀ (i : ι), IsClosed (v i)\nhcv : ∀ (i : ι), v i ⊆ ball (c i) (r i)\nthis : ∀ (i : ι), ∃ r', r' < r i ∧ v i ⊆ ball (c i) r'\n⊢ ∃ r', s ⊆ ⋃ (i : ι), ball (c i) (r' i) ∧ ∀ (i : ι), r' i < r i\n[PROOFSTEP]\nchoose r' hlt hsub using this\n[GOAL]\ncase intro.intro.intro\nα : Type u\nι : Type v\ninst✝¹ : MetricSpace α\ninst✝ : ProperSpace α\nc : ι → α\nx : α\nr✝ : ℝ\ns : Set α\nr : ι → ℝ\nhs : IsClosed s\nuf : ∀ (x : α), x ∈ s → Set.Finite {i | x ∈ ball (c i) (r i)}\nus : s ⊆ ⋃ (i : ι), ball (c i) (r i)\nv : ι → Set α\nhsv : s ⊆ iUnion v\nhvc : ∀ (i : ι), IsClosed (v i)\nhcv : ∀ (i : ι), v i ⊆ ball (c i) (r i)\nr' : ι → ℝ\nhlt : ∀ (i : ι), r' i < r i\nhsub : ∀ (i : ι), v i ⊆ ball (c i) (r' i)\n⊢ ∃ r', s ⊆ ⋃ (i : ι), ball (c i) (r' i) ∧ ∀ (i : ι), r' i < r i\n[PROOFSTEP]\nexact ⟨r', hsv.trans <| iUnion_mono <| hsub, hlt⟩\n[GOAL]\nα : Type u\nι : Type v\ninst✝¹ : MetricSpace α\ninst✝ : ProperSpace α\nc : ι → α\nx : α\nr✝ : ℝ\ns : Set α\nr : ι → ℝ\nhr : ∀ (i : ι), 0 < r i\nhs : IsClosed s\nuf : ∀ (x : α), x ∈ s → Set.Finite {i | x ∈ ball (c i) (r i)}\nus : s ⊆ ⋃ (i : ι), ball (c i) (r i)\n⊢ ∃ r', s ⊆ ⋃ (i : ι), ball (c i) (r' i) ∧ ∀ (i : ι), r' i ∈ Ioo 0 (r i)\n[PROOFSTEP]\nrcases exists_subset_iUnion_closed_subset hs (fun i => @isOpen_ball _ _ (c i) (r i)) uf us with ⟨v, hsv, hvc, hcv⟩\n[GOAL]\ncase intro.intro.intro\nα : Type u\nι : Type v\ninst✝¹ : MetricSpace α\ninst✝ : ProperSpace α\nc : ι → α\nx : α\nr✝ : ℝ\ns : Set α\nr : ι → ℝ\nhr : ∀ (i : ι), 0 < r i\nhs : IsClosed s\nuf : ∀ (x : α), x ∈ s → Set.Finite {i | x ∈ ball (c i) (r i)}\nus : s ⊆ ⋃ (i : ι), ball (c i) (r i)\nv : ι → Set α\nhsv : s ⊆ iUnion v\nhvc : ∀ (i : ι), IsClosed (v i)\nhcv : ∀ (i : ι), v i ⊆ ball (c i) (r i)\n⊢ ∃ r', s ⊆ ⋃ (i : ι), ball (c i) (r' i) ∧ ∀ (i : ι), r' i ∈ Ioo 0 (r i)\n[PROOFSTEP]\nhave := fun i => exists_pos_lt_subset_ball (hr i) (hvc i) (hcv i)\n[GOAL]\ncase intro.intro.intro\nα : Type u\nι : Type v\ninst✝¹ : MetricSpace α\ninst✝ : ProperSpace α\nc : ι → α\nx : α\nr✝ : ℝ\ns : Set α\nr : ι → ℝ\nhr : ∀ (i : ι), 0 < r i\nhs : IsClosed s\nuf : ∀ (x : α), x ∈ s → Set.Finite {i | x ∈ ball (c i) (r i)}\nus : s ⊆ ⋃ (i : ι), ball (c i) (r i)\nv : ι → Set α\nhsv : s ⊆ iUnion v\nhvc : ∀ (i : ι), IsClosed (v i)\nhcv : ∀ (i : ι), v i ⊆ ball (c i) (r i)\nthis : ∀ (i : ι), ∃ r', r' ∈ Ioo 0 (r i) ∧ v i ⊆ ball (c i) r'\n⊢ ∃ r', s ⊆ ⋃ (i : ι), ball (c i) (r' i) ∧ ∀ (i : ι), r' i ∈ Ioo 0 (r i)\n[PROOFSTEP]\nchoose r' hlt hsub using this\n[GOAL]\ncase intro.intro.intro\nα : Type u\nι : Type v\ninst✝¹ : MetricSpace α\ninst✝ : ProperSpace α\nc : ι → α\nx : α\nr✝ : ℝ\ns : Set α\nr : ι → ℝ\nhr : ∀ (i : ι), 0 < r i\nhs : IsClosed s\nuf : ∀ (x : α), x ∈ s → Set.Finite {i | x ∈ ball (c i) (r i)}\nus : s ⊆ ⋃ (i : ι), ball (c i) (r i)\nv : ι → Set α\nhsv : s ⊆ iUnion v\nhvc : ∀ (i : ι), IsClosed (v i)\nhcv : ∀ (i : ι), v i ⊆ ball (c i) (r i)\nr' : ι → ℝ\nhlt : ∀ (i : ι), r' i ∈ Ioo 0 (r i)\nhsub : ∀ (i : ι), v i ⊆ ball (c i) (r' i)\n⊢ ∃ r', s ⊆ ⋃ (i : ι), ball (c i) (r' i) ∧ ∀ (i : ι), r' i ∈ Ioo 0 (r i)\n[PROOFSTEP]\nexact ⟨r', hsv.trans <| iUnion_mono hsub, hlt⟩\n[GOAL]\nα : Type u\nι : Type v\ninst✝¹ : MetricSpace α\ninst✝ : ProperSpace α\nc : ι → α\nx : α\nr : ℝ\ns : Set α\nhs : IsClosed s\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → 0 < R x\n⊢ ∃ ι c r r',\n    (∀ (i : ι), c i ∈ s ∧ 0 < r i ∧ r i < r' i ∧ r' i < R (c i)) ∧\n      (LocallyFinite fun i => ball (c i) (r' i)) ∧ s ⊆ ⋃ (i : ι), ball (c i) (r i)\n[PROOFSTEP]\nhave : ∀ x ∈ s, (𝓝 x).HasBasis (fun r : ℝ => 0 < r ∧ r < R x) fun r => ball x r := fun x hx =>\n  nhds_basis_uniformity (uniformity_basis_dist_lt (hR x hx))\n[GOAL]\nα : Type u\nι : Type v\ninst✝¹ : MetricSpace α\ninst✝ : ProperSpace α\nc : ι → α\nx : α\nr : ℝ\ns : Set α\nhs : IsClosed s\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → 0 < R x\nthis : ∀ (x : α), x ∈ s → Filter.HasBasis (𝓝 x) (fun r => 0 < r ∧ r < R x) fun r => ball x r\n⊢ ∃ ι c r r',\n    (∀ (i : ι), c i ∈ s ∧ 0 < r i ∧ r i < r' i ∧ r' i < R (c i)) ∧\n      (LocallyFinite fun i => ball (c i) (r' i)) ∧ s ⊆ ⋃ (i : ι), ball (c i) (r i)\n[PROOFSTEP]\nrcases refinement_of_locallyCompact_sigmaCompact_of_nhds_basis_set hs this with ⟨ι, c, r', hr', hsub', hfin⟩\n[GOAL]\ncase intro.intro.intro.intro.intro\nα : Type u\nι✝ : Type v\ninst✝¹ : MetricSpace α\ninst✝ : ProperSpace α\nc✝ : ι✝ → α\nx : α\nr : ℝ\ns : Set α\nhs : IsClosed s\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → 0 < R x\nthis : ∀ (x : α), x ∈ s → Filter.HasBasis (𝓝 x) (fun r => 0 < r ∧ r < R x) fun r => ball x r\nι : Type u\nc : ι → α\nr' : ι → ℝ\nhr' : ∀ (a : ι), c a ∈ s ∧ 0 < r' a ∧ r' a < R (c a)\nhsub' : s ⊆ ⋃ (a : ι), ball (c a) (r' a)\nhfin : LocallyFinite fun a => ball (c a) (r' a)\n⊢ ∃ ι c r r',\n    (∀ (i : ι), c i ∈ s ∧ 0 < r i ∧ r i < r' i ∧ r' i < R (c i)) ∧\n      (LocallyFinite fun i => ball (c i) (r' i)) ∧ s ⊆ ⋃ (i : ι), ball (c i) (r i)\n[PROOFSTEP]\nrcases exists_subset_iUnion_ball_radius_pos_lt (fun i => (hr' i).2.1) hs (fun x _ => hfin.point_finite x) hsub' with\n  ⟨r, hsub, hlt⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro\nα : Type u\nι✝ : Type v\ninst✝¹ : MetricSpace α\ninst✝ : ProperSpace α\nc✝ : ι✝ → α\nx : α\nr✝ : ℝ\ns : Set α\nhs : IsClosed s\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → 0 < R x\nthis : ∀ (x : α), x ∈ s → Filter.HasBasis (𝓝 x) (fun r => 0 < r ∧ r < R x) fun r => ball x r\nι : Type u\nc : ι → α\nr' : ι → ℝ\nhr' : ∀ (a : ι), c a ∈ s ∧ 0 < r' a ∧ r' a < R (c a)\nhsub' : s ⊆ ⋃ (a : ι), ball (c a) (r' a)\nhfin : LocallyFinite fun a => ball (c a) (r' a)\nr : ι → ℝ\nhsub : s ⊆ ⋃ (i : ι), ball (c i) (r i)\nhlt : ∀ (i : ι), r i ∈ Ioo 0 (r' i)\n⊢ ∃ ι c r r',\n    (∀ (i : ι), c i ∈ s ∧ 0 < r i ∧ r i < r' i ∧ r' i < R (c i)) ∧\n      (LocallyFinite fun i => ball (c i) (r' i)) ∧ s ⊆ ⋃ (i : ι), ball (c i) (r i)\n[PROOFSTEP]\nexact ⟨ι, c, r, r', fun i => ⟨(hr' i).1, (hlt i).1, (hlt i).2, (hr' i).2.2⟩, hfin, hsub⟩\n", "meta": {"mathlib_filename": "Mathlib.Topology.MetricSpace.ShrinkingLemma", "llama_tokens": 3879, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8333246035907932, "lm_q2_score": 0.615087848460224, "lm_q1q2_score": 0.51256783749163}}
{"text": "[GOAL]\nR : Type u_1\ninst✝⁹ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝⁸ : CommRing S\ninst✝⁷ : Algebra R S\nP : Type u_3\ninst✝⁶ : CommRing P\nA : Type u_4\ninst✝⁵ : CommRing A\ninst✝⁴ : IsDomain A\ninst✝³ : UniqueFactorizationMonoid A\nK : Type u_5\ninst✝² : Field K\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nx : K\n⊢ ∃ a b, (∀ {d : A}, d ∣ a → d ∣ ↑b → IsUnit d) ∧ mk' K a b = x\n[PROOFSTEP]\nobtain ⟨⟨b, b_nonzero⟩, a, hab⟩ := exists_integer_multiple (nonZeroDivisors A) x\n[GOAL]\ncase intro.mk.intro\nR : Type u_1\ninst✝⁹ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝⁸ : CommRing S\ninst✝⁷ : Algebra R S\nP : Type u_3\ninst✝⁶ : CommRing P\nA : Type u_4\ninst✝⁵ : CommRing A\ninst✝⁴ : IsDomain A\ninst✝³ : UniqueFactorizationMonoid A\nK : Type u_5\ninst✝² : Field K\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nx : K\nb : A\nb_nonzero : b ∈ nonZeroDivisors A\na : A\nhab : ↑(algebraMap A K) a = ↑{ val := b, property := b_nonzero } • x\n⊢ ∃ a b, (∀ {d : A}, d ∣ a → d ∣ ↑b → IsUnit d) ∧ mk' K a b = x\n[PROOFSTEP]\nobtain ⟨a', b', c', no_factor, rfl, rfl⟩ :=\n  UniqueFactorizationMonoid.exists_reduced_factors' a b (mem_nonZeroDivisors_iff_ne_zero.mp b_nonzero)\n[GOAL]\ncase intro.mk.intro.intro.intro.intro.intro.intro\nR : Type u_1\ninst✝⁹ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝⁸ : CommRing S\ninst✝⁷ : Algebra R S\nP : Type u_3\ninst✝⁶ : CommRing P\nA : Type u_4\ninst✝⁵ : CommRing A\ninst✝⁴ : IsDomain A\ninst✝³ : UniqueFactorizationMonoid A\nK : Type u_5\ninst✝² : Field K\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nx : K\na' b' c' : A\nno_factor : ∀ {d : A}, d ∣ a' → d ∣ b' → IsUnit d\nb_nonzero : c' * b' ∈ nonZeroDivisors A\nhab : ↑(algebraMap A K) (c' * a') = ↑{ val := c' * b', property := b_nonzero } • x\n⊢ ∃ a b, (∀ {d : A}, d ∣ a → d ∣ ↑b → IsUnit d) ∧ mk' K a b = x\n[PROOFSTEP]\nobtain ⟨_, b'_nonzero⟩ := mul_mem_nonZeroDivisors.mp b_nonzero\n[GOAL]\ncase intro.mk.intro.intro.intro.intro.intro.intro.intro\nR : Type u_1\ninst✝⁹ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝⁸ : CommRing S\ninst✝⁷ : Algebra R S\nP : Type u_3\ninst✝⁶ : CommRing P\nA : Type u_4\ninst✝⁵ : CommRing A\ninst✝⁴ : IsDomain A\ninst✝³ : UniqueFactorizationMonoid A\nK : Type u_5\ninst✝² : Field K\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nx : K\na' b' c' : A\nno_factor : ∀ {d : A}, d ∣ a' → d ∣ b' → IsUnit d\nb_nonzero : c' * b' ∈ nonZeroDivisors A\nhab : ↑(algebraMap A K) (c' * a') = ↑{ val := c' * b', property := b_nonzero } • x\nleft✝ : c' ∈ nonZeroDivisors A\nb'_nonzero : b' ∈ nonZeroDivisors A\n⊢ ∃ a b, (∀ {d : A}, d ∣ a → d ∣ ↑b → IsUnit d) ∧ mk' K a b = x\n[PROOFSTEP]\nrefine' ⟨a', ⟨b', b'_nonzero⟩, no_factor, _⟩\n[GOAL]\ncase intro.mk.intro.intro.intro.intro.intro.intro.intro\nR : Type u_1\ninst✝⁹ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝⁸ : CommRing S\ninst✝⁷ : Algebra R S\nP : Type u_3\ninst✝⁶ : CommRing P\nA : Type u_4\ninst✝⁵ : CommRing A\ninst✝⁴ : IsDomain A\ninst✝³ : UniqueFactorizationMonoid A\nK : Type u_5\ninst✝² : Field K\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nx : K\na' b' c' : A\nno_factor : ∀ {d : A}, d ∣ a' → d ∣ b' → IsUnit d\nb_nonzero : c' * b' ∈ nonZeroDivisors A\nhab : ↑(algebraMap A K) (c' * a') = ↑{ val := c' * b', property := b_nonzero } • x\nleft✝ : c' ∈ nonZeroDivisors A\nb'_nonzero : b' ∈ nonZeroDivisors A\n⊢ mk' K a' { val := b', property := b'_nonzero } = x\n[PROOFSTEP]\nrefine' mul_left_cancel₀ (IsFractionRing.to_map_ne_zero_of_mem_nonZeroDivisors b_nonzero) _\n[GOAL]\ncase intro.mk.intro.intro.intro.intro.intro.intro.intro\nR : Type u_1\ninst✝⁹ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝⁸ : CommRing S\ninst✝⁷ : Algebra R S\nP : Type u_3\ninst✝⁶ : CommRing P\nA : Type u_4\ninst✝⁵ : CommRing A\ninst✝⁴ : IsDomain A\ninst✝³ : UniqueFactorizationMonoid A\nK : Type u_5\ninst✝² : Field K\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nx : K\na' b' c' : A\nno_factor : ∀ {d : A}, d ∣ a' → d ∣ b' → IsUnit d\nb_nonzero : c' * b' ∈ nonZeroDivisors A\nhab : ↑(algebraMap A K) (c' * a') = ↑{ val := c' * b', property := b_nonzero } • x\nleft✝ : c' ∈ nonZeroDivisors A\nb'_nonzero : b' ∈ nonZeroDivisors A\n⊢ ↑(algebraMap A K) (c' * b') * mk' K a' { val := b', property := b'_nonzero } = ↑(algebraMap A K) (c' * b') * x\n[PROOFSTEP]\nsimp only [Subtype.coe_mk, RingHom.map_mul, Algebra.smul_def] at *\n[GOAL]\ncase intro.mk.intro.intro.intro.intro.intro.intro.intro\nR : Type u_1\ninst✝⁹ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝⁸ : CommRing S\ninst✝⁷ : Algebra R S\nP : Type u_3\ninst✝⁶ : CommRing P\nA : Type u_4\ninst✝⁵ : CommRing A\ninst✝⁴ : IsDomain A\ninst✝³ : UniqueFactorizationMonoid A\nK : Type u_5\ninst✝² : Field K\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nx : K\na' b' c' : A\nno_factor : ∀ {d : A}, d ∣ a' → d ∣ b' → IsUnit d\nb_nonzero : c' * b' ∈ nonZeroDivisors A\nleft✝ : c' ∈ nonZeroDivisors A\nb'_nonzero : b' ∈ nonZeroDivisors A\nhab : ↑(algebraMap A K) c' * ↑(algebraMap A K) a' = ↑(algebraMap A K) c' * ↑(algebraMap A K) b' * x\n⊢ ↑(algebraMap A K) c' * ↑(algebraMap A K) b' * mk' K a' { val := b', property := b'_nonzero } =\n    ↑(algebraMap A K) c' * ↑(algebraMap A K) b' * x\n[PROOFSTEP]\nerw [← hab, mul_assoc, mk'_spec' _ a' ⟨b', b'_nonzero⟩]\n[GOAL]\nR : Type u_1\ninst✝⁹ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝⁸ : CommRing S\ninst✝⁷ : Algebra R S\nP : Type u_3\ninst✝⁶ : CommRing P\nA : Type u_4\ninst✝⁵ : CommRing A\ninst✝⁴ : IsDomain A\ninst✝³ : UniqueFactorizationMonoid A\nK : Type u_5\ninst✝² : Field K\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nx : K\n⊢ ↑(algebraMap A K) (num A x) / ↑(algebraMap A K) ↑(den A x) = x\n[PROOFSTEP]\nrw [← mk'_eq_div]\n[GOAL]\nR : Type u_1\ninst✝⁹ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝⁸ : CommRing S\ninst✝⁷ : Algebra R S\nP : Type u_3\ninst✝⁶ : CommRing P\nA : Type u_4\ninst✝⁵ : CommRing A\ninst✝⁴ : IsDomain A\ninst✝³ : UniqueFactorizationMonoid A\nK : Type u_5\ninst✝² : Field K\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nx : K\n⊢ mk' K (num A x) (den A x) = x\n[PROOFSTEP]\napply mk'_num_den\n[GOAL]\nR : Type u_1\ninst✝⁹ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝⁸ : CommRing S\ninst✝⁷ : Algebra R S\nP : Type u_3\ninst✝⁶ : CommRing P\nA : Type u_4\ninst✝⁵ : CommRing A\ninst✝⁴ : IsDomain A\ninst✝³ : UniqueFactorizationMonoid A\nK : Type u_5\ninst✝² : Field K\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nx y : K\nh : x * ↑(algebraMap A K) ↑(den A y) = ↑(algebraMap A K) (num A y)\n⊢ x = y\n[PROOFSTEP]\nsimpa only [mk'_num_den] using eq_mk'_iff_mul_eq.mpr h\n[GOAL]\nR : Type u_1\ninst✝⁹ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝⁸ : CommRing S\ninst✝⁷ : Algebra R S\nP : Type u_3\ninst✝⁶ : CommRing P\nA : Type u_4\ninst✝⁵ : CommRing A\ninst✝⁴ : IsDomain A\ninst✝³ : UniqueFactorizationMonoid A\nK : Type u_5\ninst✝² : Field K\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nx y : K\nh : x = y\n⊢ x = mk' K (num A y) (den A y)\n[PROOFSTEP]\nrw [h, mk'_num_den]\n[GOAL]\nR : Type u_1\ninst✝⁹ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝⁸ : CommRing S\ninst✝⁷ : Algebra R S\nP : Type u_3\ninst✝⁶ : CommRing P\nA : Type u_4\ninst✝⁵ : CommRing A\ninst✝⁴ : IsDomain A\ninst✝³ : UniqueFactorizationMonoid A\nK : Type u_5\ninst✝² : Field K\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nx y : K\nh : y * ↑(algebraMap A K) ↑(den A x) = ↑(algebraMap A K) (num A x)\n⊢ x = y\n[PROOFSTEP]\nsimpa only [eq_comm, mk'_num_den] using eq_mk'_iff_mul_eq.mpr h\n[GOAL]\nR : Type u_1\ninst✝⁹ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝⁸ : CommRing S\ninst✝⁷ : Algebra R S\nP : Type u_3\ninst✝⁶ : CommRing P\nA : Type u_4\ninst✝⁵ : CommRing A\ninst✝⁴ : IsDomain A\ninst✝³ : UniqueFactorizationMonoid A\nK : Type u_5\ninst✝² : Field K\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nx y : K\nh : x = y\n⊢ y = mk' K (num A x) (den A x)\n[PROOFSTEP]\nrw [h, mk'_num_den]\n[GOAL]\nR : Type u_1\ninst✝⁹ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝⁸ : CommRing S\ninst✝⁷ : Algebra R S\nP : Type u_3\ninst✝⁶ : CommRing P\nA : Type u_4\ninst✝⁵ : CommRing A\ninst✝⁴ : IsDomain A\ninst✝³ : UniqueFactorizationMonoid A\nK : Type u_5\ninst✝² : Field K\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nx y : K\nh : num A y * ↑(den A x) = num A x * ↑(den A y)\n⊢ x = y\n[PROOFSTEP]\nsimpa only [mk'_num_den] using mk'_eq_of_eq' (S := K) h\n[GOAL]\nR : Type u_1\ninst✝⁹ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝⁸ : CommRing S\ninst✝⁷ : Algebra R S\nP : Type u_3\ninst✝⁶ : CommRing P\nA : Type u_4\ninst✝⁵ : CommRing A\ninst✝⁴ : IsDomain A\ninst✝³ : UniqueFactorizationMonoid A\nK : Type u_5\ninst✝² : Field K\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nx y : K\nh : x = y\n⊢ num A y * ↑(den A x) = num A x * ↑(den A y)\n[PROOFSTEP]\nrw [h]\n[GOAL]\nR : Type u_1\ninst✝⁹ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝⁸ : CommRing S\ninst✝⁷ : Algebra R S\nP : Type u_3\ninst✝⁶ : CommRing P\nA : Type u_4\ninst✝⁵ : CommRing A\ninst✝⁴ : IsDomain A\ninst✝³ : UniqueFactorizationMonoid A\nK : Type u_5\ninst✝² : Field K\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nx : K\nh : num A x = 0\n⊢ 0 * ↑(algebraMap (?m.160854 h) K) ↑(den (?m.160854 h) x) = ↑(algebraMap (?m.160854 h) K) (num (?m.160854 h) x)\n[PROOFSTEP]\nrw [zero_mul, h, RingHom.map_zero]\n[GOAL]\nR : Type u_1\ninst✝⁹ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝⁸ : CommRing S\ninst✝⁷ : Algebra R S\nP : Type u_3\ninst✝⁶ : CommRing P\nA : Type u_4\ninst✝⁵ : CommRing A\ninst✝⁴ : IsDomain A\ninst✝³ : UniqueFactorizationMonoid A\nK : Type u_5\ninst✝² : Field K\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nx : K\nh : IsUnit ↑(den A x)\n⊢ IsInteger A x\n[PROOFSTEP]\ncases' h with d hd\n[GOAL]\ncase intro\nR : Type u_1\ninst✝⁹ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝⁸ : CommRing S\ninst✝⁷ : Algebra R S\nP : Type u_3\ninst✝⁶ : CommRing P\nA : Type u_4\ninst✝⁵ : CommRing A\ninst✝⁴ : IsDomain A\ninst✝³ : UniqueFactorizationMonoid A\nK : Type u_5\ninst✝² : Field K\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nx : K\nd : Aˣ\nhd : ↑d = ↑(den A x)\n⊢ IsInteger A x\n[PROOFSTEP]\nhave d_ne_zero : algebraMap A K (den A x) ≠ 0 := IsFractionRing.to_map_ne_zero_of_mem_nonZeroDivisors (den A x).2\n[GOAL]\ncase intro\nR : Type u_1\ninst✝⁹ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝⁸ : CommRing S\ninst✝⁷ : Algebra R S\nP : Type u_3\ninst✝⁶ : CommRing P\nA : Type u_4\ninst✝⁵ : CommRing A\ninst✝⁴ : IsDomain A\ninst✝³ : UniqueFactorizationMonoid A\nK : Type u_5\ninst✝² : Field K\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nx : K\nd : Aˣ\nhd : ↑d = ↑(den A x)\nd_ne_zero : ↑(algebraMap A K) ↑(den A x) ≠ 0\n⊢ IsInteger A x\n[PROOFSTEP]\nuse↑d⁻¹ * num A x\n[GOAL]\ncase h\nR : Type u_1\ninst✝⁹ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝⁸ : CommRing S\ninst✝⁷ : Algebra R S\nP : Type u_3\ninst✝⁶ : CommRing P\nA : Type u_4\ninst✝⁵ : CommRing A\ninst✝⁴ : IsDomain A\ninst✝³ : UniqueFactorizationMonoid A\nK : Type u_5\ninst✝² : Field K\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nx : K\nd : Aˣ\nhd : ↑d = ↑(den A x)\nd_ne_zero : ↑(algebraMap A K) ↑(den A x) ≠ 0\n⊢ ↑(algebraMap A K) (↑d⁻¹ * num A x) = x\n[PROOFSTEP]\nrefine' _root_.trans _ (mk'_num_den A x)\n[GOAL]\ncase h\nR : Type u_1\ninst✝⁹ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝⁸ : CommRing S\ninst✝⁷ : Algebra R S\nP : Type u_3\ninst✝⁶ : CommRing P\nA : Type u_4\ninst✝⁵ : CommRing A\ninst✝⁴ : IsDomain A\ninst✝³ : UniqueFactorizationMonoid A\nK : Type u_5\ninst✝² : Field K\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nx : K\nd : Aˣ\nhd : ↑d = ↑(den A x)\nd_ne_zero : ↑(algebraMap A K) ↑(den A x) ≠ 0\n⊢ ↑(algebraMap A K) (↑d⁻¹ * num A x) = mk' K (num A x) (den A x)\n[PROOFSTEP]\nrw [map_mul, map_units_inv, hd]\n[GOAL]\ncase h\nR : Type u_1\ninst✝⁹ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝⁸ : CommRing S\ninst✝⁷ : Algebra R S\nP : Type u_3\ninst✝⁶ : CommRing P\nA : Type u_4\ninst✝⁵ : CommRing A\ninst✝⁴ : IsDomain A\ninst✝³ : UniqueFactorizationMonoid A\nK : Type u_5\ninst✝² : Field K\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nx : K\nd : Aˣ\nhd : ↑d = ↑(den A x)\nd_ne_zero : ↑(algebraMap A K) ↑(den A x) ≠ 0\n⊢ (↑(algebraMap A K) ↑(den A x))⁻¹ * ↑(algebraMap A K) (num A x) = mk' K (num A x) (den A x)\n[PROOFSTEP]\napply mul_left_cancel₀ d_ne_zero\n[GOAL]\ncase h\nR : Type u_1\ninst✝⁹ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝⁸ : CommRing S\ninst✝⁷ : Algebra R S\nP : Type u_3\ninst✝⁶ : CommRing P\nA : Type u_4\ninst✝⁵ : CommRing A\ninst✝⁴ : IsDomain A\ninst✝³ : UniqueFactorizationMonoid A\nK : Type u_5\ninst✝² : Field K\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nx : K\nd : Aˣ\nhd : ↑d = ↑(den A x)\nd_ne_zero : ↑(algebraMap A K) ↑(den A x) ≠ 0\n⊢ ↑(algebraMap A K) ↑(den A x) * ((↑(algebraMap A K) ↑(den A x))⁻¹ * ↑(algebraMap A K) (num A x)) =\n    ↑(algebraMap A K) ↑(den A x) * mk' K (num A x) (den A x)\n[PROOFSTEP]\nrw [← mul_assoc, mul_inv_cancel d_ne_zero, one_mul, mk'_spec']\n", "meta": {"mathlib_filename": "Mathlib.RingTheory.Localization.NumDen", "llama_tokens": 6359, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7826624789529375, "lm_q2_score": 0.6548947357776795, "lm_q1q2_score": 0.5125615373569877}}
{"text": "[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : IsROrC 𝕜\ninst✝ : NormedAddCommGroup E\nc : InnerProductSpace 𝕜 E\nx : E\n⊢ 0 ≤ ↑re (inner x x)\n[PROOFSTEP]\nrw [← InnerProductSpace.norm_sq_eq_inner]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : IsROrC 𝕜\ninst✝ : NormedAddCommGroup E\nc : InnerProductSpace 𝕜 E\nx : E\n⊢ 0 ≤ ‖x‖ ^ 2\n[PROOFSTEP]\napply sq_nonneg\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝¹ : IsROrC 𝕜\ninst✝ : NormedAddCommGroup E\nc : InnerProductSpace 𝕜 E\nx : E\nhx : inner x x = 0\n⊢ ‖x‖ ^ 2 = 0\n[PROOFSTEP]\nrw [InnerProductSpace.norm_sq_eq_inner (𝕜 := 𝕜) x, hx, map_zero]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝² : IsROrC 𝕜\ninst✝¹ : AddCommGroup F\ninst✝ : Module 𝕜 F\nc : Core 𝕜 F\nx : F\n⊢ ↑im (inner x x) = 0\n[PROOFSTEP]\nrw [← @ofReal_inj 𝕜, im_eq_conj_sub]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝² : IsROrC 𝕜\ninst✝¹ : AddCommGroup F\ninst✝ : Module 𝕜 F\nc : Core 𝕜 F\nx : F\n⊢ I * (↑(starRingEnd 𝕜) (inner x x) - inner x x) / 2 = ↑0\n[PROOFSTEP]\nsimp [inner_conj_symm]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝² : IsROrC 𝕜\ninst✝¹ : AddCommGroup F\ninst✝ : Module 𝕜 F\nc : Core 𝕜 F\nx y z : F\n⊢ inner x (y + z) = inner x y + inner x z\n[PROOFSTEP]\nrw [← inner_conj_symm, inner_add_left, RingHom.map_add]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝² : IsROrC 𝕜\ninst✝¹ : AddCommGroup F\ninst✝ : Module 𝕜 F\nc : Core 𝕜 F\nx y z : F\n⊢ ↑(starRingEnd 𝕜) (inner y x) + ↑(starRingEnd 𝕜) (inner z x) = inner x y + inner x z\n[PROOFSTEP]\nsimp only [inner_conj_symm]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝² : IsROrC 𝕜\ninst✝¹ : AddCommGroup F\ninst✝ : Module 𝕜 F\nc : Core 𝕜 F\nx : F\n⊢ ↑(normSq x) = inner x x\n[PROOFSTEP]\nrw [ext_iff]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝² : IsROrC 𝕜\ninst✝¹ : AddCommGroup F\ninst✝ : Module 𝕜 F\nc : Core 𝕜 F\nx : F\n⊢ ↑re ↑(normSq x) = ↑re (inner x x) ∧ ↑im ↑(normSq x) = ↑im (inner x x)\n[PROOFSTEP]\nexact ⟨by simp only [ofReal_re]; rfl, by simp only [inner_self_im, ofReal_im]⟩\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝² : IsROrC 𝕜\ninst✝¹ : AddCommGroup F\ninst✝ : Module 𝕜 F\nc : Core 𝕜 F\nx : F\n⊢ ↑re ↑(normSq x) = ↑re (inner x x)\n[PROOFSTEP]\nsimp only [ofReal_re]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝² : IsROrC 𝕜\ninst✝¹ : AddCommGroup F\ninst✝ : Module 𝕜 F\nc : Core 𝕜 F\nx : F\n⊢ normSq x = ↑re (inner x x)\n[PROOFSTEP]\nrfl\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝² : IsROrC 𝕜\ninst✝¹ : AddCommGroup F\ninst✝ : Module 𝕜 F\nc : Core 𝕜 F\nx : F\n⊢ ↑im ↑(normSq x) = ↑im (inner x x)\n[PROOFSTEP]\nsimp only [inner_self_im, ofReal_im]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝² : IsROrC 𝕜\ninst✝¹ : AddCommGroup F\ninst✝ : Module 𝕜 F\nc : Core 𝕜 F\nx y : F\n⊢ ↑re (inner x y) = ↑re (inner y x)\n[PROOFSTEP]\nrw [← inner_conj_symm, conj_re]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝² : IsROrC 𝕜\ninst✝¹ : AddCommGroup F\ninst✝ : Module 𝕜 F\nc : Core 𝕜 F\nx y : F\n⊢ ↑im (inner x y) = -↑im (inner y x)\n[PROOFSTEP]\nrw [← inner_conj_symm, conj_im]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝² : IsROrC 𝕜\ninst✝¹ : AddCommGroup F\ninst✝ : Module 𝕜 F\nc : Core 𝕜 F\nx y : F\nr : 𝕜\n⊢ inner x (r • y) = r * inner x y\n[PROOFSTEP]\nrw [← inner_conj_symm, inner_smul_left]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝² : IsROrC 𝕜\ninst✝¹ : AddCommGroup F\ninst✝ : Module 𝕜 F\nc : Core 𝕜 F\nx y : F\nr : 𝕜\n⊢ ↑(starRingEnd 𝕜) (↑(starRingEnd 𝕜) r * inner y x) = r * inner x y\n[PROOFSTEP]\nsimp only [conj_conj, inner_conj_symm, RingHom.map_mul]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝² : IsROrC 𝕜\ninst✝¹ : AddCommGroup F\ninst✝ : Module 𝕜 F\nc : Core 𝕜 F\nx : F\n⊢ inner 0 x = 0\n[PROOFSTEP]\nrw [← zero_smul 𝕜 (0 : F), inner_smul_left]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝² : IsROrC 𝕜\ninst✝¹ : AddCommGroup F\ninst✝ : Module 𝕜 F\nc : Core 𝕜 F\nx : F\n⊢ ↑(starRingEnd 𝕜) 0 * inner 0 x = 0\n[PROOFSTEP]\nsimp only [zero_mul, RingHom.map_zero]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝² : IsROrC 𝕜\ninst✝¹ : AddCommGroup F\ninst✝ : Module 𝕜 F\nc : Core 𝕜 F\nx : F\n⊢ inner x 0 = 0\n[PROOFSTEP]\nrw [← inner_conj_symm, inner_zero_left]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝² : IsROrC 𝕜\ninst✝¹ : AddCommGroup F\ninst✝ : Module 𝕜 F\nc : Core 𝕜 F\nx : F\n⊢ ↑(starRingEnd 𝕜) 0 = 0\n[PROOFSTEP]\nsimp only [RingHom.map_zero]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝² : IsROrC 𝕜\ninst✝¹ : AddCommGroup F\ninst✝ : Module 𝕜 F\nc : Core 𝕜 F\nx : F\n⊢ x = 0 → inner x x = 0\n[PROOFSTEP]\nrintro rfl\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝² : IsROrC 𝕜\ninst✝¹ : AddCommGroup F\ninst✝ : Module 𝕜 F\nc : Core 𝕜 F\n⊢ inner 0 0 = 0\n[PROOFSTEP]\nexact inner_zero_left _\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝² : IsROrC 𝕜\ninst✝¹ : AddCommGroup F\ninst✝ : Module 𝕜 F\nc : Core 𝕜 F\nx : F\n⊢ normSq x = 0 ↔ inner x x = 0\n[PROOFSTEP]\nsimp only [normSq, ext_iff, map_zero, inner_self_im, eq_self_iff_true, and_true_iff]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝² : IsROrC 𝕜\ninst✝¹ : AddCommGroup F\ninst✝ : Module 𝕜 F\nc : Core 𝕜 F\nx : F\n⊢ ↑(↑re (inner x x)) = inner x x\n[PROOFSTEP]\nrw [ext_iff, inner_self_im]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝² : IsROrC 𝕜\ninst✝¹ : AddCommGroup F\ninst✝ : Module 𝕜 F\nc : Core 𝕜 F\nx : F\n⊢ ↑re ↑(↑re (inner x x)) = ↑re (inner x x) ∧ ↑im ↑(↑re (inner x x)) = 0\n[PROOFSTEP]\nnorm_num\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝² : IsROrC 𝕜\ninst✝¹ : AddCommGroup F\ninst✝ : Module 𝕜 F\nc : Core 𝕜 F\nx y : F\n⊢ ‖inner x y‖ = ‖inner y x‖\n[PROOFSTEP]\nrw [← inner_conj_symm, norm_conj]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝² : IsROrC 𝕜\ninst✝¹ : AddCommGroup F\ninst✝ : Module 𝕜 F\nc : Core 𝕜 F\nx y : F\n⊢ inner (-x) y = -inner x y\n[PROOFSTEP]\nrw [← neg_one_smul 𝕜 x, inner_smul_left]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝² : IsROrC 𝕜\ninst✝¹ : AddCommGroup F\ninst✝ : Module 𝕜 F\nc : Core 𝕜 F\nx y : F\n⊢ ↑(starRingEnd 𝕜) (-1) * inner x y = -inner x y\n[PROOFSTEP]\nsimp\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝² : IsROrC 𝕜\ninst✝¹ : AddCommGroup F\ninst✝ : Module 𝕜 F\nc : Core 𝕜 F\nx y : F\n⊢ inner x (-y) = -inner x y\n[PROOFSTEP]\nrw [← inner_conj_symm, inner_neg_left]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝² : IsROrC 𝕜\ninst✝¹ : AddCommGroup F\ninst✝ : Module 𝕜 F\nc : Core 𝕜 F\nx y : F\n⊢ ↑(starRingEnd 𝕜) (-inner y x) = -inner x y\n[PROOFSTEP]\nsimp only [RingHom.map_neg, inner_conj_symm]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝² : IsROrC 𝕜\ninst✝¹ : AddCommGroup F\ninst✝ : Module 𝕜 F\nc : Core 𝕜 F\nx y z : F\n⊢ inner (x - y) z = inner x z - inner y z\n[PROOFSTEP]\nsimp [sub_eq_add_neg, inner_add_left, inner_neg_left]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝² : IsROrC 𝕜\ninst✝¹ : AddCommGroup F\ninst✝ : Module 𝕜 F\nc : Core 𝕜 F\nx y z : F\n⊢ inner x (y - z) = inner x y - inner x z\n[PROOFSTEP]\nsimp [sub_eq_add_neg, inner_add_right, inner_neg_right]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝² : IsROrC 𝕜\ninst✝¹ : AddCommGroup F\ninst✝ : Module 𝕜 F\nc : Core 𝕜 F\nx y : F\n⊢ ↑re (inner x y * inner y x) = ‖inner x y * inner y x‖\n[PROOFSTEP]\nrw [← inner_conj_symm, mul_comm]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝² : IsROrC 𝕜\ninst✝¹ : AddCommGroup F\ninst✝ : Module 𝕜 F\nc : Core 𝕜 F\nx y : F\n⊢ ↑re (inner y x * ↑(starRingEnd 𝕜) (inner y x)) = ‖inner y x * ↑(starRingEnd 𝕜) (inner y x)‖\n[PROOFSTEP]\nexact re_eq_norm_of_mul_conj (inner y x)\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝² : IsROrC 𝕜\ninst✝¹ : AddCommGroup F\ninst✝ : Module 𝕜 F\nc : Core 𝕜 F\nx y : F\n⊢ inner (x + y) (x + y) = inner x x + inner x y + inner y x + inner y y\n[PROOFSTEP]\nsimp only [inner_add_left, inner_add_right]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝² : IsROrC 𝕜\ninst✝¹ : AddCommGroup F\ninst✝ : Module 𝕜 F\nc : Core 𝕜 F\nx y : F\n⊢ inner x x + inner y x + (inner x y + inner y y) = inner x x + inner x y + inner y x + inner y y\n[PROOFSTEP]\nring\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝² : IsROrC 𝕜\ninst✝¹ : AddCommGroup F\ninst✝ : Module 𝕜 F\nc : Core 𝕜 F\nx y : F\n⊢ inner (x - y) (x - y) = inner x x - inner x y - inner y x + inner y y\n[PROOFSTEP]\nsimp only [inner_sub_left, inner_sub_right]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝² : IsROrC 𝕜\ninst✝¹ : AddCommGroup F\ninst✝ : Module 𝕜 F\nc : Core 𝕜 F\nx y : F\n⊢ inner x x - inner y x - (inner x y - inner y y) = inner x x - inner x y - inner y x + inner y y\n[PROOFSTEP]\nring\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝² : IsROrC 𝕜\ninst✝¹ : AddCommGroup F\ninst✝ : Module 𝕜 F\nc : Core 𝕜 F\nx y : F\n⊢ normSq (inner x y • x - inner x x • y) = normSq x * (normSq x * normSq y - ‖inner x y‖ ^ 2)\n[PROOFSTEP]\nrw [← @ofReal_inj 𝕜, ofReal_normSq_eq_inner_self]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝² : IsROrC 𝕜\ninst✝¹ : AddCommGroup F\ninst✝ : Module 𝕜 F\nc : Core 𝕜 F\nx y : F\n⊢ inner (inner x y • x - inner x x • y) (inner x y • x - inner x x • y) =\n    ↑(normSq x * (normSq x * normSq y - ‖inner x y‖ ^ 2))\n[PROOFSTEP]\nsimp only [inner_sub_sub_self, inner_smul_left, inner_smul_right, conj_ofReal, mul_sub, ← ofReal_normSq_eq_inner_self x,\n  ← ofReal_normSq_eq_inner_self y]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝² : IsROrC 𝕜\ninst✝¹ : AddCommGroup F\ninst✝ : Module 𝕜 F\nc : Core 𝕜 F\nx y : F\n⊢ inner x y * (↑(starRingEnd 𝕜) (inner x y) * ↑(normSq x)) - ↑(normSq x) * (↑(starRingEnd 𝕜) (inner x y) * inner x y) -\n        inner x y * (↑(normSq x) * inner y x) +\n      ↑(normSq x) * (↑(normSq x) * ↑(normSq y)) =\n    ↑(normSq x * (normSq x * normSq y) - normSq x * ‖inner x y‖ ^ 2)\n[PROOFSTEP]\nrw [← mul_assoc, mul_conj, IsROrC.conj_mul, normSq_eq_def', mul_left_comm, ← inner_conj_symm y, mul_conj,\n  normSq_eq_def']\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝² : IsROrC 𝕜\ninst✝¹ : AddCommGroup F\ninst✝ : Module 𝕜 F\nc : Core 𝕜 F\nx y : F\n⊢ ↑(‖inner x y‖ ^ 2) * ↑(normSq x) - ↑(normSq x) * ↑(‖inner x y‖ ^ 2) - ↑(normSq x) * ↑(‖inner x y‖ ^ 2) +\n      ↑(normSq x) * (↑(normSq x) * ↑(normSq y)) =\n    ↑(normSq x * (normSq x * normSq y) - normSq x * ‖inner x y‖ ^ 2)\n[PROOFSTEP]\npush_cast\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝² : IsROrC 𝕜\ninst✝¹ : AddCommGroup F\ninst✝ : Module 𝕜 F\nc : Core 𝕜 F\nx y : F\n⊢ ↑‖inner x y‖ ^ 2 * ↑(normSq x) - ↑(normSq x) * ↑‖inner x y‖ ^ 2 - ↑(normSq x) * ↑‖inner x y‖ ^ 2 +\n      ↑(normSq x) * (↑(normSq x) * ↑(normSq y)) =\n    ↑(normSq x) * (↑(normSq x) * ↑(normSq y)) - ↑(normSq x) * ↑‖inner x y‖ ^ 2\n[PROOFSTEP]\nring\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝² : IsROrC 𝕜\ninst✝¹ : AddCommGroup F\ninst✝ : Module 𝕜 F\nc : Core 𝕜 F\nx y : F\n⊢ ‖inner x y‖ * ‖inner y x‖ ≤ ↑re (inner x x) * ↑re (inner y y)\n[PROOFSTEP]\nrcases eq_or_ne x 0 with (rfl | hx)\n[GOAL]\ncase inl\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝² : IsROrC 𝕜\ninst✝¹ : AddCommGroup F\ninst✝ : Module 𝕜 F\nc : Core 𝕜 F\ny : F\n⊢ ‖inner 0 y‖ * ‖inner y 0‖ ≤ ↑re (inner 0 0) * ↑re (inner y y)\n[PROOFSTEP]\nsimpa only [inner_zero_left, map_zero, zero_mul, norm_zero] using le_rfl\n[GOAL]\ncase inr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝² : IsROrC 𝕜\ninst✝¹ : AddCommGroup F\ninst✝ : Module 𝕜 F\nc : Core 𝕜 F\nx y : F\nhx : x ≠ 0\n⊢ ‖inner x y‖ * ‖inner y x‖ ≤ ↑re (inner x x) * ↑re (inner y y)\n[PROOFSTEP]\nhave hx' : 0 < normSqF x := inner_self_nonneg.lt_of_ne' (mt normSq_eq_zero.1 hx)\n[GOAL]\ncase inr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝² : IsROrC 𝕜\ninst✝¹ : AddCommGroup F\ninst✝ : Module 𝕜 F\nc : Core 𝕜 F\nx y : F\nhx : x ≠ 0\nhx' : 0 < normSq x\n⊢ ‖inner x y‖ * ‖inner y x‖ ≤ ↑re (inner x x) * ↑re (inner y y)\n[PROOFSTEP]\nrw [← sub_nonneg, ← mul_nonneg_iff_right_nonneg_of_pos hx', ← normSq, ← normSq, norm_inner_symm y, ← sq, ←\n  cauchy_schwarz_aux]\n[GOAL]\ncase inr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝² : IsROrC 𝕜\ninst✝¹ : AddCommGroup F\ninst✝ : Module 𝕜 F\nc : Core 𝕜 F\nx y : F\nhx : x ≠ 0\nhx' : 0 < normSq x\n⊢ 0 ≤ normSq (inner x y • x - inner x x • y)\n[PROOFSTEP]\nexact inner_self_nonneg\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝² : IsROrC 𝕜\ninst✝¹ : AddCommGroup F\ninst✝ : Module 𝕜 F\nc : Core 𝕜 F\nx : F\n⊢ ↑re (inner x x) = ‖x‖ * ‖x‖\n[PROOFSTEP]\nrw [norm_eq_sqrt_inner, ← sqrt_mul inner_self_nonneg (re ⟪x, x⟫), sqrt_mul_self inner_self_nonneg]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝² : IsROrC 𝕜\ninst✝¹ : AddCommGroup F\ninst✝ : Module 𝕜 F\nc : Core 𝕜 F\nx y : F\n⊢ ‖inner x y‖ * ‖inner x y‖ = ‖inner x y‖ * ‖inner y x‖\n[PROOFSTEP]\nrw [norm_inner_symm]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝² : IsROrC 𝕜\ninst✝¹ : AddCommGroup F\ninst✝ : Module 𝕜 F\nc : Core 𝕜 F\nx y : F\n⊢ ↑re (inner x x) * ↑re (inner y y) = ‖x‖ * ‖y‖ * (‖x‖ * ‖y‖)\n[PROOFSTEP]\nsimp only [inner_self_eq_norm_mul_norm]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝² : IsROrC 𝕜\ninst✝¹ : AddCommGroup F\ninst✝ : Module 𝕜 F\nc : Core 𝕜 F\nx y : F\n⊢ ‖x‖ * ‖x‖ * (‖y‖ * ‖y‖) = ‖x‖ * ‖y‖ * (‖x‖ * ‖y‖)\n[PROOFSTEP]\nring\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝² : IsROrC 𝕜\ninst✝¹ : AddCommGroup F\ninst✝ : Module 𝕜 F\nc : Core 𝕜 F\n⊢ (fun x => sqrt (↑re (inner x x))) 0 = 0\n[PROOFSTEP]\nsimp only [sqrt_zero, inner_zero_right, map_zero]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝² : IsROrC 𝕜\ninst✝¹ : AddCommGroup F\ninst✝ : Module 𝕜 F\nc : Core 𝕜 F\nx y : F\n⊢ (fun x => sqrt (↑re (inner x x))) (x + y) ≤ (fun x => sqrt (↑re (inner x x))) x + (fun x => sqrt (↑re (inner x x))) y\n[PROOFSTEP]\nhave h₁ : ‖⟪x, y⟫‖ ≤ ‖x‖ * ‖y‖ := norm_inner_le_norm _ _\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝² : IsROrC 𝕜\ninst✝¹ : AddCommGroup F\ninst✝ : Module 𝕜 F\nc : Core 𝕜 F\nx y : F\nh₁ : ‖inner x y‖ ≤ ‖x‖ * ‖y‖\n⊢ (fun x => sqrt (↑re (inner x x))) (x + y) ≤ (fun x => sqrt (↑re (inner x x))) x + (fun x => sqrt (↑re (inner x x))) y\n[PROOFSTEP]\nhave h₂ : re ⟪x, y⟫ ≤ ‖⟪x, y⟫‖ := re_le_norm _\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝² : IsROrC 𝕜\ninst✝¹ : AddCommGroup F\ninst✝ : Module 𝕜 F\nc : Core 𝕜 F\nx y : F\nh₁ : ‖inner x y‖ ≤ ‖x‖ * ‖y‖\nh₂ : ↑re (inner x y) ≤ ‖inner x y‖\n⊢ (fun x => sqrt (↑re (inner x x))) (x + y) ≤ (fun x => sqrt (↑re (inner x x))) x + (fun x => sqrt (↑re (inner x x))) y\n[PROOFSTEP]\nhave h₃ : re ⟪x, y⟫ ≤ ‖x‖ * ‖y‖ := h₂.trans h₁\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝² : IsROrC 𝕜\ninst✝¹ : AddCommGroup F\ninst✝ : Module 𝕜 F\nc : Core 𝕜 F\nx y : F\nh₁ : ‖inner x y‖ ≤ ‖x‖ * ‖y‖\nh₂ : ↑re (inner x y) ≤ ‖inner x y‖\nh₃ : ↑re (inner x y) ≤ ‖x‖ * ‖y‖\n⊢ (fun x => sqrt (↑re (inner x x))) (x + y) ≤ (fun x => sqrt (↑re (inner x x))) x + (fun x => sqrt (↑re (inner x x))) y\n[PROOFSTEP]\nhave h₄ : re ⟪y, x⟫ ≤ ‖x‖ * ‖y‖ := by rwa [← inner_conj_symm, conj_re]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝² : IsROrC 𝕜\ninst✝¹ : AddCommGroup F\ninst✝ : Module 𝕜 F\nc : Core 𝕜 F\nx y : F\nh₁ : ‖inner x y‖ ≤ ‖x‖ * ‖y‖\nh₂ : ↑re (inner x y) ≤ ‖inner x y‖\nh₃ : ↑re (inner x y) ≤ ‖x‖ * ‖y‖\n⊢ ↑re (inner y x) ≤ ‖x‖ * ‖y‖\n[PROOFSTEP]\nrwa [← inner_conj_symm, conj_re]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝² : IsROrC 𝕜\ninst✝¹ : AddCommGroup F\ninst✝ : Module 𝕜 F\nc : Core 𝕜 F\nx y : F\nh₁ : ‖inner x y‖ ≤ ‖x‖ * ‖y‖\nh₂ : ↑re (inner x y) ≤ ‖inner x y‖\nh₃ : ↑re (inner x y) ≤ ‖x‖ * ‖y‖\nh₄ : ↑re (inner y x) ≤ ‖x‖ * ‖y‖\n⊢ (fun x => sqrt (↑re (inner x x))) (x + y) ≤ (fun x => sqrt (↑re (inner x x))) x + (fun x => sqrt (↑re (inner x x))) y\n[PROOFSTEP]\nhave : ‖x + y‖ * ‖x + y‖ ≤ (‖x‖ + ‖y‖) * (‖x‖ + ‖y‖) :=\n  by\n  simp only [← inner_self_eq_norm_mul_norm, inner_add_add_self, mul_add, mul_comm, map_add]\n  linarith\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝² : IsROrC 𝕜\ninst✝¹ : AddCommGroup F\ninst✝ : Module 𝕜 F\nc : Core 𝕜 F\nx y : F\nh₁ : ‖inner x y‖ ≤ ‖x‖ * ‖y‖\nh₂ : ↑re (inner x y) ≤ ‖inner x y‖\nh₃ : ↑re (inner x y) ≤ ‖x‖ * ‖y‖\nh₄ : ↑re (inner y x) ≤ ‖x‖ * ‖y‖\n⊢ ‖x + y‖ * ‖x + y‖ ≤ (‖x‖ + ‖y‖) * (‖x‖ + ‖y‖)\n[PROOFSTEP]\nsimp only [← inner_self_eq_norm_mul_norm, inner_add_add_self, mul_add, mul_comm, map_add]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝² : IsROrC 𝕜\ninst✝¹ : AddCommGroup F\ninst✝ : Module 𝕜 F\nc : Core 𝕜 F\nx y : F\nh₁ : ‖inner x y‖ ≤ ‖x‖ * ‖y‖\nh₂ : ↑re (inner x y) ≤ ‖inner x y‖\nh₃ : ↑re (inner x y) ≤ ‖x‖ * ‖y‖\nh₄ : ↑re (inner y x) ≤ ‖x‖ * ‖y‖\n⊢ ↑re (inner x x) + ↑re (inner x y) + ↑re (inner y x) + ↑re (inner y y) ≤\n    ↑re (inner x x) + ‖x‖ * ‖y‖ + (‖x‖ * ‖y‖ + ↑re (inner y y))\n[PROOFSTEP]\nlinarith\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝² : IsROrC 𝕜\ninst✝¹ : AddCommGroup F\ninst✝ : Module 𝕜 F\nc : Core 𝕜 F\nx y : F\nh₁ : ‖inner x y‖ ≤ ‖x‖ * ‖y‖\nh₂ : ↑re (inner x y) ≤ ‖inner x y‖\nh₃ : ↑re (inner x y) ≤ ‖x‖ * ‖y‖\nh₄ : ↑re (inner y x) ≤ ‖x‖ * ‖y‖\nthis : ‖x + y‖ * ‖x + y‖ ≤ (‖x‖ + ‖y‖) * (‖x‖ + ‖y‖)\n⊢ (fun x => sqrt (↑re (inner x x))) (x + y) ≤ (fun x => sqrt (↑re (inner x x))) x + (fun x => sqrt (↑re (inner x x))) y\n[PROOFSTEP]\nexact nonneg_le_nonneg_of_sq_le_sq (add_nonneg (sqrt_nonneg _) (sqrt_nonneg _)) this\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝² : IsROrC 𝕜\ninst✝¹ : AddCommGroup F\ninst✝ : Module 𝕜 F\nc : Core 𝕜 F\nx : F\n⊢ (fun x => sqrt (↑re (inner x x))) (-x) = (fun x => sqrt (↑re (inner x x))) x\n[PROOFSTEP]\nsimp only [inner_neg_left, neg_neg, inner_neg_right]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝² : IsROrC 𝕜\ninst✝¹ : AddCommGroup F\ninst✝ : Module 𝕜 F\nc : Core 𝕜 F\nr : 𝕜\nx : F\n⊢ ‖r • x‖ ≤ ‖r‖ * ‖x‖\n[PROOFSTEP]\nrw [norm_eq_sqrt_inner, inner_smul_left, inner_smul_right, ← mul_assoc]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝² : IsROrC 𝕜\ninst✝¹ : AddCommGroup F\ninst✝ : Module 𝕜 F\nc : Core 𝕜 F\nr : 𝕜\nx : F\n⊢ sqrt (↑re (↑(starRingEnd 𝕜) r * r * inner x x)) ≤ ‖r‖ * ‖x‖\n[PROOFSTEP]\nrw [IsROrC.conj_mul, ofReal_mul_re, sqrt_mul, ← ofReal_normSq_eq_inner_self, ofReal_re]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝² : IsROrC 𝕜\ninst✝¹ : AddCommGroup F\ninst✝ : Module 𝕜 F\nc : Core 𝕜 F\nr : 𝕜\nx : F\n⊢ sqrt (↑IsROrC.normSq r) * sqrt (normSq x) ≤ ‖r‖ * ‖x‖\n[PROOFSTEP]\nsimp [sqrt_normSq_eq_norm, IsROrC.sqrt_normSq_eq_norm]\n[GOAL]\ncase hx\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝² : IsROrC 𝕜\ninst✝¹ : AddCommGroup F\ninst✝ : Module 𝕜 F\nc : Core 𝕜 F\nr : 𝕜\nx : F\n⊢ 0 ≤ ↑IsROrC.normSq r\n[PROOFSTEP]\nexact normSq_nonneg r\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝² : IsROrC 𝕜\ninst✝¹ : AddCommGroup F\ninst✝ : Module 𝕜 F\nc : Core 𝕜 F\nthis : NormedSpace 𝕜 F := Core.toNormedSpace\nx : F\n⊢ ‖x‖ ^ 2 = ↑re (inner x x)\n[PROOFSTEP]\nhave h₁ : ‖x‖ ^ 2 = sqrt (re (c.inner x x)) ^ 2 := rfl\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝² : IsROrC 𝕜\ninst✝¹ : AddCommGroup F\ninst✝ : Module 𝕜 F\nc : Core 𝕜 F\nthis : NormedSpace 𝕜 F := Core.toNormedSpace\nx : F\nh₁ : ‖x‖ ^ 2 = sqrt (↑re (inner x x)) ^ 2\n⊢ ‖x‖ ^ 2 = ↑re (inner x x)\n[PROOFSTEP]\nhave h₂ : 0 ≤ re (c.inner x x) := InnerProductSpace.Core.inner_self_nonneg\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝² : IsROrC 𝕜\ninst✝¹ : AddCommGroup F\ninst✝ : Module 𝕜 F\nc : Core 𝕜 F\nthis : NormedSpace 𝕜 F := Core.toNormedSpace\nx : F\nh₁ : ‖x‖ ^ 2 = sqrt (↑re (inner x x)) ^ 2\nh₂ : 0 ≤ ↑re (inner x x)\n⊢ ‖x‖ ^ 2 = ↑re (inner x x)\n[PROOFSTEP]\nsimp [h₁, sq_sqrt, h₂]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\n⊢ inner x y = 0 ↔ inner y x = 0\n[PROOFSTEP]\nrw [← inner_conj_symm]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\n⊢ ↑(starRingEnd 𝕜) (inner y x) = 0 ↔ inner y x = 0\n[PROOFSTEP]\nexact star_eq_zero\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx : E\n⊢ ↑im (inner x x) = 0\n[PROOFSTEP]\nrw [← @ofReal_inj 𝕜, im_eq_conj_sub]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx : E\n⊢ I * (↑(starRingEnd 𝕜) (inner x x) - inner x x) / 2 = ↑0\n[PROOFSTEP]\nsimp\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y z : E\n⊢ inner x (y + z) = inner x y + inner x z\n[PROOFSTEP]\nrw [← inner_conj_symm, inner_add_left, RingHom.map_add]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y z : E\n⊢ ↑(starRingEnd 𝕜) (inner y x) + ↑(starRingEnd 𝕜) (inner z x) = inner x y + inner x z\n[PROOFSTEP]\nsimp only [inner_conj_symm]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\n⊢ ↑re (inner x y) = ↑re (inner y x)\n[PROOFSTEP]\nrw [← inner_conj_symm, conj_re]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\n⊢ ↑im (inner x y) = -↑im (inner y x)\n[PROOFSTEP]\nrw [← inner_conj_symm, conj_im]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\nr : ℝ\n⊢ inner (↑r • x) y = r • inner x y\n[PROOFSTEP]\nrw [inner_smul_left, conj_ofReal, Algebra.smul_def]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\nr : ℝ\n⊢ ↑r * inner x y = ↑(algebraMap ℝ 𝕜) r * inner x y\n[PROOFSTEP]\nrfl\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\nr : 𝕜\n⊢ inner x (r • y) = r * inner x y\n[PROOFSTEP]\nrw [← inner_conj_symm, inner_smul_left, RingHom.map_mul, conj_conj, inner_conj_symm]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\nr : ℝ\n⊢ inner x (↑r • y) = r • inner x y\n[PROOFSTEP]\nrw [inner_smul_right, Algebra.smul_def]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\nr : ℝ\n⊢ ↑r * inner x y = ↑(algebraMap ℝ 𝕜) r * inner x y\n[PROOFSTEP]\nrfl\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\nl : ι →₀ 𝕜\nv : ι → E\nx : E\n⊢ inner (sum l fun i a => a • v i) x = sum l fun i a => ↑(starRingEnd 𝕜) a • inner (v i) x\n[PROOFSTEP]\nconvert _root_.sum_inner (𝕜 := 𝕜) l.support (fun a => l a • v a) x\n[GOAL]\ncase h.e'_3\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\nl : ι →₀ 𝕜\nv : ι → E\nx : E\n⊢ (sum l fun i a => ↑(starRingEnd 𝕜) a • inner (v i) x) = ∑ i in l.support, inner (↑l i • v i) x\n[PROOFSTEP]\nsimp only [inner_smul_left, Finsupp.sum, smul_eq_mul]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\nl : ι →₀ 𝕜\nv : ι → E\nx : E\n⊢ inner x (sum l fun i a => a • v i) = sum l fun i a => a • inner x (v i)\n[PROOFSTEP]\nconvert _root_.inner_sum (𝕜 := 𝕜) l.support (fun a => l a • v a) x\n[GOAL]\ncase h.e'_3\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\nl : ι →₀ 𝕜\nv : ι → E\nx : E\n⊢ (sum l fun i a => a • inner x (v i)) = ∑ i in l.support, inner x (↑l i • v i)\n[PROOFSTEP]\nsimp only [inner_smul_right, Finsupp.sum, smul_eq_mul]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec : DecidableEq ι\nα : ι → Type u_5\ninst✝¹ : (i : ι) → AddZeroClass (α i)\ninst✝ : (i : ι) → (x : α i) → Decidable (x ≠ 0)\nf : (i : ι) → α i → E\nl : Π₀ (i : ι), α i\nx : E\n⊢ inner (sum l f) x = sum l fun i a => inner (f i a) x\n[PROOFSTEP]\nsimp (config := { contextual := true }) only [DFinsupp.sum, _root_.sum_inner, smul_eq_mul]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec : DecidableEq ι\nα : ι → Type u_5\ninst✝¹ : (i : ι) → AddZeroClass (α i)\ninst✝ : (i : ι) → (x : α i) → Decidable (x ≠ 0)\nf : (i : ι) → α i → E\nl : Π₀ (i : ι), α i\nx : E\n⊢ inner x (sum l f) = sum l fun i a => inner x (f i a)\n[PROOFSTEP]\nsimp (config := { contextual := true }) only [DFinsupp.sum, _root_.inner_sum, smul_eq_mul]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx : E\n⊢ inner 0 x = 0\n[PROOFSTEP]\nrw [← zero_smul 𝕜 (0 : E), inner_smul_left, RingHom.map_zero, zero_mul]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx : E\n⊢ ↑re (inner 0 x) = 0\n[PROOFSTEP]\nsimp only [inner_zero_left, AddMonoidHom.map_zero]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx : E\n⊢ inner x 0 = 0\n[PROOFSTEP]\nrw [← inner_conj_symm, inner_zero_left, RingHom.map_zero]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx : E\n⊢ ↑re (inner x 0) = 0\n[PROOFSTEP]\nsimp only [inner_zero_right, AddMonoidHom.map_zero]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx : E\n⊢ inner x x = ↑‖x‖ ^ 2\n[PROOFSTEP]\nrw [← inner_self_ofReal_re, ← norm_sq_eq_inner, ofReal_pow]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx : E\n⊢ ↑re (inner x x) = ‖inner x x‖\n[PROOFSTEP]\nconv_rhs => rw [← inner_self_ofReal_re]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx : E\n| ‖inner x x‖\n[PROOFSTEP]\nrw [← inner_self_ofReal_re]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx : E\n| ‖inner x x‖\n[PROOFSTEP]\nrw [← inner_self_ofReal_re]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx : E\n| ‖inner x x‖\n[PROOFSTEP]\nrw [← inner_self_ofReal_re]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx : E\n⊢ ↑re (inner x x) = ‖↑(↑re (inner x x))‖\n[PROOFSTEP]\nsymm\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx : E\n⊢ ‖↑(↑re (inner x x))‖ = ↑re (inner x x)\n[PROOFSTEP]\nexact norm_of_nonneg inner_self_nonneg\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx : E\n⊢ ↑‖inner x x‖ = inner x x\n[PROOFSTEP]\nrw [← inner_self_re_eq_norm]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx : E\n⊢ ↑(↑re (inner x x)) = inner x x\n[PROOFSTEP]\nexact inner_self_ofReal_re _\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx : E\n⊢ inner x x = 0 ↔ x = 0\n[PROOFSTEP]\nrw [inner_self_eq_norm_sq_to_K, sq_eq_zero_iff, ofReal_eq_zero, norm_eq_zero]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx : E\n⊢ ↑re (inner x x) ≤ 0 ↔ x = 0\n[PROOFSTEP]\nrw [← norm_sq_eq_inner, (sq_nonneg _).le_iff_eq, sq_eq_zero_iff, norm_eq_zero]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\n⊢ ‖inner x y‖ = ‖inner y x‖\n[PROOFSTEP]\nrw [← inner_conj_symm, norm_conj]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\n⊢ inner (-x) y = -inner x y\n[PROOFSTEP]\nrw [← neg_one_smul 𝕜 x, inner_smul_left]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\n⊢ ↑(starRingEnd 𝕜) (-1) * inner x y = -inner x y\n[PROOFSTEP]\nsimp\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\n⊢ inner x (-y) = -inner x y\n[PROOFSTEP]\nrw [← inner_conj_symm, inner_neg_left]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\n⊢ ↑(starRingEnd 𝕜) (-inner y x) = -inner x y\n[PROOFSTEP]\nsimp only [RingHom.map_neg, inner_conj_symm]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\n⊢ inner (-x) (-y) = inner x y\n[PROOFSTEP]\nsimp\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y z : E\n⊢ inner (x - y) z = inner x z - inner y z\n[PROOFSTEP]\nsimp [sub_eq_add_neg, inner_add_left]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y z : E\n⊢ inner x (y - z) = inner x y - inner x z\n[PROOFSTEP]\nsimp [sub_eq_add_neg, inner_add_right]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\n⊢ ↑re (inner x y * inner y x) = ‖inner x y * inner y x‖\n[PROOFSTEP]\nrw [← inner_conj_symm, mul_comm]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\n⊢ ↑re (inner y x * ↑(starRingEnd 𝕜) (inner y x)) = ‖inner y x * ↑(starRingEnd 𝕜) (inner y x)‖\n[PROOFSTEP]\nexact re_eq_norm_of_mul_conj (inner y x)\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\n⊢ inner (x + y) (x + y) = inner x x + inner x y + inner y x + inner y y\n[PROOFSTEP]\nsimp only [inner_add_left, inner_add_right]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\n⊢ inner x x + inner y x + (inner x y + inner y y) = inner x x + inner x y + inner y x + inner y y\n[PROOFSTEP]\nring\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : F\n⊢ inner (x + y) (x + y) = inner x x + 2 * inner x y + inner y y\n[PROOFSTEP]\nhave : ⟪y, x⟫_ℝ = ⟪x, y⟫_ℝ := by rw [← inner_conj_symm]; rfl\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : F\n⊢ inner y x = inner x y\n[PROOFSTEP]\nrw [← inner_conj_symm]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : F\n⊢ ↑(starRingEnd ℝ) (inner x y) = inner x y\n[PROOFSTEP]\nrfl\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : F\nthis : inner y x = inner x y\n⊢ inner (x + y) (x + y) = inner x x + 2 * inner x y + inner y y\n[PROOFSTEP]\nsimp only [inner_add_add_self, this, add_left_inj]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : F\nthis : inner y x = inner x y\n⊢ inner x x + inner x y + inner x y = inner x x + 2 * inner x y\n[PROOFSTEP]\nring\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\n⊢ inner (x - y) (x - y) = inner x x - inner x y - inner y x + inner y y\n[PROOFSTEP]\nsimp only [inner_sub_left, inner_sub_right]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\n⊢ inner x x - inner y x - (inner x y - inner y y) = inner x x - inner x y - inner y x + inner y y\n[PROOFSTEP]\nring\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : F\n⊢ inner (x - y) (x - y) = inner x x - 2 * inner x y + inner y y\n[PROOFSTEP]\nhave : ⟪y, x⟫_ℝ = ⟪x, y⟫_ℝ := by rw [← inner_conj_symm]; rfl\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : F\n⊢ inner y x = inner x y\n[PROOFSTEP]\nrw [← inner_conj_symm]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : F\n⊢ ↑(starRingEnd ℝ) (inner x y) = inner x y\n[PROOFSTEP]\nrfl\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : F\nthis : inner y x = inner x y\n⊢ inner (x - y) (x - y) = inner x x - 2 * inner x y + inner y y\n[PROOFSTEP]\nsimp only [inner_sub_sub_self, this, add_left_inj]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : F\nthis : inner y x = inner x y\n⊢ inner x x - inner x y - inner x y = inner x x - 2 * inner x y\n[PROOFSTEP]\nring\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\nh : ∀ (v : E), inner v x = inner v y\n⊢ x = y\n[PROOFSTEP]\nrw [← sub_eq_zero, ← @inner_self_eq_zero 𝕜, inner_sub_right, sub_eq_zero, h (x - y)]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\nh : ∀ (v : E), inner x v = inner y v\n⊢ x = y\n[PROOFSTEP]\nrw [← sub_eq_zero, ← @inner_self_eq_zero 𝕜, inner_sub_left, sub_eq_zero, h (x - y)]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\n⊢ inner (x + y) (x + y) + inner (x - y) (x - y) = 2 * (inner x x + inner y y)\n[PROOFSTEP]\nsimp only [inner_add_add_self, inner_sub_sub_self]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\n⊢ inner x x + inner x y + inner y x + inner y y + (inner x x - inner x y - inner y x + inner y y) =\n    2 * (inner x x + inner y y)\n[PROOFSTEP]\nring\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : F\n⊢ inner x y * inner x y ≤ ‖inner x y‖ * ‖inner y x‖\n[PROOFSTEP]\nrw [real_inner_comm y, ← norm_mul]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : F\n⊢ inner y x * inner y x ≤ ‖inner y x * inner y x‖\n[PROOFSTEP]\nexact le_abs_self _\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\nv : ι → E\nhz : ∀ (i : ι), v i ≠ 0\nho : ∀ (i j : ι), i ≠ j → inner (v i) (v j) = 0\n⊢ LinearIndependent 𝕜 v\n[PROOFSTEP]\nrw [linearIndependent_iff']\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\nv : ι → E\nhz : ∀ (i : ι), v i ≠ 0\nho : ∀ (i j : ι), i ≠ j → inner (v i) (v j) = 0\n⊢ ∀ (s : Finset ι) (g : ι → 𝕜), ∑ i in s, g i • v i = 0 → ∀ (i : ι), i ∈ s → g i = 0\n[PROOFSTEP]\nintro s g hg i hi\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\nv : ι → E\nhz : ∀ (i : ι), v i ≠ 0\nho : ∀ (i j : ι), i ≠ j → inner (v i) (v j) = 0\ns : Finset ι\ng : ι → 𝕜\nhg : ∑ i in s, g i • v i = 0\ni : ι\nhi : i ∈ s\n⊢ g i = 0\n[PROOFSTEP]\nhave h' : g i * inner (v i) (v i) = inner (v i) (∑ j in s, g j • v j) :=\n  by\n  rw [inner_sum]\n  symm\n  convert Finset.sum_eq_single (β := 𝕜) i ?_ ?_\n  · rw [inner_smul_right]\n  · intro j _hj hji\n    rw [inner_smul_right, ho i j hji.symm, mul_zero]\n  · exact fun h => False.elim (h hi)\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\nv : ι → E\nhz : ∀ (i : ι), v i ≠ 0\nho : ∀ (i j : ι), i ≠ j → inner (v i) (v j) = 0\ns : Finset ι\ng : ι → 𝕜\nhg : ∑ i in s, g i • v i = 0\ni : ι\nhi : i ∈ s\n⊢ g i * inner (v i) (v i) = inner (v i) (∑ j in s, g j • v j)\n[PROOFSTEP]\nrw [inner_sum]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\nv : ι → E\nhz : ∀ (i : ι), v i ≠ 0\nho : ∀ (i j : ι), i ≠ j → inner (v i) (v j) = 0\ns : Finset ι\ng : ι → 𝕜\nhg : ∑ i in s, g i • v i = 0\ni : ι\nhi : i ∈ s\n⊢ g i * inner (v i) (v i) = ∑ i_1 in s, inner (v i) (g i_1 • v i_1)\n[PROOFSTEP]\nsymm\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\nv : ι → E\nhz : ∀ (i : ι), v i ≠ 0\nho : ∀ (i j : ι), i ≠ j → inner (v i) (v j) = 0\ns : Finset ι\ng : ι → 𝕜\nhg : ∑ i in s, g i • v i = 0\ni : ι\nhi : i ∈ s\n⊢ ∑ i_1 in s, inner (v i) (g i_1 • v i_1) = g i * inner (v i) (v i)\n[PROOFSTEP]\nconvert Finset.sum_eq_single (β := 𝕜) i ?_ ?_\n[GOAL]\ncase h.e'_3\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\nv : ι → E\nhz : ∀ (i : ι), v i ≠ 0\nho : ∀ (i j : ι), i ≠ j → inner (v i) (v j) = 0\ns : Finset ι\ng : ι → 𝕜\nhg : ∑ i in s, g i • v i = 0\ni : ι\nhi : i ∈ s\n⊢ g i * inner (v i) (v i) = inner (v i) (g i • v i)\n[PROOFSTEP]\nrw [inner_smul_right]\n[GOAL]\ncase convert_3\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\nv : ι → E\nhz : ∀ (i : ι), v i ≠ 0\nho : ∀ (i j : ι), i ≠ j → inner (v i) (v j) = 0\ns : Finset ι\ng : ι → 𝕜\nhg : ∑ i in s, g i • v i = 0\ni : ι\nhi : i ∈ s\n⊢ ∀ (b : ι), b ∈ s → b ≠ i → inner (v i) (g b • v b) = 0\n[PROOFSTEP]\nintro j _hj hji\n[GOAL]\ncase convert_3\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\nv : ι → E\nhz : ∀ (i : ι), v i ≠ 0\nho : ∀ (i j : ι), i ≠ j → inner (v i) (v j) = 0\ns : Finset ι\ng : ι → 𝕜\nhg : ∑ i in s, g i • v i = 0\ni : ι\nhi : i ∈ s\nj : ι\n_hj : j ∈ s\nhji : j ≠ i\n⊢ inner (v i) (g j • v j) = 0\n[PROOFSTEP]\nrw [inner_smul_right, ho i j hji.symm, mul_zero]\n[GOAL]\ncase convert_4\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\nv : ι → E\nhz : ∀ (i : ι), v i ≠ 0\nho : ∀ (i j : ι), i ≠ j → inner (v i) (v j) = 0\ns : Finset ι\ng : ι → 𝕜\nhg : ∑ i in s, g i • v i = 0\ni : ι\nhi : i ∈ s\n⊢ ¬i ∈ s → inner (v i) (g i • v i) = 0\n[PROOFSTEP]\nexact fun h => False.elim (h hi)\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\nv : ι → E\nhz : ∀ (i : ι), v i ≠ 0\nho : ∀ (i j : ι), i ≠ j → inner (v i) (v j) = 0\ns : Finset ι\ng : ι → 𝕜\nhg : ∑ i in s, g i • v i = 0\ni : ι\nhi : i ∈ s\nh' : g i * inner (v i) (v i) = inner (v i) (∑ j in s, g j • v j)\n⊢ g i = 0\n[PROOFSTEP]\nsimpa [hg, hz] using h'\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nv : ι → E\n⊢ Orthonormal 𝕜 v ↔ ∀ (i j : ι), inner (v i) (v j) = if i = j then 1 else 0\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nv : ι → E\n⊢ Orthonormal 𝕜 v → ∀ (i j : ι), inner (v i) (v j) = if i = j then 1 else 0\n[PROOFSTEP]\nintro hv i j\n[GOAL]\ncase mp\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nv : ι → E\nhv : Orthonormal 𝕜 v\ni j : ι\n⊢ inner (v i) (v j) = if i = j then 1 else 0\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nv : ι → E\nhv : Orthonormal 𝕜 v\ni j : ι\nh : i = j\n⊢ inner (v i) (v j) = 1\n[PROOFSTEP]\nsimp [h, inner_self_eq_norm_sq_to_K, hv.1]\n[GOAL]\ncase neg\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nv : ι → E\nhv : Orthonormal 𝕜 v\ni j : ι\nh : ¬i = j\n⊢ inner (v i) (v j) = 0\n[PROOFSTEP]\nexact hv.2 h\n[GOAL]\ncase mpr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nv : ι → E\n⊢ (∀ (i j : ι), inner (v i) (v j) = if i = j then 1 else 0) → Orthonormal 𝕜 v\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nv : ι → E\nh : ∀ (i j : ι), inner (v i) (v j) = if i = j then 1 else 0\n⊢ Orthonormal 𝕜 v\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mpr.left\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nv : ι → E\nh : ∀ (i j : ι), inner (v i) (v j) = if i = j then 1 else 0\n⊢ ∀ (i : ι), ‖v i‖ = 1\n[PROOFSTEP]\nintro i\n[GOAL]\ncase mpr.left\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nv : ι → E\nh : ∀ (i j : ι), inner (v i) (v j) = if i = j then 1 else 0\ni : ι\n⊢ ‖v i‖ = 1\n[PROOFSTEP]\nhave h' : ‖v i‖ ^ 2 = 1 ^ 2 := by simp [@norm_sq_eq_inner 𝕜, h i i]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nv : ι → E\nh : ∀ (i j : ι), inner (v i) (v j) = if i = j then 1 else 0\ni : ι\n⊢ ‖v i‖ ^ 2 = 1 ^ 2\n[PROOFSTEP]\nsimp [@norm_sq_eq_inner 𝕜, h i i]\n[GOAL]\ncase mpr.left\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nv : ι → E\nh : ∀ (i j : ι), inner (v i) (v j) = if i = j then 1 else 0\ni : ι\nh' : ‖v i‖ ^ 2 = 1 ^ 2\n⊢ ‖v i‖ = 1\n[PROOFSTEP]\nhave h₁ : 0 ≤ ‖v i‖ := norm_nonneg _\n[GOAL]\ncase mpr.left\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nv : ι → E\nh : ∀ (i j : ι), inner (v i) (v j) = if i = j then 1 else 0\ni : ι\nh' : ‖v i‖ ^ 2 = 1 ^ 2\nh₁ : 0 ≤ ‖v i‖\n⊢ ‖v i‖ = 1\n[PROOFSTEP]\nhave h₂ : (0 : ℝ) ≤ 1 := zero_le_one\n[GOAL]\ncase mpr.left\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nv : ι → E\nh : ∀ (i j : ι), inner (v i) (v j) = if i = j then 1 else 0\ni : ι\nh' : ‖v i‖ ^ 2 = 1 ^ 2\nh₁ : 0 ≤ ‖v i‖\nh₂ : 0 ≤ 1\n⊢ ‖v i‖ = 1\n[PROOFSTEP]\nrwa [sq_eq_sq h₁ h₂] at h' \n[GOAL]\ncase mpr.right\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nv : ι → E\nh : ∀ (i j : ι), inner (v i) (v j) = if i = j then 1 else 0\n⊢ ∀ {i j : ι}, i ≠ j → inner (v i) (v j) = 0\n[PROOFSTEP]\nintro i j hij\n[GOAL]\ncase mpr.right\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nv : ι → E\nh : ∀ (i j : ι), inner (v i) (v j) = if i = j then 1 else 0\ni j : ι\nhij : i ≠ j\n⊢ inner (v i) (v j) = 0\n[PROOFSTEP]\nsimpa [hij] using h i j\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\ns : Set E\n⊢ Orthonormal 𝕜 Subtype.val ↔ ∀ (v : E), v ∈ s → ∀ (w : E), w ∈ s → inner v w = if v = w then 1 else 0\n[PROOFSTEP]\nrw [orthonormal_iff_ite]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\ns : Set E\n⊢ (∀ (i j : { x // x ∈ s }), inner ↑i ↑j = if i = j then 1 else 0) ↔\n    ∀ (v : E), v ∈ s → ∀ (w : E), w ∈ s → inner v w = if v = w then 1 else 0\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\ns : Set E\n⊢ (∀ (i j : { x // x ∈ s }), inner ↑i ↑j = if i = j then 1 else 0) →\n    ∀ (v : E), v ∈ s → ∀ (w : E), w ∈ s → inner v w = if v = w then 1 else 0\n[PROOFSTEP]\nintro h v hv w hw\n[GOAL]\ncase mp\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\ns : Set E\nh : ∀ (i j : { x // x ∈ s }), inner ↑i ↑j = if i = j then 1 else 0\nv : E\nhv : v ∈ s\nw : E\nhw : w ∈ s\n⊢ inner v w = if v = w then 1 else 0\n[PROOFSTEP]\nconvert h ⟨v, hv⟩ ⟨w, hw⟩ using 1\n[GOAL]\ncase h.e'_3\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\ns : Set E\nh : ∀ (i j : { x // x ∈ s }), inner ↑i ↑j = if i = j then 1 else 0\nv : E\nhv : v ∈ s\nw : E\nhw : w ∈ s\n⊢ (if v = w then 1 else 0) = if { val := v, property := hv } = { val := w, property := hw } then 1 else 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mpr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\ns : Set E\n⊢ (∀ (v : E), v ∈ s → ∀ (w : E), w ∈ s → inner v w = if v = w then 1 else 0) →\n    ∀ (i j : { x // x ∈ s }), inner ↑i ↑j = if i = j then 1 else 0\n[PROOFSTEP]\nrintro h ⟨v, hv⟩ ⟨w, hw⟩\n[GOAL]\ncase mpr.mk.mk\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\ns : Set E\nh : ∀ (v : E), v ∈ s → ∀ (w : E), w ∈ s → inner v w = if v = w then 1 else 0\nv : E\nhv : v ∈ s\nw : E\nhw : w ∈ s\n⊢ inner ↑{ val := v, property := hv } ↑{ val := w, property := hw } =\n    if { val := v, property := hv } = { val := w, property := hw } then 1 else 0\n[PROOFSTEP]\nconvert h v hv w hw using 1\n[GOAL]\ncase h.e'_3\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\ns : Set E\nh : ∀ (v : E), v ∈ s → ∀ (w : E), w ∈ s → inner v w = if v = w then 1 else 0\nv : E\nhv : v ∈ s\nw : E\nhw : w ∈ s\n⊢ (if { val := v, property := hv } = { val := w, property := hw } then 1 else 0) = if v = w then 1 else 0\n[PROOFSTEP]\nsimp\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nv : ι → E\nhv : Orthonormal 𝕜 v\nl : ι →₀ 𝕜\ni : ι\n⊢ inner (v i) (↑(Finsupp.total ι E 𝕜 v) l) = ↑l i\n[PROOFSTEP]\nclassical!\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nv : ι → E\nhv : Orthonormal 𝕜 v\nl : ι →₀ 𝕜\ni : ι\nem✝ : (a : Prop) → Decidable a\n⊢ inner (v i) (↑(Finsupp.total ι E 𝕜 v) l) = ↑l i\n[PROOFSTEP]\nsimpa [Finsupp.total_apply, Finsupp.inner_sum, orthonormal_iff_ite.mp hv] using Eq.symm\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nv : ι → E\nhv : Orthonormal 𝕜 v\nl : ι → 𝕜\ns : Finset ι\ni : ι\nhi : i ∈ s\n⊢ inner (v i) (∑ i in s, l i • v i) = l i\n[PROOFSTEP]\nclassical!\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nv : ι → E\nhv : Orthonormal 𝕜 v\nl : ι → 𝕜\ns : Finset ι\ni : ι\nhi : i ∈ s\nem✝ : (a : Prop) → Decidable a\n⊢ inner (v i) (∑ i in s, l i • v i) = l i\n[PROOFSTEP]\nsimp [inner_sum, inner_smul_right, orthonormal_iff_ite.mp hv, hi]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nv : ι → E\nhv : Orthonormal 𝕜 v\nl : ι →₀ 𝕜\ni : ι\n⊢ inner (↑(Finsupp.total ι E 𝕜 v) l) (v i) = ↑(starRingEnd ((fun x => 𝕜) i)) (↑l i)\n[PROOFSTEP]\nrw [← inner_conj_symm, hv.inner_right_finsupp]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nv : ι → E\nhv : Orthonormal 𝕜 v\nl : ι → 𝕜\ns : Finset ι\ni : ι\nhi : i ∈ s\n⊢ inner (∑ i in s, l i • v i) (v i) = ↑(starRingEnd 𝕜) (l i)\n[PROOFSTEP]\nclassical!\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nv : ι → E\nhv : Orthonormal 𝕜 v\nl : ι → 𝕜\ns : Finset ι\ni : ι\nhi : i ∈ s\nem✝ : (a : Prop) → Decidable a\n⊢ inner (∑ i in s, l i • v i) (v i) = ↑(starRingEnd 𝕜) (l i)\n[PROOFSTEP]\nsimp only [sum_inner, inner_smul_left, orthonormal_iff_ite.mp hv, hi, mul_boole, Finset.sum_ite_eq', if_true]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nv : ι → E\nhv : Orthonormal 𝕜 v\nl₁ l₂ : ι →₀ 𝕜\n⊢ inner (↑(Finsupp.total ι E 𝕜 v) l₁) (↑(Finsupp.total ι E 𝕜 v) l₂) =\n    Finsupp.sum l₁ fun i y => ↑(starRingEnd 𝕜) y * ↑l₂ i\n[PROOFSTEP]\nsimp only [l₁.total_apply _, Finsupp.sum_inner, hv.inner_right_finsupp, smul_eq_mul]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nv : ι → E\nhv : Orthonormal 𝕜 v\nl₁ l₂ : ι →₀ 𝕜\n⊢ inner (↑(Finsupp.total ι E 𝕜 v) l₁) (↑(Finsupp.total ι E 𝕜 v) l₂) =\n    Finsupp.sum l₂ fun i y => ↑(starRingEnd ((fun x => 𝕜) i)) (↑l₁ i) * y\n[PROOFSTEP]\nsimp only [l₂.total_apply _, Finsupp.inner_sum, hv.inner_left_finsupp, mul_comm, smul_eq_mul]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nv : ι → E\nhv : Orthonormal 𝕜 v\nl₁ l₂ : ι → 𝕜\ns : Finset ι\n⊢ inner (∑ i in s, l₁ i • v i) (∑ i in s, l₂ i • v i) = ∑ i in s, ↑(starRingEnd 𝕜) (l₁ i) * l₂ i\n[PROOFSTEP]\nsimp_rw [sum_inner, inner_smul_left]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nv : ι → E\nhv : Orthonormal 𝕜 v\nl₁ l₂ : ι → 𝕜\ns : Finset ι\n⊢ ∑ x in s, ↑(starRingEnd 𝕜) (l₁ x) * inner (v x) (∑ i in s, l₂ i • v i) = ∑ x in s, ↑(starRingEnd 𝕜) (l₁ x) * l₂ x\n[PROOFSTEP]\nrefine' Finset.sum_congr rfl fun i hi => _\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nv : ι → E\nhv : Orthonormal 𝕜 v\nl₁ l₂ : ι → 𝕜\ns : Finset ι\ni : ι\nhi : i ∈ s\n⊢ ↑(starRingEnd 𝕜) (l₁ i) * inner (v i) (∑ i in s, l₂ i • v i) = ↑(starRingEnd 𝕜) (l₁ i) * l₂ i\n[PROOFSTEP]\nrw [hv.inner_right_sum l₂ hi]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\ns : Finset ι\nv : ι → E\nhv : Orthonormal 𝕜 v\na : ι → ι → 𝕜\n⊢ ∑ i in s, ∑ j in s, a i j • inner (v j) (v i) = ∑ k in s, a k k\n[PROOFSTEP]\nclassical!\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\ns : Finset ι\nv : ι → E\nhv : Orthonormal 𝕜 v\na : ι → ι → 𝕜\nem✝ : (a : Prop) → Decidable a\n⊢ ∑ i in s, ∑ j in s, a i j • inner (v j) (v i) = ∑ k in s, a k k\n[PROOFSTEP]\nsimp [orthonormal_iff_ite.mp hv, Finset.sum_ite_of_true]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nv : ι → E\nhv : Orthonormal 𝕜 v\n⊢ LinearIndependent 𝕜 v\n[PROOFSTEP]\nrw [linearIndependent_iff]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nv : ι → E\nhv : Orthonormal 𝕜 v\n⊢ ∀ (l : ι →₀ 𝕜), ↑(Finsupp.total ι E 𝕜 v) l = 0 → l = 0\n[PROOFSTEP]\nintro l hl\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nv : ι → E\nhv : Orthonormal 𝕜 v\nl : ι →₀ 𝕜\nhl : ↑(Finsupp.total ι E 𝕜 v) l = 0\n⊢ l = 0\n[PROOFSTEP]\next i\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nv : ι → E\nhv : Orthonormal 𝕜 v\nl : ι →₀ 𝕜\nhl : ↑(Finsupp.total ι E 𝕜 v) l = 0\ni : ι\n⊢ ↑l i = ↑0 i\n[PROOFSTEP]\nhave key : ⟪v i, Finsupp.total ι E 𝕜 v l⟫ = ⟪v i, 0⟫ := by rw [hl]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nv : ι → E\nhv : Orthonormal 𝕜 v\nl : ι →₀ 𝕜\nhl : ↑(Finsupp.total ι E 𝕜 v) l = 0\ni : ι\n⊢ inner (v i) (↑(Finsupp.total ι E 𝕜 v) l) = inner (v i) 0\n[PROOFSTEP]\nrw [hl]\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nv : ι → E\nhv : Orthonormal 𝕜 v\nl : ι →₀ 𝕜\nhl : ↑(Finsupp.total ι E 𝕜 v) l = 0\ni : ι\nkey : inner (v i) (↑(Finsupp.total ι E 𝕜 v) l) = inner (v i) 0\n⊢ ↑l i = ↑0 i\n[PROOFSTEP]\nsimpa only [hv.inner_right_finsupp, inner_zero_right] using key\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nι' : Type u_5\nv : ι → E\nhv : Orthonormal 𝕜 v\nf : ι' → ι\nhf : Function.Injective f\n⊢ Orthonormal 𝕜 (v ∘ f)\n[PROOFSTEP]\nclassical!\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nι' : Type u_5\nv : ι → E\nhv : Orthonormal 𝕜 v\nf : ι' → ι\nhf : Function.Injective f\nem✝ : (a : Prop) → Decidable a\n⊢ Orthonormal 𝕜 (v ∘ f)\n[PROOFSTEP]\nrw [orthonormal_iff_ite] at hv ⊢\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nι' : Type u_5\nv : ι → E\nf : ι' → ι\nhf : Function.Injective f\nem✝ : (a : Prop) → Decidable a\nhv : ∀ (i j : ι), inner (v i) (v j) = if i = j then 1 else 0\n⊢ ∀ (i j : ι'), inner ((v ∘ f) i) ((v ∘ f) j) = if i = j then 1 else 0\n[PROOFSTEP]\nintro i j\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nι' : Type u_5\nv : ι → E\nf : ι' → ι\nhf : Function.Injective f\nem✝ : (a : Prop) → Decidable a\nhv : ∀ (i j : ι), inner (v i) (v j) = if i = j then 1 else 0\ni j : ι'\n⊢ inner ((v ∘ f) i) ((v ∘ f) j) = if i = j then 1 else 0\n[PROOFSTEP]\nconvert hv (f i) (f j) using 1\n[GOAL]\ncase h.e'_3\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nι' : Type u_5\nv : ι → E\nf : ι' → ι\nhf : Function.Injective f\nem✝ : (a : Prop) → Decidable a\nhv : ∀ (i j : ι), inner (v i) (v j) = if i = j then 1 else 0\ni j : ι'\n⊢ (if i = j then 1 else 0) = if f i = f j then 1 else 0\n[PROOFSTEP]\nsimp [hf.eq_iff]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nv : ι → E\nhv : Function.Injective v\n⊢ Orthonormal 𝕜 Subtype.val ↔ Orthonormal 𝕜 v\n[PROOFSTEP]\nlet f : ι ≃ Set.range v := Equiv.ofInjective v hv\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nv : ι → E\nhv : Function.Injective v\nf : ι ≃ ↑(Set.range v) := Equiv.ofInjective v hv\n⊢ Orthonormal 𝕜 Subtype.val ↔ Orthonormal 𝕜 v\n[PROOFSTEP]\nrefine' ⟨fun h => h.comp f f.injective, fun h => _⟩\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nv : ι → E\nhv : Function.Injective v\nf : ι ≃ ↑(Set.range v) := Equiv.ofInjective v hv\nh : Orthonormal 𝕜 v\n⊢ Orthonormal 𝕜 Subtype.val\n[PROOFSTEP]\nrw [← Equiv.self_comp_ofInjective_symm hv]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nv : ι → E\nhv : Function.Injective v\nf : ι ≃ ↑(Set.range v) := Equiv.ofInjective v hv\nh : Orthonormal 𝕜 v\n⊢ Orthonormal 𝕜 (v ∘ ↑(Equiv.ofInjective v hv).symm)\n[PROOFSTEP]\nexact h.comp f.symm f.symm.injective\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nv : ι → E\nhv : Orthonormal 𝕜 v\ns : Set ι\ni : ι\nhi : ¬i ∈ s\nl : ι →₀ 𝕜\nhl : l ∈ Finsupp.supported 𝕜 𝕜 s\n⊢ inner (↑(Finsupp.total ι E 𝕜 v) l) (v i) = 0\n[PROOFSTEP]\nrw [Finsupp.mem_supported'] at hl \n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nv : ι → E\nhv : Orthonormal 𝕜 v\ns : Set ι\ni : ι\nhi : ¬i ∈ s\nl : ι →₀ 𝕜\nhl : ∀ (x : ι), ¬x ∈ s → ↑l x = 0\n⊢ inner (↑(Finsupp.total ι E 𝕜 v) l) (v i) = 0\n[PROOFSTEP]\nsimp only [hv.inner_left_finsupp, hl i hi, map_zero]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nv w : ι → E\nhv : Orthonormal 𝕜 v\nhw : ∀ (i : ι), w i = v i ∨ w i = -v i\n⊢ Orthonormal 𝕜 w\n[PROOFSTEP]\nclassical!\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nv w : ι → E\nhv : Orthonormal 𝕜 v\nhw : ∀ (i : ι), w i = v i ∨ w i = -v i\nem✝ : (a : Prop) → Decidable a\n⊢ Orthonormal 𝕜 w\n[PROOFSTEP]\nrw [orthonormal_iff_ite] at *\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nv w : ι → E\nhw : ∀ (i : ι), w i = v i ∨ w i = -v i\nem✝ : (a : Prop) → Decidable a\nhv : ∀ (i j : ι), inner (v i) (v j) = if i = j then 1 else 0\n⊢ ∀ (i j : ι), inner (w i) (w j) = if i = j then 1 else 0\n[PROOFSTEP]\nintro i j\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nv w : ι → E\nhw : ∀ (i : ι), w i = v i ∨ w i = -v i\nem✝ : (a : Prop) → Decidable a\nhv : ∀ (i j : ι), inner (v i) (v j) = if i = j then 1 else 0\ni j : ι\n⊢ inner (w i) (w j) = if i = j then 1 else 0\n[PROOFSTEP]\ncases' hw i with hi hi\n[GOAL]\ncase inl\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nv w : ι → E\nhw : ∀ (i : ι), w i = v i ∨ w i = -v i\nem✝ : (a : Prop) → Decidable a\nhv : ∀ (i j : ι), inner (v i) (v j) = if i = j then 1 else 0\ni j : ι\nhi : w i = v i\n⊢ inner (w i) (w j) = if i = j then 1 else 0\n[PROOFSTEP]\ncases' hw j with hj hj\n[GOAL]\ncase inr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nv w : ι → E\nhw : ∀ (i : ι), w i = v i ∨ w i = -v i\nem✝ : (a : Prop) → Decidable a\nhv : ∀ (i j : ι), inner (v i) (v j) = if i = j then 1 else 0\ni j : ι\nhi : w i = -v i\n⊢ inner (w i) (w j) = if i = j then 1 else 0\n[PROOFSTEP]\ncases' hw j with hj hj\n[GOAL]\ncase inl.inl\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nv w : ι → E\nhw : ∀ (i : ι), w i = v i ∨ w i = -v i\nem✝ : (a : Prop) → Decidable a\nhv : ∀ (i j : ι), inner (v i) (v j) = if i = j then 1 else 0\ni j : ι\nhi : w i = v i\nhj : w j = v j\n⊢ inner (w i) (w j) = if i = j then 1 else 0\n[PROOFSTEP]\nreplace hv := hv i j\n[GOAL]\ncase inl.inr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nv w : ι → E\nhw : ∀ (i : ι), w i = v i ∨ w i = -v i\nem✝ : (a : Prop) → Decidable a\nhv : ∀ (i j : ι), inner (v i) (v j) = if i = j then 1 else 0\ni j : ι\nhi : w i = v i\nhj : w j = -v j\n⊢ inner (w i) (w j) = if i = j then 1 else 0\n[PROOFSTEP]\nreplace hv := hv i j\n[GOAL]\ncase inr.inl\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nv w : ι → E\nhw : ∀ (i : ι), w i = v i ∨ w i = -v i\nem✝ : (a : Prop) → Decidable a\nhv : ∀ (i j : ι), inner (v i) (v j) = if i = j then 1 else 0\ni j : ι\nhi : w i = -v i\nhj : w j = v j\n⊢ inner (w i) (w j) = if i = j then 1 else 0\n[PROOFSTEP]\nreplace hv := hv i j\n[GOAL]\ncase inr.inr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nv w : ι → E\nhw : ∀ (i : ι), w i = v i ∨ w i = -v i\nem✝ : (a : Prop) → Decidable a\nhv : ∀ (i j : ι), inner (v i) (v j) = if i = j then 1 else 0\ni j : ι\nhi : w i = -v i\nhj : w j = -v j\n⊢ inner (w i) (w j) = if i = j then 1 else 0\n[PROOFSTEP]\nreplace hv := hv i j\n[GOAL]\ncase inl.inl\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nv w : ι → E\nhw : ∀ (i : ι), w i = v i ∨ w i = -v i\nem✝ : (a : Prop) → Decidable a\ni j : ι\nhi : w i = v i\nhj : w j = v j\nhv : inner (v i) (v j) = if i = j then 1 else 0\n⊢ inner (w i) (w j) = if i = j then 1 else 0\n[PROOFSTEP]\nsplit_ifs at hv ⊢ with h\n[GOAL]\ncase inl.inr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nv w : ι → E\nhw : ∀ (i : ι), w i = v i ∨ w i = -v i\nem✝ : (a : Prop) → Decidable a\ni j : ι\nhi : w i = v i\nhj : w j = -v j\nhv : inner (v i) (v j) = if i = j then 1 else 0\n⊢ inner (w i) (w j) = if i = j then 1 else 0\n[PROOFSTEP]\nsplit_ifs at hv ⊢ with h\n[GOAL]\ncase inr.inl\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nv w : ι → E\nhw : ∀ (i : ι), w i = v i ∨ w i = -v i\nem✝ : (a : Prop) → Decidable a\ni j : ι\nhi : w i = -v i\nhj : w j = v j\nhv : inner (v i) (v j) = if i = j then 1 else 0\n⊢ inner (w i) (w j) = if i = j then 1 else 0\n[PROOFSTEP]\nsplit_ifs at hv ⊢ with h\n[GOAL]\ncase inr.inr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nv w : ι → E\nhw : ∀ (i : ι), w i = v i ∨ w i = -v i\nem✝ : (a : Prop) → Decidable a\ni j : ι\nhi : w i = -v i\nhj : w j = -v j\nhv : inner (v i) (v j) = if i = j then 1 else 0\n⊢ inner (w i) (w j) = if i = j then 1 else 0\n[PROOFSTEP]\nsplit_ifs at hv ⊢ with h\n[GOAL]\ncase pos\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nv w : ι → E\nhw : ∀ (i : ι), w i = v i ∨ w i = -v i\nem✝ : (a : Prop) → Decidable a\ni j : ι\nhi : w i = v i\nhj : w j = v j\nh : i = j\nhv : inner (v i) (v j) = 1\n⊢ inner (w i) (w j) = 1\n[PROOFSTEP]\nsimpa only [hi, hj, h, inner_neg_right, inner_neg_left, neg_neg, eq_self_iff_true, neg_eq_zero] using hv\n[GOAL]\ncase neg\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nv w : ι → E\nhw : ∀ (i : ι), w i = v i ∨ w i = -v i\nem✝ : (a : Prop) → Decidable a\ni j : ι\nhi : w i = v i\nhj : w j = v j\nh : ¬i = j\nhv : inner (v i) (v j) = 0\n⊢ inner (w i) (w j) = 0\n[PROOFSTEP]\nsimpa only [hi, hj, h, inner_neg_right, inner_neg_left, neg_neg, eq_self_iff_true, neg_eq_zero] using hv\n[GOAL]\ncase pos\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nv w : ι → E\nhw : ∀ (i : ι), w i = v i ∨ w i = -v i\nem✝ : (a : Prop) → Decidable a\ni j : ι\nhi : w i = v i\nhj : w j = -v j\nh : i = j\nhv : inner (v i) (v j) = 1\n⊢ inner (w i) (w j) = 1\n[PROOFSTEP]\nsimpa only [hi, hj, h, inner_neg_right, inner_neg_left, neg_neg, eq_self_iff_true, neg_eq_zero] using hv\n[GOAL]\ncase neg\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nv w : ι → E\nhw : ∀ (i : ι), w i = v i ∨ w i = -v i\nem✝ : (a : Prop) → Decidable a\ni j : ι\nhi : w i = v i\nhj : w j = -v j\nh : ¬i = j\nhv : inner (v i) (v j) = 0\n⊢ inner (w i) (w j) = 0\n[PROOFSTEP]\nsimpa only [hi, hj, h, inner_neg_right, inner_neg_left, neg_neg, eq_self_iff_true, neg_eq_zero] using hv\n[GOAL]\ncase pos\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nv w : ι → E\nhw : ∀ (i : ι), w i = v i ∨ w i = -v i\nem✝ : (a : Prop) → Decidable a\ni j : ι\nhi : w i = -v i\nhj : w j = v j\nh : i = j\nhv : inner (v i) (v j) = 1\n⊢ inner (w i) (w j) = 1\n[PROOFSTEP]\nsimpa only [hi, hj, h, inner_neg_right, inner_neg_left, neg_neg, eq_self_iff_true, neg_eq_zero] using hv\n[GOAL]\ncase neg\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nv w : ι → E\nhw : ∀ (i : ι), w i = v i ∨ w i = -v i\nem✝ : (a : Prop) → Decidable a\ni j : ι\nhi : w i = -v i\nhj : w j = v j\nh : ¬i = j\nhv : inner (v i) (v j) = 0\n⊢ inner (w i) (w j) = 0\n[PROOFSTEP]\nsimpa only [hi, hj, h, inner_neg_right, inner_neg_left, neg_neg, eq_self_iff_true, neg_eq_zero] using hv\n[GOAL]\ncase pos\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nv w : ι → E\nhw : ∀ (i : ι), w i = v i ∨ w i = -v i\nem✝ : (a : Prop) → Decidable a\ni j : ι\nhi : w i = -v i\nhj : w j = -v j\nh : i = j\nhv : inner (v i) (v j) = 1\n⊢ inner (w i) (w j) = 1\n[PROOFSTEP]\nsimpa only [hi, hj, h, inner_neg_right, inner_neg_left, neg_neg, eq_self_iff_true, neg_eq_zero] using hv\n[GOAL]\ncase neg\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nv w : ι → E\nhw : ∀ (i : ι), w i = v i ∨ w i = -v i\nem✝ : (a : Prop) → Decidable a\ni j : ι\nhi : w i = -v i\nhj : w j = -v j\nh : ¬i = j\nhv : inner (v i) (v j) = 0\n⊢ inner (w i) (w j) = 0\n[PROOFSTEP]\nsimpa only [hi, hj, h, inner_neg_right, inner_neg_left, neg_neg, eq_self_iff_true, neg_eq_zero] using hv\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\n⊢ Orthonormal 𝕜 fun x => ↑x\n[PROOFSTEP]\nclassical!\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nem✝ : (a : Prop) → Decidable a\n⊢ Orthonormal 𝕜 fun x => ↑x\n[PROOFSTEP]\nsimp [orthonormal_subtype_iff_ite]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nη : Type u_5\ns : η → Set E\nhs : Directed (fun x x_1 => x ⊆ x_1) s\nh : ∀ (i : η), Orthonormal 𝕜 fun x => ↑x\n⊢ Orthonormal 𝕜 fun x => ↑x\n[PROOFSTEP]\nclassical!\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nη : Type u_5\ns : η → Set E\nhs : Directed (fun x x_1 => x ⊆ x_1) s\nh : ∀ (i : η), Orthonormal 𝕜 fun x => ↑x\nem✝ : (a : Prop) → Decidable a\n⊢ Orthonormal 𝕜 fun x => ↑x\n[PROOFSTEP]\nrw [orthonormal_subtype_iff_ite]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nη : Type u_5\ns : η → Set E\nhs : Directed (fun x x_1 => x ⊆ x_1) s\nh : ∀ (i : η), Orthonormal 𝕜 fun x => ↑x\nem✝ : (a : Prop) → Decidable a\n⊢ ∀ (v : E), v ∈ ⋃ (i : η), s i → ∀ (w : E), w ∈ ⋃ (i : η), s i → inner v w = if v = w then 1 else 0\n[PROOFSTEP]\nrintro x ⟨_, ⟨i, rfl⟩, hxi⟩ y ⟨_, ⟨j, rfl⟩, hyj⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nη : Type u_5\ns : η → Set E\nhs : Directed (fun x x_1 => x ⊆ x_1) s\nh : ∀ (i : η), Orthonormal 𝕜 fun x => ↑x\nem✝ : (a : Prop) → Decidable a\nx : E\ni : η\nhxi : x ∈ (fun i => s i) i\ny : E\nj : η\nhyj : y ∈ (fun i => s i) j\n⊢ inner x y = if x = y then 1 else 0\n[PROOFSTEP]\nobtain ⟨k, hik, hjk⟩ := hs i j\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nη : Type u_5\ns : η → Set E\nhs : Directed (fun x x_1 => x ⊆ x_1) s\nh : ∀ (i : η), Orthonormal 𝕜 fun x => ↑x\nem✝ : (a : Prop) → Decidable a\nx : E\ni : η\nhxi : x ∈ (fun i => s i) i\ny : E\nj : η\nhyj : y ∈ (fun i => s i) j\nk : η\nhik : s i ⊆ s k\nhjk : s j ⊆ s k\n⊢ inner x y = if x = y then 1 else 0\n[PROOFSTEP]\nhave h_orth : Orthonormal 𝕜 (fun x => x : s k → E) := h k\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nη : Type u_5\ns : η → Set E\nhs : Directed (fun x x_1 => x ⊆ x_1) s\nh : ∀ (i : η), Orthonormal 𝕜 fun x => ↑x\nem✝ : (a : Prop) → Decidable a\nx : E\ni : η\nhxi : x ∈ (fun i => s i) i\ny : E\nj : η\nhyj : y ∈ (fun i => s i) j\nk : η\nhik : s i ⊆ s k\nhjk : s j ⊆ s k\nh_orth : Orthonormal 𝕜 fun x => ↑x\n⊢ inner x y = if x = y then 1 else 0\n[PROOFSTEP]\nrw [orthonormal_subtype_iff_ite] at h_orth \n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nη : Type u_5\ns : η → Set E\nhs : Directed (fun x x_1 => x ⊆ x_1) s\nh : ∀ (i : η), Orthonormal 𝕜 fun x => ↑x\nem✝ : (a : Prop) → Decidable a\nx : E\ni : η\nhxi : x ∈ (fun i => s i) i\ny : E\nj : η\nhyj : y ∈ (fun i => s i) j\nk : η\nhik : s i ⊆ s k\nhjk : s j ⊆ s k\nh_orth : ∀ (v : E), v ∈ s k → ∀ (w : E), w ∈ s k → inner v w = if v = w then 1 else 0\n⊢ inner x y = if x = y then 1 else 0\n[PROOFSTEP]\nexact h_orth x (hik hxi) y (hjk hyj)\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\ns : Set (Set E)\nhs : DirectedOn (fun x x_1 => x ⊆ x_1) s\nh : ∀ (a : Set E), a ∈ s → Orthonormal 𝕜 fun x => ↑x\n⊢ Orthonormal 𝕜 fun x => ↑x\n[PROOFSTEP]\nrw [Set.sUnion_eq_iUnion]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\ns : Set (Set E)\nhs : DirectedOn (fun x x_1 => x ⊆ x_1) s\nh : ∀ (a : Set E), a ∈ s → Orthonormal 𝕜 fun x => ↑x\n⊢ Orthonormal 𝕜 fun x => ↑x\n[PROOFSTEP]\nexact orthonormal_iUnion_of_directed hs.directed_val (by simpa using h)\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\ns : Set (Set E)\nhs : DirectedOn (fun x x_1 => x ⊆ x_1) s\nh : ∀ (a : Set E), a ∈ s → Orthonormal 𝕜 fun x => ↑x\n⊢ ∀ (i : ↑s), Orthonormal 𝕜 fun x => ↑x\n[PROOFSTEP]\nsimpa using h\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\ns : Set E\nhs : Orthonormal 𝕜 Subtype.val\n⊢ ∃ w _hw, Orthonormal 𝕜 Subtype.val ∧ ∀ (u : Set E), u ⊇ w → Orthonormal 𝕜 Subtype.val → u = w\n[PROOFSTEP]\nhave := zorn_subset_nonempty {b | Orthonormal 𝕜 (Subtype.val : b → E)} ?_ _ hs\n[GOAL]\ncase refine_2\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\ns : Set E\nhs : Orthonormal 𝕜 Subtype.val\nthis :\n  ∃ m, m ∈ {b | Orthonormal 𝕜 Subtype.val} ∧ s ⊆ m ∧ ∀ (a : Set E), a ∈ {b | Orthonormal 𝕜 Subtype.val} → m ⊆ a → a = m\n⊢ ∃ w _hw, Orthonormal 𝕜 Subtype.val ∧ ∀ (u : Set E), u ⊇ w → Orthonormal 𝕜 Subtype.val → u = w\ncase refine_1\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\ns : Set E\nhs : Orthonormal 𝕜 Subtype.val\n⊢ ∀ (c : Set (Set E)),\n    c ⊆ {b | Orthonormal 𝕜 Subtype.val} →\n      IsChain (fun x x_1 => x ⊆ x_1) c →\n        Set.Nonempty c → ∃ ub, ub ∈ {b | Orthonormal 𝕜 Subtype.val} ∧ ∀ (s : Set E), s ∈ c → s ⊆ ub\n[PROOFSTEP]\nobtain ⟨b, bi, sb, h⟩ := this\n[GOAL]\ncase refine_2.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\ns : Set E\nhs : Orthonormal 𝕜 Subtype.val\nb : Set E\nbi : b ∈ {b | Orthonormal 𝕜 Subtype.val}\nsb : s ⊆ b\nh : ∀ (a : Set E), a ∈ {b | Orthonormal 𝕜 Subtype.val} → b ⊆ a → a = b\n⊢ ∃ w _hw, Orthonormal 𝕜 Subtype.val ∧ ∀ (u : Set E), u ⊇ w → Orthonormal 𝕜 Subtype.val → u = w\n[PROOFSTEP]\nrefine' ⟨b, sb, bi, _⟩\n[GOAL]\ncase refine_2.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\ns : Set E\nhs : Orthonormal 𝕜 Subtype.val\nb : Set E\nbi : b ∈ {b | Orthonormal 𝕜 Subtype.val}\nsb : s ⊆ b\nh : ∀ (a : Set E), a ∈ {b | Orthonormal 𝕜 Subtype.val} → b ⊆ a → a = b\n⊢ ∀ (u : Set E), u ⊇ b → Orthonormal 𝕜 Subtype.val → u = b\n[PROOFSTEP]\nexact fun u hus hu => h u hu hus\n[GOAL]\ncase refine_1\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\ns : Set E\nhs : Orthonormal 𝕜 Subtype.val\n⊢ ∀ (c : Set (Set E)),\n    c ⊆ {b | Orthonormal 𝕜 Subtype.val} →\n      IsChain (fun x x_1 => x ⊆ x_1) c →\n        Set.Nonempty c → ∃ ub, ub ∈ {b | Orthonormal 𝕜 Subtype.val} ∧ ∀ (s : Set E), s ∈ c → s ⊆ ub\n[PROOFSTEP]\nrefine' fun c hc cc _c0 => ⟨⋃₀ c, _, _⟩\n[GOAL]\ncase refine_1.refine'_1\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\ns : Set E\nhs : Orthonormal 𝕜 Subtype.val\nc : Set (Set E)\nhc : c ⊆ {b | Orthonormal 𝕜 Subtype.val}\ncc : IsChain (fun x x_1 => x ⊆ x_1) c\n_c0 : Set.Nonempty c\n⊢ ⋃₀ c ∈ {b | Orthonormal 𝕜 Subtype.val}\n[PROOFSTEP]\nexact orthonormal_sUnion_of_directed cc.directedOn fun x xc => hc xc\n[GOAL]\ncase refine_1.refine'_2\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\ns : Set E\nhs : Orthonormal 𝕜 Subtype.val\nc : Set (Set E)\nhc : c ⊆ {b | Orthonormal 𝕜 Subtype.val}\ncc : IsChain (fun x x_1 => x ⊆ x_1) c\n_c0 : Set.Nonempty c\n⊢ ∀ (s : Set E), s ∈ c → s ⊆ ⋃₀ c\n[PROOFSTEP]\nexact fun _ => Set.subset_sUnion_of_mem\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nv : ι → E\nhv : Orthonormal 𝕜 v\ni : ι\n⊢ v i ≠ 0\n[PROOFSTEP]\nhave : ‖v i‖ ≠ 0 := by\n  rw [hv.1 i]\n  norm_num\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nv : ι → E\nhv : Orthonormal 𝕜 v\ni : ι\n⊢ ‖v i‖ ≠ 0\n[PROOFSTEP]\nrw [hv.1 i]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nv : ι → E\nhv : Orthonormal 𝕜 v\ni : ι\n⊢ 1 ≠ 0\n[PROOFSTEP]\nnorm_num\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nv : ι → E\nhv : Orthonormal 𝕜 v\ni : ι\nthis : ‖v i‖ ≠ 0\n⊢ v i ≠ 0\n[PROOFSTEP]\nsimpa using this\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx : E\n⊢ ↑re (inner x x) = ‖x‖ * ‖x‖\n[PROOFSTEP]\nrw [@norm_eq_sqrt_inner 𝕜, ← sqrt_mul inner_self_nonneg (re ⟪x, x⟫), sqrt_mul_self inner_self_nonneg]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx : E\n⊢ ↑re (inner x x) = ‖x‖ ^ 2\n[PROOFSTEP]\nrw [pow_two, inner_self_eq_norm_mul_norm]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx : F\n⊢ inner x x = ‖x‖ * ‖x‖\n[PROOFSTEP]\nhave h := @inner_self_eq_norm_mul_norm ℝ F _ _ _ x\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx : F\nh : ↑re (inner x x) = ‖x‖ * ‖x‖\n⊢ inner x x = ‖x‖ * ‖x‖\n[PROOFSTEP]\nsimpa using h\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx : F\n⊢ inner x x = ‖x‖ ^ 2\n[PROOFSTEP]\nrw [pow_two, real_inner_self_eq_norm_mul_norm]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\n⊢ ‖x + y‖ ^ 2 = ‖x‖ ^ 2 + 2 * ↑re (inner x y) + ‖y‖ ^ 2\n[PROOFSTEP]\nrepeat' rw [sq (M := ℝ), ← @inner_self_eq_norm_mul_norm 𝕜]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\n⊢ ‖x + y‖ ^ 2 = ‖x‖ ^ 2 + 2 * ↑re (inner x y) + ‖y‖ ^ 2\n[PROOFSTEP]\nrw [sq (M := ℝ), ← @inner_self_eq_norm_mul_norm 𝕜]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\n⊢ ↑re (inner (x + y) (x + y)) = ‖x‖ ^ 2 + 2 * ↑re (inner x y) + ‖y‖ ^ 2\n[PROOFSTEP]\nrw [sq (M := ℝ), ← @inner_self_eq_norm_mul_norm 𝕜]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\n⊢ ↑re (inner (x + y) (x + y)) = ↑re (inner x x) + 2 * ↑re (inner x y) + ‖y‖ ^ 2\n[PROOFSTEP]\nrw [sq (M := ℝ), ← @inner_self_eq_norm_mul_norm 𝕜]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\n⊢ ↑re (inner (x + y) (x + y)) = ↑re (inner x x) + 2 * ↑re (inner x y) + ↑re (inner y y)\n[PROOFSTEP]\nrw [sq (M := ℝ), ← @inner_self_eq_norm_mul_norm 𝕜]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\n⊢ ↑re (inner (x + y) (x + y)) = ↑re (inner x x) + 2 * ↑re (inner x y) + ↑re (inner y y)\n[PROOFSTEP]\nrw [inner_add_add_self, two_mul]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\n⊢ ↑re (inner x x + inner x y + inner y x + inner y y) =\n    ↑re (inner x x) + (↑re (inner x y) + ↑re (inner x y)) + ↑re (inner y y)\n[PROOFSTEP]\nsimp only [add_assoc, add_left_inj, add_right_inj, AddMonoidHom.map_add]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\n⊢ ↑re (inner y x) = ↑re (inner x y)\n[PROOFSTEP]\nrw [← inner_conj_symm, conj_re]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : F\n⊢ ‖x + y‖ ^ 2 = ‖x‖ ^ 2 + 2 * inner x y + ‖y‖ ^ 2\n[PROOFSTEP]\nhave h := @norm_add_sq ℝ _ _ _ _ x y\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : F\nh : ‖x + y‖ ^ 2 = ‖x‖ ^ 2 + 2 * ↑re (inner x y) + ‖y‖ ^ 2\n⊢ ‖x + y‖ ^ 2 = ‖x‖ ^ 2 + 2 * inner x y + ‖y‖ ^ 2\n[PROOFSTEP]\nsimpa using h\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\n⊢ ‖x + y‖ * ‖x + y‖ = ‖x‖ * ‖x‖ + 2 * ↑re (inner x y) + ‖y‖ * ‖y‖\n[PROOFSTEP]\nrepeat' rw [← sq (M := ℝ)]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\n⊢ ‖x + y‖ * ‖x + y‖ = ‖x‖ * ‖x‖ + 2 * ↑re (inner x y) + ‖y‖ * ‖y‖\n[PROOFSTEP]\nrw [← sq (M := ℝ)]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\n⊢ ‖x + y‖ ^ 2 = ‖x‖ * ‖x‖ + 2 * ↑re (inner x y) + ‖y‖ * ‖y‖\n[PROOFSTEP]\nrw [← sq (M := ℝ)]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\n⊢ ‖x + y‖ ^ 2 = ‖x‖ ^ 2 + 2 * ↑re (inner x y) + ‖y‖ * ‖y‖\n[PROOFSTEP]\nrw [← sq (M := ℝ)]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\n⊢ ‖x + y‖ ^ 2 = ‖x‖ ^ 2 + 2 * ↑re (inner x y) + ‖y‖ ^ 2\n[PROOFSTEP]\nrw [← sq (M := ℝ)]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\n⊢ ‖x + y‖ ^ 2 = ‖x‖ ^ 2 + 2 * ↑re (inner x y) + ‖y‖ ^ 2\n[PROOFSTEP]\nexact norm_add_sq _ _\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : F\n⊢ ‖x + y‖ * ‖x + y‖ = ‖x‖ * ‖x‖ + 2 * inner x y + ‖y‖ * ‖y‖\n[PROOFSTEP]\nhave h := @norm_add_mul_self ℝ _ _ _ _ x y\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : F\nh : ‖x + y‖ * ‖x + y‖ = ‖x‖ * ‖x‖ + 2 * ↑re (inner x y) + ‖y‖ * ‖y‖\n⊢ ‖x + y‖ * ‖x + y‖ = ‖x‖ * ‖x‖ + 2 * inner x y + ‖y‖ * ‖y‖\n[PROOFSTEP]\nsimpa using h\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\n⊢ ‖x - y‖ ^ 2 = ‖x‖ ^ 2 - 2 * ↑re (inner x y) + ‖y‖ ^ 2\n[PROOFSTEP]\nrw [sub_eq_add_neg, @norm_add_sq 𝕜 _ _ _ _ x (-y), norm_neg, inner_neg_right, map_neg, mul_neg, sub_eq_add_neg]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\n⊢ ‖x - y‖ * ‖x - y‖ = ‖x‖ * ‖x‖ - 2 * ↑re (inner x y) + ‖y‖ * ‖y‖\n[PROOFSTEP]\nrepeat' rw [← sq (M := ℝ)]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\n⊢ ‖x - y‖ * ‖x - y‖ = ‖x‖ * ‖x‖ - 2 * ↑re (inner x y) + ‖y‖ * ‖y‖\n[PROOFSTEP]\nrw [← sq (M := ℝ)]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\n⊢ ‖x - y‖ ^ 2 = ‖x‖ * ‖x‖ - 2 * ↑re (inner x y) + ‖y‖ * ‖y‖\n[PROOFSTEP]\nrw [← sq (M := ℝ)]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\n⊢ ‖x - y‖ ^ 2 = ‖x‖ ^ 2 - 2 * ↑re (inner x y) + ‖y‖ * ‖y‖\n[PROOFSTEP]\nrw [← sq (M := ℝ)]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\n⊢ ‖x - y‖ ^ 2 = ‖x‖ ^ 2 - 2 * ↑re (inner x y) + ‖y‖ ^ 2\n[PROOFSTEP]\nrw [← sq (M := ℝ)]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\n⊢ ‖x - y‖ ^ 2 = ‖x‖ ^ 2 - 2 * ↑re (inner x y) + ‖y‖ ^ 2\n[PROOFSTEP]\nexact norm_sub_sq _ _\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : F\n⊢ ‖x - y‖ * ‖x - y‖ = ‖x‖ * ‖x‖ - 2 * inner x y + ‖y‖ * ‖y‖\n[PROOFSTEP]\nhave h := @norm_sub_mul_self ℝ _ _ _ _ x y\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : F\nh : ‖x - y‖ * ‖x - y‖ = ‖x‖ * ‖x‖ - 2 * ↑re (inner x y) + ‖y‖ * ‖y‖\n⊢ ‖x - y‖ * ‖x - y‖ = ‖x‖ * ‖x‖ - 2 * inner x y + ‖y‖ * ‖y‖\n[PROOFSTEP]\nsimpa using h\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\n⊢ ‖inner x y‖ ≤ ‖x‖ * ‖y‖\n[PROOFSTEP]\nrw [norm_eq_sqrt_inner (𝕜 := 𝕜) x, norm_eq_sqrt_inner (𝕜 := 𝕜) y]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\n⊢ ‖inner x y‖ ≤ sqrt (↑re (inner x x)) * sqrt (↑re (inner y y))\n[PROOFSTEP]\nletI : InnerProductSpace.Core 𝕜 E := InnerProductSpace.toCore\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\nthis : InnerProductSpace.Core 𝕜 E := InnerProductSpace.toCore\n⊢ ‖inner x y‖ ≤ sqrt (↑re (inner x x)) * sqrt (↑re (inner y y))\n[PROOFSTEP]\nexact InnerProductSpace.Core.norm_inner_le_norm x y\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\n⊢ ‖x + y‖ * ‖x + y‖ + ‖x - y‖ * ‖x - y‖ = 2 * (‖x‖ * ‖x‖ + ‖y‖ * ‖y‖)\n[PROOFSTEP]\nsimp only [← @inner_self_eq_norm_mul_norm 𝕜]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\n⊢ ↑re (inner (x + y) (x + y)) + ↑re (inner (x - y) (x - y)) = 2 * (↑re (inner x x) + ↑re (inner y y))\n[PROOFSTEP]\nrw [← re.map_add, parallelogram_law, two_mul, two_mul]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\n⊢ ↑re (inner x x + inner y y + (inner x x + inner y y)) =\n    ↑re (inner x x) + ↑re (inner y y) + (↑re (inner x x) + ↑re (inner y y))\n[PROOFSTEP]\nsimp only [re.map_add]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\n⊢ ↑re (inner x y) = (‖x + y‖ * ‖x + y‖ - ‖x‖ * ‖x‖ - ‖y‖ * ‖y‖) / 2\n[PROOFSTEP]\nrw [@norm_add_mul_self 𝕜]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\n⊢ ↑re (inner x y) = (‖x‖ * ‖x‖ + 2 * ↑re (inner x y) + ‖y‖ * ‖y‖ - ‖x‖ * ‖x‖ - ‖y‖ * ‖y‖) / 2\n[PROOFSTEP]\nring\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\n⊢ ↑re (inner x y) = (‖x‖ * ‖x‖ + ‖y‖ * ‖y‖ - ‖x - y‖ * ‖x - y‖) / 2\n[PROOFSTEP]\nrw [@norm_sub_mul_self 𝕜]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\n⊢ ↑re (inner x y) = (‖x‖ * ‖x‖ + ‖y‖ * ‖y‖ - (‖x‖ * ‖x‖ - 2 * ↑re (inner x y) + ‖y‖ * ‖y‖)) / 2\n[PROOFSTEP]\nring\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\n⊢ ↑re (inner x y) = (‖x + y‖ * ‖x + y‖ - ‖x - y‖ * ‖x - y‖) / 4\n[PROOFSTEP]\nrw [@norm_add_mul_self 𝕜, @norm_sub_mul_self 𝕜]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\n⊢ ↑re (inner x y) = (‖x‖ * ‖x‖ + 2 * ↑re (inner x y) + ‖y‖ * ‖y‖ - (‖x‖ * ‖x‖ - 2 * ↑re (inner x y) + ‖y‖ * ‖y‖)) / 4\n[PROOFSTEP]\nring\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\n⊢ ↑im (inner x y) = (‖x - I • y‖ * ‖x - I • y‖ - ‖x + I • y‖ * ‖x + I • y‖) / 4\n[PROOFSTEP]\nsimp only [@norm_add_mul_self 𝕜, @norm_sub_mul_self 𝕜, inner_smul_right, I_mul_re]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\n⊢ ↑im (inner x y) =\n    (‖x‖ * ‖x‖ - 2 * -↑im (inner x y) + ‖I • y‖ * ‖I • y‖ - (‖x‖ * ‖x‖ + 2 * -↑im (inner x y) + ‖I • y‖ * ‖I • y‖)) / 4\n[PROOFSTEP]\nring\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\n⊢ inner x y = (↑‖x + y‖ ^ 2 - ↑‖x - y‖ ^ 2 + (↑‖x - I • y‖ ^ 2 - ↑‖x + I • y‖ ^ 2) * I) / 4\n[PROOFSTEP]\nrw [← re_add_im ⟪x, y⟫, re_inner_eq_norm_add_mul_self_sub_norm_sub_mul_self_div_four,\n  im_inner_eq_norm_sub_i_smul_mul_self_sub_norm_add_i_smul_mul_self_div_four]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\n⊢ ↑((‖x + y‖ * ‖x + y‖ - ‖x - y‖ * ‖x - y‖) / 4) + ↑((‖x - I • y‖ * ‖x - I • y‖ - ‖x + I • y‖ * ‖x + I • y‖) / 4) * I =\n    (↑‖x + y‖ ^ 2 - ↑‖x - y‖ ^ 2 + (↑‖x - I • y‖ ^ 2 - ↑‖x + I • y‖ ^ 2) * I) / 4\n[PROOFSTEP]\npush_cast\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\n⊢ (↑‖x + y‖ * ↑‖x + y‖ - ↑‖x - y‖ * ↑‖x - y‖) / 4 +\n      (↑‖x - I • y‖ * ↑‖x - I • y‖ - ↑‖x + I • y‖ * ↑‖x + I • y‖) / 4 * I =\n    (↑‖x + y‖ ^ 2 - ↑‖x - y‖ ^ 2 + (↑‖x - I • y‖ ^ 2 - ↑‖x + I • y‖ ^ 2) * I) / 4\n[PROOFSTEP]\nsimp only [sq, ← mul_div_right_comm, ← add_div]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : F\nhx : x ≠ 0\nhy : y ≠ 0\nR : ℝ\nhx' : ‖x‖ ≠ 0\nhy' : ‖y‖ ≠ 0\n⊢ dist ((R / ‖x‖) ^ 2 • x) ((R / ‖y‖) ^ 2 • y) = sqrt (‖(R / ‖x‖) ^ 2 • x - (R / ‖y‖) ^ 2 • y‖ ^ 2)\n[PROOFSTEP]\nrw [dist_eq_norm, sqrt_sq (norm_nonneg _)]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : F\nhx : x ≠ 0\nhy : y ≠ 0\nR : ℝ\nhx' : ‖x‖ ≠ 0\nhy' : ‖y‖ ≠ 0\n⊢ ‖(R / ‖x‖) ^ 2 • x - (R / ‖y‖) ^ 2 • y‖ ^ 2 = (R ^ 2 / (‖x‖ * ‖y‖)) ^ 2 * ‖x - y‖ ^ 2\n[PROOFSTEP]\nfield_simp [sq, norm_sub_mul_self_real, norm_smul, real_inner_smul_left, inner_smul_right,\n  Real.norm_of_nonneg (mul_self_nonneg _)]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : F\nhx : x ≠ 0\nhy : y ≠ 0\nR : ℝ\nhx' : ‖x‖ ≠ 0\nhy' : ‖y‖ ≠ 0\n⊢ ((R * R * ‖x‖ * (R * R * ‖x‖) * (‖y‖ * ‖y‖ * (‖x‖ * ‖x‖)) -\n            ‖x‖ * ‖x‖ * (‖x‖ * ‖x‖) * (2 * (R * R * (R * R * inner x y)))) *\n          (‖y‖ * ‖y‖ * (‖y‖ * ‖y‖)) +\n        R * R * ‖y‖ * (R * R * ‖y‖) * (‖x‖ * ‖x‖ * (‖x‖ * ‖x‖) * (‖y‖ * ‖y‖ * (‖x‖ * ‖x‖)))) *\n      (‖x‖ * ‖y‖ * (‖x‖ * ‖y‖)) =\n    R * R * (R * R) * (‖x‖ * ‖x‖ - 2 * inner x y + ‖y‖ * ‖y‖) *\n      (‖x‖ * ‖x‖ * (‖x‖ * ‖x‖) * (‖y‖ * ‖y‖ * (‖x‖ * ‖x‖)) * (‖y‖ * ‖y‖ * (‖y‖ * ‖y‖)))\n[PROOFSTEP]\nring\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : F\nhx : x ≠ 0\nhy : y ≠ 0\nR : ℝ\nhx' : ‖x‖ ≠ 0\nhy' : ‖y‖ ≠ 0\n⊢ sqrt ((R ^ 2 / (‖x‖ * ‖y‖)) ^ 2 * ‖x - y‖ ^ 2) = R ^ 2 / (‖x‖ * ‖y‖) * dist x y\n[PROOFSTEP]\nrw [sqrt_mul (sq_nonneg _), sqrt_sq (norm_nonneg _),\n  sqrt_sq (div_nonneg (sq_nonneg _) (mul_nonneg (norm_nonneg _) (norm_nonneg _))), dist_eq_norm]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nε : ℝ\nhε : 0 < ε\n⊢ ∃ δ, 0 < δ ∧ ∀ ⦃x : F⦄, ‖x‖ = 1 → ∀ ⦃y : F⦄, ‖y‖ = 1 → ε ≤ ‖x - y‖ → ‖x + y‖ ≤ 2 - δ\n[PROOFSTEP]\nrefine' ⟨2 - sqrt (4 - ε ^ 2), sub_pos_of_lt <| (sqrt_lt' zero_lt_two).2 _, fun x hx y hy hxy => _⟩\n[GOAL]\ncase refine'_1\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nε : ℝ\nhε : 0 < ε\n⊢ 4 - ε ^ 2 < 2 ^ 2\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase refine'_1\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nε : ℝ\nhε : 0 < ε\n⊢ 0 < ε ^ 2\n[PROOFSTEP]\nexact pow_pos hε _\n[GOAL]\ncase refine'_2\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nε : ℝ\nhε : 0 < ε\nx : F\nhx : ‖x‖ = 1\ny : F\nhy : ‖y‖ = 1\nhxy : ε ≤ ‖x - y‖\n⊢ ‖x + y‖ ≤ 2 - (2 - sqrt (4 - ε ^ 2))\n[PROOFSTEP]\nrw [sub_sub_cancel]\n[GOAL]\ncase refine'_2\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nε : ℝ\nhε : 0 < ε\nx : F\nhx : ‖x‖ = 1\ny : F\nhy : ‖y‖ = 1\nhxy : ε ≤ ‖x - y‖\n⊢ ‖x + y‖ ≤ sqrt (4 - ε ^ 2)\n[PROOFSTEP]\nrefine' le_sqrt_of_sq_le _\n[GOAL]\ncase refine'_2\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nε : ℝ\nhε : 0 < ε\nx : F\nhx : ‖x‖ = 1\ny : F\nhy : ‖y‖ = 1\nhxy : ε ≤ ‖x - y‖\n⊢ ‖x + y‖ ^ 2 ≤ 4 - ε ^ 2\n[PROOFSTEP]\nrw [sq, eq_sub_iff_add_eq.2 (parallelogram_law_with_norm ℝ x y), ← sq ‖x - y‖, hx, hy]\n[GOAL]\ncase refine'_2\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nε : ℝ\nhε : 0 < ε\nx : F\nhx : ‖x‖ = 1\ny : F\nhy : ‖y‖ = 1\nhxy : ε ≤ ‖x - y‖\n⊢ 2 * (1 * 1 + 1 * 1) - ‖x - y‖ ^ 2 ≤ 4 - ε ^ 2\n[PROOFSTEP]\nring_nf\n[GOAL]\ncase refine'_2\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nε : ℝ\nhε : 0 < ε\nx : F\nhx : ‖x‖ = 1\ny : F\nhy : ‖y‖ = 1\nhxy : ε ≤ ‖x - y‖\n⊢ 4 - ‖x - y‖ ^ 2 ≤ 4 - ε ^ 2\n[PROOFSTEP]\nexact sub_le_sub_left (pow_le_pow_of_le_left hε.le hxy _) 4\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nV : Type u_4\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℂ V\nT : V →ₗ[ℂ] V\nx y : V\n⊢ inner (↑T y) x =\n    (inner (↑T (x + y)) (x + y) - inner (↑T (x - y)) (x - y) +\n          Complex.I * inner (↑T (x + Complex.I • y)) (x + Complex.I • y) -\n        Complex.I * inner (↑T (x - Complex.I • y)) (x - Complex.I • y)) /\n      4\n[PROOFSTEP]\nsimp only [map_add, map_sub, inner_add_left, inner_add_right, LinearMap.map_smul, inner_smul_left, inner_smul_right,\n  Complex.conj_I, ← pow_two, Complex.I_sq, inner_sub_left, inner_sub_right, mul_add, ← mul_assoc, mul_neg, neg_neg,\n  sub_neg_eq_add, one_mul, neg_one_mul, mul_sub, sub_sub]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nV : Type u_4\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℂ V\nT : V →ₗ[ℂ] V\nx y : V\n⊢ inner (↑T y) x =\n    (inner (↑T x) x + inner (↑T y) x + (inner (↑T x) y + inner (↑T y) y) -\n            (inner (↑T x) x - (inner (↑T y) x + (inner (↑T x) y - inner (↑T y) y))) +\n          (Complex.I * inner (↑T x) x + inner (↑T y) x + (-inner (↑T x) y + Complex.I * inner (↑T y) y)) -\n        (Complex.I * inner (↑T x) x - (inner (↑T y) x + (-inner (↑T x) y - Complex.I * inner (↑T y) y)))) /\n      4\n[PROOFSTEP]\nring\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nV : Type u_4\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℂ V\nT : V →ₗ[ℂ] V\nx y : V\n⊢ inner (↑T x) y =\n    (inner (↑T (x + y)) (x + y) - inner (↑T (x - y)) (x - y) -\n          Complex.I * inner (↑T (x + Complex.I • y)) (x + Complex.I • y) +\n        Complex.I * inner (↑T (x - Complex.I • y)) (x - Complex.I • y)) /\n      4\n[PROOFSTEP]\nsimp only [map_add, map_sub, inner_add_left, inner_add_right, LinearMap.map_smul, inner_smul_left, inner_smul_right,\n  Complex.conj_I, ← pow_two, Complex.I_sq, inner_sub_left, inner_sub_right, mul_add, ← mul_assoc, mul_neg, neg_neg,\n  sub_neg_eq_add, one_mul, neg_one_mul, mul_sub, sub_sub]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nV : Type u_4\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℂ V\nT : V →ₗ[ℂ] V\nx y : V\n⊢ inner (↑T x) y =\n    (inner (↑T x) x + inner (↑T y) x + (inner (↑T x) y + inner (↑T y) y) -\n          (inner (↑T x) x - (inner (↑T y) x + (inner (↑T x) y - inner (↑T y) y)) +\n            (Complex.I * inner (↑T x) x + inner (↑T y) x + (-inner (↑T x) y + Complex.I * inner (↑T y) y))) +\n        (Complex.I * inner (↑T x) x - (inner (↑T y) x + (-inner (↑T x) y - Complex.I * inner (↑T y) y)))) /\n      4\n[PROOFSTEP]\nring\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nV : Type u_4\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℂ V\nT : V →ₗ[ℂ] V\n⊢ (∀ (x : V), inner (↑T x) x = 0) ↔ T = 0\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nV : Type u_4\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℂ V\nT : V →ₗ[ℂ] V\n⊢ (∀ (x : V), inner (↑T x) x = 0) → T = 0\n[PROOFSTEP]\nintro hT\n[GOAL]\ncase mp\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nV : Type u_4\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℂ V\nT : V →ₗ[ℂ] V\nhT : ∀ (x : V), inner (↑T x) x = 0\n⊢ T = 0\n[PROOFSTEP]\next x\n[GOAL]\ncase mp.h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nV : Type u_4\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℂ V\nT : V →ₗ[ℂ] V\nhT : ∀ (x : V), inner (↑T x) x = 0\nx : V\n⊢ ↑T x = ↑0 x\n[PROOFSTEP]\nsimp only [LinearMap.zero_apply, ← @inner_self_eq_zero ℂ V]\n[GOAL]\ncase mp.h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nV : Type u_4\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℂ V\nT : V →ₗ[ℂ] V\nhT : ∀ (x : V), inner (↑T x) x = 0\nx : V\n⊢ inner (↑T x) (↑T x) = 0\n[PROOFSTEP]\nsimp (config := { singlePass := true }) only [inner_map_polarization]\n[GOAL]\ncase mp.h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nV : Type u_4\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℂ V\nT : V →ₗ[ℂ] V\nhT : ∀ (x : V), inner (↑T x) x = 0\nx : V\n⊢ (inner (↑T (↑T x + x)) (↑T x + x) - inner (↑T (↑T x - x)) (↑T x - x) +\n          Complex.I * inner (↑T (↑T x + Complex.I • x)) (↑T x + Complex.I • x) -\n        Complex.I * inner (↑T (↑T x - Complex.I • x)) (↑T x - Complex.I • x)) /\n      4 =\n    0\n[PROOFSTEP]\nsimp only [hT]\n[GOAL]\ncase mp.h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nV : Type u_4\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℂ V\nT : V →ₗ[ℂ] V\nhT : ∀ (x : V), inner (↑T x) x = 0\nx : V\n⊢ (0 - 0 + Complex.I * 0 - Complex.I * 0) / 4 = 0\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase mpr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nV : Type u_4\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℂ V\nT : V →ₗ[ℂ] V\n⊢ T = 0 → ∀ (x : V), inner (↑T x) x = 0\n[PROOFSTEP]\nrintro rfl x\n[GOAL]\ncase mpr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nV : Type u_4\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℂ V\nx : V\n⊢ inner (↑0 x) x = 0\n[PROOFSTEP]\nsimp only [LinearMap.zero_apply, inner_zero_left]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nV : Type u_4\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℂ V\nS T : V →ₗ[ℂ] V\n⊢ (∀ (x : V), inner (↑S x) x = inner (↑T x) x) ↔ S = T\n[PROOFSTEP]\nrw [← sub_eq_zero, ← inner_map_self_eq_zero]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nV : Type u_4\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℂ V\nS T : V →ₗ[ℂ] V\n⊢ (∀ (x : V), inner (↑S x) x = inner (↑T x) x) ↔ ∀ (x : V), inner (↑(S - T) x) x = 0\n[PROOFSTEP]\nrefine' forall_congr' fun x => _\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nV : Type u_4\ninst✝¹ : NormedAddCommGroup V\ninst✝ : InnerProductSpace ℂ V\nS T : V →ₗ[ℂ] V\nx : V\n⊢ inner (↑S x) x = inner (↑T x) x ↔ inner (↑(S - T) x) x = 0\n[PROOFSTEP]\nrw [LinearMap.sub_apply, inner_sub_left, sub_eq_zero]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : InnerProductSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\nι' : Type u_5\nι'' : Type u_6\nE' : Type u_7\ninst✝³ : NormedAddCommGroup E'\ninst✝² : InnerProductSpace 𝕜 E'\nE'' : Type u_8\ninst✝¹ : NormedAddCommGroup E''\ninst✝ : InnerProductSpace 𝕜 E''\nf : E →ₗᵢ[𝕜] E'\nx y : E\n⊢ inner (↑f x) (↑f y) = inner x y\n[PROOFSTEP]\nsimp [inner_eq_sum_norm_sq_div_four, ← f.norm_map]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : InnerProductSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\nι' : Type u_5\nι'' : Type u_6\nE' : Type u_7\ninst✝³ : NormedAddCommGroup E'\ninst✝² : InnerProductSpace 𝕜 E'\nE'' : Type u_8\ninst✝¹ : NormedAddCommGroup E''\ninst✝ : InnerProductSpace 𝕜 E''\nf : E →ₗ[𝕜] E'\nh : ∀ (x y : E), inner (↑f x) (↑f y) = inner x y\nx : E\n⊢ ‖↑f x‖ = ‖x‖\n[PROOFSTEP]\nsimp only [@norm_eq_sqrt_inner 𝕜, h]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : InnerProductSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\nι' : Type u_5\nι'' : Type u_6\nE' : Type u_7\ninst✝³ : NormedAddCommGroup E'\ninst✝² : InnerProductSpace 𝕜 E'\nE'' : Type u_8\ninst✝¹ : NormedAddCommGroup E''\ninst✝ : InnerProductSpace 𝕜 E''\nv : ι → E\nf : E →ₗᵢ[𝕜] E'\n⊢ Orthonormal 𝕜 (↑f ∘ v) ↔ Orthonormal 𝕜 v\n[PROOFSTEP]\nclassical simp_rw [orthonormal_iff_ite, Function.comp_apply, LinearIsometry.inner_map_map]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : InnerProductSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\nι' : Type u_5\nι'' : Type u_6\nE' : Type u_7\ninst✝³ : NormedAddCommGroup E'\ninst✝² : InnerProductSpace 𝕜 E'\nE'' : Type u_8\ninst✝¹ : NormedAddCommGroup E''\ninst✝ : InnerProductSpace 𝕜 E''\nv : ι → E\nf : E →ₗᵢ[𝕜] E'\n⊢ Orthonormal 𝕜 (↑f ∘ v) ↔ Orthonormal 𝕜 v\n[PROOFSTEP]\nsimp_rw [orthonormal_iff_ite, Function.comp_apply, LinearIsometry.inner_map_map]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : InnerProductSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\nι' : Type u_5\nι'' : Type u_6\nE' : Type u_7\ninst✝³ : NormedAddCommGroup E'\ninst✝² : InnerProductSpace 𝕜 E'\nE'' : Type u_8\ninst✝¹ : NormedAddCommGroup E''\ninst✝ : InnerProductSpace 𝕜 E''\nv : ι → E\nhv : Orthonormal 𝕜 v\nf : E →ₗᵢ[𝕜] E'\n⊢ Orthonormal 𝕜 (↑f ∘ v)\n[PROOFSTEP]\nrwa [f.orthonormal_comp_iff]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : InnerProductSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\nι' : Type u_5\nι'' : Type u_6\nE' : Type u_7\ninst✝³ : NormedAddCommGroup E'\ninst✝² : InnerProductSpace 𝕜 E'\nE'' : Type u_8\ninst✝¹ : NormedAddCommGroup E''\ninst✝ : InnerProductSpace 𝕜 E''\nf : E →ₗ[𝕜] E'\nv : Basis ι 𝕜 E\nhv : Orthonormal 𝕜 ↑v\nhf : Orthonormal 𝕜 (↑f ∘ ↑v)\nx y : E\n⊢ inner (↑f x) (↑f y) = inner x y\n[PROOFSTEP]\nclassical rw [← v.total_repr x, ← v.total_repr y, Finsupp.apply_total, Finsupp.apply_total,\n  hv.inner_finsupp_eq_sum_left, hf.inner_finsupp_eq_sum_left]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : InnerProductSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\nι' : Type u_5\nι'' : Type u_6\nE' : Type u_7\ninst✝³ : NormedAddCommGroup E'\ninst✝² : InnerProductSpace 𝕜 E'\nE'' : Type u_8\ninst✝¹ : NormedAddCommGroup E''\ninst✝ : InnerProductSpace 𝕜 E''\nf : E →ₗ[𝕜] E'\nv : Basis ι 𝕜 E\nhv : Orthonormal 𝕜 ↑v\nhf : Orthonormal 𝕜 (↑f ∘ ↑v)\nx y : E\n⊢ inner (↑f x) (↑f y) = inner x y\n[PROOFSTEP]\nrw [← v.total_repr x, ← v.total_repr y, Finsupp.apply_total, Finsupp.apply_total, hv.inner_finsupp_eq_sum_left,\n  hf.inner_finsupp_eq_sum_left]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : InnerProductSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\nι' : Type u_5\nι'' : Type u_6\nE' : Type u_7\ninst✝³ : NormedAddCommGroup E'\ninst✝² : InnerProductSpace 𝕜 E'\nE'' : Type u_8\ninst✝¹ : NormedAddCommGroup E''\ninst✝ : InnerProductSpace 𝕜 E''\nf : E ≃ₗ[𝕜] E'\nv : Basis ι 𝕜 E\nhv : Orthonormal 𝕜 ↑v\nhf : Orthonormal 𝕜 (↑f ∘ ↑v)\nx y : E\n⊢ inner (↑f x) (↑f y) = inner x y\n[PROOFSTEP]\nrw [← LinearEquiv.coe_coe] at hf \n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : InnerProductSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\nι' : Type u_5\nι'' : Type u_6\nE' : Type u_7\ninst✝³ : NormedAddCommGroup E'\ninst✝² : InnerProductSpace 𝕜 E'\nE'' : Type u_8\ninst✝¹ : NormedAddCommGroup E''\ninst✝ : InnerProductSpace 𝕜 E''\nf : E ≃ₗ[𝕜] E'\nv : Basis ι 𝕜 E\nhv : Orthonormal 𝕜 ↑v\nhf : Orthonormal 𝕜 (↑↑f ∘ ↑v)\nx y : E\n⊢ inner (↑f x) (↑f y) = inner x y\n[PROOFSTEP]\nclassical rw [← v.total_repr x, ← v.total_repr y, ← LinearEquiv.coe_coe f, Finsupp.apply_total, Finsupp.apply_total,\n  hv.inner_finsupp_eq_sum_left, hf.inner_finsupp_eq_sum_left]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : InnerProductSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\nι' : Type u_5\nι'' : Type u_6\nE' : Type u_7\ninst✝³ : NormedAddCommGroup E'\ninst✝² : InnerProductSpace 𝕜 E'\nE'' : Type u_8\ninst✝¹ : NormedAddCommGroup E''\ninst✝ : InnerProductSpace 𝕜 E''\nf : E ≃ₗ[𝕜] E'\nv : Basis ι 𝕜 E\nhv : Orthonormal 𝕜 ↑v\nhf : Orthonormal 𝕜 (↑↑f ∘ ↑v)\nx y : E\n⊢ inner (↑f x) (↑f y) = inner x y\n[PROOFSTEP]\nrw [← v.total_repr x, ← v.total_repr y, ← LinearEquiv.coe_coe f, Finsupp.apply_total, Finsupp.apply_total,\n  hv.inner_finsupp_eq_sum_left, hf.inner_finsupp_eq_sum_left]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : InnerProductSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\nι' : Type u_5\nι'' : Type u_6\nE' : Type u_7\ninst✝³ : NormedAddCommGroup E'\ninst✝² : InnerProductSpace 𝕜 E'\nE'' : Type u_8\ninst✝¹ : NormedAddCommGroup E''\ninst✝ : InnerProductSpace 𝕜 E''\nv : Basis ι 𝕜 E\nhv : Orthonormal 𝕜 ↑v\nv' : Basis ι' 𝕜 E'\nhv' : Orthonormal 𝕜 ↑v'\ne : ι ≃ ι'\n⊢ Orthonormal 𝕜 (↑(Basis.equiv v v' e) ∘ ↑v)\n[PROOFSTEP]\nhave h : v.equiv v' e ∘ v = v' ∘ e := by\n  ext i\n  simp\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : InnerProductSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\nι' : Type u_5\nι'' : Type u_6\nE' : Type u_7\ninst✝³ : NormedAddCommGroup E'\ninst✝² : InnerProductSpace 𝕜 E'\nE'' : Type u_8\ninst✝¹ : NormedAddCommGroup E''\ninst✝ : InnerProductSpace 𝕜 E''\nv : Basis ι 𝕜 E\nhv : Orthonormal 𝕜 ↑v\nv' : Basis ι' 𝕜 E'\nhv' : Orthonormal 𝕜 ↑v'\ne : ι ≃ ι'\n⊢ ↑(Basis.equiv v v' e) ∘ ↑v = ↑v' ∘ ↑e\n[PROOFSTEP]\next i\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : InnerProductSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\nι' : Type u_5\nι'' : Type u_6\nE' : Type u_7\ninst✝³ : NormedAddCommGroup E'\ninst✝² : InnerProductSpace 𝕜 E'\nE'' : Type u_8\ninst✝¹ : NormedAddCommGroup E''\ninst✝ : InnerProductSpace 𝕜 E''\nv : Basis ι 𝕜 E\nhv : Orthonormal 𝕜 ↑v\nv' : Basis ι' 𝕜 E'\nhv' : Orthonormal 𝕜 ↑v'\ne : ι ≃ ι'\ni : ι\n⊢ (↑(Basis.equiv v v' e) ∘ ↑v) i = (↑v' ∘ ↑e) i\n[PROOFSTEP]\nsimp\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : InnerProductSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\nι' : Type u_5\nι'' : Type u_6\nE' : Type u_7\ninst✝³ : NormedAddCommGroup E'\ninst✝² : InnerProductSpace 𝕜 E'\nE'' : Type u_8\ninst✝¹ : NormedAddCommGroup E''\ninst✝ : InnerProductSpace 𝕜 E''\nv : Basis ι 𝕜 E\nhv : Orthonormal 𝕜 ↑v\nv' : Basis ι' 𝕜 E'\nhv' : Orthonormal 𝕜 ↑v'\ne : ι ≃ ι'\nh : ↑(Basis.equiv v v' e) ∘ ↑v = ↑v' ∘ ↑e\n⊢ Orthonormal 𝕜 (↑(Basis.equiv v v' e) ∘ ↑v)\n[PROOFSTEP]\nrw [h]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : InnerProductSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\nι' : Type u_5\nι'' : Type u_6\nE' : Type u_7\ninst✝³ : NormedAddCommGroup E'\ninst✝² : InnerProductSpace 𝕜 E'\nE'' : Type u_8\ninst✝¹ : NormedAddCommGroup E''\ninst✝ : InnerProductSpace 𝕜 E''\nv : Basis ι 𝕜 E\nhv : Orthonormal 𝕜 ↑v\nv' : Basis ι' 𝕜 E'\nhv' : Orthonormal 𝕜 ↑v'\ne : ι ≃ ι'\nh : ↑(Basis.equiv v v' e) ∘ ↑v = ↑v' ∘ ↑e\n⊢ Orthonormal 𝕜 (↑v' ∘ ↑e)\n[PROOFSTEP]\nclassical exact hv'.comp _ e.injective\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : InnerProductSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\nι' : Type u_5\nι'' : Type u_6\nE' : Type u_7\ninst✝³ : NormedAddCommGroup E'\ninst✝² : InnerProductSpace 𝕜 E'\nE'' : Type u_8\ninst✝¹ : NormedAddCommGroup E''\ninst✝ : InnerProductSpace 𝕜 E''\nv : Basis ι 𝕜 E\nhv : Orthonormal 𝕜 ↑v\nv' : Basis ι' 𝕜 E'\nhv' : Orthonormal 𝕜 ↑v'\ne : ι ≃ ι'\nh : ↑(Basis.equiv v v' e) ∘ ↑v = ↑v' ∘ ↑e\n⊢ Orthonormal 𝕜 (↑v' ∘ ↑e)\n[PROOFSTEP]\nexact hv'.comp _ e.injective\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : InnerProductSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\nι' : Type u_5\nι'' : Type u_6\nE' : Type u_7\ninst✝³ : NormedAddCommGroup E'\ninst✝² : InnerProductSpace 𝕜 E'\nE'' : Type u_8\ninst✝¹ : NormedAddCommGroup E''\ninst✝ : InnerProductSpace 𝕜 E''\nv : Basis ι 𝕜 E\nhv : Orthonormal 𝕜 ↑v\ni : ι\n⊢ ↑(equiv hv hv (Equiv.refl ι)) (↑v i) = ↑(LinearIsometryEquiv.refl 𝕜 E) (↑v i)\n[PROOFSTEP]\nsimp only [Orthonormal.equiv_apply, Equiv.coe_refl, id.def, LinearIsometryEquiv.coe_refl]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : InnerProductSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\nι' : Type u_5\nι'' : Type u_6\nE' : Type u_7\ninst✝³ : NormedAddCommGroup E'\ninst✝² : InnerProductSpace 𝕜 E'\nE'' : Type u_8\ninst✝¹ : NormedAddCommGroup E''\ninst✝ : InnerProductSpace 𝕜 E''\nv : Basis ι 𝕜 E\nhv : Orthonormal 𝕜 ↑v\nv' : Basis ι' 𝕜 E'\nhv' : Orthonormal 𝕜 ↑v'\ne : ι ≃ ι'\ni : ι'\n⊢ ↑(equiv hv hv' e) (↑(LinearIsometryEquiv.symm (equiv hv hv' e)) (↑v' i)) =\n    ↑(equiv hv hv' e) (↑(equiv hv' hv e.symm) (↑v' i))\n[PROOFSTEP]\nsimp only [LinearIsometryEquiv.apply_symm_apply, Orthonormal.equiv_apply, e.apply_symm_apply]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁸ : IsROrC 𝕜\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : InnerProductSpace 𝕜 E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\nι' : Type u_5\nι'' : Type u_6\nE' : Type u_7\ninst✝³ : NormedAddCommGroup E'\ninst✝² : InnerProductSpace 𝕜 E'\nE'' : Type u_8\ninst✝¹ : NormedAddCommGroup E''\ninst✝ : InnerProductSpace 𝕜 E''\nv : Basis ι 𝕜 E\nhv : Orthonormal 𝕜 ↑v\nv' : Basis ι' 𝕜 E'\nhv' : Orthonormal 𝕜 ↑v'\ne : ι ≃ ι'\nv'' : Basis ι'' 𝕜 E''\nhv'' : Orthonormal 𝕜 ↑v''\ne' : ι' ≃ ι''\ni : ι\n⊢ ↑(LinearIsometryEquiv.trans (equiv hv hv' e) (equiv hv' hv'' e')) (↑v i) = ↑(equiv hv hv'' (e.trans e')) (↑v i)\n[PROOFSTEP]\nsimp only [LinearIsometryEquiv.trans_apply, Orthonormal.equiv_apply, e.coe_trans, Function.comp_apply]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : F\n⊢ ‖x + y‖ * ‖x + y‖ = ‖x‖ * ‖x‖ + ‖y‖ * ‖y‖ ↔ inner x y = 0\n[PROOFSTEP]\nrw [@norm_add_mul_self ℝ, add_right_cancel_iff, add_right_eq_self, mul_eq_zero]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : F\n⊢ 2 = 0 ∨ ↑re (inner x y) = 0 ↔ inner x y = 0\n[PROOFSTEP]\nnorm_num\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : F\n⊢ ‖x + y‖ = sqrt (‖x‖ * ‖x‖ + ‖y‖ * ‖y‖) ↔ inner x y = 0\n[PROOFSTEP]\nrw [← norm_add_sq_eq_norm_sq_add_norm_sq_iff_real_inner_eq_zero, eq_comm,\n  sqrt_eq_iff_mul_self_eq (add_nonneg (mul_self_nonneg _) (mul_self_nonneg _)) (norm_nonneg _)]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\nh : inner x y = 0\n⊢ ‖x + y‖ * ‖x + y‖ = ‖x‖ * ‖x‖ + ‖y‖ * ‖y‖\n[PROOFSTEP]\nrw [@norm_add_mul_self 𝕜, add_right_cancel_iff, add_right_eq_self, mul_eq_zero]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\nh : inner x y = 0\n⊢ 2 = 0 ∨ ↑re (inner x y) = 0\n[PROOFSTEP]\napply Or.inr\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\nh : inner x y = 0\n⊢ ↑re (inner x y) = 0\n[PROOFSTEP]\nsimp only [h, zero_re']\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : F\n⊢ ‖x - y‖ * ‖x - y‖ = ‖x‖ * ‖x‖ + ‖y‖ * ‖y‖ ↔ inner x y = 0\n[PROOFSTEP]\nrw [@norm_sub_mul_self ℝ, add_right_cancel_iff, sub_eq_add_neg, add_right_eq_self, neg_eq_zero, mul_eq_zero]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : F\n⊢ 2 = 0 ∨ ↑re (inner x y) = 0 ↔ inner x y = 0\n[PROOFSTEP]\nnorm_num\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : F\n⊢ ‖x - y‖ = sqrt (‖x‖ * ‖x‖ + ‖y‖ * ‖y‖) ↔ inner x y = 0\n[PROOFSTEP]\nrw [← norm_sub_sq_eq_norm_sq_add_norm_sq_iff_real_inner_eq_zero, eq_comm,\n  sqrt_eq_iff_mul_self_eq (add_nonneg (mul_self_nonneg _) (mul_self_nonneg _)) (norm_nonneg _)]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : F\n⊢ inner (x + y) (x - y) = 0 ↔ ‖x‖ = ‖y‖\n[PROOFSTEP]\nconv_rhs => rw [← mul_self_inj_of_nonneg (norm_nonneg _) (norm_nonneg _)]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : F\n| ‖x‖ = ‖y‖\n[PROOFSTEP]\nrw [← mul_self_inj_of_nonneg (norm_nonneg _) (norm_nonneg _)]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : F\n| ‖x‖ = ‖y‖\n[PROOFSTEP]\nrw [← mul_self_inj_of_nonneg (norm_nonneg _) (norm_nonneg _)]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : F\n| ‖x‖ = ‖y‖\n[PROOFSTEP]\nrw [← mul_self_inj_of_nonneg (norm_nonneg _) (norm_nonneg _)]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : F\n⊢ inner (x + y) (x - y) = 0 ↔ ‖x‖ * ‖x‖ = ‖y‖ * ‖y‖\n[PROOFSTEP]\nsimp only [← @inner_self_eq_norm_mul_norm ℝ, inner_add_left, inner_sub_right, real_inner_comm y x, sub_eq_zero,\n  re_to_real]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : F\n⊢ inner x x + inner y x = inner y x + inner y y ↔ inner x x = inner y y\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : F\n⊢ inner x x + inner y x = inner y x + inner y y → inner x x = inner y y\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : F\nh : inner x x + inner y x = inner y x + inner y y\n⊢ inner x x = inner y y\n[PROOFSTEP]\nrw [add_comm] at h \n[GOAL]\ncase mp\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : F\nh : inner y x + inner x x = inner y x + inner y y\n⊢ inner x x = inner y y\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase mpr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : F\n⊢ inner x x = inner y y → inner x x + inner y x = inner y x + inner y y\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : F\nh : inner x x = inner y y\n⊢ inner x x + inner y x = inner y x + inner y y\n[PROOFSTEP]\nlinarith\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nv w : E\nh : inner v w = 0\n⊢ ‖w - v‖ = ‖w + v‖\n[PROOFSTEP]\nrw [← mul_self_inj_of_nonneg (norm_nonneg _) (norm_nonneg _)]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nv w : E\nh : inner v w = 0\n⊢ ‖w - v‖ * ‖w - v‖ = ‖w + v‖ * ‖w + v‖\n[PROOFSTEP]\nsimp only [h, ← @inner_self_eq_norm_mul_norm 𝕜, sub_neg_eq_add, sub_zero, map_sub, zero_re', zero_sub, add_zero,\n  map_add, inner_add_right, inner_sub_left, inner_sub_right, inner_re_symm, zero_add]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : F\n⊢ |inner x y / (‖x‖ * ‖y‖)| ≤ 1\n[PROOFSTEP]\nrw [abs_div, abs_mul, abs_norm, abs_norm]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : F\n⊢ |inner x y| / (‖x‖ * ‖y‖) ≤ 1\n[PROOFSTEP]\nexact\n  div_le_one_of_le (abs_real_inner_le_norm x y)\n    (mul_nonneg (norm_nonneg _) (norm_nonneg _))\n      -- porting note: was `(by positivity)`\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx : F\nr : ℝ\n⊢ inner (r • x) x = r * (‖x‖ * ‖x‖)\n[PROOFSTEP]\nrw [real_inner_smul_left, ← real_inner_self_eq_norm_mul_norm]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx : F\nr : ℝ\n⊢ inner x (r • x) = r * (‖x‖ * ‖x‖)\n[PROOFSTEP]\nrw [inner_smul_right, ← real_inner_self_eq_norm_mul_norm]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx : E\nr : 𝕜\nhx : x ≠ 0\nhr : r ≠ 0\n⊢ ‖inner x (r • x)‖ / (‖x‖ * ‖r • x‖) = 1\n[PROOFSTEP]\nhave hx' : ‖x‖ ≠ 0 := by simp [hx]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx : E\nr : 𝕜\nhx : x ≠ 0\nhr : r ≠ 0\n⊢ ‖x‖ ≠ 0\n[PROOFSTEP]\nsimp [hx]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx : E\nr : 𝕜\nhx : x ≠ 0\nhr : r ≠ 0\nhx' : ‖x‖ ≠ 0\n⊢ ‖inner x (r • x)‖ / (‖x‖ * ‖r • x‖) = 1\n[PROOFSTEP]\nhave hr' : ‖r‖ ≠ 0 := by simp [hr]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx : E\nr : 𝕜\nhx : x ≠ 0\nhr : r ≠ 0\nhx' : ‖x‖ ≠ 0\n⊢ ‖r‖ ≠ 0\n[PROOFSTEP]\nsimp [hr]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx : E\nr : 𝕜\nhx : x ≠ 0\nhr : r ≠ 0\nhx' : ‖x‖ ≠ 0\nhr' : ‖r‖ ≠ 0\n⊢ ‖inner x (r • x)‖ / (‖x‖ * ‖r • x‖) = 1\n[PROOFSTEP]\nrw [inner_smul_right, norm_mul, ← inner_self_re_eq_norm, inner_self_eq_norm_mul_norm, norm_smul]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx : E\nr : 𝕜\nhx : x ≠ 0\nhr : r ≠ 0\nhx' : ‖x‖ ≠ 0\nhr' : ‖r‖ ≠ 0\n⊢ ‖r‖ * (‖x‖ * ‖x‖) / (‖x‖ * (‖r‖ * ‖x‖)) = 1\n[PROOFSTEP]\nrw [← mul_assoc, ← div_div, mul_div_cancel _ hx', ← div_div, mul_comm, mul_div_cancel _ hr', div_self hx']\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx : F\nr : ℝ\nhx : x ≠ 0\nhr : 0 < r\n⊢ inner x (r • x) / (‖x‖ * ‖r • x‖) = 1\n[PROOFSTEP]\nrw [real_inner_smul_self_right, norm_smul, Real.norm_eq_abs, ← mul_assoc ‖x‖, mul_comm _ |r|, mul_assoc,\n  abs_of_nonneg hr.le, div_self]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx : F\nr : ℝ\nhx : x ≠ 0\nhr : 0 < r\n⊢ r * (‖x‖ * ‖x‖) ≠ 0\n[PROOFSTEP]\nexact mul_ne_zero hr.ne' (mul_self_ne_zero.2 (norm_ne_zero_iff.2 hx))\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx : F\nr : ℝ\nhx : x ≠ 0\nhr : r < 0\n⊢ inner x (r • x) / (‖x‖ * ‖r • x‖) = -1\n[PROOFSTEP]\nrw [real_inner_smul_self_right, norm_smul, Real.norm_eq_abs, ← mul_assoc ‖x‖, mul_comm _ |r|, mul_assoc, abs_of_neg hr,\n  neg_mul, div_neg_eq_neg_div, div_self]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx : F\nr : ℝ\nhx : x ≠ 0\nhr : r < 0\n⊢ r * (‖x‖ * ‖x‖) ≠ 0\n[PROOFSTEP]\nexact mul_ne_zero hr.ne (mul_self_ne_zero.2 (norm_ne_zero_iff.2 hx))\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\n⊢ List.TFAE\n    [‖inner x y‖ = ‖x‖ * ‖y‖, x = 0 ∨ y = (inner x y / inner x x) • x, x = 0 ∨ ∃ r, y = r • x,\n      x = 0 ∨ y ∈ Submodule.span 𝕜 {x}]\n[PROOFSTEP]\ntfae_have 1 → 2\n[GOAL]\ncase tfae_1_to_2\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\n⊢ ‖inner x y‖ = ‖x‖ * ‖y‖ → x = 0 ∨ y = (inner x y / inner x x) • x\n[PROOFSTEP]\nrefine' fun h => or_iff_not_imp_left.2 fun hx₀ => _\n[GOAL]\ncase tfae_1_to_2\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\nh : ‖inner x y‖ = ‖x‖ * ‖y‖\nhx₀ : ¬x = 0\n⊢ y = (inner x y / inner x x) • x\n[PROOFSTEP]\nhave : ‖x‖ ^ 2 ≠ 0 := pow_ne_zero _ (norm_ne_zero_iff.2 hx₀)\n[GOAL]\ncase tfae_1_to_2\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\nh : ‖inner x y‖ = ‖x‖ * ‖y‖\nhx₀ : ¬x = 0\nthis : ‖x‖ ^ 2 ≠ 0\n⊢ y = (inner x y / inner x x) • x\n[PROOFSTEP]\nrw [← sq_eq_sq (norm_nonneg _) (mul_nonneg (norm_nonneg _) (norm_nonneg _)), mul_pow, ← mul_right_inj' this, eq_comm, ←\n  sub_eq_zero, ← mul_sub] at h \n[GOAL]\ncase tfae_1_to_2\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\nh✝ : ‖x‖ ^ 2 * (‖x‖ ^ 2 * ‖y‖ ^ 2) = ‖x‖ ^ 2 * ‖inner x y‖ ^ 2\nh : ‖x‖ ^ 2 * (‖x‖ ^ 2 * ‖y‖ ^ 2 - ‖inner x y‖ ^ 2) = 0\nhx₀ : ¬x = 0\nthis : ‖x‖ ^ 2 ≠ 0\n⊢ y = (inner x y / inner x x) • x\n[PROOFSTEP]\nsimp only [@norm_sq_eq_inner 𝕜] at h \n[GOAL]\ncase tfae_1_to_2\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\nh✝ : ‖x‖ ^ 2 * (‖x‖ ^ 2 * ‖y‖ ^ 2) = ‖x‖ ^ 2 * ‖inner x y‖ ^ 2\nhx₀ : ¬x = 0\nthis : ‖x‖ ^ 2 ≠ 0\nh : ↑re (inner x x) * (↑re (inner x x) * ↑re (inner y y) - ‖inner x y‖ ^ 2) = 0\n⊢ y = (inner x y / inner x x) • x\n[PROOFSTEP]\nletI : InnerProductSpace.Core 𝕜 E := InnerProductSpace.toCore\n[GOAL]\ncase tfae_1_to_2\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\nh✝ : ‖x‖ ^ 2 * (‖x‖ ^ 2 * ‖y‖ ^ 2) = ‖x‖ ^ 2 * ‖inner x y‖ ^ 2\nhx₀ : ¬x = 0\nthis✝ : ‖x‖ ^ 2 ≠ 0\nh : ↑re (inner x x) * (↑re (inner x x) * ↑re (inner y y) - ‖inner x y‖ ^ 2) = 0\nthis : InnerProductSpace.Core 𝕜 E := InnerProductSpace.toCore\n⊢ y = (inner x y / inner x x) • x\n[PROOFSTEP]\nerw [← InnerProductSpace.Core.cauchy_schwarz_aux, InnerProductSpace.Core.normSq_eq_zero, sub_eq_zero] at h \n[GOAL]\ncase tfae_1_to_2\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\nh✝ : ‖x‖ ^ 2 * (‖x‖ ^ 2 * ‖y‖ ^ 2) = ‖x‖ ^ 2 * ‖inner x y‖ ^ 2\nhx₀ : ¬x = 0\nthis✝ : ‖x‖ ^ 2 ≠ 0\nthis : InnerProductSpace.Core 𝕜 E := InnerProductSpace.toCore\nh : inner x y • x = inner x x • y\n⊢ y = (inner x y / inner x x) • x\n[PROOFSTEP]\nrw [div_eq_inv_mul, mul_smul, h, inv_smul_smul₀]\n[GOAL]\ncase tfae_1_to_2.hc\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\nh✝ : ‖x‖ ^ 2 * (‖x‖ ^ 2 * ‖y‖ ^ 2) = ‖x‖ ^ 2 * ‖inner x y‖ ^ 2\nhx₀ : ¬x = 0\nthis✝ : ‖x‖ ^ 2 ≠ 0\nthis : InnerProductSpace.Core 𝕜 E := InnerProductSpace.toCore\nh : inner x y • x = inner x x • y\n⊢ inner x x ≠ 0\n[PROOFSTEP]\nrwa [inner_self_ne_zero]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\ntfae_1_to_2 : ‖inner x y‖ = ‖x‖ * ‖y‖ → x = 0 ∨ y = (inner x y / inner x x) • x\n⊢ List.TFAE\n    [‖inner x y‖ = ‖x‖ * ‖y‖, x = 0 ∨ y = (inner x y / inner x x) • x, x = 0 ∨ ∃ r, y = r • x,\n      x = 0 ∨ y ∈ Submodule.span 𝕜 {x}]\n[PROOFSTEP]\ntfae_have 2 → 3\n[GOAL]\ncase tfae_2_to_3\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\ntfae_1_to_2 : ‖inner x y‖ = ‖x‖ * ‖y‖ → x = 0 ∨ y = (inner x y / inner x x) • x\n⊢ x = 0 ∨ y = (inner x y / inner x x) • x → x = 0 ∨ ∃ r, y = r • x\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\ntfae_1_to_2 : ‖inner x y‖ = ‖x‖ * ‖y‖ → x = 0 ∨ y = (inner x y / inner x x) • x\ntfae_2_to_3 : x = 0 ∨ y = (inner x y / inner x x) • x → x = 0 ∨ ∃ r, y = r • x\n⊢ List.TFAE\n    [‖inner x y‖ = ‖x‖ * ‖y‖, x = 0 ∨ y = (inner x y / inner x x) • x, x = 0 ∨ ∃ r, y = r • x,\n      x = 0 ∨ y ∈ Submodule.span 𝕜 {x}]\n[PROOFSTEP]\nexact fun h => h.imp_right fun h' => ⟨_, h'⟩\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\ntfae_1_to_2 : ‖inner x y‖ = ‖x‖ * ‖y‖ → x = 0 ∨ y = (inner x y / inner x x) • x\ntfae_2_to_3 : x = 0 ∨ y = (inner x y / inner x x) • x → x = 0 ∨ ∃ r, y = r • x\n⊢ List.TFAE\n    [‖inner x y‖ = ‖x‖ * ‖y‖, x = 0 ∨ y = (inner x y / inner x x) • x, x = 0 ∨ ∃ r, y = r • x,\n      x = 0 ∨ y ∈ Submodule.span 𝕜 {x}]\n[PROOFSTEP]\ntfae_have 3 → 1\n[GOAL]\ncase tfae_3_to_1\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\ntfae_1_to_2 : ‖inner x y‖ = ‖x‖ * ‖y‖ → x = 0 ∨ y = (inner x y / inner x x) • x\ntfae_2_to_3 : x = 0 ∨ y = (inner x y / inner x x) • x → x = 0 ∨ ∃ r, y = r • x\n⊢ (x = 0 ∨ ∃ r, y = r • x) → ‖inner x y‖ = ‖x‖ * ‖y‖\n[PROOFSTEP]\nrintro (rfl | ⟨r, rfl⟩)\n[GOAL]\ncase tfae_3_to_1.inl\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\ny : E\ntfae_1_to_2 : ‖inner 0 y‖ = ‖0‖ * ‖y‖ → 0 = 0 ∨ y = (inner 0 y / inner 0 0) • 0\ntfae_2_to_3 : 0 = 0 ∨ y = (inner 0 y / inner 0 0) • 0 → 0 = 0 ∨ ∃ r, y = r • 0\n⊢ ‖inner 0 y‖ = ‖0‖ * ‖y‖\n[PROOFSTEP]\nsimp [inner_smul_right, norm_smul, inner_self_eq_norm_sq_to_K, inner_self_eq_norm_mul_norm, sq, mul_left_comm]\n[GOAL]\ncase tfae_3_to_1.inr.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx : E\nr : 𝕜\ntfae_1_to_2 : ‖inner x (r • x)‖ = ‖x‖ * ‖r • x‖ → x = 0 ∨ r • x = (inner x (r • x) / inner x x) • x\ntfae_2_to_3 : x = 0 ∨ r • x = (inner x (r • x) / inner x x) • x → x = 0 ∨ ∃ r_1, r • x = r_1 • x\n⊢ ‖inner x (r • x)‖ = ‖x‖ * ‖r • x‖\n[PROOFSTEP]\nsimp [inner_smul_right, norm_smul, inner_self_eq_norm_sq_to_K, inner_self_eq_norm_mul_norm, sq, mul_left_comm]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\ntfae_1_to_2 : ‖inner x y‖ = ‖x‖ * ‖y‖ → x = 0 ∨ y = (inner x y / inner x x) • x\ntfae_2_to_3 : x = 0 ∨ y = (inner x y / inner x x) • x → x = 0 ∨ ∃ r, y = r • x\ntfae_3_to_1 : (x = 0 ∨ ∃ r, y = r • x) → ‖inner x y‖ = ‖x‖ * ‖y‖\n⊢ List.TFAE\n    [‖inner x y‖ = ‖x‖ * ‖y‖, x = 0 ∨ y = (inner x y / inner x x) • x, x = 0 ∨ ∃ r, y = r • x,\n      x = 0 ∨ y ∈ Submodule.span 𝕜 {x}]\n[PROOFSTEP]\ntfae_have 3 ↔ 4\n[GOAL]\ncase tfae_3_iff_4\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\ntfae_1_to_2 : ‖inner x y‖ = ‖x‖ * ‖y‖ → x = 0 ∨ y = (inner x y / inner x x) • x\ntfae_2_to_3 : x = 0 ∨ y = (inner x y / inner x x) • x → x = 0 ∨ ∃ r, y = r • x\ntfae_3_to_1 : (x = 0 ∨ ∃ r, y = r • x) → ‖inner x y‖ = ‖x‖ * ‖y‖\n⊢ (x = 0 ∨ ∃ r, y = r • x) ↔ x = 0 ∨ y ∈ Submodule.span 𝕜 {x}\n[PROOFSTEP]\nsimp only [Submodule.mem_span_singleton, eq_comm]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\ntfae_1_to_2 : ‖inner x y‖ = ‖x‖ * ‖y‖ → x = 0 ∨ y = (inner x y / inner x x) • x\ntfae_2_to_3 : x = 0 ∨ y = (inner x y / inner x x) • x → x = 0 ∨ ∃ r, y = r • x\ntfae_3_to_1 : (x = 0 ∨ ∃ r, y = r • x) → ‖inner x y‖ = ‖x‖ * ‖y‖\ntfae_3_iff_4 : (x = 0 ∨ ∃ r, y = r • x) ↔ x = 0 ∨ y ∈ Submodule.span 𝕜 {x}\n⊢ List.TFAE\n    [‖inner x y‖ = ‖x‖ * ‖y‖, x = 0 ∨ y = (inner x y / inner x x) • x, x = 0 ∨ ∃ r, y = r • x,\n      x = 0 ∨ y ∈ Submodule.span 𝕜 {x}]\n[PROOFSTEP]\ntfae_finish\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\n⊢ ‖inner x y / (↑‖x‖ * ↑‖y‖)‖ = 1 ↔ x ≠ 0 ∧ ∃ r, r ≠ 0 ∧ y = r • x\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\n⊢ ‖inner x y / (↑‖x‖ * ↑‖y‖)‖ = 1 → x ≠ 0 ∧ ∃ r, r ≠ 0 ∧ y = r • x\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\nh : ‖inner x y / (↑‖x‖ * ↑‖y‖)‖ = 1\n⊢ x ≠ 0 ∧ ∃ r, r ≠ 0 ∧ y = r • x\n[PROOFSTEP]\nhave hx₀ : x ≠ 0 := fun h₀ => by simp [h₀] at h \n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\nh : ‖inner x y / (↑‖x‖ * ↑‖y‖)‖ = 1\nh₀ : x = 0\n⊢ False\n[PROOFSTEP]\nsimp [h₀] at h \n[GOAL]\ncase mp\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\nh : ‖inner x y / (↑‖x‖ * ↑‖y‖)‖ = 1\nhx₀ : x ≠ 0\n⊢ x ≠ 0 ∧ ∃ r, r ≠ 0 ∧ y = r • x\n[PROOFSTEP]\nhave hy₀ : y ≠ 0 := fun h₀ => by simp [h₀] at h \n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\nh : ‖inner x y / (↑‖x‖ * ↑‖y‖)‖ = 1\nhx₀ : x ≠ 0\nh₀ : y = 0\n⊢ False\n[PROOFSTEP]\nsimp [h₀] at h \n[GOAL]\ncase mp\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\nh : ‖inner x y / (↑‖x‖ * ↑‖y‖)‖ = 1\nhx₀ : x ≠ 0\nhy₀ : y ≠ 0\n⊢ x ≠ 0 ∧ ∃ r, r ≠ 0 ∧ y = r • x\n[PROOFSTEP]\nrefine' ⟨hx₀, (norm_inner_eq_norm_iff hx₀ hy₀).1 <| eq_of_div_eq_one _⟩\n[GOAL]\ncase mp\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\nh : ‖inner x y / (↑‖x‖ * ↑‖y‖)‖ = 1\nhx₀ : x ≠ 0\nhy₀ : y ≠ 0\n⊢ ‖inner x y‖ / (‖x‖ * ‖y‖) = 1\n[PROOFSTEP]\nsimpa using h\n[GOAL]\ncase mpr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\n⊢ (x ≠ 0 ∧ ∃ r, r ≠ 0 ∧ y = r • x) → ‖inner x y / (↑‖x‖ * ↑‖y‖)‖ = 1\n[PROOFSTEP]\nrintro ⟨hx, ⟨r, ⟨hr, rfl⟩⟩⟩\n[GOAL]\ncase mpr.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx : E\nhx : x ≠ 0\nr : 𝕜\nhr : r ≠ 0\n⊢ ‖inner x (r • x) / (↑‖x‖ * ↑‖r • x‖)‖ = 1\n[PROOFSTEP]\nsimp only [norm_div, norm_mul, norm_ofReal, abs_norm]\n[GOAL]\ncase mpr.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx : E\nhx : x ≠ 0\nr : 𝕜\nhr : r ≠ 0\n⊢ ‖inner x (r • x)‖ / (‖x‖ * ‖r • x‖) = 1\n[PROOFSTEP]\nexact norm_inner_div_norm_mul_norm_eq_one_of_ne_zero_of_ne_zero_mul hx hr\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\nh₀ : x ≠ 0\n⊢ inner x y = ↑‖x‖ * ↑‖y‖ ↔ (↑‖y‖ / ↑‖x‖) • x = y\n[PROOFSTEP]\nhave h₀' := h₀\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\nh₀ h₀' : x ≠ 0\n⊢ inner x y = ↑‖x‖ * ↑‖y‖ ↔ (↑‖y‖ / ↑‖x‖) • x = y\n[PROOFSTEP]\nrw [← norm_ne_zero_iff, Ne.def, ← @ofReal_eq_zero 𝕜] at h₀' \n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\nh₀ : x ≠ 0\nh₀' : ¬↑‖x‖ = 0\n⊢ inner x y = ↑‖x‖ * ↑‖y‖ ↔ (↑‖y‖ / ↑‖x‖) • x = y\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\nh₀ : x ≠ 0\nh₀' : ¬↑‖x‖ = 0\n⊢ inner x y = ↑‖x‖ * ↑‖y‖ → (↑‖y‖ / ↑‖x‖) • x = y\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\nh₀ : x ≠ 0\nh₀' : ¬↑‖x‖ = 0\n⊢ (↑‖y‖ / ↑‖x‖) • x = y → inner x y = ↑‖x‖ * ↑‖y‖\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\nh₀ : x ≠ 0\nh₀' : ¬↑‖x‖ = 0\nh : inner x y = ↑‖x‖ * ↑‖y‖\n⊢ (↑‖y‖ / ↑‖x‖) • x = y\n[PROOFSTEP]\nhave : x = 0 ∨ y = (⟪x, y⟫ / ⟪x, x⟫ : 𝕜) • x := ((@norm_inner_eq_norm_tfae 𝕜 _ _ _ _ x y).out 0 1).1 (by simp [h])\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\nh₀ : x ≠ 0\nh₀' : ¬↑‖x‖ = 0\nh : inner x y = ↑‖x‖ * ↑‖y‖\n⊢ ‖inner x y‖ = ‖x‖ * ‖y‖\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase mp\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\nh₀ : x ≠ 0\nh₀' : ¬↑‖x‖ = 0\nh : inner x y = ↑‖x‖ * ↑‖y‖\nthis : x = 0 ∨ y = (inner x y / inner x x) • x\n⊢ (↑‖y‖ / ↑‖x‖) • x = y\n[PROOFSTEP]\nrw [this.resolve_left h₀, h]\n[GOAL]\ncase mp\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\nh₀ : x ≠ 0\nh₀' : ¬↑‖x‖ = 0\nh : inner x y = ↑‖x‖ * ↑‖y‖\nthis : x = 0 ∨ y = (inner x y / inner x x) • x\n⊢ (↑‖(↑‖x‖ * ↑‖y‖ / inner x x) • x‖ / ↑‖x‖) • x = (↑‖x‖ * ↑‖y‖ / inner x x) • x\n[PROOFSTEP]\nsimp [norm_smul, inner_self_ofReal_norm, mul_div_cancel _ h₀']\n[GOAL]\ncase mpr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\nh₀ : x ≠ 0\nh₀' : ¬↑‖x‖ = 0\nh : (↑‖y‖ / ↑‖x‖) • x = y\n⊢ inner x y = ↑‖x‖ * ↑‖y‖\n[PROOFSTEP]\nconv_lhs => rw [← h, inner_smul_right, inner_self_eq_norm_sq_to_K]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\nh₀ : x ≠ 0\nh₀' : ¬↑‖x‖ = 0\nh : (↑‖y‖ / ↑‖x‖) • x = y\n| inner x y\n[PROOFSTEP]\nrw [← h, inner_smul_right, inner_self_eq_norm_sq_to_K]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\nh₀ : x ≠ 0\nh₀' : ¬↑‖x‖ = 0\nh : (↑‖y‖ / ↑‖x‖) • x = y\n| inner x y\n[PROOFSTEP]\nrw [← h, inner_smul_right, inner_self_eq_norm_sq_to_K]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\nh₀ : x ≠ 0\nh₀' : ¬↑‖x‖ = 0\nh : (↑‖y‖ / ↑‖x‖) • x = y\n| inner x y\n[PROOFSTEP]\nrw [← h, inner_smul_right, inner_self_eq_norm_sq_to_K]\n[GOAL]\ncase mpr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\nh₀ : x ≠ 0\nh₀' : ¬↑‖x‖ = 0\nh : (↑‖y‖ / ↑‖x‖) • x = y\n⊢ ↑‖y‖ / ↑‖x‖ * ↑‖x‖ ^ 2 = ↑‖x‖ * ↑‖y‖\n[PROOFSTEP]\nfield_simp [sq, mul_left_comm]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\n⊢ inner x y = ↑‖x‖ * ↑‖y‖ ↔ ↑‖y‖ • x = ↑‖x‖ • y\n[PROOFSTEP]\nrcases eq_or_ne x 0 with (rfl | h₀)\n[GOAL]\ncase inl\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\ny : E\n⊢ inner 0 y = ↑‖0‖ * ↑‖y‖ ↔ ↑‖y‖ • 0 = ↑‖0‖ • y\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\nh₀ : x ≠ 0\n⊢ inner x y = ↑‖x‖ * ↑‖y‖ ↔ ↑‖y‖ • x = ↑‖x‖ • y\n[PROOFSTEP]\nrw [inner_eq_norm_mul_iff_div h₀, div_eq_inv_mul, mul_smul, inv_smul_eq_iff₀]\n[GOAL]\ncase inr.ha\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\nh₀ : x ≠ 0\n⊢ ↑‖x‖ ≠ 0\n[PROOFSTEP]\nrwa [Ne.def, ofReal_eq_zero, norm_eq_zero]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : F\n⊢ inner x y / (‖x‖ * ‖y‖) = 1 ↔ x ≠ 0 ∧ ∃ r, 0 < r ∧ y = r • x\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : F\n⊢ inner x y / (‖x‖ * ‖y‖) = 1 → x ≠ 0 ∧ ∃ r, 0 < r ∧ y = r • x\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : F\nh : inner x y / (‖x‖ * ‖y‖) = 1\n⊢ x ≠ 0 ∧ ∃ r, 0 < r ∧ y = r • x\n[PROOFSTEP]\nhave hx₀ : x ≠ 0 := fun h₀ => by simp [h₀] at h \n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : F\nh : inner x y / (‖x‖ * ‖y‖) = 1\nh₀ : x = 0\n⊢ False\n[PROOFSTEP]\nsimp [h₀] at h \n[GOAL]\ncase mp\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : F\nh : inner x y / (‖x‖ * ‖y‖) = 1\nhx₀ : x ≠ 0\n⊢ x ≠ 0 ∧ ∃ r, 0 < r ∧ y = r • x\n[PROOFSTEP]\nhave hy₀ : y ≠ 0 := fun h₀ => by simp [h₀] at h \n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : F\nh : inner x y / (‖x‖ * ‖y‖) = 1\nhx₀ : x ≠ 0\nh₀ : y = 0\n⊢ False\n[PROOFSTEP]\nsimp [h₀] at h \n[GOAL]\ncase mp\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : F\nh : inner x y / (‖x‖ * ‖y‖) = 1\nhx₀ : x ≠ 0\nhy₀ : y ≠ 0\n⊢ x ≠ 0 ∧ ∃ r, 0 < r ∧ y = r • x\n[PROOFSTEP]\nrefine' ⟨hx₀, ‖y‖ / ‖x‖, div_pos (norm_pos_iff.2 hy₀) (norm_pos_iff.2 hx₀), _⟩\n[GOAL]\ncase mp\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : F\nh : inner x y / (‖x‖ * ‖y‖) = 1\nhx₀ : x ≠ 0\nhy₀ : y ≠ 0\n⊢ y = (‖y‖ / ‖x‖) • x\n[PROOFSTEP]\nexact ((inner_eq_norm_mul_iff_div hx₀).1 (eq_of_div_eq_one h)).symm\n[GOAL]\ncase mpr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : F\n⊢ (x ≠ 0 ∧ ∃ r, 0 < r ∧ y = r • x) → inner x y / (‖x‖ * ‖y‖) = 1\n[PROOFSTEP]\nrintro ⟨hx, ⟨r, ⟨hr, rfl⟩⟩⟩\n[GOAL]\ncase mpr.intro.intro.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx : F\nhx : x ≠ 0\nr : ℝ\nhr : 0 < r\n⊢ inner x (r • x) / (‖x‖ * ‖r • x‖) = 1\n[PROOFSTEP]\nexact real_inner_div_norm_mul_norm_eq_one_of_ne_zero_of_pos_mul hx hr\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : F\n⊢ inner x y / (‖x‖ * ‖y‖) = -1 ↔ x ≠ 0 ∧ ∃ r, r < 0 ∧ y = r • x\n[PROOFSTEP]\nrw [← neg_eq_iff_eq_neg, ← neg_div, ← inner_neg_right, ← norm_neg y, real_inner_div_norm_mul_norm_eq_one_iff,\n  (@neg_surjective ℝ _).exists]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : F\n⊢ (x ≠ 0 ∧ ∃ x_1, 0 < -x_1 ∧ -y = -x_1 • x) ↔ x ≠ 0 ∧ ∃ r, r < 0 ∧ y = r • x\n[PROOFSTEP]\nrefine' Iff.rfl.and (exists_congr fun r => _)\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : F\nr : ℝ\n⊢ 0 < -r ∧ -y = -r • x ↔ r < 0 ∧ y = r • x\n[PROOFSTEP]\nrw [neg_pos, neg_smul, neg_inj]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\nhx : ‖x‖ = 1\nhy : ‖y‖ = 1\n⊢ inner x y = 1 ↔ x = y\n[PROOFSTEP]\nconvert inner_eq_norm_mul_iff (𝕜 := 𝕜) (E := E) using 2\n[GOAL]\ncase h.e'_1.h.e'_3\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\nhx : ‖x‖ = 1\nhy : ‖y‖ = 1\n⊢ 1 = ↑‖x‖ * ↑‖y‖\n[PROOFSTEP]\nsimp [hx, hy]\n[GOAL]\ncase h.e'_2.h.e'_2\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\nhx : ‖x‖ = 1\nhy : ‖y‖ = 1\n⊢ x = ↑‖y‖ • x\n[PROOFSTEP]\nsimp [hx, hy]\n[GOAL]\ncase h.e'_2.h.e'_3\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\nhx : ‖x‖ = 1\nhy : ‖y‖ = 1\n⊢ y = ↑‖x‖ • y\n[PROOFSTEP]\nsimp [hx, hy]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : F\nhx : ‖x‖ = 1\nhy : ‖y‖ = 1\n⊢ inner x y < 1 ↔ x ≠ y\n[PROOFSTEP]\nconvert inner_lt_norm_mul_iff_real (F := F)\n[GOAL]\ncase h.e'_1.h.e'_4\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : F\nhx : ‖x‖ = 1\nhy : ‖y‖ = 1\n⊢ 1 = ‖x‖ * ‖y‖\n[PROOFSTEP]\nsimp [hx, hy]\n[GOAL]\ncase h.e'_2.h.e'_2\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : F\nhx : ‖x‖ = 1\nhy : ‖y‖ = 1\n⊢ x = ‖y‖ • x\n[PROOFSTEP]\nsimp [hx, hy]\n[GOAL]\ncase h.e'_2.h.e'_3\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : F\nhx : ‖x‖ = 1\nhy : ‖y‖ = 1\n⊢ y = ‖x‖ • y\n[PROOFSTEP]\nsimp [hx, hy]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι₁ : Type u_4\ns₁ : Finset ι₁\nw₁ : ι₁ → ℝ\nv₁ : ι₁ → F\nh₁ : ∑ i in s₁, w₁ i = 0\nι₂ : Type u_5\ns₂ : Finset ι₂\nw₂ : ι₂ → ℝ\nv₂ : ι₂ → F\nh₂ : ∑ i in s₂, w₂ i = 0\n⊢ inner (∑ i₁ in s₁, w₁ i₁ • v₁ i₁) (∑ i₂ in s₂, w₂ i₂ • v₂ i₂) =\n    (-∑ i₁ in s₁, ∑ i₂ in s₂, w₁ i₁ * w₂ i₂ * (‖v₁ i₁ - v₂ i₂‖ * ‖v₁ i₁ - v₂ i₂‖)) / 2\n[PROOFSTEP]\nsimp_rw [sum_inner, inner_sum, real_inner_smul_left, real_inner_smul_right,\n  real_inner_eq_norm_mul_self_add_norm_mul_self_sub_norm_sub_mul_self_div_two, ← div_sub_div_same, ← div_add_div_same,\n  mul_sub_left_distrib, left_distrib, Finset.sum_sub_distrib, Finset.sum_add_distrib, ← Finset.mul_sum, ←\n  Finset.sum_mul, h₁, h₂, zero_mul, mul_zero, Finset.sum_const_zero, zero_add, zero_sub, Finset.mul_sum, neg_div,\n  Finset.sum_div, mul_div_assoc, mul_assoc]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\n⊢ ‖↑(↑(innerₛₗ 𝕜) x) y‖ ≤ 1 * ‖x‖ * ‖y‖\n[PROOFSTEP]\nsimp only [norm_inner_le_norm, one_mul, innerₛₗ_apply]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx : E\n⊢ ‖↑(innerSL 𝕜) x‖ = ‖x‖\n[PROOFSTEP]\nrefine' le_antisymm ((innerSL 𝕜 x).op_norm_le_bound (norm_nonneg _) fun y => norm_inner_le_norm _ _) _\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx : E\n⊢ ‖x‖ ≤ ‖↑(innerSL 𝕜) x‖\n[PROOFSTEP]\nrcases eq_or_ne x 0 with (rfl | h)\n[GOAL]\ncase inl\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\n⊢ ‖0‖ ≤ ‖↑(innerSL 𝕜) 0‖\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx : E\nh : x ≠ 0\n⊢ ‖x‖ ≤ ‖↑(innerSL 𝕜) x‖\n[PROOFSTEP]\nrefine' (mul_le_mul_right (norm_pos_iff.2 h)).mp _\n[GOAL]\ncase inr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx : E\nh : x ≠ 0\n⊢ ‖x‖ * ‖x‖ ≤ ‖↑(innerSL 𝕜) x‖ * ‖x‖\n[PROOFSTEP]\ncalc\n  ‖x‖ * ‖x‖ = ‖(⟪x, x⟫ : 𝕜)‖ := by rw [← sq, inner_self_eq_norm_sq_to_K, norm_pow, norm_ofReal, abs_norm]\n  _ ≤ ‖innerSL 𝕜 x‖ * ‖x‖ := (innerSL 𝕜 x).le_op_norm _\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx : E\nh : x ≠ 0\n⊢ ‖x‖ * ‖x‖ = ‖inner x x‖\n[PROOFSTEP]\nrw [← sq, inner_self_eq_norm_sq_to_K, norm_pow, norm_ofReal, abs_norm]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nE' : Type u_4\ninst✝¹ : NormedAddCommGroup E'\ninst✝ : InnerProductSpace 𝕜 E'\nf : E →L[𝕜] E'\nv : E'\n⊢ ‖↑(↑toSesqForm f) v‖ ≤ ‖f‖ * ‖v‖\n[PROOFSTEP]\nrefine' op_norm_le_bound _ (mul_nonneg (norm_nonneg _) (norm_nonneg _)) _\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nE' : Type u_4\ninst✝¹ : NormedAddCommGroup E'\ninst✝ : InnerProductSpace 𝕜 E'\nf : E →L[𝕜] E'\nv : E'\n⊢ ∀ (x : E), ‖↑(↑(↑toSesqForm f) v) x‖ ≤ ‖f‖ * ‖v‖ * ‖x‖\n[PROOFSTEP]\nintro x\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nE' : Type u_4\ninst✝¹ : NormedAddCommGroup E'\ninst✝ : InnerProductSpace 𝕜 E'\nf : E →L[𝕜] E'\nv : E'\nx : E\n⊢ ‖↑(↑(↑toSesqForm f) v) x‖ ≤ ‖f‖ * ‖v‖ * ‖x‖\n[PROOFSTEP]\nhave h₁ : ‖f x‖ ≤ ‖f‖ * ‖x‖ := le_op_norm _ _\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nE' : Type u_4\ninst✝¹ : NormedAddCommGroup E'\ninst✝ : InnerProductSpace 𝕜 E'\nf : E →L[𝕜] E'\nv : E'\nx : E\nh₁ : ‖↑f x‖ ≤ ‖f‖ * ‖x‖\n⊢ ‖↑(↑(↑toSesqForm f) v) x‖ ≤ ‖f‖ * ‖v‖ * ‖x‖\n[PROOFSTEP]\nhave h₂ := @norm_inner_le_norm 𝕜 E' _ _ _ v (f x)\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nE' : Type u_4\ninst✝¹ : NormedAddCommGroup E'\ninst✝ : InnerProductSpace 𝕜 E'\nf : E →L[𝕜] E'\nv : E'\nx : E\nh₁ : ‖↑f x‖ ≤ ‖f‖ * ‖x‖\nh₂ : ‖inner v (↑f x)‖ ≤ ‖v‖ * ‖↑f x‖\n⊢ ‖↑(↑(↑toSesqForm f) v) x‖ ≤ ‖f‖ * ‖v‖ * ‖x‖\n[PROOFSTEP]\ncalc\n  ‖⟪v, f x⟫‖ ≤ ‖v‖ * ‖f x‖ := h₂\n  _ ≤ ‖v‖ * (‖f‖ * ‖x‖) := (mul_le_mul_of_nonneg_left h₁ (norm_nonneg v))\n  _ = ‖f‖ * ‖v‖ * ‖x‖ := by ring\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nE' : Type u_4\ninst✝¹ : NormedAddCommGroup E'\ninst✝ : InnerProductSpace 𝕜 E'\nf : E →L[𝕜] E'\nv : E'\nx : E\nh₁ : ‖↑f x‖ ≤ ‖f‖ * ‖x‖\nh₂ : ‖inner v (↑f x)‖ ≤ ‖v‖ * ‖↑f x‖\n⊢ ‖v‖ * (‖f‖ * ‖x‖) = ‖f‖ * ‖v‖ * ‖x‖\n[PROOFSTEP]\nring\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : InnerProductSpace 𝕜 E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\ninst✝ : NormedSpace ℝ E\nr : ℝ\nx y : E\n⊢ inner (r • x, y).fst (r • x, y).snd = r • inner (x, y).fst (x, y).snd\n[PROOFSTEP]\nsimp only [← algebraMap_smul 𝕜 r x, algebraMap_eq_ofReal, inner_smul_real_left]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : InnerProductSpace 𝕜 E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\ninst✝ : NormedSpace ℝ E\nr : ℝ\nx y : E\n⊢ inner (x, r • y).fst (x, r • y).snd = r • inner (x, y).fst (x, y).snd\n[PROOFSTEP]\nsimp only [← algebraMap_smul 𝕜 r y, algebraMap_eq_ofReal, inner_smul_real_right]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : InnerProductSpace 𝕜 E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\ninst✝ : NormedSpace ℝ E\nx y : E\n⊢ ‖inner (x, y).fst (x, y).snd‖ ≤ 1 * ‖x‖ * ‖y‖\n[PROOFSTEP]\nrw [one_mul]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁵ : IsROrC 𝕜\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : InnerProductSpace 𝕜 E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\ninst✝ : NormedSpace ℝ E\nx y : E\n⊢ ‖inner (x, y).fst (x, y).snd‖ ≤ ‖x‖ * ‖y‖\n[PROOFSTEP]\nexact norm_inner_le_norm x y\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\nx : E\nv : ι → E\ns : Finset ι\nhv : Orthonormal 𝕜 v\n⊢ ∑ i in s, ‖inner (v i) x‖ ^ 2 ≤ ‖x‖ ^ 2\n[PROOFSTEP]\nhave h₂ : (∑ i in s, ∑ j in s, ⟪v i, x⟫ * ⟪x, v j⟫ * ⟪v j, v i⟫) = (∑ k in s, ⟪v k, x⟫ * ⟪x, v k⟫ : 𝕜) := by\n  classical exact hv.inner_left_right_finset\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\nx : E\nv : ι → E\ns : Finset ι\nhv : Orthonormal 𝕜 v\n⊢ ∑ i in s, ∑ j in s, inner (v i) x * inner x (v j) * inner (v j) (v i) = ∑ k in s, inner (v k) x * inner x (v k)\n[PROOFSTEP]\nclassical exact hv.inner_left_right_finset\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\nx : E\nv : ι → E\ns : Finset ι\nhv : Orthonormal 𝕜 v\n⊢ ∑ i in s, ∑ j in s, inner (v i) x * inner x (v j) * inner (v j) (v i) = ∑ k in s, inner (v k) x * inner x (v k)\n[PROOFSTEP]\nexact hv.inner_left_right_finset\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\nx : E\nv : ι → E\ns : Finset ι\nhv : Orthonormal 𝕜 v\nh₂ : ∑ i in s, ∑ j in s, inner (v i) x * inner x (v j) * inner (v j) (v i) = ∑ k in s, inner (v k) x * inner x (v k)\n⊢ ∑ i in s, ‖inner (v i) x‖ ^ 2 ≤ ‖x‖ ^ 2\n[PROOFSTEP]\nhave h₃ : ∀ z : 𝕜, re (z * conj z) = ‖z‖ ^ 2 := by\n  intro z\n  simp only [mul_conj, normSq_eq_def']\n  norm_cast\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\nx : E\nv : ι → E\ns : Finset ι\nhv : Orthonormal 𝕜 v\nh₂ : ∑ i in s, ∑ j in s, inner (v i) x * inner x (v j) * inner (v j) (v i) = ∑ k in s, inner (v k) x * inner x (v k)\n⊢ ∀ (z : 𝕜), ↑re (z * ↑(starRingEnd 𝕜) z) = ‖z‖ ^ 2\n[PROOFSTEP]\nintro z\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\nx : E\nv : ι → E\ns : Finset ι\nhv : Orthonormal 𝕜 v\nh₂ : ∑ i in s, ∑ j in s, inner (v i) x * inner x (v j) * inner (v j) (v i) = ∑ k in s, inner (v k) x * inner x (v k)\nz : 𝕜\n⊢ ↑re (z * ↑(starRingEnd 𝕜) z) = ‖z‖ ^ 2\n[PROOFSTEP]\nsimp only [mul_conj, normSq_eq_def']\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\nx : E\nv : ι → E\ns : Finset ι\nhv : Orthonormal 𝕜 v\nh₂ : ∑ i in s, ∑ j in s, inner (v i) x * inner x (v j) * inner (v j) (v i) = ∑ k in s, inner (v k) x * inner x (v k)\nz : 𝕜\n⊢ ↑re ↑(‖z‖ ^ 2) = ‖z‖ ^ 2\n[PROOFSTEP]\nnorm_cast\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\nx : E\nv : ι → E\ns : Finset ι\nhv : Orthonormal 𝕜 v\nh₂ : ∑ i in s, ∑ j in s, inner (v i) x * inner x (v j) * inner (v j) (v i) = ∑ k in s, inner (v k) x * inner x (v k)\nh₃ : ∀ (z : 𝕜), ↑re (z * ↑(starRingEnd 𝕜) z) = ‖z‖ ^ 2\n⊢ ∑ i in s, ‖inner (v i) x‖ ^ 2 ≤ ‖x‖ ^ 2\n[PROOFSTEP]\nsuffices hbf : ‖x - ∑ i in s, ⟪v i, x⟫ • v i‖ ^ 2 = ‖x‖ ^ 2 - ∑ i in s, ‖⟪v i, x⟫‖ ^ 2\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\nx : E\nv : ι → E\ns : Finset ι\nhv : Orthonormal 𝕜 v\nh₂ : ∑ i in s, ∑ j in s, inner (v i) x * inner x (v j) * inner (v j) (v i) = ∑ k in s, inner (v k) x * inner x (v k)\nh₃ : ∀ (z : 𝕜), ↑re (z * ↑(starRingEnd 𝕜) z) = ‖z‖ ^ 2\nhbf : ‖x - ∑ i in s, inner (v i) x • v i‖ ^ 2 = ‖x‖ ^ 2 - ∑ i in s, ‖inner (v i) x‖ ^ 2\n⊢ ∑ i in s, ‖inner (v i) x‖ ^ 2 ≤ ‖x‖ ^ 2\n[PROOFSTEP]\nrw [← sub_nonneg, ← hbf]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\nx : E\nv : ι → E\ns : Finset ι\nhv : Orthonormal 𝕜 v\nh₂ : ∑ i in s, ∑ j in s, inner (v i) x * inner x (v j) * inner (v j) (v i) = ∑ k in s, inner (v k) x * inner x (v k)\nh₃ : ∀ (z : 𝕜), ↑re (z * ↑(starRingEnd 𝕜) z) = ‖z‖ ^ 2\nhbf : ‖x - ∑ i in s, inner (v i) x • v i‖ ^ 2 = ‖x‖ ^ 2 - ∑ i in s, ‖inner (v i) x‖ ^ 2\n⊢ 0 ≤ ‖x - ∑ i in s, inner (v i) x • v i‖ ^ 2\n[PROOFSTEP]\nsimp only [norm_nonneg, pow_nonneg]\n[GOAL]\ncase hbf\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\nx : E\nv : ι → E\ns : Finset ι\nhv : Orthonormal 𝕜 v\nh₂ : ∑ i in s, ∑ j in s, inner (v i) x * inner x (v j) * inner (v j) (v i) = ∑ k in s, inner (v k) x * inner x (v k)\nh₃ : ∀ (z : 𝕜), ↑re (z * ↑(starRingEnd 𝕜) z) = ‖z‖ ^ 2\n⊢ ‖x - ∑ i in s, inner (v i) x • v i‖ ^ 2 = ‖x‖ ^ 2 - ∑ i in s, ‖inner (v i) x‖ ^ 2\n[PROOFSTEP]\nrw [@norm_sub_sq 𝕜, sub_add]\n[GOAL]\ncase hbf\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\nx : E\nv : ι → E\ns : Finset ι\nhv : Orthonormal 𝕜 v\nh₂ : ∑ i in s, ∑ j in s, inner (v i) x * inner x (v j) * inner (v j) (v i) = ∑ k in s, inner (v k) x * inner x (v k)\nh₃ : ∀ (z : 𝕜), ↑re (z * ↑(starRingEnd 𝕜) z) = ‖z‖ ^ 2\n⊢ ‖x‖ ^ 2 - (2 * ↑re (inner x (∑ i in s, inner (v i) x • v i)) - ‖∑ i in s, inner (v i) x • v i‖ ^ 2) =\n    ‖x‖ ^ 2 - ∑ i in s, ‖inner (v i) x‖ ^ 2\n[PROOFSTEP]\nclassical\nsimp only [@InnerProductSpace.norm_sq_eq_inner 𝕜, _root_.inner_sum, _root_.sum_inner]\nsimp only [inner_smul_right, two_mul, inner_smul_left, inner_conj_symm, ← mul_assoc, h₂, add_sub_cancel, sub_right_inj]\nsimp only [map_sum, ← inner_conj_symm x, ← h₃]\n[GOAL]\ncase hbf\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\nx : E\nv : ι → E\ns : Finset ι\nhv : Orthonormal 𝕜 v\nh₂ : ∑ i in s, ∑ j in s, inner (v i) x * inner x (v j) * inner (v j) (v i) = ∑ k in s, inner (v k) x * inner x (v k)\nh₃ : ∀ (z : 𝕜), ↑re (z * ↑(starRingEnd 𝕜) z) = ‖z‖ ^ 2\n⊢ ‖x‖ ^ 2 - (2 * ↑re (inner x (∑ i in s, inner (v i) x • v i)) - ‖∑ i in s, inner (v i) x • v i‖ ^ 2) =\n    ‖x‖ ^ 2 - ∑ i in s, ‖inner (v i) x‖ ^ 2\n[PROOFSTEP]\nsimp only [@InnerProductSpace.norm_sq_eq_inner 𝕜, _root_.inner_sum, _root_.sum_inner]\n[GOAL]\ncase hbf\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\nx : E\nv : ι → E\ns : Finset ι\nhv : Orthonormal 𝕜 v\nh₂ : ∑ i in s, ∑ j in s, inner (v i) x * inner x (v j) * inner (v j) (v i) = ∑ k in s, inner (v k) x * inner x (v k)\nh₃ : ∀ (z : 𝕜), ↑re (z * ↑(starRingEnd 𝕜) z) = ‖z‖ ^ 2\n⊢ ↑re (inner x x) -\n      (2 * ↑re (∑ i in s, inner x (inner (v i) x • v i)) -\n        ↑re (∑ x_1 in s, ∑ i in s, inner (inner (v i) x • v i) (inner (v x_1) x • v x_1))) =\n    ↑re (inner x x) - ∑ i in s, ‖inner (v i) x‖ ^ 2\n[PROOFSTEP]\nsimp only [inner_smul_right, two_mul, inner_smul_left, inner_conj_symm, ← mul_assoc, h₂, add_sub_cancel, sub_right_inj]\n[GOAL]\ncase hbf\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\nx : E\nv : ι → E\ns : Finset ι\nhv : Orthonormal 𝕜 v\nh₂ : ∑ i in s, ∑ j in s, inner (v i) x * inner x (v j) * inner (v j) (v i) = ∑ k in s, inner (v k) x * inner x (v k)\nh₃ : ∀ (z : 𝕜), ↑re (z * ↑(starRingEnd 𝕜) z) = ‖z‖ ^ 2\n⊢ ↑re (∑ x_1 in s, inner (v x_1) x * inner x (v x_1)) = ∑ i in s, ‖inner (v i) x‖ ^ 2\n[PROOFSTEP]\nsimp only [map_sum, ← inner_conj_symm x, ← h₃]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\nx : E\nv : ι → E\nhv : Orthonormal 𝕜 v\n⊢ ∑' (i : ι), ‖inner (v i) x‖ ^ 2 ≤ ‖x‖ ^ 2\n[PROOFSTEP]\nrefine' tsum_le_of_sum_le' _ fun s => hv.sum_inner_products_le x\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\nx : E\nv : ι → E\nhv : Orthonormal 𝕜 v\n⊢ 0 ≤ ‖x‖ ^ 2\n[PROOFSTEP]\nsimp only [norm_nonneg, pow_nonneg]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\nx : E\nv : ι → E\nhv : Orthonormal 𝕜 v\n⊢ Summable fun i => ‖inner (v i) x‖ ^ 2\n[PROOFSTEP]\nuse⨆ s : Finset ι, ∑ i in s, ‖⟪v i, x⟫‖ ^ 2\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\nx : E\nv : ι → E\nhv : Orthonormal 𝕜 v\n⊢ HasSum (fun i => ‖inner (v i) x‖ ^ 2) (⨆ (s : Finset ι), ∑ i in s, ‖inner (v i) x‖ ^ 2)\n[PROOFSTEP]\napply hasSum_of_isLUB_of_nonneg\n[GOAL]\ncase h.h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\nx : E\nv : ι → E\nhv : Orthonormal 𝕜 v\n⊢ ∀ (i : ι), 0 ≤ ‖inner (v i) x‖ ^ 2\n[PROOFSTEP]\nintro b\n[GOAL]\ncase h.h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\nx : E\nv : ι → E\nhv : Orthonormal 𝕜 v\nb : ι\n⊢ 0 ≤ ‖inner (v b) x‖ ^ 2\n[PROOFSTEP]\nsimp only [norm_nonneg, pow_nonneg]\n[GOAL]\ncase h.hf\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\nx : E\nv : ι → E\nhv : Orthonormal 𝕜 v\n⊢ IsLUB (Set.range fun s => ∑ i in s, ‖inner (v i) x‖ ^ 2) (⨆ (s : Finset ι), ∑ i in s, ‖inner (v i) x‖ ^ 2)\n[PROOFSTEP]\nrefine' isLUB_ciSup _\n[GOAL]\ncase h.hf\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\nx : E\nv : ι → E\nhv : Orthonormal 𝕜 v\n⊢ BddAbove (Set.range fun s => ∑ i in s, ‖inner (v i) x‖ ^ 2)\n[PROOFSTEP]\nuse‖x‖ ^ 2\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\nx : E\nv : ι → E\nhv : Orthonormal 𝕜 v\n⊢ ‖x‖ ^ 2 ∈ upperBounds (Set.range fun s => ∑ i in s, ‖inner (v i) x‖ ^ 2)\n[PROOFSTEP]\nrintro y ⟨s, rfl⟩\n[GOAL]\ncase h.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\nx : E\nv : ι → E\nhv : Orthonormal 𝕜 v\ns : Finset ι\n⊢ (fun s => ∑ i in s, ‖inner (v i) x‖ ^ 2) s ≤ ‖x‖ ^ 2\n[PROOFSTEP]\nexact hv.sum_inner_products_le x\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx : 𝕜\n⊢ ‖x‖ ^ 2 = ↑re (inner x x)\n[PROOFSTEP]\nsimp only [inner]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx : 𝕜\n⊢ ‖x‖ ^ 2 = ↑re (↑(starRingEnd 𝕜) x * x)\n[PROOFSTEP]\nrw [mul_comm, mul_conj, ofReal_re, normSq_eq_def']\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : 𝕜\n⊢ ↑(starRingEnd 𝕜) (inner y x) = inner x y\n[PROOFSTEP]\nsimp only [mul_comm, map_mul, starRingEnd_self_apply]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y z : 𝕜\n⊢ inner (x + y) z = inner x z + inner y z\n[PROOFSTEP]\nsimp only [add_mul, map_add]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y z : 𝕜\n⊢ inner (z • x) y = ↑(starRingEnd 𝕜) z * inner x y\n[PROOFSTEP]\nsimp only [mul_assoc, smul_eq_mul, map_mul]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nG : ι → Type u_5\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\nv : ι → E\nhv : Orthonormal 𝕜 v\ni j : ι\nhij : i ≠ j\na : (fun _i => 𝕜) i\nb : (fun _i => 𝕜) j\n⊢ inner (↑((fun i => LinearIsometry.toSpanSingleton 𝕜 E (_ : ‖v i‖ = 1)) i) a)\n      (↑((fun i => LinearIsometry.toSpanSingleton 𝕜 E (_ : ‖v i‖ = 1)) j) b) =\n    0\n[PROOFSTEP]\nsimp [inner_smul_left, inner_smul_right, hv.2 hij]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nG : ι → Type u_5\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\ni j : ι\nv : G i\nw : G j\n⊢ inner (↑(V i) v) (↑(V j) w) = if i = j then inner (↑(V i) v) (↑(V j) w) else 0\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nG : ι → Type u_5\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\ni j : ι\nv : G i\nw : G j\nh : i = j\n⊢ inner (↑(V i) v) (↑(V j) w) = inner (↑(V i) v) (↑(V j) w)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nG : ι → Type u_5\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\ni j : ι\nv : G i\nw : G j\nh : ¬i = j\n⊢ inner (↑(V i) v) (↑(V j) w) = 0\n[PROOFSTEP]\nexact hV h v w\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nG : ι → Type u_5\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\nl : ⨁ (i : ι), G i\ni : ι\nv : G i\n⊢ (DFinsupp.sum l fun j w => if i = j then inner (↑(V i) v) (↑(V j) w) else 0) = inner v (↑l i)\n[PROOFSTEP]\nsimp only [DFinsupp.sum, Submodule.coe_inner, Finset.sum_ite_eq, ite_eq_left_iff, DFinsupp.mem_support_toFun]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nG : ι → Type u_5\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\nl : ⨁ (i : ι), G i\ni : ι\nv : G i\n⊢ (if ↑l i ≠ 0 then inner (↑(V i) v) (↑(V i) (↑l i)) else 0) = inner v (↑l i)\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nG : ι → Type u_5\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\nl : ⨁ (i : ι), G i\ni : ι\nv : G i\nh : ↑l i ≠ 0\n⊢ inner (↑(V i) v) (↑(V i) (↑l i)) = inner v (↑l i)\n[PROOFSTEP]\nsimp only [LinearIsometry.inner_map_map]\n[GOAL]\ncase neg\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nG : ι → Type u_5\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\nl : ⨁ (i : ι), G i\ni : ι\nv : G i\nh : ¬↑l i ≠ 0\n⊢ 0 = inner v (↑l i)\n[PROOFSTEP]\nsimp only [of_not_not h, inner_zero_right]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : InnerProductSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nG : ι → Type u_5\ninst✝² : (i : ι) → NormedAddCommGroup (G i)\ninst✝¹ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\ninst✝ : Fintype ι\nl : (i : ι) → G i\ni : ι\nv : G i\n⊢ inner (↑(V i) v) (∑ j : ι, ↑(V j) (l j)) = inner v (l i)\n[PROOFSTEP]\nclassical!\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : InnerProductSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nG : ι → Type u_5\ninst✝² : (i : ι) → NormedAddCommGroup (G i)\ninst✝¹ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\ninst✝ : Fintype ι\nl : (i : ι) → G i\ni : ι\nv : G i\nem✝ : (a : Prop) → Decidable a\n⊢ inner (↑(V i) v) (∑ j : ι, ↑(V j) (l j)) = inner v (l i)\n[PROOFSTEP]\ncalc\n  ⟪V i v, ∑ j : ι, V j (l j)⟫ = ∑ j : ι, ⟪V i v, V j (l j)⟫ := by rw [inner_sum]\n  _ = ∑ j, ite (i = j) ⟪V i v, V j (l j)⟫ 0 := (congr_arg (Finset.sum Finset.univ) <| funext fun j => hV.eq_ite v (l j))\n  _ = ⟪v, l i⟫ := by simp only [Finset.sum_ite_eq, Finset.mem_univ, (V i).inner_map_map, if_true]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : InnerProductSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nG : ι → Type u_5\ninst✝² : (i : ι) → NormedAddCommGroup (G i)\ninst✝¹ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\ninst✝ : Fintype ι\nl : (i : ι) → G i\ni : ι\nv : G i\nem✝ : (a : Prop) → Decidable a\n⊢ inner (↑(V i) v) (∑ j : ι, ↑(V j) (l j)) = ∑ j : ι, inner (↑(V i) v) (↑(V j) (l j))\n[PROOFSTEP]\nrw [inner_sum]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : InnerProductSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nG : ι → Type u_5\ninst✝² : (i : ι) → NormedAddCommGroup (G i)\ninst✝¹ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\ninst✝ : Fintype ι\nl : (i : ι) → G i\ni : ι\nv : G i\nem✝ : (a : Prop) → Decidable a\n⊢ (∑ j : ι, if i = j then inner (↑(V i) v) (↑(V j) (l j)) else 0) = inner v (l i)\n[PROOFSTEP]\nsimp only [Finset.sum_ite_eq, Finset.mem_univ, (V i).inner_map_map, if_true]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nG : ι → Type u_5\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\nl₁ l₂ : (i : ι) → G i\ns : Finset ι\n⊢ inner (∑ i in s, ↑(V i) (l₁ i)) (∑ j in s, ↑(V j) (l₂ j)) = ∑ i in s, inner (l₁ i) (l₂ i)\n[PROOFSTEP]\nclassical!\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nG : ι → Type u_5\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\nl₁ l₂ : (i : ι) → G i\ns : Finset ι\nem✝ : (a : Prop) → Decidable a\n⊢ inner (∑ i in s, ↑(V i) (l₁ i)) (∑ j in s, ↑(V j) (l₂ j)) = ∑ i in s, inner (l₁ i) (l₂ i)\n[PROOFSTEP]\ncalc\n  ⟪∑ i in s, V i (l₁ i), ∑ j in s, V j (l₂ j)⟫ = ∑ j in s, ∑ i in s, ⟪V i (l₁ i), V j (l₂ j)⟫ := by\n    simp only [_root_.sum_inner, _root_.inner_sum]\n  _ = ∑ j in s, ∑ i in s, ite (i = j) ⟪V i (l₁ i), V j (l₂ j)⟫ 0 :=\n    by\n    congr with i\n    congr with j\n    apply hV.eq_ite\n  _ = ∑ i in s, ⟪l₁ i, l₂ i⟫ := by\n    simp only [Finset.sum_ite_of_true, Finset.sum_ite_eq', LinearIsometry.inner_map_map, imp_self, imp_true_iff]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nG : ι → Type u_5\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\nl₁ l₂ : (i : ι) → G i\ns : Finset ι\nem✝ : (a : Prop) → Decidable a\n⊢ inner (∑ i in s, ↑(V i) (l₁ i)) (∑ j in s, ↑(V j) (l₂ j)) = ∑ j in s, ∑ i in s, inner (↑(V i) (l₁ i)) (↑(V j) (l₂ j))\n[PROOFSTEP]\nsimp only [_root_.sum_inner, _root_.inner_sum]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nG : ι → Type u_5\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\nl₁ l₂ : (i : ι) → G i\ns : Finset ι\nem✝ : (a : Prop) → Decidable a\n⊢ ∑ j in s, ∑ i in s, inner (↑(V i) (l₁ i)) (↑(V j) (l₂ j)) =\n    ∑ j in s, ∑ i in s, if i = j then inner (↑(V i) (l₁ i)) (↑(V j) (l₂ j)) else 0\n[PROOFSTEP]\ncongr with i\n[GOAL]\ncase e_f.h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nG : ι → Type u_5\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\nl₁ l₂ : (i : ι) → G i\ns : Finset ι\nem✝ : (a : Prop) → Decidable a\ni : ι\n⊢ ∑ i_1 in s, inner (↑(V i_1) (l₁ i_1)) (↑(V i) (l₂ i)) =\n    ∑ i_1 in s, if i_1 = i then inner (↑(V i_1) (l₁ i_1)) (↑(V i) (l₂ i)) else 0\n[PROOFSTEP]\ncongr with j\n[GOAL]\ncase e_f.h.e_f.h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nG : ι → Type u_5\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\nl₁ l₂ : (i : ι) → G i\ns : Finset ι\nem✝ : (a : Prop) → Decidable a\ni j : ι\n⊢ inner (↑(V j) (l₁ j)) (↑(V i) (l₂ i)) = if j = i then inner (↑(V j) (l₁ j)) (↑(V i) (l₂ i)) else 0\n[PROOFSTEP]\napply hV.eq_ite\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nG : ι → Type u_5\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\nl₁ l₂ : (i : ι) → G i\ns : Finset ι\nem✝ : (a : Prop) → Decidable a\n⊢ (∑ j in s, ∑ i in s, if i = j then inner (↑(V i) (l₁ i)) (↑(V j) (l₂ j)) else 0) = ∑ i in s, inner (l₁ i) (l₂ i)\n[PROOFSTEP]\nsimp only [Finset.sum_ite_of_true, Finset.sum_ite_eq', LinearIsometry.inner_map_map, imp_self, imp_true_iff]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nG : ι → Type u_5\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\nl : (i : ι) → G i\ns : Finset ι\n⊢ ‖∑ i in s, ↑(V i) (l i)‖ ^ 2 = ∑ i in s, ‖l i‖ ^ 2\n[PROOFSTEP]\nhave : ((‖∑ i in s, V i (l i)‖ : ℝ) : 𝕜) ^ 2 = ∑ i in s, ((‖l i‖ : ℝ) : 𝕜) ^ 2 := by\n  simp only [← inner_self_eq_norm_sq_to_K, hV.inner_sum]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nG : ι → Type u_5\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\nl : (i : ι) → G i\ns : Finset ι\n⊢ ↑‖∑ i in s, ↑(V i) (l i)‖ ^ 2 = ∑ i in s, ↑‖l i‖ ^ 2\n[PROOFSTEP]\nsimp only [← inner_self_eq_norm_sq_to_K, hV.inner_sum]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nG : ι → Type u_5\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\nl : (i : ι) → G i\ns : Finset ι\nthis : ↑‖∑ i in s, ↑(V i) (l i)‖ ^ 2 = ∑ i in s, ↑‖l i‖ ^ 2\n⊢ ‖∑ i in s, ↑(V i) (l i)‖ ^ 2 = ∑ i in s, ‖l i‖ ^ 2\n[PROOFSTEP]\nexact_mod_cast this\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nG : ι → Type u_5\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\nα : ι → Type u_6\nv_family : (i : ι) → α i → G i\nhv_family : ∀ (i : ι), Orthonormal 𝕜 (v_family i)\n⊢ Orthonormal 𝕜 fun a => ↑(V a.fst) (v_family a.fst a.snd)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase left\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nG : ι → Type u_5\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\nα : ι → Type u_6\nv_family : (i : ι) → α i → G i\nhv_family : ∀ (i : ι), Orthonormal 𝕜 (v_family i)\n⊢ ∀ (i : (i : ι) × α i), ‖(fun a => ↑(V a.fst) (v_family a.fst a.snd)) i‖ = 1\n[PROOFSTEP]\nrintro ⟨i, v⟩\n[GOAL]\ncase left.mk\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nG : ι → Type u_5\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\nα : ι → Type u_6\nv_family : (i : ι) → α i → G i\nhv_family : ∀ (i : ι), Orthonormal 𝕜 (v_family i)\ni : ι\nv : α i\n⊢ ‖(fun a => ↑(V a.fst) (v_family a.fst a.snd)) { fst := i, snd := v }‖ = 1\n[PROOFSTEP]\nsimpa only [LinearIsometry.norm_map] using (hv_family i).left v\n[GOAL]\ncase right\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nG : ι → Type u_5\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\nα : ι → Type u_6\nv_family : (i : ι) → α i → G i\nhv_family : ∀ (i : ι), Orthonormal 𝕜 (v_family i)\n⊢ ∀ {i j : (i : ι) × α i},\n    i ≠ j → inner ((fun a => ↑(V a.fst) (v_family a.fst a.snd)) i) ((fun a => ↑(V a.fst) (v_family a.fst a.snd)) j) = 0\n[PROOFSTEP]\nrintro ⟨i, v⟩ ⟨j, w⟩ hvw\n[GOAL]\ncase right.mk.mk\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nG : ι → Type u_5\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\nα : ι → Type u_6\nv_family : (i : ι) → α i → G i\nhv_family : ∀ (i : ι), Orthonormal 𝕜 (v_family i)\ni : ι\nv : α i\nj : ι\nw : α j\nhvw : { fst := i, snd := v } ≠ { fst := j, snd := w }\n⊢ inner ((fun a => ↑(V a.fst) (v_family a.fst a.snd)) { fst := i, snd := v })\n      ((fun a => ↑(V a.fst) (v_family a.fst a.snd)) { fst := j, snd := w }) =\n    0\n[PROOFSTEP]\nby_cases hij : i = j\n[GOAL]\ncase pos\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nG : ι → Type u_5\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\nα : ι → Type u_6\nv_family : (i : ι) → α i → G i\nhv_family : ∀ (i : ι), Orthonormal 𝕜 (v_family i)\ni : ι\nv : α i\nj : ι\nw : α j\nhvw : { fst := i, snd := v } ≠ { fst := j, snd := w }\nhij : i = j\n⊢ inner ((fun a => ↑(V a.fst) (v_family a.fst a.snd)) { fst := i, snd := v })\n      ((fun a => ↑(V a.fst) (v_family a.fst a.snd)) { fst := j, snd := w }) =\n    0\n[PROOFSTEP]\nsubst hij\n[GOAL]\ncase pos\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nG : ι → Type u_5\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\nα : ι → Type u_6\nv_family : (i : ι) → α i → G i\nhv_family : ∀ (i : ι), Orthonormal 𝕜 (v_family i)\ni : ι\nv w : α i\nhvw : { fst := i, snd := v } ≠ { fst := i, snd := w }\n⊢ inner ((fun a => ↑(V a.fst) (v_family a.fst a.snd)) { fst := i, snd := v })\n      ((fun a => ↑(V a.fst) (v_family a.fst a.snd)) { fst := i, snd := w }) =\n    0\n[PROOFSTEP]\nhave : v ≠ w := fun h => by\n  subst h\n  exact hvw rfl\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nG : ι → Type u_5\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\nα : ι → Type u_6\nv_family : (i : ι) → α i → G i\nhv_family : ∀ (i : ι), Orthonormal 𝕜 (v_family i)\ni : ι\nv w : α i\nhvw : { fst := i, snd := v } ≠ { fst := i, snd := w }\nh : v = w\n⊢ False\n[PROOFSTEP]\nsubst h\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nG : ι → Type u_5\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\nα : ι → Type u_6\nv_family : (i : ι) → α i → G i\nhv_family : ∀ (i : ι), Orthonormal 𝕜 (v_family i)\ni : ι\nv : α i\nhvw : { fst := i, snd := v } ≠ { fst := i, snd := v }\n⊢ False\n[PROOFSTEP]\nexact hvw rfl\n[GOAL]\ncase pos\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nG : ι → Type u_5\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\nα : ι → Type u_6\nv_family : (i : ι) → α i → G i\nhv_family : ∀ (i : ι), Orthonormal 𝕜 (v_family i)\ni : ι\nv w : α i\nhvw : { fst := i, snd := v } ≠ { fst := i, snd := w }\nthis : v ≠ w\n⊢ inner ((fun a => ↑(V a.fst) (v_family a.fst a.snd)) { fst := i, snd := v })\n      ((fun a => ↑(V a.fst) (v_family a.fst a.snd)) { fst := i, snd := w }) =\n    0\n[PROOFSTEP]\nsimpa only [LinearIsometry.inner_map_map] using (hv_family i).2 this\n[GOAL]\ncase neg\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nG : ι → Type u_5\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\nα : ι → Type u_6\nv_family : (i : ι) → α i → G i\nhv_family : ∀ (i : ι), Orthonormal 𝕜 (v_family i)\ni : ι\nv : α i\nj : ι\nw : α j\nhvw : { fst := i, snd := v } ≠ { fst := j, snd := w }\nhij : ¬i = j\n⊢ inner ((fun a => ↑(V a.fst) (v_family a.fst a.snd)) { fst := i, snd := v })\n      ((fun a => ↑(V a.fst) (v_family a.fst a.snd)) { fst := j, snd := w }) =\n    0\n[PROOFSTEP]\nexact hV hij (v_family i v) (v_family j w)\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nG : ι → Type u_5\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\nf : (i : ι) → G i\ns₁ s₂ : Finset ι\n⊢ ‖∑ i in s₁, ↑(V i) (f i) - ∑ i in s₂, ↑(V i) (f i)‖ ^ 2 = ∑ i in s₁ \\ s₂, ‖f i‖ ^ 2 + ∑ i in s₂ \\ s₁, ‖f i‖ ^ 2\n[PROOFSTEP]\nrw [← Finset.sum_sdiff_sub_sum_sdiff, sub_eq_add_neg, ← Finset.sum_neg_distrib]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nG : ι → Type u_5\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\nf : (i : ι) → G i\ns₁ s₂ : Finset ι\n⊢ ‖∑ x in s₁ \\ s₂, ↑(V x) (f x) + ∑ x in s₂ \\ s₁, -↑(V x) (f x)‖ ^ 2 =\n    ∑ i in s₁ \\ s₂, ‖f i‖ ^ 2 + ∑ i in s₂ \\ s₁, ‖f i‖ ^ 2\n[PROOFSTEP]\nlet F : ∀ i, G i := fun i => if i ∈ s₁ then f i else -f i\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF✝ : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F✝\ninst✝² : InnerProductSpace ℝ F✝\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nG : ι → Type u_5\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\nf : (i : ι) → G i\ns₁ s₂ : Finset ι\nF : (i : ι) → G i := fun i => if i ∈ s₁ then f i else -f i\n⊢ ‖∑ x in s₁ \\ s₂, ↑(V x) (f x) + ∑ x in s₂ \\ s₁, -↑(V x) (f x)‖ ^ 2 =\n    ∑ i in s₁ \\ s₂, ‖f i‖ ^ 2 + ∑ i in s₂ \\ s₁, ‖f i‖ ^ 2\n[PROOFSTEP]\nhave hF₁ : ∀ i ∈ s₁ \\ s₂, F i = f i := fun i hi => if_pos (Finset.sdiff_subset _ _ hi)\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF✝ : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F✝\ninst✝² : InnerProductSpace ℝ F✝\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nG : ι → Type u_5\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\nf : (i : ι) → G i\ns₁ s₂ : Finset ι\nF : (i : ι) → G i := fun i => if i ∈ s₁ then f i else -f i\nhF₁ : ∀ (i : ι), i ∈ s₁ \\ s₂ → F i = f i\n⊢ ‖∑ x in s₁ \\ s₂, ↑(V x) (f x) + ∑ x in s₂ \\ s₁, -↑(V x) (f x)‖ ^ 2 =\n    ∑ i in s₁ \\ s₂, ‖f i‖ ^ 2 + ∑ i in s₂ \\ s₁, ‖f i‖ ^ 2\n[PROOFSTEP]\nhave hF₂ : ∀ i ∈ s₂ \\ s₁, F i = -f i := fun i hi => if_neg (Finset.mem_sdiff.mp hi).2\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF✝ : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F✝\ninst✝² : InnerProductSpace ℝ F✝\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nG : ι → Type u_5\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\nf : (i : ι) → G i\ns₁ s₂ : Finset ι\nF : (i : ι) → G i := fun i => if i ∈ s₁ then f i else -f i\nhF₁ : ∀ (i : ι), i ∈ s₁ \\ s₂ → F i = f i\nhF₂ : ∀ (i : ι), i ∈ s₂ \\ s₁ → F i = -f i\n⊢ ‖∑ x in s₁ \\ s₂, ↑(V x) (f x) + ∑ x in s₂ \\ s₁, -↑(V x) (f x)‖ ^ 2 =\n    ∑ i in s₁ \\ s₂, ‖f i‖ ^ 2 + ∑ i in s₂ \\ s₁, ‖f i‖ ^ 2\n[PROOFSTEP]\nhave hF : ∀ i, ‖F i‖ = ‖f i‖ := by\n  intro i\n  dsimp only\n  split_ifs <;> simp only [eq_self_iff_true, norm_neg]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF✝ : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F✝\ninst✝² : InnerProductSpace ℝ F✝\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nG : ι → Type u_5\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\nf : (i : ι) → G i\ns₁ s₂ : Finset ι\nF : (i : ι) → G i := fun i => if i ∈ s₁ then f i else -f i\nhF₁ : ∀ (i : ι), i ∈ s₁ \\ s₂ → F i = f i\nhF₂ : ∀ (i : ι), i ∈ s₂ \\ s₁ → F i = -f i\n⊢ ∀ (i : ι), ‖F i‖ = ‖f i‖\n[PROOFSTEP]\nintro i\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF✝ : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F✝\ninst✝² : InnerProductSpace ℝ F✝\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nG : ι → Type u_5\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\nf : (i : ι) → G i\ns₁ s₂ : Finset ι\nF : (i : ι) → G i := fun i => if i ∈ s₁ then f i else -f i\nhF₁ : ∀ (i : ι), i ∈ s₁ \\ s₂ → F i = f i\nhF₂ : ∀ (i : ι), i ∈ s₂ \\ s₁ → F i = -f i\ni : ι\n⊢ ‖F i‖ = ‖f i‖\n[PROOFSTEP]\ndsimp only\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF✝ : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F✝\ninst✝² : InnerProductSpace ℝ F✝\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nG : ι → Type u_5\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\nf : (i : ι) → G i\ns₁ s₂ : Finset ι\nF : (i : ι) → G i := fun i => if i ∈ s₁ then f i else -f i\nhF₁ : ∀ (i : ι), i ∈ s₁ \\ s₂ → F i = f i\nhF₂ : ∀ (i : ι), i ∈ s₂ \\ s₁ → F i = -f i\ni : ι\n⊢ ‖if i ∈ s₁ then f i else -f i‖ = ‖f i‖\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\n𝕜 : Type u_1\nE : Type u_2\nF✝ : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F✝\ninst✝² : InnerProductSpace ℝ F✝\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nG : ι → Type u_5\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\nf : (i : ι) → G i\ns₁ s₂ : Finset ι\nF : (i : ι) → G i := fun i => if i ∈ s₁ then f i else -f i\nhF₁ : ∀ (i : ι), i ∈ s₁ \\ s₂ → F i = f i\nhF₂ : ∀ (i : ι), i ∈ s₂ \\ s₁ → F i = -f i\ni : ι\nh✝ : i ∈ s₁\n⊢ ‖f i‖ = ‖f i‖\n[PROOFSTEP]\nsimp only [eq_self_iff_true, norm_neg]\n[GOAL]\ncase neg\n𝕜 : Type u_1\nE : Type u_2\nF✝ : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F✝\ninst✝² : InnerProductSpace ℝ F✝\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nG : ι → Type u_5\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\nf : (i : ι) → G i\ns₁ s₂ : Finset ι\nF : (i : ι) → G i := fun i => if i ∈ s₁ then f i else -f i\nhF₁ : ∀ (i : ι), i ∈ s₁ \\ s₂ → F i = f i\nhF₂ : ∀ (i : ι), i ∈ s₂ \\ s₁ → F i = -f i\ni : ι\nh✝ : ¬i ∈ s₁\n⊢ ‖-f i‖ = ‖f i‖\n[PROOFSTEP]\nsimp only [eq_self_iff_true, norm_neg]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF✝ : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F✝\ninst✝² : InnerProductSpace ℝ F✝\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nG : ι → Type u_5\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\nf : (i : ι) → G i\ns₁ s₂ : Finset ι\nF : (i : ι) → G i := fun i => if i ∈ s₁ then f i else -f i\nhF₁ : ∀ (i : ι), i ∈ s₁ \\ s₂ → F i = f i\nhF₂ : ∀ (i : ι), i ∈ s₂ \\ s₁ → F i = -f i\nhF : ∀ (i : ι), ‖F i‖ = ‖f i‖\n⊢ ‖∑ x in s₁ \\ s₂, ↑(V x) (f x) + ∑ x in s₂ \\ s₁, -↑(V x) (f x)‖ ^ 2 =\n    ∑ i in s₁ \\ s₂, ‖f i‖ ^ 2 + ∑ i in s₂ \\ s₁, ‖f i‖ ^ 2\n[PROOFSTEP]\nhave :\n  ‖(∑ i in s₁ \\ s₂, V i (F i)) + ∑ i in s₂ \\ s₁, V i (F i)‖ ^ 2 =\n    (∑ i in s₁ \\ s₂, ‖F i‖ ^ 2) + ∑ i in s₂ \\ s₁, ‖F i‖ ^ 2 :=\n  by\n  have hs : Disjoint (s₁ \\ s₂) (s₂ \\ s₁) := disjoint_sdiff_sdiff\n  simpa only [Finset.sum_union hs] using hV.norm_sum F (s₁ \\ s₂ ∪ s₂ \\ s₁)\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF✝ : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F✝\ninst✝² : InnerProductSpace ℝ F✝\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nG : ι → Type u_5\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\nf : (i : ι) → G i\ns₁ s₂ : Finset ι\nF : (i : ι) → G i := fun i => if i ∈ s₁ then f i else -f i\nhF₁ : ∀ (i : ι), i ∈ s₁ \\ s₂ → F i = f i\nhF₂ : ∀ (i : ι), i ∈ s₂ \\ s₁ → F i = -f i\nhF : ∀ (i : ι), ‖F i‖ = ‖f i‖\n⊢ ‖∑ i in s₁ \\ s₂, ↑(V i) (F i) + ∑ i in s₂ \\ s₁, ↑(V i) (F i)‖ ^ 2 =\n    ∑ i in s₁ \\ s₂, ‖F i‖ ^ 2 + ∑ i in s₂ \\ s₁, ‖F i‖ ^ 2\n[PROOFSTEP]\nhave hs : Disjoint (s₁ \\ s₂) (s₂ \\ s₁) := disjoint_sdiff_sdiff\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF✝ : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F✝\ninst✝² : InnerProductSpace ℝ F✝\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nG : ι → Type u_5\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\nf : (i : ι) → G i\ns₁ s₂ : Finset ι\nF : (i : ι) → G i := fun i => if i ∈ s₁ then f i else -f i\nhF₁ : ∀ (i : ι), i ∈ s₁ \\ s₂ → F i = f i\nhF₂ : ∀ (i : ι), i ∈ s₂ \\ s₁ → F i = -f i\nhF : ∀ (i : ι), ‖F i‖ = ‖f i‖\nhs : Disjoint (s₁ \\ s₂) (s₂ \\ s₁)\n⊢ ‖∑ i in s₁ \\ s₂, ↑(V i) (F i) + ∑ i in s₂ \\ s₁, ↑(V i) (F i)‖ ^ 2 =\n    ∑ i in s₁ \\ s₂, ‖F i‖ ^ 2 + ∑ i in s₂ \\ s₁, ‖F i‖ ^ 2\n[PROOFSTEP]\nsimpa only [Finset.sum_union hs] using hV.norm_sum F (s₁ \\ s₂ ∪ s₂ \\ s₁)\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF✝ : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F✝\ninst✝² : InnerProductSpace ℝ F✝\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nG : ι → Type u_5\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\nf : (i : ι) → G i\ns₁ s₂ : Finset ι\nF : (i : ι) → G i := fun i => if i ∈ s₁ then f i else -f i\nhF₁ : ∀ (i : ι), i ∈ s₁ \\ s₂ → F i = f i\nhF₂ : ∀ (i : ι), i ∈ s₂ \\ s₁ → F i = -f i\nhF : ∀ (i : ι), ‖F i‖ = ‖f i‖\nthis :\n  ‖∑ i in s₁ \\ s₂, ↑(V i) (F i) + ∑ i in s₂ \\ s₁, ↑(V i) (F i)‖ ^ 2 =\n    ∑ i in s₁ \\ s₂, ‖F i‖ ^ 2 + ∑ i in s₂ \\ s₁, ‖F i‖ ^ 2\n⊢ ‖∑ x in s₁ \\ s₂, ↑(V x) (f x) + ∑ x in s₂ \\ s₁, -↑(V x) (f x)‖ ^ 2 =\n    ∑ i in s₁ \\ s₂, ‖f i‖ ^ 2 + ∑ i in s₂ \\ s₁, ‖f i‖ ^ 2\n[PROOFSTEP]\nconvert this using 4\n[GOAL]\ncase h.e'_2.h.e'_5.h.e'_3.h.e'_5\n𝕜 : Type u_1\nE : Type u_2\nF✝ : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F✝\ninst✝² : InnerProductSpace ℝ F✝\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nG : ι → Type u_5\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\nf : (i : ι) → G i\ns₁ s₂ : Finset ι\nF : (i : ι) → G i := fun i => if i ∈ s₁ then f i else -f i\nhF₁ : ∀ (i : ι), i ∈ s₁ \\ s₂ → F i = f i\nhF₂ : ∀ (i : ι), i ∈ s₂ \\ s₁ → F i = -f i\nhF : ∀ (i : ι), ‖F i‖ = ‖f i‖\nthis :\n  ‖∑ i in s₁ \\ s₂, ↑(V i) (F i) + ∑ i in s₂ \\ s₁, ↑(V i) (F i)‖ ^ 2 =\n    ∑ i in s₁ \\ s₂, ‖F i‖ ^ 2 + ∑ i in s₂ \\ s₁, ‖F i‖ ^ 2\n⊢ ∑ x in s₁ \\ s₂, ↑(V x) (f x) = ∑ i in s₁ \\ s₂, ↑(V i) (F i)\n[PROOFSTEP]\nrefine' Finset.sum_congr rfl fun i hi => _\n[GOAL]\ncase h.e'_2.h.e'_5.h.e'_3.h.e'_5\n𝕜 : Type u_1\nE : Type u_2\nF✝ : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F✝\ninst✝² : InnerProductSpace ℝ F✝\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nG : ι → Type u_5\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\nf : (i : ι) → G i\ns₁ s₂ : Finset ι\nF : (i : ι) → G i := fun i => if i ∈ s₁ then f i else -f i\nhF₁ : ∀ (i : ι), i ∈ s₁ \\ s₂ → F i = f i\nhF₂ : ∀ (i : ι), i ∈ s₂ \\ s₁ → F i = -f i\nhF : ∀ (i : ι), ‖F i‖ = ‖f i‖\nthis :\n  ‖∑ i in s₁ \\ s₂, ↑(V i) (F i) + ∑ i in s₂ \\ s₁, ↑(V i) (F i)‖ ^ 2 =\n    ∑ i in s₁ \\ s₂, ‖F i‖ ^ 2 + ∑ i in s₂ \\ s₁, ‖F i‖ ^ 2\ni : ι\nhi : i ∈ s₁ \\ s₂\n⊢ ↑(V i) (f i) = ↑(V i) (F i)\n[PROOFSTEP]\nsimp only [hF₁ i hi]\n[GOAL]\ncase h.e'_2.h.e'_5.h.e'_3.h.e'_6\n𝕜 : Type u_1\nE : Type u_2\nF✝ : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F✝\ninst✝² : InnerProductSpace ℝ F✝\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nG : ι → Type u_5\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\nf : (i : ι) → G i\ns₁ s₂ : Finset ι\nF : (i : ι) → G i := fun i => if i ∈ s₁ then f i else -f i\nhF₁ : ∀ (i : ι), i ∈ s₁ \\ s₂ → F i = f i\nhF₂ : ∀ (i : ι), i ∈ s₂ \\ s₁ → F i = -f i\nhF : ∀ (i : ι), ‖F i‖ = ‖f i‖\nthis :\n  ‖∑ i in s₁ \\ s₂, ↑(V i) (F i) + ∑ i in s₂ \\ s₁, ↑(V i) (F i)‖ ^ 2 =\n    ∑ i in s₁ \\ s₂, ‖F i‖ ^ 2 + ∑ i in s₂ \\ s₁, ‖F i‖ ^ 2\n⊢ ∑ x in s₂ \\ s₁, -↑(V x) (f x) = ∑ i in s₂ \\ s₁, ↑(V i) (F i)\n[PROOFSTEP]\nrefine' Finset.sum_congr rfl fun i hi => _\n[GOAL]\ncase h.e'_2.h.e'_5.h.e'_3.h.e'_6\n𝕜 : Type u_1\nE : Type u_2\nF✝ : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F✝\ninst✝² : InnerProductSpace ℝ F✝\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nG : ι → Type u_5\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\nf : (i : ι) → G i\ns₁ s₂ : Finset ι\nF : (i : ι) → G i := fun i => if i ∈ s₁ then f i else -f i\nhF₁ : ∀ (i : ι), i ∈ s₁ \\ s₂ → F i = f i\nhF₂ : ∀ (i : ι), i ∈ s₂ \\ s₁ → F i = -f i\nhF : ∀ (i : ι), ‖F i‖ = ‖f i‖\nthis :\n  ‖∑ i in s₁ \\ s₂, ↑(V i) (F i) + ∑ i in s₂ \\ s₁, ↑(V i) (F i)‖ ^ 2 =\n    ∑ i in s₁ \\ s₂, ‖F i‖ ^ 2 + ∑ i in s₂ \\ s₁, ‖F i‖ ^ 2\ni : ι\nhi : i ∈ s₂ \\ s₁\n⊢ -↑(V i) (f i) = ↑(V i) (F i)\n[PROOFSTEP]\nsimp only [hF₂ i hi, LinearIsometry.map_neg]\n[GOAL]\ncase h.e'_3.h.e'_5.a.h.e'_5\n𝕜 : Type u_1\nE : Type u_2\nF✝ : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F✝\ninst✝² : InnerProductSpace ℝ F✝\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nG : ι → Type u_5\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\nf : (i : ι) → G i\ns₁ s₂ : Finset ι\nF : (i : ι) → G i := fun i => if i ∈ s₁ then f i else -f i\nhF₁ : ∀ (i : ι), i ∈ s₁ \\ s₂ → F i = f i\nhF₂ : ∀ (i : ι), i ∈ s₂ \\ s₁ → F i = -f i\nhF : ∀ (i : ι), ‖F i‖ = ‖f i‖\nthis :\n  ‖∑ i in s₁ \\ s₂, ↑(V i) (F i) + ∑ i in s₂ \\ s₁, ↑(V i) (F i)‖ ^ 2 =\n    ∑ i in s₁ \\ s₂, ‖F i‖ ^ 2 + ∑ i in s₂ \\ s₁, ‖F i‖ ^ 2\nx✝ : ι\na✝ : x✝ ∈ s₁ \\ s₂\n⊢ ‖f x✝‖ = ‖F x✝‖\n[PROOFSTEP]\nsimp only [hF]\n[GOAL]\ncase h.e'_3.h.e'_6.a.h.e'_5\n𝕜 : Type u_1\nE : Type u_2\nF✝ : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F✝\ninst✝² : InnerProductSpace ℝ F✝\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nG : ι → Type u_5\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\nf : (i : ι) → G i\ns₁ s₂ : Finset ι\nF : (i : ι) → G i := fun i => if i ∈ s₁ then f i else -f i\nhF₁ : ∀ (i : ι), i ∈ s₁ \\ s₂ → F i = f i\nhF₂ : ∀ (i : ι), i ∈ s₂ \\ s₁ → F i = -f i\nhF : ∀ (i : ι), ‖F i‖ = ‖f i‖\nthis :\n  ‖∑ i in s₁ \\ s₂, ↑(V i) (F i) + ∑ i in s₂ \\ s₁, ↑(V i) (F i)‖ ^ 2 =\n    ∑ i in s₁ \\ s₂, ‖F i‖ ^ 2 + ∑ i in s₂ \\ s₁, ‖F i‖ ^ 2\nx✝ : ι\na✝ : x✝ ∈ s₂ \\ s₁\n⊢ ‖f x✝‖ = ‖F x✝‖\n[PROOFSTEP]\nsimp only [hF]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : InnerProductSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nG : ι → Type u_5\ninst✝² : (i : ι) → NormedAddCommGroup (G i)\ninst✝¹ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\ninst✝ : CompleteSpace E\nf : (i : ι) → G i\n⊢ (Summable fun i => ↑(V i) (f i)) ↔ Summable fun i => ‖f i‖ ^ 2\n[PROOFSTEP]\nclassical\nclear dec_ι\nsimp only [summable_iff_cauchySeq_finset, NormedAddCommGroup.cauchySeq_iff, Real.norm_eq_abs]\nconstructor\n· intro hf ε hε\n  obtain ⟨a, H⟩ := hf _ (sqrt_pos.mpr hε)\n  use a\n  intro s₁ hs₁ s₂ hs₂\n  rw [← Finset.sum_sdiff_sub_sum_sdiff]\n  refine' (abs_sub _ _).trans_lt _\n  have : ∀ i, 0 ≤ ‖f i‖ ^ 2 := fun i : ι => sq_nonneg _\n  simp only [Finset.abs_sum_of_nonneg' this]\n  have : ((∑ i in s₁ \\ s₂, ‖f i‖ ^ 2) + ∑ i in s₂ \\ s₁, ‖f i‖ ^ 2) < sqrt ε ^ 2 :=\n    by\n    rw [← hV.norm_sq_diff_sum, sq_lt_sq, abs_of_nonneg (sqrt_nonneg _), abs_of_nonneg (norm_nonneg _)]\n    exact H s₁ hs₁ s₂ hs₂\n  have hη := sq_sqrt (le_of_lt hε)\n  linarith\n· intro hf ε hε\n  have hε' : 0 < ε ^ 2 / 2 := half_pos (sq_pos_of_pos hε)\n  obtain ⟨a, H⟩ := hf _ hε'\n  use a\n  intro s₁ hs₁ s₂ hs₂\n  refine' (abs_lt_of_sq_lt_sq' _ (le_of_lt hε)).2\n  have has : a ≤ s₁ ⊓ s₂ := le_inf hs₁ hs₂\n  rw [hV.norm_sq_diff_sum]\n  have Hs₁ : ∑ x : ι in s₁ \\ s₂, ‖f x‖ ^ 2 < ε ^ 2 / 2 :=\n    by\n    convert H _ hs₁ _ has\n    have : s₁ ⊓ s₂ ⊆ s₁ := Finset.inter_subset_left _ _\n    rw [← Finset.sum_sdiff this, add_tsub_cancel_right, Finset.abs_sum_of_nonneg']\n    · simp\n    · exact fun i => sq_nonneg _\n  have Hs₂ : ∑ x : ι in s₂ \\ s₁, ‖f x‖ ^ 2 < ε ^ 2 / 2 :=\n    by\n    convert H _ hs₂ _ has\n    have : s₁ ⊓ s₂ ⊆ s₂ := Finset.inter_subset_right _ _\n    rw [← Finset.sum_sdiff this, add_tsub_cancel_right, Finset.abs_sum_of_nonneg']\n    · simp\n    · exact fun i => sq_nonneg _\n  linarith\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : InnerProductSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nG : ι → Type u_5\ninst✝² : (i : ι) → NormedAddCommGroup (G i)\ninst✝¹ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\ninst✝ : CompleteSpace E\nf : (i : ι) → G i\n⊢ (Summable fun i => ↑(V i) (f i)) ↔ Summable fun i => ‖f i‖ ^ 2\n[PROOFSTEP]\nclear dec_ι\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : InnerProductSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\nG : ι → Type u_5\ninst✝² : (i : ι) → NormedAddCommGroup (G i)\ninst✝¹ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\ninst✝ : CompleteSpace E\nf : (i : ι) → G i\n⊢ (Summable fun i => ↑(V i) (f i)) ↔ Summable fun i => ‖f i‖ ^ 2\n[PROOFSTEP]\nsimp only [summable_iff_cauchySeq_finset, NormedAddCommGroup.cauchySeq_iff, Real.norm_eq_abs]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : InnerProductSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\nG : ι → Type u_5\ninst✝² : (i : ι) → NormedAddCommGroup (G i)\ninst✝¹ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\ninst✝ : CompleteSpace E\nf : (i : ι) → G i\n⊢ (∀ (ε : ℝ),\n      ε > 0 →\n        ∃ N,\n          ∀ (m : Finset ι), N ≤ m → ∀ (n : Finset ι), N ≤ n → ‖∑ b in m, ↑(V b) (f b) - ∑ b in n, ↑(V b) (f b)‖ < ε) ↔\n    ∀ (ε : ℝ),\n      ε > 0 → ∃ N, ∀ (m : Finset ι), N ≤ m → ∀ (n : Finset ι), N ≤ n → |∑ i in m, ‖f i‖ ^ 2 - ∑ i in n, ‖f i‖ ^ 2| < ε\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : InnerProductSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\nG : ι → Type u_5\ninst✝² : (i : ι) → NormedAddCommGroup (G i)\ninst✝¹ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\ninst✝ : CompleteSpace E\nf : (i : ι) → G i\n⊢ (∀ (ε : ℝ),\n      ε > 0 →\n        ∃ N,\n          ∀ (m : Finset ι), N ≤ m → ∀ (n : Finset ι), N ≤ n → ‖∑ b in m, ↑(V b) (f b) - ∑ b in n, ↑(V b) (f b)‖ < ε) →\n    ∀ (ε : ℝ),\n      ε > 0 → ∃ N, ∀ (m : Finset ι), N ≤ m → ∀ (n : Finset ι), N ≤ n → |∑ i in m, ‖f i‖ ^ 2 - ∑ i in n, ‖f i‖ ^ 2| < ε\n[PROOFSTEP]\nintro hf ε hε\n[GOAL]\ncase mp\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : InnerProductSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\nG : ι → Type u_5\ninst✝² : (i : ι) → NormedAddCommGroup (G i)\ninst✝¹ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\ninst✝ : CompleteSpace E\nf : (i : ι) → G i\nhf :\n  ∀ (ε : ℝ),\n    ε > 0 →\n      ∃ N, ∀ (m : Finset ι), N ≤ m → ∀ (n : Finset ι), N ≤ n → ‖∑ b in m, ↑(V b) (f b) - ∑ b in n, ↑(V b) (f b)‖ < ε\nε : ℝ\nhε : ε > 0\n⊢ ∃ N, ∀ (m : Finset ι), N ≤ m → ∀ (n : Finset ι), N ≤ n → |∑ i in m, ‖f i‖ ^ 2 - ∑ i in n, ‖f i‖ ^ 2| < ε\n[PROOFSTEP]\nobtain ⟨a, H⟩ := hf _ (sqrt_pos.mpr hε)\n[GOAL]\ncase mp.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : InnerProductSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\nG : ι → Type u_5\ninst✝² : (i : ι) → NormedAddCommGroup (G i)\ninst✝¹ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\ninst✝ : CompleteSpace E\nf : (i : ι) → G i\nhf :\n  ∀ (ε : ℝ),\n    ε > 0 →\n      ∃ N, ∀ (m : Finset ι), N ≤ m → ∀ (n : Finset ι), N ≤ n → ‖∑ b in m, ↑(V b) (f b) - ∑ b in n, ↑(V b) (f b)‖ < ε\nε : ℝ\nhε : ε > 0\na : Finset ι\nH : ∀ (m : Finset ι), a ≤ m → ∀ (n : Finset ι), a ≤ n → ‖∑ b in m, ↑(V b) (f b) - ∑ b in n, ↑(V b) (f b)‖ < sqrt ε\n⊢ ∃ N, ∀ (m : Finset ι), N ≤ m → ∀ (n : Finset ι), N ≤ n → |∑ i in m, ‖f i‖ ^ 2 - ∑ i in n, ‖f i‖ ^ 2| < ε\n[PROOFSTEP]\nuse a\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : InnerProductSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\nG : ι → Type u_5\ninst✝² : (i : ι) → NormedAddCommGroup (G i)\ninst✝¹ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\ninst✝ : CompleteSpace E\nf : (i : ι) → G i\nhf :\n  ∀ (ε : ℝ),\n    ε > 0 →\n      ∃ N, ∀ (m : Finset ι), N ≤ m → ∀ (n : Finset ι), N ≤ n → ‖∑ b in m, ↑(V b) (f b) - ∑ b in n, ↑(V b) (f b)‖ < ε\nε : ℝ\nhε : ε > 0\na : Finset ι\nH : ∀ (m : Finset ι), a ≤ m → ∀ (n : Finset ι), a ≤ n → ‖∑ b in m, ↑(V b) (f b) - ∑ b in n, ↑(V b) (f b)‖ < sqrt ε\n⊢ ∀ (m : Finset ι), a ≤ m → ∀ (n : Finset ι), a ≤ n → |∑ i in m, ‖f i‖ ^ 2 - ∑ i in n, ‖f i‖ ^ 2| < ε\n[PROOFSTEP]\nintro s₁ hs₁ s₂ hs₂\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : InnerProductSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\nG : ι → Type u_5\ninst✝² : (i : ι) → NormedAddCommGroup (G i)\ninst✝¹ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\ninst✝ : CompleteSpace E\nf : (i : ι) → G i\nhf :\n  ∀ (ε : ℝ),\n    ε > 0 →\n      ∃ N, ∀ (m : Finset ι), N ≤ m → ∀ (n : Finset ι), N ≤ n → ‖∑ b in m, ↑(V b) (f b) - ∑ b in n, ↑(V b) (f b)‖ < ε\nε : ℝ\nhε : ε > 0\na : Finset ι\nH : ∀ (m : Finset ι), a ≤ m → ∀ (n : Finset ι), a ≤ n → ‖∑ b in m, ↑(V b) (f b) - ∑ b in n, ↑(V b) (f b)‖ < sqrt ε\ns₁ : Finset ι\nhs₁ : a ≤ s₁\ns₂ : Finset ι\nhs₂ : a ≤ s₂\n⊢ |∑ i in s₁, ‖f i‖ ^ 2 - ∑ i in s₂, ‖f i‖ ^ 2| < ε\n[PROOFSTEP]\nrw [← Finset.sum_sdiff_sub_sum_sdiff]\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : InnerProductSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\nG : ι → Type u_5\ninst✝² : (i : ι) → NormedAddCommGroup (G i)\ninst✝¹ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\ninst✝ : CompleteSpace E\nf : (i : ι) → G i\nhf :\n  ∀ (ε : ℝ),\n    ε > 0 →\n      ∃ N, ∀ (m : Finset ι), N ≤ m → ∀ (n : Finset ι), N ≤ n → ‖∑ b in m, ↑(V b) (f b) - ∑ b in n, ↑(V b) (f b)‖ < ε\nε : ℝ\nhε : ε > 0\na : Finset ι\nH : ∀ (m : Finset ι), a ≤ m → ∀ (n : Finset ι), a ≤ n → ‖∑ b in m, ↑(V b) (f b) - ∑ b in n, ↑(V b) (f b)‖ < sqrt ε\ns₁ : Finset ι\nhs₁ : a ≤ s₁\ns₂ : Finset ι\nhs₂ : a ≤ s₂\n⊢ |∑ x in s₁ \\ s₂, ‖f x‖ ^ 2 - ∑ x in s₂ \\ s₁, ‖f x‖ ^ 2| < ε\n[PROOFSTEP]\nrefine' (abs_sub _ _).trans_lt _\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : InnerProductSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\nG : ι → Type u_5\ninst✝² : (i : ι) → NormedAddCommGroup (G i)\ninst✝¹ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\ninst✝ : CompleteSpace E\nf : (i : ι) → G i\nhf :\n  ∀ (ε : ℝ),\n    ε > 0 →\n      ∃ N, ∀ (m : Finset ι), N ≤ m → ∀ (n : Finset ι), N ≤ n → ‖∑ b in m, ↑(V b) (f b) - ∑ b in n, ↑(V b) (f b)‖ < ε\nε : ℝ\nhε : ε > 0\na : Finset ι\nH : ∀ (m : Finset ι), a ≤ m → ∀ (n : Finset ι), a ≤ n → ‖∑ b in m, ↑(V b) (f b) - ∑ b in n, ↑(V b) (f b)‖ < sqrt ε\ns₁ : Finset ι\nhs₁ : a ≤ s₁\ns₂ : Finset ι\nhs₂ : a ≤ s₂\n⊢ |∑ x in s₁ \\ s₂, ‖f x‖ ^ 2| + |∑ x in s₂ \\ s₁, ‖f x‖ ^ 2| < ε\n[PROOFSTEP]\nhave : ∀ i, 0 ≤ ‖f i‖ ^ 2 := fun i : ι => sq_nonneg _\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : InnerProductSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\nG : ι → Type u_5\ninst✝² : (i : ι) → NormedAddCommGroup (G i)\ninst✝¹ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\ninst✝ : CompleteSpace E\nf : (i : ι) → G i\nhf :\n  ∀ (ε : ℝ),\n    ε > 0 →\n      ∃ N, ∀ (m : Finset ι), N ≤ m → ∀ (n : Finset ι), N ≤ n → ‖∑ b in m, ↑(V b) (f b) - ∑ b in n, ↑(V b) (f b)‖ < ε\nε : ℝ\nhε : ε > 0\na : Finset ι\nH : ∀ (m : Finset ι), a ≤ m → ∀ (n : Finset ι), a ≤ n → ‖∑ b in m, ↑(V b) (f b) - ∑ b in n, ↑(V b) (f b)‖ < sqrt ε\ns₁ : Finset ι\nhs₁ : a ≤ s₁\ns₂ : Finset ι\nhs₂ : a ≤ s₂\nthis : ∀ (i : ι), 0 ≤ ‖f i‖ ^ 2\n⊢ |∑ x in s₁ \\ s₂, ‖f x‖ ^ 2| + |∑ x in s₂ \\ s₁, ‖f x‖ ^ 2| < ε\n[PROOFSTEP]\nsimp only [Finset.abs_sum_of_nonneg' this]\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : InnerProductSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\nG : ι → Type u_5\ninst✝² : (i : ι) → NormedAddCommGroup (G i)\ninst✝¹ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\ninst✝ : CompleteSpace E\nf : (i : ι) → G i\nhf :\n  ∀ (ε : ℝ),\n    ε > 0 →\n      ∃ N, ∀ (m : Finset ι), N ≤ m → ∀ (n : Finset ι), N ≤ n → ‖∑ b in m, ↑(V b) (f b) - ∑ b in n, ↑(V b) (f b)‖ < ε\nε : ℝ\nhε : ε > 0\na : Finset ι\nH : ∀ (m : Finset ι), a ≤ m → ∀ (n : Finset ι), a ≤ n → ‖∑ b in m, ↑(V b) (f b) - ∑ b in n, ↑(V b) (f b)‖ < sqrt ε\ns₁ : Finset ι\nhs₁ : a ≤ s₁\ns₂ : Finset ι\nhs₂ : a ≤ s₂\nthis : ∀ (i : ι), 0 ≤ ‖f i‖ ^ 2\n⊢ ∑ x in s₁ \\ s₂, ‖f x‖ ^ 2 + ∑ x in s₂ \\ s₁, ‖f x‖ ^ 2 < ε\n[PROOFSTEP]\nhave : ((∑ i in s₁ \\ s₂, ‖f i‖ ^ 2) + ∑ i in s₂ \\ s₁, ‖f i‖ ^ 2) < sqrt ε ^ 2 :=\n  by\n  rw [← hV.norm_sq_diff_sum, sq_lt_sq, abs_of_nonneg (sqrt_nonneg _), abs_of_nonneg (norm_nonneg _)]\n  exact H s₁ hs₁ s₂ hs₂\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : InnerProductSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\nG : ι → Type u_5\ninst✝² : (i : ι) → NormedAddCommGroup (G i)\ninst✝¹ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\ninst✝ : CompleteSpace E\nf : (i : ι) → G i\nhf :\n  ∀ (ε : ℝ),\n    ε > 0 →\n      ∃ N, ∀ (m : Finset ι), N ≤ m → ∀ (n : Finset ι), N ≤ n → ‖∑ b in m, ↑(V b) (f b) - ∑ b in n, ↑(V b) (f b)‖ < ε\nε : ℝ\nhε : ε > 0\na : Finset ι\nH : ∀ (m : Finset ι), a ≤ m → ∀ (n : Finset ι), a ≤ n → ‖∑ b in m, ↑(V b) (f b) - ∑ b in n, ↑(V b) (f b)‖ < sqrt ε\ns₁ : Finset ι\nhs₁ : a ≤ s₁\ns₂ : Finset ι\nhs₂ : a ≤ s₂\nthis : ∀ (i : ι), 0 ≤ ‖f i‖ ^ 2\n⊢ ∑ i in s₁ \\ s₂, ‖f i‖ ^ 2 + ∑ i in s₂ \\ s₁, ‖f i‖ ^ 2 < sqrt ε ^ 2\n[PROOFSTEP]\nrw [← hV.norm_sq_diff_sum, sq_lt_sq, abs_of_nonneg (sqrt_nonneg _), abs_of_nonneg (norm_nonneg _)]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : InnerProductSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\nG : ι → Type u_5\ninst✝² : (i : ι) → NormedAddCommGroup (G i)\ninst✝¹ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\ninst✝ : CompleteSpace E\nf : (i : ι) → G i\nhf :\n  ∀ (ε : ℝ),\n    ε > 0 →\n      ∃ N, ∀ (m : Finset ι), N ≤ m → ∀ (n : Finset ι), N ≤ n → ‖∑ b in m, ↑(V b) (f b) - ∑ b in n, ↑(V b) (f b)‖ < ε\nε : ℝ\nhε : ε > 0\na : Finset ι\nH : ∀ (m : Finset ι), a ≤ m → ∀ (n : Finset ι), a ≤ n → ‖∑ b in m, ↑(V b) (f b) - ∑ b in n, ↑(V b) (f b)‖ < sqrt ε\ns₁ : Finset ι\nhs₁ : a ≤ s₁\ns₂ : Finset ι\nhs₂ : a ≤ s₂\nthis : ∀ (i : ι), 0 ≤ ‖f i‖ ^ 2\n⊢ ‖∑ i in s₁, ↑(V i) (f i) - ∑ i in s₂, ↑(V i) (f i)‖ < sqrt ε\n[PROOFSTEP]\nexact H s₁ hs₁ s₂ hs₂\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : InnerProductSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\nG : ι → Type u_5\ninst✝² : (i : ι) → NormedAddCommGroup (G i)\ninst✝¹ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\ninst✝ : CompleteSpace E\nf : (i : ι) → G i\nhf :\n  ∀ (ε : ℝ),\n    ε > 0 →\n      ∃ N, ∀ (m : Finset ι), N ≤ m → ∀ (n : Finset ι), N ≤ n → ‖∑ b in m, ↑(V b) (f b) - ∑ b in n, ↑(V b) (f b)‖ < ε\nε : ℝ\nhε : ε > 0\na : Finset ι\nH : ∀ (m : Finset ι), a ≤ m → ∀ (n : Finset ι), a ≤ n → ‖∑ b in m, ↑(V b) (f b) - ∑ b in n, ↑(V b) (f b)‖ < sqrt ε\ns₁ : Finset ι\nhs₁ : a ≤ s₁\ns₂ : Finset ι\nhs₂ : a ≤ s₂\nthis✝ : ∀ (i : ι), 0 ≤ ‖f i‖ ^ 2\nthis : ∑ i in s₁ \\ s₂, ‖f i‖ ^ 2 + ∑ i in s₂ \\ s₁, ‖f i‖ ^ 2 < sqrt ε ^ 2\n⊢ ∑ x in s₁ \\ s₂, ‖f x‖ ^ 2 + ∑ x in s₂ \\ s₁, ‖f x‖ ^ 2 < ε\n[PROOFSTEP]\nhave hη := sq_sqrt (le_of_lt hε)\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : InnerProductSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\nG : ι → Type u_5\ninst✝² : (i : ι) → NormedAddCommGroup (G i)\ninst✝¹ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\ninst✝ : CompleteSpace E\nf : (i : ι) → G i\nhf :\n  ∀ (ε : ℝ),\n    ε > 0 →\n      ∃ N, ∀ (m : Finset ι), N ≤ m → ∀ (n : Finset ι), N ≤ n → ‖∑ b in m, ↑(V b) (f b) - ∑ b in n, ↑(V b) (f b)‖ < ε\nε : ℝ\nhε : ε > 0\na : Finset ι\nH : ∀ (m : Finset ι), a ≤ m → ∀ (n : Finset ι), a ≤ n → ‖∑ b in m, ↑(V b) (f b) - ∑ b in n, ↑(V b) (f b)‖ < sqrt ε\ns₁ : Finset ι\nhs₁ : a ≤ s₁\ns₂ : Finset ι\nhs₂ : a ≤ s₂\nthis✝ : ∀ (i : ι), 0 ≤ ‖f i‖ ^ 2\nthis : ∑ i in s₁ \\ s₂, ‖f i‖ ^ 2 + ∑ i in s₂ \\ s₁, ‖f i‖ ^ 2 < sqrt ε ^ 2\nhη : sqrt ε ^ 2 = ε\n⊢ ∑ x in s₁ \\ s₂, ‖f x‖ ^ 2 + ∑ x in s₂ \\ s₁, ‖f x‖ ^ 2 < ε\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase mpr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : InnerProductSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\nG : ι → Type u_5\ninst✝² : (i : ι) → NormedAddCommGroup (G i)\ninst✝¹ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\ninst✝ : CompleteSpace E\nf : (i : ι) → G i\n⊢ (∀ (ε : ℝ),\n      ε > 0 →\n        ∃ N, ∀ (m : Finset ι), N ≤ m → ∀ (n : Finset ι), N ≤ n → |∑ i in m, ‖f i‖ ^ 2 - ∑ i in n, ‖f i‖ ^ 2| < ε) →\n    ∀ (ε : ℝ),\n      ε > 0 →\n        ∃ N, ∀ (m : Finset ι), N ≤ m → ∀ (n : Finset ι), N ≤ n → ‖∑ b in m, ↑(V b) (f b) - ∑ b in n, ↑(V b) (f b)‖ < ε\n[PROOFSTEP]\nintro hf ε hε\n[GOAL]\ncase mpr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : InnerProductSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\nG : ι → Type u_5\ninst✝² : (i : ι) → NormedAddCommGroup (G i)\ninst✝¹ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\ninst✝ : CompleteSpace E\nf : (i : ι) → G i\nhf :\n  ∀ (ε : ℝ),\n    ε > 0 → ∃ N, ∀ (m : Finset ι), N ≤ m → ∀ (n : Finset ι), N ≤ n → |∑ i in m, ‖f i‖ ^ 2 - ∑ i in n, ‖f i‖ ^ 2| < ε\nε : ℝ\nhε : ε > 0\n⊢ ∃ N, ∀ (m : Finset ι), N ≤ m → ∀ (n : Finset ι), N ≤ n → ‖∑ b in m, ↑(V b) (f b) - ∑ b in n, ↑(V b) (f b)‖ < ε\n[PROOFSTEP]\nhave hε' : 0 < ε ^ 2 / 2 := half_pos (sq_pos_of_pos hε)\n[GOAL]\ncase mpr\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : InnerProductSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\nG : ι → Type u_5\ninst✝² : (i : ι) → NormedAddCommGroup (G i)\ninst✝¹ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\ninst✝ : CompleteSpace E\nf : (i : ι) → G i\nhf :\n  ∀ (ε : ℝ),\n    ε > 0 → ∃ N, ∀ (m : Finset ι), N ≤ m → ∀ (n : Finset ι), N ≤ n → |∑ i in m, ‖f i‖ ^ 2 - ∑ i in n, ‖f i‖ ^ 2| < ε\nε : ℝ\nhε : ε > 0\nhε' : 0 < ε ^ 2 / 2\n⊢ ∃ N, ∀ (m : Finset ι), N ≤ m → ∀ (n : Finset ι), N ≤ n → ‖∑ b in m, ↑(V b) (f b) - ∑ b in n, ↑(V b) (f b)‖ < ε\n[PROOFSTEP]\nobtain ⟨a, H⟩ := hf _ hε'\n[GOAL]\ncase mpr.intro\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : InnerProductSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\nG : ι → Type u_5\ninst✝² : (i : ι) → NormedAddCommGroup (G i)\ninst✝¹ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\ninst✝ : CompleteSpace E\nf : (i : ι) → G i\nhf :\n  ∀ (ε : ℝ),\n    ε > 0 → ∃ N, ∀ (m : Finset ι), N ≤ m → ∀ (n : Finset ι), N ≤ n → |∑ i in m, ‖f i‖ ^ 2 - ∑ i in n, ‖f i‖ ^ 2| < ε\nε : ℝ\nhε : ε > 0\nhε' : 0 < ε ^ 2 / 2\na : Finset ι\nH : ∀ (m : Finset ι), a ≤ m → ∀ (n : Finset ι), a ≤ n → |∑ i in m, ‖f i‖ ^ 2 - ∑ i in n, ‖f i‖ ^ 2| < ε ^ 2 / 2\n⊢ ∃ N, ∀ (m : Finset ι), N ≤ m → ∀ (n : Finset ι), N ≤ n → ‖∑ b in m, ↑(V b) (f b) - ∑ b in n, ↑(V b) (f b)‖ < ε\n[PROOFSTEP]\nuse a\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : InnerProductSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\nG : ι → Type u_5\ninst✝² : (i : ι) → NormedAddCommGroup (G i)\ninst✝¹ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\ninst✝ : CompleteSpace E\nf : (i : ι) → G i\nhf :\n  ∀ (ε : ℝ),\n    ε > 0 → ∃ N, ∀ (m : Finset ι), N ≤ m → ∀ (n : Finset ι), N ≤ n → |∑ i in m, ‖f i‖ ^ 2 - ∑ i in n, ‖f i‖ ^ 2| < ε\nε : ℝ\nhε : ε > 0\nhε' : 0 < ε ^ 2 / 2\na : Finset ι\nH : ∀ (m : Finset ι), a ≤ m → ∀ (n : Finset ι), a ≤ n → |∑ i in m, ‖f i‖ ^ 2 - ∑ i in n, ‖f i‖ ^ 2| < ε ^ 2 / 2\n⊢ ∀ (m : Finset ι), a ≤ m → ∀ (n : Finset ι), a ≤ n → ‖∑ b in m, ↑(V b) (f b) - ∑ b in n, ↑(V b) (f b)‖ < ε\n[PROOFSTEP]\nintro s₁ hs₁ s₂ hs₂\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : InnerProductSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\nG : ι → Type u_5\ninst✝² : (i : ι) → NormedAddCommGroup (G i)\ninst✝¹ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\ninst✝ : CompleteSpace E\nf : (i : ι) → G i\nhf :\n  ∀ (ε : ℝ),\n    ε > 0 → ∃ N, ∀ (m : Finset ι), N ≤ m → ∀ (n : Finset ι), N ≤ n → |∑ i in m, ‖f i‖ ^ 2 - ∑ i in n, ‖f i‖ ^ 2| < ε\nε : ℝ\nhε : ε > 0\nhε' : 0 < ε ^ 2 / 2\na : Finset ι\nH : ∀ (m : Finset ι), a ≤ m → ∀ (n : Finset ι), a ≤ n → |∑ i in m, ‖f i‖ ^ 2 - ∑ i in n, ‖f i‖ ^ 2| < ε ^ 2 / 2\ns₁ : Finset ι\nhs₁ : a ≤ s₁\ns₂ : Finset ι\nhs₂ : a ≤ s₂\n⊢ ‖∑ b in s₁, ↑(V b) (f b) - ∑ b in s₂, ↑(V b) (f b)‖ < ε\n[PROOFSTEP]\nrefine' (abs_lt_of_sq_lt_sq' _ (le_of_lt hε)).2\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : InnerProductSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\nG : ι → Type u_5\ninst✝² : (i : ι) → NormedAddCommGroup (G i)\ninst✝¹ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\ninst✝ : CompleteSpace E\nf : (i : ι) → G i\nhf :\n  ∀ (ε : ℝ),\n    ε > 0 → ∃ N, ∀ (m : Finset ι), N ≤ m → ∀ (n : Finset ι), N ≤ n → |∑ i in m, ‖f i‖ ^ 2 - ∑ i in n, ‖f i‖ ^ 2| < ε\nε : ℝ\nhε : ε > 0\nhε' : 0 < ε ^ 2 / 2\na : Finset ι\nH : ∀ (m : Finset ι), a ≤ m → ∀ (n : Finset ι), a ≤ n → |∑ i in m, ‖f i‖ ^ 2 - ∑ i in n, ‖f i‖ ^ 2| < ε ^ 2 / 2\ns₁ : Finset ι\nhs₁ : a ≤ s₁\ns₂ : Finset ι\nhs₂ : a ≤ s₂\n⊢ ‖∑ b in s₁, ↑(V b) (f b) - ∑ b in s₂, ↑(V b) (f b)‖ ^ 2 < ε ^ 2\n[PROOFSTEP]\nhave has : a ≤ s₁ ⊓ s₂ := le_inf hs₁ hs₂\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : InnerProductSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\nG : ι → Type u_5\ninst✝² : (i : ι) → NormedAddCommGroup (G i)\ninst✝¹ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\ninst✝ : CompleteSpace E\nf : (i : ι) → G i\nhf :\n  ∀ (ε : ℝ),\n    ε > 0 → ∃ N, ∀ (m : Finset ι), N ≤ m → ∀ (n : Finset ι), N ≤ n → |∑ i in m, ‖f i‖ ^ 2 - ∑ i in n, ‖f i‖ ^ 2| < ε\nε : ℝ\nhε : ε > 0\nhε' : 0 < ε ^ 2 / 2\na : Finset ι\nH : ∀ (m : Finset ι), a ≤ m → ∀ (n : Finset ι), a ≤ n → |∑ i in m, ‖f i‖ ^ 2 - ∑ i in n, ‖f i‖ ^ 2| < ε ^ 2 / 2\ns₁ : Finset ι\nhs₁ : a ≤ s₁\ns₂ : Finset ι\nhs₂ : a ≤ s₂\nhas : a ≤ s₁ ⊓ s₂\n⊢ ‖∑ b in s₁, ↑(V b) (f b) - ∑ b in s₂, ↑(V b) (f b)‖ ^ 2 < ε ^ 2\n[PROOFSTEP]\nrw [hV.norm_sq_diff_sum]\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : InnerProductSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\nG : ι → Type u_5\ninst✝² : (i : ι) → NormedAddCommGroup (G i)\ninst✝¹ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\ninst✝ : CompleteSpace E\nf : (i : ι) → G i\nhf :\n  ∀ (ε : ℝ),\n    ε > 0 → ∃ N, ∀ (m : Finset ι), N ≤ m → ∀ (n : Finset ι), N ≤ n → |∑ i in m, ‖f i‖ ^ 2 - ∑ i in n, ‖f i‖ ^ 2| < ε\nε : ℝ\nhε : ε > 0\nhε' : 0 < ε ^ 2 / 2\na : Finset ι\nH : ∀ (m : Finset ι), a ≤ m → ∀ (n : Finset ι), a ≤ n → |∑ i in m, ‖f i‖ ^ 2 - ∑ i in n, ‖f i‖ ^ 2| < ε ^ 2 / 2\ns₁ : Finset ι\nhs₁ : a ≤ s₁\ns₂ : Finset ι\nhs₂ : a ≤ s₂\nhas : a ≤ s₁ ⊓ s₂\n⊢ ∑ i in s₁ \\ s₂, ‖f i‖ ^ 2 + ∑ i in s₂ \\ s₁, ‖f i‖ ^ 2 < ε ^ 2\n[PROOFSTEP]\nhave Hs₁ : ∑ x : ι in s₁ \\ s₂, ‖f x‖ ^ 2 < ε ^ 2 / 2 :=\n  by\n  convert H _ hs₁ _ has\n  have : s₁ ⊓ s₂ ⊆ s₁ := Finset.inter_subset_left _ _\n  rw [← Finset.sum_sdiff this, add_tsub_cancel_right, Finset.abs_sum_of_nonneg']\n  · simp\n  · exact fun i => sq_nonneg _\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : InnerProductSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\nG : ι → Type u_5\ninst✝² : (i : ι) → NormedAddCommGroup (G i)\ninst✝¹ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\ninst✝ : CompleteSpace E\nf : (i : ι) → G i\nhf :\n  ∀ (ε : ℝ),\n    ε > 0 → ∃ N, ∀ (m : Finset ι), N ≤ m → ∀ (n : Finset ι), N ≤ n → |∑ i in m, ‖f i‖ ^ 2 - ∑ i in n, ‖f i‖ ^ 2| < ε\nε : ℝ\nhε : ε > 0\nhε' : 0 < ε ^ 2 / 2\na : Finset ι\nH : ∀ (m : Finset ι), a ≤ m → ∀ (n : Finset ι), a ≤ n → |∑ i in m, ‖f i‖ ^ 2 - ∑ i in n, ‖f i‖ ^ 2| < ε ^ 2 / 2\ns₁ : Finset ι\nhs₁ : a ≤ s₁\ns₂ : Finset ι\nhs₂ : a ≤ s₂\nhas : a ≤ s₁ ⊓ s₂\n⊢ ∑ x in s₁ \\ s₂, ‖f x‖ ^ 2 < ε ^ 2 / 2\n[PROOFSTEP]\nconvert H _ hs₁ _ has\n[GOAL]\ncase h.e'_3\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : InnerProductSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\nG : ι → Type u_5\ninst✝² : (i : ι) → NormedAddCommGroup (G i)\ninst✝¹ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\ninst✝ : CompleteSpace E\nf : (i : ι) → G i\nhf :\n  ∀ (ε : ℝ),\n    ε > 0 → ∃ N, ∀ (m : Finset ι), N ≤ m → ∀ (n : Finset ι), N ≤ n → |∑ i in m, ‖f i‖ ^ 2 - ∑ i in n, ‖f i‖ ^ 2| < ε\nε : ℝ\nhε : ε > 0\nhε' : 0 < ε ^ 2 / 2\na : Finset ι\nH : ∀ (m : Finset ι), a ≤ m → ∀ (n : Finset ι), a ≤ n → |∑ i in m, ‖f i‖ ^ 2 - ∑ i in n, ‖f i‖ ^ 2| < ε ^ 2 / 2\ns₁ : Finset ι\nhs₁ : a ≤ s₁\ns₂ : Finset ι\nhs₂ : a ≤ s₂\nhas : a ≤ s₁ ⊓ s₂\n⊢ ∑ x in s₁ \\ s₂, ‖f x‖ ^ 2 = |∑ i in s₁, ‖f i‖ ^ 2 - ∑ i in s₁ ⊓ s₂, ‖f i‖ ^ 2|\n[PROOFSTEP]\nhave : s₁ ⊓ s₂ ⊆ s₁ := Finset.inter_subset_left _ _\n[GOAL]\ncase h.e'_3\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : InnerProductSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\nG : ι → Type u_5\ninst✝² : (i : ι) → NormedAddCommGroup (G i)\ninst✝¹ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\ninst✝ : CompleteSpace E\nf : (i : ι) → G i\nhf :\n  ∀ (ε : ℝ),\n    ε > 0 → ∃ N, ∀ (m : Finset ι), N ≤ m → ∀ (n : Finset ι), N ≤ n → |∑ i in m, ‖f i‖ ^ 2 - ∑ i in n, ‖f i‖ ^ 2| < ε\nε : ℝ\nhε : ε > 0\nhε' : 0 < ε ^ 2 / 2\na : Finset ι\nH : ∀ (m : Finset ι), a ≤ m → ∀ (n : Finset ι), a ≤ n → |∑ i in m, ‖f i‖ ^ 2 - ∑ i in n, ‖f i‖ ^ 2| < ε ^ 2 / 2\ns₁ : Finset ι\nhs₁ : a ≤ s₁\ns₂ : Finset ι\nhs₂ : a ≤ s₂\nhas : a ≤ s₁ ⊓ s₂\nthis : s₁ ⊓ s₂ ⊆ s₁\n⊢ ∑ x in s₁ \\ s₂, ‖f x‖ ^ 2 = |∑ i in s₁, ‖f i‖ ^ 2 - ∑ i in s₁ ⊓ s₂, ‖f i‖ ^ 2|\n[PROOFSTEP]\nrw [← Finset.sum_sdiff this, add_tsub_cancel_right, Finset.abs_sum_of_nonneg']\n[GOAL]\ncase h.e'_3\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : InnerProductSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\nG : ι → Type u_5\ninst✝² : (i : ι) → NormedAddCommGroup (G i)\ninst✝¹ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\ninst✝ : CompleteSpace E\nf : (i : ι) → G i\nhf :\n  ∀ (ε : ℝ),\n    ε > 0 → ∃ N, ∀ (m : Finset ι), N ≤ m → ∀ (n : Finset ι), N ≤ n → |∑ i in m, ‖f i‖ ^ 2 - ∑ i in n, ‖f i‖ ^ 2| < ε\nε : ℝ\nhε : ε > 0\nhε' : 0 < ε ^ 2 / 2\na : Finset ι\nH : ∀ (m : Finset ι), a ≤ m → ∀ (n : Finset ι), a ≤ n → |∑ i in m, ‖f i‖ ^ 2 - ∑ i in n, ‖f i‖ ^ 2| < ε ^ 2 / 2\ns₁ : Finset ι\nhs₁ : a ≤ s₁\ns₂ : Finset ι\nhs₂ : a ≤ s₂\nhas : a ≤ s₁ ⊓ s₂\nthis : s₁ ⊓ s₂ ⊆ s₁\n⊢ ∑ x in s₁ \\ s₂, ‖f x‖ ^ 2 = ∑ i in s₁ \\ (s₁ ⊓ s₂), ‖f i‖ ^ 2\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.e'_3\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : InnerProductSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\nG : ι → Type u_5\ninst✝² : (i : ι) → NormedAddCommGroup (G i)\ninst✝¹ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\ninst✝ : CompleteSpace E\nf : (i : ι) → G i\nhf :\n  ∀ (ε : ℝ),\n    ε > 0 → ∃ N, ∀ (m : Finset ι), N ≤ m → ∀ (n : Finset ι), N ≤ n → |∑ i in m, ‖f i‖ ^ 2 - ∑ i in n, ‖f i‖ ^ 2| < ε\nε : ℝ\nhε : ε > 0\nhε' : 0 < ε ^ 2 / 2\na : Finset ι\nH : ∀ (m : Finset ι), a ≤ m → ∀ (n : Finset ι), a ≤ n → |∑ i in m, ‖f i‖ ^ 2 - ∑ i in n, ‖f i‖ ^ 2| < ε ^ 2 / 2\ns₁ : Finset ι\nhs₁ : a ≤ s₁\ns₂ : Finset ι\nhs₂ : a ≤ s₂\nhas : a ≤ s₁ ⊓ s₂\nthis : s₁ ⊓ s₂ ⊆ s₁\n⊢ ∀ (i : ι), 0 ≤ ‖f i‖ ^ 2\n[PROOFSTEP]\nexact fun i => sq_nonneg _\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : InnerProductSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\nG : ι → Type u_5\ninst✝² : (i : ι) → NormedAddCommGroup (G i)\ninst✝¹ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\ninst✝ : CompleteSpace E\nf : (i : ι) → G i\nhf :\n  ∀ (ε : ℝ),\n    ε > 0 → ∃ N, ∀ (m : Finset ι), N ≤ m → ∀ (n : Finset ι), N ≤ n → |∑ i in m, ‖f i‖ ^ 2 - ∑ i in n, ‖f i‖ ^ 2| < ε\nε : ℝ\nhε : ε > 0\nhε' : 0 < ε ^ 2 / 2\na : Finset ι\nH : ∀ (m : Finset ι), a ≤ m → ∀ (n : Finset ι), a ≤ n → |∑ i in m, ‖f i‖ ^ 2 - ∑ i in n, ‖f i‖ ^ 2| < ε ^ 2 / 2\ns₁ : Finset ι\nhs₁ : a ≤ s₁\ns₂ : Finset ι\nhs₂ : a ≤ s₂\nhas : a ≤ s₁ ⊓ s₂\nHs₁ : ∑ x in s₁ \\ s₂, ‖f x‖ ^ 2 < ε ^ 2 / 2\n⊢ ∑ i in s₁ \\ s₂, ‖f i‖ ^ 2 + ∑ i in s₂ \\ s₁, ‖f i‖ ^ 2 < ε ^ 2\n[PROOFSTEP]\nhave Hs₂ : ∑ x : ι in s₂ \\ s₁, ‖f x‖ ^ 2 < ε ^ 2 / 2 :=\n  by\n  convert H _ hs₂ _ has\n  have : s₁ ⊓ s₂ ⊆ s₂ := Finset.inter_subset_right _ _\n  rw [← Finset.sum_sdiff this, add_tsub_cancel_right, Finset.abs_sum_of_nonneg']\n  · simp\n  · exact fun i => sq_nonneg _\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : InnerProductSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\nG : ι → Type u_5\ninst✝² : (i : ι) → NormedAddCommGroup (G i)\ninst✝¹ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\ninst✝ : CompleteSpace E\nf : (i : ι) → G i\nhf :\n  ∀ (ε : ℝ),\n    ε > 0 → ∃ N, ∀ (m : Finset ι), N ≤ m → ∀ (n : Finset ι), N ≤ n → |∑ i in m, ‖f i‖ ^ 2 - ∑ i in n, ‖f i‖ ^ 2| < ε\nε : ℝ\nhε : ε > 0\nhε' : 0 < ε ^ 2 / 2\na : Finset ι\nH : ∀ (m : Finset ι), a ≤ m → ∀ (n : Finset ι), a ≤ n → |∑ i in m, ‖f i‖ ^ 2 - ∑ i in n, ‖f i‖ ^ 2| < ε ^ 2 / 2\ns₁ : Finset ι\nhs₁ : a ≤ s₁\ns₂ : Finset ι\nhs₂ : a ≤ s₂\nhas : a ≤ s₁ ⊓ s₂\nHs₁ : ∑ x in s₁ \\ s₂, ‖f x‖ ^ 2 < ε ^ 2 / 2\n⊢ ∑ x in s₂ \\ s₁, ‖f x‖ ^ 2 < ε ^ 2 / 2\n[PROOFSTEP]\nconvert H _ hs₂ _ has\n[GOAL]\ncase h.e'_3\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : InnerProductSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\nG : ι → Type u_5\ninst✝² : (i : ι) → NormedAddCommGroup (G i)\ninst✝¹ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\ninst✝ : CompleteSpace E\nf : (i : ι) → G i\nhf :\n  ∀ (ε : ℝ),\n    ε > 0 → ∃ N, ∀ (m : Finset ι), N ≤ m → ∀ (n : Finset ι), N ≤ n → |∑ i in m, ‖f i‖ ^ 2 - ∑ i in n, ‖f i‖ ^ 2| < ε\nε : ℝ\nhε : ε > 0\nhε' : 0 < ε ^ 2 / 2\na : Finset ι\nH : ∀ (m : Finset ι), a ≤ m → ∀ (n : Finset ι), a ≤ n → |∑ i in m, ‖f i‖ ^ 2 - ∑ i in n, ‖f i‖ ^ 2| < ε ^ 2 / 2\ns₁ : Finset ι\nhs₁ : a ≤ s₁\ns₂ : Finset ι\nhs₂ : a ≤ s₂\nhas : a ≤ s₁ ⊓ s₂\nHs₁ : ∑ x in s₁ \\ s₂, ‖f x‖ ^ 2 < ε ^ 2 / 2\n⊢ ∑ x in s₂ \\ s₁, ‖f x‖ ^ 2 = |∑ i in s₂, ‖f i‖ ^ 2 - ∑ i in s₁ ⊓ s₂, ‖f i‖ ^ 2|\n[PROOFSTEP]\nhave : s₁ ⊓ s₂ ⊆ s₂ := Finset.inter_subset_right _ _\n[GOAL]\ncase h.e'_3\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : InnerProductSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\nG : ι → Type u_5\ninst✝² : (i : ι) → NormedAddCommGroup (G i)\ninst✝¹ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\ninst✝ : CompleteSpace E\nf : (i : ι) → G i\nhf :\n  ∀ (ε : ℝ),\n    ε > 0 → ∃ N, ∀ (m : Finset ι), N ≤ m → ∀ (n : Finset ι), N ≤ n → |∑ i in m, ‖f i‖ ^ 2 - ∑ i in n, ‖f i‖ ^ 2| < ε\nε : ℝ\nhε : ε > 0\nhε' : 0 < ε ^ 2 / 2\na : Finset ι\nH : ∀ (m : Finset ι), a ≤ m → ∀ (n : Finset ι), a ≤ n → |∑ i in m, ‖f i‖ ^ 2 - ∑ i in n, ‖f i‖ ^ 2| < ε ^ 2 / 2\ns₁ : Finset ι\nhs₁ : a ≤ s₁\ns₂ : Finset ι\nhs₂ : a ≤ s₂\nhas : a ≤ s₁ ⊓ s₂\nHs₁ : ∑ x in s₁ \\ s₂, ‖f x‖ ^ 2 < ε ^ 2 / 2\nthis : s₁ ⊓ s₂ ⊆ s₂\n⊢ ∑ x in s₂ \\ s₁, ‖f x‖ ^ 2 = |∑ i in s₂, ‖f i‖ ^ 2 - ∑ i in s₁ ⊓ s₂, ‖f i‖ ^ 2|\n[PROOFSTEP]\nrw [← Finset.sum_sdiff this, add_tsub_cancel_right, Finset.abs_sum_of_nonneg']\n[GOAL]\ncase h.e'_3\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : InnerProductSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\nG : ι → Type u_5\ninst✝² : (i : ι) → NormedAddCommGroup (G i)\ninst✝¹ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\ninst✝ : CompleteSpace E\nf : (i : ι) → G i\nhf :\n  ∀ (ε : ℝ),\n    ε > 0 → ∃ N, ∀ (m : Finset ι), N ≤ m → ∀ (n : Finset ι), N ≤ n → |∑ i in m, ‖f i‖ ^ 2 - ∑ i in n, ‖f i‖ ^ 2| < ε\nε : ℝ\nhε : ε > 0\nhε' : 0 < ε ^ 2 / 2\na : Finset ι\nH : ∀ (m : Finset ι), a ≤ m → ∀ (n : Finset ι), a ≤ n → |∑ i in m, ‖f i‖ ^ 2 - ∑ i in n, ‖f i‖ ^ 2| < ε ^ 2 / 2\ns₁ : Finset ι\nhs₁ : a ≤ s₁\ns₂ : Finset ι\nhs₂ : a ≤ s₂\nhas : a ≤ s₁ ⊓ s₂\nHs₁ : ∑ x in s₁ \\ s₂, ‖f x‖ ^ 2 < ε ^ 2 / 2\nthis : s₁ ⊓ s₂ ⊆ s₂\n⊢ ∑ x in s₂ \\ s₁, ‖f x‖ ^ 2 = ∑ i in s₂ \\ (s₁ ⊓ s₂), ‖f i‖ ^ 2\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.e'_3\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : InnerProductSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\nG : ι → Type u_5\ninst✝² : (i : ι) → NormedAddCommGroup (G i)\ninst✝¹ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\ninst✝ : CompleteSpace E\nf : (i : ι) → G i\nhf :\n  ∀ (ε : ℝ),\n    ε > 0 → ∃ N, ∀ (m : Finset ι), N ≤ m → ∀ (n : Finset ι), N ≤ n → |∑ i in m, ‖f i‖ ^ 2 - ∑ i in n, ‖f i‖ ^ 2| < ε\nε : ℝ\nhε : ε > 0\nhε' : 0 < ε ^ 2 / 2\na : Finset ι\nH : ∀ (m : Finset ι), a ≤ m → ∀ (n : Finset ι), a ≤ n → |∑ i in m, ‖f i‖ ^ 2 - ∑ i in n, ‖f i‖ ^ 2| < ε ^ 2 / 2\ns₁ : Finset ι\nhs₁ : a ≤ s₁\ns₂ : Finset ι\nhs₂ : a ≤ s₂\nhas : a ≤ s₁ ⊓ s₂\nHs₁ : ∑ x in s₁ \\ s₂, ‖f x‖ ^ 2 < ε ^ 2 / 2\nthis : s₁ ⊓ s₂ ⊆ s₂\n⊢ ∀ (i : ι), 0 ≤ ‖f i‖ ^ 2\n[PROOFSTEP]\nexact fun i => sq_nonneg _\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁷ : IsROrC 𝕜\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : InnerProductSpace 𝕜 E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\nG : ι → Type u_5\ninst✝² : (i : ι) → NormedAddCommGroup (G i)\ninst✝¹ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV : (i : ι) → G i →ₗᵢ[𝕜] E\nhV : OrthogonalFamily 𝕜 G V\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\ninst✝ : CompleteSpace E\nf : (i : ι) → G i\nhf :\n  ∀ (ε : ℝ),\n    ε > 0 → ∃ N, ∀ (m : Finset ι), N ≤ m → ∀ (n : Finset ι), N ≤ n → |∑ i in m, ‖f i‖ ^ 2 - ∑ i in n, ‖f i‖ ^ 2| < ε\nε : ℝ\nhε : ε > 0\nhε' : 0 < ε ^ 2 / 2\na : Finset ι\nH : ∀ (m : Finset ι), a ≤ m → ∀ (n : Finset ι), a ≤ n → |∑ i in m, ‖f i‖ ^ 2 - ∑ i in n, ‖f i‖ ^ 2| < ε ^ 2 / 2\ns₁ : Finset ι\nhs₁ : a ≤ s₁\ns₂ : Finset ι\nhs₂ : a ≤ s₂\nhas : a ≤ s₁ ⊓ s₂\nHs₁ : ∑ x in s₁ \\ s₂, ‖f x‖ ^ 2 < ε ^ 2 / 2\nHs₂ : ∑ x in s₂ \\ s₁, ‖f x‖ ^ 2 < ε ^ 2 / 2\n⊢ ∑ i in s₁ \\ s₂, ‖f i‖ ^ 2 + ∑ i in s₂ \\ s₁, ‖f i‖ ^ 2 < ε ^ 2\n[PROOFSTEP]\nlinarith\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nG : ι → Type u_5\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV✝ : (i : ι) → G i →ₗᵢ[𝕜] E\nhV✝ : OrthogonalFamily 𝕜 G V✝\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\nV : ι → Submodule 𝕜 E\nhV : OrthogonalFamily 𝕜 (fun i => { x // x ∈ V i }) fun i => Submodule.subtypeₗᵢ (V i)\n⊢ CompleteLattice.Independent V\n[PROOFSTEP]\nclassical!\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nG : ι → Type u_5\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV✝ : (i : ι) → G i →ₗᵢ[𝕜] E\nhV✝ : OrthogonalFamily 𝕜 G V✝\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\nV : ι → Submodule 𝕜 E\nhV : OrthogonalFamily 𝕜 (fun i => { x // x ∈ V i }) fun i => Submodule.subtypeₗᵢ (V i)\nem✝ : (a : Prop) → Decidable a\n⊢ CompleteLattice.Independent V\n[PROOFSTEP]\napply CompleteLattice.independent_of_dfinsupp_lsum_injective\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nG : ι → Type u_5\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV✝ : (i : ι) → G i →ₗᵢ[𝕜] E\nhV✝ : OrthogonalFamily 𝕜 G V✝\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\nV : ι → Submodule 𝕜 E\nhV : OrthogonalFamily 𝕜 (fun i => { x // x ∈ V i }) fun i => Submodule.subtypeₗᵢ (V i)\nem✝ : (a : Prop) → Decidable a\n⊢ Function.Injective ↑(↑(DFinsupp.lsum ℕ) fun i => Submodule.subtype (V i))\n[PROOFSTEP]\nrefine LinearMap.ker_eq_bot.mp ?_\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nG : ι → Type u_5\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV✝ : (i : ι) → G i →ₗᵢ[𝕜] E\nhV✝ : OrthogonalFamily 𝕜 G V✝\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\nV : ι → Submodule 𝕜 E\nhV : OrthogonalFamily 𝕜 (fun i => { x // x ∈ V i }) fun i => Submodule.subtypeₗᵢ (V i)\nem✝ : (a : Prop) → Decidable a\n⊢ LinearMap.ker (↑(DFinsupp.lsum ℕ) fun i => Submodule.subtype (V i)) = ⊥\n[PROOFSTEP]\nrw [Submodule.eq_bot_iff]\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nG : ι → Type u_5\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV✝ : (i : ι) → G i →ₗᵢ[𝕜] E\nhV✝ : OrthogonalFamily 𝕜 G V✝\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\nV : ι → Submodule 𝕜 E\nhV : OrthogonalFamily 𝕜 (fun i => { x // x ∈ V i }) fun i => Submodule.subtypeₗᵢ (V i)\nem✝ : (a : Prop) → Decidable a\n⊢ ∀ (x : Π₀ (i : ι), { x // x ∈ V i }), x ∈ LinearMap.ker (↑(DFinsupp.lsum ℕ) fun i => Submodule.subtype (V i)) → x = 0\n[PROOFSTEP]\nintro v hv\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nG : ι → Type u_5\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV✝ : (i : ι) → G i →ₗᵢ[𝕜] E\nhV✝ : OrthogonalFamily 𝕜 G V✝\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\nV : ι → Submodule 𝕜 E\nhV : OrthogonalFamily 𝕜 (fun i => { x // x ∈ V i }) fun i => Submodule.subtypeₗᵢ (V i)\nem✝ : (a : Prop) → Decidable a\nv : Π₀ (i : ι), { x // x ∈ V i }\nhv : v ∈ LinearMap.ker (↑(DFinsupp.lsum ℕ) fun i => Submodule.subtype (V i))\n⊢ v = 0\n[PROOFSTEP]\nrw [LinearMap.mem_ker] at hv \n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nG : ι → Type u_5\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV✝ : (i : ι) → G i →ₗᵢ[𝕜] E\nhV✝ : OrthogonalFamily 𝕜 G V✝\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\nV : ι → Submodule 𝕜 E\nhV : OrthogonalFamily 𝕜 (fun i => { x // x ∈ V i }) fun i => Submodule.subtypeₗᵢ (V i)\nem✝ : (a : Prop) → Decidable a\nv : Π₀ (i : ι), { x // x ∈ V i }\nhv : ↑(↑(DFinsupp.lsum ℕ) fun i => Submodule.subtype (V i)) v = 0\n⊢ v = 0\n[PROOFSTEP]\next i\n[GOAL]\ncase h.h.a\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nG : ι → Type u_5\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV✝ : (i : ι) → G i →ₗᵢ[𝕜] E\nhV✝ : OrthogonalFamily 𝕜 G V✝\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\nV : ι → Submodule 𝕜 E\nhV : OrthogonalFamily 𝕜 (fun i => { x // x ∈ V i }) fun i => Submodule.subtypeₗᵢ (V i)\nem✝ : (a : Prop) → Decidable a\nv : Π₀ (i : ι), { x // x ∈ V i }\nhv : ↑(↑(DFinsupp.lsum ℕ) fun i => Submodule.subtype (V i)) v = 0\ni : ι\n⊢ ↑(↑v i) = ↑(↑0 i)\n[PROOFSTEP]\nsuffices ⟪(v i : E), v i⟫ = 0 by simpa only [inner_self_eq_zero] using this\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nG : ι → Type u_5\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV✝ : (i : ι) → G i →ₗᵢ[𝕜] E\nhV✝ : OrthogonalFamily 𝕜 G V✝\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\nV : ι → Submodule 𝕜 E\nhV : OrthogonalFamily 𝕜 (fun i => { x // x ∈ V i }) fun i => Submodule.subtypeₗᵢ (V i)\nem✝ : (a : Prop) → Decidable a\nv : Π₀ (i : ι), { x // x ∈ V i }\nhv : ↑(↑(DFinsupp.lsum ℕ) fun i => Submodule.subtype (V i)) v = 0\ni : ι\nthis : inner ↑(↑v i) ↑(↑v i) = 0\n⊢ ↑(↑v i) = ↑(↑0 i)\n[PROOFSTEP]\nsimpa only [inner_self_eq_zero] using this\n[GOAL]\ncase h.h.a\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nG : ι → Type u_5\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV✝ : (i : ι) → G i →ₗᵢ[𝕜] E\nhV✝ : OrthogonalFamily 𝕜 G V✝\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\nV : ι → Submodule 𝕜 E\nhV : OrthogonalFamily 𝕜 (fun i => { x // x ∈ V i }) fun i => Submodule.subtypeₗᵢ (V i)\nem✝ : (a : Prop) → Decidable a\nv : Π₀ (i : ι), { x // x ∈ V i }\nhv : ↑(↑(DFinsupp.lsum ℕ) fun i => Submodule.subtype (V i)) v = 0\ni : ι\n⊢ inner ↑(↑v i) ↑(↑v i) = 0\n[PROOFSTEP]\ncalc\n  ⟪(v i : E), v i⟫ = ⟪(v i : E), DFinsupp.lsum ℕ (fun i => (V i).subtype) v⟫ := by\n    simpa only [DFinsupp.sumAddHom_apply, DFinsupp.lsum_apply_apply] using (hV.inner_right_dfinsupp v i (v i)).symm\n  _ = 0 := by simp only [hv, inner_zero_right]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nG : ι → Type u_5\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV✝ : (i : ι) → G i →ₗᵢ[𝕜] E\nhV✝ : OrthogonalFamily 𝕜 G V✝\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\nV : ι → Submodule 𝕜 E\nhV : OrthogonalFamily 𝕜 (fun i => { x // x ∈ V i }) fun i => Submodule.subtypeₗᵢ (V i)\nem✝ : (a : Prop) → Decidable a\nv : Π₀ (i : ι), { x // x ∈ V i }\nhv : ↑(↑(DFinsupp.lsum ℕ) fun i => Submodule.subtype (V i)) v = 0\ni : ι\n⊢ inner ↑(↑v i) ↑(↑v i) = inner (↑(↑v i)) (↑(↑(DFinsupp.lsum ℕ) fun i => Submodule.subtype (V i)) v)\n[PROOFSTEP]\nsimpa only [DFinsupp.sumAddHom_apply, DFinsupp.lsum_apply_apply] using (hV.inner_right_dfinsupp v i (v i)).symm\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nG : ι → Type u_5\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV✝ : (i : ι) → G i →ₗᵢ[𝕜] E\nhV✝ : OrthogonalFamily 𝕜 G V✝\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\nV : ι → Submodule 𝕜 E\nhV : OrthogonalFamily 𝕜 (fun i => { x // x ∈ V i }) fun i => Submodule.subtypeₗᵢ (V i)\nem✝ : (a : Prop) → Decidable a\nv : Π₀ (i : ι), { x // x ∈ V i }\nhv : ↑(↑(DFinsupp.lsum ℕ) fun i => Submodule.subtype (V i)) v = 0\ni : ι\n⊢ inner (↑(↑v i)) (↑(↑(DFinsupp.lsum ℕ) fun i => Submodule.subtype (V i)) v) = 0\n[PROOFSTEP]\nsimp only [hv, inner_zero_right]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nι : Type u_4\ndec_ι : DecidableEq ι\nG : ι → Type u_5\ninst✝¹ : (i : ι) → NormedAddCommGroup (G i)\ninst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)\nV✝ : (i : ι) → G i →ₗᵢ[𝕜] E\nhV✝ : OrthogonalFamily 𝕜 G V✝\ndec_V : (i : ι) → (x : G i) → Decidable (x ≠ 0)\nV : ι → Submodule 𝕜 E\nhV : OrthogonalFamily 𝕜 (fun i => { x // x ∈ V i }) fun i => Submodule.subtypeₗᵢ (V i)\nhV_sum : IsInternal fun i => V i\nα : ι → Type u_6\nv_family : (i : ι) → Basis (α i) 𝕜 { x // x ∈ V i }\nhv_family : ∀ (i : ι), Orthonormal 𝕜 ↑(v_family i)\n⊢ Orthonormal 𝕜 ↑(collectedBasis hV_sum v_family)\n[PROOFSTEP]\nsimpa only [hV_sum.collectedBasis_coe] using hV.orthonormal_sigma_orthonormal hv_family\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nG : Type u_4\nsrc✝¹ : Inner ℝ E := Inner.isROrCToReal 𝕜 E\nsrc✝ : NormedSpace ℝ E := NormedSpace.restrictScalars ℝ 𝕜 E\nx y z : E\n⊢ inner (x + y) z = inner x z + inner y z\n[PROOFSTEP]\nchange re ⟪x + y, z⟫ = re ⟪x, z⟫ + re ⟪y, z⟫\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nG : Type u_4\nsrc✝¹ : Inner ℝ E := Inner.isROrCToReal 𝕜 E\nsrc✝ : NormedSpace ℝ E := NormedSpace.restrictScalars ℝ 𝕜 E\nx y z : E\n⊢ ↑re (inner (x + y) z) = ↑re (inner x z) + ↑re (inner y z)\n[PROOFSTEP]\nsimp only [inner_add_left, map_add]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nG : Type u_4\nsrc✝¹ : Inner ℝ E := Inner.isROrCToReal 𝕜 E\nsrc✝ : NormedSpace ℝ E := NormedSpace.restrictScalars ℝ 𝕜 E\nx y : E\nr : ℝ\n⊢ inner (r • x) y = ↑(starRingEnd ℝ) r * inner x y\n[PROOFSTEP]\nchange re ⟪(r : 𝕜) • x, y⟫ = r * re ⟪x, y⟫\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nG : Type u_4\nsrc✝¹ : Inner ℝ E := Inner.isROrCToReal 𝕜 E\nsrc✝ : NormedSpace ℝ E := NormedSpace.restrictScalars ℝ 𝕜 E\nx y : E\nr : ℝ\n⊢ ↑re (inner (↑r • x) y) = r * ↑re (inner x y)\n[PROOFSTEP]\nsimp only [inner_smul_left, conj_ofReal, ofReal_mul_re]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nG : Type u_4\nx : E\n⊢ inner x (I • x) = 0\n[PROOFSTEP]\nsimp [real_inner_eq_re_inner 𝕜, inner_smul_right]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : InnerProductSpace 𝕜 E\ninst✝³ : NormedAddCommGroup F\ninst✝² : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : InnerProductSpace ℝ G\nf : G ≃ₗᵢ[ℝ] ℂ\nx y : G\n⊢ inner x y = (↑(starRingEnd ℂ) (↑f x) * ↑f y).re\n[PROOFSTEP]\nrw [← Complex.inner, f.inner_map_map]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nT : E →L[𝕜] E\nx : E\nc : 𝕜\n⊢ reApplyInnerSelf T (c • x) = ‖c‖ ^ 2 * reApplyInnerSelf T x\n[PROOFSTEP]\nsimp only [ContinuousLinearMap.map_smul, ContinuousLinearMap.reApplyInnerSelf_apply, inner_smul_left, inner_smul_right,\n  ← mul_assoc, mul_conj, normSq_eq_def', ← smul_re, Algebra.smul_def (‖c‖ ^ 2) ⟪T x, x⟫, algebraMap_eq_ofReal]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\n⊢ Continuous (uncurry inner)\n[PROOFSTEP]\nlet inner' : E →+ E →+ 𝕜 :=\n  { toFun := fun x => (innerₛₗ 𝕜 x).toAddMonoidHom\n    map_zero' := by ext x; exact inner_zero_left _\n    map_add' := fun x y => by ext z; exact inner_add_left _ _ _ }\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\n⊢ (fun x => LinearMap.toAddMonoidHom (↑(innerₛₗ 𝕜) x)) 0 = 0\n[PROOFSTEP]\next x\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx : E\n⊢ ↑((fun x => LinearMap.toAddMonoidHom (↑(innerₛₗ 𝕜) x)) 0) x = ↑0 x\n[PROOFSTEP]\nexact inner_zero_left _\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : E\n⊢ ZeroHom.toFun\n      { toFun := fun x => LinearMap.toAddMonoidHom (↑(innerₛₗ 𝕜) x),\n        map_zero' := (_ : (fun x => LinearMap.toAddMonoidHom (↑(innerₛₗ 𝕜) x)) 0 = 0) }\n      (x + y) =\n    ZeroHom.toFun\n        { toFun := fun x => LinearMap.toAddMonoidHom (↑(innerₛₗ 𝕜) x),\n          map_zero' := (_ : (fun x => LinearMap.toAddMonoidHom (↑(innerₛₗ 𝕜) x)) 0 = 0) }\n        x +\n      ZeroHom.toFun\n        { toFun := fun x => LinearMap.toAddMonoidHom (↑(innerₛₗ 𝕜) x),\n          map_zero' := (_ : (fun x => LinearMap.toAddMonoidHom (↑(innerₛₗ 𝕜) x)) 0 = 0) }\n        y\n[PROOFSTEP]\next z\n[GOAL]\ncase h\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y z : E\n⊢ ↑(ZeroHom.toFun\n          { toFun := fun x => LinearMap.toAddMonoidHom (↑(innerₛₗ 𝕜) x),\n            map_zero' := (_ : (fun x => LinearMap.toAddMonoidHom (↑(innerₛₗ 𝕜) x)) 0 = 0) }\n          (x + y))\n      z =\n    ↑(ZeroHom.toFun\n            { toFun := fun x => LinearMap.toAddMonoidHom (↑(innerₛₗ 𝕜) x),\n              map_zero' := (_ : (fun x => LinearMap.toAddMonoidHom (↑(innerₛₗ 𝕜) x)) 0 = 0) }\n            x +\n          ZeroHom.toFun\n            { toFun := fun x => LinearMap.toAddMonoidHom (↑(innerₛₗ 𝕜) x),\n              map_zero' := (_ : (fun x => LinearMap.toAddMonoidHom (↑(innerₛₗ 𝕜) x)) 0 = 0) }\n            y)\n      z\n[PROOFSTEP]\nexact inner_add_left _ _ _\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\ninner' : E →+ E →+ 𝕜 :=\n  {\n    toZeroHom :=\n      { toFun := fun x => LinearMap.toAddMonoidHom (↑(innerₛₗ 𝕜) x),\n        map_zero' := (_ : (fun x => LinearMap.toAddMonoidHom (↑(innerₛₗ 𝕜) x)) 0 = 0) },\n    map_add' :=\n      (_ :\n        ∀ (x y : E),\n          ZeroHom.toFun\n              { toFun := fun x => LinearMap.toAddMonoidHom (↑(innerₛₗ 𝕜) x),\n                map_zero' := (_ : (fun x => LinearMap.toAddMonoidHom (↑(innerₛₗ 𝕜) x)) 0 = 0) }\n              (x + y) =\n            ZeroHom.toFun\n                { toFun := fun x => LinearMap.toAddMonoidHom (↑(innerₛₗ 𝕜) x),\n                  map_zero' := (_ : (fun x => LinearMap.toAddMonoidHom (↑(innerₛₗ 𝕜) x)) 0 = 0) }\n                x +\n              ZeroHom.toFun\n                { toFun := fun x => LinearMap.toAddMonoidHom (↑(innerₛₗ 𝕜) x),\n                  map_zero' := (_ : (fun x => LinearMap.toAddMonoidHom (↑(innerₛₗ 𝕜) x)) 0 = 0) }\n                y) }\n⊢ Continuous (uncurry inner)\n[PROOFSTEP]\nhave : Continuous fun p : E × E => inner' p.1 p.2 := continuous_inner\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\ninner' : E →+ E →+ 𝕜 :=\n  {\n    toZeroHom :=\n      { toFun := fun x => LinearMap.toAddMonoidHom (↑(innerₛₗ 𝕜) x),\n        map_zero' := (_ : (fun x => LinearMap.toAddMonoidHom (↑(innerₛₗ 𝕜) x)) 0 = 0) },\n    map_add' :=\n      (_ :\n        ∀ (x y : E),\n          ZeroHom.toFun\n              { toFun := fun x => LinearMap.toAddMonoidHom (↑(innerₛₗ 𝕜) x),\n                map_zero' := (_ : (fun x => LinearMap.toAddMonoidHom (↑(innerₛₗ 𝕜) x)) 0 = 0) }\n              (x + y) =\n            ZeroHom.toFun\n                { toFun := fun x => LinearMap.toAddMonoidHom (↑(innerₛₗ 𝕜) x),\n                  map_zero' := (_ : (fun x => LinearMap.toAddMonoidHom (↑(innerₛₗ 𝕜) x)) 0 = 0) }\n                x +\n              ZeroHom.toFun\n                { toFun := fun x => LinearMap.toAddMonoidHom (↑(innerₛₗ 𝕜) x),\n                  map_zero' := (_ : (fun x => LinearMap.toAddMonoidHom (↑(innerₛₗ 𝕜) x)) 0 = 0) }\n                y) }\nthis : Continuous fun p => ↑(↑inner' p.fst) p.snd\n⊢ Continuous (uncurry inner)\n[PROOFSTEP]\nrw [Completion.toInner, inner, uncurry_curry _]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\ninner' : E →+ E →+ 𝕜 :=\n  {\n    toZeroHom :=\n      { toFun := fun x => LinearMap.toAddMonoidHom (↑(innerₛₗ 𝕜) x),\n        map_zero' := (_ : (fun x => LinearMap.toAddMonoidHom (↑(innerₛₗ 𝕜) x)) 0 = 0) },\n    map_add' :=\n      (_ :\n        ∀ (x y : E),\n          ZeroHom.toFun\n              { toFun := fun x => LinearMap.toAddMonoidHom (↑(innerₛₗ 𝕜) x),\n                map_zero' := (_ : (fun x => LinearMap.toAddMonoidHom (↑(innerₛₗ 𝕜) x)) 0 = 0) }\n              (x + y) =\n            ZeroHom.toFun\n                { toFun := fun x => LinearMap.toAddMonoidHom (↑(innerₛₗ 𝕜) x),\n                  map_zero' := (_ : (fun x => LinearMap.toAddMonoidHom (↑(innerₛₗ 𝕜) x)) 0 = 0) }\n                x +\n              ZeroHom.toFun\n                { toFun := fun x => LinearMap.toAddMonoidHom (↑(innerₛₗ 𝕜) x),\n                  map_zero' := (_ : (fun x => LinearMap.toAddMonoidHom (↑(innerₛₗ 𝕜) x)) 0 = 0) }\n                y) }\nthis : Continuous fun p => ↑(↑inner' p.fst) p.snd\n⊢ Continuous (DenseInducing.extend (_ : DenseInducing fun p => (↑E p.fst, ↑E p.snd)) (uncurry inner))\n[PROOFSTEP]\nchange Continuous (((denseInducing_toCompl E).prod (denseInducing_toCompl E)).extend fun p : E × E => inner' p.1 p.2)\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\ninner' : E →+ E →+ 𝕜 :=\n  {\n    toZeroHom :=\n      { toFun := fun x => LinearMap.toAddMonoidHom (↑(innerₛₗ 𝕜) x),\n        map_zero' := (_ : (fun x => LinearMap.toAddMonoidHom (↑(innerₛₗ 𝕜) x)) 0 = 0) },\n    map_add' :=\n      (_ :\n        ∀ (x y : E),\n          ZeroHom.toFun\n              { toFun := fun x => LinearMap.toAddMonoidHom (↑(innerₛₗ 𝕜) x),\n                map_zero' := (_ : (fun x => LinearMap.toAddMonoidHom (↑(innerₛₗ 𝕜) x)) 0 = 0) }\n              (x + y) =\n            ZeroHom.toFun\n                { toFun := fun x => LinearMap.toAddMonoidHom (↑(innerₛₗ 𝕜) x),\n                  map_zero' := (_ : (fun x => LinearMap.toAddMonoidHom (↑(innerₛₗ 𝕜) x)) 0 = 0) }\n                x +\n              ZeroHom.toFun\n                { toFun := fun x => LinearMap.toAddMonoidHom (↑(innerₛₗ 𝕜) x),\n                  map_zero' := (_ : (fun x => LinearMap.toAddMonoidHom (↑(innerₛₗ 𝕜) x)) 0 = 0) }\n                y) }\nthis : Continuous fun p => ↑(↑inner' p.fst) p.snd\n⊢ Continuous\n    (DenseInducing.extend (_ : DenseInducing fun p => (↑toCompl p.fst, ↑toCompl p.snd)) fun p => ↑(↑inner' p.fst) p.snd)\n[PROOFSTEP]\nexact (denseInducing_toCompl E).extend_Z_bilin (denseInducing_toCompl E) this\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx : Completion E\na : E\n⊢ ‖↑E a‖ ^ 2 = ↑re (inner (↑E a) (↑E a))\n[PROOFSTEP]\nsimp only [norm_coe, inner_coe, inner_self_eq_norm_sq]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : Completion E\na b : E\n⊢ ↑(starRingEnd 𝕜) (inner (↑E b) (↑E a)) = inner (↑E a) (↑E b)\n[PROOFSTEP]\nsimp only [inner_coe, inner_conj_symm]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y z : Completion E\na b c : E\n⊢ inner (↑E a + ↑E b) (↑E c) = inner (↑E a) (↑E c) + inner (↑E b) (↑E c)\n[PROOFSTEP]\nsimp only [← coe_add, inner_coe, inner_add_left]\n[GOAL]\n𝕜 : Type u_1\nE : Type u_2\nF : Type u_3\ninst✝⁴ : IsROrC 𝕜\ninst✝³ : NormedAddCommGroup E\ninst✝² : InnerProductSpace 𝕜 E\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\ndec_E : DecidableEq E\nx y : Completion E\nc : 𝕜\na b : E\n⊢ inner (c • ↑E a) (↑E b) = ↑(starRingEnd 𝕜) c * inner (↑E a) (↑E b)\n[PROOFSTEP]\nsimp only [← coe_smul c a, inner_coe, inner_smul_left]\n", "meta": {"mathlib_filename": "Mathlib.Analysis.InnerProductSpace.Basic", "llama_tokens": 154274, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7662936430859597, "lm_q2_score": 0.6688802537704063, "lm_q1q2_score": 0.5125586864499858}}
{"text": "[GOAL]\nR : Type u\ninst✝² : Ring R\nX Y : ModuleCat R\nf : X ⟶ Y\nM : Type v\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nhf : LinearMap.ker f = ⊥\n⊢ Function.Injective ↑f\n[PROOFSTEP]\nconvert LinearMap.ker_eq_bot.1 hf\n[GOAL]\nR : Type u\ninst✝² : Ring R\nX Y : ModuleCat R\nf : X ⟶ Y\nM : Type v\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\n⊢ Mono f ↔ Function.Injective ↑f\n[PROOFSTEP]\nrw [mono_iff_ker_eq_bot, LinearMap.ker_eq_bot]\n[GOAL]\nR : Type u\ninst✝² : Ring R\nX Y : ModuleCat R\nf : X ⟶ Y\nM : Type v\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\n⊢ Epi f ↔ Function.Surjective ↑f\n[PROOFSTEP]\nrw [epi_iff_range_eq_top, LinearMap.range_eq_top]\n[GOAL]\nR : Type u\ninst✝² : Ring R\nX Y : ModuleCat R\nf✝ : X ⟶ Y\nM : Type v\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nX✝ Y✝ : ModuleCat R\nf : X✝ ⟶ Y✝\nhf : Epi f\n⊢ Epi ((forget (ModuleCat R)).map f)\n[PROOFSTEP]\nerw [CategoryTheory.epi_iff_surjective, ← epi_iff_surjective]\n[GOAL]\nR : Type u\ninst✝² : Ring R\nX Y : ModuleCat R\nf✝ : X ⟶ Y\nM : Type v\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nX✝ Y✝ : ModuleCat R\nf : X✝ ⟶ Y✝\nhf : Epi f\n⊢ Epi f\n[PROOFSTEP]\nexact hf\n[GOAL]\nR : Type u\ninst✝² : Ring R\nX Y : ModuleCat R\nf✝ : X ⟶ Y\nM : Type v\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nX✝ Y✝ : ModuleCat R\nf : X✝ ⟶ Y✝\nhf : Mono f\n⊢ Mono ((forget (ModuleCat R)).map f)\n[PROOFSTEP]\nerw [CategoryTheory.mono_iff_injective, ← mono_iff_injective]\n[GOAL]\nR : Type u\ninst✝² : Ring R\nX Y : ModuleCat R\nf✝ : X ⟶ Y\nM : Type v\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nX✝ Y✝ : ModuleCat R\nf : X✝ ⟶ Y✝\nhf : Mono f\n⊢ Mono f\n[PROOFSTEP]\nexact hf\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Category.ModuleCat.EpiMono", "llama_tokens": 810, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7431680086124812, "lm_q2_score": 0.689305616785446, "lm_q1q2_score": 0.512269882551838}}
{"text": "[GOAL]\nα : Type u_1\ninst✝ : PseudoEMetricSpace α\nf : ℕ → α\nd : ℕ → ℝ≥0\nhf : ∀ (n : ℕ), edist (f n) (f (Nat.succ n)) ≤ ↑(d n)\nhd : Summable d\n⊢ CauchySeq f\n[PROOFSTEP]\nrefine\n  EMetric.cauchySeq_iff_NNReal.2 fun ε εpos =>\n    ?_\n      -- Actually we need partial sums of `d` to be a Cauchy sequence\n[GOAL]\nα : Type u_1\ninst✝ : PseudoEMetricSpace α\nf : ℕ → α\nd : ℕ → ℝ≥0\nhf : ∀ (n : ℕ), edist (f n) (f (Nat.succ n)) ≤ ↑(d n)\nhd : Summable d\nε : ℝ≥0\nεpos : 0 < ε\n⊢ ∃ N, ∀ (n : ℕ), N ≤ n → edist (f n) (f N) < ↑ε\n[PROOFSTEP]\nreplace hd : CauchySeq fun n : ℕ => ∑ x in range n, d x :=\n  let ⟨_, H⟩ := hd\n  H.tendsto_sum_nat.cauchySeq\n[GOAL]\nα : Type u_1\ninst✝ : PseudoEMetricSpace α\nf : ℕ → α\nd : ℕ → ℝ≥0\nhf : ∀ (n : ℕ), edist (f n) (f (Nat.succ n)) ≤ ↑(d n)\nε : ℝ≥0\nεpos : 0 < ε\nhd : CauchySeq fun n => ∑ x in range n, d x\n⊢ ∃ N, ∀ (n : ℕ), N ≤ n → edist (f n) (f N) < ↑ε\n[PROOFSTEP]\nrefine (Metric.cauchySeq_iff'.1 hd ε (NNReal.coe_pos.2 εpos)).imp fun N hN n hn => ?_\n[GOAL]\nα : Type u_1\ninst✝ : PseudoEMetricSpace α\nf : ℕ → α\nd : ℕ → ℝ≥0\nhf : ∀ (n : ℕ), edist (f n) (f (Nat.succ n)) ≤ ↑(d n)\nε : ℝ≥0\nεpos : 0 < ε\nhd : CauchySeq fun n => ∑ x in range n, d x\nN : ℕ\nhN : ∀ (n : ℕ), n ≥ N → dist (∑ x in range n, d x) (∑ x in range N, d x) < ↑ε\nn : ℕ\nhn : N ≤ n\n⊢ edist (f n) (f N) < ↑ε\n[PROOFSTEP]\nspecialize hN n hn\n[GOAL]\nα : Type u_1\ninst✝ : PseudoEMetricSpace α\nf : ℕ → α\nd : ℕ → ℝ≥0\nhf : ∀ (n : ℕ), edist (f n) (f (Nat.succ n)) ≤ ↑(d n)\nε : ℝ≥0\nεpos : 0 < ε\nhd : CauchySeq fun n => ∑ x in range n, d x\nN n : ℕ\nhn : N ≤ n\nhN : dist (∑ x in range n, d x) (∑ x in range N, d x) < ↑ε\n⊢ edist (f n) (f N) < ↑ε\n[PROOFSTEP]\nrw [dist_nndist, NNReal.nndist_eq, ← sum_range_add_sum_Ico _ hn, add_tsub_cancel_left, NNReal.coe_lt_coe, max_lt_iff] at\n  hN \n[GOAL]\nα : Type u_1\ninst✝ : PseudoEMetricSpace α\nf : ℕ → α\nd : ℕ → ℝ≥0\nhf : ∀ (n : ℕ), edist (f n) (f (Nat.succ n)) ≤ ↑(d n)\nε : ℝ≥0\nεpos : 0 < ε\nhd : CauchySeq fun n => ∑ x in range n, d x\nN n : ℕ\nhn : N ≤ n\nhN : ∑ k in Ico N n, d k < ε ∧ ∑ x in range N, d x - (∑ k in range N, d k + ∑ k in Ico N n, d k) < ε\n⊢ edist (f n) (f N) < ↑ε\n[PROOFSTEP]\nrw [edist_comm]\n  -- Then use `hf` to simplify the goal to the same form\n[GOAL]\nα : Type u_1\ninst✝ : PseudoEMetricSpace α\nf : ℕ → α\nd : ℕ → ℝ≥0\nhf : ∀ (n : ℕ), edist (f n) (f (Nat.succ n)) ≤ ↑(d n)\nε : ℝ≥0\nεpos : 0 < ε\nhd : CauchySeq fun n => ∑ x in range n, d x\nN n : ℕ\nhn : N ≤ n\nhN : ∑ k in Ico N n, d k < ε ∧ ∑ x in range N, d x - (∑ k in range N, d k + ∑ k in Ico N n, d k) < ε\n⊢ edist (f N) (f n) < ↑ε\n[PROOFSTEP]\nrefine lt_of_le_of_lt (edist_le_Ico_sum_of_edist_le hn fun _ _ => hf _) ?_\n[GOAL]\nα : Type u_1\ninst✝ : PseudoEMetricSpace α\nf : ℕ → α\nd : ℕ → ℝ≥0\nhf : ∀ (n : ℕ), edist (f n) (f (Nat.succ n)) ≤ ↑(d n)\nε : ℝ≥0\nεpos : 0 < ε\nhd : CauchySeq fun n => ∑ x in range n, d x\nN n : ℕ\nhn : N ≤ n\nhN : ∑ k in Ico N n, d k < ε ∧ ∑ x in range N, d x - (∑ k in range N, d k + ∑ k in Ico N n, d k) < ε\n⊢ ∑ i in Ico N n, ↑(d i) < ↑ε\n[PROOFSTEP]\nexact_mod_cast hN.1\n[GOAL]\nα : Type u_1\ninst✝ : PseudoMetricSpace α\nf : ℕ → α\na : α\nd : ℕ → ℝ\nhf : ∀ (n : ℕ), dist (f n) (f (Nat.succ n)) ≤ d n\nhd : Summable d\n⊢ CauchySeq f\n[PROOFSTEP]\nrefine' Metric.cauchySeq_iff'.2 fun ε εpos => _\n[GOAL]\nα : Type u_1\ninst✝ : PseudoMetricSpace α\nf : ℕ → α\na : α\nd : ℕ → ℝ\nhf : ∀ (n : ℕ), dist (f n) (f (Nat.succ n)) ≤ d n\nhd : Summable d\nε : ℝ\nεpos : ε > 0\n⊢ ∃ N, ∀ (n : ℕ), n ≥ N → dist (f n) (f N) < ε\n[PROOFSTEP]\nreplace hd : CauchySeq fun n : ℕ => ∑ x in range n, d x :=\n  let ⟨_, H⟩ := hd\n  H.tendsto_sum_nat.cauchySeq\n[GOAL]\nα : Type u_1\ninst✝ : PseudoMetricSpace α\nf : ℕ → α\na : α\nd : ℕ → ℝ\nhf : ∀ (n : ℕ), dist (f n) (f (Nat.succ n)) ≤ d n\nε : ℝ\nεpos : ε > 0\nhd : CauchySeq fun n => ∑ x in range n, d x\n⊢ ∃ N, ∀ (n : ℕ), n ≥ N → dist (f n) (f N) < ε\n[PROOFSTEP]\nrefine' (Metric.cauchySeq_iff'.1 hd ε εpos).imp fun N hN n hn => _\n[GOAL]\nα : Type u_1\ninst✝ : PseudoMetricSpace α\nf : ℕ → α\na : α\nd : ℕ → ℝ\nhf : ∀ (n : ℕ), dist (f n) (f (Nat.succ n)) ≤ d n\nε : ℝ\nεpos : ε > 0\nhd : CauchySeq fun n => ∑ x in range n, d x\nN : ℕ\nhN : ∀ (n : ℕ), n ≥ N → dist (∑ x in range n, d x) (∑ x in range N, d x) < ε\nn : ℕ\nhn : n ≥ N\n⊢ dist (f n) (f N) < ε\n[PROOFSTEP]\nhave hsum := hN n hn\n[GOAL]\nα : Type u_1\ninst✝ : PseudoMetricSpace α\nf : ℕ → α\na : α\nd : ℕ → ℝ\nhf : ∀ (n : ℕ), dist (f n) (f (Nat.succ n)) ≤ d n\nε : ℝ\nεpos : ε > 0\nhd : CauchySeq fun n => ∑ x in range n, d x\nN : ℕ\nhN : ∀ (n : ℕ), n ≥ N → dist (∑ x in range n, d x) (∑ x in range N, d x) < ε\nn : ℕ\nhn : n ≥ N\nhsum : dist (∑ x in range n, d x) (∑ x in range N, d x) < ε\n⊢ dist (f n) (f N) < ε\n[PROOFSTEP]\nrw [Real.dist_eq, ← sum_Ico_eq_sub _ hn] at hsum \n[GOAL]\nα : Type u_1\ninst✝ : PseudoMetricSpace α\nf : ℕ → α\na : α\nd : ℕ → ℝ\nhf : ∀ (n : ℕ), dist (f n) (f (Nat.succ n)) ≤ d n\nε : ℝ\nεpos : ε > 0\nhd : CauchySeq fun n => ∑ x in range n, d x\nN : ℕ\nhN : ∀ (n : ℕ), n ≥ N → dist (∑ x in range n, d x) (∑ x in range N, d x) < ε\nn : ℕ\nhn : n ≥ N\nhsum : |∑ k in Ico N n, d k| < ε\n⊢ dist (f n) (f N) < ε\n[PROOFSTEP]\ncalc\n  dist (f n) (f N) = dist (f N) (f n) := dist_comm _ _\n  _ ≤ ∑ x in Ico N n, d x := (dist_le_Ico_sum_of_dist_le hn fun _ _ => hf _)\n  _ ≤ |∑ x in Ico N n, d x| := (le_abs_self _)\n  _ < ε := hsum\n[GOAL]\nα : Type u_1\ninst✝ : PseudoMetricSpace α\nf : ℕ → α\na✝ : α\nd : ℕ → ℝ\nhf : ∀ (n : ℕ), dist (f n) (f (Nat.succ n)) ≤ d n\nhd : Summable d\na : α\nha : Tendsto f atTop (𝓝 a)\nn : ℕ\n⊢ dist (f n) a ≤ ∑' (m : ℕ), d (n + m)\n[PROOFSTEP]\nrefine' le_of_tendsto (tendsto_const_nhds.dist ha) (eventually_atTop.2 ⟨n, fun m hnm => _⟩)\n[GOAL]\nα : Type u_1\ninst✝ : PseudoMetricSpace α\nf : ℕ → α\na✝ : α\nd : ℕ → ℝ\nhf : ∀ (n : ℕ), dist (f n) (f (Nat.succ n)) ≤ d n\nhd : Summable d\na : α\nha : Tendsto f atTop (𝓝 a)\nn m : ℕ\nhnm : m ≥ n\n⊢ dist (f n) (f m) ≤ ∑' (m : ℕ), d (n + m)\n[PROOFSTEP]\nrefine' le_trans (dist_le_Ico_sum_of_dist_le hnm fun _ _ => hf _) _\n[GOAL]\nα : Type u_1\ninst✝ : PseudoMetricSpace α\nf : ℕ → α\na✝ : α\nd : ℕ → ℝ\nhf : ∀ (n : ℕ), dist (f n) (f (Nat.succ n)) ≤ d n\nhd : Summable d\na : α\nha : Tendsto f atTop (𝓝 a)\nn m : ℕ\nhnm : m ≥ n\n⊢ ∑ i in Ico n m, d i ≤ ∑' (m : ℕ), d (n + m)\n[PROOFSTEP]\nrw [sum_Ico_eq_sum_range]\n[GOAL]\nα : Type u_1\ninst✝ : PseudoMetricSpace α\nf : ℕ → α\na✝ : α\nd : ℕ → ℝ\nhf : ∀ (n : ℕ), dist (f n) (f (Nat.succ n)) ≤ d n\nhd : Summable d\na : α\nha : Tendsto f atTop (𝓝 a)\nn m : ℕ\nhnm : m ≥ n\n⊢ ∑ k in range (m - n), d (n + k) ≤ ∑' (m : ℕ), d (n + m)\n[PROOFSTEP]\nrefine' sum_le_tsum (range _) (fun _ _ => le_trans dist_nonneg (hf _)) _\n[GOAL]\nα : Type u_1\ninst✝ : PseudoMetricSpace α\nf : ℕ → α\na✝ : α\nd : ℕ → ℝ\nhf : ∀ (n : ℕ), dist (f n) (f (Nat.succ n)) ≤ d n\nhd : Summable d\na : α\nha : Tendsto f atTop (𝓝 a)\nn m : ℕ\nhnm : m ≥ n\n⊢ Summable fun k => d (n + k)\n[PROOFSTEP]\nexact hd.comp_injective (add_right_injective n)\n[GOAL]\nα : Type u_1\ninst✝ : PseudoMetricSpace α\nf : ℕ → α\na : α\nd : ℕ → ℝ\nhf : ∀ (n : ℕ), dist (f n) (f (Nat.succ n)) ≤ d n\nhd : Summable d\nha : Tendsto f atTop (𝓝 a)\n⊢ dist (f 0) a ≤ tsum d\n[PROOFSTEP]\nsimpa only [zero_add] using dist_le_tsum_of_dist_le_of_tendsto d hf hd ha 0\n[GOAL]\nα : Type u_1\ninst✝ : PseudoMetricSpace α\nf : ℕ → α\na : α\nh : Summable fun n => dist (f n) (f (Nat.succ n))\nha : Tendsto f atTop (𝓝 a)\n⊢ dist (f 0) a ≤ ∑' (n : ℕ), dist (f n) (f (Nat.succ n))\n[PROOFSTEP]\nsimpa only [zero_add] using dist_le_tsum_dist_of_tendsto h ha 0\n", "meta": {"mathlib_filename": "Mathlib.Topology.Algebra.InfiniteSum.Real", "llama_tokens": 4078, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7905303186696747, "lm_q2_score": 0.6477982247516797, "lm_q1q2_score": 0.512104137046595}}
{"text": "[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nμ : OuterMeasure X\nhm : IsMetric μ\nI : Finset ι\ns : ι → Set X\nhI : ∀ (i : ι), i ∈ I → ∀ (j : ι), j ∈ I → i ≠ j → IsMetricSeparated (s i) (s j)\n⊢ ↑μ (⋃ (i : ι) (_ : i ∈ I), s i) = ∑ i in I, ↑μ (s i)\n[PROOFSTEP]\nclassical\ninduction' I using Finset.induction_on with i I hiI ihI hI\n· simp\nsimp only [Finset.mem_insert] at hI \nrw [Finset.set_biUnion_insert, hm, ihI, Finset.sum_insert hiI]\nexacts [fun i hi j hj hij => hI i (Or.inr hi) j (Or.inr hj) hij,\n  IsMetricSeparated.finset_iUnion_right fun j hj => hI i (Or.inl rfl) j (Or.inr hj) (ne_of_mem_of_not_mem hj hiI).symm]\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nμ : OuterMeasure X\nhm : IsMetric μ\nI : Finset ι\ns : ι → Set X\nhI : ∀ (i : ι), i ∈ I → ∀ (j : ι), j ∈ I → i ≠ j → IsMetricSeparated (s i) (s j)\n⊢ ↑μ (⋃ (i : ι) (_ : i ∈ I), s i) = ∑ i in I, ↑μ (s i)\n[PROOFSTEP]\ninduction' I using Finset.induction_on with i I hiI ihI hI\n[GOAL]\ncase empty\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nμ : OuterMeasure X\nhm : IsMetric μ\nI : Finset ι\ns : ι → Set X\nhI✝ : ∀ (i : ι), i ∈ I → ∀ (j : ι), j ∈ I → i ≠ j → IsMetricSeparated (s i) (s j)\nhI : ∀ (i : ι), i ∈ ∅ → ∀ (j : ι), j ∈ ∅ → i ≠ j → IsMetricSeparated (s i) (s j)\n⊢ ↑μ (⋃ (i : ι) (_ : i ∈ ∅), s i) = ∑ i in ∅, ↑μ (s i)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase insert\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nμ : OuterMeasure X\nhm : IsMetric μ\nI✝ : Finset ι\ns : ι → Set X\nhI✝ : ∀ (i : ι), i ∈ I✝ → ∀ (j : ι), j ∈ I✝ → i ≠ j → IsMetricSeparated (s i) (s j)\ni : ι\nI : Finset ι\nhiI : ¬i ∈ I\nihI :\n  (∀ (i : ι), i ∈ I → ∀ (j : ι), j ∈ I → i ≠ j → IsMetricSeparated (s i) (s j)) →\n    ↑μ (⋃ (i : ι) (_ : i ∈ I), s i) = ∑ i in I, ↑μ (s i)\nhI : ∀ (i_1 : ι), i_1 ∈ insert i I → ∀ (j : ι), j ∈ insert i I → i_1 ≠ j → IsMetricSeparated (s i_1) (s j)\n⊢ ↑μ (⋃ (i_1 : ι) (_ : i_1 ∈ insert i I), s i_1) = ∑ i in insert i I, ↑μ (s i)\n[PROOFSTEP]\nsimp only [Finset.mem_insert] at hI \n[GOAL]\ncase insert\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nμ : OuterMeasure X\nhm : IsMetric μ\nI✝ : Finset ι\ns : ι → Set X\nhI✝ : ∀ (i : ι), i ∈ I✝ → ∀ (j : ι), j ∈ I✝ → i ≠ j → IsMetricSeparated (s i) (s j)\ni : ι\nI : Finset ι\nhiI : ¬i ∈ I\nihI :\n  (∀ (i : ι), i ∈ I → ∀ (j : ι), j ∈ I → i ≠ j → IsMetricSeparated (s i) (s j)) →\n    ↑μ (⋃ (i : ι) (_ : i ∈ I), s i) = ∑ i in I, ↑μ (s i)\nhI : ∀ (i_1 : ι), i_1 = i ∨ i_1 ∈ I → ∀ (j : ι), j = i ∨ j ∈ I → i_1 ≠ j → IsMetricSeparated (s i_1) (s j)\n⊢ ↑μ (⋃ (i_1 : ι) (_ : i_1 ∈ insert i I), s i_1) = ∑ i in insert i I, ↑μ (s i)\n[PROOFSTEP]\nrw [Finset.set_biUnion_insert, hm, ihI, Finset.sum_insert hiI]\n[GOAL]\ncase insert\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nμ : OuterMeasure X\nhm : IsMetric μ\nI✝ : Finset ι\ns : ι → Set X\nhI✝ : ∀ (i : ι), i ∈ I✝ → ∀ (j : ι), j ∈ I✝ → i ≠ j → IsMetricSeparated (s i) (s j)\ni : ι\nI : Finset ι\nhiI : ¬i ∈ I\nihI :\n  (∀ (i : ι), i ∈ I → ∀ (j : ι), j ∈ I → i ≠ j → IsMetricSeparated (s i) (s j)) →\n    ↑μ (⋃ (i : ι) (_ : i ∈ I), s i) = ∑ i in I, ↑μ (s i)\nhI : ∀ (i_1 : ι), i_1 = i ∨ i_1 ∈ I → ∀ (j : ι), j = i ∨ j ∈ I → i_1 ≠ j → IsMetricSeparated (s i_1) (s j)\n⊢ ∀ (i : ι), i ∈ I → ∀ (j : ι), j ∈ I → i ≠ j → IsMetricSeparated (s i) (s j)\ncase insert.a\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nμ : OuterMeasure X\nhm : IsMetric μ\nI✝ : Finset ι\ns : ι → Set X\nhI✝ : ∀ (i : ι), i ∈ I✝ → ∀ (j : ι), j ∈ I✝ → i ≠ j → IsMetricSeparated (s i) (s j)\ni : ι\nI : Finset ι\nhiI : ¬i ∈ I\nihI :\n  (∀ (i : ι), i ∈ I → ∀ (j : ι), j ∈ I → i ≠ j → IsMetricSeparated (s i) (s j)) →\n    ↑μ (⋃ (i : ι) (_ : i ∈ I), s i) = ∑ i in I, ↑μ (s i)\nhI : ∀ (i_1 : ι), i_1 = i ∨ i_1 ∈ I → ∀ (j : ι), j = i ∨ j ∈ I → i_1 ≠ j → IsMetricSeparated (s i_1) (s j)\n⊢ IsMetricSeparated (s i) (⋃ (x : ι) (_ : x ∈ I), s x)\n[PROOFSTEP]\nexacts [fun i hi j hj hij => hI i (Or.inr hi) j (Or.inr hj) hij,\n  IsMetricSeparated.finset_iUnion_right fun j hj => hI i (Or.inl rfl) j (Or.inr hj) (ne_of_mem_of_not_mem hj hiI).symm]\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nμ : OuterMeasure X\nhm : IsMetric μ\n⊢ borel X ≤ OuterMeasure.caratheodory μ\n[PROOFSTEP]\nrw [borel_eq_generateFrom_isClosed]\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nμ : OuterMeasure X\nhm : IsMetric μ\n⊢ MeasurableSpace.generateFrom {s | IsClosed s} ≤ OuterMeasure.caratheodory μ\n[PROOFSTEP]\nrefine' MeasurableSpace.generateFrom_le fun t ht => μ.isCaratheodory_iff_le.2 fun s => _\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nμ : OuterMeasure X\nhm : IsMetric μ\nt : Set X\nht : t ∈ {s | IsClosed s}\ns : Set X\n⊢ ↑μ (s ∩ t) + ↑μ (s \\ t) ≤ ↑μ s\n[PROOFSTEP]\nset S : ℕ → Set X := fun n => {x ∈ s | (↑n)⁻¹ ≤ infEdist x t}\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nμ : OuterMeasure X\nhm : IsMetric μ\nt : Set X\nht : t ∈ {s | IsClosed s}\ns : Set X\nS : ℕ → Set X := fun n => {x | x ∈ s ∧ (↑n)⁻¹ ≤ infEdist x t}\n⊢ ↑μ (s ∩ t) + ↑μ (s \\ t) ≤ ↑μ s\n[PROOFSTEP]\nhave n0 : ∀ {n : ℕ}, (n⁻¹ : ℝ≥0∞) ≠ 0 := fun {n} => ENNReal.inv_ne_zero.2 (ENNReal.nat_ne_top _)\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nμ : OuterMeasure X\nhm : IsMetric μ\nt : Set X\nht : t ∈ {s | IsClosed s}\ns : Set X\nS : ℕ → Set X := fun n => {x | x ∈ s ∧ (↑n)⁻¹ ≤ infEdist x t}\nn0 : ∀ {n : ℕ}, (↑n)⁻¹ ≠ 0\n⊢ ↑μ (s ∩ t) + ↑μ (s \\ t) ≤ ↑μ s\n[PROOFSTEP]\nhave Ssep : ∀ n, IsMetricSeparated (S n) t := fun n =>\n  ⟨n⁻¹, n0, fun x hx y hy => hx.2.trans <| infEdist_le_edist_of_mem hy⟩\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nμ : OuterMeasure X\nhm : IsMetric μ\nt : Set X\nht : t ∈ {s | IsClosed s}\ns : Set X\nS : ℕ → Set X := fun n => {x | x ∈ s ∧ (↑n)⁻¹ ≤ infEdist x t}\nn0 : ∀ {n : ℕ}, (↑n)⁻¹ ≠ 0\nSsep : ∀ (n : ℕ), IsMetricSeparated (S n) t\n⊢ ↑μ (s ∩ t) + ↑μ (s \\ t) ≤ ↑μ s\n[PROOFSTEP]\nhave Ssep' : ∀ n, IsMetricSeparated (S n) (s ∩ t) := fun n => (Ssep n).mono Subset.rfl (inter_subset_right _ _)\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nμ : OuterMeasure X\nhm : IsMetric μ\nt : Set X\nht : t ∈ {s | IsClosed s}\ns : Set X\nS : ℕ → Set X := fun n => {x | x ∈ s ∧ (↑n)⁻¹ ≤ infEdist x t}\nn0 : ∀ {n : ℕ}, (↑n)⁻¹ ≠ 0\nSsep : ∀ (n : ℕ), IsMetricSeparated (S n) t\nSsep' : ∀ (n : ℕ), IsMetricSeparated (S n) (s ∩ t)\n⊢ ↑μ (s ∩ t) + ↑μ (s \\ t) ≤ ↑μ s\n[PROOFSTEP]\nhave S_sub : ∀ n, S n ⊆ s \\ t := fun n => subset_inter (inter_subset_left _ _) (Ssep n).subset_compl_right\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nμ : OuterMeasure X\nhm : IsMetric μ\nt : Set X\nht : t ∈ {s | IsClosed s}\ns : Set X\nS : ℕ → Set X := fun n => {x | x ∈ s ∧ (↑n)⁻¹ ≤ infEdist x t}\nn0 : ∀ {n : ℕ}, (↑n)⁻¹ ≠ 0\nSsep : ∀ (n : ℕ), IsMetricSeparated (S n) t\nSsep' : ∀ (n : ℕ), IsMetricSeparated (S n) (s ∩ t)\nS_sub : ∀ (n : ℕ), S n ⊆ s \\ t\n⊢ ↑μ (s ∩ t) + ↑μ (s \\ t) ≤ ↑μ s\n[PROOFSTEP]\nhave hSs : ∀ n, μ (s ∩ t) + μ (S n) ≤ μ s := fun n =>\n  calc\n    μ (s ∩ t) + μ (S n) = μ (s ∩ t ∪ S n) := Eq.symm <| hm _ _ <| (Ssep' n).symm\n    _ ≤ μ (s ∩ t ∪ s \\ t) := (μ.mono <| union_subset_union_right _ <| S_sub n)\n    _ = μ s := by rw [inter_union_diff]\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nμ : OuterMeasure X\nhm : IsMetric μ\nt : Set X\nht : t ∈ {s | IsClosed s}\ns : Set X\nS : ℕ → Set X := fun n => {x | x ∈ s ∧ (↑n)⁻¹ ≤ infEdist x t}\nn0 : ∀ {n : ℕ}, (↑n)⁻¹ ≠ 0\nSsep : ∀ (n : ℕ), IsMetricSeparated (S n) t\nSsep' : ∀ (n : ℕ), IsMetricSeparated (S n) (s ∩ t)\nS_sub : ∀ (n : ℕ), S n ⊆ s \\ t\nn : ℕ\n⊢ ↑μ (s ∩ t ∪ s \\ t) = ↑μ s\n[PROOFSTEP]\nrw [inter_union_diff]\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nμ : OuterMeasure X\nhm : IsMetric μ\nt : Set X\nht : t ∈ {s | IsClosed s}\ns : Set X\nS : ℕ → Set X := fun n => {x | x ∈ s ∧ (↑n)⁻¹ ≤ infEdist x t}\nn0 : ∀ {n : ℕ}, (↑n)⁻¹ ≠ 0\nSsep : ∀ (n : ℕ), IsMetricSeparated (S n) t\nSsep' : ∀ (n : ℕ), IsMetricSeparated (S n) (s ∩ t)\nS_sub : ∀ (n : ℕ), S n ⊆ s \\ t\nhSs : ∀ (n : ℕ), ↑μ (s ∩ t) + ↑μ (S n) ≤ ↑μ s\n⊢ ↑μ (s ∩ t) + ↑μ (s \\ t) ≤ ↑μ s\n[PROOFSTEP]\nhave iUnion_S : ⋃ n, S n = s \\ t := by\n  refine' Subset.antisymm (iUnion_subset S_sub) _\n  rintro x ⟨hxs, hxt⟩\n  rw [mem_iff_infEdist_zero_of_closed ht] at hxt \n  rcases ENNReal.exists_inv_nat_lt hxt with ⟨n, hn⟩\n  exact\n    mem_iUnion.2\n      ⟨n, hxs, hn.le⟩\n        /- Now we have `∀ n, μ (s ∩ t) + μ (S n) ≤ μ s` and we need to prove\n            `μ (s ∩ t) + μ (⋃ n, S n) ≤ μ s`. We can't pass to the limit because\n            `μ` is only an outer measure. -/\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nμ : OuterMeasure X\nhm : IsMetric μ\nt : Set X\nht : t ∈ {s | IsClosed s}\ns : Set X\nS : ℕ → Set X := fun n => {x | x ∈ s ∧ (↑n)⁻¹ ≤ infEdist x t}\nn0 : ∀ {n : ℕ}, (↑n)⁻¹ ≠ 0\nSsep : ∀ (n : ℕ), IsMetricSeparated (S n) t\nSsep' : ∀ (n : ℕ), IsMetricSeparated (S n) (s ∩ t)\nS_sub : ∀ (n : ℕ), S n ⊆ s \\ t\nhSs : ∀ (n : ℕ), ↑μ (s ∩ t) + ↑μ (S n) ≤ ↑μ s\n⊢ ⋃ (n : ℕ), S n = s \\ t\n[PROOFSTEP]\nrefine' Subset.antisymm (iUnion_subset S_sub) _\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nμ : OuterMeasure X\nhm : IsMetric μ\nt : Set X\nht : t ∈ {s | IsClosed s}\ns : Set X\nS : ℕ → Set X := fun n => {x | x ∈ s ∧ (↑n)⁻¹ ≤ infEdist x t}\nn0 : ∀ {n : ℕ}, (↑n)⁻¹ ≠ 0\nSsep : ∀ (n : ℕ), IsMetricSeparated (S n) t\nSsep' : ∀ (n : ℕ), IsMetricSeparated (S n) (s ∩ t)\nS_sub : ∀ (n : ℕ), S n ⊆ s \\ t\nhSs : ∀ (n : ℕ), ↑μ (s ∩ t) + ↑μ (S n) ≤ ↑μ s\n⊢ s \\ t ⊆ ⋃ (n : ℕ), S n\n[PROOFSTEP]\nrintro x ⟨hxs, hxt⟩\n[GOAL]\ncase intro\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nμ : OuterMeasure X\nhm : IsMetric μ\nt : Set X\nht : t ∈ {s | IsClosed s}\ns : Set X\nS : ℕ → Set X := fun n => {x | x ∈ s ∧ (↑n)⁻¹ ≤ infEdist x t}\nn0 : ∀ {n : ℕ}, (↑n)⁻¹ ≠ 0\nSsep : ∀ (n : ℕ), IsMetricSeparated (S n) t\nSsep' : ∀ (n : ℕ), IsMetricSeparated (S n) (s ∩ t)\nS_sub : ∀ (n : ℕ), S n ⊆ s \\ t\nhSs : ∀ (n : ℕ), ↑μ (s ∩ t) + ↑μ (S n) ≤ ↑μ s\nx : X\nhxs : x ∈ s\nhxt : ¬x ∈ t\n⊢ x ∈ ⋃ (n : ℕ), S n\n[PROOFSTEP]\nrw [mem_iff_infEdist_zero_of_closed ht] at hxt \n[GOAL]\ncase intro\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nμ : OuterMeasure X\nhm : IsMetric μ\nt : Set X\nht : t ∈ {s | IsClosed s}\ns : Set X\nS : ℕ → Set X := fun n => {x | x ∈ s ∧ (↑n)⁻¹ ≤ infEdist x t}\nn0 : ∀ {n : ℕ}, (↑n)⁻¹ ≠ 0\nSsep : ∀ (n : ℕ), IsMetricSeparated (S n) t\nSsep' : ∀ (n : ℕ), IsMetricSeparated (S n) (s ∩ t)\nS_sub : ∀ (n : ℕ), S n ⊆ s \\ t\nhSs : ∀ (n : ℕ), ↑μ (s ∩ t) + ↑μ (S n) ≤ ↑μ s\nx : X\nhxs : x ∈ s\nhxt : ¬infEdist x t = 0\n⊢ x ∈ ⋃ (n : ℕ), S n\n[PROOFSTEP]\nrcases ENNReal.exists_inv_nat_lt hxt with ⟨n, hn⟩\n[GOAL]\ncase intro.intro\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nμ : OuterMeasure X\nhm : IsMetric μ\nt : Set X\nht : t ∈ {s | IsClosed s}\ns : Set X\nS : ℕ → Set X := fun n => {x | x ∈ s ∧ (↑n)⁻¹ ≤ infEdist x t}\nn0 : ∀ {n : ℕ}, (↑n)⁻¹ ≠ 0\nSsep : ∀ (n : ℕ), IsMetricSeparated (S n) t\nSsep' : ∀ (n : ℕ), IsMetricSeparated (S n) (s ∩ t)\nS_sub : ∀ (n : ℕ), S n ⊆ s \\ t\nhSs : ∀ (n : ℕ), ↑μ (s ∩ t) + ↑μ (S n) ≤ ↑μ s\nx : X\nhxs : x ∈ s\nhxt : ¬infEdist x t = 0\nn : ℕ\nhn : (↑n)⁻¹ < infEdist x t\n⊢ x ∈ ⋃ (n : ℕ), S n\n[PROOFSTEP]\nexact\n  mem_iUnion.2\n    ⟨n, hxs, hn.le⟩\n      /- Now we have `∀ n, μ (s ∩ t) + μ (S n) ≤ μ s` and we need to prove\n          `μ (s ∩ t) + μ (⋃ n, S n) ≤ μ s`. We can't pass to the limit because\n          `μ` is only an outer measure. -/\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nμ : OuterMeasure X\nhm : IsMetric μ\nt : Set X\nht : t ∈ {s | IsClosed s}\ns : Set X\nS : ℕ → Set X := fun n => {x | x ∈ s ∧ (↑n)⁻¹ ≤ infEdist x t}\nn0 : ∀ {n : ℕ}, (↑n)⁻¹ ≠ 0\nSsep : ∀ (n : ℕ), IsMetricSeparated (S n) t\nSsep' : ∀ (n : ℕ), IsMetricSeparated (S n) (s ∩ t)\nS_sub : ∀ (n : ℕ), S n ⊆ s \\ t\nhSs : ∀ (n : ℕ), ↑μ (s ∩ t) + ↑μ (S n) ≤ ↑μ s\niUnion_S : ⋃ (n : ℕ), S n = s \\ t\n⊢ ↑μ (s ∩ t) + ↑μ (s \\ t) ≤ ↑μ s\n[PROOFSTEP]\nby_cases htop : μ (s \\ t) = ∞\n[GOAL]\ncase pos\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nμ : OuterMeasure X\nhm : IsMetric μ\nt : Set X\nht : t ∈ {s | IsClosed s}\ns : Set X\nS : ℕ → Set X := fun n => {x | x ∈ s ∧ (↑n)⁻¹ ≤ infEdist x t}\nn0 : ∀ {n : ℕ}, (↑n)⁻¹ ≠ 0\nSsep : ∀ (n : ℕ), IsMetricSeparated (S n) t\nSsep' : ∀ (n : ℕ), IsMetricSeparated (S n) (s ∩ t)\nS_sub : ∀ (n : ℕ), S n ⊆ s \\ t\nhSs : ∀ (n : ℕ), ↑μ (s ∩ t) + ↑μ (S n) ≤ ↑μ s\niUnion_S : ⋃ (n : ℕ), S n = s \\ t\nhtop : ↑μ (s \\ t) = ⊤\n⊢ ↑μ (s ∩ t) + ↑μ (s \\ t) ≤ ↑μ s\n[PROOFSTEP]\nrw [htop, add_top, ← htop]\n[GOAL]\ncase pos\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nμ : OuterMeasure X\nhm : IsMetric μ\nt : Set X\nht : t ∈ {s | IsClosed s}\ns : Set X\nS : ℕ → Set X := fun n => {x | x ∈ s ∧ (↑n)⁻¹ ≤ infEdist x t}\nn0 : ∀ {n : ℕ}, (↑n)⁻¹ ≠ 0\nSsep : ∀ (n : ℕ), IsMetricSeparated (S n) t\nSsep' : ∀ (n : ℕ), IsMetricSeparated (S n) (s ∩ t)\nS_sub : ∀ (n : ℕ), S n ⊆ s \\ t\nhSs : ∀ (n : ℕ), ↑μ (s ∩ t) + ↑μ (S n) ≤ ↑μ s\niUnion_S : ⋃ (n : ℕ), S n = s \\ t\nhtop : ↑μ (s \\ t) = ⊤\n⊢ ↑μ (s \\ t) ≤ ↑μ s\n[PROOFSTEP]\nexact μ.mono (diff_subset _ _)\n[GOAL]\ncase neg\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nμ : OuterMeasure X\nhm : IsMetric μ\nt : Set X\nht : t ∈ {s | IsClosed s}\ns : Set X\nS : ℕ → Set X := fun n => {x | x ∈ s ∧ (↑n)⁻¹ ≤ infEdist x t}\nn0 : ∀ {n : ℕ}, (↑n)⁻¹ ≠ 0\nSsep : ∀ (n : ℕ), IsMetricSeparated (S n) t\nSsep' : ∀ (n : ℕ), IsMetricSeparated (S n) (s ∩ t)\nS_sub : ∀ (n : ℕ), S n ⊆ s \\ t\nhSs : ∀ (n : ℕ), ↑μ (s ∩ t) + ↑μ (S n) ≤ ↑μ s\niUnion_S : ⋃ (n : ℕ), S n = s \\ t\nhtop : ¬↑μ (s \\ t) = ⊤\n⊢ ↑μ (s ∩ t) + ↑μ (s \\ t) ≤ ↑μ s\n[PROOFSTEP]\nsuffices : μ (⋃ n, S n) ≤ ⨆ n, μ (S n)\n[GOAL]\ncase neg\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nμ : OuterMeasure X\nhm : IsMetric μ\nt : Set X\nht : t ∈ {s | IsClosed s}\ns : Set X\nS : ℕ → Set X := fun n => {x | x ∈ s ∧ (↑n)⁻¹ ≤ infEdist x t}\nn0 : ∀ {n : ℕ}, (↑n)⁻¹ ≠ 0\nSsep : ∀ (n : ℕ), IsMetricSeparated (S n) t\nSsep' : ∀ (n : ℕ), IsMetricSeparated (S n) (s ∩ t)\nS_sub : ∀ (n : ℕ), S n ⊆ s \\ t\nhSs : ∀ (n : ℕ), ↑μ (s ∩ t) + ↑μ (S n) ≤ ↑μ s\niUnion_S : ⋃ (n : ℕ), S n = s \\ t\nhtop : ¬↑μ (s \\ t) = ⊤\nthis : ↑μ (⋃ (n : ℕ), S n) ≤ ⨆ (n : ℕ), ↑μ (S n)\n⊢ ↑μ (s ∩ t) + ↑μ (s \\ t) ≤ ↑μ s\ncase this\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nμ : OuterMeasure X\nhm : IsMetric μ\nt : Set X\nht : t ∈ {s | IsClosed s}\ns : Set X\nS : ℕ → Set X := fun n => {x | x ∈ s ∧ (↑n)⁻¹ ≤ infEdist x t}\nn0 : ∀ {n : ℕ}, (↑n)⁻¹ ≠ 0\nSsep : ∀ (n : ℕ), IsMetricSeparated (S n) t\nSsep' : ∀ (n : ℕ), IsMetricSeparated (S n) (s ∩ t)\nS_sub : ∀ (n : ℕ), S n ⊆ s \\ t\nhSs : ∀ (n : ℕ), ↑μ (s ∩ t) + ↑μ (S n) ≤ ↑μ s\niUnion_S : ⋃ (n : ℕ), S n = s \\ t\nhtop : ¬↑μ (s \\ t) = ⊤\n⊢ ↑μ (⋃ (n : ℕ), S n) ≤ ⨆ (n : ℕ), ↑μ (S n)\n[PROOFSTEP]\ncalc\n  μ (s ∩ t) + μ (s \\ t) = μ (s ∩ t) + μ (⋃ n, S n) := by rw [iUnion_S]\n  _ ≤ μ (s ∩ t) + ⨆ n, μ (S n) := (add_le_add le_rfl this)\n  _ = ⨆ n, μ (s ∩ t) + μ (S n) := ENNReal.add_iSup\n  _ ≤ μ s := iSup_le hSs\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nμ : OuterMeasure X\nhm : IsMetric μ\nt : Set X\nht : t ∈ {s | IsClosed s}\ns : Set X\nS : ℕ → Set X := fun n => {x | x ∈ s ∧ (↑n)⁻¹ ≤ infEdist x t}\nn0 : ∀ {n : ℕ}, (↑n)⁻¹ ≠ 0\nSsep : ∀ (n : ℕ), IsMetricSeparated (S n) t\nSsep' : ∀ (n : ℕ), IsMetricSeparated (S n) (s ∩ t)\nS_sub : ∀ (n : ℕ), S n ⊆ s \\ t\nhSs : ∀ (n : ℕ), ↑μ (s ∩ t) + ↑μ (S n) ≤ ↑μ s\niUnion_S : ⋃ (n : ℕ), S n = s \\ t\nhtop : ¬↑μ (s \\ t) = ⊤\nthis : ↑μ (⋃ (n : ℕ), S n) ≤ ⨆ (n : ℕ), ↑μ (S n)\n⊢ ↑μ (s ∩ t) + ↑μ (s \\ t) = ↑μ (s ∩ t) + ↑μ (⋃ (n : ℕ), S n)\n[PROOFSTEP]\nrw [iUnion_S]\n[GOAL]\ncase this\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nμ : OuterMeasure X\nhm : IsMetric μ\nt : Set X\nht : t ∈ {s | IsClosed s}\ns : Set X\nS : ℕ → Set X := fun n => {x | x ∈ s ∧ (↑n)⁻¹ ≤ infEdist x t}\nn0 : ∀ {n : ℕ}, (↑n)⁻¹ ≠ 0\nSsep : ∀ (n : ℕ), IsMetricSeparated (S n) t\nSsep' : ∀ (n : ℕ), IsMetricSeparated (S n) (s ∩ t)\nS_sub : ∀ (n : ℕ), S n ⊆ s \\ t\nhSs : ∀ (n : ℕ), ↑μ (s ∩ t) + ↑μ (S n) ≤ ↑μ s\niUnion_S : ⋃ (n : ℕ), S n = s \\ t\nhtop : ¬↑μ (s \\ t) = ⊤\n⊢ ↑μ (⋃ (n : ℕ), S n) ≤ ⨆ (n : ℕ), ↑μ (S n)\n[PROOFSTEP]\nhave : ∀ n, S n ⊆ S (n + 1) := fun n x hx => ⟨hx.1, le_trans (ENNReal.inv_le_inv.2 <| Nat.cast_le.2 n.le_succ) hx.2⟩\n[GOAL]\ncase this\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nμ : OuterMeasure X\nhm : IsMetric μ\nt : Set X\nht : t ∈ {s | IsClosed s}\ns : Set X\nS : ℕ → Set X := fun n => {x | x ∈ s ∧ (↑n)⁻¹ ≤ infEdist x t}\nn0 : ∀ {n : ℕ}, (↑n)⁻¹ ≠ 0\nSsep : ∀ (n : ℕ), IsMetricSeparated (S n) t\nSsep' : ∀ (n : ℕ), IsMetricSeparated (S n) (s ∩ t)\nS_sub : ∀ (n : ℕ), S n ⊆ s \\ t\nhSs : ∀ (n : ℕ), ↑μ (s ∩ t) + ↑μ (S n) ≤ ↑μ s\niUnion_S : ⋃ (n : ℕ), S n = s \\ t\nhtop : ¬↑μ (s \\ t) = ⊤\nthis : ∀ (n : ℕ), S n ⊆ S (n + 1)\n⊢ ↑μ (⋃ (n : ℕ), S n) ≤ ⨆ (n : ℕ), ↑μ (S n)\n[PROOFSTEP]\nclassical\n  -- Porting note: Added this to get the next tactic to work\nrefine' (μ.iUnion_nat_of_monotone_of_tsum_ne_top this _).le;\nclear this\nrw [← tsum_even_add_odd ENNReal.summable ENNReal.summable, ENNReal.add_ne_top]\nsuffices : ∀ a, (∑' k : ℕ, μ (S (2 * k + 1 + a) \\ S (2 * k + a))) ≠ ∞\nexact ⟨by simpa using this 0, by simpa using this 1⟩\nrefine' fun r => ne_top_of_le_ne_top htop _\nrw [← iUnion_S, ENNReal.tsum_eq_iSup_nat, iSup_le_iff]\nintro n\nrw [← hm.finset_iUnion_of_pairwise_separated]\n· exact μ.mono (iUnion_subset fun i => iUnion_subset fun _ x hx => mem_iUnion.2 ⟨_, hx.1⟩)\nsuffices : ∀ i j, i < j → IsMetricSeparated (S (2 * i + 1 + r)) (s \\ S (2 * j + r))\nexact fun i _ j _ hij =>\n  hij.lt_or_lt.elim (fun h => (this i j h).mono (inter_subset_left _ _) fun x hx => by exact ⟨hx.1.1, hx.2⟩) fun h =>\n    (this j i h).symm.mono (fun x hx => by exact ⟨hx.1.1, hx.2⟩) (inter_subset_left _ _)\nintro i j hj\nhave A : ((↑(2 * j + r))⁻¹ : ℝ≥0∞) < (↑(2 * i + 1 + r))⁻¹ := by rw [ENNReal.inv_lt_inv, Nat.cast_lt]; linarith\nrefine' ⟨(↑(2 * i + 1 + r))⁻¹ - (↑(2 * j + r))⁻¹, by simpa using A, fun x hx y hy => _⟩\nhave : infEdist y t < (↑(2 * j + r))⁻¹ := not_le.1 fun hle => hy.2 ⟨hy.1, hle⟩\nrcases infEdist_lt_iff.mp this with ⟨z, hzt, hyz⟩\nhave hxz : (↑(2 * i + 1 + r))⁻¹ ≤ edist x z := le_infEdist.1 hx.2 _ hzt\napply ENNReal.le_of_add_le_add_right hyz.ne_top\nrefine' le_trans _ (edist_triangle _ _ _)\nrefine' (add_le_add le_rfl hyz.le).trans (Eq.trans_le _ hxz)\nrw [tsub_add_cancel_of_le A.le]\n[GOAL]\ncase this\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nμ : OuterMeasure X\nhm : IsMetric μ\nt : Set X\nht : t ∈ {s | IsClosed s}\ns : Set X\nS : ℕ → Set X := fun n => {x | x ∈ s ∧ (↑n)⁻¹ ≤ infEdist x t}\nn0 : ∀ {n : ℕ}, (↑n)⁻¹ ≠ 0\nSsep : ∀ (n : ℕ), IsMetricSeparated (S n) t\nSsep' : ∀ (n : ℕ), IsMetricSeparated (S n) (s ∩ t)\nS_sub : ∀ (n : ℕ), S n ⊆ s \\ t\nhSs : ∀ (n : ℕ), ↑μ (s ∩ t) + ↑μ (S n) ≤ ↑μ s\niUnion_S : ⋃ (n : ℕ), S n = s \\ t\nhtop : ¬↑μ (s \\ t) = ⊤\nthis : ∀ (n : ℕ), S n ⊆ S (n + 1)\n⊢ ↑μ (⋃ (n : ℕ), S n) ≤ ⨆ (n : ℕ), ↑μ (S n)\n[PROOFSTEP]\nrefine' (μ.iUnion_nat_of_monotone_of_tsum_ne_top this _).le\n[GOAL]\ncase this\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nμ : OuterMeasure X\nhm : IsMetric μ\nt : Set X\nht : t ∈ {s | IsClosed s}\ns : Set X\nS : ℕ → Set X := fun n => {x | x ∈ s ∧ (↑n)⁻¹ ≤ infEdist x t}\nn0 : ∀ {n : ℕ}, (↑n)⁻¹ ≠ 0\nSsep : ∀ (n : ℕ), IsMetricSeparated (S n) t\nSsep' : ∀ (n : ℕ), IsMetricSeparated (S n) (s ∩ t)\nS_sub : ∀ (n : ℕ), S n ⊆ s \\ t\nhSs : ∀ (n : ℕ), ↑μ (s ∩ t) + ↑μ (S n) ≤ ↑μ s\niUnion_S : ⋃ (n : ℕ), S n = s \\ t\nhtop : ¬↑μ (s \\ t) = ⊤\nthis : ∀ (n : ℕ), S n ⊆ S (n + 1)\n⊢ ∑' (k : ℕ), ↑μ (S (k + 1) \\ S k) ≠ ⊤\n[PROOFSTEP]\nclear this\n[GOAL]\ncase this\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nμ : OuterMeasure X\nhm : IsMetric μ\nt : Set X\nht : t ∈ {s | IsClosed s}\ns : Set X\nS : ℕ → Set X := fun n => {x | x ∈ s ∧ (↑n)⁻¹ ≤ infEdist x t}\nn0 : ∀ {n : ℕ}, (↑n)⁻¹ ≠ 0\nSsep : ∀ (n : ℕ), IsMetricSeparated (S n) t\nSsep' : ∀ (n : ℕ), IsMetricSeparated (S n) (s ∩ t)\nS_sub : ∀ (n : ℕ), S n ⊆ s \\ t\nhSs : ∀ (n : ℕ), ↑μ (s ∩ t) + ↑μ (S n) ≤ ↑μ s\niUnion_S : ⋃ (n : ℕ), S n = s \\ t\nhtop : ¬↑μ (s \\ t) = ⊤\n⊢ ∑' (k : ℕ), ↑μ (S (k + 1) \\ S k) ≠ ⊤\n[PROOFSTEP]\nrw [← tsum_even_add_odd ENNReal.summable ENNReal.summable, ENNReal.add_ne_top]\n[GOAL]\ncase this\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nμ : OuterMeasure X\nhm : IsMetric μ\nt : Set X\nht : t ∈ {s | IsClosed s}\ns : Set X\nS : ℕ → Set X := fun n => {x | x ∈ s ∧ (↑n)⁻¹ ≤ infEdist x t}\nn0 : ∀ {n : ℕ}, (↑n)⁻¹ ≠ 0\nSsep : ∀ (n : ℕ), IsMetricSeparated (S n) t\nSsep' : ∀ (n : ℕ), IsMetricSeparated (S n) (s ∩ t)\nS_sub : ∀ (n : ℕ), S n ⊆ s \\ t\nhSs : ∀ (n : ℕ), ↑μ (s ∩ t) + ↑μ (S n) ≤ ↑μ s\niUnion_S : ⋃ (n : ℕ), S n = s \\ t\nhtop : ¬↑μ (s \\ t) = ⊤\n⊢ ∑' (k : ℕ), ↑μ (S (2 * k + 1) \\ S (2 * k)) ≠ ⊤ ∧ ∑' (k : ℕ), ↑μ (S (2 * k + 1 + 1) \\ S (2 * k + 1)) ≠ ⊤\n[PROOFSTEP]\nsuffices : ∀ a, (∑' k : ℕ, μ (S (2 * k + 1 + a) \\ S (2 * k + a))) ≠ ∞\n[GOAL]\ncase this\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nμ : OuterMeasure X\nhm : IsMetric μ\nt : Set X\nht : t ∈ {s | IsClosed s}\ns : Set X\nS : ℕ → Set X := fun n => {x | x ∈ s ∧ (↑n)⁻¹ ≤ infEdist x t}\nn0 : ∀ {n : ℕ}, (↑n)⁻¹ ≠ 0\nSsep : ∀ (n : ℕ), IsMetricSeparated (S n) t\nSsep' : ∀ (n : ℕ), IsMetricSeparated (S n) (s ∩ t)\nS_sub : ∀ (n : ℕ), S n ⊆ s \\ t\nhSs : ∀ (n : ℕ), ↑μ (s ∩ t) + ↑μ (S n) ≤ ↑μ s\niUnion_S : ⋃ (n : ℕ), S n = s \\ t\nhtop : ¬↑μ (s \\ t) = ⊤\nthis : ∀ (a : ℕ), ∑' (k : ℕ), ↑μ (S (2 * k + 1 + a) \\ S (2 * k + a)) ≠ ⊤\n⊢ ∑' (k : ℕ), ↑μ (S (2 * k + 1) \\ S (2 * k)) ≠ ⊤ ∧ ∑' (k : ℕ), ↑μ (S (2 * k + 1 + 1) \\ S (2 * k + 1)) ≠ ⊤\ncase this\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nμ : OuterMeasure X\nhm : IsMetric μ\nt : Set X\nht : t ∈ {s | IsClosed s}\ns : Set X\nS : ℕ → Set X := fun n => {x | x ∈ s ∧ (↑n)⁻¹ ≤ infEdist x t}\nn0 : ∀ {n : ℕ}, (↑n)⁻¹ ≠ 0\nSsep : ∀ (n : ℕ), IsMetricSeparated (S n) t\nSsep' : ∀ (n : ℕ), IsMetricSeparated (S n) (s ∩ t)\nS_sub : ∀ (n : ℕ), S n ⊆ s \\ t\nhSs : ∀ (n : ℕ), ↑μ (s ∩ t) + ↑μ (S n) ≤ ↑μ s\niUnion_S : ⋃ (n : ℕ), S n = s \\ t\nhtop : ¬↑μ (s \\ t) = ⊤\n⊢ ∀ (a : ℕ), ∑' (k : ℕ), ↑μ (S (2 * k + 1 + a) \\ S (2 * k + a)) ≠ ⊤\n[PROOFSTEP]\nexact ⟨by simpa using this 0, by simpa using this 1⟩\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nμ : OuterMeasure X\nhm : IsMetric μ\nt : Set X\nht : t ∈ {s | IsClosed s}\ns : Set X\nS : ℕ → Set X := fun n => {x | x ∈ s ∧ (↑n)⁻¹ ≤ infEdist x t}\nn0 : ∀ {n : ℕ}, (↑n)⁻¹ ≠ 0\nSsep : ∀ (n : ℕ), IsMetricSeparated (S n) t\nSsep' : ∀ (n : ℕ), IsMetricSeparated (S n) (s ∩ t)\nS_sub : ∀ (n : ℕ), S n ⊆ s \\ t\nhSs : ∀ (n : ℕ), ↑μ (s ∩ t) + ↑μ (S n) ≤ ↑μ s\niUnion_S : ⋃ (n : ℕ), S n = s \\ t\nhtop : ¬↑μ (s \\ t) = ⊤\nthis : ∀ (a : ℕ), ∑' (k : ℕ), ↑μ (S (2 * k + 1 + a) \\ S (2 * k + a)) ≠ ⊤\n⊢ ∑' (k : ℕ), ↑μ (S (2 * k + 1) \\ S (2 * k)) ≠ ⊤\n[PROOFSTEP]\nsimpa using this 0\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nμ : OuterMeasure X\nhm : IsMetric μ\nt : Set X\nht : t ∈ {s | IsClosed s}\ns : Set X\nS : ℕ → Set X := fun n => {x | x ∈ s ∧ (↑n)⁻¹ ≤ infEdist x t}\nn0 : ∀ {n : ℕ}, (↑n)⁻¹ ≠ 0\nSsep : ∀ (n : ℕ), IsMetricSeparated (S n) t\nSsep' : ∀ (n : ℕ), IsMetricSeparated (S n) (s ∩ t)\nS_sub : ∀ (n : ℕ), S n ⊆ s \\ t\nhSs : ∀ (n : ℕ), ↑μ (s ∩ t) + ↑μ (S n) ≤ ↑μ s\niUnion_S : ⋃ (n : ℕ), S n = s \\ t\nhtop : ¬↑μ (s \\ t) = ⊤\nthis : ∀ (a : ℕ), ∑' (k : ℕ), ↑μ (S (2 * k + 1 + a) \\ S (2 * k + a)) ≠ ⊤\n⊢ ∑' (k : ℕ), ↑μ (S (2 * k + 1 + 1) \\ S (2 * k + 1)) ≠ ⊤\n[PROOFSTEP]\nsimpa using this 1\n[GOAL]\ncase this\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nμ : OuterMeasure X\nhm : IsMetric μ\nt : Set X\nht : t ∈ {s | IsClosed s}\ns : Set X\nS : ℕ → Set X := fun n => {x | x ∈ s ∧ (↑n)⁻¹ ≤ infEdist x t}\nn0 : ∀ {n : ℕ}, (↑n)⁻¹ ≠ 0\nSsep : ∀ (n : ℕ), IsMetricSeparated (S n) t\nSsep' : ∀ (n : ℕ), IsMetricSeparated (S n) (s ∩ t)\nS_sub : ∀ (n : ℕ), S n ⊆ s \\ t\nhSs : ∀ (n : ℕ), ↑μ (s ∩ t) + ↑μ (S n) ≤ ↑μ s\niUnion_S : ⋃ (n : ℕ), S n = s \\ t\nhtop : ¬↑μ (s \\ t) = ⊤\n⊢ ∀ (a : ℕ), ∑' (k : ℕ), ↑μ (S (2 * k + 1 + a) \\ S (2 * k + a)) ≠ ⊤\n[PROOFSTEP]\nrefine' fun r => ne_top_of_le_ne_top htop _\n[GOAL]\ncase this\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nμ : OuterMeasure X\nhm : IsMetric μ\nt : Set X\nht : t ∈ {s | IsClosed s}\ns : Set X\nS : ℕ → Set X := fun n => {x | x ∈ s ∧ (↑n)⁻¹ ≤ infEdist x t}\nn0 : ∀ {n : ℕ}, (↑n)⁻¹ ≠ 0\nSsep : ∀ (n : ℕ), IsMetricSeparated (S n) t\nSsep' : ∀ (n : ℕ), IsMetricSeparated (S n) (s ∩ t)\nS_sub : ∀ (n : ℕ), S n ⊆ s \\ t\nhSs : ∀ (n : ℕ), ↑μ (s ∩ t) + ↑μ (S n) ≤ ↑μ s\niUnion_S : ⋃ (n : ℕ), S n = s \\ t\nhtop : ¬↑μ (s \\ t) = ⊤\nr : ℕ\n⊢ ∑' (k : ℕ), ↑μ (S (2 * k + 1 + r) \\ S (2 * k + r)) ≤ ↑μ (s \\ t)\n[PROOFSTEP]\nrw [← iUnion_S, ENNReal.tsum_eq_iSup_nat, iSup_le_iff]\n[GOAL]\ncase this\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nμ : OuterMeasure X\nhm : IsMetric μ\nt : Set X\nht : t ∈ {s | IsClosed s}\ns : Set X\nS : ℕ → Set X := fun n => {x | x ∈ s ∧ (↑n)⁻¹ ≤ infEdist x t}\nn0 : ∀ {n : ℕ}, (↑n)⁻¹ ≠ 0\nSsep : ∀ (n : ℕ), IsMetricSeparated (S n) t\nSsep' : ∀ (n : ℕ), IsMetricSeparated (S n) (s ∩ t)\nS_sub : ∀ (n : ℕ), S n ⊆ s \\ t\nhSs : ∀ (n : ℕ), ↑μ (s ∩ t) + ↑μ (S n) ≤ ↑μ s\niUnion_S : ⋃ (n : ℕ), S n = s \\ t\nhtop : ¬↑μ (s \\ t) = ⊤\nr : ℕ\n⊢ ∀ (i : ℕ), ∑ a in Finset.range i, ↑μ (S (2 * a + 1 + r) \\ S (2 * a + r)) ≤ ↑μ (⋃ (n : ℕ), S n)\n[PROOFSTEP]\nintro n\n[GOAL]\ncase this\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nμ : OuterMeasure X\nhm : IsMetric μ\nt : Set X\nht : t ∈ {s | IsClosed s}\ns : Set X\nS : ℕ → Set X := fun n => {x | x ∈ s ∧ (↑n)⁻¹ ≤ infEdist x t}\nn0 : ∀ {n : ℕ}, (↑n)⁻¹ ≠ 0\nSsep : ∀ (n : ℕ), IsMetricSeparated (S n) t\nSsep' : ∀ (n : ℕ), IsMetricSeparated (S n) (s ∩ t)\nS_sub : ∀ (n : ℕ), S n ⊆ s \\ t\nhSs : ∀ (n : ℕ), ↑μ (s ∩ t) + ↑μ (S n) ≤ ↑μ s\niUnion_S : ⋃ (n : ℕ), S n = s \\ t\nhtop : ¬↑μ (s \\ t) = ⊤\nr n : ℕ\n⊢ ∑ a in Finset.range n, ↑μ (S (2 * a + 1 + r) \\ S (2 * a + r)) ≤ ↑μ (⋃ (n : ℕ), S n)\n[PROOFSTEP]\nrw [← hm.finset_iUnion_of_pairwise_separated]\n[GOAL]\ncase this\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nμ : OuterMeasure X\nhm : IsMetric μ\nt : Set X\nht : t ∈ {s | IsClosed s}\ns : Set X\nS : ℕ → Set X := fun n => {x | x ∈ s ∧ (↑n)⁻¹ ≤ infEdist x t}\nn0 : ∀ {n : ℕ}, (↑n)⁻¹ ≠ 0\nSsep : ∀ (n : ℕ), IsMetricSeparated (S n) t\nSsep' : ∀ (n : ℕ), IsMetricSeparated (S n) (s ∩ t)\nS_sub : ∀ (n : ℕ), S n ⊆ s \\ t\nhSs : ∀ (n : ℕ), ↑μ (s ∩ t) + ↑μ (S n) ≤ ↑μ s\niUnion_S : ⋃ (n : ℕ), S n = s \\ t\nhtop : ¬↑μ (s \\ t) = ⊤\nr n : ℕ\n⊢ ↑μ (⋃ (i : ℕ) (_ : i ∈ Finset.range n), S (2 * i + 1 + r) \\ S (2 * i + r)) ≤ ↑μ (⋃ (n : ℕ), S n)\n[PROOFSTEP]\nexact μ.mono (iUnion_subset fun i => iUnion_subset fun _ x hx => mem_iUnion.2 ⟨_, hx.1⟩)\n[GOAL]\ncase this\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nμ : OuterMeasure X\nhm : IsMetric μ\nt : Set X\nht : t ∈ {s | IsClosed s}\ns : Set X\nS : ℕ → Set X := fun n => {x | x ∈ s ∧ (↑n)⁻¹ ≤ infEdist x t}\nn0 : ∀ {n : ℕ}, (↑n)⁻¹ ≠ 0\nSsep : ∀ (n : ℕ), IsMetricSeparated (S n) t\nSsep' : ∀ (n : ℕ), IsMetricSeparated (S n) (s ∩ t)\nS_sub : ∀ (n : ℕ), S n ⊆ s \\ t\nhSs : ∀ (n : ℕ), ↑μ (s ∩ t) + ↑μ (S n) ≤ ↑μ s\niUnion_S : ⋃ (n : ℕ), S n = s \\ t\nhtop : ¬↑μ (s \\ t) = ⊤\nr n : ℕ\n⊢ ∀ (i : ℕ),\n    i ∈ Finset.range n →\n      ∀ (j : ℕ),\n        j ∈ Finset.range n →\n          i ≠ j → IsMetricSeparated (S (2 * i + 1 + r) \\ S (2 * i + r)) (S (2 * j + 1 + r) \\ S (2 * j + r))\n[PROOFSTEP]\nsuffices : ∀ i j, i < j → IsMetricSeparated (S (2 * i + 1 + r)) (s \\ S (2 * j + r))\n[GOAL]\ncase this\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nμ : OuterMeasure X\nhm : IsMetric μ\nt : Set X\nht : t ∈ {s | IsClosed s}\ns : Set X\nS : ℕ → Set X := fun n => {x | x ∈ s ∧ (↑n)⁻¹ ≤ infEdist x t}\nn0 : ∀ {n : ℕ}, (↑n)⁻¹ ≠ 0\nSsep : ∀ (n : ℕ), IsMetricSeparated (S n) t\nSsep' : ∀ (n : ℕ), IsMetricSeparated (S n) (s ∩ t)\nS_sub : ∀ (n : ℕ), S n ⊆ s \\ t\nhSs : ∀ (n : ℕ), ↑μ (s ∩ t) + ↑μ (S n) ≤ ↑μ s\niUnion_S : ⋃ (n : ℕ), S n = s \\ t\nhtop : ¬↑μ (s \\ t) = ⊤\nr n : ℕ\nthis : ∀ (i j : ℕ), i < j → IsMetricSeparated (S (2 * i + 1 + r)) (s \\ S (2 * j + r))\n⊢ ∀ (i : ℕ),\n    i ∈ Finset.range n →\n      ∀ (j : ℕ),\n        j ∈ Finset.range n →\n          i ≠ j → IsMetricSeparated (S (2 * i + 1 + r) \\ S (2 * i + r)) (S (2 * j + 1 + r) \\ S (2 * j + r))\ncase this\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nμ : OuterMeasure X\nhm : IsMetric μ\nt : Set X\nht : t ∈ {s | IsClosed s}\ns : Set X\nS : ℕ → Set X := fun n => {x | x ∈ s ∧ (↑n)⁻¹ ≤ infEdist x t}\nn0 : ∀ {n : ℕ}, (↑n)⁻¹ ≠ 0\nSsep : ∀ (n : ℕ), IsMetricSeparated (S n) t\nSsep' : ∀ (n : ℕ), IsMetricSeparated (S n) (s ∩ t)\nS_sub : ∀ (n : ℕ), S n ⊆ s \\ t\nhSs : ∀ (n : ℕ), ↑μ (s ∩ t) + ↑μ (S n) ≤ ↑μ s\niUnion_S : ⋃ (n : ℕ), S n = s \\ t\nhtop : ¬↑μ (s \\ t) = ⊤\nr n : ℕ\n⊢ ∀ (i j : ℕ), i < j → IsMetricSeparated (S (2 * i + 1 + r)) (s \\ S (2 * j + r))\n[PROOFSTEP]\nexact fun i _ j _ hij =>\n  hij.lt_or_lt.elim (fun h => (this i j h).mono (inter_subset_left _ _) fun x hx => by exact ⟨hx.1.1, hx.2⟩) fun h =>\n    (this j i h).symm.mono (fun x hx => by exact ⟨hx.1.1, hx.2⟩) (inter_subset_left _ _)\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nμ : OuterMeasure X\nhm : IsMetric μ\nt : Set X\nht : t ∈ {s | IsClosed s}\ns : Set X\nS : ℕ → Set X := fun n => {x | x ∈ s ∧ (↑n)⁻¹ ≤ infEdist x t}\nn0 : ∀ {n : ℕ}, (↑n)⁻¹ ≠ 0\nSsep : ∀ (n : ℕ), IsMetricSeparated (S n) t\nSsep' : ∀ (n : ℕ), IsMetricSeparated (S n) (s ∩ t)\nS_sub : ∀ (n : ℕ), S n ⊆ s \\ t\nhSs : ∀ (n : ℕ), ↑μ (s ∩ t) + ↑μ (S n) ≤ ↑μ s\niUnion_S : ⋃ (n : ℕ), S n = s \\ t\nhtop : ¬↑μ (s \\ t) = ⊤\nr n : ℕ\nthis : ∀ (i j : ℕ), i < j → IsMetricSeparated (S (2 * i + 1 + r)) (s \\ S (2 * j + r))\ni : ℕ\nx✝¹ : i ∈ Finset.range n\nj : ℕ\nx✝ : j ∈ Finset.range n\nhij : i ≠ j\nh : i < j\nx : X\nhx : x ∈ S (2 * j + 1 + r) \\ S (2 * j + r)\n⊢ x ∈ s \\ S (2 * j + r)\n[PROOFSTEP]\nexact ⟨hx.1.1, hx.2⟩\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nμ : OuterMeasure X\nhm : IsMetric μ\nt : Set X\nht : t ∈ {s | IsClosed s}\ns : Set X\nS : ℕ → Set X := fun n => {x | x ∈ s ∧ (↑n)⁻¹ ≤ infEdist x t}\nn0 : ∀ {n : ℕ}, (↑n)⁻¹ ≠ 0\nSsep : ∀ (n : ℕ), IsMetricSeparated (S n) t\nSsep' : ∀ (n : ℕ), IsMetricSeparated (S n) (s ∩ t)\nS_sub : ∀ (n : ℕ), S n ⊆ s \\ t\nhSs : ∀ (n : ℕ), ↑μ (s ∩ t) + ↑μ (S n) ≤ ↑μ s\niUnion_S : ⋃ (n : ℕ), S n = s \\ t\nhtop : ¬↑μ (s \\ t) = ⊤\nr n : ℕ\nthis : ∀ (i j : ℕ), i < j → IsMetricSeparated (S (2 * i + 1 + r)) (s \\ S (2 * j + r))\ni : ℕ\nx✝¹ : i ∈ Finset.range n\nj : ℕ\nx✝ : j ∈ Finset.range n\nhij : i ≠ j\nh : j < i\nx : X\nhx : x ∈ S (2 * i + 1 + r) \\ S (2 * i + r)\n⊢ x ∈ s \\ S (2 * i + r)\n[PROOFSTEP]\nexact ⟨hx.1.1, hx.2⟩\n[GOAL]\ncase this\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nμ : OuterMeasure X\nhm : IsMetric μ\nt : Set X\nht : t ∈ {s | IsClosed s}\ns : Set X\nS : ℕ → Set X := fun n => {x | x ∈ s ∧ (↑n)⁻¹ ≤ infEdist x t}\nn0 : ∀ {n : ℕ}, (↑n)⁻¹ ≠ 0\nSsep : ∀ (n : ℕ), IsMetricSeparated (S n) t\nSsep' : ∀ (n : ℕ), IsMetricSeparated (S n) (s ∩ t)\nS_sub : ∀ (n : ℕ), S n ⊆ s \\ t\nhSs : ∀ (n : ℕ), ↑μ (s ∩ t) + ↑μ (S n) ≤ ↑μ s\niUnion_S : ⋃ (n : ℕ), S n = s \\ t\nhtop : ¬↑μ (s \\ t) = ⊤\nr n : ℕ\n⊢ ∀ (i j : ℕ), i < j → IsMetricSeparated (S (2 * i + 1 + r)) (s \\ S (2 * j + r))\n[PROOFSTEP]\nintro i j hj\n[GOAL]\ncase this\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nμ : OuterMeasure X\nhm : IsMetric μ\nt : Set X\nht : t ∈ {s | IsClosed s}\ns : Set X\nS : ℕ → Set X := fun n => {x | x ∈ s ∧ (↑n)⁻¹ ≤ infEdist x t}\nn0 : ∀ {n : ℕ}, (↑n)⁻¹ ≠ 0\nSsep : ∀ (n : ℕ), IsMetricSeparated (S n) t\nSsep' : ∀ (n : ℕ), IsMetricSeparated (S n) (s ∩ t)\nS_sub : ∀ (n : ℕ), S n ⊆ s \\ t\nhSs : ∀ (n : ℕ), ↑μ (s ∩ t) + ↑μ (S n) ≤ ↑μ s\niUnion_S : ⋃ (n : ℕ), S n = s \\ t\nhtop : ¬↑μ (s \\ t) = ⊤\nr n i j : ℕ\nhj : i < j\n⊢ IsMetricSeparated (S (2 * i + 1 + r)) (s \\ S (2 * j + r))\n[PROOFSTEP]\nhave A : ((↑(2 * j + r))⁻¹ : ℝ≥0∞) < (↑(2 * i + 1 + r))⁻¹ := by rw [ENNReal.inv_lt_inv, Nat.cast_lt]; linarith\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nμ : OuterMeasure X\nhm : IsMetric μ\nt : Set X\nht : t ∈ {s | IsClosed s}\ns : Set X\nS : ℕ → Set X := fun n => {x | x ∈ s ∧ (↑n)⁻¹ ≤ infEdist x t}\nn0 : ∀ {n : ℕ}, (↑n)⁻¹ ≠ 0\nSsep : ∀ (n : ℕ), IsMetricSeparated (S n) t\nSsep' : ∀ (n : ℕ), IsMetricSeparated (S n) (s ∩ t)\nS_sub : ∀ (n : ℕ), S n ⊆ s \\ t\nhSs : ∀ (n : ℕ), ↑μ (s ∩ t) + ↑μ (S n) ≤ ↑μ s\niUnion_S : ⋃ (n : ℕ), S n = s \\ t\nhtop : ¬↑μ (s \\ t) = ⊤\nr n i j : ℕ\nhj : i < j\n⊢ (↑(2 * j + r))⁻¹ < (↑(2 * i + 1 + r))⁻¹\n[PROOFSTEP]\nrw [ENNReal.inv_lt_inv, Nat.cast_lt]\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nμ : OuterMeasure X\nhm : IsMetric μ\nt : Set X\nht : t ∈ {s | IsClosed s}\ns : Set X\nS : ℕ → Set X := fun n => {x | x ∈ s ∧ (↑n)⁻¹ ≤ infEdist x t}\nn0 : ∀ {n : ℕ}, (↑n)⁻¹ ≠ 0\nSsep : ∀ (n : ℕ), IsMetricSeparated (S n) t\nSsep' : ∀ (n : ℕ), IsMetricSeparated (S n) (s ∩ t)\nS_sub : ∀ (n : ℕ), S n ⊆ s \\ t\nhSs : ∀ (n : ℕ), ↑μ (s ∩ t) + ↑μ (S n) ≤ ↑μ s\niUnion_S : ⋃ (n : ℕ), S n = s \\ t\nhtop : ¬↑μ (s \\ t) = ⊤\nr n i j : ℕ\nhj : i < j\n⊢ 2 * i + 1 + r < 2 * j + r\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase this\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nμ : OuterMeasure X\nhm : IsMetric μ\nt : Set X\nht : t ∈ {s | IsClosed s}\ns : Set X\nS : ℕ → Set X := fun n => {x | x ∈ s ∧ (↑n)⁻¹ ≤ infEdist x t}\nn0 : ∀ {n : ℕ}, (↑n)⁻¹ ≠ 0\nSsep : ∀ (n : ℕ), IsMetricSeparated (S n) t\nSsep' : ∀ (n : ℕ), IsMetricSeparated (S n) (s ∩ t)\nS_sub : ∀ (n : ℕ), S n ⊆ s \\ t\nhSs : ∀ (n : ℕ), ↑μ (s ∩ t) + ↑μ (S n) ≤ ↑μ s\niUnion_S : ⋃ (n : ℕ), S n = s \\ t\nhtop : ¬↑μ (s \\ t) = ⊤\nr n i j : ℕ\nhj : i < j\nA : (↑(2 * j + r))⁻¹ < (↑(2 * i + 1 + r))⁻¹\n⊢ IsMetricSeparated (S (2 * i + 1 + r)) (s \\ S (2 * j + r))\n[PROOFSTEP]\nrefine' ⟨(↑(2 * i + 1 + r))⁻¹ - (↑(2 * j + r))⁻¹, by simpa using A, fun x hx y hy => _⟩\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nμ : OuterMeasure X\nhm : IsMetric μ\nt : Set X\nht : t ∈ {s | IsClosed s}\ns : Set X\nS : ℕ → Set X := fun n => {x | x ∈ s ∧ (↑n)⁻¹ ≤ infEdist x t}\nn0 : ∀ {n : ℕ}, (↑n)⁻¹ ≠ 0\nSsep : ∀ (n : ℕ), IsMetricSeparated (S n) t\nSsep' : ∀ (n : ℕ), IsMetricSeparated (S n) (s ∩ t)\nS_sub : ∀ (n : ℕ), S n ⊆ s \\ t\nhSs : ∀ (n : ℕ), ↑μ (s ∩ t) + ↑μ (S n) ≤ ↑μ s\niUnion_S : ⋃ (n : ℕ), S n = s \\ t\nhtop : ¬↑μ (s \\ t) = ⊤\nr n i j : ℕ\nhj : i < j\nA : (↑(2 * j + r))⁻¹ < (↑(2 * i + 1 + r))⁻¹\n⊢ (↑(2 * i + 1 + r))⁻¹ - (↑(2 * j + r))⁻¹ ≠ 0\n[PROOFSTEP]\nsimpa using A\n[GOAL]\ncase this\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nμ : OuterMeasure X\nhm : IsMetric μ\nt : Set X\nht : t ∈ {s | IsClosed s}\ns : Set X\nS : ℕ → Set X := fun n => {x | x ∈ s ∧ (↑n)⁻¹ ≤ infEdist x t}\nn0 : ∀ {n : ℕ}, (↑n)⁻¹ ≠ 0\nSsep : ∀ (n : ℕ), IsMetricSeparated (S n) t\nSsep' : ∀ (n : ℕ), IsMetricSeparated (S n) (s ∩ t)\nS_sub : ∀ (n : ℕ), S n ⊆ s \\ t\nhSs : ∀ (n : ℕ), ↑μ (s ∩ t) + ↑μ (S n) ≤ ↑μ s\niUnion_S : ⋃ (n : ℕ), S n = s \\ t\nhtop : ¬↑μ (s \\ t) = ⊤\nr n i j : ℕ\nhj : i < j\nA : (↑(2 * j + r))⁻¹ < (↑(2 * i + 1 + r))⁻¹\nx : X\nhx : x ∈ S (2 * i + 1 + r)\ny : X\nhy : y ∈ s \\ S (2 * j + r)\n⊢ (↑(2 * i + 1 + r))⁻¹ - (↑(2 * j + r))⁻¹ ≤ edist x y\n[PROOFSTEP]\nhave : infEdist y t < (↑(2 * j + r))⁻¹ := not_le.1 fun hle => hy.2 ⟨hy.1, hle⟩\n[GOAL]\ncase this\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nμ : OuterMeasure X\nhm : IsMetric μ\nt : Set X\nht : t ∈ {s | IsClosed s}\ns : Set X\nS : ℕ → Set X := fun n => {x | x ∈ s ∧ (↑n)⁻¹ ≤ infEdist x t}\nn0 : ∀ {n : ℕ}, (↑n)⁻¹ ≠ 0\nSsep : ∀ (n : ℕ), IsMetricSeparated (S n) t\nSsep' : ∀ (n : ℕ), IsMetricSeparated (S n) (s ∩ t)\nS_sub : ∀ (n : ℕ), S n ⊆ s \\ t\nhSs : ∀ (n : ℕ), ↑μ (s ∩ t) + ↑μ (S n) ≤ ↑μ s\niUnion_S : ⋃ (n : ℕ), S n = s \\ t\nhtop : ¬↑μ (s \\ t) = ⊤\nr n i j : ℕ\nhj : i < j\nA : (↑(2 * j + r))⁻¹ < (↑(2 * i + 1 + r))⁻¹\nx : X\nhx : x ∈ S (2 * i + 1 + r)\ny : X\nhy : y ∈ s \\ S (2 * j + r)\nthis : infEdist y t < (↑(2 * j + r))⁻¹\n⊢ (↑(2 * i + 1 + r))⁻¹ - (↑(2 * j + r))⁻¹ ≤ edist x y\n[PROOFSTEP]\nrcases infEdist_lt_iff.mp this with ⟨z, hzt, hyz⟩\n[GOAL]\ncase this.intro.intro\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nμ : OuterMeasure X\nhm : IsMetric μ\nt : Set X\nht : t ∈ {s | IsClosed s}\ns : Set X\nS : ℕ → Set X := fun n => {x | x ∈ s ∧ (↑n)⁻¹ ≤ infEdist x t}\nn0 : ∀ {n : ℕ}, (↑n)⁻¹ ≠ 0\nSsep : ∀ (n : ℕ), IsMetricSeparated (S n) t\nSsep' : ∀ (n : ℕ), IsMetricSeparated (S n) (s ∩ t)\nS_sub : ∀ (n : ℕ), S n ⊆ s \\ t\nhSs : ∀ (n : ℕ), ↑μ (s ∩ t) + ↑μ (S n) ≤ ↑μ s\niUnion_S : ⋃ (n : ℕ), S n = s \\ t\nhtop : ¬↑μ (s \\ t) = ⊤\nr n i j : ℕ\nhj : i < j\nA : (↑(2 * j + r))⁻¹ < (↑(2 * i + 1 + r))⁻¹\nx : X\nhx : x ∈ S (2 * i + 1 + r)\ny : X\nhy : y ∈ s \\ S (2 * j + r)\nthis : infEdist y t < (↑(2 * j + r))⁻¹\nz : X\nhzt : z ∈ t\nhyz : edist y z < (↑(2 * j + r))⁻¹\n⊢ (↑(2 * i + 1 + r))⁻¹ - (↑(2 * j + r))⁻¹ ≤ edist x y\n[PROOFSTEP]\nhave hxz : (↑(2 * i + 1 + r))⁻¹ ≤ edist x z := le_infEdist.1 hx.2 _ hzt\n[GOAL]\ncase this.intro.intro\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nμ : OuterMeasure X\nhm : IsMetric μ\nt : Set X\nht : t ∈ {s | IsClosed s}\ns : Set X\nS : ℕ → Set X := fun n => {x | x ∈ s ∧ (↑n)⁻¹ ≤ infEdist x t}\nn0 : ∀ {n : ℕ}, (↑n)⁻¹ ≠ 0\nSsep : ∀ (n : ℕ), IsMetricSeparated (S n) t\nSsep' : ∀ (n : ℕ), IsMetricSeparated (S n) (s ∩ t)\nS_sub : ∀ (n : ℕ), S n ⊆ s \\ t\nhSs : ∀ (n : ℕ), ↑μ (s ∩ t) + ↑μ (S n) ≤ ↑μ s\niUnion_S : ⋃ (n : ℕ), S n = s \\ t\nhtop : ¬↑μ (s \\ t) = ⊤\nr n i j : ℕ\nhj : i < j\nA : (↑(2 * j + r))⁻¹ < (↑(2 * i + 1 + r))⁻¹\nx : X\nhx : x ∈ S (2 * i + 1 + r)\ny : X\nhy : y ∈ s \\ S (2 * j + r)\nthis : infEdist y t < (↑(2 * j + r))⁻¹\nz : X\nhzt : z ∈ t\nhyz : edist y z < (↑(2 * j + r))⁻¹\nhxz : (↑(2 * i + 1 + r))⁻¹ ≤ edist x z\n⊢ (↑(2 * i + 1 + r))⁻¹ - (↑(2 * j + r))⁻¹ ≤ edist x y\n[PROOFSTEP]\napply ENNReal.le_of_add_le_add_right hyz.ne_top\n[GOAL]\ncase this.intro.intro\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nμ : OuterMeasure X\nhm : IsMetric μ\nt : Set X\nht : t ∈ {s | IsClosed s}\ns : Set X\nS : ℕ → Set X := fun n => {x | x ∈ s ∧ (↑n)⁻¹ ≤ infEdist x t}\nn0 : ∀ {n : ℕ}, (↑n)⁻¹ ≠ 0\nSsep : ∀ (n : ℕ), IsMetricSeparated (S n) t\nSsep' : ∀ (n : ℕ), IsMetricSeparated (S n) (s ∩ t)\nS_sub : ∀ (n : ℕ), S n ⊆ s \\ t\nhSs : ∀ (n : ℕ), ↑μ (s ∩ t) + ↑μ (S n) ≤ ↑μ s\niUnion_S : ⋃ (n : ℕ), S n = s \\ t\nhtop : ¬↑μ (s \\ t) = ⊤\nr n i j : ℕ\nhj : i < j\nA : (↑(2 * j + r))⁻¹ < (↑(2 * i + 1 + r))⁻¹\nx : X\nhx : x ∈ S (2 * i + 1 + r)\ny : X\nhy : y ∈ s \\ S (2 * j + r)\nthis : infEdist y t < (↑(2 * j + r))⁻¹\nz : X\nhzt : z ∈ t\nhyz : edist y z < (↑(2 * j + r))⁻¹\nhxz : (↑(2 * i + 1 + r))⁻¹ ≤ edist x z\n⊢ (↑(2 * i + 1 + r))⁻¹ - (↑(2 * j + r))⁻¹ + edist y z ≤ edist x y + edist y z\n[PROOFSTEP]\nrefine' le_trans _ (edist_triangle _ _ _)\n[GOAL]\ncase this.intro.intro\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nμ : OuterMeasure X\nhm : IsMetric μ\nt : Set X\nht : t ∈ {s | IsClosed s}\ns : Set X\nS : ℕ → Set X := fun n => {x | x ∈ s ∧ (↑n)⁻¹ ≤ infEdist x t}\nn0 : ∀ {n : ℕ}, (↑n)⁻¹ ≠ 0\nSsep : ∀ (n : ℕ), IsMetricSeparated (S n) t\nSsep' : ∀ (n : ℕ), IsMetricSeparated (S n) (s ∩ t)\nS_sub : ∀ (n : ℕ), S n ⊆ s \\ t\nhSs : ∀ (n : ℕ), ↑μ (s ∩ t) + ↑μ (S n) ≤ ↑μ s\niUnion_S : ⋃ (n : ℕ), S n = s \\ t\nhtop : ¬↑μ (s \\ t) = ⊤\nr n i j : ℕ\nhj : i < j\nA : (↑(2 * j + r))⁻¹ < (↑(2 * i + 1 + r))⁻¹\nx : X\nhx : x ∈ S (2 * i + 1 + r)\ny : X\nhy : y ∈ s \\ S (2 * j + r)\nthis : infEdist y t < (↑(2 * j + r))⁻¹\nz : X\nhzt : z ∈ t\nhyz : edist y z < (↑(2 * j + r))⁻¹\nhxz : (↑(2 * i + 1 + r))⁻¹ ≤ edist x z\n⊢ (↑(2 * i + 1 + r))⁻¹ - (↑(2 * j + r))⁻¹ + edist y z ≤ edist x z\n[PROOFSTEP]\nrefine' (add_le_add le_rfl hyz.le).trans (Eq.trans_le _ hxz)\n[GOAL]\ncase this.intro.intro\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nμ : OuterMeasure X\nhm : IsMetric μ\nt : Set X\nht : t ∈ {s | IsClosed s}\ns : Set X\nS : ℕ → Set X := fun n => {x | x ∈ s ∧ (↑n)⁻¹ ≤ infEdist x t}\nn0 : ∀ {n : ℕ}, (↑n)⁻¹ ≠ 0\nSsep : ∀ (n : ℕ), IsMetricSeparated (S n) t\nSsep' : ∀ (n : ℕ), IsMetricSeparated (S n) (s ∩ t)\nS_sub : ∀ (n : ℕ), S n ⊆ s \\ t\nhSs : ∀ (n : ℕ), ↑μ (s ∩ t) + ↑μ (S n) ≤ ↑μ s\niUnion_S : ⋃ (n : ℕ), S n = s \\ t\nhtop : ¬↑μ (s \\ t) = ⊤\nr n i j : ℕ\nhj : i < j\nA : (↑(2 * j + r))⁻¹ < (↑(2 * i + 1 + r))⁻¹\nx : X\nhx : x ∈ S (2 * i + 1 + r)\ny : X\nhy : y ∈ s \\ S (2 * j + r)\nthis : infEdist y t < (↑(2 * j + r))⁻¹\nz : X\nhzt : z ∈ t\nhyz : edist y z < (↑(2 * j + r))⁻¹\nhxz : (↑(2 * i + 1 + r))⁻¹ ≤ edist x z\n⊢ (↑(2 * i + 1 + r))⁻¹ - (↑(2 * j + r))⁻¹ + (↑(2 * j + r))⁻¹ = (↑(2 * i + 1 + r))⁻¹\n[PROOFSTEP]\nrw [tsub_add_cancel_of_le A.le]\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\nμ : OuterMeasure X\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\nhm : IsMetric μ\n⊢ inst✝¹ ≤ OuterMeasure.caratheodory μ\n[PROOFSTEP]\nrw [BorelSpace.measurable_eq (α := X)]\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\nμ : OuterMeasure X\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\nhm : IsMetric μ\n⊢ borel X ≤ OuterMeasure.caratheodory μ\n[PROOFSTEP]\nexact hm.borel_le_caratheodory\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nm : Set X → ℝ≥0∞\nr : ℝ≥0∞\nμ : OuterMeasure X\ns : Set X\n⊢ μ ≤ pre m r ↔ ∀ (s : Set X), diam s ≤ r → ↑μ s ≤ m s\n[PROOFSTEP]\nsimp only [pre, le_boundedBy, extend, le_iInf_iff]\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nm✝ : Set X → ℝ≥0∞\nr : ℝ≥0∞\nμ : OuterMeasure X\ns✝ : Set X\nm : Set X → ℝ≥0∞\nk l : ℕ\nh : k ≤ l\ns : Set X\nhs : diam s ≤ (↑l)⁻¹\n⊢ (↑l)⁻¹ ≤ (↑k)⁻¹\n[PROOFSTEP]\nsimpa\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nm✝ : Set X → ℝ≥0∞\nr : ℝ≥0∞\nμ : OuterMeasure X\ns✝ : Set X\nm : Set X → ℝ≥0∞\ns : Set X\n⊢ Tendsto (fun r => ↑(pre m r) s) (𝓝[Ioi 0] 0) (𝓝 (↑(mkMetric' m) s))\n[PROOFSTEP]\nrw [← map_coe_Ioi_atBot, tendsto_map'_iff]\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nm✝ : Set X → ℝ≥0∞\nr : ℝ≥0∞\nμ : OuterMeasure X\ns✝ : Set X\nm : Set X → ℝ≥0∞\ns : Set X\n⊢ Tendsto ((fun r => ↑(pre m r) s) ∘ Subtype.val) atBot (𝓝 (↑(mkMetric' m) s))\n[PROOFSTEP]\nsimp only [mkMetric', OuterMeasure.iSup_apply, iSup_subtype']\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nm✝ : Set X → ℝ≥0∞\nr : ℝ≥0∞\nμ : OuterMeasure X\ns✝ : Set X\nm : Set X → ℝ≥0∞\ns : Set X\n⊢ Tendsto ((fun r => ↑(pre m r) s) ∘ Subtype.val) atBot (𝓝 (⨆ (i : { i // i > 0 }), ↑(pre m ↑i) s))\n[PROOFSTEP]\nexact tendsto_atBot_iSup fun r r' hr => mono_pre _ hr _\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nm✝ : Set X → ℝ≥0∞\nr : ℝ≥0∞\nμ : OuterMeasure X\ns✝ : Set X\nm : Set X → ℝ≥0∞\ns : Set X\n⊢ Tendsto (fun n => ↑(pre m (↑n)⁻¹) s) atTop (𝓝 (↑(mkMetric' m) s))\n[PROOFSTEP]\nrefine' (tendsto_pre m s).comp (tendsto_inf.2 ⟨ENNReal.tendsto_inv_nat_nhds_zero, _⟩)\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nm✝ : Set X → ℝ≥0∞\nr : ℝ≥0∞\nμ : OuterMeasure X\ns✝ : Set X\nm : Set X → ℝ≥0∞\ns : Set X\n⊢ Tendsto (fun n => (↑n)⁻¹) atTop (𝓟 (Ioi 0))\n[PROOFSTEP]\nrefine' tendsto_principal.2 (eventually_of_forall fun n => _)\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nm✝ : Set X → ℝ≥0∞\nr : ℝ≥0∞\nμ : OuterMeasure X\ns✝ : Set X\nm : Set X → ℝ≥0∞\ns : Set X\nn : ℕ\n⊢ (↑n)⁻¹ ∈ Ioi 0\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nm✝ : Set X → ℝ≥0∞\nr : ℝ≥0∞\nμ : OuterMeasure X\ns : Set X\nm : Set X → ℝ≥0∞\n⊢ mkMetric' m = ⨆ (n : ℕ), pre m (↑n)⁻¹\n[PROOFSTEP]\next1 s\n[GOAL]\ncase h\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nm✝ : Set X → ℝ≥0∞\nr : ℝ≥0∞\nμ : OuterMeasure X\ns✝ : Set X\nm : Set X → ℝ≥0∞\ns : Set X\n⊢ ↑(mkMetric' m) s = ↑(⨆ (n : ℕ), pre m (↑n)⁻¹) s\n[PROOFSTEP]\nrw [iSup_apply]\n[GOAL]\ncase h\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nm✝ : Set X → ℝ≥0∞\nr : ℝ≥0∞\nμ : OuterMeasure X\ns✝ : Set X\nm : Set X → ℝ≥0∞\ns : Set X\n⊢ ↑(mkMetric' m) s = ⨆ (i : ℕ), ↑(pre m (↑i)⁻¹) s\n[PROOFSTEP]\nrefine'\n  tendsto_nhds_unique (mkMetric'.tendsto_pre_nat m s) (tendsto_atTop_iSup fun k l hkl => mkMetric'.mono_pre_nat m hkl s)\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\nm✝ : Set X → ℝ≥0∞\nr✝ : ℝ≥0∞\nμ : OuterMeasure X\ns : Set X\ninst✝¹ : MeasurableSpace X\ninst✝ : OpensMeasurableSpace X\nm : Set X → ℝ≥0∞\nhcl : ∀ (s : Set X), m (closure s) = m s\nr : ℝ≥0∞\n⊢ trim (pre m r) = pre m r\n[PROOFSTEP]\nrefine' le_antisymm (le_pre.2 fun s hs => _) (le_trim _)\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\nm✝ : Set X → ℝ≥0∞\nr✝ : ℝ≥0∞\nμ : OuterMeasure X\ns✝ : Set X\ninst✝¹ : MeasurableSpace X\ninst✝ : OpensMeasurableSpace X\nm : Set X → ℝ≥0∞\nhcl : ∀ (s : Set X), m (closure s) = m s\nr : ℝ≥0∞\ns : Set X\nhs : diam s ≤ r\n⊢ ↑(trim (pre m r)) s ≤ m s\n[PROOFSTEP]\nrw [trim_eq_iInf]\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\nm✝ : Set X → ℝ≥0∞\nr✝ : ℝ≥0∞\nμ : OuterMeasure X\ns✝ : Set X\ninst✝¹ : MeasurableSpace X\ninst✝ : OpensMeasurableSpace X\nm : Set X → ℝ≥0∞\nhcl : ∀ (s : Set X), m (closure s) = m s\nr : ℝ≥0∞\ns : Set X\nhs : diam s ≤ r\n⊢ ⨅ (t : Set X) (_ : s ⊆ t) (_ : MeasurableSet t), ↑(pre m r) t ≤ m s\n[PROOFSTEP]\nrefine'\n  iInf_le_of_le (closure s) <|\n    iInf_le_of_le subset_closure <| iInf_le_of_le measurableSet_closure ((pre_le _).trans_eq (hcl _))\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\nm✝ : Set X → ℝ≥0∞\nr✝ : ℝ≥0∞\nμ : OuterMeasure X\ns✝ : Set X\ninst✝¹ : MeasurableSpace X\ninst✝ : OpensMeasurableSpace X\nm : Set X → ℝ≥0∞\nhcl : ∀ (s : Set X), m (closure s) = m s\nr : ℝ≥0∞\ns : Set X\nhs : diam s ≤ r\n⊢ diam (closure s) ≤ r\n[PROOFSTEP]\nrwa [diam_closure]\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nm : Set X → ℝ≥0∞\n⊢ IsMetric (mkMetric' m)\n[PROOFSTEP]\nrintro s t ⟨r, r0, hr⟩\n[GOAL]\ncase intro.intro\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nm : Set X → ℝ≥0∞\ns t : Set X\nr : ℝ≥0∞\nr0 : r ≠ 0\nhr : ∀ (x : X), x ∈ s → ∀ (y : X), y ∈ t → r ≤ edist x y\n⊢ ↑(mkMetric' m) (s ∪ t) = ↑(mkMetric' m) s + ↑(mkMetric' m) t\n[PROOFSTEP]\nrefine'\n  tendsto_nhds_unique_of_eventuallyEq (mkMetric'.tendsto_pre _ _)\n    ((mkMetric'.tendsto_pre _ _).add (mkMetric'.tendsto_pre _ _)) _\n[GOAL]\ncase intro.intro\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nm : Set X → ℝ≥0∞\ns t : Set X\nr : ℝ≥0∞\nr0 : r ≠ 0\nhr : ∀ (x : X), x ∈ s → ∀ (y : X), y ∈ t → r ≤ edist x y\n⊢ (fun r => ↑(mkMetric'.pre m r) (s ∪ t)) =ᶠ[𝓝[Ioi 0] 0] fun x => ↑(mkMetric'.pre m x) s + ↑(mkMetric'.pre m x) t\n[PROOFSTEP]\nrw [← pos_iff_ne_zero] at r0 \n[GOAL]\ncase intro.intro\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nm : Set X → ℝ≥0∞\ns t : Set X\nr : ℝ≥0∞\nr0 : 0 < r\nhr : ∀ (x : X), x ∈ s → ∀ (y : X), y ∈ t → r ≤ edist x y\n⊢ (fun r => ↑(mkMetric'.pre m r) (s ∪ t)) =ᶠ[𝓝[Ioi 0] 0] fun x => ↑(mkMetric'.pre m x) s + ↑(mkMetric'.pre m x) t\n[PROOFSTEP]\nfilter_upwards [Ioo_mem_nhdsWithin_Ioi ⟨le_rfl, r0⟩]\n[GOAL]\ncase h\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nm : Set X → ℝ≥0∞\ns t : Set X\nr : ℝ≥0∞\nr0 : 0 < r\nhr : ∀ (x : X), x ∈ s → ∀ (y : X), y ∈ t → r ≤ edist x y\n⊢ ∀ (a : ℝ≥0∞), a ∈ Ioo 0 r → ↑(mkMetric'.pre m a) (s ∪ t) = ↑(mkMetric'.pre m a) s + ↑(mkMetric'.pre m a) t\n[PROOFSTEP]\nrintro ε ⟨_, εr⟩\n[GOAL]\ncase h.intro\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nm : Set X → ℝ≥0∞\ns t : Set X\nr : ℝ≥0∞\nr0 : 0 < r\nhr : ∀ (x : X), x ∈ s → ∀ (y : X), y ∈ t → r ≤ edist x y\nε : ℝ≥0∞\nleft✝ : 0 < ε\nεr : ε < r\n⊢ ↑(mkMetric'.pre m ε) (s ∪ t) = ↑(mkMetric'.pre m ε) s + ↑(mkMetric'.pre m ε) t\n[PROOFSTEP]\nrefine' boundedBy_union_of_top_of_nonempty_inter _\n[GOAL]\ncase h.intro\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nm : Set X → ℝ≥0∞\ns t : Set X\nr : ℝ≥0∞\nr0 : 0 < r\nhr : ∀ (x : X), x ∈ s → ∀ (y : X), y ∈ t → r ≤ edist x y\nε : ℝ≥0∞\nleft✝ : 0 < ε\nεr : ε < r\n⊢ ∀ (u : Set X), Set.Nonempty (s ∩ u) → Set.Nonempty (t ∩ u) → extend (fun s x => m s) u = ⊤\n[PROOFSTEP]\nrintro u ⟨x, hxs, hxu⟩ ⟨y, hyt, hyu⟩\n[GOAL]\ncase h.intro.intro.intro.intro.intro\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nm : Set X → ℝ≥0∞\ns t : Set X\nr : ℝ≥0∞\nr0 : 0 < r\nhr : ∀ (x : X), x ∈ s → ∀ (y : X), y ∈ t → r ≤ edist x y\nε : ℝ≥0∞\nleft✝ : 0 < ε\nεr : ε < r\nu : Set X\nx : X\nhxs : x ∈ s\nhxu : x ∈ u\ny : X\nhyt : y ∈ t\nhyu : y ∈ u\n⊢ extend (fun s x => m s) u = ⊤\n[PROOFSTEP]\nhave : ε < diam u := εr.trans_le ((hr x hxs y hyt).trans <| edist_le_diam_of_mem hxu hyu)\n[GOAL]\ncase h.intro.intro.intro.intro.intro\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nm : Set X → ℝ≥0∞\ns t : Set X\nr : ℝ≥0∞\nr0 : 0 < r\nhr : ∀ (x : X), x ∈ s → ∀ (y : X), y ∈ t → r ≤ edist x y\nε : ℝ≥0∞\nleft✝ : 0 < ε\nεr : ε < r\nu : Set X\nx : X\nhxs : x ∈ s\nhxu : x ∈ u\ny : X\nhyt : y ∈ t\nhyu : y ∈ u\nthis : ε < diam u\n⊢ extend (fun s x => m s) u = ⊤\n[PROOFSTEP]\nexact iInf_eq_top.2 fun h => (this.not_le h).elim\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nm₁ m₂ : ℝ≥0∞ → ℝ≥0∞\nc : ℝ≥0∞\nhc : c ≠ ⊤\nh0 : c ≠ 0\nhle : m₁ ≤ᶠ[𝓝[Ici 0] 0] c • m₂\n⊢ mkMetric m₁ ≤ c • mkMetric m₂\n[PROOFSTEP]\nclassical\nrcases(mem_nhdsWithin_Ici_iff_exists_Ico_subset' zero_lt_one).1 hle with ⟨r, hr0, hr⟩\nrefine' fun s =>\n  le_of_tendsto_of_tendsto (mkMetric'.tendsto_pre _ s)\n    (ENNReal.Tendsto.const_mul (mkMetric'.tendsto_pre _ s) (Or.inr hc))\n    (mem_of_superset (Ioo_mem_nhdsWithin_Ioi ⟨le_rfl, hr0⟩) fun r' hr' => _)\nsimp only [mem_setOf_eq, mkMetric'.pre, RingHom.id_apply]\nrw [← smul_eq_mul, ← smul_apply, smul_boundedBy hc]\nrefine' le_boundedBy.2 (fun t => (boundedBy_le _).trans _) _\nsimp only [smul_eq_mul, Pi.smul_apply, extend, iInf_eq_if]\nsplit_ifs with ht\n· apply hr\n  exact ⟨zero_le _, ht.trans_lt hr'.2⟩\n· simp [h0]\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nm₁ m₂ : ℝ≥0∞ → ℝ≥0∞\nc : ℝ≥0∞\nhc : c ≠ ⊤\nh0 : c ≠ 0\nhle : m₁ ≤ᶠ[𝓝[Ici 0] 0] c • m₂\n⊢ mkMetric m₁ ≤ c • mkMetric m₂\n[PROOFSTEP]\nrcases(mem_nhdsWithin_Ici_iff_exists_Ico_subset' zero_lt_one).1 hle with ⟨r, hr0, hr⟩\n[GOAL]\ncase intro.intro\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nm₁ m₂ : ℝ≥0∞ → ℝ≥0∞\nc : ℝ≥0∞\nhc : c ≠ ⊤\nh0 : c ≠ 0\nhle : m₁ ≤ᶠ[𝓝[Ici 0] 0] c • m₂\nr : ℝ≥0∞\nhr0 : r ∈ Ioi 0\nhr : Ico 0 r ⊆ {x | (fun x => m₁ x ≤ (c • m₂) x) x}\n⊢ mkMetric m₁ ≤ c • mkMetric m₂\n[PROOFSTEP]\nrefine' fun s =>\n  le_of_tendsto_of_tendsto (mkMetric'.tendsto_pre _ s)\n    (ENNReal.Tendsto.const_mul (mkMetric'.tendsto_pre _ s) (Or.inr hc))\n    (mem_of_superset (Ioo_mem_nhdsWithin_Ioi ⟨le_rfl, hr0⟩) fun r' hr' => _)\n[GOAL]\ncase intro.intro\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nm₁ m₂ : ℝ≥0∞ → ℝ≥0∞\nc : ℝ≥0∞\nhc : c ≠ ⊤\nh0 : c ≠ 0\nhle : m₁ ≤ᶠ[𝓝[Ici 0] 0] c • m₂\nr : ℝ≥0∞\nhr0 : r ∈ Ioi 0\nhr : Ico 0 r ⊆ {x | (fun x => m₁ x ≤ (c • m₂) x) x}\ns : Set X\nr' : ℝ≥0∞\nhr' : r' ∈ Ioo 0 r\n⊢ r' ∈\n    {x |\n      (fun x =>\n          (fun r => ↑(mkMetric'.pre (fun s => m₁ (diam s)) r) s) x ≤\n            (fun b => ↑(RingHom.id ℝ≥0∞) c * ↑(mkMetric'.pre (fun s => m₂ (diam s)) b) s) x)\n        x}\n[PROOFSTEP]\nsimp only [mem_setOf_eq, mkMetric'.pre, RingHom.id_apply]\n[GOAL]\ncase intro.intro\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nm₁ m₂ : ℝ≥0∞ → ℝ≥0∞\nc : ℝ≥0∞\nhc : c ≠ ⊤\nh0 : c ≠ 0\nhle : m₁ ≤ᶠ[𝓝[Ici 0] 0] c • m₂\nr : ℝ≥0∞\nhr0 : r ∈ Ioi 0\nhr : Ico 0 r ⊆ {x | (fun x => m₁ x ≤ (c • m₂) x) x}\ns : Set X\nr' : ℝ≥0∞\nhr' : r' ∈ Ioo 0 r\n⊢ ↑(boundedBy (extend fun s x => m₁ (diam s))) s ≤ c * ↑(boundedBy (extend fun s x => m₂ (diam s))) s\n[PROOFSTEP]\nrw [← smul_eq_mul, ← smul_apply, smul_boundedBy hc]\n[GOAL]\ncase intro.intro\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nm₁ m₂ : ℝ≥0∞ → ℝ≥0∞\nc : ℝ≥0∞\nhc : c ≠ ⊤\nh0 : c ≠ 0\nhle : m₁ ≤ᶠ[𝓝[Ici 0] 0] c • m₂\nr : ℝ≥0∞\nhr0 : r ∈ Ioi 0\nhr : Ico 0 r ⊆ {x | (fun x => m₁ x ≤ (c • m₂) x) x}\ns : Set X\nr' : ℝ≥0∞\nhr' : r' ∈ Ioo 0 r\n⊢ ↑(boundedBy (extend fun s x => m₁ (diam s))) s ≤ ↑(boundedBy (c • extend fun s x => m₂ (diam s))) s\n[PROOFSTEP]\nrefine' le_boundedBy.2 (fun t => (boundedBy_le _).trans _) _\n[GOAL]\ncase intro.intro\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nm₁ m₂ : ℝ≥0∞ → ℝ≥0∞\nc : ℝ≥0∞\nhc : c ≠ ⊤\nh0 : c ≠ 0\nhle : m₁ ≤ᶠ[𝓝[Ici 0] 0] c • m₂\nr : ℝ≥0∞\nhr0 : r ∈ Ioi 0\nhr : Ico 0 r ⊆ {x | (fun x => m₁ x ≤ (c • m₂) x) x}\ns : Set X\nr' : ℝ≥0∞\nhr' : r' ∈ Ioo 0 r\nt : Set X\n⊢ extend (fun s x => m₁ (diam s)) t ≤ (c • extend fun s x => m₂ (diam s)) t\n[PROOFSTEP]\nsimp only [smul_eq_mul, Pi.smul_apply, extend, iInf_eq_if]\n[GOAL]\ncase intro.intro\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nm₁ m₂ : ℝ≥0∞ → ℝ≥0∞\nc : ℝ≥0∞\nhc : c ≠ ⊤\nh0 : c ≠ 0\nhle : m₁ ≤ᶠ[𝓝[Ici 0] 0] c • m₂\nr : ℝ≥0∞\nhr0 : r ∈ Ioi 0\nhr : Ico 0 r ⊆ {x | (fun x => m₁ x ≤ (c • m₂) x) x}\ns : Set X\nr' : ℝ≥0∞\nhr' : r' ∈ Ioo 0 r\nt : Set X\n⊢ (if diam t ≤ r' then m₁ (diam t) else ⊤) ≤ c * if diam t ≤ r' then m₂ (diam t) else ⊤\n[PROOFSTEP]\nsplit_ifs with ht\n[GOAL]\ncase pos\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nm₁ m₂ : ℝ≥0∞ → ℝ≥0∞\nc : ℝ≥0∞\nhc : c ≠ ⊤\nh0 : c ≠ 0\nhle : m₁ ≤ᶠ[𝓝[Ici 0] 0] c • m₂\nr : ℝ≥0∞\nhr0 : r ∈ Ioi 0\nhr : Ico 0 r ⊆ {x | (fun x => m₁ x ≤ (c • m₂) x) x}\ns : Set X\nr' : ℝ≥0∞\nhr' : r' ∈ Ioo 0 r\nt : Set X\nht : diam t ≤ r'\n⊢ m₁ (diam t) ≤ c * m₂ (diam t)\n[PROOFSTEP]\napply hr\n[GOAL]\ncase pos.a\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nm₁ m₂ : ℝ≥0∞ → ℝ≥0∞\nc : ℝ≥0∞\nhc : c ≠ ⊤\nh0 : c ≠ 0\nhle : m₁ ≤ᶠ[𝓝[Ici 0] 0] c • m₂\nr : ℝ≥0∞\nhr0 : r ∈ Ioi 0\nhr : Ico 0 r ⊆ {x | (fun x => m₁ x ≤ (c • m₂) x) x}\ns : Set X\nr' : ℝ≥0∞\nhr' : r' ∈ Ioo 0 r\nt : Set X\nht : diam t ≤ r'\n⊢ diam t ∈ Ico 0 r\n[PROOFSTEP]\nexact ⟨zero_le _, ht.trans_lt hr'.2⟩\n[GOAL]\ncase neg\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nm₁ m₂ : ℝ≥0∞ → ℝ≥0∞\nc : ℝ≥0∞\nhc : c ≠ ⊤\nh0 : c ≠ 0\nhle : m₁ ≤ᶠ[𝓝[Ici 0] 0] c • m₂\nr : ℝ≥0∞\nhr0 : r ∈ Ioi 0\nhr : Ico 0 r ⊆ {x | (fun x => m₁ x ≤ (c • m₂) x) x}\ns : Set X\nr' : ℝ≥0∞\nhr' : r' ∈ Ioo 0 r\nt : Set X\nht : ¬diam t ≤ r'\n⊢ ⊤ ≤ c * ⊤\n[PROOFSTEP]\nsimp [h0]\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\n⊢ (mkMetric fun x => ⊤) = ⊤\n[PROOFSTEP]\nsimp_rw [mkMetric, mkMetric', mkMetric'.pre, extend_top, boundedBy_top, eq_top_iff]\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\n⊢ ⊤ ≤ ⨆ (r : ℝ≥0∞) (_ : r > 0), ⊤\n[PROOFSTEP]\nrw [le_iSup_iff]\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\n⊢ ∀ (b : OuterMeasure X), (∀ (i : ℝ≥0∞), ⨆ (_ : i > 0), ⊤ ≤ b) → ⊤ ≤ b\n[PROOFSTEP]\nintro b hb\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nb : OuterMeasure X\nhb : ∀ (i : ℝ≥0∞), ⨆ (_ : i > 0), ⊤ ≤ b\n⊢ ⊤ ≤ b\n[PROOFSTEP]\nsimpa using hb ⊤\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nm₁ m₂ : ℝ≥0∞ → ℝ≥0∞\nhle : m₁ ≤ᶠ[𝓝[Ici 0] 0] m₂\n⊢ mkMetric m₁ ≤ mkMetric m₂\n[PROOFSTEP]\nconvert @mkMetric_mono_smul X _ _ m₂ _ ENNReal.one_ne_top one_ne_zero _\n[GOAL]\ncase h.e'_4\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nm₁ m₂ : ℝ≥0∞ → ℝ≥0∞\nhle : m₁ ≤ᶠ[𝓝[Ici 0] 0] m₂\n⊢ mkMetric m₂ = 1 • mkMetric m₂\n[PROOFSTEP]\nsimp [*]\n[GOAL]\ncase convert_2\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nm₁ m₂ : ℝ≥0∞ → ℝ≥0∞\nhle : m₁ ≤ᶠ[𝓝[Ici 0] 0] m₂\n⊢ m₁ ≤ᶠ[𝓝[Ici 0] 0] 1 • m₂\n[PROOFSTEP]\nsimp [*]\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nm : ℝ≥0∞ → ℝ≥0∞\nf : X → Y\nhf : Isometry f\nH : Monotone m ∨ Surjective f\n⊢ ↑(comap f) (mkMetric m) = mkMetric m\n[PROOFSTEP]\nsimp only [mkMetric, mkMetric', mkMetric'.pre, inducedOuterMeasure, comap_iSup]\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nm : ℝ≥0∞ → ℝ≥0∞\nf : X → Y\nhf : Isometry f\nH : Monotone m ∨ Surjective f\n⊢ ⨆ (i : ℝ≥0∞) (_ : i > 0), ↑(comap f) (boundedBy (extend fun s x => m (diam s))) =\n    ⨆ (r : ℝ≥0∞) (_ : r > 0), boundedBy (extend fun s x => m (diam s))\n[PROOFSTEP]\nrefine' surjective_id.iSup_congr id fun ε => surjective_id.iSup_congr id fun hε => _\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nm : ℝ≥0∞ → ℝ≥0∞\nf : X → Y\nhf : Isometry f\nH : Monotone m ∨ Surjective f\nε : ℝ≥0∞\nhε : id ε > 0\n⊢ ↑(comap f) (boundedBy (extend fun s x => m (diam s))) = boundedBy (extend fun s x => m (diam s))\n[PROOFSTEP]\nrw [comap_boundedBy _ (H.imp _ id)]\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nm : ℝ≥0∞ → ℝ≥0∞\nf : X → Y\nhf : Isometry f\nH : Monotone m ∨ Surjective f\nε : ℝ≥0∞\nhε : id ε > 0\n⊢ (boundedBy fun s => extend (fun s x => m (diam s)) (f '' s)) = boundedBy (extend fun s x => m (diam s))\n[PROOFSTEP]\ncongr with s : 1\n[GOAL]\ncase e_m.h\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nm : ℝ≥0∞ → ℝ≥0∞\nf : X → Y\nhf : Isometry f\nH : Monotone m ∨ Surjective f\nε : ℝ≥0∞\nhε : id ε > 0\ns : Set X\n⊢ extend (fun s x => m (diam s)) (f '' s) = extend (fun s x => m (diam s)) s\n[PROOFSTEP]\napply extend_congr\n[GOAL]\ncase e_m.h.hP\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nm : ℝ≥0∞ → ℝ≥0∞\nf : X → Y\nhf : Isometry f\nH : Monotone m ∨ Surjective f\nε : ℝ≥0∞\nhε : id ε > 0\ns : Set X\n⊢ diam (f '' s) ≤ ε ↔ diam s ≤ id ε\n[PROOFSTEP]\nsimp [hf.ediam_image]\n[GOAL]\ncase e_m.h.hm\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nm : ℝ≥0∞ → ℝ≥0∞\nf : X → Y\nhf : Isometry f\nH : Monotone m ∨ Surjective f\nε : ℝ≥0∞\nhε : id ε > 0\ns : Set X\n⊢ diam (f '' s) ≤ ε → diam s ≤ id ε → m (diam (f '' s)) = m (diam s)\n[PROOFSTEP]\nintros\n[GOAL]\ncase e_m.h.hm\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nm : ℝ≥0∞ → ℝ≥0∞\nf : X → Y\nhf : Isometry f\nH : Monotone m ∨ Surjective f\nε : ℝ≥0∞\nhε : id ε > 0\ns : Set X\nha✝ : diam (f '' s) ≤ ε\nhb✝ : diam s ≤ id ε\n⊢ m (diam (f '' s)) = m (diam s)\n[PROOFSTEP]\nsimp [hf.injective.subsingleton_image_iff, hf.ediam_image]\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nm : ℝ≥0∞ → ℝ≥0∞\nf : X → Y\nhf : Isometry f\nH : Monotone m ∨ Surjective f\nε : ℝ≥0∞\nhε : id ε > 0\n⊢ Monotone m → Monotone fun s => extend (fun s x => m (diam s)) ↑s\n[PROOFSTEP]\nintro h_mono s t hst\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nm : ℝ≥0∞ → ℝ≥0∞\nf : X → Y\nhf : Isometry f\nH : Monotone m ∨ Surjective f\nε : ℝ≥0∞\nhε : id ε > 0\nh_mono : Monotone m\ns t : { s // Set.Nonempty s }\nhst : s ≤ t\n⊢ (fun s => extend (fun s x => m (diam s)) ↑s) s ≤ (fun s => extend (fun s x => m (diam s)) ↑s) t\n[PROOFSTEP]\nsimp only [extend, le_iInf_iff]\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nm : ℝ≥0∞ → ℝ≥0∞\nf : X → Y\nhf : Isometry f\nH : Monotone m ∨ Surjective f\nε : ℝ≥0∞\nhε : id ε > 0\nh_mono : Monotone m\ns t : { s // Set.Nonempty s }\nhst : s ≤ t\n⊢ diam ↑t ≤ ε → ⨅ (_ : diam ↑s ≤ ε), m (diam ↑s) ≤ m (diam ↑t)\n[PROOFSTEP]\nintro ht\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nm : ℝ≥0∞ → ℝ≥0∞\nf : X → Y\nhf : Isometry f\nH : Monotone m ∨ Surjective f\nε : ℝ≥0∞\nhε : id ε > 0\nh_mono : Monotone m\ns t : { s // Set.Nonempty s }\nhst : s ≤ t\nht : diam ↑t ≤ ε\n⊢ ⨅ (_ : diam ↑s ≤ ε), m (diam ↑s) ≤ m (diam ↑t)\n[PROOFSTEP]\napply le_trans _ (h_mono (diam_mono hst))\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nm : ℝ≥0∞ → ℝ≥0∞\nf : X → Y\nhf : Isometry f\nH : Monotone m ∨ Surjective f\nε : ℝ≥0∞\nhε : id ε > 0\nh_mono : Monotone m\ns t : { s // Set.Nonempty s }\nhst : s ≤ t\nht : diam ↑t ≤ ε\n⊢ ⨅ (_ : diam ↑s ≤ ε), m (diam ↑s) ≤ m (diam ((fun a => ↑a) s))\n[PROOFSTEP]\nsimp only [(diam_mono hst).trans ht, le_refl, ciInf_pos]\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nm : ℝ≥0∞ → ℝ≥0∞\nc : ℝ≥0∞\nhc : c ≠ ⊤\nhc' : c ≠ 0\n⊢ mkMetric (c • m) = c • mkMetric m\n[PROOFSTEP]\nsimp only [mkMetric, mkMetric', mkMetric'.pre, inducedOuterMeasure, ENNReal.smul_iSup]\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nm : ℝ≥0∞ → ℝ≥0∞\nc : ℝ≥0∞\nhc : c ≠ ⊤\nhc' : c ≠ 0\n⊢ ⨆ (r : ℝ≥0∞) (_ : r > 0), boundedBy (extend fun s x => (c • m) (diam s)) =\n    c • ⨆ (r : ℝ≥0∞) (_ : r > 0), boundedBy (extend fun s x => m (diam s))\n[PROOFSTEP]\nsimp_rw [smul_iSup, smul_boundedBy hc, smul_extend _ hc', Pi.smul_apply]\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nm : ℝ≥0∞ → ℝ≥0∞\nc : ℝ≥0\nhc : c ≠ 0\n⊢ mkMetric (c • m) = c • mkMetric m\n[PROOFSTEP]\nrw [ENNReal.smul_def, ENNReal.smul_def, mkMetric_smul m ENNReal.coe_ne_top (ENNReal.coe_ne_zero.mpr hc)]\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nm : ℝ≥0∞ → ℝ≥0∞\nf : X → Y\nhf : Isometry f\nH : Monotone m ∨ Surjective f\n⊢ ↑(map f) (mkMetric m) = ↑(restrict (range f)) (mkMetric m)\n[PROOFSTEP]\nrw [← isometry_comap_mkMetric _ hf H, map_comap]\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹ : EMetricSpace X\ninst✝ : EMetricSpace Y\nm : ℝ≥0∞ → ℝ≥0∞\nf : X ≃ᵢ Y\n⊢ ↑(map ↑f) (mkMetric m) = mkMetric m\n[PROOFSTEP]\nrw [← isometryEquiv_comap_mkMetric _ f, map_comap_of_surjective f.surjective]\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\nm : ℝ≥0∞ → ℝ≥0∞\n⊢ trim (mkMetric m) = mkMetric m\n[PROOFSTEP]\nsimp only [mkMetric, mkMetric'.eq_iSup_nat, trim_iSup]\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\nm : ℝ≥0∞ → ℝ≥0∞\n⊢ ⨆ (i : ℕ), trim (mkMetric'.pre (fun s => m (diam s)) (↑i)⁻¹) = ⨆ (n : ℕ), mkMetric'.pre (fun s => m (diam s)) (↑n)⁻¹\n[PROOFSTEP]\ncongr 1 with n : 1\n[GOAL]\ncase e_s.h\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\nm : ℝ≥0∞ → ℝ≥0∞\nn : ℕ\n⊢ trim (mkMetric'.pre (fun s => m (diam s)) (↑n)⁻¹) = mkMetric'.pre (fun s => m (diam s)) (↑n)⁻¹\n[PROOFSTEP]\nrefine' mkMetric'.trim_pre _ (fun s => _) _\n[GOAL]\ncase e_s.h\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\nm : ℝ≥0∞ → ℝ≥0∞\nn : ℕ\ns : Set X\n⊢ m (diam (closure s)) = m (diam s)\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\nm : ℝ≥0∞ → ℝ≥0∞\n⊢ ↑(mkMetric m) = ↑↑(Measure.mkMetric m)\n[PROOFSTEP]\nrw [← Measure.mkMetric_toOuterMeasure]\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\nm₁ m₂ : ℝ≥0∞ → ℝ≥0∞\nc : ℝ≥0∞\nhc : c ≠ ⊤\nh0 : c ≠ 0\nhle : m₁ ≤ᶠ[𝓝[Ici 0] 0] c • m₂\n⊢ mkMetric m₁ ≤ c • mkMetric m₂\n[PROOFSTEP]\nintro s _\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\nm₁ m₂ : ℝ≥0∞ → ℝ≥0∞\nc : ℝ≥0∞\nhc : c ≠ ⊤\nh0 : c ≠ 0\nhle : m₁ ≤ᶠ[𝓝[Ici 0] 0] c • m₂\ns : Set X\na✝ : MeasurableSet s\n⊢ ↑↑(mkMetric m₁) s ≤ ↑↑(c • mkMetric m₂) s\n[PROOFSTEP]\nrw [← OuterMeasure.coe_mkMetric, coe_smul, ← OuterMeasure.coe_mkMetric]\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\nm₁ m₂ : ℝ≥0∞ → ℝ≥0∞\nc : ℝ≥0∞\nhc : c ≠ ⊤\nh0 : c ≠ 0\nhle : m₁ ≤ᶠ[𝓝[Ici 0] 0] c • m₂\ns : Set X\na✝ : MeasurableSet s\n⊢ ↑(OuterMeasure.mkMetric m₁) s ≤ (c • ↑(OuterMeasure.mkMetric m₂)) s\n[PROOFSTEP]\nexact OuterMeasure.mkMetric_mono_smul hc h0 hle s\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\n⊢ (mkMetric fun x => ⊤) = ⊤\n[PROOFSTEP]\napply toOuterMeasure_injective\n[GOAL]\ncase a\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\n⊢ ↑(mkMetric fun x => ⊤) = ↑⊤\n[PROOFSTEP]\nrw [mkMetric_toOuterMeasure, OuterMeasure.mkMetric_top, toOuterMeasure_top]\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\nm₁ m₂ : ℝ≥0∞ → ℝ≥0∞\nhle : m₁ ≤ᶠ[𝓝[Ici 0] 0] m₂\n⊢ mkMetric m₁ ≤ mkMetric m₂\n[PROOFSTEP]\nconvert @mkMetric_mono_smul X _ _ _ _ m₂ _ ENNReal.one_ne_top one_ne_zero _\n[GOAL]\ncase h.e'_4\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\nm₁ m₂ : ℝ≥0∞ → ℝ≥0∞\nhle : m₁ ≤ᶠ[𝓝[Ici 0] 0] m₂\n⊢ mkMetric m₂ = 1 • mkMetric m₂\n[PROOFSTEP]\nsimp [*]\n[GOAL]\ncase convert_2\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\nm₁ m₂ : ℝ≥0∞ → ℝ≥0∞\nhle : m₁ ≤ᶠ[𝓝[Ici 0] 0] m₂\n⊢ m₁ ≤ᶠ[𝓝[Ici 0] 0] 1 • m₂\n[PROOFSTEP]\nsimp [*]\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\nm : ℝ≥0∞ → ℝ≥0∞\ns : Set X\n⊢ ↑↑(mkMetric m) s =\n    ⨆ (r : ℝ≥0∞) (_ : 0 < r),\n      ⨅ (t : ℕ → Set X) (_ : s ⊆ iUnion t) (_ : ∀ (n : ℕ), diam (t n) ≤ r),\n        ∑' (n : ℕ), ⨆ (_ : Set.Nonempty (t n)), m (diam (t n))\n[PROOFSTEP]\nclassical\n  -- We mostly unfold the definitions but we need to switch the order of `∑'` and `⨅`\nsimp only [← OuterMeasure.coe_mkMetric, OuterMeasure.mkMetric, OuterMeasure.mkMetric', OuterMeasure.iSup_apply,\n  OuterMeasure.mkMetric'.pre, OuterMeasure.boundedBy_apply, extend]\nrefine'\n  surjective_id.iSup_congr (fun r => r) fun r =>\n    iSup_congr_Prop Iff.rfl fun _ => surjective_id.iInf_congr _ fun t => iInf_congr_Prop Iff.rfl fun ht => _\ndsimp\nby_cases htr : ∀ n, diam (t n) ≤ r\n· rw [iInf_eq_if, if_pos htr]\n  congr 1 with n : 1\n  simp only [iInf_eq_if, htr n, id, if_true, iSup_and']\n· rw [iInf_eq_if, if_neg htr]\n  push_neg at htr ; rcases htr with ⟨n, hn⟩\n  refine' ENNReal.tsum_eq_top_of_eq_top ⟨n, _⟩\n  rw [iSup_eq_if, if_pos, iInf_eq_if, if_neg]\n  exact hn.not_le\n  rcases diam_pos_iff.1 ((zero_le r).trans_lt hn) with ⟨x, hx, -⟩\n  exact ⟨x, hx⟩\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\nm : ℝ≥0∞ → ℝ≥0∞\ns : Set X\n⊢ ↑↑(mkMetric m) s =\n    ⨆ (r : ℝ≥0∞) (_ : 0 < r),\n      ⨅ (t : ℕ → Set X) (_ : s ⊆ iUnion t) (_ : ∀ (n : ℕ), diam (t n) ≤ r),\n        ∑' (n : ℕ), ⨆ (_ : Set.Nonempty (t n)), m (diam (t n))\n[PROOFSTEP]\nsimp only [← OuterMeasure.coe_mkMetric, OuterMeasure.mkMetric, OuterMeasure.mkMetric', OuterMeasure.iSup_apply,\n  OuterMeasure.mkMetric'.pre, OuterMeasure.boundedBy_apply, extend]\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\nm : ℝ≥0∞ → ℝ≥0∞\ns : Set X\n⊢ ⨆ (i : ℝ≥0∞) (_ : i > 0),\n      ⨅ (t : ℕ → Set X) (_ : s ⊆ iUnion t),\n        ∑' (n : ℕ), ⨆ (_ : Set.Nonempty (t n)), ⨅ (_ : diam (t n) ≤ i), m (diam (t n)) =\n    ⨆ (r : ℝ≥0∞) (_ : 0 < r),\n      ⨅ (t : ℕ → Set X) (_ : s ⊆ iUnion t) (_ : ∀ (n : ℕ), diam (t n) ≤ r),\n        ∑' (n : ℕ), ⨆ (_ : Set.Nonempty (t n)), m (diam (t n))\n[PROOFSTEP]\nrefine'\n  surjective_id.iSup_congr (fun r => r) fun r =>\n    iSup_congr_Prop Iff.rfl fun _ => surjective_id.iInf_congr _ fun t => iInf_congr_Prop Iff.rfl fun ht => _\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\nm : ℝ≥0∞ → ℝ≥0∞\ns : Set X\nr : ℝ≥0∞\nx✝ : r > 0\nt : ℕ → Set X\nht : s ⊆ iUnion t\n⊢ ∑' (n : ℕ), ⨆ (_ : Set.Nonempty (id t n)), ⨅ (_ : diam (id t n) ≤ r), m (diam (id t n)) =\n    ⨅ (_ : ∀ (n : ℕ), diam (t n) ≤ (fun r => r) r), ∑' (n : ℕ), ⨆ (_ : Set.Nonempty (t n)), m (diam (t n))\n[PROOFSTEP]\ndsimp\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\nm : ℝ≥0∞ → ℝ≥0∞\ns : Set X\nr : ℝ≥0∞\nx✝ : r > 0\nt : ℕ → Set X\nht : s ⊆ iUnion t\n⊢ ∑' (n : ℕ), ⨆ (_ : Set.Nonempty (t n)), ⨅ (_ : diam (t n) ≤ r), m (diam (t n)) =\n    ⨅ (_ : ∀ (n : ℕ), diam (t n) ≤ r), ∑' (n : ℕ), ⨆ (_ : Set.Nonempty (t n)), m (diam (t n))\n[PROOFSTEP]\nby_cases htr : ∀ n, diam (t n) ≤ r\n[GOAL]\ncase pos\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\nm : ℝ≥0∞ → ℝ≥0∞\ns : Set X\nr : ℝ≥0∞\nx✝ : r > 0\nt : ℕ → Set X\nht : s ⊆ iUnion t\nhtr : ∀ (n : ℕ), diam (t n) ≤ r\n⊢ ∑' (n : ℕ), ⨆ (_ : Set.Nonempty (t n)), ⨅ (_ : diam (t n) ≤ r), m (diam (t n)) =\n    ⨅ (_ : ∀ (n : ℕ), diam (t n) ≤ r), ∑' (n : ℕ), ⨆ (_ : Set.Nonempty (t n)), m (diam (t n))\n[PROOFSTEP]\nrw [iInf_eq_if, if_pos htr]\n[GOAL]\ncase pos\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\nm : ℝ≥0∞ → ℝ≥0∞\ns : Set X\nr : ℝ≥0∞\nx✝ : r > 0\nt : ℕ → Set X\nht : s ⊆ iUnion t\nhtr : ∀ (n : ℕ), diam (t n) ≤ r\n⊢ ∑' (n : ℕ), ⨆ (_ : Set.Nonempty (t n)), ⨅ (_ : diam (t n) ≤ r), m (diam (t n)) =\n    ∑' (n : ℕ), ⨆ (_ : Set.Nonempty (t n)), m (diam (t n))\n[PROOFSTEP]\ncongr 1 with n : 1\n[GOAL]\ncase pos.e_f.h\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\nm : ℝ≥0∞ → ℝ≥0∞\ns : Set X\nr : ℝ≥0∞\nx✝ : r > 0\nt : ℕ → Set X\nht : s ⊆ iUnion t\nhtr : ∀ (n : ℕ), diam (t n) ≤ r\nn : ℕ\n⊢ ⨆ (_ : Set.Nonempty (t n)), ⨅ (_ : diam (t n) ≤ r), m (diam (t n)) = ⨆ (_ : Set.Nonempty (t n)), m (diam (t n))\n[PROOFSTEP]\nsimp only [iInf_eq_if, htr n, id, if_true, iSup_and']\n[GOAL]\ncase neg\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\nm : ℝ≥0∞ → ℝ≥0∞\ns : Set X\nr : ℝ≥0∞\nx✝ : r > 0\nt : ℕ → Set X\nht : s ⊆ iUnion t\nhtr : ¬∀ (n : ℕ), diam (t n) ≤ r\n⊢ ∑' (n : ℕ), ⨆ (_ : Set.Nonempty (t n)), ⨅ (_ : diam (t n) ≤ r), m (diam (t n)) =\n    ⨅ (_ : ∀ (n : ℕ), diam (t n) ≤ r), ∑' (n : ℕ), ⨆ (_ : Set.Nonempty (t n)), m (diam (t n))\n[PROOFSTEP]\nrw [iInf_eq_if, if_neg htr]\n[GOAL]\ncase neg\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\nm : ℝ≥0∞ → ℝ≥0∞\ns : Set X\nr : ℝ≥0∞\nx✝ : r > 0\nt : ℕ → Set X\nht : s ⊆ iUnion t\nhtr : ¬∀ (n : ℕ), diam (t n) ≤ r\n⊢ ∑' (n : ℕ), ⨆ (_ : Set.Nonempty (t n)), ⨅ (_ : diam (t n) ≤ r), m (diam (t n)) = ⊤\n[PROOFSTEP]\npush_neg at htr \n[GOAL]\ncase neg\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\nm : ℝ≥0∞ → ℝ≥0∞\ns : Set X\nr : ℝ≥0∞\nx✝ : r > 0\nt : ℕ → Set X\nht : s ⊆ iUnion t\nhtr : ∃ n, r < diam (t n)\n⊢ ∑' (n : ℕ), ⨆ (_ : Set.Nonempty (t n)), ⨅ (_ : diam (t n) ≤ r), m (diam (t n)) = ⊤\n[PROOFSTEP]\nrcases htr with ⟨n, hn⟩\n[GOAL]\ncase neg.intro\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\nm : ℝ≥0∞ → ℝ≥0∞\ns : Set X\nr : ℝ≥0∞\nx✝ : r > 0\nt : ℕ → Set X\nht : s ⊆ iUnion t\nn : ℕ\nhn : r < diam (t n)\n⊢ ∑' (n : ℕ), ⨆ (_ : Set.Nonempty (t n)), ⨅ (_ : diam (t n) ≤ r), m (diam (t n)) = ⊤\n[PROOFSTEP]\nrefine' ENNReal.tsum_eq_top_of_eq_top ⟨n, _⟩\n[GOAL]\ncase neg.intro\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\nm : ℝ≥0∞ → ℝ≥0∞\ns : Set X\nr : ℝ≥0∞\nx✝ : r > 0\nt : ℕ → Set X\nht : s ⊆ iUnion t\nn : ℕ\nhn : r < diam (t n)\n⊢ ⨆ (_ : Set.Nonempty (t n)), ⨅ (_ : diam (t n) ≤ r), m (diam (t n)) = ⊤\n[PROOFSTEP]\nrw [iSup_eq_if, if_pos, iInf_eq_if, if_neg]\n[GOAL]\ncase neg.intro.hnc\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\nm : ℝ≥0∞ → ℝ≥0∞\ns : Set X\nr : ℝ≥0∞\nx✝ : r > 0\nt : ℕ → Set X\nht : s ⊆ iUnion t\nn : ℕ\nhn : r < diam (t n)\n⊢ ¬diam (t n) ≤ r\ncase neg.intro.hc\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\nm : ℝ≥0∞ → ℝ≥0∞\ns : Set X\nr : ℝ≥0∞\nx✝ : r > 0\nt : ℕ → Set X\nht : s ⊆ iUnion t\nn : ℕ\nhn : r < diam (t n)\n⊢ Set.Nonempty (t n)\n[PROOFSTEP]\nexact hn.not_le\n[GOAL]\ncase neg.intro.hc\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\nm : ℝ≥0∞ → ℝ≥0∞\ns : Set X\nr : ℝ≥0∞\nx✝ : r > 0\nt : ℕ → Set X\nht : s ⊆ iUnion t\nn : ℕ\nhn : r < diam (t n)\n⊢ Set.Nonempty (t n)\n[PROOFSTEP]\nrcases diam_pos_iff.1 ((zero_le r).trans_lt hn) with ⟨x, hx, -⟩\n[GOAL]\ncase neg.intro.hc.intro.intro\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\nm : ℝ≥0∞ → ℝ≥0∞\ns : Set X\nr : ℝ≥0∞\nx✝ : r > 0\nt : ℕ → Set X\nht : s ⊆ iUnion t\nn : ℕ\nhn : r < diam (t n)\nx : X\nhx : x ∈ t n\n⊢ Set.Nonempty (t n)\n[PROOFSTEP]\nexact ⟨x, hx⟩\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\nm : ℝ≥0∞ → ℝ≥0∞\nμ : Measure X\nε : ℝ≥0∞\nh₀ : 0 < ε\nh : ∀ (s : Set X), diam s ≤ ε → ↑↑μ s ≤ m (diam s)\n⊢ μ ≤ mkMetric m\n[PROOFSTEP]\nrw [← toOuterMeasure_le, mkMetric_toOuterMeasure]\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\nm : ℝ≥0∞ → ℝ≥0∞\nμ : Measure X\nε : ℝ≥0∞\nh₀ : 0 < ε\nh : ∀ (s : Set X), diam s ≤ ε → ↑↑μ s ≤ m (diam s)\n⊢ ↑μ ≤ OuterMeasure.mkMetric m\n[PROOFSTEP]\nexact OuterMeasure.le_mkMetric m μ.toOuterMeasure ε h₀ h\n[GOAL]\nι✝ : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁴ : EMetricSpace X\ninst✝³ : EMetricSpace Y\ninst✝² : MeasurableSpace X\ninst✝¹ : BorelSpace X\nβ : Type u_4\nι : β → Type u_5\ninst✝ : ∀ (n : β), Countable (ι n)\ns : Set X\nl : Filter β\nr : β → ℝ≥0∞\nhr : Tendsto r l (𝓝 0)\nt : (n : β) → ι n → Set X\nht : ∀ᶠ (n : β) in l, ∀ (i : ι n), diam (t n i) ≤ r n\nhst : ∀ᶠ (n : β) in l, s ⊆ ⋃ (i : ι n), t n i\nm : ℝ≥0∞ → ℝ≥0∞\n⊢ ↑↑(mkMetric m) s ≤ liminf (fun n => ∑' (i : ι n), m (diam (t n i))) l\n[PROOFSTEP]\nhaveI : ∀ n, Encodable (ι n) := fun n => Encodable.ofCountable _\n[GOAL]\nι✝ : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁴ : EMetricSpace X\ninst✝³ : EMetricSpace Y\ninst✝² : MeasurableSpace X\ninst✝¹ : BorelSpace X\nβ : Type u_4\nι : β → Type u_5\ninst✝ : ∀ (n : β), Countable (ι n)\ns : Set X\nl : Filter β\nr : β → ℝ≥0∞\nhr : Tendsto r l (𝓝 0)\nt : (n : β) → ι n → Set X\nht : ∀ᶠ (n : β) in l, ∀ (i : ι n), diam (t n i) ≤ r n\nhst : ∀ᶠ (n : β) in l, s ⊆ ⋃ (i : ι n), t n i\nm : ℝ≥0∞ → ℝ≥0∞\nthis : (n : β) → Encodable (ι n)\n⊢ ↑↑(mkMetric m) s ≤ liminf (fun n => ∑' (i : ι n), m (diam (t n i))) l\n[PROOFSTEP]\nsimp only [mkMetric_apply]\n[GOAL]\nι✝ : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁴ : EMetricSpace X\ninst✝³ : EMetricSpace Y\ninst✝² : MeasurableSpace X\ninst✝¹ : BorelSpace X\nβ : Type u_4\nι : β → Type u_5\ninst✝ : ∀ (n : β), Countable (ι n)\ns : Set X\nl : Filter β\nr : β → ℝ≥0∞\nhr : Tendsto r l (𝓝 0)\nt : (n : β) → ι n → Set X\nht : ∀ᶠ (n : β) in l, ∀ (i : ι n), diam (t n i) ≤ r n\nhst : ∀ᶠ (n : β) in l, s ⊆ ⋃ (i : ι n), t n i\nm : ℝ≥0∞ → ℝ≥0∞\nthis : (n : β) → Encodable (ι n)\n⊢ ⨆ (r : ℝ≥0∞) (_ : 0 < r),\n      ⨅ (t : ℕ → Set X) (_ : s ⊆ iUnion t) (_ : ∀ (n : ℕ), diam (t n) ≤ r),\n        ∑' (n : ℕ), ⨆ (_ : Set.Nonempty (t n)), m (diam (t n)) ≤\n    liminf (fun n => ∑' (i : ι n), m (diam (t n i))) l\n[PROOFSTEP]\nrefine' iSup₂_le fun ε hε => _\n[GOAL]\nι✝ : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁴ : EMetricSpace X\ninst✝³ : EMetricSpace Y\ninst✝² : MeasurableSpace X\ninst✝¹ : BorelSpace X\nβ : Type u_4\nι : β → Type u_5\ninst✝ : ∀ (n : β), Countable (ι n)\ns : Set X\nl : Filter β\nr : β → ℝ≥0∞\nhr : Tendsto r l (𝓝 0)\nt : (n : β) → ι n → Set X\nht : ∀ᶠ (n : β) in l, ∀ (i : ι n), diam (t n i) ≤ r n\nhst : ∀ᶠ (n : β) in l, s ⊆ ⋃ (i : ι n), t n i\nm : ℝ≥0∞ → ℝ≥0∞\nthis : (n : β) → Encodable (ι n)\nε : ℝ≥0∞\nhε : 0 < ε\n⊢ ⨅ (t : ℕ → Set X) (_ : s ⊆ iUnion t) (_ : ∀ (n : ℕ), diam (t n) ≤ ε),\n      ∑' (n : ℕ), ⨆ (_ : Set.Nonempty (t n)), m (diam (t n)) ≤\n    liminf (fun n => ∑' (i : ι n), m (diam (t n i))) l\n[PROOFSTEP]\nrefine' le_of_forall_le_of_dense fun c hc => _\n[GOAL]\nι✝ : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁴ : EMetricSpace X\ninst✝³ : EMetricSpace Y\ninst✝² : MeasurableSpace X\ninst✝¹ : BorelSpace X\nβ : Type u_4\nι : β → Type u_5\ninst✝ : ∀ (n : β), Countable (ι n)\ns : Set X\nl : Filter β\nr : β → ℝ≥0∞\nhr : Tendsto r l (𝓝 0)\nt : (n : β) → ι n → Set X\nht : ∀ᶠ (n : β) in l, ∀ (i : ι n), diam (t n i) ≤ r n\nhst : ∀ᶠ (n : β) in l, s ⊆ ⋃ (i : ι n), t n i\nm : ℝ≥0∞ → ℝ≥0∞\nthis : (n : β) → Encodable (ι n)\nε : ℝ≥0∞\nhε : 0 < ε\nc : ℝ≥0∞\nhc : liminf (fun n => ∑' (i : ι n), m (diam (t n i))) l < c\n⊢ ⨅ (t : ℕ → Set X) (_ : s ⊆ iUnion t) (_ : ∀ (n : ℕ), diam (t n) ≤ ε),\n      ∑' (n : ℕ), ⨆ (_ : Set.Nonempty (t n)), m (diam (t n)) ≤\n    c\n[PROOFSTEP]\nrcases((frequently_lt_of_liminf_lt (by isBoundedDefault) hc).and_eventually\n      ((hr.eventually (gt_mem_nhds hε)).and (ht.and hst))).exists with\n  ⟨n, hn, hrn, htn, hstn⟩\n[GOAL]\nι✝ : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁴ : EMetricSpace X\ninst✝³ : EMetricSpace Y\ninst✝² : MeasurableSpace X\ninst✝¹ : BorelSpace X\nβ : Type u_4\nι : β → Type u_5\ninst✝ : ∀ (n : β), Countable (ι n)\ns : Set X\nl : Filter β\nr : β → ℝ≥0∞\nhr : Tendsto r l (𝓝 0)\nt : (n : β) → ι n → Set X\nht : ∀ᶠ (n : β) in l, ∀ (i : ι n), diam (t n i) ≤ r n\nhst : ∀ᶠ (n : β) in l, s ⊆ ⋃ (i : ι n), t n i\nm : ℝ≥0∞ → ℝ≥0∞\nthis : (n : β) → Encodable (ι n)\nε : ℝ≥0∞\nhε : 0 < ε\nc : ℝ≥0∞\nhc : liminf (fun n => ∑' (i : ι n), m (diam (t n i))) l < c\n⊢ IsCoboundedUnder (fun x x_1 => x ≥ x_1) l fun n => ∑' (i : ι n), m (diam (t n i))\n[PROOFSTEP]\nisBoundedDefault\n[GOAL]\ncase intro.intro.intro.intro\nι✝ : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁴ : EMetricSpace X\ninst✝³ : EMetricSpace Y\ninst✝² : MeasurableSpace X\ninst✝¹ : BorelSpace X\nβ : Type u_4\nι : β → Type u_5\ninst✝ : ∀ (n : β), Countable (ι n)\ns : Set X\nl : Filter β\nr : β → ℝ≥0∞\nhr : Tendsto r l (𝓝 0)\nt : (n : β) → ι n → Set X\nht : ∀ᶠ (n : β) in l, ∀ (i : ι n), diam (t n i) ≤ r n\nhst : ∀ᶠ (n : β) in l, s ⊆ ⋃ (i : ι n), t n i\nm : ℝ≥0∞ → ℝ≥0∞\nthis : (n : β) → Encodable (ι n)\nε : ℝ≥0∞\nhε : 0 < ε\nc : ℝ≥0∞\nhc : liminf (fun n => ∑' (i : ι n), m (diam (t n i))) l < c\nn : β\nhn : ∑' (i : ι n), m (diam (t n i)) < c\nhrn : r n < ε\nhtn : ∀ (i : ι n), diam (t n i) ≤ r n\nhstn : s ⊆ ⋃ (i : ι n), t n i\n⊢ ⨅ (t : ℕ → Set X) (_ : s ⊆ iUnion t) (_ : ∀ (n : ℕ), diam (t n) ≤ ε),\n      ∑' (n : ℕ), ⨆ (_ : Set.Nonempty (t n)), m (diam (t n)) ≤\n    c\n[PROOFSTEP]\nset u : ℕ → Set X := fun j => ⋃ b ∈ decode₂ (ι n) j, t n b\n[GOAL]\ncase intro.intro.intro.intro\nι✝ : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁴ : EMetricSpace X\ninst✝³ : EMetricSpace Y\ninst✝² : MeasurableSpace X\ninst✝¹ : BorelSpace X\nβ : Type u_4\nι : β → Type u_5\ninst✝ : ∀ (n : β), Countable (ι n)\ns : Set X\nl : Filter β\nr : β → ℝ≥0∞\nhr : Tendsto r l (𝓝 0)\nt : (n : β) → ι n → Set X\nht : ∀ᶠ (n : β) in l, ∀ (i : ι n), diam (t n i) ≤ r n\nhst : ∀ᶠ (n : β) in l, s ⊆ ⋃ (i : ι n), t n i\nm : ℝ≥0∞ → ℝ≥0∞\nthis : (n : β) → Encodable (ι n)\nε : ℝ≥0∞\nhε : 0 < ε\nc : ℝ≥0∞\nhc : liminf (fun n => ∑' (i : ι n), m (diam (t n i))) l < c\nn : β\nhn : ∑' (i : ι n), m (diam (t n i)) < c\nhrn : r n < ε\nhtn : ∀ (i : ι n), diam (t n i) ≤ r n\nhstn : s ⊆ ⋃ (i : ι n), t n i\nu : ℕ → Set X := fun j => ⋃ (b : ι n) (_ : b ∈ decode₂ (ι n) j), t n b\n⊢ ⨅ (t : ℕ → Set X) (_ : s ⊆ iUnion t) (_ : ∀ (n : ℕ), diam (t n) ≤ ε),\n      ∑' (n : ℕ), ⨆ (_ : Set.Nonempty (t n)), m (diam (t n)) ≤\n    c\n[PROOFSTEP]\nrefine' iInf₂_le_of_le u (by rwa [iUnion_decode₂]) _\n[GOAL]\nι✝ : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁴ : EMetricSpace X\ninst✝³ : EMetricSpace Y\ninst✝² : MeasurableSpace X\ninst✝¹ : BorelSpace X\nβ : Type u_4\nι : β → Type u_5\ninst✝ : ∀ (n : β), Countable (ι n)\ns : Set X\nl : Filter β\nr : β → ℝ≥0∞\nhr : Tendsto r l (𝓝 0)\nt : (n : β) → ι n → Set X\nht : ∀ᶠ (n : β) in l, ∀ (i : ι n), diam (t n i) ≤ r n\nhst : ∀ᶠ (n : β) in l, s ⊆ ⋃ (i : ι n), t n i\nm : ℝ≥0∞ → ℝ≥0∞\nthis : (n : β) → Encodable (ι n)\nε : ℝ≥0∞\nhε : 0 < ε\nc : ℝ≥0∞\nhc : liminf (fun n => ∑' (i : ι n), m (diam (t n i))) l < c\nn : β\nhn : ∑' (i : ι n), m (diam (t n i)) < c\nhrn : r n < ε\nhtn : ∀ (i : ι n), diam (t n i) ≤ r n\nhstn : s ⊆ ⋃ (i : ι n), t n i\nu : ℕ → Set X := fun j => ⋃ (b : ι n) (_ : b ∈ decode₂ (ι n) j), t n b\n⊢ s ⊆ iUnion u\n[PROOFSTEP]\nrwa [iUnion_decode₂]\n[GOAL]\ncase intro.intro.intro.intro\nι✝ : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁴ : EMetricSpace X\ninst✝³ : EMetricSpace Y\ninst✝² : MeasurableSpace X\ninst✝¹ : BorelSpace X\nβ : Type u_4\nι : β → Type u_5\ninst✝ : ∀ (n : β), Countable (ι n)\ns : Set X\nl : Filter β\nr : β → ℝ≥0∞\nhr : Tendsto r l (𝓝 0)\nt : (n : β) → ι n → Set X\nht : ∀ᶠ (n : β) in l, ∀ (i : ι n), diam (t n i) ≤ r n\nhst : ∀ᶠ (n : β) in l, s ⊆ ⋃ (i : ι n), t n i\nm : ℝ≥0∞ → ℝ≥0∞\nthis : (n : β) → Encodable (ι n)\nε : ℝ≥0∞\nhε : 0 < ε\nc : ℝ≥0∞\nhc : liminf (fun n => ∑' (i : ι n), m (diam (t n i))) l < c\nn : β\nhn : ∑' (i : ι n), m (diam (t n i)) < c\nhrn : r n < ε\nhtn : ∀ (i : ι n), diam (t n i) ≤ r n\nhstn : s ⊆ ⋃ (i : ι n), t n i\nu : ℕ → Set X := fun j => ⋃ (b : ι n) (_ : b ∈ decode₂ (ι n) j), t n b\n⊢ ⨅ (_ : ∀ (n : ℕ), diam (u n) ≤ ε), ∑' (n : ℕ), ⨆ (_ : Set.Nonempty (u n)), m (diam (u n)) ≤ c\n[PROOFSTEP]\nrefine' iInf_le_of_le (fun j => _) _\n[GOAL]\ncase intro.intro.intro.intro.refine'_1\nι✝ : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁴ : EMetricSpace X\ninst✝³ : EMetricSpace Y\ninst✝² : MeasurableSpace X\ninst✝¹ : BorelSpace X\nβ : Type u_4\nι : β → Type u_5\ninst✝ : ∀ (n : β), Countable (ι n)\ns : Set X\nl : Filter β\nr : β → ℝ≥0∞\nhr : Tendsto r l (𝓝 0)\nt : (n : β) → ι n → Set X\nht : ∀ᶠ (n : β) in l, ∀ (i : ι n), diam (t n i) ≤ r n\nhst : ∀ᶠ (n : β) in l, s ⊆ ⋃ (i : ι n), t n i\nm : ℝ≥0∞ → ℝ≥0∞\nthis : (n : β) → Encodable (ι n)\nε : ℝ≥0∞\nhε : 0 < ε\nc : ℝ≥0∞\nhc : liminf (fun n => ∑' (i : ι n), m (diam (t n i))) l < c\nn : β\nhn : ∑' (i : ι n), m (diam (t n i)) < c\nhrn : r n < ε\nhtn : ∀ (i : ι n), diam (t n i) ≤ r n\nhstn : s ⊆ ⋃ (i : ι n), t n i\nu : ℕ → Set X := fun j => ⋃ (b : ι n) (_ : b ∈ decode₂ (ι n) j), t n b\nj : ℕ\n⊢ diam (u j) ≤ ε\n[PROOFSTEP]\nrw [EMetric.diam_iUnion_mem_option]\n[GOAL]\ncase intro.intro.intro.intro.refine'_1\nι✝ : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁴ : EMetricSpace X\ninst✝³ : EMetricSpace Y\ninst✝² : MeasurableSpace X\ninst✝¹ : BorelSpace X\nβ : Type u_4\nι : β → Type u_5\ninst✝ : ∀ (n : β), Countable (ι n)\ns : Set X\nl : Filter β\nr : β → ℝ≥0∞\nhr : Tendsto r l (𝓝 0)\nt : (n : β) → ι n → Set X\nht : ∀ᶠ (n : β) in l, ∀ (i : ι n), diam (t n i) ≤ r n\nhst : ∀ᶠ (n : β) in l, s ⊆ ⋃ (i : ι n), t n i\nm : ℝ≥0∞ → ℝ≥0∞\nthis : (n : β) → Encodable (ι n)\nε : ℝ≥0∞\nhε : 0 < ε\nc : ℝ≥0∞\nhc : liminf (fun n => ∑' (i : ι n), m (diam (t n i))) l < c\nn : β\nhn : ∑' (i : ι n), m (diam (t n i)) < c\nhrn : r n < ε\nhtn : ∀ (i : ι n), diam (t n i) ≤ r n\nhstn : s ⊆ ⋃ (i : ι n), t n i\nu : ℕ → Set X := fun j => ⋃ (b : ι n) (_ : b ∈ decode₂ (ι n) j), t n b\nj : ℕ\n⊢ ⨆ (i : ι n) (_ : i ∈ decode₂ (ι n) j), diam (t n i) ≤ ε\n[PROOFSTEP]\nexact iSup₂_le fun _ _ => (htn _).trans hrn.le\n[GOAL]\ncase intro.intro.intro.intro.refine'_2\nι✝ : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁴ : EMetricSpace X\ninst✝³ : EMetricSpace Y\ninst✝² : MeasurableSpace X\ninst✝¹ : BorelSpace X\nβ : Type u_4\nι : β → Type u_5\ninst✝ : ∀ (n : β), Countable (ι n)\ns : Set X\nl : Filter β\nr : β → ℝ≥0∞\nhr : Tendsto r l (𝓝 0)\nt : (n : β) → ι n → Set X\nht : ∀ᶠ (n : β) in l, ∀ (i : ι n), diam (t n i) ≤ r n\nhst : ∀ᶠ (n : β) in l, s ⊆ ⋃ (i : ι n), t n i\nm : ℝ≥0∞ → ℝ≥0∞\nthis : (n : β) → Encodable (ι n)\nε : ℝ≥0∞\nhε : 0 < ε\nc : ℝ≥0∞\nhc : liminf (fun n => ∑' (i : ι n), m (diam (t n i))) l < c\nn : β\nhn : ∑' (i : ι n), m (diam (t n i)) < c\nhrn : r n < ε\nhtn : ∀ (i : ι n), diam (t n i) ≤ r n\nhstn : s ⊆ ⋃ (i : ι n), t n i\nu : ℕ → Set X := fun j => ⋃ (b : ι n) (_ : b ∈ decode₂ (ι n) j), t n b\n⊢ ∑' (n : ℕ), ⨆ (_ : Set.Nonempty (u n)), m (diam (u n)) ≤ c\n[PROOFSTEP]\ncalc\n  (∑' j : ℕ, ⨆ _ : (u j).Nonempty, m (diam (u j))) = _ :=\n    tsum_iUnion_decode₂ (fun t : Set X => ⨆ _ : t.Nonempty, m (diam t)) (by simp) _\n  _ ≤ ∑' i : ι n, m (diam (t n i)) := (ENNReal.tsum_le_tsum fun b => iSup_le fun _ => le_rfl)\n  _ ≤ c := hn.le\n[GOAL]\nι✝ : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁴ : EMetricSpace X\ninst✝³ : EMetricSpace Y\ninst✝² : MeasurableSpace X\ninst✝¹ : BorelSpace X\nβ : Type u_4\nι : β → Type u_5\ninst✝ : ∀ (n : β), Countable (ι n)\ns : Set X\nl : Filter β\nr : β → ℝ≥0∞\nhr : Tendsto r l (𝓝 0)\nt : (n : β) → ι n → Set X\nht : ∀ᶠ (n : β) in l, ∀ (i : ι n), diam (t n i) ≤ r n\nhst : ∀ᶠ (n : β) in l, s ⊆ ⋃ (i : ι n), t n i\nm : ℝ≥0∞ → ℝ≥0∞\nthis : (n : β) → Encodable (ι n)\nε : ℝ≥0∞\nhε : 0 < ε\nc : ℝ≥0∞\nhc : liminf (fun n => ∑' (i : ι n), m (diam (t n i))) l < c\nn : β\nhn : ∑' (i : ι n), m (diam (t n i)) < c\nhrn : r n < ε\nhtn : ∀ (i : ι n), diam (t n i) ≤ r n\nhstn : s ⊆ ⋃ (i : ι n), t n i\nu : ℕ → Set X := fun j => ⋃ (b : ι n) (_ : b ∈ decode₂ (ι n) j), t n b\n⊢ (fun t => ⨆ (_ : Set.Nonempty t), m (diam t)) ∅ = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nι✝ : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\nβ : Type u_4\nι : β → Type u_5\nhι : (n : β) → Fintype (ι n)\ns : Set X\nl : Filter β\nr : β → ℝ≥0∞\nhr : Tendsto r l (𝓝 0)\nt : (n : β) → ι n → Set X\nht : ∀ᶠ (n : β) in l, ∀ (i : ι n), diam (t n i) ≤ r n\nhst : ∀ᶠ (n : β) in l, s ⊆ ⋃ (i : ι n), t n i\nm : ℝ≥0∞ → ℝ≥0∞\n⊢ ↑↑(mkMetric m) s ≤ liminf (fun n => ∑ i : ι n, m (diam (t n i))) l\n[PROOFSTEP]\nsimpa only [tsum_fintype] using mkMetric_le_liminf_tsum s r hr t ht hst m\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\nd₁ d₂ : ℝ\nh : d₁ < d₂\ns : Set X\n⊢ ↑↑μH[d₂] s = 0 ∨ ↑↑μH[d₁] s = ⊤\n[PROOFSTEP]\nby_contra' H\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\nd₁ d₂ : ℝ\nh : d₁ < d₂\ns : Set X\nH : ↑↑μH[d₂] s ≠ 0 ∧ ↑↑μH[d₁] s ≠ ⊤\n⊢ False\n[PROOFSTEP]\nsuffices ∀ c : ℝ≥0, c ≠ 0 → μH[d₂] s ≤ c * μH[d₁] s\n  by\n  rcases ENNReal.exists_nnreal_pos_mul_lt H.2 H.1 with ⟨c, hc0, hc⟩\n  exact hc.not_le (this c (pos_iff_ne_zero.1 hc0))\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\nd₁ d₂ : ℝ\nh : d₁ < d₂\ns : Set X\nH : ↑↑μH[d₂] s ≠ 0 ∧ ↑↑μH[d₁] s ≠ ⊤\nthis : ∀ (c : ℝ≥0), c ≠ 0 → ↑↑μH[d₂] s ≤ ↑c * ↑↑μH[d₁] s\n⊢ False\n[PROOFSTEP]\nrcases ENNReal.exists_nnreal_pos_mul_lt H.2 H.1 with ⟨c, hc0, hc⟩\n[GOAL]\ncase intro.intro\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\nd₁ d₂ : ℝ\nh : d₁ < d₂\ns : Set X\nH : ↑↑μH[d₂] s ≠ 0 ∧ ↑↑μH[d₁] s ≠ ⊤\nthis : ∀ (c : ℝ≥0), c ≠ 0 → ↑↑μH[d₂] s ≤ ↑c * ↑↑μH[d₁] s\nc : ℝ≥0\nhc0 : c > 0\nhc : ↑c * ↑↑μH[d₁] s < ↑↑μH[d₂] s\n⊢ False\n[PROOFSTEP]\nexact hc.not_le (this c (pos_iff_ne_zero.1 hc0))\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\nd₁ d₂ : ℝ\nh : d₁ < d₂\ns : Set X\nH : ↑↑μH[d₂] s ≠ 0 ∧ ↑↑μH[d₁] s ≠ ⊤\n⊢ ∀ (c : ℝ≥0), c ≠ 0 → ↑↑μH[d₂] s ≤ ↑c * ↑↑μH[d₁] s\n[PROOFSTEP]\nintro c hc\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\nd₁ d₂ : ℝ\nh : d₁ < d₂\ns : Set X\nH : ↑↑μH[d₂] s ≠ 0 ∧ ↑↑μH[d₁] s ≠ ⊤\nc : ℝ≥0\nhc : c ≠ 0\n⊢ ↑↑μH[d₂] s ≤ ↑c * ↑↑μH[d₁] s\n[PROOFSTEP]\nrefine' le_iff'.1 (mkMetric_mono_smul ENNReal.coe_ne_top (by exact_mod_cast hc) _) s\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\nd₁ d₂ : ℝ\nh : d₁ < d₂\ns : Set X\nH : ↑↑μH[d₂] s ≠ 0 ∧ ↑↑μH[d₁] s ≠ ⊤\nc : ℝ≥0\nhc : c ≠ 0\n⊢ ↑c ≠ 0\n[PROOFSTEP]\nexact_mod_cast hc\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\nd₁ d₂ : ℝ\nh : d₁ < d₂\ns : Set X\nH : ↑↑μH[d₂] s ≠ 0 ∧ ↑↑μH[d₁] s ≠ ⊤\nc : ℝ≥0\nhc : c ≠ 0\n⊢ (fun r => r ^ d₂) ≤ᶠ[𝓝[Ici 0] 0] ↑c • fun r => r ^ d₁\n[PROOFSTEP]\nhave : 0 < ((c : ℝ≥0∞) ^ (d₂ - d₁)⁻¹) :=\n  by\n  rw [ENNReal.coe_rpow_of_ne_zero hc, pos_iff_ne_zero, Ne.def, ENNReal.coe_eq_zero, NNReal.rpow_eq_zero_iff]\n  exact mt And.left hc\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\nd₁ d₂ : ℝ\nh : d₁ < d₂\ns : Set X\nH : ↑↑μH[d₂] s ≠ 0 ∧ ↑↑μH[d₁] s ≠ ⊤\nc : ℝ≥0\nhc : c ≠ 0\n⊢ 0 < ↑c ^ (d₂ - d₁)⁻¹\n[PROOFSTEP]\nrw [ENNReal.coe_rpow_of_ne_zero hc, pos_iff_ne_zero, Ne.def, ENNReal.coe_eq_zero, NNReal.rpow_eq_zero_iff]\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\nd₁ d₂ : ℝ\nh : d₁ < d₂\ns : Set X\nH : ↑↑μH[d₂] s ≠ 0 ∧ ↑↑μH[d₁] s ≠ ⊤\nc : ℝ≥0\nhc : c ≠ 0\n⊢ ¬(c = 0 ∧ (d₂ - d₁)⁻¹ ≠ 0)\n[PROOFSTEP]\nexact mt And.left hc\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\nd₁ d₂ : ℝ\nh : d₁ < d₂\ns : Set X\nH : ↑↑μH[d₂] s ≠ 0 ∧ ↑↑μH[d₁] s ≠ ⊤\nc : ℝ≥0\nhc : c ≠ 0\nthis : 0 < ↑c ^ (d₂ - d₁)⁻¹\n⊢ (fun r => r ^ d₂) ≤ᶠ[𝓝[Ici 0] 0] ↑c • fun r => r ^ d₁\n[PROOFSTEP]\nfilter_upwards [Ico_mem_nhdsWithin_Ici ⟨le_rfl, this⟩]\n[GOAL]\ncase h\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\nd₁ d₂ : ℝ\nh : d₁ < d₂\ns : Set X\nH : ↑↑μH[d₂] s ≠ 0 ∧ ↑↑μH[d₁] s ≠ ⊤\nc : ℝ≥0\nhc : c ≠ 0\nthis : 0 < ↑c ^ (d₂ - d₁)⁻¹\n⊢ ∀ (a : ℝ≥0∞), a ∈ Ico 0 (↑c ^ (d₂ - d₁)⁻¹) → a ^ d₂ ≤ (↑c • fun r => r ^ d₁) a\n[PROOFSTEP]\nrintro r ⟨hr₀, hrc⟩\n[GOAL]\ncase h.intro\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\nd₁ d₂ : ℝ\nh : d₁ < d₂\ns : Set X\nH : ↑↑μH[d₂] s ≠ 0 ∧ ↑↑μH[d₁] s ≠ ⊤\nc : ℝ≥0\nhc : c ≠ 0\nthis : 0 < ↑c ^ (d₂ - d₁)⁻¹\nr : ℝ≥0∞\nhr₀ : 0 ≤ r\nhrc : r < ↑c ^ (d₂ - d₁)⁻¹\n⊢ r ^ d₂ ≤ (↑c • fun r => r ^ d₁) r\n[PROOFSTEP]\nlift r to ℝ≥0 using ne_top_of_lt hrc\n[GOAL]\ncase h.intro.intro\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\nd₁ d₂ : ℝ\nh : d₁ < d₂\ns : Set X\nH : ↑↑μH[d₂] s ≠ 0 ∧ ↑↑μH[d₁] s ≠ ⊤\nc : ℝ≥0\nhc : c ≠ 0\nthis : 0 < ↑c ^ (d₂ - d₁)⁻¹\nr : ℝ≥0\nhr₀ : 0 ≤ ↑r\nhrc : ↑r < ↑c ^ (d₂ - d₁)⁻¹\n⊢ ↑r ^ d₂ ≤ (↑c • fun r => r ^ d₁) ↑r\n[PROOFSTEP]\nrw [Pi.smul_apply, smul_eq_mul, ←\n  ENNReal.div_le_iff_le_mul (Or.inr ENNReal.coe_ne_top) (Or.inr <| mt ENNReal.coe_eq_zero.1 hc)]\n[GOAL]\ncase h.intro.intro\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\nd₁ d₂ : ℝ\nh : d₁ < d₂\ns : Set X\nH : ↑↑μH[d₂] s ≠ 0 ∧ ↑↑μH[d₁] s ≠ ⊤\nc : ℝ≥0\nhc : c ≠ 0\nthis : 0 < ↑c ^ (d₂ - d₁)⁻¹\nr : ℝ≥0\nhr₀ : 0 ≤ ↑r\nhrc : ↑r < ↑c ^ (d₂ - d₁)⁻¹\n⊢ ↑r ^ d₂ / ↑r ^ d₁ ≤ ↑c\n[PROOFSTEP]\nrcases eq_or_ne r 0 with (rfl | hr₀)\n[GOAL]\ncase h.intro.intro.inl\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\nd₁ d₂ : ℝ\nh : d₁ < d₂\ns : Set X\nH : ↑↑μH[d₂] s ≠ 0 ∧ ↑↑μH[d₁] s ≠ ⊤\nc : ℝ≥0\nhc : c ≠ 0\nthis : 0 < ↑c ^ (d₂ - d₁)⁻¹\nhr₀ : 0 ≤ ↑0\nhrc : ↑0 < ↑c ^ (d₂ - d₁)⁻¹\n⊢ ↑0 ^ d₂ / ↑0 ^ d₁ ≤ ↑c\n[PROOFSTEP]\nrcases lt_or_le 0 d₂ with (h₂ | h₂)\n[GOAL]\ncase h.intro.intro.inl.inl\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\nd₁ d₂ : ℝ\nh : d₁ < d₂\ns : Set X\nH : ↑↑μH[d₂] s ≠ 0 ∧ ↑↑μH[d₁] s ≠ ⊤\nc : ℝ≥0\nhc : c ≠ 0\nthis : 0 < ↑c ^ (d₂ - d₁)⁻¹\nhr₀ : 0 ≤ ↑0\nhrc : ↑0 < ↑c ^ (d₂ - d₁)⁻¹\nh₂ : 0 < d₂\n⊢ ↑0 ^ d₂ / ↑0 ^ d₁ ≤ ↑c\n[PROOFSTEP]\nsimp only [h₂, ENNReal.zero_rpow_of_pos, zero_le, ENNReal.zero_div, ENNReal.coe_zero]\n[GOAL]\ncase h.intro.intro.inl.inr\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\nd₁ d₂ : ℝ\nh : d₁ < d₂\ns : Set X\nH : ↑↑μH[d₂] s ≠ 0 ∧ ↑↑μH[d₁] s ≠ ⊤\nc : ℝ≥0\nhc : c ≠ 0\nthis : 0 < ↑c ^ (d₂ - d₁)⁻¹\nhr₀ : 0 ≤ ↑0\nhrc : ↑0 < ↑c ^ (d₂ - d₁)⁻¹\nh₂ : d₂ ≤ 0\n⊢ ↑0 ^ d₂ / ↑0 ^ d₁ ≤ ↑c\n[PROOFSTEP]\nsimp only [h.trans_le h₂, ENNReal.div_top, zero_le, ENNReal.zero_rpow_of_neg, ENNReal.coe_zero]\n[GOAL]\ncase h.intro.intro.inr\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\nd₁ d₂ : ℝ\nh : d₁ < d₂\ns : Set X\nH : ↑↑μH[d₂] s ≠ 0 ∧ ↑↑μH[d₁] s ≠ ⊤\nc : ℝ≥0\nhc : c ≠ 0\nthis : 0 < ↑c ^ (d₂ - d₁)⁻¹\nr : ℝ≥0\nhr₀✝ : 0 ≤ ↑r\nhrc : ↑r < ↑c ^ (d₂ - d₁)⁻¹\nhr₀ : r ≠ 0\n⊢ ↑r ^ d₂ / ↑r ^ d₁ ≤ ↑c\n[PROOFSTEP]\nhave : (r : ℝ≥0∞) ≠ 0 := by simpa only [ENNReal.coe_eq_zero, Ne.def] using hr₀\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\nd₁ d₂ : ℝ\nh : d₁ < d₂\ns : Set X\nH : ↑↑μH[d₂] s ≠ 0 ∧ ↑↑μH[d₁] s ≠ ⊤\nc : ℝ≥0\nhc : c ≠ 0\nthis : 0 < ↑c ^ (d₂ - d₁)⁻¹\nr : ℝ≥0\nhr₀✝ : 0 ≤ ↑r\nhrc : ↑r < ↑c ^ (d₂ - d₁)⁻¹\nhr₀ : r ≠ 0\n⊢ ↑r ≠ 0\n[PROOFSTEP]\nsimpa only [ENNReal.coe_eq_zero, Ne.def] using hr₀\n[GOAL]\ncase h.intro.intro.inr\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\nd₁ d₂ : ℝ\nh : d₁ < d₂\ns : Set X\nH : ↑↑μH[d₂] s ≠ 0 ∧ ↑↑μH[d₁] s ≠ ⊤\nc : ℝ≥0\nhc : c ≠ 0\nthis✝ : 0 < ↑c ^ (d₂ - d₁)⁻¹\nr : ℝ≥0\nhr₀✝ : 0 ≤ ↑r\nhrc : ↑r < ↑c ^ (d₂ - d₁)⁻¹\nhr₀ : r ≠ 0\nthis : ↑r ≠ 0\n⊢ ↑r ^ d₂ / ↑r ^ d₁ ≤ ↑c\n[PROOFSTEP]\nrw [← ENNReal.rpow_sub _ _ this ENNReal.coe_ne_top]\n[GOAL]\ncase h.intro.intro.inr\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\nd₁ d₂ : ℝ\nh : d₁ < d₂\ns : Set X\nH : ↑↑μH[d₂] s ≠ 0 ∧ ↑↑μH[d₁] s ≠ ⊤\nc : ℝ≥0\nhc : c ≠ 0\nthis✝ : 0 < ↑c ^ (d₂ - d₁)⁻¹\nr : ℝ≥0\nhr₀✝ : 0 ≤ ↑r\nhrc : ↑r < ↑c ^ (d₂ - d₁)⁻¹\nhr₀ : r ≠ 0\nthis : ↑r ≠ 0\n⊢ ↑r ^ (d₂ - d₁) ≤ ↑c\n[PROOFSTEP]\nrefine' (ENNReal.rpow_lt_rpow hrc (sub_pos.2 h)).le.trans _\n[GOAL]\ncase h.intro.intro.inr\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\nd₁ d₂ : ℝ\nh : d₁ < d₂\ns : Set X\nH : ↑↑μH[d₂] s ≠ 0 ∧ ↑↑μH[d₁] s ≠ ⊤\nc : ℝ≥0\nhc : c ≠ 0\nthis✝ : 0 < ↑c ^ (d₂ - d₁)⁻¹\nr : ℝ≥0\nhr₀✝ : 0 ≤ ↑r\nhrc : ↑r < ↑c ^ (d₂ - d₁)⁻¹\nhr₀ : r ≠ 0\nthis : ↑r ≠ 0\n⊢ (↑c ^ (d₂ - d₁)⁻¹) ^ (d₂ - d₁) ≤ ↑c\n[PROOFSTEP]\nrw [← ENNReal.rpow_mul, inv_mul_cancel (sub_pos.2 h).ne', ENNReal.rpow_one]\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\nd₁ d₂ : ℝ\nh : d₁ ≤ d₂\ns : Set X\n⊢ ↑↑μH[d₂] s ≤ ↑↑μH[d₁] s\n[PROOFSTEP]\nrcases h.eq_or_lt with (rfl | h)\n[GOAL]\ncase inl\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\nd₁ : ℝ\ns : Set X\nh : d₁ ≤ d₁\n⊢ ↑↑μH[d₁] s ≤ ↑↑μH[d₁] s\n[PROOFSTEP]\nexact le_rfl\n[GOAL]\ncase inr\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\nd₁ d₂ : ℝ\nh✝ : d₁ ≤ d₂\ns : Set X\nh : d₁ < d₂\n⊢ ↑↑μH[d₂] s ≤ ↑↑μH[d₁] s\n[PROOFSTEP]\ncases' hausdorffMeasure_zero_or_top h s with hs hs\n[GOAL]\ncase inr.inl\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\nd₁ d₂ : ℝ\nh✝ : d₁ ≤ d₂\ns : Set X\nh : d₁ < d₂\nhs : ↑↑μH[d₂] s = 0\n⊢ ↑↑μH[d₂] s ≤ ↑↑μH[d₁] s\n[PROOFSTEP]\nrw [hs]\n[GOAL]\ncase inr.inl\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\nd₁ d₂ : ℝ\nh✝ : d₁ ≤ d₂\ns : Set X\nh : d₁ < d₂\nhs : ↑↑μH[d₂] s = 0\n⊢ 0 ≤ ↑↑μH[d₁] s\n[PROOFSTEP]\nexact zero_le _\n[GOAL]\ncase inr.inr\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\nd₁ d₂ : ℝ\nh✝ : d₁ ≤ d₂\ns : Set X\nh : d₁ < d₂\nhs : ↑↑μH[d₁] s = ⊤\n⊢ ↑↑μH[d₂] s ≤ ↑↑μH[d₁] s\n[PROOFSTEP]\nrw [hs]\n[GOAL]\ncase inr.inr\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\nd₁ d₂ : ℝ\nh✝ : d₁ ≤ d₂\ns : Set X\nh : d₁ < d₂\nhs : ↑↑μH[d₁] s = ⊤\n⊢ ↑↑μH[d₂] s ≤ ⊤\n[PROOFSTEP]\nexact le_top\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\nd : ℝ\nhd : 0 < d\n⊢ NoAtoms μH[d]\n[PROOFSTEP]\nrefine' ⟨fun x => _⟩\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\nd : ℝ\nhd : 0 < d\nx : X\n⊢ ↑↑μH[d] {x} = 0\n[PROOFSTEP]\nrw [← nonpos_iff_eq_zero, hausdorffMeasure_apply]\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\nd : ℝ\nhd : 0 < d\nx : X\n⊢ ⨆ (r : ℝ≥0∞) (_ : 0 < r),\n      ⨅ (t : ℕ → Set X) (_ : {x} ⊆ ⋃ (n : ℕ), t n) (_ : ∀ (n : ℕ), diam (t n) ≤ r),\n        ∑' (n : ℕ), ⨆ (_ : Set.Nonempty (t n)), diam (t n) ^ d ≤\n    0\n[PROOFSTEP]\nrefine' iSup₂_le fun ε _ => iInf₂_le_of_le (fun _ => { x }) _ <| iInf_le_of_le (fun _ => _) _\n[GOAL]\ncase refine'_1\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\nd : ℝ\nhd : 0 < d\nx : X\nε : ℝ≥0∞\nx✝ : 0 < ε\n⊢ {x} ⊆ ⋃ (n : ℕ), (fun x_1 => {x}) n\n[PROOFSTEP]\nexact subset_iUnion (fun _ => { x } : ℕ → Set X) 0\n[GOAL]\ncase refine'_2\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\nd : ℝ\nhd : 0 < d\nx : X\nε : ℝ≥0∞\nx✝¹ : 0 < ε\nx✝ : ℕ\n⊢ diam ((fun x_1 => {x}) x✝) ≤ ε\n[PROOFSTEP]\nsimp only [EMetric.diam_singleton, zero_le]\n[GOAL]\ncase refine'_3\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\nd : ℝ\nhd : 0 < d\nx : X\nε : ℝ≥0∞\nx✝ : 0 < ε\n⊢ ∑' (n : ℕ), ⨆ (_ : Set.Nonempty ((fun x_1 => {x}) n)), diam ((fun x_2 => {x}) n) ^ d ≤ 0\n[PROOFSTEP]\nsimp [hd]\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\nx : X\n⊢ ↑↑μH[0] {x} = 1\n[PROOFSTEP]\napply le_antisymm\n[GOAL]\ncase a\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\nx : X\n⊢ ↑↑μH[0] {x} ≤ 1\n[PROOFSTEP]\nlet r : ℕ → ℝ≥0∞ := fun _ => 0\n[GOAL]\ncase a\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\nx : X\nr : ℕ → ℝ≥0∞ := fun x => 0\n⊢ ↑↑μH[0] {x} ≤ 1\n[PROOFSTEP]\nlet t : ℕ → Unit → Set X := fun _ _ => { x }\n[GOAL]\ncase a\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\nx : X\nr : ℕ → ℝ≥0∞ := fun x => 0\nt : ℕ → Unit → Set X := fun x_1 x_2 => {x}\n⊢ ↑↑μH[0] {x} ≤ 1\n[PROOFSTEP]\nhave ht : ∀ᶠ n in atTop, ∀ i, diam (t n i) ≤ r n := by\n  simp only [imp_true_iff, eq_self_iff_true, diam_singleton, eventually_atTop, nonpos_iff_eq_zero, exists_const]\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\nx : X\nr : ℕ → ℝ≥0∞ := fun x => 0\nt : ℕ → Unit → Set X := fun x_1 x_2 => {x}\n⊢ ∀ᶠ (n : ℕ) in atTop, ∀ (i : Unit), diam (t n i) ≤ r n\n[PROOFSTEP]\nsimp only [imp_true_iff, eq_self_iff_true, diam_singleton, eventually_atTop, nonpos_iff_eq_zero, exists_const]\n[GOAL]\ncase a\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\nx : X\nr : ℕ → ℝ≥0∞ := fun x => 0\nt : ℕ → Unit → Set X := fun x_1 x_2 => {x}\nht : ∀ᶠ (n : ℕ) in atTop, ∀ (i : Unit), diam (t n i) ≤ r n\n⊢ ↑↑μH[0] {x} ≤ 1\n[PROOFSTEP]\nsimpa [liminf_const] using hausdorffMeasure_le_liminf_sum 0 { x } r tendsto_const_nhds t ht\n[GOAL]\ncase a\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\nx : X\n⊢ 1 ≤ ↑↑μH[0] {x}\n[PROOFSTEP]\nrw [hausdorffMeasure_apply]\n[GOAL]\ncase a\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\nx : X\n⊢ 1 ≤\n    ⨆ (r : ℝ≥0∞) (_ : 0 < r),\n      ⨅ (t : ℕ → Set X) (_ : {x} ⊆ ⋃ (n : ℕ), t n) (_ : ∀ (n : ℕ), diam (t n) ≤ r),\n        ∑' (n : ℕ), ⨆ (_ : Set.Nonempty (t n)), diam (t n) ^ 0\n[PROOFSTEP]\nsuffices\n  (1 : ℝ≥0∞) ≤\n    ⨅ (t : ℕ → Set X) (_ : { x } ⊆ ⋃ n, t n) (_ : ∀ n, diam (t n) ≤ 1), ∑' n, ⨆ _ : (t n).Nonempty, diam (t n) ^ (0 : ℝ)\n  by\n  apply le_trans this _\n  convert le_iSup₂ (α := ℝ≥0∞) (1 : ℝ≥0∞) zero_lt_one\n  rfl\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\nx : X\nthis :\n  1 ≤\n    ⨅ (t : ℕ → Set X) (_ : {x} ⊆ ⋃ (n : ℕ), t n) (_ : ∀ (n : ℕ), diam (t n) ≤ 1),\n      ∑' (n : ℕ), ⨆ (_ : Set.Nonempty (t n)), diam (t n) ^ 0\n⊢ 1 ≤\n    ⨆ (r : ℝ≥0∞) (_ : 0 < r),\n      ⨅ (t : ℕ → Set X) (_ : {x} ⊆ ⋃ (n : ℕ), t n) (_ : ∀ (n : ℕ), diam (t n) ≤ r),\n        ∑' (n : ℕ), ⨆ (_ : Set.Nonempty (t n)), diam (t n) ^ 0\n[PROOFSTEP]\napply le_trans this _\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\nx : X\nthis :\n  1 ≤\n    ⨅ (t : ℕ → Set X) (_ : {x} ⊆ ⋃ (n : ℕ), t n) (_ : ∀ (n : ℕ), diam (t n) ≤ 1),\n      ∑' (n : ℕ), ⨆ (_ : Set.Nonempty (t n)), diam (t n) ^ 0\n⊢ ⨅ (t : ℕ → Set X) (_ : {x} ⊆ ⋃ (n : ℕ), t n) (_ : ∀ (n : ℕ), diam (t n) ≤ 1),\n      ∑' (n : ℕ), ⨆ (_ : Set.Nonempty (t n)), diam (t n) ^ 0 ≤\n    ⨆ (r : ℝ≥0∞) (_ : 0 < r),\n      ⨅ (t : ℕ → Set X) (_ : {x} ⊆ ⋃ (n : ℕ), t n) (_ : ∀ (n : ℕ), diam (t n) ≤ r),\n        ∑' (n : ℕ), ⨆ (_ : Set.Nonempty (t n)), diam (t n) ^ 0\n[PROOFSTEP]\nconvert le_iSup₂ (α := ℝ≥0∞) (1 : ℝ≥0∞) zero_lt_one\n[GOAL]\ncase h.e'_3\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\nx : X\nthis :\n  1 ≤\n    ⨅ (t : ℕ → Set X) (_ : {x} ⊆ ⋃ (n : ℕ), t n) (_ : ∀ (n : ℕ), diam (t n) ≤ 1),\n      ∑' (n : ℕ), ⨆ (_ : Set.Nonempty (t n)), diam (t n) ^ 0\n⊢ ⨅ (t : ℕ → Set X) (_ : {x} ⊆ ⋃ (n : ℕ), t n) (_ : ∀ (n : ℕ), diam (t n) ≤ 1),\n      ∑' (n : ℕ), ⨆ (_ : Set.Nonempty (t n)), diam (t n) ^ 0 =\n    ⨅ (t : ℕ → Set X) (_ : {x} ⊆ ⋃ (n : ℕ), t n) (_ : ∀ (n : ℕ), diam (t n) ≤ 1),\n      ∑' (n : ℕ), ⨆ (_ : Set.Nonempty (t n)), diam (t n) ^ 0\n[PROOFSTEP]\nrfl\n[GOAL]\ncase a\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\nx : X\n⊢ 1 ≤\n    ⨅ (t : ℕ → Set X) (_ : {x} ⊆ ⋃ (n : ℕ), t n) (_ : ∀ (n : ℕ), diam (t n) ≤ 1),\n      ∑' (n : ℕ), ⨆ (_ : Set.Nonempty (t n)), diam (t n) ^ 0\n[PROOFSTEP]\nsimp only [ENNReal.rpow_zero, le_iInf_iff]\n[GOAL]\ncase a\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\nx : X\n⊢ ∀ (i : ℕ → Set X), {x} ⊆ ⋃ (n : ℕ), i n → (∀ (n : ℕ), diam (i n) ≤ 1) → 1 ≤ ∑' (n : ℕ), ⨆ (_ : Set.Nonempty (i n)), 1\n[PROOFSTEP]\nintro t hst _\n[GOAL]\ncase a\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\nx : X\nt : ℕ → Set X\nhst : {x} ⊆ ⋃ (n : ℕ), t n\ni✝ : ∀ (n : ℕ), diam (t n) ≤ 1\n⊢ 1 ≤ ∑' (n : ℕ), ⨆ (_ : Set.Nonempty (t n)), 1\n[PROOFSTEP]\nrcases mem_iUnion.1 (hst (mem_singleton x)) with ⟨m, hm⟩\n[GOAL]\ncase a.intro\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\nx : X\nt : ℕ → Set X\nhst : {x} ⊆ ⋃ (n : ℕ), t n\ni✝ : ∀ (n : ℕ), diam (t n) ≤ 1\nm : ℕ\nhm : x ∈ t m\n⊢ 1 ≤ ∑' (n : ℕ), ⨆ (_ : Set.Nonempty (t n)), 1\n[PROOFSTEP]\nhave A : (t m).Nonempty := ⟨x, hm⟩\n[GOAL]\ncase a.intro\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\nx : X\nt : ℕ → Set X\nhst : {x} ⊆ ⋃ (n : ℕ), t n\ni✝ : ∀ (n : ℕ), diam (t n) ≤ 1\nm : ℕ\nhm : x ∈ t m\nA : Set.Nonempty (t m)\n⊢ 1 ≤ ∑' (n : ℕ), ⨆ (_ : Set.Nonempty (t n)), 1\n[PROOFSTEP]\ncalc\n  (1 : ℝ≥0∞) = ⨆ h : (t m).Nonempty, 1 := by simp only [A, ciSup_pos]\n  _ ≤ ∑' n, ⨆ h : (t n).Nonempty, 1 := ENNReal.le_tsum _\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\nx : X\nt : ℕ → Set X\nhst : {x} ⊆ ⋃ (n : ℕ), t n\ni✝ : ∀ (n : ℕ), diam (t n) ≤ 1\nm : ℕ\nhm : x ∈ t m\nA : Set.Nonempty (t m)\n⊢ 1 = ⨆ (_ : Set.Nonempty (t m)), 1\n[PROOFSTEP]\nsimp only [A, ciSup_pos]\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\ns : Set X\nh : Set.Nonempty s\n⊢ 1 ≤ ↑↑μH[0] s\n[PROOFSTEP]\nrcases h with ⟨x, hx⟩\n[GOAL]\ncase intro\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\ns : Set X\nx : X\nhx : x ∈ s\n⊢ 1 ≤ ↑↑μH[0] s\n[PROOFSTEP]\ncalc\n  (1 : ℝ≥0∞) = μH[0] ({ x } : Set X) := (hausdorffMeasure_zero_singleton x).symm\n  _ ≤ μH[0] s := measure_mono (singleton_subset_iff.2 hx)\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\ns : Set X\nhs : Set.Subsingleton s\nd : ℝ\nhd : 0 ≤ d\n⊢ ↑↑μH[d] s ≤ 1\n[PROOFSTEP]\nrcases eq_empty_or_nonempty s with (rfl | ⟨x, hx⟩)\n[GOAL]\ncase inl\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\nd : ℝ\nhd : 0 ≤ d\nhs : Set.Subsingleton ∅\n⊢ ↑↑μH[d] ∅ ≤ 1\n[PROOFSTEP]\nsimp only [measure_empty, zero_le]\n[GOAL]\ncase inr.intro\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\ns : Set X\nhs : Set.Subsingleton s\nd : ℝ\nhd : 0 ≤ d\nx : X\nhx : x ∈ s\n⊢ ↑↑μH[d] s ≤ 1\n[PROOFSTEP]\nrw [(subsingleton_iff_singleton hx).1 hs]\n[GOAL]\ncase inr.intro\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\ns : Set X\nhs : Set.Subsingleton s\nd : ℝ\nhd : 0 ≤ d\nx : X\nhx : x ∈ s\n⊢ ↑↑μH[d] {x} ≤ 1\n[PROOFSTEP]\nrcases eq_or_lt_of_le hd with (rfl | dpos)\n[GOAL]\ncase inr.intro.inl\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\ns : Set X\nhs : Set.Subsingleton s\nx : X\nhx : x ∈ s\nhd : 0 ≤ 0\n⊢ ↑↑μH[0] {x} ≤ 1\n[PROOFSTEP]\nsimp only [le_refl, hausdorffMeasure_zero_singleton]\n[GOAL]\ncase inr.intro.inr\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\ns : Set X\nhs : Set.Subsingleton s\nd : ℝ\nhd : 0 ≤ d\nx : X\nhx : x ∈ s\ndpos : 0 < d\n⊢ ↑↑μH[d] {x} ≤ 1\n[PROOFSTEP]\nhaveI := noAtoms_hausdorff X dpos\n[GOAL]\ncase inr.intro.inr\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝³ : EMetricSpace X\ninst✝² : EMetricSpace Y\ninst✝¹ : MeasurableSpace X\ninst✝ : BorelSpace X\ns : Set X\nhs : Set.Subsingleton s\nd : ℝ\nhd : 0 ≤ d\nx : X\nhx : x ∈ s\ndpos : 0 < d\nthis : NoAtoms μH[d]\n⊢ ↑↑μH[d] {x} ≤ 1\n[PROOFSTEP]\nsimp only [zero_le, measure_singleton]\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁵ : EMetricSpace X\ninst✝⁴ : EMetricSpace Y\ninst✝³ : MeasurableSpace X\ninst✝² : BorelSpace X\ninst✝¹ : MeasurableSpace Y\ninst✝ : BorelSpace Y\nC r : ℝ≥0\nf : X → Y\ns t : Set X\nh : HolderOnWith C r f s\nhr : 0 < r\nd : ℝ\nhd : 0 ≤ d\n⊢ ↑↑μH[d] (f '' s) ≤ ↑C ^ d * ↑↑μH[↑r * d] s\n[PROOFSTEP]\nrcases(zero_le C).eq_or_lt with (rfl | hC0)\n[GOAL]\ncase inl\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁵ : EMetricSpace X\ninst✝⁴ : EMetricSpace Y\ninst✝³ : MeasurableSpace X\ninst✝² : BorelSpace X\ninst✝¹ : MeasurableSpace Y\ninst✝ : BorelSpace Y\nr : ℝ≥0\nf : X → Y\ns t : Set X\nhr : 0 < r\nd : ℝ\nhd : 0 ≤ d\nh : HolderOnWith 0 r f s\n⊢ ↑↑μH[d] (f '' s) ≤ ↑0 ^ d * ↑↑μH[↑r * d] s\n[PROOFSTEP]\nrcases eq_empty_or_nonempty s with (rfl | ⟨x, hx⟩)\n[GOAL]\ncase inl.inl\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁵ : EMetricSpace X\ninst✝⁴ : EMetricSpace Y\ninst✝³ : MeasurableSpace X\ninst✝² : BorelSpace X\ninst✝¹ : MeasurableSpace Y\ninst✝ : BorelSpace Y\nr : ℝ≥0\nf : X → Y\nt : Set X\nhr : 0 < r\nd : ℝ\nhd : 0 ≤ d\nh : HolderOnWith 0 r f ∅\n⊢ ↑↑μH[d] (f '' ∅) ≤ ↑0 ^ d * ↑↑μH[↑r * d] ∅\n[PROOFSTEP]\nsimp only [measure_empty, nonpos_iff_eq_zero, mul_zero, image_empty]\n[GOAL]\ncase inl.inr.intro\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁵ : EMetricSpace X\ninst✝⁴ : EMetricSpace Y\ninst✝³ : MeasurableSpace X\ninst✝² : BorelSpace X\ninst✝¹ : MeasurableSpace Y\ninst✝ : BorelSpace Y\nr : ℝ≥0\nf : X → Y\ns t : Set X\nhr : 0 < r\nd : ℝ\nhd : 0 ≤ d\nh : HolderOnWith 0 r f s\nx : X\nhx : x ∈ s\n⊢ ↑↑μH[d] (f '' s) ≤ ↑0 ^ d * ↑↑μH[↑r * d] s\n[PROOFSTEP]\nhave : f '' s = {f x} :=\n  haveI : (f '' s).Subsingleton := by simpa [diam_eq_zero_iff] using h.ediam_image_le\n  (subsingleton_iff_singleton (mem_image_of_mem f hx)).1 this\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁵ : EMetricSpace X\ninst✝⁴ : EMetricSpace Y\ninst✝³ : MeasurableSpace X\ninst✝² : BorelSpace X\ninst✝¹ : MeasurableSpace Y\ninst✝ : BorelSpace Y\nr : ℝ≥0\nf : X → Y\ns t : Set X\nhr : 0 < r\nd : ℝ\nhd : 0 ≤ d\nh : HolderOnWith 0 r f s\nx : X\nhx : x ∈ s\n⊢ Set.Subsingleton (f '' s)\n[PROOFSTEP]\nsimpa [diam_eq_zero_iff] using h.ediam_image_le\n[GOAL]\ncase inl.inr.intro\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁵ : EMetricSpace X\ninst✝⁴ : EMetricSpace Y\ninst✝³ : MeasurableSpace X\ninst✝² : BorelSpace X\ninst✝¹ : MeasurableSpace Y\ninst✝ : BorelSpace Y\nr : ℝ≥0\nf : X → Y\ns t : Set X\nhr : 0 < r\nd : ℝ\nhd : 0 ≤ d\nh : HolderOnWith 0 r f s\nx : X\nhx : x ∈ s\nthis : f '' s = {f x}\n⊢ ↑↑μH[d] (f '' s) ≤ ↑0 ^ d * ↑↑μH[↑r * d] s\n[PROOFSTEP]\nrw [this]\n[GOAL]\ncase inl.inr.intro\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁵ : EMetricSpace X\ninst✝⁴ : EMetricSpace Y\ninst✝³ : MeasurableSpace X\ninst✝² : BorelSpace X\ninst✝¹ : MeasurableSpace Y\ninst✝ : BorelSpace Y\nr : ℝ≥0\nf : X → Y\ns t : Set X\nhr : 0 < r\nd : ℝ\nhd : 0 ≤ d\nh : HolderOnWith 0 r f s\nx : X\nhx : x ∈ s\nthis : f '' s = {f x}\n⊢ ↑↑μH[d] {f x} ≤ ↑0 ^ d * ↑↑μH[↑r * d] s\n[PROOFSTEP]\nrcases eq_or_lt_of_le hd with (rfl | h'd)\n[GOAL]\ncase inl.inr.intro.inl\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁵ : EMetricSpace X\ninst✝⁴ : EMetricSpace Y\ninst✝³ : MeasurableSpace X\ninst✝² : BorelSpace X\ninst✝¹ : MeasurableSpace Y\ninst✝ : BorelSpace Y\nr : ℝ≥0\nf : X → Y\ns t : Set X\nhr : 0 < r\nh : HolderOnWith 0 r f s\nx : X\nhx : x ∈ s\nthis : f '' s = {f x}\nhd : 0 ≤ 0\n⊢ ↑↑μH[0] {f x} ≤ ↑0 ^ 0 * ↑↑μH[↑r * 0] s\n[PROOFSTEP]\nsimp only [ENNReal.rpow_zero, one_mul, mul_zero]\n[GOAL]\ncase inl.inr.intro.inl\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁵ : EMetricSpace X\ninst✝⁴ : EMetricSpace Y\ninst✝³ : MeasurableSpace X\ninst✝² : BorelSpace X\ninst✝¹ : MeasurableSpace Y\ninst✝ : BorelSpace Y\nr : ℝ≥0\nf : X → Y\ns t : Set X\nhr : 0 < r\nh : HolderOnWith 0 r f s\nx : X\nhx : x ∈ s\nthis : f '' s = {f x}\nhd : 0 ≤ 0\n⊢ ↑↑μH[0] {f x} ≤ ↑↑μH[0] s\n[PROOFSTEP]\nrw [hausdorffMeasure_zero_singleton]\n[GOAL]\ncase inl.inr.intro.inl\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁵ : EMetricSpace X\ninst✝⁴ : EMetricSpace Y\ninst✝³ : MeasurableSpace X\ninst✝² : BorelSpace X\ninst✝¹ : MeasurableSpace Y\ninst✝ : BorelSpace Y\nr : ℝ≥0\nf : X → Y\ns t : Set X\nhr : 0 < r\nh : HolderOnWith 0 r f s\nx : X\nhx : x ∈ s\nthis : f '' s = {f x}\nhd : 0 ≤ 0\n⊢ 1 ≤ ↑↑μH[0] s\n[PROOFSTEP]\nexact one_le_hausdorffMeasure_zero_of_nonempty ⟨x, hx⟩\n[GOAL]\ncase inl.inr.intro.inr\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁵ : EMetricSpace X\ninst✝⁴ : EMetricSpace Y\ninst✝³ : MeasurableSpace X\ninst✝² : BorelSpace X\ninst✝¹ : MeasurableSpace Y\ninst✝ : BorelSpace Y\nr : ℝ≥0\nf : X → Y\ns t : Set X\nhr : 0 < r\nd : ℝ\nhd : 0 ≤ d\nh : HolderOnWith 0 r f s\nx : X\nhx : x ∈ s\nthis : f '' s = {f x}\nh'd : 0 < d\n⊢ ↑↑μH[d] {f x} ≤ ↑0 ^ d * ↑↑μH[↑r * d] s\n[PROOFSTEP]\nhaveI := noAtoms_hausdorff Y h'd\n[GOAL]\ncase inl.inr.intro.inr\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁵ : EMetricSpace X\ninst✝⁴ : EMetricSpace Y\ninst✝³ : MeasurableSpace X\ninst✝² : BorelSpace X\ninst✝¹ : MeasurableSpace Y\ninst✝ : BorelSpace Y\nr : ℝ≥0\nf : X → Y\ns t : Set X\nhr : 0 < r\nd : ℝ\nhd : 0 ≤ d\nh : HolderOnWith 0 r f s\nx : X\nhx : x ∈ s\nthis✝ : f '' s = {f x}\nh'd : 0 < d\nthis : NoAtoms μH[d]\n⊢ ↑↑μH[d] {f x} ≤ ↑0 ^ d * ↑↑μH[↑r * d] s\n[PROOFSTEP]\nsimp only [zero_le, measure_singleton]\n  -- Now assume `C ≠ 0`\n[GOAL]\ncase inr\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁵ : EMetricSpace X\ninst✝⁴ : EMetricSpace Y\ninst✝³ : MeasurableSpace X\ninst✝² : BorelSpace X\ninst✝¹ : MeasurableSpace Y\ninst✝ : BorelSpace Y\nC r : ℝ≥0\nf : X → Y\ns t : Set X\nh : HolderOnWith C r f s\nhr : 0 < r\nd : ℝ\nhd : 0 ≤ d\nhC0 : 0 < C\n⊢ ↑↑μH[d] (f '' s) ≤ ↑C ^ d * ↑↑μH[↑r * d] s\n[PROOFSTEP]\nhave hCd0 : (C : ℝ≥0∞) ^ d ≠ 0 := by simp [hC0.ne']\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁵ : EMetricSpace X\ninst✝⁴ : EMetricSpace Y\ninst✝³ : MeasurableSpace X\ninst✝² : BorelSpace X\ninst✝¹ : MeasurableSpace Y\ninst✝ : BorelSpace Y\nC r : ℝ≥0\nf : X → Y\ns t : Set X\nh : HolderOnWith C r f s\nhr : 0 < r\nd : ℝ\nhd : 0 ≤ d\nhC0 : 0 < C\n⊢ ↑C ^ d ≠ 0\n[PROOFSTEP]\nsimp [hC0.ne']\n[GOAL]\ncase inr\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁵ : EMetricSpace X\ninst✝⁴ : EMetricSpace Y\ninst✝³ : MeasurableSpace X\ninst✝² : BorelSpace X\ninst✝¹ : MeasurableSpace Y\ninst✝ : BorelSpace Y\nC r : ℝ≥0\nf : X → Y\ns t : Set X\nh : HolderOnWith C r f s\nhr : 0 < r\nd : ℝ\nhd : 0 ≤ d\nhC0 : 0 < C\nhCd0 : ↑C ^ d ≠ 0\n⊢ ↑↑μH[d] (f '' s) ≤ ↑C ^ d * ↑↑μH[↑r * d] s\n[PROOFSTEP]\nhave hCd : (C : ℝ≥0∞) ^ d ≠ ∞ := by simp [hd]\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁵ : EMetricSpace X\ninst✝⁴ : EMetricSpace Y\ninst✝³ : MeasurableSpace X\ninst✝² : BorelSpace X\ninst✝¹ : MeasurableSpace Y\ninst✝ : BorelSpace Y\nC r : ℝ≥0\nf : X → Y\ns t : Set X\nh : HolderOnWith C r f s\nhr : 0 < r\nd : ℝ\nhd : 0 ≤ d\nhC0 : 0 < C\nhCd0 : ↑C ^ d ≠ 0\n⊢ ↑C ^ d ≠ ⊤\n[PROOFSTEP]\nsimp [hd]\n[GOAL]\ncase inr\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁵ : EMetricSpace X\ninst✝⁴ : EMetricSpace Y\ninst✝³ : MeasurableSpace X\ninst✝² : BorelSpace X\ninst✝¹ : MeasurableSpace Y\ninst✝ : BorelSpace Y\nC r : ℝ≥0\nf : X → Y\ns t : Set X\nh : HolderOnWith C r f s\nhr : 0 < r\nd : ℝ\nhd : 0 ≤ d\nhC0 : 0 < C\nhCd0 : ↑C ^ d ≠ 0\nhCd : ↑C ^ d ≠ ⊤\n⊢ ↑↑μH[d] (f '' s) ≤ ↑C ^ d * ↑↑μH[↑r * d] s\n[PROOFSTEP]\nsimp only [hausdorffMeasure_apply, ENNReal.mul_iSup, ENNReal.mul_iInf_of_ne hCd0 hCd, ← ENNReal.tsum_mul_left]\n[GOAL]\ncase inr\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁵ : EMetricSpace X\ninst✝⁴ : EMetricSpace Y\ninst✝³ : MeasurableSpace X\ninst✝² : BorelSpace X\ninst✝¹ : MeasurableSpace Y\ninst✝ : BorelSpace Y\nC r : ℝ≥0\nf : X → Y\ns t : Set X\nh : HolderOnWith C r f s\nhr : 0 < r\nd : ℝ\nhd : 0 ≤ d\nhC0 : 0 < C\nhCd0 : ↑C ^ d ≠ 0\nhCd : ↑C ^ d ≠ ⊤\n⊢ ⨆ (r : ℝ≥0∞) (_ : 0 < r),\n      ⨅ (t : ℕ → Set Y) (_ : f '' s ⊆ ⋃ (n : ℕ), t n) (_ : ∀ (n : ℕ), diam (t n) ≤ r),\n        ∑' (n : ℕ), ⨆ (_ : Set.Nonempty (t n)), diam (t n) ^ d ≤\n    ⨆ (i : ℝ≥0∞) (_ : 0 < i),\n      ⨅ (i_1 : ℕ → Set X) (_ : s ⊆ ⋃ (n : ℕ), i_1 n) (_ : ∀ (n : ℕ), diam (i_1 n) ≤ i),\n        ∑' (i : ℕ), ⨆ (_ : Set.Nonempty (i_1 i)), ↑C ^ d * diam (i_1 i) ^ (↑r * d)\n[PROOFSTEP]\nrefine' iSup_le fun R => iSup_le fun hR => _\n[GOAL]\ncase inr\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁵ : EMetricSpace X\ninst✝⁴ : EMetricSpace Y\ninst✝³ : MeasurableSpace X\ninst✝² : BorelSpace X\ninst✝¹ : MeasurableSpace Y\ninst✝ : BorelSpace Y\nC r : ℝ≥0\nf : X → Y\ns t : Set X\nh : HolderOnWith C r f s\nhr : 0 < r\nd : ℝ\nhd : 0 ≤ d\nhC0 : 0 < C\nhCd0 : ↑C ^ d ≠ 0\nhCd : ↑C ^ d ≠ ⊤\nR : ℝ≥0∞\nhR : 0 < R\n⊢ ⨅ (t : ℕ → Set Y) (_ : f '' s ⊆ ⋃ (n : ℕ), t n) (_ : ∀ (n : ℕ), diam (t n) ≤ R),\n      ∑' (n : ℕ), ⨆ (_ : Set.Nonempty (t n)), diam (t n) ^ d ≤\n    ⨆ (i : ℝ≥0∞) (_ : 0 < i),\n      ⨅ (i_1 : ℕ → Set X) (_ : s ⊆ ⋃ (n : ℕ), i_1 n) (_ : ∀ (n : ℕ), diam (i_1 n) ≤ i),\n        ∑' (i : ℕ), ⨆ (_ : Set.Nonempty (i_1 i)), ↑C ^ d * diam (i_1 i) ^ (↑r * d)\n[PROOFSTEP]\nhave : Tendsto (fun d : ℝ≥0∞ => (C : ℝ≥0∞) * d ^ (r : ℝ)) (𝓝 0) (𝓝 0) :=\n  ENNReal.tendsto_const_mul_rpow_nhds_zero_of_pos ENNReal.coe_ne_top hr\n[GOAL]\ncase inr\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁵ : EMetricSpace X\ninst✝⁴ : EMetricSpace Y\ninst✝³ : MeasurableSpace X\ninst✝² : BorelSpace X\ninst✝¹ : MeasurableSpace Y\ninst✝ : BorelSpace Y\nC r : ℝ≥0\nf : X → Y\ns t : Set X\nh : HolderOnWith C r f s\nhr : 0 < r\nd : ℝ\nhd : 0 ≤ d\nhC0 : 0 < C\nhCd0 : ↑C ^ d ≠ 0\nhCd : ↑C ^ d ≠ ⊤\nR : ℝ≥0∞\nhR : 0 < R\nthis : Tendsto (fun d => ↑C * d ^ ↑r) (𝓝 0) (𝓝 0)\n⊢ ⨅ (t : ℕ → Set Y) (_ : f '' s ⊆ ⋃ (n : ℕ), t n) (_ : ∀ (n : ℕ), diam (t n) ≤ R),\n      ∑' (n : ℕ), ⨆ (_ : Set.Nonempty (t n)), diam (t n) ^ d ≤\n    ⨆ (i : ℝ≥0∞) (_ : 0 < i),\n      ⨅ (i_1 : ℕ → Set X) (_ : s ⊆ ⋃ (n : ℕ), i_1 n) (_ : ∀ (n : ℕ), diam (i_1 n) ≤ i),\n        ∑' (i : ℕ), ⨆ (_ : Set.Nonempty (i_1 i)), ↑C ^ d * diam (i_1 i) ^ (↑r * d)\n[PROOFSTEP]\nrcases ENNReal.nhds_zero_basis_Iic.eventually_iff.1 (this.eventually (gt_mem_nhds hR)) with ⟨δ, δ0, H⟩\n[GOAL]\ncase inr.intro.intro\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁵ : EMetricSpace X\ninst✝⁴ : EMetricSpace Y\ninst✝³ : MeasurableSpace X\ninst✝² : BorelSpace X\ninst✝¹ : MeasurableSpace Y\ninst✝ : BorelSpace Y\nC r : ℝ≥0\nf : X → Y\ns t : Set X\nh : HolderOnWith C r f s\nhr : 0 < r\nd : ℝ\nhd : 0 ≤ d\nhC0 : 0 < C\nhCd0 : ↑C ^ d ≠ 0\nhCd : ↑C ^ d ≠ ⊤\nR : ℝ≥0∞\nhR : 0 < R\nthis : Tendsto (fun d => ↑C * d ^ ↑r) (𝓝 0) (𝓝 0)\nδ : ℝ≥0∞\nδ0 : 0 < δ\nH : ∀ ⦃x : ℝ≥0∞⦄, x ∈ Iic δ → ↑C * x ^ ↑r < R\n⊢ ⨅ (t : ℕ → Set Y) (_ : f '' s ⊆ ⋃ (n : ℕ), t n) (_ : ∀ (n : ℕ), diam (t n) ≤ R),\n      ∑' (n : ℕ), ⨆ (_ : Set.Nonempty (t n)), diam (t n) ^ d ≤\n    ⨆ (i : ℝ≥0∞) (_ : 0 < i),\n      ⨅ (i_1 : ℕ → Set X) (_ : s ⊆ ⋃ (n : ℕ), i_1 n) (_ : ∀ (n : ℕ), diam (i_1 n) ≤ i),\n        ∑' (i : ℕ), ⨆ (_ : Set.Nonempty (i_1 i)), ↑C ^ d * diam (i_1 i) ^ (↑r * d)\n[PROOFSTEP]\nrefine'\n  le_iSup₂_of_le δ δ0\n    (iInf₂_mono' fun t hst =>\n      ⟨fun n => f '' (t n ∩ s), _,\n        iInf_mono' fun htδ => ⟨fun n => (h.ediam_image_inter_le (t n)).trans (H (htδ n)).le, _⟩⟩)\n[GOAL]\ncase inr.intro.intro.refine'_1\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁵ : EMetricSpace X\ninst✝⁴ : EMetricSpace Y\ninst✝³ : MeasurableSpace X\ninst✝² : BorelSpace X\ninst✝¹ : MeasurableSpace Y\ninst✝ : BorelSpace Y\nC r : ℝ≥0\nf : X → Y\ns t✝ : Set X\nh : HolderOnWith C r f s\nhr : 0 < r\nd : ℝ\nhd : 0 ≤ d\nhC0 : 0 < C\nhCd0 : ↑C ^ d ≠ 0\nhCd : ↑C ^ d ≠ ⊤\nR : ℝ≥0∞\nhR : 0 < R\nthis : Tendsto (fun d => ↑C * d ^ ↑r) (𝓝 0) (𝓝 0)\nδ : ℝ≥0∞\nδ0 : 0 < δ\nH : ∀ ⦃x : ℝ≥0∞⦄, x ∈ Iic δ → ↑C * x ^ ↑r < R\nt : ℕ → Set X\nhst : s ⊆ ⋃ (n : ℕ), t n\n⊢ f '' s ⊆ ⋃ (n : ℕ), (fun n => f '' (t n ∩ s)) n\n[PROOFSTEP]\nrw [← image_iUnion, ← iUnion_inter]\n[GOAL]\ncase inr.intro.intro.refine'_1\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁵ : EMetricSpace X\ninst✝⁴ : EMetricSpace Y\ninst✝³ : MeasurableSpace X\ninst✝² : BorelSpace X\ninst✝¹ : MeasurableSpace Y\ninst✝ : BorelSpace Y\nC r : ℝ≥0\nf : X → Y\ns t✝ : Set X\nh : HolderOnWith C r f s\nhr : 0 < r\nd : ℝ\nhd : 0 ≤ d\nhC0 : 0 < C\nhCd0 : ↑C ^ d ≠ 0\nhCd : ↑C ^ d ≠ ⊤\nR : ℝ≥0∞\nhR : 0 < R\nthis : Tendsto (fun d => ↑C * d ^ ↑r) (𝓝 0) (𝓝 0)\nδ : ℝ≥0∞\nδ0 : 0 < δ\nH : ∀ ⦃x : ℝ≥0∞⦄, x ∈ Iic δ → ↑C * x ^ ↑r < R\nt : ℕ → Set X\nhst : s ⊆ ⋃ (n : ℕ), t n\n⊢ f '' s ⊆ f '' ((⋃ (i : ℕ), t i) ∩ s)\n[PROOFSTEP]\nexact image_subset _ (subset_inter hst Subset.rfl)\n[GOAL]\ncase inr.intro.intro.refine'_2\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁵ : EMetricSpace X\ninst✝⁴ : EMetricSpace Y\ninst✝³ : MeasurableSpace X\ninst✝² : BorelSpace X\ninst✝¹ : MeasurableSpace Y\ninst✝ : BorelSpace Y\nC r : ℝ≥0\nf : X → Y\ns t✝ : Set X\nh : HolderOnWith C r f s\nhr : 0 < r\nd : ℝ\nhd : 0 ≤ d\nhC0 : 0 < C\nhCd0 : ↑C ^ d ≠ 0\nhCd : ↑C ^ d ≠ ⊤\nR : ℝ≥0∞\nhR : 0 < R\nthis : Tendsto (fun d => ↑C * d ^ ↑r) (𝓝 0) (𝓝 0)\nδ : ℝ≥0∞\nδ0 : 0 < δ\nH : ∀ ⦃x : ℝ≥0∞⦄, x ∈ Iic δ → ↑C * x ^ ↑r < R\nt : ℕ → Set X\nhst : s ⊆ ⋃ (n : ℕ), t n\nhtδ : ∀ (n : ℕ), diam (t n) ≤ δ\n⊢ ∑' (n : ℕ), ⨆ (_ : Set.Nonempty ((fun n => f '' (t n ∩ s)) n)), diam ((fun n => f '' (t n ∩ s)) n) ^ d ≤\n    ∑' (i : ℕ), ⨆ (_ : Set.Nonempty (t i)), ↑C ^ d * diam (t i) ^ (↑r * d)\n[PROOFSTEP]\nrefine' ENNReal.tsum_le_tsum fun n => _\n[GOAL]\ncase inr.intro.intro.refine'_2\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁵ : EMetricSpace X\ninst✝⁴ : EMetricSpace Y\ninst✝³ : MeasurableSpace X\ninst✝² : BorelSpace X\ninst✝¹ : MeasurableSpace Y\ninst✝ : BorelSpace Y\nC r : ℝ≥0\nf : X → Y\ns t✝ : Set X\nh : HolderOnWith C r f s\nhr : 0 < r\nd : ℝ\nhd : 0 ≤ d\nhC0 : 0 < C\nhCd0 : ↑C ^ d ≠ 0\nhCd : ↑C ^ d ≠ ⊤\nR : ℝ≥0∞\nhR : 0 < R\nthis : Tendsto (fun d => ↑C * d ^ ↑r) (𝓝 0) (𝓝 0)\nδ : ℝ≥0∞\nδ0 : 0 < δ\nH : ∀ ⦃x : ℝ≥0∞⦄, x ∈ Iic δ → ↑C * x ^ ↑r < R\nt : ℕ → Set X\nhst : s ⊆ ⋃ (n : ℕ), t n\nhtδ : ∀ (n : ℕ), diam (t n) ≤ δ\nn : ℕ\n⊢ ⨆ (_ : Set.Nonempty ((fun n => f '' (t n ∩ s)) n)), diam ((fun n => f '' (t n ∩ s)) n) ^ d ≤\n    ⨆ (_ : Set.Nonempty (t n)), ↑C ^ d * diam (t n) ^ (↑r * d)\n[PROOFSTEP]\nsimp only [iSup_le_iff, nonempty_image_iff]\n[GOAL]\ncase inr.intro.intro.refine'_2\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁵ : EMetricSpace X\ninst✝⁴ : EMetricSpace Y\ninst✝³ : MeasurableSpace X\ninst✝² : BorelSpace X\ninst✝¹ : MeasurableSpace Y\ninst✝ : BorelSpace Y\nC r : ℝ≥0\nf : X → Y\ns t✝ : Set X\nh : HolderOnWith C r f s\nhr : 0 < r\nd : ℝ\nhd : 0 ≤ d\nhC0 : 0 < C\nhCd0 : ↑C ^ d ≠ 0\nhCd : ↑C ^ d ≠ ⊤\nR : ℝ≥0∞\nhR : 0 < R\nthis : Tendsto (fun d => ↑C * d ^ ↑r) (𝓝 0) (𝓝 0)\nδ : ℝ≥0∞\nδ0 : 0 < δ\nH : ∀ ⦃x : ℝ≥0∞⦄, x ∈ Iic δ → ↑C * x ^ ↑r < R\nt : ℕ → Set X\nhst : s ⊆ ⋃ (n : ℕ), t n\nhtδ : ∀ (n : ℕ), diam (t n) ≤ δ\nn : ℕ\n⊢ Set.Nonempty (t n ∩ s) → diam (f '' (t n ∩ s)) ^ d ≤ ⨆ (_ : Set.Nonempty (t n)), ↑C ^ d * diam (t n) ^ (↑r * d)\n[PROOFSTEP]\nintro hft\n[GOAL]\ncase inr.intro.intro.refine'_2\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁵ : EMetricSpace X\ninst✝⁴ : EMetricSpace Y\ninst✝³ : MeasurableSpace X\ninst✝² : BorelSpace X\ninst✝¹ : MeasurableSpace Y\ninst✝ : BorelSpace Y\nC r : ℝ≥0\nf : X → Y\ns t✝ : Set X\nh : HolderOnWith C r f s\nhr : 0 < r\nd : ℝ\nhd : 0 ≤ d\nhC0 : 0 < C\nhCd0 : ↑C ^ d ≠ 0\nhCd : ↑C ^ d ≠ ⊤\nR : ℝ≥0∞\nhR : 0 < R\nthis : Tendsto (fun d => ↑C * d ^ ↑r) (𝓝 0) (𝓝 0)\nδ : ℝ≥0∞\nδ0 : 0 < δ\nH : ∀ ⦃x : ℝ≥0∞⦄, x ∈ Iic δ → ↑C * x ^ ↑r < R\nt : ℕ → Set X\nhst : s ⊆ ⋃ (n : ℕ), t n\nhtδ : ∀ (n : ℕ), diam (t n) ≤ δ\nn : ℕ\nhft : Set.Nonempty (t n ∩ s)\n⊢ diam (f '' (t n ∩ s)) ^ d ≤ ⨆ (_ : Set.Nonempty (t n)), ↑C ^ d * diam (t n) ^ (↑r * d)\n[PROOFSTEP]\nsimp only [Nonempty.mono ((t n).inter_subset_left s) hft, ciSup_pos]\n[GOAL]\ncase inr.intro.intro.refine'_2\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁵ : EMetricSpace X\ninst✝⁴ : EMetricSpace Y\ninst✝³ : MeasurableSpace X\ninst✝² : BorelSpace X\ninst✝¹ : MeasurableSpace Y\ninst✝ : BorelSpace Y\nC r : ℝ≥0\nf : X → Y\ns t✝ : Set X\nh : HolderOnWith C r f s\nhr : 0 < r\nd : ℝ\nhd : 0 ≤ d\nhC0 : 0 < C\nhCd0 : ↑C ^ d ≠ 0\nhCd : ↑C ^ d ≠ ⊤\nR : ℝ≥0∞\nhR : 0 < R\nthis : Tendsto (fun d => ↑C * d ^ ↑r) (𝓝 0) (𝓝 0)\nδ : ℝ≥0∞\nδ0 : 0 < δ\nH : ∀ ⦃x : ℝ≥0∞⦄, x ∈ Iic δ → ↑C * x ^ ↑r < R\nt : ℕ → Set X\nhst : s ⊆ ⋃ (n : ℕ), t n\nhtδ : ∀ (n : ℕ), diam (t n) ≤ δ\nn : ℕ\nhft : Set.Nonempty (t n ∩ s)\n⊢ diam (f '' (t n ∩ s)) ^ d ≤ ↑C ^ d * diam (t n) ^ (↑r * d)\n[PROOFSTEP]\nrw [ENNReal.rpow_mul, ← ENNReal.mul_rpow_of_nonneg _ _ hd]\n[GOAL]\ncase inr.intro.intro.refine'_2\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁵ : EMetricSpace X\ninst✝⁴ : EMetricSpace Y\ninst✝³ : MeasurableSpace X\ninst✝² : BorelSpace X\ninst✝¹ : MeasurableSpace Y\ninst✝ : BorelSpace Y\nC r : ℝ≥0\nf : X → Y\ns t✝ : Set X\nh : HolderOnWith C r f s\nhr : 0 < r\nd : ℝ\nhd : 0 ≤ d\nhC0 : 0 < C\nhCd0 : ↑C ^ d ≠ 0\nhCd : ↑C ^ d ≠ ⊤\nR : ℝ≥0∞\nhR : 0 < R\nthis : Tendsto (fun d => ↑C * d ^ ↑r) (𝓝 0) (𝓝 0)\nδ : ℝ≥0∞\nδ0 : 0 < δ\nH : ∀ ⦃x : ℝ≥0∞⦄, x ∈ Iic δ → ↑C * x ^ ↑r < R\nt : ℕ → Set X\nhst : s ⊆ ⋃ (n : ℕ), t n\nhtδ : ∀ (n : ℕ), diam (t n) ≤ δ\nn : ℕ\nhft : Set.Nonempty (t n ∩ s)\n⊢ diam (f '' (t n ∩ s)) ^ d ≤ (↑C * diam (t n) ^ ↑r) ^ d\n[PROOFSTEP]\nexact ENNReal.rpow_le_rpow (h.ediam_image_inter_le _) hd\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁵ : EMetricSpace X\ninst✝⁴ : EMetricSpace Y\ninst✝³ : MeasurableSpace X\ninst✝² : BorelSpace X\ninst✝¹ : MeasurableSpace Y\ninst✝ : BorelSpace Y\nK : ℝ≥0\nf : X → Y\ns t : Set X\nh : LipschitzOnWith K f s\nd : ℝ\nhd : 0 ≤ d\n⊢ ↑↑μH[d] (f '' s) ≤ ↑K ^ d * ↑↑μH[d] s\n[PROOFSTEP]\nsimpa only [NNReal.coe_one, one_mul] using h.holderOnWith.hausdorffMeasure_image_le zero_lt_one hd\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹⁰ : EMetricSpace X\ninst✝⁹ : EMetricSpace Y\ninst✝⁸ : MeasurableSpace X\ninst✝⁷ : BorelSpace X\ninst✝⁶ : MeasurableSpace Y\ninst✝⁵ : BorelSpace Y\n𝕜 : Type u_4\nE : Type u_5\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedField 𝕜\ninst✝² : NormedSpace 𝕜 E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nd : ℝ\nhd : 0 ≤ d\nr : 𝕜\nhr : r ≠ 0\ns : Set E\n⊢ ↑↑μH[d] (r • s) = NNReal.rpow ‖r‖₊ d • ↑↑μH[d] s\n[PROOFSTEP]\nsuffices ∀ {r : 𝕜}, r ≠ 0 → ∀ s : Set E, μH[d] (r • s) ≤ NNReal.rpow ‖r‖₊ d • μH[d] s\n  by\n  refine' le_antisymm (this hr s) _\n  rw [← ENNReal.le_inv_smul_iff]\n  dsimp\n  rw [← NNReal.inv_rpow, ← nnnorm_inv]\n  · refine' Eq.trans_le _ (this (inv_ne_zero hr) (r • s))\n    rw [inv_smul_smul₀ hr]\n  · simp [hr]\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹⁰ : EMetricSpace X\ninst✝⁹ : EMetricSpace Y\ninst✝⁸ : MeasurableSpace X\ninst✝⁷ : BorelSpace X\ninst✝⁶ : MeasurableSpace Y\ninst✝⁵ : BorelSpace Y\n𝕜 : Type u_4\nE : Type u_5\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedField 𝕜\ninst✝² : NormedSpace 𝕜 E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nd : ℝ\nhd : 0 ≤ d\nr : 𝕜\nhr : r ≠ 0\ns : Set E\nthis : ∀ {r : 𝕜}, r ≠ 0 → ∀ (s : Set E), ↑↑μH[d] (r • s) ≤ NNReal.rpow ‖r‖₊ d • ↑↑μH[d] s\n⊢ ↑↑μH[d] (r • s) = NNReal.rpow ‖r‖₊ d • ↑↑μH[d] s\n[PROOFSTEP]\nrefine' le_antisymm (this hr s) _\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹⁰ : EMetricSpace X\ninst✝⁹ : EMetricSpace Y\ninst✝⁸ : MeasurableSpace X\ninst✝⁷ : BorelSpace X\ninst✝⁶ : MeasurableSpace Y\ninst✝⁵ : BorelSpace Y\n𝕜 : Type u_4\nE : Type u_5\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedField 𝕜\ninst✝² : NormedSpace 𝕜 E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nd : ℝ\nhd : 0 ≤ d\nr : 𝕜\nhr : r ≠ 0\ns : Set E\nthis : ∀ {r : 𝕜}, r ≠ 0 → ∀ (s : Set E), ↑↑μH[d] (r • s) ≤ NNReal.rpow ‖r‖₊ d • ↑↑μH[d] s\n⊢ NNReal.rpow ‖r‖₊ d • ↑↑μH[d] s ≤ ↑↑μH[d] (r • s)\n[PROOFSTEP]\nrw [← ENNReal.le_inv_smul_iff]\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹⁰ : EMetricSpace X\ninst✝⁹ : EMetricSpace Y\ninst✝⁸ : MeasurableSpace X\ninst✝⁷ : BorelSpace X\ninst✝⁶ : MeasurableSpace Y\ninst✝⁵ : BorelSpace Y\n𝕜 : Type u_4\nE : Type u_5\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedField 𝕜\ninst✝² : NormedSpace 𝕜 E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nd : ℝ\nhd : 0 ≤ d\nr : 𝕜\nhr : r ≠ 0\ns : Set E\nthis : ∀ {r : 𝕜}, r ≠ 0 → ∀ (s : Set E), ↑↑μH[d] (r • s) ≤ NNReal.rpow ‖r‖₊ d • ↑↑μH[d] s\n⊢ ↑↑μH[d] s ≤ (NNReal.rpow ‖r‖₊ d)⁻¹ • ↑↑μH[d] (r • s)\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹⁰ : EMetricSpace X\ninst✝⁹ : EMetricSpace Y\ninst✝⁸ : MeasurableSpace X\ninst✝⁷ : BorelSpace X\ninst✝⁶ : MeasurableSpace Y\ninst✝⁵ : BorelSpace Y\n𝕜 : Type u_4\nE : Type u_5\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedField 𝕜\ninst✝² : NormedSpace 𝕜 E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nd : ℝ\nhd : 0 ≤ d\nr : 𝕜\nhr : r ≠ 0\ns : Set E\nthis : ∀ {r : 𝕜}, r ≠ 0 → ∀ (s : Set E), ↑↑μH[d] (r • s) ≤ NNReal.rpow ‖r‖₊ d • ↑↑μH[d] s\n⊢ NNReal.rpow ‖r‖₊ d ≠ 0\n[PROOFSTEP]\ndsimp\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹⁰ : EMetricSpace X\ninst✝⁹ : EMetricSpace Y\ninst✝⁸ : MeasurableSpace X\ninst✝⁷ : BorelSpace X\ninst✝⁶ : MeasurableSpace Y\ninst✝⁵ : BorelSpace Y\n𝕜 : Type u_4\nE : Type u_5\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedField 𝕜\ninst✝² : NormedSpace 𝕜 E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nd : ℝ\nhd : 0 ≤ d\nr : 𝕜\nhr : r ≠ 0\ns : Set E\nthis : ∀ {r : 𝕜}, r ≠ 0 → ∀ (s : Set E), ↑↑μH[d] (r • s) ≤ NNReal.rpow ‖r‖₊ d • ↑↑μH[d] s\n⊢ ↑↑μH[d] s ≤ ↑(‖r‖₊ ^ d)⁻¹ * ↑↑μH[d] (r • s)\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹⁰ : EMetricSpace X\ninst✝⁹ : EMetricSpace Y\ninst✝⁸ : MeasurableSpace X\ninst✝⁷ : BorelSpace X\ninst✝⁶ : MeasurableSpace Y\ninst✝⁵ : BorelSpace Y\n𝕜 : Type u_4\nE : Type u_5\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedField 𝕜\ninst✝² : NormedSpace 𝕜 E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nd : ℝ\nhd : 0 ≤ d\nr : 𝕜\nhr : r ≠ 0\ns : Set E\nthis : ∀ {r : 𝕜}, r ≠ 0 → ∀ (s : Set E), ↑↑μH[d] (r • s) ≤ NNReal.rpow ‖r‖₊ d • ↑↑μH[d] s\n⊢ NNReal.rpow ‖r‖₊ d ≠ 0\n[PROOFSTEP]\nrw [← NNReal.inv_rpow, ← nnnorm_inv]\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹⁰ : EMetricSpace X\ninst✝⁹ : EMetricSpace Y\ninst✝⁸ : MeasurableSpace X\ninst✝⁷ : BorelSpace X\ninst✝⁶ : MeasurableSpace Y\ninst✝⁵ : BorelSpace Y\n𝕜 : Type u_4\nE : Type u_5\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedField 𝕜\ninst✝² : NormedSpace 𝕜 E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nd : ℝ\nhd : 0 ≤ d\nr : 𝕜\nhr : r ≠ 0\ns : Set E\nthis : ∀ {r : 𝕜}, r ≠ 0 → ∀ (s : Set E), ↑↑μH[d] (r • s) ≤ NNReal.rpow ‖r‖₊ d • ↑↑μH[d] s\n⊢ ↑↑μH[d] s ≤ ↑(‖r⁻¹‖₊ ^ d) * ↑↑μH[d] (r • s)\n[PROOFSTEP]\nrefine' Eq.trans_le _ (this (inv_ne_zero hr) (r • s))\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹⁰ : EMetricSpace X\ninst✝⁹ : EMetricSpace Y\ninst✝⁸ : MeasurableSpace X\ninst✝⁷ : BorelSpace X\ninst✝⁶ : MeasurableSpace Y\ninst✝⁵ : BorelSpace Y\n𝕜 : Type u_4\nE : Type u_5\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedField 𝕜\ninst✝² : NormedSpace 𝕜 E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nd : ℝ\nhd : 0 ≤ d\nr : 𝕜\nhr : r ≠ 0\ns : Set E\nthis : ∀ {r : 𝕜}, r ≠ 0 → ∀ (s : Set E), ↑↑μH[d] (r • s) ≤ NNReal.rpow ‖r‖₊ d • ↑↑μH[d] s\n⊢ ↑↑μH[d] s = ↑↑μH[d] (r⁻¹ • r • s)\n[PROOFSTEP]\nrw [inv_smul_smul₀ hr]\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹⁰ : EMetricSpace X\ninst✝⁹ : EMetricSpace Y\ninst✝⁸ : MeasurableSpace X\ninst✝⁷ : BorelSpace X\ninst✝⁶ : MeasurableSpace Y\ninst✝⁵ : BorelSpace Y\n𝕜 : Type u_4\nE : Type u_5\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedField 𝕜\ninst✝² : NormedSpace 𝕜 E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nd : ℝ\nhd : 0 ≤ d\nr : 𝕜\nhr : r ≠ 0\ns : Set E\nthis : ∀ {r : 𝕜}, r ≠ 0 → ∀ (s : Set E), ↑↑μH[d] (r • s) ≤ NNReal.rpow ‖r‖₊ d • ↑↑μH[d] s\n⊢ NNReal.rpow ‖r‖₊ d ≠ 0\n[PROOFSTEP]\nsimp [hr]\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹⁰ : EMetricSpace X\ninst✝⁹ : EMetricSpace Y\ninst✝⁸ : MeasurableSpace X\ninst✝⁷ : BorelSpace X\ninst✝⁶ : MeasurableSpace Y\ninst✝⁵ : BorelSpace Y\n𝕜 : Type u_4\nE : Type u_5\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedField 𝕜\ninst✝² : NormedSpace 𝕜 E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nd : ℝ\nhd : 0 ≤ d\nr : 𝕜\nhr : r ≠ 0\ns : Set E\n⊢ ∀ {r : 𝕜}, r ≠ 0 → ∀ (s : Set E), ↑↑μH[d] (r • s) ≤ NNReal.rpow ‖r‖₊ d • ↑↑μH[d] s\n[PROOFSTEP]\nintro r _ s\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹⁰ : EMetricSpace X\ninst✝⁹ : EMetricSpace Y\ninst✝⁸ : MeasurableSpace X\ninst✝⁷ : BorelSpace X\ninst✝⁶ : MeasurableSpace Y\ninst✝⁵ : BorelSpace Y\n𝕜 : Type u_4\nE : Type u_5\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedField 𝕜\ninst✝² : NormedSpace 𝕜 E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nd : ℝ\nhd : 0 ≤ d\nr✝ : 𝕜\nhr : r✝ ≠ 0\ns✝ : Set E\nr : 𝕜\na✝ : r ≠ 0\ns : Set E\n⊢ ↑↑μH[d] (r • s) ≤ NNReal.rpow ‖r‖₊ d • ↑↑μH[d] s\n[PROOFSTEP]\nsimp only [NNReal.rpow_eq_pow, ENNReal.smul_def, ← ENNReal.coe_rpow_of_nonneg _ hd, smul_eq_mul]\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹⁰ : EMetricSpace X\ninst✝⁹ : EMetricSpace Y\ninst✝⁸ : MeasurableSpace X\ninst✝⁷ : BorelSpace X\ninst✝⁶ : MeasurableSpace Y\ninst✝⁵ : BorelSpace Y\n𝕜 : Type u_4\nE : Type u_5\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedField 𝕜\ninst✝² : NormedSpace 𝕜 E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nd : ℝ\nhd : 0 ≤ d\nr✝ : 𝕜\nhr : r✝ ≠ 0\ns✝ : Set E\nr : 𝕜\na✝ : r ≠ 0\ns : Set E\n⊢ ↑↑μH[d] (r • s) ≤ ↑‖r‖₊ ^ d * ↑↑μH[d] s\n[PROOFSTEP]\nexact (lipschitzWith_smul (β := E) r).hausdorffMeasure_image_le hd s\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁵ : EMetricSpace X\ninst✝⁴ : EMetricSpace Y\ninst✝³ : MeasurableSpace X\ninst✝² : BorelSpace X\ninst✝¹ : MeasurableSpace Y\ninst✝ : BorelSpace Y\nf : X → Y\nK : ℝ≥0\nd : ℝ\nhf : AntilipschitzWith K f\nhd : 0 ≤ d\ns : Set Y\n⊢ ↑↑μH[d] (f ⁻¹' s) ≤ ↑K ^ d * ↑↑μH[d] s\n[PROOFSTEP]\nrcases eq_or_ne K 0 with (rfl | h0)\n[GOAL]\ncase inl\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁵ : EMetricSpace X\ninst✝⁴ : EMetricSpace Y\ninst✝³ : MeasurableSpace X\ninst✝² : BorelSpace X\ninst✝¹ : MeasurableSpace Y\ninst✝ : BorelSpace Y\nf : X → Y\nd : ℝ\nhd : 0 ≤ d\ns : Set Y\nhf : AntilipschitzWith 0 f\n⊢ ↑↑μH[d] (f ⁻¹' s) ≤ ↑0 ^ d * ↑↑μH[d] s\n[PROOFSTEP]\nrcases eq_empty_or_nonempty (f ⁻¹' s) with (hs | ⟨x, hx⟩)\n[GOAL]\ncase inl.inl\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁵ : EMetricSpace X\ninst✝⁴ : EMetricSpace Y\ninst✝³ : MeasurableSpace X\ninst✝² : BorelSpace X\ninst✝¹ : MeasurableSpace Y\ninst✝ : BorelSpace Y\nf : X → Y\nd : ℝ\nhd : 0 ≤ d\ns : Set Y\nhf : AntilipschitzWith 0 f\nhs : f ⁻¹' s = ∅\n⊢ ↑↑μH[d] (f ⁻¹' s) ≤ ↑0 ^ d * ↑↑μH[d] s\n[PROOFSTEP]\nsimp only [hs, measure_empty, zero_le]\n[GOAL]\ncase inl.inr.intro\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁵ : EMetricSpace X\ninst✝⁴ : EMetricSpace Y\ninst✝³ : MeasurableSpace X\ninst✝² : BorelSpace X\ninst✝¹ : MeasurableSpace Y\ninst✝ : BorelSpace Y\nf : X → Y\nd : ℝ\nhd : 0 ≤ d\ns : Set Y\nhf : AntilipschitzWith 0 f\nx : X\nhx : x ∈ f ⁻¹' s\n⊢ ↑↑μH[d] (f ⁻¹' s) ≤ ↑0 ^ d * ↑↑μH[d] s\n[PROOFSTEP]\nhave : f ⁻¹' s = { x } := by\n  haveI : Subsingleton X := hf.subsingleton\n  have : (f ⁻¹' s).Subsingleton := subsingleton_univ.anti (subset_univ _)\n  exact (subsingleton_iff_singleton hx).1 this\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁵ : EMetricSpace X\ninst✝⁴ : EMetricSpace Y\ninst✝³ : MeasurableSpace X\ninst✝² : BorelSpace X\ninst✝¹ : MeasurableSpace Y\ninst✝ : BorelSpace Y\nf : X → Y\nd : ℝ\nhd : 0 ≤ d\ns : Set Y\nhf : AntilipschitzWith 0 f\nx : X\nhx : x ∈ f ⁻¹' s\n⊢ f ⁻¹' s = {x}\n[PROOFSTEP]\nhaveI : Subsingleton X := hf.subsingleton\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁵ : EMetricSpace X\ninst✝⁴ : EMetricSpace Y\ninst✝³ : MeasurableSpace X\ninst✝² : BorelSpace X\ninst✝¹ : MeasurableSpace Y\ninst✝ : BorelSpace Y\nf : X → Y\nd : ℝ\nhd : 0 ≤ d\ns : Set Y\nhf : AntilipschitzWith 0 f\nx : X\nhx : x ∈ f ⁻¹' s\nthis : Subsingleton X\n⊢ f ⁻¹' s = {x}\n[PROOFSTEP]\nhave : (f ⁻¹' s).Subsingleton := subsingleton_univ.anti (subset_univ _)\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁵ : EMetricSpace X\ninst✝⁴ : EMetricSpace Y\ninst✝³ : MeasurableSpace X\ninst✝² : BorelSpace X\ninst✝¹ : MeasurableSpace Y\ninst✝ : BorelSpace Y\nf : X → Y\nd : ℝ\nhd : 0 ≤ d\ns : Set Y\nhf : AntilipschitzWith 0 f\nx : X\nhx : x ∈ f ⁻¹' s\nthis✝ : Subsingleton X\nthis : Set.Subsingleton (f ⁻¹' s)\n⊢ f ⁻¹' s = {x}\n[PROOFSTEP]\nexact (subsingleton_iff_singleton hx).1 this\n[GOAL]\ncase inl.inr.intro\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁵ : EMetricSpace X\ninst✝⁴ : EMetricSpace Y\ninst✝³ : MeasurableSpace X\ninst✝² : BorelSpace X\ninst✝¹ : MeasurableSpace Y\ninst✝ : BorelSpace Y\nf : X → Y\nd : ℝ\nhd : 0 ≤ d\ns : Set Y\nhf : AntilipschitzWith 0 f\nx : X\nhx : x ∈ f ⁻¹' s\nthis : f ⁻¹' s = {x}\n⊢ ↑↑μH[d] (f ⁻¹' s) ≤ ↑0 ^ d * ↑↑μH[d] s\n[PROOFSTEP]\nrw [this]\n[GOAL]\ncase inl.inr.intro\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁵ : EMetricSpace X\ninst✝⁴ : EMetricSpace Y\ninst✝³ : MeasurableSpace X\ninst✝² : BorelSpace X\ninst✝¹ : MeasurableSpace Y\ninst✝ : BorelSpace Y\nf : X → Y\nd : ℝ\nhd : 0 ≤ d\ns : Set Y\nhf : AntilipschitzWith 0 f\nx : X\nhx : x ∈ f ⁻¹' s\nthis : f ⁻¹' s = {x}\n⊢ ↑↑μH[d] {x} ≤ ↑0 ^ d * ↑↑μH[d] s\n[PROOFSTEP]\nrcases eq_or_lt_of_le hd with (rfl | h'd)\n[GOAL]\ncase inl.inr.intro.inl\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁵ : EMetricSpace X\ninst✝⁴ : EMetricSpace Y\ninst✝³ : MeasurableSpace X\ninst✝² : BorelSpace X\ninst✝¹ : MeasurableSpace Y\ninst✝ : BorelSpace Y\nf : X → Y\ns : Set Y\nhf : AntilipschitzWith 0 f\nx : X\nhx : x ∈ f ⁻¹' s\nthis : f ⁻¹' s = {x}\nhd : 0 ≤ 0\n⊢ ↑↑μH[0] {x} ≤ ↑0 ^ 0 * ↑↑μH[0] s\n[PROOFSTEP]\nsimp only [ENNReal.rpow_zero, one_mul, mul_zero]\n[GOAL]\ncase inl.inr.intro.inl\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁵ : EMetricSpace X\ninst✝⁴ : EMetricSpace Y\ninst✝³ : MeasurableSpace X\ninst✝² : BorelSpace X\ninst✝¹ : MeasurableSpace Y\ninst✝ : BorelSpace Y\nf : X → Y\ns : Set Y\nhf : AntilipschitzWith 0 f\nx : X\nhx : x ∈ f ⁻¹' s\nthis : f ⁻¹' s = {x}\nhd : 0 ≤ 0\n⊢ ↑↑μH[0] {x} ≤ ↑↑μH[0] s\n[PROOFSTEP]\nrw [hausdorffMeasure_zero_singleton]\n[GOAL]\ncase inl.inr.intro.inl\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁵ : EMetricSpace X\ninst✝⁴ : EMetricSpace Y\ninst✝³ : MeasurableSpace X\ninst✝² : BorelSpace X\ninst✝¹ : MeasurableSpace Y\ninst✝ : BorelSpace Y\nf : X → Y\ns : Set Y\nhf : AntilipschitzWith 0 f\nx : X\nhx : x ∈ f ⁻¹' s\nthis : f ⁻¹' s = {x}\nhd : 0 ≤ 0\n⊢ 1 ≤ ↑↑μH[0] s\n[PROOFSTEP]\nexact one_le_hausdorffMeasure_zero_of_nonempty ⟨f x, hx⟩\n[GOAL]\ncase inl.inr.intro.inr\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁵ : EMetricSpace X\ninst✝⁴ : EMetricSpace Y\ninst✝³ : MeasurableSpace X\ninst✝² : BorelSpace X\ninst✝¹ : MeasurableSpace Y\ninst✝ : BorelSpace Y\nf : X → Y\nd : ℝ\nhd : 0 ≤ d\ns : Set Y\nhf : AntilipschitzWith 0 f\nx : X\nhx : x ∈ f ⁻¹' s\nthis : f ⁻¹' s = {x}\nh'd : 0 < d\n⊢ ↑↑μH[d] {x} ≤ ↑0 ^ d * ↑↑μH[d] s\n[PROOFSTEP]\nhaveI := noAtoms_hausdorff X h'd\n[GOAL]\ncase inl.inr.intro.inr\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁵ : EMetricSpace X\ninst✝⁴ : EMetricSpace Y\ninst✝³ : MeasurableSpace X\ninst✝² : BorelSpace X\ninst✝¹ : MeasurableSpace Y\ninst✝ : BorelSpace Y\nf : X → Y\nd : ℝ\nhd : 0 ≤ d\ns : Set Y\nhf : AntilipschitzWith 0 f\nx : X\nhx : x ∈ f ⁻¹' s\nthis✝ : f ⁻¹' s = {x}\nh'd : 0 < d\nthis : NoAtoms μH[d]\n⊢ ↑↑μH[d] {x} ≤ ↑0 ^ d * ↑↑μH[d] s\n[PROOFSTEP]\nsimp only [zero_le, measure_singleton]\n[GOAL]\ncase inr\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁵ : EMetricSpace X\ninst✝⁴ : EMetricSpace Y\ninst✝³ : MeasurableSpace X\ninst✝² : BorelSpace X\ninst✝¹ : MeasurableSpace Y\ninst✝ : BorelSpace Y\nf : X → Y\nK : ℝ≥0\nd : ℝ\nhf : AntilipschitzWith K f\nhd : 0 ≤ d\ns : Set Y\nh0 : K ≠ 0\n⊢ ↑↑μH[d] (f ⁻¹' s) ≤ ↑K ^ d * ↑↑μH[d] s\n[PROOFSTEP]\nhave hKd0 : (K : ℝ≥0∞) ^ d ≠ 0 := by simp [h0]\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁵ : EMetricSpace X\ninst✝⁴ : EMetricSpace Y\ninst✝³ : MeasurableSpace X\ninst✝² : BorelSpace X\ninst✝¹ : MeasurableSpace Y\ninst✝ : BorelSpace Y\nf : X → Y\nK : ℝ≥0\nd : ℝ\nhf : AntilipschitzWith K f\nhd : 0 ≤ d\ns : Set Y\nh0 : K ≠ 0\n⊢ ↑K ^ d ≠ 0\n[PROOFSTEP]\nsimp [h0]\n[GOAL]\ncase inr\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁵ : EMetricSpace X\ninst✝⁴ : EMetricSpace Y\ninst✝³ : MeasurableSpace X\ninst✝² : BorelSpace X\ninst✝¹ : MeasurableSpace Y\ninst✝ : BorelSpace Y\nf : X → Y\nK : ℝ≥0\nd : ℝ\nhf : AntilipschitzWith K f\nhd : 0 ≤ d\ns : Set Y\nh0 : K ≠ 0\nhKd0 : ↑K ^ d ≠ 0\n⊢ ↑↑μH[d] (f ⁻¹' s) ≤ ↑K ^ d * ↑↑μH[d] s\n[PROOFSTEP]\nhave hKd : (K : ℝ≥0∞) ^ d ≠ ∞ := by simp [hd]\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁵ : EMetricSpace X\ninst✝⁴ : EMetricSpace Y\ninst✝³ : MeasurableSpace X\ninst✝² : BorelSpace X\ninst✝¹ : MeasurableSpace Y\ninst✝ : BorelSpace Y\nf : X → Y\nK : ℝ≥0\nd : ℝ\nhf : AntilipschitzWith K f\nhd : 0 ≤ d\ns : Set Y\nh0 : K ≠ 0\nhKd0 : ↑K ^ d ≠ 0\n⊢ ↑K ^ d ≠ ⊤\n[PROOFSTEP]\nsimp [hd]\n[GOAL]\ncase inr\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁵ : EMetricSpace X\ninst✝⁴ : EMetricSpace Y\ninst✝³ : MeasurableSpace X\ninst✝² : BorelSpace X\ninst✝¹ : MeasurableSpace Y\ninst✝ : BorelSpace Y\nf : X → Y\nK : ℝ≥0\nd : ℝ\nhf : AntilipschitzWith K f\nhd : 0 ≤ d\ns : Set Y\nh0 : K ≠ 0\nhKd0 : ↑K ^ d ≠ 0\nhKd : ↑K ^ d ≠ ⊤\n⊢ ↑↑μH[d] (f ⁻¹' s) ≤ ↑K ^ d * ↑↑μH[d] s\n[PROOFSTEP]\nsimp only [hausdorffMeasure_apply, ENNReal.mul_iSup, ENNReal.mul_iInf_of_ne hKd0 hKd, ← ENNReal.tsum_mul_left]\n[GOAL]\ncase inr\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁵ : EMetricSpace X\ninst✝⁴ : EMetricSpace Y\ninst✝³ : MeasurableSpace X\ninst✝² : BorelSpace X\ninst✝¹ : MeasurableSpace Y\ninst✝ : BorelSpace Y\nf : X → Y\nK : ℝ≥0\nd : ℝ\nhf : AntilipschitzWith K f\nhd : 0 ≤ d\ns : Set Y\nh0 : K ≠ 0\nhKd0 : ↑K ^ d ≠ 0\nhKd : ↑K ^ d ≠ ⊤\n⊢ ⨆ (r : ℝ≥0∞) (_ : 0 < r),\n      ⨅ (t : ℕ → Set X) (_ : f ⁻¹' s ⊆ ⋃ (n : ℕ), t n) (_ : ∀ (n : ℕ), diam (t n) ≤ r),\n        ∑' (n : ℕ), ⨆ (_ : Set.Nonempty (t n)), diam (t n) ^ d ≤\n    ⨆ (i : ℝ≥0∞) (_ : 0 < i),\n      ⨅ (i_1 : ℕ → Set Y) (_ : s ⊆ ⋃ (n : ℕ), i_1 n) (_ : ∀ (n : ℕ), diam (i_1 n) ≤ i),\n        ∑' (i : ℕ), ⨆ (_ : Set.Nonempty (i_1 i)), ↑K ^ d * diam (i_1 i) ^ d\n[PROOFSTEP]\nrefine' iSup₂_le fun ε ε0 => _\n[GOAL]\ncase inr\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁵ : EMetricSpace X\ninst✝⁴ : EMetricSpace Y\ninst✝³ : MeasurableSpace X\ninst✝² : BorelSpace X\ninst✝¹ : MeasurableSpace Y\ninst✝ : BorelSpace Y\nf : X → Y\nK : ℝ≥0\nd : ℝ\nhf : AntilipschitzWith K f\nhd : 0 ≤ d\ns : Set Y\nh0 : K ≠ 0\nhKd0 : ↑K ^ d ≠ 0\nhKd : ↑K ^ d ≠ ⊤\nε : ℝ≥0∞\nε0 : 0 < ε\n⊢ ⨅ (t : ℕ → Set X) (_ : f ⁻¹' s ⊆ ⋃ (n : ℕ), t n) (_ : ∀ (n : ℕ), diam (t n) ≤ ε),\n      ∑' (n : ℕ), ⨆ (_ : Set.Nonempty (t n)), diam (t n) ^ d ≤\n    ⨆ (i : ℝ≥0∞) (_ : 0 < i),\n      ⨅ (i_1 : ℕ → Set Y) (_ : s ⊆ ⋃ (n : ℕ), i_1 n) (_ : ∀ (n : ℕ), diam (i_1 n) ≤ i),\n        ∑' (i : ℕ), ⨆ (_ : Set.Nonempty (i_1 i)), ↑K ^ d * diam (i_1 i) ^ d\n[PROOFSTEP]\nrefine' le_iSup₂_of_le (ε / K) (by simp [ε0.ne']) _\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁵ : EMetricSpace X\ninst✝⁴ : EMetricSpace Y\ninst✝³ : MeasurableSpace X\ninst✝² : BorelSpace X\ninst✝¹ : MeasurableSpace Y\ninst✝ : BorelSpace Y\nf : X → Y\nK : ℝ≥0\nd : ℝ\nhf : AntilipschitzWith K f\nhd : 0 ≤ d\ns : Set Y\nh0 : K ≠ 0\nhKd0 : ↑K ^ d ≠ 0\nhKd : ↑K ^ d ≠ ⊤\nε : ℝ≥0∞\nε0 : 0 < ε\n⊢ 0 < ε / ↑K\n[PROOFSTEP]\nsimp [ε0.ne']\n[GOAL]\ncase inr\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁵ : EMetricSpace X\ninst✝⁴ : EMetricSpace Y\ninst✝³ : MeasurableSpace X\ninst✝² : BorelSpace X\ninst✝¹ : MeasurableSpace Y\ninst✝ : BorelSpace Y\nf : X → Y\nK : ℝ≥0\nd : ℝ\nhf : AntilipschitzWith K f\nhd : 0 ≤ d\ns : Set Y\nh0 : K ≠ 0\nhKd0 : ↑K ^ d ≠ 0\nhKd : ↑K ^ d ≠ ⊤\nε : ℝ≥0∞\nε0 : 0 < ε\n⊢ ⨅ (t : ℕ → Set X) (_ : f ⁻¹' s ⊆ ⋃ (n : ℕ), t n) (_ : ∀ (n : ℕ), diam (t n) ≤ ε),\n      ∑' (n : ℕ), ⨆ (_ : Set.Nonempty (t n)), diam (t n) ^ d ≤\n    ⨅ (i : ℕ → Set Y) (_ : s ⊆ ⋃ (n : ℕ), i n) (_ : ∀ (n : ℕ), diam (i n) ≤ ε / ↑K),\n      ∑' (i_1 : ℕ), ⨆ (_ : Set.Nonempty (i i_1)), ↑K ^ d * diam (i i_1) ^ d\n[PROOFSTEP]\nrefine' le_iInf₂ fun t hst => le_iInf fun htε => _\n[GOAL]\ncase inr\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁵ : EMetricSpace X\ninst✝⁴ : EMetricSpace Y\ninst✝³ : MeasurableSpace X\ninst✝² : BorelSpace X\ninst✝¹ : MeasurableSpace Y\ninst✝ : BorelSpace Y\nf : X → Y\nK : ℝ≥0\nd : ℝ\nhf : AntilipschitzWith K f\nhd : 0 ≤ d\ns : Set Y\nh0 : K ≠ 0\nhKd0 : ↑K ^ d ≠ 0\nhKd : ↑K ^ d ≠ ⊤\nε : ℝ≥0∞\nε0 : 0 < ε\nt : ℕ → Set Y\nhst : s ⊆ ⋃ (n : ℕ), t n\nhtε : ∀ (n : ℕ), diam (t n) ≤ ε / ↑K\n⊢ ⨅ (t : ℕ → Set X) (_ : f ⁻¹' s ⊆ ⋃ (n : ℕ), t n) (_ : ∀ (n : ℕ), diam (t n) ≤ ε),\n      ∑' (n : ℕ), ⨆ (_ : Set.Nonempty (t n)), diam (t n) ^ d ≤\n    ∑' (i : ℕ), ⨆ (_ : Set.Nonempty (t i)), ↑K ^ d * diam (t i) ^ d\n[PROOFSTEP]\nreplace hst : f ⁻¹' s ⊆ _ := preimage_mono hst\n[GOAL]\ncase inr\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁵ : EMetricSpace X\ninst✝⁴ : EMetricSpace Y\ninst✝³ : MeasurableSpace X\ninst✝² : BorelSpace X\ninst✝¹ : MeasurableSpace Y\ninst✝ : BorelSpace Y\nf : X → Y\nK : ℝ≥0\nd : ℝ\nhf : AntilipschitzWith K f\nhd : 0 ≤ d\ns : Set Y\nh0 : K ≠ 0\nhKd0 : ↑K ^ d ≠ 0\nhKd : ↑K ^ d ≠ ⊤\nε : ℝ≥0∞\nε0 : 0 < ε\nt : ℕ → Set Y\nhtε : ∀ (n : ℕ), diam (t n) ≤ ε / ↑K\nhst : f ⁻¹' s ⊆ f ⁻¹' ⋃ (n : ℕ), t n\n⊢ ⨅ (t : ℕ → Set X) (_ : f ⁻¹' s ⊆ ⋃ (n : ℕ), t n) (_ : ∀ (n : ℕ), diam (t n) ≤ ε),\n      ∑' (n : ℕ), ⨆ (_ : Set.Nonempty (t n)), diam (t n) ^ d ≤\n    ∑' (i : ℕ), ⨆ (_ : Set.Nonempty (t i)), ↑K ^ d * diam (t i) ^ d\n[PROOFSTEP]\nrw [preimage_iUnion] at hst \n[GOAL]\ncase inr\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁵ : EMetricSpace X\ninst✝⁴ : EMetricSpace Y\ninst✝³ : MeasurableSpace X\ninst✝² : BorelSpace X\ninst✝¹ : MeasurableSpace Y\ninst✝ : BorelSpace Y\nf : X → Y\nK : ℝ≥0\nd : ℝ\nhf : AntilipschitzWith K f\nhd : 0 ≤ d\ns : Set Y\nh0 : K ≠ 0\nhKd0 : ↑K ^ d ≠ 0\nhKd : ↑K ^ d ≠ ⊤\nε : ℝ≥0∞\nε0 : 0 < ε\nt : ℕ → Set Y\nhtε : ∀ (n : ℕ), diam (t n) ≤ ε / ↑K\nhst : f ⁻¹' s ⊆ ⋃ (i : ℕ), f ⁻¹' t i\n⊢ ⨅ (t : ℕ → Set X) (_ : f ⁻¹' s ⊆ ⋃ (n : ℕ), t n) (_ : ∀ (n : ℕ), diam (t n) ≤ ε),\n      ∑' (n : ℕ), ⨆ (_ : Set.Nonempty (t n)), diam (t n) ^ d ≤\n    ∑' (i : ℕ), ⨆ (_ : Set.Nonempty (t i)), ↑K ^ d * diam (t i) ^ d\n[PROOFSTEP]\nrefine' iInf₂_le_of_le _ hst (iInf_le_of_le (fun n => _) _)\n[GOAL]\ncase inr.refine'_1\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁵ : EMetricSpace X\ninst✝⁴ : EMetricSpace Y\ninst✝³ : MeasurableSpace X\ninst✝² : BorelSpace X\ninst✝¹ : MeasurableSpace Y\ninst✝ : BorelSpace Y\nf : X → Y\nK : ℝ≥0\nd : ℝ\nhf : AntilipschitzWith K f\nhd : 0 ≤ d\ns : Set Y\nh0 : K ≠ 0\nhKd0 : ↑K ^ d ≠ 0\nhKd : ↑K ^ d ≠ ⊤\nε : ℝ≥0∞\nε0 : 0 < ε\nt : ℕ → Set Y\nhtε : ∀ (n : ℕ), diam (t n) ≤ ε / ↑K\nhst : f ⁻¹' s ⊆ ⋃ (i : ℕ), f ⁻¹' t i\nn : ℕ\n⊢ diam (f ⁻¹' t n) ≤ ε\n[PROOFSTEP]\nexact (hf.ediam_preimage_le _).trans (ENNReal.mul_le_of_le_div' <| htε n)\n[GOAL]\ncase inr.refine'_2\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁵ : EMetricSpace X\ninst✝⁴ : EMetricSpace Y\ninst✝³ : MeasurableSpace X\ninst✝² : BorelSpace X\ninst✝¹ : MeasurableSpace Y\ninst✝ : BorelSpace Y\nf : X → Y\nK : ℝ≥0\nd : ℝ\nhf : AntilipschitzWith K f\nhd : 0 ≤ d\ns : Set Y\nh0 : K ≠ 0\nhKd0 : ↑K ^ d ≠ 0\nhKd : ↑K ^ d ≠ ⊤\nε : ℝ≥0∞\nε0 : 0 < ε\nt : ℕ → Set Y\nhtε : ∀ (n : ℕ), diam (t n) ≤ ε / ↑K\nhst : f ⁻¹' s ⊆ ⋃ (i : ℕ), f ⁻¹' t i\n⊢ ∑' (n : ℕ), ⨆ (_ : Set.Nonempty (f ⁻¹' t n)), diam (f ⁻¹' t n) ^ d ≤\n    ∑' (i : ℕ), ⨆ (_ : Set.Nonempty (t i)), ↑K ^ d * diam (t i) ^ d\n[PROOFSTEP]\nrefine' ENNReal.tsum_le_tsum fun n => iSup_le_iff.2 fun hft => _\n[GOAL]\ncase inr.refine'_2\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁵ : EMetricSpace X\ninst✝⁴ : EMetricSpace Y\ninst✝³ : MeasurableSpace X\ninst✝² : BorelSpace X\ninst✝¹ : MeasurableSpace Y\ninst✝ : BorelSpace Y\nf : X → Y\nK : ℝ≥0\nd : ℝ\nhf : AntilipschitzWith K f\nhd : 0 ≤ d\ns : Set Y\nh0 : K ≠ 0\nhKd0 : ↑K ^ d ≠ 0\nhKd : ↑K ^ d ≠ ⊤\nε : ℝ≥0∞\nε0 : 0 < ε\nt : ℕ → Set Y\nhtε : ∀ (n : ℕ), diam (t n) ≤ ε / ↑K\nhst : f ⁻¹' s ⊆ ⋃ (i : ℕ), f ⁻¹' t i\nn : ℕ\nhft : Set.Nonempty (f ⁻¹' t n)\n⊢ diam (f ⁻¹' t n) ^ d ≤ ⨆ (_ : Set.Nonempty (t n)), ↑K ^ d * diam (t n) ^ d\n[PROOFSTEP]\nsimp only [nonempty_of_nonempty_preimage hft, ciSup_pos]\n[GOAL]\ncase inr.refine'_2\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁵ : EMetricSpace X\ninst✝⁴ : EMetricSpace Y\ninst✝³ : MeasurableSpace X\ninst✝² : BorelSpace X\ninst✝¹ : MeasurableSpace Y\ninst✝ : BorelSpace Y\nf : X → Y\nK : ℝ≥0\nd : ℝ\nhf : AntilipschitzWith K f\nhd : 0 ≤ d\ns : Set Y\nh0 : K ≠ 0\nhKd0 : ↑K ^ d ≠ 0\nhKd : ↑K ^ d ≠ ⊤\nε : ℝ≥0∞\nε0 : 0 < ε\nt : ℕ → Set Y\nhtε : ∀ (n : ℕ), diam (t n) ≤ ε / ↑K\nhst : f ⁻¹' s ⊆ ⋃ (i : ℕ), f ⁻¹' t i\nn : ℕ\nhft : Set.Nonempty (f ⁻¹' t n)\n⊢ diam (f ⁻¹' t n) ^ d ≤ ↑K ^ d * diam (t n) ^ d\n[PROOFSTEP]\nrw [← ENNReal.mul_rpow_of_nonneg _ _ hd]\n[GOAL]\ncase inr.refine'_2\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁵ : EMetricSpace X\ninst✝⁴ : EMetricSpace Y\ninst✝³ : MeasurableSpace X\ninst✝² : BorelSpace X\ninst✝¹ : MeasurableSpace Y\ninst✝ : BorelSpace Y\nf : X → Y\nK : ℝ≥0\nd : ℝ\nhf : AntilipschitzWith K f\nhd : 0 ≤ d\ns : Set Y\nh0 : K ≠ 0\nhKd0 : ↑K ^ d ≠ 0\nhKd : ↑K ^ d ≠ ⊤\nε : ℝ≥0∞\nε0 : 0 < ε\nt : ℕ → Set Y\nhtε : ∀ (n : ℕ), diam (t n) ≤ ε / ↑K\nhst : f ⁻¹' s ⊆ ⋃ (i : ℕ), f ⁻¹' t i\nn : ℕ\nhft : Set.Nonempty (f ⁻¹' t n)\n⊢ diam (f ⁻¹' t n) ^ d ≤ (↑K * diam (t n)) ^ d\n[PROOFSTEP]\nexact ENNReal.rpow_le_rpow (hf.ediam_preimage_le _) hd\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁵ : EMetricSpace X\ninst✝⁴ : EMetricSpace Y\ninst✝³ : MeasurableSpace X\ninst✝² : BorelSpace X\ninst✝¹ : MeasurableSpace Y\ninst✝ : BorelSpace Y\nf : X → Y\nd : ℝ\nhf : Isometry f\nhd : 0 ≤ d ∨ Surjective f\ns : Set X\n⊢ ↑↑μH[d] (f '' s) = ↑↑μH[d] s\n[PROOFSTEP]\nsimp only [hausdorffMeasure, ← OuterMeasure.coe_mkMetric, ← OuterMeasure.comap_apply]\n  -- porting note: this proof was slightly nicer before the port\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁵ : EMetricSpace X\ninst✝⁴ : EMetricSpace Y\ninst✝³ : MeasurableSpace X\ninst✝² : BorelSpace X\ninst✝¹ : MeasurableSpace Y\ninst✝ : BorelSpace Y\nf : X → Y\nd : ℝ\nhf : Isometry f\nhd : 0 ≤ d ∨ Surjective f\ns : Set X\n⊢ ↑(↑(OuterMeasure.comap f) ↑(mkMetric fun r => r ^ d)) s = ↑(OuterMeasure.mkMetric fun r => r ^ d) s\n[PROOFSTEP]\nsimp only [mkMetric_toOuterMeasure]\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁵ : EMetricSpace X\ninst✝⁴ : EMetricSpace Y\ninst✝³ : MeasurableSpace X\ninst✝² : BorelSpace X\ninst✝¹ : MeasurableSpace Y\ninst✝ : BorelSpace Y\nf : X → Y\nd : ℝ\nhf : Isometry f\nhd : 0 ≤ d ∨ Surjective f\ns : Set X\n⊢ ↑(↑(OuterMeasure.comap f) (OuterMeasure.mkMetric fun r => r ^ d)) s = ↑(OuterMeasure.mkMetric fun r => r ^ d) s\n[PROOFSTEP]\nhave : 0 ≤ d → Monotone fun r ↦ @HPow.hPow ℝ≥0∞ ℝ ℝ≥0∞ instHPow r d := by\n  exact fun hd x y hxy => ENNReal.rpow_le_rpow hxy hd\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁵ : EMetricSpace X\ninst✝⁴ : EMetricSpace Y\ninst✝³ : MeasurableSpace X\ninst✝² : BorelSpace X\ninst✝¹ : MeasurableSpace Y\ninst✝ : BorelSpace Y\nf : X → Y\nd : ℝ\nhf : Isometry f\nhd : 0 ≤ d ∨ Surjective f\ns : Set X\n⊢ 0 ≤ d → Monotone fun r => r ^ d\n[PROOFSTEP]\nexact fun hd x y hxy => ENNReal.rpow_le_rpow hxy hd\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁵ : EMetricSpace X\ninst✝⁴ : EMetricSpace Y\ninst✝³ : MeasurableSpace X\ninst✝² : BorelSpace X\ninst✝¹ : MeasurableSpace Y\ninst✝ : BorelSpace Y\nf : X → Y\nd : ℝ\nhf : Isometry f\nhd : 0 ≤ d ∨ Surjective f\ns : Set X\nthis : 0 ≤ d → Monotone fun r => r ^ d\n⊢ ↑(↑(OuterMeasure.comap f) (OuterMeasure.mkMetric fun r => r ^ d)) s = ↑(OuterMeasure.mkMetric fun r => r ^ d) s\n[PROOFSTEP]\nhave := OuterMeasure.isometry_comap_mkMetric (fun (r : ℝ≥0∞) => r ^ d) hf (hd.imp_left this)\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁵ : EMetricSpace X\ninst✝⁴ : EMetricSpace Y\ninst✝³ : MeasurableSpace X\ninst✝² : BorelSpace X\ninst✝¹ : MeasurableSpace Y\ninst✝ : BorelSpace Y\nf : X → Y\nd : ℝ\nhf : Isometry f\nhd : 0 ≤ d ∨ Surjective f\ns : Set X\nthis✝ : 0 ≤ d → Monotone fun r => r ^ d\nthis : ↑(OuterMeasure.comap f) (OuterMeasure.mkMetric fun r => r ^ d) = OuterMeasure.mkMetric fun r => r ^ d\n⊢ ↑(↑(OuterMeasure.comap f) (OuterMeasure.mkMetric fun r => r ^ d)) s = ↑(OuterMeasure.mkMetric fun r => r ^ d) s\n[PROOFSTEP]\ncongr\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁵ : EMetricSpace X\ninst✝⁴ : EMetricSpace Y\ninst✝³ : MeasurableSpace X\ninst✝² : BorelSpace X\ninst✝¹ : MeasurableSpace Y\ninst✝ : BorelSpace Y\nf : X → Y\nd : ℝ\nhf : Isometry f\nhd : 0 ≤ d ∨ Surjective f\ns : Set Y\n⊢ ↑↑μH[d] (f ⁻¹' s) = ↑↑μH[d] (s ∩ range f)\n[PROOFSTEP]\nrw [← hf.hausdorffMeasure_image hd, image_preimage_eq_inter_range]\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁵ : EMetricSpace X\ninst✝⁴ : EMetricSpace Y\ninst✝³ : MeasurableSpace X\ninst✝² : BorelSpace X\ninst✝¹ : MeasurableSpace Y\ninst✝ : BorelSpace Y\nf : X → Y\nd : ℝ\nhf : Isometry f\nhd : 0 ≤ d ∨ Surjective f\n⊢ Measure.map f μH[d] = Measure.restrict μH[d] (range f)\n[PROOFSTEP]\next1 s hs\n[GOAL]\ncase h\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁵ : EMetricSpace X\ninst✝⁴ : EMetricSpace Y\ninst✝³ : MeasurableSpace X\ninst✝² : BorelSpace X\ninst✝¹ : MeasurableSpace Y\ninst✝ : BorelSpace Y\nf : X → Y\nd : ℝ\nhf : Isometry f\nhd : 0 ≤ d ∨ Surjective f\ns : Set Y\nhs : MeasurableSet s\n⊢ ↑↑(Measure.map f μH[d]) s = ↑↑(Measure.restrict μH[d] (range f)) s\n[PROOFSTEP]\nrw [map_apply hf.continuous.measurable hs, Measure.restrict_apply hs, hf.hausdorffMeasure_preimage hd]\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁵ : EMetricSpace X\ninst✝⁴ : EMetricSpace Y\ninst✝³ : MeasurableSpace X\ninst✝² : BorelSpace X\ninst✝¹ : MeasurableSpace Y\ninst✝ : BorelSpace Y\ne : X ≃ᵢ Y\nd : ℝ\ns : Set Y\n⊢ ↑↑μH[d] (↑e ⁻¹' s) = ↑↑μH[d] s\n[PROOFSTEP]\nrw [← e.image_symm, e.symm.hausdorffMeasure_image]\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁵ : EMetricSpace X\ninst✝⁴ : EMetricSpace Y\ninst✝³ : MeasurableSpace X\ninst✝² : BorelSpace X\ninst✝¹ : MeasurableSpace Y\ninst✝ : BorelSpace Y\ne : X ≃ᵢ Y\nd : ℝ\n⊢ Measure.map ↑e μH[d] = μH[d]\n[PROOFSTEP]\nrw [e.isometry.map_hausdorffMeasure (Or.inr e.surjective), e.surjective.range_eq, restrict_univ]\n[GOAL]\nι✝ : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁶ : EMetricSpace X\ninst✝⁵ : EMetricSpace Y\ninst✝⁴ : MeasurableSpace X\ninst✝³ : BorelSpace X\ninst✝² : MeasurableSpace Y\ninst✝¹ : BorelSpace Y\nι : Type u_4\ninst✝ : Fintype ι\n⊢ μH[↑(Fintype.card ι)] = volume\n[PROOFSTEP]\nclassical\n  -- it suffices to check that the two measures coincide on products of rational intervals\nrefine'\n  (pi_eq_generateFrom (fun _ => Real.borel_eq_generateFrom_Ioo_rat.symm) (fun _ => Real.isPiSystem_Ioo_rat)\n      (fun _ => Real.finiteSpanningSetsInIooRat _) _).symm\nsimp only [mem_iUnion, mem_singleton_iff]\n  -- fix such a product `s` of rational intervals, of the form `Π (a i, b i)`.\nintro s hs\nchoose a b H using hs\nobtain rfl : s = fun i => Ioo (α := ℝ) (a i) (b i)\nexact funext fun i => (H i).2\nreplace H := fun i => (H i).1\napply\n  le_antisymm\n    _\n      -- first check that `volume s ≤ μH s`\n· have Hle : volume ≤ (μH[Fintype.card ι] : Measure (ι → ℝ)) :=\n    by\n    refine' le_hausdorffMeasure _ _ ∞ ENNReal.coe_lt_top fun s _ => _\n    rw [ENNReal.rpow_nat_cast]\n    exact Real.volume_pi_le_diam_pow s\n  rw [← volume_pi_pi fun i => Ioo (a i : ℝ) (b i)]\n  exact\n    Measure.le_iff'.1 Hle\n      _\n        /- For the other inequality `μH s ≤ volume s`, we use a covering of `s` by sets of small diameter\n            `1/n`, namely cubes with left-most point of the form `a i + f i / n` with `f i` ranging between\n            `0` and `⌈(b i - a i) * n⌉`. Their number is asymptotic to `n^d * Π (b i - a i)`. -/\nhave I : ∀ i, 0 ≤ (b i : ℝ) - a i := fun i => by simpa only [sub_nonneg, Rat.cast_le] using (H i).le\nlet γ := fun n : ℕ => ∀ i : ι, Fin ⌈((b i : ℝ) - a i) * n⌉₊\nlet t : ∀ n : ℕ, γ n → Set (ι → ℝ) := fun n f => Set.pi univ fun i => Icc (a i + f i / n) (a i + (f i + 1) / n)\nhave A : Tendsto (fun n : ℕ => 1 / (n : ℝ≥0∞)) atTop (𝓝 0) := by simp only [one_div, ENNReal.tendsto_inv_nat_nhds_zero]\nhave B : ∀ᶠ n in atTop, ∀ i : γ n, diam (t n i) ≤ 1 / n :=\n  by\n  refine' eventually_atTop.2 ⟨1, fun n hn => _⟩\n  intro f\n  refine' diam_pi_le_of_le fun b => _\n  simp only [Real.ediam_Icc, add_div, ENNReal.ofReal_div_of_pos (Nat.cast_pos.mpr hn), le_refl, add_sub_add_left_eq_sub,\n    add_sub_cancel', ENNReal.ofReal_one, ENNReal.ofReal_coe_nat]\nhave C : ∀ᶠ n in atTop, (Set.pi univ fun i : ι => Ioo (a i : ℝ) (b i)) ⊆ ⋃ i : γ n, t n i :=\n  by\n  refine' eventually_atTop.2 ⟨1, fun n hn => _⟩\n  have npos : (0 : ℝ) < n := Nat.cast_pos.2 hn\n  intro x hx\n  simp only [mem_Ioo, mem_univ_pi] at hx \n  simp only [mem_iUnion, mem_Ioo, mem_univ_pi]\n  let f : γ n := fun i =>\n    ⟨⌊(x i - a i) * n⌋₊, by\n      apply Nat.floor_lt_ceil_of_lt_of_pos\n      · refine' (mul_lt_mul_right npos).2 _\n        simp only [(hx i).right, sub_lt_sub_iff_right]\n      · refine' mul_pos _ npos\n        simpa only [Rat.cast_lt, sub_pos] using H i⟩\n  refine' ⟨f, fun i => ⟨_, _⟩⟩\n  ·\n    calc\n      (a i : ℝ) + ⌊(x i - a i) * n⌋₊ / n ≤ (a i : ℝ) + (x i - a i) * n / n :=\n        by\n        refine' add_le_add le_rfl ((div_le_div_right npos).2 _)\n        exact Nat.floor_le (mul_nonneg (sub_nonneg.2 (hx i).1.le) npos.le)\n      _ = x i := by field_simp [npos.ne']\n  ·\n    calc\n      x i = (a i : ℝ) + (x i - a i) * n / n := by field_simp [npos.ne']\n      _ ≤ (a i : ℝ) + (⌊(x i - a i) * n⌋₊ + 1) / n :=\n        add_le_add le_rfl ((div_le_div_right npos).2 (Nat.lt_floor_add_one _).le)\ncalc\n  μH[Fintype.card ι] (Set.pi univ fun i : ι => Ioo (a i : ℝ) (b i)) ≤\n      liminf (fun n : ℕ => ∑ i : γ n, diam (t n i) ^ ((Fintype.card ι) : ℝ)) atTop :=\n    hausdorffMeasure_le_liminf_sum _ (Set.pi univ fun i => Ioo (a i : ℝ) (b i)) (fun n : ℕ => 1 / (n : ℝ≥0∞)) A t B C\n  _ ≤ liminf (fun n : ℕ => ∑ i : γ n, (1 / (n : ℝ≥0∞)) ^ Fintype.card ι) atTop :=\n    by\n    refine' liminf_le_liminf _ _\n    · filter_upwards [B] with _ hn\n      apply Finset.sum_le_sum fun i _ => _\n      simp only [ENNReal.rpow_nat_cast]\n      intros i _\n      exact pow_le_pow_of_le_left' (hn i) _\n    · isBoundedDefault\n  _ = liminf (fun n : ℕ => ∏ i : ι, (⌈((b i : ℝ) - a i) * n⌉₊ : ℝ≥0∞) / n) atTop := by\n    simp only [Finset.card_univ, Nat.cast_prod, one_mul, Fintype.card_fin, Finset.sum_const, nsmul_eq_mul,\n      Fintype.card_pi, div_eq_mul_inv, Finset.prod_mul_distrib, Finset.prod_const]\n  _ = ∏ i : ι, volume (Ioo (a i : ℝ) (b i)) := by\n    simp only [Real.volume_Ioo]\n    apply Tendsto.liminf_eq\n    refine' ENNReal.tendsto_finset_prod_of_ne_top _ (fun i _ => _) fun i _ => _\n    · apply\n        Tendsto.congr' _\n          ((ENNReal.continuous_ofReal.tendsto _).comp\n            ((tendsto_nat_ceil_mul_div_atTop (I i)).comp tendsto_nat_cast_atTop_atTop))\n      apply eventually_atTop.2 ⟨1, fun n hn => _⟩\n      intros n hn\n      simp only [ENNReal.ofReal_div_of_pos (Nat.cast_pos.mpr hn), comp_apply, ENNReal.ofReal_coe_nat]\n    · simp only [ENNReal.ofReal_ne_top, Ne.def, not_false_iff]\n[GOAL]\nι✝ : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁶ : EMetricSpace X\ninst✝⁵ : EMetricSpace Y\ninst✝⁴ : MeasurableSpace X\ninst✝³ : BorelSpace X\ninst✝² : MeasurableSpace Y\ninst✝¹ : BorelSpace Y\nι : Type u_4\ninst✝ : Fintype ι\n⊢ μH[↑(Fintype.card ι)] = volume\n[PROOFSTEP]\nrefine'\n  (pi_eq_generateFrom (fun _ => Real.borel_eq_generateFrom_Ioo_rat.symm) (fun _ => Real.isPiSystem_Ioo_rat)\n      (fun _ => Real.finiteSpanningSetsInIooRat _) _).symm\n[GOAL]\nι✝ : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁶ : EMetricSpace X\ninst✝⁵ : EMetricSpace Y\ninst✝⁴ : MeasurableSpace X\ninst✝³ : BorelSpace X\ninst✝² : MeasurableSpace Y\ninst✝¹ : BorelSpace Y\nι : Type u_4\ninst✝ : Fintype ι\n⊢ ∀ (s : ι → Set ℝ),\n    (∀ (i : ι), s i ∈ ⋃ (a : ℚ) (b : ℚ) (_ : a < b), {Ioo ↑a ↑b}) →\n      ↑↑μH[↑(Fintype.card ι)] (Set.pi univ s) = ∏ i : ι, ↑↑volume (s i)\n[PROOFSTEP]\nsimp only [mem_iUnion, mem_singleton_iff]\n  -- fix such a product `s` of rational intervals, of the form `Π (a i, b i)`.\n[GOAL]\nι✝ : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁶ : EMetricSpace X\ninst✝⁵ : EMetricSpace Y\ninst✝⁴ : MeasurableSpace X\ninst✝³ : BorelSpace X\ninst✝² : MeasurableSpace Y\ninst✝¹ : BorelSpace Y\nι : Type u_4\ninst✝ : Fintype ι\n⊢ ∀ (s : ι → Set ℝ),\n    (∀ (i : ι), ∃ i_1 i_2 h, s i = Ioo ↑i_1 ↑i_2) → ↑↑μH[↑(Fintype.card ι)] (Set.pi univ s) = ∏ i : ι, ↑↑volume (s i)\n[PROOFSTEP]\nintro s hs\n[GOAL]\nι✝ : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁶ : EMetricSpace X\ninst✝⁵ : EMetricSpace Y\ninst✝⁴ : MeasurableSpace X\ninst✝³ : BorelSpace X\ninst✝² : MeasurableSpace Y\ninst✝¹ : BorelSpace Y\nι : Type u_4\ninst✝ : Fintype ι\ns : ι → Set ℝ\nhs : ∀ (i : ι), ∃ i_1 i_2 h, s i = Ioo ↑i_1 ↑i_2\n⊢ ↑↑μH[↑(Fintype.card ι)] (Set.pi univ s) = ∏ i : ι, ↑↑volume (s i)\n[PROOFSTEP]\nchoose a b H using hs\n[GOAL]\nι✝ : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁶ : EMetricSpace X\ninst✝⁵ : EMetricSpace Y\ninst✝⁴ : MeasurableSpace X\ninst✝³ : BorelSpace X\ninst✝² : MeasurableSpace Y\ninst✝¹ : BorelSpace Y\nι : Type u_4\ninst✝ : Fintype ι\ns : ι → Set ℝ\na b : ι → ℚ\nH : ∀ (i : ι), ∃ h, s i = Ioo ↑(a i) ↑(b i)\n⊢ ↑↑μH[↑(Fintype.card ι)] (Set.pi univ s) = ∏ i : ι, ↑↑volume (s i)\n[PROOFSTEP]\nobtain rfl : s = fun i => Ioo (α := ℝ) (a i) (b i)\n[GOAL]\nι✝ : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁶ : EMetricSpace X\ninst✝⁵ : EMetricSpace Y\ninst✝⁴ : MeasurableSpace X\ninst✝³ : BorelSpace X\ninst✝² : MeasurableSpace Y\ninst✝¹ : BorelSpace Y\nι : Type u_4\ninst✝ : Fintype ι\ns : ι → Set ℝ\na b : ι → ℚ\nH : ∀ (i : ι), ∃ h, s i = Ioo ↑(a i) ↑(b i)\n⊢ s = fun i => Ioo ↑(a i) ↑(b i)\nι✝ : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁶ : EMetricSpace X\ninst✝⁵ : EMetricSpace Y\ninst✝⁴ : MeasurableSpace X\ninst✝³ : BorelSpace X\ninst✝² : MeasurableSpace Y\ninst✝¹ : BorelSpace Y\nι : Type u_4\ninst✝ : Fintype ι\na b : ι → ℚ\nH : ∀ (i : ι), ∃ h, (fun i => Ioo ↑(a i) ↑(b i)) i = Ioo ↑(a i) ↑(b i)\n⊢ ↑↑μH[↑(Fintype.card ι)] (Set.pi univ fun i => Ioo ↑(a i) ↑(b i)) = ∏ i : ι, ↑↑volume ((fun i => Ioo ↑(a i) ↑(b i)) i)\n[PROOFSTEP]\nexact funext fun i => (H i).2\n[GOAL]\nι✝ : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁶ : EMetricSpace X\ninst✝⁵ : EMetricSpace Y\ninst✝⁴ : MeasurableSpace X\ninst✝³ : BorelSpace X\ninst✝² : MeasurableSpace Y\ninst✝¹ : BorelSpace Y\nι : Type u_4\ninst✝ : Fintype ι\na b : ι → ℚ\nH : ∀ (i : ι), ∃ h, (fun i => Ioo ↑(a i) ↑(b i)) i = Ioo ↑(a i) ↑(b i)\n⊢ ↑↑μH[↑(Fintype.card ι)] (Set.pi univ fun i => Ioo ↑(a i) ↑(b i)) = ∏ i : ι, ↑↑volume ((fun i => Ioo ↑(a i) ↑(b i)) i)\n[PROOFSTEP]\nreplace H := fun i => (H i).1\n[GOAL]\nι✝ : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁶ : EMetricSpace X\ninst✝⁵ : EMetricSpace Y\ninst✝⁴ : MeasurableSpace X\ninst✝³ : BorelSpace X\ninst✝² : MeasurableSpace Y\ninst✝¹ : BorelSpace Y\nι : Type u_4\ninst✝ : Fintype ι\na b : ι → ℚ\nH : ∀ (i : ι), a i < b i\n⊢ ↑↑μH[↑(Fintype.card ι)] (Set.pi univ fun i => Ioo ↑(a i) ↑(b i)) = ∏ i : ι, ↑↑volume ((fun i => Ioo ↑(a i) ↑(b i)) i)\n[PROOFSTEP]\napply\n  le_antisymm\n    _\n      -- first check that `volume s ≤ μH s`\n[GOAL]\nι✝ : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁶ : EMetricSpace X\ninst✝⁵ : EMetricSpace Y\ninst✝⁴ : MeasurableSpace X\ninst✝³ : BorelSpace X\ninst✝² : MeasurableSpace Y\ninst✝¹ : BorelSpace Y\nι : Type u_4\ninst✝ : Fintype ι\na b : ι → ℚ\nH : ∀ (i : ι), a i < b i\n⊢ ∏ i : ι, ↑↑volume ((fun i => Ioo ↑(a i) ↑(b i)) i) ≤ ↑↑μH[↑(Fintype.card ι)] (Set.pi univ fun i => Ioo ↑(a i) ↑(b i))\n[PROOFSTEP]\nhave Hle : volume ≤ (μH[Fintype.card ι] : Measure (ι → ℝ)) :=\n  by\n  refine' le_hausdorffMeasure _ _ ∞ ENNReal.coe_lt_top fun s _ => _\n  rw [ENNReal.rpow_nat_cast]\n  exact Real.volume_pi_le_diam_pow s\n[GOAL]\nι✝ : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁶ : EMetricSpace X\ninst✝⁵ : EMetricSpace Y\ninst✝⁴ : MeasurableSpace X\ninst✝³ : BorelSpace X\ninst✝² : MeasurableSpace Y\ninst✝¹ : BorelSpace Y\nι : Type u_4\ninst✝ : Fintype ι\na b : ι → ℚ\nH : ∀ (i : ι), a i < b i\n⊢ volume ≤ μH[↑(Fintype.card ι)]\n[PROOFSTEP]\nrefine' le_hausdorffMeasure _ _ ∞ ENNReal.coe_lt_top fun s _ => _\n[GOAL]\nι✝ : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁶ : EMetricSpace X\ninst✝⁵ : EMetricSpace Y\ninst✝⁴ : MeasurableSpace X\ninst✝³ : BorelSpace X\ninst✝² : MeasurableSpace Y\ninst✝¹ : BorelSpace Y\nι : Type u_4\ninst✝ : Fintype ι\na b : ι → ℚ\nH : ∀ (i : ι), a i < b i\ns : Set (ι → ℝ)\nx✝ : diam s ≤ ⊤\n⊢ ↑↑volume s ≤ diam s ^ ↑(Fintype.card ι)\n[PROOFSTEP]\nrw [ENNReal.rpow_nat_cast]\n[GOAL]\nι✝ : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁶ : EMetricSpace X\ninst✝⁵ : EMetricSpace Y\ninst✝⁴ : MeasurableSpace X\ninst✝³ : BorelSpace X\ninst✝² : MeasurableSpace Y\ninst✝¹ : BorelSpace Y\nι : Type u_4\ninst✝ : Fintype ι\na b : ι → ℚ\nH : ∀ (i : ι), a i < b i\ns : Set (ι → ℝ)\nx✝ : diam s ≤ ⊤\n⊢ ↑↑volume s ≤ diam s ^ Fintype.card ι\n[PROOFSTEP]\nexact Real.volume_pi_le_diam_pow s\n[GOAL]\nι✝ : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁶ : EMetricSpace X\ninst✝⁵ : EMetricSpace Y\ninst✝⁴ : MeasurableSpace X\ninst✝³ : BorelSpace X\ninst✝² : MeasurableSpace Y\ninst✝¹ : BorelSpace Y\nι : Type u_4\ninst✝ : Fintype ι\na b : ι → ℚ\nH : ∀ (i : ι), a i < b i\nHle : volume ≤ μH[↑(Fintype.card ι)]\n⊢ ∏ i : ι, ↑↑volume ((fun i => Ioo ↑(a i) ↑(b i)) i) ≤ ↑↑μH[↑(Fintype.card ι)] (Set.pi univ fun i => Ioo ↑(a i) ↑(b i))\n[PROOFSTEP]\nrw [← volume_pi_pi fun i => Ioo (a i : ℝ) (b i)]\n[GOAL]\nι✝ : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁶ : EMetricSpace X\ninst✝⁵ : EMetricSpace Y\ninst✝⁴ : MeasurableSpace X\ninst✝³ : BorelSpace X\ninst✝² : MeasurableSpace Y\ninst✝¹ : BorelSpace Y\nι : Type u_4\ninst✝ : Fintype ι\na b : ι → ℚ\nH : ∀ (i : ι), a i < b i\nHle : volume ≤ μH[↑(Fintype.card ι)]\n⊢ ↑↑volume (Set.pi univ fun i => Ioo ↑(a i) ↑(b i)) ≤ ↑↑μH[↑(Fintype.card ι)] (Set.pi univ fun i => Ioo ↑(a i) ↑(b i))\n[PROOFSTEP]\nexact\n  Measure.le_iff'.1 Hle\n    _\n      /- For the other inequality `μH s ≤ volume s`, we use a covering of `s` by sets of small diameter\n          `1/n`, namely cubes with left-most point of the form `a i + f i / n` with `f i` ranging between\n          `0` and `⌈(b i - a i) * n⌉`. Their number is asymptotic to `n^d * Π (b i - a i)`. -/\n[GOAL]\nι✝ : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁶ : EMetricSpace X\ninst✝⁵ : EMetricSpace Y\ninst✝⁴ : MeasurableSpace X\ninst✝³ : BorelSpace X\ninst✝² : MeasurableSpace Y\ninst✝¹ : BorelSpace Y\nι : Type u_4\ninst✝ : Fintype ι\na b : ι → ℚ\nH : ∀ (i : ι), a i < b i\n⊢ ↑↑μH[↑(Fintype.card ι)] (Set.pi univ fun i => Ioo ↑(a i) ↑(b i)) ≤ ∏ i : ι, ↑↑volume ((fun i => Ioo ↑(a i) ↑(b i)) i)\n[PROOFSTEP]\nhave I : ∀ i, 0 ≤ (b i : ℝ) - a i := fun i => by simpa only [sub_nonneg, Rat.cast_le] using (H i).le\n[GOAL]\nι✝ : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁶ : EMetricSpace X\ninst✝⁵ : EMetricSpace Y\ninst✝⁴ : MeasurableSpace X\ninst✝³ : BorelSpace X\ninst✝² : MeasurableSpace Y\ninst✝¹ : BorelSpace Y\nι : Type u_4\ninst✝ : Fintype ι\na b : ι → ℚ\nH : ∀ (i : ι), a i < b i\ni : ι\n⊢ 0 ≤ ↑(b i) - ↑(a i)\n[PROOFSTEP]\nsimpa only [sub_nonneg, Rat.cast_le] using (H i).le\n[GOAL]\nι✝ : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁶ : EMetricSpace X\ninst✝⁵ : EMetricSpace Y\ninst✝⁴ : MeasurableSpace X\ninst✝³ : BorelSpace X\ninst✝² : MeasurableSpace Y\ninst✝¹ : BorelSpace Y\nι : Type u_4\ninst✝ : Fintype ι\na b : ι → ℚ\nH : ∀ (i : ι), a i < b i\nI : ∀ (i : ι), 0 ≤ ↑(b i) - ↑(a i)\n⊢ ↑↑μH[↑(Fintype.card ι)] (Set.pi univ fun i => Ioo ↑(a i) ↑(b i)) ≤ ∏ i : ι, ↑↑volume ((fun i => Ioo ↑(a i) ↑(b i)) i)\n[PROOFSTEP]\nlet γ := fun n : ℕ => ∀ i : ι, Fin ⌈((b i : ℝ) - a i) * n⌉₊\n[GOAL]\nι✝ : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁶ : EMetricSpace X\ninst✝⁵ : EMetricSpace Y\ninst✝⁴ : MeasurableSpace X\ninst✝³ : BorelSpace X\ninst✝² : MeasurableSpace Y\ninst✝¹ : BorelSpace Y\nι : Type u_4\ninst✝ : Fintype ι\na b : ι → ℚ\nH : ∀ (i : ι), a i < b i\nI : ∀ (i : ι), 0 ≤ ↑(b i) - ↑(a i)\nγ : ℕ → Type u_4 := fun n => (i : ι) → Fin ⌈(↑(b i) - ↑(a i)) * ↑n⌉₊\n⊢ ↑↑μH[↑(Fintype.card ι)] (Set.pi univ fun i => Ioo ↑(a i) ↑(b i)) ≤ ∏ i : ι, ↑↑volume ((fun i => Ioo ↑(a i) ↑(b i)) i)\n[PROOFSTEP]\nlet t : ∀ n : ℕ, γ n → Set (ι → ℝ) := fun n f => Set.pi univ fun i => Icc (a i + f i / n) (a i + (f i + 1) / n)\n[GOAL]\nι✝ : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁶ : EMetricSpace X\ninst✝⁵ : EMetricSpace Y\ninst✝⁴ : MeasurableSpace X\ninst✝³ : BorelSpace X\ninst✝² : MeasurableSpace Y\ninst✝¹ : BorelSpace Y\nι : Type u_4\ninst✝ : Fintype ι\na b : ι → ℚ\nH : ∀ (i : ι), a i < b i\nI : ∀ (i : ι), 0 ≤ ↑(b i) - ↑(a i)\nγ : ℕ → Type u_4 := fun n => (i : ι) → Fin ⌈(↑(b i) - ↑(a i)) * ↑n⌉₊\nt : (n : ℕ) → γ n → Set (ι → ℝ) :=\n  fun n f => Set.pi univ fun i => Icc (↑(a i) + ↑↑(f i) / ↑n) (↑(a i) + (↑↑(f i) + 1) / ↑n)\n⊢ ↑↑μH[↑(Fintype.card ι)] (Set.pi univ fun i => Ioo ↑(a i) ↑(b i)) ≤ ∏ i : ι, ↑↑volume ((fun i => Ioo ↑(a i) ↑(b i)) i)\n[PROOFSTEP]\nhave A : Tendsto (fun n : ℕ => 1 / (n : ℝ≥0∞)) atTop (𝓝 0) := by simp only [one_div, ENNReal.tendsto_inv_nat_nhds_zero]\n[GOAL]\nι✝ : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁶ : EMetricSpace X\ninst✝⁵ : EMetricSpace Y\ninst✝⁴ : MeasurableSpace X\ninst✝³ : BorelSpace X\ninst✝² : MeasurableSpace Y\ninst✝¹ : BorelSpace Y\nι : Type u_4\ninst✝ : Fintype ι\na b : ι → ℚ\nH : ∀ (i : ι), a i < b i\nI : ∀ (i : ι), 0 ≤ ↑(b i) - ↑(a i)\nγ : ℕ → Type u_4 := fun n => (i : ι) → Fin ⌈(↑(b i) - ↑(a i)) * ↑n⌉₊\nt : (n : ℕ) → γ n → Set (ι → ℝ) :=\n  fun n f => Set.pi univ fun i => Icc (↑(a i) + ↑↑(f i) / ↑n) (↑(a i) + (↑↑(f i) + 1) / ↑n)\n⊢ Tendsto (fun n => 1 / ↑n) atTop (𝓝 0)\n[PROOFSTEP]\nsimp only [one_div, ENNReal.tendsto_inv_nat_nhds_zero]\n[GOAL]\nι✝ : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁶ : EMetricSpace X\ninst✝⁵ : EMetricSpace Y\ninst✝⁴ : MeasurableSpace X\ninst✝³ : BorelSpace X\ninst✝² : MeasurableSpace Y\ninst✝¹ : BorelSpace Y\nι : Type u_4\ninst✝ : Fintype ι\na b : ι → ℚ\nH : ∀ (i : ι), a i < b i\nI : ∀ (i : ι), 0 ≤ ↑(b i) - ↑(a i)\nγ : ℕ → Type u_4 := fun n => (i : ι) → Fin ⌈(↑(b i) - ↑(a i)) * ↑n⌉₊\nt : (n : ℕ) → γ n → Set (ι → ℝ) :=\n  fun n f => Set.pi univ fun i => Icc (↑(a i) + ↑↑(f i) / ↑n) (↑(a i) + (↑↑(f i) + 1) / ↑n)\nA : Tendsto (fun n => 1 / ↑n) atTop (𝓝 0)\n⊢ ↑↑μH[↑(Fintype.card ι)] (Set.pi univ fun i => Ioo ↑(a i) ↑(b i)) ≤ ∏ i : ι, ↑↑volume ((fun i => Ioo ↑(a i) ↑(b i)) i)\n[PROOFSTEP]\nhave B : ∀ᶠ n in atTop, ∀ i : γ n, diam (t n i) ≤ 1 / n :=\n  by\n  refine' eventually_atTop.2 ⟨1, fun n hn => _⟩\n  intro f\n  refine' diam_pi_le_of_le fun b => _\n  simp only [Real.ediam_Icc, add_div, ENNReal.ofReal_div_of_pos (Nat.cast_pos.mpr hn), le_refl, add_sub_add_left_eq_sub,\n    add_sub_cancel', ENNReal.ofReal_one, ENNReal.ofReal_coe_nat]\n[GOAL]\nι✝ : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁶ : EMetricSpace X\ninst✝⁵ : EMetricSpace Y\ninst✝⁴ : MeasurableSpace X\ninst✝³ : BorelSpace X\ninst✝² : MeasurableSpace Y\ninst✝¹ : BorelSpace Y\nι : Type u_4\ninst✝ : Fintype ι\na b : ι → ℚ\nH : ∀ (i : ι), a i < b i\nI : ∀ (i : ι), 0 ≤ ↑(b i) - ↑(a i)\nγ : ℕ → Type u_4 := fun n => (i : ι) → Fin ⌈(↑(b i) - ↑(a i)) * ↑n⌉₊\nt : (n : ℕ) → γ n → Set (ι → ℝ) :=\n  fun n f => Set.pi univ fun i => Icc (↑(a i) + ↑↑(f i) / ↑n) (↑(a i) + (↑↑(f i) + 1) / ↑n)\nA : Tendsto (fun n => 1 / ↑n) atTop (𝓝 0)\n⊢ ∀ᶠ (n : ℕ) in atTop, ∀ (i : γ n), diam (t n i) ≤ 1 / ↑n\n[PROOFSTEP]\nrefine' eventually_atTop.2 ⟨1, fun n hn => _⟩\n[GOAL]\nι✝ : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁶ : EMetricSpace X\ninst✝⁵ : EMetricSpace Y\ninst✝⁴ : MeasurableSpace X\ninst✝³ : BorelSpace X\ninst✝² : MeasurableSpace Y\ninst✝¹ : BorelSpace Y\nι : Type u_4\ninst✝ : Fintype ι\na b : ι → ℚ\nH : ∀ (i : ι), a i < b i\nI : ∀ (i : ι), 0 ≤ ↑(b i) - ↑(a i)\nγ : ℕ → Type u_4 := fun n => (i : ι) → Fin ⌈(↑(b i) - ↑(a i)) * ↑n⌉₊\nt : (n : ℕ) → γ n → Set (ι → ℝ) :=\n  fun n f => Set.pi univ fun i => Icc (↑(a i) + ↑↑(f i) / ↑n) (↑(a i) + (↑↑(f i) + 1) / ↑n)\nA : Tendsto (fun n => 1 / ↑n) atTop (𝓝 0)\nn : ℕ\nhn : n ≥ 1\n⊢ ∀ (i : γ n), diam (t n i) ≤ 1 / ↑n\n[PROOFSTEP]\nintro f\n[GOAL]\nι✝ : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁶ : EMetricSpace X\ninst✝⁵ : EMetricSpace Y\ninst✝⁴ : MeasurableSpace X\ninst✝³ : BorelSpace X\ninst✝² : MeasurableSpace Y\ninst✝¹ : BorelSpace Y\nι : Type u_4\ninst✝ : Fintype ι\na b : ι → ℚ\nH : ∀ (i : ι), a i < b i\nI : ∀ (i : ι), 0 ≤ ↑(b i) - ↑(a i)\nγ : ℕ → Type u_4 := fun n => (i : ι) → Fin ⌈(↑(b i) - ↑(a i)) * ↑n⌉₊\nt : (n : ℕ) → γ n → Set (ι → ℝ) :=\n  fun n f => Set.pi univ fun i => Icc (↑(a i) + ↑↑(f i) / ↑n) (↑(a i) + (↑↑(f i) + 1) / ↑n)\nA : Tendsto (fun n => 1 / ↑n) atTop (𝓝 0)\nn : ℕ\nhn : n ≥ 1\nf : γ n\n⊢ diam (t n f) ≤ 1 / ↑n\n[PROOFSTEP]\nrefine' diam_pi_le_of_le fun b => _\n[GOAL]\nι✝ : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁶ : EMetricSpace X\ninst✝⁵ : EMetricSpace Y\ninst✝⁴ : MeasurableSpace X\ninst✝³ : BorelSpace X\ninst✝² : MeasurableSpace Y\ninst✝¹ : BorelSpace Y\nι : Type u_4\ninst✝ : Fintype ι\na b✝ : ι → ℚ\nH : ∀ (i : ι), a i < b✝ i\nI : ∀ (i : ι), 0 ≤ ↑(b✝ i) - ↑(a i)\nγ : ℕ → Type u_4 := fun n => (i : ι) → Fin ⌈(↑(b✝ i) - ↑(a i)) * ↑n⌉₊\nt : (n : ℕ) → γ n → Set (ι → ℝ) :=\n  fun n f => Set.pi univ fun i => Icc (↑(a i) + ↑↑(f i) / ↑n) (↑(a i) + (↑↑(f i) + 1) / ↑n)\nA : Tendsto (fun n => 1 / ↑n) atTop (𝓝 0)\nn : ℕ\nhn : n ≥ 1\nf : γ n\nb : ι\n⊢ diam (Icc (↑(a b) + ↑↑(f b) / ↑n) (↑(a b) + (↑↑(f b) + 1) / ↑n)) ≤ 1 / ↑n\n[PROOFSTEP]\nsimp only [Real.ediam_Icc, add_div, ENNReal.ofReal_div_of_pos (Nat.cast_pos.mpr hn), le_refl, add_sub_add_left_eq_sub,\n  add_sub_cancel', ENNReal.ofReal_one, ENNReal.ofReal_coe_nat]\n[GOAL]\nι✝ : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁶ : EMetricSpace X\ninst✝⁵ : EMetricSpace Y\ninst✝⁴ : MeasurableSpace X\ninst✝³ : BorelSpace X\ninst✝² : MeasurableSpace Y\ninst✝¹ : BorelSpace Y\nι : Type u_4\ninst✝ : Fintype ι\na b : ι → ℚ\nH : ∀ (i : ι), a i < b i\nI : ∀ (i : ι), 0 ≤ ↑(b i) - ↑(a i)\nγ : ℕ → Type u_4 := fun n => (i : ι) → Fin ⌈(↑(b i) - ↑(a i)) * ↑n⌉₊\nt : (n : ℕ) → γ n → Set (ι → ℝ) :=\n  fun n f => Set.pi univ fun i => Icc (↑(a i) + ↑↑(f i) / ↑n) (↑(a i) + (↑↑(f i) + 1) / ↑n)\nA : Tendsto (fun n => 1 / ↑n) atTop (𝓝 0)\nB : ∀ᶠ (n : ℕ) in atTop, ∀ (i : γ n), diam (t n i) ≤ 1 / ↑n\n⊢ ↑↑μH[↑(Fintype.card ι)] (Set.pi univ fun i => Ioo ↑(a i) ↑(b i)) ≤ ∏ i : ι, ↑↑volume ((fun i => Ioo ↑(a i) ↑(b i)) i)\n[PROOFSTEP]\nhave C : ∀ᶠ n in atTop, (Set.pi univ fun i : ι => Ioo (a i : ℝ) (b i)) ⊆ ⋃ i : γ n, t n i :=\n  by\n  refine' eventually_atTop.2 ⟨1, fun n hn => _⟩\n  have npos : (0 : ℝ) < n := Nat.cast_pos.2 hn\n  intro x hx\n  simp only [mem_Ioo, mem_univ_pi] at hx \n  simp only [mem_iUnion, mem_Ioo, mem_univ_pi]\n  let f : γ n := fun i =>\n    ⟨⌊(x i - a i) * n⌋₊, by\n      apply Nat.floor_lt_ceil_of_lt_of_pos\n      · refine' (mul_lt_mul_right npos).2 _\n        simp only [(hx i).right, sub_lt_sub_iff_right]\n      · refine' mul_pos _ npos\n        simpa only [Rat.cast_lt, sub_pos] using H i⟩\n  refine' ⟨f, fun i => ⟨_, _⟩⟩\n  ·\n    calc\n      (a i : ℝ) + ⌊(x i - a i) * n⌋₊ / n ≤ (a i : ℝ) + (x i - a i) * n / n :=\n        by\n        refine' add_le_add le_rfl ((div_le_div_right npos).2 _)\n        exact Nat.floor_le (mul_nonneg (sub_nonneg.2 (hx i).1.le) npos.le)\n      _ = x i := by field_simp [npos.ne']\n  ·\n    calc\n      x i = (a i : ℝ) + (x i - a i) * n / n := by field_simp [npos.ne']\n      _ ≤ (a i : ℝ) + (⌊(x i - a i) * n⌋₊ + 1) / n :=\n        add_le_add le_rfl ((div_le_div_right npos).2 (Nat.lt_floor_add_one _).le)\n[GOAL]\nι✝ : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁶ : EMetricSpace X\ninst✝⁵ : EMetricSpace Y\ninst✝⁴ : MeasurableSpace X\ninst✝³ : BorelSpace X\ninst✝² : MeasurableSpace Y\ninst✝¹ : BorelSpace Y\nι : Type u_4\ninst✝ : Fintype ι\na b : ι → ℚ\nH : ∀ (i : ι), a i < b i\nI : ∀ (i : ι), 0 ≤ ↑(b i) - ↑(a i)\nγ : ℕ → Type u_4 := fun n => (i : ι) → Fin ⌈(↑(b i) - ↑(a i)) * ↑n⌉₊\nt : (n : ℕ) → γ n → Set (ι → ℝ) :=\n  fun n f => Set.pi univ fun i => Icc (↑(a i) + ↑↑(f i) / ↑n) (↑(a i) + (↑↑(f i) + 1) / ↑n)\nA : Tendsto (fun n => 1 / ↑n) atTop (𝓝 0)\nB : ∀ᶠ (n : ℕ) in atTop, ∀ (i : γ n), diam (t n i) ≤ 1 / ↑n\n⊢ ∀ᶠ (n : ℕ) in atTop, (Set.pi univ fun i => Ioo ↑(a i) ↑(b i)) ⊆ ⋃ (i : γ n), t n i\n[PROOFSTEP]\nrefine' eventually_atTop.2 ⟨1, fun n hn => _⟩\n[GOAL]\nι✝ : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁶ : EMetricSpace X\ninst✝⁵ : EMetricSpace Y\ninst✝⁴ : MeasurableSpace X\ninst✝³ : BorelSpace X\ninst✝² : MeasurableSpace Y\ninst✝¹ : BorelSpace Y\nι : Type u_4\ninst✝ : Fintype ι\na b : ι → ℚ\nH : ∀ (i : ι), a i < b i\nI : ∀ (i : ι), 0 ≤ ↑(b i) - ↑(a i)\nγ : ℕ → Type u_4 := fun n => (i : ι) → Fin ⌈(↑(b i) - ↑(a i)) * ↑n⌉₊\nt : (n : ℕ) → γ n → Set (ι → ℝ) :=\n  fun n f => Set.pi univ fun i => Icc (↑(a i) + ↑↑(f i) / ↑n) (↑(a i) + (↑↑(f i) + 1) / ↑n)\nA : Tendsto (fun n => 1 / ↑n) atTop (𝓝 0)\nB : ∀ᶠ (n : ℕ) in atTop, ∀ (i : γ n), diam (t n i) ≤ 1 / ↑n\nn : ℕ\nhn : n ≥ 1\n⊢ (Set.pi univ fun i => Ioo ↑(a i) ↑(b i)) ⊆ ⋃ (i : γ n), t n i\n[PROOFSTEP]\nhave npos : (0 : ℝ) < n := Nat.cast_pos.2 hn\n[GOAL]\nι✝ : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁶ : EMetricSpace X\ninst✝⁵ : EMetricSpace Y\ninst✝⁴ : MeasurableSpace X\ninst✝³ : BorelSpace X\ninst✝² : MeasurableSpace Y\ninst✝¹ : BorelSpace Y\nι : Type u_4\ninst✝ : Fintype ι\na b : ι → ℚ\nH : ∀ (i : ι), a i < b i\nI : ∀ (i : ι), 0 ≤ ↑(b i) - ↑(a i)\nγ : ℕ → Type u_4 := fun n => (i : ι) → Fin ⌈(↑(b i) - ↑(a i)) * ↑n⌉₊\nt : (n : ℕ) → γ n → Set (ι → ℝ) :=\n  fun n f => Set.pi univ fun i => Icc (↑(a i) + ↑↑(f i) / ↑n) (↑(a i) + (↑↑(f i) + 1) / ↑n)\nA : Tendsto (fun n => 1 / ↑n) atTop (𝓝 0)\nB : ∀ᶠ (n : ℕ) in atTop, ∀ (i : γ n), diam (t n i) ≤ 1 / ↑n\nn : ℕ\nhn : n ≥ 1\nnpos : 0 < ↑n\n⊢ (Set.pi univ fun i => Ioo ↑(a i) ↑(b i)) ⊆ ⋃ (i : γ n), t n i\n[PROOFSTEP]\nintro x hx\n[GOAL]\nι✝ : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁶ : EMetricSpace X\ninst✝⁵ : EMetricSpace Y\ninst✝⁴ : MeasurableSpace X\ninst✝³ : BorelSpace X\ninst✝² : MeasurableSpace Y\ninst✝¹ : BorelSpace Y\nι : Type u_4\ninst✝ : Fintype ι\na b : ι → ℚ\nH : ∀ (i : ι), a i < b i\nI : ∀ (i : ι), 0 ≤ ↑(b i) - ↑(a i)\nγ : ℕ → Type u_4 := fun n => (i : ι) → Fin ⌈(↑(b i) - ↑(a i)) * ↑n⌉₊\nt : (n : ℕ) → γ n → Set (ι → ℝ) :=\n  fun n f => Set.pi univ fun i => Icc (↑(a i) + ↑↑(f i) / ↑n) (↑(a i) + (↑↑(f i) + 1) / ↑n)\nA : Tendsto (fun n => 1 / ↑n) atTop (𝓝 0)\nB : ∀ᶠ (n : ℕ) in atTop, ∀ (i : γ n), diam (t n i) ≤ 1 / ↑n\nn : ℕ\nhn : n ≥ 1\nnpos : 0 < ↑n\nx : ι → ℝ\nhx : x ∈ Set.pi univ fun i => Ioo ↑(a i) ↑(b i)\n⊢ x ∈ ⋃ (i : γ n), t n i\n[PROOFSTEP]\nsimp only [mem_Ioo, mem_univ_pi] at hx \n[GOAL]\nι✝ : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁶ : EMetricSpace X\ninst✝⁵ : EMetricSpace Y\ninst✝⁴ : MeasurableSpace X\ninst✝³ : BorelSpace X\ninst✝² : MeasurableSpace Y\ninst✝¹ : BorelSpace Y\nι : Type u_4\ninst✝ : Fintype ι\na b : ι → ℚ\nH : ∀ (i : ι), a i < b i\nI : ∀ (i : ι), 0 ≤ ↑(b i) - ↑(a i)\nγ : ℕ → Type u_4 := fun n => (i : ι) → Fin ⌈(↑(b i) - ↑(a i)) * ↑n⌉₊\nt : (n : ℕ) → γ n → Set (ι → ℝ) :=\n  fun n f => Set.pi univ fun i => Icc (↑(a i) + ↑↑(f i) / ↑n) (↑(a i) + (↑↑(f i) + 1) / ↑n)\nA : Tendsto (fun n => 1 / ↑n) atTop (𝓝 0)\nB : ∀ᶠ (n : ℕ) in atTop, ∀ (i : γ n), diam (t n i) ≤ 1 / ↑n\nn : ℕ\nhn : n ≥ 1\nnpos : 0 < ↑n\nx : ι → ℝ\nhx : ∀ (i : ι), ↑(a i) < x i ∧ x i < ↑(b i)\n⊢ x ∈ ⋃ (i : γ n), t n i\n[PROOFSTEP]\nsimp only [mem_iUnion, mem_Ioo, mem_univ_pi]\n[GOAL]\nι✝ : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁶ : EMetricSpace X\ninst✝⁵ : EMetricSpace Y\ninst✝⁴ : MeasurableSpace X\ninst✝³ : BorelSpace X\ninst✝² : MeasurableSpace Y\ninst✝¹ : BorelSpace Y\nι : Type u_4\ninst✝ : Fintype ι\na b : ι → ℚ\nH : ∀ (i : ι), a i < b i\nI : ∀ (i : ι), 0 ≤ ↑(b i) - ↑(a i)\nγ : ℕ → Type u_4 := fun n => (i : ι) → Fin ⌈(↑(b i) - ↑(a i)) * ↑n⌉₊\nt : (n : ℕ) → γ n → Set (ι → ℝ) :=\n  fun n f => Set.pi univ fun i => Icc (↑(a i) + ↑↑(f i) / ↑n) (↑(a i) + (↑↑(f i) + 1) / ↑n)\nA : Tendsto (fun n => 1 / ↑n) atTop (𝓝 0)\nB : ∀ᶠ (n : ℕ) in atTop, ∀ (i : γ n), diam (t n i) ≤ 1 / ↑n\nn : ℕ\nhn : n ≥ 1\nnpos : 0 < ↑n\nx : ι → ℝ\nhx : ∀ (i : ι), ↑(a i) < x i ∧ x i < ↑(b i)\n⊢ ∃ i, ∀ (i_1 : ι), x i_1 ∈ Icc (↑(a i_1) + ↑↑(i i_1) / ↑n) (↑(a i_1) + (↑↑(i i_1) + 1) / ↑n)\n[PROOFSTEP]\nlet f : γ n := fun i =>\n  ⟨⌊(x i - a i) * n⌋₊, by\n    apply Nat.floor_lt_ceil_of_lt_of_pos\n    · refine' (mul_lt_mul_right npos).2 _\n      simp only [(hx i).right, sub_lt_sub_iff_right]\n    · refine' mul_pos _ npos\n      simpa only [Rat.cast_lt, sub_pos] using H i⟩\n[GOAL]\nι✝ : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁶ : EMetricSpace X\ninst✝⁵ : EMetricSpace Y\ninst✝⁴ : MeasurableSpace X\ninst✝³ : BorelSpace X\ninst✝² : MeasurableSpace Y\ninst✝¹ : BorelSpace Y\nι : Type u_4\ninst✝ : Fintype ι\na b : ι → ℚ\nH : ∀ (i : ι), a i < b i\nI : ∀ (i : ι), 0 ≤ ↑(b i) - ↑(a i)\nγ : ℕ → Type u_4 := fun n => (i : ι) → Fin ⌈(↑(b i) - ↑(a i)) * ↑n⌉₊\nt : (n : ℕ) → γ n → Set (ι → ℝ) :=\n  fun n f => Set.pi univ fun i => Icc (↑(a i) + ↑↑(f i) / ↑n) (↑(a i) + (↑↑(f i) + 1) / ↑n)\nA : Tendsto (fun n => 1 / ↑n) atTop (𝓝 0)\nB : ∀ᶠ (n : ℕ) in atTop, ∀ (i : γ n), diam (t n i) ≤ 1 / ↑n\nn : ℕ\nhn : n ≥ 1\nnpos : 0 < ↑n\nx : ι → ℝ\nhx : ∀ (i : ι), ↑(a i) < x i ∧ x i < ↑(b i)\ni : ι\n⊢ ⌊(x i - ↑(a i)) * ↑n⌋₊ < ⌈(↑(b i) - ↑(a i)) * ↑n⌉₊\n[PROOFSTEP]\napply Nat.floor_lt_ceil_of_lt_of_pos\n[GOAL]\ncase h\nι✝ : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁶ : EMetricSpace X\ninst✝⁵ : EMetricSpace Y\ninst✝⁴ : MeasurableSpace X\ninst✝³ : BorelSpace X\ninst✝² : MeasurableSpace Y\ninst✝¹ : BorelSpace Y\nι : Type u_4\ninst✝ : Fintype ι\na b : ι → ℚ\nH : ∀ (i : ι), a i < b i\nI : ∀ (i : ι), 0 ≤ ↑(b i) - ↑(a i)\nγ : ℕ → Type u_4 := fun n => (i : ι) → Fin ⌈(↑(b i) - ↑(a i)) * ↑n⌉₊\nt : (n : ℕ) → γ n → Set (ι → ℝ) :=\n  fun n f => Set.pi univ fun i => Icc (↑(a i) + ↑↑(f i) / ↑n) (↑(a i) + (↑↑(f i) + 1) / ↑n)\nA : Tendsto (fun n => 1 / ↑n) atTop (𝓝 0)\nB : ∀ᶠ (n : ℕ) in atTop, ∀ (i : γ n), diam (t n i) ≤ 1 / ↑n\nn : ℕ\nhn : n ≥ 1\nnpos : 0 < ↑n\nx : ι → ℝ\nhx : ∀ (i : ι), ↑(a i) < x i ∧ x i < ↑(b i)\ni : ι\n⊢ (x i - ↑(a i)) * ↑n < (↑(b i) - ↑(a i)) * ↑n\n[PROOFSTEP]\nrefine' (mul_lt_mul_right npos).2 _\n[GOAL]\ncase h\nι✝ : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁶ : EMetricSpace X\ninst✝⁵ : EMetricSpace Y\ninst✝⁴ : MeasurableSpace X\ninst✝³ : BorelSpace X\ninst✝² : MeasurableSpace Y\ninst✝¹ : BorelSpace Y\nι : Type u_4\ninst✝ : Fintype ι\na b : ι → ℚ\nH : ∀ (i : ι), a i < b i\nI : ∀ (i : ι), 0 ≤ ↑(b i) - ↑(a i)\nγ : ℕ → Type u_4 := fun n => (i : ι) → Fin ⌈(↑(b i) - ↑(a i)) * ↑n⌉₊\nt : (n : ℕ) → γ n → Set (ι → ℝ) :=\n  fun n f => Set.pi univ fun i => Icc (↑(a i) + ↑↑(f i) / ↑n) (↑(a i) + (↑↑(f i) + 1) / ↑n)\nA : Tendsto (fun n => 1 / ↑n) atTop (𝓝 0)\nB : ∀ᶠ (n : ℕ) in atTop, ∀ (i : γ n), diam (t n i) ≤ 1 / ↑n\nn : ℕ\nhn : n ≥ 1\nnpos : 0 < ↑n\nx : ι → ℝ\nhx : ∀ (i : ι), ↑(a i) < x i ∧ x i < ↑(b i)\ni : ι\n⊢ x i - ↑(a i) < ↑(b i) - ↑(a i)\n[PROOFSTEP]\nsimp only [(hx i).right, sub_lt_sub_iff_right]\n[GOAL]\ncase h'\nι✝ : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁶ : EMetricSpace X\ninst✝⁵ : EMetricSpace Y\ninst✝⁴ : MeasurableSpace X\ninst✝³ : BorelSpace X\ninst✝² : MeasurableSpace Y\ninst✝¹ : BorelSpace Y\nι : Type u_4\ninst✝ : Fintype ι\na b : ι → ℚ\nH : ∀ (i : ι), a i < b i\nI : ∀ (i : ι), 0 ≤ ↑(b i) - ↑(a i)\nγ : ℕ → Type u_4 := fun n => (i : ι) → Fin ⌈(↑(b i) - ↑(a i)) * ↑n⌉₊\nt : (n : ℕ) → γ n → Set (ι → ℝ) :=\n  fun n f => Set.pi univ fun i => Icc (↑(a i) + ↑↑(f i) / ↑n) (↑(a i) + (↑↑(f i) + 1) / ↑n)\nA : Tendsto (fun n => 1 / ↑n) atTop (𝓝 0)\nB : ∀ᶠ (n : ℕ) in atTop, ∀ (i : γ n), diam (t n i) ≤ 1 / ↑n\nn : ℕ\nhn : n ≥ 1\nnpos : 0 < ↑n\nx : ι → ℝ\nhx : ∀ (i : ι), ↑(a i) < x i ∧ x i < ↑(b i)\ni : ι\n⊢ 0 < (↑(b i) - ↑(a i)) * ↑n\n[PROOFSTEP]\nrefine' mul_pos _ npos\n[GOAL]\ncase h'\nι✝ : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁶ : EMetricSpace X\ninst✝⁵ : EMetricSpace Y\ninst✝⁴ : MeasurableSpace X\ninst✝³ : BorelSpace X\ninst✝² : MeasurableSpace Y\ninst✝¹ : BorelSpace Y\nι : Type u_4\ninst✝ : Fintype ι\na b : ι → ℚ\nH : ∀ (i : ι), a i < b i\nI : ∀ (i : ι), 0 ≤ ↑(b i) - ↑(a i)\nγ : ℕ → Type u_4 := fun n => (i : ι) → Fin ⌈(↑(b i) - ↑(a i)) * ↑n⌉₊\nt : (n : ℕ) → γ n → Set (ι → ℝ) :=\n  fun n f => Set.pi univ fun i => Icc (↑(a i) + ↑↑(f i) / ↑n) (↑(a i) + (↑↑(f i) + 1) / ↑n)\nA : Tendsto (fun n => 1 / ↑n) atTop (𝓝 0)\nB : ∀ᶠ (n : ℕ) in atTop, ∀ (i : γ n), diam (t n i) ≤ 1 / ↑n\nn : ℕ\nhn : n ≥ 1\nnpos : 0 < ↑n\nx : ι → ℝ\nhx : ∀ (i : ι), ↑(a i) < x i ∧ x i < ↑(b i)\ni : ι\n⊢ 0 < ↑(b i) - ↑(a i)\n[PROOFSTEP]\nsimpa only [Rat.cast_lt, sub_pos] using H i\n[GOAL]\nι✝ : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁶ : EMetricSpace X\ninst✝⁵ : EMetricSpace Y\ninst✝⁴ : MeasurableSpace X\ninst✝³ : BorelSpace X\ninst✝² : MeasurableSpace Y\ninst✝¹ : BorelSpace Y\nι : Type u_4\ninst✝ : Fintype ι\na b : ι → ℚ\nH : ∀ (i : ι), a i < b i\nI : ∀ (i : ι), 0 ≤ ↑(b i) - ↑(a i)\nγ : ℕ → Type u_4 := fun n => (i : ι) → Fin ⌈(↑(b i) - ↑(a i)) * ↑n⌉₊\nt : (n : ℕ) → γ n → Set (ι → ℝ) :=\n  fun n f => Set.pi univ fun i => Icc (↑(a i) + ↑↑(f i) / ↑n) (↑(a i) + (↑↑(f i) + 1) / ↑n)\nA : Tendsto (fun n => 1 / ↑n) atTop (𝓝 0)\nB : ∀ᶠ (n : ℕ) in atTop, ∀ (i : γ n), diam (t n i) ≤ 1 / ↑n\nn : ℕ\nhn : n ≥ 1\nnpos : 0 < ↑n\nx : ι → ℝ\nhx : ∀ (i : ι), ↑(a i) < x i ∧ x i < ↑(b i)\nf : γ n := fun i => { val := ⌊(x i - ↑(a i)) * ↑n⌋₊, isLt := (_ : ⌊(x i - ↑(a i)) * ↑n⌋₊ < ⌈(↑(b i) - ↑(a i)) * ↑n⌉₊) }\n⊢ ∃ i, ∀ (i_1 : ι), x i_1 ∈ Icc (↑(a i_1) + ↑↑(i i_1) / ↑n) (↑(a i_1) + (↑↑(i i_1) + 1) / ↑n)\n[PROOFSTEP]\nrefine' ⟨f, fun i => ⟨_, _⟩⟩\n[GOAL]\ncase refine'_1\nι✝ : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁶ : EMetricSpace X\ninst✝⁵ : EMetricSpace Y\ninst✝⁴ : MeasurableSpace X\ninst✝³ : BorelSpace X\ninst✝² : MeasurableSpace Y\ninst✝¹ : BorelSpace Y\nι : Type u_4\ninst✝ : Fintype ι\na b : ι → ℚ\nH : ∀ (i : ι), a i < b i\nI : ∀ (i : ι), 0 ≤ ↑(b i) - ↑(a i)\nγ : ℕ → Type u_4 := fun n => (i : ι) → Fin ⌈(↑(b i) - ↑(a i)) * ↑n⌉₊\nt : (n : ℕ) → γ n → Set (ι → ℝ) :=\n  fun n f => Set.pi univ fun i => Icc (↑(a i) + ↑↑(f i) / ↑n) (↑(a i) + (↑↑(f i) + 1) / ↑n)\nA : Tendsto (fun n => 1 / ↑n) atTop (𝓝 0)\nB : ∀ᶠ (n : ℕ) in atTop, ∀ (i : γ n), diam (t n i) ≤ 1 / ↑n\nn : ℕ\nhn : n ≥ 1\nnpos : 0 < ↑n\nx : ι → ℝ\nhx : ∀ (i : ι), ↑(a i) < x i ∧ x i < ↑(b i)\nf : γ n := fun i => { val := ⌊(x i - ↑(a i)) * ↑n⌋₊, isLt := (_ : ⌊(x i - ↑(a i)) * ↑n⌋₊ < ⌈(↑(b i) - ↑(a i)) * ↑n⌉₊) }\ni : ι\n⊢ ↑(a i) + ↑↑(f i) / ↑n ≤ x i\n[PROOFSTEP]\ncalc\n  (a i : ℝ) + ⌊(x i - a i) * n⌋₊ / n ≤ (a i : ℝ) + (x i - a i) * n / n :=\n    by\n    refine' add_le_add le_rfl ((div_le_div_right npos).2 _)\n    exact Nat.floor_le (mul_nonneg (sub_nonneg.2 (hx i).1.le) npos.le)\n  _ = x i := by field_simp [npos.ne']\n[GOAL]\nι✝ : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁶ : EMetricSpace X\ninst✝⁵ : EMetricSpace Y\ninst✝⁴ : MeasurableSpace X\ninst✝³ : BorelSpace X\ninst✝² : MeasurableSpace Y\ninst✝¹ : BorelSpace Y\nι : Type u_4\ninst✝ : Fintype ι\na b : ι → ℚ\nH : ∀ (i : ι), a i < b i\nI : ∀ (i : ι), 0 ≤ ↑(b i) - ↑(a i)\nγ : ℕ → Type u_4 := fun n => (i : ι) → Fin ⌈(↑(b i) - ↑(a i)) * ↑n⌉₊\nt : (n : ℕ) → γ n → Set (ι → ℝ) :=\n  fun n f => Set.pi univ fun i => Icc (↑(a i) + ↑↑(f i) / ↑n) (↑(a i) + (↑↑(f i) + 1) / ↑n)\nA : Tendsto (fun n => 1 / ↑n) atTop (𝓝 0)\nB : ∀ᶠ (n : ℕ) in atTop, ∀ (i : γ n), diam (t n i) ≤ 1 / ↑n\nn : ℕ\nhn : n ≥ 1\nnpos : 0 < ↑n\nx : ι → ℝ\nhx : ∀ (i : ι), ↑(a i) < x i ∧ x i < ↑(b i)\nf : γ n := fun i => { val := ⌊(x i - ↑(a i)) * ↑n⌋₊, isLt := (_ : ⌊(x i - ↑(a i)) * ↑n⌋₊ < ⌈(↑(b i) - ↑(a i)) * ↑n⌉₊) }\ni : ι\n⊢ ↑(a i) + ↑⌊(x i - ↑(a i)) * ↑n⌋₊ / ↑n ≤ ↑(a i) + (x i - ↑(a i)) * ↑n / ↑n\n[PROOFSTEP]\nrefine' add_le_add le_rfl ((div_le_div_right npos).2 _)\n[GOAL]\nι✝ : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁶ : EMetricSpace X\ninst✝⁵ : EMetricSpace Y\ninst✝⁴ : MeasurableSpace X\ninst✝³ : BorelSpace X\ninst✝² : MeasurableSpace Y\ninst✝¹ : BorelSpace Y\nι : Type u_4\ninst✝ : Fintype ι\na b : ι → ℚ\nH : ∀ (i : ι), a i < b i\nI : ∀ (i : ι), 0 ≤ ↑(b i) - ↑(a i)\nγ : ℕ → Type u_4 := fun n => (i : ι) → Fin ⌈(↑(b i) - ↑(a i)) * ↑n⌉₊\nt : (n : ℕ) → γ n → Set (ι → ℝ) :=\n  fun n f => Set.pi univ fun i => Icc (↑(a i) + ↑↑(f i) / ↑n) (↑(a i) + (↑↑(f i) + 1) / ↑n)\nA : Tendsto (fun n => 1 / ↑n) atTop (𝓝 0)\nB : ∀ᶠ (n : ℕ) in atTop, ∀ (i : γ n), diam (t n i) ≤ 1 / ↑n\nn : ℕ\nhn : n ≥ 1\nnpos : 0 < ↑n\nx : ι → ℝ\nhx : ∀ (i : ι), ↑(a i) < x i ∧ x i < ↑(b i)\nf : γ n := fun i => { val := ⌊(x i - ↑(a i)) * ↑n⌋₊, isLt := (_ : ⌊(x i - ↑(a i)) * ↑n⌋₊ < ⌈(↑(b i) - ↑(a i)) * ↑n⌉₊) }\ni : ι\n⊢ ↑⌊(x i - ↑(a i)) * ↑n⌋₊ ≤ (x i - ↑(a i)) * ↑n\n[PROOFSTEP]\nexact Nat.floor_le (mul_nonneg (sub_nonneg.2 (hx i).1.le) npos.le)\n[GOAL]\nι✝ : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁶ : EMetricSpace X\ninst✝⁵ : EMetricSpace Y\ninst✝⁴ : MeasurableSpace X\ninst✝³ : BorelSpace X\ninst✝² : MeasurableSpace Y\ninst✝¹ : BorelSpace Y\nι : Type u_4\ninst✝ : Fintype ι\na b : ι → ℚ\nH : ∀ (i : ι), a i < b i\nI : ∀ (i : ι), 0 ≤ ↑(b i) - ↑(a i)\nγ : ℕ → Type u_4 := fun n => (i : ι) → Fin ⌈(↑(b i) - ↑(a i)) * ↑n⌉₊\nt : (n : ℕ) → γ n → Set (ι → ℝ) :=\n  fun n f => Set.pi univ fun i => Icc (↑(a i) + ↑↑(f i) / ↑n) (↑(a i) + (↑↑(f i) + 1) / ↑n)\nA : Tendsto (fun n => 1 / ↑n) atTop (𝓝 0)\nB : ∀ᶠ (n : ℕ) in atTop, ∀ (i : γ n), diam (t n i) ≤ 1 / ↑n\nn : ℕ\nhn : n ≥ 1\nnpos : 0 < ↑n\nx : ι → ℝ\nhx : ∀ (i : ι), ↑(a i) < x i ∧ x i < ↑(b i)\nf : γ n := fun i => { val := ⌊(x i - ↑(a i)) * ↑n⌋₊, isLt := (_ : ⌊(x i - ↑(a i)) * ↑n⌋₊ < ⌈(↑(b i) - ↑(a i)) * ↑n⌉₊) }\ni : ι\n⊢ ↑(a i) + (x i - ↑(a i)) * ↑n / ↑n = x i\n[PROOFSTEP]\nfield_simp [npos.ne']\n[GOAL]\ncase refine'_2\nι✝ : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁶ : EMetricSpace X\ninst✝⁵ : EMetricSpace Y\ninst✝⁴ : MeasurableSpace X\ninst✝³ : BorelSpace X\ninst✝² : MeasurableSpace Y\ninst✝¹ : BorelSpace Y\nι : Type u_4\ninst✝ : Fintype ι\na b : ι → ℚ\nH : ∀ (i : ι), a i < b i\nI : ∀ (i : ι), 0 ≤ ↑(b i) - ↑(a i)\nγ : ℕ → Type u_4 := fun n => (i : ι) → Fin ⌈(↑(b i) - ↑(a i)) * ↑n⌉₊\nt : (n : ℕ) → γ n → Set (ι → ℝ) :=\n  fun n f => Set.pi univ fun i => Icc (↑(a i) + ↑↑(f i) / ↑n) (↑(a i) + (↑↑(f i) + 1) / ↑n)\nA : Tendsto (fun n => 1 / ↑n) atTop (𝓝 0)\nB : ∀ᶠ (n : ℕ) in atTop, ∀ (i : γ n), diam (t n i) ≤ 1 / ↑n\nn : ℕ\nhn : n ≥ 1\nnpos : 0 < ↑n\nx : ι → ℝ\nhx : ∀ (i : ι), ↑(a i) < x i ∧ x i < ↑(b i)\nf : γ n := fun i => { val := ⌊(x i - ↑(a i)) * ↑n⌋₊, isLt := (_ : ⌊(x i - ↑(a i)) * ↑n⌋₊ < ⌈(↑(b i) - ↑(a i)) * ↑n⌉₊) }\ni : ι\n⊢ x i ≤ ↑(a i) + (↑↑(f i) + 1) / ↑n\n[PROOFSTEP]\ncalc\n  x i = (a i : ℝ) + (x i - a i) * n / n := by field_simp [npos.ne']\n  _ ≤ (a i : ℝ) + (⌊(x i - a i) * n⌋₊ + 1) / n :=\n    add_le_add le_rfl ((div_le_div_right npos).2 (Nat.lt_floor_add_one _).le)\n[GOAL]\nι✝ : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁶ : EMetricSpace X\ninst✝⁵ : EMetricSpace Y\ninst✝⁴ : MeasurableSpace X\ninst✝³ : BorelSpace X\ninst✝² : MeasurableSpace Y\ninst✝¹ : BorelSpace Y\nι : Type u_4\ninst✝ : Fintype ι\na b : ι → ℚ\nH : ∀ (i : ι), a i < b i\nI : ∀ (i : ι), 0 ≤ ↑(b i) - ↑(a i)\nγ : ℕ → Type u_4 := fun n => (i : ι) → Fin ⌈(↑(b i) - ↑(a i)) * ↑n⌉₊\nt : (n : ℕ) → γ n → Set (ι → ℝ) :=\n  fun n f => Set.pi univ fun i => Icc (↑(a i) + ↑↑(f i) / ↑n) (↑(a i) + (↑↑(f i) + 1) / ↑n)\nA : Tendsto (fun n => 1 / ↑n) atTop (𝓝 0)\nB : ∀ᶠ (n : ℕ) in atTop, ∀ (i : γ n), diam (t n i) ≤ 1 / ↑n\nn : ℕ\nhn : n ≥ 1\nnpos : 0 < ↑n\nx : ι → ℝ\nhx : ∀ (i : ι), ↑(a i) < x i ∧ x i < ↑(b i)\nf : γ n := fun i => { val := ⌊(x i - ↑(a i)) * ↑n⌋₊, isLt := (_ : ⌊(x i - ↑(a i)) * ↑n⌋₊ < ⌈(↑(b i) - ↑(a i)) * ↑n⌉₊) }\ni : ι\n⊢ x i = ↑(a i) + (x i - ↑(a i)) * ↑n / ↑n\n[PROOFSTEP]\nfield_simp [npos.ne']\n[GOAL]\nι✝ : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁶ : EMetricSpace X\ninst✝⁵ : EMetricSpace Y\ninst✝⁴ : MeasurableSpace X\ninst✝³ : BorelSpace X\ninst✝² : MeasurableSpace Y\ninst✝¹ : BorelSpace Y\nι : Type u_4\ninst✝ : Fintype ι\na b : ι → ℚ\nH : ∀ (i : ι), a i < b i\nI : ∀ (i : ι), 0 ≤ ↑(b i) - ↑(a i)\nγ : ℕ → Type u_4 := fun n => (i : ι) → Fin ⌈(↑(b i) - ↑(a i)) * ↑n⌉₊\nt : (n : ℕ) → γ n → Set (ι → ℝ) :=\n  fun n f => Set.pi univ fun i => Icc (↑(a i) + ↑↑(f i) / ↑n) (↑(a i) + (↑↑(f i) + 1) / ↑n)\nA : Tendsto (fun n => 1 / ↑n) atTop (𝓝 0)\nB : ∀ᶠ (n : ℕ) in atTop, ∀ (i : γ n), diam (t n i) ≤ 1 / ↑n\nC : ∀ᶠ (n : ℕ) in atTop, (Set.pi univ fun i => Ioo ↑(a i) ↑(b i)) ⊆ ⋃ (i : γ n), t n i\n⊢ ↑↑μH[↑(Fintype.card ι)] (Set.pi univ fun i => Ioo ↑(a i) ↑(b i)) ≤ ∏ i : ι, ↑↑volume ((fun i => Ioo ↑(a i) ↑(b i)) i)\n[PROOFSTEP]\ncalc\n  μH[Fintype.card ι] (Set.pi univ fun i : ι => Ioo (a i : ℝ) (b i)) ≤\n      liminf (fun n : ℕ => ∑ i : γ n, diam (t n i) ^ ((Fintype.card ι) : ℝ)) atTop :=\n    hausdorffMeasure_le_liminf_sum _ (Set.pi univ fun i => Ioo (a i : ℝ) (b i)) (fun n : ℕ => 1 / (n : ℝ≥0∞)) A t B C\n  _ ≤ liminf (fun n : ℕ => ∑ i : γ n, (1 / (n : ℝ≥0∞)) ^ Fintype.card ι) atTop :=\n    by\n    refine' liminf_le_liminf _ _\n    · filter_upwards [B] with _ hn\n      apply Finset.sum_le_sum fun i _ => _\n      simp only [ENNReal.rpow_nat_cast]\n      intros i _\n      exact pow_le_pow_of_le_left' (hn i) _\n    · isBoundedDefault\n  _ = liminf (fun n : ℕ => ∏ i : ι, (⌈((b i : ℝ) - a i) * n⌉₊ : ℝ≥0∞) / n) atTop := by\n    simp only [Finset.card_univ, Nat.cast_prod, one_mul, Fintype.card_fin, Finset.sum_const, nsmul_eq_mul,\n      Fintype.card_pi, div_eq_mul_inv, Finset.prod_mul_distrib, Finset.prod_const]\n  _ = ∏ i : ι, volume (Ioo (a i : ℝ) (b i)) := by\n    simp only [Real.volume_Ioo]\n    apply Tendsto.liminf_eq\n    refine' ENNReal.tendsto_finset_prod_of_ne_top _ (fun i _ => _) fun i _ => _\n    · apply\n        Tendsto.congr' _\n          ((ENNReal.continuous_ofReal.tendsto _).comp\n            ((tendsto_nat_ceil_mul_div_atTop (I i)).comp tendsto_nat_cast_atTop_atTop))\n      apply eventually_atTop.2 ⟨1, fun n hn => _⟩\n      intros n hn\n      simp only [ENNReal.ofReal_div_of_pos (Nat.cast_pos.mpr hn), comp_apply, ENNReal.ofReal_coe_nat]\n    · simp only [ENNReal.ofReal_ne_top, Ne.def, not_false_iff]\n[GOAL]\nι✝ : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁶ : EMetricSpace X\ninst✝⁵ : EMetricSpace Y\ninst✝⁴ : MeasurableSpace X\ninst✝³ : BorelSpace X\ninst✝² : MeasurableSpace Y\ninst✝¹ : BorelSpace Y\nι : Type u_4\ninst✝ : Fintype ι\na b : ι → ℚ\nH : ∀ (i : ι), a i < b i\nI : ∀ (i : ι), 0 ≤ ↑(b i) - ↑(a i)\nγ : ℕ → Type u_4 := fun n => (i : ι) → Fin ⌈(↑(b i) - ↑(a i)) * ↑n⌉₊\nt : (n : ℕ) → γ n → Set (ι → ℝ) :=\n  fun n f => Set.pi univ fun i => Icc (↑(a i) + ↑↑(f i) / ↑n) (↑(a i) + (↑↑(f i) + 1) / ↑n)\nA : Tendsto (fun n => 1 / ↑n) atTop (𝓝 0)\nB : ∀ᶠ (n : ℕ) in atTop, ∀ (i : γ n), diam (t n i) ≤ 1 / ↑n\nC : ∀ᶠ (n : ℕ) in atTop, (Set.pi univ fun i => Ioo ↑(a i) ↑(b i)) ⊆ ⋃ (i : γ n), t n i\n⊢ liminf (fun n => ∑ i : γ n, diam (t n i) ^ ↑(Fintype.card ι)) atTop ≤\n    liminf (fun n => ∑ i : γ n, (1 / ↑n) ^ Fintype.card ι) atTop\n[PROOFSTEP]\nrefine' liminf_le_liminf _ _\n[GOAL]\ncase refine'_1\nι✝ : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁶ : EMetricSpace X\ninst✝⁵ : EMetricSpace Y\ninst✝⁴ : MeasurableSpace X\ninst✝³ : BorelSpace X\ninst✝² : MeasurableSpace Y\ninst✝¹ : BorelSpace Y\nι : Type u_4\ninst✝ : Fintype ι\na b : ι → ℚ\nH : ∀ (i : ι), a i < b i\nI : ∀ (i : ι), 0 ≤ ↑(b i) - ↑(a i)\nγ : ℕ → Type u_4 := fun n => (i : ι) → Fin ⌈(↑(b i) - ↑(a i)) * ↑n⌉₊\nt : (n : ℕ) → γ n → Set (ι → ℝ) :=\n  fun n f => Set.pi univ fun i => Icc (↑(a i) + ↑↑(f i) / ↑n) (↑(a i) + (↑↑(f i) + 1) / ↑n)\nA : Tendsto (fun n => 1 / ↑n) atTop (𝓝 0)\nB : ∀ᶠ (n : ℕ) in atTop, ∀ (i : γ n), diam (t n i) ≤ 1 / ↑n\nC : ∀ᶠ (n : ℕ) in atTop, (Set.pi univ fun i => Ioo ↑(a i) ↑(b i)) ⊆ ⋃ (i : γ n), t n i\n⊢ ∀ᶠ (a_1 : ℕ) in atTop, ∑ i : γ a_1, diam (t a_1 i) ^ ↑(Fintype.card ι) ≤ ∑ i : γ a_1, (1 / ↑a_1) ^ Fintype.card ι\n[PROOFSTEP]\nfilter_upwards [B] with _ hn\n[GOAL]\ncase h\nι✝ : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁶ : EMetricSpace X\ninst✝⁵ : EMetricSpace Y\ninst✝⁴ : MeasurableSpace X\ninst✝³ : BorelSpace X\ninst✝² : MeasurableSpace Y\ninst✝¹ : BorelSpace Y\nι : Type u_4\ninst✝ : Fintype ι\na b : ι → ℚ\nH : ∀ (i : ι), a i < b i\nI : ∀ (i : ι), 0 ≤ ↑(b i) - ↑(a i)\nγ : ℕ → Type u_4 := fun n => (i : ι) → Fin ⌈(↑(b i) - ↑(a i)) * ↑n⌉₊\nt : (n : ℕ) → γ n → Set (ι → ℝ) :=\n  fun n f => Set.pi univ fun i => Icc (↑(a i) + ↑↑(f i) / ↑n) (↑(a i) + (↑↑(f i) + 1) / ↑n)\nA : Tendsto (fun n => 1 / ↑n) atTop (𝓝 0)\nB : ∀ᶠ (n : ℕ) in atTop, ∀ (i : γ n), diam (t n i) ≤ 1 / ↑n\nC : ∀ᶠ (n : ℕ) in atTop, (Set.pi univ fun i => Ioo ↑(a i) ↑(b i)) ⊆ ⋃ (i : γ n), t n i\na✝ : ℕ\nhn :\n  ∀ (i : (i : ι) → Fin ⌈(↑(b i) - ↑(a i)) * ↑a✝⌉₊),\n    diam (Set.pi univ fun i_1 => Icc (↑(a i_1) + ↑↑(i i_1) / ↑a✝) (↑(a i_1) + (↑↑(i i_1) + 1) / ↑a✝)) ≤ 1 / ↑a✝\n⊢ ∑ i : (i : ι) → Fin ⌈(↑(b i) - ↑(a i)) * ↑a✝⌉₊,\n      diam (Set.pi univ fun i_1 => Icc (↑(a i_1) + ↑↑(i i_1) / ↑a✝) (↑(a i_1) + (↑↑(i i_1) + 1) / ↑a✝)) ^\n        ↑(Fintype.card ι) ≤\n    ∑ i : (i : ι) → Fin ⌈(↑(b i) - ↑(a i)) * ↑a✝⌉₊, (1 / ↑a✝) ^ Fintype.card ι\n[PROOFSTEP]\napply Finset.sum_le_sum fun i _ => _\n[GOAL]\nι✝ : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁶ : EMetricSpace X\ninst✝⁵ : EMetricSpace Y\ninst✝⁴ : MeasurableSpace X\ninst✝³ : BorelSpace X\ninst✝² : MeasurableSpace Y\ninst✝¹ : BorelSpace Y\nι : Type u_4\ninst✝ : Fintype ι\na b : ι → ℚ\nH : ∀ (i : ι), a i < b i\nI : ∀ (i : ι), 0 ≤ ↑(b i) - ↑(a i)\nγ : ℕ → Type u_4 := fun n => (i : ι) → Fin ⌈(↑(b i) - ↑(a i)) * ↑n⌉₊\nt : (n : ℕ) → γ n → Set (ι → ℝ) :=\n  fun n f => Set.pi univ fun i => Icc (↑(a i) + ↑↑(f i) / ↑n) (↑(a i) + (↑↑(f i) + 1) / ↑n)\nA : Tendsto (fun n => 1 / ↑n) atTop (𝓝 0)\nB : ∀ᶠ (n : ℕ) in atTop, ∀ (i : γ n), diam (t n i) ≤ 1 / ↑n\nC : ∀ᶠ (n : ℕ) in atTop, (Set.pi univ fun i => Ioo ↑(a i) ↑(b i)) ⊆ ⋃ (i : γ n), t n i\na✝ : ℕ\nhn :\n  ∀ (i : (i : ι) → Fin ⌈(↑(b i) - ↑(a i)) * ↑a✝⌉₊),\n    diam (Set.pi univ fun i_1 => Icc (↑(a i_1) + ↑↑(i i_1) / ↑a✝) (↑(a i_1) + (↑↑(i i_1) + 1) / ↑a✝)) ≤ 1 / ↑a✝\n⊢ ∀ (i : (i : ι) → Fin ⌈(↑(b i) - ↑(a i)) * ↑a✝⌉₊),\n    i ∈ Finset.univ →\n      diam (Set.pi univ fun i_1 => Icc (↑(a i_1) + ↑↑(i i_1) / ↑a✝) (↑(a i_1) + (↑↑(i i_1) + 1) / ↑a✝)) ^\n          ↑(Fintype.card ι) ≤\n        (1 / ↑a✝) ^ Fintype.card ι\n[PROOFSTEP]\nsimp only [ENNReal.rpow_nat_cast]\n[GOAL]\nι✝ : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁶ : EMetricSpace X\ninst✝⁵ : EMetricSpace Y\ninst✝⁴ : MeasurableSpace X\ninst✝³ : BorelSpace X\ninst✝² : MeasurableSpace Y\ninst✝¹ : BorelSpace Y\nι : Type u_4\ninst✝ : Fintype ι\na b : ι → ℚ\nH : ∀ (i : ι), a i < b i\nI : ∀ (i : ι), 0 ≤ ↑(b i) - ↑(a i)\nγ : ℕ → Type u_4 := fun n => (i : ι) → Fin ⌈(↑(b i) - ↑(a i)) * ↑n⌉₊\nt : (n : ℕ) → γ n → Set (ι → ℝ) :=\n  fun n f => Set.pi univ fun i => Icc (↑(a i) + ↑↑(f i) / ↑n) (↑(a i) + (↑↑(f i) + 1) / ↑n)\nA : Tendsto (fun n => 1 / ↑n) atTop (𝓝 0)\nB : ∀ᶠ (n : ℕ) in atTop, ∀ (i : γ n), diam (t n i) ≤ 1 / ↑n\nC : ∀ᶠ (n : ℕ) in atTop, (Set.pi univ fun i => Ioo ↑(a i) ↑(b i)) ⊆ ⋃ (i : γ n), t n i\na✝ : ℕ\nhn :\n  ∀ (i : (i : ι) → Fin ⌈(↑(b i) - ↑(a i)) * ↑a✝⌉₊),\n    diam (Set.pi univ fun i_1 => Icc (↑(a i_1) + ↑↑(i i_1) / ↑a✝) (↑(a i_1) + (↑↑(i i_1) + 1) / ↑a✝)) ≤ 1 / ↑a✝\n⊢ ∀ (i : (i : ι) → Fin ⌈(↑(b i) - ↑(a i)) * ↑a✝⌉₊),\n    i ∈ Finset.univ →\n      diam (Set.pi univ fun i_1 => Icc (↑(a i_1) + ↑↑(i i_1) / ↑a✝) (↑(a i_1) + (↑↑(i i_1) + 1) / ↑a✝)) ^\n          Fintype.card ι ≤\n        (1 / ↑a✝) ^ Fintype.card ι\n[PROOFSTEP]\nintros i _\n[GOAL]\nι✝ : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁶ : EMetricSpace X\ninst✝⁵ : EMetricSpace Y\ninst✝⁴ : MeasurableSpace X\ninst✝³ : BorelSpace X\ninst✝² : MeasurableSpace Y\ninst✝¹ : BorelSpace Y\nι : Type u_4\ninst✝ : Fintype ι\na b : ι → ℚ\nH : ∀ (i : ι), a i < b i\nI : ∀ (i : ι), 0 ≤ ↑(b i) - ↑(a i)\nγ : ℕ → Type u_4 := fun n => (i : ι) → Fin ⌈(↑(b i) - ↑(a i)) * ↑n⌉₊\nt : (n : ℕ) → γ n → Set (ι → ℝ) :=\n  fun n f => Set.pi univ fun i => Icc (↑(a i) + ↑↑(f i) / ↑n) (↑(a i) + (↑↑(f i) + 1) / ↑n)\nA : Tendsto (fun n => 1 / ↑n) atTop (𝓝 0)\nB : ∀ᶠ (n : ℕ) in atTop, ∀ (i : γ n), diam (t n i) ≤ 1 / ↑n\nC : ∀ᶠ (n : ℕ) in atTop, (Set.pi univ fun i => Ioo ↑(a i) ↑(b i)) ⊆ ⋃ (i : γ n), t n i\na✝ : ℕ\nhn :\n  ∀ (i : (i : ι) → Fin ⌈(↑(b i) - ↑(a i)) * ↑a✝⌉₊),\n    diam (Set.pi univ fun i_1 => Icc (↑(a i_1) + ↑↑(i i_1) / ↑a✝) (↑(a i_1) + (↑↑(i i_1) + 1) / ↑a✝)) ≤ 1 / ↑a✝\ni : (i : ι) → Fin ⌈(↑(b i) - ↑(a i)) * ↑a✝⌉₊\nx✝ : i ∈ Finset.univ\n⊢ diam (Set.pi univ fun i_1 => Icc (↑(a i_1) + ↑↑(i i_1) / ↑a✝) (↑(a i_1) + (↑↑(i i_1) + 1) / ↑a✝)) ^ Fintype.card ι ≤\n    (1 / ↑a✝) ^ Fintype.card ι\n[PROOFSTEP]\nexact pow_le_pow_of_le_left' (hn i) _\n[GOAL]\ncase refine'_2\nι✝ : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁶ : EMetricSpace X\ninst✝⁵ : EMetricSpace Y\ninst✝⁴ : MeasurableSpace X\ninst✝³ : BorelSpace X\ninst✝² : MeasurableSpace Y\ninst✝¹ : BorelSpace Y\nι : Type u_4\ninst✝ : Fintype ι\na b : ι → ℚ\nH : ∀ (i : ι), a i < b i\nI : ∀ (i : ι), 0 ≤ ↑(b i) - ↑(a i)\nγ : ℕ → Type u_4 := fun n => (i : ι) → Fin ⌈(↑(b i) - ↑(a i)) * ↑n⌉₊\nt : (n : ℕ) → γ n → Set (ι → ℝ) :=\n  fun n f => Set.pi univ fun i => Icc (↑(a i) + ↑↑(f i) / ↑n) (↑(a i) + (↑↑(f i) + 1) / ↑n)\nA : Tendsto (fun n => 1 / ↑n) atTop (𝓝 0)\nB : ∀ᶠ (n : ℕ) in atTop, ∀ (i : γ n), diam (t n i) ≤ 1 / ↑n\nC : ∀ᶠ (n : ℕ) in atTop, (Set.pi univ fun i => Ioo ↑(a i) ↑(b i)) ⊆ ⋃ (i : γ n), t n i\n⊢ IsBoundedUnder (fun x x_1 => x ≥ x_1) atTop fun n => ∑ i : γ n, diam (t n i) ^ ↑(Fintype.card ι)\n[PROOFSTEP]\nisBoundedDefault\n[GOAL]\nι✝ : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁶ : EMetricSpace X\ninst✝⁵ : EMetricSpace Y\ninst✝⁴ : MeasurableSpace X\ninst✝³ : BorelSpace X\ninst✝² : MeasurableSpace Y\ninst✝¹ : BorelSpace Y\nι : Type u_4\ninst✝ : Fintype ι\na b : ι → ℚ\nH : ∀ (i : ι), a i < b i\nI : ∀ (i : ι), 0 ≤ ↑(b i) - ↑(a i)\nγ : ℕ → Type u_4 := fun n => (i : ι) → Fin ⌈(↑(b i) - ↑(a i)) * ↑n⌉₊\nt : (n : ℕ) → γ n → Set (ι → ℝ) :=\n  fun n f => Set.pi univ fun i => Icc (↑(a i) + ↑↑(f i) / ↑n) (↑(a i) + (↑↑(f i) + 1) / ↑n)\nA : Tendsto (fun n => 1 / ↑n) atTop (𝓝 0)\nB : ∀ᶠ (n : ℕ) in atTop, ∀ (i : γ n), diam (t n i) ≤ 1 / ↑n\nC : ∀ᶠ (n : ℕ) in atTop, (Set.pi univ fun i => Ioo ↑(a i) ↑(b i)) ⊆ ⋃ (i : γ n), t n i\n⊢ liminf (fun n => ∑ i : γ n, (1 / ↑n) ^ Fintype.card ι) atTop =\n    liminf (fun n => ∏ i : ι, ↑⌈(↑(b i) - ↑(a i)) * ↑n⌉₊ / ↑n) atTop\n[PROOFSTEP]\nsimp only [Finset.card_univ, Nat.cast_prod, one_mul, Fintype.card_fin, Finset.sum_const, nsmul_eq_mul, Fintype.card_pi,\n  div_eq_mul_inv, Finset.prod_mul_distrib, Finset.prod_const]\n[GOAL]\nι✝ : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁶ : EMetricSpace X\ninst✝⁵ : EMetricSpace Y\ninst✝⁴ : MeasurableSpace X\ninst✝³ : BorelSpace X\ninst✝² : MeasurableSpace Y\ninst✝¹ : BorelSpace Y\nι : Type u_4\ninst✝ : Fintype ι\na b : ι → ℚ\nH : ∀ (i : ι), a i < b i\nI : ∀ (i : ι), 0 ≤ ↑(b i) - ↑(a i)\nγ : ℕ → Type u_4 := fun n => (i : ι) → Fin ⌈(↑(b i) - ↑(a i)) * ↑n⌉₊\nt : (n : ℕ) → γ n → Set (ι → ℝ) :=\n  fun n f => Set.pi univ fun i => Icc (↑(a i) + ↑↑(f i) / ↑n) (↑(a i) + (↑↑(f i) + 1) / ↑n)\nA : Tendsto (fun n => 1 / ↑n) atTop (𝓝 0)\nB : ∀ᶠ (n : ℕ) in atTop, ∀ (i : γ n), diam (t n i) ≤ 1 / ↑n\nC : ∀ᶠ (n : ℕ) in atTop, (Set.pi univ fun i => Ioo ↑(a i) ↑(b i)) ⊆ ⋃ (i : γ n), t n i\n⊢ liminf (fun n => ∏ i : ι, ↑⌈(↑(b i) - ↑(a i)) * ↑n⌉₊ / ↑n) atTop = ∏ i : ι, ↑↑volume (Ioo ↑(a i) ↑(b i))\n[PROOFSTEP]\nsimp only [Real.volume_Ioo]\n[GOAL]\nι✝ : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁶ : EMetricSpace X\ninst✝⁵ : EMetricSpace Y\ninst✝⁴ : MeasurableSpace X\ninst✝³ : BorelSpace X\ninst✝² : MeasurableSpace Y\ninst✝¹ : BorelSpace Y\nι : Type u_4\ninst✝ : Fintype ι\na b : ι → ℚ\nH : ∀ (i : ι), a i < b i\nI : ∀ (i : ι), 0 ≤ ↑(b i) - ↑(a i)\nγ : ℕ → Type u_4 := fun n => (i : ι) → Fin ⌈(↑(b i) - ↑(a i)) * ↑n⌉₊\nt : (n : ℕ) → γ n → Set (ι → ℝ) :=\n  fun n f => Set.pi univ fun i => Icc (↑(a i) + ↑↑(f i) / ↑n) (↑(a i) + (↑↑(f i) + 1) / ↑n)\nA : Tendsto (fun n => 1 / ↑n) atTop (𝓝 0)\nB : ∀ᶠ (n : ℕ) in atTop, ∀ (i : γ n), diam (t n i) ≤ 1 / ↑n\nC : ∀ᶠ (n : ℕ) in atTop, (Set.pi univ fun i => Ioo ↑(a i) ↑(b i)) ⊆ ⋃ (i : γ n), t n i\n⊢ liminf (fun n => ∏ i : ι, ↑⌈(↑(b i) - ↑(a i)) * ↑n⌉₊ / ↑n) atTop = ∏ x : ι, ENNReal.ofReal (↑(b x) - ↑(a x))\n[PROOFSTEP]\napply Tendsto.liminf_eq\n[GOAL]\ncase h\nι✝ : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁶ : EMetricSpace X\ninst✝⁵ : EMetricSpace Y\ninst✝⁴ : MeasurableSpace X\ninst✝³ : BorelSpace X\ninst✝² : MeasurableSpace Y\ninst✝¹ : BorelSpace Y\nι : Type u_4\ninst✝ : Fintype ι\na b : ι → ℚ\nH : ∀ (i : ι), a i < b i\nI : ∀ (i : ι), 0 ≤ ↑(b i) - ↑(a i)\nγ : ℕ → Type u_4 := fun n => (i : ι) → Fin ⌈(↑(b i) - ↑(a i)) * ↑n⌉₊\nt : (n : ℕ) → γ n → Set (ι → ℝ) :=\n  fun n f => Set.pi univ fun i => Icc (↑(a i) + ↑↑(f i) / ↑n) (↑(a i) + (↑↑(f i) + 1) / ↑n)\nA : Tendsto (fun n => 1 / ↑n) atTop (𝓝 0)\nB : ∀ᶠ (n : ℕ) in atTop, ∀ (i : γ n), diam (t n i) ≤ 1 / ↑n\nC : ∀ᶠ (n : ℕ) in atTop, (Set.pi univ fun i => Ioo ↑(a i) ↑(b i)) ⊆ ⋃ (i : γ n), t n i\n⊢ Tendsto (fun n => ∏ i : ι, ↑⌈(↑(b i) - ↑(a i)) * ↑n⌉₊ / ↑n) atTop (𝓝 (∏ x : ι, ENNReal.ofReal (↑(b x) - ↑(a x))))\n[PROOFSTEP]\nrefine' ENNReal.tendsto_finset_prod_of_ne_top _ (fun i _ => _) fun i _ => _\n[GOAL]\ncase h.refine'_1\nι✝ : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁶ : EMetricSpace X\ninst✝⁵ : EMetricSpace Y\ninst✝⁴ : MeasurableSpace X\ninst✝³ : BorelSpace X\ninst✝² : MeasurableSpace Y\ninst✝¹ : BorelSpace Y\nι : Type u_4\ninst✝ : Fintype ι\na b : ι → ℚ\nH : ∀ (i : ι), a i < b i\nI : ∀ (i : ι), 0 ≤ ↑(b i) - ↑(a i)\nγ : ℕ → Type u_4 := fun n => (i : ι) → Fin ⌈(↑(b i) - ↑(a i)) * ↑n⌉₊\nt : (n : ℕ) → γ n → Set (ι → ℝ) :=\n  fun n f => Set.pi univ fun i => Icc (↑(a i) + ↑↑(f i) / ↑n) (↑(a i) + (↑↑(f i) + 1) / ↑n)\nA : Tendsto (fun n => 1 / ↑n) atTop (𝓝 0)\nB : ∀ᶠ (n : ℕ) in atTop, ∀ (i : γ n), diam (t n i) ≤ 1 / ↑n\nC : ∀ᶠ (n : ℕ) in atTop, (Set.pi univ fun i => Ioo ↑(a i) ↑(b i)) ⊆ ⋃ (i : γ n), t n i\ni : ι\nx✝ : i ∈ Finset.univ\n⊢ Tendsto (fun n => ↑⌈(↑(b i) - ↑(a i)) * ↑n⌉₊ / ↑n) atTop (𝓝 (ENNReal.ofReal (↑(b i) - ↑(a i))))\n[PROOFSTEP]\napply\n  Tendsto.congr' _\n    ((ENNReal.continuous_ofReal.tendsto _).comp\n      ((tendsto_nat_ceil_mul_div_atTop (I i)).comp tendsto_nat_cast_atTop_atTop))\n[GOAL]\nι✝ : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁶ : EMetricSpace X\ninst✝⁵ : EMetricSpace Y\ninst✝⁴ : MeasurableSpace X\ninst✝³ : BorelSpace X\ninst✝² : MeasurableSpace Y\ninst✝¹ : BorelSpace Y\nι : Type u_4\ninst✝ : Fintype ι\na b : ι → ℚ\nH : ∀ (i : ι), a i < b i\nI : ∀ (i : ι), 0 ≤ ↑(b i) - ↑(a i)\nγ : ℕ → Type u_4 := fun n => (i : ι) → Fin ⌈(↑(b i) - ↑(a i)) * ↑n⌉₊\nt : (n : ℕ) → γ n → Set (ι → ℝ) :=\n  fun n f => Set.pi univ fun i => Icc (↑(a i) + ↑↑(f i) / ↑n) (↑(a i) + (↑↑(f i) + 1) / ↑n)\nA : Tendsto (fun n => 1 / ↑n) atTop (𝓝 0)\nB : ∀ᶠ (n : ℕ) in atTop, ∀ (i : γ n), diam (t n i) ≤ 1 / ↑n\nC : ∀ᶠ (n : ℕ) in atTop, (Set.pi univ fun i => Ioo ↑(a i) ↑(b i)) ⊆ ⋃ (i : γ n), t n i\ni : ι\nx✝ : i ∈ Finset.univ\n⊢ ENNReal.ofReal ∘ (fun x => ↑⌈(↑(b i) - ↑(a i)) * x⌉₊ / x) ∘ Nat.cast =ᶠ[atTop] fun n =>\n    ↑⌈(↑(b i) - ↑(a i)) * ↑n⌉₊ / ↑n\n[PROOFSTEP]\napply eventually_atTop.2 ⟨1, fun n hn => _⟩\n[GOAL]\nι✝ : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁶ : EMetricSpace X\ninst✝⁵ : EMetricSpace Y\ninst✝⁴ : MeasurableSpace X\ninst✝³ : BorelSpace X\ninst✝² : MeasurableSpace Y\ninst✝¹ : BorelSpace Y\nι : Type u_4\ninst✝ : Fintype ι\na b : ι → ℚ\nH : ∀ (i : ι), a i < b i\nI : ∀ (i : ι), 0 ≤ ↑(b i) - ↑(a i)\nγ : ℕ → Type u_4 := fun n => (i : ι) → Fin ⌈(↑(b i) - ↑(a i)) * ↑n⌉₊\nt : (n : ℕ) → γ n → Set (ι → ℝ) :=\n  fun n f => Set.pi univ fun i => Icc (↑(a i) + ↑↑(f i) / ↑n) (↑(a i) + (↑↑(f i) + 1) / ↑n)\nA : Tendsto (fun n => 1 / ↑n) atTop (𝓝 0)\nB : ∀ᶠ (n : ℕ) in atTop, ∀ (i : γ n), diam (t n i) ≤ 1 / ↑n\nC : ∀ᶠ (n : ℕ) in atTop, (Set.pi univ fun i => Ioo ↑(a i) ↑(b i)) ⊆ ⋃ (i : γ n), t n i\ni : ι\nx✝ : i ∈ Finset.univ\n⊢ ∀ (n : ℕ),\n    n ≥ 1 →\n      (ENNReal.ofReal ∘ (fun x => ↑⌈(↑(b i) - ↑(a i)) * x⌉₊ / x) ∘ Nat.cast) n =\n        (fun n => ↑⌈(↑(b i) - ↑(a i)) * ↑n⌉₊ / ↑n) n\n[PROOFSTEP]\nintros n hn\n[GOAL]\nι✝ : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁶ : EMetricSpace X\ninst✝⁵ : EMetricSpace Y\ninst✝⁴ : MeasurableSpace X\ninst✝³ : BorelSpace X\ninst✝² : MeasurableSpace Y\ninst✝¹ : BorelSpace Y\nι : Type u_4\ninst✝ : Fintype ι\na b : ι → ℚ\nH : ∀ (i : ι), a i < b i\nI : ∀ (i : ι), 0 ≤ ↑(b i) - ↑(a i)\nγ : ℕ → Type u_4 := fun n => (i : ι) → Fin ⌈(↑(b i) - ↑(a i)) * ↑n⌉₊\nt : (n : ℕ) → γ n → Set (ι → ℝ) :=\n  fun n f => Set.pi univ fun i => Icc (↑(a i) + ↑↑(f i) / ↑n) (↑(a i) + (↑↑(f i) + 1) / ↑n)\nA : Tendsto (fun n => 1 / ↑n) atTop (𝓝 0)\nB : ∀ᶠ (n : ℕ) in atTop, ∀ (i : γ n), diam (t n i) ≤ 1 / ↑n\nC : ∀ᶠ (n : ℕ) in atTop, (Set.pi univ fun i => Ioo ↑(a i) ↑(b i)) ⊆ ⋃ (i : γ n), t n i\ni : ι\nx✝ : i ∈ Finset.univ\nn : ℕ\nhn : n ≥ 1\n⊢ (ENNReal.ofReal ∘ (fun x => ↑⌈(↑(b i) - ↑(a i)) * x⌉₊ / x) ∘ Nat.cast) n =\n    (fun n => ↑⌈(↑(b i) - ↑(a i)) * ↑n⌉₊ / ↑n) n\n[PROOFSTEP]\nsimp only [ENNReal.ofReal_div_of_pos (Nat.cast_pos.mpr hn), comp_apply, ENNReal.ofReal_coe_nat]\n[GOAL]\ncase h.refine'_2\nι✝ : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁶ : EMetricSpace X\ninst✝⁵ : EMetricSpace Y\ninst✝⁴ : MeasurableSpace X\ninst✝³ : BorelSpace X\ninst✝² : MeasurableSpace Y\ninst✝¹ : BorelSpace Y\nι : Type u_4\ninst✝ : Fintype ι\na b : ι → ℚ\nH : ∀ (i : ι), a i < b i\nI : ∀ (i : ι), 0 ≤ ↑(b i) - ↑(a i)\nγ : ℕ → Type u_4 := fun n => (i : ι) → Fin ⌈(↑(b i) - ↑(a i)) * ↑n⌉₊\nt : (n : ℕ) → γ n → Set (ι → ℝ) :=\n  fun n f => Set.pi univ fun i => Icc (↑(a i) + ↑↑(f i) / ↑n) (↑(a i) + (↑↑(f i) + 1) / ↑n)\nA : Tendsto (fun n => 1 / ↑n) atTop (𝓝 0)\nB : ∀ᶠ (n : ℕ) in atTop, ∀ (i : γ n), diam (t n i) ≤ 1 / ↑n\nC : ∀ᶠ (n : ℕ) in atTop, (Set.pi univ fun i => Ioo ↑(a i) ↑(b i)) ⊆ ⋃ (i : γ n), t n i\ni : ι\nx✝ : i ∈ Finset.univ\n⊢ ENNReal.ofReal (↑(b i) - ↑(a i)) ≠ ⊤\n[PROOFSTEP]\nsimp only [ENNReal.ofReal_ne_top, Ne.def, not_false_iff]\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁵ : EMetricSpace X\ninst✝⁴ : EMetricSpace Y\ninst✝³ : MeasurableSpace X\ninst✝² : BorelSpace X\ninst✝¹ : MeasurableSpace Y\ninst✝ : BorelSpace Y\n⊢ μH[1] = volume\n[PROOFSTEP]\nrw [← (volume_preserving_funUnique Unit ℝ).map_eq, ← (hausdorffMeasure_measurePreserving_funUnique Unit ℝ 1).map_eq, ←\n  hausdorffMeasure_pi_real, Fintype.card_unit, Nat.cast_one]\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁵ : EMetricSpace X\ninst✝⁴ : EMetricSpace Y\ninst✝³ : MeasurableSpace X\ninst✝² : BorelSpace X\ninst✝¹ : MeasurableSpace Y\ninst✝ : BorelSpace Y\n⊢ μH[2] = volume\n[PROOFSTEP]\nrw [← (volume_preserving_piFinTwo fun _ => ℝ).map_eq, ←\n  (hausdorffMeasure_measurePreserving_piFinTwo (fun _ => ℝ) _).map_eq, ← hausdorffMeasure_pi_real, Fintype.card_fin,\n  Nat.cast_two]\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁹ : EMetricSpace X\ninst✝⁸ : EMetricSpace Y\ninst✝⁷ : MeasurableSpace X\ninst✝⁶ : BorelSpace X\ninst✝⁵ : MeasurableSpace Y\ninst✝⁴ : BorelSpace Y\n𝕜 : Type u_4\nE : Type u_5\nP : Type u_6\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nv : E\ns : Set ℝ\n⊢ ↑↑μH[1] ((fun r => r • v) '' s) = ‖v‖₊ • ↑↑μH[1] s\n[PROOFSTEP]\nobtain rfl | hv := eq_or_ne v 0\n[GOAL]\ncase inl\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁹ : EMetricSpace X\ninst✝⁸ : EMetricSpace Y\ninst✝⁷ : MeasurableSpace X\ninst✝⁶ : BorelSpace X\ninst✝⁵ : MeasurableSpace Y\ninst✝⁴ : BorelSpace Y\n𝕜 : Type u_4\nE : Type u_5\nP : Type u_6\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\ns : Set ℝ\n⊢ ↑↑μH[1] ((fun r => r • 0) '' s) = ‖0‖₊ • ↑↑μH[1] s\n[PROOFSTEP]\nhaveI := noAtoms_hausdorff E one_pos\n[GOAL]\ncase inl\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁹ : EMetricSpace X\ninst✝⁸ : EMetricSpace Y\ninst✝⁷ : MeasurableSpace X\ninst✝⁶ : BorelSpace X\ninst✝⁵ : MeasurableSpace Y\ninst✝⁴ : BorelSpace Y\n𝕜 : Type u_4\nE : Type u_5\nP : Type u_6\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\ns : Set ℝ\nthis : NoAtoms μH[1]\n⊢ ↑↑μH[1] ((fun r => r • 0) '' s) = ‖0‖₊ • ↑↑μH[1] s\n[PROOFSTEP]\nobtain rfl | hs := s.eq_empty_or_nonempty\n[GOAL]\ncase inl.inl\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁹ : EMetricSpace X\ninst✝⁸ : EMetricSpace Y\ninst✝⁷ : MeasurableSpace X\ninst✝⁶ : BorelSpace X\ninst✝⁵ : MeasurableSpace Y\ninst✝⁴ : BorelSpace Y\n𝕜 : Type u_4\nE : Type u_5\nP : Type u_6\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nthis : NoAtoms μH[1]\n⊢ ↑↑μH[1] ((fun r => r • 0) '' ∅) = ‖0‖₊ • ↑↑μH[1] ∅\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inl.inr\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁹ : EMetricSpace X\ninst✝⁸ : EMetricSpace Y\ninst✝⁷ : MeasurableSpace X\ninst✝⁶ : BorelSpace X\ninst✝⁵ : MeasurableSpace Y\ninst✝⁴ : BorelSpace Y\n𝕜 : Type u_4\nE : Type u_5\nP : Type u_6\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\ns : Set ℝ\nthis : NoAtoms μH[1]\nhs : Set.Nonempty s\n⊢ ↑↑μH[1] ((fun r => r • 0) '' s) = ‖0‖₊ • ↑↑μH[1] s\n[PROOFSTEP]\nsimp [hs]\n[GOAL]\ncase inr\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁹ : EMetricSpace X\ninst✝⁸ : EMetricSpace Y\ninst✝⁷ : MeasurableSpace X\ninst✝⁶ : BorelSpace X\ninst✝⁵ : MeasurableSpace Y\ninst✝⁴ : BorelSpace Y\n𝕜 : Type u_4\nE : Type u_5\nP : Type u_6\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nv : E\ns : Set ℝ\nhv : v ≠ 0\n⊢ ↑↑μH[1] ((fun r => r • v) '' s) = ‖v‖₊ • ↑↑μH[1] s\n[PROOFSTEP]\nhave hn : ‖v‖ ≠ 0 := norm_ne_zero_iff.mpr hv\n[GOAL]\ncase inr\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁹ : EMetricSpace X\ninst✝⁸ : EMetricSpace Y\ninst✝⁷ : MeasurableSpace X\ninst✝⁶ : BorelSpace X\ninst✝⁵ : MeasurableSpace Y\ninst✝⁴ : BorelSpace Y\n𝕜 : Type u_4\nE : Type u_5\nP : Type u_6\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nv : E\ns : Set ℝ\nhv : v ≠ 0\nhn : ‖v‖ ≠ 0\n⊢ ↑↑μH[1] ((fun r => r • v) '' s) = ‖v‖₊ • ↑↑μH[1] s\n[PROOFSTEP]\nsuffices μH[1] ((· • ·) ‖v‖ '' (LinearMap.toSpanSingleton ℝ E (‖v‖⁻¹ • v) '' s)) = ‖v‖₊ • μH[1] s by\n  -- porting note: proof was shorter, could need some golf\n  simp only [hausdorffMeasure_real, nnreal_smul_coe_apply]\n  convert this\n  · simp only [image_smul, LinearMap.toSpanSingleton_apply, Set.image_image]\n    ext e\n    simp\n    refine' ⟨fun ⟨x, h⟩ => ⟨x, _⟩, fun ⟨x, h⟩ => ⟨x, _⟩⟩\n    · rw [smul_comm (norm _), smul_comm (norm _), inv_smul_smul₀ hn]\n      exact h\n    · rw [smul_comm (norm _), smul_comm (norm _), inv_smul_smul₀ hn] at h \n      exact h\n  · exact hausdorffMeasure_real.symm\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁹ : EMetricSpace X\ninst✝⁸ : EMetricSpace Y\ninst✝⁷ : MeasurableSpace X\ninst✝⁶ : BorelSpace X\ninst✝⁵ : MeasurableSpace Y\ninst✝⁴ : BorelSpace Y\n𝕜 : Type u_4\nE : Type u_5\nP : Type u_6\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nv : E\ns : Set ℝ\nhv : v ≠ 0\nhn : ‖v‖ ≠ 0\nthis : ↑↑μH[1] ((fun x x_1 => x • x_1) ‖v‖ '' (↑(LinearMap.toSpanSingleton ℝ E (‖v‖⁻¹ • v)) '' s)) = ‖v‖₊ • ↑↑μH[1] s\n⊢ ↑↑μH[1] ((fun r => r • v) '' s) = ‖v‖₊ • ↑↑μH[1] s\n[PROOFSTEP]\nsimp only [hausdorffMeasure_real, nnreal_smul_coe_apply]\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁹ : EMetricSpace X\ninst✝⁸ : EMetricSpace Y\ninst✝⁷ : MeasurableSpace X\ninst✝⁶ : BorelSpace X\ninst✝⁵ : MeasurableSpace Y\ninst✝⁴ : BorelSpace Y\n𝕜 : Type u_4\nE : Type u_5\nP : Type u_6\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nv : E\ns : Set ℝ\nhv : v ≠ 0\nhn : ‖v‖ ≠ 0\nthis : ↑↑μH[1] ((fun x x_1 => x • x_1) ‖v‖ '' (↑(LinearMap.toSpanSingleton ℝ E (‖v‖⁻¹ • v)) '' s)) = ‖v‖₊ • ↑↑μH[1] s\n⊢ ↑↑μH[1] ((fun r => r • v) '' s) = ↑‖v‖₊ * ↑↑volume s\n[PROOFSTEP]\nconvert this\n[GOAL]\ncase h.e'_2.h.e'_3\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁹ : EMetricSpace X\ninst✝⁸ : EMetricSpace Y\ninst✝⁷ : MeasurableSpace X\ninst✝⁶ : BorelSpace X\ninst✝⁵ : MeasurableSpace Y\ninst✝⁴ : BorelSpace Y\n𝕜 : Type u_4\nE : Type u_5\nP : Type u_6\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nv : E\ns : Set ℝ\nhv : v ≠ 0\nhn : ‖v‖ ≠ 0\nthis : ↑↑μH[1] ((fun x x_1 => x • x_1) ‖v‖ '' (↑(LinearMap.toSpanSingleton ℝ E (‖v‖⁻¹ • v)) '' s)) = ‖v‖₊ • ↑↑μH[1] s\n⊢ (fun r => r • v) '' s = (fun x x_1 => x • x_1) ‖v‖ '' (↑(LinearMap.toSpanSingleton ℝ E (‖v‖⁻¹ • v)) '' s)\n[PROOFSTEP]\nsimp only [image_smul, LinearMap.toSpanSingleton_apply, Set.image_image]\n[GOAL]\ncase h.e'_2.h.e'_3\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁹ : EMetricSpace X\ninst✝⁸ : EMetricSpace Y\ninst✝⁷ : MeasurableSpace X\ninst✝⁶ : BorelSpace X\ninst✝⁵ : MeasurableSpace Y\ninst✝⁴ : BorelSpace Y\n𝕜 : Type u_4\nE : Type u_5\nP : Type u_6\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nv : E\ns : Set ℝ\nhv : v ≠ 0\nhn : ‖v‖ ≠ 0\nthis : ↑↑μH[1] ((fun x x_1 => x • x_1) ‖v‖ '' (↑(LinearMap.toSpanSingleton ℝ E (‖v‖⁻¹ • v)) '' s)) = ‖v‖₊ • ↑↑μH[1] s\n⊢ (fun r => r • v) '' s = (fun a => ‖v‖ • a • ‖v‖⁻¹ • v) '' s\n[PROOFSTEP]\next e\n[GOAL]\ncase h.e'_2.h.e'_3.h\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁹ : EMetricSpace X\ninst✝⁸ : EMetricSpace Y\ninst✝⁷ : MeasurableSpace X\ninst✝⁶ : BorelSpace X\ninst✝⁵ : MeasurableSpace Y\ninst✝⁴ : BorelSpace Y\n𝕜 : Type u_4\nE : Type u_5\nP : Type u_6\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nv : E\ns : Set ℝ\nhv : v ≠ 0\nhn : ‖v‖ ≠ 0\nthis : ↑↑μH[1] ((fun x x_1 => x • x_1) ‖v‖ '' (↑(LinearMap.toSpanSingleton ℝ E (‖v‖⁻¹ • v)) '' s)) = ‖v‖₊ • ↑↑μH[1] s\ne : E\n⊢ e ∈ (fun r => r • v) '' s ↔ e ∈ (fun a => ‖v‖ • a • ‖v‖⁻¹ • v) '' s\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.e'_2.h.e'_3.h\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁹ : EMetricSpace X\ninst✝⁸ : EMetricSpace Y\ninst✝⁷ : MeasurableSpace X\ninst✝⁶ : BorelSpace X\ninst✝⁵ : MeasurableSpace Y\ninst✝⁴ : BorelSpace Y\n𝕜 : Type u_4\nE : Type u_5\nP : Type u_6\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nv : E\ns : Set ℝ\nhv : v ≠ 0\nhn : ‖v‖ ≠ 0\nthis : ↑↑μH[1] ((fun x x_1 => x • x_1) ‖v‖ '' (↑(LinearMap.toSpanSingleton ℝ E (‖v‖⁻¹ • v)) '' s)) = ‖v‖₊ • ↑↑μH[1] s\ne : E\n⊢ (∃ x, x ∈ s ∧ x • v = e) ↔ ∃ x, x ∈ s ∧ ‖v‖ • x • ‖v‖⁻¹ • v = e\n[PROOFSTEP]\nrefine' ⟨fun ⟨x, h⟩ => ⟨x, _⟩, fun ⟨x, h⟩ => ⟨x, _⟩⟩\n[GOAL]\ncase h.e'_2.h.e'_3.h.refine'_1\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁹ : EMetricSpace X\ninst✝⁸ : EMetricSpace Y\ninst✝⁷ : MeasurableSpace X\ninst✝⁶ : BorelSpace X\ninst✝⁵ : MeasurableSpace Y\ninst✝⁴ : BorelSpace Y\n𝕜 : Type u_4\nE : Type u_5\nP : Type u_6\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nv : E\ns : Set ℝ\nhv : v ≠ 0\nhn : ‖v‖ ≠ 0\nthis : ↑↑μH[1] ((fun x x_1 => x • x_1) ‖v‖ '' (↑(LinearMap.toSpanSingleton ℝ E (‖v‖⁻¹ • v)) '' s)) = ‖v‖₊ • ↑↑μH[1] s\ne : E\nx✝ : ∃ x, x ∈ s ∧ x • v = e\nx : ℝ\nh : x ∈ s ∧ x • v = e\n⊢ x ∈ s ∧ ‖v‖ • x • ‖v‖⁻¹ • v = e\n[PROOFSTEP]\nrw [smul_comm (norm _), smul_comm (norm _), inv_smul_smul₀ hn]\n[GOAL]\ncase h.e'_2.h.e'_3.h.refine'_1\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁹ : EMetricSpace X\ninst✝⁸ : EMetricSpace Y\ninst✝⁷ : MeasurableSpace X\ninst✝⁶ : BorelSpace X\ninst✝⁵ : MeasurableSpace Y\ninst✝⁴ : BorelSpace Y\n𝕜 : Type u_4\nE : Type u_5\nP : Type u_6\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nv : E\ns : Set ℝ\nhv : v ≠ 0\nhn : ‖v‖ ≠ 0\nthis : ↑↑μH[1] ((fun x x_1 => x • x_1) ‖v‖ '' (↑(LinearMap.toSpanSingleton ℝ E (‖v‖⁻¹ • v)) '' s)) = ‖v‖₊ • ↑↑μH[1] s\ne : E\nx✝ : ∃ x, x ∈ s ∧ x • v = e\nx : ℝ\nh : x ∈ s ∧ x • v = e\n⊢ x ∈ s ∧ x • v = e\n[PROOFSTEP]\nexact h\n[GOAL]\ncase h.e'_2.h.e'_3.h.refine'_2\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁹ : EMetricSpace X\ninst✝⁸ : EMetricSpace Y\ninst✝⁷ : MeasurableSpace X\ninst✝⁶ : BorelSpace X\ninst✝⁵ : MeasurableSpace Y\ninst✝⁴ : BorelSpace Y\n𝕜 : Type u_4\nE : Type u_5\nP : Type u_6\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nv : E\ns : Set ℝ\nhv : v ≠ 0\nhn : ‖v‖ ≠ 0\nthis : ↑↑μH[1] ((fun x x_1 => x • x_1) ‖v‖ '' (↑(LinearMap.toSpanSingleton ℝ E (‖v‖⁻¹ • v)) '' s)) = ‖v‖₊ • ↑↑μH[1] s\ne : E\nx✝ : ∃ x, x ∈ s ∧ ‖v‖ • x • ‖v‖⁻¹ • v = e\nx : ℝ\nh : x ∈ s ∧ ‖v‖ • x • ‖v‖⁻¹ • v = e\n⊢ x ∈ s ∧ x • v = e\n[PROOFSTEP]\nrw [smul_comm (norm _), smul_comm (norm _), inv_smul_smul₀ hn] at h \n[GOAL]\ncase h.e'_2.h.e'_3.h.refine'_2\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁹ : EMetricSpace X\ninst✝⁸ : EMetricSpace Y\ninst✝⁷ : MeasurableSpace X\ninst✝⁶ : BorelSpace X\ninst✝⁵ : MeasurableSpace Y\ninst✝⁴ : BorelSpace Y\n𝕜 : Type u_4\nE : Type u_5\nP : Type u_6\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nv : E\ns : Set ℝ\nhv : v ≠ 0\nhn : ‖v‖ ≠ 0\nthis : ↑↑μH[1] ((fun x x_1 => x • x_1) ‖v‖ '' (↑(LinearMap.toSpanSingleton ℝ E (‖v‖⁻¹ • v)) '' s)) = ‖v‖₊ • ↑↑μH[1] s\ne : E\nx✝ : ∃ x, x ∈ s ∧ ‖v‖ • x • ‖v‖⁻¹ • v = e\nx : ℝ\nh : x ∈ s ∧ x • v = e\n⊢ x ∈ s ∧ x • v = e\n[PROOFSTEP]\nexact h\n[GOAL]\ncase h.e'_3.h.e'_1.h.e'_2.h.e'_3\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁹ : EMetricSpace X\ninst✝⁸ : EMetricSpace Y\ninst✝⁷ : MeasurableSpace X\ninst✝⁶ : BorelSpace X\ninst✝⁵ : MeasurableSpace Y\ninst✝⁴ : BorelSpace Y\n𝕜 : Type u_4\nE : Type u_5\nP : Type u_6\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nv : E\ns : Set ℝ\nhv : v ≠ 0\nhn : ‖v‖ ≠ 0\nthis : ↑↑μH[1] ((fun x x_1 => x • x_1) ‖v‖ '' (↑(LinearMap.toSpanSingleton ℝ E (‖v‖⁻¹ • v)) '' s)) = ‖v‖₊ • ↑↑μH[1] s\n⊢ volume = μH[1]\n[PROOFSTEP]\nexact hausdorffMeasure_real.symm\n[GOAL]\ncase inr\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁹ : EMetricSpace X\ninst✝⁸ : EMetricSpace Y\ninst✝⁷ : MeasurableSpace X\ninst✝⁶ : BorelSpace X\ninst✝⁵ : MeasurableSpace Y\ninst✝⁴ : BorelSpace Y\n𝕜 : Type u_4\nE : Type u_5\nP : Type u_6\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nv : E\ns : Set ℝ\nhv : v ≠ 0\nhn : ‖v‖ ≠ 0\n⊢ ↑↑μH[1] ((fun x x_1 => x • x_1) ‖v‖ '' (↑(LinearMap.toSpanSingleton ℝ E (‖v‖⁻¹ • v)) '' s)) = ‖v‖₊ • ↑↑μH[1] s\n[PROOFSTEP]\nhave iso_smul : Isometry (LinearMap.toSpanSingleton ℝ E (‖v‖⁻¹ • v)) :=\n  by\n  refine' AddMonoidHomClass.isometry_of_norm _ fun x => (norm_smul _ _).trans _\n  rw [norm_smul, norm_inv, norm_norm, inv_mul_cancel hn, mul_one, LinearMap.id_apply]\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁹ : EMetricSpace X\ninst✝⁸ : EMetricSpace Y\ninst✝⁷ : MeasurableSpace X\ninst✝⁶ : BorelSpace X\ninst✝⁵ : MeasurableSpace Y\ninst✝⁴ : BorelSpace Y\n𝕜 : Type u_4\nE : Type u_5\nP : Type u_6\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nv : E\ns : Set ℝ\nhv : v ≠ 0\nhn : ‖v‖ ≠ 0\n⊢ Isometry ↑(LinearMap.toSpanSingleton ℝ E (‖v‖⁻¹ • v))\n[PROOFSTEP]\nrefine' AddMonoidHomClass.isometry_of_norm _ fun x => (norm_smul _ _).trans _\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁹ : EMetricSpace X\ninst✝⁸ : EMetricSpace Y\ninst✝⁷ : MeasurableSpace X\ninst✝⁶ : BorelSpace X\ninst✝⁵ : MeasurableSpace Y\ninst✝⁴ : BorelSpace Y\n𝕜 : Type u_4\nE : Type u_5\nP : Type u_6\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nv : E\ns : Set ℝ\nhv : v ≠ 0\nhn : ‖v‖ ≠ 0\nx : ℝ\n⊢ ‖↑LinearMap.id x‖ * ‖‖v‖⁻¹ • v‖ = ‖x‖\n[PROOFSTEP]\nrw [norm_smul, norm_inv, norm_norm, inv_mul_cancel hn, mul_one, LinearMap.id_apply]\n[GOAL]\ncase inr\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁹ : EMetricSpace X\ninst✝⁸ : EMetricSpace Y\ninst✝⁷ : MeasurableSpace X\ninst✝⁶ : BorelSpace X\ninst✝⁵ : MeasurableSpace Y\ninst✝⁴ : BorelSpace Y\n𝕜 : Type u_4\nE : Type u_5\nP : Type u_6\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nv : E\ns : Set ℝ\nhv : v ≠ 0\nhn : ‖v‖ ≠ 0\niso_smul : Isometry ↑(LinearMap.toSpanSingleton ℝ E (‖v‖⁻¹ • v))\n⊢ ↑↑μH[1] ((fun x x_1 => x • x_1) ‖v‖ '' (↑(LinearMap.toSpanSingleton ℝ E (‖v‖⁻¹ • v)) '' s)) = ‖v‖₊ • ↑↑μH[1] s\n[PROOFSTEP]\nrw [Set.image_smul, Measure.hausdorffMeasure_smul₀ zero_le_one hn, nnnorm_norm, NNReal.rpow_eq_pow, NNReal.rpow_one,\n  iso_smul.hausdorffMeasure_image (Or.inl <| zero_le_one' ℝ)]\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹² : EMetricSpace X\ninst✝¹¹ : EMetricSpace Y\ninst✝¹⁰ : MeasurableSpace X\ninst✝⁹ : BorelSpace X\ninst✝⁸ : MeasurableSpace Y\ninst✝⁷ : BorelSpace Y\n𝕜 : Type u_4\nE : Type u_5\nP : Type u_6\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : MeasurableSpace P\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor E P\ninst✝ : BorelSpace P\nd : ℝ\nhd : 0 ≤ d\nx : P\nc : 𝕜\nhc : c ≠ 0\ns : Set P\n⊢ ↑↑μH[d] (↑(AffineMap.homothety x c) '' s) = NNReal.rpow ‖c‖₊ d • ↑↑μH[d] s\n[PROOFSTEP]\nsuffices\n  μH[d] (IsometryEquiv.vaddConst x '' ((· • ·) c '' ((IsometryEquiv.vaddConst x).symm '' s))) =\n    NNReal.rpow ‖c‖₊ d • μH[d] s\n  by simpa only [Set.image_image]\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹² : EMetricSpace X\ninst✝¹¹ : EMetricSpace Y\ninst✝¹⁰ : MeasurableSpace X\ninst✝⁹ : BorelSpace X\ninst✝⁸ : MeasurableSpace Y\ninst✝⁷ : BorelSpace Y\n𝕜 : Type u_4\nE : Type u_5\nP : Type u_6\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : MeasurableSpace P\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor E P\ninst✝ : BorelSpace P\nd : ℝ\nhd : 0 ≤ d\nx : P\nc : 𝕜\nhc : c ≠ 0\ns : Set P\nthis :\n  ↑↑μH[d]\n      (↑(IsometryEquiv.vaddConst x) ''\n        ((fun x x_1 => x • x_1) c '' (↑(IsometryEquiv.symm (IsometryEquiv.vaddConst x)) '' s))) =\n    NNReal.rpow ‖c‖₊ d • ↑↑μH[d] s\n⊢ ↑↑μH[d] (↑(AffineMap.homothety x c) '' s) = NNReal.rpow ‖c‖₊ d • ↑↑μH[d] s\n[PROOFSTEP]\nsimpa only [Set.image_image]\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹² : EMetricSpace X\ninst✝¹¹ : EMetricSpace Y\ninst✝¹⁰ : MeasurableSpace X\ninst✝⁹ : BorelSpace X\ninst✝⁸ : MeasurableSpace Y\ninst✝⁷ : BorelSpace Y\n𝕜 : Type u_4\nE : Type u_5\nP : Type u_6\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : MeasurableSpace P\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor E P\ninst✝ : BorelSpace P\nd : ℝ\nhd : 0 ≤ d\nx : P\nc : 𝕜\nhc : c ≠ 0\ns : Set P\n⊢ ↑↑μH[d]\n      (↑(IsometryEquiv.vaddConst x) ''\n        ((fun x x_1 => x • x_1) c '' (↑(IsometryEquiv.symm (IsometryEquiv.vaddConst x)) '' s))) =\n    NNReal.rpow ‖c‖₊ d • ↑↑μH[d] s\n[PROOFSTEP]\nborelize E\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹² : EMetricSpace X\ninst✝¹¹ : EMetricSpace Y\ninst✝¹⁰ : MeasurableSpace X\ninst✝⁹ : BorelSpace X\ninst✝⁸ : MeasurableSpace Y\ninst✝⁷ : BorelSpace Y\n𝕜 : Type u_4\nE : Type u_5\nP : Type u_6\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : MeasurableSpace P\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor E P\ninst✝ : BorelSpace P\nd : ℝ\nhd : 0 ≤ d\nx : P\nc : 𝕜\nhc : c ≠ 0\ns : Set P\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\n⊢ ↑↑μH[d]\n      (↑(IsometryEquiv.vaddConst x) ''\n        ((fun x x_1 => x • x_1) c '' (↑(IsometryEquiv.symm (IsometryEquiv.vaddConst x)) '' s))) =\n    NNReal.rpow ‖c‖₊ d • ↑↑μH[d] s\n[PROOFSTEP]\nrw [IsometryEquiv.hausdorffMeasure_image, Set.image_smul, Measure.hausdorffMeasure_smul₀ hd hc,\n  IsometryEquiv.hausdorffMeasure_image]\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹² : EMetricSpace X\ninst✝¹¹ : EMetricSpace Y\ninst✝¹⁰ : MeasurableSpace X\ninst✝⁹ : BorelSpace X\ninst✝⁸ : MeasurableSpace Y\ninst✝⁷ : BorelSpace Y\n𝕜 : Type u_4\nE : Type u_5\nP : Type u_6\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : MeasurableSpace P\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor E P\ninst✝ : BorelSpace P\nd : ℝ\nhd : 0 ≤ d\nx : P\nc : 𝕜\nhc : c ≠ 0\ns : Set P\n⊢ ↑↑μH[d] (↑(AffineMap.homothety x c) ⁻¹' s) = NNReal.rpow ‖c‖₊⁻¹ d • ↑↑μH[d] s\n[PROOFSTEP]\nchange μH[d] (AffineEquiv.homothetyUnitsMulHom x (Units.mk0 c hc) ⁻¹' s) = _\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹² : EMetricSpace X\ninst✝¹¹ : EMetricSpace Y\ninst✝¹⁰ : MeasurableSpace X\ninst✝⁹ : BorelSpace X\ninst✝⁸ : MeasurableSpace Y\ninst✝⁷ : BorelSpace Y\n𝕜 : Type u_4\nE : Type u_5\nP : Type u_6\ninst✝⁶ : NormedField 𝕜\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\ninst✝³ : MeasurableSpace P\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor E P\ninst✝ : BorelSpace P\nd : ℝ\nhd : 0 ≤ d\nx : P\nc : 𝕜\nhc : c ≠ 0\ns : Set P\n⊢ ↑↑μH[d] (↑(↑(AffineEquiv.homothetyUnitsMulHom x) (Units.mk0 c hc)) ⁻¹' s) = NNReal.rpow ‖c‖₊⁻¹ d • ↑↑μH[d] s\n[PROOFSTEP]\nrw [← AffineEquiv.image_symm, AffineEquiv.coe_homothetyUnitsMulHom_apply_symm,\n  hausdorffMeasure_homothety_image hd x (_ : 𝕜ˣ).isUnit.ne_zero, Units.val_inv_eq_inv_val, Units.val_mk0, nnnorm_inv]\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹¹ : EMetricSpace X\ninst✝¹⁰ : EMetricSpace Y\ninst✝⁹ : MeasurableSpace X\ninst✝⁸ : BorelSpace X\ninst✝⁷ : MeasurableSpace Y\ninst✝⁶ : BorelSpace Y\n𝕜 : Type u_4\nE : Type u_5\nP : Type u_6\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace P\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor E P\ninst✝ : BorelSpace P\nx y : P\ns : Set ℝ\n⊢ ↑↑μH[1] (↑(AffineMap.lineMap x y) '' s) = nndist x y • ↑↑μH[1] s\n[PROOFSTEP]\nsuffices μH[1] (IsometryEquiv.vaddConst x '' ((· • (y -ᵥ x)) '' s)) = nndist x y • μH[1] s by\n  simpa only [Set.image_image]\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹¹ : EMetricSpace X\ninst✝¹⁰ : EMetricSpace Y\ninst✝⁹ : MeasurableSpace X\ninst✝⁸ : BorelSpace X\ninst✝⁷ : MeasurableSpace Y\ninst✝⁶ : BorelSpace Y\n𝕜 : Type u_4\nE : Type u_5\nP : Type u_6\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace P\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor E P\ninst✝ : BorelSpace P\nx y : P\ns : Set ℝ\nthis : ↑↑μH[1] (↑(IsometryEquiv.vaddConst x) '' ((fun x_1 => x_1 • (y -ᵥ x)) '' s)) = nndist x y • ↑↑μH[1] s\n⊢ ↑↑μH[1] (↑(AffineMap.lineMap x y) '' s) = nndist x y • ↑↑μH[1] s\n[PROOFSTEP]\nsimpa only [Set.image_image]\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹¹ : EMetricSpace X\ninst✝¹⁰ : EMetricSpace Y\ninst✝⁹ : MeasurableSpace X\ninst✝⁸ : BorelSpace X\ninst✝⁷ : MeasurableSpace Y\ninst✝⁶ : BorelSpace Y\n𝕜 : Type u_4\nE : Type u_5\nP : Type u_6\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace P\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor E P\ninst✝ : BorelSpace P\nx y : P\ns : Set ℝ\n⊢ ↑↑μH[1] (↑(IsometryEquiv.vaddConst x) '' ((fun x_1 => x_1 • (y -ᵥ x)) '' s)) = nndist x y • ↑↑μH[1] s\n[PROOFSTEP]\nborelize E\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹¹ : EMetricSpace X\ninst✝¹⁰ : EMetricSpace Y\ninst✝⁹ : MeasurableSpace X\ninst✝⁸ : BorelSpace X\ninst✝⁷ : MeasurableSpace Y\ninst✝⁶ : BorelSpace Y\n𝕜 : Type u_4\nE : Type u_5\nP : Type u_6\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace P\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor E P\ninst✝ : BorelSpace P\nx y : P\ns : Set ℝ\nthis✝¹ : MeasurableSpace E := borel E\nthis✝ : BorelSpace E\n⊢ ↑↑μH[1] (↑(IsometryEquiv.vaddConst x) '' ((fun x_1 => x_1 • (y -ᵥ x)) '' s)) = nndist x y • ↑↑μH[1] s\n[PROOFSTEP]\nrw [IsometryEquiv.hausdorffMeasure_image, hausdorffMeasure_smul_right_image, nndist_eq_nnnorm_vsub' E]\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹¹ : EMetricSpace X\ninst✝¹⁰ : EMetricSpace Y\ninst✝⁹ : MeasurableSpace X\ninst✝⁸ : BorelSpace X\ninst✝⁷ : MeasurableSpace Y\ninst✝⁶ : BorelSpace Y\n𝕜 : Type u_4\nE : Type u_5\nP : Type u_6\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace P\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor E P\ninst✝ : BorelSpace P\nx y : P\n⊢ ↑↑μH[1] (affineSegment ℝ x y) = edist x y\n[PROOFSTEP]\nrw [affineSegment, hausdorffMeasure_lineMap_image, hausdorffMeasure_real, Real.volume_Icc, sub_zero, ENNReal.ofReal_one,\n  ← Algebra.algebraMap_eq_smul_one]\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝¹¹ : EMetricSpace X\ninst✝¹⁰ : EMetricSpace Y\ninst✝⁹ : MeasurableSpace X\ninst✝⁸ : BorelSpace X\ninst✝⁷ : MeasurableSpace Y\ninst✝⁶ : BorelSpace Y\n𝕜 : Type u_4\nE : Type u_5\nP : Type u_6\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace P\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor E P\ninst✝ : BorelSpace P\nx y : P\n⊢ ↑(algebraMap ℝ≥0 ℝ≥0∞) (nndist x y) = edist x y\n[PROOFSTEP]\nexact (edist_nndist _ _).symm\n[GOAL]\nι : Type u_1\nX : Type u_2\nY : Type u_3\ninst✝⁹ : EMetricSpace X\ninst✝⁸ : EMetricSpace Y\ninst✝⁷ : MeasurableSpace X\ninst✝⁶ : BorelSpace X\ninst✝⁵ : MeasurableSpace Y\ninst✝⁴ : BorelSpace Y\n𝕜 : Type u_4\nE✝ : Type u_5\nP : Type u_6\nE : Type u_7\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : MeasurableSpace E\ninst✝ : BorelSpace E\nx y : E\n⊢ ↑↑μH[1] (segment ℝ x y) = edist x y\n[PROOFSTEP]\nrw [← affineSegment_eq_segment, hausdorffMeasure_affineSegment]\n", "meta": {"mathlib_filename": "Mathlib.MeasureTheory.Measure.Hausdorff", "llama_tokens": 130899, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7905303186696748, "lm_q2_score": 0.6477982247516796, "lm_q1q2_score": 0.5121041370465949}}
{"text": "[GOAL]\nn : ℕ+\nK : Type u_1\ninst✝⁴ : Field K\nL : Type u_2\nμ : L\ninst✝³ : CommRing L\ninst✝² : IsDomain L\nhμ : IsPrimitiveRoot μ ↑n\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {n} K L\n⊢ Function.Injective ↑(autToPow K hμ)\n[PROOFSTEP]\nintro f g hfg\n[GOAL]\nn : ℕ+\nK : Type u_1\ninst✝⁴ : Field K\nL : Type u_2\nμ : L\ninst✝³ : CommRing L\ninst✝² : IsDomain L\nhμ : IsPrimitiveRoot μ ↑n\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {n} K L\nf g : L ≃ₐ[K] L\nhfg : ↑(autToPow K hμ) f = ↑(autToPow K hμ) g\n⊢ f = g\n[PROOFSTEP]\napply_fun Units.val at hfg \n[GOAL]\nn : ℕ+\nK : Type u_1\ninst✝⁴ : Field K\nL : Type u_2\nμ : L\ninst✝³ : CommRing L\ninst✝² : IsDomain L\nhμ : IsPrimitiveRoot μ ↑n\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {n} K L\nf g : L ≃ₐ[K] L\nhfg : ↑(↑(autToPow K hμ) f) = ↑(↑(autToPow K hμ) g)\n⊢ f = g\n[PROOFSTEP]\nsimp only [IsPrimitiveRoot.coe_autToPow_apply] at hfg \n[GOAL]\nn : ℕ+\nK : Type u_1\ninst✝⁴ : Field K\nL : Type u_2\nμ : L\ninst✝³ : CommRing L\ninst✝² : IsDomain L\nhμ : IsPrimitiveRoot μ ↑n\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {n} K L\nf g : L ≃ₐ[K] L\nhfg :\n  ↑(Exists.choose (_ : ∃ m, ↑f ↑↑(toRootsOfUnity hμ) = ↑↑(toRootsOfUnity hμ) ^ m)) =\n    ↑(Exists.choose (_ : ∃ m, ↑g ↑↑(toRootsOfUnity hμ) = ↑↑(toRootsOfUnity hμ) ^ m))\n⊢ f = g\n[PROOFSTEP]\nrevert hfg\n[GOAL]\nn : ℕ+\nK : Type u_1\ninst✝⁴ : Field K\nL : Type u_2\nμ : L\ninst✝³ : CommRing L\ninst✝² : IsDomain L\nhμ : IsPrimitiveRoot μ ↑n\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {n} K L\nf g : L ≃ₐ[K] L\n⊢ ↑(Exists.choose (_ : ∃ m, ↑f ↑↑(toRootsOfUnity hμ) = ↑↑(toRootsOfUnity hμ) ^ m)) =\n      ↑(Exists.choose (_ : ∃ m, ↑g ↑↑(toRootsOfUnity hμ) = ↑↑(toRootsOfUnity hμ) ^ m)) →\n    f = g\n[PROOFSTEP]\ngeneralize_proofs hf' hg'\n[GOAL]\nn : ℕ+\nK : Type u_1\ninst✝⁴ : Field K\nL : Type u_2\nμ : L\ninst✝³ : CommRing L\ninst✝² : IsDomain L\nhμ : IsPrimitiveRoot μ ↑n\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {n} K L\nf g : L ≃ₐ[K] L\nhf' : ∃ m, ↑f ↑↑(toRootsOfUnity hμ) = ↑↑(toRootsOfUnity hμ) ^ m\nhg' : ∃ m, ↑g ↑↑(toRootsOfUnity hμ) = ↑↑(toRootsOfUnity hμ) ^ m\n⊢ ↑(Exists.choose hf') = ↑(Exists.choose hg') → f = g\n[PROOFSTEP]\nintro hfg\n[GOAL]\nn : ℕ+\nK : Type u_1\ninst✝⁴ : Field K\nL : Type u_2\nμ : L\ninst✝³ : CommRing L\ninst✝² : IsDomain L\nhμ : IsPrimitiveRoot μ ↑n\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {n} K L\nf g : L ≃ₐ[K] L\nhf' : ∃ m, ↑f ↑↑(toRootsOfUnity hμ) = ↑↑(toRootsOfUnity hμ) ^ m\nhg' : ∃ m, ↑g ↑↑(toRootsOfUnity hμ) = ↑↑(toRootsOfUnity hμ) ^ m\nhfg : ↑(Exists.choose hf') = ↑(Exists.choose hg')\n⊢ f = g\n[PROOFSTEP]\nhave hf := hf'.choose_spec\n[GOAL]\nn : ℕ+\nK : Type u_1\ninst✝⁴ : Field K\nL : Type u_2\nμ : L\ninst✝³ : CommRing L\ninst✝² : IsDomain L\nhμ : IsPrimitiveRoot μ ↑n\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {n} K L\nf g : L ≃ₐ[K] L\nhf' : ∃ m, ↑f ↑↑(toRootsOfUnity hμ) = ↑↑(toRootsOfUnity hμ) ^ m\nhg' : ∃ m, ↑g ↑↑(toRootsOfUnity hμ) = ↑↑(toRootsOfUnity hμ) ^ m\nhfg : ↑(Exists.choose hf') = ↑(Exists.choose hg')\nhf : ↑f ↑↑(toRootsOfUnity hμ) = ↑↑(toRootsOfUnity hμ) ^ Exists.choose hf'\n⊢ f = g\n[PROOFSTEP]\nhave hg := hg'.choose_spec\n[GOAL]\nn : ℕ+\nK : Type u_1\ninst✝⁴ : Field K\nL : Type u_2\nμ : L\ninst✝³ : CommRing L\ninst✝² : IsDomain L\nhμ : IsPrimitiveRoot μ ↑n\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {n} K L\nf g : L ≃ₐ[K] L\nhf' : ∃ m, ↑f ↑↑(toRootsOfUnity hμ) = ↑↑(toRootsOfUnity hμ) ^ m\nhg' : ∃ m, ↑g ↑↑(toRootsOfUnity hμ) = ↑↑(toRootsOfUnity hμ) ^ m\nhfg : ↑(Exists.choose hf') = ↑(Exists.choose hg')\nhf : ↑f ↑↑(toRootsOfUnity hμ) = ↑↑(toRootsOfUnity hμ) ^ Exists.choose hf'\nhg : ↑g ↑↑(toRootsOfUnity hμ) = ↑↑(toRootsOfUnity hμ) ^ Exists.choose hg'\n⊢ f = g\n[PROOFSTEP]\nrevert hf hg\n[GOAL]\nn : ℕ+\nK : Type u_1\ninst✝⁴ : Field K\nL : Type u_2\nμ : L\ninst✝³ : CommRing L\ninst✝² : IsDomain L\nhμ : IsPrimitiveRoot μ ↑n\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {n} K L\nf g : L ≃ₐ[K] L\nhf' : ∃ m, ↑f ↑↑(toRootsOfUnity hμ) = ↑↑(toRootsOfUnity hμ) ^ m\nhg' : ∃ m, ↑g ↑↑(toRootsOfUnity hμ) = ↑↑(toRootsOfUnity hμ) ^ m\nhfg : ↑(Exists.choose hf') = ↑(Exists.choose hg')\n⊢ ↑f ↑↑(toRootsOfUnity hμ) = ↑↑(toRootsOfUnity hμ) ^ Exists.choose hf' →\n    ↑g ↑↑(toRootsOfUnity hμ) = ↑↑(toRootsOfUnity hμ) ^ Exists.choose hg' → f = g\n[PROOFSTEP]\ngeneralize_proofs hζ\n[GOAL]\nn : ℕ+\nK : Type u_1\ninst✝⁴ : Field K\nL : Type u_2\nμ : L\ninst✝³ : CommRing L\ninst✝² : IsDomain L\nhμ : IsPrimitiveRoot μ ↑n\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {n} K L\nf g : L ≃ₐ[K] L\nhf' : ∃ m, ↑f ↑↑(toRootsOfUnity hμ) = ↑↑(toRootsOfUnity hμ) ^ m\nhg' : ∃ m, ↑g ↑↑(toRootsOfUnity hμ) = ↑↑(toRootsOfUnity hμ) ^ m\nhfg : ↑(Exists.choose hf') = ↑(Exists.choose hg')\n⊢ ↑f ↑↑(toRootsOfUnity hμ) = ↑↑(toRootsOfUnity hμ) ^ Exists.choose hf' →\n    ↑g ↑↑(toRootsOfUnity hμ) = ↑↑(toRootsOfUnity hμ) ^ Exists.choose hg' → f = g\n[PROOFSTEP]\nintro hf hg\n[GOAL]\nn : ℕ+\nK : Type u_1\ninst✝⁴ : Field K\nL : Type u_2\nμ : L\ninst✝³ : CommRing L\ninst✝² : IsDomain L\nhμ : IsPrimitiveRoot μ ↑n\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {n} K L\nf g : L ≃ₐ[K] L\nhf' : ∃ m, ↑f ↑↑(toRootsOfUnity hμ) = ↑↑(toRootsOfUnity hμ) ^ m\nhg' : ∃ m, ↑g ↑↑(toRootsOfUnity hμ) = ↑↑(toRootsOfUnity hμ) ^ m\nhfg : ↑(Exists.choose hf') = ↑(Exists.choose hg')\nhf : ↑f ↑↑(toRootsOfUnity hμ) = ↑↑(toRootsOfUnity hμ) ^ Exists.choose hf'\nhg : ↑g ↑↑(toRootsOfUnity hμ) = ↑↑(toRootsOfUnity hμ) ^ Exists.choose hg'\n⊢ f = g\n[PROOFSTEP]\nsuffices f (hμ.toRootsOfUnity : Lˣ) = g (hμ.toRootsOfUnity : Lˣ)\n  by\n  apply AlgEquiv.coe_algHom_injective\n  apply (hμ.powerBasis K).algHom_ext\n  exact this\n[GOAL]\nn : ℕ+\nK : Type u_1\ninst✝⁴ : Field K\nL : Type u_2\nμ : L\ninst✝³ : CommRing L\ninst✝² : IsDomain L\nhμ : IsPrimitiveRoot μ ↑n\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {n} K L\nf g : L ≃ₐ[K] L\nhf' : ∃ m, ↑f ↑↑(toRootsOfUnity hμ) = ↑↑(toRootsOfUnity hμ) ^ m\nhg' : ∃ m, ↑g ↑↑(toRootsOfUnity hμ) = ↑↑(toRootsOfUnity hμ) ^ m\nhfg : ↑(Exists.choose hf') = ↑(Exists.choose hg')\nhf : ↑f ↑↑(toRootsOfUnity hμ) = ↑↑(toRootsOfUnity hμ) ^ Exists.choose hf'\nhg : ↑g ↑↑(toRootsOfUnity hμ) = ↑↑(toRootsOfUnity hμ) ^ Exists.choose hg'\nthis : ↑f ↑↑(toRootsOfUnity hμ) = ↑g ↑↑(toRootsOfUnity hμ)\n⊢ f = g\n[PROOFSTEP]\napply AlgEquiv.coe_algHom_injective\n[GOAL]\ncase a\nn : ℕ+\nK : Type u_1\ninst✝⁴ : Field K\nL : Type u_2\nμ : L\ninst✝³ : CommRing L\ninst✝² : IsDomain L\nhμ : IsPrimitiveRoot μ ↑n\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {n} K L\nf g : L ≃ₐ[K] L\nhf' : ∃ m, ↑f ↑↑(toRootsOfUnity hμ) = ↑↑(toRootsOfUnity hμ) ^ m\nhg' : ∃ m, ↑g ↑↑(toRootsOfUnity hμ) = ↑↑(toRootsOfUnity hμ) ^ m\nhfg : ↑(Exists.choose hf') = ↑(Exists.choose hg')\nhf : ↑f ↑↑(toRootsOfUnity hμ) = ↑↑(toRootsOfUnity hμ) ^ Exists.choose hf'\nhg : ↑g ↑↑(toRootsOfUnity hμ) = ↑↑(toRootsOfUnity hμ) ^ Exists.choose hg'\nthis : ↑f ↑↑(toRootsOfUnity hμ) = ↑g ↑↑(toRootsOfUnity hμ)\n⊢ ↑f = ↑g\n[PROOFSTEP]\napply (hμ.powerBasis K).algHom_ext\n[GOAL]\ncase a.h\nn : ℕ+\nK : Type u_1\ninst✝⁴ : Field K\nL : Type u_2\nμ : L\ninst✝³ : CommRing L\ninst✝² : IsDomain L\nhμ : IsPrimitiveRoot μ ↑n\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {n} K L\nf g : L ≃ₐ[K] L\nhf' : ∃ m, ↑f ↑↑(toRootsOfUnity hμ) = ↑↑(toRootsOfUnity hμ) ^ m\nhg' : ∃ m, ↑g ↑↑(toRootsOfUnity hμ) = ↑↑(toRootsOfUnity hμ) ^ m\nhfg : ↑(Exists.choose hf') = ↑(Exists.choose hg')\nhf : ↑f ↑↑(toRootsOfUnity hμ) = ↑↑(toRootsOfUnity hμ) ^ Exists.choose hf'\nhg : ↑g ↑↑(toRootsOfUnity hμ) = ↑↑(toRootsOfUnity hμ) ^ Exists.choose hg'\nthis : ↑f ↑↑(toRootsOfUnity hμ) = ↑g ↑↑(toRootsOfUnity hμ)\n⊢ ↑↑f (IsPrimitiveRoot.powerBasis K hμ).gen = ↑↑g (IsPrimitiveRoot.powerBasis K hμ).gen\n[PROOFSTEP]\nexact this\n[GOAL]\nn : ℕ+\nK : Type u_1\ninst✝⁴ : Field K\nL : Type u_2\nμ : L\ninst✝³ : CommRing L\ninst✝² : IsDomain L\nhμ : IsPrimitiveRoot μ ↑n\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {n} K L\nf g : L ≃ₐ[K] L\nhf' : ∃ m, ↑f ↑↑(toRootsOfUnity hμ) = ↑↑(toRootsOfUnity hμ) ^ m\nhg' : ∃ m, ↑g ↑↑(toRootsOfUnity hμ) = ↑↑(toRootsOfUnity hμ) ^ m\nhfg : ↑(Exists.choose hf') = ↑(Exists.choose hg')\nhf : ↑f ↑↑(toRootsOfUnity hμ) = ↑↑(toRootsOfUnity hμ) ^ Exists.choose hf'\nhg : ↑g ↑↑(toRootsOfUnity hμ) = ↑↑(toRootsOfUnity hμ) ^ Exists.choose hg'\n⊢ ↑f ↑↑(toRootsOfUnity hμ) = ↑g ↑↑(toRootsOfUnity hμ)\n[PROOFSTEP]\nrw [ZMod.eq_iff_modEq_nat] at hfg \n[GOAL]\nn : ℕ+\nK : Type u_1\ninst✝⁴ : Field K\nL : Type u_2\nμ : L\ninst✝³ : CommRing L\ninst✝² : IsDomain L\nhμ : IsPrimitiveRoot μ ↑n\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {n} K L\nf g : L ≃ₐ[K] L\nhf' : ∃ m, ↑f ↑↑(toRootsOfUnity hμ) = ↑↑(toRootsOfUnity hμ) ^ m\nhg' : ∃ m, ↑g ↑↑(toRootsOfUnity hμ) = ↑↑(toRootsOfUnity hμ) ^ m\nhfg : Exists.choose hf' ≡ Exists.choose hg' [MOD ↑n]\nhf : ↑f ↑↑(toRootsOfUnity hμ) = ↑↑(toRootsOfUnity hμ) ^ Exists.choose hf'\nhg : ↑g ↑↑(toRootsOfUnity hμ) = ↑↑(toRootsOfUnity hμ) ^ Exists.choose hg'\n⊢ ↑f ↑↑(toRootsOfUnity hμ) = ↑g ↑↑(toRootsOfUnity hμ)\n[PROOFSTEP]\nrefine' (hf.trans _).trans hg.symm\n[GOAL]\nn : ℕ+\nK : Type u_1\ninst✝⁴ : Field K\nL : Type u_2\nμ : L\ninst✝³ : CommRing L\ninst✝² : IsDomain L\nhμ : IsPrimitiveRoot μ ↑n\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {n} K L\nf g : L ≃ₐ[K] L\nhf' : ∃ m, ↑f ↑↑(toRootsOfUnity hμ) = ↑↑(toRootsOfUnity hμ) ^ m\nhg' : ∃ m, ↑g ↑↑(toRootsOfUnity hμ) = ↑↑(toRootsOfUnity hμ) ^ m\nhfg : Exists.choose hf' ≡ Exists.choose hg' [MOD ↑n]\nhf : ↑f ↑↑(toRootsOfUnity hμ) = ↑↑(toRootsOfUnity hμ) ^ Exists.choose hf'\nhg : ↑g ↑↑(toRootsOfUnity hμ) = ↑↑(toRootsOfUnity hμ) ^ Exists.choose hg'\n⊢ ↑↑(toRootsOfUnity hμ) ^ Exists.choose hf' = ↑↑(toRootsOfUnity hμ) ^ Exists.choose hg'\n[PROOFSTEP]\nrw [← rootsOfUnity.coe_pow _ hf'.choose, ← rootsOfUnity.coe_pow _ hg'.choose]\n[GOAL]\nn : ℕ+\nK : Type u_1\ninst✝⁴ : Field K\nL : Type u_2\nμ : L\ninst✝³ : CommRing L\ninst✝² : IsDomain L\nhμ : IsPrimitiveRoot μ ↑n\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {n} K L\nf g : L ≃ₐ[K] L\nhf' : ∃ m, ↑f ↑↑(toRootsOfUnity hμ) = ↑↑(toRootsOfUnity hμ) ^ m\nhg' : ∃ m, ↑g ↑↑(toRootsOfUnity hμ) = ↑↑(toRootsOfUnity hμ) ^ m\nhfg : Exists.choose hf' ≡ Exists.choose hg' [MOD ↑n]\nhf : ↑f ↑↑(toRootsOfUnity hμ) = ↑↑(toRootsOfUnity hμ) ^ Exists.choose hf'\nhg : ↑g ↑↑(toRootsOfUnity hμ) = ↑↑(toRootsOfUnity hμ) ^ Exists.choose hg'\n⊢ ↑↑(toRootsOfUnity hμ ^ Exists.choose hf') = ↑↑(toRootsOfUnity hμ ^ Exists.choose hg')\n[PROOFSTEP]\ncongr 2\n[GOAL]\ncase e_self.e_self\nn : ℕ+\nK : Type u_1\ninst✝⁴ : Field K\nL : Type u_2\nμ : L\ninst✝³ : CommRing L\ninst✝² : IsDomain L\nhμ : IsPrimitiveRoot μ ↑n\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {n} K L\nf g : L ≃ₐ[K] L\nhf' : ∃ m, ↑f ↑↑(toRootsOfUnity hμ) = ↑↑(toRootsOfUnity hμ) ^ m\nhg' : ∃ m, ↑g ↑↑(toRootsOfUnity hμ) = ↑↑(toRootsOfUnity hμ) ^ m\nhfg : Exists.choose hf' ≡ Exists.choose hg' [MOD ↑n]\nhf : ↑f ↑↑(toRootsOfUnity hμ) = ↑↑(toRootsOfUnity hμ) ^ Exists.choose hf'\nhg : ↑g ↑↑(toRootsOfUnity hμ) = ↑↑(toRootsOfUnity hμ) ^ Exists.choose hg'\n⊢ toRootsOfUnity hμ ^ Exists.choose hf' = toRootsOfUnity hμ ^ Exists.choose hg'\n[PROOFSTEP]\nrw [pow_eq_pow_iff_modEq]\n[GOAL]\ncase e_self.e_self\nn : ℕ+\nK : Type u_1\ninst✝⁴ : Field K\nL : Type u_2\nμ : L\ninst✝³ : CommRing L\ninst✝² : IsDomain L\nhμ : IsPrimitiveRoot μ ↑n\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {n} K L\nf g : L ≃ₐ[K] L\nhf' : ∃ m, ↑f ↑↑(toRootsOfUnity hμ) = ↑↑(toRootsOfUnity hμ) ^ m\nhg' : ∃ m, ↑g ↑↑(toRootsOfUnity hμ) = ↑↑(toRootsOfUnity hμ) ^ m\nhfg : Exists.choose hf' ≡ Exists.choose hg' [MOD ↑n]\nhf : ↑f ↑↑(toRootsOfUnity hμ) = ↑↑(toRootsOfUnity hμ) ^ Exists.choose hf'\nhg : ↑g ↑↑(toRootsOfUnity hμ) = ↑↑(toRootsOfUnity hμ) ^ Exists.choose hg'\n⊢ Exists.choose hf' ≡ Exists.choose hg' [MOD orderOf (toRootsOfUnity hμ)]\n[PROOFSTEP]\nconvert hfg\n[GOAL]\ncase h.e'_1\nn : ℕ+\nK : Type u_1\ninst✝⁴ : Field K\nL : Type u_2\nμ : L\ninst✝³ : CommRing L\ninst✝² : IsDomain L\nhμ : IsPrimitiveRoot μ ↑n\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {n} K L\nf g : L ≃ₐ[K] L\nhf' : ∃ m, ↑f ↑↑(toRootsOfUnity hμ) = ↑↑(toRootsOfUnity hμ) ^ m\nhg' : ∃ m, ↑g ↑↑(toRootsOfUnity hμ) = ↑↑(toRootsOfUnity hμ) ^ m\nhfg : Exists.choose hf' ≡ Exists.choose hg' [MOD ↑n]\nhf : ↑f ↑↑(toRootsOfUnity hμ) = ↑↑(toRootsOfUnity hμ) ^ Exists.choose hf'\nhg : ↑g ↑↑(toRootsOfUnity hμ) = ↑↑(toRootsOfUnity hμ) ^ Exists.choose hg'\n⊢ orderOf (toRootsOfUnity hμ) = ↑n\n[PROOFSTEP]\nrw [hμ.eq_orderOf]\n  -- Porting note: was `{occs := occurrences.pos [2]}`\n[GOAL]\ncase h.e'_1\nn : ℕ+\nK : Type u_1\ninst✝⁴ : Field K\nL : Type u_2\nμ : L\ninst✝³ : CommRing L\ninst✝² : IsDomain L\nhμ : IsPrimitiveRoot μ ↑n\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {n} K L\nf g : L ≃ₐ[K] L\nhf' : ∃ m, ↑f ↑↑(toRootsOfUnity hμ) = ↑↑(toRootsOfUnity hμ) ^ m\nhg' : ∃ m, ↑g ↑↑(toRootsOfUnity hμ) = ↑↑(toRootsOfUnity hμ) ^ m\nhfg : Exists.choose hf' ≡ Exists.choose hg' [MOD ↑n]\nhf : ↑f ↑↑(toRootsOfUnity hμ) = ↑↑(toRootsOfUnity hμ) ^ Exists.choose hf'\nhg : ↑g ↑↑(toRootsOfUnity hμ) = ↑↑(toRootsOfUnity hμ) ^ Exists.choose hg'\n⊢ orderOf (toRootsOfUnity hμ) = orderOf μ\n[PROOFSTEP]\nconv_rhs => rw [← hμ.toRootsOfUnity_coe_val]\n[GOAL]\nn : ℕ+\nK : Type u_1\ninst✝⁴ : Field K\nL : Type u_2\nμ : L\ninst✝³ : CommRing L\ninst✝² : IsDomain L\nhμ : IsPrimitiveRoot μ ↑n\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {n} K L\nf g : L ≃ₐ[K] L\nhf' : ∃ m, ↑f ↑↑(toRootsOfUnity hμ) = ↑↑(toRootsOfUnity hμ) ^ m\nhg' : ∃ m, ↑g ↑↑(toRootsOfUnity hμ) = ↑↑(toRootsOfUnity hμ) ^ m\nhfg : Exists.choose hf' ≡ Exists.choose hg' [MOD ↑n]\nhf : ↑f ↑↑(toRootsOfUnity hμ) = ↑↑(toRootsOfUnity hμ) ^ Exists.choose hf'\nhg : ↑g ↑↑(toRootsOfUnity hμ) = ↑↑(toRootsOfUnity hμ) ^ Exists.choose hg'\n| orderOf μ\n[PROOFSTEP]\nrw [← hμ.toRootsOfUnity_coe_val]\n[GOAL]\nn : ℕ+\nK : Type u_1\ninst✝⁴ : Field K\nL : Type u_2\nμ : L\ninst✝³ : CommRing L\ninst✝² : IsDomain L\nhμ : IsPrimitiveRoot μ ↑n\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {n} K L\nf g : L ≃ₐ[K] L\nhf' : ∃ m, ↑f ↑↑(toRootsOfUnity hμ) = ↑↑(toRootsOfUnity hμ) ^ m\nhg' : ∃ m, ↑g ↑↑(toRootsOfUnity hμ) = ↑↑(toRootsOfUnity hμ) ^ m\nhfg : Exists.choose hf' ≡ Exists.choose hg' [MOD ↑n]\nhf : ↑f ↑↑(toRootsOfUnity hμ) = ↑↑(toRootsOfUnity hμ) ^ Exists.choose hf'\nhg : ↑g ↑↑(toRootsOfUnity hμ) = ↑↑(toRootsOfUnity hμ) ^ Exists.choose hg'\n| orderOf μ\n[PROOFSTEP]\nrw [← hμ.toRootsOfUnity_coe_val]\n[GOAL]\nn : ℕ+\nK : Type u_1\ninst✝⁴ : Field K\nL : Type u_2\nμ : L\ninst✝³ : CommRing L\ninst✝² : IsDomain L\nhμ : IsPrimitiveRoot μ ↑n\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {n} K L\nf g : L ≃ₐ[K] L\nhf' : ∃ m, ↑f ↑↑(toRootsOfUnity hμ) = ↑↑(toRootsOfUnity hμ) ^ m\nhg' : ∃ m, ↑g ↑↑(toRootsOfUnity hμ) = ↑↑(toRootsOfUnity hμ) ^ m\nhfg : Exists.choose hf' ≡ Exists.choose hg' [MOD ↑n]\nhf : ↑f ↑↑(toRootsOfUnity hμ) = ↑↑(toRootsOfUnity hμ) ^ Exists.choose hf'\nhg : ↑g ↑↑(toRootsOfUnity hμ) = ↑↑(toRootsOfUnity hμ) ^ Exists.choose hg'\n| orderOf μ\n[PROOFSTEP]\nrw [← hμ.toRootsOfUnity_coe_val]\n[GOAL]\ncase h.e'_1\nn : ℕ+\nK : Type u_1\ninst✝⁴ : Field K\nL : Type u_2\nμ : L\ninst✝³ : CommRing L\ninst✝² : IsDomain L\nhμ : IsPrimitiveRoot μ ↑n\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {n} K L\nf g : L ≃ₐ[K] L\nhf' : ∃ m, ↑f ↑↑(toRootsOfUnity hμ) = ↑↑(toRootsOfUnity hμ) ^ m\nhg' : ∃ m, ↑g ↑↑(toRootsOfUnity hμ) = ↑↑(toRootsOfUnity hμ) ^ m\nhfg : Exists.choose hf' ≡ Exists.choose hg' [MOD ↑n]\nhf : ↑f ↑↑(toRootsOfUnity hμ) = ↑↑(toRootsOfUnity hμ) ^ Exists.choose hf'\nhg : ↑g ↑↑(toRootsOfUnity hμ) = ↑↑(toRootsOfUnity hμ) ^ Exists.choose hg'\n⊢ orderOf (toRootsOfUnity hμ) = orderOf ↑↑(toRootsOfUnity hμ)\n[PROOFSTEP]\nrw [orderOf_units, orderOf_subgroup]\n[GOAL]\nn : ℕ+\nK : Type u_1\ninst✝⁴ : Field K\nL : Type u_2\nμ : L\ninst✝³ : CommRing L\ninst✝² : IsDomain L\nhμ✝ : IsPrimitiveRoot μ ↑n\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {n} K L\nh : Irreducible (cyclotomic (↑n) K)\nhζ : IsPrimitiveRoot (zeta n K L) ↑n := zeta_spec n K L\nhμ : ∀ (t : (ZMod ↑n)ˣ), IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑t) ↑n :=\n  fun t => IsPrimitiveRoot.pow_of_coprime hζ (ZMod.val ↑t) (ZMod.val_coe_unit_coprime t)\nsrc✝ : (L ≃ₐ[K] L) →* (ZMod ↑n)ˣ := IsPrimitiveRoot.autToPow K (_ : IsPrimitiveRoot (zeta n K L) ↑n)\nt : (ZMod ↑n)ˣ\n⊢ minpoly K (IsPrimitiveRoot.powerBasis K hζ).gen =\n    minpoly K (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑t) ↑n)).gen\n[PROOFSTEP]\nhaveI := IsCyclotomicExtension.neZero' n K L\n[GOAL]\nn : ℕ+\nK : Type u_1\ninst✝⁴ : Field K\nL : Type u_2\nμ : L\ninst✝³ : CommRing L\ninst✝² : IsDomain L\nhμ✝ : IsPrimitiveRoot μ ↑n\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {n} K L\nh : Irreducible (cyclotomic (↑n) K)\nhζ : IsPrimitiveRoot (zeta n K L) ↑n := zeta_spec n K L\nhμ : ∀ (t : (ZMod ↑n)ˣ), IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑t) ↑n :=\n  fun t => IsPrimitiveRoot.pow_of_coprime hζ (ZMod.val ↑t) (ZMod.val_coe_unit_coprime t)\nsrc✝ : (L ≃ₐ[K] L) →* (ZMod ↑n)ˣ := IsPrimitiveRoot.autToPow K (_ : IsPrimitiveRoot (zeta n K L) ↑n)\nt : (ZMod ↑n)ˣ\nthis : NeZero ↑↑n\n⊢ minpoly K (IsPrimitiveRoot.powerBasis K hζ).gen =\n    minpoly K (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑t) ↑n)).gen\n[PROOFSTEP]\nsimp only [IsPrimitiveRoot.powerBasis_gen]\n[GOAL]\nn : ℕ+\nK : Type u_1\ninst✝⁴ : Field K\nL : Type u_2\nμ : L\ninst✝³ : CommRing L\ninst✝² : IsDomain L\nhμ✝ : IsPrimitiveRoot μ ↑n\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {n} K L\nh : Irreducible (cyclotomic (↑n) K)\nhζ : IsPrimitiveRoot (zeta n K L) ↑n := zeta_spec n K L\nhμ : ∀ (t : (ZMod ↑n)ˣ), IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑t) ↑n :=\n  fun t => IsPrimitiveRoot.pow_of_coprime hζ (ZMod.val ↑t) (ZMod.val_coe_unit_coprime t)\nsrc✝ : (L ≃ₐ[K] L) →* (ZMod ↑n)ˣ := IsPrimitiveRoot.autToPow K (_ : IsPrimitiveRoot (zeta n K L) ↑n)\nt : (ZMod ↑n)ˣ\nthis : NeZero ↑↑n\n⊢ minpoly K (zeta n K L) = minpoly K (zeta n K L ^ ZMod.val ↑t)\n[PROOFSTEP]\nhave hr :=\n  IsPrimitiveRoot.minpoly_eq_cyclotomic_of_irreducible\n    ((zeta_spec n K L).pow_of_coprime _ (ZMod.val_coe_unit_coprime t)) h\n[GOAL]\nn : ℕ+\nK : Type u_1\ninst✝⁴ : Field K\nL : Type u_2\nμ : L\ninst✝³ : CommRing L\ninst✝² : IsDomain L\nhμ✝ : IsPrimitiveRoot μ ↑n\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {n} K L\nh : Irreducible (cyclotomic (↑n) K)\nhζ : IsPrimitiveRoot (zeta n K L) ↑n := zeta_spec n K L\nhμ : ∀ (t : (ZMod ↑n)ˣ), IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑t) ↑n :=\n  fun t => IsPrimitiveRoot.pow_of_coprime hζ (ZMod.val ↑t) (ZMod.val_coe_unit_coprime t)\nsrc✝ : (L ≃ₐ[K] L) →* (ZMod ↑n)ˣ := IsPrimitiveRoot.autToPow K (_ : IsPrimitiveRoot (zeta n K L) ↑n)\nt : (ZMod ↑n)ˣ\nthis : NeZero ↑↑n\nhr : cyclotomic (↑n) K = minpoly K (zeta n K L ^ ZMod.val ↑t)\n⊢ minpoly K (zeta n K L) = minpoly K (zeta n K L ^ ZMod.val ↑t)\n[PROOFSTEP]\nexact ((zeta_spec n K L).minpoly_eq_cyclotomic_of_irreducible h).symm.trans hr\n[GOAL]\nn : ℕ+\nK : Type u_1\ninst✝⁴ : Field K\nL : Type u_2\nμ : L\ninst✝³ : CommRing L\ninst✝² : IsDomain L\nhμ✝ : IsPrimitiveRoot μ ↑n\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {n} K L\nh : Irreducible (cyclotomic (↑n) K)\nhζ : IsPrimitiveRoot (zeta n K L) ↑n := zeta_spec n K L\nhμ : ∀ (t : (ZMod ↑n)ˣ), IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑t) ↑n :=\n  fun t => IsPrimitiveRoot.pow_of_coprime hζ (ZMod.val ↑t) (ZMod.val_coe_unit_coprime t)\nsrc✝ : (L ≃ₐ[K] L) →* (ZMod ↑n)ˣ := IsPrimitiveRoot.autToPow K (_ : IsPrimitiveRoot (zeta n K L) ↑n)\nf : L ≃ₐ[K] L\n⊢ (fun t =>\n        PowerBasis.equivOfMinpoly (IsPrimitiveRoot.powerBasis K hζ)\n          (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑t) ↑n))\n          (_ :\n            minpoly K (IsPrimitiveRoot.powerBasis K hζ).gen =\n              minpoly K (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑t) ↑n)).gen))\n      (OneHom.toFun (↑src✝) f) =\n    f\n[PROOFSTEP]\nsimp only [MonoidHom.toFun_eq_coe]\n[GOAL]\nn : ℕ+\nK : Type u_1\ninst✝⁴ : Field K\nL : Type u_2\nμ : L\ninst✝³ : CommRing L\ninst✝² : IsDomain L\nhμ✝ : IsPrimitiveRoot μ ↑n\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {n} K L\nh : Irreducible (cyclotomic (↑n) K)\nhζ : IsPrimitiveRoot (zeta n K L) ↑n := zeta_spec n K L\nhμ : ∀ (t : (ZMod ↑n)ˣ), IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑t) ↑n :=\n  fun t => IsPrimitiveRoot.pow_of_coprime hζ (ZMod.val ↑t) (ZMod.val_coe_unit_coprime t)\nsrc✝ : (L ≃ₐ[K] L) →* (ZMod ↑n)ˣ := IsPrimitiveRoot.autToPow K (_ : IsPrimitiveRoot (zeta n K L) ↑n)\nf : L ≃ₐ[K] L\n⊢ PowerBasis.equivOfMinpoly (IsPrimitiveRoot.powerBasis K hζ)\n      (IsPrimitiveRoot.powerBasis K\n        (_ :\n          IsPrimitiveRoot\n            (zeta n K L ^ ZMod.val ↑(↑(IsPrimitiveRoot.autToPow K (_ : IsPrimitiveRoot (zeta n K L) ↑n)) f)) ↑n))\n      (_ :\n        minpoly K (IsPrimitiveRoot.powerBasis K hζ).gen =\n          minpoly K\n            (IsPrimitiveRoot.powerBasis K\n                (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑(OneHom.toFun (↑src✝) f)) ↑n)).gen) =\n    f\n[PROOFSTEP]\napply AlgEquiv.coe_algHom_injective\n[GOAL]\ncase a\nn : ℕ+\nK : Type u_1\ninst✝⁴ : Field K\nL : Type u_2\nμ : L\ninst✝³ : CommRing L\ninst✝² : IsDomain L\nhμ✝ : IsPrimitiveRoot μ ↑n\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {n} K L\nh : Irreducible (cyclotomic (↑n) K)\nhζ : IsPrimitiveRoot (zeta n K L) ↑n := zeta_spec n K L\nhμ : ∀ (t : (ZMod ↑n)ˣ), IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑t) ↑n :=\n  fun t => IsPrimitiveRoot.pow_of_coprime hζ (ZMod.val ↑t) (ZMod.val_coe_unit_coprime t)\nsrc✝ : (L ≃ₐ[K] L) →* (ZMod ↑n)ˣ := IsPrimitiveRoot.autToPow K (_ : IsPrimitiveRoot (zeta n K L) ↑n)\nf : L ≃ₐ[K] L\n⊢ ↑(PowerBasis.equivOfMinpoly (IsPrimitiveRoot.powerBasis K hζ)\n        (IsPrimitiveRoot.powerBasis K\n          (_ :\n            IsPrimitiveRoot\n              (zeta n K L ^ ZMod.val ↑(↑(IsPrimitiveRoot.autToPow K (_ : IsPrimitiveRoot (zeta n K L) ↑n)) f)) ↑n))\n        (_ :\n          minpoly K (IsPrimitiveRoot.powerBasis K hζ).gen =\n            minpoly K\n              (IsPrimitiveRoot.powerBasis K\n                  (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑(OneHom.toFun (↑src✝) f)) ↑n)).gen)) =\n    ↑f\n[PROOFSTEP]\napply (hζ.powerBasis K).algHom_ext\n[GOAL]\ncase a.h\nn : ℕ+\nK : Type u_1\ninst✝⁴ : Field K\nL : Type u_2\nμ : L\ninst✝³ : CommRing L\ninst✝² : IsDomain L\nhμ✝ : IsPrimitiveRoot μ ↑n\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {n} K L\nh : Irreducible (cyclotomic (↑n) K)\nhζ : IsPrimitiveRoot (zeta n K L) ↑n := zeta_spec n K L\nhμ : ∀ (t : (ZMod ↑n)ˣ), IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑t) ↑n :=\n  fun t => IsPrimitiveRoot.pow_of_coprime hζ (ZMod.val ↑t) (ZMod.val_coe_unit_coprime t)\nsrc✝ : (L ≃ₐ[K] L) →* (ZMod ↑n)ˣ := IsPrimitiveRoot.autToPow K (_ : IsPrimitiveRoot (zeta n K L) ↑n)\nf : L ≃ₐ[K] L\n⊢ ↑↑(PowerBasis.equivOfMinpoly (IsPrimitiveRoot.powerBasis K hζ)\n            (IsPrimitiveRoot.powerBasis K\n              (_ :\n                IsPrimitiveRoot\n                  (zeta n K L ^ ZMod.val ↑(↑(IsPrimitiveRoot.autToPow K (_ : IsPrimitiveRoot (zeta n K L) ↑n)) f)) ↑n))\n            (_ :\n              minpoly K (IsPrimitiveRoot.powerBasis K hζ).gen =\n                minpoly K\n                  (IsPrimitiveRoot.powerBasis K\n                      (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑(OneHom.toFun (↑src✝) f)) ↑n)).gen))\n      (IsPrimitiveRoot.powerBasis K hζ).gen =\n    ↑↑f (IsPrimitiveRoot.powerBasis K hζ).gen\n[PROOFSTEP]\nsimp only [AlgHom.coe_coe]\n[GOAL]\ncase a.h\nn : ℕ+\nK : Type u_1\ninst✝⁴ : Field K\nL : Type u_2\nμ : L\ninst✝³ : CommRing L\ninst✝² : IsDomain L\nhμ✝ : IsPrimitiveRoot μ ↑n\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {n} K L\nh : Irreducible (cyclotomic (↑n) K)\nhζ : IsPrimitiveRoot (zeta n K L) ↑n := zeta_spec n K L\nhμ : ∀ (t : (ZMod ↑n)ˣ), IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑t) ↑n :=\n  fun t => IsPrimitiveRoot.pow_of_coprime hζ (ZMod.val ↑t) (ZMod.val_coe_unit_coprime t)\nsrc✝ : (L ≃ₐ[K] L) →* (ZMod ↑n)ˣ := IsPrimitiveRoot.autToPow K (_ : IsPrimitiveRoot (zeta n K L) ↑n)\nf : L ≃ₐ[K] L\n⊢ ↑(PowerBasis.equivOfMinpoly (IsPrimitiveRoot.powerBasis K hζ)\n          (IsPrimitiveRoot.powerBasis K\n            (_ :\n              IsPrimitiveRoot\n                (zeta n K L ^ ZMod.val ↑(↑(IsPrimitiveRoot.autToPow K (_ : IsPrimitiveRoot (zeta n K L) ↑n)) f)) ↑n))\n          (_ :\n            minpoly K (IsPrimitiveRoot.powerBasis K hζ).gen =\n              minpoly K\n                (IsPrimitiveRoot.powerBasis K\n                    (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑(OneHom.toFun (↑src✝) f)) ↑n)).gen))\n      (IsPrimitiveRoot.powerBasis K hζ).gen =\n    ↑f (IsPrimitiveRoot.powerBasis K hζ).gen\n[PROOFSTEP]\nrw [PowerBasis.equivOfMinpoly_gen]\n[GOAL]\ncase a.h\nn : ℕ+\nK : Type u_1\ninst✝⁴ : Field K\nL : Type u_2\nμ : L\ninst✝³ : CommRing L\ninst✝² : IsDomain L\nhμ✝ : IsPrimitiveRoot μ ↑n\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {n} K L\nh : Irreducible (cyclotomic (↑n) K)\nhζ : IsPrimitiveRoot (zeta n K L) ↑n := zeta_spec n K L\nhμ : ∀ (t : (ZMod ↑n)ˣ), IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑t) ↑n :=\n  fun t => IsPrimitiveRoot.pow_of_coprime hζ (ZMod.val ↑t) (ZMod.val_coe_unit_coprime t)\nsrc✝ : (L ≃ₐ[K] L) →* (ZMod ↑n)ˣ := IsPrimitiveRoot.autToPow K (_ : IsPrimitiveRoot (zeta n K L) ↑n)\nf : L ≃ₐ[K] L\n⊢ (IsPrimitiveRoot.powerBasis K\n        (_ :\n          IsPrimitiveRoot\n            (zeta n K L ^ ZMod.val ↑(↑(IsPrimitiveRoot.autToPow K (_ : IsPrimitiveRoot (zeta n K L) ↑n)) f)) ↑n)).gen =\n    ↑f (IsPrimitiveRoot.powerBasis K hζ).gen\n[PROOFSTEP]\nsimp only [IsPrimitiveRoot.powerBasis_gen, IsPrimitiveRoot.autToPow_spec]\n[GOAL]\nn : ℕ+\nK : Type u_1\ninst✝⁴ : Field K\nL : Type u_2\nμ : L\ninst✝³ : CommRing L\ninst✝² : IsDomain L\nhμ✝ : IsPrimitiveRoot μ ↑n\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {n} K L\nh : Irreducible (cyclotomic (↑n) K)\nhζ : IsPrimitiveRoot (zeta n K L) ↑n := zeta_spec n K L\nhμ : ∀ (t : (ZMod ↑n)ˣ), IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑t) ↑n :=\n  fun t => IsPrimitiveRoot.pow_of_coprime hζ (ZMod.val ↑t) (ZMod.val_coe_unit_coprime t)\nsrc✝ : (L ≃ₐ[K] L) →* (ZMod ↑n)ˣ := IsPrimitiveRoot.autToPow K (_ : IsPrimitiveRoot (zeta n K L) ↑n)\nx : (ZMod ↑n)ˣ\n⊢ OneHom.toFun (↑src✝)\n      ((fun t =>\n          PowerBasis.equivOfMinpoly (IsPrimitiveRoot.powerBasis K hζ)\n            (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑t) ↑n))\n            (_ :\n              minpoly K (IsPrimitiveRoot.powerBasis K hζ).gen =\n                minpoly K (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑t) ↑n)).gen))\n        x) =\n    x\n[PROOFSTEP]\nsimp only [MonoidHom.toFun_eq_coe]\n[GOAL]\nn : ℕ+\nK : Type u_1\ninst✝⁴ : Field K\nL : Type u_2\nμ : L\ninst✝³ : CommRing L\ninst✝² : IsDomain L\nhμ✝ : IsPrimitiveRoot μ ↑n\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {n} K L\nh : Irreducible (cyclotomic (↑n) K)\nhζ : IsPrimitiveRoot (zeta n K L) ↑n := zeta_spec n K L\nhμ : ∀ (t : (ZMod ↑n)ˣ), IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑t) ↑n :=\n  fun t => IsPrimitiveRoot.pow_of_coprime hζ (ZMod.val ↑t) (ZMod.val_coe_unit_coprime t)\nsrc✝ : (L ≃ₐ[K] L) →* (ZMod ↑n)ˣ := IsPrimitiveRoot.autToPow K (_ : IsPrimitiveRoot (zeta n K L) ↑n)\nx : (ZMod ↑n)ˣ\n⊢ ↑(IsPrimitiveRoot.autToPow K (_ : IsPrimitiveRoot (zeta n K L) ↑n))\n      (PowerBasis.equivOfMinpoly (IsPrimitiveRoot.powerBasis K hζ)\n        (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n))\n        (_ :\n          minpoly K (IsPrimitiveRoot.powerBasis K hζ).gen =\n            minpoly K (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)).gen)) =\n    x\n[PROOFSTEP]\ngeneralize_proofs _ h\n[GOAL]\nn : ℕ+\nK : Type u_1\ninst✝⁴ : Field K\nL : Type u_2\nμ : L\ninst✝³ : CommRing L\ninst✝² : IsDomain L\nhμ✝ : IsPrimitiveRoot μ ↑n\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {n} K L\nh✝¹ : Irreducible (cyclotomic (↑n) K)\nhζ : IsPrimitiveRoot (zeta n K L) ↑n := zeta_spec n K L\nhμ : ∀ (t : (ZMod ↑n)ˣ), IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑t) ↑n :=\n  fun t => IsPrimitiveRoot.pow_of_coprime hζ (ZMod.val ↑t) (ZMod.val_coe_unit_coprime t)\nsrc✝ : (L ≃ₐ[K] L) →* (ZMod ↑n)ˣ := IsPrimitiveRoot.autToPow K (_ : IsPrimitiveRoot (zeta n K L) ↑n)\nx : (ZMod ↑n)ˣ\nh✝ : IsPrimitiveRoot (zeta n K L) ↑n\nh :\n  minpoly K (IsPrimitiveRoot.powerBasis K hζ).gen =\n    minpoly K (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)).gen\n⊢ ↑(IsPrimitiveRoot.autToPow K h✝)\n      (PowerBasis.equivOfMinpoly (IsPrimitiveRoot.powerBasis K hζ)\n        (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)) h) =\n    x\n[PROOFSTEP]\nhave key := hζ.autToPow_spec K ((hζ.powerBasis K).equivOfMinpoly ((hμ x).powerBasis K) h)\n[GOAL]\nn : ℕ+\nK : Type u_1\ninst✝⁴ : Field K\nL : Type u_2\nμ : L\ninst✝³ : CommRing L\ninst✝² : IsDomain L\nhμ✝ : IsPrimitiveRoot μ ↑n\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {n} K L\nh✝¹ : Irreducible (cyclotomic (↑n) K)\nhζ : IsPrimitiveRoot (zeta n K L) ↑n := zeta_spec n K L\nhμ : ∀ (t : (ZMod ↑n)ˣ), IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑t) ↑n :=\n  fun t => IsPrimitiveRoot.pow_of_coprime hζ (ZMod.val ↑t) (ZMod.val_coe_unit_coprime t)\nsrc✝ : (L ≃ₐ[K] L) →* (ZMod ↑n)ˣ := IsPrimitiveRoot.autToPow K (_ : IsPrimitiveRoot (zeta n K L) ↑n)\nx : (ZMod ↑n)ˣ\nh✝ : IsPrimitiveRoot (zeta n K L) ↑n\nh :\n  minpoly K (IsPrimitiveRoot.powerBasis K hζ).gen =\n    minpoly K (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)).gen\nkey :\n  zeta n K L ^\n      ZMod.val\n        ↑(↑(IsPrimitiveRoot.autToPow K hζ)\n            (PowerBasis.equivOfMinpoly (IsPrimitiveRoot.powerBasis K hζ)\n              (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)) h)) =\n    ↑(PowerBasis.equivOfMinpoly (IsPrimitiveRoot.powerBasis K hζ)\n          (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)) h)\n      (zeta n K L)\n⊢ ↑(IsPrimitiveRoot.autToPow K h✝)\n      (PowerBasis.equivOfMinpoly (IsPrimitiveRoot.powerBasis K hζ)\n        (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)) h) =\n    x\n[PROOFSTEP]\nhave := (hζ.powerBasis K).equivOfMinpoly_gen ((hμ x).powerBasis K) h\n[GOAL]\nn : ℕ+\nK : Type u_1\ninst✝⁴ : Field K\nL : Type u_2\nμ : L\ninst✝³ : CommRing L\ninst✝² : IsDomain L\nhμ✝ : IsPrimitiveRoot μ ↑n\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {n} K L\nh✝¹ : Irreducible (cyclotomic (↑n) K)\nhζ : IsPrimitiveRoot (zeta n K L) ↑n := zeta_spec n K L\nhμ : ∀ (t : (ZMod ↑n)ˣ), IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑t) ↑n :=\n  fun t => IsPrimitiveRoot.pow_of_coprime hζ (ZMod.val ↑t) (ZMod.val_coe_unit_coprime t)\nsrc✝ : (L ≃ₐ[K] L) →* (ZMod ↑n)ˣ := IsPrimitiveRoot.autToPow K (_ : IsPrimitiveRoot (zeta n K L) ↑n)\nx : (ZMod ↑n)ˣ\nh✝ : IsPrimitiveRoot (zeta n K L) ↑n\nh :\n  minpoly K (IsPrimitiveRoot.powerBasis K hζ).gen =\n    minpoly K (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)).gen\nkey :\n  zeta n K L ^\n      ZMod.val\n        ↑(↑(IsPrimitiveRoot.autToPow K hζ)\n            (PowerBasis.equivOfMinpoly (IsPrimitiveRoot.powerBasis K hζ)\n              (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)) h)) =\n    ↑(PowerBasis.equivOfMinpoly (IsPrimitiveRoot.powerBasis K hζ)\n          (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)) h)\n      (zeta n K L)\nthis :\n  ↑(PowerBasis.equivOfMinpoly (IsPrimitiveRoot.powerBasis K hζ)\n          (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)) h)\n      (IsPrimitiveRoot.powerBasis K hζ).gen =\n    (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)).gen\n⊢ ↑(IsPrimitiveRoot.autToPow K h✝)\n      (PowerBasis.equivOfMinpoly (IsPrimitiveRoot.powerBasis K hζ)\n        (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)) h) =\n    x\n[PROOFSTEP]\nrw [hζ.powerBasis_gen K] at this \n[GOAL]\nn : ℕ+\nK : Type u_1\ninst✝⁴ : Field K\nL : Type u_2\nμ : L\ninst✝³ : CommRing L\ninst✝² : IsDomain L\nhμ✝ : IsPrimitiveRoot μ ↑n\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {n} K L\nh✝¹ : Irreducible (cyclotomic (↑n) K)\nhζ : IsPrimitiveRoot (zeta n K L) ↑n := zeta_spec n K L\nhμ : ∀ (t : (ZMod ↑n)ˣ), IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑t) ↑n :=\n  fun t => IsPrimitiveRoot.pow_of_coprime hζ (ZMod.val ↑t) (ZMod.val_coe_unit_coprime t)\nsrc✝ : (L ≃ₐ[K] L) →* (ZMod ↑n)ˣ := IsPrimitiveRoot.autToPow K (_ : IsPrimitiveRoot (zeta n K L) ↑n)\nx : (ZMod ↑n)ˣ\nh✝ : IsPrimitiveRoot (zeta n K L) ↑n\nh :\n  minpoly K (IsPrimitiveRoot.powerBasis K hζ).gen =\n    minpoly K (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)).gen\nkey :\n  zeta n K L ^\n      ZMod.val\n        ↑(↑(IsPrimitiveRoot.autToPow K hζ)\n            (PowerBasis.equivOfMinpoly (IsPrimitiveRoot.powerBasis K hζ)\n              (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)) h)) =\n    ↑(PowerBasis.equivOfMinpoly (IsPrimitiveRoot.powerBasis K hζ)\n          (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)) h)\n      (zeta n K L)\nthis :\n  ↑(PowerBasis.equivOfMinpoly (IsPrimitiveRoot.powerBasis K hζ)\n          (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)) h)\n      (zeta n K L) =\n    (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)).gen\n⊢ ↑(IsPrimitiveRoot.autToPow K h✝)\n      (PowerBasis.equivOfMinpoly (IsPrimitiveRoot.powerBasis K hζ)\n        (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)) h) =\n    x\n[PROOFSTEP]\nrw [this, IsPrimitiveRoot.powerBasis_gen] at key \n[GOAL]\nn : ℕ+\nK : Type u_1\ninst✝⁴ : Field K\nL : Type u_2\nμ : L\ninst✝³ : CommRing L\ninst✝² : IsDomain L\nhμ✝ : IsPrimitiveRoot μ ↑n\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {n} K L\nh✝¹ : Irreducible (cyclotomic (↑n) K)\nhζ : IsPrimitiveRoot (zeta n K L) ↑n := zeta_spec n K L\nhμ : ∀ (t : (ZMod ↑n)ˣ), IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑t) ↑n :=\n  fun t => IsPrimitiveRoot.pow_of_coprime hζ (ZMod.val ↑t) (ZMod.val_coe_unit_coprime t)\nsrc✝ : (L ≃ₐ[K] L) →* (ZMod ↑n)ˣ := IsPrimitiveRoot.autToPow K (_ : IsPrimitiveRoot (zeta n K L) ↑n)\nx : (ZMod ↑n)ˣ\nh✝ : IsPrimitiveRoot (zeta n K L) ↑n\nh :\n  minpoly K (IsPrimitiveRoot.powerBasis K hζ).gen =\n    minpoly K (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)).gen\nkey :\n  zeta n K L ^\n      ZMod.val\n        ↑(↑(IsPrimitiveRoot.autToPow K hζ)\n            (PowerBasis.equivOfMinpoly (IsPrimitiveRoot.powerBasis K hζ)\n              (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)) h)) =\n    zeta n K L ^ ZMod.val ↑x\nthis :\n  ↑(PowerBasis.equivOfMinpoly (IsPrimitiveRoot.powerBasis K hζ)\n          (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)) h)\n      (zeta n K L) =\n    (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)).gen\n⊢ ↑(IsPrimitiveRoot.autToPow K h✝)\n      (PowerBasis.equivOfMinpoly (IsPrimitiveRoot.powerBasis K hζ)\n        (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)) h) =\n    x\n[PROOFSTEP]\nconv at key =>\n  congr; congr\n  rw [← hζ.toRootsOfUnity_coe_val]\n  rfl; rfl\n  rw [← hζ.toRootsOfUnity_coe_val]\n[GOAL]\nn : ℕ+\nK : Type u_1\ninst✝⁴ : Field K\nL : Type u_2\nμ : L\ninst✝³ : CommRing L\ninst✝² : IsDomain L\nhμ✝ : IsPrimitiveRoot μ ↑n\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {n} K L\nh✝¹ : Irreducible (cyclotomic (↑n) K)\nhζ : IsPrimitiveRoot (zeta n K L) ↑n := zeta_spec n K L\nhμ : ∀ (t : (ZMod ↑n)ˣ), IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑t) ↑n :=\n  fun t => IsPrimitiveRoot.pow_of_coprime hζ (ZMod.val ↑t) (ZMod.val_coe_unit_coprime t)\nsrc✝ : (L ≃ₐ[K] L) →* (ZMod ↑n)ˣ := IsPrimitiveRoot.autToPow K (_ : IsPrimitiveRoot (zeta n K L) ↑n)\nx : (ZMod ↑n)ˣ\nh✝ : IsPrimitiveRoot (zeta n K L) ↑n\nh :\n  minpoly K (IsPrimitiveRoot.powerBasis K hζ).gen =\n    minpoly K (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)).gen\nkey :\n  zeta n K L ^\n      ZMod.val\n        ↑(↑(IsPrimitiveRoot.autToPow K hζ)\n            (PowerBasis.equivOfMinpoly (IsPrimitiveRoot.powerBasis K hζ)\n              (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)) h)) =\n    zeta n K L ^ ZMod.val ↑x\nthis :\n  ↑(PowerBasis.equivOfMinpoly (IsPrimitiveRoot.powerBasis K hζ)\n          (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)) h)\n      (zeta n K L) =\n    (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)).gen\n| zeta n K L ^\n      ZMod.val\n        ↑(↑(IsPrimitiveRoot.autToPow K hζ)\n            (PowerBasis.equivOfMinpoly (IsPrimitiveRoot.powerBasis K hζ)\n              (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)) h)) =\n    zeta n K L ^ ZMod.val ↑x\n[PROOFSTEP]\n  congr; congr\n  rw [← hζ.toRootsOfUnity_coe_val]\n  rfl; rfl\n  rw [← hζ.toRootsOfUnity_coe_val]\n[GOAL]\nn : ℕ+\nK : Type u_1\ninst✝⁴ : Field K\nL : Type u_2\nμ : L\ninst✝³ : CommRing L\ninst✝² : IsDomain L\nhμ✝ : IsPrimitiveRoot μ ↑n\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {n} K L\nh✝¹ : Irreducible (cyclotomic (↑n) K)\nhζ : IsPrimitiveRoot (zeta n K L) ↑n := zeta_spec n K L\nhμ : ∀ (t : (ZMod ↑n)ˣ), IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑t) ↑n :=\n  fun t => IsPrimitiveRoot.pow_of_coprime hζ (ZMod.val ↑t) (ZMod.val_coe_unit_coprime t)\nsrc✝ : (L ≃ₐ[K] L) →* (ZMod ↑n)ˣ := IsPrimitiveRoot.autToPow K (_ : IsPrimitiveRoot (zeta n K L) ↑n)\nx : (ZMod ↑n)ˣ\nh✝ : IsPrimitiveRoot (zeta n K L) ↑n\nh :\n  minpoly K (IsPrimitiveRoot.powerBasis K hζ).gen =\n    minpoly K (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)).gen\nkey :\n  zeta n K L ^\n      ZMod.val\n        ↑(↑(IsPrimitiveRoot.autToPow K hζ)\n            (PowerBasis.equivOfMinpoly (IsPrimitiveRoot.powerBasis K hζ)\n              (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)) h)) =\n    zeta n K L ^ ZMod.val ↑x\nthis :\n  ↑(PowerBasis.equivOfMinpoly (IsPrimitiveRoot.powerBasis K hζ)\n          (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)) h)\n      (zeta n K L) =\n    (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)).gen\n| zeta n K L ^\n      ZMod.val\n        ↑(↑(IsPrimitiveRoot.autToPow K hζ)\n            (PowerBasis.equivOfMinpoly (IsPrimitiveRoot.powerBasis K hζ)\n              (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)) h)) =\n    zeta n K L ^ ZMod.val ↑x\n[PROOFSTEP]\n  congr; congr\n  rw [← hζ.toRootsOfUnity_coe_val]\n  rfl; rfl\n  rw [← hζ.toRootsOfUnity_coe_val]\n[GOAL]\nn : ℕ+\nK : Type u_1\ninst✝⁴ : Field K\nL : Type u_2\nμ : L\ninst✝³ : CommRing L\ninst✝² : IsDomain L\nhμ✝ : IsPrimitiveRoot μ ↑n\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {n} K L\nh✝¹ : Irreducible (cyclotomic (↑n) K)\nhζ : IsPrimitiveRoot (zeta n K L) ↑n := zeta_spec n K L\nhμ : ∀ (t : (ZMod ↑n)ˣ), IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑t) ↑n :=\n  fun t => IsPrimitiveRoot.pow_of_coprime hζ (ZMod.val ↑t) (ZMod.val_coe_unit_coprime t)\nsrc✝ : (L ≃ₐ[K] L) →* (ZMod ↑n)ˣ := IsPrimitiveRoot.autToPow K (_ : IsPrimitiveRoot (zeta n K L) ↑n)\nx : (ZMod ↑n)ˣ\nh✝ : IsPrimitiveRoot (zeta n K L) ↑n\nh :\n  minpoly K (IsPrimitiveRoot.powerBasis K hζ).gen =\n    minpoly K (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)).gen\nkey :\n  zeta n K L ^\n      ZMod.val\n        ↑(↑(IsPrimitiveRoot.autToPow K hζ)\n            (PowerBasis.equivOfMinpoly (IsPrimitiveRoot.powerBasis K hζ)\n              (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)) h)) =\n    zeta n K L ^ ZMod.val ↑x\nthis :\n  ↑(PowerBasis.equivOfMinpoly (IsPrimitiveRoot.powerBasis K hζ)\n          (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)) h)\n      (zeta n K L) =\n    (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)).gen\n| zeta n K L ^\n      ZMod.val\n        ↑(↑(IsPrimitiveRoot.autToPow K hζ)\n            (PowerBasis.equivOfMinpoly (IsPrimitiveRoot.powerBasis K hζ)\n              (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)) h)) =\n    zeta n K L ^ ZMod.val ↑x\n[PROOFSTEP]\ncongr\n[GOAL]\ncase a\nn : ℕ+\nK : Type u_1\ninst✝⁴ : Field K\nL : Type u_2\nμ : L\ninst✝³ : CommRing L\ninst✝² : IsDomain L\nhμ✝ : IsPrimitiveRoot μ ↑n\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {n} K L\nh✝¹ : Irreducible (cyclotomic (↑n) K)\nhζ : IsPrimitiveRoot (zeta n K L) ↑n := zeta_spec n K L\nhμ : ∀ (t : (ZMod ↑n)ˣ), IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑t) ↑n :=\n  fun t => IsPrimitiveRoot.pow_of_coprime hζ (ZMod.val ↑t) (ZMod.val_coe_unit_coprime t)\nsrc✝ : (L ≃ₐ[K] L) →* (ZMod ↑n)ˣ := IsPrimitiveRoot.autToPow K (_ : IsPrimitiveRoot (zeta n K L) ↑n)\nx : (ZMod ↑n)ˣ\nh✝ : IsPrimitiveRoot (zeta n K L) ↑n\nh :\n  minpoly K (IsPrimitiveRoot.powerBasis K hζ).gen =\n    minpoly K (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)).gen\nkey :\n  zeta n K L ^\n      ZMod.val\n        ↑(↑(IsPrimitiveRoot.autToPow K hζ)\n            (PowerBasis.equivOfMinpoly (IsPrimitiveRoot.powerBasis K hζ)\n              (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)) h)) =\n    zeta n K L ^ ZMod.val ↑x\nthis :\n  ↑(PowerBasis.equivOfMinpoly (IsPrimitiveRoot.powerBasis K hζ)\n          (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)) h)\n      (zeta n K L) =\n    (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)).gen\n| zeta n K L ^\n    ZMod.val\n      ↑(↑(IsPrimitiveRoot.autToPow K hζ)\n          (PowerBasis.equivOfMinpoly (IsPrimitiveRoot.powerBasis K hζ)\n            (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)) h))\ncase a\nn : ℕ+\nK : Type u_1\ninst✝⁴ : Field K\nL : Type u_2\nμ : L\ninst✝³ : CommRing L\ninst✝² : IsDomain L\nhμ✝ : IsPrimitiveRoot μ ↑n\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {n} K L\nh✝¹ : Irreducible (cyclotomic (↑n) K)\nhζ : IsPrimitiveRoot (zeta n K L) ↑n := zeta_spec n K L\nhμ : ∀ (t : (ZMod ↑n)ˣ), IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑t) ↑n :=\n  fun t => IsPrimitiveRoot.pow_of_coprime hζ (ZMod.val ↑t) (ZMod.val_coe_unit_coprime t)\nsrc✝ : (L ≃ₐ[K] L) →* (ZMod ↑n)ˣ := IsPrimitiveRoot.autToPow K (_ : IsPrimitiveRoot (zeta n K L) ↑n)\nx : (ZMod ↑n)ˣ\nh✝ : IsPrimitiveRoot (zeta n K L) ↑n\nh :\n  minpoly K (IsPrimitiveRoot.powerBasis K hζ).gen =\n    minpoly K (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)).gen\nkey :\n  zeta n K L ^\n      ZMod.val\n        ↑(↑(IsPrimitiveRoot.autToPow K hζ)\n            (PowerBasis.equivOfMinpoly (IsPrimitiveRoot.powerBasis K hζ)\n              (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)) h)) =\n    zeta n K L ^ ZMod.val ↑x\nthis :\n  ↑(PowerBasis.equivOfMinpoly (IsPrimitiveRoot.powerBasis K hζ)\n          (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)) h)\n      (zeta n K L) =\n    (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)).gen\n| zeta n K L ^ ZMod.val ↑x\n[PROOFSTEP]\ncongr\n[GOAL]\ncase a.a\nn : ℕ+\nK : Type u_1\ninst✝⁴ : Field K\nL : Type u_2\nμ : L\ninst✝³ : CommRing L\ninst✝² : IsDomain L\nhμ✝ : IsPrimitiveRoot μ ↑n\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {n} K L\nh✝¹ : Irreducible (cyclotomic (↑n) K)\nhζ : IsPrimitiveRoot (zeta n K L) ↑n := zeta_spec n K L\nhμ : ∀ (t : (ZMod ↑n)ˣ), IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑t) ↑n :=\n  fun t => IsPrimitiveRoot.pow_of_coprime hζ (ZMod.val ↑t) (ZMod.val_coe_unit_coprime t)\nsrc✝ : (L ≃ₐ[K] L) →* (ZMod ↑n)ˣ := IsPrimitiveRoot.autToPow K (_ : IsPrimitiveRoot (zeta n K L) ↑n)\nx : (ZMod ↑n)ˣ\nh✝ : IsPrimitiveRoot (zeta n K L) ↑n\nh :\n  minpoly K (IsPrimitiveRoot.powerBasis K hζ).gen =\n    minpoly K (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)).gen\nkey :\n  zeta n K L ^\n      ZMod.val\n        ↑(↑(IsPrimitiveRoot.autToPow K hζ)\n            (PowerBasis.equivOfMinpoly (IsPrimitiveRoot.powerBasis K hζ)\n              (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)) h)) =\n    zeta n K L ^ ZMod.val ↑x\nthis :\n  ↑(PowerBasis.equivOfMinpoly (IsPrimitiveRoot.powerBasis K hζ)\n          (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)) h)\n      (zeta n K L) =\n    (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)).gen\n| zeta n K L\ncase a.a\nn : ℕ+\nK : Type u_1\ninst✝⁴ : Field K\nL : Type u_2\nμ : L\ninst✝³ : CommRing L\ninst✝² : IsDomain L\nhμ✝ : IsPrimitiveRoot μ ↑n\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {n} K L\nh✝¹ : Irreducible (cyclotomic (↑n) K)\nhζ : IsPrimitiveRoot (zeta n K L) ↑n := zeta_spec n K L\nhμ : ∀ (t : (ZMod ↑n)ˣ), IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑t) ↑n :=\n  fun t => IsPrimitiveRoot.pow_of_coprime hζ (ZMod.val ↑t) (ZMod.val_coe_unit_coprime t)\nsrc✝ : (L ≃ₐ[K] L) →* (ZMod ↑n)ˣ := IsPrimitiveRoot.autToPow K (_ : IsPrimitiveRoot (zeta n K L) ↑n)\nx : (ZMod ↑n)ˣ\nh✝ : IsPrimitiveRoot (zeta n K L) ↑n\nh :\n  minpoly K (IsPrimitiveRoot.powerBasis K hζ).gen =\n    minpoly K (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)).gen\nkey :\n  zeta n K L ^\n      ZMod.val\n        ↑(↑(IsPrimitiveRoot.autToPow K hζ)\n            (PowerBasis.equivOfMinpoly (IsPrimitiveRoot.powerBasis K hζ)\n              (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)) h)) =\n    zeta n K L ^ ZMod.val ↑x\nthis :\n  ↑(PowerBasis.equivOfMinpoly (IsPrimitiveRoot.powerBasis K hζ)\n          (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)) h)\n      (zeta n K L) =\n    (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)).gen\n| ZMod.val\n    ↑(↑(IsPrimitiveRoot.autToPow K hζ)\n        (PowerBasis.equivOfMinpoly (IsPrimitiveRoot.powerBasis K hζ)\n          (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)) h))\ncase a\nn : ℕ+\nK : Type u_1\ninst✝⁴ : Field K\nL : Type u_2\nμ : L\ninst✝³ : CommRing L\ninst✝² : IsDomain L\nhμ✝ : IsPrimitiveRoot μ ↑n\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {n} K L\nh✝¹ : Irreducible (cyclotomic (↑n) K)\nhζ : IsPrimitiveRoot (zeta n K L) ↑n := zeta_spec n K L\nhμ : ∀ (t : (ZMod ↑n)ˣ), IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑t) ↑n :=\n  fun t => IsPrimitiveRoot.pow_of_coprime hζ (ZMod.val ↑t) (ZMod.val_coe_unit_coprime t)\nsrc✝ : (L ≃ₐ[K] L) →* (ZMod ↑n)ˣ := IsPrimitiveRoot.autToPow K (_ : IsPrimitiveRoot (zeta n K L) ↑n)\nx : (ZMod ↑n)ˣ\nh✝ : IsPrimitiveRoot (zeta n K L) ↑n\nh :\n  minpoly K (IsPrimitiveRoot.powerBasis K hζ).gen =\n    minpoly K (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)).gen\nkey :\n  zeta n K L ^\n      ZMod.val\n        ↑(↑(IsPrimitiveRoot.autToPow K hζ)\n            (PowerBasis.equivOfMinpoly (IsPrimitiveRoot.powerBasis K hζ)\n              (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)) h)) =\n    zeta n K L ^ ZMod.val ↑x\nthis :\n  ↑(PowerBasis.equivOfMinpoly (IsPrimitiveRoot.powerBasis K hζ)\n          (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)) h)\n      (zeta n K L) =\n    (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)).gen\n| zeta n K L ^ ZMod.val ↑x\n[PROOFSTEP]\nrw [← hζ.toRootsOfUnity_coe_val]\n[GOAL]\ncase a.a\nn : ℕ+\nK : Type u_1\ninst✝⁴ : Field K\nL : Type u_2\nμ : L\ninst✝³ : CommRing L\ninst✝² : IsDomain L\nhμ✝ : IsPrimitiveRoot μ ↑n\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {n} K L\nh✝¹ : Irreducible (cyclotomic (↑n) K)\nhζ : IsPrimitiveRoot (zeta n K L) ↑n := zeta_spec n K L\nhμ : ∀ (t : (ZMod ↑n)ˣ), IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑t) ↑n :=\n  fun t => IsPrimitiveRoot.pow_of_coprime hζ (ZMod.val ↑t) (ZMod.val_coe_unit_coprime t)\nsrc✝ : (L ≃ₐ[K] L) →* (ZMod ↑n)ˣ := IsPrimitiveRoot.autToPow K (_ : IsPrimitiveRoot (zeta n K L) ↑n)\nx : (ZMod ↑n)ˣ\nh✝ : IsPrimitiveRoot (zeta n K L) ↑n\nh :\n  minpoly K (IsPrimitiveRoot.powerBasis K hζ).gen =\n    minpoly K (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)).gen\nkey :\n  zeta n K L ^\n      ZMod.val\n        ↑(↑(IsPrimitiveRoot.autToPow K hζ)\n            (PowerBasis.equivOfMinpoly (IsPrimitiveRoot.powerBasis K hζ)\n              (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)) h)) =\n    zeta n K L ^ ZMod.val ↑x\nthis :\n  ↑(PowerBasis.equivOfMinpoly (IsPrimitiveRoot.powerBasis K hζ)\n          (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)) h)\n      (zeta n K L) =\n    (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)).gen\n| ↑↑(IsPrimitiveRoot.toRootsOfUnity hζ)\ncase a.a\nn : ℕ+\nK : Type u_1\ninst✝⁴ : Field K\nL : Type u_2\nμ : L\ninst✝³ : CommRing L\ninst✝² : IsDomain L\nhμ✝ : IsPrimitiveRoot μ ↑n\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {n} K L\nh✝¹ : Irreducible (cyclotomic (↑n) K)\nhζ : IsPrimitiveRoot (zeta n K L) ↑n := zeta_spec n K L\nhμ : ∀ (t : (ZMod ↑n)ˣ), IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑t) ↑n :=\n  fun t => IsPrimitiveRoot.pow_of_coprime hζ (ZMod.val ↑t) (ZMod.val_coe_unit_coprime t)\nsrc✝ : (L ≃ₐ[K] L) →* (ZMod ↑n)ˣ := IsPrimitiveRoot.autToPow K (_ : IsPrimitiveRoot (zeta n K L) ↑n)\nx : (ZMod ↑n)ˣ\nh✝ : IsPrimitiveRoot (zeta n K L) ↑n\nh :\n  minpoly K (IsPrimitiveRoot.powerBasis K hζ).gen =\n    minpoly K (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)).gen\nkey :\n  zeta n K L ^\n      ZMod.val\n        ↑(↑(IsPrimitiveRoot.autToPow K hζ)\n            (PowerBasis.equivOfMinpoly (IsPrimitiveRoot.powerBasis K hζ)\n              (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)) h)) =\n    zeta n K L ^ ZMod.val ↑x\nthis :\n  ↑(PowerBasis.equivOfMinpoly (IsPrimitiveRoot.powerBasis K hζ)\n          (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)) h)\n      (zeta n K L) =\n    (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)).gen\n| ZMod.val\n    ↑(↑(IsPrimitiveRoot.autToPow K hζ)\n        (PowerBasis.equivOfMinpoly (IsPrimitiveRoot.powerBasis K hζ)\n          (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)) h))\ncase a\nn : ℕ+\nK : Type u_1\ninst✝⁴ : Field K\nL : Type u_2\nμ : L\ninst✝³ : CommRing L\ninst✝² : IsDomain L\nhμ✝ : IsPrimitiveRoot μ ↑n\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {n} K L\nh✝¹ : Irreducible (cyclotomic (↑n) K)\nhζ : IsPrimitiveRoot (zeta n K L) ↑n := zeta_spec n K L\nhμ : ∀ (t : (ZMod ↑n)ˣ), IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑t) ↑n :=\n  fun t => IsPrimitiveRoot.pow_of_coprime hζ (ZMod.val ↑t) (ZMod.val_coe_unit_coprime t)\nsrc✝ : (L ≃ₐ[K] L) →* (ZMod ↑n)ˣ := IsPrimitiveRoot.autToPow K (_ : IsPrimitiveRoot (zeta n K L) ↑n)\nx : (ZMod ↑n)ˣ\nh✝ : IsPrimitiveRoot (zeta n K L) ↑n\nh :\n  minpoly K (IsPrimitiveRoot.powerBasis K hζ).gen =\n    minpoly K (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)).gen\nkey :\n  zeta n K L ^\n      ZMod.val\n        ↑(↑(IsPrimitiveRoot.autToPow K hζ)\n            (PowerBasis.equivOfMinpoly (IsPrimitiveRoot.powerBasis K hζ)\n              (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)) h)) =\n    zeta n K L ^ ZMod.val ↑x\nthis :\n  ↑(PowerBasis.equivOfMinpoly (IsPrimitiveRoot.powerBasis K hζ)\n          (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)) h)\n      (zeta n K L) =\n    (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)).gen\n| zeta n K L ^ ZMod.val ↑x\n[PROOFSTEP]\nrfl\n[GOAL]\ncase a.a\nn : ℕ+\nK : Type u_1\ninst✝⁴ : Field K\nL : Type u_2\nμ : L\ninst✝³ : CommRing L\ninst✝² : IsDomain L\nhμ✝ : IsPrimitiveRoot μ ↑n\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {n} K L\nh✝¹ : Irreducible (cyclotomic (↑n) K)\nhζ : IsPrimitiveRoot (zeta n K L) ↑n := zeta_spec n K L\nhμ : ∀ (t : (ZMod ↑n)ˣ), IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑t) ↑n :=\n  fun t => IsPrimitiveRoot.pow_of_coprime hζ (ZMod.val ↑t) (ZMod.val_coe_unit_coprime t)\nsrc✝ : (L ≃ₐ[K] L) →* (ZMod ↑n)ˣ := IsPrimitiveRoot.autToPow K (_ : IsPrimitiveRoot (zeta n K L) ↑n)\nx : (ZMod ↑n)ˣ\nh✝ : IsPrimitiveRoot (zeta n K L) ↑n\nh :\n  minpoly K (IsPrimitiveRoot.powerBasis K hζ).gen =\n    minpoly K (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)).gen\nkey :\n  zeta n K L ^\n      ZMod.val\n        ↑(↑(IsPrimitiveRoot.autToPow K hζ)\n            (PowerBasis.equivOfMinpoly (IsPrimitiveRoot.powerBasis K hζ)\n              (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)) h)) =\n    zeta n K L ^ ZMod.val ↑x\nthis :\n  ↑(PowerBasis.equivOfMinpoly (IsPrimitiveRoot.powerBasis K hζ)\n          (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)) h)\n      (zeta n K L) =\n    (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)).gen\n| ZMod.val\n    ↑(↑(IsPrimitiveRoot.autToPow K hζ)\n        (PowerBasis.equivOfMinpoly (IsPrimitiveRoot.powerBasis K hζ)\n          (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)) h))\ncase a\nn : ℕ+\nK : Type u_1\ninst✝⁴ : Field K\nL : Type u_2\nμ : L\ninst✝³ : CommRing L\ninst✝² : IsDomain L\nhμ✝ : IsPrimitiveRoot μ ↑n\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {n} K L\nh✝¹ : Irreducible (cyclotomic (↑n) K)\nhζ : IsPrimitiveRoot (zeta n K L) ↑n := zeta_spec n K L\nhμ : ∀ (t : (ZMod ↑n)ˣ), IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑t) ↑n :=\n  fun t => IsPrimitiveRoot.pow_of_coprime hζ (ZMod.val ↑t) (ZMod.val_coe_unit_coprime t)\nsrc✝ : (L ≃ₐ[K] L) →* (ZMod ↑n)ˣ := IsPrimitiveRoot.autToPow K (_ : IsPrimitiveRoot (zeta n K L) ↑n)\nx : (ZMod ↑n)ˣ\nh✝ : IsPrimitiveRoot (zeta n K L) ↑n\nh :\n  minpoly K (IsPrimitiveRoot.powerBasis K hζ).gen =\n    minpoly K (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)).gen\nkey :\n  zeta n K L ^\n      ZMod.val\n        ↑(↑(IsPrimitiveRoot.autToPow K hζ)\n            (PowerBasis.equivOfMinpoly (IsPrimitiveRoot.powerBasis K hζ)\n              (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)) h)) =\n    zeta n K L ^ ZMod.val ↑x\nthis :\n  ↑(PowerBasis.equivOfMinpoly (IsPrimitiveRoot.powerBasis K hζ)\n          (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)) h)\n      (zeta n K L) =\n    (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)).gen\n| zeta n K L ^ ZMod.val ↑x\n[PROOFSTEP]\nrfl\n[GOAL]\ncase a\nn : ℕ+\nK : Type u_1\ninst✝⁴ : Field K\nL : Type u_2\nμ : L\ninst✝³ : CommRing L\ninst✝² : IsDomain L\nhμ✝ : IsPrimitiveRoot μ ↑n\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {n} K L\nh✝¹ : Irreducible (cyclotomic (↑n) K)\nhζ : IsPrimitiveRoot (zeta n K L) ↑n := zeta_spec n K L\nhμ : ∀ (t : (ZMod ↑n)ˣ), IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑t) ↑n :=\n  fun t => IsPrimitiveRoot.pow_of_coprime hζ (ZMod.val ↑t) (ZMod.val_coe_unit_coprime t)\nsrc✝ : (L ≃ₐ[K] L) →* (ZMod ↑n)ˣ := IsPrimitiveRoot.autToPow K (_ : IsPrimitiveRoot (zeta n K L) ↑n)\nx : (ZMod ↑n)ˣ\nh✝ : IsPrimitiveRoot (zeta n K L) ↑n\nh :\n  minpoly K (IsPrimitiveRoot.powerBasis K hζ).gen =\n    minpoly K (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)).gen\nkey :\n  zeta n K L ^\n      ZMod.val\n        ↑(↑(IsPrimitiveRoot.autToPow K hζ)\n            (PowerBasis.equivOfMinpoly (IsPrimitiveRoot.powerBasis K hζ)\n              (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)) h)) =\n    zeta n K L ^ ZMod.val ↑x\nthis :\n  ↑(PowerBasis.equivOfMinpoly (IsPrimitiveRoot.powerBasis K hζ)\n          (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)) h)\n      (zeta n K L) =\n    (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)).gen\n| zeta n K L ^ ZMod.val ↑x\n[PROOFSTEP]\nrw [← hζ.toRootsOfUnity_coe_val]\n[GOAL]\nn : ℕ+\nK : Type u_1\ninst✝⁴ : Field K\nL : Type u_2\nμ : L\ninst✝³ : CommRing L\ninst✝² : IsDomain L\nhμ✝ : IsPrimitiveRoot μ ↑n\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {n} K L\nh✝¹ : Irreducible (cyclotomic (↑n) K)\nhζ : IsPrimitiveRoot (zeta n K L) ↑n := zeta_spec n K L\nhμ : ∀ (t : (ZMod ↑n)ˣ), IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑t) ↑n :=\n  fun t => IsPrimitiveRoot.pow_of_coprime hζ (ZMod.val ↑t) (ZMod.val_coe_unit_coprime t)\nsrc✝ : (L ≃ₐ[K] L) →* (ZMod ↑n)ˣ := IsPrimitiveRoot.autToPow K (_ : IsPrimitiveRoot (zeta n K L) ↑n)\nx : (ZMod ↑n)ˣ\nh✝ : IsPrimitiveRoot (zeta n K L) ↑n\nh :\n  minpoly K (IsPrimitiveRoot.powerBasis K hζ).gen =\n    minpoly K (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)).gen\nkey :\n  ↑↑(IsPrimitiveRoot.toRootsOfUnity hζ) ^\n      ZMod.val\n        ↑(↑(IsPrimitiveRoot.autToPow K hζ)\n            (PowerBasis.equivOfMinpoly (IsPrimitiveRoot.powerBasis K hζ)\n              (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)) h)) =\n    ↑↑(IsPrimitiveRoot.toRootsOfUnity hζ) ^ ZMod.val ↑x\nthis :\n  ↑(PowerBasis.equivOfMinpoly (IsPrimitiveRoot.powerBasis K hζ)\n          (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)) h)\n      (zeta n K L) =\n    (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)).gen\n⊢ ↑(IsPrimitiveRoot.autToPow K h✝)\n      (PowerBasis.equivOfMinpoly (IsPrimitiveRoot.powerBasis K hζ)\n        (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)) h) =\n    x\n[PROOFSTEP]\nsimp only [← rootsOfUnity.coe_pow] at key \n[GOAL]\nn : ℕ+\nK : Type u_1\ninst✝⁴ : Field K\nL : Type u_2\nμ : L\ninst✝³ : CommRing L\ninst✝² : IsDomain L\nhμ✝ : IsPrimitiveRoot μ ↑n\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {n} K L\nh✝¹ : Irreducible (cyclotomic (↑n) K)\nhζ : IsPrimitiveRoot (zeta n K L) ↑n := zeta_spec n K L\nhμ : ∀ (t : (ZMod ↑n)ˣ), IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑t) ↑n :=\n  fun t => IsPrimitiveRoot.pow_of_coprime hζ (ZMod.val ↑t) (ZMod.val_coe_unit_coprime t)\nsrc✝ : (L ≃ₐ[K] L) →* (ZMod ↑n)ˣ := IsPrimitiveRoot.autToPow K (_ : IsPrimitiveRoot (zeta n K L) ↑n)\nx : (ZMod ↑n)ˣ\nh✝ : IsPrimitiveRoot (zeta n K L) ↑n\nh :\n  minpoly K (IsPrimitiveRoot.powerBasis K hζ).gen =\n    minpoly K (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)).gen\nthis :\n  ↑(PowerBasis.equivOfMinpoly (IsPrimitiveRoot.powerBasis K hζ)\n          (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)) h)\n      (zeta n K L) =\n    (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)).gen\nkey :\n  ↑↑(IsPrimitiveRoot.toRootsOfUnity hζ ^\n          ZMod.val\n            ↑(↑(IsPrimitiveRoot.autToPow K hζ)\n                (PowerBasis.equivOfMinpoly (IsPrimitiveRoot.powerBasis K hζ)\n                  (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)) h))) =\n    ↑↑(IsPrimitiveRoot.toRootsOfUnity hζ ^ ZMod.val ↑x)\n⊢ ↑(IsPrimitiveRoot.autToPow K h✝)\n      (PowerBasis.equivOfMinpoly (IsPrimitiveRoot.powerBasis K hζ)\n        (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)) h) =\n    x\n[PROOFSTEP]\nreplace key := rootsOfUnity.coe_injective key\n[GOAL]\nn : ℕ+\nK : Type u_1\ninst✝⁴ : Field K\nL : Type u_2\nμ : L\ninst✝³ : CommRing L\ninst✝² : IsDomain L\nhμ✝ : IsPrimitiveRoot μ ↑n\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {n} K L\nh✝¹ : Irreducible (cyclotomic (↑n) K)\nhζ : IsPrimitiveRoot (zeta n K L) ↑n := zeta_spec n K L\nhμ : ∀ (t : (ZMod ↑n)ˣ), IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑t) ↑n :=\n  fun t => IsPrimitiveRoot.pow_of_coprime hζ (ZMod.val ↑t) (ZMod.val_coe_unit_coprime t)\nsrc✝ : (L ≃ₐ[K] L) →* (ZMod ↑n)ˣ := IsPrimitiveRoot.autToPow K (_ : IsPrimitiveRoot (zeta n K L) ↑n)\nx : (ZMod ↑n)ˣ\nh✝ : IsPrimitiveRoot (zeta n K L) ↑n\nh :\n  minpoly K (IsPrimitiveRoot.powerBasis K hζ).gen =\n    minpoly K (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)).gen\nthis :\n  ↑(PowerBasis.equivOfMinpoly (IsPrimitiveRoot.powerBasis K hζ)\n          (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)) h)\n      (zeta n K L) =\n    (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)).gen\nkey :\n  IsPrimitiveRoot.toRootsOfUnity hζ ^\n      ZMod.val\n        ↑(↑(IsPrimitiveRoot.autToPow K hζ)\n            (PowerBasis.equivOfMinpoly (IsPrimitiveRoot.powerBasis K hζ)\n              (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)) h)) =\n    IsPrimitiveRoot.toRootsOfUnity hζ ^ ZMod.val ↑x\n⊢ ↑(IsPrimitiveRoot.autToPow K h✝)\n      (PowerBasis.equivOfMinpoly (IsPrimitiveRoot.powerBasis K hζ)\n        (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)) h) =\n    x\n[PROOFSTEP]\nrw [pow_eq_pow_iff_modEq, ← orderOf_subgroup, ← orderOf_units, hζ.toRootsOfUnity_coe_val, ←\n  (zeta_spec n K L).eq_orderOf, ← ZMod.eq_iff_modEq_nat] at key \n[GOAL]\nn : ℕ+\nK : Type u_1\ninst✝⁴ : Field K\nL : Type u_2\nμ : L\ninst✝³ : CommRing L\ninst✝² : IsDomain L\nhμ✝ : IsPrimitiveRoot μ ↑n\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {n} K L\nh✝¹ : Irreducible (cyclotomic (↑n) K)\nhζ : IsPrimitiveRoot (zeta n K L) ↑n := zeta_spec n K L\nhμ : ∀ (t : (ZMod ↑n)ˣ), IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑t) ↑n :=\n  fun t => IsPrimitiveRoot.pow_of_coprime hζ (ZMod.val ↑t) (ZMod.val_coe_unit_coprime t)\nsrc✝ : (L ≃ₐ[K] L) →* (ZMod ↑n)ˣ := IsPrimitiveRoot.autToPow K (_ : IsPrimitiveRoot (zeta n K L) ↑n)\nx : (ZMod ↑n)ˣ\nh✝ : IsPrimitiveRoot (zeta n K L) ↑n\nh :\n  minpoly K (IsPrimitiveRoot.powerBasis K hζ).gen =\n    minpoly K (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)).gen\nthis :\n  ↑(PowerBasis.equivOfMinpoly (IsPrimitiveRoot.powerBasis K hζ)\n          (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)) h)\n      (zeta n K L) =\n    (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)).gen\nkey :\n  ↑(ZMod.val\n        ↑(↑(IsPrimitiveRoot.autToPow K hζ)\n            (PowerBasis.equivOfMinpoly (IsPrimitiveRoot.powerBasis K hζ)\n              (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)) h))) =\n    ↑(ZMod.val ↑x)\n⊢ ↑(IsPrimitiveRoot.autToPow K h✝)\n      (PowerBasis.equivOfMinpoly (IsPrimitiveRoot.powerBasis K hζ)\n        (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)) h) =\n    x\n[PROOFSTEP]\nsimp only [ZMod.nat_cast_val, ZMod.cast_id', id.def] at key \n[GOAL]\nn : ℕ+\nK : Type u_1\ninst✝⁴ : Field K\nL : Type u_2\nμ : L\ninst✝³ : CommRing L\ninst✝² : IsDomain L\nhμ✝ : IsPrimitiveRoot μ ↑n\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {n} K L\nh✝¹ : Irreducible (cyclotomic (↑n) K)\nhζ : IsPrimitiveRoot (zeta n K L) ↑n := zeta_spec n K L\nhμ : ∀ (t : (ZMod ↑n)ˣ), IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑t) ↑n :=\n  fun t => IsPrimitiveRoot.pow_of_coprime hζ (ZMod.val ↑t) (ZMod.val_coe_unit_coprime t)\nsrc✝ : (L ≃ₐ[K] L) →* (ZMod ↑n)ˣ := IsPrimitiveRoot.autToPow K (_ : IsPrimitiveRoot (zeta n K L) ↑n)\nx : (ZMod ↑n)ˣ\nh✝ : IsPrimitiveRoot (zeta n K L) ↑n\nh :\n  minpoly K (IsPrimitiveRoot.powerBasis K hζ).gen =\n    minpoly K (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)).gen\nthis :\n  ↑(PowerBasis.equivOfMinpoly (IsPrimitiveRoot.powerBasis K hζ)\n          (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)) h)\n      (zeta n K L) =\n    (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)).gen\nkey :\n  ↑(↑(IsPrimitiveRoot.autToPow K hζ)\n        (PowerBasis.equivOfMinpoly (IsPrimitiveRoot.powerBasis K hζ)\n          (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)) h)) =\n    ↑x\n⊢ ↑(IsPrimitiveRoot.autToPow K h✝)\n      (PowerBasis.equivOfMinpoly (IsPrimitiveRoot.powerBasis K hζ)\n        (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L ^ ZMod.val ↑x) ↑n)) h) =\n    x\n[PROOFSTEP]\nexact Units.ext key\n[GOAL]\nn : ℕ+\nK : Type u_1\ninst✝⁴ : Field K\nL : Type u_2\nμ : L\ninst✝³ : CommRing L\ninst✝² : IsDomain L\nhμ : IsPrimitiveRoot μ ↑n\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {n} K L\nh : Irreducible (cyclotomic (↑n) K)\n⊢ ↑(fromZetaAut hμ h) (zeta n K L) = μ\n[PROOFSTEP]\nsimp_rw [fromZetaAut, autEquivPow_symm_apply]\n  -- Porting note: `generalize_proofs` did not generalize the same proofs, making the proof different.\n[GOAL]\nn : ℕ+\nK : Type u_1\ninst✝⁴ : Field K\nL : Type u_2\nμ : L\ninst✝³ : CommRing L\ninst✝² : IsDomain L\nhμ : IsPrimitiveRoot μ ↑n\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {n} K L\nh : Irreducible (cyclotomic (↑n) K)\n⊢ ↑(PowerBasis.equivOfMinpoly (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L) ↑n))\n          (IsPrimitiveRoot.powerBasis K\n            (_ :\n              IsPrimitiveRoot\n                (zeta n K L ^\n                  ZMod.val\n                    ↑(ZMod.unitOfCoprime (Exists.choose (_ : ∃ i, i < ↑n ∧ zeta n K L ^ i = μ))\n                        (_ : Nat.coprime (Exists.choose (_ : ∃ i, i < ↑n ∧ zeta n K L ^ i = μ)) ↑n)))\n                ↑n))\n          (_ :\n            minpoly K (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L) ↑n)).gen =\n              minpoly K\n                (IsPrimitiveRoot.powerBasis K\n                    (_ :\n                      IsPrimitiveRoot\n                        (zeta n K L ^\n                          ZMod.val\n                            ↑(ZMod.unitOfCoprime (Exists.choose (_ : ∃ i, i < ↑n ∧ zeta n K L ^ i = μ))\n                                (_ : Nat.coprime (Exists.choose (_ : ∃ i, i < ↑n ∧ zeta n K L ^ i = μ)) ↑n)))\n                        ↑n)).gen))\n      (zeta n K L) =\n    μ\n[PROOFSTEP]\ngeneralize_proofs h1 h2\n[GOAL]\nn : ℕ+\nK : Type u_1\ninst✝⁴ : Field K\nL : Type u_2\nμ : L\ninst✝³ : CommRing L\ninst✝² : IsDomain L\nhμ : IsPrimitiveRoot μ ↑n\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {n} K L\nh : Irreducible (cyclotomic (↑n) K)\nh1 :\n  IsPrimitiveRoot\n    (zeta n K L ^\n      ZMod.val\n        ↑(ZMod.unitOfCoprime (Exists.choose (_ : ∃ i, i < ↑n ∧ zeta n K L ^ i = μ))\n            (_ : Nat.coprime (Exists.choose (_ : ∃ i, i < ↑n ∧ zeta n K L ^ i = μ)) ↑n)))\n    ↑n\nh2 :\n  minpoly K (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L) ↑n)).gen =\n    minpoly K (IsPrimitiveRoot.powerBasis K h1).gen\n⊢ ↑(PowerBasis.equivOfMinpoly (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L) ↑n))\n          (IsPrimitiveRoot.powerBasis K h1) h2)\n      (zeta n K L) =\n    μ\n[PROOFSTEP]\nnth_rewrite 4 [← (zeta_spec n K L).powerBasis_gen K]\n[GOAL]\nn : ℕ+\nK : Type u_1\ninst✝⁴ : Field K\nL : Type u_2\nμ : L\ninst✝³ : CommRing L\ninst✝² : IsDomain L\nhμ : IsPrimitiveRoot μ ↑n\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {n} K L\nh : Irreducible (cyclotomic (↑n) K)\nh1 :\n  IsPrimitiveRoot\n    (zeta n K L ^\n      ZMod.val\n        ↑(ZMod.unitOfCoprime (Exists.choose (_ : ∃ i, i < ↑n ∧ zeta n K L ^ i = μ))\n            (_ : Nat.coprime (Exists.choose (_ : ∃ i, i < ↑n ∧ zeta n K L ^ i = μ)) ↑n)))\n    ↑n\nh2 :\n  minpoly K (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L) ↑n)).gen =\n    minpoly K (IsPrimitiveRoot.powerBasis K h1).gen\n⊢ ↑(PowerBasis.equivOfMinpoly (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L) ↑n))\n          (IsPrimitiveRoot.powerBasis K h1) h2)\n      (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L) ↑n)).gen =\n    μ\n[PROOFSTEP]\nhave := Exists.choose_spec ((zeta_spec n K L).eq_pow_of_pow_eq_one hμ.pow_eq_one n.pos)\n[GOAL]\nn : ℕ+\nK : Type u_1\ninst✝⁴ : Field K\nL : Type u_2\nμ : L\ninst✝³ : CommRing L\ninst✝² : IsDomain L\nhμ : IsPrimitiveRoot μ ↑n\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {n} K L\nh : Irreducible (cyclotomic (↑n) K)\nh1 :\n  IsPrimitiveRoot\n    (zeta n K L ^\n      ZMod.val\n        ↑(ZMod.unitOfCoprime (Exists.choose (_ : ∃ i, i < ↑n ∧ zeta n K L ^ i = μ))\n            (_ : Nat.coprime (Exists.choose (_ : ∃ i, i < ↑n ∧ zeta n K L ^ i = μ)) ↑n)))\n    ↑n\nh2 :\n  minpoly K (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L) ↑n)).gen =\n    minpoly K (IsPrimitiveRoot.powerBasis K h1).gen\nthis :\n  Exists.choose (_ : ∃ i, i < ↑n ∧ zeta n K L ^ i = μ) < ↑n ∧\n    zeta n K L ^ Exists.choose (_ : ∃ i, i < ↑n ∧ zeta n K L ^ i = μ) = μ\n⊢ ↑(PowerBasis.equivOfMinpoly (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L) ↑n))\n          (IsPrimitiveRoot.powerBasis K h1) h2)\n      (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L) ↑n)).gen =\n    μ\n[PROOFSTEP]\nrw [PowerBasis.equivOfMinpoly_gen, h1.powerBasis_gen K, ZMod.coe_unitOfCoprime, ZMod.val_cast_of_lt this.1]\n[GOAL]\nn : ℕ+\nK : Type u_1\ninst✝⁴ : Field K\nL : Type u_2\nμ : L\ninst✝³ : CommRing L\ninst✝² : IsDomain L\nhμ : IsPrimitiveRoot μ ↑n\ninst✝¹ : Algebra K L\ninst✝ : IsCyclotomicExtension {n} K L\nh : Irreducible (cyclotomic (↑n) K)\nh1 :\n  IsPrimitiveRoot\n    (zeta n K L ^\n      ZMod.val\n        ↑(ZMod.unitOfCoprime (Exists.choose (_ : ∃ i, i < ↑n ∧ zeta n K L ^ i = μ))\n            (_ : Nat.coprime (Exists.choose (_ : ∃ i, i < ↑n ∧ zeta n K L ^ i = μ)) ↑n)))\n    ↑n\nh2 :\n  minpoly K (IsPrimitiveRoot.powerBasis K (_ : IsPrimitiveRoot (zeta n K L) ↑n)).gen =\n    minpoly K (IsPrimitiveRoot.powerBasis K h1).gen\nthis :\n  Exists.choose (_ : ∃ i, i < ↑n ∧ zeta n K L ^ i = μ) < ↑n ∧\n    zeta n K L ^ Exists.choose (_ : ∃ i, i < ↑n ∧ zeta n K L ^ i = μ) = μ\n⊢ zeta n K L ^ Exists.choose (_ : ∃ i, i < ↑n ∧ zeta n K L ^ i = μ) = μ\n[PROOFSTEP]\nexact this.2\n", "meta": {"mathlib_filename": "Mathlib.NumberTheory.Cyclotomic.Gal", "llama_tokens": 33165, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8128673178375735, "lm_q2_score": 0.6297746074044134, "lm_q1q2_score": 0.5119231959630364}}
{"text": "[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\nx : P × P × P\nhx12 : x.fst ≠ x.snd.fst\nhx32 : x.snd.snd ≠ x.snd.fst\n⊢ ContinuousAt (fun y => ∡ y.fst y.snd.fst y.snd.snd) x\n[PROOFSTEP]\nlet f : P × P × P → V × V := fun y => (y.1 -ᵥ y.2.1, y.2.2 -ᵥ y.2.1)\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\nx : P × P × P\nhx12 : x.fst ≠ x.snd.fst\nhx32 : x.snd.snd ≠ x.snd.fst\nf : P × P × P → V × V := fun y => (y.fst -ᵥ y.snd.fst, y.snd.snd -ᵥ y.snd.fst)\n⊢ ContinuousAt (fun y => ∡ y.fst y.snd.fst y.snd.snd) x\n[PROOFSTEP]\nhave hf1 : (f x).1 ≠ 0 := by simp [hx12]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\nx : P × P × P\nhx12 : x.fst ≠ x.snd.fst\nhx32 : x.snd.snd ≠ x.snd.fst\nf : P × P × P → V × V := fun y => (y.fst -ᵥ y.snd.fst, y.snd.snd -ᵥ y.snd.fst)\n⊢ (f x).fst ≠ 0\n[PROOFSTEP]\nsimp [hx12]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\nx : P × P × P\nhx12 : x.fst ≠ x.snd.fst\nhx32 : x.snd.snd ≠ x.snd.fst\nf : P × P × P → V × V := fun y => (y.fst -ᵥ y.snd.fst, y.snd.snd -ᵥ y.snd.fst)\nhf1 : (f x).fst ≠ 0\n⊢ ContinuousAt (fun y => ∡ y.fst y.snd.fst y.snd.snd) x\n[PROOFSTEP]\nhave hf2 : (f x).2 ≠ 0 := by simp [hx32]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\nx : P × P × P\nhx12 : x.fst ≠ x.snd.fst\nhx32 : x.snd.snd ≠ x.snd.fst\nf : P × P × P → V × V := fun y => (y.fst -ᵥ y.snd.fst, y.snd.snd -ᵥ y.snd.fst)\nhf1 : (f x).fst ≠ 0\n⊢ (f x).snd ≠ 0\n[PROOFSTEP]\nsimp [hx32]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\nx : P × P × P\nhx12 : x.fst ≠ x.snd.fst\nhx32 : x.snd.snd ≠ x.snd.fst\nf : P × P × P → V × V := fun y => (y.fst -ᵥ y.snd.fst, y.snd.snd -ᵥ y.snd.fst)\nhf1 : (f x).fst ≠ 0\nhf2 : (f x).snd ≠ 0\n⊢ ContinuousAt (fun y => ∡ y.fst y.snd.fst y.snd.snd) x\n[PROOFSTEP]\nexact\n  (o.continuousAt_oangle hf1 hf2).comp\n    ((continuous_fst.vsub continuous_snd.fst).prod_mk (continuous_snd.snd.vsub continuous_snd.fst)).continuousAt\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ : P\n⊢ ∡ p₁ p₁ p₂ = 0\n[PROOFSTEP]\nsimp [oangle]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ : P\n⊢ ∡ p₁ p₂ p₂ = 0\n[PROOFSTEP]\nsimp [oangle]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : ∡ p₁ p₂ p₃ ≠ 0\n⊢ p₁ ≠ p₂\n[PROOFSTEP]\nrw [← @vsub_ne_zero V]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : ∡ p₁ p₂ p₃ ≠ 0\n⊢ p₁ -ᵥ p₂ ≠ 0\n[PROOFSTEP]\nexact o.left_ne_zero_of_oangle_ne_zero h\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : ∡ p₁ p₂ p₃ ≠ 0\n⊢ p₃ ≠ p₂\n[PROOFSTEP]\nrw [← @vsub_ne_zero V]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : ∡ p₁ p₂ p₃ ≠ 0\n⊢ p₃ -ᵥ p₂ ≠ 0\n[PROOFSTEP]\nexact o.right_ne_zero_of_oangle_ne_zero h\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : ∡ p₁ p₂ p₃ ≠ 0\n⊢ p₁ ≠ p₃\n[PROOFSTEP]\nrw [← (vsub_left_injective p₂).ne_iff]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : ∡ p₁ p₂ p₃ ≠ 0\n⊢ p₁ -ᵥ p₂ ≠ p₃ -ᵥ p₂\n[PROOFSTEP]\nexact o.ne_of_oangle_ne_zero h\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : Real.Angle.sign (∡ p₁ p₂ p₃) = 1\n⊢ 1 ≠ 0\n[PROOFSTEP]\ndecide\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : Real.Angle.sign (∡ p₁ p₂ p₃) = 1\n⊢ 1 ≠ 0\n[PROOFSTEP]\ndecide\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : Real.Angle.sign (∡ p₁ p₂ p₃) = 1\n⊢ 1 ≠ 0\n[PROOFSTEP]\ndecide\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : Real.Angle.sign (∡ p₁ p₂ p₃) = -1\n⊢ -1 ≠ 0\n[PROOFSTEP]\ndecide\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : Real.Angle.sign (∡ p₁ p₂ p₃) = -1\n⊢ -1 ≠ 0\n[PROOFSTEP]\ndecide\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : Real.Angle.sign (∡ p₁ p₂ p₃) = -1\n⊢ -1 ≠ 0\n[PROOFSTEP]\ndecide\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\n⊢ ∡ p₁ p₂ p₃ ≠ 0 ∧ ∡ p₁ p₂ p₃ ≠ ↑π ↔ AffineIndependent ℝ ![p₁, p₂, p₃]\n[PROOFSTEP]\nrw [oangle, o.oangle_ne_zero_and_ne_pi_iff_linearIndependent,\n  affineIndependent_iff_linearIndependent_vsub ℝ _ (1 : Fin 3), ←\n  linearIndependent_equiv (finSuccAboveEquiv (1 : Fin 3)).toEquiv]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\n⊢ LinearIndependent ℝ ![p₁ -ᵥ p₂, p₃ -ᵥ p₂] ↔\n    LinearIndependent ℝ\n      ((fun i => Matrix.vecCons p₁ ![p₂, p₃] ↑i -ᵥ Matrix.vecCons p₁ ![p₂, p₃] 1) ∘ ↑(finSuccAboveEquiv 1).toEquiv)\n[PROOFSTEP]\nconvert Iff.rfl\n[GOAL]\ncase h.e'_2.h.e'_4\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\n⊢ (fun i => Matrix.vecCons p₁ ![p₂, p₃] ↑i -ᵥ Matrix.vecCons p₁ ![p₂, p₃] 1) ∘ ↑(finSuccAboveEquiv 1).toEquiv =\n    ![p₁ -ᵥ p₂, p₃ -ᵥ p₂]\n[PROOFSTEP]\next i\n[GOAL]\ncase h.e'_2.h.e'_4.h\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\ni : Fin 2\n⊢ ((fun i => Matrix.vecCons p₁ ![p₂, p₃] ↑i -ᵥ Matrix.vecCons p₁ ![p₂, p₃] 1) ∘ ↑(finSuccAboveEquiv 1).toEquiv) i =\n    Matrix.vecCons (p₁ -ᵥ p₂) ![p₃ -ᵥ p₂] i\n[PROOFSTEP]\nfin_cases i\n[GOAL]\ncase h.e'_2.h.e'_4.h.head\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\n⊢ ((fun i => Matrix.vecCons p₁ ![p₂, p₃] ↑i -ᵥ Matrix.vecCons p₁ ![p₂, p₃] 1) ∘ ↑(finSuccAboveEquiv 1).toEquiv)\n      { val := 0, isLt := (_ : 0 < 2) } =\n    Matrix.vecCons (p₁ -ᵥ p₂) ![p₃ -ᵥ p₂] { val := 0, isLt := (_ : 0 < 2) }\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h.e'_2.h.e'_4.h.tail.head\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\n⊢ ((fun i => Matrix.vecCons p₁ ![p₂, p₃] ↑i -ᵥ Matrix.vecCons p₁ ![p₂, p₃] 1) ∘ ↑(finSuccAboveEquiv 1).toEquiv)\n      { val := 1, isLt := (_ : (fun a => a < 2) 1) } =\n    Matrix.vecCons (p₁ -ᵥ p₂) ![p₃ -ᵥ p₂] { val := 1, isLt := (_ : (fun a => a < 2) 1) }\n[PROOFSTEP]\nrfl\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\n⊢ ∡ p₁ p₂ p₃ = 0 ∨ ∡ p₁ p₂ p₃ = ↑π ↔ Collinear ℝ {p₁, p₂, p₃}\n[PROOFSTEP]\nrw [← not_iff_not, not_or, oangle_ne_zero_and_ne_pi_iff_affineIndependent, affineIndependent_iff_not_collinear_set]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ p₅ p₆ : P\nh : 2 • ∡ p₁ p₂ p₃ = 2 • ∡ p₄ p₅ p₆\n⊢ AffineIndependent ℝ ![p₁, p₂, p₃] ↔ AffineIndependent ℝ ![p₄, p₅, p₆]\n[PROOFSTEP]\nsimp_rw [← oangle_ne_zero_and_ne_pi_iff_affineIndependent, ← Real.Angle.two_zsmul_ne_zero_iff, h]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ p₅ p₆ : P\nh : 2 • ∡ p₁ p₂ p₃ = 2 • ∡ p₄ p₅ p₆\n⊢ Collinear ℝ {p₁, p₂, p₃} ↔ Collinear ℝ {p₄, p₅, p₆}\n[PROOFSTEP]\nsimp_rw [← oangle_eq_zero_or_eq_pi_iff_collinear, ← Real.Angle.two_zsmul_eq_zero_iff, h]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ p₅ p₆ : P\nh₁₂₄₅ : vectorSpan ℝ {p₁, p₂} = vectorSpan ℝ {p₄, p₅}\nh₃₂₆₅ : vectorSpan ℝ {p₃, p₂} = vectorSpan ℝ {p₆, p₅}\n⊢ 2 • ∡ p₁ p₂ p₃ = 2 • ∡ p₄ p₅ p₆\n[PROOFSTEP]\nsimp_rw [vectorSpan_pair] at h₁₂₄₅ h₃₂₆₅ \n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ p₅ p₆ : P\nh₁₂₄₅ : Submodule.span ℝ {p₁ -ᵥ p₂} = Submodule.span ℝ {p₄ -ᵥ p₅}\nh₃₂₆₅ : Submodule.span ℝ {p₃ -ᵥ p₂} = Submodule.span ℝ {p₆ -ᵥ p₅}\n⊢ 2 • ∡ p₁ p₂ p₃ = 2 • ∡ p₄ p₅ p₆\n[PROOFSTEP]\nexact o.two_zsmul_oangle_of_span_eq_of_span_eq h₁₂₄₅ h₃₂₆₅\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ p₅ p₆ : P\nh₁₂₄₅ : affineSpan ℝ {p₁, p₂} ∥ affineSpan ℝ {p₄, p₅}\nh₃₂₆₅ : affineSpan ℝ {p₃, p₂} ∥ affineSpan ℝ {p₆, p₅}\n⊢ 2 • ∡ p₁ p₂ p₃ = 2 • ∡ p₄ p₅ p₆\n[PROOFSTEP]\nrw [AffineSubspace.affineSpan_pair_parallel_iff_vectorSpan_eq] at h₁₂₄₅ h₃₂₆₅ \n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ p₅ p₆ : P\nh₁₂₄₅ : vectorSpan ℝ {p₁, p₂} = vectorSpan ℝ {p₄, p₅}\nh₃₂₆₅ : vectorSpan ℝ {p₃, p₂} = vectorSpan ℝ {p₆, p₅}\n⊢ 2 • ∡ p₁ p₂ p₃ = 2 • ∡ p₄ p₅ p₆\n[PROOFSTEP]\nexact two_zsmul_oangle_of_vectorSpan_eq h₁₂₄₅ h₃₂₆₅\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : dist p₁ p₂ = dist p₁ p₃\n⊢ ∡ p₁ p₂ p₃ = ∡ p₂ p₃ p₁\n[PROOFSTEP]\nsimp_rw [dist_eq_norm_vsub V] at h \n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : ‖p₁ -ᵥ p₂‖ = ‖p₁ -ᵥ p₃‖\n⊢ ∡ p₁ p₂ p₃ = ∡ p₂ p₃ p₁\n[PROOFSTEP]\nrw [oangle, oangle, ← vsub_sub_vsub_cancel_left p₃ p₂ p₁, ← vsub_sub_vsub_cancel_left p₂ p₃ p₁,\n  o.oangle_sub_eq_oangle_sub_rev_of_norm_eq h]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nhn : p₂ ≠ p₃\nh : dist p₁ p₂ = dist p₁ p₃\n⊢ ∡ p₃ p₁ p₂ = ↑π - 2 • ∡ p₁ p₂ p₃\n[PROOFSTEP]\nsimp_rw [dist_eq_norm_vsub V] at h \n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nhn : p₂ ≠ p₃\nh : ‖p₁ -ᵥ p₂‖ = ‖p₁ -ᵥ p₃‖\n⊢ ∡ p₃ p₁ p₂ = ↑π - 2 • ∡ p₁ p₂ p₃\n[PROOFSTEP]\nrw [oangle, oangle]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nhn : p₂ ≠ p₃\nh : ‖p₁ -ᵥ p₂‖ = ‖p₁ -ᵥ p₃‖\n⊢ Orientation.oangle o (p₃ -ᵥ p₁) (p₂ -ᵥ p₁) = ↑π - 2 • Orientation.oangle o (p₁ -ᵥ p₂) (p₃ -ᵥ p₂)\n[PROOFSTEP]\nconvert o.oangle_eq_pi_sub_two_zsmul_oangle_sub_of_norm_eq _ h using 1\n[GOAL]\ncase h.e'_2\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nhn : p₂ ≠ p₃\nh : ‖p₁ -ᵥ p₂‖ = ‖p₁ -ᵥ p₃‖\n⊢ Orientation.oangle o (p₃ -ᵥ p₁) (p₂ -ᵥ p₁) = Orientation.oangle o (p₁ -ᵥ p₃) (p₁ -ᵥ p₂)\n[PROOFSTEP]\nrw [← neg_vsub_eq_vsub_rev p₁ p₃, ← neg_vsub_eq_vsub_rev p₁ p₂, o.oangle_neg_neg]\n[GOAL]\ncase h.e'_3\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nhn : p₂ ≠ p₃\nh : ‖p₁ -ᵥ p₂‖ = ‖p₁ -ᵥ p₃‖\n⊢ ↑π - 2 • Orientation.oangle o (p₁ -ᵥ p₂) (p₃ -ᵥ p₂) = ↑π - 2 • Orientation.oangle o (p₁ -ᵥ p₃ - (p₁ -ᵥ p₂)) (p₁ -ᵥ p₃)\n[PROOFSTEP]\nrw [← o.oangle_sub_eq_oangle_sub_rev_of_norm_eq h]\n[GOAL]\ncase h.e'_3\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nhn : p₂ ≠ p₃\nh : ‖p₁ -ᵥ p₂‖ = ‖p₁ -ᵥ p₃‖\n⊢ ↑π - 2 • Orientation.oangle o (p₁ -ᵥ p₂) (p₃ -ᵥ p₂) = ↑π - 2 • Orientation.oangle o (p₁ -ᵥ p₂) (p₁ -ᵥ p₂ - (p₁ -ᵥ p₃))\n[PROOFSTEP]\nsimp\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nhn : p₂ ≠ p₃\nh : ‖p₁ -ᵥ p₂‖ = ‖p₁ -ᵥ p₃‖\n⊢ p₁ -ᵥ p₂ ≠ p₁ -ᵥ p₃\n[PROOFSTEP]\nsimpa using hn\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : dist p₁ p₂ = dist p₁ p₃\n⊢ |Real.Angle.toReal (∡ p₁ p₂ p₃)| < π / 2\n[PROOFSTEP]\nsimp_rw [dist_eq_norm_vsub V] at h \n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : ‖p₁ -ᵥ p₂‖ = ‖p₁ -ᵥ p₃‖\n⊢ |Real.Angle.toReal (∡ p₁ p₂ p₃)| < π / 2\n[PROOFSTEP]\nrw [oangle, ← vsub_sub_vsub_cancel_left p₃ p₂ p₁]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : ‖p₁ -ᵥ p₂‖ = ‖p₁ -ᵥ p₃‖\n⊢ |Real.Angle.toReal (Orientation.oangle o (p₁ -ᵥ p₂) (p₁ -ᵥ p₂ - (p₁ -ᵥ p₃)))| < π / 2\n[PROOFSTEP]\nexact o.abs_oangle_sub_right_toReal_lt_pi_div_two h\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np p₁ p₂ : P\nh : Real.Angle.sign (∡ p₁ p p₂) = 0\n⊢ p₁ = p ∨ p₂ = p ∨ ∠ p₁ p p₂ = 0 ∨ ∠ p₁ p p₂ = π\n[PROOFSTEP]\nconvert o.eq_zero_or_angle_eq_zero_or_pi_of_sign_oangle_eq_zero h\n[GOAL]\ncase h.e'_1.a\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np p₁ p₂ : P\nh : Real.Angle.sign (∡ p₁ p p₂) = 0\n⊢ p₁ = p ↔ p₁ -ᵥ p = 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.e'_2.h.e'_1.a\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np p₁ p₂ : P\nh : Real.Angle.sign (∡ p₁ p p₂) = 0\n⊢ p₂ = p ↔ p₂ -ᵥ p = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : ∡ p₁ p₂ p₃ = ↑(π / 2)\n⊢ ∠ p₁ p₂ p₃ = π / 2\n[PROOFSTEP]\nrw [angle, ← InnerProductGeometry.inner_eq_zero_iff_angle_eq_pi_div_two]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : ∡ p₁ p₂ p₃ = ↑(π / 2)\n⊢ inner (p₁ -ᵥ p₂) (p₃ -ᵥ p₂) = 0\n[PROOFSTEP]\nexact o.inner_eq_zero_of_oangle_eq_pi_div_two h\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : ∡ p₁ p₂ p₃ = ↑(π / 2)\n⊢ ∠ p₃ p₂ p₁ = π / 2\n[PROOFSTEP]\nrw [angle_comm]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : ∡ p₁ p₂ p₃ = ↑(π / 2)\n⊢ ∠ p₁ p₂ p₃ = π / 2\n[PROOFSTEP]\nexact angle_eq_pi_div_two_of_oangle_eq_pi_div_two h\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : ∡ p₁ p₂ p₃ = ↑(-π / 2)\n⊢ ∠ p₁ p₂ p₃ = π / 2\n[PROOFSTEP]\nrw [angle, ← InnerProductGeometry.inner_eq_zero_iff_angle_eq_pi_div_two]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : ∡ p₁ p₂ p₃ = ↑(-π / 2)\n⊢ inner (p₁ -ᵥ p₂) (p₃ -ᵥ p₂) = 0\n[PROOFSTEP]\nexact o.inner_eq_zero_of_oangle_eq_neg_pi_div_two h\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : ∡ p₁ p₂ p₃ = ↑(-π / 2)\n⊢ ∠ p₃ p₂ p₁ = π / 2\n[PROOFSTEP]\nrw [angle_comm]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : ∡ p₁ p₂ p₃ = ↑(-π / 2)\n⊢ ∠ p₁ p₂ p₃ = π / 2\n[PROOFSTEP]\nexact angle_eq_pi_div_two_of_oangle_eq_neg_pi_div_two h\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\n⊢ -Real.Angle.sign (∡ p₁ p₂ p₃) = Real.Angle.sign (∡ p₂ p₁ p₃)\n[PROOFSTEP]\nrw [eq_comm, oangle, oangle, ← o.oangle_neg_neg, neg_vsub_eq_vsub_rev, neg_vsub_eq_vsub_rev, ←\n  vsub_sub_vsub_cancel_left p₁ p₃ p₂, ← neg_vsub_eq_vsub_rev p₃ p₂, sub_eq_add_neg, neg_vsub_eq_vsub_rev p₂ p₁,\n  add_comm, ← @neg_one_smul ℝ]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\n⊢ Real.Angle.sign (Orientation.oangle o (p₁ -ᵥ p₂) (p₁ -ᵥ p₂ + -1 • (p₃ -ᵥ p₂))) =\n    -Real.Angle.sign (Orientation.oangle o (p₁ -ᵥ p₂) (p₃ -ᵥ p₂))\n[PROOFSTEP]\nnth_rw 2 [← one_smul ℝ (p₁ -ᵥ p₂)]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\n⊢ Real.Angle.sign (Orientation.oangle o (p₁ -ᵥ p₂) (1 • (p₁ -ᵥ p₂) + -1 • (p₃ -ᵥ p₂))) =\n    -Real.Angle.sign (Orientation.oangle o (p₁ -ᵥ p₂) (p₃ -ᵥ p₂))\n[PROOFSTEP]\nrw [o.oangle_sign_smul_add_smul_right]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\n⊢ ↑SignType.sign (-1) * Real.Angle.sign (Orientation.oangle o (p₁ -ᵥ p₂) (p₃ -ᵥ p₂)) =\n    -Real.Angle.sign (Orientation.oangle o (p₁ -ᵥ p₂) (p₃ -ᵥ p₂))\n[PROOFSTEP]\nsimp\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\n⊢ -Real.Angle.sign (∡ p₁ p₂ p₃) = Real.Angle.sign (∡ p₃ p₂ p₁)\n[PROOFSTEP]\nrw [oangle_rev, Real.Angle.sign_neg, neg_neg]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\n⊢ -Real.Angle.sign (∡ p₁ p₂ p₃) = Real.Angle.sign (∡ p₁ p₃ p₂)\n[PROOFSTEP]\nrw [oangle_swap₁₃_sign, ← oangle_swap₁₂_sign, oangle_swap₁₃_sign]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\n⊢ Real.Angle.sign (∡ p₂ p₃ p₁) = Real.Angle.sign (∡ p₁ p₂ p₃)\n[PROOFSTEP]\nrw [← oangle_swap₁₂_sign, oangle_swap₁₃_sign]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\n⊢ ∡ p₁ p₂ p₃ = ↑π ↔ Sbtw ℝ p₁ p₂ p₃\n[PROOFSTEP]\nrw [oangle_eq_pi_iff_angle_eq_pi, angle_eq_pi_iff_sbtw]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : Sbtw ℝ p₁ p₂ p₃\n⊢ ∡ p₃ p₂ p₁ = ↑π\n[PROOFSTEP]\nrw [oangle_eq_pi_iff_oangle_rev_eq_pi, ← h.oangle₁₂₃_eq_pi]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : Wbtw ℝ p₁ p₂ p₃\n⊢ ∡ p₂ p₁ p₃ = 0\n[PROOFSTEP]\nby_cases hp₂p₁ : p₂ = p₁\n[GOAL]\ncase pos\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : Wbtw ℝ p₁ p₂ p₃\nhp₂p₁ : p₂ = p₁\n⊢ ∡ p₂ p₁ p₃ = 0\n[PROOFSTEP]\nsimp [hp₂p₁]\n[GOAL]\ncase neg\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : Wbtw ℝ p₁ p₂ p₃\nhp₂p₁ : ¬p₂ = p₁\n⊢ ∡ p₂ p₁ p₃ = 0\n[PROOFSTEP]\nby_cases hp₃p₁ : p₃ = p₁\n[GOAL]\ncase pos\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : Wbtw ℝ p₁ p₂ p₃\nhp₂p₁ : ¬p₂ = p₁\nhp₃p₁ : p₃ = p₁\n⊢ ∡ p₂ p₁ p₃ = 0\n[PROOFSTEP]\nsimp [hp₃p₁]\n[GOAL]\ncase neg\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : Wbtw ℝ p₁ p₂ p₃\nhp₂p₁ : ¬p₂ = p₁\nhp₃p₁ : ¬p₃ = p₁\n⊢ ∡ p₂ p₁ p₃ = 0\n[PROOFSTEP]\nrw [oangle_eq_zero_iff_angle_eq_zero hp₂p₁ hp₃p₁]\n[GOAL]\ncase neg\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : Wbtw ℝ p₁ p₂ p₃\nhp₂p₁ : ¬p₂ = p₁\nhp₃p₁ : ¬p₃ = p₁\n⊢ ∠ p₂ p₁ p₃ = 0\n[PROOFSTEP]\nexact h.angle₂₁₃_eq_zero_of_ne hp₂p₁\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : Wbtw ℝ p₁ p₂ p₃\n⊢ ∡ p₃ p₁ p₂ = 0\n[PROOFSTEP]\nrw [oangle_eq_zero_iff_oangle_rev_eq_zero, h.oangle₂₁₃_eq_zero]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\n⊢ ∡ p₁ p₂ p₃ = 0 ↔ Wbtw ℝ p₂ p₁ p₃ ∨ Wbtw ℝ p₂ p₃ p₁\n[PROOFSTEP]\nby_cases hp₁p₂ : p₁ = p₂\n[GOAL]\ncase pos\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nhp₁p₂ : p₁ = p₂\n⊢ ∡ p₁ p₂ p₃ = 0 ↔ Wbtw ℝ p₂ p₁ p₃ ∨ Wbtw ℝ p₂ p₃ p₁\n[PROOFSTEP]\nsimp [hp₁p₂]\n[GOAL]\ncase neg\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nhp₁p₂ : ¬p₁ = p₂\n⊢ ∡ p₁ p₂ p₃ = 0 ↔ Wbtw ℝ p₂ p₁ p₃ ∨ Wbtw ℝ p₂ p₃ p₁\n[PROOFSTEP]\nby_cases hp₃p₂ : p₃ = p₂\n[GOAL]\ncase pos\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nhp₁p₂ : ¬p₁ = p₂\nhp₃p₂ : p₃ = p₂\n⊢ ∡ p₁ p₂ p₃ = 0 ↔ Wbtw ℝ p₂ p₁ p₃ ∨ Wbtw ℝ p₂ p₃ p₁\n[PROOFSTEP]\nsimp [hp₃p₂]\n[GOAL]\ncase neg\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nhp₁p₂ : ¬p₁ = p₂\nhp₃p₂ : ¬p₃ = p₂\n⊢ ∡ p₁ p₂ p₃ = 0 ↔ Wbtw ℝ p₂ p₁ p₃ ∨ Wbtw ℝ p₂ p₃ p₁\n[PROOFSTEP]\nrw [oangle_eq_zero_iff_angle_eq_zero hp₁p₂ hp₃p₂, angle_eq_zero_iff_ne_and_wbtw]\n[GOAL]\ncase neg\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nhp₁p₂ : ¬p₁ = p₂\nhp₃p₂ : ¬p₃ = p₂\n⊢ p₁ ≠ p₂ ∧ Wbtw ℝ p₂ p₁ p₃ ∨ p₃ ≠ p₂ ∧ Wbtw ℝ p₂ p₃ p₁ ↔ Wbtw ℝ p₂ p₁ p₃ ∨ Wbtw ℝ p₂ p₃ p₁\n[PROOFSTEP]\nsimp [hp₁p₂, hp₃p₂]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₁' p₂ p₃ : P\nh : Wbtw ℝ p₂ p₁ p₁'\nhp₁p₂ : p₁ ≠ p₂\n⊢ ∡ p₁ p₂ p₃ = ∡ p₁' p₂ p₃\n[PROOFSTEP]\nby_cases hp₃p₂ : p₃ = p₂\n[GOAL]\ncase pos\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₁' p₂ p₃ : P\nh : Wbtw ℝ p₂ p₁ p₁'\nhp₁p₂ : p₁ ≠ p₂\nhp₃p₂ : p₃ = p₂\n⊢ ∡ p₁ p₂ p₃ = ∡ p₁' p₂ p₃\n[PROOFSTEP]\nsimp [hp₃p₂]\n[GOAL]\ncase neg\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₁' p₂ p₃ : P\nh : Wbtw ℝ p₂ p₁ p₁'\nhp₁p₂ : p₁ ≠ p₂\nhp₃p₂ : ¬p₃ = p₂\n⊢ ∡ p₁ p₂ p₃ = ∡ p₁' p₂ p₃\n[PROOFSTEP]\nby_cases hp₁'p₂ : p₁' = p₂\n[GOAL]\ncase pos\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₁' p₂ p₃ : P\nh : Wbtw ℝ p₂ p₁ p₁'\nhp₁p₂ : p₁ ≠ p₂\nhp₃p₂ : ¬p₃ = p₂\nhp₁'p₂ : p₁' = p₂\n⊢ ∡ p₁ p₂ p₃ = ∡ p₁' p₂ p₃\n[PROOFSTEP]\nrw [hp₁'p₂, wbtw_self_iff] at h \n[GOAL]\ncase pos\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₁' p₂ p₃ : P\nh : p₁ = p₂\nhp₁p₂ : p₁ ≠ p₂\nhp₃p₂ : ¬p₃ = p₂\nhp₁'p₂ : p₁' = p₂\n⊢ ∡ p₁ p₂ p₃ = ∡ p₁' p₂ p₃\n[PROOFSTEP]\nexact False.elim (hp₁p₂ h)\n[GOAL]\ncase neg\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₁' p₂ p₃ : P\nh : Wbtw ℝ p₂ p₁ p₁'\nhp₁p₂ : p₁ ≠ p₂\nhp₃p₂ : ¬p₃ = p₂\nhp₁'p₂ : ¬p₁' = p₂\n⊢ ∡ p₁ p₂ p₃ = ∡ p₁' p₂ p₃\n[PROOFSTEP]\nrw [← oangle_add hp₁'p₂ hp₁p₂ hp₃p₂, h.oangle₃₁₂_eq_zero, zero_add]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₃' : P\nh : Wbtw ℝ p₂ p₃ p₃'\nhp₃p₂ : p₃ ≠ p₂\n⊢ ∡ p₁ p₂ p₃ = ∡ p₁ p₂ p₃'\n[PROOFSTEP]\nrw [oangle_rev, h.oangle_eq_left hp₃p₂, ← oangle_rev]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\n⊢ ∡ (midpoint ℝ p₁ p₂) p₂ p₃ = ∡ p₁ p₂ p₃\n[PROOFSTEP]\nby_cases h : p₁ = p₂\n[GOAL]\ncase pos\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : p₁ = p₂\n⊢ ∡ (midpoint ℝ p₁ p₂) p₂ p₃ = ∡ p₁ p₂ p₃\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase neg\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : ¬p₁ = p₂\n⊢ ∡ (midpoint ℝ p₁ p₂) p₂ p₃ = ∡ p₁ p₂ p₃\n[PROOFSTEP]\nexact (sbtw_midpoint_of_ne ℝ h).symm.oangle_eq_left\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\n⊢ ∡ (midpoint ℝ p₂ p₁) p₂ p₃ = ∡ p₁ p₂ p₃\n[PROOFSTEP]\nrw [midpoint_comm, oangle_midpoint_left]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\n⊢ ∡ p₁ p₂ (midpoint ℝ p₃ p₂) = ∡ p₁ p₂ p₃\n[PROOFSTEP]\nby_cases h : p₃ = p₂\n[GOAL]\ncase pos\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : p₃ = p₂\n⊢ ∡ p₁ p₂ (midpoint ℝ p₃ p₂) = ∡ p₁ p₂ p₃\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase neg\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\nh : ¬p₃ = p₂\n⊢ ∡ p₁ p₂ (midpoint ℝ p₃ p₂) = ∡ p₁ p₂ p₃\n[PROOFSTEP]\nexact (sbtw_midpoint_of_ne ℝ h).symm.oangle_eq_right\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ : P\n⊢ ∡ p₁ p₂ (midpoint ℝ p₂ p₃) = ∡ p₁ p₂ p₃\n[PROOFSTEP]\nrw [midpoint_comm, oangle_midpoint_right]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₁' p₂ p₃ : P\nh : Sbtw ℝ p₁ p₂ p₁'\nhp₃p₂ : p₃ ≠ p₂\n⊢ ∡ p₁ p₂ p₃ = ∡ p₁' p₂ p₃ + ↑π\n[PROOFSTEP]\nrw [← h.oangle₁₂₃_eq_pi, oangle_add_swap h.left_ne h.right_ne hp₃p₂]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₃' : P\nh : Sbtw ℝ p₃ p₂ p₃'\nhp₁p₂ : p₁ ≠ p₂\n⊢ ∡ p₁ p₂ p₃ = ∡ p₁ p₂ p₃' + ↑π\n[PROOFSTEP]\nrw [← h.oangle₃₂₁_eq_pi, oangle_add hp₁p₂ h.right_ne h.left_ne]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₁' p₂ p₃ p₃' : P\nh₁ : Sbtw ℝ p₁ p₂ p₁'\nh₃ : Sbtw ℝ p₃ p₂ p₃'\n⊢ ∡ p₁ p₂ p₃ = ∡ p₁' p₂ p₃'\n[PROOFSTEP]\nrw [h₁.oangle_eq_add_pi_left h₃.left_ne, h₃.oangle_eq_add_pi_right h₁.right_ne, add_assoc, Real.Angle.coe_pi_add_coe_pi,\n  add_zero]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₁' p₂ p₃ : P\nh : Collinear ℝ {p₁, p₂, p₁'}\nhp₁p₂ : p₁ ≠ p₂\nhp₁'p₂ : p₁' ≠ p₂\n⊢ 2 • ∡ p₁ p₂ p₃ = 2 • ∡ p₁' p₂ p₃\n[PROOFSTEP]\nby_cases hp₃p₂ : p₃ = p₂\n[GOAL]\ncase pos\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₁' p₂ p₃ : P\nh : Collinear ℝ {p₁, p₂, p₁'}\nhp₁p₂ : p₁ ≠ p₂\nhp₁'p₂ : p₁' ≠ p₂\nhp₃p₂ : p₃ = p₂\n⊢ 2 • ∡ p₁ p₂ p₃ = 2 • ∡ p₁' p₂ p₃\n[PROOFSTEP]\nsimp [hp₃p₂]\n[GOAL]\ncase neg\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₁' p₂ p₃ : P\nh : Collinear ℝ {p₁, p₂, p₁'}\nhp₁p₂ : p₁ ≠ p₂\nhp₁'p₂ : p₁' ≠ p₂\nhp₃p₂ : ¬p₃ = p₂\n⊢ 2 • ∡ p₁ p₂ p₃ = 2 • ∡ p₁' p₂ p₃\n[PROOFSTEP]\nrcases h.wbtw_or_wbtw_or_wbtw with (hw | hw | hw)\n[GOAL]\ncase neg.inl\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₁' p₂ p₃ : P\nh : Collinear ℝ {p₁, p₂, p₁'}\nhp₁p₂ : p₁ ≠ p₂\nhp₁'p₂ : p₁' ≠ p₂\nhp₃p₂ : ¬p₃ = p₂\nhw : Wbtw ℝ p₁ p₂ p₁'\n⊢ 2 • ∡ p₁ p₂ p₃ = 2 • ∡ p₁' p₂ p₃\n[PROOFSTEP]\nhave hw' : Sbtw ℝ p₁ p₂ p₁' := ⟨hw, hp₁p₂.symm, hp₁'p₂.symm⟩\n[GOAL]\ncase neg.inl\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₁' p₂ p₃ : P\nh : Collinear ℝ {p₁, p₂, p₁'}\nhp₁p₂ : p₁ ≠ p₂\nhp₁'p₂ : p₁' ≠ p₂\nhp₃p₂ : ¬p₃ = p₂\nhw : Wbtw ℝ p₁ p₂ p₁'\nhw' : Sbtw ℝ p₁ p₂ p₁'\n⊢ 2 • ∡ p₁ p₂ p₃ = 2 • ∡ p₁' p₂ p₃\n[PROOFSTEP]\nrw [hw'.oangle_eq_add_pi_left hp₃p₂, smul_add, Real.Angle.two_zsmul_coe_pi, add_zero]\n[GOAL]\ncase neg.inr.inl\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₁' p₂ p₃ : P\nh : Collinear ℝ {p₁, p₂, p₁'}\nhp₁p₂ : p₁ ≠ p₂\nhp₁'p₂ : p₁' ≠ p₂\nhp₃p₂ : ¬p₃ = p₂\nhw : Wbtw ℝ p₂ p₁' p₁\n⊢ 2 • ∡ p₁ p₂ p₃ = 2 • ∡ p₁' p₂ p₃\n[PROOFSTEP]\nrw [hw.oangle_eq_left hp₁'p₂]\n[GOAL]\ncase neg.inr.inr\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₁' p₂ p₃ : P\nh : Collinear ℝ {p₁, p₂, p₁'}\nhp₁p₂ : p₁ ≠ p₂\nhp₁'p₂ : p₁' ≠ p₂\nhp₃p₂ : ¬p₃ = p₂\nhw : Wbtw ℝ p₁' p₁ p₂\n⊢ 2 • ∡ p₁ p₂ p₃ = 2 • ∡ p₁' p₂ p₃\n[PROOFSTEP]\nrw [hw.symm.oangle_eq_left hp₁p₂]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₃' : P\nh : Collinear ℝ {p₃, p₂, p₃'}\nhp₃p₂ : p₃ ≠ p₂\nhp₃'p₂ : p₃' ≠ p₂\n⊢ 2 • ∡ p₁ p₂ p₃ = 2 • ∡ p₁ p₂ p₃'\n[PROOFSTEP]\nrw [oangle_rev, smul_neg, h.two_zsmul_oangle_eq_left hp₃p₂ hp₃'p₂, ← smul_neg, ← oangle_rev]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p : P\nh : p₁ ≠ p₂\n⊢ dist p₁ p = dist p₂ p ↔ ∃ r, r • ↑(Orientation.rotation o ↑(π / 2)) (p₂ -ᵥ p₁) +ᵥ midpoint ℝ p₁ p₂ = p\n[PROOFSTEP]\nrefine' ⟨fun hd => _, fun hr => _⟩\n[GOAL]\ncase refine'_1\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p : P\nh : p₁ ≠ p₂\nhd : dist p₁ p = dist p₂ p\n⊢ ∃ r, r • ↑(Orientation.rotation o ↑(π / 2)) (p₂ -ᵥ p₁) +ᵥ midpoint ℝ p₁ p₂ = p\n[PROOFSTEP]\nhave hi : ⟪p₂ -ᵥ p₁, p -ᵥ midpoint ℝ p₁ p₂⟫ = 0 :=\n  by\n  rw [@dist_eq_norm_vsub' V, @dist_eq_norm_vsub' V, ← mul_self_inj (norm_nonneg _) (norm_nonneg _), ←\n    real_inner_self_eq_norm_mul_norm, ← real_inner_self_eq_norm_mul_norm] at hd \n  simp_rw [vsub_midpoint, ← vsub_sub_vsub_cancel_left p₂ p₁ p, inner_sub_left, inner_add_right, inner_smul_right, hd,\n    real_inner_comm (p -ᵥ p₁)]\n  abel\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p : P\nh : p₁ ≠ p₂\nhd : dist p₁ p = dist p₂ p\n⊢ inner (p₂ -ᵥ p₁) (p -ᵥ midpoint ℝ p₁ p₂) = 0\n[PROOFSTEP]\nrw [@dist_eq_norm_vsub' V, @dist_eq_norm_vsub' V, ← mul_self_inj (norm_nonneg _) (norm_nonneg _), ←\n  real_inner_self_eq_norm_mul_norm, ← real_inner_self_eq_norm_mul_norm] at hd \n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p : P\nh : p₁ ≠ p₂\nhd✝¹ : ‖p -ᵥ p₁‖ * ‖p -ᵥ p₁‖ = ‖p -ᵥ p₂‖ * ‖p -ᵥ p₂‖\nhd✝ : inner (p -ᵥ p₁) (p -ᵥ p₁) = ‖p -ᵥ p₂‖ * ‖p -ᵥ p₂‖\nhd : inner (p -ᵥ p₁) (p -ᵥ p₁) = inner (p -ᵥ p₂) (p -ᵥ p₂)\n⊢ inner (p₂ -ᵥ p₁) (p -ᵥ midpoint ℝ p₁ p₂) = 0\n[PROOFSTEP]\nsimp_rw [vsub_midpoint, ← vsub_sub_vsub_cancel_left p₂ p₁ p, inner_sub_left, inner_add_right, inner_smul_right, hd,\n  real_inner_comm (p -ᵥ p₁)]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p : P\nh : p₁ ≠ p₂\nhd✝¹ : ‖p -ᵥ p₁‖ * ‖p -ᵥ p₁‖ = ‖p -ᵥ p₂‖ * ‖p -ᵥ p₂‖\nhd✝ : inner (p -ᵥ p₁) (p -ᵥ p₁) = ‖p -ᵥ p₂‖ * ‖p -ᵥ p₂‖\nhd : inner (p -ᵥ p₁) (p -ᵥ p₁) = inner (p -ᵥ p₂) (p -ᵥ p₂)\n⊢ ⅟2 * inner (p -ᵥ p₂) (p -ᵥ p₂) + ⅟2 * inner (p -ᵥ p₁) (p -ᵥ p₂) -\n      (⅟2 * inner (p -ᵥ p₁) (p -ᵥ p₂) + ⅟2 * inner (p -ᵥ p₂) (p -ᵥ p₂)) =\n    0\n[PROOFSTEP]\nabel\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p : P\nh : p₁ ≠ p₂\nhd✝¹ : ‖p -ᵥ p₁‖ * ‖p -ᵥ p₁‖ = ‖p -ᵥ p₂‖ * ‖p -ᵥ p₂‖\nhd✝ : inner (p -ᵥ p₁) (p -ᵥ p₁) = ‖p -ᵥ p₂‖ * ‖p -ᵥ p₂‖\nhd : inner (p -ᵥ p₁) (p -ᵥ p₁) = inner (p -ᵥ p₂) (p -ᵥ p₂)\n⊢ ⅟2 * inner (p -ᵥ p₂) (p -ᵥ p₂) + ⅟2 * inner (p -ᵥ p₁) (p -ᵥ p₂) -\n      (⅟2 * inner (p -ᵥ p₁) (p -ᵥ p₂) + ⅟2 * inner (p -ᵥ p₂) (p -ᵥ p₂)) =\n    0\n[PROOFSTEP]\nabel\n[GOAL]\ncase refine'_1\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p : P\nh : p₁ ≠ p₂\nhd : dist p₁ p = dist p₂ p\nhi : inner (p₂ -ᵥ p₁) (p -ᵥ midpoint ℝ p₁ p₂) = 0\n⊢ ∃ r, r • ↑(Orientation.rotation o ↑(π / 2)) (p₂ -ᵥ p₁) +ᵥ midpoint ℝ p₁ p₂ = p\n[PROOFSTEP]\nrw [@Orientation.inner_eq_zero_iff_eq_zero_or_eq_smul_rotation_pi_div_two V _ _ _ o,\n  or_iff_right (vsub_ne_zero.2 h.symm)] at hi \n[GOAL]\ncase refine'_1\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p : P\nh : p₁ ≠ p₂\nhd : dist p₁ p = dist p₂ p\nhi : ∃ r, r • ↑(Orientation.rotation o ↑(π / 2)) (p₂ -ᵥ p₁) = p -ᵥ midpoint ℝ p₁ p₂\n⊢ ∃ r, r • ↑(Orientation.rotation o ↑(π / 2)) (p₂ -ᵥ p₁) +ᵥ midpoint ℝ p₁ p₂ = p\n[PROOFSTEP]\nrcases hi with ⟨r, hr⟩\n[GOAL]\ncase refine'_1.intro\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p : P\nh : p₁ ≠ p₂\nhd : dist p₁ p = dist p₂ p\nr : ℝ\nhr : r • ↑(Orientation.rotation o ↑(π / 2)) (p₂ -ᵥ p₁) = p -ᵥ midpoint ℝ p₁ p₂\n⊢ ∃ r, r • ↑(Orientation.rotation o ↑(π / 2)) (p₂ -ᵥ p₁) +ᵥ midpoint ℝ p₁ p₂ = p\n[PROOFSTEP]\nrw [eq_comm, ← eq_vadd_iff_vsub_eq] at hr \n[GOAL]\ncase refine'_1.intro\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p : P\nh : p₁ ≠ p₂\nhd : dist p₁ p = dist p₂ p\nr : ℝ\nhr : p = r • ↑(Orientation.rotation o ↑(π / 2)) (p₂ -ᵥ p₁) +ᵥ midpoint ℝ p₁ p₂\n⊢ ∃ r, r • ↑(Orientation.rotation o ↑(π / 2)) (p₂ -ᵥ p₁) +ᵥ midpoint ℝ p₁ p₂ = p\n[PROOFSTEP]\nexact ⟨r, hr.symm⟩\n[GOAL]\ncase refine'_2\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p : P\nh : p₁ ≠ p₂\nhr : ∃ r, r • ↑(Orientation.rotation o ↑(π / 2)) (p₂ -ᵥ p₁) +ᵥ midpoint ℝ p₁ p₂ = p\n⊢ dist p₁ p = dist p₂ p\n[PROOFSTEP]\nrcases hr with ⟨r, rfl⟩\n[GOAL]\ncase refine'_2.intro\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ : P\nh : p₁ ≠ p₂\nr : ℝ\n⊢ dist p₁ (r • ↑(Orientation.rotation o ↑(π / 2)) (p₂ -ᵥ p₁) +ᵥ midpoint ℝ p₁ p₂) =\n    dist p₂ (r • ↑(Orientation.rotation o ↑(π / 2)) (p₂ -ᵥ p₁) +ᵥ midpoint ℝ p₁ p₂)\n[PROOFSTEP]\nsimp_rw [@dist_eq_norm_vsub V, vsub_vadd_eq_vsub_sub, left_vsub_midpoint, right_vsub_midpoint, invOf_eq_inv, ←\n  neg_vsub_eq_vsub_rev p₂ p₁, ← mul_self_inj (norm_nonneg _) (norm_nonneg _), ← real_inner_self_eq_norm_mul_norm,\n  inner_sub_sub_self]\n[GOAL]\ncase refine'_2.intro\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ : P\nh : p₁ ≠ p₂\nr : ℝ\n⊢ inner (2⁻¹ • -(p₂ -ᵥ p₁)) (2⁻¹ • -(p₂ -ᵥ p₁)) -\n          inner (2⁻¹ • -(p₂ -ᵥ p₁)) (r • ↑(Orientation.rotation o ↑(π / 2)) (p₂ -ᵥ p₁)) -\n        inner (r • ↑(Orientation.rotation o ↑(π / 2)) (p₂ -ᵥ p₁)) (2⁻¹ • -(p₂ -ᵥ p₁)) +\n      inner (r • ↑(Orientation.rotation o ↑(π / 2)) (p₂ -ᵥ p₁)) (r • ↑(Orientation.rotation o ↑(π / 2)) (p₂ -ᵥ p₁)) =\n    inner (2⁻¹ • (p₂ -ᵥ p₁)) (2⁻¹ • (p₂ -ᵥ p₁)) -\n          inner (2⁻¹ • (p₂ -ᵥ p₁)) (r • ↑(Orientation.rotation o ↑(π / 2)) (p₂ -ᵥ p₁)) -\n        inner (r • ↑(Orientation.rotation o ↑(π / 2)) (p₂ -ᵥ p₁)) (2⁻¹ • (p₂ -ᵥ p₁)) +\n      inner (r • ↑(Orientation.rotation o ↑(π / 2)) (p₂ -ᵥ p₁)) (r • ↑(Orientation.rotation o ↑(π / 2)) (p₂ -ᵥ p₁))\n[PROOFSTEP]\nsimp [-neg_vsub_eq_vsub_rev]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ p₅ : P\nhp₁p₂ : p₁ ≠ p₂\nhp₃p₄ : p₃ ≠ p₄\nhc : Collinear ℝ {p₁, p₂, p₃, p₄}\nhr : SameRay ℝ (p₂ -ᵥ p₁) (p₄ -ᵥ p₃)\n⊢ Real.Angle.sign (∡ p₁ p₅ p₂) = Real.Angle.sign (∡ p₃ p₅ p₄)\n[PROOFSTEP]\nby_cases hc₅₁₂ : Collinear ℝ ({ p₅, p₁, p₂ } : Set P)\n[GOAL]\ncase pos\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ p₅ : P\nhp₁p₂ : p₁ ≠ p₂\nhp₃p₄ : p₃ ≠ p₄\nhc : Collinear ℝ {p₁, p₂, p₃, p₄}\nhr : SameRay ℝ (p₂ -ᵥ p₁) (p₄ -ᵥ p₃)\nhc₅₁₂ : Collinear ℝ {p₅, p₁, p₂}\n⊢ Real.Angle.sign (∡ p₁ p₅ p₂) = Real.Angle.sign (∡ p₃ p₅ p₄)\n[PROOFSTEP]\nhave hc₅₁₂₃₄ : Collinear ℝ ({ p₅, p₁, p₂, p₃, p₄ } : Set P) :=\n  (hc.collinear_insert_iff_of_ne (Set.mem_insert _ _) (Set.mem_insert_of_mem _ (Set.mem_insert _ _)) hp₁p₂).2 hc₅₁₂\n[GOAL]\ncase pos\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ p₅ : P\nhp₁p₂ : p₁ ≠ p₂\nhp₃p₄ : p₃ ≠ p₄\nhc : Collinear ℝ {p₁, p₂, p₃, p₄}\nhr : SameRay ℝ (p₂ -ᵥ p₁) (p₄ -ᵥ p₃)\nhc₅₁₂ : Collinear ℝ {p₅, p₁, p₂}\nhc₅₁₂₃₄ : Collinear ℝ {p₅, p₁, p₂, p₃, p₄}\n⊢ Real.Angle.sign (∡ p₁ p₅ p₂) = Real.Angle.sign (∡ p₃ p₅ p₄)\n[PROOFSTEP]\nhave hc₅₃₄ : Collinear ℝ ({ p₅, p₃, p₄ } : Set P) :=\n  (hc.collinear_insert_iff_of_ne (Set.mem_insert_of_mem _ (Set.mem_insert_of_mem _ (Set.mem_insert _ _)))\n        (Set.mem_insert_of_mem _ (Set.mem_insert_of_mem _ (Set.mem_insert_of_mem _ (Set.mem_singleton _)))) hp₃p₄).1\n    hc₅₁₂₃₄\n[GOAL]\ncase pos\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ p₅ : P\nhp₁p₂ : p₁ ≠ p₂\nhp₃p₄ : p₃ ≠ p₄\nhc : Collinear ℝ {p₁, p₂, p₃, p₄}\nhr : SameRay ℝ (p₂ -ᵥ p₁) (p₄ -ᵥ p₃)\nhc₅₁₂ : Collinear ℝ {p₅, p₁, p₂}\nhc₅₁₂₃₄ : Collinear ℝ {p₅, p₁, p₂, p₃, p₄}\nhc₅₃₄ : Collinear ℝ {p₅, p₃, p₄}\n⊢ Real.Angle.sign (∡ p₁ p₅ p₂) = Real.Angle.sign (∡ p₃ p₅ p₄)\n[PROOFSTEP]\nrw [Set.insert_comm] at hc₅₁₂ hc₅₃₄ \n[GOAL]\ncase pos\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ p₅ : P\nhp₁p₂ : p₁ ≠ p₂\nhp₃p₄ : p₃ ≠ p₄\nhc : Collinear ℝ {p₁, p₂, p₃, p₄}\nhr : SameRay ℝ (p₂ -ᵥ p₁) (p₄ -ᵥ p₃)\nhc₅₁₂ : Collinear ℝ {p₁, p₅, p₂}\nhc₅₁₂₃₄ : Collinear ℝ {p₅, p₁, p₂, p₃, p₄}\nhc₅₃₄ : Collinear ℝ {p₃, p₅, p₄}\n⊢ Real.Angle.sign (∡ p₁ p₅ p₂) = Real.Angle.sign (∡ p₃ p₅ p₄)\n[PROOFSTEP]\nhave hs₁₅₂ := oangle_eq_zero_or_eq_pi_iff_collinear.2 hc₅₁₂\n[GOAL]\ncase pos\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ p₅ : P\nhp₁p₂ : p₁ ≠ p₂\nhp₃p₄ : p₃ ≠ p₄\nhc : Collinear ℝ {p₁, p₂, p₃, p₄}\nhr : SameRay ℝ (p₂ -ᵥ p₁) (p₄ -ᵥ p₃)\nhc₅₁₂ : Collinear ℝ {p₁, p₅, p₂}\nhc₅₁₂₃₄ : Collinear ℝ {p₅, p₁, p₂, p₃, p₄}\nhc₅₃₄ : Collinear ℝ {p₃, p₅, p₄}\nhs₁₅₂ : ∡ p₁ p₅ p₂ = 0 ∨ ∡ p₁ p₅ p₂ = ↑π\n⊢ Real.Angle.sign (∡ p₁ p₅ p₂) = Real.Angle.sign (∡ p₃ p₅ p₄)\n[PROOFSTEP]\nhave hs₃₅₄ := oangle_eq_zero_or_eq_pi_iff_collinear.2 hc₅₃₄\n[GOAL]\ncase pos\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ p₅ : P\nhp₁p₂ : p₁ ≠ p₂\nhp₃p₄ : p₃ ≠ p₄\nhc : Collinear ℝ {p₁, p₂, p₃, p₄}\nhr : SameRay ℝ (p₂ -ᵥ p₁) (p₄ -ᵥ p₃)\nhc₅₁₂ : Collinear ℝ {p₁, p₅, p₂}\nhc₅₁₂₃₄ : Collinear ℝ {p₅, p₁, p₂, p₃, p₄}\nhc₅₃₄ : Collinear ℝ {p₃, p₅, p₄}\nhs₁₅₂ : ∡ p₁ p₅ p₂ = 0 ∨ ∡ p₁ p₅ p₂ = ↑π\nhs₃₅₄ : ∡ p₃ p₅ p₄ = 0 ∨ ∡ p₃ p₅ p₄ = ↑π\n⊢ Real.Angle.sign (∡ p₁ p₅ p₂) = Real.Angle.sign (∡ p₃ p₅ p₄)\n[PROOFSTEP]\nrw [← Real.Angle.sign_eq_zero_iff] at hs₁₅₂ hs₃₅₄ \n[GOAL]\ncase pos\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ p₅ : P\nhp₁p₂ : p₁ ≠ p₂\nhp₃p₄ : p₃ ≠ p₄\nhc : Collinear ℝ {p₁, p₂, p₃, p₄}\nhr : SameRay ℝ (p₂ -ᵥ p₁) (p₄ -ᵥ p₃)\nhc₅₁₂ : Collinear ℝ {p₁, p₅, p₂}\nhc₅₁₂₃₄ : Collinear ℝ {p₅, p₁, p₂, p₃, p₄}\nhc₅₃₄ : Collinear ℝ {p₃, p₅, p₄}\nhs₁₅₂ : Real.Angle.sign (∡ p₁ p₅ p₂) = 0\nhs₃₅₄ : Real.Angle.sign (∡ p₃ p₅ p₄) = 0\n⊢ Real.Angle.sign (∡ p₁ p₅ p₂) = Real.Angle.sign (∡ p₃ p₅ p₄)\n[PROOFSTEP]\nrw [hs₁₅₂, hs₃₅₄]\n[GOAL]\ncase neg\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ p₅ : P\nhp₁p₂ : p₁ ≠ p₂\nhp₃p₄ : p₃ ≠ p₄\nhc : Collinear ℝ {p₁, p₂, p₃, p₄}\nhr : SameRay ℝ (p₂ -ᵥ p₁) (p₄ -ᵥ p₃)\nhc₅₁₂ : ¬Collinear ℝ {p₅, p₁, p₂}\n⊢ Real.Angle.sign (∡ p₁ p₅ p₂) = Real.Angle.sign (∡ p₃ p₅ p₄)\n[PROOFSTEP]\nlet s : Set (P × P × P) :=\n  (fun x : line[ℝ, p₁, p₂] × V => (x.1, p₅, x.2 +ᵥ (x.1 : P))) '' Set.univ ×ˢ {v | SameRay ℝ (p₂ -ᵥ p₁) v ∧ v ≠ 0}\n[GOAL]\ncase neg\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ p₅ : P\nhp₁p₂ : p₁ ≠ p₂\nhp₃p₄ : p₃ ≠ p₄\nhc : Collinear ℝ {p₁, p₂, p₃, p₄}\nhr : SameRay ℝ (p₂ -ᵥ p₁) (p₄ -ᵥ p₃)\nhc₅₁₂ : ¬Collinear ℝ {p₅, p₁, p₂}\ns : Set (P × P × P) := (fun x => (↑x.fst, p₅, x.snd +ᵥ ↑x.fst)) '' Set.univ ×ˢ {v | SameRay ℝ (p₂ -ᵥ p₁) v ∧ v ≠ 0}\n⊢ Real.Angle.sign (∡ p₁ p₅ p₂) = Real.Angle.sign (∡ p₃ p₅ p₄)\n[PROOFSTEP]\nhave hco : IsConnected s :=\n  haveI : ConnectedSpace line[ℝ, p₁, p₂] := AddTorsor.connectedSpace _ _\n  (isConnected_univ.prod (isConnected_setOf_sameRay_and_ne_zero (vsub_ne_zero.2 hp₁p₂.symm))).image _\n    (continuous_fst.subtype_val.prod_mk\n        (continuous_const.prod_mk (continuous_snd.vadd continuous_fst.subtype_val))).continuousOn\n[GOAL]\ncase neg\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ p₅ : P\nhp₁p₂ : p₁ ≠ p₂\nhp₃p₄ : p₃ ≠ p₄\nhc : Collinear ℝ {p₁, p₂, p₃, p₄}\nhr : SameRay ℝ (p₂ -ᵥ p₁) (p₄ -ᵥ p₃)\nhc₅₁₂ : ¬Collinear ℝ {p₅, p₁, p₂}\ns : Set (P × P × P) := (fun x => (↑x.fst, p₅, x.snd +ᵥ ↑x.fst)) '' Set.univ ×ˢ {v | SameRay ℝ (p₂ -ᵥ p₁) v ∧ v ≠ 0}\nhco : IsConnected s\n⊢ Real.Angle.sign (∡ p₁ p₅ p₂) = Real.Angle.sign (∡ p₃ p₅ p₄)\n[PROOFSTEP]\nhave hf : ContinuousOn (fun p : P × P × P => ∡ p.1 p.2.1 p.2.2) s :=\n  by\n  refine' ContinuousAt.continuousOn fun p hp => continuousAt_oangle _ _\n  all_goals\n    simp_rw [Set.mem_image, Set.mem_prod, Set.mem_univ, true_and_iff, Prod.ext_iff] at hp \n    obtain ⟨q₁, q₅, q₂⟩ := p\n    dsimp only at hp ⊢\n    obtain ⟨⟨⟨q, hq⟩, v⟩, hv, rfl, rfl, rfl⟩ := hp\n    dsimp only [Subtype.coe_mk, Set.mem_setOf] at hv ⊢\n    obtain ⟨hvr, -⟩ := hv\n    rintro rfl\n    refine' hc₅₁₂ ((collinear_insert_iff_of_mem_affineSpan _).2 (collinear_pair _ _ _))\n  · exact hq\n  · refine' vadd_mem_of_mem_direction _ hq\n    rw [← exists_nonneg_left_iff_sameRay (vsub_ne_zero.2 hp₁p₂.symm)] at hvr \n    obtain ⟨r, -, rfl⟩ := hvr\n    rw [direction_affineSpan]\n    exact smul_vsub_rev_mem_vectorSpan_pair _ _ _\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ p₅ : P\nhp₁p₂ : p₁ ≠ p₂\nhp₃p₄ : p₃ ≠ p₄\nhc : Collinear ℝ {p₁, p₂, p₃, p₄}\nhr : SameRay ℝ (p₂ -ᵥ p₁) (p₄ -ᵥ p₃)\nhc₅₁₂ : ¬Collinear ℝ {p₅, p₁, p₂}\ns : Set (P × P × P) := (fun x => (↑x.fst, p₅, x.snd +ᵥ ↑x.fst)) '' Set.univ ×ˢ {v | SameRay ℝ (p₂ -ᵥ p₁) v ∧ v ≠ 0}\nhco : IsConnected s\n⊢ ContinuousOn (fun p => ∡ p.fst p.snd.fst p.snd.snd) s\n[PROOFSTEP]\nrefine' ContinuousAt.continuousOn fun p hp => continuousAt_oangle _ _\n[GOAL]\ncase refine'_1\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ p₅ : P\nhp₁p₂ : p₁ ≠ p₂\nhp₃p₄ : p₃ ≠ p₄\nhc : Collinear ℝ {p₁, p₂, p₃, p₄}\nhr : SameRay ℝ (p₂ -ᵥ p₁) (p₄ -ᵥ p₃)\nhc₅₁₂ : ¬Collinear ℝ {p₅, p₁, p₂}\ns : Set (P × P × P) := (fun x => (↑x.fst, p₅, x.snd +ᵥ ↑x.fst)) '' Set.univ ×ˢ {v | SameRay ℝ (p₂ -ᵥ p₁) v ∧ v ≠ 0}\nhco : IsConnected s\np : P × P × P\nhp : p ∈ s\n⊢ p.fst ≠ p.snd.fst\ncase refine'_2\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ p₅ : P\nhp₁p₂ : p₁ ≠ p₂\nhp₃p₄ : p₃ ≠ p₄\nhc : Collinear ℝ {p₁, p₂, p₃, p₄}\nhr : SameRay ℝ (p₂ -ᵥ p₁) (p₄ -ᵥ p₃)\nhc₅₁₂ : ¬Collinear ℝ {p₅, p₁, p₂}\ns : Set (P × P × P) := (fun x => (↑x.fst, p₅, x.snd +ᵥ ↑x.fst)) '' Set.univ ×ˢ {v | SameRay ℝ (p₂ -ᵥ p₁) v ∧ v ≠ 0}\nhco : IsConnected s\np : P × P × P\nhp : p ∈ s\n⊢ p.snd.snd ≠ p.snd.fst\n[PROOFSTEP]\nall_goals\n  simp_rw [Set.mem_image, Set.mem_prod, Set.mem_univ, true_and_iff, Prod.ext_iff] at hp \n  obtain ⟨q₁, q₅, q₂⟩ := p\n  dsimp only at hp ⊢\n  obtain ⟨⟨⟨q, hq⟩, v⟩, hv, rfl, rfl, rfl⟩ := hp\n  dsimp only [Subtype.coe_mk, Set.mem_setOf] at hv ⊢\n  obtain ⟨hvr, -⟩ := hv\n  rintro rfl\n  refine' hc₅₁₂ ((collinear_insert_iff_of_mem_affineSpan _).2 (collinear_pair _ _ _))\n[GOAL]\ncase refine'_1\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ p₅ : P\nhp₁p₂ : p₁ ≠ p₂\nhp₃p₄ : p₃ ≠ p₄\nhc : Collinear ℝ {p₁, p₂, p₃, p₄}\nhr : SameRay ℝ (p₂ -ᵥ p₁) (p₄ -ᵥ p₃)\nhc₅₁₂ : ¬Collinear ℝ {p₅, p₁, p₂}\ns : Set (P × P × P) := (fun x => (↑x.fst, p₅, x.snd +ᵥ ↑x.fst)) '' Set.univ ×ˢ {v | SameRay ℝ (p₂ -ᵥ p₁) v ∧ v ≠ 0}\nhco : IsConnected s\np : P × P × P\nhp : p ∈ s\n⊢ p.fst ≠ p.snd.fst\n[PROOFSTEP]\nsimp_rw [Set.mem_image, Set.mem_prod, Set.mem_univ, true_and_iff, Prod.ext_iff] at hp \n[GOAL]\ncase refine'_1\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ p₅ : P\nhp₁p₂ : p₁ ≠ p₂\nhp₃p₄ : p₃ ≠ p₄\nhc : Collinear ℝ {p₁, p₂, p₃, p₄}\nhr : SameRay ℝ (p₂ -ᵥ p₁) (p₄ -ᵥ p₃)\nhc₅₁₂ : ¬Collinear ℝ {p₅, p₁, p₂}\ns : Set (P × P × P) := (fun x => (↑x.fst, p₅, x.snd +ᵥ ↑x.fst)) '' Set.univ ×ˢ {v | SameRay ℝ (p₂ -ᵥ p₁) v ∧ v ≠ 0}\nhco : IsConnected s\np : P × P × P\nhp : ∃ x, x.snd ∈ {v | SameRay ℝ (p₂ -ᵥ p₁) v ∧ v ≠ 0} ∧ ↑x.fst = p.fst ∧ p₅ = p.snd.fst ∧ x.snd +ᵥ ↑x.fst = p.snd.snd\n⊢ p.fst ≠ p.snd.fst\n[PROOFSTEP]\nobtain ⟨q₁, q₅, q₂⟩ := p\n[GOAL]\ncase refine'_1.mk.mk\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ p₅ : P\nhp₁p₂ : p₁ ≠ p₂\nhp₃p₄ : p₃ ≠ p₄\nhc : Collinear ℝ {p₁, p₂, p₃, p₄}\nhr : SameRay ℝ (p₂ -ᵥ p₁) (p₄ -ᵥ p₃)\nhc₅₁₂ : ¬Collinear ℝ {p₅, p₁, p₂}\ns : Set (P × P × P) := (fun x => (↑x.fst, p₅, x.snd +ᵥ ↑x.fst)) '' Set.univ ×ˢ {v | SameRay ℝ (p₂ -ᵥ p₁) v ∧ v ≠ 0}\nhco : IsConnected s\nq₁ q₅ q₂ : P\nhp :\n  ∃ x,\n    x.snd ∈ {v | SameRay ℝ (p₂ -ᵥ p₁) v ∧ v ≠ 0} ∧\n      ↑x.fst = (q₁, q₅, q₂).fst ∧ p₅ = (q₁, q₅, q₂).snd.fst ∧ x.snd +ᵥ ↑x.fst = (q₁, q₅, q₂).snd.snd\n⊢ (q₁, q₅, q₂).fst ≠ (q₁, q₅, q₂).snd.fst\n[PROOFSTEP]\ndsimp only at hp ⊢\n[GOAL]\ncase refine'_1.mk.mk\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ p₅ : P\nhp₁p₂ : p₁ ≠ p₂\nhp₃p₄ : p₃ ≠ p₄\nhc : Collinear ℝ {p₁, p₂, p₃, p₄}\nhr : SameRay ℝ (p₂ -ᵥ p₁) (p₄ -ᵥ p₃)\nhc₅₁₂ : ¬Collinear ℝ {p₅, p₁, p₂}\ns : Set (P × P × P) := (fun x => (↑x.fst, p₅, x.snd +ᵥ ↑x.fst)) '' Set.univ ×ˢ {v | SameRay ℝ (p₂ -ᵥ p₁) v ∧ v ≠ 0}\nhco : IsConnected s\nq₁ q₅ q₂ : P\nhp : ∃ x, x.snd ∈ {v | SameRay ℝ (p₂ -ᵥ p₁) v ∧ v ≠ 0} ∧ ↑x.fst = q₁ ∧ p₅ = q₅ ∧ x.snd +ᵥ ↑x.fst = q₂\n⊢ q₁ ≠ q₅\n[PROOFSTEP]\nobtain ⟨⟨⟨q, hq⟩, v⟩, hv, rfl, rfl, rfl⟩ := hp\n[GOAL]\ncase refine'_1.mk.mk.intro.mk.mk.intro.intro.intro\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ p₅ : P\nhp₁p₂ : p₁ ≠ p₂\nhp₃p₄ : p₃ ≠ p₄\nhc : Collinear ℝ {p₁, p₂, p₃, p₄}\nhr : SameRay ℝ (p₂ -ᵥ p₁) (p₄ -ᵥ p₃)\nhc₅₁₂ : ¬Collinear ℝ {p₅, p₁, p₂}\ns : Set (P × P × P) := (fun x => (↑x.fst, p₅, x.snd +ᵥ ↑x.fst)) '' Set.univ ×ˢ {v | SameRay ℝ (p₂ -ᵥ p₁) v ∧ v ≠ 0}\nhco : IsConnected s\nv : V\nq : P\nhq : q ∈ affineSpan ℝ {p₁, p₂}\nhv : ({ val := q, property := hq }, v).snd ∈ {v | SameRay ℝ (p₂ -ᵥ p₁) v ∧ v ≠ 0}\n⊢ ↑({ val := q, property := hq }, v).fst ≠ p₅\n[PROOFSTEP]\ndsimp only [Subtype.coe_mk, Set.mem_setOf] at hv ⊢\n[GOAL]\ncase refine'_1.mk.mk.intro.mk.mk.intro.intro.intro\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ p₅ : P\nhp₁p₂ : p₁ ≠ p₂\nhp₃p₄ : p₃ ≠ p₄\nhc : Collinear ℝ {p₁, p₂, p₃, p₄}\nhr : SameRay ℝ (p₂ -ᵥ p₁) (p₄ -ᵥ p₃)\nhc₅₁₂ : ¬Collinear ℝ {p₅, p₁, p₂}\ns : Set (P × P × P) := (fun x => (↑x.fst, p₅, x.snd +ᵥ ↑x.fst)) '' Set.univ ×ˢ {v | SameRay ℝ (p₂ -ᵥ p₁) v ∧ v ≠ 0}\nhco : IsConnected s\nv : V\nq : P\nhq : q ∈ affineSpan ℝ {p₁, p₂}\nhv : v ∈ {v | SameRay ℝ (p₂ -ᵥ p₁) v ∧ v ≠ 0}\n⊢ q ≠ p₅\n[PROOFSTEP]\nobtain ⟨hvr, -⟩ := hv\n[GOAL]\ncase refine'_1.mk.mk.intro.mk.mk.intro.intro.intro.intro\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ p₅ : P\nhp₁p₂ : p₁ ≠ p₂\nhp₃p₄ : p₃ ≠ p₄\nhc : Collinear ℝ {p₁, p₂, p₃, p₄}\nhr : SameRay ℝ (p₂ -ᵥ p₁) (p₄ -ᵥ p₃)\nhc₅₁₂ : ¬Collinear ℝ {p₅, p₁, p₂}\ns : Set (P × P × P) := (fun x => (↑x.fst, p₅, x.snd +ᵥ ↑x.fst)) '' Set.univ ×ˢ {v | SameRay ℝ (p₂ -ᵥ p₁) v ∧ v ≠ 0}\nhco : IsConnected s\nv : V\nq : P\nhq : q ∈ affineSpan ℝ {p₁, p₂}\nhvr : SameRay ℝ (p₂ -ᵥ p₁) v\n⊢ q ≠ p₅\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase refine'_1.mk.mk.intro.mk.mk.intro.intro.intro.intro\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ : P\nhp₁p₂ : p₁ ≠ p₂\nhp₃p₄ : p₃ ≠ p₄\nhc : Collinear ℝ {p₁, p₂, p₃, p₄}\nhr : SameRay ℝ (p₂ -ᵥ p₁) (p₄ -ᵥ p₃)\nv : V\nq : P\nhq : q ∈ affineSpan ℝ {p₁, p₂}\nhvr : SameRay ℝ (p₂ -ᵥ p₁) v\nhc₅₁₂ : ¬Collinear ℝ {q, p₁, p₂}\ns : Set (P × P × P) := (fun x => (↑x.fst, q, x.snd +ᵥ ↑x.fst)) '' Set.univ ×ˢ {v | SameRay ℝ (p₂ -ᵥ p₁) v ∧ v ≠ 0}\nhco : IsConnected s\n⊢ False\n[PROOFSTEP]\nrefine' hc₅₁₂ ((collinear_insert_iff_of_mem_affineSpan _).2 (collinear_pair _ _ _))\n[GOAL]\ncase refine'_2\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ p₅ : P\nhp₁p₂ : p₁ ≠ p₂\nhp₃p₄ : p₃ ≠ p₄\nhc : Collinear ℝ {p₁, p₂, p₃, p₄}\nhr : SameRay ℝ (p₂ -ᵥ p₁) (p₄ -ᵥ p₃)\nhc₅₁₂ : ¬Collinear ℝ {p₅, p₁, p₂}\ns : Set (P × P × P) := (fun x => (↑x.fst, p₅, x.snd +ᵥ ↑x.fst)) '' Set.univ ×ˢ {v | SameRay ℝ (p₂ -ᵥ p₁) v ∧ v ≠ 0}\nhco : IsConnected s\np : P × P × P\nhp : p ∈ s\n⊢ p.snd.snd ≠ p.snd.fst\n[PROOFSTEP]\nsimp_rw [Set.mem_image, Set.mem_prod, Set.mem_univ, true_and_iff, Prod.ext_iff] at hp \n[GOAL]\ncase refine'_2\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ p₅ : P\nhp₁p₂ : p₁ ≠ p₂\nhp₃p₄ : p₃ ≠ p₄\nhc : Collinear ℝ {p₁, p₂, p₃, p₄}\nhr : SameRay ℝ (p₂ -ᵥ p₁) (p₄ -ᵥ p₃)\nhc₅₁₂ : ¬Collinear ℝ {p₅, p₁, p₂}\ns : Set (P × P × P) := (fun x => (↑x.fst, p₅, x.snd +ᵥ ↑x.fst)) '' Set.univ ×ˢ {v | SameRay ℝ (p₂ -ᵥ p₁) v ∧ v ≠ 0}\nhco : IsConnected s\np : P × P × P\nhp : ∃ x, x.snd ∈ {v | SameRay ℝ (p₂ -ᵥ p₁) v ∧ v ≠ 0} ∧ ↑x.fst = p.fst ∧ p₅ = p.snd.fst ∧ x.snd +ᵥ ↑x.fst = p.snd.snd\n⊢ p.snd.snd ≠ p.snd.fst\n[PROOFSTEP]\nobtain ⟨q₁, q₅, q₂⟩ := p\n[GOAL]\ncase refine'_2.mk.mk\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ p₅ : P\nhp₁p₂ : p₁ ≠ p₂\nhp₃p₄ : p₃ ≠ p₄\nhc : Collinear ℝ {p₁, p₂, p₃, p₄}\nhr : SameRay ℝ (p₂ -ᵥ p₁) (p₄ -ᵥ p₃)\nhc₅₁₂ : ¬Collinear ℝ {p₅, p₁, p₂}\ns : Set (P × P × P) := (fun x => (↑x.fst, p₅, x.snd +ᵥ ↑x.fst)) '' Set.univ ×ˢ {v | SameRay ℝ (p₂ -ᵥ p₁) v ∧ v ≠ 0}\nhco : IsConnected s\nq₁ q₅ q₂ : P\nhp :\n  ∃ x,\n    x.snd ∈ {v | SameRay ℝ (p₂ -ᵥ p₁) v ∧ v ≠ 0} ∧\n      ↑x.fst = (q₁, q₅, q₂).fst ∧ p₅ = (q₁, q₅, q₂).snd.fst ∧ x.snd +ᵥ ↑x.fst = (q₁, q₅, q₂).snd.snd\n⊢ (q₁, q₅, q₂).snd.snd ≠ (q₁, q₅, q₂).snd.fst\n[PROOFSTEP]\ndsimp only at hp ⊢\n[GOAL]\ncase refine'_2.mk.mk\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ p₅ : P\nhp₁p₂ : p₁ ≠ p₂\nhp₃p₄ : p₃ ≠ p₄\nhc : Collinear ℝ {p₁, p₂, p₃, p₄}\nhr : SameRay ℝ (p₂ -ᵥ p₁) (p₄ -ᵥ p₃)\nhc₅₁₂ : ¬Collinear ℝ {p₅, p₁, p₂}\ns : Set (P × P × P) := (fun x => (↑x.fst, p₅, x.snd +ᵥ ↑x.fst)) '' Set.univ ×ˢ {v | SameRay ℝ (p₂ -ᵥ p₁) v ∧ v ≠ 0}\nhco : IsConnected s\nq₁ q₅ q₂ : P\nhp : ∃ x, x.snd ∈ {v | SameRay ℝ (p₂ -ᵥ p₁) v ∧ v ≠ 0} ∧ ↑x.fst = q₁ ∧ p₅ = q₅ ∧ x.snd +ᵥ ↑x.fst = q₂\n⊢ q₂ ≠ q₅\n[PROOFSTEP]\nobtain ⟨⟨⟨q, hq⟩, v⟩, hv, rfl, rfl, rfl⟩ := hp\n[GOAL]\ncase refine'_2.mk.mk.intro.mk.mk.intro.intro.intro\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ p₅ : P\nhp₁p₂ : p₁ ≠ p₂\nhp₃p₄ : p₃ ≠ p₄\nhc : Collinear ℝ {p₁, p₂, p₃, p₄}\nhr : SameRay ℝ (p₂ -ᵥ p₁) (p₄ -ᵥ p₃)\nhc₅₁₂ : ¬Collinear ℝ {p₅, p₁, p₂}\ns : Set (P × P × P) := (fun x => (↑x.fst, p₅, x.snd +ᵥ ↑x.fst)) '' Set.univ ×ˢ {v | SameRay ℝ (p₂ -ᵥ p₁) v ∧ v ≠ 0}\nhco : IsConnected s\nv : V\nq : P\nhq : q ∈ affineSpan ℝ {p₁, p₂}\nhv : ({ val := q, property := hq }, v).snd ∈ {v | SameRay ℝ (p₂ -ᵥ p₁) v ∧ v ≠ 0}\n⊢ ({ val := q, property := hq }, v).snd +ᵥ ↑({ val := q, property := hq }, v).fst ≠ p₅\n[PROOFSTEP]\ndsimp only [Subtype.coe_mk, Set.mem_setOf] at hv ⊢\n[GOAL]\ncase refine'_2.mk.mk.intro.mk.mk.intro.intro.intro\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ p₅ : P\nhp₁p₂ : p₁ ≠ p₂\nhp₃p₄ : p₃ ≠ p₄\nhc : Collinear ℝ {p₁, p₂, p₃, p₄}\nhr : SameRay ℝ (p₂ -ᵥ p₁) (p₄ -ᵥ p₃)\nhc₅₁₂ : ¬Collinear ℝ {p₅, p₁, p₂}\ns : Set (P × P × P) := (fun x => (↑x.fst, p₅, x.snd +ᵥ ↑x.fst)) '' Set.univ ×ˢ {v | SameRay ℝ (p₂ -ᵥ p₁) v ∧ v ≠ 0}\nhco : IsConnected s\nv : V\nq : P\nhq : q ∈ affineSpan ℝ {p₁, p₂}\nhv : v ∈ {v | SameRay ℝ (p₂ -ᵥ p₁) v ∧ v ≠ 0}\n⊢ v +ᵥ q ≠ p₅\n[PROOFSTEP]\nobtain ⟨hvr, -⟩ := hv\n[GOAL]\ncase refine'_2.mk.mk.intro.mk.mk.intro.intro.intro.intro\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ p₅ : P\nhp₁p₂ : p₁ ≠ p₂\nhp₃p₄ : p₃ ≠ p₄\nhc : Collinear ℝ {p₁, p₂, p₃, p₄}\nhr : SameRay ℝ (p₂ -ᵥ p₁) (p₄ -ᵥ p₃)\nhc₅₁₂ : ¬Collinear ℝ {p₅, p₁, p₂}\ns : Set (P × P × P) := (fun x => (↑x.fst, p₅, x.snd +ᵥ ↑x.fst)) '' Set.univ ×ˢ {v | SameRay ℝ (p₂ -ᵥ p₁) v ∧ v ≠ 0}\nhco : IsConnected s\nv : V\nq : P\nhq : q ∈ affineSpan ℝ {p₁, p₂}\nhvr : SameRay ℝ (p₂ -ᵥ p₁) v\n⊢ v +ᵥ q ≠ p₅\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase refine'_2.mk.mk.intro.mk.mk.intro.intro.intro.intro\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ : P\nhp₁p₂ : p₁ ≠ p₂\nhp₃p₄ : p₃ ≠ p₄\nhc : Collinear ℝ {p₁, p₂, p₃, p₄}\nhr : SameRay ℝ (p₂ -ᵥ p₁) (p₄ -ᵥ p₃)\nv : V\nq : P\nhq : q ∈ affineSpan ℝ {p₁, p₂}\nhvr : SameRay ℝ (p₂ -ᵥ p₁) v\nhc₅₁₂ : ¬Collinear ℝ {v +ᵥ q, p₁, p₂}\ns : Set (P × P × P) := (fun x => (↑x.fst, v +ᵥ q, x.snd +ᵥ ↑x.fst)) '' Set.univ ×ˢ {v | SameRay ℝ (p₂ -ᵥ p₁) v ∧ v ≠ 0}\nhco : IsConnected s\n⊢ False\n[PROOFSTEP]\nrefine' hc₅₁₂ ((collinear_insert_iff_of_mem_affineSpan _).2 (collinear_pair _ _ _))\n[GOAL]\ncase refine'_1.mk.mk.intro.mk.mk.intro.intro.intro.intro\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ : P\nhp₁p₂ : p₁ ≠ p₂\nhp₃p₄ : p₃ ≠ p₄\nhc : Collinear ℝ {p₁, p₂, p₃, p₄}\nhr : SameRay ℝ (p₂ -ᵥ p₁) (p₄ -ᵥ p₃)\nv : V\nq : P\nhq : q ∈ affineSpan ℝ {p₁, p₂}\nhvr : SameRay ℝ (p₂ -ᵥ p₁) v\nhc₅₁₂ : ¬Collinear ℝ {q, p₁, p₂}\ns : Set (P × P × P) := (fun x => (↑x.fst, q, x.snd +ᵥ ↑x.fst)) '' Set.univ ×ˢ {v | SameRay ℝ (p₂ -ᵥ p₁) v ∧ v ≠ 0}\nhco : IsConnected s\n⊢ q ∈ affineSpan ℝ {p₁, p₂}\n[PROOFSTEP]\nexact hq\n[GOAL]\ncase refine'_2.mk.mk.intro.mk.mk.intro.intro.intro.intro\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ : P\nhp₁p₂ : p₁ ≠ p₂\nhp₃p₄ : p₃ ≠ p₄\nhc : Collinear ℝ {p₁, p₂, p₃, p₄}\nhr : SameRay ℝ (p₂ -ᵥ p₁) (p₄ -ᵥ p₃)\nv : V\nq : P\nhq : q ∈ affineSpan ℝ {p₁, p₂}\nhvr : SameRay ℝ (p₂ -ᵥ p₁) v\nhc₅₁₂ : ¬Collinear ℝ {v +ᵥ q, p₁, p₂}\ns : Set (P × P × P) := (fun x => (↑x.fst, v +ᵥ q, x.snd +ᵥ ↑x.fst)) '' Set.univ ×ˢ {v | SameRay ℝ (p₂ -ᵥ p₁) v ∧ v ≠ 0}\nhco : IsConnected s\n⊢ v +ᵥ q ∈ affineSpan ℝ {p₁, p₂}\n[PROOFSTEP]\nrefine' vadd_mem_of_mem_direction _ hq\n[GOAL]\ncase refine'_2.mk.mk.intro.mk.mk.intro.intro.intro.intro\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ : P\nhp₁p₂ : p₁ ≠ p₂\nhp₃p₄ : p₃ ≠ p₄\nhc : Collinear ℝ {p₁, p₂, p₃, p₄}\nhr : SameRay ℝ (p₂ -ᵥ p₁) (p₄ -ᵥ p₃)\nv : V\nq : P\nhq : q ∈ affineSpan ℝ {p₁, p₂}\nhvr : SameRay ℝ (p₂ -ᵥ p₁) v\nhc₅₁₂ : ¬Collinear ℝ {v +ᵥ q, p₁, p₂}\ns : Set (P × P × P) := (fun x => (↑x.fst, v +ᵥ q, x.snd +ᵥ ↑x.fst)) '' Set.univ ×ˢ {v | SameRay ℝ (p₂ -ᵥ p₁) v ∧ v ≠ 0}\nhco : IsConnected s\n⊢ v ∈ direction (affineSpan ℝ {p₁, p₂})\n[PROOFSTEP]\nrw [← exists_nonneg_left_iff_sameRay (vsub_ne_zero.2 hp₁p₂.symm)] at hvr \n[GOAL]\ncase refine'_2.mk.mk.intro.mk.mk.intro.intro.intro.intro\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ : P\nhp₁p₂ : p₁ ≠ p₂\nhp₃p₄ : p₃ ≠ p₄\nhc : Collinear ℝ {p₁, p₂, p₃, p₄}\nhr : SameRay ℝ (p₂ -ᵥ p₁) (p₄ -ᵥ p₃)\nv : V\nq : P\nhq : q ∈ affineSpan ℝ {p₁, p₂}\nhvr : ∃ r, 0 ≤ r ∧ r • (p₂ -ᵥ p₁) = v\nhc₅₁₂ : ¬Collinear ℝ {v +ᵥ q, p₁, p₂}\ns : Set (P × P × P) := (fun x => (↑x.fst, v +ᵥ q, x.snd +ᵥ ↑x.fst)) '' Set.univ ×ˢ {v | SameRay ℝ (p₂ -ᵥ p₁) v ∧ v ≠ 0}\nhco : IsConnected s\n⊢ v ∈ direction (affineSpan ℝ {p₁, p₂})\n[PROOFSTEP]\nobtain ⟨r, -, rfl⟩ := hvr\n[GOAL]\ncase refine'_2.mk.mk.intro.mk.mk.intro.intro.intro.intro.intro.intro\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ : P\nhp₁p₂ : p₁ ≠ p₂\nhp₃p₄ : p₃ ≠ p₄\nhc : Collinear ℝ {p₁, p₂, p₃, p₄}\nhr : SameRay ℝ (p₂ -ᵥ p₁) (p₄ -ᵥ p₃)\nq : P\nhq : q ∈ affineSpan ℝ {p₁, p₂}\nr : ℝ\nhc₅₁₂ : ¬Collinear ℝ {r • (p₂ -ᵥ p₁) +ᵥ q, p₁, p₂}\ns : Set (P × P × P) :=\n  (fun x => (↑x.fst, r • (p₂ -ᵥ p₁) +ᵥ q, x.snd +ᵥ ↑x.fst)) '' Set.univ ×ˢ {v | SameRay ℝ (p₂ -ᵥ p₁) v ∧ v ≠ 0}\nhco : IsConnected s\n⊢ r • (p₂ -ᵥ p₁) ∈ direction (affineSpan ℝ {p₁, p₂})\n[PROOFSTEP]\nrw [direction_affineSpan]\n[GOAL]\ncase refine'_2.mk.mk.intro.mk.mk.intro.intro.intro.intro.intro.intro\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ : P\nhp₁p₂ : p₁ ≠ p₂\nhp₃p₄ : p₃ ≠ p₄\nhc : Collinear ℝ {p₁, p₂, p₃, p₄}\nhr : SameRay ℝ (p₂ -ᵥ p₁) (p₄ -ᵥ p₃)\nq : P\nhq : q ∈ affineSpan ℝ {p₁, p₂}\nr : ℝ\nhc₅₁₂ : ¬Collinear ℝ {r • (p₂ -ᵥ p₁) +ᵥ q, p₁, p₂}\ns : Set (P × P × P) :=\n  (fun x => (↑x.fst, r • (p₂ -ᵥ p₁) +ᵥ q, x.snd +ᵥ ↑x.fst)) '' Set.univ ×ˢ {v | SameRay ℝ (p₂ -ᵥ p₁) v ∧ v ≠ 0}\nhco : IsConnected s\n⊢ r • (p₂ -ᵥ p₁) ∈ vectorSpan ℝ {p₁, p₂}\n[PROOFSTEP]\nexact smul_vsub_rev_mem_vectorSpan_pair _ _ _\n[GOAL]\ncase neg\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ p₅ : P\nhp₁p₂ : p₁ ≠ p₂\nhp₃p₄ : p₃ ≠ p₄\nhc : Collinear ℝ {p₁, p₂, p₃, p₄}\nhr : SameRay ℝ (p₂ -ᵥ p₁) (p₄ -ᵥ p₃)\nhc₅₁₂ : ¬Collinear ℝ {p₅, p₁, p₂}\ns : Set (P × P × P) := (fun x => (↑x.fst, p₅, x.snd +ᵥ ↑x.fst)) '' Set.univ ×ˢ {v | SameRay ℝ (p₂ -ᵥ p₁) v ∧ v ≠ 0}\nhco : IsConnected s\nhf : ContinuousOn (fun p => ∡ p.fst p.snd.fst p.snd.snd) s\n⊢ Real.Angle.sign (∡ p₁ p₅ p₂) = Real.Angle.sign (∡ p₃ p₅ p₄)\n[PROOFSTEP]\nhave hsp : ∀ p : P × P × P, p ∈ s → ∡ p.1 p.2.1 p.2.2 ≠ 0 ∧ ∡ p.1 p.2.1 p.2.2 ≠ π :=\n  by\n  intro p hp\n  simp_rw [Set.mem_image, Set.mem_prod, Set.mem_setOf, Set.mem_univ, true_and_iff, Prod.ext_iff] at hp \n  obtain ⟨q₁, q₅, q₂⟩ := p\n  dsimp only at hp ⊢\n  obtain ⟨⟨⟨q, hq⟩, v⟩, hv, rfl, rfl, rfl⟩ := hp\n  dsimp only [Subtype.coe_mk, Set.mem_setOf] at hv ⊢\n  obtain ⟨hvr, hv0⟩ := hv\n  rw [← exists_nonneg_left_iff_sameRay (vsub_ne_zero.2 hp₁p₂.symm)] at hvr \n  obtain ⟨r, -, rfl⟩ := hvr\n  change q ∈ line[ℝ, p₁, p₂] at hq \n  rw [oangle_ne_zero_and_ne_pi_iff_affineIndependent]\n  refine'\n    affineIndependent_of_ne_of_mem_of_not_mem_of_mem _ hq\n      (fun h => hc₅₁₂ ((collinear_insert_iff_of_mem_affineSpan h).2 (collinear_pair _ _ _))) _\n  · rwa [← @vsub_ne_zero V, vsub_vadd_eq_vsub_sub, vsub_self, zero_sub, neg_ne_zero]\n  · refine' vadd_mem_of_mem_direction _ hq\n    rw [direction_affineSpan]\n    exact smul_vsub_rev_mem_vectorSpan_pair _ _ _\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ p₅ : P\nhp₁p₂ : p₁ ≠ p₂\nhp₃p₄ : p₃ ≠ p₄\nhc : Collinear ℝ {p₁, p₂, p₃, p₄}\nhr : SameRay ℝ (p₂ -ᵥ p₁) (p₄ -ᵥ p₃)\nhc₅₁₂ : ¬Collinear ℝ {p₅, p₁, p₂}\ns : Set (P × P × P) := (fun x => (↑x.fst, p₅, x.snd +ᵥ ↑x.fst)) '' Set.univ ×ˢ {v | SameRay ℝ (p₂ -ᵥ p₁) v ∧ v ≠ 0}\nhco : IsConnected s\nhf : ContinuousOn (fun p => ∡ p.fst p.snd.fst p.snd.snd) s\n⊢ ∀ (p : P × P × P), p ∈ s → ∡ p.fst p.snd.fst p.snd.snd ≠ 0 ∧ ∡ p.fst p.snd.fst p.snd.snd ≠ ↑π\n[PROOFSTEP]\nintro p hp\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ p₅ : P\nhp₁p₂ : p₁ ≠ p₂\nhp₃p₄ : p₃ ≠ p₄\nhc : Collinear ℝ {p₁, p₂, p₃, p₄}\nhr : SameRay ℝ (p₂ -ᵥ p₁) (p₄ -ᵥ p₃)\nhc₅₁₂ : ¬Collinear ℝ {p₅, p₁, p₂}\ns : Set (P × P × P) := (fun x => (↑x.fst, p₅, x.snd +ᵥ ↑x.fst)) '' Set.univ ×ˢ {v | SameRay ℝ (p₂ -ᵥ p₁) v ∧ v ≠ 0}\nhco : IsConnected s\nhf : ContinuousOn (fun p => ∡ p.fst p.snd.fst p.snd.snd) s\np : P × P × P\nhp : p ∈ s\n⊢ ∡ p.fst p.snd.fst p.snd.snd ≠ 0 ∧ ∡ p.fst p.snd.fst p.snd.snd ≠ ↑π\n[PROOFSTEP]\nsimp_rw [Set.mem_image, Set.mem_prod, Set.mem_setOf, Set.mem_univ, true_and_iff, Prod.ext_iff] at hp \n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ p₅ : P\nhp₁p₂ : p₁ ≠ p₂\nhp₃p₄ : p₃ ≠ p₄\nhc : Collinear ℝ {p₁, p₂, p₃, p₄}\nhr : SameRay ℝ (p₂ -ᵥ p₁) (p₄ -ᵥ p₃)\nhc₅₁₂ : ¬Collinear ℝ {p₅, p₁, p₂}\ns : Set (P × P × P) := (fun x => (↑x.fst, p₅, x.snd +ᵥ ↑x.fst)) '' Set.univ ×ˢ {v | SameRay ℝ (p₂ -ᵥ p₁) v ∧ v ≠ 0}\nhco : IsConnected s\nhf : ContinuousOn (fun p => ∡ p.fst p.snd.fst p.snd.snd) s\np : P × P × P\nhp : ∃ x, (SameRay ℝ (p₂ -ᵥ p₁) x.snd ∧ x.snd ≠ 0) ∧ ↑x.fst = p.fst ∧ p₅ = p.snd.fst ∧ x.snd +ᵥ ↑x.fst = p.snd.snd\n⊢ ∡ p.fst p.snd.fst p.snd.snd ≠ 0 ∧ ∡ p.fst p.snd.fst p.snd.snd ≠ ↑π\n[PROOFSTEP]\nobtain ⟨q₁, q₅, q₂⟩ := p\n[GOAL]\ncase mk.mk\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ p₅ : P\nhp₁p₂ : p₁ ≠ p₂\nhp₃p₄ : p₃ ≠ p₄\nhc : Collinear ℝ {p₁, p₂, p₃, p₄}\nhr : SameRay ℝ (p₂ -ᵥ p₁) (p₄ -ᵥ p₃)\nhc₅₁₂ : ¬Collinear ℝ {p₅, p₁, p₂}\ns : Set (P × P × P) := (fun x => (↑x.fst, p₅, x.snd +ᵥ ↑x.fst)) '' Set.univ ×ˢ {v | SameRay ℝ (p₂ -ᵥ p₁) v ∧ v ≠ 0}\nhco : IsConnected s\nhf : ContinuousOn (fun p => ∡ p.fst p.snd.fst p.snd.snd) s\nq₁ q₅ q₂ : P\nhp :\n  ∃ x,\n    (SameRay ℝ (p₂ -ᵥ p₁) x.snd ∧ x.snd ≠ 0) ∧\n      ↑x.fst = (q₁, q₅, q₂).fst ∧ p₅ = (q₁, q₅, q₂).snd.fst ∧ x.snd +ᵥ ↑x.fst = (q₁, q₅, q₂).snd.snd\n⊢ ∡ (q₁, q₅, q₂).fst (q₁, q₅, q₂).snd.fst (q₁, q₅, q₂).snd.snd ≠ 0 ∧\n    ∡ (q₁, q₅, q₂).fst (q₁, q₅, q₂).snd.fst (q₁, q₅, q₂).snd.snd ≠ ↑π\n[PROOFSTEP]\ndsimp only at hp ⊢\n[GOAL]\ncase mk.mk\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ p₅ : P\nhp₁p₂ : p₁ ≠ p₂\nhp₃p₄ : p₃ ≠ p₄\nhc : Collinear ℝ {p₁, p₂, p₃, p₄}\nhr : SameRay ℝ (p₂ -ᵥ p₁) (p₄ -ᵥ p₃)\nhc₅₁₂ : ¬Collinear ℝ {p₅, p₁, p₂}\ns : Set (P × P × P) := (fun x => (↑x.fst, p₅, x.snd +ᵥ ↑x.fst)) '' Set.univ ×ˢ {v | SameRay ℝ (p₂ -ᵥ p₁) v ∧ v ≠ 0}\nhco : IsConnected s\nhf : ContinuousOn (fun p => ∡ p.fst p.snd.fst p.snd.snd) s\nq₁ q₅ q₂ : P\nhp : ∃ x, (SameRay ℝ (p₂ -ᵥ p₁) x.snd ∧ x.snd ≠ 0) ∧ ↑x.fst = q₁ ∧ p₅ = q₅ ∧ x.snd +ᵥ ↑x.fst = q₂\n⊢ ∡ q₁ q₅ q₂ ≠ 0 ∧ ∡ q₁ q₅ q₂ ≠ ↑π\n[PROOFSTEP]\nobtain ⟨⟨⟨q, hq⟩, v⟩, hv, rfl, rfl, rfl⟩ := hp\n[GOAL]\ncase mk.mk.intro.mk.mk.intro.intro.intro\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ p₅ : P\nhp₁p₂ : p₁ ≠ p₂\nhp₃p₄ : p₃ ≠ p₄\nhc : Collinear ℝ {p₁, p₂, p₃, p₄}\nhr : SameRay ℝ (p₂ -ᵥ p₁) (p₄ -ᵥ p₃)\nhc₅₁₂ : ¬Collinear ℝ {p₅, p₁, p₂}\ns : Set (P × P × P) := (fun x => (↑x.fst, p₅, x.snd +ᵥ ↑x.fst)) '' Set.univ ×ˢ {v | SameRay ℝ (p₂ -ᵥ p₁) v ∧ v ≠ 0}\nhco : IsConnected s\nhf : ContinuousOn (fun p => ∡ p.fst p.snd.fst p.snd.snd) s\nv : V\nq : P\nhq : q ∈ affineSpan ℝ {p₁, p₂}\nhv : SameRay ℝ (p₂ -ᵥ p₁) ({ val := q, property := hq }, v).snd ∧ ({ val := q, property := hq }, v).snd ≠ 0\n⊢ ∡ (↑({ val := q, property := hq }, v).fst) p₅\n        (({ val := q, property := hq }, v).snd +ᵥ ↑({ val := q, property := hq }, v).fst) ≠\n      0 ∧\n    ∡ (↑({ val := q, property := hq }, v).fst) p₅\n        (({ val := q, property := hq }, v).snd +ᵥ ↑({ val := q, property := hq }, v).fst) ≠\n      ↑π\n[PROOFSTEP]\ndsimp only [Subtype.coe_mk, Set.mem_setOf] at hv ⊢\n[GOAL]\ncase mk.mk.intro.mk.mk.intro.intro.intro\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ p₅ : P\nhp₁p₂ : p₁ ≠ p₂\nhp₃p₄ : p₃ ≠ p₄\nhc : Collinear ℝ {p₁, p₂, p₃, p₄}\nhr : SameRay ℝ (p₂ -ᵥ p₁) (p₄ -ᵥ p₃)\nhc₅₁₂ : ¬Collinear ℝ {p₅, p₁, p₂}\ns : Set (P × P × P) := (fun x => (↑x.fst, p₅, x.snd +ᵥ ↑x.fst)) '' Set.univ ×ˢ {v | SameRay ℝ (p₂ -ᵥ p₁) v ∧ v ≠ 0}\nhco : IsConnected s\nhf : ContinuousOn (fun p => ∡ p.fst p.snd.fst p.snd.snd) s\nv : V\nq : P\nhq : q ∈ affineSpan ℝ {p₁, p₂}\nhv : SameRay ℝ (p₂ -ᵥ p₁) v ∧ v ≠ 0\n⊢ ∡ q p₅ (v +ᵥ q) ≠ 0 ∧ ∡ q p₅ (v +ᵥ q) ≠ ↑π\n[PROOFSTEP]\nobtain ⟨hvr, hv0⟩ := hv\n[GOAL]\ncase mk.mk.intro.mk.mk.intro.intro.intro.intro\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ p₅ : P\nhp₁p₂ : p₁ ≠ p₂\nhp₃p₄ : p₃ ≠ p₄\nhc : Collinear ℝ {p₁, p₂, p₃, p₄}\nhr : SameRay ℝ (p₂ -ᵥ p₁) (p₄ -ᵥ p₃)\nhc₅₁₂ : ¬Collinear ℝ {p₅, p₁, p₂}\ns : Set (P × P × P) := (fun x => (↑x.fst, p₅, x.snd +ᵥ ↑x.fst)) '' Set.univ ×ˢ {v | SameRay ℝ (p₂ -ᵥ p₁) v ∧ v ≠ 0}\nhco : IsConnected s\nhf : ContinuousOn (fun p => ∡ p.fst p.snd.fst p.snd.snd) s\nv : V\nq : P\nhq : q ∈ affineSpan ℝ {p₁, p₂}\nhvr : SameRay ℝ (p₂ -ᵥ p₁) v\nhv0 : v ≠ 0\n⊢ ∡ q p₅ (v +ᵥ q) ≠ 0 ∧ ∡ q p₅ (v +ᵥ q) ≠ ↑π\n[PROOFSTEP]\nrw [← exists_nonneg_left_iff_sameRay (vsub_ne_zero.2 hp₁p₂.symm)] at hvr \n[GOAL]\ncase mk.mk.intro.mk.mk.intro.intro.intro.intro\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ p₅ : P\nhp₁p₂ : p₁ ≠ p₂\nhp₃p₄ : p₃ ≠ p₄\nhc : Collinear ℝ {p₁, p₂, p₃, p₄}\nhr : SameRay ℝ (p₂ -ᵥ p₁) (p₄ -ᵥ p₃)\nhc₅₁₂ : ¬Collinear ℝ {p₅, p₁, p₂}\ns : Set (P × P × P) := (fun x => (↑x.fst, p₅, x.snd +ᵥ ↑x.fst)) '' Set.univ ×ˢ {v | SameRay ℝ (p₂ -ᵥ p₁) v ∧ v ≠ 0}\nhco : IsConnected s\nhf : ContinuousOn (fun p => ∡ p.fst p.snd.fst p.snd.snd) s\nv : V\nq : P\nhq : q ∈ affineSpan ℝ {p₁, p₂}\nhvr : ∃ r, 0 ≤ r ∧ r • (p₂ -ᵥ p₁) = v\nhv0 : v ≠ 0\n⊢ ∡ q p₅ (v +ᵥ q) ≠ 0 ∧ ∡ q p₅ (v +ᵥ q) ≠ ↑π\n[PROOFSTEP]\nobtain ⟨r, -, rfl⟩ := hvr\n[GOAL]\ncase mk.mk.intro.mk.mk.intro.intro.intro.intro.intro.intro\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ p₅ : P\nhp₁p₂ : p₁ ≠ p₂\nhp₃p₄ : p₃ ≠ p₄\nhc : Collinear ℝ {p₁, p₂, p₃, p₄}\nhr : SameRay ℝ (p₂ -ᵥ p₁) (p₄ -ᵥ p₃)\nhc₅₁₂ : ¬Collinear ℝ {p₅, p₁, p₂}\ns : Set (P × P × P) := (fun x => (↑x.fst, p₅, x.snd +ᵥ ↑x.fst)) '' Set.univ ×ˢ {v | SameRay ℝ (p₂ -ᵥ p₁) v ∧ v ≠ 0}\nhco : IsConnected s\nhf : ContinuousOn (fun p => ∡ p.fst p.snd.fst p.snd.snd) s\nq : P\nhq : q ∈ affineSpan ℝ {p₁, p₂}\nr : ℝ\nhv0 : r • (p₂ -ᵥ p₁) ≠ 0\n⊢ ∡ q p₅ (r • (p₂ -ᵥ p₁) +ᵥ q) ≠ 0 ∧ ∡ q p₅ (r • (p₂ -ᵥ p₁) +ᵥ q) ≠ ↑π\n[PROOFSTEP]\nchange q ∈ line[ℝ, p₁, p₂] at hq \n[GOAL]\ncase mk.mk.intro.mk.mk.intro.intro.intro.intro.intro.intro\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ p₅ : P\nhp₁p₂ : p₁ ≠ p₂\nhp₃p₄ : p₃ ≠ p₄\nhc : Collinear ℝ {p₁, p₂, p₃, p₄}\nhr : SameRay ℝ (p₂ -ᵥ p₁) (p₄ -ᵥ p₃)\nhc₅₁₂ : ¬Collinear ℝ {p₅, p₁, p₂}\ns : Set (P × P × P) := (fun x => (↑x.fst, p₅, x.snd +ᵥ ↑x.fst)) '' Set.univ ×ˢ {v | SameRay ℝ (p₂ -ᵥ p₁) v ∧ v ≠ 0}\nhco : IsConnected s\nhf : ContinuousOn (fun p => ∡ p.fst p.snd.fst p.snd.snd) s\nq : P\nr : ℝ\nhv0 : r • (p₂ -ᵥ p₁) ≠ 0\nhq : q ∈ affineSpan ℝ {p₁, p₂}\n⊢ ∡ q p₅ (r • (p₂ -ᵥ p₁) +ᵥ q) ≠ 0 ∧ ∡ q p₅ (r • (p₂ -ᵥ p₁) +ᵥ q) ≠ ↑π\n[PROOFSTEP]\nrw [oangle_ne_zero_and_ne_pi_iff_affineIndependent]\n[GOAL]\ncase mk.mk.intro.mk.mk.intro.intro.intro.intro.intro.intro\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ p₅ : P\nhp₁p₂ : p₁ ≠ p₂\nhp₃p₄ : p₃ ≠ p₄\nhc : Collinear ℝ {p₁, p₂, p₃, p₄}\nhr : SameRay ℝ (p₂ -ᵥ p₁) (p₄ -ᵥ p₃)\nhc₅₁₂ : ¬Collinear ℝ {p₅, p₁, p₂}\ns : Set (P × P × P) := (fun x => (↑x.fst, p₅, x.snd +ᵥ ↑x.fst)) '' Set.univ ×ˢ {v | SameRay ℝ (p₂ -ᵥ p₁) v ∧ v ≠ 0}\nhco : IsConnected s\nhf : ContinuousOn (fun p => ∡ p.fst p.snd.fst p.snd.snd) s\nq : P\nr : ℝ\nhv0 : r • (p₂ -ᵥ p₁) ≠ 0\nhq : q ∈ affineSpan ℝ {p₁, p₂}\n⊢ AffineIndependent ℝ ![q, p₅, r • (p₂ -ᵥ p₁) +ᵥ q]\n[PROOFSTEP]\nrefine'\n  affineIndependent_of_ne_of_mem_of_not_mem_of_mem _ hq\n    (fun h => hc₅₁₂ ((collinear_insert_iff_of_mem_affineSpan h).2 (collinear_pair _ _ _))) _\n[GOAL]\ncase mk.mk.intro.mk.mk.intro.intro.intro.intro.intro.intro.refine'_1\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ p₅ : P\nhp₁p₂ : p₁ ≠ p₂\nhp₃p₄ : p₃ ≠ p₄\nhc : Collinear ℝ {p₁, p₂, p₃, p₄}\nhr : SameRay ℝ (p₂ -ᵥ p₁) (p₄ -ᵥ p₃)\nhc₅₁₂ : ¬Collinear ℝ {p₅, p₁, p₂}\ns : Set (P × P × P) := (fun x => (↑x.fst, p₅, x.snd +ᵥ ↑x.fst)) '' Set.univ ×ˢ {v | SameRay ℝ (p₂ -ᵥ p₁) v ∧ v ≠ 0}\nhco : IsConnected s\nhf : ContinuousOn (fun p => ∡ p.fst p.snd.fst p.snd.snd) s\nq : P\nr : ℝ\nhv0 : r • (p₂ -ᵥ p₁) ≠ 0\nhq : q ∈ affineSpan ℝ {p₁, p₂}\n⊢ q ≠ r • (p₂ -ᵥ p₁) +ᵥ q\n[PROOFSTEP]\nrwa [← @vsub_ne_zero V, vsub_vadd_eq_vsub_sub, vsub_self, zero_sub, neg_ne_zero]\n[GOAL]\ncase mk.mk.intro.mk.mk.intro.intro.intro.intro.intro.intro.refine'_2\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ p₅ : P\nhp₁p₂ : p₁ ≠ p₂\nhp₃p₄ : p₃ ≠ p₄\nhc : Collinear ℝ {p₁, p₂, p₃, p₄}\nhr : SameRay ℝ (p₂ -ᵥ p₁) (p₄ -ᵥ p₃)\nhc₅₁₂ : ¬Collinear ℝ {p₅, p₁, p₂}\ns : Set (P × P × P) := (fun x => (↑x.fst, p₅, x.snd +ᵥ ↑x.fst)) '' Set.univ ×ˢ {v | SameRay ℝ (p₂ -ᵥ p₁) v ∧ v ≠ 0}\nhco : IsConnected s\nhf : ContinuousOn (fun p => ∡ p.fst p.snd.fst p.snd.snd) s\nq : P\nr : ℝ\nhv0 : r • (p₂ -ᵥ p₁) ≠ 0\nhq : q ∈ affineSpan ℝ {p₁, p₂}\n⊢ r • (p₂ -ᵥ p₁) +ᵥ q ∈ affineSpan ℝ {p₁, p₂}\n[PROOFSTEP]\nrefine' vadd_mem_of_mem_direction _ hq\n[GOAL]\ncase mk.mk.intro.mk.mk.intro.intro.intro.intro.intro.intro.refine'_2\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ p₅ : P\nhp₁p₂ : p₁ ≠ p₂\nhp₃p₄ : p₃ ≠ p₄\nhc : Collinear ℝ {p₁, p₂, p₃, p₄}\nhr : SameRay ℝ (p₂ -ᵥ p₁) (p₄ -ᵥ p₃)\nhc₅₁₂ : ¬Collinear ℝ {p₅, p₁, p₂}\ns : Set (P × P × P) := (fun x => (↑x.fst, p₅, x.snd +ᵥ ↑x.fst)) '' Set.univ ×ˢ {v | SameRay ℝ (p₂ -ᵥ p₁) v ∧ v ≠ 0}\nhco : IsConnected s\nhf : ContinuousOn (fun p => ∡ p.fst p.snd.fst p.snd.snd) s\nq : P\nr : ℝ\nhv0 : r • (p₂ -ᵥ p₁) ≠ 0\nhq : q ∈ affineSpan ℝ {p₁, p₂}\n⊢ r • (p₂ -ᵥ p₁) ∈ direction (affineSpan ℝ {p₁, p₂})\n[PROOFSTEP]\nrw [direction_affineSpan]\n[GOAL]\ncase mk.mk.intro.mk.mk.intro.intro.intro.intro.intro.intro.refine'_2\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ p₅ : P\nhp₁p₂ : p₁ ≠ p₂\nhp₃p₄ : p₃ ≠ p₄\nhc : Collinear ℝ {p₁, p₂, p₃, p₄}\nhr : SameRay ℝ (p₂ -ᵥ p₁) (p₄ -ᵥ p₃)\nhc₅₁₂ : ¬Collinear ℝ {p₅, p₁, p₂}\ns : Set (P × P × P) := (fun x => (↑x.fst, p₅, x.snd +ᵥ ↑x.fst)) '' Set.univ ×ˢ {v | SameRay ℝ (p₂ -ᵥ p₁) v ∧ v ≠ 0}\nhco : IsConnected s\nhf : ContinuousOn (fun p => ∡ p.fst p.snd.fst p.snd.snd) s\nq : P\nr : ℝ\nhv0 : r • (p₂ -ᵥ p₁) ≠ 0\nhq : q ∈ affineSpan ℝ {p₁, p₂}\n⊢ r • (p₂ -ᵥ p₁) ∈ vectorSpan ℝ {p₁, p₂}\n[PROOFSTEP]\nexact smul_vsub_rev_mem_vectorSpan_pair _ _ _\n[GOAL]\ncase neg\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ p₅ : P\nhp₁p₂ : p₁ ≠ p₂\nhp₃p₄ : p₃ ≠ p₄\nhc : Collinear ℝ {p₁, p₂, p₃, p₄}\nhr : SameRay ℝ (p₂ -ᵥ p₁) (p₄ -ᵥ p₃)\nhc₅₁₂ : ¬Collinear ℝ {p₅, p₁, p₂}\ns : Set (P × P × P) := (fun x => (↑x.fst, p₅, x.snd +ᵥ ↑x.fst)) '' Set.univ ×ˢ {v | SameRay ℝ (p₂ -ᵥ p₁) v ∧ v ≠ 0}\nhco : IsConnected s\nhf : ContinuousOn (fun p => ∡ p.fst p.snd.fst p.snd.snd) s\nhsp : ∀ (p : P × P × P), p ∈ s → ∡ p.fst p.snd.fst p.snd.snd ≠ 0 ∧ ∡ p.fst p.snd.fst p.snd.snd ≠ ↑π\n⊢ Real.Angle.sign (∡ p₁ p₅ p₂) = Real.Angle.sign (∡ p₃ p₅ p₄)\n[PROOFSTEP]\nhave hp₁p₂s : (p₁, p₅, p₂) ∈ s :=\n  by\n  simp_rw [Set.mem_image, Set.mem_prod, Set.mem_setOf, Set.mem_univ, true_and_iff, Prod.ext_iff]\n  refine' ⟨⟨⟨p₁, left_mem_affineSpan_pair _ _ _⟩, p₂ -ᵥ p₁⟩, ⟨SameRay.rfl, vsub_ne_zero.2 hp₁p₂.symm⟩, _⟩\n  simp\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ p₅ : P\nhp₁p₂ : p₁ ≠ p₂\nhp₃p₄ : p₃ ≠ p₄\nhc : Collinear ℝ {p₁, p₂, p₃, p₄}\nhr : SameRay ℝ (p₂ -ᵥ p₁) (p₄ -ᵥ p₃)\nhc₅₁₂ : ¬Collinear ℝ {p₅, p₁, p₂}\ns : Set (P × P × P) := (fun x => (↑x.fst, p₅, x.snd +ᵥ ↑x.fst)) '' Set.univ ×ˢ {v | SameRay ℝ (p₂ -ᵥ p₁) v ∧ v ≠ 0}\nhco : IsConnected s\nhf : ContinuousOn (fun p => ∡ p.fst p.snd.fst p.snd.snd) s\nhsp : ∀ (p : P × P × P), p ∈ s → ∡ p.fst p.snd.fst p.snd.snd ≠ 0 ∧ ∡ p.fst p.snd.fst p.snd.snd ≠ ↑π\n⊢ (p₁, p₅, p₂) ∈ s\n[PROOFSTEP]\nsimp_rw [Set.mem_image, Set.mem_prod, Set.mem_setOf, Set.mem_univ, true_and_iff, Prod.ext_iff]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ p₅ : P\nhp₁p₂ : p₁ ≠ p₂\nhp₃p₄ : p₃ ≠ p₄\nhc : Collinear ℝ {p₁, p₂, p₃, p₄}\nhr : SameRay ℝ (p₂ -ᵥ p₁) (p₄ -ᵥ p₃)\nhc₅₁₂ : ¬Collinear ℝ {p₅, p₁, p₂}\ns : Set (P × P × P) := (fun x => (↑x.fst, p₅, x.snd +ᵥ ↑x.fst)) '' Set.univ ×ˢ {v | SameRay ℝ (p₂ -ᵥ p₁) v ∧ v ≠ 0}\nhco : IsConnected s\nhf : ContinuousOn (fun p => ∡ p.fst p.snd.fst p.snd.snd) s\nhsp : ∀ (p : P × P × P), p ∈ s → ∡ p.fst p.snd.fst p.snd.snd ≠ 0 ∧ ∡ p.fst p.snd.fst p.snd.snd ≠ ↑π\n⊢ ∃ x, (SameRay ℝ (p₂ -ᵥ p₁) x.snd ∧ x.snd ≠ 0) ∧ ↑x.fst = p₁ ∧ True ∧ x.snd +ᵥ ↑x.fst = p₂\n[PROOFSTEP]\nrefine' ⟨⟨⟨p₁, left_mem_affineSpan_pair _ _ _⟩, p₂ -ᵥ p₁⟩, ⟨SameRay.rfl, vsub_ne_zero.2 hp₁p₂.symm⟩, _⟩\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ p₅ : P\nhp₁p₂ : p₁ ≠ p₂\nhp₃p₄ : p₃ ≠ p₄\nhc : Collinear ℝ {p₁, p₂, p₃, p₄}\nhr : SameRay ℝ (p₂ -ᵥ p₁) (p₄ -ᵥ p₃)\nhc₅₁₂ : ¬Collinear ℝ {p₅, p₁, p₂}\ns : Set (P × P × P) := (fun x => (↑x.fst, p₅, x.snd +ᵥ ↑x.fst)) '' Set.univ ×ˢ {v | SameRay ℝ (p₂ -ᵥ p₁) v ∧ v ≠ 0}\nhco : IsConnected s\nhf : ContinuousOn (fun p => ∡ p.fst p.snd.fst p.snd.snd) s\nhsp : ∀ (p : P × P × P), p ∈ s → ∡ p.fst p.snd.fst p.snd.snd ≠ 0 ∧ ∡ p.fst p.snd.fst p.snd.snd ≠ ↑π\n⊢ ↑({ val := p₁, property := (_ : p₁ ∈ affineSpan ℝ {p₁, p₂}) }, p₂ -ᵥ p₁).fst = p₁ ∧\n    True ∧\n      ({ val := p₁, property := (_ : p₁ ∈ affineSpan ℝ {p₁, p₂}) }, p₂ -ᵥ p₁).snd +ᵥ\n          ↑({ val := p₁, property := (_ : p₁ ∈ affineSpan ℝ {p₁, p₂}) }, p₂ -ᵥ p₁).fst =\n        p₂\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ p₅ : P\nhp₁p₂ : p₁ ≠ p₂\nhp₃p₄ : p₃ ≠ p₄\nhc : Collinear ℝ {p₁, p₂, p₃, p₄}\nhr : SameRay ℝ (p₂ -ᵥ p₁) (p₄ -ᵥ p₃)\nhc₅₁₂ : ¬Collinear ℝ {p₅, p₁, p₂}\ns : Set (P × P × P) := (fun x => (↑x.fst, p₅, x.snd +ᵥ ↑x.fst)) '' Set.univ ×ˢ {v | SameRay ℝ (p₂ -ᵥ p₁) v ∧ v ≠ 0}\nhco : IsConnected s\nhf : ContinuousOn (fun p => ∡ p.fst p.snd.fst p.snd.snd) s\nhsp : ∀ (p : P × P × P), p ∈ s → ∡ p.fst p.snd.fst p.snd.snd ≠ 0 ∧ ∡ p.fst p.snd.fst p.snd.snd ≠ ↑π\nhp₁p₂s : (p₁, p₅, p₂) ∈ s\n⊢ Real.Angle.sign (∡ p₁ p₅ p₂) = Real.Angle.sign (∡ p₃ p₅ p₄)\n[PROOFSTEP]\nhave hp₃p₄s : (p₃, p₅, p₄) ∈ s :=\n  by\n  simp_rw [Set.mem_image, Set.mem_prod, Set.mem_setOf, Set.mem_univ, true_and_iff, Prod.ext_iff]\n  refine'\n    ⟨⟨⟨p₃,\n          hc.mem_affineSpan_of_mem_of_ne (Set.mem_insert _ _) (Set.mem_insert_of_mem _ (Set.mem_insert _ _))\n            (Set.mem_insert_of_mem _ (Set.mem_insert_of_mem _ (Set.mem_insert _ _))) hp₁p₂⟩,\n        p₄ -ᵥ p₃⟩,\n      ⟨hr, vsub_ne_zero.2 hp₃p₄.symm⟩, _⟩\n  simp\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ p₅ : P\nhp₁p₂ : p₁ ≠ p₂\nhp₃p₄ : p₃ ≠ p₄\nhc : Collinear ℝ {p₁, p₂, p₃, p₄}\nhr : SameRay ℝ (p₂ -ᵥ p₁) (p₄ -ᵥ p₃)\nhc₅₁₂ : ¬Collinear ℝ {p₅, p₁, p₂}\ns : Set (P × P × P) := (fun x => (↑x.fst, p₅, x.snd +ᵥ ↑x.fst)) '' Set.univ ×ˢ {v | SameRay ℝ (p₂ -ᵥ p₁) v ∧ v ≠ 0}\nhco : IsConnected s\nhf : ContinuousOn (fun p => ∡ p.fst p.snd.fst p.snd.snd) s\nhsp : ∀ (p : P × P × P), p ∈ s → ∡ p.fst p.snd.fst p.snd.snd ≠ 0 ∧ ∡ p.fst p.snd.fst p.snd.snd ≠ ↑π\nhp₁p₂s : (p₁, p₅, p₂) ∈ s\n⊢ (p₃, p₅, p₄) ∈ s\n[PROOFSTEP]\nsimp_rw [Set.mem_image, Set.mem_prod, Set.mem_setOf, Set.mem_univ, true_and_iff, Prod.ext_iff]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ p₅ : P\nhp₁p₂ : p₁ ≠ p₂\nhp₃p₄ : p₃ ≠ p₄\nhc : Collinear ℝ {p₁, p₂, p₃, p₄}\nhr : SameRay ℝ (p₂ -ᵥ p₁) (p₄ -ᵥ p₃)\nhc₅₁₂ : ¬Collinear ℝ {p₅, p₁, p₂}\ns : Set (P × P × P) := (fun x => (↑x.fst, p₅, x.snd +ᵥ ↑x.fst)) '' Set.univ ×ˢ {v | SameRay ℝ (p₂ -ᵥ p₁) v ∧ v ≠ 0}\nhco : IsConnected s\nhf : ContinuousOn (fun p => ∡ p.fst p.snd.fst p.snd.snd) s\nhsp : ∀ (p : P × P × P), p ∈ s → ∡ p.fst p.snd.fst p.snd.snd ≠ 0 ∧ ∡ p.fst p.snd.fst p.snd.snd ≠ ↑π\nhp₁p₂s : (p₁, p₅, p₂) ∈ s\n⊢ ∃ x, (SameRay ℝ (p₂ -ᵥ p₁) x.snd ∧ x.snd ≠ 0) ∧ ↑x.fst = p₃ ∧ True ∧ x.snd +ᵥ ↑x.fst = p₄\n[PROOFSTEP]\nrefine'\n  ⟨⟨⟨p₃,\n        hc.mem_affineSpan_of_mem_of_ne (Set.mem_insert _ _) (Set.mem_insert_of_mem _ (Set.mem_insert _ _))\n          (Set.mem_insert_of_mem _ (Set.mem_insert_of_mem _ (Set.mem_insert _ _))) hp₁p₂⟩,\n      p₄ -ᵥ p₃⟩,\n    ⟨hr, vsub_ne_zero.2 hp₃p₄.symm⟩, _⟩\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ p₅ : P\nhp₁p₂ : p₁ ≠ p₂\nhp₃p₄ : p₃ ≠ p₄\nhc : Collinear ℝ {p₁, p₂, p₃, p₄}\nhr : SameRay ℝ (p₂ -ᵥ p₁) (p₄ -ᵥ p₃)\nhc₅₁₂ : ¬Collinear ℝ {p₅, p₁, p₂}\ns : Set (P × P × P) := (fun x => (↑x.fst, p₅, x.snd +ᵥ ↑x.fst)) '' Set.univ ×ˢ {v | SameRay ℝ (p₂ -ᵥ p₁) v ∧ v ≠ 0}\nhco : IsConnected s\nhf : ContinuousOn (fun p => ∡ p.fst p.snd.fst p.snd.snd) s\nhsp : ∀ (p : P × P × P), p ∈ s → ∡ p.fst p.snd.fst p.snd.snd ≠ 0 ∧ ∡ p.fst p.snd.fst p.snd.snd ≠ ↑π\nhp₁p₂s : (p₁, p₅, p₂) ∈ s\n⊢ ↑({ val := p₃, property := (_ : p₃ ∈ affineSpan ℝ {p₁, p₂}) }, p₄ -ᵥ p₃).fst = p₃ ∧\n    True ∧\n      ({ val := p₃, property := (_ : p₃ ∈ affineSpan ℝ {p₁, p₂}) }, p₄ -ᵥ p₃).snd +ᵥ\n          ↑({ val := p₃, property := (_ : p₃ ∈ affineSpan ℝ {p₁, p₂}) }, p₄ -ᵥ p₃).fst =\n        p₄\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ p₅ : P\nhp₁p₂ : p₁ ≠ p₂\nhp₃p₄ : p₃ ≠ p₄\nhc : Collinear ℝ {p₁, p₂, p₃, p₄}\nhr : SameRay ℝ (p₂ -ᵥ p₁) (p₄ -ᵥ p₃)\nhc₅₁₂ : ¬Collinear ℝ {p₅, p₁, p₂}\ns : Set (P × P × P) := (fun x => (↑x.fst, p₅, x.snd +ᵥ ↑x.fst)) '' Set.univ ×ˢ {v | SameRay ℝ (p₂ -ᵥ p₁) v ∧ v ≠ 0}\nhco : IsConnected s\nhf : ContinuousOn (fun p => ∡ p.fst p.snd.fst p.snd.snd) s\nhsp : ∀ (p : P × P × P), p ∈ s → ∡ p.fst p.snd.fst p.snd.snd ≠ 0 ∧ ∡ p.fst p.snd.fst p.snd.snd ≠ ↑π\nhp₁p₂s : (p₁, p₅, p₂) ∈ s\nhp₃p₄s : (p₃, p₅, p₄) ∈ s\n⊢ Real.Angle.sign (∡ p₁ p₅ p₂) = Real.Angle.sign (∡ p₃ p₅ p₄)\n[PROOFSTEP]\nconvert Real.Angle.sign_eq_of_continuousOn hco hf hsp hp₃p₄s hp₁p₂s\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ : P\nh : Sbtw ℝ p₁ p₂ p₃\n⊢ Collinear ℝ {p₁, p₂, p₂, p₃}\n[PROOFSTEP]\nsimpa using h.wbtw.collinear\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ : P\nh : Wbtw ℝ p₁ p₂ p₃\nhne : p₁ ≠ p₂\n⊢ Collinear ℝ {p₁, p₂, p₁, p₃}\n[PROOFSTEP]\nsimpa [Set.insert_comm p₂] using h.collinear\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ : P\nh : Wbtw ℝ p₁ p₂ p₃\nhne : p₂ ≠ p₃\n⊢ Real.Angle.sign (∡ p₂ p₄ p₃) = Real.Angle.sign (∡ p₁ p₄ p₃)\n[PROOFSTEP]\nsimp_rw [oangle_rev p₃, Real.Angle.sign_neg, h.symm.oangle_sign_eq_of_ne_left _ hne.symm]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\ns : AffineSubspace ℝ P\np₁ p₂ p₃ p₄ : P\nhp₁ : p₁ ∈ s\nhp₂ : p₂ ∈ s\nhp₃p₄ : SSameSide s p₃ p₄\n⊢ Real.Angle.sign (∡ p₁ p₄ p₂) = Real.Angle.sign (∡ p₁ p₃ p₂)\n[PROOFSTEP]\nby_cases h : p₁ = p₂\n[GOAL]\ncase pos\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\ns : AffineSubspace ℝ P\np₁ p₂ p₃ p₄ : P\nhp₁ : p₁ ∈ s\nhp₂ : p₂ ∈ s\nhp₃p₄ : SSameSide s p₃ p₄\nh : p₁ = p₂\n⊢ Real.Angle.sign (∡ p₁ p₄ p₂) = Real.Angle.sign (∡ p₁ p₃ p₂)\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase neg\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\ns : AffineSubspace ℝ P\np₁ p₂ p₃ p₄ : P\nhp₁ : p₁ ∈ s\nhp₂ : p₂ ∈ s\nhp₃p₄ : SSameSide s p₃ p₄\nh : ¬p₁ = p₂\n⊢ Real.Angle.sign (∡ p₁ p₄ p₂) = Real.Angle.sign (∡ p₁ p₃ p₂)\n[PROOFSTEP]\nlet sp : Set (P × P × P) := (fun p : P => (p₁, p, p₂)) '' {p | s.SSameSide p₃ p}\n[GOAL]\ncase neg\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\ns : AffineSubspace ℝ P\np₁ p₂ p₃ p₄ : P\nhp₁ : p₁ ∈ s\nhp₂ : p₂ ∈ s\nhp₃p₄ : SSameSide s p₃ p₄\nh : ¬p₁ = p₂\nsp : Set (P × P × P) := (fun p => (p₁, p, p₂)) '' {p | SSameSide s p₃ p}\n⊢ Real.Angle.sign (∡ p₁ p₄ p₂) = Real.Angle.sign (∡ p₁ p₃ p₂)\n[PROOFSTEP]\nhave hc : IsConnected sp :=\n  (isConnected_setOf_sSameSide hp₃p₄.2.1 hp₃p₄.nonempty).image _\n    (continuous_const.prod_mk (Continuous.Prod.mk_left _)).continuousOn\n[GOAL]\ncase neg\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\ns : AffineSubspace ℝ P\np₁ p₂ p₃ p₄ : P\nhp₁ : p₁ ∈ s\nhp₂ : p₂ ∈ s\nhp₃p₄ : SSameSide s p₃ p₄\nh : ¬p₁ = p₂\nsp : Set (P × P × P) := (fun p => (p₁, p, p₂)) '' {p | SSameSide s p₃ p}\nhc : IsConnected sp\n⊢ Real.Angle.sign (∡ p₁ p₄ p₂) = Real.Angle.sign (∡ p₁ p₃ p₂)\n[PROOFSTEP]\nhave hf : ContinuousOn (fun p : P × P × P => ∡ p.1 p.2.1 p.2.2) sp :=\n  by\n  refine' ContinuousAt.continuousOn fun p hp => continuousAt_oangle _ _\n  all_goals\n    simp_rw [Set.mem_image, Set.mem_setOf] at hp \n    obtain ⟨p', hp', rfl⟩ := hp\n    dsimp only\n    rintro rfl\n  · exact hp'.2.2 hp₁\n  · exact hp'.2.2 hp₂\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\ns : AffineSubspace ℝ P\np₁ p₂ p₃ p₄ : P\nhp₁ : p₁ ∈ s\nhp₂ : p₂ ∈ s\nhp₃p₄ : SSameSide s p₃ p₄\nh : ¬p₁ = p₂\nsp : Set (P × P × P) := (fun p => (p₁, p, p₂)) '' {p | SSameSide s p₃ p}\nhc : IsConnected sp\n⊢ ContinuousOn (fun p => ∡ p.fst p.snd.fst p.snd.snd) sp\n[PROOFSTEP]\nrefine' ContinuousAt.continuousOn fun p hp => continuousAt_oangle _ _\n[GOAL]\ncase refine'_1\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\ns : AffineSubspace ℝ P\np₁ p₂ p₃ p₄ : P\nhp₁ : p₁ ∈ s\nhp₂ : p₂ ∈ s\nhp₃p₄ : SSameSide s p₃ p₄\nh : ¬p₁ = p₂\nsp : Set (P × P × P) := (fun p => (p₁, p, p₂)) '' {p | SSameSide s p₃ p}\nhc : IsConnected sp\np : P × P × P\nhp : p ∈ sp\n⊢ p.fst ≠ p.snd.fst\ncase refine'_2\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\ns : AffineSubspace ℝ P\np₁ p₂ p₃ p₄ : P\nhp₁ : p₁ ∈ s\nhp₂ : p₂ ∈ s\nhp₃p₄ : SSameSide s p₃ p₄\nh : ¬p₁ = p₂\nsp : Set (P × P × P) := (fun p => (p₁, p, p₂)) '' {p | SSameSide s p₃ p}\nhc : IsConnected sp\np : P × P × P\nhp : p ∈ sp\n⊢ p.snd.snd ≠ p.snd.fst\n[PROOFSTEP]\nall_goals\n  simp_rw [Set.mem_image, Set.mem_setOf] at hp \n  obtain ⟨p', hp', rfl⟩ := hp\n  dsimp only\n  rintro rfl\n[GOAL]\ncase refine'_1\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\ns : AffineSubspace ℝ P\np₁ p₂ p₃ p₄ : P\nhp₁ : p₁ ∈ s\nhp₂ : p₂ ∈ s\nhp₃p₄ : SSameSide s p₃ p₄\nh : ¬p₁ = p₂\nsp : Set (P × P × P) := (fun p => (p₁, p, p₂)) '' {p | SSameSide s p₃ p}\nhc : IsConnected sp\np : P × P × P\nhp : p ∈ sp\n⊢ p.fst ≠ p.snd.fst\n[PROOFSTEP]\nsimp_rw [Set.mem_image, Set.mem_setOf] at hp \n[GOAL]\ncase refine'_1\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\ns : AffineSubspace ℝ P\np₁ p₂ p₃ p₄ : P\nhp₁ : p₁ ∈ s\nhp₂ : p₂ ∈ s\nhp₃p₄ : SSameSide s p₃ p₄\nh : ¬p₁ = p₂\nsp : Set (P × P × P) := (fun p => (p₁, p, p₂)) '' {p | SSameSide s p₃ p}\nhc : IsConnected sp\np : P × P × P\nhp : ∃ x, SSameSide s p₃ x ∧ (p₁, x, p₂) = p\n⊢ p.fst ≠ p.snd.fst\n[PROOFSTEP]\nobtain ⟨p', hp', rfl⟩ := hp\n[GOAL]\ncase refine'_1.intro.intro\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\ns : AffineSubspace ℝ P\np₁ p₂ p₃ p₄ : P\nhp₁ : p₁ ∈ s\nhp₂ : p₂ ∈ s\nhp₃p₄ : SSameSide s p₃ p₄\nh : ¬p₁ = p₂\nsp : Set (P × P × P) := (fun p => (p₁, p, p₂)) '' {p | SSameSide s p₃ p}\nhc : IsConnected sp\np' : P\nhp' : SSameSide s p₃ p'\n⊢ (p₁, p', p₂).fst ≠ (p₁, p', p₂).snd.fst\n[PROOFSTEP]\ndsimp only\n[GOAL]\ncase refine'_1.intro.intro\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\ns : AffineSubspace ℝ P\np₁ p₂ p₃ p₄ : P\nhp₁ : p₁ ∈ s\nhp₂ : p₂ ∈ s\nhp₃p₄ : SSameSide s p₃ p₄\nh : ¬p₁ = p₂\nsp : Set (P × P × P) := (fun p => (p₁, p, p₂)) '' {p | SSameSide s p₃ p}\nhc : IsConnected sp\np' : P\nhp' : SSameSide s p₃ p'\n⊢ p₁ ≠ p'\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase refine'_2\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\ns : AffineSubspace ℝ P\np₁ p₂ p₃ p₄ : P\nhp₁ : p₁ ∈ s\nhp₂ : p₂ ∈ s\nhp₃p₄ : SSameSide s p₃ p₄\nh : ¬p₁ = p₂\nsp : Set (P × P × P) := (fun p => (p₁, p, p₂)) '' {p | SSameSide s p₃ p}\nhc : IsConnected sp\np : P × P × P\nhp : p ∈ sp\n⊢ p.snd.snd ≠ p.snd.fst\n[PROOFSTEP]\nsimp_rw [Set.mem_image, Set.mem_setOf] at hp \n[GOAL]\ncase refine'_2\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\ns : AffineSubspace ℝ P\np₁ p₂ p₃ p₄ : P\nhp₁ : p₁ ∈ s\nhp₂ : p₂ ∈ s\nhp₃p₄ : SSameSide s p₃ p₄\nh : ¬p₁ = p₂\nsp : Set (P × P × P) := (fun p => (p₁, p, p₂)) '' {p | SSameSide s p₃ p}\nhc : IsConnected sp\np : P × P × P\nhp : ∃ x, SSameSide s p₃ x ∧ (p₁, x, p₂) = p\n⊢ p.snd.snd ≠ p.snd.fst\n[PROOFSTEP]\nobtain ⟨p', hp', rfl⟩ := hp\n[GOAL]\ncase refine'_2.intro.intro\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\ns : AffineSubspace ℝ P\np₁ p₂ p₃ p₄ : P\nhp₁ : p₁ ∈ s\nhp₂ : p₂ ∈ s\nhp₃p₄ : SSameSide s p₃ p₄\nh : ¬p₁ = p₂\nsp : Set (P × P × P) := (fun p => (p₁, p, p₂)) '' {p | SSameSide s p₃ p}\nhc : IsConnected sp\np' : P\nhp' : SSameSide s p₃ p'\n⊢ (p₁, p', p₂).snd.snd ≠ (p₁, p', p₂).snd.fst\n[PROOFSTEP]\ndsimp only\n[GOAL]\ncase refine'_2.intro.intro\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\ns : AffineSubspace ℝ P\np₁ p₂ p₃ p₄ : P\nhp₁ : p₁ ∈ s\nhp₂ : p₂ ∈ s\nhp₃p₄ : SSameSide s p₃ p₄\nh : ¬p₁ = p₂\nsp : Set (P × P × P) := (fun p => (p₁, p, p₂)) '' {p | SSameSide s p₃ p}\nhc : IsConnected sp\np' : P\nhp' : SSameSide s p₃ p'\n⊢ p₂ ≠ p'\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase refine'_1.intro.intro\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\ns : AffineSubspace ℝ P\np₁ p₂ p₃ p₄ : P\nhp₁ : p₁ ∈ s\nhp₂ : p₂ ∈ s\nhp₃p₄ : SSameSide s p₃ p₄\nh : ¬p₁ = p₂\nsp : Set (P × P × P) := (fun p => (p₁, p, p₂)) '' {p | SSameSide s p₃ p}\nhc : IsConnected sp\nhp' : SSameSide s p₃ p₁\n⊢ False\n[PROOFSTEP]\nexact hp'.2.2 hp₁\n[GOAL]\ncase refine'_2.intro.intro\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\ns : AffineSubspace ℝ P\np₁ p₂ p₃ p₄ : P\nhp₁ : p₁ ∈ s\nhp₂ : p₂ ∈ s\nhp₃p₄ : SSameSide s p₃ p₄\nh : ¬p₁ = p₂\nsp : Set (P × P × P) := (fun p => (p₁, p, p₂)) '' {p | SSameSide s p₃ p}\nhc : IsConnected sp\nhp' : SSameSide s p₃ p₂\n⊢ False\n[PROOFSTEP]\nexact hp'.2.2 hp₂\n[GOAL]\ncase neg\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\ns : AffineSubspace ℝ P\np₁ p₂ p₃ p₄ : P\nhp₁ : p₁ ∈ s\nhp₂ : p₂ ∈ s\nhp₃p₄ : SSameSide s p₃ p₄\nh : ¬p₁ = p₂\nsp : Set (P × P × P) := (fun p => (p₁, p, p₂)) '' {p | SSameSide s p₃ p}\nhc : IsConnected sp\nhf : ContinuousOn (fun p => ∡ p.fst p.snd.fst p.snd.snd) sp\n⊢ Real.Angle.sign (∡ p₁ p₄ p₂) = Real.Angle.sign (∡ p₁ p₃ p₂)\n[PROOFSTEP]\nhave hsp : ∀ p : P × P × P, p ∈ sp → ∡ p.1 p.2.1 p.2.2 ≠ 0 ∧ ∡ p.1 p.2.1 p.2.2 ≠ π :=\n  by\n  intro p hp\n  simp_rw [Set.mem_image, Set.mem_setOf] at hp \n  obtain ⟨p', hp', rfl⟩ := hp\n  dsimp only\n  rw [oangle_ne_zero_and_ne_pi_iff_affineIndependent]\n  exact affineIndependent_of_ne_of_mem_of_not_mem_of_mem h hp₁ hp'.2.2 hp₂\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\ns : AffineSubspace ℝ P\np₁ p₂ p₃ p₄ : P\nhp₁ : p₁ ∈ s\nhp₂ : p₂ ∈ s\nhp₃p₄ : SSameSide s p₃ p₄\nh : ¬p₁ = p₂\nsp : Set (P × P × P) := (fun p => (p₁, p, p₂)) '' {p | SSameSide s p₃ p}\nhc : IsConnected sp\nhf : ContinuousOn (fun p => ∡ p.fst p.snd.fst p.snd.snd) sp\n⊢ ∀ (p : P × P × P), p ∈ sp → ∡ p.fst p.snd.fst p.snd.snd ≠ 0 ∧ ∡ p.fst p.snd.fst p.snd.snd ≠ ↑π\n[PROOFSTEP]\nintro p hp\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\ns : AffineSubspace ℝ P\np₁ p₂ p₃ p₄ : P\nhp₁ : p₁ ∈ s\nhp₂ : p₂ ∈ s\nhp₃p₄ : SSameSide s p₃ p₄\nh : ¬p₁ = p₂\nsp : Set (P × P × P) := (fun p => (p₁, p, p₂)) '' {p | SSameSide s p₃ p}\nhc : IsConnected sp\nhf : ContinuousOn (fun p => ∡ p.fst p.snd.fst p.snd.snd) sp\np : P × P × P\nhp : p ∈ sp\n⊢ ∡ p.fst p.snd.fst p.snd.snd ≠ 0 ∧ ∡ p.fst p.snd.fst p.snd.snd ≠ ↑π\n[PROOFSTEP]\nsimp_rw [Set.mem_image, Set.mem_setOf] at hp \n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\ns : AffineSubspace ℝ P\np₁ p₂ p₃ p₄ : P\nhp₁ : p₁ ∈ s\nhp₂ : p₂ ∈ s\nhp₃p₄ : SSameSide s p₃ p₄\nh : ¬p₁ = p₂\nsp : Set (P × P × P) := (fun p => (p₁, p, p₂)) '' {p | SSameSide s p₃ p}\nhc : IsConnected sp\nhf : ContinuousOn (fun p => ∡ p.fst p.snd.fst p.snd.snd) sp\np : P × P × P\nhp : ∃ x, SSameSide s p₃ x ∧ (p₁, x, p₂) = p\n⊢ ∡ p.fst p.snd.fst p.snd.snd ≠ 0 ∧ ∡ p.fst p.snd.fst p.snd.snd ≠ ↑π\n[PROOFSTEP]\nobtain ⟨p', hp', rfl⟩ := hp\n[GOAL]\ncase intro.intro\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\ns : AffineSubspace ℝ P\np₁ p₂ p₃ p₄ : P\nhp₁ : p₁ ∈ s\nhp₂ : p₂ ∈ s\nhp₃p₄ : SSameSide s p₃ p₄\nh : ¬p₁ = p₂\nsp : Set (P × P × P) := (fun p => (p₁, p, p₂)) '' {p | SSameSide s p₃ p}\nhc : IsConnected sp\nhf : ContinuousOn (fun p => ∡ p.fst p.snd.fst p.snd.snd) sp\np' : P\nhp' : SSameSide s p₃ p'\n⊢ ∡ (p₁, p', p₂).fst (p₁, p', p₂).snd.fst (p₁, p', p₂).snd.snd ≠ 0 ∧\n    ∡ (p₁, p', p₂).fst (p₁, p', p₂).snd.fst (p₁, p', p₂).snd.snd ≠ ↑π\n[PROOFSTEP]\ndsimp only\n[GOAL]\ncase intro.intro\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\ns : AffineSubspace ℝ P\np₁ p₂ p₃ p₄ : P\nhp₁ : p₁ ∈ s\nhp₂ : p₂ ∈ s\nhp₃p₄ : SSameSide s p₃ p₄\nh : ¬p₁ = p₂\nsp : Set (P × P × P) := (fun p => (p₁, p, p₂)) '' {p | SSameSide s p₃ p}\nhc : IsConnected sp\nhf : ContinuousOn (fun p => ∡ p.fst p.snd.fst p.snd.snd) sp\np' : P\nhp' : SSameSide s p₃ p'\n⊢ ∡ p₁ p' p₂ ≠ 0 ∧ ∡ p₁ p' p₂ ≠ ↑π\n[PROOFSTEP]\nrw [oangle_ne_zero_and_ne_pi_iff_affineIndependent]\n[GOAL]\ncase intro.intro\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\ns : AffineSubspace ℝ P\np₁ p₂ p₃ p₄ : P\nhp₁ : p₁ ∈ s\nhp₂ : p₂ ∈ s\nhp₃p₄ : SSameSide s p₃ p₄\nh : ¬p₁ = p₂\nsp : Set (P × P × P) := (fun p => (p₁, p, p₂)) '' {p | SSameSide s p₃ p}\nhc : IsConnected sp\nhf : ContinuousOn (fun p => ∡ p.fst p.snd.fst p.snd.snd) sp\np' : P\nhp' : SSameSide s p₃ p'\n⊢ AffineIndependent ℝ ![p₁, p', p₂]\n[PROOFSTEP]\nexact affineIndependent_of_ne_of_mem_of_not_mem_of_mem h hp₁ hp'.2.2 hp₂\n[GOAL]\ncase neg\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\ns : AffineSubspace ℝ P\np₁ p₂ p₃ p₄ : P\nhp₁ : p₁ ∈ s\nhp₂ : p₂ ∈ s\nhp₃p₄ : SSameSide s p₃ p₄\nh : ¬p₁ = p₂\nsp : Set (P × P × P) := (fun p => (p₁, p, p₂)) '' {p | SSameSide s p₃ p}\nhc : IsConnected sp\nhf : ContinuousOn (fun p => ∡ p.fst p.snd.fst p.snd.snd) sp\nhsp : ∀ (p : P × P × P), p ∈ sp → ∡ p.fst p.snd.fst p.snd.snd ≠ 0 ∧ ∡ p.fst p.snd.fst p.snd.snd ≠ ↑π\n⊢ Real.Angle.sign (∡ p₁ p₄ p₂) = Real.Angle.sign (∡ p₁ p₃ p₂)\n[PROOFSTEP]\nhave hp₃ : (p₁, p₃, p₂) ∈ sp := Set.mem_image_of_mem _ (sSameSide_self_iff.2 ⟨hp₃p₄.nonempty, hp₃p₄.2.1⟩)\n[GOAL]\ncase neg\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\ns : AffineSubspace ℝ P\np₁ p₂ p₃ p₄ : P\nhp₁ : p₁ ∈ s\nhp₂ : p₂ ∈ s\nhp₃p₄ : SSameSide s p₃ p₄\nh : ¬p₁ = p₂\nsp : Set (P × P × P) := (fun p => (p₁, p, p₂)) '' {p | SSameSide s p₃ p}\nhc : IsConnected sp\nhf : ContinuousOn (fun p => ∡ p.fst p.snd.fst p.snd.snd) sp\nhsp : ∀ (p : P × P × P), p ∈ sp → ∡ p.fst p.snd.fst p.snd.snd ≠ 0 ∧ ∡ p.fst p.snd.fst p.snd.snd ≠ ↑π\nhp₃ : (p₁, p₃, p₂) ∈ sp\n⊢ Real.Angle.sign (∡ p₁ p₄ p₂) = Real.Angle.sign (∡ p₁ p₃ p₂)\n[PROOFSTEP]\nhave hp₄ : (p₁, p₄, p₂) ∈ sp := Set.mem_image_of_mem _ hp₃p₄\n[GOAL]\ncase neg\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\ns : AffineSubspace ℝ P\np₁ p₂ p₃ p₄ : P\nhp₁ : p₁ ∈ s\nhp₂ : p₂ ∈ s\nhp₃p₄ : SSameSide s p₃ p₄\nh : ¬p₁ = p₂\nsp : Set (P × P × P) := (fun p => (p₁, p, p₂)) '' {p | SSameSide s p₃ p}\nhc : IsConnected sp\nhf : ContinuousOn (fun p => ∡ p.fst p.snd.fst p.snd.snd) sp\nhsp : ∀ (p : P × P × P), p ∈ sp → ∡ p.fst p.snd.fst p.snd.snd ≠ 0 ∧ ∡ p.fst p.snd.fst p.snd.snd ≠ ↑π\nhp₃ : (p₁, p₃, p₂) ∈ sp\nhp₄ : (p₁, p₄, p₂) ∈ sp\n⊢ Real.Angle.sign (∡ p₁ p₄ p₂) = Real.Angle.sign (∡ p₁ p₃ p₂)\n[PROOFSTEP]\nconvert Real.Angle.sign_eq_of_continuousOn hc hf hsp hp₃ hp₄\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\ns : AffineSubspace ℝ P\np₁ p₂ p₃ p₄ : P\nhp₁ : p₁ ∈ s\nhp₂ : p₂ ∈ s\nhp₃p₄ : SOppSide s p₃ p₄\n⊢ Real.Angle.sign (∡ p₁ p₄ p₂) = -Real.Angle.sign (∡ p₁ p₃ p₂)\n[PROOFSTEP]\nhave hp₁p₃ : p₁ ≠ p₃ := by rintro rfl; exact hp₃p₄.left_not_mem hp₁\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\ns : AffineSubspace ℝ P\np₁ p₂ p₃ p₄ : P\nhp₁ : p₁ ∈ s\nhp₂ : p₂ ∈ s\nhp₃p₄ : SOppSide s p₃ p₄\n⊢ p₁ ≠ p₃\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\ns : AffineSubspace ℝ P\np₁ p₂ p₄ : P\nhp₁ : p₁ ∈ s\nhp₂ : p₂ ∈ s\nhp₃p₄ : SOppSide s p₁ p₄\n⊢ False\n[PROOFSTEP]\nexact hp₃p₄.left_not_mem hp₁\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\ns : AffineSubspace ℝ P\np₁ p₂ p₃ p₄ : P\nhp₁ : p₁ ∈ s\nhp₂ : p₂ ∈ s\nhp₃p₄ : SOppSide s p₃ p₄\nhp₁p₃ : p₁ ≠ p₃\n⊢ Real.Angle.sign (∡ p₁ p₄ p₂) = -Real.Angle.sign (∡ p₁ p₃ p₂)\n[PROOFSTEP]\nrw [← (hp₃p₄.symm.trans (sOppSide_pointReflection hp₁ hp₃p₄.left_not_mem)).oangle_sign_eq hp₁ hp₂, ←\n  oangle_rotate_sign p₁, ← oangle_rotate_sign p₁, oangle_swap₁₃_sign,\n  (sbtw_pointReflection_of_ne ℝ hp₁p₃).symm.oangle_sign_eq _]\n", "meta": {"mathlib_filename": "Mathlib.Geometry.Euclidean.Angle.Oriented.Affine", "llama_tokens": 64793, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8128673178375734, "lm_q2_score": 0.6297746074044134, "lm_q1q2_score": 0.5119231959630363}}
{"text": "[GOAL]\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\ni j : ℕ\n⊢ I ^ i • N F j ≤ N F (i + j)\n[PROOFSTEP]\ninduction' i with _ ih\n[GOAL]\ncase zero\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nj : ℕ\n⊢ I ^ Nat.zero • N F j ≤ N F (Nat.zero + j)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nj n✝ : ℕ\nih : I ^ n✝ • N F j ≤ N F (n✝ + j)\n⊢ I ^ Nat.succ n✝ • N F j ≤ N F (Nat.succ n✝ + j)\n[PROOFSTEP]\nrw [pow_succ, mul_smul, Nat.succ_eq_add_one, add_assoc, add_comm 1, ← add_assoc]\n[GOAL]\ncase succ\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nj n✝ : ℕ\nih : I ^ n✝ • N F j ≤ N F (n✝ + j)\n⊢ I • I ^ n✝ • N F j ≤ N F (n✝ + j + 1)\n[PROOFSTEP]\nexact (Submodule.smul_mono_right ih).trans (F.smul_le _)\n[GOAL]\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\ni j k : ℕ\n⊢ I ^ (i + k) • N F j ≤ I ^ k • N F (i + j)\n[PROOFSTEP]\nrw [add_comm, pow_add, mul_smul]\n[GOAL]\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\ni j k : ℕ\n⊢ I ^ k • I ^ i • N F j ≤ I ^ k • N F (i + j)\n[PROOFSTEP]\nexact Submodule.smul_mono_right (F.pow_smul_le i j)\n[GOAL]\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nS : Set (Filtration I M)\ni : ℕ\n⊢ sSup (N '' S) (i + 1) ≤ sSup (N '' S) i\n[PROOFSTEP]\napply sSup_le_sSup_of_forall_exists_le _\n[GOAL]\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nS : Set (Filtration I M)\ni : ℕ\n⊢ ∀ (x : Submodule R M), (x ∈ Set.range fun f => ↑f (i + 1)) → ∃ y, (y ∈ Set.range fun f => ↑f i) ∧ x ≤ y\n[PROOFSTEP]\nrintro _ ⟨⟨_, F, hF, rfl⟩, rfl⟩\n[GOAL]\ncase intro.mk.intro.intro\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF✝ F' : Filtration I M\nS : Set (Filtration I M)\ni : ℕ\nF : Filtration I M\nhF : F ∈ S\n⊢ ∃ y,\n    (y ∈ Set.range fun f => ↑f i) ∧ (fun f => ↑f (i + 1)) { val := F.N, property := (_ : ∃ a, a ∈ S ∧ a.N = F.N) } ≤ y\n[PROOFSTEP]\nexact ⟨_, ⟨⟨_, F, hF, rfl⟩, rfl⟩, F.mono i⟩\n[GOAL]\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nS : Set (Filtration I M)\ni : ℕ\n⊢ I • sSup (N '' S) i ≤ sSup (N '' S) (i + 1)\n[PROOFSTEP]\nrw [sSup_eq_iSup', iSup_apply, Submodule.smul_iSup, iSup_apply]\n[GOAL]\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nS : Set (Filtration I M)\ni : ℕ\n⊢ ⨆ (i_1 : ↑(N '' S)), I • ↑i_1 i ≤ ⨆ (i_1 : ↑(N '' S)), ↑i_1 (i + 1)\n[PROOFSTEP]\napply iSup_mono _\n[GOAL]\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nS : Set (Filtration I M)\ni : ℕ\n⊢ ∀ (i_1 : ↑(N '' S)), I • ↑i_1 i ≤ ↑i_1 (i + 1)\n[PROOFSTEP]\nrintro ⟨_, F, hF, rfl⟩\n[GOAL]\ncase mk.intro.intro\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF✝ F' : Filtration I M\nS : Set (Filtration I M)\ni : ℕ\nF : Filtration I M\nhF : F ∈ S\n⊢ I • ↑{ val := F.N, property := (_ : ∃ a, a ∈ S ∧ a.N = F.N) } i ≤\n    ↑{ val := F.N, property := (_ : ∃ a, a ∈ S ∧ a.N = F.N) } (i + 1)\n[PROOFSTEP]\nexact F.smul_le i\n[GOAL]\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nS : Set (Filtration I M)\ni : ℕ\n⊢ sInf (N '' S) (i + 1) ≤ sInf (N '' S) i\n[PROOFSTEP]\napply sInf_le_sInf_of_forall_exists_le _\n[GOAL]\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nS : Set (Filtration I M)\ni : ℕ\n⊢ ∀ (x : Submodule R M), (x ∈ Set.range fun f => ↑f i) → ∃ y, (y ∈ Set.range fun f => ↑f (i + 1)) ∧ y ≤ x\n[PROOFSTEP]\nrintro _ ⟨⟨_, F, hF, rfl⟩, rfl⟩\n[GOAL]\ncase intro.mk.intro.intro\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF✝ F' : Filtration I M\nS : Set (Filtration I M)\ni : ℕ\nF : Filtration I M\nhF : F ∈ S\n⊢ ∃ y,\n    (y ∈ Set.range fun f => ↑f (i + 1)) ∧ y ≤ (fun f => ↑f i) { val := F.N, property := (_ : ∃ a, a ∈ S ∧ a.N = F.N) }\n[PROOFSTEP]\nexact ⟨_, ⟨⟨_, F, hF, rfl⟩, rfl⟩, F.mono i⟩\n[GOAL]\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nS : Set (Filtration I M)\ni : ℕ\n⊢ I • sInf (N '' S) i ≤ sInf (N '' S) (i + 1)\n[PROOFSTEP]\nrw [sInf_eq_iInf', iInf_apply, iInf_apply]\n[GOAL]\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nS : Set (Filtration I M)\ni : ℕ\n⊢ I • ⨅ (i_1 : ↑(N '' S)), ↑i_1 i ≤ ⨅ (i_1 : ↑(N '' S)), ↑i_1 (i + 1)\n[PROOFSTEP]\nrefine' Submodule.smul_iInf_le.trans _\n[GOAL]\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nS : Set (Filtration I M)\ni : ℕ\n⊢ ⨅ (i_1 : ↑(N '' S)), I • ↑i_1 i ≤ ⨅ (i_1 : ↑(N '' S)), ↑i_1 (i + 1)\n[PROOFSTEP]\napply iInf_mono _\n[GOAL]\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nS : Set (Filtration I M)\ni : ℕ\n⊢ ∀ (i_1 : ↑(N '' S)), I • ↑i_1 i ≤ ↑i_1 (i + 1)\n[PROOFSTEP]\nrintro ⟨_, F, hF, rfl⟩\n[GOAL]\ncase mk.intro.intro\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF✝ F' : Filtration I M\nS : Set (Filtration I M)\ni : ℕ\nF : Filtration I M\nhF : F ∈ S\n⊢ I • ↑{ val := F.N, property := (_ : ∃ a, a ∈ S ∧ a.N = F.N) } i ≤\n    ↑{ val := F.N, property := (_ : ∃ a, a ∈ S ∧ a.N = F.N) } (i + 1)\n[PROOFSTEP]\nexact F.smul_le i\n[GOAL]\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI✝ : Ideal R\nF F' : Filtration I✝ M\nI : Ideal R\nN : Submodule R M\ni : ℕ\n⊢ (fun i => I ^ i • N) (i + 1) ≤ (fun i => I ^ i • N) i\n[PROOFSTEP]\ndsimp only\n[GOAL]\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI✝ : Ideal R\nF F' : Filtration I✝ M\nI : Ideal R\nN : Submodule R M\ni : ℕ\n⊢ I ^ (i + 1) • N ≤ I ^ i • N\n[PROOFSTEP]\nrw [add_comm, pow_add, mul_smul]\n[GOAL]\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI✝ : Ideal R\nF F' : Filtration I✝ M\nI : Ideal R\nN : Submodule R M\ni : ℕ\n⊢ I ^ 1 • I ^ i • N ≤ I ^ i • N\n[PROOFSTEP]\nexact Submodule.smul_le_right\n[GOAL]\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI✝ : Ideal R\nF F' : Filtration I✝ M\nI : Ideal R\nN : Submodule R M\ni : ℕ\n⊢ I • (fun i => I ^ i • N) i ≤ (fun i => I ^ i • N) (i + 1)\n[PROOFSTEP]\ndsimp only\n[GOAL]\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI✝ : Ideal R\nF F' : Filtration I✝ M\nI : Ideal R\nN : Submodule R M\ni : ℕ\n⊢ I • I ^ i • N ≤ I ^ (i + 1) • N\n[PROOFSTEP]\nrw [add_comm, pow_add, mul_smul, pow_one]\n[GOAL]\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI✝ : Ideal R\nF F' : Filtration I✝ M\nI : Ideal R\nN : Submodule R M\n⊢ Stable (stableFiltration I N)\n[PROOFSTEP]\nuse 0\n[GOAL]\ncase h\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI✝ : Ideal R\nF F' : Filtration I✝ M\nI : Ideal R\nN : Submodule R M\n⊢ ∀ (n : ℕ), n ≥ 0 → I • Ideal.Filtration.N (stableFiltration I N) n = Ideal.Filtration.N (stableFiltration I N) (n + 1)\n[PROOFSTEP]\nintro n _\n[GOAL]\ncase h\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI✝ : Ideal R\nF F' : Filtration I✝ M\nI : Ideal R\nN : Submodule R M\nn : ℕ\na✝ : n ≥ 0\n⊢ I • Ideal.Filtration.N (stableFiltration I N) n = Ideal.Filtration.N (stableFiltration I N) (n + 1)\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI✝ : Ideal R\nF F' : Filtration I✝ M\nI : Ideal R\nN : Submodule R M\nn : ℕ\na✝ : n ≥ 0\n⊢ I • I ^ n • N = I ^ (n + 1) • N\n[PROOFSTEP]\nrw [add_comm, pow_add, mul_smul, pow_one]\n[GOAL]\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh : Stable F\n⊢ ∃ n₀, ∀ (k : ℕ), N F (n₀ + k) = I ^ k • N F n₀\n[PROOFSTEP]\nobtain ⟨n₀, hn⟩ := h\n[GOAL]\ncase intro\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nn₀ : ℕ\nhn : ∀ (n : ℕ), n ≥ n₀ → I • N F n = N F (n + 1)\n⊢ ∃ n₀, ∀ (k : ℕ), N F (n₀ + k) = I ^ k • N F n₀\n[PROOFSTEP]\nuse n₀\n[GOAL]\ncase h\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nn₀ : ℕ\nhn : ∀ (n : ℕ), n ≥ n₀ → I • N F n = N F (n + 1)\n⊢ ∀ (k : ℕ), N F (n₀ + k) = I ^ k • N F n₀\n[PROOFSTEP]\nintro k\n[GOAL]\ncase h\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nn₀ : ℕ\nhn : ∀ (n : ℕ), n ≥ n₀ → I • N F n = N F (n + 1)\nk : ℕ\n⊢ N F (n₀ + k) = I ^ k • N F n₀\n[PROOFSTEP]\ninduction' k with _ ih\n[GOAL]\ncase h.zero\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nn₀ : ℕ\nhn : ∀ (n : ℕ), n ≥ n₀ → I • N F n = N F (n + 1)\n⊢ N F (n₀ + Nat.zero) = I ^ Nat.zero • N F n₀\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.succ\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nn₀ : ℕ\nhn : ∀ (n : ℕ), n ≥ n₀ → I • N F n = N F (n + 1)\nn✝ : ℕ\nih : N F (n₀ + n✝) = I ^ n✝ • N F n₀\n⊢ N F (n₀ + Nat.succ n✝) = I ^ Nat.succ n✝ • N F n₀\n[PROOFSTEP]\nrw [Nat.succ_eq_add_one, ← add_assoc, ← hn, ih, add_comm, pow_add, mul_smul, pow_one]\n[GOAL]\ncase h.succ.a\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nn₀ : ℕ\nhn : ∀ (n : ℕ), n ≥ n₀ → I • N F n = N F (n + 1)\nn✝ : ℕ\nih : N F (n₀ + n✝) = I ^ n✝ • N F n₀\n⊢ n₀ + n✝ ≥ n₀\n[PROOFSTEP]\nlinarith\n[GOAL]\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh : Stable F\n⊢ ∃ n₀, ∀ (n : ℕ), n ≥ n₀ → N F n = I ^ (n - n₀) • N F n₀\n[PROOFSTEP]\nobtain ⟨n₀, hn₀⟩ := h.exists_pow_smul_eq\n[GOAL]\ncase intro\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh : Stable F\nn₀ : ℕ\nhn₀ : ∀ (k : ℕ), N F (n₀ + k) = I ^ k • N F n₀\n⊢ ∃ n₀, ∀ (n : ℕ), n ≥ n₀ → N F n = I ^ (n - n₀) • N F n₀\n[PROOFSTEP]\nuse n₀\n[GOAL]\ncase h\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh : Stable F\nn₀ : ℕ\nhn₀ : ∀ (k : ℕ), N F (n₀ + k) = I ^ k • N F n₀\n⊢ ∀ (n : ℕ), n ≥ n₀ → N F n = I ^ (n - n₀) • N F n₀\n[PROOFSTEP]\nintro n hn\n[GOAL]\ncase h\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh : Stable F\nn₀ : ℕ\nhn₀ : ∀ (k : ℕ), N F (n₀ + k) = I ^ k • N F n₀\nn : ℕ\nhn : n ≥ n₀\n⊢ N F n = I ^ (n - n₀) • N F n₀\n[PROOFSTEP]\nconvert hn₀ (n - n₀)\n[GOAL]\ncase h.e'_2.h.e'_8\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh : Stable F\nn₀ : ℕ\nhn₀ : ∀ (k : ℕ), N F (n₀ + k) = I ^ k • N F n₀\nn : ℕ\nhn : n ≥ n₀\n⊢ n = n₀ + (n - n₀)\n[PROOFSTEP]\nrw [add_comm, tsub_add_cancel_of_le hn]\n[GOAL]\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh : Stable F\n⊢ Stable F ↔ ∃ n₀, ∀ (n : ℕ), n ≥ n₀ → N F n = I ^ (n - n₀) • N F n₀\n[PROOFSTEP]\nrefine' ⟨Stable.exists_pow_smul_eq_of_ge, fun h => ⟨h.choose, fun n hn => _⟩⟩\n[GOAL]\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh✝ : Stable F\nh : ∃ n₀, ∀ (n : ℕ), n ≥ n₀ → N F n = I ^ (n - n₀) • N F n₀\nn : ℕ\nhn : n ≥ Exists.choose h\n⊢ I • N F n = N F (n + 1)\n[PROOFSTEP]\nrw [h.choose_spec n hn, h.choose_spec (n + 1) (by linarith), smul_smul, ← pow_succ, tsub_add_eq_add_tsub hn]\n[GOAL]\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh✝ : Stable F\nh : ∃ n₀, ∀ (n : ℕ), n ≥ n₀ → N F n = I ^ (n - n₀) • N F n₀\nn : ℕ\nhn : n ≥ Exists.choose h\n⊢ n + 1 ≥ Exists.choose h\n[PROOFSTEP]\nlinarith\n[GOAL]\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh✝ h : Stable F\ne : N F 0 ≤ N F' 0\n⊢ ∃ n₀, ∀ (n : ℕ), N F (n + n₀) ≤ N F' n\n[PROOFSTEP]\nobtain ⟨n₀, hF⟩ := h\n[GOAL]\ncase intro\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh : Stable F\ne : N F 0 ≤ N F' 0\nn₀ : ℕ\nhF : ∀ (n : ℕ), n ≥ n₀ → I • N F n = N F (n + 1)\n⊢ ∃ n₀, ∀ (n : ℕ), N F (n + n₀) ≤ N F' n\n[PROOFSTEP]\nuse n₀\n[GOAL]\ncase h\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh : Stable F\ne : N F 0 ≤ N F' 0\nn₀ : ℕ\nhF : ∀ (n : ℕ), n ≥ n₀ → I • N F n = N F (n + 1)\n⊢ ∀ (n : ℕ), N F (n + n₀) ≤ N F' n\n[PROOFSTEP]\nintro n\n[GOAL]\ncase h\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh : Stable F\ne : N F 0 ≤ N F' 0\nn₀ : ℕ\nhF : ∀ (n : ℕ), n ≥ n₀ → I • N F n = N F (n + 1)\nn : ℕ\n⊢ N F (n + n₀) ≤ N F' n\n[PROOFSTEP]\ninduction' n with n hn\n[GOAL]\ncase h.zero\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh : Stable F\ne : N F 0 ≤ N F' 0\nn₀ : ℕ\nhF : ∀ (n : ℕ), n ≥ n₀ → I • N F n = N F (n + 1)\n⊢ N F (Nat.zero + n₀) ≤ N F' Nat.zero\n[PROOFSTEP]\nrefine' (F.antitone _).trans e\n[GOAL]\ncase h.zero\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh : Stable F\ne : N F 0 ≤ N F' 0\nn₀ : ℕ\nhF : ∀ (n : ℕ), n ≥ n₀ → I • N F n = N F (n + 1)\n⊢ 0 ≤ Nat.zero + n₀\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.succ\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh : Stable F\ne : N F 0 ≤ N F' 0\nn₀ : ℕ\nhF : ∀ (n : ℕ), n ≥ n₀ → I • N F n = N F (n + 1)\nn : ℕ\nhn : N F (n + n₀) ≤ N F' n\n⊢ N F (Nat.succ n + n₀) ≤ N F' (Nat.succ n)\n[PROOFSTEP]\nrw [Nat.succ_eq_one_add, add_assoc, add_comm, add_comm 1 n, ← hF]\n[GOAL]\ncase h.succ\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh : Stable F\ne : N F 0 ≤ N F' 0\nn₀ : ℕ\nhF : ∀ (n : ℕ), n ≥ n₀ → I • N F n = N F (n + 1)\nn : ℕ\nhn : N F (n + n₀) ≤ N F' n\n⊢ I • N F (n + n₀) ≤ N F' (n + 1)\ncase h.succ.a\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh : Stable F\ne : N F 0 ≤ N F' 0\nn₀ : ℕ\nhF : ∀ (n : ℕ), n ≥ n₀ → I • N F n = N F (n + 1)\nn : ℕ\nhn : N F (n + n₀) ≤ N F' n\n⊢ n + n₀ ≥ n₀\n[PROOFSTEP]\nexact (Submodule.smul_mono_right hn).trans (F'.smul_le _)\n[GOAL]\ncase h.succ.a\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh : Stable F\ne : N F 0 ≤ N F' 0\nn₀ : ℕ\nhF : ∀ (n : ℕ), n ≥ n₀ → I • N F n = N F (n + 1)\nn : ℕ\nhn : N F (n + n₀) ≤ N F' n\n⊢ n + n₀ ≥ n₀\n[PROOFSTEP]\nsimp\n[GOAL]\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh✝ h : Stable F\nh' : Stable F'\ne : N F 0 = N F' 0\n⊢ ∃ n₀, ∀ (n : ℕ), N F (n + n₀) ≤ N F' n ∧ N F' (n + n₀) ≤ N F n\n[PROOFSTEP]\nobtain ⟨n₁, h₁⟩ := h.exists_forall_le (le_of_eq e)\n[GOAL]\ncase intro\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh✝ h : Stable F\nh' : Stable F'\ne : N F 0 = N F' 0\nn₁ : ℕ\nh₁ : ∀ (n : ℕ), N F (n + n₁) ≤ N F' n\n⊢ ∃ n₀, ∀ (n : ℕ), N F (n + n₀) ≤ N F' n ∧ N F' (n + n₀) ≤ N F n\n[PROOFSTEP]\nobtain ⟨n₂, h₂⟩ := h'.exists_forall_le (le_of_eq e.symm)\n[GOAL]\ncase intro.intro\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh✝ h : Stable F\nh' : Stable F'\ne : N F 0 = N F' 0\nn₁ : ℕ\nh₁ : ∀ (n : ℕ), N F (n + n₁) ≤ N F' n\nn₂ : ℕ\nh₂ : ∀ (n : ℕ), N F' (n + n₂) ≤ N F n\n⊢ ∃ n₀, ∀ (n : ℕ), N F (n + n₀) ≤ N F' n ∧ N F' (n + n₀) ≤ N F n\n[PROOFSTEP]\nuse max n₁ n₂\n[GOAL]\ncase h\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh✝ h : Stable F\nh' : Stable F'\ne : N F 0 = N F' 0\nn₁ : ℕ\nh₁ : ∀ (n : ℕ), N F (n + n₁) ≤ N F' n\nn₂ : ℕ\nh₂ : ∀ (n : ℕ), N F' (n + n₂) ≤ N F n\n⊢ ∀ (n : ℕ), N F (n + max n₁ n₂) ≤ N F' n ∧ N F' (n + max n₁ n₂) ≤ N F n\n[PROOFSTEP]\nintro n\n[GOAL]\ncase h\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh✝ h : Stable F\nh' : Stable F'\ne : N F 0 = N F' 0\nn₁ : ℕ\nh₁ : ∀ (n : ℕ), N F (n + n₁) ≤ N F' n\nn₂ : ℕ\nh₂ : ∀ (n : ℕ), N F' (n + n₂) ≤ N F n\nn : ℕ\n⊢ N F (n + max n₁ n₂) ≤ N F' n ∧ N F' (n + max n₁ n₂) ≤ N F n\n[PROOFSTEP]\nrefine' ⟨(F.antitone _).trans (h₁ n), (F'.antitone _).trans (h₂ n)⟩\n[GOAL]\ncase h.refine'_1\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh✝ h : Stable F\nh' : Stable F'\ne : N F 0 = N F' 0\nn₁ : ℕ\nh₁ : ∀ (n : ℕ), N F (n + n₁) ≤ N F' n\nn₂ : ℕ\nh₂ : ∀ (n : ℕ), N F' (n + n₂) ≤ N F n\nn : ℕ\n⊢ n + n₁ ≤ n + max n₁ n₂\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.refine'_2\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh✝ h : Stable F\nh' : Stable F'\ne : N F 0 = N F' 0\nn₁ : ℕ\nh₁ : ∀ (n : ℕ), N F (n + n₁) ≤ N F' n\nn₂ : ℕ\nh₂ : ∀ (n : ℕ), N F' (n + n₂) ≤ N F n\nn : ℕ\n⊢ n + n₂ ≤ n + max n₁ n₂\n[PROOFSTEP]\nsimp\n[GOAL]\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh : Stable F\nr : { x // x ∈ reesAlgebra I }\nf : PolynomialModule R M\nhf :\n  f ∈\n    {\n          toAddSubsemigroup :=\n            { carrier := {f | ∀ (i : ℕ), ↑f i ∈ N F i},\n              add_mem' :=\n                (_ :\n                  ∀ {a b : PolynomialModule R M},\n                    a ∈ {f | ∀ (i : ℕ), ↑f i ∈ N F i} →\n                      b ∈ {f | ∀ (i : ℕ), ↑f i ∈ N F i} → ∀ (i : ℕ), ↑a i + ↑b i ∈ N F i) },\n          zero_mem' := (_ : ∀ (i : ℕ), 0 ∈ N F i) }.toAddSubsemigroup.carrier\ni : ℕ\n⊢ ↑(r • f) i ∈ N F i\n[PROOFSTEP]\nrw [Subalgebra.smul_def, PolynomialModule.smul_apply]\n[GOAL]\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh : Stable F\nr : { x // x ∈ reesAlgebra I }\nf : PolynomialModule R M\nhf :\n  f ∈\n    {\n          toAddSubsemigroup :=\n            { carrier := {f | ∀ (i : ℕ), ↑f i ∈ N F i},\n              add_mem' :=\n                (_ :\n                  ∀ {a b : PolynomialModule R M},\n                    a ∈ {f | ∀ (i : ℕ), ↑f i ∈ N F i} →\n                      b ∈ {f | ∀ (i : ℕ), ↑f i ∈ N F i} → ∀ (i : ℕ), ↑a i + ↑b i ∈ N F i) },\n          zero_mem' := (_ : ∀ (i : ℕ), 0 ∈ N F i) }.toAddSubsemigroup.carrier\ni : ℕ\n⊢ ∑ x in Finset.Nat.antidiagonal i, coeff (↑r) x.fst • ↑f x.snd ∈ N F i\n[PROOFSTEP]\napply Submodule.sum_mem\n[GOAL]\ncase a\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh : Stable F\nr : { x // x ∈ reesAlgebra I }\nf : PolynomialModule R M\nhf :\n  f ∈\n    {\n          toAddSubsemigroup :=\n            { carrier := {f | ∀ (i : ℕ), ↑f i ∈ N F i},\n              add_mem' :=\n                (_ :\n                  ∀ {a b : PolynomialModule R M},\n                    a ∈ {f | ∀ (i : ℕ), ↑f i ∈ N F i} →\n                      b ∈ {f | ∀ (i : ℕ), ↑f i ∈ N F i} → ∀ (i : ℕ), ↑a i + ↑b i ∈ N F i) },\n          zero_mem' := (_ : ∀ (i : ℕ), 0 ∈ N F i) }.toAddSubsemigroup.carrier\ni : ℕ\n⊢ ∀ (c : ℕ × ℕ), c ∈ Finset.Nat.antidiagonal i → coeff (↑r) c.fst • ↑f c.snd ∈ N F i\n[PROOFSTEP]\nrintro ⟨j, k⟩ e\n[GOAL]\ncase a.mk\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh : Stable F\nr : { x // x ∈ reesAlgebra I }\nf : PolynomialModule R M\nhf :\n  f ∈\n    {\n          toAddSubsemigroup :=\n            { carrier := {f | ∀ (i : ℕ), ↑f i ∈ N F i},\n              add_mem' :=\n                (_ :\n                  ∀ {a b : PolynomialModule R M},\n                    a ∈ {f | ∀ (i : ℕ), ↑f i ∈ N F i} →\n                      b ∈ {f | ∀ (i : ℕ), ↑f i ∈ N F i} → ∀ (i : ℕ), ↑a i + ↑b i ∈ N F i) },\n          zero_mem' := (_ : ∀ (i : ℕ), 0 ∈ N F i) }.toAddSubsemigroup.carrier\ni j k : ℕ\ne : (j, k) ∈ Finset.Nat.antidiagonal i\n⊢ coeff ↑r (j, k).fst • ↑f (j, k).snd ∈ N F i\n[PROOFSTEP]\nrw [Finset.Nat.mem_antidiagonal] at e \n[GOAL]\ncase a.mk\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh : Stable F\nr : { x // x ∈ reesAlgebra I }\nf : PolynomialModule R M\nhf :\n  f ∈\n    {\n          toAddSubsemigroup :=\n            { carrier := {f | ∀ (i : ℕ), ↑f i ∈ N F i},\n              add_mem' :=\n                (_ :\n                  ∀ {a b : PolynomialModule R M},\n                    a ∈ {f | ∀ (i : ℕ), ↑f i ∈ N F i} →\n                      b ∈ {f | ∀ (i : ℕ), ↑f i ∈ N F i} → ∀ (i : ℕ), ↑a i + ↑b i ∈ N F i) },\n          zero_mem' := (_ : ∀ (i : ℕ), 0 ∈ N F i) }.toAddSubsemigroup.carrier\ni j k : ℕ\ne : (j, k).fst + (j, k).snd = i\n⊢ coeff ↑r (j, k).fst • ↑f (j, k).snd ∈ N F i\n[PROOFSTEP]\nsubst e\n[GOAL]\ncase a.mk\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh : Stable F\nr : { x // x ∈ reesAlgebra I }\nf : PolynomialModule R M\nhf :\n  f ∈\n    {\n          toAddSubsemigroup :=\n            { carrier := {f | ∀ (i : ℕ), ↑f i ∈ N F i},\n              add_mem' :=\n                (_ :\n                  ∀ {a b : PolynomialModule R M},\n                    a ∈ {f | ∀ (i : ℕ), ↑f i ∈ N F i} →\n                      b ∈ {f | ∀ (i : ℕ), ↑f i ∈ N F i} → ∀ (i : ℕ), ↑a i + ↑b i ∈ N F i) },\n          zero_mem' := (_ : ∀ (i : ℕ), 0 ∈ N F i) }.toAddSubsemigroup.carrier\nj k : ℕ\n⊢ coeff ↑r (j, k).fst • ↑f (j, k).snd ∈ N F ((j, k).fst + (j, k).snd)\n[PROOFSTEP]\nexact F.pow_smul_le j k (Submodule.smul_mem_smul (r.2 j) (hf k))\n[GOAL]\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh : Stable F\n⊢ Filtration.submodule (F ⊓ F') = Filtration.submodule F ⊓ Filtration.submodule F'\n[PROOFSTEP]\next\n[GOAL]\ncase h\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh : Stable F\nx✝ : PolynomialModule R M\n⊢ x✝ ∈ Filtration.submodule (F ⊓ F') ↔ x✝ ∈ Filtration.submodule F ⊓ Filtration.submodule F'\n[PROOFSTEP]\nexact forall_and\n[GOAL]\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh : Stable F\n⊢ AddSubmonoid.closure (⋃ (i : ℕ), ↑(single R i) '' ↑(N F i)) = (Filtration.submodule F).toAddSubmonoid\n[PROOFSTEP]\napply le_antisymm\n[GOAL]\ncase a\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh : Stable F\n⊢ AddSubmonoid.closure (⋃ (i : ℕ), ↑(single R i) '' ↑(N F i)) ≤ (Filtration.submodule F).toAddSubmonoid\n[PROOFSTEP]\nrw [AddSubmonoid.closure_le, Set.iUnion_subset_iff]\n[GOAL]\ncase a\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh : Stable F\n⊢ ∀ (i : ℕ), ↑(single R i) '' ↑(N F i) ⊆ ↑(Filtration.submodule F).toAddSubmonoid\n[PROOFSTEP]\nrintro i _ ⟨m, hm, rfl⟩ j\n[GOAL]\ncase a.intro.intro\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh : Stable F\ni : ℕ\nm : M\nhm : m ∈ ↑(N F i)\nj : ℕ\n⊢ ↑(↑(single R i) m) j ∈ N F j\n[PROOFSTEP]\nrw [single_apply]\n[GOAL]\ncase a.intro.intro\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh : Stable F\ni : ℕ\nm : M\nhm : m ∈ ↑(N F i)\nj : ℕ\n⊢ (if i = j then m else 0) ∈ N F j\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh✝ : Stable F\ni : ℕ\nm : M\nhm : m ∈ ↑(N F i)\nj : ℕ\nh : i = j\n⊢ m ∈ N F j\n[PROOFSTEP]\nrwa [← h]\n[GOAL]\ncase neg\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh✝ : Stable F\ni : ℕ\nm : M\nhm : m ∈ ↑(N F i)\nj : ℕ\nh : ¬i = j\n⊢ 0 ∈ N F j\n[PROOFSTEP]\nexact (F.N j).zero_mem\n[GOAL]\ncase a\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh : Stable F\n⊢ (Filtration.submodule F).toAddSubmonoid ≤ AddSubmonoid.closure (⋃ (i : ℕ), ↑(single R i) '' ↑(N F i))\n[PROOFSTEP]\nintro f hf\n[GOAL]\ncase a\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh : Stable F\nf : PolynomialModule R M\nhf : f ∈ (Filtration.submodule F).toAddSubmonoid\n⊢ f ∈ AddSubmonoid.closure (⋃ (i : ℕ), ↑(single R i) '' ↑(N F i))\n[PROOFSTEP]\nrw [← f.sum_single]\n[GOAL]\ncase a\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh : Stable F\nf : PolynomialModule R M\nhf : f ∈ (Filtration.submodule F).toAddSubmonoid\n⊢ Finsupp.sum f Finsupp.single ∈ AddSubmonoid.closure (⋃ (i : ℕ), ↑(single R i) '' ↑(N F i))\n[PROOFSTEP]\napply AddSubmonoid.sum_mem _ _\n[GOAL]\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh : Stable F\nf : PolynomialModule R M\nhf : f ∈ (Filtration.submodule F).toAddSubmonoid\n⊢ ∀ (c : ℕ), c ∈ f.support → Finsupp.single c (↑f c) ∈ AddSubmonoid.closure (⋃ (i : ℕ), ↑(single R i) '' ↑(N F i))\n[PROOFSTEP]\nrintro c -\n[GOAL]\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh : Stable F\nf : PolynomialModule R M\nhf : f ∈ (Filtration.submodule F).toAddSubmonoid\nc : ℕ\n⊢ Finsupp.single c (↑f c) ∈ AddSubmonoid.closure (⋃ (i : ℕ), ↑(single R i) '' ↑(N F i))\n[PROOFSTEP]\nexact AddSubmonoid.subset_closure (Set.subset_iUnion _ c <| Set.mem_image_of_mem _ (hf c))\n[GOAL]\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh : Stable F\n⊢ Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ), ↑(single R i) '' ↑(N F i)) = Filtration.submodule F\n[PROOFSTEP]\nrw [← Submodule.span_closure, submodule_closure_single, Submodule.coe_toAddSubmonoid]\n[GOAL]\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh : Stable F\n⊢ Submodule.span { x // x ∈ reesAlgebra I } ↑(Filtration.submodule F) = Filtration.submodule F\n[PROOFSTEP]\nexact Submodule.span_eq (Filtration.submodule F)\n[GOAL]\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh : Stable F\nn₀ : ℕ\n⊢ Filtration.submodule F =\n      Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i)) ↔\n    ∀ (n : ℕ), n ≥ n₀ → I • N F n = N F (n + 1)\n[PROOFSTEP]\nrw [← submodule_span_single, ← LE.le.le_iff_eq, Submodule.span_le, Set.iUnion_subset_iff]\n[GOAL]\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh : Stable F\nn₀ : ℕ\n⊢ (∀ (i : ℕ),\n      ↑(single R i) '' ↑(N F i) ⊆\n        ↑(Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i)))) ↔\n    ∀ (n : ℕ), n ≥ n₀ → I • N F n = N F (n + 1)\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh : Stable F\nn₀ : ℕ\n⊢ Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i)) ≤\n    Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ), ↑(single R i) '' ↑(N F i))\n[PROOFSTEP]\nswap\n[GOAL]\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh : Stable F\nn₀ : ℕ\n⊢ Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i)) ≤\n    Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ), ↑(single R i) '' ↑(N F i))\n[PROOFSTEP]\nexact Submodule.span_mono (Set.iUnion₂_subset_iUnion _ _)\n[GOAL]\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh : Stable F\nn₀ : ℕ\n⊢ (∀ (i : ℕ),\n      ↑(single R i) '' ↑(N F i) ⊆\n        ↑(Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i)))) ↔\n    ∀ (n : ℕ), n ≥ n₀ → I • N F n = N F (n + 1)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh : Stable F\nn₀ : ℕ\n⊢ (∀ (i : ℕ),\n      ↑(single R i) '' ↑(N F i) ⊆\n        ↑(Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i)))) →\n    ∀ (n : ℕ), n ≥ n₀ → I • N F n = N F (n + 1)\n[PROOFSTEP]\nintro H n hn\n[GOAL]\ncase mp\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh : Stable F\nn₀ : ℕ\nH :\n  ∀ (i : ℕ),\n    ↑(single R i) '' ↑(N F i) ⊆\n      ↑(Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i)))\nn : ℕ\nhn : n ≥ n₀\n⊢ I • N F n = N F (n + 1)\n[PROOFSTEP]\nrefine' (F.smul_le n).antisymm _\n[GOAL]\ncase mp\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh : Stable F\nn₀ : ℕ\nH :\n  ∀ (i : ℕ),\n    ↑(single R i) '' ↑(N F i) ⊆\n      ↑(Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i)))\nn : ℕ\nhn : n ≥ n₀\n⊢ N F (n + 1) ≤ I • N F n\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase mp\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh : Stable F\nn₀ : ℕ\nH :\n  ∀ (i : ℕ),\n    ↑(single R i) '' ↑(N F i) ⊆\n      ↑(Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i)))\nn : ℕ\nhn : n ≥ n₀\nx : M\nhx : x ∈ N F (n + 1)\n⊢ x ∈ I • N F n\n[PROOFSTEP]\nobtain ⟨l, hl⟩ := (Finsupp.mem_span_iff_total _ _ _).mp (H _ ⟨x, hx, rfl⟩)\n[GOAL]\ncase mp.intro\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh : Stable F\nn₀ : ℕ\nH :\n  ∀ (i : ℕ),\n    ↑(single R i) '' ↑(N F i) ⊆\n      ↑(Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i)))\nn : ℕ\nhn : n ≥ n₀\nx : M\nhx : x ∈ N F (n + 1)\nl : ↑(⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i)) →₀ { x // x ∈ reesAlgebra I }\nhl :\n  ↑(Finsupp.total (↑(⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i))) (PolynomialModule R M)\n          { x // x ∈ reesAlgebra I } Subtype.val)\n      l =\n    ↑(single R (n + 1)) x\n⊢ x ∈ I • N F n\n[PROOFSTEP]\nreplace hl := congr_arg (fun f : ℕ →₀ M => f (n + 1)) hl\n[GOAL]\ncase mp.intro\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh : Stable F\nn₀ : ℕ\nH :\n  ∀ (i : ℕ),\n    ↑(single R i) '' ↑(N F i) ⊆\n      ↑(Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i)))\nn : ℕ\nhn : n ≥ n₀\nx : M\nhx : x ∈ N F (n + 1)\nl : ↑(⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i)) →₀ { x // x ∈ reesAlgebra I }\nhl :\n  (fun f => ↑f (n + 1))\n      (↑(Finsupp.total (↑(⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i))) (PolynomialModule R M)\n            { x // x ∈ reesAlgebra I } Subtype.val)\n        l) =\n    (fun f => ↑f (n + 1)) (↑(single R (n + 1)) x)\n⊢ x ∈ I • N F n\n[PROOFSTEP]\ndsimp only at hl \n[GOAL]\ncase mp.intro\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh : Stable F\nn₀ : ℕ\nH :\n  ∀ (i : ℕ),\n    ↑(single R i) '' ↑(N F i) ⊆\n      ↑(Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i)))\nn : ℕ\nhn : n ≥ n₀\nx : M\nhx : x ∈ N F (n + 1)\nl : ↑(⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i)) →₀ { x // x ∈ reesAlgebra I }\nhl :\n  ↑(↑(Finsupp.total (↑(⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i))) (PolynomialModule R M)\n              { x // x ∈ reesAlgebra I } Subtype.val)\n          l)\n      (n + 1) =\n    ↑(↑(single R (n + 1)) x) (n + 1)\n⊢ x ∈ I • N F n\n[PROOFSTEP]\nerw [Finsupp.single_eq_same] at hl \n[GOAL]\ncase mp.intro\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh : Stable F\nn₀ : ℕ\nH :\n  ∀ (i : ℕ),\n    ↑(single R i) '' ↑(N F i) ⊆\n      ↑(Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i)))\nn : ℕ\nhn : n ≥ n₀\nx : M\nhx : x ∈ N F (n + 1)\nl : ↑(⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i)) →₀ { x // x ∈ reesAlgebra I }\nhl :\n  ↑(↑(Finsupp.total (↑(⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i))) (PolynomialModule R M)\n              { x // x ∈ reesAlgebra I } Subtype.val)\n          l)\n      (n + 1) =\n    x\n⊢ x ∈ I • N F n\n[PROOFSTEP]\nrw [← hl, Finsupp.total_apply, Finsupp.sum_apply]\n[GOAL]\ncase mp.intro\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh : Stable F\nn₀ : ℕ\nH :\n  ∀ (i : ℕ),\n    ↑(single R i) '' ↑(N F i) ⊆\n      ↑(Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i)))\nn : ℕ\nhn : n ≥ n₀\nx : M\nhx : x ∈ N F (n + 1)\nl : ↑(⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i)) →₀ { x // x ∈ reesAlgebra I }\nhl :\n  ↑(↑(Finsupp.total (↑(⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i))) (PolynomialModule R M)\n              { x // x ∈ reesAlgebra I } Subtype.val)\n          l)\n      (n + 1) =\n    x\n⊢ (Finsupp.sum l fun a₁ b => ↑(b • ↑a₁) (n + 1)) ∈ I • N F n\n[PROOFSTEP]\napply Submodule.sum_mem _ _\n[GOAL]\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh : Stable F\nn₀ : ℕ\nH :\n  ∀ (i : ℕ),\n    ↑(single R i) '' ↑(N F i) ⊆\n      ↑(Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i)))\nn : ℕ\nhn : n ≥ n₀\nx : M\nhx : x ∈ N F (n + 1)\nl : ↑(⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i)) →₀ { x // x ∈ reesAlgebra I }\nhl :\n  ↑(↑(Finsupp.total (↑(⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i))) (PolynomialModule R M)\n              { x // x ∈ reesAlgebra I } Subtype.val)\n          l)\n      (n + 1) =\n    x\n⊢ ∀ (c : ↑(⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i))),\n    c ∈ l.support → (fun a₁ b => ↑(b • ↑a₁) (n + 1)) c (↑l c) ∈ I • N F n\n[PROOFSTEP]\nrintro ⟨_, _, ⟨n', rfl⟩, _, ⟨hn', rfl⟩, m, hm, rfl⟩ -\n[GOAL]\ncase mk.intro.intro.intro.intro.intro.intro.intro.intro\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh : Stable F\nn₀ : ℕ\nH :\n  ∀ (i : ℕ),\n    ↑(single R i) '' ↑(N F i) ⊆\n      ↑(Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i)))\nn : ℕ\nhn : n ≥ n₀\nx : M\nhx : x ∈ N F (n + 1)\nl : ↑(⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i)) →₀ { x // x ∈ reesAlgebra I }\nhl :\n  ↑(↑(Finsupp.total (↑(⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i))) (PolynomialModule R M)\n              { x // x ∈ reesAlgebra I } Subtype.val)\n          l)\n      (n + 1) =\n    x\nn' : ℕ\nhn' : n' ≤ n₀\nm : M\nhm : m ∈ ↑(N F n')\n⊢ (fun a₁ b => ↑(b • ↑a₁) (n + 1))\n      { val := ↑(single R n') m,\n        property :=\n          (_ : ∃ t, (t ∈ Set.range fun i => ⋃ (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i)) ∧ ↑(single R n') m ∈ t) }\n      (↑l\n        { val := ↑(single R n') m,\n          property :=\n            (_ : ∃ t, (t ∈ Set.range fun i => ⋃ (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i)) ∧ ↑(single R n') m ∈ t) }) ∈\n    I • N F n\n[PROOFSTEP]\ndsimp only [Subtype.coe_mk]\n[GOAL]\ncase mk.intro.intro.intro.intro.intro.intro.intro.intro\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh : Stable F\nn₀ : ℕ\nH :\n  ∀ (i : ℕ),\n    ↑(single R i) '' ↑(N F i) ⊆\n      ↑(Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i)))\nn : ℕ\nhn : n ≥ n₀\nx : M\nhx : x ∈ N F (n + 1)\nl : ↑(⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i)) →₀ { x // x ∈ reesAlgebra I }\nhl :\n  ↑(↑(Finsupp.total (↑(⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i))) (PolynomialModule R M)\n              { x // x ∈ reesAlgebra I } Subtype.val)\n          l)\n      (n + 1) =\n    x\nn' : ℕ\nhn' : n' ≤ n₀\nm : M\nhm : m ∈ ↑(N F n')\n⊢ ↑(↑l\n            { val := ↑(single R n') m,\n              property :=\n                (_ : ∃ t, (t ∈ Set.range fun i => ⋃ (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i)) ∧ ↑(single R n') m ∈ t) } •\n          ↑(single R n') m)\n      (n + 1) ∈\n    I • N F n\n[PROOFSTEP]\nrw [Subalgebra.smul_def, smul_single_apply, if_pos (show n' ≤ n + 1 by linarith)]\n[GOAL]\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh : Stable F\nn₀ : ℕ\nH :\n  ∀ (i : ℕ),\n    ↑(single R i) '' ↑(N F i) ⊆\n      ↑(Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i)))\nn : ℕ\nhn : n ≥ n₀\nx : M\nhx : x ∈ N F (n + 1)\nl : ↑(⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i)) →₀ { x // x ∈ reesAlgebra I }\nhl :\n  ↑(↑(Finsupp.total (↑(⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i))) (PolynomialModule R M)\n              { x // x ∈ reesAlgebra I } Subtype.val)\n          l)\n      (n + 1) =\n    x\nn' : ℕ\nhn' : n' ≤ n₀\nm : M\nhm : m ∈ ↑(N F n')\n⊢ n' ≤ n + 1\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase mk.intro.intro.intro.intro.intro.intro.intro.intro\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh : Stable F\nn₀ : ℕ\nH :\n  ∀ (i : ℕ),\n    ↑(single R i) '' ↑(N F i) ⊆\n      ↑(Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i)))\nn : ℕ\nhn : n ≥ n₀\nx : M\nhx : x ∈ N F (n + 1)\nl : ↑(⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i)) →₀ { x // x ∈ reesAlgebra I }\nhl :\n  ↑(↑(Finsupp.total (↑(⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i))) (PolynomialModule R M)\n              { x // x ∈ reesAlgebra I } Subtype.val)\n          l)\n      (n + 1) =\n    x\nn' : ℕ\nhn' : n' ≤ n₀\nm : M\nhm : m ∈ ↑(N F n')\n⊢ coeff\n        (↑(↑l\n            { val := ↑(single R n') m,\n              property :=\n                (_ : ∃ t, (t ∈ Set.range fun i => ⋃ (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i)) ∧ ↑(single R n') m ∈ t) }))\n        (n + 1 - n') •\n      m ∈\n    I • N F n\n[PROOFSTEP]\nhave e : n' ≤ n := by linarith\n[GOAL]\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh : Stable F\nn₀ : ℕ\nH :\n  ∀ (i : ℕ),\n    ↑(single R i) '' ↑(N F i) ⊆\n      ↑(Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i)))\nn : ℕ\nhn : n ≥ n₀\nx : M\nhx : x ∈ N F (n + 1)\nl : ↑(⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i)) →₀ { x // x ∈ reesAlgebra I }\nhl :\n  ↑(↑(Finsupp.total (↑(⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i))) (PolynomialModule R M)\n              { x // x ∈ reesAlgebra I } Subtype.val)\n          l)\n      (n + 1) =\n    x\nn' : ℕ\nhn' : n' ≤ n₀\nm : M\nhm : m ∈ ↑(N F n')\n⊢ n' ≤ n\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase mk.intro.intro.intro.intro.intro.intro.intro.intro\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh : Stable F\nn₀ : ℕ\nH :\n  ∀ (i : ℕ),\n    ↑(single R i) '' ↑(N F i) ⊆\n      ↑(Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i)))\nn : ℕ\nhn : n ≥ n₀\nx : M\nhx : x ∈ N F (n + 1)\nl : ↑(⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i)) →₀ { x // x ∈ reesAlgebra I }\nhl :\n  ↑(↑(Finsupp.total (↑(⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i))) (PolynomialModule R M)\n              { x // x ∈ reesAlgebra I } Subtype.val)\n          l)\n      (n + 1) =\n    x\nn' : ℕ\nhn' : n' ≤ n₀\nm : M\nhm : m ∈ ↑(N F n')\ne : n' ≤ n\n⊢ coeff\n        (↑(↑l\n            { val := ↑(single R n') m,\n              property :=\n                (_ : ∃ t, (t ∈ Set.range fun i => ⋃ (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i)) ∧ ↑(single R n') m ∈ t) }))\n        (n + 1 - n') •\n      m ∈\n    I • N F n\n[PROOFSTEP]\nhave := F.pow_smul_le_pow_smul (n - n') n' 1\n[GOAL]\ncase mk.intro.intro.intro.intro.intro.intro.intro.intro\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh : Stable F\nn₀ : ℕ\nH :\n  ∀ (i : ℕ),\n    ↑(single R i) '' ↑(N F i) ⊆\n      ↑(Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i)))\nn : ℕ\nhn : n ≥ n₀\nx : M\nhx : x ∈ N F (n + 1)\nl : ↑(⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i)) →₀ { x // x ∈ reesAlgebra I }\nhl :\n  ↑(↑(Finsupp.total (↑(⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i))) (PolynomialModule R M)\n              { x // x ∈ reesAlgebra I } Subtype.val)\n          l)\n      (n + 1) =\n    x\nn' : ℕ\nhn' : n' ≤ n₀\nm : M\nhm : m ∈ ↑(N F n')\ne : n' ≤ n\nthis : I ^ (n - n' + 1) • N F n' ≤ I ^ 1 • N F (n - n' + n')\n⊢ coeff\n        (↑(↑l\n            { val := ↑(single R n') m,\n              property :=\n                (_ : ∃ t, (t ∈ Set.range fun i => ⋃ (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i)) ∧ ↑(single R n') m ∈ t) }))\n        (n + 1 - n') •\n      m ∈\n    I • N F n\n[PROOFSTEP]\nrw [tsub_add_cancel_of_le e, pow_one, add_comm _ 1, ← add_tsub_assoc_of_le e, add_comm] at this \n[GOAL]\ncase mk.intro.intro.intro.intro.intro.intro.intro.intro\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh : Stable F\nn₀ : ℕ\nH :\n  ∀ (i : ℕ),\n    ↑(single R i) '' ↑(N F i) ⊆\n      ↑(Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i)))\nn : ℕ\nhn : n ≥ n₀\nx : M\nhx : x ∈ N F (n + 1)\nl : ↑(⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i)) →₀ { x // x ∈ reesAlgebra I }\nhl :\n  ↑(↑(Finsupp.total (↑(⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i))) (PolynomialModule R M)\n              { x // x ∈ reesAlgebra I } Subtype.val)\n          l)\n      (n + 1) =\n    x\nn' : ℕ\nhn' : n' ≤ n₀\nm : M\nhm : m ∈ ↑(N F n')\ne : n' ≤ n\nthis : I ^ (n + 1 - n') • N F n' ≤ I • N F n\n⊢ coeff\n        (↑(↑l\n            { val := ↑(single R n') m,\n              property :=\n                (_ : ∃ t, (t ∈ Set.range fun i => ⋃ (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i)) ∧ ↑(single R n') m ∈ t) }))\n        (n + 1 - n') •\n      m ∈\n    I • N F n\n[PROOFSTEP]\nexact this (Submodule.smul_mem_smul ((l _).2 <| n + 1 - n') hm)\n[GOAL]\ncase mpr\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh : Stable F\nn₀ : ℕ\n⊢ (∀ (n : ℕ), n ≥ n₀ → I • N F n = N F (n + 1)) →\n    ∀ (i : ℕ),\n      ↑(single R i) '' ↑(N F i) ⊆\n        ↑(Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i)))\n[PROOFSTEP]\nlet F' := Submodule.span (reesAlgebra I) (⋃ i ≤ n₀, single R i '' (F.N i : Set M))\n[GOAL]\ncase mpr\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F'✝ : Filtration I M\nh : Stable F\nn₀ : ℕ\nF' : Submodule { x // x ∈ reesAlgebra I } (PolynomialModule R M) :=\n  Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i))\n⊢ (∀ (n : ℕ), n ≥ n₀ → I • N F n = N F (n + 1)) →\n    ∀ (i : ℕ),\n      ↑(single R i) '' ↑(N F i) ⊆\n        ↑(Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i)))\n[PROOFSTEP]\nintro hF i\n[GOAL]\ncase mpr\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F'✝ : Filtration I M\nh : Stable F\nn₀ : ℕ\nF' : Submodule { x // x ∈ reesAlgebra I } (PolynomialModule R M) :=\n  Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i))\nhF : ∀ (n : ℕ), n ≥ n₀ → I • N F n = N F (n + 1)\ni : ℕ\n⊢ ↑(single R i) '' ↑(N F i) ⊆\n    ↑(Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i)))\n[PROOFSTEP]\nhave : ∀ i ≤ n₀, single R i '' (F.N i : Set M) ⊆ F' := by\n  -- Porting note: Original proof was\n        -- `fun i hi => Set.Subset.trans (Set.subset_iUnion₂ i hi) Submodule.subset_span`\n  intro i hi\n  refine Set.Subset.trans ?_ Submodule.subset_span\n  refine @Set.subset_iUnion₂ _ _ _ (fun i => fun _ => ↑((single R i) '' ((N F i) : Set M))) i ?_\n  exact hi\n[GOAL]\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F'✝ : Filtration I M\nh : Stable F\nn₀ : ℕ\nF' : Submodule { x // x ∈ reesAlgebra I } (PolynomialModule R M) :=\n  Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i))\nhF : ∀ (n : ℕ), n ≥ n₀ → I • N F n = N F (n + 1)\ni : ℕ\n⊢ ∀ (i : ℕ), i ≤ n₀ → ↑(single R i) '' ↑(N F i) ⊆ ↑F'\n[PROOFSTEP]\nintro i hi\n[GOAL]\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F'✝ : Filtration I M\nh : Stable F\nn₀ : ℕ\nF' : Submodule { x // x ∈ reesAlgebra I } (PolynomialModule R M) :=\n  Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i))\nhF : ∀ (n : ℕ), n ≥ n₀ → I • N F n = N F (n + 1)\ni✝ i : ℕ\nhi : i ≤ n₀\n⊢ ↑(single R i) '' ↑(N F i) ⊆ ↑F'\n[PROOFSTEP]\nrefine Set.Subset.trans ?_ Submodule.subset_span\n[GOAL]\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F'✝ : Filtration I M\nh : Stable F\nn₀ : ℕ\nF' : Submodule { x // x ∈ reesAlgebra I } (PolynomialModule R M) :=\n  Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i))\nhF : ∀ (n : ℕ), n ≥ n₀ → I • N F n = N F (n + 1)\ni✝ i : ℕ\nhi : i ≤ n₀\n⊢ ↑(single R i) '' ↑(N F i) ⊆ ⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i)\n[PROOFSTEP]\nrefine @Set.subset_iUnion₂ _ _ _ (fun i => fun _ => ↑((single R i) '' ((N F i) : Set M))) i ?_\n[GOAL]\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F'✝ : Filtration I M\nh : Stable F\nn₀ : ℕ\nF' : Submodule { x // x ∈ reesAlgebra I } (PolynomialModule R M) :=\n  Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i))\nhF : ∀ (n : ℕ), n ≥ n₀ → I • N F n = N F (n + 1)\ni✝ i : ℕ\nhi : i ≤ n₀\n⊢ i ≤ n₀\n[PROOFSTEP]\nexact hi\n[GOAL]\ncase mpr\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F'✝ : Filtration I M\nh : Stable F\nn₀ : ℕ\nF' : Submodule { x // x ∈ reesAlgebra I } (PolynomialModule R M) :=\n  Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i))\nhF : ∀ (n : ℕ), n ≥ n₀ → I • N F n = N F (n + 1)\ni : ℕ\nthis : ∀ (i : ℕ), i ≤ n₀ → ↑(single R i) '' ↑(N F i) ⊆ ↑F'\n⊢ ↑(single R i) '' ↑(N F i) ⊆\n    ↑(Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i)))\n[PROOFSTEP]\ninduction' i with j hj\n[GOAL]\ncase mpr.zero\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F'✝ : Filtration I M\nh : Stable F\nn₀ : ℕ\nF' : Submodule { x // x ∈ reesAlgebra I } (PolynomialModule R M) :=\n  Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i))\nhF : ∀ (n : ℕ), n ≥ n₀ → I • N F n = N F (n + 1)\nthis : ∀ (i : ℕ), i ≤ n₀ → ↑(single R i) '' ↑(N F i) ⊆ ↑F'\n⊢ ↑(single R Nat.zero) '' ↑(N F Nat.zero) ⊆\n    ↑(Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i)))\n[PROOFSTEP]\nexact this _ (zero_le _)\n[GOAL]\ncase mpr.succ\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F'✝ : Filtration I M\nh : Stable F\nn₀ : ℕ\nF' : Submodule { x // x ∈ reesAlgebra I } (PolynomialModule R M) :=\n  Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i))\nhF : ∀ (n : ℕ), n ≥ n₀ → I • N F n = N F (n + 1)\nthis : ∀ (i : ℕ), i ≤ n₀ → ↑(single R i) '' ↑(N F i) ⊆ ↑F'\nj : ℕ\nhj :\n  ↑(single R j) '' ↑(N F j) ⊆\n    ↑(Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i)))\n⊢ ↑(single R (Nat.succ j)) '' ↑(N F (Nat.succ j)) ⊆\n    ↑(Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i)))\n[PROOFSTEP]\nby_cases hj' : j.succ ≤ n₀\n[GOAL]\ncase pos\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F'✝ : Filtration I M\nh : Stable F\nn₀ : ℕ\nF' : Submodule { x // x ∈ reesAlgebra I } (PolynomialModule R M) :=\n  Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i))\nhF : ∀ (n : ℕ), n ≥ n₀ → I • N F n = N F (n + 1)\nthis : ∀ (i : ℕ), i ≤ n₀ → ↑(single R i) '' ↑(N F i) ⊆ ↑F'\nj : ℕ\nhj :\n  ↑(single R j) '' ↑(N F j) ⊆\n    ↑(Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i)))\nhj' : Nat.succ j ≤ n₀\n⊢ ↑(single R (Nat.succ j)) '' ↑(N F (Nat.succ j)) ⊆\n    ↑(Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i)))\n[PROOFSTEP]\nexact this _ hj'\n[GOAL]\ncase neg\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F'✝ : Filtration I M\nh : Stable F\nn₀ : ℕ\nF' : Submodule { x // x ∈ reesAlgebra I } (PolynomialModule R M) :=\n  Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i))\nhF : ∀ (n : ℕ), n ≥ n₀ → I • N F n = N F (n + 1)\nthis : ∀ (i : ℕ), i ≤ n₀ → ↑(single R i) '' ↑(N F i) ⊆ ↑F'\nj : ℕ\nhj :\n  ↑(single R j) '' ↑(N F j) ⊆\n    ↑(Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i)))\nhj' : ¬Nat.succ j ≤ n₀\n⊢ ↑(single R (Nat.succ j)) '' ↑(N F (Nat.succ j)) ⊆\n    ↑(Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i)))\n[PROOFSTEP]\nsimp only [not_le, Nat.lt_succ_iff] at hj' \n[GOAL]\ncase neg\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F'✝ : Filtration I M\nh : Stable F\nn₀ : ℕ\nF' : Submodule { x // x ∈ reesAlgebra I } (PolynomialModule R M) :=\n  Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i))\nhF : ∀ (n : ℕ), n ≥ n₀ → I • N F n = N F (n + 1)\nthis : ∀ (i : ℕ), i ≤ n₀ → ↑(single R i) '' ↑(N F i) ⊆ ↑F'\nj : ℕ\nhj :\n  ↑(single R j) '' ↑(N F j) ⊆\n    ↑(Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i)))\nhj' : n₀ ≤ j\n⊢ ↑(single R (Nat.succ j)) '' ↑(N F (Nat.succ j)) ⊆\n    ↑(Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i)))\n[PROOFSTEP]\nrw [Nat.succ_eq_add_one, ← hF _ hj']\n[GOAL]\ncase neg\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F'✝ : Filtration I M\nh : Stable F\nn₀ : ℕ\nF' : Submodule { x // x ∈ reesAlgebra I } (PolynomialModule R M) :=\n  Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i))\nhF : ∀ (n : ℕ), n ≥ n₀ → I • N F n = N F (n + 1)\nthis : ∀ (i : ℕ), i ≤ n₀ → ↑(single R i) '' ↑(N F i) ⊆ ↑F'\nj : ℕ\nhj :\n  ↑(single R j) '' ↑(N F j) ⊆\n    ↑(Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i)))\nhj' : n₀ ≤ j\n⊢ ↑(single R (j + 1)) '' ↑(I • N F j) ⊆\n    ↑(Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i)))\n[PROOFSTEP]\nrintro _ ⟨m, hm, rfl⟩\n[GOAL]\ncase neg.intro.intro\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F'✝ : Filtration I M\nh : Stable F\nn₀ : ℕ\nF' : Submodule { x // x ∈ reesAlgebra I } (PolynomialModule R M) :=\n  Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i))\nhF : ∀ (n : ℕ), n ≥ n₀ → I • N F n = N F (n + 1)\nthis : ∀ (i : ℕ), i ≤ n₀ → ↑(single R i) '' ↑(N F i) ⊆ ↑F'\nj : ℕ\nhj :\n  ↑(single R j) '' ↑(N F j) ⊆\n    ↑(Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i)))\nhj' : n₀ ≤ j\nm : M\nhm : m ∈ ↑(I • N F j)\n⊢ ↑(single R (j + 1)) m ∈\n    ↑(Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i)))\n[PROOFSTEP]\nrefine' Submodule.smul_induction_on hm (fun r hr m' hm' => _) (fun x y hx hy => _)\n[GOAL]\ncase neg.intro.intro.refine'_1\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F'✝ : Filtration I M\nh : Stable F\nn₀ : ℕ\nF' : Submodule { x // x ∈ reesAlgebra I } (PolynomialModule R M) :=\n  Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i))\nhF : ∀ (n : ℕ), n ≥ n₀ → I • N F n = N F (n + 1)\nthis : ∀ (i : ℕ), i ≤ n₀ → ↑(single R i) '' ↑(N F i) ⊆ ↑F'\nj : ℕ\nhj :\n  ↑(single R j) '' ↑(N F j) ⊆\n    ↑(Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i)))\nhj' : n₀ ≤ j\nm : M\nhm : m ∈ ↑(I • N F j)\nr : R\nhr : r ∈ I\nm' : M\nhm' : m' ∈ N F j\n⊢ ↑(single R (j + 1)) (r • m') ∈\n    ↑(Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i)))\n[PROOFSTEP]\nrw [add_comm, ← monomial_smul_single]\n[GOAL]\ncase neg.intro.intro.refine'_1\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F'✝ : Filtration I M\nh : Stable F\nn₀ : ℕ\nF' : Submodule { x // x ∈ reesAlgebra I } (PolynomialModule R M) :=\n  Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i))\nhF : ∀ (n : ℕ), n ≥ n₀ → I • N F n = N F (n + 1)\nthis : ∀ (i : ℕ), i ≤ n₀ → ↑(single R i) '' ↑(N F i) ⊆ ↑F'\nj : ℕ\nhj :\n  ↑(single R j) '' ↑(N F j) ⊆\n    ↑(Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i)))\nhj' : n₀ ≤ j\nm : M\nhm : m ∈ ↑(I • N F j)\nr : R\nhr : r ∈ I\nm' : M\nhm' : m' ∈ N F j\n⊢ ↑(monomial 1) r • ↑(single R j) m' ∈\n    ↑(Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i)))\n[PROOFSTEP]\nexact F'.smul_mem ⟨_, reesAlgebra.monomial_mem.mpr (by rwa [pow_one])⟩ (hj <| Set.mem_image_of_mem _ hm')\n[GOAL]\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F'✝ : Filtration I M\nh : Stable F\nn₀ : ℕ\nF' : Submodule { x // x ∈ reesAlgebra I } (PolynomialModule R M) :=\n  Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i))\nhF : ∀ (n : ℕ), n ≥ n₀ → I • N F n = N F (n + 1)\nthis : ∀ (i : ℕ), i ≤ n₀ → ↑(single R i) '' ↑(N F i) ⊆ ↑F'\nj : ℕ\nhj :\n  ↑(single R j) '' ↑(N F j) ⊆\n    ↑(Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i)))\nhj' : n₀ ≤ j\nm : M\nhm : m ∈ ↑(I • N F j)\nr : R\nhr : r ∈ I\nm' : M\nhm' : m' ∈ N F j\n⊢ r ∈ I ^ 1\n[PROOFSTEP]\nrwa [pow_one]\n[GOAL]\ncase neg.intro.intro.refine'_2\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F'✝ : Filtration I M\nh : Stable F\nn₀ : ℕ\nF' : Submodule { x // x ∈ reesAlgebra I } (PolynomialModule R M) :=\n  Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i))\nhF : ∀ (n : ℕ), n ≥ n₀ → I • N F n = N F (n + 1)\nthis : ∀ (i : ℕ), i ≤ n₀ → ↑(single R i) '' ↑(N F i) ⊆ ↑F'\nj : ℕ\nhj :\n  ↑(single R j) '' ↑(N F j) ⊆\n    ↑(Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i)))\nhj' : n₀ ≤ j\nm : M\nhm : m ∈ ↑(I • N F j)\nx y : M\nhx :\n  ↑(single R (j + 1)) x ∈\n    ↑(Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i)))\nhy :\n  ↑(single R (j + 1)) y ∈\n    ↑(Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i)))\n⊢ ↑(single R (j + 1)) (x + y) ∈\n    ↑(Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i)))\n[PROOFSTEP]\nrw [map_add]\n[GOAL]\ncase neg.intro.intro.refine'_2\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F'✝ : Filtration I M\nh : Stable F\nn₀ : ℕ\nF' : Submodule { x // x ∈ reesAlgebra I } (PolynomialModule R M) :=\n  Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i))\nhF : ∀ (n : ℕ), n ≥ n₀ → I • N F n = N F (n + 1)\nthis : ∀ (i : ℕ), i ≤ n₀ → ↑(single R i) '' ↑(N F i) ⊆ ↑F'\nj : ℕ\nhj :\n  ↑(single R j) '' ↑(N F j) ⊆\n    ↑(Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i)))\nhj' : n₀ ≤ j\nm : M\nhm : m ∈ ↑(I • N F j)\nx y : M\nhx :\n  ↑(single R (j + 1)) x ∈\n    ↑(Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i)))\nhy :\n  ↑(single R (j + 1)) y ∈\n    ↑(Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i)))\n⊢ ↑(single R (j + 1)) x + ↑(single R (j + 1)) y ∈\n    ↑(Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i)))\n[PROOFSTEP]\nexact F'.add_mem hx hy\n[GOAL]\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh : Stable F\nhF' : ∀ (i : ℕ), Submodule.FG (N F i)\n⊢ Submodule.FG (Filtration.submodule F) ↔ Stable F\n[PROOFSTEP]\nclassical\ndelta Ideal.Filtration.Stable\nsimp_rw [← F.submodule_eq_span_le_iff_stable_ge]\nconstructor\n· rintro H\n  refine H.stablizes_of_iSup_eq ⟨fun n₀ => Submodule.span _ (⋃ (i : ℕ) (_ : i ≤ n₀), single R i '' ↑(F.N i)), ?_⟩ ?_\n  · intro n m e\n    rw [Submodule.span_le, Set.iUnion₂_subset_iff]\n    intro i hi\n    refine Set.Subset.trans ?_ Submodule.subset_span\n    refine @Set.subset_iUnion₂ _ _ _ (fun i => fun _ => ↑((single R i) '' ((N F i) : Set M))) i ?_\n    exact hi.trans e\n  · dsimp\n    rw [← Submodule.span_iUnion, ← submodule_span_single]\n    congr 1\n    ext\n    simp only [Set.mem_iUnion, Set.mem_image, SetLike.mem_coe, exists_prop]\n    constructor\n    · rintro ⟨-, i, -, e⟩; exact ⟨i, e⟩\n    · rintro ⟨i, e⟩; exact ⟨i, i, le_refl i, e⟩\n· rintro ⟨n, hn⟩\n  rw [hn]\n  simp_rw [Submodule.span_iUnion₂, ← Finset.mem_range_succ_iff, iSup_subtype']\n  apply Submodule.fg_iSup\n  rintro ⟨i, hi⟩\n  obtain ⟨s, hs⟩ := hF' i\n  have :\n    Submodule.span (reesAlgebra I) (s.image (lsingle R i) : Set (PolynomialModule R M)) =\n      Submodule.span _ (single R i '' (F.N i : Set M)) :=\n    by rw [Finset.coe_image, ← Submodule.span_span_of_tower R, ← Submodule.map_span, hs]; rfl\n  rw [Subtype.coe_mk, ← this]\n  exact ⟨_, rfl⟩\n[GOAL]\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh : Stable F\nhF' : ∀ (i : ℕ), Submodule.FG (N F i)\n⊢ Submodule.FG (Filtration.submodule F) ↔ Stable F\n[PROOFSTEP]\ndelta Ideal.Filtration.Stable\n[GOAL]\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh : Stable F\nhF' : ∀ (i : ℕ), Submodule.FG (N F i)\n⊢ Submodule.FG (Filtration.submodule F) ↔ ∃ n₀, ∀ (n : ℕ), n ≥ n₀ → I • N F n = N F (n + 1)\n[PROOFSTEP]\nsimp_rw [← F.submodule_eq_span_le_iff_stable_ge]\n[GOAL]\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh : Stable F\nhF' : ∀ (i : ℕ), Submodule.FG (N F i)\n⊢ Submodule.FG (Filtration.submodule F) ↔\n    ∃ n₀,\n      Filtration.submodule F =\n        Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (_ : i ≤ n₀), (fun a => ↑(single R i) a) '' ↑(N F i))\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh : Stable F\nhF' : ∀ (i : ℕ), Submodule.FG (N F i)\n⊢ Submodule.FG (Filtration.submodule F) →\n    ∃ n₀,\n      Filtration.submodule F =\n        Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (_ : i ≤ n₀), (fun a => ↑(single R i) a) '' ↑(N F i))\n[PROOFSTEP]\nrintro H\n[GOAL]\ncase mp\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh : Stable F\nhF' : ∀ (i : ℕ), Submodule.FG (N F i)\nH : Submodule.FG (Filtration.submodule F)\n⊢ ∃ n₀,\n    Filtration.submodule F =\n      Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (_ : i ≤ n₀), (fun a => ↑(single R i) a) '' ↑(N F i))\n[PROOFSTEP]\nrefine H.stablizes_of_iSup_eq ⟨fun n₀ => Submodule.span _ (⋃ (i : ℕ) (_ : i ≤ n₀), single R i '' ↑(F.N i)), ?_⟩ ?_\n[GOAL]\ncase mp.refine_1\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh : Stable F\nhF' : ∀ (i : ℕ), Submodule.FG (N F i)\nH : Submodule.FG (Filtration.submodule F)\n⊢ Monotone fun n₀ => Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i))\n[PROOFSTEP]\nintro n m e\n[GOAL]\ncase mp.refine_1\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh : Stable F\nhF' : ∀ (i : ℕ), Submodule.FG (N F i)\nH : Submodule.FG (Filtration.submodule F)\nn m : ℕ\ne : n ≤ m\n⊢ (fun n₀ => Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i))) n ≤\n    (fun n₀ => Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i))) m\n[PROOFSTEP]\nrw [Submodule.span_le, Set.iUnion₂_subset_iff]\n[GOAL]\ncase mp.refine_1\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh : Stable F\nhF' : ∀ (i : ℕ), Submodule.FG (N F i)\nH : Submodule.FG (Filtration.submodule F)\nn m : ℕ\ne : n ≤ m\n⊢ ∀ (i : ℕ),\n    i ≤ n →\n      ↑(single R i) '' ↑(N F i) ⊆\n        ↑((fun n₀ => Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i))) m)\n[PROOFSTEP]\nintro i hi\n[GOAL]\ncase mp.refine_1\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh : Stable F\nhF' : ∀ (i : ℕ), Submodule.FG (N F i)\nH : Submodule.FG (Filtration.submodule F)\nn m : ℕ\ne : n ≤ m\ni : ℕ\nhi : i ≤ n\n⊢ ↑(single R i) '' ↑(N F i) ⊆\n    ↑((fun n₀ => Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i))) m)\n[PROOFSTEP]\nrefine Set.Subset.trans ?_ Submodule.subset_span\n[GOAL]\ncase mp.refine_1\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh : Stable F\nhF' : ∀ (i : ℕ), Submodule.FG (N F i)\nH : Submodule.FG (Filtration.submodule F)\nn m : ℕ\ne : n ≤ m\ni : ℕ\nhi : i ≤ n\n⊢ ↑(single R i) '' ↑(N F i) ⊆ ⋃ (i : ℕ) (_ : i ≤ m), ↑(single R i) '' ↑(N F i)\n[PROOFSTEP]\nrefine @Set.subset_iUnion₂ _ _ _ (fun i => fun _ => ↑((single R i) '' ((N F i) : Set M))) i ?_\n[GOAL]\ncase mp.refine_1\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh : Stable F\nhF' : ∀ (i : ℕ), Submodule.FG (N F i)\nH : Submodule.FG (Filtration.submodule F)\nn m : ℕ\ne : n ≤ m\ni : ℕ\nhi : i ≤ n\n⊢ i ≤ m\n[PROOFSTEP]\nexact hi.trans e\n[GOAL]\ncase mp.refine_2\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh : Stable F\nhF' : ∀ (i : ℕ), Submodule.FG (N F i)\nH : Submodule.FG (Filtration.submodule F)\n⊢ iSup\n      ↑{\n          toFun := fun n₀ =>\n            Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i)),\n          monotone' :=\n            (_ :\n              ∀ ⦃n m : ℕ⦄,\n                n ≤ m →\n                  (fun n₀ =>\n                        Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i)))\n                      n ≤\n                    (fun n₀ =>\n                        Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i)))\n                      m) } =\n    Filtration.submodule F\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase mp.refine_2\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh : Stable F\nhF' : ∀ (i : ℕ), Submodule.FG (N F i)\nH : Submodule.FG (Filtration.submodule F)\n⊢ ⨆ (n₀ : ℕ), Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (_ : i ≤ n₀), ↑(single R i) '' ↑(N F i)) =\n    Filtration.submodule F\n[PROOFSTEP]\nrw [← Submodule.span_iUnion, ← submodule_span_single]\n[GOAL]\ncase mp.refine_2\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh : Stable F\nhF' : ∀ (i : ℕ), Submodule.FG (N F i)\nH : Submodule.FG (Filtration.submodule F)\n⊢ Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (i_1 : ℕ) (_ : i_1 ≤ i), ↑(single R i_1) '' ↑(N F i_1)) =\n    Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ), ↑(single R i) '' ↑(N F i))\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase mp.refine_2.e_s\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh : Stable F\nhF' : ∀ (i : ℕ), Submodule.FG (N F i)\nH : Submodule.FG (Filtration.submodule F)\n⊢ ⋃ (i : ℕ) (i_1 : ℕ) (_ : i_1 ≤ i), ↑(single R i_1) '' ↑(N F i_1) = ⋃ (i : ℕ), ↑(single R i) '' ↑(N F i)\n[PROOFSTEP]\next\n[GOAL]\ncase mp.refine_2.e_s.h\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh : Stable F\nhF' : ∀ (i : ℕ), Submodule.FG (N F i)\nH : Submodule.FG (Filtration.submodule F)\nx✝ : PolynomialModule R M\n⊢ x✝ ∈ ⋃ (i : ℕ) (i_1 : ℕ) (_ : i_1 ≤ i), ↑(single R i_1) '' ↑(N F i_1) ↔ x✝ ∈ ⋃ (i : ℕ), ↑(single R i) '' ↑(N F i)\n[PROOFSTEP]\nsimp only [Set.mem_iUnion, Set.mem_image, SetLike.mem_coe, exists_prop]\n[GOAL]\ncase mp.refine_2.e_s.h\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh : Stable F\nhF' : ∀ (i : ℕ), Submodule.FG (N F i)\nH : Submodule.FG (Filtration.submodule F)\nx✝ : PolynomialModule R M\n⊢ (∃ i i_1, i_1 ≤ i ∧ ∃ x, x ∈ N F i_1 ∧ ↑(single R i_1) x = x✝) ↔ ∃ i x, x ∈ N F i ∧ ↑(single R i) x = x✝\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp.refine_2.e_s.h.mp\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh : Stable F\nhF' : ∀ (i : ℕ), Submodule.FG (N F i)\nH : Submodule.FG (Filtration.submodule F)\nx✝ : PolynomialModule R M\n⊢ (∃ i i_1, i_1 ≤ i ∧ ∃ x, x ∈ N F i_1 ∧ ↑(single R i_1) x = x✝) → ∃ i x, x ∈ N F i ∧ ↑(single R i) x = x✝\n[PROOFSTEP]\nrintro ⟨-, i, -, e⟩\n[GOAL]\ncase mp.refine_2.e_s.h.mp.intro.intro.intro\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh : Stable F\nhF' : ∀ (i : ℕ), Submodule.FG (N F i)\nH : Submodule.FG (Filtration.submodule F)\nx✝ : PolynomialModule R M\ni : ℕ\ne : ∃ x, x ∈ N F i ∧ ↑(single R i) x = x✝\n⊢ ∃ i x, x ∈ N F i ∧ ↑(single R i) x = x✝\n[PROOFSTEP]\nexact ⟨i, e⟩\n[GOAL]\ncase mp.refine_2.e_s.h.mpr\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh : Stable F\nhF' : ∀ (i : ℕ), Submodule.FG (N F i)\nH : Submodule.FG (Filtration.submodule F)\nx✝ : PolynomialModule R M\n⊢ (∃ i x, x ∈ N F i ∧ ↑(single R i) x = x✝) → ∃ i i_1, i_1 ≤ i ∧ ∃ x, x ∈ N F i_1 ∧ ↑(single R i_1) x = x✝\n[PROOFSTEP]\nrintro ⟨i, e⟩\n[GOAL]\ncase mp.refine_2.e_s.h.mpr.intro\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh : Stable F\nhF' : ∀ (i : ℕ), Submodule.FG (N F i)\nH : Submodule.FG (Filtration.submodule F)\nx✝ : PolynomialModule R M\ni : ℕ\ne : ∃ x, x ∈ N F i ∧ ↑(single R i) x = x✝\n⊢ ∃ i i_1, i_1 ≤ i ∧ ∃ x, x ∈ N F i_1 ∧ ↑(single R i_1) x = x✝\n[PROOFSTEP]\nexact ⟨i, i, le_refl i, e⟩\n[GOAL]\ncase mpr\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh : Stable F\nhF' : ∀ (i : ℕ), Submodule.FG (N F i)\n⊢ (∃ n₀,\n      Filtration.submodule F =\n        Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (_ : i ≤ n₀), (fun a => ↑(single R i) a) '' ↑(N F i))) →\n    Submodule.FG (Filtration.submodule F)\n[PROOFSTEP]\nrintro ⟨n, hn⟩\n[GOAL]\ncase mpr.intro\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh : Stable F\nhF' : ∀ (i : ℕ), Submodule.FG (N F i)\nn : ℕ\nhn :\n  Filtration.submodule F =\n    Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (_ : i ≤ n), (fun a => ↑(single R i) a) '' ↑(N F i))\n⊢ Submodule.FG (Filtration.submodule F)\n[PROOFSTEP]\nrw [hn]\n[GOAL]\ncase mpr.intro\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh : Stable F\nhF' : ∀ (i : ℕ), Submodule.FG (N F i)\nn : ℕ\nhn :\n  Filtration.submodule F =\n    Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (_ : i ≤ n), (fun a => ↑(single R i) a) '' ↑(N F i))\n⊢ Submodule.FG\n    (Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (_ : i ≤ n), (fun a => ↑(single R i) a) '' ↑(N F i)))\n[PROOFSTEP]\nsimp_rw [Submodule.span_iUnion₂, ← Finset.mem_range_succ_iff, iSup_subtype']\n[GOAL]\ncase mpr.intro\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh : Stable F\nhF' : ∀ (i : ℕ), Submodule.FG (N F i)\nn : ℕ\nhn :\n  Filtration.submodule F =\n    Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (_ : i ≤ n), (fun a => ↑(single R i) a) '' ↑(N F i))\n⊢ Submodule.FG\n    (⨆ (x : { i // i ∈ Finset.range (Nat.succ n) }),\n      Submodule.span { x // x ∈ reesAlgebra I } ((fun a => ↑(single R ↑x) a) '' ↑(N F ↑x)))\n[PROOFSTEP]\napply Submodule.fg_iSup\n[GOAL]\ncase mpr.intro.h\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh : Stable F\nhF' : ∀ (i : ℕ), Submodule.FG (N F i)\nn : ℕ\nhn :\n  Filtration.submodule F =\n    Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (_ : i ≤ n), (fun a => ↑(single R i) a) '' ↑(N F i))\n⊢ ∀ (i : { i // i ∈ Finset.range (Nat.succ n) }),\n    Submodule.FG (Submodule.span { x // x ∈ reesAlgebra I } ((fun a => ↑(single R ↑i) a) '' ↑(N F ↑i)))\n[PROOFSTEP]\nrintro ⟨i, hi⟩\n[GOAL]\ncase mpr.intro.h.mk\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh : Stable F\nhF' : ∀ (i : ℕ), Submodule.FG (N F i)\nn : ℕ\nhn :\n  Filtration.submodule F =\n    Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (_ : i ≤ n), (fun a => ↑(single R i) a) '' ↑(N F i))\ni : ℕ\nhi : i ∈ Finset.range (Nat.succ n)\n⊢ Submodule.FG\n    (Submodule.span { x // x ∈ reesAlgebra I }\n      ((fun a => ↑(single R ↑{ val := i, property := hi }) a) '' ↑(N F ↑{ val := i, property := hi })))\n[PROOFSTEP]\nobtain ⟨s, hs⟩ := hF' i\n[GOAL]\ncase mpr.intro.h.mk.intro\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh : Stable F\nhF' : ∀ (i : ℕ), Submodule.FG (N F i)\nn : ℕ\nhn :\n  Filtration.submodule F =\n    Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (_ : i ≤ n), (fun a => ↑(single R i) a) '' ↑(N F i))\ni : ℕ\nhi : i ∈ Finset.range (Nat.succ n)\ns : Finset M\nhs : Submodule.span R ↑s = N F i\n⊢ Submodule.FG\n    (Submodule.span { x // x ∈ reesAlgebra I }\n      ((fun a => ↑(single R ↑{ val := i, property := hi }) a) '' ↑(N F ↑{ val := i, property := hi })))\n[PROOFSTEP]\nhave :\n  Submodule.span (reesAlgebra I) (s.image (lsingle R i) : Set (PolynomialModule R M)) =\n    Submodule.span _ (single R i '' (F.N i : Set M)) :=\n  by rw [Finset.coe_image, ← Submodule.span_span_of_tower R, ← Submodule.map_span, hs]; rfl\n[GOAL]\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh : Stable F\nhF' : ∀ (i : ℕ), Submodule.FG (N F i)\nn : ℕ\nhn :\n  Filtration.submodule F =\n    Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (_ : i ≤ n), (fun a => ↑(single R i) a) '' ↑(N F i))\ni : ℕ\nhi : i ∈ Finset.range (Nat.succ n)\ns : Finset M\nhs : Submodule.span R ↑s = N F i\n⊢ Submodule.span { x // x ∈ reesAlgebra I } ↑(Finset.image (↑(lsingle R i)) s) =\n    Submodule.span { x // x ∈ reesAlgebra I } (↑(single R i) '' ↑(N F i))\n[PROOFSTEP]\nrw [Finset.coe_image, ← Submodule.span_span_of_tower R, ← Submodule.map_span, hs]\n[GOAL]\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh : Stable F\nhF' : ∀ (i : ℕ), Submodule.FG (N F i)\nn : ℕ\nhn :\n  Filtration.submodule F =\n    Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (_ : i ≤ n), (fun a => ↑(single R i) a) '' ↑(N F i))\ni : ℕ\nhi : i ∈ Finset.range (Nat.succ n)\ns : Finset M\nhs : Submodule.span R ↑s = N F i\n⊢ Submodule.span { x // x ∈ reesAlgebra I } ↑(Submodule.map (lsingle R i) (N F i)) =\n    Submodule.span { x // x ∈ reesAlgebra I } (↑(single R i) '' ↑(N F i))\n[PROOFSTEP]\nrfl\n[GOAL]\ncase mpr.intro.h.mk.intro\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh : Stable F\nhF' : ∀ (i : ℕ), Submodule.FG (N F i)\nn : ℕ\nhn :\n  Filtration.submodule F =\n    Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (_ : i ≤ n), (fun a => ↑(single R i) a) '' ↑(N F i))\ni : ℕ\nhi : i ∈ Finset.range (Nat.succ n)\ns : Finset M\nhs : Submodule.span R ↑s = N F i\nthis :\n  Submodule.span { x // x ∈ reesAlgebra I } ↑(Finset.image (↑(lsingle R i)) s) =\n    Submodule.span { x // x ∈ reesAlgebra I } (↑(single R i) '' ↑(N F i))\n⊢ Submodule.FG\n    (Submodule.span { x // x ∈ reesAlgebra I }\n      ((fun a => ↑(single R ↑{ val := i, property := hi }) a) '' ↑(N F ↑{ val := i, property := hi })))\n[PROOFSTEP]\nrw [Subtype.coe_mk, ← this]\n[GOAL]\ncase mpr.intro.h.mk.intro\nR M : Type u\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nF F' : Filtration I M\nh : Stable F\nhF' : ∀ (i : ℕ), Submodule.FG (N F i)\nn : ℕ\nhn :\n  Filtration.submodule F =\n    Submodule.span { x // x ∈ reesAlgebra I } (⋃ (i : ℕ) (_ : i ≤ n), (fun a => ↑(single R i) a) '' ↑(N F i))\ni : ℕ\nhi : i ∈ Finset.range (Nat.succ n)\ns : Finset M\nhs : Submodule.span R ↑s = N F i\nthis :\n  Submodule.span { x // x ∈ reesAlgebra I } ↑(Finset.image (↑(lsingle R i)) s) =\n    Submodule.span { x // x ∈ reesAlgebra I } (↑(single R i) '' ↑(N F i))\n⊢ Submodule.FG (Submodule.span { x // x ∈ reesAlgebra I } ↑(Finset.image (↑(lsingle R i)) s))\n[PROOFSTEP]\nexact ⟨_, rfl⟩\n[GOAL]\nR M : Type u\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nI : Ideal R\nF F'✝ : Filtration I M\nh : Stable F\ninst✝¹ : IsNoetherianRing R\ninst✝ : Module.Finite R M\nhF : Stable F\nF' : Filtration I M\nhf : F' ≤ F\n⊢ Stable F'\n[PROOFSTEP]\nhave := isNoetherian_of_isNoetherianRing_of_finite R M\n[GOAL]\nR M : Type u\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nI : Ideal R\nF F'✝ : Filtration I M\nh : Stable F\ninst✝¹ : IsNoetherianRing R\ninst✝ : Module.Finite R M\nhF : Stable F\nF' : Filtration I M\nhf : F' ≤ F\nthis : IsNoetherian R M\n⊢ Stable F'\n[PROOFSTEP]\nrw [← submodule_fg_iff_stable] at hF ⊢\n[GOAL]\nR M : Type u\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nI : Ideal R\nF F'✝ : Filtration I M\nh : Stable F\ninst✝¹ : IsNoetherianRing R\ninst✝ : Module.Finite R M\nhF : Submodule.FG (Filtration.submodule F)\nF' : Filtration I M\nhf : F' ≤ F\nthis : IsNoetherian R M\n⊢ Submodule.FG (Filtration.submodule F')\ncase hF'\nR M : Type u\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nI : Ideal R\nF F'✝ : Filtration I M\nh : Stable F\ninst✝¹ : IsNoetherianRing R\ninst✝ : Module.Finite R M\nhF : Submodule.FG (Filtration.submodule F)\nF' : Filtration I M\nhf : F' ≤ F\nthis : IsNoetherian R M\n⊢ ∀ (i : ℕ), Submodule.FG (N F' i)\ncase hF'\nR M : Type u\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nI : Ideal R\nF F'✝ : Filtration I M\nh : Stable F\ninst✝¹ : IsNoetherianRing R\ninst✝ : Module.Finite R M\nhF : Stable F\nF' : Filtration I M\nhf : F' ≤ F\nthis : IsNoetherian R M\n⊢ ∀ (i : ℕ), Submodule.FG (N F i)\n[PROOFSTEP]\nany_goals intro i; exact IsNoetherian.noetherian _\n[GOAL]\nR M : Type u\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nI : Ideal R\nF F'✝ : Filtration I M\nh : Stable F\ninst✝¹ : IsNoetherianRing R\ninst✝ : Module.Finite R M\nhF : Submodule.FG (Filtration.submodule F)\nF' : Filtration I M\nhf : F' ≤ F\nthis : IsNoetherian R M\n⊢ Submodule.FG (Filtration.submodule F')\n[PROOFSTEP]\nintro i\n[GOAL]\ncase hF'\nR M : Type u\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nI : Ideal R\nF F'✝ : Filtration I M\nh : Stable F\ninst✝¹ : IsNoetherianRing R\ninst✝ : Module.Finite R M\nhF : Submodule.FG (Filtration.submodule F)\nF' : Filtration I M\nhf : F' ≤ F\nthis : IsNoetherian R M\n⊢ ∀ (i : ℕ), Submodule.FG (N F' i)\n[PROOFSTEP]\nintro i\n[GOAL]\ncase hF'\nR M : Type u\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nI : Ideal R\nF F'✝ : Filtration I M\nh : Stable F\ninst✝¹ : IsNoetherianRing R\ninst✝ : Module.Finite R M\nhF : Submodule.FG (Filtration.submodule F)\nF' : Filtration I M\nhf : F' ≤ F\nthis : IsNoetherian R M\ni : ℕ\n⊢ Submodule.FG (N F' i)\n[PROOFSTEP]\nexact IsNoetherian.noetherian _\n[GOAL]\ncase hF'\nR M : Type u\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nI : Ideal R\nF F'✝ : Filtration I M\nh : Stable F\ninst✝¹ : IsNoetherianRing R\ninst✝ : Module.Finite R M\nhF : Stable F\nF' : Filtration I M\nhf : F' ≤ F\nthis : IsNoetherian R M\n⊢ ∀ (i : ℕ), Submodule.FG (N F i)\n[PROOFSTEP]\nintro i\n[GOAL]\ncase hF'\nR M : Type u\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nI : Ideal R\nF F'✝ : Filtration I M\nh : Stable F\ninst✝¹ : IsNoetherianRing R\ninst✝ : Module.Finite R M\nhF : Stable F\nF' : Filtration I M\nhf : F' ≤ F\nthis : IsNoetherian R M\ni : ℕ\n⊢ Submodule.FG (N F i)\n[PROOFSTEP]\nexact IsNoetherian.noetherian _\n[GOAL]\nR M : Type u\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nI : Ideal R\nF F'✝ : Filtration I M\nh : Stable F\ninst✝¹ : IsNoetherianRing R\ninst✝ : Module.Finite R M\nhF : Submodule.FG (Filtration.submodule F)\nF' : Filtration I M\nhf : F' ≤ F\nthis : IsNoetherian R M\n⊢ Submodule.FG (Filtration.submodule F')\n[PROOFSTEP]\nhave := isNoetherian_of_fg_of_noetherian _ hF\n[GOAL]\nR M : Type u\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nI : Ideal R\nF F'✝ : Filtration I M\nh : Stable F\ninst✝¹ : IsNoetherianRing R\ninst✝ : Module.Finite R M\nhF : Submodule.FG (Filtration.submodule F)\nF' : Filtration I M\nhf : F' ≤ F\nthis✝ : IsNoetherian R M\nthis : IsNoetherian { x // x ∈ reesAlgebra I } { x // x ∈ Filtration.submodule F }\n⊢ Submodule.FG (Filtration.submodule F')\n[PROOFSTEP]\nrw [isNoetherian_submodule] at this \n[GOAL]\nR M : Type u\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nI : Ideal R\nF F'✝ : Filtration I M\nh : Stable F\ninst✝¹ : IsNoetherianRing R\ninst✝ : Module.Finite R M\nhF : Submodule.FG (Filtration.submodule F)\nF' : Filtration I M\nhf : F' ≤ F\nthis✝ : IsNoetherian R M\nthis : ∀ (s : Submodule { x // x ∈ reesAlgebra I } (PolynomialModule R M)), s ≤ Filtration.submodule F → Submodule.FG s\n⊢ Submodule.FG (Filtration.submodule F')\n[PROOFSTEP]\nexact this _ (OrderHomClass.mono (submoduleInfHom M I) hf)\n[GOAL]\nR M : Type u\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nI : Ideal R\nF F' : Filtration I M\ninst✝¹ : IsNoetherianRing R\ninst✝ : Module.Finite R M\nx : M\n⊢ x ∈ ⨅ (i : ℕ), I ^ i • ⊤ ↔ ∃ r, ↑r • x = x\n[PROOFSTEP]\nlet N := (⨅ i : ℕ, I ^ i • ⊤ : Submodule R M)\n[GOAL]\nR M : Type u\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nI : Ideal R\nF F' : Filtration I M\ninst✝¹ : IsNoetherianRing R\ninst✝ : Module.Finite R M\nx : M\nN : Submodule R M := ⨅ (i : ℕ), I ^ i • ⊤\n⊢ x ∈ ⨅ (i : ℕ), I ^ i • ⊤ ↔ ∃ r, ↑r • x = x\n[PROOFSTEP]\nhave hN : ∀ k, (I.stableFiltration ⊤ ⊓ I.trivialFiltration N).N k = N := fun k =>\n  inf_eq_right.mpr ((iInf_le _ k).trans <| le_of_eq <| by simp)\n[GOAL]\nR M : Type u\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nI : Ideal R\nF F' : Filtration I M\ninst✝¹ : IsNoetherianRing R\ninst✝ : Module.Finite R M\nx : M\nN : Submodule R M := ⨅ (i : ℕ), I ^ i • ⊤\nk : ℕ\n⊢ I ^ k • ⊤ = Filtration.N (stableFiltration I ⊤) k\n[PROOFSTEP]\nsimp\n[GOAL]\nR M : Type u\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nI : Ideal R\nF F' : Filtration I M\ninst✝¹ : IsNoetherianRing R\ninst✝ : Module.Finite R M\nx : M\nN : Submodule R M := ⨅ (i : ℕ), I ^ i • ⊤\nhN : ∀ (k : ℕ), Filtration.N (stableFiltration I ⊤ ⊓ trivialFiltration I N) k = N\n⊢ x ∈ ⨅ (i : ℕ), I ^ i • ⊤ ↔ ∃ r, ↑r • x = x\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nR M : Type u\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nI : Ideal R\nF F' : Filtration I M\ninst✝¹ : IsNoetherianRing R\ninst✝ : Module.Finite R M\nx : M\nN : Submodule R M := ⨅ (i : ℕ), I ^ i • ⊤\nhN : ∀ (k : ℕ), Filtration.N (stableFiltration I ⊤ ⊓ trivialFiltration I N) k = N\n⊢ x ∈ ⨅ (i : ℕ), I ^ i • ⊤ → ∃ r, ↑r • x = x\n[PROOFSTEP]\nhave := isNoetherian_of_isNoetherianRing_of_finite R M\n[GOAL]\ncase mp\nR M : Type u\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nI : Ideal R\nF F' : Filtration I M\ninst✝¹ : IsNoetherianRing R\ninst✝ : Module.Finite R M\nx : M\nN : Submodule R M := ⨅ (i : ℕ), I ^ i • ⊤\nhN : ∀ (k : ℕ), Filtration.N (stableFiltration I ⊤ ⊓ trivialFiltration I N) k = N\nthis : IsNoetherian R M\n⊢ x ∈ ⨅ (i : ℕ), I ^ i • ⊤ → ∃ r, ↑r • x = x\n[PROOFSTEP]\nobtain ⟨r, hr₁, hr₂⟩ :=\n  Submodule.exists_mem_and_smul_eq_self_of_fg_of_le_smul I N (IsNoetherian.noetherian N)\n    (by\n      obtain ⟨k, hk⟩ := (I.stableFiltration_stable ⊤).inter_right (I.trivialFiltration N)\n      have := hk k (le_refl _)\n      rw [hN, hN] at this \n      exact le_of_eq this.symm)\n[GOAL]\nR M : Type u\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nI : Ideal R\nF F' : Filtration I M\ninst✝¹ : IsNoetherianRing R\ninst✝ : Module.Finite R M\nx : M\nN : Submodule R M := ⨅ (i : ℕ), I ^ i • ⊤\nhN : ∀ (k : ℕ), Filtration.N (stableFiltration I ⊤ ⊓ trivialFiltration I N) k = N\nthis : IsNoetherian R M\n⊢ N ≤ I • N\n[PROOFSTEP]\nobtain ⟨k, hk⟩ := (I.stableFiltration_stable ⊤).inter_right (I.trivialFiltration N)\n[GOAL]\ncase intro\nR M : Type u\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nI : Ideal R\nF F' : Filtration I M\ninst✝¹ : IsNoetherianRing R\ninst✝ : Module.Finite R M\nx : M\nN : Submodule R M := ⨅ (i : ℕ), I ^ i • ⊤\nhN : ∀ (k : ℕ), Filtration.N (stableFiltration I ⊤ ⊓ trivialFiltration I N) k = N\nthis : IsNoetherian R M\nk : ℕ\nhk :\n  ∀ (n : ℕ),\n    n ≥ k →\n      I • Filtration.N (stableFiltration I ⊤ ⊓ trivialFiltration I N) n =\n        Filtration.N (stableFiltration I ⊤ ⊓ trivialFiltration I N) (n + 1)\n⊢ N ≤ I • N\n[PROOFSTEP]\nhave := hk k (le_refl _)\n[GOAL]\ncase intro\nR M : Type u\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nI : Ideal R\nF F' : Filtration I M\ninst✝¹ : IsNoetherianRing R\ninst✝ : Module.Finite R M\nx : M\nN : Submodule R M := ⨅ (i : ℕ), I ^ i • ⊤\nhN : ∀ (k : ℕ), Filtration.N (stableFiltration I ⊤ ⊓ trivialFiltration I N) k = N\nthis✝ : IsNoetherian R M\nk : ℕ\nhk :\n  ∀ (n : ℕ),\n    n ≥ k →\n      I • Filtration.N (stableFiltration I ⊤ ⊓ trivialFiltration I N) n =\n        Filtration.N (stableFiltration I ⊤ ⊓ trivialFiltration I N) (n + 1)\nthis :\n  I • Filtration.N (stableFiltration I ⊤ ⊓ trivialFiltration I N) k =\n    Filtration.N (stableFiltration I ⊤ ⊓ trivialFiltration I N) (k + 1)\n⊢ N ≤ I • N\n[PROOFSTEP]\nrw [hN, hN] at this \n[GOAL]\ncase intro\nR M : Type u\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nI : Ideal R\nF F' : Filtration I M\ninst✝¹ : IsNoetherianRing R\ninst✝ : Module.Finite R M\nx : M\nN : Submodule R M := ⨅ (i : ℕ), I ^ i • ⊤\nhN : ∀ (k : ℕ), Filtration.N (stableFiltration I ⊤ ⊓ trivialFiltration I N) k = N\nthis✝ : IsNoetherian R M\nk : ℕ\nhk :\n  ∀ (n : ℕ),\n    n ≥ k →\n      I • Filtration.N (stableFiltration I ⊤ ⊓ trivialFiltration I N) n =\n        Filtration.N (stableFiltration I ⊤ ⊓ trivialFiltration I N) (n + 1)\nthis : I • N = N\n⊢ N ≤ I • N\n[PROOFSTEP]\nexact le_of_eq this.symm\n[GOAL]\ncase mp.intro.intro\nR M : Type u\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nI : Ideal R\nF F' : Filtration I M\ninst✝¹ : IsNoetherianRing R\ninst✝ : Module.Finite R M\nx : M\nN : Submodule R M := ⨅ (i : ℕ), I ^ i • ⊤\nhN : ∀ (k : ℕ), Filtration.N (stableFiltration I ⊤ ⊓ trivialFiltration I N) k = N\nthis : IsNoetherian R M\nr : R\nhr₁ : r ∈ I\nhr₂ : ∀ (n : M), n ∈ N → r • n = n\n⊢ x ∈ ⨅ (i : ℕ), I ^ i • ⊤ → ∃ r, ↑r • x = x\n[PROOFSTEP]\nintro H\n[GOAL]\ncase mp.intro.intro\nR M : Type u\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nI : Ideal R\nF F' : Filtration I M\ninst✝¹ : IsNoetherianRing R\ninst✝ : Module.Finite R M\nx : M\nN : Submodule R M := ⨅ (i : ℕ), I ^ i • ⊤\nhN : ∀ (k : ℕ), Filtration.N (stableFiltration I ⊤ ⊓ trivialFiltration I N) k = N\nthis : IsNoetherian R M\nr : R\nhr₁ : r ∈ I\nhr₂ : ∀ (n : M), n ∈ N → r • n = n\nH : x ∈ ⨅ (i : ℕ), I ^ i • ⊤\n⊢ ∃ r, ↑r • x = x\n[PROOFSTEP]\nexact ⟨⟨r, hr₁⟩, hr₂ _ H⟩\n[GOAL]\ncase mpr\nR M : Type u\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nI : Ideal R\nF F' : Filtration I M\ninst✝¹ : IsNoetherianRing R\ninst✝ : Module.Finite R M\nx : M\nN : Submodule R M := ⨅ (i : ℕ), I ^ i • ⊤\nhN : ∀ (k : ℕ), Filtration.N (stableFiltration I ⊤ ⊓ trivialFiltration I N) k = N\n⊢ (∃ r, ↑r • x = x) → x ∈ ⨅ (i : ℕ), I ^ i • ⊤\n[PROOFSTEP]\nrintro ⟨r, eq⟩\n[GOAL]\ncase mpr.intro\nR M : Type u\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nI : Ideal R\nF F' : Filtration I M\ninst✝¹ : IsNoetherianRing R\ninst✝ : Module.Finite R M\nx : M\nN : Submodule R M := ⨅ (i : ℕ), I ^ i • ⊤\nhN : ∀ (k : ℕ), Filtration.N (stableFiltration I ⊤ ⊓ trivialFiltration I N) k = N\nr : { x // x ∈ I }\neq : ↑r • x = x\n⊢ x ∈ ⨅ (i : ℕ), I ^ i • ⊤\n[PROOFSTEP]\nrw [Submodule.mem_iInf]\n[GOAL]\ncase mpr.intro\nR M : Type u\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nI : Ideal R\nF F' : Filtration I M\ninst✝¹ : IsNoetherianRing R\ninst✝ : Module.Finite R M\nx : M\nN : Submodule R M := ⨅ (i : ℕ), I ^ i • ⊤\nhN : ∀ (k : ℕ), Filtration.N (stableFiltration I ⊤ ⊓ trivialFiltration I N) k = N\nr : { x // x ∈ I }\neq : ↑r • x = x\n⊢ ∀ (i : ℕ), x ∈ I ^ i • ⊤\n[PROOFSTEP]\nintro i\n[GOAL]\ncase mpr.intro\nR M : Type u\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nI : Ideal R\nF F' : Filtration I M\ninst✝¹ : IsNoetherianRing R\ninst✝ : Module.Finite R M\nx : M\nN : Submodule R M := ⨅ (i : ℕ), I ^ i • ⊤\nhN : ∀ (k : ℕ), Filtration.N (stableFiltration I ⊤ ⊓ trivialFiltration I N) k = N\nr : { x // x ∈ I }\neq : ↑r • x = x\ni : ℕ\n⊢ x ∈ I ^ i • ⊤\n[PROOFSTEP]\ninduction' i with i hi\n[GOAL]\ncase mpr.intro.zero\nR M : Type u\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nI : Ideal R\nF F' : Filtration I M\ninst✝¹ : IsNoetherianRing R\ninst✝ : Module.Finite R M\nx : M\nN : Submodule R M := ⨅ (i : ℕ), I ^ i • ⊤\nhN : ∀ (k : ℕ), Filtration.N (stableFiltration I ⊤ ⊓ trivialFiltration I N) k = N\nr : { x // x ∈ I }\neq : ↑r • x = x\n⊢ x ∈ I ^ Nat.zero • ⊤\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mpr.intro.succ\nR M : Type u\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nI : Ideal R\nF F' : Filtration I M\ninst✝¹ : IsNoetherianRing R\ninst✝ : Module.Finite R M\nx : M\nN : Submodule R M := ⨅ (i : ℕ), I ^ i • ⊤\nhN : ∀ (k : ℕ), Filtration.N (stableFiltration I ⊤ ⊓ trivialFiltration I N) k = N\nr : { x // x ∈ I }\neq : ↑r • x = x\ni : ℕ\nhi : x ∈ I ^ i • ⊤\n⊢ x ∈ I ^ Nat.succ i • ⊤\n[PROOFSTEP]\nrw [Nat.succ_eq_one_add, pow_add, ← smul_smul, pow_one, ← eq]\n[GOAL]\ncase mpr.intro.succ\nR M : Type u\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nI : Ideal R\nF F' : Filtration I M\ninst✝¹ : IsNoetherianRing R\ninst✝ : Module.Finite R M\nx : M\nN : Submodule R M := ⨅ (i : ℕ), I ^ i • ⊤\nhN : ∀ (k : ℕ), Filtration.N (stableFiltration I ⊤ ⊓ trivialFiltration I N) k = N\nr : { x // x ∈ I }\neq : ↑r • x = x\ni : ℕ\nhi : x ∈ I ^ i • ⊤\n⊢ ↑r • x ∈ I • I ^ i • ⊤\n[PROOFSTEP]\nexact Submodule.smul_mem_smul r.prop hi\n[GOAL]\nR M : Type u\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\nI : Ideal R\nF F' : Filtration I M\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : Module.Finite R M\nh : I ≠ ⊤\n⊢ ⨅ (i : ℕ), I ^ i • ⊤ = ⊥\n[PROOFSTEP]\nrw [eq_bot_iff]\n[GOAL]\nR M : Type u\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\nI : Ideal R\nF F' : Filtration I M\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : Module.Finite R M\nh : I ≠ ⊤\n⊢ ⨅ (i : ℕ), I ^ i • ⊤ ≤ ⊥\n[PROOFSTEP]\nintro x hx\n[GOAL]\nR M : Type u\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\nI : Ideal R\nF F' : Filtration I M\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : Module.Finite R M\nh : I ≠ ⊤\nx : M\nhx : x ∈ ⨅ (i : ℕ), I ^ i • ⊤\n⊢ x ∈ ⊥\n[PROOFSTEP]\nobtain ⟨r, hr⟩ := (I.mem_iInf_smul_pow_eq_bot_iff x).mp hx\n[GOAL]\ncase intro\nR M : Type u\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\nI : Ideal R\nF F' : Filtration I M\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : Module.Finite R M\nh : I ≠ ⊤\nx : M\nhx : x ∈ ⨅ (i : ℕ), I ^ i • ⊤\nr : { x // x ∈ I }\nhr : ↑r • x = x\n⊢ x ∈ ⊥\n[PROOFSTEP]\nhave := LocalRing.isUnit_one_sub_self_of_mem_nonunits _ (LocalRing.le_maximalIdeal h r.prop)\n[GOAL]\ncase intro\nR M : Type u\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\nI : Ideal R\nF F' : Filtration I M\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : Module.Finite R M\nh : I ≠ ⊤\nx : M\nhx : x ∈ ⨅ (i : ℕ), I ^ i • ⊤\nr : { x // x ∈ I }\nhr : ↑r • x = x\nthis : IsUnit (1 - ↑r)\n⊢ x ∈ ⊥\n[PROOFSTEP]\napply this.smul_left_cancel.mp\n[GOAL]\ncase intro\nR M : Type u\ninst✝⁵ : CommRing R\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\nI : Ideal R\nF F' : Filtration I M\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : Module.Finite R M\nh : I ≠ ⊤\nx : M\nhx : x ∈ ⨅ (i : ℕ), I ^ i • ⊤\nr : { x // x ∈ I }\nhr : ↑r • x = x\nthis : IsUnit (1 - ↑r)\n⊢ (1 - ↑r) • x = (1 - ↑r) • 0\n[PROOFSTEP]\nsimp [sub_smul, hr]\n[GOAL]\nR M : Type u\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nI : Ideal R\nF F' : Filtration I M\ninst✝¹ : IsNoetherianRing R\ninst✝ : LocalRing R\nh : I ≠ ⊤\n⊢ ⨅ (i : ℕ), I ^ i = ⊥\n[PROOFSTEP]\nconvert I.iInf_pow_smul_eq_bot_of_localRing (M := R) h\n[GOAL]\ncase h.e'_2.h.e'_4.h\nR M : Type u\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nI : Ideal R\nF F' : Filtration I M\ninst✝¹ : IsNoetherianRing R\ninst✝ : LocalRing R\nh : I ≠ ⊤\nx✝ : ℕ\n⊢ I ^ x✝ = I ^ x✝ • ⊤\n[PROOFSTEP]\next i\n[GOAL]\ncase h.e'_2.h.e'_4.h.h\nR M : Type u\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nI : Ideal R\nF F' : Filtration I M\ninst✝¹ : IsNoetherianRing R\ninst✝ : LocalRing R\nh : I ≠ ⊤\nx✝ : ℕ\ni : R\n⊢ i ∈ I ^ x✝ ↔ i ∈ I ^ x✝ • ⊤\n[PROOFSTEP]\nrw [smul_eq_mul, ← Ideal.one_eq_top, mul_one]\n[GOAL]\nR M : Type u\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nI : Ideal R\nF F' : Filtration I M\ninst✝¹ : IsNoetherianRing R\ninst✝ : IsDomain R\nh : I ≠ ⊤\n⊢ ⨅ (i : ℕ), I ^ i = ⊥\n[PROOFSTEP]\nrw [eq_bot_iff]\n[GOAL]\nR M : Type u\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nI : Ideal R\nF F' : Filtration I M\ninst✝¹ : IsNoetherianRing R\ninst✝ : IsDomain R\nh : I ≠ ⊤\n⊢ ⨅ (i : ℕ), I ^ i ≤ ⊥\n[PROOFSTEP]\nintro x hx\n[GOAL]\nR M : Type u\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nI : Ideal R\nF F' : Filtration I M\ninst✝¹ : IsNoetherianRing R\ninst✝ : IsDomain R\nh : I ≠ ⊤\nx : R\nhx : x ∈ ⨅ (i : ℕ), I ^ i\n⊢ x ∈ ⊥\n[PROOFSTEP]\nby_contra hx'\n[GOAL]\nR M : Type u\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nI : Ideal R\nF F' : Filtration I M\ninst✝¹ : IsNoetherianRing R\ninst✝ : IsDomain R\nh : I ≠ ⊤\nx : R\nhx : x ∈ ⨅ (i : ℕ), I ^ i\nhx' : ¬x ∈ ⊥\n⊢ False\n[PROOFSTEP]\nhave := Ideal.mem_iInf_smul_pow_eq_bot_iff I x\n[GOAL]\nR M : Type u\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nI : Ideal R\nF F' : Filtration I M\ninst✝¹ : IsNoetherianRing R\ninst✝ : IsDomain R\nh : I ≠ ⊤\nx : R\nhx : x ∈ ⨅ (i : ℕ), I ^ i\nhx' : ¬x ∈ ⊥\nthis : x ∈ ⨅ (i : ℕ), I ^ i • ⊤ ↔ ∃ r, ↑r • x = x\n⊢ False\n[PROOFSTEP]\nsimp_rw [smul_eq_mul, ← Ideal.one_eq_top, mul_one] at this \n[GOAL]\nR M : Type u\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nI : Ideal R\nF F' : Filtration I M\ninst✝¹ : IsNoetherianRing R\ninst✝ : IsDomain R\nh : I ≠ ⊤\nx : R\nhx : x ∈ ⨅ (i : ℕ), I ^ i\nhx' : ¬x ∈ ⊥\nthis : x ∈ ⨅ (i : ℕ), I ^ i ↔ ∃ r, ↑r * x = x\n⊢ False\n[PROOFSTEP]\nobtain ⟨r, hr⟩ := this.mp hx\n[GOAL]\ncase intro\nR M : Type u\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nI : Ideal R\nF F' : Filtration I M\ninst✝¹ : IsNoetherianRing R\ninst✝ : IsDomain R\nh : I ≠ ⊤\nx : R\nhx : x ∈ ⨅ (i : ℕ), I ^ i\nhx' : ¬x ∈ ⊥\nthis : x ∈ ⨅ (i : ℕ), I ^ i ↔ ∃ r, ↑r * x = x\nr : { x // x ∈ I }\nhr : ↑r * x = x\n⊢ False\n[PROOFSTEP]\nhave := mul_right_cancel₀ hx' (hr.trans (one_mul x).symm)\n[GOAL]\ncase intro\nR M : Type u\ninst✝⁴ : CommRing R\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\nI : Ideal R\nF F' : Filtration I M\ninst✝¹ : IsNoetherianRing R\ninst✝ : IsDomain R\nh : I ≠ ⊤\nx : R\nhx : x ∈ ⨅ (i : ℕ), I ^ i\nhx' : ¬x ∈ ⊥\nthis✝ : x ∈ ⨅ (i : ℕ), I ^ i ↔ ∃ r, ↑r * x = x\nr : { x // x ∈ I }\nhr : ↑r * x = x\nthis : ↑r = 1\n⊢ False\n[PROOFSTEP]\nexact I.eq_top_iff_one.not.mp h (this ▸ r.prop)\n", "meta": {"mathlib_filename": "Mathlib.RingTheory.Filtration", "llama_tokens": 47949, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7461389930307512, "lm_q2_score": 0.6859494421679929, "lm_q1q2_score": 0.5118136260492318}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : ConditionallyCompleteLattice α\ns✝ t : Set α\na✝ b : α\ns : Finset β\nhs : Finset.Nonempty s\nf : β → α\na : α\n⊢ sup' s hs f ≤ a ↔ sSup (f '' ↑s) ≤ a\n[PROOFSTEP]\nsimp [csSup_le_iff (s.finite_toSet.image f).bddAbove (hs.to_set.image f)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : ConditionallyCompleteLattice α\ns✝ t : Set α\na b : α\ns : Finset α\nhs : Finset.Nonempty s\n⊢ sup' s hs id = sSup ↑s\n[PROOFSTEP]\nrw [hs.sup'_eq_cSup_image, Set.image_id]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : ConditionallyCompleteLinearOrder α\ns✝ t : Set α\na b : α\ns : Finset α\nh : Finset.Nonempty s\n⊢ sSup ↑s ∈ s\n[PROOFSTEP]\nrw [h.cSup_eq_max']\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : ConditionallyCompleteLinearOrder α\ns✝ t : Set α\na b : α\ns : Finset α\nh : Finset.Nonempty s\n⊢ max' s h ∈ s\n[PROOFSTEP]\nexact s.max'_mem _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : ConditionallyCompleteLinearOrder α\ns t : Set α\na b : α\nh : Set.Nonempty s\nhs : Set.Finite s\n⊢ sSup s ∈ s\n[PROOFSTEP]\nlift s to Finset α using hs\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : ConditionallyCompleteLinearOrder α\nt : Set α\na b : α\ns : Finset α\nh : Set.Nonempty ↑s\n⊢ sSup ↑s ∈ ↑s\n[PROOFSTEP]\nexact Finset.Nonempty.cSup_mem h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : ConditionallyCompleteLattice β\ns : Finset α\nH : Finset.Nonempty s\nf : α → β\n⊢ sup' s H f = sSup (f '' ↑s)\n[PROOFSTEP]\napply le_antisymm\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : ConditionallyCompleteLattice β\ns : Finset α\nH : Finset.Nonempty s\nf : α → β\n⊢ sup' s H f ≤ sSup (f '' ↑s)\n[PROOFSTEP]\nrefine' Finset.sup'_le _ _ fun a ha => _\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : ConditionallyCompleteLattice β\ns : Finset α\nH : Finset.Nonempty s\nf : α → β\na : α\nha : a ∈ s\n⊢ f a ≤ sSup (f '' ↑s)\n[PROOFSTEP]\nrefine' le_csSup ⟨s.sup' H f, _⟩ ⟨a, ha, rfl⟩\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : ConditionallyCompleteLattice β\ns : Finset α\nH : Finset.Nonempty s\nf : α → β\na : α\nha : a ∈ s\n⊢ sup' s H f ∈ upperBounds (f '' ↑s)\n[PROOFSTEP]\nrintro i ⟨j, hj, rfl⟩\n[GOAL]\ncase a.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : ConditionallyCompleteLattice β\ns : Finset α\nH : Finset.Nonempty s\nf : α → β\na : α\nha : a ∈ s\nj : α\nhj : j ∈ ↑s\n⊢ f j ≤ sup' s H f\n[PROOFSTEP]\nexact Finset.le_sup' _ hj\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : ConditionallyCompleteLattice β\ns : Finset α\nH : Finset.Nonempty s\nf : α → β\n⊢ sSup (f '' ↑s) ≤ sup' s H f\n[PROOFSTEP]\napply csSup_le ((coe_nonempty.mpr H).image _)\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : ConditionallyCompleteLattice β\ns : Finset α\nH : Finset.Nonempty s\nf : α → β\n⊢ ∀ (b : β), b ∈ f '' ↑s → b ≤ sup' s H f\n[PROOFSTEP]\nrintro _ ⟨a, ha, rfl⟩\n[GOAL]\ncase a.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : ConditionallyCompleteLattice β\ns : Finset α\nH : Finset.Nonempty s\nf : α → β\na : α\nha : a ∈ ↑s\n⊢ f a ≤ sup' s H f\n[PROOFSTEP]\nexact Finset.le_sup' _ ha\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : ConditionallyCompleteLattice α\ns : Finset α\nH : Finset.Nonempty s\n⊢ sup' s H id = sSup ↑s\n[PROOFSTEP]\nrw [sup'_eq_csSup_image s H, Set.image_id]\n", "meta": {"mathlib_filename": "Mathlib.Order.ConditionallyCompleteLattice.Finset", "llama_tokens": 1637, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7057850154599563, "lm_q2_score": 0.7248702702332475, "lm_q1q2_score": 0.5116025748830353}}
{"text": "[GOAL]\nC : Type u_1\nD : Type u_2\ninst✝² : Category.{?u.65, u_1} C\ninst✝¹ : Category.{?u.69, u_2} D\nL : C ⥤ D\nW : MorphismProperty C\nE : Type u_3\ninst✝ : Category.{?u.118, u_3} E\nh : StrictUniversalPropertyFixedTarget L W Eᵒᵖ\nF : Cᵒᵖ ⥤ E\nhF : MorphismProperty.IsInvertedBy (MorphismProperty.op W) F\n⊢ L.op ⋙ (fun F hF => (lift h F.rightOp (_ : MorphismProperty.IsInvertedBy W F.rightOp)).leftOp) F hF = F\n[PROOFSTEP]\nconvert congr_arg Functor.leftOp (h.fac F.rightOp hF.rightOp)\n[GOAL]\nC : Type u_1\nD : Type u_2\ninst✝² : Category.{?u.65, u_1} C\ninst✝¹ : Category.{?u.69, u_2} D\nL : C ⥤ D\nW : MorphismProperty C\nE : Type u_3\ninst✝ : Category.{?u.118, u_3} E\nh : StrictUniversalPropertyFixedTarget L W Eᵒᵖ\nF₁ F₂ : Dᵒᵖ ⥤ E\neq : L.op ⋙ F₁ = L.op ⋙ F₂\n⊢ F₁ = F₂\n[PROOFSTEP]\nsuffices F₁.rightOp = F₂.rightOp by rw [← F₁.rightOp_leftOp_eq, ← F₂.rightOp_leftOp_eq, this]\n[GOAL]\nC : Type u_1\nD : Type u_2\ninst✝² : Category.{?u.65, u_1} C\ninst✝¹ : Category.{?u.69, u_2} D\nL : C ⥤ D\nW : MorphismProperty C\nE : Type u_3\ninst✝ : Category.{?u.118, u_3} E\nh : StrictUniversalPropertyFixedTarget L W Eᵒᵖ\nF₁ F₂ : Dᵒᵖ ⥤ E\neq : L.op ⋙ F₁ = L.op ⋙ F₂\nthis : F₁.rightOp = F₂.rightOp\n⊢ F₁ = F₂\n[PROOFSTEP]\nrw [← F₁.rightOp_leftOp_eq, ← F₂.rightOp_leftOp_eq, this]\n[GOAL]\nC : Type u_1\nD : Type u_2\ninst✝² : Category.{?u.65, u_1} C\ninst✝¹ : Category.{?u.69, u_2} D\nL : C ⥤ D\nW : MorphismProperty C\nE : Type u_3\ninst✝ : Category.{?u.118, u_3} E\nh : StrictUniversalPropertyFixedTarget L W Eᵒᵖ\nF₁ F₂ : Dᵒᵖ ⥤ E\neq : L.op ⋙ F₁ = L.op ⋙ F₂\n⊢ F₁.rightOp = F₂.rightOp\n[PROOFSTEP]\nhave eq' := congr_arg Functor.rightOp eq\n[GOAL]\nC : Type u_1\nD : Type u_2\ninst✝² : Category.{?u.65, u_1} C\ninst✝¹ : Category.{?u.69, u_2} D\nL : C ⥤ D\nW : MorphismProperty C\nE : Type u_3\ninst✝ : Category.{?u.118, u_3} E\nh : StrictUniversalPropertyFixedTarget L W Eᵒᵖ\nF₁ F₂ : Dᵒᵖ ⥤ E\neq : L.op ⋙ F₁ = L.op ⋙ F₂\neq' : (L.op ⋙ F₁).rightOp = (L.op ⋙ F₂).rightOp\n⊢ F₁.rightOp = F₂.rightOp\n[PROOFSTEP]\nexact h.uniq _ _ eq'\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Localization.Opposite", "llama_tokens": 1099, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7853085909370422, "lm_q2_score": 0.6513548782017745, "lm_q1q2_score": 0.5115145816006043}}
{"text": "[GOAL]\nR : Type u\nΓ₀ : Type v\ninst✝¹ : Ring R\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nv : Valuation R Γ₀\nx y : R\nhx : x ∈ {x | ↑v x ≤ 1}\nhy : y ∈ {x | ↑v x ≤ 1}\n⊢ x * y ∈ {x | ↑v x ≤ 1}\n[PROOFSTEP]\nsimp only [Set.mem_setOf_eq, _root_.map_mul, mul_le_one' hx hy]\n[GOAL]\nR : Type u\nΓ₀ : Type v\ninst✝¹ : Ring R\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nv : Valuation R Γ₀\n⊢ 0 ∈\n    {\n          toSubsemigroup :=\n            { carrier := {x | ↑v x ≤ 1},\n              mul_mem' := (_ : ∀ {x y : R}, x ∈ {x | ↑v x ≤ 1} → y ∈ {x | ↑v x ≤ 1} → ↑v (x * y) ≤ 1) },\n          one_mem' := (_ : ↑v 1 ≤ 1) }.toSubsemigroup.carrier\n[PROOFSTEP]\nsimp only [Set.mem_setOf_eq, _root_.map_zero, zero_le']\n[GOAL]\nR : Type u\nΓ₀ : Type v\ninst✝¹ : Ring R\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nv : Valuation R Γ₀\nx : R\nhx :\n  x ∈\n    {\n            toSubmonoid :=\n              {\n                toSubsemigroup :=\n                  { carrier := {x | ↑v x ≤ 1},\n                    mul_mem' := (_ : ∀ {x y : R}, x ∈ {x | ↑v x ≤ 1} → y ∈ {x | ↑v x ≤ 1} → ↑v (x * y) ≤ 1) },\n                one_mem' := (_ : ↑v 1 ≤ 1) },\n            add_mem' :=\n              (_ :\n                ∀ {x y : R},\n                  x ∈\n                      {\n                            toSubsemigroup :=\n                              { carrier := {x | ↑v x ≤ 1},\n                                mul_mem' :=\n                                  (_ : ∀ {x y : R}, x ∈ {x | ↑v x ≤ 1} → y ∈ {x | ↑v x ≤ 1} → ↑v (x * y) ≤ 1) },\n                            one_mem' := (_ : ↑v 1 ≤ 1) }.toSubsemigroup.carrier →\n                    y ∈\n                        {\n                              toSubsemigroup :=\n                                { carrier := {x | ↑v x ≤ 1},\n                                  mul_mem' :=\n                                    (_ : ∀ {x y : R}, x ∈ {x | ↑v x ≤ 1} → y ∈ {x | ↑v x ≤ 1} → ↑v (x * y) ≤ 1) },\n                              one_mem' := (_ : ↑v 1 ≤ 1) }.toSubsemigroup.carrier →\n                      ↑v (x + y) ≤ 1),\n            zero_mem' := (_ : ↑v 0 ≤ 1) }.toSubmonoid.toSubsemigroup.carrier\n⊢ -x ∈\n    {\n            toSubmonoid :=\n              {\n                toSubsemigroup :=\n                  { carrier := {x | ↑v x ≤ 1},\n                    mul_mem' := (_ : ∀ {x y : R}, x ∈ {x | ↑v x ≤ 1} → y ∈ {x | ↑v x ≤ 1} → ↑v (x * y) ≤ 1) },\n                one_mem' := (_ : ↑v 1 ≤ 1) },\n            add_mem' :=\n              (_ :\n                ∀ {x y : R},\n                  x ∈\n                      {\n                            toSubsemigroup :=\n                              { carrier := {x | ↑v x ≤ 1},\n                                mul_mem' :=\n                                  (_ : ∀ {x y : R}, x ∈ {x | ↑v x ≤ 1} → y ∈ {x | ↑v x ≤ 1} → ↑v (x * y) ≤ 1) },\n                            one_mem' := (_ : ↑v 1 ≤ 1) }.toSubsemigroup.carrier →\n                    y ∈\n                        {\n                              toSubsemigroup :=\n                                { carrier := {x | ↑v x ≤ 1},\n                                  mul_mem' :=\n                                    (_ : ∀ {x y : R}, x ∈ {x | ↑v x ≤ 1} → y ∈ {x | ↑v x ≤ 1} → ↑v (x * y) ≤ 1) },\n                              one_mem' := (_ : ↑v 1 ≤ 1) }.toSubsemigroup.carrier →\n                      ↑v (x + y) ≤ 1),\n            zero_mem' := (_ : ↑v 0 ≤ 1) }.toSubmonoid.toSubsemigroup.carrier\n[PROOFSTEP]\nsimp only [Set.mem_setOf_eq] at hx \n[GOAL]\nR : Type u\nΓ₀ : Type v\ninst✝¹ : Ring R\ninst✝ : LinearOrderedCommGroupWithZero Γ₀\nv : Valuation R Γ₀\nx : R\nhx : ↑v x ≤ 1\n⊢ -x ∈\n    {\n            toSubmonoid :=\n              {\n                toSubsemigroup :=\n                  { carrier := {x | ↑v x ≤ 1},\n                    mul_mem' := (_ : ∀ {x y : R}, x ∈ {x | ↑v x ≤ 1} → y ∈ {x | ↑v x ≤ 1} → ↑v (x * y) ≤ 1) },\n                one_mem' := (_ : ↑v 1 ≤ 1) },\n            add_mem' :=\n              (_ :\n                ∀ {x y : R},\n                  x ∈\n                      {\n                            toSubsemigroup :=\n                              { carrier := {x | ↑v x ≤ 1},\n                                mul_mem' :=\n                                  (_ : ∀ {x y : R}, x ∈ {x | ↑v x ≤ 1} → y ∈ {x | ↑v x ≤ 1} → ↑v (x * y) ≤ 1) },\n                            one_mem' := (_ : ↑v 1 ≤ 1) }.toSubsemigroup.carrier →\n                    y ∈\n                        {\n                              toSubsemigroup :=\n                                { carrier := {x | ↑v x ≤ 1},\n                                  mul_mem' :=\n                                    (_ : ∀ {x y : R}, x ∈ {x | ↑v x ≤ 1} → y ∈ {x | ↑v x ≤ 1} → ↑v (x * y) ≤ 1) },\n                              one_mem' := (_ : ↑v 1 ≤ 1) }.toSubsemigroup.carrier →\n                      ↑v (x + y) ≤ 1),\n            zero_mem' := (_ : ↑v 0 ≤ 1) }.toSubmonoid.toSubsemigroup.carrier\n[PROOFSTEP]\nsimpa only [Set.mem_setOf_eq, map_neg]\n[GOAL]\nR : Type u\nΓ₀ : Type v\ninst✝⁵ : CommRing R\ninst✝⁴ : LinearOrderedCommGroupWithZero Γ₀\nv : Valuation R Γ₀\nO : Type w\ninst✝³ : CommRing O\ninst✝² : Algebra O R\ninst✝¹ : CommRing O\ninst✝ : Algebra O R\nhv : Integers v O\nx : O\nhx : IsUnit x\nu : Oˣ\nhu : ↑u = x\n⊢ 1 ≤ ↑v (↑(algebraMap O R) x)\n[PROOFSTEP]\nrw [← v.map_one, ← (algebraMap O R).map_one, ← u.mul_inv, ← mul_one (v (algebraMap O R x)), hu,\n  (algebraMap O R).map_mul, v.map_mul]\n[GOAL]\nR : Type u\nΓ₀ : Type v\ninst✝⁵ : CommRing R\ninst✝⁴ : LinearOrderedCommGroupWithZero Γ₀\nv : Valuation R Γ₀\nO : Type w\ninst✝³ : CommRing O\ninst✝² : Algebra O R\ninst✝¹ : CommRing O\ninst✝ : Algebra O R\nhv : Integers v O\nx : O\nhx : IsUnit x\nu : Oˣ\nhu : ↑u = x\n⊢ ↑v (↑(algebraMap O R) x) * ↑v (↑(algebraMap O R) ↑u⁻¹) ≤ ↑v (↑(algebraMap O R) x) * 1\n[PROOFSTEP]\nexact mul_le_mul_left' (hv.2 (u⁻¹ : Units O)) _\n[GOAL]\nR : Type u\nΓ₀ : Type v\ninst✝⁵ : CommRing R\ninst✝⁴ : LinearOrderedCommGroupWithZero Γ₀\nv : Valuation R Γ₀\nO : Type w\ninst✝³ : CommRing O\ninst✝² : Algebra O R\ninst✝¹ : CommRing O\ninst✝ : Algebra O R\nhv : Integers v O\nx : O\nhx : IsUnit (↑(algebraMap O R) x)\nhvx : ↑v (↑(algebraMap O R) x) = 1\nu : ((fun x => R) x)ˣ\nhu : ↑u = ↑(algebraMap O R) x\nh1 : ↑v ↑u ≤ 1\n⊢ ↑v ↑u⁻¹ ≤ 1\n[PROOFSTEP]\nrw [← one_mul (v _), ← hvx, ← v.map_mul, ← hu, u.mul_inv, hu, hvx, v.map_one]\n[GOAL]\nR : Type u\nΓ₀ : Type v\ninst✝⁵ : CommRing R\ninst✝⁴ : LinearOrderedCommGroupWithZero Γ₀\nv : Valuation R Γ₀\nO : Type w\ninst✝³ : CommRing O\ninst✝² : Algebra O R\ninst✝¹ : CommRing O\ninst✝ : Algebra O R\nhv : Integers v O\nx : O\nhx : IsUnit (↑(algebraMap O R) x)\nhvx : ↑v (↑(algebraMap O R) x) = 1\nu : ((fun x => R) x)ˣ\nhu : ↑u = ↑(algebraMap O R) x\nh1 : ↑v ↑u ≤ 1\nh2 : ↑v ↑u⁻¹ ≤ 1\nr1 : O\nhr1 : ↑(algebraMap O R) r1 = ↑u\nr2 : O\nhr2 : ↑(algebraMap O R) r2 = ↑u⁻¹\n⊢ ↑(algebraMap O R) (r1 * r2) = ↑(algebraMap O R) 1\n[PROOFSTEP]\nrw [RingHom.map_mul, RingHom.map_one, hr1, hr2, Units.mul_inv]\n[GOAL]\nR : Type u\nΓ₀ : Type v\ninst✝⁵ : CommRing R\ninst✝⁴ : LinearOrderedCommGroupWithZero Γ₀\nv : Valuation R Γ₀\nO : Type w\ninst✝³ : CommRing O\ninst✝² : Algebra O R\ninst✝¹ : CommRing O\ninst✝ : Algebra O R\nhv : Integers v O\nx : O\nhx : IsUnit (↑(algebraMap O R) x)\nhvx : ↑v (↑(algebraMap O R) x) = 1\nu : ((fun x => R) x)ˣ\nhu : ↑u = ↑(algebraMap O R) x\nh1 : ↑v ↑u ≤ 1\nh2 : ↑v ↑u⁻¹ ≤ 1\nr1 : O\nhr1 : ↑(algebraMap O R) r1 = ↑u\nr2 : O\nhr2 : ↑(algebraMap O R) r2 = ↑u⁻¹\n⊢ ↑(algebraMap O R) (r2 * r1) = ↑(algebraMap O R) 1\n[PROOFSTEP]\nrw [RingHom.map_mul, RingHom.map_one, hr1, hr2, Units.inv_mul]\n[GOAL]\nR : Type u\nΓ₀ : Type v\ninst✝⁵ : CommRing R\ninst✝⁴ : LinearOrderedCommGroupWithZero Γ₀\nv : Valuation R Γ₀\nO : Type w\ninst✝³ : CommRing O\ninst✝² : Algebra O R\ninst✝¹ : CommRing O\ninst✝ : Algebra O R\nhv : Integers v O\nx y : O\nh : x ∣ y\n⊢ ↑v (↑(algebraMap O R) y) ≤ ↑v (↑(algebraMap O R) x)\n[PROOFSTEP]\nlet ⟨z, hz⟩ := h\n[GOAL]\nR : Type u\nΓ₀ : Type v\ninst✝⁵ : CommRing R\ninst✝⁴ : LinearOrderedCommGroupWithZero Γ₀\nv : Valuation R Γ₀\nO : Type w\ninst✝³ : CommRing O\ninst✝² : Algebra O R\ninst✝¹ : CommRing O\ninst✝ : Algebra O R\nhv : Integers v O\nx y : O\nh : x ∣ y\nz : O\nhz : y = x * z\n⊢ ↑v (↑(algebraMap O R) y) ≤ ↑v (↑(algebraMap O R) x)\n[PROOFSTEP]\nrw [← mul_one (v (algebraMap O R x)), hz, RingHom.map_mul, v.map_mul]\n[GOAL]\nR : Type u\nΓ₀ : Type v\ninst✝⁵ : CommRing R\ninst✝⁴ : LinearOrderedCommGroupWithZero Γ₀\nv : Valuation R Γ₀\nO : Type w\ninst✝³ : CommRing O\ninst✝² : Algebra O R\ninst✝¹ : CommRing O\ninst✝ : Algebra O R\nhv : Integers v O\nx y : O\nh : x ∣ y\nz : O\nhz : y = x * z\n⊢ ↑v (↑(algebraMap O R) x) * ↑v (↑(algebraMap O R) z) ≤ ↑v (↑(algebraMap O R) x) * 1\n[PROOFSTEP]\nexact mul_le_mul_left' (hv.2 z) _\n[GOAL]\nF : Type u\nΓ₀ : Type v\ninst✝³ : Field F\ninst✝² : LinearOrderedCommGroupWithZero Γ₀\nv : Valuation F Γ₀\nO : Type w\ninst✝¹ : CommRing O\ninst✝ : Algebra O F\nhv : Integers v O\nx y : O\nh : ↑v (↑(algebraMap O F) x) ≤ ↑v (↑(algebraMap O F) y)\nhy : ↑(algebraMap O F) y ≠ 0\n⊢ ↑v ((↑(algebraMap O F) y)⁻¹ * ↑(algebraMap O F) x) ≤ 1\n[PROOFSTEP]\nrw [← v.map_one, ← inv_mul_cancel hy, v.map_mul, v.map_mul]\n[GOAL]\nF : Type u\nΓ₀ : Type v\ninst✝³ : Field F\ninst✝² : LinearOrderedCommGroupWithZero Γ₀\nv : Valuation F Γ₀\nO : Type w\ninst✝¹ : CommRing O\ninst✝ : Algebra O F\nhv : Integers v O\nx y : O\nh : ↑v (↑(algebraMap O F) x) ≤ ↑v (↑(algebraMap O F) y)\nhy : ↑(algebraMap O F) y ≠ 0\n⊢ ↑v (↑(algebraMap O F) y)⁻¹ * ↑v (↑(algebraMap O F) x) ≤ ↑v (↑(algebraMap O F) y)⁻¹ * ↑v (↑(algebraMap O F) y)\n[PROOFSTEP]\nexact mul_le_mul_left' h _\n", "meta": {"mathlib_filename": "Mathlib.RingTheory.Valuation.Integers", "llama_tokens": 4331, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8519528170040853, "lm_q2_score": 0.600188359260205, "lm_q1q2_score": 0.5113321634047916}}
{"text": "[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : CommRing S\ninst✝⁶ : CommRing T\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra K L\nι κ : Type w\ninst✝ : Fintype ι\nb : Basis ι R S\nh : ¬∃ s, Nonempty (Basis { x // x ∈ s } R S)\n⊢ trace R S = 0\n[PROOFSTEP]\next s\n[GOAL]\ncase h\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : CommRing S\ninst✝⁶ : CommRing T\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra K L\nι κ : Type w\ninst✝ : Fintype ι\nb : Basis ι R S\nh : ¬∃ s, Nonempty (Basis { x // x ∈ s } R S)\ns : S\n⊢ ↑(trace R S) s = ↑0 s\n[PROOFSTEP]\nsimp [trace_apply, LinearMap.trace, h]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁹ : CommRing R\ninst✝⁸ : CommRing S\ninst✝⁷ : CommRing T\ninst✝⁶ : Algebra R S\ninst✝⁵ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Algebra K L\nι κ : Type w\ninst✝¹ : Fintype ι\nb✝ : Basis ι R S\ninst✝ : DecidableEq ι\nb : Basis ι R S\ns : S\n⊢ ↑(trace R S) s = Matrix.trace (↑(leftMulMatrix b) s)\n[PROOFSTEP]\nrw [trace_apply, LinearMap.trace_eq_matrix_trace _ b, ← toMatrix_lmul_eq]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁹ : CommRing R\ninst✝⁸ : CommRing S\ninst✝⁷ : CommRing T\ninst✝⁶ : Algebra R S\ninst✝⁵ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Algebra K L\nι κ : Type w\ninst✝¹ : Fintype ι\nb✝ : Basis ι R S\ninst✝ : DecidableEq ι\nb : Basis ι R S\ns : S\n⊢ Matrix.trace (↑(toMatrix b b) (↑(lmul R S) s)) = Matrix.trace (↑(toMatrix b b) (mulLeft R s))\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : CommRing S\ninst✝⁶ : CommRing T\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra K L\nι κ : Type w\ninst✝ : Fintype ι\nb : Basis ι R S\nx : R\n⊢ ↑(trace R S) (↑(algebraMap R S) x) = Fintype.card ι • x\n[PROOFSTEP]\nhaveI := Classical.decEq ι\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : CommRing S\ninst✝⁶ : CommRing T\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra K L\nι κ : Type w\ninst✝ : Fintype ι\nb : Basis ι R S\nx : R\nthis : DecidableEq ι\n⊢ ↑(trace R S) (↑(algebraMap R S) x) = Fintype.card ι • x\n[PROOFSTEP]\nrw [trace_apply, LinearMap.trace_eq_matrix_trace R b, Matrix.trace]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : CommRing S\ninst✝⁶ : CommRing T\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra K L\nι κ : Type w\ninst✝ : Fintype ι\nb : Basis ι R S\nx : R\nthis : DecidableEq ι\n⊢ ∑ i : ι, Matrix.diag (↑(toMatrix b b) (↑(lmul R S) (↑(algebraMap R S) x))) i = Fintype.card ι • x\n[PROOFSTEP]\nconvert Finset.sum_const x\n[GOAL]\ncase h.e'_2.a\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : CommRing S\ninst✝⁶ : CommRing T\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra K L\nι κ : Type w\ninst✝ : Fintype ι\nb : Basis ι R S\nx : R\nthis : DecidableEq ι\nx✝ : ι\na✝ : x✝ ∈ Finset.univ\n⊢ Matrix.diag (↑(toMatrix b b) (↑(lmul R S) (↑(algebraMap R S) x))) x✝ = x\n[PROOFSTEP]\nsimp only [AlgHom.commutes, toMatrix_algebraMap, diag_apply, Matrix.scalar_apply_eq]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : CommRing S\ninst✝⁶ : CommRing T\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra K L\nι κ : Type w\ninst✝ : Fintype ι\nb : Basis ι R S\nx : K\n⊢ ↑(trace K L) (↑(algebraMap K L) x) = finrank K L • x\n[PROOFSTEP]\nby_cases H : ∃ s : Finset L, Nonempty (Basis s K L)\n[GOAL]\ncase pos\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : CommRing S\ninst✝⁶ : CommRing T\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra K L\nι κ : Type w\ninst✝ : Fintype ι\nb : Basis ι R S\nx : K\nH : ∃ s, Nonempty (Basis { x // x ∈ s } K L)\n⊢ ↑(trace K L) (↑(algebraMap K L) x) = finrank K L • x\n[PROOFSTEP]\nrw [trace_algebraMap_of_basis H.choose_spec.some, finrank_eq_card_basis H.choose_spec.some]\n[GOAL]\ncase neg\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : CommRing S\ninst✝⁶ : CommRing T\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra K L\nι κ : Type w\ninst✝ : Fintype ι\nb : Basis ι R S\nx : K\nH : ¬∃ s, Nonempty (Basis { x // x ∈ s } K L)\n⊢ ↑(trace K L) (↑(algebraMap K L) x) = finrank K L • x\n[PROOFSTEP]\nsimp [trace_eq_zero_of_not_exists_basis K H, finrank_eq_zero_of_not_exists_basis_finset H]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹² : CommRing R\ninst✝¹¹ : CommRing S\ninst✝¹⁰ : CommRing T\ninst✝⁹ : Algebra R S\ninst✝⁸ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Algebra K L\nι✝ κ✝ : Type w\ninst✝⁴ : Fintype ι✝\nb✝ : Basis ι✝ R S\ninst✝³ : Algebra S T\ninst✝² : IsScalarTower R S T\nι : Type u_6\nκ : Type u_7\ninst✝¹ : Finite ι\ninst✝ : Finite κ\nb : Basis ι R S\nc : Basis κ S T\nx : T\n⊢ ↑(trace R S) (↑(trace S T) x) = ↑(trace R T) x\n[PROOFSTEP]\nhaveI := Classical.decEq ι\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹² : CommRing R\ninst✝¹¹ : CommRing S\ninst✝¹⁰ : CommRing T\ninst✝⁹ : Algebra R S\ninst✝⁸ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Algebra K L\nι✝ κ✝ : Type w\ninst✝⁴ : Fintype ι✝\nb✝ : Basis ι✝ R S\ninst✝³ : Algebra S T\ninst✝² : IsScalarTower R S T\nι : Type u_6\nκ : Type u_7\ninst✝¹ : Finite ι\ninst✝ : Finite κ\nb : Basis ι R S\nc : Basis κ S T\nx : T\nthis : DecidableEq ι\n⊢ ↑(trace R S) (↑(trace S T) x) = ↑(trace R T) x\n[PROOFSTEP]\nhaveI := Classical.decEq κ\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹² : CommRing R\ninst✝¹¹ : CommRing S\ninst✝¹⁰ : CommRing T\ninst✝⁹ : Algebra R S\ninst✝⁸ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Algebra K L\nι✝ κ✝ : Type w\ninst✝⁴ : Fintype ι✝\nb✝ : Basis ι✝ R S\ninst✝³ : Algebra S T\ninst✝² : IsScalarTower R S T\nι : Type u_6\nκ : Type u_7\ninst✝¹ : Finite ι\ninst✝ : Finite κ\nb : Basis ι R S\nc : Basis κ S T\nx : T\nthis✝ : DecidableEq ι\nthis : DecidableEq κ\n⊢ ↑(trace R S) (↑(trace S T) x) = ↑(trace R T) x\n[PROOFSTEP]\ncases nonempty_fintype ι\n[GOAL]\ncase intro\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹² : CommRing R\ninst✝¹¹ : CommRing S\ninst✝¹⁰ : CommRing T\ninst✝⁹ : Algebra R S\ninst✝⁸ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Algebra K L\nι✝ κ✝ : Type w\ninst✝⁴ : Fintype ι✝\nb✝ : Basis ι✝ R S\ninst✝³ : Algebra S T\ninst✝² : IsScalarTower R S T\nι : Type u_6\nκ : Type u_7\ninst✝¹ : Finite ι\ninst✝ : Finite κ\nb : Basis ι R S\nc : Basis κ S T\nx : T\nthis✝ : DecidableEq ι\nthis : DecidableEq κ\nval✝ : Fintype ι\n⊢ ↑(trace R S) (↑(trace S T) x) = ↑(trace R T) x\n[PROOFSTEP]\ncases nonempty_fintype κ\n[GOAL]\ncase intro.intro\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹² : CommRing R\ninst✝¹¹ : CommRing S\ninst✝¹⁰ : CommRing T\ninst✝⁹ : Algebra R S\ninst✝⁸ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Algebra K L\nι✝ κ✝ : Type w\ninst✝⁴ : Fintype ι✝\nb✝ : Basis ι✝ R S\ninst✝³ : Algebra S T\ninst✝² : IsScalarTower R S T\nι : Type u_6\nκ : Type u_7\ninst✝¹ : Finite ι\ninst✝ : Finite κ\nb : Basis ι R S\nc : Basis κ S T\nx : T\nthis✝ : DecidableEq ι\nthis : DecidableEq κ\nval✝¹ : Fintype ι\nval✝ : Fintype κ\n⊢ ↑(trace R S) (↑(trace S T) x) = ↑(trace R T) x\n[PROOFSTEP]\nrw [trace_eq_matrix_trace (b.smul c), trace_eq_matrix_trace b, trace_eq_matrix_trace c, Matrix.trace, Matrix.trace,\n  Matrix.trace, ← Finset.univ_product_univ, Finset.sum_product]\n[GOAL]\ncase intro.intro\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹² : CommRing R\ninst✝¹¹ : CommRing S\ninst✝¹⁰ : CommRing T\ninst✝⁹ : Algebra R S\ninst✝⁸ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Algebra K L\nι✝ κ✝ : Type w\ninst✝⁴ : Fintype ι✝\nb✝ : Basis ι✝ R S\ninst✝³ : Algebra S T\ninst✝² : IsScalarTower R S T\nι : Type u_6\nκ : Type u_7\ninst✝¹ : Finite ι\ninst✝ : Finite κ\nb : Basis ι R S\nc : Basis κ S T\nx : T\nthis✝ : DecidableEq ι\nthis : DecidableEq κ\nval✝¹ : Fintype ι\nval✝ : Fintype κ\n⊢ ∑ i : ι, Matrix.diag (↑(leftMulMatrix b) (∑ i : κ, Matrix.diag (↑(leftMulMatrix c) x) i)) i =\n    ∑ x_1 : ι, ∑ y : κ, Matrix.diag (↑(leftMulMatrix (Basis.smul b c)) x) (x_1, y)\n[PROOFSTEP]\nrefine' Finset.sum_congr rfl fun i _ => _\n[GOAL]\ncase intro.intro\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹² : CommRing R\ninst✝¹¹ : CommRing S\ninst✝¹⁰ : CommRing T\ninst✝⁹ : Algebra R S\ninst✝⁸ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Algebra K L\nι✝ κ✝ : Type w\ninst✝⁴ : Fintype ι✝\nb✝ : Basis ι✝ R S\ninst✝³ : Algebra S T\ninst✝² : IsScalarTower R S T\nι : Type u_6\nκ : Type u_7\ninst✝¹ : Finite ι\ninst✝ : Finite κ\nb : Basis ι R S\nc : Basis κ S T\nx : T\nthis✝ : DecidableEq ι\nthis : DecidableEq κ\nval✝¹ : Fintype ι\nval✝ : Fintype κ\ni : ι\nx✝ : i ∈ Finset.univ\n⊢ Matrix.diag (↑(leftMulMatrix b) (∑ i : κ, Matrix.diag (↑(leftMulMatrix c) x) i)) i =\n    ∑ y : κ, Matrix.diag (↑(leftMulMatrix (Basis.smul b c)) x) (i, y)\n[PROOFSTEP]\nsimp only [AlgHom.map_sum, smul_leftMulMatrix, Finset.sum_apply, Matrix.diag]\n  -- Porting note: the `rw` was inside `simp only`, but it doesn't work anymore.\n[GOAL]\ncase intro.intro\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹² : CommRing R\ninst✝¹¹ : CommRing S\ninst✝¹⁰ : CommRing T\ninst✝⁹ : Algebra R S\ninst✝⁸ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Algebra K L\nι✝ κ✝ : Type w\ninst✝⁴ : Fintype ι✝\nb✝ : Basis ι✝ R S\ninst✝³ : Algebra S T\ninst✝² : IsScalarTower R S T\nι : Type u_6\nκ : Type u_7\ninst✝¹ : Finite ι\ninst✝ : Finite κ\nb : Basis ι R S\nc : Basis κ S T\nx : T\nthis✝ : DecidableEq ι\nthis : DecidableEq κ\nval✝¹ : Fintype ι\nval✝ : Fintype κ\ni : ι\nx✝ : i ∈ Finset.univ\n⊢ Finset.sum Finset.univ (fun x_1 => ↑(leftMulMatrix b) (↑(leftMulMatrix c) x x_1 x_1)) i i =\n    ∑ x_1 : κ, ↑(leftMulMatrix b) (↑(leftMulMatrix c) x x_1 x_1) i i\n[PROOFSTEP]\nrw [Finset.sum_apply i (Finset.univ : Finset κ) fun y => leftMulMatrix b (leftMulMatrix c x y y)]\n[GOAL]\ncase intro.intro\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹² : CommRing R\ninst✝¹¹ : CommRing S\ninst✝¹⁰ : CommRing T\ninst✝⁹ : Algebra R S\ninst✝⁸ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Algebra K L\nι✝ κ✝ : Type w\ninst✝⁴ : Fintype ι✝\nb✝ : Basis ι✝ R S\ninst✝³ : Algebra S T\ninst✝² : IsScalarTower R S T\nι : Type u_6\nκ : Type u_7\ninst✝¹ : Finite ι\ninst✝ : Finite κ\nb : Basis ι R S\nc : Basis κ S T\nx : T\nthis✝ : DecidableEq ι\nthis : DecidableEq κ\nval✝¹ : Fintype ι\nval✝ : Fintype κ\ni : ι\nx✝ : i ∈ Finset.univ\n⊢ Finset.sum Finset.univ (fun c_1 => ↑(leftMulMatrix b) (↑(leftMulMatrix c) x c_1 c_1) i) i =\n    ∑ x_1 : κ, ↑(leftMulMatrix b) (↑(leftMulMatrix c) x x_1 x_1) i i\n[PROOFSTEP]\napply Finset.sum_apply\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹² : CommRing R\ninst✝¹¹ : CommRing S\ninst✝¹⁰ : CommRing T\ninst✝⁹ : Algebra R S\ninst✝⁸ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Algebra K L\nι✝ κ✝ : Type w\ninst✝⁴ : Fintype ι✝\nb✝ : Basis ι✝ R S\ninst✝³ : Algebra S T\ninst✝² : IsScalarTower R S T\nι : Type u_6\nκ : Type u_7\ninst✝¹ : Finite ι\ninst✝ : Fintype κ\nb : Basis ι R S\nc : Basis κ S T\n⊢ comp (trace R S) (↑R (trace S T)) = trace R T\n[PROOFSTEP]\next\n[GOAL]\ncase h\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹² : CommRing R\ninst✝¹¹ : CommRing S\ninst✝¹⁰ : CommRing T\ninst✝⁹ : Algebra R S\ninst✝⁸ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Algebra K L\nι✝ κ✝ : Type w\ninst✝⁴ : Fintype ι✝\nb✝ : Basis ι✝ R S\ninst✝³ : Algebra S T\ninst✝² : IsScalarTower R S T\nι : Type u_6\nκ : Type u_7\ninst✝¹ : Finite ι\ninst✝ : Fintype κ\nb : Basis ι R S\nc : Basis κ S T\nx✝ : T\n⊢ ↑(comp (trace R S) (↑R (trace S T))) x✝ = ↑(trace R T) x✝\n[PROOFSTEP]\nrw [LinearMap.comp_apply, LinearMap.restrictScalars_apply, trace_trace_of_basis b c]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹³ : CommRing R\ninst✝¹² : CommRing S\ninst✝¹¹ : CommRing T\ninst✝¹⁰ : Algebra R S\ninst✝⁹ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝⁸ : Field K\ninst✝⁷ : Field L\ninst✝⁶ : Algebra K L\nι κ : Type w\ninst✝⁵ : Fintype ι\nb : Basis ι R S\ninst✝⁴ : Algebra K T\ninst✝³ : Algebra L T\ninst✝² : IsScalarTower K L T\ninst✝¹ : FiniteDimensional K L\ninst✝ : FiniteDimensional L T\n⊢ comp (trace K L) (↑K (trace L T)) = trace K T\n[PROOFSTEP]\next\n[GOAL]\ncase h\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹³ : CommRing R\ninst✝¹² : CommRing S\ninst✝¹¹ : CommRing T\ninst✝¹⁰ : Algebra R S\ninst✝⁹ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝⁸ : Field K\ninst✝⁷ : Field L\ninst✝⁶ : Algebra K L\nι κ : Type w\ninst✝⁵ : Fintype ι\nb : Basis ι R S\ninst✝⁴ : Algebra K T\ninst✝³ : Algebra L T\ninst✝² : IsScalarTower K L T\ninst✝¹ : FiniteDimensional K L\ninst✝ : FiniteDimensional L T\nx✝ : T\n⊢ ↑(comp (trace K L) (↑K (trace L T))) x✝ = ↑(trace K T) x✝\n[PROOFSTEP]\nrw [LinearMap.comp_apply, LinearMap.restrictScalars_apply, trace_trace]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹² : CommRing R\ninst✝¹¹ : CommRing S\ninst✝¹⁰ : CommRing T\ninst✝⁹ : Algebra R S\ninst✝⁸ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Algebra K L\nι κ : Type w\ninst✝⁴ : Fintype ι\nb : Basis ι R S\ninst✝³ : Module.Free R S\ninst✝² : Module.Free R T\ninst✝¹ : Module.Finite R S\ninst✝ : Module.Finite R T\nx : S × T\n⊢ ↑(trace R (S × T)) x = ↑(trace R S) x.fst + ↑(trace R T) x.snd\n[PROOFSTEP]\nnontriviality R\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹² : CommRing R\ninst✝¹¹ : CommRing S\ninst✝¹⁰ : CommRing T\ninst✝⁹ : Algebra R S\ninst✝⁸ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Algebra K L\nι κ : Type w\ninst✝⁴ : Fintype ι\nb : Basis ι R S\ninst✝³ : Module.Free R S\ninst✝² : Module.Free R T\ninst✝¹ : Module.Finite R S\ninst✝ : Module.Finite R T\nx : S × T\n✝ : Nontrivial R\n⊢ ↑(trace R (S × T)) x = ↑(trace R S) x.fst + ↑(trace R T) x.snd\n[PROOFSTEP]\nlet f := (lmul R S).toLinearMap.prodMap (lmul R T).toLinearMap\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹² : CommRing R\ninst✝¹¹ : CommRing S\ninst✝¹⁰ : CommRing T\ninst✝⁹ : Algebra R S\ninst✝⁸ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Algebra K L\nι κ : Type w\ninst✝⁴ : Fintype ι\nb : Basis ι R S\ninst✝³ : Module.Free R S\ninst✝² : Module.Free R T\ninst✝¹ : Module.Finite R S\ninst✝ : Module.Finite R T\nx : S × T\n✝ : Nontrivial R\nf : S × T →ₗ[R] Module.End R S × Module.End R T :=\n  prodMap (AlgHom.toLinearMap (lmul R S)) (AlgHom.toLinearMap (lmul R T))\n⊢ ↑(trace R (S × T)) x = ↑(trace R S) x.fst + ↑(trace R T) x.snd\n[PROOFSTEP]\nhave : (lmul R (S × T)).toLinearMap = (prodMapLinear R S T S T R).comp f := LinearMap.ext₂ Prod.mul_def\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹² : CommRing R\ninst✝¹¹ : CommRing S\ninst✝¹⁰ : CommRing T\ninst✝⁹ : Algebra R S\ninst✝⁸ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Algebra K L\nι κ : Type w\ninst✝⁴ : Fintype ι\nb : Basis ι R S\ninst✝³ : Module.Free R S\ninst✝² : Module.Free R T\ninst✝¹ : Module.Finite R S\ninst✝ : Module.Finite R T\nx : S × T\n✝ : Nontrivial R\nf : S × T →ₗ[R] Module.End R S × Module.End R T :=\n  prodMap (AlgHom.toLinearMap (lmul R S)) (AlgHom.toLinearMap (lmul R T))\nthis : AlgHom.toLinearMap (lmul R (S × T)) = comp (prodMapLinear R S T S T R) f\n⊢ ↑(trace R (S × T)) x = ↑(trace R S) x.fst + ↑(trace R T) x.snd\n[PROOFSTEP]\nsimp_rw [trace, this]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹² : CommRing R\ninst✝¹¹ : CommRing S\ninst✝¹⁰ : CommRing T\ninst✝⁹ : Algebra R S\ninst✝⁸ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Algebra K L\nι κ : Type w\ninst✝⁴ : Fintype ι\nb : Basis ι R S\ninst✝³ : Module.Free R S\ninst✝² : Module.Free R T\ninst✝¹ : Module.Finite R S\ninst✝ : Module.Finite R T\nx : S × T\n✝ : Nontrivial R\nf : S × T →ₗ[R] Module.End R S × Module.End R T :=\n  prodMap (AlgHom.toLinearMap (lmul R S)) (AlgHom.toLinearMap (lmul R T))\nthis : AlgHom.toLinearMap (lmul R (S × T)) = comp (prodMapLinear R S T S T R) f\n⊢ ↑(comp (LinearMap.trace R (S × T))\n          (comp (prodMapLinear R S T S T R) (prodMap (AlgHom.toLinearMap (lmul R S)) (AlgHom.toLinearMap (lmul R T)))))\n      x =\n    ↑(comp (LinearMap.trace R S) (AlgHom.toLinearMap (lmul R S))) x.fst +\n      ↑(comp (LinearMap.trace R T) (AlgHom.toLinearMap (lmul R T))) x.snd\n[PROOFSTEP]\nexact trace_prodMap' _ _\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹² : CommRing R\ninst✝¹¹ : CommRing S\ninst✝¹⁰ : CommRing T\ninst✝⁹ : Algebra R S\ninst✝⁸ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Algebra K L\nι κ : Type w\ninst✝⁴ : Fintype ι\nb : Basis ι R S\ninst✝³ : Module.Free R S\ninst✝² : Module.Free R T\ninst✝¹ : Module.Finite R S\ninst✝ : Module.Finite R T\np : S × T\n⊢ ↑(trace R (S × T)) p = ↑(coprod (trace R S) (trace R T)) p\n[PROOFSTEP]\nrw [coprod_apply, trace_prod_apply]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁹ : CommRing R\ninst✝⁸ : CommRing S\ninst✝⁷ : CommRing T\ninst✝⁶ : Algebra R S\ninst✝⁵ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Algebra K L\nι κ : Type w\ninst✝¹ : Fintype ι\nb : Basis ι R S\ninst✝ : DecidableEq ι\ni j : ι\n⊢ ↑(BilinForm.toMatrix b) (traceForm R S) i j = ↑(trace R S) (↑b i * ↑b j)\n[PROOFSTEP]\nrw [BilinForm.toMatrix_apply, traceForm_apply]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : CommRing S\ninst✝⁶ : CommRing T\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra K L\nι κ : Type w\ninst✝ : Fintype ι\nb : Basis ι R S\nh : PowerBasis R S\n⊢ ↑(BilinForm.toMatrix h.basis) (traceForm R S) = ↑of fun i j => ↑(trace R S) (h.gen ^ (↑i + ↑j))\n[PROOFSTEP]\next\n[GOAL]\ncase a.h\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : CommRing S\ninst✝⁶ : CommRing T\ninst✝⁵ : Algebra R S\ninst✝⁴ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra K L\nι κ : Type w\ninst✝ : Fintype ι\nb : Basis ι R S\nh : PowerBasis R S\ni✝ x✝ : Fin h.dim\n⊢ ↑(BilinForm.toMatrix h.basis) (traceForm R S) i✝ x✝ = ↑of (fun i j => ↑(trace R S) (h.gen ^ (↑i + ↑j))) i✝ x✝\n[PROOFSTEP]\nrw [traceForm_toMatrix, of_apply, pow_add, h.basis_eq_pow, h.basis_eq_pow]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹² : CommRing R\ninst✝¹¹ : CommRing S\ninst✝¹⁰ : CommRing T\ninst✝⁹ : Algebra R S\ninst✝⁸ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Algebra K L\nι κ : Type w\ninst✝⁴ : Fintype ι\nF : Type u_6\ninst✝³ : Field F\ninst✝² : Algebra K S\ninst✝¹ : Algebra K F\ninst✝ : Nontrivial S\npb : PowerBasis K S\n⊢ ↑(Algebra.trace K S) pb.gen = -nextCoeff (minpoly K pb.gen)\n[PROOFSTEP]\nhave d_pos : 0 < pb.dim := PowerBasis.dim_pos pb\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹² : CommRing R\ninst✝¹¹ : CommRing S\ninst✝¹⁰ : CommRing T\ninst✝⁹ : Algebra R S\ninst✝⁸ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Algebra K L\nι κ : Type w\ninst✝⁴ : Fintype ι\nF : Type u_6\ninst✝³ : Field F\ninst✝² : Algebra K S\ninst✝¹ : Algebra K F\ninst✝ : Nontrivial S\npb : PowerBasis K S\nd_pos : 0 < pb.dim\n⊢ ↑(Algebra.trace K S) pb.gen = -nextCoeff (minpoly K pb.gen)\n[PROOFSTEP]\nhave d_pos' : 0 < (minpoly K pb.gen).natDegree := by simpa\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹² : CommRing R\ninst✝¹¹ : CommRing S\ninst✝¹⁰ : CommRing T\ninst✝⁹ : Algebra R S\ninst✝⁸ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Algebra K L\nι κ : Type w\ninst✝⁴ : Fintype ι\nF : Type u_6\ninst✝³ : Field F\ninst✝² : Algebra K S\ninst✝¹ : Algebra K F\ninst✝ : Nontrivial S\npb : PowerBasis K S\nd_pos : 0 < pb.dim\n⊢ 0 < natDegree (minpoly K pb.gen)\n[PROOFSTEP]\nsimpa\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹² : CommRing R\ninst✝¹¹ : CommRing S\ninst✝¹⁰ : CommRing T\ninst✝⁹ : Algebra R S\ninst✝⁸ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Algebra K L\nι κ : Type w\ninst✝⁴ : Fintype ι\nF : Type u_6\ninst✝³ : Field F\ninst✝² : Algebra K S\ninst✝¹ : Algebra K F\ninst✝ : Nontrivial S\npb : PowerBasis K S\nd_pos : 0 < pb.dim\nd_pos' : 0 < natDegree (minpoly K pb.gen)\n⊢ ↑(Algebra.trace K S) pb.gen = -nextCoeff (minpoly K pb.gen)\n[PROOFSTEP]\nhaveI : Nonempty (Fin pb.dim) := ⟨⟨0, d_pos⟩⟩\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹² : CommRing R\ninst✝¹¹ : CommRing S\ninst✝¹⁰ : CommRing T\ninst✝⁹ : Algebra R S\ninst✝⁸ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Algebra K L\nι κ : Type w\ninst✝⁴ : Fintype ι\nF : Type u_6\ninst✝³ : Field F\ninst✝² : Algebra K S\ninst✝¹ : Algebra K F\ninst✝ : Nontrivial S\npb : PowerBasis K S\nd_pos : 0 < pb.dim\nd_pos' : 0 < natDegree (minpoly K pb.gen)\nthis : Nonempty (Fin pb.dim)\n⊢ ↑(Algebra.trace K S) pb.gen = -nextCoeff (minpoly K pb.gen)\n[PROOFSTEP]\nrw [trace_eq_matrix_trace pb.basis, trace_eq_neg_charpoly_coeff, charpoly_leftMulMatrix, ← pb.natDegree_minpoly,\n  Fintype.card_fin, ← nextCoeff_of_pos_natDegree _ d_pos']\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹² : CommRing R\ninst✝¹¹ : CommRing S\ninst✝¹⁰ : CommRing T\ninst✝⁹ : Algebra R S\ninst✝⁸ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Algebra K L\nι κ : Type w\ninst✝⁴ : Fintype ι\nF : Type u_6\ninst✝³ : Field F\ninst✝² : Algebra K S\ninst✝¹ : Algebra K F\ninst✝ : Nontrivial S\npb : PowerBasis K S\nhf : Splits (algebraMap K F) (minpoly K pb.gen)\n⊢ ↑(algebraMap K F) (↑(Algebra.trace K S) pb.gen) =\n    Multiset.sum (roots (Polynomial.map (algebraMap K F) (minpoly K pb.gen)))\n[PROOFSTEP]\nrw [PowerBasis.trace_gen_eq_nextCoeff_minpoly, RingHom.map_neg, ← nextCoeff_map (algebraMap K F).injective,\n  sum_roots_eq_nextCoeff_of_monic_of_split ((minpoly.monic (PowerBasis.isIntegral_gen _)).map _)\n    ((splits_id_iff_splits _).2 hf),\n  neg_neg]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : CommRing S\ninst✝⁹ : CommRing T\ninst✝⁸ : Algebra R S\ninst✝⁷ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝⁶ : Field K\ninst✝⁵ : Field L\ninst✝⁴ : Algebra K L\nι κ : Type w\ninst✝³ : Fintype ι\nF : Type u_6\ninst✝² : Field F\ninst✝¹ : Algebra K S\ninst✝ : Algebra K F\nx : L\nhx : ¬IsIntegral K x\n⊢ ↑(Algebra.trace K { x_1 // x_1 ∈ K⟮x⟯ }) (gen K x) = 0\n[PROOFSTEP]\nrw [trace_eq_zero_of_not_exists_basis, LinearMap.zero_apply]\n[GOAL]\ncase h\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : CommRing S\ninst✝⁹ : CommRing T\ninst✝⁸ : Algebra R S\ninst✝⁷ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝⁶ : Field K\ninst✝⁵ : Field L\ninst✝⁴ : Algebra K L\nι κ : Type w\ninst✝³ : Fintype ι\nF : Type u_6\ninst✝² : Field F\ninst✝¹ : Algebra K S\ninst✝ : Algebra K F\nx : L\nhx : ¬IsIntegral K x\n⊢ ¬∃ s, Nonempty (Basis { x_1 // x_1 ∈ s } K { x_1 // x_1 ∈ K⟮x⟯ })\n[PROOFSTEP]\ncontrapose! hx\n[GOAL]\ncase h\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : CommRing S\ninst✝⁹ : CommRing T\ninst✝⁸ : Algebra R S\ninst✝⁷ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝⁶ : Field K\ninst✝⁵ : Field L\ninst✝⁴ : Algebra K L\nι κ : Type w\ninst✝³ : Fintype ι\nF : Type u_6\ninst✝² : Field F\ninst✝¹ : Algebra K S\ninst✝ : Algebra K F\nx : L\nhx : ∃ s, Nonempty (Basis { x_1 // x_1 ∈ s } K { x_1 // x_1 ∈ K⟮x⟯ })\n⊢ IsIntegral K x\n[PROOFSTEP]\nobtain ⟨s, ⟨b⟩⟩ := hx\n[GOAL]\ncase h.intro.intro\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : CommRing S\ninst✝⁹ : CommRing T\ninst✝⁸ : Algebra R S\ninst✝⁷ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝⁶ : Field K\ninst✝⁵ : Field L\ninst✝⁴ : Algebra K L\nι κ : Type w\ninst✝³ : Fintype ι\nF : Type u_6\ninst✝² : Field F\ninst✝¹ : Algebra K S\ninst✝ : Algebra K F\nx : L\ns : Finset { x_1 // x_1 ∈ K⟮x⟯ }\nb : Basis { x_1 // x_1 ∈ s } K { x_1 // x_1 ∈ K⟮x⟯ }\n⊢ IsIntegral K x\n[PROOFSTEP]\nrefine' isIntegral_of_mem_of_FG K⟮x⟯.toSubalgebra _ x _\n[GOAL]\ncase h.intro.intro.refine'_1\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : CommRing S\ninst✝⁹ : CommRing T\ninst✝⁸ : Algebra R S\ninst✝⁷ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝⁶ : Field K\ninst✝⁵ : Field L\ninst✝⁴ : Algebra K L\nι κ : Type w\ninst✝³ : Fintype ι\nF : Type u_6\ninst✝² : Field F\ninst✝¹ : Algebra K S\ninst✝ : Algebra K F\nx : L\ns : Finset { x_1 // x_1 ∈ K⟮x⟯ }\nb : Basis { x_1 // x_1 ∈ s } K { x_1 // x_1 ∈ K⟮x⟯ }\n⊢ Submodule.FG (↑Subalgebra.toSubmodule K⟮x⟯.toSubalgebra)\n[PROOFSTEP]\nexact (Submodule.fg_iff_finiteDimensional _).mpr (FiniteDimensional.of_fintype_basis b)\n[GOAL]\ncase h.intro.intro.refine'_2\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : CommRing S\ninst✝⁹ : CommRing T\ninst✝⁸ : Algebra R S\ninst✝⁷ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝⁶ : Field K\ninst✝⁵ : Field L\ninst✝⁴ : Algebra K L\nι κ : Type w\ninst✝³ : Fintype ι\nF : Type u_6\ninst✝² : Field F\ninst✝¹ : Algebra K S\ninst✝ : Algebra K F\nx : L\ns : Finset { x_1 // x_1 ∈ K⟮x⟯ }\nb : Basis { x_1 // x_1 ∈ s } K { x_1 // x_1 ∈ K⟮x⟯ }\n⊢ x ∈ K⟮x⟯.toSubalgebra\n[PROOFSTEP]\nexact subset_adjoin K _ (Set.mem_singleton x)\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : CommRing S\ninst✝⁹ : CommRing T\ninst✝⁸ : Algebra R S\ninst✝⁷ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝⁶ : Field K\ninst✝⁵ : Field L\ninst✝⁴ : Algebra K L\nι κ : Type w\ninst✝³ : Fintype ι\nF : Type u_6\ninst✝² : Field F\ninst✝¹ : Algebra K S\ninst✝ : Algebra K F\nx : L\nhf : Splits (algebraMap K F) (minpoly K x)\n⊢ ↑(algebraMap K F) (↑(Algebra.trace K { x_1 // x_1 ∈ K⟮x⟯ }) (gen K x)) =\n    Multiset.sum (roots (Polynomial.map (algebraMap K F) (minpoly K x)))\n[PROOFSTEP]\nhave injKxL := (algebraMap K⟮x⟯ L).injective\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : CommRing S\ninst✝⁹ : CommRing T\ninst✝⁸ : Algebra R S\ninst✝⁷ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝⁶ : Field K\ninst✝⁵ : Field L\ninst✝⁴ : Algebra K L\nι κ : Type w\ninst✝³ : Fintype ι\nF : Type u_6\ninst✝² : Field F\ninst✝¹ : Algebra K S\ninst✝ : Algebra K F\nx : L\nhf : Splits (algebraMap K F) (minpoly K x)\ninjKxL : Function.Injective ↑(algebraMap { x_1 // x_1 ∈ K⟮x⟯ } L)\n⊢ ↑(algebraMap K F) (↑(Algebra.trace K { x_1 // x_1 ∈ K⟮x⟯ }) (gen K x)) =\n    Multiset.sum (roots (Polynomial.map (algebraMap K F) (minpoly K x)))\n[PROOFSTEP]\nby_cases hx : IsIntegral K x\n[GOAL]\ncase pos\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : CommRing S\ninst✝⁹ : CommRing T\ninst✝⁸ : Algebra R S\ninst✝⁷ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝⁶ : Field K\ninst✝⁵ : Field L\ninst✝⁴ : Algebra K L\nι κ : Type w\ninst✝³ : Fintype ι\nF : Type u_6\ninst✝² : Field F\ninst✝¹ : Algebra K S\ninst✝ : Algebra K F\nx : L\nhf : Splits (algebraMap K F) (minpoly K x)\ninjKxL : Function.Injective ↑(algebraMap { x_1 // x_1 ∈ K⟮x⟯ } L)\nhx : IsIntegral K x\n⊢ ↑(algebraMap K F) (↑(Algebra.trace K { x_1 // x_1 ∈ K⟮x⟯ }) (gen K x)) =\n    Multiset.sum (roots (Polynomial.map (algebraMap K F) (minpoly K x)))\ncase neg\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : CommRing S\ninst✝⁹ : CommRing T\ninst✝⁸ : Algebra R S\ninst✝⁷ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝⁶ : Field K\ninst✝⁵ : Field L\ninst✝⁴ : Algebra K L\nι κ : Type w\ninst✝³ : Fintype ι\nF : Type u_6\ninst✝² : Field F\ninst✝¹ : Algebra K S\ninst✝ : Algebra K F\nx : L\nhf : Splits (algebraMap K F) (minpoly K x)\ninjKxL : Function.Injective ↑(algebraMap { x_1 // x_1 ∈ K⟮x⟯ } L)\nhx : ¬IsIntegral K x\n⊢ ↑(algebraMap K F) (↑(Algebra.trace K { x_1 // x_1 ∈ K⟮x⟯ }) (gen K x)) =\n    Multiset.sum (roots (Polynomial.map (algebraMap K F) (minpoly K x)))\n[PROOFSTEP]\nswap\n[GOAL]\ncase neg\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : CommRing S\ninst✝⁹ : CommRing T\ninst✝⁸ : Algebra R S\ninst✝⁷ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝⁶ : Field K\ninst✝⁵ : Field L\ninst✝⁴ : Algebra K L\nι κ : Type w\ninst✝³ : Fintype ι\nF : Type u_6\ninst✝² : Field F\ninst✝¹ : Algebra K S\ninst✝ : Algebra K F\nx : L\nhf : Splits (algebraMap K F) (minpoly K x)\ninjKxL : Function.Injective ↑(algebraMap { x_1 // x_1 ∈ K⟮x⟯ } L)\nhx : ¬IsIntegral K x\n⊢ ↑(algebraMap K F) (↑(Algebra.trace K { x_1 // x_1 ∈ K⟮x⟯ }) (gen K x)) =\n    Multiset.sum (roots (Polynomial.map (algebraMap K F) (minpoly K x)))\n[PROOFSTEP]\nsimp [minpoly.eq_zero hx, trace_gen_eq_zero hx]\n[GOAL]\ncase pos\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : CommRing S\ninst✝⁹ : CommRing T\ninst✝⁸ : Algebra R S\ninst✝⁷ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝⁶ : Field K\ninst✝⁵ : Field L\ninst✝⁴ : Algebra K L\nι κ : Type w\ninst✝³ : Fintype ι\nF : Type u_6\ninst✝² : Field F\ninst✝¹ : Algebra K S\ninst✝ : Algebra K F\nx : L\nhf : Splits (algebraMap K F) (minpoly K x)\ninjKxL : Function.Injective ↑(algebraMap { x_1 // x_1 ∈ K⟮x⟯ } L)\nhx : IsIntegral K x\n⊢ ↑(algebraMap K F) (↑(Algebra.trace K { x_1 // x_1 ∈ K⟮x⟯ }) (gen K x)) =\n    Multiset.sum (roots (Polynomial.map (algebraMap K F) (minpoly K x)))\n[PROOFSTEP]\nhave hx' : IsIntegral K (AdjoinSimple.gen K x) := by\n  rwa [← isIntegral_algebraMap_iff injKxL, AdjoinSimple.algebraMap_gen]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : CommRing S\ninst✝⁹ : CommRing T\ninst✝⁸ : Algebra R S\ninst✝⁷ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝⁶ : Field K\ninst✝⁵ : Field L\ninst✝⁴ : Algebra K L\nι κ : Type w\ninst✝³ : Fintype ι\nF : Type u_6\ninst✝² : Field F\ninst✝¹ : Algebra K S\ninst✝ : Algebra K F\nx : L\nhf : Splits (algebraMap K F) (minpoly K x)\ninjKxL : Function.Injective ↑(algebraMap { x_1 // x_1 ∈ K⟮x⟯ } L)\nhx : IsIntegral K x\n⊢ IsIntegral K (gen K x)\n[PROOFSTEP]\nrwa [← isIntegral_algebraMap_iff injKxL, AdjoinSimple.algebraMap_gen]\n[GOAL]\ncase pos\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : CommRing S\ninst✝⁹ : CommRing T\ninst✝⁸ : Algebra R S\ninst✝⁷ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝⁶ : Field K\ninst✝⁵ : Field L\ninst✝⁴ : Algebra K L\nι κ : Type w\ninst✝³ : Fintype ι\nF : Type u_6\ninst✝² : Field F\ninst✝¹ : Algebra K S\ninst✝ : Algebra K F\nx : L\nhf : Splits (algebraMap K F) (minpoly K x)\ninjKxL : Function.Injective ↑(algebraMap { x_1 // x_1 ∈ K⟮x⟯ } L)\nhx : IsIntegral K x\nhx' : IsIntegral K (gen K x)\n⊢ ↑(algebraMap K F) (↑(Algebra.trace K { x_1 // x_1 ∈ K⟮x⟯ }) (gen K x)) =\n    Multiset.sum (roots (Polynomial.map (algebraMap K F) (minpoly K x)))\n[PROOFSTEP]\nrw [← adjoin.powerBasis_gen hx, (adjoin.powerBasis hx).trace_gen_eq_sum_roots]\n[GOAL]\ncase pos\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : CommRing S\ninst✝⁹ : CommRing T\ninst✝⁸ : Algebra R S\ninst✝⁷ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝⁶ : Field K\ninst✝⁵ : Field L\ninst✝⁴ : Algebra K L\nι κ : Type w\ninst✝³ : Fintype ι\nF : Type u_6\ninst✝² : Field F\ninst✝¹ : Algebra K S\ninst✝ : Algebra K F\nx : L\nhf : Splits (algebraMap K F) (minpoly K x)\ninjKxL : Function.Injective ↑(algebraMap { x_1 // x_1 ∈ K⟮x⟯ } L)\nhx : IsIntegral K x\nhx' : IsIntegral K (gen K x)\n⊢ Multiset.sum (roots (Polynomial.map (algebraMap K F) (minpoly K (adjoin.powerBasis hx).gen))) =\n    Multiset.sum (roots (Polynomial.map (algebraMap K F) (minpoly K x)))\n[PROOFSTEP]\nrw [adjoin.powerBasis_gen hx, minpoly.eq_of_algebraMap_eq injKxL hx']\n[GOAL]\ncase pos\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : CommRing S\ninst✝⁹ : CommRing T\ninst✝⁸ : Algebra R S\ninst✝⁷ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝⁶ : Field K\ninst✝⁵ : Field L\ninst✝⁴ : Algebra K L\nι κ : Type w\ninst✝³ : Fintype ι\nF : Type u_6\ninst✝² : Field F\ninst✝¹ : Algebra K S\ninst✝ : Algebra K F\nx : L\nhf : Splits (algebraMap K F) (minpoly K x)\ninjKxL : Function.Injective ↑(algebraMap { x_1 // x_1 ∈ K⟮x⟯ } L)\nhx : IsIntegral K x\nhx' : IsIntegral K (gen K x)\n⊢ Splits (algebraMap K F) (minpoly K (adjoin.powerBasis hx).gen)\n[PROOFSTEP]\nrw [adjoin.powerBasis_gen hx, minpoly.eq_of_algebraMap_eq injKxL hx']\n[GOAL]\ncase pos\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : CommRing S\ninst✝⁹ : CommRing T\ninst✝⁸ : Algebra R S\ninst✝⁷ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝⁶ : Field K\ninst✝⁵ : Field L\ninst✝⁴ : Algebra K L\nι κ : Type w\ninst✝³ : Fintype ι\nF : Type u_6\ninst✝² : Field F\ninst✝¹ : Algebra K S\ninst✝ : Algebra K F\nx : L\nhf : Splits (algebraMap K F) (minpoly K x)\ninjKxL : Function.Injective ↑(algebraMap { x_1 // x_1 ∈ K⟮x⟯ } L)\nhx : IsIntegral K x\nhx' : IsIntegral K (gen K x)\n⊢ x = ↑(algebraMap { x_1 // x_1 ∈ K⟮x⟯ } L) (gen K x)\n[PROOFSTEP]\ntry simp only [AdjoinSimple.algebraMap_gen _ _]\n[GOAL]\ncase pos\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : CommRing S\ninst✝⁹ : CommRing T\ninst✝⁸ : Algebra R S\ninst✝⁷ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝⁶ : Field K\ninst✝⁵ : Field L\ninst✝⁴ : Algebra K L\nι κ : Type w\ninst✝³ : Fintype ι\nF : Type u_6\ninst✝² : Field F\ninst✝¹ : Algebra K S\ninst✝ : Algebra K F\nx : L\nhf : Splits (algebraMap K F) (minpoly K x)\ninjKxL : Function.Injective ↑(algebraMap { x_1 // x_1 ∈ K⟮x⟯ } L)\nhx : IsIntegral K x\nhx' : IsIntegral K (gen K x)\n⊢ x = ↑(algebraMap { x_1 // x_1 ∈ K⟮x⟯ } L) (gen K x)\n[PROOFSTEP]\nsimp only [AdjoinSimple.algebraMap_gen _ _]\n[GOAL]\ncase pos\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : CommRing S\ninst✝⁹ : CommRing T\ninst✝⁸ : Algebra R S\ninst✝⁷ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝⁶ : Field K\ninst✝⁵ : Field L\ninst✝⁴ : Algebra K L\nι κ : Type w\ninst✝³ : Fintype ι\nF : Type u_6\ninst✝² : Field F\ninst✝¹ : Algebra K S\ninst✝ : Algebra K F\nx : L\nhf : Splits (algebraMap K F) (minpoly K x)\ninjKxL : Function.Injective ↑(algebraMap { x_1 // x_1 ∈ K⟮x⟯ } L)\nhx : IsIntegral K x\nhx' : IsIntegral K (gen K x)\n⊢ Splits (algebraMap K F) (minpoly K ?m.547142)\n[PROOFSTEP]\ntry simp only [AdjoinSimple.algebraMap_gen _ _]\n[GOAL]\ncase pos\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : CommRing S\ninst✝⁹ : CommRing T\ninst✝⁸ : Algebra R S\ninst✝⁷ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝⁶ : Field K\ninst✝⁵ : Field L\ninst✝⁴ : Algebra K L\nι κ : Type w\ninst✝³ : Fintype ι\nF : Type u_6\ninst✝² : Field F\ninst✝¹ : Algebra K S\ninst✝ : Algebra K F\nx : L\nhf : Splits (algebraMap K F) (minpoly K x)\ninjKxL : Function.Injective ↑(algebraMap { x_1 // x_1 ∈ K⟮x⟯ } L)\nhx : IsIntegral K x\nhx' : IsIntegral K (gen K x)\n⊢ Splits (algebraMap K F) (minpoly K ?m.547142)\n[PROOFSTEP]\nsimp only [AdjoinSimple.algebraMap_gen _ _]\n[GOAL]\ncase pos\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : CommRing S\ninst✝⁹ : CommRing T\ninst✝⁸ : Algebra R S\ninst✝⁷ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝⁶ : Field K\ninst✝⁵ : Field L\ninst✝⁴ : Algebra K L\nι κ : Type w\ninst✝³ : Fintype ι\nF : Type u_6\ninst✝² : Field F\ninst✝¹ : Algebra K S\ninst✝ : Algebra K F\nx : L\nhf : Splits (algebraMap K F) (minpoly K x)\ninjKxL : Function.Injective ↑(algebraMap { x_1 // x_1 ∈ K⟮x⟯ } L)\nhx : IsIntegral K x\nhx' : IsIntegral K (gen K x)\n⊢ ?m.547142 = ↑(algebraMap { x_1 // x_1 ∈ K⟮x⟯ } L) (gen K x)\n[PROOFSTEP]\ntry simp only [AdjoinSimple.algebraMap_gen _ _]\n[GOAL]\ncase pos\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : CommRing S\ninst✝⁹ : CommRing T\ninst✝⁸ : Algebra R S\ninst✝⁷ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝⁶ : Field K\ninst✝⁵ : Field L\ninst✝⁴ : Algebra K L\nι κ : Type w\ninst✝³ : Fintype ι\nF : Type u_6\ninst✝² : Field F\ninst✝¹ : Algebra K S\ninst✝ : Algebra K F\nx : L\nhf : Splits (algebraMap K F) (minpoly K x)\ninjKxL : Function.Injective ↑(algebraMap { x_1 // x_1 ∈ K⟮x⟯ } L)\nhx : IsIntegral K x\nhx' : IsIntegral K (gen K x)\n⊢ ?m.547142 = ↑(algebraMap { x_1 // x_1 ∈ K⟮x⟯ } L) (gen K x)\n[PROOFSTEP]\nsimp only [AdjoinSimple.algebraMap_gen _ _]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : CommRing S\ninst✝⁹ : CommRing T\ninst✝⁸ : Algebra R S\ninst✝⁷ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝⁶ : Field K\ninst✝⁵ : Field L\ninst✝⁴ : Algebra K L\nι κ : Type w\ninst✝³ : Fintype ι\nF : Type u_6\ninst✝² : Field F\ninst✝¹ : Algebra K S\ninst✝ : Algebra K F\nx : L\nhf : Splits (algebraMap K F) (minpoly K x)\ninjKxL : Function.Injective ↑(algebraMap { x_1 // x_1 ∈ K⟮x⟯ } L)\nhx : IsIntegral K x\nhx' : IsIntegral K (gen K x)\n⊢ L\n[PROOFSTEP]\ntry simp only [AdjoinSimple.algebraMap_gen _ _]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : CommRing S\ninst✝⁹ : CommRing T\ninst✝⁸ : Algebra R S\ninst✝⁷ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝⁶ : Field K\ninst✝⁵ : Field L\ninst✝⁴ : Algebra K L\nι κ : Type w\ninst✝³ : Fintype ι\nF : Type u_6\ninst✝² : Field F\ninst✝¹ : Algebra K S\ninst✝ : Algebra K F\nx : L\nhf : Splits (algebraMap K F) (minpoly K x)\ninjKxL : Function.Injective ↑(algebraMap { x_1 // x_1 ∈ K⟮x⟯ } L)\nhx : IsIntegral K x\nhx' : IsIntegral K (gen K x)\n⊢ L\n[PROOFSTEP]\nsimp only [AdjoinSimple.algebraMap_gen _ _]\n[GOAL]\ncase pos\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : CommRing S\ninst✝⁹ : CommRing T\ninst✝⁸ : Algebra R S\ninst✝⁷ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝⁶ : Field K\ninst✝⁵ : Field L\ninst✝⁴ : Algebra K L\nι κ : Type w\ninst✝³ : Fintype ι\nF : Type u_6\ninst✝² : Field F\ninst✝¹ : Algebra K S\ninst✝ : Algebra K F\nx : L\nhf : Splits (algebraMap K F) (minpoly K x)\ninjKxL : Function.Injective ↑(algebraMap { x_1 // x_1 ∈ K⟮x⟯ } L)\nhx : IsIntegral K x\nhx' : IsIntegral K (gen K x)\n⊢ Splits (algebraMap K F) (minpoly K ?m.547142)\n[PROOFSTEP]\nexact hf\n[GOAL]\ncase pos\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : CommRing S\ninst✝⁹ : CommRing T\ninst✝⁸ : Algebra R S\ninst✝⁷ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝⁶ : Field K\ninst✝⁵ : Field L\ninst✝⁴ : Algebra K L\nι κ : Type w\ninst✝³ : Fintype ι\nF : Type u_6\ninst✝² : Field F\ninst✝¹ : Algebra K S\ninst✝ : Algebra K F\nx : L\nhf : Splits (algebraMap K F) (minpoly K x)\ninjKxL : Function.Injective ↑(algebraMap { x_1 // x_1 ∈ K⟮x⟯ } L)\nhx : IsIntegral K x\nhx' : IsIntegral K (gen K x)\n⊢ x = x\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹² : CommRing R\ninst✝¹¹ : CommRing S\ninst✝¹⁰ : CommRing T\ninst✝⁹ : Algebra R S\ninst✝⁸ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Algebra K L\nι κ : Type w\ninst✝⁴ : Fintype ι\nF : Type u_6\ninst✝³ : Field F\ninst✝² : Algebra K S\ninst✝¹ : Algebra K F\ninst✝ : FiniteDimensional K L\nx : L\n⊢ ↑(Algebra.trace K L) x =\n    finrank { x_1 // x_1 ∈ K⟮x⟯ } L • ↑(Algebra.trace K { x_1 // x_1 ∈ K⟮x⟯ }) (AdjoinSimple.gen K x)\n[PROOFSTEP]\nconv =>\n  lhs\n  rw [← IntermediateField.AdjoinSimple.algebraMap_gen K x]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹² : CommRing R\ninst✝¹¹ : CommRing S\ninst✝¹⁰ : CommRing T\ninst✝⁹ : Algebra R S\ninst✝⁸ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Algebra K L\nι κ : Type w\ninst✝⁴ : Fintype ι\nF : Type u_6\ninst✝³ : Field F\ninst✝² : Algebra K S\ninst✝¹ : Algebra K F\ninst✝ : FiniteDimensional K L\nx : L\n| ↑(Algebra.trace K L) x =\n    finrank { x_1 // x_1 ∈ K⟮x⟯ } L • ↑(Algebra.trace K { x_1 // x_1 ∈ K⟮x⟯ }) (AdjoinSimple.gen K x)\n[PROOFSTEP]\n  lhs\n  rw [← IntermediateField.AdjoinSimple.algebraMap_gen K x]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹² : CommRing R\ninst✝¹¹ : CommRing S\ninst✝¹⁰ : CommRing T\ninst✝⁹ : Algebra R S\ninst✝⁸ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Algebra K L\nι κ : Type w\ninst✝⁴ : Fintype ι\nF : Type u_6\ninst✝³ : Field F\ninst✝² : Algebra K S\ninst✝¹ : Algebra K F\ninst✝ : FiniteDimensional K L\nx : L\n| ↑(Algebra.trace K L) x =\n    finrank { x_1 // x_1 ∈ K⟮x⟯ } L • ↑(Algebra.trace K { x_1 // x_1 ∈ K⟮x⟯ }) (AdjoinSimple.gen K x)\n[PROOFSTEP]\n  lhs\n  rw [← IntermediateField.AdjoinSimple.algebraMap_gen K x]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹² : CommRing R\ninst✝¹¹ : CommRing S\ninst✝¹⁰ : CommRing T\ninst✝⁹ : Algebra R S\ninst✝⁸ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Algebra K L\nι κ : Type w\ninst✝⁴ : Fintype ι\nF : Type u_6\ninst✝³ : Field F\ninst✝² : Algebra K S\ninst✝¹ : Algebra K F\ninst✝ : FiniteDimensional K L\nx : L\n| ↑(Algebra.trace K L) x =\n    finrank { x_1 // x_1 ∈ K⟮x⟯ } L • ↑(Algebra.trace K { x_1 // x_1 ∈ K⟮x⟯ }) (AdjoinSimple.gen K x)\n[PROOFSTEP]\nlhs\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹² : CommRing R\ninst✝¹¹ : CommRing S\ninst✝¹⁰ : CommRing T\ninst✝⁹ : Algebra R S\ninst✝⁸ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Algebra K L\nι κ : Type w\ninst✝⁴ : Fintype ι\nF : Type u_6\ninst✝³ : Field F\ninst✝² : Algebra K S\ninst✝¹ : Algebra K F\ninst✝ : FiniteDimensional K L\nx : L\n| ↑(Algebra.trace K L) x\n[PROOFSTEP]\nrw [← IntermediateField.AdjoinSimple.algebraMap_gen K x]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹² : CommRing R\ninst✝¹¹ : CommRing S\ninst✝¹⁰ : CommRing T\ninst✝⁹ : Algebra R S\ninst✝⁸ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Algebra K L\nι κ : Type w\ninst✝⁴ : Fintype ι\nF : Type u_6\ninst✝³ : Field F\ninst✝² : Algebra K S\ninst✝¹ : Algebra K F\ninst✝ : FiniteDimensional K L\nx : L\n⊢ ↑(Algebra.trace K L) (↑(algebraMap { x_1 // x_1 ∈ K⟮x⟯ } L) (AdjoinSimple.gen K x)) =\n    finrank { x_1 // x_1 ∈ K⟮x⟯ } L • ↑(Algebra.trace K { x_1 // x_1 ∈ K⟮x⟯ }) (AdjoinSimple.gen K x)\n[PROOFSTEP]\nrw [← @trace_trace _ _ K K⟮x⟯ _ _ _ _ _ _ _ _ _, trace_algebraMap, LinearMap.map_smul_of_tower]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹² : CommRing R\ninst✝¹¹ : CommRing S\ninst✝¹⁰ : CommRing T\ninst✝⁹ : Algebra R S\ninst✝⁸ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Algebra K L\nι κ : Type w\ninst✝⁴ : Fintype ι\nF : Type u_6\ninst✝³ : Field F\ninst✝² : Algebra K S\ninst✝¹ : Algebra K F\ninst✝ : FiniteDimensional K L\nx : L\nhF : Splits (algebraMap K F) (minpoly K x)\n⊢ ↑(algebraMap K F) (↑(Algebra.trace K L) x) =\n    finrank { x_1 // x_1 ∈ K⟮x⟯ } L •\n      Multiset.sum (roots (Polynomial.map (algebraMap K ((fun x => F) (↑(Algebra.trace K L) x))) (minpoly K x)))\n[PROOFSTEP]\nrw [trace_eq_trace_adjoin K x, Algebra.smul_def, RingHom.map_mul, ← Algebra.smul_def,\n  IntermediateField.AdjoinSimple.trace_gen_eq_sum_roots _ hF]\n  -- Porting note: last `simp` was `IsScalarTower.algebraMap_smul` inside the `rw`.\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹² : CommRing R\ninst✝¹¹ : CommRing S\ninst✝¹⁰ : CommRing T\ninst✝⁹ : Algebra R S\ninst✝⁸ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Algebra K L\nι κ : Type w\ninst✝⁴ : Fintype ι\nF : Type u_6\ninst✝³ : Field F\ninst✝² : Algebra K S\ninst✝¹ : Algebra K F\ninst✝ : FiniteDimensional K L\nx : L\nhF : Splits (algebraMap K F) (minpoly K x)\n⊢ ↑(algebraMap K F) (↑(algebraMap ℕ ((fun x => K) (AdjoinSimple.gen K x))) (finrank { x_1 // x_1 ∈ K⟮x⟯ } L)) *\n      Multiset.sum (roots (Polynomial.map (algebraMap K F) (minpoly K x))) =\n    finrank { x_1 // x_1 ∈ K⟮x⟯ } L •\n      Multiset.sum\n        (roots\n          (Polynomial.map\n            (algebraMap K\n              ((fun x => F)\n                (finrank { x_1 // x_1 ∈ K⟮x⟯ } L • ↑(Algebra.trace K { x_1 // x_1 ∈ K⟮x⟯ }) (AdjoinSimple.gen K x))))\n            (minpoly K x)))\n[PROOFSTEP]\nsimp only [eq_natCast, map_natCast, nsmul_eq_mul]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁴ : CommRing R\ninst✝¹³ : CommRing S\ninst✝¹² : CommRing T\ninst✝¹¹ : Algebra R S\ninst✝¹⁰ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : Algebra K L\nι κ : Type w\ninst✝⁶ : Fintype ι\nF : Type u_6\ninst✝⁵ : Field F\ninst✝⁴ : Algebra R L\ninst✝³ : Algebra L F\ninst✝² : Algebra R F\ninst✝¹ : IsScalarTower R L F\ninst✝ : FiniteDimensional L F\nx : F\nhx : IsIntegral R x\n⊢ IsIntegral R (↑(trace L F) x)\n[PROOFSTEP]\nhave hx' : IsIntegral L x := isIntegral_of_isScalarTower hx\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁴ : CommRing R\ninst✝¹³ : CommRing S\ninst✝¹² : CommRing T\ninst✝¹¹ : Algebra R S\ninst✝¹⁰ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : Algebra K L\nι κ : Type w\ninst✝⁶ : Fintype ι\nF : Type u_6\ninst✝⁵ : Field F\ninst✝⁴ : Algebra R L\ninst✝³ : Algebra L F\ninst✝² : Algebra R F\ninst✝¹ : IsScalarTower R L F\ninst✝ : FiniteDimensional L F\nx : F\nhx : IsIntegral R x\nhx' : IsIntegral L x\n⊢ IsIntegral R (↑(trace L F) x)\n[PROOFSTEP]\nrw [← isIntegral_algebraMap_iff (algebraMap L (AlgebraicClosure F)).injective, trace_eq_sum_roots]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁴ : CommRing R\ninst✝¹³ : CommRing S\ninst✝¹² : CommRing T\ninst✝¹¹ : Algebra R S\ninst✝¹⁰ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : Algebra K L\nι κ : Type w\ninst✝⁶ : Fintype ι\nF : Type u_6\ninst✝⁵ : Field F\ninst✝⁴ : Algebra R L\ninst✝³ : Algebra L F\ninst✝² : Algebra R F\ninst✝¹ : IsScalarTower R L F\ninst✝ : FiniteDimensional L F\nx : F\nhx : IsIntegral R x\nhx' : IsIntegral L x\n⊢ IsIntegral R\n    (finrank { x_1 // x_1 ∈ L⟮x⟯ } F •\n      Multiset.sum\n        (roots (Polynomial.map (algebraMap L ((fun x => AlgebraicClosure F) (↑(trace L F) x))) (minpoly L x))))\n[PROOFSTEP]\nrefine' (IsIntegral.multiset_sum _).nsmul _\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁴ : CommRing R\ninst✝¹³ : CommRing S\ninst✝¹² : CommRing T\ninst✝¹¹ : Algebra R S\ninst✝¹⁰ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : Algebra K L\nι κ : Type w\ninst✝⁶ : Fintype ι\nF : Type u_6\ninst✝⁵ : Field F\ninst✝⁴ : Algebra R L\ninst✝³ : Algebra L F\ninst✝² : Algebra R F\ninst✝¹ : IsScalarTower R L F\ninst✝ : FiniteDimensional L F\nx : F\nhx : IsIntegral R x\nhx' : IsIntegral L x\n⊢ ∀ (x_1 : (fun x => AlgebraicClosure F) (↑(trace L F) x)),\n    x_1 ∈ roots (Polynomial.map (algebraMap L ((fun x => AlgebraicClosure F) (↑(trace L F) x))) (minpoly L x)) →\n      IsIntegral R x_1\n[PROOFSTEP]\nintro y hy\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁴ : CommRing R\ninst✝¹³ : CommRing S\ninst✝¹² : CommRing T\ninst✝¹¹ : Algebra R S\ninst✝¹⁰ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : Algebra K L\nι κ : Type w\ninst✝⁶ : Fintype ι\nF : Type u_6\ninst✝⁵ : Field F\ninst✝⁴ : Algebra R L\ninst✝³ : Algebra L F\ninst✝² : Algebra R F\ninst✝¹ : IsScalarTower R L F\ninst✝ : FiniteDimensional L F\nx : F\nhx : IsIntegral R x\nhx' : IsIntegral L x\ny : (fun x => AlgebraicClosure F) (↑(trace L F) x)\nhy : y ∈ roots (Polynomial.map (algebraMap L ((fun x => AlgebraicClosure F) (↑(trace L F) x))) (minpoly L x))\n⊢ IsIntegral R y\n[PROOFSTEP]\nrw [mem_roots_map (minpoly.ne_zero hx')] at hy \n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁴ : CommRing R\ninst✝¹³ : CommRing S\ninst✝¹² : CommRing T\ninst✝¹¹ : Algebra R S\ninst✝¹⁰ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : Algebra K L\nι κ : Type w\ninst✝⁶ : Fintype ι\nF : Type u_6\ninst✝⁵ : Field F\ninst✝⁴ : Algebra R L\ninst✝³ : Algebra L F\ninst✝² : Algebra R F\ninst✝¹ : IsScalarTower R L F\ninst✝ : FiniteDimensional L F\nx : F\nhx : IsIntegral R x\nhx' : IsIntegral L x\ny : (fun x => AlgebraicClosure F) (↑(trace L F) x)\nhy : eval₂ (algebraMap L ((fun x => AlgebraicClosure F) (↑(trace L F) x))) y (minpoly L x) = 0\n⊢ IsIntegral R y\n[PROOFSTEP]\nuse minpoly R x, minpoly.monic hx\n[GOAL]\ncase right\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁴ : CommRing R\ninst✝¹³ : CommRing S\ninst✝¹² : CommRing T\ninst✝¹¹ : Algebra R S\ninst✝¹⁰ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : Algebra K L\nι κ : Type w\ninst✝⁶ : Fintype ι\nF : Type u_6\ninst✝⁵ : Field F\ninst✝⁴ : Algebra R L\ninst✝³ : Algebra L F\ninst✝² : Algebra R F\ninst✝¹ : IsScalarTower R L F\ninst✝ : FiniteDimensional L F\nx : F\nhx : IsIntegral R x\nhx' : IsIntegral L x\ny : (fun x => AlgebraicClosure F) (↑(trace L F) x)\nhy : eval₂ (algebraMap L ((fun x => AlgebraicClosure F) (↑(trace L F) x))) y (minpoly L x) = 0\n⊢ eval₂ (algebraMap R ((fun x => AlgebraicClosure F) (↑(trace L F) x))) y (minpoly R x) = 0\n[PROOFSTEP]\nrw [← aeval_def] at hy ⊢\n[GOAL]\ncase right\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁴ : CommRing R\ninst✝¹³ : CommRing S\ninst✝¹² : CommRing T\ninst✝¹¹ : Algebra R S\ninst✝¹⁰ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : Algebra K L\nι κ : Type w\ninst✝⁶ : Fintype ι\nF : Type u_6\ninst✝⁵ : Field F\ninst✝⁴ : Algebra R L\ninst✝³ : Algebra L F\ninst✝² : Algebra R F\ninst✝¹ : IsScalarTower R L F\ninst✝ : FiniteDimensional L F\nx : F\nhx : IsIntegral R x\nhx' : IsIntegral L x\ny : (fun x => AlgebraicClosure F) (↑(trace L F) x)\nhy : ↑(aeval y) (minpoly L x) = 0\n⊢ ↑(aeval y) (minpoly R x) = 0\n[PROOFSTEP]\nexact minpoly.aeval_of_isScalarTower R x y hy\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁴ : CommRing R\ninst✝¹³ : CommRing S\ninst✝¹² : CommRing T\ninst✝¹¹ : Algebra R S\ninst✝¹⁰ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : Algebra K L\nι κ : Type w\ninst✝⁶ : Fintype ι\nF : Type u_6\ninst✝⁵ : Field F\ninst✝⁴ : Algebra R L\ninst✝³ : Algebra L F\ninst✝² : Algebra R F\ninst✝¹ : IsScalarTower R L F\ninst✝ : FiniteDimensional L F\nx : F\nhx : IsIntegral R x\nhx' : IsIntegral L x\n⊢ Splits (algebraMap L (AlgebraicClosure F)) (minpoly L x)\n[PROOFSTEP]\napply IsAlgClosed.splits_codomain\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁷ : CommRing R\ninst✝¹⁶ : CommRing S\ninst✝¹⁵ : CommRing T\ninst✝¹⁴ : Algebra R S\ninst✝¹³ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹² : Field K\ninst✝¹¹ : Field L\ninst✝¹⁰ : Algebra K L\nι κ : Type w\ninst✝⁹ : Fintype ι\nF : Type u_6\ninst✝⁸ : Field F\ninst✝⁷ : Algebra R L\ninst✝⁶ : Algebra L F\ninst✝⁵ : Algebra R F\ninst✝⁴ : IsScalarTower R L F\ninst✝³ : Algebra K F\ninst✝² : IsScalarTower K L F\nE : Type u_7\ninst✝¹ : Field E\ninst✝ : Algebra K E\npb : PowerBasis K L\nhE : Splits (algebraMap K E) (minpoly K pb.gen)\nhfx : Separable (minpoly K pb.gen)\n⊢ ↑(algebraMap K E) (↑(Algebra.trace K L) pb.gen) = ∑ σ : L →ₐ[K] E, ↑σ pb.gen\n[PROOFSTEP]\nletI := Classical.decEq E\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁷ : CommRing R\ninst✝¹⁶ : CommRing S\ninst✝¹⁵ : CommRing T\ninst✝¹⁴ : Algebra R S\ninst✝¹³ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹² : Field K\ninst✝¹¹ : Field L\ninst✝¹⁰ : Algebra K L\nι κ : Type w\ninst✝⁹ : Fintype ι\nF : Type u_6\ninst✝⁸ : Field F\ninst✝⁷ : Algebra R L\ninst✝⁶ : Algebra L F\ninst✝⁵ : Algebra R F\ninst✝⁴ : IsScalarTower R L F\ninst✝³ : Algebra K F\ninst✝² : IsScalarTower K L F\nE : Type u_7\ninst✝¹ : Field E\ninst✝ : Algebra K E\npb : PowerBasis K L\nhE : Splits (algebraMap K E) (minpoly K pb.gen)\nhfx : Separable (minpoly K pb.gen)\nthis : DecidableEq E := Classical.decEq E\n⊢ ↑(algebraMap K E) (↑(Algebra.trace K L) pb.gen) = ∑ σ : L →ₐ[K] E, ↑σ pb.gen\n[PROOFSTEP]\nletI : Fintype (L →ₐ[K] E) := (PowerBasis.AlgHom.fintype pb)\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁷ : CommRing R\ninst✝¹⁶ : CommRing S\ninst✝¹⁵ : CommRing T\ninst✝¹⁴ : Algebra R S\ninst✝¹³ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹² : Field K\ninst✝¹¹ : Field L\ninst✝¹⁰ : Algebra K L\nι κ : Type w\ninst✝⁹ : Fintype ι\nF : Type u_6\ninst✝⁸ : Field F\ninst✝⁷ : Algebra R L\ninst✝⁶ : Algebra L F\ninst✝⁵ : Algebra R F\ninst✝⁴ : IsScalarTower R L F\ninst✝³ : Algebra K F\ninst✝² : IsScalarTower K L F\nE : Type u_7\ninst✝¹ : Field E\ninst✝ : Algebra K E\npb : PowerBasis K L\nhE : Splits (algebraMap K E) (minpoly K pb.gen)\nhfx : Separable (minpoly K pb.gen)\nthis✝ : DecidableEq E := Classical.decEq E\nthis : Fintype (L →ₐ[K] E) := PowerBasis.AlgHom.fintype pb\n⊢ ↑(algebraMap K E) (↑(Algebra.trace K L) pb.gen) = ∑ σ : L →ₐ[K] E, ↑σ pb.gen\n[PROOFSTEP]\nrw [pb.trace_gen_eq_sum_roots hE, Fintype.sum_equiv pb.liftEquiv', Finset.sum_mem_multiset, Finset.sum_eq_multiset_sum,\n  Multiset.toFinset_val, Multiset.dedup_eq_self.mpr _, Multiset.map_id]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁷ : CommRing R\ninst✝¹⁶ : CommRing S\ninst✝¹⁵ : CommRing T\ninst✝¹⁴ : Algebra R S\ninst✝¹³ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹² : Field K\ninst✝¹¹ : Field L\ninst✝¹⁰ : Algebra K L\nι κ : Type w\ninst✝⁹ : Fintype ι\nF : Type u_6\ninst✝⁸ : Field F\ninst✝⁷ : Algebra R L\ninst✝⁶ : Algebra L F\ninst✝⁵ : Algebra R F\ninst✝⁴ : IsScalarTower R L F\ninst✝³ : Algebra K F\ninst✝² : IsScalarTower K L F\nE : Type u_7\ninst✝¹ : Field E\ninst✝ : Algebra K E\npb : PowerBasis K L\nhE : Splits (algebraMap K E) (minpoly K pb.gen)\nhfx : Separable (minpoly K pb.gen)\nthis✝ : DecidableEq E := Classical.decEq E\nthis : Fintype (L →ₐ[K] E) := PowerBasis.AlgHom.fintype pb\n⊢ Multiset.Nodup (roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen)))\n[PROOFSTEP]\nexact\n  nodup_roots\n    ((separable_map _).mpr hfx)\n      -- Porting note: the following goal does not exist in mathlib3.\n[GOAL]\ncase f\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁷ : CommRing R\ninst✝¹⁶ : CommRing S\ninst✝¹⁵ : CommRing T\ninst✝¹⁴ : Algebra R S\ninst✝¹³ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹² : Field K\ninst✝¹¹ : Field L\ninst✝¹⁰ : Algebra K L\nι κ : Type w\ninst✝⁹ : Fintype ι\nF : Type u_6\ninst✝⁸ : Field F\ninst✝⁷ : Algebra R L\ninst✝⁶ : Algebra L F\ninst✝⁵ : Algebra R F\ninst✝⁴ : IsScalarTower R L F\ninst✝³ : Algebra K F\ninst✝² : IsScalarTower K L F\nE : Type u_7\ninst✝¹ : Field E\ninst✝ : Algebra K E\npb : PowerBasis K L\nhE : Splits (algebraMap K E) (minpoly K pb.gen)\nhfx : Separable (minpoly K pb.gen)\nthis✝ : DecidableEq E := Classical.decEq E\nthis : Fintype (L →ₐ[K] E) := PowerBasis.AlgHom.fintype pb\n⊢ { x // x ∈ roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen)) } → (fun x => E) pb.gen\n[PROOFSTEP]\nexact (fun x => x.1)\n[GOAL]\ncase hfg\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁷ : CommRing R\ninst✝¹⁶ : CommRing S\ninst✝¹⁵ : CommRing T\ninst✝¹⁴ : Algebra R S\ninst✝¹³ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹² : Field K\ninst✝¹¹ : Field L\ninst✝¹⁰ : Algebra K L\nι κ : Type w\ninst✝⁹ : Fintype ι\nF : Type u_6\ninst✝⁸ : Field F\ninst✝⁷ : Algebra R L\ninst✝⁶ : Algebra L F\ninst✝⁵ : Algebra R F\ninst✝⁴ : IsScalarTower R L F\ninst✝³ : Algebra K F\ninst✝² : IsScalarTower K L F\nE : Type u_7\ninst✝¹ : Field E\ninst✝ : Algebra K E\npb : PowerBasis K L\nhE : Splits (algebraMap K E) (minpoly K pb.gen)\nhfx : Separable (minpoly K pb.gen)\nthis✝ : DecidableEq E := Classical.decEq E\nthis : Fintype (L →ₐ[K] E) := PowerBasis.AlgHom.fintype pb\n⊢ ∀ (x : { x // x ∈ roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen)) }), ↑x = _root_.id ↑x\n[PROOFSTEP]\nintro x\n[GOAL]\ncase hfg\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁷ : CommRing R\ninst✝¹⁶ : CommRing S\ninst✝¹⁵ : CommRing T\ninst✝¹⁴ : Algebra R S\ninst✝¹³ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹² : Field K\ninst✝¹¹ : Field L\ninst✝¹⁰ : Algebra K L\nι κ : Type w\ninst✝⁹ : Fintype ι\nF : Type u_6\ninst✝⁸ : Field F\ninst✝⁷ : Algebra R L\ninst✝⁶ : Algebra L F\ninst✝⁵ : Algebra R F\ninst✝⁴ : IsScalarTower R L F\ninst✝³ : Algebra K F\ninst✝² : IsScalarTower K L F\nE : Type u_7\ninst✝¹ : Field E\ninst✝ : Algebra K E\npb : PowerBasis K L\nhE : Splits (algebraMap K E) (minpoly K pb.gen)\nhfx : Separable (minpoly K pb.gen)\nthis✝ : DecidableEq E := Classical.decEq E\nthis : Fintype (L →ₐ[K] E) := PowerBasis.AlgHom.fintype pb\nx : { x // x ∈ roots (Polynomial.map (algebraMap K E) (minpoly K pb.gen)) }\n⊢ ↑x = _root_.id ↑x\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁷ : CommRing R\ninst✝¹⁶ : CommRing S\ninst✝¹⁵ : CommRing T\ninst✝¹⁴ : Algebra R S\ninst✝¹³ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹² : Field K\ninst✝¹¹ : Field L\ninst✝¹⁰ : Algebra K L\nι κ : Type w\ninst✝⁹ : Fintype ι\nF : Type u_6\ninst✝⁸ : Field F\ninst✝⁷ : Algebra R L\ninst✝⁶ : Algebra L F\ninst✝⁵ : Algebra R F\ninst✝⁴ : IsScalarTower R L F\ninst✝³ : Algebra K F\ninst✝² : IsScalarTower K L F\nE : Type u_7\ninst✝¹ : Field E\ninst✝ : Algebra K E\npb : PowerBasis K L\nhE : Splits (algebraMap K E) (minpoly K pb.gen)\nhfx : Separable (minpoly K pb.gen)\nthis✝ : DecidableEq E := Classical.decEq E\nthis : Fintype (L →ₐ[K] E) := PowerBasis.AlgHom.fintype pb\n⊢ ∀ (x : L →ₐ[K] E), ↑x pb.gen = ↑(↑(PowerBasis.liftEquiv' pb) x)\n[PROOFSTEP]\nintro σ\n[GOAL]\ncase h\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁷ : CommRing R\ninst✝¹⁶ : CommRing S\ninst✝¹⁵ : CommRing T\ninst✝¹⁴ : Algebra R S\ninst✝¹³ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹² : Field K\ninst✝¹¹ : Field L\ninst✝¹⁰ : Algebra K L\nι κ : Type w\ninst✝⁹ : Fintype ι\nF : Type u_6\ninst✝⁸ : Field F\ninst✝⁷ : Algebra R L\ninst✝⁶ : Algebra L F\ninst✝⁵ : Algebra R F\ninst✝⁴ : IsScalarTower R L F\ninst✝³ : Algebra K F\ninst✝² : IsScalarTower K L F\nE : Type u_7\ninst✝¹ : Field E\ninst✝ : Algebra K E\npb : PowerBasis K L\nhE : Splits (algebraMap K E) (minpoly K pb.gen)\nhfx : Separable (minpoly K pb.gen)\nthis✝ : DecidableEq E := Classical.decEq E\nthis : Fintype (L →ₐ[K] E) := PowerBasis.AlgHom.fintype pb\nσ : L →ₐ[K] E\n⊢ ↑σ pb.gen = ↑(↑(PowerBasis.liftEquiv' pb) σ)\n[PROOFSTEP]\nrw [PowerBasis.liftEquiv'_apply_coe]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝²⁰ : CommRing R\ninst✝¹⁹ : CommRing S\ninst✝¹⁸ : CommRing T\ninst✝¹⁷ : Algebra R S\ninst✝¹⁶ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹⁵ : Field K\ninst✝¹⁴ : Field L\ninst✝¹³ : Algebra K L\nι κ : Type w\ninst✝¹² : Fintype ι\nF : Type u_6\ninst✝¹¹ : Field F\ninst✝¹⁰ : Algebra R L\ninst✝⁹ : Algebra L F\ninst✝⁸ : Algebra R F\ninst✝⁷ : IsScalarTower R L F\ninst✝⁶ : Algebra K F\ninst✝⁵ : IsScalarTower K L F\nE : Type u_7\ninst✝⁴ : Field E\ninst✝³ : Algebra K E\ninst✝² : IsAlgClosed E\ninst✝¹ : FiniteDimensional K F\ninst✝ : IsSeparable K F\npb : PowerBasis K L\n⊢ ∑ σ : F →ₐ[K] E, ↑σ (↑(algebraMap L F) pb.gen) = finrank L F • ∑ σ : L →ₐ[K] E, ↑σ pb.gen\n[PROOFSTEP]\nhaveI : FiniteDimensional L F := FiniteDimensional.right K L F\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝²⁰ : CommRing R\ninst✝¹⁹ : CommRing S\ninst✝¹⁸ : CommRing T\ninst✝¹⁷ : Algebra R S\ninst✝¹⁶ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹⁵ : Field K\ninst✝¹⁴ : Field L\ninst✝¹³ : Algebra K L\nι κ : Type w\ninst✝¹² : Fintype ι\nF : Type u_6\ninst✝¹¹ : Field F\ninst✝¹⁰ : Algebra R L\ninst✝⁹ : Algebra L F\ninst✝⁸ : Algebra R F\ninst✝⁷ : IsScalarTower R L F\ninst✝⁶ : Algebra K F\ninst✝⁵ : IsScalarTower K L F\nE : Type u_7\ninst✝⁴ : Field E\ninst✝³ : Algebra K E\ninst✝² : IsAlgClosed E\ninst✝¹ : FiniteDimensional K F\ninst✝ : IsSeparable K F\npb : PowerBasis K L\nthis : FiniteDimensional L F\n⊢ ∑ σ : F →ₐ[K] E, ↑σ (↑(algebraMap L F) pb.gen) = finrank L F • ∑ σ : L →ₐ[K] E, ↑σ pb.gen\n[PROOFSTEP]\nhaveI : IsSeparable L F := isSeparable_tower_top_of_isSeparable K L F\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝²⁰ : CommRing R\ninst✝¹⁹ : CommRing S\ninst✝¹⁸ : CommRing T\ninst✝¹⁷ : Algebra R S\ninst✝¹⁶ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹⁵ : Field K\ninst✝¹⁴ : Field L\ninst✝¹³ : Algebra K L\nι κ : Type w\ninst✝¹² : Fintype ι\nF : Type u_6\ninst✝¹¹ : Field F\ninst✝¹⁰ : Algebra R L\ninst✝⁹ : Algebra L F\ninst✝⁸ : Algebra R F\ninst✝⁷ : IsScalarTower R L F\ninst✝⁶ : Algebra K F\ninst✝⁵ : IsScalarTower K L F\nE : Type u_7\ninst✝⁴ : Field E\ninst✝³ : Algebra K E\ninst✝² : IsAlgClosed E\ninst✝¹ : FiniteDimensional K F\ninst✝ : IsSeparable K F\npb : PowerBasis K L\nthis✝ : FiniteDimensional L F\nthis : IsSeparable L F\n⊢ ∑ σ : F →ₐ[K] E, ↑σ (↑(algebraMap L F) pb.gen) = finrank L F • ∑ σ : L →ₐ[K] E, ↑σ pb.gen\n[PROOFSTEP]\nletI : Fintype (L →ₐ[K] E) := PowerBasis.AlgHom.fintype pb\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝²⁰ : CommRing R\ninst✝¹⁹ : CommRing S\ninst✝¹⁸ : CommRing T\ninst✝¹⁷ : Algebra R S\ninst✝¹⁶ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹⁵ : Field K\ninst✝¹⁴ : Field L\ninst✝¹³ : Algebra K L\nι κ : Type w\ninst✝¹² : Fintype ι\nF : Type u_6\ninst✝¹¹ : Field F\ninst✝¹⁰ : Algebra R L\ninst✝⁹ : Algebra L F\ninst✝⁸ : Algebra R F\ninst✝⁷ : IsScalarTower R L F\ninst✝⁶ : Algebra K F\ninst✝⁵ : IsScalarTower K L F\nE : Type u_7\ninst✝⁴ : Field E\ninst✝³ : Algebra K E\ninst✝² : IsAlgClosed E\ninst✝¹ : FiniteDimensional K F\ninst✝ : IsSeparable K F\npb : PowerBasis K L\nthis✝¹ : FiniteDimensional L F\nthis✝ : IsSeparable L F\nthis : Fintype (L →ₐ[K] E) := PowerBasis.AlgHom.fintype pb\n⊢ ∑ σ : F →ₐ[K] E, ↑σ (↑(algebraMap L F) pb.gen) = finrank L F • ∑ σ : L →ₐ[K] E, ↑σ pb.gen\n[PROOFSTEP]\nletI : ∀ f : L →ₐ[K] E, Fintype (@AlgHom L F E _ _ _ _ f.toRingHom.toAlgebra) := ?_\n[GOAL]\ncase refine_2\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝²⁰ : CommRing R\ninst✝¹⁹ : CommRing S\ninst✝¹⁸ : CommRing T\ninst✝¹⁷ : Algebra R S\ninst✝¹⁶ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹⁵ : Field K\ninst✝¹⁴ : Field L\ninst✝¹³ : Algebra K L\nι κ : Type w\ninst✝¹² : Fintype ι\nF : Type u_6\ninst✝¹¹ : Field F\ninst✝¹⁰ : Algebra R L\ninst✝⁹ : Algebra L F\ninst✝⁸ : Algebra R F\ninst✝⁷ : IsScalarTower R L F\ninst✝⁶ : Algebra K F\ninst✝⁵ : IsScalarTower K L F\nE : Type u_7\ninst✝⁴ : Field E\ninst✝³ : Algebra K E\ninst✝² : IsAlgClosed E\ninst✝¹ : FiniteDimensional K F\ninst✝ : IsSeparable K F\npb : PowerBasis K L\nthis✝² : FiniteDimensional L F\nthis✝¹ : IsSeparable L F\nthis✝ : Fintype (L →ₐ[K] E) := PowerBasis.AlgHom.fintype pb\nthis : (f : L →ₐ[K] E) → Fintype (F →ₐ[L] E) := ?refine_1\n⊢ ∑ σ : F →ₐ[K] E, ↑σ (↑(algebraMap L F) pb.gen) = finrank L F • ∑ σ : L →ₐ[K] E, ↑σ pb.gen\ncase refine_1\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝²⁰ : CommRing R\ninst✝¹⁹ : CommRing S\ninst✝¹⁸ : CommRing T\ninst✝¹⁷ : Algebra R S\ninst✝¹⁶ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹⁵ : Field K\ninst✝¹⁴ : Field L\ninst✝¹³ : Algebra K L\nι κ : Type w\ninst✝¹² : Fintype ι\nF : Type u_6\ninst✝¹¹ : Field F\ninst✝¹⁰ : Algebra R L\ninst✝⁹ : Algebra L F\ninst✝⁸ : Algebra R F\ninst✝⁷ : IsScalarTower R L F\ninst✝⁶ : Algebra K F\ninst✝⁵ : IsScalarTower K L F\nE : Type u_7\ninst✝⁴ : Field E\ninst✝³ : Algebra K E\ninst✝² : IsAlgClosed E\ninst✝¹ : FiniteDimensional K F\ninst✝ : IsSeparable K F\npb : PowerBasis K L\nthis✝¹ : FiniteDimensional L F\nthis✝ : IsSeparable L F\nthis : Fintype (L →ₐ[K] E) := PowerBasis.AlgHom.fintype pb\n⊢ (f : L →ₐ[K] E) → Fintype (F →ₐ[L] E)\n[PROOFSTEP]\nrw [Fintype.sum_equiv algHomEquivSigma (fun σ : F →ₐ[K] E => _) fun σ => σ.1 pb.gen, ← Finset.univ_sigma_univ,\n  Finset.sum_sigma, ← Finset.sum_nsmul]\n[GOAL]\ncase refine_2\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝²⁰ : CommRing R\ninst✝¹⁹ : CommRing S\ninst✝¹⁸ : CommRing T\ninst✝¹⁷ : Algebra R S\ninst✝¹⁶ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹⁵ : Field K\ninst✝¹⁴ : Field L\ninst✝¹³ : Algebra K L\nι κ : Type w\ninst✝¹² : Fintype ι\nF : Type u_6\ninst✝¹¹ : Field F\ninst✝¹⁰ : Algebra R L\ninst✝⁹ : Algebra L F\ninst✝⁸ : Algebra R F\ninst✝⁷ : IsScalarTower R L F\ninst✝⁶ : Algebra K F\ninst✝⁵ : IsScalarTower K L F\nE : Type u_7\ninst✝⁴ : Field E\ninst✝³ : Algebra K E\ninst✝² : IsAlgClosed E\ninst✝¹ : FiniteDimensional K F\ninst✝ : IsSeparable K F\npb : PowerBasis K L\nthis✝² : FiniteDimensional L F\nthis✝¹ : IsSeparable L F\nthis✝ : Fintype (L →ₐ[K] E) := PowerBasis.AlgHom.fintype pb\nthis : (f : L →ₐ[K] E) → Fintype (F →ₐ[L] E) := ?refine_1\n⊢ ∑ a : L →ₐ[K] E, ∑ s : F →ₐ[L] E, ↑{ fst := a, snd := s }.fst pb.gen = ∑ x : L →ₐ[K] E, finrank L F • ↑x pb.gen\ncase refine_2\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝²⁰ : CommRing R\ninst✝¹⁹ : CommRing S\ninst✝¹⁸ : CommRing T\ninst✝¹⁷ : Algebra R S\ninst✝¹⁶ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹⁵ : Field K\ninst✝¹⁴ : Field L\ninst✝¹³ : Algebra K L\nι κ : Type w\ninst✝¹² : Fintype ι\nF : Type u_6\ninst✝¹¹ : Field F\ninst✝¹⁰ : Algebra R L\ninst✝⁹ : Algebra L F\ninst✝⁸ : Algebra R F\ninst✝⁷ : IsScalarTower R L F\ninst✝⁶ : Algebra K F\ninst✝⁵ : IsScalarTower K L F\nE : Type u_7\ninst✝⁴ : Field E\ninst✝³ : Algebra K E\ninst✝² : IsAlgClosed E\ninst✝¹ : FiniteDimensional K F\ninst✝ : IsSeparable K F\npb : PowerBasis K L\nthis✝² : FiniteDimensional L F\nthis✝¹ : IsSeparable L F\nthis✝ : Fintype (L →ₐ[K] E) := PowerBasis.AlgHom.fintype pb\nthis : (f : L →ₐ[K] E) → Fintype (F →ₐ[L] E) := ?refine_1\n⊢ ∀ (x : F →ₐ[K] E), ↑x (↑(algebraMap L F) pb.gen) = ↑(↑algHomEquivSigma x).fst pb.gen\ncase refine_1\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝²⁰ : CommRing R\ninst✝¹⁹ : CommRing S\ninst✝¹⁸ : CommRing T\ninst✝¹⁷ : Algebra R S\ninst✝¹⁶ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹⁵ : Field K\ninst✝¹⁴ : Field L\ninst✝¹³ : Algebra K L\nι κ : Type w\ninst✝¹² : Fintype ι\nF : Type u_6\ninst✝¹¹ : Field F\ninst✝¹⁰ : Algebra R L\ninst✝⁹ : Algebra L F\ninst✝⁸ : Algebra R F\ninst✝⁷ : IsScalarTower R L F\ninst✝⁶ : Algebra K F\ninst✝⁵ : IsScalarTower K L F\nE : Type u_7\ninst✝⁴ : Field E\ninst✝³ : Algebra K E\ninst✝² : IsAlgClosed E\ninst✝¹ : FiniteDimensional K F\ninst✝ : IsSeparable K F\npb : PowerBasis K L\nthis✝¹ : FiniteDimensional L F\nthis✝ : IsSeparable L F\nthis : Fintype (L →ₐ[K] E) := PowerBasis.AlgHom.fintype pb\n⊢ (f : L →ₐ[K] E) → Fintype (F →ₐ[L] E)\n[PROOFSTEP]\nrefine' Finset.sum_congr rfl fun σ _ => _\n[GOAL]\ncase refine_2\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝²⁰ : CommRing R\ninst✝¹⁹ : CommRing S\ninst✝¹⁸ : CommRing T\ninst✝¹⁷ : Algebra R S\ninst✝¹⁶ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹⁵ : Field K\ninst✝¹⁴ : Field L\ninst✝¹³ : Algebra K L\nι κ : Type w\ninst✝¹² : Fintype ι\nF : Type u_6\ninst✝¹¹ : Field F\ninst✝¹⁰ : Algebra R L\ninst✝⁹ : Algebra L F\ninst✝⁸ : Algebra R F\ninst✝⁷ : IsScalarTower R L F\ninst✝⁶ : Algebra K F\ninst✝⁵ : IsScalarTower K L F\nE : Type u_7\ninst✝⁴ : Field E\ninst✝³ : Algebra K E\ninst✝² : IsAlgClosed E\ninst✝¹ : FiniteDimensional K F\ninst✝ : IsSeparable K F\npb : PowerBasis K L\nthis✝² : FiniteDimensional L F\nthis✝¹ : IsSeparable L F\nthis✝ : Fintype (L →ₐ[K] E) := PowerBasis.AlgHom.fintype pb\nthis : (f : L →ₐ[K] E) → Fintype (F →ₐ[L] E) := ?refine_1\nσ : L →ₐ[K] E\nx✝ : σ ∈ Finset.univ\n⊢ ∑ s : F →ₐ[L] E, ↑{ fst := σ, snd := s }.fst pb.gen = finrank L F • ↑σ pb.gen\n[PROOFSTEP]\nletI : Algebra L E := σ.toRingHom.toAlgebra\n[GOAL]\ncase refine_2\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝²⁰ : CommRing R\ninst✝¹⁹ : CommRing S\ninst✝¹⁸ : CommRing T\ninst✝¹⁷ : Algebra R S\ninst✝¹⁶ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹⁵ : Field K\ninst✝¹⁴ : Field L\ninst✝¹³ : Algebra K L\nι κ : Type w\ninst✝¹² : Fintype ι\nF : Type u_6\ninst✝¹¹ : Field F\ninst✝¹⁰ : Algebra R L\ninst✝⁹ : Algebra L F\ninst✝⁸ : Algebra R F\ninst✝⁷ : IsScalarTower R L F\ninst✝⁶ : Algebra K F\ninst✝⁵ : IsScalarTower K L F\nE : Type u_7\ninst✝⁴ : Field E\ninst✝³ : Algebra K E\ninst✝² : IsAlgClosed E\ninst✝¹ : FiniteDimensional K F\ninst✝ : IsSeparable K F\npb : PowerBasis K L\nthis✝³ : FiniteDimensional L F\nthis✝² : IsSeparable L F\nthis✝¹ : Fintype (L →ₐ[K] E) := PowerBasis.AlgHom.fintype pb\nthis✝ : (f : L →ₐ[K] E) → Fintype (F →ₐ[L] E) := ?refine_1\nσ : L →ₐ[K] E\nx✝ : σ ∈ Finset.univ\nthis : Algebra L E := RingHom.toAlgebra ↑σ\n⊢ ∑ s : F →ₐ[L] E, ↑{ fst := σ, snd := s }.fst pb.gen = finrank L F • ↑σ pb.gen\n[PROOFSTEP]\nsimp only [Finset.sum_const]\n[GOAL]\ncase refine_2\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝²⁰ : CommRing R\ninst✝¹⁹ : CommRing S\ninst✝¹⁸ : CommRing T\ninst✝¹⁷ : Algebra R S\ninst✝¹⁶ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹⁵ : Field K\ninst✝¹⁴ : Field L\ninst✝¹³ : Algebra K L\nι κ : Type w\ninst✝¹² : Fintype ι\nF : Type u_6\ninst✝¹¹ : Field F\ninst✝¹⁰ : Algebra R L\ninst✝⁹ : Algebra L F\ninst✝⁸ : Algebra R F\ninst✝⁷ : IsScalarTower R L F\ninst✝⁶ : Algebra K F\ninst✝⁵ : IsScalarTower K L F\nE : Type u_7\ninst✝⁴ : Field E\ninst✝³ : Algebra K E\ninst✝² : IsAlgClosed E\ninst✝¹ : FiniteDimensional K F\ninst✝ : IsSeparable K F\npb : PowerBasis K L\nthis✝³ : FiniteDimensional L F\nthis✝² : IsSeparable L F\nthis✝¹ : Fintype (L →ₐ[K] E) := PowerBasis.AlgHom.fintype pb\nthis✝ : (f : L →ₐ[K] E) → Fintype (F →ₐ[L] E) := ?refine_1\nσ : L →ₐ[K] E\nx✝ : σ ∈ Finset.univ\nthis : Algebra L E := RingHom.toAlgebra ↑σ\n⊢ Finset.card Finset.univ • ↑σ pb.gen = finrank L F • ↑σ pb.gen\n[PROOFSTEP]\ncongr\n[GOAL]\ncase refine_2.e_a\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝²⁰ : CommRing R\ninst✝¹⁹ : CommRing S\ninst✝¹⁸ : CommRing T\ninst✝¹⁷ : Algebra R S\ninst✝¹⁶ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹⁵ : Field K\ninst✝¹⁴ : Field L\ninst✝¹³ : Algebra K L\nι κ : Type w\ninst✝¹² : Fintype ι\nF : Type u_6\ninst✝¹¹ : Field F\ninst✝¹⁰ : Algebra R L\ninst✝⁹ : Algebra L F\ninst✝⁸ : Algebra R F\ninst✝⁷ : IsScalarTower R L F\ninst✝⁶ : Algebra K F\ninst✝⁵ : IsScalarTower K L F\nE : Type u_7\ninst✝⁴ : Field E\ninst✝³ : Algebra K E\ninst✝² : IsAlgClosed E\ninst✝¹ : FiniteDimensional K F\ninst✝ : IsSeparable K F\npb : PowerBasis K L\nthis✝³ : FiniteDimensional L F\nthis✝² : IsSeparable L F\nthis✝¹ : Fintype (L →ₐ[K] E) := PowerBasis.AlgHom.fintype pb\nthis✝ : (f : L →ₐ[K] E) → Fintype (F →ₐ[L] E) := ?refine_1\nσ : L →ₐ[K] E\nx✝ : σ ∈ Finset.univ\nthis : Algebra L E := RingHom.toAlgebra ↑σ\n⊢ Finset.card Finset.univ = finrank L F\n[PROOFSTEP]\nrw [← AlgHom.card L F E]\n[GOAL]\ncase refine_2.e_a\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝²⁰ : CommRing R\ninst✝¹⁹ : CommRing S\ninst✝¹⁸ : CommRing T\ninst✝¹⁷ : Algebra R S\ninst✝¹⁶ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹⁵ : Field K\ninst✝¹⁴ : Field L\ninst✝¹³ : Algebra K L\nι κ : Type w\ninst✝¹² : Fintype ι\nF : Type u_6\ninst✝¹¹ : Field F\ninst✝¹⁰ : Algebra R L\ninst✝⁹ : Algebra L F\ninst✝⁸ : Algebra R F\ninst✝⁷ : IsScalarTower R L F\ninst✝⁶ : Algebra K F\ninst✝⁵ : IsScalarTower K L F\nE : Type u_7\ninst✝⁴ : Field E\ninst✝³ : Algebra K E\ninst✝² : IsAlgClosed E\ninst✝¹ : FiniteDimensional K F\ninst✝ : IsSeparable K F\npb : PowerBasis K L\nthis✝³ : FiniteDimensional L F\nthis✝² : IsSeparable L F\nthis✝¹ : Fintype (L →ₐ[K] E) := PowerBasis.AlgHom.fintype pb\nthis✝ : (f : L →ₐ[K] E) → Fintype (F →ₐ[L] E) := ?refine_1\nσ : L →ₐ[K] E\nx✝ : σ ∈ Finset.univ\nthis : Algebra L E := RingHom.toAlgebra ↑σ\n⊢ Finset.card Finset.univ = Fintype.card (F →ₐ[L] E)\ncase refine_1\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝²⁰ : CommRing R\ninst✝¹⁹ : CommRing S\ninst✝¹⁸ : CommRing T\ninst✝¹⁷ : Algebra R S\ninst✝¹⁶ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹⁵ : Field K\ninst✝¹⁴ : Field L\ninst✝¹³ : Algebra K L\nι κ : Type w\ninst✝¹² : Fintype ι\nF : Type u_6\ninst✝¹¹ : Field F\ninst✝¹⁰ : Algebra R L\ninst✝⁹ : Algebra L F\ninst✝⁸ : Algebra R F\ninst✝⁷ : IsScalarTower R L F\ninst✝⁶ : Algebra K F\ninst✝⁵ : IsScalarTower K L F\nE : Type u_7\ninst✝⁴ : Field E\ninst✝³ : Algebra K E\ninst✝² : IsAlgClosed E\ninst✝¹ : FiniteDimensional K F\ninst✝ : IsSeparable K F\npb : PowerBasis K L\nthis✝¹ : FiniteDimensional L F\nthis✝ : IsSeparable L F\nthis : Fintype (L →ₐ[K] E) := PowerBasis.AlgHom.fintype pb\n⊢ (f : L →ₐ[K] E) → Fintype (F →ₐ[L] E)\n[PROOFSTEP]\nexact Finset.card_univ (α := F →ₐ[L] E)\n[GOAL]\ncase refine_2\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝²⁰ : CommRing R\ninst✝¹⁹ : CommRing S\ninst✝¹⁸ : CommRing T\ninst✝¹⁷ : Algebra R S\ninst✝¹⁶ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹⁵ : Field K\ninst✝¹⁴ : Field L\ninst✝¹³ : Algebra K L\nι κ : Type w\ninst✝¹² : Fintype ι\nF : Type u_6\ninst✝¹¹ : Field F\ninst✝¹⁰ : Algebra R L\ninst✝⁹ : Algebra L F\ninst✝⁸ : Algebra R F\ninst✝⁷ : IsScalarTower R L F\ninst✝⁶ : Algebra K F\ninst✝⁵ : IsScalarTower K L F\nE : Type u_7\ninst✝⁴ : Field E\ninst✝³ : Algebra K E\ninst✝² : IsAlgClosed E\ninst✝¹ : FiniteDimensional K F\ninst✝ : IsSeparable K F\npb : PowerBasis K L\nthis✝² : FiniteDimensional L F\nthis✝¹ : IsSeparable L F\nthis✝ : Fintype (L →ₐ[K] E) := PowerBasis.AlgHom.fintype pb\nthis : (f : L →ₐ[K] E) → Fintype (F →ₐ[L] E) := fun σ => minpoly.AlgHom.fintype L F E\n⊢ ∀ (x : F →ₐ[K] E), ↑x (↑(algebraMap L F) pb.gen) = ↑(↑algHomEquivSigma x).fst pb.gen\n[PROOFSTEP]\nintro σ\n[GOAL]\ncase refine_2\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝²⁰ : CommRing R\ninst✝¹⁹ : CommRing S\ninst✝¹⁸ : CommRing T\ninst✝¹⁷ : Algebra R S\ninst✝¹⁶ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹⁵ : Field K\ninst✝¹⁴ : Field L\ninst✝¹³ : Algebra K L\nι κ : Type w\ninst✝¹² : Fintype ι\nF : Type u_6\ninst✝¹¹ : Field F\ninst✝¹⁰ : Algebra R L\ninst✝⁹ : Algebra L F\ninst✝⁸ : Algebra R F\ninst✝⁷ : IsScalarTower R L F\ninst✝⁶ : Algebra K F\ninst✝⁵ : IsScalarTower K L F\nE : Type u_7\ninst✝⁴ : Field E\ninst✝³ : Algebra K E\ninst✝² : IsAlgClosed E\ninst✝¹ : FiniteDimensional K F\ninst✝ : IsSeparable K F\npb : PowerBasis K L\nthis✝² : FiniteDimensional L F\nthis✝¹ : IsSeparable L F\nthis✝ : Fintype (L →ₐ[K] E) := PowerBasis.AlgHom.fintype pb\nthis : (f : L →ₐ[K] E) → Fintype (F →ₐ[L] E) := fun σ => minpoly.AlgHom.fintype L F E\nσ : F →ₐ[K] E\n⊢ ↑σ (↑(algebraMap L F) pb.gen) = ↑(↑algHomEquivSigma σ).fst pb.gen\n[PROOFSTEP]\nsimp only [algHomEquivSigma, Equiv.coe_fn_mk, AlgHom.restrictDomain, AlgHom.comp_apply, IsScalarTower.coe_toAlgHom']\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝²⁰ : CommRing R\ninst✝¹⁹ : CommRing S\ninst✝¹⁸ : CommRing T\ninst✝¹⁷ : Algebra R S\ninst✝¹⁶ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹⁵ : Field K\ninst✝¹⁴ : Field L\ninst✝¹³ : Algebra K L\nι κ : Type w\ninst✝¹² : Fintype ι\nF : Type u_6\ninst✝¹¹ : Field F\ninst✝¹⁰ : Algebra R L\ninst✝⁹ : Algebra L F\ninst✝⁸ : Algebra R F\ninst✝⁷ : IsScalarTower R L F\ninst✝⁶ : Algebra K F\ninst✝⁵ : IsScalarTower K L F\nE : Type u_7\ninst✝⁴ : Field E\ninst✝³ : Algebra K E\ninst✝² : IsAlgClosed E\ninst✝¹ : FiniteDimensional K L\ninst✝ : IsSeparable K L\nx : L\n⊢ ↑(algebraMap K E) (↑(Algebra.trace K L) x) = ∑ σ : L →ₐ[K] E, ↑σ x\n[PROOFSTEP]\nhave hx := IsSeparable.isIntegral K x\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝²⁰ : CommRing R\ninst✝¹⁹ : CommRing S\ninst✝¹⁸ : CommRing T\ninst✝¹⁷ : Algebra R S\ninst✝¹⁶ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹⁵ : Field K\ninst✝¹⁴ : Field L\ninst✝¹³ : Algebra K L\nι κ : Type w\ninst✝¹² : Fintype ι\nF : Type u_6\ninst✝¹¹ : Field F\ninst✝¹⁰ : Algebra R L\ninst✝⁹ : Algebra L F\ninst✝⁸ : Algebra R F\ninst✝⁷ : IsScalarTower R L F\ninst✝⁶ : Algebra K F\ninst✝⁵ : IsScalarTower K L F\nE : Type u_7\ninst✝⁴ : Field E\ninst✝³ : Algebra K E\ninst✝² : IsAlgClosed E\ninst✝¹ : FiniteDimensional K L\ninst✝ : IsSeparable K L\nx : L\nhx : IsIntegral K x\n⊢ ↑(algebraMap K E) (↑(Algebra.trace K L) x) = ∑ σ : L →ₐ[K] E, ↑σ x\n[PROOFSTEP]\nlet pb := (adjoin.powerBasis hx)\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝²⁰ : CommRing R\ninst✝¹⁹ : CommRing S\ninst✝¹⁸ : CommRing T\ninst✝¹⁷ : Algebra R S\ninst✝¹⁶ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹⁵ : Field K\ninst✝¹⁴ : Field L\ninst✝¹³ : Algebra K L\nι κ : Type w\ninst✝¹² : Fintype ι\nF : Type u_6\ninst✝¹¹ : Field F\ninst✝¹⁰ : Algebra R L\ninst✝⁹ : Algebra L F\ninst✝⁸ : Algebra R F\ninst✝⁷ : IsScalarTower R L F\ninst✝⁶ : Algebra K F\ninst✝⁵ : IsScalarTower K L F\nE : Type u_7\ninst✝⁴ : Field E\ninst✝³ : Algebra K E\ninst✝² : IsAlgClosed E\ninst✝¹ : FiniteDimensional K L\ninst✝ : IsSeparable K L\nx : L\nhx : IsIntegral K x\npb : PowerBasis K { x_1 // x_1 ∈ K⟮x⟯ } := adjoin.powerBasis hx\n⊢ ↑(algebraMap K E) (↑(Algebra.trace K L) x) = ∑ σ : L →ₐ[K] E, ↑σ x\n[PROOFSTEP]\nrw [trace_eq_trace_adjoin K x, Algebra.smul_def, RingHom.map_mul, ← adjoin.powerBasis_gen hx,\n  trace_eq_sum_embeddings_gen E pb (IsAlgClosed.splits_codomain _)]\n  -- Porting note: the following `convert` was `exact`, with `← algebra.smul_def, algebra_map_smul`\n  -- in the previous `rw`.\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝²⁰ : CommRing R\ninst✝¹⁹ : CommRing S\ninst✝¹⁸ : CommRing T\ninst✝¹⁷ : Algebra R S\ninst✝¹⁶ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹⁵ : Field K\ninst✝¹⁴ : Field L\ninst✝¹³ : Algebra K L\nι κ : Type w\ninst✝¹² : Fintype ι\nF : Type u_6\ninst✝¹¹ : Field F\ninst✝¹⁰ : Algebra R L\ninst✝⁹ : Algebra L F\ninst✝⁸ : Algebra R F\ninst✝⁷ : IsScalarTower R L F\ninst✝⁶ : Algebra K F\ninst✝⁵ : IsScalarTower K L F\nE : Type u_7\ninst✝⁴ : Field E\ninst✝³ : Algebra K E\ninst✝² : IsAlgClosed E\ninst✝¹ : FiniteDimensional K L\ninst✝ : IsSeparable K L\nx : L\nhx : IsIntegral K x\npb : PowerBasis K { x_1 // x_1 ∈ K⟮x⟯ } := adjoin.powerBasis hx\n⊢ ↑(algebraMap K E) (↑(algebraMap ℕ ((fun x => K) (adjoin.powerBasis hx).gen)) (finrank { x_1 // x_1 ∈ K⟮x⟯ } L)) *\n      ∑ σ : { x_1 // x_1 ∈ K⟮x⟯ } →ₐ[K] E, ↑σ pb.gen =\n    ∑ σ : L →ₐ[K] E, ↑σ x\n[PROOFSTEP]\nconvert (sum_embeddings_eq_finrank_mul L E pb).symm\n[GOAL]\ncase h.e'_2.h.e\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝²⁰ : CommRing R\ninst✝¹⁹ : CommRing S\ninst✝¹⁸ : CommRing T\ninst✝¹⁷ : Algebra R S\ninst✝¹⁶ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹⁵ : Field K\ninst✝¹⁴ : Field L\ninst✝¹³ : Algebra K L\nι κ : Type w\ninst✝¹² : Fintype ι\nF : Type u_6\ninst✝¹¹ : Field F\ninst✝¹⁰ : Algebra R L\ninst✝⁹ : Algebra L F\ninst✝⁸ : Algebra R F\ninst✝⁷ : IsScalarTower R L F\ninst✝⁶ : Algebra K F\ninst✝⁵ : IsScalarTower K L F\nE : Type u_7\ninst✝⁴ : Field E\ninst✝³ : Algebra K E\ninst✝² : IsAlgClosed E\ninst✝¹ : FiniteDimensional K L\ninst✝ : IsSeparable K L\nx : L\nhx : IsIntegral K x\npb : PowerBasis K { x_1 // x_1 ∈ K⟮x⟯ } := adjoin.powerBasis hx\n⊢ HMul.hMul\n      (↑(algebraMap K E)\n        (↑(algebraMap ℕ ((fun x => K) (adjoin.powerBasis hx).gen)) (finrank { x_1 // x_1 ∈ K⟮x⟯ } L))) =\n    HSMul.hSMul (finrank { x_1 // x_1 ∈ K⟮x⟯ } L)\n[PROOFSTEP]\next\n[GOAL]\ncase h.e'_2.h.e.h\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝²⁰ : CommRing R\ninst✝¹⁹ : CommRing S\ninst✝¹⁸ : CommRing T\ninst✝¹⁷ : Algebra R S\ninst✝¹⁶ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹⁵ : Field K\ninst✝¹⁴ : Field L\ninst✝¹³ : Algebra K L\nι κ : Type w\ninst✝¹² : Fintype ι\nF : Type u_6\ninst✝¹¹ : Field F\ninst✝¹⁰ : Algebra R L\ninst✝⁹ : Algebra L F\ninst✝⁸ : Algebra R F\ninst✝⁷ : IsScalarTower R L F\ninst✝⁶ : Algebra K F\ninst✝⁵ : IsScalarTower K L F\nE : Type u_7\ninst✝⁴ : Field E\ninst✝³ : Algebra K E\ninst✝² : IsAlgClosed E\ninst✝¹ : FiniteDimensional K L\ninst✝ : IsSeparable K L\nx : L\nhx : IsIntegral K x\npb : PowerBasis K { x_1 // x_1 ∈ K⟮x⟯ } := adjoin.powerBasis hx\nx✝ : (fun x => E) (↑(Algebra.trace K { x_1 // x_1 ∈ K⟮x⟯ }) (adjoin.powerBasis hx).gen)\n⊢ ↑(algebraMap K E) (↑(algebraMap ℕ ((fun x => K) (adjoin.powerBasis hx).gen)) (finrank { x_1 // x_1 ∈ K⟮x⟯ } L)) * x✝ =\n    finrank { x_1 // x_1 ∈ K⟮x⟯ } L • x✝\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝²⁰ : CommRing R\ninst✝¹⁹ : CommRing S\ninst✝¹⁸ : CommRing T\ninst✝¹⁷ : Algebra R S\ninst✝¹⁶ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹⁵ : Field K\ninst✝¹⁴ : Field L\ninst✝¹³ : Algebra K L\nι κ : Type w\ninst✝¹² : Fintype ι\nF : Type u_6\ninst✝¹¹ : Field F\ninst✝¹⁰ : Algebra R L\ninst✝⁹ : Algebra L F\ninst✝⁸ : Algebra R F\ninst✝⁷ : IsScalarTower R L F\ninst✝⁶ : Algebra K F\ninst✝⁵ : IsScalarTower K L F\nE : Type u_7\ninst✝⁴ : Field E\ninst✝³ : Algebra K E\ninst✝² : IsAlgClosed E\ninst✝¹ : FiniteDimensional K L\ninst✝ : IsSeparable K L\nx : L\nhx : IsIntegral K x\npb : PowerBasis K { x_1 // x_1 ∈ K⟮x⟯ } := adjoin.powerBasis hx\n⊢ Separable (minpoly K pb.gen)\n[PROOFSTEP]\nhaveI := isSeparable_tower_bot_of_isSeparable K K⟮x⟯ L\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝²⁰ : CommRing R\ninst✝¹⁹ : CommRing S\ninst✝¹⁸ : CommRing T\ninst✝¹⁷ : Algebra R S\ninst✝¹⁶ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹⁵ : Field K\ninst✝¹⁴ : Field L\ninst✝¹³ : Algebra K L\nι κ : Type w\ninst✝¹² : Fintype ι\nF : Type u_6\ninst✝¹¹ : Field F\ninst✝¹⁰ : Algebra R L\ninst✝⁹ : Algebra L F\ninst✝⁸ : Algebra R F\ninst✝⁷ : IsScalarTower R L F\ninst✝⁶ : Algebra K F\ninst✝⁵ : IsScalarTower K L F\nE : Type u_7\ninst✝⁴ : Field E\ninst✝³ : Algebra K E\ninst✝² : IsAlgClosed E\ninst✝¹ : FiniteDimensional K L\ninst✝ : IsSeparable K L\nx : L\nhx : IsIntegral K x\npb : PowerBasis K { x_1 // x_1 ∈ K⟮x⟯ } := adjoin.powerBasis hx\nthis : IsSeparable K { x_1 // x_1 ∈ K⟮x⟯ }\n⊢ Separable (minpoly K pb.gen)\n[PROOFSTEP]\nexact IsSeparable.separable K _\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝²⁰ : CommRing R\ninst✝¹⁹ : CommRing S\ninst✝¹⁸ : CommRing T\ninst✝¹⁷ : Algebra R S\ninst✝¹⁶ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹⁵ : Field K\ninst✝¹⁴ : Field L\ninst✝¹³ : Algebra K L\nι κ : Type w\ninst✝¹² : Fintype ι\nF : Type u_6\ninst✝¹¹ : Field F\ninst✝¹⁰ : Algebra R L\ninst✝⁹ : Algebra L F\ninst✝⁸ : Algebra R F\ninst✝⁷ : IsScalarTower R L F\ninst✝⁶ : Algebra K F\ninst✝⁵ : IsScalarTower K L F\nE : Type u_7\ninst✝⁴ : Field E\ninst✝³ : Algebra K E\ninst✝² : IsAlgClosed E\nx : L\ninst✝¹ : FiniteDimensional K L\ninst✝ : IsGalois K L\n⊢ ↑(algebraMap K L) (↑(Algebra.trace K L) x) = ∑ σ : L ≃ₐ[K] L, ↑σ x\n[PROOFSTEP]\napply NoZeroSMulDivisors.algebraMap_injective L (AlgebraicClosure L)\n[GOAL]\ncase a\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝²⁰ : CommRing R\ninst✝¹⁹ : CommRing S\ninst✝¹⁸ : CommRing T\ninst✝¹⁷ : Algebra R S\ninst✝¹⁶ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹⁵ : Field K\ninst✝¹⁴ : Field L\ninst✝¹³ : Algebra K L\nι κ : Type w\ninst✝¹² : Fintype ι\nF : Type u_6\ninst✝¹¹ : Field F\ninst✝¹⁰ : Algebra R L\ninst✝⁹ : Algebra L F\ninst✝⁸ : Algebra R F\ninst✝⁷ : IsScalarTower R L F\ninst✝⁶ : Algebra K F\ninst✝⁵ : IsScalarTower K L F\nE : Type u_7\ninst✝⁴ : Field E\ninst✝³ : Algebra K E\ninst✝² : IsAlgClosed E\nx : L\ninst✝¹ : FiniteDimensional K L\ninst✝ : IsGalois K L\n⊢ ↑(algebraMap L (AlgebraicClosure L)) (↑(algebraMap K L) (↑(Algebra.trace K L) x)) =\n    ↑(algebraMap L (AlgebraicClosure L)) (∑ σ : L ≃ₐ[K] L, ↑σ x)\n[PROOFSTEP]\nrw [_root_.map_sum (algebraMap L (AlgebraicClosure L))]\n[GOAL]\ncase a\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝²⁰ : CommRing R\ninst✝¹⁹ : CommRing S\ninst✝¹⁸ : CommRing T\ninst✝¹⁷ : Algebra R S\ninst✝¹⁶ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹⁵ : Field K\ninst✝¹⁴ : Field L\ninst✝¹³ : Algebra K L\nι κ : Type w\ninst✝¹² : Fintype ι\nF : Type u_6\ninst✝¹¹ : Field F\ninst✝¹⁰ : Algebra R L\ninst✝⁹ : Algebra L F\ninst✝⁸ : Algebra R F\ninst✝⁷ : IsScalarTower R L F\ninst✝⁶ : Algebra K F\ninst✝⁵ : IsScalarTower K L F\nE : Type u_7\ninst✝⁴ : Field E\ninst✝³ : Algebra K E\ninst✝² : IsAlgClosed E\nx : L\ninst✝¹ : FiniteDimensional K L\ninst✝ : IsGalois K L\n⊢ ↑(algebraMap L (AlgebraicClosure L)) (↑(algebraMap K L) (↑(Algebra.trace K L) x)) =\n    ∑ x_1 : L ≃ₐ[K] L, ↑(algebraMap L (AlgebraicClosure L)) (↑x_1 x)\n[PROOFSTEP]\nrw [← Fintype.sum_equiv (Normal.algHomEquivAut K (AlgebraicClosure L) L)]\n[GOAL]\ncase a\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝²⁰ : CommRing R\ninst✝¹⁹ : CommRing S\ninst✝¹⁸ : CommRing T\ninst✝¹⁷ : Algebra R S\ninst✝¹⁶ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹⁵ : Field K\ninst✝¹⁴ : Field L\ninst✝¹³ : Algebra K L\nι κ : Type w\ninst✝¹² : Fintype ι\nF : Type u_6\ninst✝¹¹ : Field F\ninst✝¹⁰ : Algebra R L\ninst✝⁹ : Algebra L F\ninst✝⁸ : Algebra R F\ninst✝⁷ : IsScalarTower R L F\ninst✝⁶ : Algebra K F\ninst✝⁵ : IsScalarTower K L F\nE : Type u_7\ninst✝⁴ : Field E\ninst✝³ : Algebra K E\ninst✝² : IsAlgClosed E\nx : L\ninst✝¹ : FiniteDimensional K L\ninst✝ : IsGalois K L\n⊢ ↑(algebraMap L (AlgebraicClosure L)) (↑(algebraMap K L) (↑(Algebra.trace K L) x)) =\n    ∑ x : L →ₐ[K] AlgebraicClosure L, ?a.f✝ x\n[PROOFSTEP]\nrw [← trace_eq_sum_embeddings (AlgebraicClosure L)]\n[GOAL]\ncase a\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝²⁰ : CommRing R\ninst✝¹⁹ : CommRing S\ninst✝¹⁸ : CommRing T\ninst✝¹⁷ : Algebra R S\ninst✝¹⁶ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹⁵ : Field K\ninst✝¹⁴ : Field L\ninst✝¹³ : Algebra K L\nι κ : Type w\ninst✝¹² : Fintype ι\nF : Type u_6\ninst✝¹¹ : Field F\ninst✝¹⁰ : Algebra R L\ninst✝⁹ : Algebra L F\ninst✝⁸ : Algebra R F\ninst✝⁷ : IsScalarTower R L F\ninst✝⁶ : Algebra K F\ninst✝⁵ : IsScalarTower K L F\nE : Type u_7\ninst✝⁴ : Field E\ninst✝³ : Algebra K E\ninst✝² : IsAlgClosed E\nx : L\ninst✝¹ : FiniteDimensional K L\ninst✝ : IsGalois K L\n⊢ ↑(algebraMap L (AlgebraicClosure L)) (↑(algebraMap K L) (↑(Algebra.trace K L) x)) =\n    ↑(algebraMap K (AlgebraicClosure L)) (↑(Algebra.trace K L) ?m.943761)\n[PROOFSTEP]\nsimp only [algebraMap_eq_smul_one]\n  -- Porting note: `smul_one_smul` was in the `simp only`.\n[GOAL]\ncase a\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝²⁰ : CommRing R\ninst✝¹⁹ : CommRing S\ninst✝¹⁸ : CommRing T\ninst✝¹⁷ : Algebra R S\ninst✝¹⁶ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹⁵ : Field K\ninst✝¹⁴ : Field L\ninst✝¹³ : Algebra K L\nι κ : Type w\ninst✝¹² : Fintype ι\nF : Type u_6\ninst✝¹¹ : Field F\ninst✝¹⁰ : Algebra R L\ninst✝⁹ : Algebra L F\ninst✝⁸ : Algebra R F\ninst✝⁷ : IsScalarTower R L F\ninst✝⁶ : Algebra K F\ninst✝⁵ : IsScalarTower K L F\nE : Type u_7\ninst✝⁴ : Field E\ninst✝³ : Algebra K E\ninst✝² : IsAlgClosed E\nx : L\ninst✝¹ : FiniteDimensional K L\ninst✝ : IsGalois K L\n⊢ (↑(Algebra.trace K L) x • 1) • 1 = ↑(Algebra.trace K L) ?m.943761 • 1\n[PROOFSTEP]\napply smul_one_smul\n[GOAL]\ncase a.h\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝²⁰ : CommRing R\ninst✝¹⁹ : CommRing S\ninst✝¹⁸ : CommRing T\ninst✝¹⁷ : Algebra R S\ninst✝¹⁶ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹⁵ : Field K\ninst✝¹⁴ : Field L\ninst✝¹³ : Algebra K L\nι κ : Type w\ninst✝¹² : Fintype ι\nF : Type u_6\ninst✝¹¹ : Field F\ninst✝¹⁰ : Algebra R L\ninst✝⁹ : Algebra L F\ninst✝⁸ : Algebra R F\ninst✝⁷ : IsScalarTower R L F\ninst✝⁶ : Algebra K F\ninst✝⁵ : IsScalarTower K L F\nE : Type u_7\ninst✝⁴ : Field E\ninst✝³ : Algebra K E\ninst✝² : IsAlgClosed E\nx : L\ninst✝¹ : FiniteDimensional K L\ninst✝ : IsGalois K L\n⊢ ∀ (x_1 : L →ₐ[K] AlgebraicClosure L),\n    ↑x_1 x = ↑(algebraMap L (AlgebraicClosure L)) (↑(↑(Normal.algHomEquivAut K (AlgebraicClosure L) L) x_1) x)\n[PROOFSTEP]\nintro σ\n[GOAL]\ncase a.h\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝²⁰ : CommRing R\ninst✝¹⁹ : CommRing S\ninst✝¹⁸ : CommRing T\ninst✝¹⁷ : Algebra R S\ninst✝¹⁶ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹⁵ : Field K\ninst✝¹⁴ : Field L\ninst✝¹³ : Algebra K L\nι κ : Type w\ninst✝¹² : Fintype ι\nF : Type u_6\ninst✝¹¹ : Field F\ninst✝¹⁰ : Algebra R L\ninst✝⁹ : Algebra L F\ninst✝⁸ : Algebra R F\ninst✝⁷ : IsScalarTower R L F\ninst✝⁶ : Algebra K F\ninst✝⁵ : IsScalarTower K L F\nE : Type u_7\ninst✝⁴ : Field E\ninst✝³ : Algebra K E\ninst✝² : IsAlgClosed E\nx : L\ninst✝¹ : FiniteDimensional K L\ninst✝ : IsGalois K L\nσ : L →ₐ[K] AlgebraicClosure L\n⊢ ↑σ x = ↑(algebraMap L (AlgebraicClosure L)) (↑(↑(Normal.algHomEquivAut K (AlgebraicClosure L) L) σ) x)\n[PROOFSTEP]\nsimp only [Normal.algHomEquivAut, AlgHom.restrictNormal', Equiv.coe_fn_mk, AlgEquiv.coe_ofBijective,\n  AlgHom.restrictNormal_commutes, id.map_eq_id, RingHom.id_apply]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁸ : CommRing R\ninst✝¹⁷ : CommRing S\ninst✝¹⁶ : CommRing T\ninst✝¹⁵ : Algebra R S\ninst✝¹⁴ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra K L\nι κ : Type w\ninst✝¹⁰ : Fintype ι\nF : Type u_6\ninst✝⁹ : Field F\ninst✝⁸ : Algebra R L\ninst✝⁷ : Algebra L F\ninst✝⁶ : Algebra R F\ninst✝⁵ : IsScalarTower R L F\nA : Type u\nB : Type v\nC : Type z\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : Algebra A B\ninst✝¹ : CommRing C\ninst✝ : Algebra A C\nκ' : Type u_7\nb : Basis κ A B\nf : κ ≃ κ'\n⊢ traceMatrix A ↑(Basis.reindex b f) = ↑(reindex f f) (traceMatrix A ↑b)\n[PROOFSTEP]\next (x y)\n[GOAL]\ncase a.h\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁸ : CommRing R\ninst✝¹⁷ : CommRing S\ninst✝¹⁶ : CommRing T\ninst✝¹⁵ : Algebra R S\ninst✝¹⁴ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra K L\nι κ : Type w\ninst✝¹⁰ : Fintype ι\nF : Type u_6\ninst✝⁹ : Field F\ninst✝⁸ : Algebra R L\ninst✝⁷ : Algebra L F\ninst✝⁶ : Algebra R F\ninst✝⁵ : IsScalarTower R L F\nA : Type u\nB : Type v\nC : Type z\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : Algebra A B\ninst✝¹ : CommRing C\ninst✝ : Algebra A C\nκ' : Type u_7\nb : Basis κ A B\nf : κ ≃ κ'\nx y : κ'\n⊢ traceMatrix A (↑(Basis.reindex b f)) x y = ↑(reindex f f) (traceMatrix A ↑b) x y\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁹ : CommRing R\ninst✝¹⁸ : CommRing S\ninst✝¹⁷ : CommRing T\ninst✝¹⁶ : Algebra R S\ninst✝¹⁵ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹⁴ : Field K\ninst✝¹³ : Field L\ninst✝¹² : Algebra K L\nι κ : Type w\ninst✝¹¹ : Fintype ι\nF : Type u_6\ninst✝¹⁰ : Field F\ninst✝⁹ : Algebra R L\ninst✝⁸ : Algebra L F\ninst✝⁷ : Algebra R F\ninst✝⁶ : IsScalarTower R L F\nA : Type u\nB : Type v\nC : Type z\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : Algebra A B\ninst✝² : CommRing C\ninst✝¹ : Algebra A C\ninst✝ : Fintype κ\nb : κ → B\nP : Matrix κ κ A\n⊢ traceMatrix A (vecMul b (Matrix.map P ↑(algebraMap A B))) = Pᵀ * traceMatrix A b * P\n[PROOFSTEP]\next (α β)\n[GOAL]\ncase a.h\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁹ : CommRing R\ninst✝¹⁸ : CommRing S\ninst✝¹⁷ : CommRing T\ninst✝¹⁶ : Algebra R S\ninst✝¹⁵ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹⁴ : Field K\ninst✝¹³ : Field L\ninst✝¹² : Algebra K L\nι κ : Type w\ninst✝¹¹ : Fintype ι\nF : Type u_6\ninst✝¹⁰ : Field F\ninst✝⁹ : Algebra R L\ninst✝⁸ : Algebra L F\ninst✝⁷ : Algebra R F\ninst✝⁶ : IsScalarTower R L F\nA : Type u\nB : Type v\nC : Type z\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : Algebra A B\ninst✝² : CommRing C\ninst✝¹ : Algebra A C\ninst✝ : Fintype κ\nb : κ → B\nP : Matrix κ κ A\nα β : κ\n⊢ traceMatrix A (vecMul b (Matrix.map P ↑(algebraMap A B))) α β = (Pᵀ * traceMatrix A b * P) α β\n[PROOFSTEP]\nrw [traceMatrix_apply, vecMul, dotProduct, vecMul, dotProduct, Matrix.mul_apply, BilinForm.sum_left,\n  Fintype.sum_congr _ _ fun i : κ =>\n    @BilinForm.sum_right _ _ _ _ _ _ _ _ (b i * P.map (algebraMap A B) i α) fun y : κ =>\n      b y * P.map (algebraMap A B) y β,\n  sum_comm]\n[GOAL]\ncase a.h\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁹ : CommRing R\ninst✝¹⁸ : CommRing S\ninst✝¹⁷ : CommRing T\ninst✝¹⁶ : Algebra R S\ninst✝¹⁵ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹⁴ : Field K\ninst✝¹³ : Field L\ninst✝¹² : Algebra K L\nι κ : Type w\ninst✝¹¹ : Fintype ι\nF : Type u_6\ninst✝¹⁰ : Field F\ninst✝⁹ : Algebra R L\ninst✝⁸ : Algebra L F\ninst✝⁷ : Algebra R F\ninst✝⁶ : IsScalarTower R L F\nA : Type u\nB : Type v\nC : Type z\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : Algebra A B\ninst✝² : CommRing C\ninst✝¹ : Algebra A C\ninst✝ : Fintype κ\nb : κ → B\nP : Matrix κ κ A\nα β : κ\n⊢ ∑ y : κ,\n      ∑ x : κ,\n        BilinForm.bilin (traceForm A B) (b x * Matrix.map P (↑(algebraMap A B)) x α)\n          (b y * Matrix.map P (↑(algebraMap A B)) y β) =\n    ∑ j : κ, (Pᵀ * traceMatrix A b) α j * P j β\n[PROOFSTEP]\ncongr\n[GOAL]\ncase a.h.e_f\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁹ : CommRing R\ninst✝¹⁸ : CommRing S\ninst✝¹⁷ : CommRing T\ninst✝¹⁶ : Algebra R S\ninst✝¹⁵ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹⁴ : Field K\ninst✝¹³ : Field L\ninst✝¹² : Algebra K L\nι κ : Type w\ninst✝¹¹ : Fintype ι\nF : Type u_6\ninst✝¹⁰ : Field F\ninst✝⁹ : Algebra R L\ninst✝⁸ : Algebra L F\ninst✝⁷ : Algebra R F\ninst✝⁶ : IsScalarTower R L F\nA : Type u\nB : Type v\nC : Type z\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : Algebra A B\ninst✝² : CommRing C\ninst✝¹ : Algebra A C\ninst✝ : Fintype κ\nb : κ → B\nP : Matrix κ κ A\nα β : κ\n⊢ (fun y =>\n      ∑ x : κ,\n        BilinForm.bilin (traceForm A B) (b x * Matrix.map P (↑(algebraMap A B)) x α)\n          (b y * Matrix.map P (↑(algebraMap A B)) y β)) =\n    fun j => (Pᵀ * traceMatrix A b) α j * P j β\n[PROOFSTEP]\next x\n[GOAL]\ncase a.h.e_f.h\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁹ : CommRing R\ninst✝¹⁸ : CommRing S\ninst✝¹⁷ : CommRing T\ninst✝¹⁶ : Algebra R S\ninst✝¹⁵ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹⁴ : Field K\ninst✝¹³ : Field L\ninst✝¹² : Algebra K L\nι κ : Type w\ninst✝¹¹ : Fintype ι\nF : Type u_6\ninst✝¹⁰ : Field F\ninst✝⁹ : Algebra R L\ninst✝⁸ : Algebra L F\ninst✝⁷ : Algebra R F\ninst✝⁶ : IsScalarTower R L F\nA : Type u\nB : Type v\nC : Type z\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : Algebra A B\ninst✝² : CommRing C\ninst✝¹ : Algebra A C\ninst✝ : Fintype κ\nb : κ → B\nP : Matrix κ κ A\nα β x : κ\n⊢ ∑ x_1 : κ,\n      BilinForm.bilin (traceForm A B) (b x_1 * Matrix.map P (↑(algebraMap A B)) x_1 α)\n        (b x * Matrix.map P (↑(algebraMap A B)) x β) =\n    (Pᵀ * traceMatrix A b) α x * P x β\n[PROOFSTEP]\nrw [Matrix.mul_apply, sum_mul]\n[GOAL]\ncase a.h.e_f.h\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁹ : CommRing R\ninst✝¹⁸ : CommRing S\ninst✝¹⁷ : CommRing T\ninst✝¹⁶ : Algebra R S\ninst✝¹⁵ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹⁴ : Field K\ninst✝¹³ : Field L\ninst✝¹² : Algebra K L\nι κ : Type w\ninst✝¹¹ : Fintype ι\nF : Type u_6\ninst✝¹⁰ : Field F\ninst✝⁹ : Algebra R L\ninst✝⁸ : Algebra L F\ninst✝⁷ : Algebra R F\ninst✝⁶ : IsScalarTower R L F\nA : Type u\nB : Type v\nC : Type z\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : Algebra A B\ninst✝² : CommRing C\ninst✝¹ : Algebra A C\ninst✝ : Fintype κ\nb : κ → B\nP : Matrix κ κ A\nα β x : κ\n⊢ ∑ x_1 : κ,\n      BilinForm.bilin (traceForm A B) (b x_1 * Matrix.map P (↑(algebraMap A B)) x_1 α)\n        (b x * Matrix.map P (↑(algebraMap A B)) x β) =\n    ∑ x_1 : κ, Pᵀ α x_1 * traceMatrix A b x_1 x * P x β\n[PROOFSTEP]\ncongr\n[GOAL]\ncase a.h.e_f.h.e_f\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁹ : CommRing R\ninst✝¹⁸ : CommRing S\ninst✝¹⁷ : CommRing T\ninst✝¹⁶ : Algebra R S\ninst✝¹⁵ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹⁴ : Field K\ninst✝¹³ : Field L\ninst✝¹² : Algebra K L\nι κ : Type w\ninst✝¹¹ : Fintype ι\nF : Type u_6\ninst✝¹⁰ : Field F\ninst✝⁹ : Algebra R L\ninst✝⁸ : Algebra L F\ninst✝⁷ : Algebra R F\ninst✝⁶ : IsScalarTower R L F\nA : Type u\nB : Type v\nC : Type z\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : Algebra A B\ninst✝² : CommRing C\ninst✝¹ : Algebra A C\ninst✝ : Fintype κ\nb : κ → B\nP : Matrix κ κ A\nα β x : κ\n⊢ (fun x_1 =>\n      BilinForm.bilin (traceForm A B) (b x_1 * Matrix.map P (↑(algebraMap A B)) x_1 α)\n        (b x * Matrix.map P (↑(algebraMap A B)) x β)) =\n    fun x_1 => Pᵀ α x_1 * traceMatrix A b x_1 x * P x β\n[PROOFSTEP]\next y\n[GOAL]\ncase a.h.e_f.h.e_f.h\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁹ : CommRing R\ninst✝¹⁸ : CommRing S\ninst✝¹⁷ : CommRing T\ninst✝¹⁶ : Algebra R S\ninst✝¹⁵ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹⁴ : Field K\ninst✝¹³ : Field L\ninst✝¹² : Algebra K L\nι κ : Type w\ninst✝¹¹ : Fintype ι\nF : Type u_6\ninst✝¹⁰ : Field F\ninst✝⁹ : Algebra R L\ninst✝⁸ : Algebra L F\ninst✝⁷ : Algebra R F\ninst✝⁶ : IsScalarTower R L F\nA : Type u\nB : Type v\nC : Type z\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : Algebra A B\ninst✝² : CommRing C\ninst✝¹ : Algebra A C\ninst✝ : Fintype κ\nb : κ → B\nP : Matrix κ κ A\nα β x y : κ\n⊢ BilinForm.bilin (traceForm A B) (b y * Matrix.map P (↑(algebraMap A B)) y α)\n      (b x * Matrix.map P (↑(algebraMap A B)) x β) =\n    Pᵀ α y * traceMatrix A b y x * P x β\n[PROOFSTEP]\nrw [map_apply, traceForm_apply, mul_comm (b y), ← smul_def]\n[GOAL]\ncase a.h.e_f.h.e_f.h\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁹ : CommRing R\ninst✝¹⁸ : CommRing S\ninst✝¹⁷ : CommRing T\ninst✝¹⁶ : Algebra R S\ninst✝¹⁵ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹⁴ : Field K\ninst✝¹³ : Field L\ninst✝¹² : Algebra K L\nι κ : Type w\ninst✝¹¹ : Fintype ι\nF : Type u_6\ninst✝¹⁰ : Field F\ninst✝⁹ : Algebra R L\ninst✝⁸ : Algebra L F\ninst✝⁷ : Algebra R F\ninst✝⁶ : IsScalarTower R L F\nA : Type u\nB : Type v\nC : Type z\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : Algebra A B\ninst✝² : CommRing C\ninst✝¹ : Algebra A C\ninst✝ : Fintype κ\nb : κ → B\nP : Matrix κ κ A\nα β x y : κ\n⊢ ↑(trace A B) (P y α • b y * (b x * Matrix.map P (↑(algebraMap A B)) x β)) = Pᵀ α y * traceMatrix A b y x * P x β\n[PROOFSTEP]\nsimp only [id.smul_eq_mul, RingHom.id_apply, map_apply, transpose_apply, LinearMap.map_smulₛₗ, traceForm_apply,\n  Algebra.smul_mul_assoc]\n[GOAL]\ncase a.h.e_f.h.e_f.h\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁹ : CommRing R\ninst✝¹⁸ : CommRing S\ninst✝¹⁷ : CommRing T\ninst✝¹⁶ : Algebra R S\ninst✝¹⁵ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹⁴ : Field K\ninst✝¹³ : Field L\ninst✝¹² : Algebra K L\nι κ : Type w\ninst✝¹¹ : Fintype ι\nF : Type u_6\ninst✝¹⁰ : Field F\ninst✝⁹ : Algebra R L\ninst✝⁸ : Algebra L F\ninst✝⁷ : Algebra R F\ninst✝⁶ : IsScalarTower R L F\nA : Type u\nB : Type v\nC : Type z\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : Algebra A B\ninst✝² : CommRing C\ninst✝¹ : Algebra A C\ninst✝ : Fintype κ\nb : κ → B\nP : Matrix κ κ A\nα β x y : κ\n⊢ P y α * ↑(trace A B) (b y * (b x * ↑(algebraMap A B) (P x β))) = P y α * traceMatrix A b y x * P x β\n[PROOFSTEP]\nrw [mul_comm (b x), ← smul_def]\n[GOAL]\ncase a.h.e_f.h.e_f.h\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁹ : CommRing R\ninst✝¹⁸ : CommRing S\ninst✝¹⁷ : CommRing T\ninst✝¹⁶ : Algebra R S\ninst✝¹⁵ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹⁴ : Field K\ninst✝¹³ : Field L\ninst✝¹² : Algebra K L\nι κ : Type w\ninst✝¹¹ : Fintype ι\nF : Type u_6\ninst✝¹⁰ : Field F\ninst✝⁹ : Algebra R L\ninst✝⁸ : Algebra L F\ninst✝⁷ : Algebra R F\ninst✝⁶ : IsScalarTower R L F\nA : Type u\nB : Type v\nC : Type z\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : Algebra A B\ninst✝² : CommRing C\ninst✝¹ : Algebra A C\ninst✝ : Fintype κ\nb : κ → B\nP : Matrix κ κ A\nα β x y : κ\n⊢ P y α * ↑(trace A B) (b y * P x β • b x) = P y α * traceMatrix A b y x * P x β\n[PROOFSTEP]\nring_nf\n[GOAL]\ncase a.h.e_f.h.e_f.h\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁹ : CommRing R\ninst✝¹⁸ : CommRing S\ninst✝¹⁷ : CommRing T\ninst✝¹⁶ : Algebra R S\ninst✝¹⁵ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹⁴ : Field K\ninst✝¹³ : Field L\ninst✝¹² : Algebra K L\nι κ : Type w\ninst✝¹¹ : Fintype ι\nF : Type u_6\ninst✝¹⁰ : Field F\ninst✝⁹ : Algebra R L\ninst✝⁸ : Algebra L F\ninst✝⁷ : Algebra R F\ninst✝⁶ : IsScalarTower R L F\nA : Type u\nB : Type v\nC : Type z\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : Algebra A B\ninst✝² : CommRing C\ninst✝¹ : Algebra A C\ninst✝ : Fintype κ\nb : κ → B\nP : Matrix κ κ A\nα β x y : κ\n⊢ P y α * ↑(trace A B) (b y * P x β • b x) = P y α * traceMatrix A b y x * P x β\n[PROOFSTEP]\nrw [mul_assoc]\n[GOAL]\ncase a.h.e_f.h.e_f.h\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁹ : CommRing R\ninst✝¹⁸ : CommRing S\ninst✝¹⁷ : CommRing T\ninst✝¹⁶ : Algebra R S\ninst✝¹⁵ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹⁴ : Field K\ninst✝¹³ : Field L\ninst✝¹² : Algebra K L\nι κ : Type w\ninst✝¹¹ : Fintype ι\nF : Type u_6\ninst✝¹⁰ : Field F\ninst✝⁹ : Algebra R L\ninst✝⁸ : Algebra L F\ninst✝⁷ : Algebra R F\ninst✝⁶ : IsScalarTower R L F\nA : Type u\nB : Type v\nC : Type z\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : Algebra A B\ninst✝² : CommRing C\ninst✝¹ : Algebra A C\ninst✝ : Fintype κ\nb : κ → B\nP : Matrix κ κ A\nα β x y : κ\n⊢ P y α * ↑(trace A B) (b y * P x β • b x) = P y α * (traceMatrix A b y x * P x β)\n[PROOFSTEP]\nsimp [mul_comm]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁹ : CommRing R\ninst✝¹⁸ : CommRing S\ninst✝¹⁷ : CommRing T\ninst✝¹⁶ : Algebra R S\ninst✝¹⁵ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹⁴ : Field K\ninst✝¹³ : Field L\ninst✝¹² : Algebra K L\nι κ : Type w\ninst✝¹¹ : Fintype ι\nF : Type u_6\ninst✝¹⁰ : Field F\ninst✝⁹ : Algebra R L\ninst✝⁸ : Algebra L F\ninst✝⁷ : Algebra R F\ninst✝⁶ : IsScalarTower R L F\nA : Type u\nB : Type v\nC : Type z\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : Algebra A B\ninst✝² : CommRing C\ninst✝¹ : Algebra A C\ninst✝ : Fintype κ\nb : κ → B\nP : Matrix κ κ A\n⊢ traceMatrix A (mulVec (Matrix.map P ↑(algebraMap A B)) b) = P * traceMatrix A b * Pᵀ\n[PROOFSTEP]\nrefine' AddEquiv.injective (transposeAddEquiv κ κ A) _\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁹ : CommRing R\ninst✝¹⁸ : CommRing S\ninst✝¹⁷ : CommRing T\ninst✝¹⁶ : Algebra R S\ninst✝¹⁵ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹⁴ : Field K\ninst✝¹³ : Field L\ninst✝¹² : Algebra K L\nι κ : Type w\ninst✝¹¹ : Fintype ι\nF : Type u_6\ninst✝¹⁰ : Field F\ninst✝⁹ : Algebra R L\ninst✝⁸ : Algebra L F\ninst✝⁷ : Algebra R F\ninst✝⁶ : IsScalarTower R L F\nA : Type u\nB : Type v\nC : Type z\ninst✝⁵ : CommRing A\ninst✝⁴ : CommRing B\ninst✝³ : Algebra A B\ninst✝² : CommRing C\ninst✝¹ : Algebra A C\ninst✝ : Fintype κ\nb : κ → B\nP : Matrix κ κ A\n⊢ ↑(transposeAddEquiv κ κ A) (traceMatrix A (mulVec (Matrix.map P ↑(algebraMap A B)) b)) =\n    ↑(transposeAddEquiv κ κ A) (P * traceMatrix A b * Pᵀ)\n[PROOFSTEP]\nrw [transposeAddEquiv_apply, transposeAddEquiv_apply, ← vecMul_transpose, ← transpose_map, traceMatrix_of_matrix_vecMul,\n  transpose_transpose, transpose_mul, transpose_transpose, transpose_mul]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝²⁰ : CommRing R\ninst✝¹⁹ : CommRing S\ninst✝¹⁸ : CommRing T\ninst✝¹⁷ : Algebra R S\ninst✝¹⁶ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹⁵ : Field K\ninst✝¹⁴ : Field L\ninst✝¹³ : Algebra K L\nι κ : Type w\ninst✝¹² : Fintype ι\nF : Type u_6\ninst✝¹¹ : Field F\ninst✝¹⁰ : Algebra R L\ninst✝⁹ : Algebra L F\ninst✝⁸ : Algebra R F\ninst✝⁷ : IsScalarTower R L F\nA : Type u\nB : Type v\nC : Type z\ninst✝⁶ : CommRing A\ninst✝⁵ : CommRing B\ninst✝⁴ : Algebra A B\ninst✝³ : CommRing C\ninst✝² : Algebra A C\ninst✝¹ : Fintype κ\ninst✝ : DecidableEq κ\nb : Basis κ A B\n⊢ traceMatrix A ↑b = ↑(BilinForm.toMatrix b) (traceForm A B)\n[PROOFSTEP]\next (i j)\n[GOAL]\ncase a.h\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝²⁰ : CommRing R\ninst✝¹⁹ : CommRing S\ninst✝¹⁸ : CommRing T\ninst✝¹⁷ : Algebra R S\ninst✝¹⁶ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹⁵ : Field K\ninst✝¹⁴ : Field L\ninst✝¹³ : Algebra K L\nι κ : Type w\ninst✝¹² : Fintype ι\nF : Type u_6\ninst✝¹¹ : Field F\ninst✝¹⁰ : Algebra R L\ninst✝⁹ : Algebra L F\ninst✝⁸ : Algebra R F\ninst✝⁷ : IsScalarTower R L F\nA : Type u\nB : Type v\nC : Type z\ninst✝⁶ : CommRing A\ninst✝⁵ : CommRing B\ninst✝⁴ : Algebra A B\ninst✝³ : CommRing C\ninst✝² : Algebra A C\ninst✝¹ : Fintype κ\ninst✝ : DecidableEq κ\nb : Basis κ A B\ni j : κ\n⊢ traceMatrix A (↑b) i j = ↑(BilinForm.toMatrix b) (traceForm A B) i j\n[PROOFSTEP]\nrw [traceMatrix_apply, traceForm_apply, traceForm_toMatrix]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁸ : CommRing R\ninst✝¹⁷ : CommRing S\ninst✝¹⁶ : CommRing T\ninst✝¹⁵ : Algebra R S\ninst✝¹⁴ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra K L\nι κ : Type w\ninst✝¹⁰ : Fintype ι\nF : Type u_6\ninst✝⁹ : Field F\ninst✝⁸ : Algebra R L\ninst✝⁷ : Algebra L F\ninst✝⁶ : Algebra R F\ninst✝⁵ : IsScalarTower R L F\nA : Type u\nB : Type v\nC : Type z\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : Algebra A B\ninst✝¹ : CommRing C\ninst✝ : Algebra A C\nb : Basis ι A B\nz : B\n⊢ mulVec (traceMatrix A ↑b) (↑(Basis.equivFun b) z) = fun i => ↑(trace A B) (z * ↑b i)\n[PROOFSTEP]\next i\n[GOAL]\ncase h\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁸ : CommRing R\ninst✝¹⁷ : CommRing S\ninst✝¹⁶ : CommRing T\ninst✝¹⁵ : Algebra R S\ninst✝¹⁴ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra K L\nι κ : Type w\ninst✝¹⁰ : Fintype ι\nF : Type u_6\ninst✝⁹ : Field F\ninst✝⁸ : Algebra R L\ninst✝⁷ : Algebra L F\ninst✝⁶ : Algebra R F\ninst✝⁵ : IsScalarTower R L F\nA : Type u\nB : Type v\nC : Type z\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : Algebra A B\ninst✝¹ : CommRing C\ninst✝ : Algebra A C\nb : Basis ι A B\nz : B\ni : ι\n⊢ mulVec (traceMatrix A ↑b) (↑(Basis.equivFun b) z) i = ↑(trace A B) (z * ↑b i)\n[PROOFSTEP]\nrw [← col_apply ((traceMatrix A b).mulVec (b.equivFun z)) i Unit.unit, col_mulVec, Matrix.mul_apply, traceMatrix]\n[GOAL]\ncase h\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁸ : CommRing R\ninst✝¹⁷ : CommRing S\ninst✝¹⁶ : CommRing T\ninst✝¹⁵ : Algebra R S\ninst✝¹⁴ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra K L\nι κ : Type w\ninst✝¹⁰ : Fintype ι\nF : Type u_6\ninst✝⁹ : Field F\ninst✝⁸ : Algebra R L\ninst✝⁷ : Algebra L F\ninst✝⁶ : Algebra R F\ninst✝⁵ : IsScalarTower R L F\nA : Type u\nB : Type v\nC : Type z\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : Algebra A B\ninst✝¹ : CommRing C\ninst✝ : Algebra A C\nb : Basis ι A B\nz : B\ni : ι\n⊢ ∑ j : ι, ↑of (fun i j => BilinForm.bilin (traceForm A B) (↑b i) (↑b j)) i j * col (↑(Basis.equivFun b) z) j () =\n    ↑(trace A B) (z * ↑b i)\n[PROOFSTEP]\nsimp only [col_apply, traceForm_apply]\n[GOAL]\ncase h\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁸ : CommRing R\ninst✝¹⁷ : CommRing S\ninst✝¹⁶ : CommRing T\ninst✝¹⁵ : Algebra R S\ninst✝¹⁴ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra K L\nι κ : Type w\ninst✝¹⁰ : Fintype ι\nF : Type u_6\ninst✝⁹ : Field F\ninst✝⁸ : Algebra R L\ninst✝⁷ : Algebra L F\ninst✝⁶ : Algebra R F\ninst✝⁵ : IsScalarTower R L F\nA : Type u\nB : Type v\nC : Type z\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : Algebra A B\ninst✝¹ : CommRing C\ninst✝ : Algebra A C\nb : Basis ι A B\nz : B\ni : ι\n⊢ ∑ x : ι, ↑of (fun i j => ↑(trace A B) (↑b i * ↑b j)) i x * ↑(Basis.equivFun b) z x = ↑(trace A B) (z * ↑b i)\n[PROOFSTEP]\nconv_lhs =>\n  congr\n  rfl\n  ext\n  rw [mul_comm _ (b.equivFun z _), ← smul_eq_mul, of_apply, ← LinearMap.map_smul]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁸ : CommRing R\ninst✝¹⁷ : CommRing S\ninst✝¹⁶ : CommRing T\ninst✝¹⁵ : Algebra R S\ninst✝¹⁴ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra K L\nι κ : Type w\ninst✝¹⁰ : Fintype ι\nF : Type u_6\ninst✝⁹ : Field F\ninst✝⁸ : Algebra R L\ninst✝⁷ : Algebra L F\ninst✝⁶ : Algebra R F\ninst✝⁵ : IsScalarTower R L F\nA : Type u\nB : Type v\nC : Type z\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : Algebra A B\ninst✝¹ : CommRing C\ninst✝ : Algebra A C\nb : Basis ι A B\nz : B\ni : ι\n| ∑ x : ι, ↑of (fun i j => ↑(trace A B) (↑b i * ↑b j)) i x * ↑(Basis.equivFun b) z x\n[PROOFSTEP]\n  congr\n  rfl\n  ext\n  rw [mul_comm _ (b.equivFun z _), ← smul_eq_mul, of_apply, ← LinearMap.map_smul]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁸ : CommRing R\ninst✝¹⁷ : CommRing S\ninst✝¹⁶ : CommRing T\ninst✝¹⁵ : Algebra R S\ninst✝¹⁴ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra K L\nι κ : Type w\ninst✝¹⁰ : Fintype ι\nF : Type u_6\ninst✝⁹ : Field F\ninst✝⁸ : Algebra R L\ninst✝⁷ : Algebra L F\ninst✝⁶ : Algebra R F\ninst✝⁵ : IsScalarTower R L F\nA : Type u\nB : Type v\nC : Type z\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : Algebra A B\ninst✝¹ : CommRing C\ninst✝ : Algebra A C\nb : Basis ι A B\nz : B\ni : ι\n| ∑ x : ι, ↑of (fun i j => ↑(trace A B) (↑b i * ↑b j)) i x * ↑(Basis.equivFun b) z x\n[PROOFSTEP]\n  congr\n  rfl\n  ext\n  rw [mul_comm _ (b.equivFun z _), ← smul_eq_mul, of_apply, ← LinearMap.map_smul]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁸ : CommRing R\ninst✝¹⁷ : CommRing S\ninst✝¹⁶ : CommRing T\ninst✝¹⁵ : Algebra R S\ninst✝¹⁴ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra K L\nι κ : Type w\ninst✝¹⁰ : Fintype ι\nF : Type u_6\ninst✝⁹ : Field F\ninst✝⁸ : Algebra R L\ninst✝⁷ : Algebra L F\ninst✝⁶ : Algebra R F\ninst✝⁵ : IsScalarTower R L F\nA : Type u\nB : Type v\nC : Type z\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : Algebra A B\ninst✝¹ : CommRing C\ninst✝ : Algebra A C\nb : Basis ι A B\nz : B\ni : ι\n| ∑ x : ι, ↑of (fun i j => ↑(trace A B) (↑b i * ↑b j)) i x * ↑(Basis.equivFun b) z x\n[PROOFSTEP]\ncongr\n[GOAL]\ncase s\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁸ : CommRing R\ninst✝¹⁷ : CommRing S\ninst✝¹⁶ : CommRing T\ninst✝¹⁵ : Algebra R S\ninst✝¹⁴ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra K L\nι κ : Type w\ninst✝¹⁰ : Fintype ι\nF : Type u_6\ninst✝⁹ : Field F\ninst✝⁸ : Algebra R L\ninst✝⁷ : Algebra L F\ninst✝⁶ : Algebra R F\ninst✝⁵ : IsScalarTower R L F\nA : Type u\nB : Type v\nC : Type z\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : Algebra A B\ninst✝¹ : CommRing C\ninst✝ : Algebra A C\nb : Basis ι A B\nz : B\ni : ι\n| univ\ncase f\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁸ : CommRing R\ninst✝¹⁷ : CommRing S\ninst✝¹⁶ : CommRing T\ninst✝¹⁵ : Algebra R S\ninst✝¹⁴ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra K L\nι κ : Type w\ninst✝¹⁰ : Fintype ι\nF : Type u_6\ninst✝⁹ : Field F\ninst✝⁸ : Algebra R L\ninst✝⁷ : Algebra L F\ninst✝⁶ : Algebra R F\ninst✝⁵ : IsScalarTower R L F\nA : Type u\nB : Type v\nC : Type z\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : Algebra A B\ninst✝¹ : CommRing C\ninst✝ : Algebra A C\nb : Basis ι A B\nz : B\ni : ι\n| fun x => ↑of (fun i j => ↑(trace A B) (↑b i * ↑b j)) i x * ↑(Basis.equivFun b) z x\n[PROOFSTEP]\nrfl\n[GOAL]\ncase f\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁸ : CommRing R\ninst✝¹⁷ : CommRing S\ninst✝¹⁶ : CommRing T\ninst✝¹⁵ : Algebra R S\ninst✝¹⁴ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra K L\nι κ : Type w\ninst✝¹⁰ : Fintype ι\nF : Type u_6\ninst✝⁹ : Field F\ninst✝⁸ : Algebra R L\ninst✝⁷ : Algebra L F\ninst✝⁶ : Algebra R F\ninst✝⁵ : IsScalarTower R L F\nA : Type u\nB : Type v\nC : Type z\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : Algebra A B\ninst✝¹ : CommRing C\ninst✝ : Algebra A C\nb : Basis ι A B\nz : B\ni : ι\n| fun x => ↑of (fun i j => ↑(trace A B) (↑b i * ↑b j)) i x * ↑(Basis.equivFun b) z x\n[PROOFSTEP]\next\n[GOAL]\ncase f.h\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁸ : CommRing R\ninst✝¹⁷ : CommRing S\ninst✝¹⁶ : CommRing T\ninst✝¹⁵ : Algebra R S\ninst✝¹⁴ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra K L\nι κ : Type w\ninst✝¹⁰ : Fintype ι\nF : Type u_6\ninst✝⁹ : Field F\ninst✝⁸ : Algebra R L\ninst✝⁷ : Algebra L F\ninst✝⁶ : Algebra R F\ninst✝⁵ : IsScalarTower R L F\nA : Type u\nB : Type v\nC : Type z\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : Algebra A B\ninst✝¹ : CommRing C\ninst✝ : Algebra A C\nb : Basis ι A B\nz : B\ni x✝ : ι\n| ↑of (fun i j => ↑(trace A B) (↑b i * ↑b j)) i x✝ * ↑(Basis.equivFun b) z x✝\n[PROOFSTEP]\nrw [mul_comm _ (b.equivFun z _), ← smul_eq_mul, of_apply, ← LinearMap.map_smul]\n[GOAL]\ncase h\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁸ : CommRing R\ninst✝¹⁷ : CommRing S\ninst✝¹⁶ : CommRing T\ninst✝¹⁵ : Algebra R S\ninst✝¹⁴ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra K L\nι κ : Type w\ninst✝¹⁰ : Fintype ι\nF : Type u_6\ninst✝⁹ : Field F\ninst✝⁸ : Algebra R L\ninst✝⁷ : Algebra L F\ninst✝⁶ : Algebra R F\ninst✝⁵ : IsScalarTower R L F\nA : Type u\nB : Type v\nC : Type z\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : Algebra A B\ninst✝¹ : CommRing C\ninst✝ : Algebra A C\nb : Basis ι A B\nz : B\ni : ι\n⊢ ∑ x : ι, ↑(trace A B) (↑(Basis.equivFun b) z x • (↑b i * ↑b x)) = ↑(trace A B) (z * ↑b i)\n[PROOFSTEP]\nrw [← LinearMap.map_sum]\n[GOAL]\ncase h\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁸ : CommRing R\ninst✝¹⁷ : CommRing S\ninst✝¹⁶ : CommRing T\ninst✝¹⁵ : Algebra R S\ninst✝¹⁴ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra K L\nι κ : Type w\ninst✝¹⁰ : Fintype ι\nF : Type u_6\ninst✝⁹ : Field F\ninst✝⁸ : Algebra R L\ninst✝⁷ : Algebra L F\ninst✝⁶ : Algebra R F\ninst✝⁵ : IsScalarTower R L F\nA : Type u\nB : Type v\nC : Type z\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : Algebra A B\ninst✝¹ : CommRing C\ninst✝ : Algebra A C\nb : Basis ι A B\nz : B\ni : ι\n⊢ ↑(trace A B) (∑ i_1 : ι, ↑(Basis.equivFun b) z i_1 • (↑b i * ↑b i_1)) = ↑(trace A B) (z * ↑b i)\n[PROOFSTEP]\ncongr\n[GOAL]\ncase h.h.e_6.h\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁸ : CommRing R\ninst✝¹⁷ : CommRing S\ninst✝¹⁶ : CommRing T\ninst✝¹⁵ : Algebra R S\ninst✝¹⁴ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra K L\nι κ : Type w\ninst✝¹⁰ : Fintype ι\nF : Type u_6\ninst✝⁹ : Field F\ninst✝⁸ : Algebra R L\ninst✝⁷ : Algebra L F\ninst✝⁶ : Algebra R F\ninst✝⁵ : IsScalarTower R L F\nA : Type u\nB : Type v\nC : Type z\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : Algebra A B\ninst✝¹ : CommRing C\ninst✝ : Algebra A C\nb : Basis ι A B\nz : B\ni : ι\n⊢ ∑ i_1 : ι, ↑(Basis.equivFun b) z i_1 • (↑b i * ↑b i_1) = z * ↑b i\n[PROOFSTEP]\nconv_lhs =>\n  congr\n  rfl\n  ext\n  rw [← mul_smul_comm]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁸ : CommRing R\ninst✝¹⁷ : CommRing S\ninst✝¹⁶ : CommRing T\ninst✝¹⁵ : Algebra R S\ninst✝¹⁴ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra K L\nι κ : Type w\ninst✝¹⁰ : Fintype ι\nF : Type u_6\ninst✝⁹ : Field F\ninst✝⁸ : Algebra R L\ninst✝⁷ : Algebra L F\ninst✝⁶ : Algebra R F\ninst✝⁵ : IsScalarTower R L F\nA : Type u\nB : Type v\nC : Type z\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : Algebra A B\ninst✝¹ : CommRing C\ninst✝ : Algebra A C\nb : Basis ι A B\nz : B\ni : ι\n| ∑ i_1 : ι, ↑(Basis.equivFun b) z i_1 • (↑b i * ↑b i_1)\n[PROOFSTEP]\n  congr\n  rfl\n  ext\n  rw [← mul_smul_comm]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁸ : CommRing R\ninst✝¹⁷ : CommRing S\ninst✝¹⁶ : CommRing T\ninst✝¹⁵ : Algebra R S\ninst✝¹⁴ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra K L\nι κ : Type w\ninst✝¹⁰ : Fintype ι\nF : Type u_6\ninst✝⁹ : Field F\ninst✝⁸ : Algebra R L\ninst✝⁷ : Algebra L F\ninst✝⁶ : Algebra R F\ninst✝⁵ : IsScalarTower R L F\nA : Type u\nB : Type v\nC : Type z\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : Algebra A B\ninst✝¹ : CommRing C\ninst✝ : Algebra A C\nb : Basis ι A B\nz : B\ni : ι\n| ∑ i_1 : ι, ↑(Basis.equivFun b) z i_1 • (↑b i * ↑b i_1)\n[PROOFSTEP]\n  congr\n  rfl\n  ext\n  rw [← mul_smul_comm]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁸ : CommRing R\ninst✝¹⁷ : CommRing S\ninst✝¹⁶ : CommRing T\ninst✝¹⁵ : Algebra R S\ninst✝¹⁴ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra K L\nι κ : Type w\ninst✝¹⁰ : Fintype ι\nF : Type u_6\ninst✝⁹ : Field F\ninst✝⁸ : Algebra R L\ninst✝⁷ : Algebra L F\ninst✝⁶ : Algebra R F\ninst✝⁵ : IsScalarTower R L F\nA : Type u\nB : Type v\nC : Type z\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : Algebra A B\ninst✝¹ : CommRing C\ninst✝ : Algebra A C\nb : Basis ι A B\nz : B\ni : ι\n| ∑ i_1 : ι, ↑(Basis.equivFun b) z i_1 • (↑b i * ↑b i_1)\n[PROOFSTEP]\ncongr\n[GOAL]\ncase s\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁸ : CommRing R\ninst✝¹⁷ : CommRing S\ninst✝¹⁶ : CommRing T\ninst✝¹⁵ : Algebra R S\ninst✝¹⁴ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra K L\nι κ : Type w\ninst✝¹⁰ : Fintype ι\nF : Type u_6\ninst✝⁹ : Field F\ninst✝⁸ : Algebra R L\ninst✝⁷ : Algebra L F\ninst✝⁶ : Algebra R F\ninst✝⁵ : IsScalarTower R L F\nA : Type u\nB : Type v\nC : Type z\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : Algebra A B\ninst✝¹ : CommRing C\ninst✝ : Algebra A C\nb : Basis ι A B\nz : B\ni : ι\n| univ\ncase f\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁸ : CommRing R\ninst✝¹⁷ : CommRing S\ninst✝¹⁶ : CommRing T\ninst✝¹⁵ : Algebra R S\ninst✝¹⁴ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra K L\nι κ : Type w\ninst✝¹⁰ : Fintype ι\nF : Type u_6\ninst✝⁹ : Field F\ninst✝⁸ : Algebra R L\ninst✝⁷ : Algebra L F\ninst✝⁶ : Algebra R F\ninst✝⁵ : IsScalarTower R L F\nA : Type u\nB : Type v\nC : Type z\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : Algebra A B\ninst✝¹ : CommRing C\ninst✝ : Algebra A C\nb : Basis ι A B\nz : B\ni : ι\n| fun i_1 => ↑(Basis.equivFun b) z i_1 • (↑b i * ↑b i_1)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase f\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁸ : CommRing R\ninst✝¹⁷ : CommRing S\ninst✝¹⁶ : CommRing T\ninst✝¹⁵ : Algebra R S\ninst✝¹⁴ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra K L\nι κ : Type w\ninst✝¹⁰ : Fintype ι\nF : Type u_6\ninst✝⁹ : Field F\ninst✝⁸ : Algebra R L\ninst✝⁷ : Algebra L F\ninst✝⁶ : Algebra R F\ninst✝⁵ : IsScalarTower R L F\nA : Type u\nB : Type v\nC : Type z\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : Algebra A B\ninst✝¹ : CommRing C\ninst✝ : Algebra A C\nb : Basis ι A B\nz : B\ni : ι\n| fun i_1 => ↑(Basis.equivFun b) z i_1 • (↑b i * ↑b i_1)\n[PROOFSTEP]\next\n[GOAL]\ncase f.h\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁸ : CommRing R\ninst✝¹⁷ : CommRing S\ninst✝¹⁶ : CommRing T\ninst✝¹⁵ : Algebra R S\ninst✝¹⁴ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra K L\nι κ : Type w\ninst✝¹⁰ : Fintype ι\nF : Type u_6\ninst✝⁹ : Field F\ninst✝⁸ : Algebra R L\ninst✝⁷ : Algebra L F\ninst✝⁶ : Algebra R F\ninst✝⁵ : IsScalarTower R L F\nA : Type u\nB : Type v\nC : Type z\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : Algebra A B\ninst✝¹ : CommRing C\ninst✝ : Algebra A C\nb : Basis ι A B\nz : B\ni x✝ : ι\n| ↑(Basis.equivFun b) z x✝ • (↑b i * ↑b x✝)\n[PROOFSTEP]\nrw [← mul_smul_comm]\n[GOAL]\ncase h.h.e_6.h\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁸ : CommRing R\ninst✝¹⁷ : CommRing S\ninst✝¹⁶ : CommRing T\ninst✝¹⁵ : Algebra R S\ninst✝¹⁴ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra K L\nι κ : Type w\ninst✝¹⁰ : Fintype ι\nF : Type u_6\ninst✝⁹ : Field F\ninst✝⁸ : Algebra R L\ninst✝⁷ : Algebra L F\ninst✝⁶ : Algebra R F\ninst✝⁵ : IsScalarTower R L F\nA : Type u\nB : Type v\nC : Type z\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : Algebra A B\ninst✝¹ : CommRing C\ninst✝ : Algebra A C\nb : Basis ι A B\nz : B\ni : ι\n⊢ ∑ x : ι, ↑b i * ↑(Basis.equivFun b) z x • ↑b x = z * ↑b i\n[PROOFSTEP]\nrw [← Finset.mul_sum, mul_comm z]\n[GOAL]\ncase h.h.e_6.h\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁸ : CommRing R\ninst✝¹⁷ : CommRing S\ninst✝¹⁶ : CommRing T\ninst✝¹⁵ : Algebra R S\ninst✝¹⁴ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra K L\nι κ : Type w\ninst✝¹⁰ : Fintype ι\nF : Type u_6\ninst✝⁹ : Field F\ninst✝⁸ : Algebra R L\ninst✝⁷ : Algebra L F\ninst✝⁶ : Algebra R F\ninst✝⁵ : IsScalarTower R L F\nA : Type u\nB : Type v\nC : Type z\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : Algebra A B\ninst✝¹ : CommRing C\ninst✝ : Algebra A C\nb : Basis ι A B\nz : B\ni : ι\n⊢ ↑b i * ∑ x : ι, ↑(Basis.equivFun b) z x • ↑b x = ↑b i * z\n[PROOFSTEP]\ncongr\n[GOAL]\ncase h.h.e_6.h.e_a\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁸ : CommRing R\ninst✝¹⁷ : CommRing S\ninst✝¹⁶ : CommRing T\ninst✝¹⁵ : Algebra R S\ninst✝¹⁴ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra K L\nι κ : Type w\ninst✝¹⁰ : Fintype ι\nF : Type u_6\ninst✝⁹ : Field F\ninst✝⁸ : Algebra R L\ninst✝⁷ : Algebra L F\ninst✝⁶ : Algebra R F\ninst✝⁵ : IsScalarTower R L F\nA : Type u\nB : Type v\nC : Type z\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : Algebra A B\ninst✝¹ : CommRing C\ninst✝ : Algebra A C\nb : Basis ι A B\nz : B\ni : ι\n⊢ ∑ x : ι, ↑(Basis.equivFun b) z x • ↑b x = z\n[PROOFSTEP]\nrw [b.sum_equivFun]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁸ : CommRing R\ninst✝¹⁷ : CommRing S\ninst✝¹⁶ : CommRing T\ninst✝¹⁵ : Algebra R S\ninst✝¹⁴ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra K L\nι κ : Type w\ninst✝¹⁰ : Fintype ι\nF : Type u_6\ninst✝⁹ : Field F\ninst✝⁸ : Algebra R L\ninst✝⁷ : Algebra L F\ninst✝⁶ : Algebra R F\ninst✝⁵ : IsScalarTower R L F\nA : Type u\nB : Type v\nC : Type z\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : Algebra A B\ninst✝¹ : CommRing C\ninst✝ : Algebra A C\npb : PowerBasis A B\ne : Fin pb.dim ≃ (B →ₐ[A] C)\n⊢ embeddingsMatrixReindex A C (↑pb.basis) e = (vandermonde fun i => ↑(↑e i) pb.gen)ᵀ\n[PROOFSTEP]\next i j\n[GOAL]\ncase a.h\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁸ : CommRing R\ninst✝¹⁷ : CommRing S\ninst✝¹⁶ : CommRing T\ninst✝¹⁵ : Algebra R S\ninst✝¹⁴ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹³ : Field K\ninst✝¹² : Field L\ninst✝¹¹ : Algebra K L\nι κ : Type w\ninst✝¹⁰ : Fintype ι\nF : Type u_6\ninst✝⁹ : Field F\ninst✝⁸ : Algebra R L\ninst✝⁷ : Algebra L F\ninst✝⁶ : Algebra R F\ninst✝⁵ : IsScalarTower R L F\nA : Type u\nB : Type v\nC : Type z\ninst✝⁴ : CommRing A\ninst✝³ : CommRing B\ninst✝² : Algebra A B\ninst✝¹ : CommRing C\ninst✝ : Algebra A C\npb : PowerBasis A B\ne : Fin pb.dim ≃ (B →ₐ[A] C)\ni j : Fin pb.dim\n⊢ embeddingsMatrixReindex A C (↑pb.basis) e i j = (vandermonde fun i => ↑(↑e i) pb.gen)ᵀ i j\n[PROOFSTEP]\nsimp [embeddingsMatrixReindex, embeddingsMatrix]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝²³ : CommRing R\ninst✝²² : CommRing S\ninst✝²¹ : CommRing T\ninst✝²⁰ : Algebra R S\ninst✝¹⁹ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹⁸ : Field K\ninst✝¹⁷ : Field L\ninst✝¹⁶ : Algebra K L\nι κ : Type w\ninst✝¹⁵ : Fintype ι\nF : Type u_6\ninst✝¹⁴ : Field F\ninst✝¹³ : Algebra R L\ninst✝¹² : Algebra L F\ninst✝¹¹ : Algebra R F\ninst✝¹⁰ : IsScalarTower R L F\nA : Type u\nB : Type v\nC : Type z\ninst✝⁹ : CommRing A\ninst✝⁸ : CommRing B\ninst✝⁷ : Algebra A B\ninst✝⁶ : CommRing C\ninst✝⁵ : Algebra A C\nE : Type z\ninst✝⁴ : Field E\ninst✝³ : Algebra K E\ninst✝² : Module.Finite K L\ninst✝¹ : IsSeparable K L\ninst✝ : IsAlgClosed E\nb : κ → L\npb : PowerBasis K L\n⊢ Matrix.map (traceMatrix K b) ↑(algebraMap K E) = embeddingsMatrix K E b * (embeddingsMatrix K E b)ᵀ\n[PROOFSTEP]\next (i j)\n[GOAL]\ncase a.h\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝²³ : CommRing R\ninst✝²² : CommRing S\ninst✝²¹ : CommRing T\ninst✝²⁰ : Algebra R S\ninst✝¹⁹ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹⁸ : Field K\ninst✝¹⁷ : Field L\ninst✝¹⁶ : Algebra K L\nι κ : Type w\ninst✝¹⁵ : Fintype ι\nF : Type u_6\ninst✝¹⁴ : Field F\ninst✝¹³ : Algebra R L\ninst✝¹² : Algebra L F\ninst✝¹¹ : Algebra R F\ninst✝¹⁰ : IsScalarTower R L F\nA : Type u\nB : Type v\nC : Type z\ninst✝⁹ : CommRing A\ninst✝⁸ : CommRing B\ninst✝⁷ : Algebra A B\ninst✝⁶ : CommRing C\ninst✝⁵ : Algebra A C\nE : Type z\ninst✝⁴ : Field E\ninst✝³ : Algebra K E\ninst✝² : Module.Finite K L\ninst✝¹ : IsSeparable K L\ninst✝ : IsAlgClosed E\nb : κ → L\npb : PowerBasis K L\ni j : κ\n⊢ Matrix.map (traceMatrix K b) (↑(algebraMap K E)) i j = (embeddingsMatrix K E b * (embeddingsMatrix K E b)ᵀ) i j\n[PROOFSTEP]\nsimp [trace_eq_sum_embeddings, embeddingsMatrix, Matrix.mul_apply]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝²⁴ : CommRing R\ninst✝²³ : CommRing S\ninst✝²² : CommRing T\ninst✝²¹ : Algebra R S\ninst✝²⁰ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹⁹ : Field K\ninst✝¹⁸ : Field L\ninst✝¹⁷ : Algebra K L\nι κ : Type w\ninst✝¹⁶ : Fintype ι\nF : Type u_6\ninst✝¹⁵ : Field F\ninst✝¹⁴ : Algebra R L\ninst✝¹³ : Algebra L F\ninst✝¹² : Algebra R F\ninst✝¹¹ : IsScalarTower R L F\nA : Type u\nB : Type v\nC : Type z\ninst✝¹⁰ : CommRing A\ninst✝⁹ : CommRing B\ninst✝⁸ : Algebra A B\ninst✝⁷ : CommRing C\ninst✝⁶ : Algebra A C\nE : Type z\ninst✝⁵ : Field E\ninst✝⁴ : Algebra K E\ninst✝³ : Module.Finite K L\ninst✝² : IsSeparable K L\ninst✝¹ : IsAlgClosed E\nb : κ → L\npb : PowerBasis K L\ninst✝ : Fintype κ\ne : κ ≃ (L →ₐ[K] E)\n⊢ Matrix.map (traceMatrix K b) ↑(algebraMap K E) = embeddingsMatrixReindex K E b e * (embeddingsMatrixReindex K E b e)ᵀ\n[PROOFSTEP]\nrw [traceMatrix_eq_embeddingsMatrix_mul_trans, embeddingsMatrixReindex, reindex_apply, transpose_submatrix, ←\n  submatrix_mul_transpose_submatrix, ← Equiv.coe_refl, Equiv.refl_symm]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁴ : CommRing R\ninst✝¹³ : CommRing S\ninst✝¹² : CommRing T\ninst✝¹¹ : Algebra R S\ninst✝¹⁰ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : Algebra K L\nι κ : Type w\ninst✝⁶ : Fintype ι\nF : Type u_6\ninst✝⁵ : Field F\ninst✝⁴ : Algebra R L\ninst✝³ : Algebra L F\ninst✝² : Algebra R F\ninst✝¹ : IsScalarTower R L F\npb : PowerBasis K L\ninst✝ : IsSeparable K L\n⊢ det (traceMatrix K ↑pb.basis) ≠ 0\n[PROOFSTEP]\nsuffices algebraMap K (AlgebraicClosure L) (det (traceMatrix K pb.basis)) ≠ 0\n  by\n  refine' mt (fun ht => _) this\n  rw [ht, RingHom.map_zero]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁴ : CommRing R\ninst✝¹³ : CommRing S\ninst✝¹² : CommRing T\ninst✝¹¹ : Algebra R S\ninst✝¹⁰ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : Algebra K L\nι κ : Type w\ninst✝⁶ : Fintype ι\nF : Type u_6\ninst✝⁵ : Field F\ninst✝⁴ : Algebra R L\ninst✝³ : Algebra L F\ninst✝² : Algebra R F\ninst✝¹ : IsScalarTower R L F\npb : PowerBasis K L\ninst✝ : IsSeparable K L\nthis : ↑(algebraMap K (AlgebraicClosure L)) (det (traceMatrix K ↑pb.basis)) ≠ 0\n⊢ det (traceMatrix K ↑pb.basis) ≠ 0\n[PROOFSTEP]\nrefine' mt (fun ht => _) this\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁴ : CommRing R\ninst✝¹³ : CommRing S\ninst✝¹² : CommRing T\ninst✝¹¹ : Algebra R S\ninst✝¹⁰ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : Algebra K L\nι κ : Type w\ninst✝⁶ : Fintype ι\nF : Type u_6\ninst✝⁵ : Field F\ninst✝⁴ : Algebra R L\ninst✝³ : Algebra L F\ninst✝² : Algebra R F\ninst✝¹ : IsScalarTower R L F\npb : PowerBasis K L\ninst✝ : IsSeparable K L\nthis : ↑(algebraMap K (AlgebraicClosure L)) (det (traceMatrix K ↑pb.basis)) ≠ 0\nht : det (traceMatrix K ↑pb.basis) = 0\n⊢ ↑(algebraMap K (AlgebraicClosure L)) (det (traceMatrix K ↑pb.basis)) = 0\n[PROOFSTEP]\nrw [ht, RingHom.map_zero]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁴ : CommRing R\ninst✝¹³ : CommRing S\ninst✝¹² : CommRing T\ninst✝¹¹ : Algebra R S\ninst✝¹⁰ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : Algebra K L\nι κ : Type w\ninst✝⁶ : Fintype ι\nF : Type u_6\ninst✝⁵ : Field F\ninst✝⁴ : Algebra R L\ninst✝³ : Algebra L F\ninst✝² : Algebra R F\ninst✝¹ : IsScalarTower R L F\npb : PowerBasis K L\ninst✝ : IsSeparable K L\n⊢ ↑(algebraMap K (AlgebraicClosure L)) (det (traceMatrix K ↑pb.basis)) ≠ 0\n[PROOFSTEP]\nhaveI : FiniteDimensional K L := pb.finiteDimensional\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁴ : CommRing R\ninst✝¹³ : CommRing S\ninst✝¹² : CommRing T\ninst✝¹¹ : Algebra R S\ninst✝¹⁰ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : Algebra K L\nι κ : Type w\ninst✝⁶ : Fintype ι\nF : Type u_6\ninst✝⁵ : Field F\ninst✝⁴ : Algebra R L\ninst✝³ : Algebra L F\ninst✝² : Algebra R F\ninst✝¹ : IsScalarTower R L F\npb : PowerBasis K L\ninst✝ : IsSeparable K L\nthis : FiniteDimensional K L\n⊢ ↑(algebraMap K (AlgebraicClosure L)) (det (traceMatrix K ↑pb.basis)) ≠ 0\n[PROOFSTEP]\nlet e : Fin pb.dim ≃ (L →ₐ[K] AlgebraicClosure L) := (Fintype.equivFinOfCardEq ?_).symm\n[GOAL]\ncase refine_2\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁴ : CommRing R\ninst✝¹³ : CommRing S\ninst✝¹² : CommRing T\ninst✝¹¹ : Algebra R S\ninst✝¹⁰ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : Algebra K L\nι κ : Type w\ninst✝⁶ : Fintype ι\nF : Type u_6\ninst✝⁵ : Field F\ninst✝⁴ : Algebra R L\ninst✝³ : Algebra L F\ninst✝² : Algebra R F\ninst✝¹ : IsScalarTower R L F\npb : PowerBasis K L\ninst✝ : IsSeparable K L\nthis : FiniteDimensional K L\ne : Fin pb.dim ≃ (L →ₐ[K] AlgebraicClosure L) := (Fintype.equivFinOfCardEq ?refine_1).symm\n⊢ ↑(algebraMap K (AlgebraicClosure L)) (det (traceMatrix K ↑pb.basis)) ≠ 0\ncase refine_1\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁴ : CommRing R\ninst✝¹³ : CommRing S\ninst✝¹² : CommRing T\ninst✝¹¹ : Algebra R S\ninst✝¹⁰ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : Algebra K L\nι κ : Type w\ninst✝⁶ : Fintype ι\nF : Type u_6\ninst✝⁵ : Field F\ninst✝⁴ : Algebra R L\ninst✝³ : Algebra L F\ninst✝² : Algebra R F\ninst✝¹ : IsScalarTower R L F\npb : PowerBasis K L\ninst✝ : IsSeparable K L\nthis : FiniteDimensional K L\n⊢ Fintype.card (L →ₐ[K] AlgebraicClosure L) = pb.dim\n[PROOFSTEP]\nrw [RingHom.map_det, RingHom.mapMatrix_apply, traceMatrix_eq_embeddingsMatrixReindex_mul_trans K _ _ e,\n  embeddingsMatrixReindex_eq_vandermonde, det_mul, det_transpose]\n  -- Porting note: the following is necessary.\n[GOAL]\ncase refine_2\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁴ : CommRing R\ninst✝¹³ : CommRing S\ninst✝¹² : CommRing T\ninst✝¹¹ : Algebra R S\ninst✝¹⁰ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : Algebra K L\nι κ : Type w\ninst✝⁶ : Fintype ι\nF : Type u_6\ninst✝⁵ : Field F\ninst✝⁴ : Algebra R L\ninst✝³ : Algebra L F\ninst✝² : Algebra R F\ninst✝¹ : IsScalarTower R L F\npb : PowerBasis K L\ninst✝ : IsSeparable K L\nthis : FiniteDimensional K L\ne : Fin pb.dim ≃ (L →ₐ[K] AlgebraicClosure L) := (Fintype.equivFinOfCardEq ?refine_1).symm\n⊢ det (vandermonde fun i => ↑(↑e i) pb.gen) * det (vandermonde fun i => ↑(↑e i) pb.gen)ᵀᵀ ≠ 0\ncase refine_1\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁴ : CommRing R\ninst✝¹³ : CommRing S\ninst✝¹² : CommRing T\ninst✝¹¹ : Algebra R S\ninst✝¹⁰ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : Algebra K L\nι κ : Type w\ninst✝⁶ : Fintype ι\nF : Type u_6\ninst✝⁵ : Field F\ninst✝⁴ : Algebra R L\ninst✝³ : Algebra L F\ninst✝² : Algebra R F\ninst✝¹ : IsScalarTower R L F\npb : PowerBasis K L\ninst✝ : IsSeparable K L\nthis : FiniteDimensional K L\n⊢ Fintype.card (L →ₐ[K] AlgebraicClosure L) = pb.dim\n[PROOFSTEP]\nhaveI := IsDomain.to_noZeroDivisors (AlgebraicClosure L)\n[GOAL]\ncase refine_2\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁴ : CommRing R\ninst✝¹³ : CommRing S\ninst✝¹² : CommRing T\ninst✝¹¹ : Algebra R S\ninst✝¹⁰ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : Algebra K L\nι κ : Type w\ninst✝⁶ : Fintype ι\nF : Type u_6\ninst✝⁵ : Field F\ninst✝⁴ : Algebra R L\ninst✝³ : Algebra L F\ninst✝² : Algebra R F\ninst✝¹ : IsScalarTower R L F\npb : PowerBasis K L\ninst✝ : IsSeparable K L\nthis✝ : FiniteDimensional K L\ne : Fin pb.dim ≃ (L →ₐ[K] AlgebraicClosure L) := (Fintype.equivFinOfCardEq ?refine_1).symm\nthis : NoZeroDivisors (AlgebraicClosure L)\n⊢ det (vandermonde fun i => ↑(↑e i) pb.gen) * det (vandermonde fun i => ↑(↑e i) pb.gen)ᵀᵀ ≠ 0\ncase refine_1\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁴ : CommRing R\ninst✝¹³ : CommRing S\ninst✝¹² : CommRing T\ninst✝¹¹ : Algebra R S\ninst✝¹⁰ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : Algebra K L\nι κ : Type w\ninst✝⁶ : Fintype ι\nF : Type u_6\ninst✝⁵ : Field F\ninst✝⁴ : Algebra R L\ninst✝³ : Algebra L F\ninst✝² : Algebra R F\ninst✝¹ : IsScalarTower R L F\npb : PowerBasis K L\ninst✝ : IsSeparable K L\nthis : FiniteDimensional K L\n⊢ Fintype.card (L →ₐ[K] AlgebraicClosure L) = pb.dim\n[PROOFSTEP]\nrefine' mt mul_self_eq_zero.mp _\n[GOAL]\ncase refine_2\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁴ : CommRing R\ninst✝¹³ : CommRing S\ninst✝¹² : CommRing T\ninst✝¹¹ : Algebra R S\ninst✝¹⁰ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : Algebra K L\nι κ : Type w\ninst✝⁶ : Fintype ι\nF : Type u_6\ninst✝⁵ : Field F\ninst✝⁴ : Algebra R L\ninst✝³ : Algebra L F\ninst✝² : Algebra R F\ninst✝¹ : IsScalarTower R L F\npb : PowerBasis K L\ninst✝ : IsSeparable K L\nthis✝ : FiniteDimensional K L\ne : Fin pb.dim ≃ (L →ₐ[K] AlgebraicClosure L) := (Fintype.equivFinOfCardEq ?refine_1).symm\nthis : NoZeroDivisors (AlgebraicClosure L)\n⊢ ¬det (vandermonde fun i => ↑(↑e i) pb.gen) = 0\n[PROOFSTEP]\nsimp only [det_vandermonde, Finset.prod_eq_zero_iff, not_exists, sub_eq_zero]\n[GOAL]\ncase refine_2\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁴ : CommRing R\ninst✝¹³ : CommRing S\ninst✝¹² : CommRing T\ninst✝¹¹ : Algebra R S\ninst✝¹⁰ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : Algebra K L\nι κ : Type w\ninst✝⁶ : Fintype ι\nF : Type u_6\ninst✝⁵ : Field F\ninst✝⁴ : Algebra R L\ninst✝³ : Algebra L F\ninst✝² : Algebra R F\ninst✝¹ : IsScalarTower R L F\npb : PowerBasis K L\ninst✝ : IsSeparable K L\nthis✝ : FiniteDimensional K L\ne : Fin pb.dim ≃ (L →ₐ[K] AlgebraicClosure L) := (Fintype.equivFinOfCardEq ?refine_1).symm\nthis : NoZeroDivisors (AlgebraicClosure L)\n⊢ ∀ (x : Fin pb.dim),\n    ¬(x ∈ Finset.univ ∧\n        ∃ a,\n          a ∈ Finset.Ioi x ∧\n            ↑(↑(Fintype.equivFinOfCardEq ?refine_1).symm a) pb.gen =\n              ↑(↑(Fintype.equivFinOfCardEq ?refine_1).symm x) pb.gen)\n[PROOFSTEP]\nrintro i ⟨_, j, hij, h⟩\n[GOAL]\ncase refine_2.intro.intro.intro\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁴ : CommRing R\ninst✝¹³ : CommRing S\ninst✝¹² : CommRing T\ninst✝¹¹ : Algebra R S\ninst✝¹⁰ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : Algebra K L\nι κ : Type w\ninst✝⁶ : Fintype ι\nF : Type u_6\ninst✝⁵ : Field F\ninst✝⁴ : Algebra R L\ninst✝³ : Algebra L F\ninst✝² : Algebra R F\ninst✝¹ : IsScalarTower R L F\npb : PowerBasis K L\ninst✝ : IsSeparable K L\nthis✝ : FiniteDimensional K L\ne : Fin pb.dim ≃ (L →ₐ[K] AlgebraicClosure L) := (Fintype.equivFinOfCardEq ?refine_1).symm\nthis : NoZeroDivisors (AlgebraicClosure L)\ni : Fin pb.dim\nleft✝ : i ∈ Finset.univ\nj : Fin pb.dim\nhij : j ∈ Finset.Ioi i\nh : ↑(↑(Fintype.equivFinOfCardEq ?refine_1).symm j) pb.gen = ↑(↑(Fintype.equivFinOfCardEq ?refine_1).symm i) pb.gen\n⊢ False\n[PROOFSTEP]\nexact (Finset.mem_Ioi.mp hij).ne' (e.injective <| pb.algHom_ext h)\n[GOAL]\ncase refine_1\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁴ : CommRing R\ninst✝¹³ : CommRing S\ninst✝¹² : CommRing T\ninst✝¹¹ : Algebra R S\ninst✝¹⁰ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : Algebra K L\nι κ : Type w\ninst✝⁶ : Fintype ι\nF : Type u_6\ninst✝⁵ : Field F\ninst✝⁴ : Algebra R L\ninst✝³ : Algebra L F\ninst✝² : Algebra R F\ninst✝¹ : IsScalarTower R L F\npb : PowerBasis K L\ninst✝ : IsSeparable K L\nthis : FiniteDimensional K L\n⊢ Fintype.card (L →ₐ[K] AlgebraicClosure L) = pb.dim\n[PROOFSTEP]\nrw [AlgHom.card, pb.finrank]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁵ : CommRing R\ninst✝¹⁴ : CommRing S\ninst✝¹³ : CommRing T\ninst✝¹² : Algebra R S\ninst✝¹¹ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹⁰ : Field K\ninst✝⁹ : Field L\ninst✝⁸ : Algebra K L\nι κ : Type w\ninst✝⁷ : Fintype ι\nF : Type u_6\ninst✝⁶ : Field F\ninst✝⁵ : Algebra R L\ninst✝⁴ : Algebra L F\ninst✝³ : Algebra R F\ninst✝² : IsScalarTower R L F\npb : PowerBasis K L\ninst✝¹ : IsSeparable K L\ninst✝ : DecidableEq ι\nb : Basis ι K L\n⊢ det (↑(BilinForm.toMatrix b) (traceForm K L)) ≠ 0\n[PROOFSTEP]\nhaveI : FiniteDimensional K L := FiniteDimensional.of_fintype_basis b\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁵ : CommRing R\ninst✝¹⁴ : CommRing S\ninst✝¹³ : CommRing T\ninst✝¹² : Algebra R S\ninst✝¹¹ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹⁰ : Field K\ninst✝⁹ : Field L\ninst✝⁸ : Algebra K L\nι κ : Type w\ninst✝⁷ : Fintype ι\nF : Type u_6\ninst✝⁶ : Field F\ninst✝⁵ : Algebra R L\ninst✝⁴ : Algebra L F\ninst✝³ : Algebra R F\ninst✝² : IsScalarTower R L F\npb : PowerBasis K L\ninst✝¹ : IsSeparable K L\ninst✝ : DecidableEq ι\nb : Basis ι K L\nthis : FiniteDimensional K L\n⊢ det (↑(BilinForm.toMatrix b) (traceForm K L)) ≠ 0\n[PROOFSTEP]\nlet pb : PowerBasis K L := Field.powerBasisOfFiniteOfSeparable _ _\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁵ : CommRing R\ninst✝¹⁴ : CommRing S\ninst✝¹³ : CommRing T\ninst✝¹² : Algebra R S\ninst✝¹¹ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹⁰ : Field K\ninst✝⁹ : Field L\ninst✝⁸ : Algebra K L\nι κ : Type w\ninst✝⁷ : Fintype ι\nF : Type u_6\ninst✝⁶ : Field F\ninst✝⁵ : Algebra R L\ninst✝⁴ : Algebra L F\ninst✝³ : Algebra R F\ninst✝² : IsScalarTower R L F\npb✝ : PowerBasis K L\ninst✝¹ : IsSeparable K L\ninst✝ : DecidableEq ι\nb : Basis ι K L\nthis : FiniteDimensional K L\npb : PowerBasis K L := Field.powerBasisOfFiniteOfSeparable K L\n⊢ det (↑(BilinForm.toMatrix b) (traceForm K L)) ≠ 0\n[PROOFSTEP]\nrw [← BilinForm.toMatrix_mul_basis_toMatrix pb.basis b, ← det_comm' (pb.basis.toMatrix_mul_toMatrix_flip b) _, ←\n  Matrix.mul_assoc, det_mul]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁵ : CommRing R\ninst✝¹⁴ : CommRing S\ninst✝¹³ : CommRing T\ninst✝¹² : Algebra R S\ninst✝¹¹ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹⁰ : Field K\ninst✝⁹ : Field L\ninst✝⁸ : Algebra K L\nι κ : Type w\ninst✝⁷ : Fintype ι\nF : Type u_6\ninst✝⁶ : Field F\ninst✝⁵ : Algebra R L\ninst✝⁴ : Algebra L F\ninst✝³ : Algebra R F\ninst✝² : IsScalarTower R L F\npb✝ : PowerBasis K L\ninst✝¹ : IsSeparable K L\ninst✝ : DecidableEq ι\nb : Basis ι K L\nthis : FiniteDimensional K L\npb : PowerBasis K L := Field.powerBasisOfFiniteOfSeparable K L\n⊢ det (Basis.toMatrix pb.basis ↑b * (Basis.toMatrix pb.basis ↑b)ᵀ) *\n      det (↑(BilinForm.toMatrix pb.basis) (traceForm K L)) ≠\n    0\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁵ : CommRing R\ninst✝¹⁴ : CommRing S\ninst✝¹³ : CommRing T\ninst✝¹² : Algebra R S\ninst✝¹¹ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹⁰ : Field K\ninst✝⁹ : Field L\ninst✝⁸ : Algebra K L\nι κ : Type w\ninst✝⁷ : Fintype ι\nF : Type u_6\ninst✝⁶ : Field F\ninst✝⁵ : Algebra R L\ninst✝⁴ : Algebra L F\ninst✝³ : Algebra R F\ninst✝² : IsScalarTower R L F\npb✝ : PowerBasis K L\ninst✝¹ : IsSeparable K L\ninst✝ : DecidableEq ι\nb : Basis ι K L\nthis : FiniteDimensional K L\npb : PowerBasis K L := Field.powerBasisOfFiniteOfSeparable K L\n⊢ Basis.toMatrix b ↑pb.basis * Basis.toMatrix pb.basis ↑b = 1\n[PROOFSTEP]\nswap\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁵ : CommRing R\ninst✝¹⁴ : CommRing S\ninst✝¹³ : CommRing T\ninst✝¹² : Algebra R S\ninst✝¹¹ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹⁰ : Field K\ninst✝⁹ : Field L\ninst✝⁸ : Algebra K L\nι κ : Type w\ninst✝⁷ : Fintype ι\nF : Type u_6\ninst✝⁶ : Field F\ninst✝⁵ : Algebra R L\ninst✝⁴ : Algebra L F\ninst✝³ : Algebra R F\ninst✝² : IsScalarTower R L F\npb✝ : PowerBasis K L\ninst✝¹ : IsSeparable K L\ninst✝ : DecidableEq ι\nb : Basis ι K L\nthis : FiniteDimensional K L\npb : PowerBasis K L := Field.powerBasisOfFiniteOfSeparable K L\n⊢ Basis.toMatrix b ↑pb.basis * Basis.toMatrix pb.basis ↑b = 1\n[PROOFSTEP]\napply Basis.toMatrix_mul_toMatrix_flip\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁵ : CommRing R\ninst✝¹⁴ : CommRing S\ninst✝¹³ : CommRing T\ninst✝¹² : Algebra R S\ninst✝¹¹ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹⁰ : Field K\ninst✝⁹ : Field L\ninst✝⁸ : Algebra K L\nι κ : Type w\ninst✝⁷ : Fintype ι\nF : Type u_6\ninst✝⁶ : Field F\ninst✝⁵ : Algebra R L\ninst✝⁴ : Algebra L F\ninst✝³ : Algebra R F\ninst✝² : IsScalarTower R L F\npb✝ : PowerBasis K L\ninst✝¹ : IsSeparable K L\ninst✝ : DecidableEq ι\nb : Basis ι K L\nthis : FiniteDimensional K L\npb : PowerBasis K L := Field.powerBasisOfFiniteOfSeparable K L\n⊢ det (Basis.toMatrix pb.basis ↑b * (Basis.toMatrix pb.basis ↑b)ᵀ) *\n      det (↑(BilinForm.toMatrix pb.basis) (traceForm K L)) ≠\n    0\n[PROOFSTEP]\nrefine' mul_ne_zero (isUnit_of_mul_eq_one _ ((b.toMatrix pb.basis)ᵀ * b.toMatrix pb.basis).det _).ne_zero _\n[GOAL]\ncase refine'_1\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁵ : CommRing R\ninst✝¹⁴ : CommRing S\ninst✝¹³ : CommRing T\ninst✝¹² : Algebra R S\ninst✝¹¹ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹⁰ : Field K\ninst✝⁹ : Field L\ninst✝⁸ : Algebra K L\nι κ : Type w\ninst✝⁷ : Fintype ι\nF : Type u_6\ninst✝⁶ : Field F\ninst✝⁵ : Algebra R L\ninst✝⁴ : Algebra L F\ninst✝³ : Algebra R F\ninst✝² : IsScalarTower R L F\npb✝ : PowerBasis K L\ninst✝¹ : IsSeparable K L\ninst✝ : DecidableEq ι\nb : Basis ι K L\nthis : FiniteDimensional K L\npb : PowerBasis K L := Field.powerBasisOfFiniteOfSeparable K L\n⊢ det (Basis.toMatrix pb.basis ↑b * (Basis.toMatrix pb.basis ↑b)ᵀ) *\n      det ((Basis.toMatrix b ↑pb.basis)ᵀ * Basis.toMatrix b ↑pb.basis) =\n    1\n[PROOFSTEP]\ncalc\n  (pb.basis.toMatrix b * (pb.basis.toMatrix b)ᵀ).det * ((b.toMatrix pb.basis)ᵀ * b.toMatrix pb.basis).det =\n      (pb.basis.toMatrix b * (b.toMatrix pb.basis * pb.basis.toMatrix b)ᵀ * b.toMatrix pb.basis).det :=\n    by simp only [← det_mul, Matrix.mul_assoc, Matrix.transpose_mul]\n  _ = 1 := by simp only [Basis.toMatrix_mul_toMatrix_flip, Matrix.transpose_one, Matrix.mul_one, Matrix.det_one]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁵ : CommRing R\ninst✝¹⁴ : CommRing S\ninst✝¹³ : CommRing T\ninst✝¹² : Algebra R S\ninst✝¹¹ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹⁰ : Field K\ninst✝⁹ : Field L\ninst✝⁸ : Algebra K L\nι κ : Type w\ninst✝⁷ : Fintype ι\nF : Type u_6\ninst✝⁶ : Field F\ninst✝⁵ : Algebra R L\ninst✝⁴ : Algebra L F\ninst✝³ : Algebra R F\ninst✝² : IsScalarTower R L F\npb✝ : PowerBasis K L\ninst✝¹ : IsSeparable K L\ninst✝ : DecidableEq ι\nb : Basis ι K L\nthis : FiniteDimensional K L\npb : PowerBasis K L := Field.powerBasisOfFiniteOfSeparable K L\n⊢ det (Basis.toMatrix pb.basis ↑b * (Basis.toMatrix pb.basis ↑b)ᵀ) *\n      det ((Basis.toMatrix b ↑pb.basis)ᵀ * Basis.toMatrix b ↑pb.basis) =\n    det\n      (Basis.toMatrix pb.basis ↑b * (Basis.toMatrix b ↑pb.basis * Basis.toMatrix pb.basis ↑b)ᵀ *\n        Basis.toMatrix b ↑pb.basis)\n[PROOFSTEP]\nsimp only [← det_mul, Matrix.mul_assoc, Matrix.transpose_mul]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁵ : CommRing R\ninst✝¹⁴ : CommRing S\ninst✝¹³ : CommRing T\ninst✝¹² : Algebra R S\ninst✝¹¹ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹⁰ : Field K\ninst✝⁹ : Field L\ninst✝⁸ : Algebra K L\nι κ : Type w\ninst✝⁷ : Fintype ι\nF : Type u_6\ninst✝⁶ : Field F\ninst✝⁵ : Algebra R L\ninst✝⁴ : Algebra L F\ninst✝³ : Algebra R F\ninst✝² : IsScalarTower R L F\npb✝ : PowerBasis K L\ninst✝¹ : IsSeparable K L\ninst✝ : DecidableEq ι\nb : Basis ι K L\nthis : FiniteDimensional K L\npb : PowerBasis K L := Field.powerBasisOfFiniteOfSeparable K L\n⊢ det\n      (Basis.toMatrix pb.basis ↑b * (Basis.toMatrix b ↑pb.basis * Basis.toMatrix pb.basis ↑b)ᵀ *\n        Basis.toMatrix b ↑pb.basis) =\n    1\n[PROOFSTEP]\nsimp only [Basis.toMatrix_mul_toMatrix_flip, Matrix.transpose_one, Matrix.mul_one, Matrix.det_one]\n[GOAL]\ncase refine'_2\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁵ : CommRing R\ninst✝¹⁴ : CommRing S\ninst✝¹³ : CommRing T\ninst✝¹² : Algebra R S\ninst✝¹¹ : Algebra R T\nK : Type u_4\nL : Type u_5\ninst✝¹⁰ : Field K\ninst✝⁹ : Field L\ninst✝⁸ : Algebra K L\nι κ : Type w\ninst✝⁷ : Fintype ι\nF : Type u_6\ninst✝⁶ : Field F\ninst✝⁵ : Algebra R L\ninst✝⁴ : Algebra L F\ninst✝³ : Algebra R F\ninst✝² : IsScalarTower R L F\npb✝ : PowerBasis K L\ninst✝¹ : IsSeparable K L\ninst✝ : DecidableEq ι\nb : Basis ι K L\nthis : FiniteDimensional K L\npb : PowerBasis K L := Field.powerBasisOfFiniteOfSeparable K L\n⊢ det (↑(BilinForm.toMatrix pb.basis) (traceForm K L)) ≠ 0\n[PROOFSTEP]\nsimpa only [traceMatrix_of_basis] using det_traceMatrix_ne_zero' pb\n", "meta": {"mathlib_filename": "Mathlib.RingTheory.Trace", "llama_tokens": 72803, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7799928900257127, "lm_q2_score": 0.6548947223065755, "lm_q1q2_score": 0.5108132271144924}}
{"text": "[GOAL]\nα : Sort u\nr : α → α → Prop\nmotive : Quot r → Sort v\nh : ∀ (a : α), Subsingleton (motive (mk r a))\nq : Quot r\nf : (a : α) → motive (mk r a)\n⊢ motive q\n[PROOFSTEP]\ninduction q using Quot.rec\n[GOAL]\ncase f\nα : Sort u\nr : α → α → Prop\nmotive : Quot r → Sort v\nh : ∀ (a : α), Subsingleton (motive (mk r a))\nf : (a : α) → motive (mk r a)\na✝ : α\n⊢ motive (mk r a✝)\ncase h\nα : Sort u\nr : α → α → Prop\nmotive : Quot r → Sort v\nh : ∀ (a : α), Subsingleton (motive (mk r a))\nq : Quot r\nf : (a : α) → motive (mk r a)\na✝ b✝ : α\np✝ : r a✝ b✝\n⊢ (_ : mk r a✝ = mk r b✝) ▸ ?m.408 a✝ = ?m.408 b✝\n[PROOFSTEP]\napply f\n[GOAL]\ncase h\nα : Sort u\nr : α → α → Prop\nmotive : Quot r → Sort v\nh : ∀ (a : α), Subsingleton (motive (mk r a))\nq : Quot r\nf : (a : α) → motive (mk r a)\na✝ b✝ : α\np✝ : r a✝ b✝\n⊢ (_ : mk r a✝ = mk r b✝) ▸ f a✝ = f b✝\n[PROOFSTEP]\napply Subsingleton.elim\n", "meta": {"mathlib_filename": "Mathlib.Init.Quot", "llama_tokens": 471, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7634837635542925, "lm_q2_score": 0.6688802669716107, "lm_q1q2_score": 0.5106792235946853}}
{"text": "[GOAL]\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : Nondegenerate P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\nh : Fintype.card L ≤ Fintype.card P\n⊢ ∃ f, Function.Injective f ∧ ∀ (l : L), ¬f l ∈ l\n[PROOFSTEP]\nclassical\nlet t : L → Finset P := fun l => Set.toFinset {p | p ∉ l}\nsuffices ∀ s : Finset L, s.card ≤ (s.biUnion t).card by\n  -- Hall's marriage theorem\n  obtain ⟨f, hf1, hf2⟩ := (Finset.all_card_le_biUnion_card_iff_exists_injective t).mp this\n  exact ⟨f, hf1, fun l => Set.mem_toFinset.mp (hf2 l)⟩\nintro s\nby_cases hs₀ :\n  s.card =\n    0\n      -- If `s = ∅`, then `s.card = 0 ≤ (s.bUnion t).card`\n· simp_rw [hs₀, zero_le]\nby_cases hs₁ :\n  s.card =\n    1\n      -- If `s = {l}`, then pick a point `p ∉ l`\n· obtain ⟨l, rfl⟩ := Finset.card_eq_one.mp hs₁\n  obtain ⟨p, hl⟩ := exists_point l\n  rw [Finset.card_singleton, Finset.singleton_biUnion, Nat.one_le_iff_ne_zero]\n  exact Finset.card_ne_zero_of_mem (Set.mem_toFinset.mpr hl)\nsuffices (s.biUnion t)ᶜ.card ≤ sᶜ.card by\n  -- Rephrase in terms of complements (uses `h`)\n  rw [Finset.card_compl, Finset.card_compl, tsub_le_iff_left] at this \n  replace := h.trans this\n  rwa [← add_tsub_assoc_of_le s.card_le_univ, le_tsub_iff_left (le_add_left s.card_le_univ), add_le_add_iff_right] at\n    this \nhave hs₂ : (s.biUnion t)ᶜ.card ≤ 1 := by\n  -- At most one line through two points of `s`\n  refine' Finset.card_le_one_iff.mpr @fun p₁ p₂ hp₁ hp₂ => _\n  simp_rw [Finset.mem_compl, Finset.mem_biUnion, not_exists, not_and, Set.mem_toFinset, Set.mem_setOf_eq,\n    Classical.not_not] at hp₁ hp₂ \n  obtain ⟨l₁, l₂, hl₁, hl₂, hl₃⟩ := Finset.one_lt_card_iff.mp (Nat.one_lt_iff_ne_zero_and_ne_one.mpr ⟨hs₀, hs₁⟩)\n  exact (eq_or_eq (hp₁ l₁ hl₁) (hp₂ l₁ hl₁) (hp₁ l₂ hl₂) (hp₂ l₂ hl₂)).resolve_right hl₃\nby_cases hs₃ : sᶜ.card = 0\n· rw [hs₃, le_zero_iff]\n  rw [Finset.card_compl, tsub_eq_zero_iff_le, LE.le.le_iff_eq (Finset.card_le_univ _), eq_comm,\n    Finset.card_eq_iff_eq_univ] at hs₃ ⊢\n  rw [hs₃]\n  rw [Finset.eq_univ_iff_forall] at hs₃ ⊢\n  exact fun p =>\n    Exists.elim\n      (exists_line p)\n        -- If `s = univ`, then show `s.bUnion t = univ`\n      fun l hl => Finset.mem_biUnion.mpr ⟨l, Finset.mem_univ l, Set.mem_toFinset.mpr hl⟩\n· exact hs₂.trans (Nat.one_le_iff_ne_zero.mpr hs₃)\n[GOAL]\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : Nondegenerate P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\nh : Fintype.card L ≤ Fintype.card P\n⊢ ∃ f, Function.Injective f ∧ ∀ (l : L), ¬f l ∈ l\n[PROOFSTEP]\nlet t : L → Finset P := fun l => Set.toFinset {p | p ∉ l}\n[GOAL]\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : Nondegenerate P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\nh : Fintype.card L ≤ Fintype.card P\nt : L → Finset P := fun l => Set.toFinset {p | ¬p ∈ l}\n⊢ ∃ f, Function.Injective f ∧ ∀ (l : L), ¬f l ∈ l\n[PROOFSTEP]\nsuffices ∀ s : Finset L, s.card ≤ (s.biUnion t).card by\n  -- Hall's marriage theorem\n  obtain ⟨f, hf1, hf2⟩ := (Finset.all_card_le_biUnion_card_iff_exists_injective t).mp this\n  exact ⟨f, hf1, fun l => Set.mem_toFinset.mp (hf2 l)⟩\n[GOAL]\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : Nondegenerate P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\nh : Fintype.card L ≤ Fintype.card P\nt : L → Finset P := fun l => Set.toFinset {p | ¬p ∈ l}\nthis : ∀ (s : Finset L), Finset.card s ≤ Finset.card (Finset.biUnion s t)\n⊢ ∃ f, Function.Injective f ∧ ∀ (l : L), ¬f l ∈ l\n[PROOFSTEP]\nobtain ⟨f, hf1, hf2⟩ := (Finset.all_card_le_biUnion_card_iff_exists_injective t).mp this\n[GOAL]\ncase intro.intro\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : Nondegenerate P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\nh : Fintype.card L ≤ Fintype.card P\nt : L → Finset P := fun l => Set.toFinset {p | ¬p ∈ l}\nthis : ∀ (s : Finset L), Finset.card s ≤ Finset.card (Finset.biUnion s t)\nf : L → P\nhf1 : Function.Injective f\nhf2 : ∀ (x : L), f x ∈ t x\n⊢ ∃ f, Function.Injective f ∧ ∀ (l : L), ¬f l ∈ l\n[PROOFSTEP]\nexact ⟨f, hf1, fun l => Set.mem_toFinset.mp (hf2 l)⟩\n[GOAL]\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : Nondegenerate P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\nh : Fintype.card L ≤ Fintype.card P\nt : L → Finset P := fun l => Set.toFinset {p | ¬p ∈ l}\n⊢ ∀ (s : Finset L), Finset.card s ≤ Finset.card (Finset.biUnion s t)\n[PROOFSTEP]\nintro s\n[GOAL]\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : Nondegenerate P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\nh : Fintype.card L ≤ Fintype.card P\nt : L → Finset P := fun l => Set.toFinset {p | ¬p ∈ l}\ns : Finset L\n⊢ Finset.card s ≤ Finset.card (Finset.biUnion s t)\n[PROOFSTEP]\nby_cases hs₀ :\n  s.card =\n    0\n      -- If `s = ∅`, then `s.card = 0 ≤ (s.bUnion t).card`\n[GOAL]\ncase pos\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : Nondegenerate P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\nh : Fintype.card L ≤ Fintype.card P\nt : L → Finset P := fun l => Set.toFinset {p | ¬p ∈ l}\ns : Finset L\nhs₀ : Finset.card s = 0\n⊢ Finset.card s ≤ Finset.card (Finset.biUnion s t)\n[PROOFSTEP]\nsimp_rw [hs₀, zero_le]\n[GOAL]\ncase neg\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : Nondegenerate P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\nh : Fintype.card L ≤ Fintype.card P\nt : L → Finset P := fun l => Set.toFinset {p | ¬p ∈ l}\ns : Finset L\nhs₀ : ¬Finset.card s = 0\n⊢ Finset.card s ≤ Finset.card (Finset.biUnion s t)\n[PROOFSTEP]\nby_cases hs₁ :\n  s.card =\n    1\n      -- If `s = {l}`, then pick a point `p ∉ l`\n[GOAL]\ncase pos\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : Nondegenerate P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\nh : Fintype.card L ≤ Fintype.card P\nt : L → Finset P := fun l => Set.toFinset {p | ¬p ∈ l}\ns : Finset L\nhs₀ : ¬Finset.card s = 0\nhs₁ : Finset.card s = 1\n⊢ Finset.card s ≤ Finset.card (Finset.biUnion s t)\n[PROOFSTEP]\nobtain ⟨l, rfl⟩ := Finset.card_eq_one.mp hs₁\n[GOAL]\ncase pos.intro\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : Nondegenerate P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\nh : Fintype.card L ≤ Fintype.card P\nt : L → Finset P := fun l => Set.toFinset {p | ¬p ∈ l}\nl : L\nhs₀ : ¬Finset.card {l} = 0\nhs₁ : Finset.card {l} = 1\n⊢ Finset.card {l} ≤ Finset.card (Finset.biUnion {l} t)\n[PROOFSTEP]\nobtain ⟨p, hl⟩ := exists_point l\n[GOAL]\ncase pos.intro.intro\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : Nondegenerate P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\nh : Fintype.card L ≤ Fintype.card P\nt : L → Finset P := fun l => Set.toFinset {p | ¬p ∈ l}\nl : L\nhs₀ : ¬Finset.card {l} = 0\nhs₁ : Finset.card {l} = 1\np : P\nhl : ¬p ∈ l\n⊢ Finset.card {l} ≤ Finset.card (Finset.biUnion {l} t)\n[PROOFSTEP]\nrw [Finset.card_singleton, Finset.singleton_biUnion, Nat.one_le_iff_ne_zero]\n[GOAL]\ncase pos.intro.intro\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : Nondegenerate P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\nh : Fintype.card L ≤ Fintype.card P\nt : L → Finset P := fun l => Set.toFinset {p | ¬p ∈ l}\nl : L\nhs₀ : ¬Finset.card {l} = 0\nhs₁ : Finset.card {l} = 1\np : P\nhl : ¬p ∈ l\n⊢ Finset.card (t l) ≠ 0\n[PROOFSTEP]\nexact Finset.card_ne_zero_of_mem (Set.mem_toFinset.mpr hl)\n[GOAL]\ncase neg\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : Nondegenerate P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\nh : Fintype.card L ≤ Fintype.card P\nt : L → Finset P := fun l => Set.toFinset {p | ¬p ∈ l}\ns : Finset L\nhs₀ : ¬Finset.card s = 0\nhs₁ : ¬Finset.card s = 1\n⊢ Finset.card s ≤ Finset.card (Finset.biUnion s t)\n[PROOFSTEP]\nsuffices (s.biUnion t)ᶜ.card ≤ sᶜ.card by\n  -- Rephrase in terms of complements (uses `h`)\n  rw [Finset.card_compl, Finset.card_compl, tsub_le_iff_left] at this \n  replace := h.trans this\n  rwa [← add_tsub_assoc_of_le s.card_le_univ, le_tsub_iff_left (le_add_left s.card_le_univ), add_le_add_iff_right] at\n    this \n[GOAL]\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : Nondegenerate P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\nh : Fintype.card L ≤ Fintype.card P\nt : L → Finset P := fun l => Set.toFinset {p | ¬p ∈ l}\ns : Finset L\nhs₀ : ¬Finset.card s = 0\nhs₁ : ¬Finset.card s = 1\nthis : Finset.card (Finset.biUnion s t)ᶜ ≤ Finset.card sᶜ\n⊢ Finset.card s ≤ Finset.card (Finset.biUnion s t)\n[PROOFSTEP]\nrw [Finset.card_compl, Finset.card_compl, tsub_le_iff_left] at this \n[GOAL]\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : Nondegenerate P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\nh : Fintype.card L ≤ Fintype.card P\nt : L → Finset P := fun l => Set.toFinset {p | ¬p ∈ l}\ns : Finset L\nhs₀ : ¬Finset.card s = 0\nhs₁ : ¬Finset.card s = 1\nthis✝ : Fintype.card P - Finset.card (Finset.biUnion s t) ≤ Fintype.card L - Finset.card s\nthis : Fintype.card P ≤ Finset.card (Finset.biUnion s t) + (Fintype.card L - Finset.card s)\n⊢ Finset.card s ≤ Finset.card (Finset.biUnion s t)\n[PROOFSTEP]\nreplace := h.trans this\n[GOAL]\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : Nondegenerate P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\nh : Fintype.card L ≤ Fintype.card P\nt : L → Finset P := fun l => Set.toFinset {p | ¬p ∈ l}\ns : Finset L\nhs₀ : ¬Finset.card s = 0\nhs₁ : ¬Finset.card s = 1\nthis✝ : Fintype.card P - Finset.card (Finset.biUnion s t) ≤ Fintype.card L - Finset.card s\nthis : Fintype.card L ≤ Finset.card (Finset.biUnion s t) + (Fintype.card L - Finset.card s)\n⊢ Finset.card s ≤ Finset.card (Finset.biUnion s t)\n[PROOFSTEP]\nrwa [← add_tsub_assoc_of_le s.card_le_univ, le_tsub_iff_left (le_add_left s.card_le_univ), add_le_add_iff_right] at this \n[GOAL]\ncase neg\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : Nondegenerate P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\nh : Fintype.card L ≤ Fintype.card P\nt : L → Finset P := fun l => Set.toFinset {p | ¬p ∈ l}\ns : Finset L\nhs₀ : ¬Finset.card s = 0\nhs₁ : ¬Finset.card s = 1\n⊢ Finset.card (Finset.biUnion s t)ᶜ ≤ Finset.card sᶜ\n[PROOFSTEP]\nhave hs₂ : (s.biUnion t)ᶜ.card ≤ 1 := by\n  -- At most one line through two points of `s`\n  refine' Finset.card_le_one_iff.mpr @fun p₁ p₂ hp₁ hp₂ => _\n  simp_rw [Finset.mem_compl, Finset.mem_biUnion, not_exists, not_and, Set.mem_toFinset, Set.mem_setOf_eq,\n    Classical.not_not] at hp₁ hp₂ \n  obtain ⟨l₁, l₂, hl₁, hl₂, hl₃⟩ := Finset.one_lt_card_iff.mp (Nat.one_lt_iff_ne_zero_and_ne_one.mpr ⟨hs₀, hs₁⟩)\n  exact (eq_or_eq (hp₁ l₁ hl₁) (hp₂ l₁ hl₁) (hp₁ l₂ hl₂) (hp₂ l₂ hl₂)).resolve_right hl₃\n[GOAL]\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : Nondegenerate P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\nh : Fintype.card L ≤ Fintype.card P\nt : L → Finset P := fun l => Set.toFinset {p | ¬p ∈ l}\ns : Finset L\nhs₀ : ¬Finset.card s = 0\nhs₁ : ¬Finset.card s = 1\n⊢ Finset.card (Finset.biUnion s t)ᶜ ≤ 1\n[PROOFSTEP]\nrefine' Finset.card_le_one_iff.mpr @fun p₁ p₂ hp₁ hp₂ => _\n[GOAL]\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : Nondegenerate P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\nh : Fintype.card L ≤ Fintype.card P\nt : L → Finset P := fun l => Set.toFinset {p | ¬p ∈ l}\ns : Finset L\nhs₀ : ¬Finset.card s = 0\nhs₁ : ¬Finset.card s = 1\np₁ p₂ : P\nhp₁ : p₁ ∈ (Finset.biUnion s t)ᶜ\nhp₂ : p₂ ∈ (Finset.biUnion s t)ᶜ\n⊢ p₁ = p₂\n[PROOFSTEP]\nsimp_rw [Finset.mem_compl, Finset.mem_biUnion, not_exists, not_and, Set.mem_toFinset, Set.mem_setOf_eq,\n  Classical.not_not] at hp₁ hp₂ \n[GOAL]\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : Nondegenerate P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\nh : Fintype.card L ≤ Fintype.card P\nt : L → Finset P := fun l => Set.toFinset {p | ¬p ∈ l}\ns : Finset L\nhs₀ : ¬Finset.card s = 0\nhs₁ : ¬Finset.card s = 1\np₁ p₂ : P\nhp₁ : ∀ (x : L), x ∈ s → p₁ ∈ x\nhp₂ : ∀ (x : L), x ∈ s → p₂ ∈ x\n⊢ p₁ = p₂\n[PROOFSTEP]\nobtain ⟨l₁, l₂, hl₁, hl₂, hl₃⟩ := Finset.one_lt_card_iff.mp (Nat.one_lt_iff_ne_zero_and_ne_one.mpr ⟨hs₀, hs₁⟩)\n[GOAL]\ncase intro.intro.intro.intro\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : Nondegenerate P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\nh : Fintype.card L ≤ Fintype.card P\nt : L → Finset P := fun l => Set.toFinset {p | ¬p ∈ l}\ns : Finset L\nhs₀ : ¬Finset.card s = 0\nhs₁ : ¬Finset.card s = 1\np₁ p₂ : P\nhp₁ : ∀ (x : L), x ∈ s → p₁ ∈ x\nhp₂ : ∀ (x : L), x ∈ s → p₂ ∈ x\nl₁ l₂ : L\nhl₁ : l₁ ∈ s\nhl₂ : l₂ ∈ s\nhl₃ : l₁ ≠ l₂\n⊢ p₁ = p₂\n[PROOFSTEP]\nexact (eq_or_eq (hp₁ l₁ hl₁) (hp₂ l₁ hl₁) (hp₁ l₂ hl₂) (hp₂ l₂ hl₂)).resolve_right hl₃\n[GOAL]\ncase neg\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : Nondegenerate P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\nh : Fintype.card L ≤ Fintype.card P\nt : L → Finset P := fun l => Set.toFinset {p | ¬p ∈ l}\ns : Finset L\nhs₀ : ¬Finset.card s = 0\nhs₁ : ¬Finset.card s = 1\nhs₂ : Finset.card (Finset.biUnion s t)ᶜ ≤ 1\n⊢ Finset.card (Finset.biUnion s t)ᶜ ≤ Finset.card sᶜ\n[PROOFSTEP]\nby_cases hs₃ : sᶜ.card = 0\n[GOAL]\ncase pos\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : Nondegenerate P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\nh : Fintype.card L ≤ Fintype.card P\nt : L → Finset P := fun l => Set.toFinset {p | ¬p ∈ l}\ns : Finset L\nhs₀ : ¬Finset.card s = 0\nhs₁ : ¬Finset.card s = 1\nhs₂ : Finset.card (Finset.biUnion s t)ᶜ ≤ 1\nhs₃ : Finset.card sᶜ = 0\n⊢ Finset.card (Finset.biUnion s t)ᶜ ≤ Finset.card sᶜ\n[PROOFSTEP]\nrw [hs₃, le_zero_iff]\n[GOAL]\ncase pos\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : Nondegenerate P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\nh : Fintype.card L ≤ Fintype.card P\nt : L → Finset P := fun l => Set.toFinset {p | ¬p ∈ l}\ns : Finset L\nhs₀ : ¬Finset.card s = 0\nhs₁ : ¬Finset.card s = 1\nhs₂ : Finset.card (Finset.biUnion s t)ᶜ ≤ 1\nhs₃ : Finset.card sᶜ = 0\n⊢ Finset.card (Finset.biUnion s t)ᶜ = 0\n[PROOFSTEP]\nrw [Finset.card_compl, tsub_eq_zero_iff_le, LE.le.le_iff_eq (Finset.card_le_univ _), eq_comm,\n  Finset.card_eq_iff_eq_univ] at hs₃ ⊢\n[GOAL]\ncase pos\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : Nondegenerate P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\nh : Fintype.card L ≤ Fintype.card P\nt : L → Finset P := fun l => Set.toFinset {p | ¬p ∈ l}\ns : Finset L\nhs₀ : ¬Finset.card s = 0\nhs₁ : ¬Finset.card s = 1\nhs₂ : Finset.card (Finset.biUnion s t)ᶜ ≤ 1\nhs₃ : s = Finset.univ\n⊢ Finset.biUnion s t = Finset.univ\n[PROOFSTEP]\nrw [hs₃]\n[GOAL]\ncase pos\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : Nondegenerate P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\nh : Fintype.card L ≤ Fintype.card P\nt : L → Finset P := fun l => Set.toFinset {p | ¬p ∈ l}\ns : Finset L\nhs₀ : ¬Finset.card s = 0\nhs₁ : ¬Finset.card s = 1\nhs₂ : Finset.card (Finset.biUnion s t)ᶜ ≤ 1\nhs₃ : s = Finset.univ\n⊢ Finset.biUnion Finset.univ t = Finset.univ\n[PROOFSTEP]\nrw [Finset.eq_univ_iff_forall] at hs₃ ⊢\n[GOAL]\ncase pos\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : Nondegenerate P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\nh : Fintype.card L ≤ Fintype.card P\nt : L → Finset P := fun l => Set.toFinset {p | ¬p ∈ l}\ns : Finset L\nhs₀ : ¬Finset.card s = 0\nhs₁ : ¬Finset.card s = 1\nhs₂ : Finset.card (Finset.biUnion s t)ᶜ ≤ 1\nhs₃ : ∀ (x : L), x ∈ s\n⊢ ∀ (x : P), x ∈ Finset.biUnion Finset.univ t\n[PROOFSTEP]\nexact fun p =>\n  Exists.elim\n    (exists_line p)\n      -- If `s = univ`, then show `s.bUnion t = univ`\n    fun l hl => Finset.mem_biUnion.mpr ⟨l, Finset.mem_univ l, Set.mem_toFinset.mpr hl⟩\n[GOAL]\ncase neg\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : Nondegenerate P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\nh : Fintype.card L ≤ Fintype.card P\nt : L → Finset P := fun l => Set.toFinset {p | ¬p ∈ l}\ns : Finset L\nhs₀ : ¬Finset.card s = 0\nhs₁ : ¬Finset.card s = 1\nhs₂ : Finset.card (Finset.biUnion s t)ᶜ ≤ 1\nhs₃ : ¬Finset.card sᶜ = 0\n⊢ Finset.card (Finset.biUnion s t)ᶜ ≤ Finset.card sᶜ\n[PROOFSTEP]\nexact hs₂.trans (Nat.one_le_iff_ne_zero.mpr hs₃)\n[GOAL]\nP : Type u_1\nL : Type u_2\ninst✝² : Membership P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\n⊢ ∑ p : P, lineCount L p = ∑ l : L, pointCount P l\n[PROOFSTEP]\nclassical\nsimp only [lineCount, pointCount, Nat.card_eq_fintype_card, ← Fintype.card_sigma]\napply Fintype.card_congr\ncalc\n  (Σ p, { l : L // p ∈ l }) ≃ { x : P × L // x.1 ∈ x.2 } := (Equiv.subtypeProdEquivSigmaSubtype (· ∈ ·)).symm\n  _ ≃ { x : L × P // x.2 ∈ x.1 } := ((Equiv.prodComm P L).subtypeEquiv fun x => Iff.rfl)\n  _ ≃ Σ l, { p // p ∈ l } := Equiv.subtypeProdEquivSigmaSubtype fun (l : L) (p : P) => p ∈ l\n[GOAL]\nP : Type u_1\nL : Type u_2\ninst✝² : Membership P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\n⊢ ∑ p : P, lineCount L p = ∑ l : L, pointCount P l\n[PROOFSTEP]\nsimp only [lineCount, pointCount, Nat.card_eq_fintype_card, ← Fintype.card_sigma]\n[GOAL]\nP : Type u_1\nL : Type u_2\ninst✝² : Membership P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\n⊢ Fintype.card ((a : P) × { l // a ∈ l }) = Fintype.card ((a : L) × { p // p ∈ a })\n[PROOFSTEP]\napply Fintype.card_congr\n[GOAL]\ncase f\nP : Type u_1\nL : Type u_2\ninst✝² : Membership P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\n⊢ (a : P) × { l // a ∈ l } ≃ (a : L) × { p // p ∈ a }\n[PROOFSTEP]\ncalc\n  (Σ p, { l : L // p ∈ l }) ≃ { x : P × L // x.1 ∈ x.2 } := (Equiv.subtypeProdEquivSigmaSubtype (· ∈ ·)).symm\n  _ ≃ { x : L × P // x.2 ∈ x.1 } := ((Equiv.prodComm P L).subtypeEquiv fun x => Iff.rfl)\n  _ ≃ Σ l, { p // p ∈ l } := Equiv.subtypeProdEquivSigmaSubtype fun (l : L) (p : P) => p ∈ l\n[GOAL]\nP : Type u_1\nL : Type u_2\ninst✝² : Membership P L\ninst✝¹ : HasLines P L\np : P\nl : L\nh : ¬p ∈ l\ninst✝ : Finite { l // p ∈ l }\n⊢ pointCount P l ≤ lineCount L p\n[PROOFSTEP]\nby_cases hf : Infinite { p : P // p ∈ l }\n[GOAL]\ncase pos\nP : Type u_1\nL : Type u_2\ninst✝² : Membership P L\ninst✝¹ : HasLines P L\np : P\nl : L\nh : ¬p ∈ l\ninst✝ : Finite { l // p ∈ l }\nhf : Infinite { p // p ∈ l }\n⊢ pointCount P l ≤ lineCount L p\n[PROOFSTEP]\nexact (le_of_eq Nat.card_eq_zero_of_infinite).trans (zero_le (lineCount L p))\n[GOAL]\ncase neg\nP : Type u_1\nL : Type u_2\ninst✝² : Membership P L\ninst✝¹ : HasLines P L\np : P\nl : L\nh : ¬p ∈ l\ninst✝ : Finite { l // p ∈ l }\nhf : ¬Infinite { p // p ∈ l }\n⊢ pointCount P l ≤ lineCount L p\n[PROOFSTEP]\nhaveI := fintypeOfNotInfinite hf\n[GOAL]\ncase neg\nP : Type u_1\nL : Type u_2\ninst✝² : Membership P L\ninst✝¹ : HasLines P L\np : P\nl : L\nh : ¬p ∈ l\ninst✝ : Finite { l // p ∈ l }\nhf : ¬Infinite { p // p ∈ l }\nthis : Fintype { p // p ∈ l }\n⊢ pointCount P l ≤ lineCount L p\n[PROOFSTEP]\ncases nonempty_fintype { l : L // p ∈ l }\n[GOAL]\ncase neg.intro\nP : Type u_1\nL : Type u_2\ninst✝² : Membership P L\ninst✝¹ : HasLines P L\np : P\nl : L\nh : ¬p ∈ l\ninst✝ : Finite { l // p ∈ l }\nhf : ¬Infinite { p // p ∈ l }\nthis : Fintype { p // p ∈ l }\nval✝ : Fintype { l // p ∈ l }\n⊢ pointCount P l ≤ lineCount L p\n[PROOFSTEP]\nrw [lineCount, pointCount, Nat.card_eq_fintype_card, Nat.card_eq_fintype_card]\n[GOAL]\ncase neg.intro\nP : Type u_1\nL : Type u_2\ninst✝² : Membership P L\ninst✝¹ : HasLines P L\np : P\nl : L\nh : ¬p ∈ l\ninst✝ : Finite { l // p ∈ l }\nhf : ¬Infinite { p // p ∈ l }\nthis : Fintype { p // p ∈ l }\nval✝ : Fintype { l // p ∈ l }\n⊢ Fintype.card { p // p ∈ l } ≤ Fintype.card { l // p ∈ l }\n[PROOFSTEP]\nhave : ∀ p' : { p // p ∈ l }, p ≠ p' := fun p' hp' => h ((congr_arg (· ∈ l) hp').mpr p'.2)\n[GOAL]\ncase neg.intro\nP : Type u_1\nL : Type u_2\ninst✝² : Membership P L\ninst✝¹ : HasLines P L\np : P\nl : L\nh : ¬p ∈ l\ninst✝ : Finite { l // p ∈ l }\nhf : ¬Infinite { p // p ∈ l }\nthis✝ : Fintype { p // p ∈ l }\nval✝ : Fintype { l // p ∈ l }\nthis : ∀ (p' : { p // p ∈ l }), p ≠ ↑p'\n⊢ Fintype.card { p // p ∈ l } ≤ Fintype.card { l // p ∈ l }\n[PROOFSTEP]\nexact\n  Fintype.card_le_of_injective (fun p' => ⟨mkLine (this p'), (mkLine_ax (this p')).1⟩) fun p₁ p₂ hp =>\n    Subtype.ext\n      ((eq_or_eq p₁.2 p₂.2 (mkLine_ax (this p₁)).2\n            ((congr_arg _ (Subtype.ext_iff.mp hp)).mpr (mkLine_ax (this p₂)).2)).resolve_right\n        fun h' => (congr_arg (¬p ∈ ·) h').mp h (mkLine_ax (this p₁)).1)\n[GOAL]\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : HasLines P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\n⊢ Fintype.card P ≤ Fintype.card L\n[PROOFSTEP]\nclassical\nby_contra hc₂\nobtain ⟨f, hf₁, hf₂⟩ := Nondegenerate.exists_injective_of_card_le (le_of_not_le hc₂)\nhave :=\n  calc\n    ∑ p, lineCount L p = ∑ l, pointCount P l := sum_lineCount_eq_sum_pointCount P L\n    _ ≤ ∑ l, lineCount L (f l) := (Finset.sum_le_sum fun l _ => HasLines.pointCount_le_lineCount (hf₂ l))\n    _ = ∑ p in Finset.univ.image f, lineCount L p :=\n      (Finset.sum_bij (fun l _ => f l) (fun l hl => Finset.mem_image_of_mem f hl) (fun l _ => rfl)\n        (fun l₁ l₂ hl₁ hl₂ hl₃ => hf₁ hl₃) fun p => by\n        rw [Finset.mem_image]\n        exact fun ⟨a, ⟨h, h'⟩⟩ => ⟨a, ⟨h, h'.symm⟩⟩)\n    _ < ∑ p, lineCount L p :=\n      by\n      obtain ⟨p, hp⟩ := not_forall.mp (mt (Fintype.card_le_of_surjective f) hc₂)\n      refine'\n        Finset.sum_lt_sum_of_subset (Finset.univ.image f).subset_univ (Finset.mem_univ p) _ _ fun p _ _ =>\n          zero_le (lineCount L p)\n      · simpa only [Finset.mem_image, exists_prop, Finset.mem_univ, true_and_iff]\n      · rw [lineCount, Nat.card_eq_fintype_card, Fintype.card_pos_iff]\n        obtain ⟨l, _⟩ := @exists_line P L _ _ p\n        exact\n          let this := not_exists.mp hp l\n          ⟨⟨mkLine this, (mkLine_ax this).2⟩⟩\nexact lt_irrefl _ this\n[GOAL]\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : HasLines P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\n⊢ Fintype.card P ≤ Fintype.card L\n[PROOFSTEP]\nby_contra hc₂\n[GOAL]\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : HasLines P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\nhc₂ : ¬Fintype.card P ≤ Fintype.card L\n⊢ False\n[PROOFSTEP]\nobtain ⟨f, hf₁, hf₂⟩ := Nondegenerate.exists_injective_of_card_le (le_of_not_le hc₂)\n[GOAL]\ncase intro.intro\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : HasLines P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\nhc₂ : ¬Fintype.card P ≤ Fintype.card L\nf : L → P\nhf₁ : Function.Injective f\nhf₂ : ∀ (l : L), ¬f l ∈ l\n⊢ False\n[PROOFSTEP]\nhave :=\n  calc\n    ∑ p, lineCount L p = ∑ l, pointCount P l := sum_lineCount_eq_sum_pointCount P L\n    _ ≤ ∑ l, lineCount L (f l) := (Finset.sum_le_sum fun l _ => HasLines.pointCount_le_lineCount (hf₂ l))\n    _ = ∑ p in Finset.univ.image f, lineCount L p :=\n      (Finset.sum_bij (fun l _ => f l) (fun l hl => Finset.mem_image_of_mem f hl) (fun l _ => rfl)\n        (fun l₁ l₂ hl₁ hl₂ hl₃ => hf₁ hl₃) fun p => by\n        rw [Finset.mem_image]\n        exact fun ⟨a, ⟨h, h'⟩⟩ => ⟨a, ⟨h, h'.symm⟩⟩)\n    _ < ∑ p, lineCount L p :=\n      by\n      obtain ⟨p, hp⟩ := not_forall.mp (mt (Fintype.card_le_of_surjective f) hc₂)\n      refine'\n        Finset.sum_lt_sum_of_subset (Finset.univ.image f).subset_univ (Finset.mem_univ p) _ _ fun p _ _ =>\n          zero_le (lineCount L p)\n      · simpa only [Finset.mem_image, exists_prop, Finset.mem_univ, true_and_iff]\n      · rw [lineCount, Nat.card_eq_fintype_card, Fintype.card_pos_iff]\n        obtain ⟨l, _⟩ := @exists_line P L _ _ p\n        exact\n          let this := not_exists.mp hp l\n          ⟨⟨mkLine this, (mkLine_ax this).2⟩⟩\n[GOAL]\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : HasLines P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\nhc₂ : ¬Fintype.card P ≤ Fintype.card L\nf : L → P\nhf₁ : Function.Injective f\nhf₂ : ∀ (l : L), ¬f l ∈ l\np : P\n⊢ p ∈ Finset.image f Finset.univ → ∃ a ha, p = (fun l x => f l) a ha\n[PROOFSTEP]\nrw [Finset.mem_image]\n[GOAL]\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : HasLines P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\nhc₂ : ¬Fintype.card P ≤ Fintype.card L\nf : L → P\nhf₁ : Function.Injective f\nhf₂ : ∀ (l : L), ¬f l ∈ l\np : P\n⊢ (∃ a, a ∈ Finset.univ ∧ f a = p) → ∃ a ha, p = (fun l x => f l) a ha\n[PROOFSTEP]\nexact fun ⟨a, ⟨h, h'⟩⟩ => ⟨a, ⟨h, h'.symm⟩⟩\n[GOAL]\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : HasLines P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\nhc₂ : ¬Fintype.card P ≤ Fintype.card L\nf : L → P\nhf₁ : Function.Injective f\nhf₂ : ∀ (l : L), ¬f l ∈ l\n⊢ ∑ p in Finset.image f Finset.univ, lineCount L p < ∑ p : P, lineCount L p\n[PROOFSTEP]\nobtain ⟨p, hp⟩ := not_forall.mp (mt (Fintype.card_le_of_surjective f) hc₂)\n[GOAL]\ncase intro\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : HasLines P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\nhc₂ : ¬Fintype.card P ≤ Fintype.card L\nf : L → P\nhf₁ : Function.Injective f\nhf₂ : ∀ (l : L), ¬f l ∈ l\np : P\nhp : ¬∃ a, f a = p\n⊢ ∑ p in Finset.image f Finset.univ, lineCount L p < ∑ p : P, lineCount L p\n[PROOFSTEP]\nrefine'\n  Finset.sum_lt_sum_of_subset (Finset.univ.image f).subset_univ (Finset.mem_univ p) _ _ fun p _ _ =>\n    zero_le (lineCount L p)\n[GOAL]\ncase intro.refine'_1\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : HasLines P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\nhc₂ : ¬Fintype.card P ≤ Fintype.card L\nf : L → P\nhf₁ : Function.Injective f\nhf₂ : ∀ (l : L), ¬f l ∈ l\np : P\nhp : ¬∃ a, f a = p\n⊢ ¬p ∈ Finset.image f Finset.univ\n[PROOFSTEP]\nsimpa only [Finset.mem_image, exists_prop, Finset.mem_univ, true_and_iff]\n[GOAL]\ncase intro.refine'_2\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : HasLines P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\nhc₂ : ¬Fintype.card P ≤ Fintype.card L\nf : L → P\nhf₁ : Function.Injective f\nhf₂ : ∀ (l : L), ¬f l ∈ l\np : P\nhp : ¬∃ a, f a = p\n⊢ 0 < lineCount L p\n[PROOFSTEP]\nrw [lineCount, Nat.card_eq_fintype_card, Fintype.card_pos_iff]\n[GOAL]\ncase intro.refine'_2\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : HasLines P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\nhc₂ : ¬Fintype.card P ≤ Fintype.card L\nf : L → P\nhf₁ : Function.Injective f\nhf₂ : ∀ (l : L), ¬f l ∈ l\np : P\nhp : ¬∃ a, f a = p\n⊢ Nonempty { l // p ∈ l }\n[PROOFSTEP]\nobtain ⟨l, _⟩ := @exists_line P L _ _ p\n[GOAL]\ncase intro.refine'_2.intro\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : HasLines P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\nhc₂ : ¬Fintype.card P ≤ Fintype.card L\nf : L → P\nhf₁ : Function.Injective f\nhf₂ : ∀ (l : L), ¬f l ∈ l\np : P\nhp : ¬∃ a, f a = p\nl : L\nh✝ : ¬p ∈ l\n⊢ Nonempty { l // p ∈ l }\n[PROOFSTEP]\nexact\n  let this := not_exists.mp hp l\n  ⟨⟨mkLine this, (mkLine_ax this).2⟩⟩\n[GOAL]\ncase intro.intro\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : HasLines P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\nhc₂ : ¬Fintype.card P ≤ Fintype.card L\nf : L → P\nhf₁ : Function.Injective f\nhf₂ : ∀ (l : L), ¬f l ∈ l\nthis : ∑ p : P, lineCount L p < ∑ p : P, lineCount L p\n⊢ False\n[PROOFSTEP]\nexact lt_irrefl _ this\n[GOAL]\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : HasLines P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\nh : Fintype.card P = Fintype.card L\n⊢ ∃ f, Function.Bijective f ∧ ∀ (l : L), pointCount P l = lineCount L (f l)\n[PROOFSTEP]\nclassical\nobtain ⟨f, hf1, hf2⟩ := Nondegenerate.exists_injective_of_card_le (ge_of_eq h)\nhave hf3 := (Fintype.bijective_iff_injective_and_card f).mpr ⟨hf1, h.symm⟩\nrefine'\n  ⟨f, hf3, fun l =>\n    (Finset.sum_eq_sum_iff_of_le fun l _ => HasLines.pointCount_le_lineCount (hf2 l)).mp\n      ((sum_lineCount_eq_sum_pointCount P L).symm.trans\n        (Finset.sum_bij (fun l _ => f l) (fun l _ => Finset.mem_univ (f l)) (fun l _ => refl (lineCount L (f l)))\n            (fun l₁ l₂ hl₁ hl₂ hl => hf1 hl) fun p hp => _).symm)\n      l (Finset.mem_univ l)⟩\nobtain ⟨l, rfl⟩ := hf3.2 p\nexact ⟨l, Finset.mem_univ l, rfl⟩\n[GOAL]\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : HasLines P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\nh : Fintype.card P = Fintype.card L\n⊢ ∃ f, Function.Bijective f ∧ ∀ (l : L), pointCount P l = lineCount L (f l)\n[PROOFSTEP]\nobtain ⟨f, hf1, hf2⟩ := Nondegenerate.exists_injective_of_card_le (ge_of_eq h)\n[GOAL]\ncase intro.intro\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : HasLines P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\nh : Fintype.card P = Fintype.card L\nf : L → P\nhf1 : Function.Injective f\nhf2 : ∀ (l : L), ¬f l ∈ l\n⊢ ∃ f, Function.Bijective f ∧ ∀ (l : L), pointCount P l = lineCount L (f l)\n[PROOFSTEP]\nhave hf3 := (Fintype.bijective_iff_injective_and_card f).mpr ⟨hf1, h.symm⟩\n[GOAL]\ncase intro.intro\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : HasLines P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\nh : Fintype.card P = Fintype.card L\nf : L → P\nhf1 : Function.Injective f\nhf2 : ∀ (l : L), ¬f l ∈ l\nhf3 : Function.Bijective f\n⊢ ∃ f, Function.Bijective f ∧ ∀ (l : L), pointCount P l = lineCount L (f l)\n[PROOFSTEP]\nrefine'\n  ⟨f, hf3, fun l =>\n    (Finset.sum_eq_sum_iff_of_le fun l _ => HasLines.pointCount_le_lineCount (hf2 l)).mp\n      ((sum_lineCount_eq_sum_pointCount P L).symm.trans\n        (Finset.sum_bij (fun l _ => f l) (fun l _ => Finset.mem_univ (f l)) (fun l _ => refl (lineCount L (f l)))\n            (fun l₁ l₂ hl₁ hl₂ hl => hf1 hl) fun p hp => _).symm)\n      l (Finset.mem_univ l)⟩\n[GOAL]\ncase intro.intro\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : HasLines P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\nh : Fintype.card P = Fintype.card L\nf : L → P\nhf1 : Function.Injective f\nhf2 : ∀ (l : L), ¬f l ∈ l\nhf3 : Function.Bijective f\nl : L\np : P\nhp : p ∈ Finset.univ\n⊢ ∃ a ha, p = (fun l x => f l) a ha\n[PROOFSTEP]\nobtain ⟨l, rfl⟩ := hf3.2 p\n[GOAL]\ncase intro.intro.intro\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : HasLines P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\nh : Fintype.card P = Fintype.card L\nf : L → P\nhf1 : Function.Injective f\nhf2 : ∀ (l : L), ¬f l ∈ l\nhf3 : Function.Bijective f\nl✝ l : L\nhp : f l ∈ Finset.univ\n⊢ ∃ a ha, f l = (fun l x => f l) a ha\n[PROOFSTEP]\nexact ⟨l, Finset.mem_univ l, rfl⟩\n[GOAL]\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : HasLines P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\nhPL : Fintype.card P = Fintype.card L\np : P\nl : L\nhpl : ¬p ∈ l\n⊢ lineCount L p = pointCount P l\n[PROOFSTEP]\nclassical\nobtain ⟨f, hf1, hf2⟩ := HasLines.exists_bijective_of_card_eq hPL\nlet s : Finset (P × L) := Set.toFinset {i | i.1 ∈ i.2}\nhave step1 : ∑ i : P × L, lineCount L i.1 = ∑ i : P × L, pointCount P i.2 :=\n  by\n  rw [← Finset.univ_product_univ, Finset.sum_product_right, Finset.sum_product]\n  simp_rw [Finset.sum_const, Finset.card_univ, hPL, sum_lineCount_eq_sum_pointCount]\nhave step2 : ∑ i in s, lineCount L i.1 = ∑ i in s, pointCount P i.2 :=\n  by\n  rw [s.sum_finset_product Finset.univ fun p => Set.toFinset {l | p ∈ l}]\n  rw [s.sum_finset_product_right Finset.univ fun l => Set.toFinset {p | p ∈ l}]\n  refine'\n    (Finset.sum_bij (fun l _ => f l) (fun l _ => Finset.mem_univ (f l)) (fun l hl => _) (fun _ _ _ _ h => hf1.1 h)\n        fun p _ => _).symm\n  · simp_rw [Finset.sum_const, Set.toFinset_card, ← Nat.card_eq_fintype_card]\n    change pointCount P l • pointCount P l = lineCount L (f l) • lineCount L (f l)\n    rw [hf2]\n  · obtain ⟨l, hl⟩ := hf1.2 p\n    exact ⟨l, Finset.mem_univ l, hl.symm⟩\n  all_goals simp_rw [Finset.mem_univ, true_and_iff, Set.mem_toFinset]; exact fun p => Iff.rfl\nhave step3 : ∑ i in sᶜ, lineCount L i.1 = ∑ i in sᶜ, pointCount P i.2 := by\n  rwa [← s.sum_add_sum_compl, ← s.sum_add_sum_compl, step2, add_left_cancel_iff] at step1 \nrw [← Set.toFinset_compl] at step3 \nexact\n  ((Finset.sum_eq_sum_iff_of_le fun i hi => HasLines.pointCount_le_lineCount (by exact Set.mem_toFinset.mp hi)).mp\n      step3.symm (p, l) (Set.mem_toFinset.mpr hpl)).symm\n[GOAL]\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : HasLines P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\nhPL : Fintype.card P = Fintype.card L\np : P\nl : L\nhpl : ¬p ∈ l\n⊢ lineCount L p = pointCount P l\n[PROOFSTEP]\nobtain ⟨f, hf1, hf2⟩ := HasLines.exists_bijective_of_card_eq hPL\n[GOAL]\ncase intro.intro\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : HasLines P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\nhPL : Fintype.card P = Fintype.card L\np : P\nl : L\nhpl : ¬p ∈ l\nf : L → P\nhf1 : Function.Bijective f\nhf2 : ∀ (l : L), pointCount P l = lineCount L (f l)\n⊢ lineCount L p = pointCount P l\n[PROOFSTEP]\nlet s : Finset (P × L) := Set.toFinset {i | i.1 ∈ i.2}\n[GOAL]\ncase intro.intro\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : HasLines P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\nhPL : Fintype.card P = Fintype.card L\np : P\nl : L\nhpl : ¬p ∈ l\nf : L → P\nhf1 : Function.Bijective f\nhf2 : ∀ (l : L), pointCount P l = lineCount L (f l)\ns : Finset (P × L) := Set.toFinset {i | i.fst ∈ i.snd}\n⊢ lineCount L p = pointCount P l\n[PROOFSTEP]\nhave step1 : ∑ i : P × L, lineCount L i.1 = ∑ i : P × L, pointCount P i.2 :=\n  by\n  rw [← Finset.univ_product_univ, Finset.sum_product_right, Finset.sum_product]\n  simp_rw [Finset.sum_const, Finset.card_univ, hPL, sum_lineCount_eq_sum_pointCount]\n[GOAL]\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : HasLines P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\nhPL : Fintype.card P = Fintype.card L\np : P\nl : L\nhpl : ¬p ∈ l\nf : L → P\nhf1 : Function.Bijective f\nhf2 : ∀ (l : L), pointCount P l = lineCount L (f l)\ns : Finset (P × L) := Set.toFinset {i | i.fst ∈ i.snd}\n⊢ ∑ i : P × L, lineCount L i.fst = ∑ i : P × L, pointCount P i.snd\n[PROOFSTEP]\nrw [← Finset.univ_product_univ, Finset.sum_product_right, Finset.sum_product]\n[GOAL]\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : HasLines P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\nhPL : Fintype.card P = Fintype.card L\np : P\nl : L\nhpl : ¬p ∈ l\nf : L → P\nhf1 : Function.Bijective f\nhf2 : ∀ (l : L), pointCount P l = lineCount L (f l)\ns : Finset (P × L) := Set.toFinset {i | i.fst ∈ i.snd}\n⊢ ∑ y : L, ∑ x : P, lineCount L (x, y).fst = ∑ x : P, ∑ y : L, pointCount P (x, y).snd\n[PROOFSTEP]\nsimp_rw [Finset.sum_const, Finset.card_univ, hPL, sum_lineCount_eq_sum_pointCount]\n[GOAL]\ncase intro.intro\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : HasLines P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\nhPL : Fintype.card P = Fintype.card L\np : P\nl : L\nhpl : ¬p ∈ l\nf : L → P\nhf1 : Function.Bijective f\nhf2 : ∀ (l : L), pointCount P l = lineCount L (f l)\ns : Finset (P × L) := Set.toFinset {i | i.fst ∈ i.snd}\nstep1 : ∑ i : P × L, lineCount L i.fst = ∑ i : P × L, pointCount P i.snd\n⊢ lineCount L p = pointCount P l\n[PROOFSTEP]\nhave step2 : ∑ i in s, lineCount L i.1 = ∑ i in s, pointCount P i.2 :=\n  by\n  rw [s.sum_finset_product Finset.univ fun p => Set.toFinset {l | p ∈ l}]\n  rw [s.sum_finset_product_right Finset.univ fun l => Set.toFinset {p | p ∈ l}]\n  refine'\n    (Finset.sum_bij (fun l _ => f l) (fun l _ => Finset.mem_univ (f l)) (fun l hl => _) (fun _ _ _ _ h => hf1.1 h)\n        fun p _ => _).symm\n  · simp_rw [Finset.sum_const, Set.toFinset_card, ← Nat.card_eq_fintype_card]\n    change pointCount P l • pointCount P l = lineCount L (f l) • lineCount L (f l)\n    rw [hf2]\n  · obtain ⟨l, hl⟩ := hf1.2 p\n    exact ⟨l, Finset.mem_univ l, hl.symm⟩\n  all_goals simp_rw [Finset.mem_univ, true_and_iff, Set.mem_toFinset]; exact fun p => Iff.rfl\n[GOAL]\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : HasLines P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\nhPL : Fintype.card P = Fintype.card L\np : P\nl : L\nhpl : ¬p ∈ l\nf : L → P\nhf1 : Function.Bijective f\nhf2 : ∀ (l : L), pointCount P l = lineCount L (f l)\ns : Finset (P × L) := Set.toFinset {i | i.fst ∈ i.snd}\nstep1 : ∑ i : P × L, lineCount L i.fst = ∑ i : P × L, pointCount P i.snd\n⊢ ∑ i in s, lineCount L i.fst = ∑ i in s, pointCount P i.snd\n[PROOFSTEP]\nrw [s.sum_finset_product Finset.univ fun p => Set.toFinset {l | p ∈ l}]\n[GOAL]\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : HasLines P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\nhPL : Fintype.card P = Fintype.card L\np : P\nl : L\nhpl : ¬p ∈ l\nf : L → P\nhf1 : Function.Bijective f\nhf2 : ∀ (l : L), pointCount P l = lineCount L (f l)\ns : Finset (P × L) := Set.toFinset {i | i.fst ∈ i.snd}\nstep1 : ∑ i : P × L, lineCount L i.fst = ∑ i : P × L, pointCount P i.snd\n⊢ ∑ c : P, ∑ a in Set.toFinset {l | c ∈ l}, lineCount L (c, a).fst = ∑ i in s, pointCount P i.snd\ncase h\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : HasLines P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\nhPL : Fintype.card P = Fintype.card L\np : P\nl : L\nhpl : ¬p ∈ l\nf : L → P\nhf1 : Function.Bijective f\nhf2 : ∀ (l : L), pointCount P l = lineCount L (f l)\ns : Finset (P × L) := Set.toFinset {i | i.fst ∈ i.snd}\nstep1 : ∑ i : P × L, lineCount L i.fst = ∑ i : P × L, pointCount P i.snd\n⊢ ∀ (p : P × L), p ∈ s ↔ p.fst ∈ Finset.univ ∧ p.snd ∈ Set.toFinset {l | p.fst ∈ l}\n[PROOFSTEP]\nrw [s.sum_finset_product_right Finset.univ fun l => Set.toFinset {p | p ∈ l}]\n[GOAL]\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : HasLines P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\nhPL : Fintype.card P = Fintype.card L\np : P\nl : L\nhpl : ¬p ∈ l\nf : L → P\nhf1 : Function.Bijective f\nhf2 : ∀ (l : L), pointCount P l = lineCount L (f l)\ns : Finset (P × L) := Set.toFinset {i | i.fst ∈ i.snd}\nstep1 : ∑ i : P × L, lineCount L i.fst = ∑ i : P × L, pointCount P i.snd\n⊢ ∑ c : P, ∑ a in Set.toFinset {l | c ∈ l}, lineCount L (c, a).fst =\n    ∑ c : L, ∑ a in Set.toFinset {p | p ∈ c}, pointCount P (a, c).snd\ncase h\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : HasLines P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\nhPL : Fintype.card P = Fintype.card L\np : P\nl : L\nhpl : ¬p ∈ l\nf : L → P\nhf1 : Function.Bijective f\nhf2 : ∀ (l : L), pointCount P l = lineCount L (f l)\ns : Finset (P × L) := Set.toFinset {i | i.fst ∈ i.snd}\nstep1 : ∑ i : P × L, lineCount L i.fst = ∑ i : P × L, pointCount P i.snd\n⊢ ∀ (p : P × L), p ∈ s ↔ p.snd ∈ Finset.univ ∧ p.fst ∈ Set.toFinset {p_1 | p_1 ∈ p.snd}\ncase h\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : HasLines P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\nhPL : Fintype.card P = Fintype.card L\np : P\nl : L\nhpl : ¬p ∈ l\nf : L → P\nhf1 : Function.Bijective f\nhf2 : ∀ (l : L), pointCount P l = lineCount L (f l)\ns : Finset (P × L) := Set.toFinset {i | i.fst ∈ i.snd}\nstep1 : ∑ i : P × L, lineCount L i.fst = ∑ i : P × L, pointCount P i.snd\n⊢ ∀ (p : P × L), p ∈ s ↔ p.fst ∈ Finset.univ ∧ p.snd ∈ Set.toFinset {l | p.fst ∈ l}\n[PROOFSTEP]\nrefine'\n  (Finset.sum_bij (fun l _ => f l) (fun l _ => Finset.mem_univ (f l)) (fun l hl => _) (fun _ _ _ _ h => hf1.1 h)\n      fun p _ => _).symm\n[GOAL]\ncase refine'_1\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : HasLines P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\nhPL : Fintype.card P = Fintype.card L\np : P\nl✝ : L\nhpl : ¬p ∈ l✝\nf : L → P\nhf1 : Function.Bijective f\nhf2 : ∀ (l : L), pointCount P l = lineCount L (f l)\ns : Finset (P × L) := Set.toFinset {i | i.fst ∈ i.snd}\nstep1 : ∑ i : P × L, lineCount L i.fst = ∑ i : P × L, pointCount P i.snd\nl : L\nhl : l ∈ Finset.univ\n⊢ ∑ a in Set.toFinset {p | p ∈ l}, pointCount P (a, l).snd =\n    ∑ a in Set.toFinset {l_1 | (fun l x => f l) l hl ∈ l_1}, lineCount L ((fun l x => f l) l hl, a).fst\n[PROOFSTEP]\nsimp_rw [Finset.sum_const, Set.toFinset_card, ← Nat.card_eq_fintype_card]\n[GOAL]\ncase refine'_1\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : HasLines P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\nhPL : Fintype.card P = Fintype.card L\np : P\nl✝ : L\nhpl : ¬p ∈ l✝\nf : L → P\nhf1 : Function.Bijective f\nhf2 : ∀ (l : L), pointCount P l = lineCount L (f l)\ns : Finset (P × L) := Set.toFinset {i | i.fst ∈ i.snd}\nstep1 : ∑ i : P × L, lineCount L i.fst = ∑ i : P × L, pointCount P i.snd\nl : L\nhl : l ∈ Finset.univ\n⊢ Nat.card ↑{p | p ∈ l} • pointCount P l = Nat.card ↑{l_1 | f l ∈ l_1} • lineCount L (f l)\n[PROOFSTEP]\nchange pointCount P l • pointCount P l = lineCount L (f l) • lineCount L (f l)\n[GOAL]\ncase refine'_1\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : HasLines P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\nhPL : Fintype.card P = Fintype.card L\np : P\nl✝ : L\nhpl : ¬p ∈ l✝\nf : L → P\nhf1 : Function.Bijective f\nhf2 : ∀ (l : L), pointCount P l = lineCount L (f l)\ns : Finset (P × L) := Set.toFinset {i | i.fst ∈ i.snd}\nstep1 : ∑ i : P × L, lineCount L i.fst = ∑ i : P × L, pointCount P i.snd\nl : L\nhl : l ∈ Finset.univ\n⊢ pointCount P l • pointCount P l = lineCount L (f l) • lineCount L (f l)\n[PROOFSTEP]\nrw [hf2]\n[GOAL]\ncase refine'_2\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : HasLines P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\nhPL : Fintype.card P = Fintype.card L\np✝ : P\nl : L\nhpl : ¬p✝ ∈ l\nf : L → P\nhf1 : Function.Bijective f\nhf2 : ∀ (l : L), pointCount P l = lineCount L (f l)\ns : Finset (P × L) := Set.toFinset {i | i.fst ∈ i.snd}\nstep1 : ∑ i : P × L, lineCount L i.fst = ∑ i : P × L, pointCount P i.snd\np : P\nx✝ : p ∈ Finset.univ\n⊢ ∃ a ha, p = (fun l x => f l) a ha\n[PROOFSTEP]\nobtain ⟨l, hl⟩ := hf1.2 p\n[GOAL]\ncase refine'_2.intro\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : HasLines P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\nhPL : Fintype.card P = Fintype.card L\np✝ : P\nl✝ : L\nhpl : ¬p✝ ∈ l✝\nf : L → P\nhf1 : Function.Bijective f\nhf2 : ∀ (l : L), pointCount P l = lineCount L (f l)\ns : Finset (P × L) := Set.toFinset {i | i.fst ∈ i.snd}\nstep1 : ∑ i : P × L, lineCount L i.fst = ∑ i : P × L, pointCount P i.snd\np : P\nx✝ : p ∈ Finset.univ\nl : L\nhl : f l = p\n⊢ ∃ a ha, p = (fun l x => f l) a ha\n[PROOFSTEP]\nexact ⟨l, Finset.mem_univ l, hl.symm⟩\n[GOAL]\ncase h\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : HasLines P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\nhPL : Fintype.card P = Fintype.card L\np : P\nl : L\nhpl : ¬p ∈ l\nf : L → P\nhf1 : Function.Bijective f\nhf2 : ∀ (l : L), pointCount P l = lineCount L (f l)\ns : Finset (P × L) := Set.toFinset {i | i.fst ∈ i.snd}\nstep1 : ∑ i : P × L, lineCount L i.fst = ∑ i : P × L, pointCount P i.snd\n⊢ ∀ (p : P × L), p ∈ s ↔ p.snd ∈ Finset.univ ∧ p.fst ∈ Set.toFinset {p_1 | p_1 ∈ p.snd}\ncase h\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : HasLines P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\nhPL : Fintype.card P = Fintype.card L\np : P\nl : L\nhpl : ¬p ∈ l\nf : L → P\nhf1 : Function.Bijective f\nhf2 : ∀ (l : L), pointCount P l = lineCount L (f l)\ns : Finset (P × L) := Set.toFinset {i | i.fst ∈ i.snd}\nstep1 : ∑ i : P × L, lineCount L i.fst = ∑ i : P × L, pointCount P i.snd\n⊢ ∀ (p : P × L), p ∈ s ↔ p.fst ∈ Finset.univ ∧ p.snd ∈ Set.toFinset {l | p.fst ∈ l}\n[PROOFSTEP]\nall_goals simp_rw [Finset.mem_univ, true_and_iff, Set.mem_toFinset]; exact fun p => Iff.rfl\n[GOAL]\ncase h\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : HasLines P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\nhPL : Fintype.card P = Fintype.card L\np : P\nl : L\nhpl : ¬p ∈ l\nf : L → P\nhf1 : Function.Bijective f\nhf2 : ∀ (l : L), pointCount P l = lineCount L (f l)\ns : Finset (P × L) := Set.toFinset {i | i.fst ∈ i.snd}\nstep1 : ∑ i : P × L, lineCount L i.fst = ∑ i : P × L, pointCount P i.snd\n⊢ ∀ (p : P × L), p ∈ s ↔ p.snd ∈ Finset.univ ∧ p.fst ∈ Set.toFinset {p_1 | p_1 ∈ p.snd}\n[PROOFSTEP]\nsimp_rw [Finset.mem_univ, true_and_iff, Set.mem_toFinset]\n[GOAL]\ncase h\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : HasLines P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\nhPL : Fintype.card P = Fintype.card L\np : P\nl : L\nhpl : ¬p ∈ l\nf : L → P\nhf1 : Function.Bijective f\nhf2 : ∀ (l : L), pointCount P l = lineCount L (f l)\ns : Finset (P × L) := Set.toFinset {i | i.fst ∈ i.snd}\nstep1 : ∑ i : P × L, lineCount L i.fst = ∑ i : P × L, pointCount P i.snd\n⊢ ∀ (p : P × L), p ∈ {i | i.fst ∈ i.snd} ↔ p.fst ∈ {p_1 | p_1 ∈ p.snd}\n[PROOFSTEP]\nexact fun p => Iff.rfl\n[GOAL]\ncase h\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : HasLines P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\nhPL : Fintype.card P = Fintype.card L\np : P\nl : L\nhpl : ¬p ∈ l\nf : L → P\nhf1 : Function.Bijective f\nhf2 : ∀ (l : L), pointCount P l = lineCount L (f l)\ns : Finset (P × L) := Set.toFinset {i | i.fst ∈ i.snd}\nstep1 : ∑ i : P × L, lineCount L i.fst = ∑ i : P × L, pointCount P i.snd\n⊢ ∀ (p : P × L), p ∈ s ↔ p.fst ∈ Finset.univ ∧ p.snd ∈ Set.toFinset {l | p.fst ∈ l}\n[PROOFSTEP]\nsimp_rw [Finset.mem_univ, true_and_iff, Set.mem_toFinset]\n[GOAL]\ncase h\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : HasLines P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\nhPL : Fintype.card P = Fintype.card L\np : P\nl : L\nhpl : ¬p ∈ l\nf : L → P\nhf1 : Function.Bijective f\nhf2 : ∀ (l : L), pointCount P l = lineCount L (f l)\ns : Finset (P × L) := Set.toFinset {i | i.fst ∈ i.snd}\nstep1 : ∑ i : P × L, lineCount L i.fst = ∑ i : P × L, pointCount P i.snd\n⊢ ∀ (p : P × L), p ∈ {i | i.fst ∈ i.snd} ↔ p.snd ∈ {l | p.fst ∈ l}\n[PROOFSTEP]\nexact fun p => Iff.rfl\n[GOAL]\ncase intro.intro\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : HasLines P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\nhPL : Fintype.card P = Fintype.card L\np : P\nl : L\nhpl : ¬p ∈ l\nf : L → P\nhf1 : Function.Bijective f\nhf2 : ∀ (l : L), pointCount P l = lineCount L (f l)\ns : Finset (P × L) := Set.toFinset {i | i.fst ∈ i.snd}\nstep1 : ∑ i : P × L, lineCount L i.fst = ∑ i : P × L, pointCount P i.snd\nstep2 : ∑ i in s, lineCount L i.fst = ∑ i in s, pointCount P i.snd\n⊢ lineCount L p = pointCount P l\n[PROOFSTEP]\nhave step3 : ∑ i in sᶜ, lineCount L i.1 = ∑ i in sᶜ, pointCount P i.2 := by\n  rwa [← s.sum_add_sum_compl, ← s.sum_add_sum_compl, step2, add_left_cancel_iff] at step1 \n[GOAL]\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : HasLines P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\nhPL : Fintype.card P = Fintype.card L\np : P\nl : L\nhpl : ¬p ∈ l\nf : L → P\nhf1 : Function.Bijective f\nhf2 : ∀ (l : L), pointCount P l = lineCount L (f l)\ns : Finset (P × L) := Set.toFinset {i | i.fst ∈ i.snd}\nstep1 : ∑ i : P × L, lineCount L i.fst = ∑ i : P × L, pointCount P i.snd\nstep2 : ∑ i in s, lineCount L i.fst = ∑ i in s, pointCount P i.snd\n⊢ ∑ i in sᶜ, lineCount L i.fst = ∑ i in sᶜ, pointCount P i.snd\n[PROOFSTEP]\nrwa [← s.sum_add_sum_compl, ← s.sum_add_sum_compl, step2, add_left_cancel_iff] at step1 \n[GOAL]\ncase intro.intro\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : HasLines P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\nhPL : Fintype.card P = Fintype.card L\np : P\nl : L\nhpl : ¬p ∈ l\nf : L → P\nhf1 : Function.Bijective f\nhf2 : ∀ (l : L), pointCount P l = lineCount L (f l)\ns : Finset (P × L) := Set.toFinset {i | i.fst ∈ i.snd}\nstep1 : ∑ i : P × L, lineCount L i.fst = ∑ i : P × L, pointCount P i.snd\nstep2 : ∑ i in s, lineCount L i.fst = ∑ i in s, pointCount P i.snd\nstep3 : ∑ i in sᶜ, lineCount L i.fst = ∑ i in sᶜ, pointCount P i.snd\n⊢ lineCount L p = pointCount P l\n[PROOFSTEP]\nrw [← Set.toFinset_compl] at step3 \n[GOAL]\ncase intro.intro\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : HasLines P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\nhPL : Fintype.card P = Fintype.card L\np : P\nl : L\nhpl : ¬p ∈ l\nf : L → P\nhf1 : Function.Bijective f\nhf2 : ∀ (l : L), pointCount P l = lineCount L (f l)\ns : Finset (P × L) := Set.toFinset {i | i.fst ∈ i.snd}\nstep1 : ∑ i : P × L, lineCount L i.fst = ∑ i : P × L, pointCount P i.snd\nstep2 : ∑ i in s, lineCount L i.fst = ∑ i in s, pointCount P i.snd\nstep3 :\n  ∑ i in Set.toFinset {i | i.fst ∈ i.snd}ᶜ, lineCount L i.fst =\n    ∑ i in Set.toFinset {i | i.fst ∈ i.snd}ᶜ, pointCount P i.snd\n⊢ lineCount L p = pointCount P l\n[PROOFSTEP]\nexact\n  ((Finset.sum_eq_sum_iff_of_le fun i hi => HasLines.pointCount_le_lineCount (by exact Set.mem_toFinset.mp hi)).mp\n      step3.symm (p, l) (Set.mem_toFinset.mpr hpl)).symm\n[GOAL]\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : HasLines P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\nhPL : Fintype.card P = Fintype.card L\np : P\nl : L\nhpl : ¬p ∈ l\nf : L → P\nhf1 : Function.Bijective f\nhf2 : ∀ (l : L), pointCount P l = lineCount L (f l)\ns : Finset (P × L) := Set.toFinset {i | i.fst ∈ i.snd}\nstep1 : ∑ i : P × L, lineCount L i.fst = ∑ i : P × L, pointCount P i.snd\nstep2 : ∑ i in s, lineCount L i.fst = ∑ i in s, pointCount P i.snd\nstep3 :\n  ∑ i in Set.toFinset {i | i.fst ∈ i.snd}ᶜ, lineCount L i.fst =\n    ∑ i in Set.toFinset {i | i.fst ∈ i.snd}ᶜ, pointCount P i.snd\ni : P × L\nhi : i ∈ Set.toFinset {i | i.fst ∈ i.snd}ᶜ\n⊢ ¬i.fst ∈ i.snd\n[PROOFSTEP]\nexact Set.mem_toFinset.mp hi\n[GOAL]\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : HasLines P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\nh : Fintype.card P = Fintype.card L\nl₁ l₂ : L\nhl : l₁ ≠ l₂\n⊢ ∃ p, p ∈ l₁ ∧ p ∈ l₂\n[PROOFSTEP]\nclassical\nobtain ⟨f, _, hf2⟩ := HasLines.exists_bijective_of_card_eq h\nhaveI : Nontrivial L := ⟨⟨l₁, l₂, hl⟩⟩\nhaveI := Fintype.one_lt_card_iff_nontrivial.mp ((congr_arg _ h).mpr Fintype.one_lt_card)\nhave h₁ : ∀ p : P, 0 < lineCount L p := fun p =>\n  Exists.elim (exists_ne p) fun q hq =>\n    (congr_arg _ Nat.card_eq_fintype_card).mpr (Fintype.card_pos_iff.mpr ⟨⟨mkLine hq, (mkLine_ax hq).2⟩⟩)\nhave h₂ : ∀ l : L, 0 < pointCount P l := fun l => (congr_arg _ (hf2 l)).mpr (h₁ (f l))\nobtain ⟨p, hl₁⟩ := Fintype.card_pos_iff.mp ((congr_arg _ Nat.card_eq_fintype_card).mp (h₂ l₁))\nby_cases hl₂ : p ∈ l₂\nexact ⟨p, hl₁, hl₂⟩\nhave key' : Fintype.card { q : P // q ∈ l₂ } = Fintype.card { l : L // p ∈ l } :=\n  ((HasLines.lineCount_eq_pointCount h hl₂).trans Nat.card_eq_fintype_card).symm.trans Nat.card_eq_fintype_card\nhave : ∀ q : { q // q ∈ l₂ }, p ≠ q := fun q hq => hl₂ ((congr_arg (· ∈ l₂) hq).mpr q.2)\nlet f : { q : P // q ∈ l₂ } → { l : L // p ∈ l } := fun q => ⟨mkLine (this q), (mkLine_ax (this q)).1⟩\nhave hf : Function.Injective f := fun q₁ q₂ hq =>\n  Subtype.ext\n    ((eq_or_eq q₁.2 q₂.2 (mkLine_ax (this q₁)).2\n          ((congr_arg _ (Subtype.ext_iff.mp hq)).mpr (mkLine_ax (this q₂)).2)).resolve_right\n      fun h => (congr_arg (¬p ∈ ·) h).mp hl₂ (mkLine_ax (this q₁)).1)\nhave key' := ((Fintype.bijective_iff_injective_and_card f).mpr ⟨hf, key'⟩).2\nobtain ⟨q, hq⟩ := key' ⟨l₁, hl₁⟩\nexact ⟨q, (congr_arg _ (Subtype.ext_iff.mp hq)).mp (mkLine_ax (this q)).2, q.2⟩\n[GOAL]\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : HasLines P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\nh : Fintype.card P = Fintype.card L\nl₁ l₂ : L\nhl : l₁ ≠ l₂\n⊢ ∃ p, p ∈ l₁ ∧ p ∈ l₂\n[PROOFSTEP]\nobtain ⟨f, _, hf2⟩ := HasLines.exists_bijective_of_card_eq h\n[GOAL]\ncase intro.intro\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : HasLines P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\nh : Fintype.card P = Fintype.card L\nl₁ l₂ : L\nhl : l₁ ≠ l₂\nf : L → P\nleft✝ : Function.Bijective f\nhf2 : ∀ (l : L), pointCount P l = lineCount L (f l)\n⊢ ∃ p, p ∈ l₁ ∧ p ∈ l₂\n[PROOFSTEP]\nhaveI : Nontrivial L := ⟨⟨l₁, l₂, hl⟩⟩\n[GOAL]\ncase intro.intro\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : HasLines P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\nh : Fintype.card P = Fintype.card L\nl₁ l₂ : L\nhl : l₁ ≠ l₂\nf : L → P\nleft✝ : Function.Bijective f\nhf2 : ∀ (l : L), pointCount P l = lineCount L (f l)\nthis : Nontrivial L\n⊢ ∃ p, p ∈ l₁ ∧ p ∈ l₂\n[PROOFSTEP]\nhaveI := Fintype.one_lt_card_iff_nontrivial.mp ((congr_arg _ h).mpr Fintype.one_lt_card)\n[GOAL]\ncase intro.intro\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : HasLines P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\nh : Fintype.card P = Fintype.card L\nl₁ l₂ : L\nhl : l₁ ≠ l₂\nf : L → P\nleft✝ : Function.Bijective f\nhf2 : ∀ (l : L), pointCount P l = lineCount L (f l)\nthis✝ : Nontrivial L\nthis : Nontrivial P\n⊢ ∃ p, p ∈ l₁ ∧ p ∈ l₂\n[PROOFSTEP]\nhave h₁ : ∀ p : P, 0 < lineCount L p := fun p =>\n  Exists.elim (exists_ne p) fun q hq =>\n    (congr_arg _ Nat.card_eq_fintype_card).mpr (Fintype.card_pos_iff.mpr ⟨⟨mkLine hq, (mkLine_ax hq).2⟩⟩)\n[GOAL]\ncase intro.intro\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : HasLines P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\nh : Fintype.card P = Fintype.card L\nl₁ l₂ : L\nhl : l₁ ≠ l₂\nf : L → P\nleft✝ : Function.Bijective f\nhf2 : ∀ (l : L), pointCount P l = lineCount L (f l)\nthis✝ : Nontrivial L\nthis : Nontrivial P\nh₁ : ∀ (p : P), 0 < lineCount L p\n⊢ ∃ p, p ∈ l₁ ∧ p ∈ l₂\n[PROOFSTEP]\nhave h₂ : ∀ l : L, 0 < pointCount P l := fun l => (congr_arg _ (hf2 l)).mpr (h₁ (f l))\n[GOAL]\ncase intro.intro\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : HasLines P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\nh : Fintype.card P = Fintype.card L\nl₁ l₂ : L\nhl : l₁ ≠ l₂\nf : L → P\nleft✝ : Function.Bijective f\nhf2 : ∀ (l : L), pointCount P l = lineCount L (f l)\nthis✝ : Nontrivial L\nthis : Nontrivial P\nh₁ : ∀ (p : P), 0 < lineCount L p\nh₂ : ∀ (l : L), 0 < pointCount P l\n⊢ ∃ p, p ∈ l₁ ∧ p ∈ l₂\n[PROOFSTEP]\nobtain ⟨p, hl₁⟩ := Fintype.card_pos_iff.mp ((congr_arg _ Nat.card_eq_fintype_card).mp (h₂ l₁))\n[GOAL]\ncase intro.intro.intro.mk\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : HasLines P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\nh : Fintype.card P = Fintype.card L\nl₁ l₂ : L\nhl : l₁ ≠ l₂\nf : L → P\nleft✝ : Function.Bijective f\nhf2 : ∀ (l : L), pointCount P l = lineCount L (f l)\nthis✝ : Nontrivial L\nthis : Nontrivial P\nh₁ : ∀ (p : P), 0 < lineCount L p\nh₂ : ∀ (l : L), 0 < pointCount P l\np : P\nhl₁ : p ∈ l₁\n⊢ ∃ p, p ∈ l₁ ∧ p ∈ l₂\n[PROOFSTEP]\nby_cases hl₂ : p ∈ l₂\n[GOAL]\ncase pos\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : HasLines P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\nh : Fintype.card P = Fintype.card L\nl₁ l₂ : L\nhl : l₁ ≠ l₂\nf : L → P\nleft✝ : Function.Bijective f\nhf2 : ∀ (l : L), pointCount P l = lineCount L (f l)\nthis✝ : Nontrivial L\nthis : Nontrivial P\nh₁ : ∀ (p : P), 0 < lineCount L p\nh₂ : ∀ (l : L), 0 < pointCount P l\np : P\nhl₁ : p ∈ l₁\nhl₂ : p ∈ l₂\n⊢ ∃ p, p ∈ l₁ ∧ p ∈ l₂\ncase neg\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : HasLines P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\nh : Fintype.card P = Fintype.card L\nl₁ l₂ : L\nhl : l₁ ≠ l₂\nf : L → P\nleft✝ : Function.Bijective f\nhf2 : ∀ (l : L), pointCount P l = lineCount L (f l)\nthis✝ : Nontrivial L\nthis : Nontrivial P\nh₁ : ∀ (p : P), 0 < lineCount L p\nh₂ : ∀ (l : L), 0 < pointCount P l\np : P\nhl₁ : p ∈ l₁\nhl₂ : ¬p ∈ l₂\n⊢ ∃ p, p ∈ l₁ ∧ p ∈ l₂\n[PROOFSTEP]\nexact ⟨p, hl₁, hl₂⟩\n[GOAL]\ncase neg\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : HasLines P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\nh : Fintype.card P = Fintype.card L\nl₁ l₂ : L\nhl : l₁ ≠ l₂\nf : L → P\nleft✝ : Function.Bijective f\nhf2 : ∀ (l : L), pointCount P l = lineCount L (f l)\nthis✝ : Nontrivial L\nthis : Nontrivial P\nh₁ : ∀ (p : P), 0 < lineCount L p\nh₂ : ∀ (l : L), 0 < pointCount P l\np : P\nhl₁ : p ∈ l₁\nhl₂ : ¬p ∈ l₂\n⊢ ∃ p, p ∈ l₁ ∧ p ∈ l₂\n[PROOFSTEP]\nhave key' : Fintype.card { q : P // q ∈ l₂ } = Fintype.card { l : L // p ∈ l } :=\n  ((HasLines.lineCount_eq_pointCount h hl₂).trans Nat.card_eq_fintype_card).symm.trans Nat.card_eq_fintype_card\n[GOAL]\ncase neg\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : HasLines P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\nh : Fintype.card P = Fintype.card L\nl₁ l₂ : L\nhl : l₁ ≠ l₂\nf : L → P\nleft✝ : Function.Bijective f\nhf2 : ∀ (l : L), pointCount P l = lineCount L (f l)\nthis✝ : Nontrivial L\nthis : Nontrivial P\nh₁ : ∀ (p : P), 0 < lineCount L p\nh₂ : ∀ (l : L), 0 < pointCount P l\np : P\nhl₁ : p ∈ l₁\nhl₂ : ¬p ∈ l₂\nkey' : Fintype.card { q // q ∈ l₂ } = Fintype.card { l // p ∈ l }\n⊢ ∃ p, p ∈ l₁ ∧ p ∈ l₂\n[PROOFSTEP]\nhave : ∀ q : { q // q ∈ l₂ }, p ≠ q := fun q hq => hl₂ ((congr_arg (· ∈ l₂) hq).mpr q.2)\n[GOAL]\ncase neg\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : HasLines P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\nh : Fintype.card P = Fintype.card L\nl₁ l₂ : L\nhl : l₁ ≠ l₂\nf : L → P\nleft✝ : Function.Bijective f\nhf2 : ∀ (l : L), pointCount P l = lineCount L (f l)\nthis✝¹ : Nontrivial L\nthis✝ : Nontrivial P\nh₁ : ∀ (p : P), 0 < lineCount L p\nh₂ : ∀ (l : L), 0 < pointCount P l\np : P\nhl₁ : p ∈ l₁\nhl₂ : ¬p ∈ l₂\nkey' : Fintype.card { q // q ∈ l₂ } = Fintype.card { l // p ∈ l }\nthis : ∀ (q : { q // q ∈ l₂ }), p ≠ ↑q\n⊢ ∃ p, p ∈ l₁ ∧ p ∈ l₂\n[PROOFSTEP]\nlet f : { q : P // q ∈ l₂ } → { l : L // p ∈ l } := fun q => ⟨mkLine (this q), (mkLine_ax (this q)).1⟩\n[GOAL]\ncase neg\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : HasLines P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\nh : Fintype.card P = Fintype.card L\nl₁ l₂ : L\nhl : l₁ ≠ l₂\nf✝ : L → P\nleft✝ : Function.Bijective f✝\nhf2 : ∀ (l : L), pointCount P l = lineCount L (f✝ l)\nthis✝¹ : Nontrivial L\nthis✝ : Nontrivial P\nh₁ : ∀ (p : P), 0 < lineCount L p\nh₂ : ∀ (l : L), 0 < pointCount P l\np : P\nhl₁ : p ∈ l₁\nhl₂ : ¬p ∈ l₂\nkey' : Fintype.card { q // q ∈ l₂ } = Fintype.card { l // p ∈ l }\nthis : ∀ (q : { q // q ∈ l₂ }), p ≠ ↑q\nf : { q // q ∈ l₂ } → { l // p ∈ l } :=\n  fun q => { val := mkLine (_ : p ≠ ↑q), property := (_ : p ∈ mkLine (_ : p ≠ ↑q)) }\n⊢ ∃ p, p ∈ l₁ ∧ p ∈ l₂\n[PROOFSTEP]\nhave hf : Function.Injective f := fun q₁ q₂ hq =>\n  Subtype.ext\n    ((eq_or_eq q₁.2 q₂.2 (mkLine_ax (this q₁)).2\n          ((congr_arg _ (Subtype.ext_iff.mp hq)).mpr (mkLine_ax (this q₂)).2)).resolve_right\n      fun h => (congr_arg (¬p ∈ ·) h).mp hl₂ (mkLine_ax (this q₁)).1)\n[GOAL]\ncase neg\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : HasLines P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\nh : Fintype.card P = Fintype.card L\nl₁ l₂ : L\nhl : l₁ ≠ l₂\nf✝ : L → P\nleft✝ : Function.Bijective f✝\nhf2 : ∀ (l : L), pointCount P l = lineCount L (f✝ l)\nthis✝¹ : Nontrivial L\nthis✝ : Nontrivial P\nh₁ : ∀ (p : P), 0 < lineCount L p\nh₂ : ∀ (l : L), 0 < pointCount P l\np : P\nhl₁ : p ∈ l₁\nhl₂ : ¬p ∈ l₂\nkey' : Fintype.card { q // q ∈ l₂ } = Fintype.card { l // p ∈ l }\nthis : ∀ (q : { q // q ∈ l₂ }), p ≠ ↑q\nf : { q // q ∈ l₂ } → { l // p ∈ l } :=\n  fun q => { val := mkLine (_ : p ≠ ↑q), property := (_ : p ∈ mkLine (_ : p ≠ ↑q)) }\nhf : Function.Injective f\n⊢ ∃ p, p ∈ l₁ ∧ p ∈ l₂\n[PROOFSTEP]\nhave key' := ((Fintype.bijective_iff_injective_and_card f).mpr ⟨hf, key'⟩).2\n[GOAL]\ncase neg\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : HasLines P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\nh : Fintype.card P = Fintype.card L\nl₁ l₂ : L\nhl : l₁ ≠ l₂\nf✝ : L → P\nleft✝ : Function.Bijective f✝\nhf2 : ∀ (l : L), pointCount P l = lineCount L (f✝ l)\nthis✝¹ : Nontrivial L\nthis✝ : Nontrivial P\nh₁ : ∀ (p : P), 0 < lineCount L p\nh₂ : ∀ (l : L), 0 < pointCount P l\np : P\nhl₁ : p ∈ l₁\nhl₂ : ¬p ∈ l₂\nkey'✝ : Fintype.card { q // q ∈ l₂ } = Fintype.card { l // p ∈ l }\nthis : ∀ (q : { q // q ∈ l₂ }), p ≠ ↑q\nf : { q // q ∈ l₂ } → { l // p ∈ l } :=\n  fun q => { val := mkLine (_ : p ≠ ↑q), property := (_ : p ∈ mkLine (_ : p ≠ ↑q)) }\nhf : Function.Injective f\nkey' : Function.Surjective f\n⊢ ∃ p, p ∈ l₁ ∧ p ∈ l₂\n[PROOFSTEP]\nobtain ⟨q, hq⟩ := key' ⟨l₁, hl₁⟩\n[GOAL]\ncase neg.intro\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : HasLines P L\ninst✝¹ : Fintype P\ninst✝ : Fintype L\nh : Fintype.card P = Fintype.card L\nl₁ l₂ : L\nhl : l₁ ≠ l₂\nf✝ : L → P\nleft✝ : Function.Bijective f✝\nhf2 : ∀ (l : L), pointCount P l = lineCount L (f✝ l)\nthis✝¹ : Nontrivial L\nthis✝ : Nontrivial P\nh₁ : ∀ (p : P), 0 < lineCount L p\nh₂ : ∀ (l : L), 0 < pointCount P l\np : P\nhl₁ : p ∈ l₁\nhl₂ : ¬p ∈ l₂\nkey'✝ : Fintype.card { q // q ∈ l₂ } = Fintype.card { l // p ∈ l }\nthis : ∀ (q : { q // q ∈ l₂ }), p ≠ ↑q\nf : { q // q ∈ l₂ } → { l // p ∈ l } :=\n  fun q => { val := mkLine (_ : p ≠ ↑q), property := (_ : p ∈ mkLine (_ : p ≠ ↑q)) }\nhf : Function.Injective f\nkey' : Function.Surjective f\nq : { q // q ∈ l₂ }\nhq : f q = { val := l₁, property := hl₁ }\n⊢ ∃ p, p ∈ l₁ ∧ p ∈ l₂\n[PROOFSTEP]\nexact ⟨q, (congr_arg _ (Subtype.ext_iff.mp hq)).mp (mkLine_ax (this q)).2, q.2⟩\n[GOAL]\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : ProjectivePlane P L\ninst✝¹ : Finite P\ninst✝ : Finite L\np q : P\n⊢ lineCount L p = lineCount L q\n[PROOFSTEP]\ncases nonempty_fintype P\n[GOAL]\ncase intro\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : ProjectivePlane P L\ninst✝¹ : Finite P\ninst✝ : Finite L\np q : P\nval✝ : Fintype P\n⊢ lineCount L p = lineCount L q\n[PROOFSTEP]\ncases nonempty_fintype L\n[GOAL]\ncase intro.intro\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : ProjectivePlane P L\ninst✝¹ : Finite P\ninst✝ : Finite L\np q : P\nval✝¹ : Fintype P\nval✝ : Fintype L\n⊢ lineCount L p = lineCount L q\n[PROOFSTEP]\nobtain ⟨p₁, p₂, p₃, l₁, l₂, l₃, h₁₂, h₁₃, h₂₁, h₂₂, h₂₃, h₃₁, h₃₂, h₃₃⟩ := @exists_config P L _ _\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : ProjectivePlane P L\ninst✝¹ : Finite P\ninst✝ : Finite L\np q : P\nval✝¹ : Fintype P\nval✝ : Fintype L\np₁ p₂ p₃ : P\nl₁ l₂ l₃ : L\nh₁₂ : ¬p₁ ∈ l₂\nh₁₃ : ¬p₁ ∈ l₃\nh₂₁ : ¬p₂ ∈ l₁\nh₂₂ : p₂ ∈ l₂\nh₂₃ : p₂ ∈ l₃\nh₃₁ : ¬p₃ ∈ l₁\nh₃₂ : p₃ ∈ l₂\nh₃₃ : ¬p₃ ∈ l₃\n⊢ lineCount L p = lineCount L q\n[PROOFSTEP]\nhave h := card_points_eq_card_lines P L\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : ProjectivePlane P L\ninst✝¹ : Finite P\ninst✝ : Finite L\np q : P\nval✝¹ : Fintype P\nval✝ : Fintype L\np₁ p₂ p₃ : P\nl₁ l₂ l₃ : L\nh₁₂ : ¬p₁ ∈ l₂\nh₁₃ : ¬p₁ ∈ l₃\nh₂₁ : ¬p₂ ∈ l₁\nh₂₂ : p₂ ∈ l₂\nh₂₃ : p₂ ∈ l₃\nh₃₁ : ¬p₃ ∈ l₁\nh₃₂ : p₃ ∈ l₂\nh₃₃ : ¬p₃ ∈ l₃\nh : Fintype.card P = Fintype.card L\n⊢ lineCount L p = lineCount L q\n[PROOFSTEP]\nlet n := lineCount L p₂\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : ProjectivePlane P L\ninst✝¹ : Finite P\ninst✝ : Finite L\np q : P\nval✝¹ : Fintype P\nval✝ : Fintype L\np₁ p₂ p₃ : P\nl₁ l₂ l₃ : L\nh₁₂ : ¬p₁ ∈ l₂\nh₁₃ : ¬p₁ ∈ l₃\nh₂₁ : ¬p₂ ∈ l₁\nh₂₂ : p₂ ∈ l₂\nh₂₃ : p₂ ∈ l₃\nh₃₁ : ¬p₃ ∈ l₁\nh₃₂ : p₃ ∈ l₂\nh₃₃ : ¬p₃ ∈ l₃\nh : Fintype.card P = Fintype.card L\nn : ℕ := lineCount L p₂\n⊢ lineCount L p = lineCount L q\n[PROOFSTEP]\nhave hp₂ : lineCount L p₂ = n := rfl\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : ProjectivePlane P L\ninst✝¹ : Finite P\ninst✝ : Finite L\np q : P\nval✝¹ : Fintype P\nval✝ : Fintype L\np₁ p₂ p₃ : P\nl₁ l₂ l₃ : L\nh₁₂ : ¬p₁ ∈ l₂\nh₁₃ : ¬p₁ ∈ l₃\nh₂₁ : ¬p₂ ∈ l₁\nh₂₂ : p₂ ∈ l₂\nh₂₃ : p₂ ∈ l₃\nh₃₁ : ¬p₃ ∈ l₁\nh₃₂ : p₃ ∈ l₂\nh₃₃ : ¬p₃ ∈ l₃\nh : Fintype.card P = Fintype.card L\nn : ℕ := lineCount L p₂\nhp₂ : lineCount L p₂ = n\n⊢ lineCount L p = lineCount L q\n[PROOFSTEP]\nhave hl₁ : pointCount P l₁ = n := (HasLines.lineCount_eq_pointCount h h₂₁).symm.trans hp₂\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : ProjectivePlane P L\ninst✝¹ : Finite P\ninst✝ : Finite L\np q : P\nval✝¹ : Fintype P\nval✝ : Fintype L\np₁ p₂ p₃ : P\nl₁ l₂ l₃ : L\nh₁₂ : ¬p₁ ∈ l₂\nh₁₃ : ¬p₁ ∈ l₃\nh₂₁ : ¬p₂ ∈ l₁\nh₂₂ : p₂ ∈ l₂\nh₂₃ : p₂ ∈ l₃\nh₃₁ : ¬p₃ ∈ l₁\nh₃₂ : p₃ ∈ l₂\nh₃₃ : ¬p₃ ∈ l₃\nh : Fintype.card P = Fintype.card L\nn : ℕ := lineCount L p₂\nhp₂ : lineCount L p₂ = n\nhl₁ : pointCount P l₁ = n\n⊢ lineCount L p = lineCount L q\n[PROOFSTEP]\nhave hp₃ : lineCount L p₃ = n := (HasLines.lineCount_eq_pointCount h h₃₁).trans hl₁\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : ProjectivePlane P L\ninst✝¹ : Finite P\ninst✝ : Finite L\np q : P\nval✝¹ : Fintype P\nval✝ : Fintype L\np₁ p₂ p₃ : P\nl₁ l₂ l₃ : L\nh₁₂ : ¬p₁ ∈ l₂\nh₁₃ : ¬p₁ ∈ l₃\nh₂₁ : ¬p₂ ∈ l₁\nh₂₂ : p₂ ∈ l₂\nh₂₃ : p₂ ∈ l₃\nh₃₁ : ¬p₃ ∈ l₁\nh₃₂ : p₃ ∈ l₂\nh₃₃ : ¬p₃ ∈ l₃\nh : Fintype.card P = Fintype.card L\nn : ℕ := lineCount L p₂\nhp₂ : lineCount L p₂ = n\nhl₁ : pointCount P l₁ = n\nhp₃ : lineCount L p₃ = n\n⊢ lineCount L p = lineCount L q\n[PROOFSTEP]\nhave hl₃ : pointCount P l₃ = n := (HasLines.lineCount_eq_pointCount h h₃₃).symm.trans hp₃\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : ProjectivePlane P L\ninst✝¹ : Finite P\ninst✝ : Finite L\np q : P\nval✝¹ : Fintype P\nval✝ : Fintype L\np₁ p₂ p₃ : P\nl₁ l₂ l₃ : L\nh₁₂ : ¬p₁ ∈ l₂\nh₁₃ : ¬p₁ ∈ l₃\nh₂₁ : ¬p₂ ∈ l₁\nh₂₂ : p₂ ∈ l₂\nh₂₃ : p₂ ∈ l₃\nh₃₁ : ¬p₃ ∈ l₁\nh₃₂ : p₃ ∈ l₂\nh₃₃ : ¬p₃ ∈ l₃\nh : Fintype.card P = Fintype.card L\nn : ℕ := lineCount L p₂\nhp₂ : lineCount L p₂ = n\nhl₁ : pointCount P l₁ = n\nhp₃ : lineCount L p₃ = n\nhl₃ : pointCount P l₃ = n\n⊢ lineCount L p = lineCount L q\n[PROOFSTEP]\nhave hp₁ : lineCount L p₁ = n := (HasLines.lineCount_eq_pointCount h h₁₃).trans hl₃\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : ProjectivePlane P L\ninst✝¹ : Finite P\ninst✝ : Finite L\np q : P\nval✝¹ : Fintype P\nval✝ : Fintype L\np₁ p₂ p₃ : P\nl₁ l₂ l₃ : L\nh₁₂ : ¬p₁ ∈ l₂\nh₁₃ : ¬p₁ ∈ l₃\nh₂₁ : ¬p₂ ∈ l₁\nh₂₂ : p₂ ∈ l₂\nh₂₃ : p₂ ∈ l₃\nh₃₁ : ¬p₃ ∈ l₁\nh₃₂ : p₃ ∈ l₂\nh₃₃ : ¬p₃ ∈ l₃\nh : Fintype.card P = Fintype.card L\nn : ℕ := lineCount L p₂\nhp₂ : lineCount L p₂ = n\nhl₁ : pointCount P l₁ = n\nhp₃ : lineCount L p₃ = n\nhl₃ : pointCount P l₃ = n\nhp₁ : lineCount L p₁ = n\n⊢ lineCount L p = lineCount L q\n[PROOFSTEP]\nhave hl₂ : pointCount P l₂ = n := (HasLines.lineCount_eq_pointCount h h₁₂).symm.trans hp₁\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : ProjectivePlane P L\ninst✝¹ : Finite P\ninst✝ : Finite L\np q : P\nval✝¹ : Fintype P\nval✝ : Fintype L\np₁ p₂ p₃ : P\nl₁ l₂ l₃ : L\nh₁₂ : ¬p₁ ∈ l₂\nh₁₃ : ¬p₁ ∈ l₃\nh₂₁ : ¬p₂ ∈ l₁\nh₂₂ : p₂ ∈ l₂\nh₂₃ : p₂ ∈ l₃\nh₃₁ : ¬p₃ ∈ l₁\nh₃₂ : p₃ ∈ l₂\nh₃₃ : ¬p₃ ∈ l₃\nh : Fintype.card P = Fintype.card L\nn : ℕ := lineCount L p₂\nhp₂ : lineCount L p₂ = n\nhl₁ : pointCount P l₁ = n\nhp₃ : lineCount L p₃ = n\nhl₃ : pointCount P l₃ = n\nhp₁ : lineCount L p₁ = n\nhl₂ : pointCount P l₂ = n\n⊢ lineCount L p = lineCount L q\n[PROOFSTEP]\nsuffices ∀ p : P, lineCount L p = n by exact (this p).trans (this q).symm\n[GOAL]\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : ProjectivePlane P L\ninst✝¹ : Finite P\ninst✝ : Finite L\np q : P\nval✝¹ : Fintype P\nval✝ : Fintype L\np₁ p₂ p₃ : P\nl₁ l₂ l₃ : L\nh₁₂ : ¬p₁ ∈ l₂\nh₁₃ : ¬p₁ ∈ l₃\nh₂₁ : ¬p₂ ∈ l₁\nh₂₂ : p₂ ∈ l₂\nh₂₃ : p₂ ∈ l₃\nh₃₁ : ¬p₃ ∈ l₁\nh₃₂ : p₃ ∈ l₂\nh₃₃ : ¬p₃ ∈ l₃\nh : Fintype.card P = Fintype.card L\nn : ℕ := lineCount L p₂\nhp₂ : lineCount L p₂ = n\nhl₁ : pointCount P l₁ = n\nhp₃ : lineCount L p₃ = n\nhl₃ : pointCount P l₃ = n\nhp₁ : lineCount L p₁ = n\nhl₂ : pointCount P l₂ = n\nthis : ∀ (p : P), lineCount L p = n\n⊢ lineCount L p = lineCount L q\n[PROOFSTEP]\nexact (this p).trans (this q).symm\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : ProjectivePlane P L\ninst✝¹ : Finite P\ninst✝ : Finite L\np q : P\nval✝¹ : Fintype P\nval✝ : Fintype L\np₁ p₂ p₃ : P\nl₁ l₂ l₃ : L\nh₁₂ : ¬p₁ ∈ l₂\nh₁₃ : ¬p₁ ∈ l₃\nh₂₁ : ¬p₂ ∈ l₁\nh₂₂ : p₂ ∈ l₂\nh₂₃ : p₂ ∈ l₃\nh₃₁ : ¬p₃ ∈ l₁\nh₃₂ : p₃ ∈ l₂\nh₃₃ : ¬p₃ ∈ l₃\nh : Fintype.card P = Fintype.card L\nn : ℕ := lineCount L p₂\nhp₂ : lineCount L p₂ = n\nhl₁ : pointCount P l₁ = n\nhp₃ : lineCount L p₃ = n\nhl₃ : pointCount P l₃ = n\nhp₁ : lineCount L p₁ = n\nhl₂ : pointCount P l₂ = n\n⊢ ∀ (p : P), lineCount L p = n\n[PROOFSTEP]\nrefine' fun p => or_not.elim (fun h₂ => _) fun h₂ => (HasLines.lineCount_eq_pointCount h h₂).trans hl₂\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : ProjectivePlane P L\ninst✝¹ : Finite P\ninst✝ : Finite L\np✝ q : P\nval✝¹ : Fintype P\nval✝ : Fintype L\np₁ p₂ p₃ : P\nl₁ l₂ l₃ : L\nh₁₂ : ¬p₁ ∈ l₂\nh₁₃ : ¬p₁ ∈ l₃\nh₂₁ : ¬p₂ ∈ l₁\nh₂₂ : p₂ ∈ l₂\nh₂₃ : p₂ ∈ l₃\nh₃₁ : ¬p₃ ∈ l₁\nh₃₂ : p₃ ∈ l₂\nh₃₃ : ¬p₃ ∈ l₃\nh : Fintype.card P = Fintype.card L\nn : ℕ := lineCount L p₂\nhp₂ : lineCount L p₂ = n\nhl₁ : pointCount P l₁ = n\nhp₃ : lineCount L p₃ = n\nhl₃ : pointCount P l₃ = n\nhp₁ : lineCount L p₁ = n\nhl₂ : pointCount P l₂ = n\np : P\nh₂ : p ∈ l₂\n⊢ lineCount L p = n\n[PROOFSTEP]\nrefine' or_not.elim (fun h₃ => _) fun h₃ => (HasLines.lineCount_eq_pointCount h h₃).trans hl₃\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : ProjectivePlane P L\ninst✝¹ : Finite P\ninst✝ : Finite L\np✝ q : P\nval✝¹ : Fintype P\nval✝ : Fintype L\np₁ p₂ p₃ : P\nl₁ l₂ l₃ : L\nh₁₂ : ¬p₁ ∈ l₂\nh₁₃ : ¬p₁ ∈ l₃\nh₂₁ : ¬p₂ ∈ l₁\nh₂₂ : p₂ ∈ l₂\nh₂₃ : p₂ ∈ l₃\nh₃₁ : ¬p₃ ∈ l₁\nh₃₂ : p₃ ∈ l₂\nh₃₃ : ¬p₃ ∈ l₃\nh : Fintype.card P = Fintype.card L\nn : ℕ := lineCount L p₂\nhp₂ : lineCount L p₂ = n\nhl₁ : pointCount P l₁ = n\nhp₃ : lineCount L p₃ = n\nhl₃ : pointCount P l₃ = n\nhp₁ : lineCount L p₁ = n\nhl₂ : pointCount P l₂ = n\np : P\nh₂ : p ∈ l₂\nh₃ : p ∈ l₃\n⊢ lineCount L p = n\n[PROOFSTEP]\nrw [(eq_or_eq h₂ h₂₂ h₃ h₂₃).resolve_right fun h => h₃₃ ((congr_arg (Membership.mem p₃) h).mp h₃₂)]\n[GOAL]\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : ProjectivePlane P L\ninst✝¹ : Finite P\ninst✝ : Finite L\nl m : L\n⊢ pointCount P l = pointCount P m\n[PROOFSTEP]\napply lineCount_eq_lineCount (Dual P)\n[GOAL]\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : ProjectivePlane P L\ninst✝¹ : Finite P\ninst✝ : Finite L\np : P\nl : L\nq : P\nhq : ¬q ∈ l\n⊢ lineCount L q = pointCount P l\n[PROOFSTEP]\ncases nonempty_fintype P\n[GOAL]\ncase intro\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : ProjectivePlane P L\ninst✝¹ : Finite P\ninst✝ : Finite L\np : P\nl : L\nq : P\nhq : ¬q ∈ l\nval✝ : Fintype P\n⊢ lineCount L q = pointCount P l\n[PROOFSTEP]\ncases nonempty_fintype L\n[GOAL]\ncase intro.intro\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : ProjectivePlane P L\ninst✝¹ : Finite P\ninst✝ : Finite L\np : P\nl : L\nq : P\nhq : ¬q ∈ l\nval✝¹ : Fintype P\nval✝ : Fintype L\n⊢ lineCount L q = pointCount P l\n[PROOFSTEP]\nexact HasLines.lineCount_eq_pointCount (card_points_eq_card_lines P L) hq\n[GOAL]\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : ProjectivePlane P L\ninst✝¹ : Finite P\ninst✝ : Finite L\np : P\n⊢ lineCount L p = order P L + 1\n[PROOFSTEP]\nclassical\nobtain ⟨q, -, -, l, -, -, -, -, h, -⟩ := Classical.choose_spec (@exists_config P L _ _)\ncases nonempty_fintype { l : L // q ∈ l }\nrw [order, lineCount_eq_lineCount L p q, lineCount_eq_lineCount L (Classical.choose _) q, lineCount,\n  Nat.card_eq_fintype_card, Nat.sub_add_cancel]\nexact Fintype.card_pos_iff.mpr ⟨⟨l, h⟩⟩\n[GOAL]\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : ProjectivePlane P L\ninst✝¹ : Finite P\ninst✝ : Finite L\np : P\n⊢ lineCount L p = order P L + 1\n[PROOFSTEP]\nobtain ⟨q, -, -, l, -, -, -, -, h, -⟩ := Classical.choose_spec (@exists_config P L _ _)\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : ProjectivePlane P L\ninst✝¹ : Finite P\ninst✝ : Finite L\np q : P\nl : L\nh : q ∈ l\n⊢ lineCount L p = order P L + 1\n[PROOFSTEP]\ncases nonempty_fintype { l : L // q ∈ l }\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : ProjectivePlane P L\ninst✝¹ : Finite P\ninst✝ : Finite L\np q : P\nl : L\nh : q ∈ l\nval✝ : Fintype { l // q ∈ l }\n⊢ lineCount L p = order P L + 1\n[PROOFSTEP]\nrw [order, lineCount_eq_lineCount L p q, lineCount_eq_lineCount L (Classical.choose _) q, lineCount,\n  Nat.card_eq_fintype_card, Nat.sub_add_cancel]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : ProjectivePlane P L\ninst✝¹ : Finite P\ninst✝ : Finite L\np q : P\nl : L\nh : q ∈ l\nval✝ : Fintype { l // q ∈ l }\n⊢ 1 ≤ Fintype.card { l // q ∈ l }\n[PROOFSTEP]\nexact Fintype.card_pos_iff.mpr ⟨⟨l, h⟩⟩\n[GOAL]\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : ProjectivePlane P L\ninst✝¹ : Finite P\ninst✝ : Finite L\n⊢ 1 < order P L\n[PROOFSTEP]\nobtain ⟨p₁, p₂, p₃, l₁, l₂, l₃, -, -, h₂₁, h₂₂, h₂₃, h₃₁, h₃₂, h₃₃⟩ := @exists_config P L _ _\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : ProjectivePlane P L\ninst✝¹ : Finite P\ninst✝ : Finite L\np₁ p₂ p₃ : P\nl₁ l₂ l₃ : L\nh₂₁ : ¬p₂ ∈ l₁\nh₂₂ : p₂ ∈ l₂\nh₂₃ : p₂ ∈ l₃\nh₃₁ : ¬p₃ ∈ l₁\nh₃₂ : p₃ ∈ l₂\nh₃₃ : ¬p₃ ∈ l₃\n⊢ 1 < order P L\n[PROOFSTEP]\ncases nonempty_fintype { p : P // p ∈ l₂ }\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : ProjectivePlane P L\ninst✝¹ : Finite P\ninst✝ : Finite L\np₁ p₂ p₃ : P\nl₁ l₂ l₃ : L\nh₂₁ : ¬p₂ ∈ l₁\nh₂₂ : p₂ ∈ l₂\nh₂₃ : p₂ ∈ l₃\nh₃₁ : ¬p₃ ∈ l₁\nh₃₂ : p₃ ∈ l₂\nh₃₃ : ¬p₃ ∈ l₃\nval✝ : Fintype { p // p ∈ l₂ }\n⊢ 1 < order P L\n[PROOFSTEP]\nrw [← add_lt_add_iff_right 1, ← pointCount_eq _ l₂, pointCount, Nat.card_eq_fintype_card, Fintype.two_lt_card_iff]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : ProjectivePlane P L\ninst✝¹ : Finite P\ninst✝ : Finite L\np₁ p₂ p₃ : P\nl₁ l₂ l₃ : L\nh₂₁ : ¬p₂ ∈ l₁\nh₂₂ : p₂ ∈ l₂\nh₂₃ : p₂ ∈ l₃\nh₃₁ : ¬p₃ ∈ l₁\nh₃₂ : p₃ ∈ l₂\nh₃₃ : ¬p₃ ∈ l₃\nval✝ : Fintype { p // p ∈ l₂ }\n⊢ ∃ a b c, a ≠ b ∧ a ≠ c ∧ b ≠ c\n[PROOFSTEP]\nsimp_rw [Ne, Subtype.ext_iff]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : ProjectivePlane P L\ninst✝¹ : Finite P\ninst✝ : Finite L\np₁ p₂ p₃ : P\nl₁ l₂ l₃ : L\nh₂₁ : ¬p₂ ∈ l₁\nh₂₂ : p₂ ∈ l₂\nh₂₃ : p₂ ∈ l₃\nh₃₁ : ¬p₃ ∈ l₁\nh₃₂ : p₃ ∈ l₂\nh₃₃ : ¬p₃ ∈ l₃\nval✝ : Fintype { p // p ∈ l₂ }\n⊢ ∃ a b c, ¬↑a = ↑b ∧ ¬↑a = ↑c ∧ ¬↑b = ↑c\n[PROOFSTEP]\nhave h := mkPoint_ax fun h => h₂₁ ((congr_arg _ h).mpr h₂₂)\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : ProjectivePlane P L\ninst✝¹ : Finite P\ninst✝ : Finite L\np₁ p₂ p₃ : P\nl₁ l₂ l₃ : L\nh₂₁ : ¬p₂ ∈ l₁\nh₂₂ : p₂ ∈ l₂\nh₂₃ : p₂ ∈ l₃\nh₃₁ : ¬p₃ ∈ l₁\nh₃₂ : p₃ ∈ l₂\nh₃₃ : ¬p₃ ∈ l₃\nval✝ : Fintype { p // p ∈ l₂ }\nh : mkPoint (_ : l₁ = l₂ → False) ∈ l₁ ∧ mkPoint (_ : l₁ = l₂ → False) ∈ l₂\n⊢ ∃ a b c, ¬↑a = ↑b ∧ ¬↑a = ↑c ∧ ¬↑b = ↑c\n[PROOFSTEP]\nexact\n  ⟨⟨mkPoint _, h.2⟩, ⟨p₂, h₂₂⟩, ⟨p₃, h₃₂⟩, ne_of_mem_of_not_mem h.1 h₂₁, ne_of_mem_of_not_mem h.1 h₃₁,\n    ne_of_mem_of_not_mem h₂₃ h₃₃⟩\n[GOAL]\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : ProjectivePlane P L\ninst✝¹ : Finite P\ninst✝ : Finite L\np : P\n⊢ 2 < lineCount L p\n[PROOFSTEP]\nsimpa only [lineCount_eq L p, Nat.succ_lt_succ_iff] using one_lt_order P L\n[GOAL]\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : ProjectivePlane P L\ninst✝¹ : Finite P\ninst✝ : Finite L\nl : L\n⊢ 2 < pointCount P l\n[PROOFSTEP]\nsimpa only [pointCount_eq P l, Nat.succ_lt_succ_iff] using one_lt_order P L\n[GOAL]\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : ProjectivePlane P L\ninst✝¹ : Fintype P\ninst✝ : Finite L\n⊢ Fintype.card P = order P L ^ 2 + order P L + 1\n[PROOFSTEP]\ncases nonempty_fintype L\n[GOAL]\ncase intro\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : ProjectivePlane P L\ninst✝¹ : Fintype P\ninst✝ : Finite L\nval✝ : Fintype L\n⊢ Fintype.card P = order P L ^ 2 + order P L + 1\n[PROOFSTEP]\nobtain ⟨p, -⟩ := @exists_config P L _ _\n[GOAL]\ncase intro.intro\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : ProjectivePlane P L\ninst✝¹ : Fintype P\ninst✝ : Finite L\nval✝ : Fintype L\np : P\n⊢ Fintype.card P = order P L ^ 2 + order P L + 1\n[PROOFSTEP]\nlet ϕ : { q // q ≠ p } ≃ Σ l : { l : L // p ∈ l }, { q // q ∈ l.1 ∧ q ≠ p } :=\n  { toFun := fun q => ⟨⟨mkLine q.2, (mkLine_ax q.2).2⟩, q, (mkLine_ax q.2).1, q.2⟩\n    invFun := fun lq => ⟨lq.2, lq.2.2.2⟩\n    left_inv := fun q => Subtype.ext rfl\n    right_inv := fun lq =>\n      Sigma.subtype_ext\n        (Subtype.ext ((eq_or_eq (mkLine_ax lq.2.2.2).1 (mkLine_ax lq.2.2.2).2 lq.2.2.1 lq.1.2).resolve_left lq.2.2.2))\n        rfl }\n[GOAL]\ncase intro.intro\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : ProjectivePlane P L\ninst✝¹ : Fintype P\ninst✝ : Finite L\nval✝ : Fintype L\np : P\nϕ : { q // q ≠ p } ≃ (l : { l // p ∈ l }) × { q // q ∈ ↑l ∧ q ≠ p } :=\n  {\n    toFun := fun q =>\n      { fst := { val := mkLine (_ : ↑q ≠ p), property := (_ : p ∈ mkLine (_ : ↑q ≠ p)) },\n        snd :=\n          { val := ↑q,\n            property :=\n              (_ : ↑q ∈ ↑{ val := mkLine (_ : ↑q ≠ p), property := (_ : p ∈ mkLine (_ : ↑q ≠ p)) } ∧ ↑q ≠ p) } },\n    invFun := fun lq => { val := ↑lq.snd, property := (_ : ↑lq.snd ≠ p) },\n    left_inv :=\n      (_ :\n        ∀ (q : { q // q ≠ p }),\n          (fun lq => { val := ↑lq.snd, property := (_ : ↑lq.snd ≠ p) })\n              ((fun q =>\n                  { fst := { val := mkLine (_ : ↑q ≠ p), property := (_ : p ∈ mkLine (_ : ↑q ≠ p)) },\n                    snd :=\n                      { val := ↑q,\n                        property :=\n                          (_ :\n                            ↑q ∈ ↑{ val := mkLine (_ : ↑q ≠ p), property := (_ : p ∈ mkLine (_ : ↑q ≠ p)) } ∧\n                              ↑q ≠ p) } })\n                q) =\n            q),\n    right_inv :=\n      (_ :\n        ∀ (lq : (l : { l // p ∈ l }) × { q // q ∈ ↑l ∧ q ≠ p }),\n          (fun q =>\n                { fst := { val := mkLine (_ : ↑q ≠ p), property := (_ : p ∈ mkLine (_ : ↑q ≠ p)) },\n                  snd :=\n                    { val := ↑q,\n                      property :=\n                        (_ :\n                          ↑q ∈ ↑{ val := mkLine (_ : ↑q ≠ p), property := (_ : p ∈ mkLine (_ : ↑q ≠ p)) } ∧ ↑q ≠ p) } })\n              ((fun lq => { val := ↑lq.snd, property := (_ : ↑lq.snd ≠ p) }) lq) =\n            lq) }\n⊢ Fintype.card P = order P L ^ 2 + order P L + 1\n[PROOFSTEP]\nclassical\nhave h1 : Fintype.card { q // q ≠ p } + 1 = Fintype.card P :=\n  by\n  apply (eq_tsub_iff_add_eq_of_le (Nat.succ_le_of_lt (Fintype.card_pos_iff.mpr ⟨p⟩))).mp\n  convert (Fintype.card_subtype_compl _).trans (congr_arg _ (Fintype.card_subtype_eq p))\nhave h2 : ∀ l : { l : L // p ∈ l }, Fintype.card { q // q ∈ l.1 ∧ q ≠ p } = order P L :=\n  by\n  intro l\n  rw [← Fintype.card_congr (Equiv.subtypeSubtypeEquivSubtypeInter (· ∈ l.val) (· ≠ p)),\n    Fintype.card_subtype_compl fun x : Subtype (· ∈ l.val) => x.val = p, ← Nat.card_eq_fintype_card]\n  refine' tsub_eq_of_eq_add ((pointCount_eq P l.1).trans _)\n  rw [← Fintype.card_subtype_eq (⟨p, l.2⟩ : { q : P // q ∈ l.1 })]\n  simp_rw [Subtype.ext_iff_val]\nsimp_rw [← h1, Fintype.card_congr ϕ, Fintype.card_sigma, h2, Finset.sum_const, Finset.card_univ]\nrw [← Nat.card_eq_fintype_card, ← lineCount, lineCount_eq, smul_eq_mul, Nat.succ_mul, sq]\n[GOAL]\ncase intro.intro\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : ProjectivePlane P L\ninst✝¹ : Fintype P\ninst✝ : Finite L\nval✝ : Fintype L\np : P\nϕ : { q // q ≠ p } ≃ (l : { l // p ∈ l }) × { q // q ∈ ↑l ∧ q ≠ p } :=\n  {\n    toFun := fun q =>\n      { fst := { val := mkLine (_ : ↑q ≠ p), property := (_ : p ∈ mkLine (_ : ↑q ≠ p)) },\n        snd :=\n          { val := ↑q,\n            property :=\n              (_ : ↑q ∈ ↑{ val := mkLine (_ : ↑q ≠ p), property := (_ : p ∈ mkLine (_ : ↑q ≠ p)) } ∧ ↑q ≠ p) } },\n    invFun := fun lq => { val := ↑lq.snd, property := (_ : ↑lq.snd ≠ p) },\n    left_inv :=\n      (_ :\n        ∀ (q : { q // q ≠ p }),\n          (fun lq => { val := ↑lq.snd, property := (_ : ↑lq.snd ≠ p) })\n              ((fun q =>\n                  { fst := { val := mkLine (_ : ↑q ≠ p), property := (_ : p ∈ mkLine (_ : ↑q ≠ p)) },\n                    snd :=\n                      { val := ↑q,\n                        property :=\n                          (_ :\n                            ↑q ∈ ↑{ val := mkLine (_ : ↑q ≠ p), property := (_ : p ∈ mkLine (_ : ↑q ≠ p)) } ∧\n                              ↑q ≠ p) } })\n                q) =\n            q),\n    right_inv :=\n      (_ :\n        ∀ (lq : (l : { l // p ∈ l }) × { q // q ∈ ↑l ∧ q ≠ p }),\n          (fun q =>\n                { fst := { val := mkLine (_ : ↑q ≠ p), property := (_ : p ∈ mkLine (_ : ↑q ≠ p)) },\n                  snd :=\n                    { val := ↑q,\n                      property :=\n                        (_ :\n                          ↑q ∈ ↑{ val := mkLine (_ : ↑q ≠ p), property := (_ : p ∈ mkLine (_ : ↑q ≠ p)) } ∧ ↑q ≠ p) } })\n              ((fun lq => { val := ↑lq.snd, property := (_ : ↑lq.snd ≠ p) }) lq) =\n            lq) }\n⊢ Fintype.card P = order P L ^ 2 + order P L + 1\n[PROOFSTEP]\nhave h1 : Fintype.card { q // q ≠ p } + 1 = Fintype.card P :=\n  by\n  apply (eq_tsub_iff_add_eq_of_le (Nat.succ_le_of_lt (Fintype.card_pos_iff.mpr ⟨p⟩))).mp\n  convert (Fintype.card_subtype_compl _).trans (congr_arg _ (Fintype.card_subtype_eq p))\n[GOAL]\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : ProjectivePlane P L\ninst✝¹ : Fintype P\ninst✝ : Finite L\nval✝ : Fintype L\np : P\nϕ : { q // q ≠ p } ≃ (l : { l // p ∈ l }) × { q // q ∈ ↑l ∧ q ≠ p } :=\n  {\n    toFun := fun q =>\n      { fst := { val := mkLine (_ : ↑q ≠ p), property := (_ : p ∈ mkLine (_ : ↑q ≠ p)) },\n        snd :=\n          { val := ↑q,\n            property :=\n              (_ : ↑q ∈ ↑{ val := mkLine (_ : ↑q ≠ p), property := (_ : p ∈ mkLine (_ : ↑q ≠ p)) } ∧ ↑q ≠ p) } },\n    invFun := fun lq => { val := ↑lq.snd, property := (_ : ↑lq.snd ≠ p) },\n    left_inv :=\n      (_ :\n        ∀ (q : { q // q ≠ p }),\n          (fun lq => { val := ↑lq.snd, property := (_ : ↑lq.snd ≠ p) })\n              ((fun q =>\n                  { fst := { val := mkLine (_ : ↑q ≠ p), property := (_ : p ∈ mkLine (_ : ↑q ≠ p)) },\n                    snd :=\n                      { val := ↑q,\n                        property :=\n                          (_ :\n                            ↑q ∈ ↑{ val := mkLine (_ : ↑q ≠ p), property := (_ : p ∈ mkLine (_ : ↑q ≠ p)) } ∧\n                              ↑q ≠ p) } })\n                q) =\n            q),\n    right_inv :=\n      (_ :\n        ∀ (lq : (l : { l // p ∈ l }) × { q // q ∈ ↑l ∧ q ≠ p }),\n          (fun q =>\n                { fst := { val := mkLine (_ : ↑q ≠ p), property := (_ : p ∈ mkLine (_ : ↑q ≠ p)) },\n                  snd :=\n                    { val := ↑q,\n                      property :=\n                        (_ :\n                          ↑q ∈ ↑{ val := mkLine (_ : ↑q ≠ p), property := (_ : p ∈ mkLine (_ : ↑q ≠ p)) } ∧ ↑q ≠ p) } })\n              ((fun lq => { val := ↑lq.snd, property := (_ : ↑lq.snd ≠ p) }) lq) =\n            lq) }\n⊢ Fintype.card { q // q ≠ p } + 1 = Fintype.card P\n[PROOFSTEP]\napply (eq_tsub_iff_add_eq_of_le (Nat.succ_le_of_lt (Fintype.card_pos_iff.mpr ⟨p⟩))).mp\n[GOAL]\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : ProjectivePlane P L\ninst✝¹ : Fintype P\ninst✝ : Finite L\nval✝ : Fintype L\np : P\nϕ : { q // q ≠ p } ≃ (l : { l // p ∈ l }) × { q // q ∈ ↑l ∧ q ≠ p } :=\n  {\n    toFun := fun q =>\n      { fst := { val := mkLine (_ : ↑q ≠ p), property := (_ : p ∈ mkLine (_ : ↑q ≠ p)) },\n        snd :=\n          { val := ↑q,\n            property :=\n              (_ : ↑q ∈ ↑{ val := mkLine (_ : ↑q ≠ p), property := (_ : p ∈ mkLine (_ : ↑q ≠ p)) } ∧ ↑q ≠ p) } },\n    invFun := fun lq => { val := ↑lq.snd, property := (_ : ↑lq.snd ≠ p) },\n    left_inv :=\n      (_ :\n        ∀ (q : { q // q ≠ p }),\n          (fun lq => { val := ↑lq.snd, property := (_ : ↑lq.snd ≠ p) })\n              ((fun q =>\n                  { fst := { val := mkLine (_ : ↑q ≠ p), property := (_ : p ∈ mkLine (_ : ↑q ≠ p)) },\n                    snd :=\n                      { val := ↑q,\n                        property :=\n                          (_ :\n                            ↑q ∈ ↑{ val := mkLine (_ : ↑q ≠ p), property := (_ : p ∈ mkLine (_ : ↑q ≠ p)) } ∧\n                              ↑q ≠ p) } })\n                q) =\n            q),\n    right_inv :=\n      (_ :\n        ∀ (lq : (l : { l // p ∈ l }) × { q // q ∈ ↑l ∧ q ≠ p }),\n          (fun q =>\n                { fst := { val := mkLine (_ : ↑q ≠ p), property := (_ : p ∈ mkLine (_ : ↑q ≠ p)) },\n                  snd :=\n                    { val := ↑q,\n                      property :=\n                        (_ :\n                          ↑q ∈ ↑{ val := mkLine (_ : ↑q ≠ p), property := (_ : p ∈ mkLine (_ : ↑q ≠ p)) } ∧ ↑q ≠ p) } })\n              ((fun lq => { val := ↑lq.snd, property := (_ : ↑lq.snd ≠ p) }) lq) =\n            lq) }\n⊢ Fintype.card { q // q ≠ p } = Fintype.card P - Nat.succ 0\n[PROOFSTEP]\nconvert (Fintype.card_subtype_compl _).trans (congr_arg _ (Fintype.card_subtype_eq p))\n[GOAL]\ncase intro.intro\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : ProjectivePlane P L\ninst✝¹ : Fintype P\ninst✝ : Finite L\nval✝ : Fintype L\np : P\nϕ : { q // q ≠ p } ≃ (l : { l // p ∈ l }) × { q // q ∈ ↑l ∧ q ≠ p } :=\n  {\n    toFun := fun q =>\n      { fst := { val := mkLine (_ : ↑q ≠ p), property := (_ : p ∈ mkLine (_ : ↑q ≠ p)) },\n        snd :=\n          { val := ↑q,\n            property :=\n              (_ : ↑q ∈ ↑{ val := mkLine (_ : ↑q ≠ p), property := (_ : p ∈ mkLine (_ : ↑q ≠ p)) } ∧ ↑q ≠ p) } },\n    invFun := fun lq => { val := ↑lq.snd, property := (_ : ↑lq.snd ≠ p) },\n    left_inv :=\n      (_ :\n        ∀ (q : { q // q ≠ p }),\n          (fun lq => { val := ↑lq.snd, property := (_ : ↑lq.snd ≠ p) })\n              ((fun q =>\n                  { fst := { val := mkLine (_ : ↑q ≠ p), property := (_ : p ∈ mkLine (_ : ↑q ≠ p)) },\n                    snd :=\n                      { val := ↑q,\n                        property :=\n                          (_ :\n                            ↑q ∈ ↑{ val := mkLine (_ : ↑q ≠ p), property := (_ : p ∈ mkLine (_ : ↑q ≠ p)) } ∧\n                              ↑q ≠ p) } })\n                q) =\n            q),\n    right_inv :=\n      (_ :\n        ∀ (lq : (l : { l // p ∈ l }) × { q // q ∈ ↑l ∧ q ≠ p }),\n          (fun q =>\n                { fst := { val := mkLine (_ : ↑q ≠ p), property := (_ : p ∈ mkLine (_ : ↑q ≠ p)) },\n                  snd :=\n                    { val := ↑q,\n                      property :=\n                        (_ :\n                          ↑q ∈ ↑{ val := mkLine (_ : ↑q ≠ p), property := (_ : p ∈ mkLine (_ : ↑q ≠ p)) } ∧ ↑q ≠ p) } })\n              ((fun lq => { val := ↑lq.snd, property := (_ : ↑lq.snd ≠ p) }) lq) =\n            lq) }\nh1 : Fintype.card { q // q ≠ p } + 1 = Fintype.card P\n⊢ Fintype.card P = order P L ^ 2 + order P L + 1\n[PROOFSTEP]\nhave h2 : ∀ l : { l : L // p ∈ l }, Fintype.card { q // q ∈ l.1 ∧ q ≠ p } = order P L :=\n  by\n  intro l\n  rw [← Fintype.card_congr (Equiv.subtypeSubtypeEquivSubtypeInter (· ∈ l.val) (· ≠ p)),\n    Fintype.card_subtype_compl fun x : Subtype (· ∈ l.val) => x.val = p, ← Nat.card_eq_fintype_card]\n  refine' tsub_eq_of_eq_add ((pointCount_eq P l.1).trans _)\n  rw [← Fintype.card_subtype_eq (⟨p, l.2⟩ : { q : P // q ∈ l.1 })]\n  simp_rw [Subtype.ext_iff_val]\n[GOAL]\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : ProjectivePlane P L\ninst✝¹ : Fintype P\ninst✝ : Finite L\nval✝ : Fintype L\np : P\nϕ : { q // q ≠ p } ≃ (l : { l // p ∈ l }) × { q // q ∈ ↑l ∧ q ≠ p } :=\n  {\n    toFun := fun q =>\n      { fst := { val := mkLine (_ : ↑q ≠ p), property := (_ : p ∈ mkLine (_ : ↑q ≠ p)) },\n        snd :=\n          { val := ↑q,\n            property :=\n              (_ : ↑q ∈ ↑{ val := mkLine (_ : ↑q ≠ p), property := (_ : p ∈ mkLine (_ : ↑q ≠ p)) } ∧ ↑q ≠ p) } },\n    invFun := fun lq => { val := ↑lq.snd, property := (_ : ↑lq.snd ≠ p) },\n    left_inv :=\n      (_ :\n        ∀ (q : { q // q ≠ p }),\n          (fun lq => { val := ↑lq.snd, property := (_ : ↑lq.snd ≠ p) })\n              ((fun q =>\n                  { fst := { val := mkLine (_ : ↑q ≠ p), property := (_ : p ∈ mkLine (_ : ↑q ≠ p)) },\n                    snd :=\n                      { val := ↑q,\n                        property :=\n                          (_ :\n                            ↑q ∈ ↑{ val := mkLine (_ : ↑q ≠ p), property := (_ : p ∈ mkLine (_ : ↑q ≠ p)) } ∧\n                              ↑q ≠ p) } })\n                q) =\n            q),\n    right_inv :=\n      (_ :\n        ∀ (lq : (l : { l // p ∈ l }) × { q // q ∈ ↑l ∧ q ≠ p }),\n          (fun q =>\n                { fst := { val := mkLine (_ : ↑q ≠ p), property := (_ : p ∈ mkLine (_ : ↑q ≠ p)) },\n                  snd :=\n                    { val := ↑q,\n                      property :=\n                        (_ :\n                          ↑q ∈ ↑{ val := mkLine (_ : ↑q ≠ p), property := (_ : p ∈ mkLine (_ : ↑q ≠ p)) } ∧ ↑q ≠ p) } })\n              ((fun lq => { val := ↑lq.snd, property := (_ : ↑lq.snd ≠ p) }) lq) =\n            lq) }\nh1 : Fintype.card { q // q ≠ p } + 1 = Fintype.card P\n⊢ ∀ (l : { l // p ∈ l }), Fintype.card { q // q ∈ ↑l ∧ q ≠ p } = order P L\n[PROOFSTEP]\nintro l\n[GOAL]\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : ProjectivePlane P L\ninst✝¹ : Fintype P\ninst✝ : Finite L\nval✝ : Fintype L\np : P\nϕ : { q // q ≠ p } ≃ (l : { l // p ∈ l }) × { q // q ∈ ↑l ∧ q ≠ p } :=\n  {\n    toFun := fun q =>\n      { fst := { val := mkLine (_ : ↑q ≠ p), property := (_ : p ∈ mkLine (_ : ↑q ≠ p)) },\n        snd :=\n          { val := ↑q,\n            property :=\n              (_ : ↑q ∈ ↑{ val := mkLine (_ : ↑q ≠ p), property := (_ : p ∈ mkLine (_ : ↑q ≠ p)) } ∧ ↑q ≠ p) } },\n    invFun := fun lq => { val := ↑lq.snd, property := (_ : ↑lq.snd ≠ p) },\n    left_inv :=\n      (_ :\n        ∀ (q : { q // q ≠ p }),\n          (fun lq => { val := ↑lq.snd, property := (_ : ↑lq.snd ≠ p) })\n              ((fun q =>\n                  { fst := { val := mkLine (_ : ↑q ≠ p), property := (_ : p ∈ mkLine (_ : ↑q ≠ p)) },\n                    snd :=\n                      { val := ↑q,\n                        property :=\n                          (_ :\n                            ↑q ∈ ↑{ val := mkLine (_ : ↑q ≠ p), property := (_ : p ∈ mkLine (_ : ↑q ≠ p)) } ∧\n                              ↑q ≠ p) } })\n                q) =\n            q),\n    right_inv :=\n      (_ :\n        ∀ (lq : (l : { l // p ∈ l }) × { q // q ∈ ↑l ∧ q ≠ p }),\n          (fun q =>\n                { fst := { val := mkLine (_ : ↑q ≠ p), property := (_ : p ∈ mkLine (_ : ↑q ≠ p)) },\n                  snd :=\n                    { val := ↑q,\n                      property :=\n                        (_ :\n                          ↑q ∈ ↑{ val := mkLine (_ : ↑q ≠ p), property := (_ : p ∈ mkLine (_ : ↑q ≠ p)) } ∧ ↑q ≠ p) } })\n              ((fun lq => { val := ↑lq.snd, property := (_ : ↑lq.snd ≠ p) }) lq) =\n            lq) }\nh1 : Fintype.card { q // q ≠ p } + 1 = Fintype.card P\nl : { l // p ∈ l }\n⊢ Fintype.card { q // q ∈ ↑l ∧ q ≠ p } = order P L\n[PROOFSTEP]\nrw [← Fintype.card_congr (Equiv.subtypeSubtypeEquivSubtypeInter (· ∈ l.val) (· ≠ p)),\n  Fintype.card_subtype_compl fun x : Subtype (· ∈ l.val) => x.val = p, ← Nat.card_eq_fintype_card]\n[GOAL]\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : ProjectivePlane P L\ninst✝¹ : Fintype P\ninst✝ : Finite L\nval✝ : Fintype L\np : P\nϕ : { q // q ≠ p } ≃ (l : { l // p ∈ l }) × { q // q ∈ ↑l ∧ q ≠ p } :=\n  {\n    toFun := fun q =>\n      { fst := { val := mkLine (_ : ↑q ≠ p), property := (_ : p ∈ mkLine (_ : ↑q ≠ p)) },\n        snd :=\n          { val := ↑q,\n            property :=\n              (_ : ↑q ∈ ↑{ val := mkLine (_ : ↑q ≠ p), property := (_ : p ∈ mkLine (_ : ↑q ≠ p)) } ∧ ↑q ≠ p) } },\n    invFun := fun lq => { val := ↑lq.snd, property := (_ : ↑lq.snd ≠ p) },\n    left_inv :=\n      (_ :\n        ∀ (q : { q // q ≠ p }),\n          (fun lq => { val := ↑lq.snd, property := (_ : ↑lq.snd ≠ p) })\n              ((fun q =>\n                  { fst := { val := mkLine (_ : ↑q ≠ p), property := (_ : p ∈ mkLine (_ : ↑q ≠ p)) },\n                    snd :=\n                      { val := ↑q,\n                        property :=\n                          (_ :\n                            ↑q ∈ ↑{ val := mkLine (_ : ↑q ≠ p), property := (_ : p ∈ mkLine (_ : ↑q ≠ p)) } ∧\n                              ↑q ≠ p) } })\n                q) =\n            q),\n    right_inv :=\n      (_ :\n        ∀ (lq : (l : { l // p ∈ l }) × { q // q ∈ ↑l ∧ q ≠ p }),\n          (fun q =>\n                { fst := { val := mkLine (_ : ↑q ≠ p), property := (_ : p ∈ mkLine (_ : ↑q ≠ p)) },\n                  snd :=\n                    { val := ↑q,\n                      property :=\n                        (_ :\n                          ↑q ∈ ↑{ val := mkLine (_ : ↑q ≠ p), property := (_ : p ∈ mkLine (_ : ↑q ≠ p)) } ∧ ↑q ≠ p) } })\n              ((fun lq => { val := ↑lq.snd, property := (_ : ↑lq.snd ≠ p) }) lq) =\n            lq) }\nh1 : Fintype.card { q // q ≠ p } + 1 = Fintype.card P\nl : { l // p ∈ l }\n⊢ Nat.card { x // x ∈ ↑l } - Fintype.card { x // ↑x = p } = order P L\n[PROOFSTEP]\nrefine' tsub_eq_of_eq_add ((pointCount_eq P l.1).trans _)\n[GOAL]\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : ProjectivePlane P L\ninst✝¹ : Fintype P\ninst✝ : Finite L\nval✝ : Fintype L\np : P\nϕ : { q // q ≠ p } ≃ (l : { l // p ∈ l }) × { q // q ∈ ↑l ∧ q ≠ p } :=\n  {\n    toFun := fun q =>\n      { fst := { val := mkLine (_ : ↑q ≠ p), property := (_ : p ∈ mkLine (_ : ↑q ≠ p)) },\n        snd :=\n          { val := ↑q,\n            property :=\n              (_ : ↑q ∈ ↑{ val := mkLine (_ : ↑q ≠ p), property := (_ : p ∈ mkLine (_ : ↑q ≠ p)) } ∧ ↑q ≠ p) } },\n    invFun := fun lq => { val := ↑lq.snd, property := (_ : ↑lq.snd ≠ p) },\n    left_inv :=\n      (_ :\n        ∀ (q : { q // q ≠ p }),\n          (fun lq => { val := ↑lq.snd, property := (_ : ↑lq.snd ≠ p) })\n              ((fun q =>\n                  { fst := { val := mkLine (_ : ↑q ≠ p), property := (_ : p ∈ mkLine (_ : ↑q ≠ p)) },\n                    snd :=\n                      { val := ↑q,\n                        property :=\n                          (_ :\n                            ↑q ∈ ↑{ val := mkLine (_ : ↑q ≠ p), property := (_ : p ∈ mkLine (_ : ↑q ≠ p)) } ∧\n                              ↑q ≠ p) } })\n                q) =\n            q),\n    right_inv :=\n      (_ :\n        ∀ (lq : (l : { l // p ∈ l }) × { q // q ∈ ↑l ∧ q ≠ p }),\n          (fun q =>\n                { fst := { val := mkLine (_ : ↑q ≠ p), property := (_ : p ∈ mkLine (_ : ↑q ≠ p)) },\n                  snd :=\n                    { val := ↑q,\n                      property :=\n                        (_ :\n                          ↑q ∈ ↑{ val := mkLine (_ : ↑q ≠ p), property := (_ : p ∈ mkLine (_ : ↑q ≠ p)) } ∧ ↑q ≠ p) } })\n              ((fun lq => { val := ↑lq.snd, property := (_ : ↑lq.snd ≠ p) }) lq) =\n            lq) }\nh1 : Fintype.card { q // q ≠ p } + 1 = Fintype.card P\nl : { l // p ∈ l }\n⊢ order P L + 1 = order P L + Fintype.card { x // ↑x = p }\n[PROOFSTEP]\nrw [← Fintype.card_subtype_eq (⟨p, l.2⟩ : { q : P // q ∈ l.1 })]\n[GOAL]\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : ProjectivePlane P L\ninst✝¹ : Fintype P\ninst✝ : Finite L\nval✝ : Fintype L\np : P\nϕ : { q // q ≠ p } ≃ (l : { l // p ∈ l }) × { q // q ∈ ↑l ∧ q ≠ p } :=\n  {\n    toFun := fun q =>\n      { fst := { val := mkLine (_ : ↑q ≠ p), property := (_ : p ∈ mkLine (_ : ↑q ≠ p)) },\n        snd :=\n          { val := ↑q,\n            property :=\n              (_ : ↑q ∈ ↑{ val := mkLine (_ : ↑q ≠ p), property := (_ : p ∈ mkLine (_ : ↑q ≠ p)) } ∧ ↑q ≠ p) } },\n    invFun := fun lq => { val := ↑lq.snd, property := (_ : ↑lq.snd ≠ p) },\n    left_inv :=\n      (_ :\n        ∀ (q : { q // q ≠ p }),\n          (fun lq => { val := ↑lq.snd, property := (_ : ↑lq.snd ≠ p) })\n              ((fun q =>\n                  { fst := { val := mkLine (_ : ↑q ≠ p), property := (_ : p ∈ mkLine (_ : ↑q ≠ p)) },\n                    snd :=\n                      { val := ↑q,\n                        property :=\n                          (_ :\n                            ↑q ∈ ↑{ val := mkLine (_ : ↑q ≠ p), property := (_ : p ∈ mkLine (_ : ↑q ≠ p)) } ∧\n                              ↑q ≠ p) } })\n                q) =\n            q),\n    right_inv :=\n      (_ :\n        ∀ (lq : (l : { l // p ∈ l }) × { q // q ∈ ↑l ∧ q ≠ p }),\n          (fun q =>\n                { fst := { val := mkLine (_ : ↑q ≠ p), property := (_ : p ∈ mkLine (_ : ↑q ≠ p)) },\n                  snd :=\n                    { val := ↑q,\n                      property :=\n                        (_ :\n                          ↑q ∈ ↑{ val := mkLine (_ : ↑q ≠ p), property := (_ : p ∈ mkLine (_ : ↑q ≠ p)) } ∧ ↑q ≠ p) } })\n              ((fun lq => { val := ↑lq.snd, property := (_ : ↑lq.snd ≠ p) }) lq) =\n            lq) }\nh1 : Fintype.card { q // q ≠ p } + 1 = Fintype.card P\nl : { l // p ∈ l }\n⊢ order P L + Fintype.card { x // x = { val := p, property := (_ : p ∈ ↑l) } } =\n    order P L + Fintype.card { x // ↑x = p }\n[PROOFSTEP]\nsimp_rw [Subtype.ext_iff_val]\n[GOAL]\ncase intro.intro\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : ProjectivePlane P L\ninst✝¹ : Fintype P\ninst✝ : Finite L\nval✝ : Fintype L\np : P\nϕ : { q // q ≠ p } ≃ (l : { l // p ∈ l }) × { q // q ∈ ↑l ∧ q ≠ p } :=\n  {\n    toFun := fun q =>\n      { fst := { val := mkLine (_ : ↑q ≠ p), property := (_ : p ∈ mkLine (_ : ↑q ≠ p)) },\n        snd :=\n          { val := ↑q,\n            property :=\n              (_ : ↑q ∈ ↑{ val := mkLine (_ : ↑q ≠ p), property := (_ : p ∈ mkLine (_ : ↑q ≠ p)) } ∧ ↑q ≠ p) } },\n    invFun := fun lq => { val := ↑lq.snd, property := (_ : ↑lq.snd ≠ p) },\n    left_inv :=\n      (_ :\n        ∀ (q : { q // q ≠ p }),\n          (fun lq => { val := ↑lq.snd, property := (_ : ↑lq.snd ≠ p) })\n              ((fun q =>\n                  { fst := { val := mkLine (_ : ↑q ≠ p), property := (_ : p ∈ mkLine (_ : ↑q ≠ p)) },\n                    snd :=\n                      { val := ↑q,\n                        property :=\n                          (_ :\n                            ↑q ∈ ↑{ val := mkLine (_ : ↑q ≠ p), property := (_ : p ∈ mkLine (_ : ↑q ≠ p)) } ∧\n                              ↑q ≠ p) } })\n                q) =\n            q),\n    right_inv :=\n      (_ :\n        ∀ (lq : (l : { l // p ∈ l }) × { q // q ∈ ↑l ∧ q ≠ p }),\n          (fun q =>\n                { fst := { val := mkLine (_ : ↑q ≠ p), property := (_ : p ∈ mkLine (_ : ↑q ≠ p)) },\n                  snd :=\n                    { val := ↑q,\n                      property :=\n                        (_ :\n                          ↑q ∈ ↑{ val := mkLine (_ : ↑q ≠ p), property := (_ : p ∈ mkLine (_ : ↑q ≠ p)) } ∧ ↑q ≠ p) } })\n              ((fun lq => { val := ↑lq.snd, property := (_ : ↑lq.snd ≠ p) }) lq) =\n            lq) }\nh1 : Fintype.card { q // q ≠ p } + 1 = Fintype.card P\nh2 : ∀ (l : { l // p ∈ l }), Fintype.card { q // q ∈ ↑l ∧ q ≠ p } = order P L\n⊢ Fintype.card P = order P L ^ 2 + order P L + 1\n[PROOFSTEP]\nsimp_rw [← h1, Fintype.card_congr ϕ, Fintype.card_sigma, h2, Finset.sum_const, Finset.card_univ]\n[GOAL]\ncase intro.intro\nP : Type u_1\nL : Type u_2\ninst✝³ : Membership P L\ninst✝² : ProjectivePlane P L\ninst✝¹ : Fintype P\ninst✝ : Finite L\nval✝ : Fintype L\np : P\nϕ : { q // q ≠ p } ≃ (l : { l // p ∈ l }) × { q // q ∈ ↑l ∧ q ≠ p } :=\n  {\n    toFun := fun q =>\n      { fst := { val := mkLine (_ : ↑q ≠ p), property := (_ : p ∈ mkLine (_ : ↑q ≠ p)) },\n        snd :=\n          { val := ↑q,\n            property :=\n              (_ : ↑q ∈ ↑{ val := mkLine (_ : ↑q ≠ p), property := (_ : p ∈ mkLine (_ : ↑q ≠ p)) } ∧ ↑q ≠ p) } },\n    invFun := fun lq => { val := ↑lq.snd, property := (_ : ↑lq.snd ≠ p) },\n    left_inv :=\n      (_ :\n        ∀ (q : { q // q ≠ p }),\n          (fun lq => { val := ↑lq.snd, property := (_ : ↑lq.snd ≠ p) })\n              ((fun q =>\n                  { fst := { val := mkLine (_ : ↑q ≠ p), property := (_ : p ∈ mkLine (_ : ↑q ≠ p)) },\n                    snd :=\n                      { val := ↑q,\n                        property :=\n                          (_ :\n                            ↑q ∈ ↑{ val := mkLine (_ : ↑q ≠ p), property := (_ : p ∈ mkLine (_ : ↑q ≠ p)) } ∧\n                              ↑q ≠ p) } })\n                q) =\n            q),\n    right_inv :=\n      (_ :\n        ∀ (lq : (l : { l // p ∈ l }) × { q // q ∈ ↑l ∧ q ≠ p }),\n          (fun q =>\n                { fst := { val := mkLine (_ : ↑q ≠ p), property := (_ : p ∈ mkLine (_ : ↑q ≠ p)) },\n                  snd :=\n                    { val := ↑q,\n                      property :=\n                        (_ :\n                          ↑q ∈ ↑{ val := mkLine (_ : ↑q ≠ p), property := (_ : p ∈ mkLine (_ : ↑q ≠ p)) } ∧ ↑q ≠ p) } })\n              ((fun lq => { val := ↑lq.snd, property := (_ : ↑lq.snd ≠ p) }) lq) =\n            lq) }\nh1 : Fintype.card { q // q ≠ p } + 1 = Fintype.card P\nh2 : ∀ (l : { l // p ∈ l }), Fintype.card { q // q ∈ ↑l ∧ q ≠ p } = order P L\n⊢ Fintype.card { l // p ∈ l } • order P L + 1 = order P L ^ 2 + order P L + 1\n[PROOFSTEP]\nrw [← Nat.card_eq_fintype_card, ← lineCount, lineCount_eq, smul_eq_mul, Nat.succ_mul, sq]\n", "meta": {"mathlib_filename": "Mathlib.Combinatorics.Configuration", "llama_tokens": 47980, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7634837635542924, "lm_q2_score": 0.6688802603710085, "lm_q1q2_score": 0.5106792185552326}}
{"text": "[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nR : ℝ\nz w : ℂ\nf : ℂ → E\n⊢ Periodic (circleTransformDeriv R z w f) (2 * π)\n[PROOFSTEP]\nhave := periodic_circleMap\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nR : ℝ\nz w : ℂ\nf : ℂ → E\nthis : ∀ (c : ℂ) (R : ℝ), Periodic (circleMap c R) (2 * π)\n⊢ Periodic (circleTransformDeriv R z w f) (2 * π)\n[PROOFSTEP]\nsimp_rw [Periodic] at *\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nR : ℝ\nz w : ℂ\nf : ℂ → E\nthis : ∀ (c : ℂ) (R x : ℝ), circleMap c R (x + 2 * π) = circleMap c R x\n⊢ ∀ (x : ℝ), circleTransformDeriv R z w f (x + 2 * π) = circleTransformDeriv R z w f x\n[PROOFSTEP]\nintro x\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nR : ℝ\nz w : ℂ\nf : ℂ → E\nthis : ∀ (c : ℂ) (R x : ℝ), circleMap c R (x + 2 * π) = circleMap c R x\nx : ℝ\n⊢ circleTransformDeriv R z w f (x + 2 * π) = circleTransformDeriv R z w f x\n[PROOFSTEP]\nsimp_rw [circleTransformDeriv, this]\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nR : ℝ\nz w : ℂ\nf : ℂ → E\nthis : ∀ (c : ℂ) (R x : ℝ), circleMap c R (x + 2 * π) = circleMap c R x\nx : ℝ\n⊢ (2 * ↑π * I)⁻¹ • deriv (circleMap z R) (x + 2 * π) • ((circleMap z R x - w) ^ 2)⁻¹ • f (circleMap z R x) =\n    (2 * ↑π * I)⁻¹ • deriv (circleMap z R) x • ((circleMap z R x - w) ^ 2)⁻¹ • f (circleMap z R x)\n[PROOFSTEP]\ncongr 2\n[GOAL]\ncase e_a.e_a\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nR : ℝ\nz w : ℂ\nf : ℂ → E\nthis : ∀ (c : ℂ) (R x : ℝ), circleMap c R (x + 2 * π) = circleMap c R x\nx : ℝ\n⊢ deriv (circleMap z R) (x + 2 * π) = deriv (circleMap z R) x\n[PROOFSTEP]\nsimp [this]\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nR : ℝ\nz w : ℂ\nf : ℂ → E\n⊢ circleTransformDeriv R z w f = fun θ => (circleMap z R θ - w)⁻¹ • circleTransform R z w f θ\n[PROOFSTEP]\next\n[GOAL]\ncase h\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nR : ℝ\nz w : ℂ\nf : ℂ → E\nx✝ : ℝ\n⊢ circleTransformDeriv R z w f x✝ = (circleMap z R x✝ - w)⁻¹ • circleTransform R z w f x✝\n[PROOFSTEP]\nsimp_rw [circleTransformDeriv, circleTransform, ← mul_smul, ← mul_assoc]\n[GOAL]\ncase h\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nR : ℝ\nz w : ℂ\nf : ℂ → E\nx✝ : ℝ\n⊢ ((2 * ↑π * I)⁻¹ * deriv (circleMap z R) x✝ * ((circleMap z R x✝ - w) ^ 2)⁻¹) • f (circleMap z R x✝) =\n    ((circleMap z R x✝ - w)⁻¹ * (2 * ↑π * I)⁻¹ * deriv (circleMap z R) x✝ * (circleMap z R x✝ - w)⁻¹) •\n      f (circleMap z R x✝)\n[PROOFSTEP]\nring_nf\n[GOAL]\ncase h\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nR : ℝ\nz w : ℂ\nf : ℂ → E\nx✝ : ℝ\n⊢ ((↑π)⁻¹ * I⁻¹ * deriv (circleMap z R) x✝ * (-(circleMap z R x✝ * w * 2) + circleMap z R x✝ ^ 2 + w ^ 2)⁻¹ *\n        (↑(Int.ofNat 1) / ↑2)) •\n      f (circleMap z R x✝) =\n    ((↑π)⁻¹ * I⁻¹ * deriv (circleMap z R) x✝ * (circleMap z R x✝ - w)⁻¹ ^ 2 * (↑(Int.ofNat 1) / ↑2)) •\n      f (circleMap z R x✝)\n[PROOFSTEP]\nrw [inv_pow]\n[GOAL]\ncase h\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nR : ℝ\nz w : ℂ\nf : ℂ → E\nx✝ : ℝ\n⊢ ((↑π)⁻¹ * I⁻¹ * deriv (circleMap z R) x✝ * (-(circleMap z R x✝ * w * 2) + circleMap z R x✝ ^ 2 + w ^ 2)⁻¹ *\n        (↑(Int.ofNat 1) / ↑2)) •\n      f (circleMap z R x✝) =\n    ((↑π)⁻¹ * I⁻¹ * deriv (circleMap z R) x✝ * ((circleMap z R x✝ - w) ^ 2)⁻¹ * (↑(Int.ofNat 1) / ↑2)) •\n      f (circleMap z R x✝)\n[PROOFSTEP]\ncongr\n[GOAL]\ncase h.e_a.e_a.e_a.e_a\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nR : ℝ\nz w : ℂ\nf : ℂ → E\nx✝ : ℝ\n⊢ -(circleMap z R x✝ * w * 2) + circleMap z R x✝ ^ 2 + w ^ 2 = (circleMap z R x✝ - w) ^ 2\n[PROOFSTEP]\nring\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nR : ℝ\nz w : ℂ\nf : ℂ → E\n⊢ ∫ (θ : ℝ) in 0 ..2 * π, circleTransform R z w f θ = (2 * ↑π * I)⁻¹ • ∮ (z : ℂ) in C(z, R), (z - w)⁻¹ • f z\n[PROOFSTEP]\nsimp_rw [circleTransform, circleIntegral, deriv_circleMap, circleMap]\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nR : ℝ\nz w : ℂ\nf : ℂ → E\n⊢ ∫ (θ : ℝ) in 0 ..2 * π,\n      (2 * ↑π * I)⁻¹ • ((0 + ↑R * exp (↑θ * I)) * I) • (z + ↑R * exp (↑θ * I) - w)⁻¹ • f (z + ↑R * exp (↑θ * I)) =\n    (2 * ↑π * I)⁻¹ •\n      ∫ (θ : ℝ) in 0 ..2 * π, ((0 + ↑R * exp (↑θ * I)) * I) • (z + ↑R * exp (↑θ * I) - w)⁻¹ • f (z + ↑R * exp (↑θ * I))\n[PROOFSTEP]\nsimp\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nR✝ : ℝ\nz✝ w✝ : ℂ\nR : ℝ\nhR : 0 < R\nf : ℂ → E\nz w : ℂ\nhf : ContinuousOn f (sphere z R)\nhw : w ∈ ball z R\n⊢ Continuous (circleTransform R z w f)\n[PROOFSTEP]\napply_rules [Continuous.smul, continuous_const]\n[GOAL]\ncase hg.hf\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nR✝ : ℝ\nz✝ w✝ : ℂ\nR : ℝ\nhR : 0 < R\nf : ℂ → E\nz w : ℂ\nhf : ContinuousOn f (sphere z R)\nhw : w ∈ ball z R\n⊢ Continuous fun x => deriv (circleMap z R) x\ncase hg.hg.hf\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nR✝ : ℝ\nz✝ w✝ : ℂ\nR : ℝ\nhR : 0 < R\nf : ℂ → E\nz w : ℂ\nhf : ContinuousOn f (sphere z R)\nhw : w ∈ ball z R\n⊢ Continuous fun x => (circleMap z R x - w)⁻¹\ncase hg.hg.hg\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nR✝ : ℝ\nz✝ w✝ : ℂ\nR : ℝ\nhR : 0 < R\nf : ℂ → E\nz w : ℂ\nhf : ContinuousOn f (sphere z R)\nhw : w ∈ ball z R\n⊢ Continuous fun x => f (circleMap z R x)\n[PROOFSTEP]\nsimp_rw [deriv_circleMap]\n[GOAL]\ncase hg.hf\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nR✝ : ℝ\nz✝ w✝ : ℂ\nR : ℝ\nhR : 0 < R\nf : ℂ → E\nz w : ℂ\nhf : ContinuousOn f (sphere z R)\nhw : w ∈ ball z R\n⊢ Continuous fun x => circleMap 0 R x * I\ncase hg.hg.hf\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nR✝ : ℝ\nz✝ w✝ : ℂ\nR : ℝ\nhR : 0 < R\nf : ℂ → E\nz w : ℂ\nhf : ContinuousOn f (sphere z R)\nhw : w ∈ ball z R\n⊢ Continuous fun x => (circleMap z R x - w)⁻¹\ncase hg.hg.hg\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nR✝ : ℝ\nz✝ w✝ : ℂ\nR : ℝ\nhR : 0 < R\nf : ℂ → E\nz w : ℂ\nhf : ContinuousOn f (sphere z R)\nhw : w ∈ ball z R\n⊢ Continuous fun x => f (circleMap z R x)\n[PROOFSTEP]\napply_rules [Continuous.mul, continuous_circleMap 0 R, continuous_const]\n[GOAL]\ncase hg.hg.hf\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nR✝ : ℝ\nz✝ w✝ : ℂ\nR : ℝ\nhR : 0 < R\nf : ℂ → E\nz w : ℂ\nhf : ContinuousOn f (sphere z R)\nhw : w ∈ ball z R\n⊢ Continuous fun x => (circleMap z R x - w)⁻¹\n[PROOFSTEP]\napply continuous_circleMap_inv hw\n[GOAL]\ncase hg.hg.hg\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nR✝ : ℝ\nz✝ w✝ : ℂ\nR : ℝ\nhR : 0 < R\nf : ℂ → E\nz w : ℂ\nhf : ContinuousOn f (sphere z R)\nhw : w ∈ ball z R\n⊢ Continuous fun x => f (circleMap z R x)\n[PROOFSTEP]\napply ContinuousOn.comp_continuous hf (continuous_circleMap z R)\n[GOAL]\ncase hg.hg.hg\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nR✝ : ℝ\nz✝ w✝ : ℂ\nR : ℝ\nhR : 0 < R\nf : ℂ → E\nz w : ℂ\nhf : ContinuousOn f (sphere z R)\nhw : w ∈ ball z R\n⊢ ∀ (x : ℝ), circleMap z R x ∈ sphere z R\n[PROOFSTEP]\nexact fun _ => (circleMap_mem_sphere _ hR.le) _\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nR✝ : ℝ\nz✝ w✝ : ℂ\nR : ℝ\nhR : 0 < R\nf : ℂ → E\nz w : ℂ\nhf : ContinuousOn f (sphere z R)\nhw : w ∈ ball z R\n⊢ Continuous (circleTransformDeriv R z w f)\n[PROOFSTEP]\nrw [circleTransformDeriv_eq]\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nR✝ : ℝ\nz✝ w✝ : ℂ\nR : ℝ\nhR : 0 < R\nf : ℂ → E\nz w : ℂ\nhf : ContinuousOn f (sphere z R)\nhw : w ∈ ball z R\n⊢ Continuous fun θ => (circleMap z R θ - w)⁻¹ • circleTransform R z w f θ\n[PROOFSTEP]\nexact (continuous_circleMap_inv hw).smul (continuous_circleTransform hR hf hw)\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nR✝ : ℝ\nz✝ w : ℂ\nR r : ℝ\nhr : r < R\nz : ℂ\n⊢ ContinuousOn (fun w => (circleMap z R w.snd - w.fst)⁻¹ ^ 2) (closedBall z r ×ˢ univ)\n[PROOFSTEP]\nsimp_rw [← one_div]\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nR✝ : ℝ\nz✝ w : ℂ\nR r : ℝ\nhr : r < R\nz : ℂ\n⊢ ContinuousOn (fun w => (1 / (circleMap z R w.snd - w.fst)) ^ 2) (closedBall z r ×ˢ univ)\n[PROOFSTEP]\napply_rules [ContinuousOn.pow, ContinuousOn.div, continuousOn_const]\n[GOAL]\ncase hf.hg\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nR✝ : ℝ\nz✝ w : ℂ\nR r : ℝ\nhr : r < R\nz : ℂ\n⊢ ContinuousOn (fun x => circleMap z R x.snd - x.fst) (closedBall z r ×ˢ univ)\ncase hf.h₀\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nR✝ : ℝ\nz✝ w : ℂ\nR r : ℝ\nhr : r < R\nz : ℂ\n⊢ ∀ (x : ℂ × ℝ), x ∈ closedBall z r ×ˢ univ → circleMap z R x.snd - x.fst ≠ 0\n[PROOFSTEP]\nrefine'\n  ((continuous_circleMap z R).continuousOn.comp continuousOn_snd fun _ => And.right).sub\n    (continuousOn_id.comp continuousOn_fst fun _ => And.left)\n[GOAL]\ncase hf.h₀\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nR✝ : ℝ\nz✝ w : ℂ\nR r : ℝ\nhr : r < R\nz : ℂ\n⊢ ∀ (x : ℂ × ℝ), x ∈ closedBall z r ×ˢ univ → circleMap z R x.snd - x.fst ≠ 0\n[PROOFSTEP]\nsimp only [mem_prod, Ne.def, and_imp, Prod.forall]\n[GOAL]\ncase hf.h₀\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nR✝ : ℝ\nz✝ w : ℂ\nR r : ℝ\nhr : r < R\nz : ℂ\n⊢ ∀ (a : ℂ) (b : ℝ), a ∈ closedBall z r → b ∈ univ → ¬circleMap z R b - a = 0\n[PROOFSTEP]\nintro a b ha _\n[GOAL]\ncase hf.h₀\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nR✝ : ℝ\nz✝ w : ℂ\nR r : ℝ\nhr : r < R\nz a : ℂ\nb : ℝ\nha : a ∈ closedBall z r\na✝ : b ∈ univ\n⊢ ¬circleMap z R b - a = 0\n[PROOFSTEP]\nhave ha2 : a ∈ ball z R := by simp at *; linarith\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nR✝ : ℝ\nz✝ w : ℂ\nR r : ℝ\nhr : r < R\nz a : ℂ\nb : ℝ\nha : a ∈ closedBall z r\na✝ : b ∈ univ\n⊢ a ∈ ball z R\n[PROOFSTEP]\nsimp at *\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nR✝ : ℝ\nz✝ w : ℂ\nR r : ℝ\nhr : r < R\nz a : ℂ\nb : ℝ\nha : dist a z ≤ r\na✝ : True\n⊢ dist a z < R\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase hf.h₀\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nR✝ : ℝ\nz✝ w : ℂ\nR r : ℝ\nhr : r < R\nz a : ℂ\nb : ℝ\nha : a ∈ closedBall z r\na✝ : b ∈ univ\nha2 : a ∈ ball z R\n⊢ ¬circleMap z R b - a = 0\n[PROOFSTEP]\nexact sub_ne_zero.2 (circleMap_ne_mem_ball ha2 b)\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nR✝ : ℝ\nz✝ w : ℂ\nR r : ℝ\nhr : r < R\nz : ℂ\n⊢ ContinuousOn (↑abs ∘ fun t => circleTransformBoundingFunction R z t) (closedBall z r ×ˢ univ)\n[PROOFSTEP]\nhave : ContinuousOn (circleTransformBoundingFunction R z) (closedBall z r ×ˢ (⊤ : Set ℝ)) :=\n  by\n  apply_rules [ContinuousOn.smul, continuousOn_const]\n  simp only [deriv_circleMap]\n  have c := (continuous_circleMap 0 R).continuousOn (s := ⊤)\n  apply_rules [ContinuousOn.mul, c.comp continuousOn_snd fun _ => And.right, continuousOn_const]\n  simp_rw [← inv_pow]\n  apply continuousOn_prod_circle_transform_function hr\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nR✝ : ℝ\nz✝ w : ℂ\nR r : ℝ\nhr : r < R\nz : ℂ\n⊢ ContinuousOn (circleTransformBoundingFunction R z) (closedBall z r ×ˢ ⊤)\n[PROOFSTEP]\napply_rules [ContinuousOn.smul, continuousOn_const]\n[GOAL]\ncase hg.hf\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nR✝ : ℝ\nz✝ w : ℂ\nR r : ℝ\nhr : r < R\nz : ℂ\n⊢ ContinuousOn (fun x => deriv (circleMap z R) x.snd) (closedBall z r ×ˢ ⊤)\ncase hg.hg.hf\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nR✝ : ℝ\nz✝ w : ℂ\nR r : ℝ\nhr : r < R\nz : ℂ\n⊢ ContinuousOn (fun x => ((circleMap z R x.snd - x.fst) ^ 2)⁻¹) (closedBall z r ×ˢ ⊤)\n[PROOFSTEP]\nsimp only [deriv_circleMap]\n[GOAL]\ncase hg.hf\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nR✝ : ℝ\nz✝ w : ℂ\nR r : ℝ\nhr : r < R\nz : ℂ\n⊢ ContinuousOn (fun x => circleMap 0 R x.snd * I) (closedBall z r ×ˢ ⊤)\ncase hg.hg.hf\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nR✝ : ℝ\nz✝ w : ℂ\nR r : ℝ\nhr : r < R\nz : ℂ\n⊢ ContinuousOn (fun x => ((circleMap z R x.snd - x.fst) ^ 2)⁻¹) (closedBall z r ×ˢ ⊤)\n[PROOFSTEP]\nhave c := (continuous_circleMap 0 R).continuousOn (s := ⊤)\n[GOAL]\ncase hg.hf\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nR✝ : ℝ\nz✝ w : ℂ\nR r : ℝ\nhr : r < R\nz : ℂ\nc : ContinuousOn (circleMap 0 R) ⊤\n⊢ ContinuousOn (fun x => circleMap 0 R x.snd * I) (closedBall z r ×ˢ ⊤)\ncase hg.hg.hf\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nR✝ : ℝ\nz✝ w : ℂ\nR r : ℝ\nhr : r < R\nz : ℂ\n⊢ ContinuousOn (fun x => ((circleMap z R x.snd - x.fst) ^ 2)⁻¹) (closedBall z r ×ˢ ⊤)\n[PROOFSTEP]\napply_rules [ContinuousOn.mul, c.comp continuousOn_snd fun _ => And.right, continuousOn_const]\n[GOAL]\ncase hg.hg.hf\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nR✝ : ℝ\nz✝ w : ℂ\nR r : ℝ\nhr : r < R\nz : ℂ\n⊢ ContinuousOn (fun x => ((circleMap z R x.snd - x.fst) ^ 2)⁻¹) (closedBall z r ×ˢ ⊤)\n[PROOFSTEP]\nsimp_rw [← inv_pow]\n[GOAL]\ncase hg.hg.hf\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nR✝ : ℝ\nz✝ w : ℂ\nR r : ℝ\nhr : r < R\nz : ℂ\n⊢ ContinuousOn (fun x => (circleMap z R x.snd - x.fst)⁻¹ ^ 2) (closedBall z r ×ˢ ⊤)\n[PROOFSTEP]\napply continuousOn_prod_circle_transform_function hr\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nR✝ : ℝ\nz✝ w : ℂ\nR r : ℝ\nhr : r < R\nz : ℂ\nthis : ContinuousOn (circleTransformBoundingFunction R z) (closedBall z r ×ˢ ⊤)\n⊢ ContinuousOn (↑abs ∘ fun t => circleTransformBoundingFunction R z t) (closedBall z r ×ˢ univ)\n[PROOFSTEP]\nrefine' continuous_abs.continuousOn (s := ⊤).comp this _\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nR✝ : ℝ\nz✝ w : ℂ\nR r : ℝ\nhr : r < R\nz : ℂ\nthis : ContinuousOn (circleTransformBoundingFunction R z) (closedBall z r ×ˢ ⊤)\n⊢ MapsTo (fun t => circleTransformBoundingFunction R z t) (closedBall z r ×ˢ univ) ⊤\n[PROOFSTEP]\nshow MapsTo _ _ (⊤ : Set ℂ)\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nR✝ : ℝ\nz✝ w : ℂ\nR r : ℝ\nhr : r < R\nz : ℂ\nthis : ContinuousOn (circleTransformBoundingFunction R z) (closedBall z r ×ˢ ⊤)\n⊢ MapsTo (fun t => circleTransformBoundingFunction R z t) (closedBall z r ×ˢ univ) ⊤\n[PROOFSTEP]\nsimp [MapsTo]\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nR✝ : ℝ\nz✝ w : ℂ\nR r : ℝ\nhr : r < R\nhr' : 0 ≤ r\nz : ℂ\n⊢ ∃ x,\n    ∀ (y : ↑(closedBall z r ×ˢ [[0, 2 * π]])),\n      ↑abs (circleTransformBoundingFunction R z ↑y) ≤ ↑abs (circleTransformBoundingFunction R z ↑x)\n[PROOFSTEP]\nhave cts := continuousOn_abs_circleTransformBoundingFunction hr z\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nR✝ : ℝ\nz✝ w : ℂ\nR r : ℝ\nhr : r < R\nhr' : 0 ≤ r\nz : ℂ\ncts : ContinuousOn (↑abs ∘ fun t => circleTransformBoundingFunction R z t) (closedBall z r ×ˢ univ)\n⊢ ∃ x,\n    ∀ (y : ↑(closedBall z r ×ˢ [[0, 2 * π]])),\n      ↑abs (circleTransformBoundingFunction R z ↑y) ≤ ↑abs (circleTransformBoundingFunction R z ↑x)\n[PROOFSTEP]\nhave comp : IsCompact (closedBall z r ×ˢ [[0, 2 * π]]) := by\n  apply_rules [IsCompact.prod, ProperSpace.isCompact_closedBall z r, isCompact_uIcc]\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nR✝ : ℝ\nz✝ w : ℂ\nR r : ℝ\nhr : r < R\nhr' : 0 ≤ r\nz : ℂ\ncts : ContinuousOn (↑abs ∘ fun t => circleTransformBoundingFunction R z t) (closedBall z r ×ˢ univ)\n⊢ IsCompact (closedBall z r ×ˢ [[0, 2 * π]])\n[PROOFSTEP]\napply_rules [IsCompact.prod, ProperSpace.isCompact_closedBall z r, isCompact_uIcc]\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nR✝ : ℝ\nz✝ w : ℂ\nR r : ℝ\nhr : r < R\nhr' : 0 ≤ r\nz : ℂ\ncts : ContinuousOn (↑abs ∘ fun t => circleTransformBoundingFunction R z t) (closedBall z r ×ˢ univ)\ncomp : IsCompact (closedBall z r ×ˢ [[0, 2 * π]])\n⊢ ∃ x,\n    ∀ (y : ↑(closedBall z r ×ˢ [[0, 2 * π]])),\n      ↑abs (circleTransformBoundingFunction R z ↑y) ≤ ↑abs (circleTransformBoundingFunction R z ↑x)\n[PROOFSTEP]\nhave none : (closedBall z r ×ˢ [[0, 2 * π]]).Nonempty := (nonempty_closedBall.2 hr').prod nonempty_uIcc\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nR✝ : ℝ\nz✝ w : ℂ\nR r : ℝ\nhr : r < R\nhr' : 0 ≤ r\nz : ℂ\ncts : ContinuousOn (↑abs ∘ fun t => circleTransformBoundingFunction R z t) (closedBall z r ×ˢ univ)\ncomp : IsCompact (closedBall z r ×ˢ [[0, 2 * π]])\nnone : Set.Nonempty (closedBall z r ×ˢ [[0, 2 * π]])\n⊢ ∃ x,\n    ∀ (y : ↑(closedBall z r ×ˢ [[0, 2 * π]])),\n      ↑abs (circleTransformBoundingFunction R z ↑y) ≤ ↑abs (circleTransformBoundingFunction R z ↑x)\n[PROOFSTEP]\nhave :=\n  IsCompact.exists_isMaxOn comp none\n    (cts.mono (by intro z; simp only [mem_prod, mem_closedBall, mem_univ, and_true_iff, and_imp]; tauto))\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nR✝ : ℝ\nz✝ w : ℂ\nR r : ℝ\nhr : r < R\nhr' : 0 ≤ r\nz : ℂ\ncts : ContinuousOn (↑abs ∘ fun t => circleTransformBoundingFunction R z t) (closedBall z r ×ˢ univ)\ncomp : IsCompact (closedBall z r ×ˢ [[0, 2 * π]])\nnone : Set.Nonempty (closedBall z r ×ˢ [[0, 2 * π]])\n⊢ closedBall z r ×ˢ [[0, 2 * π]] ⊆ closedBall z r ×ˢ univ\n[PROOFSTEP]\nintro z\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nR✝ : ℝ\nz✝¹ w : ℂ\nR r : ℝ\nhr : r < R\nhr' : 0 ≤ r\nz✝ : ℂ\ncts : ContinuousOn (↑abs ∘ fun t => circleTransformBoundingFunction R z✝ t) (closedBall z✝ r ×ˢ univ)\ncomp : IsCompact (closedBall z✝ r ×ˢ [[0, 2 * π]])\nnone : Set.Nonempty (closedBall z✝ r ×ˢ [[0, 2 * π]])\nz : ℂ × ℝ\n⊢ z ∈ closedBall z✝ r ×ˢ [[0, 2 * π]] → z ∈ closedBall z✝ r ×ˢ univ\n[PROOFSTEP]\nsimp only [mem_prod, mem_closedBall, mem_univ, and_true_iff, and_imp]\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nR✝ : ℝ\nz✝¹ w : ℂ\nR r : ℝ\nhr : r < R\nhr' : 0 ≤ r\nz✝ : ℂ\ncts : ContinuousOn (↑abs ∘ fun t => circleTransformBoundingFunction R z✝ t) (closedBall z✝ r ×ˢ univ)\ncomp : IsCompact (closedBall z✝ r ×ˢ [[0, 2 * π]])\nnone : Set.Nonempty (closedBall z✝ r ×ˢ [[0, 2 * π]])\nz : ℂ × ℝ\n⊢ dist z.fst z✝ ≤ r → z.snd ∈ [[0, 2 * π]] → dist z.fst z✝ ≤ r\n[PROOFSTEP]\ntauto\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nR✝ : ℝ\nz✝ w : ℂ\nR r : ℝ\nhr : r < R\nhr' : 0 ≤ r\nz : ℂ\ncts : ContinuousOn (↑abs ∘ fun t => circleTransformBoundingFunction R z t) (closedBall z r ×ˢ univ)\ncomp : IsCompact (closedBall z r ×ˢ [[0, 2 * π]])\nnone : Set.Nonempty (closedBall z r ×ˢ [[0, 2 * π]])\nthis :\n  ∃ x,\n    x ∈ closedBall z r ×ˢ [[0, 2 * π]] ∧\n      IsMaxOn (↑abs ∘ fun t => circleTransformBoundingFunction R z t) (closedBall z r ×ˢ [[0, 2 * π]]) x\n⊢ ∃ x,\n    ∀ (y : ↑(closedBall z r ×ˢ [[0, 2 * π]])),\n      ↑abs (circleTransformBoundingFunction R z ↑y) ≤ ↑abs (circleTransformBoundingFunction R z ↑x)\n[PROOFSTEP]\nsimp only [IsMaxOn, IsMaxFilter] at this \n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nR✝ : ℝ\nz✝ w : ℂ\nR r : ℝ\nhr : r < R\nhr' : 0 ≤ r\nz : ℂ\ncts : ContinuousOn (↑abs ∘ fun t => circleTransformBoundingFunction R z t) (closedBall z r ×ˢ univ)\ncomp : IsCompact (closedBall z r ×ˢ [[0, 2 * π]])\nnone : Set.Nonempty (closedBall z r ×ˢ [[0, 2 * π]])\nthis :\n  ∃ x,\n    x ∈ closedBall z r ×ˢ [[0, 2 * π]] ∧\n      ∀ᶠ (x_1 : ℂ × ℝ) in 𝓟 (closedBall z r ×ˢ [[0, 2 * π]]),\n        (↑abs ∘ fun t => circleTransformBoundingFunction R z t) x_1 ≤\n          (↑abs ∘ fun t => circleTransformBoundingFunction R z t) x\n⊢ ∃ x,\n    ∀ (y : ↑(closedBall z r ×ˢ [[0, 2 * π]])),\n      ↑abs (circleTransformBoundingFunction R z ↑y) ≤ ↑abs (circleTransformBoundingFunction R z ↑x)\n[PROOFSTEP]\nsimpa [SetCoe.forall, Subtype.coe_mk, SetCoe.exists]\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nR✝ : ℝ\nz✝ w : ℂ\nR : ℝ\nhR : 0 < R\nz x : ℂ\nf : ℂ → ℂ\nhx : x ∈ ball z R\nhf : ContinuousOn f (sphere z R)\n⊢ ∃ B ε, 0 < ε ∧ ball x ε ⊆ ball z R ∧ ∀ (t : ℝ) (y : ℂ), y ∈ ball x ε → ‖circleTransformDeriv R z y f t‖ ≤ B\n[PROOFSTEP]\nobtain ⟨r, hr, hrx⟩ := exists_lt_mem_ball_of_mem_ball hx\n[GOAL]\ncase intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nR✝ : ℝ\nz✝ w : ℂ\nR : ℝ\nhR : 0 < R\nz x : ℂ\nf : ℂ → ℂ\nhx : x ∈ ball z R\nhf : ContinuousOn f (sphere z R)\nr : ℝ\nhr : r < R\nhrx : x ∈ ball z r\n⊢ ∃ B ε, 0 < ε ∧ ball x ε ⊆ ball z R ∧ ∀ (t : ℝ) (y : ℂ), y ∈ ball x ε → ‖circleTransformDeriv R z y f t‖ ≤ B\n[PROOFSTEP]\nobtain ⟨ε', hε', H⟩ := exists_ball_subset_ball hrx\n[GOAL]\ncase intro.intro.intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nR✝ : ℝ\nz✝ w : ℂ\nR : ℝ\nhR : 0 < R\nz x : ℂ\nf : ℂ → ℂ\nhx : x ∈ ball z R\nhf : ContinuousOn f (sphere z R)\nr : ℝ\nhr : r < R\nhrx : x ∈ ball z r\nε' : ℝ\nhε' : ε' > 0\nH : ball x ε' ⊆ ball z r\n⊢ ∃ B ε, 0 < ε ∧ ball x ε ⊆ ball z R ∧ ∀ (t : ℝ) (y : ℂ), y ∈ ball x ε → ‖circleTransformDeriv R z y f t‖ ≤ B\n[PROOFSTEP]\nobtain ⟨⟨⟨a, b⟩, ⟨ha, hb⟩⟩, hab⟩ := abs_circleTransformBoundingFunction_le hr (pos_of_mem_ball hrx).le z\n[GOAL]\ncase intro.intro.intro.intro.intro.mk.mk.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nR✝ : ℝ\nz✝ w : ℂ\nR : ℝ\nhR : 0 < R\nz x : ℂ\nf : ℂ → ℂ\nhx : x ∈ ball z R\nhf : ContinuousOn f (sphere z R)\nr : ℝ\nhr : r < R\nhrx : x ∈ ball z r\nε' : ℝ\nhε' : ε' > 0\nH : ball x ε' ⊆ ball z r\na : ℂ\nb : ℝ\nha : (a, b).fst ∈ closedBall z r\nhb : (a, b).snd ∈ [[0, 2 * π]]\nhab :\n  ∀ (y : ↑(closedBall z r ×ˢ [[0, 2 * π]])),\n    ↑abs (circleTransformBoundingFunction R z ↑y) ≤\n      ↑abs\n        (circleTransformBoundingFunction R z\n          ↑{ val := (a, b), property := (_ : (a, b).fst ∈ closedBall z r ∧ (a, b).snd ∈ [[0, 2 * π]]) })\n⊢ ∃ B ε, 0 < ε ∧ ball x ε ⊆ ball z R ∧ ∀ (t : ℝ) (y : ℂ), y ∈ ball x ε → ‖circleTransformDeriv R z y f t‖ ≤ B\n[PROOFSTEP]\nlet V : ℝ → ℂ → ℂ := fun θ w => circleTransformDeriv R z w (fun _ => 1) θ\n[GOAL]\ncase intro.intro.intro.intro.intro.mk.mk.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nR✝ : ℝ\nz✝ w : ℂ\nR : ℝ\nhR : 0 < R\nz x : ℂ\nf : ℂ → ℂ\nhx : x ∈ ball z R\nhf : ContinuousOn f (sphere z R)\nr : ℝ\nhr : r < R\nhrx : x ∈ ball z r\nε' : ℝ\nhε' : ε' > 0\nH : ball x ε' ⊆ ball z r\na : ℂ\nb : ℝ\nha : (a, b).fst ∈ closedBall z r\nhb : (a, b).snd ∈ [[0, 2 * π]]\nhab :\n  ∀ (y : ↑(closedBall z r ×ˢ [[0, 2 * π]])),\n    ↑abs (circleTransformBoundingFunction R z ↑y) ≤\n      ↑abs\n        (circleTransformBoundingFunction R z\n          ↑{ val := (a, b), property := (_ : (a, b).fst ∈ closedBall z r ∧ (a, b).snd ∈ [[0, 2 * π]]) })\nV : ℝ → ℂ → ℂ := fun θ w => circleTransformDeriv R z w (fun x => 1) θ\n⊢ ∃ B ε, 0 < ε ∧ ball x ε ⊆ ball z R ∧ ∀ (t : ℝ) (y : ℂ), y ∈ ball x ε → ‖circleTransformDeriv R z y f t‖ ≤ B\n[PROOFSTEP]\nhave funccomp : ContinuousOn (fun r => abs (f r)) (sphere z R) :=\n  by\n  have cabs : ContinuousOn abs ⊤ := by apply continuous_abs.continuousOn\n  apply cabs.comp hf; rw [MapsTo]; tauto\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nR✝ : ℝ\nz✝ w : ℂ\nR : ℝ\nhR : 0 < R\nz x : ℂ\nf : ℂ → ℂ\nhx : x ∈ ball z R\nhf : ContinuousOn f (sphere z R)\nr : ℝ\nhr : r < R\nhrx : x ∈ ball z r\nε' : ℝ\nhε' : ε' > 0\nH : ball x ε' ⊆ ball z r\na : ℂ\nb : ℝ\nha : (a, b).fst ∈ closedBall z r\nhb : (a, b).snd ∈ [[0, 2 * π]]\nhab :\n  ∀ (y : ↑(closedBall z r ×ˢ [[0, 2 * π]])),\n    ↑abs (circleTransformBoundingFunction R z ↑y) ≤\n      ↑abs\n        (circleTransformBoundingFunction R z\n          ↑{ val := (a, b), property := (_ : (a, b).fst ∈ closedBall z r ∧ (a, b).snd ∈ [[0, 2 * π]]) })\nV : ℝ → ℂ → ℂ := fun θ w => circleTransformDeriv R z w (fun x => 1) θ\n⊢ ContinuousOn (fun r => ↑abs (f r)) (sphere z R)\n[PROOFSTEP]\nhave cabs : ContinuousOn abs ⊤ := by apply continuous_abs.continuousOn\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nR✝ : ℝ\nz✝ w : ℂ\nR : ℝ\nhR : 0 < R\nz x : ℂ\nf : ℂ → ℂ\nhx : x ∈ ball z R\nhf : ContinuousOn f (sphere z R)\nr : ℝ\nhr : r < R\nhrx : x ∈ ball z r\nε' : ℝ\nhε' : ε' > 0\nH : ball x ε' ⊆ ball z r\na : ℂ\nb : ℝ\nha : (a, b).fst ∈ closedBall z r\nhb : (a, b).snd ∈ [[0, 2 * π]]\nhab :\n  ∀ (y : ↑(closedBall z r ×ˢ [[0, 2 * π]])),\n    ↑abs (circleTransformBoundingFunction R z ↑y) ≤\n      ↑abs\n        (circleTransformBoundingFunction R z\n          ↑{ val := (a, b), property := (_ : (a, b).fst ∈ closedBall z r ∧ (a, b).snd ∈ [[0, 2 * π]]) })\nV : ℝ → ℂ → ℂ := fun θ w => circleTransformDeriv R z w (fun x => 1) θ\n⊢ ContinuousOn ↑abs ⊤\n[PROOFSTEP]\napply continuous_abs.continuousOn\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nR✝ : ℝ\nz✝ w : ℂ\nR : ℝ\nhR : 0 < R\nz x : ℂ\nf : ℂ → ℂ\nhx : x ∈ ball z R\nhf : ContinuousOn f (sphere z R)\nr : ℝ\nhr : r < R\nhrx : x ∈ ball z r\nε' : ℝ\nhε' : ε' > 0\nH : ball x ε' ⊆ ball z r\na : ℂ\nb : ℝ\nha : (a, b).fst ∈ closedBall z r\nhb : (a, b).snd ∈ [[0, 2 * π]]\nhab :\n  ∀ (y : ↑(closedBall z r ×ˢ [[0, 2 * π]])),\n    ↑abs (circleTransformBoundingFunction R z ↑y) ≤\n      ↑abs\n        (circleTransformBoundingFunction R z\n          ↑{ val := (a, b), property := (_ : (a, b).fst ∈ closedBall z r ∧ (a, b).snd ∈ [[0, 2 * π]]) })\nV : ℝ → ℂ → ℂ := fun θ w => circleTransformDeriv R z w (fun x => 1) θ\ncabs : ContinuousOn ↑abs ⊤\n⊢ ContinuousOn (fun r => ↑abs (f r)) (sphere z R)\n[PROOFSTEP]\napply cabs.comp hf\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nR✝ : ℝ\nz✝ w : ℂ\nR : ℝ\nhR : 0 < R\nz x : ℂ\nf : ℂ → ℂ\nhx : x ∈ ball z R\nhf : ContinuousOn f (sphere z R)\nr : ℝ\nhr : r < R\nhrx : x ∈ ball z r\nε' : ℝ\nhε' : ε' > 0\nH : ball x ε' ⊆ ball z r\na : ℂ\nb : ℝ\nha : (a, b).fst ∈ closedBall z r\nhb : (a, b).snd ∈ [[0, 2 * π]]\nhab :\n  ∀ (y : ↑(closedBall z r ×ˢ [[0, 2 * π]])),\n    ↑abs (circleTransformBoundingFunction R z ↑y) ≤\n      ↑abs\n        (circleTransformBoundingFunction R z\n          ↑{ val := (a, b), property := (_ : (a, b).fst ∈ closedBall z r ∧ (a, b).snd ∈ [[0, 2 * π]]) })\nV : ℝ → ℂ → ℂ := fun θ w => circleTransformDeriv R z w (fun x => 1) θ\ncabs : ContinuousOn ↑abs ⊤\n⊢ MapsTo f (sphere z R) ⊤\n[PROOFSTEP]\nrw [MapsTo]\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nR✝ : ℝ\nz✝ w : ℂ\nR : ℝ\nhR : 0 < R\nz x : ℂ\nf : ℂ → ℂ\nhx : x ∈ ball z R\nhf : ContinuousOn f (sphere z R)\nr : ℝ\nhr : r < R\nhrx : x ∈ ball z r\nε' : ℝ\nhε' : ε' > 0\nH : ball x ε' ⊆ ball z r\na : ℂ\nb : ℝ\nha : (a, b).fst ∈ closedBall z r\nhb : (a, b).snd ∈ [[0, 2 * π]]\nhab :\n  ∀ (y : ↑(closedBall z r ×ˢ [[0, 2 * π]])),\n    ↑abs (circleTransformBoundingFunction R z ↑y) ≤\n      ↑abs\n        (circleTransformBoundingFunction R z\n          ↑{ val := (a, b), property := (_ : (a, b).fst ∈ closedBall z r ∧ (a, b).snd ∈ [[0, 2 * π]]) })\nV : ℝ → ℂ → ℂ := fun θ w => circleTransformDeriv R z w (fun x => 1) θ\ncabs : ContinuousOn ↑abs ⊤\n⊢ ∀ ⦃x : ℂ⦄, x ∈ sphere z R → f x ∈ ⊤\n[PROOFSTEP]\ntauto\n[GOAL]\ncase intro.intro.intro.intro.intro.mk.mk.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nR✝ : ℝ\nz✝ w : ℂ\nR : ℝ\nhR : 0 < R\nz x : ℂ\nf : ℂ → ℂ\nhx : x ∈ ball z R\nhf : ContinuousOn f (sphere z R)\nr : ℝ\nhr : r < R\nhrx : x ∈ ball z r\nε' : ℝ\nhε' : ε' > 0\nH : ball x ε' ⊆ ball z r\na : ℂ\nb : ℝ\nha : (a, b).fst ∈ closedBall z r\nhb : (a, b).snd ∈ [[0, 2 * π]]\nhab :\n  ∀ (y : ↑(closedBall z r ×ˢ [[0, 2 * π]])),\n    ↑abs (circleTransformBoundingFunction R z ↑y) ≤\n      ↑abs\n        (circleTransformBoundingFunction R z\n          ↑{ val := (a, b), property := (_ : (a, b).fst ∈ closedBall z r ∧ (a, b).snd ∈ [[0, 2 * π]]) })\nV : ℝ → ℂ → ℂ := fun θ w => circleTransformDeriv R z w (fun x => 1) θ\nfunccomp : ContinuousOn (fun r => ↑abs (f r)) (sphere z R)\n⊢ ∃ B ε, 0 < ε ∧ ball x ε ⊆ ball z R ∧ ∀ (t : ℝ) (y : ℂ), y ∈ ball x ε → ‖circleTransformDeriv R z y f t‖ ≤ B\n[PROOFSTEP]\nhave sbou := IsCompact.exists_isMaxOn (isCompact_sphere z R) (NormedSpace.sphere_nonempty.2 hR.le) funccomp\n[GOAL]\ncase intro.intro.intro.intro.intro.mk.mk.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nR✝ : ℝ\nz✝ w : ℂ\nR : ℝ\nhR : 0 < R\nz x : ℂ\nf : ℂ → ℂ\nhx : x ∈ ball z R\nhf : ContinuousOn f (sphere z R)\nr : ℝ\nhr : r < R\nhrx : x ∈ ball z r\nε' : ℝ\nhε' : ε' > 0\nH : ball x ε' ⊆ ball z r\na : ℂ\nb : ℝ\nha : (a, b).fst ∈ closedBall z r\nhb : (a, b).snd ∈ [[0, 2 * π]]\nhab :\n  ∀ (y : ↑(closedBall z r ×ˢ [[0, 2 * π]])),\n    ↑abs (circleTransformBoundingFunction R z ↑y) ≤\n      ↑abs\n        (circleTransformBoundingFunction R z\n          ↑{ val := (a, b), property := (_ : (a, b).fst ∈ closedBall z r ∧ (a, b).snd ∈ [[0, 2 * π]]) })\nV : ℝ → ℂ → ℂ := fun θ w => circleTransformDeriv R z w (fun x => 1) θ\nfunccomp : ContinuousOn (fun r => ↑abs (f r)) (sphere z R)\nsbou : ∃ x, x ∈ sphere z R ∧ IsMaxOn (fun r => ↑abs (f r)) (sphere z R) x\n⊢ ∃ B ε, 0 < ε ∧ ball x ε ⊆ ball z R ∧ ∀ (t : ℝ) (y : ℂ), y ∈ ball x ε → ‖circleTransformDeriv R z y f t‖ ≤ B\n[PROOFSTEP]\nobtain ⟨X, HX, HX2⟩ := sbou\n[GOAL]\ncase intro.intro.intro.intro.intro.mk.mk.intro.intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nR✝ : ℝ\nz✝ w : ℂ\nR : ℝ\nhR : 0 < R\nz x : ℂ\nf : ℂ → ℂ\nhx : x ∈ ball z R\nhf : ContinuousOn f (sphere z R)\nr : ℝ\nhr : r < R\nhrx : x ∈ ball z r\nε' : ℝ\nhε' : ε' > 0\nH : ball x ε' ⊆ ball z r\na : ℂ\nb : ℝ\nha : (a, b).fst ∈ closedBall z r\nhb : (a, b).snd ∈ [[0, 2 * π]]\nhab :\n  ∀ (y : ↑(closedBall z r ×ˢ [[0, 2 * π]])),\n    ↑abs (circleTransformBoundingFunction R z ↑y) ≤\n      ↑abs\n        (circleTransformBoundingFunction R z\n          ↑{ val := (a, b), property := (_ : (a, b).fst ∈ closedBall z r ∧ (a, b).snd ∈ [[0, 2 * π]]) })\nV : ℝ → ℂ → ℂ := fun θ w => circleTransformDeriv R z w (fun x => 1) θ\nfunccomp : ContinuousOn (fun r => ↑abs (f r)) (sphere z R)\nX : ℂ\nHX : X ∈ sphere z R\nHX2 : IsMaxOn (fun r => ↑abs (f r)) (sphere z R) X\n⊢ ∃ B ε, 0 < ε ∧ ball x ε ⊆ ball z R ∧ ∀ (t : ℝ) (y : ℂ), y ∈ ball x ε → ‖circleTransformDeriv R z y f t‖ ≤ B\n[PROOFSTEP]\nrefine' ⟨abs (V b a) * abs (f X), ε', hε', Subset.trans H (ball_subset_ball hr.le), _⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.mk.mk.intro.intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nR✝ : ℝ\nz✝ w : ℂ\nR : ℝ\nhR : 0 < R\nz x : ℂ\nf : ℂ → ℂ\nhx : x ∈ ball z R\nhf : ContinuousOn f (sphere z R)\nr : ℝ\nhr : r < R\nhrx : x ∈ ball z r\nε' : ℝ\nhε' : ε' > 0\nH : ball x ε' ⊆ ball z r\na : ℂ\nb : ℝ\nha : (a, b).fst ∈ closedBall z r\nhb : (a, b).snd ∈ [[0, 2 * π]]\nhab :\n  ∀ (y : ↑(closedBall z r ×ˢ [[0, 2 * π]])),\n    ↑abs (circleTransformBoundingFunction R z ↑y) ≤\n      ↑abs\n        (circleTransformBoundingFunction R z\n          ↑{ val := (a, b), property := (_ : (a, b).fst ∈ closedBall z r ∧ (a, b).snd ∈ [[0, 2 * π]]) })\nV : ℝ → ℂ → ℂ := fun θ w => circleTransformDeriv R z w (fun x => 1) θ\nfunccomp : ContinuousOn (fun r => ↑abs (f r)) (sphere z R)\nX : ℂ\nHX : X ∈ sphere z R\nHX2 : IsMaxOn (fun r => ↑abs (f r)) (sphere z R) X\n⊢ ∀ (t : ℝ) (y : ℂ), y ∈ ball x ε' → ‖circleTransformDeriv R z y f t‖ ≤ ↑abs (V b a) * ↑abs (f X)\n[PROOFSTEP]\nintro y v hv\n[GOAL]\ncase intro.intro.intro.intro.intro.mk.mk.intro.intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nR✝ : ℝ\nz✝ w : ℂ\nR : ℝ\nhR : 0 < R\nz x : ℂ\nf : ℂ → ℂ\nhx : x ∈ ball z R\nhf : ContinuousOn f (sphere z R)\nr : ℝ\nhr : r < R\nhrx : x ∈ ball z r\nε' : ℝ\nhε' : ε' > 0\nH : ball x ε' ⊆ ball z r\na : ℂ\nb : ℝ\nha : (a, b).fst ∈ closedBall z r\nhb : (a, b).snd ∈ [[0, 2 * π]]\nhab :\n  ∀ (y : ↑(closedBall z r ×ˢ [[0, 2 * π]])),\n    ↑abs (circleTransformBoundingFunction R z ↑y) ≤\n      ↑abs\n        (circleTransformBoundingFunction R z\n          ↑{ val := (a, b), property := (_ : (a, b).fst ∈ closedBall z r ∧ (a, b).snd ∈ [[0, 2 * π]]) })\nV : ℝ → ℂ → ℂ := fun θ w => circleTransformDeriv R z w (fun x => 1) θ\nfunccomp : ContinuousOn (fun r => ↑abs (f r)) (sphere z R)\nX : ℂ\nHX : X ∈ sphere z R\nHX2 : IsMaxOn (fun r => ↑abs (f r)) (sphere z R) X\ny : ℝ\nv : ℂ\nhv : v ∈ ball x ε'\n⊢ ‖circleTransformDeriv R z v f y‖ ≤ ↑abs (V b a) * ↑abs (f X)\n[PROOFSTEP]\nobtain ⟨y1, hy1, hfun⟩ := Periodic.exists_mem_Ico₀ (circleTransformDeriv_periodic R z v f) Real.two_pi_pos y\n[GOAL]\ncase intro.intro.intro.intro.intro.mk.mk.intro.intro.intro.intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nR✝ : ℝ\nz✝ w : ℂ\nR : ℝ\nhR : 0 < R\nz x : ℂ\nf : ℂ → ℂ\nhx : x ∈ ball z R\nhf : ContinuousOn f (sphere z R)\nr : ℝ\nhr : r < R\nhrx : x ∈ ball z r\nε' : ℝ\nhε' : ε' > 0\nH : ball x ε' ⊆ ball z r\na : ℂ\nb : ℝ\nha : (a, b).fst ∈ closedBall z r\nhb : (a, b).snd ∈ [[0, 2 * π]]\nhab :\n  ∀ (y : ↑(closedBall z r ×ˢ [[0, 2 * π]])),\n    ↑abs (circleTransformBoundingFunction R z ↑y) ≤\n      ↑abs\n        (circleTransformBoundingFunction R z\n          ↑{ val := (a, b), property := (_ : (a, b).fst ∈ closedBall z r ∧ (a, b).snd ∈ [[0, 2 * π]]) })\nV : ℝ → ℂ → ℂ := fun θ w => circleTransformDeriv R z w (fun x => 1) θ\nfunccomp : ContinuousOn (fun r => ↑abs (f r)) (sphere z R)\nX : ℂ\nHX : X ∈ sphere z R\nHX2 : IsMaxOn (fun r => ↑abs (f r)) (sphere z R) X\ny : ℝ\nv : ℂ\nhv : v ∈ ball x ε'\ny1 : ℝ\nhy1 : y1 ∈ Ico 0 (2 * π)\nhfun : circleTransformDeriv R z v f y = circleTransformDeriv R z v f y1\n⊢ ‖circleTransformDeriv R z v f y‖ ≤ ↑abs (V b a) * ↑abs (f X)\n[PROOFSTEP]\nhave hy2 : y1 ∈ [[0, 2 * π]] := by\n  convert Ico_subset_Icc_self hy1 using 1\n  simp [uIcc_of_le Real.two_pi_pos.le]\n[GOAL]\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nR✝ : ℝ\nz✝ w : ℂ\nR : ℝ\nhR : 0 < R\nz x : ℂ\nf : ℂ → ℂ\nhx : x ∈ ball z R\nhf : ContinuousOn f (sphere z R)\nr : ℝ\nhr : r < R\nhrx : x ∈ ball z r\nε' : ℝ\nhε' : ε' > 0\nH : ball x ε' ⊆ ball z r\na : ℂ\nb : ℝ\nha : (a, b).fst ∈ closedBall z r\nhb : (a, b).snd ∈ [[0, 2 * π]]\nhab :\n  ∀ (y : ↑(closedBall z r ×ˢ [[0, 2 * π]])),\n    ↑abs (circleTransformBoundingFunction R z ↑y) ≤\n      ↑abs\n        (circleTransformBoundingFunction R z\n          ↑{ val := (a, b), property := (_ : (a, b).fst ∈ closedBall z r ∧ (a, b).snd ∈ [[0, 2 * π]]) })\nV : ℝ → ℂ → ℂ := fun θ w => circleTransformDeriv R z w (fun x => 1) θ\nfunccomp : ContinuousOn (fun r => ↑abs (f r)) (sphere z R)\nX : ℂ\nHX : X ∈ sphere z R\nHX2 : IsMaxOn (fun r => ↑abs (f r)) (sphere z R) X\ny : ℝ\nv : ℂ\nhv : v ∈ ball x ε'\ny1 : ℝ\nhy1 : y1 ∈ Ico 0 (2 * π)\nhfun : circleTransformDeriv R z v f y = circleTransformDeriv R z v f y1\n⊢ y1 ∈ [[0, 2 * π]]\n[PROOFSTEP]\nconvert Ico_subset_Icc_self hy1 using 1\n[GOAL]\ncase h.e'_5\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nR✝ : ℝ\nz✝ w : ℂ\nR : ℝ\nhR : 0 < R\nz x : ℂ\nf : ℂ → ℂ\nhx : x ∈ ball z R\nhf : ContinuousOn f (sphere z R)\nr : ℝ\nhr : r < R\nhrx : x ∈ ball z r\nε' : ℝ\nhε' : ε' > 0\nH : ball x ε' ⊆ ball z r\na : ℂ\nb : ℝ\nha : (a, b).fst ∈ closedBall z r\nhb : (a, b).snd ∈ [[0, 2 * π]]\nhab :\n  ∀ (y : ↑(closedBall z r ×ˢ [[0, 2 * π]])),\n    ↑abs (circleTransformBoundingFunction R z ↑y) ≤\n      ↑abs\n        (circleTransformBoundingFunction R z\n          ↑{ val := (a, b), property := (_ : (a, b).fst ∈ closedBall z r ∧ (a, b).snd ∈ [[0, 2 * π]]) })\nV : ℝ → ℂ → ℂ := fun θ w => circleTransformDeriv R z w (fun x => 1) θ\nfunccomp : ContinuousOn (fun r => ↑abs (f r)) (sphere z R)\nX : ℂ\nHX : X ∈ sphere z R\nHX2 : IsMaxOn (fun r => ↑abs (f r)) (sphere z R) X\ny : ℝ\nv : ℂ\nhv : v ∈ ball x ε'\ny1 : ℝ\nhy1 : y1 ∈ Ico 0 (2 * π)\nhfun : circleTransformDeriv R z v f y = circleTransformDeriv R z v f y1\n⊢ [[0, 2 * π]] = Icc 0 (2 * π)\n[PROOFSTEP]\nsimp [uIcc_of_le Real.two_pi_pos.le]\n[GOAL]\ncase intro.intro.intro.intro.intro.mk.mk.intro.intro.intro.intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nR✝ : ℝ\nz✝ w : ℂ\nR : ℝ\nhR : 0 < R\nz x : ℂ\nf : ℂ → ℂ\nhx : x ∈ ball z R\nhf : ContinuousOn f (sphere z R)\nr : ℝ\nhr : r < R\nhrx : x ∈ ball z r\nε' : ℝ\nhε' : ε' > 0\nH : ball x ε' ⊆ ball z r\na : ℂ\nb : ℝ\nha : (a, b).fst ∈ closedBall z r\nhb : (a, b).snd ∈ [[0, 2 * π]]\nhab :\n  ∀ (y : ↑(closedBall z r ×ˢ [[0, 2 * π]])),\n    ↑abs (circleTransformBoundingFunction R z ↑y) ≤\n      ↑abs\n        (circleTransformBoundingFunction R z\n          ↑{ val := (a, b), property := (_ : (a, b).fst ∈ closedBall z r ∧ (a, b).snd ∈ [[0, 2 * π]]) })\nV : ℝ → ℂ → ℂ := fun θ w => circleTransformDeriv R z w (fun x => 1) θ\nfunccomp : ContinuousOn (fun r => ↑abs (f r)) (sphere z R)\nX : ℂ\nHX : X ∈ sphere z R\nHX2 : IsMaxOn (fun r => ↑abs (f r)) (sphere z R) X\ny : ℝ\nv : ℂ\nhv : v ∈ ball x ε'\ny1 : ℝ\nhy1 : y1 ∈ Ico 0 (2 * π)\nhfun : circleTransformDeriv R z v f y = circleTransformDeriv R z v f y1\nhy2 : y1 ∈ [[0, 2 * π]]\n⊢ ‖circleTransformDeriv R z v f y‖ ≤ ↑abs (V b a) * ↑abs (f X)\n[PROOFSTEP]\nsimp only [IsMaxOn, IsMaxFilter, eventually_principal, mem_sphere_iff_norm, norm_eq_abs] at HX2 \n[GOAL]\ncase intro.intro.intro.intro.intro.mk.mk.intro.intro.intro.intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nR✝ : ℝ\nz✝ w : ℂ\nR : ℝ\nhR : 0 < R\nz x : ℂ\nf : ℂ → ℂ\nhx : x ∈ ball z R\nhf : ContinuousOn f (sphere z R)\nr : ℝ\nhr : r < R\nhrx : x ∈ ball z r\nε' : ℝ\nhε' : ε' > 0\nH : ball x ε' ⊆ ball z r\na : ℂ\nb : ℝ\nha : (a, b).fst ∈ closedBall z r\nhb : (a, b).snd ∈ [[0, 2 * π]]\nhab :\n  ∀ (y : ↑(closedBall z r ×ˢ [[0, 2 * π]])),\n    ↑abs (circleTransformBoundingFunction R z ↑y) ≤\n      ↑abs\n        (circleTransformBoundingFunction R z\n          ↑{ val := (a, b), property := (_ : (a, b).fst ∈ closedBall z r ∧ (a, b).snd ∈ [[0, 2 * π]]) })\nV : ℝ → ℂ → ℂ := fun θ w => circleTransformDeriv R z w (fun x => 1) θ\nfunccomp : ContinuousOn (fun r => ↑abs (f r)) (sphere z R)\nX : ℂ\nHX : X ∈ sphere z R\ny : ℝ\nv : ℂ\nhv : v ∈ ball x ε'\ny1 : ℝ\nhy1 : y1 ∈ Ico 0 (2 * π)\nhfun : circleTransformDeriv R z v f y = circleTransformDeriv R z v f y1\nhy2 : y1 ∈ [[0, 2 * π]]\nHX2 : ∀ (x : ℂ), ↑abs (x - z) = R → ↑abs (f x) ≤ ↑abs (f X)\n⊢ ‖circleTransformDeriv R z v f y‖ ≤ ↑abs (V b a) * ↑abs (f X)\n[PROOFSTEP]\nhave :=\n  mul_le_mul (hab ⟨⟨v, y1⟩, ⟨ball_subset_closedBall (H hv), hy2⟩⟩)\n    (HX2 (circleMap z R y1) (circleMap_mem_sphere z hR.le y1)) (Complex.abs.nonneg _) (Complex.abs.nonneg _)\n[GOAL]\ncase intro.intro.intro.intro.intro.mk.mk.intro.intro.intro.intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nR✝ : ℝ\nz✝ w : ℂ\nR : ℝ\nhR : 0 < R\nz x : ℂ\nf : ℂ → ℂ\nhx : x ∈ ball z R\nhf : ContinuousOn f (sphere z R)\nr : ℝ\nhr : r < R\nhrx : x ∈ ball z r\nε' : ℝ\nhε' : ε' > 0\nH : ball x ε' ⊆ ball z r\na : ℂ\nb : ℝ\nha : (a, b).fst ∈ closedBall z r\nhb : (a, b).snd ∈ [[0, 2 * π]]\nhab :\n  ∀ (y : ↑(closedBall z r ×ˢ [[0, 2 * π]])),\n    ↑abs (circleTransformBoundingFunction R z ↑y) ≤\n      ↑abs\n        (circleTransformBoundingFunction R z\n          ↑{ val := (a, b), property := (_ : (a, b).fst ∈ closedBall z r ∧ (a, b).snd ∈ [[0, 2 * π]]) })\nV : ℝ → ℂ → ℂ := fun θ w => circleTransformDeriv R z w (fun x => 1) θ\nfunccomp : ContinuousOn (fun r => ↑abs (f r)) (sphere z R)\nX : ℂ\nHX : X ∈ sphere z R\ny : ℝ\nv : ℂ\nhv : v ∈ ball x ε'\ny1 : ℝ\nhy1 : y1 ∈ Ico 0 (2 * π)\nhfun : circleTransformDeriv R z v f y = circleTransformDeriv R z v f y1\nhy2 : y1 ∈ [[0, 2 * π]]\nHX2 : ∀ (x : ℂ), ↑abs (x - z) = R → ↑abs (f x) ≤ ↑abs (f X)\nthis :\n  ↑abs\n        (circleTransformBoundingFunction R z\n          ↑{ val := (v, y1), property := (_ : (v, y1).fst ∈ closedBall z r ∧ (v, y1).snd ∈ [[0, 2 * π]]) }) *\n      ↑abs (f (circleMap z R y1)) ≤\n    ↑abs\n        (circleTransformBoundingFunction R z\n          ↑{ val := (a, b), property := (_ : (a, b).fst ∈ closedBall z r ∧ (a, b).snd ∈ [[0, 2 * π]]) }) *\n      ↑abs (f X)\n⊢ ‖circleTransformDeriv R z v f y‖ ≤ ↑abs (V b a) * ↑abs (f X)\n[PROOFSTEP]\nsimp_rw [hfun]\n[GOAL]\ncase intro.intro.intro.intro.intro.mk.mk.intro.intro.intro.intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nR✝ : ℝ\nz✝ w : ℂ\nR : ℝ\nhR : 0 < R\nz x : ℂ\nf : ℂ → ℂ\nhx : x ∈ ball z R\nhf : ContinuousOn f (sphere z R)\nr : ℝ\nhr : r < R\nhrx : x ∈ ball z r\nε' : ℝ\nhε' : ε' > 0\nH : ball x ε' ⊆ ball z r\na : ℂ\nb : ℝ\nha : (a, b).fst ∈ closedBall z r\nhb : (a, b).snd ∈ [[0, 2 * π]]\nhab :\n  ∀ (y : ↑(closedBall z r ×ˢ [[0, 2 * π]])),\n    ↑abs (circleTransformBoundingFunction R z ↑y) ≤\n      ↑abs\n        (circleTransformBoundingFunction R z\n          ↑{ val := (a, b), property := (_ : (a, b).fst ∈ closedBall z r ∧ (a, b).snd ∈ [[0, 2 * π]]) })\nV : ℝ → ℂ → ℂ := fun θ w => circleTransformDeriv R z w (fun x => 1) θ\nfunccomp : ContinuousOn (fun r => ↑abs (f r)) (sphere z R)\nX : ℂ\nHX : X ∈ sphere z R\ny : ℝ\nv : ℂ\nhv : v ∈ ball x ε'\ny1 : ℝ\nhy1 : y1 ∈ Ico 0 (2 * π)\nhfun : circleTransformDeriv R z v f y = circleTransformDeriv R z v f y1\nhy2 : y1 ∈ [[0, 2 * π]]\nHX2 : ∀ (x : ℂ), ↑abs (x - z) = R → ↑abs (f x) ≤ ↑abs (f X)\nthis :\n  ↑abs\n        (circleTransformBoundingFunction R z\n          ↑{ val := (v, y1), property := (_ : (v, y1).fst ∈ closedBall z r ∧ (v, y1).snd ∈ [[0, 2 * π]]) }) *\n      ↑abs (f (circleMap z R y1)) ≤\n    ↑abs\n        (circleTransformBoundingFunction R z\n          ↑{ val := (a, b), property := (_ : (a, b).fst ∈ closedBall z r ∧ (a, b).snd ∈ [[0, 2 * π]]) }) *\n      ↑abs (f X)\n⊢ ‖circleTransformDeriv R z v f y1‖ ≤ ↑abs (circleTransformDeriv R z a (fun x => 1) b) * ↑abs (f X)\n[PROOFSTEP]\nsimp only [circleTransformBoundingFunction, circleTransformDeriv, norm_eq_abs, Algebra.id.smul_eq_mul, deriv_circleMap,\n  map_mul, abs_circleMap_zero, abs_I, mul_one, ← mul_assoc, mul_inv_rev, inv_I, abs_neg, abs_inv, abs_ofReal, one_mul,\n  abs_two, abs_pow, mem_ball, gt_iff_lt, Subtype.coe_mk, SetCoe.forall, mem_prod, mem_closedBall, and_imp, Prod.forall,\n  NormedSpace.sphere_nonempty, mem_sphere_iff_norm] at *\n[GOAL]\ncase intro.intro.intro.intro.intro.mk.mk.intro.intro.intro.intro.intro\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace ℂ E\nR✝ : ℝ\nz✝ w : ℂ\nR : ℝ\nhR : 0 < R\nz x : ℂ\nf : ℂ → ℂ\nhf : ContinuousOn f (sphere z R)\nr : ℝ\nhr : r < R\nε' : ℝ\nH : ball x ε' ⊆ ball z r\na : ℂ\nb : ℝ\nha : (a, b).fst ∈ closedBall z r\nhb : (a, b).snd ∈ [[0, 2 * π]]\nV : ℝ → ℂ → ℂ := fun θ w => circleTransformDeriv R z w (fun x => 1) θ\nfunccomp : ContinuousOn (fun r => ↑abs (f r)) (sphere z R)\nX : ℂ\ny : ℝ\nv : ℂ\nhv : v ∈ ball x ε'\ny1 : ℝ\nhy1 : y1 ∈ Ico 0 (2 * π)\nhy2 : y1 ∈ [[0, 2 * π]]\nHX2 : ∀ (x : ℂ), ↑abs (x - z) = R → ↑abs (f x) ≤ ↑abs (f X)\nhx : dist x z < R\nhrx : dist x z < r\nhε' : 0 < ε'\nhab :\n  ∀ (a_1 : ℂ) (b_1 : ℝ),\n    dist a_1 z ≤ r →\n      b_1 ∈ [[0, 2 * π]] →\n        ↑abs (-I) * ↑abs (↑π)⁻¹ * ↑abs 2⁻¹ * |R| * ↑abs ((circleMap z R b_1 - a_1) ^ 2)⁻¹ ≤\n          ↑abs (-I) * ↑abs (↑π)⁻¹ * ↑abs 2⁻¹ * |R| * ↑abs ((circleMap z R b - a) ^ 2)⁻¹\nHX : ↑abs (X - z) = R\nhfun :\n  -I * (↑π)⁻¹ * 2⁻¹ * circleMap 0 R y * I * ((circleMap z R y - v) ^ 2)⁻¹ * f (circleMap z R y) =\n    -I * (↑π)⁻¹ * 2⁻¹ * circleMap 0 R y1 * I * ((circleMap z R y1 - v) ^ 2)⁻¹ * f (circleMap z R y1)\nthis :\n  ↑abs (-I) * ↑abs (↑π)⁻¹ * ↑abs 2⁻¹ * |R| * ↑abs ((circleMap z R y1 - v) ^ 2)⁻¹ * ↑abs (f (circleMap z R y1)) ≤\n    ↑abs (-I) * ↑abs (↑π)⁻¹ * ↑abs 2⁻¹ * |R| * ↑abs ((circleMap z R b - a) ^ 2)⁻¹ * ↑abs (f X)\n⊢ ↑abs (-I) * ↑abs (↑π)⁻¹ * ↑abs 2⁻¹ * |R| * ↑abs ((circleMap z R y1 - v) ^ 2)⁻¹ * ↑abs (f (circleMap z R y1)) ≤\n    ↑abs (-I) * ↑abs (↑π)⁻¹ * ↑abs 2⁻¹ * |R| * ↑abs ((circleMap z R b - a) ^ 2)⁻¹ * ↑abs (f X)\n[PROOFSTEP]\nexact this\n", "meta": {"mathlib_filename": "Mathlib.MeasureTheory.Integral.CircleTransform", "llama_tokens": 21786, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8152324803738429, "lm_q2_score": 0.6261241772283035, "lm_q1q2_score": 0.5104367660238615}}
{"text": "[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : Ring S\ninst✝⁵ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Field F\ninst✝¹ : Algebra K L\ninst✝ : Algebra K F\nι : Type w\nh : ¬∃ s, Nonempty (Basis { x // x ∈ s } R S)\nx : S\n⊢ ↑(norm R) x = 1\n[PROOFSTEP]\nrw [norm_apply, LinearMap.det]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : Ring S\ninst✝⁵ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Field F\ninst✝¹ : Algebra K L\ninst✝ : Algebra K F\nι : Type w\nh : ¬∃ s, Nonempty (Basis { x // x ∈ s } R S)\nx : S\n⊢ ↑(if H : ∃ s, Nonempty (Basis { x // x ∈ s } R S) then\n          detAux (Trunc.mk (Nonempty.some (_ : Nonempty (Basis { x // x ∈ Exists.choose H } R S))))\n        else 1)\n      (↑(lmul R S) x) =\n    1\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : Ring S\ninst✝⁵ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Field F\ninst✝¹ : Algebra K L\ninst✝ : Algebra K F\nι : Type w\nh : ¬∃ s, Nonempty (Basis { x // x ∈ s } R S)\nx : S\nh✝ : ∃ s, Nonempty (Basis { x // x ∈ s } R S)\n⊢ ↑(detAux (Trunc.mk (Nonempty.some (_ : Nonempty (Basis { x // x ∈ Exists.choose h✝ } R S))))) (↑(lmul R S) x) = 1\n[PROOFSTEP]\ntrivial\n[GOAL]\ncase neg\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : Ring S\ninst✝⁵ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Field F\ninst✝¹ : Algebra K L\ninst✝ : Algebra K F\nι : Type w\nh : ¬∃ s, Nonempty (Basis { x // x ∈ s } R S)\nx : S\nh✝ : ¬∃ s, Nonempty (Basis { x // x ∈ s } R S)\n⊢ ↑1 (↑(lmul R S) x) = 1\n[PROOFSTEP]\ntrivial\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : Ring S\ninst✝⁵ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Field F\ninst✝¹ : Algebra K L\ninst✝ : Algebra K F\nι : Type w\nh : ¬Module.Finite R S\nx : S\n⊢ ↑(norm R) x = 1\n[PROOFSTEP]\nrefine norm_eq_one_of_not_exists_basis _ (mt ?_ h) _\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : Ring S\ninst✝⁵ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Field F\ninst✝¹ : Algebra K L\ninst✝ : Algebra K F\nι : Type w\nh : ¬Module.Finite R S\nx : S\n⊢ (∃ s, Nonempty (Basis { x // x ∈ s } R S)) → Module.Finite R S\n[PROOFSTEP]\nrintro ⟨s, ⟨b⟩⟩\n[GOAL]\ncase intro.intro\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : Ring S\ninst✝⁵ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Field F\ninst✝¹ : Algebra K L\ninst✝ : Algebra K F\nι : Type w\nh : ¬Module.Finite R S\nx : S\ns : Finset S\nb : Basis { x // x ∈ s } R S\n⊢ Module.Finite R S\n[PROOFSTEP]\nexact Module.Finite.of_basis b\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁹ : CommRing R\ninst✝⁸ : Ring S\ninst✝⁷ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁶ : Field K\ninst✝⁵ : Field L\ninst✝⁴ : Field F\ninst✝³ : Algebra K L\ninst✝² : Algebra K F\nι : Type w\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nb : Basis ι R S\ns : S\n⊢ ↑(norm R) s = det (↑(leftMulMatrix b) s)\n[PROOFSTEP]\nrw [norm_apply, ← LinearMap.det_toMatrix b, ← toMatrix_lmul_eq]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁹ : CommRing R\ninst✝⁸ : Ring S\ninst✝⁷ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁶ : Field K\ninst✝⁵ : Field L\ninst✝⁴ : Field F\ninst✝³ : Algebra K L\ninst✝² : Algebra K F\nι : Type w\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\nb : Basis ι R S\ns : S\n⊢ det (↑(toMatrix b b) (↑(lmul R S) s)) = det (↑(toMatrix b b) (mulLeft R s))\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Ring S\ninst✝⁶ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁵ : Field K\ninst✝⁴ : Field L\ninst✝³ : Field F\ninst✝² : Algebra K L\ninst✝¹ : Algebra K F\nι : Type w\ninst✝ : Fintype ι\nb : Basis ι R S\nx : R\n⊢ ↑(norm R) (↑(algebraMap R S) x) = x ^ Fintype.card ι\n[PROOFSTEP]\nhaveI := Classical.decEq ι\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Ring S\ninst✝⁶ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁵ : Field K\ninst✝⁴ : Field L\ninst✝³ : Field F\ninst✝² : Algebra K L\ninst✝¹ : Algebra K F\nι : Type w\ninst✝ : Fintype ι\nb : Basis ι R S\nx : R\nthis : DecidableEq ι\n⊢ ↑(norm R) (↑(algebraMap R S) x) = x ^ Fintype.card ι\n[PROOFSTEP]\nrw [norm_apply, ← det_toMatrix b, lmul_algebraMap]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Ring S\ninst✝⁶ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁵ : Field K\ninst✝⁴ : Field L\ninst✝³ : Field F\ninst✝² : Algebra K L\ninst✝¹ : Algebra K F\nι : Type w\ninst✝ : Fintype ι\nb : Basis ι R S\nx : R\nthis : DecidableEq ι\n⊢ det (↑(toMatrix b b) (↑(lsmul R R ((fun x => S) x)) x)) = x ^ Fintype.card ι\n[PROOFSTEP]\nconvert @det_diagonal _ _ _ _ _ fun _ : ι => x\n[GOAL]\ncase h.e'_2.h.e'_6\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Ring S\ninst✝⁶ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁵ : Field K\ninst✝⁴ : Field L\ninst✝³ : Field F\ninst✝² : Algebra K L\ninst✝¹ : Algebra K F\nι : Type w\ninst✝ : Fintype ι\nb : Basis ι R S\nx : R\nthis : DecidableEq ι\n⊢ ↑(toMatrix b b) (↑(lsmul R R ((fun x => S) x)) x) = diagonal fun x_1 => x\n[PROOFSTEP]\next (i j)\n[GOAL]\ncase h.e'_2.h.e'_6.a.h\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Ring S\ninst✝⁶ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁵ : Field K\ninst✝⁴ : Field L\ninst✝³ : Field F\ninst✝² : Algebra K L\ninst✝¹ : Algebra K F\nι : Type w\ninst✝ : Fintype ι\nb : Basis ι R S\nx : R\nthis : DecidableEq ι\ni j : ι\n⊢ ↑(toMatrix b b) (↑(lsmul R R ((fun x => S) x)) x) i j = diagonal (fun x_1 => x) i j\n[PROOFSTEP]\nrw [toMatrix_lsmul, Matrix.diagonal]\n[GOAL]\ncase h.e'_3\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Ring S\ninst✝⁶ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁵ : Field K\ninst✝⁴ : Field L\ninst✝³ : Field F\ninst✝² : Algebra K L\ninst✝¹ : Algebra K F\nι : Type w\ninst✝ : Fintype ι\nb : Basis ι R S\nx : R\nthis : DecidableEq ι\n⊢ x ^ Fintype.card ι = ∏ i : ι, x\n[PROOFSTEP]\nrw [Finset.prod_const, Finset.card_univ]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁹ : CommRing R\ninst✝⁸ : Ring S\ninst✝⁷ : Algebra R S\nK : Type u_4\nL✝ : Type u_5\nF : Type u_6\ninst✝⁶ : Field K\ninst✝⁵ : Field L✝\ninst✝⁴ : Field F\ninst✝³ : Algebra K L✝\ninst✝² : Algebra K F\nι : Type w\nL : Type u_7\ninst✝¹ : Ring L\ninst✝ : Algebra K L\nx : K\n⊢ ↑(norm K) (↑(algebraMap K L) x) = x ^ finrank K L\n[PROOFSTEP]\nby_cases H : ∃ s : Finset L, Nonempty (Basis s K L)\n[GOAL]\ncase pos\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁹ : CommRing R\ninst✝⁸ : Ring S\ninst✝⁷ : Algebra R S\nK : Type u_4\nL✝ : Type u_5\nF : Type u_6\ninst✝⁶ : Field K\ninst✝⁵ : Field L✝\ninst✝⁴ : Field F\ninst✝³ : Algebra K L✝\ninst✝² : Algebra K F\nι : Type w\nL : Type u_7\ninst✝¹ : Ring L\ninst✝ : Algebra K L\nx : K\nH : ∃ s, Nonempty (Basis { x // x ∈ s } K L)\n⊢ ↑(norm K) (↑(algebraMap K L) x) = x ^ finrank K L\n[PROOFSTEP]\nrw [norm_algebraMap_of_basis H.choose_spec.some, finrank_eq_card_basis H.choose_spec.some]\n[GOAL]\ncase neg\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁹ : CommRing R\ninst✝⁸ : Ring S\ninst✝⁷ : Algebra R S\nK : Type u_4\nL✝ : Type u_5\nF : Type u_6\ninst✝⁶ : Field K\ninst✝⁵ : Field L✝\ninst✝⁴ : Field F\ninst✝³ : Algebra K L✝\ninst✝² : Algebra K F\nι : Type w\nL : Type u_7\ninst✝¹ : Ring L\ninst✝ : Algebra K L\nx : K\nH : ¬∃ s, Nonempty (Basis { x // x ∈ s } K L)\n⊢ ↑(norm K) (↑(algebraMap K L) x) = x ^ finrank K L\n[PROOFSTEP]\nrw [norm_eq_one_of_not_exists_basis K H, finrank_eq_zero_of_not_exists_basis, pow_zero]\n[GOAL]\ncase neg\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁹ : CommRing R\ninst✝⁸ : Ring S\ninst✝⁷ : Algebra R S\nK : Type u_4\nL✝ : Type u_5\nF : Type u_6\ninst✝⁶ : Field K\ninst✝⁵ : Field L✝\ninst✝⁴ : Field F\ninst✝³ : Algebra K L✝\ninst✝² : Algebra K F\nι : Type w\nL : Type u_7\ninst✝¹ : Ring L\ninst✝ : Algebra K L\nx : K\nH : ¬∃ s, Nonempty (Basis { x // x ∈ s } K L)\n⊢ ¬∃ s, Nonempty (Basis (↑↑s) K L)\n[PROOFSTEP]\nrintro ⟨s, ⟨b⟩⟩\n[GOAL]\ncase neg.intro.intro\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁹ : CommRing R\ninst✝⁸ : Ring S\ninst✝⁷ : Algebra R S\nK : Type u_4\nL✝ : Type u_5\nF : Type u_6\ninst✝⁶ : Field K\ninst✝⁵ : Field L✝\ninst✝⁴ : Field F\ninst✝³ : Algebra K L✝\ninst✝² : Algebra K F\nι : Type w\nL : Type u_7\ninst✝¹ : Ring L\ninst✝ : Algebra K L\nx : K\nH : ¬∃ s, Nonempty (Basis { x // x ∈ s } K L)\ns : Finset L\nb : Basis (↑↑s) K L\n⊢ False\n[PROOFSTEP]\nexact H ⟨s, ⟨b⟩⟩\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : Ring S\ninst✝⁵ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Field F\ninst✝¹ : Algebra K L\ninst✝ : Algebra K F\nι : Type w\npb : PowerBasis R S\n⊢ ↑(norm R) pb.gen = (-1) ^ pb.dim * coeff (minpoly R pb.gen) 0\n[PROOFSTEP]\nrw [norm_eq_matrix_det pb.basis, det_eq_sign_charpoly_coeff, charpoly_leftMulMatrix, Fintype.card_fin]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Ring S\ninst✝⁶ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁵ : Field K\ninst✝⁴ : Field L\ninst✝³ : Field F\ninst✝² : Algebra K L\ninst✝¹ : Algebra K F\nι : Type w\ninst✝ : Algebra R F\npb : PowerBasis R S\nhf : Splits (algebraMap R F) (minpoly R pb.gen)\n⊢ ↑(algebraMap R F) (↑(norm R) pb.gen) = Multiset.prod (roots (Polynomial.map (algebraMap R F) (minpoly R pb.gen)))\n[PROOFSTEP]\nhaveI := Module.nontrivial R F\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Ring S\ninst✝⁶ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁵ : Field K\ninst✝⁴ : Field L\ninst✝³ : Field F\ninst✝² : Algebra K L\ninst✝¹ : Algebra K F\nι : Type w\ninst✝ : Algebra R F\npb : PowerBasis R S\nhf : Splits (algebraMap R F) (minpoly R pb.gen)\nthis : Nontrivial R\n⊢ ↑(algebraMap R F) (↑(norm R) pb.gen) = Multiset.prod (roots (Polynomial.map (algebraMap R F) (minpoly R pb.gen)))\n[PROOFSTEP]\nhave := minpoly.monic pb.isIntegral_gen\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Ring S\ninst✝⁶ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁵ : Field K\ninst✝⁴ : Field L\ninst✝³ : Field F\ninst✝² : Algebra K L\ninst✝¹ : Algebra K F\nι : Type w\ninst✝ : Algebra R F\npb : PowerBasis R S\nhf : Splits (algebraMap R F) (minpoly R pb.gen)\nthis✝ : Nontrivial R\nthis : Monic (minpoly R pb.gen)\n⊢ ↑(algebraMap R F) (↑(norm R) pb.gen) = Multiset.prod (roots (Polynomial.map (algebraMap R F) (minpoly R pb.gen)))\n[PROOFSTEP]\nrw [PowerBasis.norm_gen_eq_coeff_zero_minpoly, ← pb.natDegree_minpoly, RingHom.map_mul, ← coeff_map,\n  prod_roots_eq_coeff_zero_of_monic_of_split (this.map _) ((splits_id_iff_splits _).2 hf), this.natDegree_map, map_pow,\n  ← mul_assoc, ← mul_pow]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁸ : CommRing R\ninst✝⁷ : Ring S\ninst✝⁶ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁵ : Field K\ninst✝⁴ : Field L\ninst✝³ : Field F\ninst✝² : Algebra K L\ninst✝¹ : Algebra K F\nι : Type w\ninst✝ : Algebra R F\npb : PowerBasis R S\nhf : Splits (algebraMap R F) (minpoly R pb.gen)\nthis✝ : Nontrivial R\nthis : Monic (minpoly R pb.gen)\n⊢ (↑(algebraMap R F) (-1) * -1) ^ natDegree (minpoly R pb.gen) *\n      Multiset.prod (roots (Polynomial.map (algebraMap R F) (minpoly R pb.gen))) =\n    Multiset.prod (roots (Polynomial.map (algebraMap R F) (minpoly R pb.gen)))\n[PROOFSTEP]\nsimp only [map_neg, _root_.map_one, neg_mul, neg_neg, one_pow, one_mul]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : Ring S\ninst✝⁹ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁸ : Field K\ninst✝⁷ : Field L\ninst✝⁶ : Field F\ninst✝⁵ : Algebra K L\ninst✝⁴ : Algebra K F\nι : Type w\ninst✝³ : Finite ι\ninst✝² : Nontrivial S\ninst✝¹ : Module.Free R S\ninst✝ : Module.Finite R S\n⊢ ↑(norm R) 0 = 0\n[PROOFSTEP]\nnontriviality\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : Ring S\ninst✝⁹ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁸ : Field K\ninst✝⁷ : Field L\ninst✝⁶ : Field F\ninst✝⁵ : Algebra K L\ninst✝⁴ : Algebra K F\nι : Type w\ninst✝³ : Finite ι\ninst✝² : Nontrivial S\ninst✝¹ : Module.Free R S\ninst✝ : Module.Finite R S\n✝ : Nontrivial ((fun x => R) 0)\n⊢ ↑(norm R) 0 = 0\n[PROOFSTEP]\nrw [norm_apply, coe_lmul_eq_mul, map_zero, LinearMap.det_zero' (Module.Free.chooseBasis R S)]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹² : CommRing R\ninst✝¹¹ : Ring S\ninst✝¹⁰ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : Field F\ninst✝⁶ : Algebra K L\ninst✝⁵ : Algebra K F\nι : Type w\ninst✝⁴ : Finite ι\ninst✝³ : IsDomain R\ninst✝² : IsDomain S\ninst✝¹ : Module.Free R S\ninst✝ : Module.Finite R S\nx : S\n⊢ ↑(norm R) x = 0 ↔ x = 0\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹² : CommRing R\ninst✝¹¹ : Ring S\ninst✝¹⁰ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : Field F\ninst✝⁶ : Algebra K L\ninst✝⁵ : Algebra K F\nι : Type w\ninst✝⁴ : Finite ι\ninst✝³ : IsDomain R\ninst✝² : IsDomain S\ninst✝¹ : Module.Free R S\ninst✝ : Module.Finite R S\nx : S\n⊢ ↑(norm R) x = 0 → x = 0\ncase mpr\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹² : CommRing R\ninst✝¹¹ : Ring S\ninst✝¹⁰ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : Field F\ninst✝⁶ : Algebra K L\ninst✝⁵ : Algebra K F\nι : Type w\ninst✝⁴ : Finite ι\ninst✝³ : IsDomain R\ninst✝² : IsDomain S\ninst✝¹ : Module.Free R S\ninst✝ : Module.Finite R S\nx : S\n⊢ x = 0 → ↑(norm R) x = 0\n[PROOFSTEP]\nlet b := Module.Free.chooseBasis R S\n[GOAL]\ncase mp\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹² : CommRing R\ninst✝¹¹ : Ring S\ninst✝¹⁰ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : Field F\ninst✝⁶ : Algebra K L\ninst✝⁵ : Algebra K F\nι : Type w\ninst✝⁴ : Finite ι\ninst✝³ : IsDomain R\ninst✝² : IsDomain S\ninst✝¹ : Module.Free R S\ninst✝ : Module.Finite R S\nx : S\nb : Basis (Module.Free.ChooseBasisIndex R S) R S := Module.Free.chooseBasis R S\n⊢ ↑(norm R) x = 0 → x = 0\ncase mpr\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹² : CommRing R\ninst✝¹¹ : Ring S\ninst✝¹⁰ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : Field F\ninst✝⁶ : Algebra K L\ninst✝⁵ : Algebra K F\nι : Type w\ninst✝⁴ : Finite ι\ninst✝³ : IsDomain R\ninst✝² : IsDomain S\ninst✝¹ : Module.Free R S\ninst✝ : Module.Finite R S\nx : S\n⊢ x = 0 → ↑(norm R) x = 0\n[PROOFSTEP]\nswap\n[GOAL]\ncase mpr\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹² : CommRing R\ninst✝¹¹ : Ring S\ninst✝¹⁰ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : Field F\ninst✝⁶ : Algebra K L\ninst✝⁵ : Algebra K F\nι : Type w\ninst✝⁴ : Finite ι\ninst✝³ : IsDomain R\ninst✝² : IsDomain S\ninst✝¹ : Module.Free R S\ninst✝ : Module.Finite R S\nx : S\n⊢ x = 0 → ↑(norm R) x = 0\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase mpr\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹² : CommRing R\ninst✝¹¹ : Ring S\ninst✝¹⁰ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : Field F\ninst✝⁶ : Algebra K L\ninst✝⁵ : Algebra K F\nι : Type w\ninst✝⁴ : Finite ι\ninst✝³ : IsDomain R\ninst✝² : IsDomain S\ninst✝¹ : Module.Free R S\ninst✝ : Module.Finite R S\n⊢ ↑(norm R) 0 = 0\n[PROOFSTEP]\nexact norm_zero\n[GOAL]\ncase mp\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹² : CommRing R\ninst✝¹¹ : Ring S\ninst✝¹⁰ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : Field F\ninst✝⁶ : Algebra K L\ninst✝⁵ : Algebra K F\nι : Type w\ninst✝⁴ : Finite ι\ninst✝³ : IsDomain R\ninst✝² : IsDomain S\ninst✝¹ : Module.Free R S\ninst✝ : Module.Finite R S\nx : S\nb : Basis (Module.Free.ChooseBasisIndex R S) R S := Module.Free.chooseBasis R S\n⊢ ↑(norm R) x = 0 → x = 0\n[PROOFSTEP]\nletI := Classical.decEq (Module.Free.ChooseBasisIndex R S)\n[GOAL]\ncase mp\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹² : CommRing R\ninst✝¹¹ : Ring S\ninst✝¹⁰ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : Field F\ninst✝⁶ : Algebra K L\ninst✝⁵ : Algebra K F\nι : Type w\ninst✝⁴ : Finite ι\ninst✝³ : IsDomain R\ninst✝² : IsDomain S\ninst✝¹ : Module.Free R S\ninst✝ : Module.Finite R S\nx : S\nb : Basis (Module.Free.ChooseBasisIndex R S) R S := Module.Free.chooseBasis R S\nthis : DecidableEq (Module.Free.ChooseBasisIndex R S) := Classical.decEq (Module.Free.ChooseBasisIndex R S)\n⊢ ↑(norm R) x = 0 → x = 0\n[PROOFSTEP]\nrw [norm_eq_matrix_det b, ← Matrix.exists_mulVec_eq_zero_iff]\n[GOAL]\ncase mp\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹² : CommRing R\ninst✝¹¹ : Ring S\ninst✝¹⁰ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : Field F\ninst✝⁶ : Algebra K L\ninst✝⁵ : Algebra K F\nι : Type w\ninst✝⁴ : Finite ι\ninst✝³ : IsDomain R\ninst✝² : IsDomain S\ninst✝¹ : Module.Free R S\ninst✝ : Module.Finite R S\nx : S\nb : Basis (Module.Free.ChooseBasisIndex R S) R S := Module.Free.chooseBasis R S\nthis : DecidableEq (Module.Free.ChooseBasisIndex R S) := Classical.decEq (Module.Free.ChooseBasisIndex R S)\n⊢ (∃ v x_1, mulVec (↑(leftMulMatrix b) x) v = 0) → x = 0\n[PROOFSTEP]\nrintro ⟨v, v_ne, hv⟩\n[GOAL]\ncase mp.intro.intro\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹² : CommRing R\ninst✝¹¹ : Ring S\ninst✝¹⁰ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : Field F\ninst✝⁶ : Algebra K L\ninst✝⁵ : Algebra K F\nι : Type w\ninst✝⁴ : Finite ι\ninst✝³ : IsDomain R\ninst✝² : IsDomain S\ninst✝¹ : Module.Free R S\ninst✝ : Module.Finite R S\nx : S\nb : Basis (Module.Free.ChooseBasisIndex R S) R S := Module.Free.chooseBasis R S\nthis : DecidableEq (Module.Free.ChooseBasisIndex R S) := Classical.decEq (Module.Free.ChooseBasisIndex R S)\nv : Module.Free.ChooseBasisIndex R S → (fun x => R) x\nv_ne : v ≠ 0\nhv : mulVec (↑(leftMulMatrix b) x) v = 0\n⊢ x = 0\n[PROOFSTEP]\nrw [← b.equivFun.apply_symm_apply v, b.equivFun_symm_apply, b.equivFun_apply, leftMulMatrix_mulVec_repr] at hv \n[GOAL]\ncase mp.intro.intro\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹² : CommRing R\ninst✝¹¹ : Ring S\ninst✝¹⁰ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : Field F\ninst✝⁶ : Algebra K L\ninst✝⁵ : Algebra K F\nι : Type w\ninst✝⁴ : Finite ι\ninst✝³ : IsDomain R\ninst✝² : IsDomain S\ninst✝¹ : Module.Free R S\ninst✝ : Module.Finite R S\nx : S\nb : Basis (Module.Free.ChooseBasisIndex R S) R S := Module.Free.chooseBasis R S\nthis : DecidableEq (Module.Free.ChooseBasisIndex R S) := Classical.decEq (Module.Free.ChooseBasisIndex R S)\nv : Module.Free.ChooseBasisIndex R S → (fun x => R) x\nv_ne : v ≠ 0\nhv : ↑(↑b.repr (x * ∑ i : Module.Free.ChooseBasisIndex R S, v i • ↑b i)) = 0\n⊢ x = 0\n[PROOFSTEP]\nrefine (mul_eq_zero.mp (b.ext_elem fun i => ?_)).resolve_right (show ∑ i, v i • b i ≠ 0 from ?_)\n[GOAL]\ncase mp.intro.intro.refine_1\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹² : CommRing R\ninst✝¹¹ : Ring S\ninst✝¹⁰ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : Field F\ninst✝⁶ : Algebra K L\ninst✝⁵ : Algebra K F\nι : Type w\ninst✝⁴ : Finite ι\ninst✝³ : IsDomain R\ninst✝² : IsDomain S\ninst✝¹ : Module.Free R S\ninst✝ : Module.Finite R S\nx : S\nb : Basis (Module.Free.ChooseBasisIndex R S) R S := Module.Free.chooseBasis R S\nthis : DecidableEq (Module.Free.ChooseBasisIndex R S) := Classical.decEq (Module.Free.ChooseBasisIndex R S)\nv : Module.Free.ChooseBasisIndex R S → (fun x => R) x\nv_ne : v ≠ 0\nhv : ↑(↑b.repr (x * ∑ i : Module.Free.ChooseBasisIndex R S, v i • ↑b i)) = 0\ni : Module.Free.ChooseBasisIndex R S\n⊢ ↑(↑b.repr (x * ∑ i : Module.Free.ChooseBasisIndex R S, v i • ↑b i)) i = ↑(↑b.repr 0) i\n[PROOFSTEP]\nsimpa only [LinearEquiv.map_zero, Pi.zero_apply] using congr_fun hv i\n[GOAL]\ncase mp.intro.intro.refine_2\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹² : CommRing R\ninst✝¹¹ : Ring S\ninst✝¹⁰ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : Field F\ninst✝⁶ : Algebra K L\ninst✝⁵ : Algebra K F\nι : Type w\ninst✝⁴ : Finite ι\ninst✝³ : IsDomain R\ninst✝² : IsDomain S\ninst✝¹ : Module.Free R S\ninst✝ : Module.Finite R S\nx : S\nb : Basis (Module.Free.ChooseBasisIndex R S) R S := Module.Free.chooseBasis R S\nthis : DecidableEq (Module.Free.ChooseBasisIndex R S) := Classical.decEq (Module.Free.ChooseBasisIndex R S)\nv : Module.Free.ChooseBasisIndex R S → (fun x => R) x\nv_ne : v ≠ 0\nhv : ↑(↑b.repr (x * ∑ i : Module.Free.ChooseBasisIndex R S, v i • ↑b i)) = 0\n⊢ ∑ i : Module.Free.ChooseBasisIndex R S, v i • ↑b i ≠ 0\n[PROOFSTEP]\ncontrapose! v_ne with sum_eq\n[GOAL]\ncase mp.intro.intro.refine_2\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹² : CommRing R\ninst✝¹¹ : Ring S\ninst✝¹⁰ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : Field F\ninst✝⁶ : Algebra K L\ninst✝⁵ : Algebra K F\nι : Type w\ninst✝⁴ : Finite ι\ninst✝³ : IsDomain R\ninst✝² : IsDomain S\ninst✝¹ : Module.Free R S\ninst✝ : Module.Finite R S\nx : S\nb : Basis (Module.Free.ChooseBasisIndex R S) R S := Module.Free.chooseBasis R S\nthis : DecidableEq (Module.Free.ChooseBasisIndex R S) := Classical.decEq (Module.Free.ChooseBasisIndex R S)\nv : Module.Free.ChooseBasisIndex R S → (fun x => R) x\nhv : ↑(↑b.repr (x * ∑ i : Module.Free.ChooseBasisIndex R S, v i • ↑b i)) = 0\nsum_eq : ∑ x : Module.Free.ChooseBasisIndex R S, v x • ↑(Module.Free.chooseBasis R S) x = 0\n⊢ v = 0\n[PROOFSTEP]\napply b.equivFun.symm.injective\n[GOAL]\ncase mp.intro.intro.refine_2.a\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹² : CommRing R\ninst✝¹¹ : Ring S\ninst✝¹⁰ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : Field F\ninst✝⁶ : Algebra K L\ninst✝⁵ : Algebra K F\nι : Type w\ninst✝⁴ : Finite ι\ninst✝³ : IsDomain R\ninst✝² : IsDomain S\ninst✝¹ : Module.Free R S\ninst✝ : Module.Finite R S\nx : S\nb : Basis (Module.Free.ChooseBasisIndex R S) R S := Module.Free.chooseBasis R S\nthis : DecidableEq (Module.Free.ChooseBasisIndex R S) := Classical.decEq (Module.Free.ChooseBasisIndex R S)\nv : Module.Free.ChooseBasisIndex R S → (fun x => R) x\nhv : ↑(↑b.repr (x * ∑ i : Module.Free.ChooseBasisIndex R S, v i • ↑b i)) = 0\nsum_eq : ∑ x : Module.Free.ChooseBasisIndex R S, v x • ↑(Module.Free.chooseBasis R S) x = 0\n⊢ ↑(LinearEquiv.symm (Basis.equivFun b)) v = ↑(LinearEquiv.symm (Basis.equivFun b)) 0\n[PROOFSTEP]\nrw [b.equivFun_symm_apply, sum_eq, LinearEquiv.map_zero]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Ring S\ninst✝⁸ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field F\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K F\nι : Type w\ninst✝² : Finite ι\ninst✝¹ : IsDomain R\ninst✝ : IsDomain S\nb : Basis ι R S\nx : S\n⊢ ↑(norm R) x = 0 ↔ x = 0\n[PROOFSTEP]\nhaveI : Module.Free R S := Module.Free.of_basis b\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Ring S\ninst✝⁸ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field F\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K F\nι : Type w\ninst✝² : Finite ι\ninst✝¹ : IsDomain R\ninst✝ : IsDomain S\nb : Basis ι R S\nx : S\nthis : Module.Free R S\n⊢ ↑(norm R) x = 0 ↔ x = 0\n[PROOFSTEP]\nhaveI : Module.Finite R S := Module.Finite.of_basis b\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Ring S\ninst✝⁸ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field F\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K F\nι : Type w\ninst✝² : Finite ι\ninst✝¹ : IsDomain R\ninst✝ : IsDomain S\nb : Basis ι R S\nx : S\nthis✝ : Module.Free R S\nthis : Module.Finite R S\n⊢ ↑(norm R) x = 0 ↔ x = 0\n[PROOFSTEP]\nexact norm_eq_zero_iff\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁹ : CommRing R\ninst✝⁸ : Ring S\ninst✝⁷ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁶ : Field K\ninst✝⁵ : Field L\ninst✝⁴ : Field F\ninst✝³ : Algebra K L\ninst✝² : Algebra K F\nι : Type w\ninst✝¹ : FiniteDimensional K L\ninst✝ : IsSeparable K L\nx : L\n⊢ ↑(norm K) x = ↑(norm K) (AdjoinSimple.gen K x) ^ finrank { x_1 // x_1 ∈ K⟮x⟯ } L\n[PROOFSTEP]\nletI := isSeparable_tower_top_of_isSeparable K K⟮x⟯ L\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁹ : CommRing R\ninst✝⁸ : Ring S\ninst✝⁷ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁶ : Field K\ninst✝⁵ : Field L\ninst✝⁴ : Field F\ninst✝³ : Algebra K L\ninst✝² : Algebra K F\nι : Type w\ninst✝¹ : FiniteDimensional K L\ninst✝ : IsSeparable K L\nx : L\nthis : IsSeparable { x_1 // x_1 ∈ K⟮x⟯ } L := isSeparable_tower_top_of_isSeparable K { x_1 // x_1 ∈ K⟮x⟯ } L\n⊢ ↑(norm K) x = ↑(norm K) (AdjoinSimple.gen K x) ^ finrank { x_1 // x_1 ∈ K⟮x⟯ } L\n[PROOFSTEP]\nlet pbL := Field.powerBasisOfFiniteOfSeparable K⟮x⟯ L\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁹ : CommRing R\ninst✝⁸ : Ring S\ninst✝⁷ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁶ : Field K\ninst✝⁵ : Field L\ninst✝⁴ : Field F\ninst✝³ : Algebra K L\ninst✝² : Algebra K F\nι : Type w\ninst✝¹ : FiniteDimensional K L\ninst✝ : IsSeparable K L\nx : L\nthis : IsSeparable { x_1 // x_1 ∈ K⟮x⟯ } L := isSeparable_tower_top_of_isSeparable K { x_1 // x_1 ∈ K⟮x⟯ } L\npbL : PowerBasis { x_1 // x_1 ∈ K⟮x⟯ } L := Field.powerBasisOfFiniteOfSeparable { x_1 // x_1 ∈ K⟮x⟯ } L\n⊢ ↑(norm K) x = ↑(norm K) (AdjoinSimple.gen K x) ^ finrank { x_1 // x_1 ∈ K⟮x⟯ } L\n[PROOFSTEP]\nlet pbx := IntermediateField.adjoin.powerBasis (IsSeparable.isIntegral K x)\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁹ : CommRing R\ninst✝⁸ : Ring S\ninst✝⁷ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁶ : Field K\ninst✝⁵ : Field L\ninst✝⁴ : Field F\ninst✝³ : Algebra K L\ninst✝² : Algebra K F\nι : Type w\ninst✝¹ : FiniteDimensional K L\ninst✝ : IsSeparable K L\nx : L\nthis : IsSeparable { x_1 // x_1 ∈ K⟮x⟯ } L := isSeparable_tower_top_of_isSeparable K { x_1 // x_1 ∈ K⟮x⟯ } L\npbL : PowerBasis { x_1 // x_1 ∈ K⟮x⟯ } L := Field.powerBasisOfFiniteOfSeparable { x_1 // x_1 ∈ K⟮x⟯ } L\npbx : PowerBasis K { x_1 // x_1 ∈ K⟮x⟯ } := adjoin.powerBasis (_ : IsIntegral K x)\n⊢ ↑(norm K) x = ↑(norm K) (AdjoinSimple.gen K x) ^ finrank { x_1 // x_1 ∈ K⟮x⟯ } L\n[PROOFSTEP]\nrw [← AdjoinSimple.algebraMap_gen K x, norm_eq_matrix_det (pbx.basis.smul pbL.basis) _, smul_leftMulMatrix_algebraMap,\n  det_blockDiagonal, norm_eq_matrix_det pbx.basis]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁹ : CommRing R\ninst✝⁸ : Ring S\ninst✝⁷ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁶ : Field K\ninst✝⁵ : Field L\ninst✝⁴ : Field F\ninst✝³ : Algebra K L\ninst✝² : Algebra K F\nι : Type w\ninst✝¹ : FiniteDimensional K L\ninst✝ : IsSeparable K L\nx : L\nthis : IsSeparable { x_1 // x_1 ∈ K⟮x⟯ } L := isSeparable_tower_top_of_isSeparable K { x_1 // x_1 ∈ K⟮x⟯ } L\npbL : PowerBasis { x_1 // x_1 ∈ K⟮x⟯ } L := Field.powerBasisOfFiniteOfSeparable { x_1 // x_1 ∈ K⟮x⟯ } L\npbx : PowerBasis K { x_1 // x_1 ∈ K⟮x⟯ } := adjoin.powerBasis (_ : IsIntegral K x)\n⊢ ∏ k : Fin pbL.dim, det (↑(leftMulMatrix pbx.basis) (AdjoinSimple.gen K x)) =\n    det\n        (↑(leftMulMatrix pbx.basis)\n          (AdjoinSimple.gen K (↑(algebraMap { x_1 // x_1 ∈ K⟮x⟯ } L) (AdjoinSimple.gen K x)))) ^\n      finrank { x_1 // x_1 ∈ K⟮↑(algebraMap { x_2 // x_2 ∈ K⟮x⟯ } L) (AdjoinSimple.gen K x)⟯ } L\n[PROOFSTEP]\nsimp only [Finset.card_fin, Finset.prod_const]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁹ : CommRing R\ninst✝⁸ : Ring S\ninst✝⁷ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁶ : Field K\ninst✝⁵ : Field L\ninst✝⁴ : Field F\ninst✝³ : Algebra K L\ninst✝² : Algebra K F\nι : Type w\ninst✝¹ : FiniteDimensional K L\ninst✝ : IsSeparable K L\nx : L\nthis : IsSeparable { x_1 // x_1 ∈ K⟮x⟯ } L := isSeparable_tower_top_of_isSeparable K { x_1 // x_1 ∈ K⟮x⟯ } L\npbL : PowerBasis { x_1 // x_1 ∈ K⟮x⟯ } L := Field.powerBasisOfFiniteOfSeparable { x_1 // x_1 ∈ K⟮x⟯ } L\npbx : PowerBasis K { x_1 // x_1 ∈ K⟮x⟯ } := adjoin.powerBasis (_ : IsIntegral K x)\n⊢ det (↑(leftMulMatrix (adjoin.powerBasis (_ : IsIntegral K x)).basis) (AdjoinSimple.gen K x)) ^\n      (Field.powerBasisOfFiniteOfSeparable { x_1 // x_1 ∈ K⟮x⟯ } L).dim =\n    det\n        (↑(leftMulMatrix (adjoin.powerBasis (_ : IsIntegral K x)).basis)\n          (AdjoinSimple.gen K (↑(algebraMap { x_1 // x_1 ∈ K⟮x⟯ } L) (AdjoinSimple.gen K x)))) ^\n      finrank { x_1 // x_1 ∈ K⟮↑(algebraMap { x_2 // x_2 ∈ K⟮x⟯ } L) (AdjoinSimple.gen K x)⟯ } L\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_a\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁹ : CommRing R\ninst✝⁸ : Ring S\ninst✝⁷ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁶ : Field K\ninst✝⁵ : Field L\ninst✝⁴ : Field F\ninst✝³ : Algebra K L\ninst✝² : Algebra K F\nι : Type w\ninst✝¹ : FiniteDimensional K L\ninst✝ : IsSeparable K L\nx : L\nthis : IsSeparable { x_1 // x_1 ∈ K⟮x⟯ } L := isSeparable_tower_top_of_isSeparable K { x_1 // x_1 ∈ K⟮x⟯ } L\npbL : PowerBasis { x_1 // x_1 ∈ K⟮x⟯ } L := Field.powerBasisOfFiniteOfSeparable { x_1 // x_1 ∈ K⟮x⟯ } L\npbx : PowerBasis K { x_1 // x_1 ∈ K⟮x⟯ } := adjoin.powerBasis (_ : IsIntegral K x)\n⊢ (Field.powerBasisOfFiniteOfSeparable { x_1 // x_1 ∈ K⟮x⟯ } L).dim =\n    finrank { x_1 // x_1 ∈ K⟮↑(algebraMap { x_2 // x_2 ∈ K⟮x⟯ } L) (AdjoinSimple.gen K x)⟯ } L\n[PROOFSTEP]\nrw [← PowerBasis.finrank, AdjoinSimple.algebraMap_gen K x]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : Ring S\ninst✝⁵ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Field F\ninst✝¹ : Algebra K L\ninst✝ : Algebra K F\nι : Type w\nx : L\nhx : ¬IsIntegral K x\n⊢ ↑(norm K) (AdjoinSimple.gen K x) = 1\n[PROOFSTEP]\nrw [norm_eq_one_of_not_exists_basis]\n[GOAL]\ncase h\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : Ring S\ninst✝⁵ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Field F\ninst✝¹ : Algebra K L\ninst✝ : Algebra K F\nι : Type w\nx : L\nhx : ¬IsIntegral K x\n⊢ ¬∃ s, Nonempty (Basis { x_1 // x_1 ∈ s } K { x_1 // x_1 ∈ K⟮x⟯ })\n[PROOFSTEP]\ncontrapose! hx\n[GOAL]\ncase h\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : Ring S\ninst✝⁵ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Field F\ninst✝¹ : Algebra K L\ninst✝ : Algebra K F\nι : Type w\nx : L\nhx : ∃ s, Nonempty (Basis { x_1 // x_1 ∈ s } K { x_1 // x_1 ∈ K⟮x⟯ })\n⊢ IsIntegral K x\n[PROOFSTEP]\nobtain ⟨s, ⟨b⟩⟩ := hx\n[GOAL]\ncase h.intro.intro\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : Ring S\ninst✝⁵ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Field F\ninst✝¹ : Algebra K L\ninst✝ : Algebra K F\nι : Type w\nx : L\ns : Finset { x_1 // x_1 ∈ K⟮x⟯ }\nb : Basis { x_1 // x_1 ∈ s } K { x_1 // x_1 ∈ K⟮x⟯ }\n⊢ IsIntegral K x\n[PROOFSTEP]\nrefine isIntegral_of_mem_of_FG K⟮x⟯.toSubalgebra ?_ x ?_\n[GOAL]\ncase h.intro.intro.refine_1\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : Ring S\ninst✝⁵ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Field F\ninst✝¹ : Algebra K L\ninst✝ : Algebra K F\nι : Type w\nx : L\ns : Finset { x_1 // x_1 ∈ K⟮x⟯ }\nb : Basis { x_1 // x_1 ∈ s } K { x_1 // x_1 ∈ K⟮x⟯ }\n⊢ Submodule.FG (↑Subalgebra.toSubmodule K⟮x⟯.toSubalgebra)\n[PROOFSTEP]\nexact (Submodule.fg_iff_finiteDimensional _).mpr (of_fintype_basis b)\n[GOAL]\ncase h.intro.intro.refine_2\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : Ring S\ninst✝⁵ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Field F\ninst✝¹ : Algebra K L\ninst✝ : Algebra K F\nι : Type w\nx : L\ns : Finset { x_1 // x_1 ∈ K⟮x⟯ }\nb : Basis { x_1 // x_1 ∈ s } K { x_1 // x_1 ∈ K⟮x⟯ }\n⊢ x ∈ K⟮x⟯.toSubalgebra\n[PROOFSTEP]\nexact IntermediateField.subset_adjoin K _ (Set.mem_singleton x)\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : Ring S\ninst✝⁵ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Field F\ninst✝¹ : Algebra K L\ninst✝ : Algebra K F\nι : Type w\nx : L\nhf : Splits (algebraMap K F) (minpoly K x)\n⊢ ↑(algebraMap K F) (↑(norm K) (AdjoinSimple.gen K x)) =\n    Multiset.prod (roots (Polynomial.map (algebraMap K F) (minpoly K x)))\n[PROOFSTEP]\nhave injKxL := (algebraMap K⟮x⟯ L).injective\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : Ring S\ninst✝⁵ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Field F\ninst✝¹ : Algebra K L\ninst✝ : Algebra K F\nι : Type w\nx : L\nhf : Splits (algebraMap K F) (minpoly K x)\ninjKxL : Function.Injective ↑(algebraMap { x_1 // x_1 ∈ K⟮x⟯ } L)\n⊢ ↑(algebraMap K F) (↑(norm K) (AdjoinSimple.gen K x)) =\n    Multiset.prod (roots (Polynomial.map (algebraMap K F) (minpoly K x)))\n[PROOFSTEP]\nby_cases hx : IsIntegral K x\n[GOAL]\ncase pos\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : Ring S\ninst✝⁵ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Field F\ninst✝¹ : Algebra K L\ninst✝ : Algebra K F\nι : Type w\nx : L\nhf : Splits (algebraMap K F) (minpoly K x)\ninjKxL : Function.Injective ↑(algebraMap { x_1 // x_1 ∈ K⟮x⟯ } L)\nhx : IsIntegral K x\n⊢ ↑(algebraMap K F) (↑(norm K) (AdjoinSimple.gen K x)) =\n    Multiset.prod (roots (Polynomial.map (algebraMap K F) (minpoly K x)))\ncase neg\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : Ring S\ninst✝⁵ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Field F\ninst✝¹ : Algebra K L\ninst✝ : Algebra K F\nι : Type w\nx : L\nhf : Splits (algebraMap K F) (minpoly K x)\ninjKxL : Function.Injective ↑(algebraMap { x_1 // x_1 ∈ K⟮x⟯ } L)\nhx : ¬IsIntegral K x\n⊢ ↑(algebraMap K F) (↑(norm K) (AdjoinSimple.gen K x)) =\n    Multiset.prod (roots (Polynomial.map (algebraMap K F) (minpoly K x)))\n[PROOFSTEP]\nswap\n[GOAL]\ncase neg\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : Ring S\ninst✝⁵ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Field F\ninst✝¹ : Algebra K L\ninst✝ : Algebra K F\nι : Type w\nx : L\nhf : Splits (algebraMap K F) (minpoly K x)\ninjKxL : Function.Injective ↑(algebraMap { x_1 // x_1 ∈ K⟮x⟯ } L)\nhx : ¬IsIntegral K x\n⊢ ↑(algebraMap K F) (↑(norm K) (AdjoinSimple.gen K x)) =\n    Multiset.prod (roots (Polynomial.map (algebraMap K F) (minpoly K x)))\n[PROOFSTEP]\nsimp [minpoly.eq_zero hx, IntermediateField.AdjoinSimple.norm_gen_eq_one hx]\n[GOAL]\ncase pos\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : Ring S\ninst✝⁵ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Field F\ninst✝¹ : Algebra K L\ninst✝ : Algebra K F\nι : Type w\nx : L\nhf : Splits (algebraMap K F) (minpoly K x)\ninjKxL : Function.Injective ↑(algebraMap { x_1 // x_1 ∈ K⟮x⟯ } L)\nhx : IsIntegral K x\n⊢ ↑(algebraMap K F) (↑(norm K) (AdjoinSimple.gen K x)) =\n    Multiset.prod (roots (Polynomial.map (algebraMap K F) (minpoly K x)))\n[PROOFSTEP]\nhave hx' : IsIntegral K (AdjoinSimple.gen K x) := by\n  rwa [← isIntegral_algebraMap_iff injKxL, AdjoinSimple.algebraMap_gen]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : Ring S\ninst✝⁵ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Field F\ninst✝¹ : Algebra K L\ninst✝ : Algebra K F\nι : Type w\nx : L\nhf : Splits (algebraMap K F) (minpoly K x)\ninjKxL : Function.Injective ↑(algebraMap { x_1 // x_1 ∈ K⟮x⟯ } L)\nhx : IsIntegral K x\n⊢ IsIntegral K (AdjoinSimple.gen K x)\n[PROOFSTEP]\nrwa [← isIntegral_algebraMap_iff injKxL, AdjoinSimple.algebraMap_gen]\n[GOAL]\ncase pos\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : Ring S\ninst✝⁵ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Field F\ninst✝¹ : Algebra K L\ninst✝ : Algebra K F\nι : Type w\nx : L\nhf : Splits (algebraMap K F) (minpoly K x)\ninjKxL : Function.Injective ↑(algebraMap { x_1 // x_1 ∈ K⟮x⟯ } L)\nhx : IsIntegral K x\nhx' : IsIntegral K (AdjoinSimple.gen K x)\n⊢ ↑(algebraMap K F) (↑(norm K) (AdjoinSimple.gen K x)) =\n    Multiset.prod (roots (Polynomial.map (algebraMap K F) (minpoly K x)))\n[PROOFSTEP]\nrw [← adjoin.powerBasis_gen hx, PowerBasis.norm_gen_eq_prod_roots]\n[GOAL]\ncase pos\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : Ring S\ninst✝⁵ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Field F\ninst✝¹ : Algebra K L\ninst✝ : Algebra K F\nι : Type w\nx : L\nhf : Splits (algebraMap K F) (minpoly K x)\ninjKxL : Function.Injective ↑(algebraMap { x_1 // x_1 ∈ K⟮x⟯ } L)\nhx : IsIntegral K x\nhx' : IsIntegral K (AdjoinSimple.gen K x)\n⊢ Multiset.prod (roots (Polynomial.map (algebraMap K F) (minpoly K (adjoin.powerBasis hx).gen))) =\n    Multiset.prod (roots (Polynomial.map (algebraMap K F) (minpoly K x)))\n[PROOFSTEP]\nrw [adjoin.powerBasis_gen hx, minpoly.eq_of_algebraMap_eq injKxL hx']\n[GOAL]\ncase pos.hf\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : Ring S\ninst✝⁵ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Field F\ninst✝¹ : Algebra K L\ninst✝ : Algebra K F\nι : Type w\nx : L\nhf : Splits (algebraMap K F) (minpoly K x)\ninjKxL : Function.Injective ↑(algebraMap { x_1 // x_1 ∈ K⟮x⟯ } L)\nhx : IsIntegral K x\nhx' : IsIntegral K (AdjoinSimple.gen K x)\n⊢ Splits (algebraMap K F) (minpoly K (adjoin.powerBasis hx).gen)\n[PROOFSTEP]\nrw [adjoin.powerBasis_gen hx, minpoly.eq_of_algebraMap_eq injKxL hx']\n[GOAL]\ncase pos\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : Ring S\ninst✝⁵ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Field F\ninst✝¹ : Algebra K L\ninst✝ : Algebra K F\nι : Type w\nx : L\nhf : Splits (algebraMap K F) (minpoly K x)\ninjKxL : Function.Injective ↑(algebraMap { x_1 // x_1 ∈ K⟮x⟯ } L)\nhx : IsIntegral K x\nhx' : IsIntegral K (AdjoinSimple.gen K x)\n⊢ x = ↑(algebraMap { x_1 // x_1 ∈ K⟮x⟯ } L) (AdjoinSimple.gen K x)\n[PROOFSTEP]\ntry simp only [AdjoinSimple.algebraMap_gen _ _]\n[GOAL]\ncase pos\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : Ring S\ninst✝⁵ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Field F\ninst✝¹ : Algebra K L\ninst✝ : Algebra K F\nι : Type w\nx : L\nhf : Splits (algebraMap K F) (minpoly K x)\ninjKxL : Function.Injective ↑(algebraMap { x_1 // x_1 ∈ K⟮x⟯ } L)\nhx : IsIntegral K x\nhx' : IsIntegral K (AdjoinSimple.gen K x)\n⊢ x = ↑(algebraMap { x_1 // x_1 ∈ K⟮x⟯ } L) (AdjoinSimple.gen K x)\n[PROOFSTEP]\nsimp only [AdjoinSimple.algebraMap_gen _ _]\n[GOAL]\ncase pos.hf\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : Ring S\ninst✝⁵ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Field F\ninst✝¹ : Algebra K L\ninst✝ : Algebra K F\nι : Type w\nx : L\nhf : Splits (algebraMap K F) (minpoly K x)\ninjKxL : Function.Injective ↑(algebraMap { x_1 // x_1 ∈ K⟮x⟯ } L)\nhx : IsIntegral K x\nhx' : IsIntegral K (AdjoinSimple.gen K x)\n⊢ Splits (algebraMap K F) (minpoly K ?m.762940)\n[PROOFSTEP]\ntry simp only [AdjoinSimple.algebraMap_gen _ _]\n[GOAL]\ncase pos.hf\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : Ring S\ninst✝⁵ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Field F\ninst✝¹ : Algebra K L\ninst✝ : Algebra K F\nι : Type w\nx : L\nhf : Splits (algebraMap K F) (minpoly K x)\ninjKxL : Function.Injective ↑(algebraMap { x_1 // x_1 ∈ K⟮x⟯ } L)\nhx : IsIntegral K x\nhx' : IsIntegral K (AdjoinSimple.gen K x)\n⊢ Splits (algebraMap K F) (minpoly K ?m.762940)\n[PROOFSTEP]\nsimp only [AdjoinSimple.algebraMap_gen _ _]\n[GOAL]\ncase pos.hf\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : Ring S\ninst✝⁵ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Field F\ninst✝¹ : Algebra K L\ninst✝ : Algebra K F\nι : Type w\nx : L\nhf : Splits (algebraMap K F) (minpoly K x)\ninjKxL : Function.Injective ↑(algebraMap { x_1 // x_1 ∈ K⟮x⟯ } L)\nhx : IsIntegral K x\nhx' : IsIntegral K (AdjoinSimple.gen K x)\n⊢ ?m.762940 = ↑(algebraMap { x_1 // x_1 ∈ K⟮x⟯ } L) (AdjoinSimple.gen K x)\n[PROOFSTEP]\ntry simp only [AdjoinSimple.algebraMap_gen _ _]\n[GOAL]\ncase pos.hf\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : Ring S\ninst✝⁵ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Field F\ninst✝¹ : Algebra K L\ninst✝ : Algebra K F\nι : Type w\nx : L\nhf : Splits (algebraMap K F) (minpoly K x)\ninjKxL : Function.Injective ↑(algebraMap { x_1 // x_1 ∈ K⟮x⟯ } L)\nhx : IsIntegral K x\nhx' : IsIntegral K (AdjoinSimple.gen K x)\n⊢ ?m.762940 = ↑(algebraMap { x_1 // x_1 ∈ K⟮x⟯ } L) (AdjoinSimple.gen K x)\n[PROOFSTEP]\nsimp only [AdjoinSimple.algebraMap_gen _ _]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : Ring S\ninst✝⁵ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Field F\ninst✝¹ : Algebra K L\ninst✝ : Algebra K F\nι : Type w\nx : L\nhf : Splits (algebraMap K F) (minpoly K x)\ninjKxL : Function.Injective ↑(algebraMap { x_1 // x_1 ∈ K⟮x⟯ } L)\nhx : IsIntegral K x\nhx' : IsIntegral K (AdjoinSimple.gen K x)\n⊢ L\n[PROOFSTEP]\ntry simp only [AdjoinSimple.algebraMap_gen _ _]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : Ring S\ninst✝⁵ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Field F\ninst✝¹ : Algebra K L\ninst✝ : Algebra K F\nι : Type w\nx : L\nhf : Splits (algebraMap K F) (minpoly K x)\ninjKxL : Function.Injective ↑(algebraMap { x_1 // x_1 ∈ K⟮x⟯ } L)\nhx : IsIntegral K x\nhx' : IsIntegral K (AdjoinSimple.gen K x)\n⊢ L\n[PROOFSTEP]\nsimp only [AdjoinSimple.algebraMap_gen _ _]\n[GOAL]\ncase pos.hf\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : Ring S\ninst✝⁵ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Field F\ninst✝¹ : Algebra K L\ninst✝ : Algebra K F\nι : Type w\nx : L\nhf : Splits (algebraMap K F) (minpoly K x)\ninjKxL : Function.Injective ↑(algebraMap { x_1 // x_1 ∈ K⟮x⟯ } L)\nhx : IsIntegral K x\nhx' : IsIntegral K (AdjoinSimple.gen K x)\n⊢ Splits (algebraMap K F) (minpoly K ?m.762940)\ncase pos.hf\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : Ring S\ninst✝⁵ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Field F\ninst✝¹ : Algebra K L\ninst✝ : Algebra K F\nι : Type w\nx : L\nhf : Splits (algebraMap K F) (minpoly K x)\ninjKxL : Function.Injective ↑(algebraMap { x_1 // x_1 ∈ K⟮x⟯ } L)\nhx : IsIntegral K x\nhx' : IsIntegral K (AdjoinSimple.gen K x)\n⊢ ?m.762940 = x\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : Ring S\ninst✝⁵ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Field F\ninst✝¹ : Algebra K L\ninst✝ : Algebra K F\nι : Type w\nx : L\nhf : Splits (algebraMap K F) (minpoly K x)\ninjKxL : Function.Injective ↑(algebraMap { x_1 // x_1 ∈ K⟮x⟯ } L)\nhx : IsIntegral K x\nhx' : IsIntegral K (AdjoinSimple.gen K x)\n⊢ L\n[PROOFSTEP]\ntry exact hf\n[GOAL]\ncase pos.hf\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : Ring S\ninst✝⁵ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Field F\ninst✝¹ : Algebra K L\ninst✝ : Algebra K F\nι : Type w\nx : L\nhf : Splits (algebraMap K F) (minpoly K x)\ninjKxL : Function.Injective ↑(algebraMap { x_1 // x_1 ∈ K⟮x⟯ } L)\nhx : IsIntegral K x\nhx' : IsIntegral K (AdjoinSimple.gen K x)\n⊢ Splits (algebraMap K F) (minpoly K ?m.762940)\ncase pos.hf\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : Ring S\ninst✝⁵ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Field F\ninst✝¹ : Algebra K L\ninst✝ : Algebra K F\nι : Type w\nx : L\nhf : Splits (algebraMap K F) (minpoly K x)\ninjKxL : Function.Injective ↑(algebraMap { x_1 // x_1 ∈ K⟮x⟯ } L)\nhx : IsIntegral K x\nhx' : IsIntegral K (AdjoinSimple.gen K x)\n⊢ ?m.762940 = x\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : Ring S\ninst✝⁵ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Field F\ninst✝¹ : Algebra K L\ninst✝ : Algebra K F\nι : Type w\nx : L\nhf : Splits (algebraMap K F) (minpoly K x)\ninjKxL : Function.Injective ↑(algebraMap { x_1 // x_1 ∈ K⟮x⟯ } L)\nhx : IsIntegral K x\nhx' : IsIntegral K (AdjoinSimple.gen K x)\n⊢ L\n[PROOFSTEP]\nexact hf\n[GOAL]\ncase pos.hf\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁷ : CommRing R\ninst✝⁶ : Ring S\ninst✝⁵ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Field F\ninst✝¹ : Algebra K L\ninst✝ : Algebra K F\nι : Type w\nx : L\nhf : Splits (algebraMap K F) (minpoly K x)\ninjKxL : Function.Injective ↑(algebraMap { x_1 // x_1 ∈ K⟮x⟯ } L)\nhx : IsIntegral K x\nhx' : IsIntegral K (AdjoinSimple.gen K x)\n⊢ x = x\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Ring S\ninst✝⁸ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field F\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K F\nι : Type w\nE : Type u_7\ninst✝² : Field E\ninst✝¹ : Algebra K E\ninst✝ : Algebra R F\npb : PowerBasis R S\nhE : Splits (algebraMap R F) (minpoly R pb.gen)\nhfx : Separable (minpoly R pb.gen)\n⊢ ↑(algebraMap R F) (↑(norm R) pb.gen) = ∏ σ : S →ₐ[R] F, ↑σ pb.gen\n[PROOFSTEP]\nletI := Classical.decEq F\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Ring S\ninst✝⁸ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field F\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K F\nι : Type w\nE : Type u_7\ninst✝² : Field E\ninst✝¹ : Algebra K E\ninst✝ : Algebra R F\npb : PowerBasis R S\nhE : Splits (algebraMap R F) (minpoly R pb.gen)\nhfx : Separable (minpoly R pb.gen)\nthis : DecidableEq F := Classical.decEq F\n⊢ ↑(algebraMap R F) (↑(norm R) pb.gen) = ∏ σ : S →ₐ[R] F, ↑σ pb.gen\n[PROOFSTEP]\nrw [PowerBasis.norm_gen_eq_prod_roots pb hE]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Ring S\ninst✝⁸ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field F\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K F\nι : Type w\nE : Type u_7\ninst✝² : Field E\ninst✝¹ : Algebra K E\ninst✝ : Algebra R F\npb : PowerBasis R S\nhE : Splits (algebraMap R F) (minpoly R pb.gen)\nhfx : Separable (minpoly R pb.gen)\nthis : DecidableEq F := Classical.decEq F\n⊢ Multiset.prod (roots (Polynomial.map (algebraMap R F) (minpoly R pb.gen))) = ∏ σ : S →ₐ[R] F, ↑σ pb.gen\n[PROOFSTEP]\nrw [@Fintype.prod_equiv (S →ₐ[R] F) _ _ (PowerBasis.AlgHom.fintype pb) _ _ pb.liftEquiv' (fun σ => σ pb.gen)\n    (fun x => x) ?_]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Ring S\ninst✝⁸ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field F\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K F\nι : Type w\nE : Type u_7\ninst✝² : Field E\ninst✝¹ : Algebra K E\ninst✝ : Algebra R F\npb : PowerBasis R S\nhE : Splits (algebraMap R F) (minpoly R pb.gen)\nhfx : Separable (minpoly R pb.gen)\nthis : DecidableEq F := Classical.decEq F\n⊢ Multiset.prod (roots (Polynomial.map (algebraMap R F) (minpoly R pb.gen))) =\n    ∏ x : { y // y ∈ roots (Polynomial.map (algebraMap R F) (minpoly R pb.gen)) }, ↑x\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Ring S\ninst✝⁸ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field F\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K F\nι : Type w\nE : Type u_7\ninst✝² : Field E\ninst✝¹ : Algebra K E\ninst✝ : Algebra R F\npb : PowerBasis R S\nhE : Splits (algebraMap R F) (minpoly R pb.gen)\nhfx : Separable (minpoly R pb.gen)\nthis : DecidableEq F := Classical.decEq F\n⊢ ∀ (x : S →ₐ[R] F), (fun σ => ↑σ pb.gen) x = (fun x => ↑x) (↑(PowerBasis.liftEquiv' pb) x)\n[PROOFSTEP]\nrw [Finset.prod_mem_multiset, Finset.prod_eq_multiset_prod, Multiset.toFinset_val, Multiset.dedup_eq_self.mpr,\n  Multiset.map_id]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Ring S\ninst✝⁸ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field F\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K F\nι : Type w\nE : Type u_7\ninst✝² : Field E\ninst✝¹ : Algebra K E\ninst✝ : Algebra R F\npb : PowerBasis R S\nhE : Splits (algebraMap R F) (minpoly R pb.gen)\nhfx : Separable (minpoly R pb.gen)\nthis : DecidableEq F := Classical.decEq F\n⊢ Multiset.Nodup (roots (Polynomial.map (algebraMap R F) (minpoly R pb.gen)))\n[PROOFSTEP]\nexact nodup_roots hfx.map\n[GOAL]\ncase hfg\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Ring S\ninst✝⁸ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field F\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K F\nι : Type w\nE : Type u_7\ninst✝² : Field E\ninst✝¹ : Algebra K E\ninst✝ : Algebra R F\npb : PowerBasis R S\nhE : Splits (algebraMap R F) (minpoly R pb.gen)\nhfx : Separable (minpoly R pb.gen)\nthis : DecidableEq F := Classical.decEq F\n⊢ ∀ (x : { x // x ∈ roots (Polynomial.map (algebraMap R F) (minpoly R pb.gen)) }), ↑x = _root_.id ↑x\n[PROOFSTEP]\nintro x\n[GOAL]\ncase hfg\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Ring S\ninst✝⁸ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field F\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K F\nι : Type w\nE : Type u_7\ninst✝² : Field E\ninst✝¹ : Algebra K E\ninst✝ : Algebra R F\npb : PowerBasis R S\nhE : Splits (algebraMap R F) (minpoly R pb.gen)\nhfx : Separable (minpoly R pb.gen)\nthis : DecidableEq F := Classical.decEq F\nx : { x // x ∈ roots (Polynomial.map (algebraMap R F) (minpoly R pb.gen)) }\n⊢ ↑x = _root_.id ↑x\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Ring S\ninst✝⁸ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field F\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K F\nι : Type w\nE : Type u_7\ninst✝² : Field E\ninst✝¹ : Algebra K E\ninst✝ : Algebra R F\npb : PowerBasis R S\nhE : Splits (algebraMap R F) (minpoly R pb.gen)\nhfx : Separable (minpoly R pb.gen)\nthis : DecidableEq F := Classical.decEq F\n⊢ ∀ (x : S →ₐ[R] F), (fun σ => ↑σ pb.gen) x = (fun x => ↑x) (↑(PowerBasis.liftEquiv' pb) x)\n[PROOFSTEP]\nintro σ\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁰ : CommRing R\ninst✝⁹ : Ring S\ninst✝⁸ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁷ : Field K\ninst✝⁶ : Field L\ninst✝⁵ : Field F\ninst✝⁴ : Algebra K L\ninst✝³ : Algebra K F\nι : Type w\nE : Type u_7\ninst✝² : Field E\ninst✝¹ : Algebra K E\ninst✝ : Algebra R F\npb : PowerBasis R S\nhE : Splits (algebraMap R F) (minpoly R pb.gen)\nhfx : Separable (minpoly R pb.gen)\nthis : DecidableEq F := Classical.decEq F\nσ : S →ₐ[R] F\n⊢ (fun σ => ↑σ pb.gen) σ = (fun x => ↑x) (↑(PowerBasis.liftEquiv' pb) σ)\n[PROOFSTEP]\nsimp only [PowerBasis.liftEquiv'_apply_coe]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : Ring S\ninst✝⁹ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁸ : Field K\ninst✝⁷ : Field L\ninst✝⁶ : Field F\ninst✝⁵ : Algebra K L\ninst✝⁴ : Algebra K F\nι : Type w\nE : Type u_7\ninst✝³ : Field E\ninst✝² : Algebra K E\ninst✝¹ : IsSeparable K L\ninst✝ : FiniteDimensional K L\nx : L\nhF : Splits (algebraMap K F) (minpoly K x)\n⊢ ↑(algebraMap K F) (↑(norm K) x) =\n    Multiset.prod (roots (Polynomial.map (algebraMap K F) (minpoly K x))) ^ finrank { x_1 // x_1 ∈ K⟮x⟯ } L\n[PROOFSTEP]\nrw [norm_eq_norm_adjoin K x, map_pow, IntermediateField.AdjoinSimple.norm_gen_eq_prod_roots _ hF]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁴ : CommRing R\ninst✝¹³ : Ring S\ninst✝¹² : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝¹¹ : Field K\ninst✝¹⁰ : Field L\ninst✝⁹ : Field F\ninst✝⁸ : Algebra K L\ninst✝⁷ : Algebra K F\nι : Type w\nE : Type u_7\ninst✝⁶ : Field E\ninst✝⁵ : Algebra K E\ninst✝⁴ : Algebra L F\ninst✝³ : IsScalarTower K L F\ninst✝² : IsAlgClosed E\ninst✝¹ : IsSeparable K F\ninst✝ : FiniteDimensional K F\npb : PowerBasis K L\n⊢ ∏ σ : F →ₐ[K] E, ↑σ (↑(algebraMap L F) pb.gen) = (∏ σ : L →ₐ[K] E, ↑σ pb.gen) ^ finrank L F\n[PROOFSTEP]\nhaveI : FiniteDimensional L F := FiniteDimensional.right K L F\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁴ : CommRing R\ninst✝¹³ : Ring S\ninst✝¹² : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝¹¹ : Field K\ninst✝¹⁰ : Field L\ninst✝⁹ : Field F\ninst✝⁸ : Algebra K L\ninst✝⁷ : Algebra K F\nι : Type w\nE : Type u_7\ninst✝⁶ : Field E\ninst✝⁵ : Algebra K E\ninst✝⁴ : Algebra L F\ninst✝³ : IsScalarTower K L F\ninst✝² : IsAlgClosed E\ninst✝¹ : IsSeparable K F\ninst✝ : FiniteDimensional K F\npb : PowerBasis K L\nthis : FiniteDimensional L F\n⊢ ∏ σ : F →ₐ[K] E, ↑σ (↑(algebraMap L F) pb.gen) = (∏ σ : L →ₐ[K] E, ↑σ pb.gen) ^ finrank L F\n[PROOFSTEP]\nhaveI : IsSeparable L F := isSeparable_tower_top_of_isSeparable K L F\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁴ : CommRing R\ninst✝¹³ : Ring S\ninst✝¹² : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝¹¹ : Field K\ninst✝¹⁰ : Field L\ninst✝⁹ : Field F\ninst✝⁸ : Algebra K L\ninst✝⁷ : Algebra K F\nι : Type w\nE : Type u_7\ninst✝⁶ : Field E\ninst✝⁵ : Algebra K E\ninst✝⁴ : Algebra L F\ninst✝³ : IsScalarTower K L F\ninst✝² : IsAlgClosed E\ninst✝¹ : IsSeparable K F\ninst✝ : FiniteDimensional K F\npb : PowerBasis K L\nthis✝ : FiniteDimensional L F\nthis : IsSeparable L F\n⊢ ∏ σ : F →ₐ[K] E, ↑σ (↑(algebraMap L F) pb.gen) = (∏ σ : L →ₐ[K] E, ↑σ pb.gen) ^ finrank L F\n[PROOFSTEP]\nletI : Fintype (L →ₐ[K] E) := PowerBasis.AlgHom.fintype pb\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁴ : CommRing R\ninst✝¹³ : Ring S\ninst✝¹² : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝¹¹ : Field K\ninst✝¹⁰ : Field L\ninst✝⁹ : Field F\ninst✝⁸ : Algebra K L\ninst✝⁷ : Algebra K F\nι : Type w\nE : Type u_7\ninst✝⁶ : Field E\ninst✝⁵ : Algebra K E\ninst✝⁴ : Algebra L F\ninst✝³ : IsScalarTower K L F\ninst✝² : IsAlgClosed E\ninst✝¹ : IsSeparable K F\ninst✝ : FiniteDimensional K F\npb : PowerBasis K L\nthis✝¹ : FiniteDimensional L F\nthis✝ : IsSeparable L F\nthis : Fintype (L →ₐ[K] E) := PowerBasis.AlgHom.fintype pb\n⊢ ∏ σ : F →ₐ[K] E, ↑σ (↑(algebraMap L F) pb.gen) = (∏ σ : L →ₐ[K] E, ↑σ pb.gen) ^ finrank L F\n[PROOFSTEP]\nletI : ∀ f : L →ₐ[K] E, Fintype (@AlgHom L F E _ _ _ _ f.toRingHom.toAlgebra) := ?_\n[GOAL]\ncase refine_2\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁴ : CommRing R\ninst✝¹³ : Ring S\ninst✝¹² : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝¹¹ : Field K\ninst✝¹⁰ : Field L\ninst✝⁹ : Field F\ninst✝⁸ : Algebra K L\ninst✝⁷ : Algebra K F\nι : Type w\nE : Type u_7\ninst✝⁶ : Field E\ninst✝⁵ : Algebra K E\ninst✝⁴ : Algebra L F\ninst✝³ : IsScalarTower K L F\ninst✝² : IsAlgClosed E\ninst✝¹ : IsSeparable K F\ninst✝ : FiniteDimensional K F\npb : PowerBasis K L\nthis✝² : FiniteDimensional L F\nthis✝¹ : IsSeparable L F\nthis✝ : Fintype (L →ₐ[K] E) := PowerBasis.AlgHom.fintype pb\nthis : (f : L →ₐ[K] E) → Fintype (F →ₐ[L] E) := ?refine_1\n⊢ ∏ σ : F →ₐ[K] E, ↑σ (↑(algebraMap L F) pb.gen) = (∏ σ : L →ₐ[K] E, ↑σ pb.gen) ^ finrank L F\ncase refine_1\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁴ : CommRing R\ninst✝¹³ : Ring S\ninst✝¹² : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝¹¹ : Field K\ninst✝¹⁰ : Field L\ninst✝⁹ : Field F\ninst✝⁸ : Algebra K L\ninst✝⁷ : Algebra K F\nι : Type w\nE : Type u_7\ninst✝⁶ : Field E\ninst✝⁵ : Algebra K E\ninst✝⁴ : Algebra L F\ninst✝³ : IsScalarTower K L F\ninst✝² : IsAlgClosed E\ninst✝¹ : IsSeparable K F\ninst✝ : FiniteDimensional K F\npb : PowerBasis K L\nthis✝¹ : FiniteDimensional L F\nthis✝ : IsSeparable L F\nthis : Fintype (L →ₐ[K] E) := PowerBasis.AlgHom.fintype pb\n⊢ (f : L →ₐ[K] E) → Fintype (F →ₐ[L] E)\n[PROOFSTEP]\nrw [Fintype.prod_equiv algHomEquivSigma (fun σ : F →ₐ[K] E => _) fun σ => σ.1 pb.gen, ← Finset.univ_sigma_univ,\n  Finset.prod_sigma, ← Finset.prod_pow]\n[GOAL]\ncase refine_2\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁴ : CommRing R\ninst✝¹³ : Ring S\ninst✝¹² : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝¹¹ : Field K\ninst✝¹⁰ : Field L\ninst✝⁹ : Field F\ninst✝⁸ : Algebra K L\ninst✝⁷ : Algebra K F\nι : Type w\nE : Type u_7\ninst✝⁶ : Field E\ninst✝⁵ : Algebra K E\ninst✝⁴ : Algebra L F\ninst✝³ : IsScalarTower K L F\ninst✝² : IsAlgClosed E\ninst✝¹ : IsSeparable K F\ninst✝ : FiniteDimensional K F\npb : PowerBasis K L\nthis✝² : FiniteDimensional L F\nthis✝¹ : IsSeparable L F\nthis✝ : Fintype (L →ₐ[K] E) := PowerBasis.AlgHom.fintype pb\nthis : (f : L →ₐ[K] E) → Fintype (F →ₐ[L] E) := ?refine_1\n⊢ ∏ a : L →ₐ[K] E, ∏ s : F →ₐ[L] E, ↑{ fst := a, snd := s }.fst pb.gen = ∏ x : L →ₐ[K] E, ↑x pb.gen ^ finrank L F\ncase refine_2\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁴ : CommRing R\ninst✝¹³ : Ring S\ninst✝¹² : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝¹¹ : Field K\ninst✝¹⁰ : Field L\ninst✝⁹ : Field F\ninst✝⁸ : Algebra K L\ninst✝⁷ : Algebra K F\nι : Type w\nE : Type u_7\ninst✝⁶ : Field E\ninst✝⁵ : Algebra K E\ninst✝⁴ : Algebra L F\ninst✝³ : IsScalarTower K L F\ninst✝² : IsAlgClosed E\ninst✝¹ : IsSeparable K F\ninst✝ : FiniteDimensional K F\npb : PowerBasis K L\nthis✝² : FiniteDimensional L F\nthis✝¹ : IsSeparable L F\nthis✝ : Fintype (L →ₐ[K] E) := PowerBasis.AlgHom.fintype pb\nthis : (f : L →ₐ[K] E) → Fintype (F →ₐ[L] E) := ?refine_1\n⊢ ∀ (x : F →ₐ[K] E), ↑x (↑(algebraMap L F) pb.gen) = ↑(↑algHomEquivSigma x).fst pb.gen\ncase refine_1\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁴ : CommRing R\ninst✝¹³ : Ring S\ninst✝¹² : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝¹¹ : Field K\ninst✝¹⁰ : Field L\ninst✝⁹ : Field F\ninst✝⁸ : Algebra K L\ninst✝⁷ : Algebra K F\nι : Type w\nE : Type u_7\ninst✝⁶ : Field E\ninst✝⁵ : Algebra K E\ninst✝⁴ : Algebra L F\ninst✝³ : IsScalarTower K L F\ninst✝² : IsAlgClosed E\ninst✝¹ : IsSeparable K F\ninst✝ : FiniteDimensional K F\npb : PowerBasis K L\nthis✝¹ : FiniteDimensional L F\nthis✝ : IsSeparable L F\nthis : Fintype (L →ₐ[K] E) := PowerBasis.AlgHom.fintype pb\n⊢ (f : L →ₐ[K] E) → Fintype (F →ₐ[L] E)\n[PROOFSTEP]\nrefine Finset.prod_congr rfl fun σ _ => ?_\n[GOAL]\ncase refine_2\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁴ : CommRing R\ninst✝¹³ : Ring S\ninst✝¹² : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝¹¹ : Field K\ninst✝¹⁰ : Field L\ninst✝⁹ : Field F\ninst✝⁸ : Algebra K L\ninst✝⁷ : Algebra K F\nι : Type w\nE : Type u_7\ninst✝⁶ : Field E\ninst✝⁵ : Algebra K E\ninst✝⁴ : Algebra L F\ninst✝³ : IsScalarTower K L F\ninst✝² : IsAlgClosed E\ninst✝¹ : IsSeparable K F\ninst✝ : FiniteDimensional K F\npb : PowerBasis K L\nthis✝² : FiniteDimensional L F\nthis✝¹ : IsSeparable L F\nthis✝ : Fintype (L →ₐ[K] E) := PowerBasis.AlgHom.fintype pb\nthis : (f : L →ₐ[K] E) → Fintype (F →ₐ[L] E) := ?refine_1\nσ : L →ₐ[K] E\nx✝ : σ ∈ Finset.univ\n⊢ ∏ s : F →ₐ[L] E, ↑{ fst := σ, snd := s }.fst pb.gen = ↑σ pb.gen ^ finrank L F\n[PROOFSTEP]\nletI : Algebra L E := σ.toRingHom.toAlgebra\n[GOAL]\ncase refine_2\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁴ : CommRing R\ninst✝¹³ : Ring S\ninst✝¹² : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝¹¹ : Field K\ninst✝¹⁰ : Field L\ninst✝⁹ : Field F\ninst✝⁸ : Algebra K L\ninst✝⁷ : Algebra K F\nι : Type w\nE : Type u_7\ninst✝⁶ : Field E\ninst✝⁵ : Algebra K E\ninst✝⁴ : Algebra L F\ninst✝³ : IsScalarTower K L F\ninst✝² : IsAlgClosed E\ninst✝¹ : IsSeparable K F\ninst✝ : FiniteDimensional K F\npb : PowerBasis K L\nthis✝³ : FiniteDimensional L F\nthis✝² : IsSeparable L F\nthis✝¹ : Fintype (L →ₐ[K] E) := PowerBasis.AlgHom.fintype pb\nthis✝ : (f : L →ₐ[K] E) → Fintype (F →ₐ[L] E) := ?refine_1\nσ : L →ₐ[K] E\nx✝ : σ ∈ Finset.univ\nthis : Algebra L E := RingHom.toAlgebra ↑σ\n⊢ ∏ s : F →ₐ[L] E, ↑{ fst := σ, snd := s }.fst pb.gen = ↑σ pb.gen ^ finrank L F\n[PROOFSTEP]\nsimp_rw [Finset.prod_const]\n[GOAL]\ncase refine_2\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁴ : CommRing R\ninst✝¹³ : Ring S\ninst✝¹² : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝¹¹ : Field K\ninst✝¹⁰ : Field L\ninst✝⁹ : Field F\ninst✝⁸ : Algebra K L\ninst✝⁷ : Algebra K F\nι : Type w\nE : Type u_7\ninst✝⁶ : Field E\ninst✝⁵ : Algebra K E\ninst✝⁴ : Algebra L F\ninst✝³ : IsScalarTower K L F\ninst✝² : IsAlgClosed E\ninst✝¹ : IsSeparable K F\ninst✝ : FiniteDimensional K F\npb : PowerBasis K L\nthis✝³ : FiniteDimensional L F\nthis✝² : IsSeparable L F\nthis✝¹ : Fintype (L →ₐ[K] E) := PowerBasis.AlgHom.fintype pb\nthis✝ : (f : L →ₐ[K] E) → Fintype (F →ₐ[L] E) := ?refine_1\nσ : L →ₐ[K] E\nx✝ : σ ∈ Finset.univ\nthis : Algebra L E := RingHom.toAlgebra ↑σ\n⊢ ↑σ pb.gen ^ Finset.card Finset.univ = ↑σ pb.gen ^ finrank L F\n[PROOFSTEP]\ncongr\n[GOAL]\ncase refine_2.e_a\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁴ : CommRing R\ninst✝¹³ : Ring S\ninst✝¹² : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝¹¹ : Field K\ninst✝¹⁰ : Field L\ninst✝⁹ : Field F\ninst✝⁸ : Algebra K L\ninst✝⁷ : Algebra K F\nι : Type w\nE : Type u_7\ninst✝⁶ : Field E\ninst✝⁵ : Algebra K E\ninst✝⁴ : Algebra L F\ninst✝³ : IsScalarTower K L F\ninst✝² : IsAlgClosed E\ninst✝¹ : IsSeparable K F\ninst✝ : FiniteDimensional K F\npb : PowerBasis K L\nthis✝³ : FiniteDimensional L F\nthis✝² : IsSeparable L F\nthis✝¹ : Fintype (L →ₐ[K] E) := PowerBasis.AlgHom.fintype pb\nthis✝ : (f : L →ₐ[K] E) → Fintype (F →ₐ[L] E) := ?refine_1\nσ : L →ₐ[K] E\nx✝ : σ ∈ Finset.univ\nthis : Algebra L E := RingHom.toAlgebra ↑σ\n⊢ Finset.card Finset.univ = finrank L F\n[PROOFSTEP]\nexact AlgHom.card L F E\n[GOAL]\ncase refine_2\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁴ : CommRing R\ninst✝¹³ : Ring S\ninst✝¹² : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝¹¹ : Field K\ninst✝¹⁰ : Field L\ninst✝⁹ : Field F\ninst✝⁸ : Algebra K L\ninst✝⁷ : Algebra K F\nι : Type w\nE : Type u_7\ninst✝⁶ : Field E\ninst✝⁵ : Algebra K E\ninst✝⁴ : Algebra L F\ninst✝³ : IsScalarTower K L F\ninst✝² : IsAlgClosed E\ninst✝¹ : IsSeparable K F\ninst✝ : FiniteDimensional K F\npb : PowerBasis K L\nthis✝² : FiniteDimensional L F\nthis✝¹ : IsSeparable L F\nthis✝ : Fintype (L →ₐ[K] E) := PowerBasis.AlgHom.fintype pb\nthis : (f : L →ₐ[K] E) → Fintype (F →ₐ[L] E) := fun σ => minpoly.AlgHom.fintype L F E\n⊢ ∀ (x : F →ₐ[K] E), ↑x (↑(algebraMap L F) pb.gen) = ↑(↑algHomEquivSigma x).fst pb.gen\n[PROOFSTEP]\nintro σ\n[GOAL]\ncase refine_2\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁴ : CommRing R\ninst✝¹³ : Ring S\ninst✝¹² : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝¹¹ : Field K\ninst✝¹⁰ : Field L\ninst✝⁹ : Field F\ninst✝⁸ : Algebra K L\ninst✝⁷ : Algebra K F\nι : Type w\nE : Type u_7\ninst✝⁶ : Field E\ninst✝⁵ : Algebra K E\ninst✝⁴ : Algebra L F\ninst✝³ : IsScalarTower K L F\ninst✝² : IsAlgClosed E\ninst✝¹ : IsSeparable K F\ninst✝ : FiniteDimensional K F\npb : PowerBasis K L\nthis✝² : FiniteDimensional L F\nthis✝¹ : IsSeparable L F\nthis✝ : Fintype (L →ₐ[K] E) := PowerBasis.AlgHom.fintype pb\nthis : (f : L →ₐ[K] E) → Fintype (F →ₐ[L] E) := fun σ => minpoly.AlgHom.fintype L F E\nσ : F →ₐ[K] E\n⊢ ↑σ (↑(algebraMap L F) pb.gen) = ↑(↑algHomEquivSigma σ).fst pb.gen\n[PROOFSTEP]\nsimp only [algHomEquivSigma, Equiv.coe_fn_mk, AlgHom.restrictDomain, AlgHom.comp_apply, IsScalarTower.coe_toAlgHom']\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹² : CommRing R\ninst✝¹¹ : Ring S\ninst✝¹⁰ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : Field F\ninst✝⁶ : Algebra K L\ninst✝⁵ : Algebra K F\nι : Type w\nE : Type u_7\ninst✝⁴ : Field E\ninst✝³ : Algebra K E\ninst✝² : FiniteDimensional K L\ninst✝¹ : IsSeparable K L\ninst✝ : IsAlgClosed E\nx : L\n⊢ ↑(algebraMap K E) (↑(norm K) x) = ∏ σ : L →ₐ[K] E, ↑σ x\n[PROOFSTEP]\nhave hx := IsSeparable.isIntegral K x\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹² : CommRing R\ninst✝¹¹ : Ring S\ninst✝¹⁰ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : Field F\ninst✝⁶ : Algebra K L\ninst✝⁵ : Algebra K F\nι : Type w\nE : Type u_7\ninst✝⁴ : Field E\ninst✝³ : Algebra K E\ninst✝² : FiniteDimensional K L\ninst✝¹ : IsSeparable K L\ninst✝ : IsAlgClosed E\nx : L\nhx : IsIntegral K x\n⊢ ↑(algebraMap K E) (↑(norm K) x) = ∏ σ : L →ₐ[K] E, ↑σ x\n[PROOFSTEP]\nrw [norm_eq_norm_adjoin K x, RingHom.map_pow, ← adjoin.powerBasis_gen hx,\n  norm_eq_prod_embeddings_gen E (adjoin.powerBasis hx) (IsAlgClosed.splits_codomain _)]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹² : CommRing R\ninst✝¹¹ : Ring S\ninst✝¹⁰ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : Field F\ninst✝⁶ : Algebra K L\ninst✝⁵ : Algebra K F\nι : Type w\nE : Type u_7\ninst✝⁴ : Field E\ninst✝³ : Algebra K E\ninst✝² : FiniteDimensional K L\ninst✝¹ : IsSeparable K L\ninst✝ : IsAlgClosed E\nx : L\nhx : IsIntegral K x\n⊢ (∏ σ : { x_1 // x_1 ∈ K⟮x⟯ } →ₐ[K] E, ↑σ (adjoin.powerBasis hx).gen) ^ finrank { x_1 // x_1 ∈ K⟮x⟯ } L =\n    ∏ σ : L →ₐ[K] E, ↑σ x\n[PROOFSTEP]\nexact (prod_embeddings_eq_finrank_pow L (L := K⟮x⟯) E (adjoin.powerBasis hx)).symm\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹² : CommRing R\ninst✝¹¹ : Ring S\ninst✝¹⁰ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : Field F\ninst✝⁶ : Algebra K L\ninst✝⁵ : Algebra K F\nι : Type w\nE : Type u_7\ninst✝⁴ : Field E\ninst✝³ : Algebra K E\ninst✝² : FiniteDimensional K L\ninst✝¹ : IsSeparable K L\ninst✝ : IsAlgClosed E\nx : L\nhx : IsIntegral K x\n⊢ Separable (minpoly K (adjoin.powerBasis hx).gen)\n[PROOFSTEP]\nhaveI := isSeparable_tower_bot_of_isSeparable K K⟮x⟯ L\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹² : CommRing R\ninst✝¹¹ : Ring S\ninst✝¹⁰ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : Field F\ninst✝⁶ : Algebra K L\ninst✝⁵ : Algebra K F\nι : Type w\nE : Type u_7\ninst✝⁴ : Field E\ninst✝³ : Algebra K E\ninst✝² : FiniteDimensional K L\ninst✝¹ : IsSeparable K L\ninst✝ : IsAlgClosed E\nx : L\nhx : IsIntegral K x\nthis : IsSeparable K { x_1 // x_1 ∈ K⟮x⟯ }\n⊢ Separable (minpoly K (adjoin.powerBasis hx).gen)\n[PROOFSTEP]\nexact IsSeparable.separable K _\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : Ring S\ninst✝⁹ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁸ : Field K\ninst✝⁷ : Field L\ninst✝⁶ : Field F\ninst✝⁵ : Algebra K L\ninst✝⁴ : Algebra K F\nι : Type w\nE : Type u_7\ninst✝³ : Field E\ninst✝² : Algebra K E\ninst✝¹ : FiniteDimensional K L\ninst✝ : IsGalois K L\nx : L\n⊢ ↑(algebraMap K L) (↑(norm K) x) = ∏ σ : L ≃ₐ[K] L, ↑σ x\n[PROOFSTEP]\napply NoZeroSMulDivisors.algebraMap_injective L (AlgebraicClosure L)\n[GOAL]\ncase a\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : Ring S\ninst✝⁹ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁸ : Field K\ninst✝⁷ : Field L\ninst✝⁶ : Field F\ninst✝⁵ : Algebra K L\ninst✝⁴ : Algebra K F\nι : Type w\nE : Type u_7\ninst✝³ : Field E\ninst✝² : Algebra K E\ninst✝¹ : FiniteDimensional K L\ninst✝ : IsGalois K L\nx : L\n⊢ ↑(algebraMap L (AlgebraicClosure L)) (↑(algebraMap K L) (↑(norm K) x)) =\n    ↑(algebraMap L (AlgebraicClosure L)) (∏ σ : L ≃ₐ[K] L, ↑σ x)\n[PROOFSTEP]\nrw [map_prod (algebraMap L (AlgebraicClosure L))]\n[GOAL]\ncase a\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : Ring S\ninst✝⁹ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁸ : Field K\ninst✝⁷ : Field L\ninst✝⁶ : Field F\ninst✝⁵ : Algebra K L\ninst✝⁴ : Algebra K F\nι : Type w\nE : Type u_7\ninst✝³ : Field E\ninst✝² : Algebra K E\ninst✝¹ : FiniteDimensional K L\ninst✝ : IsGalois K L\nx : L\n⊢ ↑(algebraMap L (AlgebraicClosure L)) (↑(algebraMap K L) (↑(norm K) x)) =\n    ∏ x_1 : L ≃ₐ[K] L, ↑(algebraMap L (AlgebraicClosure L)) (↑x_1 x)\n[PROOFSTEP]\nrw [← Fintype.prod_equiv (Normal.algHomEquivAut K (AlgebraicClosure L) L)]\n[GOAL]\ncase a\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : Ring S\ninst✝⁹ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁸ : Field K\ninst✝⁷ : Field L\ninst✝⁶ : Field F\ninst✝⁵ : Algebra K L\ninst✝⁴ : Algebra K F\nι : Type w\nE : Type u_7\ninst✝³ : Field E\ninst✝² : Algebra K E\ninst✝¹ : FiniteDimensional K L\ninst✝ : IsGalois K L\nx : L\n⊢ ↑(algebraMap L (AlgebraicClosure L)) (↑(algebraMap K L) (↑(norm K) x)) = ∏ x : L →ₐ[K] AlgebraicClosure L, ?a.f✝ x\n[PROOFSTEP]\nrw [← norm_eq_prod_embeddings]\n[GOAL]\ncase a\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : Ring S\ninst✝⁹ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁸ : Field K\ninst✝⁷ : Field L\ninst✝⁶ : Field F\ninst✝⁵ : Algebra K L\ninst✝⁴ : Algebra K F\nι : Type w\nE : Type u_7\ninst✝³ : Field E\ninst✝² : Algebra K E\ninst✝¹ : FiniteDimensional K L\ninst✝ : IsGalois K L\nx : L\n⊢ ↑(algebraMap L (AlgebraicClosure L)) (↑(algebraMap K L) (↑(norm K) x)) =\n    ↑(algebraMap K (AlgebraicClosure L)) (↑(norm K) ?a.x✝)\ncase a.x\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : Ring S\ninst✝⁹ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁸ : Field K\ninst✝⁷ : Field L\ninst✝⁶ : Field F\ninst✝⁵ : Algebra K L\ninst✝⁴ : Algebra K F\nι : Type w\nE : Type u_7\ninst✝³ : Field E\ninst✝² : Algebra K E\ninst✝¹ : FiniteDimensional K L\ninst✝ : IsGalois K L\nx : L\n⊢ L\n[PROOFSTEP]\nsimp only [algebraMap_eq_smul_one, smul_one_smul]\n[GOAL]\ncase a\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : Ring S\ninst✝⁹ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁸ : Field K\ninst✝⁷ : Field L\ninst✝⁶ : Field F\ninst✝⁵ : Algebra K L\ninst✝⁴ : Algebra K F\nι : Type w\nE : Type u_7\ninst✝³ : Field E\ninst✝² : Algebra K E\ninst✝¹ : FiniteDimensional K L\ninst✝ : IsGalois K L\nx : L\n⊢ ↑(norm K) x • 1 = ↑(norm K) ?a.x✝ • 1\ncase a.x\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : Ring S\ninst✝⁹ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁸ : Field K\ninst✝⁷ : Field L\ninst✝⁶ : Field F\ninst✝⁵ : Algebra K L\ninst✝⁴ : Algebra K F\nι : Type w\nE : Type u_7\ninst✝³ : Field E\ninst✝² : Algebra K E\ninst✝¹ : FiniteDimensional K L\ninst✝ : IsGalois K L\nx : L\n⊢ L\n[PROOFSTEP]\nrfl\n[GOAL]\ncase a.h\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : Ring S\ninst✝⁹ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁸ : Field K\ninst✝⁷ : Field L\ninst✝⁶ : Field F\ninst✝⁵ : Algebra K L\ninst✝⁴ : Algebra K F\nι : Type w\nE : Type u_7\ninst✝³ : Field E\ninst✝² : Algebra K E\ninst✝¹ : FiniteDimensional K L\ninst✝ : IsGalois K L\nx : L\n⊢ ∀ (x_1 : L →ₐ[K] AlgebraicClosure L),\n    ↑x_1 x = ↑(algebraMap L (AlgebraicClosure L)) (↑(↑(Normal.algHomEquivAut K (AlgebraicClosure L) L) x_1) x)\n[PROOFSTEP]\nintro σ\n[GOAL]\ncase a.h\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹¹ : CommRing R\ninst✝¹⁰ : Ring S\ninst✝⁹ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁸ : Field K\ninst✝⁷ : Field L\ninst✝⁶ : Field F\ninst✝⁵ : Algebra K L\ninst✝⁴ : Algebra K F\nι : Type w\nE : Type u_7\ninst✝³ : Field E\ninst✝² : Algebra K E\ninst✝¹ : FiniteDimensional K L\ninst✝ : IsGalois K L\nx : L\nσ : L →ₐ[K] AlgebraicClosure L\n⊢ ↑σ x = ↑(algebraMap L (AlgebraicClosure L)) (↑(↑(Normal.algHomEquivAut K (AlgebraicClosure L) L) σ) x)\n[PROOFSTEP]\nsimp only [Normal.algHomEquivAut, AlgHom.restrictNormal', Equiv.coe_fn_mk, AlgEquiv.coe_ofBijective,\n  AlgHom.restrictNormal_commutes, id.map_eq_id, RingHom.id_apply]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁴ : CommRing R\ninst✝¹³ : Ring S\ninst✝¹² : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝¹¹ : Field K\ninst✝¹⁰ : Field L\ninst✝⁹ : Field F\ninst✝⁸ : Algebra K L\ninst✝⁷ : Algebra K F\nι : Type w\nE : Type u_7\ninst✝⁶ : Field E\ninst✝⁵ : Algebra K E\ninst✝⁴ : Algebra R L\ninst✝³ : Algebra R K\ninst✝² : IsScalarTower R K L\ninst✝¹ : IsSeparable K L\ninst✝ : FiniteDimensional K L\nx : L\nhx : IsIntegral R x\n⊢ IsIntegral R (↑(norm K) x)\n[PROOFSTEP]\nhave hx' : IsIntegral K x := isIntegral_of_isScalarTower hx\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁴ : CommRing R\ninst✝¹³ : Ring S\ninst✝¹² : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝¹¹ : Field K\ninst✝¹⁰ : Field L\ninst✝⁹ : Field F\ninst✝⁸ : Algebra K L\ninst✝⁷ : Algebra K F\nι : Type w\nE : Type u_7\ninst✝⁶ : Field E\ninst✝⁵ : Algebra K E\ninst✝⁴ : Algebra R L\ninst✝³ : Algebra R K\ninst✝² : IsScalarTower R K L\ninst✝¹ : IsSeparable K L\ninst✝ : FiniteDimensional K L\nx : L\nhx : IsIntegral R x\nhx' : IsIntegral K x\n⊢ IsIntegral R (↑(norm K) x)\n[PROOFSTEP]\nrw [← isIntegral_algebraMap_iff (algebraMap K (AlgebraicClosure L)).injective, norm_eq_prod_roots]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁴ : CommRing R\ninst✝¹³ : Ring S\ninst✝¹² : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝¹¹ : Field K\ninst✝¹⁰ : Field L\ninst✝⁹ : Field F\ninst✝⁸ : Algebra K L\ninst✝⁷ : Algebra K F\nι : Type w\nE : Type u_7\ninst✝⁶ : Field E\ninst✝⁵ : Algebra K E\ninst✝⁴ : Algebra R L\ninst✝³ : Algebra R K\ninst✝² : IsScalarTower R K L\ninst✝¹ : IsSeparable K L\ninst✝ : FiniteDimensional K L\nx : L\nhx : IsIntegral R x\nhx' : IsIntegral K x\n⊢ IsIntegral R\n    (Multiset.prod (roots (Polynomial.map (algebraMap K (AlgebraicClosure L)) (minpoly K x))) ^\n      finrank { x_1 // x_1 ∈ K⟮x⟯ } L)\n[PROOFSTEP]\nrefine' (IsIntegral.multiset_prod fun y hy => _).pow _\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁴ : CommRing R\ninst✝¹³ : Ring S\ninst✝¹² : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝¹¹ : Field K\ninst✝¹⁰ : Field L\ninst✝⁹ : Field F\ninst✝⁸ : Algebra K L\ninst✝⁷ : Algebra K F\nι : Type w\nE : Type u_7\ninst✝⁶ : Field E\ninst✝⁵ : Algebra K E\ninst✝⁴ : Algebra R L\ninst✝³ : Algebra R K\ninst✝² : IsScalarTower R K L\ninst✝¹ : IsSeparable K L\ninst✝ : FiniteDimensional K L\nx : L\nhx : IsIntegral R x\nhx' : IsIntegral K x\ny : (fun x => AlgebraicClosure L) (↑(norm K) x)\nhy : y ∈ roots (Polynomial.map (algebraMap K (AlgebraicClosure L)) (minpoly K x))\n⊢ IsIntegral R y\n[PROOFSTEP]\nrw [mem_roots_map (minpoly.ne_zero hx')] at hy \n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁴ : CommRing R\ninst✝¹³ : Ring S\ninst✝¹² : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝¹¹ : Field K\ninst✝¹⁰ : Field L\ninst✝⁹ : Field F\ninst✝⁸ : Algebra K L\ninst✝⁷ : Algebra K F\nι : Type w\nE : Type u_7\ninst✝⁶ : Field E\ninst✝⁵ : Algebra K E\ninst✝⁴ : Algebra R L\ninst✝³ : Algebra R K\ninst✝² : IsScalarTower R K L\ninst✝¹ : IsSeparable K L\ninst✝ : FiniteDimensional K L\nx : L\nhx : IsIntegral R x\nhx' : IsIntegral K x\ny : (fun x => AlgebraicClosure L) (↑(norm K) x)\nhy : eval₂ (algebraMap K (AlgebraicClosure L)) y (minpoly K x) = 0\n⊢ IsIntegral R y\n[PROOFSTEP]\nuse minpoly R x, minpoly.monic hx\n[GOAL]\ncase right\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁴ : CommRing R\ninst✝¹³ : Ring S\ninst✝¹² : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝¹¹ : Field K\ninst✝¹⁰ : Field L\ninst✝⁹ : Field F\ninst✝⁸ : Algebra K L\ninst✝⁷ : Algebra K F\nι : Type w\nE : Type u_7\ninst✝⁶ : Field E\ninst✝⁵ : Algebra K E\ninst✝⁴ : Algebra R L\ninst✝³ : Algebra R K\ninst✝² : IsScalarTower R K L\ninst✝¹ : IsSeparable K L\ninst✝ : FiniteDimensional K L\nx : L\nhx : IsIntegral R x\nhx' : IsIntegral K x\ny : (fun x => AlgebraicClosure L) (↑(norm K) x)\nhy : eval₂ (algebraMap K (AlgebraicClosure L)) y (minpoly K x) = 0\n⊢ eval₂ (algebraMap R ((fun x => AlgebraicClosure L) (↑(norm K) x))) y (minpoly R x) = 0\n[PROOFSTEP]\nrw [← aeval_def] at hy ⊢\n[GOAL]\ncase right\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁴ : CommRing R\ninst✝¹³ : Ring S\ninst✝¹² : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝¹¹ : Field K\ninst✝¹⁰ : Field L\ninst✝⁹ : Field F\ninst✝⁸ : Algebra K L\ninst✝⁷ : Algebra K F\nι : Type w\nE : Type u_7\ninst✝⁶ : Field E\ninst✝⁵ : Algebra K E\ninst✝⁴ : Algebra R L\ninst✝³ : Algebra R K\ninst✝² : IsScalarTower R K L\ninst✝¹ : IsSeparable K L\ninst✝ : FiniteDimensional K L\nx : L\nhx : IsIntegral R x\nhx' : IsIntegral K x\ny : (fun x => AlgebraicClosure L) (↑(norm K) x)\nhy : ↑(aeval y) (minpoly K x) = 0\n⊢ ↑(aeval y) (minpoly R x) = 0\n[PROOFSTEP]\nexact minpoly.aeval_of_isScalarTower R x y hy\n[GOAL]\ncase hF\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹⁴ : CommRing R\ninst✝¹³ : Ring S\ninst✝¹² : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝¹¹ : Field K\ninst✝¹⁰ : Field L\ninst✝⁹ : Field F\ninst✝⁸ : Algebra K L\ninst✝⁷ : Algebra K F\nι : Type w\nE : Type u_7\ninst✝⁶ : Field E\ninst✝⁵ : Algebra K E\ninst✝⁴ : Algebra R L\ninst✝³ : Algebra R K\ninst✝² : IsScalarTower R K L\ninst✝¹ : IsSeparable K L\ninst✝ : FiniteDimensional K L\nx : L\nhx : IsIntegral R x\nhx' : IsIntegral K x\n⊢ Splits (algebraMap K (AlgebraicClosure L)) (minpoly K x)\n[PROOFSTEP]\napply IsAlgClosed.splits_codomain\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹² : CommRing R\ninst✝¹¹ : Ring S\ninst✝¹⁰ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : Field F\ninst✝⁶ : Algebra K L\ninst✝⁵ : Algebra K F\nι : Type w\nE : Type u_7\ninst✝⁴ : Field E\ninst✝³ : Algebra K E\ninst✝² : Algebra L F\ninst✝¹ : IsScalarTower K L F\ninst✝ : IsSeparable K F\nx : F\n⊢ ↑(norm K) (↑(norm L) x) = ↑(norm K) x\n[PROOFSTEP]\nby_cases hKF : FiniteDimensional K F\n[GOAL]\ncase pos\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹² : CommRing R\ninst✝¹¹ : Ring S\ninst✝¹⁰ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : Field F\ninst✝⁶ : Algebra K L\ninst✝⁵ : Algebra K F\nι : Type w\nE : Type u_7\ninst✝⁴ : Field E\ninst✝³ : Algebra K E\ninst✝² : Algebra L F\ninst✝¹ : IsScalarTower K L F\ninst✝ : IsSeparable K F\nx : F\nhKF : FiniteDimensional K F\n⊢ ↑(norm K) (↑(norm L) x) = ↑(norm K) x\n[PROOFSTEP]\nlet A := AlgebraicClosure K\n[GOAL]\ncase pos\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹² : CommRing R\ninst✝¹¹ : Ring S\ninst✝¹⁰ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : Field F\ninst✝⁶ : Algebra K L\ninst✝⁵ : Algebra K F\nι : Type w\nE : Type u_7\ninst✝⁴ : Field E\ninst✝³ : Algebra K E\ninst✝² : Algebra L F\ninst✝¹ : IsScalarTower K L F\ninst✝ : IsSeparable K F\nx : F\nhKF : FiniteDimensional K F\nA : Type u_4 := AlgebraicClosure K\n⊢ ↑(norm K) (↑(norm L) x) = ↑(norm K) x\n[PROOFSTEP]\napply (algebraMap K A).injective\n[GOAL]\ncase pos.a\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹² : CommRing R\ninst✝¹¹ : Ring S\ninst✝¹⁰ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : Field F\ninst✝⁶ : Algebra K L\ninst✝⁵ : Algebra K F\nι : Type w\nE : Type u_7\ninst✝⁴ : Field E\ninst✝³ : Algebra K E\ninst✝² : Algebra L F\ninst✝¹ : IsScalarTower K L F\ninst✝ : IsSeparable K F\nx : F\nhKF : FiniteDimensional K F\nA : Type u_4 := AlgebraicClosure K\n⊢ ↑(algebraMap K A) (↑(norm K) (↑(norm L) x)) = ↑(algebraMap K A) (↑(norm K) x)\n[PROOFSTEP]\nhaveI : FiniteDimensional L F := FiniteDimensional.right K L F\n[GOAL]\ncase pos.a\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹² : CommRing R\ninst✝¹¹ : Ring S\ninst✝¹⁰ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : Field F\ninst✝⁶ : Algebra K L\ninst✝⁵ : Algebra K F\nι : Type w\nE : Type u_7\ninst✝⁴ : Field E\ninst✝³ : Algebra K E\ninst✝² : Algebra L F\ninst✝¹ : IsScalarTower K L F\ninst✝ : IsSeparable K F\nx : F\nhKF : FiniteDimensional K F\nA : Type u_4 := AlgebraicClosure K\nthis : FiniteDimensional L F\n⊢ ↑(algebraMap K A) (↑(norm K) (↑(norm L) x)) = ↑(algebraMap K A) (↑(norm K) x)\n[PROOFSTEP]\nhaveI : FiniteDimensional K L := FiniteDimensional.left K L F\n[GOAL]\ncase pos.a\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹² : CommRing R\ninst✝¹¹ : Ring S\ninst✝¹⁰ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : Field F\ninst✝⁶ : Algebra K L\ninst✝⁵ : Algebra K F\nι : Type w\nE : Type u_7\ninst✝⁴ : Field E\ninst✝³ : Algebra K E\ninst✝² : Algebra L F\ninst✝¹ : IsScalarTower K L F\ninst✝ : IsSeparable K F\nx : F\nhKF : FiniteDimensional K F\nA : Type u_4 := AlgebraicClosure K\nthis✝ : FiniteDimensional L F\nthis : FiniteDimensional K L\n⊢ ↑(algebraMap K A) (↑(norm K) (↑(norm L) x)) = ↑(algebraMap K A) (↑(norm K) x)\n[PROOFSTEP]\nhaveI : IsSeparable K L := isSeparable_tower_bot_of_isSeparable K L F\n[GOAL]\ncase pos.a\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹² : CommRing R\ninst✝¹¹ : Ring S\ninst✝¹⁰ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : Field F\ninst✝⁶ : Algebra K L\ninst✝⁵ : Algebra K F\nι : Type w\nE : Type u_7\ninst✝⁴ : Field E\ninst✝³ : Algebra K E\ninst✝² : Algebra L F\ninst✝¹ : IsScalarTower K L F\ninst✝ : IsSeparable K F\nx : F\nhKF : FiniteDimensional K F\nA : Type u_4 := AlgebraicClosure K\nthis✝¹ : FiniteDimensional L F\nthis✝ : FiniteDimensional K L\nthis : IsSeparable K L\n⊢ ↑(algebraMap K A) (↑(norm K) (↑(norm L) x)) = ↑(algebraMap K A) (↑(norm K) x)\n[PROOFSTEP]\nhaveI : IsSeparable L F := isSeparable_tower_top_of_isSeparable K L F\n[GOAL]\ncase pos.a\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹² : CommRing R\ninst✝¹¹ : Ring S\ninst✝¹⁰ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : Field F\ninst✝⁶ : Algebra K L\ninst✝⁵ : Algebra K F\nι : Type w\nE : Type u_7\ninst✝⁴ : Field E\ninst✝³ : Algebra K E\ninst✝² : Algebra L F\ninst✝¹ : IsScalarTower K L F\ninst✝ : IsSeparable K F\nx : F\nhKF : FiniteDimensional K F\nA : Type u_4 := AlgebraicClosure K\nthis✝² : FiniteDimensional L F\nthis✝¹ : FiniteDimensional K L\nthis✝ : IsSeparable K L\nthis : IsSeparable L F\n⊢ ↑(algebraMap K A) (↑(norm K) (↑(norm L) x)) = ↑(algebraMap K A) (↑(norm K) x)\n[PROOFSTEP]\nletI :\n  ∀ σ : L →ₐ[K] A,\n    haveI := σ.toRingHom.toAlgebra\n    Fintype (F →ₐ[L] A) :=\n  fun _ => inferInstance\n[GOAL]\ncase pos.a\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹² : CommRing R\ninst✝¹¹ : Ring S\ninst✝¹⁰ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : Field F\ninst✝⁶ : Algebra K L\ninst✝⁵ : Algebra K F\nι : Type w\nE : Type u_7\ninst✝⁴ : Field E\ninst✝³ : Algebra K E\ninst✝² : Algebra L F\ninst✝¹ : IsScalarTower K L F\ninst✝ : IsSeparable K F\nx : F\nhKF : FiniteDimensional K F\nA : Type u_4 := AlgebraicClosure K\nthis✝³ : FiniteDimensional L F\nthis✝² : FiniteDimensional K L\nthis✝¹ : IsSeparable K L\nthis✝ : IsSeparable L F\nthis : (σ : L →ₐ[K] A) → Fintype (F →ₐ[L] A) := fun x => inferInstance\n⊢ ↑(algebraMap K A) (↑(norm K) (↑(norm L) x)) = ↑(algebraMap K A) (↑(norm K) x)\n[PROOFSTEP]\nrw [norm_eq_prod_embeddings K A (_ : F),\n  Fintype.prod_equiv algHomEquivSigma (fun σ : F →ₐ[K] A => σ x) (fun π : Σ f : L →ₐ[K] A, _ => (π.2 : F → A) x)\n    fun _ => rfl]\n[GOAL]\ncase pos.a\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹² : CommRing R\ninst✝¹¹ : Ring S\ninst✝¹⁰ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : Field F\ninst✝⁶ : Algebra K L\ninst✝⁵ : Algebra K F\nι : Type w\nE : Type u_7\ninst✝⁴ : Field E\ninst✝³ : Algebra K E\ninst✝² : Algebra L F\ninst✝¹ : IsScalarTower K L F\ninst✝ : IsSeparable K F\nx : F\nhKF : FiniteDimensional K F\nA : Type u_4 := AlgebraicClosure K\nthis✝³ : FiniteDimensional L F\nthis✝² : FiniteDimensional K L\nthis✝¹ : IsSeparable K L\nthis✝ : IsSeparable L F\nthis : (σ : L →ₐ[K] A) → Fintype (F →ₐ[L] A) := fun x => inferInstance\n⊢ ↑(algebraMap K A) (↑(norm K) (↑(norm L) x)) = ∏ x_1 : (f : L →ₐ[K] A) × (F →ₐ[L] A), ↑x_1.snd x\n[PROOFSTEP]\nsuffices\n  ∀ σ : L →ₐ[K] A,\n    haveI := σ.toRingHom.toAlgebra\n    ∏ π : F →ₐ[L] A, π x = σ (norm L x)\n  by simp_rw [← Finset.univ_sigma_univ, Finset.prod_sigma, this, norm_eq_prod_embeddings]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹² : CommRing R\ninst✝¹¹ : Ring S\ninst✝¹⁰ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : Field F\ninst✝⁶ : Algebra K L\ninst✝⁵ : Algebra K F\nι : Type w\nE : Type u_7\ninst✝⁴ : Field E\ninst✝³ : Algebra K E\ninst✝² : Algebra L F\ninst✝¹ : IsScalarTower K L F\ninst✝ : IsSeparable K F\nx : F\nhKF : FiniteDimensional K F\nA : Type u_4 := AlgebraicClosure K\nthis✝⁴ : FiniteDimensional L F\nthis✝³ : FiniteDimensional K L\nthis✝² : IsSeparable K L\nthis✝¹ : IsSeparable L F\nthis✝ : (σ : L →ₐ[K] A) → Fintype (F →ₐ[L] A) := fun x => inferInstance\nthis : ∀ (σ : L →ₐ[K] A), ∏ π : F →ₐ[L] A, ↑π x = ↑σ (↑(norm L) x)\n⊢ ↑(algebraMap K A) (↑(norm K) (↑(norm L) x)) = ∏ x_1 : (f : L →ₐ[K] A) × (F →ₐ[L] A), ↑x_1.snd x\n[PROOFSTEP]\nsimp_rw [← Finset.univ_sigma_univ, Finset.prod_sigma, this, norm_eq_prod_embeddings]\n[GOAL]\ncase pos.a\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹² : CommRing R\ninst✝¹¹ : Ring S\ninst✝¹⁰ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : Field F\ninst✝⁶ : Algebra K L\ninst✝⁵ : Algebra K F\nι : Type w\nE : Type u_7\ninst✝⁴ : Field E\ninst✝³ : Algebra K E\ninst✝² : Algebra L F\ninst✝¹ : IsScalarTower K L F\ninst✝ : IsSeparable K F\nx : F\nhKF : FiniteDimensional K F\nA : Type u_4 := AlgebraicClosure K\nthis✝³ : FiniteDimensional L F\nthis✝² : FiniteDimensional K L\nthis✝¹ : IsSeparable K L\nthis✝ : IsSeparable L F\nthis : (σ : L →ₐ[K] A) → Fintype (F →ₐ[L] A) := fun x => inferInstance\n⊢ ∀ (σ : L →ₐ[K] A), ∏ π : F →ₐ[L] A, ↑π x = ↑σ (↑(norm L) x)\n[PROOFSTEP]\nintro σ\n[GOAL]\ncase pos.a\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹² : CommRing R\ninst✝¹¹ : Ring S\ninst✝¹⁰ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : Field F\ninst✝⁶ : Algebra K L\ninst✝⁵ : Algebra K F\nι : Type w\nE : Type u_7\ninst✝⁴ : Field E\ninst✝³ : Algebra K E\ninst✝² : Algebra L F\ninst✝¹ : IsScalarTower K L F\ninst✝ : IsSeparable K F\nx : F\nhKF : FiniteDimensional K F\nA : Type u_4 := AlgebraicClosure K\nthis✝³ : FiniteDimensional L F\nthis✝² : FiniteDimensional K L\nthis✝¹ : IsSeparable K L\nthis✝ : IsSeparable L F\nthis : (σ : L →ₐ[K] A) → Fintype (F →ₐ[L] A) := fun x => inferInstance\nσ : L →ₐ[K] A\n⊢ ∏ π : F →ₐ[L] A, ↑π x = ↑σ (↑(norm L) x)\n[PROOFSTEP]\nletI : Algebra L A := σ.toRingHom.toAlgebra\n[GOAL]\ncase pos.a\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹² : CommRing R\ninst✝¹¹ : Ring S\ninst✝¹⁰ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : Field F\ninst✝⁶ : Algebra K L\ninst✝⁵ : Algebra K F\nι : Type w\nE : Type u_7\ninst✝⁴ : Field E\ninst✝³ : Algebra K E\ninst✝² : Algebra L F\ninst✝¹ : IsScalarTower K L F\ninst✝ : IsSeparable K F\nx : F\nhKF : FiniteDimensional K F\nA : Type u_4 := AlgebraicClosure K\nthis✝⁴ : FiniteDimensional L F\nthis✝³ : FiniteDimensional K L\nthis✝² : IsSeparable K L\nthis✝¹ : IsSeparable L F\nthis✝ : (σ : L →ₐ[K] A) → Fintype (F →ₐ[L] A) := fun x => inferInstance\nσ : L →ₐ[K] A\nthis : Algebra L A := RingHom.toAlgebra ↑σ\n⊢ ∏ π : F →ₐ[L] A, ↑π x = ↑σ (↑(norm L) x)\n[PROOFSTEP]\nrw [← norm_eq_prod_embeddings L A (_ : F)]\n[GOAL]\ncase pos.a\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹² : CommRing R\ninst✝¹¹ : Ring S\ninst✝¹⁰ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : Field F\ninst✝⁶ : Algebra K L\ninst✝⁵ : Algebra K F\nι : Type w\nE : Type u_7\ninst✝⁴ : Field E\ninst✝³ : Algebra K E\ninst✝² : Algebra L F\ninst✝¹ : IsScalarTower K L F\ninst✝ : IsSeparable K F\nx : F\nhKF : FiniteDimensional K F\nA : Type u_4 := AlgebraicClosure K\nthis✝⁴ : FiniteDimensional L F\nthis✝³ : FiniteDimensional K L\nthis✝² : IsSeparable K L\nthis✝¹ : IsSeparable L F\nthis✝ : (σ : L →ₐ[K] A) → Fintype (F →ₐ[L] A) := fun x => inferInstance\nσ : L →ₐ[K] A\nthis : Algebra L A := RingHom.toAlgebra ↑σ\n⊢ ↑(algebraMap L A) (↑(norm L) x) = ↑σ (↑(norm L) x)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹² : CommRing R\ninst✝¹¹ : Ring S\ninst✝¹⁰ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : Field F\ninst✝⁶ : Algebra K L\ninst✝⁵ : Algebra K F\nι : Type w\nE : Type u_7\ninst✝⁴ : Field E\ninst✝³ : Algebra K E\ninst✝² : Algebra L F\ninst✝¹ : IsScalarTower K L F\ninst✝ : IsSeparable K F\nx : F\nhKF : ¬FiniteDimensional K F\n⊢ ↑(norm K) (↑(norm L) x) = ↑(norm K) x\n[PROOFSTEP]\nrw [norm_eq_one_of_not_module_finite hKF]\n[GOAL]\ncase neg\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹² : CommRing R\ninst✝¹¹ : Ring S\ninst✝¹⁰ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : Field F\ninst✝⁶ : Algebra K L\ninst✝⁵ : Algebra K F\nι : Type w\nE : Type u_7\ninst✝⁴ : Field E\ninst✝³ : Algebra K E\ninst✝² : Algebra L F\ninst✝¹ : IsScalarTower K L F\ninst✝ : IsSeparable K F\nx : F\nhKF : ¬FiniteDimensional K F\n⊢ ↑(norm K) (↑(norm L) x) = 1\n[PROOFSTEP]\nby_cases hKL : FiniteDimensional K L\n[GOAL]\ncase pos\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹² : CommRing R\ninst✝¹¹ : Ring S\ninst✝¹⁰ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : Field F\ninst✝⁶ : Algebra K L\ninst✝⁵ : Algebra K F\nι : Type w\nE : Type u_7\ninst✝⁴ : Field E\ninst✝³ : Algebra K E\ninst✝² : Algebra L F\ninst✝¹ : IsScalarTower K L F\ninst✝ : IsSeparable K F\nx : F\nhKF : ¬FiniteDimensional K F\nhKL : FiniteDimensional K L\n⊢ ↑(norm K) (↑(norm L) x) = 1\n[PROOFSTEP]\nhave hLF : ¬FiniteDimensional L F := by\n  refine' (mt _) hKF\n  intro hKF\n  exact FiniteDimensional.trans K L F\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹² : CommRing R\ninst✝¹¹ : Ring S\ninst✝¹⁰ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : Field F\ninst✝⁶ : Algebra K L\ninst✝⁵ : Algebra K F\nι : Type w\nE : Type u_7\ninst✝⁴ : Field E\ninst✝³ : Algebra K E\ninst✝² : Algebra L F\ninst✝¹ : IsScalarTower K L F\ninst✝ : IsSeparable K F\nx : F\nhKF : ¬FiniteDimensional K F\nhKL : FiniteDimensional K L\n⊢ ¬FiniteDimensional L F\n[PROOFSTEP]\nrefine' (mt _) hKF\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹² : CommRing R\ninst✝¹¹ : Ring S\ninst✝¹⁰ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : Field F\ninst✝⁶ : Algebra K L\ninst✝⁵ : Algebra K F\nι : Type w\nE : Type u_7\ninst✝⁴ : Field E\ninst✝³ : Algebra K E\ninst✝² : Algebra L F\ninst✝¹ : IsScalarTower K L F\ninst✝ : IsSeparable K F\nx : F\nhKF : ¬FiniteDimensional K F\nhKL : FiniteDimensional K L\n⊢ FiniteDimensional L F → FiniteDimensional K F\n[PROOFSTEP]\nintro hKF\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹² : CommRing R\ninst✝¹¹ : Ring S\ninst✝¹⁰ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : Field F\ninst✝⁶ : Algebra K L\ninst✝⁵ : Algebra K F\nι : Type w\nE : Type u_7\ninst✝⁴ : Field E\ninst✝³ : Algebra K E\ninst✝² : Algebra L F\ninst✝¹ : IsScalarTower K L F\ninst✝ : IsSeparable K F\nx : F\nhKF✝ : ¬FiniteDimensional K F\nhKL : FiniteDimensional K L\nhKF : FiniteDimensional L F\n⊢ FiniteDimensional K F\n[PROOFSTEP]\nexact FiniteDimensional.trans K L F\n[GOAL]\ncase pos\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹² : CommRing R\ninst✝¹¹ : Ring S\ninst✝¹⁰ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : Field F\ninst✝⁶ : Algebra K L\ninst✝⁵ : Algebra K F\nι : Type w\nE : Type u_7\ninst✝⁴ : Field E\ninst✝³ : Algebra K E\ninst✝² : Algebra L F\ninst✝¹ : IsScalarTower K L F\ninst✝ : IsSeparable K F\nx : F\nhKF : ¬FiniteDimensional K F\nhKL : FiniteDimensional K L\nhLF : ¬FiniteDimensional L F\n⊢ ↑(norm K) (↑(norm L) x) = 1\n[PROOFSTEP]\nrw [norm_eq_one_of_not_module_finite hLF, _root_.map_one]\n[GOAL]\ncase neg\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝¹² : CommRing R\ninst✝¹¹ : Ring S\ninst✝¹⁰ : Algebra R S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁹ : Field K\ninst✝⁸ : Field L\ninst✝⁷ : Field F\ninst✝⁶ : Algebra K L\ninst✝⁵ : Algebra K F\nι : Type w\nE : Type u_7\ninst✝⁴ : Field E\ninst✝³ : Algebra K E\ninst✝² : Algebra L F\ninst✝¹ : IsScalarTower K L F\ninst✝ : IsSeparable K F\nx : F\nhKF : ¬FiniteDimensional K F\nhKL : ¬FiniteDimensional K L\n⊢ ↑(norm K) (↑(norm L) x) = 1\n[PROOFSTEP]\nrw [norm_eq_one_of_not_module_finite hKL]\n", "meta": {"mathlib_filename": "Mathlib.RingTheory.Norm", "llama_tokens": 46861, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8104789086703225, "lm_q2_score": 0.6297746074044134, "lm_q1q2_score": 0.5104190365174097}}
{"text": "[GOAL]\nα✝ β✝ : Type u\ns✝ : Set α✝\nf✝ : α✝ → Set β✝\ng : Set (α✝ → β✝)\nα β γ : Type u_1\nf : α → β → γ\ns : Set α\nt : Set β\n⊢ image2 f s t = Seq.seq (f <$> s) fun x => t\n[PROOFSTEP]\next\n[GOAL]\ncase h\nα✝ β✝ : Type u\ns✝ : Set α✝\nf✝ : α✝ → Set β✝\ng : Set (α✝ → β✝)\nα β γ : Type u_1\nf : α → β → γ\ns : Set α\nt : Set β\nx✝ : γ\n⊢ x✝ ∈ image2 f s t ↔ x✝ ∈ Seq.seq (f <$> s) fun x => t\n[PROOFSTEP]\nsimp\n[GOAL]\nα β : Type u\ns : Set α\nf : α → Set β\ng : Set (α → β)\nα✝ β✝ γ✝ : Type ?u.7831\nx✝² : Set α✝\nx✝¹ : α✝ → Set β✝\nx✝ : β✝ → Set γ✝\n⊢ x✝² >>= x✝¹ >>= x✝ = x✝² >>= fun x => x✝¹ x >>= x✝\n[PROOFSTEP]\nsimp only [bind_def, biUnion_iUnion]\n[GOAL]\nα β✝ : Type u\ns : Set α\nf : α → Set β✝\ng : Set (α → β✝)\nβ : Set α\nγ : Set ↑β\n⊢ Lean.Internal.coeM γ ⊆ β\n[PROOFSTEP]\nintro _ ⟨_, ⟨⟨⟨_, ha⟩, rfl⟩, _, ⟨_, rfl⟩, _⟩⟩\n[GOAL]\nα β✝ : Type u\ns : Set α\nf : α → Set β✝\ng : Set (α → β✝)\nβ : Set α\nγ : Set ↑β\na✝ val✝ : α\nha : val✝ ∈ β\nh✝ : { val := val✝, property := ha } ∈ γ\nright✝ : a✝ ∈ (fun h => (fun a => pure (CoeT.coe a)) { val := val✝, property := ha }) h✝\n⊢ a✝ ∈ β\n[PROOFSTEP]\nconvert ha\n[GOAL]\nα β✝ : Type u\ns : Set α\nf : α → Set β✝\ng : Set (α → β✝)\nβ : Set α\nγ : Set ↑β\na : α\nha : a ∈ Lean.Internal.coeM γ\n⊢ { val := a, property := (_ : a ∈ β) } ∈ γ\n[PROOFSTEP]\nrcases ha with ⟨_, ⟨_, rfl⟩, _, ⟨ha, rfl⟩, _⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nα β✝ : Type u\ns : Set α\nf : α → Set β✝\ng : Set (α → β✝)\nβ : Set α\nγ : Set ↑β\na : α\nw✝ : ↑β\nha : w✝ ∈ γ\nright✝ : a ∈ (fun h => (fun a => pure (CoeT.coe a)) w✝) ha\n⊢ { val := a, property := (_ : a ∈ β) } ∈ γ\n[PROOFSTEP]\nconvert ha\n", "meta": {"mathlib_filename": "Mathlib.Data.Set.Functor", "llama_tokens": 1008, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES\n\n", "lm_q1_score": 0.8056321796478255, "lm_q2_score": 0.6334102636778401, "lm_q1q2_score": 0.5102956913380823}}
{"text": "[GOAL]\np n : ℕ\nhp : Nat.Prime p\nhdiv : ¬p ∣ n\nR : Type u_1\ninst✝ : CommRing R\n⊢ ↑(expand R p) (cyclotomic n R) = cyclotomic (n * p) R * cyclotomic n R\n[PROOFSTEP]\nrcases Nat.eq_zero_or_pos n with (rfl | hnpos)\n[GOAL]\ncase inl\np : ℕ\nhp : Nat.Prime p\nR : Type u_1\ninst✝ : CommRing R\nhdiv : ¬p ∣ 0\n⊢ ↑(expand R p) (cyclotomic 0 R) = cyclotomic (0 * p) R * cyclotomic 0 R\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\np n : ℕ\nhp : Nat.Prime p\nhdiv : ¬p ∣ n\nR : Type u_1\ninst✝ : CommRing R\nhnpos : n > 0\n⊢ ↑(expand R p) (cyclotomic n R) = cyclotomic (n * p) R * cyclotomic n R\n[PROOFSTEP]\nhaveI := NeZero.of_pos hnpos\n[GOAL]\ncase inr\np n : ℕ\nhp : Nat.Prime p\nhdiv : ¬p ∣ n\nR : Type u_1\ninst✝ : CommRing R\nhnpos : n > 0\nthis : NeZero n\n⊢ ↑(expand R p) (cyclotomic n R) = cyclotomic (n * p) R * cyclotomic n R\n[PROOFSTEP]\nsuffices expand ℤ p (cyclotomic n ℤ) = cyclotomic (n * p) ℤ * cyclotomic n ℤ by\n  rw [← map_cyclotomic_int, ← map_expand, this, Polynomial.map_mul, map_cyclotomic_int, map_cyclotomic]\n[GOAL]\np n : ℕ\nhp : Nat.Prime p\nhdiv : ¬p ∣ n\nR : Type u_1\ninst✝ : CommRing R\nhnpos : n > 0\nthis✝ : NeZero n\nthis : ↑(expand ℤ p) (cyclotomic n ℤ) = cyclotomic (n * p) ℤ * cyclotomic n ℤ\n⊢ ↑(expand R p) (cyclotomic n R) = cyclotomic (n * p) R * cyclotomic n R\n[PROOFSTEP]\nrw [← map_cyclotomic_int, ← map_expand, this, Polynomial.map_mul, map_cyclotomic_int, map_cyclotomic]\n[GOAL]\ncase inr\np n : ℕ\nhp : Nat.Prime p\nhdiv : ¬p ∣ n\nR : Type u_1\ninst✝ : CommRing R\nhnpos : n > 0\nthis : NeZero n\n⊢ ↑(expand ℤ p) (cyclotomic n ℤ) = cyclotomic (n * p) ℤ * cyclotomic n ℤ\n[PROOFSTEP]\nrefine'\n  eq_of_monic_of_dvd_of_natDegree_le ((cyclotomic.monic _ ℤ).mul (cyclotomic.monic _ _))\n    ((cyclotomic.monic n ℤ).expand hp.pos) _ _\n[GOAL]\ncase inr.refine'_1\np n : ℕ\nhp : Nat.Prime p\nhdiv : ¬p ∣ n\nR : Type u_1\ninst✝ : CommRing R\nhnpos : n > 0\nthis : NeZero n\n⊢ cyclotomic (n * p) ℤ * cyclotomic n ℤ ∣ ↑(expand ℤ p) (cyclotomic n ℤ)\n[PROOFSTEP]\nrefine'\n  (IsPrimitive.Int.dvd_iff_map_cast_dvd_map_cast _ _\n        (IsPrimitive.mul (cyclotomic.isPrimitive (n * p) ℤ) (cyclotomic.isPrimitive n ℤ))\n        ((cyclotomic.monic n ℤ).expand hp.pos).isPrimitive).2\n    _\n[GOAL]\ncase inr.refine'_1\np n : ℕ\nhp : Nat.Prime p\nhdiv : ¬p ∣ n\nR : Type u_1\ninst✝ : CommRing R\nhnpos : n > 0\nthis : NeZero n\n⊢ map (Int.castRingHom ℚ) (cyclotomic (n * p) ℤ * cyclotomic n ℤ) ∣\n    map (Int.castRingHom ℚ) (↑(expand ℤ p) (cyclotomic n ℤ))\n[PROOFSTEP]\nrw [Polynomial.map_mul, map_cyclotomic_int, map_cyclotomic_int, map_expand, map_cyclotomic_int]\n[GOAL]\ncase inr.refine'_1\np n : ℕ\nhp : Nat.Prime p\nhdiv : ¬p ∣ n\nR : Type u_1\ninst✝ : CommRing R\nhnpos : n > 0\nthis : NeZero n\n⊢ cyclotomic (n * p) ℚ * cyclotomic n ℚ ∣ ↑(expand ℚ p) (cyclotomic n ℚ)\n[PROOFSTEP]\nrefine' IsCoprime.mul_dvd (cyclotomic.isCoprime_rat fun h => _) _ _\n[GOAL]\ncase inr.refine'_1.refine'_1\np n : ℕ\nhp : Nat.Prime p\nhdiv : ¬p ∣ n\nR : Type u_1\ninst✝ : CommRing R\nhnpos : n > 0\nthis : NeZero n\nh : n * p = n\n⊢ False\n[PROOFSTEP]\nreplace h : n * p = n * 1 := by simp [h]\n[GOAL]\np n : ℕ\nhp : Nat.Prime p\nhdiv : ¬p ∣ n\nR : Type u_1\ninst✝ : CommRing R\nhnpos : n > 0\nthis : NeZero n\nh : n * p = n\n⊢ n * p = n * 1\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase inr.refine'_1.refine'_1\np n : ℕ\nhp : Nat.Prime p\nhdiv : ¬p ∣ n\nR : Type u_1\ninst✝ : CommRing R\nhnpos : n > 0\nthis : NeZero n\nh : n * p = n * 1\n⊢ False\n[PROOFSTEP]\nexact Nat.Prime.ne_one hp (mul_left_cancel₀ hnpos.ne' h)\n[GOAL]\ncase inr.refine'_1.refine'_2\np n : ℕ\nhp : Nat.Prime p\nhdiv : ¬p ∣ n\nR : Type u_1\ninst✝ : CommRing R\nhnpos : n > 0\nthis : NeZero n\n⊢ cyclotomic (n * p) ℚ ∣ ↑(expand ℚ p) (cyclotomic n ℚ)\n[PROOFSTEP]\nhave hpos : 0 < n * p := mul_pos hnpos hp.pos\n[GOAL]\ncase inr.refine'_1.refine'_2\np n : ℕ\nhp : Nat.Prime p\nhdiv : ¬p ∣ n\nR : Type u_1\ninst✝ : CommRing R\nhnpos : n > 0\nthis : NeZero n\nhpos : 0 < n * p\n⊢ cyclotomic (n * p) ℚ ∣ ↑(expand ℚ p) (cyclotomic n ℚ)\n[PROOFSTEP]\nhave hprim := Complex.isPrimitiveRoot_exp _ hpos.ne'\n[GOAL]\ncase inr.refine'_1.refine'_2\np n : ℕ\nhp : Nat.Prime p\nhdiv : ¬p ∣ n\nR : Type u_1\ninst✝ : CommRing R\nhnpos : n > 0\nthis : NeZero n\nhpos : 0 < n * p\nhprim : IsPrimitiveRoot (Complex.exp (2 * ↑Real.pi * Complex.I / ↑(n * p))) (n * p)\n⊢ cyclotomic (n * p) ℚ ∣ ↑(expand ℚ p) (cyclotomic n ℚ)\n[PROOFSTEP]\nrw [cyclotomic_eq_minpoly_rat hprim hpos]\n[GOAL]\ncase inr.refine'_1.refine'_2\np n : ℕ\nhp : Nat.Prime p\nhdiv : ¬p ∣ n\nR : Type u_1\ninst✝ : CommRing R\nhnpos : n > 0\nthis : NeZero n\nhpos : 0 < n * p\nhprim : IsPrimitiveRoot (Complex.exp (2 * ↑Real.pi * Complex.I / ↑(n * p))) (n * p)\n⊢ minpoly ℚ (Complex.exp (2 * ↑Real.pi * Complex.I / ↑(n * p))) ∣ ↑(expand ℚ p) (cyclotomic n ℚ)\n[PROOFSTEP]\nrefine' @minpoly.dvd ℚ ℂ _ _ algebraRat _ _ _\n[GOAL]\ncase inr.refine'_1.refine'_2\np n : ℕ\nhp : Nat.Prime p\nhdiv : ¬p ∣ n\nR : Type u_1\ninst✝ : CommRing R\nhnpos : n > 0\nthis : NeZero n\nhpos : 0 < n * p\nhprim : IsPrimitiveRoot (Complex.exp (2 * ↑Real.pi * Complex.I / ↑(n * p))) (n * p)\n⊢ ↑(aeval (Complex.exp (2 * ↑Real.pi * Complex.I / ↑(n * p)))) (↑(expand ℚ p) (cyclotomic n ℚ)) = 0\n[PROOFSTEP]\nrw [aeval_def, ← eval_map, map_expand, map_cyclotomic, expand_eval, ← IsRoot.def, @isRoot_cyclotomic_iff]\n[GOAL]\ncase inr.refine'_1.refine'_2\np n : ℕ\nhp : Nat.Prime p\nhdiv : ¬p ∣ n\nR : Type u_1\ninst✝ : CommRing R\nhnpos : n > 0\nthis : NeZero n\nhpos : 0 < n * p\nhprim : IsPrimitiveRoot (Complex.exp (2 * ↑Real.pi * Complex.I / ↑(n * p))) (n * p)\n⊢ IsPrimitiveRoot (Complex.exp (2 * ↑Real.pi * Complex.I / ↑(n * p)) ^ p) n\n[PROOFSTEP]\nconvert IsPrimitiveRoot.pow_of_dvd hprim hp.ne_zero (dvd_mul_left p n)\n[GOAL]\ncase h.e'_4\np n : ℕ\nhp : Nat.Prime p\nhdiv : ¬p ∣ n\nR : Type u_1\ninst✝ : CommRing R\nhnpos : n > 0\nthis : NeZero n\nhpos : 0 < n * p\nhprim : IsPrimitiveRoot (Complex.exp (2 * ↑Real.pi * Complex.I / ↑(n * p))) (n * p)\n⊢ n = n * p / p\n[PROOFSTEP]\nrw [Nat.mul_div_cancel _ (Nat.Prime.pos hp)]\n[GOAL]\ncase inr.refine'_1.refine'_3\np n : ℕ\nhp : Nat.Prime p\nhdiv : ¬p ∣ n\nR : Type u_1\ninst✝ : CommRing R\nhnpos : n > 0\nthis : NeZero n\n⊢ cyclotomic n ℚ ∣ ↑(expand ℚ p) (cyclotomic n ℚ)\n[PROOFSTEP]\nhave hprim := Complex.isPrimitiveRoot_exp _ hnpos.ne.symm\n[GOAL]\ncase inr.refine'_1.refine'_3\np n : ℕ\nhp : Nat.Prime p\nhdiv : ¬p ∣ n\nR : Type u_1\ninst✝ : CommRing R\nhnpos : n > 0\nthis : NeZero n\nhprim : IsPrimitiveRoot (Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)) n\n⊢ cyclotomic n ℚ ∣ ↑(expand ℚ p) (cyclotomic n ℚ)\n[PROOFSTEP]\nrw [cyclotomic_eq_minpoly_rat hprim hnpos]\n[GOAL]\ncase inr.refine'_1.refine'_3\np n : ℕ\nhp : Nat.Prime p\nhdiv : ¬p ∣ n\nR : Type u_1\ninst✝ : CommRing R\nhnpos : n > 0\nthis : NeZero n\nhprim : IsPrimitiveRoot (Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)) n\n⊢ minpoly ℚ (Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)) ∣\n    ↑(expand ℚ p) (minpoly ℚ (Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)))\n[PROOFSTEP]\nrefine' @minpoly.dvd ℚ ℂ _ _ algebraRat _ _ _\n[GOAL]\ncase inr.refine'_1.refine'_3\np n : ℕ\nhp : Nat.Prime p\nhdiv : ¬p ∣ n\nR : Type u_1\ninst✝ : CommRing R\nhnpos : n > 0\nthis : NeZero n\nhprim : IsPrimitiveRoot (Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)) n\n⊢ ↑(aeval (Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)))\n      (↑(expand ℚ p) (minpoly ℚ (Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)))) =\n    0\n[PROOFSTEP]\nrw [aeval_def, ← eval_map, map_expand, expand_eval, ← IsRoot.def, ← cyclotomic_eq_minpoly_rat hprim hnpos,\n  map_cyclotomic, @isRoot_cyclotomic_iff]\n[GOAL]\ncase inr.refine'_1.refine'_3\np n : ℕ\nhp : Nat.Prime p\nhdiv : ¬p ∣ n\nR : Type u_1\ninst✝ : CommRing R\nhnpos : n > 0\nthis : NeZero n\nhprim : IsPrimitiveRoot (Complex.exp (2 * ↑Real.pi * Complex.I / ↑n)) n\n⊢ IsPrimitiveRoot (Complex.exp (2 * ↑Real.pi * Complex.I / ↑n) ^ p) n\n[PROOFSTEP]\nexact IsPrimitiveRoot.pow_of_prime hprim hp hdiv\n[GOAL]\ncase inr.refine'_2\np n : ℕ\nhp : Nat.Prime p\nhdiv : ¬p ∣ n\nR : Type u_1\ninst✝ : CommRing R\nhnpos : n > 0\nthis : NeZero n\n⊢ natDegree (↑(expand ℤ p) (cyclotomic n ℤ)) ≤ natDegree (cyclotomic (n * p) ℤ * cyclotomic n ℤ)\n[PROOFSTEP]\nrw [natDegree_expand, natDegree_cyclotomic, natDegree_mul (cyclotomic_ne_zero _ ℤ) (cyclotomic_ne_zero _ ℤ),\n  natDegree_cyclotomic, natDegree_cyclotomic, mul_comm n, Nat.totient_mul ((Nat.Prime.coprime_iff_not_dvd hp).2 hdiv),\n  Nat.totient_prime hp, mul_comm (p - 1), ← Nat.mul_succ, Nat.sub_one, Nat.succ_pred_eq_of_pos hp.pos]\n[GOAL]\np n : ℕ\nhp : Nat.Prime p\nhdiv : p ∣ n\nR : Type u_1\ninst✝ : CommRing R\n⊢ ↑(expand R p) (cyclotomic n R) = cyclotomic (n * p) R\n[PROOFSTEP]\nrcases n.eq_zero_or_pos with (rfl | hzero)\n[GOAL]\ncase inl\np : ℕ\nhp : Nat.Prime p\nR : Type u_1\ninst✝ : CommRing R\nhdiv : p ∣ 0\n⊢ ↑(expand R p) (cyclotomic 0 R) = cyclotomic (0 * p) R\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\np n : ℕ\nhp : Nat.Prime p\nhdiv : p ∣ n\nR : Type u_1\ninst✝ : CommRing R\nhzero : n > 0\n⊢ ↑(expand R p) (cyclotomic n R) = cyclotomic (n * p) R\n[PROOFSTEP]\nhaveI := NeZero.of_pos hzero\n[GOAL]\ncase inr\np n : ℕ\nhp : Nat.Prime p\nhdiv : p ∣ n\nR : Type u_1\ninst✝ : CommRing R\nhzero : n > 0\nthis : NeZero n\n⊢ ↑(expand R p) (cyclotomic n R) = cyclotomic (n * p) R\n[PROOFSTEP]\nsuffices expand ℤ p (cyclotomic n ℤ) = cyclotomic (n * p) ℤ by\n  rw [← map_cyclotomic_int, ← map_expand, this, map_cyclotomic_int, map_cyclotomic]\n[GOAL]\np n : ℕ\nhp : Nat.Prime p\nhdiv : p ∣ n\nR : Type u_1\ninst✝ : CommRing R\nhzero : n > 0\nthis✝ : NeZero n\nthis : ↑(expand ℤ p) (cyclotomic n ℤ) = cyclotomic (n * p) ℤ\n⊢ ↑(expand R p) (cyclotomic n R) = cyclotomic (n * p) R\n[PROOFSTEP]\nrw [← map_cyclotomic_int, ← map_expand, this, map_cyclotomic_int, map_cyclotomic]\n[GOAL]\ncase inr\np n : ℕ\nhp : Nat.Prime p\nhdiv : p ∣ n\nR : Type u_1\ninst✝ : CommRing R\nhzero : n > 0\nthis : NeZero n\n⊢ ↑(expand ℤ p) (cyclotomic n ℤ) = cyclotomic (n * p) ℤ\n[PROOFSTEP]\nrefine' eq_of_monic_of_dvd_of_natDegree_le (cyclotomic.monic _ _) ((cyclotomic.monic n ℤ).expand hp.pos) _ _\n[GOAL]\ncase inr.refine'_1\np n : ℕ\nhp : Nat.Prime p\nhdiv : p ∣ n\nR : Type u_1\ninst✝ : CommRing R\nhzero : n > 0\nthis : NeZero n\n⊢ cyclotomic (n * p) ℤ ∣ ↑(expand ℤ p) (cyclotomic n ℤ)\n[PROOFSTEP]\nhave hpos := Nat.mul_pos hzero hp.pos\n[GOAL]\ncase inr.refine'_1\np n : ℕ\nhp : Nat.Prime p\nhdiv : p ∣ n\nR : Type u_1\ninst✝ : CommRing R\nhzero : n > 0\nthis : NeZero n\nhpos : n * p > 0\n⊢ cyclotomic (n * p) ℤ ∣ ↑(expand ℤ p) (cyclotomic n ℤ)\n[PROOFSTEP]\nhave hprim := Complex.isPrimitiveRoot_exp _ hpos.ne.symm\n[GOAL]\ncase inr.refine'_1\np n : ℕ\nhp : Nat.Prime p\nhdiv : p ∣ n\nR : Type u_1\ninst✝ : CommRing R\nhzero : n > 0\nthis : NeZero n\nhpos : n * p > 0\nhprim : IsPrimitiveRoot (Complex.exp (2 * ↑Real.pi * Complex.I / ↑(n * p))) (n * p)\n⊢ cyclotomic (n * p) ℤ ∣ ↑(expand ℤ p) (cyclotomic n ℤ)\n[PROOFSTEP]\nrw [cyclotomic_eq_minpoly hprim hpos]\n[GOAL]\ncase inr.refine'_1\np n : ℕ\nhp : Nat.Prime p\nhdiv : p ∣ n\nR : Type u_1\ninst✝ : CommRing R\nhzero : n > 0\nthis : NeZero n\nhpos : n * p > 0\nhprim : IsPrimitiveRoot (Complex.exp (2 * ↑Real.pi * Complex.I / ↑(n * p))) (n * p)\n⊢ minpoly ℤ (Complex.exp (2 * ↑Real.pi * Complex.I / ↑(n * p))) ∣ ↑(expand ℤ p) (cyclotomic n ℤ)\n[PROOFSTEP]\nrefine' minpoly.isIntegrallyClosed_dvd (hprim.isIntegral hpos) _\n[GOAL]\ncase inr.refine'_1\np n : ℕ\nhp : Nat.Prime p\nhdiv : p ∣ n\nR : Type u_1\ninst✝ : CommRing R\nhzero : n > 0\nthis : NeZero n\nhpos : n * p > 0\nhprim : IsPrimitiveRoot (Complex.exp (2 * ↑Real.pi * Complex.I / ↑(n * p))) (n * p)\n⊢ ↑(aeval (Complex.exp (2 * ↑Real.pi * Complex.I / ↑(n * p)))) (↑(expand ℤ p) (cyclotomic n ℤ)) = 0\n[PROOFSTEP]\nrw [aeval_def, ← eval_map, map_expand, map_cyclotomic, expand_eval, ← IsRoot.def, @isRoot_cyclotomic_iff]\n[GOAL]\ncase inr.refine'_1\np n : ℕ\nhp : Nat.Prime p\nhdiv : p ∣ n\nR : Type u_1\ninst✝ : CommRing R\nhzero : n > 0\nthis : NeZero n\nhpos : n * p > 0\nhprim : IsPrimitiveRoot (Complex.exp (2 * ↑Real.pi * Complex.I / ↑(n * p))) (n * p)\n⊢ IsPrimitiveRoot (Complex.exp (2 * ↑Real.pi * Complex.I / ↑(n * p)) ^ p) n\n[PROOFSTEP]\nconvert IsPrimitiveRoot.pow_of_dvd hprim hp.ne_zero (dvd_mul_left p n)\n[GOAL]\ncase h.e'_4\np n : ℕ\nhp : Nat.Prime p\nhdiv : p ∣ n\nR : Type u_1\ninst✝ : CommRing R\nhzero : n > 0\nthis : NeZero n\nhpos : n * p > 0\nhprim : IsPrimitiveRoot (Complex.exp (2 * ↑Real.pi * Complex.I / ↑(n * p))) (n * p)\n⊢ n = n * p / p\n[PROOFSTEP]\nrw [Nat.mul_div_cancel _ hp.pos]\n[GOAL]\ncase inr.refine'_2\np n : ℕ\nhp : Nat.Prime p\nhdiv : p ∣ n\nR : Type u_1\ninst✝ : CommRing R\nhzero : n > 0\nthis : NeZero n\n⊢ natDegree (↑(expand ℤ p) (cyclotomic n ℤ)) ≤ natDegree (cyclotomic (n * p) ℤ)\n[PROOFSTEP]\nrw [natDegree_expand, natDegree_cyclotomic, natDegree_cyclotomic, mul_comm n, Nat.totient_mul_of_prime_of_dvd hp hdiv,\n  mul_comm]\n[GOAL]\np : ℕ\nhp : Nat.Prime p\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nn m : ℕ\nhmn : m ≤ n\nh : Irreducible (cyclotomic (p ^ n) R)\n⊢ Irreducible (cyclotomic (p ^ m) R)\n[PROOFSTEP]\nrcases m.eq_zero_or_pos with (rfl | hm)\n[GOAL]\ncase inl\np : ℕ\nhp : Nat.Prime p\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nn : ℕ\nh : Irreducible (cyclotomic (p ^ n) R)\nhmn : 0 ≤ n\n⊢ Irreducible (cyclotomic (p ^ 0) R)\n[PROOFSTEP]\nsimpa using irreducible_X_sub_C (1 : R)\n[GOAL]\ncase inr\np : ℕ\nhp : Nat.Prime p\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nn m : ℕ\nhmn : m ≤ n\nh : Irreducible (cyclotomic (p ^ n) R)\nhm : m > 0\n⊢ Irreducible (cyclotomic (p ^ m) R)\n[PROOFSTEP]\nobtain ⟨k, rfl⟩ := Nat.exists_eq_add_of_le hmn\n[GOAL]\ncase inr.intro\np : ℕ\nhp : Nat.Prime p\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nm : ℕ\nhm : m > 0\nk : ℕ\nhmn : m ≤ m + k\nh : Irreducible (cyclotomic (p ^ (m + k)) R)\n⊢ Irreducible (cyclotomic (p ^ m) R)\n[PROOFSTEP]\ninduction' k with k hk\n[GOAL]\ncase inr.intro.zero\np : ℕ\nhp : Nat.Prime p\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nm : ℕ\nhm : m > 0\nk : ℕ\nhmn✝ : m ≤ m + k\nh✝ : Irreducible (cyclotomic (p ^ (m + k)) R)\nhmn : m ≤ m + Nat.zero\nh : Irreducible (cyclotomic (p ^ (m + Nat.zero)) R)\n⊢ Irreducible (cyclotomic (p ^ m) R)\n[PROOFSTEP]\nsimpa using h\n[GOAL]\ncase inr.intro.succ\np : ℕ\nhp : Nat.Prime p\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nm : ℕ\nhm : m > 0\nk✝ : ℕ\nhmn✝ : m ≤ m + k✝\nh✝ : Irreducible (cyclotomic (p ^ (m + k✝)) R)\nk : ℕ\nhk : m ≤ m + k → Irreducible (cyclotomic (p ^ (m + k)) R) → Irreducible (cyclotomic (p ^ m) R)\nhmn : m ≤ m + Nat.succ k\nh : Irreducible (cyclotomic (p ^ (m + Nat.succ k)) R)\n⊢ Irreducible (cyclotomic (p ^ m) R)\n[PROOFSTEP]\nhave : m + k ≠ 0 := (add_pos_of_pos_of_nonneg hm k.zero_le).ne'\n[GOAL]\ncase inr.intro.succ\np : ℕ\nhp : Nat.Prime p\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nm : ℕ\nhm : m > 0\nk✝ : ℕ\nhmn✝ : m ≤ m + k✝\nh✝ : Irreducible (cyclotomic (p ^ (m + k✝)) R)\nk : ℕ\nhk : m ≤ m + k → Irreducible (cyclotomic (p ^ (m + k)) R) → Irreducible (cyclotomic (p ^ m) R)\nhmn : m ≤ m + Nat.succ k\nh : Irreducible (cyclotomic (p ^ (m + Nat.succ k)) R)\nthis : m + k ≠ 0\n⊢ Irreducible (cyclotomic (p ^ m) R)\n[PROOFSTEP]\nrw [Nat.add_succ, pow_succ', ← cyclotomic_expand_eq_cyclotomic hp <| dvd_pow_self p this] at h \n[GOAL]\ncase inr.intro.succ\np : ℕ\nhp : Nat.Prime p\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nm : ℕ\nhm : m > 0\nk✝ : ℕ\nhmn✝ : m ≤ m + k✝\nh✝ : Irreducible (cyclotomic (p ^ (m + k✝)) R)\nk : ℕ\nhk : m ≤ m + k → Irreducible (cyclotomic (p ^ (m + k)) R) → Irreducible (cyclotomic (p ^ m) R)\nhmn : m ≤ m + Nat.succ k\nh : Irreducible (↑(expand R p) (cyclotomic (p ^ (m + k)) R))\nthis : m + k ≠ 0\n⊢ Irreducible (cyclotomic (p ^ m) R)\n[PROOFSTEP]\nexact hk (by linarith) (of_irreducible_expand hp.ne_zero h)\n[GOAL]\np : ℕ\nhp : Nat.Prime p\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nm : ℕ\nhm : m > 0\nk✝ : ℕ\nhmn✝ : m ≤ m + k✝\nh✝ : Irreducible (cyclotomic (p ^ (m + k✝)) R)\nk : ℕ\nhk : m ≤ m + k → Irreducible (cyclotomic (p ^ (m + k)) R) → Irreducible (cyclotomic (p ^ m) R)\nhmn : m ≤ m + Nat.succ k\nh : Irreducible (↑(expand R p) (cyclotomic (p ^ (m + k)) R))\nthis : m + k ≠ 0\n⊢ m ≤ m + k\n[PROOFSTEP]\nlinarith\n[GOAL]\nR : Type u_1\np n : ℕ\nhp : Fact (Nat.Prime p)\ninst✝¹ : Ring R\ninst✝ : CharP R p\nhn : ¬p ∣ n\n⊢ cyclotomic (n * p) R = cyclotomic n R ^ (p - 1)\n[PROOFSTEP]\nletI : Algebra (ZMod p) R := ZMod.algebra _ _\n[GOAL]\nR : Type u_1\np n : ℕ\nhp : Fact (Nat.Prime p)\ninst✝¹ : Ring R\ninst✝ : CharP R p\nhn : ¬p ∣ n\nthis : Algebra (ZMod p) R := ZMod.algebra R p\n⊢ cyclotomic (n * p) R = cyclotomic n R ^ (p - 1)\n[PROOFSTEP]\nsuffices cyclotomic (n * p) (ZMod p) = cyclotomic n (ZMod p) ^ (p - 1) by\n  rw [← map_cyclotomic _ (algebraMap (ZMod p) R), ← map_cyclotomic _ (algebraMap (ZMod p) R), this, Polynomial.map_pow]\n[GOAL]\nR : Type u_1\np n : ℕ\nhp : Fact (Nat.Prime p)\ninst✝¹ : Ring R\ninst✝ : CharP R p\nhn : ¬p ∣ n\nthis✝ : Algebra (ZMod p) R := ZMod.algebra R p\nthis : cyclotomic (n * p) (ZMod p) = cyclotomic n (ZMod p) ^ (p - 1)\n⊢ cyclotomic (n * p) R = cyclotomic n R ^ (p - 1)\n[PROOFSTEP]\nrw [← map_cyclotomic _ (algebraMap (ZMod p) R), ← map_cyclotomic _ (algebraMap (ZMod p) R), this, Polynomial.map_pow]\n[GOAL]\nR : Type u_1\np n : ℕ\nhp : Fact (Nat.Prime p)\ninst✝¹ : Ring R\ninst✝ : CharP R p\nhn : ¬p ∣ n\nthis : Algebra (ZMod p) R := ZMod.algebra R p\n⊢ cyclotomic (n * p) (ZMod p) = cyclotomic n (ZMod p) ^ (p - 1)\n[PROOFSTEP]\napply mul_right_injective₀ (cyclotomic_ne_zero n <| ZMod p)\n[GOAL]\ncase a\nR : Type u_1\np n : ℕ\nhp : Fact (Nat.Prime p)\ninst✝¹ : Ring R\ninst✝ : CharP R p\nhn : ¬p ∣ n\nthis : Algebra (ZMod p) R := ZMod.algebra R p\n⊢ (fun x x_1 => x * x_1) (cyclotomic n (ZMod p)) (cyclotomic (n * p) (ZMod p)) =\n    (fun x x_1 => x * x_1) (cyclotomic n (ZMod p)) (cyclotomic n (ZMod p) ^ (p - 1))\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase a\nR : Type u_1\np n : ℕ\nhp : Fact (Nat.Prime p)\ninst✝¹ : Ring R\ninst✝ : CharP R p\nhn : ¬p ∣ n\nthis : Algebra (ZMod p) R := ZMod.algebra R p\n⊢ cyclotomic n (ZMod p) * cyclotomic (n * p) (ZMod p) = cyclotomic n (ZMod p) * cyclotomic n (ZMod p) ^ (p - 1)\n[PROOFSTEP]\nrw [← pow_succ, tsub_add_cancel_of_le hp.out.one_lt.le, mul_comm, ← ZMod.expand_card]\n[GOAL]\ncase a\nR : Type u_1\np n : ℕ\nhp : Fact (Nat.Prime p)\ninst✝¹ : Ring R\ninst✝ : CharP R p\nhn : ¬p ∣ n\nthis : Algebra (ZMod p) R := ZMod.algebra R p\n⊢ cyclotomic (n * p) (ZMod p) * cyclotomic n (ZMod p) = ↑(expand (ZMod p) p) (cyclotomic n (ZMod p))\n[PROOFSTEP]\nconv_rhs => rw [← map_cyclotomic_int]\n[GOAL]\nR : Type u_1\np n : ℕ\nhp : Fact (Nat.Prime p)\ninst✝¹ : Ring R\ninst✝ : CharP R p\nhn : ¬p ∣ n\nthis : Algebra (ZMod p) R := ZMod.algebra R p\n| ↑(expand (ZMod p) p) (cyclotomic n (ZMod p))\n[PROOFSTEP]\nrw [← map_cyclotomic_int]\n[GOAL]\nR : Type u_1\np n : ℕ\nhp : Fact (Nat.Prime p)\ninst✝¹ : Ring R\ninst✝ : CharP R p\nhn : ¬p ∣ n\nthis : Algebra (ZMod p) R := ZMod.algebra R p\n| ↑(expand (ZMod p) p) (cyclotomic n (ZMod p))\n[PROOFSTEP]\nrw [← map_cyclotomic_int]\n[GOAL]\nR : Type u_1\np n : ℕ\nhp : Fact (Nat.Prime p)\ninst✝¹ : Ring R\ninst✝ : CharP R p\nhn : ¬p ∣ n\nthis : Algebra (ZMod p) R := ZMod.algebra R p\n| ↑(expand (ZMod p) p) (cyclotomic n (ZMod p))\n[PROOFSTEP]\nrw [← map_cyclotomic_int]\n[GOAL]\ncase a\nR : Type u_1\np n : ℕ\nhp : Fact (Nat.Prime p)\ninst✝¹ : Ring R\ninst✝ : CharP R p\nhn : ¬p ∣ n\nthis : Algebra (ZMod p) R := ZMod.algebra R p\n⊢ cyclotomic (n * p) (ZMod p) * cyclotomic n (ZMod p) =\n    ↑(expand (ZMod p) p) (map (Int.castRingHom (ZMod p)) (cyclotomic n ℤ))\n[PROOFSTEP]\nrw [← map_expand, cyclotomic_expand_eq_cyclotomic_mul hp.out hn, Polynomial.map_mul, map_cyclotomic, map_cyclotomic]\n[GOAL]\nR : Type u_1\np n : ℕ\nhp : Fact (Nat.Prime p)\ninst✝¹ : Ring R\ninst✝ : CharP R p\nhn : p ∣ n\n⊢ cyclotomic (n * p) R = cyclotomic n R ^ p\n[PROOFSTEP]\nletI : Algebra (ZMod p) R := ZMod.algebra _ _\n[GOAL]\nR : Type u_1\np n : ℕ\nhp : Fact (Nat.Prime p)\ninst✝¹ : Ring R\ninst✝ : CharP R p\nhn : p ∣ n\nthis : Algebra (ZMod p) R := ZMod.algebra R p\n⊢ cyclotomic (n * p) R = cyclotomic n R ^ p\n[PROOFSTEP]\nsuffices cyclotomic (n * p) (ZMod p) = cyclotomic n (ZMod p) ^ p by\n  rw [← map_cyclotomic _ (algebraMap (ZMod p) R), ← map_cyclotomic _ (algebraMap (ZMod p) R), this, Polynomial.map_pow]\n[GOAL]\nR : Type u_1\np n : ℕ\nhp : Fact (Nat.Prime p)\ninst✝¹ : Ring R\ninst✝ : CharP R p\nhn : p ∣ n\nthis✝ : Algebra (ZMod p) R := ZMod.algebra R p\nthis : cyclotomic (n * p) (ZMod p) = cyclotomic n (ZMod p) ^ p\n⊢ cyclotomic (n * p) R = cyclotomic n R ^ p\n[PROOFSTEP]\nrw [← map_cyclotomic _ (algebraMap (ZMod p) R), ← map_cyclotomic _ (algebraMap (ZMod p) R), this, Polynomial.map_pow]\n[GOAL]\nR : Type u_1\np n : ℕ\nhp : Fact (Nat.Prime p)\ninst✝¹ : Ring R\ninst✝ : CharP R p\nhn : p ∣ n\nthis : Algebra (ZMod p) R := ZMod.algebra R p\n⊢ cyclotomic (n * p) (ZMod p) = cyclotomic n (ZMod p) ^ p\n[PROOFSTEP]\nrw [← ZMod.expand_card, ← map_cyclotomic_int n, ← map_expand, cyclotomic_expand_eq_cyclotomic hp.out hn, map_cyclotomic,\n  mul_comm]\n[GOAL]\nR : Type u_1\np m : ℕ\ninst✝² : Fact (Nat.Prime p)\ninst✝¹ : Ring R\ninst✝ : CharP R p\nhm : ¬p ∣ m\nx✝ : 0 < 1\n⊢ cyclotomic (p ^ 1 * m) R = cyclotomic m R ^ (p ^ 1 - p ^ (1 - 1))\n[PROOFSTEP]\nrw [pow_one, Nat.sub_self, pow_zero, mul_comm, cyclotomic_mul_prime_eq_pow_of_not_dvd R hm]\n[GOAL]\nR : Type u_1\np m : ℕ\ninst✝² : Fact (Nat.Prime p)\ninst✝¹ : Ring R\ninst✝ : CharP R p\nhm : ¬p ∣ m\na : ℕ\nx✝ : 0 < a + 2\n⊢ cyclotomic (p ^ (a + 2) * m) R = cyclotomic m R ^ (p ^ (a + 2) - p ^ (a + 2 - 1))\n[PROOFSTEP]\nhave hdiv : p ∣ p ^ a.succ * m := ⟨p ^ a * m, by rw [← mul_assoc, pow_succ]⟩\n[GOAL]\nR : Type u_1\np m : ℕ\ninst✝² : Fact (Nat.Prime p)\ninst✝¹ : Ring R\ninst✝ : CharP R p\nhm : ¬p ∣ m\na : ℕ\nx✝ : 0 < a + 2\n⊢ p ^ Nat.succ a * m = p * (p ^ a * m)\n[PROOFSTEP]\nrw [← mul_assoc, pow_succ]\n[GOAL]\nR : Type u_1\np m : ℕ\ninst✝² : Fact (Nat.Prime p)\ninst✝¹ : Ring R\ninst✝ : CharP R p\nhm : ¬p ∣ m\na : ℕ\nx✝ : 0 < a + 2\nhdiv : p ∣ p ^ Nat.succ a * m\n⊢ cyclotomic (p ^ (a + 2) * m) R = cyclotomic m R ^ (p ^ (a + 2) - p ^ (a + 2 - 1))\n[PROOFSTEP]\nrw [pow_succ, mul_assoc, mul_comm, cyclotomic_mul_prime_dvd_eq_pow R hdiv, cyclotomic_mul_prime_pow_eq _ _ a.succ_pos, ←\n  pow_mul]\n[GOAL]\nR : Type u_1\np m : ℕ\ninst✝² : Fact (Nat.Prime p)\ninst✝¹ : Ring R\ninst✝ : CharP R p\nhm : ¬p ∣ m\na : ℕ\nx✝ : 0 < a + 2\nhdiv : p ∣ p ^ Nat.succ a * m\n⊢ cyclotomic m R ^ ((p ^ Nat.succ a - p ^ (Nat.succ a - 1)) * p) = cyclotomic m R ^ (p * p ^ (a + 1) - p ^ (a + 2 - 1))\nR : Type u_1\np m : ℕ\ninst✝² : Fact (Nat.Prime p)\ninst✝¹ : Ring R\ninst✝ : CharP R p\nhm : ¬p ∣ m\na : ℕ\nx✝ : 0 < a + 2\nhdiv : p ∣ p ^ Nat.succ a * m\n⊢ ¬p ∣ m\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_a\nR : Type u_1\np m : ℕ\ninst✝² : Fact (Nat.Prime p)\ninst✝¹ : Ring R\ninst✝ : CharP R p\nhm : ¬p ∣ m\na : ℕ\nx✝ : 0 < a + 2\nhdiv : p ∣ p ^ Nat.succ a * m\n⊢ (p ^ Nat.succ a - p ^ (Nat.succ a - 1)) * p = p * p ^ (a + 1) - p ^ (a + 2 - 1)\nR : Type u_1\np m : ℕ\ninst✝² : Fact (Nat.Prime p)\ninst✝¹ : Ring R\ninst✝ : CharP R p\nhm : ¬p ∣ m\na : ℕ\nx✝ : 0 < a + 2\nhdiv : p ∣ p ^ Nat.succ a * m\n⊢ ¬p ∣ m\n[PROOFSTEP]\nsimp only [tsub_zero, Nat.succ_sub_succ_eq_sub]\n[GOAL]\ncase e_a\nR : Type u_1\np m : ℕ\ninst✝² : Fact (Nat.Prime p)\ninst✝¹ : Ring R\ninst✝ : CharP R p\nhm : ¬p ∣ m\na : ℕ\nx✝ : 0 < a + 2\nhdiv : p ∣ p ^ Nat.succ a * m\n⊢ (p ^ Nat.succ a - p ^ a) * p = p * p ^ (a + 1) - p ^ (a + 1)\nR : Type u_1\np m : ℕ\ninst✝² : Fact (Nat.Prime p)\ninst✝¹ : Ring R\ninst✝ : CharP R p\nhm : ¬p ∣ m\na : ℕ\nx✝ : 0 < a + 2\nhdiv : p ∣ p ^ Nat.succ a * m\n⊢ ¬p ∣ m\n[PROOFSTEP]\nrwa [Nat.mul_sub_right_distrib, mul_comm, pow_succ']\n[GOAL]\nm k p : ℕ\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\nhp : Fact (Nat.Prime p)\nhchar : CharP R p\nμ : R\ninst✝ : NeZero ↑m\n⊢ IsRoot (cyclotomic (p ^ k * m) R) μ ↔ IsPrimitiveRoot μ m\n[PROOFSTEP]\nrcases k.eq_zero_or_pos with (rfl | hk)\n[GOAL]\ncase inl\nm p : ℕ\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\nhp : Fact (Nat.Prime p)\nhchar : CharP R p\nμ : R\ninst✝ : NeZero ↑m\n⊢ IsRoot (cyclotomic (p ^ 0 * m) R) μ ↔ IsPrimitiveRoot μ m\n[PROOFSTEP]\nrw [pow_zero, one_mul, isRoot_cyclotomic_iff]\n[GOAL]\ncase inr\nm k p : ℕ\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\nhp : Fact (Nat.Prime p)\nhchar : CharP R p\nμ : R\ninst✝ : NeZero ↑m\nhk : k > 0\n⊢ IsRoot (cyclotomic (p ^ k * m) R) μ ↔ IsPrimitiveRoot μ m\n[PROOFSTEP]\nrefine' ⟨fun h => _, fun h => _⟩\n[GOAL]\ncase inr.refine'_1\nm k p : ℕ\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\nhp : Fact (Nat.Prime p)\nhchar : CharP R p\nμ : R\ninst✝ : NeZero ↑m\nhk : k > 0\nh : IsRoot (cyclotomic (p ^ k * m) R) μ\n⊢ IsPrimitiveRoot μ m\n[PROOFSTEP]\nrw [IsRoot.def, cyclotomic_mul_prime_pow_eq R (NeZero.not_char_dvd R p m) hk, eval_pow] at h \n[GOAL]\ncase inr.refine'_1\nm k p : ℕ\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\nhp : Fact (Nat.Prime p)\nhchar : CharP R p\nμ : R\ninst✝ : NeZero ↑m\nhk : k > 0\nh : eval μ (cyclotomic m R) ^ (p ^ k - p ^ (k - 1)) = 0\n⊢ IsPrimitiveRoot μ m\n[PROOFSTEP]\nreplace h := pow_eq_zero h\n[GOAL]\ncase inr.refine'_1\nm k p : ℕ\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\nhp : Fact (Nat.Prime p)\nhchar : CharP R p\nμ : R\ninst✝ : NeZero ↑m\nhk : k > 0\nh : eval μ (cyclotomic m R) = 0\n⊢ IsPrimitiveRoot μ m\n[PROOFSTEP]\nrwa [← IsRoot.def, isRoot_cyclotomic_iff] at h \n[GOAL]\ncase inr.refine'_2\nm k p : ℕ\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\nhp : Fact (Nat.Prime p)\nhchar : CharP R p\nμ : R\ninst✝ : NeZero ↑m\nhk : k > 0\nh : IsPrimitiveRoot μ m\n⊢ IsRoot (cyclotomic (p ^ k * m) R) μ\n[PROOFSTEP]\nrw [← isRoot_cyclotomic_iff, IsRoot.def] at h \n[GOAL]\ncase inr.refine'_2\nm k p : ℕ\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\nhp : Fact (Nat.Prime p)\nhchar : CharP R p\nμ : R\ninst✝ : NeZero ↑m\nhk : k > 0\nh : eval μ (cyclotomic m R) = 0\n⊢ IsRoot (cyclotomic (p ^ k * m) R) μ\n[PROOFSTEP]\nrw [cyclotomic_mul_prime_pow_eq R (NeZero.not_char_dvd R p m) hk, IsRoot.def, eval_pow, h, zero_pow]\n[GOAL]\ncase inr.refine'_2\nm k p : ℕ\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\nhp : Fact (Nat.Prime p)\nhchar : CharP R p\nμ : R\ninst✝ : NeZero ↑m\nhk : k > 0\nh : eval μ (cyclotomic m R) = 0\n⊢ 0 < p ^ k - p ^ (k - 1)\n[PROOFSTEP]\nsimp only [tsub_pos_iff_lt]\n[GOAL]\ncase inr.refine'_2\nm k p : ℕ\nR : Type u_1\ninst✝² : CommRing R\ninst✝¹ : IsDomain R\nhp : Fact (Nat.Prime p)\nhchar : CharP R p\nμ : R\ninst✝ : NeZero ↑m\nhk : k > 0\nh : eval μ (cyclotomic m R) = 0\n⊢ p ^ (k - 1) < p ^ k\n[PROOFSTEP]\napply pow_strictMono_right hp.out.one_lt (Nat.pred_lt hk.ne')\n", "meta": {"mathlib_filename": "Mathlib.RingTheory.Polynomial.Cyclotomic.Expand", "llama_tokens": 13294, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7549149758396752, "lm_q2_score": 0.6757646010190476, "lm_q1q2_score": 0.510144817451602}}
{"text": "[GOAL]\nα : Type u_1\nr : α → α → Prop\ninst✝³ : DecidableRel r\ninst✝² : IsTrans α r\ninst✝¹ : IsAntisymm α r\ninst✝ : IsTotal α r\ns : Multiset α\na : α\n⊢ a ∈ sort r s ↔ a ∈ s\n[PROOFSTEP]\nrw [← mem_coe, sort_eq]\n", "meta": {"mathlib_filename": "Mathlib.Data.Multiset.Sort", "llama_tokens": 112, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES\n\n", "lm_q1_score": 0.7745833737577159, "lm_q2_score": 0.658417487156366, "lm_q1q2_score": 0.5099992385426556}}
{"text": "[GOAL]\nι : Sort u_1\nα : ι → Sort u_2\nne : ∀ (i : ι), Nonempty (α i)\np : ι → Prop\nf : (i : Subtype p) → α i.val\n⊢ ∃ g, (fun i => g i.val) = f\n[PROOFSTEP]\nhaveI : DecidablePred p := fun i ↦ Classical.propDecidable (p i)\n[GOAL]\nι : Sort u_1\nα : ι → Sort u_2\nne : ∀ (i : ι), Nonempty (α i)\np : ι → Prop\nf : (i : Subtype p) → α i.val\nthis : DecidablePred p\n⊢ ∃ g, (fun i => g i.val) = f\n[PROOFSTEP]\nexact ⟨fun i => if hi : p i then f ⟨i, hi⟩ else Classical.choice (ne i), funext fun i ↦ dif_pos i.2⟩\n", "meta": {"mathlib_filename": "Mathlib.Tactic.Lift", "llama_tokens": 250, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES\n\n", "lm_q1_score": 0.8289387914176259, "lm_q2_score": 0.6150878555160665, "lm_q1q2_score": 0.5098701835671475}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : Preorder α\ninst✝² : AddCommSemigroup α\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na b c d : α\n⊢ a - b ≤ c ↔ a ≤ b + c\n[PROOFSTEP]\nrw [tsub_le_iff_right, add_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : Preorder α\ninst✝² : AddCommSemigroup α\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na b c d : α\n⊢ a - b ≤ c ↔ a - c ≤ b\n[PROOFSTEP]\nrw [tsub_le_iff_left, tsub_le_iff_right]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝⁴ : Preorder α\ninst✝³ : AddCommSemigroup α\ninst✝² : Sub α\ninst✝¹ : OrderedSub α\na b c d : α\ninst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\n⊢ a + b - c ≤ a + (b - c)\n[PROOFSTEP]\nrw [tsub_le_iff_left, add_left_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝⁴ : Preorder α\ninst✝³ : AddCommSemigroup α\ninst✝² : Sub α\ninst✝¹ : OrderedSub α\na b c d : α\ninst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\n⊢ a + b ≤ a + (c + (b - c))\n[PROOFSTEP]\nexact add_le_add_left le_add_tsub a\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝⁴ : Preorder α\ninst✝³ : AddCommSemigroup α\ninst✝² : Sub α\ninst✝¹ : OrderedSub α\na b c d : α\ninst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\n⊢ a + b - c ≤ a - c + b\n[PROOFSTEP]\nrw [add_comm, add_comm _ b]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝⁴ : Preorder α\ninst✝³ : AddCommSemigroup α\ninst✝² : Sub α\ninst✝¹ : OrderedSub α\na b c d : α\ninst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\n⊢ b + a - c ≤ b + (a - c)\n[PROOFSTEP]\nexact add_tsub_le_assoc\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝⁴ : Preorder α\ninst✝³ : AddCommSemigroup α\ninst✝² : Sub α\ninst✝¹ : OrderedSub α\na b c d : α\ninst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\n⊢ a + b ≤ a + c + (b - c)\n[PROOFSTEP]\nrw [add_assoc]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝⁴ : Preorder α\ninst✝³ : AddCommSemigroup α\ninst✝² : Sub α\ninst✝¹ : OrderedSub α\na b c d : α\ninst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\n⊢ a + b ≤ a + (c + (b - c))\n[PROOFSTEP]\nexact add_le_add_left le_add_tsub a\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝⁴ : Preorder α\ninst✝³ : AddCommSemigroup α\ninst✝² : Sub α\ninst✝¹ : OrderedSub α\na b c d : α\ninst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\n⊢ a + b ≤ a - c + (b + c)\n[PROOFSTEP]\nrw [add_comm a, add_comm (a - c)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝⁴ : Preorder α\ninst✝³ : AddCommSemigroup α\ninst✝² : Sub α\ninst✝¹ : OrderedSub α\na b c d : α\ninst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\n⊢ b + a ≤ b + c + (a - c)\n[PROOFSTEP]\nexact add_le_add_add_tsub\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝⁴ : Preorder α\ninst✝³ : AddCommSemigroup α\ninst✝² : Sub α\ninst✝¹ : OrderedSub α\na b c d : α\ninst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\n⊢ a - c ≤ a - b + (b - c)\n[PROOFSTEP]\nrw [tsub_le_iff_left, ← add_assoc, add_right_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝⁴ : Preorder α\ninst✝³ : AddCommSemigroup α\ninst✝² : Sub α\ninst✝¹ : OrderedSub α\na b c d : α\ninst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\n⊢ a ≤ c + (b - c) + (a - b)\n[PROOFSTEP]\nexact le_add_tsub.trans (add_le_add_right le_add_tsub _)\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝⁴ : Preorder α\ninst✝³ : AddCommSemigroup α\ninst✝² : Sub α\ninst✝¹ : OrderedSub α\na b c d : α\ninst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\n⊢ c - a - (c - b) ≤ b - a\n[PROOFSTEP]\nrw [tsub_le_iff_left, tsub_le_iff_left, add_left_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝⁴ : Preorder α\ninst✝³ : AddCommSemigroup α\ninst✝² : Sub α\ninst✝¹ : OrderedSub α\na b c d : α\ninst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\n⊢ c ≤ c - b + (a + (b - a))\n[PROOFSTEP]\nexact le_tsub_add.trans (add_le_add_left le_add_tsub _)\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝⁴ : Preorder α\ninst✝³ : AddCommSemigroup α\ninst✝² : Sub α\ninst✝¹ : OrderedSub α\na b c d : α\ninst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\n⊢ a + b - (c + d) ≤ a - c + (b - d)\n[PROOFSTEP]\nrw [add_comm c, tsub_le_iff_left, add_assoc, ← tsub_le_iff_left, ← tsub_le_iff_left]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝⁴ : Preorder α\ninst✝³ : AddCommSemigroup α\ninst✝² : Sub α\ninst✝¹ : OrderedSub α\na b c d : α\ninst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\n⊢ a + b - d - c ≤ a - c + (b - d)\n[PROOFSTEP]\nrefine' (tsub_le_tsub_right add_tsub_le_assoc c).trans _\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝⁴ : Preorder α\ninst✝³ : AddCommSemigroup α\ninst✝² : Sub α\ninst✝¹ : OrderedSub α\na b c d : α\ninst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\n⊢ a + (b - d) - c ≤ a - c + (b - d)\n[PROOFSTEP]\nrw [add_comm a, add_comm (a - c)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝⁴ : Preorder α\ninst✝³ : AddCommSemigroup α\ninst✝² : Sub α\ninst✝¹ : OrderedSub α\na b c d : α\ninst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\n⊢ b - d + a - c ≤ b - d + (a - c)\n[PROOFSTEP]\nexact add_tsub_le_assoc\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝⁴ : Preorder α\ninst✝³ : AddCommSemigroup α\ninst✝² : Sub α\ninst✝¹ : OrderedSub α\na b c d : α\ninst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\n⊢ a + b - (a + c) ≤ b - c\n[PROOFSTEP]\nrw [tsub_le_iff_left, add_assoc]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝⁴ : Preorder α\ninst✝³ : AddCommSemigroup α\ninst✝² : Sub α\ninst✝¹ : OrderedSub α\na b c d : α\ninst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\n⊢ a + b ≤ a + (c + (b - c))\n[PROOFSTEP]\nexact add_le_add_left le_add_tsub _\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝⁴ : Preorder α\ninst✝³ : AddCommSemigroup α\ninst✝² : Sub α\ninst✝¹ : OrderedSub α\na b c d : α\ninst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\n⊢ a + c - (b + c) ≤ a - b\n[PROOFSTEP]\nrw [tsub_le_iff_left, add_right_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝⁴ : Preorder α\ninst✝³ : AddCommSemigroup α\ninst✝² : Sub α\ninst✝¹ : OrderedSub α\na b c d : α\ninst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\n⊢ a + c ≤ b + (a - b) + c\n[PROOFSTEP]\nexact add_le_add_right le_add_tsub c\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : Preorder α\ninst✝² : AddCommSemigroup α\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na b c d : α\nhb : AddLECancellable b\n⊢ a ≤ a + b - b\n[PROOFSTEP]\nrw [add_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : Preorder α\ninst✝² : AddCommSemigroup α\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na b c d : α\nhb : AddLECancellable b\n⊢ a ≤ b + a - b\n[PROOFSTEP]\nexact hb.le_add_tsub_swap\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : Preorder α\ninst✝² : AddCommSemigroup α\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na b c d : α\nhb : AddLECancellable b\nh : a + b ≤ c\n⊢ b + a ≤ c\n[PROOFSTEP]\nrwa [add_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : Preorder α\ninst✝² : AddCommMonoid α\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na b c d : α\n⊢ a - b ≤ 0 ↔ a ≤ b\n[PROOFSTEP]\nrw [tsub_le_iff_left, add_zero]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : PartialOrder α\ninst✝² : AddCommSemigroup α\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na✝ b✝ c✝ d b a c : α\n⊢ b - a - c = b - (a + c)\n[PROOFSTEP]\napply le_antisymm\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\ninst✝³ : PartialOrder α\ninst✝² : AddCommSemigroup α\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na✝ b✝ c✝ d b a c : α\n⊢ b - a - c ≤ b - (a + c)\n[PROOFSTEP]\nrw [tsub_le_iff_left, tsub_le_iff_left, ← add_assoc, ← tsub_le_iff_left]\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\ninst✝³ : PartialOrder α\ninst✝² : AddCommSemigroup α\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na✝ b✝ c✝ d b a c : α\n⊢ b - (a + c) ≤ b - a - c\n[PROOFSTEP]\nrw [tsub_le_iff_left, add_assoc, ← tsub_le_iff_left, ← tsub_le_iff_left]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : PartialOrder α\ninst✝² : AddCommSemigroup α\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na✝ b✝ c✝ d a b c : α\n⊢ a - (b + c) = a - c - b\n[PROOFSTEP]\nrw [add_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : PartialOrder α\ninst✝² : AddCommSemigroup α\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na✝ b✝ c✝ d a b c : α\n⊢ a - (c + b) = a - c - b\n[PROOFSTEP]\napply tsub_add_eq_tsub_tsub\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : PartialOrder α\ninst✝² : AddCommSemigroup α\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na b c d : α\n⊢ a - b - c = a - c - b\n[PROOFSTEP]\nrw [← tsub_add_eq_tsub_tsub, tsub_add_eq_tsub_tsub_swap]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : PartialOrder α\ninst✝² : AddCommSemigroup α\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na b c d : α\nhb : AddLECancellable b\nh : a = c + b\n⊢ c ≤ a - b\n[PROOFSTEP]\nrw [h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : PartialOrder α\ninst✝² : AddCommSemigroup α\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na b c d : α\nhb : AddLECancellable b\nh : a = c + b\n⊢ c ≤ c + b - b\n[PROOFSTEP]\nexact hb.le_add_tsub\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : PartialOrder α\ninst✝² : AddCommSemigroup α\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na b c d : α\nhb : AddLECancellable b\nh : a = b + c\n⊢ a = c + b\n[PROOFSTEP]\nrw [add_comm, h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : PartialOrder α\ninst✝² : AddCommSemigroup α\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na b c d : α\nhb : AddLECancellable b\n⊢ a + b = a + b\n[PROOFSTEP]\nrw [add_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : PartialOrder α\ninst✝² : AddCommSemigroup α\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na b c d : α\nhb : AddLECancellable b\nh : a - b < c\n⊢ a < b + c\n[PROOFSTEP]\nrw [lt_iff_le_and_ne, ← tsub_le_iff_left]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : PartialOrder α\ninst✝² : AddCommSemigroup α\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na b c d : α\nhb : AddLECancellable b\nh : a - b < c\n⊢ a - b ≤ c ∧ a ≠ b + c\n[PROOFSTEP]\nrefine' ⟨h.le, _⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : PartialOrder α\ninst✝² : AddCommSemigroup α\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na b c d : α\nhb : AddLECancellable b\nh : a - b < c\n⊢ a ≠ b + c\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : PartialOrder α\ninst✝² : AddCommSemigroup α\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\nb c d : α\nhb : AddLECancellable b\nh : b + c - b < c\n⊢ False\n[PROOFSTEP]\nsimp [hb] at h \n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : PartialOrder α\ninst✝² : AddCommSemigroup α\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na b c d : α\nhc : AddLECancellable c\nh : a - c < b\n⊢ a < b + c\n[PROOFSTEP]\nrw [lt_iff_le_and_ne, ← tsub_le_iff_right]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : PartialOrder α\ninst✝² : AddCommSemigroup α\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na b c d : α\nhc : AddLECancellable c\nh : a - c < b\n⊢ a - c ≤ b ∧ a ≠ b + c\n[PROOFSTEP]\nrefine' ⟨h.le, _⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : PartialOrder α\ninst✝² : AddCommSemigroup α\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na b c d : α\nhc : AddLECancellable c\nh : a - c < b\n⊢ a ≠ b + c\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : PartialOrder α\ninst✝² : AddCommSemigroup α\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\nb c d : α\nhc : AddLECancellable c\nh : b + c - c < b\n⊢ False\n[PROOFSTEP]\nsimp [hc] at h \n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : PartialOrder α\ninst✝² : AddCommSemigroup α\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na b c d : α\nhc : AddLECancellable c\nh : a + c < b\n⊢ a ≠ b - c\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : PartialOrder α\ninst✝² : AddCommSemigroup α\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\nb c d : α\nhc : AddLECancellable c\nh : b - c + c < b\n⊢ False\n[PROOFSTEP]\nexact h.not_le le_tsub_add\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : PartialOrder α\ninst✝² : AddCommSemigroup α\ninst✝¹ : Sub α\ninst✝ : OrderedSub α\na b c d : α\nha : AddLECancellable a\nh : a + c < b\n⊢ c + a < b\n[PROOFSTEP]\nrwa [add_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝⁵ : PartialOrder α\ninst✝⁴ : AddCommSemigroup α\ninst✝³ : Sub α\ninst✝² : OrderedSub α\na✝ b✝ c✝ d : α\ninst✝¹ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\ninst✝ : ContravariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\na c b : α\n⊢ a + c - (b + c) = a - b\n[PROOFSTEP]\nrefine' add_tsub_add_le_tsub_right.antisymm (tsub_le_iff_right.2 <| le_of_add_le_add_right _)\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\ninst✝⁵ : PartialOrder α\ninst✝⁴ : AddCommSemigroup α\ninst✝³ : Sub α\ninst✝² : OrderedSub α\na✝ b✝ c✝ d : α\ninst✝¹ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\ninst✝ : ContravariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\na c b : α\n⊢ α\ncase refine'_2\nα : Type u_1\nβ : Type u_2\ninst✝⁵ : PartialOrder α\ninst✝⁴ : AddCommSemigroup α\ninst✝³ : Sub α\ninst✝² : OrderedSub α\na✝ b✝ c✝ d : α\ninst✝¹ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\ninst✝ : ContravariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\na c b : α\n⊢ a + ?refine'_1 ≤ a + c - (b + c) + b + ?refine'_1\n[PROOFSTEP]\nexact c\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\ninst✝⁵ : PartialOrder α\ninst✝⁴ : AddCommSemigroup α\ninst✝³ : Sub α\ninst✝² : OrderedSub α\na✝ b✝ c✝ d : α\ninst✝¹ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\ninst✝ : ContravariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\na c b : α\n⊢ a + c ≤ a + c - (b + c) + b + c\n[PROOFSTEP]\nrw [add_assoc]\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\ninst✝⁵ : PartialOrder α\ninst✝⁴ : AddCommSemigroup α\ninst✝³ : Sub α\ninst✝² : OrderedSub α\na✝ b✝ c✝ d : α\ninst✝¹ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\ninst✝ : ContravariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\na c b : α\n⊢ a + c ≤ a + c - (b + c) + (b + c)\n[PROOFSTEP]\nexact le_tsub_add\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝⁵ : PartialOrder α\ninst✝⁴ : AddCommSemigroup α\ninst✝³ : Sub α\ninst✝² : OrderedSub α\na✝ b✝ c✝ d : α\ninst✝¹ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\ninst✝ : ContravariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\na b c : α\n⊢ a + b - (a + c) = b - c\n[PROOFSTEP]\nrw [add_comm a b, add_comm a c, add_tsub_add_eq_tsub_right]\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Order.Sub.Defs", "llama_tokens": 7281, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7122321720225278, "lm_q2_score": 0.7154240018510026, "lm_q1q2_score": 0.5095479907553885}}
{"text": "[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\n⊢ Tendsto (fun n => u n / ↑n) atTop (𝓝 l)\n[PROOFSTEP]\nhave lnonneg : 0 ≤ l := by\n  rcases hlim 2 one_lt_two with ⟨c, _, ctop, clim⟩\n  have : Tendsto (fun n => u 0 / c n) atTop (𝓝 0) := tendsto_const_nhds.div_atTop (tendsto_nat_cast_atTop_iff.2 ctop)\n  apply le_of_tendsto_of_tendsto' this clim fun n => _\n  simp_rw [div_eq_inv_mul]\n  exact fun n => mul_le_mul_of_nonneg_left (hmono (zero_le _)) (inv_nonneg.2 (Nat.cast_nonneg _))\n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\n⊢ 0 ≤ l\n[PROOFSTEP]\nrcases hlim 2 one_lt_two with ⟨c, _, ctop, clim⟩\n[GOAL]\ncase intro.intro.intro\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nc : ℕ → ℕ\nleft✝ : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ 2 * ↑(c n)\nctop : Tendsto c atTop atTop\nclim : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\n⊢ 0 ≤ l\n[PROOFSTEP]\nhave : Tendsto (fun n => u 0 / c n) atTop (𝓝 0) := tendsto_const_nhds.div_atTop (tendsto_nat_cast_atTop_iff.2 ctop)\n[GOAL]\ncase intro.intro.intro\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nc : ℕ → ℕ\nleft✝ : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ 2 * ↑(c n)\nctop : Tendsto c atTop atTop\nclim : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nthis : Tendsto (fun n => u 0 / ↑(c n)) atTop (𝓝 0)\n⊢ 0 ≤ l\n[PROOFSTEP]\napply le_of_tendsto_of_tendsto' this clim fun n => _\n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nc : ℕ → ℕ\nleft✝ : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ 2 * ↑(c n)\nctop : Tendsto c atTop atTop\nclim : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nthis : Tendsto (fun n => u 0 / ↑(c n)) atTop (𝓝 0)\n⊢ ∀ (n : ℕ), u 0 / ↑(c n) ≤ u (c n) / ↑(c n)\n[PROOFSTEP]\nsimp_rw [div_eq_inv_mul]\n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nc : ℕ → ℕ\nleft✝ : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ 2 * ↑(c n)\nctop : Tendsto c atTop atTop\nclim : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nthis : Tendsto (fun n => u 0 / ↑(c n)) atTop (𝓝 0)\n⊢ ∀ (n : ℕ), (↑(c n))⁻¹ * u 0 ≤ (↑(c n))⁻¹ * u (c n)\n[PROOFSTEP]\nexact fun n => mul_le_mul_of_nonneg_left (hmono (zero_le _)) (inv_nonneg.2 (Nat.cast_nonneg _))\n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\n⊢ Tendsto (fun n => u n / ↑n) atTop (𝓝 l)\n[PROOFSTEP]\nhave A : ∀ ε : ℝ, 0 < ε → ∀ᶠ n in atTop, u n - n * l ≤ ε * (1 + ε + l) * n :=\n  by\n  intro ε εpos\n  rcases hlim (1 + ε) ((lt_add_iff_pos_right _).2 εpos) with ⟨c, cgrowth, ctop, clim⟩\n  have L : ∀ᶠ n in atTop, u (c n) - c n * l ≤ ε * c n :=\n    by\n    rw [← tendsto_sub_nhds_zero_iff, ← Asymptotics.isLittleO_one_iff ℝ, Asymptotics.isLittleO_iff] at clim \n    filter_upwards [clim εpos, ctop (Ioi_mem_atTop 0)] with n hn cnpos'\n    have cnpos : 0 < c n := cnpos'\n    calc\n      u (c n) - c n * l = (u (c n) / c n - l) * c n := by\n        simp only [cnpos.ne', Ne.def, Nat.cast_eq_zero, not_false_iff, field_simps]\n      _ ≤ ε * c n := by\n        refine' mul_le_mul_of_nonneg_right _ (Nat.cast_nonneg _)\n        simp only [mul_one, Real.norm_eq_abs, abs_one] at hn \n        exact le_trans (le_abs_self _) hn\n  obtain ⟨a, ha⟩ : ∃ a : ℕ, ∀ b : ℕ, a ≤ b → (c (b + 1) : ℝ) ≤ (1 + ε) * c b ∧ u (c b) - c b * l ≤ ε * c b :=\n    eventually_atTop.1 (cgrowth.and L)\n  let M := ((Finset.range (a + 1)).image fun i => c i).max' (by simp)\n  filter_upwards [Ici_mem_atTop M] with n hn\n  have exN : ∃ N, n < c N := by\n    rcases(tendsto_atTop.1 ctop (n + 1)).exists with ⟨N, hN⟩\n    exact ⟨N, by linarith only [hN]⟩\n  let N := Nat.find exN\n  have ncN : n < c N := Nat.find_spec exN\n  have aN : a + 1 ≤ N := by\n    by_contra' h\n    have cNM : c N ≤ M := by\n      apply le_max'\n      apply mem_image_of_mem\n      exact mem_range.2 h\n    exact lt_irrefl _ ((cNM.trans hn).trans_lt ncN)\n  have Npos : 0 < N := lt_of_lt_of_le Nat.succ_pos' aN\n  have cNn : c (N - 1) ≤ n := by\n    have : N - 1 < N := Nat.pred_lt Npos.ne'\n    simpa only [not_lt] using Nat.find_min exN this\n  have IcN : (c N : ℝ) ≤ (1 + ε) * c (N - 1) :=\n    by\n    have A : a ≤ N - 1 := by\n      apply @Nat.le_of_add_le_add_right a 1 (N - 1)\n      rw [Nat.sub_add_cancel Npos]\n      exact aN\n    have B : N - 1 + 1 = N := Nat.succ_pred_eq_of_pos Npos\n    have := (ha _ A).1\n    rwa [B] at this \n  calc\n    u n - n * l ≤ u (c N) - c (N - 1) * l := by\n      apply sub_le_sub (hmono ncN.le)\n      apply mul_le_mul_of_nonneg_right (Nat.cast_le.2 cNn) lnonneg\n    _ = u (c N) - c N * l + (c N - c (N - 1)) * l := by ring\n    _ ≤ ε * c N + ε * c (N - 1) * l := by\n      apply add_le_add\n      · apply (ha _ _).2\n        exact le_trans (by simp only [le_add_iff_nonneg_right, zero_le']) aN\n      · apply mul_le_mul_of_nonneg_right _ lnonneg\n        linarith only [IcN]\n    _ ≤ ε * ((1 + ε) * c (N - 1)) + ε * c (N - 1) * l := (add_le_add (mul_le_mul_of_nonneg_left IcN εpos.le) le_rfl)\n    _ = ε * (1 + ε + l) * c (N - 1) := by ring\n    _ ≤ ε * (1 + ε + l) * n := by\n      refine' mul_le_mul_of_nonneg_left (Nat.cast_le.2 cNn) _\n      apply mul_nonneg εpos.le\n      linarith only [εpos, lnonneg]\n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\n⊢ ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\n[PROOFSTEP]\nintro ε εpos\n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nε : ℝ\nεpos : 0 < ε\n⊢ ∀ᶠ (n : ℕ) in atTop, u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\n[PROOFSTEP]\nrcases hlim (1 + ε) ((lt_add_iff_pos_right _).2 εpos) with ⟨c, cgrowth, ctop, clim⟩\n[GOAL]\ncase intro.intro.intro\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\n⊢ ∀ᶠ (n : ℕ) in atTop, u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\n[PROOFSTEP]\nhave L : ∀ᶠ n in atTop, u (c n) - c n * l ≤ ε * c n :=\n  by\n  rw [← tendsto_sub_nhds_zero_iff, ← Asymptotics.isLittleO_one_iff ℝ, Asymptotics.isLittleO_iff] at clim \n  filter_upwards [clim εpos, ctop (Ioi_mem_atTop 0)] with n hn cnpos'\n  have cnpos : 0 < c n := cnpos'\n  calc\n    u (c n) - c n * l = (u (c n) / c n - l) * c n := by\n      simp only [cnpos.ne', Ne.def, Nat.cast_eq_zero, not_false_iff, field_simps]\n    _ ≤ ε * c n := by\n      refine' mul_le_mul_of_nonneg_right _ (Nat.cast_nonneg _)\n      simp only [mul_one, Real.norm_eq_abs, abs_one] at hn \n      exact le_trans (le_abs_self _) hn\n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\n⊢ ∀ᶠ (n : ℕ) in atTop, u (c n) - ↑(c n) * l ≤ ε * ↑(c n)\n[PROOFSTEP]\nrw [← tendsto_sub_nhds_zero_iff, ← Asymptotics.isLittleO_one_iff ℝ, Asymptotics.isLittleO_iff] at clim \n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim✝ : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nclim : ∀ ⦃c_1 : ℝ⦄, 0 < c_1 → ∀ᶠ (x : ℕ) in atTop, ‖u (c x) / ↑(c x) - l‖ ≤ c_1 * ‖1‖\n⊢ ∀ᶠ (n : ℕ) in atTop, u (c n) - ↑(c n) * l ≤ ε * ↑(c n)\n[PROOFSTEP]\nfilter_upwards [clim εpos, ctop (Ioi_mem_atTop 0)] with n hn cnpos'\n[GOAL]\ncase h\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim✝ : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nclim : ∀ ⦃c_1 : ℝ⦄, 0 < c_1 → ∀ᶠ (x : ℕ) in atTop, ‖u (c x) / ↑(c x) - l‖ ≤ c_1 * ‖1‖\nn : ℕ\nhn : ‖u (c n) / ↑(c n) - l‖ ≤ ε * ‖1‖\ncnpos' : n ∈ c ⁻¹' Set.Ioi 0\n⊢ u (c n) - ↑(c n) * l ≤ ε * ↑(c n)\n[PROOFSTEP]\nhave cnpos : 0 < c n := cnpos'\n[GOAL]\ncase h\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim✝ : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nclim : ∀ ⦃c_1 : ℝ⦄, 0 < c_1 → ∀ᶠ (x : ℕ) in atTop, ‖u (c x) / ↑(c x) - l‖ ≤ c_1 * ‖1‖\nn : ℕ\nhn : ‖u (c n) / ↑(c n) - l‖ ≤ ε * ‖1‖\ncnpos' : n ∈ c ⁻¹' Set.Ioi 0\ncnpos : 0 < c n\n⊢ u (c n) - ↑(c n) * l ≤ ε * ↑(c n)\n[PROOFSTEP]\ncalc\n  u (c n) - c n * l = (u (c n) / c n - l) * c n := by\n    simp only [cnpos.ne', Ne.def, Nat.cast_eq_zero, not_false_iff, field_simps]\n  _ ≤ ε * c n := by\n    refine' mul_le_mul_of_nonneg_right _ (Nat.cast_nonneg _)\n    simp only [mul_one, Real.norm_eq_abs, abs_one] at hn \n    exact le_trans (le_abs_self _) hn\n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim✝ : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nclim : ∀ ⦃c_1 : ℝ⦄, 0 < c_1 → ∀ᶠ (x : ℕ) in atTop, ‖u (c x) / ↑(c x) - l‖ ≤ c_1 * ‖1‖\nn : ℕ\nhn : ‖u (c n) / ↑(c n) - l‖ ≤ ε * ‖1‖\ncnpos' : n ∈ c ⁻¹' Set.Ioi 0\ncnpos : 0 < c n\n⊢ u (c n) - ↑(c n) * l = (u (c n) / ↑(c n) - l) * ↑(c n)\n[PROOFSTEP]\nsimp only [cnpos.ne', Ne.def, Nat.cast_eq_zero, not_false_iff, field_simps]\n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim✝ : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nclim : ∀ ⦃c_1 : ℝ⦄, 0 < c_1 → ∀ᶠ (x : ℕ) in atTop, ‖u (c x) / ↑(c x) - l‖ ≤ c_1 * ‖1‖\nn : ℕ\nhn : ‖u (c n) / ↑(c n) - l‖ ≤ ε * ‖1‖\ncnpos' : n ∈ c ⁻¹' Set.Ioi 0\ncnpos : 0 < c n\n⊢ (u (c n) / ↑(c n) - l) * ↑(c n) ≤ ε * ↑(c n)\n[PROOFSTEP]\nrefine' mul_le_mul_of_nonneg_right _ (Nat.cast_nonneg _)\n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim✝ : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nclim : ∀ ⦃c_1 : ℝ⦄, 0 < c_1 → ∀ᶠ (x : ℕ) in atTop, ‖u (c x) / ↑(c x) - l‖ ≤ c_1 * ‖1‖\nn : ℕ\nhn : ‖u (c n) / ↑(c n) - l‖ ≤ ε * ‖1‖\ncnpos' : n ∈ c ⁻¹' Set.Ioi 0\ncnpos : 0 < c n\n⊢ u (c n) / ↑(c n) - l ≤ ε\n[PROOFSTEP]\nsimp only [mul_one, Real.norm_eq_abs, abs_one] at hn \n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim✝ : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nclim : ∀ ⦃c_1 : ℝ⦄, 0 < c_1 → ∀ᶠ (x : ℕ) in atTop, ‖u (c x) / ↑(c x) - l‖ ≤ c_1 * ‖1‖\nn : ℕ\ncnpos' : n ∈ c ⁻¹' Set.Ioi 0\ncnpos : 0 < c n\nhn : |u (c n) / ↑(c n) - l| ≤ ε\n⊢ u (c n) / ↑(c n) - l ≤ ε\n[PROOFSTEP]\nexact le_trans (le_abs_self _) hn\n[GOAL]\ncase intro.intro.intro\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nL : ∀ᶠ (n : ℕ) in atTop, u (c n) - ↑(c n) * l ≤ ε * ↑(c n)\n⊢ ∀ᶠ (n : ℕ) in atTop, u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\n[PROOFSTEP]\nobtain ⟨a, ha⟩ : ∃ a : ℕ, ∀ b : ℕ, a ≤ b → (c (b + 1) : ℝ) ≤ (1 + ε) * c b ∧ u (c b) - c b * l ≤ ε * c b :=\n  eventually_atTop.1 (cgrowth.and L)\n[GOAL]\ncase intro.intro.intro.intro\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nL : ∀ᶠ (n : ℕ) in atTop, u (c n) - ↑(c n) * l ≤ ε * ↑(c n)\na : ℕ\nha : ∀ (b : ℕ), a ≤ b → ↑(c (b + 1)) ≤ (1 + ε) * ↑(c b) ∧ u (c b) - ↑(c b) * l ≤ ε * ↑(c b)\n⊢ ∀ᶠ (n : ℕ) in atTop, u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\n[PROOFSTEP]\nlet M := ((Finset.range (a + 1)).image fun i => c i).max' (by simp)\n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nL : ∀ᶠ (n : ℕ) in atTop, u (c n) - ↑(c n) * l ≤ ε * ↑(c n)\na : ℕ\nha : ∀ (b : ℕ), a ≤ b → ↑(c (b + 1)) ≤ (1 + ε) * ↑(c b) ∧ u (c b) - ↑(c b) * l ≤ ε * ↑(c b)\n⊢ Finset.Nonempty (image (fun i => c i) (range (a + 1)))\n[PROOFSTEP]\nsimp\n[GOAL]\ncase intro.intro.intro.intro\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nL : ∀ᶠ (n : ℕ) in atTop, u (c n) - ↑(c n) * l ≤ ε * ↑(c n)\na : ℕ\nha : ∀ (b : ℕ), a ≤ b → ↑(c (b + 1)) ≤ (1 + ε) * ↑(c b) ∧ u (c b) - ↑(c b) * l ≤ ε * ↑(c b)\nM : ℕ := max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1))))\n⊢ ∀ᶠ (n : ℕ) in atTop, u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\n[PROOFSTEP]\nfilter_upwards [Ici_mem_atTop M] with n hn\n[GOAL]\ncase h\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nL : ∀ᶠ (n : ℕ) in atTop, u (c n) - ↑(c n) * l ≤ ε * ↑(c n)\na : ℕ\nha : ∀ (b : ℕ), a ≤ b → ↑(c (b + 1)) ≤ (1 + ε) * ↑(c b) ∧ u (c b) - ↑(c b) * l ≤ ε * ↑(c b)\nM : ℕ := max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1))))\nn : ℕ\nhn :\n  n ∈ Set.Ici (max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1)))))\n⊢ u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\n[PROOFSTEP]\nhave exN : ∃ N, n < c N := by\n  rcases(tendsto_atTop.1 ctop (n + 1)).exists with ⟨N, hN⟩\n  exact ⟨N, by linarith only [hN]⟩\n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nL : ∀ᶠ (n : ℕ) in atTop, u (c n) - ↑(c n) * l ≤ ε * ↑(c n)\na : ℕ\nha : ∀ (b : ℕ), a ≤ b → ↑(c (b + 1)) ≤ (1 + ε) * ↑(c b) ∧ u (c b) - ↑(c b) * l ≤ ε * ↑(c b)\nM : ℕ := max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1))))\nn : ℕ\nhn :\n  n ∈ Set.Ici (max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1)))))\n⊢ ∃ N, n < c N\n[PROOFSTEP]\nrcases(tendsto_atTop.1 ctop (n + 1)).exists with ⟨N, hN⟩\n[GOAL]\ncase intro\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nL : ∀ᶠ (n : ℕ) in atTop, u (c n) - ↑(c n) * l ≤ ε * ↑(c n)\na : ℕ\nha : ∀ (b : ℕ), a ≤ b → ↑(c (b + 1)) ≤ (1 + ε) * ↑(c b) ∧ u (c b) - ↑(c b) * l ≤ ε * ↑(c b)\nM : ℕ := max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1))))\nn : ℕ\nhn :\n  n ∈ Set.Ici (max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1)))))\nN : ℕ\nhN : n + 1 ≤ c N\n⊢ ∃ N, n < c N\n[PROOFSTEP]\nexact ⟨N, by linarith only [hN]⟩\n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nL : ∀ᶠ (n : ℕ) in atTop, u (c n) - ↑(c n) * l ≤ ε * ↑(c n)\na : ℕ\nha : ∀ (b : ℕ), a ≤ b → ↑(c (b + 1)) ≤ (1 + ε) * ↑(c b) ∧ u (c b) - ↑(c b) * l ≤ ε * ↑(c b)\nM : ℕ := max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1))))\nn : ℕ\nhn :\n  n ∈ Set.Ici (max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1)))))\nN : ℕ\nhN : n + 1 ≤ c N\n⊢ n < c N\n[PROOFSTEP]\nlinarith only [hN]\n[GOAL]\ncase h\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nL : ∀ᶠ (n : ℕ) in atTop, u (c n) - ↑(c n) * l ≤ ε * ↑(c n)\na : ℕ\nha : ∀ (b : ℕ), a ≤ b → ↑(c (b + 1)) ≤ (1 + ε) * ↑(c b) ∧ u (c b) - ↑(c b) * l ≤ ε * ↑(c b)\nM : ℕ := max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1))))\nn : ℕ\nhn :\n  n ∈ Set.Ici (max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1)))))\nexN : ∃ N, n < c N\n⊢ u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\n[PROOFSTEP]\nlet N := Nat.find exN\n[GOAL]\ncase h\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nL : ∀ᶠ (n : ℕ) in atTop, u (c n) - ↑(c n) * l ≤ ε * ↑(c n)\na : ℕ\nha : ∀ (b : ℕ), a ≤ b → ↑(c (b + 1)) ≤ (1 + ε) * ↑(c b) ∧ u (c b) - ↑(c b) * l ≤ ε * ↑(c b)\nM : ℕ := max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1))))\nn : ℕ\nhn :\n  n ∈ Set.Ici (max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1)))))\nexN : ∃ N, n < c N\nN : ℕ := Nat.find exN\n⊢ u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\n[PROOFSTEP]\nhave ncN : n < c N := Nat.find_spec exN\n[GOAL]\ncase h\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nL : ∀ᶠ (n : ℕ) in atTop, u (c n) - ↑(c n) * l ≤ ε * ↑(c n)\na : ℕ\nha : ∀ (b : ℕ), a ≤ b → ↑(c (b + 1)) ≤ (1 + ε) * ↑(c b) ∧ u (c b) - ↑(c b) * l ≤ ε * ↑(c b)\nM : ℕ := max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1))))\nn : ℕ\nhn :\n  n ∈ Set.Ici (max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1)))))\nexN : ∃ N, n < c N\nN : ℕ := Nat.find exN\nncN : n < c N\n⊢ u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\n[PROOFSTEP]\nhave aN : a + 1 ≤ N := by\n  by_contra' h\n  have cNM : c N ≤ M := by\n    apply le_max'\n    apply mem_image_of_mem\n    exact mem_range.2 h\n  exact lt_irrefl _ ((cNM.trans hn).trans_lt ncN)\n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nL : ∀ᶠ (n : ℕ) in atTop, u (c n) - ↑(c n) * l ≤ ε * ↑(c n)\na : ℕ\nha : ∀ (b : ℕ), a ≤ b → ↑(c (b + 1)) ≤ (1 + ε) * ↑(c b) ∧ u (c b) - ↑(c b) * l ≤ ε * ↑(c b)\nM : ℕ := max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1))))\nn : ℕ\nhn :\n  n ∈ Set.Ici (max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1)))))\nexN : ∃ N, n < c N\nN : ℕ := Nat.find exN\nncN : n < c N\n⊢ a + 1 ≤ N\n[PROOFSTEP]\nby_contra' h\n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nL : ∀ᶠ (n : ℕ) in atTop, u (c n) - ↑(c n) * l ≤ ε * ↑(c n)\na : ℕ\nha : ∀ (b : ℕ), a ≤ b → ↑(c (b + 1)) ≤ (1 + ε) * ↑(c b) ∧ u (c b) - ↑(c b) * l ≤ ε * ↑(c b)\nM : ℕ := max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1))))\nn : ℕ\nhn :\n  n ∈ Set.Ici (max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1)))))\nexN : ∃ N, n < c N\nN : ℕ := Nat.find exN\nncN : n < c N\nh : Nat.find exN < a + 1\n⊢ False\n[PROOFSTEP]\nhave cNM : c N ≤ M := by\n  apply le_max'\n  apply mem_image_of_mem\n  exact mem_range.2 h\n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nL : ∀ᶠ (n : ℕ) in atTop, u (c n) - ↑(c n) * l ≤ ε * ↑(c n)\na : ℕ\nha : ∀ (b : ℕ), a ≤ b → ↑(c (b + 1)) ≤ (1 + ε) * ↑(c b) ∧ u (c b) - ↑(c b) * l ≤ ε * ↑(c b)\nM : ℕ := max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1))))\nn : ℕ\nhn :\n  n ∈ Set.Ici (max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1)))))\nexN : ∃ N, n < c N\nN : ℕ := Nat.find exN\nncN : n < c N\nh : Nat.find exN < a + 1\n⊢ c N ≤ M\n[PROOFSTEP]\napply le_max'\n[GOAL]\ncase H2\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nL : ∀ᶠ (n : ℕ) in atTop, u (c n) - ↑(c n) * l ≤ ε * ↑(c n)\na : ℕ\nha : ∀ (b : ℕ), a ≤ b → ↑(c (b + 1)) ≤ (1 + ε) * ↑(c b) ∧ u (c b) - ↑(c b) * l ≤ ε * ↑(c b)\nM : ℕ := max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1))))\nn : ℕ\nhn :\n  n ∈ Set.Ici (max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1)))))\nexN : ∃ N, n < c N\nN : ℕ := Nat.find exN\nncN : n < c N\nh : Nat.find exN < a + 1\n⊢ c N ∈ image (fun i => c i) (range (a + 1))\n[PROOFSTEP]\napply mem_image_of_mem\n[GOAL]\ncase H2.h\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nL : ∀ᶠ (n : ℕ) in atTop, u (c n) - ↑(c n) * l ≤ ε * ↑(c n)\na : ℕ\nha : ∀ (b : ℕ), a ≤ b → ↑(c (b + 1)) ≤ (1 + ε) * ↑(c b) ∧ u (c b) - ↑(c b) * l ≤ ε * ↑(c b)\nM : ℕ := max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1))))\nn : ℕ\nhn :\n  n ∈ Set.Ici (max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1)))))\nexN : ∃ N, n < c N\nN : ℕ := Nat.find exN\nncN : n < c N\nh : Nat.find exN < a + 1\n⊢ N ∈ range (a + 1)\n[PROOFSTEP]\nexact mem_range.2 h\n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nL : ∀ᶠ (n : ℕ) in atTop, u (c n) - ↑(c n) * l ≤ ε * ↑(c n)\na : ℕ\nha : ∀ (b : ℕ), a ≤ b → ↑(c (b + 1)) ≤ (1 + ε) * ↑(c b) ∧ u (c b) - ↑(c b) * l ≤ ε * ↑(c b)\nM : ℕ := max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1))))\nn : ℕ\nhn :\n  n ∈ Set.Ici (max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1)))))\nexN : ∃ N, n < c N\nN : ℕ := Nat.find exN\nncN : n < c N\nh : Nat.find exN < a + 1\ncNM : c N ≤ M\n⊢ False\n[PROOFSTEP]\nexact lt_irrefl _ ((cNM.trans hn).trans_lt ncN)\n[GOAL]\ncase h\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nL : ∀ᶠ (n : ℕ) in atTop, u (c n) - ↑(c n) * l ≤ ε * ↑(c n)\na : ℕ\nha : ∀ (b : ℕ), a ≤ b → ↑(c (b + 1)) ≤ (1 + ε) * ↑(c b) ∧ u (c b) - ↑(c b) * l ≤ ε * ↑(c b)\nM : ℕ := max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1))))\nn : ℕ\nhn :\n  n ∈ Set.Ici (max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1)))))\nexN : ∃ N, n < c N\nN : ℕ := Nat.find exN\nncN : n < c N\naN : a + 1 ≤ N\n⊢ u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\n[PROOFSTEP]\nhave Npos : 0 < N := lt_of_lt_of_le Nat.succ_pos' aN\n[GOAL]\ncase h\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nL : ∀ᶠ (n : ℕ) in atTop, u (c n) - ↑(c n) * l ≤ ε * ↑(c n)\na : ℕ\nha : ∀ (b : ℕ), a ≤ b → ↑(c (b + 1)) ≤ (1 + ε) * ↑(c b) ∧ u (c b) - ↑(c b) * l ≤ ε * ↑(c b)\nM : ℕ := max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1))))\nn : ℕ\nhn :\n  n ∈ Set.Ici (max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1)))))\nexN : ∃ N, n < c N\nN : ℕ := Nat.find exN\nncN : n < c N\naN : a + 1 ≤ N\nNpos : 0 < N\n⊢ u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\n[PROOFSTEP]\nhave cNn : c (N - 1) ≤ n := by\n  have : N - 1 < N := Nat.pred_lt Npos.ne'\n  simpa only [not_lt] using Nat.find_min exN this\n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nL : ∀ᶠ (n : ℕ) in atTop, u (c n) - ↑(c n) * l ≤ ε * ↑(c n)\na : ℕ\nha : ∀ (b : ℕ), a ≤ b → ↑(c (b + 1)) ≤ (1 + ε) * ↑(c b) ∧ u (c b) - ↑(c b) * l ≤ ε * ↑(c b)\nM : ℕ := max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1))))\nn : ℕ\nhn :\n  n ∈ Set.Ici (max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1)))))\nexN : ∃ N, n < c N\nN : ℕ := Nat.find exN\nncN : n < c N\naN : a + 1 ≤ N\nNpos : 0 < N\n⊢ c (N - 1) ≤ n\n[PROOFSTEP]\nhave : N - 1 < N := Nat.pred_lt Npos.ne'\n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nL : ∀ᶠ (n : ℕ) in atTop, u (c n) - ↑(c n) * l ≤ ε * ↑(c n)\na : ℕ\nha : ∀ (b : ℕ), a ≤ b → ↑(c (b + 1)) ≤ (1 + ε) * ↑(c b) ∧ u (c b) - ↑(c b) * l ≤ ε * ↑(c b)\nM : ℕ := max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1))))\nn : ℕ\nhn :\n  n ∈ Set.Ici (max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1)))))\nexN : ∃ N, n < c N\nN : ℕ := Nat.find exN\nncN : n < c N\naN : a + 1 ≤ N\nNpos : 0 < N\nthis : N - 1 < N\n⊢ c (N - 1) ≤ n\n[PROOFSTEP]\nsimpa only [not_lt] using Nat.find_min exN this\n[GOAL]\ncase h\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nL : ∀ᶠ (n : ℕ) in atTop, u (c n) - ↑(c n) * l ≤ ε * ↑(c n)\na : ℕ\nha : ∀ (b : ℕ), a ≤ b → ↑(c (b + 1)) ≤ (1 + ε) * ↑(c b) ∧ u (c b) - ↑(c b) * l ≤ ε * ↑(c b)\nM : ℕ := max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1))))\nn : ℕ\nhn :\n  n ∈ Set.Ici (max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1)))))\nexN : ∃ N, n < c N\nN : ℕ := Nat.find exN\nncN : n < c N\naN : a + 1 ≤ N\nNpos : 0 < N\ncNn : c (N - 1) ≤ n\n⊢ u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\n[PROOFSTEP]\nhave IcN : (c N : ℝ) ≤ (1 + ε) * c (N - 1) :=\n  by\n  have A : a ≤ N - 1 := by\n    apply @Nat.le_of_add_le_add_right a 1 (N - 1)\n    rw [Nat.sub_add_cancel Npos]\n    exact aN\n  have B : N - 1 + 1 = N := Nat.succ_pred_eq_of_pos Npos\n  have := (ha _ A).1\n  rwa [B] at this \n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nL : ∀ᶠ (n : ℕ) in atTop, u (c n) - ↑(c n) * l ≤ ε * ↑(c n)\na : ℕ\nha : ∀ (b : ℕ), a ≤ b → ↑(c (b + 1)) ≤ (1 + ε) * ↑(c b) ∧ u (c b) - ↑(c b) * l ≤ ε * ↑(c b)\nM : ℕ := max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1))))\nn : ℕ\nhn :\n  n ∈ Set.Ici (max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1)))))\nexN : ∃ N, n < c N\nN : ℕ := Nat.find exN\nncN : n < c N\naN : a + 1 ≤ N\nNpos : 0 < N\ncNn : c (N - 1) ≤ n\n⊢ ↑(c N) ≤ (1 + ε) * ↑(c (N - 1))\n[PROOFSTEP]\nhave A : a ≤ N - 1 := by\n  apply @Nat.le_of_add_le_add_right a 1 (N - 1)\n  rw [Nat.sub_add_cancel Npos]\n  exact aN\n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nL : ∀ᶠ (n : ℕ) in atTop, u (c n) - ↑(c n) * l ≤ ε * ↑(c n)\na : ℕ\nha : ∀ (b : ℕ), a ≤ b → ↑(c (b + 1)) ≤ (1 + ε) * ↑(c b) ∧ u (c b) - ↑(c b) * l ≤ ε * ↑(c b)\nM : ℕ := max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1))))\nn : ℕ\nhn :\n  n ∈ Set.Ici (max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1)))))\nexN : ∃ N, n < c N\nN : ℕ := Nat.find exN\nncN : n < c N\naN : a + 1 ≤ N\nNpos : 0 < N\ncNn : c (N - 1) ≤ n\n⊢ a ≤ N - 1\n[PROOFSTEP]\napply @Nat.le_of_add_le_add_right a 1 (N - 1)\n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nL : ∀ᶠ (n : ℕ) in atTop, u (c n) - ↑(c n) * l ≤ ε * ↑(c n)\na : ℕ\nha : ∀ (b : ℕ), a ≤ b → ↑(c (b + 1)) ≤ (1 + ε) * ↑(c b) ∧ u (c b) - ↑(c b) * l ≤ ε * ↑(c b)\nM : ℕ := max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1))))\nn : ℕ\nhn :\n  n ∈ Set.Ici (max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1)))))\nexN : ∃ N, n < c N\nN : ℕ := Nat.find exN\nncN : n < c N\naN : a + 1 ≤ N\nNpos : 0 < N\ncNn : c (N - 1) ≤ n\n⊢ a + 1 ≤ N - 1 + 1\n[PROOFSTEP]\nrw [Nat.sub_add_cancel Npos]\n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nL : ∀ᶠ (n : ℕ) in atTop, u (c n) - ↑(c n) * l ≤ ε * ↑(c n)\na : ℕ\nha : ∀ (b : ℕ), a ≤ b → ↑(c (b + 1)) ≤ (1 + ε) * ↑(c b) ∧ u (c b) - ↑(c b) * l ≤ ε * ↑(c b)\nM : ℕ := max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1))))\nn : ℕ\nhn :\n  n ∈ Set.Ici (max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1)))))\nexN : ∃ N, n < c N\nN : ℕ := Nat.find exN\nncN : n < c N\naN : a + 1 ≤ N\nNpos : 0 < N\ncNn : c (N - 1) ≤ n\n⊢ a + 1 ≤ N\n[PROOFSTEP]\nexact aN\n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nL : ∀ᶠ (n : ℕ) in atTop, u (c n) - ↑(c n) * l ≤ ε * ↑(c n)\na : ℕ\nha : ∀ (b : ℕ), a ≤ b → ↑(c (b + 1)) ≤ (1 + ε) * ↑(c b) ∧ u (c b) - ↑(c b) * l ≤ ε * ↑(c b)\nM : ℕ := max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1))))\nn : ℕ\nhn :\n  n ∈ Set.Ici (max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1)))))\nexN : ∃ N, n < c N\nN : ℕ := Nat.find exN\nncN : n < c N\naN : a + 1 ≤ N\nNpos : 0 < N\ncNn : c (N - 1) ≤ n\nA : a ≤ N - 1\n⊢ ↑(c N) ≤ (1 + ε) * ↑(c (N - 1))\n[PROOFSTEP]\nhave B : N - 1 + 1 = N := Nat.succ_pred_eq_of_pos Npos\n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nL : ∀ᶠ (n : ℕ) in atTop, u (c n) - ↑(c n) * l ≤ ε * ↑(c n)\na : ℕ\nha : ∀ (b : ℕ), a ≤ b → ↑(c (b + 1)) ≤ (1 + ε) * ↑(c b) ∧ u (c b) - ↑(c b) * l ≤ ε * ↑(c b)\nM : ℕ := max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1))))\nn : ℕ\nhn :\n  n ∈ Set.Ici (max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1)))))\nexN : ∃ N, n < c N\nN : ℕ := Nat.find exN\nncN : n < c N\naN : a + 1 ≤ N\nNpos : 0 < N\ncNn : c (N - 1) ≤ n\nA : a ≤ N - 1\nB : N - 1 + 1 = N\n⊢ ↑(c N) ≤ (1 + ε) * ↑(c (N - 1))\n[PROOFSTEP]\nhave := (ha _ A).1\n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nL : ∀ᶠ (n : ℕ) in atTop, u (c n) - ↑(c n) * l ≤ ε * ↑(c n)\na : ℕ\nha : ∀ (b : ℕ), a ≤ b → ↑(c (b + 1)) ≤ (1 + ε) * ↑(c b) ∧ u (c b) - ↑(c b) * l ≤ ε * ↑(c b)\nM : ℕ := max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1))))\nn : ℕ\nhn :\n  n ∈ Set.Ici (max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1)))))\nexN : ∃ N, n < c N\nN : ℕ := Nat.find exN\nncN : n < c N\naN : a + 1 ≤ N\nNpos : 0 < N\ncNn : c (N - 1) ≤ n\nA : a ≤ N - 1\nB : N - 1 + 1 = N\nthis : ↑(c (N - 1 + 1)) ≤ (1 + ε) * ↑(c (N - 1))\n⊢ ↑(c N) ≤ (1 + ε) * ↑(c (N - 1))\n[PROOFSTEP]\nrwa [B] at this \n[GOAL]\ncase h\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nL : ∀ᶠ (n : ℕ) in atTop, u (c n) - ↑(c n) * l ≤ ε * ↑(c n)\na : ℕ\nha : ∀ (b : ℕ), a ≤ b → ↑(c (b + 1)) ≤ (1 + ε) * ↑(c b) ∧ u (c b) - ↑(c b) * l ≤ ε * ↑(c b)\nM : ℕ := max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1))))\nn : ℕ\nhn :\n  n ∈ Set.Ici (max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1)))))\nexN : ∃ N, n < c N\nN : ℕ := Nat.find exN\nncN : n < c N\naN : a + 1 ≤ N\nNpos : 0 < N\ncNn : c (N - 1) ≤ n\nIcN : ↑(c N) ≤ (1 + ε) * ↑(c (N - 1))\n⊢ u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\n[PROOFSTEP]\ncalc\n  u n - n * l ≤ u (c N) - c (N - 1) * l := by\n    apply sub_le_sub (hmono ncN.le)\n    apply mul_le_mul_of_nonneg_right (Nat.cast_le.2 cNn) lnonneg\n  _ = u (c N) - c N * l + (c N - c (N - 1)) * l := by ring\n  _ ≤ ε * c N + ε * c (N - 1) * l := by\n    apply add_le_add\n    · apply (ha _ _).2\n      exact le_trans (by simp only [le_add_iff_nonneg_right, zero_le']) aN\n    · apply mul_le_mul_of_nonneg_right _ lnonneg\n      linarith only [IcN]\n  _ ≤ ε * ((1 + ε) * c (N - 1)) + ε * c (N - 1) * l := (add_le_add (mul_le_mul_of_nonneg_left IcN εpos.le) le_rfl)\n  _ = ε * (1 + ε + l) * c (N - 1) := by ring\n  _ ≤ ε * (1 + ε + l) * n := by\n    refine' mul_le_mul_of_nonneg_left (Nat.cast_le.2 cNn) _\n    apply mul_nonneg εpos.le\n    linarith only [εpos, lnonneg]\n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nL : ∀ᶠ (n : ℕ) in atTop, u (c n) - ↑(c n) * l ≤ ε * ↑(c n)\na : ℕ\nha : ∀ (b : ℕ), a ≤ b → ↑(c (b + 1)) ≤ (1 + ε) * ↑(c b) ∧ u (c b) - ↑(c b) * l ≤ ε * ↑(c b)\nM : ℕ := max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1))))\nn : ℕ\nhn :\n  n ∈ Set.Ici (max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1)))))\nexN : ∃ N, n < c N\nN : ℕ := Nat.find exN\nncN : n < c N\naN : a + 1 ≤ N\nNpos : 0 < N\ncNn : c (N - 1) ≤ n\nIcN : ↑(c N) ≤ (1 + ε) * ↑(c (N - 1))\n⊢ u n - ↑n * l ≤ u (c N) - ↑(c (N - 1)) * l\n[PROOFSTEP]\napply sub_le_sub (hmono ncN.le)\n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nL : ∀ᶠ (n : ℕ) in atTop, u (c n) - ↑(c n) * l ≤ ε * ↑(c n)\na : ℕ\nha : ∀ (b : ℕ), a ≤ b → ↑(c (b + 1)) ≤ (1 + ε) * ↑(c b) ∧ u (c b) - ↑(c b) * l ≤ ε * ↑(c b)\nM : ℕ := max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1))))\nn : ℕ\nhn :\n  n ∈ Set.Ici (max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1)))))\nexN : ∃ N, n < c N\nN : ℕ := Nat.find exN\nncN : n < c N\naN : a + 1 ≤ N\nNpos : 0 < N\ncNn : c (N - 1) ≤ n\nIcN : ↑(c N) ≤ (1 + ε) * ↑(c (N - 1))\n⊢ ↑(c (N - 1)) * l ≤ ↑n * l\n[PROOFSTEP]\napply mul_le_mul_of_nonneg_right (Nat.cast_le.2 cNn) lnonneg\n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nL : ∀ᶠ (n : ℕ) in atTop, u (c n) - ↑(c n) * l ≤ ε * ↑(c n)\na : ℕ\nha : ∀ (b : ℕ), a ≤ b → ↑(c (b + 1)) ≤ (1 + ε) * ↑(c b) ∧ u (c b) - ↑(c b) * l ≤ ε * ↑(c b)\nM : ℕ := max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1))))\nn : ℕ\nhn :\n  n ∈ Set.Ici (max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1)))))\nexN : ∃ N, n < c N\nN : ℕ := Nat.find exN\nncN : n < c N\naN : a + 1 ≤ N\nNpos : 0 < N\ncNn : c (N - 1) ≤ n\nIcN : ↑(c N) ≤ (1 + ε) * ↑(c (N - 1))\n⊢ u (c N) - ↑(c (N - 1)) * l = u (c N) - ↑(c N) * l + (↑(c N) - ↑(c (N - 1))) * l\n[PROOFSTEP]\nring\n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nL : ∀ᶠ (n : ℕ) in atTop, u (c n) - ↑(c n) * l ≤ ε * ↑(c n)\na : ℕ\nha : ∀ (b : ℕ), a ≤ b → ↑(c (b + 1)) ≤ (1 + ε) * ↑(c b) ∧ u (c b) - ↑(c b) * l ≤ ε * ↑(c b)\nM : ℕ := max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1))))\nn : ℕ\nhn :\n  n ∈ Set.Ici (max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1)))))\nexN : ∃ N, n < c N\nN : ℕ := Nat.find exN\nncN : n < c N\naN : a + 1 ≤ N\nNpos : 0 < N\ncNn : c (N - 1) ≤ n\nIcN : ↑(c N) ≤ (1 + ε) * ↑(c (N - 1))\n⊢ u (c N) - ↑(c N) * l + (↑(c N) - ↑(c (N - 1))) * l ≤ ε * ↑(c N) + ε * ↑(c (N - 1)) * l\n[PROOFSTEP]\napply add_le_add\n[GOAL]\ncase h₁\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nL : ∀ᶠ (n : ℕ) in atTop, u (c n) - ↑(c n) * l ≤ ε * ↑(c n)\na : ℕ\nha : ∀ (b : ℕ), a ≤ b → ↑(c (b + 1)) ≤ (1 + ε) * ↑(c b) ∧ u (c b) - ↑(c b) * l ≤ ε * ↑(c b)\nM : ℕ := max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1))))\nn : ℕ\nhn :\n  n ∈ Set.Ici (max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1)))))\nexN : ∃ N, n < c N\nN : ℕ := Nat.find exN\nncN : n < c N\naN : a + 1 ≤ N\nNpos : 0 < N\ncNn : c (N - 1) ≤ n\nIcN : ↑(c N) ≤ (1 + ε) * ↑(c (N - 1))\n⊢ u (c N) - ↑(c N) * l ≤ ε * ↑(c N)\n[PROOFSTEP]\napply (ha _ _).2\n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nL : ∀ᶠ (n : ℕ) in atTop, u (c n) - ↑(c n) * l ≤ ε * ↑(c n)\na : ℕ\nha : ∀ (b : ℕ), a ≤ b → ↑(c (b + 1)) ≤ (1 + ε) * ↑(c b) ∧ u (c b) - ↑(c b) * l ≤ ε * ↑(c b)\nM : ℕ := max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1))))\nn : ℕ\nhn :\n  n ∈ Set.Ici (max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1)))))\nexN : ∃ N, n < c N\nN : ℕ := Nat.find exN\nncN : n < c N\naN : a + 1 ≤ N\nNpos : 0 < N\ncNn : c (N - 1) ≤ n\nIcN : ↑(c N) ≤ (1 + ε) * ↑(c (N - 1))\n⊢ a ≤ N\n[PROOFSTEP]\nexact le_trans (by simp only [le_add_iff_nonneg_right, zero_le']) aN\n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nL : ∀ᶠ (n : ℕ) in atTop, u (c n) - ↑(c n) * l ≤ ε * ↑(c n)\na : ℕ\nha : ∀ (b : ℕ), a ≤ b → ↑(c (b + 1)) ≤ (1 + ε) * ↑(c b) ∧ u (c b) - ↑(c b) * l ≤ ε * ↑(c b)\nM : ℕ := max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1))))\nn : ℕ\nhn :\n  n ∈ Set.Ici (max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1)))))\nexN : ∃ N, n < c N\nN : ℕ := Nat.find exN\nncN : n < c N\naN : a + 1 ≤ N\nNpos : 0 < N\ncNn : c (N - 1) ≤ n\nIcN : ↑(c N) ≤ (1 + ε) * ↑(c (N - 1))\n⊢ a ≤ a + 1\n[PROOFSTEP]\nsimp only [le_add_iff_nonneg_right, zero_le']\n[GOAL]\ncase h₂\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nL : ∀ᶠ (n : ℕ) in atTop, u (c n) - ↑(c n) * l ≤ ε * ↑(c n)\na : ℕ\nha : ∀ (b : ℕ), a ≤ b → ↑(c (b + 1)) ≤ (1 + ε) * ↑(c b) ∧ u (c b) - ↑(c b) * l ≤ ε * ↑(c b)\nM : ℕ := max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1))))\nn : ℕ\nhn :\n  n ∈ Set.Ici (max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1)))))\nexN : ∃ N, n < c N\nN : ℕ := Nat.find exN\nncN : n < c N\naN : a + 1 ≤ N\nNpos : 0 < N\ncNn : c (N - 1) ≤ n\nIcN : ↑(c N) ≤ (1 + ε) * ↑(c (N - 1))\n⊢ (↑(c N) - ↑(c (N - 1))) * l ≤ ε * ↑(c (N - 1)) * l\n[PROOFSTEP]\napply mul_le_mul_of_nonneg_right _ lnonneg\n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nL : ∀ᶠ (n : ℕ) in atTop, u (c n) - ↑(c n) * l ≤ ε * ↑(c n)\na : ℕ\nha : ∀ (b : ℕ), a ≤ b → ↑(c (b + 1)) ≤ (1 + ε) * ↑(c b) ∧ u (c b) - ↑(c b) * l ≤ ε * ↑(c b)\nM : ℕ := max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1))))\nn : ℕ\nhn :\n  n ∈ Set.Ici (max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1)))))\nexN : ∃ N, n < c N\nN : ℕ := Nat.find exN\nncN : n < c N\naN : a + 1 ≤ N\nNpos : 0 < N\ncNn : c (N - 1) ≤ n\nIcN : ↑(c N) ≤ (1 + ε) * ↑(c (N - 1))\n⊢ ↑(c N) - ↑(c (N - 1)) ≤ ε * ↑(c (N - 1))\n[PROOFSTEP]\nlinarith only [IcN]\n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nL : ∀ᶠ (n : ℕ) in atTop, u (c n) - ↑(c n) * l ≤ ε * ↑(c n)\na : ℕ\nha : ∀ (b : ℕ), a ≤ b → ↑(c (b + 1)) ≤ (1 + ε) * ↑(c b) ∧ u (c b) - ↑(c b) * l ≤ ε * ↑(c b)\nM : ℕ := max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1))))\nn : ℕ\nhn :\n  n ∈ Set.Ici (max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1)))))\nexN : ∃ N, n < c N\nN : ℕ := Nat.find exN\nncN : n < c N\naN : a + 1 ≤ N\nNpos : 0 < N\ncNn : c (N - 1) ≤ n\nIcN : ↑(c N) ≤ (1 + ε) * ↑(c (N - 1))\n⊢ ε * ((1 + ε) * ↑(c (N - 1))) + ε * ↑(c (N - 1)) * l = ε * (1 + ε + l) * ↑(c (N - 1))\n[PROOFSTEP]\nring\n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nL : ∀ᶠ (n : ℕ) in atTop, u (c n) - ↑(c n) * l ≤ ε * ↑(c n)\na : ℕ\nha : ∀ (b : ℕ), a ≤ b → ↑(c (b + 1)) ≤ (1 + ε) * ↑(c b) ∧ u (c b) - ↑(c b) * l ≤ ε * ↑(c b)\nM : ℕ := max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1))))\nn : ℕ\nhn :\n  n ∈ Set.Ici (max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1)))))\nexN : ∃ N, n < c N\nN : ℕ := Nat.find exN\nncN : n < c N\naN : a + 1 ≤ N\nNpos : 0 < N\ncNn : c (N - 1) ≤ n\nIcN : ↑(c N) ≤ (1 + ε) * ↑(c (N - 1))\n⊢ ε * (1 + ε + l) * ↑(c (N - 1)) ≤ ε * (1 + ε + l) * ↑n\n[PROOFSTEP]\nrefine' mul_le_mul_of_nonneg_left (Nat.cast_le.2 cNn) _\n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nL : ∀ᶠ (n : ℕ) in atTop, u (c n) - ↑(c n) * l ≤ ε * ↑(c n)\na : ℕ\nha : ∀ (b : ℕ), a ≤ b → ↑(c (b + 1)) ≤ (1 + ε) * ↑(c b) ∧ u (c b) - ↑(c b) * l ≤ ε * ↑(c b)\nM : ℕ := max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1))))\nn : ℕ\nhn :\n  n ∈ Set.Ici (max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1)))))\nexN : ∃ N, n < c N\nN : ℕ := Nat.find exN\nncN : n < c N\naN : a + 1 ≤ N\nNpos : 0 < N\ncNn : c (N - 1) ≤ n\nIcN : ↑(c N) ≤ (1 + ε) * ↑(c (N - 1))\n⊢ 0 ≤ ε * (1 + ε + l)\n[PROOFSTEP]\napply mul_nonneg εpos.le\n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nL : ∀ᶠ (n : ℕ) in atTop, u (c n) - ↑(c n) * l ≤ ε * ↑(c n)\na : ℕ\nha : ∀ (b : ℕ), a ≤ b → ↑(c (b + 1)) ≤ (1 + ε) * ↑(c b) ∧ u (c b) - ↑(c b) * l ≤ ε * ↑(c b)\nM : ℕ := max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1))))\nn : ℕ\nhn :\n  n ∈ Set.Ici (max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1)))))\nexN : ∃ N, n < c N\nN : ℕ := Nat.find exN\nncN : n < c N\naN : a + 1 ≤ N\nNpos : 0 < N\ncNn : c (N - 1) ≤ n\nIcN : ↑(c N) ≤ (1 + ε) * ↑(c (N - 1))\n⊢ 0 ≤ 1 + ε + l\n[PROOFSTEP]\nlinarith only [εpos, lnonneg]\n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nA : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\n⊢ Tendsto (fun n => u n / ↑n) atTop (𝓝 l)\n[PROOFSTEP]\nhave B : ∀ ε : ℝ, 0 < ε → ∀ᶠ n : ℕ in atTop, (n : ℝ) * l - u n ≤ ε * (1 + l) * n :=\n  by\n  intro ε εpos\n  rcases hlim (1 + ε) ((lt_add_iff_pos_right _).2 εpos) with ⟨c, cgrowth, ctop, clim⟩\n  have L : ∀ᶠ n : ℕ in atTop, (c n : ℝ) * l - u (c n) ≤ ε * c n :=\n    by\n    rw [← tendsto_sub_nhds_zero_iff, ← Asymptotics.isLittleO_one_iff ℝ, Asymptotics.isLittleO_iff] at clim \n    filter_upwards [clim εpos, ctop (Ioi_mem_atTop 0)] with n hn cnpos'\n    have cnpos : 0 < c n := cnpos'\n    calc\n      (c n : ℝ) * l - u (c n) = -(u (c n) / c n - l) * c n := by\n        simp only [cnpos.ne', Ne.def, Nat.cast_eq_zero, not_false_iff, neg_sub, field_simps]\n      _ ≤ ε * c n := by\n        refine' mul_le_mul_of_nonneg_right _ (Nat.cast_nonneg _)\n        simp only [mul_one, Real.norm_eq_abs, abs_one] at hn \n        exact le_trans (neg_le_abs_self _) hn\n  obtain ⟨a, ha⟩ : ∃ a : ℕ, ∀ b : ℕ, a ≤ b → (c (b + 1) : ℝ) ≤ (1 + ε) * c b ∧ (c b : ℝ) * l - u (c b) ≤ ε * c b :=\n    eventually_atTop.1 (cgrowth.and L)\n  let M := ((Finset.range (a + 1)).image fun i => c i).max' (by simp)\n  filter_upwards [Ici_mem_atTop M] with n hn\n  have exN : ∃ N, n < c N := by\n    rcases(tendsto_atTop.1 ctop (n + 1)).exists with ⟨N, hN⟩\n    exact ⟨N, by linarith only [hN]⟩\n  let N := Nat.find exN\n  have ncN : n < c N := Nat.find_spec exN\n  have aN : a + 1 ≤ N := by\n    by_contra' h\n    have cNM : c N ≤ M := by\n      apply le_max'\n      apply mem_image_of_mem\n      exact mem_range.2 h\n    exact lt_irrefl _ ((cNM.trans hn).trans_lt ncN)\n  have Npos : 0 < N := lt_of_lt_of_le Nat.succ_pos' aN\n  have aN' : a ≤ N - 1 := by\n    apply @Nat.le_of_add_le_add_right a 1 (N - 1)\n    rw [Nat.sub_add_cancel Npos]\n    exact aN\n  have cNn : c (N - 1) ≤ n := by\n    have : N - 1 < N := Nat.pred_lt Npos.ne'\n    simpa only [not_lt] using Nat.find_min exN this\n  calc\n    (n : ℝ) * l - u n ≤ c N * l - u (c (N - 1)) :=\n      by\n      refine' add_le_add (mul_le_mul_of_nonneg_right (Nat.cast_le.2 ncN.le) lnonneg) _\n      exact neg_le_neg (hmono cNn)\n    _ ≤ (1 + ε) * c (N - 1) * l - u (c (N - 1)) :=\n      by\n      refine' add_le_add (mul_le_mul_of_nonneg_right _ lnonneg) le_rfl\n      have B : N - 1 + 1 = N := Nat.succ_pred_eq_of_pos Npos\n      have := (ha _ aN').1\n      rwa [B] at this \n    _ = c (N - 1) * l - u (c (N - 1)) + ε * c (N - 1) * l := by ring\n    _ ≤ ε * c (N - 1) + ε * c (N - 1) * l := (add_le_add (ha _ aN').2 le_rfl)\n    _ = ε * (1 + l) * c (N - 1) := by ring\n    _ ≤ ε * (1 + l) * n := by\n      refine' mul_le_mul_of_nonneg_left (Nat.cast_le.2 cNn) _\n      exact mul_nonneg εpos.le (add_nonneg zero_le_one lnonneg)\n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nA : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\n⊢ ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, ↑n * l - u n ≤ ε * (1 + l) * ↑n\n[PROOFSTEP]\nintro ε εpos\n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nA : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\nε : ℝ\nεpos : 0 < ε\n⊢ ∀ᶠ (n : ℕ) in atTop, ↑n * l - u n ≤ ε * (1 + l) * ↑n\n[PROOFSTEP]\nrcases hlim (1 + ε) ((lt_add_iff_pos_right _).2 εpos) with ⟨c, cgrowth, ctop, clim⟩\n[GOAL]\ncase intro.intro.intro\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nA : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\n⊢ ∀ᶠ (n : ℕ) in atTop, ↑n * l - u n ≤ ε * (1 + l) * ↑n\n[PROOFSTEP]\nhave L : ∀ᶠ n : ℕ in atTop, (c n : ℝ) * l - u (c n) ≤ ε * c n :=\n  by\n  rw [← tendsto_sub_nhds_zero_iff, ← Asymptotics.isLittleO_one_iff ℝ, Asymptotics.isLittleO_iff] at clim \n  filter_upwards [clim εpos, ctop (Ioi_mem_atTop 0)] with n hn cnpos'\n  have cnpos : 0 < c n := cnpos'\n  calc\n    (c n : ℝ) * l - u (c n) = -(u (c n) / c n - l) * c n := by\n      simp only [cnpos.ne', Ne.def, Nat.cast_eq_zero, not_false_iff, neg_sub, field_simps]\n    _ ≤ ε * c n := by\n      refine' mul_le_mul_of_nonneg_right _ (Nat.cast_nonneg _)\n      simp only [mul_one, Real.norm_eq_abs, abs_one] at hn \n      exact le_trans (neg_le_abs_self _) hn\n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nA : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\n⊢ ∀ᶠ (n : ℕ) in atTop, ↑(c n) * l - u (c n) ≤ ε * ↑(c n)\n[PROOFSTEP]\nrw [← tendsto_sub_nhds_zero_iff, ← Asymptotics.isLittleO_one_iff ℝ, Asymptotics.isLittleO_iff] at clim \n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nA : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim✝ : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nclim : ∀ ⦃c_1 : ℝ⦄, 0 < c_1 → ∀ᶠ (x : ℕ) in atTop, ‖u (c x) / ↑(c x) - l‖ ≤ c_1 * ‖1‖\n⊢ ∀ᶠ (n : ℕ) in atTop, ↑(c n) * l - u (c n) ≤ ε * ↑(c n)\n[PROOFSTEP]\nfilter_upwards [clim εpos, ctop (Ioi_mem_atTop 0)] with n hn cnpos'\n[GOAL]\ncase h\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nA : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim✝ : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nclim : ∀ ⦃c_1 : ℝ⦄, 0 < c_1 → ∀ᶠ (x : ℕ) in atTop, ‖u (c x) / ↑(c x) - l‖ ≤ c_1 * ‖1‖\nn : ℕ\nhn : ‖u (c n) / ↑(c n) - l‖ ≤ ε * ‖1‖\ncnpos' : n ∈ c ⁻¹' Set.Ioi 0\n⊢ ↑(c n) * l - u (c n) ≤ ε * ↑(c n)\n[PROOFSTEP]\nhave cnpos : 0 < c n := cnpos'\n[GOAL]\ncase h\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nA : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim✝ : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nclim : ∀ ⦃c_1 : ℝ⦄, 0 < c_1 → ∀ᶠ (x : ℕ) in atTop, ‖u (c x) / ↑(c x) - l‖ ≤ c_1 * ‖1‖\nn : ℕ\nhn : ‖u (c n) / ↑(c n) - l‖ ≤ ε * ‖1‖\ncnpos' : n ∈ c ⁻¹' Set.Ioi 0\ncnpos : 0 < c n\n⊢ ↑(c n) * l - u (c n) ≤ ε * ↑(c n)\n[PROOFSTEP]\ncalc\n  (c n : ℝ) * l - u (c n) = -(u (c n) / c n - l) * c n := by\n    simp only [cnpos.ne', Ne.def, Nat.cast_eq_zero, not_false_iff, neg_sub, field_simps]\n  _ ≤ ε * c n := by\n    refine' mul_le_mul_of_nonneg_right _ (Nat.cast_nonneg _)\n    simp only [mul_one, Real.norm_eq_abs, abs_one] at hn \n    exact le_trans (neg_le_abs_self _) hn\n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nA : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim✝ : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nclim : ∀ ⦃c_1 : ℝ⦄, 0 < c_1 → ∀ᶠ (x : ℕ) in atTop, ‖u (c x) / ↑(c x) - l‖ ≤ c_1 * ‖1‖\nn : ℕ\nhn : ‖u (c n) / ↑(c n) - l‖ ≤ ε * ‖1‖\ncnpos' : n ∈ c ⁻¹' Set.Ioi 0\ncnpos : 0 < c n\n⊢ ↑(c n) * l - u (c n) = -(u (c n) / ↑(c n) - l) * ↑(c n)\n[PROOFSTEP]\nsimp only [cnpos.ne', Ne.def, Nat.cast_eq_zero, not_false_iff, neg_sub, field_simps]\n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nA : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim✝ : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nclim : ∀ ⦃c_1 : ℝ⦄, 0 < c_1 → ∀ᶠ (x : ℕ) in atTop, ‖u (c x) / ↑(c x) - l‖ ≤ c_1 * ‖1‖\nn : ℕ\nhn : ‖u (c n) / ↑(c n) - l‖ ≤ ε * ‖1‖\ncnpos' : n ∈ c ⁻¹' Set.Ioi 0\ncnpos : 0 < c n\n⊢ -(u (c n) / ↑(c n) - l) * ↑(c n) ≤ ε * ↑(c n)\n[PROOFSTEP]\nrefine' mul_le_mul_of_nonneg_right _ (Nat.cast_nonneg _)\n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nA : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim✝ : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nclim : ∀ ⦃c_1 : ℝ⦄, 0 < c_1 → ∀ᶠ (x : ℕ) in atTop, ‖u (c x) / ↑(c x) - l‖ ≤ c_1 * ‖1‖\nn : ℕ\nhn : ‖u (c n) / ↑(c n) - l‖ ≤ ε * ‖1‖\ncnpos' : n ∈ c ⁻¹' Set.Ioi 0\ncnpos : 0 < c n\n⊢ -(u (c n) / ↑(c n) - l) ≤ ε\n[PROOFSTEP]\nsimp only [mul_one, Real.norm_eq_abs, abs_one] at hn \n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nA : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim✝ : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nclim : ∀ ⦃c_1 : ℝ⦄, 0 < c_1 → ∀ᶠ (x : ℕ) in atTop, ‖u (c x) / ↑(c x) - l‖ ≤ c_1 * ‖1‖\nn : ℕ\ncnpos' : n ∈ c ⁻¹' Set.Ioi 0\ncnpos : 0 < c n\nhn : |u (c n) / ↑(c n) - l| ≤ ε\n⊢ -(u (c n) / ↑(c n) - l) ≤ ε\n[PROOFSTEP]\nexact le_trans (neg_le_abs_self _) hn\n[GOAL]\ncase intro.intro.intro\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nA : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nL : ∀ᶠ (n : ℕ) in atTop, ↑(c n) * l - u (c n) ≤ ε * ↑(c n)\n⊢ ∀ᶠ (n : ℕ) in atTop, ↑n * l - u n ≤ ε * (1 + l) * ↑n\n[PROOFSTEP]\nobtain ⟨a, ha⟩ : ∃ a : ℕ, ∀ b : ℕ, a ≤ b → (c (b + 1) : ℝ) ≤ (1 + ε) * c b ∧ (c b : ℝ) * l - u (c b) ≤ ε * c b :=\n  eventually_atTop.1 (cgrowth.and L)\n[GOAL]\ncase intro.intro.intro.intro\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nA : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nL : ∀ᶠ (n : ℕ) in atTop, ↑(c n) * l - u (c n) ≤ ε * ↑(c n)\na : ℕ\nha : ∀ (b : ℕ), a ≤ b → ↑(c (b + 1)) ≤ (1 + ε) * ↑(c b) ∧ ↑(c b) * l - u (c b) ≤ ε * ↑(c b)\n⊢ ∀ᶠ (n : ℕ) in atTop, ↑n * l - u n ≤ ε * (1 + l) * ↑n\n[PROOFSTEP]\nlet M := ((Finset.range (a + 1)).image fun i => c i).max' (by simp)\n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nA : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nL : ∀ᶠ (n : ℕ) in atTop, ↑(c n) * l - u (c n) ≤ ε * ↑(c n)\na : ℕ\nha : ∀ (b : ℕ), a ≤ b → ↑(c (b + 1)) ≤ (1 + ε) * ↑(c b) ∧ ↑(c b) * l - u (c b) ≤ ε * ↑(c b)\n⊢ Finset.Nonempty (image (fun i => c i) (range (a + 1)))\n[PROOFSTEP]\nsimp\n[GOAL]\ncase intro.intro.intro.intro\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nA : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nL : ∀ᶠ (n : ℕ) in atTop, ↑(c n) * l - u (c n) ≤ ε * ↑(c n)\na : ℕ\nha : ∀ (b : ℕ), a ≤ b → ↑(c (b + 1)) ≤ (1 + ε) * ↑(c b) ∧ ↑(c b) * l - u (c b) ≤ ε * ↑(c b)\nM : ℕ := max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1))))\n⊢ ∀ᶠ (n : ℕ) in atTop, ↑n * l - u n ≤ ε * (1 + l) * ↑n\n[PROOFSTEP]\nfilter_upwards [Ici_mem_atTop M] with n hn\n[GOAL]\ncase h\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nA : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nL : ∀ᶠ (n : ℕ) in atTop, ↑(c n) * l - u (c n) ≤ ε * ↑(c n)\na : ℕ\nha : ∀ (b : ℕ), a ≤ b → ↑(c (b + 1)) ≤ (1 + ε) * ↑(c b) ∧ ↑(c b) * l - u (c b) ≤ ε * ↑(c b)\nM : ℕ := max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1))))\nn : ℕ\nhn :\n  n ∈ Set.Ici (max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1)))))\n⊢ ↑n * l - u n ≤ ε * (1 + l) * ↑n\n[PROOFSTEP]\nhave exN : ∃ N, n < c N := by\n  rcases(tendsto_atTop.1 ctop (n + 1)).exists with ⟨N, hN⟩\n  exact ⟨N, by linarith only [hN]⟩\n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nA : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nL : ∀ᶠ (n : ℕ) in atTop, ↑(c n) * l - u (c n) ≤ ε * ↑(c n)\na : ℕ\nha : ∀ (b : ℕ), a ≤ b → ↑(c (b + 1)) ≤ (1 + ε) * ↑(c b) ∧ ↑(c b) * l - u (c b) ≤ ε * ↑(c b)\nM : ℕ := max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1))))\nn : ℕ\nhn :\n  n ∈ Set.Ici (max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1)))))\n⊢ ∃ N, n < c N\n[PROOFSTEP]\nrcases(tendsto_atTop.1 ctop (n + 1)).exists with ⟨N, hN⟩\n[GOAL]\ncase intro\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nA : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nL : ∀ᶠ (n : ℕ) in atTop, ↑(c n) * l - u (c n) ≤ ε * ↑(c n)\na : ℕ\nha : ∀ (b : ℕ), a ≤ b → ↑(c (b + 1)) ≤ (1 + ε) * ↑(c b) ∧ ↑(c b) * l - u (c b) ≤ ε * ↑(c b)\nM : ℕ := max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1))))\nn : ℕ\nhn :\n  n ∈ Set.Ici (max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1)))))\nN : ℕ\nhN : n + 1 ≤ c N\n⊢ ∃ N, n < c N\n[PROOFSTEP]\nexact ⟨N, by linarith only [hN]⟩\n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nA : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nL : ∀ᶠ (n : ℕ) in atTop, ↑(c n) * l - u (c n) ≤ ε * ↑(c n)\na : ℕ\nha : ∀ (b : ℕ), a ≤ b → ↑(c (b + 1)) ≤ (1 + ε) * ↑(c b) ∧ ↑(c b) * l - u (c b) ≤ ε * ↑(c b)\nM : ℕ := max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1))))\nn : ℕ\nhn :\n  n ∈ Set.Ici (max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1)))))\nN : ℕ\nhN : n + 1 ≤ c N\n⊢ n < c N\n[PROOFSTEP]\nlinarith only [hN]\n[GOAL]\ncase h\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nA : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nL : ∀ᶠ (n : ℕ) in atTop, ↑(c n) * l - u (c n) ≤ ε * ↑(c n)\na : ℕ\nha : ∀ (b : ℕ), a ≤ b → ↑(c (b + 1)) ≤ (1 + ε) * ↑(c b) ∧ ↑(c b) * l - u (c b) ≤ ε * ↑(c b)\nM : ℕ := max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1))))\nn : ℕ\nhn :\n  n ∈ Set.Ici (max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1)))))\nexN : ∃ N, n < c N\n⊢ ↑n * l - u n ≤ ε * (1 + l) * ↑n\n[PROOFSTEP]\nlet N := Nat.find exN\n[GOAL]\ncase h\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nA : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nL : ∀ᶠ (n : ℕ) in atTop, ↑(c n) * l - u (c n) ≤ ε * ↑(c n)\na : ℕ\nha : ∀ (b : ℕ), a ≤ b → ↑(c (b + 1)) ≤ (1 + ε) * ↑(c b) ∧ ↑(c b) * l - u (c b) ≤ ε * ↑(c b)\nM : ℕ := max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1))))\nn : ℕ\nhn :\n  n ∈ Set.Ici (max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1)))))\nexN : ∃ N, n < c N\nN : ℕ := Nat.find exN\n⊢ ↑n * l - u n ≤ ε * (1 + l) * ↑n\n[PROOFSTEP]\nhave ncN : n < c N := Nat.find_spec exN\n[GOAL]\ncase h\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nA : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nL : ∀ᶠ (n : ℕ) in atTop, ↑(c n) * l - u (c n) ≤ ε * ↑(c n)\na : ℕ\nha : ∀ (b : ℕ), a ≤ b → ↑(c (b + 1)) ≤ (1 + ε) * ↑(c b) ∧ ↑(c b) * l - u (c b) ≤ ε * ↑(c b)\nM : ℕ := max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1))))\nn : ℕ\nhn :\n  n ∈ Set.Ici (max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1)))))\nexN : ∃ N, n < c N\nN : ℕ := Nat.find exN\nncN : n < c N\n⊢ ↑n * l - u n ≤ ε * (1 + l) * ↑n\n[PROOFSTEP]\nhave aN : a + 1 ≤ N := by\n  by_contra' h\n  have cNM : c N ≤ M := by\n    apply le_max'\n    apply mem_image_of_mem\n    exact mem_range.2 h\n  exact lt_irrefl _ ((cNM.trans hn).trans_lt ncN)\n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nA : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nL : ∀ᶠ (n : ℕ) in atTop, ↑(c n) * l - u (c n) ≤ ε * ↑(c n)\na : ℕ\nha : ∀ (b : ℕ), a ≤ b → ↑(c (b + 1)) ≤ (1 + ε) * ↑(c b) ∧ ↑(c b) * l - u (c b) ≤ ε * ↑(c b)\nM : ℕ := max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1))))\nn : ℕ\nhn :\n  n ∈ Set.Ici (max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1)))))\nexN : ∃ N, n < c N\nN : ℕ := Nat.find exN\nncN : n < c N\n⊢ a + 1 ≤ N\n[PROOFSTEP]\nby_contra' h\n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nA : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nL : ∀ᶠ (n : ℕ) in atTop, ↑(c n) * l - u (c n) ≤ ε * ↑(c n)\na : ℕ\nha : ∀ (b : ℕ), a ≤ b → ↑(c (b + 1)) ≤ (1 + ε) * ↑(c b) ∧ ↑(c b) * l - u (c b) ≤ ε * ↑(c b)\nM : ℕ := max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1))))\nn : ℕ\nhn :\n  n ∈ Set.Ici (max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1)))))\nexN : ∃ N, n < c N\nN : ℕ := Nat.find exN\nncN : n < c N\nh : Nat.find exN < a + 1\n⊢ False\n[PROOFSTEP]\nhave cNM : c N ≤ M := by\n  apply le_max'\n  apply mem_image_of_mem\n  exact mem_range.2 h\n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nA : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nL : ∀ᶠ (n : ℕ) in atTop, ↑(c n) * l - u (c n) ≤ ε * ↑(c n)\na : ℕ\nha : ∀ (b : ℕ), a ≤ b → ↑(c (b + 1)) ≤ (1 + ε) * ↑(c b) ∧ ↑(c b) * l - u (c b) ≤ ε * ↑(c b)\nM : ℕ := max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1))))\nn : ℕ\nhn :\n  n ∈ Set.Ici (max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1)))))\nexN : ∃ N, n < c N\nN : ℕ := Nat.find exN\nncN : n < c N\nh : Nat.find exN < a + 1\n⊢ c N ≤ M\n[PROOFSTEP]\napply le_max'\n[GOAL]\ncase H2\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nA : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nL : ∀ᶠ (n : ℕ) in atTop, ↑(c n) * l - u (c n) ≤ ε * ↑(c n)\na : ℕ\nha : ∀ (b : ℕ), a ≤ b → ↑(c (b + 1)) ≤ (1 + ε) * ↑(c b) ∧ ↑(c b) * l - u (c b) ≤ ε * ↑(c b)\nM : ℕ := max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1))))\nn : ℕ\nhn :\n  n ∈ Set.Ici (max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1)))))\nexN : ∃ N, n < c N\nN : ℕ := Nat.find exN\nncN : n < c N\nh : Nat.find exN < a + 1\n⊢ c N ∈ image (fun i => c i) (range (a + 1))\n[PROOFSTEP]\napply mem_image_of_mem\n[GOAL]\ncase H2.h\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nA : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nL : ∀ᶠ (n : ℕ) in atTop, ↑(c n) * l - u (c n) ≤ ε * ↑(c n)\na : ℕ\nha : ∀ (b : ℕ), a ≤ b → ↑(c (b + 1)) ≤ (1 + ε) * ↑(c b) ∧ ↑(c b) * l - u (c b) ≤ ε * ↑(c b)\nM : ℕ := max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1))))\nn : ℕ\nhn :\n  n ∈ Set.Ici (max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1)))))\nexN : ∃ N, n < c N\nN : ℕ := Nat.find exN\nncN : n < c N\nh : Nat.find exN < a + 1\n⊢ N ∈ range (a + 1)\n[PROOFSTEP]\nexact mem_range.2 h\n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nA : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nL : ∀ᶠ (n : ℕ) in atTop, ↑(c n) * l - u (c n) ≤ ε * ↑(c n)\na : ℕ\nha : ∀ (b : ℕ), a ≤ b → ↑(c (b + 1)) ≤ (1 + ε) * ↑(c b) ∧ ↑(c b) * l - u (c b) ≤ ε * ↑(c b)\nM : ℕ := max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1))))\nn : ℕ\nhn :\n  n ∈ Set.Ici (max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1)))))\nexN : ∃ N, n < c N\nN : ℕ := Nat.find exN\nncN : n < c N\nh : Nat.find exN < a + 1\ncNM : c N ≤ M\n⊢ False\n[PROOFSTEP]\nexact lt_irrefl _ ((cNM.trans hn).trans_lt ncN)\n[GOAL]\ncase h\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nA : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nL : ∀ᶠ (n : ℕ) in atTop, ↑(c n) * l - u (c n) ≤ ε * ↑(c n)\na : ℕ\nha : ∀ (b : ℕ), a ≤ b → ↑(c (b + 1)) ≤ (1 + ε) * ↑(c b) ∧ ↑(c b) * l - u (c b) ≤ ε * ↑(c b)\nM : ℕ := max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1))))\nn : ℕ\nhn :\n  n ∈ Set.Ici (max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1)))))\nexN : ∃ N, n < c N\nN : ℕ := Nat.find exN\nncN : n < c N\naN : a + 1 ≤ N\n⊢ ↑n * l - u n ≤ ε * (1 + l) * ↑n\n[PROOFSTEP]\nhave Npos : 0 < N := lt_of_lt_of_le Nat.succ_pos' aN\n[GOAL]\ncase h\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nA : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nL : ∀ᶠ (n : ℕ) in atTop, ↑(c n) * l - u (c n) ≤ ε * ↑(c n)\na : ℕ\nha : ∀ (b : ℕ), a ≤ b → ↑(c (b + 1)) ≤ (1 + ε) * ↑(c b) ∧ ↑(c b) * l - u (c b) ≤ ε * ↑(c b)\nM : ℕ := max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1))))\nn : ℕ\nhn :\n  n ∈ Set.Ici (max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1)))))\nexN : ∃ N, n < c N\nN : ℕ := Nat.find exN\nncN : n < c N\naN : a + 1 ≤ N\nNpos : 0 < N\n⊢ ↑n * l - u n ≤ ε * (1 + l) * ↑n\n[PROOFSTEP]\nhave aN' : a ≤ N - 1 := by\n  apply @Nat.le_of_add_le_add_right a 1 (N - 1)\n  rw [Nat.sub_add_cancel Npos]\n  exact aN\n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nA : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nL : ∀ᶠ (n : ℕ) in atTop, ↑(c n) * l - u (c n) ≤ ε * ↑(c n)\na : ℕ\nha : ∀ (b : ℕ), a ≤ b → ↑(c (b + 1)) ≤ (1 + ε) * ↑(c b) ∧ ↑(c b) * l - u (c b) ≤ ε * ↑(c b)\nM : ℕ := max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1))))\nn : ℕ\nhn :\n  n ∈ Set.Ici (max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1)))))\nexN : ∃ N, n < c N\nN : ℕ := Nat.find exN\nncN : n < c N\naN : a + 1 ≤ N\nNpos : 0 < N\n⊢ a ≤ N - 1\n[PROOFSTEP]\napply @Nat.le_of_add_le_add_right a 1 (N - 1)\n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nA : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nL : ∀ᶠ (n : ℕ) in atTop, ↑(c n) * l - u (c n) ≤ ε * ↑(c n)\na : ℕ\nha : ∀ (b : ℕ), a ≤ b → ↑(c (b + 1)) ≤ (1 + ε) * ↑(c b) ∧ ↑(c b) * l - u (c b) ≤ ε * ↑(c b)\nM : ℕ := max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1))))\nn : ℕ\nhn :\n  n ∈ Set.Ici (max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1)))))\nexN : ∃ N, n < c N\nN : ℕ := Nat.find exN\nncN : n < c N\naN : a + 1 ≤ N\nNpos : 0 < N\n⊢ a + 1 ≤ N - 1 + 1\n[PROOFSTEP]\nrw [Nat.sub_add_cancel Npos]\n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nA : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nL : ∀ᶠ (n : ℕ) in atTop, ↑(c n) * l - u (c n) ≤ ε * ↑(c n)\na : ℕ\nha : ∀ (b : ℕ), a ≤ b → ↑(c (b + 1)) ≤ (1 + ε) * ↑(c b) ∧ ↑(c b) * l - u (c b) ≤ ε * ↑(c b)\nM : ℕ := max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1))))\nn : ℕ\nhn :\n  n ∈ Set.Ici (max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1)))))\nexN : ∃ N, n < c N\nN : ℕ := Nat.find exN\nncN : n < c N\naN : a + 1 ≤ N\nNpos : 0 < N\n⊢ a + 1 ≤ N\n[PROOFSTEP]\nexact aN\n[GOAL]\ncase h\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nA : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nL : ∀ᶠ (n : ℕ) in atTop, ↑(c n) * l - u (c n) ≤ ε * ↑(c n)\na : ℕ\nha : ∀ (b : ℕ), a ≤ b → ↑(c (b + 1)) ≤ (1 + ε) * ↑(c b) ∧ ↑(c b) * l - u (c b) ≤ ε * ↑(c b)\nM : ℕ := max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1))))\nn : ℕ\nhn :\n  n ∈ Set.Ici (max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1)))))\nexN : ∃ N, n < c N\nN : ℕ := Nat.find exN\nncN : n < c N\naN : a + 1 ≤ N\nNpos : 0 < N\naN' : a ≤ N - 1\n⊢ ↑n * l - u n ≤ ε * (1 + l) * ↑n\n[PROOFSTEP]\nhave cNn : c (N - 1) ≤ n := by\n  have : N - 1 < N := Nat.pred_lt Npos.ne'\n  simpa only [not_lt] using Nat.find_min exN this\n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nA : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nL : ∀ᶠ (n : ℕ) in atTop, ↑(c n) * l - u (c n) ≤ ε * ↑(c n)\na : ℕ\nha : ∀ (b : ℕ), a ≤ b → ↑(c (b + 1)) ≤ (1 + ε) * ↑(c b) ∧ ↑(c b) * l - u (c b) ≤ ε * ↑(c b)\nM : ℕ := max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1))))\nn : ℕ\nhn :\n  n ∈ Set.Ici (max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1)))))\nexN : ∃ N, n < c N\nN : ℕ := Nat.find exN\nncN : n < c N\naN : a + 1 ≤ N\nNpos : 0 < N\naN' : a ≤ N - 1\n⊢ c (N - 1) ≤ n\n[PROOFSTEP]\nhave : N - 1 < N := Nat.pred_lt Npos.ne'\n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nA : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nL : ∀ᶠ (n : ℕ) in atTop, ↑(c n) * l - u (c n) ≤ ε * ↑(c n)\na : ℕ\nha : ∀ (b : ℕ), a ≤ b → ↑(c (b + 1)) ≤ (1 + ε) * ↑(c b) ∧ ↑(c b) * l - u (c b) ≤ ε * ↑(c b)\nM : ℕ := max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1))))\nn : ℕ\nhn :\n  n ∈ Set.Ici (max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1)))))\nexN : ∃ N, n < c N\nN : ℕ := Nat.find exN\nncN : n < c N\naN : a + 1 ≤ N\nNpos : 0 < N\naN' : a ≤ N - 1\nthis : N - 1 < N\n⊢ c (N - 1) ≤ n\n[PROOFSTEP]\nsimpa only [not_lt] using Nat.find_min exN this\n[GOAL]\ncase h\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nA : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nL : ∀ᶠ (n : ℕ) in atTop, ↑(c n) * l - u (c n) ≤ ε * ↑(c n)\na : ℕ\nha : ∀ (b : ℕ), a ≤ b → ↑(c (b + 1)) ≤ (1 + ε) * ↑(c b) ∧ ↑(c b) * l - u (c b) ≤ ε * ↑(c b)\nM : ℕ := max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1))))\nn : ℕ\nhn :\n  n ∈ Set.Ici (max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1)))))\nexN : ∃ N, n < c N\nN : ℕ := Nat.find exN\nncN : n < c N\naN : a + 1 ≤ N\nNpos : 0 < N\naN' : a ≤ N - 1\ncNn : c (N - 1) ≤ n\n⊢ ↑n * l - u n ≤ ε * (1 + l) * ↑n\n[PROOFSTEP]\ncalc\n  (n : ℝ) * l - u n ≤ c N * l - u (c (N - 1)) :=\n    by\n    refine' add_le_add (mul_le_mul_of_nonneg_right (Nat.cast_le.2 ncN.le) lnonneg) _\n    exact neg_le_neg (hmono cNn)\n  _ ≤ (1 + ε) * c (N - 1) * l - u (c (N - 1)) :=\n    by\n    refine' add_le_add (mul_le_mul_of_nonneg_right _ lnonneg) le_rfl\n    have B : N - 1 + 1 = N := Nat.succ_pred_eq_of_pos Npos\n    have := (ha _ aN').1\n    rwa [B] at this \n  _ = c (N - 1) * l - u (c (N - 1)) + ε * c (N - 1) * l := by ring\n  _ ≤ ε * c (N - 1) + ε * c (N - 1) * l := (add_le_add (ha _ aN').2 le_rfl)\n  _ = ε * (1 + l) * c (N - 1) := by ring\n  _ ≤ ε * (1 + l) * n := by\n    refine' mul_le_mul_of_nonneg_left (Nat.cast_le.2 cNn) _\n    exact mul_nonneg εpos.le (add_nonneg zero_le_one lnonneg)\n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nA : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nL : ∀ᶠ (n : ℕ) in atTop, ↑(c n) * l - u (c n) ≤ ε * ↑(c n)\na : ℕ\nha : ∀ (b : ℕ), a ≤ b → ↑(c (b + 1)) ≤ (1 + ε) * ↑(c b) ∧ ↑(c b) * l - u (c b) ≤ ε * ↑(c b)\nM : ℕ := max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1))))\nn : ℕ\nhn :\n  n ∈ Set.Ici (max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1)))))\nexN : ∃ N, n < c N\nN : ℕ := Nat.find exN\nncN : n < c N\naN : a + 1 ≤ N\nNpos : 0 < N\naN' : a ≤ N - 1\ncNn : c (N - 1) ≤ n\n⊢ ↑n * l - u n ≤ ↑(c N) * l - u (c (N - 1))\n[PROOFSTEP]\nrefine' add_le_add (mul_le_mul_of_nonneg_right (Nat.cast_le.2 ncN.le) lnonneg) _\n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nA : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nL : ∀ᶠ (n : ℕ) in atTop, ↑(c n) * l - u (c n) ≤ ε * ↑(c n)\na : ℕ\nha : ∀ (b : ℕ), a ≤ b → ↑(c (b + 1)) ≤ (1 + ε) * ↑(c b) ∧ ↑(c b) * l - u (c b) ≤ ε * ↑(c b)\nM : ℕ := max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1))))\nn : ℕ\nhn :\n  n ∈ Set.Ici (max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1)))))\nexN : ∃ N, n < c N\nN : ℕ := Nat.find exN\nncN : n < c N\naN : a + 1 ≤ N\nNpos : 0 < N\naN' : a ≤ N - 1\ncNn : c (N - 1) ≤ n\n⊢ -u n ≤ -u (c (N - 1))\n[PROOFSTEP]\nexact neg_le_neg (hmono cNn)\n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nA : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nL : ∀ᶠ (n : ℕ) in atTop, ↑(c n) * l - u (c n) ≤ ε * ↑(c n)\na : ℕ\nha : ∀ (b : ℕ), a ≤ b → ↑(c (b + 1)) ≤ (1 + ε) * ↑(c b) ∧ ↑(c b) * l - u (c b) ≤ ε * ↑(c b)\nM : ℕ := max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1))))\nn : ℕ\nhn :\n  n ∈ Set.Ici (max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1)))))\nexN : ∃ N, n < c N\nN : ℕ := Nat.find exN\nncN : n < c N\naN : a + 1 ≤ N\nNpos : 0 < N\naN' : a ≤ N - 1\ncNn : c (N - 1) ≤ n\n⊢ ↑(c N) * l - u (c (N - 1)) ≤ (1 + ε) * ↑(c (N - 1)) * l - u (c (N - 1))\n[PROOFSTEP]\nrefine' add_le_add (mul_le_mul_of_nonneg_right _ lnonneg) le_rfl\n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nA : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nL : ∀ᶠ (n : ℕ) in atTop, ↑(c n) * l - u (c n) ≤ ε * ↑(c n)\na : ℕ\nha : ∀ (b : ℕ), a ≤ b → ↑(c (b + 1)) ≤ (1 + ε) * ↑(c b) ∧ ↑(c b) * l - u (c b) ≤ ε * ↑(c b)\nM : ℕ := max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1))))\nn : ℕ\nhn :\n  n ∈ Set.Ici (max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1)))))\nexN : ∃ N, n < c N\nN : ℕ := Nat.find exN\nncN : n < c N\naN : a + 1 ≤ N\nNpos : 0 < N\naN' : a ≤ N - 1\ncNn : c (N - 1) ≤ n\n⊢ ↑(c N) ≤ (1 + ε) * ↑(c (N - 1))\n[PROOFSTEP]\nhave B : N - 1 + 1 = N := Nat.succ_pred_eq_of_pos Npos\n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nA : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nL : ∀ᶠ (n : ℕ) in atTop, ↑(c n) * l - u (c n) ≤ ε * ↑(c n)\na : ℕ\nha : ∀ (b : ℕ), a ≤ b → ↑(c (b + 1)) ≤ (1 + ε) * ↑(c b) ∧ ↑(c b) * l - u (c b) ≤ ε * ↑(c b)\nM : ℕ := max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1))))\nn : ℕ\nhn :\n  n ∈ Set.Ici (max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1)))))\nexN : ∃ N, n < c N\nN : ℕ := Nat.find exN\nncN : n < c N\naN : a + 1 ≤ N\nNpos : 0 < N\naN' : a ≤ N - 1\ncNn : c (N - 1) ≤ n\nB : N - 1 + 1 = N\n⊢ ↑(c N) ≤ (1 + ε) * ↑(c (N - 1))\n[PROOFSTEP]\nhave := (ha _ aN').1\n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nA : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nL : ∀ᶠ (n : ℕ) in atTop, ↑(c n) * l - u (c n) ≤ ε * ↑(c n)\na : ℕ\nha : ∀ (b : ℕ), a ≤ b → ↑(c (b + 1)) ≤ (1 + ε) * ↑(c b) ∧ ↑(c b) * l - u (c b) ≤ ε * ↑(c b)\nM : ℕ := max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1))))\nn : ℕ\nhn :\n  n ∈ Set.Ici (max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1)))))\nexN : ∃ N, n < c N\nN : ℕ := Nat.find exN\nncN : n < c N\naN : a + 1 ≤ N\nNpos : 0 < N\naN' : a ≤ N - 1\ncNn : c (N - 1) ≤ n\nB : N - 1 + 1 = N\nthis : ↑(c (N - 1 + 1)) ≤ (1 + ε) * ↑(c (N - 1))\n⊢ ↑(c N) ≤ (1 + ε) * ↑(c (N - 1))\n[PROOFSTEP]\nrwa [B] at this \n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nA : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nL : ∀ᶠ (n : ℕ) in atTop, ↑(c n) * l - u (c n) ≤ ε * ↑(c n)\na : ℕ\nha : ∀ (b : ℕ), a ≤ b → ↑(c (b + 1)) ≤ (1 + ε) * ↑(c b) ∧ ↑(c b) * l - u (c b) ≤ ε * ↑(c b)\nM : ℕ := max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1))))\nn : ℕ\nhn :\n  n ∈ Set.Ici (max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1)))))\nexN : ∃ N, n < c N\nN : ℕ := Nat.find exN\nncN : n < c N\naN : a + 1 ≤ N\nNpos : 0 < N\naN' : a ≤ N - 1\ncNn : c (N - 1) ≤ n\n⊢ (1 + ε) * ↑(c (N - 1)) * l - u (c (N - 1)) = ↑(c (N - 1)) * l - u (c (N - 1)) + ε * ↑(c (N - 1)) * l\n[PROOFSTEP]\nring\n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nA : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nL : ∀ᶠ (n : ℕ) in atTop, ↑(c n) * l - u (c n) ≤ ε * ↑(c n)\na : ℕ\nha : ∀ (b : ℕ), a ≤ b → ↑(c (b + 1)) ≤ (1 + ε) * ↑(c b) ∧ ↑(c b) * l - u (c b) ≤ ε * ↑(c b)\nM : ℕ := max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1))))\nn : ℕ\nhn :\n  n ∈ Set.Ici (max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1)))))\nexN : ∃ N, n < c N\nN : ℕ := Nat.find exN\nncN : n < c N\naN : a + 1 ≤ N\nNpos : 0 < N\naN' : a ≤ N - 1\ncNn : c (N - 1) ≤ n\n⊢ ε * ↑(c (N - 1)) + ε * ↑(c (N - 1)) * l = ε * (1 + l) * ↑(c (N - 1))\n[PROOFSTEP]\nring\n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nA : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nL : ∀ᶠ (n : ℕ) in atTop, ↑(c n) * l - u (c n) ≤ ε * ↑(c n)\na : ℕ\nha : ∀ (b : ℕ), a ≤ b → ↑(c (b + 1)) ≤ (1 + ε) * ↑(c b) ∧ ↑(c b) * l - u (c b) ≤ ε * ↑(c b)\nM : ℕ := max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1))))\nn : ℕ\nhn :\n  n ∈ Set.Ici (max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1)))))\nexN : ∃ N, n < c N\nN : ℕ := Nat.find exN\nncN : n < c N\naN : a + 1 ≤ N\nNpos : 0 < N\naN' : a ≤ N - 1\ncNn : c (N - 1) ≤ n\n⊢ ε * (1 + l) * ↑(c (N - 1)) ≤ ε * (1 + l) * ↑n\n[PROOFSTEP]\nrefine' mul_le_mul_of_nonneg_left (Nat.cast_le.2 cNn) _\n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nA : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\nε : ℝ\nεpos : 0 < ε\nc : ℕ → ℕ\ncgrowth : ∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ (1 + ε) * ↑(c n)\nctop : Tendsto c atTop atTop\nclim : Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nL : ∀ᶠ (n : ℕ) in atTop, ↑(c n) * l - u (c n) ≤ ε * ↑(c n)\na : ℕ\nha : ∀ (b : ℕ), a ≤ b → ↑(c (b + 1)) ≤ (1 + ε) * ↑(c b) ∧ ↑(c b) * l - u (c b) ≤ ε * ↑(c b)\nM : ℕ := max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1))))\nn : ℕ\nhn :\n  n ∈ Set.Ici (max' (image (fun i => c i) (range (a + 1))) (_ : Finset.Nonempty (image (fun i => c i) (range (a + 1)))))\nexN : ∃ N, n < c N\nN : ℕ := Nat.find exN\nncN : n < c N\naN : a + 1 ≤ N\nNpos : 0 < N\naN' : a ≤ N - 1\ncNn : c (N - 1) ≤ n\n⊢ 0 ≤ ε * (1 + l)\n[PROOFSTEP]\nexact mul_nonneg εpos.le (add_nonneg zero_le_one lnonneg)\n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nA : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\nB : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, ↑n * l - u n ≤ ε * (1 + l) * ↑n\n⊢ Tendsto (fun n => u n / ↑n) atTop (𝓝 l)\n[PROOFSTEP]\nrefine' tendsto_order.2 ⟨fun d hd => _, fun d hd => _⟩\n[GOAL]\ncase refine'_1\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nA : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\nB : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, ↑n * l - u n ≤ ε * (1 + l) * ↑n\nd : ℝ\nhd : d < l\n⊢ ∀ᶠ (b : ℕ) in atTop, d < u b / ↑b\n[PROOFSTEP]\nobtain ⟨ε, hε, εpos⟩ : ∃ ε : ℝ, d + ε * (1 + l) < l ∧ 0 < ε :=\n  by\n  have L : Tendsto (fun ε => d + ε * (1 + l)) (𝓝[>] 0) (𝓝 (d + 0 * (1 + l))) :=\n    by\n    apply Tendsto.mono_left _ nhdsWithin_le_nhds\n    exact tendsto_const_nhds.add (tendsto_id.mul tendsto_const_nhds)\n  simp only [zero_mul, add_zero] at L \n  exact (((tendsto_order.1 L).2 l hd).and self_mem_nhdsWithin).exists\n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nA : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\nB : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, ↑n * l - u n ≤ ε * (1 + l) * ↑n\nd : ℝ\nhd : d < l\n⊢ ∃ ε, d + ε * (1 + l) < l ∧ 0 < ε\n[PROOFSTEP]\nhave L : Tendsto (fun ε => d + ε * (1 + l)) (𝓝[>] 0) (𝓝 (d + 0 * (1 + l))) :=\n  by\n  apply Tendsto.mono_left _ nhdsWithin_le_nhds\n  exact tendsto_const_nhds.add (tendsto_id.mul tendsto_const_nhds)\n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nA : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\nB : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, ↑n * l - u n ≤ ε * (1 + l) * ↑n\nd : ℝ\nhd : d < l\n⊢ Tendsto (fun ε => d + ε * (1 + l)) (𝓝[Set.Ioi 0] 0) (𝓝 (d + 0 * (1 + l)))\n[PROOFSTEP]\napply Tendsto.mono_left _ nhdsWithin_le_nhds\n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nA : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\nB : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, ↑n * l - u n ≤ ε * (1 + l) * ↑n\nd : ℝ\nhd : d < l\n⊢ Tendsto (fun ε => d + ε * (1 + l)) (𝓝 0) (𝓝 (d + 0 * (1 + l)))\n[PROOFSTEP]\nexact tendsto_const_nhds.add (tendsto_id.mul tendsto_const_nhds)\n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nA : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\nB : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, ↑n * l - u n ≤ ε * (1 + l) * ↑n\nd : ℝ\nhd : d < l\nL : Tendsto (fun ε => d + ε * (1 + l)) (𝓝[Set.Ioi 0] 0) (𝓝 (d + 0 * (1 + l)))\n⊢ ∃ ε, d + ε * (1 + l) < l ∧ 0 < ε\n[PROOFSTEP]\nsimp only [zero_mul, add_zero] at L \n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nA : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\nB : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, ↑n * l - u n ≤ ε * (1 + l) * ↑n\nd : ℝ\nhd : d < l\nL : Tendsto (fun ε => d + ε * (1 + l)) (𝓝[Set.Ioi 0] 0) (𝓝 d)\n⊢ ∃ ε, d + ε * (1 + l) < l ∧ 0 < ε\n[PROOFSTEP]\nexact (((tendsto_order.1 L).2 l hd).and self_mem_nhdsWithin).exists\n[GOAL]\ncase refine'_1.intro.intro\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nA : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\nB : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, ↑n * l - u n ≤ ε * (1 + l) * ↑n\nd : ℝ\nhd : d < l\nε : ℝ\nhε : d + ε * (1 + l) < l\nεpos : 0 < ε\n⊢ ∀ᶠ (b : ℕ) in atTop, d < u b / ↑b\n[PROOFSTEP]\nfilter_upwards [B ε εpos, Ioi_mem_atTop 0] with n hn npos\n[GOAL]\ncase h\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nA : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\nB : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, ↑n * l - u n ≤ ε * (1 + l) * ↑n\nd : ℝ\nhd : d < l\nε : ℝ\nhε : d + ε * (1 + l) < l\nεpos : 0 < ε\nn : ℕ\nhn : ↑n * l - u n ≤ ε * (1 + l) * ↑n\nnpos : n ∈ Set.Ioi 0\n⊢ d < u n / ↑n\n[PROOFSTEP]\nsimp_rw [div_eq_inv_mul]\n[GOAL]\ncase h\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nA : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\nB : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, ↑n * l - u n ≤ ε * (1 + l) * ↑n\nd : ℝ\nhd : d < l\nε : ℝ\nhε : d + ε * (1 + l) < l\nεpos : 0 < ε\nn : ℕ\nhn : ↑n * l - u n ≤ ε * (1 + l) * ↑n\nnpos : n ∈ Set.Ioi 0\n⊢ d < (↑n)⁻¹ * u n\n[PROOFSTEP]\ncalc\n  d < (n : ℝ)⁻¹ * n * (l - ε * (1 + l)) := by\n    rw [inv_mul_cancel, one_mul]\n    · linarith only [hε]\n    · exact Nat.cast_ne_zero.2 (ne_of_gt npos)\n  _ = (n : ℝ)⁻¹ * (n * l - ε * (1 + l) * n) := by ring\n  _ ≤ (n : ℝ)⁻¹ * u n := by\n    refine' mul_le_mul_of_nonneg_left _ (inv_nonneg.2 (Nat.cast_nonneg _))\n    linarith only [hn]\n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nA : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\nB : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, ↑n * l - u n ≤ ε * (1 + l) * ↑n\nd : ℝ\nhd : d < l\nε : ℝ\nhε : d + ε * (1 + l) < l\nεpos : 0 < ε\nn : ℕ\nhn : ↑n * l - u n ≤ ε * (1 + l) * ↑n\nnpos : n ∈ Set.Ioi 0\n⊢ d < (↑n)⁻¹ * ↑n * (l - ε * (1 + l))\n[PROOFSTEP]\nrw [inv_mul_cancel, one_mul]\n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nA : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\nB : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, ↑n * l - u n ≤ ε * (1 + l) * ↑n\nd : ℝ\nhd : d < l\nε : ℝ\nhε : d + ε * (1 + l) < l\nεpos : 0 < ε\nn : ℕ\nhn : ↑n * l - u n ≤ ε * (1 + l) * ↑n\nnpos : n ∈ Set.Ioi 0\n⊢ d < l - ε * (1 + l)\n[PROOFSTEP]\nlinarith only [hε]\n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nA : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\nB : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, ↑n * l - u n ≤ ε * (1 + l) * ↑n\nd : ℝ\nhd : d < l\nε : ℝ\nhε : d + ε * (1 + l) < l\nεpos : 0 < ε\nn : ℕ\nhn : ↑n * l - u n ≤ ε * (1 + l) * ↑n\nnpos : n ∈ Set.Ioi 0\n⊢ ↑n ≠ 0\n[PROOFSTEP]\nexact Nat.cast_ne_zero.2 (ne_of_gt npos)\n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nA : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\nB : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, ↑n * l - u n ≤ ε * (1 + l) * ↑n\nd : ℝ\nhd : d < l\nε : ℝ\nhε : d + ε * (1 + l) < l\nεpos : 0 < ε\nn : ℕ\nhn : ↑n * l - u n ≤ ε * (1 + l) * ↑n\nnpos : n ∈ Set.Ioi 0\n⊢ (↑n)⁻¹ * ↑n * (l - ε * (1 + l)) = (↑n)⁻¹ * (↑n * l - ε * (1 + l) * ↑n)\n[PROOFSTEP]\nring\n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nA : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\nB : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, ↑n * l - u n ≤ ε * (1 + l) * ↑n\nd : ℝ\nhd : d < l\nε : ℝ\nhε : d + ε * (1 + l) < l\nεpos : 0 < ε\nn : ℕ\nhn : ↑n * l - u n ≤ ε * (1 + l) * ↑n\nnpos : n ∈ Set.Ioi 0\n⊢ (↑n)⁻¹ * (↑n * l - ε * (1 + l) * ↑n) ≤ (↑n)⁻¹ * u n\n[PROOFSTEP]\nrefine' mul_le_mul_of_nonneg_left _ (inv_nonneg.2 (Nat.cast_nonneg _))\n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nA : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\nB : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, ↑n * l - u n ≤ ε * (1 + l) * ↑n\nd : ℝ\nhd : d < l\nε : ℝ\nhε : d + ε * (1 + l) < l\nεpos : 0 < ε\nn : ℕ\nhn : ↑n * l - u n ≤ ε * (1 + l) * ↑n\nnpos : n ∈ Set.Ioi 0\n⊢ ↑n * l - ε * (1 + l) * ↑n ≤ u n\n[PROOFSTEP]\nlinarith only [hn]\n[GOAL]\ncase refine'_2\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nA : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\nB : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, ↑n * l - u n ≤ ε * (1 + l) * ↑n\nd : ℝ\nhd : d > l\n⊢ ∀ᶠ (b : ℕ) in atTop, u b / ↑b < d\n[PROOFSTEP]\nobtain ⟨ε, hε, εpos⟩ : ∃ ε : ℝ, l + ε * (1 + ε + l) < d ∧ 0 < ε :=\n  by\n  have L : Tendsto (fun ε => l + ε * (1 + ε + l)) (𝓝[>] 0) (𝓝 (l + 0 * (1 + 0 + l))) :=\n    by\n    apply Tendsto.mono_left _ nhdsWithin_le_nhds\n    exact tendsto_const_nhds.add (tendsto_id.mul ((tendsto_const_nhds.add tendsto_id).add tendsto_const_nhds))\n  simp only [zero_mul, add_zero] at L \n  exact (((tendsto_order.1 L).2 d hd).and self_mem_nhdsWithin).exists\n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nA : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\nB : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, ↑n * l - u n ≤ ε * (1 + l) * ↑n\nd : ℝ\nhd : d > l\n⊢ ∃ ε, l + ε * (1 + ε + l) < d ∧ 0 < ε\n[PROOFSTEP]\nhave L : Tendsto (fun ε => l + ε * (1 + ε + l)) (𝓝[>] 0) (𝓝 (l + 0 * (1 + 0 + l))) :=\n  by\n  apply Tendsto.mono_left _ nhdsWithin_le_nhds\n  exact tendsto_const_nhds.add (tendsto_id.mul ((tendsto_const_nhds.add tendsto_id).add tendsto_const_nhds))\n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nA : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\nB : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, ↑n * l - u n ≤ ε * (1 + l) * ↑n\nd : ℝ\nhd : d > l\n⊢ Tendsto (fun ε => l + ε * (1 + ε + l)) (𝓝[Set.Ioi 0] 0) (𝓝 (l + 0 * (1 + 0 + l)))\n[PROOFSTEP]\napply Tendsto.mono_left _ nhdsWithin_le_nhds\n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nA : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\nB : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, ↑n * l - u n ≤ ε * (1 + l) * ↑n\nd : ℝ\nhd : d > l\n⊢ Tendsto (fun ε => l + ε * (1 + ε + l)) (𝓝 0) (𝓝 (l + 0 * (1 + 0 + l)))\n[PROOFSTEP]\nexact tendsto_const_nhds.add (tendsto_id.mul ((tendsto_const_nhds.add tendsto_id).add tendsto_const_nhds))\n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nA : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\nB : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, ↑n * l - u n ≤ ε * (1 + l) * ↑n\nd : ℝ\nhd : d > l\nL : Tendsto (fun ε => l + ε * (1 + ε + l)) (𝓝[Set.Ioi 0] 0) (𝓝 (l + 0 * (1 + 0 + l)))\n⊢ ∃ ε, l + ε * (1 + ε + l) < d ∧ 0 < ε\n[PROOFSTEP]\nsimp only [zero_mul, add_zero] at L \n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nA : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\nB : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, ↑n * l - u n ≤ ε * (1 + l) * ↑n\nd : ℝ\nhd : d > l\nL : Tendsto (fun ε => l + ε * (1 + ε + l)) (𝓝[Set.Ioi 0] 0) (𝓝 l)\n⊢ ∃ ε, l + ε * (1 + ε + l) < d ∧ 0 < ε\n[PROOFSTEP]\nexact (((tendsto_order.1 L).2 d hd).and self_mem_nhdsWithin).exists\n[GOAL]\ncase refine'_2.intro.intro\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nA : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\nB : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, ↑n * l - u n ≤ ε * (1 + l) * ↑n\nd : ℝ\nhd : d > l\nε : ℝ\nhε : l + ε * (1 + ε + l) < d\nεpos : 0 < ε\n⊢ ∀ᶠ (b : ℕ) in atTop, u b / ↑b < d\n[PROOFSTEP]\nfilter_upwards [A ε εpos, Ioi_mem_atTop 0] with n hn npos\n[GOAL]\ncase h\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nA : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\nB : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, ↑n * l - u n ≤ ε * (1 + l) * ↑n\nd : ℝ\nhd : d > l\nε : ℝ\nhε : l + ε * (1 + ε + l) < d\nεpos : 0 < ε\nn : ℕ\nhn : u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\nnpos : n ∈ Set.Ioi 0\n⊢ u n / ↑n < d\n[PROOFSTEP]\nsimp_rw [div_eq_inv_mul]\n[GOAL]\ncase h\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nA : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\nB : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, ↑n * l - u n ≤ ε * (1 + l) * ↑n\nd : ℝ\nhd : d > l\nε : ℝ\nhε : l + ε * (1 + ε + l) < d\nεpos : 0 < ε\nn : ℕ\nhn : u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\nnpos : n ∈ Set.Ioi 0\n⊢ (↑n)⁻¹ * u n < d\n[PROOFSTEP]\ncalc\n  (n : ℝ)⁻¹ * u n ≤ (n : ℝ)⁻¹ * (n * l + ε * (1 + ε + l) * n) :=\n    by\n    refine' mul_le_mul_of_nonneg_left _ (inv_nonneg.2 (Nat.cast_nonneg _))\n    linarith only [hn]\n  _ = (n : ℝ)⁻¹ * n * (l + ε * (1 + ε + l)) := by ring\n  _ < d := by\n    rwa [inv_mul_cancel, one_mul]\n    exact Nat.cast_ne_zero.2 (ne_of_gt npos)\n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nA : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\nB : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, ↑n * l - u n ≤ ε * (1 + l) * ↑n\nd : ℝ\nhd : d > l\nε : ℝ\nhε : l + ε * (1 + ε + l) < d\nεpos : 0 < ε\nn : ℕ\nhn : u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\nnpos : n ∈ Set.Ioi 0\n⊢ (↑n)⁻¹ * u n ≤ (↑n)⁻¹ * (↑n * l + ε * (1 + ε + l) * ↑n)\n[PROOFSTEP]\nrefine' mul_le_mul_of_nonneg_left _ (inv_nonneg.2 (Nat.cast_nonneg _))\n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nA : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\nB : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, ↑n * l - u n ≤ ε * (1 + l) * ↑n\nd : ℝ\nhd : d > l\nε : ℝ\nhε : l + ε * (1 + ε + l) < d\nεpos : 0 < ε\nn : ℕ\nhn : u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\nnpos : n ∈ Set.Ioi 0\n⊢ u n ≤ ↑n * l + ε * (1 + ε + l) * ↑n\n[PROOFSTEP]\nlinarith only [hn]\n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nA : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\nB : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, ↑n * l - u n ≤ ε * (1 + l) * ↑n\nd : ℝ\nhd : d > l\nε : ℝ\nhε : l + ε * (1 + ε + l) < d\nεpos : 0 < ε\nn : ℕ\nhn : u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\nnpos : n ∈ Set.Ioi 0\n⊢ (↑n)⁻¹ * (↑n * l + ε * (1 + ε + l) * ↑n) = (↑n)⁻¹ * ↑n * (l + ε * (1 + ε + l))\n[PROOFSTEP]\nring\n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nA : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\nB : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, ↑n * l - u n ≤ ε * (1 + l) * ↑n\nd : ℝ\nhd : d > l\nε : ℝ\nhε : l + ε * (1 + ε + l) < d\nεpos : 0 < ε\nn : ℕ\nhn : u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\nnpos : n ∈ Set.Ioi 0\n⊢ (↑n)⁻¹ * ↑n * (l + ε * (1 + ε + l)) < d\n[PROOFSTEP]\nrwa [inv_mul_cancel, one_mul]\n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nhlim :\n  ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\nlnonneg : 0 ≤ l\nA : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\nB : ∀ (ε : ℝ), 0 < ε → ∀ᶠ (n : ℕ) in atTop, ↑n * l - u n ≤ ε * (1 + l) * ↑n\nd : ℝ\nhd : d > l\nε : ℝ\nhε : l + ε * (1 + ε + l) < d\nεpos : 0 < ε\nn : ℕ\nhn : u n - ↑n * l ≤ ε * (1 + ε + l) * ↑n\nnpos : n ∈ Set.Ioi 0\n⊢ ↑n ≠ 0\n[PROOFSTEP]\nexact Nat.cast_ne_zero.2 (ne_of_gt npos)\n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nc : ℕ → ℝ\ncone : ∀ (k : ℕ), 1 < c k\nclim : Tendsto c atTop (𝓝 1)\nhc : ∀ (k : ℕ), Tendsto (fun n => u ⌊c k ^ n⌋₊ / ↑⌊c k ^ n⌋₊) atTop (𝓝 l)\n⊢ Tendsto (fun n => u n / ↑n) atTop (𝓝 l)\n[PROOFSTEP]\napply tendsto_div_of_monotone_of_exists_subseq_tendsto_div u l hmono\n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nc : ℕ → ℝ\ncone : ∀ (k : ℕ), 1 < c k\nclim : Tendsto c atTop (𝓝 1)\nhc : ∀ (k : ℕ), Tendsto (fun n => u ⌊c k ^ n⌋₊ / ↑⌊c k ^ n⌋₊) atTop (𝓝 l)\n⊢ ∀ (a : ℝ),\n    1 < a →\n      ∃ c,\n        (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n          Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\n[PROOFSTEP]\nintro a ha\n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nc : ℕ → ℝ\ncone : ∀ (k : ℕ), 1 < c k\nclim : Tendsto c atTop (𝓝 1)\nhc : ∀ (k : ℕ), Tendsto (fun n => u ⌊c k ^ n⌋₊ / ↑⌊c k ^ n⌋₊) atTop (𝓝 l)\na : ℝ\nha : 1 < a\n⊢ ∃ c,\n    (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n      Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\n[PROOFSTEP]\nobtain ⟨k, hk⟩ : ∃ k, c k < a := ((tendsto_order.1 clim).2 a ha).exists\n[GOAL]\ncase intro\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nc : ℕ → ℝ\ncone : ∀ (k : ℕ), 1 < c k\nclim : Tendsto c atTop (𝓝 1)\nhc : ∀ (k : ℕ), Tendsto (fun n => u ⌊c k ^ n⌋₊ / ↑⌊c k ^ n⌋₊) atTop (𝓝 l)\na : ℝ\nha : 1 < a\nk : ℕ\nhk : c k < a\n⊢ ∃ c,\n    (∀ᶠ (n : ℕ) in atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧\n      Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / ↑(c n)) atTop (𝓝 l)\n[PROOFSTEP]\nrefine'\n  ⟨fun n => ⌊c k ^ n⌋₊, _, (tendsto_nat_floor_atTop (α := ℝ)).comp (tendsto_pow_atTop_atTop_of_one_lt (cone k)), hc k⟩\n[GOAL]\ncase intro\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nc : ℕ → ℝ\ncone : ∀ (k : ℕ), 1 < c k\nclim : Tendsto c atTop (𝓝 1)\nhc : ∀ (k : ℕ), Tendsto (fun n => u ⌊c k ^ n⌋₊ / ↑⌊c k ^ n⌋₊) atTop (𝓝 l)\na : ℝ\nha : 1 < a\nk : ℕ\nhk : c k < a\n⊢ ∀ᶠ (n : ℕ) in atTop, ↑((fun n => ⌊c k ^ n⌋₊) (n + 1)) ≤ a * ↑((fun n => ⌊c k ^ n⌋₊) n)\n[PROOFSTEP]\nhave H : ∀ n : ℕ, (0 : ℝ) < ⌊c k ^ n⌋₊ := by\n  intro n\n  refine' zero_lt_one.trans_le _\n  simp only [Real.rpow_nat_cast, Nat.one_le_cast, Nat.one_le_floor_iff, one_le_pow_of_one_le (cone k).le n]\n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nc : ℕ → ℝ\ncone : ∀ (k : ℕ), 1 < c k\nclim : Tendsto c atTop (𝓝 1)\nhc : ∀ (k : ℕ), Tendsto (fun n => u ⌊c k ^ n⌋₊ / ↑⌊c k ^ n⌋₊) atTop (𝓝 l)\na : ℝ\nha : 1 < a\nk : ℕ\nhk : c k < a\n⊢ ∀ (n : ℕ), 0 < ↑⌊c k ^ n⌋₊\n[PROOFSTEP]\nintro n\n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nc : ℕ → ℝ\ncone : ∀ (k : ℕ), 1 < c k\nclim : Tendsto c atTop (𝓝 1)\nhc : ∀ (k : ℕ), Tendsto (fun n => u ⌊c k ^ n⌋₊ / ↑⌊c k ^ n⌋₊) atTop (𝓝 l)\na : ℝ\nha : 1 < a\nk : ℕ\nhk : c k < a\nn : ℕ\n⊢ 0 < ↑⌊c k ^ n⌋₊\n[PROOFSTEP]\nrefine' zero_lt_one.trans_le _\n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nc : ℕ → ℝ\ncone : ∀ (k : ℕ), 1 < c k\nclim : Tendsto c atTop (𝓝 1)\nhc : ∀ (k : ℕ), Tendsto (fun n => u ⌊c k ^ n⌋₊ / ↑⌊c k ^ n⌋₊) atTop (𝓝 l)\na : ℝ\nha : 1 < a\nk : ℕ\nhk : c k < a\nn : ℕ\n⊢ 1 ≤ ↑⌊c k ^ n⌋₊\n[PROOFSTEP]\nsimp only [Real.rpow_nat_cast, Nat.one_le_cast, Nat.one_le_floor_iff, one_le_pow_of_one_le (cone k).le n]\n[GOAL]\ncase intro\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nc : ℕ → ℝ\ncone : ∀ (k : ℕ), 1 < c k\nclim : Tendsto c atTop (𝓝 1)\nhc : ∀ (k : ℕ), Tendsto (fun n => u ⌊c k ^ n⌋₊ / ↑⌊c k ^ n⌋₊) atTop (𝓝 l)\na : ℝ\nha : 1 < a\nk : ℕ\nhk : c k < a\nH : ∀ (n : ℕ), 0 < ↑⌊c k ^ n⌋₊\n⊢ ∀ᶠ (n : ℕ) in atTop, ↑((fun n => ⌊c k ^ n⌋₊) (n + 1)) ≤ a * ↑((fun n => ⌊c k ^ n⌋₊) n)\n[PROOFSTEP]\nhave A :\n  Tendsto (fun n : ℕ => (⌊c k ^ (n + 1)⌋₊ : ℝ) / c k ^ (n + 1) * c k / (⌊c k ^ n⌋₊ / c k ^ n)) atTop\n    (𝓝 (1 * c k / 1)) :=\n  by\n  refine' Tendsto.div (Tendsto.mul _ tendsto_const_nhds) _ one_ne_zero\n  · refine' tendsto_nat_floor_div_atTop.comp _\n    exact (tendsto_pow_atTop_atTop_of_one_lt (cone k)).comp (tendsto_add_atTop_nat 1)\n  · refine' tendsto_nat_floor_div_atTop.comp _\n    exact tendsto_pow_atTop_atTop_of_one_lt (cone k)\n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nc : ℕ → ℝ\ncone : ∀ (k : ℕ), 1 < c k\nclim : Tendsto c atTop (𝓝 1)\nhc : ∀ (k : ℕ), Tendsto (fun n => u ⌊c k ^ n⌋₊ / ↑⌊c k ^ n⌋₊) atTop (𝓝 l)\na : ℝ\nha : 1 < a\nk : ℕ\nhk : c k < a\nH : ∀ (n : ℕ), 0 < ↑⌊c k ^ n⌋₊\n⊢ Tendsto (fun n => ↑⌊c k ^ (n + 1)⌋₊ / c k ^ (n + 1) * c k / (↑⌊c k ^ n⌋₊ / c k ^ n)) atTop (𝓝 (1 * c k / 1))\n[PROOFSTEP]\nrefine' Tendsto.div (Tendsto.mul _ tendsto_const_nhds) _ one_ne_zero\n[GOAL]\ncase refine'_1\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nc : ℕ → ℝ\ncone : ∀ (k : ℕ), 1 < c k\nclim : Tendsto c atTop (𝓝 1)\nhc : ∀ (k : ℕ), Tendsto (fun n => u ⌊c k ^ n⌋₊ / ↑⌊c k ^ n⌋₊) atTop (𝓝 l)\na : ℝ\nha : 1 < a\nk : ℕ\nhk : c k < a\nH : ∀ (n : ℕ), 0 < ↑⌊c k ^ n⌋₊\n⊢ Tendsto (fun n => ↑⌊c k ^ (n + 1)⌋₊ / c k ^ (n + 1)) atTop (𝓝 1)\n[PROOFSTEP]\nrefine' tendsto_nat_floor_div_atTop.comp _\n[GOAL]\ncase refine'_1\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nc : ℕ → ℝ\ncone : ∀ (k : ℕ), 1 < c k\nclim : Tendsto c atTop (𝓝 1)\nhc : ∀ (k : ℕ), Tendsto (fun n => u ⌊c k ^ n⌋₊ / ↑⌊c k ^ n⌋₊) atTop (𝓝 l)\na : ℝ\nha : 1 < a\nk : ℕ\nhk : c k < a\nH : ∀ (n : ℕ), 0 < ↑⌊c k ^ n⌋₊\n⊢ Tendsto (fun n => c k ^ (n + 1)) atTop atTop\n[PROOFSTEP]\nexact (tendsto_pow_atTop_atTop_of_one_lt (cone k)).comp (tendsto_add_atTop_nat 1)\n[GOAL]\ncase refine'_2\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nc : ℕ → ℝ\ncone : ∀ (k : ℕ), 1 < c k\nclim : Tendsto c atTop (𝓝 1)\nhc : ∀ (k : ℕ), Tendsto (fun n => u ⌊c k ^ n⌋₊ / ↑⌊c k ^ n⌋₊) atTop (𝓝 l)\na : ℝ\nha : 1 < a\nk : ℕ\nhk : c k < a\nH : ∀ (n : ℕ), 0 < ↑⌊c k ^ n⌋₊\n⊢ Tendsto (fun n => ↑⌊c k ^ n⌋₊ / c k ^ n) atTop (𝓝 1)\n[PROOFSTEP]\nrefine' tendsto_nat_floor_div_atTop.comp _\n[GOAL]\ncase refine'_2\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nc : ℕ → ℝ\ncone : ∀ (k : ℕ), 1 < c k\nclim : Tendsto c atTop (𝓝 1)\nhc : ∀ (k : ℕ), Tendsto (fun n => u ⌊c k ^ n⌋₊ / ↑⌊c k ^ n⌋₊) atTop (𝓝 l)\na : ℝ\nha : 1 < a\nk : ℕ\nhk : c k < a\nH : ∀ (n : ℕ), 0 < ↑⌊c k ^ n⌋₊\n⊢ Tendsto (fun n => c k ^ n) atTop atTop\n[PROOFSTEP]\nexact tendsto_pow_atTop_atTop_of_one_lt (cone k)\n[GOAL]\ncase intro\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nc : ℕ → ℝ\ncone : ∀ (k : ℕ), 1 < c k\nclim : Tendsto c atTop (𝓝 1)\nhc : ∀ (k : ℕ), Tendsto (fun n => u ⌊c k ^ n⌋₊ / ↑⌊c k ^ n⌋₊) atTop (𝓝 l)\na : ℝ\nha : 1 < a\nk : ℕ\nhk : c k < a\nH : ∀ (n : ℕ), 0 < ↑⌊c k ^ n⌋₊\nA : Tendsto (fun n => ↑⌊c k ^ (n + 1)⌋₊ / c k ^ (n + 1) * c k / (↑⌊c k ^ n⌋₊ / c k ^ n)) atTop (𝓝 (1 * c k / 1))\n⊢ ∀ᶠ (n : ℕ) in atTop, ↑((fun n => ⌊c k ^ n⌋₊) (n + 1)) ≤ a * ↑((fun n => ⌊c k ^ n⌋₊) n)\n[PROOFSTEP]\nhave B : Tendsto (fun n : ℕ => (⌊c k ^ (n + 1)⌋₊ : ℝ) / ⌊c k ^ n⌋₊) atTop (𝓝 (c k)) :=\n  by\n  simp only [one_mul, div_one] at A \n  convert A using 1\n  ext1 n\n  field_simp [(zero_lt_one.trans (cone k)).ne', (H n).ne']\n  ring\n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nc : ℕ → ℝ\ncone : ∀ (k : ℕ), 1 < c k\nclim : Tendsto c atTop (𝓝 1)\nhc : ∀ (k : ℕ), Tendsto (fun n => u ⌊c k ^ n⌋₊ / ↑⌊c k ^ n⌋₊) atTop (𝓝 l)\na : ℝ\nha : 1 < a\nk : ℕ\nhk : c k < a\nH : ∀ (n : ℕ), 0 < ↑⌊c k ^ n⌋₊\nA : Tendsto (fun n => ↑⌊c k ^ (n + 1)⌋₊ / c k ^ (n + 1) * c k / (↑⌊c k ^ n⌋₊ / c k ^ n)) atTop (𝓝 (1 * c k / 1))\n⊢ Tendsto (fun n => ↑⌊c k ^ (n + 1)⌋₊ / ↑⌊c k ^ n⌋₊) atTop (𝓝 (c k))\n[PROOFSTEP]\nsimp only [one_mul, div_one] at A \n[GOAL]\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nc : ℕ → ℝ\ncone : ∀ (k : ℕ), 1 < c k\nclim : Tendsto c atTop (𝓝 1)\nhc : ∀ (k : ℕ), Tendsto (fun n => u ⌊c k ^ n⌋₊ / ↑⌊c k ^ n⌋₊) atTop (𝓝 l)\na : ℝ\nha : 1 < a\nk : ℕ\nhk : c k < a\nH : ∀ (n : ℕ), 0 < ↑⌊c k ^ n⌋₊\nA : Tendsto (fun n => ↑⌊c k ^ (n + 1)⌋₊ / c k ^ (n + 1) * c k / (↑⌊c k ^ n⌋₊ / c k ^ n)) atTop (𝓝 (c k))\n⊢ Tendsto (fun n => ↑⌊c k ^ (n + 1)⌋₊ / ↑⌊c k ^ n⌋₊) atTop (𝓝 (c k))\n[PROOFSTEP]\nconvert A using 1\n[GOAL]\ncase h.e'_3\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nc : ℕ → ℝ\ncone : ∀ (k : ℕ), 1 < c k\nclim : Tendsto c atTop (𝓝 1)\nhc : ∀ (k : ℕ), Tendsto (fun n => u ⌊c k ^ n⌋₊ / ↑⌊c k ^ n⌋₊) atTop (𝓝 l)\na : ℝ\nha : 1 < a\nk : ℕ\nhk : c k < a\nH : ∀ (n : ℕ), 0 < ↑⌊c k ^ n⌋₊\nA : Tendsto (fun n => ↑⌊c k ^ (n + 1)⌋₊ / c k ^ (n + 1) * c k / (↑⌊c k ^ n⌋₊ / c k ^ n)) atTop (𝓝 (c k))\n⊢ (fun n => ↑⌊c k ^ (n + 1)⌋₊ / ↑⌊c k ^ n⌋₊) = fun n =>\n    ↑⌊c k ^ (n + 1)⌋₊ / c k ^ (n + 1) * c k / (↑⌊c k ^ n⌋₊ / c k ^ n)\n[PROOFSTEP]\next1 n\n[GOAL]\ncase h.e'_3.h\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nc : ℕ → ℝ\ncone : ∀ (k : ℕ), 1 < c k\nclim : Tendsto c atTop (𝓝 1)\nhc : ∀ (k : ℕ), Tendsto (fun n => u ⌊c k ^ n⌋₊ / ↑⌊c k ^ n⌋₊) atTop (𝓝 l)\na : ℝ\nha : 1 < a\nk : ℕ\nhk : c k < a\nH : ∀ (n : ℕ), 0 < ↑⌊c k ^ n⌋₊\nA : Tendsto (fun n => ↑⌊c k ^ (n + 1)⌋₊ / c k ^ (n + 1) * c k / (↑⌊c k ^ n⌋₊ / c k ^ n)) atTop (𝓝 (c k))\nn : ℕ\n⊢ ↑⌊c k ^ (n + 1)⌋₊ / ↑⌊c k ^ n⌋₊ = ↑⌊c k ^ (n + 1)⌋₊ / c k ^ (n + 1) * c k / (↑⌊c k ^ n⌋₊ / c k ^ n)\n[PROOFSTEP]\nfield_simp [(zero_lt_one.trans (cone k)).ne', (H n).ne']\n[GOAL]\ncase h.e'_3.h\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nc : ℕ → ℝ\ncone : ∀ (k : ℕ), 1 < c k\nclim : Tendsto c atTop (𝓝 1)\nhc : ∀ (k : ℕ), Tendsto (fun n => u ⌊c k ^ n⌋₊ / ↑⌊c k ^ n⌋₊) atTop (𝓝 l)\na : ℝ\nha : 1 < a\nk : ℕ\nhk : c k < a\nH : ∀ (n : ℕ), 0 < ↑⌊c k ^ n⌋₊\nA : Tendsto (fun n => ↑⌊c k ^ (n + 1)⌋₊ / c k ^ (n + 1) * c k / (↑⌊c k ^ n⌋₊ / c k ^ n)) atTop (𝓝 (c k))\nn : ℕ\n⊢ ↑⌊c k ^ (n + 1)⌋₊ * (c k ^ (n + 1) * ↑⌊c k ^ n⌋₊) = ↑⌊c k ^ (n + 1)⌋₊ * c k * c k ^ n * ↑⌊c k ^ n⌋₊\n[PROOFSTEP]\nring\n[GOAL]\ncase intro\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nc : ℕ → ℝ\ncone : ∀ (k : ℕ), 1 < c k\nclim : Tendsto c atTop (𝓝 1)\nhc : ∀ (k : ℕ), Tendsto (fun n => u ⌊c k ^ n⌋₊ / ↑⌊c k ^ n⌋₊) atTop (𝓝 l)\na : ℝ\nha : 1 < a\nk : ℕ\nhk : c k < a\nH : ∀ (n : ℕ), 0 < ↑⌊c k ^ n⌋₊\nA : Tendsto (fun n => ↑⌊c k ^ (n + 1)⌋₊ / c k ^ (n + 1) * c k / (↑⌊c k ^ n⌋₊ / c k ^ n)) atTop (𝓝 (1 * c k / 1))\nB : Tendsto (fun n => ↑⌊c k ^ (n + 1)⌋₊ / ↑⌊c k ^ n⌋₊) atTop (𝓝 (c k))\n⊢ ∀ᶠ (n : ℕ) in atTop, ↑((fun n => ⌊c k ^ n⌋₊) (n + 1)) ≤ a * ↑((fun n => ⌊c k ^ n⌋₊) n)\n[PROOFSTEP]\nfilter_upwards [(tendsto_order.1 B).2 a hk] with n hn\n[GOAL]\ncase h\nu : ℕ → ℝ\nl : ℝ\nhmono : Monotone u\nc : ℕ → ℝ\ncone : ∀ (k : ℕ), 1 < c k\nclim : Tendsto c atTop (𝓝 1)\nhc : ∀ (k : ℕ), Tendsto (fun n => u ⌊c k ^ n⌋₊ / ↑⌊c k ^ n⌋₊) atTop (𝓝 l)\na : ℝ\nha : 1 < a\nk : ℕ\nhk : c k < a\nH : ∀ (n : ℕ), 0 < ↑⌊c k ^ n⌋₊\nA : Tendsto (fun n => ↑⌊c k ^ (n + 1)⌋₊ / c k ^ (n + 1) * c k / (↑⌊c k ^ n⌋₊ / c k ^ n)) atTop (𝓝 (1 * c k / 1))\nB : Tendsto (fun n => ↑⌊c k ^ (n + 1)⌋₊ / ↑⌊c k ^ n⌋₊) atTop (𝓝 (c k))\nn : ℕ\nhn : ↑⌊c k ^ (n + 1)⌋₊ / ↑⌊c k ^ n⌋₊ < a\n⊢ ↑⌊c k ^ (n + 1)⌋₊ ≤ a * ↑⌊c k ^ n⌋₊\n[PROOFSTEP]\nexact (div_le_iff (H n)).1 hn.le\n[GOAL]\nN : ℕ\nj : ℝ\nhj : 0 < j\nc : ℝ\nhc : 1 < c\n⊢ ∑ i in filter (fun x => j < c ^ x) (range N), 1 / (c ^ i) ^ 2 ≤ c ^ 3 * (c - 1)⁻¹ / j ^ 2\n[PROOFSTEP]\nhave cpos : 0 < c := zero_lt_one.trans hc\n[GOAL]\nN : ℕ\nj : ℝ\nhj : 0 < j\nc : ℝ\nhc : 1 < c\ncpos : 0 < c\n⊢ ∑ i in filter (fun x => j < c ^ x) (range N), 1 / (c ^ i) ^ 2 ≤ c ^ 3 * (c - 1)⁻¹ / j ^ 2\n[PROOFSTEP]\nhave A : (0 : ℝ) < c⁻¹ ^ 2 := sq_pos_of_pos (inv_pos.2 cpos)\n[GOAL]\nN : ℕ\nj : ℝ\nhj : 0 < j\nc : ℝ\nhc : 1 < c\ncpos : 0 < c\nA : 0 < c⁻¹ ^ 2\n⊢ ∑ i in filter (fun x => j < c ^ x) (range N), 1 / (c ^ i) ^ 2 ≤ c ^ 3 * (c - 1)⁻¹ / j ^ 2\n[PROOFSTEP]\nhave B : c ^ 2 * ((1 : ℝ) - c⁻¹ ^ 2)⁻¹ ≤ c ^ 3 * (c - 1)⁻¹ :=\n  by\n  rw [← div_eq_mul_inv, ← div_eq_mul_inv, div_le_div_iff _ (sub_pos.2 hc)]\n  swap\n  · exact sub_pos.2 (pow_lt_one (inv_nonneg.2 cpos.le) (inv_lt_one hc) two_ne_zero)\n  have : c ^ 3 = c ^ 2 * c := by ring\n  simp only [mul_sub, this, mul_one, inv_pow, sub_le_sub_iff_left]\n  rw [mul_assoc, mul_comm c, ← mul_assoc, mul_inv_cancel (sq_pos_of_pos cpos).ne', one_mul]\n  simpa using pow_le_pow hc.le one_le_two\n[GOAL]\nN : ℕ\nj : ℝ\nhj : 0 < j\nc : ℝ\nhc : 1 < c\ncpos : 0 < c\nA : 0 < c⁻¹ ^ 2\n⊢ c ^ 2 * (1 - c⁻¹ ^ 2)⁻¹ ≤ c ^ 3 * (c - 1)⁻¹\n[PROOFSTEP]\nrw [← div_eq_mul_inv, ← div_eq_mul_inv, div_le_div_iff _ (sub_pos.2 hc)]\n[GOAL]\nN : ℕ\nj : ℝ\nhj : 0 < j\nc : ℝ\nhc : 1 < c\ncpos : 0 < c\nA : 0 < c⁻¹ ^ 2\n⊢ c ^ 2 * (c - 1) ≤ c ^ 3 * (1 - c⁻¹ ^ 2)\nN : ℕ j : ℝ hj : 0 < j c : ℝ hc : 1 < c cpos : 0 < c A : 0 < c⁻¹ ^ 2 ⊢ 0 < 1 - c⁻¹ ^ 2\n[PROOFSTEP]\nswap\n[GOAL]\nN : ℕ\nj : ℝ\nhj : 0 < j\nc : ℝ\nhc : 1 < c\ncpos : 0 < c\nA : 0 < c⁻¹ ^ 2\n⊢ 0 < 1 - c⁻¹ ^ 2\n[PROOFSTEP]\nexact sub_pos.2 (pow_lt_one (inv_nonneg.2 cpos.le) (inv_lt_one hc) two_ne_zero)\n[GOAL]\nN : ℕ\nj : ℝ\nhj : 0 < j\nc : ℝ\nhc : 1 < c\ncpos : 0 < c\nA : 0 < c⁻¹ ^ 2\n⊢ c ^ 2 * (c - 1) ≤ c ^ 3 * (1 - c⁻¹ ^ 2)\n[PROOFSTEP]\nhave : c ^ 3 = c ^ 2 * c := by ring\n[GOAL]\nN : ℕ\nj : ℝ\nhj : 0 < j\nc : ℝ\nhc : 1 < c\ncpos : 0 < c\nA : 0 < c⁻¹ ^ 2\n⊢ c ^ 3 = c ^ 2 * c\n[PROOFSTEP]\nring\n[GOAL]\nN : ℕ\nj : ℝ\nhj : 0 < j\nc : ℝ\nhc : 1 < c\ncpos : 0 < c\nA : 0 < c⁻¹ ^ 2\nthis : c ^ 3 = c ^ 2 * c\n⊢ c ^ 2 * (c - 1) ≤ c ^ 3 * (1 - c⁻¹ ^ 2)\n[PROOFSTEP]\nsimp only [mul_sub, this, mul_one, inv_pow, sub_le_sub_iff_left]\n[GOAL]\nN : ℕ\nj : ℝ\nhj : 0 < j\nc : ℝ\nhc : 1 < c\ncpos : 0 < c\nA : 0 < c⁻¹ ^ 2\nthis : c ^ 3 = c ^ 2 * c\n⊢ c ^ 2 * c * (c ^ 2)⁻¹ ≤ c ^ 2\n[PROOFSTEP]\nrw [mul_assoc, mul_comm c, ← mul_assoc, mul_inv_cancel (sq_pos_of_pos cpos).ne', one_mul]\n[GOAL]\nN : ℕ\nj : ℝ\nhj : 0 < j\nc : ℝ\nhc : 1 < c\ncpos : 0 < c\nA : 0 < c⁻¹ ^ 2\nthis : c ^ 3 = c ^ 2 * c\n⊢ c ≤ c ^ 2\n[PROOFSTEP]\nsimpa using pow_le_pow hc.le one_le_two\n[GOAL]\nN : ℕ\nj : ℝ\nhj : 0 < j\nc : ℝ\nhc : 1 < c\ncpos : 0 < c\nA : 0 < c⁻¹ ^ 2\nB : c ^ 2 * (1 - c⁻¹ ^ 2)⁻¹ ≤ c ^ 3 * (c - 1)⁻¹\n⊢ ∑ i in filter (fun x => j < c ^ x) (range N), 1 / (c ^ i) ^ 2 ≤ c ^ 3 * (c - 1)⁻¹ / j ^ 2\n[PROOFSTEP]\ncalc\n  (∑ i in (range N).filter fun i => j < c ^ i, (1 : ℝ) / (c ^ i) ^ 2) ≤\n      ∑ i in Ico ⌊Real.log j / Real.log c⌋₊ N, (1 : ℝ) / (c ^ i) ^ 2 :=\n    by\n    refine' sum_le_sum_of_subset_of_nonneg _ fun i _hi _hident => div_nonneg zero_le_one (sq_nonneg _)\n    intro i hi\n    simp only [mem_filter, mem_range] at hi \n    simp only [hi.1, mem_Ico, and_true_iff]\n    apply Nat.floor_le_of_le\n    apply le_of_lt\n    rw [div_lt_iff (Real.log_pos hc), ← Real.log_pow]\n    exact Real.log_lt_log hj hi.2\n  _ = ∑ i in Ico ⌊Real.log j / Real.log c⌋₊ N, (c⁻¹ ^ 2) ^ i :=\n    by\n    congr 1 with i\n    simp [← pow_mul, mul_comm]\n  _ ≤ (c⁻¹ ^ 2) ^ ⌊Real.log j / Real.log c⌋₊ / ((1 : ℝ) - c⁻¹ ^ 2) :=\n    by\n    apply geom_sum_Ico_le_of_lt_one (sq_nonneg _)\n    rw [sq_lt_one_iff (inv_nonneg.2 (zero_le_one.trans hc.le))]\n    exact inv_lt_one hc\n  _ ≤ (c⁻¹ ^ 2) ^ (Real.log j / Real.log c - 1) / ((1 : ℝ) - c⁻¹ ^ 2) :=\n    by\n    apply div_le_div _ _ _ le_rfl\n    · apply Real.rpow_nonneg_of_nonneg (sq_nonneg _)\n    · rw [← Real.rpow_nat_cast]\n      apply Real.rpow_le_rpow_of_exponent_ge A\n      · exact pow_le_one _ (inv_nonneg.2 (zero_le_one.trans hc.le)) (inv_le_one hc.le)\n      · exact (Nat.sub_one_lt_floor _).le\n    · simpa only [inv_pow, sub_pos] using inv_lt_one (one_lt_pow hc two_ne_zero)\n  _ = c ^ 2 * ((1 : ℝ) - c⁻¹ ^ 2)⁻¹ / j ^ 2 :=\n    by\n    have I : (c⁻¹ ^ 2) ^ (Real.log j / Real.log c) = (1 : ℝ) / j ^ 2 :=\n      by\n      apply Real.log_injOn_pos (Real.rpow_pos_of_pos A _)\n      · rw [one_div]\n        exact inv_pos.2 (sq_pos_of_pos hj)\n      rw [Real.log_rpow A]\n      simp only [one_div, Real.log_inv, Real.log_pow, Nat.cast_one, mul_neg, neg_inj]\n      field_simp [(Real.log_pos hc).ne']\n      ring\n    rw [Real.rpow_sub A, I]\n    have : c ^ 2 - 1 ≠ 0 := (sub_pos.2 (one_lt_pow hc two_ne_zero)).ne'\n    field_simp [hj.ne', (zero_lt_one.trans hc).ne']\n    ring\n  _ ≤ c ^ 3 * (c - 1)⁻¹ / j ^ 2 := by\n    apply div_le_div _ B (sq_pos_of_pos hj) le_rfl\n    exact mul_nonneg (pow_nonneg cpos.le _) (inv_nonneg.2 (sub_pos.2 hc).le)\n[GOAL]\nN : ℕ\nj : ℝ\nhj : 0 < j\nc : ℝ\nhc : 1 < c\ncpos : 0 < c\nA : 0 < c⁻¹ ^ 2\nB : c ^ 2 * (1 - c⁻¹ ^ 2)⁻¹ ≤ c ^ 3 * (c - 1)⁻¹\n⊢ ∑ i in filter (fun i => j < c ^ i) (range N), 1 / (c ^ i) ^ 2 ≤\n    ∑ i in Ico ⌊Real.log j / Real.log c⌋₊ N, 1 / (c ^ i) ^ 2\n[PROOFSTEP]\nrefine' sum_le_sum_of_subset_of_nonneg _ fun i _hi _hident => div_nonneg zero_le_one (sq_nonneg _)\n[GOAL]\nN : ℕ\nj : ℝ\nhj : 0 < j\nc : ℝ\nhc : 1 < c\ncpos : 0 < c\nA : 0 < c⁻¹ ^ 2\nB : c ^ 2 * (1 - c⁻¹ ^ 2)⁻¹ ≤ c ^ 3 * (c - 1)⁻¹\n⊢ filter (fun i => j < c ^ i) (range N) ⊆ Ico ⌊Real.log j / Real.log c⌋₊ N\n[PROOFSTEP]\nintro i hi\n[GOAL]\nN : ℕ\nj : ℝ\nhj : 0 < j\nc : ℝ\nhc : 1 < c\ncpos : 0 < c\nA : 0 < c⁻¹ ^ 2\nB : c ^ 2 * (1 - c⁻¹ ^ 2)⁻¹ ≤ c ^ 3 * (c - 1)⁻¹\ni : ℕ\nhi : i ∈ filter (fun i => j < c ^ i) (range N)\n⊢ i ∈ Ico ⌊Real.log j / Real.log c⌋₊ N\n[PROOFSTEP]\nsimp only [mem_filter, mem_range] at hi \n[GOAL]\nN : ℕ\nj : ℝ\nhj : 0 < j\nc : ℝ\nhc : 1 < c\ncpos : 0 < c\nA : 0 < c⁻¹ ^ 2\nB : c ^ 2 * (1 - c⁻¹ ^ 2)⁻¹ ≤ c ^ 3 * (c - 1)⁻¹\ni : ℕ\nhi : i < N ∧ j < c ^ i\n⊢ i ∈ Ico ⌊Real.log j / Real.log c⌋₊ N\n[PROOFSTEP]\nsimp only [hi.1, mem_Ico, and_true_iff]\n[GOAL]\nN : ℕ\nj : ℝ\nhj : 0 < j\nc : ℝ\nhc : 1 < c\ncpos : 0 < c\nA : 0 < c⁻¹ ^ 2\nB : c ^ 2 * (1 - c⁻¹ ^ 2)⁻¹ ≤ c ^ 3 * (c - 1)⁻¹\ni : ℕ\nhi : i < N ∧ j < c ^ i\n⊢ ⌊Real.log j / Real.log c⌋₊ ≤ i\n[PROOFSTEP]\napply Nat.floor_le_of_le\n[GOAL]\ncase h\nN : ℕ\nj : ℝ\nhj : 0 < j\nc : ℝ\nhc : 1 < c\ncpos : 0 < c\nA : 0 < c⁻¹ ^ 2\nB : c ^ 2 * (1 - c⁻¹ ^ 2)⁻¹ ≤ c ^ 3 * (c - 1)⁻¹\ni : ℕ\nhi : i < N ∧ j < c ^ i\n⊢ Real.log j / Real.log c ≤ ↑i\n[PROOFSTEP]\napply le_of_lt\n[GOAL]\ncase h.a\nN : ℕ\nj : ℝ\nhj : 0 < j\nc : ℝ\nhc : 1 < c\ncpos : 0 < c\nA : 0 < c⁻¹ ^ 2\nB : c ^ 2 * (1 - c⁻¹ ^ 2)⁻¹ ≤ c ^ 3 * (c - 1)⁻¹\ni : ℕ\nhi : i < N ∧ j < c ^ i\n⊢ Real.log j / Real.log c < ↑i\n[PROOFSTEP]\nrw [div_lt_iff (Real.log_pos hc), ← Real.log_pow]\n[GOAL]\ncase h.a\nN : ℕ\nj : ℝ\nhj : 0 < j\nc : ℝ\nhc : 1 < c\ncpos : 0 < c\nA : 0 < c⁻¹ ^ 2\nB : c ^ 2 * (1 - c⁻¹ ^ 2)⁻¹ ≤ c ^ 3 * (c - 1)⁻¹\ni : ℕ\nhi : i < N ∧ j < c ^ i\n⊢ Real.log j < Real.log (c ^ i)\n[PROOFSTEP]\nexact Real.log_lt_log hj hi.2\n[GOAL]\nN : ℕ\nj : ℝ\nhj : 0 < j\nc : ℝ\nhc : 1 < c\ncpos : 0 < c\nA : 0 < c⁻¹ ^ 2\nB : c ^ 2 * (1 - c⁻¹ ^ 2)⁻¹ ≤ c ^ 3 * (c - 1)⁻¹\n⊢ ∑ i in Ico ⌊Real.log j / Real.log c⌋₊ N, 1 / (c ^ i) ^ 2 = ∑ i in Ico ⌊Real.log j / Real.log c⌋₊ N, (c⁻¹ ^ 2) ^ i\n[PROOFSTEP]\ncongr 1 with i\n[GOAL]\ncase e_f.h\nN : ℕ\nj : ℝ\nhj : 0 < j\nc : ℝ\nhc : 1 < c\ncpos : 0 < c\nA : 0 < c⁻¹ ^ 2\nB : c ^ 2 * (1 - c⁻¹ ^ 2)⁻¹ ≤ c ^ 3 * (c - 1)⁻¹\ni : ℕ\n⊢ 1 / (c ^ i) ^ 2 = (c⁻¹ ^ 2) ^ i\n[PROOFSTEP]\nsimp [← pow_mul, mul_comm]\n[GOAL]\nN : ℕ\nj : ℝ\nhj : 0 < j\nc : ℝ\nhc : 1 < c\ncpos : 0 < c\nA : 0 < c⁻¹ ^ 2\nB : c ^ 2 * (1 - c⁻¹ ^ 2)⁻¹ ≤ c ^ 3 * (c - 1)⁻¹\n⊢ ∑ i in Ico ⌊Real.log j / Real.log c⌋₊ N, (c⁻¹ ^ 2) ^ i ≤ (c⁻¹ ^ 2) ^ ⌊Real.log j / Real.log c⌋₊ / (1 - c⁻¹ ^ 2)\n[PROOFSTEP]\napply geom_sum_Ico_le_of_lt_one (sq_nonneg _)\n[GOAL]\ncase h'x\nN : ℕ\nj : ℝ\nhj : 0 < j\nc : ℝ\nhc : 1 < c\ncpos : 0 < c\nA : 0 < c⁻¹ ^ 2\nB : c ^ 2 * (1 - c⁻¹ ^ 2)⁻¹ ≤ c ^ 3 * (c - 1)⁻¹\n⊢ c⁻¹ ^ 2 < 1\n[PROOFSTEP]\nrw [sq_lt_one_iff (inv_nonneg.2 (zero_le_one.trans hc.le))]\n[GOAL]\ncase h'x\nN : ℕ\nj : ℝ\nhj : 0 < j\nc : ℝ\nhc : 1 < c\ncpos : 0 < c\nA : 0 < c⁻¹ ^ 2\nB : c ^ 2 * (1 - c⁻¹ ^ 2)⁻¹ ≤ c ^ 3 * (c - 1)⁻¹\n⊢ c⁻¹ < 1\n[PROOFSTEP]\nexact inv_lt_one hc\n[GOAL]\nN : ℕ\nj : ℝ\nhj : 0 < j\nc : ℝ\nhc : 1 < c\ncpos : 0 < c\nA : 0 < c⁻¹ ^ 2\nB : c ^ 2 * (1 - c⁻¹ ^ 2)⁻¹ ≤ c ^ 3 * (c - 1)⁻¹\n⊢ (c⁻¹ ^ 2) ^ ⌊Real.log j / Real.log c⌋₊ / (1 - c⁻¹ ^ 2) ≤ (c⁻¹ ^ 2) ^ (Real.log j / Real.log c - 1) / (1 - c⁻¹ ^ 2)\n[PROOFSTEP]\napply div_le_div _ _ _ le_rfl\n[GOAL]\nN : ℕ\nj : ℝ\nhj : 0 < j\nc : ℝ\nhc : 1 < c\ncpos : 0 < c\nA : 0 < c⁻¹ ^ 2\nB : c ^ 2 * (1 - c⁻¹ ^ 2)⁻¹ ≤ c ^ 3 * (c - 1)⁻¹\n⊢ 0 ≤ (c⁻¹ ^ 2) ^ (Real.log j / Real.log c - 1)\n[PROOFSTEP]\napply Real.rpow_nonneg_of_nonneg (sq_nonneg _)\n[GOAL]\nN : ℕ\nj : ℝ\nhj : 0 < j\nc : ℝ\nhc : 1 < c\ncpos : 0 < c\nA : 0 < c⁻¹ ^ 2\nB : c ^ 2 * (1 - c⁻¹ ^ 2)⁻¹ ≤ c ^ 3 * (c - 1)⁻¹\n⊢ (c⁻¹ ^ 2) ^ ⌊Real.log j / Real.log c⌋₊ ≤ (c⁻¹ ^ 2) ^ (Real.log j / Real.log c - 1)\n[PROOFSTEP]\nrw [← Real.rpow_nat_cast]\n[GOAL]\nN : ℕ\nj : ℝ\nhj : 0 < j\nc : ℝ\nhc : 1 < c\ncpos : 0 < c\nA : 0 < c⁻¹ ^ 2\nB : c ^ 2 * (1 - c⁻¹ ^ 2)⁻¹ ≤ c ^ 3 * (c - 1)⁻¹\n⊢ (c⁻¹ ^ 2) ^ ↑⌊Real.log j / Real.log c⌋₊ ≤ (c⁻¹ ^ 2) ^ (Real.log j / Real.log c - 1)\n[PROOFSTEP]\napply Real.rpow_le_rpow_of_exponent_ge A\n[GOAL]\ncase hx1\nN : ℕ\nj : ℝ\nhj : 0 < j\nc : ℝ\nhc : 1 < c\ncpos : 0 < c\nA : 0 < c⁻¹ ^ 2\nB : c ^ 2 * (1 - c⁻¹ ^ 2)⁻¹ ≤ c ^ 3 * (c - 1)⁻¹\n⊢ c⁻¹ ^ 2 ≤ 1\n[PROOFSTEP]\nexact pow_le_one _ (inv_nonneg.2 (zero_le_one.trans hc.le)) (inv_le_one hc.le)\n[GOAL]\ncase hyz\nN : ℕ\nj : ℝ\nhj : 0 < j\nc : ℝ\nhc : 1 < c\ncpos : 0 < c\nA : 0 < c⁻¹ ^ 2\nB : c ^ 2 * (1 - c⁻¹ ^ 2)⁻¹ ≤ c ^ 3 * (c - 1)⁻¹\n⊢ Real.log j / Real.log c - 1 ≤ ↑⌊Real.log j / Real.log c⌋₊\n[PROOFSTEP]\nexact (Nat.sub_one_lt_floor _).le\n[GOAL]\nN : ℕ\nj : ℝ\nhj : 0 < j\nc : ℝ\nhc : 1 < c\ncpos : 0 < c\nA : 0 < c⁻¹ ^ 2\nB : c ^ 2 * (1 - c⁻¹ ^ 2)⁻¹ ≤ c ^ 3 * (c - 1)⁻¹\n⊢ 0 < 1 - c⁻¹ ^ 2\n[PROOFSTEP]\nsimpa only [inv_pow, sub_pos] using inv_lt_one (one_lt_pow hc two_ne_zero)\n[GOAL]\nN : ℕ\nj : ℝ\nhj : 0 < j\nc : ℝ\nhc : 1 < c\ncpos : 0 < c\nA : 0 < c⁻¹ ^ 2\nB : c ^ 2 * (1 - c⁻¹ ^ 2)⁻¹ ≤ c ^ 3 * (c - 1)⁻¹\n⊢ (c⁻¹ ^ 2) ^ (Real.log j / Real.log c - 1) / (1 - c⁻¹ ^ 2) = c ^ 2 * (1 - c⁻¹ ^ 2)⁻¹ / j ^ 2\n[PROOFSTEP]\nhave I : (c⁻¹ ^ 2) ^ (Real.log j / Real.log c) = (1 : ℝ) / j ^ 2 :=\n  by\n  apply Real.log_injOn_pos (Real.rpow_pos_of_pos A _)\n  · rw [one_div]\n    exact inv_pos.2 (sq_pos_of_pos hj)\n  rw [Real.log_rpow A]\n  simp only [one_div, Real.log_inv, Real.log_pow, Nat.cast_one, mul_neg, neg_inj]\n  field_simp [(Real.log_pos hc).ne']\n  ring\n[GOAL]\nN : ℕ\nj : ℝ\nhj : 0 < j\nc : ℝ\nhc : 1 < c\ncpos : 0 < c\nA : 0 < c⁻¹ ^ 2\nB : c ^ 2 * (1 - c⁻¹ ^ 2)⁻¹ ≤ c ^ 3 * (c - 1)⁻¹\n⊢ (c⁻¹ ^ 2) ^ (Real.log j / Real.log c) = 1 / j ^ 2\n[PROOFSTEP]\napply Real.log_injOn_pos (Real.rpow_pos_of_pos A _)\n[GOAL]\ncase a\nN : ℕ\nj : ℝ\nhj : 0 < j\nc : ℝ\nhc : 1 < c\ncpos : 0 < c\nA : 0 < c⁻¹ ^ 2\nB : c ^ 2 * (1 - c⁻¹ ^ 2)⁻¹ ≤ c ^ 3 * (c - 1)⁻¹\n⊢ 1 / j ^ 2 ∈ Set.Ioi 0\n[PROOFSTEP]\nrw [one_div]\n[GOAL]\ncase a\nN : ℕ\nj : ℝ\nhj : 0 < j\nc : ℝ\nhc : 1 < c\ncpos : 0 < c\nA : 0 < c⁻¹ ^ 2\nB : c ^ 2 * (1 - c⁻¹ ^ 2)⁻¹ ≤ c ^ 3 * (c - 1)⁻¹\n⊢ (j ^ 2)⁻¹ ∈ Set.Ioi 0\n[PROOFSTEP]\nexact inv_pos.2 (sq_pos_of_pos hj)\n[GOAL]\ncase a\nN : ℕ\nj : ℝ\nhj : 0 < j\nc : ℝ\nhc : 1 < c\ncpos : 0 < c\nA : 0 < c⁻¹ ^ 2\nB : c ^ 2 * (1 - c⁻¹ ^ 2)⁻¹ ≤ c ^ 3 * (c - 1)⁻¹\n⊢ Real.log ((c⁻¹ ^ 2) ^ (Real.log j / Real.log c)) = Real.log (1 / j ^ 2)\n[PROOFSTEP]\nrw [Real.log_rpow A]\n[GOAL]\ncase a\nN : ℕ\nj : ℝ\nhj : 0 < j\nc : ℝ\nhc : 1 < c\ncpos : 0 < c\nA : 0 < c⁻¹ ^ 2\nB : c ^ 2 * (1 - c⁻¹ ^ 2)⁻¹ ≤ c ^ 3 * (c - 1)⁻¹\n⊢ Real.log j / Real.log c * Real.log (c⁻¹ ^ 2) = Real.log (1 / j ^ 2)\n[PROOFSTEP]\nsimp only [one_div, Real.log_inv, Real.log_pow, Nat.cast_one, mul_neg, neg_inj]\n[GOAL]\ncase a\nN : ℕ\nj : ℝ\nhj : 0 < j\nc : ℝ\nhc : 1 < c\ncpos : 0 < c\nA : 0 < c⁻¹ ^ 2\nB : c ^ 2 * (1 - c⁻¹ ^ 2)⁻¹ ≤ c ^ 3 * (c - 1)⁻¹\n⊢ Real.log j / Real.log c * (↑2 * Real.log c) = ↑2 * Real.log j\n[PROOFSTEP]\nfield_simp [(Real.log_pos hc).ne']\n[GOAL]\ncase a\nN : ℕ\nj : ℝ\nhj : 0 < j\nc : ℝ\nhc : 1 < c\ncpos : 0 < c\nA : 0 < c⁻¹ ^ 2\nB : c ^ 2 * (1 - c⁻¹ ^ 2)⁻¹ ≤ c ^ 3 * (c - 1)⁻¹\n⊢ Real.log j * (2 * Real.log c) = 2 * Real.log j * Real.log c\n[PROOFSTEP]\nring\n[GOAL]\nN : ℕ\nj : ℝ\nhj : 0 < j\nc : ℝ\nhc : 1 < c\ncpos : 0 < c\nA : 0 < c⁻¹ ^ 2\nB : c ^ 2 * (1 - c⁻¹ ^ 2)⁻¹ ≤ c ^ 3 * (c - 1)⁻¹\nI : (c⁻¹ ^ 2) ^ (Real.log j / Real.log c) = 1 / j ^ 2\n⊢ (c⁻¹ ^ 2) ^ (Real.log j / Real.log c - 1) / (1 - c⁻¹ ^ 2) = c ^ 2 * (1 - c⁻¹ ^ 2)⁻¹ / j ^ 2\n[PROOFSTEP]\nrw [Real.rpow_sub A, I]\n[GOAL]\nN : ℕ\nj : ℝ\nhj : 0 < j\nc : ℝ\nhc : 1 < c\ncpos : 0 < c\nA : 0 < c⁻¹ ^ 2\nB : c ^ 2 * (1 - c⁻¹ ^ 2)⁻¹ ≤ c ^ 3 * (c - 1)⁻¹\nI : (c⁻¹ ^ 2) ^ (Real.log j / Real.log c) = 1 / j ^ 2\n⊢ 1 / j ^ 2 / (c⁻¹ ^ 2) ^ 1 / (1 - c⁻¹ ^ 2) = c ^ 2 * (1 - c⁻¹ ^ 2)⁻¹ / j ^ 2\n[PROOFSTEP]\nhave : c ^ 2 - 1 ≠ 0 := (sub_pos.2 (one_lt_pow hc two_ne_zero)).ne'\n[GOAL]\nN : ℕ\nj : ℝ\nhj : 0 < j\nc : ℝ\nhc : 1 < c\ncpos : 0 < c\nA : 0 < c⁻¹ ^ 2\nB : c ^ 2 * (1 - c⁻¹ ^ 2)⁻¹ ≤ c ^ 3 * (c - 1)⁻¹\nI : (c⁻¹ ^ 2) ^ (Real.log j / Real.log c) = 1 / j ^ 2\nthis : c ^ 2 - 1 ≠ 0\n⊢ 1 / j ^ 2 / (c⁻¹ ^ 2) ^ 1 / (1 - c⁻¹ ^ 2) = c ^ 2 * (1 - c⁻¹ ^ 2)⁻¹ / j ^ 2\n[PROOFSTEP]\nfield_simp [hj.ne', (zero_lt_one.trans hc).ne']\n[GOAL]\nN : ℕ\nj : ℝ\nhj : 0 < j\nc : ℝ\nhc : 1 < c\ncpos : 0 < c\nA : 0 < c⁻¹ ^ 2\nB : c ^ 2 * (1 - c⁻¹ ^ 2)⁻¹ ≤ c ^ 3 * (c - 1)⁻¹\nI : (c⁻¹ ^ 2) ^ (Real.log j / Real.log c) = 1 / j ^ 2\nthis : c ^ 2 - 1 ≠ 0\n⊢ (c ^ 2 - 1) * j ^ 2 = j ^ 2 * (c ^ 2 - 1)\n[PROOFSTEP]\nring\n[GOAL]\nN : ℕ\nj : ℝ\nhj : 0 < j\nc : ℝ\nhc : 1 < c\ncpos : 0 < c\nA : 0 < c⁻¹ ^ 2\nB : c ^ 2 * (1 - c⁻¹ ^ 2)⁻¹ ≤ c ^ 3 * (c - 1)⁻¹\n⊢ c ^ 2 * (1 - c⁻¹ ^ 2)⁻¹ / j ^ 2 ≤ c ^ 3 * (c - 1)⁻¹ / j ^ 2\n[PROOFSTEP]\napply div_le_div _ B (sq_pos_of_pos hj) le_rfl\n[GOAL]\nN : ℕ\nj : ℝ\nhj : 0 < j\nc : ℝ\nhc : 1 < c\ncpos : 0 < c\nA : 0 < c⁻¹ ^ 2\nB : c ^ 2 * (1 - c⁻¹ ^ 2)⁻¹ ≤ c ^ 3 * (c - 1)⁻¹\n⊢ 0 ≤ c ^ 3 * (c - 1)⁻¹\n[PROOFSTEP]\nexact mul_nonneg (pow_nonneg cpos.le _) (inv_nonneg.2 (sub_pos.2 hc).le)\n[GOAL]\nc : ℝ\nhc : 1 < c\ni : ℕ\n⊢ (1 - c⁻¹) * c ^ i ≤ ↑⌊c ^ i⌋₊\n[PROOFSTEP]\nhave cpos : 0 < c := zero_lt_one.trans hc\n[GOAL]\nc : ℝ\nhc : 1 < c\ni : ℕ\ncpos : 0 < c\n⊢ (1 - c⁻¹) * c ^ i ≤ ↑⌊c ^ i⌋₊\n[PROOFSTEP]\nrcases Nat.eq_zero_or_pos i with (rfl | hi)\n[GOAL]\ncase inl\nc : ℝ\nhc : 1 < c\ncpos : 0 < c\n⊢ (1 - c⁻¹) * c ^ 0 ≤ ↑⌊c ^ 0⌋₊\n[PROOFSTEP]\nsimp only [pow_zero, Nat.floor_one, Nat.cast_one, mul_one, sub_le_self_iff, inv_nonneg, cpos.le]\n[GOAL]\ncase inr\nc : ℝ\nhc : 1 < c\ni : ℕ\ncpos : 0 < c\nhi : i > 0\n⊢ (1 - c⁻¹) * c ^ i ≤ ↑⌊c ^ i⌋₊\n[PROOFSTEP]\nhave hident : 1 ≤ i := hi\n[GOAL]\ncase inr\nc : ℝ\nhc : 1 < c\ni : ℕ\ncpos : 0 < c\nhi : i > 0\nhident : 1 ≤ i\n⊢ (1 - c⁻¹) * c ^ i ≤ ↑⌊c ^ i⌋₊\n[PROOFSTEP]\ncalc\n  (1 - c⁻¹) * c ^ i = c ^ i - c ^ i * c⁻¹ := by ring\n  _ ≤ c ^ i - 1 := by\n    simpa only [← div_eq_mul_inv, sub_le_sub_iff_left, one_le_div cpos, pow_one] using pow_le_pow hc.le hident\n  _ ≤ ⌊c ^ i⌋₊ := (Nat.sub_one_lt_floor _).le\n[GOAL]\nc : ℝ\nhc : 1 < c\ni : ℕ\ncpos : 0 < c\nhi : i > 0\nhident : 1 ≤ i\n⊢ (1 - c⁻¹) * c ^ i = c ^ i - c ^ i * c⁻¹\n[PROOFSTEP]\nring\n[GOAL]\nc : ℝ\nhc : 1 < c\ni : ℕ\ncpos : 0 < c\nhi : i > 0\nhident : 1 ≤ i\n⊢ c ^ i - c ^ i * c⁻¹ ≤ c ^ i - 1\n[PROOFSTEP]\nsimpa only [← div_eq_mul_inv, sub_le_sub_iff_left, one_le_div cpos, pow_one] using pow_le_pow hc.le hident\n[GOAL]\nN : ℕ\nj : ℝ\nhj : 0 < j\nc : ℝ\nhc : 1 < c\n⊢ ∑ i in filter (fun x => j < ↑⌊c ^ x⌋₊) (range N), 1 / ↑⌊c ^ i⌋₊ ^ 2 ≤ c ^ 5 * (c - 1)⁻¹ ^ 3 / j ^ 2\n[PROOFSTEP]\nhave cpos : 0 < c := zero_lt_one.trans hc\n[GOAL]\nN : ℕ\nj : ℝ\nhj : 0 < j\nc : ℝ\nhc : 1 < c\ncpos : 0 < c\n⊢ ∑ i in filter (fun x => j < ↑⌊c ^ x⌋₊) (range N), 1 / ↑⌊c ^ i⌋₊ ^ 2 ≤ c ^ 5 * (c - 1)⁻¹ ^ 3 / j ^ 2\n[PROOFSTEP]\nhave A : 0 < 1 - c⁻¹ := sub_pos.2 (inv_lt_one hc)\n[GOAL]\nN : ℕ\nj : ℝ\nhj : 0 < j\nc : ℝ\nhc : 1 < c\ncpos : 0 < c\nA : 0 < 1 - c⁻¹\n⊢ ∑ i in filter (fun x => j < ↑⌊c ^ x⌋₊) (range N), 1 / ↑⌊c ^ i⌋₊ ^ 2 ≤ c ^ 5 * (c - 1)⁻¹ ^ 3 / j ^ 2\n[PROOFSTEP]\ncalc\n  (∑ i in (range N).filter (j < ⌊c ^ ·⌋₊), (1 : ℝ) / (⌊c ^ i⌋₊ : ℝ) ^ 2) ≤\n      ∑ i in (range N).filter (j < c ^ ·), (1 : ℝ) / (⌊c ^ i⌋₊ : ℝ) ^ 2 :=\n    by\n    apply sum_le_sum_of_subset_of_nonneg\n    · intro i hi\n      simp only [mem_filter, mem_range] at hi \n      simpa only [hi.1, mem_filter, mem_range, true_and_iff] using hi.2.trans_le (Nat.floor_le (pow_nonneg cpos.le _))\n    · intro i _hi _hident\n      exact div_nonneg zero_le_one (sq_nonneg _)\n  _ ≤ ∑ i in (range N).filter (j < c ^ ·), (1 - c⁻¹)⁻¹ ^ 2 * ((1 : ℝ) / (c ^ i) ^ 2) :=\n    by\n    refine' sum_le_sum fun i _hi => _\n    rw [mul_div_assoc', mul_one, div_le_div_iff]; rotate_left\n    · apply sq_pos_of_pos\n      refine' zero_lt_one.trans_le _\n      simp only [Nat.le_floor, one_le_pow_of_one_le, hc.le, Nat.one_le_cast, Nat.cast_one]\n    · exact sq_pos_of_pos (pow_pos cpos _)\n    rw [one_mul, ← mul_pow]\n    apply pow_le_pow_of_le_left (pow_nonneg cpos.le _)\n    rw [← div_eq_inv_mul, le_div_iff A, mul_comm]\n    exact mul_pow_le_nat_floor_pow hc i\n  _ ≤ (1 - c⁻¹)⁻¹ ^ 2 * (c ^ 3 * (c - 1)⁻¹) / j ^ 2 :=\n    by\n    rw [← mul_sum, ← mul_div_assoc']\n    refine' mul_le_mul_of_nonneg_left _ (sq_nonneg _)\n    exact sum_div_pow_sq_le_div_sq N hj hc\n  _ = c ^ 5 * (c - 1)⁻¹ ^ 3 / j ^ 2 := by\n    congr 1\n    field_simp [cpos.ne', (sub_pos.2 hc).ne']\n    ring!\n[GOAL]\nN : ℕ\nj : ℝ\nhj : 0 < j\nc : ℝ\nhc : 1 < c\ncpos : 0 < c\nA : 0 < 1 - c⁻¹\n⊢ ∑ i in filter (fun x => j < ↑⌊c ^ x⌋₊) (range N), 1 / ↑⌊c ^ i⌋₊ ^ 2 ≤\n    ∑ i in filter (fun x => j < c ^ x) (range N), 1 / ↑⌊c ^ i⌋₊ ^ 2\n[PROOFSTEP]\napply sum_le_sum_of_subset_of_nonneg\n[GOAL]\ncase h\nN : ℕ\nj : ℝ\nhj : 0 < j\nc : ℝ\nhc : 1 < c\ncpos : 0 < c\nA : 0 < 1 - c⁻¹\n⊢ filter (fun x => j < ↑⌊c ^ x⌋₊) (range N) ⊆ filter (fun x => j < c ^ x) (range N)\n[PROOFSTEP]\nintro i hi\n[GOAL]\ncase h\nN : ℕ\nj : ℝ\nhj : 0 < j\nc : ℝ\nhc : 1 < c\ncpos : 0 < c\nA : 0 < 1 - c⁻¹\ni : ℕ\nhi : i ∈ filter (fun x => j < ↑⌊c ^ x⌋₊) (range N)\n⊢ i ∈ filter (fun x => j < c ^ x) (range N)\n[PROOFSTEP]\nsimp only [mem_filter, mem_range] at hi \n[GOAL]\ncase h\nN : ℕ\nj : ℝ\nhj : 0 < j\nc : ℝ\nhc : 1 < c\ncpos : 0 < c\nA : 0 < 1 - c⁻¹\ni : ℕ\nhi : i < N ∧ j < ↑⌊c ^ i⌋₊\n⊢ i ∈ filter (fun x => j < c ^ x) (range N)\n[PROOFSTEP]\nsimpa only [hi.1, mem_filter, mem_range, true_and_iff] using hi.2.trans_le (Nat.floor_le (pow_nonneg cpos.le _))\n[GOAL]\ncase hf\nN : ℕ\nj : ℝ\nhj : 0 < j\nc : ℝ\nhc : 1 < c\ncpos : 0 < c\nA : 0 < 1 - c⁻¹\n⊢ ∀ (i : ℕ),\n    i ∈ filter (fun x => j < c ^ x) (range N) → ¬i ∈ filter (fun x => j < ↑⌊c ^ x⌋₊) (range N) → 0 ≤ 1 / ↑⌊c ^ i⌋₊ ^ 2\n[PROOFSTEP]\nintro i _hi _hident\n[GOAL]\ncase hf\nN : ℕ\nj : ℝ\nhj : 0 < j\nc : ℝ\nhc : 1 < c\ncpos : 0 < c\nA : 0 < 1 - c⁻¹\ni : ℕ\n_hi : i ∈ filter (fun x => j < c ^ x) (range N)\n_hident : ¬i ∈ filter (fun x => j < ↑⌊c ^ x⌋₊) (range N)\n⊢ 0 ≤ 1 / ↑⌊c ^ i⌋₊ ^ 2\n[PROOFSTEP]\nexact div_nonneg zero_le_one (sq_nonneg _)\n[GOAL]\nN : ℕ\nj : ℝ\nhj : 0 < j\nc : ℝ\nhc : 1 < c\ncpos : 0 < c\nA : 0 < 1 - c⁻¹\n⊢ ∑ i in filter (fun x => j < c ^ x) (range N), 1 / ↑⌊c ^ i⌋₊ ^ 2 ≤\n    ∑ i in filter (fun x => j < c ^ x) (range N), (1 - c⁻¹)⁻¹ ^ 2 * (1 / (c ^ i) ^ 2)\n[PROOFSTEP]\nrefine' sum_le_sum fun i _hi => _\n[GOAL]\nN : ℕ\nj : ℝ\nhj : 0 < j\nc : ℝ\nhc : 1 < c\ncpos : 0 < c\nA : 0 < 1 - c⁻¹\ni : ℕ\n_hi : i ∈ filter (fun x => j < c ^ x) (range N)\n⊢ 1 / ↑⌊c ^ i⌋₊ ^ 2 ≤ (1 - c⁻¹)⁻¹ ^ 2 * (1 / (c ^ i) ^ 2)\n[PROOFSTEP]\nrw [mul_div_assoc', mul_one, div_le_div_iff]\n[GOAL]\nN : ℕ\nj : ℝ\nhj : 0 < j\nc : ℝ\nhc : 1 < c\ncpos : 0 < c\nA : 0 < 1 - c⁻¹\ni : ℕ\n_hi : i ∈ filter (fun x => j < c ^ x) (range N)\n⊢ 1 * (c ^ i) ^ 2 ≤ (1 - c⁻¹)⁻¹ ^ 2 * ↑⌊c ^ i⌋₊ ^ 2\ncase b0\nN : ℕ\nj : ℝ\nhj : 0 < j\nc : ℝ\nhc : 1 < c\ncpos : 0 < c\nA : 0 < 1 - c⁻¹\ni : ℕ\n_hi : i ∈ filter (fun x => j < c ^ x) (range N)\n⊢ 0 < ↑⌊c ^ i⌋₊ ^ 2\ncase d0\nN : ℕ\nj : ℝ\nhj : 0 < j\nc : ℝ\nhc : 1 < c\ncpos : 0 < c\nA : 0 < 1 - c⁻¹\ni : ℕ\n_hi : i ∈ filter (fun x => j < c ^ x) (range N)\n⊢ 0 < (c ^ i) ^ 2\n[PROOFSTEP]\nrotate_left\n[GOAL]\ncase b0\nN : ℕ\nj : ℝ\nhj : 0 < j\nc : ℝ\nhc : 1 < c\ncpos : 0 < c\nA : 0 < 1 - c⁻¹\ni : ℕ\n_hi : i ∈ filter (fun x => j < c ^ x) (range N)\n⊢ 0 < ↑⌊c ^ i⌋₊ ^ 2\n[PROOFSTEP]\napply sq_pos_of_pos\n[GOAL]\ncase b0.ha\nN : ℕ\nj : ℝ\nhj : 0 < j\nc : ℝ\nhc : 1 < c\ncpos : 0 < c\nA : 0 < 1 - c⁻¹\ni : ℕ\n_hi : i ∈ filter (fun x => j < c ^ x) (range N)\n⊢ 0 < ↑⌊c ^ i⌋₊\n[PROOFSTEP]\nrefine' zero_lt_one.trans_le _\n[GOAL]\ncase b0.ha\nN : ℕ\nj : ℝ\nhj : 0 < j\nc : ℝ\nhc : 1 < c\ncpos : 0 < c\nA : 0 < 1 - c⁻¹\ni : ℕ\n_hi : i ∈ filter (fun x => j < c ^ x) (range N)\n⊢ 1 ≤ ↑⌊c ^ i⌋₊\n[PROOFSTEP]\nsimp only [Nat.le_floor, one_le_pow_of_one_le, hc.le, Nat.one_le_cast, Nat.cast_one]\n[GOAL]\ncase d0\nN : ℕ\nj : ℝ\nhj : 0 < j\nc : ℝ\nhc : 1 < c\ncpos : 0 < c\nA : 0 < 1 - c⁻¹\ni : ℕ\n_hi : i ∈ filter (fun x => j < c ^ x) (range N)\n⊢ 0 < (c ^ i) ^ 2\n[PROOFSTEP]\nexact sq_pos_of_pos (pow_pos cpos _)\n[GOAL]\nN : ℕ\nj : ℝ\nhj : 0 < j\nc : ℝ\nhc : 1 < c\ncpos : 0 < c\nA : 0 < 1 - c⁻¹\ni : ℕ\n_hi : i ∈ filter (fun x => j < c ^ x) (range N)\n⊢ 1 * (c ^ i) ^ 2 ≤ (1 - c⁻¹)⁻¹ ^ 2 * ↑⌊c ^ i⌋₊ ^ 2\n[PROOFSTEP]\nrw [one_mul, ← mul_pow]\n[GOAL]\nN : ℕ\nj : ℝ\nhj : 0 < j\nc : ℝ\nhc : 1 < c\ncpos : 0 < c\nA : 0 < 1 - c⁻¹\ni : ℕ\n_hi : i ∈ filter (fun x => j < c ^ x) (range N)\n⊢ (c ^ i) ^ 2 ≤ ((1 - c⁻¹)⁻¹ * ↑⌊c ^ i⌋₊) ^ 2\n[PROOFSTEP]\napply pow_le_pow_of_le_left (pow_nonneg cpos.le _)\n[GOAL]\ncase hab\nN : ℕ\nj : ℝ\nhj : 0 < j\nc : ℝ\nhc : 1 < c\ncpos : 0 < c\nA : 0 < 1 - c⁻¹\ni : ℕ\n_hi : i ∈ filter (fun x => j < c ^ x) (range N)\n⊢ c ^ i ≤ (1 - c⁻¹)⁻¹ * ↑⌊c ^ i⌋₊\n[PROOFSTEP]\nrw [← div_eq_inv_mul, le_div_iff A, mul_comm]\n[GOAL]\ncase hab\nN : ℕ\nj : ℝ\nhj : 0 < j\nc : ℝ\nhc : 1 < c\ncpos : 0 < c\nA : 0 < 1 - c⁻¹\ni : ℕ\n_hi : i ∈ filter (fun x => j < c ^ x) (range N)\n⊢ (1 - c⁻¹) * c ^ i ≤ ↑⌊c ^ i⌋₊\n[PROOFSTEP]\nexact mul_pow_le_nat_floor_pow hc i\n[GOAL]\nN : ℕ\nj : ℝ\nhj : 0 < j\nc : ℝ\nhc : 1 < c\ncpos : 0 < c\nA : 0 < 1 - c⁻¹\n⊢ ∑ i in filter (fun x => j < c ^ x) (range N), (1 - c⁻¹)⁻¹ ^ 2 * (1 / (c ^ i) ^ 2) ≤\n    (1 - c⁻¹)⁻¹ ^ 2 * (c ^ 3 * (c - 1)⁻¹) / j ^ 2\n[PROOFSTEP]\nrw [← mul_sum, ← mul_div_assoc']\n[GOAL]\nN : ℕ\nj : ℝ\nhj : 0 < j\nc : ℝ\nhc : 1 < c\ncpos : 0 < c\nA : 0 < 1 - c⁻¹\n⊢ (1 - c⁻¹)⁻¹ ^ 2 * ∑ x in filter (fun x => j < c ^ x) (range N), 1 / (c ^ x) ^ 2 ≤\n    (1 - c⁻¹)⁻¹ ^ 2 * (c ^ 3 * (c - 1)⁻¹ / j ^ 2)\n[PROOFSTEP]\nrefine' mul_le_mul_of_nonneg_left _ (sq_nonneg _)\n[GOAL]\nN : ℕ\nj : ℝ\nhj : 0 < j\nc : ℝ\nhc : 1 < c\ncpos : 0 < c\nA : 0 < 1 - c⁻¹\n⊢ ∑ x in filter (fun x => j < c ^ x) (range N), 1 / (c ^ x) ^ 2 ≤ c ^ 3 * (c - 1)⁻¹ / j ^ 2\n[PROOFSTEP]\nexact sum_div_pow_sq_le_div_sq N hj hc\n[GOAL]\nN : ℕ\nj : ℝ\nhj : 0 < j\nc : ℝ\nhc : 1 < c\ncpos : 0 < c\nA : 0 < 1 - c⁻¹\n⊢ (1 - c⁻¹)⁻¹ ^ 2 * (c ^ 3 * (c - 1)⁻¹) / j ^ 2 = c ^ 5 * (c - 1)⁻¹ ^ 3 / j ^ 2\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_a\nN : ℕ\nj : ℝ\nhj : 0 < j\nc : ℝ\nhc : 1 < c\ncpos : 0 < c\nA : 0 < 1 - c⁻¹\n⊢ (1 - c⁻¹)⁻¹ ^ 2 * (c ^ 3 * (c - 1)⁻¹) = c ^ 5 * (c - 1)⁻¹ ^ 3\n[PROOFSTEP]\nfield_simp [cpos.ne', (sub_pos.2 hc).ne']\n[GOAL]\ncase e_a\nN : ℕ\nj : ℝ\nhj : 0 < j\nc : ℝ\nhc : 1 < c\ncpos : 0 < c\nA : 0 < 1 - c⁻¹\n⊢ c ^ 2 * c ^ 3 * (c - 1) ^ 3 = c ^ 5 * ((c - 1) ^ 2 * (c - 1))\n[PROOFSTEP]\nring!\n", "meta": {"mathlib_filename": "Mathlib.Analysis.SpecificLimits.FloorPow", "llama_tokens": 94642, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7905303285397349, "lm_q2_score": 0.6442251064863697, "lm_q1q2_score": 0.5092794850842155}}
{"text": "[GOAL]\nk : Type u_1\nE : Type u_2\nPE : Type u_3\ninst✝³ : Field k\ninst✝² : AddCommGroup E\ninst✝¹ : Module k E\ninst✝ : AddTorsor E PE\nf : k → PE\na : k\n⊢ slope f a a = 0\n[PROOFSTEP]\nrw [slope, sub_self, inv_zero, zero_smul]\n[GOAL]\nk : Type u_1\nE : Type u_2\nPE : Type u_3\ninst✝³ : Field k\ninst✝² : AddCommGroup E\ninst✝¹ : Module k E\ninst✝ : AddTorsor E PE\nf : k → PE\na b : k\n⊢ (b - a) • slope f a b = f b -ᵥ f a\n[PROOFSTEP]\nrcases eq_or_ne a b with (rfl | hne)\n[GOAL]\ncase inl\nk : Type u_1\nE : Type u_2\nPE : Type u_3\ninst✝³ : Field k\ninst✝² : AddCommGroup E\ninst✝¹ : Module k E\ninst✝ : AddTorsor E PE\nf : k → PE\na : k\n⊢ (a - a) • slope f a a = f a -ᵥ f a\n[PROOFSTEP]\nrw [sub_self, zero_smul, vsub_self]\n[GOAL]\ncase inr\nk : Type u_1\nE : Type u_2\nPE : Type u_3\ninst✝³ : Field k\ninst✝² : AddCommGroup E\ninst✝¹ : Module k E\ninst✝ : AddTorsor E PE\nf : k → PE\na b : k\nhne : a ≠ b\n⊢ (b - a) • slope f a b = f b -ᵥ f a\n[PROOFSTEP]\nrw [slope, smul_inv_smul₀ (sub_ne_zero.2 hne.symm)]\n[GOAL]\nk : Type u_1\nE : Type u_2\nPE : Type u_3\ninst✝³ : Field k\ninst✝² : AddCommGroup E\ninst✝¹ : Module k E\ninst✝ : AddTorsor E PE\nf : k → PE\na b : k\n⊢ (b - a) • slope f a b +ᵥ f a = f b\n[PROOFSTEP]\nrw [sub_smul_slope, vsub_vadd]\n[GOAL]\nk : Type u_1\nE : Type u_2\nPE : Type u_3\ninst✝³ : Field k\ninst✝² : AddCommGroup E\ninst✝¹ : Module k E\ninst✝ : AddTorsor E PE\nf : k → E\nc : PE\n⊢ (slope fun x => f x +ᵥ c) = slope f\n[PROOFSTEP]\next a b\n[GOAL]\ncase h.h\nk : Type u_1\nE : Type u_2\nPE : Type u_3\ninst✝³ : Field k\ninst✝² : AddCommGroup E\ninst✝¹ : Module k E\ninst✝ : AddTorsor E PE\nf : k → E\nc : PE\na b : k\n⊢ slope (fun x => f x +ᵥ c) a b = slope f a b\n[PROOFSTEP]\nsimp only [slope, vadd_vsub_vadd_cancel_right, vsub_eq_sub]\n[GOAL]\nk : Type u_1\nE : Type u_2\nPE : Type u_3\ninst✝³ : Field k\ninst✝² : AddCommGroup E\ninst✝¹ : Module k E\ninst✝ : AddTorsor E PE\nf : k → E\na b : k\nh : a ≠ b\n⊢ slope (fun x => (x - a) • f x) a b = f b\n[PROOFSTEP]\nsimp [slope, inv_smul_smul₀ (sub_ne_zero.2 h.symm)]\n[GOAL]\nk : Type u_1\nE : Type u_2\nPE : Type u_3\ninst✝³ : Field k\ninst✝² : AddCommGroup E\ninst✝¹ : Module k E\ninst✝ : AddTorsor E PE\nf : k → PE\na b : k\nh : slope f a b = 0\n⊢ f a = f b\n[PROOFSTEP]\nrw [← sub_smul_slope_vadd f a b, h, smul_zero, zero_vadd]\n[GOAL]\nk : Type u_1\nE : Type u_2\nPE : Type u_3\ninst✝⁶ : Field k\ninst✝⁵ : AddCommGroup E\ninst✝⁴ : Module k E\ninst✝³ : AddTorsor E PE\nF : Type u_4\nPF : Type u_5\ninst✝² : AddCommGroup F\ninst✝¹ : Module k F\ninst✝ : AddTorsor F PF\nf : PE →ᵃ[k] PF\ng : k → PE\na b : k\n⊢ slope (↑f ∘ g) a b = ↑f.linear (slope g a b)\n[PROOFSTEP]\nsimp only [slope, (· ∘ ·), f.linear.map_smul, f.linearMap_vsub]\n[GOAL]\nk : Type u_1\nE : Type u_2\nPE : Type u_3\ninst✝³ : Field k\ninst✝² : AddCommGroup E\ninst✝¹ : Module k E\ninst✝ : AddTorsor E PE\nf : k → PE\na b : k\n⊢ slope f a b = slope f b a\n[PROOFSTEP]\nrw [slope, slope, ← neg_vsub_eq_vsub_rev, smul_neg, ← neg_smul, neg_inv, neg_sub]\n[GOAL]\nk : Type u_1\nE : Type u_2\nPE : Type u_3\ninst✝³ : Field k\ninst✝² : AddCommGroup E\ninst✝¹ : Module k E\ninst✝ : AddTorsor E PE\nf : k → PE\na b c : k\n⊢ ((b - a) / (c - a)) • slope f a b + ((c - b) / (c - a)) • slope f b c = slope f a c\n[PROOFSTEP]\nby_cases hab : a = b\n[GOAL]\ncase pos\nk : Type u_1\nE : Type u_2\nPE : Type u_3\ninst✝³ : Field k\ninst✝² : AddCommGroup E\ninst✝¹ : Module k E\ninst✝ : AddTorsor E PE\nf : k → PE\na b c : k\nhab : a = b\n⊢ ((b - a) / (c - a)) • slope f a b + ((c - b) / (c - a)) • slope f b c = slope f a c\n[PROOFSTEP]\nsubst hab\n[GOAL]\ncase pos\nk : Type u_1\nE : Type u_2\nPE : Type u_3\ninst✝³ : Field k\ninst✝² : AddCommGroup E\ninst✝¹ : Module k E\ninst✝ : AddTorsor E PE\nf : k → PE\na c : k\n⊢ ((a - a) / (c - a)) • slope f a a + ((c - a) / (c - a)) • slope f a c = slope f a c\n[PROOFSTEP]\nrw [sub_self, zero_div, zero_smul, zero_add]\n[GOAL]\ncase pos\nk : Type u_1\nE : Type u_2\nPE : Type u_3\ninst✝³ : Field k\ninst✝² : AddCommGroup E\ninst✝¹ : Module k E\ninst✝ : AddTorsor E PE\nf : k → PE\na c : k\n⊢ ((c - a) / (c - a)) • slope f a c = slope f a c\n[PROOFSTEP]\nby_cases hac : a = c\n[GOAL]\ncase pos\nk : Type u_1\nE : Type u_2\nPE : Type u_3\ninst✝³ : Field k\ninst✝² : AddCommGroup E\ninst✝¹ : Module k E\ninst✝ : AddTorsor E PE\nf : k → PE\na c : k\nhac : a = c\n⊢ ((c - a) / (c - a)) • slope f a c = slope f a c\n[PROOFSTEP]\nsimp [hac]\n[GOAL]\ncase neg\nk : Type u_1\nE : Type u_2\nPE : Type u_3\ninst✝³ : Field k\ninst✝² : AddCommGroup E\ninst✝¹ : Module k E\ninst✝ : AddTorsor E PE\nf : k → PE\na c : k\nhac : ¬a = c\n⊢ ((c - a) / (c - a)) • slope f a c = slope f a c\n[PROOFSTEP]\nrw [div_self (sub_ne_zero.2 <| Ne.symm hac), one_smul]\n[GOAL]\ncase neg\nk : Type u_1\nE : Type u_2\nPE : Type u_3\ninst✝³ : Field k\ninst✝² : AddCommGroup E\ninst✝¹ : Module k E\ninst✝ : AddTorsor E PE\nf : k → PE\na b c : k\nhab : ¬a = b\n⊢ ((b - a) / (c - a)) • slope f a b + ((c - b) / (c - a)) • slope f b c = slope f a c\n[PROOFSTEP]\nby_cases hbc : b = c\n[GOAL]\ncase pos\nk : Type u_1\nE : Type u_2\nPE : Type u_3\ninst✝³ : Field k\ninst✝² : AddCommGroup E\ninst✝¹ : Module k E\ninst✝ : AddTorsor E PE\nf : k → PE\na b c : k\nhab : ¬a = b\nhbc : b = c\n⊢ ((b - a) / (c - a)) • slope f a b + ((c - b) / (c - a)) • slope f b c = slope f a c\n[PROOFSTEP]\nsubst hbc\n[GOAL]\ncase pos\nk : Type u_1\nE : Type u_2\nPE : Type u_3\ninst✝³ : Field k\ninst✝² : AddCommGroup E\ninst✝¹ : Module k E\ninst✝ : AddTorsor E PE\nf : k → PE\na b : k\nhab : ¬a = b\n⊢ ((b - a) / (b - a)) • slope f a b + ((b - b) / (b - a)) • slope f b b = slope f a b\n[PROOFSTEP]\nsimp [sub_ne_zero.2 (Ne.symm hab)]\n[GOAL]\ncase neg\nk : Type u_1\nE : Type u_2\nPE : Type u_3\ninst✝³ : Field k\ninst✝² : AddCommGroup E\ninst✝¹ : Module k E\ninst✝ : AddTorsor E PE\nf : k → PE\na b c : k\nhab : ¬a = b\nhbc : ¬b = c\n⊢ ((b - a) / (c - a)) • slope f a b + ((c - b) / (c - a)) • slope f b c = slope f a c\n[PROOFSTEP]\nrw [add_comm]\n[GOAL]\ncase neg\nk : Type u_1\nE : Type u_2\nPE : Type u_3\ninst✝³ : Field k\ninst✝² : AddCommGroup E\ninst✝¹ : Module k E\ninst✝ : AddTorsor E PE\nf : k → PE\na b c : k\nhab : ¬a = b\nhbc : ¬b = c\n⊢ ((c - b) / (c - a)) • slope f b c + ((b - a) / (c - a)) • slope f a b = slope f a c\n[PROOFSTEP]\nsimp_rw [slope, div_eq_inv_mul, mul_smul, ← smul_add, smul_inv_smul₀ (sub_ne_zero.2 <| Ne.symm hab),\n  smul_inv_smul₀ (sub_ne_zero.2 <| Ne.symm hbc), vsub_add_vsub_cancel]\n[GOAL]\nk : Type u_1\nE : Type u_2\nPE : Type u_3\ninst✝³ : Field k\ninst✝² : AddCommGroup E\ninst✝¹ : Module k E\ninst✝ : AddTorsor E PE\nf : k → PE\na b c : k\nh : a ≠ c\n⊢ ↑(lineMap (slope f a b) (slope f b c)) ((c - b) / (c - a)) = slope f a c\n[PROOFSTEP]\nfield_simp [sub_ne_zero.2 h.symm, ← sub_div_sub_smul_slope_add_sub_div_sub_smul_slope f a b c, lineMap_apply_module]\n[GOAL]\nk : Type u_1\nE : Type u_2\nPE : Type u_3\ninst✝³ : Field k\ninst✝² : AddCommGroup E\ninst✝¹ : Module k E\ninst✝ : AddTorsor E PE\nf : k → PE\na b r : k\n⊢ ↑(lineMap (slope f (↑(lineMap a b) r) b) (slope f a (↑(lineMap a b) r))) r = slope f a b\n[PROOFSTEP]\nobtain rfl | hab : a = b ∨ a ≠ b := Classical.em _\n[GOAL]\ncase inl\nk : Type u_1\nE : Type u_2\nPE : Type u_3\ninst✝³ : Field k\ninst✝² : AddCommGroup E\ninst✝¹ : Module k E\ninst✝ : AddTorsor E PE\nf : k → PE\na r : k\n⊢ ↑(lineMap (slope f (↑(lineMap a a) r) a) (slope f a (↑(lineMap a a) r))) r = slope f a a\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\nk : Type u_1\nE : Type u_2\nPE : Type u_3\ninst✝³ : Field k\ninst✝² : AddCommGroup E\ninst✝¹ : Module k E\ninst✝ : AddTorsor E PE\nf : k → PE\na b r : k\nhab : a ≠ b\n⊢ ↑(lineMap (slope f (↑(lineMap a b) r) b) (slope f a (↑(lineMap a b) r))) r = slope f a b\n[PROOFSTEP]\nrw [slope_comm _ a, slope_comm _ a, slope_comm _ _ b]\n[GOAL]\ncase inr\nk : Type u_1\nE : Type u_2\nPE : Type u_3\ninst✝³ : Field k\ninst✝² : AddCommGroup E\ninst✝¹ : Module k E\ninst✝ : AddTorsor E PE\nf : k → PE\na b r : k\nhab : a ≠ b\n⊢ ↑(lineMap (slope f b (↑(lineMap a b) r)) (slope f (↑(lineMap a b) r) a)) r = slope f b a\n[PROOFSTEP]\nconvert lineMap_slope_slope_sub_div_sub f b (lineMap a b r) a hab.symm using 2\n[GOAL]\ncase h.e'_2.h.e'_6\nk : Type u_1\nE : Type u_2\nPE : Type u_3\ninst✝³ : Field k\ninst✝² : AddCommGroup E\ninst✝¹ : Module k E\ninst✝ : AddTorsor E PE\nf : k → PE\na b r : k\nhab : a ≠ b\n⊢ r = (a - ↑(lineMap a b) r) / (a - b)\n[PROOFSTEP]\nrw [lineMap_apply_ring, eq_div_iff (sub_ne_zero.2 hab), sub_mul, one_mul, mul_sub, ← sub_sub, sub_sub_cancel]\n", "meta": {"mathlib_filename": "Mathlib.LinearAlgebra.AffineSpace.Slope", "llama_tokens": 4243, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7905303285397348, "lm_q2_score": 0.6442251064863697, "lm_q1q2_score": 0.5092794850842155}}
{"text": "[GOAL]\nX : Type u_1\nY : Type u_2\nZ : Type u_3\nα : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : (i : ι) → TopologicalSpace (π i)\nx✝ y✝ z : X\ns : Set X\nf : X → Y\nx y : X\n⊢ TFAE\n    [x ⤳ y, pure x ≤ 𝓝 y, ∀ (s : Set X), IsOpen s → y ∈ s → x ∈ s, ∀ (s : Set X), IsClosed s → x ∈ s → y ∈ s,\n      y ∈ closure {x}, closure {y} ⊆ closure {x}, ClusterPt y (pure x)]\n[PROOFSTEP]\ntfae_have 1 → 2\n[GOAL]\ncase tfae_1_to_2\nX : Type u_1\nY : Type u_2\nZ : Type u_3\nα : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : (i : ι) → TopologicalSpace (π i)\nx✝ y✝ z : X\ns : Set X\nf : X → Y\nx y : X\n⊢ x ⤳ y → pure x ≤ 𝓝 y\n[PROOFSTEP]\nexact (pure_le_nhds _).trans\n[GOAL]\nX : Type u_1\nY : Type u_2\nZ : Type u_3\nα : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : (i : ι) → TopologicalSpace (π i)\nx✝ y✝ z : X\ns : Set X\nf : X → Y\nx y : X\ntfae_1_to_2 : x ⤳ y → pure x ≤ 𝓝 y\n⊢ TFAE\n    [x ⤳ y, pure x ≤ 𝓝 y, ∀ (s : Set X), IsOpen s → y ∈ s → x ∈ s, ∀ (s : Set X), IsClosed s → x ∈ s → y ∈ s,\n      y ∈ closure {x}, closure {y} ⊆ closure {x}, ClusterPt y (pure x)]\n[PROOFSTEP]\ntfae_have 2 → 3\n[GOAL]\ncase tfae_2_to_3\nX : Type u_1\nY : Type u_2\nZ : Type u_3\nα : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : (i : ι) → TopologicalSpace (π i)\nx✝ y✝ z : X\ns : Set X\nf : X → Y\nx y : X\ntfae_1_to_2 : x ⤳ y → pure x ≤ 𝓝 y\n⊢ pure x ≤ 𝓝 y → ∀ (s : Set X), IsOpen s → y ∈ s → x ∈ s\n[PROOFSTEP]\nexact fun h s hso hy => h (hso.mem_nhds hy)\n[GOAL]\nX : Type u_1\nY : Type u_2\nZ : Type u_3\nα : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : (i : ι) → TopologicalSpace (π i)\nx✝ y✝ z : X\ns : Set X\nf : X → Y\nx y : X\ntfae_1_to_2 : x ⤳ y → pure x ≤ 𝓝 y\ntfae_2_to_3 : pure x ≤ 𝓝 y → ∀ (s : Set X), IsOpen s → y ∈ s → x ∈ s\n⊢ TFAE\n    [x ⤳ y, pure x ≤ 𝓝 y, ∀ (s : Set X), IsOpen s → y ∈ s → x ∈ s, ∀ (s : Set X), IsClosed s → x ∈ s → y ∈ s,\n      y ∈ closure {x}, closure {y} ⊆ closure {x}, ClusterPt y (pure x)]\n[PROOFSTEP]\ntfae_have 3 → 4\n[GOAL]\ncase tfae_3_to_4\nX : Type u_1\nY : Type u_2\nZ : Type u_3\nα : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : (i : ι) → TopologicalSpace (π i)\nx✝ y✝ z : X\ns : Set X\nf : X → Y\nx y : X\ntfae_1_to_2 : x ⤳ y → pure x ≤ 𝓝 y\ntfae_2_to_3 : pure x ≤ 𝓝 y → ∀ (s : Set X), IsOpen s → y ∈ s → x ∈ s\n⊢ (∀ (s : Set X), IsOpen s → y ∈ s → x ∈ s) → ∀ (s : Set X), IsClosed s → x ∈ s → y ∈ s\n[PROOFSTEP]\nexact fun h s hsc hx => of_not_not fun hy => h sᶜ hsc.isOpen_compl hy hx\n[GOAL]\nX : Type u_1\nY : Type u_2\nZ : Type u_3\nα : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : (i : ι) → TopologicalSpace (π i)\nx✝ y✝ z : X\ns : Set X\nf : X → Y\nx y : X\ntfae_1_to_2 : x ⤳ y → pure x ≤ 𝓝 y\ntfae_2_to_3 : pure x ≤ 𝓝 y → ∀ (s : Set X), IsOpen s → y ∈ s → x ∈ s\ntfae_3_to_4 : (∀ (s : Set X), IsOpen s → y ∈ s → x ∈ s) → ∀ (s : Set X), IsClosed s → x ∈ s → y ∈ s\n⊢ TFAE\n    [x ⤳ y, pure x ≤ 𝓝 y, ∀ (s : Set X), IsOpen s → y ∈ s → x ∈ s, ∀ (s : Set X), IsClosed s → x ∈ s → y ∈ s,\n      y ∈ closure {x}, closure {y} ⊆ closure {x}, ClusterPt y (pure x)]\n[PROOFSTEP]\ntfae_have 4 → 5\n[GOAL]\ncase tfae_4_to_5\nX : Type u_1\nY : Type u_2\nZ : Type u_3\nα : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : (i : ι) → TopologicalSpace (π i)\nx✝ y✝ z : X\ns : Set X\nf : X → Y\nx y : X\ntfae_1_to_2 : x ⤳ y → pure x ≤ 𝓝 y\ntfae_2_to_3 : pure x ≤ 𝓝 y → ∀ (s : Set X), IsOpen s → y ∈ s → x ∈ s\ntfae_3_to_4 : (∀ (s : Set X), IsOpen s → y ∈ s → x ∈ s) → ∀ (s : Set X), IsClosed s → x ∈ s → y ∈ s\n⊢ (∀ (s : Set X), IsClosed s → x ∈ s → y ∈ s) → y ∈ closure {x}\n[PROOFSTEP]\nexact fun h => h _ isClosed_closure (subset_closure <| mem_singleton _)\n[GOAL]\nX : Type u_1\nY : Type u_2\nZ : Type u_3\nα : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : (i : ι) → TopologicalSpace (π i)\nx✝ y✝ z : X\ns : Set X\nf : X → Y\nx y : X\ntfae_1_to_2 : x ⤳ y → pure x ≤ 𝓝 y\ntfae_2_to_3 : pure x ≤ 𝓝 y → ∀ (s : Set X), IsOpen s → y ∈ s → x ∈ s\ntfae_3_to_4 : (∀ (s : Set X), IsOpen s → y ∈ s → x ∈ s) → ∀ (s : Set X), IsClosed s → x ∈ s → y ∈ s\ntfae_4_to_5 : (∀ (s : Set X), IsClosed s → x ∈ s → y ∈ s) → y ∈ closure {x}\n⊢ TFAE\n    [x ⤳ y, pure x ≤ 𝓝 y, ∀ (s : Set X), IsOpen s → y ∈ s → x ∈ s, ∀ (s : Set X), IsClosed s → x ∈ s → y ∈ s,\n      y ∈ closure {x}, closure {y} ⊆ closure {x}, ClusterPt y (pure x)]\n[PROOFSTEP]\ntfae_have 6 ↔ 5\n[GOAL]\ncase tfae_6_iff_5\nX : Type u_1\nY : Type u_2\nZ : Type u_3\nα : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : (i : ι) → TopologicalSpace (π i)\nx✝ y✝ z : X\ns : Set X\nf : X → Y\nx y : X\ntfae_1_to_2 : x ⤳ y → pure x ≤ 𝓝 y\ntfae_2_to_3 : pure x ≤ 𝓝 y → ∀ (s : Set X), IsOpen s → y ∈ s → x ∈ s\ntfae_3_to_4 : (∀ (s : Set X), IsOpen s → y ∈ s → x ∈ s) → ∀ (s : Set X), IsClosed s → x ∈ s → y ∈ s\ntfae_4_to_5 : (∀ (s : Set X), IsClosed s → x ∈ s → y ∈ s) → y ∈ closure {x}\n⊢ closure {y} ⊆ closure {x} ↔ y ∈ closure {x}\n[PROOFSTEP]\nexact isClosed_closure.closure_subset_iff.trans singleton_subset_iff\n[GOAL]\nX : Type u_1\nY : Type u_2\nZ : Type u_3\nα : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : (i : ι) → TopologicalSpace (π i)\nx✝ y✝ z : X\ns : Set X\nf : X → Y\nx y : X\ntfae_1_to_2 : x ⤳ y → pure x ≤ 𝓝 y\ntfae_2_to_3 : pure x ≤ 𝓝 y → ∀ (s : Set X), IsOpen s → y ∈ s → x ∈ s\ntfae_3_to_4 : (∀ (s : Set X), IsOpen s → y ∈ s → x ∈ s) → ∀ (s : Set X), IsClosed s → x ∈ s → y ∈ s\ntfae_4_to_5 : (∀ (s : Set X), IsClosed s → x ∈ s → y ∈ s) → y ∈ closure {x}\ntfae_6_iff_5 : closure {y} ⊆ closure {x} ↔ y ∈ closure {x}\n⊢ TFAE\n    [x ⤳ y, pure x ≤ 𝓝 y, ∀ (s : Set X), IsOpen s → y ∈ s → x ∈ s, ∀ (s : Set X), IsClosed s → x ∈ s → y ∈ s,\n      y ∈ closure {x}, closure {y} ⊆ closure {x}, ClusterPt y (pure x)]\n[PROOFSTEP]\ntfae_have 5 ↔ 7\n[GOAL]\ncase tfae_5_iff_7\nX : Type u_1\nY : Type u_2\nZ : Type u_3\nα : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : (i : ι) → TopologicalSpace (π i)\nx✝ y✝ z : X\ns : Set X\nf : X → Y\nx y : X\ntfae_1_to_2 : x ⤳ y → pure x ≤ 𝓝 y\ntfae_2_to_3 : pure x ≤ 𝓝 y → ∀ (s : Set X), IsOpen s → y ∈ s → x ∈ s\ntfae_3_to_4 : (∀ (s : Set X), IsOpen s → y ∈ s → x ∈ s) → ∀ (s : Set X), IsClosed s → x ∈ s → y ∈ s\ntfae_4_to_5 : (∀ (s : Set X), IsClosed s → x ∈ s → y ∈ s) → y ∈ closure {x}\ntfae_6_iff_5 : closure {y} ⊆ closure {x} ↔ y ∈ closure {x}\n⊢ y ∈ closure {x} ↔ ClusterPt y (pure x)\n[PROOFSTEP]\nrw [mem_closure_iff_clusterPt, principal_singleton]\n[GOAL]\nX : Type u_1\nY : Type u_2\nZ : Type u_3\nα : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : (i : ι) → TopologicalSpace (π i)\nx✝ y✝ z : X\ns : Set X\nf : X → Y\nx y : X\ntfae_1_to_2 : x ⤳ y → pure x ≤ 𝓝 y\ntfae_2_to_3 : pure x ≤ 𝓝 y → ∀ (s : Set X), IsOpen s → y ∈ s → x ∈ s\ntfae_3_to_4 : (∀ (s : Set X), IsOpen s → y ∈ s → x ∈ s) → ∀ (s : Set X), IsClosed s → x ∈ s → y ∈ s\ntfae_4_to_5 : (∀ (s : Set X), IsClosed s → x ∈ s → y ∈ s) → y ∈ closure {x}\ntfae_6_iff_5 : closure {y} ⊆ closure {x} ↔ y ∈ closure {x}\ntfae_5_iff_7 : y ∈ closure {x} ↔ ClusterPt y (pure x)\n⊢ TFAE\n    [x ⤳ y, pure x ≤ 𝓝 y, ∀ (s : Set X), IsOpen s → y ∈ s → x ∈ s, ∀ (s : Set X), IsClosed s → x ∈ s → y ∈ s,\n      y ∈ closure {x}, closure {y} ⊆ closure {x}, ClusterPt y (pure x)]\n[PROOFSTEP]\ntfae_have 5 → 1\n[GOAL]\ncase tfae_5_to_1\nX : Type u_1\nY : Type u_2\nZ : Type u_3\nα : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : (i : ι) → TopologicalSpace (π i)\nx✝ y✝ z : X\ns : Set X\nf : X → Y\nx y : X\ntfae_1_to_2 : x ⤳ y → pure x ≤ 𝓝 y\ntfae_2_to_3 : pure x ≤ 𝓝 y → ∀ (s : Set X), IsOpen s → y ∈ s → x ∈ s\ntfae_3_to_4 : (∀ (s : Set X), IsOpen s → y ∈ s → x ∈ s) → ∀ (s : Set X), IsClosed s → x ∈ s → y ∈ s\ntfae_4_to_5 : (∀ (s : Set X), IsClosed s → x ∈ s → y ∈ s) → y ∈ closure {x}\ntfae_6_iff_5 : closure {y} ⊆ closure {x} ↔ y ∈ closure {x}\ntfae_5_iff_7 : y ∈ closure {x} ↔ ClusterPt y (pure x)\n⊢ y ∈ closure {x} → x ⤳ y\n[PROOFSTEP]\nrefine' fun h => (nhds_basis_opens _).ge_iff.2 _\n[GOAL]\ncase tfae_5_to_1\nX : Type u_1\nY : Type u_2\nZ : Type u_3\nα : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : (i : ι) → TopologicalSpace (π i)\nx✝ y✝ z : X\ns : Set X\nf : X → Y\nx y : X\ntfae_1_to_2 : x ⤳ y → pure x ≤ 𝓝 y\ntfae_2_to_3 : pure x ≤ 𝓝 y → ∀ (s : Set X), IsOpen s → y ∈ s → x ∈ s\ntfae_3_to_4 : (∀ (s : Set X), IsOpen s → y ∈ s → x ∈ s) → ∀ (s : Set X), IsClosed s → x ∈ s → y ∈ s\ntfae_4_to_5 : (∀ (s : Set X), IsClosed s → x ∈ s → y ∈ s) → y ∈ closure {x}\ntfae_6_iff_5 : closure {y} ⊆ closure {x} ↔ y ∈ closure {x}\ntfae_5_iff_7 : y ∈ closure {x} ↔ ClusterPt y (pure x)\nh : y ∈ closure {x}\n⊢ ∀ (i' : Set X), y ∈ i' ∧ IsOpen i' → i' ∈ 𝓝 x\n[PROOFSTEP]\nrintro s ⟨hy, ho⟩\n[GOAL]\ncase tfae_5_to_1.intro\nX : Type u_1\nY : Type u_2\nZ : Type u_3\nα : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : (i : ι) → TopologicalSpace (π i)\nx✝ y✝ z : X\ns✝ : Set X\nf : X → Y\nx y : X\ntfae_1_to_2 : x ⤳ y → pure x ≤ 𝓝 y\ntfae_2_to_3 : pure x ≤ 𝓝 y → ∀ (s : Set X), IsOpen s → y ∈ s → x ∈ s\ntfae_3_to_4 : (∀ (s : Set X), IsOpen s → y ∈ s → x ∈ s) → ∀ (s : Set X), IsClosed s → x ∈ s → y ∈ s\ntfae_4_to_5 : (∀ (s : Set X), IsClosed s → x ∈ s → y ∈ s) → y ∈ closure {x}\ntfae_6_iff_5 : closure {y} ⊆ closure {x} ↔ y ∈ closure {x}\ntfae_5_iff_7 : y ∈ closure {x} ↔ ClusterPt y (pure x)\nh : y ∈ closure {x}\ns : Set X\nhy : y ∈ s\nho : IsOpen s\n⊢ s ∈ 𝓝 x\n[PROOFSTEP]\nrcases mem_closure_iff.1 h s ho hy with ⟨z, hxs, rfl : z = x⟩\n[GOAL]\ncase tfae_5_to_1.intro.intro.intro\nX : Type u_1\nY : Type u_2\nZ : Type u_3\nα : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : (i : ι) → TopologicalSpace (π i)\nx y✝ z✝ : X\ns✝ : Set X\nf : X → Y\ny : X\ns : Set X\nhy : y ∈ s\nho : IsOpen s\nz : X\nhxs : z ∈ s\ntfae_1_to_2 : z ⤳ y → pure z ≤ 𝓝 y\ntfae_2_to_3 : pure z ≤ 𝓝 y → ∀ (s : Set X), IsOpen s → y ∈ s → z ∈ s\ntfae_3_to_4 : (∀ (s : Set X), IsOpen s → y ∈ s → z ∈ s) → ∀ (s : Set X), IsClosed s → z ∈ s → y ∈ s\ntfae_4_to_5 : (∀ (s : Set X), IsClosed s → z ∈ s → y ∈ s) → y ∈ closure {z}\ntfae_6_iff_5 : closure {y} ⊆ closure {z} ↔ y ∈ closure {z}\ntfae_5_iff_7 : y ∈ closure {z} ↔ ClusterPt y (pure z)\nh : y ∈ closure {z}\n⊢ s ∈ 𝓝 z\n[PROOFSTEP]\nexact ho.mem_nhds hxs\n[GOAL]\nX : Type u_1\nY : Type u_2\nZ : Type u_3\nα : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : (i : ι) → TopologicalSpace (π i)\nx✝ y✝ z : X\ns : Set X\nf : X → Y\nx y : X\ntfae_1_to_2 : x ⤳ y → pure x ≤ 𝓝 y\ntfae_2_to_3 : pure x ≤ 𝓝 y → ∀ (s : Set X), IsOpen s → y ∈ s → x ∈ s\ntfae_3_to_4 : (∀ (s : Set X), IsOpen s → y ∈ s → x ∈ s) → ∀ (s : Set X), IsClosed s → x ∈ s → y ∈ s\ntfae_4_to_5 : (∀ (s : Set X), IsClosed s → x ∈ s → y ∈ s) → y ∈ closure {x}\ntfae_6_iff_5 : closure {y} ⊆ closure {x} ↔ y ∈ closure {x}\ntfae_5_iff_7 : y ∈ closure {x} ↔ ClusterPt y (pure x)\ntfae_5_to_1 : y ∈ closure {x} → x ⤳ y\n⊢ TFAE\n    [x ⤳ y, pure x ≤ 𝓝 y, ∀ (s : Set X), IsOpen s → y ∈ s → x ∈ s, ∀ (s : Set X), IsClosed s → x ∈ s → y ∈ s,\n      y ∈ closure {x}, closure {y} ⊆ closure {x}, ClusterPt y (pure x)]\n[PROOFSTEP]\ntfae_finish\n[GOAL]\nX : Type u_1\nY : Type u_2\nZ : Type u_3\nα : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : (i : ι) → TopologicalSpace (π i)\nx y z : X\ns : Set X\nf : X → Y\nhf : Inducing f\n⊢ f x ⤳ f y ↔ x ⤳ y\n[PROOFSTEP]\nsimp only [specializes_iff_mem_closure, hf.closure_eq_preimage_closure_image, image_singleton, mem_preimage]\n[GOAL]\nX : Type u_1\nY : Type u_2\nZ : Type u_3\nα : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : (i : ι) → TopologicalSpace (π i)\nx y z : X\ns : Set X\nf : X → Y\nx₁ x₂ : X\ny₁ y₂ : Y\n⊢ (x₁, y₁) ⤳ (x₂, y₂) ↔ x₁ ⤳ x₂ ∧ y₁ ⤳ y₂\n[PROOFSTEP]\nsimp only [Specializes, nhds_prod_eq, prod_le_prod]\n[GOAL]\nX : Type u_1\nY : Type u_2\nZ : Type u_3\nα : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : (i : ι) → TopologicalSpace (π i)\nx y z : X\ns : Set X\nf✝ : X → Y\nf g : (i : ι) → π i\n⊢ f ⤳ g ↔ ∀ (i : ι), f i ⤳ g i\n[PROOFSTEP]\nsimp only [Specializes, nhds_pi, pi_le_pi]\n[GOAL]\nX : Type u_1\nY : Type u_2\nZ : Type u_3\nα : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : (i : ι) → TopologicalSpace (π i)\nx y z : X\ns : Set X\nf : X → Y\n⊢ ¬x ⤳ y ↔ ∃ S, IsOpen S ∧ y ∈ S ∧ ¬x ∈ S\n[PROOFSTEP]\nrw [specializes_iff_forall_open]\n[GOAL]\nX : Type u_1\nY : Type u_2\nZ : Type u_3\nα : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : (i : ι) → TopologicalSpace (π i)\nx y z : X\ns : Set X\nf : X → Y\n⊢ (¬∀ (s : Set X), IsOpen s → y ∈ s → x ∈ s) ↔ ∃ S, IsOpen S ∧ y ∈ S ∧ ¬x ∈ S\n[PROOFSTEP]\npush_neg\n[GOAL]\nX : Type u_1\nY : Type u_2\nZ : Type u_3\nα : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : (i : ι) → TopologicalSpace (π i)\nx y z : X\ns : Set X\nf : X → Y\n⊢ (∃ s, IsOpen s ∧ y ∈ s ∧ ¬x ∈ s) ↔ ∃ S, IsOpen S ∧ y ∈ S ∧ ¬x ∈ S\n[PROOFSTEP]\nrfl\n[GOAL]\nX : Type u_1\nY : Type u_2\nZ : Type u_3\nα : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : (i : ι) → TopologicalSpace (π i)\nx y z : X\ns : Set X\nf : X → Y\n⊢ ¬x ⤳ y ↔ ∃ S, IsClosed S ∧ x ∈ S ∧ ¬y ∈ S\n[PROOFSTEP]\nrw [specializes_iff_forall_closed]\n[GOAL]\nX : Type u_1\nY : Type u_2\nZ : Type u_3\nα : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : (i : ι) → TopologicalSpace (π i)\nx y z : X\ns : Set X\nf : X → Y\n⊢ (¬∀ (s : Set X), IsClosed s → x ∈ s → y ∈ s) ↔ ∃ S, IsClosed S ∧ x ∈ S ∧ ¬y ∈ S\n[PROOFSTEP]\npush_neg\n[GOAL]\nX : Type u_1\nY : Type u_2\nZ : Type u_3\nα : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : (i : ι) → TopologicalSpace (π i)\nx y z : X\ns : Set X\nf : X → Y\n⊢ (∃ s, IsClosed s ∧ x ∈ s ∧ ¬y ∈ s) ↔ ∃ S, IsClosed S ∧ x ∈ S ∧ ¬y ∈ S\n[PROOFSTEP]\nrfl\n[GOAL]\nX : Type u_1\nY : Type u_2\nZ : Type u_3\nα : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : (i : ι) → TopologicalSpace (π i)\nx y z : X\ns : Set X\nf : X → Y\n⊢ (x ~ᵢ y) ↔ ∀ (s : Set X), IsOpen s → (x ∈ s ↔ y ∈ s)\n[PROOFSTEP]\nsimp only [inseparable_iff_specializes_and, specializes_iff_forall_open, ← forall_and, ← iff_def, Iff.comm]\n[GOAL]\nX : Type u_1\nY : Type u_2\nZ : Type u_3\nα : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : (i : ι) → TopologicalSpace (π i)\nx y z : X\ns : Set X\nf : X → Y\n⊢ ¬(x ~ᵢ y) ↔ ∃ s, IsOpen s ∧ Xor' (x ∈ s) (y ∈ s)\n[PROOFSTEP]\nsimp [inseparable_iff_forall_open, ← xor_iff_not_iff]\n[GOAL]\nX : Type u_1\nY : Type u_2\nZ : Type u_3\nα : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : (i : ι) → TopologicalSpace (π i)\nx y z : X\ns : Set X\nf : X → Y\n⊢ (x ~ᵢ y) ↔ ∀ (s : Set X), IsClosed s → (x ∈ s ↔ y ∈ s)\n[PROOFSTEP]\nsimp only [inseparable_iff_specializes_and, specializes_iff_forall_closed, ← forall_and, ← iff_def]\n[GOAL]\nX : Type u_1\nY : Type u_2\nZ : Type u_3\nα : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : (i : ι) → TopologicalSpace (π i)\nx y z : X\ns : Set X\nf : X → Y\n⊢ x ⤳ y ∧ y ⤳ x ↔ x ∈ closure {y} ∧ y ∈ closure {x}\n[PROOFSTEP]\nsimp only [specializes_iff_mem_closure, and_comm]\n[GOAL]\nX : Type u_1\nY : Type u_2\nZ : Type u_3\nα : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : (i : ι) → TopologicalSpace (π i)\nx y z : X\ns : Set X\nf : X → Y\n⊢ (x ~ᵢ y) ↔ closure {x} = closure {y}\n[PROOFSTEP]\nsimp only [inseparable_iff_specializes_and, specializes_iff_closure_subset, ← subset_antisymm_iff, eq_comm]\n[GOAL]\nX : Type u_1\nY : Type u_2\nZ : Type u_3\nα : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : (i : ι) → TopologicalSpace (π i)\nx y z : X\ns : Set X\nf : X → Y\nhf : Inducing f\n⊢ (f x ~ᵢ f y) ↔ (x ~ᵢ y)\n[PROOFSTEP]\nsimp only [inseparable_iff_specializes_and, hf.specializes_iff]\n[GOAL]\nX : Type u_1\nY : Type u_2\nZ : Type u_3\nα : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : (i : ι) → TopologicalSpace (π i)\nx y z : X\ns : Set X\nf : X → Y\nx₁ x₂ : X\ny₁ y₂ : Y\n⊢ ((x₁, y₁) ~ᵢ (x₂, y₂)) ↔ (x₁ ~ᵢ x₂) ∧ (y₁ ~ᵢ y₂)\n[PROOFSTEP]\nsimp only [Inseparable, nhds_prod_eq, prod_inj]\n[GOAL]\nX : Type u_1\nY : Type u_2\nZ : Type u_3\nα : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : (i : ι) → TopologicalSpace (π i)\nx y z : X\ns : Set X\nf✝ : X → Y\nf g : (i : ι) → π i\n⊢ (f ~ᵢ g) ↔ ∀ (i : ι), f i ~ᵢ g i\n[PROOFSTEP]\nsimp only [Inseparable, nhds_pi, funext_iff, pi_inj]\n[GOAL]\nX : Type u_1\nY : Type u_2\nZ : Type u_3\nα : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : (i : ι) → TopologicalSpace (π i)\nx y z : X\ns : Set X\nf : X → Y\nt : Set (SeparationQuotient X)\nhs : IsOpen s\n⊢ mk ⁻¹' (mk '' s) = s\n[PROOFSTEP]\nrefine' Subset.antisymm _ (subset_preimage_image _ _)\n[GOAL]\nX : Type u_1\nY : Type u_2\nZ : Type u_3\nα : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : (i : ι) → TopologicalSpace (π i)\nx y z : X\ns : Set X\nf : X → Y\nt : Set (SeparationQuotient X)\nhs : IsOpen s\n⊢ mk ⁻¹' (mk '' s) ⊆ s\n[PROOFSTEP]\nrintro x ⟨y, hys, hxy⟩\n[GOAL]\ncase intro.intro\nX : Type u_1\nY : Type u_2\nZ : Type u_3\nα : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : (i : ι) → TopologicalSpace (π i)\nx✝ y✝ z : X\ns : Set X\nf : X → Y\nt : Set (SeparationQuotient X)\nhs : IsOpen s\nx y : X\nhys : y ∈ s\nhxy : mk y = mk x\n⊢ x ∈ s\n[PROOFSTEP]\nexact ((mk_eq_mk.1 hxy).mem_open_iff hs).1 hys\n[GOAL]\nX : Type u_1\nY : Type u_2\nZ : Type u_3\nα : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : (i : ι) → TopologicalSpace (π i)\nx y z : X\ns✝ : Set X\nf : X → Y\nt : Set (SeparationQuotient X)\ns : Set X\nhs : IsOpen s\n⊢ IsOpen (mk ⁻¹' (mk '' s))\n[PROOFSTEP]\nrwa [preimage_image_mk_open hs]\n[GOAL]\nX : Type u_1\nY : Type u_2\nZ : Type u_3\nα : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : (i : ι) → TopologicalSpace (π i)\nx y z : X\ns : Set X\nf : X → Y\nt : Set (SeparationQuotient X)\nhs : IsClosed s\n⊢ mk ⁻¹' (mk '' s) = s\n[PROOFSTEP]\nrefine' Subset.antisymm _ (subset_preimage_image _ _)\n[GOAL]\nX : Type u_1\nY : Type u_2\nZ : Type u_3\nα : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : (i : ι) → TopologicalSpace (π i)\nx y z : X\ns : Set X\nf : X → Y\nt : Set (SeparationQuotient X)\nhs : IsClosed s\n⊢ mk ⁻¹' (mk '' s) ⊆ s\n[PROOFSTEP]\nrintro x ⟨y, hys, hxy⟩\n[GOAL]\ncase intro.intro\nX : Type u_1\nY : Type u_2\nZ : Type u_3\nα : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : (i : ι) → TopologicalSpace (π i)\nx✝ y✝ z : X\ns : Set X\nf : X → Y\nt : Set (SeparationQuotient X)\nhs : IsClosed s\nx y : X\nhys : y ∈ s\nhxy : mk y = mk x\n⊢ x ∈ s\n[PROOFSTEP]\nexact ((mk_eq_mk.1 hxy).mem_closed_iff hs).1 hys\n[GOAL]\nX : Type u_1\nY : Type u_2\nZ : Type u_3\nα : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : (i : ι) → TopologicalSpace (π i)\nx y z : X\ns : Set X\nf : X → Y\nt : Set (SeparationQuotient X)\n⊢ IsClosed (Set.range mk)\n[PROOFSTEP]\nrw [range_mk]\n[GOAL]\nX : Type u_1\nY : Type u_2\nZ : Type u_3\nα : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : (i : ι) → TopologicalSpace (π i)\nx y z : X\ns : Set X\nf : X → Y\nt : Set (SeparationQuotient X)\n⊢ IsClosed univ\n[PROOFSTEP]\nexact isClosed_univ\n[GOAL]\nX : Type u_1\nY : Type u_2\nZ : Type u_3\nα : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : (i : ι) → TopologicalSpace (π i)\nx y z : X\ns : Set X\nf : X → Y\nt : Set (SeparationQuotient X)\n⊢ Filter.map mk (𝓝 x) = 𝓝 (mk x)\n[PROOFSTEP]\nrw [← comap_mk_nhds_mk, map_comap_of_surjective surjective_mk]\n[GOAL]\nX : Type u_1\nY : Type u_2\nZ : Type u_3\nα : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : (i : ι) → TopologicalSpace (π i)\nx y z : X\ns : Set X\nf : X → Y\nt : Set (SeparationQuotient X)\n⊢ Filter.map mk (𝓝ˢ s) = 𝓝ˢ (mk '' s)\n[PROOFSTEP]\nrw [← comap_mk_nhdsSet_image, map_comap_of_surjective surjective_mk]\n[GOAL]\nX : Type u_1\nY : Type u_2\nZ : Type u_3\nα : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : (i : ι) → TopologicalSpace (π i)\nx y z : X\ns : Set X\nf : X → Y\nt : Set (SeparationQuotient X)\n⊢ comap mk (𝓝ˢ t) = 𝓝ˢ (mk ⁻¹' t)\n[PROOFSTEP]\nconv_lhs => rw [← image_preimage_eq t surjective_mk, comap_mk_nhdsSet_image]\n[GOAL]\nX : Type u_1\nY : Type u_2\nZ : Type u_3\nα : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : (i : ι) → TopologicalSpace (π i)\nx y z : X\ns : Set X\nf : X → Y\nt : Set (SeparationQuotient X)\n| comap mk (𝓝ˢ t)\n[PROOFSTEP]\nrw [← image_preimage_eq t surjective_mk, comap_mk_nhdsSet_image]\n[GOAL]\nX : Type u_1\nY : Type u_2\nZ : Type u_3\nα : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : (i : ι) → TopologicalSpace (π i)\nx y z : X\ns : Set X\nf : X → Y\nt : Set (SeparationQuotient X)\n| comap mk (𝓝ˢ t)\n[PROOFSTEP]\nrw [← image_preimage_eq t surjective_mk, comap_mk_nhdsSet_image]\n[GOAL]\nX : Type u_1\nY : Type u_2\nZ : Type u_3\nα : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : (i : ι) → TopologicalSpace (π i)\nx y z : X\ns : Set X\nf : X → Y\nt : Set (SeparationQuotient X)\n| comap mk (𝓝ˢ t)\n[PROOFSTEP]\nrw [← image_preimage_eq t surjective_mk, comap_mk_nhdsSet_image]\n[GOAL]\nX : Type u_1\nY : Type u_2\nZ : Type u_3\nα : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : (i : ι) → TopologicalSpace (π i)\nx✝ y✝ z : X\ns : Set X\nf : X → Y\nt : Set (SeparationQuotient X)\nx : X\ny : Y\n⊢ Filter.map (Prod.map mk mk) (𝓝 (x, y)) = 𝓝 (mk x, mk y)\n[PROOFSTEP]\nrw [nhds_prod_eq, ← prod_map_map_eq', map_mk_nhds, map_mk_nhds, nhds_prod_eq]\n[GOAL]\nX : Type u_1\nY : Type u_2\nZ : Type u_3\nα : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : (i : ι) → TopologicalSpace (π i)\nx✝ y z : X\ns✝ : Set X\nf : X → Y\nt s : Set (SeparationQuotient X)\nx : X\n⊢ Filter.map mk (𝓝[mk ⁻¹' s] x) = 𝓝[s] mk x\n[PROOFSTEP]\nrw [nhdsWithin, ← comap_principal, Filter.push_pull, nhdsWithin, map_mk_nhds]\n[GOAL]\nX : Type u_1\nY : Type u_2\nZ : Type u_3\nα : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : (i : ι) → TopologicalSpace (π i)\nx✝ y z : X\ns : Set X\nf✝ : X → Y\nt : Set (SeparationQuotient X)\nf : X → α\nhf : ∀ (x y : X), (x ~ᵢ y) → f x = f y\nx : X\nl : Filter α\n⊢ Tendsto (lift f hf) (𝓝 (mk x)) l ↔ Tendsto f (𝓝 x) l\n[PROOFSTEP]\nsimp only [← map_mk_nhds, tendsto_map'_iff, lift_comp_mk]\n[GOAL]\nX : Type u_1\nY : Type u_2\nZ : Type u_3\nα : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : (i : ι) → TopologicalSpace (π i)\nx✝ y z : X\ns✝ : Set X\nf✝ : X → Y\nt : Set (SeparationQuotient X)\nf : X → α\nhf : ∀ (x y : X), (x ~ᵢ y) → f x = f y\nx : X\ns : Set (SeparationQuotient X)\nl : Filter α\n⊢ Tendsto (lift f hf) (𝓝[s] mk x) l ↔ Tendsto f (𝓝[mk ⁻¹' s] x) l\n[PROOFSTEP]\nsimp only [← map_mk_nhdsWithin_preimage, tendsto_map'_iff, lift_comp_mk]\n[GOAL]\nX : Type u_1\nY : Type u_2\nZ : Type u_3\nα : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : (i : ι) → TopologicalSpace (π i)\nx y z : X\ns✝ : Set X\nf✝ : X → Y\nt : Set (SeparationQuotient X)\nf : X → Y\nhf : ∀ (x y : X), (x ~ᵢ y) → f x = f y\ns : Set (SeparationQuotient X)\n⊢ ContinuousOn (lift f hf) s ↔ ContinuousOn f (mk ⁻¹' s)\n[PROOFSTEP]\nsimp only [ContinuousOn, surjective_mk.forall, continuousWithinAt_lift, mem_preimage]\n[GOAL]\nX : Type u_1\nY : Type u_2\nZ : Type u_3\nα : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : (i : ι) → TopologicalSpace (π i)\nx y z : X\ns : Set X\nf✝ : X → Y\nt : Set (SeparationQuotient X)\nf : X → Y\nhf : ∀ (x y : X), (x ~ᵢ y) → f x = f y\n⊢ Continuous (lift f hf) ↔ Continuous f\n[PROOFSTEP]\nsimp only [continuous_iff_continuousOn_univ, continuousOn_lift, preimage_univ]\n[GOAL]\nX : Type u_1\nY : Type u_2\nZ : Type u_3\nα : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : (i : ι) → TopologicalSpace (π i)\nx✝ y✝ z : X\ns : Set X\nf✝ : X → Y\nt : Set (SeparationQuotient X)\nf : X → Y → α\nhf : ∀ (a : X) (b : Y) (c : X) (d : Y), (a ~ᵢ c) → (b ~ᵢ d) → f a b = f c d\nx : X\ny : Y\nl : Filter α\n⊢ Tendsto (uncurry (lift₂ f hf)) (𝓝 (mk x, mk y)) l ↔ Tendsto (uncurry f) (𝓝 (x, y)) l\n[PROOFSTEP]\nrw [← map_prod_map_mk_nhds, tendsto_map'_iff]\n[GOAL]\nX : Type u_1\nY : Type u_2\nZ : Type u_3\nα : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : (i : ι) → TopologicalSpace (π i)\nx✝ y✝ z : X\ns : Set X\nf✝ : X → Y\nt : Set (SeparationQuotient X)\nf : X → Y → α\nhf : ∀ (a : X) (b : Y) (c : X) (d : Y), (a ~ᵢ c) → (b ~ᵢ d) → f a b = f c d\nx : X\ny : Y\nl : Filter α\n⊢ Tendsto (uncurry (lift₂ f hf) ∘ Prod.map mk mk) (𝓝 (x, y)) l ↔ Tendsto (uncurry f) (𝓝 (x, y)) l\n[PROOFSTEP]\nrfl\n[GOAL]\nX : Type u_1\nY : Type u_2\nZ : Type u_3\nα : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : (i : ι) → TopologicalSpace (π i)\nx✝ y✝ z : X\ns✝ : Set X\nf✝ : X → Y\nt : Set (SeparationQuotient X)\nf : X → Y → α\nhf : ∀ (a : X) (b : Y) (c : X) (d : Y), (a ~ᵢ c) → (b ~ᵢ d) → f a b = f c d\nx : X\ny : Y\ns : Set (SeparationQuotient X × SeparationQuotient Y)\nl : Filter α\n⊢ Tendsto (uncurry (lift₂ f hf)) (𝓝[s] (mk x, mk y)) l ↔ Tendsto (uncurry f) (𝓝[Prod.map mk mk ⁻¹' s] (x, y)) l\n[PROOFSTEP]\nrw [nhdsWithin, ← map_prod_map_mk_nhds, ← Filter.push_pull, comap_principal]\n[GOAL]\nX : Type u_1\nY : Type u_2\nZ : Type u_3\nα : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : (i : ι) → TopologicalSpace (π i)\nx✝ y✝ z : X\ns✝ : Set X\nf✝ : X → Y\nt : Set (SeparationQuotient X)\nf : X → Y → α\nhf : ∀ (a : X) (b : Y) (c : X) (d : Y), (a ~ᵢ c) → (b ~ᵢ d) → f a b = f c d\nx : X\ny : Y\ns : Set (SeparationQuotient X × SeparationQuotient Y)\nl : Filter α\n⊢ Tendsto (uncurry (lift₂ f hf)) (Filter.map (Prod.map mk mk) (𝓝 (x, y) ⊓ 𝓟 (Prod.map mk mk ⁻¹' s))) l ↔\n    Tendsto (uncurry f) (𝓝[Prod.map mk mk ⁻¹' s] (x, y)) l\n[PROOFSTEP]\nrfl\n[GOAL]\nX : Type u_1\nY : Type u_2\nZ : Type u_3\nα : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : (i : ι) → TopologicalSpace (π i)\nx y z : X\ns✝ : Set X\nf✝ : X → Y\nt : Set (SeparationQuotient X)\nf : X → Y → Z\nhf : ∀ (a : X) (b : Y) (c : X) (d : Y), (a ~ᵢ c) → (b ~ᵢ d) → f a b = f c d\ns : Set (SeparationQuotient X × SeparationQuotient Y)\n⊢ ContinuousOn (uncurry (lift₂ f hf)) s ↔ ContinuousOn (uncurry f) (Prod.map mk mk ⁻¹' s)\n[PROOFSTEP]\nsimp_rw [ContinuousOn, (surjective_mk.Prod_map surjective_mk).forall, Prod.forall, Prod.map, continuousWithinAt_lift₂]\n[GOAL]\nX : Type u_1\nY : Type u_2\nZ : Type u_3\nα : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : (i : ι) → TopologicalSpace (π i)\nx y z : X\ns✝ : Set X\nf✝ : X → Y\nt : Set (SeparationQuotient X)\nf : X → Y → Z\nhf : ∀ (a : X) (b : Y) (c : X) (d : Y), (a ~ᵢ c) → (b ~ᵢ d) → f a b = f c d\ns : Set (SeparationQuotient X × SeparationQuotient Y)\n⊢ (∀ (a : X) (b : Y), (mk a, mk b) ∈ s → ContinuousWithinAt (uncurry f) (Prod.map mk mk ⁻¹' s) (a, b)) ↔\n    ∀ (a : X) (b : Y),\n      (a, b) ∈ (fun x => (mk x.fst, mk x.snd)) ⁻¹' s →\n        ContinuousWithinAt (uncurry f) ((fun x => (mk x.fst, mk x.snd)) ⁻¹' s) (a, b)\n[PROOFSTEP]\nrfl\n[GOAL]\nX : Type u_1\nY : Type u_2\nZ : Type u_3\nα : Type u_4\nι : Type u_5\nπ : ι → Type u_6\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : TopologicalSpace Z\ninst✝ : (i : ι) → TopologicalSpace (π i)\nx y z : X\ns : Set X\nf✝ : X → Y\nt : Set (SeparationQuotient X)\nf : X → Y → Z\nhf : ∀ (a : X) (b : Y) (c : X) (d : Y), (a ~ᵢ c) → (b ~ᵢ d) → f a b = f c d\n⊢ Continuous (uncurry (lift₂ f hf)) ↔ Continuous (uncurry f)\n[PROOFSTEP]\nsimp only [continuous_iff_continuousOn_univ, continuousOn_lift₂, preimage_univ]\n", "meta": {"mathlib_filename": "Mathlib.Topology.Inseparable", "llama_tokens": 15960, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8128673223709251, "lm_q2_score": 0.626124191181315, "lm_q1q2_score": 0.5089558947572167}}
{"text": "[GOAL]\n⊢ ∀ {α β : Type ?u.90} (Iα : Mul α) (Iβ : Mul β), Function.Injective MulHom.toFun\n[PROOFSTEP]\nintros\n[GOAL]\nα✝ β✝ : Type ?u.90\nIα✝ : Mul α✝\nIβ✝ : Mul β✝\n⊢ Function.Injective MulHom.toFun\n[PROOFSTEP]\napply @FunLike.coe_injective\n[GOAL]\n⊢ ∀ {α : Type ?u.90} (I : Mul α), (MulHom.id α).toFun = id\n[PROOFSTEP]\naesop_cat\n[GOAL]\n⊢ ∀ {α β γ : Type ?u.90} (Iα : Mul α) (Iβ : Mul β) (Iγ : Mul γ) (f : α →ₙ* β) (g : β →ₙ* γ),\n    (MulHom.comp g f).toFun = g.toFun ∘ f.toFun\n[PROOFSTEP]\naesop_cat\n[GOAL]\nX Y : Type u\ninst✝¹ : Mul X\ninst✝ : Mul Y\ne : X ≃* Y\n⊢ toMulHom e ≫ toMulHom (symm e) = 𝟙 (MagmaCat.of X)\n[PROOFSTEP]\next\n[GOAL]\ncase w\nX Y : Type u\ninst✝¹ : Mul X\ninst✝ : Mul Y\ne : X ≃* Y\nx✝ : (forget MagmaCat).obj (MagmaCat.of X)\n⊢ ↑(toMulHom e ≫ toMulHom (symm e)) x✝ = ↑(𝟙 (MagmaCat.of X)) x✝\n[PROOFSTEP]\nsimp_rw [comp_apply, toMulHom_eq_coe, MagmaCat.MulEquiv_coe_eq, symm_apply_apply, id_apply]\n[GOAL]\nX✝ Y✝ : Type u\nX Y : MagmaCat\nf : X ⟶ Y\nx✝ : IsIso ((forget MagmaCat).map f)\n⊢ IsIso f\n[PROOFSTEP]\nskip\n[GOAL]\nX✝ Y✝ : Type u\nX Y : MagmaCat\nf : X ⟶ Y\nx✝ : IsIso ((forget MagmaCat).map f)\n⊢ IsIso f\n[PROOFSTEP]\nlet i := asIso ((forget MagmaCat).map f)\n[GOAL]\nX✝ Y✝ : Type u\nX Y : MagmaCat\nf : X ⟶ Y\nx✝ : IsIso ((forget MagmaCat).map f)\ni : (forget MagmaCat).obj X ≅ (forget MagmaCat).obj Y := asIso ((forget MagmaCat).map f)\n⊢ IsIso f\n[PROOFSTEP]\nlet e : X ≃* Y := { f, i.toEquiv with }\n[GOAL]\nX✝ Y✝ : Type u\nX Y : MagmaCat\nf : X ⟶ Y\nx✝ : IsIso ((forget MagmaCat).map f)\ni : (forget MagmaCat).obj X ≅ (forget MagmaCat).obj Y := asIso ((forget MagmaCat).map f)\ne : ↑X ≃* ↑Y :=\n  let src := i.toEquiv;\n  {\n    toEquiv :=\n      { toFun := f.toFun, invFun := src.invFun, left_inv := (_ : Function.LeftInverse src.invFun src.toFun),\n        right_inv := (_ : Function.RightInverse src.invFun src.toFun) },\n    map_mul' := (_ : ∀ (x y : ↑X), MulHom.toFun f (x * y) = MulHom.toFun f x * MulHom.toFun f y) }\n⊢ IsIso f\n[PROOFSTEP]\nexact ⟨(IsIso.of_iso e.toMagmaCatIso).1⟩\n[GOAL]\nX✝ Y✝ : Type u\nX Y : SemigroupCat\nf : X ⟶ Y\nx✝ : IsIso ((forget SemigroupCat).map f)\n⊢ IsIso f\n[PROOFSTEP]\nskip\n[GOAL]\nX✝ Y✝ : Type u\nX Y : SemigroupCat\nf : X ⟶ Y\nx✝ : IsIso ((forget SemigroupCat).map f)\n⊢ IsIso f\n[PROOFSTEP]\nlet i := asIso ((forget SemigroupCat).map f)\n[GOAL]\nX✝ Y✝ : Type u\nX Y : SemigroupCat\nf : X ⟶ Y\nx✝ : IsIso ((forget SemigroupCat).map f)\ni : (forget SemigroupCat).obj X ≅ (forget SemigroupCat).obj Y := asIso ((forget SemigroupCat).map f)\n⊢ IsIso f\n[PROOFSTEP]\nlet e : X ≃* Y := { f, i.toEquiv with }\n[GOAL]\nX✝ Y✝ : Type u\nX Y : SemigroupCat\nf : X ⟶ Y\nx✝ : IsIso ((forget SemigroupCat).map f)\ni : (forget SemigroupCat).obj X ≅ (forget SemigroupCat).obj Y := asIso ((forget SemigroupCat).map f)\ne : ↑X ≃* ↑Y :=\n  let src := i.toEquiv;\n  {\n    toEquiv :=\n      { toFun := f.toFun, invFun := src.invFun, left_inv := (_ : Function.LeftInverse src.invFun src.toFun),\n        right_inv := (_ : Function.RightInverse src.invFun src.toFun) },\n    map_mul' := (_ : ∀ (x y : ↑X), MulHom.toFun f (x * y) = MulHom.toFun f x * MulHom.toFun f y) }\n⊢ IsIso f\n[PROOFSTEP]\nexact ⟨(IsIso.of_iso e.toSemigroupCatIso).1⟩\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Category.SemigroupCat.Basic", "llama_tokens": 1609, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8128673087708699, "lm_q2_score": 0.6261241772283034, "lm_q1q2_score": 0.5089558748999461}}
{"text": "[GOAL]\nα : Type u_1\ninst✝¹ : AddGroup α\ninst✝ : LinearOrder α\na : α\n⊢ |(-a)| = |a|\n[PROOFSTEP]\nrw [abs_eq_max_neg, max_comm, neg_neg, abs_eq_max_neg]\n[GOAL]\nα : Type u_1\ninst✝¹ : AddGroup α\ninst✝ : LinearOrder α\na b : α\nh : |a| = b\n⊢ a = b ∨ a = -b\n[PROOFSTEP]\nsimpa only [← h, eq_comm (a := |a|), neg_eq_iff_eq_neg] using abs_choice a\n[GOAL]\nα : Type u_1\ninst✝¹ : AddGroup α\ninst✝ : LinearOrder α\na b : α\n⊢ |a| = |b| ↔ a = b ∨ a = -b\n[PROOFSTEP]\nrefine' ⟨fun h => _, fun h => _⟩\n[GOAL]\ncase refine'_1\nα : Type u_1\ninst✝¹ : AddGroup α\ninst✝ : LinearOrder α\na b : α\nh : |a| = |b|\n⊢ a = b ∨ a = -b\n[PROOFSTEP]\nobtain rfl | rfl := eq_or_eq_neg_of_abs_eq h\n[GOAL]\ncase refine'_1.inl\nα : Type u_1\ninst✝¹ : AddGroup α\ninst✝ : LinearOrder α\nb : α\nh : |(|b|)| = |b|\n⊢ |b| = b ∨ |b| = -b\n[PROOFSTEP]\nsimpa only [neg_eq_iff_eq_neg (a := |b|), neg_inj, or_comm] using abs_choice b\n[GOAL]\ncase refine'_1.inr\nα : Type u_1\ninst✝¹ : AddGroup α\ninst✝ : LinearOrder α\nb : α\nh : |(-|b|)| = |b|\n⊢ -|b| = b ∨ -|b| = -b\n[PROOFSTEP]\nsimpa only [neg_eq_iff_eq_neg (a := |b|), neg_inj, or_comm] using abs_choice b\n[GOAL]\ncase refine'_2\nα : Type u_1\ninst✝¹ : AddGroup α\ninst✝ : LinearOrder α\na b : α\nh : a = b ∨ a = -b\n⊢ |a| = |b|\n[PROOFSTEP]\ncases' h with h h\n[GOAL]\ncase refine'_2.inl\nα : Type u_1\ninst✝¹ : AddGroup α\ninst✝ : LinearOrder α\na b : α\nh : a = b\n⊢ |a| = |b|\n[PROOFSTEP]\nsimp [h, abs_neg]\n[GOAL]\ncase refine'_2.inr\nα : Type u_1\ninst✝¹ : AddGroup α\ninst✝ : LinearOrder α\na b : α\nh : a = -b\n⊢ |a| = |b|\n[PROOFSTEP]\nsimp [h, abs_neg]\n[GOAL]\nα : Type u_1\ninst✝² : AddGroup α\ninst✝¹ : LinearOrder α\ninst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\na b c : α\nha : 0 ≤ a\nhab : a ≤ b\n⊢ |a| ≤ |b|\n[PROOFSTEP]\nrwa [abs_of_nonneg ha, abs_of_nonneg (ha.trans hab)]\n[GOAL]\nα : Type u_1\ninst✝² : AddGroup α\ninst✝¹ : LinearOrder α\ninst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\na b c : α\n⊢ 0 < |a| ↔ a ≠ 0\n[PROOFSTEP]\nrcases lt_trichotomy a 0 with (ha | rfl | ha)\n[GOAL]\ncase inl\nα : Type u_1\ninst✝² : AddGroup α\ninst✝¹ : LinearOrder α\ninst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\na b c : α\nha : a < 0\n⊢ 0 < |a| ↔ a ≠ 0\n[PROOFSTEP]\nsimp [abs_of_neg ha, neg_pos, ha.ne, ha]\n[GOAL]\ncase inr.inl\nα : Type u_1\ninst✝² : AddGroup α\ninst✝¹ : LinearOrder α\ninst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\nb c : α\n⊢ 0 < |0| ↔ 0 ≠ 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr.inr\nα : Type u_1\ninst✝² : AddGroup α\ninst✝¹ : LinearOrder α\ninst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\na b c : α\nha : 0 < a\n⊢ 0 < |a| ↔ a ≠ 0\n[PROOFSTEP]\nsimp [abs_of_pos ha, ha, ha.ne.symm]\n[GOAL]\nα : Type u_1\ninst✝² : AddGroup α\ninst✝¹ : LinearOrder α\ninst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\na✝ b c a : α\n⊢ -|a| ≤ a\n[PROOFSTEP]\ncases' le_total 0 a with h h\n[GOAL]\ncase inl\nα : Type u_1\ninst✝² : AddGroup α\ninst✝¹ : LinearOrder α\ninst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\na✝ b c a : α\nh : 0 ≤ a\n⊢ -|a| ≤ a\n[PROOFSTEP]\ncalc\n  -|a| = -a := congr_arg Neg.neg (abs_of_nonneg h)\n  _ ≤ 0 := (neg_nonpos.mpr h)\n  _ ≤ a := h\n[GOAL]\ncase inr\nα : Type u_1\ninst✝² : AddGroup α\ninst✝¹ : LinearOrder α\ninst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\na✝ b c a : α\nh : a ≤ 0\n⊢ -|a| ≤ a\n[PROOFSTEP]\ncalc\n  -|a| = - -a := congr_arg Neg.neg (abs_of_nonpos h)\n  _ ≤ a := (neg_neg a).le\n[GOAL]\nα : Type u_1\ninst✝² : AddGroup α\ninst✝¹ : LinearOrder α\ninst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\na✝ b c a : α\n⊢ 0 ≤ a + |a|\n[PROOFSTEP]\nrw [← add_right_neg a]\n[GOAL]\nα : Type u_1\ninst✝² : AddGroup α\ninst✝¹ : LinearOrder α\ninst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\na✝ b c a : α\n⊢ a + -a ≤ a + |a|\n[PROOFSTEP]\napply add_le_add_left\n[GOAL]\ncase bc\nα : Type u_1\ninst✝² : AddGroup α\ninst✝¹ : LinearOrder α\ninst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\na✝ b c a : α\n⊢ -a ≤ |a|\n[PROOFSTEP]\nexact neg_le_abs_self a\n[GOAL]\nα : Type u_1\ninst✝² : AddGroup α\ninst✝¹ : LinearOrder α\ninst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\na✝ b c a : α\n⊢ -|a| ≤ -a\n[PROOFSTEP]\nsimpa using neg_abs_le_self (-a)\n[GOAL]\nα : Type u_1\ninst✝³ : AddGroup α\ninst✝² : LinearOrder α\ninst✝¹ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\na b c : α\ninst✝ : CovariantClass α α (swap fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\nha : a ≤ 0\nhab : b ≤ a\n⊢ |a| ≤ |b|\n[PROOFSTEP]\nrw [abs_of_nonpos ha, abs_of_nonpos (hab.trans ha)]\n[GOAL]\nα : Type u_1\ninst✝³ : AddGroup α\ninst✝² : LinearOrder α\ninst✝¹ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\na b c : α\ninst✝ : CovariantClass α α (swap fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\nha : a ≤ 0\nhab : b ≤ a\n⊢ -a ≤ -b\n[PROOFSTEP]\nexact neg_le_neg_iff.mpr hab\n[GOAL]\nα : Type u_1\ninst✝³ : AddGroup α\ninst✝² : LinearOrder α\ninst✝¹ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\na b c : α\ninst✝ : CovariantClass α α (swap fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\n⊢ -a < b ∧ a < b ↔ -b < a ∧ a < b\n[PROOFSTEP]\nrw [neg_lt]\n[GOAL]\nα : Type u_1\ninst✝³ : AddGroup α\ninst✝² : LinearOrder α\ninst✝¹ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\na✝ b✝ c : α\ninst✝ : CovariantClass α α (swap fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\na b : α\n⊢ max a b - min a b = |a - b|\n[PROOFSTEP]\ncases' le_total a b with ab ba\n[GOAL]\ncase inl\nα : Type u_1\ninst✝³ : AddGroup α\ninst✝² : LinearOrder α\ninst✝¹ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\na✝ b✝ c : α\ninst✝ : CovariantClass α α (swap fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\na b : α\nab : a ≤ b\n⊢ max a b - min a b = |a - b|\n[PROOFSTEP]\nrw [max_eq_right ab, min_eq_left ab, abs_of_nonpos, neg_sub]\n[GOAL]\ncase inl\nα : Type u_1\ninst✝³ : AddGroup α\ninst✝² : LinearOrder α\ninst✝¹ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\na✝ b✝ c : α\ninst✝ : CovariantClass α α (swap fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\na b : α\nab : a ≤ b\n⊢ a - b ≤ 0\n[PROOFSTEP]\nrwa [sub_nonpos]\n[GOAL]\ncase inr\nα : Type u_1\ninst✝³ : AddGroup α\ninst✝² : LinearOrder α\ninst✝¹ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\na✝ b✝ c : α\ninst✝ : CovariantClass α α (swap fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\na b : α\nba : b ≤ a\n⊢ max a b - min a b = |a - b|\n[PROOFSTEP]\nrw [max_eq_left ba, min_eq_right ba, abs_of_nonneg]\n[GOAL]\ncase inr\nα : Type u_1\ninst✝³ : AddGroup α\ninst✝² : LinearOrder α\ninst✝¹ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\na✝ b✝ c : α\ninst✝ : CovariantClass α α (swap fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\na b : α\nba : b ≤ a\n⊢ 0 ≤ a - b\n[PROOFSTEP]\nrwa [sub_nonneg]\n[GOAL]\nα : Type u_1\ninst✝³ : AddGroup α\ninst✝² : LinearOrder α\ninst✝¹ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\na✝ b✝ c : α\ninst✝ : CovariantClass α α (swap fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\na b : α\n⊢ max a b - min a b = |b - a|\n[PROOFSTEP]\nrw [abs_sub_comm]\n[GOAL]\nα : Type u_1\ninst✝³ : AddGroup α\ninst✝² : LinearOrder α\ninst✝¹ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\na✝ b✝ c : α\ninst✝ : CovariantClass α α (swap fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\na b : α\n⊢ max a b - min a b = |a - b|\n[PROOFSTEP]\nexact max_sub_min_eq_abs' _ _\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedAddCommGroup α\na b c d : α\n⊢ |a| ≤ b ↔ -b ≤ a ∧ a ≤ b\n[PROOFSTEP]\nrw [abs_le', and_comm, @neg_le α]\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedAddCommGroup α\na b c d : α\n⊢ a ≤ |b| ↔ b ≤ -a ∨ a ≤ b\n[PROOFSTEP]\nrw [le_abs, or_comm, @le_neg α]\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedAddCommGroup α\na✝ b✝ c d a b : α\n⊢ |a| ≤ |b| + |b + a|\n[PROOFSTEP]\nsimpa using abs_add (-b) (b + a)\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedAddCommGroup α\na✝ b✝ c d a b : α\n⊢ |a - b| ≤ |a| + |b|\n[PROOFSTEP]\nrw [sub_eq_add_neg, ← abs_neg b]\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedAddCommGroup α\na✝ b✝ c d a b : α\n⊢ |a + -b| ≤ |a| + |(-b)|\n[PROOFSTEP]\nexact abs_add a _\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedAddCommGroup α\na b c d : α\n⊢ |a - b| ≤ c ↔ a - b ≤ c ∧ b - a ≤ c\n[PROOFSTEP]\nrw [abs_le, neg_le_sub_iff_le_add, sub_le_iff_le_add', and_comm, sub_le_iff_le_add']\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedAddCommGroup α\na b c d : α\n⊢ |a - b| < c ↔ a - b < c ∧ b - a < c\n[PROOFSTEP]\nrw [@abs_lt α, neg_lt_sub_iff_lt_add', sub_lt_iff_lt_add', and_comm, sub_lt_iff_lt_add']\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedAddCommGroup α\na✝ b✝ c d a b : α\n⊢ |a| = |a - b + b|\n[PROOFSTEP]\nrw [sub_add_cancel]\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedAddCommGroup α\na✝ b✝ c d a b : α\n⊢ |b| - |a| ≤ |a - b|\n[PROOFSTEP]\nrw [abs_sub_comm]\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedAddCommGroup α\na✝ b✝ c d a b : α\n⊢ |b| - |a| ≤ |b - a|\n[PROOFSTEP]\napply abs_sub_abs_le_abs_sub\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedAddCommGroup α\na b c d : α\nhb : 0 ≤ b\n⊢ |a| = b ↔ a = b ∨ a = -b\n[PROOFSTEP]\nrefine' ⟨eq_or_eq_neg_of_abs_eq, _⟩\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedAddCommGroup α\na b c d : α\nhb : 0 ≤ b\n⊢ a = b ∨ a = -b → |a| = b\n[PROOFSTEP]\nrintro (rfl | rfl)\n[GOAL]\ncase inl\nα : Type u_1\ninst✝ : LinearOrderedAddCommGroup α\na c d : α\nhb : 0 ≤ a\n⊢ |a| = a\n[PROOFSTEP]\nsimp only [abs_neg, abs_of_nonneg hb]\n[GOAL]\ncase inr\nα : Type u_1\ninst✝ : LinearOrderedAddCommGroup α\nb c d : α\nhb : 0 ≤ b\n⊢ |(-b)| = b\n[PROOFSTEP]\nsimp only [abs_neg, abs_of_nonneg hb]\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedAddCommGroup α\na b c d : α\nhab : a ≤ b\nhbc : b ≤ c\n⊢ b ≤ max |a| |c|\n[PROOFSTEP]\nsimp [hbc.trans (le_abs_self c)]\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedAddCommGroup α\na b c d : α\nhab : a ≤ b\nhbc : b ≤ c\n⊢ -b ≤ max |a| |c|\n[PROOFSTEP]\nsimp [((@neg_le_neg_iff α ..).mpr hab).trans (neg_le_abs_self a)]\n[GOAL]\nα : Type u_1\ninst✝ : LinearOrderedAddCommGroup α\na✝ b✝ c✝ d a b c : α\n⊢ |a - c| = |a - b + (b - c)|\n[PROOFSTEP]\nrw [sub_add_sub_cancel]\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Order.Group.Abs", "llama_tokens": 5312, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7606506526772883, "lm_q2_score": 0.668880247169804, "lm_q1q2_score": 0.5087841965726573}}
{"text": "[GOAL]\nι : Type u_1\nK : Type u_2\nV : Type u_3\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : ι → ℙ K V\n⊢ Independent f ↔ LinearIndependent K (Projectivization.rep ∘ f)\n[PROOFSTEP]\nrefine' ⟨_, fun h => _⟩\n[GOAL]\ncase refine'_1\nι : Type u_1\nK : Type u_2\nV : Type u_3\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : ι → ℙ K V\n⊢ Independent f → LinearIndependent K (Projectivization.rep ∘ f)\n[PROOFSTEP]\nrintro ⟨ff, hff, hh⟩\n[GOAL]\ncase refine'_1.mk\nι : Type u_1\nK : Type u_2\nV : Type u_3\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nff : ι → V\nhff : ∀ (i : ι), ff i ≠ 0\nhh : LinearIndependent K ff\n⊢ LinearIndependent K (Projectivization.rep ∘ fun i => mk K (ff i) (_ : ff i ≠ 0))\n[PROOFSTEP]\nchoose a ha using fun i : ι => exists_smul_eq_mk_rep K (ff i) (hff i)\n[GOAL]\ncase refine'_1.mk\nι : Type u_1\nK : Type u_2\nV : Type u_3\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nff : ι → V\nhff : ∀ (i : ι), ff i ≠ 0\nhh : LinearIndependent K ff\na : ι → Kˣ\nha : ∀ (i : ι), a i • ff i = Projectivization.rep (mk K (ff i) (_ : ff i ≠ 0))\n⊢ LinearIndependent K (Projectivization.rep ∘ fun i => mk K (ff i) (_ : ff i ≠ 0))\n[PROOFSTEP]\nconvert hh.units_smul a\n[GOAL]\ncase h.e'_4\nι : Type u_1\nK : Type u_2\nV : Type u_3\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nff : ι → V\nhff : ∀ (i : ι), ff i ≠ 0\nhh : LinearIndependent K ff\na : ι → Kˣ\nha : ∀ (i : ι), a i • ff i = Projectivization.rep (mk K (ff i) (_ : ff i ≠ 0))\n⊢ (Projectivization.rep ∘ fun i => mk K (ff i) (_ : ff i ≠ 0)) = a • ff\n[PROOFSTEP]\next i\n[GOAL]\ncase h.e'_4.h\nι : Type u_1\nK : Type u_2\nV : Type u_3\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nff : ι → V\nhff : ∀ (i : ι), ff i ≠ 0\nhh : LinearIndependent K ff\na : ι → Kˣ\nha : ∀ (i : ι), a i • ff i = Projectivization.rep (mk K (ff i) (_ : ff i ≠ 0))\ni : ι\n⊢ (Projectivization.rep ∘ fun i => mk K (ff i) (_ : ff i ≠ 0)) i = (a • ff) i\n[PROOFSTEP]\nexact (ha i).symm\n[GOAL]\ncase refine'_2\nι : Type u_1\nK : Type u_2\nV : Type u_3\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : ι → ℙ K V\nh : LinearIndependent K (Projectivization.rep ∘ f)\n⊢ Independent f\n[PROOFSTEP]\nconvert Independent.mk _ _ h\n[GOAL]\ncase h.e'_7.h\nι : Type u_1\nK : Type u_2\nV : Type u_3\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : ι → ℙ K V\nh : LinearIndependent K (Projectivization.rep ∘ f)\nx✝ : ι\n⊢ f x✝ = mk K ((Projectivization.rep ∘ f) x✝) (_ : ?m.12147 x✝ ≠ 0)\n[PROOFSTEP]\nsimp only [mk_rep, Function.comp_apply]\n[GOAL]\ncase refine'_2\nι : Type u_1\nK : Type u_2\nV : Type u_3\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : ι → ℙ K V\nh : LinearIndependent K (Projectivization.rep ∘ f)\n⊢ ∀ (i : ι), (Projectivization.rep ∘ f) i ≠ 0\n[PROOFSTEP]\nintro i\n[GOAL]\ncase refine'_2\nι : Type u_1\nK : Type u_2\nV : Type u_3\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : ι → ℙ K V\nh : LinearIndependent K (Projectivization.rep ∘ f)\ni : ι\n⊢ (Projectivization.rep ∘ f) i ≠ 0\n[PROOFSTEP]\napply rep_nonzero\n[GOAL]\nι : Type u_1\nK : Type u_2\nV : Type u_3\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : ι → ℙ K V\n⊢ Independent f ↔ CompleteLattice.Independent fun i => Projectivization.submodule (f i)\n[PROOFSTEP]\nrefine' ⟨_, fun h => _⟩\n[GOAL]\ncase refine'_1\nι : Type u_1\nK : Type u_2\nV : Type u_3\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : ι → ℙ K V\n⊢ Independent f → CompleteLattice.Independent fun i => Projectivization.submodule (f i)\n[PROOFSTEP]\nrintro ⟨f, hf, hi⟩\n[GOAL]\ncase refine'_1.mk\nι : Type u_1\nK : Type u_2\nV : Type u_3\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : ι → V\nhf : ∀ (i : ι), f i ≠ 0\nhi : LinearIndependent K f\n⊢ CompleteLattice.Independent fun i => Projectivization.submodule ((fun i => mk K (f i) (_ : f i ≠ 0)) i)\n[PROOFSTEP]\nsimp only [submodule_mk]\n[GOAL]\ncase refine'_1.mk\nι : Type u_1\nK : Type u_2\nV : Type u_3\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : ι → V\nhf : ∀ (i : ι), f i ≠ 0\nhi : LinearIndependent K f\n⊢ CompleteLattice.Independent fun i => Submodule.span K {f i}\n[PROOFSTEP]\nexact (CompleteLattice.independent_iff_linearIndependent_of_ne_zero (R := K) hf).mpr hi\n[GOAL]\ncase refine'_2\nι : Type u_1\nK : Type u_2\nV : Type u_3\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : ι → ℙ K V\nh : CompleteLattice.Independent fun i => Projectivization.submodule (f i)\n⊢ Independent f\n[PROOFSTEP]\nrw [independent_iff]\n[GOAL]\ncase refine'_2\nι : Type u_1\nK : Type u_2\nV : Type u_3\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : ι → ℙ K V\nh : CompleteLattice.Independent fun i => Projectivization.submodule (f i)\n⊢ LinearIndependent K (Projectivization.rep ∘ f)\n[PROOFSTEP]\nrefine' h.linearIndependent (Projectivization.submodule ∘ f) (fun i => _) fun i => _\n[GOAL]\ncase refine'_2.refine'_1\nι : Type u_1\nK : Type u_2\nV : Type u_3\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : ι → ℙ K V\nh : CompleteLattice.Independent fun i => Projectivization.submodule (f i)\ni : ι\n⊢ (Projectivization.rep ∘ f) i ∈ (Projectivization.submodule ∘ f) i\n[PROOFSTEP]\nsimpa only [Function.comp_apply, submodule_eq] using Submodule.mem_span_singleton_self _\n[GOAL]\ncase refine'_2.refine'_2\nι : Type u_1\nK : Type u_2\nV : Type u_3\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : ι → ℙ K V\nh : CompleteLattice.Independent fun i => Projectivization.submodule (f i)\ni : ι\n⊢ (Projectivization.rep ∘ f) i ≠ 0\n[PROOFSTEP]\nexact rep_nonzero (f i)\n[GOAL]\nι : Type u_1\nK : Type u_2\nV : Type u_3\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : ι → ℙ K V\n⊢ Dependent f ↔ ¬LinearIndependent K (Projectivization.rep ∘ f)\n[PROOFSTEP]\nrefine' ⟨_, fun h => _⟩\n[GOAL]\ncase refine'_1\nι : Type u_1\nK : Type u_2\nV : Type u_3\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : ι → ℙ K V\n⊢ Dependent f → ¬LinearIndependent K (Projectivization.rep ∘ f)\n[PROOFSTEP]\nrintro ⟨ff, hff, hh1⟩\n[GOAL]\ncase refine'_1.mk\nι : Type u_1\nK : Type u_2\nV : Type u_3\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nff : ι → V\nhff : ∀ (i : ι), ff i ≠ 0\nhh1 : ¬LinearIndependent K ff\n⊢ ¬LinearIndependent K (Projectivization.rep ∘ fun i => mk K (ff i) (_ : ff i ≠ 0))\n[PROOFSTEP]\ncontrapose! hh1\n[GOAL]\ncase refine'_1.mk\nι : Type u_1\nK : Type u_2\nV : Type u_3\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nff : ι → V\nhff : ∀ (i : ι), ff i ≠ 0\nhh1 : LinearIndependent K (Projectivization.rep ∘ fun i => mk K (ff i) (_ : ff i ≠ 0))\n⊢ LinearIndependent K ff\n[PROOFSTEP]\nchoose a ha using fun i : ι => exists_smul_eq_mk_rep K (ff i) (hff i)\n[GOAL]\ncase refine'_1.mk\nι : Type u_1\nK : Type u_2\nV : Type u_3\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nff : ι → V\nhff : ∀ (i : ι), ff i ≠ 0\nhh1 : LinearIndependent K (Projectivization.rep ∘ fun i => mk K (ff i) (_ : ff i ≠ 0))\na : ι → Kˣ\nha : ∀ (i : ι), a i • ff i = Projectivization.rep (mk K (ff i) (_ : ff i ≠ 0))\n⊢ LinearIndependent K ff\n[PROOFSTEP]\nconvert hh1.units_smul a⁻¹\n[GOAL]\ncase h.e'_4\nι : Type u_1\nK : Type u_2\nV : Type u_3\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nff : ι → V\nhff : ∀ (i : ι), ff i ≠ 0\nhh1 : LinearIndependent K (Projectivization.rep ∘ fun i => mk K (ff i) (_ : ff i ≠ 0))\na : ι → Kˣ\nha : ∀ (i : ι), a i • ff i = Projectivization.rep (mk K (ff i) (_ : ff i ≠ 0))\n⊢ ff = a⁻¹ • Projectivization.rep ∘ fun i => mk K (ff i) (_ : ff i ≠ 0)\n[PROOFSTEP]\next i\n[GOAL]\ncase h.e'_4.h\nι : Type u_1\nK : Type u_2\nV : Type u_3\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nff : ι → V\nhff : ∀ (i : ι), ff i ≠ 0\nhh1 : LinearIndependent K (Projectivization.rep ∘ fun i => mk K (ff i) (_ : ff i ≠ 0))\na : ι → Kˣ\nha : ∀ (i : ι), a i • ff i = Projectivization.rep (mk K (ff i) (_ : ff i ≠ 0))\ni : ι\n⊢ ff i = (a⁻¹ • Projectivization.rep ∘ fun i => mk K (ff i) (_ : ff i ≠ 0)) i\n[PROOFSTEP]\nsimp only [← ha, inv_smul_smul, Pi.smul_apply', Pi.inv_apply, Function.comp_apply]\n[GOAL]\ncase refine'_2\nι : Type u_1\nK : Type u_2\nV : Type u_3\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : ι → ℙ K V\nh : ¬LinearIndependent K (Projectivization.rep ∘ f)\n⊢ Dependent f\n[PROOFSTEP]\nconvert Dependent.mk _ _ h\n[GOAL]\ncase h.e'_7.h\nι : Type u_1\nK : Type u_2\nV : Type u_3\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : ι → ℙ K V\nh : ¬LinearIndependent K (Projectivization.rep ∘ f)\nx✝ : ι\n⊢ f x✝ = mk K ((Projectivization.rep ∘ f) x✝) (_ : ?m.30442 x✝ ≠ 0)\n[PROOFSTEP]\nsimp only [mk_rep, Function.comp_apply]\n[GOAL]\ncase refine'_2\nι : Type u_1\nK : Type u_2\nV : Type u_3\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : ι → ℙ K V\nh : ¬LinearIndependent K (Projectivization.rep ∘ f)\n⊢ ∀ (i : ι), (Projectivization.rep ∘ f) i ≠ 0\n[PROOFSTEP]\nexact fun i => rep_nonzero (f i)\n[GOAL]\nι : Type u_1\nK : Type u_2\nV : Type u_3\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : ι → ℙ K V\n⊢ Dependent f ↔ ¬Independent f\n[PROOFSTEP]\nrw [dependent_iff, independent_iff]\n[GOAL]\nι : Type u_1\nK : Type u_2\nV : Type u_3\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : ι → ℙ K V\n⊢ Independent f ↔ ¬Dependent f\n[PROOFSTEP]\nrw [dependent_iff_not_independent, Classical.not_not]\n[GOAL]\nι : Type u_1\nK : Type u_2\nV : Type u_3\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : ι → ℙ K V\nu v : ℙ K V\n⊢ Dependent ![u, v] ↔ u = v\n[PROOFSTEP]\nrw [dependent_iff_not_independent, independent_iff, linearIndependent_fin2, Function.comp_apply, Matrix.cons_val_one,\n  Matrix.head_cons, Ne.def]\n[GOAL]\nι : Type u_1\nK : Type u_2\nV : Type u_3\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : ι → ℙ K V\nu v : ℙ K V\n⊢ ¬(¬Projectivization.rep v = 0 ∧ ∀ (a : K), a • Projectivization.rep v ≠ (Projectivization.rep ∘ ![u, v]) 0) ↔ u = v\n[PROOFSTEP]\nsimp only [Matrix.cons_val_zero, not_and, not_forall, Classical.not_not, Function.comp_apply, ←\n  mk_eq_mk_iff' K _ _ (rep_nonzero u) (rep_nonzero v), mk_rep, imp_iff_right_iff]\n[GOAL]\nι : Type u_1\nK : Type u_2\nV : Type u_3\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : ι → ℙ K V\nu v : ℙ K V\n⊢ ¬Projectivization.rep v = 0 ∨ u = v\n[PROOFSTEP]\nexact Or.inl (rep_nonzero v)\n[GOAL]\nι : Type u_1\nK : Type u_2\nV : Type u_3\ninst✝² : Field K\ninst✝¹ : AddCommGroup V\ninst✝ : Module K V\nf : ι → ℙ K V\nu v : ℙ K V\n⊢ Independent ![u, v] ↔ u ≠ v\n[PROOFSTEP]\nrw [independent_iff_not_dependent, dependent_pair_iff_eq u v]\n", "meta": {"mathlib_filename": "Mathlib.LinearAlgebra.ProjectiveSpace.Independence", "llama_tokens": 5048, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8031737963569014, "lm_q2_score": 0.63341027059799, "lm_q1q2_score": 0.5087385316876399}}
{"text": "[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : MonoidalCategory C\nX Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\n⊢ f ⊗≫ g = f ≫ g\n[PROOFSTEP]\nsimp [monoidalComp]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : MonoidalCategory C\nU V W X Y : C\nf : U ⟶ V ⊗ W ⊗ X\ng : (V ⊗ W) ⊗ X ⟶ Y\n⊢ f ⊗≫ g = f ≫ (α_ V W X).inv ≫ g\n[PROOFSTEP]\nsimp [monoidalComp]\n[GOAL]\nC✝ : Type u\ninst✝² : Category.{v, u} C✝\ninst✝¹ : MonoidalCategory C✝\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nX Y : C\nf g : X ⟶ Y\nw : f ≫ 𝟙 Y = g\n⊢ f = g\n[PROOFSTEP]\nsimpa using w\n[GOAL]\nC✝ : Type u\ninst✝² : Category.{v, u} C✝\ninst✝¹ : MonoidalCategory C✝\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nX Y : C\nf g : X ⟶ Y\nw : f = g ≫ 𝟙 Y\n⊢ f = g\n[PROOFSTEP]\nsimpa using w\n", "meta": {"mathlib_filename": "Mathlib.Tactic.CategoryTheory.Coherence", "llama_tokens": 422, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8031737963569016, "lm_q2_score": 0.6334102636778401, "lm_q1q2_score": 0.508738526129557}}
{"text": "[GOAL]\nC : Type u\ninst✝ : Groupoid C\nc d : C\nf : c ⟶ d\nγ : c ⟶ c\n⊢ (fun δ => f ≫ δ ≫ inv f) ((fun γ => inv f ≫ γ ≫ f) γ) = γ\n[PROOFSTEP]\nsimp_rw [Category.assoc, comp_inv, Category.comp_id, ← Category.assoc, comp_inv, Category.id_comp]\n[GOAL]\nC : Type u\ninst✝ : Groupoid C\nc d : C\nf : c ⟶ d\nδ : d ⟶ d\n⊢ (fun γ => inv f ≫ γ ≫ f) ((fun δ => f ≫ δ ≫ inv f) δ) = δ\n[PROOFSTEP]\nsimp_rw [Category.assoc, inv_comp, ← Category.assoc, inv_comp, Category.id_comp, Category.comp_id]\n[GOAL]\nC : Type u\ninst✝ : Groupoid C\nc d : C\nf : c ⟶ d\nγ₁ γ₂ : c ⟶ c\n⊢ Equiv.toFun\n      { toFun := fun γ => inv f ≫ γ ≫ f, invFun := fun δ => f ≫ δ ≫ inv f,\n        left_inv := (_ : ∀ (γ : c ⟶ c), (fun δ => f ≫ δ ≫ inv f) ((fun γ => inv f ≫ γ ≫ f) γ) = γ),\n        right_inv := (_ : ∀ (δ : d ⟶ d), (fun γ => inv f ≫ γ ≫ f) ((fun δ => f ≫ δ ≫ inv f) δ) = δ) }\n      (γ₁ * γ₂) =\n    Equiv.toFun\n        { toFun := fun γ => inv f ≫ γ ≫ f, invFun := fun δ => f ≫ δ ≫ inv f,\n          left_inv := (_ : ∀ (γ : c ⟶ c), (fun δ => f ≫ δ ≫ inv f) ((fun γ => inv f ≫ γ ≫ f) γ) = γ),\n          right_inv := (_ : ∀ (δ : d ⟶ d), (fun γ => inv f ≫ γ ≫ f) ((fun δ => f ≫ δ ≫ inv f) δ) = δ) }\n        γ₁ *\n      Equiv.toFun\n        { toFun := fun γ => inv f ≫ γ ≫ f, invFun := fun δ => f ≫ δ ≫ inv f,\n          left_inv := (_ : ∀ (γ : c ⟶ c), (fun δ => f ≫ δ ≫ inv f) ((fun γ => inv f ≫ γ ≫ f) γ) = γ),\n          right_inv := (_ : ∀ (δ : d ⟶ d), (fun γ => inv f ≫ γ ≫ f) ((fun δ => f ≫ δ ≫ inv f) δ) = δ) }\n        γ₂\n[PROOFSTEP]\nsimp only [vertexGroup_mul, inv_eq_inv, Category.assoc, IsIso.hom_inv_id_assoc]\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Groupoid.VertexGroup", "llama_tokens": 808, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.785308580887758, "lm_q2_score": 0.6477982315512489, "lm_q1q2_score": 0.5087215099211105}}
{"text": "[GOAL]\nα : Type ?u.597\nV : Type ?u.600\nP : Type ?u.603\nW : Type u_2\nQ : Type u_1\ninst✝⁸ : SeminormedAddCommGroup V\ninst✝⁷ : PseudoMetricSpace P\ninst✝⁶ : NormedAddTorsor V P\ninst✝⁵ : NormedAddCommGroup W\ninst✝⁴ : MetricSpace Q\ninst✝³ : NormedAddTorsor W Q\n𝕜 : Type u_3\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 V\ninst✝ : NormedSpace 𝕜 W\ns : AffineSubspace 𝕜 Q\n⊢ IsClosed ↑(direction s) ↔ IsClosed ↑s\n[PROOFSTEP]\nrcases s.eq_bot_or_nonempty with (rfl | ⟨x, hx⟩)\n[GOAL]\ncase inl\nα : Type ?u.597\nV : Type ?u.600\nP : Type ?u.603\nW : Type u_2\nQ : Type u_1\ninst✝⁸ : SeminormedAddCommGroup V\ninst✝⁷ : PseudoMetricSpace P\ninst✝⁶ : NormedAddTorsor V P\ninst✝⁵ : NormedAddCommGroup W\ninst✝⁴ : MetricSpace Q\ninst✝³ : NormedAddTorsor W Q\n𝕜 : Type u_3\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 V\ninst✝ : NormedSpace 𝕜 W\n⊢ IsClosed ↑(direction ⊥) ↔ IsClosed ↑⊥\n[PROOFSTEP]\nsimp [isClosed_singleton]\n[GOAL]\ncase inr.intro\nα : Type ?u.597\nV : Type ?u.600\nP : Type ?u.603\nW : Type u_2\nQ : Type u_1\ninst✝⁸ : SeminormedAddCommGroup V\ninst✝⁷ : PseudoMetricSpace P\ninst✝⁶ : NormedAddTorsor V P\ninst✝⁵ : NormedAddCommGroup W\ninst✝⁴ : MetricSpace Q\ninst✝³ : NormedAddTorsor W Q\n𝕜 : Type u_3\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 V\ninst✝ : NormedSpace 𝕜 W\ns : AffineSubspace 𝕜 Q\nx : Q\nhx : x ∈ ↑s\n⊢ IsClosed ↑(direction s) ↔ IsClosed ↑s\n[PROOFSTEP]\nrw [← (IsometryEquiv.vaddConst x).toHomeomorph.symm.isClosed_image, AffineSubspace.coe_direction_eq_vsub_set_right hx]\n[GOAL]\ncase inr.intro\nα : Type ?u.597\nV : Type ?u.600\nP : Type ?u.603\nW : Type u_2\nQ : Type u_1\ninst✝⁸ : SeminormedAddCommGroup V\ninst✝⁷ : PseudoMetricSpace P\ninst✝⁶ : NormedAddTorsor V P\ninst✝⁵ : NormedAddCommGroup W\ninst✝⁴ : MetricSpace Q\ninst✝³ : NormedAddTorsor W Q\n𝕜 : Type u_3\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 V\ninst✝ : NormedSpace 𝕜 W\ns : AffineSubspace 𝕜 Q\nx : Q\nhx : x ∈ ↑s\n⊢ IsClosed ((fun x_1 => x_1 -ᵥ x) '' ↑s) ↔\n    IsClosed (↑(Homeomorph.symm (IsometryEquiv.toHomeomorph (IsometryEquiv.vaddConst x))) '' ↑s)\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type ?u.5475\nV : Type u_2\nP : Type u_1\nW : Type ?u.5484\nQ : Type ?u.5487\ninst✝⁸ : SeminormedAddCommGroup V\ninst✝⁷ : PseudoMetricSpace P\ninst✝⁶ : NormedAddTorsor V P\ninst✝⁵ : NormedAddCommGroup W\ninst✝⁴ : MetricSpace Q\ninst✝³ : NormedAddTorsor W Q\n𝕜 : Type u_3\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 V\ninst✝ : NormedSpace 𝕜 W\np₁ p₂ : P\nc : 𝕜\n⊢ dist p₁ (↑(homothety p₁ c) p₂) = ‖c‖ * dist p₁ p₂\n[PROOFSTEP]\nrw [homothety_def, dist_eq_norm_vsub V]\n[GOAL]\nα : Type ?u.5475\nV : Type u_2\nP : Type u_1\nW : Type ?u.5484\nQ : Type ?u.5487\ninst✝⁸ : SeminormedAddCommGroup V\ninst✝⁷ : PseudoMetricSpace P\ninst✝⁶ : NormedAddTorsor V P\ninst✝⁵ : NormedAddCommGroup W\ninst✝⁴ : MetricSpace Q\ninst✝³ : NormedAddTorsor W Q\n𝕜 : Type u_3\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 V\ninst✝ : NormedSpace 𝕜 W\np₁ p₂ : P\nc : 𝕜\n⊢ ‖p₁ -ᵥ ↑(c • (AffineMap.id 𝕜 P -ᵥ const 𝕜 P p₁) +ᵥ const 𝕜 P p₁) p₂‖ = ‖c‖ * dist p₁ p₂\n[PROOFSTEP]\nsimp [norm_smul, ← dist_eq_norm_vsub V, dist_comm]\n[GOAL]\nα : Type ?u.14492\nV : Type u_2\nP : Type u_1\nW : Type ?u.14501\nQ : Type ?u.14504\ninst✝⁸ : SeminormedAddCommGroup V\ninst✝⁷ : PseudoMetricSpace P\ninst✝⁶ : NormedAddTorsor V P\ninst✝⁵ : NormedAddCommGroup W\ninst✝⁴ : MetricSpace Q\ninst✝³ : NormedAddTorsor W Q\n𝕜 : Type u_3\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 V\ninst✝ : NormedSpace 𝕜 W\np₁ p₂ : P\nc : 𝕜\n⊢ dist (↑(homothety p₁ c) p₂) p₁ = ‖c‖ * dist p₁ p₂\n[PROOFSTEP]\nrw [dist_comm, dist_center_homothety]\n[GOAL]\nα : Type ?u.16780\nV : Type u_3\nP : Type u_1\nW : Type ?u.16789\nQ : Type ?u.16792\ninst✝⁸ : SeminormedAddCommGroup V\ninst✝⁷ : PseudoMetricSpace P\ninst✝⁶ : NormedAddTorsor V P\ninst✝⁵ : NormedAddCommGroup W\ninst✝⁴ : MetricSpace Q\ninst✝³ : NormedAddTorsor W Q\n𝕜 : Type u_2\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 V\ninst✝ : NormedSpace 𝕜 W\np₁ p₂ : P\nc₁ c₂ : 𝕜\n⊢ dist (↑(lineMap p₁ p₂) c₁) (↑(lineMap p₁ p₂) c₂) = dist c₁ c₂ * dist p₁ p₂\n[PROOFSTEP]\nrw [dist_comm p₁ p₂]\n  -- Porting note: was `simp only [lineMap_apply, dist_eq_norm_vsub, vadd_vsub_vadd_cancel_right,`\n    -- `← sub_smul, norm_smul, vsub_eq_sub]`\n[GOAL]\nα : Type ?u.16780\nV : Type u_3\nP : Type u_1\nW : Type ?u.16789\nQ : Type ?u.16792\ninst✝⁸ : SeminormedAddCommGroup V\ninst✝⁷ : PseudoMetricSpace P\ninst✝⁶ : NormedAddTorsor V P\ninst✝⁵ : NormedAddCommGroup W\ninst✝⁴ : MetricSpace Q\ninst✝³ : NormedAddTorsor W Q\n𝕜 : Type u_2\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 V\ninst✝ : NormedSpace 𝕜 W\np₁ p₂ : P\nc₁ c₂ : 𝕜\n⊢ dist (↑(lineMap p₁ p₂) c₁) (↑(lineMap p₁ p₂) c₂) = dist c₁ c₂ * dist p₂ p₁\n[PROOFSTEP]\nrw [lineMap_apply, lineMap_apply, dist_eq_norm_vsub V, vadd_vsub_vadd_cancel_right, ← sub_smul, norm_smul, ←\n  vsub_eq_sub, ← dist_eq_norm_vsub V, ← dist_eq_norm_vsub 𝕜]\n[GOAL]\nα : Type ?u.28725\nV : Type u_3\nP : Type u_1\nW : Type ?u.28734\nQ : Type ?u.28737\ninst✝⁸ : SeminormedAddCommGroup V\ninst✝⁷ : PseudoMetricSpace P\ninst✝⁶ : NormedAddTorsor V P\ninst✝⁵ : NormedAddCommGroup W\ninst✝⁴ : MetricSpace Q\ninst✝³ : NormedAddTorsor W Q\n𝕜 : Type u_2\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 V\ninst✝ : NormedSpace 𝕜 W\np₁ p₂ : P\nc : 𝕜\n⊢ dist (↑(lineMap p₁ p₂) c) p₁ = ‖c‖ * dist p₁ p₂\n[PROOFSTEP]\nrw [← dist_zero_right, ← dist_lineMap_lineMap, lineMap_apply_zero]\n[GOAL]\nα : Type ?u.37626\nV : Type u_3\nP : Type u_1\nW : Type ?u.37635\nQ : Type ?u.37638\ninst✝⁸ : SeminormedAddCommGroup V\ninst✝⁷ : PseudoMetricSpace P\ninst✝⁶ : NormedAddTorsor V P\ninst✝⁵ : NormedAddCommGroup W\ninst✝⁴ : MetricSpace Q\ninst✝³ : NormedAddTorsor W Q\n𝕜 : Type u_2\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 V\ninst✝ : NormedSpace 𝕜 W\np₁ p₂ : P\nc : 𝕜\n⊢ dist (↑(lineMap p₁ p₂) c) p₂ = ‖1 - c‖ * dist p₁ p₂\n[PROOFSTEP]\nrw [← dist_eq_norm', ← dist_lineMap_lineMap, lineMap_apply_one]\n[GOAL]\nα : Type ?u.47659\nV : Type u_2\nP : Type u_1\nW : Type ?u.47668\nQ : Type ?u.47671\ninst✝⁸ : SeminormedAddCommGroup V\ninst✝⁷ : PseudoMetricSpace P\ninst✝⁶ : NormedAddTorsor V P\ninst✝⁵ : NormedAddCommGroup W\ninst✝⁴ : MetricSpace Q\ninst✝³ : NormedAddTorsor W Q\n𝕜 : Type u_3\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 V\ninst✝ : NormedSpace 𝕜 W\np₁ p₂ : P\nc : 𝕜\n⊢ dist (↑(homothety p₁ c) p₂) p₂ = ‖1 - c‖ * dist p₁ p₂\n[PROOFSTEP]\nrw [homothety_eq_lineMap, dist_lineMap_right]\n[GOAL]\nα : Type ?u.51220\nV : Type u_2\nP : Type u_1\nW : Type ?u.51229\nQ : Type ?u.51232\ninst✝⁸ : SeminormedAddCommGroup V\ninst✝⁷ : PseudoMetricSpace P\ninst✝⁶ : NormedAddTorsor V P\ninst✝⁵ : NormedAddCommGroup W\ninst✝⁴ : MetricSpace Q\ninst✝³ : NormedAddTorsor W Q\n𝕜 : Type u_3\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 V\ninst✝ : NormedSpace 𝕜 W\np₁ p₂ : P\nc : 𝕜\n⊢ dist p₂ (↑(homothety p₁ c) p₂) = ‖1 - c‖ * dist p₁ p₂\n[PROOFSTEP]\nrw [dist_comm, dist_homothety_self]\n[GOAL]\nα : Type ?u.54860\nV : Type u_2\nP : Type u_1\nW : Type ?u.54869\nQ : Type ?u.54872\ninst✝⁹ : SeminormedAddCommGroup V\ninst✝⁸ : PseudoMetricSpace P\ninst✝⁷ : NormedAddTorsor V P\ninst✝⁶ : NormedAddCommGroup W\ninst✝⁵ : MetricSpace Q\ninst✝⁴ : NormedAddTorsor W Q\n𝕜 : Type u_3\ninst✝³ : NormedField 𝕜\ninst✝² : NormedSpace 𝕜 V\ninst✝¹ : NormedSpace 𝕜 W\ninst✝ : Invertible 2\np₁ p₂ : P\n⊢ dist p₁ (midpoint 𝕜 p₁ p₂) = ‖2‖⁻¹ * dist p₁ p₂\n[PROOFSTEP]\nrw [midpoint, dist_comm, dist_lineMap_left, invOf_eq_inv, ← norm_inv]\n[GOAL]\nα : Type ?u.59357\nV : Type u_2\nP : Type u_1\nW : Type ?u.59366\nQ : Type ?u.59369\ninst✝⁹ : SeminormedAddCommGroup V\ninst✝⁸ : PseudoMetricSpace P\ninst✝⁷ : NormedAddTorsor V P\ninst✝⁶ : NormedAddCommGroup W\ninst✝⁵ : MetricSpace Q\ninst✝⁴ : NormedAddTorsor W Q\n𝕜 : Type u_3\ninst✝³ : NormedField 𝕜\ninst✝² : NormedSpace 𝕜 V\ninst✝¹ : NormedSpace 𝕜 W\ninst✝ : Invertible 2\np₁ p₂ : P\n⊢ dist (midpoint 𝕜 p₁ p₂) p₁ = ‖2‖⁻¹ * dist p₁ p₂\n[PROOFSTEP]\nrw [dist_comm, dist_left_midpoint]\n[GOAL]\nα : Type ?u.63410\nV : Type u_2\nP : Type u_1\nW : Type ?u.63419\nQ : Type ?u.63422\ninst✝⁹ : SeminormedAddCommGroup V\ninst✝⁸ : PseudoMetricSpace P\ninst✝⁷ : NormedAddTorsor V P\ninst✝⁶ : NormedAddCommGroup W\ninst✝⁵ : MetricSpace Q\ninst✝⁴ : NormedAddTorsor W Q\n𝕜 : Type u_3\ninst✝³ : NormedField 𝕜\ninst✝² : NormedSpace 𝕜 V\ninst✝¹ : NormedSpace 𝕜 W\ninst✝ : Invertible 2\np₁ p₂ : P\n⊢ dist (midpoint 𝕜 p₁ p₂) p₂ = ‖2‖⁻¹ * dist p₁ p₂\n[PROOFSTEP]\nrw [midpoint_comm, dist_midpoint_left, dist_comm]\n[GOAL]\nα : Type ?u.68130\nV : Type u_2\nP : Type u_1\nW : Type ?u.68139\nQ : Type ?u.68142\ninst✝⁹ : SeminormedAddCommGroup V\ninst✝⁸ : PseudoMetricSpace P\ninst✝⁷ : NormedAddTorsor V P\ninst✝⁶ : NormedAddCommGroup W\ninst✝⁵ : MetricSpace Q\ninst✝⁴ : NormedAddTorsor W Q\n𝕜 : Type u_3\ninst✝³ : NormedField 𝕜\ninst✝² : NormedSpace 𝕜 V\ninst✝¹ : NormedSpace 𝕜 W\ninst✝ : Invertible 2\np₁ p₂ : P\n⊢ dist p₂ (midpoint 𝕜 p₁ p₂) = ‖2‖⁻¹ * dist p₁ p₂\n[PROOFSTEP]\nrw [dist_comm, dist_midpoint_right]\n[GOAL]\nα : Type ?u.72183\nV : Type u_2\nP : Type u_1\nW : Type ?u.72192\nQ : Type ?u.72195\ninst✝⁹ : SeminormedAddCommGroup V\ninst✝⁸ : PseudoMetricSpace P\ninst✝⁷ : NormedAddTorsor V P\ninst✝⁶ : NormedAddCommGroup W\ninst✝⁵ : MetricSpace Q\ninst✝⁴ : NormedAddTorsor W Q\n𝕜 : Type u_3\ninst✝³ : NormedField 𝕜\ninst✝² : NormedSpace 𝕜 V\ninst✝¹ : NormedSpace 𝕜 W\ninst✝ : Invertible 2\np₁ p₂ p₃ p₄ : P\n⊢ dist (midpoint 𝕜 p₁ p₂) (midpoint 𝕜 p₃ p₄) ≤ (dist p₁ p₃ + dist p₂ p₄) / ‖2‖\n[PROOFSTEP]\nrw [dist_eq_norm_vsub V, dist_eq_norm_vsub V, dist_eq_norm_vsub V, midpoint_vsub_midpoint]\n[GOAL]\nα : Type ?u.72183\nV : Type u_2\nP : Type u_1\nW : Type ?u.72192\nQ : Type ?u.72195\ninst✝⁹ : SeminormedAddCommGroup V\ninst✝⁸ : PseudoMetricSpace P\ninst✝⁷ : NormedAddTorsor V P\ninst✝⁶ : NormedAddCommGroup W\ninst✝⁵ : MetricSpace Q\ninst✝⁴ : NormedAddTorsor W Q\n𝕜 : Type u_3\ninst✝³ : NormedField 𝕜\ninst✝² : NormedSpace 𝕜 V\ninst✝¹ : NormedSpace 𝕜 W\ninst✝ : Invertible 2\np₁ p₂ p₃ p₄ : P\n⊢ ‖midpoint 𝕜 (p₁ -ᵥ p₃) (p₂ -ᵥ p₄)‖ ≤ (‖p₁ -ᵥ p₃‖ + ‖p₂ -ᵥ p₄‖) / ‖2‖\n[PROOFSTEP]\ntry infer_instance\n[GOAL]\nα : Type ?u.72183\nV : Type u_2\nP : Type u_1\nW : Type ?u.72192\nQ : Type ?u.72195\ninst✝⁹ : SeminormedAddCommGroup V\ninst✝⁸ : PseudoMetricSpace P\ninst✝⁷ : NormedAddTorsor V P\ninst✝⁶ : NormedAddCommGroup W\ninst✝⁵ : MetricSpace Q\ninst✝⁴ : NormedAddTorsor W Q\n𝕜 : Type u_3\ninst✝³ : NormedField 𝕜\ninst✝² : NormedSpace 𝕜 V\ninst✝¹ : NormedSpace 𝕜 W\ninst✝ : Invertible 2\np₁ p₂ p₃ p₄ : P\n⊢ ‖midpoint 𝕜 (p₁ -ᵥ p₃) (p₂ -ᵥ p₄)‖ ≤ (‖p₁ -ᵥ p₃‖ + ‖p₂ -ᵥ p₄‖) / ‖2‖\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type ?u.72183\nV : Type u_2\nP : Type u_1\nW : Type ?u.72192\nQ : Type ?u.72195\ninst✝⁹ : SeminormedAddCommGroup V\ninst✝⁸ : PseudoMetricSpace P\ninst✝⁷ : NormedAddTorsor V P\ninst✝⁶ : NormedAddCommGroup W\ninst✝⁵ : MetricSpace Q\ninst✝⁴ : NormedAddTorsor W Q\n𝕜 : Type u_3\ninst✝³ : NormedField 𝕜\ninst✝² : NormedSpace 𝕜 V\ninst✝¹ : NormedSpace 𝕜 W\ninst✝ : Invertible 2\np₁ p₂ p₃ p₄ : P\n⊢ ‖midpoint 𝕜 (p₁ -ᵥ p₃) (p₂ -ᵥ p₄)‖ ≤ (‖p₁ -ᵥ p₃‖ + ‖p₂ -ᵥ p₄‖) / ‖2‖\n[PROOFSTEP]\nrw [midpoint_eq_smul_add, norm_smul, invOf_eq_inv, norm_inv, ← div_eq_inv_mul]\n[GOAL]\nα : Type ?u.72183\nV : Type u_2\nP : Type u_1\nW : Type ?u.72192\nQ : Type ?u.72195\ninst✝⁹ : SeminormedAddCommGroup V\ninst✝⁸ : PseudoMetricSpace P\ninst✝⁷ : NormedAddTorsor V P\ninst✝⁶ : NormedAddCommGroup W\ninst✝⁵ : MetricSpace Q\ninst✝⁴ : NormedAddTorsor W Q\n𝕜 : Type u_3\ninst✝³ : NormedField 𝕜\ninst✝² : NormedSpace 𝕜 V\ninst✝¹ : NormedSpace 𝕜 W\ninst✝ : Invertible 2\np₁ p₂ p₃ p₄ : P\n⊢ ‖p₁ -ᵥ p₃ + (p₂ -ᵥ p₄)‖ / ‖2‖ ≤ (‖p₁ -ᵥ p₃‖ + ‖p₂ -ᵥ p₄‖) / ‖2‖\n[PROOFSTEP]\nexact div_le_div_of_le_of_nonneg (norm_add_le _ _) (norm_nonneg _)\n[GOAL]\nα : Type ?u.79698\nV : Type u_2\nP : Type u_1\nW : Type ?u.79707\nQ : Type ?u.79710\ninst✝⁸ : SeminormedAddCommGroup V\ninst✝⁷ : PseudoMetricSpace P\ninst✝⁶ : NormedAddTorsor V P\ninst✝⁵ : NormedAddCommGroup W\ninst✝⁴ : MetricSpace Q\ninst✝³ : NormedAddTorsor W Q\n𝕜 : Type ?u.79957\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 V\ninst✝ : NormedSpace 𝕜 W\np q : P\n⊢ dist (↑(Equiv.pointReflection p) q) p = dist p q\n[PROOFSTEP]\nsimp [dist_eq_norm_vsub V, Equiv.pointReflection_vsub_left (G := V)]\n[GOAL]\nα : Type ?u.82730\nV : Type u_2\nP : Type u_1\nW : Type ?u.82739\nQ : Type ?u.82742\ninst✝⁸ : SeminormedAddCommGroup V\ninst✝⁷ : PseudoMetricSpace P\ninst✝⁶ : NormedAddTorsor V P\ninst✝⁵ : NormedAddCommGroup W\ninst✝⁴ : MetricSpace Q\ninst✝³ : NormedAddTorsor W Q\n𝕜 : Type u_3\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 V\ninst✝ : NormedSpace 𝕜 W\np q : P\n⊢ dist (↑(Equiv.pointReflection p) q) q = ‖2‖ * dist p q\n[PROOFSTEP]\nsimp [dist_eq_norm_vsub V, Equiv.pointReflection_vsub_right (G := V), nsmul_eq_smul_cast 𝕜, norm_smul]\n[GOAL]\nα : Type ?u.88928\nV : Type ?u.88931\nP : Type ?u.88934\nW : Type u_3\nQ : Type u_1\ninst✝⁸ : SeminormedAddCommGroup V\ninst✝⁷ : PseudoMetricSpace P\ninst✝⁶ : NormedAddTorsor V P\ninst✝⁵ : NormedAddCommGroup W\ninst✝⁴ : MetricSpace Q\ninst✝³ : NormedAddTorsor W Q\n𝕜 : Type u_2\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 V\ninst✝ : NormedSpace 𝕜 W\np₁ p₂ : Q\nh : p₁ ≠ p₂\nc₁ c₂ : 𝕜\n⊢ dist c₁ c₂ ≤ ↑(nndist p₁ p₂)⁻¹ * dist (↑(lineMap p₁ p₂) c₁) (↑(lineMap p₁ p₂) c₂)\n[PROOFSTEP]\nrw [dist_lineMap_lineMap, NNReal.coe_inv, ← dist_nndist, mul_left_comm, inv_mul_cancel (dist_ne_zero.2 h), mul_one]\n[GOAL]\nα : Type ?u.92785\nV : Type ?u.92788\nP : Type ?u.92791\nW : Type u_3\nQ : Type u_1\ninst✝⁸ : SeminormedAddCommGroup V\ninst✝⁷ : PseudoMetricSpace P\ninst✝⁶ : NormedAddTorsor V P\ninst✝⁵ : NormedAddCommGroup W\ninst✝⁴ : MetricSpace Q\ninst✝³ : NormedAddTorsor W Q\n𝕜 : Type u_2\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 V\ninst✝ : NormedSpace 𝕜 W\nx : Q\ns : Set Q\ny : Q\nhy : y ∈ interior s\n⊢ ∀ᶠ (δ : 𝕜) in 𝓝 1, ↑(homothety x δ) y ∈ s\n[PROOFSTEP]\nrw [(NormedAddCommGroup.nhds_basis_norm_lt (1 : 𝕜)).eventually_iff]\n[GOAL]\nα : Type ?u.92785\nV : Type ?u.92788\nP : Type ?u.92791\nW : Type u_3\nQ : Type u_1\ninst✝⁸ : SeminormedAddCommGroup V\ninst✝⁷ : PseudoMetricSpace P\ninst✝⁶ : NormedAddTorsor V P\ninst✝⁵ : NormedAddCommGroup W\ninst✝⁴ : MetricSpace Q\ninst✝³ : NormedAddTorsor W Q\n𝕜 : Type u_2\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 V\ninst✝ : NormedSpace 𝕜 W\nx : Q\ns : Set Q\ny : Q\nhy : y ∈ interior s\n⊢ ∃ i, 0 < i ∧ ∀ ⦃x_1 : 𝕜⦄, x_1 ∈ {y | ‖y - 1‖ < i} → ↑(homothety x x_1) y ∈ s\n[PROOFSTEP]\ncases' eq_or_ne y x with h h\n[GOAL]\ncase inl\nα : Type ?u.92785\nV : Type ?u.92788\nP : Type ?u.92791\nW : Type u_3\nQ : Type u_1\ninst✝⁸ : SeminormedAddCommGroup V\ninst✝⁷ : PseudoMetricSpace P\ninst✝⁶ : NormedAddTorsor V P\ninst✝⁵ : NormedAddCommGroup W\ninst✝⁴ : MetricSpace Q\ninst✝³ : NormedAddTorsor W Q\n𝕜 : Type u_2\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 V\ninst✝ : NormedSpace 𝕜 W\nx : Q\ns : Set Q\ny : Q\nhy : y ∈ interior s\nh : y = x\n⊢ ∃ i, 0 < i ∧ ∀ ⦃x_1 : 𝕜⦄, x_1 ∈ {y | ‖y - 1‖ < i} → ↑(homothety x x_1) y ∈ s\n[PROOFSTEP]\nuse 1\n[GOAL]\ncase h\nα : Type ?u.92785\nV : Type ?u.92788\nP : Type ?u.92791\nW : Type u_3\nQ : Type u_1\ninst✝⁸ : SeminormedAddCommGroup V\ninst✝⁷ : PseudoMetricSpace P\ninst✝⁶ : NormedAddTorsor V P\ninst✝⁵ : NormedAddCommGroup W\ninst✝⁴ : MetricSpace Q\ninst✝³ : NormedAddTorsor W Q\n𝕜 : Type u_2\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 V\ninst✝ : NormedSpace 𝕜 W\nx : Q\ns : Set Q\ny : Q\nhy : y ∈ interior s\nh : y = x\n⊢ 0 < 1 ∧ ∀ ⦃x_1 : 𝕜⦄, x_1 ∈ {y | ‖y - 1‖ < 1} → ↑(homothety x x_1) y ∈ s\n[PROOFSTEP]\nsimp [h.symm, interior_subset hy]\n[GOAL]\ncase inr\nα : Type ?u.92785\nV : Type ?u.92788\nP : Type ?u.92791\nW : Type u_3\nQ : Type u_1\ninst✝⁸ : SeminormedAddCommGroup V\ninst✝⁷ : PseudoMetricSpace P\ninst✝⁶ : NormedAddTorsor V P\ninst✝⁵ : NormedAddCommGroup W\ninst✝⁴ : MetricSpace Q\ninst✝³ : NormedAddTorsor W Q\n𝕜 : Type u_2\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 V\ninst✝ : NormedSpace 𝕜 W\nx : Q\ns : Set Q\ny : Q\nhy : y ∈ interior s\nh : y ≠ x\n⊢ ∃ i, 0 < i ∧ ∀ ⦃x_1 : 𝕜⦄, x_1 ∈ {y | ‖y - 1‖ < i} → ↑(homothety x x_1) y ∈ s\n[PROOFSTEP]\nhave hxy : 0 < ‖y -ᵥ x‖ := by rwa [norm_pos_iff, vsub_ne_zero]\n[GOAL]\nα : Type ?u.92785\nV : Type ?u.92788\nP : Type ?u.92791\nW : Type u_3\nQ : Type u_1\ninst✝⁸ : SeminormedAddCommGroup V\ninst✝⁷ : PseudoMetricSpace P\ninst✝⁶ : NormedAddTorsor V P\ninst✝⁵ : NormedAddCommGroup W\ninst✝⁴ : MetricSpace Q\ninst✝³ : NormedAddTorsor W Q\n𝕜 : Type u_2\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 V\ninst✝ : NormedSpace 𝕜 W\nx : Q\ns : Set Q\ny : Q\nhy : y ∈ interior s\nh : y ≠ x\n⊢ 0 < ‖y -ᵥ x‖\n[PROOFSTEP]\nrwa [norm_pos_iff, vsub_ne_zero]\n[GOAL]\ncase inr\nα : Type ?u.92785\nV : Type ?u.92788\nP : Type ?u.92791\nW : Type u_3\nQ : Type u_1\ninst✝⁸ : SeminormedAddCommGroup V\ninst✝⁷ : PseudoMetricSpace P\ninst✝⁶ : NormedAddTorsor V P\ninst✝⁵ : NormedAddCommGroup W\ninst✝⁴ : MetricSpace Q\ninst✝³ : NormedAddTorsor W Q\n𝕜 : Type u_2\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 V\ninst✝ : NormedSpace 𝕜 W\nx : Q\ns : Set Q\ny : Q\nhy : y ∈ interior s\nh : y ≠ x\nhxy : 0 < ‖y -ᵥ x‖\n⊢ ∃ i, 0 < i ∧ ∀ ⦃x_1 : 𝕜⦄, x_1 ∈ {y | ‖y - 1‖ < i} → ↑(homothety x x_1) y ∈ s\n[PROOFSTEP]\nobtain ⟨u, hu₁, hu₂, hu₃⟩ := mem_interior.mp hy\n[GOAL]\ncase inr.intro.intro.intro\nα : Type ?u.92785\nV : Type ?u.92788\nP : Type ?u.92791\nW : Type u_3\nQ : Type u_1\ninst✝⁸ : SeminormedAddCommGroup V\ninst✝⁷ : PseudoMetricSpace P\ninst✝⁶ : NormedAddTorsor V P\ninst✝⁵ : NormedAddCommGroup W\ninst✝⁴ : MetricSpace Q\ninst✝³ : NormedAddTorsor W Q\n𝕜 : Type u_2\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 V\ninst✝ : NormedSpace 𝕜 W\nx : Q\ns : Set Q\ny : Q\nhy : y ∈ interior s\nh : y ≠ x\nhxy : 0 < ‖y -ᵥ x‖\nu : Set Q\nhu₁ : u ⊆ s\nhu₂ : IsOpen u\nhu₃ : y ∈ u\n⊢ ∃ i, 0 < i ∧ ∀ ⦃x_1 : 𝕜⦄, x_1 ∈ {y | ‖y - 1‖ < i} → ↑(homothety x x_1) y ∈ s\n[PROOFSTEP]\nobtain ⟨ε, hε, hyε⟩ := Metric.isOpen_iff.mp hu₂ y hu₃\n[GOAL]\ncase inr.intro.intro.intro.intro.intro\nα : Type ?u.92785\nV : Type ?u.92788\nP : Type ?u.92791\nW : Type u_3\nQ : Type u_1\ninst✝⁸ : SeminormedAddCommGroup V\ninst✝⁷ : PseudoMetricSpace P\ninst✝⁶ : NormedAddTorsor V P\ninst✝⁵ : NormedAddCommGroup W\ninst✝⁴ : MetricSpace Q\ninst✝³ : NormedAddTorsor W Q\n𝕜 : Type u_2\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 V\ninst✝ : NormedSpace 𝕜 W\nx : Q\ns : Set Q\ny : Q\nhy : y ∈ interior s\nh : y ≠ x\nhxy : 0 < ‖y -ᵥ x‖\nu : Set Q\nhu₁ : u ⊆ s\nhu₂ : IsOpen u\nhu₃ : y ∈ u\nε : ℝ\nhε : ε > 0\nhyε : Metric.ball y ε ⊆ u\n⊢ ∃ i, 0 < i ∧ ∀ ⦃x_1 : 𝕜⦄, x_1 ∈ {y | ‖y - 1‖ < i} → ↑(homothety x x_1) y ∈ s\n[PROOFSTEP]\nrefine' ⟨ε / ‖y -ᵥ x‖, div_pos hε hxy, fun δ (hδ : ‖δ - 1‖ < ε / ‖y -ᵥ x‖) => hu₁ (hyε _)⟩\n[GOAL]\ncase inr.intro.intro.intro.intro.intro\nα : Type ?u.92785\nV : Type ?u.92788\nP : Type ?u.92791\nW : Type u_3\nQ : Type u_1\ninst✝⁸ : SeminormedAddCommGroup V\ninst✝⁷ : PseudoMetricSpace P\ninst✝⁶ : NormedAddTorsor V P\ninst✝⁵ : NormedAddCommGroup W\ninst✝⁴ : MetricSpace Q\ninst✝³ : NormedAddTorsor W Q\n𝕜 : Type u_2\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 V\ninst✝ : NormedSpace 𝕜 W\nx : Q\ns : Set Q\ny : Q\nhy : y ∈ interior s\nh : y ≠ x\nhxy : 0 < ‖y -ᵥ x‖\nu : Set Q\nhu₁ : u ⊆ s\nhu₂ : IsOpen u\nhu₃ : y ∈ u\nε : ℝ\nhε : ε > 0\nhyε : Metric.ball y ε ⊆ u\nδ : 𝕜\nhδ : ‖δ - 1‖ < ε / ‖y -ᵥ x‖\n⊢ ↑(homothety x δ) y ∈ Metric.ball y ε\n[PROOFSTEP]\nrw [lt_div_iff hxy, ← norm_smul, sub_smul, one_smul] at hδ \n[GOAL]\ncase inr.intro.intro.intro.intro.intro\nα : Type ?u.92785\nV : Type ?u.92788\nP : Type ?u.92791\nW : Type u_3\nQ : Type u_1\ninst✝⁸ : SeminormedAddCommGroup V\ninst✝⁷ : PseudoMetricSpace P\ninst✝⁶ : NormedAddTorsor V P\ninst✝⁵ : NormedAddCommGroup W\ninst✝⁴ : MetricSpace Q\ninst✝³ : NormedAddTorsor W Q\n𝕜 : Type u_2\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 V\ninst✝ : NormedSpace 𝕜 W\nx : Q\ns : Set Q\ny : Q\nhy : y ∈ interior s\nh : y ≠ x\nhxy : 0 < ‖y -ᵥ x‖\nu : Set Q\nhu₁ : u ⊆ s\nhu₂ : IsOpen u\nhu₃ : y ∈ u\nε : ℝ\nhε : ε > 0\nhyε : Metric.ball y ε ⊆ u\nδ : 𝕜\nhδ✝ : ‖δ - 1‖ * ‖y -ᵥ x‖ < ε\nhδ : ‖δ • (y -ᵥ x) - (y -ᵥ x)‖ < ε\n⊢ ↑(homothety x δ) y ∈ Metric.ball y ε\n[PROOFSTEP]\nrwa [homothety_apply, Metric.mem_ball, dist_eq_norm_vsub W, vadd_vsub_eq_sub_vsub]\n[GOAL]\nα : Type ?u.102650\nV : Type ?u.102653\nP : Type ?u.102656\nW : Type u_3\nQ : Type u_1\ninst✝⁸ : SeminormedAddCommGroup V\ninst✝⁷ : PseudoMetricSpace P\ninst✝⁶ : NormedAddTorsor V P\ninst✝⁵ : NormedAddCommGroup W\ninst✝⁴ : MetricSpace Q\ninst✝³ : NormedAddTorsor W Q\n𝕜 : Type u_2\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 V\ninst✝ : NormedSpace 𝕜 W\nx : Q\ns t : Set Q\nht : Set.Finite t\nh : t ⊆ interior s\n⊢ ∀ᶠ (δ : 𝕜) in 𝓝 1, ↑(homothety x δ) '' t ⊆ s\n[PROOFSTEP]\nsuffices ∀ y ∈ t, ∀ᶠ δ in 𝓝 (1 : 𝕜), homothety x δ y ∈ s\n  by\n  simp_rw [Set.image_subset_iff]\n  exact (Filter.eventually_all_finite ht).mpr this\n[GOAL]\nα : Type ?u.102650\nV : Type ?u.102653\nP : Type ?u.102656\nW : Type u_3\nQ : Type u_1\ninst✝⁸ : SeminormedAddCommGroup V\ninst✝⁷ : PseudoMetricSpace P\ninst✝⁶ : NormedAddTorsor V P\ninst✝⁵ : NormedAddCommGroup W\ninst✝⁴ : MetricSpace Q\ninst✝³ : NormedAddTorsor W Q\n𝕜 : Type u_2\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 V\ninst✝ : NormedSpace 𝕜 W\nx : Q\ns t : Set Q\nht : Set.Finite t\nh : t ⊆ interior s\nthis : ∀ (y : Q), y ∈ t → ∀ᶠ (δ : 𝕜) in 𝓝 1, ↑(homothety x δ) y ∈ s\n⊢ ∀ᶠ (δ : 𝕜) in 𝓝 1, ↑(homothety x δ) '' t ⊆ s\n[PROOFSTEP]\nsimp_rw [Set.image_subset_iff]\n[GOAL]\nα : Type ?u.102650\nV : Type ?u.102653\nP : Type ?u.102656\nW : Type u_3\nQ : Type u_1\ninst✝⁸ : SeminormedAddCommGroup V\ninst✝⁷ : PseudoMetricSpace P\ninst✝⁶ : NormedAddTorsor V P\ninst✝⁵ : NormedAddCommGroup W\ninst✝⁴ : MetricSpace Q\ninst✝³ : NormedAddTorsor W Q\n𝕜 : Type u_2\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 V\ninst✝ : NormedSpace 𝕜 W\nx : Q\ns t : Set Q\nht : Set.Finite t\nh : t ⊆ interior s\nthis : ∀ (y : Q), y ∈ t → ∀ᶠ (δ : 𝕜) in 𝓝 1, ↑(homothety x δ) y ∈ s\n⊢ ∀ᶠ (δ : 𝕜) in 𝓝 1, t ⊆ (fun a => ↑(homothety x δ) a) ⁻¹' s\n[PROOFSTEP]\nexact (Filter.eventually_all_finite ht).mpr this\n[GOAL]\nα : Type ?u.102650\nV : Type ?u.102653\nP : Type ?u.102656\nW : Type u_3\nQ : Type u_1\ninst✝⁸ : SeminormedAddCommGroup V\ninst✝⁷ : PseudoMetricSpace P\ninst✝⁶ : NormedAddTorsor V P\ninst✝⁵ : NormedAddCommGroup W\ninst✝⁴ : MetricSpace Q\ninst✝³ : NormedAddTorsor W Q\n𝕜 : Type u_2\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 V\ninst✝ : NormedSpace 𝕜 W\nx : Q\ns t : Set Q\nht : Set.Finite t\nh : t ⊆ interior s\n⊢ ∀ (y : Q), y ∈ t → ∀ᶠ (δ : 𝕜) in 𝓝 1, ↑(homothety x δ) y ∈ s\n[PROOFSTEP]\nintro y hy\n[GOAL]\nα : Type ?u.102650\nV : Type ?u.102653\nP : Type ?u.102656\nW : Type u_3\nQ : Type u_1\ninst✝⁸ : SeminormedAddCommGroup V\ninst✝⁷ : PseudoMetricSpace P\ninst✝⁶ : NormedAddTorsor V P\ninst✝⁵ : NormedAddCommGroup W\ninst✝⁴ : MetricSpace Q\ninst✝³ : NormedAddTorsor W Q\n𝕜 : Type u_2\ninst✝² : NormedField 𝕜\ninst✝¹ : NormedSpace 𝕜 V\ninst✝ : NormedSpace 𝕜 W\nx : Q\ns t : Set Q\nht : Set.Finite t\nh : t ⊆ interior s\ny : Q\nhy : y ∈ t\n⊢ ∀ᶠ (δ : 𝕜) in 𝓝 1, ↑(homothety x δ) y ∈ s\n[PROOFSTEP]\nexact eventually_homothety_mem_of_mem_interior 𝕜 x (h hy)\n[GOAL]\nα : Type ?u.107060\nV : Type u_1\nP : Type ?u.107066\nW : Type ?u.107069\nQ : Type ?u.107072\ninst✝⁷ : SeminormedAddCommGroup V\ninst✝⁶ : PseudoMetricSpace P\ninst✝⁵ : NormedAddTorsor V P\ninst✝⁴ : NormedAddCommGroup W\ninst✝³ : MetricSpace Q\ninst✝² : NormedAddTorsor W Q\ninst✝¹ : NormedSpace ℝ V\ninst✝ : NormedSpace ℝ W\np₁ p₂ p₃ p₄ : V\n⊢ dist (midpoint ℝ p₁ p₂) (midpoint ℝ p₃ p₄) ≤ (dist p₁ p₃ + dist p₂ p₄) / 2\n[PROOFSTEP]\nhave := dist_midpoint_midpoint_le' (𝕜 := ℝ) p₁ p₂ p₃ p₄\n[GOAL]\nα : Type ?u.107060\nV : Type u_1\nP : Type ?u.107066\nW : Type ?u.107069\nQ : Type ?u.107072\ninst✝⁷ : SeminormedAddCommGroup V\ninst✝⁶ : PseudoMetricSpace P\ninst✝⁵ : NormedAddTorsor V P\ninst✝⁴ : NormedAddCommGroup W\ninst✝³ : MetricSpace Q\ninst✝² : NormedAddTorsor W Q\ninst✝¹ : NormedSpace ℝ V\ninst✝ : NormedSpace ℝ W\np₁ p₂ p₃ p₄ : V\nthis : dist (midpoint ℝ p₁ p₂) (midpoint ℝ p₃ p₄) ≤ (dist p₁ p₃ + dist p₂ p₄) / ‖2‖\n⊢ dist (midpoint ℝ p₁ p₂) (midpoint ℝ p₃ p₄) ≤ (dist p₁ p₃ + dist p₂ p₄) / 2\n[PROOFSTEP]\nrw [Real.norm_eq_abs, abs_two] at this \n[GOAL]\nα : Type ?u.107060\nV : Type u_1\nP : Type ?u.107066\nW : Type ?u.107069\nQ : Type ?u.107072\ninst✝⁷ : SeminormedAddCommGroup V\ninst✝⁶ : PseudoMetricSpace P\ninst✝⁵ : NormedAddTorsor V P\ninst✝⁴ : NormedAddCommGroup W\ninst✝³ : MetricSpace Q\ninst✝² : NormedAddTorsor W Q\ninst✝¹ : NormedSpace ℝ V\ninst✝ : NormedSpace ℝ W\np₁ p₂ p₃ p₄ : V\nthis : dist (midpoint ℝ p₁ p₂) (midpoint ℝ p₃ p₄) ≤ (dist p₁ p₃ + dist p₂ p₄) / 2\n⊢ dist (midpoint ℝ p₁ p₂) (midpoint ℝ p₃ p₄) ≤ (dist p₁ p₃ + dist p₂ p₄) / 2\n[PROOFSTEP]\nexact this\n[GOAL]\nα : Type ?u.111434\nV : Type ?u.111437\nP : Type ?u.111440\nW : Type ?u.111443\nQ : Type ?u.111446\ninst✝⁷ : SeminormedAddCommGroup V\ninst✝⁶ : PseudoMetricSpace P\ninst✝⁵ : NormedAddTorsor V P\ninst✝⁴ : NormedAddCommGroup W\ninst✝³ : MetricSpace Q\ninst✝² : NormedAddTorsor W Q\ninst✝¹ : NormedSpace ℝ V\ninst✝ : NormedSpace ℝ W\nf : P → Q\nh : ∀ (x y : P), f (midpoint ℝ x y) = midpoint ℝ (f x) (f y)\nhfc : Continuous f\nc : P := Classical.arbitrary P\n⊢ (↑(AffineEquiv.symm (AffineEquiv.vaddConst ℝ (f c))) ∘ f ∘ ↑(AffineEquiv.vaddConst ℝ c)) 0 = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type ?u.111434\nV : Type ?u.111437\nP : Type ?u.111440\nW : Type ?u.111443\nQ : Type ?u.111446\ninst✝⁷ : SeminormedAddCommGroup V\ninst✝⁶ : PseudoMetricSpace P\ninst✝⁵ : NormedAddTorsor V P\ninst✝⁴ : NormedAddCommGroup W\ninst✝³ : MetricSpace Q\ninst✝² : NormedAddTorsor W Q\ninst✝¹ : NormedSpace ℝ V\ninst✝ : NormedSpace ℝ W\nf : P → Q\nh : ∀ (x y : P), f (midpoint ℝ x y) = midpoint ℝ (f x) (f y)\nhfc : Continuous f\nc : P := Classical.arbitrary P\nx y : V\n⊢ (↑(AffineEquiv.symm (AffineEquiv.vaddConst ℝ (f c))) ∘ f ∘ ↑(AffineEquiv.vaddConst ℝ c)) (midpoint ℝ x y) =\n    midpoint ℝ ((↑(AffineEquiv.symm (AffineEquiv.vaddConst ℝ (f c))) ∘ f ∘ ↑(AffineEquiv.vaddConst ℝ c)) x)\n      ((↑(AffineEquiv.symm (AffineEquiv.vaddConst ℝ (f c))) ∘ f ∘ ↑(AffineEquiv.vaddConst ℝ c)) y)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type ?u.111434\nV : Type ?u.111437\nP : Type ?u.111440\nW : Type ?u.111443\nQ : Type ?u.111446\ninst✝⁷ : SeminormedAddCommGroup V\ninst✝⁶ : PseudoMetricSpace P\ninst✝⁵ : NormedAddTorsor V P\ninst✝⁴ : NormedAddCommGroup W\ninst✝³ : MetricSpace Q\ninst✝² : NormedAddTorsor W Q\ninst✝¹ : NormedSpace ℝ V\ninst✝ : NormedSpace ℝ W\nf : P → Q\nh : ∀ (x y : P), f (midpoint ℝ x y) = midpoint ℝ (f x) (f y)\nhfc : Continuous f\nc : P := Classical.arbitrary P\nx y : V\n⊢ f (midpoint ℝ x y +ᵥ Classical.arbitrary P) -ᵥ f (Classical.arbitrary P) =\n    midpoint ℝ (f (x +ᵥ Classical.arbitrary P) -ᵥ f (Classical.arbitrary P))\n      (f (y +ᵥ Classical.arbitrary P) -ᵥ f (Classical.arbitrary P))\n[PROOFSTEP]\nconv_lhs => rw [(midpoint_self ℝ (Classical.arbitrary P)).symm, midpoint_vadd_midpoint, h, h, midpoint_vsub_midpoint]\n[GOAL]\nα : Type ?u.111434\nV : Type ?u.111437\nP : Type ?u.111440\nW : Type ?u.111443\nQ : Type ?u.111446\ninst✝⁷ : SeminormedAddCommGroup V\ninst✝⁶ : PseudoMetricSpace P\ninst✝⁵ : NormedAddTorsor V P\ninst✝⁴ : NormedAddCommGroup W\ninst✝³ : MetricSpace Q\ninst✝² : NormedAddTorsor W Q\ninst✝¹ : NormedSpace ℝ V\ninst✝ : NormedSpace ℝ W\nf : P → Q\nh : ∀ (x y : P), f (midpoint ℝ x y) = midpoint ℝ (f x) (f y)\nhfc : Continuous f\nc : P := Classical.arbitrary P\nx y : V\n| f (midpoint ℝ x y +ᵥ Classical.arbitrary P) -ᵥ f (Classical.arbitrary P)\n[PROOFSTEP]\nrw [(midpoint_self ℝ (Classical.arbitrary P)).symm, midpoint_vadd_midpoint, h, h, midpoint_vsub_midpoint]\n[GOAL]\nα : Type ?u.111434\nV : Type ?u.111437\nP : Type ?u.111440\nW : Type ?u.111443\nQ : Type ?u.111446\ninst✝⁷ : SeminormedAddCommGroup V\ninst✝⁶ : PseudoMetricSpace P\ninst✝⁵ : NormedAddTorsor V P\ninst✝⁴ : NormedAddCommGroup W\ninst✝³ : MetricSpace Q\ninst✝² : NormedAddTorsor W Q\ninst✝¹ : NormedSpace ℝ V\ninst✝ : NormedSpace ℝ W\nf : P → Q\nh : ∀ (x y : P), f (midpoint ℝ x y) = midpoint ℝ (f x) (f y)\nhfc : Continuous f\nc : P := Classical.arbitrary P\nx y : V\n| f (midpoint ℝ x y +ᵥ Classical.arbitrary P) -ᵥ f (Classical.arbitrary P)\n[PROOFSTEP]\nrw [(midpoint_self ℝ (Classical.arbitrary P)).symm, midpoint_vadd_midpoint, h, h, midpoint_vsub_midpoint]\n[GOAL]\nα : Type ?u.111434\nV : Type ?u.111437\nP : Type ?u.111440\nW : Type ?u.111443\nQ : Type ?u.111446\ninst✝⁷ : SeminormedAddCommGroup V\ninst✝⁶ : PseudoMetricSpace P\ninst✝⁵ : NormedAddTorsor V P\ninst✝⁴ : NormedAddCommGroup W\ninst✝³ : MetricSpace Q\ninst✝² : NormedAddTorsor W Q\ninst✝¹ : NormedSpace ℝ V\ninst✝ : NormedSpace ℝ W\nf : P → Q\nh : ∀ (x y : P), f (midpoint ℝ x y) = midpoint ℝ (f x) (f y)\nhfc : Continuous f\nc : P := Classical.arbitrary P\nx y : V\n| f (midpoint ℝ x y +ᵥ Classical.arbitrary P) -ᵥ f (Classical.arbitrary P)\n[PROOFSTEP]\nrw [(midpoint_self ℝ (Classical.arbitrary P)).symm, midpoint_vadd_midpoint, h, h, midpoint_vsub_midpoint]\n[GOAL]\nα : Type ?u.111434\nV : Type ?u.111437\nP : Type ?u.111440\nW : Type ?u.111443\nQ : Type ?u.111446\ninst✝⁷ : SeminormedAddCommGroup V\ninst✝⁶ : PseudoMetricSpace P\ninst✝⁵ : NormedAddTorsor V P\ninst✝⁴ : NormedAddCommGroup W\ninst✝³ : MetricSpace Q\ninst✝² : NormedAddTorsor W Q\ninst✝¹ : NormedSpace ℝ V\ninst✝ : NormedSpace ℝ W\nf : P → Q\nh : ∀ (x y : P), f (midpoint ℝ x y) = midpoint ℝ (f x) (f y)\nhfc : Continuous f\nc : P := Classical.arbitrary P\n⊢ Continuous\n    ↑(AddMonoidHom.ofMapMidpoint ℝ ℝ\n        (↑(AffineEquiv.symm (AffineEquiv.vaddConst ℝ (f c))) ∘ f ∘ ↑(AffineEquiv.vaddConst ℝ c))\n        (_ :\n          ↑(AffineEquiv.symm (AffineEquiv.vaddConst ℝ (f (Classical.arbitrary P)))) (f (0 +ᵥ Classical.arbitrary P)) =\n            0)\n        (_ :\n          ∀ (x y : V),\n            (↑(AffineEquiv.symm (AffineEquiv.vaddConst ℝ (f c))) ∘ f ∘ ↑(AffineEquiv.vaddConst ℝ c)) (midpoint ℝ x y) =\n              midpoint ℝ ((↑(AffineEquiv.symm (AffineEquiv.vaddConst ℝ (f c))) ∘ f ∘ ↑(AffineEquiv.vaddConst ℝ c)) x)\n                ((↑(AffineEquiv.symm (AffineEquiv.vaddConst ℝ (f c))) ∘ f ∘ ↑(AffineEquiv.vaddConst ℝ c)) y)))\n[PROOFSTEP]\napply_rules [Continuous.vadd, Continuous.vsub, continuous_const, hfc.comp, continuous_id]\n[GOAL]\nα : Type ?u.111434\nV : Type ?u.111437\nP : Type ?u.111440\nW : Type ?u.111443\nQ : Type ?u.111446\ninst✝⁷ : SeminormedAddCommGroup V\ninst✝⁶ : PseudoMetricSpace P\ninst✝⁵ : NormedAddTorsor V P\ninst✝⁴ : NormedAddCommGroup W\ninst✝³ : MetricSpace Q\ninst✝² : NormedAddTorsor W Q\ninst✝¹ : NormedSpace ℝ V\ninst✝ : NormedSpace ℝ W\nf : P → Q\nh : ∀ (x y : P), f (midpoint ℝ x y) = midpoint ℝ (f x) (f y)\nhfc : Continuous f\nc : P := Classical.arbitrary P\np : P\n⊢ f p =\n    ↑↑(AddMonoidHom.toRealLinearMap\n              (AddMonoidHom.ofMapMidpoint ℝ ℝ\n                (↑(AffineEquiv.symm (AffineEquiv.vaddConst ℝ (f c))) ∘ f ∘ ↑(AffineEquiv.vaddConst ℝ c))\n                (_ :\n                  ↑(AffineEquiv.symm (AffineEquiv.vaddConst ℝ (f (Classical.arbitrary P))))\n                      (f (0 +ᵥ Classical.arbitrary P)) =\n                    0)\n                (_ :\n                  ∀ (x y : V),\n                    (↑(AffineEquiv.symm (AffineEquiv.vaddConst ℝ (f c))) ∘ f ∘ ↑(AffineEquiv.vaddConst ℝ c))\n                        (midpoint ℝ x y) =\n                      midpoint ℝ\n                        ((↑(AffineEquiv.symm (AffineEquiv.vaddConst ℝ (f c))) ∘ f ∘ ↑(AffineEquiv.vaddConst ℝ c)) x)\n                        ((↑(AffineEquiv.symm (AffineEquiv.vaddConst ℝ (f c))) ∘ f ∘ ↑(AffineEquiv.vaddConst ℝ c)) y)))\n              (_ : Continuous ((fun i => (f ∘ ↑(AffineEquiv.vaddConst ℝ c)) i) -ᵥ fun i => f c)))\n        (p -ᵥ c) +ᵥ\n      f c\n[PROOFSTEP]\nsimp\n", "meta": {"mathlib_filename": "Mathlib.Analysis.NormedSpace.AddTorsor", "llama_tokens": 15993, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7853085808877581, "lm_q2_score": 0.6477982179521103, "lm_q1q2_score": 0.5087214992415904}}
{"text": "[GOAL]\nα : Type u_1\nb : ℂ\nhb : b ≠ 0\n⊢ (fun x => 0 ^ x) =ᶠ[𝓝 b] 0\n[PROOFSTEP]\nsuffices : ∀ᶠ x : ℂ in 𝓝 b, x ≠ 0\n[GOAL]\nα : Type u_1\nb : ℂ\nhb : b ≠ 0\nthis : ∀ᶠ (x : ℂ) in 𝓝 b, x ≠ 0\n⊢ (fun x => 0 ^ x) =ᶠ[𝓝 b] 0\ncase this α : Type u_1 b : ℂ hb : b ≠ 0 ⊢ ∀ᶠ (x : ℂ) in 𝓝 b, x ≠ 0\n[PROOFSTEP]\nexact\n  this.mono fun x hx => by\n    dsimp only\n    rw [zero_cpow hx, Pi.zero_apply]\n[GOAL]\nα : Type u_1\nb : ℂ\nhb : b ≠ 0\nthis : ∀ᶠ (x : ℂ) in 𝓝 b, x ≠ 0\nx : ℂ\nhx : x ≠ 0\n⊢ (fun x => 0 ^ x) x = OfNat.ofNat 0 x\n[PROOFSTEP]\ndsimp only\n[GOAL]\nα : Type u_1\nb : ℂ\nhb : b ≠ 0\nthis : ∀ᶠ (x : ℂ) in 𝓝 b, x ≠ 0\nx : ℂ\nhx : x ≠ 0\n⊢ 0 ^ x = OfNat.ofNat 0 x\n[PROOFSTEP]\nrw [zero_cpow hx, Pi.zero_apply]\n[GOAL]\ncase this\nα : Type u_1\nb : ℂ\nhb : b ≠ 0\n⊢ ∀ᶠ (x : ℂ) in 𝓝 b, x ≠ 0\n[PROOFSTEP]\nexact IsOpen.eventually_mem isOpen_ne hb\n[GOAL]\nα : Type u_1\na b : ℂ\nha : a ≠ 0\n⊢ (fun x => x ^ b) =ᶠ[𝓝 a] fun x => Complex.exp (Complex.log x * b)\n[PROOFSTEP]\nsuffices : ∀ᶠ x : ℂ in 𝓝 a, x ≠ 0\n[GOAL]\nα : Type u_1\na b : ℂ\nha : a ≠ 0\nthis : ∀ᶠ (x : ℂ) in 𝓝 a, x ≠ 0\n⊢ (fun x => x ^ b) =ᶠ[𝓝 a] fun x => Complex.exp (Complex.log x * b)\ncase this α : Type u_1 a b : ℂ ha : a ≠ 0 ⊢ ∀ᶠ (x : ℂ) in 𝓝 a, x ≠ 0\n[PROOFSTEP]\nexact\n  this.mono fun x hx => by\n    dsimp only\n    rw [cpow_def_of_ne_zero hx]\n[GOAL]\nα : Type u_1\na b : ℂ\nha : a ≠ 0\nthis : ∀ᶠ (x : ℂ) in 𝓝 a, x ≠ 0\nx : ℂ\nhx : x ≠ 0\n⊢ (fun x => x ^ b) x = (fun x => Complex.exp (Complex.log x * b)) x\n[PROOFSTEP]\ndsimp only\n[GOAL]\nα : Type u_1\na b : ℂ\nha : a ≠ 0\nthis : ∀ᶠ (x : ℂ) in 𝓝 a, x ≠ 0\nx : ℂ\nhx : x ≠ 0\n⊢ x ^ b = Complex.exp (Complex.log x * b)\n[PROOFSTEP]\nrw [cpow_def_of_ne_zero hx]\n[GOAL]\ncase this\nα : Type u_1\na b : ℂ\nha : a ≠ 0\n⊢ ∀ᶠ (x : ℂ) in 𝓝 a, x ≠ 0\n[PROOFSTEP]\nexact IsOpen.eventually_mem isOpen_ne ha\n[GOAL]\nα : Type u_1\np : ℂ × ℂ\nhp_fst : p.fst ≠ 0\n⊢ (fun x => x.fst ^ x.snd) =ᶠ[𝓝 p] fun x => Complex.exp (Complex.log x.fst * x.snd)\n[PROOFSTEP]\nsuffices : ∀ᶠ x : ℂ × ℂ in 𝓝 p, x.1 ≠ 0\n[GOAL]\nα : Type u_1\np : ℂ × ℂ\nhp_fst : p.fst ≠ 0\nthis : ∀ᶠ (x : ℂ × ℂ) in 𝓝 p, x.fst ≠ 0\n⊢ (fun x => x.fst ^ x.snd) =ᶠ[𝓝 p] fun x => Complex.exp (Complex.log x.fst * x.snd)\ncase this α : Type u_1 p : ℂ × ℂ hp_fst : p.fst ≠ 0 ⊢ ∀ᶠ (x : ℂ × ℂ) in 𝓝 p, x.fst ≠ 0\n[PROOFSTEP]\nexact\n  this.mono fun x hx => by\n    dsimp only\n    rw [cpow_def_of_ne_zero hx]\n[GOAL]\nα : Type u_1\np : ℂ × ℂ\nhp_fst : p.fst ≠ 0\nthis : ∀ᶠ (x : ℂ × ℂ) in 𝓝 p, x.fst ≠ 0\nx : ℂ × ℂ\nhx : x.fst ≠ 0\n⊢ (fun x => x.fst ^ x.snd) x = (fun x => Complex.exp (Complex.log x.fst * x.snd)) x\n[PROOFSTEP]\ndsimp only\n[GOAL]\nα : Type u_1\np : ℂ × ℂ\nhp_fst : p.fst ≠ 0\nthis : ∀ᶠ (x : ℂ × ℂ) in 𝓝 p, x.fst ≠ 0\nx : ℂ × ℂ\nhx : x.fst ≠ 0\n⊢ x.fst ^ x.snd = Complex.exp (Complex.log x.fst * x.snd)\n[PROOFSTEP]\nrw [cpow_def_of_ne_zero hx]\n[GOAL]\ncase this\nα : Type u_1\np : ℂ × ℂ\nhp_fst : p.fst ≠ 0\n⊢ ∀ᶠ (x : ℂ × ℂ) in 𝓝 p, x.fst ≠ 0\n[PROOFSTEP]\nrefine' IsOpen.eventually_mem _ hp_fst\n[GOAL]\ncase this\nα : Type u_1\np : ℂ × ℂ\nhp_fst : p.fst ≠ 0\n⊢ IsOpen fun x => x.fst = 0 → False\n[PROOFSTEP]\nchange IsOpen {x : ℂ × ℂ | x.1 = 0}ᶜ\n[GOAL]\ncase this\nα : Type u_1\np : ℂ × ℂ\nhp_fst : p.fst ≠ 0\n⊢ IsOpen {x | x.fst = 0}ᶜ\n[PROOFSTEP]\nrw [isOpen_compl_iff]\n[GOAL]\ncase this\nα : Type u_1\np : ℂ × ℂ\nhp_fst : p.fst ≠ 0\n⊢ IsClosed {x | x.fst = 0}\n[PROOFSTEP]\nexact isClosed_eq continuous_fst continuous_const\n[GOAL]\nα : Type u_1\na b : ℂ\nha : a ≠ 0\n⊢ ContinuousAt (fun x => a ^ x) b\n[PROOFSTEP]\nhave cpow_eq : (fun x : ℂ => a ^ x) = fun x => exp (log a * x) :=\n  by\n  ext1 b\n  rw [cpow_def_of_ne_zero ha]\n[GOAL]\nα : Type u_1\na b : ℂ\nha : a ≠ 0\n⊢ (fun x => a ^ x) = fun x => Complex.exp (Complex.log a * x)\n[PROOFSTEP]\next1 b\n[GOAL]\ncase h\nα : Type u_1\na b✝ : ℂ\nha : a ≠ 0\nb : ℂ\n⊢ a ^ b = Complex.exp (Complex.log a * b)\n[PROOFSTEP]\nrw [cpow_def_of_ne_zero ha]\n[GOAL]\nα : Type u_1\na b : ℂ\nha : a ≠ 0\ncpow_eq : (fun x => a ^ x) = fun x => Complex.exp (Complex.log a * x)\n⊢ ContinuousAt (fun x => a ^ x) b\n[PROOFSTEP]\nrw [cpow_eq]\n[GOAL]\nα : Type u_1\na b : ℂ\nha : a ≠ 0\ncpow_eq : (fun x => a ^ x) = fun x => Complex.exp (Complex.log a * x)\n⊢ ContinuousAt (fun x => Complex.exp (Complex.log a * x)) b\n[PROOFSTEP]\nexact continuous_exp.continuousAt.comp (ContinuousAt.mul continuousAt_const continuousAt_id)\n[GOAL]\nα : Type u_1\na b : ℂ\nh : b ≠ 0\n⊢ ContinuousAt (fun x => a ^ x) b\n[PROOFSTEP]\nby_cases ha : a = 0\n[GOAL]\ncase pos\nα : Type u_1\na b : ℂ\nh : b ≠ 0\nha : a = 0\n⊢ ContinuousAt (fun x => a ^ x) b\n[PROOFSTEP]\nrw [ha, continuousAt_congr (zero_cpow_eq_nhds h)]\n[GOAL]\ncase pos\nα : Type u_1\na b : ℂ\nh : b ≠ 0\nha : a = 0\n⊢ ContinuousAt 0 b\n[PROOFSTEP]\nexact continuousAt_const\n[GOAL]\ncase neg\nα : Type u_1\na b : ℂ\nh : b ≠ 0\nha : ¬a = 0\n⊢ ContinuousAt (fun x => a ^ x) b\n[PROOFSTEP]\nexact continuousAt_const_cpow ha\n[GOAL]\nα : Type u_1\np : ℂ × ℂ\nhp_fst : 0 < p.fst.re ∨ p.fst.im ≠ 0\n⊢ ContinuousAt (fun x => x.fst ^ x.snd) p\n[PROOFSTEP]\nhave hp_fst_ne_zero : p.fst ≠ 0 := by\n  intro h\n  cases' hp_fst with hp_fst hp_fst <;>\n    · rw [h] at hp_fst \n      simp at hp_fst \n[GOAL]\nα : Type u_1\np : ℂ × ℂ\nhp_fst : 0 < p.fst.re ∨ p.fst.im ≠ 0\n⊢ p.fst ≠ 0\n[PROOFSTEP]\nintro h\n[GOAL]\nα : Type u_1\np : ℂ × ℂ\nhp_fst : 0 < p.fst.re ∨ p.fst.im ≠ 0\nh : p.fst = 0\n⊢ False\n[PROOFSTEP]\ncases' hp_fst with hp_fst hp_fst\n[GOAL]\ncase inl\nα : Type u_1\np : ℂ × ℂ\nh : p.fst = 0\nhp_fst : 0 < p.fst.re\n⊢ False\n[PROOFSTEP]\nrw [h] at hp_fst \n[GOAL]\ncase inl\nα : Type u_1\np : ℂ × ℂ\nh : p.fst = 0\nhp_fst : 0 < 0.re\n⊢ False\n[PROOFSTEP]\nsimp at hp_fst \n[GOAL]\ncase inr\nα : Type u_1\np : ℂ × ℂ\nh : p.fst = 0\nhp_fst : p.fst.im ≠ 0\n⊢ False\n[PROOFSTEP]\nrw [h] at hp_fst \n[GOAL]\ncase inr\nα : Type u_1\np : ℂ × ℂ\nh : p.fst = 0\nhp_fst : 0.im ≠ 0\n⊢ False\n[PROOFSTEP]\nsimp at hp_fst \n[GOAL]\nα : Type u_1\np : ℂ × ℂ\nhp_fst : 0 < p.fst.re ∨ p.fst.im ≠ 0\nhp_fst_ne_zero : p.fst ≠ 0\n⊢ ContinuousAt (fun x => x.fst ^ x.snd) p\n[PROOFSTEP]\nrw [continuousAt_congr (cpow_eq_nhds' hp_fst_ne_zero)]\n[GOAL]\nα : Type u_1\np : ℂ × ℂ\nhp_fst : 0 < p.fst.re ∨ p.fst.im ≠ 0\nhp_fst_ne_zero : p.fst ≠ 0\n⊢ ContinuousAt (fun x => Complex.exp (Complex.log x.fst * x.snd)) p\n[PROOFSTEP]\nrefine' continuous_exp.continuousAt.comp _\n[GOAL]\nα : Type u_1\np : ℂ × ℂ\nhp_fst : 0 < p.fst.re ∨ p.fst.im ≠ 0\nhp_fst_ne_zero : p.fst ≠ 0\n⊢ ContinuousAt (fun x => Complex.log x.fst * x.snd) p\n[PROOFSTEP]\nexact\n  ContinuousAt.mul (ContinuousAt.comp (continuousAt_clog hp_fst) continuous_fst.continuousAt)\n    continuous_snd.continuousAt\n[GOAL]\nα : Type u_1\nl : Filter α\nf : α → ℂ\na b : ℂ\nhf : Tendsto f l (𝓝 b)\nh : a ≠ 0 ∨ b ≠ 0\n⊢ Tendsto (fun x => a ^ f x) l (𝓝 (a ^ b))\n[PROOFSTEP]\ncases h with\n| inl h => exact (continuousAt_const_cpow h).tendsto.comp hf\n| inr h => exact (continuousAt_const_cpow' h).tendsto.comp hf\n[GOAL]\nα : Type u_1\nl : Filter α\nf : α → ℂ\na b : ℂ\nhf : Tendsto f l (𝓝 b)\nh : a ≠ 0 ∨ b ≠ 0\n⊢ Tendsto (fun x => a ^ f x) l (𝓝 (a ^ b))\n[PROOFSTEP]\ncases h with\n| inl h => exact (continuousAt_const_cpow h).tendsto.comp hf\n| inr h => exact (continuousAt_const_cpow' h).tendsto.comp hf\n[GOAL]\ncase inl\nα : Type u_1\nl : Filter α\nf : α → ℂ\na b : ℂ\nhf : Tendsto f l (𝓝 b)\nh : a ≠ 0\n⊢ Tendsto (fun x => a ^ f x) l (𝓝 (a ^ b))\n[PROOFSTEP]\n\n| inl h => exact (continuousAt_const_cpow h).tendsto.comp hf\n[GOAL]\ncase inl\nα : Type u_1\nl : Filter α\nf : α → ℂ\na b : ℂ\nhf : Tendsto f l (𝓝 b)\nh : a ≠ 0\n⊢ Tendsto (fun x => a ^ f x) l (𝓝 (a ^ b))\n[PROOFSTEP]\nexact (continuousAt_const_cpow h).tendsto.comp hf\n[GOAL]\ncase inr\nα : Type u_1\nl : Filter α\nf : α → ℂ\na b : ℂ\nhf : Tendsto f l (𝓝 b)\nh : b ≠ 0\n⊢ Tendsto (fun x => a ^ f x) l (𝓝 (a ^ b))\n[PROOFSTEP]\n\n| inr h => exact (continuousAt_const_cpow' h).tendsto.comp hf\n[GOAL]\ncase inr\nα : Type u_1\nl : Filter α\nf : α → ℂ\na b : ℂ\nhf : Tendsto f l (𝓝 b)\nh : b ≠ 0\n⊢ Tendsto (fun x => a ^ f x) l (𝓝 (a ^ b))\n[PROOFSTEP]\nexact (continuousAt_const_cpow' h).tendsto.comp hf\n[GOAL]\na b : ℝ\nh : a ≠ 0\n⊢ ContinuousAt (rpow a) b\n[PROOFSTEP]\nhave : rpow a = fun x : ℝ => ((a : ℂ) ^ (x : ℂ)).re := by\n  ext1 x\n  rw [rpow_eq_pow, rpow_def]\n[GOAL]\na b : ℝ\nh : a ≠ 0\n⊢ rpow a = fun x => (↑a ^ ↑x).re\n[PROOFSTEP]\next1 x\n[GOAL]\ncase h\na b : ℝ\nh : a ≠ 0\nx : ℝ\n⊢ rpow a x = (↑a ^ ↑x).re\n[PROOFSTEP]\nrw [rpow_eq_pow, rpow_def]\n[GOAL]\na b : ℝ\nh : a ≠ 0\nthis : rpow a = fun x => (↑a ^ ↑x).re\n⊢ ContinuousAt (rpow a) b\n[PROOFSTEP]\nrw [this]\n[GOAL]\na b : ℝ\nh : a ≠ 0\nthis : rpow a = fun x => (↑a ^ ↑x).re\n⊢ ContinuousAt (fun x => (↑a ^ ↑x).re) b\n[PROOFSTEP]\nrefine' Complex.continuous_re.continuousAt.comp _\n[GOAL]\na b : ℝ\nh : a ≠ 0\nthis : rpow a = fun x => (↑a ^ ↑x).re\n⊢ ContinuousAt (fun x => ↑a ^ ↑x) b\n[PROOFSTEP]\nrefine' (continuousAt_const_cpow _).comp Complex.continuous_ofReal.continuousAt\n[GOAL]\na b : ℝ\nh : a ≠ 0\nthis : rpow a = fun x => (↑a ^ ↑x).re\n⊢ ↑a ≠ 0\n[PROOFSTEP]\nnorm_cast\n[GOAL]\na b : ℝ\nh : b ≠ 0\n⊢ ContinuousAt (rpow a) b\n[PROOFSTEP]\nhave : rpow a = fun x : ℝ => ((a : ℂ) ^ (x : ℂ)).re := by\n  ext1 x\n  rw [rpow_eq_pow, rpow_def]\n[GOAL]\na b : ℝ\nh : b ≠ 0\n⊢ rpow a = fun x => (↑a ^ ↑x).re\n[PROOFSTEP]\next1 x\n[GOAL]\ncase h\na b : ℝ\nh : b ≠ 0\nx : ℝ\n⊢ rpow a x = (↑a ^ ↑x).re\n[PROOFSTEP]\nrw [rpow_eq_pow, rpow_def]\n[GOAL]\na b : ℝ\nh : b ≠ 0\nthis : rpow a = fun x => (↑a ^ ↑x).re\n⊢ ContinuousAt (rpow a) b\n[PROOFSTEP]\nrw [this]\n[GOAL]\na b : ℝ\nh : b ≠ 0\nthis : rpow a = fun x => (↑a ^ ↑x).re\n⊢ ContinuousAt (fun x => (↑a ^ ↑x).re) b\n[PROOFSTEP]\nrefine' Complex.continuous_re.continuousAt.comp _\n[GOAL]\na b : ℝ\nh : b ≠ 0\nthis : rpow a = fun x => (↑a ^ ↑x).re\n⊢ ContinuousAt (fun x => ↑a ^ ↑x) b\n[PROOFSTEP]\nrefine' (continuousAt_const_cpow' _).comp Complex.continuous_ofReal.continuousAt\n[GOAL]\na b : ℝ\nh : b ≠ 0\nthis : rpow a = fun x => (↑a ^ ↑x).re\n⊢ ↑b ≠ 0\n[PROOFSTEP]\nnorm_cast\n[GOAL]\np : ℝ × ℝ\nhp_fst : p.fst < 0\n⊢ (fun x => x.fst ^ x.snd) =ᶠ[𝓝 p] fun x => exp (log x.fst * x.snd) * cos (x.snd * π)\n[PROOFSTEP]\nsuffices : ∀ᶠ x : ℝ × ℝ in 𝓝 p, x.1 < 0\n[GOAL]\np : ℝ × ℝ\nhp_fst : p.fst < 0\nthis : ∀ᶠ (x : ℝ × ℝ) in 𝓝 p, x.fst < 0\n⊢ (fun x => x.fst ^ x.snd) =ᶠ[𝓝 p] fun x => exp (log x.fst * x.snd) * cos (x.snd * π)\ncase this p : ℝ × ℝ hp_fst : p.fst < 0 ⊢ ∀ᶠ (x : ℝ × ℝ) in 𝓝 p, x.fst < 0\n[PROOFSTEP]\nexact\n  this.mono fun x hx => by\n    dsimp only\n    rw [rpow_def_of_neg hx]\n[GOAL]\np : ℝ × ℝ\nhp_fst : p.fst < 0\nthis : ∀ᶠ (x : ℝ × ℝ) in 𝓝 p, x.fst < 0\nx : ℝ × ℝ\nhx : x.fst < 0\n⊢ (fun x => x.fst ^ x.snd) x = (fun x => exp (log x.fst * x.snd) * cos (x.snd * π)) x\n[PROOFSTEP]\ndsimp only\n[GOAL]\np : ℝ × ℝ\nhp_fst : p.fst < 0\nthis : ∀ᶠ (x : ℝ × ℝ) in 𝓝 p, x.fst < 0\nx : ℝ × ℝ\nhx : x.fst < 0\n⊢ x.fst ^ x.snd = exp (log x.fst * x.snd) * cos (x.snd * π)\n[PROOFSTEP]\nrw [rpow_def_of_neg hx]\n[GOAL]\ncase this\np : ℝ × ℝ\nhp_fst : p.fst < 0\n⊢ ∀ᶠ (x : ℝ × ℝ) in 𝓝 p, x.fst < 0\n[PROOFSTEP]\nexact IsOpen.eventually_mem (isOpen_lt continuous_fst continuous_const) hp_fst\n[GOAL]\np : ℝ × ℝ\nhp_fst : 0 < p.fst\n⊢ (fun x => x.fst ^ x.snd) =ᶠ[𝓝 p] fun x => exp (log x.fst * x.snd)\n[PROOFSTEP]\nsuffices : ∀ᶠ x : ℝ × ℝ in 𝓝 p, 0 < x.1\n[GOAL]\np : ℝ × ℝ\nhp_fst : 0 < p.fst\nthis : ∀ᶠ (x : ℝ × ℝ) in 𝓝 p, 0 < x.fst\n⊢ (fun x => x.fst ^ x.snd) =ᶠ[𝓝 p] fun x => exp (log x.fst * x.snd)\ncase this p : ℝ × ℝ hp_fst : 0 < p.fst ⊢ ∀ᶠ (x : ℝ × ℝ) in 𝓝 p, 0 < x.fst\n[PROOFSTEP]\nexact\n  this.mono fun x hx => by\n    dsimp only\n    rw [rpow_def_of_pos hx]\n[GOAL]\np : ℝ × ℝ\nhp_fst : 0 < p.fst\nthis : ∀ᶠ (x : ℝ × ℝ) in 𝓝 p, 0 < x.fst\nx : ℝ × ℝ\nhx : 0 < x.fst\n⊢ (fun x => x.fst ^ x.snd) x = (fun x => exp (log x.fst * x.snd)) x\n[PROOFSTEP]\ndsimp only\n[GOAL]\np : ℝ × ℝ\nhp_fst : 0 < p.fst\nthis : ∀ᶠ (x : ℝ × ℝ) in 𝓝 p, 0 < x.fst\nx : ℝ × ℝ\nhx : 0 < x.fst\n⊢ x.fst ^ x.snd = exp (log x.fst * x.snd)\n[PROOFSTEP]\nrw [rpow_def_of_pos hx]\n[GOAL]\ncase this\np : ℝ × ℝ\nhp_fst : 0 < p.fst\n⊢ ∀ᶠ (x : ℝ × ℝ) in 𝓝 p, 0 < x.fst\n[PROOFSTEP]\nexact IsOpen.eventually_mem (isOpen_lt continuous_const continuous_fst) hp_fst\n[GOAL]\np : ℝ × ℝ\nhp : p.fst ≠ 0\n⊢ ContinuousAt (fun p => p.fst ^ p.snd) p\n[PROOFSTEP]\nrw [ne_iff_lt_or_gt] at hp \n[GOAL]\np : ℝ × ℝ\nhp✝ : p.fst ≠ 0\nhp : p.fst < 0 ∨ p.fst > 0\n⊢ ContinuousAt (fun p => p.fst ^ p.snd) p\n[PROOFSTEP]\ncases hp with\n| inl hp =>\n  rw [continuousAt_congr (rpow_eq_nhds_of_neg hp)]\n  refine' ContinuousAt.mul _ (continuous_cos.continuousAt.comp _)\n  · refine' continuous_exp.continuousAt.comp (ContinuousAt.mul _ continuous_snd.continuousAt)\n    refine' (continuousAt_log _).comp continuous_fst.continuousAt\n    exact hp.ne\n  · exact continuous_snd.continuousAt.mul continuousAt_const\n| inr hp =>\n  rw [continuousAt_congr (rpow_eq_nhds_of_pos hp)]\n  refine' continuous_exp.continuousAt.comp (ContinuousAt.mul _ continuous_snd.continuousAt)\n  refine' (continuousAt_log _).comp continuous_fst.continuousAt\n  exact hp.lt.ne.symm\n[GOAL]\np : ℝ × ℝ\nhp✝ : p.fst ≠ 0\nhp : p.fst < 0 ∨ p.fst > 0\n⊢ ContinuousAt (fun p => p.fst ^ p.snd) p\n[PROOFSTEP]\ncases hp with\n| inl hp =>\n  rw [continuousAt_congr (rpow_eq_nhds_of_neg hp)]\n  refine' ContinuousAt.mul _ (continuous_cos.continuousAt.comp _)\n  · refine' continuous_exp.continuousAt.comp (ContinuousAt.mul _ continuous_snd.continuousAt)\n    refine' (continuousAt_log _).comp continuous_fst.continuousAt\n    exact hp.ne\n  · exact continuous_snd.continuousAt.mul continuousAt_const\n| inr hp =>\n  rw [continuousAt_congr (rpow_eq_nhds_of_pos hp)]\n  refine' continuous_exp.continuousAt.comp (ContinuousAt.mul _ continuous_snd.continuousAt)\n  refine' (continuousAt_log _).comp continuous_fst.continuousAt\n  exact hp.lt.ne.symm\n[GOAL]\ncase inl\np : ℝ × ℝ\nhp✝ : p.fst ≠ 0\nhp : p.fst < 0\n⊢ ContinuousAt (fun p => p.fst ^ p.snd) p\n[PROOFSTEP]\n\n| inl hp =>\n  rw [continuousAt_congr (rpow_eq_nhds_of_neg hp)]\n  refine' ContinuousAt.mul _ (continuous_cos.continuousAt.comp _)\n  · refine' continuous_exp.continuousAt.comp (ContinuousAt.mul _ continuous_snd.continuousAt)\n    refine' (continuousAt_log _).comp continuous_fst.continuousAt\n    exact hp.ne\n  · exact continuous_snd.continuousAt.mul continuousAt_const\n[GOAL]\ncase inl\np : ℝ × ℝ\nhp✝ : p.fst ≠ 0\nhp : p.fst < 0\n⊢ ContinuousAt (fun p => p.fst ^ p.snd) p\n[PROOFSTEP]\nrw [continuousAt_congr (rpow_eq_nhds_of_neg hp)]\n[GOAL]\ncase inl\np : ℝ × ℝ\nhp✝ : p.fst ≠ 0\nhp : p.fst < 0\n⊢ ContinuousAt (fun x => exp (log x.fst * x.snd) * cos (x.snd * π)) p\n[PROOFSTEP]\nrefine' ContinuousAt.mul _ (continuous_cos.continuousAt.comp _)\n[GOAL]\ncase inl.refine'_1\np : ℝ × ℝ\nhp✝ : p.fst ≠ 0\nhp : p.fst < 0\n⊢ ContinuousAt (fun x => exp (log x.fst * x.snd)) p\n[PROOFSTEP]\nrefine' continuous_exp.continuousAt.comp (ContinuousAt.mul _ continuous_snd.continuousAt)\n[GOAL]\ncase inl.refine'_1\np : ℝ × ℝ\nhp✝ : p.fst ≠ 0\nhp : p.fst < 0\n⊢ ContinuousAt (fun x => log x.fst) p\n[PROOFSTEP]\nrefine' (continuousAt_log _).comp continuous_fst.continuousAt\n[GOAL]\ncase inl.refine'_1\np : ℝ × ℝ\nhp✝ : p.fst ≠ 0\nhp : p.fst < 0\n⊢ p.fst ≠ 0\n[PROOFSTEP]\nexact hp.ne\n[GOAL]\ncase inl.refine'_2\np : ℝ × ℝ\nhp✝ : p.fst ≠ 0\nhp : p.fst < 0\n⊢ ContinuousAt (fun x => x.snd * π) p\n[PROOFSTEP]\nexact continuous_snd.continuousAt.mul continuousAt_const\n[GOAL]\ncase inr\np : ℝ × ℝ\nhp✝ : p.fst ≠ 0\nhp : p.fst > 0\n⊢ ContinuousAt (fun p => p.fst ^ p.snd) p\n[PROOFSTEP]\n\n| inr hp =>\n  rw [continuousAt_congr (rpow_eq_nhds_of_pos hp)]\n  refine' continuous_exp.continuousAt.comp (ContinuousAt.mul _ continuous_snd.continuousAt)\n  refine' (continuousAt_log _).comp continuous_fst.continuousAt\n  exact hp.lt.ne.symm\n[GOAL]\ncase inr\np : ℝ × ℝ\nhp✝ : p.fst ≠ 0\nhp : p.fst > 0\n⊢ ContinuousAt (fun p => p.fst ^ p.snd) p\n[PROOFSTEP]\nrw [continuousAt_congr (rpow_eq_nhds_of_pos hp)]\n[GOAL]\ncase inr\np : ℝ × ℝ\nhp✝ : p.fst ≠ 0\nhp : p.fst > 0\n⊢ ContinuousAt (fun x => exp (log x.fst * x.snd)) p\n[PROOFSTEP]\nrefine' continuous_exp.continuousAt.comp (ContinuousAt.mul _ continuous_snd.continuousAt)\n[GOAL]\ncase inr\np : ℝ × ℝ\nhp✝ : p.fst ≠ 0\nhp : p.fst > 0\n⊢ ContinuousAt (fun x => log x.fst) p\n[PROOFSTEP]\nrefine' (continuousAt_log _).comp continuous_fst.continuousAt\n[GOAL]\ncase inr\np : ℝ × ℝ\nhp✝ : p.fst ≠ 0\nhp : p.fst > 0\n⊢ p.fst ≠ 0\n[PROOFSTEP]\nexact hp.lt.ne.symm\n[GOAL]\np : ℝ × ℝ\nhp : 0 < p.snd\n⊢ ContinuousAt (fun p => p.fst ^ p.snd) p\n[PROOFSTEP]\ncases' p with x y\n[GOAL]\ncase mk\nx y : ℝ\nhp : 0 < (x, y).snd\n⊢ ContinuousAt (fun p => p.fst ^ p.snd) (x, y)\n[PROOFSTEP]\ndsimp only at hp \n[GOAL]\ncase mk\nx y : ℝ\nhp : 0 < y\n⊢ ContinuousAt (fun p => p.fst ^ p.snd) (x, y)\n[PROOFSTEP]\nobtain hx | rfl := ne_or_eq x 0\n[GOAL]\ncase mk.inl\nx y : ℝ\nhp : 0 < y\nhx : x ≠ 0\n⊢ ContinuousAt (fun p => p.fst ^ p.snd) (x, y)\n[PROOFSTEP]\nexact continuousAt_rpow_of_ne (x, y) hx\n[GOAL]\ncase mk.inr\ny : ℝ\nhp : 0 < y\n⊢ ContinuousAt (fun p => p.fst ^ p.snd) (0, y)\n[PROOFSTEP]\nhave A : Tendsto (fun p : ℝ × ℝ => exp (log p.1 * p.2)) (𝓝[≠] 0 ×ˢ 𝓝 y) (𝓝 0) :=\n  tendsto_exp_atBot.comp ((tendsto_log_nhdsWithin_zero.comp tendsto_fst).atBot_mul hp tendsto_snd)\n[GOAL]\ncase mk.inr\ny : ℝ\nhp : 0 < y\nA : Tendsto (fun p => exp (log p.fst * p.snd)) (𝓝[{0}ᶜ] 0 ×ˢ 𝓝 y) (𝓝 0)\n⊢ ContinuousAt (fun p => p.fst ^ p.snd) (0, y)\n[PROOFSTEP]\nhave B : Tendsto (fun p : ℝ × ℝ => p.1 ^ p.2) (𝓝[≠] 0 ×ˢ 𝓝 y) (𝓝 0) :=\n  squeeze_zero_norm (fun p => abs_rpow_le_exp_log_mul p.1 p.2) A\n[GOAL]\ncase mk.inr\ny : ℝ\nhp : 0 < y\nA : Tendsto (fun p => exp (log p.fst * p.snd)) (𝓝[{0}ᶜ] 0 ×ˢ 𝓝 y) (𝓝 0)\nB : Tendsto (fun p => p.fst ^ p.snd) (𝓝[{0}ᶜ] 0 ×ˢ 𝓝 y) (𝓝 0)\n⊢ ContinuousAt (fun p => p.fst ^ p.snd) (0, y)\n[PROOFSTEP]\nhave C : Tendsto (fun p : ℝ × ℝ => p.1 ^ p.2) (𝓝[{0}] 0 ×ˢ 𝓝 y) (pure 0) :=\n  by\n  rw [nhdsWithin_singleton, tendsto_pure, pure_prod, eventually_map]\n  exact (lt_mem_nhds hp).mono fun y hy => zero_rpow hy.ne'\n[GOAL]\ny : ℝ\nhp : 0 < y\nA : Tendsto (fun p => exp (log p.fst * p.snd)) (𝓝[{0}ᶜ] 0 ×ˢ 𝓝 y) (𝓝 0)\nB : Tendsto (fun p => p.fst ^ p.snd) (𝓝[{0}ᶜ] 0 ×ˢ 𝓝 y) (𝓝 0)\n⊢ Tendsto (fun p => p.fst ^ p.snd) (𝓝[{0}] 0 ×ˢ 𝓝 y) (pure 0)\n[PROOFSTEP]\nrw [nhdsWithin_singleton, tendsto_pure, pure_prod, eventually_map]\n[GOAL]\ny : ℝ\nhp : 0 < y\nA : Tendsto (fun p => exp (log p.fst * p.snd)) (𝓝[{0}ᶜ] 0 ×ˢ 𝓝 y) (𝓝 0)\nB : Tendsto (fun p => p.fst ^ p.snd) (𝓝[{0}ᶜ] 0 ×ˢ 𝓝 y) (𝓝 0)\n⊢ ∀ᶠ (a : ℝ) in 𝓝 y, (0, a).fst ^ (0, a).snd = 0\n[PROOFSTEP]\nexact (lt_mem_nhds hp).mono fun y hy => zero_rpow hy.ne'\n[GOAL]\ncase mk.inr\ny : ℝ\nhp : 0 < y\nA : Tendsto (fun p => exp (log p.fst * p.snd)) (𝓝[{0}ᶜ] 0 ×ˢ 𝓝 y) (𝓝 0)\nB : Tendsto (fun p => p.fst ^ p.snd) (𝓝[{0}ᶜ] 0 ×ˢ 𝓝 y) (𝓝 0)\nC : Tendsto (fun p => p.fst ^ p.snd) (𝓝[{0}] 0 ×ˢ 𝓝 y) (pure 0)\n⊢ ContinuousAt (fun p => p.fst ^ p.snd) (0, y)\n[PROOFSTEP]\nsimpa only [← sup_prod, ← nhdsWithin_union, compl_union_self, nhdsWithin_univ, nhds_prod_eq, ContinuousAt,\n  zero_rpow hp.ne'] using B.sup (C.mono_right (pure_le_nhds _))\n[GOAL]\nx q : ℝ\nh : x ≠ 0 ∨ 0 < q\n⊢ ContinuousAt (fun x => x ^ q) x\n[PROOFSTEP]\nchange ContinuousAt ((fun p : ℝ × ℝ => p.1 ^ p.2) ∘ fun y : ℝ => (y, q)) x\n[GOAL]\nx q : ℝ\nh : x ≠ 0 ∨ 0 < q\n⊢ ContinuousAt ((fun p => p.fst ^ p.snd) ∘ fun y => (y, q)) x\n[PROOFSTEP]\napply ContinuousAt.comp\n[GOAL]\ncase hg\nx q : ℝ\nh : x ≠ 0 ∨ 0 < q\n⊢ ContinuousAt (fun p => p.fst ^ p.snd) (x, q)\n[PROOFSTEP]\nexact continuousAt_rpow (x, q) h\n[GOAL]\ncase hf\nx q : ℝ\nh : x ≠ 0 ∨ 0 < q\n⊢ ContinuousAt (fun y => (y, q)) x\n[PROOFSTEP]\nexact (continuous_id'.prod_mk continuous_const).continuousAt\n[GOAL]\nα : Type u_1\nl : Filter α\nf : α → ℝ\nx p : ℝ\nhf : Tendsto f l (𝓝 x)\nh : x ≠ 0 ∨ 0 ≤ p\nh0 : 0 = p\n⊢ Tendsto (fun a => f a ^ 0) l (𝓝 (x ^ 0))\n[PROOFSTEP]\nsimp [tendsto_const_nhds]\n[GOAL]\nz : ℂ\nhz : 0 < z.re\n⊢ ContinuousAt (fun x => x.fst ^ x.snd) (0, z)\n[PROOFSTEP]\nhave hz₀ : z ≠ 0 := ne_of_apply_ne re hz.ne'\n[GOAL]\nz : ℂ\nhz : 0 < z.re\nhz₀ : z ≠ 0\n⊢ ContinuousAt (fun x => x.fst ^ x.snd) (0, z)\n[PROOFSTEP]\nrw [ContinuousAt, zero_cpow hz₀, tendsto_zero_iff_norm_tendsto_zero]\n[GOAL]\nz : ℂ\nhz : 0 < z.re\nhz₀ : z ≠ 0\n⊢ Tendsto (fun e => ‖e.fst ^ e.snd‖) (𝓝 (0, z)) (𝓝 0)\n[PROOFSTEP]\nrefine' squeeze_zero (fun _ => norm_nonneg _) (fun _ => abs_cpow_le _ _) _\n[GOAL]\nz : ℂ\nhz : 0 < z.re\nhz₀ : z ≠ 0\n⊢ Tendsto (fun x => ↑abs x.fst ^ x.snd.re / Real.exp (arg x.fst * x.snd.im)) (𝓝 (0, z)) (𝓝 0)\n[PROOFSTEP]\nsimp only [div_eq_mul_inv, ← Real.exp_neg]\n[GOAL]\nz : ℂ\nhz : 0 < z.re\nhz₀ : z ≠ 0\n⊢ Tendsto (fun x => ↑abs x.fst ^ x.snd.re * Real.exp (-(arg x.fst * x.snd.im))) (𝓝 (0, z)) (𝓝 0)\n[PROOFSTEP]\nrefine' Tendsto.zero_mul_isBoundedUnder_le _ _\n[GOAL]\ncase refine'_1\nz : ℂ\nhz : 0 < z.re\nhz₀ : z ≠ 0\n⊢ Tendsto (fun x => ↑abs x.fst ^ x.snd.re) (𝓝 (0, z)) (𝓝 0)\n[PROOFSTEP]\nconvert (continuous_fst.norm.tendsto ((0 : ℂ), z)).rpow ((continuous_re.comp continuous_snd).tendsto _) _\n[GOAL]\ncase h.e'_5.h.e'_3\nz : ℂ\nhz : 0 < z.re\nhz₀ : z ≠ 0\n⊢ 0 = ‖(0, z).fst‖ ^ (re ∘ Prod.snd) (0, z)\n[PROOFSTEP]\nsimp [hz, Real.zero_rpow hz.ne']\n[GOAL]\ncase refine'_1\nz : ℂ\nhz : 0 < z.re\nhz₀ : z ≠ 0\n⊢ ‖(0, z).fst‖ ≠ 0 ∨ 0 < (re ∘ Prod.snd) (0, z)\n[PROOFSTEP]\nsimp [hz, Real.zero_rpow hz.ne']\n[GOAL]\ncase refine'_2\nz : ℂ\nhz : 0 < z.re\nhz₀ : z ≠ 0\n⊢ IsBoundedUnder (fun x x_1 => x ≤ x_1) (𝓝 (0, z)) ((fun x => ‖x‖) ∘ fun x => Real.exp (-(arg x.fst * x.snd.im)))\n[PROOFSTEP]\nsimp only [Function.comp, Real.norm_eq_abs, abs_of_pos (Real.exp_pos _)]\n[GOAL]\ncase refine'_2\nz : ℂ\nhz : 0 < z.re\nhz₀ : z ≠ 0\n⊢ IsBoundedUnder (fun x x_1 => x ≤ x_1) (𝓝 (0, z)) fun x => Real.exp (-(arg x.fst * x.snd.im))\n[PROOFSTEP]\nrcases exists_gt |im z| with ⟨C, hC⟩\n[GOAL]\ncase refine'_2.intro\nz : ℂ\nhz : 0 < z.re\nhz₀ : z ≠ 0\nC : ℝ\nhC : |z.im| < C\n⊢ IsBoundedUnder (fun x x_1 => x ≤ x_1) (𝓝 (0, z)) fun x => Real.exp (-(arg x.fst * x.snd.im))\n[PROOFSTEP]\nrefine' ⟨Real.exp (π * C), eventually_map.2 _⟩\n[GOAL]\ncase refine'_2.intro\nz : ℂ\nhz : 0 < z.re\nhz₀ : z ≠ 0\nC : ℝ\nhC : |z.im| < C\n⊢ ∀ᶠ (a : ℂ × ℂ) in 𝓝 (0, z), (fun x x_1 => x ≤ x_1) (Real.exp (-(arg a.fst * a.snd.im))) (Real.exp (π * C))\n[PROOFSTEP]\nrefine'\n  (((continuous_im.comp continuous_snd).abs.tendsto (_, z)).eventually (gt_mem_nhds hC)).mono fun z hz =>\n    Real.exp_le_exp.2 <| (neg_le_abs_self _).trans _\n[GOAL]\ncase refine'_2.intro\nz✝ : ℂ\nhz✝ : 0 < z✝.re\nhz₀ : z✝ ≠ 0\nC : ℝ\nhC : |z✝.im| < C\nz : ℂ × ℂ\nhz : |(im ∘ Prod.snd) z| < C\n⊢ |arg z.fst * z.snd.im| ≤ π * C\n[PROOFSTEP]\nrw [_root_.abs_mul]\n[GOAL]\ncase refine'_2.intro\nz✝ : ℂ\nhz✝ : 0 < z✝.re\nhz₀ : z✝ ≠ 0\nC : ℝ\nhC : |z✝.im| < C\nz : ℂ × ℂ\nhz : |(im ∘ Prod.snd) z| < C\n⊢ |arg z.fst| * |z.snd.im| ≤ π * C\n[PROOFSTEP]\nexact mul_le_mul (abs_le.2 ⟨(neg_pi_lt_arg _).le, arg_le_pi _⟩) hz.le (_root_.abs_nonneg _) Real.pi_pos.le\n[GOAL]\np : ℂ × ℂ\nh₁ : 0 ≤ p.fst.re ∨ p.fst.im ≠ 0\nh₂ : 0 < p.snd.re\n⊢ ContinuousAt (fun x => x.fst ^ x.snd) p\n[PROOFSTEP]\ncases' p with z w\n[GOAL]\ncase mk\nz w : ℂ\nh₁ : 0 ≤ (z, w).fst.re ∨ (z, w).fst.im ≠ 0\nh₂ : 0 < (z, w).snd.re\n⊢ ContinuousAt (fun x => x.fst ^ x.snd) (z, w)\n[PROOFSTEP]\nrw [← not_lt_zero_iff, lt_iff_le_and_ne, not_and_or, Ne.def, Classical.not_not, not_le_zero_iff] at h₁ \n[GOAL]\ncase mk\nz w : ℂ\nh₁ : (0 < (z, w).fst.re ∨ (z, w).fst.im ≠ 0) ∨ (z, w).fst = 0\nh₂ : 0 < (z, w).snd.re\n⊢ ContinuousAt (fun x => x.fst ^ x.snd) (z, w)\n[PROOFSTEP]\nrcases h₁ with (h₁ | (rfl : z = 0))\n[GOAL]\ncase mk.inl\nz w : ℂ\nh₂ : 0 < (z, w).snd.re\nh₁ : 0 < (z, w).fst.re ∨ (z, w).fst.im ≠ 0\n⊢ ContinuousAt (fun x => x.fst ^ x.snd) (z, w)\ncase mk.inr w : ℂ h₂ : 0 < (0, w).snd.re ⊢ ContinuousAt (fun x => x.fst ^ x.snd) (0, w)\n[PROOFSTEP]\nexacts [continuousAt_cpow h₁, continuousAt_cpow_zero_of_re_pos h₂]\n[GOAL]\nx : ℝ\ny : ℂ\nh : 0 < y.re ∨ x ≠ 0\n⊢ ContinuousAt (fun p => ↑p.fst ^ p.snd) (x, y)\n[PROOFSTEP]\nrcases lt_trichotomy (0 : ℝ) x with (hx | rfl | hx)\n[GOAL]\ncase inl\nx : ℝ\ny : ℂ\nh : 0 < y.re ∨ x ≠ 0\nhx : 0 < x\n⊢ ContinuousAt (fun p => ↑p.fst ^ p.snd) (x, y)\n[PROOFSTEP]\nhave : ContinuousAt (fun p => ⟨↑p.1, p.2⟩ : ℝ × ℂ → ℂ × ℂ) (x, y) :=\n  continuous_ofReal.continuousAt.prod_map continuousAt_id\n[GOAL]\ncase inl\nx : ℝ\ny : ℂ\nh : 0 < y.re ∨ x ≠ 0\nhx : 0 < x\nthis : ContinuousAt (fun p => (↑p.fst, p.snd)) (x, y)\n⊢ ContinuousAt (fun p => ↑p.fst ^ p.snd) (x, y)\n[PROOFSTEP]\nrefine' (continuousAt_cpow (Or.inl _)).comp this\n[GOAL]\ncase inl\nx : ℝ\ny : ℂ\nh : 0 < y.re ∨ x ≠ 0\nhx : 0 < x\nthis : ContinuousAt (fun p => (↑p.fst, p.snd)) (x, y)\n⊢ 0 < (↑(x, y).fst, (x, y).snd).fst.re\n[PROOFSTEP]\nrwa [ofReal_re]\n[GOAL]\ncase inr.inl\ny : ℂ\nh : 0 < y.re ∨ 0 ≠ 0\n⊢ ContinuousAt (fun p => ↑p.fst ^ p.snd) (0, y)\n[PROOFSTEP]\nhave A : ContinuousAt (fun p => p.1 ^ p.2 : ℂ × ℂ → ℂ) ⟨↑(0 : ℝ), y⟩ :=\n  by\n  rw [ofReal_zero]\n  apply continuousAt_cpow_zero_of_re_pos\n  tauto\n[GOAL]\ny : ℂ\nh : 0 < y.re ∨ 0 ≠ 0\n⊢ ContinuousAt (fun p => p.fst ^ p.snd) (↑0, y)\n[PROOFSTEP]\nrw [ofReal_zero]\n[GOAL]\ny : ℂ\nh : 0 < y.re ∨ 0 ≠ 0\n⊢ ContinuousAt (fun p => p.fst ^ p.snd) (0, y)\n[PROOFSTEP]\napply continuousAt_cpow_zero_of_re_pos\n[GOAL]\ncase hz\ny : ℂ\nh : 0 < y.re ∨ 0 ≠ 0\n⊢ 0 < y.re\n[PROOFSTEP]\ntauto\n[GOAL]\ncase inr.inl\ny : ℂ\nh : 0 < y.re ∨ 0 ≠ 0\nA : ContinuousAt (fun p => p.fst ^ p.snd) (↑0, y)\n⊢ ContinuousAt (fun p => ↑p.fst ^ p.snd) (0, y)\n[PROOFSTEP]\nhave B : ContinuousAt (fun p => ⟨↑p.1, p.2⟩ : ℝ × ℂ → ℂ × ℂ) ⟨0, y⟩ :=\n  continuous_ofReal.continuousAt.prod_map continuousAt_id\n[GOAL]\ncase inr.inl\ny : ℂ\nh : 0 < y.re ∨ 0 ≠ 0\nA : ContinuousAt (fun p => p.fst ^ p.snd) (↑0, y)\nB : ContinuousAt (fun p => (↑p.fst, p.snd)) (0, y)\n⊢ ContinuousAt (fun p => ↑p.fst ^ p.snd) (0, y)\n[PROOFSTEP]\nexact @ContinuousAt.comp (ℝ × ℂ) (ℂ × ℂ) ℂ _ _ _ _ (fun p => ⟨↑p.1, p.2⟩) ⟨0, y⟩ A B\n[GOAL]\ncase inr.inr\nx : ℝ\ny : ℂ\nh : 0 < y.re ∨ x ≠ 0\nhx : x < 0\n⊢ ContinuousAt (fun p => ↑p.fst ^ p.snd) (x, y)\n[PROOFSTEP]\nsuffices ContinuousAt (fun p => (-(p.1 : ℂ)) ^ p.2 * exp (π * I * p.2) : ℝ × ℂ → ℂ) (x, y)\n  by\n  refine' this.congr (eventually_of_mem (prod_mem_nhds (Iio_mem_nhds hx) univ_mem) _)\n  exact fun p hp => (ofReal_cpow_of_nonpos (le_of_lt hp.1) p.2).symm\n[GOAL]\nx : ℝ\ny : ℂ\nh : 0 < y.re ∨ x ≠ 0\nhx : x < 0\nthis : ContinuousAt (fun p => (-↑p.fst) ^ p.snd * exp (↑π * I * p.snd)) (x, y)\n⊢ ContinuousAt (fun p => ↑p.fst ^ p.snd) (x, y)\n[PROOFSTEP]\nrefine' this.congr (eventually_of_mem (prod_mem_nhds (Iio_mem_nhds hx) univ_mem) _)\n[GOAL]\nx : ℝ\ny : ℂ\nh : 0 < y.re ∨ x ≠ 0\nhx : x < 0\nthis : ContinuousAt (fun p => (-↑p.fst) ^ p.snd * exp (↑π * I * p.snd)) (x, y)\n⊢ ∀ (x : ℝ × ℂ),\n    x ∈ Set.Iio 0 ×ˢ Set.univ → (fun p => (-↑p.fst) ^ p.snd * exp (↑π * I * p.snd)) x = (fun p => ↑p.fst ^ p.snd) x\n[PROOFSTEP]\nexact fun p hp => (ofReal_cpow_of_nonpos (le_of_lt hp.1) p.2).symm\n[GOAL]\ncase inr.inr\nx : ℝ\ny : ℂ\nh : 0 < y.re ∨ x ≠ 0\nhx : x < 0\n⊢ ContinuousAt (fun p => (-↑p.fst) ^ p.snd * exp (↑π * I * p.snd)) (x, y)\n[PROOFSTEP]\nhave A : ContinuousAt (fun p => ⟨-↑p.1, p.2⟩ : ℝ × ℂ → ℂ × ℂ) (x, y) :=\n  ContinuousAt.prod_map continuous_ofReal.continuousAt.neg continuousAt_id\n[GOAL]\ncase inr.inr\nx : ℝ\ny : ℂ\nh : 0 < y.re ∨ x ≠ 0\nhx : x < 0\nA : ContinuousAt (fun p => (-↑p.fst, p.snd)) (x, y)\n⊢ ContinuousAt (fun p => (-↑p.fst) ^ p.snd * exp (↑π * I * p.snd)) (x, y)\n[PROOFSTEP]\napply ContinuousAt.mul\n[GOAL]\ncase inr.inr.hf\nx : ℝ\ny : ℂ\nh : 0 < y.re ∨ x ≠ 0\nhx : x < 0\nA : ContinuousAt (fun p => (-↑p.fst, p.snd)) (x, y)\n⊢ ContinuousAt (fun x => (-↑x.fst) ^ x.snd) (x, y)\n[PROOFSTEP]\nrefine' (continuousAt_cpow (Or.inl _)).comp A\n[GOAL]\ncase inr.inr.hf\nx : ℝ\ny : ℂ\nh : 0 < y.re ∨ x ≠ 0\nhx : x < 0\nA : ContinuousAt (fun p => (-↑p.fst, p.snd)) (x, y)\n⊢ 0 < (-↑(x, y).fst, (x, y).snd).fst.re\n[PROOFSTEP]\nrwa [neg_re, ofReal_re, neg_pos]\n[GOAL]\ncase inr.inr.hg\nx : ℝ\ny : ℂ\nh : 0 < y.re ∨ x ≠ 0\nhx : x < 0\nA : ContinuousAt (fun p => (-↑p.fst, p.snd)) (x, y)\n⊢ ContinuousAt (fun x => exp (↑π * I * x.snd)) (x, y)\n[PROOFSTEP]\nexact (continuous_exp.comp (continuous_const.mul continuous_snd)).continuousAt\n[GOAL]\nx : ℝ≥0\ny : ℝ\nh : x ≠ 0 ∨ 0 < y\n⊢ ContinuousAt (fun p => p.fst ^ p.snd) (x, y)\n[PROOFSTEP]\nhave :\n  (fun p : ℝ≥0 × ℝ => p.1 ^ p.2) = Real.toNNReal ∘ (fun p : ℝ × ℝ => p.1 ^ p.2) ∘ fun p : ℝ≥0 × ℝ => (p.1.1, p.2) :=\n  by\n  ext p\n  erw [coe_rpow, Real.coe_toNNReal _ (Real.rpow_nonneg_of_nonneg p.1.2 _)]\n  rfl\n[GOAL]\nx : ℝ≥0\ny : ℝ\nh : x ≠ 0 ∨ 0 < y\n⊢ (fun p => p.fst ^ p.snd) = toNNReal ∘ (fun p => p.fst ^ p.snd) ∘ fun p => (↑p.fst, p.snd)\n[PROOFSTEP]\next p\n[GOAL]\ncase h.a\nx : ℝ≥0\ny : ℝ\nh : x ≠ 0 ∨ 0 < y\np : ℝ≥0 × ℝ\n⊢ ↑(p.fst ^ p.snd) = ↑((toNNReal ∘ (fun p => p.fst ^ p.snd) ∘ fun p => (↑p.fst, p.snd)) p)\n[PROOFSTEP]\nerw [coe_rpow, Real.coe_toNNReal _ (Real.rpow_nonneg_of_nonneg p.1.2 _)]\n[GOAL]\ncase h.a\nx : ℝ≥0\ny : ℝ\nh : x ≠ 0 ∨ 0 < y\np : ℝ≥0 × ℝ\n⊢ ↑p.fst ^ p.snd = ↑p.fst ^ ((fun p => (↑p.fst, p.snd)) p).snd\n[PROOFSTEP]\nrfl\n[GOAL]\nx : ℝ≥0\ny : ℝ\nh : x ≠ 0 ∨ 0 < y\nthis : (fun p => p.fst ^ p.snd) = toNNReal ∘ (fun p => p.fst ^ p.snd) ∘ fun p => (↑p.fst, p.snd)\n⊢ ContinuousAt (fun p => p.fst ^ p.snd) (x, y)\n[PROOFSTEP]\nrw [this]\n[GOAL]\nx : ℝ≥0\ny : ℝ\nh : x ≠ 0 ∨ 0 < y\nthis : (fun p => p.fst ^ p.snd) = toNNReal ∘ (fun p => p.fst ^ p.snd) ∘ fun p => (↑p.fst, p.snd)\n⊢ ContinuousAt (toNNReal ∘ (fun p => p.fst ^ p.snd) ∘ fun p => (↑p.fst, p.snd)) (x, y)\n[PROOFSTEP]\nrefine' continuous_real_toNNReal.continuousAt.comp (ContinuousAt.comp _ _)\n[GOAL]\ncase refine'_1\nx : ℝ≥0\ny : ℝ\nh : x ≠ 0 ∨ 0 < y\nthis : (fun p => p.fst ^ p.snd) = toNNReal ∘ (fun p => p.fst ^ p.snd) ∘ fun p => (↑p.fst, p.snd)\n⊢ ContinuousAt (fun p => p.fst ^ p.snd) (↑(x, y).fst, (x, y).snd)\n[PROOFSTEP]\napply Real.continuousAt_rpow\n[GOAL]\ncase refine'_1.h\nx : ℝ≥0\ny : ℝ\nh : x ≠ 0 ∨ 0 < y\nthis : (fun p => p.fst ^ p.snd) = toNNReal ∘ (fun p => p.fst ^ p.snd) ∘ fun p => (↑p.fst, p.snd)\n⊢ (↑(x, y).fst, (x, y).snd).fst ≠ 0 ∨ 0 < (↑(x, y).fst, (x, y).snd).snd\n[PROOFSTEP]\nsimp only [Ne.def] at h \n[GOAL]\ncase refine'_1.h\nx : ℝ≥0\ny : ℝ\nh : ¬x = 0 ∨ 0 < y\nthis : (fun p => p.fst ^ p.snd) = toNNReal ∘ (fun p => p.fst ^ p.snd) ∘ fun p => (↑p.fst, p.snd)\n⊢ (↑(x, y).fst, (x, y).snd).fst ≠ 0 ∨ 0 < (↑(x, y).fst, (x, y).snd).snd\n[PROOFSTEP]\nrw [← NNReal.coe_eq_zero x] at h \n[GOAL]\ncase refine'_1.h\nx : ℝ≥0\ny : ℝ\nh : ¬↑x = 0 ∨ 0 < y\nthis : (fun p => p.fst ^ p.snd) = toNNReal ∘ (fun p => p.fst ^ p.snd) ∘ fun p => (↑p.fst, p.snd)\n⊢ (↑(x, y).fst, (x, y).snd).fst ≠ 0 ∨ 0 < (↑(x, y).fst, (x, y).snd).snd\n[PROOFSTEP]\nexact h\n[GOAL]\ncase refine'_2\nx : ℝ≥0\ny : ℝ\nh : x ≠ 0 ∨ 0 < y\nthis : (fun p => p.fst ^ p.snd) = toNNReal ∘ (fun p => p.fst ^ p.snd) ∘ fun p => (↑p.fst, p.snd)\n⊢ ContinuousAt (fun p => (↑p.fst, p.snd)) (x, y)\n[PROOFSTEP]\nexact ((continuous_subtype_val.comp continuous_fst).prod_mk continuous_snd).continuousAt\n[GOAL]\nx y : ℝ≥0\nhy : 1 < y\n⊢ ∀ᶠ (n : ℕ) in atTop, x ^ (1 / ↑n) ≤ y\n[PROOFSTEP]\nobtain ⟨m, hm⟩ := add_one_pow_unbounded_of_pos x (tsub_pos_of_lt hy)\n[GOAL]\ncase intro\nx y : ℝ≥0\nhy : 1 < y\nm : ℕ\nhm : x < (y - 1 + 1) ^ m\n⊢ ∀ᶠ (n : ℕ) in atTop, x ^ (1 / ↑n) ≤ y\n[PROOFSTEP]\nrw [tsub_add_cancel_of_le hy.le] at hm \n[GOAL]\ncase intro\nx y : ℝ≥0\nhy : 1 < y\nm : ℕ\nhm : x < y ^ m\n⊢ ∀ᶠ (n : ℕ) in atTop, x ^ (1 / ↑n) ≤ y\n[PROOFSTEP]\nrefine' eventually_atTop.2 ⟨m + 1, fun n hn => _⟩\n[GOAL]\ncase intro\nx y : ℝ≥0\nhy : 1 < y\nm : ℕ\nhm : x < y ^ m\nn : ℕ\nhn : n ≥ m + 1\n⊢ x ^ (1 / ↑n) ≤ y\n[PROOFSTEP]\nsimpa only [NNReal.rpow_one_div_le_iff (Nat.cast_pos.2 <| m.succ_pos.trans_le hn), NNReal.rpow_nat_cast] using\n  hm.le.trans (pow_le_pow hy.le (m.le_succ.trans hn))\n[GOAL]\nx : ℝ≥0\ny : ℝ\nh✝¹ : x ≠ 0 ∨ 0 ≤ y\nh✝ : 0 ≤ y\nh : 0 = y\n⊢ ContinuousAt (fun z => z ^ 0) x\n[PROOFSTEP]\nsimp only [rpow_zero, continuousAt_const]\n[GOAL]\nx : ℝ≥0∞\nhx : x ≠ ⊤\ny : ℝ≥0∞\nhy : 1 < y\n⊢ ∀ᶠ (n : ℕ) in atTop, x ^ (1 / ↑n) ≤ y\n[PROOFSTEP]\nlift x to ℝ≥0 using hx\n[GOAL]\ncase intro\ny : ℝ≥0∞\nhy : 1 < y\nx : ℝ≥0\n⊢ ∀ᶠ (n : ℕ) in atTop, ↑x ^ (1 / ↑n) ≤ y\n[PROOFSTEP]\nby_cases y = ∞\n[GOAL]\ncase intro\ny : ℝ≥0∞\nhy : 1 < y\nx : ℝ≥0\n⊢ ∀ᶠ (n : ℕ) in atTop, ↑x ^ (1 / ↑n) ≤ y\n[PROOFSTEP]\nby_cases y = ∞\n[GOAL]\ncase pos\ny : ℝ≥0∞\nhy : 1 < y\nx : ℝ≥0\nh : y = ⊤\n⊢ ∀ᶠ (n : ℕ) in atTop, ↑x ^ (1 / ↑n) ≤ y\n[PROOFSTEP]\nexact eventually_of_forall fun n => h.symm ▸ le_top\n[GOAL]\ncase neg\ny : ℝ≥0∞\nhy : 1 < y\nx : ℝ≥0\nh : ¬y = ⊤\n⊢ ∀ᶠ (n : ℕ) in atTop, ↑x ^ (1 / ↑n) ≤ y\n[PROOFSTEP]\nlift y to ℝ≥0 using h\n[GOAL]\ncase neg.intro\nx y : ℝ≥0\nhy : 1 < ↑y\n⊢ ∀ᶠ (n : ℕ) in atTop, ↑x ^ (1 / ↑n) ≤ ↑y\n[PROOFSTEP]\nhave := NNReal.eventually_pow_one_div_le x (by exact_mod_cast hy : 1 < y)\n[GOAL]\nx y : ℝ≥0\nhy : 1 < ↑y\n⊢ 1 < y\n[PROOFSTEP]\nexact_mod_cast hy\n[GOAL]\ncase neg.intro\nx y : ℝ≥0\nhy : 1 < ↑y\nthis : ∀ᶠ (n : ℕ) in atTop, x ^ (1 / ↑n) ≤ y\n⊢ ∀ᶠ (n : ℕ) in atTop, ↑x ^ (1 / ↑n) ≤ ↑y\n[PROOFSTEP]\nrefine' this.congr (eventually_of_forall fun n => _)\n[GOAL]\ncase neg.intro\nx y : ℝ≥0\nhy : 1 < ↑y\nthis : ∀ᶠ (n : ℕ) in atTop, x ^ (1 / ↑n) ≤ y\nn : ℕ\n⊢ x ^ (1 / ↑n) ≤ y ↔ ↑x ^ (1 / ↑n) ≤ ↑y\n[PROOFSTEP]\nrw [coe_rpow_of_nonneg x (by positivity : 0 ≤ (1 / n : ℝ)), coe_le_coe]\n[GOAL]\nx y : ℝ≥0\nhy : 1 < ↑y\nthis : ∀ᶠ (n : ℕ) in atTop, x ^ (1 / ↑n) ≤ y\nn : ℕ\n⊢ 0 ≤ 1 / ↑n\n[PROOFSTEP]\npositivity\n[GOAL]\nx : ℝ≥0∞\ny : ℝ\nh : 0 < y\n⊢ ContinuousAt (fun a => a ^ y) x\n[PROOFSTEP]\nby_cases hx : x = ⊤\n[GOAL]\ncase pos\nx : ℝ≥0∞\ny : ℝ\nh : 0 < y\nhx : x = ⊤\n⊢ ContinuousAt (fun a => a ^ y) x\n[PROOFSTEP]\nrw [hx, ContinuousAt]\n[GOAL]\ncase pos\nx : ℝ≥0∞\ny : ℝ\nh : 0 < y\nhx : x = ⊤\n⊢ Tendsto (fun a => a ^ y) (𝓝 ⊤) (𝓝 (⊤ ^ y))\n[PROOFSTEP]\nconvert ENNReal.tendsto_rpow_at_top h\n[GOAL]\ncase h.e'_5.h.e'_3\nx : ℝ≥0∞\ny : ℝ\nh : 0 < y\nhx : x = ⊤\n⊢ ⊤ ^ y = ⊤\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase neg\nx : ℝ≥0∞\ny : ℝ\nh : 0 < y\nhx : ¬x = ⊤\n⊢ ContinuousAt (fun a => a ^ y) x\n[PROOFSTEP]\nlift x to ℝ≥0 using hx\n[GOAL]\ncase neg.intro\ny : ℝ\nh : 0 < y\nx : ℝ≥0\n⊢ ContinuousAt (fun a => a ^ y) ↑x\n[PROOFSTEP]\nrw [continuousAt_coe_iff]\n[GOAL]\ncase neg.intro\ny : ℝ\nh : 0 < y\nx : ℝ≥0\n⊢ ContinuousAt ((fun a => a ^ y) ∘ some) x\n[PROOFSTEP]\nconvert continuous_coe.continuousAt.comp (NNReal.continuousAt_rpow_const (Or.inr h.le)) using 1\n[GOAL]\ncase h.e'_5\ny : ℝ\nh : 0 < y\nx : ℝ≥0\n⊢ (fun a => a ^ y) ∘ some = some ∘ fun z => z ^ y\n[PROOFSTEP]\next1 x\n[GOAL]\ncase h.e'_5.h\ny : ℝ\nh : 0 < y\nx✝ x : ℝ≥0\n⊢ ((fun a => a ^ y) ∘ some) x = (some ∘ fun z => z ^ y) x\n[PROOFSTEP]\nsimp [coe_rpow_of_nonneg _ h.le]\n[GOAL]\ny : ℝ\n⊢ Continuous fun a => a ^ y\n[PROOFSTEP]\nrefine continuous_iff_continuousAt.2 fun x => ?_\n[GOAL]\ny : ℝ\nx : ℝ≥0∞\n⊢ ContinuousAt (fun a => a ^ y) x\n[PROOFSTEP]\nrcases lt_trichotomy (0 : ℝ) y with (hy | rfl | hy)\n[GOAL]\ncase inl\ny : ℝ\nx : ℝ≥0∞\nhy : 0 < y\n⊢ ContinuousAt (fun a => a ^ y) x\n[PROOFSTEP]\nexact continuousAt_rpow_const_of_pos hy\n[GOAL]\ncase inr.inl\nx : ℝ≥0∞\n⊢ ContinuousAt (fun a => a ^ 0) x\n[PROOFSTEP]\nsimp only [rpow_zero]\n[GOAL]\ncase inr.inl\nx : ℝ≥0∞\n⊢ ContinuousAt (fun a => 1) x\n[PROOFSTEP]\nexact continuousAt_const\n[GOAL]\ncase inr.inr\ny : ℝ\nx : ℝ≥0∞\nhy : y < 0\n⊢ ContinuousAt (fun a => a ^ y) x\n[PROOFSTEP]\nobtain ⟨z, hz⟩ : ∃ z, y = -z := ⟨-y, (neg_neg _).symm⟩\n[GOAL]\ncase inr.inr.intro\ny : ℝ\nx : ℝ≥0∞\nhy : y < 0\nz : ℝ\nhz : y = -z\n⊢ ContinuousAt (fun a => a ^ y) x\n[PROOFSTEP]\nhave z_pos : 0 < z := by simpa [hz] using hy\n[GOAL]\ny : ℝ\nx : ℝ≥0∞\nhy : y < 0\nz : ℝ\nhz : y = -z\n⊢ 0 < z\n[PROOFSTEP]\nsimpa [hz] using hy\n[GOAL]\ncase inr.inr.intro\ny : ℝ\nx : ℝ≥0∞\nhy : y < 0\nz : ℝ\nhz : y = -z\nz_pos : 0 < z\n⊢ ContinuousAt (fun a => a ^ y) x\n[PROOFSTEP]\nsimp_rw [hz, rpow_neg]\n[GOAL]\ncase inr.inr.intro\ny : ℝ\nx : ℝ≥0∞\nhy : y < 0\nz : ℝ\nhz : y = -z\nz_pos : 0 < z\n⊢ ContinuousAt (fun a => (a ^ z)⁻¹) x\n[PROOFSTEP]\nexact continuous_inv.continuousAt.comp (continuousAt_rpow_const_of_pos z_pos)\n[GOAL]\nc : ℝ≥0∞\nhc : c ≠ ⊤\ny : ℝ\nhy : 0 < y\n⊢ Tendsto (fun x => c * x ^ y) (𝓝 0) (𝓝 0)\n[PROOFSTEP]\nconvert ENNReal.Tendsto.const_mul (ENNReal.continuous_rpow_const.tendsto 0) _\n[GOAL]\ncase h.e'_5.h.e'_3\nc : ℝ≥0∞\nhc : c ≠ ⊤\ny : ℝ\nhy : 0 < y\n⊢ 0 = c * 0 ^ y\n[PROOFSTEP]\nsimp [hy]\n[GOAL]\ncase convert_3\nc : ℝ≥0∞\nhc : c ≠ ⊤\ny : ℝ\nhy : 0 < y\n⊢ 0 ^ y ≠ 0 ∨ c ≠ ⊤\n[PROOFSTEP]\nexact Or.inr hc\n", "meta": {"mathlib_filename": "Mathlib.Analysis.SpecialFunctions.Pow.Continuity", "llama_tokens": 19808, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8267117940706734, "lm_q2_score": 0.6150878555160665, "lm_q1q2_score": 0.5085003845447704}}
{"text": "[GOAL]\nR : Type u_1\ninst✝⁴ : CommRing R\ninst✝³ : IsDomain R\nK : Type u_2\ninst✝² : Field K\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\n⊢ IsIntegrallyClosed R ↔ ∀ {x : K}, IsIntegral R x → ∃ y, ↑(algebraMap R K) y = x\n[PROOFSTEP]\nlet e : K ≃ₐ[R] FractionRing R := IsLocalization.algEquiv R⁰ _ _\n[GOAL]\nR : Type u_1\ninst✝⁴ : CommRing R\ninst✝³ : IsDomain R\nK : Type u_2\ninst✝² : Field K\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\ne : K ≃ₐ[R] FractionRing R := IsLocalization.algEquiv R⁰ K (FractionRing R)\n⊢ IsIntegrallyClosed R ↔ ∀ {x : K}, IsIntegral R x → ∃ y, ↑(algebraMap R K) y = x\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nR : Type u_1\ninst✝⁴ : CommRing R\ninst✝³ : IsDomain R\nK : Type u_2\ninst✝² : Field K\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\ne : K ≃ₐ[R] FractionRing R := IsLocalization.algEquiv R⁰ K (FractionRing R)\n⊢ IsIntegrallyClosed R → ∀ {x : K}, IsIntegral R x → ∃ y, ↑(algebraMap R K) y = x\n[PROOFSTEP]\nrintro ⟨cl⟩\n[GOAL]\ncase mp.mk\nR : Type u_1\ninst✝⁴ : CommRing R\ninst✝³ : IsDomain R\nK : Type u_2\ninst✝² : Field K\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\ne : K ≃ₐ[R] FractionRing R := IsLocalization.algEquiv R⁰ K (FractionRing R)\ncl : ∀ {x : FractionRing R}, IsIntegral R x → ∃ y, ↑(algebraMap R (FractionRing R)) y = x\n⊢ ∀ {x : K}, IsIntegral R x → ∃ y, ↑(algebraMap R K) y = x\n[PROOFSTEP]\nrefine' fun hx => _\n[GOAL]\ncase mp.mk\nR : Type u_1\ninst✝⁴ : CommRing R\ninst✝³ : IsDomain R\nK : Type u_2\ninst✝² : Field K\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\ne : K ≃ₐ[R] FractionRing R := IsLocalization.algEquiv R⁰ K (FractionRing R)\ncl : ∀ {x : FractionRing R}, IsIntegral R x → ∃ y, ↑(algebraMap R (FractionRing R)) y = x\nx✝ : K\nhx : IsIntegral R x✝\n⊢ ∃ y, ↑(algebraMap R K) y = x✝\n[PROOFSTEP]\nobtain ⟨y, hy⟩ := cl ((isIntegral_algEquiv e).mpr hx)\n[GOAL]\ncase mp.mk.intro\nR : Type u_1\ninst✝⁴ : CommRing R\ninst✝³ : IsDomain R\nK : Type u_2\ninst✝² : Field K\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\ne : K ≃ₐ[R] FractionRing R := IsLocalization.algEquiv R⁰ K (FractionRing R)\ncl : ∀ {x : FractionRing R}, IsIntegral R x → ∃ y, ↑(algebraMap R (FractionRing R)) y = x\nx✝ : K\nhx : IsIntegral R x✝\ny : R\nhy : ↑(algebraMap R (FractionRing R)) y = ↑e x✝\n⊢ ∃ y, ↑(algebraMap R K) y = x✝\n[PROOFSTEP]\nexact ⟨y, e.algebraMap_eq_apply.mp hy⟩\n[GOAL]\ncase mpr\nR : Type u_1\ninst✝⁴ : CommRing R\ninst✝³ : IsDomain R\nK : Type u_2\ninst✝² : Field K\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\ne : K ≃ₐ[R] FractionRing R := IsLocalization.algEquiv R⁰ K (FractionRing R)\n⊢ (∀ {x : K}, IsIntegral R x → ∃ y, ↑(algebraMap R K) y = x) → IsIntegrallyClosed R\n[PROOFSTEP]\nrintro cl\n[GOAL]\ncase mpr\nR : Type u_1\ninst✝⁴ : CommRing R\ninst✝³ : IsDomain R\nK : Type u_2\ninst✝² : Field K\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\ne : K ≃ₐ[R] FractionRing R := IsLocalization.algEquiv R⁰ K (FractionRing R)\ncl : ∀ {x : K}, IsIntegral R x → ∃ y, ↑(algebraMap R K) y = x\n⊢ IsIntegrallyClosed R\n[PROOFSTEP]\nrefine' ⟨fun hx => _⟩\n[GOAL]\ncase mpr\nR : Type u_1\ninst✝⁴ : CommRing R\ninst✝³ : IsDomain R\nK : Type u_2\ninst✝² : Field K\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\ne : K ≃ₐ[R] FractionRing R := IsLocalization.algEquiv R⁰ K (FractionRing R)\ncl : ∀ {x : K}, IsIntegral R x → ∃ y, ↑(algebraMap R K) y = x\nx✝ : FractionRing R\nhx : IsIntegral R x✝\n⊢ ∃ y, ↑(algebraMap R (FractionRing R)) y = x✝\n[PROOFSTEP]\nobtain ⟨y, hy⟩ := cl ((isIntegral_algEquiv e.symm).mpr hx)\n[GOAL]\ncase mpr.intro\nR : Type u_1\ninst✝⁴ : CommRing R\ninst✝³ : IsDomain R\nK : Type u_2\ninst✝² : Field K\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\ne : K ≃ₐ[R] FractionRing R := IsLocalization.algEquiv R⁰ K (FractionRing R)\ncl : ∀ {x : K}, IsIntegral R x → ∃ y, ↑(algebraMap R K) y = x\nx✝ : FractionRing R\nhx : IsIntegral R x✝\ny : R\nhy : ↑(algebraMap R K) y = ↑(AlgEquiv.symm e) x✝\n⊢ ∃ y, ↑(algebraMap R (FractionRing R)) y = x✝\n[PROOFSTEP]\nexact ⟨y, e.symm.algebraMap_eq_apply.mp hy⟩\n[GOAL]\nR : Type u_1\ninst✝⁴ : CommRing R\ninst✝³ : IsDomain R\nK : Type u_2\ninst✝² : Field K\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\n⊢ (∀ {x : K}, IsIntegral R x → ∃ y, ↑(algebraMap R K) y = x) ↔ IsIntegralClosure R R K\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nR : Type u_1\ninst✝⁴ : CommRing R\ninst✝³ : IsDomain R\nK : Type u_2\ninst✝² : Field K\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\n⊢ (∀ {x : K}, IsIntegral R x → ∃ y, ↑(algebraMap R K) y = x) → IsIntegralClosure R R K\n[PROOFSTEP]\nintro cl\n[GOAL]\ncase mp\nR : Type u_1\ninst✝⁴ : CommRing R\ninst✝³ : IsDomain R\nK : Type u_2\ninst✝² : Field K\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\ncl : ∀ {x : K}, IsIntegral R x → ∃ y, ↑(algebraMap R K) y = x\n⊢ IsIntegralClosure R R K\n[PROOFSTEP]\nrefine' ⟨IsFractionRing.injective R K, ⟨cl, _⟩⟩\n[GOAL]\ncase mp\nR : Type u_1\ninst✝⁴ : CommRing R\ninst✝³ : IsDomain R\nK : Type u_2\ninst✝² : Field K\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\ncl : ∀ {x : K}, IsIntegral R x → ∃ y, ↑(algebraMap R K) y = x\nx✝ : K\n⊢ (∃ y, ↑(algebraMap R K) y = x✝) → IsIntegral R x✝\n[PROOFSTEP]\nrintro ⟨y, y_eq⟩\n[GOAL]\ncase mp.intro\nR : Type u_1\ninst✝⁴ : CommRing R\ninst✝³ : IsDomain R\nK : Type u_2\ninst✝² : Field K\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\ncl : ∀ {x : K}, IsIntegral R x → ∃ y, ↑(algebraMap R K) y = x\nx✝ : K\ny : R\ny_eq : ↑(algebraMap R K) y = x✝\n⊢ IsIntegral R x✝\n[PROOFSTEP]\nrw [← y_eq]\n[GOAL]\ncase mp.intro\nR : Type u_1\ninst✝⁴ : CommRing R\ninst✝³ : IsDomain R\nK : Type u_2\ninst✝² : Field K\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\ncl : ∀ {x : K}, IsIntegral R x → ∃ y, ↑(algebraMap R K) y = x\nx✝ : K\ny : R\ny_eq : ↑(algebraMap R K) y = x✝\n⊢ IsIntegral R (↑(algebraMap R K) y)\n[PROOFSTEP]\nexact isIntegral_algebraMap\n[GOAL]\ncase mpr\nR : Type u_1\ninst✝⁴ : CommRing R\ninst✝³ : IsDomain R\nK : Type u_2\ninst✝² : Field K\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\n⊢ IsIntegralClosure R R K → ∀ {x : K}, IsIntegral R x → ∃ y, ↑(algebraMap R K) y = x\n[PROOFSTEP]\nrintro ⟨-, cl⟩ x hx\n[GOAL]\ncase mpr.mk\nR : Type u_1\ninst✝⁴ : CommRing R\ninst✝³ : IsDomain R\nK : Type u_2\ninst✝² : Field K\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\ncl : ∀ {x : K}, IsIntegral R x ↔ ∃ y, ↑(algebraMap R K) y = x\nx : K\nhx : IsIntegral R x\n⊢ ∃ y, ↑(algebraMap R K) y = x\n[PROOFSTEP]\nexact cl.mp hx\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\nid : IsDomain R\niic : IsIntegrallyClosed R\nK : Type u_2\ninst✝¹ : Field K\ninst✝ : Algebra R K\nifr : IsFractionRing R K\n⊢ integralClosure R K = ⊥ ↔ IsIntegrallyClosed R\n[PROOFSTEP]\nrefine' eq_bot_iff.trans _\n[GOAL]\nR : Type u_1\ninst✝² : CommRing R\nid : IsDomain R\niic : IsIntegrallyClosed R\nK : Type u_2\ninst✝¹ : Field K\ninst✝ : Algebra R K\nifr : IsFractionRing R K\n⊢ integralClosure R K ≤ ⊥ ↔ IsIntegrallyClosed R\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nR : Type u_1\ninst✝² : CommRing R\nid : IsDomain R\niic : IsIntegrallyClosed R\nK : Type u_2\ninst✝¹ : Field K\ninst✝ : Algebra R K\nifr : IsFractionRing R K\n⊢ integralClosure R K ≤ ⊥ → IsIntegrallyClosed R\n[PROOFSTEP]\nrw [isIntegrallyClosed_iff K]\n[GOAL]\ncase mp\nR : Type u_1\ninst✝² : CommRing R\nid : IsDomain R\niic : IsIntegrallyClosed R\nK : Type u_2\ninst✝¹ : Field K\ninst✝ : Algebra R K\nifr : IsFractionRing R K\n⊢ integralClosure R K ≤ ⊥ → ∀ {x : K}, IsIntegral R x → ∃ y, ↑(algebraMap R K) y = x\n[PROOFSTEP]\nintro h x hx\n[GOAL]\ncase mp\nR : Type u_1\ninst✝² : CommRing R\nid : IsDomain R\niic : IsIntegrallyClosed R\nK : Type u_2\ninst✝¹ : Field K\ninst✝ : Algebra R K\nifr : IsFractionRing R K\nh : integralClosure R K ≤ ⊥\nx : K\nhx : IsIntegral R x\n⊢ ∃ y, ↑(algebraMap R K) y = x\n[PROOFSTEP]\nexact Set.mem_range.mp (Algebra.mem_bot.mp (h hx))\n[GOAL]\ncase mpr\nR : Type u_1\ninst✝² : CommRing R\nid : IsDomain R\niic : IsIntegrallyClosed R\nK : Type u_2\ninst✝¹ : Field K\ninst✝ : Algebra R K\nifr : IsFractionRing R K\n⊢ IsIntegrallyClosed R → integralClosure R K ≤ ⊥\n[PROOFSTEP]\nintro h x hx\n[GOAL]\ncase mpr\nR : Type u_1\ninst✝² : CommRing R\nid : IsDomain R\niic : IsIntegrallyClosed R\nK : Type u_2\ninst✝¹ : Field K\ninst✝ : Algebra R K\nifr : IsFractionRing R K\nh : IsIntegrallyClosed R\nx : K\nhx : x ∈ integralClosure R K\n⊢ x ∈ ⊥\n[PROOFSTEP]\nrw [Algebra.mem_bot, Set.mem_range]\n[GOAL]\ncase mpr\nR : Type u_1\ninst✝² : CommRing R\nid : IsDomain R\niic : IsIntegrallyClosed R\nK : Type u_2\ninst✝¹ : Field K\ninst✝ : Algebra R K\nifr : IsFractionRing R K\nh : IsIntegrallyClosed R\nx : K\nhx : x ∈ integralClosure R K\n⊢ ∃ y, ↑(algebraMap R K) y = x\n[PROOFSTEP]\nexact isIntegral_iff.mp hx\n", "meta": {"mathlib_filename": "Mathlib.RingTheory.IntegrallyClosed", "llama_tokens": 4150, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7718434978390746, "lm_q2_score": 0.6584175072643413, "lm_q1q2_score": 0.5081952718453935}}
{"text": "[GOAL]\nV : Type u_1\ninst✝¹ : Quiver V\nW : Type u_2\nσ : V → W\nW' : Type u_3\ninst✝ : Quiver W'\nφ : V ⥤q W'\nτ : W → W'\nh : ∀ (x : V), φ.obj x = τ (σ x)\nX Y : V\nf : X ⟶ Y\n⊢ (fun X Y x => τ X ⟶ τ Y) (σ X) (σ Y) (PushQuiver.arrow f)\n[PROOFSTEP]\ndsimp only\n[GOAL]\nV : Type u_1\ninst✝¹ : Quiver V\nW : Type u_2\nσ : V → W\nW' : Type u_3\ninst✝ : Quiver W'\nφ : V ⥤q W'\nτ : W → W'\nh : ∀ (x : V), φ.obj x = τ (σ x)\nX Y : V\nf : X ⟶ Y\n⊢ τ (σ X) ⟶ τ (σ Y)\n[PROOFSTEP]\nrw [← h X, ← h Y]\n[GOAL]\nV : Type u_1\ninst✝¹ : Quiver V\nW : Type u_2\nσ : V → W\nW' : Type u_3\ninst✝ : Quiver W'\nφ : V ⥤q W'\nτ : W → W'\nh : ∀ (x : V), φ.obj x = τ (σ x)\nX Y : V\nf : X ⟶ Y\n⊢ φ.obj X ⟶ φ.obj Y\n[PROOFSTEP]\nexact φ.map f\n[GOAL]\nV : Type u_1\ninst✝¹ : Quiver V\nW : Type u_2\nσ : V → W\nW' : Type u_3\ninst✝ : Quiver W'\nφ : V ⥤q W'\nτ : W → W'\nh : ∀ (x : V), φ.obj x = τ (σ x)\n⊢ of σ ⋙q lift σ φ τ h = φ\n[PROOFSTEP]\nfapply Prefunctor.ext\n[GOAL]\ncase h_obj\nV : Type u_1\ninst✝¹ : Quiver V\nW : Type u_2\nσ : V → W\nW' : Type u_3\ninst✝ : Quiver W'\nφ : V ⥤q W'\nτ : W → W'\nh : ∀ (x : V), φ.obj x = τ (σ x)\n⊢ ∀ (X : V), (of σ ⋙q lift σ φ τ h).obj X = φ.obj X\n[PROOFSTEP]\nrintro X\n[GOAL]\ncase h_obj\nV : Type u_1\ninst✝¹ : Quiver V\nW : Type u_2\nσ : V → W\nW' : Type u_3\ninst✝ : Quiver W'\nφ : V ⥤q W'\nτ : W → W'\nh : ∀ (x : V), φ.obj x = τ (σ x)\nX : V\n⊢ (of σ ⋙q lift σ φ τ h).obj X = φ.obj X\n[PROOFSTEP]\nsimp only [Prefunctor.comp_obj]\n[GOAL]\ncase h_obj\nV : Type u_1\ninst✝¹ : Quiver V\nW : Type u_2\nσ : V → W\nW' : Type u_3\ninst✝ : Quiver W'\nφ : V ⥤q W'\nτ : W → W'\nh : ∀ (x : V), φ.obj x = τ (σ x)\nX : V\n⊢ (lift σ φ τ h).obj ((of σ).obj X) = φ.obj X\n[PROOFSTEP]\napply Eq.symm\n[GOAL]\ncase h_obj.h\nV : Type u_1\ninst✝¹ : Quiver V\nW : Type u_2\nσ : V → W\nW' : Type u_3\ninst✝ : Quiver W'\nφ : V ⥤q W'\nτ : W → W'\nh : ∀ (x : V), φ.obj x = τ (σ x)\nX : V\n⊢ φ.obj X = (lift σ φ τ h).obj ((of σ).obj X)\n[PROOFSTEP]\nexact h X\n[GOAL]\ncase h_map\nV : Type u_1\ninst✝¹ : Quiver V\nW : Type u_2\nσ : V → W\nW' : Type u_3\ninst✝ : Quiver W'\nφ : V ⥤q W'\nτ : W → W'\nh : ∀ (x : V), φ.obj x = τ (σ x)\n⊢ ∀ (X Y : V) (f : X ⟶ Y),\n    (of σ ⋙q lift σ φ τ h).map f =\n      Eq.recOn (_ : φ.obj Y = (of σ ⋙q lift σ φ τ h).obj Y)\n        (Eq.recOn (_ : φ.obj X = (of σ ⋙q lift σ φ τ h).obj X) (φ.map f))\n[PROOFSTEP]\nrintro X Y f\n[GOAL]\ncase h_map\nV : Type u_1\ninst✝¹ : Quiver V\nW : Type u_2\nσ : V → W\nW' : Type u_3\ninst✝ : Quiver W'\nφ : V ⥤q W'\nτ : W → W'\nh : ∀ (x : V), φ.obj x = τ (σ x)\nX Y : V\nf : X ⟶ Y\n⊢ (of σ ⋙q lift σ φ τ h).map f =\n    Eq.recOn (_ : φ.obj Y = (of σ ⋙q lift σ φ τ h).obj Y)\n      (Eq.recOn (_ : φ.obj X = (of σ ⋙q lift σ φ τ h).obj X) (φ.map f))\n[PROOFSTEP]\nsimp only [Prefunctor.comp_map]\n[GOAL]\ncase h_map\nV : Type u_1\ninst✝¹ : Quiver V\nW : Type u_2\nσ : V → W\nW' : Type u_3\ninst✝ : Quiver W'\nφ : V ⥤q W'\nτ : W → W'\nh : ∀ (x : V), φ.obj x = τ (σ x)\nX Y : V\nf : X ⟶ Y\n⊢ (lift σ φ τ h).map ((of σ).map f) =\n    (_ : φ.obj Y = (of σ ⋙q lift σ φ τ h).obj Y) ▸ (_ : φ.obj X = (of σ ⋙q lift σ φ τ h).obj X) ▸ φ.map f\n[PROOFSTEP]\napply eq_of_heq\n[GOAL]\ncase h_map.h\nV : Type u_1\ninst✝¹ : Quiver V\nW : Type u_2\nσ : V → W\nW' : Type u_3\ninst✝ : Quiver W'\nφ : V ⥤q W'\nτ : W → W'\nh : ∀ (x : V), φ.obj x = τ (σ x)\nX Y : V\nf : X ⟶ Y\n⊢ HEq ((lift σ φ τ h).map ((of σ).map f))\n    ((_ : φ.obj Y = (of σ ⋙q lift σ φ τ h).obj Y) ▸ (_ : φ.obj X = (of σ ⋙q lift σ φ τ h).obj X) ▸ φ.map f)\n[PROOFSTEP]\niterate 2 apply (cast_heq _ _).trans\n[GOAL]\ncase h_map.h\nV : Type u_1\ninst✝¹ : Quiver V\nW : Type u_2\nσ : V → W\nW' : Type u_3\ninst✝ : Quiver W'\nφ : V ⥤q W'\nτ : W → W'\nh : ∀ (x : V), φ.obj x = τ (σ x)\nX Y : V\nf : X ⟶ Y\n⊢ HEq ((lift σ φ τ h).map ((of σ).map f))\n    ((_ : φ.obj Y = (of σ ⋙q lift σ φ τ h).obj Y) ▸ (_ : φ.obj X = (of σ ⋙q lift σ φ τ h).obj X) ▸ φ.map f)\n[PROOFSTEP]\napply (cast_heq _ _).trans\n[GOAL]\ncase h_map.h\nV : Type u_1\ninst✝¹ : Quiver V\nW : Type u_2\nσ : V → W\nW' : Type u_3\ninst✝ : Quiver W'\nφ : V ⥤q W'\nτ : W → W'\nh : ∀ (x : V), φ.obj x = τ (σ x)\nX Y : V\nf : X ⟶ Y\n⊢ HEq (Eq.mpr (_ : (φ.obj X ⟶ τ (σ Y)) = (φ.obj X ⟶ φ.obj Y)) (φ.map f))\n    ((_ : φ.obj Y = (of σ ⋙q lift σ φ τ h).obj Y) ▸ (_ : φ.obj X = (of σ ⋙q lift σ φ τ h).obj X) ▸ φ.map f)\n[PROOFSTEP]\napply (cast_heq _ _).trans\n[GOAL]\ncase h_map.h\nV : Type u_1\ninst✝¹ : Quiver V\nW : Type u_2\nσ : V → W\nW' : Type u_3\ninst✝ : Quiver W'\nφ : V ⥤q W'\nτ : W → W'\nh : ∀ (x : V), φ.obj x = τ (σ x)\nX Y : V\nf : X ⟶ Y\n⊢ HEq (φ.map f) ((_ : φ.obj Y = (of σ ⋙q lift σ φ τ h).obj Y) ▸ (_ : φ.obj X = (of σ ⋙q lift σ φ τ h).obj X) ▸ φ.map f)\n[PROOFSTEP]\napply HEq.symm\n[GOAL]\ncase h_map.h.h\nV : Type u_1\ninst✝¹ : Quiver V\nW : Type u_2\nσ : V → W\nW' : Type u_3\ninst✝ : Quiver W'\nφ : V ⥤q W'\nτ : W → W'\nh : ∀ (x : V), φ.obj x = τ (σ x)\nX Y : V\nf : X ⟶ Y\n⊢ HEq ((_ : φ.obj Y = (of σ ⋙q lift σ φ τ h).obj Y) ▸ (_ : φ.obj X = (of σ ⋙q lift σ φ τ h).obj X) ▸ φ.map f) (φ.map f)\n[PROOFSTEP]\napply (eqRec_heq _ _).trans\n[GOAL]\ncase h_map.h.h\nV : Type u_1\ninst✝¹ : Quiver V\nW : Type u_2\nσ : V → W\nW' : Type u_3\ninst✝ : Quiver W'\nφ : V ⥤q W'\nτ : W → W'\nh : ∀ (x : V), φ.obj x = τ (σ x)\nX Y : V\nf : X ⟶ Y\n⊢ HEq ((_ : φ.obj X = (of σ ⋙q lift σ φ τ h).obj X) ▸ φ.map f) (φ.map f)\n[PROOFSTEP]\nhave : ∀ {α γ} {β : α → γ → Sort _} {a a'} (p : a = a') g (b : β a g), HEq (p ▸ b) b :=\n  by\n  intros\n  subst_vars\n  rfl\n[GOAL]\nV : Type u_1\ninst✝¹ : Quiver V\nW : Type u_2\nσ : V → W\nW' : Type u_3\ninst✝ : Quiver W'\nφ : V ⥤q W'\nτ : W → W'\nh : ∀ (x : V), φ.obj x = τ (σ x)\nX Y : V\nf : X ⟶ Y\n⊢ ∀ {α : Sort ?u.2529} {γ : Sort ?u.2531} {β : α → γ → Sort ?u.2533} {a a' : α} (p : a = a') (g : γ) (b : β a g),\n    HEq (p ▸ b) b\n[PROOFSTEP]\nintros\n[GOAL]\nV : Type u_1\ninst✝¹ : Quiver V\nW : Type u_2\nσ : V → W\nW' : Type u_3\ninst✝ : Quiver W'\nφ : V ⥤q W'\nτ : W → W'\nh : ∀ (x : V), φ.obj x = τ (σ x)\nX Y : V\nf : X ⟶ Y\nα✝ : Sort ?u.2529\nγ✝ : Sort ?u.2531\nβ✝ : α✝ → γ✝ → Sort ?u.2533\na✝ a'✝ : α✝\np✝ : a✝ = a'✝\ng✝ : γ✝\nb✝ : β✝ a✝ g✝\n⊢ HEq (p✝ ▸ b✝) b✝\n[PROOFSTEP]\nsubst_vars\n[GOAL]\nV : Type u_1\ninst✝¹ : Quiver V\nW : Type u_2\nσ : V → W\nW' : Type u_3\ninst✝ : Quiver W'\nφ : V ⥤q W'\nτ : W → W'\nh : ∀ (x : V), φ.obj x = τ (σ x)\nX Y : V\nf : X ⟶ Y\nα✝ : Sort ?u.2529\nγ✝ : Sort ?u.2531\nβ✝ : α✝ → γ✝ → Sort ?u.2533\na'✝ : α✝\ng✝ : γ✝\nb✝ : β✝ a'✝ g✝\n⊢ HEq ((_ : a'✝ = a'✝) ▸ b✝) b✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h_map.h.h\nV : Type u_1\ninst✝¹ : Quiver V\nW : Type u_2\nσ : V → W\nW' : Type u_3\ninst✝ : Quiver W'\nφ : V ⥤q W'\nτ : W → W'\nh : ∀ (x : V), φ.obj x = τ (σ x)\nX Y : V\nf : X ⟶ Y\nthis :\n  ∀ {α : Sort ?u.2529} {γ : Sort ?u.2531} {β : α → γ → Sort ?u.2533} {a a' : α} (p : a = a') (g : γ) (b : β a g),\n    HEq (p ▸ b) b\n⊢ HEq ((_ : φ.obj X = (of σ ⋙q lift σ φ τ h).obj X) ▸ φ.map f) (φ.map f)\n[PROOFSTEP]\napply this\n[GOAL]\nV : Type u_1\ninst✝¹ : Quiver V\nW : Type u_2\nσ : V → W\nW' : Type u_3\ninst✝ : Quiver W'\nφ : V ⥤q W'\nτ : W → W'\nh : ∀ (x : V), φ.obj x = τ (σ x)\nΦ : Push σ ⥤q W'\nΦ₀ : Φ.obj = τ\nΦcomp : of σ ⋙q Φ = φ\n⊢ Φ = lift σ φ τ h\n[PROOFSTEP]\ndsimp only [of, lift]\n[GOAL]\nV : Type u_1\ninst✝¹ : Quiver V\nW : Type u_2\nσ : V → W\nW' : Type u_3\ninst✝ : Quiver W'\nφ : V ⥤q W'\nτ : W → W'\nh : ∀ (x : V), φ.obj x = τ (σ x)\nΦ : Push σ ⥤q W'\nΦ₀ : Φ.obj = τ\nΦcomp : of σ ⋙q Φ = φ\n⊢ Φ =\n    { obj := τ,\n      map :=\n        @PushQuiver.rec V inst✝¹ W σ (fun X Y x => τ X ⟶ τ Y) fun X Y f =>\n          id\n            (Eq.mpr (_ : (τ (σ X) ⟶ τ (σ Y)) = (φ.obj X ⟶ τ (σ Y)))\n              (Eq.mpr (_ : (φ.obj X ⟶ τ (σ Y)) = (φ.obj X ⟶ φ.obj Y)) (φ.map f))) }\n[PROOFSTEP]\nfapply Prefunctor.ext\n[GOAL]\ncase h_obj\nV : Type u_1\ninst✝¹ : Quiver V\nW : Type u_2\nσ : V → W\nW' : Type u_3\ninst✝ : Quiver W'\nφ : V ⥤q W'\nτ : W → W'\nh : ∀ (x : V), φ.obj x = τ (σ x)\nΦ : Push σ ⥤q W'\nΦ₀ : Φ.obj = τ\nΦcomp : of σ ⋙q Φ = φ\n⊢ ∀ (X : Push σ),\n    Φ.obj X =\n      { obj := τ,\n            map :=\n              @PushQuiver.rec V inst✝¹ W σ (fun X Y x => τ X ⟶ τ Y) fun X Y f =>\n                id\n                  (Eq.mpr (_ : (τ (σ X) ⟶ τ (σ Y)) = (φ.obj X ⟶ τ (σ Y)))\n                    (Eq.mpr (_ : (φ.obj X ⟶ τ (σ Y)) = (φ.obj X ⟶ φ.obj Y)) (φ.map f))) }.obj\n        X\n[PROOFSTEP]\nintro X\n[GOAL]\ncase h_obj\nV : Type u_1\ninst✝¹ : Quiver V\nW : Type u_2\nσ : V → W\nW' : Type u_3\ninst✝ : Quiver W'\nφ : V ⥤q W'\nτ : W → W'\nh : ∀ (x : V), φ.obj x = τ (σ x)\nΦ : Push σ ⥤q W'\nΦ₀ : Φ.obj = τ\nΦcomp : of σ ⋙q Φ = φ\nX : Push σ\n⊢ Φ.obj X =\n    { obj := τ,\n          map :=\n            @PushQuiver.rec V inst✝¹ W σ (fun X Y x => τ X ⟶ τ Y) fun X Y f =>\n              id\n                (Eq.mpr (_ : (τ (σ X) ⟶ τ (σ Y)) = (φ.obj X ⟶ τ (σ Y)))\n                  (Eq.mpr (_ : (φ.obj X ⟶ τ (σ Y)) = (φ.obj X ⟶ φ.obj Y)) (φ.map f))) }.obj\n      X\n[PROOFSTEP]\nsimp only\n[GOAL]\ncase h_obj\nV : Type u_1\ninst✝¹ : Quiver V\nW : Type u_2\nσ : V → W\nW' : Type u_3\ninst✝ : Quiver W'\nφ : V ⥤q W'\nτ : W → W'\nh : ∀ (x : V), φ.obj x = τ (σ x)\nΦ : Push σ ⥤q W'\nΦ₀ : Φ.obj = τ\nΦcomp : of σ ⋙q Φ = φ\nX : Push σ\n⊢ Φ.obj X = τ X\n[PROOFSTEP]\nrw [Φ₀]\n[GOAL]\ncase h_map\nV : Type u_1\ninst✝¹ : Quiver V\nW : Type u_2\nσ : V → W\nW' : Type u_3\ninst✝ : Quiver W'\nφ : V ⥤q W'\nτ : W → W'\nh : ∀ (x : V), φ.obj x = τ (σ x)\nΦ : Push σ ⥤q W'\nΦ₀ : Φ.obj = τ\nΦcomp : of σ ⋙q Φ = φ\n⊢ ∀ (X Y : Push σ) (f : X ⟶ Y),\n    Φ.map f =\n      Eq.recOn\n        (_ :\n          { obj := τ,\n                  map :=\n                    @PushQuiver.rec V inst✝¹ W σ (fun X Y x => τ X ⟶ τ Y) fun X Y f =>\n                      id\n                        (Eq.mpr (_ : (τ (σ X) ⟶ τ (σ Y)) = (φ.obj X ⟶ τ (σ Y)))\n                          (Eq.mpr (_ : (φ.obj X ⟶ τ (σ Y)) = (φ.obj X ⟶ φ.obj Y)) (φ.map f))) }.obj\n              Y =\n            Φ.obj Y)\n        (Eq.recOn\n          (_ :\n            { obj := τ,\n                    map :=\n                      @PushQuiver.rec V inst✝¹ W σ (fun X Y x => τ X ⟶ τ Y) fun X Y f =>\n                        id\n                          (Eq.mpr (_ : (τ (σ X) ⟶ τ (σ Y)) = (φ.obj X ⟶ τ (σ Y)))\n                            (Eq.mpr (_ : (φ.obj X ⟶ τ (σ Y)) = (φ.obj X ⟶ φ.obj Y)) (φ.map f))) }.obj\n                X =\n              Φ.obj X)\n          ({ obj := τ,\n                map :=\n                  @PushQuiver.rec V inst✝¹ W σ (fun X Y x => τ X ⟶ τ Y) fun X Y f =>\n                    id\n                      (Eq.mpr (_ : (τ (σ X) ⟶ τ (σ Y)) = (φ.obj X ⟶ τ (σ Y)))\n                        (Eq.mpr (_ : (φ.obj X ⟶ τ (σ Y)) = (φ.obj X ⟶ φ.obj Y)) (φ.map f))) }.map\n            f))\n[PROOFSTEP]\nrintro _ _ ⟨⟩\n[GOAL]\ncase h_map.arrow\nV : Type u_1\ninst✝¹ : Quiver V\nW : Type u_2\nσ : V → W\nW' : Type u_3\ninst✝ : Quiver W'\nφ : V ⥤q W'\nτ : W → W'\nh : ∀ (x : V), φ.obj x = τ (σ x)\nΦ : Push σ ⥤q W'\nΦ₀ : Φ.obj = τ\nΦcomp : of σ ⋙q Φ = φ\nX✝ Y✝ : V\nf✝ : X✝ ⟶ Y✝\n⊢ Φ.map (PushQuiver.arrow f✝) =\n    Eq.recOn\n      (_ :\n        { obj := τ,\n                map :=\n                  @PushQuiver.rec V inst✝¹ W σ (fun X Y x => τ X ⟶ τ Y) fun X Y f =>\n                    id\n                      (Eq.mpr (_ : (τ (σ X) ⟶ τ (σ Y)) = (φ.obj X ⟶ τ (σ Y)))\n                        (Eq.mpr (_ : (φ.obj X ⟶ τ (σ Y)) = (φ.obj X ⟶ φ.obj Y)) (φ.map f))) }.obj\n            (σ Y✝) =\n          Φ.obj (σ Y✝))\n      (Eq.recOn\n        (_ :\n          { obj := τ,\n                  map :=\n                    @PushQuiver.rec V inst✝¹ W σ (fun X Y x => τ X ⟶ τ Y) fun X Y f =>\n                      id\n                        (Eq.mpr (_ : (τ (σ X) ⟶ τ (σ Y)) = (φ.obj X ⟶ τ (σ Y)))\n                          (Eq.mpr (_ : (φ.obj X ⟶ τ (σ Y)) = (φ.obj X ⟶ φ.obj Y)) (φ.map f))) }.obj\n              (σ X✝) =\n            Φ.obj (σ X✝))\n        ({ obj := τ,\n              map :=\n                @PushQuiver.rec V inst✝¹ W σ (fun X Y x => τ X ⟶ τ Y) fun X Y f =>\n                  id\n                    (Eq.mpr (_ : (τ (σ X) ⟶ τ (σ Y)) = (φ.obj X ⟶ τ (σ Y)))\n                      (Eq.mpr (_ : (φ.obj X ⟶ τ (σ Y)) = (φ.obj X ⟶ φ.obj Y)) (φ.map f))) }.map\n          (PushQuiver.arrow f✝)))\n[PROOFSTEP]\nsubst_vars\n[GOAL]\ncase h_map.arrow\nV : Type u_1\ninst✝¹ : Quiver V\nW : Type u_2\nσ : V → W\nW' : Type u_3\ninst✝ : Quiver W'\nΦ : Push σ ⥤q W'\nX✝ Y✝ : V\nf✝ : X✝ ⟶ Y✝\nh : ∀ (x : V), (of σ ⋙q Φ).obj x = Φ.obj (σ x)\n⊢ Φ.map (PushQuiver.arrow f✝) =\n    Eq.recOn\n      (_ :\n        { obj := Φ.obj,\n                map :=\n                  @PushQuiver.rec V inst✝¹ W σ (fun X Y x => Φ.obj X ⟶ Φ.obj Y) fun X Y f =>\n                    id\n                      (Eq.mpr (_ : (Φ.obj (σ X) ⟶ Φ.obj (σ Y)) = ((of σ ⋙q Φ).obj X ⟶ Φ.obj (σ Y)))\n                        (Eq.mpr (_ : ((of σ ⋙q Φ).obj X ⟶ Φ.obj (σ Y)) = ((of σ ⋙q Φ).obj X ⟶ (of σ ⋙q Φ).obj Y))\n                          ((of σ ⋙q Φ).map f))) }.obj\n            (σ Y✝) =\n          Φ.obj (σ Y✝))\n      (Eq.recOn\n        (_ :\n          { obj := Φ.obj,\n                  map :=\n                    @PushQuiver.rec V inst✝¹ W σ (fun X Y x => Φ.obj X ⟶ Φ.obj Y) fun X Y f =>\n                      id\n                        (Eq.mpr (_ : (Φ.obj (σ X) ⟶ Φ.obj (σ Y)) = ((of σ ⋙q Φ).obj X ⟶ Φ.obj (σ Y)))\n                          (Eq.mpr (_ : ((of σ ⋙q Φ).obj X ⟶ Φ.obj (σ Y)) = ((of σ ⋙q Φ).obj X ⟶ (of σ ⋙q Φ).obj Y))\n                            ((of σ ⋙q Φ).map f))) }.obj\n              (σ X✝) =\n            Φ.obj (σ X✝))\n        ({ obj := Φ.obj,\n              map :=\n                @PushQuiver.rec V inst✝¹ W σ (fun X Y x => Φ.obj X ⟶ Φ.obj Y) fun X Y f =>\n                  id\n                    (Eq.mpr (_ : (Φ.obj (σ X) ⟶ Φ.obj (σ Y)) = ((of σ ⋙q Φ).obj X ⟶ Φ.obj (σ Y)))\n                      (Eq.mpr (_ : ((of σ ⋙q Φ).obj X ⟶ Φ.obj (σ Y)) = ((of σ ⋙q Φ).obj X ⟶ (of σ ⋙q Φ).obj Y))\n                        ((of σ ⋙q Φ).map f))) }.map\n          (PushQuiver.arrow f✝)))\n[PROOFSTEP]\nsimp only [Prefunctor.comp_map, cast_eq]\n[GOAL]\ncase h_map.arrow\nV : Type u_1\ninst✝¹ : Quiver V\nW : Type u_2\nσ : V → W\nW' : Type u_3\ninst✝ : Quiver W'\nΦ : Push σ ⥤q W'\nX✝ Y✝ : V\nf✝ : X✝ ⟶ Y✝\nh : ∀ (x : V), (of σ ⋙q Φ).obj x = Φ.obj (σ x)\n⊢ Φ.map (PushQuiver.arrow f✝) =\n    id\n      (Eq.mpr (_ : (Φ.obj (σ X✝) ⟶ Φ.obj (σ Y✝)) = ((of σ ⋙q Φ).obj X✝ ⟶ Φ.obj (σ Y✝)))\n        (Eq.mpr (_ : ((of σ ⋙q Φ).obj X✝ ⟶ Φ.obj (σ Y✝)) = ((of σ ⋙q Φ).obj X✝ ⟶ (of σ ⋙q Φ).obj Y✝))\n          (Φ.map ((of σ).map f✝))))\n[PROOFSTEP]\nrfl\n", "meta": {"mathlib_filename": "Mathlib.Combinatorics.Quiver.Push", "llama_tokens": 7797, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8311430394931455, "lm_q2_score": 0.6113819732941511, "lm_q1q2_score": 0.5081458715750179}}
{"text": "[GOAL]\nR : Type u\ninst✝⁴ : CommRing R\nn G : Type v\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nα β : Type v\ninst✝¹ : DecidableEq α\nM : Matrix n n R\ninst✝ : Nontrivial R\ni j : n\n⊢ natDegree (charmatrix M i j) = if i = j then 1 else 0\n[PROOFSTEP]\nby_cases i = j\n[GOAL]\nR : Type u\ninst✝⁴ : CommRing R\nn G : Type v\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nα β : Type v\ninst✝¹ : DecidableEq α\nM : Matrix n n R\ninst✝ : Nontrivial R\ni j : n\n⊢ natDegree (charmatrix M i j) = if i = j then 1 else 0\n[PROOFSTEP]\nby_cases i = j\n[GOAL]\ncase pos\nR : Type u\ninst✝⁴ : CommRing R\nn G : Type v\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nα β : Type v\ninst✝¹ : DecidableEq α\nM : Matrix n n R\ninst✝ : Nontrivial R\ni j : n\nh : i = j\n⊢ natDegree (charmatrix M i j) = if i = j then 1 else 0\n[PROOFSTEP]\nsimp [h, ← degree_eq_iff_natDegree_eq_of_pos (Nat.succ_pos 0)]\n[GOAL]\ncase neg\nR : Type u\ninst✝⁴ : CommRing R\nn G : Type v\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nα β : Type v\ninst✝¹ : DecidableEq α\nM : Matrix n n R\ninst✝ : Nontrivial R\ni j : n\nh : ¬i = j\n⊢ natDegree (charmatrix M i j) = if i = j then 1 else 0\n[PROOFSTEP]\nsimp [h, ← degree_eq_iff_natDegree_eq_of_pos (Nat.succ_pos 0)]\n[GOAL]\nR : Type u\ninst✝³ : CommRing R\nn G : Type v\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\nα β : Type v\ninst✝ : DecidableEq α\nM : Matrix n n R\ni j : n\n⊢ natDegree (charmatrix M i j) ≤ if i = j then 1 else 0\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nR : Type u\ninst✝³ : CommRing R\nn G : Type v\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\nα β : Type v\ninst✝ : DecidableEq α\nM : Matrix n n R\ni j : n\nh : i = j\n⊢ natDegree (charmatrix M i j) ≤ 1\n[PROOFSTEP]\nsimp [h, natDegree_X_sub_C_le]\n[GOAL]\ncase neg\nR : Type u\ninst✝³ : CommRing R\nn G : Type v\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\nα β : Type v\ninst✝ : DecidableEq α\nM : Matrix n n R\ni j : n\nh : ¬i = j\n⊢ natDegree (charmatrix M i j) ≤ 0\n[PROOFSTEP]\nsimp [h, natDegree_X_sub_C_le]\n[GOAL]\nR : Type u\ninst✝³ : CommRing R\nn G : Type v\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\nα β : Type v\ninst✝ : DecidableEq α\nM : Matrix n n R\n⊢ degree (charpoly M - ∏ i : n, (X - ↑C (M i i))) < ↑(Fintype.card n - 1)\n[PROOFSTEP]\nrw [charpoly, det_apply', ← insert_erase (mem_univ (Equiv.refl n)), sum_insert (not_mem_erase (Equiv.refl n) univ),\n  add_comm]\n[GOAL]\nR : Type u\ninst✝³ : CommRing R\nn G : Type v\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\nα β : Type v\ninst✝ : DecidableEq α\nM : Matrix n n R\n⊢ degree\n      (∑ x in Finset.erase univ (Equiv.refl n), ↑↑(↑Equiv.Perm.sign x) * ∏ i : n, charmatrix M (↑x i) i +\n          ↑↑(↑Equiv.Perm.sign (Equiv.refl n)) * ∏ i : n, charmatrix M (↑(Equiv.refl n) i) i -\n        ∏ i : n, (X - ↑C (M i i))) <\n    ↑(Fintype.card n - 1)\n[PROOFSTEP]\nsimp only [charmatrix_apply_eq, one_mul, Equiv.Perm.sign_refl, id.def, Int.cast_one, Units.val_one, add_sub_cancel,\n  Equiv.coe_refl]\n[GOAL]\nR : Type u\ninst✝³ : CommRing R\nn G : Type v\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\nα β : Type v\ninst✝ : DecidableEq α\nM : Matrix n n R\n⊢ degree (∑ x in Finset.erase univ (Equiv.refl n), ↑↑(↑Equiv.Perm.sign x) * ∏ x_1 : n, charmatrix M (↑x x_1) x_1) <\n    ↑(Fintype.card n - 1)\n[PROOFSTEP]\nrw [← mem_degreeLT]\n[GOAL]\nR : Type u\ninst✝³ : CommRing R\nn G : Type v\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\nα β : Type v\ninst✝ : DecidableEq α\nM : Matrix n n R\n⊢ ∑ x in Finset.erase univ (Equiv.refl n), ↑↑(↑Equiv.Perm.sign x) * ∏ x_1 : n, charmatrix M (↑x x_1) x_1 ∈\n    degreeLT R (Fintype.card n - 1)\n[PROOFSTEP]\napply Submodule.sum_mem (degreeLT R (Fintype.card n - 1))\n[GOAL]\nR : Type u\ninst✝³ : CommRing R\nn G : Type v\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\nα β : Type v\ninst✝ : DecidableEq α\nM : Matrix n n R\n⊢ ∀ (c : n ≃ n),\n    c ∈ Finset.erase univ (Equiv.refl n) →\n      ↑↑(↑Equiv.Perm.sign c) * ∏ x : n, charmatrix M (↑c x) x ∈ degreeLT R (Fintype.card n - 1)\n[PROOFSTEP]\nintro c hc\n[GOAL]\nR : Type u\ninst✝³ : CommRing R\nn G : Type v\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\nα β : Type v\ninst✝ : DecidableEq α\nM : Matrix n n R\nc : n ≃ n\nhc : c ∈ Finset.erase univ (Equiv.refl n)\n⊢ ↑↑(↑Equiv.Perm.sign c) * ∏ x : n, charmatrix M (↑c x) x ∈ degreeLT R (Fintype.card n - 1)\n[PROOFSTEP]\nrw [← C_eq_int_cast, C_mul']\n[GOAL]\nR : Type u\ninst✝³ : CommRing R\nn G : Type v\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\nα β : Type v\ninst✝ : DecidableEq α\nM : Matrix n n R\nc : n ≃ n\nhc : c ∈ Finset.erase univ (Equiv.refl n)\n⊢ ↑↑(↑Equiv.Perm.sign c) • ∏ x : n, charmatrix M (↑c x) x ∈ degreeLT R (Fintype.card n - 1)\n[PROOFSTEP]\napply Submodule.smul_mem (degreeLT R (Fintype.card n - 1)) ↑↑(Equiv.Perm.sign c)\n[GOAL]\nR : Type u\ninst✝³ : CommRing R\nn G : Type v\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\nα β : Type v\ninst✝ : DecidableEq α\nM : Matrix n n R\nc : n ≃ n\nhc : c ∈ Finset.erase univ (Equiv.refl n)\n⊢ ∏ x : n, charmatrix M (↑c x) x ∈ degreeLT R (Fintype.card n - 1)\n[PROOFSTEP]\nrw [mem_degreeLT]\n[GOAL]\nR : Type u\ninst✝³ : CommRing R\nn G : Type v\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\nα β : Type v\ninst✝ : DecidableEq α\nM : Matrix n n R\nc : n ≃ n\nhc : c ∈ Finset.erase univ (Equiv.refl n)\n⊢ degree (∏ x : n, charmatrix M (↑c x) x) < ↑(Fintype.card n - 1)\n[PROOFSTEP]\napply lt_of_le_of_lt degree_le_natDegree _\n[GOAL]\nR : Type u\ninst✝³ : CommRing R\nn G : Type v\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\nα β : Type v\ninst✝ : DecidableEq α\nM : Matrix n n R\nc : n ≃ n\nhc : c ∈ Finset.erase univ (Equiv.refl n)\n⊢ ↑(natDegree (∏ x : n, charmatrix M (↑c x) x)) < ↑(Fintype.card n - 1)\n[PROOFSTEP]\nrw [Nat.cast_withBot, Nat.cast_withBot]\n  -- porting note: added\n[GOAL]\nR : Type u\ninst✝³ : CommRing R\nn G : Type v\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\nα β : Type v\ninst✝ : DecidableEq α\nM : Matrix n n R\nc : n ≃ n\nhc : c ∈ Finset.erase univ (Equiv.refl n)\n⊢ ↑(natDegree (∏ x : n, charmatrix M (↑c x) x)) < ↑(Fintype.card n - 1)\n[PROOFSTEP]\nrw [WithBot.coe_lt_coe]\n[GOAL]\nR : Type u\ninst✝³ : CommRing R\nn G : Type v\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\nα β : Type v\ninst✝ : DecidableEq α\nM : Matrix n n R\nc : n ≃ n\nhc : c ∈ Finset.erase univ (Equiv.refl n)\n⊢ natDegree (∏ x : n, charmatrix M (↑c x) x) < Fintype.card n - 1\n[PROOFSTEP]\napply lt_of_le_of_lt _ (Equiv.Perm.fixed_point_card_lt_of_ne_one (ne_of_mem_erase hc))\n[GOAL]\nR : Type u\ninst✝³ : CommRing R\nn G : Type v\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\nα β : Type v\ninst✝ : DecidableEq α\nM : Matrix n n R\nc : n ≃ n\nhc : c ∈ Finset.erase univ (Equiv.refl n)\n⊢ natDegree (∏ x : n, charmatrix M (↑c x) x) ≤ card (filter (fun x => ↑c x = x) univ)\n[PROOFSTEP]\napply le_trans (Polynomial.natDegree_prod_le univ fun i : n => charmatrix M (c i) i) _\n[GOAL]\nR : Type u\ninst✝³ : CommRing R\nn G : Type v\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\nα β : Type v\ninst✝ : DecidableEq α\nM : Matrix n n R\nc : n ≃ n\nhc : c ∈ Finset.erase univ (Equiv.refl n)\n⊢ ∑ i : n, natDegree (charmatrix M (↑c i) i) ≤ card (filter (fun x => ↑c x = x) univ)\n[PROOFSTEP]\nrw [card_eq_sum_ones]\n[GOAL]\nR : Type u\ninst✝³ : CommRing R\nn G : Type v\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\nα β : Type v\ninst✝ : DecidableEq α\nM : Matrix n n R\nc : n ≃ n\nhc : c ∈ Finset.erase univ (Equiv.refl n)\n⊢ ∑ i : n, natDegree (charmatrix M (↑c i) i) ≤ ∑ x in filter (fun x => ↑c x = x) univ, 1\n[PROOFSTEP]\nrw [sum_filter]\n[GOAL]\nR : Type u\ninst✝³ : CommRing R\nn G : Type v\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\nα β : Type v\ninst✝ : DecidableEq α\nM : Matrix n n R\nc : n ≃ n\nhc : c ∈ Finset.erase univ (Equiv.refl n)\n⊢ ∑ i : n, natDegree (charmatrix M (↑c i) i) ≤ ∑ a : n, if ↑c a = a then 1 else 0\n[PROOFSTEP]\napply sum_le_sum\n[GOAL]\ncase h\nR : Type u\ninst✝³ : CommRing R\nn G : Type v\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\nα β : Type v\ninst✝ : DecidableEq α\nM : Matrix n n R\nc : n ≃ n\nhc : c ∈ Finset.erase univ (Equiv.refl n)\n⊢ ∀ (i : n), i ∈ univ → natDegree (charmatrix M (↑c i) i) ≤ if ↑c i = i then 1 else 0\n[PROOFSTEP]\nintros\n[GOAL]\ncase h\nR : Type u\ninst✝³ : CommRing R\nn G : Type v\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\nα β : Type v\ninst✝ : DecidableEq α\nM : Matrix n n R\nc : n ≃ n\nhc : c ∈ Finset.erase univ (Equiv.refl n)\ni✝ : n\na✝ : i✝ ∈ univ\n⊢ natDegree (charmatrix M (↑c i✝) i✝) ≤ if ↑c i✝ = i✝ then 1 else 0\n[PROOFSTEP]\napply charmatrix_apply_natDegree_le\n[GOAL]\nR : Type u\ninst✝³ : CommRing R\nn G : Type v\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\nα β : Type v\ninst✝ : DecidableEq α\nM : Matrix n n R\nk : ℕ\nh : Fintype.card n - 1 ≤ k\n⊢ coeff (charpoly M) k = coeff (∏ i : n, (X - ↑C (M i i))) k\n[PROOFSTEP]\napply eq_of_sub_eq_zero\n[GOAL]\ncase h\nR : Type u\ninst✝³ : CommRing R\nn G : Type v\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\nα β : Type v\ninst✝ : DecidableEq α\nM : Matrix n n R\nk : ℕ\nh : Fintype.card n - 1 ≤ k\n⊢ coeff (charpoly M) k - coeff (∏ i : n, (X - ↑C (M i i))) k = 0\n[PROOFSTEP]\nrw [← coeff_sub]\n[GOAL]\ncase h\nR : Type u\ninst✝³ : CommRing R\nn G : Type v\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\nα β : Type v\ninst✝ : DecidableEq α\nM : Matrix n n R\nk : ℕ\nh : Fintype.card n - 1 ≤ k\n⊢ coeff (charpoly M - ∏ i : n, (X - ↑C (M i i))) k = 0\n[PROOFSTEP]\napply Polynomial.coeff_eq_zero_of_degree_lt\n[GOAL]\ncase h.h\nR : Type u\ninst✝³ : CommRing R\nn G : Type v\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\nα β : Type v\ninst✝ : DecidableEq α\nM : Matrix n n R\nk : ℕ\nh : Fintype.card n - 1 ≤ k\n⊢ degree (charpoly M - ∏ i : n, (X - ↑C (M i i))) < ↑k\n[PROOFSTEP]\napply lt_of_lt_of_le (charpoly_sub_diagonal_degree_lt M) ?_\n[GOAL]\nR : Type u\ninst✝³ : CommRing R\nn G : Type v\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\nα β : Type v\ninst✝ : DecidableEq α\nM : Matrix n n R\nk : ℕ\nh : Fintype.card n - 1 ≤ k\n⊢ ↑(Fintype.card n - 1) ≤ ↑k\n[PROOFSTEP]\nrw [Nat.cast_withBot, Nat.cast_withBot]\n  -- porting note: added\n[GOAL]\nR : Type u\ninst✝³ : CommRing R\nn G : Type v\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\nα β : Type v\ninst✝ : DecidableEq α\nM : Matrix n n R\nk : ℕ\nh : Fintype.card n - 1 ≤ k\n⊢ ↑(Fintype.card n - 1) ≤ ↑k\n[PROOFSTEP]\nrw [WithBot.coe_le_coe]\n[GOAL]\nR : Type u\ninst✝³ : CommRing R\nn G : Type v\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\nα β : Type v\ninst✝ : DecidableEq α\nM : Matrix n n R\nk : ℕ\nh : Fintype.card n - 1 ≤ k\n⊢ Fintype.card n - 1 ≤ k\n[PROOFSTEP]\napply h\n[GOAL]\nR : Type u\ninst✝³ : CommRing R\nn G : Type v\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\nα β : Type v\ninst✝ : DecidableEq α\nM✝ : Matrix n n R\nh : Fintype.card n = 0\nM : Matrix n n R\n⊢ det M = 1\n[PROOFSTEP]\nrw [Fintype.card_eq_zero_iff] at h \n[GOAL]\nR : Type u\ninst✝³ : CommRing R\nn G : Type v\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\nα β : Type v\ninst✝ : DecidableEq α\nM✝ : Matrix n n R\nh : IsEmpty n\nM : Matrix n n R\n⊢ det M = 1\n[PROOFSTEP]\nsuffices M = 1 by simp [this]\n[GOAL]\nR : Type u\ninst✝³ : CommRing R\nn G : Type v\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\nα β : Type v\ninst✝ : DecidableEq α\nM✝ : Matrix n n R\nh : IsEmpty n\nM : Matrix n n R\nthis : M = 1\n⊢ det M = 1\n[PROOFSTEP]\nsimp [this]\n[GOAL]\nR : Type u\ninst✝³ : CommRing R\nn G : Type v\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\nα β : Type v\ninst✝ : DecidableEq α\nM✝ : Matrix n n R\nh : IsEmpty n\nM : Matrix n n R\n⊢ M = 1\n[PROOFSTEP]\next i\n[GOAL]\ncase a.h\nR : Type u\ninst✝³ : CommRing R\nn G : Type v\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\nα β : Type v\ninst✝ : DecidableEq α\nM✝ : Matrix n n R\nh : IsEmpty n\nM : Matrix n n R\ni x✝ : n\n⊢ M i x✝ = OfNat.ofNat 1 i x✝\n[PROOFSTEP]\nexact h.elim i\n[GOAL]\nR : Type u\ninst✝⁴ : CommRing R\nn G : Type v\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nα β : Type v\ninst✝¹ : DecidableEq α\nM✝ : Matrix n n R\ninst✝ : Nontrivial R\nM : Matrix n n R\n⊢ degree (charpoly M) = ↑(Fintype.card n)\n[PROOFSTEP]\nby_cases h : Fintype.card n = 0\n[GOAL]\ncase pos\nR : Type u\ninst✝⁴ : CommRing R\nn G : Type v\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nα β : Type v\ninst✝¹ : DecidableEq α\nM✝ : Matrix n n R\ninst✝ : Nontrivial R\nM : Matrix n n R\nh : Fintype.card n = 0\n⊢ degree (charpoly M) = ↑(Fintype.card n)\n[PROOFSTEP]\nrw [h]\n[GOAL]\ncase pos\nR : Type u\ninst✝⁴ : CommRing R\nn G : Type v\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nα β : Type v\ninst✝¹ : DecidableEq α\nM✝ : Matrix n n R\ninst✝ : Nontrivial R\nM : Matrix n n R\nh : Fintype.card n = 0\n⊢ degree (charpoly M) = ↑0\n[PROOFSTEP]\nunfold charpoly\n[GOAL]\ncase pos\nR : Type u\ninst✝⁴ : CommRing R\nn G : Type v\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nα β : Type v\ninst✝¹ : DecidableEq α\nM✝ : Matrix n n R\ninst✝ : Nontrivial R\nM : Matrix n n R\nh : Fintype.card n = 0\n⊢ degree (det (charmatrix M)) = ↑0\n[PROOFSTEP]\nrw [det_of_card_zero]\n[GOAL]\ncase pos\nR : Type u\ninst✝⁴ : CommRing R\nn G : Type v\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nα β : Type v\ninst✝¹ : DecidableEq α\nM✝ : Matrix n n R\ninst✝ : Nontrivial R\nM : Matrix n n R\nh : Fintype.card n = 0\n⊢ degree 1 = ↑0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase pos.h\nR : Type u\ninst✝⁴ : CommRing R\nn G : Type v\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nα β : Type v\ninst✝¹ : DecidableEq α\nM✝ : Matrix n n R\ninst✝ : Nontrivial R\nM : Matrix n n R\nh : Fintype.card n = 0\n⊢ Fintype.card n = 0\n[PROOFSTEP]\nassumption\n[GOAL]\ncase neg\nR : Type u\ninst✝⁴ : CommRing R\nn G : Type v\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nα β : Type v\ninst✝¹ : DecidableEq α\nM✝ : Matrix n n R\ninst✝ : Nontrivial R\nM : Matrix n n R\nh : ¬Fintype.card n = 0\n⊢ degree (charpoly M) = ↑(Fintype.card n)\n[PROOFSTEP]\nrw [← sub_add_cancel M.charpoly (∏ i : n, (X - C (M i i)))]\n  -- porting note: added `↑` in front of `Fintype.card n`\n[GOAL]\ncase neg\nR : Type u\ninst✝⁴ : CommRing R\nn G : Type v\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nα β : Type v\ninst✝¹ : DecidableEq α\nM✝ : Matrix n n R\ninst✝ : Nontrivial R\nM : Matrix n n R\nh : ¬Fintype.card n = 0\n⊢ degree (charpoly M - ∏ i : n, (X - ↑C (M i i)) + ∏ i : n, (X - ↑C (M i i))) = ↑(Fintype.card n)\n[PROOFSTEP]\nhave h1 : (∏ i : n, (X - C (M i i))).degree = ↑(Fintype.card n) :=\n  by\n  rw [degree_eq_iff_natDegree_eq_of_pos (Nat.pos_of_ne_zero h), natDegree_prod']\n  simp_rw [natDegree_X_sub_C]\n  rw [← Finset.card_univ, sum_const, smul_eq_mul, mul_one]\n  simp_rw [(monic_X_sub_C _).leadingCoeff]\n  simp\n[GOAL]\nR : Type u\ninst✝⁴ : CommRing R\nn G : Type v\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nα β : Type v\ninst✝¹ : DecidableEq α\nM✝ : Matrix n n R\ninst✝ : Nontrivial R\nM : Matrix n n R\nh : ¬Fintype.card n = 0\n⊢ degree (∏ i : n, (X - ↑C (M i i))) = ↑(Fintype.card n)\n[PROOFSTEP]\nrw [degree_eq_iff_natDegree_eq_of_pos (Nat.pos_of_ne_zero h), natDegree_prod']\n[GOAL]\nR : Type u\ninst✝⁴ : CommRing R\nn G : Type v\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nα β : Type v\ninst✝¹ : DecidableEq α\nM✝ : Matrix n n R\ninst✝ : Nontrivial R\nM : Matrix n n R\nh : ¬Fintype.card n = 0\n⊢ ∑ i : n, natDegree (X - ↑C (M i i)) = Fintype.card n\ncase h\nR : Type u\ninst✝⁴ : CommRing R\nn G : Type v\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nα β : Type v\ninst✝¹ : DecidableEq α\nM✝ : Matrix n n R\ninst✝ : Nontrivial R\nM : Matrix n n R\nh : ¬Fintype.card n = 0\n⊢ ∏ i : n, leadingCoeff (X - ↑C (M i i)) ≠ 0\n[PROOFSTEP]\nsimp_rw [natDegree_X_sub_C]\n[GOAL]\nR : Type u\ninst✝⁴ : CommRing R\nn G : Type v\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nα β : Type v\ninst✝¹ : DecidableEq α\nM✝ : Matrix n n R\ninst✝ : Nontrivial R\nM : Matrix n n R\nh : ¬Fintype.card n = 0\n⊢ ∑ x : n, 1 = Fintype.card n\ncase h\nR : Type u\ninst✝⁴ : CommRing R\nn G : Type v\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nα β : Type v\ninst✝¹ : DecidableEq α\nM✝ : Matrix n n R\ninst✝ : Nontrivial R\nM : Matrix n n R\nh : ¬Fintype.card n = 0\n⊢ ∏ i : n, leadingCoeff (X - ↑C (M i i)) ≠ 0\n[PROOFSTEP]\nrw [← Finset.card_univ, sum_const, smul_eq_mul, mul_one]\n[GOAL]\ncase h\nR : Type u\ninst✝⁴ : CommRing R\nn G : Type v\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nα β : Type v\ninst✝¹ : DecidableEq α\nM✝ : Matrix n n R\ninst✝ : Nontrivial R\nM : Matrix n n R\nh : ¬Fintype.card n = 0\n⊢ ∏ i : n, leadingCoeff (X - ↑C (M i i)) ≠ 0\n[PROOFSTEP]\nsimp_rw [(monic_X_sub_C _).leadingCoeff]\n[GOAL]\ncase h\nR : Type u\ninst✝⁴ : CommRing R\nn G : Type v\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nα β : Type v\ninst✝¹ : DecidableEq α\nM✝ : Matrix n n R\ninst✝ : Nontrivial R\nM : Matrix n n R\nh : ¬Fintype.card n = 0\n⊢ ∏ x : n, 1 ≠ 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg\nR : Type u\ninst✝⁴ : CommRing R\nn G : Type v\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nα β : Type v\ninst✝¹ : DecidableEq α\nM✝ : Matrix n n R\ninst✝ : Nontrivial R\nM : Matrix n n R\nh : ¬Fintype.card n = 0\nh1 : degree (∏ i : n, (X - ↑C (M i i))) = ↑(Fintype.card n)\n⊢ degree (charpoly M - ∏ i : n, (X - ↑C (M i i)) + ∏ i : n, (X - ↑C (M i i))) = ↑(Fintype.card n)\n[PROOFSTEP]\nrw [degree_add_eq_right_of_degree_lt]\n[GOAL]\ncase neg\nR : Type u\ninst✝⁴ : CommRing R\nn G : Type v\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nα β : Type v\ninst✝¹ : DecidableEq α\nM✝ : Matrix n n R\ninst✝ : Nontrivial R\nM : Matrix n n R\nh : ¬Fintype.card n = 0\nh1 : degree (∏ i : n, (X - ↑C (M i i))) = ↑(Fintype.card n)\n⊢ degree (∏ i : n, (X - ↑C (M i i))) = ↑(Fintype.card n)\ncase neg\nR : Type u\ninst✝⁴ : CommRing R\nn G : Type v\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nα β : Type v\ninst✝¹ : DecidableEq α\nM✝ : Matrix n n R\ninst✝ : Nontrivial R\nM : Matrix n n R\nh : ¬Fintype.card n = 0\nh1 : degree (∏ i : n, (X - ↑C (M i i))) = ↑(Fintype.card n)\n⊢ degree (charpoly M - ∏ i : n, (X - ↑C (M i i))) < degree (∏ i : n, (X - ↑C (M i i)))\n[PROOFSTEP]\nexact h1\n[GOAL]\ncase neg\nR : Type u\ninst✝⁴ : CommRing R\nn G : Type v\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nα β : Type v\ninst✝¹ : DecidableEq α\nM✝ : Matrix n n R\ninst✝ : Nontrivial R\nM : Matrix n n R\nh : ¬Fintype.card n = 0\nh1 : degree (∏ i : n, (X - ↑C (M i i))) = ↑(Fintype.card n)\n⊢ degree (charpoly M - ∏ i : n, (X - ↑C (M i i))) < degree (∏ i : n, (X - ↑C (M i i)))\n[PROOFSTEP]\nrw [h1]\n[GOAL]\ncase neg\nR : Type u\ninst✝⁴ : CommRing R\nn G : Type v\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nα β : Type v\ninst✝¹ : DecidableEq α\nM✝ : Matrix n n R\ninst✝ : Nontrivial R\nM : Matrix n n R\nh : ¬Fintype.card n = 0\nh1 : degree (∏ i : n, (X - ↑C (M i i))) = ↑(Fintype.card n)\n⊢ degree (charpoly M - ∏ i : n, (X - ↑C (M i i))) < ↑(Fintype.card n)\n[PROOFSTEP]\napply lt_trans (charpoly_sub_diagonal_degree_lt M)\n[GOAL]\ncase neg\nR : Type u\ninst✝⁴ : CommRing R\nn G : Type v\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nα β : Type v\ninst✝¹ : DecidableEq α\nM✝ : Matrix n n R\ninst✝ : Nontrivial R\nM : Matrix n n R\nh : ¬Fintype.card n = 0\nh1 : degree (∏ i : n, (X - ↑C (M i i))) = ↑(Fintype.card n)\n⊢ ↑(Fintype.card n - 1) < ↑(Fintype.card n)\n[PROOFSTEP]\nrw [Nat.cast_withBot, Nat.cast_withBot]\n  -- porting note: added\n[GOAL]\ncase neg\nR : Type u\ninst✝⁴ : CommRing R\nn G : Type v\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nα β : Type v\ninst✝¹ : DecidableEq α\nM✝ : Matrix n n R\ninst✝ : Nontrivial R\nM : Matrix n n R\nh : ¬Fintype.card n = 0\nh1 : degree (∏ i : n, (X - ↑C (M i i))) = ↑(Fintype.card n)\n⊢ ↑(Fintype.card n - 1) < ↑(Fintype.card n)\n[PROOFSTEP]\nrw [WithBot.coe_lt_coe]\n[GOAL]\ncase neg\nR : Type u\ninst✝⁴ : CommRing R\nn G : Type v\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nα β : Type v\ninst✝¹ : DecidableEq α\nM✝ : Matrix n n R\ninst✝ : Nontrivial R\nM : Matrix n n R\nh : ¬Fintype.card n = 0\nh1 : degree (∏ i : n, (X - ↑C (M i i))) = ↑(Fintype.card n)\n⊢ Fintype.card n - 1 < Fintype.card n\n[PROOFSTEP]\nrw [← Nat.pred_eq_sub_one]\n[GOAL]\ncase neg\nR : Type u\ninst✝⁴ : CommRing R\nn G : Type v\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nα β : Type v\ninst✝¹ : DecidableEq α\nM✝ : Matrix n n R\ninst✝ : Nontrivial R\nM : Matrix n n R\nh : ¬Fintype.card n = 0\nh1 : degree (∏ i : n, (X - ↑C (M i i))) = ↑(Fintype.card n)\n⊢ Nat.pred (Fintype.card n) < Fintype.card n\n[PROOFSTEP]\napply Nat.pred_lt\n[GOAL]\ncase neg.a\nR : Type u\ninst✝⁴ : CommRing R\nn G : Type v\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nα β : Type v\ninst✝¹ : DecidableEq α\nM✝ : Matrix n n R\ninst✝ : Nontrivial R\nM : Matrix n n R\nh : ¬Fintype.card n = 0\nh1 : degree (∏ i : n, (X - ↑C (M i i))) = ↑(Fintype.card n)\n⊢ Fintype.card n ≠ 0\n[PROOFSTEP]\napply h\n[GOAL]\nR : Type u\ninst✝³ : CommRing R\nn G : Type v\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\nα β : Type v\ninst✝ : DecidableEq α\nM✝ M : Matrix n n R\n⊢ Monic (charpoly M)\n[PROOFSTEP]\nnontriviality R\n[GOAL]\nR : Type u\ninst✝³ : CommRing R\nn G : Type v\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\nα β : Type v\ninst✝ : DecidableEq α\nM✝ M : Matrix n n R\n✝ : Nontrivial R\n⊢ Monic (charpoly M)\n[PROOFSTEP]\nby_cases h : Fintype.card n = 0\n[GOAL]\ncase pos\nR : Type u\ninst✝³ : CommRing R\nn G : Type v\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\nα β : Type v\ninst✝ : DecidableEq α\nM✝ M : Matrix n n R\n✝ : Nontrivial R\nh : Fintype.card n = 0\n⊢ Monic (charpoly M)\n[PROOFSTEP]\nrw [charpoly, det_of_card_zero h]\n[GOAL]\ncase pos\nR : Type u\ninst✝³ : CommRing R\nn G : Type v\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\nα β : Type v\ninst✝ : DecidableEq α\nM✝ M : Matrix n n R\n✝ : Nontrivial R\nh : Fintype.card n = 0\n⊢ Monic 1\n[PROOFSTEP]\napply monic_one\n[GOAL]\ncase neg\nR : Type u\ninst✝³ : CommRing R\nn G : Type v\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\nα β : Type v\ninst✝ : DecidableEq α\nM✝ M : Matrix n n R\n✝ : Nontrivial R\nh : ¬Fintype.card n = 0\n⊢ Monic (charpoly M)\n[PROOFSTEP]\nhave mon : (∏ i : n, (X - C (M i i))).Monic :=\n  by\n  apply monic_prod_of_monic univ fun i : n => X - C (M i i)\n  simp [monic_X_sub_C]\n[GOAL]\nR : Type u\ninst✝³ : CommRing R\nn G : Type v\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\nα β : Type v\ninst✝ : DecidableEq α\nM✝ M : Matrix n n R\n✝ : Nontrivial R\nh : ¬Fintype.card n = 0\n⊢ Monic (∏ i : n, (X - ↑C (M i i)))\n[PROOFSTEP]\napply monic_prod_of_monic univ fun i : n => X - C (M i i)\n[GOAL]\nR : Type u\ninst✝³ : CommRing R\nn G : Type v\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\nα β : Type v\ninst✝ : DecidableEq α\nM✝ M : Matrix n n R\n✝ : Nontrivial R\nh : ¬Fintype.card n = 0\n⊢ ∀ (i : n), i ∈ univ → Monic (X - ↑C (M i i))\n[PROOFSTEP]\nsimp [monic_X_sub_C]\n[GOAL]\ncase neg\nR : Type u\ninst✝³ : CommRing R\nn G : Type v\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\nα β : Type v\ninst✝ : DecidableEq α\nM✝ M : Matrix n n R\n✝ : Nontrivial R\nh : ¬Fintype.card n = 0\nmon : Monic (∏ i : n, (X - ↑C (M i i)))\n⊢ Monic (charpoly M)\n[PROOFSTEP]\nrw [← sub_add_cancel (∏ i : n, (X - C (M i i))) M.charpoly] at mon \n[GOAL]\ncase neg\nR : Type u\ninst✝³ : CommRing R\nn G : Type v\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\nα β : Type v\ninst✝ : DecidableEq α\nM✝ M : Matrix n n R\n✝ : Nontrivial R\nh : ¬Fintype.card n = 0\nmon : Monic (∏ i : n, (X - ↑C (M i i)) - charpoly M + charpoly M)\n⊢ Monic (charpoly M)\n[PROOFSTEP]\nrw [Monic] at *\n[GOAL]\ncase neg\nR : Type u\ninst✝³ : CommRing R\nn G : Type v\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\nα β : Type v\ninst✝ : DecidableEq α\nM✝ M : Matrix n n R\n✝ : Nontrivial R\nh : ¬Fintype.card n = 0\nmon : leadingCoeff (∏ i : n, (X - ↑C (M i i)) - charpoly M + charpoly M) = 1\n⊢ leadingCoeff (charpoly M) = 1\n[PROOFSTEP]\nrwa [leadingCoeff_add_of_degree_lt] at mon \n[GOAL]\ncase neg\nR : Type u\ninst✝³ : CommRing R\nn G : Type v\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\nα β : Type v\ninst✝ : DecidableEq α\nM✝ M : Matrix n n R\n✝ : Nontrivial R\nh : ¬Fintype.card n = 0\nmon : leadingCoeff (∏ i : n, (X - ↑C (M i i)) - charpoly M + charpoly M) = 1\n⊢ degree (∏ i : n, (X - ↑C (M i i)) - charpoly M) < degree (charpoly M)\n[PROOFSTEP]\nrw [charpoly_degree_eq_dim]\n[GOAL]\ncase neg\nR : Type u\ninst✝³ : CommRing R\nn G : Type v\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\nα β : Type v\ninst✝ : DecidableEq α\nM✝ M : Matrix n n R\n✝ : Nontrivial R\nh : ¬Fintype.card n = 0\nmon : leadingCoeff (∏ i : n, (X - ↑C (M i i)) - charpoly M + charpoly M) = 1\n⊢ degree (∏ i : n, (X - ↑C (M i i)) - charpoly M) < ↑(Fintype.card n)\n[PROOFSTEP]\nrw [← neg_sub]\n[GOAL]\ncase neg\nR : Type u\ninst✝³ : CommRing R\nn G : Type v\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\nα β : Type v\ninst✝ : DecidableEq α\nM✝ M : Matrix n n R\n✝ : Nontrivial R\nh : ¬Fintype.card n = 0\nmon : leadingCoeff (∏ i : n, (X - ↑C (M i i)) - charpoly M + charpoly M) = 1\n⊢ degree (-(charpoly M - ∏ i : n, (X - ↑C (M i i)))) < ↑(Fintype.card n)\n[PROOFSTEP]\nrw [degree_neg]\n[GOAL]\ncase neg\nR : Type u\ninst✝³ : CommRing R\nn G : Type v\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\nα β : Type v\ninst✝ : DecidableEq α\nM✝ M : Matrix n n R\n✝ : Nontrivial R\nh : ¬Fintype.card n = 0\nmon : leadingCoeff (∏ i : n, (X - ↑C (M i i)) - charpoly M + charpoly M) = 1\n⊢ degree (charpoly M - ∏ i : n, (X - ↑C (M i i))) < ↑(Fintype.card n)\n[PROOFSTEP]\napply lt_trans (charpoly_sub_diagonal_degree_lt M)\n[GOAL]\ncase neg\nR : Type u\ninst✝³ : CommRing R\nn G : Type v\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\nα β : Type v\ninst✝ : DecidableEq α\nM✝ M : Matrix n n R\n✝ : Nontrivial R\nh : ¬Fintype.card n = 0\nmon : leadingCoeff (∏ i : n, (X - ↑C (M i i)) - charpoly M + charpoly M) = 1\n⊢ ↑(Fintype.card n - 1) < ↑(Fintype.card n)\n[PROOFSTEP]\nrw [Nat.cast_withBot, Nat.cast_withBot]\n  -- porting note: added\n[GOAL]\ncase neg\nR : Type u\ninst✝³ : CommRing R\nn G : Type v\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\nα β : Type v\ninst✝ : DecidableEq α\nM✝ M : Matrix n n R\n✝ : Nontrivial R\nh : ¬Fintype.card n = 0\nmon : leadingCoeff (∏ i : n, (X - ↑C (M i i)) - charpoly M + charpoly M) = 1\n⊢ ↑(Fintype.card n - 1) < ↑(Fintype.card n)\n[PROOFSTEP]\nrw [WithBot.coe_lt_coe]\n[GOAL]\ncase neg\nR : Type u\ninst✝³ : CommRing R\nn G : Type v\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\nα β : Type v\ninst✝ : DecidableEq α\nM✝ M : Matrix n n R\n✝ : Nontrivial R\nh : ¬Fintype.card n = 0\nmon : leadingCoeff (∏ i : n, (X - ↑C (M i i)) - charpoly M + charpoly M) = 1\n⊢ Fintype.card n - 1 < Fintype.card n\n[PROOFSTEP]\nrw [← Nat.pred_eq_sub_one]\n[GOAL]\ncase neg\nR : Type u\ninst✝³ : CommRing R\nn G : Type v\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\nα β : Type v\ninst✝ : DecidableEq α\nM✝ M : Matrix n n R\n✝ : Nontrivial R\nh : ¬Fintype.card n = 0\nmon : leadingCoeff (∏ i : n, (X - ↑C (M i i)) - charpoly M + charpoly M) = 1\n⊢ Nat.pred (Fintype.card n) < Fintype.card n\n[PROOFSTEP]\napply Nat.pred_lt\n[GOAL]\ncase neg.a\nR : Type u\ninst✝³ : CommRing R\nn G : Type v\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\nα β : Type v\ninst✝ : DecidableEq α\nM✝ M : Matrix n n R\n✝ : Nontrivial R\nh : ¬Fintype.card n = 0\nmon : leadingCoeff (∏ i : n, (X - ↑C (M i i)) - charpoly M + charpoly M) = 1\n⊢ Fintype.card n ≠ 0\n[PROOFSTEP]\napply h\n[GOAL]\nR : Type u\ninst✝⁴ : CommRing R\nn G : Type v\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nα β : Type v\ninst✝¹ : DecidableEq α\nM✝ : Matrix n n R\ninst✝ : Nonempty n\nM : Matrix n n R\n⊢ trace M = -coeff (charpoly M) (Fintype.card n - 1)\n[PROOFSTEP]\nrw [charpoly_coeff_eq_prod_coeff_of_le _ le_rfl, Fintype.card,\n  prod_X_sub_C_coeff_card_pred univ (fun i : n => M i i) Fintype.card_pos, neg_neg, trace]\n[GOAL]\nR : Type u\ninst✝⁴ : CommRing R\nn G : Type v\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nα β : Type v\ninst✝¹ : DecidableEq α\nM✝ : Matrix n n R\ninst✝ : Nonempty n\nM : Matrix n n R\n⊢ ∑ i : n, diag M i = ∑ i : n, M i i\n[PROOFSTEP]\nsimp_rw [diag_apply]\n[GOAL]\nR : Type u\ninst✝³ : CommRing R\nn G : Type v\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\nα β : Type v\ninst✝ : DecidableEq α\nM✝ : Matrix n n R\nM : Matrix n n R[X]\nr : R\ni j : n\n⊢ eval (↑(scalar n) r) (↑matPolyEquiv M) i j = eval r (M i j)\n[PROOFSTEP]\nunfold Polynomial.eval\n[GOAL]\nR : Type u\ninst✝³ : CommRing R\nn G : Type v\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\nα β : Type v\ninst✝ : DecidableEq α\nM✝ : Matrix n n R\nM : Matrix n n R[X]\nr : R\ni j : n\n⊢ eval₂ (RingHom.id ((fun x => Matrix n n R) r)) (↑(scalar n) r) (↑matPolyEquiv M) i j = eval₂ (RingHom.id R) r (M i j)\n[PROOFSTEP]\nrw [Polynomial.eval₂_def, Polynomial.eval₂_def]\n  -- porting note: was `unfold eval₂`\n[GOAL]\nR : Type u\ninst✝³ : CommRing R\nn G : Type v\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\nα β : Type v\ninst✝ : DecidableEq α\nM✝ : Matrix n n R\nM : Matrix n n R[X]\nr : R\ni j : n\n⊢ sum (↑matPolyEquiv M) (fun e a => ↑(RingHom.id ((fun x => Matrix n n R) r)) a * ↑(scalar n) r ^ e) i j =\n    sum (M i j) fun e a => ↑(RingHom.id R) a * r ^ e\n[PROOFSTEP]\ntrans Polynomial.sum (matPolyEquiv M) fun (e : ℕ) (a : Matrix n n R) => (a * (scalar n) r ^ e) i j\n[GOAL]\nR : Type u\ninst✝³ : CommRing R\nn G : Type v\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\nα β : Type v\ninst✝ : DecidableEq α\nM✝ : Matrix n n R\nM : Matrix n n R[X]\nr : R\ni j : n\n⊢ sum (↑matPolyEquiv M) (fun e a => ↑(RingHom.id ((fun x => Matrix n n R) r)) a * ↑(scalar n) r ^ e) i j =\n    sum (↑matPolyEquiv M) fun e a => (a * ↑(scalar n) r ^ e) i j\n[PROOFSTEP]\nunfold Polynomial.sum\n[GOAL]\nR : Type u\ninst✝³ : CommRing R\nn G : Type v\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\nα β : Type v\ninst✝ : DecidableEq α\nM✝ : Matrix n n R\nM : Matrix n n R[X]\nr : R\ni j : n\n⊢ Finset.sum (support (↑matPolyEquiv M))\n      (fun n_1 =>\n        (fun e a => ↑(RingHom.id ((fun x => Matrix n n R) r)) a * ↑(scalar n) r ^ e) n_1 (coeff (↑matPolyEquiv M) n_1))\n      i j =\n    ∑ n_1 in support (↑matPolyEquiv M), (fun e a => (a * ↑(scalar n) r ^ e) i j) n_1 (coeff (↑matPolyEquiv M) n_1)\n[PROOFSTEP]\nsimp only [sum_apply]\n[GOAL]\nR : Type u\ninst✝³ : CommRing R\nn G : Type v\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\nα β : Type v\ninst✝ : DecidableEq α\nM✝ : Matrix n n R\nM : Matrix n n R[X]\nr : R\ni j : n\n⊢ ∑ c in support (↑matPolyEquiv M), (↑(RingHom.id (Matrix n n R)) (coeff (↑matPolyEquiv M) c) * ↑(scalar n) r ^ c) i j =\n    ∑ x in support (↑matPolyEquiv M), (coeff (↑matPolyEquiv M) x * ↑(scalar n) r ^ x) i j\n[PROOFSTEP]\ndsimp\n[GOAL]\nR : Type u\ninst✝³ : CommRing R\nn G : Type v\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\nα β : Type v\ninst✝ : DecidableEq α\nM✝ : Matrix n n R\nM : Matrix n n R[X]\nr : R\ni j : n\n⊢ (sum (↑matPolyEquiv M) fun e a => (a * ↑(scalar n) r ^ e) i j) = sum (M i j) fun e a => ↑(RingHom.id R) a * r ^ e\n[PROOFSTEP]\nsimp_rw [← RingHom.map_pow, ← (scalar.commute _ _).eq]\n[GOAL]\nR : Type u\ninst✝³ : CommRing R\nn G : Type v\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\nα β : Type v\ninst✝ : DecidableEq α\nM✝ : Matrix n n R\nM : Matrix n n R[X]\nr : R\ni j : n\n⊢ (sum (↑matPolyEquiv M) fun e a => (↑(scalar n) (r ^ e) * a) i j) = sum (M i j) fun e a => ↑(RingHom.id R) a * r ^ e\n[PROOFSTEP]\nsimp only [coe_scalar, Matrix.one_mul, RingHom.id_apply, Pi.smul_apply, smul_eq_mul, Algebra.smul_mul_assoc]\n  -- porting note: the `have` was present and unused also in the original\n      --have h : ∀ x : ℕ, (fun (e : ℕ) (a : R) => r ^ e * a) x 0 = 0 := by simp\n[GOAL]\nR : Type u\ninst✝³ : CommRing R\nn G : Type v\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\nα β : Type v\ninst✝ : DecidableEq α\nM✝ : Matrix n n R\nM : Matrix n n R[X]\nr : R\ni j : n\n⊢ (sum (↑matPolyEquiv M) fun e a => (r ^ e • a) i j) = sum (M i j) fun e a => a * r ^ e\n[PROOFSTEP]\nsimp only [Polynomial.sum, matPolyEquiv_coeff_apply, mul_comm]\n[GOAL]\nR : Type u\ninst✝³ : CommRing R\nn G : Type v\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\nα β : Type v\ninst✝ : DecidableEq α\nM✝ : Matrix n n R\nM : Matrix n n R[X]\nr : R\ni j : n\n⊢ ∑ x in support (↑matPolyEquiv M), (r ^ x • coeff (↑matPolyEquiv M) x) i j =\n    ∑ x in support (M i j), r ^ x * coeff (M i j) x\n[PROOFSTEP]\nsimp only [smul_apply, matPolyEquiv_coeff_apply, smul_eq_mul]\n  -- porting note: added\n[GOAL]\nR : Type u\ninst✝³ : CommRing R\nn G : Type v\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\nα β : Type v\ninst✝ : DecidableEq α\nM✝ : Matrix n n R\nM : Matrix n n R[X]\nr : R\ni j : n\n⊢ ∑ x in support (↑matPolyEquiv M), r ^ x * coeff (M i j) x = ∑ x in support (M i j), r ^ x * coeff (M i j) x\n[PROOFSTEP]\napply (Finset.sum_subset (support_subset_support_matPolyEquiv _ _ _) _).symm\n[GOAL]\nR : Type u\ninst✝³ : CommRing R\nn G : Type v\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\nα β : Type v\ninst✝ : DecidableEq α\nM✝ : Matrix n n R\nM : Matrix n n R[X]\nr : R\ni j : n\n⊢ ∀ (x : ℕ), x ∈ support (↑matPolyEquiv M) → ¬x ∈ support (M i j) → r ^ x * coeff (M i j) x = 0\n[PROOFSTEP]\nintro n _hn h'n\n[GOAL]\nR : Type u\ninst✝³ : CommRing R\nn✝ G : Type v\ninst✝² : DecidableEq n✝\ninst✝¹ : Fintype n✝\nα β : Type v\ninst✝ : DecidableEq α\nM✝ : Matrix n✝ n✝ R\nM : Matrix n✝ n✝ R[X]\nr : R\ni j : n✝\nn : ℕ\n_hn : n ∈ support (↑matPolyEquiv M)\nh'n : ¬n ∈ support (M i j)\n⊢ r ^ n * coeff (M i j) n = 0\n[PROOFSTEP]\nrw [not_mem_support_iff] at h'n \n[GOAL]\nR : Type u\ninst✝³ : CommRing R\nn✝ G : Type v\ninst✝² : DecidableEq n✝\ninst✝¹ : Fintype n✝\nα β : Type v\ninst✝ : DecidableEq α\nM✝ : Matrix n✝ n✝ R\nM : Matrix n✝ n✝ R[X]\nr : R\ni j : n✝\nn : ℕ\n_hn : n ∈ support (↑matPolyEquiv M)\nh'n : coeff (M i j) n = 0\n⊢ r ^ n * coeff (M i j) n = 0\n[PROOFSTEP]\nsimp only [h'n, zero_mul]\n[GOAL]\nR : Type u\ninst✝³ : CommRing R\nn✝ G : Type v\ninst✝² : DecidableEq n✝\ninst✝¹ : Fintype n✝\nα β : Type v\ninst✝ : DecidableEq α\nM✝ : Matrix n✝ n✝ R\nM : Matrix n✝ n✝ R[X]\nr : R\ni j : n✝\nn : ℕ\n_hn : n ∈ support (↑matPolyEquiv M)\nh'n : coeff (M i j) n = 0\n⊢ r ^ n * 0 = 0\n[PROOFSTEP]\nsimp only [mul_zero]\n  -- porting note: added\n[GOAL]\nR : Type u\ninst✝³ : CommRing R\nn G : Type v\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\nα β : Type v\ninst✝ : DecidableEq α\nM✝ : Matrix n n R\nM : Matrix n n R[X]\nr : R\n⊢ eval r (det M) = det (eval (↑(scalar n) r) (↑matPolyEquiv M))\n[PROOFSTEP]\nrw [Polynomial.eval, ← coe_eval₂RingHom, RingHom.map_det]\n[GOAL]\nR : Type u\ninst✝³ : CommRing R\nn G : Type v\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\nα β : Type v\ninst✝ : DecidableEq α\nM✝ : Matrix n n R\nM : Matrix n n R[X]\nr : R\n⊢ det (↑(RingHom.mapMatrix (eval₂RingHom (RingHom.id R) r)) M) = det (eval (↑(scalar n) r) (↑matPolyEquiv M))\n[PROOFSTEP]\napply congr_arg det\n[GOAL]\nR : Type u\ninst✝³ : CommRing R\nn G : Type v\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\nα β : Type v\ninst✝ : DecidableEq α\nM✝ : Matrix n n R\nM : Matrix n n R[X]\nr : R\n⊢ ↑(RingHom.mapMatrix (eval₂RingHom (RingHom.id R) r)) M = eval (↑(scalar n) r) (↑matPolyEquiv M)\n[PROOFSTEP]\next\n[GOAL]\ncase a.h\nR : Type u\ninst✝³ : CommRing R\nn G : Type v\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\nα β : Type v\ninst✝ : DecidableEq α\nM✝ : Matrix n n R\nM : Matrix n n R[X]\nr : R\ni✝ x✝ : n\n⊢ ↑(RingHom.mapMatrix (eval₂RingHom (RingHom.id R) r)) M i✝ x✝ = eval (↑(scalar n) r) (↑matPolyEquiv M) i✝ x✝\n[PROOFSTEP]\nsymm\n  -- porting note: `exact` was `convert`\n[GOAL]\ncase a.h\nR : Type u\ninst✝³ : CommRing R\nn G : Type v\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\nα β : Type v\ninst✝ : DecidableEq α\nM✝ : Matrix n n R\nM : Matrix n n R[X]\nr : R\ni✝ x✝ : n\n⊢ eval (↑(scalar n) r) (↑matPolyEquiv M) i✝ x✝ = ↑(RingHom.mapMatrix (eval₂RingHom (RingHom.id R) r)) M i✝ x✝\n[PROOFSTEP]\nexact matPolyEquiv_eval _ _ _ _\n[GOAL]\nR : Type u\ninst✝³ : CommRing R\nn G : Type v\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\nα β : Type v\ninst✝ : DecidableEq α\nM✝ M : Matrix n n R\n⊢ det M = (-1) ^ Fintype.card n * coeff (charpoly M) 0\n[PROOFSTEP]\nrw [coeff_zero_eq_eval_zero, charpoly, eval_det, matPolyEquiv_charmatrix, ← det_smul]\n[GOAL]\nR : Type u\ninst✝³ : CommRing R\nn G : Type v\ninst✝² : DecidableEq n\ninst✝¹ : Fintype n\nα β : Type v\ninst✝ : DecidableEq α\nM✝ M : Matrix n n R\n⊢ det M = det (-1 • eval (↑(scalar n) 0) (X - ↑C M))\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\ninst✝⁵ : CommRing R\nn G : Type v\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\nα β : Type v\ninst✝² : DecidableEq α\nM✝ : Matrix n n R\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\nK : Type u_1\nk : ℕ\ninst✝ : Field K\nM : Matrix n n K\n⊢ ↑matPolyEquiv (↑(RingHom.mapMatrix ↑(expand K k)) (charmatrix (M ^ k))) = X ^ k - ↑C (M ^ k)\n[PROOFSTEP]\next m i j\n[GOAL]\ncase a.a.h\nR : Type u\ninst✝⁵ : CommRing R\nn G : Type v\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\nα β : Type v\ninst✝² : DecidableEq α\nM✝ : Matrix n n R\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\nK : Type u_1\nk : ℕ\ninst✝ : Field K\nM : Matrix n n K\nm : ℕ\ni j : n\n⊢ coeff (↑matPolyEquiv (↑(RingHom.mapMatrix ↑(expand K k)) (charmatrix (M ^ k)))) m i j =\n    coeff (X ^ k - ↑C (M ^ k)) m i j\n[PROOFSTEP]\nrw [coeff_sub, coeff_C, matPolyEquiv_coeff_apply, RingHom.mapMatrix_apply, Matrix.map_apply, AlgHom.coe_toRingHom,\n  DMatrix.sub_apply, coeff_X_pow]\n[GOAL]\ncase a.a.h\nR : Type u\ninst✝⁵ : CommRing R\nn G : Type v\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\nα β : Type v\ninst✝² : DecidableEq α\nM✝ : Matrix n n R\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\nK : Type u_1\nk : ℕ\ninst✝ : Field K\nM : Matrix n n K\nm : ℕ\ni j : n\n⊢ coeff (↑(expand K k) (charmatrix (M ^ k) i j)) m = ite (m = k) 1 0 i j - ite (m = 0) (M ^ k) 0 i j\n[PROOFSTEP]\nby_cases hij : i = j\n[GOAL]\ncase pos\nR : Type u\ninst✝⁵ : CommRing R\nn G : Type v\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\nα β : Type v\ninst✝² : DecidableEq α\nM✝ : Matrix n n R\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\nK : Type u_1\nk : ℕ\ninst✝ : Field K\nM : Matrix n n K\nm : ℕ\ni j : n\nhij : i = j\n⊢ coeff (↑(expand K k) (charmatrix (M ^ k) i j)) m = ite (m = k) 1 0 i j - ite (m = 0) (M ^ k) 0 i j\n[PROOFSTEP]\nrw [hij, charmatrix_apply_eq, AlgHom.map_sub, expand_C, expand_X, coeff_sub, coeff_X_pow, coeff_C]\n  -- porting note: the second `Matrix.` was `DMatrix.`\n[GOAL]\ncase pos\nR : Type u\ninst✝⁵ : CommRing R\nn G : Type v\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\nα β : Type v\ninst✝² : DecidableEq α\nM✝ : Matrix n n R\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\nK : Type u_1\nk : ℕ\ninst✝ : Field K\nM : Matrix n n K\nm : ℕ\ni j : n\nhij : i = j\n⊢ ((if m = k then 1 else 0) - if m = 0 then (M ^ k) j j else 0) = ite (m = k) 1 0 j j - ite (m = 0) (M ^ k) 0 j j\n[PROOFSTEP]\nsplit_ifs with mp m0\n[GOAL]\ncase pos\nR : Type u\ninst✝⁵ : CommRing R\nn G : Type v\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\nα β : Type v\ninst✝² : DecidableEq α\nM✝ : Matrix n n R\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\nK : Type u_1\nk : ℕ\ninst✝ : Field K\nM : Matrix n n K\nm : ℕ\ni j : n\nhij : i = j\nmp : m = k\nm0 : m = 0\n⊢ 1 - (M ^ k) j j = OfNat.ofNat 1 j j - (M ^ k) j j\n[PROOFSTEP]\nsimp only [Matrix.one_apply_eq, Matrix.zero_apply]\n[GOAL]\ncase neg\nR : Type u\ninst✝⁵ : CommRing R\nn G : Type v\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\nα β : Type v\ninst✝² : DecidableEq α\nM✝ : Matrix n n R\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\nK : Type u_1\nk : ℕ\ninst✝ : Field K\nM : Matrix n n K\nm : ℕ\ni j : n\nhij : i = j\nmp : m = k\nm0 : ¬m = 0\n⊢ 1 - 0 = OfNat.ofNat 1 j j - OfNat.ofNat 0 j j\n[PROOFSTEP]\nsimp only [Matrix.one_apply_eq, Matrix.zero_apply]\n[GOAL]\ncase pos\nR : Type u\ninst✝⁵ : CommRing R\nn G : Type v\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\nα β : Type v\ninst✝² : DecidableEq α\nM✝ : Matrix n n R\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\nK : Type u_1\nk : ℕ\ninst✝ : Field K\nM : Matrix n n K\nm : ℕ\ni j : n\nhij : i = j\nmp : ¬m = k\nh✝ : m = 0\n⊢ 0 - (M ^ k) j j = OfNat.ofNat 0 j j - (M ^ k) j j\n[PROOFSTEP]\nsimp only [Matrix.one_apply_eq, Matrix.zero_apply]\n[GOAL]\ncase neg\nR : Type u\ninst✝⁵ : CommRing R\nn G : Type v\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\nα β : Type v\ninst✝² : DecidableEq α\nM✝ : Matrix n n R\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\nK : Type u_1\nk : ℕ\ninst✝ : Field K\nM : Matrix n n K\nm : ℕ\ni j : n\nhij : i = j\nmp : ¬m = k\nh✝ : ¬m = 0\n⊢ 0 - 0 = OfNat.ofNat 0 j j - OfNat.ofNat 0 j j\n[PROOFSTEP]\nsimp only [Matrix.one_apply_eq, Matrix.zero_apply]\n[GOAL]\ncase neg\nR : Type u\ninst✝⁵ : CommRing R\nn G : Type v\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\nα β : Type v\ninst✝² : DecidableEq α\nM✝ : Matrix n n R\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\nK : Type u_1\nk : ℕ\ninst✝ : Field K\nM : Matrix n n K\nm : ℕ\ni j : n\nhij : ¬i = j\n⊢ coeff (↑(expand K k) (charmatrix (M ^ k) i j)) m = ite (m = k) 1 0 i j - ite (m = 0) (M ^ k) 0 i j\n[PROOFSTEP]\nrw [charmatrix_apply_ne _ _ _ hij, AlgHom.map_neg, expand_C, coeff_neg, coeff_C]\n[GOAL]\ncase neg\nR : Type u\ninst✝⁵ : CommRing R\nn G : Type v\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\nα β : Type v\ninst✝² : DecidableEq α\nM✝ : Matrix n n R\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\nK : Type u_1\nk : ℕ\ninst✝ : Field K\nM : Matrix n n K\nm : ℕ\ni j : n\nhij : ¬i = j\n⊢ (-if m = 0 then (M ^ k) i j else 0) = ite (m = k) 1 0 i j - ite (m = 0) (M ^ k) 0 i j\n[PROOFSTEP]\nsplit_ifs with m0 mp\n[GOAL]\ncase pos\nR : Type u\ninst✝⁵ : CommRing R\nn G : Type v\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\nα β : Type v\ninst✝² : DecidableEq α\nM✝ : Matrix n n R\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\nK : Type u_1\nk : ℕ\ninst✝ : Field K\nM : Matrix n n K\nm : ℕ\ni j : n\nhij : ¬i = j\nm0 : m = 0\nmp : m = k\n⊢ -(M ^ k) i j = OfNat.ofNat 1 i j - (M ^ k) i j\n[PROOFSTEP]\nsimp only [hij, zero_sub, Matrix.zero_apply, sub_zero, neg_zero, Matrix.one_apply_ne, Ne.def, not_false_iff]\n[GOAL]\ncase neg\nR : Type u\ninst✝⁵ : CommRing R\nn G : Type v\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\nα β : Type v\ninst✝² : DecidableEq α\nM✝ : Matrix n n R\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\nK : Type u_1\nk : ℕ\ninst✝ : Field K\nM : Matrix n n K\nm : ℕ\ni j : n\nhij : ¬i = j\nm0 : m = 0\nmp : ¬m = k\n⊢ -(M ^ k) i j = OfNat.ofNat 0 i j - (M ^ k) i j\n[PROOFSTEP]\nsimp only [hij, zero_sub, Matrix.zero_apply, sub_zero, neg_zero, Matrix.one_apply_ne, Ne.def, not_false_iff]\n[GOAL]\ncase pos\nR : Type u\ninst✝⁵ : CommRing R\nn G : Type v\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\nα β : Type v\ninst✝² : DecidableEq α\nM✝ : Matrix n n R\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\nK : Type u_1\nk : ℕ\ninst✝ : Field K\nM : Matrix n n K\nm : ℕ\ni j : n\nhij : ¬i = j\nm0 : ¬m = 0\nh✝ : m = k\n⊢ -0 = OfNat.ofNat 1 i j - OfNat.ofNat 0 i j\n[PROOFSTEP]\nsimp only [hij, zero_sub, Matrix.zero_apply, sub_zero, neg_zero, Matrix.one_apply_ne, Ne.def, not_false_iff]\n[GOAL]\ncase neg\nR : Type u\ninst✝⁵ : CommRing R\nn G : Type v\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\nα β : Type v\ninst✝² : DecidableEq α\nM✝ : Matrix n n R\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\nK : Type u_1\nk : ℕ\ninst✝ : Field K\nM : Matrix n n K\nm : ℕ\ni j : n\nhij : ¬i = j\nm0 : ¬m = 0\nh✝ : ¬m = k\n⊢ -0 = OfNat.ofNat 0 i j - OfNat.ofNat 0 i j\n[PROOFSTEP]\nsimp only [hij, zero_sub, Matrix.zero_apply, sub_zero, neg_zero, Matrix.one_apply_ne, Ne.def, not_false_iff]\n[GOAL]\nR : Type u\ninst✝⁴ : CommRing R\nn G : Type v\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nα β : Type v\ninst✝¹ : DecidableEq α\nM✝ : Matrix n n R\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nM : Matrix n n R\nk : ℕ\n⊢ M ^ k = ↑(aeval M) (X ^ k %ₘ charpoly M)\n[PROOFSTEP]\nrw [← aeval_eq_aeval_mod_charpoly, map_pow, aeval_X]\n[GOAL]\nR : Type u\ninst✝⁴ : CommRing R\nn G : Type v\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nα β : Type v\ninst✝¹ : DecidableEq α\nM : Matrix n n R\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nI : Ideal R\nh : ∀ (i j : n), M i j ∈ I\nk : ℕ\n⊢ coeff (charpoly M) k ∈ I ^ (Fintype.card n - k)\n[PROOFSTEP]\ndelta charpoly\n[GOAL]\nR : Type u\ninst✝⁴ : CommRing R\nn G : Type v\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nα β : Type v\ninst✝¹ : DecidableEq α\nM : Matrix n n R\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nI : Ideal R\nh : ∀ (i j : n), M i j ∈ I\nk : ℕ\n⊢ coeff (det (charmatrix M)) k ∈ I ^ (Fintype.card n - k)\n[PROOFSTEP]\nrw [Matrix.det_apply, finset_sum_coeff]\n[GOAL]\nR : Type u\ninst✝⁴ : CommRing R\nn G : Type v\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nα β : Type v\ninst✝¹ : DecidableEq α\nM : Matrix n n R\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nI : Ideal R\nh : ∀ (i j : n), M i j ∈ I\nk : ℕ\n⊢ ∑ b : Equiv.Perm n, coeff (↑Equiv.Perm.sign b • ∏ i : n, charmatrix M (↑b i) i) k ∈ I ^ (Fintype.card n - k)\n[PROOFSTEP]\napply sum_mem\n[GOAL]\ncase h\nR : Type u\ninst✝⁴ : CommRing R\nn G : Type v\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nα β : Type v\ninst✝¹ : DecidableEq α\nM : Matrix n n R\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nI : Ideal R\nh : ∀ (i j : n), M i j ∈ I\nk : ℕ\n⊢ ∀ (c : Equiv.Perm n),\n    c ∈ univ → coeff (↑Equiv.Perm.sign c • ∏ i : n, charmatrix M (↑c i) i) k ∈ I ^ (Fintype.card n - k)\n[PROOFSTEP]\nrintro c -\n[GOAL]\ncase h\nR : Type u\ninst✝⁴ : CommRing R\nn G : Type v\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nα β : Type v\ninst✝¹ : DecidableEq α\nM : Matrix n n R\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nI : Ideal R\nh : ∀ (i j : n), M i j ∈ I\nk : ℕ\nc : Equiv.Perm n\n⊢ coeff (↑Equiv.Perm.sign c • ∏ i : n, charmatrix M (↑c i) i) k ∈ I ^ (Fintype.card n - k)\n[PROOFSTEP]\nrw [coeff_smul, Submodule.smul_mem_iff']\n[GOAL]\ncase h\nR : Type u\ninst✝⁴ : CommRing R\nn G : Type v\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nα β : Type v\ninst✝¹ : DecidableEq α\nM : Matrix n n R\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nI : Ideal R\nh : ∀ (i j : n), M i j ∈ I\nk : ℕ\nc : Equiv.Perm n\n⊢ coeff (∏ i : n, charmatrix M (↑c i) i) k ∈ I ^ (Fintype.card n - k)\n[PROOFSTEP]\nhave : ∑ x : n, 1 = Fintype.card n := by rw [Finset.sum_const, card_univ, smul_eq_mul, mul_one]\n[GOAL]\nR : Type u\ninst✝⁴ : CommRing R\nn G : Type v\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nα β : Type v\ninst✝¹ : DecidableEq α\nM : Matrix n n R\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nI : Ideal R\nh : ∀ (i j : n), M i j ∈ I\nk : ℕ\nc : Equiv.Perm n\n⊢ ∑ x : n, 1 = Fintype.card n\n[PROOFSTEP]\nrw [Finset.sum_const, card_univ, smul_eq_mul, mul_one]\n[GOAL]\ncase h\nR : Type u\ninst✝⁴ : CommRing R\nn G : Type v\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nα β : Type v\ninst✝¹ : DecidableEq α\nM : Matrix n n R\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nI : Ideal R\nh : ∀ (i j : n), M i j ∈ I\nk : ℕ\nc : Equiv.Perm n\nthis : ∑ x : n, 1 = Fintype.card n\n⊢ coeff (∏ i : n, charmatrix M (↑c i) i) k ∈ I ^ (Fintype.card n - k)\n[PROOFSTEP]\nrw [← this]\n[GOAL]\ncase h\nR : Type u\ninst✝⁴ : CommRing R\nn G : Type v\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nα β : Type v\ninst✝¹ : DecidableEq α\nM : Matrix n n R\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nI : Ideal R\nh : ∀ (i j : n), M i j ∈ I\nk : ℕ\nc : Equiv.Perm n\nthis : ∑ x : n, 1 = Fintype.card n\n⊢ coeff (∏ i : n, charmatrix M (↑c i) i) k ∈ I ^ (∑ x : n, 1 - k)\n[PROOFSTEP]\napply coeff_prod_mem_ideal_pow_tsub\n[GOAL]\ncase h.h\nR : Type u\ninst✝⁴ : CommRing R\nn G : Type v\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nα β : Type v\ninst✝¹ : DecidableEq α\nM : Matrix n n R\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nI : Ideal R\nh : ∀ (i j : n), M i j ∈ I\nk : ℕ\nc : Equiv.Perm n\nthis : ∑ x : n, 1 = Fintype.card n\n⊢ ∀ (i : n), i ∈ univ → ∀ (k : ℕ), coeff (charmatrix M (↑c i) i) k ∈ I ^ (1 - k)\n[PROOFSTEP]\nrintro i - (_ | k)\n[GOAL]\ncase h.h.zero\nR : Type u\ninst✝⁴ : CommRing R\nn G : Type v\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nα β : Type v\ninst✝¹ : DecidableEq α\nM : Matrix n n R\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nI : Ideal R\nh : ∀ (i j : n), M i j ∈ I\nk : ℕ\nc : Equiv.Perm n\nthis : ∑ x : n, 1 = Fintype.card n\ni : n\n⊢ coeff (charmatrix M (↑c i) i) Nat.zero ∈ I ^ (1 - Nat.zero)\n[PROOFSTEP]\nrw [Nat.zero_eq]\n  -- porting note: `rw [Nat.zero_eq]` was not present\n[GOAL]\ncase h.h.zero\nR : Type u\ninst✝⁴ : CommRing R\nn G : Type v\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nα β : Type v\ninst✝¹ : DecidableEq α\nM : Matrix n n R\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nI : Ideal R\nh : ∀ (i j : n), M i j ∈ I\nk : ℕ\nc : Equiv.Perm n\nthis : ∑ x : n, 1 = Fintype.card n\ni : n\n⊢ coeff (charmatrix M (↑c i) i) 0 ∈ I ^ (1 - 0)\n[PROOFSTEP]\nrw [tsub_zero, pow_one, charmatrix_apply, coeff_sub, coeff_X_mul_zero, coeff_C_zero, zero_sub]\n[GOAL]\ncase h.h.zero\nR : Type u\ninst✝⁴ : CommRing R\nn G : Type v\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nα β : Type v\ninst✝¹ : DecidableEq α\nM : Matrix n n R\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nI : Ideal R\nh : ∀ (i j : n), M i j ∈ I\nk : ℕ\nc : Equiv.Perm n\nthis : ∑ x : n, 1 = Fintype.card n\ni : n\n⊢ -M (↑c i) i ∈ I\n[PROOFSTEP]\napply neg_mem\n[GOAL]\ncase h.h.zero.a\nR : Type u\ninst✝⁴ : CommRing R\nn G : Type v\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nα β : Type v\ninst✝¹ : DecidableEq α\nM : Matrix n n R\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nI : Ideal R\nh : ∀ (i j : n), M i j ∈ I\nk : ℕ\nc : Equiv.Perm n\nthis : ∑ x : n, 1 = Fintype.card n\ni : n\n⊢ M (↑c i) i ∈ I\n[PROOFSTEP]\nexact h (c i) i\n[GOAL]\ncase h.h.succ\nR : Type u\ninst✝⁴ : CommRing R\nn G : Type v\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nα β : Type v\ninst✝¹ : DecidableEq α\nM : Matrix n n R\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nI : Ideal R\nh : ∀ (i j : n), M i j ∈ I\nk✝ : ℕ\nc : Equiv.Perm n\nthis : ∑ x : n, 1 = Fintype.card n\ni : n\nk : ℕ\n⊢ coeff (charmatrix M (↑c i) i) (Nat.succ k) ∈ I ^ (1 - Nat.succ k)\n[PROOFSTEP]\nrw [Nat.succ_eq_one_add, tsub_self_add, pow_zero, Ideal.one_eq_top]\n[GOAL]\ncase h.h.succ\nR : Type u\ninst✝⁴ : CommRing R\nn G : Type v\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nα β : Type v\ninst✝¹ : DecidableEq α\nM : Matrix n n R\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nI : Ideal R\nh : ∀ (i j : n), M i j ∈ I\nk✝ : ℕ\nc : Equiv.Perm n\nthis : ∑ x : n, 1 = Fintype.card n\ni : n\nk : ℕ\n⊢ coeff (charmatrix M (↑c i) i) (1 + k) ∈ ⊤\n[PROOFSTEP]\nexact Submodule.mem_top\n", "meta": {"mathlib_filename": "Mathlib.LinearAlgebra.Matrix.Charpoly.Coeff", "llama_tokens": 24926, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8459424373085145, "lm_q2_score": 0.600188359260205, "lm_q1q2_score": 0.5077248034767761}}
{"text": "[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nf' : ℂ → ℂ →L[ℝ] E\nz w : ℂ\ns : Set ℂ\nhs : Set.Countable s\nHc : ContinuousOn f ([[z.re, w.re]] ×ℂ [[z.im, w.im]])\nHd :\n  ∀ (x : ℂ), x ∈ Ioo (min z.re w.re) (max z.re w.re) ×ℂ Ioo (min z.im w.im) (max z.im w.im) \\ s → HasFDerivAt f (f' x) x\nHi : IntegrableOn (fun z => I • ↑(f' z) 1 - ↑(f' z) I) ([[z.re, w.re]] ×ℂ [[z.im, w.im]])\n⊢ (((∫ (x : ℝ) in z.re..w.re, f (↑x + ↑z.im * I)) - ∫ (x : ℝ) in z.re..w.re, f (↑x + ↑w.im * I)) +\n        I • ∫ (y : ℝ) in z.im..w.im, f (↑w.re + ↑y * I)) -\n      I • ∫ (y : ℝ) in z.im..w.im, f (↑z.re + ↑y * I) =\n    ∫ (x : ℝ) in z.re..w.re, ∫ (y : ℝ) in z.im..w.im, I • ↑(f' (↑x + ↑y * I)) 1 - ↑(f' (↑x + ↑y * I)) I\n[PROOFSTEP]\nset e : (ℝ × ℝ) ≃L[ℝ] ℂ := equivRealProdClm.symm\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nf' : ℂ → ℂ →L[ℝ] E\nz w : ℂ\ns : Set ℂ\nhs : Set.Countable s\nHc : ContinuousOn f ([[z.re, w.re]] ×ℂ [[z.im, w.im]])\nHd :\n  ∀ (x : ℂ), x ∈ Ioo (min z.re w.re) (max z.re w.re) ×ℂ Ioo (min z.im w.im) (max z.im w.im) \\ s → HasFDerivAt f (f' x) x\nHi : IntegrableOn (fun z => I • ↑(f' z) 1 - ↑(f' z) I) ([[z.re, w.re]] ×ℂ [[z.im, w.im]])\ne : (ℝ × ℝ) ≃L[ℝ] ℂ := ContinuousLinearEquiv.symm equivRealProdClm\n⊢ (((∫ (x : ℝ) in z.re..w.re, f (↑x + ↑z.im * I)) - ∫ (x : ℝ) in z.re..w.re, f (↑x + ↑w.im * I)) +\n        I • ∫ (y : ℝ) in z.im..w.im, f (↑w.re + ↑y * I)) -\n      I • ∫ (y : ℝ) in z.im..w.im, f (↑z.re + ↑y * I) =\n    ∫ (x : ℝ) in z.re..w.re, ∫ (y : ℝ) in z.im..w.im, I • ↑(f' (↑x + ↑y * I)) 1 - ↑(f' (↑x + ↑y * I)) I\n[PROOFSTEP]\nhave he : ∀ x y : ℝ, ↑x + ↑y * I = e (x, y) := fun x y => (mk_eq_add_mul_I x y).symm\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nf' : ℂ → ℂ →L[ℝ] E\nz w : ℂ\ns : Set ℂ\nhs : Set.Countable s\nHc : ContinuousOn f ([[z.re, w.re]] ×ℂ [[z.im, w.im]])\nHd :\n  ∀ (x : ℂ), x ∈ Ioo (min z.re w.re) (max z.re w.re) ×ℂ Ioo (min z.im w.im) (max z.im w.im) \\ s → HasFDerivAt f (f' x) x\nHi : IntegrableOn (fun z => I • ↑(f' z) 1 - ↑(f' z) I) ([[z.re, w.re]] ×ℂ [[z.im, w.im]])\ne : (ℝ × ℝ) ≃L[ℝ] ℂ := ContinuousLinearEquiv.symm equivRealProdClm\nhe : ∀ (x y : ℝ), ↑x + ↑y * I = ↑e (x, y)\n⊢ (((∫ (x : ℝ) in z.re..w.re, f (↑x + ↑z.im * I)) - ∫ (x : ℝ) in z.re..w.re, f (↑x + ↑w.im * I)) +\n        I • ∫ (y : ℝ) in z.im..w.im, f (↑w.re + ↑y * I)) -\n      I • ∫ (y : ℝ) in z.im..w.im, f (↑z.re + ↑y * I) =\n    ∫ (x : ℝ) in z.re..w.re, ∫ (y : ℝ) in z.im..w.im, I • ↑(f' (↑x + ↑y * I)) 1 - ↑(f' (↑x + ↑y * I)) I\n[PROOFSTEP]\nhave he₁ : e (1, 0) = 1 := rfl\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nf' : ℂ → ℂ →L[ℝ] E\nz w : ℂ\ns : Set ℂ\nhs : Set.Countable s\nHc : ContinuousOn f ([[z.re, w.re]] ×ℂ [[z.im, w.im]])\nHd :\n  ∀ (x : ℂ), x ∈ Ioo (min z.re w.re) (max z.re w.re) ×ℂ Ioo (min z.im w.im) (max z.im w.im) \\ s → HasFDerivAt f (f' x) x\nHi : IntegrableOn (fun z => I • ↑(f' z) 1 - ↑(f' z) I) ([[z.re, w.re]] ×ℂ [[z.im, w.im]])\ne : (ℝ × ℝ) ≃L[ℝ] ℂ := ContinuousLinearEquiv.symm equivRealProdClm\nhe : ∀ (x y : ℝ), ↑x + ↑y * I = ↑e (x, y)\nhe₁ : ↑e (1, 0) = 1\n⊢ (((∫ (x : ℝ) in z.re..w.re, f (↑x + ↑z.im * I)) - ∫ (x : ℝ) in z.re..w.re, f (↑x + ↑w.im * I)) +\n        I • ∫ (y : ℝ) in z.im..w.im, f (↑w.re + ↑y * I)) -\n      I • ∫ (y : ℝ) in z.im..w.im, f (↑z.re + ↑y * I) =\n    ∫ (x : ℝ) in z.re..w.re, ∫ (y : ℝ) in z.im..w.im, I • ↑(f' (↑x + ↑y * I)) 1 - ↑(f' (↑x + ↑y * I)) I\n[PROOFSTEP]\nhave he₂ : e (0, 1) = I := rfl\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nf' : ℂ → ℂ →L[ℝ] E\nz w : ℂ\ns : Set ℂ\nhs : Set.Countable s\nHc : ContinuousOn f ([[z.re, w.re]] ×ℂ [[z.im, w.im]])\nHd :\n  ∀ (x : ℂ), x ∈ Ioo (min z.re w.re) (max z.re w.re) ×ℂ Ioo (min z.im w.im) (max z.im w.im) \\ s → HasFDerivAt f (f' x) x\nHi : IntegrableOn (fun z => I • ↑(f' z) 1 - ↑(f' z) I) ([[z.re, w.re]] ×ℂ [[z.im, w.im]])\ne : (ℝ × ℝ) ≃L[ℝ] ℂ := ContinuousLinearEquiv.symm equivRealProdClm\nhe : ∀ (x y : ℝ), ↑x + ↑y * I = ↑e (x, y)\nhe₁ : ↑e (1, 0) = 1\nhe₂ : ↑e (0, 1) = I\n⊢ (((∫ (x : ℝ) in z.re..w.re, f (↑x + ↑z.im * I)) - ∫ (x : ℝ) in z.re..w.re, f (↑x + ↑w.im * I)) +\n        I • ∫ (y : ℝ) in z.im..w.im, f (↑w.re + ↑y * I)) -\n      I • ∫ (y : ℝ) in z.im..w.im, f (↑z.re + ↑y * I) =\n    ∫ (x : ℝ) in z.re..w.re, ∫ (y : ℝ) in z.im..w.im, I • ↑(f' (↑x + ↑y * I)) 1 - ↑(f' (↑x + ↑y * I)) I\n[PROOFSTEP]\nsimp only [he] at *\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nf' : ℂ → ℂ →L[ℝ] E\nz w : ℂ\ns : Set ℂ\nhs : Set.Countable s\nHc : ContinuousOn f ([[z.re, w.re]] ×ℂ [[z.im, w.im]])\nHd :\n  ∀ (x : ℂ), x ∈ Ioo (min z.re w.re) (max z.re w.re) ×ℂ Ioo (min z.im w.im) (max z.im w.im) \\ s → HasFDerivAt f (f' x) x\nHi : IntegrableOn (fun z => I • ↑(f' z) 1 - ↑(f' z) I) ([[z.re, w.re]] ×ℂ [[z.im, w.im]])\ne : (ℝ × ℝ) ≃L[ℝ] ℂ := ContinuousLinearEquiv.symm equivRealProdClm\nhe₁ : ↑(ContinuousLinearEquiv.symm equivRealProdClm) (1, 0) = 1\nhe₂ : ↑(ContinuousLinearEquiv.symm equivRealProdClm) (0, 1) = I\nhe : ℝ → ℝ → True\n⊢ (((∫ (x : ℝ) in z.re..w.re, f (↑(ContinuousLinearEquiv.symm equivRealProdClm) (x, z.im))) -\n          ∫ (x : ℝ) in z.re..w.re, f (↑(ContinuousLinearEquiv.symm equivRealProdClm) (x, w.im))) +\n        I • ∫ (y : ℝ) in z.im..w.im, f (↑(ContinuousLinearEquiv.symm equivRealProdClm) (w.re, y))) -\n      I • ∫ (y : ℝ) in z.im..w.im, f (↑(ContinuousLinearEquiv.symm equivRealProdClm) (z.re, y)) =\n    ∫ (x : ℝ) in z.re..w.re,\n      ∫ (y : ℝ) in z.im..w.im,\n        I • ↑(f' (↑(ContinuousLinearEquiv.symm equivRealProdClm) (x, y))) 1 -\n          ↑(f' (↑(ContinuousLinearEquiv.symm equivRealProdClm) (x, y))) I\n[PROOFSTEP]\nset F : ℝ × ℝ → E := f ∘ e\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nf' : ℂ → ℂ →L[ℝ] E\nz w : ℂ\ns : Set ℂ\nhs : Set.Countable s\nHc : ContinuousOn f ([[z.re, w.re]] ×ℂ [[z.im, w.im]])\nHd :\n  ∀ (x : ℂ), x ∈ Ioo (min z.re w.re) (max z.re w.re) ×ℂ Ioo (min z.im w.im) (max z.im w.im) \\ s → HasFDerivAt f (f' x) x\nHi : IntegrableOn (fun z => I • ↑(f' z) 1 - ↑(f' z) I) ([[z.re, w.re]] ×ℂ [[z.im, w.im]])\ne : (ℝ × ℝ) ≃L[ℝ] ℂ := ContinuousLinearEquiv.symm equivRealProdClm\nhe₁ : ↑(ContinuousLinearEquiv.symm equivRealProdClm) (1, 0) = 1\nhe₂ : ↑(ContinuousLinearEquiv.symm equivRealProdClm) (0, 1) = I\nhe : ℝ → ℝ → True\nF : ℝ × ℝ → E := f ∘ ↑e\n⊢ (((∫ (x : ℝ) in z.re..w.re, f (↑(ContinuousLinearEquiv.symm equivRealProdClm) (x, z.im))) -\n          ∫ (x : ℝ) in z.re..w.re, f (↑(ContinuousLinearEquiv.symm equivRealProdClm) (x, w.im))) +\n        I • ∫ (y : ℝ) in z.im..w.im, f (↑(ContinuousLinearEquiv.symm equivRealProdClm) (w.re, y))) -\n      I • ∫ (y : ℝ) in z.im..w.im, f (↑(ContinuousLinearEquiv.symm equivRealProdClm) (z.re, y)) =\n    ∫ (x : ℝ) in z.re..w.re,\n      ∫ (y : ℝ) in z.im..w.im,\n        I • ↑(f' (↑(ContinuousLinearEquiv.symm equivRealProdClm) (x, y))) 1 -\n          ↑(f' (↑(ContinuousLinearEquiv.symm equivRealProdClm) (x, y))) I\n[PROOFSTEP]\nset F' : ℝ × ℝ → ℝ × ℝ →L[ℝ] E := fun p => (f' (e p)).comp (e : ℝ × ℝ →L[ℝ] ℂ)\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nf' : ℂ → ℂ →L[ℝ] E\nz w : ℂ\ns : Set ℂ\nhs : Set.Countable s\nHc : ContinuousOn f ([[z.re, w.re]] ×ℂ [[z.im, w.im]])\nHd :\n  ∀ (x : ℂ), x ∈ Ioo (min z.re w.re) (max z.re w.re) ×ℂ Ioo (min z.im w.im) (max z.im w.im) \\ s → HasFDerivAt f (f' x) x\nHi : IntegrableOn (fun z => I • ↑(f' z) 1 - ↑(f' z) I) ([[z.re, w.re]] ×ℂ [[z.im, w.im]])\ne : (ℝ × ℝ) ≃L[ℝ] ℂ := ContinuousLinearEquiv.symm equivRealProdClm\nhe₁ : ↑(ContinuousLinearEquiv.symm equivRealProdClm) (1, 0) = 1\nhe₂ : ↑(ContinuousLinearEquiv.symm equivRealProdClm) (0, 1) = I\nhe : ℝ → ℝ → True\nF : ℝ × ℝ → E := f ∘ ↑e\nF' : ℝ × ℝ → ℝ × ℝ →L[ℝ] E := fun p => ContinuousLinearMap.comp (f' (↑e p)) ↑e\n⊢ (((∫ (x : ℝ) in z.re..w.re, f (↑(ContinuousLinearEquiv.symm equivRealProdClm) (x, z.im))) -\n          ∫ (x : ℝ) in z.re..w.re, f (↑(ContinuousLinearEquiv.symm equivRealProdClm) (x, w.im))) +\n        I • ∫ (y : ℝ) in z.im..w.im, f (↑(ContinuousLinearEquiv.symm equivRealProdClm) (w.re, y))) -\n      I • ∫ (y : ℝ) in z.im..w.im, f (↑(ContinuousLinearEquiv.symm equivRealProdClm) (z.re, y)) =\n    ∫ (x : ℝ) in z.re..w.re,\n      ∫ (y : ℝ) in z.im..w.im,\n        I • ↑(f' (↑(ContinuousLinearEquiv.symm equivRealProdClm) (x, y))) 1 -\n          ↑(f' (↑(ContinuousLinearEquiv.symm equivRealProdClm) (x, y))) I\n[PROOFSTEP]\nhave hF' : ∀ p : ℝ × ℝ, (-(I • F' p)) (1, 0) + F' p (0, 1) = -(I • f' (e p) 1 - f' (e p) I) :=\n  by\n  rintro ⟨x, y⟩\n  simp only [ContinuousLinearMap.neg_apply, ContinuousLinearMap.smul_apply, ContinuousLinearMap.comp_apply,\n    ContinuousLinearEquiv.coe_coe, he₁, he₂, neg_add_eq_sub, neg_sub]\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nf' : ℂ → ℂ →L[ℝ] E\nz w : ℂ\ns : Set ℂ\nhs : Set.Countable s\nHc : ContinuousOn f ([[z.re, w.re]] ×ℂ [[z.im, w.im]])\nHd :\n  ∀ (x : ℂ), x ∈ Ioo (min z.re w.re) (max z.re w.re) ×ℂ Ioo (min z.im w.im) (max z.im w.im) \\ s → HasFDerivAt f (f' x) x\nHi : IntegrableOn (fun z => I • ↑(f' z) 1 - ↑(f' z) I) ([[z.re, w.re]] ×ℂ [[z.im, w.im]])\ne : (ℝ × ℝ) ≃L[ℝ] ℂ := ContinuousLinearEquiv.symm equivRealProdClm\nhe₁ : ↑(ContinuousLinearEquiv.symm equivRealProdClm) (1, 0) = 1\nhe₂ : ↑(ContinuousLinearEquiv.symm equivRealProdClm) (0, 1) = I\nhe : ℝ → ℝ → True\nF : ℝ × ℝ → E := f ∘ ↑e\nF' : ℝ × ℝ → ℝ × ℝ →L[ℝ] E := fun p => ContinuousLinearMap.comp (f' (↑e p)) ↑e\n⊢ ∀ (p : ℝ × ℝ), ↑(-(I • F' p)) (1, 0) + ↑(F' p) (0, 1) = -(I • ↑(f' (↑e p)) 1 - ↑(f' (↑e p)) I)\n[PROOFSTEP]\nrintro ⟨x, y⟩\n[GOAL]\ncase mk\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nf' : ℂ → ℂ →L[ℝ] E\nz w : ℂ\ns : Set ℂ\nhs : Set.Countable s\nHc : ContinuousOn f ([[z.re, w.re]] ×ℂ [[z.im, w.im]])\nHd :\n  ∀ (x : ℂ), x ∈ Ioo (min z.re w.re) (max z.re w.re) ×ℂ Ioo (min z.im w.im) (max z.im w.im) \\ s → HasFDerivAt f (f' x) x\nHi : IntegrableOn (fun z => I • ↑(f' z) 1 - ↑(f' z) I) ([[z.re, w.re]] ×ℂ [[z.im, w.im]])\ne : (ℝ × ℝ) ≃L[ℝ] ℂ := ContinuousLinearEquiv.symm equivRealProdClm\nhe₁ : ↑(ContinuousLinearEquiv.symm equivRealProdClm) (1, 0) = 1\nhe₂ : ↑(ContinuousLinearEquiv.symm equivRealProdClm) (0, 1) = I\nhe : ℝ → ℝ → True\nF : ℝ × ℝ → E := f ∘ ↑e\nF' : ℝ × ℝ → ℝ × ℝ →L[ℝ] E := fun p => ContinuousLinearMap.comp (f' (↑e p)) ↑e\nx y : ℝ\n⊢ ↑(-(I • F' (x, y))) (1, 0) + ↑(F' (x, y)) (0, 1) = -(I • ↑(f' (↑e (x, y))) 1 - ↑(f' (↑e (x, y))) I)\n[PROOFSTEP]\nsimp only [ContinuousLinearMap.neg_apply, ContinuousLinearMap.smul_apply, ContinuousLinearMap.comp_apply,\n  ContinuousLinearEquiv.coe_coe, he₁, he₂, neg_add_eq_sub, neg_sub]\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nf' : ℂ → ℂ →L[ℝ] E\nz w : ℂ\ns : Set ℂ\nhs : Set.Countable s\nHc : ContinuousOn f ([[z.re, w.re]] ×ℂ [[z.im, w.im]])\nHd :\n  ∀ (x : ℂ), x ∈ Ioo (min z.re w.re) (max z.re w.re) ×ℂ Ioo (min z.im w.im) (max z.im w.im) \\ s → HasFDerivAt f (f' x) x\nHi : IntegrableOn (fun z => I • ↑(f' z) 1 - ↑(f' z) I) ([[z.re, w.re]] ×ℂ [[z.im, w.im]])\ne : (ℝ × ℝ) ≃L[ℝ] ℂ := ContinuousLinearEquiv.symm equivRealProdClm\nhe₁ : ↑(ContinuousLinearEquiv.symm equivRealProdClm) (1, 0) = 1\nhe₂ : ↑(ContinuousLinearEquiv.symm equivRealProdClm) (0, 1) = I\nhe : ℝ → ℝ → True\nF : ℝ × ℝ → E := f ∘ ↑e\nF' : ℝ × ℝ → ℝ × ℝ →L[ℝ] E := fun p => ContinuousLinearMap.comp (f' (↑e p)) ↑e\nhF' : ∀ (p : ℝ × ℝ), ↑(-(I • F' p)) (1, 0) + ↑(F' p) (0, 1) = -(I • ↑(f' (↑e p)) 1 - ↑(f' (↑e p)) I)\n⊢ (((∫ (x : ℝ) in z.re..w.re, f (↑(ContinuousLinearEquiv.symm equivRealProdClm) (x, z.im))) -\n          ∫ (x : ℝ) in z.re..w.re, f (↑(ContinuousLinearEquiv.symm equivRealProdClm) (x, w.im))) +\n        I • ∫ (y : ℝ) in z.im..w.im, f (↑(ContinuousLinearEquiv.symm equivRealProdClm) (w.re, y))) -\n      I • ∫ (y : ℝ) in z.im..w.im, f (↑(ContinuousLinearEquiv.symm equivRealProdClm) (z.re, y)) =\n    ∫ (x : ℝ) in z.re..w.re,\n      ∫ (y : ℝ) in z.im..w.im,\n        I • ↑(f' (↑(ContinuousLinearEquiv.symm equivRealProdClm) (x, y))) 1 -\n          ↑(f' (↑(ContinuousLinearEquiv.symm equivRealProdClm) (x, y))) I\n[PROOFSTEP]\nset R : Set (ℝ × ℝ) := [[z.re, w.re]] ×ˢ [[w.im, z.im]]\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nf' : ℂ → ℂ →L[ℝ] E\nz w : ℂ\ns : Set ℂ\nhs : Set.Countable s\nHc : ContinuousOn f ([[z.re, w.re]] ×ℂ [[z.im, w.im]])\nHd :\n  ∀ (x : ℂ), x ∈ Ioo (min z.re w.re) (max z.re w.re) ×ℂ Ioo (min z.im w.im) (max z.im w.im) \\ s → HasFDerivAt f (f' x) x\nHi : IntegrableOn (fun z => I • ↑(f' z) 1 - ↑(f' z) I) ([[z.re, w.re]] ×ℂ [[z.im, w.im]])\ne : (ℝ × ℝ) ≃L[ℝ] ℂ := ContinuousLinearEquiv.symm equivRealProdClm\nhe₁ : ↑(ContinuousLinearEquiv.symm equivRealProdClm) (1, 0) = 1\nhe₂ : ↑(ContinuousLinearEquiv.symm equivRealProdClm) (0, 1) = I\nhe : ℝ → ℝ → True\nF : ℝ × ℝ → E := f ∘ ↑e\nF' : ℝ × ℝ → ℝ × ℝ →L[ℝ] E := fun p => ContinuousLinearMap.comp (f' (↑e p)) ↑e\nhF' : ∀ (p : ℝ × ℝ), ↑(-(I • F' p)) (1, 0) + ↑(F' p) (0, 1) = -(I • ↑(f' (↑e p)) 1 - ↑(f' (↑e p)) I)\nR : Set (ℝ × ℝ) := [[z.re, w.re]] ×ˢ [[w.im, z.im]]\n⊢ (((∫ (x : ℝ) in z.re..w.re, f (↑(ContinuousLinearEquiv.symm equivRealProdClm) (x, z.im))) -\n          ∫ (x : ℝ) in z.re..w.re, f (↑(ContinuousLinearEquiv.symm equivRealProdClm) (x, w.im))) +\n        I • ∫ (y : ℝ) in z.im..w.im, f (↑(ContinuousLinearEquiv.symm equivRealProdClm) (w.re, y))) -\n      I • ∫ (y : ℝ) in z.im..w.im, f (↑(ContinuousLinearEquiv.symm equivRealProdClm) (z.re, y)) =\n    ∫ (x : ℝ) in z.re..w.re,\n      ∫ (y : ℝ) in z.im..w.im,\n        I • ↑(f' (↑(ContinuousLinearEquiv.symm equivRealProdClm) (x, y))) 1 -\n          ↑(f' (↑(ContinuousLinearEquiv.symm equivRealProdClm) (x, y))) I\n[PROOFSTEP]\nset t : Set (ℝ × ℝ) := e ⁻¹' s\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nf' : ℂ → ℂ →L[ℝ] E\nz w : ℂ\ns : Set ℂ\nhs : Set.Countable s\nHc : ContinuousOn f ([[z.re, w.re]] ×ℂ [[z.im, w.im]])\nHd :\n  ∀ (x : ℂ), x ∈ Ioo (min z.re w.re) (max z.re w.re) ×ℂ Ioo (min z.im w.im) (max z.im w.im) \\ s → HasFDerivAt f (f' x) x\nHi : IntegrableOn (fun z => I • ↑(f' z) 1 - ↑(f' z) I) ([[z.re, w.re]] ×ℂ [[z.im, w.im]])\ne : (ℝ × ℝ) ≃L[ℝ] ℂ := ContinuousLinearEquiv.symm equivRealProdClm\nhe₁ : ↑(ContinuousLinearEquiv.symm equivRealProdClm) (1, 0) = 1\nhe₂ : ↑(ContinuousLinearEquiv.symm equivRealProdClm) (0, 1) = I\nhe : ℝ → ℝ → True\nF : ℝ × ℝ → E := f ∘ ↑e\nF' : ℝ × ℝ → ℝ × ℝ →L[ℝ] E := fun p => ContinuousLinearMap.comp (f' (↑e p)) ↑e\nhF' : ∀ (p : ℝ × ℝ), ↑(-(I • F' p)) (1, 0) + ↑(F' p) (0, 1) = -(I • ↑(f' (↑e p)) 1 - ↑(f' (↑e p)) I)\nR : Set (ℝ × ℝ) := [[z.re, w.re]] ×ˢ [[w.im, z.im]]\nt : Set (ℝ × ℝ) := ↑e ⁻¹' s\n⊢ (((∫ (x : ℝ) in z.re..w.re, f (↑(ContinuousLinearEquiv.symm equivRealProdClm) (x, z.im))) -\n          ∫ (x : ℝ) in z.re..w.re, f (↑(ContinuousLinearEquiv.symm equivRealProdClm) (x, w.im))) +\n        I • ∫ (y : ℝ) in z.im..w.im, f (↑(ContinuousLinearEquiv.symm equivRealProdClm) (w.re, y))) -\n      I • ∫ (y : ℝ) in z.im..w.im, f (↑(ContinuousLinearEquiv.symm equivRealProdClm) (z.re, y)) =\n    ∫ (x : ℝ) in z.re..w.re,\n      ∫ (y : ℝ) in z.im..w.im,\n        I • ↑(f' (↑(ContinuousLinearEquiv.symm equivRealProdClm) (x, y))) 1 -\n          ↑(f' (↑(ContinuousLinearEquiv.symm equivRealProdClm) (x, y))) I\n[PROOFSTEP]\nrw [uIcc_comm z.im] at Hc Hi \n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nf' : ℂ → ℂ →L[ℝ] E\nz w : ℂ\ns : Set ℂ\nhs : Set.Countable s\nHc : ContinuousOn f ([[z.re, w.re]] ×ℂ [[w.im, z.im]])\nHd :\n  ∀ (x : ℂ), x ∈ Ioo (min z.re w.re) (max z.re w.re) ×ℂ Ioo (min z.im w.im) (max z.im w.im) \\ s → HasFDerivAt f (f' x) x\nHi : IntegrableOn (fun z => I • ↑(f' z) 1 - ↑(f' z) I) ([[z.re, w.re]] ×ℂ [[w.im, z.im]])\ne : (ℝ × ℝ) ≃L[ℝ] ℂ := ContinuousLinearEquiv.symm equivRealProdClm\nhe₁ : ↑(ContinuousLinearEquiv.symm equivRealProdClm) (1, 0) = 1\nhe₂ : ↑(ContinuousLinearEquiv.symm equivRealProdClm) (0, 1) = I\nhe : ℝ → ℝ → True\nF : ℝ × ℝ → E := f ∘ ↑e\nF' : ℝ × ℝ → ℝ × ℝ →L[ℝ] E := fun p => ContinuousLinearMap.comp (f' (↑e p)) ↑e\nhF' : ∀ (p : ℝ × ℝ), ↑(-(I • F' p)) (1, 0) + ↑(F' p) (0, 1) = -(I • ↑(f' (↑e p)) 1 - ↑(f' (↑e p)) I)\nR : Set (ℝ × ℝ) := [[z.re, w.re]] ×ˢ [[w.im, z.im]]\nt : Set (ℝ × ℝ) := ↑e ⁻¹' s\n⊢ (((∫ (x : ℝ) in z.re..w.re, f (↑(ContinuousLinearEquiv.symm equivRealProdClm) (x, z.im))) -\n          ∫ (x : ℝ) in z.re..w.re, f (↑(ContinuousLinearEquiv.symm equivRealProdClm) (x, w.im))) +\n        I • ∫ (y : ℝ) in z.im..w.im, f (↑(ContinuousLinearEquiv.symm equivRealProdClm) (w.re, y))) -\n      I • ∫ (y : ℝ) in z.im..w.im, f (↑(ContinuousLinearEquiv.symm equivRealProdClm) (z.re, y)) =\n    ∫ (x : ℝ) in z.re..w.re,\n      ∫ (y : ℝ) in z.im..w.im,\n        I • ↑(f' (↑(ContinuousLinearEquiv.symm equivRealProdClm) (x, y))) 1 -\n          ↑(f' (↑(ContinuousLinearEquiv.symm equivRealProdClm) (x, y))) I\n[PROOFSTEP]\nrw [min_comm z.im, max_comm z.im] at Hd \n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nf' : ℂ → ℂ →L[ℝ] E\nz w : ℂ\ns : Set ℂ\nhs : Set.Countable s\nHc : ContinuousOn f ([[z.re, w.re]] ×ℂ [[w.im, z.im]])\nHd :\n  ∀ (x : ℂ), x ∈ Ioo (min z.re w.re) (max z.re w.re) ×ℂ Ioo (min w.im z.im) (max w.im z.im) \\ s → HasFDerivAt f (f' x) x\nHi : IntegrableOn (fun z => I • ↑(f' z) 1 - ↑(f' z) I) ([[z.re, w.re]] ×ℂ [[w.im, z.im]])\ne : (ℝ × ℝ) ≃L[ℝ] ℂ := ContinuousLinearEquiv.symm equivRealProdClm\nhe₁ : ↑(ContinuousLinearEquiv.symm equivRealProdClm) (1, 0) = 1\nhe₂ : ↑(ContinuousLinearEquiv.symm equivRealProdClm) (0, 1) = I\nhe : ℝ → ℝ → True\nF : ℝ × ℝ → E := f ∘ ↑e\nF' : ℝ × ℝ → ℝ × ℝ →L[ℝ] E := fun p => ContinuousLinearMap.comp (f' (↑e p)) ↑e\nhF' : ∀ (p : ℝ × ℝ), ↑(-(I • F' p)) (1, 0) + ↑(F' p) (0, 1) = -(I • ↑(f' (↑e p)) 1 - ↑(f' (↑e p)) I)\nR : Set (ℝ × ℝ) := [[z.re, w.re]] ×ˢ [[w.im, z.im]]\nt : Set (ℝ × ℝ) := ↑e ⁻¹' s\n⊢ (((∫ (x : ℝ) in z.re..w.re, f (↑(ContinuousLinearEquiv.symm equivRealProdClm) (x, z.im))) -\n          ∫ (x : ℝ) in z.re..w.re, f (↑(ContinuousLinearEquiv.symm equivRealProdClm) (x, w.im))) +\n        I • ∫ (y : ℝ) in z.im..w.im, f (↑(ContinuousLinearEquiv.symm equivRealProdClm) (w.re, y))) -\n      I • ∫ (y : ℝ) in z.im..w.im, f (↑(ContinuousLinearEquiv.symm equivRealProdClm) (z.re, y)) =\n    ∫ (x : ℝ) in z.re..w.re,\n      ∫ (y : ℝ) in z.im..w.im,\n        I • ↑(f' (↑(ContinuousLinearEquiv.symm equivRealProdClm) (x, y))) 1 -\n          ↑(f' (↑(ContinuousLinearEquiv.symm equivRealProdClm) (x, y))) I\n[PROOFSTEP]\nhave hR : e ⁻¹' ([[z.re, w.re]] ×ℂ [[w.im, z.im]]) = R := rfl\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nf' : ℂ → ℂ →L[ℝ] E\nz w : ℂ\ns : Set ℂ\nhs : Set.Countable s\nHc : ContinuousOn f ([[z.re, w.re]] ×ℂ [[w.im, z.im]])\nHd :\n  ∀ (x : ℂ), x ∈ Ioo (min z.re w.re) (max z.re w.re) ×ℂ Ioo (min w.im z.im) (max w.im z.im) \\ s → HasFDerivAt f (f' x) x\nHi : IntegrableOn (fun z => I • ↑(f' z) 1 - ↑(f' z) I) ([[z.re, w.re]] ×ℂ [[w.im, z.im]])\ne : (ℝ × ℝ) ≃L[ℝ] ℂ := ContinuousLinearEquiv.symm equivRealProdClm\nhe₁ : ↑(ContinuousLinearEquiv.symm equivRealProdClm) (1, 0) = 1\nhe₂ : ↑(ContinuousLinearEquiv.symm equivRealProdClm) (0, 1) = I\nhe : ℝ → ℝ → True\nF : ℝ × ℝ → E := f ∘ ↑e\nF' : ℝ × ℝ → ℝ × ℝ →L[ℝ] E := fun p => ContinuousLinearMap.comp (f' (↑e p)) ↑e\nhF' : ∀ (p : ℝ × ℝ), ↑(-(I • F' p)) (1, 0) + ↑(F' p) (0, 1) = -(I • ↑(f' (↑e p)) 1 - ↑(f' (↑e p)) I)\nR : Set (ℝ × ℝ) := [[z.re, w.re]] ×ˢ [[w.im, z.im]]\nt : Set (ℝ × ℝ) := ↑e ⁻¹' s\nhR : ↑e ⁻¹' ([[z.re, w.re]] ×ℂ [[w.im, z.im]]) = R\n⊢ (((∫ (x : ℝ) in z.re..w.re, f (↑(ContinuousLinearEquiv.symm equivRealProdClm) (x, z.im))) -\n          ∫ (x : ℝ) in z.re..w.re, f (↑(ContinuousLinearEquiv.symm equivRealProdClm) (x, w.im))) +\n        I • ∫ (y : ℝ) in z.im..w.im, f (↑(ContinuousLinearEquiv.symm equivRealProdClm) (w.re, y))) -\n      I • ∫ (y : ℝ) in z.im..w.im, f (↑(ContinuousLinearEquiv.symm equivRealProdClm) (z.re, y)) =\n    ∫ (x : ℝ) in z.re..w.re,\n      ∫ (y : ℝ) in z.im..w.im,\n        I • ↑(f' (↑(ContinuousLinearEquiv.symm equivRealProdClm) (x, y))) 1 -\n          ↑(f' (↑(ContinuousLinearEquiv.symm equivRealProdClm) (x, y))) I\n[PROOFSTEP]\nhave htc : ContinuousOn F R := Hc.comp e.continuousOn hR.ge\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nf' : ℂ → ℂ →L[ℝ] E\nz w : ℂ\ns : Set ℂ\nhs : Set.Countable s\nHc : ContinuousOn f ([[z.re, w.re]] ×ℂ [[w.im, z.im]])\nHd :\n  ∀ (x : ℂ), x ∈ Ioo (min z.re w.re) (max z.re w.re) ×ℂ Ioo (min w.im z.im) (max w.im z.im) \\ s → HasFDerivAt f (f' x) x\nHi : IntegrableOn (fun z => I • ↑(f' z) 1 - ↑(f' z) I) ([[z.re, w.re]] ×ℂ [[w.im, z.im]])\ne : (ℝ × ℝ) ≃L[ℝ] ℂ := ContinuousLinearEquiv.symm equivRealProdClm\nhe₁ : ↑(ContinuousLinearEquiv.symm equivRealProdClm) (1, 0) = 1\nhe₂ : ↑(ContinuousLinearEquiv.symm equivRealProdClm) (0, 1) = I\nhe : ℝ → ℝ → True\nF : ℝ × ℝ → E := f ∘ ↑e\nF' : ℝ × ℝ → ℝ × ℝ →L[ℝ] E := fun p => ContinuousLinearMap.comp (f' (↑e p)) ↑e\nhF' : ∀ (p : ℝ × ℝ), ↑(-(I • F' p)) (1, 0) + ↑(F' p) (0, 1) = -(I • ↑(f' (↑e p)) 1 - ↑(f' (↑e p)) I)\nR : Set (ℝ × ℝ) := [[z.re, w.re]] ×ˢ [[w.im, z.im]]\nt : Set (ℝ × ℝ) := ↑e ⁻¹' s\nhR : ↑e ⁻¹' ([[z.re, w.re]] ×ℂ [[w.im, z.im]]) = R\nhtc : ContinuousOn F R\n⊢ (((∫ (x : ℝ) in z.re..w.re, f (↑(ContinuousLinearEquiv.symm equivRealProdClm) (x, z.im))) -\n          ∫ (x : ℝ) in z.re..w.re, f (↑(ContinuousLinearEquiv.symm equivRealProdClm) (x, w.im))) +\n        I • ∫ (y : ℝ) in z.im..w.im, f (↑(ContinuousLinearEquiv.symm equivRealProdClm) (w.re, y))) -\n      I • ∫ (y : ℝ) in z.im..w.im, f (↑(ContinuousLinearEquiv.symm equivRealProdClm) (z.re, y)) =\n    ∫ (x : ℝ) in z.re..w.re,\n      ∫ (y : ℝ) in z.im..w.im,\n        I • ↑(f' (↑(ContinuousLinearEquiv.symm equivRealProdClm) (x, y))) 1 -\n          ↑(f' (↑(ContinuousLinearEquiv.symm equivRealProdClm) (x, y))) I\n[PROOFSTEP]\nhave htd :\n  ∀ p ∈ Ioo (min z.re w.re) (max z.re w.re) ×ˢ Ioo (min w.im z.im) (max w.im z.im) \\ t, HasFDerivAt F (F' p) p :=\n  fun p hp => (Hd (e p) hp).comp p e.hasFDerivAt\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nf' : ℂ → ℂ →L[ℝ] E\nz w : ℂ\ns : Set ℂ\nhs : Set.Countable s\nHc : ContinuousOn f ([[z.re, w.re]] ×ℂ [[w.im, z.im]])\nHd :\n  ∀ (x : ℂ), x ∈ Ioo (min z.re w.re) (max z.re w.re) ×ℂ Ioo (min w.im z.im) (max w.im z.im) \\ s → HasFDerivAt f (f' x) x\nHi : IntegrableOn (fun z => I • ↑(f' z) 1 - ↑(f' z) I) ([[z.re, w.re]] ×ℂ [[w.im, z.im]])\ne : (ℝ × ℝ) ≃L[ℝ] ℂ := ContinuousLinearEquiv.symm equivRealProdClm\nhe₁ : ↑(ContinuousLinearEquiv.symm equivRealProdClm) (1, 0) = 1\nhe₂ : ↑(ContinuousLinearEquiv.symm equivRealProdClm) (0, 1) = I\nhe : ℝ → ℝ → True\nF : ℝ × ℝ → E := f ∘ ↑e\nF' : ℝ × ℝ → ℝ × ℝ →L[ℝ] E := fun p => ContinuousLinearMap.comp (f' (↑e p)) ↑e\nhF' : ∀ (p : ℝ × ℝ), ↑(-(I • F' p)) (1, 0) + ↑(F' p) (0, 1) = -(I • ↑(f' (↑e p)) 1 - ↑(f' (↑e p)) I)\nR : Set (ℝ × ℝ) := [[z.re, w.re]] ×ˢ [[w.im, z.im]]\nt : Set (ℝ × ℝ) := ↑e ⁻¹' s\nhR : ↑e ⁻¹' ([[z.re, w.re]] ×ℂ [[w.im, z.im]]) = R\nhtc : ContinuousOn F R\nhtd :\n  ∀ (p : ℝ × ℝ),\n    p ∈ Ioo (min z.re w.re) (max z.re w.re) ×ˢ Ioo (min w.im z.im) (max w.im z.im) \\ t → HasFDerivAt F (F' p) p\n⊢ (((∫ (x : ℝ) in z.re..w.re, f (↑(ContinuousLinearEquiv.symm equivRealProdClm) (x, z.im))) -\n          ∫ (x : ℝ) in z.re..w.re, f (↑(ContinuousLinearEquiv.symm equivRealProdClm) (x, w.im))) +\n        I • ∫ (y : ℝ) in z.im..w.im, f (↑(ContinuousLinearEquiv.symm equivRealProdClm) (w.re, y))) -\n      I • ∫ (y : ℝ) in z.im..w.im, f (↑(ContinuousLinearEquiv.symm equivRealProdClm) (z.re, y)) =\n    ∫ (x : ℝ) in z.re..w.re,\n      ∫ (y : ℝ) in z.im..w.im,\n        I • ↑(f' (↑(ContinuousLinearEquiv.symm equivRealProdClm) (x, y))) 1 -\n          ↑(f' (↑(ContinuousLinearEquiv.symm equivRealProdClm) (x, y))) I\n[PROOFSTEP]\nsimp_rw [← intervalIntegral.integral_smul, intervalIntegral.integral_symm w.im z.im, ← intervalIntegral.integral_neg, ←\n  hF']\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nf' : ℂ → ℂ →L[ℝ] E\nz w : ℂ\ns : Set ℂ\nhs : Set.Countable s\nHc : ContinuousOn f ([[z.re, w.re]] ×ℂ [[w.im, z.im]])\nHd :\n  ∀ (x : ℂ), x ∈ Ioo (min z.re w.re) (max z.re w.re) ×ℂ Ioo (min w.im z.im) (max w.im z.im) \\ s → HasFDerivAt f (f' x) x\nHi : IntegrableOn (fun z => I • ↑(f' z) 1 - ↑(f' z) I) ([[z.re, w.re]] ×ℂ [[w.im, z.im]])\ne : (ℝ × ℝ) ≃L[ℝ] ℂ := ContinuousLinearEquiv.symm equivRealProdClm\nhe₁ : ↑(ContinuousLinearEquiv.symm equivRealProdClm) (1, 0) = 1\nhe₂ : ↑(ContinuousLinearEquiv.symm equivRealProdClm) (0, 1) = I\nhe : ℝ → ℝ → True\nF : ℝ × ℝ → E := f ∘ ↑e\nF' : ℝ × ℝ → ℝ × ℝ →L[ℝ] E := fun p => ContinuousLinearMap.comp (f' (↑e p)) ↑e\nhF' : ∀ (p : ℝ × ℝ), ↑(-(I • F' p)) (1, 0) + ↑(F' p) (0, 1) = -(I • ↑(f' (↑e p)) 1 - ↑(f' (↑e p)) I)\nR : Set (ℝ × ℝ) := [[z.re, w.re]] ×ˢ [[w.im, z.im]]\nt : Set (ℝ × ℝ) := ↑e ⁻¹' s\nhR : ↑e ⁻¹' ([[z.re, w.re]] ×ℂ [[w.im, z.im]]) = R\nhtc : ContinuousOn F R\nhtd :\n  ∀ (p : ℝ × ℝ),\n    p ∈ Ioo (min z.re w.re) (max z.re w.re) ×ˢ Ioo (min w.im z.im) (max w.im z.im) \\ t → HasFDerivAt F (F' p) p\n⊢ (((∫ (x : ℝ) in z.re..w.re, f (↑(ContinuousLinearEquiv.symm equivRealProdClm) (x, z.im))) -\n          ∫ (x : ℝ) in z.re..w.re, f (↑(ContinuousLinearEquiv.symm equivRealProdClm) (x, w.im))) +\n        ∫ (x : ℝ) in w.im..z.im, -(I • f (↑(ContinuousLinearEquiv.symm equivRealProdClm) (w.re, x)))) -\n      ∫ (x : ℝ) in w.im..z.im, -(I • f (↑(ContinuousLinearEquiv.symm equivRealProdClm) (z.re, x))) =\n    ∫ (x : ℝ) in z.re..w.re,\n      ∫ (x_1 : ℝ) in w.im..z.im,\n        ↑(-(I •\n                  ContinuousLinearMap.comp (f' (↑(ContinuousLinearEquiv.symm equivRealProdClm) (x, x_1)))\n                    ↑(ContinuousLinearEquiv.symm equivRealProdClm)))\n            (1, 0) +\n          ↑(ContinuousLinearMap.comp (f' (↑(ContinuousLinearEquiv.symm equivRealProdClm) (x, x_1)))\n                ↑(ContinuousLinearEquiv.symm equivRealProdClm))\n            (0, 1)\n[PROOFSTEP]\nrefine'\n  (integral2_divergence_prod_of_hasFDerivWithinAt_off_countable (fun p => -(I • F p)) F (fun p => -(I • F' p)) F' z.re\n      w.im w.re z.im t (hs.preimage e.injective) (htc.const_smul _).neg htc (fun p hp => ((htd p hp).const_smul I).neg)\n      htd _).symm\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nf' : ℂ → ℂ →L[ℝ] E\nz w : ℂ\ns : Set ℂ\nhs : Set.Countable s\nHc : ContinuousOn f ([[z.re, w.re]] ×ℂ [[w.im, z.im]])\nHd :\n  ∀ (x : ℂ), x ∈ Ioo (min z.re w.re) (max z.re w.re) ×ℂ Ioo (min w.im z.im) (max w.im z.im) \\ s → HasFDerivAt f (f' x) x\nHi : IntegrableOn (fun z => I • ↑(f' z) 1 - ↑(f' z) I) ([[z.re, w.re]] ×ℂ [[w.im, z.im]])\ne : (ℝ × ℝ) ≃L[ℝ] ℂ := ContinuousLinearEquiv.symm equivRealProdClm\nhe₁ : ↑(ContinuousLinearEquiv.symm equivRealProdClm) (1, 0) = 1\nhe₂ : ↑(ContinuousLinearEquiv.symm equivRealProdClm) (0, 1) = I\nhe : ℝ → ℝ → True\nF : ℝ × ℝ → E := f ∘ ↑e\nF' : ℝ × ℝ → ℝ × ℝ →L[ℝ] E := fun p => ContinuousLinearMap.comp (f' (↑e p)) ↑e\nhF' : ∀ (p : ℝ × ℝ), ↑(-(I • F' p)) (1, 0) + ↑(F' p) (0, 1) = -(I • ↑(f' (↑e p)) 1 - ↑(f' (↑e p)) I)\nR : Set (ℝ × ℝ) := [[z.re, w.re]] ×ˢ [[w.im, z.im]]\nt : Set (ℝ × ℝ) := ↑e ⁻¹' s\nhR : ↑e ⁻¹' ([[z.re, w.re]] ×ℂ [[w.im, z.im]]) = R\nhtc : ContinuousOn F R\nhtd :\n  ∀ (p : ℝ × ℝ),\n    p ∈ Ioo (min z.re w.re) (max z.re w.re) ×ˢ Ioo (min w.im z.im) (max w.im z.im) \\ t → HasFDerivAt F (F' p) p\n⊢ IntegrableOn (fun x => ↑((fun p => -(I • F' p)) x) (1, 0) + ↑(F' x) (0, 1)) ([[z.re, w.re]] ×ˢ [[w.im, z.im]])\n[PROOFSTEP]\nrw [← (volume_preserving_equiv_real_prod.symm _).integrableOn_comp_preimage (MeasurableEquiv.measurableEmbedding _)] at\n  Hi \n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nf' : ℂ → ℂ →L[ℝ] E\nz w : ℂ\ns : Set ℂ\nhs : Set.Countable s\nHc : ContinuousOn f ([[z.re, w.re]] ×ℂ [[w.im, z.im]])\nHd :\n  ∀ (x : ℂ), x ∈ Ioo (min z.re w.re) (max z.re w.re) ×ℂ Ioo (min w.im z.im) (max w.im z.im) \\ s → HasFDerivAt f (f' x) x\nHi :\n  IntegrableOn ((fun z => I • ↑(f' z) 1 - ↑(f' z) I) ∘ ↑(MeasurableEquiv.symm measurableEquivRealProd))\n    (↑(MeasurableEquiv.symm measurableEquivRealProd) ⁻¹' ([[z.re, w.re]] ×ℂ [[w.im, z.im]]))\ne : (ℝ × ℝ) ≃L[ℝ] ℂ := ContinuousLinearEquiv.symm equivRealProdClm\nhe₁ : ↑(ContinuousLinearEquiv.symm equivRealProdClm) (1, 0) = 1\nhe₂ : ↑(ContinuousLinearEquiv.symm equivRealProdClm) (0, 1) = I\nhe : ℝ → ℝ → True\nF : ℝ × ℝ → E := f ∘ ↑e\nF' : ℝ × ℝ → ℝ × ℝ →L[ℝ] E := fun p => ContinuousLinearMap.comp (f' (↑e p)) ↑e\nhF' : ∀ (p : ℝ × ℝ), ↑(-(I • F' p)) (1, 0) + ↑(F' p) (0, 1) = -(I • ↑(f' (↑e p)) 1 - ↑(f' (↑e p)) I)\nR : Set (ℝ × ℝ) := [[z.re, w.re]] ×ˢ [[w.im, z.im]]\nt : Set (ℝ × ℝ) := ↑e ⁻¹' s\nhR : ↑e ⁻¹' ([[z.re, w.re]] ×ℂ [[w.im, z.im]]) = R\nhtc : ContinuousOn F R\nhtd :\n  ∀ (p : ℝ × ℝ),\n    p ∈ Ioo (min z.re w.re) (max z.re w.re) ×ˢ Ioo (min w.im z.im) (max w.im z.im) \\ t → HasFDerivAt F (F' p) p\n⊢ IntegrableOn (fun x => ↑((fun p => -(I • F' p)) x) (1, 0) + ↑(F' x) (0, 1)) ([[z.re, w.re]] ×ˢ [[w.im, z.im]])\n[PROOFSTEP]\nsimpa only [hF'] using Hi.neg\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nz w : ℂ\nHd : DifferentiableOn ℝ f ([[z.re, w.re]] ×ℂ [[z.im, w.im]])\nHi : IntegrableOn (fun z => I • ↑(fderiv ℝ f z) 1 - ↑(fderiv ℝ f z) I) ([[z.re, w.re]] ×ℂ [[z.im, w.im]])\nx : ℂ\nhx : x ∈ Ioo (min z.re w.re) (max z.re w.re) ×ℂ Ioo (min z.im w.im) (max z.im w.im) \\ ∅\n⊢ [[z.re, w.re]] ×ℂ [[z.im, w.im]] ∈ 𝓝 x\n[PROOFSTEP]\nsimpa only [← mem_interior_iff_mem_nhds, interior_reProdIm, uIcc, interior_Icc] using hx.1\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nz w : ℂ\ns : Set ℂ\nhs : Set.Countable s\nHc : ContinuousOn f ([[z.re, w.re]] ×ℂ [[z.im, w.im]])\nHd :\n  ∀ (x : ℂ), x ∈ Ioo (min z.re w.re) (max z.re w.re) ×ℂ Ioo (min z.im w.im) (max z.im w.im) \\ s → DifferentiableAt ℂ f x\n⊢ (((∫ (x : ℝ) in z.re..w.re, f (↑x + ↑z.im * I)) - ∫ (x : ℝ) in z.re..w.re, f (↑x + ↑w.im * I)) +\n        I • ∫ (y : ℝ) in z.im..w.im, f (↑w.re + ↑y * I)) -\n      I • ∫ (y : ℝ) in z.im..w.im, f (↑z.re + ↑y * I) =\n    0\n[PROOFSTEP]\nhave : ∀ z, I • (fderiv ℂ f z).restrictScalars ℝ 1 = (fderiv ℂ f z).restrictScalars ℝ I := fun z ↦ by\n  rw [(fderiv ℂ f _).coe_restrictScalars', ← (fderiv ℂ f _).map_smul, smul_eq_mul, mul_one]\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nz✝ w : ℂ\ns : Set ℂ\nhs : Set.Countable s\nHc : ContinuousOn f ([[z✝.re, w.re]] ×ℂ [[z✝.im, w.im]])\nHd :\n  ∀ (x : ℂ),\n    x ∈ Ioo (min z✝.re w.re) (max z✝.re w.re) ×ℂ Ioo (min z✝.im w.im) (max z✝.im w.im) \\ s → DifferentiableAt ℂ f x\nz : ℂ\n⊢ I • ↑(ContinuousLinearMap.restrictScalars ℝ (fderiv ℂ f z)) 1 =\n    ↑(ContinuousLinearMap.restrictScalars ℝ (fderiv ℂ f z)) I\n[PROOFSTEP]\nrw [(fderiv ℂ f _).coe_restrictScalars', ← (fderiv ℂ f _).map_smul, smul_eq_mul, mul_one]\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nz w : ℂ\ns : Set ℂ\nhs : Set.Countable s\nHc : ContinuousOn f ([[z.re, w.re]] ×ℂ [[z.im, w.im]])\nHd :\n  ∀ (x : ℂ), x ∈ Ioo (min z.re w.re) (max z.re w.re) ×ℂ Ioo (min z.im w.im) (max z.im w.im) \\ s → DifferentiableAt ℂ f x\nthis :\n  ∀ (z : ℂ),\n    I • ↑(ContinuousLinearMap.restrictScalars ℝ (fderiv ℂ f z)) 1 =\n      ↑(ContinuousLinearMap.restrictScalars ℝ (fderiv ℂ f z)) I\n⊢ (((∫ (x : ℝ) in z.re..w.re, f (↑x + ↑z.im * I)) - ∫ (x : ℝ) in z.re..w.re, f (↑x + ↑w.im * I)) +\n        I • ∫ (y : ℝ) in z.im..w.im, f (↑w.re + ↑y * I)) -\n      I • ∫ (y : ℝ) in z.im..w.im, f (↑z.re + ↑y * I) =\n    0\n[PROOFSTEP]\nrefine\n  (integral_boundary_rect_of_hasFDerivAt_real_off_countable f (fun z => (fderiv ℂ f z).restrictScalars ℝ) z w s hs Hc\n        (fun x hx => (Hd x hx).hasFDerivAt.restrictScalars ℝ) ?_).trans\n    ?_\n[GOAL]\ncase refine_1\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nz w : ℂ\ns : Set ℂ\nhs : Set.Countable s\nHc : ContinuousOn f ([[z.re, w.re]] ×ℂ [[z.im, w.im]])\nHd :\n  ∀ (x : ℂ), x ∈ Ioo (min z.re w.re) (max z.re w.re) ×ℂ Ioo (min z.im w.im) (max z.im w.im) \\ s → DifferentiableAt ℂ f x\nthis :\n  ∀ (z : ℂ),\n    I • ↑(ContinuousLinearMap.restrictScalars ℝ (fderiv ℂ f z)) 1 =\n      ↑(ContinuousLinearMap.restrictScalars ℝ (fderiv ℂ f z)) I\n⊢ IntegrableOn\n    (fun z =>\n      I • ↑((fun z => ContinuousLinearMap.restrictScalars ℝ (fderiv ℂ f z)) z) 1 -\n        ↑((fun z => ContinuousLinearMap.restrictScalars ℝ (fderiv ℂ f z)) z) I)\n    ([[z.re, w.re]] ×ℂ [[z.im, w.im]])\n[PROOFSTEP]\nsimp [this]\n[GOAL]\ncase refine_2\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nz w : ℂ\ns : Set ℂ\nhs : Set.Countable s\nHc : ContinuousOn f ([[z.re, w.re]] ×ℂ [[z.im, w.im]])\nHd :\n  ∀ (x : ℂ), x ∈ Ioo (min z.re w.re) (max z.re w.re) ×ℂ Ioo (min z.im w.im) (max z.im w.im) \\ s → DifferentiableAt ℂ f x\nthis :\n  ∀ (z : ℂ),\n    I • ↑(ContinuousLinearMap.restrictScalars ℝ (fderiv ℂ f z)) 1 =\n      ↑(ContinuousLinearMap.restrictScalars ℝ (fderiv ℂ f z)) I\n⊢ ∫ (x : ℝ) in z.re..w.re,\n      ∫ (y : ℝ) in z.im..w.im,\n        I • ↑(ContinuousLinearMap.restrictScalars ℝ (fderiv ℂ f (↑x + ↑y * I))) 1 -\n          ↑(ContinuousLinearMap.restrictScalars ℝ (fderiv ℂ f (↑x + ↑y * I))) I =\n    0\n[PROOFSTEP]\nsimp [this]\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nc : ℂ\nr R : ℝ\nh0 : 0 < r\nhle : r ≤ R\nf : ℂ → E\ns : Set ℂ\nhs : Set.Countable s\nhc : ContinuousOn f (closedBall c R \\ ball c r)\nhd : ∀ (z : ℂ), z ∈ (ball c R \\ closedBall c r) \\ s → DifferentiableAt ℂ f z\n⊢ (∮ (z : ℂ) in C(c, R), (z - c)⁻¹ • f z) = ∮ (z : ℂ) in C(c, r), (z - c)⁻¹ • f z\n[PROOFSTEP]\nset A := closedBall c R \\ ball c r\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nc : ℂ\nr R : ℝ\nh0 : 0 < r\nhle : r ≤ R\nf : ℂ → E\ns : Set ℂ\nhs : Set.Countable s\nhd : ∀ (z : ℂ), z ∈ (ball c R \\ closedBall c r) \\ s → DifferentiableAt ℂ f z\nA : Set ℂ := closedBall c R \\ ball c r\nhc : ContinuousOn f A\n⊢ (∮ (z : ℂ) in C(c, R), (z - c)⁻¹ • f z) = ∮ (z : ℂ) in C(c, r), (z - c)⁻¹ • f z\n[PROOFSTEP]\nobtain ⟨a, rfl⟩ : ∃ a, Real.exp a = r\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nc : ℂ\nr R : ℝ\nh0 : 0 < r\nhle : r ≤ R\nf : ℂ → E\ns : Set ℂ\nhs : Set.Countable s\nhd : ∀ (z : ℂ), z ∈ (ball c R \\ closedBall c r) \\ s → DifferentiableAt ℂ f z\nA : Set ℂ := closedBall c R \\ ball c r\nhc : ContinuousOn f A\n⊢ ∃ a, Real.exp a = r\ncase intro\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nc : ℂ\nR : ℝ\nf : ℂ → E\ns : Set ℂ\nhs : Set.Countable s\na : ℝ\nh0 : 0 < Real.exp a\nhle : Real.exp a ≤ R\nhd : ∀ (z : ℂ), z ∈ (ball c R \\ closedBall c (Real.exp a)) \\ s → DifferentiableAt ℂ f z\nA : Set ℂ := closedBall c R \\ ball c (Real.exp a)\nhc : ContinuousOn f A\n⊢ (∮ (z : ℂ) in C(c, R), (z - c)⁻¹ • f z) = ∮ (z : ℂ) in C(c, Real.exp a), (z - c)⁻¹ • f z\n[PROOFSTEP]\nexact ⟨Real.log r, Real.exp_log h0⟩\n[GOAL]\ncase intro\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nc : ℂ\nR : ℝ\nf : ℂ → E\ns : Set ℂ\nhs : Set.Countable s\na : ℝ\nh0 : 0 < Real.exp a\nhle : Real.exp a ≤ R\nhd : ∀ (z : ℂ), z ∈ (ball c R \\ closedBall c (Real.exp a)) \\ s → DifferentiableAt ℂ f z\nA : Set ℂ := closedBall c R \\ ball c (Real.exp a)\nhc : ContinuousOn f A\n⊢ (∮ (z : ℂ) in C(c, R), (z - c)⁻¹ • f z) = ∮ (z : ℂ) in C(c, Real.exp a), (z - c)⁻¹ • f z\n[PROOFSTEP]\nobtain ⟨b, rfl⟩ : ∃ b, Real.exp b = R\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nc : ℂ\nR : ℝ\nf : ℂ → E\ns : Set ℂ\nhs : Set.Countable s\na : ℝ\nh0 : 0 < Real.exp a\nhle : Real.exp a ≤ R\nhd : ∀ (z : ℂ), z ∈ (ball c R \\ closedBall c (Real.exp a)) \\ s → DifferentiableAt ℂ f z\nA : Set ℂ := closedBall c R \\ ball c (Real.exp a)\nhc : ContinuousOn f A\n⊢ ∃ b, Real.exp b = R\ncase intro.intro\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nc : ℂ\nf : ℂ → E\ns : Set ℂ\nhs : Set.Countable s\na : ℝ\nh0 : 0 < Real.exp a\nb : ℝ\nhle : Real.exp a ≤ Real.exp b\nhd : ∀ (z : ℂ), z ∈ (ball c (Real.exp b) \\ closedBall c (Real.exp a)) \\ s → DifferentiableAt ℂ f z\nA : Set ℂ := closedBall c (Real.exp b) \\ ball c (Real.exp a)\nhc : ContinuousOn f A\n⊢ (∮ (z : ℂ) in C(c, Real.exp b), (z - c)⁻¹ • f z) = ∮ (z : ℂ) in C(c, Real.exp a), (z - c)⁻¹ • f z\n[PROOFSTEP]\nexact ⟨Real.log R, Real.exp_log (h0.trans_le hle)⟩\n[GOAL]\ncase intro.intro\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nc : ℂ\nf : ℂ → E\ns : Set ℂ\nhs : Set.Countable s\na : ℝ\nh0 : 0 < Real.exp a\nb : ℝ\nhle : Real.exp a ≤ Real.exp b\nhd : ∀ (z : ℂ), z ∈ (ball c (Real.exp b) \\ closedBall c (Real.exp a)) \\ s → DifferentiableAt ℂ f z\nA : Set ℂ := closedBall c (Real.exp b) \\ ball c (Real.exp a)\nhc : ContinuousOn f A\n⊢ (∮ (z : ℂ) in C(c, Real.exp b), (z - c)⁻¹ • f z) = ∮ (z : ℂ) in C(c, Real.exp a), (z - c)⁻¹ • f z\n[PROOFSTEP]\nrw [Real.exp_le_exp] at hle \n[GOAL]\ncase intro.intro\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nc : ℂ\nf : ℂ → E\ns : Set ℂ\nhs : Set.Countable s\na : ℝ\nh0 : 0 < Real.exp a\nb : ℝ\nhle : a ≤ b\nhd : ∀ (z : ℂ), z ∈ (ball c (Real.exp b) \\ closedBall c (Real.exp a)) \\ s → DifferentiableAt ℂ f z\nA : Set ℂ := closedBall c (Real.exp b) \\ ball c (Real.exp a)\nhc : ContinuousOn f A\n⊢ (∮ (z : ℂ) in C(c, Real.exp b), (z - c)⁻¹ • f z) = ∮ (z : ℂ) in C(c, Real.exp a), (z - c)⁻¹ • f z\n[PROOFSTEP]\nsuffices (∫ θ in (0)..2 * π, I • f (circleMap c (Real.exp b) θ)) = ∫ θ in (0)..2 * π, I • f (circleMap c (Real.exp a) θ)\n  by\n  simpa only [circleIntegral, add_sub_cancel', ofReal_exp, ← exp_add, smul_smul, ← div_eq_mul_inv,\n    mul_div_cancel_left _ (circleMap_ne_center (Real.exp_pos _).ne'), circleMap_sub_center, deriv_circleMap]\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nc : ℂ\nf : ℂ → E\ns : Set ℂ\nhs : Set.Countable s\na : ℝ\nh0 : 0 < Real.exp a\nb : ℝ\nhle : a ≤ b\nhd : ∀ (z : ℂ), z ∈ (ball c (Real.exp b) \\ closedBall c (Real.exp a)) \\ s → DifferentiableAt ℂ f z\nA : Set ℂ := closedBall c (Real.exp b) \\ ball c (Real.exp a)\nhc : ContinuousOn f A\nthis :\n  ∫ (θ : ℝ) in 0 ..2 * π, I • f (circleMap c (Real.exp b) θ) =\n    ∫ (θ : ℝ) in 0 ..2 * π, I • f (circleMap c (Real.exp a) θ)\n⊢ (∮ (z : ℂ) in C(c, Real.exp b), (z - c)⁻¹ • f z) = ∮ (z : ℂ) in C(c, Real.exp a), (z - c)⁻¹ • f z\n[PROOFSTEP]\nsimpa only [circleIntegral, add_sub_cancel', ofReal_exp, ← exp_add, smul_smul, ← div_eq_mul_inv,\n  mul_div_cancel_left _ (circleMap_ne_center (Real.exp_pos _).ne'), circleMap_sub_center, deriv_circleMap]\n[GOAL]\ncase intro.intro\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nc : ℂ\nf : ℂ → E\ns : Set ℂ\nhs : Set.Countable s\na : ℝ\nh0 : 0 < Real.exp a\nb : ℝ\nhle : a ≤ b\nhd : ∀ (z : ℂ), z ∈ (ball c (Real.exp b) \\ closedBall c (Real.exp a)) \\ s → DifferentiableAt ℂ f z\nA : Set ℂ := closedBall c (Real.exp b) \\ ball c (Real.exp a)\nhc : ContinuousOn f A\n⊢ ∫ (θ : ℝ) in 0 ..2 * π, I • f (circleMap c (Real.exp b) θ) =\n    ∫ (θ : ℝ) in 0 ..2 * π, I • f (circleMap c (Real.exp a) θ)\n[PROOFSTEP]\nset R := [[a, b]] ×ℂ [[0, 2 * π]]\n[GOAL]\ncase intro.intro\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nc : ℂ\nf : ℂ → E\ns : Set ℂ\nhs : Set.Countable s\na : ℝ\nh0 : 0 < Real.exp a\nb : ℝ\nhle : a ≤ b\nhd : ∀ (z : ℂ), z ∈ (ball c (Real.exp b) \\ closedBall c (Real.exp a)) \\ s → DifferentiableAt ℂ f z\nA : Set ℂ := closedBall c (Real.exp b) \\ ball c (Real.exp a)\nhc : ContinuousOn f A\nR : Set ℂ := [[a, b]] ×ℂ [[0, 2 * π]]\n⊢ ∫ (θ : ℝ) in 0 ..2 * π, I • f (circleMap c (Real.exp b) θ) =\n    ∫ (θ : ℝ) in 0 ..2 * π, I • f (circleMap c (Real.exp a) θ)\n[PROOFSTEP]\nset g : ℂ → ℂ := (· + ·) c ∘ exp\n[GOAL]\ncase intro.intro\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nc : ℂ\nf : ℂ → E\ns : Set ℂ\nhs : Set.Countable s\na : ℝ\nh0 : 0 < Real.exp a\nb : ℝ\nhle : a ≤ b\nhd : ∀ (z : ℂ), z ∈ (ball c (Real.exp b) \\ closedBall c (Real.exp a)) \\ s → DifferentiableAt ℂ f z\nA : Set ℂ := closedBall c (Real.exp b) \\ ball c (Real.exp a)\nhc : ContinuousOn f A\nR : Set ℂ := [[a, b]] ×ℂ [[0, 2 * π]]\ng : ℂ → ℂ := (fun x x_1 => x + x_1) c ∘ exp\n⊢ ∫ (θ : ℝ) in 0 ..2 * π, I • f (circleMap c (Real.exp b) θ) =\n    ∫ (θ : ℝ) in 0 ..2 * π, I • f (circleMap c (Real.exp a) θ)\n[PROOFSTEP]\nhave hdg : Differentiable ℂ g := differentiable_exp.const_add _\n[GOAL]\ncase intro.intro\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nc : ℂ\nf : ℂ → E\ns : Set ℂ\nhs : Set.Countable s\na : ℝ\nh0 : 0 < Real.exp a\nb : ℝ\nhle : a ≤ b\nhd : ∀ (z : ℂ), z ∈ (ball c (Real.exp b) \\ closedBall c (Real.exp a)) \\ s → DifferentiableAt ℂ f z\nA : Set ℂ := closedBall c (Real.exp b) \\ ball c (Real.exp a)\nhc : ContinuousOn f A\nR : Set ℂ := [[a, b]] ×ℂ [[0, 2 * π]]\ng : ℂ → ℂ := (fun x x_1 => x + x_1) c ∘ exp\nhdg : Differentiable ℂ g\n⊢ ∫ (θ : ℝ) in 0 ..2 * π, I • f (circleMap c (Real.exp b) θ) =\n    ∫ (θ : ℝ) in 0 ..2 * π, I • f (circleMap c (Real.exp a) θ)\n[PROOFSTEP]\nreplace hs : (g ⁻¹' s).Countable := (hs.preimage (add_right_injective c)).preimage_cexp\n[GOAL]\ncase intro.intro\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nc : ℂ\nf : ℂ → E\ns : Set ℂ\na : ℝ\nh0 : 0 < Real.exp a\nb : ℝ\nhle : a ≤ b\nhd : ∀ (z : ℂ), z ∈ (ball c (Real.exp b) \\ closedBall c (Real.exp a)) \\ s → DifferentiableAt ℂ f z\nA : Set ℂ := closedBall c (Real.exp b) \\ ball c (Real.exp a)\nhc : ContinuousOn f A\nR : Set ℂ := [[a, b]] ×ℂ [[0, 2 * π]]\ng : ℂ → ℂ := (fun x x_1 => x + x_1) c ∘ exp\nhdg : Differentiable ℂ g\nhs : Set.Countable (g ⁻¹' s)\n⊢ ∫ (θ : ℝ) in 0 ..2 * π, I • f (circleMap c (Real.exp b) θ) =\n    ∫ (θ : ℝ) in 0 ..2 * π, I • f (circleMap c (Real.exp a) θ)\n[PROOFSTEP]\nhave h_maps : MapsTo g R A := by rintro z ⟨h, -⟩; simpa [dist_eq, abs_exp, hle] using h.symm\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nc : ℂ\nf : ℂ → E\ns : Set ℂ\na : ℝ\nh0 : 0 < Real.exp a\nb : ℝ\nhle : a ≤ b\nhd : ∀ (z : ℂ), z ∈ (ball c (Real.exp b) \\ closedBall c (Real.exp a)) \\ s → DifferentiableAt ℂ f z\nA : Set ℂ := closedBall c (Real.exp b) \\ ball c (Real.exp a)\nhc : ContinuousOn f A\nR : Set ℂ := [[a, b]] ×ℂ [[0, 2 * π]]\ng : ℂ → ℂ := (fun x x_1 => x + x_1) c ∘ exp\nhdg : Differentiable ℂ g\nhs : Set.Countable (g ⁻¹' s)\n⊢ MapsTo g R A\n[PROOFSTEP]\nrintro z ⟨h, -⟩\n[GOAL]\ncase intro\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nc : ℂ\nf : ℂ → E\ns : Set ℂ\na : ℝ\nh0 : 0 < Real.exp a\nb : ℝ\nhle : a ≤ b\nhd : ∀ (z : ℂ), z ∈ (ball c (Real.exp b) \\ closedBall c (Real.exp a)) \\ s → DifferentiableAt ℂ f z\nA : Set ℂ := closedBall c (Real.exp b) \\ ball c (Real.exp a)\nhc : ContinuousOn f A\nR : Set ℂ := [[a, b]] ×ℂ [[0, 2 * π]]\ng : ℂ → ℂ := (fun x x_1 => x + x_1) c ∘ exp\nhdg : Differentiable ℂ g\nhs : Set.Countable (g ⁻¹' s)\nz : ℂ\nh : z ∈ re ⁻¹' [[a, b]]\n⊢ g z ∈ A\n[PROOFSTEP]\nsimpa [dist_eq, abs_exp, hle] using h.symm\n[GOAL]\ncase intro.intro\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nc : ℂ\nf : ℂ → E\ns : Set ℂ\na : ℝ\nh0 : 0 < Real.exp a\nb : ℝ\nhle : a ≤ b\nhd : ∀ (z : ℂ), z ∈ (ball c (Real.exp b) \\ closedBall c (Real.exp a)) \\ s → DifferentiableAt ℂ f z\nA : Set ℂ := closedBall c (Real.exp b) \\ ball c (Real.exp a)\nhc : ContinuousOn f A\nR : Set ℂ := [[a, b]] ×ℂ [[0, 2 * π]]\ng : ℂ → ℂ := (fun x x_1 => x + x_1) c ∘ exp\nhdg : Differentiable ℂ g\nhs : Set.Countable (g ⁻¹' s)\nh_maps : MapsTo g R A\n⊢ ∫ (θ : ℝ) in 0 ..2 * π, I • f (circleMap c (Real.exp b) θ) =\n    ∫ (θ : ℝ) in 0 ..2 * π, I • f (circleMap c (Real.exp a) θ)\n[PROOFSTEP]\nreplace hc : ContinuousOn (f ∘ g) R\n[GOAL]\ncase hc\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nc : ℂ\nf : ℂ → E\ns : Set ℂ\na : ℝ\nh0 : 0 < Real.exp a\nb : ℝ\nhle : a ≤ b\nhd : ∀ (z : ℂ), z ∈ (ball c (Real.exp b) \\ closedBall c (Real.exp a)) \\ s → DifferentiableAt ℂ f z\nA : Set ℂ := closedBall c (Real.exp b) \\ ball c (Real.exp a)\nhc : ContinuousOn f A\nR : Set ℂ := [[a, b]] ×ℂ [[0, 2 * π]]\ng : ℂ → ℂ := (fun x x_1 => x + x_1) c ∘ exp\nhdg : Differentiable ℂ g\nhs : Set.Countable (g ⁻¹' s)\nh_maps : MapsTo g R A\n⊢ ContinuousOn (f ∘ g) R\ncase intro.intro\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nc : ℂ\nf : ℂ → E\ns : Set ℂ\na : ℝ\nh0 : 0 < Real.exp a\nb : ℝ\nhle : a ≤ b\nhd : ∀ (z : ℂ), z ∈ (ball c (Real.exp b) \\ closedBall c (Real.exp a)) \\ s → DifferentiableAt ℂ f z\nA : Set ℂ := closedBall c (Real.exp b) \\ ball c (Real.exp a)\nR : Set ℂ := [[a, b]] ×ℂ [[0, 2 * π]]\ng : ℂ → ℂ := (fun x x_1 => x + x_1) c ∘ exp\nhdg : Differentiable ℂ g\nhs : Set.Countable (g ⁻¹' s)\nh_maps : MapsTo g R A\nhc : ContinuousOn (f ∘ g) R\n⊢ ∫ (θ : ℝ) in 0 ..2 * π, I • f (circleMap c (Real.exp b) θ) =\n    ∫ (θ : ℝ) in 0 ..2 * π, I • f (circleMap c (Real.exp a) θ)\n[PROOFSTEP]\nexact hc.comp hdg.continuous.continuousOn h_maps\n[GOAL]\ncase intro.intro\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nc : ℂ\nf : ℂ → E\ns : Set ℂ\na : ℝ\nh0 : 0 < Real.exp a\nb : ℝ\nhle : a ≤ b\nhd : ∀ (z : ℂ), z ∈ (ball c (Real.exp b) \\ closedBall c (Real.exp a)) \\ s → DifferentiableAt ℂ f z\nA : Set ℂ := closedBall c (Real.exp b) \\ ball c (Real.exp a)\nR : Set ℂ := [[a, b]] ×ℂ [[0, 2 * π]]\ng : ℂ → ℂ := (fun x x_1 => x + x_1) c ∘ exp\nhdg : Differentiable ℂ g\nhs : Set.Countable (g ⁻¹' s)\nh_maps : MapsTo g R A\nhc : ContinuousOn (f ∘ g) R\n⊢ ∫ (θ : ℝ) in 0 ..2 * π, I • f (circleMap c (Real.exp b) θ) =\n    ∫ (θ : ℝ) in 0 ..2 * π, I • f (circleMap c (Real.exp a) θ)\n[PROOFSTEP]\nreplace hd :\n  ∀ z ∈ Ioo (min a b) (max a b) ×ℂ Ioo (min 0 (2 * π)) (max 0 (2 * π)) \\ g ⁻¹' s, DifferentiableAt ℂ (f ∘ g) z\n[GOAL]\ncase hd\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nc : ℂ\nf : ℂ → E\ns : Set ℂ\na : ℝ\nh0 : 0 < Real.exp a\nb : ℝ\nhle : a ≤ b\nhd : ∀ (z : ℂ), z ∈ (ball c (Real.exp b) \\ closedBall c (Real.exp a)) \\ s → DifferentiableAt ℂ f z\nA : Set ℂ := closedBall c (Real.exp b) \\ ball c (Real.exp a)\nR : Set ℂ := [[a, b]] ×ℂ [[0, 2 * π]]\ng : ℂ → ℂ := (fun x x_1 => x + x_1) c ∘ exp\nhdg : Differentiable ℂ g\nhs : Set.Countable (g ⁻¹' s)\nh_maps : MapsTo g R A\nhc : ContinuousOn (f ∘ g) R\n⊢ ∀ (z : ℂ), z ∈ Ioo (min a b) (max a b) ×ℂ Ioo (min 0 (2 * π)) (max 0 (2 * π)) \\ g ⁻¹' s → DifferentiableAt ℂ (f ∘ g) z\n[PROOFSTEP]\nrefine' fun z hz => (hd (g z) ⟨_, hz.2⟩).comp z (hdg _)\n[GOAL]\ncase hd\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nc : ℂ\nf : ℂ → E\ns : Set ℂ\na : ℝ\nh0 : 0 < Real.exp a\nb : ℝ\nhle : a ≤ b\nhd : ∀ (z : ℂ), z ∈ (ball c (Real.exp b) \\ closedBall c (Real.exp a)) \\ s → DifferentiableAt ℂ f z\nA : Set ℂ := closedBall c (Real.exp b) \\ ball c (Real.exp a)\nR : Set ℂ := [[a, b]] ×ℂ [[0, 2 * π]]\ng : ℂ → ℂ := (fun x x_1 => x + x_1) c ∘ exp\nhdg : Differentiable ℂ g\nhs : Set.Countable (g ⁻¹' s)\nh_maps : MapsTo g R A\nhc : ContinuousOn (f ∘ g) R\nz : ℂ\nhz : z ∈ Ioo (min a b) (max a b) ×ℂ Ioo (min 0 (2 * π)) (max 0 (2 * π)) \\ g ⁻¹' s\n⊢ g z ∈ ball c (Real.exp b) \\ closedBall c (Real.exp a)\n[PROOFSTEP]\nsimpa [dist_eq, abs_exp, hle, and_comm] using hz.1.1\n[GOAL]\ncase intro.intro\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nc : ℂ\nf : ℂ → E\ns : Set ℂ\na : ℝ\nh0 : 0 < Real.exp a\nb : ℝ\nhle : a ≤ b\nA : Set ℂ := closedBall c (Real.exp b) \\ ball c (Real.exp a)\nR : Set ℂ := [[a, b]] ×ℂ [[0, 2 * π]]\ng : ℂ → ℂ := (fun x x_1 => x + x_1) c ∘ exp\nhdg : Differentiable ℂ g\nhs : Set.Countable (g ⁻¹' s)\nh_maps : MapsTo g R A\nhc : ContinuousOn (f ∘ g) R\nhd :\n  ∀ (z : ℂ), z ∈ Ioo (min a b) (max a b) ×ℂ Ioo (min 0 (2 * π)) (max 0 (2 * π)) \\ g ⁻¹' s → DifferentiableAt ℂ (f ∘ g) z\n⊢ ∫ (θ : ℝ) in 0 ..2 * π, I • f (circleMap c (Real.exp b) θ) =\n    ∫ (θ : ℝ) in 0 ..2 * π, I • f (circleMap c (Real.exp a) θ)\n[PROOFSTEP]\nsimpa [circleMap, exp_periodic _, sub_eq_zero, ← exp_add] using\n  integral_boundary_rect_eq_zero_of_differentiable_on_off_countable _ ⟨a, 0⟩ ⟨b, 2 * π⟩ _ hs hc hd\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nc : ℂ\nR : ℝ\nh0 : 0 < R\nf : ℂ → E\ny : E\ns : Set ℂ\nhs : Set.Countable s\nhc : ContinuousOn f (closedBall c R \\ {c})\nhd : ∀ (z : ℂ), z ∈ (ball c R \\ {c}) \\ s → DifferentiableAt ℂ f z\nhy : Tendsto f (𝓝[{c}ᶜ] c) (𝓝 y)\n⊢ (∮ (z : ℂ) in C(c, R), (z - c)⁻¹ • f z) = (2 * ↑π * I) • y\n[PROOFSTEP]\nrw [← sub_eq_zero, ← norm_le_zero_iff]\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nc : ℂ\nR : ℝ\nh0 : 0 < R\nf : ℂ → E\ny : E\ns : Set ℂ\nhs : Set.Countable s\nhc : ContinuousOn f (closedBall c R \\ {c})\nhd : ∀ (z : ℂ), z ∈ (ball c R \\ {c}) \\ s → DifferentiableAt ℂ f z\nhy : Tendsto f (𝓝[{c}ᶜ] c) (𝓝 y)\n⊢ ‖(∮ (z : ℂ) in C(c, R), (z - c)⁻¹ • f z) - (2 * ↑π * I) • y‖ ≤ 0\n[PROOFSTEP]\nrefine' le_of_forall_le_of_dense fun ε ε0 => _\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nc : ℂ\nR : ℝ\nh0 : 0 < R\nf : ℂ → E\ny : E\ns : Set ℂ\nhs : Set.Countable s\nhc : ContinuousOn f (closedBall c R \\ {c})\nhd : ∀ (z : ℂ), z ∈ (ball c R \\ {c}) \\ s → DifferentiableAt ℂ f z\nhy : Tendsto f (𝓝[{c}ᶜ] c) (𝓝 y)\nε : ℝ\nε0 : 0 < ε\n⊢ ‖(∮ (z : ℂ) in C(c, R), (z - c)⁻¹ • f z) - (2 * ↑π * I) • y‖ ≤ ε\n[PROOFSTEP]\nobtain ⟨δ, δ0, hδ⟩ : ∃ δ > (0 : ℝ), ∀ z ∈ closedBall c δ \\ { c }, dist (f z) y < ε / (2 * π)\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nc : ℂ\nR : ℝ\nh0 : 0 < R\nf : ℂ → E\ny : E\ns : Set ℂ\nhs : Set.Countable s\nhc : ContinuousOn f (closedBall c R \\ {c})\nhd : ∀ (z : ℂ), z ∈ (ball c R \\ {c}) \\ s → DifferentiableAt ℂ f z\nhy : Tendsto f (𝓝[{c}ᶜ] c) (𝓝 y)\nε : ℝ\nε0 : 0 < ε\n⊢ ∃ δ, δ > 0 ∧ ∀ (z : ℂ), z ∈ closedBall c δ \\ {c} → dist (f z) y < ε / (2 * π)\ncase intro.intro\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nc : ℂ\nR : ℝ\nh0 : 0 < R\nf : ℂ → E\ny : E\ns : Set ℂ\nhs : Set.Countable s\nhc : ContinuousOn f (closedBall c R \\ {c})\nhd : ∀ (z : ℂ), z ∈ (ball c R \\ {c}) \\ s → DifferentiableAt ℂ f z\nhy : Tendsto f (𝓝[{c}ᶜ] c) (𝓝 y)\nε : ℝ\nε0 : 0 < ε\nδ : ℝ\nδ0 : δ > 0\nhδ : ∀ (z : ℂ), z ∈ closedBall c δ \\ {c} → dist (f z) y < ε / (2 * π)\n⊢ ‖(∮ (z : ℂ) in C(c, R), (z - c)⁻¹ • f z) - (2 * ↑π * I) • y‖ ≤ ε\n[PROOFSTEP]\nexact ((nhdsWithin_hasBasis nhds_basis_closedBall _).tendsto_iff nhds_basis_ball).1 hy _ (div_pos ε0 Real.two_pi_pos)\n[GOAL]\ncase intro.intro\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nc : ℂ\nR : ℝ\nh0 : 0 < R\nf : ℂ → E\ny : E\ns : Set ℂ\nhs : Set.Countable s\nhc : ContinuousOn f (closedBall c R \\ {c})\nhd : ∀ (z : ℂ), z ∈ (ball c R \\ {c}) \\ s → DifferentiableAt ℂ f z\nhy : Tendsto f (𝓝[{c}ᶜ] c) (𝓝 y)\nε : ℝ\nε0 : 0 < ε\nδ : ℝ\nδ0 : δ > 0\nhδ : ∀ (z : ℂ), z ∈ closedBall c δ \\ {c} → dist (f z) y < ε / (2 * π)\n⊢ ‖(∮ (z : ℂ) in C(c, R), (z - c)⁻¹ • f z) - (2 * ↑π * I) • y‖ ≤ ε\n[PROOFSTEP]\nobtain ⟨r, hr0, hrδ, hrR⟩ : ∃ r, 0 < r ∧ r ≤ δ ∧ r ≤ R := ⟨min δ R, lt_min δ0 h0, min_le_left _ _, min_le_right _ _⟩\n[GOAL]\ncase intro.intro.intro.intro.intro\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nc : ℂ\nR : ℝ\nh0 : 0 < R\nf : ℂ → E\ny : E\ns : Set ℂ\nhs : Set.Countable s\nhc : ContinuousOn f (closedBall c R \\ {c})\nhd : ∀ (z : ℂ), z ∈ (ball c R \\ {c}) \\ s → DifferentiableAt ℂ f z\nhy : Tendsto f (𝓝[{c}ᶜ] c) (𝓝 y)\nε : ℝ\nε0 : 0 < ε\nδ : ℝ\nδ0 : δ > 0\nhδ : ∀ (z : ℂ), z ∈ closedBall c δ \\ {c} → dist (f z) y < ε / (2 * π)\nr : ℝ\nhr0 : 0 < r\nhrδ : r ≤ δ\nhrR : r ≤ R\n⊢ ‖(∮ (z : ℂ) in C(c, R), (z - c)⁻¹ • f z) - (2 * ↑π * I) • y‖ ≤ ε\n[PROOFSTEP]\nhave hsub : closedBall c R \\ ball c r ⊆ closedBall c R \\ { c } :=\n  diff_subset_diff_right (singleton_subset_iff.2 <| mem_ball_self hr0)\n[GOAL]\ncase intro.intro.intro.intro.intro\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nc : ℂ\nR : ℝ\nh0 : 0 < R\nf : ℂ → E\ny : E\ns : Set ℂ\nhs : Set.Countable s\nhc : ContinuousOn f (closedBall c R \\ {c})\nhd : ∀ (z : ℂ), z ∈ (ball c R \\ {c}) \\ s → DifferentiableAt ℂ f z\nhy : Tendsto f (𝓝[{c}ᶜ] c) (𝓝 y)\nε : ℝ\nε0 : 0 < ε\nδ : ℝ\nδ0 : δ > 0\nhδ : ∀ (z : ℂ), z ∈ closedBall c δ \\ {c} → dist (f z) y < ε / (2 * π)\nr : ℝ\nhr0 : 0 < r\nhrδ : r ≤ δ\nhrR : r ≤ R\nhsub : closedBall c R \\ ball c r ⊆ closedBall c R \\ {c}\n⊢ ‖(∮ (z : ℂ) in C(c, R), (z - c)⁻¹ • f z) - (2 * ↑π * I) • y‖ ≤ ε\n[PROOFSTEP]\nhave hsub' : ball c R \\ closedBall c r ⊆ ball c R \\ { c } :=\n  diff_subset_diff_right (singleton_subset_iff.2 <| mem_closedBall_self hr0.le)\n[GOAL]\ncase intro.intro.intro.intro.intro\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nc : ℂ\nR : ℝ\nh0 : 0 < R\nf : ℂ → E\ny : E\ns : Set ℂ\nhs : Set.Countable s\nhc : ContinuousOn f (closedBall c R \\ {c})\nhd : ∀ (z : ℂ), z ∈ (ball c R \\ {c}) \\ s → DifferentiableAt ℂ f z\nhy : Tendsto f (𝓝[{c}ᶜ] c) (𝓝 y)\nε : ℝ\nε0 : 0 < ε\nδ : ℝ\nδ0 : δ > 0\nhδ : ∀ (z : ℂ), z ∈ closedBall c δ \\ {c} → dist (f z) y < ε / (2 * π)\nr : ℝ\nhr0 : 0 < r\nhrδ : r ≤ δ\nhrR : r ≤ R\nhsub : closedBall c R \\ ball c r ⊆ closedBall c R \\ {c}\nhsub' : ball c R \\ closedBall c r ⊆ ball c R \\ {c}\n⊢ ‖(∮ (z : ℂ) in C(c, R), (z - c)⁻¹ • f z) - (2 * ↑π * I) • y‖ ≤ ε\n[PROOFSTEP]\nhave hzne : ∀ z ∈ sphere c r, z ≠ c := fun z hz => ne_of_mem_of_not_mem hz fun h => hr0.ne' <| dist_self c ▸ Eq.symm h\n[GOAL]\ncase intro.intro.intro.intro.intro\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nc : ℂ\nR : ℝ\nh0 : 0 < R\nf : ℂ → E\ny : E\ns : Set ℂ\nhs : Set.Countable s\nhc : ContinuousOn f (closedBall c R \\ {c})\nhd : ∀ (z : ℂ), z ∈ (ball c R \\ {c}) \\ s → DifferentiableAt ℂ f z\nhy : Tendsto f (𝓝[{c}ᶜ] c) (𝓝 y)\nε : ℝ\nε0 : 0 < ε\nδ : ℝ\nδ0 : δ > 0\nhδ : ∀ (z : ℂ), z ∈ closedBall c δ \\ {c} → dist (f z) y < ε / (2 * π)\nr : ℝ\nhr0 : 0 < r\nhrδ : r ≤ δ\nhrR : r ≤ R\nhsub : closedBall c R \\ ball c r ⊆ closedBall c R \\ {c}\nhsub' : ball c R \\ closedBall c r ⊆ ball c R \\ {c}\nhzne : ∀ (z : ℂ), z ∈ sphere c r → z ≠ c\n⊢ ‖(∮ (z : ℂ) in C(c, R), (z - c)⁻¹ • f z) - (2 * ↑π * I) • y‖ ≤ ε\n[PROOFSTEP]\ncalc\n  ‖(∮ z in C(c, R), (z - c)⁻¹ • f z) - (2 * ↑π * I) • y‖ =\n      ‖(∮ z in C(c, r), (z - c)⁻¹ • f z) - ∮ z in C(c, r), (z - c)⁻¹ • y‖ :=\n    by\n    congr 2\n    ·\n      exact\n        circleIntegral_sub_center_inv_smul_eq_of_differentiable_on_annulus_off_countable hr0 hrR hs (hc.mono hsub)\n          fun z hz => hd z ⟨hsub' hz.1, hz.2⟩\n    · simp [hr0.ne']\n  _ = ‖∮ z in C(c, r), (z - c)⁻¹ • (f z - y)‖ := by\n    simp only [smul_sub]\n    have hc' : ContinuousOn (fun z => (z - c)⁻¹) (sphere c r) :=\n      (continuousOn_id.sub continuousOn_const).inv₀ fun z hz => sub_ne_zero.2 <| hzne _ hz\n    rw [circleIntegral.integral_sub] <;> refine' (hc'.smul _).circleIntegrable hr0.le\n    · exact hc.mono <| subset_inter (sphere_subset_closedBall.trans <| closedBall_subset_closedBall hrR) hzne\n    · exact continuousOn_const\n  _ ≤ 2 * π * r * (r⁻¹ * (ε / (2 * π))) :=\n    by\n    refine' circleIntegral.norm_integral_le_of_norm_le_const hr0.le fun z hz => _\n    specialize hzne z hz\n    rw [mem_sphere, dist_eq_norm] at hz \n    rw [norm_smul, norm_inv, hz, ← dist_eq_norm]\n    refine' mul_le_mul_of_nonneg_left (hδ _ ⟨_, hzne⟩).le (inv_nonneg.2 hr0.le)\n    rwa [mem_closedBall_iff_norm, hz]\n  _ = ε := by field_simp [hr0.ne', Real.two_pi_pos.ne']; ac_rfl\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nc : ℂ\nR : ℝ\nh0 : 0 < R\nf : ℂ → E\ny : E\ns : Set ℂ\nhs : Set.Countable s\nhc : ContinuousOn f (closedBall c R \\ {c})\nhd : ∀ (z : ℂ), z ∈ (ball c R \\ {c}) \\ s → DifferentiableAt ℂ f z\nhy : Tendsto f (𝓝[{c}ᶜ] c) (𝓝 y)\nε : ℝ\nε0 : 0 < ε\nδ : ℝ\nδ0 : δ > 0\nhδ : ∀ (z : ℂ), z ∈ closedBall c δ \\ {c} → dist (f z) y < ε / (2 * π)\nr : ℝ\nhr0 : 0 < r\nhrδ : r ≤ δ\nhrR : r ≤ R\nhsub : closedBall c R \\ ball c r ⊆ closedBall c R \\ {c}\nhsub' : ball c R \\ closedBall c r ⊆ ball c R \\ {c}\nhzne : ∀ (z : ℂ), z ∈ sphere c r → z ≠ c\n⊢ ‖(∮ (z : ℂ) in C(c, R), (z - c)⁻¹ • f z) - (2 * ↑π * I) • y‖ =\n    ‖(∮ (z : ℂ) in C(c, r), (z - c)⁻¹ • f z) - ∮ (z : ℂ) in C(c, r), (z - c)⁻¹ • y‖\n[PROOFSTEP]\ncongr 2\n[GOAL]\ncase e_a.e_a\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nc : ℂ\nR : ℝ\nh0 : 0 < R\nf : ℂ → E\ny : E\ns : Set ℂ\nhs : Set.Countable s\nhc : ContinuousOn f (closedBall c R \\ {c})\nhd : ∀ (z : ℂ), z ∈ (ball c R \\ {c}) \\ s → DifferentiableAt ℂ f z\nhy : Tendsto f (𝓝[{c}ᶜ] c) (𝓝 y)\nε : ℝ\nε0 : 0 < ε\nδ : ℝ\nδ0 : δ > 0\nhδ : ∀ (z : ℂ), z ∈ closedBall c δ \\ {c} → dist (f z) y < ε / (2 * π)\nr : ℝ\nhr0 : 0 < r\nhrδ : r ≤ δ\nhrR : r ≤ R\nhsub : closedBall c R \\ ball c r ⊆ closedBall c R \\ {c}\nhsub' : ball c R \\ closedBall c r ⊆ ball c R \\ {c}\nhzne : ∀ (z : ℂ), z ∈ sphere c r → z ≠ c\n⊢ (∮ (z : ℂ) in C(c, R), (z - c)⁻¹ • f z) = ∮ (z : ℂ) in C(c, r), (z - c)⁻¹ • f z\n[PROOFSTEP]\nexact\n  circleIntegral_sub_center_inv_smul_eq_of_differentiable_on_annulus_off_countable hr0 hrR hs (hc.mono hsub) fun z hz =>\n    hd z ⟨hsub' hz.1, hz.2⟩\n[GOAL]\ncase e_a.e_a\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nc : ℂ\nR : ℝ\nh0 : 0 < R\nf : ℂ → E\ny : E\ns : Set ℂ\nhs : Set.Countable s\nhc : ContinuousOn f (closedBall c R \\ {c})\nhd : ∀ (z : ℂ), z ∈ (ball c R \\ {c}) \\ s → DifferentiableAt ℂ f z\nhy : Tendsto f (𝓝[{c}ᶜ] c) (𝓝 y)\nε : ℝ\nε0 : 0 < ε\nδ : ℝ\nδ0 : δ > 0\nhδ : ∀ (z : ℂ), z ∈ closedBall c δ \\ {c} → dist (f z) y < ε / (2 * π)\nr : ℝ\nhr0 : 0 < r\nhrδ : r ≤ δ\nhrR : r ≤ R\nhsub : closedBall c R \\ ball c r ⊆ closedBall c R \\ {c}\nhsub' : ball c R \\ closedBall c r ⊆ ball c R \\ {c}\nhzne : ∀ (z : ℂ), z ∈ sphere c r → z ≠ c\n⊢ (2 * ↑π * I) • y = ∮ (z : ℂ) in C(c, r), (z - c)⁻¹ • y\n[PROOFSTEP]\nsimp [hr0.ne']\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nc : ℂ\nR : ℝ\nh0 : 0 < R\nf : ℂ → E\ny : E\ns : Set ℂ\nhs : Set.Countable s\nhc : ContinuousOn f (closedBall c R \\ {c})\nhd : ∀ (z : ℂ), z ∈ (ball c R \\ {c}) \\ s → DifferentiableAt ℂ f z\nhy : Tendsto f (𝓝[{c}ᶜ] c) (𝓝 y)\nε : ℝ\nε0 : 0 < ε\nδ : ℝ\nδ0 : δ > 0\nhδ : ∀ (z : ℂ), z ∈ closedBall c δ \\ {c} → dist (f z) y < ε / (2 * π)\nr : ℝ\nhr0 : 0 < r\nhrδ : r ≤ δ\nhrR : r ≤ R\nhsub : closedBall c R \\ ball c r ⊆ closedBall c R \\ {c}\nhsub' : ball c R \\ closedBall c r ⊆ ball c R \\ {c}\nhzne : ∀ (z : ℂ), z ∈ sphere c r → z ≠ c\n⊢ ‖(∮ (z : ℂ) in C(c, r), (z - c)⁻¹ • f z) - ∮ (z : ℂ) in C(c, r), (z - c)⁻¹ • y‖ =\n    ‖∮ (z : ℂ) in C(c, r), (z - c)⁻¹ • (f z - y)‖\n[PROOFSTEP]\nsimp only [smul_sub]\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nc : ℂ\nR : ℝ\nh0 : 0 < R\nf : ℂ → E\ny : E\ns : Set ℂ\nhs : Set.Countable s\nhc : ContinuousOn f (closedBall c R \\ {c})\nhd : ∀ (z : ℂ), z ∈ (ball c R \\ {c}) \\ s → DifferentiableAt ℂ f z\nhy : Tendsto f (𝓝[{c}ᶜ] c) (𝓝 y)\nε : ℝ\nε0 : 0 < ε\nδ : ℝ\nδ0 : δ > 0\nhδ : ∀ (z : ℂ), z ∈ closedBall c δ \\ {c} → dist (f z) y < ε / (2 * π)\nr : ℝ\nhr0 : 0 < r\nhrδ : r ≤ δ\nhrR : r ≤ R\nhsub : closedBall c R \\ ball c r ⊆ closedBall c R \\ {c}\nhsub' : ball c R \\ closedBall c r ⊆ ball c R \\ {c}\nhzne : ∀ (z : ℂ), z ∈ sphere c r → z ≠ c\n⊢ ‖(∮ (z : ℂ) in C(c, r), (z - c)⁻¹ • f z) - ∮ (z : ℂ) in C(c, r), (z - c)⁻¹ • y‖ =\n    ‖∮ (z : ℂ) in C(c, r), (z - c)⁻¹ • f z - (z - c)⁻¹ • y‖\n[PROOFSTEP]\nhave hc' : ContinuousOn (fun z => (z - c)⁻¹) (sphere c r) :=\n  (continuousOn_id.sub continuousOn_const).inv₀ fun z hz => sub_ne_zero.2 <| hzne _ hz\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nc : ℂ\nR : ℝ\nh0 : 0 < R\nf : ℂ → E\ny : E\ns : Set ℂ\nhs : Set.Countable s\nhc : ContinuousOn f (closedBall c R \\ {c})\nhd : ∀ (z : ℂ), z ∈ (ball c R \\ {c}) \\ s → DifferentiableAt ℂ f z\nhy : Tendsto f (𝓝[{c}ᶜ] c) (𝓝 y)\nε : ℝ\nε0 : 0 < ε\nδ : ℝ\nδ0 : δ > 0\nhδ : ∀ (z : ℂ), z ∈ closedBall c δ \\ {c} → dist (f z) y < ε / (2 * π)\nr : ℝ\nhr0 : 0 < r\nhrδ : r ≤ δ\nhrR : r ≤ R\nhsub : closedBall c R \\ ball c r ⊆ closedBall c R \\ {c}\nhsub' : ball c R \\ closedBall c r ⊆ ball c R \\ {c}\nhzne : ∀ (z : ℂ), z ∈ sphere c r → z ≠ c\nhc' : ContinuousOn (fun z => (z - c)⁻¹) (sphere c r)\n⊢ ‖(∮ (z : ℂ) in C(c, r), (z - c)⁻¹ • f z) - ∮ (z : ℂ) in C(c, r), (z - c)⁻¹ • y‖ =\n    ‖∮ (z : ℂ) in C(c, r), (z - c)⁻¹ • f z - (z - c)⁻¹ • y‖\n[PROOFSTEP]\nrw [circleIntegral.integral_sub]\n[GOAL]\ncase hf\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nc : ℂ\nR : ℝ\nh0 : 0 < R\nf : ℂ → E\ny : E\ns : Set ℂ\nhs : Set.Countable s\nhc : ContinuousOn f (closedBall c R \\ {c})\nhd : ∀ (z : ℂ), z ∈ (ball c R \\ {c}) \\ s → DifferentiableAt ℂ f z\nhy : Tendsto f (𝓝[{c}ᶜ] c) (𝓝 y)\nε : ℝ\nε0 : 0 < ε\nδ : ℝ\nδ0 : δ > 0\nhδ : ∀ (z : ℂ), z ∈ closedBall c δ \\ {c} → dist (f z) y < ε / (2 * π)\nr : ℝ\nhr0 : 0 < r\nhrδ : r ≤ δ\nhrR : r ≤ R\nhsub : closedBall c R \\ ball c r ⊆ closedBall c R \\ {c}\nhsub' : ball c R \\ closedBall c r ⊆ ball c R \\ {c}\nhzne : ∀ (z : ℂ), z ∈ sphere c r → z ≠ c\nhc' : ContinuousOn (fun z => (z - c)⁻¹) (sphere c r)\n⊢ CircleIntegrable (fun z => (z - c)⁻¹ • f z) c r\n[PROOFSTEP]\nrefine' (hc'.smul _).circleIntegrable hr0.le\n[GOAL]\ncase hg\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nc : ℂ\nR : ℝ\nh0 : 0 < R\nf : ℂ → E\ny : E\ns : Set ℂ\nhs : Set.Countable s\nhc : ContinuousOn f (closedBall c R \\ {c})\nhd : ∀ (z : ℂ), z ∈ (ball c R \\ {c}) \\ s → DifferentiableAt ℂ f z\nhy : Tendsto f (𝓝[{c}ᶜ] c) (𝓝 y)\nε : ℝ\nε0 : 0 < ε\nδ : ℝ\nδ0 : δ > 0\nhδ : ∀ (z : ℂ), z ∈ closedBall c δ \\ {c} → dist (f z) y < ε / (2 * π)\nr : ℝ\nhr0 : 0 < r\nhrδ : r ≤ δ\nhrR : r ≤ R\nhsub : closedBall c R \\ ball c r ⊆ closedBall c R \\ {c}\nhsub' : ball c R \\ closedBall c r ⊆ ball c R \\ {c}\nhzne : ∀ (z : ℂ), z ∈ sphere c r → z ≠ c\nhc' : ContinuousOn (fun z => (z - c)⁻¹) (sphere c r)\n⊢ CircleIntegrable (fun z => (z - c)⁻¹ • y) c r\n[PROOFSTEP]\nrefine' (hc'.smul _).circleIntegrable hr0.le\n[GOAL]\ncase hf\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nc : ℂ\nR : ℝ\nh0 : 0 < R\nf : ℂ → E\ny : E\ns : Set ℂ\nhs : Set.Countable s\nhc : ContinuousOn f (closedBall c R \\ {c})\nhd : ∀ (z : ℂ), z ∈ (ball c R \\ {c}) \\ s → DifferentiableAt ℂ f z\nhy : Tendsto f (𝓝[{c}ᶜ] c) (𝓝 y)\nε : ℝ\nε0 : 0 < ε\nδ : ℝ\nδ0 : δ > 0\nhδ : ∀ (z : ℂ), z ∈ closedBall c δ \\ {c} → dist (f z) y < ε / (2 * π)\nr : ℝ\nhr0 : 0 < r\nhrδ : r ≤ δ\nhrR : r ≤ R\nhsub : closedBall c R \\ ball c r ⊆ closedBall c R \\ {c}\nhsub' : ball c R \\ closedBall c r ⊆ ball c R \\ {c}\nhzne : ∀ (z : ℂ), z ∈ sphere c r → z ≠ c\nhc' : ContinuousOn (fun z => (z - c)⁻¹) (sphere c r)\n⊢ ContinuousOn (fun x => f x) (sphere c r)\n[PROOFSTEP]\nexact hc.mono <| subset_inter (sphere_subset_closedBall.trans <| closedBall_subset_closedBall hrR) hzne\n[GOAL]\ncase hg\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nc : ℂ\nR : ℝ\nh0 : 0 < R\nf : ℂ → E\ny : E\ns : Set ℂ\nhs : Set.Countable s\nhc : ContinuousOn f (closedBall c R \\ {c})\nhd : ∀ (z : ℂ), z ∈ (ball c R \\ {c}) \\ s → DifferentiableAt ℂ f z\nhy : Tendsto f (𝓝[{c}ᶜ] c) (𝓝 y)\nε : ℝ\nε0 : 0 < ε\nδ : ℝ\nδ0 : δ > 0\nhδ : ∀ (z : ℂ), z ∈ closedBall c δ \\ {c} → dist (f z) y < ε / (2 * π)\nr : ℝ\nhr0 : 0 < r\nhrδ : r ≤ δ\nhrR : r ≤ R\nhsub : closedBall c R \\ ball c r ⊆ closedBall c R \\ {c}\nhsub' : ball c R \\ closedBall c r ⊆ ball c R \\ {c}\nhzne : ∀ (z : ℂ), z ∈ sphere c r → z ≠ c\nhc' : ContinuousOn (fun z => (z - c)⁻¹) (sphere c r)\n⊢ ContinuousOn (fun x => y) (sphere c r)\n[PROOFSTEP]\nexact continuousOn_const\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nc : ℂ\nR : ℝ\nh0 : 0 < R\nf : ℂ → E\ny : E\ns : Set ℂ\nhs : Set.Countable s\nhc : ContinuousOn f (closedBall c R \\ {c})\nhd : ∀ (z : ℂ), z ∈ (ball c R \\ {c}) \\ s → DifferentiableAt ℂ f z\nhy : Tendsto f (𝓝[{c}ᶜ] c) (𝓝 y)\nε : ℝ\nε0 : 0 < ε\nδ : ℝ\nδ0 : δ > 0\nhδ : ∀ (z : ℂ), z ∈ closedBall c δ \\ {c} → dist (f z) y < ε / (2 * π)\nr : ℝ\nhr0 : 0 < r\nhrδ : r ≤ δ\nhrR : r ≤ R\nhsub : closedBall c R \\ ball c r ⊆ closedBall c R \\ {c}\nhsub' : ball c R \\ closedBall c r ⊆ ball c R \\ {c}\nhzne : ∀ (z : ℂ), z ∈ sphere c r → z ≠ c\n⊢ ‖∮ (z : ℂ) in C(c, r), (z - c)⁻¹ • (f z - y)‖ ≤ 2 * π * r * (r⁻¹ * (ε / (2 * π)))\n[PROOFSTEP]\nrefine' circleIntegral.norm_integral_le_of_norm_le_const hr0.le fun z hz => _\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nc : ℂ\nR : ℝ\nh0 : 0 < R\nf : ℂ → E\ny : E\ns : Set ℂ\nhs : Set.Countable s\nhc : ContinuousOn f (closedBall c R \\ {c})\nhd : ∀ (z : ℂ), z ∈ (ball c R \\ {c}) \\ s → DifferentiableAt ℂ f z\nhy : Tendsto f (𝓝[{c}ᶜ] c) (𝓝 y)\nε : ℝ\nε0 : 0 < ε\nδ : ℝ\nδ0 : δ > 0\nhδ : ∀ (z : ℂ), z ∈ closedBall c δ \\ {c} → dist (f z) y < ε / (2 * π)\nr : ℝ\nhr0 : 0 < r\nhrδ : r ≤ δ\nhrR : r ≤ R\nhsub : closedBall c R \\ ball c r ⊆ closedBall c R \\ {c}\nhsub' : ball c R \\ closedBall c r ⊆ ball c R \\ {c}\nhzne : ∀ (z : ℂ), z ∈ sphere c r → z ≠ c\nz : ℂ\nhz : z ∈ sphere c r\n⊢ ‖(z - c)⁻¹ • (f z - y)‖ ≤ r⁻¹ * (ε / (2 * π))\n[PROOFSTEP]\nspecialize hzne z hz\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nc : ℂ\nR : ℝ\nh0 : 0 < R\nf : ℂ → E\ny : E\ns : Set ℂ\nhs : Set.Countable s\nhc : ContinuousOn f (closedBall c R \\ {c})\nhd : ∀ (z : ℂ), z ∈ (ball c R \\ {c}) \\ s → DifferentiableAt ℂ f z\nhy : Tendsto f (𝓝[{c}ᶜ] c) (𝓝 y)\nε : ℝ\nε0 : 0 < ε\nδ : ℝ\nδ0 : δ > 0\nhδ : ∀ (z : ℂ), z ∈ closedBall c δ \\ {c} → dist (f z) y < ε / (2 * π)\nr : ℝ\nhr0 : 0 < r\nhrδ : r ≤ δ\nhrR : r ≤ R\nhsub : closedBall c R \\ ball c r ⊆ closedBall c R \\ {c}\nhsub' : ball c R \\ closedBall c r ⊆ ball c R \\ {c}\nz : ℂ\nhz : z ∈ sphere c r\nhzne : z ≠ c\n⊢ ‖(z - c)⁻¹ • (f z - y)‖ ≤ r⁻¹ * (ε / (2 * π))\n[PROOFSTEP]\nrw [mem_sphere, dist_eq_norm] at hz \n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nc : ℂ\nR : ℝ\nh0 : 0 < R\nf : ℂ → E\ny : E\ns : Set ℂ\nhs : Set.Countable s\nhc : ContinuousOn f (closedBall c R \\ {c})\nhd : ∀ (z : ℂ), z ∈ (ball c R \\ {c}) \\ s → DifferentiableAt ℂ f z\nhy : Tendsto f (𝓝[{c}ᶜ] c) (𝓝 y)\nε : ℝ\nε0 : 0 < ε\nδ : ℝ\nδ0 : δ > 0\nhδ : ∀ (z : ℂ), z ∈ closedBall c δ \\ {c} → dist (f z) y < ε / (2 * π)\nr : ℝ\nhr0 : 0 < r\nhrδ : r ≤ δ\nhrR : r ≤ R\nhsub : closedBall c R \\ ball c r ⊆ closedBall c R \\ {c}\nhsub' : ball c R \\ closedBall c r ⊆ ball c R \\ {c}\nz : ℂ\nhz : ‖z - c‖ = r\nhzne : z ≠ c\n⊢ ‖(z - c)⁻¹ • (f z - y)‖ ≤ r⁻¹ * (ε / (2 * π))\n[PROOFSTEP]\nrw [norm_smul, norm_inv, hz, ← dist_eq_norm]\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nc : ℂ\nR : ℝ\nh0 : 0 < R\nf : ℂ → E\ny : E\ns : Set ℂ\nhs : Set.Countable s\nhc : ContinuousOn f (closedBall c R \\ {c})\nhd : ∀ (z : ℂ), z ∈ (ball c R \\ {c}) \\ s → DifferentiableAt ℂ f z\nhy : Tendsto f (𝓝[{c}ᶜ] c) (𝓝 y)\nε : ℝ\nε0 : 0 < ε\nδ : ℝ\nδ0 : δ > 0\nhδ : ∀ (z : ℂ), z ∈ closedBall c δ \\ {c} → dist (f z) y < ε / (2 * π)\nr : ℝ\nhr0 : 0 < r\nhrδ : r ≤ δ\nhrR : r ≤ R\nhsub : closedBall c R \\ ball c r ⊆ closedBall c R \\ {c}\nhsub' : ball c R \\ closedBall c r ⊆ ball c R \\ {c}\nz : ℂ\nhz : ‖z - c‖ = r\nhzne : z ≠ c\n⊢ r⁻¹ * dist (f z) y ≤ r⁻¹ * (ε / (2 * π))\n[PROOFSTEP]\nrefine' mul_le_mul_of_nonneg_left (hδ _ ⟨_, hzne⟩).le (inv_nonneg.2 hr0.le)\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nc : ℂ\nR : ℝ\nh0 : 0 < R\nf : ℂ → E\ny : E\ns : Set ℂ\nhs : Set.Countable s\nhc : ContinuousOn f (closedBall c R \\ {c})\nhd : ∀ (z : ℂ), z ∈ (ball c R \\ {c}) \\ s → DifferentiableAt ℂ f z\nhy : Tendsto f (𝓝[{c}ᶜ] c) (𝓝 y)\nε : ℝ\nε0 : 0 < ε\nδ : ℝ\nδ0 : δ > 0\nhδ : ∀ (z : ℂ), z ∈ closedBall c δ \\ {c} → dist (f z) y < ε / (2 * π)\nr : ℝ\nhr0 : 0 < r\nhrδ : r ≤ δ\nhrR : r ≤ R\nhsub : closedBall c R \\ ball c r ⊆ closedBall c R \\ {c}\nhsub' : ball c R \\ closedBall c r ⊆ ball c R \\ {c}\nz : ℂ\nhz : ‖z - c‖ = r\nhzne : z ≠ c\n⊢ z ∈ closedBall c δ\n[PROOFSTEP]\nrwa [mem_closedBall_iff_norm, hz]\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nc : ℂ\nR : ℝ\nh0 : 0 < R\nf : ℂ → E\ny : E\ns : Set ℂ\nhs : Set.Countable s\nhc : ContinuousOn f (closedBall c R \\ {c})\nhd : ∀ (z : ℂ), z ∈ (ball c R \\ {c}) \\ s → DifferentiableAt ℂ f z\nhy : Tendsto f (𝓝[{c}ᶜ] c) (𝓝 y)\nε : ℝ\nε0 : 0 < ε\nδ : ℝ\nδ0 : δ > 0\nhδ : ∀ (z : ℂ), z ∈ closedBall c δ \\ {c} → dist (f z) y < ε / (2 * π)\nr : ℝ\nhr0 : 0 < r\nhrδ : r ≤ δ\nhrR : r ≤ R\nhsub : closedBall c R \\ ball c r ⊆ closedBall c R \\ {c}\nhsub' : ball c R \\ closedBall c r ⊆ ball c R \\ {c}\nhzne : ∀ (z : ℂ), z ∈ sphere c r → z ≠ c\n⊢ 2 * π * r * (r⁻¹ * (ε / (2 * π))) = ε\n[PROOFSTEP]\nfield_simp [hr0.ne', Real.two_pi_pos.ne']\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nc : ℂ\nR : ℝ\nh0 : 0 < R\nf : ℂ → E\ny : E\ns : Set ℂ\nhs : Set.Countable s\nhc : ContinuousOn f (closedBall c R \\ {c})\nhd : ∀ (z : ℂ), z ∈ (ball c R \\ {c}) \\ s → DifferentiableAt ℂ f z\nhy : Tendsto f (𝓝[{c}ᶜ] c) (𝓝 y)\nε : ℝ\nε0 : 0 < ε\nδ : ℝ\nδ0 : δ > 0\nhδ : ∀ (z : ℂ), z ∈ closedBall c δ \\ {c} → dist (f z) y < ε / (2 * π)\nr : ℝ\nhr0 : 0 < r\nhrδ : r ≤ δ\nhrR : r ≤ R\nhsub : closedBall c R \\ ball c r ⊆ closedBall c R \\ {c}\nhsub' : ball c R \\ closedBall c r ⊆ ball c R \\ {c}\nhzne : ∀ (z : ℂ), z ∈ sphere c r → z ≠ c\n⊢ 2 * π * r * ε = ε * (r * (2 * π))\n[PROOFSTEP]\nac_rfl\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nR : ℝ\nh0 : 0 ≤ R\nf : ℂ → E\nc : ℂ\ns : Set ℂ\nhs : Set.Countable s\nhc : ContinuousOn f (closedBall c R)\nhd : ∀ (z : ℂ), z ∈ ball c R \\ s → DifferentiableAt ℂ f z\n⊢ (∮ (z : ℂ) in C(c, R), f z) = 0\n[PROOFSTEP]\nrcases h0.eq_or_lt with (rfl | h0)\n[GOAL]\ncase inl\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf : ℂ → E\nc : ℂ\ns : Set ℂ\nhs : Set.Countable s\nh0 : 0 ≤ 0\nhc : ContinuousOn f (closedBall c 0)\nhd : ∀ (z : ℂ), z ∈ ball c 0 \\ s → DifferentiableAt ℂ f z\n⊢ (∮ (z : ℂ) in C(c, 0), f z) = 0\n[PROOFSTEP]\napply circleIntegral.integral_radius_zero\n[GOAL]\ncase inr\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nR : ℝ\nh0✝ : 0 ≤ R\nf : ℂ → E\nc : ℂ\ns : Set ℂ\nhs : Set.Countable s\nhc : ContinuousOn f (closedBall c R)\nhd : ∀ (z : ℂ), z ∈ ball c R \\ s → DifferentiableAt ℂ f z\nh0 : 0 < R\n⊢ (∮ (z : ℂ) in C(c, R), f z) = 0\n[PROOFSTEP]\ncalc\n  (∮ z in C(c, R), f z) = ∮ z in C(c, R), (z - c)⁻¹ • (z - c) • f z :=\n    (circleIntegral.integral_sub_inv_smul_sub_smul _ _ _ _).symm\n  _ = (2 * ↑π * I : ℂ) • (c - c) • f c :=\n    (circleIntegral_sub_center_inv_smul_of_differentiable_on_off_countable h0 hs\n      ((continuousOn_id.sub continuousOn_const).smul hc) fun z hz => (differentiableAt_id.sub_const _).smul (hd z hz))\n  _ = 0 := by rw [sub_self, zero_smul, smul_zero]\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nR : ℝ\nh0✝ : 0 ≤ R\nf : ℂ → E\nc : ℂ\ns : Set ℂ\nhs : Set.Countable s\nhc : ContinuousOn f (closedBall c R)\nhd : ∀ (z : ℂ), z ∈ ball c R \\ s → DifferentiableAt ℂ f z\nh0 : 0 < R\n⊢ (2 * ↑π * I) • (c - c) • f c = 0\n[PROOFSTEP]\nrw [sub_self, zero_smul, smul_zero]\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nR : ℝ\nc w : ℂ\nf : ℂ → E\ns : Set ℂ\nhs : Set.Countable s\nhw : w ∈ ball c R \\ s\nhc : ContinuousOn f (closedBall c R)\nhd : ∀ (x : ℂ), x ∈ ball c R \\ s → DifferentiableAt ℂ f x\n⊢ (∮ (z : ℂ) in C(c, R), (z - w)⁻¹ • f z) = (2 * ↑π * I) • f w\n[PROOFSTEP]\nhave hR : 0 < R := dist_nonneg.trans_lt hw.1\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nR : ℝ\nc w : ℂ\nf : ℂ → E\ns : Set ℂ\nhs : Set.Countable s\nhw : w ∈ ball c R \\ s\nhc : ContinuousOn f (closedBall c R)\nhd : ∀ (x : ℂ), x ∈ ball c R \\ s → DifferentiableAt ℂ f x\nhR : 0 < R\n⊢ (∮ (z : ℂ) in C(c, R), (z - w)⁻¹ • f z) = (2 * ↑π * I) • f w\n[PROOFSTEP]\nset F : ℂ → E := dslope f w\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nR : ℝ\nc w : ℂ\nf : ℂ → E\ns : Set ℂ\nhs : Set.Countable s\nhw : w ∈ ball c R \\ s\nhc : ContinuousOn f (closedBall c R)\nhd : ∀ (x : ℂ), x ∈ ball c R \\ s → DifferentiableAt ℂ f x\nhR : 0 < R\nF : ℂ → E := dslope f w\n⊢ (∮ (z : ℂ) in C(c, R), (z - w)⁻¹ • f z) = (2 * ↑π * I) • f w\n[PROOFSTEP]\nhave hws : (insert w s).Countable := hs.insert w\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nR : ℝ\nc w : ℂ\nf : ℂ → E\ns : Set ℂ\nhs : Set.Countable s\nhw : w ∈ ball c R \\ s\nhc : ContinuousOn f (closedBall c R)\nhd : ∀ (x : ℂ), x ∈ ball c R \\ s → DifferentiableAt ℂ f x\nhR : 0 < R\nF : ℂ → E := dslope f w\nhws : Set.Countable (insert w s)\n⊢ (∮ (z : ℂ) in C(c, R), (z - w)⁻¹ • f z) = (2 * ↑π * I) • f w\n[PROOFSTEP]\nhave hcF : ContinuousOn F (closedBall c R) := (continuousOn_dslope <| closedBall_mem_nhds_of_mem hw.1).2 ⟨hc, hd _ hw⟩\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nR : ℝ\nc w : ℂ\nf : ℂ → E\ns : Set ℂ\nhs : Set.Countable s\nhw : w ∈ ball c R \\ s\nhc : ContinuousOn f (closedBall c R)\nhd : ∀ (x : ℂ), x ∈ ball c R \\ s → DifferentiableAt ℂ f x\nhR : 0 < R\nF : ℂ → E := dslope f w\nhws : Set.Countable (insert w s)\nhcF : ContinuousOn F (closedBall c R)\n⊢ (∮ (z : ℂ) in C(c, R), (z - w)⁻¹ • f z) = (2 * ↑π * I) • f w\n[PROOFSTEP]\nhave hdF : ∀ z ∈ ball (c : ℂ) R \\ insert w s, DifferentiableAt ℂ F z := fun z hz =>\n  (differentiableAt_dslope_of_ne (ne_of_mem_of_not_mem (mem_insert _ _) hz.2).symm).2\n    (hd _ (diff_subset_diff_right (subset_insert _ _) hz))\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nR : ℝ\nc w : ℂ\nf : ℂ → E\ns : Set ℂ\nhs : Set.Countable s\nhw : w ∈ ball c R \\ s\nhc : ContinuousOn f (closedBall c R)\nhd : ∀ (x : ℂ), x ∈ ball c R \\ s → DifferentiableAt ℂ f x\nhR : 0 < R\nF : ℂ → E := dslope f w\nhws : Set.Countable (insert w s)\nhcF : ContinuousOn F (closedBall c R)\nhdF : ∀ (z : ℂ), z ∈ ball c R \\ insert w s → DifferentiableAt ℂ F z\n⊢ (∮ (z : ℂ) in C(c, R), (z - w)⁻¹ • f z) = (2 * ↑π * I) • f w\n[PROOFSTEP]\nhave HI := circleIntegral_eq_zero_of_differentiable_on_off_countable hR.le hws hcF hdF\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nR : ℝ\nc w : ℂ\nf : ℂ → E\ns : Set ℂ\nhs : Set.Countable s\nhw : w ∈ ball c R \\ s\nhc : ContinuousOn f (closedBall c R)\nhd : ∀ (x : ℂ), x ∈ ball c R \\ s → DifferentiableAt ℂ f x\nhR : 0 < R\nF : ℂ → E := dslope f w\nhws : Set.Countable (insert w s)\nhcF : ContinuousOn F (closedBall c R)\nhdF : ∀ (z : ℂ), z ∈ ball c R \\ insert w s → DifferentiableAt ℂ F z\nHI : (∮ (z : ℂ) in C(c, R), F z) = 0\n⊢ (∮ (z : ℂ) in C(c, R), (z - w)⁻¹ • f z) = (2 * ↑π * I) • f w\n[PROOFSTEP]\nhave hne : ∀ z ∈ sphere c R, z ≠ w := fun z hz => ne_of_mem_of_not_mem hz (ne_of_lt hw.1)\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nR : ℝ\nc w : ℂ\nf : ℂ → E\ns : Set ℂ\nhs : Set.Countable s\nhw : w ∈ ball c R \\ s\nhc : ContinuousOn f (closedBall c R)\nhd : ∀ (x : ℂ), x ∈ ball c R \\ s → DifferentiableAt ℂ f x\nhR : 0 < R\nF : ℂ → E := dslope f w\nhws : Set.Countable (insert w s)\nhcF : ContinuousOn F (closedBall c R)\nhdF : ∀ (z : ℂ), z ∈ ball c R \\ insert w s → DifferentiableAt ℂ F z\nHI : (∮ (z : ℂ) in C(c, R), F z) = 0\nhne : ∀ (z : ℂ), z ∈ sphere c R → z ≠ w\n⊢ (∮ (z : ℂ) in C(c, R), (z - w)⁻¹ • f z) = (2 * ↑π * I) • f w\n[PROOFSTEP]\nhave hFeq : EqOn F (fun z => (z - w)⁻¹ • f z - (z - w)⁻¹ • f w) (sphere c R) := fun z hz ↦\n  calc\n    F z = (z - w)⁻¹ • (f z - f w) := update_noteq (hne z hz) _ _\n    _ = (z - w)⁻¹ • f z - (z - w)⁻¹ • f w := smul_sub _ _ _\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nR : ℝ\nc w : ℂ\nf : ℂ → E\ns : Set ℂ\nhs : Set.Countable s\nhw : w ∈ ball c R \\ s\nhc : ContinuousOn f (closedBall c R)\nhd : ∀ (x : ℂ), x ∈ ball c R \\ s → DifferentiableAt ℂ f x\nhR : 0 < R\nF : ℂ → E := dslope f w\nhws : Set.Countable (insert w s)\nhcF : ContinuousOn F (closedBall c R)\nhdF : ∀ (z : ℂ), z ∈ ball c R \\ insert w s → DifferentiableAt ℂ F z\nHI : (∮ (z : ℂ) in C(c, R), F z) = 0\nhne : ∀ (z : ℂ), z ∈ sphere c R → z ≠ w\nhFeq : EqOn F (fun z => (z - w)⁻¹ • f z - (z - w)⁻¹ • f w) (sphere c R)\n⊢ (∮ (z : ℂ) in C(c, R), (z - w)⁻¹ • f z) = (2 * ↑π * I) • f w\n[PROOFSTEP]\nhave hc' : ContinuousOn (fun z => (z - w)⁻¹) (sphere c R) :=\n  (continuousOn_id.sub continuousOn_const).inv₀ fun z hz => sub_ne_zero.2 <| hne z hz\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nR : ℝ\nc w : ℂ\nf : ℂ → E\ns : Set ℂ\nhs : Set.Countable s\nhw : w ∈ ball c R \\ s\nhc : ContinuousOn f (closedBall c R)\nhd : ∀ (x : ℂ), x ∈ ball c R \\ s → DifferentiableAt ℂ f x\nhR : 0 < R\nF : ℂ → E := dslope f w\nhws : Set.Countable (insert w s)\nhcF : ContinuousOn F (closedBall c R)\nhdF : ∀ (z : ℂ), z ∈ ball c R \\ insert w s → DifferentiableAt ℂ F z\nHI : (∮ (z : ℂ) in C(c, R), F z) = 0\nhne : ∀ (z : ℂ), z ∈ sphere c R → z ≠ w\nhFeq : EqOn F (fun z => (z - w)⁻¹ • f z - (z - w)⁻¹ • f w) (sphere c R)\nhc' : ContinuousOn (fun z => (z - w)⁻¹) (sphere c R)\n⊢ (∮ (z : ℂ) in C(c, R), (z - w)⁻¹ • f z) = (2 * ↑π * I) • f w\n[PROOFSTEP]\nrw [← circleIntegral.integral_sub_inv_of_mem_ball hw.1, ← circleIntegral.integral_smul_const, ← sub_eq_zero, ←\n  circleIntegral.integral_sub, ← circleIntegral.integral_congr hR.le hFeq, HI]\n[GOAL]\ncase hf\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nR : ℝ\nc w : ℂ\nf : ℂ → E\ns : Set ℂ\nhs : Set.Countable s\nhw : w ∈ ball c R \\ s\nhc : ContinuousOn f (closedBall c R)\nhd : ∀ (x : ℂ), x ∈ ball c R \\ s → DifferentiableAt ℂ f x\nhR : 0 < R\nF : ℂ → E := dslope f w\nhws : Set.Countable (insert w s)\nhcF : ContinuousOn F (closedBall c R)\nhdF : ∀ (z : ℂ), z ∈ ball c R \\ insert w s → DifferentiableAt ℂ F z\nHI : (∮ (z : ℂ) in C(c, R), F z) = 0\nhne : ∀ (z : ℂ), z ∈ sphere c R → z ≠ w\nhFeq : EqOn F (fun z => (z - w)⁻¹ • f z - (z - w)⁻¹ • f w) (sphere c R)\nhc' : ContinuousOn (fun z => (z - w)⁻¹) (sphere c R)\n⊢ CircleIntegrable (fun z => (z - w)⁻¹ • f z) c R\ncase hg\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nR : ℝ\nc w : ℂ\nf : ℂ → E\ns : Set ℂ\nhs : Set.Countable s\nhw : w ∈ ball c R \\ s\nhc : ContinuousOn f (closedBall c R)\nhd : ∀ (x : ℂ), x ∈ ball c R \\ s → DifferentiableAt ℂ f x\nhR : 0 < R\nF : ℂ → E := dslope f w\nhws : Set.Countable (insert w s)\nhcF : ContinuousOn F (closedBall c R)\nhdF : ∀ (z : ℂ), z ∈ ball c R \\ insert w s → DifferentiableAt ℂ F z\nHI : (∮ (z : ℂ) in C(c, R), F z) = 0\nhne : ∀ (z : ℂ), z ∈ sphere c R → z ≠ w\nhFeq : EqOn F (fun z => (z - w)⁻¹ • f z - (z - w)⁻¹ • f w) (sphere c R)\nhc' : ContinuousOn (fun z => (z - w)⁻¹) (sphere c R)\n⊢ CircleIntegrable (fun z => (z - w)⁻¹ • f w) c R\n[PROOFSTEP]\nexacts [(hc'.smul (hc.mono sphere_subset_closedBall)).circleIntegrable hR.le,\n  (hc'.smul continuousOn_const).circleIntegrable hR.le]\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nR : ℝ\nc w : ℂ\nf : ℂ → E\ns : Set ℂ\nhs : Set.Countable s\nhw : w ∈ ball c R\nhc : ContinuousOn f (closedBall c R)\nhd : ∀ (x : ℂ), x ∈ ball c R \\ s → DifferentiableAt ℂ f x\n⊢ ((2 * ↑π * I)⁻¹ • ∮ (z : ℂ) in C(c, R), (z - w)⁻¹ • f z) = f w\n[PROOFSTEP]\nhave hR : 0 < R := dist_nonneg.trans_lt hw\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nR : ℝ\nc w : ℂ\nf : ℂ → E\ns : Set ℂ\nhs : Set.Countable s\nhw : w ∈ ball c R\nhc : ContinuousOn f (closedBall c R)\nhd : ∀ (x : ℂ), x ∈ ball c R \\ s → DifferentiableAt ℂ f x\nhR : 0 < R\n⊢ ((2 * ↑π * I)⁻¹ • ∮ (z : ℂ) in C(c, R), (z - w)⁻¹ • f z) = f w\n[PROOFSTEP]\nsuffices w ∈ closure (ball c R \\ s) by\n  lift R to ℝ≥0 using hR.le\n  have A : ContinuousAt (fun w => (2 * π * I : ℂ)⁻¹ • ∮ z in C(c, R), (z - w)⁻¹ • f z) w :=\n    by\n    have := hasFPowerSeriesOn_cauchy_integral ((hc.mono sphere_subset_closedBall).circleIntegrable R.coe_nonneg) hR\n    refine' this.continuousOn.continuousAt (EMetric.isOpen_ball.mem_nhds _)\n    rwa [Metric.emetric_ball_nnreal]\n  have B : ContinuousAt f w := hc.continuousAt (closedBall_mem_nhds_of_mem hw)\n  refine' tendsto_nhds_unique_of_frequently_eq A B ((mem_closure_iff_frequently.1 this).mono _)\n  intro z hz\n  rw [circleIntegral_sub_inv_smul_of_differentiable_on_off_countable_aux hs hz hc hd, inv_smul_smul₀]\n  simp [Real.pi_ne_zero, I_ne_zero]\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nR : ℝ\nc w : ℂ\nf : ℂ → E\ns : Set ℂ\nhs : Set.Countable s\nhw : w ∈ ball c R\nhc : ContinuousOn f (closedBall c R)\nhd : ∀ (x : ℂ), x ∈ ball c R \\ s → DifferentiableAt ℂ f x\nhR : 0 < R\nthis : w ∈ closure (ball c R \\ s)\n⊢ ((2 * ↑π * I)⁻¹ • ∮ (z : ℂ) in C(c, R), (z - w)⁻¹ • f z) = f w\n[PROOFSTEP]\nlift R to ℝ≥0 using hR.le\n[GOAL]\ncase intro\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nc w : ℂ\nf : ℂ → E\ns : Set ℂ\nhs : Set.Countable s\nR : ℝ≥0\nhw : w ∈ ball c ↑R\nhc : ContinuousOn f (closedBall c ↑R)\nhd : ∀ (x : ℂ), x ∈ ball c ↑R \\ s → DifferentiableAt ℂ f x\nhR : 0 < ↑R\nthis : w ∈ closure (ball c ↑R \\ s)\n⊢ ((2 * ↑π * I)⁻¹ • ∮ (z : ℂ) in C(c, ↑R), (z - w)⁻¹ • f z) = f w\n[PROOFSTEP]\nhave A : ContinuousAt (fun w => (2 * π * I : ℂ)⁻¹ • ∮ z in C(c, R), (z - w)⁻¹ • f z) w :=\n  by\n  have := hasFPowerSeriesOn_cauchy_integral ((hc.mono sphere_subset_closedBall).circleIntegrable R.coe_nonneg) hR\n  refine' this.continuousOn.continuousAt (EMetric.isOpen_ball.mem_nhds _)\n  rwa [Metric.emetric_ball_nnreal]\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nc w : ℂ\nf : ℂ → E\ns : Set ℂ\nhs : Set.Countable s\nR : ℝ≥0\nhw : w ∈ ball c ↑R\nhc : ContinuousOn f (closedBall c ↑R)\nhd : ∀ (x : ℂ), x ∈ ball c ↑R \\ s → DifferentiableAt ℂ f x\nhR : 0 < ↑R\nthis : w ∈ closure (ball c ↑R \\ s)\n⊢ ContinuousAt (fun w => (2 * ↑π * I)⁻¹ • ∮ (z : ℂ) in C(c, ↑R), (z - w)⁻¹ • f z) w\n[PROOFSTEP]\nhave := hasFPowerSeriesOn_cauchy_integral ((hc.mono sphere_subset_closedBall).circleIntegrable R.coe_nonneg) hR\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nc w : ℂ\nf : ℂ → E\ns : Set ℂ\nhs : Set.Countable s\nR : ℝ≥0\nhw : w ∈ ball c ↑R\nhc : ContinuousOn f (closedBall c ↑R)\nhd : ∀ (x : ℂ), x ∈ ball c ↑R \\ s → DifferentiableAt ℂ f x\nhR : 0 < ↑R\nthis✝ : w ∈ closure (ball c ↑R \\ s)\nthis :\n  HasFPowerSeriesOnBall (fun w => (2 * ↑π * I)⁻¹ • ∮ (z : ℂ) in C(c, ↑R), (z - w)⁻¹ • f z) (cauchyPowerSeries f c ↑R) c\n    ↑R\n⊢ ContinuousAt (fun w => (2 * ↑π * I)⁻¹ • ∮ (z : ℂ) in C(c, ↑R), (z - w)⁻¹ • f z) w\n[PROOFSTEP]\nrefine' this.continuousOn.continuousAt (EMetric.isOpen_ball.mem_nhds _)\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nc w : ℂ\nf : ℂ → E\ns : Set ℂ\nhs : Set.Countable s\nR : ℝ≥0\nhw : w ∈ ball c ↑R\nhc : ContinuousOn f (closedBall c ↑R)\nhd : ∀ (x : ℂ), x ∈ ball c ↑R \\ s → DifferentiableAt ℂ f x\nhR : 0 < ↑R\nthis✝ : w ∈ closure (ball c ↑R \\ s)\nthis :\n  HasFPowerSeriesOnBall (fun w => (2 * ↑π * I)⁻¹ • ∮ (z : ℂ) in C(c, ↑R), (z - w)⁻¹ • f z) (cauchyPowerSeries f c ↑R) c\n    ↑R\n⊢ w ∈ EMetric.ball c ↑R\n[PROOFSTEP]\nrwa [Metric.emetric_ball_nnreal]\n[GOAL]\ncase intro\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nc w : ℂ\nf : ℂ → E\ns : Set ℂ\nhs : Set.Countable s\nR : ℝ≥0\nhw : w ∈ ball c ↑R\nhc : ContinuousOn f (closedBall c ↑R)\nhd : ∀ (x : ℂ), x ∈ ball c ↑R \\ s → DifferentiableAt ℂ f x\nhR : 0 < ↑R\nthis : w ∈ closure (ball c ↑R \\ s)\nA : ContinuousAt (fun w => (2 * ↑π * I)⁻¹ • ∮ (z : ℂ) in C(c, ↑R), (z - w)⁻¹ • f z) w\n⊢ ((2 * ↑π * I)⁻¹ • ∮ (z : ℂ) in C(c, ↑R), (z - w)⁻¹ • f z) = f w\n[PROOFSTEP]\nhave B : ContinuousAt f w := hc.continuousAt (closedBall_mem_nhds_of_mem hw)\n[GOAL]\ncase intro\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nc w : ℂ\nf : ℂ → E\ns : Set ℂ\nhs : Set.Countable s\nR : ℝ≥0\nhw : w ∈ ball c ↑R\nhc : ContinuousOn f (closedBall c ↑R)\nhd : ∀ (x : ℂ), x ∈ ball c ↑R \\ s → DifferentiableAt ℂ f x\nhR : 0 < ↑R\nthis : w ∈ closure (ball c ↑R \\ s)\nA : ContinuousAt (fun w => (2 * ↑π * I)⁻¹ • ∮ (z : ℂ) in C(c, ↑R), (z - w)⁻¹ • f z) w\nB : ContinuousAt f w\n⊢ ((2 * ↑π * I)⁻¹ • ∮ (z : ℂ) in C(c, ↑R), (z - w)⁻¹ • f z) = f w\n[PROOFSTEP]\nrefine' tendsto_nhds_unique_of_frequently_eq A B ((mem_closure_iff_frequently.1 this).mono _)\n[GOAL]\ncase intro\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nc w : ℂ\nf : ℂ → E\ns : Set ℂ\nhs : Set.Countable s\nR : ℝ≥0\nhw : w ∈ ball c ↑R\nhc : ContinuousOn f (closedBall c ↑R)\nhd : ∀ (x : ℂ), x ∈ ball c ↑R \\ s → DifferentiableAt ℂ f x\nhR : 0 < ↑R\nthis : w ∈ closure (ball c ↑R \\ s)\nA : ContinuousAt (fun w => (2 * ↑π * I)⁻¹ • ∮ (z : ℂ) in C(c, ↑R), (z - w)⁻¹ • f z) w\nB : ContinuousAt f w\n⊢ ∀ (x : ℂ), x ∈ ball c ↑R \\ s → ((2 * ↑π * I)⁻¹ • ∮ (z : ℂ) in C(c, ↑R), (z - x)⁻¹ • f z) = f x\n[PROOFSTEP]\nintro z hz\n[GOAL]\ncase intro\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nc w : ℂ\nf : ℂ → E\ns : Set ℂ\nhs : Set.Countable s\nR : ℝ≥0\nhw : w ∈ ball c ↑R\nhc : ContinuousOn f (closedBall c ↑R)\nhd : ∀ (x : ℂ), x ∈ ball c ↑R \\ s → DifferentiableAt ℂ f x\nhR : 0 < ↑R\nthis : w ∈ closure (ball c ↑R \\ s)\nA : ContinuousAt (fun w => (2 * ↑π * I)⁻¹ • ∮ (z : ℂ) in C(c, ↑R), (z - w)⁻¹ • f z) w\nB : ContinuousAt f w\nz : ℂ\nhz : z ∈ ball c ↑R \\ s\n⊢ ((2 * ↑π * I)⁻¹ • ∮ (z_1 : ℂ) in C(c, ↑R), (z_1 - z)⁻¹ • f z_1) = f z\n[PROOFSTEP]\nrw [circleIntegral_sub_inv_smul_of_differentiable_on_off_countable_aux hs hz hc hd, inv_smul_smul₀]\n[GOAL]\ncase intro.hc\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nc w : ℂ\nf : ℂ → E\ns : Set ℂ\nhs : Set.Countable s\nR : ℝ≥0\nhw : w ∈ ball c ↑R\nhc : ContinuousOn f (closedBall c ↑R)\nhd : ∀ (x : ℂ), x ∈ ball c ↑R \\ s → DifferentiableAt ℂ f x\nhR : 0 < ↑R\nthis : w ∈ closure (ball c ↑R \\ s)\nA : ContinuousAt (fun w => (2 * ↑π * I)⁻¹ • ∮ (z : ℂ) in C(c, ↑R), (z - w)⁻¹ • f z) w\nB : ContinuousAt f w\nz : ℂ\nhz : z ∈ ball c ↑R \\ s\n⊢ 2 * ↑π * I ≠ 0\n[PROOFSTEP]\nsimp [Real.pi_ne_zero, I_ne_zero]\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nR : ℝ\nc w : ℂ\nf : ℂ → E\ns : Set ℂ\nhs : Set.Countable s\nhw : w ∈ ball c R\nhc : ContinuousOn f (closedBall c R)\nhd : ∀ (x : ℂ), x ∈ ball c R \\ s → DifferentiableAt ℂ f x\nhR : 0 < R\n⊢ w ∈ closure (ball c R \\ s)\n[PROOFSTEP]\nrefine'\n  mem_closure_iff_nhds.2 fun t ht =>\n    _\n      -- TODO: generalize to any vector space over `ℝ`\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nR : ℝ\nc w : ℂ\nf : ℂ → E\ns : Set ℂ\nhs : Set.Countable s\nhw : w ∈ ball c R\nhc : ContinuousOn f (closedBall c R)\nhd : ∀ (x : ℂ), x ∈ ball c R \\ s → DifferentiableAt ℂ f x\nhR : 0 < R\nt : Set ℂ\nht : t ∈ 𝓝 w\n⊢ Set.Nonempty (t ∩ (ball c R \\ s))\n[PROOFSTEP]\nset g : ℝ → ℂ := fun x => w + ofReal x\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nR : ℝ\nc w : ℂ\nf : ℂ → E\ns : Set ℂ\nhs : Set.Countable s\nhw : w ∈ ball c R\nhc : ContinuousOn f (closedBall c R)\nhd : ∀ (x : ℂ), x ∈ ball c R \\ s → DifferentiableAt ℂ f x\nhR : 0 < R\nt : Set ℂ\nht : t ∈ 𝓝 w\ng : ℝ → ℂ := fun x => w + ↑ofReal x\n⊢ Set.Nonempty (t ∩ (ball c R \\ s))\n[PROOFSTEP]\nhave : Tendsto g (𝓝 0) (𝓝 w) := (continuous_const.add continuous_ofReal).tendsto' 0 w (add_zero _)\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nR : ℝ\nc w : ℂ\nf : ℂ → E\ns : Set ℂ\nhs : Set.Countable s\nhw : w ∈ ball c R\nhc : ContinuousOn f (closedBall c R)\nhd : ∀ (x : ℂ), x ∈ ball c R \\ s → DifferentiableAt ℂ f x\nhR : 0 < R\nt : Set ℂ\nht : t ∈ 𝓝 w\ng : ℝ → ℂ := fun x => w + ↑ofReal x\nthis : Tendsto g (𝓝 0) (𝓝 w)\n⊢ Set.Nonempty (t ∩ (ball c R \\ s))\n[PROOFSTEP]\nrcases mem_nhds_iff_exists_Ioo_subset.1 (this <| inter_mem ht <| isOpen_ball.mem_nhds hw) with ⟨l, u, hlu₀, hlu_sub⟩\n[GOAL]\ncase intro.intro.intro\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nR : ℝ\nc w : ℂ\nf : ℂ → E\ns : Set ℂ\nhs : Set.Countable s\nhw : w ∈ ball c R\nhc : ContinuousOn f (closedBall c R)\nhd : ∀ (x : ℂ), x ∈ ball c R \\ s → DifferentiableAt ℂ f x\nhR : 0 < R\nt : Set ℂ\nht : t ∈ 𝓝 w\ng : ℝ → ℂ := fun x => w + ↑ofReal x\nthis : Tendsto g (𝓝 0) (𝓝 w)\nl u : ℝ\nhlu₀ : 0 ∈ Ioo l u\nhlu_sub : Ioo l u ⊆ g ⁻¹' (t ∩ ball c R)\n⊢ Set.Nonempty (t ∩ (ball c R \\ s))\n[PROOFSTEP]\nobtain ⟨x, hx⟩ : (Ioo l u \\ g ⁻¹' s).Nonempty :=\n  by\n  refine' nonempty_diff.2 fun hsub => _\n  have : (Ioo l u).Countable := (hs.preimage ((add_right_injective w).comp ofReal_injective)).mono hsub\n  rw [← Cardinal.le_aleph0_iff_set_countable, Cardinal.mk_Ioo_real (hlu₀.1.trans hlu₀.2)] at this \n  exact this.not_lt Cardinal.aleph0_lt_continuum\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nR : ℝ\nc w : ℂ\nf : ℂ → E\ns : Set ℂ\nhs : Set.Countable s\nhw : w ∈ ball c R\nhc : ContinuousOn f (closedBall c R)\nhd : ∀ (x : ℂ), x ∈ ball c R \\ s → DifferentiableAt ℂ f x\nhR : 0 < R\nt : Set ℂ\nht : t ∈ 𝓝 w\ng : ℝ → ℂ := fun x => w + ↑ofReal x\nthis : Tendsto g (𝓝 0) (𝓝 w)\nl u : ℝ\nhlu₀ : 0 ∈ Ioo l u\nhlu_sub : Ioo l u ⊆ g ⁻¹' (t ∩ ball c R)\n⊢ Set.Nonempty (Ioo l u \\ g ⁻¹' s)\n[PROOFSTEP]\nrefine' nonempty_diff.2 fun hsub => _\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nR : ℝ\nc w : ℂ\nf : ℂ → E\ns : Set ℂ\nhs : Set.Countable s\nhw : w ∈ ball c R\nhc : ContinuousOn f (closedBall c R)\nhd : ∀ (x : ℂ), x ∈ ball c R \\ s → DifferentiableAt ℂ f x\nhR : 0 < R\nt : Set ℂ\nht : t ∈ 𝓝 w\ng : ℝ → ℂ := fun x => w + ↑ofReal x\nthis : Tendsto g (𝓝 0) (𝓝 w)\nl u : ℝ\nhlu₀ : 0 ∈ Ioo l u\nhlu_sub : Ioo l u ⊆ g ⁻¹' (t ∩ ball c R)\nhsub : Ioo l u ⊆ g ⁻¹' s\n⊢ False\n[PROOFSTEP]\nhave : (Ioo l u).Countable := (hs.preimage ((add_right_injective w).comp ofReal_injective)).mono hsub\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nR : ℝ\nc w : ℂ\nf : ℂ → E\ns : Set ℂ\nhs : Set.Countable s\nhw : w ∈ ball c R\nhc : ContinuousOn f (closedBall c R)\nhd : ∀ (x : ℂ), x ∈ ball c R \\ s → DifferentiableAt ℂ f x\nhR : 0 < R\nt : Set ℂ\nht : t ∈ 𝓝 w\ng : ℝ → ℂ := fun x => w + ↑ofReal x\nthis✝ : Tendsto g (𝓝 0) (𝓝 w)\nl u : ℝ\nhlu₀ : 0 ∈ Ioo l u\nhlu_sub : Ioo l u ⊆ g ⁻¹' (t ∩ ball c R)\nhsub : Ioo l u ⊆ g ⁻¹' s\nthis : Set.Countable (Ioo l u)\n⊢ False\n[PROOFSTEP]\nrw [← Cardinal.le_aleph0_iff_set_countable, Cardinal.mk_Ioo_real (hlu₀.1.trans hlu₀.2)] at this \n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nR : ℝ\nc w : ℂ\nf : ℂ → E\ns : Set ℂ\nhs : Set.Countable s\nhw : w ∈ ball c R\nhc : ContinuousOn f (closedBall c R)\nhd : ∀ (x : ℂ), x ∈ ball c R \\ s → DifferentiableAt ℂ f x\nhR : 0 < R\nt : Set ℂ\nht : t ∈ 𝓝 w\ng : ℝ → ℂ := fun x => w + ↑ofReal x\nthis✝ : Tendsto g (𝓝 0) (𝓝 w)\nl u : ℝ\nhlu₀ : 0 ∈ Ioo l u\nhlu_sub : Ioo l u ⊆ g ⁻¹' (t ∩ ball c R)\nhsub : Ioo l u ⊆ g ⁻¹' s\nthis : Cardinal.continuum ≤ Cardinal.aleph0\n⊢ False\n[PROOFSTEP]\nexact this.not_lt Cardinal.aleph0_lt_continuum\n[GOAL]\ncase intro.intro.intro.intro\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nR : ℝ\nc w : ℂ\nf : ℂ → E\ns : Set ℂ\nhs : Set.Countable s\nhw : w ∈ ball c R\nhc : ContinuousOn f (closedBall c R)\nhd : ∀ (x : ℂ), x ∈ ball c R \\ s → DifferentiableAt ℂ f x\nhR : 0 < R\nt : Set ℂ\nht : t ∈ 𝓝 w\ng : ℝ → ℂ := fun x => w + ↑ofReal x\nthis : Tendsto g (𝓝 0) (𝓝 w)\nl u : ℝ\nhlu₀ : 0 ∈ Ioo l u\nhlu_sub : Ioo l u ⊆ g ⁻¹' (t ∩ ball c R)\nx : ℝ\nhx : x ∈ Ioo l u \\ g ⁻¹' s\n⊢ Set.Nonempty (t ∩ (ball c R \\ s))\n[PROOFSTEP]\nexact ⟨g x, (hlu_sub hx.1).1, (hlu_sub hx.1).2, hx.2⟩\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nR : ℝ\nc w : ℂ\nf : ℂ → E\ns : Set ℂ\nhs : Set.Countable s\nhw : w ∈ ball c R\nhc : ContinuousOn f (closedBall c R)\nhd : ∀ (x : ℂ), x ∈ ball c R \\ s → DifferentiableAt ℂ f x\n⊢ (∮ (z : ℂ) in C(c, R), (z - w)⁻¹ • f z) = (2 * ↑π * I) • f w\n[PROOFSTEP]\nrw [← two_pi_I_inv_smul_circleIntegral_sub_inv_smul_of_differentiable_on_off_countable hs hw hc hd, smul_inv_smul₀]\n[GOAL]\ncase hc\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nR : ℝ\nc w : ℂ\nf : ℂ → E\ns : Set ℂ\nhs : Set.Countable s\nhw : w ∈ ball c R\nhc : ContinuousOn f (closedBall c R)\nhd : ∀ (x : ℂ), x ∈ ball c R \\ s → DifferentiableAt ℂ f x\n⊢ 2 * ↑π * I ≠ 0\n[PROOFSTEP]\nsimp [Real.pi_ne_zero, I_ne_zero]\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nR : ℝ\nc w : ℂ\nf : ℂ → E\nhf : DiffContOnCl ℂ f (ball c R)\nhw : w ∈ ball c R\n⊢ ((2 * ↑π * I)⁻¹ • ∮ (z : ℂ) in C(c, R), (z - w)⁻¹ • f z) = f w\n[PROOFSTEP]\nhave hR : 0 < R := not_le.mp (ball_eq_empty.not.mp (Set.nonempty_of_mem hw).ne_empty)\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nR : ℝ\nc w : ℂ\nf : ℂ → E\nhf : DiffContOnCl ℂ f (ball c R)\nhw : w ∈ ball c R\nhR : 0 < R\n⊢ ((2 * ↑π * I)⁻¹ • ∮ (z : ℂ) in C(c, R), (z - w)⁻¹ • f z) = f w\n[PROOFSTEP]\nrefine' two_pi_I_inv_smul_circleIntegral_sub_inv_smul_of_differentiable_on_off_countable countable_empty hw _ _\n[GOAL]\ncase refine'_1\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nR : ℝ\nc w : ℂ\nf : ℂ → E\nhf : DiffContOnCl ℂ f (ball c R)\nhw : w ∈ ball c R\nhR : 0 < R\n⊢ ContinuousOn (fun z => f z) (closedBall c R)\n[PROOFSTEP]\nsimpa only [closure_ball c hR.ne.symm] using hf.continuousOn\n[GOAL]\ncase refine'_2\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nR : ℝ\nc w : ℂ\nf : ℂ → E\nhf : DiffContOnCl ℂ f (ball c R)\nhw : w ∈ ball c R\nhR : 0 < R\n⊢ ∀ (x : ℂ), x ∈ ball c R \\ ∅ → DifferentiableAt ℂ (fun z => f z) x\n[PROOFSTEP]\nsimpa only [diff_empty] using fun z hz => hf.differentiableAt isOpen_ball hz\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nR : ℝ\nc w : ℂ\ns : Set ℂ\nhs : Set.Countable s\nhw : w ∈ ball c R\nf : ℂ → ℂ\nhc : ContinuousOn f (closedBall c R)\nhd : ∀ (z : ℂ), z ∈ ball c R \\ s → DifferentiableAt ℂ f z\n⊢ (∮ (z : ℂ) in C(c, R), f z / (z - w)) = 2 * ↑π * I * f w\n[PROOFSTEP]\nsimpa only [smul_eq_mul, div_eq_inv_mul] using\n  circleIntegral_sub_inv_smul_of_differentiable_on_off_countable hs hw hc hd\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nR : ℝ≥0\nc : ℂ\nf : ℂ → E\ns : Set ℂ\nhs : Set.Countable s\nhc : ContinuousOn f (closedBall c ↑R)\nhd : ∀ (z : ℂ), z ∈ ball c ↑R \\ s → DifferentiableAt ℂ f z\nhR : 0 < R\nw : ℂ\nhw : w ∈ EMetric.ball 0 ↑R\n⊢ HasSum (fun n => ↑(cauchyPowerSeries f c (↑R) n) fun x => w) (f (c + w))\n[PROOFSTEP]\nhave hw' : c + w ∈ ball c R := by\n  simpa only [add_mem_ball_iff_norm, ← coe_nnnorm, mem_emetric_ball_zero_iff, NNReal.coe_lt_coe,\n    ENNReal.coe_lt_coe] using hw\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nR : ℝ≥0\nc : ℂ\nf : ℂ → E\ns : Set ℂ\nhs : Set.Countable s\nhc : ContinuousOn f (closedBall c ↑R)\nhd : ∀ (z : ℂ), z ∈ ball c ↑R \\ s → DifferentiableAt ℂ f z\nhR : 0 < R\nw : ℂ\nhw : w ∈ EMetric.ball 0 ↑R\n⊢ c + w ∈ ball c ↑R\n[PROOFSTEP]\nsimpa only [add_mem_ball_iff_norm, ← coe_nnnorm, mem_emetric_ball_zero_iff, NNReal.coe_lt_coe, ENNReal.coe_lt_coe] using\n  hw\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nR : ℝ≥0\nc : ℂ\nf : ℂ → E\ns : Set ℂ\nhs : Set.Countable s\nhc : ContinuousOn f (closedBall c ↑R)\nhd : ∀ (z : ℂ), z ∈ ball c ↑R \\ s → DifferentiableAt ℂ f z\nhR : 0 < R\nw : ℂ\nhw : w ∈ EMetric.ball 0 ↑R\nhw' : c + w ∈ ball c ↑R\n⊢ HasSum (fun n => ↑(cauchyPowerSeries f c (↑R) n) fun x => w) (f (c + w))\n[PROOFSTEP]\nrw [← two_pi_I_inv_smul_circleIntegral_sub_inv_smul_of_differentiable_on_off_countable hs hw' hc hd]\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nR : ℝ≥0\nc : ℂ\nf : ℂ → E\ns : Set ℂ\nhs : Set.Countable s\nhc : ContinuousOn f (closedBall c ↑R)\nhd : ∀ (z : ℂ), z ∈ ball c ↑R \\ s → DifferentiableAt ℂ f z\nhR : 0 < R\nw : ℂ\nhw : w ∈ EMetric.ball 0 ↑R\nhw' : c + w ∈ ball c ↑R\n⊢ HasSum (fun n => ↑(cauchyPowerSeries f c (↑R) n) fun x => w)\n    ((2 * ↑π * I)⁻¹ • ∮ (z : ℂ) in C(c, ↑R), (z - (c + w))⁻¹ • f z)\n[PROOFSTEP]\nexact (hasFPowerSeriesOn_cauchy_integral ((hc.mono sphere_subset_closedBall).circleIntegrable R.2) hR).hasSum hw\n[GOAL]\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\ns : Set ℂ\nf : ℂ → E\nz : ℂ\nhd : DifferentiableOn ℂ f s\nhz : s ∈ 𝓝 z\n⊢ AnalyticAt ℂ f z\n[PROOFSTEP]\nrcases nhds_basis_closedBall.mem_iff.1 hz with ⟨R, hR0, hRs⟩\n[GOAL]\ncase intro.intro\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\ns : Set ℂ\nf : ℂ → E\nz : ℂ\nhd : DifferentiableOn ℂ f s\nhz : s ∈ 𝓝 z\nR : ℝ\nhR0 : 0 < R\nhRs : closedBall z R ⊆ s\n⊢ AnalyticAt ℂ f z\n[PROOFSTEP]\nlift R to ℝ≥0 using hR0.le\n[GOAL]\ncase intro.intro.intro\nE : Type u\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\ns : Set ℂ\nf : ℂ → E\nz : ℂ\nhd : DifferentiableOn ℂ f s\nhz : s ∈ 𝓝 z\nR : ℝ≥0\nhR0 : 0 < ↑R\nhRs : closedBall z ↑R ⊆ s\n⊢ AnalyticAt ℂ f z\n[PROOFSTEP]\nexact ((hd.mono hRs).hasFPowerSeriesOnBall hR0).analyticAt\n", "meta": {"mathlib_filename": "Mathlib.Analysis.Complex.CauchyIntegral", "llama_tokens": 51729, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8459424334245618, "lm_q2_score": 0.600188359260205, "lm_q1q2_score": 0.5077248011456729}}
{"text": "[GOAL]\nC : FloatCfg\ne : ℤ\nm : ℕ\n⊢ Decidable (ValidFinite e m)\n[PROOFSTEP]\nunfold ValidFinite\n[GOAL]\nC : FloatCfg\ne : ℤ\nm : ℕ\n⊢ Decidable (emin ≤ e + ↑prec - 1 ∧ e + ↑prec - 1 ≤ ↑emax ∧ e = max (e + ↑(Nat.size m) - ↑prec) emin)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : FloatCfg\n⊢ emin ≤ emin + ↑prec - 1\n[PROOFSTEP]\nrw [add_sub_assoc]\n[GOAL]\nC : FloatCfg\n⊢ emin ≤ emin + (↑prec - 1)\n[PROOFSTEP]\napply le_add_of_nonneg_right\n[GOAL]\ncase h\nC : FloatCfg\n⊢ 0 ≤ ↑prec - 1\n[PROOFSTEP]\napply sub_nonneg_of_le\n[GOAL]\ncase h.a\nC : FloatCfg\n⊢ 1 ≤ ↑prec\n[PROOFSTEP]\napply Int.ofNat_le_ofNat_of_le\n[GOAL]\ncase h.a.a\nC : FloatCfg\n⊢ 1 ≤ prec\n[PROOFSTEP]\nexact C.precPos\n[GOAL]\nC : FloatCfg\n⊢ 0 < 2\n[PROOFSTEP]\ndecide\n[GOAL]\nC : FloatCfg\nthis : prec ≤ 2 * emax\n⊢ emin + ↑prec - 1 ≤ ↑emax\n[PROOFSTEP]\nrw [← Int.ofNat_le] at this \n[GOAL]\nC : FloatCfg\nthis : ↑prec ≤ ↑(2 * emax)\n⊢ emin + ↑prec - 1 ≤ ↑emax\n[PROOFSTEP]\nrw [← sub_nonneg] at *\n[GOAL]\nC : FloatCfg\nthis✝ : ↑prec ≤ ↑(2 * emax)\nthis : 0 ≤ ↑(2 * emax) - ↑prec\n⊢ 0 ≤ ↑emax - (emin + ↑prec - 1)\n[PROOFSTEP]\nsimp only [emin, emax] at *\n[GOAL]\nC : FloatCfg\nthis✝ : ↑prec ≤ ↑(2 * FloatCfg.emax)\nthis : 0 ≤ ↑(2 * FloatCfg.emax) - ↑prec\n⊢ 0 ≤ ↑FloatCfg.emax - (1 - ↑FloatCfg.emax + ↑prec - 1)\n[PROOFSTEP]\nring_nf\n[GOAL]\nC : FloatCfg\nthis✝ : ↑prec ≤ ↑(2 * FloatCfg.emax)\nthis : 0 ≤ ↑(2 * FloatCfg.emax) - ↑prec\n⊢ 0 ≤ ↑FloatCfg.emax * 2 - ↑prec\n[PROOFSTEP]\nrw [mul_comm]\n[GOAL]\nC : FloatCfg\nthis✝ : ↑prec ≤ ↑(2 * FloatCfg.emax)\nthis : 0 ≤ ↑(2 * FloatCfg.emax) - ↑prec\n⊢ 0 ≤ 2 * ↑FloatCfg.emax - ↑prec\n[PROOFSTEP]\nassumption\n[GOAL]\nC : FloatCfg\n⊢ emin = max (emin + ↑(Nat.size 0) - ↑prec) emin\n[PROOFSTEP]\nrw [max_eq_right]\n[GOAL]\nC : FloatCfg\n⊢ emin + ↑(Nat.size 0) - ↑prec ≤ emin\n[PROOFSTEP]\nsimp [sub_eq_add_neg]\n[GOAL]\nC : FloatCfg\nn d : ℕ+\n⊢ Float × Bool\n[PROOFSTEP]\nlet e₁ : ℤ := n.1.size - d.1.size - prec\n[GOAL]\nC : FloatCfg\nn d : ℕ+\ne₁ : ℤ := ↑(Nat.size ↑n) - ↑(Nat.size ↑d) - ↑prec\n⊢ Float × Bool\n[PROOFSTEP]\ncases' h₁ : Int.shift2 d.1 n.1 (e₁ + prec) with d₁ n₁\n[GOAL]\ncase mk\nC : FloatCfg\nn d : ℕ+\ne₁ : ℤ := ↑(Nat.size ↑n) - ↑(Nat.size ↑d) - ↑prec\nd₁ n₁ : ℕ\nh₁ : Int.shift2 (↑d) (↑n) (e₁ + ↑prec) = (d₁, n₁)\n⊢ Float × Bool\n[PROOFSTEP]\nlet e₂ := if n₁ < d₁ then e₁ - 1 else e₁\n[GOAL]\ncase mk\nC : FloatCfg\nn d : ℕ+\ne₁ : ℤ := ↑(Nat.size ↑n) - ↑(Nat.size ↑d) - ↑prec\nd₁ n₁ : ℕ\nh₁ : Int.shift2 (↑d) (↑n) (e₁ + ↑prec) = (d₁, n₁)\ne₂ : ℤ := if n₁ < d₁ then e₁ - 1 else e₁\n⊢ Float × Bool\n[PROOFSTEP]\nlet e₃ := max e₂ emin\n[GOAL]\ncase mk\nC : FloatCfg\nn d : ℕ+\ne₁ : ℤ := ↑(Nat.size ↑n) - ↑(Nat.size ↑d) - ↑prec\nd₁ n₁ : ℕ\nh₁ : Int.shift2 (↑d) (↑n) (e₁ + ↑prec) = (d₁, n₁)\ne₂ : ℤ := if n₁ < d₁ then e₁ - 1 else e₁\ne₃ : ℤ := max e₂ emin\n⊢ Float × Bool\n[PROOFSTEP]\ncases' h₂ : Int.shift2 d.1 n.1 (e₃ + prec) with d₂ n₂\n[GOAL]\ncase mk.mk\nC : FloatCfg\nn d : ℕ+\ne₁ : ℤ := ↑(Nat.size ↑n) - ↑(Nat.size ↑d) - ↑prec\nd₁ n₁ : ℕ\nh₁ : Int.shift2 (↑d) (↑n) (e₁ + ↑prec) = (d₁, n₁)\ne₂ : ℤ := if n₁ < d₁ then e₁ - 1 else e₁\ne₃ : ℤ := max e₂ emin\nd₂ n₂ : ℕ\nh₂ : Int.shift2 (↑d) (↑n) (e₃ + ↑prec) = (d₂, n₂)\n⊢ Float × Bool\n[PROOFSTEP]\nlet r := mkRat n₂ d₂\n[GOAL]\ncase mk.mk\nC : FloatCfg\nn d : ℕ+\ne₁ : ℤ := ↑(Nat.size ↑n) - ↑(Nat.size ↑d) - ↑prec\nd₁ n₁ : ℕ\nh₁ : Int.shift2 (↑d) (↑n) (e₁ + ↑prec) = (d₁, n₁)\ne₂ : ℤ := if n₁ < d₁ then e₁ - 1 else e₁\ne₃ : ℤ := max e₂ emin\nd₂ n₂ : ℕ\nh₂ : Int.shift2 (↑d) (↑n) (e₃ + ↑prec) = (d₂, n₂)\nr : ℚ := mkRat (↑n₂) d₂\n⊢ Float × Bool\n[PROOFSTEP]\nlet m := r.floor\n[GOAL]\ncase mk.mk\nC : FloatCfg\nn d : ℕ+\ne₁ : ℤ := ↑(Nat.size ↑n) - ↑(Nat.size ↑d) - ↑prec\nd₁ n₁ : ℕ\nh₁ : Int.shift2 (↑d) (↑n) (e₁ + ↑prec) = (d₁, n₁)\ne₂ : ℤ := if n₁ < d₁ then e₁ - 1 else e₁\ne₃ : ℤ := max e₂ emin\nd₂ n₂ : ℕ\nh₂ : Int.shift2 (↑d) (↑n) (e₃ + ↑prec) = (d₂, n₂)\nr : ℚ := mkRat (↑n₂) d₂\nm : ℤ := Rat.floor r\n⊢ Float × Bool\n[PROOFSTEP]\nrefine' (Float.finite Bool.false e₃ (Int.toNat m) _, r.den = 1)\n[GOAL]\ncase mk.mk\nC : FloatCfg\nn d : ℕ+\ne₁ : ℤ := ↑(Nat.size ↑n) - ↑(Nat.size ↑d) - ↑prec\nd₁ n₁ : ℕ\nh₁ : Int.shift2 (↑d) (↑n) (e₁ + ↑prec) = (d₁, n₁)\ne₂ : ℤ := if n₁ < d₁ then e₁ - 1 else e₁\ne₃ : ℤ := max e₂ emin\nd₂ n₂ : ℕ\nh₂ : Int.shift2 (↑d) (↑n) (e₃ + ↑prec) = (d₂, n₂)\nr : ℚ := mkRat (↑n₂) d₂\nm : ℤ := Rat.floor r\n⊢ ValidFinite e₃ (Int.toNat m)\n[PROOFSTEP]\nexact lcProof\n[GOAL]\nC : FloatCfg\ne : ℤ\nm : ℕ\nv : ValidFinite e m\nm' : ℕ := Nat.succ m\nss : Nat.size m' = Nat.size m\n⊢ ValidFinite e m'\n[PROOFSTEP]\nunfold ValidFinite at *\n[GOAL]\nC : FloatCfg\ne : ℤ\nm : ℕ\nv : emin ≤ e + ↑prec - 1 ∧ e + ↑prec - 1 ≤ ↑emax ∧ e = max (e + ↑(Nat.size m) - ↑prec) emin\nm' : ℕ := Nat.succ m\nss : Nat.size m' = Nat.size m\n⊢ emin ≤ e + ↑prec - 1 ∧ e + ↑prec - 1 ≤ ↑emax ∧ e = max (e + ↑(Nat.size m') - ↑prec) emin\n[PROOFSTEP]\nrw [ss]\n[GOAL]\nC : FloatCfg\ne : ℤ\nm : ℕ\nv : emin ≤ e + ↑prec - 1 ∧ e + ↑prec - 1 ≤ ↑emax ∧ e = max (e + ↑(Nat.size m) - ↑prec) emin\nm' : ℕ := Nat.succ m\nss : Nat.size m' = Nat.size m\n⊢ emin ≤ e + ↑prec - 1 ∧ e + ↑prec - 1 ≤ ↑emax ∧ e = max (e + ↑(Nat.size m) - ↑prec) emin\n[PROOFSTEP]\nexact v\n[GOAL]\nC : FloatCfg\ne : ℤ\nm m' : ℕ\nv : ValidFinite e (Nat.succ m')\nss : Nat.size m' = Nat.size (Nat.succ m')\n⊢ ValidFinite e m'\n[PROOFSTEP]\nunfold ValidFinite at *\n[GOAL]\nC : FloatCfg\ne : ℤ\nm m' : ℕ\nv : emin ≤ e + ↑prec - 1 ∧ e + ↑prec - 1 ≤ ↑emax ∧ e = max (e + ↑(Nat.size (Nat.succ m')) - ↑prec) emin\nss : Nat.size m' = Nat.size (Nat.succ m')\n⊢ emin ≤ e + ↑prec - 1 ∧ e + ↑prec - 1 ≤ ↑emax ∧ e = max (e + ↑(Nat.size m') - ↑prec) emin\n[PROOFSTEP]\nrw [ss]\n[GOAL]\nC : FloatCfg\ne : ℤ\nm m' : ℕ\nv : emin ≤ e + ↑prec - 1 ∧ e + ↑prec - 1 ≤ ↑emax ∧ e = max (e + ↑(Nat.size (Nat.succ m')) - ↑prec) emin\nss : Nat.size m' = Nat.size (Nat.succ m')\n⊢ emin ≤ e + ↑prec - 1 ∧ e + ↑prec - 1 ≤ ↑emax ∧ e = max (e + ↑(Nat.size (Nat.succ m')) - ↑prec) emin\n[PROOFSTEP]\nexact v\n", "meta": {"mathlib_filename": "Mathlib.Data.FP.Basic", "llama_tokens": 3265, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8791467548438126, "lm_q2_score": 0.5774953651858117, "lm_q1q2_score": 0.5077031762404488}}
{"text": "[GOAL]\nM : Type u_1\ninst✝ : MulOneClass M\na b : M\nh : 1 * a = b\n⊢ a = b\n[PROOFSTEP]\nrwa [one_mul] at h \n", "meta": {"mathlib_filename": "Mathlib.Tactic.Linarith.Preprocessing", "llama_tokens": 59, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES\n\n", "lm_q1_score": 0.7879311956428946, "lm_q2_score": 0.6442251133170356, "lm_q1q2_score": 0.5076050637990711}}
{"text": "[GOAL]\nV : Type u_1\ninst✝² : NormedAddCommGroup V\ninst✝¹ : InnerProductSpace ℝ V\ninst✝ : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y z : V\nhxyne : x ≠ y\nhxzne : x ≠ z\nhxy : ‖x‖ = ‖y‖\nhxz : ‖x‖ = ‖z‖\n⊢ oangle o y z = 2 • oangle o (y - x) (z - x)\n[PROOFSTEP]\nhave hy : y ≠ 0 := by\n  rintro rfl\n  rw [norm_zero, norm_eq_zero] at hxy \n  exact hxyne hxy\n[GOAL]\nV : Type u_1\ninst✝² : NormedAddCommGroup V\ninst✝¹ : InnerProductSpace ℝ V\ninst✝ : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y z : V\nhxyne : x ≠ y\nhxzne : x ≠ z\nhxy : ‖x‖ = ‖y‖\nhxz : ‖x‖ = ‖z‖\n⊢ y ≠ 0\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nV : Type u_1\ninst✝² : NormedAddCommGroup V\ninst✝¹ : InnerProductSpace ℝ V\ninst✝ : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx z : V\nhxzne : x ≠ z\nhxz : ‖x‖ = ‖z‖\nhxyne : x ≠ 0\nhxy : ‖x‖ = ‖0‖\n⊢ False\n[PROOFSTEP]\nrw [norm_zero, norm_eq_zero] at hxy \n[GOAL]\nV : Type u_1\ninst✝² : NormedAddCommGroup V\ninst✝¹ : InnerProductSpace ℝ V\ninst✝ : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx z : V\nhxzne : x ≠ z\nhxz : ‖x‖ = ‖z‖\nhxyne : x ≠ 0\nhxy : x = 0\n⊢ False\n[PROOFSTEP]\nexact hxyne hxy\n[GOAL]\nV : Type u_1\ninst✝² : NormedAddCommGroup V\ninst✝¹ : InnerProductSpace ℝ V\ninst✝ : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y z : V\nhxyne : x ≠ y\nhxzne : x ≠ z\nhxy : ‖x‖ = ‖y‖\nhxz : ‖x‖ = ‖z‖\nhy : y ≠ 0\n⊢ oangle o y z = 2 • oangle o (y - x) (z - x)\n[PROOFSTEP]\nhave hx : x ≠ 0 := norm_ne_zero_iff.1 (hxy.symm ▸ norm_ne_zero_iff.2 hy)\n[GOAL]\nV : Type u_1\ninst✝² : NormedAddCommGroup V\ninst✝¹ : InnerProductSpace ℝ V\ninst✝ : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y z : V\nhxyne : x ≠ y\nhxzne : x ≠ z\nhxy : ‖x‖ = ‖y‖\nhxz : ‖x‖ = ‖z‖\nhy : y ≠ 0\nhx : x ≠ 0\n⊢ oangle o y z = 2 • oangle o (y - x) (z - x)\n[PROOFSTEP]\nhave hz : z ≠ 0 := norm_ne_zero_iff.1 (hxz ▸ norm_ne_zero_iff.2 hx)\n[GOAL]\nV : Type u_1\ninst✝² : NormedAddCommGroup V\ninst✝¹ : InnerProductSpace ℝ V\ninst✝ : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y z : V\nhxyne : x ≠ y\nhxzne : x ≠ z\nhxy : ‖x‖ = ‖y‖\nhxz : ‖x‖ = ‖z‖\nhy : y ≠ 0\nhx : x ≠ 0\nhz : z ≠ 0\n⊢ oangle o y z = 2 • oangle o (y - x) (z - x)\n[PROOFSTEP]\ncalc\n  o.oangle y z = o.oangle x z - o.oangle x y := (o.oangle_sub_left hx hy hz).symm\n  _ = π - (2 : ℤ) • o.oangle (x - z) x - (π - (2 : ℤ) • o.oangle (x - y) x) := by\n    rw [o.oangle_eq_pi_sub_two_zsmul_oangle_sub_of_norm_eq hxzne.symm hxz.symm,\n      o.oangle_eq_pi_sub_two_zsmul_oangle_sub_of_norm_eq hxyne.symm hxy.symm]\n  _ = (2 : ℤ) • (o.oangle (x - y) x - o.oangle (x - z) x) := by abel\n  _ = (2 : ℤ) • o.oangle (x - y) (x - z) := by\n    rw [o.oangle_sub_right (sub_ne_zero_of_ne hxyne) (sub_ne_zero_of_ne hxzne) hx]\n  _ = (2 : ℤ) • o.oangle (y - x) (z - x) := by rw [← oangle_neg_neg, neg_sub, neg_sub]\n[GOAL]\nV : Type u_1\ninst✝² : NormedAddCommGroup V\ninst✝¹ : InnerProductSpace ℝ V\ninst✝ : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y z : V\nhxyne : x ≠ y\nhxzne : x ≠ z\nhxy : ‖x‖ = ‖y‖\nhxz : ‖x‖ = ‖z‖\nhy : y ≠ 0\nhx : x ≠ 0\nhz : z ≠ 0\n⊢ oangle o x z - oangle o x y = ↑π - 2 • oangle o (x - z) x - (↑π - 2 • oangle o (x - y) x)\n[PROOFSTEP]\nrw [o.oangle_eq_pi_sub_two_zsmul_oangle_sub_of_norm_eq hxzne.symm hxz.symm,\n  o.oangle_eq_pi_sub_two_zsmul_oangle_sub_of_norm_eq hxyne.symm hxy.symm]\n[GOAL]\nV : Type u_1\ninst✝² : NormedAddCommGroup V\ninst✝¹ : InnerProductSpace ℝ V\ninst✝ : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y z : V\nhxyne : x ≠ y\nhxzne : x ≠ z\nhxy : ‖x‖ = ‖y‖\nhxz : ‖x‖ = ‖z‖\nhy : y ≠ 0\nhx : x ≠ 0\nhz : z ≠ 0\n⊢ ↑π - 2 • oangle o (x - z) x - (↑π - 2 • oangle o (x - y) x) = 2 • (oangle o (x - y) x - oangle o (x - z) x)\n[PROOFSTEP]\nabel\n[GOAL]\nV : Type u_1\ninst✝² : NormedAddCommGroup V\ninst✝¹ : InnerProductSpace ℝ V\ninst✝ : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y z : V\nhxyne : x ≠ y\nhxzne : x ≠ z\nhxy : ‖x‖ = ‖y‖\nhxz : ‖x‖ = ‖z‖\nhy : y ≠ 0\nhx : x ≠ 0\nhz : z ≠ 0\n⊢ ↑π - 2 • oangle o (x - z) x - (↑π - 2 • oangle o (x - y) x) = 2 • (oangle o (x - y) x - oangle o (x - z) x)\n[PROOFSTEP]\nabel\n[GOAL]\nV : Type u_1\ninst✝² : NormedAddCommGroup V\ninst✝¹ : InnerProductSpace ℝ V\ninst✝ : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y z : V\nhxyne : x ≠ y\nhxzne : x ≠ z\nhxy : ‖x‖ = ‖y‖\nhxz : ‖x‖ = ‖z‖\nhy : y ≠ 0\nhx : x ≠ 0\nhz : z ≠ 0\n⊢ 2 • (oangle o (x - y) x - oangle o (x - z) x) = 2 • oangle o (x - y) (x - z)\n[PROOFSTEP]\nrw [o.oangle_sub_right (sub_ne_zero_of_ne hxyne) (sub_ne_zero_of_ne hxzne) hx]\n[GOAL]\nV : Type u_1\ninst✝² : NormedAddCommGroup V\ninst✝¹ : InnerProductSpace ℝ V\ninst✝ : Fact (finrank ℝ V = 2)\no : Orientation ℝ V (Fin 2)\nx y z : V\nhxyne : x ≠ y\nhxzne : x ≠ z\nhxy : ‖x‖ = ‖y‖\nhxz : ‖x‖ = ‖z‖\nhy : y ≠ 0\nhx : x ≠ 0\nhz : z ≠ 0\n⊢ 2 • oangle o (x - y) (x - z) = 2 • oangle o (y - x) (z - x)\n[PROOFSTEP]\nrw [← oangle_neg_neg, neg_sub, neg_sub]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\ns : Sphere P\np₁ p₂ p₃ : P\nhp₁ : p₁ ∈ s\nhp₂ : p₂ ∈ s\nhp₃ : p₃ ∈ s\nhp₂p₁ : p₂ ≠ p₁\nhp₂p₃ : p₂ ≠ p₃\n⊢ ∡ p₁ s.center p₃ = 2 • ∡ p₁ p₂ p₃\n[PROOFSTEP]\nrw [mem_sphere, @dist_eq_norm_vsub V] at hp₁ hp₂ hp₃ \n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\ns : Sphere P\np₁ p₂ p₃ : P\nhp₁ : ‖p₁ -ᵥ s.center‖ = s.radius\nhp₂ : ‖p₂ -ᵥ s.center‖ = s.radius\nhp₃ : ‖p₃ -ᵥ s.center‖ = s.radius\nhp₂p₁ : p₂ ≠ p₁\nhp₂p₃ : p₂ ≠ p₃\n⊢ ∡ p₁ s.center p₃ = 2 • ∡ p₁ p₂ p₃\n[PROOFSTEP]\nrw [oangle, oangle, o.oangle_eq_two_zsmul_oangle_sub_of_norm_eq_real _ _ hp₂ hp₁ hp₃]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\ns : Sphere P\np₁ p₂ p₃ : P\nhp₁ : ‖p₁ -ᵥ s.center‖ = s.radius\nhp₂ : ‖p₂ -ᵥ s.center‖ = s.radius\nhp₃ : ‖p₃ -ᵥ s.center‖ = s.radius\nhp₂p₁ : p₂ ≠ p₁\nhp₂p₃ : p₂ ≠ p₃\n⊢ 2 • Orientation.oangle o (p₁ -ᵥ s.center - (p₂ -ᵥ s.center)) (p₃ -ᵥ s.center - (p₂ -ᵥ s.center)) =\n    2 • Orientation.oangle o (p₁ -ᵥ p₂) (p₃ -ᵥ p₂)\n[PROOFSTEP]\nsimp [hp₂p₁, hp₂p₃]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\ns : Sphere P\np₁ p₂ p₃ : P\nhp₁ : ‖p₁ -ᵥ s.center‖ = s.radius\nhp₂ : ‖p₂ -ᵥ s.center‖ = s.radius\nhp₃ : ‖p₃ -ᵥ s.center‖ = s.radius\nhp₂p₁ : p₂ ≠ p₁\nhp₂p₃ : p₂ ≠ p₃\n⊢ p₂ -ᵥ s.center ≠ p₁ -ᵥ s.center\n[PROOFSTEP]\nsimp [hp₂p₁, hp₂p₃]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\ns : Sphere P\np₁ p₂ p₃ : P\nhp₁ : ‖p₁ -ᵥ s.center‖ = s.radius\nhp₂ : ‖p₂ -ᵥ s.center‖ = s.radius\nhp₃ : ‖p₃ -ᵥ s.center‖ = s.radius\nhp₂p₁ : p₂ ≠ p₁\nhp₂p₃ : p₂ ≠ p₃\n⊢ p₂ -ᵥ s.center ≠ p₃ -ᵥ s.center\n[PROOFSTEP]\nsimp [hp₂p₁, hp₂p₃]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\ns : Sphere P\np₁ p₂ p₃ p₄ : P\nhp₁ : p₁ ∈ s\nhp₂ : p₂ ∈ s\nhp₃ : p₃ ∈ s\nhp₄ : p₄ ∈ s\nhp₂p₁ : p₂ ≠ p₁\nhp₂p₄ : p₂ ≠ p₄\nhp₃p₁ : p₃ ≠ p₁\nhp₃p₄ : p₃ ≠ p₄\n⊢ 2 • ∡ p₁ p₂ p₄ = 2 • ∡ p₁ p₃ p₄\n[PROOFSTEP]\nrw [mem_sphere, @dist_eq_norm_vsub V] at hp₁ hp₂ hp₃ hp₄ \n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\ns : Sphere P\np₁ p₂ p₃ p₄ : P\nhp₁ : ‖p₁ -ᵥ s.center‖ = s.radius\nhp₂ : ‖p₂ -ᵥ s.center‖ = s.radius\nhp₃ : ‖p₃ -ᵥ s.center‖ = s.radius\nhp₄ : ‖p₄ -ᵥ s.center‖ = s.radius\nhp₂p₁ : p₂ ≠ p₁\nhp₂p₄ : p₂ ≠ p₄\nhp₃p₁ : p₃ ≠ p₁\nhp₃p₄ : p₃ ≠ p₄\n⊢ 2 • ∡ p₁ p₂ p₄ = 2 • ∡ p₁ p₃ p₄\n[PROOFSTEP]\nrw [oangle, oangle, ← vsub_sub_vsub_cancel_right p₁ p₂ s.center, ← vsub_sub_vsub_cancel_right p₄ p₂ s.center,\n  o.two_zsmul_oangle_sub_eq_two_zsmul_oangle_sub_of_norm_eq _ _ _ _ hp₂ hp₃ hp₁ hp₄]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\ns : Sphere P\np₁ p₂ p₃ p₄ : P\nhp₁ : ‖p₁ -ᵥ s.center‖ = s.radius\nhp₂ : ‖p₂ -ᵥ s.center‖ = s.radius\nhp₃ : ‖p₃ -ᵥ s.center‖ = s.radius\nhp₄ : ‖p₄ -ᵥ s.center‖ = s.radius\nhp₂p₁ : p₂ ≠ p₁\nhp₂p₄ : p₂ ≠ p₄\nhp₃p₁ : p₃ ≠ p₁\nhp₃p₄ : p₃ ≠ p₄\n⊢ 2 • Orientation.oangle o (p₁ -ᵥ s.center - (p₃ -ᵥ s.center)) (p₄ -ᵥ s.center - (p₃ -ᵥ s.center)) =\n    2 • Orientation.oangle o (p₁ -ᵥ p₃) (p₄ -ᵥ p₃)\n[PROOFSTEP]\nsimp [hp₂p₁, hp₂p₄, hp₃p₁, hp₃p₄]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\ns : Sphere P\np₁ p₂ p₃ p₄ : P\nhp₁ : ‖p₁ -ᵥ s.center‖ = s.radius\nhp₂ : ‖p₂ -ᵥ s.center‖ = s.radius\nhp₃ : ‖p₃ -ᵥ s.center‖ = s.radius\nhp₄ : ‖p₄ -ᵥ s.center‖ = s.radius\nhp₂p₁ : p₂ ≠ p₁\nhp₂p₄ : p₂ ≠ p₄\nhp₃p₁ : p₃ ≠ p₁\nhp₃p₄ : p₃ ≠ p₄\n⊢ p₂ -ᵥ s.center ≠ p₁ -ᵥ s.center\n[PROOFSTEP]\nsimp [hp₂p₁, hp₂p₄, hp₃p₁, hp₃p₄]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\ns : Sphere P\np₁ p₂ p₃ p₄ : P\nhp₁ : ‖p₁ -ᵥ s.center‖ = s.radius\nhp₂ : ‖p₂ -ᵥ s.center‖ = s.radius\nhp₃ : ‖p₃ -ᵥ s.center‖ = s.radius\nhp₄ : ‖p₄ -ᵥ s.center‖ = s.radius\nhp₂p₁ : p₂ ≠ p₁\nhp₂p₄ : p₂ ≠ p₄\nhp₃p₁ : p₃ ≠ p₁\nhp₃p₄ : p₃ ≠ p₄\n⊢ p₂ -ᵥ s.center ≠ p₄ -ᵥ s.center\n[PROOFSTEP]\nsimp [hp₂p₁, hp₂p₄, hp₃p₁, hp₃p₄]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\ns : Sphere P\np₁ p₂ p₃ p₄ : P\nhp₁ : ‖p₁ -ᵥ s.center‖ = s.radius\nhp₂ : ‖p₂ -ᵥ s.center‖ = s.radius\nhp₃ : ‖p₃ -ᵥ s.center‖ = s.radius\nhp₄ : ‖p₄ -ᵥ s.center‖ = s.radius\nhp₂p₁ : p₂ ≠ p₁\nhp₂p₄ : p₂ ≠ p₄\nhp₃p₁ : p₃ ≠ p₁\nhp₃p₄ : p₃ ≠ p₄\n⊢ p₃ -ᵥ s.center ≠ p₁ -ᵥ s.center\n[PROOFSTEP]\nsimp [hp₂p₁, hp₂p₄, hp₃p₁, hp₃p₄]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\ns : Sphere P\np₁ p₂ p₃ p₄ : P\nhp₁ : ‖p₁ -ᵥ s.center‖ = s.radius\nhp₂ : ‖p₂ -ᵥ s.center‖ = s.radius\nhp₃ : ‖p₃ -ᵥ s.center‖ = s.radius\nhp₄ : ‖p₄ -ᵥ s.center‖ = s.radius\nhp₂p₁ : p₂ ≠ p₁\nhp₂p₄ : p₂ ≠ p₄\nhp₃p₁ : p₃ ≠ p₁\nhp₃p₄ : p₃ ≠ p₄\n⊢ p₃ -ᵥ s.center ≠ p₄ -ᵥ s.center\n[PROOFSTEP]\nsimp [hp₂p₁, hp₂p₄, hp₃p₁, hp₃p₄]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ : P\nh : Cospherical {p₁, p₂, p₃, p₄}\nhp₂p₁ : p₂ ≠ p₁\nhp₂p₄ : p₂ ≠ p₄\nhp₃p₁ : p₃ ≠ p₁\nhp₃p₄ : p₃ ≠ p₄\n⊢ 2 • ∡ p₁ p₂ p₄ = 2 • ∡ p₁ p₃ p₄\n[PROOFSTEP]\nobtain ⟨s, hs⟩ := cospherical_iff_exists_sphere.1 h\n[GOAL]\ncase intro\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ : P\nh : Cospherical {p₁, p₂, p₃, p₄}\nhp₂p₁ : p₂ ≠ p₁\nhp₂p₄ : p₂ ≠ p₄\nhp₃p₁ : p₃ ≠ p₁\nhp₃p₄ : p₃ ≠ p₄\ns : Sphere P\nhs : {p₁, p₂, p₃, p₄} ⊆ Metric.sphere s.center s.radius\n⊢ 2 • ∡ p₁ p₂ p₄ = 2 • ∡ p₁ p₃ p₄\n[PROOFSTEP]\nsimp_rw [Set.insert_subset_iff, Set.singleton_subset_iff, Sphere.mem_coe] at hs \n[GOAL]\ncase intro\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ : P\nh : Cospherical {p₁, p₂, p₃, p₄}\nhp₂p₁ : p₂ ≠ p₁\nhp₂p₄ : p₂ ≠ p₄\nhp₃p₁ : p₃ ≠ p₁\nhp₃p₄ : p₃ ≠ p₄\ns : Sphere P\nhs : p₁ ∈ s ∧ p₂ ∈ s ∧ p₃ ∈ s ∧ p₄ ∈ s\n⊢ 2 • ∡ p₁ p₂ p₄ = 2 • ∡ p₁ p₃ p₄\n[PROOFSTEP]\nexact Sphere.two_zsmul_oangle_eq hs.1 hs.2.1 hs.2.2.1 hs.2.2.2 hp₂p₁ hp₂p₄ hp₃p₁ hp₃p₄\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\ns : Sphere P\np₁ p₂ : P\nhp₁ : p₁ ∈ s\nhp₂ : p₂ ∈ s\nh : p₁ ≠ p₂\n⊢ ∡ p₁ s.center p₂ = ↑π - 2 • ∡ s.center p₂ p₁\n[PROOFSTEP]\nrw [oangle_eq_pi_sub_two_zsmul_oangle_of_dist_eq h.symm (dist_center_eq_dist_center_of_mem_sphere' hp₂ hp₁)]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\ns : Sphere P\np₁ p₂ : P\nhp₁ : p₁ ∈ s\nhp₂ : p₂ ∈ s\nh : p₁ ≠ p₂\n⊢ ∡ p₁ s.center p₂ = ↑π - 2 • ∡ p₂ p₁ s.center\n[PROOFSTEP]\nrw [oangle_eq_pi_sub_two_zsmul_oangle_center_left hp₁ hp₂ h,\n  oangle_eq_oangle_of_dist_eq (dist_center_eq_dist_center_of_mem_sphere' hp₂ hp₁)]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\ns : Sphere P\np₁ p₂ p₃ : P\nhp₁ : p₁ ∈ s\nhp₂ : p₂ ∈ s\nhp₃ : p₃ ∈ s\nhp₂p₁ : p₂ ≠ p₁\nhp₂p₃ : p₂ ≠ p₃\nhp₁p₃ : p₁ ≠ p₃\n⊢ 2 • ∡ p₃ p₁ s.center + 2 • ∡ p₁ p₂ p₃ = ↑π\n[PROOFSTEP]\nrw [← oangle_center_eq_two_zsmul_oangle hp₁ hp₂ hp₃ hp₂p₁ hp₂p₃,\n  oangle_eq_pi_sub_two_zsmul_oangle_center_right hp₁ hp₃ hp₁p₃, add_sub_cancel'_right]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\ns : Sphere P\np₁ p₂ : P\nhp₁ : p₁ ∈ s\nhp₂ : p₂ ∈ s\nh : p₁ ≠ p₂\n⊢ (Real.Angle.tan (∡ p₂ p₁ s.center) / 2) • ↑(Orientation.rotation o ↑(π / 2)) (p₂ -ᵥ p₁) +ᵥ midpoint ℝ p₁ p₂ = s.center\n[PROOFSTEP]\nobtain ⟨r, hr⟩ :=\n  (dist_eq_iff_eq_smul_rotation_pi_div_two_vadd_midpoint h).1 (dist_center_eq_dist_center_of_mem_sphere hp₁ hp₂)\n[GOAL]\ncase intro\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\ns : Sphere P\np₁ p₂ : P\nhp₁ : p₁ ∈ s\nhp₂ : p₂ ∈ s\nh : p₁ ≠ p₂\nr : ℝ\nhr : r • ↑(Orientation.rotation o ↑(π / 2)) (p₂ -ᵥ p₁) +ᵥ midpoint ℝ p₁ p₂ = s.center\n⊢ (Real.Angle.tan (∡ p₂ p₁ s.center) / 2) • ↑(Orientation.rotation o ↑(π / 2)) (p₂ -ᵥ p₁) +ᵥ midpoint ℝ p₁ p₂ = s.center\n[PROOFSTEP]\nrw [← hr, ← oangle_midpoint_rev_left, oangle, vadd_vsub_assoc]\n[GOAL]\ncase intro\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\ns : Sphere P\np₁ p₂ : P\nhp₁ : p₁ ∈ s\nhp₂ : p₂ ∈ s\nh : p₁ ≠ p₂\nr : ℝ\nhr : r • ↑(Orientation.rotation o ↑(π / 2)) (p₂ -ᵥ p₁) +ᵥ midpoint ℝ p₁ p₂ = s.center\n⊢ (Real.Angle.tan\n            (Orientation.oangle o (midpoint ℝ p₁ p₂ -ᵥ p₁)\n              (r • ↑(Orientation.rotation o ↑(π / 2)) (p₂ -ᵥ p₁) + (midpoint ℝ p₁ p₂ -ᵥ p₁))) /\n          2) •\n        ↑(Orientation.rotation o ↑(π / 2)) (p₂ -ᵥ p₁) +ᵥ\n      midpoint ℝ p₁ p₂ =\n    r • ↑(Orientation.rotation o ↑(π / 2)) (p₂ -ᵥ p₁) +ᵥ midpoint ℝ p₁ p₂\n[PROOFSTEP]\nnth_rw 1 [show p₂ -ᵥ p₁ = (2 : ℝ) • (midpoint ℝ p₁ p₂ -ᵥ p₁) by simp]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\ns : Sphere P\np₁ p₂ : P\nhp₁ : p₁ ∈ s\nhp₂ : p₂ ∈ s\nh : p₁ ≠ p₂\nr : ℝ\nhr : r • ↑(Orientation.rotation o ↑(π / 2)) (p₂ -ᵥ p₁) +ᵥ midpoint ℝ p₁ p₂ = s.center\n⊢ p₂ -ᵥ p₁ = 2 • (midpoint ℝ p₁ p₂ -ᵥ p₁)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase intro\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\ns : Sphere P\np₁ p₂ : P\nhp₁ : p₁ ∈ s\nhp₂ : p₂ ∈ s\nh : p₁ ≠ p₂\nr : ℝ\nhr : r • ↑(Orientation.rotation o ↑(π / 2)) (p₂ -ᵥ p₁) +ᵥ midpoint ℝ p₁ p₂ = s.center\n⊢ (Real.Angle.tan\n            (Orientation.oangle o (midpoint ℝ p₁ p₂ -ᵥ p₁)\n              (r • ↑(Orientation.rotation o ↑(π / 2)) (2 • (midpoint ℝ p₁ p₂ -ᵥ p₁)) + (midpoint ℝ p₁ p₂ -ᵥ p₁))) /\n          2) •\n        ↑(Orientation.rotation o ↑(π / 2)) (p₂ -ᵥ p₁) +ᵥ\n      midpoint ℝ p₁ p₂ =\n    r • ↑(Orientation.rotation o ↑(π / 2)) (p₂ -ᵥ p₁) +ᵥ midpoint ℝ p₁ p₂\n[PROOFSTEP]\nrw [map_smul, smul_smul, add_comm, o.tan_oangle_add_right_smul_rotation_pi_div_two, mul_div_cancel _ (two_ne_zero' ℝ)]\n[GOAL]\ncase intro.h\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\ns : Sphere P\np₁ p₂ : P\nhp₁ : p₁ ∈ s\nhp₂ : p₂ ∈ s\nh : p₁ ≠ p₂\nr : ℝ\nhr : r • ↑(Orientation.rotation o ↑(π / 2)) (p₂ -ᵥ p₁) +ᵥ midpoint ℝ p₁ p₂ = s.center\n⊢ midpoint ℝ p₁ p₂ -ᵥ p₁ ≠ 0\n[PROOFSTEP]\nsimpa using h.symm\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\ns : Sphere P\np₁ p₂ p₃ : P\nhp₁ : p₁ ∈ s\nhp₂ : p₂ ∈ s\nhp₃ : p₃ ∈ s\nhp₁p₂ : p₁ ≠ p₂\nhp₁p₃ : p₁ ≠ p₃\nhp₂p₃ : p₂ ≠ p₃\n⊢ ((Real.Angle.tan (∡ p₁ p₂ p₃))⁻¹ / 2) • ↑(Orientation.rotation o ↑(π / 2)) (p₃ -ᵥ p₁) +ᵥ midpoint ℝ p₁ p₃ = s.center\n[PROOFSTEP]\nconvert tan_div_two_smul_rotation_pi_div_two_vadd_midpoint_eq_center hp₁ hp₃ hp₁p₃\n[GOAL]\ncase h.e'_2.h.e'_5.h.e'_5.h.e'_5\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\ns : Sphere P\np₁ p₂ p₃ : P\nhp₁ : p₁ ∈ s\nhp₂ : p₂ ∈ s\nhp₃ : p₃ ∈ s\nhp₁p₂ : p₁ ≠ p₂\nhp₁p₃ : p₁ ≠ p₃\nhp₂p₃ : p₂ ≠ p₃\n⊢ (Real.Angle.tan (∡ p₁ p₂ p₃))⁻¹ = Real.Angle.tan (∡ p₃ p₁ s.center)\n[PROOFSTEP]\nconvert (Real.Angle.tan_eq_inv_of_two_zsmul_add_two_zsmul_eq_pi _).symm\n[GOAL]\ncase h.e'_2.h.e'_5.h.e'_5.h.e'_5.convert_3\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\ns : Sphere P\np₁ p₂ p₃ : P\nhp₁ : p₁ ∈ s\nhp₂ : p₂ ∈ s\nhp₃ : p₃ ∈ s\nhp₁p₂ : p₁ ≠ p₂\nhp₁p₃ : p₁ ≠ p₃\nhp₂p₃ : p₂ ≠ p₃\n⊢ 2 • ∡ p₁ p₂ p₃ + 2 • ∡ p₃ p₁ s.center = ↑π\n[PROOFSTEP]\nrw [add_comm, two_zsmul_oangle_center_add_two_zsmul_oangle_eq_pi hp₁ hp₂ hp₃ hp₁p₂.symm hp₂p₃ hp₁p₃]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\ns : Sphere P\np₁ p₂ : P\nhp₁ : p₁ ∈ s\nhp₂ : p₂ ∈ s\nh : p₁ ≠ p₂\n⊢ dist p₁ p₂ / Real.Angle.cos (∡ p₂ p₁ s.center) / 2 = s.radius\n[PROOFSTEP]\nrw [div_right_comm, div_eq_mul_inv _ (2 : ℝ), mul_comm,\n  show (2 : ℝ)⁻¹ * dist p₁ p₂ = dist p₁ (midpoint ℝ p₁ p₂) by simp, ← mem_sphere.1 hp₁, ←\n  tan_div_two_smul_rotation_pi_div_two_vadd_midpoint_eq_center hp₁ hp₂ h, ← oangle_midpoint_rev_left, oangle,\n  vadd_vsub_assoc, show p₂ -ᵥ p₁ = (2 : ℝ) • (midpoint ℝ p₁ p₂ -ᵥ p₁) by simp, map_smul, smul_smul,\n  div_mul_cancel _ (two_ne_zero' ℝ), @dist_eq_norm_vsub' V, @dist_eq_norm_vsub' V, vadd_vsub_assoc, add_comm,\n  o.oangle_add_right_smul_rotation_pi_div_two, Real.Angle.cos_coe, Real.cos_arctan]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\ns : Sphere P\np₁ p₂ : P\nhp₁ : p₁ ∈ s\nhp₂ : p₂ ∈ s\nh : p₁ ≠ p₂\n⊢ 2⁻¹ * dist p₁ p₂ = dist p₁ (midpoint ℝ p₁ p₂)\n[PROOFSTEP]\nsimp\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\ns : Sphere P\np₁ p₂ : P\nhp₁ : p₁ ∈ s\nhp₂ : p₂ ∈ s\nh : p₁ ≠ p₂\n⊢ p₂ -ᵥ p₁ = 2 • (midpoint ℝ p₁ p₂ -ᵥ p₁)\n[PROOFSTEP]\nsimp\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\ns : Sphere P\np₁ p₂ : P\nhp₁ : p₁ ∈ s\nhp₂ : p₂ ∈ s\nh : p₁ ≠ p₂\n⊢ ‖midpoint ℝ p₁ p₂ -ᵥ p₁‖ / (↑1 / Real.sqrt (↑1 + Real.Angle.tan (∡ p₂ p₁ s.center) ^ 2)) =\n    ‖midpoint ℝ p₁ p₂ -ᵥ p₁ +\n        Real.Angle.tan (∡ p₂ p₁ s.center) • ↑(Orientation.rotation o ↑(π / 2)) (midpoint ℝ p₁ p₂ -ᵥ p₁)‖\ncase h\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\ns : Sphere P\np₁ p₂ : P\nhp₁ : p₁ ∈ s\nhp₂ : p₂ ∈ s\nh : p₁ ≠ p₂\n⊢ midpoint ℝ p₁ p₂ -ᵥ p₁ ≠ 0\n[PROOFSTEP]\nnorm_cast\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\ns : Sphere P\np₁ p₂ : P\nhp₁ : p₁ ∈ s\nhp₂ : p₂ ∈ s\nh : p₁ ≠ p₂\n⊢ ‖midpoint ℝ p₁ p₂ -ᵥ p₁‖ / (1 / Real.sqrt (1 + Real.Angle.tan (∡ p₂ p₁ s.center) ^ 2)) =\n    ‖midpoint ℝ p₁ p₂ -ᵥ p₁ +\n        Real.Angle.tan (∡ p₂ p₁ s.center) • ↑(Orientation.rotation o ↑(π / 2)) (midpoint ℝ p₁ p₂ -ᵥ p₁)‖\ncase h\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\ns : Sphere P\np₁ p₂ : P\nhp₁ : p₁ ∈ s\nhp₂ : p₂ ∈ s\nh : p₁ ≠ p₂\n⊢ midpoint ℝ p₁ p₂ -ᵥ p₁ ≠ 0\n[PROOFSTEP]\nrw [one_div, div_inv_eq_mul, ← mul_self_inj (mul_nonneg (norm_nonneg _) (Real.sqrt_nonneg _)) (norm_nonneg _),\n  norm_add_sq_eq_norm_sq_add_norm_sq_real (o.inner_smul_rotation_pi_div_two_right _ _), ← mul_assoc, mul_comm,\n  mul_comm _ (Real.sqrt _), ← mul_assoc, ← mul_assoc, Real.mul_self_sqrt (add_nonneg zero_le_one (sq_nonneg _)),\n  norm_smul, LinearIsometryEquiv.norm_map]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\ns : Sphere P\np₁ p₂ : P\nhp₁ : p₁ ∈ s\nhp₂ : p₂ ∈ s\nh : p₁ ≠ p₂\n⊢ (1 + Real.Angle.tan (∡ p₂ p₁ s.center) ^ 2) * ‖midpoint ℝ p₁ p₂ -ᵥ p₁‖ * ‖midpoint ℝ p₁ p₂ -ᵥ p₁‖ =\n    ‖midpoint ℝ p₁ p₂ -ᵥ p₁‖ * ‖midpoint ℝ p₁ p₂ -ᵥ p₁‖ +\n      ‖Real.Angle.tan (∡ p₂ p₁ s.center)‖ * ‖midpoint ℝ p₁ p₂ -ᵥ p₁‖ *\n        (‖Real.Angle.tan (∡ p₂ p₁ s.center)‖ * ‖midpoint ℝ p₁ p₂ -ᵥ p₁‖)\ncase h\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\ns : Sphere P\np₁ p₂ : P\nhp₁ : p₁ ∈ s\nhp₂ : p₂ ∈ s\nh : p₁ ≠ p₂\n⊢ midpoint ℝ p₁ p₂ -ᵥ p₁ ≠ 0\n[PROOFSTEP]\nswap\n[GOAL]\ncase h\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\ns : Sphere P\np₁ p₂ : P\nhp₁ : p₁ ∈ s\nhp₂ : p₂ ∈ s\nh : p₁ ≠ p₂\n⊢ midpoint ℝ p₁ p₂ -ᵥ p₁ ≠ 0\n[PROOFSTEP]\nsimpa using h.symm\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\ns : Sphere P\np₁ p₂ : P\nhp₁ : p₁ ∈ s\nhp₂ : p₂ ∈ s\nh : p₁ ≠ p₂\n⊢ (1 + Real.Angle.tan (∡ p₂ p₁ s.center) ^ 2) * ‖midpoint ℝ p₁ p₂ -ᵥ p₁‖ * ‖midpoint ℝ p₁ p₂ -ᵥ p₁‖ =\n    ‖midpoint ℝ p₁ p₂ -ᵥ p₁‖ * ‖midpoint ℝ p₁ p₂ -ᵥ p₁‖ +\n      ‖Real.Angle.tan (∡ p₂ p₁ s.center)‖ * ‖midpoint ℝ p₁ p₂ -ᵥ p₁‖ *\n        (‖Real.Angle.tan (∡ p₂ p₁ s.center)‖ * ‖midpoint ℝ p₁ p₂ -ᵥ p₁‖)\n[PROOFSTEP]\nconv_rhs => rw [← mul_assoc, mul_comm _ ‖Real.Angle.tan _‖, ← mul_assoc, Real.norm_eq_abs, abs_mul_abs_self]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\ns : Sphere P\np₁ p₂ : P\nhp₁ : p₁ ∈ s\nhp₂ : p₂ ∈ s\nh : p₁ ≠ p₂\n| ‖midpoint ℝ p₁ p₂ -ᵥ p₁‖ * ‖midpoint ℝ p₁ p₂ -ᵥ p₁‖ +\n    ‖Real.Angle.tan (∡ p₂ p₁ s.center)‖ * ‖midpoint ℝ p₁ p₂ -ᵥ p₁‖ *\n      (‖Real.Angle.tan (∡ p₂ p₁ s.center)‖ * ‖midpoint ℝ p₁ p₂ -ᵥ p₁‖)\n[PROOFSTEP]\nrw [← mul_assoc, mul_comm _ ‖Real.Angle.tan _‖, ← mul_assoc, Real.norm_eq_abs, abs_mul_abs_self]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\ns : Sphere P\np₁ p₂ : P\nhp₁ : p₁ ∈ s\nhp₂ : p₂ ∈ s\nh : p₁ ≠ p₂\n| ‖midpoint ℝ p₁ p₂ -ᵥ p₁‖ * ‖midpoint ℝ p₁ p₂ -ᵥ p₁‖ +\n    ‖Real.Angle.tan (∡ p₂ p₁ s.center)‖ * ‖midpoint ℝ p₁ p₂ -ᵥ p₁‖ *\n      (‖Real.Angle.tan (∡ p₂ p₁ s.center)‖ * ‖midpoint ℝ p₁ p₂ -ᵥ p₁‖)\n[PROOFSTEP]\nrw [← mul_assoc, mul_comm _ ‖Real.Angle.tan _‖, ← mul_assoc, Real.norm_eq_abs, abs_mul_abs_self]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\ns : Sphere P\np₁ p₂ : P\nhp₁ : p₁ ∈ s\nhp₂ : p₂ ∈ s\nh : p₁ ≠ p₂\n| ‖midpoint ℝ p₁ p₂ -ᵥ p₁‖ * ‖midpoint ℝ p₁ p₂ -ᵥ p₁‖ +\n    ‖Real.Angle.tan (∡ p₂ p₁ s.center)‖ * ‖midpoint ℝ p₁ p₂ -ᵥ p₁‖ *\n      (‖Real.Angle.tan (∡ p₂ p₁ s.center)‖ * ‖midpoint ℝ p₁ p₂ -ᵥ p₁‖)\n[PROOFSTEP]\nrw [← mul_assoc, mul_comm _ ‖Real.Angle.tan _‖, ← mul_assoc, Real.norm_eq_abs, abs_mul_abs_self]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\ns : Sphere P\np₁ p₂ : P\nhp₁ : p₁ ∈ s\nhp₂ : p₂ ∈ s\nh : p₁ ≠ p₂\n⊢ (1 + Real.Angle.tan (∡ p₂ p₁ s.center) ^ 2) * ‖midpoint ℝ p₁ p₂ -ᵥ p₁‖ * ‖midpoint ℝ p₁ p₂ -ᵥ p₁‖ =\n    ‖midpoint ℝ p₁ p₂ -ᵥ p₁‖ * ‖midpoint ℝ p₁ p₂ -ᵥ p₁‖ +\n      Real.Angle.tan (∡ p₂ p₁ s.center) * Real.Angle.tan (∡ p₂ p₁ s.center) * ‖midpoint ℝ p₁ p₂ -ᵥ p₁‖ *\n        ‖midpoint ℝ p₁ p₂ -ᵥ p₁‖\n[PROOFSTEP]\nring\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\ns : Sphere P\np₁ p₂ : P\nhp₁ : p₁ ∈ s\nhp₂ : p₂ ∈ s\nh : p₁ ≠ p₂\n⊢ dist p₁ p₂ / Real.Angle.cos (∡ p₂ p₁ s.center) = 2 * s.radius\n[PROOFSTEP]\nrw [← dist_div_cos_oangle_center_div_two_eq_radius hp₁ hp₂ h, mul_div_cancel' _ (two_ne_zero' ℝ)]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\ns : Sphere P\np₁ p₂ p₃ : P\nhp₁ : p₁ ∈ s\nhp₂ : p₂ ∈ s\nhp₃ : p₃ ∈ s\nhp₁p₂ : p₁ ≠ p₂\nhp₁p₃ : p₁ ≠ p₃\nhp₂p₃ : p₂ ≠ p₃\n⊢ dist p₁ p₃ / |Real.Angle.sin (∡ p₁ p₂ p₃)| / 2 = s.radius\n[PROOFSTEP]\nconvert dist_div_cos_oangle_center_div_two_eq_radius hp₁ hp₃ hp₁p₃\n[GOAL]\ncase h.e'_2.h.e'_5.h.e'_6\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\ns : Sphere P\np₁ p₂ p₃ : P\nhp₁ : p₁ ∈ s\nhp₂ : p₂ ∈ s\nhp₃ : p₃ ∈ s\nhp₁p₂ : p₁ ≠ p₂\nhp₁p₃ : p₁ ≠ p₃\nhp₂p₃ : p₂ ≠ p₃\n⊢ |Real.Angle.sin (∡ p₁ p₂ p₃)| = Real.Angle.cos (∡ p₃ p₁ s.center)\n[PROOFSTEP]\nrw [←\n  Real.Angle.abs_cos_eq_abs_sin_of_two_zsmul_add_two_zsmul_eq_pi\n    (two_zsmul_oangle_center_add_two_zsmul_oangle_eq_pi hp₁ hp₂ hp₃ hp₁p₂.symm hp₂p₃ hp₁p₃),\n  _root_.abs_of_nonneg (Real.Angle.cos_nonneg_iff_abs_toReal_le_pi_div_two.2 _)]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\ns : Sphere P\np₁ p₂ p₃ : P\nhp₁ : p₁ ∈ s\nhp₂ : p₂ ∈ s\nhp₃ : p₃ ∈ s\nhp₁p₂ : p₁ ≠ p₂\nhp₁p₃ : p₁ ≠ p₃\nhp₂p₃ : p₂ ≠ p₃\n⊢ |Real.Angle.toReal (∡ p₃ p₁ s.center)| ≤ π / 2\n[PROOFSTEP]\nexact (abs_oangle_center_right_toReal_lt_pi_div_two hp₁ hp₃).le\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\ns : Sphere P\np₁ p₂ p₃ : P\nhp₁ : p₁ ∈ s\nhp₂ : p₂ ∈ s\nhp₃ : p₃ ∈ s\nhp₁p₂ : p₁ ≠ p₂\nhp₁p₃ : p₁ ≠ p₃\nhp₂p₃ : p₂ ≠ p₃\n⊢ dist p₁ p₃ / |Real.Angle.sin (∡ p₁ p₂ p₃)| = 2 * s.radius\n[PROOFSTEP]\nrw [← dist_div_sin_oangle_div_two_eq_radius hp₁ hp₂ hp₃ hp₁p₂ hp₁p₃ hp₂p₃, mul_div_cancel' _ (two_ne_zero' ℝ)]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\nt₁ t₂ : Triangle ℝ P\ni₁ i₂ i₃ : Fin 3\nh₁₂ : i₁ ≠ i₂\nh₁₃ : i₁ ≠ i₃\nh₂₃ : i₂ ≠ i₃\nh₁ : Simplex.points t₁ i₁ = Simplex.points t₂ i₁\nh₃ : Simplex.points t₁ i₃ = Simplex.points t₂ i₃\nh₂ :\n  2 • ∡ (Simplex.points t₁ i₁) (Simplex.points t₁ i₂) (Simplex.points t₁ i₃) =\n    2 • ∡ (Simplex.points t₂ i₁) (Simplex.points t₂ i₂) (Simplex.points t₂ i₃)\n⊢ Simplex.circumsphere t₁ = Simplex.circumsphere t₂\n[PROOFSTEP]\nrw [t₁.circumsphere_eq_of_dist_of_oangle h₁₂ h₁₃ h₂₃, t₂.circumsphere_eq_of_dist_of_oangle h₁₂ h₁₃ h₂₃,\n  -- Porting note: was `congrm ⟨((_ : ℝ)⁻¹ / 2) • _ +ᵥ _, _ / _ / 2⟩` and five more linesReal.Angle.tan_eq_of_two_zsmul_eq\n    h₂,\n  Real.Angle.abs_sin_eq_of_two_zsmul_eq h₂, h₁, h₃]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\nt : Triangle ℝ P\np : P\ni₁ i₂ i₃ : Fin 3\nh₁₂ : i₁ ≠ i₂\nh₁₃ : i₁ ≠ i₃\nh₂₃ : i₂ ≠ i₃\nh :\n  2 • ∡ (Simplex.points t i₁) p (Simplex.points t i₃) =\n    2 • ∡ (Simplex.points t i₁) (Simplex.points t i₂) (Simplex.points t i₃)\n⊢ p ∈ Simplex.circumsphere t\n[PROOFSTEP]\nlet t'p : Fin 3 → P := Function.update t.points i₂ p\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\nt : Triangle ℝ P\np : P\ni₁ i₂ i₃ : Fin 3\nh₁₂ : i₁ ≠ i₂\nh₁₃ : i₁ ≠ i₃\nh₂₃ : i₂ ≠ i₃\nh :\n  2 • ∡ (Simplex.points t i₁) p (Simplex.points t i₃) =\n    2 • ∡ (Simplex.points t i₁) (Simplex.points t i₂) (Simplex.points t i₃)\nt'p : Fin 3 → P := Function.update t.points i₂ p\n⊢ p ∈ Simplex.circumsphere t\n[PROOFSTEP]\nhave h₁ : t'p i₁ = t.points i₁ := by simp [h₁₂]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\nt : Triangle ℝ P\np : P\ni₁ i₂ i₃ : Fin 3\nh₁₂ : i₁ ≠ i₂\nh₁₃ : i₁ ≠ i₃\nh₂₃ : i₂ ≠ i₃\nh :\n  2 • ∡ (Simplex.points t i₁) p (Simplex.points t i₃) =\n    2 • ∡ (Simplex.points t i₁) (Simplex.points t i₂) (Simplex.points t i₃)\nt'p : Fin 3 → P := Function.update t.points i₂ p\n⊢ t'p i₁ = Simplex.points t i₁\n[PROOFSTEP]\nsimp [h₁₂]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\nt : Triangle ℝ P\np : P\ni₁ i₂ i₃ : Fin 3\nh₁₂ : i₁ ≠ i₂\nh₁₃ : i₁ ≠ i₃\nh₂₃ : i₂ ≠ i₃\nh :\n  2 • ∡ (Simplex.points t i₁) p (Simplex.points t i₃) =\n    2 • ∡ (Simplex.points t i₁) (Simplex.points t i₂) (Simplex.points t i₃)\nt'p : Fin 3 → P := Function.update t.points i₂ p\nh₁ : t'p i₁ = Simplex.points t i₁\n⊢ p ∈ Simplex.circumsphere t\n[PROOFSTEP]\nhave h₂ : t'p i₂ = p := by simp\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\nt : Triangle ℝ P\np : P\ni₁ i₂ i₃ : Fin 3\nh₁₂ : i₁ ≠ i₂\nh₁₃ : i₁ ≠ i₃\nh₂₃ : i₂ ≠ i₃\nh :\n  2 • ∡ (Simplex.points t i₁) p (Simplex.points t i₃) =\n    2 • ∡ (Simplex.points t i₁) (Simplex.points t i₂) (Simplex.points t i₃)\nt'p : Fin 3 → P := Function.update t.points i₂ p\nh₁ : t'p i₁ = Simplex.points t i₁\n⊢ t'p i₂ = p\n[PROOFSTEP]\nsimp\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\nt : Triangle ℝ P\np : P\ni₁ i₂ i₃ : Fin 3\nh₁₂ : i₁ ≠ i₂\nh₁₃ : i₁ ≠ i₃\nh₂₃ : i₂ ≠ i₃\nh :\n  2 • ∡ (Simplex.points t i₁) p (Simplex.points t i₃) =\n    2 • ∡ (Simplex.points t i₁) (Simplex.points t i₂) (Simplex.points t i₃)\nt'p : Fin 3 → P := Function.update t.points i₂ p\nh₁ : t'p i₁ = Simplex.points t i₁\nh₂ : t'p i₂ = p\n⊢ p ∈ Simplex.circumsphere t\n[PROOFSTEP]\nhave h₃ : t'p i₃ = t.points i₃ := by simp [h₂₃.symm]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\nt : Triangle ℝ P\np : P\ni₁ i₂ i₃ : Fin 3\nh₁₂ : i₁ ≠ i₂\nh₁₃ : i₁ ≠ i₃\nh₂₃ : i₂ ≠ i₃\nh :\n  2 • ∡ (Simplex.points t i₁) p (Simplex.points t i₃) =\n    2 • ∡ (Simplex.points t i₁) (Simplex.points t i₂) (Simplex.points t i₃)\nt'p : Fin 3 → P := Function.update t.points i₂ p\nh₁ : t'p i₁ = Simplex.points t i₁\nh₂ : t'p i₂ = p\n⊢ t'p i₃ = Simplex.points t i₃\n[PROOFSTEP]\nsimp [h₂₃.symm]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\nt : Triangle ℝ P\np : P\ni₁ i₂ i₃ : Fin 3\nh₁₂ : i₁ ≠ i₂\nh₁₃ : i₁ ≠ i₃\nh₂₃ : i₂ ≠ i₃\nh :\n  2 • ∡ (Simplex.points t i₁) p (Simplex.points t i₃) =\n    2 • ∡ (Simplex.points t i₁) (Simplex.points t i₂) (Simplex.points t i₃)\nt'p : Fin 3 → P := Function.update t.points i₂ p\nh₁ : t'p i₁ = Simplex.points t i₁\nh₂ : t'p i₂ = p\nh₃ : t'p i₃ = Simplex.points t i₃\n⊢ p ∈ Simplex.circumsphere t\n[PROOFSTEP]\nhave ha : AffineIndependent ℝ t'p :=\n  by\n  rw [affineIndependent_iff_not_collinear_of_ne h₁₂ h₁₃ h₂₃, h₁, h₂, h₃, collinear_iff_of_two_zsmul_oangle_eq h, ←\n    affineIndependent_iff_not_collinear_of_ne h₁₂ h₁₃ h₂₃]\n  exact t.Independent\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\nt : Triangle ℝ P\np : P\ni₁ i₂ i₃ : Fin 3\nh₁₂ : i₁ ≠ i₂\nh₁₃ : i₁ ≠ i₃\nh₂₃ : i₂ ≠ i₃\nh :\n  2 • ∡ (Simplex.points t i₁) p (Simplex.points t i₃) =\n    2 • ∡ (Simplex.points t i₁) (Simplex.points t i₂) (Simplex.points t i₃)\nt'p : Fin 3 → P := Function.update t.points i₂ p\nh₁ : t'p i₁ = Simplex.points t i₁\nh₂ : t'p i₂ = p\nh₃ : t'p i₃ = Simplex.points t i₃\n⊢ AffineIndependent ℝ t'p\n[PROOFSTEP]\nrw [affineIndependent_iff_not_collinear_of_ne h₁₂ h₁₃ h₂₃, h₁, h₂, h₃, collinear_iff_of_two_zsmul_oangle_eq h, ←\n  affineIndependent_iff_not_collinear_of_ne h₁₂ h₁₃ h₂₃]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\nt : Triangle ℝ P\np : P\ni₁ i₂ i₃ : Fin 3\nh₁₂ : i₁ ≠ i₂\nh₁₃ : i₁ ≠ i₃\nh₂₃ : i₂ ≠ i₃\nh :\n  2 • ∡ (Simplex.points t i₁) p (Simplex.points t i₃) =\n    2 • ∡ (Simplex.points t i₁) (Simplex.points t i₂) (Simplex.points t i₃)\nt'p : Fin 3 → P := Function.update t.points i₂ p\nh₁ : t'p i₁ = Simplex.points t i₁\nh₂ : t'p i₂ = p\nh₃ : t'p i₃ = Simplex.points t i₃\n⊢ AffineIndependent ℝ t.points\n[PROOFSTEP]\nexact t.Independent\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\nt : Triangle ℝ P\np : P\ni₁ i₂ i₃ : Fin 3\nh₁₂ : i₁ ≠ i₂\nh₁₃ : i₁ ≠ i₃\nh₂₃ : i₂ ≠ i₃\nh :\n  2 • ∡ (Simplex.points t i₁) p (Simplex.points t i₃) =\n    2 • ∡ (Simplex.points t i₁) (Simplex.points t i₂) (Simplex.points t i₃)\nt'p : Fin 3 → P := Function.update t.points i₂ p\nh₁ : t'p i₁ = Simplex.points t i₁\nh₂ : t'p i₂ = p\nh₃ : t'p i₃ = Simplex.points t i₃\nha : AffineIndependent ℝ t'p\n⊢ p ∈ Simplex.circumsphere t\n[PROOFSTEP]\nlet t' : Triangle ℝ P := ⟨t'p, ha⟩\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\nt : Triangle ℝ P\np : P\ni₁ i₂ i₃ : Fin 3\nh₁₂ : i₁ ≠ i₂\nh₁₃ : i₁ ≠ i₃\nh₂₃ : i₂ ≠ i₃\nh :\n  2 • ∡ (Simplex.points t i₁) p (Simplex.points t i₃) =\n    2 • ∡ (Simplex.points t i₁) (Simplex.points t i₂) (Simplex.points t i₃)\nt'p : Fin 3 → P := Function.update t.points i₂ p\nh₁ : t'p i₁ = Simplex.points t i₁\nh₂ : t'p i₂ = p\nh₃ : t'p i₃ = Simplex.points t i₃\nha : AffineIndependent ℝ t'p\nt' : Triangle ℝ P := { points := t'p, Independent := ha }\n⊢ p ∈ Simplex.circumsphere t\n[PROOFSTEP]\nhave h₁' : t'.points i₁ = t.points i₁ := h₁\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\nt : Triangle ℝ P\np : P\ni₁ i₂ i₃ : Fin 3\nh₁₂ : i₁ ≠ i₂\nh₁₃ : i₁ ≠ i₃\nh₂₃ : i₂ ≠ i₃\nh :\n  2 • ∡ (Simplex.points t i₁) p (Simplex.points t i₃) =\n    2 • ∡ (Simplex.points t i₁) (Simplex.points t i₂) (Simplex.points t i₃)\nt'p : Fin 3 → P := Function.update t.points i₂ p\nh₁ : t'p i₁ = Simplex.points t i₁\nh₂ : t'p i₂ = p\nh₃ : t'p i₃ = Simplex.points t i₃\nha : AffineIndependent ℝ t'p\nt' : Triangle ℝ P := { points := t'p, Independent := ha }\nh₁' : Simplex.points t' i₁ = Simplex.points t i₁\n⊢ p ∈ Simplex.circumsphere t\n[PROOFSTEP]\nhave h₂' : t'.points i₂ = p := h₂\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\nt : Triangle ℝ P\np : P\ni₁ i₂ i₃ : Fin 3\nh₁₂ : i₁ ≠ i₂\nh₁₃ : i₁ ≠ i₃\nh₂₃ : i₂ ≠ i₃\nh :\n  2 • ∡ (Simplex.points t i₁) p (Simplex.points t i₃) =\n    2 • ∡ (Simplex.points t i₁) (Simplex.points t i₂) (Simplex.points t i₃)\nt'p : Fin 3 → P := Function.update t.points i₂ p\nh₁ : t'p i₁ = Simplex.points t i₁\nh₂ : t'p i₂ = p\nh₃ : t'p i₃ = Simplex.points t i₃\nha : AffineIndependent ℝ t'p\nt' : Triangle ℝ P := { points := t'p, Independent := ha }\nh₁' : Simplex.points t' i₁ = Simplex.points t i₁\nh₂' : Simplex.points t' i₂ = p\n⊢ p ∈ Simplex.circumsphere t\n[PROOFSTEP]\nhave h₃' : t'.points i₃ = t.points i₃ := h₃\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\nt : Triangle ℝ P\np : P\ni₁ i₂ i₃ : Fin 3\nh₁₂ : i₁ ≠ i₂\nh₁₃ : i₁ ≠ i₃\nh₂₃ : i₂ ≠ i₃\nh :\n  2 • ∡ (Simplex.points t i₁) p (Simplex.points t i₃) =\n    2 • ∡ (Simplex.points t i₁) (Simplex.points t i₂) (Simplex.points t i₃)\nt'p : Fin 3 → P := Function.update t.points i₂ p\nh₁ : t'p i₁ = Simplex.points t i₁\nh₂ : t'p i₂ = p\nh₃ : t'p i₃ = Simplex.points t i₃\nha : AffineIndependent ℝ t'p\nt' : Triangle ℝ P := { points := t'p, Independent := ha }\nh₁' : Simplex.points t' i₁ = Simplex.points t i₁\nh₂' : Simplex.points t' i₂ = p\nh₃' : Simplex.points t' i₃ = Simplex.points t i₃\n⊢ p ∈ Simplex.circumsphere t\n[PROOFSTEP]\nhave h' :\n  (2 : ℤ) • ∡ (t'.points i₁) (t'.points i₂) (t'.points i₃) = (2 : ℤ) • ∡ (t.points i₁) (t.points i₂) (t.points i₃) := by\n  rwa [h₁', h₂', h₃']\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\nt : Triangle ℝ P\np : P\ni₁ i₂ i₃ : Fin 3\nh₁₂ : i₁ ≠ i₂\nh₁₃ : i₁ ≠ i₃\nh₂₃ : i₂ ≠ i₃\nh :\n  2 • ∡ (Simplex.points t i₁) p (Simplex.points t i₃) =\n    2 • ∡ (Simplex.points t i₁) (Simplex.points t i₂) (Simplex.points t i₃)\nt'p : Fin 3 → P := Function.update t.points i₂ p\nh₁ : t'p i₁ = Simplex.points t i₁\nh₂ : t'p i₂ = p\nh₃ : t'p i₃ = Simplex.points t i₃\nha : AffineIndependent ℝ t'p\nt' : Triangle ℝ P := { points := t'p, Independent := ha }\nh₁' : Simplex.points t' i₁ = Simplex.points t i₁\nh₂' : Simplex.points t' i₂ = p\nh₃' : Simplex.points t' i₃ = Simplex.points t i₃\n⊢ 2 • ∡ (Simplex.points t' i₁) (Simplex.points t' i₂) (Simplex.points t' i₃) =\n    2 • ∡ (Simplex.points t i₁) (Simplex.points t i₂) (Simplex.points t i₃)\n[PROOFSTEP]\nrwa [h₁', h₂', h₃']\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\nt : Triangle ℝ P\np : P\ni₁ i₂ i₃ : Fin 3\nh₁₂ : i₁ ≠ i₂\nh₁₃ : i₁ ≠ i₃\nh₂₃ : i₂ ≠ i₃\nh :\n  2 • ∡ (Simplex.points t i₁) p (Simplex.points t i₃) =\n    2 • ∡ (Simplex.points t i₁) (Simplex.points t i₂) (Simplex.points t i₃)\nt'p : Fin 3 → P := Function.update t.points i₂ p\nh₁ : t'p i₁ = Simplex.points t i₁\nh₂ : t'p i₂ = p\nh₃ : t'p i₃ = Simplex.points t i₃\nha : AffineIndependent ℝ t'p\nt' : Triangle ℝ P := { points := t'p, Independent := ha }\nh₁' : Simplex.points t' i₁ = Simplex.points t i₁\nh₂' : Simplex.points t' i₂ = p\nh₃' : Simplex.points t' i₃ = Simplex.points t i₃\nh' :\n  2 • ∡ (Simplex.points t' i₁) (Simplex.points t' i₂) (Simplex.points t' i₃) =\n    2 • ∡ (Simplex.points t i₁) (Simplex.points t i₂) (Simplex.points t i₃)\n⊢ p ∈ Simplex.circumsphere t\n[PROOFSTEP]\nrw [← circumsphere_eq_circumsphere_of_eq_of_eq_of_two_zsmul_oangle_eq h₁₂ h₁₃ h₂₃ h₁' h₃' h', ← h₂']\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\nt : Triangle ℝ P\np : P\ni₁ i₂ i₃ : Fin 3\nh₁₂ : i₁ ≠ i₂\nh₁₃ : i₁ ≠ i₃\nh₂₃ : i₂ ≠ i₃\nh :\n  2 • ∡ (Simplex.points t i₁) p (Simplex.points t i₃) =\n    2 • ∡ (Simplex.points t i₁) (Simplex.points t i₂) (Simplex.points t i₃)\nt'p : Fin 3 → P := Function.update t.points i₂ p\nh₁ : t'p i₁ = Simplex.points t i₁\nh₂ : t'p i₂ = p\nh₃ : t'p i₃ = Simplex.points t i₃\nha : AffineIndependent ℝ t'p\nt' : Triangle ℝ P := { points := t'p, Independent := ha }\nh₁' : Simplex.points t' i₁ = Simplex.points t i₁\nh₂' : Simplex.points t' i₂ = p\nh₃' : Simplex.points t' i₃ = Simplex.points t i₃\nh' :\n  2 • ∡ (Simplex.points t' i₁) (Simplex.points t' i₂) (Simplex.points t' i₃) =\n    2 • ∡ (Simplex.points t i₁) (Simplex.points t i₂) (Simplex.points t i₃)\n⊢ Simplex.points t' i₂ ∈ Simplex.circumsphere t'\n[PROOFSTEP]\nexact Simplex.mem_circumsphere _ _\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ : P\nh : 2 • ∡ p₁ p₂ p₄ = 2 • ∡ p₁ p₃ p₄\nhn : ¬Collinear ℝ {p₁, p₂, p₄}\n⊢ Cospherical {p₁, p₂, p₃, p₄}\n[PROOFSTEP]\nhave hn' : ¬Collinear ℝ ({ p₁, p₃, p₄ } : Set P) := by rwa [← collinear_iff_of_two_zsmul_oangle_eq h]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ : P\nh : 2 • ∡ p₁ p₂ p₄ = 2 • ∡ p₁ p₃ p₄\nhn : ¬Collinear ℝ {p₁, p₂, p₄}\n⊢ ¬Collinear ℝ {p₁, p₃, p₄}\n[PROOFSTEP]\nrwa [← collinear_iff_of_two_zsmul_oangle_eq h]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ : P\nh : 2 • ∡ p₁ p₂ p₄ = 2 • ∡ p₁ p₃ p₄\nhn : ¬Collinear ℝ {p₁, p₂, p₄}\nhn' : ¬Collinear ℝ {p₁, p₃, p₄}\n⊢ Cospherical {p₁, p₂, p₃, p₄}\n[PROOFSTEP]\nlet t₁ : Affine.Triangle ℝ P := ⟨![p₁, p₂, p₄], affineIndependent_iff_not_collinear_set.2 hn⟩\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ : P\nh : 2 • ∡ p₁ p₂ p₄ = 2 • ∡ p₁ p₃ p₄\nhn : ¬Collinear ℝ {p₁, p₂, p₄}\nhn' : ¬Collinear ℝ {p₁, p₃, p₄}\nt₁ : Affine.Triangle ℝ P := { points := ![p₁, p₂, p₄], Independent := (_ : AffineIndependent ℝ ![p₁, p₂, p₄]) }\n⊢ Cospherical {p₁, p₂, p₃, p₄}\n[PROOFSTEP]\nlet t₂ : Affine.Triangle ℝ P := ⟨![p₁, p₃, p₄], affineIndependent_iff_not_collinear_set.2 hn'⟩\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ : P\nh : 2 • ∡ p₁ p₂ p₄ = 2 • ∡ p₁ p₃ p₄\nhn : ¬Collinear ℝ {p₁, p₂, p₄}\nhn' : ¬Collinear ℝ {p₁, p₃, p₄}\nt₁ : Affine.Triangle ℝ P := { points := ![p₁, p₂, p₄], Independent := (_ : AffineIndependent ℝ ![p₁, p₂, p₄]) }\nt₂ : Affine.Triangle ℝ P := { points := ![p₁, p₃, p₄], Independent := (_ : AffineIndependent ℝ ![p₁, p₃, p₄]) }\n⊢ Cospherical {p₁, p₂, p₃, p₄}\n[PROOFSTEP]\nrw [cospherical_iff_exists_sphere]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ : P\nh : 2 • ∡ p₁ p₂ p₄ = 2 • ∡ p₁ p₃ p₄\nhn : ¬Collinear ℝ {p₁, p₂, p₄}\nhn' : ¬Collinear ℝ {p₁, p₃, p₄}\nt₁ : Affine.Triangle ℝ P := { points := ![p₁, p₂, p₄], Independent := (_ : AffineIndependent ℝ ![p₁, p₂, p₄]) }\nt₂ : Affine.Triangle ℝ P := { points := ![p₁, p₃, p₄], Independent := (_ : AffineIndependent ℝ ![p₁, p₃, p₄]) }\n⊢ ∃ s, {p₁, p₂, p₃, p₄} ⊆ Metric.sphere s.center s.radius\n[PROOFSTEP]\nrefine' ⟨t₂.circumsphere, _⟩\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ : P\nh : 2 • ∡ p₁ p₂ p₄ = 2 • ∡ p₁ p₃ p₄\nhn : ¬Collinear ℝ {p₁, p₂, p₄}\nhn' : ¬Collinear ℝ {p₁, p₃, p₄}\nt₁ : Affine.Triangle ℝ P := { points := ![p₁, p₂, p₄], Independent := (_ : AffineIndependent ℝ ![p₁, p₂, p₄]) }\nt₂ : Affine.Triangle ℝ P := { points := ![p₁, p₃, p₄], Independent := (_ : AffineIndependent ℝ ![p₁, p₃, p₄]) }\n⊢ {p₁, p₂, p₃, p₄} ⊆ Metric.sphere (Affine.Simplex.circumsphere t₂).center (Affine.Simplex.circumsphere t₂).radius\n[PROOFSTEP]\nsimp_rw [Set.insert_subset_iff, Set.singleton_subset_iff]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ : P\nh : 2 • ∡ p₁ p₂ p₄ = 2 • ∡ p₁ p₃ p₄\nhn : ¬Collinear ℝ {p₁, p₂, p₄}\nhn' : ¬Collinear ℝ {p₁, p₃, p₄}\nt₁ : Affine.Triangle ℝ P := { points := ![p₁, p₂, p₄], Independent := (_ : AffineIndependent ℝ ![p₁, p₂, p₄]) }\nt₂ : Affine.Triangle ℝ P := { points := ![p₁, p₃, p₄], Independent := (_ : AffineIndependent ℝ ![p₁, p₃, p₄]) }\n⊢ p₁ ∈\n      Metric.sphere\n        (Affine.Simplex.circumsphere\n            { points := ![p₁, p₃, p₄], Independent := (_ : AffineIndependent ℝ ![p₁, p₃, p₄]) }).center\n        (Affine.Simplex.circumsphere\n            { points := ![p₁, p₃, p₄], Independent := (_ : AffineIndependent ℝ ![p₁, p₃, p₄]) }).radius ∧\n    p₂ ∈\n        Metric.sphere\n          (Affine.Simplex.circumsphere\n              { points := ![p₁, p₃, p₄], Independent := (_ : AffineIndependent ℝ ![p₁, p₃, p₄]) }).center\n          (Affine.Simplex.circumsphere\n              { points := ![p₁, p₃, p₄], Independent := (_ : AffineIndependent ℝ ![p₁, p₃, p₄]) }).radius ∧\n      p₃ ∈\n          Metric.sphere\n            (Affine.Simplex.circumsphere\n                { points := ![p₁, p₃, p₄], Independent := (_ : AffineIndependent ℝ ![p₁, p₃, p₄]) }).center\n            (Affine.Simplex.circumsphere\n                { points := ![p₁, p₃, p₄], Independent := (_ : AffineIndependent ℝ ![p₁, p₃, p₄]) }).radius ∧\n        p₄ ∈\n          Metric.sphere\n            (Affine.Simplex.circumsphere\n                { points := ![p₁, p₃, p₄], Independent := (_ : AffineIndependent ℝ ![p₁, p₃, p₄]) }).center\n            (Affine.Simplex.circumsphere\n                { points := ![p₁, p₃, p₄], Independent := (_ : AffineIndependent ℝ ![p₁, p₃, p₄]) }).radius\n[PROOFSTEP]\nrefine' ⟨t₂.mem_circumsphere 0, _, t₂.mem_circumsphere 1, t₂.mem_circumsphere 2⟩\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ : P\nh : 2 • ∡ p₁ p₂ p₄ = 2 • ∡ p₁ p₃ p₄\nhn : ¬Collinear ℝ {p₁, p₂, p₄}\nhn' : ¬Collinear ℝ {p₁, p₃, p₄}\nt₁ : Affine.Triangle ℝ P := { points := ![p₁, p₂, p₄], Independent := (_ : AffineIndependent ℝ ![p₁, p₂, p₄]) }\nt₂ : Affine.Triangle ℝ P := { points := ![p₁, p₃, p₄], Independent := (_ : AffineIndependent ℝ ![p₁, p₃, p₄]) }\n⊢ p₂ ∈\n    Metric.sphere\n      (Affine.Simplex.circumsphere\n          { points := ![p₁, p₃, p₄], Independent := (_ : AffineIndependent ℝ ![p₁, p₃, p₄]) }).center\n      (Affine.Simplex.circumsphere\n          { points := ![p₁, p₃, p₄], Independent := (_ : AffineIndependent ℝ ![p₁, p₃, p₄]) }).radius\n[PROOFSTEP]\nrw [Affine.Triangle.circumsphere_eq_circumsphere_of_eq_of_eq_of_two_zsmul_oangle_eq (by decide : (0 : Fin 3) ≠ 1)\n    (by decide : (0 : Fin 3) ≠ 2) (by decide) (show t₂.points 0 = t₁.points 0 from rfl) rfl h.symm]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ : P\nh : 2 • ∡ p₁ p₂ p₄ = 2 • ∡ p₁ p₃ p₄\nhn : ¬Collinear ℝ {p₁, p₂, p₄}\nhn' : ¬Collinear ℝ {p₁, p₃, p₄}\nt₁ : Affine.Triangle ℝ P := { points := ![p₁, p₂, p₄], Independent := (_ : AffineIndependent ℝ ![p₁, p₂, p₄]) }\nt₂ : Affine.Triangle ℝ P := { points := ![p₁, p₃, p₄], Independent := (_ : AffineIndependent ℝ ![p₁, p₃, p₄]) }\n⊢ 0 ≠ 1\n[PROOFSTEP]\ndecide\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ : P\nh : 2 • ∡ p₁ p₂ p₄ = 2 • ∡ p₁ p₃ p₄\nhn : ¬Collinear ℝ {p₁, p₂, p₄}\nhn' : ¬Collinear ℝ {p₁, p₃, p₄}\nt₁ : Affine.Triangle ℝ P := { points := ![p₁, p₂, p₄], Independent := (_ : AffineIndependent ℝ ![p₁, p₂, p₄]) }\nt₂ : Affine.Triangle ℝ P := { points := ![p₁, p₃, p₄], Independent := (_ : AffineIndependent ℝ ![p₁, p₃, p₄]) }\n⊢ 0 ≠ 2\n[PROOFSTEP]\ndecide\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ : P\nh : 2 • ∡ p₁ p₂ p₄ = 2 • ∡ p₁ p₃ p₄\nhn : ¬Collinear ℝ {p₁, p₂, p₄}\nhn' : ¬Collinear ℝ {p₁, p₃, p₄}\nt₁ : Affine.Triangle ℝ P := { points := ![p₁, p₂, p₄], Independent := (_ : AffineIndependent ℝ ![p₁, p₂, p₄]) }\nt₂ : Affine.Triangle ℝ P := { points := ![p₁, p₃, p₄], Independent := (_ : AffineIndependent ℝ ![p₁, p₃, p₄]) }\n⊢ 1 ≠ 2\n[PROOFSTEP]\ndecide\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ : P\nh : 2 • ∡ p₁ p₂ p₄ = 2 • ∡ p₁ p₃ p₄\nhn : ¬Collinear ℝ {p₁, p₂, p₄}\nhn' : ¬Collinear ℝ {p₁, p₃, p₄}\nt₁ : Affine.Triangle ℝ P := { points := ![p₁, p₂, p₄], Independent := (_ : AffineIndependent ℝ ![p₁, p₂, p₄]) }\nt₂ : Affine.Triangle ℝ P := { points := ![p₁, p₃, p₄], Independent := (_ : AffineIndependent ℝ ![p₁, p₃, p₄]) }\n⊢ p₂ ∈ Metric.sphere (Affine.Simplex.circumsphere t₁).center (Affine.Simplex.circumsphere t₁).radius\n[PROOFSTEP]\nexact t₁.mem_circumsphere 1\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ : P\nh : 2 • ∡ p₁ p₂ p₄ = 2 • ∡ p₁ p₃ p₄\n⊢ Cospherical {p₁, p₂, p₃, p₄} ∨ Collinear ℝ {p₁, p₂, p₃, p₄}\n[PROOFSTEP]\nby_cases hc : Collinear ℝ ({ p₁, p₂, p₄ } : Set P)\n[GOAL]\ncase pos\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ : P\nh : 2 • ∡ p₁ p₂ p₄ = 2 • ∡ p₁ p₃ p₄\nhc : Collinear ℝ {p₁, p₂, p₄}\n⊢ Cospherical {p₁, p₂, p₃, p₄} ∨ Collinear ℝ {p₁, p₂, p₃, p₄}\n[PROOFSTEP]\nby_cases he : p₁ = p₄\n[GOAL]\ncase pos\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ : P\nh : 2 • ∡ p₁ p₂ p₄ = 2 • ∡ p₁ p₃ p₄\nhc : Collinear ℝ {p₁, p₂, p₄}\nhe : p₁ = p₄\n⊢ Cospherical {p₁, p₂, p₃, p₄} ∨ Collinear ℝ {p₁, p₂, p₃, p₄}\n[PROOFSTEP]\nrw [he, Set.insert_eq_self.2 (Set.mem_insert_of_mem _ (Set.mem_insert_of_mem _ (Set.mem_singleton _)))]\n[GOAL]\ncase pos\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ : P\nh : 2 • ∡ p₁ p₂ p₄ = 2 • ∡ p₁ p₃ p₄\nhc : Collinear ℝ {p₁, p₂, p₄}\nhe : p₁ = p₄\n⊢ Cospherical {p₂, p₃, p₄} ∨ Collinear ℝ {p₂, p₃, p₄}\n[PROOFSTEP]\nby_cases hl : Collinear ℝ ({ p₂, p₃, p₄ } : Set P)\n[GOAL]\ncase pos\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ : P\nh : 2 • ∡ p₁ p₂ p₄ = 2 • ∡ p₁ p₃ p₄\nhc : Collinear ℝ {p₁, p₂, p₄}\nhe : p₁ = p₄\nhl : Collinear ℝ {p₂, p₃, p₄}\n⊢ Cospherical {p₂, p₃, p₄} ∨ Collinear ℝ {p₂, p₃, p₄}\n[PROOFSTEP]\nexact Or.inr hl\n[GOAL]\ncase neg\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ : P\nh : 2 • ∡ p₁ p₂ p₄ = 2 • ∡ p₁ p₃ p₄\nhc : Collinear ℝ {p₁, p₂, p₄}\nhe : p₁ = p₄\nhl : ¬Collinear ℝ {p₂, p₃, p₄}\n⊢ Cospherical {p₂, p₃, p₄} ∨ Collinear ℝ {p₂, p₃, p₄}\n[PROOFSTEP]\nrw [or_iff_left hl]\n[GOAL]\ncase neg\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ : P\nh : 2 • ∡ p₁ p₂ p₄ = 2 • ∡ p₁ p₃ p₄\nhc : Collinear ℝ {p₁, p₂, p₄}\nhe : p₁ = p₄\nhl : ¬Collinear ℝ {p₂, p₃, p₄}\n⊢ Cospherical {p₂, p₃, p₄}\n[PROOFSTEP]\nlet t : Affine.Triangle ℝ P := ⟨![p₂, p₃, p₄], affineIndependent_iff_not_collinear_set.2 hl⟩\n[GOAL]\ncase neg\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ : P\nh : 2 • ∡ p₁ p₂ p₄ = 2 • ∡ p₁ p₃ p₄\nhc : Collinear ℝ {p₁, p₂, p₄}\nhe : p₁ = p₄\nhl : ¬Collinear ℝ {p₂, p₃, p₄}\nt : Affine.Triangle ℝ P := { points := ![p₂, p₃, p₄], Independent := (_ : AffineIndependent ℝ ![p₂, p₃, p₄]) }\n⊢ Cospherical {p₂, p₃, p₄}\n[PROOFSTEP]\nrw [cospherical_iff_exists_sphere]\n[GOAL]\ncase neg\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ : P\nh : 2 • ∡ p₁ p₂ p₄ = 2 • ∡ p₁ p₃ p₄\nhc : Collinear ℝ {p₁, p₂, p₄}\nhe : p₁ = p₄\nhl : ¬Collinear ℝ {p₂, p₃, p₄}\nt : Affine.Triangle ℝ P := { points := ![p₂, p₃, p₄], Independent := (_ : AffineIndependent ℝ ![p₂, p₃, p₄]) }\n⊢ ∃ s, {p₂, p₃, p₄} ⊆ Metric.sphere s.center s.radius\n[PROOFSTEP]\nrefine' ⟨t.circumsphere, _⟩\n[GOAL]\ncase neg\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ : P\nh : 2 • ∡ p₁ p₂ p₄ = 2 • ∡ p₁ p₃ p₄\nhc : Collinear ℝ {p₁, p₂, p₄}\nhe : p₁ = p₄\nhl : ¬Collinear ℝ {p₂, p₃, p₄}\nt : Affine.Triangle ℝ P := { points := ![p₂, p₃, p₄], Independent := (_ : AffineIndependent ℝ ![p₂, p₃, p₄]) }\n⊢ {p₂, p₃, p₄} ⊆ Metric.sphere (Affine.Simplex.circumsphere t).center (Affine.Simplex.circumsphere t).radius\n[PROOFSTEP]\nsimp_rw [Set.insert_subset_iff, Set.singleton_subset_iff]\n[GOAL]\ncase neg\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ : P\nh : 2 • ∡ p₁ p₂ p₄ = 2 • ∡ p₁ p₃ p₄\nhc : Collinear ℝ {p₁, p₂, p₄}\nhe : p₁ = p₄\nhl : ¬Collinear ℝ {p₂, p₃, p₄}\nt : Affine.Triangle ℝ P := { points := ![p₂, p₃, p₄], Independent := (_ : AffineIndependent ℝ ![p₂, p₃, p₄]) }\n⊢ p₂ ∈\n      Metric.sphere\n        (Affine.Simplex.circumsphere\n            { points := ![p₂, p₃, p₄], Independent := (_ : AffineIndependent ℝ ![p₂, p₃, p₄]) }).center\n        (Affine.Simplex.circumsphere\n            { points := ![p₂, p₃, p₄], Independent := (_ : AffineIndependent ℝ ![p₂, p₃, p₄]) }).radius ∧\n    p₃ ∈\n        Metric.sphere\n          (Affine.Simplex.circumsphere\n              { points := ![p₂, p₃, p₄], Independent := (_ : AffineIndependent ℝ ![p₂, p₃, p₄]) }).center\n          (Affine.Simplex.circumsphere\n              { points := ![p₂, p₃, p₄], Independent := (_ : AffineIndependent ℝ ![p₂, p₃, p₄]) }).radius ∧\n      p₄ ∈\n        Metric.sphere\n          (Affine.Simplex.circumsphere\n              { points := ![p₂, p₃, p₄], Independent := (_ : AffineIndependent ℝ ![p₂, p₃, p₄]) }).center\n          (Affine.Simplex.circumsphere\n              { points := ![p₂, p₃, p₄], Independent := (_ : AffineIndependent ℝ ![p₂, p₃, p₄]) }).radius\n[PROOFSTEP]\nexact ⟨t.mem_circumsphere 0, t.mem_circumsphere 1, t.mem_circumsphere 2⟩\n[GOAL]\ncase neg\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ : P\nh : 2 • ∡ p₁ p₂ p₄ = 2 • ∡ p₁ p₃ p₄\nhc : Collinear ℝ {p₁, p₂, p₄}\nhe : ¬p₁ = p₄\n⊢ Cospherical {p₁, p₂, p₃, p₄} ∨ Collinear ℝ {p₁, p₂, p₃, p₄}\n[PROOFSTEP]\nhave hc' : Collinear ℝ ({ p₁, p₃, p₄ } : Set P) := by rwa [← collinear_iff_of_two_zsmul_oangle_eq h]\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ : P\nh : 2 • ∡ p₁ p₂ p₄ = 2 • ∡ p₁ p₃ p₄\nhc : Collinear ℝ {p₁, p₂, p₄}\nhe : ¬p₁ = p₄\n⊢ Collinear ℝ {p₁, p₃, p₄}\n[PROOFSTEP]\nrwa [← collinear_iff_of_two_zsmul_oangle_eq h]\n[GOAL]\ncase neg\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ : P\nh : 2 • ∡ p₁ p₂ p₄ = 2 • ∡ p₁ p₃ p₄\nhc : Collinear ℝ {p₁, p₂, p₄}\nhe : ¬p₁ = p₄\nhc' : Collinear ℝ {p₁, p₃, p₄}\n⊢ Cospherical {p₁, p₂, p₃, p₄} ∨ Collinear ℝ {p₁, p₂, p₃, p₄}\n[PROOFSTEP]\nrefine' Or.inr _\n[GOAL]\ncase neg\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ : P\nh : 2 • ∡ p₁ p₂ p₄ = 2 • ∡ p₁ p₃ p₄\nhc : Collinear ℝ {p₁, p₂, p₄}\nhe : ¬p₁ = p₄\nhc' : Collinear ℝ {p₁, p₃, p₄}\n⊢ Collinear ℝ {p₁, p₂, p₃, p₄}\n[PROOFSTEP]\nrw [Set.insert_comm p₁ p₂] at hc \n[GOAL]\ncase neg\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ : P\nh : 2 • ∡ p₁ p₂ p₄ = 2 • ∡ p₁ p₃ p₄\nhc : Collinear ℝ {p₂, p₁, p₄}\nhe : ¬p₁ = p₄\nhc' : Collinear ℝ {p₁, p₃, p₄}\n⊢ Collinear ℝ {p₁, p₂, p₃, p₄}\n[PROOFSTEP]\nrwa [Set.insert_comm p₁ p₂,\n  hc'.collinear_insert_iff_of_ne (Set.mem_insert _ _)\n    (Set.mem_insert_of_mem _ (Set.mem_insert_of_mem _ (Set.mem_singleton _))) he]\n[GOAL]\ncase neg\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ : P\nh : 2 • ∡ p₁ p₂ p₄ = 2 • ∡ p₁ p₃ p₄\nhc : ¬Collinear ℝ {p₁, p₂, p₄}\n⊢ Cospherical {p₁, p₂, p₃, p₄} ∨ Collinear ℝ {p₁, p₂, p₃, p₄}\n[PROOFSTEP]\nexact Or.inl (cospherical_of_two_zsmul_oangle_eq_of_not_collinear h hc)\n[GOAL]\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ : P\nh : 2 • ∡ p₁ p₂ p₄ = 2 • ∡ p₁ p₃ p₄\n⊢ Concyclic {p₁, p₂, p₃, p₄} ∨ Collinear ℝ {p₁, p₂, p₃, p₄}\n[PROOFSTEP]\nrcases cospherical_or_collinear_of_two_zsmul_oangle_eq h with (hc | hc)\n[GOAL]\ncase inl\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ : P\nh : 2 • ∡ p₁ p₂ p₄ = 2 • ∡ p₁ p₃ p₄\nhc : Cospherical {p₁, p₂, p₃, p₄}\n⊢ Concyclic {p₁, p₂, p₃, p₄} ∨ Collinear ℝ {p₁, p₂, p₃, p₄}\n[PROOFSTEP]\nexact Or.inl ⟨hc, coplanar_of_fact_finrank_eq_two _⟩\n[GOAL]\ncase inr\nV : Type u_1\nP : Type u_2\ninst✝⁴ : NormedAddCommGroup V\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : MetricSpace P\ninst✝¹ : NormedAddTorsor V P\nhd2 : Fact (finrank ℝ V = 2)\ninst✝ : Module.Oriented ℝ V (Fin 2)\np₁ p₂ p₃ p₄ : P\nh : 2 • ∡ p₁ p₂ p₄ = 2 • ∡ p₁ p₃ p₄\nhc : Collinear ℝ {p₁, p₂, p₃, p₄}\n⊢ Concyclic {p₁, p₂, p₃, p₄} ∨ Collinear ℝ {p₁, p₂, p₃, p₄}\n[PROOFSTEP]\nexact Or.inr hc\n", "meta": {"mathlib_filename": "Mathlib.Geometry.Euclidean.Angle.Sphere", "llama_tokens": 33438, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.787931185683219, "lm_q2_score": 0.6442250928250375, "lm_q1q2_score": 0.5076050412365136}}
{"text": "[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nr : R\n⊢ ↑(aeval (IsLocalization.Away.invSelf r)) (↑C r * X - 1) = 0\n[PROOFSTEP]\nsimp only [map_sub, map_mul, aeval_C, aeval_X, IsLocalization.Away.mul_invSelf, aeval_one, sub_self]\n", "meta": {"mathlib_filename": "Mathlib.RingTheory.Localization.Away.AdjoinRoot", "llama_tokens": 108, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES\n\n", "lm_q1_score": 0.8104789086703225, "lm_q2_score": 0.6261241772283034, "lm_q1q2_score": 0.5074604398520989}}
{"text": "[GOAL]\na : { x // x ∈ circle }\nsrc✝ : ℂ ≃ₗ[ℝ] ℂ := DistribMulAction.toLinearEquiv ℝ ℂ a\nx : ℂ\n⊢ ↑Complex.abs (↑a * x) = ↑Complex.abs x\n[PROOFSTEP]\nrw [map_mul, abs_coe_circle, one_mul]\n[GOAL]\na b : { x // x ∈ circle }\n⊢ LinearIsometryEquiv.trans (↑rotation a) (↑rotation b) = ↑rotation (b * a)\n[PROOFSTEP]\next1\n[GOAL]\ncase h\na b : { x // x ∈ circle }\nx✝ : ℂ\n⊢ ↑(LinearIsometryEquiv.trans (↑rotation a) (↑rotation b)) x✝ = ↑(↑rotation (b * a)) x✝\n[PROOFSTEP]\nsimp\n[GOAL]\na : { x // x ∈ circle }\n⊢ ↑rotation a ≠ conjLie\n[PROOFSTEP]\nintro h\n[GOAL]\na : { x // x ∈ circle }\nh : ↑rotation a = conjLie\n⊢ False\n[PROOFSTEP]\nhave h1 : rotation a 1 = conj 1 := LinearIsometryEquiv.congr_fun h 1\n[GOAL]\na : { x // x ∈ circle }\nh : ↑rotation a = conjLie\nh1 : ↑(↑rotation a) 1 = ↑(starRingEnd ℂ) 1\n⊢ False\n[PROOFSTEP]\nhave hI : rotation a I = conj I := LinearIsometryEquiv.congr_fun h I\n[GOAL]\na : { x // x ∈ circle }\nh : ↑rotation a = conjLie\nh1 : ↑(↑rotation a) 1 = ↑(starRingEnd ℂ) 1\nhI : ↑(↑rotation a) I = ↑(starRingEnd ℂ) I\n⊢ False\n[PROOFSTEP]\nrw [rotation_apply, RingHom.map_one, mul_one] at h1 \n[GOAL]\na : { x // x ∈ circle }\nh : ↑rotation a = conjLie\nh1 : ↑a = 1\nhI : ↑(↑rotation a) I = ↑(starRingEnd ℂ) I\n⊢ False\n[PROOFSTEP]\nrw [rotation_apply, conj_I, ← neg_one_mul, mul_left_inj' I_ne_zero, h1, eq_neg_self_iff] at hI \n[GOAL]\na : { x // x ∈ circle }\nh : ↑rotation a = conjLie\nh1 : ↑a = 1\nhI : 1 = 0\n⊢ False\n[PROOFSTEP]\nexact one_ne_zero hI\n[GOAL]\ne : ℂ ≃ₗᵢ[ℝ] ℂ\n⊢ ↑e 1 / ↑(↑Complex.abs (↑e 1)) ∈ circle\n[PROOFSTEP]\nsimp\n[GOAL]\na : { x // x ∈ circle }\n⊢ ↑(rotationOf (↑rotation a)) = ↑a\n[PROOFSTEP]\nsimp\n[GOAL]\nf : ℂ →ₗᵢ[ℝ] ℂ\nh₃ : ∀ (z : ℂ), z + ↑(starRingEnd ℂ) z = ↑f z + ↑(starRingEnd ((fun x => ℂ) z)) (↑f z)\nz : ℂ\n⊢ (↑f z).re = z.re\n[PROOFSTEP]\nsimpa [ext_iff, add_re, add_im, conj_re, conj_im, ← two_mul, show (2 : ℝ) ≠ 0 by simp [two_ne_zero]] using (h₃ z).symm\n[GOAL]\nf : ℂ →ₗᵢ[ℝ] ℂ\nh₃ : ∀ (z : ℂ), z + ↑(starRingEnd ℂ) z = ↑f z + ↑(starRingEnd ((fun x => ℂ) z)) (↑f z)\nz : ℂ\n⊢ 2 ≠ 0\n[PROOFSTEP]\nsimp [two_ne_zero]\n[GOAL]\nf : ℂ →ₗᵢ[ℝ] ℂ\nh₂ : ∀ (z : ℂ), (↑f z).re = z.re\nz : ℂ\n⊢ (↑f z).im = z.im ∨ (↑f z).im = -z.im\n[PROOFSTEP]\nhave h₁ := f.norm_map z\n[GOAL]\nf : ℂ →ₗᵢ[ℝ] ℂ\nh₂ : ∀ (z : ℂ), (↑f z).re = z.re\nz : ℂ\nh₁ : ‖↑f z‖ = ‖z‖\n⊢ (↑f z).im = z.im ∨ (↑f z).im = -z.im\n[PROOFSTEP]\nsimp only [Complex.abs_def, norm_eq_abs] at h₁ \n[GOAL]\nf : ℂ →ₗᵢ[ℝ] ℂ\nh₂ : ∀ (z : ℂ), (↑f z).re = z.re\nz : ℂ\nh₁ : Real.sqrt (↑normSq (↑f z)) = Real.sqrt (↑normSq z)\n⊢ (↑f z).im = z.im ∨ (↑f z).im = -z.im\n[PROOFSTEP]\nrwa [Real.sqrt_inj (normSq_nonneg _) (normSq_nonneg _), normSq_apply (f z), normSq_apply z, h₂, add_left_cancel_iff,\n  mul_self_eq_mul_self_iff] at h₁ \n[GOAL]\nf : ℂ →ₗᵢ[ℝ] ℂ\nh : ↑f 1 = 1\nz : ℂ\n⊢ z + ↑(starRingEnd ℂ) z = ↑f z + ↑(starRingEnd ((fun x => ℂ) z)) (↑f z)\n[PROOFSTEP]\nhave : ‖f z - 1‖ = ‖z - 1‖ := by rw [← f.norm_map (z - 1), f.map_sub, h]\n[GOAL]\nf : ℂ →ₗᵢ[ℝ] ℂ\nh : ↑f 1 = 1\nz : ℂ\n⊢ ‖↑f z - 1‖ = ‖z - 1‖\n[PROOFSTEP]\nrw [← f.norm_map (z - 1), f.map_sub, h]\n[GOAL]\nf : ℂ →ₗᵢ[ℝ] ℂ\nh : ↑f 1 = 1\nz : ℂ\nthis : ‖↑f z - 1‖ = ‖z - 1‖\n⊢ z + ↑(starRingEnd ℂ) z = ↑f z + ↑(starRingEnd ((fun x => ℂ) z)) (↑f z)\n[PROOFSTEP]\napply_fun fun x => x ^ 2 at this \n[GOAL]\nf : ℂ →ₗᵢ[ℝ] ℂ\nh : ↑f 1 = 1\nz : ℂ\nthis : ‖↑f z - 1‖ ^ 2 = ‖z - 1‖ ^ 2\n⊢ z + ↑(starRingEnd ℂ) z = ↑f z + ↑(starRingEnd ((fun x => ℂ) z)) (↑f z)\n[PROOFSTEP]\nsimp only [norm_eq_abs, ← normSq_eq_abs] at this \n[GOAL]\nf : ℂ →ₗᵢ[ℝ] ℂ\nh : ↑f 1 = 1\nz : ℂ\nthis : ↑normSq (↑f z - 1) = ↑normSq (z - 1)\n⊢ z + ↑(starRingEnd ℂ) z = ↑f z + ↑(starRingEnd ((fun x => ℂ) z)) (↑f z)\n[PROOFSTEP]\nrw [← ofReal_inj, ← mul_conj, ← mul_conj] at this \n[GOAL]\nf : ℂ →ₗᵢ[ℝ] ℂ\nh : ↑f 1 = 1\nz : ℂ\nthis : (↑f z - 1) * ↑(starRingEnd ℂ) (↑f z - 1) = (z - 1) * ↑(starRingEnd ℂ) (z - 1)\n⊢ z + ↑(starRingEnd ℂ) z = ↑f z + ↑(starRingEnd ((fun x => ℂ) z)) (↑f z)\n[PROOFSTEP]\nrw [RingHom.map_sub, RingHom.map_sub] at this \n[GOAL]\nf : ℂ →ₗᵢ[ℝ] ℂ\nh : ↑f 1 = 1\nz : ℂ\nthis : (↑f z - 1) * (↑(starRingEnd ℂ) (↑f z) - ↑(starRingEnd ℂ) 1) = (z - 1) * (↑(starRingEnd ℂ) z - ↑(starRingEnd ℂ) 1)\n⊢ z + ↑(starRingEnd ℂ) z = ↑f z + ↑(starRingEnd ((fun x => ℂ) z)) (↑f z)\n[PROOFSTEP]\nsimp only [sub_mul, mul_sub, one_mul, mul_one] at this \n[GOAL]\nf : ℂ →ₗᵢ[ℝ] ℂ\nh : ↑f 1 = 1\nz : ℂ\nthis :\n  ↑f z * ↑(starRingEnd ℂ) (↑f z) - ↑(starRingEnd ℂ) (↑f z) - (↑f z * ↑(starRingEnd ℂ) 1 - ↑(starRingEnd ℂ) 1) =\n    z * ↑(starRingEnd ℂ) z - ↑(starRingEnd ℂ) z - (z * ↑(starRingEnd ℂ) 1 - ↑(starRingEnd ℂ) 1)\n⊢ z + ↑(starRingEnd ℂ) z = ↑f z + ↑(starRingEnd ((fun x => ℂ) z)) (↑f z)\n[PROOFSTEP]\nrw [mul_conj, normSq_eq_abs, ← norm_eq_abs, LinearIsometry.norm_map] at this \n[GOAL]\nf : ℂ →ₗᵢ[ℝ] ℂ\nh : ↑f 1 = 1\nz : ℂ\nthis :\n  ↑(‖z‖ ^ 2) - ↑(starRingEnd ℂ) (↑f z) - (↑f z * ↑(starRingEnd ℂ) 1 - ↑(starRingEnd ℂ) 1) =\n    z * ↑(starRingEnd ℂ) z - ↑(starRingEnd ℂ) z - (z * ↑(starRingEnd ℂ) 1 - ↑(starRingEnd ℂ) 1)\n⊢ z + ↑(starRingEnd ℂ) z = ↑f z + ↑(starRingEnd ((fun x => ℂ) z)) (↑f z)\n[PROOFSTEP]\nrw [mul_conj, normSq_eq_abs, ← norm_eq_abs] at this \n[GOAL]\nf : ℂ →ₗᵢ[ℝ] ℂ\nh : ↑f 1 = 1\nz : ℂ\nthis :\n  ↑(‖z‖ ^ 2) - ↑(starRingEnd ℂ) (↑f z) - (↑f z * ↑(starRingEnd ℂ) 1 - ↑(starRingEnd ℂ) 1) =\n    ↑(‖z‖ ^ 2) - ↑(starRingEnd ℂ) z - (z * ↑(starRingEnd ℂ) 1 - ↑(starRingEnd ℂ) 1)\n⊢ z + ↑(starRingEnd ℂ) z = ↑f z + ↑(starRingEnd ((fun x => ℂ) z)) (↑f z)\n[PROOFSTEP]\nsimp only [sub_sub, sub_right_inj, mul_one, ofReal_pow, RingHom.map_one, norm_eq_abs] at this \n[GOAL]\nf : ℂ →ₗᵢ[ℝ] ℂ\nh : ↑f 1 = 1\nz : ℂ\nthis : ↑(starRingEnd ℂ) (↑f z) + (↑f z - 1) = ↑(starRingEnd ℂ) z + (z - 1)\n⊢ z + ↑(starRingEnd ℂ) z = ↑f z + ↑(starRingEnd ((fun x => ℂ) z)) (↑f z)\n[PROOFSTEP]\nsimp only [add_sub, sub_left_inj] at this \n[GOAL]\nf : ℂ →ₗᵢ[ℝ] ℂ\nh : ↑f 1 = 1\nz : ℂ\nthis : ↑(starRingEnd ℂ) (↑f z) + ↑f z = ↑(starRingEnd ℂ) z + z\n⊢ z + ↑(starRingEnd ℂ) z = ↑f z + ↑(starRingEnd ((fun x => ℂ) z)) (↑f z)\n[PROOFSTEP]\nrw [add_comm, ← this, add_comm]\n[GOAL]\nf : ℂ →ₗᵢ[ℝ] ℂ\nh : ↑f 1 = 1\nz : ℂ\n⊢ (↑f z).re = z.re\n[PROOFSTEP]\napply LinearIsometry.re_apply_eq_re_of_add_conj_eq\n[GOAL]\ncase h₃\nf : ℂ →ₗᵢ[ℝ] ℂ\nh : ↑f 1 = 1\nz : ℂ\n⊢ ∀ (z : ℂ), z + ↑(starRingEnd ℂ) z = ↑f z + ↑(starRingEnd ((fun x => ℂ) z)) (↑f z)\n[PROOFSTEP]\nintro z\n[GOAL]\ncase h₃\nf : ℂ →ₗᵢ[ℝ] ℂ\nh : ↑f 1 = 1\nz✝ z : ℂ\n⊢ z + ↑(starRingEnd ℂ) z = ↑f z + ↑(starRingEnd ((fun x => ℂ) z)) (↑f z)\n[PROOFSTEP]\napply LinearIsometry.im_apply_eq_im h\n[GOAL]\nf : ℂ ≃ₗᵢ[ℝ] ℂ\nh : ↑f 1 = 1\n⊢ f = LinearIsometryEquiv.refl ℝ ℂ ∨ f = conjLie\n[PROOFSTEP]\nhave h0 : f I = I ∨ f I = -I :=\n  by\n  simp only [ext_iff, ← and_or_left, neg_re, I_re, neg_im, neg_zero]\n  constructor\n  · rw [← I_re]\n    exact @LinearIsometry.re_apply_eq_re f.toLinearIsometry h I\n  · apply @LinearIsometry.im_apply_eq_im_or_neg_of_re_apply_eq_re f.toLinearIsometry\n    intro z\n    rw [@LinearIsometry.re_apply_eq_re f.toLinearIsometry h]\n[GOAL]\nf : ℂ ≃ₗᵢ[ℝ] ℂ\nh : ↑f 1 = 1\n⊢ ↑f I = I ∨ ↑f I = -I\n[PROOFSTEP]\nsimp only [ext_iff, ← and_or_left, neg_re, I_re, neg_im, neg_zero]\n[GOAL]\nf : ℂ ≃ₗᵢ[ℝ] ℂ\nh : ↑f 1 = 1\n⊢ (↑f I).re = 0 ∧ ((↑f I).im = I.im ∨ (↑f I).im = -I.im)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase left\nf : ℂ ≃ₗᵢ[ℝ] ℂ\nh : ↑f 1 = 1\n⊢ (↑f I).re = 0\n[PROOFSTEP]\nrw [← I_re]\n[GOAL]\ncase left\nf : ℂ ≃ₗᵢ[ℝ] ℂ\nh : ↑f 1 = 1\n⊢ (↑f I).re = I.re\n[PROOFSTEP]\nexact @LinearIsometry.re_apply_eq_re f.toLinearIsometry h I\n[GOAL]\ncase right\nf : ℂ ≃ₗᵢ[ℝ] ℂ\nh : ↑f 1 = 1\n⊢ (↑f I).im = I.im ∨ (↑f I).im = -I.im\n[PROOFSTEP]\napply @LinearIsometry.im_apply_eq_im_or_neg_of_re_apply_eq_re f.toLinearIsometry\n[GOAL]\ncase right.h₂\nf : ℂ ≃ₗᵢ[ℝ] ℂ\nh : ↑f 1 = 1\n⊢ ∀ (z : ℂ), (↑(LinearIsometryEquiv.toLinearIsometry f) z).re = z.re\n[PROOFSTEP]\nintro z\n[GOAL]\ncase right.h₂\nf : ℂ ≃ₗᵢ[ℝ] ℂ\nh : ↑f 1 = 1\nz : ℂ\n⊢ (↑(LinearIsometryEquiv.toLinearIsometry f) z).re = z.re\n[PROOFSTEP]\nrw [@LinearIsometry.re_apply_eq_re f.toLinearIsometry h]\n[GOAL]\nf : ℂ ≃ₗᵢ[ℝ] ℂ\nh : ↑f 1 = 1\nh0 : ↑f I = I ∨ ↑f I = -I\n⊢ f = LinearIsometryEquiv.refl ℝ ℂ ∨ f = conjLie\n[PROOFSTEP]\nrefine' h0.imp (fun h' : f I = I => _) fun h' : f I = -I => _\n[GOAL]\ncase refine'_1\nf : ℂ ≃ₗᵢ[ℝ] ℂ\nh : ↑f 1 = 1\nh0 : ↑f I = I ∨ ↑f I = -I\nh' : ↑f I = I\n⊢ f = LinearIsometryEquiv.refl ℝ ℂ\n[PROOFSTEP]\napply LinearIsometryEquiv.toLinearEquiv_injective\n[GOAL]\ncase refine'_1.a\nf : ℂ ≃ₗᵢ[ℝ] ℂ\nh : ↑f 1 = 1\nh0 : ↑f I = I ∨ ↑f I = -I\nh' : ↑f I = I\n⊢ f.toLinearEquiv = (LinearIsometryEquiv.refl ℝ ℂ).toLinearEquiv\n[PROOFSTEP]\napply Complex.basisOneI.ext'\n[GOAL]\ncase refine'_1.a\nf : ℂ ≃ₗᵢ[ℝ] ℂ\nh : ↑f 1 = 1\nh0 : ↑f I = I ∨ ↑f I = -I\nh' : ↑f I = I\n⊢ ∀ (i : Fin 2), ↑f.toLinearEquiv (↑basisOneI i) = ↑(LinearIsometryEquiv.refl ℝ ℂ).toLinearEquiv (↑basisOneI i)\n[PROOFSTEP]\nintro i\n[GOAL]\ncase refine'_1.a\nf : ℂ ≃ₗᵢ[ℝ] ℂ\nh : ↑f 1 = 1\nh0 : ↑f I = I ∨ ↑f I = -I\nh' : ↑f I = I\ni : Fin 2\n⊢ ↑f.toLinearEquiv (↑basisOneI i) = ↑(LinearIsometryEquiv.refl ℝ ℂ).toLinearEquiv (↑basisOneI i)\n[PROOFSTEP]\nfin_cases i\n[GOAL]\ncase refine'_1.a.head\nf : ℂ ≃ₗᵢ[ℝ] ℂ\nh : ↑f 1 = 1\nh0 : ↑f I = I ∨ ↑f I = -I\nh' : ↑f I = I\n⊢ ↑f.toLinearEquiv (↑basisOneI { val := 0, isLt := (_ : 0 < 2) }) =\n    ↑(LinearIsometryEquiv.refl ℝ ℂ).toLinearEquiv (↑basisOneI { val := 0, isLt := (_ : 0 < 2) })\n[PROOFSTEP]\nsimp [h, h']\n[GOAL]\ncase refine'_1.a.tail.head\nf : ℂ ≃ₗᵢ[ℝ] ℂ\nh : ↑f 1 = 1\nh0 : ↑f I = I ∨ ↑f I = -I\nh' : ↑f I = I\n⊢ ↑f.toLinearEquiv (↑basisOneI { val := 1, isLt := (_ : (fun a => a < 2) 1) }) =\n    ↑(LinearIsometryEquiv.refl ℝ ℂ).toLinearEquiv (↑basisOneI { val := 1, isLt := (_ : (fun a => a < 2) 1) })\n[PROOFSTEP]\nsimp [h, h']\n[GOAL]\ncase refine'_2\nf : ℂ ≃ₗᵢ[ℝ] ℂ\nh : ↑f 1 = 1\nh0 : ↑f I = I ∨ ↑f I = -I\nh' : ↑f I = -I\n⊢ f = conjLie\n[PROOFSTEP]\napply LinearIsometryEquiv.toLinearEquiv_injective\n[GOAL]\ncase refine'_2.a\nf : ℂ ≃ₗᵢ[ℝ] ℂ\nh : ↑f 1 = 1\nh0 : ↑f I = I ∨ ↑f I = -I\nh' : ↑f I = -I\n⊢ f.toLinearEquiv = conjLie.toLinearEquiv\n[PROOFSTEP]\napply Complex.basisOneI.ext'\n[GOAL]\ncase refine'_2.a\nf : ℂ ≃ₗᵢ[ℝ] ℂ\nh : ↑f 1 = 1\nh0 : ↑f I = I ∨ ↑f I = -I\nh' : ↑f I = -I\n⊢ ∀ (i : Fin 2), ↑f.toLinearEquiv (↑basisOneI i) = ↑conjLie.toLinearEquiv (↑basisOneI i)\n[PROOFSTEP]\nintro i\n[GOAL]\ncase refine'_2.a\nf : ℂ ≃ₗᵢ[ℝ] ℂ\nh : ↑f 1 = 1\nh0 : ↑f I = I ∨ ↑f I = -I\nh' : ↑f I = -I\ni : Fin 2\n⊢ ↑f.toLinearEquiv (↑basisOneI i) = ↑conjLie.toLinearEquiv (↑basisOneI i)\n[PROOFSTEP]\nfin_cases i\n[GOAL]\ncase refine'_2.a.head\nf : ℂ ≃ₗᵢ[ℝ] ℂ\nh : ↑f 1 = 1\nh0 : ↑f I = I ∨ ↑f I = -I\nh' : ↑f I = -I\n⊢ ↑f.toLinearEquiv (↑basisOneI { val := 0, isLt := (_ : 0 < 2) }) =\n    ↑conjLie.toLinearEquiv (↑basisOneI { val := 0, isLt := (_ : 0 < 2) })\n[PROOFSTEP]\nsimp [h, h']\n[GOAL]\ncase refine'_2.a.tail.head\nf : ℂ ≃ₗᵢ[ℝ] ℂ\nh : ↑f 1 = 1\nh0 : ↑f I = I ∨ ↑f I = -I\nh' : ↑f I = -I\n⊢ ↑f.toLinearEquiv (↑basisOneI { val := 1, isLt := (_ : (fun a => a < 2) 1) }) =\n    ↑conjLie.toLinearEquiv (↑basisOneI { val := 1, isLt := (_ : (fun a => a < 2) 1) })\n[PROOFSTEP]\nsimp [h, h']\n[GOAL]\nf : ℂ ≃ₗᵢ[ℝ] ℂ\n⊢ ∃ a, f = ↑rotation a ∨ f = LinearIsometryEquiv.trans conjLie (↑rotation a)\n[PROOFSTEP]\nlet a : circle := ⟨f 1, by rw [mem_circle_iff_abs, ← Complex.norm_eq_abs, f.norm_map, norm_one]⟩\n[GOAL]\nf : ℂ ≃ₗᵢ[ℝ] ℂ\n⊢ ↑f 1 ∈ circle\n[PROOFSTEP]\nrw [mem_circle_iff_abs, ← Complex.norm_eq_abs, f.norm_map, norm_one]\n[GOAL]\nf : ℂ ≃ₗᵢ[ℝ] ℂ\na : { x // x ∈ circle } := { val := ↑f 1, property := (_ : ↑f 1 ∈ circle) }\n⊢ ∃ a, f = ↑rotation a ∨ f = LinearIsometryEquiv.trans conjLie (↑rotation a)\n[PROOFSTEP]\nuse a\n[GOAL]\ncase h\nf : ℂ ≃ₗᵢ[ℝ] ℂ\na : { x // x ∈ circle } := { val := ↑f 1, property := (_ : ↑f 1 ∈ circle) }\n⊢ f = ↑rotation a ∨ f = LinearIsometryEquiv.trans conjLie (↑rotation a)\n[PROOFSTEP]\nhave : (f.trans (rotation a).symm) 1 = 1 := by simpa using rotation_apply a⁻¹ (f 1)\n[GOAL]\nf : ℂ ≃ₗᵢ[ℝ] ℂ\na : { x // x ∈ circle } := { val := ↑f 1, property := (_ : ↑f 1 ∈ circle) }\n⊢ ↑(LinearIsometryEquiv.trans f (LinearIsometryEquiv.symm (↑rotation a))) 1 = 1\n[PROOFSTEP]\nsimpa using rotation_apply a⁻¹ (f 1)\n[GOAL]\ncase h\nf : ℂ ≃ₗᵢ[ℝ] ℂ\na : { x // x ∈ circle } := { val := ↑f 1, property := (_ : ↑f 1 ∈ circle) }\nthis : ↑(LinearIsometryEquiv.trans f (LinearIsometryEquiv.symm (↑rotation a))) 1 = 1\n⊢ f = ↑rotation a ∨ f = LinearIsometryEquiv.trans conjLie (↑rotation a)\n[PROOFSTEP]\nrefine' (linear_isometry_complex_aux this).imp (fun h₁ => _) fun h₂ => _\n[GOAL]\ncase h.refine'_1\nf : ℂ ≃ₗᵢ[ℝ] ℂ\na : { x // x ∈ circle } := { val := ↑f 1, property := (_ : ↑f 1 ∈ circle) }\nthis : ↑(LinearIsometryEquiv.trans f (LinearIsometryEquiv.symm (↑rotation a))) 1 = 1\nh₁ : LinearIsometryEquiv.trans f (LinearIsometryEquiv.symm (↑rotation a)) = LinearIsometryEquiv.refl ℝ ℂ\n⊢ f = ↑rotation a\n[PROOFSTEP]\nsimpa using eq_mul_of_inv_mul_eq h₁\n[GOAL]\ncase h.refine'_2\nf : ℂ ≃ₗᵢ[ℝ] ℂ\na : { x // x ∈ circle } := { val := ↑f 1, property := (_ : ↑f 1 ∈ circle) }\nthis : ↑(LinearIsometryEquiv.trans f (LinearIsometryEquiv.symm (↑rotation a))) 1 = 1\nh₂ : LinearIsometryEquiv.trans f (LinearIsometryEquiv.symm (↑rotation a)) = conjLie\n⊢ f = LinearIsometryEquiv.trans conjLie (↑rotation a)\n[PROOFSTEP]\nexact eq_mul_of_inv_mul_eq h₂\n[GOAL]\na : { x // x ∈ circle }\n⊢ (↑a).re ^ 2 + (↑a).im ^ 2 ≠ 0\n[PROOFSTEP]\nsimp [pow_two, ← normSq_apply]\n[GOAL]\na : { x // x ∈ circle }\n⊢ ↑(LinearMap.toMatrix basisOneI basisOneI) ↑(↑rotation a).toLinearEquiv =\n    ↑(Matrix.planeConformalMatrix (↑a).re (↑a).im (_ : (↑a).re ^ 2 + (↑a).im ^ 2 ≠ 0))\n[PROOFSTEP]\next i j\n[GOAL]\ncase a.h\na : { x // x ∈ circle }\ni j : Fin 2\n⊢ ↑(LinearMap.toMatrix basisOneI basisOneI) (↑(↑rotation a).toLinearEquiv) i j =\n    ↑(Matrix.planeConformalMatrix (↑a).re (↑a).im (_ : (↑a).re ^ 2 + (↑a).im ^ 2 ≠ 0)) i j\n[PROOFSTEP]\nsimp [LinearMap.toMatrix_apply]\n[GOAL]\ncase a.h\na : { x // x ∈ circle }\ni j : Fin 2\n⊢ Matrix.vecCons ((↑a).re * (Matrix.vecCons 1 ![I] j).re - (↑a).im * (Matrix.vecCons 1 ![I] j).im)\n      ![(↑a).re * (Matrix.vecCons 1 ![I] j).im + (↑a).im * (Matrix.vecCons 1 ![I] j).re] i =\n    Matrix.vecCons (Matrix.vecCons (↑a).re ![-(↑a).im] j) (fun i => Matrix.vecCons (↑a).im ![(↑a).re] j) i\n[PROOFSTEP]\nfin_cases i\n[GOAL]\ncase a.h.head\na : { x // x ∈ circle }\nj : Fin 2\n⊢ Matrix.vecCons ((↑a).re * (Matrix.vecCons 1 ![I] j).re - (↑a).im * (Matrix.vecCons 1 ![I] j).im)\n      ![(↑a).re * (Matrix.vecCons 1 ![I] j).im + (↑a).im * (Matrix.vecCons 1 ![I] j).re]\n      { val := 0, isLt := (_ : 0 < 2) } =\n    Matrix.vecCons (Matrix.vecCons (↑a).re ![-(↑a).im] j) (fun i => Matrix.vecCons (↑a).im ![(↑a).re] j)\n      { val := 0, isLt := (_ : 0 < 2) }\n[PROOFSTEP]\nfin_cases j\n[GOAL]\ncase a.h.tail.head\na : { x // x ∈ circle }\nj : Fin 2\n⊢ Matrix.vecCons ((↑a).re * (Matrix.vecCons 1 ![I] j).re - (↑a).im * (Matrix.vecCons 1 ![I] j).im)\n      ![(↑a).re * (Matrix.vecCons 1 ![I] j).im + (↑a).im * (Matrix.vecCons 1 ![I] j).re]\n      { val := 1, isLt := (_ : (fun a => a < 2) 1) } =\n    Matrix.vecCons (Matrix.vecCons (↑a).re ![-(↑a).im] j) (fun i => Matrix.vecCons (↑a).im ![(↑a).re] j)\n      { val := 1, isLt := (_ : (fun a => a < 2) 1) }\n[PROOFSTEP]\nfin_cases j\n[GOAL]\ncase a.h.head.head\na : { x // x ∈ circle }\n⊢ Matrix.vecCons\n      ((↑a).re * (Matrix.vecCons 1 ![I] { val := 0, isLt := (_ : 0 < 2) }).re -\n        (↑a).im * (Matrix.vecCons 1 ![I] { val := 0, isLt := (_ : 0 < 2) }).im)\n      ![(↑a).re * (Matrix.vecCons 1 ![I] { val := 0, isLt := (_ : 0 < 2) }).im +\n          (↑a).im * (Matrix.vecCons 1 ![I] { val := 0, isLt := (_ : 0 < 2) }).re]\n      { val := 0, isLt := (_ : 0 < 2) } =\n    Matrix.vecCons (Matrix.vecCons (↑a).re ![-(↑a).im] { val := 0, isLt := (_ : 0 < 2) })\n      (fun i => Matrix.vecCons (↑a).im ![(↑a).re] { val := 0, isLt := (_ : 0 < 2) }) { val := 0, isLt := (_ : 0 < 2) }\n[PROOFSTEP]\nsimp\n[GOAL]\ncase a.h.head.tail.head\na : { x // x ∈ circle }\n⊢ Matrix.vecCons\n      ((↑a).re * (Matrix.vecCons 1 ![I] { val := 1, isLt := (_ : (fun a => a < 2) 1) }).re -\n        (↑a).im * (Matrix.vecCons 1 ![I] { val := 1, isLt := (_ : (fun a => a < 2) 1) }).im)\n      ![(↑a).re * (Matrix.vecCons 1 ![I] { val := 1, isLt := (_ : (fun a => a < 2) 1) }).im +\n          (↑a).im * (Matrix.vecCons 1 ![I] { val := 1, isLt := (_ : (fun a => a < 2) 1) }).re]\n      { val := 0, isLt := (_ : 0 < 2) } =\n    Matrix.vecCons (Matrix.vecCons (↑a).re ![-(↑a).im] { val := 1, isLt := (_ : (fun a => a < 2) 1) })\n      (fun i => Matrix.vecCons (↑a).im ![(↑a).re] { val := 1, isLt := (_ : (fun a => a < 2) 1) })\n      { val := 0, isLt := (_ : 0 < 2) }\n[PROOFSTEP]\nsimp\n[GOAL]\ncase a.h.tail.head.head\na : { x // x ∈ circle }\n⊢ Matrix.vecCons\n      ((↑a).re * (Matrix.vecCons 1 ![I] { val := 0, isLt := (_ : 0 < 2) }).re -\n        (↑a).im * (Matrix.vecCons 1 ![I] { val := 0, isLt := (_ : 0 < 2) }).im)\n      ![(↑a).re * (Matrix.vecCons 1 ![I] { val := 0, isLt := (_ : 0 < 2) }).im +\n          (↑a).im * (Matrix.vecCons 1 ![I] { val := 0, isLt := (_ : 0 < 2) }).re]\n      { val := 1, isLt := (_ : (fun a => a < 2) 1) } =\n    Matrix.vecCons (Matrix.vecCons (↑a).re ![-(↑a).im] { val := 0, isLt := (_ : 0 < 2) })\n      (fun i => Matrix.vecCons (↑a).im ![(↑a).re] { val := 0, isLt := (_ : 0 < 2) })\n      { val := 1, isLt := (_ : (fun a => a < 2) 1) }\n[PROOFSTEP]\nsimp\n[GOAL]\ncase a.h.tail.head.tail.head\na : { x // x ∈ circle }\n⊢ Matrix.vecCons\n      ((↑a).re * (Matrix.vecCons 1 ![I] { val := 1, isLt := (_ : (fun a => a < 2) 1) }).re -\n        (↑a).im * (Matrix.vecCons 1 ![I] { val := 1, isLt := (_ : (fun a => a < 2) 1) }).im)\n      ![(↑a).re * (Matrix.vecCons 1 ![I] { val := 1, isLt := (_ : (fun a => a < 2) 1) }).im +\n          (↑a).im * (Matrix.vecCons 1 ![I] { val := 1, isLt := (_ : (fun a => a < 2) 1) }).re]\n      { val := 1, isLt := (_ : (fun a => a < 2) 1) } =\n    Matrix.vecCons (Matrix.vecCons (↑a).re ![-(↑a).im] { val := 1, isLt := (_ : (fun a => a < 2) 1) })\n      (fun i => Matrix.vecCons (↑a).im ![(↑a).re] { val := 1, isLt := (_ : (fun a => a < 2) 1) })\n      { val := 1, isLt := (_ : (fun a => a < 2) 1) }\n[PROOFSTEP]\nsimp\n[GOAL]\na : { x // x ∈ circle }\n⊢ ↑LinearMap.det ↑(↑rotation a).toLinearEquiv = 1\n[PROOFSTEP]\nrw [← LinearMap.det_toMatrix basisOneI, toMatrix_rotation, Matrix.det_fin_two]\n[GOAL]\na : { x // x ∈ circle }\n⊢ ↑(Matrix.planeConformalMatrix (↑a).re (↑a).im (_ : (↑a).re ^ 2 + (↑a).im ^ 2 ≠ 0)) 0 0 *\n        ↑(Matrix.planeConformalMatrix (↑a).re (↑a).im (_ : (↑a).re ^ 2 + (↑a).im ^ 2 ≠ 0)) 1 1 -\n      ↑(Matrix.planeConformalMatrix (↑a).re (↑a).im (_ : (↑a).re ^ 2 + (↑a).im ^ 2 ≠ 0)) 0 1 *\n        ↑(Matrix.planeConformalMatrix (↑a).re (↑a).im (_ : (↑a).re ^ 2 + (↑a).im ^ 2 ≠ 0)) 1 0 =\n    1\n[PROOFSTEP]\nsimp [← normSq_apply]\n[GOAL]\na : { x // x ∈ circle }\n⊢ ↑LinearEquiv.det (↑rotation a).toLinearEquiv = 1\n[PROOFSTEP]\nrw [← Units.eq_iff, LinearEquiv.coe_det, det_rotation, Units.val_one]\n", "meta": {"mathlib_filename": "Mathlib.Analysis.Complex.Isometry", "llama_tokens": 9999, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.815232489352, "lm_q2_score": 0.6224593382055109, "lm_q1q2_score": 0.5074490758056771}}
{"text": "[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx y : E\ns t : Set E\nr : 𝕜\nhr₀ : r ≠ 0\nhr : ‖r‖ < 1\nhs : ∀ᶠ (n : ℕ) in atTop, x + r ^ n • y ∈ s\n⊢ y ∈ tangentConeAt 𝕜 s x\n[PROOFSTEP]\nrefine ⟨fun n ↦ (r ^ n)⁻¹, fun n ↦ r ^ n • y, hs, ?_, ?_⟩\n[GOAL]\ncase refine_1\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx y : E\ns t : Set E\nr : 𝕜\nhr₀ : r ≠ 0\nhr : ‖r‖ < 1\nhs : ∀ᶠ (n : ℕ) in atTop, x + r ^ n • y ∈ s\n⊢ Tendsto (fun n => ‖(fun n => (r ^ n)⁻¹) n‖) atTop atTop\n[PROOFSTEP]\nsimp only [norm_inv, norm_pow, ← inv_pow]\n[GOAL]\ncase refine_1\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx y : E\ns t : Set E\nr : 𝕜\nhr₀ : r ≠ 0\nhr : ‖r‖ < 1\nhs : ∀ᶠ (n : ℕ) in atTop, x + r ^ n • y ∈ s\n⊢ Tendsto (fun n => ‖r‖⁻¹ ^ n) atTop atTop\n[PROOFSTEP]\nexact tendsto_pow_atTop_atTop_of_one_lt <| one_lt_inv (norm_pos_iff.2 hr₀) hr\n[GOAL]\ncase refine_2\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx y : E\ns t : Set E\nr : 𝕜\nhr₀ : r ≠ 0\nhr : ‖r‖ < 1\nhs : ∀ᶠ (n : ℕ) in atTop, x + r ^ n • y ∈ s\n⊢ Tendsto (fun n => (fun n => (r ^ n)⁻¹) n • (fun n => r ^ n • y) n) atTop (𝓝 y)\n[PROOFSTEP]\nsimp only [inv_smul_smul₀ (pow_ne_zero _ hr₀), tendsto_const_nhds]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx y : E\ns t : Set E\nh : s ⊆ t\n⊢ tangentConeAt 𝕜 s x ⊆ tangentConeAt 𝕜 t x\n[PROOFSTEP]\nrintro y ⟨c, d, ds, ctop, clim⟩\n[GOAL]\ncase intro.intro.intro.intro\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx y✝ : E\ns t : Set E\nh : s ⊆ t\ny : E\nc : ℕ → 𝕜\nd : ℕ → E\nds : ∀ᶠ (n : ℕ) in atTop, x + d n ∈ s\nctop : Tendsto (fun n => ‖c n‖) atTop atTop\nclim : Tendsto (fun n => c n • d n) atTop (𝓝 y)\n⊢ y ∈ tangentConeAt 𝕜 t x\n[PROOFSTEP]\nexact ⟨c, d, mem_of_superset ds fun n hn => h hn, ctop, clim⟩\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx y : E\ns t : Set E\nα : Type u_5\nl : Filter α\nc : α → 𝕜\nd : α → E\nhc : Tendsto (fun n => ‖c n‖) l atTop\nhd : Tendsto (fun n => c n • d n) l (𝓝 y)\n⊢ Tendsto d l (𝓝 0)\n[PROOFSTEP]\nhave A : Tendsto (fun n => ‖c n‖⁻¹) l (𝓝 0) := tendsto_inv_atTop_zero.comp hc\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx y : E\ns t : Set E\nα : Type u_5\nl : Filter α\nc : α → 𝕜\nd : α → E\nhc : Tendsto (fun n => ‖c n‖) l atTop\nhd : Tendsto (fun n => c n • d n) l (𝓝 y)\nA : Tendsto (fun n => ‖c n‖⁻¹) l (𝓝 0)\n⊢ Tendsto d l (𝓝 0)\n[PROOFSTEP]\nhave B : Tendsto (fun n => ‖c n • d n‖) l (𝓝 ‖y‖) := (continuous_norm.tendsto _).comp hd\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx y : E\ns t : Set E\nα : Type u_5\nl : Filter α\nc : α → 𝕜\nd : α → E\nhc : Tendsto (fun n => ‖c n‖) l atTop\nhd : Tendsto (fun n => c n • d n) l (𝓝 y)\nA : Tendsto (fun n => ‖c n‖⁻¹) l (𝓝 0)\nB : Tendsto (fun n => ‖c n • d n‖) l (𝓝 ‖y‖)\n⊢ Tendsto d l (𝓝 0)\n[PROOFSTEP]\nhave C : Tendsto (fun n => ‖c n‖⁻¹ * ‖c n • d n‖) l (𝓝 (0 * ‖y‖)) := A.mul B\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx y : E\ns t : Set E\nα : Type u_5\nl : Filter α\nc : α → 𝕜\nd : α → E\nhc : Tendsto (fun n => ‖c n‖) l atTop\nhd : Tendsto (fun n => c n • d n) l (𝓝 y)\nA : Tendsto (fun n => ‖c n‖⁻¹) l (𝓝 0)\nB : Tendsto (fun n => ‖c n • d n‖) l (𝓝 ‖y‖)\nC : Tendsto (fun n => ‖c n‖⁻¹ * ‖c n • d n‖) l (𝓝 (0 * ‖y‖))\n⊢ Tendsto d l (𝓝 0)\n[PROOFSTEP]\nrw [zero_mul] at C \n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx y : E\ns t : Set E\nα : Type u_5\nl : Filter α\nc : α → 𝕜\nd : α → E\nhc : Tendsto (fun n => ‖c n‖) l atTop\nhd : Tendsto (fun n => c n • d n) l (𝓝 y)\nA : Tendsto (fun n => ‖c n‖⁻¹) l (𝓝 0)\nB : Tendsto (fun n => ‖c n • d n‖) l (𝓝 ‖y‖)\nC : Tendsto (fun n => ‖c n‖⁻¹ * ‖c n • d n‖) l (𝓝 0)\n⊢ Tendsto d l (𝓝 0)\n[PROOFSTEP]\nhave : ∀ᶠ n in l, ‖c n‖⁻¹ * ‖c n • d n‖ = ‖d n‖ :=\n  by\n  refine (eventually_ne_of_tendsto_norm_atTop hc 0).mono fun n hn => ?_\n  rw [norm_smul, ← mul_assoc, inv_mul_cancel, one_mul]\n  rwa [Ne.def, norm_eq_zero]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx y : E\ns t : Set E\nα : Type u_5\nl : Filter α\nc : α → 𝕜\nd : α → E\nhc : Tendsto (fun n => ‖c n‖) l atTop\nhd : Tendsto (fun n => c n • d n) l (𝓝 y)\nA : Tendsto (fun n => ‖c n‖⁻¹) l (𝓝 0)\nB : Tendsto (fun n => ‖c n • d n‖) l (𝓝 ‖y‖)\nC : Tendsto (fun n => ‖c n‖⁻¹ * ‖c n • d n‖) l (𝓝 0)\n⊢ ∀ᶠ (n : α) in l, ‖c n‖⁻¹ * ‖c n • d n‖ = ‖d n‖\n[PROOFSTEP]\nrefine (eventually_ne_of_tendsto_norm_atTop hc 0).mono fun n hn => ?_\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx y : E\ns t : Set E\nα : Type u_5\nl : Filter α\nc : α → 𝕜\nd : α → E\nhc : Tendsto (fun n => ‖c n‖) l atTop\nhd : Tendsto (fun n => c n • d n) l (𝓝 y)\nA : Tendsto (fun n => ‖c n‖⁻¹) l (𝓝 0)\nB : Tendsto (fun n => ‖c n • d n‖) l (𝓝 ‖y‖)\nC : Tendsto (fun n => ‖c n‖⁻¹ * ‖c n • d n‖) l (𝓝 0)\nn : α\nhn : c n ≠ 0\n⊢ ‖c n‖⁻¹ * ‖c n • d n‖ = ‖d n‖\n[PROOFSTEP]\nrw [norm_smul, ← mul_assoc, inv_mul_cancel, one_mul]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx y : E\ns t : Set E\nα : Type u_5\nl : Filter α\nc : α → 𝕜\nd : α → E\nhc : Tendsto (fun n => ‖c n‖) l atTop\nhd : Tendsto (fun n => c n • d n) l (𝓝 y)\nA : Tendsto (fun n => ‖c n‖⁻¹) l (𝓝 0)\nB : Tendsto (fun n => ‖c n • d n‖) l (𝓝 ‖y‖)\nC : Tendsto (fun n => ‖c n‖⁻¹ * ‖c n • d n‖) l (𝓝 0)\nn : α\nhn : c n ≠ 0\n⊢ ‖c n‖ ≠ 0\n[PROOFSTEP]\nrwa [Ne.def, norm_eq_zero]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx y : E\ns t : Set E\nα : Type u_5\nl : Filter α\nc : α → 𝕜\nd : α → E\nhc : Tendsto (fun n => ‖c n‖) l atTop\nhd : Tendsto (fun n => c n • d n) l (𝓝 y)\nA : Tendsto (fun n => ‖c n‖⁻¹) l (𝓝 0)\nB : Tendsto (fun n => ‖c n • d n‖) l (𝓝 ‖y‖)\nC : Tendsto (fun n => ‖c n‖⁻¹ * ‖c n • d n‖) l (𝓝 0)\nthis : ∀ᶠ (n : α) in l, ‖c n‖⁻¹ * ‖c n • d n‖ = ‖d n‖\n⊢ Tendsto d l (𝓝 0)\n[PROOFSTEP]\nhave D : Tendsto (fun n => ‖d n‖) l (𝓝 0) := Tendsto.congr' this C\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx y : E\ns t : Set E\nα : Type u_5\nl : Filter α\nc : α → 𝕜\nd : α → E\nhc : Tendsto (fun n => ‖c n‖) l atTop\nhd : Tendsto (fun n => c n • d n) l (𝓝 y)\nA : Tendsto (fun n => ‖c n‖⁻¹) l (𝓝 0)\nB : Tendsto (fun n => ‖c n • d n‖) l (𝓝 ‖y‖)\nC : Tendsto (fun n => ‖c n‖⁻¹ * ‖c n • d n‖) l (𝓝 0)\nthis : ∀ᶠ (n : α) in l, ‖c n‖⁻¹ * ‖c n • d n‖ = ‖d n‖\nD : Tendsto (fun n => ‖d n‖) l (𝓝 0)\n⊢ Tendsto d l (𝓝 0)\n[PROOFSTEP]\nrw [tendsto_zero_iff_norm_tendsto_zero]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx y : E\ns t : Set E\nα : Type u_5\nl : Filter α\nc : α → 𝕜\nd : α → E\nhc : Tendsto (fun n => ‖c n‖) l atTop\nhd : Tendsto (fun n => c n • d n) l (𝓝 y)\nA : Tendsto (fun n => ‖c n‖⁻¹) l (𝓝 0)\nB : Tendsto (fun n => ‖c n • d n‖) l (𝓝 ‖y‖)\nC : Tendsto (fun n => ‖c n‖⁻¹ * ‖c n • d n‖) l (𝓝 0)\nthis : ∀ᶠ (n : α) in l, ‖c n‖⁻¹ * ‖c n • d n‖ = ‖d n‖\nD : Tendsto (fun n => ‖d n‖) l (𝓝 0)\n⊢ Tendsto (fun e => ‖d e‖) l (𝓝 0)\n[PROOFSTEP]\nexact D\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx y : E\ns t : Set E\nh : 𝓝[s] x ≤ 𝓝[t] x\n⊢ tangentConeAt 𝕜 s x ⊆ tangentConeAt 𝕜 t x\n[PROOFSTEP]\nrintro y ⟨c, d, ds, ctop, clim⟩\n[GOAL]\ncase intro.intro.intro.intro\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx y✝ : E\ns t : Set E\nh : 𝓝[s] x ≤ 𝓝[t] x\ny : E\nc : ℕ → 𝕜\nd : ℕ → E\nds : ∀ᶠ (n : ℕ) in atTop, x + d n ∈ s\nctop : Tendsto (fun n => ‖c n‖) atTop atTop\nclim : Tendsto (fun n => c n • d n) atTop (𝓝 y)\n⊢ y ∈ tangentConeAt 𝕜 t x\n[PROOFSTEP]\nrefine' ⟨c, d, _, ctop, clim⟩\n[GOAL]\ncase intro.intro.intro.intro\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx y✝ : E\ns t : Set E\nh : 𝓝[s] x ≤ 𝓝[t] x\ny : E\nc : ℕ → 𝕜\nd : ℕ → E\nds : ∀ᶠ (n : ℕ) in atTop, x + d n ∈ s\nctop : Tendsto (fun n => ‖c n‖) atTop atTop\nclim : Tendsto (fun n => c n • d n) atTop (𝓝 y)\n⊢ ∀ᶠ (n : ℕ) in atTop, x + d n ∈ t\n[PROOFSTEP]\nsuffices : Tendsto (fun n => x + d n) atTop (𝓝[t] x)\n[GOAL]\ncase intro.intro.intro.intro\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx y✝ : E\ns t : Set E\nh : 𝓝[s] x ≤ 𝓝[t] x\ny : E\nc : ℕ → 𝕜\nd : ℕ → E\nds : ∀ᶠ (n : ℕ) in atTop, x + d n ∈ s\nctop : Tendsto (fun n => ‖c n‖) atTop atTop\nclim : Tendsto (fun n => c n • d n) atTop (𝓝 y)\nthis : Tendsto (fun n => x + d n) atTop (𝓝[t] x)\n⊢ ∀ᶠ (n : ℕ) in atTop, x + d n ∈ t\ncase this\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx y✝ : E\ns t : Set E\nh : 𝓝[s] x ≤ 𝓝[t] x\ny : E\nc : ℕ → 𝕜\nd : ℕ → E\nds : ∀ᶠ (n : ℕ) in atTop, x + d n ∈ s\nctop : Tendsto (fun n => ‖c n‖) atTop atTop\nclim : Tendsto (fun n => c n • d n) atTop (𝓝 y)\n⊢ Tendsto (fun n => x + d n) atTop (𝓝[t] x)\n[PROOFSTEP]\nexact tendsto_principal.1 (tendsto_inf.1 this).2\n[GOAL]\ncase this\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx y✝ : E\ns t : Set E\nh : 𝓝[s] x ≤ 𝓝[t] x\ny : E\nc : ℕ → 𝕜\nd : ℕ → E\nds : ∀ᶠ (n : ℕ) in atTop, x + d n ∈ s\nctop : Tendsto (fun n => ‖c n‖) atTop atTop\nclim : Tendsto (fun n => c n • d n) atTop (𝓝 y)\n⊢ Tendsto (fun n => x + d n) atTop (𝓝[t] x)\n[PROOFSTEP]\nrefine' (tendsto_inf.2 ⟨_, tendsto_principal.2 ds⟩).mono_right h\n[GOAL]\ncase this\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx y✝ : E\ns t : Set E\nh : 𝓝[s] x ≤ 𝓝[t] x\ny : E\nc : ℕ → 𝕜\nd : ℕ → E\nds : ∀ᶠ (n : ℕ) in atTop, x + d n ∈ s\nctop : Tendsto (fun n => ‖c n‖) atTop atTop\nclim : Tendsto (fun n => c n • d n) atTop (𝓝 y)\n⊢ Tendsto (fun a => x + d a) atTop (𝓝 x)\n[PROOFSTEP]\nsimpa only [add_zero] using tendsto_const_nhds.add (tangentConeAt.lim_zero atTop ctop clim)\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx y✝ : E\ns t✝ : Set E\nt : Set F\ny : F\nht : y ∈ closure t\n⊢ ↑(LinearMap.inl 𝕜 E F) '' tangentConeAt 𝕜 s x ⊆ tangentConeAt 𝕜 (s ×ˢ t) (x, y)\n[PROOFSTEP]\nrintro _ ⟨v, ⟨c, d, hd, hc, hy⟩, rfl⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx y✝ : E\ns t✝ : Set E\nt : Set F\ny : F\nht : y ∈ closure t\nv : E\nc : ℕ → 𝕜\nd : ℕ → E\nhd : ∀ᶠ (n : ℕ) in atTop, x + d n ∈ s\nhc : Tendsto (fun n => ‖c n‖) atTop atTop\nhy : Tendsto (fun n => c n • d n) atTop (𝓝 v)\n⊢ ↑(LinearMap.inl 𝕜 E F) v ∈ tangentConeAt 𝕜 (s ×ˢ t) (x, y)\n[PROOFSTEP]\nhave : ∀ n, ∃ d', y + d' ∈ t ∧ ‖c n • d'‖ < ((1 : ℝ) / 2) ^ n :=\n  by\n  intro n\n  rcases mem_closure_iff_nhds.1 ht _ (eventually_nhds_norm_smul_sub_lt (c n) y (pow_pos one_half_pos n)) with\n    ⟨z, hz, hzt⟩\n  exact ⟨z - y, by simpa using hzt, by simpa using hz⟩\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx y✝ : E\ns t✝ : Set E\nt : Set F\ny : F\nht : y ∈ closure t\nv : E\nc : ℕ → 𝕜\nd : ℕ → E\nhd : ∀ᶠ (n : ℕ) in atTop, x + d n ∈ s\nhc : Tendsto (fun n => ‖c n‖) atTop atTop\nhy : Tendsto (fun n => c n • d n) atTop (𝓝 v)\n⊢ ∀ (n : ℕ), ∃ d', y + d' ∈ t ∧ ‖c n • d'‖ < (1 / 2) ^ n\n[PROOFSTEP]\nintro n\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx y✝ : E\ns t✝ : Set E\nt : Set F\ny : F\nht : y ∈ closure t\nv : E\nc : ℕ → 𝕜\nd : ℕ → E\nhd : ∀ᶠ (n : ℕ) in atTop, x + d n ∈ s\nhc : Tendsto (fun n => ‖c n‖) atTop atTop\nhy : Tendsto (fun n => c n • d n) atTop (𝓝 v)\nn : ℕ\n⊢ ∃ d', y + d' ∈ t ∧ ‖c n • d'‖ < (1 / 2) ^ n\n[PROOFSTEP]\nrcases mem_closure_iff_nhds.1 ht _ (eventually_nhds_norm_smul_sub_lt (c n) y (pow_pos one_half_pos n)) with ⟨z, hz, hzt⟩\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx y✝ : E\ns t✝ : Set E\nt : Set F\ny : F\nht : y ∈ closure t\nv : E\nc : ℕ → 𝕜\nd : ℕ → E\nhd : ∀ᶠ (n : ℕ) in atTop, x + d n ∈ s\nhc : Tendsto (fun n => ‖c n‖) atTop atTop\nhy : Tendsto (fun n => c n • d n) atTop (𝓝 v)\nn : ℕ\nz : F\nhz : z ∈ {x | (fun y_1 => ‖c n • (y_1 - y)‖ < (1 / 2) ^ n) x}\nhzt : z ∈ t\n⊢ ∃ d', y + d' ∈ t ∧ ‖c n • d'‖ < (1 / 2) ^ n\n[PROOFSTEP]\nexact ⟨z - y, by simpa using hzt, by simpa using hz⟩\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx y✝ : E\ns t✝ : Set E\nt : Set F\ny : F\nht : y ∈ closure t\nv : E\nc : ℕ → 𝕜\nd : ℕ → E\nhd : ∀ᶠ (n : ℕ) in atTop, x + d n ∈ s\nhc : Tendsto (fun n => ‖c n‖) atTop atTop\nhy : Tendsto (fun n => c n • d n) atTop (𝓝 v)\nn : ℕ\nz : F\nhz : z ∈ {x | (fun y_1 => ‖c n • (y_1 - y)‖ < (1 / 2) ^ n) x}\nhzt : z ∈ t\n⊢ y + (z - y) ∈ t\n[PROOFSTEP]\nsimpa using hzt\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx y✝ : E\ns t✝ : Set E\nt : Set F\ny : F\nht : y ∈ closure t\nv : E\nc : ℕ → 𝕜\nd : ℕ → E\nhd : ∀ᶠ (n : ℕ) in atTop, x + d n ∈ s\nhc : Tendsto (fun n => ‖c n‖) atTop atTop\nhy : Tendsto (fun n => c n • d n) atTop (𝓝 v)\nn : ℕ\nz : F\nhz : z ∈ {x | (fun y_1 => ‖c n • (y_1 - y)‖ < (1 / 2) ^ n) x}\nhzt : z ∈ t\n⊢ ‖c n • (z - y)‖ < (1 / 2) ^ n\n[PROOFSTEP]\nsimpa using hz\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx y✝ : E\ns t✝ : Set E\nt : Set F\ny : F\nht : y ∈ closure t\nv : E\nc : ℕ → 𝕜\nd : ℕ → E\nhd : ∀ᶠ (n : ℕ) in atTop, x + d n ∈ s\nhc : Tendsto (fun n => ‖c n‖) atTop atTop\nhy : Tendsto (fun n => c n • d n) atTop (𝓝 v)\nthis : ∀ (n : ℕ), ∃ d', y + d' ∈ t ∧ ‖c n • d'‖ < (1 / 2) ^ n\n⊢ ↑(LinearMap.inl 𝕜 E F) v ∈ tangentConeAt 𝕜 (s ×ˢ t) (x, y)\n[PROOFSTEP]\nchoose d' hd' using this\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx y✝ : E\ns t✝ : Set E\nt : Set F\ny : F\nht : y ∈ closure t\nv : E\nc : ℕ → 𝕜\nd : ℕ → E\nhd : ∀ᶠ (n : ℕ) in atTop, x + d n ∈ s\nhc : Tendsto (fun n => ‖c n‖) atTop atTop\nhy : Tendsto (fun n => c n • d n) atTop (𝓝 v)\nd' : ℕ → F\nhd' : ∀ (n : ℕ), y + d' n ∈ t ∧ ‖c n • d' n‖ < (1 / 2) ^ n\n⊢ ↑(LinearMap.inl 𝕜 E F) v ∈ tangentConeAt 𝕜 (s ×ˢ t) (x, y)\n[PROOFSTEP]\nrefine' ⟨c, fun n => (d n, d' n), _, hc, _⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.refine'_1\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx y✝ : E\ns t✝ : Set E\nt : Set F\ny : F\nht : y ∈ closure t\nv : E\nc : ℕ → 𝕜\nd : ℕ → E\nhd : ∀ᶠ (n : ℕ) in atTop, x + d n ∈ s\nhc : Tendsto (fun n => ‖c n‖) atTop atTop\nhy : Tendsto (fun n => c n • d n) atTop (𝓝 v)\nd' : ℕ → F\nhd' : ∀ (n : ℕ), y + d' n ∈ t ∧ ‖c n • d' n‖ < (1 / 2) ^ n\n⊢ ∀ᶠ (n : ℕ) in atTop, (x, y) + (fun n => (d n, d' n)) n ∈ s ×ˢ t\ncase intro.intro.intro.intro.intro.intro.refine'_2\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx y✝ : E\ns t✝ : Set E\nt : Set F\ny : F\nht : y ∈ closure t\nv : E\nc : ℕ → 𝕜\nd : ℕ → E\nhd : ∀ᶠ (n : ℕ) in atTop, x + d n ∈ s\nhc : Tendsto (fun n => ‖c n‖) atTop atTop\nhy : Tendsto (fun n => c n • d n) atTop (𝓝 v)\nd' : ℕ → F\nhd' : ∀ (n : ℕ), y + d' n ∈ t ∧ ‖c n • d' n‖ < (1 / 2) ^ n\n⊢ Tendsto (fun n => c n • (fun n => (d n, d' n)) n) atTop (𝓝 (↑(LinearMap.inl 𝕜 E F) v))\n[PROOFSTEP]\nshow ∀ᶠ n in atTop, (x, y) + (d n, d' n) ∈ s ×ˢ t\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.refine'_1\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx y✝ : E\ns t✝ : Set E\nt : Set F\ny : F\nht : y ∈ closure t\nv : E\nc : ℕ → 𝕜\nd : ℕ → E\nhd : ∀ᶠ (n : ℕ) in atTop, x + d n ∈ s\nhc : Tendsto (fun n => ‖c n‖) atTop atTop\nhy : Tendsto (fun n => c n • d n) atTop (𝓝 v)\nd' : ℕ → F\nhd' : ∀ (n : ℕ), y + d' n ∈ t ∧ ‖c n • d' n‖ < (1 / 2) ^ n\n⊢ ∀ᶠ (n : ℕ) in atTop, (x, y) + (d n, d' n) ∈ s ×ˢ t\n[PROOFSTEP]\nfilter_upwards [hd] with n hn\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx y✝ : E\ns t✝ : Set E\nt : Set F\ny : F\nht : y ∈ closure t\nv : E\nc : ℕ → 𝕜\nd : ℕ → E\nhd : ∀ᶠ (n : ℕ) in atTop, x + d n ∈ s\nhc : Tendsto (fun n => ‖c n‖) atTop atTop\nhy : Tendsto (fun n => c n • d n) atTop (𝓝 v)\nd' : ℕ → F\nhd' : ∀ (n : ℕ), y + d' n ∈ t ∧ ‖c n • d' n‖ < (1 / 2) ^ n\nn : ℕ\nhn : x + d n ∈ s\n⊢ (x, y) + (d n, d' n) ∈ s ×ˢ t\n[PROOFSTEP]\nsimp [hn, (hd' n).1]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.refine'_2\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx y✝ : E\ns t✝ : Set E\nt : Set F\ny : F\nht : y ∈ closure t\nv : E\nc : ℕ → 𝕜\nd : ℕ → E\nhd : ∀ᶠ (n : ℕ) in atTop, x + d n ∈ s\nhc : Tendsto (fun n => ‖c n‖) atTop atTop\nhy : Tendsto (fun n => c n • d n) atTop (𝓝 v)\nd' : ℕ → F\nhd' : ∀ (n : ℕ), y + d' n ∈ t ∧ ‖c n • d' n‖ < (1 / 2) ^ n\n⊢ Tendsto (fun n => c n • (fun n => (d n, d' n)) n) atTop (𝓝 (↑(LinearMap.inl 𝕜 E F) v))\n[PROOFSTEP]\napply Tendsto.prod_mk_nhds hy _\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx y✝ : E\ns t✝ : Set E\nt : Set F\ny : F\nht : y ∈ closure t\nv : E\nc : ℕ → 𝕜\nd : ℕ → E\nhd : ∀ᶠ (n : ℕ) in atTop, x + d n ∈ s\nhc : Tendsto (fun n => ‖c n‖) atTop atTop\nhy : Tendsto (fun n => c n • d n) atTop (𝓝 v)\nd' : ℕ → F\nhd' : ∀ (n : ℕ), y + d' n ∈ t ∧ ‖c n • d' n‖ < (1 / 2) ^ n\n⊢ Tendsto (fun c_1 => c c_1 • ((fun n => (d n, d' n)) c_1).snd) atTop (𝓝 (↑0 v))\n[PROOFSTEP]\nrefine' squeeze_zero_norm (fun n => (hd' n).2.le) _\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx y✝ : E\ns t✝ : Set E\nt : Set F\ny : F\nht : y ∈ closure t\nv : E\nc : ℕ → 𝕜\nd : ℕ → E\nhd : ∀ᶠ (n : ℕ) in atTop, x + d n ∈ s\nhc : Tendsto (fun n => ‖c n‖) atTop atTop\nhy : Tendsto (fun n => c n • d n) atTop (𝓝 v)\nd' : ℕ → F\nhd' : ∀ (n : ℕ), y + d' n ∈ t ∧ ‖c n • d' n‖ < (1 / 2) ^ n\n⊢ Tendsto (fun n => (1 / 2) ^ n) atTop (𝓝 0)\n[PROOFSTEP]\nexact tendsto_pow_atTop_nhds_0_of_lt_1 one_half_pos.le one_half_lt_one\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx y✝ : E\ns t✝ : Set E\nt : Set F\ny : F\nhs : x ∈ closure s\n⊢ ↑(LinearMap.inr 𝕜 E F) '' tangentConeAt 𝕜 t y ⊆ tangentConeAt 𝕜 (s ×ˢ t) (x, y)\n[PROOFSTEP]\nrintro _ ⟨w, ⟨c, d, hd, hc, hy⟩, rfl⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx y✝ : E\ns t✝ : Set E\nt : Set F\ny : F\nhs : x ∈ closure s\nw : F\nc : ℕ → 𝕜\nd : ℕ → F\nhd : ∀ᶠ (n : ℕ) in atTop, y + d n ∈ t\nhc : Tendsto (fun n => ‖c n‖) atTop atTop\nhy : Tendsto (fun n => c n • d n) atTop (𝓝 w)\n⊢ ↑(LinearMap.inr 𝕜 E F) w ∈ tangentConeAt 𝕜 (s ×ˢ t) (x, y)\n[PROOFSTEP]\nhave : ∀ n, ∃ d', x + d' ∈ s ∧ ‖c n • d'‖ < ((1 : ℝ) / 2) ^ n :=\n  by\n  intro n\n  rcases mem_closure_iff_nhds.1 hs _ (eventually_nhds_norm_smul_sub_lt (c n) x (pow_pos one_half_pos n)) with\n    ⟨z, hz, hzs⟩\n  exact ⟨z - x, by simpa using hzs, by simpa using hz⟩\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx y✝ : E\ns t✝ : Set E\nt : Set F\ny : F\nhs : x ∈ closure s\nw : F\nc : ℕ → 𝕜\nd : ℕ → F\nhd : ∀ᶠ (n : ℕ) in atTop, y + d n ∈ t\nhc : Tendsto (fun n => ‖c n‖) atTop atTop\nhy : Tendsto (fun n => c n • d n) atTop (𝓝 w)\n⊢ ∀ (n : ℕ), ∃ d', x + d' ∈ s ∧ ‖c n • d'‖ < (1 / 2) ^ n\n[PROOFSTEP]\nintro n\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx y✝ : E\ns t✝ : Set E\nt : Set F\ny : F\nhs : x ∈ closure s\nw : F\nc : ℕ → 𝕜\nd : ℕ → F\nhd : ∀ᶠ (n : ℕ) in atTop, y + d n ∈ t\nhc : Tendsto (fun n => ‖c n‖) atTop atTop\nhy : Tendsto (fun n => c n • d n) atTop (𝓝 w)\nn : ℕ\n⊢ ∃ d', x + d' ∈ s ∧ ‖c n • d'‖ < (1 / 2) ^ n\n[PROOFSTEP]\nrcases mem_closure_iff_nhds.1 hs _ (eventually_nhds_norm_smul_sub_lt (c n) x (pow_pos one_half_pos n)) with ⟨z, hz, hzs⟩\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx y✝ : E\ns t✝ : Set E\nt : Set F\ny : F\nhs : x ∈ closure s\nw : F\nc : ℕ → 𝕜\nd : ℕ → F\nhd : ∀ᶠ (n : ℕ) in atTop, y + d n ∈ t\nhc : Tendsto (fun n => ‖c n‖) atTop atTop\nhy : Tendsto (fun n => c n • d n) atTop (𝓝 w)\nn : ℕ\nz : E\nhz : z ∈ {x_1 | (fun y => ‖c n • (y - x)‖ < (1 / 2) ^ n) x_1}\nhzs : z ∈ s\n⊢ ∃ d', x + d' ∈ s ∧ ‖c n • d'‖ < (1 / 2) ^ n\n[PROOFSTEP]\nexact ⟨z - x, by simpa using hzs, by simpa using hz⟩\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx y✝ : E\ns t✝ : Set E\nt : Set F\ny : F\nhs : x ∈ closure s\nw : F\nc : ℕ → 𝕜\nd : ℕ → F\nhd : ∀ᶠ (n : ℕ) in atTop, y + d n ∈ t\nhc : Tendsto (fun n => ‖c n‖) atTop atTop\nhy : Tendsto (fun n => c n • d n) atTop (𝓝 w)\nn : ℕ\nz : E\nhz : z ∈ {x_1 | (fun y => ‖c n • (y - x)‖ < (1 / 2) ^ n) x_1}\nhzs : z ∈ s\n⊢ x + (z - x) ∈ s\n[PROOFSTEP]\nsimpa using hzs\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx y✝ : E\ns t✝ : Set E\nt : Set F\ny : F\nhs : x ∈ closure s\nw : F\nc : ℕ → 𝕜\nd : ℕ → F\nhd : ∀ᶠ (n : ℕ) in atTop, y + d n ∈ t\nhc : Tendsto (fun n => ‖c n‖) atTop atTop\nhy : Tendsto (fun n => c n • d n) atTop (𝓝 w)\nn : ℕ\nz : E\nhz : z ∈ {x_1 | (fun y => ‖c n • (y - x)‖ < (1 / 2) ^ n) x_1}\nhzs : z ∈ s\n⊢ ‖c n • (z - x)‖ < (1 / 2) ^ n\n[PROOFSTEP]\nsimpa using hz\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx y✝ : E\ns t✝ : Set E\nt : Set F\ny : F\nhs : x ∈ closure s\nw : F\nc : ℕ → 𝕜\nd : ℕ → F\nhd : ∀ᶠ (n : ℕ) in atTop, y + d n ∈ t\nhc : Tendsto (fun n => ‖c n‖) atTop atTop\nhy : Tendsto (fun n => c n • d n) atTop (𝓝 w)\nthis : ∀ (n : ℕ), ∃ d', x + d' ∈ s ∧ ‖c n • d'‖ < (1 / 2) ^ n\n⊢ ↑(LinearMap.inr 𝕜 E F) w ∈ tangentConeAt 𝕜 (s ×ˢ t) (x, y)\n[PROOFSTEP]\nchoose d' hd' using this\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx y✝ : E\ns t✝ : Set E\nt : Set F\ny : F\nhs : x ∈ closure s\nw : F\nc : ℕ → 𝕜\nd : ℕ → F\nhd : ∀ᶠ (n : ℕ) in atTop, y + d n ∈ t\nhc : Tendsto (fun n => ‖c n‖) atTop atTop\nhy : Tendsto (fun n => c n • d n) atTop (𝓝 w)\nd' : ℕ → E\nhd' : ∀ (n : ℕ), x + d' n ∈ s ∧ ‖c n • d' n‖ < (1 / 2) ^ n\n⊢ ↑(LinearMap.inr 𝕜 E F) w ∈ tangentConeAt 𝕜 (s ×ˢ t) (x, y)\n[PROOFSTEP]\nrefine' ⟨c, fun n => (d' n, d n), _, hc, _⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.refine'_1\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx y✝ : E\ns t✝ : Set E\nt : Set F\ny : F\nhs : x ∈ closure s\nw : F\nc : ℕ → 𝕜\nd : ℕ → F\nhd : ∀ᶠ (n : ℕ) in atTop, y + d n ∈ t\nhc : Tendsto (fun n => ‖c n‖) atTop atTop\nhy : Tendsto (fun n => c n • d n) atTop (𝓝 w)\nd' : ℕ → E\nhd' : ∀ (n : ℕ), x + d' n ∈ s ∧ ‖c n • d' n‖ < (1 / 2) ^ n\n⊢ ∀ᶠ (n : ℕ) in atTop, (x, y) + (fun n => (d' n, d n)) n ∈ s ×ˢ t\ncase intro.intro.intro.intro.intro.intro.refine'_2\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx y✝ : E\ns t✝ : Set E\nt : Set F\ny : F\nhs : x ∈ closure s\nw : F\nc : ℕ → 𝕜\nd : ℕ → F\nhd : ∀ᶠ (n : ℕ) in atTop, y + d n ∈ t\nhc : Tendsto (fun n => ‖c n‖) atTop atTop\nhy : Tendsto (fun n => c n • d n) atTop (𝓝 w)\nd' : ℕ → E\nhd' : ∀ (n : ℕ), x + d' n ∈ s ∧ ‖c n • d' n‖ < (1 / 2) ^ n\n⊢ Tendsto (fun n => c n • (fun n => (d' n, d n)) n) atTop (𝓝 (↑(LinearMap.inr 𝕜 E F) w))\n[PROOFSTEP]\nshow ∀ᶠ n in atTop, (x, y) + (d' n, d n) ∈ s ×ˢ t\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.refine'_1\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx y✝ : E\ns t✝ : Set E\nt : Set F\ny : F\nhs : x ∈ closure s\nw : F\nc : ℕ → 𝕜\nd : ℕ → F\nhd : ∀ᶠ (n : ℕ) in atTop, y + d n ∈ t\nhc : Tendsto (fun n => ‖c n‖) atTop atTop\nhy : Tendsto (fun n => c n • d n) atTop (𝓝 w)\nd' : ℕ → E\nhd' : ∀ (n : ℕ), x + d' n ∈ s ∧ ‖c n • d' n‖ < (1 / 2) ^ n\n⊢ ∀ᶠ (n : ℕ) in atTop, (x, y) + (d' n, d n) ∈ s ×ˢ t\n[PROOFSTEP]\nfilter_upwards [hd] with n hn\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx y✝ : E\ns t✝ : Set E\nt : Set F\ny : F\nhs : x ∈ closure s\nw : F\nc : ℕ → 𝕜\nd : ℕ → F\nhd : ∀ᶠ (n : ℕ) in atTop, y + d n ∈ t\nhc : Tendsto (fun n => ‖c n‖) atTop atTop\nhy : Tendsto (fun n => c n • d n) atTop (𝓝 w)\nd' : ℕ → E\nhd' : ∀ (n : ℕ), x + d' n ∈ s ∧ ‖c n • d' n‖ < (1 / 2) ^ n\nn : ℕ\nhn : y + d n ∈ t\n⊢ (x, y) + (d' n, d n) ∈ s ×ˢ t\n[PROOFSTEP]\nsimp [hn, (hd' n).1]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.refine'_2\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx y✝ : E\ns t✝ : Set E\nt : Set F\ny : F\nhs : x ∈ closure s\nw : F\nc : ℕ → 𝕜\nd : ℕ → F\nhd : ∀ᶠ (n : ℕ) in atTop, y + d n ∈ t\nhc : Tendsto (fun n => ‖c n‖) atTop atTop\nhy : Tendsto (fun n => c n • d n) atTop (𝓝 w)\nd' : ℕ → E\nhd' : ∀ (n : ℕ), x + d' n ∈ s ∧ ‖c n • d' n‖ < (1 / 2) ^ n\n⊢ Tendsto (fun n => c n • (fun n => (d' n, d n)) n) atTop (𝓝 (↑(LinearMap.inr 𝕜 E F) w))\n[PROOFSTEP]\napply Tendsto.prod_mk_nhds _ hy\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx y✝ : E\ns t✝ : Set E\nt : Set F\ny : F\nhs : x ∈ closure s\nw : F\nc : ℕ → 𝕜\nd : ℕ → F\nhd : ∀ᶠ (n : ℕ) in atTop, y + d n ∈ t\nhc : Tendsto (fun n => ‖c n‖) atTop atTop\nhy : Tendsto (fun n => c n • d n) atTop (𝓝 w)\nd' : ℕ → E\nhd' : ∀ (n : ℕ), x + d' n ∈ s ∧ ‖c n • d' n‖ < (1 / 2) ^ n\n⊢ Tendsto (fun c_1 => c c_1 • ((fun n => (d' n, d n)) c_1).fst) atTop (𝓝 (↑0 w))\n[PROOFSTEP]\nrefine' squeeze_zero_norm (fun n => (hd' n).2.le) _\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx y✝ : E\ns t✝ : Set E\nt : Set F\ny : F\nhs : x ∈ closure s\nw : F\nc : ℕ → 𝕜\nd : ℕ → F\nhd : ∀ᶠ (n : ℕ) in atTop, y + d n ∈ t\nhc : Tendsto (fun n => ‖c n‖) atTop atTop\nhy : Tendsto (fun n => c n • d n) atTop (𝓝 w)\nd' : ℕ → E\nhd' : ∀ (n : ℕ), x + d' n ∈ s ∧ ‖c n • d' n‖ < (1 / 2) ^ n\n⊢ Tendsto (fun n => (1 / 2) ^ n) atTop (𝓝 0)\n[PROOFSTEP]\nexact tendsto_pow_atTop_nhds_0_of_lt_1 one_half_pos.le one_half_lt_one\n[GOAL]\n𝕜 : Type u_1\ninst✝⁹ : NontriviallyNormedField 𝕜\nE✝ : Type u_2\ninst✝⁸ : NormedAddCommGroup E✝\ninst✝⁷ : NormedSpace 𝕜 E✝\nF : Type u_3\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\nG : Type u_4\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace ℝ G\nx✝ y : E✝\ns✝ t : Set E✝\nι : Type u_5\ninst✝² : DecidableEq ι\nE : ι → Type u_6\ninst✝¹ : (i : ι) → NormedAddCommGroup (E i)\ninst✝ : (i : ι) → NormedSpace 𝕜 (E i)\ns : (i : ι) → Set (E i)\nx : (i : ι) → E i\ni : ι\nhi : ∀ (j : ι), j ≠ i → x j ∈ closure (s j)\n⊢ MapsTo (↑(LinearMap.single i)) (tangentConeAt 𝕜 (s i) (x i)) (tangentConeAt 𝕜 (Set.pi univ s) x)\n[PROOFSTEP]\nrintro w ⟨c, d, hd, hc, hy⟩\n[GOAL]\ncase intro.intro.intro.intro\n𝕜 : Type u_1\ninst✝⁹ : NontriviallyNormedField 𝕜\nE✝ : Type u_2\ninst✝⁸ : NormedAddCommGroup E✝\ninst✝⁷ : NormedSpace 𝕜 E✝\nF : Type u_3\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\nG : Type u_4\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace ℝ G\nx✝ y : E✝\ns✝ t : Set E✝\nι : Type u_5\ninst✝² : DecidableEq ι\nE : ι → Type u_6\ninst✝¹ : (i : ι) → NormedAddCommGroup (E i)\ninst✝ : (i : ι) → NormedSpace 𝕜 (E i)\ns : (i : ι) → Set (E i)\nx : (i : ι) → E i\ni : ι\nhi : ∀ (j : ι), j ≠ i → x j ∈ closure (s j)\nw : E i\nc : ℕ → 𝕜\nd : ℕ → E i\nhd : ∀ᶠ (n : ℕ) in atTop, x i + d n ∈ s i\nhc : Tendsto (fun n => ‖c n‖) atTop atTop\nhy : Tendsto (fun n => c n • d n) atTop (𝓝 w)\n⊢ ↑(LinearMap.single i) w ∈ tangentConeAt 𝕜 (Set.pi univ s) x\n[PROOFSTEP]\nhave : ∀ (n) (j) (_ : j ≠ i), ∃ d', x j + d' ∈ s j ∧ ‖c n • d'‖ < (1 / 2 : ℝ) ^ n :=\n  by\n  intro n j hj\n  rcases mem_closure_iff_nhds.1 (hi j hj) _ (eventually_nhds_norm_smul_sub_lt (c n) (x j) (pow_pos one_half_pos n)) with\n    ⟨z, hz, hzs⟩\n  exact ⟨z - x j, by simpa using hzs, by simpa using hz⟩\n[GOAL]\n𝕜 : Type u_1\ninst✝⁹ : NontriviallyNormedField 𝕜\nE✝ : Type u_2\ninst✝⁸ : NormedAddCommGroup E✝\ninst✝⁷ : NormedSpace 𝕜 E✝\nF : Type u_3\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\nG : Type u_4\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace ℝ G\nx✝ y : E✝\ns✝ t : Set E✝\nι : Type u_5\ninst✝² : DecidableEq ι\nE : ι → Type u_6\ninst✝¹ : (i : ι) → NormedAddCommGroup (E i)\ninst✝ : (i : ι) → NormedSpace 𝕜 (E i)\ns : (i : ι) → Set (E i)\nx : (i : ι) → E i\ni : ι\nhi : ∀ (j : ι), j ≠ i → x j ∈ closure (s j)\nw : E i\nc : ℕ → 𝕜\nd : ℕ → E i\nhd : ∀ᶠ (n : ℕ) in atTop, x i + d n ∈ s i\nhc : Tendsto (fun n => ‖c n‖) atTop atTop\nhy : Tendsto (fun n => c n • d n) atTop (𝓝 w)\n⊢ ∀ (n : ℕ) (j : ι), j ≠ i → ∃ d', x j + d' ∈ s j ∧ ‖c n • d'‖ < (1 / 2) ^ n\n[PROOFSTEP]\nintro n j hj\n[GOAL]\n𝕜 : Type u_1\ninst✝⁹ : NontriviallyNormedField 𝕜\nE✝ : Type u_2\ninst✝⁸ : NormedAddCommGroup E✝\ninst✝⁷ : NormedSpace 𝕜 E✝\nF : Type u_3\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\nG : Type u_4\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace ℝ G\nx✝ y : E✝\ns✝ t : Set E✝\nι : Type u_5\ninst✝² : DecidableEq ι\nE : ι → Type u_6\ninst✝¹ : (i : ι) → NormedAddCommGroup (E i)\ninst✝ : (i : ι) → NormedSpace 𝕜 (E i)\ns : (i : ι) → Set (E i)\nx : (i : ι) → E i\ni : ι\nhi : ∀ (j : ι), j ≠ i → x j ∈ closure (s j)\nw : E i\nc : ℕ → 𝕜\nd : ℕ → E i\nhd : ∀ᶠ (n : ℕ) in atTop, x i + d n ∈ s i\nhc : Tendsto (fun n => ‖c n‖) atTop atTop\nhy : Tendsto (fun n => c n • d n) atTop (𝓝 w)\nn : ℕ\nj : ι\nhj : j ≠ i\n⊢ ∃ d', x j + d' ∈ s j ∧ ‖c n • d'‖ < (1 / 2) ^ n\n[PROOFSTEP]\nrcases mem_closure_iff_nhds.1 (hi j hj) _ (eventually_nhds_norm_smul_sub_lt (c n) (x j) (pow_pos one_half_pos n)) with\n  ⟨z, hz, hzs⟩\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\ninst✝⁹ : NontriviallyNormedField 𝕜\nE✝ : Type u_2\ninst✝⁸ : NormedAddCommGroup E✝\ninst✝⁷ : NormedSpace 𝕜 E✝\nF : Type u_3\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\nG : Type u_4\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace ℝ G\nx✝ y : E✝\ns✝ t : Set E✝\nι : Type u_5\ninst✝² : DecidableEq ι\nE : ι → Type u_6\ninst✝¹ : (i : ι) → NormedAddCommGroup (E i)\ninst✝ : (i : ι) → NormedSpace 𝕜 (E i)\ns : (i : ι) → Set (E i)\nx : (i : ι) → E i\ni : ι\nhi : ∀ (j : ι), j ≠ i → x j ∈ closure (s j)\nw : E i\nc : ℕ → 𝕜\nd : ℕ → E i\nhd : ∀ᶠ (n : ℕ) in atTop, x i + d n ∈ s i\nhc : Tendsto (fun n => ‖c n‖) atTop atTop\nhy : Tendsto (fun n => c n • d n) atTop (𝓝 w)\nn : ℕ\nj : ι\nhj : j ≠ i\nz : E j\nhz : z ∈ {x_1 | (fun y => ‖c n • (y - x j)‖ < (1 / 2) ^ n) x_1}\nhzs : z ∈ s j\n⊢ ∃ d', x j + d' ∈ s j ∧ ‖c n • d'‖ < (1 / 2) ^ n\n[PROOFSTEP]\nexact ⟨z - x j, by simpa using hzs, by simpa using hz⟩\n[GOAL]\n𝕜 : Type u_1\ninst✝⁹ : NontriviallyNormedField 𝕜\nE✝ : Type u_2\ninst✝⁸ : NormedAddCommGroup E✝\ninst✝⁷ : NormedSpace 𝕜 E✝\nF : Type u_3\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\nG : Type u_4\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace ℝ G\nx✝ y : E✝\ns✝ t : Set E✝\nι : Type u_5\ninst✝² : DecidableEq ι\nE : ι → Type u_6\ninst✝¹ : (i : ι) → NormedAddCommGroup (E i)\ninst✝ : (i : ι) → NormedSpace 𝕜 (E i)\ns : (i : ι) → Set (E i)\nx : (i : ι) → E i\ni : ι\nhi : ∀ (j : ι), j ≠ i → x j ∈ closure (s j)\nw : E i\nc : ℕ → 𝕜\nd : ℕ → E i\nhd : ∀ᶠ (n : ℕ) in atTop, x i + d n ∈ s i\nhc : Tendsto (fun n => ‖c n‖) atTop atTop\nhy : Tendsto (fun n => c n • d n) atTop (𝓝 w)\nn : ℕ\nj : ι\nhj : j ≠ i\nz : E j\nhz : z ∈ {x_1 | (fun y => ‖c n • (y - x j)‖ < (1 / 2) ^ n) x_1}\nhzs : z ∈ s j\n⊢ x j + (z - x j) ∈ s j\n[PROOFSTEP]\nsimpa using hzs\n[GOAL]\n𝕜 : Type u_1\ninst✝⁹ : NontriviallyNormedField 𝕜\nE✝ : Type u_2\ninst✝⁸ : NormedAddCommGroup E✝\ninst✝⁷ : NormedSpace 𝕜 E✝\nF : Type u_3\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\nG : Type u_4\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace ℝ G\nx✝ y : E✝\ns✝ t : Set E✝\nι : Type u_5\ninst✝² : DecidableEq ι\nE : ι → Type u_6\ninst✝¹ : (i : ι) → NormedAddCommGroup (E i)\ninst✝ : (i : ι) → NormedSpace 𝕜 (E i)\ns : (i : ι) → Set (E i)\nx : (i : ι) → E i\ni : ι\nhi : ∀ (j : ι), j ≠ i → x j ∈ closure (s j)\nw : E i\nc : ℕ → 𝕜\nd : ℕ → E i\nhd : ∀ᶠ (n : ℕ) in atTop, x i + d n ∈ s i\nhc : Tendsto (fun n => ‖c n‖) atTop atTop\nhy : Tendsto (fun n => c n • d n) atTop (𝓝 w)\nn : ℕ\nj : ι\nhj : j ≠ i\nz : E j\nhz : z ∈ {x_1 | (fun y => ‖c n • (y - x j)‖ < (1 / 2) ^ n) x_1}\nhzs : z ∈ s j\n⊢ ‖c n • (z - x j)‖ < (1 / 2) ^ n\n[PROOFSTEP]\nsimpa using hz\n[GOAL]\ncase intro.intro.intro.intro\n𝕜 : Type u_1\ninst✝⁹ : NontriviallyNormedField 𝕜\nE✝ : Type u_2\ninst✝⁸ : NormedAddCommGroup E✝\ninst✝⁷ : NormedSpace 𝕜 E✝\nF : Type u_3\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\nG : Type u_4\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace ℝ G\nx✝ y : E✝\ns✝ t : Set E✝\nι : Type u_5\ninst✝² : DecidableEq ι\nE : ι → Type u_6\ninst✝¹ : (i : ι) → NormedAddCommGroup (E i)\ninst✝ : (i : ι) → NormedSpace 𝕜 (E i)\ns : (i : ι) → Set (E i)\nx : (i : ι) → E i\ni : ι\nhi : ∀ (j : ι), j ≠ i → x j ∈ closure (s j)\nw : E i\nc : ℕ → 𝕜\nd : ℕ → E i\nhd : ∀ᶠ (n : ℕ) in atTop, x i + d n ∈ s i\nhc : Tendsto (fun n => ‖c n‖) atTop atTop\nhy : Tendsto (fun n => c n • d n) atTop (𝓝 w)\nthis : ∀ (n : ℕ) (j : ι), j ≠ i → ∃ d', x j + d' ∈ s j ∧ ‖c n • d'‖ < (1 / 2) ^ n\n⊢ ↑(LinearMap.single i) w ∈ tangentConeAt 𝕜 (Set.pi univ s) x\n[PROOFSTEP]\nchoose! d' hd's hcd' using this\n[GOAL]\ncase intro.intro.intro.intro\n𝕜 : Type u_1\ninst✝⁹ : NontriviallyNormedField 𝕜\nE✝ : Type u_2\ninst✝⁸ : NormedAddCommGroup E✝\ninst✝⁷ : NormedSpace 𝕜 E✝\nF : Type u_3\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\nG : Type u_4\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace ℝ G\nx✝ y : E✝\ns✝ t : Set E✝\nι : Type u_5\ninst✝² : DecidableEq ι\nE : ι → Type u_6\ninst✝¹ : (i : ι) → NormedAddCommGroup (E i)\ninst✝ : (i : ι) → NormedSpace 𝕜 (E i)\ns : (i : ι) → Set (E i)\nx : (i : ι) → E i\ni : ι\nhi : ∀ (j : ι), j ≠ i → x j ∈ closure (s j)\nw : E i\nc : ℕ → 𝕜\nd : ℕ → E i\nhd : ∀ᶠ (n : ℕ) in atTop, x i + d n ∈ s i\nhc : Tendsto (fun n => ‖c n‖) atTop atTop\nhy : Tendsto (fun n => c n • d n) atTop (𝓝 w)\nd' : ℕ → (j : ι) → E j\nhd's : ∀ (n : ℕ) (j : ι), j ≠ i → x j + d' n j ∈ s j\nhcd' : ∀ (n : ℕ) (j : ι), j ≠ i → ‖c n • d' n j‖ < (1 / 2) ^ n\n⊢ ↑(LinearMap.single i) w ∈ tangentConeAt 𝕜 (Set.pi univ s) x\n[PROOFSTEP]\nrefine' ⟨c, fun n => Function.update (d' n) i (d n), hd.mono fun n hn j _ => _, hc, tendsto_pi_nhds.2 fun j => _⟩\n[GOAL]\ncase intro.intro.intro.intro.refine'_1\n𝕜 : Type u_1\ninst✝⁹ : NontriviallyNormedField 𝕜\nE✝ : Type u_2\ninst✝⁸ : NormedAddCommGroup E✝\ninst✝⁷ : NormedSpace 𝕜 E✝\nF : Type u_3\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\nG : Type u_4\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace ℝ G\nx✝¹ y : E✝\ns✝ t : Set E✝\nι : Type u_5\ninst✝² : DecidableEq ι\nE : ι → Type u_6\ninst✝¹ : (i : ι) → NormedAddCommGroup (E i)\ninst✝ : (i : ι) → NormedSpace 𝕜 (E i)\ns : (i : ι) → Set (E i)\nx : (i : ι) → E i\ni : ι\nhi : ∀ (j : ι), j ≠ i → x j ∈ closure (s j)\nw : E i\nc : ℕ → 𝕜\nd : ℕ → E i\nhd : ∀ᶠ (n : ℕ) in atTop, x i + d n ∈ s i\nhc : Tendsto (fun n => ‖c n‖) atTop atTop\nhy : Tendsto (fun n => c n • d n) atTop (𝓝 w)\nd' : ℕ → (j : ι) → E j\nhd's : ∀ (n : ℕ) (j : ι), j ≠ i → x j + d' n j ∈ s j\nhcd' : ∀ (n : ℕ) (j : ι), j ≠ i → ‖c n • d' n j‖ < (1 / 2) ^ n\nn : ℕ\nhn : x i + d n ∈ s i\nj : ι\nx✝ : j ∈ univ\n⊢ (x + (fun n => Function.update (d' n) i (d n)) n) j ∈ s j\n[PROOFSTEP]\nrcases em (j = i) with (rfl | hj)\n[GOAL]\ncase intro.intro.intro.intro.refine'_1.inl\n𝕜 : Type u_1\ninst✝⁹ : NontriviallyNormedField 𝕜\nE✝ : Type u_2\ninst✝⁸ : NormedAddCommGroup E✝\ninst✝⁷ : NormedSpace 𝕜 E✝\nF : Type u_3\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\nG : Type u_4\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace ℝ G\nx✝¹ y : E✝\ns✝ t : Set E✝\nι : Type u_5\ninst✝² : DecidableEq ι\nE : ι → Type u_6\ninst✝¹ : (i : ι) → NormedAddCommGroup (E i)\ninst✝ : (i : ι) → NormedSpace 𝕜 (E i)\ns : (i : ι) → Set (E i)\nx : (i : ι) → E i\nc : ℕ → 𝕜\nhc : Tendsto (fun n => ‖c n‖) atTop atTop\nd' : ℕ → (j : ι) → E j\nn : ℕ\nj : ι\nx✝ : j ∈ univ\nhi : ∀ (j_1 : ι), j_1 ≠ j → x j_1 ∈ closure (s j_1)\nw : E j\nd : ℕ → E j\nhd : ∀ᶠ (n : ℕ) in atTop, x j + d n ∈ s j\nhy : Tendsto (fun n => c n • d n) atTop (𝓝 w)\nhd's : ∀ (n : ℕ) (j_1 : ι), j_1 ≠ j → x j_1 + d' n j_1 ∈ s j_1\nhcd' : ∀ (n : ℕ) (j_1 : ι), j_1 ≠ j → ‖c n • d' n j_1‖ < (1 / 2) ^ n\nhn : x j + d n ∈ s j\n⊢ (x + (fun n => Function.update (d' n) j (d n)) n) j ∈ s j\n[PROOFSTEP]\nsimp [*]\n[GOAL]\ncase intro.intro.intro.intro.refine'_1.inr\n𝕜 : Type u_1\ninst✝⁹ : NontriviallyNormedField 𝕜\nE✝ : Type u_2\ninst✝⁸ : NormedAddCommGroup E✝\ninst✝⁷ : NormedSpace 𝕜 E✝\nF : Type u_3\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\nG : Type u_4\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace ℝ G\nx✝¹ y : E✝\ns✝ t : Set E✝\nι : Type u_5\ninst✝² : DecidableEq ι\nE : ι → Type u_6\ninst✝¹ : (i : ι) → NormedAddCommGroup (E i)\ninst✝ : (i : ι) → NormedSpace 𝕜 (E i)\ns : (i : ι) → Set (E i)\nx : (i : ι) → E i\ni : ι\nhi : ∀ (j : ι), j ≠ i → x j ∈ closure (s j)\nw : E i\nc : ℕ → 𝕜\nd : ℕ → E i\nhd : ∀ᶠ (n : ℕ) in atTop, x i + d n ∈ s i\nhc : Tendsto (fun n => ‖c n‖) atTop atTop\nhy : Tendsto (fun n => c n • d n) atTop (𝓝 w)\nd' : ℕ → (j : ι) → E j\nhd's : ∀ (n : ℕ) (j : ι), j ≠ i → x j + d' n j ∈ s j\nhcd' : ∀ (n : ℕ) (j : ι), j ≠ i → ‖c n • d' n j‖ < (1 / 2) ^ n\nn : ℕ\nhn : x i + d n ∈ s i\nj : ι\nx✝ : j ∈ univ\nhj : ¬j = i\n⊢ (x + (fun n => Function.update (d' n) i (d n)) n) j ∈ s j\n[PROOFSTEP]\nsimp [*]\n[GOAL]\ncase intro.intro.intro.intro.refine'_2\n𝕜 : Type u_1\ninst✝⁹ : NontriviallyNormedField 𝕜\nE✝ : Type u_2\ninst✝⁸ : NormedAddCommGroup E✝\ninst✝⁷ : NormedSpace 𝕜 E✝\nF : Type u_3\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\nG : Type u_4\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace ℝ G\nx✝ y : E✝\ns✝ t : Set E✝\nι : Type u_5\ninst✝² : DecidableEq ι\nE : ι → Type u_6\ninst✝¹ : (i : ι) → NormedAddCommGroup (E i)\ninst✝ : (i : ι) → NormedSpace 𝕜 (E i)\ns : (i : ι) → Set (E i)\nx : (i : ι) → E i\ni : ι\nhi : ∀ (j : ι), j ≠ i → x j ∈ closure (s j)\nw : E i\nc : ℕ → 𝕜\nd : ℕ → E i\nhd : ∀ᶠ (n : ℕ) in atTop, x i + d n ∈ s i\nhc : Tendsto (fun n => ‖c n‖) atTop atTop\nhy : Tendsto (fun n => c n • d n) atTop (𝓝 w)\nd' : ℕ → (j : ι) → E j\nhd's : ∀ (n : ℕ) (j : ι), j ≠ i → x j + d' n j ∈ s j\nhcd' : ∀ (n : ℕ) (j : ι), j ≠ i → ‖c n • d' n j‖ < (1 / 2) ^ n\nj : ι\n⊢ Tendsto (fun i_1 => (c i_1 • (fun n => Function.update (d' n) i (d n)) i_1) j) atTop (𝓝 (↑(LinearMap.single i) w j))\n[PROOFSTEP]\nrcases em (j = i) with (rfl | hj)\n[GOAL]\ncase intro.intro.intro.intro.refine'_2.inl\n𝕜 : Type u_1\ninst✝⁹ : NontriviallyNormedField 𝕜\nE✝ : Type u_2\ninst✝⁸ : NormedAddCommGroup E✝\ninst✝⁷ : NormedSpace 𝕜 E✝\nF : Type u_3\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\nG : Type u_4\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace ℝ G\nx✝ y : E✝\ns✝ t : Set E✝\nι : Type u_5\ninst✝² : DecidableEq ι\nE : ι → Type u_6\ninst✝¹ : (i : ι) → NormedAddCommGroup (E i)\ninst✝ : (i : ι) → NormedSpace 𝕜 (E i)\ns : (i : ι) → Set (E i)\nx : (i : ι) → E i\nc : ℕ → 𝕜\nhc : Tendsto (fun n => ‖c n‖) atTop atTop\nd' : ℕ → (j : ι) → E j\nj : ι\nhi : ∀ (j_1 : ι), j_1 ≠ j → x j_1 ∈ closure (s j_1)\nw : E j\nd : ℕ → E j\nhd : ∀ᶠ (n : ℕ) in atTop, x j + d n ∈ s j\nhy : Tendsto (fun n => c n • d n) atTop (𝓝 w)\nhd's : ∀ (n : ℕ) (j_1 : ι), j_1 ≠ j → x j_1 + d' n j_1 ∈ s j_1\nhcd' : ∀ (n : ℕ) (j_1 : ι), j_1 ≠ j → ‖c n • d' n j_1‖ < (1 / 2) ^ n\n⊢ Tendsto (fun i => (c i • (fun n => Function.update (d' n) j (d n)) i) j) atTop (𝓝 (↑(LinearMap.single j) w j))\n[PROOFSTEP]\nsimp [hy]\n[GOAL]\ncase intro.intro.intro.intro.refine'_2.inr\n𝕜 : Type u_1\ninst✝⁹ : NontriviallyNormedField 𝕜\nE✝ : Type u_2\ninst✝⁸ : NormedAddCommGroup E✝\ninst✝⁷ : NormedSpace 𝕜 E✝\nF : Type u_3\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\nG : Type u_4\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace ℝ G\nx✝ y : E✝\ns✝ t : Set E✝\nι : Type u_5\ninst✝² : DecidableEq ι\nE : ι → Type u_6\ninst✝¹ : (i : ι) → NormedAddCommGroup (E i)\ninst✝ : (i : ι) → NormedSpace 𝕜 (E i)\ns : (i : ι) → Set (E i)\nx : (i : ι) → E i\ni : ι\nhi : ∀ (j : ι), j ≠ i → x j ∈ closure (s j)\nw : E i\nc : ℕ → 𝕜\nd : ℕ → E i\nhd : ∀ᶠ (n : ℕ) in atTop, x i + d n ∈ s i\nhc : Tendsto (fun n => ‖c n‖) atTop atTop\nhy : Tendsto (fun n => c n • d n) atTop (𝓝 w)\nd' : ℕ → (j : ι) → E j\nhd's : ∀ (n : ℕ) (j : ι), j ≠ i → x j + d' n j ∈ s j\nhcd' : ∀ (n : ℕ) (j : ι), j ≠ i → ‖c n • d' n j‖ < (1 / 2) ^ n\nj : ι\nhj : ¬j = i\n⊢ Tendsto (fun i_1 => (c i_1 • (fun n => Function.update (d' n) i (d n)) i_1) j) atTop (𝓝 (↑(LinearMap.single i) w j))\n[PROOFSTEP]\nsuffices Tendsto (fun n => c n • d' n j) atTop (𝓝 0) by simpa [hj]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁹ : NontriviallyNormedField 𝕜\nE✝ : Type u_2\ninst✝⁸ : NormedAddCommGroup E✝\ninst✝⁷ : NormedSpace 𝕜 E✝\nF : Type u_3\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\nG : Type u_4\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace ℝ G\nx✝ y : E✝\ns✝ t : Set E✝\nι : Type u_5\ninst✝² : DecidableEq ι\nE : ι → Type u_6\ninst✝¹ : (i : ι) → NormedAddCommGroup (E i)\ninst✝ : (i : ι) → NormedSpace 𝕜 (E i)\ns : (i : ι) → Set (E i)\nx : (i : ι) → E i\ni : ι\nhi : ∀ (j : ι), j ≠ i → x j ∈ closure (s j)\nw : E i\nc : ℕ → 𝕜\nd : ℕ → E i\nhd : ∀ᶠ (n : ℕ) in atTop, x i + d n ∈ s i\nhc : Tendsto (fun n => ‖c n‖) atTop atTop\nhy : Tendsto (fun n => c n • d n) atTop (𝓝 w)\nd' : ℕ → (j : ι) → E j\nhd's : ∀ (n : ℕ) (j : ι), j ≠ i → x j + d' n j ∈ s j\nhcd' : ∀ (n : ℕ) (j : ι), j ≠ i → ‖c n • d' n j‖ < (1 / 2) ^ n\nj : ι\nhj : ¬j = i\nthis : Tendsto (fun n => c n • d' n j) atTop (𝓝 0)\n⊢ Tendsto (fun i_1 => (c i_1 • (fun n => Function.update (d' n) i (d n)) i_1) j) atTop (𝓝 (↑(LinearMap.single i) w j))\n[PROOFSTEP]\nsimpa [hj]\n[GOAL]\ncase intro.intro.intro.intro.refine'_2.inr\n𝕜 : Type u_1\ninst✝⁹ : NontriviallyNormedField 𝕜\nE✝ : Type u_2\ninst✝⁸ : NormedAddCommGroup E✝\ninst✝⁷ : NormedSpace 𝕜 E✝\nF : Type u_3\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\nG : Type u_4\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace ℝ G\nx✝ y : E✝\ns✝ t : Set E✝\nι : Type u_5\ninst✝² : DecidableEq ι\nE : ι → Type u_6\ninst✝¹ : (i : ι) → NormedAddCommGroup (E i)\ninst✝ : (i : ι) → NormedSpace 𝕜 (E i)\ns : (i : ι) → Set (E i)\nx : (i : ι) → E i\ni : ι\nhi : ∀ (j : ι), j ≠ i → x j ∈ closure (s j)\nw : E i\nc : ℕ → 𝕜\nd : ℕ → E i\nhd : ∀ᶠ (n : ℕ) in atTop, x i + d n ∈ s i\nhc : Tendsto (fun n => ‖c n‖) atTop atTop\nhy : Tendsto (fun n => c n • d n) atTop (𝓝 w)\nd' : ℕ → (j : ι) → E j\nhd's : ∀ (n : ℕ) (j : ι), j ≠ i → x j + d' n j ∈ s j\nhcd' : ∀ (n : ℕ) (j : ι), j ≠ i → ‖c n • d' n j‖ < (1 / 2) ^ n\nj : ι\nhj : ¬j = i\n⊢ Tendsto (fun n => c n • d' n j) atTop (𝓝 0)\n[PROOFSTEP]\nrefine' squeeze_zero_norm (fun n => (hcd' n j hj).le) _\n[GOAL]\ncase intro.intro.intro.intro.refine'_2.inr\n𝕜 : Type u_1\ninst✝⁹ : NontriviallyNormedField 𝕜\nE✝ : Type u_2\ninst✝⁸ : NormedAddCommGroup E✝\ninst✝⁷ : NormedSpace 𝕜 E✝\nF : Type u_3\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\nG : Type u_4\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace ℝ G\nx✝ y : E✝\ns✝ t : Set E✝\nι : Type u_5\ninst✝² : DecidableEq ι\nE : ι → Type u_6\ninst✝¹ : (i : ι) → NormedAddCommGroup (E i)\ninst✝ : (i : ι) → NormedSpace 𝕜 (E i)\ns : (i : ι) → Set (E i)\nx : (i : ι) → E i\ni : ι\nhi : ∀ (j : ι), j ≠ i → x j ∈ closure (s j)\nw : E i\nc : ℕ → 𝕜\nd : ℕ → E i\nhd : ∀ᶠ (n : ℕ) in atTop, x i + d n ∈ s i\nhc : Tendsto (fun n => ‖c n‖) atTop atTop\nhy : Tendsto (fun n => c n • d n) atTop (𝓝 w)\nd' : ℕ → (j : ι) → E j\nhd's : ∀ (n : ℕ) (j : ι), j ≠ i → x j + d' n j ∈ s j\nhcd' : ∀ (n : ℕ) (j : ι), j ≠ i → ‖c n • d' n j‖ < (1 / 2) ^ n\nj : ι\nhj : ¬j = i\n⊢ Tendsto (fun n => (1 / 2) ^ n) atTop (𝓝 0)\n[PROOFSTEP]\nexact tendsto_pow_atTop_nhds_0_of_lt_1 one_half_pos.le one_half_lt_one\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx✝ y✝ : E\ns✝ t : Set E\ns : Set G\nx y : G\nh : openSegment ℝ x y ⊆ s\n⊢ y - x ∈ tangentConeAt ℝ s x\n[PROOFSTEP]\nrefine mem_tangentConeAt_of_pow_smul one_half_pos.ne' (by norm_num) ?_\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx✝ y✝ : E\ns✝ t : Set E\ns : Set G\nx y : G\nh : openSegment ℝ x y ⊆ s\n⊢ ‖1 / 2‖ < 1\n[PROOFSTEP]\nnorm_num\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx✝ y✝ : E\ns✝ t : Set E\ns : Set G\nx y : G\nh : openSegment ℝ x y ⊆ s\n⊢ ∀ᶠ (n : ℕ) in atTop, x + (1 / 2) ^ n • (y - x) ∈ s\n[PROOFSTEP]\nrefine (eventually_ne_atTop 0).mono fun n hn ↦ (h ?_)\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx✝ y✝ : E\ns✝ t : Set E\ns : Set G\nx y : G\nh : openSegment ℝ x y ⊆ s\nn : ℕ\nhn : n ≠ 0\n⊢ x + (1 / 2) ^ n • (y - x) ∈ openSegment ℝ x y\n[PROOFSTEP]\nrw [openSegment_eq_image]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx✝ y✝ : E\ns✝ t : Set E\ns : Set G\nx y : G\nh : openSegment ℝ x y ⊆ s\nn : ℕ\nhn : n ≠ 0\n⊢ x + (1 / 2) ^ n • (y - x) ∈ (fun θ => (1 - θ) • x + θ • y) '' Ioo 0 1\n[PROOFSTEP]\nrefine ⟨(1 / 2) ^ n, ⟨?_, ?_⟩, ?_⟩\n[GOAL]\ncase refine_1\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx✝ y✝ : E\ns✝ t : Set E\ns : Set G\nx y : G\nh : openSegment ℝ x y ⊆ s\nn : ℕ\nhn : n ≠ 0\n⊢ 0 < (1 / 2) ^ n\n[PROOFSTEP]\nexact pow_pos one_half_pos _\n[GOAL]\ncase refine_2\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx✝ y✝ : E\ns✝ t : Set E\ns : Set G\nx y : G\nh : openSegment ℝ x y ⊆ s\nn : ℕ\nhn : n ≠ 0\n⊢ (1 / 2) ^ n < 1\n[PROOFSTEP]\nexact pow_lt_one one_half_pos.le one_half_lt_one hn\n[GOAL]\ncase refine_3\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx✝ y✝ : E\ns✝ t : Set E\ns : Set G\nx y : G\nh : openSegment ℝ x y ⊆ s\nn : ℕ\nhn : n ≠ 0\n⊢ (fun θ => (1 - θ) • x + θ • y) ((1 / 2) ^ n) = x + (1 / 2) ^ n • (y - x)\n[PROOFSTEP]\nsimp only [sub_smul, one_smul, smul_sub]\n[GOAL]\ncase refine_3\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx✝ y✝ : E\ns✝ t : Set E\ns : Set G\nx y : G\nh : openSegment ℝ x y ⊆ s\nn : ℕ\nhn : n ≠ 0\n⊢ x - (1 / 2) ^ n • x + (1 / 2) ^ n • y = x + ((1 / 2) ^ n • y - (1 / 2) ^ n • x)\n[PROOFSTEP]\nabel\n[GOAL]\ncase refine_3\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx✝ y✝ : E\ns✝ t : Set E\ns : Set G\nx y : G\nh : openSegment ℝ x y ⊆ s\nn : ℕ\nhn : n ≠ 0\n⊢ x - (1 / 2) ^ n • x + (1 / 2) ^ n • y = x + ((1 / 2) ^ n • y - (1 / 2) ^ n • x)\n[PROOFSTEP]\nabel\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx y : E\ns t : Set E\n⊢ UniqueDiffWithinAt 𝕜 univ x\n[PROOFSTEP]\nrw [uniqueDiffWithinAt_iff, tangentCone_univ]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx y : E\ns t : Set E\n⊢ Dense ↑(Submodule.span 𝕜 univ) ∧ x ∈ closure univ\n[PROOFSTEP]\nsimp\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx y : E\ns t : Set E\nh : UniqueDiffWithinAt 𝕜 s x\nst : 𝓝[s] x ≤ 𝓝[t] x\n⊢ UniqueDiffWithinAt 𝕜 t x\n[PROOFSTEP]\nsimp only [uniqueDiffWithinAt_iff] at *\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx y : E\ns t : Set E\nst : 𝓝[s] x ≤ 𝓝[t] x\nh : Dense ↑(Submodule.span 𝕜 (tangentConeAt 𝕜 s x)) ∧ x ∈ closure s\n⊢ Dense ↑(Submodule.span 𝕜 (tangentConeAt 𝕜 t x)) ∧ x ∈ closure t\n[PROOFSTEP]\nrw [mem_closure_iff_nhdsWithin_neBot] at h ⊢\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx y : E\ns t : Set E\nst : 𝓝[s] x ≤ 𝓝[t] x\nh : Dense ↑(Submodule.span 𝕜 (tangentConeAt 𝕜 s x)) ∧ NeBot (𝓝[s] x)\n⊢ Dense ↑(Submodule.span 𝕜 (tangentConeAt 𝕜 t x)) ∧ NeBot (𝓝[t] x)\n[PROOFSTEP]\nexact ⟨h.1.mono <| Submodule.span_mono <| tangentCone_mono_nhds st, h.2.mono st⟩\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx y : E\ns t : Set E\nh : s ∈ 𝓝 x\n⊢ UniqueDiffWithinAt 𝕜 s x\n[PROOFSTEP]\nsimpa only [univ_inter] using uniqueDiffWithinAt_univ.inter h\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx y✝ : E\ns t✝ : Set E\nt : Set F\ny : F\nhs : UniqueDiffWithinAt 𝕜 s x\nht : UniqueDiffWithinAt 𝕜 t y\n⊢ UniqueDiffWithinAt 𝕜 (s ×ˢ t) (x, y)\n[PROOFSTEP]\nrw [uniqueDiffWithinAt_iff] at hs ht ⊢\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx y✝ : E\ns t✝ : Set E\nt : Set F\ny : F\nhs : Dense ↑(Submodule.span 𝕜 (tangentConeAt 𝕜 s x)) ∧ x ∈ closure s\nht : Dense ↑(Submodule.span 𝕜 (tangentConeAt 𝕜 t y)) ∧ y ∈ closure t\n⊢ Dense ↑(Submodule.span 𝕜 (tangentConeAt 𝕜 (s ×ˢ t) (x, y))) ∧ (x, y) ∈ closure (s ×ˢ t)\n[PROOFSTEP]\nrw [closure_prod_eq]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx y✝ : E\ns t✝ : Set E\nt : Set F\ny : F\nhs : Dense ↑(Submodule.span 𝕜 (tangentConeAt 𝕜 s x)) ∧ x ∈ closure s\nht : Dense ↑(Submodule.span 𝕜 (tangentConeAt 𝕜 t y)) ∧ y ∈ closure t\n⊢ Dense ↑(Submodule.span 𝕜 (tangentConeAt 𝕜 (s ×ˢ t) (x, y))) ∧ (x, y) ∈ closure s ×ˢ closure t\n[PROOFSTEP]\nrefine' ⟨_, hs.2, ht.2⟩\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx y✝ : E\ns t✝ : Set E\nt : Set F\ny : F\nhs : Dense ↑(Submodule.span 𝕜 (tangentConeAt 𝕜 s x)) ∧ x ∈ closure s\nht : Dense ↑(Submodule.span 𝕜 (tangentConeAt 𝕜 t y)) ∧ y ∈ closure t\n⊢ Dense ↑(Submodule.span 𝕜 (tangentConeAt 𝕜 (s ×ˢ t) (x, y)))\n[PROOFSTEP]\nhave : _ ≤ Submodule.span 𝕜 (tangentConeAt 𝕜 (s ×ˢ t) (x, y)) :=\n  Submodule.span_mono (union_subset (subset_tangentCone_prod_left ht.2) (subset_tangentCone_prod_right hs.2))\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx y✝ : E\ns t✝ : Set E\nt : Set F\ny : F\nhs : Dense ↑(Submodule.span 𝕜 (tangentConeAt 𝕜 s x)) ∧ x ∈ closure s\nht : Dense ↑(Submodule.span 𝕜 (tangentConeAt 𝕜 t y)) ∧ y ∈ closure t\nthis :\n  Submodule.span 𝕜 (↑(LinearMap.inl 𝕜 E F) '' tangentConeAt 𝕜 s x ∪ ↑(LinearMap.inr 𝕜 E F) '' tangentConeAt 𝕜 t y) ≤\n    Submodule.span 𝕜 (tangentConeAt 𝕜 (s ×ˢ t) (x, y))\n⊢ Dense ↑(Submodule.span 𝕜 (tangentConeAt 𝕜 (s ×ˢ t) (x, y)))\n[PROOFSTEP]\nrw [LinearMap.span_inl_union_inr, SetLike.le_def] at this \n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx y✝ : E\ns t✝ : Set E\nt : Set F\ny : F\nhs : Dense ↑(Submodule.span 𝕜 (tangentConeAt 𝕜 s x)) ∧ x ∈ closure s\nht : Dense ↑(Submodule.span 𝕜 (tangentConeAt 𝕜 t y)) ∧ y ∈ closure t\nthis :\n  ∀ ⦃x_1 : E × F⦄,\n    x_1 ∈ Submodule.prod (Submodule.span 𝕜 (tangentConeAt 𝕜 s x)) (Submodule.span 𝕜 (tangentConeAt 𝕜 t y)) →\n      x_1 ∈ Submodule.span 𝕜 (tangentConeAt 𝕜 (s ×ˢ t) (x, y))\n⊢ Dense ↑(Submodule.span 𝕜 (tangentConeAt 𝕜 (s ×ˢ t) (x, y)))\n[PROOFSTEP]\nexact (hs.1.prod ht.1).mono this\n[GOAL]\n𝕜 : Type u_1\ninst✝⁹ : NontriviallyNormedField 𝕜\nE✝ : Type u_2\ninst✝⁸ : NormedAddCommGroup E✝\ninst✝⁷ : NormedSpace 𝕜 E✝\nF : Type u_3\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\nG : Type u_4\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace ℝ G\nx✝ y : E✝\ns✝ t : Set E✝\nι : Type u_5\ninst✝² : Finite ι\nE : ι → Type u_6\ninst✝¹ : (i : ι) → NormedAddCommGroup (E i)\ninst✝ : (i : ι) → NormedSpace 𝕜 (E i)\ns : (i : ι) → Set (E i)\nx : (i : ι) → E i\nh : ∀ (i : ι), UniqueDiffWithinAt 𝕜 (s i) (x i)\n⊢ UniqueDiffWithinAt 𝕜 (Set.pi univ s) x\n[PROOFSTEP]\nclassical\nsimp only [uniqueDiffWithinAt_iff, closure_pi_set] at h ⊢\nrefine' ⟨(dense_pi univ fun i _ => (h i).1).mono _, fun i _ => (h i).2⟩\nnorm_cast\nsimp only [← Submodule.iSup_map_single, iSup_le_iff, LinearMap.map_span, Submodule.span_le, ← mapsTo']\nexact fun i => (mapsTo_tangentCone_pi fun j _ => (h j).2).mono Subset.rfl Submodule.subset_span\n[GOAL]\n𝕜 : Type u_1\ninst✝⁹ : NontriviallyNormedField 𝕜\nE✝ : Type u_2\ninst✝⁸ : NormedAddCommGroup E✝\ninst✝⁷ : NormedSpace 𝕜 E✝\nF : Type u_3\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\nG : Type u_4\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace ℝ G\nx✝ y : E✝\ns✝ t : Set E✝\nι : Type u_5\ninst✝² : Finite ι\nE : ι → Type u_6\ninst✝¹ : (i : ι) → NormedAddCommGroup (E i)\ninst✝ : (i : ι) → NormedSpace 𝕜 (E i)\ns : (i : ι) → Set (E i)\nx : (i : ι) → E i\nh : ∀ (i : ι), UniqueDiffWithinAt 𝕜 (s i) (x i)\n⊢ UniqueDiffWithinAt 𝕜 (Set.pi univ s) x\n[PROOFSTEP]\nsimp only [uniqueDiffWithinAt_iff, closure_pi_set] at h ⊢\n[GOAL]\n𝕜 : Type u_1\ninst✝⁹ : NontriviallyNormedField 𝕜\nE✝ : Type u_2\ninst✝⁸ : NormedAddCommGroup E✝\ninst✝⁷ : NormedSpace 𝕜 E✝\nF : Type u_3\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\nG : Type u_4\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace ℝ G\nx✝ y : E✝\ns✝ t : Set E✝\nι : Type u_5\ninst✝² : Finite ι\nE : ι → Type u_6\ninst✝¹ : (i : ι) → NormedAddCommGroup (E i)\ninst✝ : (i : ι) → NormedSpace 𝕜 (E i)\ns : (i : ι) → Set (E i)\nx : (i : ι) → E i\nh : ∀ (i : ι), Dense ↑(Submodule.span 𝕜 (tangentConeAt 𝕜 (s i) (x i))) ∧ x i ∈ closure (s i)\n⊢ Dense ↑(Submodule.span 𝕜 (tangentConeAt 𝕜 (Set.pi univ s) x)) ∧ x ∈ Set.pi univ fun i => closure (s i)\n[PROOFSTEP]\nrefine' ⟨(dense_pi univ fun i _ => (h i).1).mono _, fun i _ => (h i).2⟩\n[GOAL]\n𝕜 : Type u_1\ninst✝⁹ : NontriviallyNormedField 𝕜\nE✝ : Type u_2\ninst✝⁸ : NormedAddCommGroup E✝\ninst✝⁷ : NormedSpace 𝕜 E✝\nF : Type u_3\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\nG : Type u_4\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace ℝ G\nx✝ y : E✝\ns✝ t : Set E✝\nι : Type u_5\ninst✝² : Finite ι\nE : ι → Type u_6\ninst✝¹ : (i : ι) → NormedAddCommGroup (E i)\ninst✝ : (i : ι) → NormedSpace 𝕜 (E i)\ns : (i : ι) → Set (E i)\nx : (i : ι) → E i\nh : ∀ (i : ι), Dense ↑(Submodule.span 𝕜 (tangentConeAt 𝕜 (s i) (x i))) ∧ x i ∈ closure (s i)\n⊢ (Set.pi univ fun i => ↑(Submodule.span 𝕜 (tangentConeAt 𝕜 (s i) (x i)))) ⊆\n    ↑(Submodule.span 𝕜 (tangentConeAt 𝕜 (Set.pi univ s) x))\n[PROOFSTEP]\nnorm_cast\n[GOAL]\n𝕜 : Type u_1\ninst✝⁹ : NontriviallyNormedField 𝕜\nE✝ : Type u_2\ninst✝⁸ : NormedAddCommGroup E✝\ninst✝⁷ : NormedSpace 𝕜 E✝\nF : Type u_3\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\nG : Type u_4\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace ℝ G\nx✝ y : E✝\ns✝ t : Set E✝\nι : Type u_5\ninst✝² : Finite ι\nE : ι → Type u_6\ninst✝¹ : (i : ι) → NormedAddCommGroup (E i)\ninst✝ : (i : ι) → NormedSpace 𝕜 (E i)\ns : (i : ι) → Set (E i)\nx : (i : ι) → E i\nh : ∀ (i : ι), Dense ↑(Submodule.span 𝕜 (tangentConeAt 𝕜 (s i) (x i))) ∧ x i ∈ closure (s i)\n⊢ (Submodule.pi univ fun i => Submodule.span 𝕜 (tangentConeAt 𝕜 (s i) (x i))) ≤\n    Submodule.span 𝕜 (tangentConeAt 𝕜 (Set.pi univ s) x)\n[PROOFSTEP]\nsimp only [← Submodule.iSup_map_single, iSup_le_iff, LinearMap.map_span, Submodule.span_le, ← mapsTo']\n[GOAL]\n𝕜 : Type u_1\ninst✝⁹ : NontriviallyNormedField 𝕜\nE✝ : Type u_2\ninst✝⁸ : NormedAddCommGroup E✝\ninst✝⁷ : NormedSpace 𝕜 E✝\nF : Type u_3\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\nG : Type u_4\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace ℝ G\nx✝ y : E✝\ns✝ t : Set E✝\nι : Type u_5\ninst✝² : Finite ι\nE : ι → Type u_6\ninst✝¹ : (i : ι) → NormedAddCommGroup (E i)\ninst✝ : (i : ι) → NormedSpace 𝕜 (E i)\ns : (i : ι) → Set (E i)\nx : (i : ι) → E i\nh : ∀ (i : ι), Dense ↑(Submodule.span 𝕜 (tangentConeAt 𝕜 (s i) (x i))) ∧ x i ∈ closure (s i)\n⊢ ∀ (i : ι),\n    MapsTo (fun a => ↑(LinearMap.single i) a) (tangentConeAt 𝕜 (s i) (x i))\n      ↑(Submodule.span 𝕜 (tangentConeAt 𝕜 (Set.pi univ s) x))\n[PROOFSTEP]\nexact fun i => (mapsTo_tangentCone_pi fun j _ => (h j).2).mono Subset.rfl Submodule.subset_span\n[GOAL]\n𝕜 : Type u_1\ninst✝⁹ : NontriviallyNormedField 𝕜\nE✝ : Type u_2\ninst✝⁸ : NormedAddCommGroup E✝\ninst✝⁷ : NormedSpace 𝕜 E✝\nF : Type u_3\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\nG : Type u_4\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace ℝ G\nx✝ y : E✝\ns✝ t : Set E✝\nι : Type u_5\ninst✝² : Finite ι\nE : ι → Type u_6\ninst✝¹ : (i : ι) → NormedAddCommGroup (E i)\ninst✝ : (i : ι) → NormedSpace 𝕜 (E i)\ns : (i : ι) → Set (E i)\nx : (i : ι) → E i\nI : Set ι\nh : ∀ (i : ι), i ∈ I → UniqueDiffWithinAt 𝕜 (s i) (x i)\n⊢ UniqueDiffWithinAt 𝕜 (Set.pi I s) x\n[PROOFSTEP]\nclassical\nrw [← Set.univ_pi_piecewise_univ]\nrefine' UniqueDiffWithinAt.univ_pi ι E _ _ fun i => _\nby_cases hi : i ∈ I <;> simp [*, uniqueDiffWithinAt_univ]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁹ : NontriviallyNormedField 𝕜\nE✝ : Type u_2\ninst✝⁸ : NormedAddCommGroup E✝\ninst✝⁷ : NormedSpace 𝕜 E✝\nF : Type u_3\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\nG : Type u_4\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace ℝ G\nx✝ y : E✝\ns✝ t : Set E✝\nι : Type u_5\ninst✝² : Finite ι\nE : ι → Type u_6\ninst✝¹ : (i : ι) → NormedAddCommGroup (E i)\ninst✝ : (i : ι) → NormedSpace 𝕜 (E i)\ns : (i : ι) → Set (E i)\nx : (i : ι) → E i\nI : Set ι\nh : ∀ (i : ι), i ∈ I → UniqueDiffWithinAt 𝕜 (s i) (x i)\n⊢ UniqueDiffWithinAt 𝕜 (Set.pi I s) x\n[PROOFSTEP]\nrw [← Set.univ_pi_piecewise_univ]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁹ : NontriviallyNormedField 𝕜\nE✝ : Type u_2\ninst✝⁸ : NormedAddCommGroup E✝\ninst✝⁷ : NormedSpace 𝕜 E✝\nF : Type u_3\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\nG : Type u_4\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace ℝ G\nx✝ y : E✝\ns✝ t : Set E✝\nι : Type u_5\ninst✝² : Finite ι\nE : ι → Type u_6\ninst✝¹ : (i : ι) → NormedAddCommGroup (E i)\ninst✝ : (i : ι) → NormedSpace 𝕜 (E i)\ns : (i : ι) → Set (E i)\nx : (i : ι) → E i\nI : Set ι\nh : ∀ (i : ι), i ∈ I → UniqueDiffWithinAt 𝕜 (s i) (x i)\n⊢ UniqueDiffWithinAt 𝕜 (Set.pi univ (piecewise I s fun x => univ)) x\n[PROOFSTEP]\nrefine' UniqueDiffWithinAt.univ_pi ι E _ _ fun i => _\n[GOAL]\n𝕜 : Type u_1\ninst✝⁹ : NontriviallyNormedField 𝕜\nE✝ : Type u_2\ninst✝⁸ : NormedAddCommGroup E✝\ninst✝⁷ : NormedSpace 𝕜 E✝\nF : Type u_3\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\nG : Type u_4\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace ℝ G\nx✝ y : E✝\ns✝ t : Set E✝\nι : Type u_5\ninst✝² : Finite ι\nE : ι → Type u_6\ninst✝¹ : (i : ι) → NormedAddCommGroup (E i)\ninst✝ : (i : ι) → NormedSpace 𝕜 (E i)\ns : (i : ι) → Set (E i)\nx : (i : ι) → E i\nI : Set ι\nh : ∀ (i : ι), i ∈ I → UniqueDiffWithinAt 𝕜 (s i) (x i)\ni : ι\n⊢ UniqueDiffWithinAt 𝕜 (piecewise I s (fun x => univ) i) (x i)\n[PROOFSTEP]\nby_cases hi : i ∈ I\n[GOAL]\ncase pos\n𝕜 : Type u_1\ninst✝⁹ : NontriviallyNormedField 𝕜\nE✝ : Type u_2\ninst✝⁸ : NormedAddCommGroup E✝\ninst✝⁷ : NormedSpace 𝕜 E✝\nF : Type u_3\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\nG : Type u_4\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace ℝ G\nx✝ y : E✝\ns✝ t : Set E✝\nι : Type u_5\ninst✝² : Finite ι\nE : ι → Type u_6\ninst✝¹ : (i : ι) → NormedAddCommGroup (E i)\ninst✝ : (i : ι) → NormedSpace 𝕜 (E i)\ns : (i : ι) → Set (E i)\nx : (i : ι) → E i\nI : Set ι\nh : ∀ (i : ι), i ∈ I → UniqueDiffWithinAt 𝕜 (s i) (x i)\ni : ι\nhi : i ∈ I\n⊢ UniqueDiffWithinAt 𝕜 (piecewise I s (fun x => univ) i) (x i)\n[PROOFSTEP]\nsimp [*, uniqueDiffWithinAt_univ]\n[GOAL]\ncase neg\n𝕜 : Type u_1\ninst✝⁹ : NontriviallyNormedField 𝕜\nE✝ : Type u_2\ninst✝⁸ : NormedAddCommGroup E✝\ninst✝⁷ : NormedSpace 𝕜 E✝\nF : Type u_3\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace 𝕜 F\nG : Type u_4\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace ℝ G\nx✝ y : E✝\ns✝ t : Set E✝\nι : Type u_5\ninst✝² : Finite ι\nE : ι → Type u_6\ninst✝¹ : (i : ι) → NormedAddCommGroup (E i)\ninst✝ : (i : ι) → NormedSpace 𝕜 (E i)\ns : (i : ι) → Set (E i)\nx : (i : ι) → E i\nI : Set ι\nh : ∀ (i : ι), i ∈ I → UniqueDiffWithinAt 𝕜 (s i) (x i)\ni : ι\nhi : ¬i ∈ I\n⊢ UniqueDiffWithinAt 𝕜 (piecewise I s (fun x => univ) i) (x i)\n[PROOFSTEP]\nsimp [*, uniqueDiffWithinAt_univ]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx✝ y : E\ns✝ t : Set E\ns : Set G\nconv : Convex ℝ s\nhs : Set.Nonempty (interior s)\nx : G\nhx : x ∈ closure s\n⊢ UniqueDiffWithinAt ℝ s x\n[PROOFSTEP]\nrcases hs with ⟨y, hy⟩\n[GOAL]\ncase intro\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx✝ y✝ : E\ns✝ t : Set E\ns : Set G\nconv : Convex ℝ s\nx : G\nhx : x ∈ closure s\ny : G\nhy : y ∈ interior s\n⊢ UniqueDiffWithinAt ℝ s x\n[PROOFSTEP]\nsuffices y - x ∈ interior (tangentConeAt ℝ s x)\n  by\n  refine' ⟨Dense.of_closure _, hx⟩\n  simp [(Submodule.span ℝ (tangentConeAt ℝ s x)).eq_top_of_nonempty_interior'\n      ⟨y - x, interior_mono Submodule.subset_span this⟩]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx✝ y✝ : E\ns✝ t : Set E\ns : Set G\nconv : Convex ℝ s\nx : G\nhx : x ∈ closure s\ny : G\nhy : y ∈ interior s\nthis : y - x ∈ interior (tangentConeAt ℝ s x)\n⊢ UniqueDiffWithinAt ℝ s x\n[PROOFSTEP]\nrefine' ⟨Dense.of_closure _, hx⟩\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx✝ y✝ : E\ns✝ t : Set E\ns : Set G\nconv : Convex ℝ s\nx : G\nhx : x ∈ closure s\ny : G\nhy : y ∈ interior s\nthis : y - x ∈ interior (tangentConeAt ℝ s x)\n⊢ Dense (closure ↑(Submodule.span ℝ (tangentConeAt ℝ s x)))\n[PROOFSTEP]\nsimp [(Submodule.span ℝ (tangentConeAt ℝ s x)).eq_top_of_nonempty_interior'\n    ⟨y - x, interior_mono Submodule.subset_span this⟩]\n[GOAL]\ncase intro\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx✝ y✝ : E\ns✝ t : Set E\ns : Set G\nconv : Convex ℝ s\nx : G\nhx : x ∈ closure s\ny : G\nhy : y ∈ interior s\n⊢ y - x ∈ interior (tangentConeAt ℝ s x)\n[PROOFSTEP]\nrw [mem_interior_iff_mem_nhds]\n[GOAL]\ncase intro\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx✝ y✝ : E\ns✝ t : Set E\ns : Set G\nconv : Convex ℝ s\nx : G\nhx : x ∈ closure s\ny : G\nhy : y ∈ interior s\n⊢ tangentConeAt ℝ s x ∈ 𝓝 (y - x)\n[PROOFSTEP]\nreplace hy : interior s ∈ 𝓝 y := IsOpen.mem_nhds isOpen_interior hy\n[GOAL]\ncase intro\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx✝ y✝ : E\ns✝ t : Set E\ns : Set G\nconv : Convex ℝ s\nx : G\nhx : x ∈ closure s\ny : G\nhy : interior s ∈ 𝓝 y\n⊢ tangentConeAt ℝ s x ∈ 𝓝 (y - x)\n[PROOFSTEP]\napply mem_of_superset ((isOpenMap_sub_right x).image_mem_nhds hy)\n[GOAL]\ncase intro\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx✝ y✝ : E\ns✝ t : Set E\ns : Set G\nconv : Convex ℝ s\nx : G\nhx : x ∈ closure s\ny : G\nhy : interior s ∈ 𝓝 y\n⊢ (fun x_1 => x_1 - x) '' interior s ⊆ tangentConeAt ℝ s x\n[PROOFSTEP]\nrintro _ ⟨z, zs, rfl⟩\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx✝ y✝ : E\ns✝ t : Set E\ns : Set G\nconv : Convex ℝ s\nx : G\nhx : x ∈ closure s\ny : G\nhy : interior s ∈ 𝓝 y\nz : G\nzs : z ∈ interior s\n⊢ (fun x_1 => x_1 - x) z ∈ tangentConeAt ℝ s x\n[PROOFSTEP]\nrefine' mem_tangentCone_of_openSegment_subset (Subset.trans _ interior_subset)\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx✝ y✝ : E\ns✝ t : Set E\ns : Set G\nconv : Convex ℝ s\nx : G\nhx : x ∈ closure s\ny : G\nhy : interior s ∈ 𝓝 y\nz : G\nzs : z ∈ interior s\n⊢ openSegment ℝ x z ⊆ interior s\n[PROOFSTEP]\nexact conv.openSegment_closure_interior_subset_interior hx zs\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx y : E\ns t : Set E\na : ℝ\n⊢ Set.Nonempty (interior (Ici a))\n[PROOFSTEP]\nsimp only [interior_Ici, nonempty_Ioi]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx y : E\ns t : Set E\na : ℝ\n⊢ Set.Nonempty (interior (Iic a))\n[PROOFSTEP]\nsimp only [interior_Iic, nonempty_Iio]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx y : E\ns t : Set E\na b : ℝ\nhab : a < b\n⊢ Set.Nonempty (interior (Icc a b))\n[PROOFSTEP]\nsimp only [interior_Icc, nonempty_Ioo, hab]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx y : E\ns t : Set E\na b : ℝ\nhab : a < b\n⊢ Set.Nonempty (interior (Ico a b))\n[PROOFSTEP]\nsimp only [interior_Ico, nonempty_Ioo, hab]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx y : E\ns t : Set E\na b : ℝ\nhab : ¬a < b\n⊢ UniqueDiffOn ℝ (Ico a b)\n[PROOFSTEP]\nsimp only [Ico_eq_empty hab, uniqueDiffOn_empty]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx y : E\ns t : Set E\na b : ℝ\nhab : a < b\n⊢ Set.Nonempty (interior (Ioc a b))\n[PROOFSTEP]\nsimp only [interior_Ioc, nonempty_Ioo, hab]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx y : E\ns t : Set E\na b : ℝ\nhab : ¬a < b\n⊢ UniqueDiffOn ℝ (Ioc a b)\n[PROOFSTEP]\nsimp only [Ioc_eq_empty hab, uniqueDiffOn_empty]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx y : E\ns t : Set E\na : ℝ\n⊢ Set.Nonempty (interior (Ioi a))\n[PROOFSTEP]\nsimp\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx y : E\ns t : Set E\na : ℝ\n⊢ a ∈ closure (Ioi a)\n[PROOFSTEP]\nsimp\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx y : E\ns t : Set E\na : ℝ\n⊢ Set.Nonempty (interior (Iio a))\n[PROOFSTEP]\nsimp\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nG : Type u_4\ninst✝¹ : NormedAddCommGroup G\ninst✝ : NormedSpace ℝ G\nx y : E\ns t : Set E\na : ℝ\n⊢ a ∈ closure (Iio a)\n[PROOFSTEP]\nsimp\n", "meta": {"mathlib_filename": "Mathlib.Analysis.Calculus.TangentCone", "llama_tokens": 43127, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8152324803738429, "lm_q2_score": 0.6224593312018546, "lm_q1q2_score": 0.5074490645075312}}
{"text": "[GOAL]\nα : Type u\nβ : Type v\nf : α → β\ng : β → α\nhf : Injective f\nhg : Injective g\n⊢ ∃ h, Bijective h\n[PROOFSTEP]\ncases' isEmpty_or_nonempty β with hβ hβ\n[GOAL]\ncase inl\nα : Type u\nβ : Type v\nf : α → β\ng : β → α\nhf : Injective f\nhg : Injective g\nhβ : IsEmpty β\n⊢ ∃ h, Bijective h\n[PROOFSTEP]\nhave : IsEmpty α := Function.isEmpty f\n[GOAL]\ncase inl\nα : Type u\nβ : Type v\nf : α → β\ng : β → α\nhf : Injective f\nhg : Injective g\nhβ : IsEmpty β\nthis : IsEmpty α\n⊢ ∃ h, Bijective h\n[PROOFSTEP]\nexact ⟨_, ((Equiv.equivEmpty α).trans (Equiv.equivEmpty β).symm).bijective⟩\n[GOAL]\ncase inr\nα : Type u\nβ : Type v\nf : α → β\ng : β → α\nhf : Injective f\nhg : Injective g\nhβ : Nonempty β\n⊢ ∃ h, Bijective h\n[PROOFSTEP]\nset F : Set α →o Set α :=\n  { toFun := fun s => (g '' (f '' s)ᶜ)ᶜ\n    monotone' := fun s t hst =>\n      compl_subset_compl.mpr <| image_subset _ <| compl_subset_compl.mpr <| image_subset _ hst }\n    -- Porting note: dot notation `F.lfp` doesn't work here\n[GOAL]\ncase inr\nα : Type u\nβ : Type v\nf : α → β\ng : β → α\nhf : Injective f\nhg : Injective g\nhβ : Nonempty β\nF : Set α →o Set α :=\n  { toFun := fun s => (g '' (f '' s)ᶜ)ᶜ,\n    monotone' := (_ : ∀ (s t : Set α), s ≤ t → (g '' (f '' s)ᶜ)ᶜ ⊆ (g '' (f '' t)ᶜ)ᶜ) }\n⊢ ∃ h, Bijective h\n[PROOFSTEP]\nset s : Set α := OrderHom.lfp F\n[GOAL]\ncase inr\nα : Type u\nβ : Type v\nf : α → β\ng : β → α\nhf : Injective f\nhg : Injective g\nhβ : Nonempty β\nF : Set α →o Set α :=\n  { toFun := fun s => (g '' (f '' s)ᶜ)ᶜ,\n    monotone' := (_ : ∀ (s t : Set α), s ≤ t → (g '' (f '' s)ᶜ)ᶜ ⊆ (g '' (f '' t)ᶜ)ᶜ) }\ns : Set α := ↑OrderHom.lfp F\n⊢ ∃ h, Bijective h\n[PROOFSTEP]\nhave hs : (g '' (f '' s)ᶜ)ᶜ = s := F.map_lfp\n[GOAL]\ncase inr\nα : Type u\nβ : Type v\nf : α → β\ng : β → α\nhf : Injective f\nhg : Injective g\nhβ : Nonempty β\nF : Set α →o Set α :=\n  { toFun := fun s => (g '' (f '' s)ᶜ)ᶜ,\n    monotone' := (_ : ∀ (s t : Set α), s ≤ t → (g '' (f '' s)ᶜ)ᶜ ⊆ (g '' (f '' t)ᶜ)ᶜ) }\ns : Set α := ↑OrderHom.lfp F\nhs : (g '' (f '' s)ᶜ)ᶜ = s\n⊢ ∃ h, Bijective h\n[PROOFSTEP]\nhave hns : g '' (f '' s)ᶜ = sᶜ := compl_injective (by simp [hs])\n[GOAL]\nα : Type u\nβ : Type v\nf : α → β\ng : β → α\nhf : Injective f\nhg : Injective g\nhβ : Nonempty β\nF : Set α →o Set α :=\n  { toFun := fun s => (g '' (f '' s)ᶜ)ᶜ,\n    monotone' := (_ : ∀ (s t : Set α), s ≤ t → (g '' (f '' s)ᶜ)ᶜ ⊆ (g '' (f '' t)ᶜ)ᶜ) }\ns : Set α := ↑OrderHom.lfp F\nhs : (g '' (f '' s)ᶜ)ᶜ = s\n⊢ (g '' (f '' s)ᶜ)ᶜ = sᶜᶜ\n[PROOFSTEP]\nsimp [hs]\n[GOAL]\ncase inr\nα : Type u\nβ : Type v\nf : α → β\ng : β → α\nhf : Injective f\nhg : Injective g\nhβ : Nonempty β\nF : Set α →o Set α :=\n  { toFun := fun s => (g '' (f '' s)ᶜ)ᶜ,\n    monotone' := (_ : ∀ (s t : Set α), s ≤ t → (g '' (f '' s)ᶜ)ᶜ ⊆ (g '' (f '' t)ᶜ)ᶜ) }\ns : Set α := ↑OrderHom.lfp F\nhs : (g '' (f '' s)ᶜ)ᶜ = s\nhns : g '' (f '' s)ᶜ = sᶜ\n⊢ ∃ h, Bijective h\n[PROOFSTEP]\nset g' := invFun g\n[GOAL]\ncase inr\nα : Type u\nβ : Type v\nf : α → β\ng : β → α\nhf : Injective f\nhg : Injective g\nhβ : Nonempty β\nF : Set α →o Set α :=\n  { toFun := fun s => (g '' (f '' s)ᶜ)ᶜ,\n    monotone' := (_ : ∀ (s t : Set α), s ≤ t → (g '' (f '' s)ᶜ)ᶜ ⊆ (g '' (f '' t)ᶜ)ᶜ) }\ns : Set α := ↑OrderHom.lfp F\nhs : (g '' (f '' s)ᶜ)ᶜ = s\nhns : g '' (f '' s)ᶜ = sᶜ\ng' : α → β := invFun g\n⊢ ∃ h, Bijective h\n[PROOFSTEP]\nhave g'g : LeftInverse g' g := leftInverse_invFun hg\n[GOAL]\ncase inr\nα : Type u\nβ : Type v\nf : α → β\ng : β → α\nhf : Injective f\nhg : Injective g\nhβ : Nonempty β\nF : Set α →o Set α :=\n  { toFun := fun s => (g '' (f '' s)ᶜ)ᶜ,\n    monotone' := (_ : ∀ (s t : Set α), s ≤ t → (g '' (f '' s)ᶜ)ᶜ ⊆ (g '' (f '' t)ᶜ)ᶜ) }\ns : Set α := ↑OrderHom.lfp F\nhs : (g '' (f '' s)ᶜ)ᶜ = s\nhns : g '' (f '' s)ᶜ = sᶜ\ng' : α → β := invFun g\ng'g : LeftInverse g' g\n⊢ ∃ h, Bijective h\n[PROOFSTEP]\nhave hg'ns : g' '' sᶜ = (f '' s)ᶜ := by rw [← hns, g'g.image_image]\n[GOAL]\nα : Type u\nβ : Type v\nf : α → β\ng : β → α\nhf : Injective f\nhg : Injective g\nhβ : Nonempty β\nF : Set α →o Set α :=\n  { toFun := fun s => (g '' (f '' s)ᶜ)ᶜ,\n    monotone' := (_ : ∀ (s t : Set α), s ≤ t → (g '' (f '' s)ᶜ)ᶜ ⊆ (g '' (f '' t)ᶜ)ᶜ) }\ns : Set α := ↑OrderHom.lfp F\nhs : (g '' (f '' s)ᶜ)ᶜ = s\nhns : g '' (f '' s)ᶜ = sᶜ\ng' : α → β := invFun g\ng'g : LeftInverse g' g\n⊢ g' '' sᶜ = (f '' s)ᶜ\n[PROOFSTEP]\nrw [← hns, g'g.image_image]\n[GOAL]\ncase inr\nα : Type u\nβ : Type v\nf : α → β\ng : β → α\nhf : Injective f\nhg : Injective g\nhβ : Nonempty β\nF : Set α →o Set α :=\n  { toFun := fun s => (g '' (f '' s)ᶜ)ᶜ,\n    monotone' := (_ : ∀ (s t : Set α), s ≤ t → (g '' (f '' s)ᶜ)ᶜ ⊆ (g '' (f '' t)ᶜ)ᶜ) }\ns : Set α := ↑OrderHom.lfp F\nhs : (g '' (f '' s)ᶜ)ᶜ = s\nhns : g '' (f '' s)ᶜ = sᶜ\ng' : α → β := invFun g\ng'g : LeftInverse g' g\nhg'ns : g' '' sᶜ = (f '' s)ᶜ\n⊢ ∃ h, Bijective h\n[PROOFSTEP]\nset h : α → β := s.piecewise f g'\n[GOAL]\ncase inr\nα : Type u\nβ : Type v\nf : α → β\ng : β → α\nhf : Injective f\nhg : Injective g\nhβ : Nonempty β\nF : Set α →o Set α :=\n  { toFun := fun s => (g '' (f '' s)ᶜ)ᶜ,\n    monotone' := (_ : ∀ (s t : Set α), s ≤ t → (g '' (f '' s)ᶜ)ᶜ ⊆ (g '' (f '' t)ᶜ)ᶜ) }\ns : Set α := ↑OrderHom.lfp F\nhs : (g '' (f '' s)ᶜ)ᶜ = s\nhns : g '' (f '' s)ᶜ = sᶜ\ng' : α → β := invFun g\ng'g : LeftInverse g' g\nhg'ns : g' '' sᶜ = (f '' s)ᶜ\nh : α → β := piecewise s f g'\n⊢ ∃ h, Bijective h\n[PROOFSTEP]\nhave : Surjective h := by rw [← range_iff_surjective, range_piecewise, hg'ns, union_compl_self]\n[GOAL]\nα : Type u\nβ : Type v\nf : α → β\ng : β → α\nhf : Injective f\nhg : Injective g\nhβ : Nonempty β\nF : Set α →o Set α :=\n  { toFun := fun s => (g '' (f '' s)ᶜ)ᶜ,\n    monotone' := (_ : ∀ (s t : Set α), s ≤ t → (g '' (f '' s)ᶜ)ᶜ ⊆ (g '' (f '' t)ᶜ)ᶜ) }\ns : Set α := ↑OrderHom.lfp F\nhs : (g '' (f '' s)ᶜ)ᶜ = s\nhns : g '' (f '' s)ᶜ = sᶜ\ng' : α → β := invFun g\ng'g : LeftInverse g' g\nhg'ns : g' '' sᶜ = (f '' s)ᶜ\nh : α → β := piecewise s f g'\n⊢ Surjective h\n[PROOFSTEP]\nrw [← range_iff_surjective, range_piecewise, hg'ns, union_compl_self]\n[GOAL]\ncase inr\nα : Type u\nβ : Type v\nf : α → β\ng : β → α\nhf : Injective f\nhg : Injective g\nhβ : Nonempty β\nF : Set α →o Set α :=\n  { toFun := fun s => (g '' (f '' s)ᶜ)ᶜ,\n    monotone' := (_ : ∀ (s t : Set α), s ≤ t → (g '' (f '' s)ᶜ)ᶜ ⊆ (g '' (f '' t)ᶜ)ᶜ) }\ns : Set α := ↑OrderHom.lfp F\nhs : (g '' (f '' s)ᶜ)ᶜ = s\nhns : g '' (f '' s)ᶜ = sᶜ\ng' : α → β := invFun g\ng'g : LeftInverse g' g\nhg'ns : g' '' sᶜ = (f '' s)ᶜ\nh : α → β := piecewise s f g'\nthis : Surjective h\n⊢ ∃ h, Bijective h\n[PROOFSTEP]\nhave : Injective h := by\n  refine' (injective_piecewise_iff _).2 ⟨hf.injOn _, _, _⟩\n  · intro x hx y hy hxy\n    obtain ⟨x', _, rfl⟩ : x ∈ g '' (f '' s)ᶜ := by rwa [hns]\n    obtain ⟨y', _, rfl⟩ : y ∈ g '' (f '' s)ᶜ := by rwa [hns]\n    rw [g'g _, g'g _] at hxy \n    rw [hxy]\n  · intro x hx y hy hxy\n    obtain ⟨y', hy', rfl⟩ : y ∈ g '' (f '' s)ᶜ := by rwa [hns]\n    rw [g'g _] at hxy \n    exact hy' ⟨x, hx, hxy⟩\n[GOAL]\nα : Type u\nβ : Type v\nf : α → β\ng : β → α\nhf : Injective f\nhg : Injective g\nhβ : Nonempty β\nF : Set α →o Set α :=\n  { toFun := fun s => (g '' (f '' s)ᶜ)ᶜ,\n    monotone' := (_ : ∀ (s t : Set α), s ≤ t → (g '' (f '' s)ᶜ)ᶜ ⊆ (g '' (f '' t)ᶜ)ᶜ) }\ns : Set α := ↑OrderHom.lfp F\nhs : (g '' (f '' s)ᶜ)ᶜ = s\nhns : g '' (f '' s)ᶜ = sᶜ\ng' : α → β := invFun g\ng'g : LeftInverse g' g\nhg'ns : g' '' sᶜ = (f '' s)ᶜ\nh : α → β := piecewise s f g'\nthis : Surjective h\n⊢ Injective h\n[PROOFSTEP]\nrefine' (injective_piecewise_iff _).2 ⟨hf.injOn _, _, _⟩\n[GOAL]\ncase refine'_1\nα : Type u\nβ : Type v\nf : α → β\ng : β → α\nhf : Injective f\nhg : Injective g\nhβ : Nonempty β\nF : Set α →o Set α :=\n  { toFun := fun s => (g '' (f '' s)ᶜ)ᶜ,\n    monotone' := (_ : ∀ (s t : Set α), s ≤ t → (g '' (f '' s)ᶜ)ᶜ ⊆ (g '' (f '' t)ᶜ)ᶜ) }\ns : Set α := ↑OrderHom.lfp F\nhs : (g '' (f '' s)ᶜ)ᶜ = s\nhns : g '' (f '' s)ᶜ = sᶜ\ng' : α → β := invFun g\ng'g : LeftInverse g' g\nhg'ns : g' '' sᶜ = (f '' s)ᶜ\nh : α → β := piecewise s f g'\nthis : Surjective h\n⊢ InjOn g' sᶜ\n[PROOFSTEP]\nintro x hx y hy hxy\n[GOAL]\ncase refine'_1\nα : Type u\nβ : Type v\nf : α → β\ng : β → α\nhf : Injective f\nhg : Injective g\nhβ : Nonempty β\nF : Set α →o Set α :=\n  { toFun := fun s => (g '' (f '' s)ᶜ)ᶜ,\n    monotone' := (_ : ∀ (s t : Set α), s ≤ t → (g '' (f '' s)ᶜ)ᶜ ⊆ (g '' (f '' t)ᶜ)ᶜ) }\ns : Set α := ↑OrderHom.lfp F\nhs : (g '' (f '' s)ᶜ)ᶜ = s\nhns : g '' (f '' s)ᶜ = sᶜ\ng' : α → β := invFun g\ng'g : LeftInverse g' g\nhg'ns : g' '' sᶜ = (f '' s)ᶜ\nh : α → β := piecewise s f g'\nthis : Surjective h\nx : α\nhx : x ∈ sᶜ\ny : α\nhy : y ∈ sᶜ\nhxy : g' x = g' y\n⊢ x = y\n[PROOFSTEP]\nobtain ⟨x', _, rfl⟩ : x ∈ g '' (f '' s)ᶜ := by rwa [hns]\n[GOAL]\nα : Type u\nβ : Type v\nf : α → β\ng : β → α\nhf : Injective f\nhg : Injective g\nhβ : Nonempty β\nF : Set α →o Set α :=\n  { toFun := fun s => (g '' (f '' s)ᶜ)ᶜ,\n    monotone' := (_ : ∀ (s t : Set α), s ≤ t → (g '' (f '' s)ᶜ)ᶜ ⊆ (g '' (f '' t)ᶜ)ᶜ) }\ns : Set α := ↑OrderHom.lfp F\nhs : (g '' (f '' s)ᶜ)ᶜ = s\nhns : g '' (f '' s)ᶜ = sᶜ\ng' : α → β := invFun g\ng'g : LeftInverse g' g\nhg'ns : g' '' sᶜ = (f '' s)ᶜ\nh : α → β := piecewise s f g'\nthis : Surjective h\nx : α\nhx : x ∈ sᶜ\ny : α\nhy : y ∈ sᶜ\nhxy : g' x = g' y\n⊢ x ∈ g '' (f '' s)ᶜ\n[PROOFSTEP]\nrwa [hns]\n[GOAL]\ncase refine'_1.intro.intro\nα : Type u\nβ : Type v\nf : α → β\ng : β → α\nhf : Injective f\nhg : Injective g\nhβ : Nonempty β\nF : Set α →o Set α :=\n  { toFun := fun s => (g '' (f '' s)ᶜ)ᶜ,\n    monotone' := (_ : ∀ (s t : Set α), s ≤ t → (g '' (f '' s)ᶜ)ᶜ ⊆ (g '' (f '' t)ᶜ)ᶜ) }\ns : Set α := ↑OrderHom.lfp F\nhs : (g '' (f '' s)ᶜ)ᶜ = s\nhns : g '' (f '' s)ᶜ = sᶜ\ng' : α → β := invFun g\ng'g : LeftInverse g' g\nhg'ns : g' '' sᶜ = (f '' s)ᶜ\nh : α → β := piecewise s f g'\nthis : Surjective h\ny : α\nhy : y ∈ sᶜ\nx' : β\nleft✝ : x' ∈ (f '' s)ᶜ\nhx : g x' ∈ sᶜ\nhxy : g' (g x') = g' y\n⊢ g x' = y\n[PROOFSTEP]\nobtain ⟨y', _, rfl⟩ : y ∈ g '' (f '' s)ᶜ := by rwa [hns]\n[GOAL]\nα : Type u\nβ : Type v\nf : α → β\ng : β → α\nhf : Injective f\nhg : Injective g\nhβ : Nonempty β\nF : Set α →o Set α :=\n  { toFun := fun s => (g '' (f '' s)ᶜ)ᶜ,\n    monotone' := (_ : ∀ (s t : Set α), s ≤ t → (g '' (f '' s)ᶜ)ᶜ ⊆ (g '' (f '' t)ᶜ)ᶜ) }\ns : Set α := ↑OrderHom.lfp F\nhs : (g '' (f '' s)ᶜ)ᶜ = s\nhns : g '' (f '' s)ᶜ = sᶜ\ng' : α → β := invFun g\ng'g : LeftInverse g' g\nhg'ns : g' '' sᶜ = (f '' s)ᶜ\nh : α → β := piecewise s f g'\nthis : Surjective h\ny : α\nhy : y ∈ sᶜ\nx' : β\nleft✝ : x' ∈ (f '' s)ᶜ\nhx : g x' ∈ sᶜ\nhxy : g' (g x') = g' y\n⊢ y ∈ g '' (f '' s)ᶜ\n[PROOFSTEP]\nrwa [hns]\n[GOAL]\ncase refine'_1.intro.intro.intro.intro\nα : Type u\nβ : Type v\nf : α → β\ng : β → α\nhf : Injective f\nhg : Injective g\nhβ : Nonempty β\nF : Set α →o Set α :=\n  { toFun := fun s => (g '' (f '' s)ᶜ)ᶜ,\n    monotone' := (_ : ∀ (s t : Set α), s ≤ t → (g '' (f '' s)ᶜ)ᶜ ⊆ (g '' (f '' t)ᶜ)ᶜ) }\ns : Set α := ↑OrderHom.lfp F\nhs : (g '' (f '' s)ᶜ)ᶜ = s\nhns : g '' (f '' s)ᶜ = sᶜ\ng' : α → β := invFun g\ng'g : LeftInverse g' g\nhg'ns : g' '' sᶜ = (f '' s)ᶜ\nh : α → β := piecewise s f g'\nthis : Surjective h\nx' : β\nleft✝¹ : x' ∈ (f '' s)ᶜ\nhx : g x' ∈ sᶜ\ny' : β\nleft✝ : y' ∈ (f '' s)ᶜ\nhy : g y' ∈ sᶜ\nhxy : g' (g x') = g' (g y')\n⊢ g x' = g y'\n[PROOFSTEP]\nrw [g'g _, g'g _] at hxy \n[GOAL]\ncase refine'_1.intro.intro.intro.intro\nα : Type u\nβ : Type v\nf : α → β\ng : β → α\nhf : Injective f\nhg : Injective g\nhβ : Nonempty β\nF : Set α →o Set α :=\n  { toFun := fun s => (g '' (f '' s)ᶜ)ᶜ,\n    monotone' := (_ : ∀ (s t : Set α), s ≤ t → (g '' (f '' s)ᶜ)ᶜ ⊆ (g '' (f '' t)ᶜ)ᶜ) }\ns : Set α := ↑OrderHom.lfp F\nhs : (g '' (f '' s)ᶜ)ᶜ = s\nhns : g '' (f '' s)ᶜ = sᶜ\ng' : α → β := invFun g\ng'g : LeftInverse g' g\nhg'ns : g' '' sᶜ = (f '' s)ᶜ\nh : α → β := piecewise s f g'\nthis : Surjective h\nx' : β\nleft✝¹ : x' ∈ (f '' s)ᶜ\nhx : g x' ∈ sᶜ\ny' : β\nleft✝ : y' ∈ (f '' s)ᶜ\nhy : g y' ∈ sᶜ\nhxy : x' = y'\n⊢ g x' = g y'\n[PROOFSTEP]\nrw [hxy]\n[GOAL]\ncase refine'_2\nα : Type u\nβ : Type v\nf : α → β\ng : β → α\nhf : Injective f\nhg : Injective g\nhβ : Nonempty β\nF : Set α →o Set α :=\n  { toFun := fun s => (g '' (f '' s)ᶜ)ᶜ,\n    monotone' := (_ : ∀ (s t : Set α), s ≤ t → (g '' (f '' s)ᶜ)ᶜ ⊆ (g '' (f '' t)ᶜ)ᶜ) }\ns : Set α := ↑OrderHom.lfp F\nhs : (g '' (f '' s)ᶜ)ᶜ = s\nhns : g '' (f '' s)ᶜ = sᶜ\ng' : α → β := invFun g\ng'g : LeftInverse g' g\nhg'ns : g' '' sᶜ = (f '' s)ᶜ\nh : α → β := piecewise s f g'\nthis : Surjective h\n⊢ ∀ (x : α), x ∈ s → ∀ (y : α), ¬y ∈ s → f x ≠ g' y\n[PROOFSTEP]\nintro x hx y hy hxy\n[GOAL]\ncase refine'_2\nα : Type u\nβ : Type v\nf : α → β\ng : β → α\nhf : Injective f\nhg : Injective g\nhβ : Nonempty β\nF : Set α →o Set α :=\n  { toFun := fun s => (g '' (f '' s)ᶜ)ᶜ,\n    monotone' := (_ : ∀ (s t : Set α), s ≤ t → (g '' (f '' s)ᶜ)ᶜ ⊆ (g '' (f '' t)ᶜ)ᶜ) }\ns : Set α := ↑OrderHom.lfp F\nhs : (g '' (f '' s)ᶜ)ᶜ = s\nhns : g '' (f '' s)ᶜ = sᶜ\ng' : α → β := invFun g\ng'g : LeftInverse g' g\nhg'ns : g' '' sᶜ = (f '' s)ᶜ\nh : α → β := piecewise s f g'\nthis : Surjective h\nx : α\nhx : x ∈ s\ny : α\nhy : ¬y ∈ s\nhxy : f x = g' y\n⊢ False\n[PROOFSTEP]\nobtain ⟨y', hy', rfl⟩ : y ∈ g '' (f '' s)ᶜ := by rwa [hns]\n[GOAL]\nα : Type u\nβ : Type v\nf : α → β\ng : β → α\nhf : Injective f\nhg : Injective g\nhβ : Nonempty β\nF : Set α →o Set α :=\n  { toFun := fun s => (g '' (f '' s)ᶜ)ᶜ,\n    monotone' := (_ : ∀ (s t : Set α), s ≤ t → (g '' (f '' s)ᶜ)ᶜ ⊆ (g '' (f '' t)ᶜ)ᶜ) }\ns : Set α := ↑OrderHom.lfp F\nhs : (g '' (f '' s)ᶜ)ᶜ = s\nhns : g '' (f '' s)ᶜ = sᶜ\ng' : α → β := invFun g\ng'g : LeftInverse g' g\nhg'ns : g' '' sᶜ = (f '' s)ᶜ\nh : α → β := piecewise s f g'\nthis : Surjective h\nx : α\nhx : x ∈ s\ny : α\nhy : ¬y ∈ s\nhxy : f x = g' y\n⊢ y ∈ g '' (f '' s)ᶜ\n[PROOFSTEP]\nrwa [hns]\n[GOAL]\ncase refine'_2.intro.intro\nα : Type u\nβ : Type v\nf : α → β\ng : β → α\nhf : Injective f\nhg : Injective g\nhβ : Nonempty β\nF : Set α →o Set α :=\n  { toFun := fun s => (g '' (f '' s)ᶜ)ᶜ,\n    monotone' := (_ : ∀ (s t : Set α), s ≤ t → (g '' (f '' s)ᶜ)ᶜ ⊆ (g '' (f '' t)ᶜ)ᶜ) }\ns : Set α := ↑OrderHom.lfp F\nhs : (g '' (f '' s)ᶜ)ᶜ = s\nhns : g '' (f '' s)ᶜ = sᶜ\ng' : α → β := invFun g\ng'g : LeftInverse g' g\nhg'ns : g' '' sᶜ = (f '' s)ᶜ\nh : α → β := piecewise s f g'\nthis : Surjective h\nx : α\nhx : x ∈ s\ny' : β\nhy' : y' ∈ (f '' s)ᶜ\nhy : ¬g y' ∈ s\nhxy : f x = g' (g y')\n⊢ False\n[PROOFSTEP]\nrw [g'g _] at hxy \n[GOAL]\ncase refine'_2.intro.intro\nα : Type u\nβ : Type v\nf : α → β\ng : β → α\nhf : Injective f\nhg : Injective g\nhβ : Nonempty β\nF : Set α →o Set α :=\n  { toFun := fun s => (g '' (f '' s)ᶜ)ᶜ,\n    monotone' := (_ : ∀ (s t : Set α), s ≤ t → (g '' (f '' s)ᶜ)ᶜ ⊆ (g '' (f '' t)ᶜ)ᶜ) }\ns : Set α := ↑OrderHom.lfp F\nhs : (g '' (f '' s)ᶜ)ᶜ = s\nhns : g '' (f '' s)ᶜ = sᶜ\ng' : α → β := invFun g\ng'g : LeftInverse g' g\nhg'ns : g' '' sᶜ = (f '' s)ᶜ\nh : α → β := piecewise s f g'\nthis : Surjective h\nx : α\nhx : x ∈ s\ny' : β\nhy' : y' ∈ (f '' s)ᶜ\nhy : ¬g y' ∈ s\nhxy : f x = y'\n⊢ False\n[PROOFSTEP]\nexact hy' ⟨x, hx, hxy⟩\n[GOAL]\ncase inr\nα : Type u\nβ : Type v\nf : α → β\ng : β → α\nhf : Injective f\nhg : Injective g\nhβ : Nonempty β\nF : Set α →o Set α :=\n  { toFun := fun s => (g '' (f '' s)ᶜ)ᶜ,\n    monotone' := (_ : ∀ (s t : Set α), s ≤ t → (g '' (f '' s)ᶜ)ᶜ ⊆ (g '' (f '' t)ᶜ)ᶜ) }\ns : Set α := ↑OrderHom.lfp F\nhs : (g '' (f '' s)ᶜ)ᶜ = s\nhns : g '' (f '' s)ᶜ = sᶜ\ng' : α → β := invFun g\ng'g : LeftInverse g' g\nhg'ns : g' '' sᶜ = (f '' s)ᶜ\nh : α → β := piecewise s f g'\nthis✝ : Surjective h\nthis : Injective h\n⊢ ∃ h, Bijective h\n[PROOFSTEP]\nexact ⟨h, ‹Injective h›, ‹Surjective h›⟩\n[GOAL]\nι : Type u\nβ : ι → Type v\nI : Nonempty ι\ns : Set ((i : ι) → β i)\nhs : s ∈ Function.Embedding.sets β\nms : ∀ (a : Set ((i : ι) → β i)), a ∈ Function.Embedding.sets β → s ⊆ a → a = s\nh : ¬∃ i, ∀ (y : β i), ∃ x, x ∈ s ∧ x i = y\n⊢ ∀ (i : ι), ∃ y, ∀ (x : (i : ι) → β i), x ∈ s → x i ≠ y\n[PROOFSTEP]\nsimpa only [ne_eq, not_exists, not_forall, not_and] using h\n[GOAL]\nι : Type u\nβ : ι → Type v\nI : Nonempty ι\ns : Set ((i : ι) → β i)\nhs : s ∈ Function.Embedding.sets β\nms : ∀ (a : Set ((i : ι) → β i)), a ∈ Function.Embedding.sets β → s ⊆ a → a = s\nh✝ : ¬∃ i, ∀ (y : β i), ∃ x, x ∈ s ∧ x i = y\nh : ∀ (i : ι), ∃ y, ∀ (x : (i : ι) → β i), x ∈ s → x i ≠ y\nf : (x : ι) → β x\nhf : ∀ (x : ι) (x_1 : (i : ι) → β i), x_1 ∈ s → x_1 x ≠ f x\nx : (i : ι) → β i\nhx : x ∈ insert f s\ny : (i : ι) → β i\nhy : y ∈ insert f s\n⊢ ∀ (i : ι), x i = y i → x = y\n[PROOFSTEP]\ncases' hx with hx hx\n[GOAL]\ncase inl\nι : Type u\nβ : ι → Type v\nI : Nonempty ι\ns : Set ((i : ι) → β i)\nhs : s ∈ Function.Embedding.sets β\nms : ∀ (a : Set ((i : ι) → β i)), a ∈ Function.Embedding.sets β → s ⊆ a → a = s\nh✝ : ¬∃ i, ∀ (y : β i), ∃ x, x ∈ s ∧ x i = y\nh : ∀ (i : ι), ∃ y, ∀ (x : (i : ι) → β i), x ∈ s → x i ≠ y\nf : (x : ι) → β x\nhf : ∀ (x : ι) (x_1 : (i : ι) → β i), x_1 ∈ s → x_1 x ≠ f x\nx y : (i : ι) → β i\nhy : y ∈ insert f s\nhx : x = f\n⊢ ∀ (i : ι), x i = y i → x = y\n[PROOFSTEP]\ncases' hy with hy hy\n[GOAL]\ncase inr\nι : Type u\nβ : ι → Type v\nI : Nonempty ι\ns : Set ((i : ι) → β i)\nhs : s ∈ Function.Embedding.sets β\nms : ∀ (a : Set ((i : ι) → β i)), a ∈ Function.Embedding.sets β → s ⊆ a → a = s\nh✝ : ¬∃ i, ∀ (y : β i), ∃ x, x ∈ s ∧ x i = y\nh : ∀ (i : ι), ∃ y, ∀ (x : (i : ι) → β i), x ∈ s → x i ≠ y\nf : (x : ι) → β x\nhf : ∀ (x : ι) (x_1 : (i : ι) → β i), x_1 ∈ s → x_1 x ≠ f x\nx y : (i : ι) → β i\nhy : y ∈ insert f s\nhx : x ∈ s\n⊢ ∀ (i : ι), x i = y i → x = y\n[PROOFSTEP]\ncases' hy with hy hy\n[GOAL]\ncase inl.inl\nι : Type u\nβ : ι → Type v\nI : Nonempty ι\ns : Set ((i : ι) → β i)\nhs : s ∈ Function.Embedding.sets β\nms : ∀ (a : Set ((i : ι) → β i)), a ∈ Function.Embedding.sets β → s ⊆ a → a = s\nh✝ : ¬∃ i, ∀ (y : β i), ∃ x, x ∈ s ∧ x i = y\nh : ∀ (i : ι), ∃ y, ∀ (x : (i : ι) → β i), x ∈ s → x i ≠ y\nf : (x : ι) → β x\nhf : ∀ (x : ι) (x_1 : (i : ι) → β i), x_1 ∈ s → x_1 x ≠ f x\nx y : (i : ι) → β i\nhx : x = f\nhy : y = f\n⊢ ∀ (i : ι), x i = y i → x = y\n[PROOFSTEP]\nsimp [hx, hy]\n[GOAL]\ncase inl.inr\nι : Type u\nβ : ι → Type v\nI : Nonempty ι\ns : Set ((i : ι) → β i)\nhs : s ∈ Function.Embedding.sets β\nms : ∀ (a : Set ((i : ι) → β i)), a ∈ Function.Embedding.sets β → s ⊆ a → a = s\nh✝ : ¬∃ i, ∀ (y : β i), ∃ x, x ∈ s ∧ x i = y\nh : ∀ (i : ι), ∃ y, ∀ (x : (i : ι) → β i), x ∈ s → x i ≠ y\nf : (x : ι) → β x\nhf : ∀ (x : ι) (x_1 : (i : ι) → β i), x_1 ∈ s → x_1 x ≠ f x\nx y : (i : ι) → β i\nhx : x = f\nhy : y ∈ s\n⊢ ∀ (i : ι), x i = y i → x = y\n[PROOFSTEP]\nsubst x\n[GOAL]\ncase inl.inr\nι : Type u\nβ : ι → Type v\nI : Nonempty ι\ns : Set ((i : ι) → β i)\nhs : s ∈ Function.Embedding.sets β\nms : ∀ (a : Set ((i : ι) → β i)), a ∈ Function.Embedding.sets β → s ⊆ a → a = s\nh✝ : ¬∃ i, ∀ (y : β i), ∃ x, x ∈ s ∧ x i = y\nh : ∀ (i : ι), ∃ y, ∀ (x : (i : ι) → β i), x ∈ s → x i ≠ y\nf : (x : ι) → β x\nhf : ∀ (x : ι) (x_1 : (i : ι) → β i), x_1 ∈ s → x_1 x ≠ f x\ny : (i : ι) → β i\nhy : y ∈ s\n⊢ ∀ (i : ι), f i = y i → f = y\n[PROOFSTEP]\nexact fun i e => (hf i y hy e.symm).elim\n[GOAL]\ncase inr.inl\nι : Type u\nβ : ι → Type v\nI : Nonempty ι\ns : Set ((i : ι) → β i)\nhs : s ∈ Function.Embedding.sets β\nms : ∀ (a : Set ((i : ι) → β i)), a ∈ Function.Embedding.sets β → s ⊆ a → a = s\nh✝ : ¬∃ i, ∀ (y : β i), ∃ x, x ∈ s ∧ x i = y\nh : ∀ (i : ι), ∃ y, ∀ (x : (i : ι) → β i), x ∈ s → x i ≠ y\nf : (x : ι) → β x\nhf : ∀ (x : ι) (x_1 : (i : ι) → β i), x_1 ∈ s → x_1 x ≠ f x\nx y : (i : ι) → β i\nhx : x ∈ s\nhy : y = f\n⊢ ∀ (i : ι), x i = y i → x = y\n[PROOFSTEP]\nsubst y\n[GOAL]\ncase inr.inl\nι : Type u\nβ : ι → Type v\nI : Nonempty ι\ns : Set ((i : ι) → β i)\nhs : s ∈ Function.Embedding.sets β\nms : ∀ (a : Set ((i : ι) → β i)), a ∈ Function.Embedding.sets β → s ⊆ a → a = s\nh✝ : ¬∃ i, ∀ (y : β i), ∃ x, x ∈ s ∧ x i = y\nh : ∀ (i : ι), ∃ y, ∀ (x : (i : ι) → β i), x ∈ s → x i ≠ y\nf : (x : ι) → β x\nhf : ∀ (x : ι) (x_1 : (i : ι) → β i), x_1 ∈ s → x_1 x ≠ f x\nx : (i : ι) → β i\nhx : x ∈ s\n⊢ ∀ (i : ι), x i = f i → x = f\n[PROOFSTEP]\nexact fun i e => (hf i x hx e).elim\n[GOAL]\ncase inr.inr\nι : Type u\nβ : ι → Type v\nI : Nonempty ι\ns : Set ((i : ι) → β i)\nhs : s ∈ Function.Embedding.sets β\nms : ∀ (a : Set ((i : ι) → β i)), a ∈ Function.Embedding.sets β → s ⊆ a → a = s\nh✝ : ¬∃ i, ∀ (y : β i), ∃ x, x ∈ s ∧ x i = y\nh : ∀ (i : ι), ∃ y, ∀ (x : (i : ι) → β i), x ∈ s → x i ≠ y\nf : (x : ι) → β x\nhf : ∀ (x : ι) (x_1 : (i : ι) → β i), x_1 ∈ s → x_1 x ≠ f x\nx y : (i : ι) → β i\nhx : x ∈ s\nhy : y ∈ s\n⊢ ∀ (i : ι), x i = y i → x = y\n[PROOFSTEP]\nexact hs x hx y hy\n[GOAL]\nι : Type u\nβ : ι → Type v\nI : Nonempty ι\ns : Set ((i : ι) → β i)\nhs : s ∈ Function.Embedding.sets β\nms : ∀ (a : Set ((i : ι) → β i)), a ∈ Function.Embedding.sets β → s ⊆ a → a = s\ni : ι\ne : ∀ (y : β i), ∃ x, x ∈ s ∧ x i = y\nf : β i → (i : ι) → β i\nhf : ∀ (x : β i), f x ∈ s ∧ f x i = x\nj : ι\na b : β i\ne' : (fun a => f a j) a = (fun a => f a j) b\n⊢ a = b\n[PROOFSTEP]\nlet ⟨sa, ea⟩ := hf a\n[GOAL]\nι : Type u\nβ : ι → Type v\nI : Nonempty ι\ns : Set ((i : ι) → β i)\nhs : s ∈ Function.Embedding.sets β\nms : ∀ (a : Set ((i : ι) → β i)), a ∈ Function.Embedding.sets β → s ⊆ a → a = s\ni : ι\ne : ∀ (y : β i), ∃ x, x ∈ s ∧ x i = y\nf : β i → (i : ι) → β i\nhf : ∀ (x : β i), f x ∈ s ∧ f x i = x\nj : ι\na b : β i\ne' : (fun a => f a j) a = (fun a => f a j) b\nsa : f a ∈ s\nea : f a i = a\n⊢ a = b\n[PROOFSTEP]\nlet ⟨sb, eb⟩ := hf b\n[GOAL]\nι : Type u\nβ : ι → Type v\nI : Nonempty ι\ns : Set ((i : ι) → β i)\nhs : s ∈ Function.Embedding.sets β\nms : ∀ (a : Set ((i : ι) → β i)), a ∈ Function.Embedding.sets β → s ⊆ a → a = s\ni : ι\ne : ∀ (y : β i), ∃ x, x ∈ s ∧ x i = y\nf : β i → (i : ι) → β i\nhf : ∀ (x : β i), f x ∈ s ∧ f x i = x\nj : ι\na b : β i\ne' : (fun a => f a j) a = (fun a => f a j) b\nsa : f a ∈ s\nea : f a i = a\nsb : f b ∈ s\neb : f b i = b\n⊢ a = b\n[PROOFSTEP]\nrw [← ea, ← eb, hs _ sa _ sb _ e']\n", "meta": {"mathlib_filename": "Mathlib.SetTheory.Cardinal.SchroederBernstein", "llama_tokens": 12034, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.819893353516963, "lm_q2_score": 0.6187804337438501, "lm_q1q2_score": 0.5073339649129261}}
{"text": "[GOAL]\na b m n k : ℕ\nS : Set ℕ\n⊢ S = Set.univ → 0 ∈ S ∧ ∀ (k : ℕ), k ∈ S → k + 1 ∈ S\n[PROOFSTEP]\nrintro rfl\n[GOAL]\na b m n k : ℕ\n⊢ 0 ∈ Set.univ ∧ ∀ (k : ℕ), k ∈ Set.univ → k + 1 ∈ Set.univ\n[PROOFSTEP]\nsimp\n[GOAL]\na✝ b m n✝ k n d : ℕ\nhnd : d ∣ n\na : ℕ\n⊢ a < n / d ↔ d * a < n\n[PROOFSTEP]\nrcases d.eq_zero_or_pos with (rfl | hd0)\n[GOAL]\ncase inl\na✝ b m n✝ k n a : ℕ\nhnd : 0 ∣ n\n⊢ a < n / 0 ↔ 0 * a < n\n[PROOFSTEP]\nsimp [zero_dvd_iff.mp hnd]\n[GOAL]\ncase inr\na✝ b m n✝ k n d : ℕ\nhnd : d ∣ n\na : ℕ\nhd0 : d > 0\n⊢ a < n / d ↔ d * a < n\n[PROOFSTEP]\nrw [← mul_lt_mul_left hd0, ← Nat.eq_mul_of_div_eq_right hnd rfl]\n[GOAL]\na b m n✝ k n d : ℕ\n⊢ d * (n / d) = n ↔ d * (n / d) = d * (n / d) + n % d\n[PROOFSTEP]\nrw [div_add_mod]\n[GOAL]\na b m n✝ k n d : ℕ\n⊢ d * (n / d) = d * (n / d) + n % d ↔ d ∣ n\n[PROOFSTEP]\nrw [self_eq_add_right, dvd_iff_mod_eq_zero]\n  -- porting note: new lemma\n[GOAL]\na b m n✝ k n x y : ℕ\nhn : n ≠ 0\nhx : x ∣ n\nhy : y ∣ n\n⊢ n / x = n / y ↔ x = y\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\na b m n✝ k n x y : ℕ\nhn : n ≠ 0\nhx : x ∣ n\nhy : y ∣ n\n⊢ n / x = n / y → x = y\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\na b m n✝ k n x y : ℕ\nhn : n ≠ 0\nhx : x ∣ n\nhy : y ∣ n\nh : n / x = n / y\n⊢ x = y\n[PROOFSTEP]\nrw [← mul_right_inj' hn]\n[GOAL]\ncase mp\na b m n✝ k n x y : ℕ\nhn : n ≠ 0\nhx : x ∣ n\nhy : y ∣ n\nh : n / x = n / y\n⊢ n * x = n * y\n[PROOFSTEP]\napply Nat.eq_mul_of_div_eq_left (dvd_mul_of_dvd_left hy x)\n[GOAL]\ncase mp\na b m n✝ k n x y : ℕ\nhn : n ≠ 0\nhx : x ∣ n\nhy : y ∣ n\nh : n / x = n / y\n⊢ n * x / y = n\n[PROOFSTEP]\nrw [eq_comm, mul_comm, Nat.mul_div_assoc _ hy]\n[GOAL]\ncase mp\na b m n✝ k n x y : ℕ\nhn : n ≠ 0\nhx : x ∣ n\nhy : y ∣ n\nh : n / x = n / y\n⊢ n = x * (n / y)\n[PROOFSTEP]\nexact Nat.eq_mul_of_div_eq_right hx h\n[GOAL]\ncase mpr\na b m n✝ k n x y : ℕ\nhn : n ≠ 0\nhx : x ∣ n\nhy : y ∣ n\n⊢ x = y → n / x = n / y\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\na b m n✝ k n x y : ℕ\nhn : n ≠ 0\nhx : x ∣ n\nhy : y ∣ n\nh : x = y\n⊢ n / x = n / y\n[PROOFSTEP]\nrw [h]\n[GOAL]\na✝ b✝ m n k a b : ℕ\nhb : 0 < b\nh : a / b = 0\n⊢ a < b\n[PROOFSTEP]\nrw [← mod_add_div a b, h, mul_zero, add_zero]\n[GOAL]\na✝ b✝ m n k a b : ℕ\nhb : 0 < b\nh : a / b = 0\n⊢ a % b < b\n[PROOFSTEP]\nexact mod_lt _ hb\n[GOAL]\na✝ b✝ m n k a b : ℕ\nhb : 0 < b\nh : a < b\n⊢ a / b = 0\n[PROOFSTEP]\nrw [← mul_right_inj' hb.ne', ← @add_left_cancel_iff _ _ _ (a % b), mod_add_div, mod_eq_of_lt h, mul_zero, add_zero]\n[GOAL]\na b m n✝ k n : ℕ\n⊢ ¬2 ∣ bit1 n\n[PROOFSTEP]\nrw [bit1, Nat.dvd_add_right two_dvd_bit0, Nat.dvd_one]\n  -- Porting note: was `cc`\n[GOAL]\na b m n✝ k n : ℕ\n⊢ ¬2 = 1\n[PROOFSTEP]\ndecide\n[GOAL]\na b m✝ n✝ k✝ k m n : ℕ\nh₁ : k ∣ m\nh₂ : k ∣ n\n⊢ k ∣ m - n\n[PROOFSTEP]\ncases' le_total n m with H H\n[GOAL]\ncase inl\na b m✝ n✝ k✝ k m n : ℕ\nh₁ : k ∣ m\nh₂ : k ∣ n\nH : n ≤ m\n⊢ k ∣ m - n\n[PROOFSTEP]\nexact dvd_sub H h₁ h₂\n[GOAL]\ncase inr\na b m✝ n✝ k✝ k m n : ℕ\nh₁ : k ∣ m\nh₂ : k ∣ n\nH : m ≤ n\n⊢ k ∣ m - n\n[PROOFSTEP]\nrw [tsub_eq_zero_iff_le.mpr H]\n[GOAL]\ncase inr\na b m✝ n✝ k✝ k m n : ℕ\nh₁ : k ∣ m\nh₂ : k ∣ n\nH : m ≤ n\n⊢ k ∣ 0\n[PROOFSTEP]\nexact dvd_zero k\n[GOAL]\na✝ b m n k a : ℕ\n⊢ (a + 1) / 0 = a / 0 + if 0 ∣ a + 1 then 1 else 0\n[PROOFSTEP]\nsimp\n[GOAL]\na b m n k : ℕ\n⊢ (0 + 1) / 1 = 0 / 1 + if 1 ∣ 0 + 1 then 1 else 0\n[PROOFSTEP]\nsimp\n[GOAL]\na b✝ m n k b : ℕ\n⊢ (0 + 1) / (b + 2) = 0 / (b + 2) + if b + 2 ∣ 0 + 1 then 1 else 0\n[PROOFSTEP]\nhave hb2 : b + 2 > 1 := by simp\n[GOAL]\na b✝ m n k b : ℕ\n⊢ b + 2 > 1\n[PROOFSTEP]\nsimp\n[GOAL]\na b✝ m n k b : ℕ\nhb2 : b + 2 > 1\n⊢ (0 + 1) / (b + 2) = 0 / (b + 2) + if b + 2 ∣ 0 + 1 then 1 else 0\n[PROOFSTEP]\nsimp [ne_of_gt hb2, div_eq_of_lt hb2]\n[GOAL]\na✝ b✝ m n k a b : ℕ\n⊢ (a + 1 + 1) / (b + 1) = (a + 1) / (b + 1) + if b + 1 ∣ a + 1 + 1 then 1 else 0\n[PROOFSTEP]\nrw [Nat.div_eq]\n[GOAL]\na✝ b✝ m n k a b : ℕ\n⊢ (if 0 < b + 1 ∧ b + 1 ≤ a + 1 + 1 then (a + 1 + 1 - (b + 1)) / (b + 1) + 1 else 0) =\n    (a + 1) / (b + 1) + if b + 1 ∣ a + 1 + 1 then 1 else 0\n[PROOFSTEP]\nconv_rhs => rw [Nat.div_eq]\n[GOAL]\na✝ b✝ m n k a b : ℕ\n| (a + 1) / (b + 1) + if b + 1 ∣ a + 1 + 1 then 1 else 0\n[PROOFSTEP]\nrw [Nat.div_eq]\n[GOAL]\na✝ b✝ m n k a b : ℕ\n| (a + 1) / (b + 1) + if b + 1 ∣ a + 1 + 1 then 1 else 0\n[PROOFSTEP]\nrw [Nat.div_eq]\n[GOAL]\na✝ b✝ m n k a b : ℕ\n| (a + 1) / (b + 1) + if b + 1 ∣ a + 1 + 1 then 1 else 0\n[PROOFSTEP]\nrw [Nat.div_eq]\n[GOAL]\na✝ b✝ m n k a b : ℕ\n⊢ (if 0 < b + 1 ∧ b + 1 ≤ a + 1 + 1 then (a + 1 + 1 - (b + 1)) / (b + 1) + 1 else 0) =\n    (if 0 < b + 1 ∧ b + 1 ≤ a + 1 then (a + 1 - (b + 1)) / (b + 1) + 1 else 0) + if b + 1 ∣ a + 1 + 1 then 1 else 0\n[PROOFSTEP]\nby_cases hb_eq_a : b = a + 1\n[GOAL]\ncase pos\na✝ b✝ m n k a b : ℕ\nhb_eq_a : b = a + 1\n⊢ (if 0 < b + 1 ∧ b + 1 ≤ a + 1 + 1 then (a + 1 + 1 - (b + 1)) / (b + 1) + 1 else 0) =\n    (if 0 < b + 1 ∧ b + 1 ≤ a + 1 then (a + 1 - (b + 1)) / (b + 1) + 1 else 0) + if b + 1 ∣ a + 1 + 1 then 1 else 0\n[PROOFSTEP]\nsimp [hb_eq_a, le_refl]\n[GOAL]\ncase neg\na✝ b✝ m n k a b : ℕ\nhb_eq_a : ¬b = a + 1\n⊢ (if 0 < b + 1 ∧ b + 1 ≤ a + 1 + 1 then (a + 1 + 1 - (b + 1)) / (b + 1) + 1 else 0) =\n    (if 0 < b + 1 ∧ b + 1 ≤ a + 1 then (a + 1 - (b + 1)) / (b + 1) + 1 else 0) + if b + 1 ∣ a + 1 + 1 then 1 else 0\n[PROOFSTEP]\nby_cases hb_le_a1 : b ≤ a + 1\n[GOAL]\ncase pos\na✝ b✝ m n k a b : ℕ\nhb_eq_a : ¬b = a + 1\nhb_le_a1 : b ≤ a + 1\n⊢ (if 0 < b + 1 ∧ b + 1 ≤ a + 1 + 1 then (a + 1 + 1 - (b + 1)) / (b + 1) + 1 else 0) =\n    (if 0 < b + 1 ∧ b + 1 ≤ a + 1 then (a + 1 - (b + 1)) / (b + 1) + 1 else 0) + if b + 1 ∣ a + 1 + 1 then 1 else 0\n[PROOFSTEP]\nhave hb_le_a : b ≤ a := le_of_lt_succ (lt_of_le_of_ne hb_le_a1 hb_eq_a)\n[GOAL]\ncase pos\na✝ b✝ m n k a b : ℕ\nhb_eq_a : ¬b = a + 1\nhb_le_a1 : b ≤ a + 1\nhb_le_a : b ≤ a\n⊢ (if 0 < b + 1 ∧ b + 1 ≤ a + 1 + 1 then (a + 1 + 1 - (b + 1)) / (b + 1) + 1 else 0) =\n    (if 0 < b + 1 ∧ b + 1 ≤ a + 1 then (a + 1 - (b + 1)) / (b + 1) + 1 else 0) + if b + 1 ∣ a + 1 + 1 then 1 else 0\n[PROOFSTEP]\nhave h₁ : 0 < b + 1 ∧ b + 1 ≤ a + 1 + 1 := ⟨succ_pos _, (add_le_add_iff_right _).2 hb_le_a1⟩\n[GOAL]\ncase pos\na✝ b✝ m n k a b : ℕ\nhb_eq_a : ¬b = a + 1\nhb_le_a1 : b ≤ a + 1\nhb_le_a : b ≤ a\nh₁ : 0 < b + 1 ∧ b + 1 ≤ a + 1 + 1\n⊢ (if 0 < b + 1 ∧ b + 1 ≤ a + 1 + 1 then (a + 1 + 1 - (b + 1)) / (b + 1) + 1 else 0) =\n    (if 0 < b + 1 ∧ b + 1 ≤ a + 1 then (a + 1 - (b + 1)) / (b + 1) + 1 else 0) + if b + 1 ∣ a + 1 + 1 then 1 else 0\n[PROOFSTEP]\nhave h₂ : 0 < b + 1 ∧ b + 1 ≤ a + 1 := ⟨succ_pos _, (add_le_add_iff_right _).2 hb_le_a⟩\n[GOAL]\ncase pos\na✝ b✝ m n k a b : ℕ\nhb_eq_a : ¬b = a + 1\nhb_le_a1 : b ≤ a + 1\nhb_le_a : b ≤ a\nh₁ : 0 < b + 1 ∧ b + 1 ≤ a + 1 + 1\nh₂ : 0 < b + 1 ∧ b + 1 ≤ a + 1\n⊢ (if 0 < b + 1 ∧ b + 1 ≤ a + 1 + 1 then (a + 1 + 1 - (b + 1)) / (b + 1) + 1 else 0) =\n    (if 0 < b + 1 ∧ b + 1 ≤ a + 1 then (a + 1 - (b + 1)) / (b + 1) + 1 else 0) + if b + 1 ∣ a + 1 + 1 then 1 else 0\n[PROOFSTEP]\nhave dvd_iff : b + 1 ∣ a - b + 1 ↔ b + 1 ∣ a + 1 + 1 := by\n  rw [Nat.dvd_add_iff_left (dvd_refl (b + 1)), ← add_tsub_add_eq_tsub_right a 1 b, add_comm (_ - _), add_assoc,\n    tsub_add_cancel_of_le (succ_le_succ hb_le_a), add_comm 1]\n[GOAL]\na✝ b✝ m n k a b : ℕ\nhb_eq_a : ¬b = a + 1\nhb_le_a1 : b ≤ a + 1\nhb_le_a : b ≤ a\nh₁ : 0 < b + 1 ∧ b + 1 ≤ a + 1 + 1\nh₂ : 0 < b + 1 ∧ b + 1 ≤ a + 1\n⊢ b + 1 ∣ a - b + 1 ↔ b + 1 ∣ a + 1 + 1\n[PROOFSTEP]\nrw [Nat.dvd_add_iff_left (dvd_refl (b + 1)), ← add_tsub_add_eq_tsub_right a 1 b, add_comm (_ - _), add_assoc,\n  tsub_add_cancel_of_le (succ_le_succ hb_le_a), add_comm 1]\n[GOAL]\ncase pos\na✝ b✝ m n k a b : ℕ\nhb_eq_a : ¬b = a + 1\nhb_le_a1 : b ≤ a + 1\nhb_le_a : b ≤ a\nh₁ : 0 < b + 1 ∧ b + 1 ≤ a + 1 + 1\nh₂ : 0 < b + 1 ∧ b + 1 ≤ a + 1\ndvd_iff : b + 1 ∣ a - b + 1 ↔ b + 1 ∣ a + 1 + 1\n⊢ (if 0 < b + 1 ∧ b + 1 ≤ a + 1 + 1 then (a + 1 + 1 - (b + 1)) / (b + 1) + 1 else 0) =\n    (if 0 < b + 1 ∧ b + 1 ≤ a + 1 then (a + 1 - (b + 1)) / (b + 1) + 1 else 0) + if b + 1 ∣ a + 1 + 1 then 1 else 0\n[PROOFSTEP]\nhave wf : a - b < a + 1 := lt_succ_of_le tsub_le_self\n[GOAL]\ncase pos\na✝ b✝ m n k a b : ℕ\nhb_eq_a : ¬b = a + 1\nhb_le_a1 : b ≤ a + 1\nhb_le_a : b ≤ a\nh₁ : 0 < b + 1 ∧ b + 1 ≤ a + 1 + 1\nh₂ : 0 < b + 1 ∧ b + 1 ≤ a + 1\ndvd_iff : b + 1 ∣ a - b + 1 ↔ b + 1 ∣ a + 1 + 1\nwf : a - b < a + 1\n⊢ (if 0 < b + 1 ∧ b + 1 ≤ a + 1 + 1 then (a + 1 + 1 - (b + 1)) / (b + 1) + 1 else 0) =\n    (if 0 < b + 1 ∧ b + 1 ≤ a + 1 then (a + 1 - (b + 1)) / (b + 1) + 1 else 0) + if b + 1 ∣ a + 1 + 1 then 1 else 0\n[PROOFSTEP]\nrw [if_pos h₁, if_pos h₂, @add_tsub_add_eq_tsub_right, ← tsub_add_eq_add_tsub hb_le_a,\n  have := wf\n  succ_div (a - b),\n  @add_tsub_add_eq_tsub_right]\n[GOAL]\ncase pos\na✝ b✝ m n k a b : ℕ\nhb_eq_a : ¬b = a + 1\nhb_le_a1 : b ≤ a + 1\nhb_le_a : b ≤ a\nh₁ : 0 < b + 1 ∧ b + 1 ≤ a + 1 + 1\nh₂ : 0 < b + 1 ∧ b + 1 ≤ a + 1\ndvd_iff : b + 1 ∣ a - b + 1 ↔ b + 1 ∣ a + 1 + 1\nwf : a - b < a + 1\n⊢ ((a - b) / (b + 1) + if b + 1 ∣ a - b + 1 then 1 else 0) + 1 =\n    (a - b) / (b + 1) + 1 + if b + 1 ∣ a + 1 + 1 then 1 else 0\n[PROOFSTEP]\nsimp [dvd_iff, succ_eq_add_one, add_comm 1, add_assoc]\n[GOAL]\ncase neg\na✝ b✝ m n k a b : ℕ\nhb_eq_a : ¬b = a + 1\nhb_le_a1 : ¬b ≤ a + 1\n⊢ (if 0 < b + 1 ∧ b + 1 ≤ a + 1 + 1 then (a + 1 + 1 - (b + 1)) / (b + 1) + 1 else 0) =\n    (if 0 < b + 1 ∧ b + 1 ≤ a + 1 then (a + 1 - (b + 1)) / (b + 1) + 1 else 0) + if b + 1 ∣ a + 1 + 1 then 1 else 0\n[PROOFSTEP]\nhave hba : ¬b ≤ a := not_le_of_gt (lt_trans (lt_succ_self a) (lt_of_not_ge hb_le_a1))\n[GOAL]\ncase neg\na✝ b✝ m n k a b : ℕ\nhb_eq_a : ¬b = a + 1\nhb_le_a1 : ¬b ≤ a + 1\nhba : ¬b ≤ a\n⊢ (if 0 < b + 1 ∧ b + 1 ≤ a + 1 + 1 then (a + 1 + 1 - (b + 1)) / (b + 1) + 1 else 0) =\n    (if 0 < b + 1 ∧ b + 1 ≤ a + 1 then (a + 1 - (b + 1)) / (b + 1) + 1 else 0) + if b + 1 ∣ a + 1 + 1 then 1 else 0\n[PROOFSTEP]\nhave hb_dvd_a : ¬b + 1 ∣ a + 2 := fun h => hb_le_a1 (le_of_succ_le_succ (le_of_dvd (succ_pos _) h))\n[GOAL]\ncase neg\na✝ b✝ m n k a b : ℕ\nhb_eq_a : ¬b = a + 1\nhb_le_a1 : ¬b ≤ a + 1\nhba : ¬b ≤ a\nhb_dvd_a : ¬b + 1 ∣ a + 2\n⊢ (if 0 < b + 1 ∧ b + 1 ≤ a + 1 + 1 then (a + 1 + 1 - (b + 1)) / (b + 1) + 1 else 0) =\n    (if 0 < b + 1 ∧ b + 1 ≤ a + 1 then (a + 1 - (b + 1)) / (b + 1) + 1 else 0) + if b + 1 ∣ a + 1 + 1 then 1 else 0\n[PROOFSTEP]\nsimp [hba, hb_le_a1, hb_dvd_a]\n[GOAL]\na✝ b✝ m n k a b : ℕ\nhba : b ∣ a + 1\n⊢ (a + 1) / b = a / b + 1\n[PROOFSTEP]\nrw [succ_div, if_pos hba]\n[GOAL]\na✝ b✝ m n k a b : ℕ\nhba : ¬b ∣ a + 1\n⊢ (a + 1) / b = a / b\n[PROOFSTEP]\nrw [succ_div, if_neg hba, add_zero]\n[GOAL]\na✝ b✝ m n k a b c : ℕ\nh : a * b ∣ c\nha : a = 0\n⊢ b ∣ c / a\n[PROOFSTEP]\nsimp [ha]\n[GOAL]\na✝ b✝ m n k a b c : ℕ\nh : a * b ∣ c\nha✝ : ¬a = 0\nha : 0 < a\nh1 : ∃ d, c = a * b * d\nd : ℕ\nhd : c = a * b * d\n⊢ c = a * (b * d)\n[PROOFSTEP]\nsimpa [mul_assoc] using hd\n[GOAL]\na✝ b✝ m n k a b c x✝¹ x✝ : ℕ\ndvd : x✝¹ ∣ 0\ndvd2 : 0 ∣ x✝\n⊢ x✝ / (0 / x✝¹) / x✝¹ = x✝ / 0\n[PROOFSTEP]\nsimp\n[GOAL]\na✝¹ b✝ m n k a✝ b c a x✝ : ℕ\ndvd : 0 ∣ a + 1\ndvd2 : a + 1 ∣ x✝\n⊢ x✝ / ((a + 1) / 0) / 0 = x✝ / (a + 1)\n[PROOFSTEP]\nsimp at dvd \n[GOAL]\na✝¹ b✝ m n k a✝ b c✝ a c x✝ : ℕ\ndvd : c + 1 ∣ a + 1\ndvd2 : a + 1 ∣ x✝\n⊢ x✝ / ((a + 1) / (c + 1)) / (c + 1) = x✝ / (a + 1)\n[PROOFSTEP]\nhave a_split : a + 1 ≠ 0 := succ_ne_zero a\n[GOAL]\na✝¹ b✝ m n k a✝ b c✝ a c x✝ : ℕ\ndvd : c + 1 ∣ a + 1\ndvd2 : a + 1 ∣ x✝\na_split : a + 1 ≠ 0\n⊢ x✝ / ((a + 1) / (c + 1)) / (c + 1) = x✝ / (a + 1)\n[PROOFSTEP]\nhave c_split : c + 1 ≠ 0 := succ_ne_zero c\n[GOAL]\na✝¹ b✝ m n k a✝ b c✝ a c x✝ : ℕ\ndvd : c + 1 ∣ a + 1\ndvd2 : a + 1 ∣ x✝\na_split : a + 1 ≠ 0\nc_split : c + 1 ≠ 0\n⊢ x✝ / ((a + 1) / (c + 1)) / (c + 1) = x✝ / (a + 1)\n[PROOFSTEP]\nrcases dvd2 with ⟨k, rfl⟩\n[GOAL]\ncase intro\na✝¹ b✝ m n k✝ a✝ b c✝ a c : ℕ\ndvd : c + 1 ∣ a + 1\na_split : a + 1 ≠ 0\nc_split : c + 1 ≠ 0\nk : ℕ\n⊢ (a + 1) * k / ((a + 1) / (c + 1)) / (c + 1) = (a + 1) * k / (a + 1)\n[PROOFSTEP]\nrcases dvd with ⟨k2, pr⟩\n[GOAL]\ncase intro.intro\na✝¹ b✝ m n k✝ a✝ b c✝ a c : ℕ\na_split : a + 1 ≠ 0\nc_split : c + 1 ≠ 0\nk k2 : ℕ\npr : a + 1 = (c + 1) * k2\n⊢ (a + 1) * k / ((a + 1) / (c + 1)) / (c + 1) = (a + 1) * k / (a + 1)\n[PROOFSTEP]\nhave k2_nonzero : k2 ≠ 0 := fun k2_zero => by simp [k2_zero] at pr \n[GOAL]\na✝¹ b✝ m n k✝ a✝ b c✝ a c : ℕ\na_split : a + 1 ≠ 0\nc_split : c + 1 ≠ 0\nk k2 : ℕ\npr : a + 1 = (c + 1) * k2\nk2_zero : k2 = 0\n⊢ False\n[PROOFSTEP]\nsimp [k2_zero] at pr \n[GOAL]\ncase intro.intro\na✝¹ b✝ m n k✝ a✝ b c✝ a c : ℕ\na_split : a + 1 ≠ 0\nc_split : c + 1 ≠ 0\nk k2 : ℕ\npr : a + 1 = (c + 1) * k2\nk2_nonzero : k2 ≠ 0\n⊢ (a + 1) * k / ((a + 1) / (c + 1)) / (c + 1) = (a + 1) * k / (a + 1)\n[PROOFSTEP]\nrw [Nat.mul_div_cancel_left k (Nat.pos_of_ne_zero a_split), pr, Nat.mul_div_cancel_left k2 (Nat.pos_of_ne_zero c_split),\n  Nat.mul_comm ((c + 1) * k2) k, ← Nat.mul_assoc k (c + 1) k2, Nat.mul_div_cancel _ (Nat.pos_of_ne_zero k2_nonzero),\n  Nat.mul_div_cancel _ (Nat.pos_of_ne_zero c_split)]\n[GOAL]\na b m n k : ℕ\nh : a < b + n\n⊢ n ∣ a → n ∣ b → a ≤ b\n[PROOFSTEP]\nrintro ⟨a, rfl⟩\n  ⟨b, rfl⟩\n      -- porting note: Needed to give an explicit argument to `mul_add_one`\n[GOAL]\ncase intro.intro\nm n k a b : ℕ\nh : n * a < n * b + n\n⊢ n * a ≤ n * b\n[PROOFSTEP]\nrw [← mul_add_one n] at h \n[GOAL]\ncase intro.intro\nm n k a b : ℕ\nh : n * a < n * (b + 1)\n⊢ n * a ≤ n * b\n[PROOFSTEP]\nexact mul_le_mul_left' (lt_succ_iff.1 <| lt_of_mul_lt_mul_left h bot_le) _\n[GOAL]\na b m✝ n✝ k m n : ℕ\n⊢ m % n / n = 0\n[PROOFSTEP]\ncases n\n[GOAL]\ncase zero\na b m✝ n k m : ℕ\n⊢ m % zero / zero = 0\n[PROOFSTEP]\nexact (m % 0).div_zero\n[GOAL]\ncase succ\na b m✝ n k m n✝ : ℕ\n⊢ m % succ n✝ / succ n✝ = 0\n[PROOFSTEP]\ncase succ n => exact Nat.div_eq_zero (m.mod_lt n.succ_pos)\n[GOAL]\na b m✝ n✝ k m n : ℕ\n⊢ m % succ n / succ n = 0\n[PROOFSTEP]\ncase succ n => exact Nat.div_eq_zero (m.mod_lt n.succ_pos)\n[GOAL]\na b m✝ n✝ k m n : ℕ\n⊢ m % succ n / succ n = 0\n[PROOFSTEP]\nexact Nat.div_eq_zero (m.mod_lt n.succ_pos)\n[GOAL]\na✝ b m n✝ k n a : ℕ\nha : 0 < a\n⊢ (∃ k, a * k < n ∧ n < a * (k + 1)) ↔ ¬a ∣ n\n[PROOFSTEP]\nrefine'\n  ⟨fun ⟨k, hk1, hk2⟩ => not_dvd_of_between_consec_multiples hk1 hk2, fun han =>\n    ⟨n / a, ⟨lt_of_le_of_ne (mul_div_le n a) _, lt_mul_div_succ _ ha⟩⟩⟩\n[GOAL]\na✝ b m n✝ k n a : ℕ\nha : 0 < a\nhan : ¬a ∣ n\n⊢ a * (n / a) ≠ n\n[PROOFSTEP]\nexact mt (Dvd.intro (n / a)) han\n[GOAL]\na b m✝ n✝¹ k m n✝ : ℕ\nh : m = n✝\nn : ℕ\n⊢ m ∣ n ↔ n✝ ∣ n\n[PROOFSTEP]\nrw [h]\n[GOAL]\na b m✝ n✝¹ k m n✝ : ℕ\nh : m = n✝\nn : ℕ\n⊢ n ∣ m ↔ n ∣ n✝\n[PROOFSTEP]\nrw [h]\n[GOAL]\na✝ b✝ m n k a b d : ℕ\nhdb : d ∣ b\nh : a < b\n⊢ a / d < b / d\n[PROOFSTEP]\nrw [Nat.lt_div_iff_mul_lt hdb]\n[GOAL]\na✝ b✝ m n k a b d : ℕ\nhdb : d ∣ b\nh : a < b\n⊢ d * (a / d) < b\n[PROOFSTEP]\nexact lt_of_le_of_lt (mul_div_le a d) h\n", "meta": {"mathlib_filename": "Mathlib.Data.Nat.Order.Lemmas", "llama_tokens": 9055, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8006920020959544, "lm_q2_score": 0.6334102636778401, "lm_q1q2_score": 0.5071665321723362}}
{"text": "[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\n⊢ vectorSpan k ∅ = ⊥\n[PROOFSTEP]\nrw [vectorSpan_def, vsub_empty, Submodule.span_empty]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np : P\n⊢ vectorSpan k {p} = ⊥\n[PROOFSTEP]\nsimp [vectorSpan_def]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : Set P\n⊢ Set.Nonempty (spanPoints k s) ↔ Set.Nonempty s\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : Set P\n⊢ Set.Nonempty (spanPoints k s) → Set.Nonempty s\n[PROOFSTEP]\ncontrapose\n[GOAL]\ncase mp\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : Set P\n⊢ ¬Set.Nonempty s → ¬Set.Nonempty (spanPoints k s)\n[PROOFSTEP]\nrw [Set.not_nonempty_iff_eq_empty, Set.not_nonempty_iff_eq_empty]\n[GOAL]\ncase mp\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : Set P\n⊢ s = ∅ → spanPoints k s = ∅\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : Set P\nh : s = ∅\n⊢ spanPoints k s = ∅\n[PROOFSTEP]\nsimp [h, spanPoints]\n[GOAL]\ncase mpr\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : Set P\n⊢ Set.Nonempty s → Set.Nonempty (spanPoints k s)\n[PROOFSTEP]\nexact fun h => h.mono (subset_spanPoints _ _)\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : Set P\np : P\nv : V\nhp : p ∈ spanPoints k s\nhv : v ∈ vectorSpan k s\n⊢ v +ᵥ p ∈ spanPoints k s\n[PROOFSTEP]\nrcases hp with ⟨p2, ⟨hp2, ⟨v2, ⟨hv2, hv2p⟩⟩⟩⟩\n[GOAL]\ncase intro.intro.intro.intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : Set P\np : P\nv : V\nhv : v ∈ vectorSpan k s\np2 : P\nhp2 : p2 ∈ s\nv2 : V\nhv2 : v2 ∈ vectorSpan k s\nhv2p : p = v2 +ᵥ p2\n⊢ v +ᵥ p ∈ spanPoints k s\n[PROOFSTEP]\nrw [hv2p, vadd_vadd]\n[GOAL]\ncase intro.intro.intro.intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : Set P\np : P\nv : V\nhv : v ∈ vectorSpan k s\np2 : P\nhp2 : p2 ∈ s\nv2 : V\nhv2 : v2 ∈ vectorSpan k s\nhv2p : p = v2 +ᵥ p2\n⊢ v + v2 +ᵥ p2 ∈ spanPoints k s\n[PROOFSTEP]\nexact ⟨p2, hp2, v + v2, (vectorSpan k s).add_mem hv hv2, rfl⟩\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : Set P\np1 p2 : P\nhp1 : p1 ∈ spanPoints k s\nhp2 : p2 ∈ spanPoints k s\n⊢ p1 -ᵥ p2 ∈ vectorSpan k s\n[PROOFSTEP]\nrcases hp1 with ⟨p1a, ⟨hp1a, ⟨v1, ⟨hv1, hv1p⟩⟩⟩⟩\n[GOAL]\ncase intro.intro.intro.intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : Set P\np1 p2 : P\nhp2 : p2 ∈ spanPoints k s\np1a : P\nhp1a : p1a ∈ s\nv1 : V\nhv1 : v1 ∈ vectorSpan k s\nhv1p : p1 = v1 +ᵥ p1a\n⊢ p1 -ᵥ p2 ∈ vectorSpan k s\n[PROOFSTEP]\nrcases hp2 with ⟨p2a, ⟨hp2a, ⟨v2, ⟨hv2, hv2p⟩⟩⟩⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : Set P\np1 p2 p1a : P\nhp1a : p1a ∈ s\nv1 : V\nhv1 : v1 ∈ vectorSpan k s\nhv1p : p1 = v1 +ᵥ p1a\np2a : P\nhp2a : p2a ∈ s\nv2 : V\nhv2 : v2 ∈ vectorSpan k s\nhv2p : p2 = v2 +ᵥ p2a\n⊢ p1 -ᵥ p2 ∈ vectorSpan k s\n[PROOFSTEP]\nrw [hv1p, hv2p, vsub_vadd_eq_vsub_sub (v1 +ᵥ p1a), vadd_vsub_assoc, add_comm, add_sub_assoc]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : Set P\np1 p2 p1a : P\nhp1a : p1a ∈ s\nv1 : V\nhv1 : v1 ∈ vectorSpan k s\nhv1p : p1 = v1 +ᵥ p1a\np2a : P\nhp2a : p2a ∈ s\nv2 : V\nhv2 : v2 ∈ vectorSpan k s\nhv2p : p2 = v2 +ᵥ p2a\n⊢ p1a -ᵥ p2a + (v1 - v2) ∈ vectorSpan k s\n[PROOFSTEP]\nhave hv1v2 : v1 - v2 ∈ vectorSpan k s := by\n  rw [sub_eq_add_neg]\n  apply (vectorSpan k s).add_mem hv1\n  rw [← neg_one_smul k v2]\n  exact (vectorSpan k s).smul_mem (-1 : k) hv2\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : Set P\np1 p2 p1a : P\nhp1a : p1a ∈ s\nv1 : V\nhv1 : v1 ∈ vectorSpan k s\nhv1p : p1 = v1 +ᵥ p1a\np2a : P\nhp2a : p2a ∈ s\nv2 : V\nhv2 : v2 ∈ vectorSpan k s\nhv2p : p2 = v2 +ᵥ p2a\n⊢ v1 - v2 ∈ vectorSpan k s\n[PROOFSTEP]\nrw [sub_eq_add_neg]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : Set P\np1 p2 p1a : P\nhp1a : p1a ∈ s\nv1 : V\nhv1 : v1 ∈ vectorSpan k s\nhv1p : p1 = v1 +ᵥ p1a\np2a : P\nhp2a : p2a ∈ s\nv2 : V\nhv2 : v2 ∈ vectorSpan k s\nhv2p : p2 = v2 +ᵥ p2a\n⊢ v1 + -v2 ∈ vectorSpan k s\n[PROOFSTEP]\napply (vectorSpan k s).add_mem hv1\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : Set P\np1 p2 p1a : P\nhp1a : p1a ∈ s\nv1 : V\nhv1 : v1 ∈ vectorSpan k s\nhv1p : p1 = v1 +ᵥ p1a\np2a : P\nhp2a : p2a ∈ s\nv2 : V\nhv2 : v2 ∈ vectorSpan k s\nhv2p : p2 = v2 +ᵥ p2a\n⊢ -v2 ∈ vectorSpan k s\n[PROOFSTEP]\nrw [← neg_one_smul k v2]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : Set P\np1 p2 p1a : P\nhp1a : p1a ∈ s\nv1 : V\nhv1 : v1 ∈ vectorSpan k s\nhv1p : p1 = v1 +ᵥ p1a\np2a : P\nhp2a : p2a ∈ s\nv2 : V\nhv2 : v2 ∈ vectorSpan k s\nhv2p : p2 = v2 +ᵥ p2a\n⊢ -1 • v2 ∈ vectorSpan k s\n[PROOFSTEP]\nexact (vectorSpan k s).smul_mem (-1 : k) hv2\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : Set P\np1 p2 p1a : P\nhp1a : p1a ∈ s\nv1 : V\nhv1 : v1 ∈ vectorSpan k s\nhv1p : p1 = v1 +ᵥ p1a\np2a : P\nhp2a : p2a ∈ s\nv2 : V\nhv2 : v2 ∈ vectorSpan k s\nhv2p : p2 = v2 +ᵥ p2a\nhv1v2 : v1 - v2 ∈ vectorSpan k s\n⊢ p1a -ᵥ p2a + (v1 - v2) ∈ vectorSpan k s\n[PROOFSTEP]\nrefine' (vectorSpan k s).add_mem _ hv1v2\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : Set P\np1 p2 p1a : P\nhp1a : p1a ∈ s\nv1 : V\nhv1 : v1 ∈ vectorSpan k s\nhv1p : p1 = v1 +ᵥ p1a\np2a : P\nhp2a : p2a ∈ s\nv2 : V\nhv2 : v2 ∈ vectorSpan k s\nhv2p : p2 = v2 +ᵥ p2a\nhv1v2 : v1 - v2 ∈ vectorSpan k s\n⊢ p1a -ᵥ p2a ∈ vectorSpan k s\n[PROOFSTEP]\nexact vsub_mem_vectorSpan k hp1a hp2a\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np q : AffineSubspace k P\nx✝ : p.carrier = q.carrier\n⊢ p = q\n[PROOFSTEP]\ncases p\n[GOAL]\ncase mk\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\nq : AffineSubspace k P\ncarrier✝ : Set P\nsmul_vsub_vadd_mem✝ :\n  ∀ (c : k) {p1 p2 p3 : P}, p1 ∈ carrier✝ → p2 ∈ carrier✝ → p3 ∈ carrier✝ → c • (p1 -ᵥ p2) +ᵥ p3 ∈ carrier✝\nx✝ : { carrier := carrier✝, smul_vsub_vadd_mem := smul_vsub_vadd_mem✝ }.carrier = q.carrier\n⊢ { carrier := carrier✝, smul_vsub_vadd_mem := smul_vsub_vadd_mem✝ } = q\n[PROOFSTEP]\ncases q\n[GOAL]\ncase mk.mk\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ncarrier✝¹ : Set P\nsmul_vsub_vadd_mem✝¹ :\n  ∀ (c : k) {p1 p2 p3 : P}, p1 ∈ carrier✝¹ → p2 ∈ carrier✝¹ → p3 ∈ carrier✝¹ → c • (p1 -ᵥ p2) +ᵥ p3 ∈ carrier✝¹\ncarrier✝ : Set P\nsmul_vsub_vadd_mem✝ :\n  ∀ (c : k) {p1 p2 p3 : P}, p1 ∈ carrier✝ → p2 ∈ carrier✝ → p3 ∈ carrier✝ → c • (p1 -ᵥ p2) +ᵥ p3 ∈ carrier✝\nx✝ :\n  { carrier := carrier✝¹, smul_vsub_vadd_mem := smul_vsub_vadd_mem✝¹ }.carrier =\n    { carrier := carrier✝, smul_vsub_vadd_mem := smul_vsub_vadd_mem✝ }.carrier\n⊢ { carrier := carrier✝¹, smul_vsub_vadd_mem := smul_vsub_vadd_mem✝¹ } =\n    { carrier := carrier✝, smul_vsub_vadd_mem := smul_vsub_vadd_mem✝ }\n[PROOFSTEP]\ncongr\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\nh : Set.Nonempty ↑s\n⊢ ∀ {a b : V}, a ∈ ↑s -ᵥ ↑s → b ∈ ↑s -ᵥ ↑s → a + b ∈ ↑s -ᵥ ↑s\n[PROOFSTEP]\nintro a b ha hb\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\nh : Set.Nonempty ↑s\na b : V\nha : a ∈ ↑s -ᵥ ↑s\nhb : b ∈ ↑s -ᵥ ↑s\n⊢ a + b ∈ ↑s -ᵥ ↑s\n[PROOFSTEP]\nrcases ha with ⟨p1, p2, hp1, hp2, rfl⟩\n[GOAL]\ncase intro.intro.intro.intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\nh : Set.Nonempty ↑s\nb : V\nhb : b ∈ ↑s -ᵥ ↑s\np1 p2 : P\nhp1 : p1 ∈ ↑s\nhp2 : p2 ∈ ↑s\n⊢ (fun x x_1 => x -ᵥ x_1) p1 p2 + b ∈ ↑s -ᵥ ↑s\n[PROOFSTEP]\nrcases hb with ⟨p3, p4, hp3, hp4, rfl⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\nh : Set.Nonempty ↑s\np1 p2 : P\nhp1 : p1 ∈ ↑s\nhp2 : p2 ∈ ↑s\np3 p4 : P\nhp3 : p3 ∈ ↑s\nhp4 : p4 ∈ ↑s\n⊢ (fun x x_1 => x -ᵥ x_1) p1 p2 + (fun x x_1 => x -ᵥ x_1) p3 p4 ∈ ↑s -ᵥ ↑s\n[PROOFSTEP]\nrw [← vadd_vsub_assoc]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\nh : Set.Nonempty ↑s\np1 p2 : P\nhp1 : p1 ∈ ↑s\nhp2 : p2 ∈ ↑s\np3 p4 : P\nhp3 : p3 ∈ ↑s\nhp4 : p4 ∈ ↑s\n⊢ (fun x x_1 => x -ᵥ x_1) p1 p2 +ᵥ p3 -ᵥ p4 ∈ ↑s -ᵥ ↑s\n[PROOFSTEP]\nrefine' vsub_mem_vsub _ hp4\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\nh : Set.Nonempty ↑s\np1 p2 : P\nhp1 : p1 ∈ ↑s\nhp2 : p2 ∈ ↑s\np3 p4 : P\nhp3 : p3 ∈ ↑s\nhp4 : p4 ∈ ↑s\n⊢ (fun x x_1 => x -ᵥ x_1) p1 p2 +ᵥ p3 ∈ ↑s\n[PROOFSTEP]\nconvert s.smul_vsub_vadd_mem 1 hp1 hp2 hp3\n[GOAL]\ncase h.e'_4.h.e'_5\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\nh : Set.Nonempty ↑s\np1 p2 : P\nhp1 : p1 ∈ ↑s\nhp2 : p2 ∈ ↑s\np3 p4 : P\nhp3 : p3 ∈ ↑s\nhp4 : p4 ∈ ↑s\n⊢ (fun x x_1 => x -ᵥ x_1) p1 p2 = 1 • (p1 -ᵥ p2)\n[PROOFSTEP]\nrw [one_smul]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\nh : Set.Nonempty ↑s\n⊢ 0 ∈ { carrier := ↑s -ᵥ ↑s, add_mem' := (_ : ∀ {a b : V}, a ∈ ↑s -ᵥ ↑s → b ∈ ↑s -ᵥ ↑s → a + b ∈ ↑s -ᵥ ↑s) }.carrier\n[PROOFSTEP]\ncases' h with p hp\n[GOAL]\ncase intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\np : P\nhp : p ∈ ↑s\n⊢ 0 ∈ { carrier := ↑s -ᵥ ↑s, add_mem' := (_ : ∀ {a b : V}, a ∈ ↑s -ᵥ ↑s → b ∈ ↑s -ᵥ ↑s → a + b ∈ ↑s -ᵥ ↑s) }.carrier\n[PROOFSTEP]\nexact vsub_self p ▸ vsub_mem_vsub hp hp\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\nh : Set.Nonempty ↑s\n⊢ ∀ (c : k) {x : V},\n    x ∈\n        {\n              toAddSubsemigroup :=\n                { carrier := ↑s -ᵥ ↑s, add_mem' := (_ : ∀ {a b : V}, a ∈ ↑s -ᵥ ↑s → b ∈ ↑s -ᵥ ↑s → a + b ∈ ↑s -ᵥ ↑s) },\n              zero_mem' :=\n                (_ :\n                  0 ∈\n                    { carrier := ↑s -ᵥ ↑s,\n                        add_mem' :=\n                          (_ :\n                            ∀ {a b : V},\n                              a ∈ ↑s -ᵥ ↑s → b ∈ ↑s -ᵥ ↑s → a + b ∈ ↑s -ᵥ ↑s) }.carrier) }.toAddSubsemigroup.carrier →\n      c • x ∈\n        {\n              toAddSubsemigroup :=\n                { carrier := ↑s -ᵥ ↑s, add_mem' := (_ : ∀ {a b : V}, a ∈ ↑s -ᵥ ↑s → b ∈ ↑s -ᵥ ↑s → a + b ∈ ↑s -ᵥ ↑s) },\n              zero_mem' :=\n                (_ :\n                  0 ∈\n                    { carrier := ↑s -ᵥ ↑s,\n                        add_mem' :=\n                          (_ :\n                            ∀ {a b : V},\n                              a ∈ ↑s -ᵥ ↑s → b ∈ ↑s -ᵥ ↑s → a + b ∈ ↑s -ᵥ ↑s) }.carrier) }.toAddSubsemigroup.carrier\n[PROOFSTEP]\nintro c v hv\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\nh : Set.Nonempty ↑s\nc : k\nv : V\nhv :\n  v ∈\n    {\n          toAddSubsemigroup :=\n            { carrier := ↑s -ᵥ ↑s, add_mem' := (_ : ∀ {a b : V}, a ∈ ↑s -ᵥ ↑s → b ∈ ↑s -ᵥ ↑s → a + b ∈ ↑s -ᵥ ↑s) },\n          zero_mem' :=\n            (_ :\n              0 ∈\n                { carrier := ↑s -ᵥ ↑s,\n                    add_mem' :=\n                      (_ :\n                        ∀ {a b : V},\n                          a ∈ ↑s -ᵥ ↑s → b ∈ ↑s -ᵥ ↑s → a + b ∈ ↑s -ᵥ ↑s) }.carrier) }.toAddSubsemigroup.carrier\n⊢ c • v ∈\n    {\n          toAddSubsemigroup :=\n            { carrier := ↑s -ᵥ ↑s, add_mem' := (_ : ∀ {a b : V}, a ∈ ↑s -ᵥ ↑s → b ∈ ↑s -ᵥ ↑s → a + b ∈ ↑s -ᵥ ↑s) },\n          zero_mem' :=\n            (_ :\n              0 ∈\n                { carrier := ↑s -ᵥ ↑s,\n                    add_mem' :=\n                      (_ :\n                        ∀ {a b : V},\n                          a ∈ ↑s -ᵥ ↑s → b ∈ ↑s -ᵥ ↑s → a + b ∈ ↑s -ᵥ ↑s) }.carrier) }.toAddSubsemigroup.carrier\n[PROOFSTEP]\nrcases hv with ⟨p1, p2, hp1, hp2, rfl⟩\n[GOAL]\ncase intro.intro.intro.intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\nh : Set.Nonempty ↑s\nc : k\np1 p2 : P\nhp1 : p1 ∈ ↑s\nhp2 : p2 ∈ ↑s\n⊢ c • (fun x x_1 => x -ᵥ x_1) p1 p2 ∈\n    {\n          toAddSubsemigroup :=\n            { carrier := ↑s -ᵥ ↑s, add_mem' := (_ : ∀ {a b : V}, a ∈ ↑s -ᵥ ↑s → b ∈ ↑s -ᵥ ↑s → a + b ∈ ↑s -ᵥ ↑s) },\n          zero_mem' :=\n            (_ :\n              0 ∈\n                { carrier := ↑s -ᵥ ↑s,\n                    add_mem' :=\n                      (_ :\n                        ∀ {a b : V},\n                          a ∈ ↑s -ᵥ ↑s → b ∈ ↑s -ᵥ ↑s → a + b ∈ ↑s -ᵥ ↑s) }.carrier) }.toAddSubsemigroup.carrier\n[PROOFSTEP]\nrw [← vadd_vsub (c • (p1 -ᵥ p2)) p2]\n[GOAL]\ncase intro.intro.intro.intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\nh : Set.Nonempty ↑s\nc : k\np1 p2 : P\nhp1 : p1 ∈ ↑s\nhp2 : p2 ∈ ↑s\n⊢ c • (p1 -ᵥ p2) +ᵥ p2 -ᵥ p2 ∈\n    {\n          toAddSubsemigroup :=\n            { carrier := ↑s -ᵥ ↑s, add_mem' := (_ : ∀ {a b : V}, a ∈ ↑s -ᵥ ↑s → b ∈ ↑s -ᵥ ↑s → a + b ∈ ↑s -ᵥ ↑s) },\n          zero_mem' :=\n            (_ :\n              0 ∈\n                { carrier := ↑s -ᵥ ↑s,\n                    add_mem' :=\n                      (_ :\n                        ∀ {a b : V},\n                          a ∈ ↑s -ᵥ ↑s → b ∈ ↑s -ᵥ ↑s → a + b ∈ ↑s -ᵥ ↑s) }.carrier) }.toAddSubsemigroup.carrier\n[PROOFSTEP]\nrefine' vsub_mem_vsub _ hp2\n[GOAL]\ncase intro.intro.intro.intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\nh : Set.Nonempty ↑s\nc : k\np1 p2 : P\nhp1 : p1 ∈ ↑s\nhp2 : p2 ∈ ↑s\n⊢ c • (p1 -ᵥ p2) +ᵥ p2 ∈ ↑s\n[PROOFSTEP]\nexact s.smul_vsub_vadd_mem c hp1 hp2 hp2\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\nh : Set.Nonempty ↑s\n⊢ directionOfNonempty h = direction s\n[PROOFSTEP]\nrefine le_antisymm ?_ (Submodule.span_le.2 Set.Subset.rfl)\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\nh : Set.Nonempty ↑s\n⊢ directionOfNonempty h ≤ direction s\n[PROOFSTEP]\nrw [← SetLike.coe_subset_coe, directionOfNonempty, direction, Submodule.coe_set_mk, AddSubmonoid.coe_set_mk]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\nh : Set.Nonempty ↑s\n⊢ ↑{ carrier := ↑s -ᵥ ↑s, add_mem' := (_ : ∀ {a b : V}, a ∈ ↑s -ᵥ ↑s → b ∈ ↑s -ᵥ ↑s → a + b ∈ ↑s -ᵥ ↑s) } ⊆\n    ↑(vectorSpan k ↑s)\n[PROOFSTEP]\nexact (vsub_set_subset_vectorSpan k _)\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\nh : Set.Nonempty ↑s\nv : V\n⊢ v ∈ direction s ↔ ∃ p1, p1 ∈ s ∧ ∃ p2, p2 ∈ s ∧ v = p1 -ᵥ p2\n[PROOFSTEP]\nrw [← SetLike.mem_coe, coe_direction_eq_vsub_set h]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\nh : Set.Nonempty ↑s\nv : V\n⊢ v ∈ ↑s -ᵥ ↑s ↔ ∃ p1, p1 ∈ s ∧ ∃ p2, p2 ∈ s ∧ v = p1 -ᵥ p2\n[PROOFSTEP]\nexact\n  ⟨fun ⟨p1, p2, hp1, hp2, hv⟩ => ⟨p1, hp1, p2, hp2, hv.symm⟩, fun ⟨p1, hp1, p2, hp2, hv⟩ => ⟨p1, p2, hp1, hp2, hv.symm⟩⟩\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\nv : V\nhv : v ∈ direction s\np : P\nhp : p ∈ s\n⊢ v +ᵥ p ∈ s\n[PROOFSTEP]\nrw [mem_direction_iff_eq_vsub ⟨p, hp⟩] at hv \n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\nv : V\nhv : ∃ p1, p1 ∈ s ∧ ∃ p2, p2 ∈ s ∧ v = p1 -ᵥ p2\np : P\nhp : p ∈ s\n⊢ v +ᵥ p ∈ s\n[PROOFSTEP]\nrcases hv with ⟨p1, hp1, p2, hp2, hv⟩\n[GOAL]\ncase intro.intro.intro.intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\nv : V\np : P\nhp : p ∈ s\np1 : P\nhp1 : p1 ∈ s\np2 : P\nhp2 : p2 ∈ s\nhv : v = p1 -ᵥ p2\n⊢ v +ᵥ p ∈ s\n[PROOFSTEP]\nrw [hv]\n[GOAL]\ncase intro.intro.intro.intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\nv : V\np : P\nhp : p ∈ s\np1 : P\nhp1 : p1 ∈ s\np2 : P\nhp2 : p2 ∈ s\nhv : v = p1 -ᵥ p2\n⊢ p1 -ᵥ p2 +ᵥ p ∈ s\n[PROOFSTEP]\nconvert s.smul_vsub_vadd_mem 1 hp1 hp2 hp\n[GOAL]\ncase a\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\nv : V\np : P\nhp : p ∈ s\np1 : P\nhp1 : p1 ∈ s\np2 : P\nhp2 : p2 ∈ s\nhv : v = p1 -ᵥ p2\n⊢ p1 -ᵥ p2 +ᵥ p ∈ s ↔ 1 • (p1 -ᵥ p2) +ᵥ p ∈ s.carrier\n[PROOFSTEP]\nrw [one_smul]\n[GOAL]\ncase a\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\nv : V\np : P\nhp : p ∈ s\np1 : P\nhp1 : p1 ∈ s\np2 : P\nhp2 : p2 ∈ s\nhv : v = p1 -ᵥ p2\n⊢ p1 -ᵥ p2 +ᵥ p ∈ s ↔ p1 -ᵥ p2 +ᵥ p ∈ s.carrier\n[PROOFSTEP]\nexact s.mem_coe k P _\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\nv : V\np : P\nhp : p ∈ s\nh : v +ᵥ p ∈ s\n⊢ v ∈ direction s\n[PROOFSTEP]\nsimpa using vsub_mem_direction h hp\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\nv : V\nhv : v ∈ direction s\np : P\n⊢ v +ᵥ p ∈ s ↔ p ∈ s\n[PROOFSTEP]\nrefine' ⟨fun h => _, fun h => vadd_mem_of_mem_direction hv h⟩\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\nv : V\nhv : v ∈ direction s\np : P\nh : v +ᵥ p ∈ s\n⊢ p ∈ s\n[PROOFSTEP]\nconvert vadd_mem_of_mem_direction (Submodule.neg_mem _ hv) h\n[GOAL]\ncase h.e'_4\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\nv : V\nhv : v ∈ direction s\np : P\nh : v +ᵥ p ∈ s\n⊢ p = -v +ᵥ (v +ᵥ p)\n[PROOFSTEP]\nsimp\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\np : P\nhp : p ∈ s\n⊢ ↑(direction s) = (fun x => x -ᵥ p) '' ↑s\n[PROOFSTEP]\nrw [coe_direction_eq_vsub_set ⟨p, hp⟩]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\np : P\nhp : p ∈ s\n⊢ ↑s -ᵥ ↑s = (fun x => x -ᵥ p) '' ↑s\n[PROOFSTEP]\nrefine' le_antisymm _ _\n[GOAL]\ncase refine'_1\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\np : P\nhp : p ∈ s\n⊢ ↑s -ᵥ ↑s ≤ (fun x => x -ᵥ p) '' ↑s\n[PROOFSTEP]\nrintro v ⟨p1, p2, hp1, hp2, rfl⟩\n[GOAL]\ncase refine'_1.intro.intro.intro.intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\np : P\nhp : p ∈ s\np1 p2 : P\nhp1 : p1 ∈ ↑s\nhp2 : p2 ∈ ↑s\n⊢ (fun x x_1 => x -ᵥ x_1) p1 p2 ∈ (fun x => x -ᵥ p) '' ↑s\n[PROOFSTEP]\nexact ⟨p1 -ᵥ p2 +ᵥ p, vadd_mem_of_mem_direction (vsub_mem_direction hp1 hp2) hp, vadd_vsub _ _⟩\n[GOAL]\ncase refine'_2\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\np : P\nhp : p ∈ s\n⊢ (fun x => x -ᵥ p) '' ↑s ≤ ↑s -ᵥ ↑s\n[PROOFSTEP]\nrintro v ⟨p2, hp2, rfl⟩\n[GOAL]\ncase refine'_2.intro.intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\np : P\nhp : p ∈ s\np2 : P\nhp2 : p2 ∈ ↑s\n⊢ (fun x => x -ᵥ p) p2 ∈ ↑s -ᵥ ↑s\n[PROOFSTEP]\nexact ⟨p2, p, hp2, hp, rfl⟩\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\np : P\nhp : p ∈ s\n⊢ ↑(direction s) = (fun x x_1 => x -ᵥ x_1) p '' ↑s\n[PROOFSTEP]\next v\n[GOAL]\ncase h\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\np : P\nhp : p ∈ s\nv : V\n⊢ v ∈ ↑(direction s) ↔ v ∈ (fun x x_1 => x -ᵥ x_1) p '' ↑s\n[PROOFSTEP]\nrw [SetLike.mem_coe, ← Submodule.neg_mem_iff, ← SetLike.mem_coe, coe_direction_eq_vsub_set_right hp,\n  Set.mem_image_iff_bex, Set.mem_image_iff_bex]\n[GOAL]\ncase h\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\np : P\nhp : p ∈ s\nv : V\n⊢ (∃ x x_1, x -ᵥ p = -v) ↔ ∃ x x_1, (fun x x_2 => x -ᵥ x_2) p x = v\n[PROOFSTEP]\nconv_lhs =>\n  congr\n  ext\n  rw [← neg_vsub_eq_vsub_rev, neg_inj]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\np : P\nhp : p ∈ s\nv : V\n| ∃ x x_1, x -ᵥ p = -v\n[PROOFSTEP]\n  congr\n  ext\n  rw [← neg_vsub_eq_vsub_rev, neg_inj]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\np : P\nhp : p ∈ s\nv : V\n| ∃ x x_1, x -ᵥ p = -v\n[PROOFSTEP]\n  congr\n  ext\n  rw [← neg_vsub_eq_vsub_rev, neg_inj]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\np : P\nhp : p ∈ s\nv : V\n| ∃ x x_1, x -ᵥ p = -v\n[PROOFSTEP]\ncongr\n[GOAL]\ncase p\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\np : P\nhp : p ∈ s\nv : V\n| fun x => ∃ x_1, x -ᵥ p = -v\n[PROOFSTEP]\next\n[GOAL]\ncase p.h\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\np : P\nhp : p ∈ s\nv : V\nx✝ : P\n| ∃ x, x✝ -ᵥ p = -v\n[PROOFSTEP]\nrw [← neg_vsub_eq_vsub_rev, neg_inj]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\np : P\nhp : p ∈ s\nv : V\n⊢ v ∈ direction s ↔ ∃ p2, p2 ∈ s ∧ v = p2 -ᵥ p\n[PROOFSTEP]\nrw [← SetLike.mem_coe, coe_direction_eq_vsub_set_right hp]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\np : P\nhp : p ∈ s\nv : V\n⊢ v ∈ (fun x => x -ᵥ p) '' ↑s ↔ ∃ p2, p2 ∈ s ∧ v = p2 -ᵥ p\n[PROOFSTEP]\nexact ⟨fun ⟨p2, hp2, hv⟩ => ⟨p2, hp2, hv.symm⟩, fun ⟨p2, hp2, hv⟩ => ⟨p2, hp2, hv.symm⟩⟩\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\np : P\nhp : p ∈ s\nv : V\n⊢ v ∈ direction s ↔ ∃ p2, p2 ∈ s ∧ v = p -ᵥ p2\n[PROOFSTEP]\nrw [← SetLike.mem_coe, coe_direction_eq_vsub_set_left hp]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\np : P\nhp : p ∈ s\nv : V\n⊢ v ∈ (fun x x_1 => x -ᵥ x_1) p '' ↑s ↔ ∃ p2, p2 ∈ s ∧ v = p -ᵥ p2\n[PROOFSTEP]\nexact ⟨fun ⟨p2, hp2, hv⟩ => ⟨p2, hp2, hv.symm⟩, fun ⟨p2, hp2, hv⟩ => ⟨p2, hp2, hv.symm⟩⟩\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\np : P\nhp : p ∈ s\np2 : P\n⊢ p2 -ᵥ p ∈ direction s ↔ p2 ∈ s\n[PROOFSTEP]\nrw [mem_direction_iff_eq_vsub_right hp]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\np : P\nhp : p ∈ s\np2 : P\n⊢ (∃ p2_1, p2_1 ∈ s ∧ p2 -ᵥ p = p2_1 -ᵥ p) ↔ p2 ∈ s\n[PROOFSTEP]\nsimp\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\np : P\nhp : p ∈ s\np2 : P\n⊢ p -ᵥ p2 ∈ direction s ↔ p2 ∈ s\n[PROOFSTEP]\nrw [mem_direction_iff_eq_vsub_left hp]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\np : P\nhp : p ∈ s\np2 : P\n⊢ (∃ p2_1, p2_1 ∈ s ∧ p -ᵥ p2 = p -ᵥ p2_1) ↔ p2 ∈ s\n[PROOFSTEP]\nsimp\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns1 s2 : AffineSubspace k P\nhd : direction s1 = direction s2\nhn : Set.Nonempty (↑s1 ∩ ↑s2)\n⊢ s1 = s2\n[PROOFSTEP]\next p\n[GOAL]\ncase h\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns1 s2 : AffineSubspace k P\nhd : direction s1 = direction s2\nhn : Set.Nonempty (↑s1 ∩ ↑s2)\np : P\n⊢ p ∈ s1 ↔ p ∈ s2\n[PROOFSTEP]\nhave hq1 := Set.mem_of_mem_inter_left hn.some_mem\n[GOAL]\ncase h\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns1 s2 : AffineSubspace k P\nhd : direction s1 = direction s2\nhn : Set.Nonempty (↑s1 ∩ ↑s2)\np : P\nhq1 : Set.Nonempty.some hn ∈ ↑s1\n⊢ p ∈ s1 ↔ p ∈ s2\n[PROOFSTEP]\nhave hq2 := Set.mem_of_mem_inter_right hn.some_mem\n[GOAL]\ncase h\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns1 s2 : AffineSubspace k P\nhd : direction s1 = direction s2\nhn : Set.Nonempty (↑s1 ∩ ↑s2)\np : P\nhq1 : Set.Nonempty.some hn ∈ ↑s1\nhq2 : Set.Nonempty.some hn ∈ ↑s2\n⊢ p ∈ s1 ↔ p ∈ s2\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns1 s2 : AffineSubspace k P\nhd : direction s1 = direction s2\nhn : Set.Nonempty (↑s1 ∩ ↑s2)\np : P\nhq1 : Set.Nonempty.some hn ∈ ↑s1\nhq2 : Set.Nonempty.some hn ∈ ↑s2\n⊢ p ∈ s1 → p ∈ s2\n[PROOFSTEP]\nintro hp\n[GOAL]\ncase h.mp\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns1 s2 : AffineSubspace k P\nhd : direction s1 = direction s2\nhn : Set.Nonempty (↑s1 ∩ ↑s2)\np : P\nhq1 : Set.Nonempty.some hn ∈ ↑s1\nhq2 : Set.Nonempty.some hn ∈ ↑s2\nhp : p ∈ s1\n⊢ p ∈ s2\n[PROOFSTEP]\nrw [← vsub_vadd p hn.some]\n[GOAL]\ncase h.mp\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns1 s2 : AffineSubspace k P\nhd : direction s1 = direction s2\nhn : Set.Nonempty (↑s1 ∩ ↑s2)\np : P\nhq1 : Set.Nonempty.some hn ∈ ↑s1\nhq2 : Set.Nonempty.some hn ∈ ↑s2\nhp : p ∈ s1\n⊢ p -ᵥ Set.Nonempty.some hn +ᵥ Set.Nonempty.some hn ∈ s2\n[PROOFSTEP]\nrefine' vadd_mem_of_mem_direction _ hq2\n[GOAL]\ncase h.mp\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns1 s2 : AffineSubspace k P\nhd : direction s1 = direction s2\nhn : Set.Nonempty (↑s1 ∩ ↑s2)\np : P\nhq1 : Set.Nonempty.some hn ∈ ↑s1\nhq2 : Set.Nonempty.some hn ∈ ↑s2\nhp : p ∈ s1\n⊢ p -ᵥ Set.Nonempty.some hn ∈ direction s2\n[PROOFSTEP]\nrw [← hd]\n[GOAL]\ncase h.mp\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns1 s2 : AffineSubspace k P\nhd : direction s1 = direction s2\nhn : Set.Nonempty (↑s1 ∩ ↑s2)\np : P\nhq1 : Set.Nonempty.some hn ∈ ↑s1\nhq2 : Set.Nonempty.some hn ∈ ↑s2\nhp : p ∈ s1\n⊢ p -ᵥ Set.Nonempty.some hn ∈ direction s1\n[PROOFSTEP]\nexact vsub_mem_direction hp hq1\n[GOAL]\ncase h.mpr\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns1 s2 : AffineSubspace k P\nhd : direction s1 = direction s2\nhn : Set.Nonempty (↑s1 ∩ ↑s2)\np : P\nhq1 : Set.Nonempty.some hn ∈ ↑s1\nhq2 : Set.Nonempty.some hn ∈ ↑s2\n⊢ p ∈ s2 → p ∈ s1\n[PROOFSTEP]\nintro hp\n[GOAL]\ncase h.mpr\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns1 s2 : AffineSubspace k P\nhd : direction s1 = direction s2\nhn : Set.Nonempty (↑s1 ∩ ↑s2)\np : P\nhq1 : Set.Nonempty.some hn ∈ ↑s1\nhq2 : Set.Nonempty.some hn ∈ ↑s2\nhp : p ∈ s2\n⊢ p ∈ s1\n[PROOFSTEP]\nrw [← vsub_vadd p hn.some]\n[GOAL]\ncase h.mpr\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns1 s2 : AffineSubspace k P\nhd : direction s1 = direction s2\nhn : Set.Nonempty (↑s1 ∩ ↑s2)\np : P\nhq1 : Set.Nonempty.some hn ∈ ↑s1\nhq2 : Set.Nonempty.some hn ∈ ↑s2\nhp : p ∈ s2\n⊢ p -ᵥ Set.Nonempty.some hn +ᵥ Set.Nonempty.some hn ∈ s1\n[PROOFSTEP]\nrefine' vadd_mem_of_mem_direction _ hq1\n[GOAL]\ncase h.mpr\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns1 s2 : AffineSubspace k P\nhd : direction s1 = direction s2\nhn : Set.Nonempty (↑s1 ∩ ↑s2)\np : P\nhq1 : Set.Nonempty.some hn ∈ ↑s1\nhq2 : Set.Nonempty.some hn ∈ ↑s2\nhp : p ∈ s2\n⊢ p -ᵥ Set.Nonempty.some hn ∈ direction s1\n[PROOFSTEP]\nrw [hd]\n[GOAL]\ncase h.mpr\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns1 s2 : AffineSubspace k P\nhd : direction s1 = direction s2\nhn : Set.Nonempty (↑s1 ∩ ↑s2)\np : P\nhq1 : Set.Nonempty.some hn ∈ ↑s1\nhq2 : Set.Nonempty.some hn ∈ ↑s2\nhp : p ∈ s2\n⊢ p -ᵥ Set.Nonempty.some hn ∈ direction s2\n[PROOFSTEP]\nexact vsub_mem_direction hp hq2\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝⁴ : Ring k\ninst✝³ : AddCommGroup V\ninst✝² : Module k V\ninst✝¹ : AffineSpace V P\ns : AffineSubspace k P\ninst✝ : Nonempty { x // x ∈ s }\na : { x // x ∈ s }\n⊢ 0 +ᵥ a = a\n[PROOFSTEP]\next\n[GOAL]\ncase a\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝⁴ : Ring k\ninst✝³ : AddCommGroup V\ninst✝² : Module k V\ninst✝¹ : AffineSpace V P\ns : AffineSubspace k P\ninst✝ : Nonempty { x // x ∈ s }\na : { x // x ∈ s }\n⊢ ↑(0 +ᵥ a) = ↑a\n[PROOFSTEP]\nexact zero_vadd _ _\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝⁴ : Ring k\ninst✝³ : AddCommGroup V\ninst✝² : Module k V\ninst✝¹ : AffineSpace V P\ns : AffineSubspace k P\ninst✝ : Nonempty { x // x ∈ s }\na b : { x // x ∈ direction s }\nc : { x // x ∈ s }\n⊢ a + b +ᵥ c = a +ᵥ (b +ᵥ c)\n[PROOFSTEP]\next\n[GOAL]\ncase a\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝⁴ : Ring k\ninst✝³ : AddCommGroup V\ninst✝² : Module k V\ninst✝¹ : AffineSpace V P\ns : AffineSubspace k P\ninst✝ : Nonempty { x // x ∈ s }\na b : { x // x ∈ direction s }\nc : { x // x ∈ s }\n⊢ ↑(a + b +ᵥ c) = ↑(a +ᵥ (b +ᵥ c))\n[PROOFSTEP]\napply add_vadd\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝⁴ : Ring k\ninst✝³ : AddCommGroup V\ninst✝² : Module k V\ninst✝¹ : AffineSpace V P\ns : AffineSubspace k P\ninst✝ : Nonempty { x // x ∈ s }\n⊢ Nonempty { x // x ∈ s }\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝⁴ : Ring k\ninst✝³ : AddCommGroup V\ninst✝² : Module k V\ninst✝¹ : AffineSpace V P\ns : AffineSubspace k P\ninst✝ : Nonempty { x // x ∈ s }\na b : { x // x ∈ s }\n⊢ a -ᵥ b +ᵥ b = a\n[PROOFSTEP]\next\n[GOAL]\ncase a\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝⁴ : Ring k\ninst✝³ : AddCommGroup V\ninst✝² : Module k V\ninst✝¹ : AffineSpace V P\ns : AffineSubspace k P\ninst✝ : Nonempty { x // x ∈ s }\na b : { x // x ∈ s }\n⊢ ↑(a -ᵥ b +ᵥ b) = ↑a\n[PROOFSTEP]\napply AddTorsor.vsub_vadd'\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝⁴ : Ring k\ninst✝³ : AddCommGroup V\ninst✝² : Module k V\ninst✝¹ : AffineSpace V P\ns : AffineSubspace k P\ninst✝ : Nonempty { x // x ∈ s }\na : { x // x ∈ direction s }\nb : { x // x ∈ s }\n⊢ a +ᵥ b -ᵥ b = a\n[PROOFSTEP]\next\n[GOAL]\ncase a\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝⁴ : Ring k\ninst✝³ : AddCommGroup V\ninst✝² : Module k V\ninst✝¹ : AffineSpace V P\ns : AffineSubspace k P\ninst✝ : Nonempty { x // x ∈ s }\na : { x // x ∈ direction s }\nb : { x // x ∈ s }\n⊢ ↑(a +ᵥ b -ᵥ b) = ↑a\n[PROOFSTEP]\napply AddTorsor.vadd_vsub'\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np : P\ndirection : Submodule k V\nc : k\np1 p2 p3 : P\nhp1 : p1 ∈ {q | ∃ v, v ∈ direction ∧ q = v +ᵥ p}\nhp2 : p2 ∈ {q | ∃ v, v ∈ direction ∧ q = v +ᵥ p}\nhp3 : p3 ∈ {q | ∃ v, v ∈ direction ∧ q = v +ᵥ p}\n⊢ c • (p1 -ᵥ p2) +ᵥ p3 ∈ {q | ∃ v, v ∈ direction ∧ q = v +ᵥ p}\n[PROOFSTEP]\nrcases hp1 with ⟨v1, hv1, hp1⟩\n[GOAL]\ncase intro.intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np : P\ndirection : Submodule k V\nc : k\np1 p2 p3 : P\nhp2 : p2 ∈ {q | ∃ v, v ∈ direction ∧ q = v +ᵥ p}\nhp3 : p3 ∈ {q | ∃ v, v ∈ direction ∧ q = v +ᵥ p}\nv1 : V\nhv1 : v1 ∈ direction\nhp1 : p1 = v1 +ᵥ p\n⊢ c • (p1 -ᵥ p2) +ᵥ p3 ∈ {q | ∃ v, v ∈ direction ∧ q = v +ᵥ p}\n[PROOFSTEP]\nrcases hp2 with ⟨v2, hv2, hp2⟩\n[GOAL]\ncase intro.intro.intro.intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np : P\ndirection : Submodule k V\nc : k\np1 p2 p3 : P\nhp3 : p3 ∈ {q | ∃ v, v ∈ direction ∧ q = v +ᵥ p}\nv1 : V\nhv1 : v1 ∈ direction\nhp1 : p1 = v1 +ᵥ p\nv2 : V\nhv2 : v2 ∈ direction\nhp2 : p2 = v2 +ᵥ p\n⊢ c • (p1 -ᵥ p2) +ᵥ p3 ∈ {q | ∃ v, v ∈ direction ∧ q = v +ᵥ p}\n[PROOFSTEP]\nrcases hp3 with ⟨v3, hv3, hp3⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np : P\ndirection : Submodule k V\nc : k\np1 p2 p3 : P\nv1 : V\nhv1 : v1 ∈ direction\nhp1 : p1 = v1 +ᵥ p\nv2 : V\nhv2 : v2 ∈ direction\nhp2 : p2 = v2 +ᵥ p\nv3 : V\nhv3 : v3 ∈ direction\nhp3 : p3 = v3 +ᵥ p\n⊢ c • (p1 -ᵥ p2) +ᵥ p3 ∈ {q | ∃ v, v ∈ direction ∧ q = v +ᵥ p}\n[PROOFSTEP]\nuse c • (v1 - v2) + v3, direction.add_mem (direction.smul_mem c (direction.sub_mem hv1 hv2)) hv3\n[GOAL]\ncase right\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np : P\ndirection : Submodule k V\nc : k\np1 p2 p3 : P\nv1 : V\nhv1 : v1 ∈ direction\nhp1 : p1 = v1 +ᵥ p\nv2 : V\nhv2 : v2 ∈ direction\nhp2 : p2 = v2 +ᵥ p\nv3 : V\nhv3 : v3 ∈ direction\nhp3 : p3 = v3 +ᵥ p\n⊢ c • (p1 -ᵥ p2) +ᵥ p3 = c • (v1 - v2) + v3 +ᵥ p\n[PROOFSTEP]\nsimp [hp1, hp2, hp3, vadd_vadd]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np : P\ndirection : Submodule k V\n⊢ AffineSubspace.direction (mk' p direction) = direction\n[PROOFSTEP]\next v\n[GOAL]\ncase h\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np : P\ndirection : Submodule k V\nv : V\n⊢ v ∈ AffineSubspace.direction (mk' p direction) ↔ v ∈ direction\n[PROOFSTEP]\nrw [mem_direction_iff_eq_vsub (mk'_nonempty _ _)]\n[GOAL]\ncase h\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np : P\ndirection : Submodule k V\nv : V\n⊢ (∃ p1, p1 ∈ mk' p direction ∧ ∃ p2, p2 ∈ mk' p direction ∧ v = p1 -ᵥ p2) ↔ v ∈ direction\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np : P\ndirection : Submodule k V\nv : V\n⊢ (∃ p1, p1 ∈ mk' p direction ∧ ∃ p2, p2 ∈ mk' p direction ∧ v = p1 -ᵥ p2) → v ∈ direction\n[PROOFSTEP]\nrintro ⟨p1, ⟨v1, hv1, hp1⟩, p2, ⟨v2, hv2, hp2⟩, hv⟩\n[GOAL]\ncase h.mp.intro.intro.intro.intro.intro.intro.intro.intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np : P\ndirection : Submodule k V\nv : V\np1 : P\nv1 : V\nhv1 : v1 ∈ direction\nhp1 : p1 = v1 +ᵥ p\np2 : P\nhv : v = p1 -ᵥ p2\nv2 : V\nhv2 : v2 ∈ direction\nhp2 : p2 = v2 +ᵥ p\n⊢ v ∈ direction\n[PROOFSTEP]\nrw [hv, hp1, hp2, vadd_vsub_vadd_cancel_right]\n[GOAL]\ncase h.mp.intro.intro.intro.intro.intro.intro.intro.intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np : P\ndirection : Submodule k V\nv : V\np1 : P\nv1 : V\nhv1 : v1 ∈ direction\nhp1 : p1 = v1 +ᵥ p\np2 : P\nhv : v = p1 -ᵥ p2\nv2 : V\nhv2 : v2 ∈ direction\nhp2 : p2 = v2 +ᵥ p\n⊢ v1 - v2 ∈ direction\n[PROOFSTEP]\nexact direction.sub_mem hv1 hv2\n[GOAL]\ncase h.mpr\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np : P\ndirection : Submodule k V\nv : V\n⊢ v ∈ direction → ∃ p1, p1 ∈ mk' p direction ∧ ∃ p2, p2 ∈ mk' p direction ∧ v = p1 -ᵥ p2\n[PROOFSTEP]\nexact fun hv => ⟨v +ᵥ p, vadd_mem_mk' _ hv, p, self_mem_mk' _ _, (vadd_vsub _ _).symm⟩\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np₁ p₂ : P\ndirection : Submodule k V\n⊢ p₂ ∈ mk' p₁ direction ↔ p₂ -ᵥ p₁ ∈ direction\n[PROOFSTEP]\nrefine' ⟨fun h => _, fun h => _⟩\n[GOAL]\ncase refine'_1\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np₁ p₂ : P\ndirection : Submodule k V\nh : p₂ ∈ mk' p₁ direction\n⊢ p₂ -ᵥ p₁ ∈ direction\n[PROOFSTEP]\nrw [← direction_mk' p₁ direction]\n[GOAL]\ncase refine'_1\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np₁ p₂ : P\ndirection : Submodule k V\nh : p₂ ∈ mk' p₁ direction\n⊢ p₂ -ᵥ p₁ ∈ AffineSubspace.direction (mk' p₁ direction)\n[PROOFSTEP]\nexact vsub_mem_direction h (self_mem_mk' _ _)\n[GOAL]\ncase refine'_2\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np₁ p₂ : P\ndirection : Submodule k V\nh : p₂ -ᵥ p₁ ∈ direction\n⊢ p₂ ∈ mk' p₁ direction\n[PROOFSTEP]\nrw [← vsub_vadd p₂ p₁]\n[GOAL]\ncase refine'_2\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np₁ p₂ : P\ndirection : Submodule k V\nh : p₂ -ᵥ p₁ ∈ direction\n⊢ p₂ -ᵥ p₁ +ᵥ p₁ ∈ mk' p₁ direction\n[PROOFSTEP]\nexact vadd_mem_mk' p₁ h\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : Set P\ns1 : AffineSubspace k P\nh : s ⊆ ↑s1\n⊢ spanPoints k s ⊆ ↑s1\n[PROOFSTEP]\nrintro p ⟨p1, hp1, v, hv, hp⟩\n[GOAL]\ncase intro.intro.intro.intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : Set P\ns1 : AffineSubspace k P\nh : s ⊆ ↑s1\np p1 : P\nhp1 : p1 ∈ s\nv : V\nhv : v ∈ vectorSpan k s\nhp : p = v +ᵥ p1\n⊢ p ∈ ↑s1\n[PROOFSTEP]\nrw [hp]\n[GOAL]\ncase intro.intro.intro.intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : Set P\ns1 : AffineSubspace k P\nh : s ⊆ ↑s1\np p1 : P\nhp1 : p1 ∈ s\nv : V\nhv : v ∈ vectorSpan k s\nhp : p = v +ᵥ p1\n⊢ v +ᵥ p1 ∈ ↑s1\n[PROOFSTEP]\nhave hp1s1 : p1 ∈ (s1 : Set P) := Set.mem_of_mem_of_subset hp1 h\n[GOAL]\ncase intro.intro.intro.intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : Set P\ns1 : AffineSubspace k P\nh : s ⊆ ↑s1\np p1 : P\nhp1 : p1 ∈ s\nv : V\nhv : v ∈ vectorSpan k s\nhp : p = v +ᵥ p1\nhp1s1 : p1 ∈ ↑s1\n⊢ v +ᵥ p1 ∈ ↑s1\n[PROOFSTEP]\nrefine' vadd_mem_of_mem_direction _ hp1s1\n[GOAL]\ncase intro.intro.intro.intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : Set P\ns1 : AffineSubspace k P\nh : s ⊆ ↑s1\np p1 : P\nhp1 : p1 ∈ s\nv : V\nhv : v ∈ vectorSpan k s\nhp : p = v +ᵥ p1\nhp1s1 : p1 ∈ ↑s1\n⊢ v ∈ direction s1\n[PROOFSTEP]\nhave hs : vectorSpan k s ≤ s1.direction := vectorSpan_mono k h\n[GOAL]\ncase intro.intro.intro.intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : Set P\ns1 : AffineSubspace k P\nh : s ⊆ ↑s1\np p1 : P\nhp1 : p1 ∈ s\nv : V\nhv : v ∈ vectorSpan k s\nhp : p = v +ᵥ p1\nhp1s1 : p1 ∈ ↑s1\nhs : vectorSpan k s ≤ direction s1\n⊢ v ∈ direction s1\n[PROOFSTEP]\nrw [SetLike.le_def] at hs \n[GOAL]\ncase intro.intro.intro.intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : Set P\ns1 : AffineSubspace k P\nh : s ⊆ ↑s1\np p1 : P\nhp1 : p1 ∈ s\nv : V\nhv : v ∈ vectorSpan k s\nhp : p = v +ᵥ p1\nhp1s1 : p1 ∈ ↑s1\nhs : ∀ ⦃x : V⦄, x ∈ vectorSpan k s → x ∈ direction s1\n⊢ v ∈ direction s1\n[PROOFSTEP]\nrw [← SetLike.mem_coe]\n[GOAL]\ncase intro.intro.intro.intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : Set P\ns1 : AffineSubspace k P\nh : s ⊆ ↑s1\np p1 : P\nhp1 : p1 ∈ s\nv : V\nhv : v ∈ vectorSpan k s\nhp : p = v +ᵥ p1\nhp1s1 : p1 ∈ ↑s1\nhs : ∀ ⦃x : V⦄, x ∈ vectorSpan k s → x ∈ direction s1\n⊢ v ∈ ↑(direction s1)\n[PROOFSTEP]\nexact Set.mem_of_mem_of_subset hv hs\n[GOAL]\nk : Type u_1\nV : Type u_2\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\ns : Submodule k V\n⊢ AffineSubspace.direction (toAffineSubspace s) = s\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nk : Type u_1\nV : Type u_2\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\ns : Submodule k V\nx : V\n⊢ x ∈ AffineSubspace.direction (toAffineSubspace s) ↔ x ∈ s\n[PROOFSTEP]\nsimp [← s.toAffineSubspace.vadd_mem_iff_mem_direction _ s.zero_mem]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\nQ : AffineSubspace k P\np₀ p₁ : P\nc : k\nh₀ : p₀ ∈ Q\nh₁ : p₁ ∈ Q\n⊢ ↑(lineMap p₀ p₁) c ∈ Q\n[PROOFSTEP]\nrw [AffineMap.lineMap_apply]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\nQ : AffineSubspace k P\np₀ p₁ : P\nc : k\nh₀ : p₀ ∈ Q\nh₁ : p₁ ∈ Q\n⊢ c • (p₁ -ᵥ p₀) +ᵥ p₀ ∈ Q\n[PROOFSTEP]\nexact Q.smul_vsub_vadd_mem c h₁ h₀ h₀\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : Set P\n⊢ AffineSubspace.direction (affineSpan k s) = vectorSpan k s\n[PROOFSTEP]\napply le_antisymm\n[GOAL]\ncase a\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : Set P\n⊢ AffineSubspace.direction (affineSpan k s) ≤ vectorSpan k s\n[PROOFSTEP]\nrefine' Submodule.span_le.2 _\n[GOAL]\ncase a\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : Set P\n⊢ ↑(affineSpan k s) -ᵥ ↑(affineSpan k s) ⊆ ↑(vectorSpan k s)\n[PROOFSTEP]\nrintro v ⟨p1, p3, ⟨p2, hp2, v1, hv1, hp1⟩, ⟨p4, hp4, v2, hv2, hp3⟩, rfl⟩\n[GOAL]\ncase a.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : Set P\np1 p3 p2 : P\nhp2 : p2 ∈ s\nv1 : V\nhv1 : v1 ∈ vectorSpan k s\nhp1 : p1 = v1 +ᵥ p2\np4 : P\nhp4 : p4 ∈ s\nv2 : V\nhv2 : v2 ∈ vectorSpan k s\nhp3 : p3 = v2 +ᵥ p4\n⊢ (fun x x_1 => x -ᵥ x_1) p1 p3 ∈ ↑(vectorSpan k s)\n[PROOFSTEP]\nsimp only [SetLike.mem_coe]\n[GOAL]\ncase a.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : Set P\np1 p3 p2 : P\nhp2 : p2 ∈ s\nv1 : V\nhv1 : v1 ∈ vectorSpan k s\nhp1 : p1 = v1 +ᵥ p2\np4 : P\nhp4 : p4 ∈ s\nv2 : V\nhv2 : v2 ∈ vectorSpan k s\nhp3 : p3 = v2 +ᵥ p4\n⊢ p1 -ᵥ p3 ∈ vectorSpan k s\n[PROOFSTEP]\nrw [hp1, hp3, vsub_vadd_eq_vsub_sub, vadd_vsub_assoc]\n[GOAL]\ncase a.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : Set P\np1 p3 p2 : P\nhp2 : p2 ∈ s\nv1 : V\nhv1 : v1 ∈ vectorSpan k s\nhp1 : p1 = v1 +ᵥ p2\np4 : P\nhp4 : p4 ∈ s\nv2 : V\nhv2 : v2 ∈ vectorSpan k s\nhp3 : p3 = v2 +ᵥ p4\n⊢ v1 + (p2 -ᵥ p4) - v2 ∈ vectorSpan k s\n[PROOFSTEP]\nexact (vectorSpan k s).sub_mem ((vectorSpan k s).add_mem hv1 (vsub_mem_vectorSpan k hp2 hp4)) hv2\n[GOAL]\ncase a\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : Set P\n⊢ vectorSpan k s ≤ AffineSubspace.direction (affineSpan k s)\n[PROOFSTEP]\nexact vectorSpan_mono k (subset_spanPoints k s)\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS : AffineSpace V P\nsrc✝ : PartialOrder (AffineSubspace k P) := PartialOrder.lift SetLike.coe (_ : Function.Injective SetLike.coe)\ns : Set (AffineSubspace k P)\nc : k\np1 p2 p3 : P\nhp1 : p1 ∈ ⋂ (s' : AffineSubspace k P) (_ : s' ∈ s), ↑s'\nhp2 : p2 ∈ ⋂ (s' : AffineSubspace k P) (_ : s' ∈ s), ↑s'\nhp3 : p3 ∈ ⋂ (s' : AffineSubspace k P) (_ : s' ∈ s), ↑s'\ns2 : AffineSubspace k P\nhs2 : s2 ∈ s\n⊢ c • (p1 -ᵥ p2) +ᵥ p3 ∈ ↑s2\n[PROOFSTEP]\nrw [Set.mem_iInter₂] at *\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS : AffineSpace V P\nsrc✝ : PartialOrder (AffineSubspace k P) := PartialOrder.lift SetLike.coe (_ : Function.Injective SetLike.coe)\ns : Set (AffineSubspace k P)\nc : k\np1 p2 p3 : P\nhp1 : ∀ (i : AffineSubspace k P), i ∈ s → p1 ∈ ↑i\nhp2 : ∀ (i : AffineSubspace k P), i ∈ s → p2 ∈ ↑i\nhp3 : ∀ (i : AffineSubspace k P), i ∈ s → p3 ∈ ↑i\ns2 : AffineSubspace k P\nhs2 : s2 ∈ s\n⊢ c • (p1 -ᵥ p2) +ᵥ p3 ∈ ↑s2\n[PROOFSTEP]\nexact s2.smul_vsub_vadd_mem c (hp1 s2 hs2) (hp2 s2 hs2) (hp3 s2 hs2)\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS✝ : AffineSpace V P\nsrc✝ : PartialOrder (AffineSubspace k P) := PartialOrder.lift SetLike.coe (_ : Function.Injective SetLike.coe)\nS : Set (AffineSubspace k P)\ns1 : AffineSubspace k P\nhs1 : ∀ (b : AffineSubspace k P), b ∈ S → s1 ≤ b\n⊢ s1 ≤ sInf S\n[PROOFSTEP]\nrefine' Set.subset_sInter (t := (s1 : Set P)) _\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS✝ : AffineSpace V P\nsrc✝ : PartialOrder (AffineSubspace k P) := PartialOrder.lift SetLike.coe (_ : Function.Injective SetLike.coe)\nS : Set (AffineSubspace k P)\ns1 : AffineSubspace k P\nhs1 : ∀ (b : AffineSubspace k P), b ∈ S → s1 ≤ b\n⊢ ∀ (t' : Set P), (t' ∈ range fun s' => ⋂ (_ : s' ∈ S), ↑s') → ↑s1 ⊆ t'\n[PROOFSTEP]\nrintro t ⟨s, _hs, rfl⟩\n[GOAL]\ncase intro.refl\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS✝ : AffineSpace V P\nsrc✝ : PartialOrder (AffineSubspace k P) := PartialOrder.lift SetLike.coe (_ : Function.Injective SetLike.coe)\nS : Set (AffineSubspace k P)\ns1 : AffineSubspace k P\nhs1 : ∀ (b : AffineSubspace k P), b ∈ S → s1 ≤ b\ns : AffineSubspace k P\n⊢ ↑s1 ⊆ (fun s' => ⋂ (_ : s' ∈ S), ↑s') s\n[PROOFSTEP]\nexact Set.subset_iInter (hs1 s)\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS : AffineSpace V P\ns1 s2 : AffineSubspace k P\n⊢ s1 < s2 ↔ s1 ≤ s2 ∧ ∃ p, p ∈ s2 ∧ ¬p ∈ s1\n[PROOFSTEP]\nrw [lt_iff_le_not_le, not_le_iff_exists]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS : AffineSpace V P\np₁ p₂ p : P\n⊢ ↑(affineSpan k {p}) = {p}\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS : AffineSpace V P\np₁ p₂ p x : P\n⊢ x ∈ ↑(affineSpan k {p}) ↔ x ∈ {p}\n[PROOFSTEP]\nrw [mem_coe, ← vsub_right_mem_direction_iff_mem (mem_affineSpan k (Set.mem_singleton p)) _, direction_affineSpan]\n[GOAL]\ncase h\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS : AffineSpace V P\np₁ p₂ p x : P\n⊢ x -ᵥ p ∈ vectorSpan k {p} ↔ x ∈ {p}\n[PROOFSTEP]\nsimp\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS : AffineSpace V P\np₁ p₂ : P\n⊢ p₁ ∈ affineSpan k {p₂} ↔ p₁ = p₂\n[PROOFSTEP]\nsimp [← mem_coe]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS : AffineSpace V P\np₁ p₂ : P\n⊢ direction ⊤ = ⊤\n[PROOFSTEP]\ncases' S.Nonempty with p\n[GOAL]\ncase intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS : AffineSpace V P\np₁ p₂ p : P\n⊢ direction ⊤ = ⊤\n[PROOFSTEP]\next v\n[GOAL]\ncase intro.h\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS : AffineSpace V P\np₁ p₂ p : P\nv : V\n⊢ v ∈ direction ⊤ ↔ v ∈ ⊤\n[PROOFSTEP]\nrefine' ⟨imp_intro Submodule.mem_top, fun _hv => _⟩\n[GOAL]\ncase intro.h\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS : AffineSpace V P\np₁ p₂ p : P\nv : V\n_hv : v ∈ ⊤\n⊢ v ∈ direction ⊤\n[PROOFSTEP]\nhave hpv : (v +ᵥ p -ᵥ p : V) ∈ (⊤ : AffineSubspace k P).direction := vsub_mem_direction (mem_top k V _) (mem_top k V _)\n[GOAL]\ncase intro.h\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS : AffineSpace V P\np₁ p₂ p : P\nv : V\n_hv : v ∈ ⊤\nhpv : v +ᵥ p -ᵥ p ∈ direction ⊤\n⊢ v ∈ direction ⊤\n[PROOFSTEP]\nrwa [vadd_vsub] at hpv \n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS : AffineSpace V P\np₁ p₂ : P\n⊢ ⊥ ≠ ⊤\n[PROOFSTEP]\nintro contra\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS : AffineSpace V P\np₁ p₂ : P\ncontra : ⊥ = ⊤\n⊢ False\n[PROOFSTEP]\nrw [← ext_iff, bot_coe, top_coe] at contra \n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS : AffineSpace V P\np₁ p₂ : P\ncontra : ∅ = univ\n⊢ False\n[PROOFSTEP]\nexact Set.empty_ne_univ contra\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS : AffineSpace V P\np₁ p₂ : P\ns : Set P\nh : affineSpan k s = ⊤\n⊢ Set.Nonempty s\n[PROOFSTEP]\nrw [Set.nonempty_iff_ne_empty]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS : AffineSpace V P\np₁ p₂ : P\ns : Set P\nh : affineSpan k s = ⊤\n⊢ s ≠ ∅\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS : AffineSpace V P\np₁ p₂ : P\nh : affineSpan k ∅ = ⊤\n⊢ False\n[PROOFSTEP]\nrw [AffineSubspace.span_empty] at h \n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS : AffineSpace V P\np₁ p₂ : P\nh : ⊥ = ⊤\n⊢ False\n[PROOFSTEP]\nexact bot_ne_top k V P h\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS : AffineSpace V P\np₁ p₂ : P\ns : Set P\nh : affineSpan k s = ⊤\n⊢ vectorSpan k s = ⊤\n[PROOFSTEP]\nrw [← direction_affineSpan, h, direction_top]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS : AffineSpace V P\np₁ p₂ : P\ns : Set P\nhs : Set.Nonempty s\n⊢ affineSpan k s = ⊤ ↔ vectorSpan k s = ⊤\n[PROOFSTEP]\nrefine' ⟨vectorSpan_eq_top_of_affineSpan_eq_top k V P, _⟩\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS : AffineSpace V P\np₁ p₂ : P\ns : Set P\nhs : Set.Nonempty s\n⊢ vectorSpan k s = ⊤ → affineSpan k s = ⊤\n[PROOFSTEP]\nintro h\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS : AffineSpace V P\np₁ p₂ : P\ns : Set P\nhs : Set.Nonempty s\nh : vectorSpan k s = ⊤\n⊢ affineSpan k s = ⊤\n[PROOFSTEP]\nsuffices Nonempty (affineSpan k s) by\n  obtain ⟨p, hp : p ∈ affineSpan k s⟩ := this\n  rw [eq_iff_direction_eq_of_mem hp (mem_top k V p), direction_affineSpan, h, direction_top]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS : AffineSpace V P\np₁ p₂ : P\ns : Set P\nhs : Set.Nonempty s\nh : vectorSpan k s = ⊤\nthis : Nonempty { x // x ∈ affineSpan k s }\n⊢ affineSpan k s = ⊤\n[PROOFSTEP]\nobtain ⟨p, hp : p ∈ affineSpan k s⟩ := this\n[GOAL]\ncase intro.mk\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS : AffineSpace V P\np₁ p₂ : P\ns : Set P\nhs : Set.Nonempty s\nh : vectorSpan k s = ⊤\np : P\nhp : p ∈ affineSpan k s\n⊢ affineSpan k s = ⊤\n[PROOFSTEP]\nrw [eq_iff_direction_eq_of_mem hp (mem_top k V p), direction_affineSpan, h, direction_top]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS : AffineSpace V P\np₁ p₂ : P\ns : Set P\nhs : Set.Nonempty s\nh : vectorSpan k s = ⊤\n⊢ Nonempty { x // x ∈ affineSpan k s }\n[PROOFSTEP]\nobtain ⟨x, hx⟩ := hs\n[GOAL]\ncase intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS : AffineSpace V P\np₁ p₂ : P\ns : Set P\nh : vectorSpan k s = ⊤\nx : P\nhx : x ∈ s\n⊢ Nonempty { x // x ∈ affineSpan k s }\n[PROOFSTEP]\nexact ⟨⟨x, mem_affineSpan k hx⟩⟩\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\nS : AffineSpace V P\np₁ p₂ : P\ns : Set P\ninst✝ : Nontrivial P\n⊢ affineSpan k s = ⊤ ↔ vectorSpan k s = ⊤\n[PROOFSTEP]\ncases' s.eq_empty_or_nonempty with hs hs\n[GOAL]\ncase inl\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\nS : AffineSpace V P\np₁ p₂ : P\ns : Set P\ninst✝ : Nontrivial P\nhs : s = ∅\n⊢ affineSpan k s = ⊤ ↔ vectorSpan k s = ⊤\n[PROOFSTEP]\nsimp [hs, subsingleton_iff_bot_eq_top, AddTorsor.subsingleton_iff V P, not_subsingleton]\n[GOAL]\ncase inr\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\nS : AffineSpace V P\np₁ p₂ : P\ns : Set P\ninst✝ : Nontrivial P\nhs : Set.Nonempty s\n⊢ affineSpan k s = ⊤ ↔ vectorSpan k s = ⊤\n[PROOFSTEP]\nrw [affineSpan_eq_top_iff_vectorSpan_eq_top_of_nonempty k V P hs]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\nS : AffineSpace V P\np₁ p₂ : P\nι : Type u_4\ninst✝ : Fintype ι\np : ι → P\nh : affineSpan k (range p) = ⊤\n⊢ 0 < Fintype.card ι\n[PROOFSTEP]\nobtain ⟨-, ⟨i, -⟩⟩ := nonempty_of_affineSpan_eq_top k V P h\n[GOAL]\ncase intro.intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\nS : AffineSpace V P\np₁ p₂ : P\nι : Type u_4\ninst✝ : Fintype ι\np : ι → P\nh : affineSpan k (range p) = ⊤\ni : ι\n⊢ 0 < Fintype.card ι\n[PROOFSTEP]\nexact Fintype.card_pos_iff.mpr ⟨i⟩\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS : AffineSpace V P\np₁ p₂ : P\n⊢ direction ⊥ = ⊥\n[PROOFSTEP]\nrw [direction_eq_vectorSpan, bot_coe, vectorSpan_def, vsub_empty, Submodule.span_empty]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS : AffineSpace V P\np₁ p₂ : P\nQ : AffineSubspace k P\n⊢ Set.Nonempty ↑Q ↔ Q ≠ ⊥\n[PROOFSTEP]\nrw [nonempty_iff_ne_empty]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS : AffineSpace V P\np₁ p₂ : P\nQ : AffineSubspace k P\n⊢ ↑Q ≠ ∅ ↔ Q ≠ ⊥\n[PROOFSTEP]\nexact not_congr Q.coe_eq_bot_iff\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS : AffineSpace V P\np₁ p₂ : P\nQ : AffineSubspace k P\n⊢ Q = ⊥ ∨ Set.Nonempty ↑Q\n[PROOFSTEP]\nrw [nonempty_iff_ne_bot]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS : AffineSpace V P\np₁ p₂ : P\nQ : AffineSubspace k P\n⊢ Q = ⊥ ∨ Q ≠ ⊥\n[PROOFSTEP]\napply eq_or_ne\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS : AffineSpace V P\np₁ p₂ : P\ns : Set P\nh₁ : Set.Subsingleton s\nh₂ : affineSpan k s = ⊤\n⊢ Subsingleton P\n[PROOFSTEP]\nobtain ⟨p, hp⟩ := AffineSubspace.nonempty_of_affineSpan_eq_top k V P h₂\n[GOAL]\ncase intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS : AffineSpace V P\np₁ p₂ : P\ns : Set P\nh₁ : Set.Subsingleton s\nh₂ : affineSpan k s = ⊤\np : P\nhp : p ∈ s\n⊢ Subsingleton P\n[PROOFSTEP]\nhave : s = { p } := Subset.antisymm (fun q hq => h₁ hq hp) (by simp [hp])\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS : AffineSpace V P\np₁ p₂ : P\ns : Set P\nh₁ : Set.Subsingleton s\nh₂ : affineSpan k s = ⊤\np : P\nhp : p ∈ s\n⊢ {p} ⊆ s\n[PROOFSTEP]\nsimp [hp]\n[GOAL]\ncase intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS : AffineSpace V P\np₁ p₂ : P\ns : Set P\nh₁ : Set.Subsingleton s\nh₂ : affineSpan k s = ⊤\np : P\nhp : p ∈ s\nthis : s = {p}\n⊢ Subsingleton P\n[PROOFSTEP]\nrw [this, ← AffineSubspace.ext_iff, AffineSubspace.coe_affineSpan_singleton, AffineSubspace.top_coe, eq_comm, ←\n  subsingleton_iff_singleton (mem_univ _)] at h₂ \n[GOAL]\ncase intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS : AffineSpace V P\np₁ p₂ : P\ns : Set P\nh₁ : Set.Subsingleton s\np : P\nh₂ : Set.Subsingleton univ\nhp : p ∈ s\nthis : s = {p}\n⊢ Subsingleton P\n[PROOFSTEP]\nexact subsingleton_of_univ_subsingleton h₂\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS : AffineSpace V P\np₁ p₂ : P\ns : Set P\nh₁ : Set.Subsingleton s\nh₂ : affineSpan k s = ⊤\n⊢ s = univ\n[PROOFSTEP]\nobtain ⟨p, hp⟩ := AffineSubspace.nonempty_of_affineSpan_eq_top k V P h₂\n[GOAL]\ncase intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS : AffineSpace V P\np₁ p₂ : P\ns : Set P\nh₁ : Set.Subsingleton s\nh₂ : affineSpan k s = ⊤\np : P\nhp : p ∈ s\n⊢ s = univ\n[PROOFSTEP]\nhave : s = { p } := Subset.antisymm (fun q hq => h₁ hq hp) (by simp [hp])\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS : AffineSpace V P\np₁ p₂ : P\ns : Set P\nh₁ : Set.Subsingleton s\nh₂ : affineSpan k s = ⊤\np : P\nhp : p ∈ s\n⊢ {p} ⊆ s\n[PROOFSTEP]\nsimp [hp]\n[GOAL]\ncase intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS : AffineSpace V P\np₁ p₂ : P\ns : Set P\nh₁ : Set.Subsingleton s\nh₂ : affineSpan k s = ⊤\np : P\nhp : p ∈ s\nthis : s = {p}\n⊢ s = univ\n[PROOFSTEP]\nrw [this, eq_comm, ← subsingleton_iff_singleton (mem_univ p), subsingleton_univ_iff]\n[GOAL]\ncase intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS : AffineSpace V P\np₁ p₂ : P\ns : Set P\nh₁ : Set.Subsingleton s\nh₂ : affineSpan k s = ⊤\np : P\nhp : p ∈ s\nthis : s = {p}\n⊢ Subsingleton P\n[PROOFSTEP]\nexact subsingleton_of_subsingleton_span_eq_top h₁ h₂\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS : AffineSpace V P\np₁ p₂ : P\ns : AffineSubspace k P\nh : Set.Nonempty ↑s\n⊢ direction s = ⊤ ↔ s = ⊤\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS : AffineSpace V P\np₁ p₂ : P\ns : AffineSubspace k P\nh : Set.Nonempty ↑s\n⊢ direction s = ⊤ → s = ⊤\n[PROOFSTEP]\nintro hd\n[GOAL]\ncase mp\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS : AffineSpace V P\np₁ p₂ : P\ns : AffineSubspace k P\nh : Set.Nonempty ↑s\nhd : direction s = ⊤\n⊢ s = ⊤\n[PROOFSTEP]\nrw [← direction_top k V P] at hd \n[GOAL]\ncase mp\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS : AffineSpace V P\np₁ p₂ : P\ns : AffineSubspace k P\nh : Set.Nonempty ↑s\nhd : direction s = direction ⊤\n⊢ s = ⊤\n[PROOFSTEP]\nrefine' ext_of_direction_eq hd _\n[GOAL]\ncase mp\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS : AffineSpace V P\np₁ p₂ : P\ns : AffineSubspace k P\nh : Set.Nonempty ↑s\nhd : direction s = direction ⊤\n⊢ Set.Nonempty (↑s ∩ ↑⊤)\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase mpr\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS : AffineSpace V P\np₁ p₂ : P\ns : AffineSubspace k P\nh : Set.Nonempty ↑s\n⊢ s = ⊤ → direction s = ⊤\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase mpr\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS : AffineSpace V P\np₁ p₂ : P\nh : Set.Nonempty ↑⊤\n⊢ direction ⊤ = ⊤\n[PROOFSTEP]\nsimp\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS : AffineSpace V P\np₁ p₂ : P\ns1 s2 : AffineSubspace k P\n⊢ direction (s1 ⊓ s2) ≤ direction s1 ⊓ direction s2\n[PROOFSTEP]\nsimp only [direction_eq_vectorSpan, vectorSpan_def]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS : AffineSpace V P\np₁ p₂ : P\ns1 s2 : AffineSubspace k P\n⊢ Submodule.span k (↑(s1 ⊓ s2) -ᵥ ↑(s1 ⊓ s2)) ≤ Submodule.span k (↑s1 -ᵥ ↑s1) ⊓ Submodule.span k (↑s2 -ᵥ ↑s2)\n[PROOFSTEP]\nexact\n  le_inf (sInf_le_sInf fun p hp => trans (vsub_self_mono (inter_subset_left _ _)) hp)\n    (sInf_le_sInf fun p hp => trans (vsub_self_mono (inter_subset_right _ _)) hp)\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS : AffineSpace V P\np₁ p₂ : P\ns₁ s₂ : AffineSubspace k P\np : P\nh₁ : p ∈ s₁\nh₂ : p ∈ s₂\n⊢ direction (s₁ ⊓ s₂) = direction s₁ ⊓ direction s₂\n[PROOFSTEP]\next v\n[GOAL]\ncase h\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS : AffineSpace V P\np₁ p₂ : P\ns₁ s₂ : AffineSubspace k P\np : P\nh₁ : p ∈ s₁\nh₂ : p ∈ s₂\nv : V\n⊢ v ∈ direction (s₁ ⊓ s₂) ↔ v ∈ direction s₁ ⊓ direction s₂\n[PROOFSTEP]\nrw [Submodule.mem_inf, ← vadd_mem_iff_mem_direction v h₁, ← vadd_mem_iff_mem_direction v h₂, ←\n  vadd_mem_iff_mem_direction v ((mem_inf_iff p s₁ s₂).2 ⟨h₁, h₂⟩), mem_inf_iff]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS : AffineSpace V P\np₁ p₂ : P\ns1 s2 : AffineSubspace k P\nh : s1 ≤ s2\n⊢ direction s1 ≤ direction s2\n[PROOFSTEP]\nsimp only [direction_eq_vectorSpan, vectorSpan_def]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS : AffineSpace V P\np₁ p₂ : P\ns1 s2 : AffineSubspace k P\nh : s1 ≤ s2\n⊢ Submodule.span k (↑s1 -ᵥ ↑s1) ≤ Submodule.span k (↑s2 -ᵥ ↑s2)\n[PROOFSTEP]\nexact vectorSpan_mono k h\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS : AffineSpace V P\np₁ p₂ : P\ns1 s2 : AffineSubspace k P\nh : s1 < s2\nhn : Set.Nonempty ↑s1\n⊢ direction s1 < direction s2\n[PROOFSTEP]\ncases' hn with p hp\n[GOAL]\ncase intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS : AffineSpace V P\np₁ p₂ : P\ns1 s2 : AffineSubspace k P\nh : s1 < s2\np : P\nhp : p ∈ ↑s1\n⊢ direction s1 < direction s2\n[PROOFSTEP]\nrw [lt_iff_le_and_exists] at h \n[GOAL]\ncase intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS : AffineSpace V P\np₁ p₂ : P\ns1 s2 : AffineSubspace k P\nh : s1 ≤ s2 ∧ ∃ p, p ∈ s2 ∧ ¬p ∈ s1\np : P\nhp : p ∈ ↑s1\n⊢ direction s1 < direction s2\n[PROOFSTEP]\nrcases h with ⟨hle, p2, hp2, hp2s1⟩\n[GOAL]\ncase intro.intro.intro.intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS : AffineSpace V P\np₁ p₂ : P\ns1 s2 : AffineSubspace k P\np : P\nhp : p ∈ ↑s1\nhle : s1 ≤ s2\np2 : P\nhp2 : p2 ∈ s2\nhp2s1 : ¬p2 ∈ s1\n⊢ direction s1 < direction s2\n[PROOFSTEP]\nrw [SetLike.lt_iff_le_and_exists]\n[GOAL]\ncase intro.intro.intro.intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS : AffineSpace V P\np₁ p₂ : P\ns1 s2 : AffineSubspace k P\np : P\nhp : p ∈ ↑s1\nhle : s1 ≤ s2\np2 : P\nhp2 : p2 ∈ s2\nhp2s1 : ¬p2 ∈ s1\n⊢ direction s1 ≤ direction s2 ∧ ∃ x, x ∈ direction s2 ∧ ¬x ∈ direction s1\n[PROOFSTEP]\nuse direction_le hle, p2 -ᵥ p, vsub_mem_direction hp2 (hle hp)\n[GOAL]\ncase right\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS : AffineSpace V P\np₁ p₂ : P\ns1 s2 : AffineSubspace k P\np : P\nhp : p ∈ ↑s1\nhle : s1 ≤ s2\np2 : P\nhp2 : p2 ∈ s2\nhp2s1 : ¬p2 ∈ s1\n⊢ ¬p2 -ᵥ p ∈ direction s1\n[PROOFSTEP]\nintro hm\n[GOAL]\ncase right\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS : AffineSpace V P\np₁ p₂ : P\ns1 s2 : AffineSubspace k P\np : P\nhp : p ∈ ↑s1\nhle : s1 ≤ s2\np2 : P\nhp2 : p2 ∈ s2\nhp2s1 : ¬p2 ∈ s1\nhm : p2 -ᵥ p ∈ direction s1\n⊢ False\n[PROOFSTEP]\nrw [vsub_right_mem_direction_iff_mem hp p2] at hm \n[GOAL]\ncase right\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS : AffineSpace V P\np₁ p₂ : P\ns1 s2 : AffineSubspace k P\np : P\nhp : p ∈ ↑s1\nhle : s1 ≤ s2\np2 : P\nhp2 : p2 ∈ s2\nhp2s1 : ¬p2 ∈ s1\nhm : p2 ∈ s1\n⊢ False\n[PROOFSTEP]\nexact hp2s1 hm\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS : AffineSpace V P\np₁ p₂ : P\ns1 s2 : AffineSubspace k P\n⊢ direction s1 ⊔ direction s2 ≤ direction (s1 ⊔ s2)\n[PROOFSTEP]\nsimp only [direction_eq_vectorSpan, vectorSpan_def]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS : AffineSpace V P\np₁ p₂ : P\ns1 s2 : AffineSubspace k P\n⊢ Submodule.span k (↑s1 -ᵥ ↑s1) ⊔ Submodule.span k (↑s2 -ᵥ ↑s2) ≤ Submodule.span k (↑(s1 ⊔ s2) -ᵥ ↑(s1 ⊔ s2))\n[PROOFSTEP]\nexact\n  sup_le (sInf_le_sInf fun p hp => Set.Subset.trans (vsub_self_mono (le_sup_left : s1 ≤ s1 ⊔ s2)) hp)\n    (sInf_le_sInf fun p hp => Set.Subset.trans (vsub_self_mono (le_sup_right : s2 ≤ s1 ⊔ s2)) hp)\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS : AffineSpace V P\np₁ p₂ : P\ns1 s2 : AffineSubspace k P\nh1 : Set.Nonempty ↑s1\nh2 : Set.Nonempty ↑s2\nhe : ↑s1 ∩ ↑s2 = ∅\n⊢ direction s1 ⊔ direction s2 < direction (s1 ⊔ s2)\n[PROOFSTEP]\ncases' h1 with p1 hp1\n[GOAL]\ncase intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS : AffineSpace V P\np₁ p₂ : P\ns1 s2 : AffineSubspace k P\nh2 : Set.Nonempty ↑s2\nhe : ↑s1 ∩ ↑s2 = ∅\np1 : P\nhp1 : p1 ∈ ↑s1\n⊢ direction s1 ⊔ direction s2 < direction (s1 ⊔ s2)\n[PROOFSTEP]\ncases' h2 with p2 hp2\n[GOAL]\ncase intro.intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS : AffineSpace V P\np₁ p₂ : P\ns1 s2 : AffineSubspace k P\nhe : ↑s1 ∩ ↑s2 = ∅\np1 : P\nhp1 : p1 ∈ ↑s1\np2 : P\nhp2 : p2 ∈ ↑s2\n⊢ direction s1 ⊔ direction s2 < direction (s1 ⊔ s2)\n[PROOFSTEP]\nrw [SetLike.lt_iff_le_and_exists]\n[GOAL]\ncase intro.intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS : AffineSpace V P\np₁ p₂ : P\ns1 s2 : AffineSubspace k P\nhe : ↑s1 ∩ ↑s2 = ∅\np1 : P\nhp1 : p1 ∈ ↑s1\np2 : P\nhp2 : p2 ∈ ↑s2\n⊢ direction s1 ⊔ direction s2 ≤ direction (s1 ⊔ s2) ∧ ∃ x, x ∈ direction (s1 ⊔ s2) ∧ ¬x ∈ direction s1 ⊔ direction s2\n[PROOFSTEP]\nuse sup_direction_le s1 s2, p2 -ᵥ p1,\n  vsub_mem_direction ((le_sup_right : s2 ≤ s1 ⊔ s2) hp2) ((le_sup_left : s1 ≤ s1 ⊔ s2) hp1)\n[GOAL]\ncase right\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS : AffineSpace V P\np₁ p₂ : P\ns1 s2 : AffineSubspace k P\nhe : ↑s1 ∩ ↑s2 = ∅\np1 : P\nhp1 : p1 ∈ ↑s1\np2 : P\nhp2 : p2 ∈ ↑s2\n⊢ ¬p2 -ᵥ p1 ∈ direction s1 ⊔ direction s2\n[PROOFSTEP]\nintro h\n[GOAL]\ncase right\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS : AffineSpace V P\np₁ p₂ : P\ns1 s2 : AffineSubspace k P\nhe : ↑s1 ∩ ↑s2 = ∅\np1 : P\nhp1 : p1 ∈ ↑s1\np2 : P\nhp2 : p2 ∈ ↑s2\nh : p2 -ᵥ p1 ∈ direction s1 ⊔ direction s2\n⊢ False\n[PROOFSTEP]\nrw [Submodule.mem_sup] at h \n[GOAL]\ncase right\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS : AffineSpace V P\np₁ p₂ : P\ns1 s2 : AffineSubspace k P\nhe : ↑s1 ∩ ↑s2 = ∅\np1 : P\nhp1 : p1 ∈ ↑s1\np2 : P\nhp2 : p2 ∈ ↑s2\nh : ∃ y, y ∈ direction s1 ∧ ∃ z, z ∈ direction s2 ∧ y + z = p2 -ᵥ p1\n⊢ False\n[PROOFSTEP]\nrcases h with ⟨v1, hv1, v2, hv2, hv1v2⟩\n[GOAL]\ncase right.intro.intro.intro.intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS : AffineSpace V P\np₁ p₂ : P\ns1 s2 : AffineSubspace k P\nhe : ↑s1 ∩ ↑s2 = ∅\np1 : P\nhp1 : p1 ∈ ↑s1\np2 : P\nhp2 : p2 ∈ ↑s2\nv1 : V\nhv1 : v1 ∈ direction s1\nv2 : V\nhv2 : v2 ∈ direction s2\nhv1v2 : v1 + v2 = p2 -ᵥ p1\n⊢ False\n[PROOFSTEP]\nrw [← sub_eq_zero, sub_eq_add_neg, neg_vsub_eq_vsub_rev, add_comm v1, add_assoc, ← vadd_vsub_assoc, ← neg_neg v2,\n  add_comm, ← sub_eq_add_neg, ← vsub_vadd_eq_vsub_sub, vsub_eq_zero_iff_eq] at hv1v2 \n[GOAL]\ncase right.intro.intro.intro.intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS : AffineSpace V P\np₁ p₂ : P\ns1 s2 : AffineSubspace k P\nhe : ↑s1 ∩ ↑s2 = ∅\np1 : P\nhp1 : p1 ∈ ↑s1\np2 : P\nhp2 : p2 ∈ ↑s2\nv1 : V\nhv1 : v1 ∈ direction s1\nv2 : V\nhv2 : v2 ∈ direction s2\nhv1v2✝ : v1 + v2 = p2 -ᵥ p1\nhv1v2 : v1 +ᵥ p1 = -v2 +ᵥ p2\n⊢ False\n[PROOFSTEP]\nrefine' Set.Nonempty.ne_empty _ he\n[GOAL]\ncase right.intro.intro.intro.intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS : AffineSpace V P\np₁ p₂ : P\ns1 s2 : AffineSubspace k P\nhe : ↑s1 ∩ ↑s2 = ∅\np1 : P\nhp1 : p1 ∈ ↑s1\np2 : P\nhp2 : p2 ∈ ↑s2\nv1 : V\nhv1 : v1 ∈ direction s1\nv2 : V\nhv2 : v2 ∈ direction s2\nhv1v2✝ : v1 + v2 = p2 -ᵥ p1\nhv1v2 : v1 +ᵥ p1 = -v2 +ᵥ p2\n⊢ Set.Nonempty (↑s1 ∩ ↑s2)\n[PROOFSTEP]\nuse v1 +ᵥ p1, vadd_mem_of_mem_direction hv1 hp1\n[GOAL]\ncase right\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS : AffineSpace V P\np₁ p₂ : P\ns1 s2 : AffineSubspace k P\nhe : ↑s1 ∩ ↑s2 = ∅\np1 : P\nhp1 : p1 ∈ ↑s1\np2 : P\nhp2 : p2 ∈ ↑s2\nv1 : V\nhv1 : v1 ∈ direction s1\nv2 : V\nhv2 : v2 ∈ direction s2\nhv1v2✝ : v1 + v2 = p2 -ᵥ p1\nhv1v2 : v1 +ᵥ p1 = -v2 +ᵥ p2\n⊢ v1 +ᵥ p1 ∈ ↑s2\n[PROOFSTEP]\nrw [hv1v2]\n[GOAL]\ncase right\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS : AffineSpace V P\np₁ p₂ : P\ns1 s2 : AffineSubspace k P\nhe : ↑s1 ∩ ↑s2 = ∅\np1 : P\nhp1 : p1 ∈ ↑s1\np2 : P\nhp2 : p2 ∈ ↑s2\nv1 : V\nhv1 : v1 ∈ direction s1\nv2 : V\nhv2 : v2 ∈ direction s2\nhv1v2✝ : v1 + v2 = p2 -ᵥ p1\nhv1v2 : v1 +ᵥ p1 = -v2 +ᵥ p2\n⊢ -v2 +ᵥ p2 ∈ ↑s2\n[PROOFSTEP]\nexact vadd_mem_of_mem_direction (Submodule.neg_mem _ hv2) hp2\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS : AffineSpace V P\np₁ p₂ : P\ns1 s2 : AffineSubspace k P\nh1 : Set.Nonempty ↑s1\nh2 : Set.Nonempty ↑s2\nhd : direction s1 ⊔ direction s2 = ⊤\n⊢ Set.Nonempty (↑s1 ∩ ↑s2)\n[PROOFSTEP]\nby_contra h\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS : AffineSpace V P\np₁ p₂ : P\ns1 s2 : AffineSubspace k P\nh1 : Set.Nonempty ↑s1\nh2 : Set.Nonempty ↑s2\nhd : direction s1 ⊔ direction s2 = ⊤\nh : ¬Set.Nonempty (↑s1 ∩ ↑s2)\n⊢ False\n[PROOFSTEP]\nrw [Set.not_nonempty_iff_eq_empty] at h \n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS : AffineSpace V P\np₁ p₂ : P\ns1 s2 : AffineSubspace k P\nh1 : Set.Nonempty ↑s1\nh2 : Set.Nonempty ↑s2\nhd : direction s1 ⊔ direction s2 = ⊤\nh : ↑s1 ∩ ↑s2 = ∅\n⊢ False\n[PROOFSTEP]\nhave hlt := sup_direction_lt_of_nonempty_of_inter_empty h1 h2 h\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS : AffineSpace V P\np₁ p₂ : P\ns1 s2 : AffineSubspace k P\nh1 : Set.Nonempty ↑s1\nh2 : Set.Nonempty ↑s2\nhd : direction s1 ⊔ direction s2 = ⊤\nh : ↑s1 ∩ ↑s2 = ∅\nhlt : direction s1 ⊔ direction s2 < direction (s1 ⊔ s2)\n⊢ False\n[PROOFSTEP]\nrw [hd] at hlt \n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS : AffineSpace V P\np₁ p₂ : P\ns1 s2 : AffineSubspace k P\nh1 : Set.Nonempty ↑s1\nh2 : Set.Nonempty ↑s2\nhd : direction s1 ⊔ direction s2 = ⊤\nh : ↑s1 ∩ ↑s2 = ∅\nhlt : ⊤ < direction (s1 ⊔ s2)\n⊢ False\n[PROOFSTEP]\nexact not_top_lt hlt\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS : AffineSpace V P\np₁ p₂ : P\ns1 s2 : AffineSubspace k P\nh1 : Set.Nonempty ↑s1\nh2 : Set.Nonempty ↑s2\nhd : IsCompl (direction s1) (direction s2)\n⊢ ∃ p, ↑s1 ∩ ↑s2 = {p}\n[PROOFSTEP]\ncases' inter_nonempty_of_nonempty_of_sup_direction_eq_top h1 h2 hd.sup_eq_top with p hp\n[GOAL]\ncase intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS : AffineSpace V P\np₁ p₂ : P\ns1 s2 : AffineSubspace k P\nh1 : Set.Nonempty ↑s1\nh2 : Set.Nonempty ↑s2\nhd : IsCompl (direction s1) (direction s2)\np : P\nhp : p ∈ ↑s1 ∩ ↑s2\n⊢ ∃ p, ↑s1 ∩ ↑s2 = {p}\n[PROOFSTEP]\nuse p\n[GOAL]\ncase h\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS : AffineSpace V P\np₁ p₂ : P\ns1 s2 : AffineSubspace k P\nh1 : Set.Nonempty ↑s1\nh2 : Set.Nonempty ↑s2\nhd : IsCompl (direction s1) (direction s2)\np : P\nhp : p ∈ ↑s1 ∩ ↑s2\n⊢ ↑s1 ∩ ↑s2 = {p}\n[PROOFSTEP]\next q\n[GOAL]\ncase h.h\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS : AffineSpace V P\np₁ p₂ : P\ns1 s2 : AffineSubspace k P\nh1 : Set.Nonempty ↑s1\nh2 : Set.Nonempty ↑s2\nhd : IsCompl (direction s1) (direction s2)\np : P\nhp : p ∈ ↑s1 ∩ ↑s2\nq : P\n⊢ q ∈ ↑s1 ∩ ↑s2 ↔ q ∈ {p}\n[PROOFSTEP]\nrw [Set.mem_singleton_iff]\n[GOAL]\ncase h.h\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS : AffineSpace V P\np₁ p₂ : P\ns1 s2 : AffineSubspace k P\nh1 : Set.Nonempty ↑s1\nh2 : Set.Nonempty ↑s2\nhd : IsCompl (direction s1) (direction s2)\np : P\nhp : p ∈ ↑s1 ∩ ↑s2\nq : P\n⊢ q ∈ ↑s1 ∩ ↑s2 ↔ q = p\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.h.mp\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS : AffineSpace V P\np₁ p₂ : P\ns1 s2 : AffineSubspace k P\nh1 : Set.Nonempty ↑s1\nh2 : Set.Nonempty ↑s2\nhd : IsCompl (direction s1) (direction s2)\np : P\nhp : p ∈ ↑s1 ∩ ↑s2\nq : P\n⊢ q ∈ ↑s1 ∩ ↑s2 → q = p\n[PROOFSTEP]\nrintro ⟨hq1, hq2⟩\n[GOAL]\ncase h.h.mp.intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS : AffineSpace V P\np₁ p₂ : P\ns1 s2 : AffineSubspace k P\nh1 : Set.Nonempty ↑s1\nh2 : Set.Nonempty ↑s2\nhd : IsCompl (direction s1) (direction s2)\np : P\nhp : p ∈ ↑s1 ∩ ↑s2\nq : P\nhq1 : q ∈ ↑s1\nhq2 : q ∈ ↑s2\n⊢ q = p\n[PROOFSTEP]\nhave hqp : q -ᵥ p ∈ s1.direction ⊓ s2.direction := ⟨vsub_mem_direction hq1 hp.1, vsub_mem_direction hq2 hp.2⟩\n[GOAL]\ncase h.h.mp.intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS : AffineSpace V P\np₁ p₂ : P\ns1 s2 : AffineSubspace k P\nh1 : Set.Nonempty ↑s1\nh2 : Set.Nonempty ↑s2\nhd : IsCompl (direction s1) (direction s2)\np : P\nhp : p ∈ ↑s1 ∩ ↑s2\nq : P\nhq1 : q ∈ ↑s1\nhq2 : q ∈ ↑s2\nhqp : q -ᵥ p ∈ direction s1 ⊓ direction s2\n⊢ q = p\n[PROOFSTEP]\nrwa [hd.inf_eq_bot, Submodule.mem_bot, vsub_eq_zero_iff_eq] at hqp \n[GOAL]\ncase h.h.mpr\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS : AffineSpace V P\np₁ p₂ : P\ns1 s2 : AffineSubspace k P\nh1 : Set.Nonempty ↑s1\nh2 : Set.Nonempty ↑s2\nhd : IsCompl (direction s1) (direction s2)\np : P\nhp : p ∈ ↑s1 ∩ ↑s2\nq : P\n⊢ q = p → q ∈ ↑s1 ∩ ↑s2\n[PROOFSTEP]\nexact fun h => h.symm ▸ hp\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS : AffineSpace V P\np₁ p₂ : P\ns : AffineSubspace k P\n⊢ affineSpan k ↑s = s\n[PROOFSTEP]\nrefine' le_antisymm _ (subset_spanPoints _ _)\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS : AffineSpace V P\np₁ p₂ : P\ns : AffineSubspace k P\n⊢ affineSpan k ↑s ≤ s\n[PROOFSTEP]\nrintro p ⟨p1, hp1, v, hv, rfl⟩\n[GOAL]\ncase intro.intro.intro.intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝² : Ring k\ninst✝¹ : AddCommGroup V\ninst✝ : Module k V\nS : AffineSpace V P\np₁ p₂ : P\ns : AffineSubspace k P\np1 : P\nhp1 : p1 ∈ ↑s\nv : V\nhv : v ∈ vectorSpan k ↑s\n⊢ v +ᵥ p1 ∈ ↑s\n[PROOFSTEP]\nexact vadd_mem_of_mem_direction hv hp1\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\nι : Type u_4\ns : Set P\np : P\nhp : p ∈ s\n⊢ vectorSpan k s = Submodule.span k ((fun x x_1 => x -ᵥ x_1) p '' s)\n[PROOFSTEP]\nrw [vectorSpan_def]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\nι : Type u_4\ns : Set P\np : P\nhp : p ∈ s\n⊢ Submodule.span k (s -ᵥ s) = Submodule.span k ((fun x x_1 => x -ᵥ x_1) p '' s)\n[PROOFSTEP]\nrefine' le_antisymm _ (Submodule.span_mono _)\n[GOAL]\ncase refine'_1\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\nι : Type u_4\ns : Set P\np : P\nhp : p ∈ s\n⊢ Submodule.span k (s -ᵥ s) ≤ Submodule.span k ((fun x x_1 => x -ᵥ x_1) p '' s)\n[PROOFSTEP]\nrw [Submodule.span_le]\n[GOAL]\ncase refine'_1\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\nι : Type u_4\ns : Set P\np : P\nhp : p ∈ s\n⊢ s -ᵥ s ⊆ ↑(Submodule.span k ((fun x x_1 => x -ᵥ x_1) p '' s))\n[PROOFSTEP]\nrintro v ⟨p1, p2, hp1, hp2, hv⟩\n[GOAL]\ncase refine'_1.intro.intro.intro.intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\nι : Type u_4\ns : Set P\np : P\nhp : p ∈ s\nv : V\np1 p2 : P\nhp1 : p1 ∈ s\nhp2 : p2 ∈ s\nhv : (fun x x_1 => x -ᵥ x_1) p1 p2 = v\n⊢ v ∈ ↑(Submodule.span k ((fun x x_1 => x -ᵥ x_1) p '' s))\n[PROOFSTEP]\nsimp_rw [← vsub_sub_vsub_cancel_left p1 p2 p] at hv \n[GOAL]\ncase refine'_1.intro.intro.intro.intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\nι : Type u_4\ns : Set P\np : P\nhp : p ∈ s\nv : V\np1 p2 : P\nhp1 : p1 ∈ s\nhp2 : p2 ∈ s\nhv : p -ᵥ p2 - (p -ᵥ p1) = v\n⊢ v ∈ ↑(Submodule.span k ((fun x x_1 => x -ᵥ x_1) p '' s))\n[PROOFSTEP]\nrw [← hv, SetLike.mem_coe, Submodule.mem_span]\n[GOAL]\ncase refine'_1.intro.intro.intro.intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\nι : Type u_4\ns : Set P\np : P\nhp : p ∈ s\nv : V\np1 p2 : P\nhp1 : p1 ∈ s\nhp2 : p2 ∈ s\nhv : p -ᵥ p2 - (p -ᵥ p1) = v\n⊢ ∀ (p_1 : Submodule k V), (fun x x_1 => x -ᵥ x_1) p '' s ⊆ ↑p_1 → p -ᵥ p2 - (p -ᵥ p1) ∈ p_1\n[PROOFSTEP]\nexact fun m hm => Submodule.sub_mem _ (hm ⟨p2, hp2, rfl⟩) (hm ⟨p1, hp1, rfl⟩)\n[GOAL]\ncase refine'_2\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\nι : Type u_4\ns : Set P\np : P\nhp : p ∈ s\n⊢ (fun x x_1 => x -ᵥ x_1) p '' s ⊆ s -ᵥ s\n[PROOFSTEP]\nrintro v ⟨p2, hp2, hv⟩\n[GOAL]\ncase refine'_2.intro.intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\nι : Type u_4\ns : Set P\np : P\nhp : p ∈ s\nv : V\np2 : P\nhp2 : p2 ∈ s\nhv : (fun x x_1 => x -ᵥ x_1) p p2 = v\n⊢ v ∈ s -ᵥ s\n[PROOFSTEP]\nexact ⟨p, p2, hp, hp2, hv⟩\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\nι : Type u_4\ns : Set P\np : P\nhp : p ∈ s\n⊢ vectorSpan k s = Submodule.span k ((fun x => x -ᵥ p) '' s)\n[PROOFSTEP]\nrw [vectorSpan_def]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\nι : Type u_4\ns : Set P\np : P\nhp : p ∈ s\n⊢ Submodule.span k (s -ᵥ s) = Submodule.span k ((fun x => x -ᵥ p) '' s)\n[PROOFSTEP]\nrefine' le_antisymm _ (Submodule.span_mono _)\n[GOAL]\ncase refine'_1\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\nι : Type u_4\ns : Set P\np : P\nhp : p ∈ s\n⊢ Submodule.span k (s -ᵥ s) ≤ Submodule.span k ((fun x => x -ᵥ p) '' s)\n[PROOFSTEP]\nrw [Submodule.span_le]\n[GOAL]\ncase refine'_1\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\nι : Type u_4\ns : Set P\np : P\nhp : p ∈ s\n⊢ s -ᵥ s ⊆ ↑(Submodule.span k ((fun x => x -ᵥ p) '' s))\n[PROOFSTEP]\nrintro v ⟨p1, p2, hp1, hp2, hv⟩\n[GOAL]\ncase refine'_1.intro.intro.intro.intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\nι : Type u_4\ns : Set P\np : P\nhp : p ∈ s\nv : V\np1 p2 : P\nhp1 : p1 ∈ s\nhp2 : p2 ∈ s\nhv : (fun x x_1 => x -ᵥ x_1) p1 p2 = v\n⊢ v ∈ ↑(Submodule.span k ((fun x => x -ᵥ p) '' s))\n[PROOFSTEP]\nsimp_rw [← vsub_sub_vsub_cancel_right p1 p2 p] at hv \n[GOAL]\ncase refine'_1.intro.intro.intro.intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\nι : Type u_4\ns : Set P\np : P\nhp : p ∈ s\nv : V\np1 p2 : P\nhp1 : p1 ∈ s\nhp2 : p2 ∈ s\nhv : p1 -ᵥ p - (p2 -ᵥ p) = v\n⊢ v ∈ ↑(Submodule.span k ((fun x => x -ᵥ p) '' s))\n[PROOFSTEP]\nrw [← hv, SetLike.mem_coe, Submodule.mem_span]\n[GOAL]\ncase refine'_1.intro.intro.intro.intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\nι : Type u_4\ns : Set P\np : P\nhp : p ∈ s\nv : V\np1 p2 : P\nhp1 : p1 ∈ s\nhp2 : p2 ∈ s\nhv : p1 -ᵥ p - (p2 -ᵥ p) = v\n⊢ ∀ (p_1 : Submodule k V), (fun x => x -ᵥ p) '' s ⊆ ↑p_1 → p1 -ᵥ p - (p2 -ᵥ p) ∈ p_1\n[PROOFSTEP]\nexact fun m hm => Submodule.sub_mem _ (hm ⟨p1, hp1, rfl⟩) (hm ⟨p2, hp2, rfl⟩)\n[GOAL]\ncase refine'_2\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\nι : Type u_4\ns : Set P\np : P\nhp : p ∈ s\n⊢ (fun x => x -ᵥ p) '' s ⊆ s -ᵥ s\n[PROOFSTEP]\nrintro v ⟨p2, hp2, hv⟩\n[GOAL]\ncase refine'_2.intro.intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\nι : Type u_4\ns : Set P\np : P\nhp : p ∈ s\nv : V\np2 : P\nhp2 : p2 ∈ s\nhv : (fun x => x -ᵥ p) p2 = v\n⊢ v ∈ s -ᵥ s\n[PROOFSTEP]\nexact ⟨p2, p, hp2, hp, hv⟩\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\nι : Type u_4\ns : Set P\np : P\nhp : p ∈ s\n⊢ vectorSpan k s = Submodule.span k ((fun x x_1 => x -ᵥ x_1) p '' (s \\ {p}))\n[PROOFSTEP]\nconv_lhs =>\n  rw [vectorSpan_eq_span_vsub_set_left k hp, ← Set.insert_eq_of_mem hp, ← Set.insert_diff_singleton,\n    Set.image_insert_eq]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\nι : Type u_4\ns : Set P\np : P\nhp : p ∈ s\n| vectorSpan k s\n[PROOFSTEP]\nrw [vectorSpan_eq_span_vsub_set_left k hp, ← Set.insert_eq_of_mem hp, ← Set.insert_diff_singleton, Set.image_insert_eq]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\nι : Type u_4\ns : Set P\np : P\nhp : p ∈ s\n| vectorSpan k s\n[PROOFSTEP]\nrw [vectorSpan_eq_span_vsub_set_left k hp, ← Set.insert_eq_of_mem hp, ← Set.insert_diff_singleton, Set.image_insert_eq]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\nι : Type u_4\ns : Set P\np : P\nhp : p ∈ s\n| vectorSpan k s\n[PROOFSTEP]\nrw [vectorSpan_eq_span_vsub_set_left k hp, ← Set.insert_eq_of_mem hp, ← Set.insert_diff_singleton, Set.image_insert_eq]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\nι : Type u_4\ns : Set P\np : P\nhp : p ∈ s\n⊢ Submodule.span k (insert ((fun x x_1 => x -ᵥ x_1) p p) ((fun x x_1 => x -ᵥ x_1) p '' (s \\ {p}))) =\n    Submodule.span k ((fun x x_1 => x -ᵥ x_1) p '' (s \\ {p}))\n[PROOFSTEP]\nsimp [Submodule.span_insert_eq_span]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\nι : Type u_4\ns : Set P\np : P\nhp : p ∈ s\n⊢ vectorSpan k s = Submodule.span k ((fun x => x -ᵥ p) '' (s \\ {p}))\n[PROOFSTEP]\nconv_lhs =>\n  rw [vectorSpan_eq_span_vsub_set_right k hp, ← Set.insert_eq_of_mem hp, ← Set.insert_diff_singleton,\n    Set.image_insert_eq]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\nι : Type u_4\ns : Set P\np : P\nhp : p ∈ s\n| vectorSpan k s\n[PROOFSTEP]\nrw [vectorSpan_eq_span_vsub_set_right k hp, ← Set.insert_eq_of_mem hp, ← Set.insert_diff_singleton, Set.image_insert_eq]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\nι : Type u_4\ns : Set P\np : P\nhp : p ∈ s\n| vectorSpan k s\n[PROOFSTEP]\nrw [vectorSpan_eq_span_vsub_set_right k hp, ← Set.insert_eq_of_mem hp, ← Set.insert_diff_singleton, Set.image_insert_eq]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\nι : Type u_4\ns : Set P\np : P\nhp : p ∈ s\n| vectorSpan k s\n[PROOFSTEP]\nrw [vectorSpan_eq_span_vsub_set_right k hp, ← Set.insert_eq_of_mem hp, ← Set.insert_diff_singleton, Set.image_insert_eq]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\nι : Type u_4\ns : Set P\np : P\nhp : p ∈ s\n⊢ Submodule.span k (insert (p -ᵥ p) ((fun x => x -ᵥ p) '' (s \\ {p}))) =\n    Submodule.span k ((fun x => x -ᵥ p) '' (s \\ {p}))\n[PROOFSTEP]\nsimp [Submodule.span_insert_eq_span]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝⁵ : Ring k\ninst✝⁴ : AddCommGroup V\ninst✝³ : Module k V\ninst✝² : AffineSpace V P\nι : Type u_4\ninst✝¹ : DecidableEq P\ninst✝ : DecidableEq V\ns : Finset P\np : P\nhp : p ∈ s\n⊢ vectorSpan k ↑s = Submodule.span k ↑(Finset.image (fun x => x -ᵥ p) (Finset.erase s p))\n[PROOFSTEP]\nsimp [vectorSpan_eq_span_vsub_set_right_ne _ (Finset.mem_coe.mpr hp)]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\nι : Type u_4\np : ι → P\ns : Set ι\ni : ι\nhi : i ∈ s\n⊢ vectorSpan k (p '' s) = Submodule.span k ((fun x x_1 => x -ᵥ x_1) (p i) '' (p '' (s \\ {i})))\n[PROOFSTEP]\nconv_lhs =>\n  rw [vectorSpan_eq_span_vsub_set_left k (Set.mem_image_of_mem p hi), ← Set.insert_eq_of_mem hi, ←\n    Set.insert_diff_singleton, Set.image_insert_eq, Set.image_insert_eq]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\nι : Type u_4\np : ι → P\ns : Set ι\ni : ι\nhi : i ∈ s\n| vectorSpan k (p '' s)\n[PROOFSTEP]\nrw [vectorSpan_eq_span_vsub_set_left k (Set.mem_image_of_mem p hi), ← Set.insert_eq_of_mem hi, ←\n    Set.insert_diff_singleton, Set.image_insert_eq, Set.image_insert_eq]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\nι : Type u_4\np : ι → P\ns : Set ι\ni : ι\nhi : i ∈ s\n| vectorSpan k (p '' s)\n[PROOFSTEP]\nrw [vectorSpan_eq_span_vsub_set_left k (Set.mem_image_of_mem p hi), ← Set.insert_eq_of_mem hi, ←\n    Set.insert_diff_singleton, Set.image_insert_eq, Set.image_insert_eq]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\nι : Type u_4\np : ι → P\ns : Set ι\ni : ι\nhi : i ∈ s\n| vectorSpan k (p '' s)\n[PROOFSTEP]\nrw [vectorSpan_eq_span_vsub_set_left k (Set.mem_image_of_mem p hi), ← Set.insert_eq_of_mem hi, ←\n  Set.insert_diff_singleton, Set.image_insert_eq, Set.image_insert_eq]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\nι : Type u_4\np : ι → P\ns : Set ι\ni : ι\nhi : i ∈ s\n⊢ Submodule.span k (insert ((fun x x_1 => x -ᵥ x_1) (p i) (p i)) ((fun x x_1 => x -ᵥ x_1) (p i) '' (p '' (s \\ {i})))) =\n    Submodule.span k ((fun x x_1 => x -ᵥ x_1) (p i) '' (p '' (s \\ {i})))\n[PROOFSTEP]\nsimp [Submodule.span_insert_eq_span]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\nι : Type u_4\np : ι → P\ns : Set ι\ni : ι\nhi : i ∈ s\n⊢ vectorSpan k (p '' s) = Submodule.span k ((fun x => x -ᵥ p i) '' (p '' (s \\ {i})))\n[PROOFSTEP]\nconv_lhs =>\n  rw [vectorSpan_eq_span_vsub_set_right k (Set.mem_image_of_mem p hi), ← Set.insert_eq_of_mem hi, ←\n    Set.insert_diff_singleton, Set.image_insert_eq, Set.image_insert_eq]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\nι : Type u_4\np : ι → P\ns : Set ι\ni : ι\nhi : i ∈ s\n| vectorSpan k (p '' s)\n[PROOFSTEP]\nrw [vectorSpan_eq_span_vsub_set_right k (Set.mem_image_of_mem p hi), ← Set.insert_eq_of_mem hi, ←\n    Set.insert_diff_singleton, Set.image_insert_eq, Set.image_insert_eq]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\nι : Type u_4\np : ι → P\ns : Set ι\ni : ι\nhi : i ∈ s\n| vectorSpan k (p '' s)\n[PROOFSTEP]\nrw [vectorSpan_eq_span_vsub_set_right k (Set.mem_image_of_mem p hi), ← Set.insert_eq_of_mem hi, ←\n    Set.insert_diff_singleton, Set.image_insert_eq, Set.image_insert_eq]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\nι : Type u_4\np : ι → P\ns : Set ι\ni : ι\nhi : i ∈ s\n| vectorSpan k (p '' s)\n[PROOFSTEP]\nrw [vectorSpan_eq_span_vsub_set_right k (Set.mem_image_of_mem p hi), ← Set.insert_eq_of_mem hi, ←\n  Set.insert_diff_singleton, Set.image_insert_eq, Set.image_insert_eq]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\nι : Type u_4\np : ι → P\ns : Set ι\ni : ι\nhi : i ∈ s\n⊢ Submodule.span k (insert (p i -ᵥ p i) ((fun x => x -ᵥ p i) '' (p '' (s \\ {i})))) =\n    Submodule.span k ((fun x => x -ᵥ p i) '' (p '' (s \\ {i})))\n[PROOFSTEP]\nsimp [Submodule.span_insert_eq_span]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\nι : Type u_4\np : ι → P\ni0 : ι\n⊢ vectorSpan k (range p) = Submodule.span k (range fun i => p i0 -ᵥ p i)\n[PROOFSTEP]\nrw [vectorSpan_eq_span_vsub_set_left k (Set.mem_range_self i0), ← Set.range_comp]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\nι : Type u_4\np : ι → P\ni0 : ι\n⊢ Submodule.span k (range ((fun x x_1 => x -ᵥ x_1) (p i0) ∘ p)) = Submodule.span k (range fun i => p i0 -ᵥ p i)\n[PROOFSTEP]\ncongr\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\nι : Type u_4\np : ι → P\ni0 : ι\n⊢ vectorSpan k (range p) = Submodule.span k (range fun i => p i -ᵥ p i0)\n[PROOFSTEP]\nrw [vectorSpan_eq_span_vsub_set_right k (Set.mem_range_self i0), ← Set.range_comp]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\nι : Type u_4\np : ι → P\ni0 : ι\n⊢ Submodule.span k (range ((fun x => x -ᵥ p i0) ∘ p)) = Submodule.span k (range fun i => p i -ᵥ p i0)\n[PROOFSTEP]\ncongr\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\nι : Type u_4\np : ι → P\ni₀ : ι\n⊢ vectorSpan k (range p) = Submodule.span k (range fun i => p i₀ -ᵥ p ↑i)\n[PROOFSTEP]\nrw [← Set.image_univ, vectorSpan_image_eq_span_vsub_set_left_ne k _ (Set.mem_univ i₀)]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\nι : Type u_4\np : ι → P\ni₀ : ι\n⊢ Submodule.span k ((fun x x_1 => x -ᵥ x_1) (p i₀) '' (p '' (univ \\ {i₀}))) =\n    Submodule.span k (range fun i => p i₀ -ᵥ p ↑i)\n[PROOFSTEP]\ncongr with v\n[GOAL]\ncase e_s.h\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\nι : Type u_4\np : ι → P\ni₀ : ι\nv : V\n⊢ v ∈ (fun x x_1 => x -ᵥ x_1) (p i₀) '' (p '' (univ \\ {i₀})) ↔ v ∈ range fun i => p i₀ -ᵥ p ↑i\n[PROOFSTEP]\nsimp only [Set.mem_range, Set.mem_image, Set.mem_diff, Set.mem_singleton_iff, Subtype.exists, Subtype.coe_mk]\n[GOAL]\ncase e_s.h\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\nι : Type u_4\np : ι → P\ni₀ : ι\nv : V\n⊢ (∃ x, (∃ x_1, (x_1 ∈ univ ∧ ¬x_1 = i₀) ∧ p x_1 = x) ∧ p i₀ -ᵥ x = v) ↔ ∃ a h, p i₀ -ᵥ p a = v\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase e_s.h.mp\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\nι : Type u_4\np : ι → P\ni₀ : ι\nv : V\n⊢ (∃ x, (∃ x_1, (x_1 ∈ univ ∧ ¬x_1 = i₀) ∧ p x_1 = x) ∧ p i₀ -ᵥ x = v) → ∃ a h, p i₀ -ᵥ p a = v\n[PROOFSTEP]\nrintro ⟨x, ⟨i₁, ⟨⟨_, hi₁⟩, rfl⟩⟩, hv⟩\n[GOAL]\ncase e_s.h.mp.intro.intro.intro.intro.intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\nι : Type u_4\np : ι → P\ni₀ : ι\nv : V\ni₁ : ι\nleft✝ : i₁ ∈ univ\nhi₁ : ¬i₁ = i₀\nhv : p i₀ -ᵥ p i₁ = v\n⊢ ∃ a h, p i₀ -ᵥ p a = v\n[PROOFSTEP]\nexact ⟨i₁, hi₁, hv⟩\n[GOAL]\ncase e_s.h.mpr\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\nι : Type u_4\np : ι → P\ni₀ : ι\nv : V\n⊢ (∃ a h, p i₀ -ᵥ p a = v) → ∃ x, (∃ x_1, (x_1 ∈ univ ∧ ¬x_1 = i₀) ∧ p x_1 = x) ∧ p i₀ -ᵥ x = v\n[PROOFSTEP]\nexact fun ⟨i₁, hi₁, hv⟩ => ⟨p i₁, ⟨i₁, ⟨Set.mem_univ _, hi₁⟩, rfl⟩, hv⟩\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\nι : Type u_4\np : ι → P\ni₀ : ι\n⊢ vectorSpan k (range p) = Submodule.span k (range fun i => p ↑i -ᵥ p i₀)\n[PROOFSTEP]\nrw [← Set.image_univ, vectorSpan_image_eq_span_vsub_set_right_ne k _ (Set.mem_univ i₀)]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\nι : Type u_4\np : ι → P\ni₀ : ι\n⊢ Submodule.span k ((fun x => x -ᵥ p i₀) '' (p '' (univ \\ {i₀}))) = Submodule.span k (range fun i => p ↑i -ᵥ p i₀)\n[PROOFSTEP]\ncongr with v\n[GOAL]\ncase e_s.h\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\nι : Type u_4\np : ι → P\ni₀ : ι\nv : V\n⊢ v ∈ (fun x => x -ᵥ p i₀) '' (p '' (univ \\ {i₀})) ↔ v ∈ range fun i => p ↑i -ᵥ p i₀\n[PROOFSTEP]\nsimp only [Set.mem_range, Set.mem_image, Set.mem_diff, Set.mem_singleton_iff, Subtype.exists, Subtype.coe_mk]\n[GOAL]\ncase e_s.h\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\nι : Type u_4\np : ι → P\ni₀ : ι\nv : V\n⊢ (∃ x, (∃ x_1, (x_1 ∈ univ ∧ ¬x_1 = i₀) ∧ p x_1 = x) ∧ x -ᵥ p i₀ = v) ↔ ∃ a h, p a -ᵥ p i₀ = v\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase e_s.h.mp\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\nι : Type u_4\np : ι → P\ni₀ : ι\nv : V\n⊢ (∃ x, (∃ x_1, (x_1 ∈ univ ∧ ¬x_1 = i₀) ∧ p x_1 = x) ∧ x -ᵥ p i₀ = v) → ∃ a h, p a -ᵥ p i₀ = v\n[PROOFSTEP]\nrintro ⟨x, ⟨i₁, ⟨⟨_, hi₁⟩, rfl⟩⟩, hv⟩\n[GOAL]\ncase e_s.h.mp.intro.intro.intro.intro.intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\nι : Type u_4\np : ι → P\ni₀ : ι\nv : V\ni₁ : ι\nleft✝ : i₁ ∈ univ\nhi₁ : ¬i₁ = i₀\nhv : p i₁ -ᵥ p i₀ = v\n⊢ ∃ a h, p a -ᵥ p i₀ = v\n[PROOFSTEP]\nexact ⟨i₁, hi₁, hv⟩\n[GOAL]\ncase e_s.h.mpr\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\nι : Type u_4\np : ι → P\ni₀ : ι\nv : V\n⊢ (∃ a h, p a -ᵥ p i₀ = v) → ∃ x, (∃ x_1, (x_1 ∈ univ ∧ ¬x_1 = i₀) ∧ p x_1 = x) ∧ x -ᵥ p i₀ = v\n[PROOFSTEP]\nexact fun ⟨i₁, hi₁, hv⟩ => ⟨p i₁, ⟨i₁, ⟨Set.mem_univ _, hi₁⟩, rfl⟩, hv⟩\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\nι : Type u_4\ns : Set P\n⊢ affineSpan k s = ⊥ ↔ s = ∅\n[PROOFSTEP]\nrw [← not_iff_not, ← Ne.def, ← Ne.def, ← nonempty_iff_ne_bot, affineSpan_nonempty, nonempty_iff_ne_empty]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\nι : Type u_4\ns : Set P\n⊢ ⊥ < affineSpan k s ↔ Set.Nonempty s\n[PROOFSTEP]\nrw [bot_lt_iff_ne_bot, nonempty_iff_ne_empty]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\nι : Type u_4\ns : Set P\n⊢ affineSpan k s ≠ ⊥ ↔ s ≠ ∅\n[PROOFSTEP]\nexact (affineSpan_eq_bot _).not\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\nι : Type u_4\ns : Set P\np : (x : P) → x ∈ affineSpan k s → Prop\nHs : ∀ (y : P) (hys : y ∈ s), p y (_ : y ∈ ↑(affineSpan k s))\nHc :\n  ∀ (c : k) (u : P) (hu : u ∈ affineSpan k s) (v : P) (hv : v ∈ affineSpan k s) (w : P) (hw : w ∈ affineSpan k s),\n    p u hu → p v hv → p w hw → p (c • (u -ᵥ v) +ᵥ w) (_ : c • (u -ᵥ v) +ᵥ w ∈ (affineSpan k s).carrier)\nx : P\nh : x ∈ affineSpan k s\n⊢ p x h\n[PROOFSTEP]\nrefine' Exists.elim _ fun (hx : x ∈ affineSpan k s) (hc : p x hx) => hc\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\nι : Type u_4\ns : Set P\np : (x : P) → x ∈ affineSpan k s → Prop\nHs : ∀ (y : P) (hys : y ∈ s), p y (_ : y ∈ ↑(affineSpan k s))\nHc :\n  ∀ (c : k) (u : P) (hu : u ∈ affineSpan k s) (v : P) (hv : v ∈ affineSpan k s) (w : P) (hw : w ∈ affineSpan k s),\n    p u hu → p v hv → p w hw → p (c • (u -ᵥ v) +ᵥ w) (_ : c • (u -ᵥ v) +ᵥ w ∈ (affineSpan k s).carrier)\nx : P\nh : x ∈ affineSpan k s\n⊢ ∃ x_1, p x x_1\n[PROOFSTEP]\nrefine' @affineSpan_induction k V P _ _ _ _ _ _ (fun y => ∃ z, p y z) h _ _\n[GOAL]\ncase refine'_1\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\nι : Type u_4\ns : Set P\np : (x : P) → x ∈ affineSpan k s → Prop\nHs : ∀ (y : P) (hys : y ∈ s), p y (_ : y ∈ ↑(affineSpan k s))\nHc :\n  ∀ (c : k) (u : P) (hu : u ∈ affineSpan k s) (v : P) (hv : v ∈ affineSpan k s) (w : P) (hw : w ∈ affineSpan k s),\n    p u hu → p v hv → p w hw → p (c • (u -ᵥ v) +ᵥ w) (_ : c • (u -ᵥ v) +ᵥ w ∈ (affineSpan k s).carrier)\nx : P\nh : x ∈ affineSpan k s\n⊢ ∀ (x : P), x ∈ s → (fun y => ∃ z, p y z) x\n[PROOFSTEP]\nexact fun y hy => ⟨subset_affineSpan _ _ hy, Hs y hy⟩\n[GOAL]\ncase refine'_2\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\nι : Type u_4\ns : Set P\np : (x : P) → x ∈ affineSpan k s → Prop\nHs : ∀ (y : P) (hys : y ∈ s), p y (_ : y ∈ ↑(affineSpan k s))\nHc :\n  ∀ (c : k) (u : P) (hu : u ∈ affineSpan k s) (v : P) (hv : v ∈ affineSpan k s) (w : P) (hw : w ∈ affineSpan k s),\n    p u hu → p v hv → p w hw → p (c • (u -ᵥ v) +ᵥ w) (_ : c • (u -ᵥ v) +ᵥ w ∈ (affineSpan k s).carrier)\nx : P\nh : x ∈ affineSpan k s\n⊢ ∀ (c : k) (u v w : P),\n    (fun y => ∃ z, p y z) u →\n      (fun y => ∃ z, p y z) v → (fun y => ∃ z, p y z) w → (fun y => ∃ z, p y z) (c • (u -ᵥ v) +ᵥ w)\n[PROOFSTEP]\nexact fun c u v w hu hv hw =>\n  Exists.elim hu fun hu' hu =>\n    Exists.elim hv fun hv' hv =>\n      Exists.elim hw fun hw' hw => ⟨AffineSubspace.smul_vsub_vadd_mem _ _ hu' hv' hw', Hc _ _ _ _ _ _ _ hu hv hw⟩\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝⁴ : Ring k\ninst✝³ : AddCommGroup V\ninst✝² : Module k V\ninst✝¹ : AffineSpace V P\nι : Type u_4\nA : Set P\ninst✝ : Nonempty ↑A\n⊢ affineSpan k (Subtype.val ⁻¹' A) = ⊤\n[PROOFSTEP]\nrw [eq_top_iff]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝⁴ : Ring k\ninst✝³ : AddCommGroup V\ninst✝² : Module k V\ninst✝¹ : AffineSpace V P\nι : Type u_4\nA : Set P\ninst✝ : Nonempty ↑A\n⊢ ⊤ ≤ affineSpan k (Subtype.val ⁻¹' A)\n[PROOFSTEP]\nrintro ⟨x, hx⟩ -\n[GOAL]\ncase mk\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝⁴ : Ring k\ninst✝³ : AddCommGroup V\ninst✝² : Module k V\ninst✝¹ : AffineSpace V P\nι : Type u_4\nA : Set P\ninst✝ : Nonempty ↑A\nx : P\nhx : x ∈ ↑(affineSpan k A)\n⊢ { val := x, property := hx } ∈ ↑(affineSpan k (Subtype.val ⁻¹' A))\n[PROOFSTEP]\nrefine'\n  affineSpan_induction' (fun y hy => _) (fun c u hu v hv w hw => _) hx (p := fun y hy =>\n    ⟨y, hy⟩ ∈ (affineSpan k (((↑) : { z // z ∈ affineSpan k A } → P) ⁻¹' A)))\n    -- porting note: Lean couldn't infer the motive\n[GOAL]\ncase mk.refine'_1\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝⁴ : Ring k\ninst✝³ : AddCommGroup V\ninst✝² : Module k V\ninst✝¹ : AffineSpace V P\nι : Type u_4\nA : Set P\ninst✝ : Nonempty ↑A\nx : P\nhx : x ∈ ↑(affineSpan k A)\ny : P\nhy : y ∈ A\n⊢ (fun y hy => { val := y, property := hy } ∈ affineSpan k (Subtype.val ⁻¹' A)) y (_ : y ∈ ↑(affineSpan k A))\n[PROOFSTEP]\nexact subset_affineSpan _ _ hy\n[GOAL]\ncase mk.refine'_2\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝⁴ : Ring k\ninst✝³ : AddCommGroup V\ninst✝² : Module k V\ninst✝¹ : AffineSpace V P\nι : Type u_4\nA : Set P\ninst✝ : Nonempty ↑A\nx : P\nhx : x ∈ ↑(affineSpan k A)\nc : k\nu : P\nhu : u ∈ affineSpan k A\nv : P\nhv : v ∈ affineSpan k A\nw : P\nhw : w ∈ affineSpan k A\n⊢ (fun y hy => { val := y, property := hy } ∈ affineSpan k (Subtype.val ⁻¹' A)) u hu →\n    (fun y hy => { val := y, property := hy } ∈ affineSpan k (Subtype.val ⁻¹' A)) v hv →\n      (fun y hy => { val := y, property := hy } ∈ affineSpan k (Subtype.val ⁻¹' A)) w hw →\n        (fun y hy => { val := y, property := hy } ∈ affineSpan k (Subtype.val ⁻¹' A)) (c • (u -ᵥ v) +ᵥ w)\n          (_ : c • (u -ᵥ v) +ᵥ w ∈ (affineSpan k A).carrier)\n[PROOFSTEP]\nexact AffineSubspace.smul_vsub_vadd_mem _ _\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\nι : Type u_4\ns : Set V\np : P\nh : Submodule.span k (range Subtype.val) = ⊤\n⊢ affineSpan k ({p} ∪ (fun v => v +ᵥ p) '' s) = ⊤\n[PROOFSTEP]\nconvert ext_of_direction_eq _ ⟨p, mem_affineSpan k (Set.mem_union_left _ (Set.mem_singleton _)), mem_top k V p⟩\n[GOAL]\ncase convert_1\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\nι : Type u_4\ns : Set V\np : P\nh : Submodule.span k (range Subtype.val) = ⊤\n⊢ direction (affineSpan k ({p} ∪ (fun v => v +ᵥ p) '' s)) = direction ⊤\n[PROOFSTEP]\nrw [direction_affineSpan, direction_top,\n  vectorSpan_eq_span_vsub_set_right k (Set.mem_union_left _ (Set.mem_singleton _) : p ∈ _), eq_top_iff, ← h]\n[GOAL]\ncase convert_1\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\nι : Type u_4\ns : Set V\np : P\nh : Submodule.span k (range Subtype.val) = ⊤\n⊢ Submodule.span k (range Subtype.val) ≤ Submodule.span k ((fun x => x -ᵥ p) '' ({p} ∪ (fun v => v +ᵥ p) '' s))\n[PROOFSTEP]\napply Submodule.span_mono\n[GOAL]\ncase convert_1.h\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\nι : Type u_4\ns : Set V\np : P\nh : Submodule.span k (range Subtype.val) = ⊤\n⊢ range Subtype.val ⊆ (fun x => x -ᵥ p) '' ({p} ∪ (fun v => v +ᵥ p) '' s)\n[PROOFSTEP]\nrintro v ⟨v', rfl⟩\n[GOAL]\ncase convert_1.h.intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\nι : Type u_4\ns : Set V\np : P\nh : Submodule.span k (range Subtype.val) = ⊤\nv' : { x // x ∈ s }\n⊢ ↑v' ∈ (fun x => x -ᵥ p) '' ({p} ∪ (fun v => v +ᵥ p) '' s)\n[PROOFSTEP]\nuse(v' : V) +ᵥ p\n[GOAL]\ncase h\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\nι : Type u_4\ns : Set V\np : P\nh : Submodule.span k (range Subtype.val) = ⊤\nv' : { x // x ∈ s }\n⊢ ↑v' +ᵥ p ∈ {p} ∪ (fun v => v +ᵥ p) '' s ∧ (fun x => x -ᵥ p) (↑v' +ᵥ p) = ↑v'\n[PROOFSTEP]\nsimp\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\nι : Type u_4\np₁ p₂ : P\n⊢ vectorSpan k {p₁, p₂} = Submodule.span k {p₁ -ᵥ p₂}\n[PROOFSTEP]\nsimp_rw [vectorSpan_eq_span_vsub_set_left k (mem_insert p₁ _), image_pair, vsub_self, Submodule.span_insert_zero]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\nι : Type u_4\np₁ p₂ : P\n⊢ vectorSpan k {p₁, p₂} = Submodule.span k {p₂ -ᵥ p₁}\n[PROOFSTEP]\nrw [pair_comm, vectorSpan_pair]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\nι : Type u_4\np₁ p₂ : P\nv : V\n⊢ v ∈ vectorSpan k {p₁, p₂} ↔ ∃ r, r • (p₁ -ᵥ p₂) = v\n[PROOFSTEP]\nrw [vectorSpan_pair, Submodule.mem_span_singleton]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\nι : Type u_4\np₁ p₂ : P\nv : V\n⊢ v ∈ vectorSpan k {p₁, p₂} ↔ ∃ r, r • (p₂ -ᵥ p₁) = v\n[PROOFSTEP]\nrw [vectorSpan_pair_rev, Submodule.mem_span_singleton]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\nι : Type u_4\np₁ p₂ : P\nv : V\n⊢ v +ᵥ p₁ ∈ affineSpan k {p₁, p₂} ↔ ∃ r, r • (p₂ -ᵥ p₁) = v\n[PROOFSTEP]\nrw [vadd_mem_iff_mem_direction _ (left_mem_affineSpan_pair _ _ _), direction_affineSpan, mem_vectorSpan_pair_rev]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\nι : Type u_4\np₁ p₂ : P\nv : V\n⊢ v +ᵥ p₂ ∈ affineSpan k {p₁, p₂} ↔ ∃ r, r • (p₁ -ᵥ p₂) = v\n[PROOFSTEP]\nrw [vadd_mem_iff_mem_direction _ (right_mem_affineSpan_pair _ _ _), direction_affineSpan, mem_vectorSpan_pair]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\nι : Type u_4\np₁ p₂ : P\ns : AffineSubspace k P\nhp₁ : p₁ ∈ s\nhp₂ : p₂ ∈ s\n⊢ affineSpan k {p₁, p₂} ≤ s\n[PROOFSTEP]\nrw [affineSpan_le, Set.insert_subset_iff, Set.singleton_subset_iff]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\nι : Type u_4\np₁ p₂ : P\ns : AffineSubspace k P\nhp₁ : p₁ ∈ s\nhp₂ : p₂ ∈ s\n⊢ p₁ ∈ ↑s ∧ p₂ ∈ ↑s\n[PROOFSTEP]\nexact ⟨hp₁, hp₂⟩\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\nι : Type u_4\np : P\nps : Set P\n⊢ affineSpan k (insert p ↑(affineSpan k ps)) = affineSpan k (insert p ps)\n[PROOFSTEP]\nrw [Set.insert_eq, Set.insert_eq, span_union, span_union, affineSpan_coe]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\nι : Type u_4\np : P\nps : Set P\nh : p ∈ affineSpan k ps\n⊢ affineSpan k (insert p ps) = affineSpan k ps\n[PROOFSTEP]\nrw [← mem_coe] at h \n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\nι : Type u_4\np : P\nps : Set P\nh : p ∈ ↑(affineSpan k ps)\n⊢ affineSpan k (insert p ps) = affineSpan k ps\n[PROOFSTEP]\nrw [← affineSpan_insert_affineSpan, Set.insert_eq_of_mem h, affineSpan_coe]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\nι : Type u_4\np : P\nps : Set P\nh : p ∈ affineSpan k ps\n⊢ vectorSpan k (insert p ps) = vectorSpan k ps\n[PROOFSTEP]\nsimp_rw [← direction_affineSpan, affineSpan_insert_eq_affineSpan _ h]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns1 s2 : AffineSubspace k P\np1 p2 : P\nhp1 : p1 ∈ s1\nhp2 : p2 ∈ s2\n⊢ direction (s1 ⊔ s2) = direction s1 ⊔ direction s2 ⊔ Submodule.span k {p2 -ᵥ p1}\n[PROOFSTEP]\nrefine' le_antisymm _ _\n[GOAL]\ncase refine'_1\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns1 s2 : AffineSubspace k P\np1 p2 : P\nhp1 : p1 ∈ s1\nhp2 : p2 ∈ s2\n⊢ direction (s1 ⊔ s2) ≤ direction s1 ⊔ direction s2 ⊔ Submodule.span k {p2 -ᵥ p1}\n[PROOFSTEP]\nchange (affineSpan k ((s1 : Set P) ∪ s2)).direction ≤ _\n[GOAL]\ncase refine'_1\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns1 s2 : AffineSubspace k P\np1 p2 : P\nhp1 : p1 ∈ s1\nhp2 : p2 ∈ s2\n⊢ direction (affineSpan k (↑s1 ∪ ↑s2)) ≤ direction s1 ⊔ direction s2 ⊔ Submodule.span k {p2 -ᵥ p1}\n[PROOFSTEP]\nrw [← mem_coe] at hp1 \n[GOAL]\ncase refine'_1\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns1 s2 : AffineSubspace k P\np1 p2 : P\nhp1 : p1 ∈ ↑s1\nhp2 : p2 ∈ s2\n⊢ direction (affineSpan k (↑s1 ∪ ↑s2)) ≤ direction s1 ⊔ direction s2 ⊔ Submodule.span k {p2 -ᵥ p1}\n[PROOFSTEP]\nrw [direction_affineSpan, vectorSpan_eq_span_vsub_set_right k (Set.mem_union_left _ hp1), Submodule.span_le]\n[GOAL]\ncase refine'_1\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns1 s2 : AffineSubspace k P\np1 p2 : P\nhp1 : p1 ∈ ↑s1\nhp2 : p2 ∈ s2\n⊢ (fun x => x -ᵥ p1) '' (↑s1 ∪ ↑s2) ⊆ ↑(direction s1 ⊔ direction s2 ⊔ Submodule.span k {p2 -ᵥ p1})\n[PROOFSTEP]\nrintro v ⟨p3, hp3, rfl⟩\n[GOAL]\ncase refine'_1.intro.intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns1 s2 : AffineSubspace k P\np1 p2 : P\nhp1 : p1 ∈ ↑s1\nhp2 : p2 ∈ s2\np3 : P\nhp3 : p3 ∈ ↑s1 ∪ ↑s2\n⊢ (fun x => x -ᵥ p1) p3 ∈ ↑(direction s1 ⊔ direction s2 ⊔ Submodule.span k {p2 -ᵥ p1})\n[PROOFSTEP]\ncases' hp3 with hp3 hp3\n[GOAL]\ncase refine'_1.intro.intro.inl\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns1 s2 : AffineSubspace k P\np1 p2 : P\nhp1 : p1 ∈ ↑s1\nhp2 : p2 ∈ s2\np3 : P\nhp3 : p3 ∈ ↑s1\n⊢ (fun x => x -ᵥ p1) p3 ∈ ↑(direction s1 ⊔ direction s2 ⊔ Submodule.span k {p2 -ᵥ p1})\n[PROOFSTEP]\nrw [sup_assoc, sup_comm, SetLike.mem_coe, Submodule.mem_sup]\n[GOAL]\ncase refine'_1.intro.intro.inl\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns1 s2 : AffineSubspace k P\np1 p2 : P\nhp1 : p1 ∈ ↑s1\nhp2 : p2 ∈ s2\np3 : P\nhp3 : p3 ∈ ↑s1\n⊢ ∃ y, y ∈ direction s2 ⊔ Submodule.span k {p2 -ᵥ p1} ∧ ∃ z, z ∈ direction s1 ∧ y + z = (fun x => x -ᵥ p1) p3\n[PROOFSTEP]\nuse 0, Submodule.zero_mem _, p3 -ᵥ p1, vsub_mem_direction hp3 hp1\n[GOAL]\ncase right\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns1 s2 : AffineSubspace k P\np1 p2 : P\nhp1 : p1 ∈ ↑s1\nhp2 : p2 ∈ s2\np3 : P\nhp3 : p3 ∈ ↑s1\n⊢ 0 + (p3 -ᵥ p1) = (fun x => x -ᵥ p1) p3\n[PROOFSTEP]\nrw [zero_add]\n[GOAL]\ncase refine'_1.intro.intro.inr\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns1 s2 : AffineSubspace k P\np1 p2 : P\nhp1 : p1 ∈ ↑s1\nhp2 : p2 ∈ s2\np3 : P\nhp3 : p3 ∈ ↑s2\n⊢ (fun x => x -ᵥ p1) p3 ∈ ↑(direction s1 ⊔ direction s2 ⊔ Submodule.span k {p2 -ᵥ p1})\n[PROOFSTEP]\nrw [sup_assoc, SetLike.mem_coe, Submodule.mem_sup]\n[GOAL]\ncase refine'_1.intro.intro.inr\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns1 s2 : AffineSubspace k P\np1 p2 : P\nhp1 : p1 ∈ ↑s1\nhp2 : p2 ∈ s2\np3 : P\nhp3 : p3 ∈ ↑s2\n⊢ ∃ y, y ∈ direction s1 ∧ ∃ z, z ∈ direction s2 ⊔ Submodule.span k {p2 -ᵥ p1} ∧ y + z = (fun x => x -ᵥ p1) p3\n[PROOFSTEP]\nuse 0, Submodule.zero_mem _, p3 -ᵥ p1\n[GOAL]\ncase h\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns1 s2 : AffineSubspace k P\np1 p2 : P\nhp1 : p1 ∈ ↑s1\nhp2 : p2 ∈ s2\np3 : P\nhp3 : p3 ∈ ↑s2\n⊢ p3 -ᵥ p1 ∈ direction s2 ⊔ Submodule.span k {p2 -ᵥ p1} ∧ 0 + (p3 -ᵥ p1) = (fun x => x -ᵥ p1) p3\n[PROOFSTEP]\nrw [and_comm, zero_add]\n[GOAL]\ncase h\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns1 s2 : AffineSubspace k P\np1 p2 : P\nhp1 : p1 ∈ ↑s1\nhp2 : p2 ∈ s2\np3 : P\nhp3 : p3 ∈ ↑s2\n⊢ p3 -ᵥ p1 = (fun x => x -ᵥ p1) p3 ∧ p3 -ᵥ p1 ∈ direction s2 ⊔ Submodule.span k {p2 -ᵥ p1}\n[PROOFSTEP]\nuse rfl\n[GOAL]\ncase right\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns1 s2 : AffineSubspace k P\np1 p2 : P\nhp1 : p1 ∈ ↑s1\nhp2 : p2 ∈ s2\np3 : P\nhp3 : p3 ∈ ↑s2\n⊢ p3 -ᵥ p1 ∈ direction s2 ⊔ Submodule.span k {p2 -ᵥ p1}\n[PROOFSTEP]\nrw [← vsub_add_vsub_cancel p3 p2 p1, Submodule.mem_sup]\n[GOAL]\ncase right\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns1 s2 : AffineSubspace k P\np1 p2 : P\nhp1 : p1 ∈ ↑s1\nhp2 : p2 ∈ s2\np3 : P\nhp3 : p3 ∈ ↑s2\n⊢ ∃ y, y ∈ direction s2 ∧ ∃ z, z ∈ Submodule.span k {p2 -ᵥ p1} ∧ y + z = p3 -ᵥ p2 + (p2 -ᵥ p1)\n[PROOFSTEP]\nuse p3 -ᵥ p2, vsub_mem_direction hp3 hp2, p2 -ᵥ p1, Submodule.mem_span_singleton_self _\n[GOAL]\ncase refine'_2\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns1 s2 : AffineSubspace k P\np1 p2 : P\nhp1 : p1 ∈ s1\nhp2 : p2 ∈ s2\n⊢ direction s1 ⊔ direction s2 ⊔ Submodule.span k {p2 -ᵥ p1} ≤ direction (s1 ⊔ s2)\n[PROOFSTEP]\nrefine' sup_le (sup_direction_le _ _) _\n[GOAL]\ncase refine'_2\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns1 s2 : AffineSubspace k P\np1 p2 : P\nhp1 : p1 ∈ s1\nhp2 : p2 ∈ s2\n⊢ Submodule.span k {p2 -ᵥ p1} ≤ direction (s1 ⊔ s2)\n[PROOFSTEP]\nrw [direction_eq_vectorSpan, vectorSpan_def]\n[GOAL]\ncase refine'_2\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns1 s2 : AffineSubspace k P\np1 p2 : P\nhp1 : p1 ∈ s1\nhp2 : p2 ∈ s2\n⊢ Submodule.span k {p2 -ᵥ p1} ≤ Submodule.span k (↑(s1 ⊔ s2) -ᵥ ↑(s1 ⊔ s2))\n[PROOFSTEP]\nexact\n  sInf_le_sInf fun p hp =>\n    Set.Subset.trans\n      (Set.singleton_subset_iff.2\n        (vsub_mem_vsub (mem_spanPoints k p2 _ (Set.mem_union_right _ hp2))\n          (mem_spanPoints k p1 _ (Set.mem_union_left _ hp1))))\n      hp\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\np1 p2 : P\nhp1 : p1 ∈ s\n⊢ direction (affineSpan k (insert p2 ↑s)) = Submodule.span k {p2 -ᵥ p1} ⊔ direction s\n[PROOFSTEP]\nrw [sup_comm, ← Set.union_singleton, ← coe_affineSpan_singleton k V p2]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\np1 p2 : P\nhp1 : p1 ∈ s\n⊢ direction (affineSpan k (↑s ∪ ↑(affineSpan k {p2}))) = direction s ⊔ Submodule.span k {p2 -ᵥ p1}\n[PROOFSTEP]\nchange (s ⊔ affineSpan k { p2 }).direction = _\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\np1 p2 : P\nhp1 : p1 ∈ s\n⊢ direction (s ⊔ affineSpan k {p2}) = direction s ⊔ Submodule.span k {p2 -ᵥ p1}\n[PROOFSTEP]\nrw [direction_sup hp1 (mem_affineSpan k (Set.mem_singleton _)), direction_affineSpan]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\np1 p2 : P\nhp1 : p1 ∈ s\n⊢ direction s ⊔ vectorSpan k {p2} ⊔ Submodule.span k {p2 -ᵥ p1} = direction s ⊔ Submodule.span k {p2 -ᵥ p1}\n[PROOFSTEP]\nsimp\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\np1 : P\nhp1 : p1 ∈ s\np2 p : P\n⊢ p ∈ affineSpan k (insert p2 ↑s) ↔ ∃ r p0 _hp0, p = r • (p2 -ᵥ p1) +ᵥ p0\n[PROOFSTEP]\nrw [← mem_coe] at hp1 \n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\np1 : P\nhp1 : p1 ∈ ↑s\np2 p : P\n⊢ p ∈ affineSpan k (insert p2 ↑s) ↔ ∃ r p0 _hp0, p = r • (p2 -ᵥ p1) +ᵥ p0\n[PROOFSTEP]\nrw [← vsub_right_mem_direction_iff_mem (mem_affineSpan k (Set.mem_insert_of_mem _ hp1)),\n  direction_affineSpan_insert hp1, Submodule.mem_sup]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\np1 : P\nhp1 : p1 ∈ ↑s\np2 p : P\n⊢ (∃ y, y ∈ Submodule.span k {p2 -ᵥ p1} ∧ ∃ z, z ∈ direction s ∧ y + z = p -ᵥ p1) ↔\n    ∃ r p0 _hp0, p = r • (p2 -ᵥ p1) +ᵥ p0\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\np1 : P\nhp1 : p1 ∈ ↑s\np2 p : P\n⊢ (∃ y, y ∈ Submodule.span k {p2 -ᵥ p1} ∧ ∃ z, z ∈ direction s ∧ y + z = p -ᵥ p1) →\n    ∃ r p0 _hp0, p = r • (p2 -ᵥ p1) +ᵥ p0\n[PROOFSTEP]\nrintro ⟨v1, hv1, v2, hv2, hp⟩\n[GOAL]\ncase mp.intro.intro.intro.intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\np1 : P\nhp1 : p1 ∈ ↑s\np2 p : P\nv1 : V\nhv1 : v1 ∈ Submodule.span k {p2 -ᵥ p1}\nv2 : V\nhv2 : v2 ∈ direction s\nhp : v1 + v2 = p -ᵥ p1\n⊢ ∃ r p0 _hp0, p = r • (p2 -ᵥ p1) +ᵥ p0\n[PROOFSTEP]\nrw [Submodule.mem_span_singleton] at hv1 \n[GOAL]\ncase mp.intro.intro.intro.intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\np1 : P\nhp1 : p1 ∈ ↑s\np2 p : P\nv1 : V\nhv1 : ∃ a, a • (p2 -ᵥ p1) = v1\nv2 : V\nhv2 : v2 ∈ direction s\nhp : v1 + v2 = p -ᵥ p1\n⊢ ∃ r p0 _hp0, p = r • (p2 -ᵥ p1) +ᵥ p0\n[PROOFSTEP]\nrcases hv1 with ⟨r, rfl⟩\n[GOAL]\ncase mp.intro.intro.intro.intro.intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\np1 : P\nhp1 : p1 ∈ ↑s\np2 p : P\nv2 : V\nhv2 : v2 ∈ direction s\nr : k\nhp : r • (p2 -ᵥ p1) + v2 = p -ᵥ p1\n⊢ ∃ r p0 _hp0, p = r • (p2 -ᵥ p1) +ᵥ p0\n[PROOFSTEP]\nuse r, v2 +ᵥ p1, vadd_mem_of_mem_direction hv2 hp1\n[GOAL]\ncase h\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\np1 : P\nhp1 : p1 ∈ ↑s\np2 p : P\nv2 : V\nhv2 : v2 ∈ direction s\nr : k\nhp : r • (p2 -ᵥ p1) + v2 = p -ᵥ p1\n⊢ p = r • (p2 -ᵥ p1) +ᵥ (v2 +ᵥ p1)\n[PROOFSTEP]\nsymm at hp \n[GOAL]\ncase h\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\np1 : P\nhp1 : p1 ∈ ↑s\np2 p : P\nv2 : V\nhv2 : v2 ∈ direction s\nr : k\nhp : p -ᵥ p1 = r • (p2 -ᵥ p1) + v2\n⊢ p = r • (p2 -ᵥ p1) +ᵥ (v2 +ᵥ p1)\n[PROOFSTEP]\nrw [← sub_eq_zero, ← vsub_vadd_eq_vsub_sub, vsub_eq_zero_iff_eq] at hp \n[GOAL]\ncase h\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\np1 : P\nhp1 : p1 ∈ ↑s\np2 p : P\nv2 : V\nhv2 : v2 ∈ direction s\nr : k\nhp✝ : p -ᵥ p1 = r • (p2 -ᵥ p1) + v2\nhp : p = r • (p2 -ᵥ p1) + v2 +ᵥ p1\n⊢ p = r • (p2 -ᵥ p1) +ᵥ (v2 +ᵥ p1)\n[PROOFSTEP]\nrw [hp, vadd_vadd]\n[GOAL]\ncase mpr\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\np1 : P\nhp1 : p1 ∈ ↑s\np2 p : P\n⊢ (∃ r p0 _hp0, p = r • (p2 -ᵥ p1) +ᵥ p0) →\n    ∃ y, y ∈ Submodule.span k {p2 -ᵥ p1} ∧ ∃ z, z ∈ direction s ∧ y + z = p -ᵥ p1\n[PROOFSTEP]\nrintro ⟨r, p3, hp3, rfl⟩\n[GOAL]\ncase mpr.intro.intro.intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\np1 : P\nhp1 : p1 ∈ ↑s\np2 : P\nr : k\np3 : P\nhp3 : p3 ∈ s\n⊢ ∃ y, y ∈ Submodule.span k {p2 -ᵥ p1} ∧ ∃ z, z ∈ direction s ∧ y + z = r • (p2 -ᵥ p1) +ᵥ p3 -ᵥ p1\n[PROOFSTEP]\nuse r • (p2 -ᵥ p1), Submodule.mem_span_singleton.2 ⟨r, rfl⟩, p3 -ᵥ p1, vsub_mem_direction hp3 hp1\n[GOAL]\ncase right\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\np1 : P\nhp1 : p1 ∈ ↑s\np2 : P\nr : k\np3 : P\nhp3 : p3 ∈ s\n⊢ r • (p2 -ᵥ p1) + (p3 -ᵥ p1) = r • (p2 -ᵥ p1) +ᵥ p3 -ᵥ p1\n[PROOFSTEP]\nrw [vadd_vsub_assoc, add_comm]\n[GOAL]\nk : Type u_1\nV₁ : Type u_2\nP₁ : Type u_3\nV₂ : Type u_4\nP₂ : Type u_5\nV₃ : Type u_6\nP₃ : Type u_7\ninst✝⁹ : Ring k\ninst✝⁸ : AddCommGroup V₁\ninst✝⁷ : Module k V₁\ninst✝⁶ : AffineSpace V₁ P₁\ninst✝⁵ : AddCommGroup V₂\ninst✝⁴ : Module k V₂\ninst✝³ : AffineSpace V₂ P₂\ninst✝² : AddCommGroup V₃\ninst✝¹ : Module k V₃\ninst✝ : AffineSpace V₃ P₃\nf : P₁ →ᵃ[k] P₂\ns : Set P₁\n⊢ Submodule.map f.linear (vectorSpan k s) = vectorSpan k (↑f '' s)\n[PROOFSTEP]\nrw [vectorSpan_def, vectorSpan_def, f.image_vsub_image, Submodule.span_image]\n  -- porting note: Lean unfolds things too far with `simp` here.\n[GOAL]\nk : Type u_1\nV₁ : Type u_2\nP₁ : Type u_3\nV₂ : Type u_4\nP₂ : Type u_5\nV₃ : Type u_6\nP₃ : Type u_7\ninst✝⁹ : Ring k\ninst✝⁸ : AddCommGroup V₁\ninst✝⁷ : Module k V₁\ninst✝⁶ : AffineSpace V₁ P₁\ninst✝⁵ : AddCommGroup V₂\ninst✝⁴ : Module k V₂\ninst✝³ : AffineSpace V₂ P₂\ninst✝² : AddCommGroup V₃\ninst✝¹ : Module k V₃\ninst✝ : AffineSpace V₃ P₃\nf : P₁ →ᵃ[k] P₂\ns : AffineSubspace k P₁\n⊢ ∀ (c : k) {p1 p2 p3 : P₂}, p1 ∈ ↑f '' ↑s → p2 ∈ ↑f '' ↑s → p3 ∈ ↑f '' ↑s → c • (p1 -ᵥ p2) +ᵥ p3 ∈ ↑f '' ↑s\n[PROOFSTEP]\nrintro t - - - ⟨p₁, h₁, rfl⟩ ⟨p₂, h₂, rfl⟩ ⟨p₃, h₃, rfl⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nk : Type u_1\nV₁ : Type u_2\nP₁ : Type u_3\nV₂ : Type u_4\nP₂ : Type u_5\nV₃ : Type u_6\nP₃ : Type u_7\ninst✝⁹ : Ring k\ninst✝⁸ : AddCommGroup V₁\ninst✝⁷ : Module k V₁\ninst✝⁶ : AffineSpace V₁ P₁\ninst✝⁵ : AddCommGroup V₂\ninst✝⁴ : Module k V₂\ninst✝³ : AffineSpace V₂ P₂\ninst✝² : AddCommGroup V₃\ninst✝¹ : Module k V₃\ninst✝ : AffineSpace V₃ P₃\nf : P₁ →ᵃ[k] P₂\ns : AffineSubspace k P₁\nt : k\np₁ : P₁\nh₁ : p₁ ∈ ↑s\np₂ : P₁\nh₂ : p₂ ∈ ↑s\np₃ : P₁\nh₃ : p₃ ∈ ↑s\n⊢ t • (↑f p₁ -ᵥ ↑f p₂) +ᵥ ↑f p₃ ∈ ↑f '' ↑s\n[PROOFSTEP]\nuse t • (p₁ -ᵥ p₂) +ᵥ p₃\n[GOAL]\ncase h\nk : Type u_1\nV₁ : Type u_2\nP₁ : Type u_3\nV₂ : Type u_4\nP₂ : Type u_5\nV₃ : Type u_6\nP₃ : Type u_7\ninst✝⁹ : Ring k\ninst✝⁸ : AddCommGroup V₁\ninst✝⁷ : Module k V₁\ninst✝⁶ : AffineSpace V₁ P₁\ninst✝⁵ : AddCommGroup V₂\ninst✝⁴ : Module k V₂\ninst✝³ : AffineSpace V₂ P₂\ninst✝² : AddCommGroup V₃\ninst✝¹ : Module k V₃\ninst✝ : AffineSpace V₃ P₃\nf : P₁ →ᵃ[k] P₂\ns : AffineSubspace k P₁\nt : k\np₁ : P₁\nh₁ : p₁ ∈ ↑s\np₂ : P₁\nh₂ : p₂ ∈ ↑s\np₃ : P₁\nh₃ : p₃ ∈ ↑s\n⊢ t • (p₁ -ᵥ p₂) +ᵥ p₃ ∈ ↑s ∧ ↑f (t • (p₁ -ᵥ p₂) +ᵥ p₃) = t • (↑f p₁ -ᵥ ↑f p₂) +ᵥ ↑f p₃\n[PROOFSTEP]\nsuffices t • (p₁ -ᵥ p₂) +ᵥ p₃ ∈ s by {\n  simp only [SetLike.mem_coe, true_and, this]\n  rw [AffineMap.map_vadd, map_smul, AffineMap.linearMap_vsub]\n}\n[GOAL]\nk : Type u_1\nV₁ : Type u_2\nP₁ : Type u_3\nV₂ : Type u_4\nP₂ : Type u_5\nV₃ : Type u_6\nP₃ : Type u_7\ninst✝⁹ : Ring k\ninst✝⁸ : AddCommGroup V₁\ninst✝⁷ : Module k V₁\ninst✝⁶ : AffineSpace V₁ P₁\ninst✝⁵ : AddCommGroup V₂\ninst✝⁴ : Module k V₂\ninst✝³ : AffineSpace V₂ P₂\ninst✝² : AddCommGroup V₃\ninst✝¹ : Module k V₃\ninst✝ : AffineSpace V₃ P₃\nf : P₁ →ᵃ[k] P₂\ns : AffineSubspace k P₁\nt : k\np₁ : P₁\nh₁ : p₁ ∈ ↑s\np₂ : P₁\nh₂ : p₂ ∈ ↑s\np₃ : P₁\nh₃ : p₃ ∈ ↑s\nthis : t • (p₁ -ᵥ p₂) +ᵥ p₃ ∈ s\n⊢ t • (p₁ -ᵥ p₂) +ᵥ p₃ ∈ ↑s ∧ ↑f (t • (p₁ -ᵥ p₂) +ᵥ p₃) = t • (↑f p₁ -ᵥ ↑f p₂) +ᵥ ↑f p₃\n[PROOFSTEP]\n{ simp only [SetLike.mem_coe, true_and, this]\n  rw [AffineMap.map_vadd, map_smul, AffineMap.linearMap_vsub]\n}\n[GOAL]\nk : Type u_1\nV₁ : Type u_2\nP₁ : Type u_3\nV₂ : Type u_4\nP₂ : Type u_5\nV₃ : Type u_6\nP₃ : Type u_7\ninst✝⁹ : Ring k\ninst✝⁸ : AddCommGroup V₁\ninst✝⁷ : Module k V₁\ninst✝⁶ : AffineSpace V₁ P₁\ninst✝⁵ : AddCommGroup V₂\ninst✝⁴ : Module k V₂\ninst✝³ : AffineSpace V₂ P₂\ninst✝² : AddCommGroup V₃\ninst✝¹ : Module k V₃\ninst✝ : AffineSpace V₃ P₃\nf : P₁ →ᵃ[k] P₂\ns : AffineSubspace k P₁\nt : k\np₁ : P₁\nh₁ : p₁ ∈ ↑s\np₂ : P₁\nh₂ : p₂ ∈ ↑s\np₃ : P₁\nh₃ : p₃ ∈ ↑s\nthis : t • (p₁ -ᵥ p₂) +ᵥ p₃ ∈ s\n⊢ t • (p₁ -ᵥ p₂) +ᵥ p₃ ∈ ↑s ∧ ↑f (t • (p₁ -ᵥ p₂) +ᵥ p₃) = t • (↑f p₁ -ᵥ ↑f p₂) +ᵥ ↑f p₃\n[PROOFSTEP]\nsimp only [SetLike.mem_coe, true_and, this]\n[GOAL]\nk : Type u_1\nV₁ : Type u_2\nP₁ : Type u_3\nV₂ : Type u_4\nP₂ : Type u_5\nV₃ : Type u_6\nP₃ : Type u_7\ninst✝⁹ : Ring k\ninst✝⁸ : AddCommGroup V₁\ninst✝⁷ : Module k V₁\ninst✝⁶ : AffineSpace V₁ P₁\ninst✝⁵ : AddCommGroup V₂\ninst✝⁴ : Module k V₂\ninst✝³ : AffineSpace V₂ P₂\ninst✝² : AddCommGroup V₃\ninst✝¹ : Module k V₃\ninst✝ : AffineSpace V₃ P₃\nf : P₁ →ᵃ[k] P₂\ns : AffineSubspace k P₁\nt : k\np₁ : P₁\nh₁ : p₁ ∈ ↑s\np₂ : P₁\nh₂ : p₂ ∈ ↑s\np₃ : P₁\nh₃ : p₃ ∈ ↑s\nthis : t • (p₁ -ᵥ p₂) +ᵥ p₃ ∈ s\n⊢ ↑f (t • (p₁ -ᵥ p₂) +ᵥ p₃) = t • (↑f p₁ -ᵥ ↑f p₂) +ᵥ ↑f p₃\n[PROOFSTEP]\nrw [AffineMap.map_vadd, map_smul, AffineMap.linearMap_vsub]\n[GOAL]\ncase h\nk : Type u_1\nV₁ : Type u_2\nP₁ : Type u_3\nV₂ : Type u_4\nP₂ : Type u_5\nV₃ : Type u_6\nP₃ : Type u_7\ninst✝⁹ : Ring k\ninst✝⁸ : AddCommGroup V₁\ninst✝⁷ : Module k V₁\ninst✝⁶ : AffineSpace V₁ P₁\ninst✝⁵ : AddCommGroup V₂\ninst✝⁴ : Module k V₂\ninst✝³ : AffineSpace V₂ P₂\ninst✝² : AddCommGroup V₃\ninst✝¹ : Module k V₃\ninst✝ : AffineSpace V₃ P₃\nf : P₁ →ᵃ[k] P₂\ns : AffineSubspace k P₁\nt : k\np₁ : P₁\nh₁ : p₁ ∈ ↑s\np₂ : P₁\nh₂ : p₂ ∈ ↑s\np₃ : P₁\nh₃ : p₃ ∈ ↑s\n⊢ t • (p₁ -ᵥ p₂) +ᵥ p₃ ∈ s\n[PROOFSTEP]\nexact s.smul_vsub_vadd_mem t h₁ h₂ h₃\n[GOAL]\nk : Type u_1\nV₁ : Type u_2\nP₁ : Type u_3\nV₂ : Type u_4\nP₂ : Type u_5\nV₃ : Type u_6\nP₃ : Type u_7\ninst✝⁹ : Ring k\ninst✝⁸ : AddCommGroup V₁\ninst✝⁷ : Module k V₁\ninst✝⁶ : AffineSpace V₁ P₁\ninst✝⁵ : AddCommGroup V₂\ninst✝⁴ : Module k V₂\ninst✝³ : AffineSpace V₂ P₂\ninst✝² : AddCommGroup V₃\ninst✝¹ : Module k V₃\ninst✝ : AffineSpace V₃ P₃\nf✝ f : P₁ →ᵃ[k] P₂\nx : P₂\ns : AffineSubspace k P₁\n⊢ x ∈ map f s ↔ ∃ y, y ∈ s ∧ ↑f y = x\n[PROOFSTEP]\nsimpa only [bex_def] using mem_image_iff_bex\n[GOAL]\nk : Type u_1\nV₁ : Type u_2\nP₁ : Type u_3\nV₂ : Type u_4\nP₂ : Type u_5\nV₃ : Type u_6\nP₃ : Type u_7\ninst✝⁹ : Ring k\ninst✝⁸ : AddCommGroup V₁\ninst✝⁷ : Module k V₁\ninst✝⁶ : AffineSpace V₁ P₁\ninst✝⁵ : AddCommGroup V₂\ninst✝⁴ : Module k V₂\ninst✝³ : AffineSpace V₂ P₂\ninst✝² : AddCommGroup V₃\ninst✝¹ : Module k V₃\ninst✝ : AffineSpace V₃ P₃\nf : P₁ →ᵃ[k] P₂\ns : AffineSubspace k P₁\n⊢ map f s = ⊥ ↔ s = ⊥\n[PROOFSTEP]\nrefine' ⟨fun h => _, fun h => _⟩\n[GOAL]\ncase refine'_1\nk : Type u_1\nV₁ : Type u_2\nP₁ : Type u_3\nV₂ : Type u_4\nP₂ : Type u_5\nV₃ : Type u_6\nP₃ : Type u_7\ninst✝⁹ : Ring k\ninst✝⁸ : AddCommGroup V₁\ninst✝⁷ : Module k V₁\ninst✝⁶ : AffineSpace V₁ P₁\ninst✝⁵ : AddCommGroup V₂\ninst✝⁴ : Module k V₂\ninst✝³ : AffineSpace V₂ P₂\ninst✝² : AddCommGroup V₃\ninst✝¹ : Module k V₃\ninst✝ : AffineSpace V₃ P₃\nf : P₁ →ᵃ[k] P₂\ns : AffineSubspace k P₁\nh : map f s = ⊥\n⊢ s = ⊥\n[PROOFSTEP]\nrwa [← coe_eq_bot_iff, coe_map, image_eq_empty, coe_eq_bot_iff] at h \n[GOAL]\ncase refine'_2\nk : Type u_1\nV₁ : Type u_2\nP₁ : Type u_3\nV₂ : Type u_4\nP₂ : Type u_5\nV₃ : Type u_6\nP₃ : Type u_7\ninst✝⁹ : Ring k\ninst✝⁸ : AddCommGroup V₁\ninst✝⁷ : Module k V₁\ninst✝⁶ : AffineSpace V₁ P₁\ninst✝⁵ : AddCommGroup V₂\ninst✝⁴ : Module k V₂\ninst✝³ : AffineSpace V₂ P₂\ninst✝² : AddCommGroup V₃\ninst✝¹ : Module k V₃\ninst✝ : AffineSpace V₃ P₃\nf : P₁ →ᵃ[k] P₂\ns : AffineSubspace k P₁\nh : s = ⊥\n⊢ map f s = ⊥\n[PROOFSTEP]\nrw [h, map_bot]\n[GOAL]\nk : Type u_1\nV₁ : Type u_2\nP₁ : Type u_3\nV₂ : Type u_4\nP₂ : Type u_5\nV₃ : Type u_6\nP₃ : Type u_7\ninst✝⁹ : Ring k\ninst✝⁸ : AddCommGroup V₁\ninst✝⁷ : Module k V₁\ninst✝⁶ : AffineSpace V₁ P₁\ninst✝⁵ : AddCommGroup V₂\ninst✝⁴ : Module k V₂\ninst✝³ : AffineSpace V₂ P₂\ninst✝² : AddCommGroup V₃\ninst✝¹ : Module k V₃\ninst✝ : AffineSpace V₃ P₃\nf : P₁ →ᵃ[k] P₂\ns : AffineSubspace k P₁\n⊢ direction (map f s) = Submodule.map f.linear (direction s)\n[PROOFSTEP]\nrw [direction_eq_vectorSpan, direction_eq_vectorSpan, coe_map, AffineMap.vectorSpan_image_eq_submodule_map]\n  -- porting note: again, Lean unfolds too aggressively with `simp`\n[GOAL]\nk : Type u_1\nV₁ : Type u_2\nP₁ : Type u_3\nV₂ : Type u_4\nP₂ : Type u_5\nV₃ : Type u_6\nP₃ : Type u_7\ninst✝⁹ : Ring k\ninst✝⁸ : AddCommGroup V₁\ninst✝⁷ : Module k V₁\ninst✝⁶ : AffineSpace V₁ P₁\ninst✝⁵ : AddCommGroup V₂\ninst✝⁴ : Module k V₂\ninst✝³ : AffineSpace V₂ P₂\ninst✝² : AddCommGroup V₃\ninst✝¹ : Module k V₃\ninst✝ : AffineSpace V₃ P₃\nf : P₁ →ᵃ[k] P₂\ns : Set P₁\n⊢ map f (affineSpan k s) = affineSpan k (↑f '' s)\n[PROOFSTEP]\nrcases s.eq_empty_or_nonempty with (rfl | ⟨p, hp⟩)\n[GOAL]\ncase inl\nk : Type u_1\nV₁ : Type u_2\nP₁ : Type u_3\nV₂ : Type u_4\nP₂ : Type u_5\nV₃ : Type u_6\nP₃ : Type u_7\ninst✝⁹ : Ring k\ninst✝⁸ : AddCommGroup V₁\ninst✝⁷ : Module k V₁\ninst✝⁶ : AffineSpace V₁ P₁\ninst✝⁵ : AddCommGroup V₂\ninst✝⁴ : Module k V₂\ninst✝³ : AffineSpace V₂ P₂\ninst✝² : AddCommGroup V₃\ninst✝¹ : Module k V₃\ninst✝ : AffineSpace V₃ P₃\nf : P₁ →ᵃ[k] P₂\n⊢ map f (affineSpan k ∅) = affineSpan k (↑f '' ∅)\n[PROOFSTEP]\nrw [image_empty, span_empty, span_empty, map_bot]\n  -- porting note: I don't know exactly why this `simp` was broken.\n[GOAL]\ncase inr.intro\nk : Type u_1\nV₁ : Type u_2\nP₁ : Type u_3\nV₂ : Type u_4\nP₂ : Type u_5\nV₃ : Type u_6\nP₃ : Type u_7\ninst✝⁹ : Ring k\ninst✝⁸ : AddCommGroup V₁\ninst✝⁷ : Module k V₁\ninst✝⁶ : AffineSpace V₁ P₁\ninst✝⁵ : AddCommGroup V₂\ninst✝⁴ : Module k V₂\ninst✝³ : AffineSpace V₂ P₂\ninst✝² : AddCommGroup V₃\ninst✝¹ : Module k V₃\ninst✝ : AffineSpace V₃ P₃\nf : P₁ →ᵃ[k] P₂\ns : Set P₁\np : P₁\nhp : p ∈ s\n⊢ map f (affineSpan k s) = affineSpan k (↑f '' s)\n[PROOFSTEP]\napply ext_of_direction_eq\n[GOAL]\ncase inr.intro.hd\nk : Type u_1\nV₁ : Type u_2\nP₁ : Type u_3\nV₂ : Type u_4\nP₂ : Type u_5\nV₃ : Type u_6\nP₃ : Type u_7\ninst✝⁹ : Ring k\ninst✝⁸ : AddCommGroup V₁\ninst✝⁷ : Module k V₁\ninst✝⁶ : AffineSpace V₁ P₁\ninst✝⁵ : AddCommGroup V₂\ninst✝⁴ : Module k V₂\ninst✝³ : AffineSpace V₂ P₂\ninst✝² : AddCommGroup V₃\ninst✝¹ : Module k V₃\ninst✝ : AffineSpace V₃ P₃\nf : P₁ →ᵃ[k] P₂\ns : Set P₁\np : P₁\nhp : p ∈ s\n⊢ direction (map f (affineSpan k s)) = direction (affineSpan k (↑f '' s))\n[PROOFSTEP]\nsimp [direction_affineSpan]\n[GOAL]\ncase inr.intro.hn\nk : Type u_1\nV₁ : Type u_2\nP₁ : Type u_3\nV₂ : Type u_4\nP₂ : Type u_5\nV₃ : Type u_6\nP₃ : Type u_7\ninst✝⁹ : Ring k\ninst✝⁸ : AddCommGroup V₁\ninst✝⁷ : Module k V₁\ninst✝⁶ : AffineSpace V₁ P₁\ninst✝⁵ : AddCommGroup V₂\ninst✝⁴ : Module k V₂\ninst✝³ : AffineSpace V₂ P₂\ninst✝² : AddCommGroup V₃\ninst✝¹ : Module k V₃\ninst✝ : AffineSpace V₃ P₃\nf : P₁ →ᵃ[k] P₂\ns : Set P₁\np : P₁\nhp : p ∈ s\n⊢ Set.Nonempty (↑(map f (affineSpan k s)) ∩ ↑(affineSpan k (↑f '' s)))\n[PROOFSTEP]\nexact ⟨f p, mem_image_of_mem f (subset_affineSpan k _ hp), subset_affineSpan k _ (mem_image_of_mem f hp)⟩\n[GOAL]\nk : Type u_1\nV₁ : Type u_2\nP₁ : Type u_3\nV₂ : Type u_4\nP₂ : Type u_5\nV₃ : Type u_6\nP₃ : Type u_7\ninst✝⁹ : Ring k\ninst✝⁸ : AddCommGroup V₁\ninst✝⁷ : Module k V₁\ninst✝⁶ : AffineSpace V₁ P₁\ninst✝⁵ : AddCommGroup V₂\ninst✝⁴ : Module k V₂\ninst✝³ : AffineSpace V₂ P₂\ninst✝² : AddCommGroup V₃\ninst✝¹ : Module k V₃\ninst✝ : AffineSpace V₃ P₃\nf : P₁ →ᵃ[k] P₂\nhf : Function.Surjective ↑f\n⊢ AffineSubspace.map f ⊤ = ⊤\n[PROOFSTEP]\nrw [← AffineSubspace.ext_iff]\n[GOAL]\nk : Type u_1\nV₁ : Type u_2\nP₁ : Type u_3\nV₂ : Type u_4\nP₂ : Type u_5\nV₃ : Type u_6\nP₃ : Type u_7\ninst✝⁹ : Ring k\ninst✝⁸ : AddCommGroup V₁\ninst✝⁷ : Module k V₁\ninst✝⁶ : AffineSpace V₁ P₁\ninst✝⁵ : AddCommGroup V₂\ninst✝⁴ : Module k V₂\ninst✝³ : AffineSpace V₂ P₂\ninst✝² : AddCommGroup V₃\ninst✝¹ : Module k V₃\ninst✝ : AffineSpace V₃ P₃\nf : P₁ →ᵃ[k] P₂\nhf : Function.Surjective ↑f\n⊢ ↑(AffineSubspace.map f ⊤) = ↑⊤\n[PROOFSTEP]\nexact image_univ_of_surjective hf\n[GOAL]\nk : Type u_1\nV₁ : Type u_2\nP₁ : Type u_3\nV₂ : Type u_4\nP₂ : Type u_5\nV₃ : Type u_6\nP₃ : Type u_7\ninst✝⁹ : Ring k\ninst✝⁸ : AddCommGroup V₁\ninst✝⁷ : Module k V₁\ninst✝⁶ : AffineSpace V₁ P₁\ninst✝⁵ : AddCommGroup V₂\ninst✝⁴ : Module k V₂\ninst✝³ : AffineSpace V₂ P₂\ninst✝² : AddCommGroup V₃\ninst✝¹ : Module k V₃\ninst✝ : AffineSpace V₃ P₃\nf : P₁ →ᵃ[k] P₂\ns : Set P₁\nhf : Function.Surjective ↑f\nh : affineSpan k s = ⊤\n⊢ affineSpan k (↑f '' s) = ⊤\n[PROOFSTEP]\nrw [← AffineSubspace.map_span, h, map_top_of_surjective f hf]\n[GOAL]\nk : Type u_1\nV₁ : Type u_2\nP₁ : Type u_3\nV₂ : Type u_4\nP₂ : Type u_5\nV₃ : Type u_6\nP₃ : Type u_7\ninst✝⁹ : Ring k\ninst✝⁸ : AddCommGroup V₁\ninst✝⁷ : Module k V₁\ninst✝⁶ : AffineSpace V₁ P₁\ninst✝⁵ : AddCommGroup V₂\ninst✝⁴ : Module k V₂\ninst✝³ : AffineSpace V₂ P₂\ninst✝² : AddCommGroup V₃\ninst✝¹ : Module k V₃\ninst✝ : AffineSpace V₃ P₃\nf : P₁ →ᵃ[k] P₂\ns : Set P₁\ne : P₁ ≃ᵃ[k] P₂\n⊢ affineSpan k s = ⊤ ↔ affineSpan k (↑e '' s) = ⊤\n[PROOFSTEP]\nrefine' ⟨(e : P₁ →ᵃ[k] P₂).span_eq_top_of_surjective e.surjective, _⟩\n[GOAL]\nk : Type u_1\nV₁ : Type u_2\nP₁ : Type u_3\nV₂ : Type u_4\nP₂ : Type u_5\nV₃ : Type u_6\nP₃ : Type u_7\ninst✝⁹ : Ring k\ninst✝⁸ : AddCommGroup V₁\ninst✝⁷ : Module k V₁\ninst✝⁶ : AffineSpace V₁ P₁\ninst✝⁵ : AddCommGroup V₂\ninst✝⁴ : Module k V₂\ninst✝³ : AffineSpace V₂ P₂\ninst✝² : AddCommGroup V₃\ninst✝¹ : Module k V₃\ninst✝ : AffineSpace V₃ P₃\nf : P₁ →ᵃ[k] P₂\ns : Set P₁\ne : P₁ ≃ᵃ[k] P₂\n⊢ affineSpan k (↑e '' s) = ⊤ → affineSpan k s = ⊤\n[PROOFSTEP]\nintro h\n[GOAL]\nk : Type u_1\nV₁ : Type u_2\nP₁ : Type u_3\nV₂ : Type u_4\nP₂ : Type u_5\nV₃ : Type u_6\nP₃ : Type u_7\ninst✝⁹ : Ring k\ninst✝⁸ : AddCommGroup V₁\ninst✝⁷ : Module k V₁\ninst✝⁶ : AffineSpace V₁ P₁\ninst✝⁵ : AddCommGroup V₂\ninst✝⁴ : Module k V₂\ninst✝³ : AffineSpace V₂ P₂\ninst✝² : AddCommGroup V₃\ninst✝¹ : Module k V₃\ninst✝ : AffineSpace V₃ P₃\nf : P₁ →ᵃ[k] P₂\ns : Set P₁\ne : P₁ ≃ᵃ[k] P₂\nh : affineSpan k (↑e '' s) = ⊤\n⊢ affineSpan k s = ⊤\n[PROOFSTEP]\nhave : s = e.symm '' (e '' s) := by rw [← image_comp]; simp\n[GOAL]\nk : Type u_1\nV₁ : Type u_2\nP₁ : Type u_3\nV₂ : Type u_4\nP₂ : Type u_5\nV₃ : Type u_6\nP₃ : Type u_7\ninst✝⁹ : Ring k\ninst✝⁸ : AddCommGroup V₁\ninst✝⁷ : Module k V₁\ninst✝⁶ : AffineSpace V₁ P₁\ninst✝⁵ : AddCommGroup V₂\ninst✝⁴ : Module k V₂\ninst✝³ : AffineSpace V₂ P₂\ninst✝² : AddCommGroup V₃\ninst✝¹ : Module k V₃\ninst✝ : AffineSpace V₃ P₃\nf : P₁ →ᵃ[k] P₂\ns : Set P₁\ne : P₁ ≃ᵃ[k] P₂\nh : affineSpan k (↑e '' s) = ⊤\n⊢ s = ↑(symm e) '' (↑e '' s)\n[PROOFSTEP]\nrw [← image_comp]\n[GOAL]\nk : Type u_1\nV₁ : Type u_2\nP₁ : Type u_3\nV₂ : Type u_4\nP₂ : Type u_5\nV₃ : Type u_6\nP₃ : Type u_7\ninst✝⁹ : Ring k\ninst✝⁸ : AddCommGroup V₁\ninst✝⁷ : Module k V₁\ninst✝⁶ : AffineSpace V₁ P₁\ninst✝⁵ : AddCommGroup V₂\ninst✝⁴ : Module k V₂\ninst✝³ : AffineSpace V₂ P₂\ninst✝² : AddCommGroup V₃\ninst✝¹ : Module k V₃\ninst✝ : AffineSpace V₃ P₃\nf : P₁ →ᵃ[k] P₂\ns : Set P₁\ne : P₁ ≃ᵃ[k] P₂\nh : affineSpan k (↑e '' s) = ⊤\n⊢ s = ↑(symm e) ∘ ↑e '' s\n[PROOFSTEP]\nsimp\n[GOAL]\nk : Type u_1\nV₁ : Type u_2\nP₁ : Type u_3\nV₂ : Type u_4\nP₂ : Type u_5\nV₃ : Type u_6\nP₃ : Type u_7\ninst✝⁹ : Ring k\ninst✝⁸ : AddCommGroup V₁\ninst✝⁷ : Module k V₁\ninst✝⁶ : AffineSpace V₁ P₁\ninst✝⁵ : AddCommGroup V₂\ninst✝⁴ : Module k V₂\ninst✝³ : AffineSpace V₂ P₂\ninst✝² : AddCommGroup V₃\ninst✝¹ : Module k V₃\ninst✝ : AffineSpace V₃ P₃\nf : P₁ →ᵃ[k] P₂\ns : Set P₁\ne : P₁ ≃ᵃ[k] P₂\nh : affineSpan k (↑e '' s) = ⊤\nthis : s = ↑(symm e) '' (↑e '' s)\n⊢ affineSpan k s = ⊤\n[PROOFSTEP]\nrw [this]\n[GOAL]\nk : Type u_1\nV₁ : Type u_2\nP₁ : Type u_3\nV₂ : Type u_4\nP₂ : Type u_5\nV₃ : Type u_6\nP₃ : Type u_7\ninst✝⁹ : Ring k\ninst✝⁸ : AddCommGroup V₁\ninst✝⁷ : Module k V₁\ninst✝⁶ : AffineSpace V₁ P₁\ninst✝⁵ : AddCommGroup V₂\ninst✝⁴ : Module k V₂\ninst✝³ : AffineSpace V₂ P₂\ninst✝² : AddCommGroup V₃\ninst✝¹ : Module k V₃\ninst✝ : AffineSpace V₃ P₃\nf : P₁ →ᵃ[k] P₂\ns : Set P₁\ne : P₁ ≃ᵃ[k] P₂\nh : affineSpan k (↑e '' s) = ⊤\nthis : s = ↑(symm e) '' (↑e '' s)\n⊢ affineSpan k (↑(symm e) '' (↑e '' s)) = ⊤\n[PROOFSTEP]\nexact (e.symm : P₂ →ᵃ[k] P₁).span_eq_top_of_surjective e.symm.surjective h\n[GOAL]\nk : Type u_1\nV₁ : Type u_2\nP₁ : Type u_3\nV₂ : Type u_4\nP₂ : Type u_5\nV₃ : Type u_6\nP₃ : Type u_7\ninst✝⁹ : Ring k\ninst✝⁸ : AddCommGroup V₁\ninst✝⁷ : Module k V₁\ninst✝⁶ : AffineSpace V₁ P₁\ninst✝⁵ : AddCommGroup V₂\ninst✝⁴ : Module k V₂\ninst✝³ : AffineSpace V₂ P₂\ninst✝² : AddCommGroup V₃\ninst✝¹ : Module k V₃\ninst✝ : AffineSpace V₃ P₃\nf : P₁ →ᵃ[k] P₂\ns : AffineSubspace k P₂\nt : k\np₁ p₂ p₃ : P₁\nhp₁ : ↑f p₁ ∈ s\nhp₂ : ↑f p₂ ∈ s\nhp₃ : ↑f p₃ ∈ s\n⊢ ↑f (t • (p₁ -ᵥ p₂) +ᵥ p₃) ∈ s\n[PROOFSTEP]\nrw [AffineMap.map_vadd, LinearMap.map_smul, AffineMap.linearMap_vsub]\n[GOAL]\nk : Type u_1\nV₁ : Type u_2\nP₁ : Type u_3\nV₂ : Type u_4\nP₂ : Type u_5\nV₃ : Type u_6\nP₃ : Type u_7\ninst✝⁹ : Ring k\ninst✝⁸ : AddCommGroup V₁\ninst✝⁷ : Module k V₁\ninst✝⁶ : AffineSpace V₁ P₁\ninst✝⁵ : AddCommGroup V₂\ninst✝⁴ : Module k V₂\ninst✝³ : AffineSpace V₂ P₂\ninst✝² : AddCommGroup V₃\ninst✝¹ : Module k V₃\ninst✝ : AffineSpace V₃ P₃\nf : P₁ →ᵃ[k] P₂\ns : AffineSubspace k P₂\nt : k\np₁ p₂ p₃ : P₁\nhp₁ : ↑f p₁ ∈ s\nhp₂ : ↑f p₂ ∈ s\nhp₃ : ↑f p₃ ∈ s\n⊢ t • (↑f p₁ -ᵥ ↑f p₂) +ᵥ ↑f p₃ ∈ s\n[PROOFSTEP]\napply s.smul_vsub_vadd_mem _ hp₁ hp₂ hp₃\n[GOAL]\nk : Type u_1\nV₁ : Type u_2\nP₁ : Type u_3\nV₂ : Type u_4\nP₂ : Type u_5\nV₃ : Type u_6\nP₃ : Type u_7\ninst✝⁹ : Ring k\ninst✝⁸ : AddCommGroup V₁\ninst✝⁷ : Module k V₁\ninst✝⁶ : AffineSpace V₁ P₁\ninst✝⁵ : AddCommGroup V₂\ninst✝⁴ : Module k V₂\ninst✝³ : AffineSpace V₂ P₂\ninst✝² : AddCommGroup V₃\ninst✝¹ : Module k V₃\ninst✝ : AffineSpace V₃ P₃\nf : P₁ →ᵃ[k] P₂\n⊢ comap f ⊤ = ⊤\n[PROOFSTEP]\nrw [← ext_iff]\n[GOAL]\nk : Type u_1\nV₁ : Type u_2\nP₁ : Type u_3\nV₂ : Type u_4\nP₂ : Type u_5\nV₃ : Type u_6\nP₃ : Type u_7\ninst✝⁹ : Ring k\ninst✝⁸ : AddCommGroup V₁\ninst✝⁷ : Module k V₁\ninst✝⁶ : AffineSpace V₁ P₁\ninst✝⁵ : AddCommGroup V₂\ninst✝⁴ : Module k V₂\ninst✝³ : AffineSpace V₂ P₂\ninst✝² : AddCommGroup V₃\ninst✝¹ : Module k V₃\ninst✝ : AffineSpace V₃ P₃\nf : P₁ →ᵃ[k] P₂\n⊢ ↑(comap f ⊤) = ↑⊤\n[PROOFSTEP]\nexact preimage_univ (f := f)\n[GOAL]\nk : Type u_1\nV₁ : Type u_2\nP₁ : Type u_3\nV₂ : Type u_4\nP₂ : Type u_5\nV₃ : Type u_6\nP₃ : Type u_7\ninst✝⁹ : Ring k\ninst✝⁸ : AddCommGroup V₁\ninst✝⁷ : Module k V₁\ninst✝⁶ : AffineSpace V₁ P₁\ninst✝⁵ : AddCommGroup V₂\ninst✝⁴ : Module k V₂\ninst✝³ : AffineSpace V₂ P₂\ninst✝² : AddCommGroup V₃\ninst✝¹ : Module k V₃\ninst✝ : AffineSpace V₃ P₃\nf : P₁ ≃ᵃ[k] P₂\ns : Set P₂\n⊢ comap (↑f) (affineSpan k s) = affineSpan k (↑f ⁻¹' s)\n[PROOFSTEP]\nrw [← map_symm, map_span, AffineEquiv.coe_coe, f.image_symm]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns₁ s₂ : AffineSubspace k P\nh : s₁ ∥ s₂\n⊢ s₂ ∥ s₁\n[PROOFSTEP]\nrcases h with ⟨v, rfl⟩\n[GOAL]\ncase intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns₁ : AffineSubspace k P\nv : V\n⊢ map (↑(constVAdd k P v)) s₁ ∥ s₁\n[PROOFSTEP]\nrefine' ⟨-v, _⟩\n[GOAL]\ncase intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns₁ : AffineSubspace k P\nv : V\n⊢ s₁ = map (↑(constVAdd k P (-v))) (map (↑(constVAdd k P v)) s₁)\n[PROOFSTEP]\nrw [map_map, ← coe_trans_to_affineMap, ← constVAdd_add, neg_add_self, constVAdd_zero, coe_refl_to_affineMap, map_id]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\n⊢ s = map (↑(constVAdd k P 0)) s\n[PROOFSTEP]\nsimp\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns₁ s₂ s₃ : AffineSubspace k P\nh₁₂ : s₁ ∥ s₂\nh₂₃ : s₂ ∥ s₃\n⊢ s₁ ∥ s₃\n[PROOFSTEP]\nrcases h₁₂ with ⟨v₁₂, rfl⟩\n[GOAL]\ncase intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns₁ s₃ : AffineSubspace k P\nv₁₂ : V\nh₂₃ : map (↑(constVAdd k P v₁₂)) s₁ ∥ s₃\n⊢ s₁ ∥ s₃\n[PROOFSTEP]\nrcases h₂₃ with ⟨v₂₃, rfl⟩\n[GOAL]\ncase intro.intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns₁ : AffineSubspace k P\nv₁₂ v₂₃ : V\n⊢ s₁ ∥ map (↑(constVAdd k P v₂₃)) (map (↑(constVAdd k P v₁₂)) s₁)\n[PROOFSTEP]\nrefine' ⟨v₂₃ + v₁₂, _⟩\n[GOAL]\ncase intro.intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns₁ : AffineSubspace k P\nv₁₂ v₂₃ : V\n⊢ map (↑(constVAdd k P v₂₃)) (map (↑(constVAdd k P v₁₂)) s₁) = map (↑(constVAdd k P (v₂₃ + v₁₂))) s₁\n[PROOFSTEP]\nrw [map_map, ← coe_trans_to_affineMap, ← constVAdd_add]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns₁ s₂ : AffineSubspace k P\nh : s₁ ∥ s₂\n⊢ direction s₁ = direction s₂\n[PROOFSTEP]\nrcases h with ⟨v, rfl⟩\n[GOAL]\ncase intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns₁ : AffineSubspace k P\nv : V\n⊢ direction s₁ = direction (map (↑(constVAdd k P v)) s₁)\n[PROOFSTEP]\nsimp\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\n⊢ s ∥ ⊥ ↔ s = ⊥\n[PROOFSTEP]\nrefine' ⟨fun h => _, fun h => h ▸ Parallel.refl _⟩\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\nh : s ∥ ⊥\n⊢ s = ⊥\n[PROOFSTEP]\nrcases h with ⟨v, h⟩\n[GOAL]\ncase intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\nv : V\nh : ⊥ = map (↑(constVAdd k P v)) s\n⊢ s = ⊥\n[PROOFSTEP]\nrwa [eq_comm, map_eq_bot_iff] at h \n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns : AffineSubspace k P\n⊢ ⊥ ∥ s ↔ s = ⊥\n[PROOFSTEP]\nrw [parallel_comm, parallel_bot_iff_eq_bot]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns₁ s₂ : AffineSubspace k P\n⊢ s₁ ∥ s₂ ↔ direction s₁ = direction s₂ ∧ (s₁ = ⊥ ↔ s₂ = ⊥)\n[PROOFSTEP]\nrefine' ⟨fun h => ⟨h.direction_eq, _, _⟩, fun h => _⟩\n[GOAL]\ncase refine'_1\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns₁ s₂ : AffineSubspace k P\nh : s₁ ∥ s₂\n⊢ s₁ = ⊥ → s₂ = ⊥\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase refine'_1\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns₂ : AffineSubspace k P\nh : ⊥ ∥ s₂\n⊢ s₂ = ⊥\n[PROOFSTEP]\nexact bot_parallel_iff_eq_bot.1 h\n[GOAL]\ncase refine'_2\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns₁ s₂ : AffineSubspace k P\nh : s₁ ∥ s₂\n⊢ s₂ = ⊥ → s₁ = ⊥\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase refine'_2\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns₁ : AffineSubspace k P\nh : s₁ ∥ ⊥\n⊢ s₁ = ⊥\n[PROOFSTEP]\nexact parallel_bot_iff_eq_bot.1 h\n[GOAL]\ncase refine'_3\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns₁ s₂ : AffineSubspace k P\nh : direction s₁ = direction s₂ ∧ (s₁ = ⊥ ↔ s₂ = ⊥)\n⊢ s₁ ∥ s₂\n[PROOFSTEP]\nrcases h with ⟨hd, hb⟩\n[GOAL]\ncase refine'_3.intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns₁ s₂ : AffineSubspace k P\nhd : direction s₁ = direction s₂\nhb : s₁ = ⊥ ↔ s₂ = ⊥\n⊢ s₁ ∥ s₂\n[PROOFSTEP]\nby_cases hs₁ : s₁ = ⊥\n[GOAL]\ncase pos\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns₁ s₂ : AffineSubspace k P\nhd : direction s₁ = direction s₂\nhb : s₁ = ⊥ ↔ s₂ = ⊥\nhs₁ : s₁ = ⊥\n⊢ s₁ ∥ s₂\n[PROOFSTEP]\nrw [hs₁, bot_parallel_iff_eq_bot]\n[GOAL]\ncase pos\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns₁ s₂ : AffineSubspace k P\nhd : direction s₁ = direction s₂\nhb : s₁ = ⊥ ↔ s₂ = ⊥\nhs₁ : s₁ = ⊥\n⊢ s₂ = ⊥\n[PROOFSTEP]\nexact hb.1 hs₁\n[GOAL]\ncase neg\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns₁ s₂ : AffineSubspace k P\nhd : direction s₁ = direction s₂\nhb : s₁ = ⊥ ↔ s₂ = ⊥\nhs₁ : ¬s₁ = ⊥\n⊢ s₁ ∥ s₂\n[PROOFSTEP]\nhave hs₂ : s₂ ≠ ⊥ := hb.not.1 hs₁\n[GOAL]\ncase neg\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns₁ s₂ : AffineSubspace k P\nhd : direction s₁ = direction s₂\nhb : s₁ = ⊥ ↔ s₂ = ⊥\nhs₁ : ¬s₁ = ⊥\nhs₂ : s₂ ≠ ⊥\n⊢ s₁ ∥ s₂\n[PROOFSTEP]\nrcases(nonempty_iff_ne_bot s₁).2 hs₁ with ⟨p₁, hp₁⟩\n[GOAL]\ncase neg.intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns₁ s₂ : AffineSubspace k P\nhd : direction s₁ = direction s₂\nhb : s₁ = ⊥ ↔ s₂ = ⊥\nhs₁ : ¬s₁ = ⊥\nhs₂ : s₂ ≠ ⊥\np₁ : P\nhp₁ : p₁ ∈ ↑s₁\n⊢ s₁ ∥ s₂\n[PROOFSTEP]\nrcases(nonempty_iff_ne_bot s₂).2 hs₂ with ⟨p₂, hp₂⟩\n[GOAL]\ncase neg.intro.intro\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns₁ s₂ : AffineSubspace k P\nhd : direction s₁ = direction s₂\nhb : s₁ = ⊥ ↔ s₂ = ⊥\nhs₁ : ¬s₁ = ⊥\nhs₂ : s₂ ≠ ⊥\np₁ : P\nhp₁ : p₁ ∈ ↑s₁\np₂ : P\nhp₂ : p₂ ∈ ↑s₂\n⊢ s₁ ∥ s₂\n[PROOFSTEP]\nrefine' ⟨p₂ -ᵥ p₁, (eq_iff_direction_eq_of_mem hp₂ _).2 _⟩\n[GOAL]\ncase neg.intro.intro.refine'_1\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns₁ s₂ : AffineSubspace k P\nhd : direction s₁ = direction s₂\nhb : s₁ = ⊥ ↔ s₂ = ⊥\nhs₁ : ¬s₁ = ⊥\nhs₂ : s₂ ≠ ⊥\np₁ : P\nhp₁ : p₁ ∈ ↑s₁\np₂ : P\nhp₂ : p₂ ∈ ↑s₂\n⊢ p₂ ∈ map (↑(constVAdd k P (p₂ -ᵥ p₁))) s₁\n[PROOFSTEP]\nrw [mem_map]\n[GOAL]\ncase neg.intro.intro.refine'_1\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns₁ s₂ : AffineSubspace k P\nhd : direction s₁ = direction s₂\nhb : s₁ = ⊥ ↔ s₂ = ⊥\nhs₁ : ¬s₁ = ⊥\nhs₂ : s₂ ≠ ⊥\np₁ : P\nhp₁ : p₁ ∈ ↑s₁\np₂ : P\nhp₂ : p₂ ∈ ↑s₂\n⊢ ∃ y, y ∈ s₁ ∧ ↑↑(constVAdd k P (p₂ -ᵥ p₁)) y = p₂\n[PROOFSTEP]\nrefine' ⟨p₁, hp₁, _⟩\n[GOAL]\ncase neg.intro.intro.refine'_1\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns₁ s₂ : AffineSubspace k P\nhd : direction s₁ = direction s₂\nhb : s₁ = ⊥ ↔ s₂ = ⊥\nhs₁ : ¬s₁ = ⊥\nhs₂ : s₂ ≠ ⊥\np₁ : P\nhp₁ : p₁ ∈ ↑s₁\np₂ : P\nhp₂ : p₂ ∈ ↑s₂\n⊢ ↑↑(constVAdd k P (p₂ -ᵥ p₁)) p₁ = p₂\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg.intro.intro.refine'_2\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns₁ s₂ : AffineSubspace k P\nhd : direction s₁ = direction s₂\nhb : s₁ = ⊥ ↔ s₂ = ⊥\nhs₁ : ¬s₁ = ⊥\nhs₂ : s₂ ≠ ⊥\np₁ : P\nhp₁ : p₁ ∈ ↑s₁\np₂ : P\nhp₂ : p₂ ∈ ↑s₂\n⊢ direction s₂ = direction (map (↑(constVAdd k P (p₂ -ᵥ p₁))) s₁)\n[PROOFSTEP]\nsimpa using hd.symm\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns₁ s₂ : Set P\nh : affineSpan k s₁ ∥ affineSpan k s₂\n⊢ vectorSpan k s₁ = vectorSpan k s₂\n[PROOFSTEP]\nsimp_rw [← direction_affineSpan]\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns₁ s₂ : Set P\nh : affineSpan k s₁ ∥ affineSpan k s₂\n⊢ direction (affineSpan k s₁) = direction (affineSpan k s₂)\n[PROOFSTEP]\nexact h.direction_eq\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns₁ s₂ : Set P\n⊢ affineSpan k s₁ ∥ affineSpan k s₂ ↔ vectorSpan k s₁ = vectorSpan k s₂ ∧ (s₁ = ∅ ↔ s₂ = ∅)\n[PROOFSTEP]\nrepeat\n  rw [← direction_affineSpan, ← affineSpan_eq_bot k]\n    -- porting note: more issues with `simp`\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns₁ s₂ : Set P\n⊢ affineSpan k s₁ ∥ affineSpan k s₂ ↔ vectorSpan k s₁ = vectorSpan k s₂ ∧ (s₁ = ∅ ↔ s₂ = ∅)\n[PROOFSTEP]\nrw [← direction_affineSpan, ← affineSpan_eq_bot k]\n  -- porting note: more issues with `simp`\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns₁ s₂ : Set P\n⊢ affineSpan k s₁ ∥ affineSpan k s₂ ↔ direction (affineSpan k s₁) = vectorSpan k s₂ ∧ (affineSpan k s₁ = ⊥ ↔ s₂ = ∅)\n[PROOFSTEP]\nrw [← direction_affineSpan, ← affineSpan_eq_bot k]\n  -- porting note: more issues with `simp`\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns₁ s₂ : Set P\n⊢ affineSpan k s₁ ∥ affineSpan k s₂ ↔\n    direction (affineSpan k s₁) = direction (affineSpan k s₂) ∧ (affineSpan k s₁ = ⊥ ↔ affineSpan k s₂ = ⊥)\n[PROOFSTEP]\nrw [← direction_affineSpan, ← affineSpan_eq_bot k]\n  -- porting note: more issues with `simp`\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\ns₁ s₂ : Set P\n⊢ affineSpan k s₁ ∥ affineSpan k s₂ ↔\n    direction (affineSpan k s₁) = direction (affineSpan k s₂) ∧ (affineSpan k s₁ = ⊥ ↔ affineSpan k s₂ = ⊥)\n[PROOFSTEP]\nexact parallel_iff_direction_eq_and_eq_bot_iff_eq_bot\n[GOAL]\nk : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : Ring k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : AffineSpace V P\np₁ p₂ p₃ p₄ : P\n⊢ affineSpan k {p₁, p₂} ∥ affineSpan k {p₃, p₄} ↔ vectorSpan k {p₁, p₂} = vectorSpan k {p₃, p₄}\n[PROOFSTEP]\nsimp [affineSpan_parallel_iff_vectorSpan_eq_and_eq_empty_iff_eq_empty, ← not_nonempty_iff_eq_empty]\n", "meta": {"mathlib_filename": "Mathlib.LinearAlgebra.AffineSpace.AffineSubspace", "llama_tokens": 80150, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7826624789529375, "lm_q2_score": 0.647798211152541, "lm_q1q2_score": 0.5070073538019262}}
{"text": "[GOAL]\nn : Type u\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nα : Type v\ninst✝¹ : CommRing α\ninst✝ : StarRing α\nA : Matrix n n α\n⊢ A ∈ unitaryGroup n α ↔ A * star A = 1\n[PROOFSTEP]\nrefine' ⟨And.right, fun hA => ⟨_, hA⟩⟩\n[GOAL]\nn : Type u\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nα : Type v\ninst✝¹ : CommRing α\ninst✝ : StarRing α\nA : Matrix n n α\nhA : A * star A = 1\n⊢ star A * A = 1\n[PROOFSTEP]\nsimpa only [mul_eq_one_comm] using hA\n[GOAL]\nn : Type u\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nα : Type v\ninst✝¹ : CommRing α\ninst✝ : StarRing α\nA : Matrix n n α\n⊢ A ∈ unitaryGroup n α ↔ star A * A = 1\n[PROOFSTEP]\nrefine' ⟨And.left, fun hA => ⟨hA, _⟩⟩\n[GOAL]\nn : Type u\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nα : Type v\ninst✝¹ : CommRing α\ninst✝ : StarRing α\nA : Matrix n n α\nhA : star A * A = 1\n⊢ A * star A = 1\n[PROOFSTEP]\nrwa [mul_eq_one_comm] at hA \n[GOAL]\nn : Type u\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nα : Type v\ninst✝¹ : CommRing α\ninst✝ : StarRing α\nA✝ A : Matrix n n α\nhA : A ∈ unitaryGroup n α\n⊢ det A ∈ unitary α\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase left\nn : Type u\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nα : Type v\ninst✝¹ : CommRing α\ninst✝ : StarRing α\nA✝ A : Matrix n n α\nhA : A ∈ unitaryGroup n α\n⊢ star (det A) * det A = 1\n[PROOFSTEP]\nsimpa [star, det_transpose] using congr_arg det hA.1\n[GOAL]\ncase right\nn : Type u\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nα : Type v\ninst✝¹ : CommRing α\ninst✝ : StarRing α\nA✝ A : Matrix n n α\nhA : A ∈ unitaryGroup n α\n⊢ det A * star (det A) = 1\n[PROOFSTEP]\nsimpa [star, det_transpose] using congr_arg det hA.2\n[GOAL]\nn : Type u\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nα : Type v\ninst✝¹ : CommRing α\ninst✝ : StarRing α\nA✝ : Matrix n n α\nA : { x // x ∈ unitaryGroup n α }\nsrc✝ : (fun x => (n → α) →ₗ[α] n → α) ↑A := ↑Matrix.toLin' ↑A\nx : n → α\n⊢ ↑(comp (toLin' A⁻¹) (toLin' A)) x = ↑(toLin' (A⁻¹ * A)) x\n[PROOFSTEP]\nrw [← toLin'_mul]\n[GOAL]\nn : Type u\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nα : Type v\ninst✝¹ : CommRing α\ninst✝ : StarRing α\nA✝ : Matrix n n α\nA : { x // x ∈ unitaryGroup n α }\nsrc✝ : (fun x => (n → α) →ₗ[α] n → α) ↑A := ↑Matrix.toLin' ↑A\nx : n → α\n⊢ ↑(toLin' (A⁻¹ * A)) x = x\n[PROOFSTEP]\nrw [mul_left_inv, toLin'_one, id_apply]\n[GOAL]\nn : Type u\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nα : Type v\ninst✝¹ : CommRing α\ninst✝ : StarRing α\nA✝ : Matrix n n α\nA : { x // x ∈ unitaryGroup n α }\nsrc✝ : (fun x => (n → α) →ₗ[α] n → α) ↑A := ↑Matrix.toLin' ↑A\nx : n → α\n⊢ ↑(comp (toLin' A) (toLin' A⁻¹)) x = ↑(toLin' (A * A⁻¹)) x\n[PROOFSTEP]\nrw [← toLin'_mul]\n[GOAL]\nn : Type u\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nα : Type v\ninst✝¹ : CommRing α\ninst✝ : StarRing α\nA✝ : Matrix n n α\nA : { x // x ∈ unitaryGroup n α }\nsrc✝ : (fun x => (n → α) →ₗ[α] n → α) ↑A := ↑Matrix.toLin' ↑A\nx : n → α\n⊢ ↑(toLin' (A * A⁻¹)) x = x\n[PROOFSTEP]\nrw [mul_right_inv, toLin'_one, id_apply]\n[GOAL]\nn : Type u\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nα : Type v\ninst✝¹ : CommRing α\ninst✝ : StarRing α\nA : Matrix n n α\n⊢ ↑(toGL 1) = ↑1\n[PROOFSTEP]\nsimp only [coe_toGL, toLin'_one]\n[GOAL]\nn : Type u\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nα : Type v\ninst✝¹ : CommRing α\ninst✝ : StarRing α\nA : Matrix n n α\n⊢ LinearMap.id = ↑1\n[PROOFSTEP]\nrfl\n[GOAL]\nn : Type u\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nα : Type v\ninst✝¹ : CommRing α\ninst✝ : StarRing α\nA✝ : Matrix n n α\nA B : { x // x ∈ unitaryGroup n α }\n⊢ ↑(toGL (A * B)) = ↑(toGL A * toGL B)\n[PROOFSTEP]\nsimp only [coe_toGL, toLin'_mul]\n[GOAL]\nn : Type u\ninst✝³ : DecidableEq n\ninst✝² : Fintype n\nα : Type v\ninst✝¹ : CommRing α\ninst✝ : StarRing α\nA✝ : Matrix n n α\nA B : { x // x ∈ unitaryGroup n α }\n⊢ comp (toLin' A) (toLin' B) = ↑(toGL A * toGL B)\n[PROOFSTEP]\nrfl\n[GOAL]\nn : Type u\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\nα : Type v\ninst✝² : CommRing α\ninst✝¹ : StarRing α\nA✝ : Matrix n n α\nβ : Type v\ninst✝ : CommRing β\nA : Matrix n n β\n⊢ A ∈ orthogonalGroup n β ↔ A * star A = 1\n[PROOFSTEP]\nrefine' ⟨And.right, fun hA => ⟨_, hA⟩⟩\n[GOAL]\nn : Type u\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\nα : Type v\ninst✝² : CommRing α\ninst✝¹ : StarRing α\nA✝ : Matrix n n α\nβ : Type v\ninst✝ : CommRing β\nA : Matrix n n β\nhA : A * star A = 1\n⊢ star A * A = 1\n[PROOFSTEP]\nsimpa only [mul_eq_one_comm] using hA\n[GOAL]\nn : Type u\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\nα : Type v\ninst✝² : CommRing α\ninst✝¹ : StarRing α\nA✝ : Matrix n n α\nβ : Type v\ninst✝ : CommRing β\nA : Matrix n n β\n⊢ A ∈ orthogonalGroup n β ↔ star A * A = 1\n[PROOFSTEP]\nrefine' ⟨And.left, fun hA => ⟨hA, _⟩⟩\n[GOAL]\nn : Type u\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\nα : Type v\ninst✝² : CommRing α\ninst✝¹ : StarRing α\nA✝ : Matrix n n α\nβ : Type v\ninst✝ : CommRing β\nA : Matrix n n β\nhA : star A * A = 1\n⊢ A * star A = 1\n[PROOFSTEP]\nrwa [mul_eq_one_comm] at hA \n", "meta": {"mathlib_filename": "Mathlib.LinearAlgebra.UnitaryGroup", "llama_tokens": 2497, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.757794360334681, "lm_q2_score": 0.6688802669716107, "lm_q1q2_score": 0.5068736940502424}}
{"text": "[GOAL]\nα : Type u_1\ns t : Set α\ninst✝ : OrderedCancelCommMonoid α\nhs : IsPwo s\nht : IsPwo t\n⊢ IsPwo (s * t)\n[PROOFSTEP]\nrw [← image_mul_prod]\n[GOAL]\nα : Type u_1\ns t : Set α\ninst✝ : OrderedCancelCommMonoid α\nhs : IsPwo s\nht : IsPwo t\n⊢ IsPwo ((fun x => x.fst * x.snd) '' s ×ˢ t)\n[PROOFSTEP]\nexact (hs.prod ht).image_of_monotone (monotone_fst.mul' monotone_snd)\n[GOAL]\nα : Type u_1\ns t : Set α\ninst✝ : LinearOrderedCancelCommMonoid α\nhs : IsWf s\nht : IsWf t\nhsn : Set.Nonempty s\nhtn : Set.Nonempty t\n⊢ min (_ : IsWf (s * t)) (_ : Set.Nonempty (s * t)) = min hs hsn * min ht htn\n[PROOFSTEP]\nrefine' le_antisymm (IsWf.min_le _ _ (mem_mul.2 ⟨_, _, hs.min_mem _, ht.min_mem _, rfl⟩)) _\n[GOAL]\nα : Type u_1\ns t : Set α\ninst✝ : LinearOrderedCancelCommMonoid α\nhs : IsWf s\nht : IsWf t\nhsn : Set.Nonempty s\nhtn : Set.Nonempty t\n⊢ min hs hsn * min ht htn ≤ min (_ : IsWf (s * t)) (_ : Set.Nonempty (s * t))\n[PROOFSTEP]\nrw [IsWf.le_min_iff]\n[GOAL]\nα : Type u_1\ns t : Set α\ninst✝ : LinearOrderedCancelCommMonoid α\nhs : IsWf s\nht : IsWf t\nhsn : Set.Nonempty s\nhtn : Set.Nonempty t\n⊢ ∀ (b : α), b ∈ s * t → min hs hsn * min ht htn ≤ b\n[PROOFSTEP]\nrintro _ ⟨x, y, hx, hy, rfl⟩\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\ns t : Set α\ninst✝ : LinearOrderedCancelCommMonoid α\nhs : IsWf s\nht : IsWf t\nhsn : Set.Nonempty s\nhtn : Set.Nonempty t\nx y : α\nhx : x ∈ s\nhy : y ∈ t\n⊢ min hs hsn * min ht htn ≤ (fun x x_1 => x * x_1) x y\n[PROOFSTEP]\nexact mul_le_mul' (hs.min_le _ hx) (ht.min_le _ hy)\n[GOAL]\nα : Type u_1\ninst✝ : OrderedCancelCommMonoid α\ns t : Set α\nhs : Set.IsPwo s\nht : Set.IsPwo t\na : α\nu : Set α\nhu : Set.IsPwo u\nx : α × α\n⊢ x ∈ mulAntidiagonal hs ht a ↔ x.fst ∈ s ∧ x.snd ∈ t ∧ x.fst * x.snd = a\n[PROOFSTEP]\nsimp only [mulAntidiagonal, Set.Finite.mem_toFinset, Set.mem_mulAntidiagonal]\n[GOAL]\nα : Type u_1\ninst✝ : OrderedCancelCommMonoid α\ns t : Set α\nhs : Set.IsPwo s\nht : Set.IsPwo t\na : α\nu : Set α\nhu : Set.IsPwo u\nx : α × α\n⊢ Prod.swap x ∈ mulAntidiagonal hs ht a ↔ x ∈ mulAntidiagonal ht hs a\n[PROOFSTEP]\nsimp only [mem_mulAntidiagonal, Prod.fst_swap, Prod.snd_swap, Set.swap_mem_mulAntidiagonal_aux, Set.mem_mulAntidiagonal]\n[GOAL]\nα : Type u_1\ninst✝ : OrderedCancelCommMonoid α\ns t : Set α\nhs : Set.IsPwo s\nht : Set.IsPwo t\na✝ : α\nu : Set α\nhu : Set.IsPwo u\nx : α × α\na : α\nx✝ : a ∈ {a | Finset.Nonempty (mulAntidiagonal hs ht a)}\nb : α × α\nhb : b ∈ mulAntidiagonal hs ht a\n⊢ a ∈ s * t\n[PROOFSTEP]\nrw [mem_mulAntidiagonal] at hb \n[GOAL]\nα : Type u_1\ninst✝ : OrderedCancelCommMonoid α\ns t : Set α\nhs : Set.IsPwo s\nht : Set.IsPwo t\na✝ : α\nu : Set α\nhu : Set.IsPwo u\nx : α × α\na : α\nx✝ : a ∈ {a | Finset.Nonempty (mulAntidiagonal hs ht a)}\nb : α × α\nhb : b.fst ∈ s ∧ b.snd ∈ t ∧ b.fst * b.snd = a\n⊢ a ∈ s * t\n[PROOFSTEP]\nexact ⟨b.1, b.2, hb⟩\n[GOAL]\nα✝ : Type u_1\ninst✝¹ : OrderedCancelCommMonoid α✝\ns✝ t✝ : Set α✝\nhs✝ : Set.IsPwo s✝\nht✝ : Set.IsPwo t✝\na : α✝\nu : Set α✝\nhu : Set.IsPwo u\nx : α✝ × α✝\nα : Type u_2\ninst✝ : LinearOrderedCancelCommMonoid α\ns t : Set α\nhs : Set.IsWf s\nht : Set.IsWf t\nhns : Set.Nonempty s\nhnt : Set.Nonempty t\n⊢ mulAntidiagonal (_ : Set.IsPwo s) (_ : Set.IsPwo t) (Set.IsWf.min hs hns * Set.IsWf.min ht hnt) =\n    {(Set.IsWf.min hs hns, Set.IsWf.min ht hnt)}\n[PROOFSTEP]\next ⟨a, b⟩\n[GOAL]\ncase a.mk\nα✝ : Type u_1\ninst✝¹ : OrderedCancelCommMonoid α✝\ns✝ t✝ : Set α✝\nhs✝ : Set.IsPwo s✝\nht✝ : Set.IsPwo t✝\na✝ : α✝\nu : Set α✝\nhu : Set.IsPwo u\nx : α✝ × α✝\nα : Type u_2\ninst✝ : LinearOrderedCancelCommMonoid α\ns t : Set α\nhs : Set.IsWf s\nht : Set.IsWf t\nhns : Set.Nonempty s\nhnt : Set.Nonempty t\na b : α\n⊢ (a, b) ∈ mulAntidiagonal (_ : Set.IsPwo s) (_ : Set.IsPwo t) (Set.IsWf.min hs hns * Set.IsWf.min ht hnt) ↔\n    (a, b) ∈ {(Set.IsWf.min hs hns, Set.IsWf.min ht hnt)}\n[PROOFSTEP]\nsimp only [mem_mulAntidiagonal, mem_singleton, Prod.ext_iff]\n[GOAL]\ncase a.mk\nα✝ : Type u_1\ninst✝¹ : OrderedCancelCommMonoid α✝\ns✝ t✝ : Set α✝\nhs✝ : Set.IsPwo s✝\nht✝ : Set.IsPwo t✝\na✝ : α✝\nu : Set α✝\nhu : Set.IsPwo u\nx : α✝ × α✝\nα : Type u_2\ninst✝ : LinearOrderedCancelCommMonoid α\ns t : Set α\nhs : Set.IsWf s\nht : Set.IsWf t\nhns : Set.Nonempty s\nhnt : Set.Nonempty t\na b : α\n⊢ a ∈ s ∧ b ∈ t ∧ a * b = Set.IsWf.min hs hns * Set.IsWf.min ht hnt ↔ a = Set.IsWf.min hs hns ∧ b = Set.IsWf.min ht hnt\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase a.mk.mp\nα✝ : Type u_1\ninst✝¹ : OrderedCancelCommMonoid α✝\ns✝ t✝ : Set α✝\nhs✝ : Set.IsPwo s✝\nht✝ : Set.IsPwo t✝\na✝ : α✝\nu : Set α✝\nhu : Set.IsPwo u\nx : α✝ × α✝\nα : Type u_2\ninst✝ : LinearOrderedCancelCommMonoid α\ns t : Set α\nhs : Set.IsWf s\nht : Set.IsWf t\nhns : Set.Nonempty s\nhnt : Set.Nonempty t\na b : α\n⊢ a ∈ s ∧ b ∈ t ∧ a * b = Set.IsWf.min hs hns * Set.IsWf.min ht hnt → a = Set.IsWf.min hs hns ∧ b = Set.IsWf.min ht hnt\n[PROOFSTEP]\nrintro ⟨has, hat, hst⟩\n[GOAL]\ncase a.mk.mp.intro.intro\nα✝ : Type u_1\ninst✝¹ : OrderedCancelCommMonoid α✝\ns✝ t✝ : Set α✝\nhs✝ : Set.IsPwo s✝\nht✝ : Set.IsPwo t✝\na✝ : α✝\nu : Set α✝\nhu : Set.IsPwo u\nx : α✝ × α✝\nα : Type u_2\ninst✝ : LinearOrderedCancelCommMonoid α\ns t : Set α\nhs : Set.IsWf s\nht : Set.IsWf t\nhns : Set.Nonempty s\nhnt : Set.Nonempty t\na b : α\nhas : a ∈ s\nhat : b ∈ t\nhst : a * b = Set.IsWf.min hs hns * Set.IsWf.min ht hnt\n⊢ a = Set.IsWf.min hs hns ∧ b = Set.IsWf.min ht hnt\n[PROOFSTEP]\nobtain rfl := (hs.min_le hns has).eq_of_not_lt fun hlt => (mul_lt_mul_of_lt_of_le hlt <| ht.min_le hnt hat).ne' hst\n[GOAL]\ncase a.mk.mp.intro.intro\nα✝ : Type u_1\ninst✝¹ : OrderedCancelCommMonoid α✝\ns✝ t✝ : Set α✝\nhs✝ : Set.IsPwo s✝\nht✝ : Set.IsPwo t✝\na : α✝\nu : Set α✝\nhu : Set.IsPwo u\nx : α✝ × α✝\nα : Type u_2\ninst✝ : LinearOrderedCancelCommMonoid α\ns t : Set α\nhs : Set.IsWf s\nht : Set.IsWf t\nhns : Set.Nonempty s\nhnt : Set.Nonempty t\nb : α\nhat : b ∈ t\nhas : Set.IsWf.min hs hns ∈ s\nhst : Set.IsWf.min hs hns * b = Set.IsWf.min hs hns * Set.IsWf.min ht hnt\n⊢ Set.IsWf.min hs hns = Set.IsWf.min hs hns ∧ b = Set.IsWf.min ht hnt\n[PROOFSTEP]\nexact ⟨rfl, mul_left_cancel hst⟩\n[GOAL]\ncase a.mk.mpr\nα✝ : Type u_1\ninst✝¹ : OrderedCancelCommMonoid α✝\ns✝ t✝ : Set α✝\nhs✝ : Set.IsPwo s✝\nht✝ : Set.IsPwo t✝\na✝ : α✝\nu : Set α✝\nhu : Set.IsPwo u\nx : α✝ × α✝\nα : Type u_2\ninst✝ : LinearOrderedCancelCommMonoid α\ns t : Set α\nhs : Set.IsWf s\nht : Set.IsWf t\nhns : Set.Nonempty s\nhnt : Set.Nonempty t\na b : α\n⊢ a = Set.IsWf.min hs hns ∧ b = Set.IsWf.min ht hnt → a ∈ s ∧ b ∈ t ∧ a * b = Set.IsWf.min hs hns * Set.IsWf.min ht hnt\n[PROOFSTEP]\nrintro ⟨rfl, rfl⟩\n[GOAL]\ncase a.mk.mpr.intro\nα✝ : Type u_1\ninst✝¹ : OrderedCancelCommMonoid α✝\ns✝ t✝ : Set α✝\nhs✝ : Set.IsPwo s✝\nht✝ : Set.IsPwo t✝\na : α✝\nu : Set α✝\nhu : Set.IsPwo u\nx : α✝ × α✝\nα : Type u_2\ninst✝ : LinearOrderedCancelCommMonoid α\ns t : Set α\nhs : Set.IsWf s\nht : Set.IsWf t\nhns : Set.Nonempty s\nhnt : Set.Nonempty t\n⊢ Set.IsWf.min hs hns ∈ s ∧\n    Set.IsWf.min ht hnt ∈ t ∧ Set.IsWf.min hs hns * Set.IsWf.min ht hnt = Set.IsWf.min hs hns * Set.IsWf.min ht hnt\n[PROOFSTEP]\nexact ⟨hs.min_mem _, ht.min_mem _, rfl⟩\n", "meta": {"mathlib_filename": "Mathlib.Data.Finset.MulAntidiagonal", "llama_tokens": 3792, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7248702761768248, "lm_q2_score": 0.6992544085240401, "lm_q1q2_score": 0.5068687362246832}}
{"text": "[GOAL]\nR₁ : Type u_1\nR₂ : Type u_2\ninst✝⁵ : Semiring R₁\ninst✝⁴ : Semiring R₂\nσ₁₂ : R₁ →+* R₂\nM₁ : Type u_3\nM₂ : Type u_4\ninst✝³ : TopologicalSpace M₁\ninst✝² : AddCommMonoid M₁\ninst✝¹ : TopologicalSpace M₂\ninst✝ : T2Space M₂\nf : M₁ → M₂\n⊢ IsCompactOperator f ↔ ∃ V, V ∈ 𝓝 0 ∧ IsCompact (closure (f '' V))\n[PROOFSTEP]\nrw [isCompactOperator_iff_exists_mem_nhds_image_subset_compact]\n[GOAL]\nR₁ : Type u_1\nR₂ : Type u_2\ninst✝⁵ : Semiring R₁\ninst✝⁴ : Semiring R₂\nσ₁₂ : R₁ →+* R₂\nM₁ : Type u_3\nM₂ : Type u_4\ninst✝³ : TopologicalSpace M₁\ninst✝² : AddCommMonoid M₁\ninst✝¹ : TopologicalSpace M₂\ninst✝ : T2Space M₂\nf : M₁ → M₂\n⊢ (∃ V, V ∈ 𝓝 0 ∧ ∃ K, IsCompact K ∧ f '' V ⊆ K) ↔ ∃ V, V ∈ 𝓝 0 ∧ IsCompact (closure (f '' V))\n[PROOFSTEP]\nexact\n  ⟨fun ⟨V, hV, K, hK, hKV⟩ => ⟨V, hV, isCompact_closure_of_subset_compact hK hKV⟩, fun ⟨V, hV, hVc⟩ =>\n    ⟨V, hV, closure (f '' V), hVc, subset_closure⟩⟩\n[GOAL]\n𝕜₁ : Type u_1\n𝕜₂ : Type u_2\ninst✝⁸ : NontriviallyNormedField 𝕜₁\ninst✝⁷ : SeminormedRing 𝕜₂\nσ₁₂ : 𝕜₁ →+* 𝕜₂\nM₁ : Type u_3\nM₂ : Type u_4\ninst✝⁶ : TopologicalSpace M₁\ninst✝⁵ : AddCommMonoid M₁\ninst✝⁴ : TopologicalSpace M₂\ninst✝³ : AddCommMonoid M₂\ninst✝² : Module 𝕜₁ M₁\ninst✝¹ : Module 𝕜₂ M₂\ninst✝ : ContinuousConstSMul 𝕜₂ M₂\nf : M₁ →ₛₗ[σ₁₂] M₂\nhf : IsCompactOperator ↑f\nS : Set M₁\nhS : IsVonNBounded 𝕜₁ S\nK : Set M₂\nhK : IsCompact K\nhKf : ↑f ⁻¹' K ∈ 𝓝 0\nr : ℝ\nhr : 0 < r\nhrS : ∀ (a : 𝕜₁), r ≤ ‖a‖ → S ⊆ a • ↑f ⁻¹' K\nc : 𝕜₁\nhc : r < ‖c‖\nthis : c ≠ 0 := ne_zero_of_norm_ne_zero (Ne.symm (LT.lt.ne (LT.lt.trans hr hc)))\n⊢ ↑f '' S ⊆ ↑σ₁₂ c • K\n[PROOFSTEP]\nrw [image_subset_iff, preimage_smul_setₛₗ _ _ _ f this.isUnit]\n[GOAL]\n𝕜₁ : Type u_1\n𝕜₂ : Type u_2\ninst✝⁸ : NontriviallyNormedField 𝕜₁\ninst✝⁷ : SeminormedRing 𝕜₂\nσ₁₂ : 𝕜₁ →+* 𝕜₂\nM₁ : Type u_3\nM₂ : Type u_4\ninst✝⁶ : TopologicalSpace M₁\ninst✝⁵ : AddCommMonoid M₁\ninst✝⁴ : TopologicalSpace M₂\ninst✝³ : AddCommMonoid M₂\ninst✝² : Module 𝕜₁ M₁\ninst✝¹ : Module 𝕜₂ M₂\ninst✝ : ContinuousConstSMul 𝕜₂ M₂\nf : M₁ →ₛₗ[σ₁₂] M₂\nhf : IsCompactOperator ↑f\nS : Set M₁\nhS : IsVonNBounded 𝕜₁ S\nK : Set M₂\nhK : IsCompact K\nhKf : ↑f ⁻¹' K ∈ 𝓝 0\nr : ℝ\nhr : 0 < r\nhrS : ∀ (a : 𝕜₁), r ≤ ‖a‖ → S ⊆ a • ↑f ⁻¹' K\nc : 𝕜₁\nhc : r < ‖c‖\nthis : c ≠ 0 := ne_zero_of_norm_ne_zero (Ne.symm (LT.lt.ne (LT.lt.trans hr hc)))\n⊢ S ⊆ c • ↑f ⁻¹' K\n[PROOFSTEP]\nexact hrS c hc.le\n[GOAL]\n𝕜₁ : Type u_1\n𝕜₂ : Type u_2\ninst✝⁷ : NontriviallyNormedField 𝕜₁\ninst✝⁶ : SeminormedRing 𝕜₂\nσ₁₂ : 𝕜₁ →+* 𝕜₂\nM₁ : Type u_3\nM₂ : Type u_4\nM₃ : Type u_5\ninst✝⁵ : SeminormedAddCommGroup M₁\ninst✝⁴ : TopologicalSpace M₂\ninst✝³ : AddCommMonoid M₂\ninst✝² : NormedSpace 𝕜₁ M₁\ninst✝¹ : Module 𝕜₂ M₂\ninst✝ : ContinuousConstSMul 𝕜₂ M₂\nf : M₁ →ₛₗ[σ₁₂] M₂\nhf : IsCompactOperator ↑f\nS : Set M₁\nhS : Metric.Bounded S\n⊢ IsVonNBounded 𝕜₁ S\n[PROOFSTEP]\nrwa [NormedSpace.isVonNBounded_iff, ← Metric.bounded_iff_isBounded]\n[GOAL]\n𝕜₁ : Type u_1\n𝕜₂ : Type u_2\ninst✝⁸ : NontriviallyNormedField 𝕜₁\ninst✝⁷ : SeminormedRing 𝕜₂\nσ₁₂ : 𝕜₁ →+* 𝕜₂\nM₁ : Type u_3\nM₂ : Type u_4\nM₃ : Type u_5\ninst✝⁶ : SeminormedAddCommGroup M₁\ninst✝⁵ : TopologicalSpace M₂\ninst✝⁴ : AddCommMonoid M₂\ninst✝³ : NormedSpace 𝕜₁ M₁\ninst✝² : Module 𝕜₂ M₂\ninst✝¹ : ContinuousConstSMul 𝕜₂ M₂\ninst✝ : T2Space M₂\nf : M₁ →ₛₗ[σ₁₂] M₂\nhf : IsCompactOperator ↑f\nS : Set M₁\nhS : Metric.Bounded S\n⊢ IsVonNBounded 𝕜₁ S\n[PROOFSTEP]\nrwa [NormedSpace.isVonNBounded_iff, ← Metric.bounded_iff_isBounded]\n[GOAL]\nR₁ : Type u_1\nR₂ : Type u_2\nR₃ : Type u_3\nR₄ : Type u_4\ninst✝¹² : Semiring R₁\ninst✝¹¹ : Semiring R₂\ninst✝¹⁰ : CommSemiring R₃\ninst✝⁹ : CommSemiring R₄\nσ₁₂ : R₁ →+* R₂\nσ₁₄ : R₁ →+* R₄\nσ₃₄ : R₃ →+* R₄\nM₁ : Type u_5\nM₂ : Type u_6\nM₃ : Type u_7\nM₄ : Type u_8\ninst✝⁸ : TopologicalSpace M₁\ninst✝⁷ : AddCommMonoid M₁\ninst✝⁶ : TopologicalSpace M₂\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : TopologicalSpace M₃\ninst✝³ : AddCommGroup M₃\ninst✝² : TopologicalSpace M₄\ninst✝¹ : AddCommGroup M₄\ninst✝ : TopologicalAddGroup M₄\nf g : M₁ → M₄\nhf : IsCompactOperator f\nhg : IsCompactOperator g\n⊢ IsCompactOperator (f - g)\n[PROOFSTEP]\nrw [sub_eq_add_neg]\n[GOAL]\nR₁ : Type u_1\nR₂ : Type u_2\nR₃ : Type u_3\nR₄ : Type u_4\ninst✝¹² : Semiring R₁\ninst✝¹¹ : Semiring R₂\ninst✝¹⁰ : CommSemiring R₃\ninst✝⁹ : CommSemiring R₄\nσ₁₂ : R₁ →+* R₂\nσ₁₄ : R₁ →+* R₄\nσ₃₄ : R₃ →+* R₄\nM₁ : Type u_5\nM₂ : Type u_6\nM₃ : Type u_7\nM₄ : Type u_8\ninst✝⁸ : TopologicalSpace M₁\ninst✝⁷ : AddCommMonoid M₁\ninst✝⁶ : TopologicalSpace M₂\ninst✝⁵ : AddCommMonoid M₂\ninst✝⁴ : TopologicalSpace M₃\ninst✝³ : AddCommGroup M₃\ninst✝² : TopologicalSpace M₄\ninst✝¹ : AddCommGroup M₄\ninst✝ : TopologicalAddGroup M₄\nf g : M₁ → M₄\nhf : IsCompactOperator f\nhg : IsCompactOperator g\n⊢ IsCompactOperator (f + -g)\n[PROOFSTEP]\nexact hf.add hg.neg\n[GOAL]\nR₁ : Type u_1\nR₂ : Type u_2\nR₃ : Type u_3\ninst✝⁹ : Semiring R₁\ninst✝⁸ : Semiring R₂\ninst✝⁷ : Semiring R₃\nσ₁₂ : R₁ →+* R₂\nσ₂₃ : R₂ →+* R₃\nM₁ : Type u_4\nM₂ : Type u_5\nM₃ : Type u_6\ninst✝⁶ : TopologicalSpace M₁\ninst✝⁵ : TopologicalSpace M₂\ninst✝⁴ : TopologicalSpace M₃\ninst✝³ : AddCommMonoid M₁\ninst✝² : Module R₁ M₁\ninst✝¹ : AddCommMonoid M₂\ninst✝ : Module R₂ M₂\nf : M₂ → M₃\nhf : IsCompactOperator f\ng : M₁ →SL[σ₁₂] M₂\n⊢ IsCompactOperator (f ∘ ↑g)\n[PROOFSTEP]\nhave := g.continuous.tendsto 0\n[GOAL]\nR₁ : Type u_1\nR₂ : Type u_2\nR₃ : Type u_3\ninst✝⁹ : Semiring R₁\ninst✝⁸ : Semiring R₂\ninst✝⁷ : Semiring R₃\nσ₁₂ : R₁ →+* R₂\nσ₂₃ : R₂ →+* R₃\nM₁ : Type u_4\nM₂ : Type u_5\nM₃ : Type u_6\ninst✝⁶ : TopologicalSpace M₁\ninst✝⁵ : TopologicalSpace M₂\ninst✝⁴ : TopologicalSpace M₃\ninst✝³ : AddCommMonoid M₁\ninst✝² : Module R₁ M₁\ninst✝¹ : AddCommMonoid M₂\ninst✝ : Module R₂ M₂\nf : M₂ → M₃\nhf : IsCompactOperator f\ng : M₁ →SL[σ₁₂] M₂\nthis : Tendsto (↑g) (𝓝 0) (𝓝 (↑g 0))\n⊢ IsCompactOperator (f ∘ ↑g)\n[PROOFSTEP]\nrw [map_zero] at this \n[GOAL]\nR₁ : Type u_1\nR₂ : Type u_2\nR₃ : Type u_3\ninst✝⁹ : Semiring R₁\ninst✝⁸ : Semiring R₂\ninst✝⁷ : Semiring R₃\nσ₁₂ : R₁ →+* R₂\nσ₂₃ : R₂ →+* R₃\nM₁ : Type u_4\nM₂ : Type u_5\nM₃ : Type u_6\ninst✝⁶ : TopologicalSpace M₁\ninst✝⁵ : TopologicalSpace M₂\ninst✝⁴ : TopologicalSpace M₃\ninst✝³ : AddCommMonoid M₁\ninst✝² : Module R₁ M₁\ninst✝¹ : AddCommMonoid M₂\ninst✝ : Module R₂ M₂\nf : M₂ → M₃\nhf : IsCompactOperator f\ng : M₁ →SL[σ₁₂] M₂\nthis : Tendsto (↑g) (𝓝 0) (𝓝 0)\n⊢ IsCompactOperator (f ∘ ↑g)\n[PROOFSTEP]\nrcases hf with ⟨K, hK, hKf⟩\n[GOAL]\ncase intro.intro\nR₁ : Type u_1\nR₂ : Type u_2\nR₃ : Type u_3\ninst✝⁹ : Semiring R₁\ninst✝⁸ : Semiring R₂\ninst✝⁷ : Semiring R₃\nσ₁₂ : R₁ →+* R₂\nσ₂₃ : R₂ →+* R₃\nM₁ : Type u_4\nM₂ : Type u_5\nM₃ : Type u_6\ninst✝⁶ : TopologicalSpace M₁\ninst✝⁵ : TopologicalSpace M₂\ninst✝⁴ : TopologicalSpace M₃\ninst✝³ : AddCommMonoid M₁\ninst✝² : Module R₁ M₁\ninst✝¹ : AddCommMonoid M₂\ninst✝ : Module R₂ M₂\nf : M₂ → M₃\ng : M₁ →SL[σ₁₂] M₂\nthis : Tendsto (↑g) (𝓝 0) (𝓝 0)\nK : Set M₃\nhK : IsCompact K\nhKf : f ⁻¹' K ∈ 𝓝 0\n⊢ IsCompactOperator (f ∘ ↑g)\n[PROOFSTEP]\nexact ⟨K, hK, this hKf⟩\n[GOAL]\nR₁ : Type u_1\nR₂ : Type u_2\nR₃ : Type u_3\ninst✝⁷ : Semiring R₁\ninst✝⁶ : Semiring R₂\ninst✝⁵ : Semiring R₃\nσ₁₂ : R₁ →+* R₂\nσ₂₃ : R₂ →+* R₃\nM₁ : Type u_4\nM₂ : Type u_5\nM₃ : Type u_6\ninst✝⁴ : TopologicalSpace M₁\ninst✝³ : TopologicalSpace M₂\ninst✝² : TopologicalSpace M₃\ninst✝¹ : AddCommMonoid M₁\ninst✝ : Module R₁ M₁\nf : M₁ → M₂\nhf : IsCompactOperator f\ng : M₂ → M₃\nhg : Continuous g\n⊢ IsCompactOperator (g ∘ f)\n[PROOFSTEP]\nrcases hf with ⟨K, hK, hKf⟩\n[GOAL]\ncase intro.intro\nR₁ : Type u_1\nR₂ : Type u_2\nR₃ : Type u_3\ninst✝⁷ : Semiring R₁\ninst✝⁶ : Semiring R₂\ninst✝⁵ : Semiring R₃\nσ₁₂ : R₁ →+* R₂\nσ₂₃ : R₂ →+* R₃\nM₁ : Type u_4\nM₂ : Type u_5\nM₃ : Type u_6\ninst✝⁴ : TopologicalSpace M₁\ninst✝³ : TopologicalSpace M₂\ninst✝² : TopologicalSpace M₃\ninst✝¹ : AddCommMonoid M₁\ninst✝ : Module R₁ M₁\nf : M₁ → M₂\ng : M₂ → M₃\nhg : Continuous g\nK : Set M₂\nhK : IsCompact K\nhKf : f ⁻¹' K ∈ 𝓝 0\n⊢ IsCompactOperator (g ∘ f)\n[PROOFSTEP]\nrefine' ⟨g '' K, hK.image hg, mem_of_superset hKf _⟩\n[GOAL]\ncase intro.intro\nR₁ : Type u_1\nR₂ : Type u_2\nR₃ : Type u_3\ninst✝⁷ : Semiring R₁\ninst✝⁶ : Semiring R₂\ninst✝⁵ : Semiring R₃\nσ₁₂ : R₁ →+* R₂\nσ₂₃ : R₂ →+* R₃\nM₁ : Type u_4\nM₂ : Type u_5\nM₃ : Type u_6\ninst✝⁴ : TopologicalSpace M₁\ninst✝³ : TopologicalSpace M₂\ninst✝² : TopologicalSpace M₃\ninst✝¹ : AddCommMonoid M₁\ninst✝ : Module R₁ M₁\nf : M₁ → M₂\ng : M₂ → M₃\nhg : Continuous g\nK : Set M₂\nhK : IsCompact K\nhKf : f ⁻¹' K ∈ 𝓝 0\n⊢ f ⁻¹' K ⊆ g ∘ f ⁻¹' (g '' K)\n[PROOFSTEP]\nrw [preimage_comp]\n[GOAL]\ncase intro.intro\nR₁ : Type u_1\nR₂ : Type u_2\nR₃ : Type u_3\ninst✝⁷ : Semiring R₁\ninst✝⁶ : Semiring R₂\ninst✝⁵ : Semiring R₃\nσ₁₂ : R₁ →+* R₂\nσ₂₃ : R₂ →+* R₃\nM₁ : Type u_4\nM₂ : Type u_5\nM₃ : Type u_6\ninst✝⁴ : TopologicalSpace M₁\ninst✝³ : TopologicalSpace M₂\ninst✝² : TopologicalSpace M₃\ninst✝¹ : AddCommMonoid M₁\ninst✝ : Module R₁ M₁\nf : M₁ → M₂\ng : M₂ → M₃\nhg : Continuous g\nK : Set M₂\nhK : IsCompact K\nhKf : f ⁻¹' K ∈ 𝓝 0\n⊢ f ⁻¹' K ⊆ f ⁻¹' (g ⁻¹' (g '' K))\n[PROOFSTEP]\nexact preimage_mono (subset_preimage_image _ _)\n[GOAL]\n𝕜₁ : Type u_1\n𝕜₂ : Type u_2\ninst✝¹² : NontriviallyNormedField 𝕜₁\ninst✝¹¹ : NontriviallyNormedField 𝕜₂\nσ₁₂ : 𝕜₁ →+* 𝕜₂\ninst✝¹⁰ : RingHomIsometric σ₁₂\nM₁ : Type u_3\nM₂ : Type u_4\ninst✝⁹ : TopologicalSpace M₁\ninst✝⁸ : AddCommGroup M₁\ninst✝⁷ : TopologicalSpace M₂\ninst✝⁶ : AddCommGroup M₂\ninst✝⁵ : Module 𝕜₁ M₁\ninst✝⁴ : Module 𝕜₂ M₂\ninst✝³ : TopologicalAddGroup M₁\ninst✝² : ContinuousConstSMul 𝕜₁ M₁\ninst✝¹ : TopologicalAddGroup M₂\ninst✝ : ContinuousSMul 𝕜₂ M₂\nf : M₁ →ₛₗ[σ₁₂] M₂\nhf : IsCompactOperator ↑f\n⊢ Continuous ↑f\n[PROOFSTEP]\nletI : UniformSpace M₂ := TopologicalAddGroup.toUniformSpace _\n[GOAL]\n𝕜₁ : Type u_1\n𝕜₂ : Type u_2\ninst✝¹² : NontriviallyNormedField 𝕜₁\ninst✝¹¹ : NontriviallyNormedField 𝕜₂\nσ₁₂ : 𝕜₁ →+* 𝕜₂\ninst✝¹⁰ : RingHomIsometric σ₁₂\nM₁ : Type u_3\nM₂ : Type u_4\ninst✝⁹ : TopologicalSpace M₁\ninst✝⁸ : AddCommGroup M₁\ninst✝⁷ : TopologicalSpace M₂\ninst✝⁶ : AddCommGroup M₂\ninst✝⁵ : Module 𝕜₁ M₁\ninst✝⁴ : Module 𝕜₂ M₂\ninst✝³ : TopologicalAddGroup M₁\ninst✝² : ContinuousConstSMul 𝕜₁ M₁\ninst✝¹ : TopologicalAddGroup M₂\ninst✝ : ContinuousSMul 𝕜₂ M₂\nf : M₁ →ₛₗ[σ₁₂] M₂\nhf : IsCompactOperator ↑f\nthis : UniformSpace M₂ := TopologicalAddGroup.toUniformSpace M₂\n⊢ Continuous ↑f\n[PROOFSTEP]\nhaveI : UniformAddGroup M₂ := comm_topologicalAddGroup_is_uniform\n[GOAL]\n𝕜₁ : Type u_1\n𝕜₂ : Type u_2\ninst✝¹² : NontriviallyNormedField 𝕜₁\ninst✝¹¹ : NontriviallyNormedField 𝕜₂\nσ₁₂ : 𝕜₁ →+* 𝕜₂\ninst✝¹⁰ : RingHomIsometric σ₁₂\nM₁ : Type u_3\nM₂ : Type u_4\ninst✝⁹ : TopologicalSpace M₁\ninst✝⁸ : AddCommGroup M₁\ninst✝⁷ : TopologicalSpace M₂\ninst✝⁶ : AddCommGroup M₂\ninst✝⁵ : Module 𝕜₁ M₁\ninst✝⁴ : Module 𝕜₂ M₂\ninst✝³ : TopologicalAddGroup M₁\ninst✝² : ContinuousConstSMul 𝕜₁ M₁\ninst✝¹ : TopologicalAddGroup M₂\ninst✝ : ContinuousSMul 𝕜₂ M₂\nf : M₁ →ₛₗ[σ₁₂] M₂\nhf : IsCompactOperator ↑f\nthis✝ : UniformSpace M₂ := TopologicalAddGroup.toUniformSpace M₂\nthis : UniformAddGroup M₂\n⊢ Continuous ↑f\n[PROOFSTEP]\nrefine' continuous_of_continuousAt_zero f fun U hU => _\n[GOAL]\n𝕜₁ : Type u_1\n𝕜₂ : Type u_2\ninst✝¹² : NontriviallyNormedField 𝕜₁\ninst✝¹¹ : NontriviallyNormedField 𝕜₂\nσ₁₂ : 𝕜₁ →+* 𝕜₂\ninst✝¹⁰ : RingHomIsometric σ₁₂\nM₁ : Type u_3\nM₂ : Type u_4\ninst✝⁹ : TopologicalSpace M₁\ninst✝⁸ : AddCommGroup M₁\ninst✝⁷ : TopologicalSpace M₂\ninst✝⁶ : AddCommGroup M₂\ninst✝⁵ : Module 𝕜₁ M₁\ninst✝⁴ : Module 𝕜₂ M₂\ninst✝³ : TopologicalAddGroup M₁\ninst✝² : ContinuousConstSMul 𝕜₁ M₁\ninst✝¹ : TopologicalAddGroup M₂\ninst✝ : ContinuousSMul 𝕜₂ M₂\nf : M₁ →ₛₗ[σ₁₂] M₂\nhf : IsCompactOperator ↑f\nthis✝ : UniformSpace M₂ := TopologicalAddGroup.toUniformSpace M₂\nthis : UniformAddGroup M₂\nU : Set M₂\nhU : U ∈ 𝓝 (↑f 0)\n⊢ U ∈ map (↑f) (𝓝 0)\n[PROOFSTEP]\nrw [map_zero] at hU \n[GOAL]\n𝕜₁ : Type u_1\n𝕜₂ : Type u_2\ninst✝¹² : NontriviallyNormedField 𝕜₁\ninst✝¹¹ : NontriviallyNormedField 𝕜₂\nσ₁₂ : 𝕜₁ →+* 𝕜₂\ninst✝¹⁰ : RingHomIsometric σ₁₂\nM₁ : Type u_3\nM₂ : Type u_4\ninst✝⁹ : TopologicalSpace M₁\ninst✝⁸ : AddCommGroup M₁\ninst✝⁷ : TopologicalSpace M₂\ninst✝⁶ : AddCommGroup M₂\ninst✝⁵ : Module 𝕜₁ M₁\ninst✝⁴ : Module 𝕜₂ M₂\ninst✝³ : TopologicalAddGroup M₁\ninst✝² : ContinuousConstSMul 𝕜₁ M₁\ninst✝¹ : TopologicalAddGroup M₂\ninst✝ : ContinuousSMul 𝕜₂ M₂\nf : M₁ →ₛₗ[σ₁₂] M₂\nhf : IsCompactOperator ↑f\nthis✝ : UniformSpace M₂ := TopologicalAddGroup.toUniformSpace M₂\nthis : UniformAddGroup M₂\nU : Set M₂\nhU : U ∈ 𝓝 0\n⊢ U ∈ map (↑f) (𝓝 0)\n[PROOFSTEP]\nrcases hf with\n  ⟨K, hK, hKf⟩\n    -- But any compact set is totally bounded, hence Von-Neumann bounded. Thus, `K` absorbs `U`.\n      -- This gives `r > 0` such that `∀ a : 𝕜₂, r ≤ ‖a‖ → K ⊆ a • U`.\n[GOAL]\ncase intro.intro\n𝕜₁ : Type u_1\n𝕜₂ : Type u_2\ninst✝¹² : NontriviallyNormedField 𝕜₁\ninst✝¹¹ : NontriviallyNormedField 𝕜₂\nσ₁₂ : 𝕜₁ →+* 𝕜₂\ninst✝¹⁰ : RingHomIsometric σ₁₂\nM₁ : Type u_3\nM₂ : Type u_4\ninst✝⁹ : TopologicalSpace M₁\ninst✝⁸ : AddCommGroup M₁\ninst✝⁷ : TopologicalSpace M₂\ninst✝⁶ : AddCommGroup M₂\ninst✝⁵ : Module 𝕜₁ M₁\ninst✝⁴ : Module 𝕜₂ M₂\ninst✝³ : TopologicalAddGroup M₁\ninst✝² : ContinuousConstSMul 𝕜₁ M₁\ninst✝¹ : TopologicalAddGroup M₂\ninst✝ : ContinuousSMul 𝕜₂ M₂\nf : M₁ →ₛₗ[σ₁₂] M₂\nthis✝ : UniformSpace M₂ := TopologicalAddGroup.toUniformSpace M₂\nthis : UniformAddGroup M₂\nU : Set M₂\nhU : U ∈ 𝓝 0\nK : Set M₂\nhK : IsCompact K\nhKf : ↑f ⁻¹' K ∈ 𝓝 0\n⊢ U ∈ map (↑f) (𝓝 0)\n[PROOFSTEP]\nrcases hK.totallyBounded.isVonNBounded 𝕜₂ hU with\n  ⟨r, hr, hrU⟩\n    -- Choose `c : 𝕜₂` with `r < ‖c‖`.\n[GOAL]\ncase intro.intro.intro.intro\n𝕜₁ : Type u_1\n𝕜₂ : Type u_2\ninst✝¹² : NontriviallyNormedField 𝕜₁\ninst✝¹¹ : NontriviallyNormedField 𝕜₂\nσ₁₂ : 𝕜₁ →+* 𝕜₂\ninst✝¹⁰ : RingHomIsometric σ₁₂\nM₁ : Type u_3\nM₂ : Type u_4\ninst✝⁹ : TopologicalSpace M₁\ninst✝⁸ : AddCommGroup M₁\ninst✝⁷ : TopologicalSpace M₂\ninst✝⁶ : AddCommGroup M₂\ninst✝⁵ : Module 𝕜₁ M₁\ninst✝⁴ : Module 𝕜₂ M₂\ninst✝³ : TopologicalAddGroup M₁\ninst✝² : ContinuousConstSMul 𝕜₁ M₁\ninst✝¹ : TopologicalAddGroup M₂\ninst✝ : ContinuousSMul 𝕜₂ M₂\nf : M₁ →ₛₗ[σ₁₂] M₂\nthis✝ : UniformSpace M₂ := TopologicalAddGroup.toUniformSpace M₂\nthis : UniformAddGroup M₂\nU : Set M₂\nhU : U ∈ 𝓝 0\nK : Set M₂\nhK : IsCompact K\nhKf : ↑f ⁻¹' K ∈ 𝓝 0\nr : ℝ\nhr : 0 < r\nhrU : ∀ (a : 𝕜₂), r ≤ ‖a‖ → K ⊆ a • U\n⊢ U ∈ map (↑f) (𝓝 0)\n[PROOFSTEP]\nrcases NormedField.exists_lt_norm 𝕜₁ r with ⟨c, hc⟩\n[GOAL]\ncase intro.intro.intro.intro.intro\n𝕜₁ : Type u_1\n𝕜₂ : Type u_2\ninst✝¹² : NontriviallyNormedField 𝕜₁\ninst✝¹¹ : NontriviallyNormedField 𝕜₂\nσ₁₂ : 𝕜₁ →+* 𝕜₂\ninst✝¹⁰ : RingHomIsometric σ₁₂\nM₁ : Type u_3\nM₂ : Type u_4\ninst✝⁹ : TopologicalSpace M₁\ninst✝⁸ : AddCommGroup M₁\ninst✝⁷ : TopologicalSpace M₂\ninst✝⁶ : AddCommGroup M₂\ninst✝⁵ : Module 𝕜₁ M₁\ninst✝⁴ : Module 𝕜₂ M₂\ninst✝³ : TopologicalAddGroup M₁\ninst✝² : ContinuousConstSMul 𝕜₁ M₁\ninst✝¹ : TopologicalAddGroup M₂\ninst✝ : ContinuousSMul 𝕜₂ M₂\nf : M₁ →ₛₗ[σ₁₂] M₂\nthis✝ : UniformSpace M₂ := TopologicalAddGroup.toUniformSpace M₂\nthis : UniformAddGroup M₂\nU : Set M₂\nhU : U ∈ 𝓝 0\nK : Set M₂\nhK : IsCompact K\nhKf : ↑f ⁻¹' K ∈ 𝓝 0\nr : ℝ\nhr : 0 < r\nhrU : ∀ (a : 𝕜₂), r ≤ ‖a‖ → K ⊆ a • U\nc : 𝕜₁\nhc : r < ‖c‖\n⊢ U ∈ map (↑f) (𝓝 0)\n[PROOFSTEP]\nhave hcnz : c ≠ 0 := ne_zero_of_norm_ne_zero (hr.trans hc).ne.symm\n[GOAL]\ncase intro.intro.intro.intro.intro\n𝕜₁ : Type u_1\n𝕜₂ : Type u_2\ninst✝¹² : NontriviallyNormedField 𝕜₁\ninst✝¹¹ : NontriviallyNormedField 𝕜₂\nσ₁₂ : 𝕜₁ →+* 𝕜₂\ninst✝¹⁰ : RingHomIsometric σ₁₂\nM₁ : Type u_3\nM₂ : Type u_4\ninst✝⁹ : TopologicalSpace M₁\ninst✝⁸ : AddCommGroup M₁\ninst✝⁷ : TopologicalSpace M₂\ninst✝⁶ : AddCommGroup M₂\ninst✝⁵ : Module 𝕜₁ M₁\ninst✝⁴ : Module 𝕜₂ M₂\ninst✝³ : TopologicalAddGroup M₁\ninst✝² : ContinuousConstSMul 𝕜₁ M₁\ninst✝¹ : TopologicalAddGroup M₂\ninst✝ : ContinuousSMul 𝕜₂ M₂\nf : M₁ →ₛₗ[σ₁₂] M₂\nthis✝ : UniformSpace M₂ := TopologicalAddGroup.toUniformSpace M₂\nthis : UniformAddGroup M₂\nU : Set M₂\nhU : U ∈ 𝓝 0\nK : Set M₂\nhK : IsCompact K\nhKf : ↑f ⁻¹' K ∈ 𝓝 0\nr : ℝ\nhr : 0 < r\nhrU : ∀ (a : 𝕜₂), r ≤ ‖a‖ → K ⊆ a • U\nc : 𝕜₁\nhc : r < ‖c‖\nhcnz : c ≠ 0\n⊢ U ∈ map (↑f) (𝓝 0)\n[PROOFSTEP]\nsuffices (σ₁₂ <| c⁻¹) • K ⊆ U by\n  refine' mem_of_superset _ this\n  have : IsUnit c⁻¹ := hcnz.isUnit.inv\n  rwa [mem_map, preimage_smul_setₛₗ _ _ _ f this, set_smul_mem_nhds_zero_iff (inv_ne_zero hcnz)]\n    -- Since `σ₁₂ c⁻¹` = `(σ₁₂ c)⁻¹`, we have to prove that `K ⊆ σ₁₂ c • U`.\n[GOAL]\n𝕜₁ : Type u_1\n𝕜₂ : Type u_2\ninst✝¹² : NontriviallyNormedField 𝕜₁\ninst✝¹¹ : NontriviallyNormedField 𝕜₂\nσ₁₂ : 𝕜₁ →+* 𝕜₂\ninst✝¹⁰ : RingHomIsometric σ₁₂\nM₁ : Type u_3\nM₂ : Type u_4\ninst✝⁹ : TopologicalSpace M₁\ninst✝⁸ : AddCommGroup M₁\ninst✝⁷ : TopologicalSpace M₂\ninst✝⁶ : AddCommGroup M₂\ninst✝⁵ : Module 𝕜₁ M₁\ninst✝⁴ : Module 𝕜₂ M₂\ninst✝³ : TopologicalAddGroup M₁\ninst✝² : ContinuousConstSMul 𝕜₁ M₁\ninst✝¹ : TopologicalAddGroup M₂\ninst✝ : ContinuousSMul 𝕜₂ M₂\nf : M₁ →ₛₗ[σ₁₂] M₂\nthis✝¹ : UniformSpace M₂ := TopologicalAddGroup.toUniformSpace M₂\nthis✝ : UniformAddGroup M₂\nU : Set M₂\nhU : U ∈ 𝓝 0\nK : Set M₂\nhK : IsCompact K\nhKf : ↑f ⁻¹' K ∈ 𝓝 0\nr : ℝ\nhr : 0 < r\nhrU : ∀ (a : 𝕜₂), r ≤ ‖a‖ → K ⊆ a • U\nc : 𝕜₁\nhc : r < ‖c‖\nhcnz : c ≠ 0\nthis : ↑σ₁₂ c⁻¹ • K ⊆ U\n⊢ U ∈ map (↑f) (𝓝 0)\n[PROOFSTEP]\nrefine' mem_of_superset _ this\n[GOAL]\n𝕜₁ : Type u_1\n𝕜₂ : Type u_2\ninst✝¹² : NontriviallyNormedField 𝕜₁\ninst✝¹¹ : NontriviallyNormedField 𝕜₂\nσ₁₂ : 𝕜₁ →+* 𝕜₂\ninst✝¹⁰ : RingHomIsometric σ₁₂\nM₁ : Type u_3\nM₂ : Type u_4\ninst✝⁹ : TopologicalSpace M₁\ninst✝⁸ : AddCommGroup M₁\ninst✝⁷ : TopologicalSpace M₂\ninst✝⁶ : AddCommGroup M₂\ninst✝⁵ : Module 𝕜₁ M₁\ninst✝⁴ : Module 𝕜₂ M₂\ninst✝³ : TopologicalAddGroup M₁\ninst✝² : ContinuousConstSMul 𝕜₁ M₁\ninst✝¹ : TopologicalAddGroup M₂\ninst✝ : ContinuousSMul 𝕜₂ M₂\nf : M₁ →ₛₗ[σ₁₂] M₂\nthis✝¹ : UniformSpace M₂ := TopologicalAddGroup.toUniformSpace M₂\nthis✝ : UniformAddGroup M₂\nU : Set M₂\nhU : U ∈ 𝓝 0\nK : Set M₂\nhK : IsCompact K\nhKf : ↑f ⁻¹' K ∈ 𝓝 0\nr : ℝ\nhr : 0 < r\nhrU : ∀ (a : 𝕜₂), r ≤ ‖a‖ → K ⊆ a • U\nc : 𝕜₁\nhc : r < ‖c‖\nhcnz : c ≠ 0\nthis : ↑σ₁₂ c⁻¹ • K ⊆ U\n⊢ ↑σ₁₂ c⁻¹ • K ∈ map (↑f) (𝓝 0)\n[PROOFSTEP]\nhave : IsUnit c⁻¹ := hcnz.isUnit.inv\n[GOAL]\n𝕜₁ : Type u_1\n𝕜₂ : Type u_2\ninst✝¹² : NontriviallyNormedField 𝕜₁\ninst✝¹¹ : NontriviallyNormedField 𝕜₂\nσ₁₂ : 𝕜₁ →+* 𝕜₂\ninst✝¹⁰ : RingHomIsometric σ₁₂\nM₁ : Type u_3\nM₂ : Type u_4\ninst✝⁹ : TopologicalSpace M₁\ninst✝⁸ : AddCommGroup M₁\ninst✝⁷ : TopologicalSpace M₂\ninst✝⁶ : AddCommGroup M₂\ninst✝⁵ : Module 𝕜₁ M₁\ninst✝⁴ : Module 𝕜₂ M₂\ninst✝³ : TopologicalAddGroup M₁\ninst✝² : ContinuousConstSMul 𝕜₁ M₁\ninst✝¹ : TopologicalAddGroup M₂\ninst✝ : ContinuousSMul 𝕜₂ M₂\nf : M₁ →ₛₗ[σ₁₂] M₂\nthis✝² : UniformSpace M₂ := TopologicalAddGroup.toUniformSpace M₂\nthis✝¹ : UniformAddGroup M₂\nU : Set M₂\nhU : U ∈ 𝓝 0\nK : Set M₂\nhK : IsCompact K\nhKf : ↑f ⁻¹' K ∈ 𝓝 0\nr : ℝ\nhr : 0 < r\nhrU : ∀ (a : 𝕜₂), r ≤ ‖a‖ → K ⊆ a • U\nc : 𝕜₁\nhc : r < ‖c‖\nhcnz : c ≠ 0\nthis✝ : ↑σ₁₂ c⁻¹ • K ⊆ U\nthis : IsUnit c⁻¹\n⊢ ↑σ₁₂ c⁻¹ • K ∈ map (↑f) (𝓝 0)\n[PROOFSTEP]\nrwa [mem_map, preimage_smul_setₛₗ _ _ _ f this, set_smul_mem_nhds_zero_iff (inv_ne_zero hcnz)]\n  -- Since `σ₁₂ c⁻¹` = `(σ₁₂ c)⁻¹`, we have to prove that `K ⊆ σ₁₂ c • U`.\n[GOAL]\ncase intro.intro.intro.intro.intro\n𝕜₁ : Type u_1\n𝕜₂ : Type u_2\ninst✝¹² : NontriviallyNormedField 𝕜₁\ninst✝¹¹ : NontriviallyNormedField 𝕜₂\nσ₁₂ : 𝕜₁ →+* 𝕜₂\ninst✝¹⁰ : RingHomIsometric σ₁₂\nM₁ : Type u_3\nM₂ : Type u_4\ninst✝⁹ : TopologicalSpace M₁\ninst✝⁸ : AddCommGroup M₁\ninst✝⁷ : TopologicalSpace M₂\ninst✝⁶ : AddCommGroup M₂\ninst✝⁵ : Module 𝕜₁ M₁\ninst✝⁴ : Module 𝕜₂ M₂\ninst✝³ : TopologicalAddGroup M₁\ninst✝² : ContinuousConstSMul 𝕜₁ M₁\ninst✝¹ : TopologicalAddGroup M₂\ninst✝ : ContinuousSMul 𝕜₂ M₂\nf : M₁ →ₛₗ[σ₁₂] M₂\nthis✝ : UniformSpace M₂ := TopologicalAddGroup.toUniformSpace M₂\nthis : UniformAddGroup M₂\nU : Set M₂\nhU : U ∈ 𝓝 0\nK : Set M₂\nhK : IsCompact K\nhKf : ↑f ⁻¹' K ∈ 𝓝 0\nr : ℝ\nhr : 0 < r\nhrU : ∀ (a : 𝕜₂), r ≤ ‖a‖ → K ⊆ a • U\nc : 𝕜₁\nhc : r < ‖c‖\nhcnz : c ≠ 0\n⊢ ↑σ₁₂ c⁻¹ • K ⊆ U\n[PROOFSTEP]\nrw [map_inv₀, ← subset_set_smul_iff₀ ((map_ne_zero σ₁₂).mpr hcnz)]\n  -- But `σ₁₂` is isometric, so `‖σ₁₂ c‖ = ‖c‖ > r`, which concludes the argument since\n    -- `∀ a : 𝕜₂, r ≤ ‖a‖ → K ⊆ a • U`.\n[GOAL]\ncase intro.intro.intro.intro.intro\n𝕜₁ : Type u_1\n𝕜₂ : Type u_2\ninst✝¹² : NontriviallyNormedField 𝕜₁\ninst✝¹¹ : NontriviallyNormedField 𝕜₂\nσ₁₂ : 𝕜₁ →+* 𝕜₂\ninst✝¹⁰ : RingHomIsometric σ₁₂\nM₁ : Type u_3\nM₂ : Type u_4\ninst✝⁹ : TopologicalSpace M₁\ninst✝⁸ : AddCommGroup M₁\ninst✝⁷ : TopologicalSpace M₂\ninst✝⁶ : AddCommGroup M₂\ninst✝⁵ : Module 𝕜₁ M₁\ninst✝⁴ : Module 𝕜₂ M₂\ninst✝³ : TopologicalAddGroup M₁\ninst✝² : ContinuousConstSMul 𝕜₁ M₁\ninst✝¹ : TopologicalAddGroup M₂\ninst✝ : ContinuousSMul 𝕜₂ M₂\nf : M₁ →ₛₗ[σ₁₂] M₂\nthis✝ : UniformSpace M₂ := TopologicalAddGroup.toUniformSpace M₂\nthis : UniformAddGroup M₂\nU : Set M₂\nhU : U ∈ 𝓝 0\nK : Set M₂\nhK : IsCompact K\nhKf : ↑f ⁻¹' K ∈ 𝓝 0\nr : ℝ\nhr : 0 < r\nhrU : ∀ (a : 𝕜₂), r ≤ ‖a‖ → K ⊆ a • U\nc : 𝕜₁\nhc : r < ‖c‖\nhcnz : c ≠ 0\n⊢ K ⊆ ↑σ₁₂ c • U\n[PROOFSTEP]\nrefine' hrU (σ₁₂ c) _\n[GOAL]\ncase intro.intro.intro.intro.intro\n𝕜₁ : Type u_1\n𝕜₂ : Type u_2\ninst✝¹² : NontriviallyNormedField 𝕜₁\ninst✝¹¹ : NontriviallyNormedField 𝕜₂\nσ₁₂ : 𝕜₁ →+* 𝕜₂\ninst✝¹⁰ : RingHomIsometric σ₁₂\nM₁ : Type u_3\nM₂ : Type u_4\ninst✝⁹ : TopologicalSpace M₁\ninst✝⁸ : AddCommGroup M₁\ninst✝⁷ : TopologicalSpace M₂\ninst✝⁶ : AddCommGroup M₂\ninst✝⁵ : Module 𝕜₁ M₁\ninst✝⁴ : Module 𝕜₂ M₂\ninst✝³ : TopologicalAddGroup M₁\ninst✝² : ContinuousConstSMul 𝕜₁ M₁\ninst✝¹ : TopologicalAddGroup M₂\ninst✝ : ContinuousSMul 𝕜₂ M₂\nf : M₁ →ₛₗ[σ₁₂] M₂\nthis✝ : UniformSpace M₂ := TopologicalAddGroup.toUniformSpace M₂\nthis : UniformAddGroup M₂\nU : Set M₂\nhU : U ∈ 𝓝 0\nK : Set M₂\nhK : IsCompact K\nhKf : ↑f ⁻¹' K ∈ 𝓝 0\nr : ℝ\nhr : 0 < r\nhrU : ∀ (a : 𝕜₂), r ≤ ‖a‖ → K ⊆ a • U\nc : 𝕜₁\nhc : r < ‖c‖\nhcnz : c ≠ 0\n⊢ r ≤ ‖↑σ₁₂ c‖\n[PROOFSTEP]\nrw [RingHomIsometric.is_iso]\n[GOAL]\ncase intro.intro.intro.intro.intro\n𝕜₁ : Type u_1\n𝕜₂ : Type u_2\ninst✝¹² : NontriviallyNormedField 𝕜₁\ninst✝¹¹ : NontriviallyNormedField 𝕜₂\nσ₁₂ : 𝕜₁ →+* 𝕜₂\ninst✝¹⁰ : RingHomIsometric σ₁₂\nM₁ : Type u_3\nM₂ : Type u_4\ninst✝⁹ : TopologicalSpace M₁\ninst✝⁸ : AddCommGroup M₁\ninst✝⁷ : TopologicalSpace M₂\ninst✝⁶ : AddCommGroup M₂\ninst✝⁵ : Module 𝕜₁ M₁\ninst✝⁴ : Module 𝕜₂ M₂\ninst✝³ : TopologicalAddGroup M₁\ninst✝² : ContinuousConstSMul 𝕜₁ M₁\ninst✝¹ : TopologicalAddGroup M₂\ninst✝ : ContinuousSMul 𝕜₂ M₂\nf : M₁ →ₛₗ[σ₁₂] M₂\nthis✝ : UniformSpace M₂ := TopologicalAddGroup.toUniformSpace M₂\nthis : UniformAddGroup M₂\nU : Set M₂\nhU : U ∈ 𝓝 0\nK : Set M₂\nhK : IsCompact K\nhKf : ↑f ⁻¹' K ∈ 𝓝 0\nr : ℝ\nhr : 0 < r\nhrU : ∀ (a : 𝕜₂), r ≤ ‖a‖ → K ⊆ a • U\nc : 𝕜₁\nhc : r < ‖c‖\nhcnz : c ≠ 0\n⊢ r ≤ ‖c‖\n[PROOFSTEP]\nexact hc.le\n[GOAL]\n𝕜₁ : Type u_1\n𝕜₂ : Type u_2\ninst✝¹⁰ : NontriviallyNormedField 𝕜₁\ninst✝⁹ : NormedField 𝕜₂\nσ₁₂ : 𝕜₁ →+* 𝕜₂\nM₁ : Type u_3\nM₂ : Type u_4\ninst✝⁸ : SeminormedAddCommGroup M₁\ninst✝⁷ : AddCommGroup M₂\ninst✝⁶ : NormedSpace 𝕜₁ M₁\ninst✝⁵ : Module 𝕜₂ M₂\ninst✝⁴ : UniformSpace M₂\ninst✝³ : UniformAddGroup M₂\ninst✝² : ContinuousConstSMul 𝕜₂ M₂\ninst✝¹ : T2Space M₂\ninst✝ : CompleteSpace M₂\n⊢ IsClosed {f | IsCompactOperator ↑f}\n[PROOFSTEP]\nrefine' isClosed_of_closure_subset _\n[GOAL]\n𝕜₁ : Type u_1\n𝕜₂ : Type u_2\ninst✝¹⁰ : NontriviallyNormedField 𝕜₁\ninst✝⁹ : NormedField 𝕜₂\nσ₁₂ : 𝕜₁ →+* 𝕜₂\nM₁ : Type u_3\nM₂ : Type u_4\ninst✝⁸ : SeminormedAddCommGroup M₁\ninst✝⁷ : AddCommGroup M₂\ninst✝⁶ : NormedSpace 𝕜₁ M₁\ninst✝⁵ : Module 𝕜₂ M₂\ninst✝⁴ : UniformSpace M₂\ninst✝³ : UniformAddGroup M₂\ninst✝² : ContinuousConstSMul 𝕜₂ M₂\ninst✝¹ : T2Space M₂\ninst✝ : CompleteSpace M₂\n⊢ closure {f | IsCompactOperator ↑f} ⊆ {f | IsCompactOperator ↑f}\n[PROOFSTEP]\nrintro u hu\n[GOAL]\n𝕜₁ : Type u_1\n𝕜₂ : Type u_2\ninst✝¹⁰ : NontriviallyNormedField 𝕜₁\ninst✝⁹ : NormedField 𝕜₂\nσ₁₂ : 𝕜₁ →+* 𝕜₂\nM₁ : Type u_3\nM₂ : Type u_4\ninst✝⁸ : SeminormedAddCommGroup M₁\ninst✝⁷ : AddCommGroup M₂\ninst✝⁶ : NormedSpace 𝕜₁ M₁\ninst✝⁵ : Module 𝕜₂ M₂\ninst✝⁴ : UniformSpace M₂\ninst✝³ : UniformAddGroup M₂\ninst✝² : ContinuousConstSMul 𝕜₂ M₂\ninst✝¹ : T2Space M₂\ninst✝ : CompleteSpace M₂\nu : M₁ →SL[σ₁₂] M₂\nhu : u ∈ closure {f | IsCompactOperator ↑f}\n⊢ u ∈ {f | IsCompactOperator ↑f}\n[PROOFSTEP]\nrw [mem_closure_iff_nhds_zero] at hu \n[GOAL]\n𝕜₁ : Type u_1\n𝕜₂ : Type u_2\ninst✝¹⁰ : NontriviallyNormedField 𝕜₁\ninst✝⁹ : NormedField 𝕜₂\nσ₁₂ : 𝕜₁ →+* 𝕜₂\nM₁ : Type u_3\nM₂ : Type u_4\ninst✝⁸ : SeminormedAddCommGroup M₁\ninst✝⁷ : AddCommGroup M₂\ninst✝⁶ : NormedSpace 𝕜₁ M₁\ninst✝⁵ : Module 𝕜₂ M₂\ninst✝⁴ : UniformSpace M₂\ninst✝³ : UniformAddGroup M₂\ninst✝² : ContinuousConstSMul 𝕜₂ M₂\ninst✝¹ : T2Space M₂\ninst✝ : CompleteSpace M₂\nu : M₁ →SL[σ₁₂] M₂\nhu✝ : u ∈ closure {f | IsCompactOperator ↑f}\nhu : ∀ (U : Set (M₁ →SL[σ₁₂] M₂)), U ∈ 𝓝 0 → ∃ y, y ∈ {f | IsCompactOperator ↑f} ∧ y - u ∈ U\n⊢ u ∈ {f | IsCompactOperator ↑f}\n[PROOFSTEP]\nsuffices TotallyBounded (u '' Metric.closedBall 0 1)\n  by\n  change IsCompactOperator (u : M₁ →ₛₗ[σ₁₂] M₂)\n  rw [isCompactOperator_iff_isCompact_closure_image_closedBall (u : M₁ →ₛₗ[σ₁₂] M₂) zero_lt_one]\n  exact isCompact_of_totallyBounded_isClosed this.closure isClosed_closure\n[GOAL]\n𝕜₁ : Type u_1\n𝕜₂ : Type u_2\ninst✝¹⁰ : NontriviallyNormedField 𝕜₁\ninst✝⁹ : NormedField 𝕜₂\nσ₁₂ : 𝕜₁ →+* 𝕜₂\nM₁ : Type u_3\nM₂ : Type u_4\ninst✝⁸ : SeminormedAddCommGroup M₁\ninst✝⁷ : AddCommGroup M₂\ninst✝⁶ : NormedSpace 𝕜₁ M₁\ninst✝⁵ : Module 𝕜₂ M₂\ninst✝⁴ : UniformSpace M₂\ninst✝³ : UniformAddGroup M₂\ninst✝² : ContinuousConstSMul 𝕜₂ M₂\ninst✝¹ : T2Space M₂\ninst✝ : CompleteSpace M₂\nu : M₁ →SL[σ₁₂] M₂\nhu✝ : u ∈ closure {f | IsCompactOperator ↑f}\nhu : ∀ (U : Set (M₁ →SL[σ₁₂] M₂)), U ∈ 𝓝 0 → ∃ y, y ∈ {f | IsCompactOperator ↑f} ∧ y - u ∈ U\nthis : TotallyBounded (↑u '' closedBall 0 1)\n⊢ u ∈ {f | IsCompactOperator ↑f}\n[PROOFSTEP]\nchange IsCompactOperator (u : M₁ →ₛₗ[σ₁₂] M₂)\n[GOAL]\n𝕜₁ : Type u_1\n𝕜₂ : Type u_2\ninst✝¹⁰ : NontriviallyNormedField 𝕜₁\ninst✝⁹ : NormedField 𝕜₂\nσ₁₂ : 𝕜₁ →+* 𝕜₂\nM₁ : Type u_3\nM₂ : Type u_4\ninst✝⁸ : SeminormedAddCommGroup M₁\ninst✝⁷ : AddCommGroup M₂\ninst✝⁶ : NormedSpace 𝕜₁ M₁\ninst✝⁵ : Module 𝕜₂ M₂\ninst✝⁴ : UniformSpace M₂\ninst✝³ : UniformAddGroup M₂\ninst✝² : ContinuousConstSMul 𝕜₂ M₂\ninst✝¹ : T2Space M₂\ninst✝ : CompleteSpace M₂\nu : M₁ →SL[σ₁₂] M₂\nhu✝ : u ∈ closure {f | IsCompactOperator ↑f}\nhu : ∀ (U : Set (M₁ →SL[σ₁₂] M₂)), U ∈ 𝓝 0 → ∃ y, y ∈ {f | IsCompactOperator ↑f} ∧ y - u ∈ U\nthis : TotallyBounded (↑u '' closedBall 0 1)\n⊢ IsCompactOperator ↑↑u\n[PROOFSTEP]\nrw [isCompactOperator_iff_isCompact_closure_image_closedBall (u : M₁ →ₛₗ[σ₁₂] M₂) zero_lt_one]\n[GOAL]\n𝕜₁ : Type u_1\n𝕜₂ : Type u_2\ninst✝¹⁰ : NontriviallyNormedField 𝕜₁\ninst✝⁹ : NormedField 𝕜₂\nσ₁₂ : 𝕜₁ →+* 𝕜₂\nM₁ : Type u_3\nM₂ : Type u_4\ninst✝⁸ : SeminormedAddCommGroup M₁\ninst✝⁷ : AddCommGroup M₂\ninst✝⁶ : NormedSpace 𝕜₁ M₁\ninst✝⁵ : Module 𝕜₂ M₂\ninst✝⁴ : UniformSpace M₂\ninst✝³ : UniformAddGroup M₂\ninst✝² : ContinuousConstSMul 𝕜₂ M₂\ninst✝¹ : T2Space M₂\ninst✝ : CompleteSpace M₂\nu : M₁ →SL[σ₁₂] M₂\nhu✝ : u ∈ closure {f | IsCompactOperator ↑f}\nhu : ∀ (U : Set (M₁ →SL[σ₁₂] M₂)), U ∈ 𝓝 0 → ∃ y, y ∈ {f | IsCompactOperator ↑f} ∧ y - u ∈ U\nthis : TotallyBounded (↑u '' closedBall 0 1)\n⊢ IsCompact (closure (↑↑u '' closedBall 0 1))\n[PROOFSTEP]\nexact isCompact_of_totallyBounded_isClosed this.closure isClosed_closure\n[GOAL]\n𝕜₁ : Type u_1\n𝕜₂ : Type u_2\ninst✝¹⁰ : NontriviallyNormedField 𝕜₁\ninst✝⁹ : NormedField 𝕜₂\nσ₁₂ : 𝕜₁ →+* 𝕜₂\nM₁ : Type u_3\nM₂ : Type u_4\ninst✝⁸ : SeminormedAddCommGroup M₁\ninst✝⁷ : AddCommGroup M₂\ninst✝⁶ : NormedSpace 𝕜₁ M₁\ninst✝⁵ : Module 𝕜₂ M₂\ninst✝⁴ : UniformSpace M₂\ninst✝³ : UniformAddGroup M₂\ninst✝² : ContinuousConstSMul 𝕜₂ M₂\ninst✝¹ : T2Space M₂\ninst✝ : CompleteSpace M₂\nu : M₁ →SL[σ₁₂] M₂\nhu✝ : u ∈ closure {f | IsCompactOperator ↑f}\nhu : ∀ (U : Set (M₁ →SL[σ₁₂] M₂)), U ∈ 𝓝 0 → ∃ y, y ∈ {f | IsCompactOperator ↑f} ∧ y - u ∈ U\n⊢ TotallyBounded (↑u '' closedBall 0 1)\n[PROOFSTEP]\nrw [totallyBounded_iff_subset_finite_iUnion_nhds_zero]\n[GOAL]\n𝕜₁ : Type u_1\n𝕜₂ : Type u_2\ninst✝¹⁰ : NontriviallyNormedField 𝕜₁\ninst✝⁹ : NormedField 𝕜₂\nσ₁₂ : 𝕜₁ →+* 𝕜₂\nM₁ : Type u_3\nM₂ : Type u_4\ninst✝⁸ : SeminormedAddCommGroup M₁\ninst✝⁷ : AddCommGroup M₂\ninst✝⁶ : NormedSpace 𝕜₁ M₁\ninst✝⁵ : Module 𝕜₂ M₂\ninst✝⁴ : UniformSpace M₂\ninst✝³ : UniformAddGroup M₂\ninst✝² : ContinuousConstSMul 𝕜₂ M₂\ninst✝¹ : T2Space M₂\ninst✝ : CompleteSpace M₂\nu : M₁ →SL[σ₁₂] M₂\nhu✝ : u ∈ closure {f | IsCompactOperator ↑f}\nhu : ∀ (U : Set (M₁ →SL[σ₁₂] M₂)), U ∈ 𝓝 0 → ∃ y, y ∈ {f | IsCompactOperator ↑f} ∧ y - u ∈ U\n⊢ ∀ (U : Set M₂), U ∈ 𝓝 0 → ∃ t, Set.Finite t ∧ ↑u '' closedBall 0 1 ⊆ ⋃ (y : M₂) (_ : y ∈ t), y +ᵥ U\n[PROOFSTEP]\nintro U hU\n[GOAL]\n𝕜₁ : Type u_1\n𝕜₂ : Type u_2\ninst✝¹⁰ : NontriviallyNormedField 𝕜₁\ninst✝⁹ : NormedField 𝕜₂\nσ₁₂ : 𝕜₁ →+* 𝕜₂\nM₁ : Type u_3\nM₂ : Type u_4\ninst✝⁸ : SeminormedAddCommGroup M₁\ninst✝⁷ : AddCommGroup M₂\ninst✝⁶ : NormedSpace 𝕜₁ M₁\ninst✝⁵ : Module 𝕜₂ M₂\ninst✝⁴ : UniformSpace M₂\ninst✝³ : UniformAddGroup M₂\ninst✝² : ContinuousConstSMul 𝕜₂ M₂\ninst✝¹ : T2Space M₂\ninst✝ : CompleteSpace M₂\nu : M₁ →SL[σ₁₂] M₂\nhu✝ : u ∈ closure {f | IsCompactOperator ↑f}\nhu : ∀ (U : Set (M₁ →SL[σ₁₂] M₂)), U ∈ 𝓝 0 → ∃ y, y ∈ {f | IsCompactOperator ↑f} ∧ y - u ∈ U\nU : Set M₂\nhU : U ∈ 𝓝 0\n⊢ ∃ t, Set.Finite t ∧ ↑u '' closedBall 0 1 ⊆ ⋃ (y : M₂) (_ : y ∈ t), y +ᵥ U\n[PROOFSTEP]\nrcases exists_nhds_zero_half hU with ⟨V, hV, hVU⟩\n[GOAL]\ncase intro.intro\n𝕜₁ : Type u_1\n𝕜₂ : Type u_2\ninst✝¹⁰ : NontriviallyNormedField 𝕜₁\ninst✝⁹ : NormedField 𝕜₂\nσ₁₂ : 𝕜₁ →+* 𝕜₂\nM₁ : Type u_3\nM₂ : Type u_4\ninst✝⁸ : SeminormedAddCommGroup M₁\ninst✝⁷ : AddCommGroup M₂\ninst✝⁶ : NormedSpace 𝕜₁ M₁\ninst✝⁵ : Module 𝕜₂ M₂\ninst✝⁴ : UniformSpace M₂\ninst✝³ : UniformAddGroup M₂\ninst✝² : ContinuousConstSMul 𝕜₂ M₂\ninst✝¹ : T2Space M₂\ninst✝ : CompleteSpace M₂\nu : M₁ →SL[σ₁₂] M₂\nhu✝ : u ∈ closure {f | IsCompactOperator ↑f}\nhu : ∀ (U : Set (M₁ →SL[σ₁₂] M₂)), U ∈ 𝓝 0 → ∃ y, y ∈ {f | IsCompactOperator ↑f} ∧ y - u ∈ U\nU : Set M₂\nhU : U ∈ 𝓝 0\nV : Set M₂\nhV : V ∈ 𝓝 0\nhVU : ∀ (v : M₂), v ∈ V → ∀ (w : M₂), w ∈ V → v + w ∈ U\n⊢ ∃ t, Set.Finite t ∧ ↑u '' closedBall 0 1 ⊆ ⋃ (y : M₂) (_ : y ∈ t), y +ᵥ U\n[PROOFSTEP]\nlet SV : Set M₁ × Set M₂ := ⟨closedBall 0 1, -V⟩\n[GOAL]\ncase intro.intro\n𝕜₁ : Type u_1\n𝕜₂ : Type u_2\ninst✝¹⁰ : NontriviallyNormedField 𝕜₁\ninst✝⁹ : NormedField 𝕜₂\nσ₁₂ : 𝕜₁ →+* 𝕜₂\nM₁ : Type u_3\nM₂ : Type u_4\ninst✝⁸ : SeminormedAddCommGroup M₁\ninst✝⁷ : AddCommGroup M₂\ninst✝⁶ : NormedSpace 𝕜₁ M₁\ninst✝⁵ : Module 𝕜₂ M₂\ninst✝⁴ : UniformSpace M₂\ninst✝³ : UniformAddGroup M₂\ninst✝² : ContinuousConstSMul 𝕜₂ M₂\ninst✝¹ : T2Space M₂\ninst✝ : CompleteSpace M₂\nu : M₁ →SL[σ₁₂] M₂\nhu✝ : u ∈ closure {f | IsCompactOperator ↑f}\nhu : ∀ (U : Set (M₁ →SL[σ₁₂] M₂)), U ∈ 𝓝 0 → ∃ y, y ∈ {f | IsCompactOperator ↑f} ∧ y - u ∈ U\nU : Set M₂\nhU : U ∈ 𝓝 0\nV : Set M₂\nhV : V ∈ 𝓝 0\nhVU : ∀ (v : M₂), v ∈ V → ∀ (w : M₂), w ∈ V → v + w ∈ U\nSV : Set M₁ × Set M₂ := (closedBall 0 1, -V)\n⊢ ∃ t, Set.Finite t ∧ ↑u '' closedBall 0 1 ⊆ ⋃ (y : M₂) (_ : y ∈ t), y +ᵥ U\n[PROOFSTEP]\nrcases hu {f | ∀ x ∈ SV.1, f x ∈ SV.2}\n    (ContinuousLinearMap.hasBasis_nhds_zero.mem_of_mem\n      ⟨NormedSpace.isVonNBounded_closedBall _ _ _, neg_mem_nhds_zero M₂ hV⟩) with\n  ⟨v, hv, huv⟩\n[GOAL]\ncase intro.intro.intro.intro\n𝕜₁ : Type u_1\n𝕜₂ : Type u_2\ninst✝¹⁰ : NontriviallyNormedField 𝕜₁\ninst✝⁹ : NormedField 𝕜₂\nσ₁₂ : 𝕜₁ →+* 𝕜₂\nM₁ : Type u_3\nM₂ : Type u_4\ninst✝⁸ : SeminormedAddCommGroup M₁\ninst✝⁷ : AddCommGroup M₂\ninst✝⁶ : NormedSpace 𝕜₁ M₁\ninst✝⁵ : Module 𝕜₂ M₂\ninst✝⁴ : UniformSpace M₂\ninst✝³ : UniformAddGroup M₂\ninst✝² : ContinuousConstSMul 𝕜₂ M₂\ninst✝¹ : T2Space M₂\ninst✝ : CompleteSpace M₂\nu : M₁ →SL[σ₁₂] M₂\nhu✝ : u ∈ closure {f | IsCompactOperator ↑f}\nhu : ∀ (U : Set (M₁ →SL[σ₁₂] M₂)), U ∈ 𝓝 0 → ∃ y, y ∈ {f | IsCompactOperator ↑f} ∧ y - u ∈ U\nU : Set M₂\nhU : U ∈ 𝓝 0\nV : Set M₂\nhV : V ∈ 𝓝 0\nhVU : ∀ (v : M₂), v ∈ V → ∀ (w : M₂), w ∈ V → v + w ∈ U\nSV : Set M₁ × Set M₂ := (closedBall 0 1, -V)\nv : M₁ →SL[σ₁₂] M₂\nhv : v ∈ {f | IsCompactOperator ↑f}\nhuv : v - u ∈ {f | ∀ (x : M₁), x ∈ SV.fst → ↑f x ∈ SV.snd}\n⊢ ∃ t, Set.Finite t ∧ ↑u '' closedBall 0 1 ⊆ ⋃ (y : M₂) (_ : y ∈ t), y +ᵥ U\n[PROOFSTEP]\nrcases totallyBounded_iff_subset_finite_iUnion_nhds_zero.mp (hv.isCompact_closure_image_closedBall 1).totallyBounded V\n    hV with\n  ⟨T, hT, hTv⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\n𝕜₁ : Type u_1\n𝕜₂ : Type u_2\ninst✝¹⁰ : NontriviallyNormedField 𝕜₁\ninst✝⁹ : NormedField 𝕜₂\nσ₁₂ : 𝕜₁ →+* 𝕜₂\nM₁ : Type u_3\nM₂ : Type u_4\ninst✝⁸ : SeminormedAddCommGroup M₁\ninst✝⁷ : AddCommGroup M₂\ninst✝⁶ : NormedSpace 𝕜₁ M₁\ninst✝⁵ : Module 𝕜₂ M₂\ninst✝⁴ : UniformSpace M₂\ninst✝³ : UniformAddGroup M₂\ninst✝² : ContinuousConstSMul 𝕜₂ M₂\ninst✝¹ : T2Space M₂\ninst✝ : CompleteSpace M₂\nu : M₁ →SL[σ₁₂] M₂\nhu✝ : u ∈ closure {f | IsCompactOperator ↑f}\nhu : ∀ (U : Set (M₁ →SL[σ₁₂] M₂)), U ∈ 𝓝 0 → ∃ y, y ∈ {f | IsCompactOperator ↑f} ∧ y - u ∈ U\nU : Set M₂\nhU : U ∈ 𝓝 0\nV : Set M₂\nhV : V ∈ 𝓝 0\nhVU : ∀ (v : M₂), v ∈ V → ∀ (w : M₂), w ∈ V → v + w ∈ U\nSV : Set M₁ × Set M₂ := (closedBall 0 1, -V)\nv : M₁ →SL[σ₁₂] M₂\nhv : v ∈ {f | IsCompactOperator ↑f}\nhuv : v - u ∈ {f | ∀ (x : M₁), x ∈ SV.fst → ↑f x ∈ SV.snd}\nT : Set M₂\nhT : Set.Finite T\nhTv : closure (↑↑v '' closedBall 0 1) ⊆ ⋃ (y : M₂) (_ : y ∈ T), y +ᵥ V\n⊢ ∃ t, Set.Finite t ∧ ↑u '' closedBall 0 1 ⊆ ⋃ (y : M₂) (_ : y ∈ t), y +ᵥ U\n[PROOFSTEP]\nhave hTv : v '' closedBall 0 1 ⊆ _ := subset_closure.trans hTv\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\n𝕜₁ : Type u_1\n𝕜₂ : Type u_2\ninst✝¹⁰ : NontriviallyNormedField 𝕜₁\ninst✝⁹ : NormedField 𝕜₂\nσ₁₂ : 𝕜₁ →+* 𝕜₂\nM₁ : Type u_3\nM₂ : Type u_4\ninst✝⁸ : SeminormedAddCommGroup M₁\ninst✝⁷ : AddCommGroup M₂\ninst✝⁶ : NormedSpace 𝕜₁ M₁\ninst✝⁵ : Module 𝕜₂ M₂\ninst✝⁴ : UniformSpace M₂\ninst✝³ : UniformAddGroup M₂\ninst✝² : ContinuousConstSMul 𝕜₂ M₂\ninst✝¹ : T2Space M₂\ninst✝ : CompleteSpace M₂\nu : M₁ →SL[σ₁₂] M₂\nhu✝ : u ∈ closure {f | IsCompactOperator ↑f}\nhu : ∀ (U : Set (M₁ →SL[σ₁₂] M₂)), U ∈ 𝓝 0 → ∃ y, y ∈ {f | IsCompactOperator ↑f} ∧ y - u ∈ U\nU : Set M₂\nhU : U ∈ 𝓝 0\nV : Set M₂\nhV : V ∈ 𝓝 0\nhVU : ∀ (v : M₂), v ∈ V → ∀ (w : M₂), w ∈ V → v + w ∈ U\nSV : Set M₁ × Set M₂ := (closedBall 0 1, -V)\nv : M₁ →SL[σ₁₂] M₂\nhv : v ∈ {f | IsCompactOperator ↑f}\nhuv : v - u ∈ {f | ∀ (x : M₁), x ∈ SV.fst → ↑f x ∈ SV.snd}\nT : Set M₂\nhT : Set.Finite T\nhTv✝ : closure (↑↑v '' closedBall 0 1) ⊆ ⋃ (y : M₂) (_ : y ∈ T), y +ᵥ V\nhTv : ↑v '' closedBall 0 1 ⊆ ⋃ (y : M₂) (_ : y ∈ T), y +ᵥ V\n⊢ ∃ t, Set.Finite t ∧ ↑u '' closedBall 0 1 ⊆ ⋃ (y : M₂) (_ : y ∈ t), y +ᵥ U\n[PROOFSTEP]\nrefine' ⟨T, hT, _⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\n𝕜₁ : Type u_1\n𝕜₂ : Type u_2\ninst✝¹⁰ : NontriviallyNormedField 𝕜₁\ninst✝⁹ : NormedField 𝕜₂\nσ₁₂ : 𝕜₁ →+* 𝕜₂\nM₁ : Type u_3\nM₂ : Type u_4\ninst✝⁸ : SeminormedAddCommGroup M₁\ninst✝⁷ : AddCommGroup M₂\ninst✝⁶ : NormedSpace 𝕜₁ M₁\ninst✝⁵ : Module 𝕜₂ M₂\ninst✝⁴ : UniformSpace M₂\ninst✝³ : UniformAddGroup M₂\ninst✝² : ContinuousConstSMul 𝕜₂ M₂\ninst✝¹ : T2Space M₂\ninst✝ : CompleteSpace M₂\nu : M₁ →SL[σ₁₂] M₂\nhu✝ : u ∈ closure {f | IsCompactOperator ↑f}\nhu : ∀ (U : Set (M₁ →SL[σ₁₂] M₂)), U ∈ 𝓝 0 → ∃ y, y ∈ {f | IsCompactOperator ↑f} ∧ y - u ∈ U\nU : Set M₂\nhU : U ∈ 𝓝 0\nV : Set M₂\nhV : V ∈ 𝓝 0\nhVU : ∀ (v : M₂), v ∈ V → ∀ (w : M₂), w ∈ V → v + w ∈ U\nSV : Set M₁ × Set M₂ := (closedBall 0 1, -V)\nv : M₁ →SL[σ₁₂] M₂\nhv : v ∈ {f | IsCompactOperator ↑f}\nhuv : v - u ∈ {f | ∀ (x : M₁), x ∈ SV.fst → ↑f x ∈ SV.snd}\nT : Set M₂\nhT : Set.Finite T\nhTv✝ : closure (↑↑v '' closedBall 0 1) ⊆ ⋃ (y : M₂) (_ : y ∈ T), y +ᵥ V\nhTv : ↑v '' closedBall 0 1 ⊆ ⋃ (y : M₂) (_ : y ∈ T), y +ᵥ V\n⊢ ↑u '' closedBall 0 1 ⊆ ⋃ (y : M₂) (_ : y ∈ T), y +ᵥ U\n[PROOFSTEP]\nrw [image_subset_iff, preimage_iUnion₂] at hTv ⊢\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\n𝕜₁ : Type u_1\n𝕜₂ : Type u_2\ninst✝¹⁰ : NontriviallyNormedField 𝕜₁\ninst✝⁹ : NormedField 𝕜₂\nσ₁₂ : 𝕜₁ →+* 𝕜₂\nM₁ : Type u_3\nM₂ : Type u_4\ninst✝⁸ : SeminormedAddCommGroup M₁\ninst✝⁷ : AddCommGroup M₂\ninst✝⁶ : NormedSpace 𝕜₁ M₁\ninst✝⁵ : Module 𝕜₂ M₂\ninst✝⁴ : UniformSpace M₂\ninst✝³ : UniformAddGroup M₂\ninst✝² : ContinuousConstSMul 𝕜₂ M₂\ninst✝¹ : T2Space M₂\ninst✝ : CompleteSpace M₂\nu : M₁ →SL[σ₁₂] M₂\nhu✝ : u ∈ closure {f | IsCompactOperator ↑f}\nhu : ∀ (U : Set (M₁ →SL[σ₁₂] M₂)), U ∈ 𝓝 0 → ∃ y, y ∈ {f | IsCompactOperator ↑f} ∧ y - u ∈ U\nU : Set M₂\nhU : U ∈ 𝓝 0\nV : Set M₂\nhV : V ∈ 𝓝 0\nhVU : ∀ (v : M₂), v ∈ V → ∀ (w : M₂), w ∈ V → v + w ∈ U\nSV : Set M₁ × Set M₂ := (closedBall 0 1, -V)\nv : M₁ →SL[σ₁₂] M₂\nhv : v ∈ {f | IsCompactOperator ↑f}\nhuv : v - u ∈ {f | ∀ (x : M₁), x ∈ SV.fst → ↑f x ∈ SV.snd}\nT : Set M₂\nhT : Set.Finite T\nhTv✝ : closure (↑↑v '' closedBall 0 1) ⊆ ⋃ (y : M₂) (_ : y ∈ T), y +ᵥ V\nhTv : closedBall 0 1 ⊆ ⋃ (i : M₂) (_ : i ∈ T), ↑v ⁻¹' (i +ᵥ V)\n⊢ closedBall 0 1 ⊆ ⋃ (i : M₂) (_ : i ∈ T), ↑u ⁻¹' (i +ᵥ U)\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\n𝕜₁ : Type u_1\n𝕜₂ : Type u_2\ninst✝¹⁰ : NontriviallyNormedField 𝕜₁\ninst✝⁹ : NormedField 𝕜₂\nσ₁₂ : 𝕜₁ →+* 𝕜₂\nM₁ : Type u_3\nM₂ : Type u_4\ninst✝⁸ : SeminormedAddCommGroup M₁\ninst✝⁷ : AddCommGroup M₂\ninst✝⁶ : NormedSpace 𝕜₁ M₁\ninst✝⁵ : Module 𝕜₂ M₂\ninst✝⁴ : UniformSpace M₂\ninst✝³ : UniformAddGroup M₂\ninst✝² : ContinuousConstSMul 𝕜₂ M₂\ninst✝¹ : T2Space M₂\ninst✝ : CompleteSpace M₂\nu : M₁ →SL[σ₁₂] M₂\nhu✝ : u ∈ closure {f | IsCompactOperator ↑f}\nhu : ∀ (U : Set (M₁ →SL[σ₁₂] M₂)), U ∈ 𝓝 0 → ∃ y, y ∈ {f | IsCompactOperator ↑f} ∧ y - u ∈ U\nU : Set M₂\nhU : U ∈ 𝓝 0\nV : Set M₂\nhV : V ∈ 𝓝 0\nhVU : ∀ (v : M₂), v ∈ V → ∀ (w : M₂), w ∈ V → v + w ∈ U\nSV : Set M₁ × Set M₂ := (closedBall 0 1, -V)\nv : M₁ →SL[σ₁₂] M₂\nhv : v ∈ {f | IsCompactOperator ↑f}\nhuv : v - u ∈ {f | ∀ (x : M₁), x ∈ SV.fst → ↑f x ∈ SV.snd}\nT : Set M₂\nhT : Set.Finite T\nhTv✝ : closure (↑↑v '' closedBall 0 1) ⊆ ⋃ (y : M₂) (_ : y ∈ T), y +ᵥ V\nhTv : closedBall 0 1 ⊆ ⋃ (i : M₂) (_ : i ∈ T), ↑v ⁻¹' (i +ᵥ V)\nx : M₁\nhx : x ∈ closedBall 0 1\n⊢ x ∈ ⋃ (i : M₂) (_ : i ∈ T), ↑u ⁻¹' (i +ᵥ U)\n[PROOFSTEP]\nspecialize hTv hx\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\n𝕜₁ : Type u_1\n𝕜₂ : Type u_2\ninst✝¹⁰ : NontriviallyNormedField 𝕜₁\ninst✝⁹ : NormedField 𝕜₂\nσ₁₂ : 𝕜₁ →+* 𝕜₂\nM₁ : Type u_3\nM₂ : Type u_4\ninst✝⁸ : SeminormedAddCommGroup M₁\ninst✝⁷ : AddCommGroup M₂\ninst✝⁶ : NormedSpace 𝕜₁ M₁\ninst✝⁵ : Module 𝕜₂ M₂\ninst✝⁴ : UniformSpace M₂\ninst✝³ : UniformAddGroup M₂\ninst✝² : ContinuousConstSMul 𝕜₂ M₂\ninst✝¹ : T2Space M₂\ninst✝ : CompleteSpace M₂\nu : M₁ →SL[σ₁₂] M₂\nhu✝ : u ∈ closure {f | IsCompactOperator ↑f}\nhu : ∀ (U : Set (M₁ →SL[σ₁₂] M₂)), U ∈ 𝓝 0 → ∃ y, y ∈ {f | IsCompactOperator ↑f} ∧ y - u ∈ U\nU : Set M₂\nhU : U ∈ 𝓝 0\nV : Set M₂\nhV : V ∈ 𝓝 0\nhVU : ∀ (v : M₂), v ∈ V → ∀ (w : M₂), w ∈ V → v + w ∈ U\nSV : Set M₁ × Set M₂ := (closedBall 0 1, -V)\nv : M₁ →SL[σ₁₂] M₂\nhv : v ∈ {f | IsCompactOperator ↑f}\nhuv : v - u ∈ {f | ∀ (x : M₁), x ∈ SV.fst → ↑f x ∈ SV.snd}\nT : Set M₂\nhT : Set.Finite T\nhTv✝ : closure (↑↑v '' closedBall 0 1) ⊆ ⋃ (y : M₂) (_ : y ∈ T), y +ᵥ V\nx : M₁\nhx : x ∈ closedBall 0 1\nhTv : x ∈ ⋃ (i : M₂) (_ : i ∈ T), ↑v ⁻¹' (i +ᵥ V)\n⊢ x ∈ ⋃ (i : M₂) (_ : i ∈ T), ↑u ⁻¹' (i +ᵥ U)\n[PROOFSTEP]\nrw [mem_iUnion₂] at hTv ⊢\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\n𝕜₁ : Type u_1\n𝕜₂ : Type u_2\ninst✝¹⁰ : NontriviallyNormedField 𝕜₁\ninst✝⁹ : NormedField 𝕜₂\nσ₁₂ : 𝕜₁ →+* 𝕜₂\nM₁ : Type u_3\nM₂ : Type u_4\ninst✝⁸ : SeminormedAddCommGroup M₁\ninst✝⁷ : AddCommGroup M₂\ninst✝⁶ : NormedSpace 𝕜₁ M₁\ninst✝⁵ : Module 𝕜₂ M₂\ninst✝⁴ : UniformSpace M₂\ninst✝³ : UniformAddGroup M₂\ninst✝² : ContinuousConstSMul 𝕜₂ M₂\ninst✝¹ : T2Space M₂\ninst✝ : CompleteSpace M₂\nu : M₁ →SL[σ₁₂] M₂\nhu✝ : u ∈ closure {f | IsCompactOperator ↑f}\nhu : ∀ (U : Set (M₁ →SL[σ₁₂] M₂)), U ∈ 𝓝 0 → ∃ y, y ∈ {f | IsCompactOperator ↑f} ∧ y - u ∈ U\nU : Set M₂\nhU : U ∈ 𝓝 0\nV : Set M₂\nhV : V ∈ 𝓝 0\nhVU : ∀ (v : M₂), v ∈ V → ∀ (w : M₂), w ∈ V → v + w ∈ U\nSV : Set M₁ × Set M₂ := (closedBall 0 1, -V)\nv : M₁ →SL[σ₁₂] M₂\nhv : v ∈ {f | IsCompactOperator ↑f}\nhuv : v - u ∈ {f | ∀ (x : M₁), x ∈ SV.fst → ↑f x ∈ SV.snd}\nT : Set M₂\nhT : Set.Finite T\nhTv✝ : closure (↑↑v '' closedBall 0 1) ⊆ ⋃ (y : M₂) (_ : y ∈ T), y +ᵥ V\nx : M₁\nhx : x ∈ closedBall 0 1\nhTv : ∃ i j, x ∈ ↑v ⁻¹' (i +ᵥ V)\n⊢ ∃ i j, x ∈ ↑u ⁻¹' (i +ᵥ U)\n[PROOFSTEP]\nrcases hTv with ⟨t, ht, htx⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\n𝕜₁ : Type u_1\n𝕜₂ : Type u_2\ninst✝¹⁰ : NontriviallyNormedField 𝕜₁\ninst✝⁹ : NormedField 𝕜₂\nσ₁₂ : 𝕜₁ →+* 𝕜₂\nM₁ : Type u_3\nM₂ : Type u_4\ninst✝⁸ : SeminormedAddCommGroup M₁\ninst✝⁷ : AddCommGroup M₂\ninst✝⁶ : NormedSpace 𝕜₁ M₁\ninst✝⁵ : Module 𝕜₂ M₂\ninst✝⁴ : UniformSpace M₂\ninst✝³ : UniformAddGroup M₂\ninst✝² : ContinuousConstSMul 𝕜₂ M₂\ninst✝¹ : T2Space M₂\ninst✝ : CompleteSpace M₂\nu : M₁ →SL[σ₁₂] M₂\nhu✝ : u ∈ closure {f | IsCompactOperator ↑f}\nhu : ∀ (U : Set (M₁ →SL[σ₁₂] M₂)), U ∈ 𝓝 0 → ∃ y, y ∈ {f | IsCompactOperator ↑f} ∧ y - u ∈ U\nU : Set M₂\nhU : U ∈ 𝓝 0\nV : Set M₂\nhV : V ∈ 𝓝 0\nhVU : ∀ (v : M₂), v ∈ V → ∀ (w : M₂), w ∈ V → v + w ∈ U\nSV : Set M₁ × Set M₂ := (closedBall 0 1, -V)\nv : M₁ →SL[σ₁₂] M₂\nhv : v ∈ {f | IsCompactOperator ↑f}\nhuv : v - u ∈ {f | ∀ (x : M₁), x ∈ SV.fst → ↑f x ∈ SV.snd}\nT : Set M₂\nhT : Set.Finite T\nhTv : closure (↑↑v '' closedBall 0 1) ⊆ ⋃ (y : M₂) (_ : y ∈ T), y +ᵥ V\nx : M₁\nhx : x ∈ closedBall 0 1\nt : M₂\nht : t ∈ T\nhtx : x ∈ ↑v ⁻¹' (t +ᵥ V)\n⊢ ∃ i j, x ∈ ↑u ⁻¹' (i +ᵥ U)\n[PROOFSTEP]\nrefine' ⟨t, ht, _⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\n𝕜₁ : Type u_1\n𝕜₂ : Type u_2\ninst✝¹⁰ : NontriviallyNormedField 𝕜₁\ninst✝⁹ : NormedField 𝕜₂\nσ₁₂ : 𝕜₁ →+* 𝕜₂\nM₁ : Type u_3\nM₂ : Type u_4\ninst✝⁸ : SeminormedAddCommGroup M₁\ninst✝⁷ : AddCommGroup M₂\ninst✝⁶ : NormedSpace 𝕜₁ M₁\ninst✝⁵ : Module 𝕜₂ M₂\ninst✝⁴ : UniformSpace M₂\ninst✝³ : UniformAddGroup M₂\ninst✝² : ContinuousConstSMul 𝕜₂ M₂\ninst✝¹ : T2Space M₂\ninst✝ : CompleteSpace M₂\nu : M₁ →SL[σ₁₂] M₂\nhu✝ : u ∈ closure {f | IsCompactOperator ↑f}\nhu : ∀ (U : Set (M₁ →SL[σ₁₂] M₂)), U ∈ 𝓝 0 → ∃ y, y ∈ {f | IsCompactOperator ↑f} ∧ y - u ∈ U\nU : Set M₂\nhU : U ∈ 𝓝 0\nV : Set M₂\nhV : V ∈ 𝓝 0\nhVU : ∀ (v : M₂), v ∈ V → ∀ (w : M₂), w ∈ V → v + w ∈ U\nSV : Set M₁ × Set M₂ := (closedBall 0 1, -V)\nv : M₁ →SL[σ₁₂] M₂\nhv : v ∈ {f | IsCompactOperator ↑f}\nhuv : v - u ∈ {f | ∀ (x : M₁), x ∈ SV.fst → ↑f x ∈ SV.snd}\nT : Set M₂\nhT : Set.Finite T\nhTv : closure (↑↑v '' closedBall 0 1) ⊆ ⋃ (y : M₂) (_ : y ∈ T), y +ᵥ V\nx : M₁\nhx : x ∈ closedBall 0 1\nt : M₂\nht : t ∈ T\nhtx : x ∈ ↑v ⁻¹' (t +ᵥ V)\n⊢ x ∈ ↑u ⁻¹' (t +ᵥ U)\n[PROOFSTEP]\nrw [mem_preimage, mem_vadd_set_iff_neg_vadd_mem, vadd_eq_add, neg_add_eq_sub] at htx ⊢\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\n𝕜₁ : Type u_1\n𝕜₂ : Type u_2\ninst✝¹⁰ : NontriviallyNormedField 𝕜₁\ninst✝⁹ : NormedField 𝕜₂\nσ₁₂ : 𝕜₁ →+* 𝕜₂\nM₁ : Type u_3\nM₂ : Type u_4\ninst✝⁸ : SeminormedAddCommGroup M₁\ninst✝⁷ : AddCommGroup M₂\ninst✝⁶ : NormedSpace 𝕜₁ M₁\ninst✝⁵ : Module 𝕜₂ M₂\ninst✝⁴ : UniformSpace M₂\ninst✝³ : UniformAddGroup M₂\ninst✝² : ContinuousConstSMul 𝕜₂ M₂\ninst✝¹ : T2Space M₂\ninst✝ : CompleteSpace M₂\nu : M₁ →SL[σ₁₂] M₂\nhu✝ : u ∈ closure {f | IsCompactOperator ↑f}\nhu : ∀ (U : Set (M₁ →SL[σ₁₂] M₂)), U ∈ 𝓝 0 → ∃ y, y ∈ {f | IsCompactOperator ↑f} ∧ y - u ∈ U\nU : Set M₂\nhU : U ∈ 𝓝 0\nV : Set M₂\nhV : V ∈ 𝓝 0\nhVU : ∀ (v : M₂), v ∈ V → ∀ (w : M₂), w ∈ V → v + w ∈ U\nSV : Set M₁ × Set M₂ := (closedBall 0 1, -V)\nv : M₁ →SL[σ₁₂] M₂\nhv : v ∈ {f | IsCompactOperator ↑f}\nhuv : v - u ∈ {f | ∀ (x : M₁), x ∈ SV.fst → ↑f x ∈ SV.snd}\nT : Set M₂\nhT : Set.Finite T\nhTv : closure (↑↑v '' closedBall 0 1) ⊆ ⋃ (y : M₂) (_ : y ∈ T), y +ᵥ V\nx : M₁\nhx : x ∈ closedBall 0 1\nt : M₂\nht : t ∈ T\nhtx : ↑v x - t ∈ V\n⊢ ↑u x - t ∈ U\n[PROOFSTEP]\nconvert hVU _ htx _ (huv x hx) using 1\n[GOAL]\ncase h.e'_4\n𝕜₁ : Type u_1\n𝕜₂ : Type u_2\ninst✝¹⁰ : NontriviallyNormedField 𝕜₁\ninst✝⁹ : NormedField 𝕜₂\nσ₁₂ : 𝕜₁ →+* 𝕜₂\nM₁ : Type u_3\nM₂ : Type u_4\ninst✝⁸ : SeminormedAddCommGroup M₁\ninst✝⁷ : AddCommGroup M₂\ninst✝⁶ : NormedSpace 𝕜₁ M₁\ninst✝⁵ : Module 𝕜₂ M₂\ninst✝⁴ : UniformSpace M₂\ninst✝³ : UniformAddGroup M₂\ninst✝² : ContinuousConstSMul 𝕜₂ M₂\ninst✝¹ : T2Space M₂\ninst✝ : CompleteSpace M₂\nu : M₁ →SL[σ₁₂] M₂\nhu✝ : u ∈ closure {f | IsCompactOperator ↑f}\nhu : ∀ (U : Set (M₁ →SL[σ₁₂] M₂)), U ∈ 𝓝 0 → ∃ y, y ∈ {f | IsCompactOperator ↑f} ∧ y - u ∈ U\nU : Set M₂\nhU : U ∈ 𝓝 0\nV : Set M₂\nhV : V ∈ 𝓝 0\nhVU : ∀ (v : M₂), v ∈ V → ∀ (w : M₂), w ∈ V → v + w ∈ U\nSV : Set M₁ × Set M₂ := (closedBall 0 1, -V)\nv : M₁ →SL[σ₁₂] M₂\nhv : v ∈ {f | IsCompactOperator ↑f}\nhuv : v - u ∈ {f | ∀ (x : M₁), x ∈ SV.fst → ↑f x ∈ SV.snd}\nT : Set M₂\nhT : Set.Finite T\nhTv : closure (↑↑v '' closedBall 0 1) ⊆ ⋃ (y : M₂) (_ : y ∈ T), y +ᵥ V\nx : M₁\nhx : x ∈ closedBall 0 1\nt : M₂\nht : t ∈ T\nhtx : ↑v x - t ∈ V\n⊢ ↑u x - t = ↑v x - t + -↑(v - u) x\n[PROOFSTEP]\nrw [ContinuousLinearMap.sub_apply]\n[GOAL]\ncase h.e'_4\n𝕜₁ : Type u_1\n𝕜₂ : Type u_2\ninst✝¹⁰ : NontriviallyNormedField 𝕜₁\ninst✝⁹ : NormedField 𝕜₂\nσ₁₂ : 𝕜₁ →+* 𝕜₂\nM₁ : Type u_3\nM₂ : Type u_4\ninst✝⁸ : SeminormedAddCommGroup M₁\ninst✝⁷ : AddCommGroup M₂\ninst✝⁶ : NormedSpace 𝕜₁ M₁\ninst✝⁵ : Module 𝕜₂ M₂\ninst✝⁴ : UniformSpace M₂\ninst✝³ : UniformAddGroup M₂\ninst✝² : ContinuousConstSMul 𝕜₂ M₂\ninst✝¹ : T2Space M₂\ninst✝ : CompleteSpace M₂\nu : M₁ →SL[σ₁₂] M₂\nhu✝ : u ∈ closure {f | IsCompactOperator ↑f}\nhu : ∀ (U : Set (M₁ →SL[σ₁₂] M₂)), U ∈ 𝓝 0 → ∃ y, y ∈ {f | IsCompactOperator ↑f} ∧ y - u ∈ U\nU : Set M₂\nhU : U ∈ 𝓝 0\nV : Set M₂\nhV : V ∈ 𝓝 0\nhVU : ∀ (v : M₂), v ∈ V → ∀ (w : M₂), w ∈ V → v + w ∈ U\nSV : Set M₁ × Set M₂ := (closedBall 0 1, -V)\nv : M₁ →SL[σ₁₂] M₂\nhv : v ∈ {f | IsCompactOperator ↑f}\nhuv : v - u ∈ {f | ∀ (x : M₁), x ∈ SV.fst → ↑f x ∈ SV.snd}\nT : Set M₂\nhT : Set.Finite T\nhTv : closure (↑↑v '' closedBall 0 1) ⊆ ⋃ (y : M₂) (_ : y ∈ T), y +ᵥ V\nx : M₁\nhx : x ∈ closedBall 0 1\nt : M₂\nht : t ∈ T\nhtx : ↑v x - t ∈ V\n⊢ ↑u x - t = ↑v x - t + -(↑v x - ↑u x)\n[PROOFSTEP]\nabel\n[GOAL]\ncase h.e'_4\n𝕜₁ : Type u_1\n𝕜₂ : Type u_2\ninst✝¹⁰ : NontriviallyNormedField 𝕜₁\ninst✝⁹ : NormedField 𝕜₂\nσ₁₂ : 𝕜₁ →+* 𝕜₂\nM₁ : Type u_3\nM₂ : Type u_4\ninst✝⁸ : SeminormedAddCommGroup M₁\ninst✝⁷ : AddCommGroup M₂\ninst✝⁶ : NormedSpace 𝕜₁ M₁\ninst✝⁵ : Module 𝕜₂ M₂\ninst✝⁴ : UniformSpace M₂\ninst✝³ : UniformAddGroup M₂\ninst✝² : ContinuousConstSMul 𝕜₂ M₂\ninst✝¹ : T2Space M₂\ninst✝ : CompleteSpace M₂\nu : M₁ →SL[σ₁₂] M₂\nhu✝ : u ∈ closure {f | IsCompactOperator ↑f}\nhu : ∀ (U : Set (M₁ →SL[σ₁₂] M₂)), U ∈ 𝓝 0 → ∃ y, y ∈ {f | IsCompactOperator ↑f} ∧ y - u ∈ U\nU : Set M₂\nhU : U ∈ 𝓝 0\nV : Set M₂\nhV : V ∈ 𝓝 0\nhVU : ∀ (v : M₂), v ∈ V → ∀ (w : M₂), w ∈ V → v + w ∈ U\nSV : Set M₁ × Set M₂ := (closedBall 0 1, -V)\nv : M₁ →SL[σ₁₂] M₂\nhv : v ∈ {f | IsCompactOperator ↑f}\nhuv : v - u ∈ {f | ∀ (x : M₁), x ∈ SV.fst → ↑f x ∈ SV.snd}\nT : Set M₂\nhT : Set.Finite T\nhTv : closure (↑↑v '' closedBall 0 1) ⊆ ⋃ (y : M₂) (_ : y ∈ T), y +ᵥ V\nx : M₁\nhx : x ∈ closedBall 0 1\nt : M₂\nht : t ∈ T\nhtx : ↑v x - t ∈ V\n⊢ ↑u x - t = ↑v x - t + -(↑v x - ↑u x)\n[PROOFSTEP]\nabel\n", "meta": {"mathlib_filename": "Mathlib.Analysis.NormedSpace.CompactOperator", "llama_tokens": 24864, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7956580903722561, "lm_q2_score": 0.6370308082623217, "lm_q1q2_score": 0.5068587164102937}}
{"text": "[GOAL]\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK : Set α\nV : Set (β × β)\nf : C(α, β)\nhV : V ∈ 𝓤 β\n⊢ ∃ V', V' ∈ 𝓤 β ∧ V' ⊆ V ∧ ∀ (g : C(α, β)), g ∈ compactConvNhd K V' f → compactConvNhd K V' g ⊆ compactConvNhd K V f\n[PROOFSTEP]\nobtain ⟨V', h₁, h₂⟩ := comp_mem_uniformity_sets hV\n[GOAL]\ncase intro.intro\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK : Set α\nV : Set (β × β)\nf : C(α, β)\nhV : V ∈ 𝓤 β\nV' : Set (β × β)\nh₁ : V' ∈ 𝓤 β\nh₂ : V' ○ V' ⊆ V\n⊢ ∃ V', V' ∈ 𝓤 β ∧ V' ⊆ V ∧ ∀ (g : C(α, β)), g ∈ compactConvNhd K V' f → compactConvNhd K V' g ⊆ compactConvNhd K V f\n[PROOFSTEP]\nexact\n  ⟨V', h₁, Subset.trans (subset_comp_self_of_mem_uniformity h₁) h₂, fun g hg g' hg' =>\n    compactConvNhd_mono f h₂ (compactConvNhd_mem_comp f hg hg')⟩\n[GOAL]\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK : Set α\nV : Set (β × β)\nf : C(α, β)\n⊢ ∀ {i j : Set α × Set (β × β)},\n    IsCompact i.fst ∧ i.snd ∈ 𝓤 β →\n      IsCompact j.fst ∧ j.snd ∈ 𝓤 β →\n        ∃ k,\n          (IsCompact k.fst ∧ k.snd ∈ 𝓤 β) ∧\n            compactConvNhd k.fst k.snd f ⊆ compactConvNhd i.fst i.snd f ∩ compactConvNhd j.fst j.snd f\n[PROOFSTEP]\nrintro ⟨K₁, V₁⟩ ⟨K₂, V₂⟩ ⟨hK₁, hV₁⟩ ⟨hK₂, hV₂⟩\n[GOAL]\ncase mk.mk.intro.intro\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK : Set α\nV : Set (β × β)\nf : C(α, β)\nK₁ : Set α\nV₁ : Set (β × β)\nK₂ : Set α\nV₂ : Set (β × β)\nhK₁ : IsCompact (K₁, V₁).fst\nhV₁ : (K₁, V₁).snd ∈ 𝓤 β\nhK₂ : IsCompact (K₂, V₂).fst\nhV₂ : (K₂, V₂).snd ∈ 𝓤 β\n⊢ ∃ k,\n    (IsCompact k.fst ∧ k.snd ∈ 𝓤 β) ∧\n      compactConvNhd k.fst k.snd f ⊆\n        compactConvNhd (K₁, V₁).fst (K₁, V₁).snd f ∩ compactConvNhd (K₂, V₂).fst (K₂, V₂).snd f\n[PROOFSTEP]\nexact ⟨⟨K₁ ∪ K₂, V₁ ∩ V₂⟩, ⟨hK₁.union hK₂, Filter.inter_mem hV₁ hV₂⟩, compactConvNhd_subset_inter f K₁ K₂ V₁ V₂⟩\n[GOAL]\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK : Set α\nV : Set (β × β)\nf : C(α, β)\nY : Set C(α, β)\n⊢ Y ∈ FilterBasis.filter (compactConvergenceFilterBasis f) ↔ ∃ K V _hK _hV, compactConvNhd K V f ⊆ Y\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK : Set α\nV : Set (β × β)\nf : C(α, β)\nY : Set C(α, β)\n⊢ Y ∈ FilterBasis.filter (compactConvergenceFilterBasis f) → ∃ K V _hK _hV, compactConvNhd K V f ⊆ Y\n[PROOFSTEP]\nrintro ⟨X, ⟨⟨K, V⟩, ⟨hK, hV⟩, rfl⟩, hY⟩\n[GOAL]\ncase mp.intro.intro.intro.mk.intro.intro\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK✝ : Set α\nV✝ : Set (β × β)\nf : C(α, β)\nY : Set C(α, β)\nK : Set α\nV : Set (β × β)\nhK : IsCompact (K, V).fst\nhV : (K, V).snd ∈ 𝓤 β\nhY : (fun KV => compactConvNhd KV.fst KV.snd f) (K, V) ⊆ Y\n⊢ ∃ K V _hK _hV, compactConvNhd K V f ⊆ Y\n[PROOFSTEP]\nexact ⟨K, V, hK, hV, hY⟩\n[GOAL]\ncase mpr\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK : Set α\nV : Set (β × β)\nf : C(α, β)\nY : Set C(α, β)\n⊢ (∃ K V _hK _hV, compactConvNhd K V f ⊆ Y) → Y ∈ FilterBasis.filter (compactConvergenceFilterBasis f)\n[PROOFSTEP]\nrintro ⟨K, V, hK, hV, hY⟩\n[GOAL]\ncase mpr.intro.intro.intro.intro\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK✝ : Set α\nV✝ : Set (β × β)\nf : C(α, β)\nY : Set C(α, β)\nK : Set α\nV : Set (β × β)\nhK : IsCompact K\nhV : V ∈ 𝓤 β\nhY : compactConvNhd K V f ⊆ Y\n⊢ Y ∈ FilterBasis.filter (compactConvergenceFilterBasis f)\n[PROOFSTEP]\nexact ⟨compactConvNhd K V f, ⟨⟨K, V⟩, ⟨hK, hV⟩, rfl⟩, hY⟩\n[GOAL]\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK : Set α\nV : Set (β × β)\nf : C(α, β)\n⊢ 𝓝 f = FilterBasis.filter (compactConvergenceFilterBasis f)\n[PROOFSTEP]\nrw [TopologicalSpace.nhds_mkOfNhds_filterBasis]\n[GOAL]\ncase h₀\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK : Set α\nV : Set (β × β)\nf : C(α, β)\n⊢ ∀ (x : C(α, β)) (n : Set C(α, β)), n ∈ compactConvergenceFilterBasis x → x ∈ n\n[PROOFSTEP]\nrintro g - ⟨⟨K, V⟩, ⟨hK, hV⟩, rfl⟩\n[GOAL]\ncase h₁\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK : Set α\nV : Set (β × β)\nf : C(α, β)\n⊢ ∀ (x : C(α, β)) (n : Set C(α, β)),\n    n ∈ compactConvergenceFilterBasis x →\n      ∃ n₁,\n        n₁ ∈ compactConvergenceFilterBasis x ∧\n          n₁ ⊆ n ∧ ∀ (x' : C(α, β)), x' ∈ n₁ → ∃ n₂, n₂ ∈ compactConvergenceFilterBasis x' ∧ n₂ ⊆ n\n[PROOFSTEP]\nrintro g - ⟨⟨K, V⟩, ⟨hK, hV⟩, rfl⟩\n[GOAL]\ncase h₀.intro.mk.intro.intro\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK✝ : Set α\nV✝ : Set (β × β)\nf g : C(α, β)\nK : Set α\nV : Set (β × β)\nhK : IsCompact (K, V).fst\nhV : (K, V).snd ∈ 𝓤 β\n⊢ g ∈ (fun KV => compactConvNhd KV.fst KV.snd g) (K, V)\n[PROOFSTEP]\nexact self_mem_compactConvNhd g hV\n[GOAL]\ncase h₁.intro.mk.intro.intro\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK✝ : Set α\nV✝ : Set (β × β)\nf g : C(α, β)\nK : Set α\nV : Set (β × β)\nhK : IsCompact (K, V).fst\nhV : (K, V).snd ∈ 𝓤 β\n⊢ ∃ n₁,\n    n₁ ∈ compactConvergenceFilterBasis g ∧\n      n₁ ⊆ (fun KV => compactConvNhd KV.fst KV.snd g) (K, V) ∧\n        ∀ (x' : C(α, β)),\n          x' ∈ n₁ → ∃ n₂, n₂ ∈ compactConvergenceFilterBasis x' ∧ n₂ ⊆ (fun KV => compactConvNhd KV.fst KV.snd g) (K, V)\n[PROOFSTEP]\nobtain ⟨V', hV', h₁, h₂⟩ := compactConvNhd_nhd_basis g hV\n[GOAL]\ncase h₁.intro.mk.intro.intro.intro.intro.intro\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK✝ : Set α\nV✝ : Set (β × β)\nf g : C(α, β)\nK : Set α\nV : Set (β × β)\nhK : IsCompact (K, V).fst\nhV : (K, V).snd ∈ 𝓤 β\nV' : Set (β × β)\nhV' : V' ∈ 𝓤 β\nh₁ : V' ⊆ (K, V).snd\nh₂ :\n  ∀ (g_1 : C(α, β)),\n    g_1 ∈ compactConvNhd ?m.4688 V' g → compactConvNhd ?m.4688 V' g_1 ⊆ compactConvNhd ?m.4688 (K, V).snd g\n⊢ ∃ n₁,\n    n₁ ∈ compactConvergenceFilterBasis g ∧\n      n₁ ⊆ (fun KV => compactConvNhd KV.fst KV.snd g) (K, V) ∧\n        ∀ (x' : C(α, β)),\n          x' ∈ n₁ → ∃ n₂, n₂ ∈ compactConvergenceFilterBasis x' ∧ n₂ ⊆ (fun KV => compactConvNhd KV.fst KV.snd g) (K, V)\n[PROOFSTEP]\nexact\n  ⟨compactConvNhd K V' g, ⟨⟨K, V'⟩, ⟨hK, hV'⟩, rfl⟩, compactConvNhd_mono g h₁, fun g' hg' =>\n    ⟨compactConvNhd K V' g', ⟨⟨K, V'⟩, ⟨hK, hV'⟩, rfl⟩, h₂ g' hg'⟩⟩\n[GOAL]\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK : Set α\nV : Set (β × β)\nf : C(α, β)\nι : Type u₃\np : Filter ι\nF : ι → C(α, β)\n⊢ Tendsto F p (𝓝 f) ↔ ∀ (K : Set α), IsCompact K → TendstoUniformlyOn (fun i a => ↑(F i) a) (↑f) p K\n[PROOFSTEP]\nsimp only [(hasBasis_nhds_compactConvergence f).tendsto_right_iff, TendstoUniformlyOn, and_imp, Prod.forall]\n[GOAL]\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK : Set α\nV : Set (β × β)\nf : C(α, β)\nι : Type u₃\np : Filter ι\nF : ι → C(α, β)\n⊢ (∀ (a : Set α) (b : Set (β × β)), IsCompact a → b ∈ 𝓤 β → ∀ᶠ (x : ι) in p, F x ∈ compactConvNhd a b f) ↔\n    ∀ (K : Set α), IsCompact K → ∀ (u : Set (β × β)), u ∈ 𝓤 β → ∀ᶠ (n : ι) in p, ∀ (x : α), x ∈ K → (↑f x, ↑(F n) x) ∈ u\n[PROOFSTEP]\nrefine' forall_congr' fun K => _\n[GOAL]\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK✝ : Set α\nV : Set (β × β)\nf : C(α, β)\nι : Type u₃\np : Filter ι\nF : ι → C(α, β)\nK : Set α\n⊢ (∀ (b : Set (β × β)), IsCompact K → b ∈ 𝓤 β → ∀ᶠ (x : ι) in p, F x ∈ compactConvNhd K b f) ↔\n    IsCompact K → ∀ (u : Set (β × β)), u ∈ 𝓤 β → ∀ᶠ (n : ι) in p, ∀ (x : α), x ∈ K → (↑f x, ↑(F n) x) ∈ u\n[PROOFSTEP]\nrw [forall_swap]\n[GOAL]\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK✝ : Set α\nV : Set (β × β)\nf : C(α, β)\nι : Type u₃\np : Filter ι\nF : ι → C(α, β)\nK : Set α\n⊢ (IsCompact K → ∀ (x : Set (β × β)), x ∈ 𝓤 β → ∀ᶠ (x_1 : ι) in p, F x_1 ∈ compactConvNhd K x f) ↔\n    IsCompact K → ∀ (u : Set (β × β)), u ∈ 𝓤 β → ∀ᶠ (n : ι) in p, ∀ (x : α), x ∈ K → (↑f x, ↑(F n) x) ∈ u\n[PROOFSTEP]\nexact forall₃_congr fun _hK V _hV => Iff.rfl\n[GOAL]\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK : Set α\nV : Set (β × β)\nf : C(α, β)\nhK : IsCompact K\nU : Set β\nhU : IsOpen U\nhf : f ∈ CompactOpen.gen K U\n⊢ ∃ V, V ∈ 𝓤 β ∧ IsOpen V ∧ compactConvNhd K V f ⊆ CompactOpen.gen K U\n[PROOFSTEP]\nobtain ⟨V, hV₁, hV₂, hV₃⟩ := lebesgue_number_of_compact_open (hK.image f.continuous) hU hf\n[GOAL]\ncase intro.intro.intro\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK : Set α\nV✝ : Set (β × β)\nf : C(α, β)\nhK : IsCompact K\nU : Set β\nhU : IsOpen U\nhf : f ∈ CompactOpen.gen K U\nV : Set (β × β)\nhV₁ : V ∈ 𝓤 β\nhV₂ : IsOpen V\nhV₃ : ∀ (x : β), x ∈ ↑f '' K → ball x V ⊆ U\n⊢ ∃ V, V ∈ 𝓤 β ∧ IsOpen V ∧ compactConvNhd K V f ⊆ CompactOpen.gen K U\n[PROOFSTEP]\nrefine' ⟨V, hV₁, hV₂, _⟩\n[GOAL]\ncase intro.intro.intro\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK : Set α\nV✝ : Set (β × β)\nf : C(α, β)\nhK : IsCompact K\nU : Set β\nhU : IsOpen U\nhf : f ∈ CompactOpen.gen K U\nV : Set (β × β)\nhV₁ : V ∈ 𝓤 β\nhV₂ : IsOpen V\nhV₃ : ∀ (x : β), x ∈ ↑f '' K → ball x V ⊆ U\n⊢ compactConvNhd K V f ⊆ CompactOpen.gen K U\n[PROOFSTEP]\nrintro g hg _ ⟨x, hx, rfl⟩\n[GOAL]\ncase intro.intro.intro.intro.intro\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK : Set α\nV✝ : Set (β × β)\nf : C(α, β)\nhK : IsCompact K\nU : Set β\nhU : IsOpen U\nhf : f ∈ CompactOpen.gen K U\nV : Set (β × β)\nhV₁ : V ∈ 𝓤 β\nhV₂ : IsOpen V\nhV₃ : ∀ (x : β), x ∈ ↑f '' K → ball x V ⊆ U\ng : C(α, β)\nhg : g ∈ compactConvNhd K V f\nx : α\nhx : x ∈ K\n⊢ ↑g x ∈ U\n[PROOFSTEP]\nexact hV₃ (f x) ⟨x, hx, rfl⟩ (hg x hx)\n[GOAL]\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK : Set α\nV : Set (β × β)\nf : C(α, β)\nhK : IsCompact K\nhV : V ∈ 𝓤 β\n⊢ ∃ ι x C _hC U _hU,\n    f ∈ ⋂ (i : ι), CompactOpen.gen (C i) (U i) ∧ ⋂ (i : ι), CompactOpen.gen (C i) (U i) ⊆ compactConvNhd K V f\n[PROOFSTEP]\nobtain ⟨W, hW₁, hW₄, hW₂, hW₃⟩ := comp_open_symm_mem_uniformity_sets hV\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK : Set α\nV : Set (β × β)\nf : C(α, β)\nhK : IsCompact K\nhV : V ∈ 𝓤 β\nW : Set (β × β)\nhW₁ : W ∈ 𝓤 β\nhW₄ : IsOpen W\nhW₂ : SymmetricRel W\nhW₃ : W ○ W ⊆ V\n⊢ ∃ ι x C _hC U _hU,\n    f ∈ ⋂ (i : ι), CompactOpen.gen (C i) (U i) ∧ ⋂ (i : ι), CompactOpen.gen (C i) (U i) ⊆ compactConvNhd K V f\n[PROOFSTEP]\nobtain ⟨Z, hZ₁, hZ₄, hZ₂, hZ₃⟩ := comp_open_symm_mem_uniformity_sets hW₁\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK : Set α\nV : Set (β × β)\nf : C(α, β)\nhK : IsCompact K\nhV : V ∈ 𝓤 β\nW : Set (β × β)\nhW₁ : W ∈ 𝓤 β\nhW₄ : IsOpen W\nhW₂ : SymmetricRel W\nhW₃ : W ○ W ⊆ V\nZ : Set (β × β)\nhZ₁ : Z ∈ 𝓤 β\nhZ₄ : IsOpen Z\nhZ₂ : SymmetricRel Z\nhZ₃ : Z ○ Z ⊆ W\n⊢ ∃ ι x C _hC U _hU,\n    f ∈ ⋂ (i : ι), CompactOpen.gen (C i) (U i) ∧ ⋂ (i : ι), CompactOpen.gen (C i) (U i) ⊆ compactConvNhd K V f\n[PROOFSTEP]\nlet U : α → Set α := fun x => f ⁻¹' ball (f x) Z\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK : Set α\nV : Set (β × β)\nf : C(α, β)\nhK : IsCompact K\nhV : V ∈ 𝓤 β\nW : Set (β × β)\nhW₁ : W ∈ 𝓤 β\nhW₄ : IsOpen W\nhW₂ : SymmetricRel W\nhW₃ : W ○ W ⊆ V\nZ : Set (β × β)\nhZ₁ : Z ∈ 𝓤 β\nhZ₄ : IsOpen Z\nhZ₂ : SymmetricRel Z\nhZ₃ : Z ○ Z ⊆ W\nU : α → Set α := fun x => ↑f ⁻¹' ball (↑f x) Z\n⊢ ∃ ι x C _hC U _hU,\n    f ∈ ⋂ (i : ι), CompactOpen.gen (C i) (U i) ∧ ⋂ (i : ι), CompactOpen.gen (C i) (U i) ⊆ compactConvNhd K V f\n[PROOFSTEP]\nhave hU : ∀ x, IsOpen (U x) := fun x => f.continuous.isOpen_preimage _ (isOpen_ball _ hZ₄)\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK : Set α\nV : Set (β × β)\nf : C(α, β)\nhK : IsCompact K\nhV : V ∈ 𝓤 β\nW : Set (β × β)\nhW₁ : W ∈ 𝓤 β\nhW₄ : IsOpen W\nhW₂ : SymmetricRel W\nhW₃ : W ○ W ⊆ V\nZ : Set (β × β)\nhZ₁ : Z ∈ 𝓤 β\nhZ₄ : IsOpen Z\nhZ₂ : SymmetricRel Z\nhZ₃ : Z ○ Z ⊆ W\nU : α → Set α := fun x => ↑f ⁻¹' ball (↑f x) Z\nhU : ∀ (x : α), IsOpen (U x)\n⊢ ∃ ι x C _hC U _hU,\n    f ∈ ⋂ (i : ι), CompactOpen.gen (C i) (U i) ∧ ⋂ (i : ι), CompactOpen.gen (C i) (U i) ⊆ compactConvNhd K V f\n[PROOFSTEP]\nhave hUK : K ⊆ ⋃ x : K, U (x : K) := by\n  intro x hx\n  simp only [exists_prop, mem_iUnion, iUnion_coe_set, mem_preimage]\n  exact ⟨(⟨x, hx⟩ : K), by simp [hx, mem_ball_self (f x) hZ₁]⟩\n[GOAL]\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK : Set α\nV : Set (β × β)\nf : C(α, β)\nhK : IsCompact K\nhV : V ∈ 𝓤 β\nW : Set (β × β)\nhW₁ : W ∈ 𝓤 β\nhW₄ : IsOpen W\nhW₂ : SymmetricRel W\nhW₃ : W ○ W ⊆ V\nZ : Set (β × β)\nhZ₁ : Z ∈ 𝓤 β\nhZ₄ : IsOpen Z\nhZ₂ : SymmetricRel Z\nhZ₃ : Z ○ Z ⊆ W\nU : α → Set α := fun x => ↑f ⁻¹' ball (↑f x) Z\nhU : ∀ (x : α), IsOpen (U x)\n⊢ K ⊆ ⋃ (x : ↑K), U ↑x\n[PROOFSTEP]\nintro x hx\n[GOAL]\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK : Set α\nV : Set (β × β)\nf : C(α, β)\nhK : IsCompact K\nhV : V ∈ 𝓤 β\nW : Set (β × β)\nhW₁ : W ∈ 𝓤 β\nhW₄ : IsOpen W\nhW₂ : SymmetricRel W\nhW₃ : W ○ W ⊆ V\nZ : Set (β × β)\nhZ₁ : Z ∈ 𝓤 β\nhZ₄ : IsOpen Z\nhZ₂ : SymmetricRel Z\nhZ₃ : Z ○ Z ⊆ W\nU : α → Set α := fun x => ↑f ⁻¹' ball (↑f x) Z\nhU : ∀ (x : α), IsOpen (U x)\nx : α\nhx : x ∈ K\n⊢ x ∈ ⋃ (x : ↑K), U ↑x\n[PROOFSTEP]\nsimp only [exists_prop, mem_iUnion, iUnion_coe_set, mem_preimage]\n[GOAL]\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK : Set α\nV : Set (β × β)\nf : C(α, β)\nhK : IsCompact K\nhV : V ∈ 𝓤 β\nW : Set (β × β)\nhW₁ : W ∈ 𝓤 β\nhW₄ : IsOpen W\nhW₂ : SymmetricRel W\nhW₃ : W ○ W ⊆ V\nZ : Set (β × β)\nhZ₁ : Z ∈ 𝓤 β\nhZ₄ : IsOpen Z\nhZ₂ : SymmetricRel Z\nhZ₃ : Z ○ Z ⊆ W\nU : α → Set α := fun x => ↑f ⁻¹' ball (↑f x) Z\nhU : ∀ (x : α), IsOpen (U x)\nx : α\nhx : x ∈ K\n⊢ ∃ i, i ∈ K ∧ ↑f x ∈ ball (↑f i) Z\n[PROOFSTEP]\nexact ⟨(⟨x, hx⟩ : K), by simp [hx, mem_ball_self (f x) hZ₁]⟩\n[GOAL]\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK : Set α\nV : Set (β × β)\nf : C(α, β)\nhK : IsCompact K\nhV : V ∈ 𝓤 β\nW : Set (β × β)\nhW₁ : W ∈ 𝓤 β\nhW₄ : IsOpen W\nhW₂ : SymmetricRel W\nhW₃ : W ○ W ⊆ V\nZ : Set (β × β)\nhZ₁ : Z ∈ 𝓤 β\nhZ₄ : IsOpen Z\nhZ₂ : SymmetricRel Z\nhZ₃ : Z ○ Z ⊆ W\nU : α → Set α := fun x => ↑f ⁻¹' ball (↑f x) Z\nhU : ∀ (x : α), IsOpen (U x)\nx : α\nhx : x ∈ K\n⊢ ↑{ val := x, property := hx } ∈ K ∧ ↑f x ∈ ball (↑f ↑{ val := x, property := hx }) Z\n[PROOFSTEP]\nsimp [hx, mem_ball_self (f x) hZ₁]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK : Set α\nV : Set (β × β)\nf : C(α, β)\nhK : IsCompact K\nhV : V ∈ 𝓤 β\nW : Set (β × β)\nhW₁ : W ∈ 𝓤 β\nhW₄ : IsOpen W\nhW₂ : SymmetricRel W\nhW₃ : W ○ W ⊆ V\nZ : Set (β × β)\nhZ₁ : Z ∈ 𝓤 β\nhZ₄ : IsOpen Z\nhZ₂ : SymmetricRel Z\nhZ₃ : Z ○ Z ⊆ W\nU : α → Set α := fun x => ↑f ⁻¹' ball (↑f x) Z\nhU : ∀ (x : α), IsOpen (U x)\nhUK : K ⊆ ⋃ (x : ↑K), U ↑x\n⊢ ∃ ι x C _hC U _hU,\n    f ∈ ⋂ (i : ι), CompactOpen.gen (C i) (U i) ∧ ⋂ (i : ι), CompactOpen.gen (C i) (U i) ⊆ compactConvNhd K V f\n[PROOFSTEP]\nobtain ⟨t, ht⟩ := hK.elim_finite_subcover _ (fun x : K => hU x.val) hUK\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK : Set α\nV : Set (β × β)\nf : C(α, β)\nhK : IsCompact K\nhV : V ∈ 𝓤 β\nW : Set (β × β)\nhW₁ : W ∈ 𝓤 β\nhW₄ : IsOpen W\nhW₂ : SymmetricRel W\nhW₃ : W ○ W ⊆ V\nZ : Set (β × β)\nhZ₁ : Z ∈ 𝓤 β\nhZ₄ : IsOpen Z\nhZ₂ : SymmetricRel Z\nhZ₃ : Z ○ Z ⊆ W\nU : α → Set α := fun x => ↑f ⁻¹' ball (↑f x) Z\nhU : ∀ (x : α), IsOpen (U x)\nhUK : K ⊆ ⋃ (x : ↑K), U ↑x\nt : Finset ↑K\nht : K ⊆ ⋃ (i : ↑K) (_ : i ∈ t), U ↑i\n⊢ ∃ ι x C _hC U _hU,\n    f ∈ ⋂ (i : ι), CompactOpen.gen (C i) (U i) ∧ ⋂ (i : ι), CompactOpen.gen (C i) (U i) ⊆ compactConvNhd K V f\n[PROOFSTEP]\nlet C : t → Set α := fun i => K ∩ closure (U ((i : K) : α))\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK : Set α\nV : Set (β × β)\nf : C(α, β)\nhK : IsCompact K\nhV : V ∈ 𝓤 β\nW : Set (β × β)\nhW₁ : W ∈ 𝓤 β\nhW₄ : IsOpen W\nhW₂ : SymmetricRel W\nhW₃ : W ○ W ⊆ V\nZ : Set (β × β)\nhZ₁ : Z ∈ 𝓤 β\nhZ₄ : IsOpen Z\nhZ₂ : SymmetricRel Z\nhZ₃ : Z ○ Z ⊆ W\nU : α → Set α := fun x => ↑f ⁻¹' ball (↑f x) Z\nhU : ∀ (x : α), IsOpen (U x)\nhUK : K ⊆ ⋃ (x : ↑K), U ↑x\nt : Finset ↑K\nht : K ⊆ ⋃ (i : ↑K) (_ : i ∈ t), U ↑i\nC : { x // x ∈ t } → Set α := fun i => K ∩ closure (U ↑↑i)\n⊢ ∃ ι x C _hC U _hU,\n    f ∈ ⋂ (i : ι), CompactOpen.gen (C i) (U i) ∧ ⋂ (i : ι), CompactOpen.gen (C i) (U i) ⊆ compactConvNhd K V f\n[PROOFSTEP]\nhave hC : K ⊆ ⋃ i, C i := by\n  rw [← K.inter_iUnion, subset_inter_iff]\n  refine' ⟨Subset.rfl, ht.trans _⟩\n  simp only [SetCoe.forall, Subtype.coe_mk, iUnion_subset_iff]\n  exact fun x hx₁ hx₂ => subset_iUnion_of_subset (⟨_, hx₂⟩ : t) (by simp [subset_closure])\n[GOAL]\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK : Set α\nV : Set (β × β)\nf : C(α, β)\nhK : IsCompact K\nhV : V ∈ 𝓤 β\nW : Set (β × β)\nhW₁ : W ∈ 𝓤 β\nhW₄ : IsOpen W\nhW₂ : SymmetricRel W\nhW₃ : W ○ W ⊆ V\nZ : Set (β × β)\nhZ₁ : Z ∈ 𝓤 β\nhZ₄ : IsOpen Z\nhZ₂ : SymmetricRel Z\nhZ₃ : Z ○ Z ⊆ W\nU : α → Set α := fun x => ↑f ⁻¹' ball (↑f x) Z\nhU : ∀ (x : α), IsOpen (U x)\nhUK : K ⊆ ⋃ (x : ↑K), U ↑x\nt : Finset ↑K\nht : K ⊆ ⋃ (i : ↑K) (_ : i ∈ t), U ↑i\nC : { x // x ∈ t } → Set α := fun i => K ∩ closure (U ↑↑i)\n⊢ K ⊆ ⋃ (i : { x // x ∈ t }), C i\n[PROOFSTEP]\nrw [← K.inter_iUnion, subset_inter_iff]\n[GOAL]\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK : Set α\nV : Set (β × β)\nf : C(α, β)\nhK : IsCompact K\nhV : V ∈ 𝓤 β\nW : Set (β × β)\nhW₁ : W ∈ 𝓤 β\nhW₄ : IsOpen W\nhW₂ : SymmetricRel W\nhW₃ : W ○ W ⊆ V\nZ : Set (β × β)\nhZ₁ : Z ∈ 𝓤 β\nhZ₄ : IsOpen Z\nhZ₂ : SymmetricRel Z\nhZ₃ : Z ○ Z ⊆ W\nU : α → Set α := fun x => ↑f ⁻¹' ball (↑f x) Z\nhU : ∀ (x : α), IsOpen (U x)\nhUK : K ⊆ ⋃ (x : ↑K), U ↑x\nt : Finset ↑K\nht : K ⊆ ⋃ (i : ↑K) (_ : i ∈ t), U ↑i\nC : { x // x ∈ t } → Set α := fun i => K ∩ closure (U ↑↑i)\n⊢ K ⊆ K ∧ K ⊆ ⋃ (i : { x // x ∈ t }), closure (U ↑↑i)\n[PROOFSTEP]\nrefine' ⟨Subset.rfl, ht.trans _⟩\n[GOAL]\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK : Set α\nV : Set (β × β)\nf : C(α, β)\nhK : IsCompact K\nhV : V ∈ 𝓤 β\nW : Set (β × β)\nhW₁ : W ∈ 𝓤 β\nhW₄ : IsOpen W\nhW₂ : SymmetricRel W\nhW₃ : W ○ W ⊆ V\nZ : Set (β × β)\nhZ₁ : Z ∈ 𝓤 β\nhZ₄ : IsOpen Z\nhZ₂ : SymmetricRel Z\nhZ₃ : Z ○ Z ⊆ W\nU : α → Set α := fun x => ↑f ⁻¹' ball (↑f x) Z\nhU : ∀ (x : α), IsOpen (U x)\nhUK : K ⊆ ⋃ (x : ↑K), U ↑x\nt : Finset ↑K\nht : K ⊆ ⋃ (i : ↑K) (_ : i ∈ t), U ↑i\nC : { x // x ∈ t } → Set α := fun i => K ∩ closure (U ↑↑i)\n⊢ ⋃ (i : ↑K) (_ : i ∈ t), U ↑i ⊆ ⋃ (i : { x // x ∈ t }), closure (U ↑↑i)\n[PROOFSTEP]\nsimp only [SetCoe.forall, Subtype.coe_mk, iUnion_subset_iff]\n[GOAL]\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK : Set α\nV : Set (β × β)\nf : C(α, β)\nhK : IsCompact K\nhV : V ∈ 𝓤 β\nW : Set (β × β)\nhW₁ : W ∈ 𝓤 β\nhW₄ : IsOpen W\nhW₂ : SymmetricRel W\nhW₃ : W ○ W ⊆ V\nZ : Set (β × β)\nhZ₁ : Z ∈ 𝓤 β\nhZ₄ : IsOpen Z\nhZ₂ : SymmetricRel Z\nhZ₃ : Z ○ Z ⊆ W\nU : α → Set α := fun x => ↑f ⁻¹' ball (↑f x) Z\nhU : ∀ (x : α), IsOpen (U x)\nhUK : K ⊆ ⋃ (x : ↑K), U ↑x\nt : Finset ↑K\nht : K ⊆ ⋃ (i : ↑K) (_ : i ∈ t), U ↑i\nC : { x // x ∈ t } → Set α := fun i => K ∩ closure (U ↑↑i)\n⊢ ∀ (x : α) (h : x ∈ K),\n    { val := x, property := h } ∈ t → ↑f ⁻¹' ball (↑f x) Z ⊆ ⋃ (i : { x // x ∈ t }), closure (↑f ⁻¹' ball (↑f ↑↑i) Z)\n[PROOFSTEP]\nexact fun x hx₁ hx₂ => subset_iUnion_of_subset (⟨_, hx₂⟩ : t) (by simp [subset_closure])\n[GOAL]\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK : Set α\nV : Set (β × β)\nf : C(α, β)\nhK : IsCompact K\nhV : V ∈ 𝓤 β\nW : Set (β × β)\nhW₁ : W ∈ 𝓤 β\nhW₄ : IsOpen W\nhW₂ : SymmetricRel W\nhW₃ : W ○ W ⊆ V\nZ : Set (β × β)\nhZ₁ : Z ∈ 𝓤 β\nhZ₄ : IsOpen Z\nhZ₂ : SymmetricRel Z\nhZ₃ : Z ○ Z ⊆ W\nU : α → Set α := fun x => ↑f ⁻¹' ball (↑f x) Z\nhU : ∀ (x : α), IsOpen (U x)\nhUK : K ⊆ ⋃ (x : ↑K), U ↑x\nt : Finset ↑K\nht : K ⊆ ⋃ (i : ↑K) (_ : i ∈ t), U ↑i\nC : { x // x ∈ t } → Set α := fun i => K ∩ closure (U ↑↑i)\nx : α\nhx₁ : x ∈ K\nhx₂ : { val := x, property := hx₁ } ∈ t\n⊢ ↑f ⁻¹' ball (↑f x) Z ⊆ closure (↑f ⁻¹' ball (↑f ↑↑{ val := { val := x, property := hx₁ }, property := hx₂ }) Z)\n[PROOFSTEP]\nsimp [subset_closure]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK : Set α\nV : Set (β × β)\nf : C(α, β)\nhK : IsCompact K\nhV : V ∈ 𝓤 β\nW : Set (β × β)\nhW₁ : W ∈ 𝓤 β\nhW₄ : IsOpen W\nhW₂ : SymmetricRel W\nhW₃ : W ○ W ⊆ V\nZ : Set (β × β)\nhZ₁ : Z ∈ 𝓤 β\nhZ₄ : IsOpen Z\nhZ₂ : SymmetricRel Z\nhZ₃ : Z ○ Z ⊆ W\nU : α → Set α := fun x => ↑f ⁻¹' ball (↑f x) Z\nhU : ∀ (x : α), IsOpen (U x)\nhUK : K ⊆ ⋃ (x : ↑K), U ↑x\nt : Finset ↑K\nht : K ⊆ ⋃ (i : ↑K) (_ : i ∈ t), U ↑i\nC : { x // x ∈ t } → Set α := fun i => K ∩ closure (U ↑↑i)\nhC : K ⊆ ⋃ (i : { x // x ∈ t }), C i\n⊢ ∃ ι x C _hC U _hU,\n    f ∈ ⋂ (i : ι), CompactOpen.gen (C i) (U i) ∧ ⋂ (i : ι), CompactOpen.gen (C i) (U i) ⊆ compactConvNhd K V f\n[PROOFSTEP]\nhave hfC : ∀ i : t, C i ⊆ f ⁻¹' ball (f ((i : K) : α)) W :=\n  by\n  simp only [← image_subset_iff, ← mem_preimage]\n  rintro ⟨⟨x, hx₁⟩, hx₂⟩\n  have hZW : closure (ball (f x) Z) ⊆ ball (f x) W := by\n    intro y hy\n    obtain ⟨z, hz₁, hz₂⟩ := UniformSpace.mem_closure_iff_ball.mp hy hZ₁\n    exact ball_mono hZ₃ _ (mem_ball_comp hz₂ ((mem_ball_symmetry hZ₂).mp hz₁))\n  calc\n    f '' (K ∩ closure (U x)) ⊆ f '' closure (U x) := image_subset _ (inter_subset_right _ _)\n    _ ⊆ closure (f '' U x) := f.continuous.continuousOn.image_closure\n    _ ⊆ closure (ball (f x) Z) := by\n      apply closure_mono\n      simp only [image_subset_iff]\n      rfl\n    _ ⊆ ball (f x) W := hZW\n[GOAL]\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK : Set α\nV : Set (β × β)\nf : C(α, β)\nhK : IsCompact K\nhV : V ∈ 𝓤 β\nW : Set (β × β)\nhW₁ : W ∈ 𝓤 β\nhW₄ : IsOpen W\nhW₂ : SymmetricRel W\nhW₃ : W ○ W ⊆ V\nZ : Set (β × β)\nhZ₁ : Z ∈ 𝓤 β\nhZ₄ : IsOpen Z\nhZ₂ : SymmetricRel Z\nhZ₃ : Z ○ Z ⊆ W\nU : α → Set α := fun x => ↑f ⁻¹' ball (↑f x) Z\nhU : ∀ (x : α), IsOpen (U x)\nhUK : K ⊆ ⋃ (x : ↑K), U ↑x\nt : Finset ↑K\nht : K ⊆ ⋃ (i : ↑K) (_ : i ∈ t), U ↑i\nC : { x // x ∈ t } → Set α := fun i => K ∩ closure (U ↑↑i)\nhC : K ⊆ ⋃ (i : { x // x ∈ t }), C i\n⊢ ∀ (i : { x // x ∈ t }), C i ⊆ ↑f ⁻¹' ball (↑f ↑↑i) W\n[PROOFSTEP]\nsimp only [← image_subset_iff, ← mem_preimage]\n[GOAL]\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK : Set α\nV : Set (β × β)\nf : C(α, β)\nhK : IsCompact K\nhV : V ∈ 𝓤 β\nW : Set (β × β)\nhW₁ : W ∈ 𝓤 β\nhW₄ : IsOpen W\nhW₂ : SymmetricRel W\nhW₃ : W ○ W ⊆ V\nZ : Set (β × β)\nhZ₁ : Z ∈ 𝓤 β\nhZ₄ : IsOpen Z\nhZ₂ : SymmetricRel Z\nhZ₃ : Z ○ Z ⊆ W\nU : α → Set α := fun x => ↑f ⁻¹' ball (↑f x) Z\nhU : ∀ (x : α), IsOpen (U x)\nhUK : K ⊆ ⋃ (x : ↑K), U ↑x\nt : Finset ↑K\nht : K ⊆ ⋃ (i : ↑K) (_ : i ∈ t), U ↑i\nC : { x // x ∈ t } → Set α := fun i => K ∩ closure (U ↑↑i)\nhC : K ⊆ ⋃ (i : { x // x ∈ t }), C i\n⊢ ∀ (i : { x // x ∈ t }), ↑f '' (K ∩ closure (↑f ⁻¹' ball (↑f ↑↑i) Z)) ⊆ ball (↑f ↑↑i) W\n[PROOFSTEP]\nrintro ⟨⟨x, hx₁⟩, hx₂⟩\n[GOAL]\ncase mk.mk\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK : Set α\nV : Set (β × β)\nf : C(α, β)\nhK : IsCompact K\nhV : V ∈ 𝓤 β\nW : Set (β × β)\nhW₁ : W ∈ 𝓤 β\nhW₄ : IsOpen W\nhW₂ : SymmetricRel W\nhW₃ : W ○ W ⊆ V\nZ : Set (β × β)\nhZ₁ : Z ∈ 𝓤 β\nhZ₄ : IsOpen Z\nhZ₂ : SymmetricRel Z\nhZ₃ : Z ○ Z ⊆ W\nU : α → Set α := fun x => ↑f ⁻¹' ball (↑f x) Z\nhU : ∀ (x : α), IsOpen (U x)\nhUK : K ⊆ ⋃ (x : ↑K), U ↑x\nt : Finset ↑K\nht : K ⊆ ⋃ (i : ↑K) (_ : i ∈ t), U ↑i\nC : { x // x ∈ t } → Set α := fun i => K ∩ closure (U ↑↑i)\nhC : K ⊆ ⋃ (i : { x // x ∈ t }), C i\nx : α\nhx₁ : x ∈ K\nhx₂ : { val := x, property := hx₁ } ∈ t\n⊢ ↑f '' (K ∩ closure (↑f ⁻¹' ball (↑f ↑↑{ val := { val := x, property := hx₁ }, property := hx₂ }) Z)) ⊆\n    ball (↑f ↑↑{ val := { val := x, property := hx₁ }, property := hx₂ }) W\n[PROOFSTEP]\nhave hZW : closure (ball (f x) Z) ⊆ ball (f x) W := by\n  intro y hy\n  obtain ⟨z, hz₁, hz₂⟩ := UniformSpace.mem_closure_iff_ball.mp hy hZ₁\n  exact ball_mono hZ₃ _ (mem_ball_comp hz₂ ((mem_ball_symmetry hZ₂).mp hz₁))\n[GOAL]\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK : Set α\nV : Set (β × β)\nf : C(α, β)\nhK : IsCompact K\nhV : V ∈ 𝓤 β\nW : Set (β × β)\nhW₁ : W ∈ 𝓤 β\nhW₄ : IsOpen W\nhW₂ : SymmetricRel W\nhW₃ : W ○ W ⊆ V\nZ : Set (β × β)\nhZ₁ : Z ∈ 𝓤 β\nhZ₄ : IsOpen Z\nhZ₂ : SymmetricRel Z\nhZ₃ : Z ○ Z ⊆ W\nU : α → Set α := fun x => ↑f ⁻¹' ball (↑f x) Z\nhU : ∀ (x : α), IsOpen (U x)\nhUK : K ⊆ ⋃ (x : ↑K), U ↑x\nt : Finset ↑K\nht : K ⊆ ⋃ (i : ↑K) (_ : i ∈ t), U ↑i\nC : { x // x ∈ t } → Set α := fun i => K ∩ closure (U ↑↑i)\nhC : K ⊆ ⋃ (i : { x // x ∈ t }), C i\nx : α\nhx₁ : x ∈ K\nhx₂ : { val := x, property := hx₁ } ∈ t\n⊢ closure (ball (↑f x) Z) ⊆ ball (↑f x) W\n[PROOFSTEP]\nintro y hy\n[GOAL]\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK : Set α\nV : Set (β × β)\nf : C(α, β)\nhK : IsCompact K\nhV : V ∈ 𝓤 β\nW : Set (β × β)\nhW₁ : W ∈ 𝓤 β\nhW₄ : IsOpen W\nhW₂ : SymmetricRel W\nhW₃ : W ○ W ⊆ V\nZ : Set (β × β)\nhZ₁ : Z ∈ 𝓤 β\nhZ₄ : IsOpen Z\nhZ₂ : SymmetricRel Z\nhZ₃ : Z ○ Z ⊆ W\nU : α → Set α := fun x => ↑f ⁻¹' ball (↑f x) Z\nhU : ∀ (x : α), IsOpen (U x)\nhUK : K ⊆ ⋃ (x : ↑K), U ↑x\nt : Finset ↑K\nht : K ⊆ ⋃ (i : ↑K) (_ : i ∈ t), U ↑i\nC : { x // x ∈ t } → Set α := fun i => K ∩ closure (U ↑↑i)\nhC : K ⊆ ⋃ (i : { x // x ∈ t }), C i\nx : α\nhx₁ : x ∈ K\nhx₂ : { val := x, property := hx₁ } ∈ t\ny : β\nhy : y ∈ closure (ball (↑f x) Z)\n⊢ y ∈ ball (↑f x) W\n[PROOFSTEP]\nobtain ⟨z, hz₁, hz₂⟩ := UniformSpace.mem_closure_iff_ball.mp hy hZ₁\n[GOAL]\ncase intro.intro\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK : Set α\nV : Set (β × β)\nf : C(α, β)\nhK : IsCompact K\nhV : V ∈ 𝓤 β\nW : Set (β × β)\nhW₁ : W ∈ 𝓤 β\nhW₄ : IsOpen W\nhW₂ : SymmetricRel W\nhW₃ : W ○ W ⊆ V\nZ : Set (β × β)\nhZ₁ : Z ∈ 𝓤 β\nhZ₄ : IsOpen Z\nhZ₂ : SymmetricRel Z\nhZ₃ : Z ○ Z ⊆ W\nU : α → Set α := fun x => ↑f ⁻¹' ball (↑f x) Z\nhU : ∀ (x : α), IsOpen (U x)\nhUK : K ⊆ ⋃ (x : ↑K), U ↑x\nt : Finset ↑K\nht : K ⊆ ⋃ (i : ↑K) (_ : i ∈ t), U ↑i\nC : { x // x ∈ t } → Set α := fun i => K ∩ closure (U ↑↑i)\nhC : K ⊆ ⋃ (i : { x // x ∈ t }), C i\nx : α\nhx₁ : x ∈ K\nhx₂ : { val := x, property := hx₁ } ∈ t\ny : β\nhy : y ∈ closure (ball (↑f x) Z)\nz : β\nhz₁ : z ∈ ball y Z\nhz₂ : z ∈ ball (↑f x) Z\n⊢ y ∈ ball (↑f x) W\n[PROOFSTEP]\nexact ball_mono hZ₃ _ (mem_ball_comp hz₂ ((mem_ball_symmetry hZ₂).mp hz₁))\n[GOAL]\ncase mk.mk\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK : Set α\nV : Set (β × β)\nf : C(α, β)\nhK : IsCompact K\nhV : V ∈ 𝓤 β\nW : Set (β × β)\nhW₁ : W ∈ 𝓤 β\nhW₄ : IsOpen W\nhW₂ : SymmetricRel W\nhW₃ : W ○ W ⊆ V\nZ : Set (β × β)\nhZ₁ : Z ∈ 𝓤 β\nhZ₄ : IsOpen Z\nhZ₂ : SymmetricRel Z\nhZ₃ : Z ○ Z ⊆ W\nU : α → Set α := fun x => ↑f ⁻¹' ball (↑f x) Z\nhU : ∀ (x : α), IsOpen (U x)\nhUK : K ⊆ ⋃ (x : ↑K), U ↑x\nt : Finset ↑K\nht : K ⊆ ⋃ (i : ↑K) (_ : i ∈ t), U ↑i\nC : { x // x ∈ t } → Set α := fun i => K ∩ closure (U ↑↑i)\nhC : K ⊆ ⋃ (i : { x // x ∈ t }), C i\nx : α\nhx₁ : x ∈ K\nhx₂ : { val := x, property := hx₁ } ∈ t\nhZW : closure (ball (↑f x) Z) ⊆ ball (↑f x) W\n⊢ ↑f '' (K ∩ closure (↑f ⁻¹' ball (↑f ↑↑{ val := { val := x, property := hx₁ }, property := hx₂ }) Z)) ⊆\n    ball (↑f ↑↑{ val := { val := x, property := hx₁ }, property := hx₂ }) W\n[PROOFSTEP]\ncalc\n  f '' (K ∩ closure (U x)) ⊆ f '' closure (U x) := image_subset _ (inter_subset_right _ _)\n  _ ⊆ closure (f '' U x) := f.continuous.continuousOn.image_closure\n  _ ⊆ closure (ball (f x) Z) := by\n    apply closure_mono\n    simp only [image_subset_iff]\n    rfl\n  _ ⊆ ball (f x) W := hZW\n[GOAL]\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK : Set α\nV : Set (β × β)\nf : C(α, β)\nhK : IsCompact K\nhV : V ∈ 𝓤 β\nW : Set (β × β)\nhW₁ : W ∈ 𝓤 β\nhW₄ : IsOpen W\nhW₂ : SymmetricRel W\nhW₃ : W ○ W ⊆ V\nZ : Set (β × β)\nhZ₁ : Z ∈ 𝓤 β\nhZ₄ : IsOpen Z\nhZ₂ : SymmetricRel Z\nhZ₃ : Z ○ Z ⊆ W\nU : α → Set α := fun x => ↑f ⁻¹' ball (↑f x) Z\nhU : ∀ (x : α), IsOpen (U x)\nhUK : K ⊆ ⋃ (x : ↑K), U ↑x\nt : Finset ↑K\nht : K ⊆ ⋃ (i : ↑K) (_ : i ∈ t), U ↑i\nC : { x // x ∈ t } → Set α := fun i => K ∩ closure (U ↑↑i)\nhC : K ⊆ ⋃ (i : { x // x ∈ t }), C i\nx : α\nhx₁ : x ∈ K\nhx₂ : { val := x, property := hx₁ } ∈ t\nhZW : closure (ball (↑f x) Z) ⊆ ball (↑f x) W\n⊢ closure (↑f '' U x) ⊆ closure (ball (↑f x) Z)\n[PROOFSTEP]\napply closure_mono\n[GOAL]\ncase h\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK : Set α\nV : Set (β × β)\nf : C(α, β)\nhK : IsCompact K\nhV : V ∈ 𝓤 β\nW : Set (β × β)\nhW₁ : W ∈ 𝓤 β\nhW₄ : IsOpen W\nhW₂ : SymmetricRel W\nhW₃ : W ○ W ⊆ V\nZ : Set (β × β)\nhZ₁ : Z ∈ 𝓤 β\nhZ₄ : IsOpen Z\nhZ₂ : SymmetricRel Z\nhZ₃ : Z ○ Z ⊆ W\nU : α → Set α := fun x => ↑f ⁻¹' ball (↑f x) Z\nhU : ∀ (x : α), IsOpen (U x)\nhUK : K ⊆ ⋃ (x : ↑K), U ↑x\nt : Finset ↑K\nht : K ⊆ ⋃ (i : ↑K) (_ : i ∈ t), U ↑i\nC : { x // x ∈ t } → Set α := fun i => K ∩ closure (U ↑↑i)\nhC : K ⊆ ⋃ (i : { x // x ∈ t }), C i\nx : α\nhx₁ : x ∈ K\nhx₂ : { val := x, property := hx₁ } ∈ t\nhZW : closure (ball (↑f x) Z) ⊆ ball (↑f x) W\n⊢ ↑f '' U x ⊆ ball (↑f x) Z\n[PROOFSTEP]\nsimp only [image_subset_iff]\n[GOAL]\ncase h\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK : Set α\nV : Set (β × β)\nf : C(α, β)\nhK : IsCompact K\nhV : V ∈ 𝓤 β\nW : Set (β × β)\nhW₁ : W ∈ 𝓤 β\nhW₄ : IsOpen W\nhW₂ : SymmetricRel W\nhW₃ : W ○ W ⊆ V\nZ : Set (β × β)\nhZ₁ : Z ∈ 𝓤 β\nhZ₄ : IsOpen Z\nhZ₂ : SymmetricRel Z\nhZ₃ : Z ○ Z ⊆ W\nU : α → Set α := fun x => ↑f ⁻¹' ball (↑f x) Z\nhU : ∀ (x : α), IsOpen (U x)\nhUK : K ⊆ ⋃ (x : ↑K), U ↑x\nt : Finset ↑K\nht : K ⊆ ⋃ (i : ↑K) (_ : i ∈ t), U ↑i\nC : { x // x ∈ t } → Set α := fun i => K ∩ closure (U ↑↑i)\nhC : K ⊆ ⋃ (i : { x // x ∈ t }), C i\nx : α\nhx₁ : x ∈ K\nhx₂ : { val := x, property := hx₁ } ∈ t\nhZW : closure (ball (↑f x) Z) ⊆ ball (↑f x) W\n⊢ ↑f ⁻¹' ball (↑f x) Z ⊆ (fun a => ↑f a) ⁻¹' ball (↑f x) Z\n[PROOFSTEP]\nrfl\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK : Set α\nV : Set (β × β)\nf : C(α, β)\nhK : IsCompact K\nhV : V ∈ 𝓤 β\nW : Set (β × β)\nhW₁ : W ∈ 𝓤 β\nhW₄ : IsOpen W\nhW₂ : SymmetricRel W\nhW₃ : W ○ W ⊆ V\nZ : Set (β × β)\nhZ₁ : Z ∈ 𝓤 β\nhZ₄ : IsOpen Z\nhZ₂ : SymmetricRel Z\nhZ₃ : Z ○ Z ⊆ W\nU : α → Set α := fun x => ↑f ⁻¹' ball (↑f x) Z\nhU : ∀ (x : α), IsOpen (U x)\nhUK : K ⊆ ⋃ (x : ↑K), U ↑x\nt : Finset ↑K\nht : K ⊆ ⋃ (i : ↑K) (_ : i ∈ t), U ↑i\nC : { x // x ∈ t } → Set α := fun i => K ∩ closure (U ↑↑i)\nhC : K ⊆ ⋃ (i : { x // x ∈ t }), C i\nhfC : ∀ (i : { x // x ∈ t }), C i ⊆ ↑f ⁻¹' ball (↑f ↑↑i) W\n⊢ ∃ ι x C _hC U _hU,\n    f ∈ ⋂ (i : ι), CompactOpen.gen (C i) (U i) ∧ ⋂ (i : ι), CompactOpen.gen (C i) (U i) ⊆ compactConvNhd K V f\n[PROOFSTEP]\nrefine'\n  ⟨t, t.fintypeCoeSort, C, fun i => hK.inter_right isClosed_closure, fun i => ball (f ((i : K) : α)) W, fun i =>\n    isOpen_ball _ hW₄, by simp [CompactOpen.gen, hfC], fun g hg x hx => hW₃ (mem_compRel.mpr _)⟩\n[GOAL]\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK : Set α\nV : Set (β × β)\nf : C(α, β)\nhK : IsCompact K\nhV : V ∈ 𝓤 β\nW : Set (β × β)\nhW₁ : W ∈ 𝓤 β\nhW₄ : IsOpen W\nhW₂ : SymmetricRel W\nhW₃ : W ○ W ⊆ V\nZ : Set (β × β)\nhZ₁ : Z ∈ 𝓤 β\nhZ₄ : IsOpen Z\nhZ₂ : SymmetricRel Z\nhZ₃ : Z ○ Z ⊆ W\nU : α → Set α := fun x => ↑f ⁻¹' ball (↑f x) Z\nhU : ∀ (x : α), IsOpen (U x)\nhUK : K ⊆ ⋃ (x : ↑K), U ↑x\nt : Finset ↑K\nht : K ⊆ ⋃ (i : ↑K) (_ : i ∈ t), U ↑i\nC : { x // x ∈ t } → Set α := fun i => K ∩ closure (U ↑↑i)\nhC : K ⊆ ⋃ (i : { x // x ∈ t }), C i\nhfC : ∀ (i : { x // x ∈ t }), C i ⊆ ↑f ⁻¹' ball (↑f ↑↑i) W\n⊢ f ∈ ⋂ (i : { x // x ∈ t }), CompactOpen.gen (C i) ((fun i => ball (↑f ↑↑i) W) i)\n[PROOFSTEP]\nsimp [CompactOpen.gen, hfC]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK : Set α\nV : Set (β × β)\nf : C(α, β)\nhK : IsCompact K\nhV : V ∈ 𝓤 β\nW : Set (β × β)\nhW₁ : W ∈ 𝓤 β\nhW₄ : IsOpen W\nhW₂ : SymmetricRel W\nhW₃ : W ○ W ⊆ V\nZ : Set (β × β)\nhZ₁ : Z ∈ 𝓤 β\nhZ₄ : IsOpen Z\nhZ₂ : SymmetricRel Z\nhZ₃ : Z ○ Z ⊆ W\nU : α → Set α := fun x => ↑f ⁻¹' ball (↑f x) Z\nhU : ∀ (x : α), IsOpen (U x)\nhUK : K ⊆ ⋃ (x : ↑K), U ↑x\nt : Finset ↑K\nht : K ⊆ ⋃ (i : ↑K) (_ : i ∈ t), U ↑i\nC : { x // x ∈ t } → Set α := fun i => K ∩ closure (U ↑↑i)\nhC : K ⊆ ⋃ (i : { x // x ∈ t }), C i\nhfC : ∀ (i : { x // x ∈ t }), C i ⊆ ↑f ⁻¹' ball (↑f ↑↑i) W\ng : C(α, β)\nhg : g ∈ ⋂ (i : { x // x ∈ t }), CompactOpen.gen (C i) ((fun i => ball (↑f ↑↑i) W) i)\nx : α\nhx : x ∈ K\n⊢ ∃ z, (↑f x, z) ∈ W ∧ (z, ↑g x) ∈ W\n[PROOFSTEP]\nsimp only [mem_iInter, CompactOpen.gen, mem_setOf_eq, image_subset_iff] at hg \n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK : Set α\nV : Set (β × β)\nf : C(α, β)\nhK : IsCompact K\nhV : V ∈ 𝓤 β\nW : Set (β × β)\nhW₁ : W ∈ 𝓤 β\nhW₄ : IsOpen W\nhW₂ : SymmetricRel W\nhW₃ : W ○ W ⊆ V\nZ : Set (β × β)\nhZ₁ : Z ∈ 𝓤 β\nhZ₄ : IsOpen Z\nhZ₂ : SymmetricRel Z\nhZ₃ : Z ○ Z ⊆ W\nU : α → Set α := fun x => ↑f ⁻¹' ball (↑f x) Z\nhU : ∀ (x : α), IsOpen (U x)\nhUK : K ⊆ ⋃ (x : ↑K), U ↑x\nt : Finset ↑K\nht : K ⊆ ⋃ (i : ↑K) (_ : i ∈ t), U ↑i\nC : { x // x ∈ t } → Set α := fun i => K ∩ closure (U ↑↑i)\nhC : K ⊆ ⋃ (i : { x // x ∈ t }), C i\nhfC : ∀ (i : { x // x ∈ t }), C i ⊆ ↑f ⁻¹' ball (↑f ↑↑i) W\ng : C(α, β)\nx : α\nhx : x ∈ K\nhg : ∀ (i : { x // x ∈ t }), K ∩ closure (↑f ⁻¹' ball (↑f ↑↑i) Z) ⊆ (fun a => ↑g a) ⁻¹' ball (↑f ↑↑i) W\n⊢ ∃ z, (↑f x, z) ∈ W ∧ (z, ↑g x) ∈ W\n[PROOFSTEP]\nobtain ⟨y, hy⟩ := mem_iUnion.mp (hC hx)\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK : Set α\nV : Set (β × β)\nf : C(α, β)\nhK : IsCompact K\nhV : V ∈ 𝓤 β\nW : Set (β × β)\nhW₁ : W ∈ 𝓤 β\nhW₄ : IsOpen W\nhW₂ : SymmetricRel W\nhW₃ : W ○ W ⊆ V\nZ : Set (β × β)\nhZ₁ : Z ∈ 𝓤 β\nhZ₄ : IsOpen Z\nhZ₂ : SymmetricRel Z\nhZ₃ : Z ○ Z ⊆ W\nU : α → Set α := fun x => ↑f ⁻¹' ball (↑f x) Z\nhU : ∀ (x : α), IsOpen (U x)\nhUK : K ⊆ ⋃ (x : ↑K), U ↑x\nt : Finset ↑K\nht : K ⊆ ⋃ (i : ↑K) (_ : i ∈ t), U ↑i\nC : { x // x ∈ t } → Set α := fun i => K ∩ closure (U ↑↑i)\nhC : K ⊆ ⋃ (i : { x // x ∈ t }), C i\nhfC : ∀ (i : { x // x ∈ t }), C i ⊆ ↑f ⁻¹' ball (↑f ↑↑i) W\ng : C(α, β)\nx : α\nhx : x ∈ K\nhg : ∀ (i : { x // x ∈ t }), K ∩ closure (↑f ⁻¹' ball (↑f ↑↑i) Z) ⊆ (fun a => ↑g a) ⁻¹' ball (↑f ↑↑i) W\ny : { x // x ∈ t }\nhy : x ∈ C y\n⊢ ∃ z, (↑f x, z) ∈ W ∧ (z, ↑g x) ∈ W\n[PROOFSTEP]\nexact ⟨f y, (mem_ball_symmetry hW₂).mp (hfC y hy), mem_preimage.mp (hg y hy)⟩\n[GOAL]\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK : Set α\nV : Set (β × β)\nf : C(α, β)\n⊢ compactOpen = compactConvergenceTopology\n[PROOFSTEP]\nrw [compactConvergenceTopology, ContinuousMap.compactOpen]\n[GOAL]\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK : Set α\nV : Set (β × β)\nf : C(α, β)\n⊢ TopologicalSpace.generateFrom {m | ∃ s x u x, m = CompactOpen.gen s u} =\n    TopologicalSpace.mkOfNhds fun f => FilterBasis.filter (compactConvergenceFilterBasis f)\n[PROOFSTEP]\nrefine' le_antisymm _ _\n[GOAL]\ncase refine'_1\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK : Set α\nV : Set (β × β)\nf : C(α, β)\n⊢ TopologicalSpace.generateFrom {m | ∃ s x u x, m = CompactOpen.gen s u} ≤\n    TopologicalSpace.mkOfNhds fun f => FilterBasis.filter (compactConvergenceFilterBasis f)\n[PROOFSTEP]\nrefine' fun X hX => isOpen_iff_forall_mem_open.mpr fun f hf => _\n[GOAL]\ncase refine'_1\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK : Set α\nV : Set (β × β)\nf✝ : C(α, β)\nX : Set C(α, β)\nhX : IsOpen X\nf : C(α, β)\nhf : f ∈ X\n⊢ ∃ t, t ⊆ X ∧ IsOpen t ∧ f ∈ t\n[PROOFSTEP]\nhave hXf : X ∈ (compactConvergenceFilterBasis f).filter :=\n  by\n  rw [← nhds_compactConvergence]\n  exact @IsOpen.mem_nhds C(α, β) compactConvergenceTopology _ _ hX hf\n[GOAL]\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK : Set α\nV : Set (β × β)\nf✝ : C(α, β)\nX : Set C(α, β)\nhX : IsOpen X\nf : C(α, β)\nhf : f ∈ X\n⊢ X ∈ FilterBasis.filter (compactConvergenceFilterBasis f)\n[PROOFSTEP]\nrw [← nhds_compactConvergence]\n[GOAL]\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK : Set α\nV : Set (β × β)\nf✝ : C(α, β)\nX : Set C(α, β)\nhX : IsOpen X\nf : C(α, β)\nhf : f ∈ X\n⊢ X ∈ 𝓝 f\n[PROOFSTEP]\nexact @IsOpen.mem_nhds C(α, β) compactConvergenceTopology _ _ hX hf\n[GOAL]\ncase refine'_1\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK : Set α\nV : Set (β × β)\nf✝ : C(α, β)\nX : Set C(α, β)\nhX : IsOpen X\nf : C(α, β)\nhf : f ∈ X\nhXf : X ∈ FilterBasis.filter (compactConvergenceFilterBasis f)\n⊢ ∃ t, t ⊆ X ∧ IsOpen t ∧ f ∈ t\n[PROOFSTEP]\nobtain ⟨-, ⟨⟨K, V⟩, ⟨hK, hV⟩, rfl⟩, hXf⟩ := hXf\n[GOAL]\ncase refine'_1.intro.intro.intro.mk.intro.intro\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK✝ : Set α\nV✝ : Set (β × β)\nf✝ : C(α, β)\nX : Set C(α, β)\nhX : IsOpen X\nf : C(α, β)\nhf : f ∈ X\nK : Set α\nV : Set (β × β)\nhK : IsCompact (K, V).fst\nhV : (K, V).snd ∈ 𝓤 β\nhXf : (fun KV => compactConvNhd KV.fst KV.snd f) (K, V) ⊆ X\n⊢ ∃ t, t ⊆ X ∧ IsOpen t ∧ f ∈ t\n[PROOFSTEP]\nobtain ⟨ι, hι, C, hC, U, hU, h₁, h₂⟩ := iInter_compactOpen_gen_subset_compactConvNhd f hK hV\n[GOAL]\ncase refine'_1.intro.intro.intro.mk.intro.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK✝ : Set α\nV✝ : Set (β × β)\nf✝ : C(α, β)\nX : Set C(α, β)\nhX : IsOpen X\nf : C(α, β)\nhf : f ∈ X\nK : Set α\nV : Set (β × β)\nhK : IsCompact (K, V).fst\nhV : (K, V).snd ∈ 𝓤 β\nhXf : (fun KV => compactConvNhd KV.fst KV.snd f) (K, V) ⊆ X\nι : Type u₁\nhι : Fintype ι\nC : ι → Set α\nhC : ∀ (i : ι), IsCompact (C i)\nU : ι → Set β\nhU : ∀ (i : ι), IsOpen (U i)\nh₁ : f ∈ ⋂ (i : ι), CompactOpen.gen (C i) (U i)\nh₂ : ⋂ (i : ι), CompactOpen.gen (C i) (U i) ⊆ compactConvNhd (K, V).fst (K, V).snd f\n⊢ ∃ t, t ⊆ X ∧ IsOpen t ∧ f ∈ t\n[PROOFSTEP]\nhaveI := hι\n[GOAL]\ncase refine'_1.intro.intro.intro.mk.intro.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK✝ : Set α\nV✝ : Set (β × β)\nf✝ : C(α, β)\nX : Set C(α, β)\nhX : IsOpen X\nf : C(α, β)\nhf : f ∈ X\nK : Set α\nV : Set (β × β)\nhK : IsCompact (K, V).fst\nhV : (K, V).snd ∈ 𝓤 β\nhXf : (fun KV => compactConvNhd KV.fst KV.snd f) (K, V) ⊆ X\nι : Type u₁\nhι : Fintype ι\nC : ι → Set α\nhC : ∀ (i : ι), IsCompact (C i)\nU : ι → Set β\nhU : ∀ (i : ι), IsOpen (U i)\nh₁ : f ∈ ⋂ (i : ι), CompactOpen.gen (C i) (U i)\nh₂ : ⋂ (i : ι), CompactOpen.gen (C i) (U i) ⊆ compactConvNhd (K, V).fst (K, V).snd f\nthis : Fintype ι\n⊢ ∃ t, t ⊆ X ∧ IsOpen t ∧ f ∈ t\n[PROOFSTEP]\nexact\n  ⟨⋂ i, CompactOpen.gen (C i) (U i), h₂.trans hXf, isOpen_iInter fun i => ContinuousMap.isOpen_gen (hC i) (hU i), h₁⟩\n[GOAL]\ncase refine'_2\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK : Set α\nV : Set (β × β)\nf : C(α, β)\n⊢ (TopologicalSpace.mkOfNhds fun f => FilterBasis.filter (compactConvergenceFilterBasis f)) ≤\n    TopologicalSpace.generateFrom {m | ∃ s x u x, m = CompactOpen.gen s u}\n[PROOFSTEP]\nsimp only [TopologicalSpace.le_generateFrom_iff_subset_isOpen, and_imp, exists_prop, forall_exists_index,\n  setOf_subset_setOf]\n[GOAL]\ncase refine'_2\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK : Set α\nV : Set (β × β)\nf : C(α, β)\n⊢ ∀ (a : Set C(α, β)) (x : Set α), IsCompact x → ∀ (x_1 : Set β), IsOpen x_1 → a = CompactOpen.gen x x_1 → IsOpen a\n[PROOFSTEP]\nrintro - K hK U hU rfl f hf\n[GOAL]\ncase refine'_2\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK✝ : Set α\nV : Set (β × β)\nf✝ : C(α, β)\nK : Set α\nhK : IsCompact K\nU : Set β\nhU : IsOpen U\nf : C(α, β)\nhf : f ∈ CompactOpen.gen K U\n⊢ CompactOpen.gen K U ∈ (fun f => FilterBasis.filter (compactConvergenceFilterBasis f)) f\n[PROOFSTEP]\nobtain ⟨V, hV, _hV', hVf⟩ := compactConvNhd_subset_compactOpen f hK hU hf\n[GOAL]\ncase refine'_2.intro.intro.intro\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK✝ : Set α\nV✝ : Set (β × β)\nf✝ : C(α, β)\nK : Set α\nhK : IsCompact K\nU : Set β\nhU : IsOpen U\nf : C(α, β)\nhf : f ∈ CompactOpen.gen K U\nV : Set (β × β)\nhV : V ∈ 𝓤 β\n_hV' : IsOpen V\nhVf : compactConvNhd K V f ⊆ CompactOpen.gen K U\n⊢ CompactOpen.gen K U ∈ (fun f => FilterBasis.filter (compactConvergenceFilterBasis f)) f\n[PROOFSTEP]\nexact Filter.mem_of_superset (FilterBasis.mem_filter_of_mem _ ⟨⟨K, V⟩, ⟨hK, hV⟩, rfl⟩) hVf\n[GOAL]\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK : Set α\nV : Set (β × β)\nf : C(α, β)\n⊢ HasBasis compactConvergenceUniformity (fun p => IsCompact p.fst ∧ p.snd ∈ 𝓤 β) fun p =>\n    {fg | ∀ (x : α), x ∈ p.fst → (↑fg.fst x, ↑fg.snd x) ∈ p.snd}\n[PROOFSTEP]\nrefine' Filter.hasBasis_biInf_principal _ compactConvNhd_compact_entourage_nonempty\n[GOAL]\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK : Set α\nV : Set (β × β)\nf : C(α, β)\n⊢ DirectedOn ((fun KV => {fg | ∀ (x : α), x ∈ KV.fst → (↑fg.fst x, ↑fg.snd x) ∈ KV.snd}) ⁻¹'o fun x x_1 => x ≥ x_1)\n    {KV | IsCompact KV.fst ∧ KV.snd ∈ 𝓤 β}\n[PROOFSTEP]\nrintro ⟨K₁, V₁⟩ ⟨hK₁, hV₁⟩ ⟨K₂, V₂⟩ ⟨hK₂, hV₂⟩\n[GOAL]\ncase mk.intro.mk.intro\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK : Set α\nV : Set (β × β)\nf : C(α, β)\nK₁ : Set α\nV₁ : Set (β × β)\nhK₁ : IsCompact (K₁, V₁).fst\nhV₁ : (K₁, V₁).snd ∈ 𝓤 β\nK₂ : Set α\nV₂ : Set (β × β)\nhK₂ : IsCompact (K₂, V₂).fst\nhV₂ : (K₂, V₂).snd ∈ 𝓤 β\n⊢ ∃ z,\n    z ∈ {KV | IsCompact KV.fst ∧ KV.snd ∈ 𝓤 β} ∧\n      ((fun KV => {fg | ∀ (x : α), x ∈ KV.fst → (↑fg.fst x, ↑fg.snd x) ∈ KV.snd}) ⁻¹'o fun x x_1 => x ≥ x_1) (K₁, V₁)\n          z ∧\n        ((fun KV => {fg | ∀ (x : α), x ∈ KV.fst → (↑fg.fst x, ↑fg.snd x) ∈ KV.snd}) ⁻¹'o fun x x_1 => x ≥ x_1) (K₂, V₂)\n          z\n[PROOFSTEP]\nrefine' ⟨⟨K₁ ∪ K₂, V₁ ∩ V₂⟩, ⟨hK₁.union hK₂, Filter.inter_mem hV₁ hV₂⟩, _⟩\n[GOAL]\ncase mk.intro.mk.intro\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK : Set α\nV : Set (β × β)\nf : C(α, β)\nK₁ : Set α\nV₁ : Set (β × β)\nhK₁ : IsCompact (K₁, V₁).fst\nhV₁ : (K₁, V₁).snd ∈ 𝓤 β\nK₂ : Set α\nV₂ : Set (β × β)\nhK₂ : IsCompact (K₂, V₂).fst\nhV₂ : (K₂, V₂).snd ∈ 𝓤 β\n⊢ ((fun KV => {fg | ∀ (x : α), x ∈ KV.fst → (↑fg.fst x, ↑fg.snd x) ∈ KV.snd}) ⁻¹'o fun x x_1 => x ≥ x_1) (K₁, V₁)\n      (K₁ ∪ K₂, V₁ ∩ V₂) ∧\n    ((fun KV => {fg | ∀ (x : α), x ∈ KV.fst → (↑fg.fst x, ↑fg.snd x) ∈ KV.snd}) ⁻¹'o fun x x_1 => x ≥ x_1) (K₂, V₂)\n      (K₁ ∪ K₂, V₁ ∩ V₂)\n[PROOFSTEP]\nsimp only [le_eq_subset, Prod.forall, setOf_subset_setOf, ge_iff_le, Order.Preimage, ← forall_and, mem_inter_iff,\n  mem_union]\n[GOAL]\ncase mk.intro.mk.intro\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK : Set α\nV : Set (β × β)\nf : C(α, β)\nK₁ : Set α\nV₁ : Set (β × β)\nhK₁ : IsCompact (K₁, V₁).fst\nhV₁ : (K₁, V₁).snd ∈ 𝓤 β\nK₂ : Set α\nV₂ : Set (β × β)\nhK₂ : IsCompact (K₂, V₂).fst\nhV₂ : (K₂, V₂).snd ∈ 𝓤 β\n⊢ ∀ (x x_1 : C(α, β)),\n    (∀ (x_2 : α), x_2 ∈ K₁ ∨ x_2 ∈ K₂ → (↑x x_2, ↑x_1 x_2) ∈ V₁ ∧ (↑x x_2, ↑x_1 x_2) ∈ V₂) →\n      ∀ (x_3 : α), (x_3 ∈ K₁ → (↑x x_3, ↑x_1 x_3) ∈ V₁) ∧ (x_3 ∈ K₂ → (↑x x_3, ↑x_1 x_3) ∈ V₂)\n[PROOFSTEP]\nexact fun f g => forall_imp fun x => by tauto\n[GOAL]\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK : Set α\nV : Set (β × β)\nf✝ : C(α, β)\nK₁ : Set α\nV₁ : Set (β × β)\nhK₁ : IsCompact (K₁, V₁).fst\nhV₁ : (K₁, V₁).snd ∈ 𝓤 β\nK₂ : Set α\nV₂ : Set (β × β)\nhK₂ : IsCompact (K₂, V₂).fst\nhV₂ : (K₂, V₂).snd ∈ 𝓤 β\nf g : C(α, β)\nx : α\n⊢ (x ∈ K₁ ∨ x ∈ K₂ → (↑f x, ↑g x) ∈ V₁ ∧ (↑f x, ↑g x) ∈ V₂) →\n    (x ∈ K₁ → (↑f x, ↑g x) ∈ V₁) ∧ (x ∈ K₂ → (↑f x, ↑g x) ∈ V₂)\n[PROOFSTEP]\ntauto\n[GOAL]\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK : Set α\nV : Set (β × β)\nf : C(α, β)\nX : Set (C(α, β) × C(α, β))\n⊢ X ∈ compactConvergenceUniformity ↔ ∃ K V _hK _hV, {fg | ∀ (x : α), x ∈ K → (↑fg.fst x, ↑fg.snd x) ∈ V} ⊆ X\n[PROOFSTEP]\nsimp only [hasBasis_compactConvergenceUniformity_aux.mem_iff, exists_prop, Prod.exists, and_assoc]\n[GOAL]\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK : Set α\nV : Set (β × β)\nf : C(α, β)\n⊢ 𝓟 idRel ≤ compactConvergenceUniformity\n[PROOFSTEP]\nsimp only [compactConvergenceUniformity, and_imp, Filter.le_principal_iff, Prod.forall, Filter.mem_principal,\n  mem_setOf_eq, le_iInf_iff, idRel_subset]\n[GOAL]\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK : Set α\nV : Set (β × β)\nf : C(α, β)\n⊢ ∀ (a : Set α) (b : Set (β × β)), IsCompact a → b ∈ 𝓤 β → ∀ (a_3 : C(α, β)) (x : α), x ∈ a → (↑a_3 x, ↑a_3 x) ∈ b\n[PROOFSTEP]\nexact fun K V _hK hV f x _hx => refl_mem_uniformity hV\n[GOAL]\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK : Set α\nV : Set (β × β)\nf : C(α, β)\n⊢ Tendsto Prod.swap compactConvergenceUniformity compactConvergenceUniformity\n[PROOFSTEP]\nsimp only [compactConvergenceUniformity, and_imp, Prod.forall, mem_setOf_eq, Prod.fst_swap, Filter.tendsto_principal,\n  Prod.snd_swap, Filter.tendsto_iInf]\n[GOAL]\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK : Set α\nV : Set (β × β)\nf : C(α, β)\n⊢ ∀ (a : Set α) (b : Set (β × β)),\n    IsCompact a →\n      b ∈ 𝓤 β →\n        ∀ᶠ (a_3 : C(α, β) × C(α, β)) in\n          ⨅ (KV : Set α × Set (β × β)) (_ : IsCompact KV.fst ∧ KV.snd ∈ 𝓤 β),\n            𝓟 {fg | ∀ (x : α), x ∈ KV.fst → (↑fg.fst x, ↑fg.snd x) ∈ KV.snd},\n          ∀ (x : α), x ∈ a → (↑a_3.snd x, ↑a_3.fst x) ∈ b\n[PROOFSTEP]\nintro K V hK hV\n[GOAL]\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK✝ : Set α\nV✝ : Set (β × β)\nf : C(α, β)\nK : Set α\nV : Set (β × β)\nhK : IsCompact K\nhV : V ∈ 𝓤 β\n⊢ ∀ᶠ (a : C(α, β) × C(α, β)) in\n    ⨅ (KV : Set α × Set (β × β)) (_ : IsCompact KV.fst ∧ KV.snd ∈ 𝓤 β),\n      𝓟 {fg | ∀ (x : α), x ∈ KV.fst → (↑fg.fst x, ↑fg.snd x) ∈ KV.snd},\n    ∀ (x : α), x ∈ K → (↑a.snd x, ↑a.fst x) ∈ V\n[PROOFSTEP]\nobtain ⟨V', hV', hsymm, hsub⟩ := symm_of_uniformity hV\n[GOAL]\ncase intro.intro.intro\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK✝ : Set α\nV✝ : Set (β × β)\nf : C(α, β)\nK : Set α\nV : Set (β × β)\nhK : IsCompact K\nhV : V ∈ 𝓤 β\nV' : Set (β × β)\nhV' : V' ∈ 𝓤 β\nhsymm : ∀ (a b : β), (a, b) ∈ V' → (b, a) ∈ V'\nhsub : V' ⊆ V\n⊢ ∀ᶠ (a : C(α, β) × C(α, β)) in\n    ⨅ (KV : Set α × Set (β × β)) (_ : IsCompact KV.fst ∧ KV.snd ∈ 𝓤 β),\n      𝓟 {fg | ∀ (x : α), x ∈ KV.fst → (↑fg.fst x, ↑fg.snd x) ∈ KV.snd},\n    ∀ (x : α), x ∈ K → (↑a.snd x, ↑a.fst x) ∈ V\n[PROOFSTEP]\nlet X := {fg : C(α, β) × C(α, β) | ∀ x : α, x ∈ K → (fg.1 x, fg.2 x) ∈ V'}\n[GOAL]\ncase intro.intro.intro\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK✝ : Set α\nV✝ : Set (β × β)\nf : C(α, β)\nK : Set α\nV : Set (β × β)\nhK : IsCompact K\nhV : V ∈ 𝓤 β\nV' : Set (β × β)\nhV' : V' ∈ 𝓤 β\nhsymm : ∀ (a b : β), (a, b) ∈ V' → (b, a) ∈ V'\nhsub : V' ⊆ V\nX : Set (C(α, β) × C(α, β)) := {fg | ∀ (x : α), x ∈ K → (↑fg.fst x, ↑fg.snd x) ∈ V'}\n⊢ ∀ᶠ (a : C(α, β) × C(α, β)) in\n    ⨅ (KV : Set α × Set (β × β)) (_ : IsCompact KV.fst ∧ KV.snd ∈ 𝓤 β),\n      𝓟 {fg | ∀ (x : α), x ∈ KV.fst → (↑fg.fst x, ↑fg.snd x) ∈ KV.snd},\n    ∀ (x : α), x ∈ K → (↑a.snd x, ↑a.fst x) ∈ V\n[PROOFSTEP]\nhave hX : X ∈ compactConvergenceUniformity := (mem_compactConvergenceUniformity X).mpr ⟨K, V', hK, hV', by simp⟩\n[GOAL]\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK✝ : Set α\nV✝ : Set (β × β)\nf : C(α, β)\nK : Set α\nV : Set (β × β)\nhK : IsCompact K\nhV : V ∈ 𝓤 β\nV' : Set (β × β)\nhV' : V' ∈ 𝓤 β\nhsymm : ∀ (a b : β), (a, b) ∈ V' → (b, a) ∈ V'\nhsub : V' ⊆ V\nX : Set (C(α, β) × C(α, β)) := {fg | ∀ (x : α), x ∈ K → (↑fg.fst x, ↑fg.snd x) ∈ V'}\n⊢ {fg | ∀ (x : α), x ∈ K → (↑fg.fst x, ↑fg.snd x) ∈ V'} ⊆ X\n[PROOFSTEP]\nsimp\n[GOAL]\ncase intro.intro.intro\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK✝ : Set α\nV✝ : Set (β × β)\nf : C(α, β)\nK : Set α\nV : Set (β × β)\nhK : IsCompact K\nhV : V ∈ 𝓤 β\nV' : Set (β × β)\nhV' : V' ∈ 𝓤 β\nhsymm : ∀ (a b : β), (a, b) ∈ V' → (b, a) ∈ V'\nhsub : V' ⊆ V\nX : Set (C(α, β) × C(α, β)) := {fg | ∀ (x : α), x ∈ K → (↑fg.fst x, ↑fg.snd x) ∈ V'}\nhX : X ∈ compactConvergenceUniformity\n⊢ ∀ᶠ (a : C(α, β) × C(α, β)) in\n    ⨅ (KV : Set α × Set (β × β)) (_ : IsCompact KV.fst ∧ KV.snd ∈ 𝓤 β),\n      𝓟 {fg | ∀ (x : α), x ∈ KV.fst → (↑fg.fst x, ↑fg.snd x) ∈ KV.snd},\n    ∀ (x : α), x ∈ K → (↑a.snd x, ↑a.fst x) ∈ V\n[PROOFSTEP]\nexact Filter.eventually_of_mem hX fun fg hfg x hx => hsub (hsymm _ _ (hfg x hx))\n[GOAL]\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK : Set α\nV : Set (β × β)\nf : C(α, β)\nX : Set (C(α, β) × C(α, β))\nhX : X ∈ compactConvergenceUniformity\n⊢ X ∈ Filter.lift' compactConvergenceUniformity fun s => s ○ s\n[PROOFSTEP]\nobtain ⟨K, V, hK, hV, hX⟩ := (mem_compactConvergenceUniformity X).mp hX\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK✝ : Set α\nV✝ : Set (β × β)\nf : C(α, β)\nX : Set (C(α, β) × C(α, β))\nhX✝ : X ∈ compactConvergenceUniformity\nK : Set α\nV : Set (β × β)\nhK : IsCompact K\nhV : V ∈ 𝓤 β\nhX : {fg | ∀ (x : α), x ∈ K → (↑fg.fst x, ↑fg.snd x) ∈ V} ⊆ X\n⊢ X ∈ Filter.lift' compactConvergenceUniformity fun s => s ○ s\n[PROOFSTEP]\nobtain ⟨V', hV', hcomp⟩ := comp_mem_uniformity_sets hV\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK✝ : Set α\nV✝ : Set (β × β)\nf : C(α, β)\nX : Set (C(α, β) × C(α, β))\nhX✝ : X ∈ compactConvergenceUniformity\nK : Set α\nV : Set (β × β)\nhK : IsCompact K\nhV : V ∈ 𝓤 β\nhX : {fg | ∀ (x : α), x ∈ K → (↑fg.fst x, ↑fg.snd x) ∈ V} ⊆ X\nV' : Set (β × β)\nhV' : V' ∈ 𝓤 β\nhcomp : V' ○ V' ⊆ V\n⊢ X ∈ Filter.lift' compactConvergenceUniformity fun s => s ○ s\n[PROOFSTEP]\nlet h := fun s : Set (C(α, β) × C(α, β)) => s ○ s\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK✝ : Set α\nV✝ : Set (β × β)\nf : C(α, β)\nX : Set (C(α, β) × C(α, β))\nhX✝ : X ∈ compactConvergenceUniformity\nK : Set α\nV : Set (β × β)\nhK : IsCompact K\nhV : V ∈ 𝓤 β\nhX : {fg | ∀ (x : α), x ∈ K → (↑fg.fst x, ↑fg.snd x) ∈ V} ⊆ X\nV' : Set (β × β)\nhV' : V' ∈ 𝓤 β\nhcomp : V' ○ V' ⊆ V\nh : Set (C(α, β) × C(α, β)) → Set (C(α, β) × C(α, β)) := fun s => s ○ s\n⊢ X ∈ Filter.lift' compactConvergenceUniformity fun s => s ○ s\n[PROOFSTEP]\nsuffices h {fg : C(α, β) × C(α, β) | ∀ x ∈ K, (fg.1 x, fg.2 x) ∈ V'} ∈ compactConvergenceUniformity.lift' h\n  by\n  apply Filter.mem_of_superset this\n  rintro ⟨f, g⟩ ⟨z, hz₁, hz₂⟩\n  refine' hX fun x hx => hcomp _\n  exact ⟨z x, hz₁ x hx, hz₂ x hx⟩\n[GOAL]\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK✝ : Set α\nV✝ : Set (β × β)\nf : C(α, β)\nX : Set (C(α, β) × C(α, β))\nhX✝ : X ∈ compactConvergenceUniformity\nK : Set α\nV : Set (β × β)\nhK : IsCompact K\nhV : V ∈ 𝓤 β\nhX : {fg | ∀ (x : α), x ∈ K → (↑fg.fst x, ↑fg.snd x) ∈ V} ⊆ X\nV' : Set (β × β)\nhV' : V' ∈ 𝓤 β\nhcomp : V' ○ V' ⊆ V\nh : Set (C(α, β) × C(α, β)) → Set (C(α, β) × C(α, β)) := fun s => s ○ s\nthis : h {fg | ∀ (x : α), x ∈ K → (↑fg.fst x, ↑fg.snd x) ∈ V'} ∈ Filter.lift' compactConvergenceUniformity h\n⊢ X ∈ Filter.lift' compactConvergenceUniformity fun s => s ○ s\n[PROOFSTEP]\napply Filter.mem_of_superset this\n[GOAL]\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK✝ : Set α\nV✝ : Set (β × β)\nf : C(α, β)\nX : Set (C(α, β) × C(α, β))\nhX✝ : X ∈ compactConvergenceUniformity\nK : Set α\nV : Set (β × β)\nhK : IsCompact K\nhV : V ∈ 𝓤 β\nhX : {fg | ∀ (x : α), x ∈ K → (↑fg.fst x, ↑fg.snd x) ∈ V} ⊆ X\nV' : Set (β × β)\nhV' : V' ∈ 𝓤 β\nhcomp : V' ○ V' ⊆ V\nh : Set (C(α, β) × C(α, β)) → Set (C(α, β) × C(α, β)) := fun s => s ○ s\nthis : h {fg | ∀ (x : α), x ∈ K → (↑fg.fst x, ↑fg.snd x) ∈ V'} ∈ Filter.lift' compactConvergenceUniformity h\n⊢ h {fg | ∀ (x : α), x ∈ K → (↑fg.fst x, ↑fg.snd x) ∈ V'} ⊆ X\n[PROOFSTEP]\nrintro ⟨f, g⟩ ⟨z, hz₁, hz₂⟩\n[GOAL]\ncase mk.intro.intro\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK✝ : Set α\nV✝ : Set (β × β)\nf✝ : C(α, β)\nX : Set (C(α, β) × C(α, β))\nhX✝ : X ∈ compactConvergenceUniformity\nK : Set α\nV : Set (β × β)\nhK : IsCompact K\nhV : V ∈ 𝓤 β\nhX : {fg | ∀ (x : α), x ∈ K → (↑fg.fst x, ↑fg.snd x) ∈ V} ⊆ X\nV' : Set (β × β)\nhV' : V' ∈ 𝓤 β\nhcomp : V' ○ V' ⊆ V\nh : Set (C(α, β) × C(α, β)) → Set (C(α, β) × C(α, β)) := fun s => s ○ s\nthis : h {fg | ∀ (x : α), x ∈ K → (↑fg.fst x, ↑fg.snd x) ∈ V'} ∈ Filter.lift' compactConvergenceUniformity h\nf g z : C(α, β)\nhz₁ : ((f, g).fst, z) ∈ {fg | ∀ (x : α), x ∈ K → (↑fg.fst x, ↑fg.snd x) ∈ V'}\nhz₂ : (z, (f, g).snd) ∈ {fg | ∀ (x : α), x ∈ K → (↑fg.fst x, ↑fg.snd x) ∈ V'}\n⊢ (f, g) ∈ X\n[PROOFSTEP]\nrefine' hX fun x hx => hcomp _\n[GOAL]\ncase mk.intro.intro\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK✝ : Set α\nV✝ : Set (β × β)\nf✝ : C(α, β)\nX : Set (C(α, β) × C(α, β))\nhX✝ : X ∈ compactConvergenceUniformity\nK : Set α\nV : Set (β × β)\nhK : IsCompact K\nhV : V ∈ 𝓤 β\nhX : {fg | ∀ (x : α), x ∈ K → (↑fg.fst x, ↑fg.snd x) ∈ V} ⊆ X\nV' : Set (β × β)\nhV' : V' ∈ 𝓤 β\nhcomp : V' ○ V' ⊆ V\nh : Set (C(α, β) × C(α, β)) → Set (C(α, β) × C(α, β)) := fun s => s ○ s\nthis : h {fg | ∀ (x : α), x ∈ K → (↑fg.fst x, ↑fg.snd x) ∈ V'} ∈ Filter.lift' compactConvergenceUniformity h\nf g z : C(α, β)\nhz₁ : ((f, g).fst, z) ∈ {fg | ∀ (x : α), x ∈ K → (↑fg.fst x, ↑fg.snd x) ∈ V'}\nhz₂ : (z, (f, g).snd) ∈ {fg | ∀ (x : α), x ∈ K → (↑fg.fst x, ↑fg.snd x) ∈ V'}\nx : α\nhx : x ∈ K\n⊢ (↑(f, g).fst x, ↑(f, g).snd x) ∈ V' ○ V'\n[PROOFSTEP]\nexact ⟨z x, hz₁ x hx, hz₂ x hx⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK✝ : Set α\nV✝ : Set (β × β)\nf : C(α, β)\nX : Set (C(α, β) × C(α, β))\nhX✝ : X ∈ compactConvergenceUniformity\nK : Set α\nV : Set (β × β)\nhK : IsCompact K\nhV : V ∈ 𝓤 β\nhX : {fg | ∀ (x : α), x ∈ K → (↑fg.fst x, ↑fg.snd x) ∈ V} ⊆ X\nV' : Set (β × β)\nhV' : V' ∈ 𝓤 β\nhcomp : V' ○ V' ⊆ V\nh : Set (C(α, β) × C(α, β)) → Set (C(α, β) × C(α, β)) := fun s => s ○ s\n⊢ h {fg | ∀ (x : α), x ∈ K → (↑fg.fst x, ↑fg.snd x) ∈ V'} ∈ Filter.lift' compactConvergenceUniformity h\n[PROOFSTEP]\napply Filter.mem_lift'\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.ht\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK✝ : Set α\nV✝ : Set (β × β)\nf : C(α, β)\nX : Set (C(α, β) × C(α, β))\nhX✝ : X ∈ compactConvergenceUniformity\nK : Set α\nV : Set (β × β)\nhK : IsCompact K\nhV : V ∈ 𝓤 β\nhX : {fg | ∀ (x : α), x ∈ K → (↑fg.fst x, ↑fg.snd x) ∈ V} ⊆ X\nV' : Set (β × β)\nhV' : V' ∈ 𝓤 β\nhcomp : V' ○ V' ⊆ V\nh : Set (C(α, β) × C(α, β)) → Set (C(α, β) × C(α, β)) := fun s => s ○ s\n⊢ {fg | ∀ (x : α), x ∈ K → (↑fg.fst x, ↑fg.snd x) ∈ V'} ∈ compactConvergenceUniformity\n[PROOFSTEP]\nexact (mem_compactConvergenceUniformity _).mpr ⟨K, V', hK, hV', Subset.refl _⟩\n[GOAL]\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK : Set α\nV : Set (β × β)\nf : C(α, β)\n⊢ ∀ (s : Set C(α, β)),\n    IsOpen s ↔\n      ∀ (x : C(α, β)),\n        x ∈ s →\n          {p | p.fst = x → p.snd ∈ s} ∈\n            { uniformity := compactConvergenceUniformity, refl := (_ : 𝓟 idRel ≤ compactConvergenceUniformity),\n                symm := (_ : Tendsto Prod.swap compactConvergenceUniformity compactConvergenceUniformity),\n                comp :=\n                  (_ :\n                    ∀ (X : Set (C(α, β) × C(α, β))),\n                      X ∈ compactConvergenceUniformity →\n                        X ∈ Filter.lift' compactConvergenceUniformity fun s => s ○ s) }.uniformity\n[PROOFSTEP]\nrw [compactOpen_eq_compactConvergence]\n[GOAL]\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK : Set α\nV : Set (β × β)\nf : C(α, β)\n⊢ ∀ (s : Set C(α, β)),\n    IsOpen s ↔\n      ∀ (x : C(α, β)),\n        x ∈ s →\n          {p | p.fst = x → p.snd ∈ s} ∈\n            { uniformity := compactConvergenceUniformity, refl := (_ : 𝓟 idRel ≤ compactConvergenceUniformity),\n                symm := (_ : Tendsto Prod.swap compactConvergenceUniformity compactConvergenceUniformity),\n                comp :=\n                  (_ :\n                    ∀ (X : Set (C(α, β) × C(α, β))),\n                      X ∈ compactConvergenceUniformity →\n                        X ∈ Filter.lift' compactConvergenceUniformity fun s => s ○ s) }.uniformity\n[PROOFSTEP]\nrefine' fun Y => forall₂_congr fun f hf => _\n[GOAL]\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK : Set α\nV : Set (β × β)\nf✝ : C(α, β)\nY : Set C(α, β)\nf : C(α, β)\nhf : f ∈ Y\n⊢ Y ∈ (fun f => FilterBasis.filter (compactConvergenceFilterBasis f)) f ↔\n    {p | p.fst = f → p.snd ∈ Y} ∈\n      { uniformity := compactConvergenceUniformity, refl := (_ : 𝓟 idRel ≤ compactConvergenceUniformity),\n          symm := (_ : Tendsto Prod.swap compactConvergenceUniformity compactConvergenceUniformity),\n          comp :=\n            (_ :\n              ∀ (X : Set (C(α, β) × C(α, β))),\n                X ∈ compactConvergenceUniformity →\n                  X ∈ Filter.lift' compactConvergenceUniformity fun s => s ○ s) }.uniformity\n[PROOFSTEP]\nsimp only [mem_compactConvergence_nhd_filter, mem_compactConvergenceUniformity, Prod.forall, setOf_subset_setOf,\n  compactConvNhd]\n[GOAL]\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK : Set α\nV : Set (β × β)\nf✝ : C(α, β)\nY : Set C(α, β)\nf : C(α, β)\nhf : f ∈ Y\n⊢ (∃ K V h h, {g | ∀ (x : α), x ∈ K → (↑f x, ↑g x) ∈ V} ⊆ Y) ↔\n    ∃ K V h h, ∀ (a b : C(α, β)), (∀ (x : α), x ∈ K → (↑a x, ↑b x) ∈ V) → a = f → b ∈ Y\n[PROOFSTEP]\nrefine' exists₄_congr fun K V _hK _hV => ⟨_, fun hY g hg => hY f g hg rfl⟩\n[GOAL]\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK✝ : Set α\nV✝ : Set (β × β)\nf✝ : C(α, β)\nY : Set C(α, β)\nf : C(α, β)\nhf : f ∈ Y\nK : Set α\nV : Set (β × β)\n_hK : IsCompact K\n_hV : V ∈ 𝓤 β\n⊢ {g | ∀ (x : α), x ∈ K → (↑f x, ↑g x) ∈ V} ⊆ Y →\n    ∀ (a b : C(α, β)), (∀ (x : α), x ∈ K → (↑a x, ↑b x) ∈ V) → a = f → b ∈ Y\n[PROOFSTEP]\nrintro hY g₁ g₂ hg₁ rfl\n[GOAL]\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK✝ : Set α\nV✝ : Set (β × β)\nf : C(α, β)\nY : Set C(α, β)\nK : Set α\nV : Set (β × β)\n_hK : IsCompact K\n_hV : V ∈ 𝓤 β\ng₁ g₂ : C(α, β)\nhg₁ : ∀ (x : α), x ∈ K → (↑g₁ x, ↑g₂ x) ∈ V\nhf : g₁ ∈ Y\nhY : {g | ∀ (x : α), x ∈ K → (↑g₁ x, ↑g x) ∈ V} ⊆ Y\n⊢ g₂ ∈ Y\n[PROOFSTEP]\nexact hY hg₁\n[GOAL]\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK : Set α\nV : Set (β × β)\nf : C(α, β)\nι : Type u_1\npi : ι → Prop\ns : ι → Set (β × β)\nh : HasBasis (𝓤 β) pi s\n⊢ HasBasis (𝓤 C(α, β)) (fun p => IsCompact p.fst ∧ pi p.snd) fun p =>\n    {fg | ∀ (x : α), x ∈ p.fst → (↑fg.fst x, ↑fg.snd x) ∈ s p.snd}\n[PROOFSTEP]\nrefine' hasBasis_compactConvergenceUniformity.to_hasBasis _ _\n[GOAL]\ncase refine'_1\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK : Set α\nV : Set (β × β)\nf : C(α, β)\nι : Type u_1\npi : ι → Prop\ns : ι → Set (β × β)\nh : HasBasis (𝓤 β) pi s\n⊢ ∀ (i : Set α × Set (β × β)),\n    IsCompact i.fst ∧ i.snd ∈ 𝓤 β →\n      ∃ i',\n        (IsCompact i'.fst ∧ pi i'.snd) ∧\n          {fg | ∀ (x : α), x ∈ i'.fst → (↑fg.fst x, ↑fg.snd x) ∈ s i'.snd} ⊆\n            {fg | ∀ (x : α), x ∈ i.fst → (↑fg.fst x, ↑fg.snd x) ∈ i.snd}\n[PROOFSTEP]\nrintro ⟨t₁, t₂⟩ ⟨h₁, h₂⟩\n[GOAL]\ncase refine'_1.mk.intro\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK : Set α\nV : Set (β × β)\nf : C(α, β)\nι : Type u_1\npi : ι → Prop\ns : ι → Set (β × β)\nh : HasBasis (𝓤 β) pi s\nt₁ : Set α\nt₂ : Set (β × β)\nh₁ : IsCompact (t₁, t₂).fst\nh₂ : (t₁, t₂).snd ∈ 𝓤 β\n⊢ ∃ i',\n    (IsCompact i'.fst ∧ pi i'.snd) ∧\n      {fg | ∀ (x : α), x ∈ i'.fst → (↑fg.fst x, ↑fg.snd x) ∈ s i'.snd} ⊆\n        {fg | ∀ (x : α), x ∈ (t₁, t₂).fst → (↑fg.fst x, ↑fg.snd x) ∈ (t₁, t₂).snd}\n[PROOFSTEP]\nrcases h.mem_iff.1 h₂ with ⟨i, hpi, hi⟩\n[GOAL]\ncase refine'_1.mk.intro.intro.intro\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK : Set α\nV : Set (β × β)\nf : C(α, β)\nι : Type u_1\npi : ι → Prop\ns : ι → Set (β × β)\nh : HasBasis (𝓤 β) pi s\nt₁ : Set α\nt₂ : Set (β × β)\nh₁ : IsCompact (t₁, t₂).fst\nh₂ : (t₁, t₂).snd ∈ 𝓤 β\ni : ι\nhpi : pi i\nhi : s i ⊆ (t₁, t₂).snd\n⊢ ∃ i',\n    (IsCompact i'.fst ∧ pi i'.snd) ∧\n      {fg | ∀ (x : α), x ∈ i'.fst → (↑fg.fst x, ↑fg.snd x) ∈ s i'.snd} ⊆\n        {fg | ∀ (x : α), x ∈ (t₁, t₂).fst → (↑fg.fst x, ↑fg.snd x) ∈ (t₁, t₂).snd}\n[PROOFSTEP]\nexact ⟨(t₁, i), ⟨h₁, hpi⟩, fun fg hfg x hx => hi (hfg _ hx)⟩\n[GOAL]\ncase refine'_2\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK : Set α\nV : Set (β × β)\nf : C(α, β)\nι : Type u_1\npi : ι → Prop\ns : ι → Set (β × β)\nh : HasBasis (𝓤 β) pi s\n⊢ ∀ (i' : Set α × ι),\n    IsCompact i'.fst ∧ pi i'.snd →\n      ∃ i,\n        (IsCompact i.fst ∧ i.snd ∈ 𝓤 β) ∧\n          {fg | ∀ (x : α), x ∈ i.fst → (↑fg.fst x, ↑fg.snd x) ∈ i.snd} ⊆\n            {fg | ∀ (x : α), x ∈ i'.fst → (↑fg.fst x, ↑fg.snd x) ∈ s i'.snd}\n[PROOFSTEP]\nrintro ⟨t, i⟩ ⟨ht, hi⟩\n[GOAL]\ncase refine'_2.mk.intro\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK : Set α\nV : Set (β × β)\nf : C(α, β)\nι : Type u_1\npi : ι → Prop\ns : ι → Set (β × β)\nh : HasBasis (𝓤 β) pi s\nt : Set α\ni : ι\nht : IsCompact (t, i).fst\nhi : pi (t, i).snd\n⊢ ∃ i_1,\n    (IsCompact i_1.fst ∧ i_1.snd ∈ 𝓤 β) ∧\n      {fg | ∀ (x : α), x ∈ i_1.fst → (↑fg.fst x, ↑fg.snd x) ∈ i_1.snd} ⊆\n        {fg | ∀ (x : α), x ∈ (t, i).fst → (↑fg.fst x, ↑fg.snd x) ∈ s (t, i).snd}\n[PROOFSTEP]\nexact ⟨(t, s i), ⟨ht, h.mem_of_mem hi⟩, Subset.rfl⟩\n[GOAL]\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK : Set α\nV : Set (β × β)\nf : C(α, β)\nι : Type u₃\np : Filter ι\nF : ι → C(α, β)\n⊢ Tendsto F p (𝓝 f) ↔ ∀ (K : Set α), IsCompact K → TendstoUniformlyOn (fun i a => ↑(F i) a) (↑f) p K\n[PROOFSTEP]\nrw [compactOpen_eq_compactConvergence, tendsto_iff_forall_compact_tendstoUniformlyOn']\n[GOAL]\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK : Set α\nV : Set (β × β)\nf : C(α, β)\nι : Type u₃\np : Filter ι\nF : ι → C(α, β)\nh : TendstoLocallyUniformly (fun i a => ↑(F i) a) (↑f) p\n⊢ Tendsto F p (𝓝 f)\n[PROOFSTEP]\nrw [tendsto_iff_forall_compact_tendstoUniformlyOn]\n[GOAL]\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK : Set α\nV : Set (β × β)\nf : C(α, β)\nι : Type u₃\np : Filter ι\nF : ι → C(α, β)\nh : TendstoLocallyUniformly (fun i a => ↑(F i) a) (↑f) p\n⊢ ∀ (K : Set α), IsCompact K → TendstoUniformlyOn (fun i a => ↑(F i) a) (↑f) p K\n[PROOFSTEP]\nintro K hK\n[GOAL]\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK✝ : Set α\nV : Set (β × β)\nf : C(α, β)\nι : Type u₃\np : Filter ι\nF : ι → C(α, β)\nh : TendstoLocallyUniformly (fun i a => ↑(F i) a) (↑f) p\nK : Set α\nhK : IsCompact K\n⊢ TendstoUniformlyOn (fun i a => ↑(F i) a) (↑f) p K\n[PROOFSTEP]\nrw [← tendstoLocallyUniformlyOn_iff_tendstoUniformlyOn_of_compact hK]\n[GOAL]\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK✝ : Set α\nV : Set (β × β)\nf : C(α, β)\nι : Type u₃\np : Filter ι\nF : ι → C(α, β)\nh : TendstoLocallyUniformly (fun i a => ↑(F i) a) (↑f) p\nK : Set α\nhK : IsCompact K\n⊢ TendstoLocallyUniformlyOn (fun i a => ↑(F i) a) (↑f) p K\n[PROOFSTEP]\nexact h.tendstoLocallyUniformlyOn\n[GOAL]\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK : Set α\nV : Set (β × β)\nf : C(α, β)\nι : Type u₃\np : Filter ι\nF : ι → C(α, β)\nhα : ∀ (x : α), ∃ n, IsCompact n ∧ n ∈ 𝓝 x\nh : Tendsto F p (𝓝 f)\n⊢ TendstoLocallyUniformly (fun i a => ↑(F i) a) (↑f) p\n[PROOFSTEP]\nrw [tendsto_iff_forall_compact_tendstoUniformlyOn] at h \n[GOAL]\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK : Set α\nV : Set (β × β)\nf : C(α, β)\nι : Type u₃\np : Filter ι\nF : ι → C(α, β)\nhα : ∀ (x : α), ∃ n, IsCompact n ∧ n ∈ 𝓝 x\nh : ∀ (K : Set α), IsCompact K → TendstoUniformlyOn (fun i a => ↑(F i) a) (↑f) p K\n⊢ TendstoLocallyUniformly (fun i a => ↑(F i) a) (↑f) p\n[PROOFSTEP]\nintro V hV x\n[GOAL]\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK : Set α\nV✝ : Set (β × β)\nf : C(α, β)\nι : Type u₃\np : Filter ι\nF : ι → C(α, β)\nhα : ∀ (x : α), ∃ n, IsCompact n ∧ n ∈ 𝓝 x\nh : ∀ (K : Set α), IsCompact K → TendstoUniformlyOn (fun i a => ↑(F i) a) (↑f) p K\nV : Set (β × β)\nhV : V ∈ 𝓤 β\nx : α\n⊢ ∃ t, t ∈ 𝓝 x ∧ ∀ᶠ (n : ι) in p, ∀ (y : α), y ∈ t → (↑f y, (fun i a => ↑(F i) a) n y) ∈ V\n[PROOFSTEP]\nobtain ⟨n, hn₁, hn₂⟩ := hα x\n[GOAL]\ncase intro.intro\nα : Type u₁\nβ : Type u₂\ninst✝¹ : TopologicalSpace α\ninst✝ : UniformSpace β\nK : Set α\nV✝ : Set (β × β)\nf : C(α, β)\nι : Type u₃\np : Filter ι\nF : ι → C(α, β)\nhα : ∀ (x : α), ∃ n, IsCompact n ∧ n ∈ 𝓝 x\nh : ∀ (K : Set α), IsCompact K → TendstoUniformlyOn (fun i a => ↑(F i) a) (↑f) p K\nV : Set (β × β)\nhV : V ∈ 𝓤 β\nx : α\nn : Set α\nhn₁ : IsCompact n\nhn₂ : n ∈ 𝓝 x\n⊢ ∃ t, t ∈ 𝓝 x ∧ ∀ᶠ (n : ι) in p, ∀ (y : α), y ∈ t → (↑f y, (fun i a => ↑(F i) a) n y) ∈ V\n[PROOFSTEP]\nexact ⟨n, hn₂, h n hn₁ V hV⟩\n[GOAL]\nα : Type u₁\nβ : Type u₂\ninst✝² : TopologicalSpace α\ninst✝¹ : UniformSpace β\nK : Set α\nV : Set (β × β)\nf : C(α, β)\nι : Type u₃\np : Filter ι\nF : ι → C(α, β)\ninst✝ : CompactSpace α\n⊢ Tendsto F p (𝓝 f) ↔ TendstoUniformly (fun i a => ↑(F i) a) (↑f) p\n[PROOFSTEP]\nrw [tendsto_iff_forall_compact_tendstoUniformlyOn, ← tendstoUniformlyOn_univ]\n[GOAL]\nα : Type u₁\nβ : Type u₂\ninst✝² : TopologicalSpace α\ninst✝¹ : UniformSpace β\nK : Set α\nV : Set (β × β)\nf : C(α, β)\nι : Type u₃\np : Filter ι\nF : ι → C(α, β)\ninst✝ : CompactSpace α\n⊢ (∀ (K : Set α), IsCompact K → TendstoUniformlyOn (fun i a => ↑(F i) a) (↑f) p K) ↔\n    TendstoUniformlyOn (fun i a => ↑(F i) a) (↑f) p univ\n[PROOFSTEP]\nexact ⟨fun h => h univ isCompact_univ, fun h K _hK => h.mono (subset_univ K)⟩\n", "meta": {"mathlib_filename": "Mathlib.Topology.UniformSpace.CompactConvergence", "llama_tokens": 36908, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7772998611746912, "lm_q2_score": 0.6513548782017745, "lm_q1q2_score": 0.5062980564016972}}
{"text": "[GOAL]\nΩ : Type u_1\nE : Type u_2\nm0 : MeasurableSpace Ω\nμ : Measure Ω\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf : ℕ → Ω → E\nℱ : Filtration ℕ m0\nn : ℕ\n⊢ predictablePart f ℱ μ 0 = 0\n[PROOFSTEP]\nsimp_rw [predictablePart, Finset.range_zero, Finset.sum_empty]\n[GOAL]\nΩ : Type u_1\nE : Type u_2\nm0 : MeasurableSpace Ω\nμ : Measure Ω\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf : ℕ → Ω → E\nℱ : Filtration ℕ m0\nn : ℕ\n⊢ martingalePart f ℱ μ = fun n => f 0 + ∑ i in Finset.range n, (f (i + 1) - f i - μ[f (i + 1) - f i|↑ℱ i])\n[PROOFSTEP]\nunfold martingalePart predictablePart\n[GOAL]\nΩ : Type u_1\nE : Type u_2\nm0 : MeasurableSpace Ω\nμ : Measure Ω\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf : ℕ → Ω → E\nℱ : Filtration ℕ m0\nn : ℕ\n⊢ (fun n => f n - ∑ i in Finset.range n, μ[f (i + 1) - f i|↑ℱ i]) = fun n =>\n    f 0 + ∑ i in Finset.range n, (f (i + 1) - f i - μ[f (i + 1) - f i|↑ℱ i])\n[PROOFSTEP]\next1 n\n[GOAL]\ncase h\nΩ : Type u_1\nE : Type u_2\nm0 : MeasurableSpace Ω\nμ : Measure Ω\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf : ℕ → Ω → E\nℱ : Filtration ℕ m0\nn✝ n : ℕ\n⊢ f n - ∑ i in Finset.range n, μ[f (i + 1) - f i|↑ℱ i] =\n    f 0 + ∑ i in Finset.range n, (f (i + 1) - f i - μ[f (i + 1) - f i|↑ℱ i])\n[PROOFSTEP]\nrw [Finset.eq_sum_range_sub f n, ← add_sub, ← Finset.sum_sub_distrib]\n[GOAL]\nΩ : Type u_1\nE : Type u_2\nm0 : MeasurableSpace Ω\nμ : Measure Ω\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf : ℕ → Ω → E\nℱ : Filtration ℕ m0\nn✝ : ℕ\nhf_int : ∀ (n : ℕ), Integrable (f n)\nn : ℕ\n⊢ Integrable (martingalePart f ℱ μ n)\n[PROOFSTEP]\nrw [martingalePart_eq_sum]\n[GOAL]\nΩ : Type u_1\nE : Type u_2\nm0 : MeasurableSpace Ω\nμ : Measure Ω\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf : ℕ → Ω → E\nℱ : Filtration ℕ m0\nn✝ : ℕ\nhf_int : ∀ (n : ℕ), Integrable (f n)\nn : ℕ\n⊢ Integrable ((fun n => f 0 + ∑ i in Finset.range n, (f (i + 1) - f i - μ[f (i + 1) - f i|↑ℱ i])) n)\n[PROOFSTEP]\nexact (hf_int 0).add (integrable_finset_sum' _ fun i _ => ((hf_int _).sub (hf_int _)).sub integrable_condexp)\n[GOAL]\nΩ : Type u_1\nE : Type u_2\nm0 : MeasurableSpace Ω\nμ : Measure Ω\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nf : ℕ → Ω → E\nℱ : Filtration ℕ m0\nn : ℕ\nhf : Adapted ℱ f\nhf_int : ∀ (n : ℕ), Integrable (f n)\ninst✝ : SigmaFiniteFiltration μ ℱ\n⊢ Martingale (martingalePart f ℱ μ) ℱ μ\n[PROOFSTEP]\nrefine'\n  ⟨adapted_martingalePart hf, fun i j hij => _⟩\n    -- ⊢ μ[martingalePart f ℱ μ j | ℱ i] =ᵐ[μ] martingalePart f ℱ μ i\n[GOAL]\nΩ : Type u_1\nE : Type u_2\nm0 : MeasurableSpace Ω\nμ : Measure Ω\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nf : ℕ → Ω → E\nℱ : Filtration ℕ m0\nn : ℕ\nhf : Adapted ℱ f\nhf_int : ∀ (n : ℕ), Integrable (f n)\ninst✝ : SigmaFiniteFiltration μ ℱ\ni j : ℕ\nhij : i ≤ j\n⊢ μ[martingalePart f ℱ μ j|↑ℱ i] =ᵐ[μ] martingalePart f ℱ μ i\n[PROOFSTEP]\nhave h_eq_sum :\n  μ[martingalePart f ℱ μ j|ℱ i] =ᵐ[μ]\n    f 0 + ∑ k in Finset.range j, (μ[f (k + 1) - f k|ℱ i] - μ[μ[f (k + 1) - f k|ℱ k]|ℱ i]) :=\n  by\n  rw [martingalePart_eq_sum]\n  refine' (condexp_add (hf_int 0) _).trans _\n  · exact integrable_finset_sum' _ fun i _ => ((hf_int _).sub (hf_int _)).sub integrable_condexp\n  refine' (EventuallyEq.add EventuallyEq.rfl (condexp_finset_sum fun i _ => _)).trans _\n  · exact ((hf_int _).sub (hf_int _)).sub integrable_condexp\n  refine' EventuallyEq.add _ _\n  · rw [condexp_of_stronglyMeasurable (ℱ.le _) _ (hf_int 0)]\n    · exact (hf 0).mono (ℱ.mono (zero_le i))\n  · exact eventuallyEq_sum fun k _ => condexp_sub ((hf_int _).sub (hf_int _)) integrable_condexp\n[GOAL]\nΩ : Type u_1\nE : Type u_2\nm0 : MeasurableSpace Ω\nμ : Measure Ω\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nf : ℕ → Ω → E\nℱ : Filtration ℕ m0\nn : ℕ\nhf : Adapted ℱ f\nhf_int : ∀ (n : ℕ), Integrable (f n)\ninst✝ : SigmaFiniteFiltration μ ℱ\ni j : ℕ\nhij : i ≤ j\n⊢ μ[martingalePart f ℱ μ j|↑ℱ i] =ᵐ[μ]\n    f 0 + ∑ k in Finset.range j, (μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i])\n[PROOFSTEP]\nrw [martingalePart_eq_sum]\n[GOAL]\nΩ : Type u_1\nE : Type u_2\nm0 : MeasurableSpace Ω\nμ : Measure Ω\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nf : ℕ → Ω → E\nℱ : Filtration ℕ m0\nn : ℕ\nhf : Adapted ℱ f\nhf_int : ∀ (n : ℕ), Integrable (f n)\ninst✝ : SigmaFiniteFiltration μ ℱ\ni j : ℕ\nhij : i ≤ j\n⊢ μ[(fun n => f 0 + ∑ i in Finset.range n, (f (i + 1) - f i - μ[f (i + 1) - f i|↑ℱ i])) j|↑ℱ i] =ᵐ[μ]\n    f 0 + ∑ k in Finset.range j, (μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i])\n[PROOFSTEP]\nrefine' (condexp_add (hf_int 0) _).trans _\n[GOAL]\ncase refine'_1\nΩ : Type u_1\nE : Type u_2\nm0 : MeasurableSpace Ω\nμ : Measure Ω\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nf : ℕ → Ω → E\nℱ : Filtration ℕ m0\nn : ℕ\nhf : Adapted ℱ f\nhf_int : ∀ (n : ℕ), Integrable (f n)\ninst✝ : SigmaFiniteFiltration μ ℱ\ni j : ℕ\nhij : i ≤ j\n⊢ Integrable (∑ i in Finset.range j, (f (i + 1) - f i - μ[f (i + 1) - f i|↑ℱ i]))\n[PROOFSTEP]\nexact integrable_finset_sum' _ fun i _ => ((hf_int _).sub (hf_int _)).sub integrable_condexp\n[GOAL]\ncase refine'_2\nΩ : Type u_1\nE : Type u_2\nm0 : MeasurableSpace Ω\nμ : Measure Ω\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nf : ℕ → Ω → E\nℱ : Filtration ℕ m0\nn : ℕ\nhf : Adapted ℱ f\nhf_int : ∀ (n : ℕ), Integrable (f n)\ninst✝ : SigmaFiniteFiltration μ ℱ\ni j : ℕ\nhij : i ≤ j\n⊢ μ[f 0|↑ℱ i] + μ[∑ i in Finset.range j, (f (i + 1) - f i - μ[f (i + 1) - f i|↑ℱ i])|↑ℱ i] =ᵐ[μ]\n    f 0 + ∑ k in Finset.range j, (μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i])\n[PROOFSTEP]\nrefine' (EventuallyEq.add EventuallyEq.rfl (condexp_finset_sum fun i _ => _)).trans _\n[GOAL]\ncase refine'_2.refine'_1\nΩ : Type u_1\nE : Type u_2\nm0 : MeasurableSpace Ω\nμ : Measure Ω\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nf : ℕ → Ω → E\nℱ : Filtration ℕ m0\nn : ℕ\nhf : Adapted ℱ f\nhf_int : ∀ (n : ℕ), Integrable (f n)\ninst✝ : SigmaFiniteFiltration μ ℱ\ni✝ j : ℕ\nhij : i✝ ≤ j\ni : ℕ\nx✝ : i ∈ Finset.range j\n⊢ Integrable (f (i + 1) - f i - μ[f (i + 1) - f i|↑ℱ i])\n[PROOFSTEP]\nexact ((hf_int _).sub (hf_int _)).sub integrable_condexp\n[GOAL]\ncase refine'_2.refine'_2\nΩ : Type u_1\nE : Type u_2\nm0 : MeasurableSpace Ω\nμ : Measure Ω\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nf : ℕ → Ω → E\nℱ : Filtration ℕ m0\nn : ℕ\nhf : Adapted ℱ f\nhf_int : ∀ (n : ℕ), Integrable (f n)\ninst✝ : SigmaFiniteFiltration μ ℱ\ni j : ℕ\nhij : i ≤ j\n⊢ (fun x =>\n      (μ[f 0|↑ℱ i]) x +\n        Finset.sum (Finset.range j) (fun i_1 => μ[f (i_1 + 1) - f i_1 - μ[f (i_1 + 1) - f i_1|↑ℱ i_1]|↑ℱ i]) x) =ᵐ[μ]\n    f 0 + ∑ k in Finset.range j, (μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i])\n[PROOFSTEP]\nrefine' EventuallyEq.add _ _\n[GOAL]\ncase refine'_2.refine'_2.refine'_1\nΩ : Type u_1\nE : Type u_2\nm0 : MeasurableSpace Ω\nμ : Measure Ω\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nf : ℕ → Ω → E\nℱ : Filtration ℕ m0\nn : ℕ\nhf : Adapted ℱ f\nhf_int : ∀ (n : ℕ), Integrable (f n)\ninst✝ : SigmaFiniteFiltration μ ℱ\ni j : ℕ\nhij : i ≤ j\n⊢ (fun x => (μ[f 0|↑ℱ i]) x) =ᵐ[μ] fun x => f 0 x\n[PROOFSTEP]\nrw [condexp_of_stronglyMeasurable (ℱ.le _) _ (hf_int 0)]\n[GOAL]\nΩ : Type u_1\nE : Type u_2\nm0 : MeasurableSpace Ω\nμ : Measure Ω\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nf : ℕ → Ω → E\nℱ : Filtration ℕ m0\nn : ℕ\nhf : Adapted ℱ f\nhf_int : ∀ (n : ℕ), Integrable (f n)\ninst✝ : SigmaFiniteFiltration μ ℱ\ni j : ℕ\nhij : i ≤ j\n⊢ StronglyMeasurable (f 0)\n[PROOFSTEP]\nexact (hf 0).mono (ℱ.mono (zero_le i))\n[GOAL]\ncase refine'_2.refine'_2.refine'_2\nΩ : Type u_1\nE : Type u_2\nm0 : MeasurableSpace Ω\nμ : Measure Ω\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nf : ℕ → Ω → E\nℱ : Filtration ℕ m0\nn : ℕ\nhf : Adapted ℱ f\nhf_int : ∀ (n : ℕ), Integrable (f n)\ninst✝ : SigmaFiniteFiltration μ ℱ\ni j : ℕ\nhij : i ≤ j\n⊢ (fun x =>\n      Finset.sum (Finset.range j) (fun i_1 => μ[f (i_1 + 1) - f i_1 - μ[f (i_1 + 1) - f i_1|↑ℱ i_1]|↑ℱ i]) x) =ᵐ[μ]\n    fun x => Finset.sum (Finset.range j) (fun k => μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i]) x\n[PROOFSTEP]\nexact eventuallyEq_sum fun k _ => condexp_sub ((hf_int _).sub (hf_int _)) integrable_condexp\n[GOAL]\nΩ : Type u_1\nE : Type u_2\nm0 : MeasurableSpace Ω\nμ : Measure Ω\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nf : ℕ → Ω → E\nℱ : Filtration ℕ m0\nn : ℕ\nhf : Adapted ℱ f\nhf_int : ∀ (n : ℕ), Integrable (f n)\ninst✝ : SigmaFiniteFiltration μ ℱ\ni j : ℕ\nhij : i ≤ j\nh_eq_sum :\n  μ[martingalePart f ℱ μ j|↑ℱ i] =ᵐ[μ]\n    f 0 + ∑ k in Finset.range j, (μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i])\n⊢ μ[martingalePart f ℱ μ j|↑ℱ i] =ᵐ[μ] martingalePart f ℱ μ i\n[PROOFSTEP]\nrefine' h_eq_sum.trans _\n[GOAL]\nΩ : Type u_1\nE : Type u_2\nm0 : MeasurableSpace Ω\nμ : Measure Ω\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nf : ℕ → Ω → E\nℱ : Filtration ℕ m0\nn : ℕ\nhf : Adapted ℱ f\nhf_int : ∀ (n : ℕ), Integrable (f n)\ninst✝ : SigmaFiniteFiltration μ ℱ\ni j : ℕ\nhij : i ≤ j\nh_eq_sum :\n  μ[martingalePart f ℱ μ j|↑ℱ i] =ᵐ[μ]\n    f 0 + ∑ k in Finset.range j, (μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i])\n⊢ f 0 + ∑ k in Finset.range j, (μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i]) =ᵐ[μ] martingalePart f ℱ μ i\n[PROOFSTEP]\nhave h_ge : ∀ k, i ≤ k → μ[f (k + 1) - f k|ℱ i] - μ[μ[f (k + 1) - f k|ℱ k]|ℱ i] =ᵐ[μ] 0 :=\n  by\n  intro k hk\n  have : μ[μ[f (k + 1) - f k|ℱ k]|ℱ i] =ᵐ[μ] μ[f (k + 1) - f k|ℱ i] := condexp_condexp_of_le (ℱ.mono hk) (ℱ.le k)\n  filter_upwards [this] with x hx\n  rw [Pi.sub_apply, Pi.zero_apply, hx, sub_self]\n[GOAL]\nΩ : Type u_1\nE : Type u_2\nm0 : MeasurableSpace Ω\nμ : Measure Ω\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nf : ℕ → Ω → E\nℱ : Filtration ℕ m0\nn : ℕ\nhf : Adapted ℱ f\nhf_int : ∀ (n : ℕ), Integrable (f n)\ninst✝ : SigmaFiniteFiltration μ ℱ\ni j : ℕ\nhij : i ≤ j\nh_eq_sum :\n  μ[martingalePart f ℱ μ j|↑ℱ i] =ᵐ[μ]\n    f 0 + ∑ k in Finset.range j, (μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i])\n⊢ ∀ (k : ℕ), i ≤ k → μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i] =ᵐ[μ] 0\n[PROOFSTEP]\nintro k hk\n[GOAL]\nΩ : Type u_1\nE : Type u_2\nm0 : MeasurableSpace Ω\nμ : Measure Ω\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nf : ℕ → Ω → E\nℱ : Filtration ℕ m0\nn : ℕ\nhf : Adapted ℱ f\nhf_int : ∀ (n : ℕ), Integrable (f n)\ninst✝ : SigmaFiniteFiltration μ ℱ\ni j : ℕ\nhij : i ≤ j\nh_eq_sum :\n  μ[martingalePart f ℱ μ j|↑ℱ i] =ᵐ[μ]\n    f 0 + ∑ k in Finset.range j, (μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i])\nk : ℕ\nhk : i ≤ k\n⊢ μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i] =ᵐ[μ] 0\n[PROOFSTEP]\nhave : μ[μ[f (k + 1) - f k|ℱ k]|ℱ i] =ᵐ[μ] μ[f (k + 1) - f k|ℱ i] := condexp_condexp_of_le (ℱ.mono hk) (ℱ.le k)\n[GOAL]\nΩ : Type u_1\nE : Type u_2\nm0 : MeasurableSpace Ω\nμ : Measure Ω\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nf : ℕ → Ω → E\nℱ : Filtration ℕ m0\nn : ℕ\nhf : Adapted ℱ f\nhf_int : ∀ (n : ℕ), Integrable (f n)\ninst✝ : SigmaFiniteFiltration μ ℱ\ni j : ℕ\nhij : i ≤ j\nh_eq_sum :\n  μ[martingalePart f ℱ μ j|↑ℱ i] =ᵐ[μ]\n    f 0 + ∑ k in Finset.range j, (μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i])\nk : ℕ\nhk : i ≤ k\nthis : μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i] =ᵐ[μ] μ[f (k + 1) - f k|↑ℱ i]\n⊢ μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i] =ᵐ[μ] 0\n[PROOFSTEP]\nfilter_upwards [this] with x hx\n[GOAL]\ncase h\nΩ : Type u_1\nE : Type u_2\nm0 : MeasurableSpace Ω\nμ : Measure Ω\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nf : ℕ → Ω → E\nℱ : Filtration ℕ m0\nn : ℕ\nhf : Adapted ℱ f\nhf_int : ∀ (n : ℕ), Integrable (f n)\ninst✝ : SigmaFiniteFiltration μ ℱ\ni j : ℕ\nhij : i ≤ j\nh_eq_sum :\n  μ[martingalePart f ℱ μ j|↑ℱ i] =ᵐ[μ]\n    f 0 + ∑ k in Finset.range j, (μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i])\nk : ℕ\nhk : i ≤ k\nthis : μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i] =ᵐ[μ] μ[f (k + 1) - f k|↑ℱ i]\nx : Ω\nhx : (μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i]) x = (μ[f (k + 1) - f k|↑ℱ i]) x\n⊢ (μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i]) x = OfNat.ofNat 0 x\n[PROOFSTEP]\nrw [Pi.sub_apply, Pi.zero_apply, hx, sub_self]\n[GOAL]\nΩ : Type u_1\nE : Type u_2\nm0 : MeasurableSpace Ω\nμ : Measure Ω\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nf : ℕ → Ω → E\nℱ : Filtration ℕ m0\nn : ℕ\nhf : Adapted ℱ f\nhf_int : ∀ (n : ℕ), Integrable (f n)\ninst✝ : SigmaFiniteFiltration μ ℱ\ni j : ℕ\nhij : i ≤ j\nh_eq_sum :\n  μ[martingalePart f ℱ μ j|↑ℱ i] =ᵐ[μ]\n    f 0 + ∑ k in Finset.range j, (μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i])\nh_ge : ∀ (k : ℕ), i ≤ k → μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i] =ᵐ[μ] 0\n⊢ f 0 + ∑ k in Finset.range j, (μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i]) =ᵐ[μ] martingalePart f ℱ μ i\n[PROOFSTEP]\nhave h_lt :\n  ∀ k, k < i → μ[f (k + 1) - f k|ℱ i] - μ[μ[f (k + 1) - f k|ℱ k]|ℱ i] =ᵐ[μ] f (k + 1) - f k - μ[f (k + 1) - f k|ℱ k] :=\n  by\n  refine' fun k hk => EventuallyEq.sub _ _\n  · rw [condexp_of_stronglyMeasurable]\n    · exact ((hf (k + 1)).mono (ℱ.mono (Nat.succ_le_of_lt hk))).sub ((hf k).mono (ℱ.mono hk.le))\n    · exact (hf_int _).sub (hf_int _)\n  · rw [condexp_of_stronglyMeasurable]\n    · exact stronglyMeasurable_condexp.mono (ℱ.mono hk.le)\n    · exact integrable_condexp\n[GOAL]\nΩ : Type u_1\nE : Type u_2\nm0 : MeasurableSpace Ω\nμ : Measure Ω\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nf : ℕ → Ω → E\nℱ : Filtration ℕ m0\nn : ℕ\nhf : Adapted ℱ f\nhf_int : ∀ (n : ℕ), Integrable (f n)\ninst✝ : SigmaFiniteFiltration μ ℱ\ni j : ℕ\nhij : i ≤ j\nh_eq_sum :\n  μ[martingalePart f ℱ μ j|↑ℱ i] =ᵐ[μ]\n    f 0 + ∑ k in Finset.range j, (μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i])\nh_ge : ∀ (k : ℕ), i ≤ k → μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i] =ᵐ[μ] 0\n⊢ ∀ (k : ℕ),\n    k < i → μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i] =ᵐ[μ] f (k + 1) - f k - μ[f (k + 1) - f k|↑ℱ k]\n[PROOFSTEP]\nrefine' fun k hk => EventuallyEq.sub _ _\n[GOAL]\ncase refine'_1\nΩ : Type u_1\nE : Type u_2\nm0 : MeasurableSpace Ω\nμ : Measure Ω\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nf : ℕ → Ω → E\nℱ : Filtration ℕ m0\nn : ℕ\nhf : Adapted ℱ f\nhf_int : ∀ (n : ℕ), Integrable (f n)\ninst✝ : SigmaFiniteFiltration μ ℱ\ni j : ℕ\nhij : i ≤ j\nh_eq_sum :\n  μ[martingalePart f ℱ μ j|↑ℱ i] =ᵐ[μ]\n    f 0 + ∑ k in Finset.range j, (μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i])\nh_ge : ∀ (k : ℕ), i ≤ k → μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i] =ᵐ[μ] 0\nk : ℕ\nhk : k < i\n⊢ (fun x => (μ[f (k + 1) - f k|↑ℱ i]) x) =ᵐ[μ] fun x => (f (k + 1) - f k) x\n[PROOFSTEP]\nrw [condexp_of_stronglyMeasurable]\n[GOAL]\ncase refine'_1.hf\nΩ : Type u_1\nE : Type u_2\nm0 : MeasurableSpace Ω\nμ : Measure Ω\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nf : ℕ → Ω → E\nℱ : Filtration ℕ m0\nn : ℕ\nhf : Adapted ℱ f\nhf_int : ∀ (n : ℕ), Integrable (f n)\ninst✝ : SigmaFiniteFiltration μ ℱ\ni j : ℕ\nhij : i ≤ j\nh_eq_sum :\n  μ[martingalePart f ℱ μ j|↑ℱ i] =ᵐ[μ]\n    f 0 + ∑ k in Finset.range j, (μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i])\nh_ge : ∀ (k : ℕ), i ≤ k → μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i] =ᵐ[μ] 0\nk : ℕ\nhk : k < i\n⊢ StronglyMeasurable (f (k + 1) - f k)\n[PROOFSTEP]\nexact ((hf (k + 1)).mono (ℱ.mono (Nat.succ_le_of_lt hk))).sub ((hf k).mono (ℱ.mono hk.le))\n[GOAL]\ncase refine'_1.hfi\nΩ : Type u_1\nE : Type u_2\nm0 : MeasurableSpace Ω\nμ : Measure Ω\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nf : ℕ → Ω → E\nℱ : Filtration ℕ m0\nn : ℕ\nhf : Adapted ℱ f\nhf_int : ∀ (n : ℕ), Integrable (f n)\ninst✝ : SigmaFiniteFiltration μ ℱ\ni j : ℕ\nhij : i ≤ j\nh_eq_sum :\n  μ[martingalePart f ℱ μ j|↑ℱ i] =ᵐ[μ]\n    f 0 + ∑ k in Finset.range j, (μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i])\nh_ge : ∀ (k : ℕ), i ≤ k → μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i] =ᵐ[μ] 0\nk : ℕ\nhk : k < i\n⊢ Integrable (f (k + 1) - f k)\n[PROOFSTEP]\nexact (hf_int _).sub (hf_int _)\n[GOAL]\ncase refine'_2\nΩ : Type u_1\nE : Type u_2\nm0 : MeasurableSpace Ω\nμ : Measure Ω\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nf : ℕ → Ω → E\nℱ : Filtration ℕ m0\nn : ℕ\nhf : Adapted ℱ f\nhf_int : ∀ (n : ℕ), Integrable (f n)\ninst✝ : SigmaFiniteFiltration μ ℱ\ni j : ℕ\nhij : i ≤ j\nh_eq_sum :\n  μ[martingalePart f ℱ μ j|↑ℱ i] =ᵐ[μ]\n    f 0 + ∑ k in Finset.range j, (μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i])\nh_ge : ∀ (k : ℕ), i ≤ k → μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i] =ᵐ[μ] 0\nk : ℕ\nhk : k < i\n⊢ (fun x => (μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i]) x) =ᵐ[μ] fun x => (μ[f (k + 1) - f k|↑ℱ k]) x\n[PROOFSTEP]\nrw [condexp_of_stronglyMeasurable]\n[GOAL]\ncase refine'_2.hf\nΩ : Type u_1\nE : Type u_2\nm0 : MeasurableSpace Ω\nμ : Measure Ω\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nf : ℕ → Ω → E\nℱ : Filtration ℕ m0\nn : ℕ\nhf : Adapted ℱ f\nhf_int : ∀ (n : ℕ), Integrable (f n)\ninst✝ : SigmaFiniteFiltration μ ℱ\ni j : ℕ\nhij : i ≤ j\nh_eq_sum :\n  μ[martingalePart f ℱ μ j|↑ℱ i] =ᵐ[μ]\n    f 0 + ∑ k in Finset.range j, (μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i])\nh_ge : ∀ (k : ℕ), i ≤ k → μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i] =ᵐ[μ] 0\nk : ℕ\nhk : k < i\n⊢ StronglyMeasurable (μ[f (k + 1) - f k|↑ℱ k])\n[PROOFSTEP]\nexact stronglyMeasurable_condexp.mono (ℱ.mono hk.le)\n[GOAL]\ncase refine'_2.hfi\nΩ : Type u_1\nE : Type u_2\nm0 : MeasurableSpace Ω\nμ : Measure Ω\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nf : ℕ → Ω → E\nℱ : Filtration ℕ m0\nn : ℕ\nhf : Adapted ℱ f\nhf_int : ∀ (n : ℕ), Integrable (f n)\ninst✝ : SigmaFiniteFiltration μ ℱ\ni j : ℕ\nhij : i ≤ j\nh_eq_sum :\n  μ[martingalePart f ℱ μ j|↑ℱ i] =ᵐ[μ]\n    f 0 + ∑ k in Finset.range j, (μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i])\nh_ge : ∀ (k : ℕ), i ≤ k → μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i] =ᵐ[μ] 0\nk : ℕ\nhk : k < i\n⊢ Integrable (μ[f (k + 1) - f k|↑ℱ k])\n[PROOFSTEP]\nexact integrable_condexp\n[GOAL]\nΩ : Type u_1\nE : Type u_2\nm0 : MeasurableSpace Ω\nμ : Measure Ω\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nf : ℕ → Ω → E\nℱ : Filtration ℕ m0\nn : ℕ\nhf : Adapted ℱ f\nhf_int : ∀ (n : ℕ), Integrable (f n)\ninst✝ : SigmaFiniteFiltration μ ℱ\ni j : ℕ\nhij : i ≤ j\nh_eq_sum :\n  μ[martingalePart f ℱ μ j|↑ℱ i] =ᵐ[μ]\n    f 0 + ∑ k in Finset.range j, (μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i])\nh_ge : ∀ (k : ℕ), i ≤ k → μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i] =ᵐ[μ] 0\nh_lt :\n  ∀ (k : ℕ),\n    k < i → μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i] =ᵐ[μ] f (k + 1) - f k - μ[f (k + 1) - f k|↑ℱ k]\n⊢ f 0 + ∑ k in Finset.range j, (μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i]) =ᵐ[μ] martingalePart f ℱ μ i\n[PROOFSTEP]\nrw [martingalePart_eq_sum]\n[GOAL]\nΩ : Type u_1\nE : Type u_2\nm0 : MeasurableSpace Ω\nμ : Measure Ω\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nf : ℕ → Ω → E\nℱ : Filtration ℕ m0\nn : ℕ\nhf : Adapted ℱ f\nhf_int : ∀ (n : ℕ), Integrable (f n)\ninst✝ : SigmaFiniteFiltration μ ℱ\ni j : ℕ\nhij : i ≤ j\nh_eq_sum :\n  μ[martingalePart f ℱ μ j|↑ℱ i] =ᵐ[μ]\n    f 0 + ∑ k in Finset.range j, (μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i])\nh_ge : ∀ (k : ℕ), i ≤ k → μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i] =ᵐ[μ] 0\nh_lt :\n  ∀ (k : ℕ),\n    k < i → μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i] =ᵐ[μ] f (k + 1) - f k - μ[f (k + 1) - f k|↑ℱ k]\n⊢ f 0 + ∑ k in Finset.range j, (μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i]) =ᵐ[μ]\n    (fun n => f 0 + ∑ i in Finset.range n, (f (i + 1) - f i - μ[f (i + 1) - f i|↑ℱ i])) i\n[PROOFSTEP]\nrefine' EventuallyEq.add EventuallyEq.rfl _\n[GOAL]\nΩ : Type u_1\nE : Type u_2\nm0 : MeasurableSpace Ω\nμ : Measure Ω\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nf : ℕ → Ω → E\nℱ : Filtration ℕ m0\nn : ℕ\nhf : Adapted ℱ f\nhf_int : ∀ (n : ℕ), Integrable (f n)\ninst✝ : SigmaFiniteFiltration μ ℱ\ni j : ℕ\nhij : i ≤ j\nh_eq_sum :\n  μ[martingalePart f ℱ μ j|↑ℱ i] =ᵐ[μ]\n    f 0 + ∑ k in Finset.range j, (μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i])\nh_ge : ∀ (k : ℕ), i ≤ k → μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i] =ᵐ[μ] 0\nh_lt :\n  ∀ (k : ℕ),\n    k < i → μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i] =ᵐ[μ] f (k + 1) - f k - μ[f (k + 1) - f k|↑ℱ k]\n⊢ (fun x => Finset.sum (Finset.range j) (fun k => μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i]) x) =ᵐ[μ]\n    fun x => Finset.sum (Finset.range i) (fun i => f (i + 1) - f i - μ[f (i + 1) - f i|↑ℱ i]) x\n[PROOFSTEP]\nrw [← Finset.sum_range_add_sum_Ico _ hij, ←\n  add_zero (∑ i in Finset.range i, (f (i + 1) - f i - μ[f (i + 1) - f i|ℱ i]))]\n[GOAL]\nΩ : Type u_1\nE : Type u_2\nm0 : MeasurableSpace Ω\nμ : Measure Ω\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nf : ℕ → Ω → E\nℱ : Filtration ℕ m0\nn : ℕ\nhf : Adapted ℱ f\nhf_int : ∀ (n : ℕ), Integrable (f n)\ninst✝ : SigmaFiniteFiltration μ ℱ\ni j : ℕ\nhij : i ≤ j\nh_eq_sum :\n  μ[martingalePart f ℱ μ j|↑ℱ i] =ᵐ[μ]\n    f 0 + ∑ k in Finset.range j, (μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i])\nh_ge : ∀ (k : ℕ), i ≤ k → μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i] =ᵐ[μ] 0\nh_lt :\n  ∀ (k : ℕ),\n    k < i → μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i] =ᵐ[μ] f (k + 1) - f k - μ[f (k + 1) - f k|↑ℱ k]\n⊢ (fun x =>\n      (∑ k in Finset.range i, (μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i]) +\n          ∑ k in Finset.Ico i j, (μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i]))\n        x) =ᵐ[μ]\n    fun x => (∑ i in Finset.range i, (f (i + 1) - f i - μ[f (i + 1) - f i|↑ℱ i]) + 0) x\n[PROOFSTEP]\nrefine' (eventuallyEq_sum fun k hk => h_lt k (Finset.mem_range.mp hk)).add _\n[GOAL]\nΩ : Type u_1\nE : Type u_2\nm0 : MeasurableSpace Ω\nμ : Measure Ω\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nf : ℕ → Ω → E\nℱ : Filtration ℕ m0\nn : ℕ\nhf : Adapted ℱ f\nhf_int : ∀ (n : ℕ), Integrable (f n)\ninst✝ : SigmaFiniteFiltration μ ℱ\ni j : ℕ\nhij : i ≤ j\nh_eq_sum :\n  μ[martingalePart f ℱ μ j|↑ℱ i] =ᵐ[μ]\n    f 0 + ∑ k in Finset.range j, (μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i])\nh_ge : ∀ (k : ℕ), i ≤ k → μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i] =ᵐ[μ] 0\nh_lt :\n  ∀ (k : ℕ),\n    k < i → μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i] =ᵐ[μ] f (k + 1) - f k - μ[f (k + 1) - f k|↑ℱ k]\n⊢ (fun x => Finset.sum (Finset.Ico i j) (fun k => μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i]) x) =ᵐ[μ]\n    fun x => OfNat.ofNat 0 x\n[PROOFSTEP]\nrefine' (eventuallyEq_sum fun k hk => h_ge k (Finset.mem_Ico.mp hk).1).trans _\n[GOAL]\nΩ : Type u_1\nE : Type u_2\nm0 : MeasurableSpace Ω\nμ : Measure Ω\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nf : ℕ → Ω → E\nℱ : Filtration ℕ m0\nn : ℕ\nhf : Adapted ℱ f\nhf_int : ∀ (n : ℕ), Integrable (f n)\ninst✝ : SigmaFiniteFiltration μ ℱ\ni j : ℕ\nhij : i ≤ j\nh_eq_sum :\n  μ[martingalePart f ℱ μ j|↑ℱ i] =ᵐ[μ]\n    f 0 + ∑ k in Finset.range j, (μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i])\nh_ge : ∀ (k : ℕ), i ≤ k → μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i] =ᵐ[μ] 0\nh_lt :\n  ∀ (k : ℕ),\n    k < i → μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i] =ᵐ[μ] f (k + 1) - f k - μ[f (k + 1) - f k|↑ℱ k]\n⊢ ∑ i in Finset.Ico i j, 0 =ᵐ[μ] fun x => OfNat.ofNat 0 x\n[PROOFSTEP]\nsimp only [Finset.sum_const_zero, Pi.zero_apply]\n[GOAL]\nΩ : Type u_1\nE : Type u_2\nm0 : MeasurableSpace Ω\nμ : Measure Ω\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nf : ℕ → Ω → E\nℱ : Filtration ℕ m0\nn : ℕ\nhf : Adapted ℱ f\nhf_int : ∀ (n : ℕ), Integrable (f n)\ninst✝ : SigmaFiniteFiltration μ ℱ\ni j : ℕ\nhij : i ≤ j\nh_eq_sum :\n  μ[martingalePart f ℱ μ j|↑ℱ i] =ᵐ[μ]\n    f 0 + ∑ k in Finset.range j, (μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i])\nh_ge : ∀ (k : ℕ), i ≤ k → μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i] =ᵐ[μ] 0\nh_lt :\n  ∀ (k : ℕ),\n    k < i → μ[f (k + 1) - f k|↑ℱ i] - μ[μ[f (k + 1) - f k|↑ℱ k]|↑ℱ i] =ᵐ[μ] f (k + 1) - f k - μ[f (k + 1) - f k|↑ℱ k]\n⊢ 0 =ᵐ[μ] fun x => 0\n[PROOFSTEP]\nrfl\n[GOAL]\nΩ : Type u_1\nE : Type u_2\nm0 : MeasurableSpace Ω\nμ : Measure Ω\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nf✝ : ℕ → Ω → E\nℱ : Filtration ℕ m0\nn✝ : ℕ\ninst✝ : SigmaFiniteFiltration μ ℱ\nf g : ℕ → Ω → E\nhf : Martingale f ℱ μ\nhg : Adapted ℱ fun n => g (n + 1)\nhg0 : g 0 = 0\nhgint : ∀ (n : ℕ), Integrable (g n)\nn : ℕ\n⊢ martingalePart (f + g) ℱ μ n =ᵐ[μ] f n\n[PROOFSTEP]\nset h := f - martingalePart (f + g) ℱ μ with hhdef\n[GOAL]\nΩ : Type u_1\nE : Type u_2\nm0 : MeasurableSpace Ω\nμ : Measure Ω\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nf✝ : ℕ → Ω → E\nℱ : Filtration ℕ m0\nn✝ : ℕ\ninst✝ : SigmaFiniteFiltration μ ℱ\nf g : ℕ → Ω → E\nhf : Martingale f ℱ μ\nhg : Adapted ℱ fun n => g (n + 1)\nhg0 : g 0 = 0\nhgint : ∀ (n : ℕ), Integrable (g n)\nn : ℕ\nh : ℕ → Ω → E := f - martingalePart (f + g) ℱ μ\nhhdef : h = f - martingalePart (f + g) ℱ μ\n⊢ martingalePart (f + g) ℱ μ n =ᵐ[μ] f n\n[PROOFSTEP]\nhave hh : h = predictablePart (f + g) ℱ μ - g := by\n  rw [hhdef, sub_eq_sub_iff_add_eq_add, add_comm (predictablePart (f + g) ℱ μ), martingalePart_add_predictablePart]\n[GOAL]\nΩ : Type u_1\nE : Type u_2\nm0 : MeasurableSpace Ω\nμ : Measure Ω\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nf✝ : ℕ → Ω → E\nℱ : Filtration ℕ m0\nn✝ : ℕ\ninst✝ : SigmaFiniteFiltration μ ℱ\nf g : ℕ → Ω → E\nhf : Martingale f ℱ μ\nhg : Adapted ℱ fun n => g (n + 1)\nhg0 : g 0 = 0\nhgint : ∀ (n : ℕ), Integrable (g n)\nn : ℕ\nh : ℕ → Ω → E := f - martingalePart (f + g) ℱ μ\nhhdef : h = f - martingalePart (f + g) ℱ μ\n⊢ h = predictablePart (f + g) ℱ μ - g\n[PROOFSTEP]\nrw [hhdef, sub_eq_sub_iff_add_eq_add, add_comm (predictablePart (f + g) ℱ μ), martingalePart_add_predictablePart]\n[GOAL]\nΩ : Type u_1\nE : Type u_2\nm0 : MeasurableSpace Ω\nμ : Measure Ω\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nf✝ : ℕ → Ω → E\nℱ : Filtration ℕ m0\nn✝ : ℕ\ninst✝ : SigmaFiniteFiltration μ ℱ\nf g : ℕ → Ω → E\nhf : Martingale f ℱ μ\nhg : Adapted ℱ fun n => g (n + 1)\nhg0 : g 0 = 0\nhgint : ∀ (n : ℕ), Integrable (g n)\nn : ℕ\nh : ℕ → Ω → E := f - martingalePart (f + g) ℱ μ\nhhdef : h = f - martingalePart (f + g) ℱ μ\nhh : h = predictablePart (f + g) ℱ μ - g\n⊢ martingalePart (f + g) ℱ μ n =ᵐ[μ] f n\n[PROOFSTEP]\nhave hhpred : Adapted ℱ fun n => h (n + 1) := by\n  rw [hh]\n  exact adapted_predictablePart.sub hg\n[GOAL]\nΩ : Type u_1\nE : Type u_2\nm0 : MeasurableSpace Ω\nμ : Measure Ω\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nf✝ : ℕ → Ω → E\nℱ : Filtration ℕ m0\nn✝ : ℕ\ninst✝ : SigmaFiniteFiltration μ ℱ\nf g : ℕ → Ω → E\nhf : Martingale f ℱ μ\nhg : Adapted ℱ fun n => g (n + 1)\nhg0 : g 0 = 0\nhgint : ∀ (n : ℕ), Integrable (g n)\nn : ℕ\nh : ℕ → Ω → E := f - martingalePart (f + g) ℱ μ\nhhdef : h = f - martingalePart (f + g) ℱ μ\nhh : h = predictablePart (f + g) ℱ μ - g\n⊢ Adapted ℱ fun n => h (n + 1)\n[PROOFSTEP]\nrw [hh]\n[GOAL]\nΩ : Type u_1\nE : Type u_2\nm0 : MeasurableSpace Ω\nμ : Measure Ω\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nf✝ : ℕ → Ω → E\nℱ : Filtration ℕ m0\nn✝ : ℕ\ninst✝ : SigmaFiniteFiltration μ ℱ\nf g : ℕ → Ω → E\nhf : Martingale f ℱ μ\nhg : Adapted ℱ fun n => g (n + 1)\nhg0 : g 0 = 0\nhgint : ∀ (n : ℕ), Integrable (g n)\nn : ℕ\nh : ℕ → Ω → E := f - martingalePart (f + g) ℱ μ\nhhdef : h = f - martingalePart (f + g) ℱ μ\nhh : h = predictablePart (f + g) ℱ μ - g\n⊢ Adapted ℱ fun n => (predictablePart (f + g) ℱ μ - g) (n + 1)\n[PROOFSTEP]\nexact adapted_predictablePart.sub hg\n[GOAL]\nΩ : Type u_1\nE : Type u_2\nm0 : MeasurableSpace Ω\nμ : Measure Ω\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nf✝ : ℕ → Ω → E\nℱ : Filtration ℕ m0\nn✝ : ℕ\ninst✝ : SigmaFiniteFiltration μ ℱ\nf g : ℕ → Ω → E\nhf : Martingale f ℱ μ\nhg : Adapted ℱ fun n => g (n + 1)\nhg0 : g 0 = 0\nhgint : ∀ (n : ℕ), Integrable (g n)\nn : ℕ\nh : ℕ → Ω → E := f - martingalePart (f + g) ℱ μ\nhhdef : h = f - martingalePart (f + g) ℱ μ\nhh : h = predictablePart (f + g) ℱ μ - g\nhhpred : Adapted ℱ fun n => h (n + 1)\n⊢ martingalePart (f + g) ℱ μ n =ᵐ[μ] f n\n[PROOFSTEP]\nhave hhmgle : Martingale h ℱ μ :=\n  hf.sub\n    (martingale_martingalePart (hf.adapted.add <| Predictable.adapted hg <| hg0.symm ▸ stronglyMeasurable_zero) fun n =>\n      (hf.integrable n).add <| hgint n)\n[GOAL]\nΩ : Type u_1\nE : Type u_2\nm0 : MeasurableSpace Ω\nμ : Measure Ω\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nf✝ : ℕ → Ω → E\nℱ : Filtration ℕ m0\nn✝ : ℕ\ninst✝ : SigmaFiniteFiltration μ ℱ\nf g : ℕ → Ω → E\nhf : Martingale f ℱ μ\nhg : Adapted ℱ fun n => g (n + 1)\nhg0 : g 0 = 0\nhgint : ∀ (n : ℕ), Integrable (g n)\nn : ℕ\nh : ℕ → Ω → E := f - martingalePart (f + g) ℱ μ\nhhdef : h = f - martingalePart (f + g) ℱ μ\nhh : h = predictablePart (f + g) ℱ μ - g\nhhpred : Adapted ℱ fun n => h (n + 1)\nhhmgle : Martingale h ℱ μ\n⊢ martingalePart (f + g) ℱ μ n =ᵐ[μ] f n\n[PROOFSTEP]\nrefine' (eventuallyEq_iff_sub.2 _).symm\n[GOAL]\nΩ : Type u_1\nE : Type u_2\nm0 : MeasurableSpace Ω\nμ : Measure Ω\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nf✝ : ℕ → Ω → E\nℱ : Filtration ℕ m0\nn✝ : ℕ\ninst✝ : SigmaFiniteFiltration μ ℱ\nf g : ℕ → Ω → E\nhf : Martingale f ℱ μ\nhg : Adapted ℱ fun n => g (n + 1)\nhg0 : g 0 = 0\nhgint : ∀ (n : ℕ), Integrable (g n)\nn : ℕ\nh : ℕ → Ω → E := f - martingalePart (f + g) ℱ μ\nhhdef : h = f - martingalePart (f + g) ℱ μ\nhh : h = predictablePart (f + g) ℱ μ - g\nhhpred : Adapted ℱ fun n => h (n + 1)\nhhmgle : Martingale h ℱ μ\n⊢ f n - martingalePart (f + g) ℱ μ n =ᵐ[μ] 0\n[PROOFSTEP]\nfilter_upwards [hhmgle.eq_zero_of_predictable hhpred n] with ω hω\n[GOAL]\ncase h\nΩ : Type u_1\nE : Type u_2\nm0 : MeasurableSpace Ω\nμ : Measure Ω\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nf✝ : ℕ → Ω → E\nℱ : Filtration ℕ m0\nn✝ : ℕ\ninst✝ : SigmaFiniteFiltration μ ℱ\nf g : ℕ → Ω → E\nhf : Martingale f ℱ μ\nhg : Adapted ℱ fun n => g (n + 1)\nhg0 : g 0 = 0\nhgint : ∀ (n : ℕ), Integrable (g n)\nn : ℕ\nh : ℕ → Ω → E := f - martingalePart (f + g) ℱ μ\nhhdef : h = f - martingalePart (f + g) ℱ μ\nhh : h = predictablePart (f + g) ℱ μ - g\nhhpred : Adapted ℱ fun n => h (n + 1)\nhhmgle : Martingale h ℱ μ\nω : Ω\nhω : (f - martingalePart (f + g) ℱ μ) n ω = (f - martingalePart (f + g) ℱ μ) 0 ω\n⊢ (f n - martingalePart (f + g) ℱ μ n) ω = OfNat.ofNat 0 ω\n[PROOFSTEP]\nrw [Pi.sub_apply] at hω \n[GOAL]\ncase h\nΩ : Type u_1\nE : Type u_2\nm0 : MeasurableSpace Ω\nμ : Measure Ω\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nf✝ : ℕ → Ω → E\nℱ : Filtration ℕ m0\nn✝ : ℕ\ninst✝ : SigmaFiniteFiltration μ ℱ\nf g : ℕ → Ω → E\nhf : Martingale f ℱ μ\nhg : Adapted ℱ fun n => g (n + 1)\nhg0 : g 0 = 0\nhgint : ∀ (n : ℕ), Integrable (g n)\nn : ℕ\nh : ℕ → Ω → E := f - martingalePart (f + g) ℱ μ\nhhdef : h = f - martingalePart (f + g) ℱ μ\nhh : h = predictablePart (f + g) ℱ μ - g\nhhpred : Adapted ℱ fun n => h (n + 1)\nhhmgle : Martingale h ℱ μ\nω : Ω\nhω : (f n - martingalePart (f + g) ℱ μ n) ω = (f - martingalePart (f + g) ℱ μ) 0 ω\n⊢ (f n - martingalePart (f + g) ℱ μ n) ω = OfNat.ofNat 0 ω\n[PROOFSTEP]\nrw [hω, Pi.sub_apply, martingalePart]\n[GOAL]\ncase h\nΩ : Type u_1\nE : Type u_2\nm0 : MeasurableSpace Ω\nμ : Measure Ω\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nf✝ : ℕ → Ω → E\nℱ : Filtration ℕ m0\nn✝ : ℕ\ninst✝ : SigmaFiniteFiltration μ ℱ\nf g : ℕ → Ω → E\nhf : Martingale f ℱ μ\nhg : Adapted ℱ fun n => g (n + 1)\nhg0 : g 0 = 0\nhgint : ∀ (n : ℕ), Integrable (g n)\nn : ℕ\nh : ℕ → Ω → E := f - martingalePart (f + g) ℱ μ\nhhdef : h = f - martingalePart (f + g) ℱ μ\nhh : h = predictablePart (f + g) ℱ μ - g\nhhpred : Adapted ℱ fun n => h (n + 1)\nhhmgle : Martingale h ℱ μ\nω : Ω\nhω : (f n - martingalePart (f + g) ℱ μ n) ω = (f - martingalePart (f + g) ℱ μ) 0 ω\n⊢ (f 0 - ((f + g) 0 - predictablePart (f + g) ℱ μ 0)) ω = OfNat.ofNat 0 ω\n[PROOFSTEP]\nsimp [hg0]\n[GOAL]\nΩ : Type u_1\nE : Type u_2\nm0 : MeasurableSpace Ω\nμ : Measure Ω\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nf✝ : ℕ → Ω → E\nℱ : Filtration ℕ m0\nn✝ : ℕ\ninst✝ : SigmaFiniteFiltration μ ℱ\nf g : ℕ → Ω → E\nhf : Martingale f ℱ μ\nhg : Adapted ℱ fun n => g (n + 1)\nhg0 : g 0 = 0\nhgint : ∀ (n : ℕ), Integrable (g n)\nn : ℕ\n⊢ predictablePart (f + g) ℱ μ n =ᵐ[μ] g n\n[PROOFSTEP]\nfilter_upwards [martingalePart_add_ae_eq hf hg hg0 hgint n] with ω hω\n[GOAL]\ncase h\nΩ : Type u_1\nE : Type u_2\nm0 : MeasurableSpace Ω\nμ : Measure Ω\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nf✝ : ℕ → Ω → E\nℱ : Filtration ℕ m0\nn✝ : ℕ\ninst✝ : SigmaFiniteFiltration μ ℱ\nf g : ℕ → Ω → E\nhf : Martingale f ℱ μ\nhg : Adapted ℱ fun n => g (n + 1)\nhg0 : g 0 = 0\nhgint : ∀ (n : ℕ), Integrable (g n)\nn : ℕ\nω : Ω\nhω : martingalePart (f + g) ℱ μ n ω = f n ω\n⊢ predictablePart (f + g) ℱ μ n ω = g n ω\n[PROOFSTEP]\nrw [← add_right_inj (f n ω)]\n[GOAL]\ncase h\nΩ : Type u_1\nE : Type u_2\nm0 : MeasurableSpace Ω\nμ : Measure Ω\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nf✝ : ℕ → Ω → E\nℱ : Filtration ℕ m0\nn✝ : ℕ\ninst✝ : SigmaFiniteFiltration μ ℱ\nf g : ℕ → Ω → E\nhf : Martingale f ℱ μ\nhg : Adapted ℱ fun n => g (n + 1)\nhg0 : g 0 = 0\nhgint : ∀ (n : ℕ), Integrable (g n)\nn : ℕ\nω : Ω\nhω : martingalePart (f + g) ℱ μ n ω = f n ω\n⊢ f n ω + predictablePart (f + g) ℱ μ n ω = f n ω + g n ω\n[PROOFSTEP]\nconv_rhs => rw [← Pi.add_apply, ← Pi.add_apply, ← martingalePart_add_predictablePart ℱ μ (f + g)]\n[GOAL]\nΩ : Type u_1\nE : Type u_2\nm0 : MeasurableSpace Ω\nμ : Measure Ω\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nf✝ : ℕ → Ω → E\nℱ : Filtration ℕ m0\nn✝ : ℕ\ninst✝ : SigmaFiniteFiltration μ ℱ\nf g : ℕ → Ω → E\nhf : Martingale f ℱ μ\nhg : Adapted ℱ fun n => g (n + 1)\nhg0 : g 0 = 0\nhgint : ∀ (n : ℕ), Integrable (g n)\nn : ℕ\nω : Ω\nhω : martingalePart (f + g) ℱ μ n ω = f n ω\n| f n ω + g n ω\n[PROOFSTEP]\nrw [← Pi.add_apply, ← Pi.add_apply, ← martingalePart_add_predictablePart ℱ μ (f + g)]\n[GOAL]\nΩ : Type u_1\nE : Type u_2\nm0 : MeasurableSpace Ω\nμ : Measure Ω\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nf✝ : ℕ → Ω → E\nℱ : Filtration ℕ m0\nn✝ : ℕ\ninst✝ : SigmaFiniteFiltration μ ℱ\nf g : ℕ → Ω → E\nhf : Martingale f ℱ μ\nhg : Adapted ℱ fun n => g (n + 1)\nhg0 : g 0 = 0\nhgint : ∀ (n : ℕ), Integrable (g n)\nn : ℕ\nω : Ω\nhω : martingalePart (f + g) ℱ μ n ω = f n ω\n| f n ω + g n ω\n[PROOFSTEP]\nrw [← Pi.add_apply, ← Pi.add_apply, ← martingalePart_add_predictablePart ℱ μ (f + g)]\n[GOAL]\nΩ : Type u_1\nE : Type u_2\nm0 : MeasurableSpace Ω\nμ : Measure Ω\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nf✝ : ℕ → Ω → E\nℱ : Filtration ℕ m0\nn✝ : ℕ\ninst✝ : SigmaFiniteFiltration μ ℱ\nf g : ℕ → Ω → E\nhf : Martingale f ℱ μ\nhg : Adapted ℱ fun n => g (n + 1)\nhg0 : g 0 = 0\nhgint : ∀ (n : ℕ), Integrable (g n)\nn : ℕ\nω : Ω\nhω : martingalePart (f + g) ℱ μ n ω = f n ω\n| f n ω + g n ω\n[PROOFSTEP]\nrw [← Pi.add_apply, ← Pi.add_apply, ← martingalePart_add_predictablePart ℱ μ (f + g)]\n[GOAL]\ncase h\nΩ : Type u_1\nE : Type u_2\nm0 : MeasurableSpace Ω\nμ : Measure Ω\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : CompleteSpace E\nf✝ : ℕ → Ω → E\nℱ : Filtration ℕ m0\nn✝ : ℕ\ninst✝ : SigmaFiniteFiltration μ ℱ\nf g : ℕ → Ω → E\nhf : Martingale f ℱ μ\nhg : Adapted ℱ fun n => g (n + 1)\nhg0 : g 0 = 0\nhgint : ∀ (n : ℕ), Integrable (g n)\nn : ℕ\nω : Ω\nhω : martingalePart (f + g) ℱ μ n ω = f n ω\n⊢ f n ω + predictablePart (f + g) ℱ μ n ω = (martingalePart (f + g) ℱ μ + predictablePart (f + g) ℱ μ) n ω\n[PROOFSTEP]\nrw [Pi.add_apply, Pi.add_apply, hω]\n[GOAL]\nΩ : Type u_1\nE : Type u_2\nm0 : MeasurableSpace Ω\nμ : Measure Ω\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf✝ : ℕ → Ω → E\nℱ✝ : Filtration ℕ m0\nn : ℕ\nR : ℝ≥0\nf : ℕ → Ω → ℝ\nℱ : Filtration ℕ m0\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\n⊢ ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |predictablePart f ℱ μ (i + 1) ω - predictablePart f ℱ μ i ω| ≤ ↑R\n[PROOFSTEP]\nsimp_rw [predictablePart, Finset.sum_apply, Finset.sum_range_succ_sub_sum]\n[GOAL]\nΩ : Type u_1\nE : Type u_2\nm0 : MeasurableSpace Ω\nμ : Measure Ω\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf✝ : ℕ → Ω → E\nℱ✝ : Filtration ℕ m0\nn : ℕ\nR : ℝ≥0\nf : ℕ → Ω → ℝ\nℱ : Filtration ℕ m0\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\n⊢ ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |(μ[f (i + 1) - f i|↑ℱ i]) ω| ≤ ↑R\n[PROOFSTEP]\nexact ae_all_iff.2 fun i => ae_bdd_condexp_of_ae_bdd <| ae_all_iff.1 hbdd i\n[GOAL]\nΩ : Type u_1\nE : Type u_2\nm0 : MeasurableSpace Ω\nμ : Measure Ω\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf✝ : ℕ → Ω → E\nℱ✝ : Filtration ℕ m0\nn : ℕ\nR : ℝ≥0\nf : ℕ → Ω → ℝ\nℱ : Filtration ℕ m0\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\n⊢ ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |martingalePart f ℱ μ (i + 1) ω - martingalePart f ℱ μ i ω| ≤ ↑(2 * R)\n[PROOFSTEP]\nfilter_upwards [hbdd, predictablePart_bdd_difference ℱ hbdd] with ω hω₁ hω₂ i\n[GOAL]\ncase h\nΩ : Type u_1\nE : Type u_2\nm0 : MeasurableSpace Ω\nμ : Measure Ω\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf✝ : ℕ → Ω → E\nℱ✝ : Filtration ℕ m0\nn : ℕ\nR : ℝ≥0\nf : ℕ → Ω → ℝ\nℱ : Filtration ℕ m0\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\nω : Ω\nhω₁ : ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\nhω₂ : ∀ (i : ℕ), |predictablePart f ℱ μ (i + 1) ω - predictablePart f ℱ μ i ω| ≤ ↑R\ni : ℕ\n⊢ |martingalePart f ℱ μ (i + 1) ω - martingalePart f ℱ μ i ω| ≤ ↑(2 * R)\n[PROOFSTEP]\nsimp only [two_mul, martingalePart, Pi.sub_apply]\n[GOAL]\ncase h\nΩ : Type u_1\nE : Type u_2\nm0 : MeasurableSpace Ω\nμ : Measure Ω\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf✝ : ℕ → Ω → E\nℱ✝ : Filtration ℕ m0\nn : ℕ\nR : ℝ≥0\nf : ℕ → Ω → ℝ\nℱ : Filtration ℕ m0\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\nω : Ω\nhω₁ : ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\nhω₂ : ∀ (i : ℕ), |predictablePart f ℱ μ (i + 1) ω - predictablePart f ℱ μ i ω| ≤ ↑R\ni : ℕ\n⊢ |f (i + 1) ω - predictablePart f ℱ μ (i + 1) ω - (f i ω - predictablePart f ℱ μ i ω)| ≤ ↑(R + R)\n[PROOFSTEP]\nhave :\n  |f (i + 1) ω - predictablePart f ℱ μ (i + 1) ω - (f i ω - predictablePart f ℱ μ i ω)| =\n    |f (i + 1) ω - f i ω - (predictablePart f ℱ μ (i + 1) ω - predictablePart f ℱ μ i ω)| :=\n  by\n  ring_nf\n    -- `ring` suggests `ring_nf` despite proving the goal\n[GOAL]\nΩ : Type u_1\nE : Type u_2\nm0 : MeasurableSpace Ω\nμ : Measure Ω\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf✝ : ℕ → Ω → E\nℱ✝ : Filtration ℕ m0\nn : ℕ\nR : ℝ≥0\nf : ℕ → Ω → ℝ\nℱ : Filtration ℕ m0\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\nω : Ω\nhω₁ : ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\nhω₂ : ∀ (i : ℕ), |predictablePart f ℱ μ (i + 1) ω - predictablePart f ℱ μ i ω| ≤ ↑R\ni : ℕ\n⊢ |f (i + 1) ω - predictablePart f ℱ μ (i + 1) ω - (f i ω - predictablePart f ℱ μ i ω)| =\n    |f (i + 1) ω - f i ω - (predictablePart f ℱ μ (i + 1) ω - predictablePart f ℱ μ i ω)|\n[PROOFSTEP]\nring_nf\n  -- `ring` suggests `ring_nf` despite proving the goal\n[GOAL]\ncase h\nΩ : Type u_1\nE : Type u_2\nm0 : MeasurableSpace Ω\nμ : Measure Ω\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf✝ : ℕ → Ω → E\nℱ✝ : Filtration ℕ m0\nn : ℕ\nR : ℝ≥0\nf : ℕ → Ω → ℝ\nℱ : Filtration ℕ m0\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\nω : Ω\nhω₁ : ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\nhω₂ : ∀ (i : ℕ), |predictablePart f ℱ μ (i + 1) ω - predictablePart f ℱ μ i ω| ≤ ↑R\ni : ℕ\nthis :\n  |f (i + 1) ω - predictablePart f ℱ μ (i + 1) ω - (f i ω - predictablePart f ℱ μ i ω)| =\n    |f (i + 1) ω - f i ω - (predictablePart f ℱ μ (i + 1) ω - predictablePart f ℱ μ i ω)|\n⊢ |f (i + 1) ω - predictablePart f ℱ μ (i + 1) ω - (f i ω - predictablePart f ℱ μ i ω)| ≤ ↑(R + R)\n[PROOFSTEP]\nrw [this]\n[GOAL]\ncase h\nΩ : Type u_1\nE : Type u_2\nm0 : MeasurableSpace Ω\nμ : Measure Ω\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℝ E\ninst✝ : CompleteSpace E\nf✝ : ℕ → Ω → E\nℱ✝ : Filtration ℕ m0\nn : ℕ\nR : ℝ≥0\nf : ℕ → Ω → ℝ\nℱ : Filtration ℕ m0\nhbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\nω : Ω\nhω₁ : ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R\nhω₂ : ∀ (i : ℕ), |predictablePart f ℱ μ (i + 1) ω - predictablePart f ℱ μ i ω| ≤ ↑R\ni : ℕ\nthis :\n  |f (i + 1) ω - predictablePart f ℱ μ (i + 1) ω - (f i ω - predictablePart f ℱ μ i ω)| =\n    |f (i + 1) ω - f i ω - (predictablePart f ℱ μ (i + 1) ω - predictablePart f ℱ μ i ω)|\n⊢ |f (i + 1) ω - f i ω - (predictablePart f ℱ μ (i + 1) ω - predictablePart f ℱ μ i ω)| ≤ ↑(R + R)\n[PROOFSTEP]\nexact (abs_sub _ _).trans (add_le_add (hω₁ i) (hω₂ i))\n", "meta": {"mathlib_filename": "Mathlib.Probability.Martingale.Centering", "llama_tokens": 24799, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.808067208930584, "lm_q2_score": 0.6261241632752915, "lm_q1q2_score": 0.5059504050618621}}
{"text": "[GOAL]\nR : Type u_1\nι : Type u_2\ninst✝¹ : Semiring R\ninst✝ : CharP R 2\n⊢ 2 = 0\n[PROOFSTEP]\nrw [← Nat.cast_two, CharP.cast_eq_zero]\n[GOAL]\nR : Type u_1\nι : Type u_2\ninst✝¹ : Semiring R\ninst✝ : CharP R 2\nx : R\n⊢ x + x = 0\n[PROOFSTEP]\nrw [← two_smul R x, two_eq_zero, zero_smul]\n[GOAL]\nR : Type u_1\nι : Type u_2\ninst✝¹ : Semiring R\ninst✝ : CharP R 2\n⊢ bit0 = 0\n[PROOFSTEP]\nfunext\n[GOAL]\ncase h\nR : Type u_1\nι : Type u_2\ninst✝¹ : Semiring R\ninst✝ : CharP R 2\nx✝ : R\n⊢ bit0 x✝ = OfNat.ofNat 0 x✝\n[PROOFSTEP]\nexact add_self_eq_zero _\n[GOAL]\nR : Type u_1\nι : Type u_2\ninst✝¹ : Semiring R\ninst✝ : CharP R 2\nx : R\n⊢ bit0 x = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\nι : Type u_2\ninst✝¹ : Semiring R\ninst✝ : CharP R 2\n⊢ bit1 = 1\n[PROOFSTEP]\nfunext\n[GOAL]\ncase h\nR : Type u_1\nι : Type u_2\ninst✝¹ : Semiring R\ninst✝ : CharP R 2\nx✝ : R\n⊢ bit1 x✝ = OfNat.ofNat 1 x✝\n[PROOFSTEP]\nsimp [bit1]\n[GOAL]\nR : Type u_1\nι : Type u_2\ninst✝¹ : Semiring R\ninst✝ : CharP R 2\nx : R\n⊢ bit1 x = 1\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\nι : Type u_2\ninst✝¹ : Ring R\ninst✝ : CharP R 2\nx : R\n⊢ -x = x\n[PROOFSTEP]\nrw [neg_eq_iff_add_eq_zero, ← two_smul R x, two_eq_zero, zero_smul]\n[GOAL]\nR : Type u_1\nι : Type u_2\ninst✝¹ : Ring R\ninst✝ : CharP R 2\nx y : R\n⊢ x - y = x + y\n[PROOFSTEP]\nrw [sub_eq_add_neg, neg_eq]\n[GOAL]\nR : Type u_1\nι : Type u_2\ninst✝¹ : CommSemiring R\ninst✝ : CharP R 2\nx y : R\n⊢ (x + y) * (x + y) = x * x + y * y\n[PROOFSTEP]\nrw [← pow_two, ← pow_two, ← pow_two, add_sq]\n[GOAL]\nR : Type u_1\nι : Type u_2\ninst✝¹ : CommSemiring R\ninst✝ : CharP R 2\nl : List R\n⊢ List.sum l * List.sum l = List.sum (List.map (fun x => x * x) l)\n[PROOFSTEP]\nsimp_rw [← pow_two, list_sum_sq]\n[GOAL]\nR : Type u_1\nι : Type u_2\ninst✝¹ : CommSemiring R\ninst✝ : CharP R 2\nl : Multiset R\n⊢ Multiset.sum l * Multiset.sum l = Multiset.sum (Multiset.map (fun x => x * x) l)\n[PROOFSTEP]\nsimp_rw [← pow_two, multiset_sum_sq]\n[GOAL]\nR : Type u_1\nι : Type u_2\ninst✝¹ : CommSemiring R\ninst✝ : CharP R 2\ns : Finset ι\nf : ι → R\n⊢ (∑ i in s, f i) * ∑ i in s, f i = ∑ i in s, f i * f i\n[PROOFSTEP]\nsimp_rw [← pow_two, sum_sq]\n[GOAL]\nR : Type u_1\nι : Type u_2\ninst✝¹ : Ring R\ninst✝ : Nontrivial R\n⊢ -1 = 1 ↔ ringChar R = 2\n[PROOFSTEP]\nrefine' ⟨fun h => _, fun h => @CharTwo.neg_eq _ _ (ringChar.of_eq h) 1⟩\n[GOAL]\nR : Type u_1\nι : Type u_2\ninst✝¹ : Ring R\ninst✝ : Nontrivial R\nh : -1 = 1\n⊢ ringChar R = 2\n[PROOFSTEP]\nrw [eq_comm, ← sub_eq_zero, sub_neg_eq_add, ← Nat.cast_one, ← Nat.cast_add] at h \n[GOAL]\nR : Type u_1\nι : Type u_2\ninst✝¹ : Ring R\ninst✝ : Nontrivial R\nh✝ : 1 = -1\nh : ↑(1 + 1) = 0\n⊢ ringChar R = 2\n[PROOFSTEP]\nexact ((Nat.dvd_prime Nat.prime_two).mp (ringChar.dvd h)).resolve_left CharP.ringChar_ne_one\n[GOAL]\nR : Type u_1\nι : Type u_2\ninst✝¹ : Ring R\ninst✝ : Nontrivial R\n⊢ orderOf (-1) = if ringChar R = 2 then 1 else 2\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nR : Type u_1\nι : Type u_2\ninst✝¹ : Ring R\ninst✝ : Nontrivial R\nh : ringChar R = 2\n⊢ orderOf (-1) = 1\n[PROOFSTEP]\nrw [neg_one_eq_one_iff.2 h, orderOf_one]\n[GOAL]\ncase neg\nR : Type u_1\nι : Type u_2\ninst✝¹ : Ring R\ninst✝ : Nontrivial R\nh : ¬ringChar R = 2\n⊢ orderOf (-1) = 2\n[PROOFSTEP]\napply orderOf_eq_prime\n[GOAL]\ncase neg.hg\nR : Type u_1\nι : Type u_2\ninst✝¹ : Ring R\ninst✝ : Nontrivial R\nh : ¬ringChar R = 2\n⊢ (-1) ^ 2 = 1\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg.hg1\nR : Type u_1\nι : Type u_2\ninst✝¹ : Ring R\ninst✝ : Nontrivial R\nh : ¬ringChar R = 2\n⊢ -1 ≠ 1\n[PROOFSTEP]\nsimpa [neg_one_eq_one_iff] using h\n", "meta": {"mathlib_filename": "Mathlib.Algebra.CharP.Two", "llama_tokens": 1857, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7853085808877581, "lm_q2_score": 0.6442251133170356, "lm_q1q2_score": 0.5059155095112564}}
{"text": "[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nh' : Submodule.IsPrincipal (maximalIdeal R)\nI : Ideal R\nhI : I ≠ ⊥\n⊢ ∃ n, I = maximalIdeal R ^ n\n[PROOFSTEP]\nclassical\nobtain ⟨x, hx : _ = Ideal.span _⟩ := h'\nby_cases hI' : I = ⊤\n· use 0; rw [pow_zero, hI', Ideal.one_eq_top]\nhave H : ∀ r : R, ¬IsUnit r ↔ x ∣ r := fun r => (SetLike.ext_iff.mp hx r).trans Ideal.mem_span_singleton\nhave : x ≠ 0 := by\n  rintro rfl\n  apply Ring.ne_bot_of_isMaximal_of_not_isField (maximalIdeal.isMaximal R) h\n  simp [hx]\nhave hx' := DiscreteValuationRing.irreducible_of_span_eq_maximalIdeal x this hx\nhave H' : ∀ r : R, r ≠ 0 → r ∈ nonunits R → ∃ n : ℕ, Associated (x ^ n) r :=\n  by\n  intro r hr₁ hr₂\n  obtain ⟨f, hf₁, rfl, hf₂⟩ := (WfDvdMonoid.not_unit_iff_exists_factors_eq r hr₁).mp hr₂\n  have : ∀ b ∈ f, Associated x b := by\n    intro b hb\n    exact Irreducible.associated_of_dvd hx' (hf₁ b hb) ((H b).mp (hf₁ b hb).1)\n  clear hr₁ hr₂ hf₁\n  induction' f using Multiset.induction with fa fs fh\n  · exact (hf₂ rfl).elim\n  rcases eq_or_ne fs ∅ with (rfl | hf')\n  · use 1\n    rw [pow_one, Multiset.prod_cons, Multiset.empty_eq_zero, Multiset.prod_zero, mul_one]\n    exact this _ (Multiset.mem_cons_self _ _)\n  · obtain ⟨n, hn⟩ := fh hf' fun b hb => this _ (Multiset.mem_cons_of_mem hb)\n    use n + 1\n    rw [pow_add, Multiset.prod_cons, mul_comm, pow_one]\n    exact Associated.mul_mul (this _ (Multiset.mem_cons_self _ _)) hn\nhave : ∃ n : ℕ, x ^ n ∈ I :=\n  by\n  obtain ⟨r, hr₁, hr₂⟩ : ∃ r : R, r ∈ I ∧ r ≠ 0 := by by_contra' h; apply hI; rw [eq_bot_iff]; exact h\n  obtain ⟨n, u, rfl⟩ := H' r hr₂ (le_maximalIdeal hI' hr₁)\n  use n\n  rwa [← I.unit_mul_mem_iff_mem u.isUnit, mul_comm]\nuse Nat.find this\napply le_antisymm\n· change ∀ s ∈ I, s ∈ _\n  by_contra hI''\n  push_neg at hI'' \n  obtain ⟨s, hs₁, hs₂⟩ := hI''\n  apply hs₂\n  by_cases hs₃ : s = 0; · rw [hs₃]; exact zero_mem _\n  obtain ⟨n, u, rfl⟩ := H' s hs₃ (le_maximalIdeal hI' hs₁)\n  rw [mul_comm, Ideal.unit_mul_mem_iff_mem _ u.isUnit] at hs₁ ⊢\n  apply Ideal.pow_le_pow (Nat.find_min' this hs₁)\n  apply Ideal.pow_mem_pow\n  exact (H _).mpr (dvd_refl _)\n· rw [hx, Ideal.span_singleton_pow, Ideal.span_le, Set.singleton_subset_iff]\n  exact Nat.find_spec this\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nh' : Submodule.IsPrincipal (maximalIdeal R)\nI : Ideal R\nhI : I ≠ ⊥\n⊢ ∃ n, I = maximalIdeal R ^ n\n[PROOFSTEP]\nobtain ⟨x, hx : _ = Ideal.span _⟩ := h'\n[GOAL]\ncase mk.intro\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nI : Ideal R\nhI : I ≠ ⊥\nx : R\nhx : maximalIdeal R = Ideal.span {x}\n⊢ ∃ n, I = maximalIdeal R ^ n\n[PROOFSTEP]\nby_cases hI' : I = ⊤\n[GOAL]\ncase pos\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nI : Ideal R\nhI : I ≠ ⊥\nx : R\nhx : maximalIdeal R = Ideal.span {x}\nhI' : I = ⊤\n⊢ ∃ n, I = maximalIdeal R ^ n\n[PROOFSTEP]\nuse 0\n[GOAL]\ncase h\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nI : Ideal R\nhI : I ≠ ⊥\nx : R\nhx : maximalIdeal R = Ideal.span {x}\nhI' : I = ⊤\n⊢ I = maximalIdeal R ^ 0\n[PROOFSTEP]\nrw [pow_zero, hI', Ideal.one_eq_top]\n[GOAL]\ncase neg\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nI : Ideal R\nhI : I ≠ ⊥\nx : R\nhx : maximalIdeal R = Ideal.span {x}\nhI' : ¬I = ⊤\n⊢ ∃ n, I = maximalIdeal R ^ n\n[PROOFSTEP]\nhave H : ∀ r : R, ¬IsUnit r ↔ x ∣ r := fun r => (SetLike.ext_iff.mp hx r).trans Ideal.mem_span_singleton\n[GOAL]\ncase neg\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nI : Ideal R\nhI : I ≠ ⊥\nx : R\nhx : maximalIdeal R = Ideal.span {x}\nhI' : ¬I = ⊤\nH : ∀ (r : R), ¬IsUnit r ↔ x ∣ r\n⊢ ∃ n, I = maximalIdeal R ^ n\n[PROOFSTEP]\nhave : x ≠ 0 := by\n  rintro rfl\n  apply Ring.ne_bot_of_isMaximal_of_not_isField (maximalIdeal.isMaximal R) h\n  simp [hx]\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nI : Ideal R\nhI : I ≠ ⊥\nx : R\nhx : maximalIdeal R = Ideal.span {x}\nhI' : ¬I = ⊤\nH : ∀ (r : R), ¬IsUnit r ↔ x ∣ r\n⊢ x ≠ 0\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nI : Ideal R\nhI : I ≠ ⊥\nhI' : ¬I = ⊤\nhx : maximalIdeal R = Ideal.span {0}\nH : ∀ (r : R), ¬IsUnit r ↔ 0 ∣ r\n⊢ False\n[PROOFSTEP]\napply Ring.ne_bot_of_isMaximal_of_not_isField (maximalIdeal.isMaximal R) h\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nI : Ideal R\nhI : I ≠ ⊥\nhI' : ¬I = ⊤\nhx : maximalIdeal R = Ideal.span {0}\nH : ∀ (r : R), ¬IsUnit r ↔ 0 ∣ r\n⊢ maximalIdeal R = ⊥\n[PROOFSTEP]\nsimp [hx]\n[GOAL]\ncase neg\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nI : Ideal R\nhI : I ≠ ⊥\nx : R\nhx : maximalIdeal R = Ideal.span {x}\nhI' : ¬I = ⊤\nH : ∀ (r : R), ¬IsUnit r ↔ x ∣ r\nthis : x ≠ 0\n⊢ ∃ n, I = maximalIdeal R ^ n\n[PROOFSTEP]\nhave hx' := DiscreteValuationRing.irreducible_of_span_eq_maximalIdeal x this hx\n[GOAL]\ncase neg\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nI : Ideal R\nhI : I ≠ ⊥\nx : R\nhx : maximalIdeal R = Ideal.span {x}\nhI' : ¬I = ⊤\nH : ∀ (r : R), ¬IsUnit r ↔ x ∣ r\nthis : x ≠ 0\nhx' : Irreducible x\n⊢ ∃ n, I = maximalIdeal R ^ n\n[PROOFSTEP]\nhave H' : ∀ r : R, r ≠ 0 → r ∈ nonunits R → ∃ n : ℕ, Associated (x ^ n) r :=\n  by\n  intro r hr₁ hr₂\n  obtain ⟨f, hf₁, rfl, hf₂⟩ := (WfDvdMonoid.not_unit_iff_exists_factors_eq r hr₁).mp hr₂\n  have : ∀ b ∈ f, Associated x b := by\n    intro b hb\n    exact Irreducible.associated_of_dvd hx' (hf₁ b hb) ((H b).mp (hf₁ b hb).1)\n  clear hr₁ hr₂ hf₁\n  induction' f using Multiset.induction with fa fs fh\n  · exact (hf₂ rfl).elim\n  rcases eq_or_ne fs ∅ with (rfl | hf')\n  · use 1\n    rw [pow_one, Multiset.prod_cons, Multiset.empty_eq_zero, Multiset.prod_zero, mul_one]\n    exact this _ (Multiset.mem_cons_self _ _)\n  · obtain ⟨n, hn⟩ := fh hf' fun b hb => this _ (Multiset.mem_cons_of_mem hb)\n    use n + 1\n    rw [pow_add, Multiset.prod_cons, mul_comm, pow_one]\n    exact Associated.mul_mul (this _ (Multiset.mem_cons_self _ _)) hn\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nI : Ideal R\nhI : I ≠ ⊥\nx : R\nhx : maximalIdeal R = Ideal.span {x}\nhI' : ¬I = ⊤\nH : ∀ (r : R), ¬IsUnit r ↔ x ∣ r\nthis : x ≠ 0\nhx' : Irreducible x\n⊢ ∀ (r : R), r ≠ 0 → r ∈ nonunits R → ∃ n, Associated (x ^ n) r\n[PROOFSTEP]\nintro r hr₁ hr₂\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nI : Ideal R\nhI : I ≠ ⊥\nx : R\nhx : maximalIdeal R = Ideal.span {x}\nhI' : ¬I = ⊤\nH : ∀ (r : R), ¬IsUnit r ↔ x ∣ r\nthis : x ≠ 0\nhx' : Irreducible x\nr : R\nhr₁ : r ≠ 0\nhr₂ : r ∈ nonunits R\n⊢ ∃ n, Associated (x ^ n) r\n[PROOFSTEP]\nobtain ⟨f, hf₁, rfl, hf₂⟩ := (WfDvdMonoid.not_unit_iff_exists_factors_eq r hr₁).mp hr₂\n[GOAL]\ncase intro.intro.intro\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nI : Ideal R\nhI : I ≠ ⊥\nx : R\nhx : maximalIdeal R = Ideal.span {x}\nhI' : ¬I = ⊤\nH : ∀ (r : R), ¬IsUnit r ↔ x ∣ r\nthis : x ≠ 0\nhx' : Irreducible x\nf : Multiset R\nhf₁ : ∀ (b : R), b ∈ f → Irreducible b\nhf₂ : f ≠ ∅\nhr₁ : Multiset.prod f ≠ 0\nhr₂ : Multiset.prod f ∈ nonunits R\n⊢ ∃ n, Associated (x ^ n) (Multiset.prod f)\n[PROOFSTEP]\nhave : ∀ b ∈ f, Associated x b := by\n  intro b hb\n  exact Irreducible.associated_of_dvd hx' (hf₁ b hb) ((H b).mp (hf₁ b hb).1)\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nI : Ideal R\nhI : I ≠ ⊥\nx : R\nhx : maximalIdeal R = Ideal.span {x}\nhI' : ¬I = ⊤\nH : ∀ (r : R), ¬IsUnit r ↔ x ∣ r\nthis : x ≠ 0\nhx' : Irreducible x\nf : Multiset R\nhf₁ : ∀ (b : R), b ∈ f → Irreducible b\nhf₂ : f ≠ ∅\nhr₁ : Multiset.prod f ≠ 0\nhr₂ : Multiset.prod f ∈ nonunits R\n⊢ ∀ (b : R), b ∈ f → Associated x b\n[PROOFSTEP]\nintro b hb\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nI : Ideal R\nhI : I ≠ ⊥\nx : R\nhx : maximalIdeal R = Ideal.span {x}\nhI' : ¬I = ⊤\nH : ∀ (r : R), ¬IsUnit r ↔ x ∣ r\nthis : x ≠ 0\nhx' : Irreducible x\nf : Multiset R\nhf₁ : ∀ (b : R), b ∈ f → Irreducible b\nhf₂ : f ≠ ∅\nhr₁ : Multiset.prod f ≠ 0\nhr₂ : Multiset.prod f ∈ nonunits R\nb : R\nhb : b ∈ f\n⊢ Associated x b\n[PROOFSTEP]\nexact Irreducible.associated_of_dvd hx' (hf₁ b hb) ((H b).mp (hf₁ b hb).1)\n[GOAL]\ncase intro.intro.intro\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nI : Ideal R\nhI : I ≠ ⊥\nx : R\nhx : maximalIdeal R = Ideal.span {x}\nhI' : ¬I = ⊤\nH : ∀ (r : R), ¬IsUnit r ↔ x ∣ r\nthis✝ : x ≠ 0\nhx' : Irreducible x\nf : Multiset R\nhf₁ : ∀ (b : R), b ∈ f → Irreducible b\nhf₂ : f ≠ ∅\nhr₁ : Multiset.prod f ≠ 0\nhr₂ : Multiset.prod f ∈ nonunits R\nthis : ∀ (b : R), b ∈ f → Associated x b\n⊢ ∃ n, Associated (x ^ n) (Multiset.prod f)\n[PROOFSTEP]\nclear hr₁ hr₂ hf₁\n[GOAL]\ncase intro.intro.intro\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nI : Ideal R\nhI : I ≠ ⊥\nx : R\nhx : maximalIdeal R = Ideal.span {x}\nhI' : ¬I = ⊤\nH : ∀ (r : R), ¬IsUnit r ↔ x ∣ r\nthis✝ : x ≠ 0\nhx' : Irreducible x\nf : Multiset R\nhf₂ : f ≠ ∅\nthis : ∀ (b : R), b ∈ f → Associated x b\n⊢ ∃ n, Associated (x ^ n) (Multiset.prod f)\n[PROOFSTEP]\ninduction' f using Multiset.induction with fa fs fh\n[GOAL]\ncase intro.intro.intro.empty\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nI : Ideal R\nhI : I ≠ ⊥\nx : R\nhx : maximalIdeal R = Ideal.span {x}\nhI' : ¬I = ⊤\nH : ∀ (r : R), ¬IsUnit r ↔ x ∣ r\nthis✝¹ : x ≠ 0\nhx' : Irreducible x\nf : Multiset R\nhf₂✝ : f ≠ ∅\nthis✝ : ∀ (b : R), b ∈ f → Associated x b\nhf₂ : 0 ≠ ∅\nthis : ∀ (b : R), b ∈ 0 → Associated x b\n⊢ ∃ n, Associated (x ^ n) (Multiset.prod 0)\n[PROOFSTEP]\nexact (hf₂ rfl).elim\n[GOAL]\ncase intro.intro.intro.cons\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nI : Ideal R\nhI : I ≠ ⊥\nx : R\nhx : maximalIdeal R = Ideal.span {x}\nhI' : ¬I = ⊤\nH : ∀ (r : R), ¬IsUnit r ↔ x ∣ r\nthis✝¹ : x ≠ 0\nhx' : Irreducible x\nf : Multiset R\nhf₂✝ : f ≠ ∅\nthis✝ : ∀ (b : R), b ∈ f → Associated x b\nfa : R\nfs : Multiset R\nfh : fs ≠ ∅ → (∀ (b : R), b ∈ fs → Associated x b) → ∃ n, Associated (x ^ n) (Multiset.prod fs)\nhf₂ : fa ::ₘ fs ≠ ∅\nthis : ∀ (b : R), b ∈ fa ::ₘ fs → Associated x b\n⊢ ∃ n, Associated (x ^ n) (Multiset.prod (fa ::ₘ fs))\n[PROOFSTEP]\nrcases eq_or_ne fs ∅ with (rfl | hf')\n[GOAL]\ncase intro.intro.intro.cons.inl\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nI : Ideal R\nhI : I ≠ ⊥\nx : R\nhx : maximalIdeal R = Ideal.span {x}\nhI' : ¬I = ⊤\nH : ∀ (r : R), ¬IsUnit r ↔ x ∣ r\nthis✝¹ : x ≠ 0\nhx' : Irreducible x\nf : Multiset R\nhf₂✝ : f ≠ ∅\nthis✝ : ∀ (b : R), b ∈ f → Associated x b\nfa : R\nfh : ∅ ≠ ∅ → (∀ (b : R), b ∈ ∅ → Associated x b) → ∃ n, Associated (x ^ n) (Multiset.prod ∅)\nhf₂ : fa ::ₘ ∅ ≠ ∅\nthis : ∀ (b : R), b ∈ fa ::ₘ ∅ → Associated x b\n⊢ ∃ n, Associated (x ^ n) (Multiset.prod (fa ::ₘ ∅))\n[PROOFSTEP]\nuse 1\n[GOAL]\ncase h\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nI : Ideal R\nhI : I ≠ ⊥\nx : R\nhx : maximalIdeal R = Ideal.span {x}\nhI' : ¬I = ⊤\nH : ∀ (r : R), ¬IsUnit r ↔ x ∣ r\nthis✝¹ : x ≠ 0\nhx' : Irreducible x\nf : Multiset R\nhf₂✝ : f ≠ ∅\nthis✝ : ∀ (b : R), b ∈ f → Associated x b\nfa : R\nfh : ∅ ≠ ∅ → (∀ (b : R), b ∈ ∅ → Associated x b) → ∃ n, Associated (x ^ n) (Multiset.prod ∅)\nhf₂ : fa ::ₘ ∅ ≠ ∅\nthis : ∀ (b : R), b ∈ fa ::ₘ ∅ → Associated x b\n⊢ Associated (x ^ 1) (Multiset.prod (fa ::ₘ ∅))\n[PROOFSTEP]\nrw [pow_one, Multiset.prod_cons, Multiset.empty_eq_zero, Multiset.prod_zero, mul_one]\n[GOAL]\ncase h\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nI : Ideal R\nhI : I ≠ ⊥\nx : R\nhx : maximalIdeal R = Ideal.span {x}\nhI' : ¬I = ⊤\nH : ∀ (r : R), ¬IsUnit r ↔ x ∣ r\nthis✝¹ : x ≠ 0\nhx' : Irreducible x\nf : Multiset R\nhf₂✝ : f ≠ ∅\nthis✝ : ∀ (b : R), b ∈ f → Associated x b\nfa : R\nfh : ∅ ≠ ∅ → (∀ (b : R), b ∈ ∅ → Associated x b) → ∃ n, Associated (x ^ n) (Multiset.prod ∅)\nhf₂ : fa ::ₘ ∅ ≠ ∅\nthis : ∀ (b : R), b ∈ fa ::ₘ ∅ → Associated x b\n⊢ Associated x fa\n[PROOFSTEP]\nexact this _ (Multiset.mem_cons_self _ _)\n[GOAL]\ncase intro.intro.intro.cons.inr\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nI : Ideal R\nhI : I ≠ ⊥\nx : R\nhx : maximalIdeal R = Ideal.span {x}\nhI' : ¬I = ⊤\nH : ∀ (r : R), ¬IsUnit r ↔ x ∣ r\nthis✝¹ : x ≠ 0\nhx' : Irreducible x\nf : Multiset R\nhf₂✝ : f ≠ ∅\nthis✝ : ∀ (b : R), b ∈ f → Associated x b\nfa : R\nfs : Multiset R\nfh : fs ≠ ∅ → (∀ (b : R), b ∈ fs → Associated x b) → ∃ n, Associated (x ^ n) (Multiset.prod fs)\nhf₂ : fa ::ₘ fs ≠ ∅\nthis : ∀ (b : R), b ∈ fa ::ₘ fs → Associated x b\nhf' : fs ≠ ∅\n⊢ ∃ n, Associated (x ^ n) (Multiset.prod (fa ::ₘ fs))\n[PROOFSTEP]\nobtain ⟨n, hn⟩ := fh hf' fun b hb => this _ (Multiset.mem_cons_of_mem hb)\n[GOAL]\ncase intro.intro.intro.cons.inr.intro\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nI : Ideal R\nhI : I ≠ ⊥\nx : R\nhx : maximalIdeal R = Ideal.span {x}\nhI' : ¬I = ⊤\nH : ∀ (r : R), ¬IsUnit r ↔ x ∣ r\nthis✝¹ : x ≠ 0\nhx' : Irreducible x\nf : Multiset R\nhf₂✝ : f ≠ ∅\nthis✝ : ∀ (b : R), b ∈ f → Associated x b\nfa : R\nfs : Multiset R\nfh : fs ≠ ∅ → (∀ (b : R), b ∈ fs → Associated x b) → ∃ n, Associated (x ^ n) (Multiset.prod fs)\nhf₂ : fa ::ₘ fs ≠ ∅\nthis : ∀ (b : R), b ∈ fa ::ₘ fs → Associated x b\nhf' : fs ≠ ∅\nn : ℕ\nhn : Associated (x ^ n) (Multiset.prod fs)\n⊢ ∃ n, Associated (x ^ n) (Multiset.prod (fa ::ₘ fs))\n[PROOFSTEP]\nuse n + 1\n[GOAL]\ncase h\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nI : Ideal R\nhI : I ≠ ⊥\nx : R\nhx : maximalIdeal R = Ideal.span {x}\nhI' : ¬I = ⊤\nH : ∀ (r : R), ¬IsUnit r ↔ x ∣ r\nthis✝¹ : x ≠ 0\nhx' : Irreducible x\nf : Multiset R\nhf₂✝ : f ≠ ∅\nthis✝ : ∀ (b : R), b ∈ f → Associated x b\nfa : R\nfs : Multiset R\nfh : fs ≠ ∅ → (∀ (b : R), b ∈ fs → Associated x b) → ∃ n, Associated (x ^ n) (Multiset.prod fs)\nhf₂ : fa ::ₘ fs ≠ ∅\nthis : ∀ (b : R), b ∈ fa ::ₘ fs → Associated x b\nhf' : fs ≠ ∅\nn : ℕ\nhn : Associated (x ^ n) (Multiset.prod fs)\n⊢ Associated (x ^ (n + 1)) (Multiset.prod (fa ::ₘ fs))\n[PROOFSTEP]\nrw [pow_add, Multiset.prod_cons, mul_comm, pow_one]\n[GOAL]\ncase h\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nI : Ideal R\nhI : I ≠ ⊥\nx : R\nhx : maximalIdeal R = Ideal.span {x}\nhI' : ¬I = ⊤\nH : ∀ (r : R), ¬IsUnit r ↔ x ∣ r\nthis✝¹ : x ≠ 0\nhx' : Irreducible x\nf : Multiset R\nhf₂✝ : f ≠ ∅\nthis✝ : ∀ (b : R), b ∈ f → Associated x b\nfa : R\nfs : Multiset R\nfh : fs ≠ ∅ → (∀ (b : R), b ∈ fs → Associated x b) → ∃ n, Associated (x ^ n) (Multiset.prod fs)\nhf₂ : fa ::ₘ fs ≠ ∅\nthis : ∀ (b : R), b ∈ fa ::ₘ fs → Associated x b\nhf' : fs ≠ ∅\nn : ℕ\nhn : Associated (x ^ n) (Multiset.prod fs)\n⊢ Associated (x * x ^ n) (fa * Multiset.prod fs)\n[PROOFSTEP]\nexact Associated.mul_mul (this _ (Multiset.mem_cons_self _ _)) hn\n[GOAL]\ncase neg\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nI : Ideal R\nhI : I ≠ ⊥\nx : R\nhx : maximalIdeal R = Ideal.span {x}\nhI' : ¬I = ⊤\nH : ∀ (r : R), ¬IsUnit r ↔ x ∣ r\nthis : x ≠ 0\nhx' : Irreducible x\nH' : ∀ (r : R), r ≠ 0 → r ∈ nonunits R → ∃ n, Associated (x ^ n) r\n⊢ ∃ n, I = maximalIdeal R ^ n\n[PROOFSTEP]\nhave : ∃ n : ℕ, x ^ n ∈ I :=\n  by\n  obtain ⟨r, hr₁, hr₂⟩ : ∃ r : R, r ∈ I ∧ r ≠ 0 := by by_contra' h; apply hI; rw [eq_bot_iff]; exact h\n  obtain ⟨n, u, rfl⟩ := H' r hr₂ (le_maximalIdeal hI' hr₁)\n  use n\n  rwa [← I.unit_mul_mem_iff_mem u.isUnit, mul_comm]\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nI : Ideal R\nhI : I ≠ ⊥\nx : R\nhx : maximalIdeal R = Ideal.span {x}\nhI' : ¬I = ⊤\nH : ∀ (r : R), ¬IsUnit r ↔ x ∣ r\nthis : x ≠ 0\nhx' : Irreducible x\nH' : ∀ (r : R), r ≠ 0 → r ∈ nonunits R → ∃ n, Associated (x ^ n) r\n⊢ ∃ n, x ^ n ∈ I\n[PROOFSTEP]\nobtain ⟨r, hr₁, hr₂⟩ : ∃ r : R, r ∈ I ∧ r ≠ 0 := by by_contra' h; apply hI; rw [eq_bot_iff]; exact h\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nI : Ideal R\nhI : I ≠ ⊥\nx : R\nhx : maximalIdeal R = Ideal.span {x}\nhI' : ¬I = ⊤\nH : ∀ (r : R), ¬IsUnit r ↔ x ∣ r\nthis : x ≠ 0\nhx' : Irreducible x\nH' : ∀ (r : R), r ≠ 0 → r ∈ nonunits R → ∃ n, Associated (x ^ n) r\n⊢ ∃ r, r ∈ I ∧ r ≠ 0\n[PROOFSTEP]\nby_contra' h\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh✝ : ¬IsField R\nI : Ideal R\nhI : I ≠ ⊥\nx : R\nhx : maximalIdeal R = Ideal.span {x}\nhI' : ¬I = ⊤\nH : ∀ (r : R), ¬IsUnit r ↔ x ∣ r\nthis : x ≠ 0\nhx' : Irreducible x\nH' : ∀ (r : R), r ≠ 0 → r ∈ nonunits R → ∃ n, Associated (x ^ n) r\nh : ∀ (r : R), r ∈ I → r = 0\n⊢ False\n[PROOFSTEP]\napply hI\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh✝ : ¬IsField R\nI : Ideal R\nhI : I ≠ ⊥\nx : R\nhx : maximalIdeal R = Ideal.span {x}\nhI' : ¬I = ⊤\nH : ∀ (r : R), ¬IsUnit r ↔ x ∣ r\nthis : x ≠ 0\nhx' : Irreducible x\nH' : ∀ (r : R), r ≠ 0 → r ∈ nonunits R → ∃ n, Associated (x ^ n) r\nh : ∀ (r : R), r ∈ I → r = 0\n⊢ I = ⊥\n[PROOFSTEP]\nrw [eq_bot_iff]\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh✝ : ¬IsField R\nI : Ideal R\nhI : I ≠ ⊥\nx : R\nhx : maximalIdeal R = Ideal.span {x}\nhI' : ¬I = ⊤\nH : ∀ (r : R), ¬IsUnit r ↔ x ∣ r\nthis : x ≠ 0\nhx' : Irreducible x\nH' : ∀ (r : R), r ≠ 0 → r ∈ nonunits R → ∃ n, Associated (x ^ n) r\nh : ∀ (r : R), r ∈ I → r = 0\n⊢ I ≤ ⊥\n[PROOFSTEP]\nexact h\n[GOAL]\ncase intro.intro\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nI : Ideal R\nhI : I ≠ ⊥\nx : R\nhx : maximalIdeal R = Ideal.span {x}\nhI' : ¬I = ⊤\nH : ∀ (r : R), ¬IsUnit r ↔ x ∣ r\nthis : x ≠ 0\nhx' : Irreducible x\nH' : ∀ (r : R), r ≠ 0 → r ∈ nonunits R → ∃ n, Associated (x ^ n) r\nr : R\nhr₁ : r ∈ I\nhr₂ : r ≠ 0\n⊢ ∃ n, x ^ n ∈ I\n[PROOFSTEP]\nobtain ⟨n, u, rfl⟩ := H' r hr₂ (le_maximalIdeal hI' hr₁)\n[GOAL]\ncase intro.intro.intro.intro\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nI : Ideal R\nhI : I ≠ ⊥\nx : R\nhx : maximalIdeal R = Ideal.span {x}\nhI' : ¬I = ⊤\nH : ∀ (r : R), ¬IsUnit r ↔ x ∣ r\nthis : x ≠ 0\nhx' : Irreducible x\nH' : ∀ (r : R), r ≠ 0 → r ∈ nonunits R → ∃ n, Associated (x ^ n) r\nn : ℕ\nu : Rˣ\nhr₁ : x ^ n * ↑u ∈ I\nhr₂ : x ^ n * ↑u ≠ 0\n⊢ ∃ n, x ^ n ∈ I\n[PROOFSTEP]\nuse n\n[GOAL]\ncase h\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nI : Ideal R\nhI : I ≠ ⊥\nx : R\nhx : maximalIdeal R = Ideal.span {x}\nhI' : ¬I = ⊤\nH : ∀ (r : R), ¬IsUnit r ↔ x ∣ r\nthis : x ≠ 0\nhx' : Irreducible x\nH' : ∀ (r : R), r ≠ 0 → r ∈ nonunits R → ∃ n, Associated (x ^ n) r\nn : ℕ\nu : Rˣ\nhr₁ : x ^ n * ↑u ∈ I\nhr₂ : x ^ n * ↑u ≠ 0\n⊢ x ^ n ∈ I\n[PROOFSTEP]\nrwa [← I.unit_mul_mem_iff_mem u.isUnit, mul_comm]\n[GOAL]\ncase neg\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nI : Ideal R\nhI : I ≠ ⊥\nx : R\nhx : maximalIdeal R = Ideal.span {x}\nhI' : ¬I = ⊤\nH : ∀ (r : R), ¬IsUnit r ↔ x ∣ r\nthis✝ : x ≠ 0\nhx' : Irreducible x\nH' : ∀ (r : R), r ≠ 0 → r ∈ nonunits R → ∃ n, Associated (x ^ n) r\nthis : ∃ n, x ^ n ∈ I\n⊢ ∃ n, I = maximalIdeal R ^ n\n[PROOFSTEP]\nuse Nat.find this\n[GOAL]\ncase h\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nI : Ideal R\nhI : I ≠ ⊥\nx : R\nhx : maximalIdeal R = Ideal.span {x}\nhI' : ¬I = ⊤\nH : ∀ (r : R), ¬IsUnit r ↔ x ∣ r\nthis✝ : x ≠ 0\nhx' : Irreducible x\nH' : ∀ (r : R), r ≠ 0 → r ∈ nonunits R → ∃ n, Associated (x ^ n) r\nthis : ∃ n, x ^ n ∈ I\n⊢ I = maximalIdeal R ^ Nat.find this\n[PROOFSTEP]\napply le_antisymm\n[GOAL]\ncase h.a\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nI : Ideal R\nhI : I ≠ ⊥\nx : R\nhx : maximalIdeal R = Ideal.span {x}\nhI' : ¬I = ⊤\nH : ∀ (r : R), ¬IsUnit r ↔ x ∣ r\nthis✝ : x ≠ 0\nhx' : Irreducible x\nH' : ∀ (r : R), r ≠ 0 → r ∈ nonunits R → ∃ n, Associated (x ^ n) r\nthis : ∃ n, x ^ n ∈ I\n⊢ I ≤ maximalIdeal R ^ Nat.find this\n[PROOFSTEP]\nchange ∀ s ∈ I, s ∈ _\n[GOAL]\ncase h.a\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nI : Ideal R\nhI : I ≠ ⊥\nx : R\nhx : maximalIdeal R = Ideal.span {x}\nhI' : ¬I = ⊤\nH : ∀ (r : R), ¬IsUnit r ↔ x ∣ r\nthis✝ : x ≠ 0\nhx' : Irreducible x\nH' : ∀ (r : R), r ≠ 0 → r ∈ nonunits R → ∃ n, Associated (x ^ n) r\nthis : ∃ n, x ^ n ∈ I\n⊢ ∀ (s : R), s ∈ I → s ∈ maximalIdeal R ^ Nat.find this\n[PROOFSTEP]\nby_contra hI''\n[GOAL]\ncase h.a\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nI : Ideal R\nhI : I ≠ ⊥\nx : R\nhx : maximalIdeal R = Ideal.span {x}\nhI' : ¬I = ⊤\nH : ∀ (r : R), ¬IsUnit r ↔ x ∣ r\nthis✝ : x ≠ 0\nhx' : Irreducible x\nH' : ∀ (r : R), r ≠ 0 → r ∈ nonunits R → ∃ n, Associated (x ^ n) r\nthis : ∃ n, x ^ n ∈ I\nhI'' : ¬∀ (s : R), s ∈ I → s ∈ maximalIdeal R ^ Nat.find this\n⊢ False\n[PROOFSTEP]\npush_neg at hI'' \n[GOAL]\ncase h.a\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nI : Ideal R\nhI : I ≠ ⊥\nx : R\nhx : maximalIdeal R = Ideal.span {x}\nhI' : ¬I = ⊤\nH : ∀ (r : R), ¬IsUnit r ↔ x ∣ r\nthis✝ : x ≠ 0\nhx' : Irreducible x\nH' : ∀ (r : R), r ≠ 0 → r ∈ nonunits R → ∃ n, Associated (x ^ n) r\nthis : ∃ n, x ^ n ∈ I\nhI'' : ∃ s, s ∈ I ∧ ¬s ∈ maximalIdeal R ^ Nat.find this\n⊢ False\n[PROOFSTEP]\nobtain ⟨s, hs₁, hs₂⟩ := hI''\n[GOAL]\ncase h.a.intro.intro\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nI : Ideal R\nhI : I ≠ ⊥\nx : R\nhx : maximalIdeal R = Ideal.span {x}\nhI' : ¬I = ⊤\nH : ∀ (r : R), ¬IsUnit r ↔ x ∣ r\nthis✝ : x ≠ 0\nhx' : Irreducible x\nH' : ∀ (r : R), r ≠ 0 → r ∈ nonunits R → ∃ n, Associated (x ^ n) r\nthis : ∃ n, x ^ n ∈ I\ns : R\nhs₁ : s ∈ I\nhs₂ : ¬s ∈ maximalIdeal R ^ Nat.find this\n⊢ False\n[PROOFSTEP]\napply hs₂\n[GOAL]\ncase h.a.intro.intro\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nI : Ideal R\nhI : I ≠ ⊥\nx : R\nhx : maximalIdeal R = Ideal.span {x}\nhI' : ¬I = ⊤\nH : ∀ (r : R), ¬IsUnit r ↔ x ∣ r\nthis✝ : x ≠ 0\nhx' : Irreducible x\nH' : ∀ (r : R), r ≠ 0 → r ∈ nonunits R → ∃ n, Associated (x ^ n) r\nthis : ∃ n, x ^ n ∈ I\ns : R\nhs₁ : s ∈ I\nhs₂ : ¬s ∈ maximalIdeal R ^ Nat.find this\n⊢ s ∈ maximalIdeal R ^ Nat.find this\n[PROOFSTEP]\nby_cases hs₃ : s = 0\n[GOAL]\ncase pos\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nI : Ideal R\nhI : I ≠ ⊥\nx : R\nhx : maximalIdeal R = Ideal.span {x}\nhI' : ¬I = ⊤\nH : ∀ (r : R), ¬IsUnit r ↔ x ∣ r\nthis✝ : x ≠ 0\nhx' : Irreducible x\nH' : ∀ (r : R), r ≠ 0 → r ∈ nonunits R → ∃ n, Associated (x ^ n) r\nthis : ∃ n, x ^ n ∈ I\ns : R\nhs₁ : s ∈ I\nhs₂ : ¬s ∈ maximalIdeal R ^ Nat.find this\nhs₃ : s = 0\n⊢ s ∈ maximalIdeal R ^ Nat.find this\n[PROOFSTEP]\nrw [hs₃]\n[GOAL]\ncase pos\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nI : Ideal R\nhI : I ≠ ⊥\nx : R\nhx : maximalIdeal R = Ideal.span {x}\nhI' : ¬I = ⊤\nH : ∀ (r : R), ¬IsUnit r ↔ x ∣ r\nthis✝ : x ≠ 0\nhx' : Irreducible x\nH' : ∀ (r : R), r ≠ 0 → r ∈ nonunits R → ∃ n, Associated (x ^ n) r\nthis : ∃ n, x ^ n ∈ I\ns : R\nhs₁ : s ∈ I\nhs₂ : ¬s ∈ maximalIdeal R ^ Nat.find this\nhs₃ : s = 0\n⊢ 0 ∈ maximalIdeal R ^ Nat.find this\n[PROOFSTEP]\nexact zero_mem _\n[GOAL]\ncase neg\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nI : Ideal R\nhI : I ≠ ⊥\nx : R\nhx : maximalIdeal R = Ideal.span {x}\nhI' : ¬I = ⊤\nH : ∀ (r : R), ¬IsUnit r ↔ x ∣ r\nthis✝ : x ≠ 0\nhx' : Irreducible x\nH' : ∀ (r : R), r ≠ 0 → r ∈ nonunits R → ∃ n, Associated (x ^ n) r\nthis : ∃ n, x ^ n ∈ I\ns : R\nhs₁ : s ∈ I\nhs₂ : ¬s ∈ maximalIdeal R ^ Nat.find this\nhs₃ : ¬s = 0\n⊢ s ∈ maximalIdeal R ^ Nat.find this\n[PROOFSTEP]\nobtain ⟨n, u, rfl⟩ := H' s hs₃ (le_maximalIdeal hI' hs₁)\n[GOAL]\ncase neg.intro.intro\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nI : Ideal R\nhI : I ≠ ⊥\nx : R\nhx : maximalIdeal R = Ideal.span {x}\nhI' : ¬I = ⊤\nH : ∀ (r : R), ¬IsUnit r ↔ x ∣ r\nthis✝ : x ≠ 0\nhx' : Irreducible x\nH' : ∀ (r : R), r ≠ 0 → r ∈ nonunits R → ∃ n, Associated (x ^ n) r\nthis : ∃ n, x ^ n ∈ I\nn : ℕ\nu : Rˣ\nhs₁ : x ^ n * ↑u ∈ I\nhs₂ : ¬x ^ n * ↑u ∈ maximalIdeal R ^ Nat.find this\nhs₃ : ¬x ^ n * ↑u = 0\n⊢ x ^ n * ↑u ∈ maximalIdeal R ^ Nat.find this\n[PROOFSTEP]\nrw [mul_comm, Ideal.unit_mul_mem_iff_mem _ u.isUnit] at hs₁ ⊢\n[GOAL]\ncase neg.intro.intro\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nI : Ideal R\nhI : I ≠ ⊥\nx : R\nhx : maximalIdeal R = Ideal.span {x}\nhI' : ¬I = ⊤\nH : ∀ (r : R), ¬IsUnit r ↔ x ∣ r\nthis✝ : x ≠ 0\nhx' : Irreducible x\nH' : ∀ (r : R), r ≠ 0 → r ∈ nonunits R → ∃ n, Associated (x ^ n) r\nthis : ∃ n, x ^ n ∈ I\nn : ℕ\nu : Rˣ\nhs₁ : x ^ n ∈ I\nhs₂ : ¬x ^ n * ↑u ∈ maximalIdeal R ^ Nat.find this\nhs₃ : ¬x ^ n * ↑u = 0\n⊢ x ^ n ∈ maximalIdeal R ^ Nat.find this\n[PROOFSTEP]\napply Ideal.pow_le_pow (Nat.find_min' this hs₁)\n[GOAL]\ncase neg.intro.intro.a\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nI : Ideal R\nhI : I ≠ ⊥\nx : R\nhx : maximalIdeal R = Ideal.span {x}\nhI' : ¬I = ⊤\nH : ∀ (r : R), ¬IsUnit r ↔ x ∣ r\nthis✝ : x ≠ 0\nhx' : Irreducible x\nH' : ∀ (r : R), r ≠ 0 → r ∈ nonunits R → ∃ n, Associated (x ^ n) r\nthis : ∃ n, x ^ n ∈ I\nn : ℕ\nu : Rˣ\nhs₁ : x ^ n ∈ I\nhs₂ : ¬x ^ n * ↑u ∈ maximalIdeal R ^ Nat.find this\nhs₃ : ¬x ^ n * ↑u = 0\n⊢ x ^ n ∈ maximalIdeal R ^ n\n[PROOFSTEP]\napply Ideal.pow_mem_pow\n[GOAL]\ncase neg.intro.intro.a.hx\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nI : Ideal R\nhI : I ≠ ⊥\nx : R\nhx : maximalIdeal R = Ideal.span {x}\nhI' : ¬I = ⊤\nH : ∀ (r : R), ¬IsUnit r ↔ x ∣ r\nthis✝ : x ≠ 0\nhx' : Irreducible x\nH' : ∀ (r : R), r ≠ 0 → r ∈ nonunits R → ∃ n, Associated (x ^ n) r\nthis : ∃ n, x ^ n ∈ I\nn : ℕ\nu : Rˣ\nhs₁ : x ^ n ∈ I\nhs₂ : ¬x ^ n * ↑u ∈ maximalIdeal R ^ Nat.find this\nhs₃ : ¬x ^ n * ↑u = 0\n⊢ x ∈ maximalIdeal R\n[PROOFSTEP]\nexact (H _).mpr (dvd_refl _)\n[GOAL]\ncase h.a\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nI : Ideal R\nhI : I ≠ ⊥\nx : R\nhx : maximalIdeal R = Ideal.span {x}\nhI' : ¬I = ⊤\nH : ∀ (r : R), ¬IsUnit r ↔ x ∣ r\nthis✝ : x ≠ 0\nhx' : Irreducible x\nH' : ∀ (r : R), r ≠ 0 → r ∈ nonunits R → ∃ n, Associated (x ^ n) r\nthis : ∃ n, x ^ n ∈ I\n⊢ maximalIdeal R ^ Nat.find this ≤ I\n[PROOFSTEP]\nrw [hx, Ideal.span_singleton_pow, Ideal.span_le, Set.singleton_subset_iff]\n[GOAL]\ncase h.a\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nI : Ideal R\nhI : I ≠ ⊥\nx : R\nhx : maximalIdeal R = Ideal.span {x}\nhI' : ¬I = ⊤\nH : ∀ (r : R), ¬IsUnit r ↔ x ∣ r\nthis✝ : x ≠ 0\nhx' : Irreducible x\nH' : ∀ (r : R), r ≠ 0 → r ∈ nonunits R → ∃ n, Associated (x ^ n) r\nthis : ∃ n, x ^ n ∈ I\n⊢ x ^ Nat.find this ∈ ↑I\n[PROOFSTEP]\nexact Nat.find_spec this\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : LocalRing R\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\n⊢ Submodule.IsPrincipal (maximalIdeal R)\n[PROOFSTEP]\nclassical\nby_cases ne_bot : maximalIdeal R = ⊥\n· rw [ne_bot]; infer_instance\nobtain ⟨a, ha₁, ha₂⟩ : ∃ a ∈ maximalIdeal R, a ≠ (0 : R) := by by_contra' h'; apply ne_bot; rwa [eq_bot_iff]\nhave hle : Ideal.span { a } ≤ maximalIdeal R := by rwa [Ideal.span_le, Set.singleton_subset_iff]\nhave : (Ideal.span { a }).radical = maximalIdeal R :=\n  by\n  rw [Ideal.radical_eq_sInf]\n  apply le_antisymm\n  · exact sInf_le ⟨hle, inferInstance⟩\n  · refine' le_sInf fun I hI => (eq_maximalIdeal <| hI.2.isMaximal (fun e => ha₂ _)).ge\n    rw [← Ideal.span_singleton_eq_bot, eq_bot_iff, ← e]; exact hI.1\nhave : ∃ n, maximalIdeal R ^ n ≤ Ideal.span { a } := by rw [← this]; apply Ideal.exists_radical_pow_le_of_fg;\n  exact IsNoetherian.noetherian _\ncases' hn : Nat.find this with n\n· have := Nat.find_spec this\n  rw [hn, pow_zero, Ideal.one_eq_top] at this \n  exact (Ideal.IsMaximal.ne_top inferInstance (eq_top_iff.mpr <| this.trans hle)).elim\nobtain ⟨b, hb₁, hb₂⟩ : ∃ b ∈ maximalIdeal R ^ n, ¬b ∈ Ideal.span { a } := by by_contra' h'; rw [Nat.find_eq_iff] at hn ;\n  exact hn.2 n n.lt_succ_self fun x hx => h' x hx\nhave hb₃ : ∀ m ∈ maximalIdeal R, ∃ k : R, k * a = b * m :=\n  by\n  intro m hm; rw [← Ideal.mem_span_singleton']; apply Nat.find_spec this\n  rw [hn, pow_succ']; exact Ideal.mul_mem_mul hb₁ hm\nhave hb₄ : b ≠ 0 := by rintro rfl; apply hb₂; exact zero_mem _\nlet K := FractionRing R\nlet x : K := algebraMap R K b / algebraMap R K a\nlet M := Submodule.map (Algebra.linearMap R K) (maximalIdeal R)\nhave ha₃ : algebraMap R K a ≠ 0 := IsFractionRing.to_map_eq_zero_iff.not.mpr ha₂\nby_cases hx : ∀ y ∈ M, x * y ∈ M\n· have := isIntegral_of_smul_mem_submodule M ?_ ?_ x hx\n  · obtain ⟨y, e⟩ := IsIntegrallyClosed.algebraMap_eq_of_integral this\n    refine' (hb₂ (Ideal.mem_span_singleton'.mpr ⟨y, _⟩)).elim\n    apply IsFractionRing.injective R K\n    rw [map_mul, e, div_mul_cancel _ ha₃]\n  · rw [Submodule.ne_bot_iff]; refine' ⟨_, ⟨a, ha₁, rfl⟩, _⟩\n    exact (IsFractionRing.to_map_eq_zero_iff (K := K)).not.mpr ha₂\n  · apply Submodule.FG.map; exact IsNoetherian.noetherian _\n· have : (M.map (DistribMulAction.toLinearMap R K x)).comap (Algebra.linearMap R K) = ⊤ :=\n    by\n    by_contra h; apply hx\n    rintro m' ⟨m, hm, rfl : algebraMap R K m = m'⟩\n    obtain ⟨k, hk⟩ := hb₃ m hm\n    have hk' : x * algebraMap R K m = algebraMap R K k := by\n      rw [← mul_div_right_comm, ← map_mul, ← hk, map_mul, mul_div_cancel _ ha₃]\n    exact ⟨k, le_maximalIdeal h ⟨_, ⟨_, hm, rfl⟩, hk'⟩, hk'.symm⟩\n  obtain ⟨y, hy₁, hy₂⟩ : ∃ y ∈ maximalIdeal R, b * y = a :=\n    by\n    rw [Ideal.eq_top_iff_one, Submodule.mem_comap] at this \n    obtain ⟨_, ⟨y, hy, rfl⟩, hy' : x * algebraMap R K y = algebraMap R K 1⟩ := this\n    rw [map_one, ← mul_div_right_comm, div_eq_one_iff_eq ha₃, ← map_mul] at hy' \n    exact ⟨y, hy, IsFractionRing.injective R K hy'⟩\n  refine' ⟨⟨y, _⟩⟩\n  apply le_antisymm\n  · intro m hm; obtain ⟨k, hk⟩ := hb₃ m hm; rw [← hy₂, mul_comm, mul_assoc] at hk \n    rw [← mul_left_cancel₀ hb₄ hk, mul_comm]; exact Ideal.mem_span_singleton'.mpr ⟨_, rfl⟩\n  · rwa [Submodule.span_le, Set.singleton_subset_iff]\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : LocalRing R\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\n⊢ Submodule.IsPrincipal (maximalIdeal R)\n[PROOFSTEP]\nby_cases ne_bot : maximalIdeal R = ⊥\n[GOAL]\ncase pos\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : LocalRing R\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nne_bot : maximalIdeal R = ⊥\n⊢ Submodule.IsPrincipal (maximalIdeal R)\n[PROOFSTEP]\nrw [ne_bot]\n[GOAL]\ncase pos\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : LocalRing R\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nne_bot : maximalIdeal R = ⊥\n⊢ Submodule.IsPrincipal ⊥\n[PROOFSTEP]\ninfer_instance\n[GOAL]\ncase neg\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : LocalRing R\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nne_bot : ¬maximalIdeal R = ⊥\n⊢ Submodule.IsPrincipal (maximalIdeal R)\n[PROOFSTEP]\nobtain ⟨a, ha₁, ha₂⟩ : ∃ a ∈ maximalIdeal R, a ≠ (0 : R) := by by_contra' h'; apply ne_bot; rwa [eq_bot_iff]\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : LocalRing R\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nne_bot : ¬maximalIdeal R = ⊥\n⊢ ∃ a, a ∈ maximalIdeal R ∧ a ≠ 0\n[PROOFSTEP]\nby_contra' h'\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : LocalRing R\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nne_bot : ¬maximalIdeal R = ⊥\nh' : ∀ (a : R), a ∈ maximalIdeal R → a = 0\n⊢ False\n[PROOFSTEP]\napply ne_bot\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : LocalRing R\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nne_bot : ¬maximalIdeal R = ⊥\nh' : ∀ (a : R), a ∈ maximalIdeal R → a = 0\n⊢ maximalIdeal R = ⊥\n[PROOFSTEP]\nrwa [eq_bot_iff]\n[GOAL]\ncase neg.intro.intro\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : LocalRing R\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nne_bot : ¬maximalIdeal R = ⊥\na : R\nha₁ : a ∈ maximalIdeal R\nha₂ : a ≠ 0\n⊢ Submodule.IsPrincipal (maximalIdeal R)\n[PROOFSTEP]\nhave hle : Ideal.span { a } ≤ maximalIdeal R := by rwa [Ideal.span_le, Set.singleton_subset_iff]\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : LocalRing R\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nne_bot : ¬maximalIdeal R = ⊥\na : R\nha₁ : a ∈ maximalIdeal R\nha₂ : a ≠ 0\n⊢ Ideal.span {a} ≤ maximalIdeal R\n[PROOFSTEP]\nrwa [Ideal.span_le, Set.singleton_subset_iff]\n[GOAL]\ncase neg.intro.intro\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : LocalRing R\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nne_bot : ¬maximalIdeal R = ⊥\na : R\nha₁ : a ∈ maximalIdeal R\nha₂ : a ≠ 0\nhle : Ideal.span {a} ≤ maximalIdeal R\n⊢ Submodule.IsPrincipal (maximalIdeal R)\n[PROOFSTEP]\nhave : (Ideal.span { a }).radical = maximalIdeal R :=\n  by\n  rw [Ideal.radical_eq_sInf]\n  apply le_antisymm\n  · exact sInf_le ⟨hle, inferInstance⟩\n  · refine' le_sInf fun I hI => (eq_maximalIdeal <| hI.2.isMaximal (fun e => ha₂ _)).ge\n    rw [← Ideal.span_singleton_eq_bot, eq_bot_iff, ← e]; exact hI.1\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : LocalRing R\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nne_bot : ¬maximalIdeal R = ⊥\na : R\nha₁ : a ∈ maximalIdeal R\nha₂ : a ≠ 0\nhle : Ideal.span {a} ≤ maximalIdeal R\n⊢ Ideal.radical (Ideal.span {a}) = maximalIdeal R\n[PROOFSTEP]\nrw [Ideal.radical_eq_sInf]\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : LocalRing R\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nne_bot : ¬maximalIdeal R = ⊥\na : R\nha₁ : a ∈ maximalIdeal R\nha₂ : a ≠ 0\nhle : Ideal.span {a} ≤ maximalIdeal R\n⊢ sInf {J | Ideal.span {a} ≤ J ∧ Ideal.IsPrime J} = maximalIdeal R\n[PROOFSTEP]\napply le_antisymm\n[GOAL]\ncase a\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : LocalRing R\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nne_bot : ¬maximalIdeal R = ⊥\na : R\nha₁ : a ∈ maximalIdeal R\nha₂ : a ≠ 0\nhle : Ideal.span {a} ≤ maximalIdeal R\n⊢ sInf {J | Ideal.span {a} ≤ J ∧ Ideal.IsPrime J} ≤ maximalIdeal R\n[PROOFSTEP]\nexact sInf_le ⟨hle, inferInstance⟩\n[GOAL]\ncase a\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : LocalRing R\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nne_bot : ¬maximalIdeal R = ⊥\na : R\nha₁ : a ∈ maximalIdeal R\nha₂ : a ≠ 0\nhle : Ideal.span {a} ≤ maximalIdeal R\n⊢ maximalIdeal R ≤ sInf {J | Ideal.span {a} ≤ J ∧ Ideal.IsPrime J}\n[PROOFSTEP]\nrefine' le_sInf fun I hI => (eq_maximalIdeal <| hI.2.isMaximal (fun e => ha₂ _)).ge\n[GOAL]\ncase a\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : LocalRing R\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nne_bot : ¬maximalIdeal R = ⊥\na : R\nha₁ : a ∈ maximalIdeal R\nha₂ : a ≠ 0\nhle : Ideal.span {a} ≤ maximalIdeal R\nI : Ideal R\nhI : I ∈ {J | Ideal.span {a} ≤ J ∧ Ideal.IsPrime J}\ne : I = ⊥\n⊢ a = 0\n[PROOFSTEP]\nrw [← Ideal.span_singleton_eq_bot, eq_bot_iff, ← e]\n[GOAL]\ncase a\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : LocalRing R\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nne_bot : ¬maximalIdeal R = ⊥\na : R\nha₁ : a ∈ maximalIdeal R\nha₂ : a ≠ 0\nhle : Ideal.span {a} ≤ maximalIdeal R\nI : Ideal R\nhI : I ∈ {J | Ideal.span {a} ≤ J ∧ Ideal.IsPrime J}\ne : I = ⊥\n⊢ Ideal.span {a} ≤ I\n[PROOFSTEP]\nexact hI.1\n[GOAL]\ncase neg.intro.intro\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : LocalRing R\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nne_bot : ¬maximalIdeal R = ⊥\na : R\nha₁ : a ∈ maximalIdeal R\nha₂ : a ≠ 0\nhle : Ideal.span {a} ≤ maximalIdeal R\nthis : Ideal.radical (Ideal.span {a}) = maximalIdeal R\n⊢ Submodule.IsPrincipal (maximalIdeal R)\n[PROOFSTEP]\nhave : ∃ n, maximalIdeal R ^ n ≤ Ideal.span { a } := by rw [← this]; apply Ideal.exists_radical_pow_le_of_fg;\n  exact IsNoetherian.noetherian _\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : LocalRing R\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nne_bot : ¬maximalIdeal R = ⊥\na : R\nha₁ : a ∈ maximalIdeal R\nha₂ : a ≠ 0\nhle : Ideal.span {a} ≤ maximalIdeal R\nthis : Ideal.radical (Ideal.span {a}) = maximalIdeal R\n⊢ ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}\n[PROOFSTEP]\nrw [← this]\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : LocalRing R\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nne_bot : ¬maximalIdeal R = ⊥\na : R\nha₁ : a ∈ maximalIdeal R\nha₂ : a ≠ 0\nhle : Ideal.span {a} ≤ maximalIdeal R\nthis : Ideal.radical (Ideal.span {a}) = maximalIdeal R\n⊢ ∃ n, Ideal.radical (Ideal.span {a}) ^ n ≤ Ideal.span {a}\n[PROOFSTEP]\napply Ideal.exists_radical_pow_le_of_fg\n[GOAL]\ncase h\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : LocalRing R\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nne_bot : ¬maximalIdeal R = ⊥\na : R\nha₁ : a ∈ maximalIdeal R\nha₂ : a ≠ 0\nhle : Ideal.span {a} ≤ maximalIdeal R\nthis : Ideal.radical (Ideal.span {a}) = maximalIdeal R\n⊢ Ideal.FG (Ideal.radical (Ideal.span {a}))\n[PROOFSTEP]\nexact IsNoetherian.noetherian _\n[GOAL]\ncase neg.intro.intro\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : LocalRing R\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nne_bot : ¬maximalIdeal R = ⊥\na : R\nha₁ : a ∈ maximalIdeal R\nha₂ : a ≠ 0\nhle : Ideal.span {a} ≤ maximalIdeal R\nthis✝ : Ideal.radical (Ideal.span {a}) = maximalIdeal R\nthis : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}\n⊢ Submodule.IsPrincipal (maximalIdeal R)\n[PROOFSTEP]\ncases' hn : Nat.find this with n\n[GOAL]\ncase neg.intro.intro.zero\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : LocalRing R\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nne_bot : ¬maximalIdeal R = ⊥\na : R\nha₁ : a ∈ maximalIdeal R\nha₂ : a ≠ 0\nhle : Ideal.span {a} ≤ maximalIdeal R\nthis✝ : Ideal.radical (Ideal.span {a}) = maximalIdeal R\nthis : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}\nhn : Nat.find this = Nat.zero\n⊢ Submodule.IsPrincipal (maximalIdeal R)\n[PROOFSTEP]\nhave := Nat.find_spec this\n[GOAL]\ncase neg.intro.intro.zero\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : LocalRing R\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nne_bot : ¬maximalIdeal R = ⊥\na : R\nha₁ : a ∈ maximalIdeal R\nha₂ : a ≠ 0\nhle : Ideal.span {a} ≤ maximalIdeal R\nthis✝¹ : Ideal.radical (Ideal.span {a}) = maximalIdeal R\nthis✝ : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}\nhn : Nat.find this✝ = Nat.zero\nthis : maximalIdeal R ^ Nat.find this✝ ≤ Ideal.span {a}\n⊢ Submodule.IsPrincipal (maximalIdeal R)\n[PROOFSTEP]\nrw [hn, pow_zero, Ideal.one_eq_top] at this \n[GOAL]\ncase neg.intro.intro.zero\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : LocalRing R\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nne_bot : ¬maximalIdeal R = ⊥\na : R\nha₁ : a ∈ maximalIdeal R\nha₂ : a ≠ 0\nhle : Ideal.span {a} ≤ maximalIdeal R\nthis✝¹ : Ideal.radical (Ideal.span {a}) = maximalIdeal R\nthis✝ : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}\nhn : Nat.find this✝ = Nat.zero\nthis : ⊤ ≤ Ideal.span {a}\n⊢ Submodule.IsPrincipal (maximalIdeal R)\n[PROOFSTEP]\nexact (Ideal.IsMaximal.ne_top inferInstance (eq_top_iff.mpr <| this.trans hle)).elim\n[GOAL]\ncase neg.intro.intro.succ\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : LocalRing R\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nne_bot : ¬maximalIdeal R = ⊥\na : R\nha₁ : a ∈ maximalIdeal R\nha₂ : a ≠ 0\nhle : Ideal.span {a} ≤ maximalIdeal R\nthis✝ : Ideal.radical (Ideal.span {a}) = maximalIdeal R\nthis : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}\nn : ℕ\nhn : Nat.find this = Nat.succ n\n⊢ Submodule.IsPrincipal (maximalIdeal R)\n[PROOFSTEP]\nobtain ⟨b, hb₁, hb₂⟩ : ∃ b ∈ maximalIdeal R ^ n, ¬b ∈ Ideal.span { a } := by by_contra' h'; rw [Nat.find_eq_iff] at hn ;\n  exact hn.2 n n.lt_succ_self fun x hx => h' x hx\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : LocalRing R\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nne_bot : ¬maximalIdeal R = ⊥\na : R\nha₁ : a ∈ maximalIdeal R\nha₂ : a ≠ 0\nhle : Ideal.span {a} ≤ maximalIdeal R\nthis✝ : Ideal.radical (Ideal.span {a}) = maximalIdeal R\nthis : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}\nn : ℕ\nhn : Nat.find this = Nat.succ n\n⊢ ∃ b, b ∈ maximalIdeal R ^ n ∧ ¬b ∈ Ideal.span {a}\n[PROOFSTEP]\nby_contra' h'\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : LocalRing R\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nne_bot : ¬maximalIdeal R = ⊥\na : R\nha₁ : a ∈ maximalIdeal R\nha₂ : a ≠ 0\nhle : Ideal.span {a} ≤ maximalIdeal R\nthis✝ : Ideal.radical (Ideal.span {a}) = maximalIdeal R\nthis : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}\nn : ℕ\nhn : Nat.find this = Nat.succ n\nh' : ∀ (b : R), b ∈ maximalIdeal R ^ n → b ∈ Ideal.span {a}\n⊢ False\n[PROOFSTEP]\nrw [Nat.find_eq_iff] at hn \n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : LocalRing R\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nne_bot : ¬maximalIdeal R = ⊥\na : R\nha₁ : a ∈ maximalIdeal R\nha₂ : a ≠ 0\nhle : Ideal.span {a} ≤ maximalIdeal R\nthis✝ : Ideal.radical (Ideal.span {a}) = maximalIdeal R\nthis : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}\nn : ℕ\nhn :\n  maximalIdeal R ^ Nat.succ n ≤ Ideal.span {a} ∧ ∀ (n_1 : ℕ), n_1 < Nat.succ n → ¬maximalIdeal R ^ n_1 ≤ Ideal.span {a}\nh' : ∀ (b : R), b ∈ maximalIdeal R ^ n → b ∈ Ideal.span {a}\n⊢ False\n[PROOFSTEP]\nexact hn.2 n n.lt_succ_self fun x hx => h' x hx\n[GOAL]\ncase neg.intro.intro.succ.intro.intro\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : LocalRing R\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nne_bot : ¬maximalIdeal R = ⊥\na : R\nha₁ : a ∈ maximalIdeal R\nha₂ : a ≠ 0\nhle : Ideal.span {a} ≤ maximalIdeal R\nthis✝ : Ideal.radical (Ideal.span {a}) = maximalIdeal R\nthis : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}\nn : ℕ\nhn : Nat.find this = Nat.succ n\nb : R\nhb₁ : b ∈ maximalIdeal R ^ n\nhb₂ : ¬b ∈ Ideal.span {a}\n⊢ Submodule.IsPrincipal (maximalIdeal R)\n[PROOFSTEP]\nhave hb₃ : ∀ m ∈ maximalIdeal R, ∃ k : R, k * a = b * m :=\n  by\n  intro m hm; rw [← Ideal.mem_span_singleton']; apply Nat.find_spec this\n  rw [hn, pow_succ']; exact Ideal.mul_mem_mul hb₁ hm\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : LocalRing R\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nne_bot : ¬maximalIdeal R = ⊥\na : R\nha₁ : a ∈ maximalIdeal R\nha₂ : a ≠ 0\nhle : Ideal.span {a} ≤ maximalIdeal R\nthis✝ : Ideal.radical (Ideal.span {a}) = maximalIdeal R\nthis : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}\nn : ℕ\nhn : Nat.find this = Nat.succ n\nb : R\nhb₁ : b ∈ maximalIdeal R ^ n\nhb₂ : ¬b ∈ Ideal.span {a}\n⊢ ∀ (m : R), m ∈ maximalIdeal R → ∃ k, k * a = b * m\n[PROOFSTEP]\nintro m hm\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : LocalRing R\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nne_bot : ¬maximalIdeal R = ⊥\na : R\nha₁ : a ∈ maximalIdeal R\nha₂ : a ≠ 0\nhle : Ideal.span {a} ≤ maximalIdeal R\nthis✝ : Ideal.radical (Ideal.span {a}) = maximalIdeal R\nthis : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}\nn : ℕ\nhn : Nat.find this = Nat.succ n\nb : R\nhb₁ : b ∈ maximalIdeal R ^ n\nhb₂ : ¬b ∈ Ideal.span {a}\nm : R\nhm : m ∈ maximalIdeal R\n⊢ ∃ k, k * a = b * m\n[PROOFSTEP]\nrw [← Ideal.mem_span_singleton']\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : LocalRing R\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nne_bot : ¬maximalIdeal R = ⊥\na : R\nha₁ : a ∈ maximalIdeal R\nha₂ : a ≠ 0\nhle : Ideal.span {a} ≤ maximalIdeal R\nthis✝ : Ideal.radical (Ideal.span {a}) = maximalIdeal R\nthis : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}\nn : ℕ\nhn : Nat.find this = Nat.succ n\nb : R\nhb₁ : b ∈ maximalIdeal R ^ n\nhb₂ : ¬b ∈ Ideal.span {a}\nm : R\nhm : m ∈ maximalIdeal R\n⊢ b * m ∈ Ideal.span {a}\n[PROOFSTEP]\napply Nat.find_spec this\n[GOAL]\ncase a\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : LocalRing R\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nne_bot : ¬maximalIdeal R = ⊥\na : R\nha₁ : a ∈ maximalIdeal R\nha₂ : a ≠ 0\nhle : Ideal.span {a} ≤ maximalIdeal R\nthis✝ : Ideal.radical (Ideal.span {a}) = maximalIdeal R\nthis : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}\nn : ℕ\nhn : Nat.find this = Nat.succ n\nb : R\nhb₁ : b ∈ maximalIdeal R ^ n\nhb₂ : ¬b ∈ Ideal.span {a}\nm : R\nhm : m ∈ maximalIdeal R\n⊢ b * m ∈ maximalIdeal R ^ Nat.find this\n[PROOFSTEP]\nrw [hn, pow_succ']\n[GOAL]\ncase a\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : LocalRing R\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nne_bot : ¬maximalIdeal R = ⊥\na : R\nha₁ : a ∈ maximalIdeal R\nha₂ : a ≠ 0\nhle : Ideal.span {a} ≤ maximalIdeal R\nthis✝ : Ideal.radical (Ideal.span {a}) = maximalIdeal R\nthis : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}\nn : ℕ\nhn : Nat.find this = Nat.succ n\nb : R\nhb₁ : b ∈ maximalIdeal R ^ n\nhb₂ : ¬b ∈ Ideal.span {a}\nm : R\nhm : m ∈ maximalIdeal R\n⊢ b * m ∈ maximalIdeal R ^ n * maximalIdeal R\n[PROOFSTEP]\nexact Ideal.mul_mem_mul hb₁ hm\n[GOAL]\ncase neg.intro.intro.succ.intro.intro\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : LocalRing R\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nne_bot : ¬maximalIdeal R = ⊥\na : R\nha₁ : a ∈ maximalIdeal R\nha₂ : a ≠ 0\nhle : Ideal.span {a} ≤ maximalIdeal R\nthis✝ : Ideal.radical (Ideal.span {a}) = maximalIdeal R\nthis : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}\nn : ℕ\nhn : Nat.find this = Nat.succ n\nb : R\nhb₁ : b ∈ maximalIdeal R ^ n\nhb₂ : ¬b ∈ Ideal.span {a}\nhb₃ : ∀ (m : R), m ∈ maximalIdeal R → ∃ k, k * a = b * m\n⊢ Submodule.IsPrincipal (maximalIdeal R)\n[PROOFSTEP]\nhave hb₄ : b ≠ 0 := by rintro rfl; apply hb₂; exact zero_mem _\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : LocalRing R\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nne_bot : ¬maximalIdeal R = ⊥\na : R\nha₁ : a ∈ maximalIdeal R\nha₂ : a ≠ 0\nhle : Ideal.span {a} ≤ maximalIdeal R\nthis✝ : Ideal.radical (Ideal.span {a}) = maximalIdeal R\nthis : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}\nn : ℕ\nhn : Nat.find this = Nat.succ n\nb : R\nhb₁ : b ∈ maximalIdeal R ^ n\nhb₂ : ¬b ∈ Ideal.span {a}\nhb₃ : ∀ (m : R), m ∈ maximalIdeal R → ∃ k, k * a = b * m\n⊢ b ≠ 0\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : LocalRing R\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nne_bot : ¬maximalIdeal R = ⊥\na : R\nha₁ : a ∈ maximalIdeal R\nha₂ : a ≠ 0\nhle : Ideal.span {a} ≤ maximalIdeal R\nthis✝ : Ideal.radical (Ideal.span {a}) = maximalIdeal R\nthis : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}\nn : ℕ\nhn : Nat.find this = Nat.succ n\nhb₁ : 0 ∈ maximalIdeal R ^ n\nhb₂ : ¬0 ∈ Ideal.span {a}\nhb₃ : ∀ (m : R), m ∈ maximalIdeal R → ∃ k, k * a = 0 * m\n⊢ False\n[PROOFSTEP]\napply hb₂\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : LocalRing R\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nne_bot : ¬maximalIdeal R = ⊥\na : R\nha₁ : a ∈ maximalIdeal R\nha₂ : a ≠ 0\nhle : Ideal.span {a} ≤ maximalIdeal R\nthis✝ : Ideal.radical (Ideal.span {a}) = maximalIdeal R\nthis : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}\nn : ℕ\nhn : Nat.find this = Nat.succ n\nhb₁ : 0 ∈ maximalIdeal R ^ n\nhb₂ : ¬0 ∈ Ideal.span {a}\nhb₃ : ∀ (m : R), m ∈ maximalIdeal R → ∃ k, k * a = 0 * m\n⊢ 0 ∈ Ideal.span {a}\n[PROOFSTEP]\nexact zero_mem _\n[GOAL]\ncase neg.intro.intro.succ.intro.intro\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : LocalRing R\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nne_bot : ¬maximalIdeal R = ⊥\na : R\nha₁ : a ∈ maximalIdeal R\nha₂ : a ≠ 0\nhle : Ideal.span {a} ≤ maximalIdeal R\nthis✝ : Ideal.radical (Ideal.span {a}) = maximalIdeal R\nthis : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}\nn : ℕ\nhn : Nat.find this = Nat.succ n\nb : R\nhb₁ : b ∈ maximalIdeal R ^ n\nhb₂ : ¬b ∈ Ideal.span {a}\nhb₃ : ∀ (m : R), m ∈ maximalIdeal R → ∃ k, k * a = b * m\nhb₄ : b ≠ 0\n⊢ Submodule.IsPrincipal (maximalIdeal R)\n[PROOFSTEP]\nlet K := FractionRing R\n[GOAL]\ncase neg.intro.intro.succ.intro.intro\nR : Type u_1\ninst✝⁶ : CommRing R\nK✝ : Type u_2\ninst✝⁵ : Field K✝\ninst✝⁴ : Algebra R K✝\ninst✝³ : IsFractionRing R K✝\ninst✝² : LocalRing R\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nne_bot : ¬maximalIdeal R = ⊥\na : R\nha₁ : a ∈ maximalIdeal R\nha₂ : a ≠ 0\nhle : Ideal.span {a} ≤ maximalIdeal R\nthis✝ : Ideal.radical (Ideal.span {a}) = maximalIdeal R\nthis : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}\nn : ℕ\nhn : Nat.find this = Nat.succ n\nb : R\nhb₁ : b ∈ maximalIdeal R ^ n\nhb₂ : ¬b ∈ Ideal.span {a}\nhb₃ : ∀ (m : R), m ∈ maximalIdeal R → ∃ k, k * a = b * m\nhb₄ : b ≠ 0\nK : Type u_1 := FractionRing R\n⊢ Submodule.IsPrincipal (maximalIdeal R)\n[PROOFSTEP]\nlet x : K := algebraMap R K b / algebraMap R K a\n[GOAL]\ncase neg.intro.intro.succ.intro.intro\nR : Type u_1\ninst✝⁶ : CommRing R\nK✝ : Type u_2\ninst✝⁵ : Field K✝\ninst✝⁴ : Algebra R K✝\ninst✝³ : IsFractionRing R K✝\ninst✝² : LocalRing R\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nne_bot : ¬maximalIdeal R = ⊥\na : R\nha₁ : a ∈ maximalIdeal R\nha₂ : a ≠ 0\nhle : Ideal.span {a} ≤ maximalIdeal R\nthis✝ : Ideal.radical (Ideal.span {a}) = maximalIdeal R\nthis : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}\nn : ℕ\nhn : Nat.find this = Nat.succ n\nb : R\nhb₁ : b ∈ maximalIdeal R ^ n\nhb₂ : ¬b ∈ Ideal.span {a}\nhb₃ : ∀ (m : R), m ∈ maximalIdeal R → ∃ k, k * a = b * m\nhb₄ : b ≠ 0\nK : Type u_1 := FractionRing R\nx : K := ↑(algebraMap R K) b / ↑(algebraMap R K) a\n⊢ Submodule.IsPrincipal (maximalIdeal R)\n[PROOFSTEP]\nlet M := Submodule.map (Algebra.linearMap R K) (maximalIdeal R)\n[GOAL]\ncase neg.intro.intro.succ.intro.intro\nR : Type u_1\ninst✝⁶ : CommRing R\nK✝ : Type u_2\ninst✝⁵ : Field K✝\ninst✝⁴ : Algebra R K✝\ninst✝³ : IsFractionRing R K✝\ninst✝² : LocalRing R\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nne_bot : ¬maximalIdeal R = ⊥\na : R\nha₁ : a ∈ maximalIdeal R\nha₂ : a ≠ 0\nhle : Ideal.span {a} ≤ maximalIdeal R\nthis✝ : Ideal.radical (Ideal.span {a}) = maximalIdeal R\nthis : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}\nn : ℕ\nhn : Nat.find this = Nat.succ n\nb : R\nhb₁ : b ∈ maximalIdeal R ^ n\nhb₂ : ¬b ∈ Ideal.span {a}\nhb₃ : ∀ (m : R), m ∈ maximalIdeal R → ∃ k, k * a = b * m\nhb₄ : b ≠ 0\nK : Type u_1 := FractionRing R\nx : K := ↑(algebraMap R K) b / ↑(algebraMap R K) a\nM : Submodule R K := Submodule.map (Algebra.linearMap R K) (maximalIdeal R)\n⊢ Submodule.IsPrincipal (maximalIdeal R)\n[PROOFSTEP]\nhave ha₃ : algebraMap R K a ≠ 0 := IsFractionRing.to_map_eq_zero_iff.not.mpr ha₂\n[GOAL]\ncase neg.intro.intro.succ.intro.intro\nR : Type u_1\ninst✝⁶ : CommRing R\nK✝ : Type u_2\ninst✝⁵ : Field K✝\ninst✝⁴ : Algebra R K✝\ninst✝³ : IsFractionRing R K✝\ninst✝² : LocalRing R\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nne_bot : ¬maximalIdeal R = ⊥\na : R\nha₁ : a ∈ maximalIdeal R\nha₂ : a ≠ 0\nhle : Ideal.span {a} ≤ maximalIdeal R\nthis✝ : Ideal.radical (Ideal.span {a}) = maximalIdeal R\nthis : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}\nn : ℕ\nhn : Nat.find this = Nat.succ n\nb : R\nhb₁ : b ∈ maximalIdeal R ^ n\nhb₂ : ¬b ∈ Ideal.span {a}\nhb₃ : ∀ (m : R), m ∈ maximalIdeal R → ∃ k, k * a = b * m\nhb₄ : b ≠ 0\nK : Type u_1 := FractionRing R\nx : K := ↑(algebraMap R K) b / ↑(algebraMap R K) a\nM : Submodule R K := Submodule.map (Algebra.linearMap R K) (maximalIdeal R)\nha₃ : ↑(algebraMap R K) a ≠ 0\n⊢ Submodule.IsPrincipal (maximalIdeal R)\n[PROOFSTEP]\nby_cases hx : ∀ y ∈ M, x * y ∈ M\n[GOAL]\ncase pos\nR : Type u_1\ninst✝⁶ : CommRing R\nK✝ : Type u_2\ninst✝⁵ : Field K✝\ninst✝⁴ : Algebra R K✝\ninst✝³ : IsFractionRing R K✝\ninst✝² : LocalRing R\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nne_bot : ¬maximalIdeal R = ⊥\na : R\nha₁ : a ∈ maximalIdeal R\nha₂ : a ≠ 0\nhle : Ideal.span {a} ≤ maximalIdeal R\nthis✝ : Ideal.radical (Ideal.span {a}) = maximalIdeal R\nthis : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}\nn : ℕ\nhn : Nat.find this = Nat.succ n\nb : R\nhb₁ : b ∈ maximalIdeal R ^ n\nhb₂ : ¬b ∈ Ideal.span {a}\nhb₃ : ∀ (m : R), m ∈ maximalIdeal R → ∃ k, k * a = b * m\nhb₄ : b ≠ 0\nK : Type u_1 := FractionRing R\nx : K := ↑(algebraMap R K) b / ↑(algebraMap R K) a\nM : Submodule R K := Submodule.map (Algebra.linearMap R K) (maximalIdeal R)\nha₃ : ↑(algebraMap R K) a ≠ 0\nhx : ∀ (y : K), y ∈ M → x * y ∈ M\n⊢ Submodule.IsPrincipal (maximalIdeal R)\n[PROOFSTEP]\nhave := isIntegral_of_smul_mem_submodule M ?_ ?_ x hx\n[GOAL]\ncase pos.refine_3\nR : Type u_1\ninst✝⁶ : CommRing R\nK✝ : Type u_2\ninst✝⁵ : Field K✝\ninst✝⁴ : Algebra R K✝\ninst✝³ : IsFractionRing R K✝\ninst✝² : LocalRing R\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nne_bot : ¬maximalIdeal R = ⊥\na : R\nha₁ : a ∈ maximalIdeal R\nha₂ : a ≠ 0\nhle : Ideal.span {a} ≤ maximalIdeal R\nthis✝¹ : Ideal.radical (Ideal.span {a}) = maximalIdeal R\nthis✝ : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}\nn : ℕ\nhn : Nat.find this✝ = Nat.succ n\nb : R\nhb₁ : b ∈ maximalIdeal R ^ n\nhb₂ : ¬b ∈ Ideal.span {a}\nhb₃ : ∀ (m : R), m ∈ maximalIdeal R → ∃ k, k * a = b * m\nhb₄ : b ≠ 0\nK : Type u_1 := FractionRing R\nx : K := ↑(algebraMap R K) b / ↑(algebraMap R K) a\nM : Submodule R K := Submodule.map (Algebra.linearMap R K) (maximalIdeal R)\nha₃ : ↑(algebraMap R K) a ≠ 0\nhx : ∀ (y : K), y ∈ M → x * y ∈ M\nthis : IsIntegral R x\n⊢ Submodule.IsPrincipal (maximalIdeal R)\n[PROOFSTEP]\nobtain ⟨y, e⟩ := IsIntegrallyClosed.algebraMap_eq_of_integral this\n[GOAL]\ncase pos.refine_3.intro\nR : Type u_1\ninst✝⁶ : CommRing R\nK✝ : Type u_2\ninst✝⁵ : Field K✝\ninst✝⁴ : Algebra R K✝\ninst✝³ : IsFractionRing R K✝\ninst✝² : LocalRing R\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nne_bot : ¬maximalIdeal R = ⊥\na : R\nha₁ : a ∈ maximalIdeal R\nha₂ : a ≠ 0\nhle : Ideal.span {a} ≤ maximalIdeal R\nthis✝¹ : Ideal.radical (Ideal.span {a}) = maximalIdeal R\nthis✝ : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}\nn : ℕ\nhn : Nat.find this✝ = Nat.succ n\nb : R\nhb₁ : b ∈ maximalIdeal R ^ n\nhb₂ : ¬b ∈ Ideal.span {a}\nhb₃ : ∀ (m : R), m ∈ maximalIdeal R → ∃ k, k * a = b * m\nhb₄ : b ≠ 0\nK : Type u_1 := FractionRing R\nx : K := ↑(algebraMap R K) b / ↑(algebraMap R K) a\nM : Submodule R K := Submodule.map (Algebra.linearMap R K) (maximalIdeal R)\nha₃ : ↑(algebraMap R K) a ≠ 0\nhx : ∀ (y : K), y ∈ M → x * y ∈ M\nthis : IsIntegral R x\ny : R\ne : ↑(algebraMap R (FractionRing R)) y = x\n⊢ Submodule.IsPrincipal (maximalIdeal R)\n[PROOFSTEP]\nrefine' (hb₂ (Ideal.mem_span_singleton'.mpr ⟨y, _⟩)).elim\n[GOAL]\ncase pos.refine_3.intro\nR : Type u_1\ninst✝⁶ : CommRing R\nK✝ : Type u_2\ninst✝⁵ : Field K✝\ninst✝⁴ : Algebra R K✝\ninst✝³ : IsFractionRing R K✝\ninst✝² : LocalRing R\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nne_bot : ¬maximalIdeal R = ⊥\na : R\nha₁ : a ∈ maximalIdeal R\nha₂ : a ≠ 0\nhle : Ideal.span {a} ≤ maximalIdeal R\nthis✝¹ : Ideal.radical (Ideal.span {a}) = maximalIdeal R\nthis✝ : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}\nn : ℕ\nhn : Nat.find this✝ = Nat.succ n\nb : R\nhb₁ : b ∈ maximalIdeal R ^ n\nhb₂ : ¬b ∈ Ideal.span {a}\nhb₃ : ∀ (m : R), m ∈ maximalIdeal R → ∃ k, k * a = b * m\nhb₄ : b ≠ 0\nK : Type u_1 := FractionRing R\nx : K := ↑(algebraMap R K) b / ↑(algebraMap R K) a\nM : Submodule R K := Submodule.map (Algebra.linearMap R K) (maximalIdeal R)\nha₃ : ↑(algebraMap R K) a ≠ 0\nhx : ∀ (y : K), y ∈ M → x * y ∈ M\nthis : IsIntegral R x\ny : R\ne : ↑(algebraMap R (FractionRing R)) y = x\n⊢ y * a = b\n[PROOFSTEP]\napply IsFractionRing.injective R K\n[GOAL]\ncase pos.refine_3.intro.a\nR : Type u_1\ninst✝⁶ : CommRing R\nK✝ : Type u_2\ninst✝⁵ : Field K✝\ninst✝⁴ : Algebra R K✝\ninst✝³ : IsFractionRing R K✝\ninst✝² : LocalRing R\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nne_bot : ¬maximalIdeal R = ⊥\na : R\nha₁ : a ∈ maximalIdeal R\nha₂ : a ≠ 0\nhle : Ideal.span {a} ≤ maximalIdeal R\nthis✝¹ : Ideal.radical (Ideal.span {a}) = maximalIdeal R\nthis✝ : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}\nn : ℕ\nhn : Nat.find this✝ = Nat.succ n\nb : R\nhb₁ : b ∈ maximalIdeal R ^ n\nhb₂ : ¬b ∈ Ideal.span {a}\nhb₃ : ∀ (m : R), m ∈ maximalIdeal R → ∃ k, k * a = b * m\nhb₄ : b ≠ 0\nK : Type u_1 := FractionRing R\nx : K := ↑(algebraMap R K) b / ↑(algebraMap R K) a\nM : Submodule R K := Submodule.map (Algebra.linearMap R K) (maximalIdeal R)\nha₃ : ↑(algebraMap R K) a ≠ 0\nhx : ∀ (y : K), y ∈ M → x * y ∈ M\nthis : IsIntegral R x\ny : R\ne : ↑(algebraMap R (FractionRing R)) y = x\n⊢ ↑(algebraMap R K) (y * a) = ↑(algebraMap R K) b\n[PROOFSTEP]\nrw [map_mul, e, div_mul_cancel _ ha₃]\n[GOAL]\ncase pos.refine_1\nR : Type u_1\ninst✝⁶ : CommRing R\nK✝ : Type u_2\ninst✝⁵ : Field K✝\ninst✝⁴ : Algebra R K✝\ninst✝³ : IsFractionRing R K✝\ninst✝² : LocalRing R\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nne_bot : ¬maximalIdeal R = ⊥\na : R\nha₁ : a ∈ maximalIdeal R\nha₂ : a ≠ 0\nhle : Ideal.span {a} ≤ maximalIdeal R\nthis✝ : Ideal.radical (Ideal.span {a}) = maximalIdeal R\nthis : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}\nn : ℕ\nhn : Nat.find this = Nat.succ n\nb : R\nhb₁ : b ∈ maximalIdeal R ^ n\nhb₂ : ¬b ∈ Ideal.span {a}\nhb₃ : ∀ (m : R), m ∈ maximalIdeal R → ∃ k, k * a = b * m\nhb₄ : b ≠ 0\nK : Type u_1 := FractionRing R\nx : K := ↑(algebraMap R K) b / ↑(algebraMap R K) a\nM : Submodule R K := Submodule.map (Algebra.linearMap R K) (maximalIdeal R)\nha₃ : ↑(algebraMap R K) a ≠ 0\nhx : ∀ (y : K), y ∈ M → x * y ∈ M\n⊢ M ≠ ⊥\n[PROOFSTEP]\nrw [Submodule.ne_bot_iff]\n[GOAL]\ncase pos.refine_1\nR : Type u_1\ninst✝⁶ : CommRing R\nK✝ : Type u_2\ninst✝⁵ : Field K✝\ninst✝⁴ : Algebra R K✝\ninst✝³ : IsFractionRing R K✝\ninst✝² : LocalRing R\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nne_bot : ¬maximalIdeal R = ⊥\na : R\nha₁ : a ∈ maximalIdeal R\nha₂ : a ≠ 0\nhle : Ideal.span {a} ≤ maximalIdeal R\nthis✝ : Ideal.radical (Ideal.span {a}) = maximalIdeal R\nthis : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}\nn : ℕ\nhn : Nat.find this = Nat.succ n\nb : R\nhb₁ : b ∈ maximalIdeal R ^ n\nhb₂ : ¬b ∈ Ideal.span {a}\nhb₃ : ∀ (m : R), m ∈ maximalIdeal R → ∃ k, k * a = b * m\nhb₄ : b ≠ 0\nK : Type u_1 := FractionRing R\nx : K := ↑(algebraMap R K) b / ↑(algebraMap R K) a\nM : Submodule R K := Submodule.map (Algebra.linearMap R K) (maximalIdeal R)\nha₃ : ↑(algebraMap R K) a ≠ 0\nhx : ∀ (y : K), y ∈ M → x * y ∈ M\n⊢ ∃ x, x ∈ M ∧ x ≠ 0\n[PROOFSTEP]\nrefine' ⟨_, ⟨a, ha₁, rfl⟩, _⟩\n[GOAL]\ncase pos.refine_1\nR : Type u_1\ninst✝⁶ : CommRing R\nK✝ : Type u_2\ninst✝⁵ : Field K✝\ninst✝⁴ : Algebra R K✝\ninst✝³ : IsFractionRing R K✝\ninst✝² : LocalRing R\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nne_bot : ¬maximalIdeal R = ⊥\na : R\nha₁ : a ∈ maximalIdeal R\nha₂ : a ≠ 0\nhle : Ideal.span {a} ≤ maximalIdeal R\nthis✝ : Ideal.radical (Ideal.span {a}) = maximalIdeal R\nthis : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}\nn : ℕ\nhn : Nat.find this = Nat.succ n\nb : R\nhb₁ : b ∈ maximalIdeal R ^ n\nhb₂ : ¬b ∈ Ideal.span {a}\nhb₃ : ∀ (m : R), m ∈ maximalIdeal R → ∃ k, k * a = b * m\nhb₄ : b ≠ 0\nK : Type u_1 := FractionRing R\nx : K := ↑(algebraMap R K) b / ↑(algebraMap R K) a\nM : Submodule R K := Submodule.map (Algebra.linearMap R K) (maximalIdeal R)\nha₃ : ↑(algebraMap R K) a ≠ 0\nhx : ∀ (y : K), y ∈ M → x * y ∈ M\n⊢ ↑(Algebra.linearMap R K) a ≠ 0\n[PROOFSTEP]\nexact (IsFractionRing.to_map_eq_zero_iff (K := K)).not.mpr ha₂\n[GOAL]\ncase pos.refine_2\nR : Type u_1\ninst✝⁶ : CommRing R\nK✝ : Type u_2\ninst✝⁵ : Field K✝\ninst✝⁴ : Algebra R K✝\ninst✝³ : IsFractionRing R K✝\ninst✝² : LocalRing R\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nne_bot : ¬maximalIdeal R = ⊥\na : R\nha₁ : a ∈ maximalIdeal R\nha₂ : a ≠ 0\nhle : Ideal.span {a} ≤ maximalIdeal R\nthis✝ : Ideal.radical (Ideal.span {a}) = maximalIdeal R\nthis : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}\nn : ℕ\nhn : Nat.find this = Nat.succ n\nb : R\nhb₁ : b ∈ maximalIdeal R ^ n\nhb₂ : ¬b ∈ Ideal.span {a}\nhb₃ : ∀ (m : R), m ∈ maximalIdeal R → ∃ k, k * a = b * m\nhb₄ : b ≠ 0\nK : Type u_1 := FractionRing R\nx : K := ↑(algebraMap R K) b / ↑(algebraMap R K) a\nM : Submodule R K := Submodule.map (Algebra.linearMap R K) (maximalIdeal R)\nha₃ : ↑(algebraMap R K) a ≠ 0\nhx : ∀ (y : K), y ∈ M → x * y ∈ M\n⊢ Submodule.FG M\n[PROOFSTEP]\napply Submodule.FG.map\n[GOAL]\ncase pos.refine_2.hs\nR : Type u_1\ninst✝⁶ : CommRing R\nK✝ : Type u_2\ninst✝⁵ : Field K✝\ninst✝⁴ : Algebra R K✝\ninst✝³ : IsFractionRing R K✝\ninst✝² : LocalRing R\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nne_bot : ¬maximalIdeal R = ⊥\na : R\nha₁ : a ∈ maximalIdeal R\nha₂ : a ≠ 0\nhle : Ideal.span {a} ≤ maximalIdeal R\nthis✝ : Ideal.radical (Ideal.span {a}) = maximalIdeal R\nthis : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}\nn : ℕ\nhn : Nat.find this = Nat.succ n\nb : R\nhb₁ : b ∈ maximalIdeal R ^ n\nhb₂ : ¬b ∈ Ideal.span {a}\nhb₃ : ∀ (m : R), m ∈ maximalIdeal R → ∃ k, k * a = b * m\nhb₄ : b ≠ 0\nK : Type u_1 := FractionRing R\nx : K := ↑(algebraMap R K) b / ↑(algebraMap R K) a\nM : Submodule R K := Submodule.map (Algebra.linearMap R K) (maximalIdeal R)\nha₃ : ↑(algebraMap R K) a ≠ 0\nhx : ∀ (y : K), y ∈ M → x * y ∈ M\n⊢ Submodule.FG (maximalIdeal R)\n[PROOFSTEP]\nexact IsNoetherian.noetherian _\n[GOAL]\ncase neg\nR : Type u_1\ninst✝⁶ : CommRing R\nK✝ : Type u_2\ninst✝⁵ : Field K✝\ninst✝⁴ : Algebra R K✝\ninst✝³ : IsFractionRing R K✝\ninst✝² : LocalRing R\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nne_bot : ¬maximalIdeal R = ⊥\na : R\nha₁ : a ∈ maximalIdeal R\nha₂ : a ≠ 0\nhle : Ideal.span {a} ≤ maximalIdeal R\nthis✝ : Ideal.radical (Ideal.span {a}) = maximalIdeal R\nthis : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}\nn : ℕ\nhn : Nat.find this = Nat.succ n\nb : R\nhb₁ : b ∈ maximalIdeal R ^ n\nhb₂ : ¬b ∈ Ideal.span {a}\nhb₃ : ∀ (m : R), m ∈ maximalIdeal R → ∃ k, k * a = b * m\nhb₄ : b ≠ 0\nK : Type u_1 := FractionRing R\nx : K := ↑(algebraMap R K) b / ↑(algebraMap R K) a\nM : Submodule R K := Submodule.map (Algebra.linearMap R K) (maximalIdeal R)\nha₃ : ↑(algebraMap R K) a ≠ 0\nhx : ¬∀ (y : K), y ∈ M → x * y ∈ M\n⊢ Submodule.IsPrincipal (maximalIdeal R)\n[PROOFSTEP]\nhave : (M.map (DistribMulAction.toLinearMap R K x)).comap (Algebra.linearMap R K) = ⊤ :=\n  by\n  by_contra h; apply hx\n  rintro m' ⟨m, hm, rfl : algebraMap R K m = m'⟩\n  obtain ⟨k, hk⟩ := hb₃ m hm\n  have hk' : x * algebraMap R K m = algebraMap R K k := by\n    rw [← mul_div_right_comm, ← map_mul, ← hk, map_mul, mul_div_cancel _ ha₃]\n  exact ⟨k, le_maximalIdeal h ⟨_, ⟨_, hm, rfl⟩, hk'⟩, hk'.symm⟩\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nK✝ : Type u_2\ninst✝⁵ : Field K✝\ninst✝⁴ : Algebra R K✝\ninst✝³ : IsFractionRing R K✝\ninst✝² : LocalRing R\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nne_bot : ¬maximalIdeal R = ⊥\na : R\nha₁ : a ∈ maximalIdeal R\nha₂ : a ≠ 0\nhle : Ideal.span {a} ≤ maximalIdeal R\nthis✝ : Ideal.radical (Ideal.span {a}) = maximalIdeal R\nthis : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}\nn : ℕ\nhn : Nat.find this = Nat.succ n\nb : R\nhb₁ : b ∈ maximalIdeal R ^ n\nhb₂ : ¬b ∈ Ideal.span {a}\nhb₃ : ∀ (m : R), m ∈ maximalIdeal R → ∃ k, k * a = b * m\nhb₄ : b ≠ 0\nK : Type u_1 := FractionRing R\nx : K := ↑(algebraMap R K) b / ↑(algebraMap R K) a\nM : Submodule R K := Submodule.map (Algebra.linearMap R K) (maximalIdeal R)\nha₃ : ↑(algebraMap R K) a ≠ 0\nhx : ¬∀ (y : K), y ∈ M → x * y ∈ M\n⊢ Submodule.comap (Algebra.linearMap R K) (Submodule.map (DistribMulAction.toLinearMap R K x) M) = ⊤\n[PROOFSTEP]\nby_contra h\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nK✝ : Type u_2\ninst✝⁵ : Field K✝\ninst✝⁴ : Algebra R K✝\ninst✝³ : IsFractionRing R K✝\ninst✝² : LocalRing R\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nne_bot : ¬maximalIdeal R = ⊥\na : R\nha₁ : a ∈ maximalIdeal R\nha₂ : a ≠ 0\nhle : Ideal.span {a} ≤ maximalIdeal R\nthis✝ : Ideal.radical (Ideal.span {a}) = maximalIdeal R\nthis : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}\nn : ℕ\nhn : Nat.find this = Nat.succ n\nb : R\nhb₁ : b ∈ maximalIdeal R ^ n\nhb₂ : ¬b ∈ Ideal.span {a}\nhb₃ : ∀ (m : R), m ∈ maximalIdeal R → ∃ k, k * a = b * m\nhb₄ : b ≠ 0\nK : Type u_1 := FractionRing R\nx : K := ↑(algebraMap R K) b / ↑(algebraMap R K) a\nM : Submodule R K := Submodule.map (Algebra.linearMap R K) (maximalIdeal R)\nha₃ : ↑(algebraMap R K) a ≠ 0\nhx : ¬∀ (y : K), y ∈ M → x * y ∈ M\nh : ¬Submodule.comap (Algebra.linearMap R K) (Submodule.map (DistribMulAction.toLinearMap R K x) M) = ⊤\n⊢ False\n[PROOFSTEP]\napply hx\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nK✝ : Type u_2\ninst✝⁵ : Field K✝\ninst✝⁴ : Algebra R K✝\ninst✝³ : IsFractionRing R K✝\ninst✝² : LocalRing R\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nne_bot : ¬maximalIdeal R = ⊥\na : R\nha₁ : a ∈ maximalIdeal R\nha₂ : a ≠ 0\nhle : Ideal.span {a} ≤ maximalIdeal R\nthis✝ : Ideal.radical (Ideal.span {a}) = maximalIdeal R\nthis : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}\nn : ℕ\nhn : Nat.find this = Nat.succ n\nb : R\nhb₁ : b ∈ maximalIdeal R ^ n\nhb₂ : ¬b ∈ Ideal.span {a}\nhb₃ : ∀ (m : R), m ∈ maximalIdeal R → ∃ k, k * a = b * m\nhb₄ : b ≠ 0\nK : Type u_1 := FractionRing R\nx : K := ↑(algebraMap R K) b / ↑(algebraMap R K) a\nM : Submodule R K := Submodule.map (Algebra.linearMap R K) (maximalIdeal R)\nha₃ : ↑(algebraMap R K) a ≠ 0\nhx : ¬∀ (y : K), y ∈ M → x * y ∈ M\nh : ¬Submodule.comap (Algebra.linearMap R K) (Submodule.map (DistribMulAction.toLinearMap R K x) M) = ⊤\n⊢ ∀ (y : K), y ∈ M → x * y ∈ M\n[PROOFSTEP]\nrintro m' ⟨m, hm, rfl : algebraMap R K m = m'⟩\n[GOAL]\ncase intro.intro\nR : Type u_1\ninst✝⁶ : CommRing R\nK✝ : Type u_2\ninst✝⁵ : Field K✝\ninst✝⁴ : Algebra R K✝\ninst✝³ : IsFractionRing R K✝\ninst✝² : LocalRing R\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nne_bot : ¬maximalIdeal R = ⊥\na : R\nha₁ : a ∈ maximalIdeal R\nha₂ : a ≠ 0\nhle : Ideal.span {a} ≤ maximalIdeal R\nthis✝ : Ideal.radical (Ideal.span {a}) = maximalIdeal R\nthis : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}\nn : ℕ\nhn : Nat.find this = Nat.succ n\nb : R\nhb₁ : b ∈ maximalIdeal R ^ n\nhb₂ : ¬b ∈ Ideal.span {a}\nhb₃ : ∀ (m : R), m ∈ maximalIdeal R → ∃ k, k * a = b * m\nhb₄ : b ≠ 0\nK : Type u_1 := FractionRing R\nx : K := ↑(algebraMap R K) b / ↑(algebraMap R K) a\nM : Submodule R K := Submodule.map (Algebra.linearMap R K) (maximalIdeal R)\nha₃ : ↑(algebraMap R K) a ≠ 0\nhx : ¬∀ (y : K), y ∈ M → x * y ∈ M\nh : ¬Submodule.comap (Algebra.linearMap R K) (Submodule.map (DistribMulAction.toLinearMap R K x) M) = ⊤\nm : R\nhm : m ∈ ↑(maximalIdeal R)\n⊢ x * ↑(algebraMap R K) m ∈ M\n[PROOFSTEP]\nobtain ⟨k, hk⟩ := hb₃ m hm\n[GOAL]\ncase intro.intro.intro\nR : Type u_1\ninst✝⁶ : CommRing R\nK✝ : Type u_2\ninst✝⁵ : Field K✝\ninst✝⁴ : Algebra R K✝\ninst✝³ : IsFractionRing R K✝\ninst✝² : LocalRing R\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nne_bot : ¬maximalIdeal R = ⊥\na : R\nha₁ : a ∈ maximalIdeal R\nha₂ : a ≠ 0\nhle : Ideal.span {a} ≤ maximalIdeal R\nthis✝ : Ideal.radical (Ideal.span {a}) = maximalIdeal R\nthis : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}\nn : ℕ\nhn : Nat.find this = Nat.succ n\nb : R\nhb₁ : b ∈ maximalIdeal R ^ n\nhb₂ : ¬b ∈ Ideal.span {a}\nhb₃ : ∀ (m : R), m ∈ maximalIdeal R → ∃ k, k * a = b * m\nhb₄ : b ≠ 0\nK : Type u_1 := FractionRing R\nx : K := ↑(algebraMap R K) b / ↑(algebraMap R K) a\nM : Submodule R K := Submodule.map (Algebra.linearMap R K) (maximalIdeal R)\nha₃ : ↑(algebraMap R K) a ≠ 0\nhx : ¬∀ (y : K), y ∈ M → x * y ∈ M\nh : ¬Submodule.comap (Algebra.linearMap R K) (Submodule.map (DistribMulAction.toLinearMap R K x) M) = ⊤\nm : R\nhm : m ∈ ↑(maximalIdeal R)\nk : R\nhk : k * a = b * m\n⊢ x * ↑(algebraMap R K) m ∈ M\n[PROOFSTEP]\nhave hk' : x * algebraMap R K m = algebraMap R K k := by\n  rw [← mul_div_right_comm, ← map_mul, ← hk, map_mul, mul_div_cancel _ ha₃]\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nK✝ : Type u_2\ninst✝⁵ : Field K✝\ninst✝⁴ : Algebra R K✝\ninst✝³ : IsFractionRing R K✝\ninst✝² : LocalRing R\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nne_bot : ¬maximalIdeal R = ⊥\na : R\nha₁ : a ∈ maximalIdeal R\nha₂ : a ≠ 0\nhle : Ideal.span {a} ≤ maximalIdeal R\nthis✝ : Ideal.radical (Ideal.span {a}) = maximalIdeal R\nthis : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}\nn : ℕ\nhn : Nat.find this = Nat.succ n\nb : R\nhb₁ : b ∈ maximalIdeal R ^ n\nhb₂ : ¬b ∈ Ideal.span {a}\nhb₃ : ∀ (m : R), m ∈ maximalIdeal R → ∃ k, k * a = b * m\nhb₄ : b ≠ 0\nK : Type u_1 := FractionRing R\nx : K := ↑(algebraMap R K) b / ↑(algebraMap R K) a\nM : Submodule R K := Submodule.map (Algebra.linearMap R K) (maximalIdeal R)\nha₃ : ↑(algebraMap R K) a ≠ 0\nhx : ¬∀ (y : K), y ∈ M → x * y ∈ M\nh : ¬Submodule.comap (Algebra.linearMap R K) (Submodule.map (DistribMulAction.toLinearMap R K x) M) = ⊤\nm : R\nhm : m ∈ ↑(maximalIdeal R)\nk : R\nhk : k * a = b * m\n⊢ x * ↑(algebraMap R K) m = ↑(algebraMap R K) k\n[PROOFSTEP]\nrw [← mul_div_right_comm, ← map_mul, ← hk, map_mul, mul_div_cancel _ ha₃]\n[GOAL]\ncase intro.intro.intro\nR : Type u_1\ninst✝⁶ : CommRing R\nK✝ : Type u_2\ninst✝⁵ : Field K✝\ninst✝⁴ : Algebra R K✝\ninst✝³ : IsFractionRing R K✝\ninst✝² : LocalRing R\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nne_bot : ¬maximalIdeal R = ⊥\na : R\nha₁ : a ∈ maximalIdeal R\nha₂ : a ≠ 0\nhle : Ideal.span {a} ≤ maximalIdeal R\nthis✝ : Ideal.radical (Ideal.span {a}) = maximalIdeal R\nthis : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}\nn : ℕ\nhn : Nat.find this = Nat.succ n\nb : R\nhb₁ : b ∈ maximalIdeal R ^ n\nhb₂ : ¬b ∈ Ideal.span {a}\nhb₃ : ∀ (m : R), m ∈ maximalIdeal R → ∃ k, k * a = b * m\nhb₄ : b ≠ 0\nK : Type u_1 := FractionRing R\nx : K := ↑(algebraMap R K) b / ↑(algebraMap R K) a\nM : Submodule R K := Submodule.map (Algebra.linearMap R K) (maximalIdeal R)\nha₃ : ↑(algebraMap R K) a ≠ 0\nhx : ¬∀ (y : K), y ∈ M → x * y ∈ M\nh : ¬Submodule.comap (Algebra.linearMap R K) (Submodule.map (DistribMulAction.toLinearMap R K x) M) = ⊤\nm : R\nhm : m ∈ ↑(maximalIdeal R)\nk : R\nhk : k * a = b * m\nhk' : x * ↑(algebraMap R K) m = ↑(algebraMap R K) k\n⊢ x * ↑(algebraMap R K) m ∈ M\n[PROOFSTEP]\nexact ⟨k, le_maximalIdeal h ⟨_, ⟨_, hm, rfl⟩, hk'⟩, hk'.symm⟩\n[GOAL]\ncase neg\nR : Type u_1\ninst✝⁶ : CommRing R\nK✝ : Type u_2\ninst✝⁵ : Field K✝\ninst✝⁴ : Algebra R K✝\ninst✝³ : IsFractionRing R K✝\ninst✝² : LocalRing R\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nne_bot : ¬maximalIdeal R = ⊥\na : R\nha₁ : a ∈ maximalIdeal R\nha₂ : a ≠ 0\nhle : Ideal.span {a} ≤ maximalIdeal R\nthis✝¹ : Ideal.radical (Ideal.span {a}) = maximalIdeal R\nthis✝ : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}\nn : ℕ\nhn : Nat.find this✝ = Nat.succ n\nb : R\nhb₁ : b ∈ maximalIdeal R ^ n\nhb₂ : ¬b ∈ Ideal.span {a}\nhb₃ : ∀ (m : R), m ∈ maximalIdeal R → ∃ k, k * a = b * m\nhb₄ : b ≠ 0\nK : Type u_1 := FractionRing R\nx : K := ↑(algebraMap R K) b / ↑(algebraMap R K) a\nM : Submodule R K := Submodule.map (Algebra.linearMap R K) (maximalIdeal R)\nha₃ : ↑(algebraMap R K) a ≠ 0\nhx : ¬∀ (y : K), y ∈ M → x * y ∈ M\nthis : Submodule.comap (Algebra.linearMap R K) (Submodule.map (DistribMulAction.toLinearMap R K x) M) = ⊤\n⊢ Submodule.IsPrincipal (maximalIdeal R)\n[PROOFSTEP]\nobtain ⟨y, hy₁, hy₂⟩ : ∃ y ∈ maximalIdeal R, b * y = a :=\n  by\n  rw [Ideal.eq_top_iff_one, Submodule.mem_comap] at this \n  obtain ⟨_, ⟨y, hy, rfl⟩, hy' : x * algebraMap R K y = algebraMap R K 1⟩ := this\n  rw [map_one, ← mul_div_right_comm, div_eq_one_iff_eq ha₃, ← map_mul] at hy' \n  exact ⟨y, hy, IsFractionRing.injective R K hy'⟩\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nK✝ : Type u_2\ninst✝⁵ : Field K✝\ninst✝⁴ : Algebra R K✝\ninst✝³ : IsFractionRing R K✝\ninst✝² : LocalRing R\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nne_bot : ¬maximalIdeal R = ⊥\na : R\nha₁ : a ∈ maximalIdeal R\nha₂ : a ≠ 0\nhle : Ideal.span {a} ≤ maximalIdeal R\nthis✝¹ : Ideal.radical (Ideal.span {a}) = maximalIdeal R\nthis✝ : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}\nn : ℕ\nhn : Nat.find this✝ = Nat.succ n\nb : R\nhb₁ : b ∈ maximalIdeal R ^ n\nhb₂ : ¬b ∈ Ideal.span {a}\nhb₃ : ∀ (m : R), m ∈ maximalIdeal R → ∃ k, k * a = b * m\nhb₄ : b ≠ 0\nK : Type u_1 := FractionRing R\nx : K := ↑(algebraMap R K) b / ↑(algebraMap R K) a\nM : Submodule R K := Submodule.map (Algebra.linearMap R K) (maximalIdeal R)\nha₃ : ↑(algebraMap R K) a ≠ 0\nhx : ¬∀ (y : K), y ∈ M → x * y ∈ M\nthis : Submodule.comap (Algebra.linearMap R K) (Submodule.map (DistribMulAction.toLinearMap R K x) M) = ⊤\n⊢ ∃ y, y ∈ maximalIdeal R ∧ b * y = a\n[PROOFSTEP]\nrw [Ideal.eq_top_iff_one, Submodule.mem_comap] at this \n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nK✝ : Type u_2\ninst✝⁵ : Field K✝\ninst✝⁴ : Algebra R K✝\ninst✝³ : IsFractionRing R K✝\ninst✝² : LocalRing R\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nne_bot : ¬maximalIdeal R = ⊥\na : R\nha₁ : a ∈ maximalIdeal R\nha₂ : a ≠ 0\nhle : Ideal.span {a} ≤ maximalIdeal R\nthis✝¹ : Ideal.radical (Ideal.span {a}) = maximalIdeal R\nthis✝ : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}\nn : ℕ\nhn : Nat.find this✝ = Nat.succ n\nb : R\nhb₁ : b ∈ maximalIdeal R ^ n\nhb₂ : ¬b ∈ Ideal.span {a}\nhb₃ : ∀ (m : R), m ∈ maximalIdeal R → ∃ k, k * a = b * m\nhb₄ : b ≠ 0\nK : Type u_1 := FractionRing R\nx : K := ↑(algebraMap R K) b / ↑(algebraMap R K) a\nM : Submodule R K := Submodule.map (Algebra.linearMap R K) (maximalIdeal R)\nha₃ : ↑(algebraMap R K) a ≠ 0\nhx : ¬∀ (y : K), y ∈ M → x * y ∈ M\nthis : ↑(Algebra.linearMap R K) 1 ∈ Submodule.map (DistribMulAction.toLinearMap R K x) M\n⊢ ∃ y, y ∈ maximalIdeal R ∧ b * y = a\n[PROOFSTEP]\nobtain ⟨_, ⟨y, hy, rfl⟩, hy' : x * algebraMap R K y = algebraMap R K 1⟩ := this\n[GOAL]\ncase intro.intro.intro.intro\nR : Type u_1\ninst✝⁶ : CommRing R\nK✝ : Type u_2\ninst✝⁵ : Field K✝\ninst✝⁴ : Algebra R K✝\ninst✝³ : IsFractionRing R K✝\ninst✝² : LocalRing R\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nne_bot : ¬maximalIdeal R = ⊥\na : R\nha₁ : a ∈ maximalIdeal R\nha₂ : a ≠ 0\nhle : Ideal.span {a} ≤ maximalIdeal R\nthis✝ : Ideal.radical (Ideal.span {a}) = maximalIdeal R\nthis : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}\nn : ℕ\nhn : Nat.find this = Nat.succ n\nb : R\nhb₁ : b ∈ maximalIdeal R ^ n\nhb₂ : ¬b ∈ Ideal.span {a}\nhb₃ : ∀ (m : R), m ∈ maximalIdeal R → ∃ k, k * a = b * m\nhb₄ : b ≠ 0\nK : Type u_1 := FractionRing R\nx : K := ↑(algebraMap R K) b / ↑(algebraMap R K) a\nM : Submodule R K := Submodule.map (Algebra.linearMap R K) (maximalIdeal R)\nha₃ : ↑(algebraMap R K) a ≠ 0\nhx : ¬∀ (y : K), y ∈ M → x * y ∈ M\ny : R\nhy : y ∈ ↑(maximalIdeal R)\nhy' : x * ↑(algebraMap R K) y = ↑(algebraMap R K) 1\n⊢ ∃ y, y ∈ maximalIdeal R ∧ b * y = a\n[PROOFSTEP]\nrw [map_one, ← mul_div_right_comm, div_eq_one_iff_eq ha₃, ← map_mul] at hy' \n[GOAL]\ncase intro.intro.intro.intro\nR : Type u_1\ninst✝⁶ : CommRing R\nK✝ : Type u_2\ninst✝⁵ : Field K✝\ninst✝⁴ : Algebra R K✝\ninst✝³ : IsFractionRing R K✝\ninst✝² : LocalRing R\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nne_bot : ¬maximalIdeal R = ⊥\na : R\nha₁ : a ∈ maximalIdeal R\nha₂ : a ≠ 0\nhle : Ideal.span {a} ≤ maximalIdeal R\nthis✝ : Ideal.radical (Ideal.span {a}) = maximalIdeal R\nthis : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}\nn : ℕ\nhn : Nat.find this = Nat.succ n\nb : R\nhb₁ : b ∈ maximalIdeal R ^ n\nhb₂ : ¬b ∈ Ideal.span {a}\nhb₃ : ∀ (m : R), m ∈ maximalIdeal R → ∃ k, k * a = b * m\nhb₄ : b ≠ 0\nK : Type u_1 := FractionRing R\nx : K := ↑(algebraMap R K) b / ↑(algebraMap R K) a\nM : Submodule R K := Submodule.map (Algebra.linearMap R K) (maximalIdeal R)\nha₃ : ↑(algebraMap R K) a ≠ 0\nhx : ¬∀ (y : K), y ∈ M → x * y ∈ M\ny : R\nhy : y ∈ ↑(maximalIdeal R)\nhy' : ↑(algebraMap R K) (b * y) = ↑(algebraMap R K) a\n⊢ ∃ y, y ∈ maximalIdeal R ∧ b * y = a\n[PROOFSTEP]\nexact ⟨y, hy, IsFractionRing.injective R K hy'⟩\n[GOAL]\ncase neg.intro.intro\nR : Type u_1\ninst✝⁶ : CommRing R\nK✝ : Type u_2\ninst✝⁵ : Field K✝\ninst✝⁴ : Algebra R K✝\ninst✝³ : IsFractionRing R K✝\ninst✝² : LocalRing R\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nne_bot : ¬maximalIdeal R = ⊥\na : R\nha₁ : a ∈ maximalIdeal R\nha₂ : a ≠ 0\nhle : Ideal.span {a} ≤ maximalIdeal R\nthis✝¹ : Ideal.radical (Ideal.span {a}) = maximalIdeal R\nthis✝ : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}\nn : ℕ\nhn : Nat.find this✝ = Nat.succ n\nb : R\nhb₁ : b ∈ maximalIdeal R ^ n\nhb₂ : ¬b ∈ Ideal.span {a}\nhb₃ : ∀ (m : R), m ∈ maximalIdeal R → ∃ k, k * a = b * m\nhb₄ : b ≠ 0\nK : Type u_1 := FractionRing R\nx : K := ↑(algebraMap R K) b / ↑(algebraMap R K) a\nM : Submodule R K := Submodule.map (Algebra.linearMap R K) (maximalIdeal R)\nha₃ : ↑(algebraMap R K) a ≠ 0\nhx : ¬∀ (y : K), y ∈ M → x * y ∈ M\nthis : Submodule.comap (Algebra.linearMap R K) (Submodule.map (DistribMulAction.toLinearMap R K x) M) = ⊤\ny : R\nhy₁ : y ∈ maximalIdeal R\nhy₂ : b * y = a\n⊢ Submodule.IsPrincipal (maximalIdeal R)\n[PROOFSTEP]\nrefine' ⟨⟨y, _⟩⟩\n[GOAL]\ncase neg.intro.intro\nR : Type u_1\ninst✝⁶ : CommRing R\nK✝ : Type u_2\ninst✝⁵ : Field K✝\ninst✝⁴ : Algebra R K✝\ninst✝³ : IsFractionRing R K✝\ninst✝² : LocalRing R\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nne_bot : ¬maximalIdeal R = ⊥\na : R\nha₁ : a ∈ maximalIdeal R\nha₂ : a ≠ 0\nhle : Ideal.span {a} ≤ maximalIdeal R\nthis✝¹ : Ideal.radical (Ideal.span {a}) = maximalIdeal R\nthis✝ : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}\nn : ℕ\nhn : Nat.find this✝ = Nat.succ n\nb : R\nhb₁ : b ∈ maximalIdeal R ^ n\nhb₂ : ¬b ∈ Ideal.span {a}\nhb₃ : ∀ (m : R), m ∈ maximalIdeal R → ∃ k, k * a = b * m\nhb₄ : b ≠ 0\nK : Type u_1 := FractionRing R\nx : K := ↑(algebraMap R K) b / ↑(algebraMap R K) a\nM : Submodule R K := Submodule.map (Algebra.linearMap R K) (maximalIdeal R)\nha₃ : ↑(algebraMap R K) a ≠ 0\nhx : ¬∀ (y : K), y ∈ M → x * y ∈ M\nthis : Submodule.comap (Algebra.linearMap R K) (Submodule.map (DistribMulAction.toLinearMap R K x) M) = ⊤\ny : R\nhy₁ : y ∈ maximalIdeal R\nhy₂ : b * y = a\n⊢ maximalIdeal R = Submodule.span R {y}\n[PROOFSTEP]\napply le_antisymm\n[GOAL]\ncase neg.intro.intro.a\nR : Type u_1\ninst✝⁶ : CommRing R\nK✝ : Type u_2\ninst✝⁵ : Field K✝\ninst✝⁴ : Algebra R K✝\ninst✝³ : IsFractionRing R K✝\ninst✝² : LocalRing R\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nne_bot : ¬maximalIdeal R = ⊥\na : R\nha₁ : a ∈ maximalIdeal R\nha₂ : a ≠ 0\nhle : Ideal.span {a} ≤ maximalIdeal R\nthis✝¹ : Ideal.radical (Ideal.span {a}) = maximalIdeal R\nthis✝ : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}\nn : ℕ\nhn : Nat.find this✝ = Nat.succ n\nb : R\nhb₁ : b ∈ maximalIdeal R ^ n\nhb₂ : ¬b ∈ Ideal.span {a}\nhb₃ : ∀ (m : R), m ∈ maximalIdeal R → ∃ k, k * a = b * m\nhb₄ : b ≠ 0\nK : Type u_1 := FractionRing R\nx : K := ↑(algebraMap R K) b / ↑(algebraMap R K) a\nM : Submodule R K := Submodule.map (Algebra.linearMap R K) (maximalIdeal R)\nha₃ : ↑(algebraMap R K) a ≠ 0\nhx : ¬∀ (y : K), y ∈ M → x * y ∈ M\nthis : Submodule.comap (Algebra.linearMap R K) (Submodule.map (DistribMulAction.toLinearMap R K x) M) = ⊤\ny : R\nhy₁ : y ∈ maximalIdeal R\nhy₂ : b * y = a\n⊢ maximalIdeal R ≤ Submodule.span R {y}\n[PROOFSTEP]\nintro m hm\n[GOAL]\ncase neg.intro.intro.a\nR : Type u_1\ninst✝⁶ : CommRing R\nK✝ : Type u_2\ninst✝⁵ : Field K✝\ninst✝⁴ : Algebra R K✝\ninst✝³ : IsFractionRing R K✝\ninst✝² : LocalRing R\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nne_bot : ¬maximalIdeal R = ⊥\na : R\nha₁ : a ∈ maximalIdeal R\nha₂ : a ≠ 0\nhle : Ideal.span {a} ≤ maximalIdeal R\nthis✝¹ : Ideal.radical (Ideal.span {a}) = maximalIdeal R\nthis✝ : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}\nn : ℕ\nhn : Nat.find this✝ = Nat.succ n\nb : R\nhb₁ : b ∈ maximalIdeal R ^ n\nhb₂ : ¬b ∈ Ideal.span {a}\nhb₃ : ∀ (m : R), m ∈ maximalIdeal R → ∃ k, k * a = b * m\nhb₄ : b ≠ 0\nK : Type u_1 := FractionRing R\nx : K := ↑(algebraMap R K) b / ↑(algebraMap R K) a\nM : Submodule R K := Submodule.map (Algebra.linearMap R K) (maximalIdeal R)\nha₃ : ↑(algebraMap R K) a ≠ 0\nhx : ¬∀ (y : K), y ∈ M → x * y ∈ M\nthis : Submodule.comap (Algebra.linearMap R K) (Submodule.map (DistribMulAction.toLinearMap R K x) M) = ⊤\ny : R\nhy₁ : y ∈ maximalIdeal R\nhy₂ : b * y = a\nm : R\nhm : m ∈ maximalIdeal R\n⊢ m ∈ Submodule.span R {y}\n[PROOFSTEP]\nobtain ⟨k, hk⟩ := hb₃ m hm\n[GOAL]\ncase neg.intro.intro.a.intro\nR : Type u_1\ninst✝⁶ : CommRing R\nK✝ : Type u_2\ninst✝⁵ : Field K✝\ninst✝⁴ : Algebra R K✝\ninst✝³ : IsFractionRing R K✝\ninst✝² : LocalRing R\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nne_bot : ¬maximalIdeal R = ⊥\na : R\nha₁ : a ∈ maximalIdeal R\nha₂ : a ≠ 0\nhle : Ideal.span {a} ≤ maximalIdeal R\nthis✝¹ : Ideal.radical (Ideal.span {a}) = maximalIdeal R\nthis✝ : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}\nn : ℕ\nhn : Nat.find this✝ = Nat.succ n\nb : R\nhb₁ : b ∈ maximalIdeal R ^ n\nhb₂ : ¬b ∈ Ideal.span {a}\nhb₃ : ∀ (m : R), m ∈ maximalIdeal R → ∃ k, k * a = b * m\nhb₄ : b ≠ 0\nK : Type u_1 := FractionRing R\nx : K := ↑(algebraMap R K) b / ↑(algebraMap R K) a\nM : Submodule R K := Submodule.map (Algebra.linearMap R K) (maximalIdeal R)\nha₃ : ↑(algebraMap R K) a ≠ 0\nhx : ¬∀ (y : K), y ∈ M → x * y ∈ M\nthis : Submodule.comap (Algebra.linearMap R K) (Submodule.map (DistribMulAction.toLinearMap R K x) M) = ⊤\ny : R\nhy₁ : y ∈ maximalIdeal R\nhy₂ : b * y = a\nm : R\nhm : m ∈ maximalIdeal R\nk : R\nhk : k * a = b * m\n⊢ m ∈ Submodule.span R {y}\n[PROOFSTEP]\nrw [← hy₂, mul_comm, mul_assoc] at hk \n[GOAL]\ncase neg.intro.intro.a.intro\nR : Type u_1\ninst✝⁶ : CommRing R\nK✝ : Type u_2\ninst✝⁵ : Field K✝\ninst✝⁴ : Algebra R K✝\ninst✝³ : IsFractionRing R K✝\ninst✝² : LocalRing R\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nne_bot : ¬maximalIdeal R = ⊥\na : R\nha₁ : a ∈ maximalIdeal R\nha₂ : a ≠ 0\nhle : Ideal.span {a} ≤ maximalIdeal R\nthis✝¹ : Ideal.radical (Ideal.span {a}) = maximalIdeal R\nthis✝ : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}\nn : ℕ\nhn : Nat.find this✝ = Nat.succ n\nb : R\nhb₁ : b ∈ maximalIdeal R ^ n\nhb₂ : ¬b ∈ Ideal.span {a}\nhb₃ : ∀ (m : R), m ∈ maximalIdeal R → ∃ k, k * a = b * m\nhb₄ : b ≠ 0\nK : Type u_1 := FractionRing R\nx : K := ↑(algebraMap R K) b / ↑(algebraMap R K) a\nM : Submodule R K := Submodule.map (Algebra.linearMap R K) (maximalIdeal R)\nha₃ : ↑(algebraMap R K) a ≠ 0\nhx : ¬∀ (y : K), y ∈ M → x * y ∈ M\nthis : Submodule.comap (Algebra.linearMap R K) (Submodule.map (DistribMulAction.toLinearMap R K x) M) = ⊤\ny : R\nhy₁ : y ∈ maximalIdeal R\nhy₂ : b * y = a\nm : R\nhm : m ∈ maximalIdeal R\nk : R\nhk : b * (y * k) = b * m\n⊢ m ∈ Submodule.span R {y}\n[PROOFSTEP]\nrw [← mul_left_cancel₀ hb₄ hk, mul_comm]\n[GOAL]\ncase neg.intro.intro.a.intro\nR : Type u_1\ninst✝⁶ : CommRing R\nK✝ : Type u_2\ninst✝⁵ : Field K✝\ninst✝⁴ : Algebra R K✝\ninst✝³ : IsFractionRing R K✝\ninst✝² : LocalRing R\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nne_bot : ¬maximalIdeal R = ⊥\na : R\nha₁ : a ∈ maximalIdeal R\nha₂ : a ≠ 0\nhle : Ideal.span {a} ≤ maximalIdeal R\nthis✝¹ : Ideal.radical (Ideal.span {a}) = maximalIdeal R\nthis✝ : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}\nn : ℕ\nhn : Nat.find this✝ = Nat.succ n\nb : R\nhb₁ : b ∈ maximalIdeal R ^ n\nhb₂ : ¬b ∈ Ideal.span {a}\nhb₃ : ∀ (m : R), m ∈ maximalIdeal R → ∃ k, k * a = b * m\nhb₄ : b ≠ 0\nK : Type u_1 := FractionRing R\nx : K := ↑(algebraMap R K) b / ↑(algebraMap R K) a\nM : Submodule R K := Submodule.map (Algebra.linearMap R K) (maximalIdeal R)\nha₃ : ↑(algebraMap R K) a ≠ 0\nhx : ¬∀ (y : K), y ∈ M → x * y ∈ M\nthis : Submodule.comap (Algebra.linearMap R K) (Submodule.map (DistribMulAction.toLinearMap R K x) M) = ⊤\ny : R\nhy₁ : y ∈ maximalIdeal R\nhy₂ : b * y = a\nm : R\nhm : m ∈ maximalIdeal R\nk : R\nhk : b * (y * k) = b * m\n⊢ k * y ∈ Submodule.span R {y}\n[PROOFSTEP]\nexact Ideal.mem_span_singleton'.mpr ⟨_, rfl⟩\n[GOAL]\ncase neg.intro.intro.a\nR : Type u_1\ninst✝⁶ : CommRing R\nK✝ : Type u_2\ninst✝⁵ : Field K✝\ninst✝⁴ : Algebra R K✝\ninst✝³ : IsFractionRing R K✝\ninst✝² : LocalRing R\ninst✝¹ : IsDomain R\ninst✝ : IsDedekindDomain R\nne_bot : ¬maximalIdeal R = ⊥\na : R\nha₁ : a ∈ maximalIdeal R\nha₂ : a ≠ 0\nhle : Ideal.span {a} ≤ maximalIdeal R\nthis✝¹ : Ideal.radical (Ideal.span {a}) = maximalIdeal R\nthis✝ : ∃ n, maximalIdeal R ^ n ≤ Ideal.span {a}\nn : ℕ\nhn : Nat.find this✝ = Nat.succ n\nb : R\nhb₁ : b ∈ maximalIdeal R ^ n\nhb₂ : ¬b ∈ Ideal.span {a}\nhb₃ : ∀ (m : R), m ∈ maximalIdeal R → ∃ k, k * a = b * m\nhb₄ : b ≠ 0\nK : Type u_1 := FractionRing R\nx : K := ↑(algebraMap R K) b / ↑(algebraMap R K) a\nM : Submodule R K := Submodule.map (Algebra.linearMap R K) (maximalIdeal R)\nha₃ : ↑(algebraMap R K) a ≠ 0\nhx : ¬∀ (y : K), y ∈ M → x * y ∈ M\nthis : Submodule.comap (Algebra.linearMap R K) (Submodule.map (DistribMulAction.toLinearMap R K x) M) = ⊤\ny : R\nhy₁ : y ∈ maximalIdeal R\nhy₂ : b * y = a\n⊢ Submodule.span R {y} ≤ maximalIdeal R\n[PROOFSTEP]\nrwa [Submodule.span_le, Set.singleton_subset_iff]\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\n⊢ List.TFAE\n    [DiscreteValuationRing R, ValuationRing R, IsDedekindDomain R, IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P,\n      Submodule.IsPrincipal (maximalIdeal R), FiniteDimensional.finrank (ResidueField R) (CotangentSpace R) = 1,\n      ∀ (I : Ideal R), I ≠ ⊥ → ∃ n, I = maximalIdeal R ^ n]\n[PROOFSTEP]\nhave ne_bot := Ring.ne_bot_of_isMaximal_of_not_isField (maximalIdeal.isMaximal R) h\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\n⊢ List.TFAE\n    [DiscreteValuationRing R, ValuationRing R, IsDedekindDomain R, IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P,\n      Submodule.IsPrincipal (maximalIdeal R), FiniteDimensional.finrank (ResidueField R) (CotangentSpace R) = 1,\n      ∀ (I : Ideal R), I ≠ ⊥ → ∃ n, I = maximalIdeal R ^ n]\n[PROOFSTEP]\nclassical\nrw [finrank_eq_one_iff']\ntfae_have 1 → 2\n· intro; infer_instance\ntfae_have 2 → 1\n· intro\n  haveI := IsBezout.toGCDDomain R\n  haveI : UniqueFactorizationMonoid R := ufm_of_gcd_of_wfDvdMonoid\n  apply DiscreteValuationRing.of_ufd_of_unique_irreducible\n  · obtain ⟨x, hx₁, hx₂⟩ := Ring.exists_not_isUnit_of_not_isField h\n    obtain ⟨p, hp₁, -⟩ := WfDvdMonoid.exists_irreducible_factor hx₂ hx₁\n    exact ⟨p, hp₁⟩\n  · exact ValuationRing.unique_irreducible\ntfae_have 1 → 4\n· intro H\n  exact ⟨inferInstance, ((DiscreteValuationRing.iff_pid_with_one_nonzero_prime R).mp H).2⟩\ntfae_have 4 → 3\n· rintro ⟨h₁, h₂⟩;\n  exact\n    { h₁ with\n      maximalOfPrime := fun hI hI' =>\n        ExistsUnique.unique h₂ ⟨ne_bot, inferInstance⟩ ⟨hI, hI'⟩ ▸ maximalIdeal.isMaximal R, }\ntfae_have 3 → 5\n· intro h; exact maximalIdeal_isPrincipal_of_isDedekindDomain R\ntfae_have 5 → 6\n· rintro ⟨x, hx⟩\n  have : x ∈ maximalIdeal R := by rw [hx]; exact Submodule.subset_span (Set.mem_singleton x)\n  let x' : maximalIdeal R := ⟨x, this⟩\n  use Submodule.Quotient.mk x'\n  constructor\n  swap\n  · intro e\n    rw [Submodule.Quotient.mk_eq_zero] at e \n    apply Ring.ne_bot_of_isMaximal_of_not_isField (maximalIdeal.isMaximal R) h\n    apply Submodule.eq_bot_of_le_smul_of_le_jacobson_bot (maximalIdeal R)\n    · exact ⟨{ x }, (Finset.coe_singleton x).symm ▸ hx.symm⟩\n    · conv_lhs => rw [hx]\n      rw [Submodule.mem_smul_top_iff] at e \n      rwa [Submodule.span_le, Set.singleton_subset_iff]\n    · rw [LocalRing.jacobson_eq_maximalIdeal (⊥ : Ideal R) bot_ne_top]\n  · refine' fun w => Quotient.inductionOn' w fun y => _\n    obtain ⟨y, hy⟩ := y\n    rw [hx, Submodule.mem_span_singleton] at hy \n    obtain ⟨a, rfl⟩ := hy\n    exact ⟨Ideal.Quotient.mk _ a, rfl⟩\ntfae_have 6 → 5\n· rintro ⟨x, hx, hx'⟩\n  induction x using Quotient.inductionOn' with\n  | h x => ?_\n  use x\n  apply le_antisymm\n  swap; · rw [Submodule.span_le, Set.singleton_subset_iff]; exact x.prop\n  have h₁ :\n    (Ideal.span {(x : R)} : Ideal R) ⊔ maximalIdeal R ≤ Ideal.span {(x : R)} ⊔ maximalIdeal R • maximalIdeal R :=\n    by\n    refine' sup_le le_sup_left _\n    rintro m hm\n    obtain ⟨c, hc⟩ := hx' (Submodule.Quotient.mk ⟨m, hm⟩)\n    induction c using Quotient.inductionOn' with\n    | h c => ?_\n    rw [← sub_sub_cancel (c * x) m]\n    apply sub_mem _ _\n    · refine' Ideal.mem_sup_left (Ideal.mem_span_singleton'.mpr ⟨c, rfl⟩)\n    · have := (Submodule.Quotient.eq _).mp hc\n      rw [Submodule.mem_smul_top_iff] at this \n      exact Ideal.mem_sup_right this\n  have h₂ : maximalIdeal R ≤ (⊥ : Ideal R).jacobson :=\n    by\n    rw [LocalRing.jacobson_eq_maximalIdeal]\n    exact bot_ne_top\n  have := Submodule.smul_sup_eq_smul_sup_of_le_smul_of_le_jacobson (IsNoetherian.noetherian _) h₂ h₁\n  rw [Submodule.bot_smul, sup_bot_eq] at this \n  rw [← sup_eq_left, eq_comm]\n  exact le_sup_left.antisymm (h₁.trans <| le_of_eq this)\ntfae_have 5 → 7\n· exact exists_maximalIdeal_pow_eq_of_principal R h\ntfae_have 7 → 2\n· rw [ValuationRing.iff_ideal_total]\n  intro H\n  constructor\n  intro I J\n  let _ := Classical.decEq (Ideal R)\n  by_cases hI : I = ⊥; · subst hI; left; exact bot_le\n  by_cases hJ : J = ⊥; · subst hJ; right; exact bot_le\n  obtain ⟨n, rfl⟩ := H I hI\n  obtain ⟨m, rfl⟩ := H J hJ\n  cases' le_total m n with h' h'\n  · left; exact Ideal.pow_le_pow h'\n  · right; exact Ideal.pow_le_pow h'\ntfae_finish\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\n⊢ List.TFAE\n    [DiscreteValuationRing R, ValuationRing R, IsDedekindDomain R, IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P,\n      Submodule.IsPrincipal (maximalIdeal R), FiniteDimensional.finrank (ResidueField R) (CotangentSpace R) = 1,\n      ∀ (I : Ideal R), I ≠ ⊥ → ∃ n, I = maximalIdeal R ^ n]\n[PROOFSTEP]\nrw [finrank_eq_one_iff']\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\n⊢ List.TFAE\n    [DiscreteValuationRing R, ValuationRing R, IsDedekindDomain R, IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P,\n      Submodule.IsPrincipal (maximalIdeal R), ∃ v _n, ∀ (w : CotangentSpace R), ∃ c, c • v = w,\n      ∀ (I : Ideal R), I ≠ ⊥ → ∃ n, I = maximalIdeal R ^ n]\n[PROOFSTEP]\ntfae_have 1 → 2\n[GOAL]\ncase tfae_1_to_2\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\n⊢ DiscreteValuationRing R → ValuationRing R\n[PROOFSTEP]\nintro\n[GOAL]\ncase tfae_1_to_2\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\n✝ : DiscreteValuationRing R\n⊢ ValuationRing R\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\n⊢ List.TFAE\n    [DiscreteValuationRing R, ValuationRing R, IsDedekindDomain R, IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P,\n      Submodule.IsPrincipal (maximalIdeal R), ∃ v _n, ∀ (w : CotangentSpace R), ∃ c, c • v = w,\n      ∀ (I : Ideal R), I ≠ ⊥ → ∃ n, I = maximalIdeal R ^ n]\n[PROOFSTEP]\ntfae_have 2 → 1\n[GOAL]\ncase tfae_2_to_1\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\n⊢ ValuationRing R → DiscreteValuationRing R\n[PROOFSTEP]\nintro\n[GOAL]\ncase tfae_2_to_1\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\n✝ : ValuationRing R\n⊢ DiscreteValuationRing R\n[PROOFSTEP]\nhaveI := IsBezout.toGCDDomain R\n[GOAL]\ncase tfae_2_to_1\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\n✝ : ValuationRing R\nthis : GCDMonoid R\n⊢ DiscreteValuationRing R\n[PROOFSTEP]\nhaveI : UniqueFactorizationMonoid R := ufm_of_gcd_of_wfDvdMonoid\n[GOAL]\ncase tfae_2_to_1\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\n✝ : ValuationRing R\nthis✝ : GCDMonoid R\nthis : UniqueFactorizationMonoid R\n⊢ DiscreteValuationRing R\n[PROOFSTEP]\napply DiscreteValuationRing.of_ufd_of_unique_irreducible\n[GOAL]\ncase tfae_2_to_1.h₁\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\n✝ : ValuationRing R\nthis✝ : GCDMonoid R\nthis : UniqueFactorizationMonoid R\n⊢ ∃ p, Irreducible p\n[PROOFSTEP]\nobtain ⟨x, hx₁, hx₂⟩ := Ring.exists_not_isUnit_of_not_isField h\n[GOAL]\ncase tfae_2_to_1.h₁.intro.intro\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\n✝ : ValuationRing R\nthis✝ : GCDMonoid R\nthis : UniqueFactorizationMonoid R\nx : R\nhx₁ : x ≠ 0\nhx₂ : ¬IsUnit x\n⊢ ∃ p, Irreducible p\n[PROOFSTEP]\nobtain ⟨p, hp₁, -⟩ := WfDvdMonoid.exists_irreducible_factor hx₂ hx₁\n[GOAL]\ncase tfae_2_to_1.h₁.intro.intro.intro.intro\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\n✝ : ValuationRing R\nthis✝ : GCDMonoid R\nthis : UniqueFactorizationMonoid R\nx : R\nhx₁ : x ≠ 0\nhx₂ : ¬IsUnit x\np : R\nhp₁ : Irreducible p\n⊢ ∃ p, Irreducible p\n[PROOFSTEP]\nexact ⟨p, hp₁⟩\n[GOAL]\ncase tfae_2_to_1.h₂\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\n✝ : ValuationRing R\nthis✝ : GCDMonoid R\nthis : UniqueFactorizationMonoid R\n⊢ ∀ ⦃p q : R⦄, Irreducible p → Irreducible q → Associated p q\n[PROOFSTEP]\nexact ValuationRing.unique_irreducible\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\ntfae_2_to_1 : ValuationRing R → DiscreteValuationRing R\n⊢ List.TFAE\n    [DiscreteValuationRing R, ValuationRing R, IsDedekindDomain R, IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P,\n      Submodule.IsPrincipal (maximalIdeal R), ∃ v _n, ∀ (w : CotangentSpace R), ∃ c, c • v = w,\n      ∀ (I : Ideal R), I ≠ ⊥ → ∃ n, I = maximalIdeal R ^ n]\n[PROOFSTEP]\ntfae_have 1 → 4\n[GOAL]\ncase tfae_1_to_4\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\ntfae_2_to_1 : ValuationRing R → DiscreteValuationRing R\n⊢ DiscreteValuationRing R → IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P\n[PROOFSTEP]\nintro H\n[GOAL]\ncase tfae_1_to_4\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\ntfae_2_to_1 : ValuationRing R → DiscreteValuationRing R\nH : DiscreteValuationRing R\n⊢ IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P\n[PROOFSTEP]\nexact ⟨inferInstance, ((DiscreteValuationRing.iff_pid_with_one_nonzero_prime R).mp H).2⟩\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\ntfae_2_to_1 : ValuationRing R → DiscreteValuationRing R\ntfae_1_to_4 : DiscreteValuationRing R → IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P\n⊢ List.TFAE\n    [DiscreteValuationRing R, ValuationRing R, IsDedekindDomain R, IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P,\n      Submodule.IsPrincipal (maximalIdeal R), ∃ v _n, ∀ (w : CotangentSpace R), ∃ c, c • v = w,\n      ∀ (I : Ideal R), I ≠ ⊥ → ∃ n, I = maximalIdeal R ^ n]\n[PROOFSTEP]\ntfae_have 4 → 3\n[GOAL]\ncase tfae_4_to_3\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\ntfae_2_to_1 : ValuationRing R → DiscreteValuationRing R\ntfae_1_to_4 : DiscreteValuationRing R → IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P\n⊢ (IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P) → IsDedekindDomain R\n[PROOFSTEP]\nrintro ⟨h₁, h₂⟩\n[GOAL]\ncase tfae_4_to_3.intro\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\ntfae_2_to_1 : ValuationRing R → DiscreteValuationRing R\ntfae_1_to_4 : DiscreteValuationRing R → IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P\nh₁ : IsIntegrallyClosed R\nh₂ : ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P\n⊢ IsDedekindDomain R\n[PROOFSTEP]\nexact\n  { h₁ with\n    maximalOfPrime := fun hI hI' =>\n      ExistsUnique.unique h₂ ⟨ne_bot, inferInstance⟩ ⟨hI, hI'⟩ ▸ maximalIdeal.isMaximal R, }\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\ntfae_2_to_1 : ValuationRing R → DiscreteValuationRing R\ntfae_1_to_4 : DiscreteValuationRing R → IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P\ntfae_4_to_3 : (IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P) → IsDedekindDomain R\n⊢ List.TFAE\n    [DiscreteValuationRing R, ValuationRing R, IsDedekindDomain R, IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P,\n      Submodule.IsPrincipal (maximalIdeal R), ∃ v _n, ∀ (w : CotangentSpace R), ∃ c, c • v = w,\n      ∀ (I : Ideal R), I ≠ ⊥ → ∃ n, I = maximalIdeal R ^ n]\n[PROOFSTEP]\ntfae_have 3 → 5\n[GOAL]\ncase tfae_3_to_5\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\ntfae_2_to_1 : ValuationRing R → DiscreteValuationRing R\ntfae_1_to_4 : DiscreteValuationRing R → IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P\ntfae_4_to_3 : (IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P) → IsDedekindDomain R\n⊢ IsDedekindDomain R → Submodule.IsPrincipal (maximalIdeal R)\n[PROOFSTEP]\nintro h\n[GOAL]\ncase tfae_3_to_5\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh✝ : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\ntfae_2_to_1 : ValuationRing R → DiscreteValuationRing R\ntfae_1_to_4 : DiscreteValuationRing R → IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P\ntfae_4_to_3 : (IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P) → IsDedekindDomain R\nh : IsDedekindDomain R\n⊢ Submodule.IsPrincipal (maximalIdeal R)\n[PROOFSTEP]\nexact maximalIdeal_isPrincipal_of_isDedekindDomain R\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\ntfae_2_to_1 : ValuationRing R → DiscreteValuationRing R\ntfae_1_to_4 : DiscreteValuationRing R → IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P\ntfae_4_to_3 : (IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P) → IsDedekindDomain R\ntfae_3_to_5 : IsDedekindDomain R → Submodule.IsPrincipal (maximalIdeal R)\n⊢ List.TFAE\n    [DiscreteValuationRing R, ValuationRing R, IsDedekindDomain R, IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P,\n      Submodule.IsPrincipal (maximalIdeal R), ∃ v _n, ∀ (w : CotangentSpace R), ∃ c, c • v = w,\n      ∀ (I : Ideal R), I ≠ ⊥ → ∃ n, I = maximalIdeal R ^ n]\n[PROOFSTEP]\ntfae_have 5 → 6\n[GOAL]\ncase tfae_5_to_6\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\ntfae_2_to_1 : ValuationRing R → DiscreteValuationRing R\ntfae_1_to_4 : DiscreteValuationRing R → IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P\ntfae_4_to_3 : (IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P) → IsDedekindDomain R\ntfae_3_to_5 : IsDedekindDomain R → Submodule.IsPrincipal (maximalIdeal R)\n⊢ Submodule.IsPrincipal (maximalIdeal R) → ∃ v _n, ∀ (w : CotangentSpace R), ∃ c, c • v = w\n[PROOFSTEP]\nrintro ⟨x, hx⟩\n[GOAL]\ncase tfae_5_to_6.mk.intro\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\ntfae_2_to_1 : ValuationRing R → DiscreteValuationRing R\ntfae_1_to_4 : DiscreteValuationRing R → IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P\ntfae_4_to_3 : (IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P) → IsDedekindDomain R\ntfae_3_to_5 : IsDedekindDomain R → Submodule.IsPrincipal (maximalIdeal R)\nx : R\nhx : maximalIdeal R = Submodule.span R {x}\n⊢ ∃ v _n, ∀ (w : CotangentSpace R), ∃ c, c • v = w\n[PROOFSTEP]\nhave : x ∈ maximalIdeal R := by rw [hx]; exact Submodule.subset_span (Set.mem_singleton x)\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\ntfae_2_to_1 : ValuationRing R → DiscreteValuationRing R\ntfae_1_to_4 : DiscreteValuationRing R → IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P\ntfae_4_to_3 : (IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P) → IsDedekindDomain R\ntfae_3_to_5 : IsDedekindDomain R → Submodule.IsPrincipal (maximalIdeal R)\nx : R\nhx : maximalIdeal R = Submodule.span R {x}\n⊢ x ∈ maximalIdeal R\n[PROOFSTEP]\nrw [hx]\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\ntfae_2_to_1 : ValuationRing R → DiscreteValuationRing R\ntfae_1_to_4 : DiscreteValuationRing R → IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P\ntfae_4_to_3 : (IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P) → IsDedekindDomain R\ntfae_3_to_5 : IsDedekindDomain R → Submodule.IsPrincipal (maximalIdeal R)\nx : R\nhx : maximalIdeal R = Submodule.span R {x}\n⊢ x ∈ Submodule.span R {x}\n[PROOFSTEP]\nexact Submodule.subset_span (Set.mem_singleton x)\n[GOAL]\ncase tfae_5_to_6.mk.intro\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\ntfae_2_to_1 : ValuationRing R → DiscreteValuationRing R\ntfae_1_to_4 : DiscreteValuationRing R → IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P\ntfae_4_to_3 : (IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P) → IsDedekindDomain R\ntfae_3_to_5 : IsDedekindDomain R → Submodule.IsPrincipal (maximalIdeal R)\nx : R\nhx : maximalIdeal R = Submodule.span R {x}\nthis : x ∈ maximalIdeal R\n⊢ ∃ v _n, ∀ (w : CotangentSpace R), ∃ c, c • v = w\n[PROOFSTEP]\nlet x' : maximalIdeal R := ⟨x, this⟩\n[GOAL]\ncase tfae_5_to_6.mk.intro\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\ntfae_2_to_1 : ValuationRing R → DiscreteValuationRing R\ntfae_1_to_4 : DiscreteValuationRing R → IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P\ntfae_4_to_3 : (IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P) → IsDedekindDomain R\ntfae_3_to_5 : IsDedekindDomain R → Submodule.IsPrincipal (maximalIdeal R)\nx : R\nhx : maximalIdeal R = Submodule.span R {x}\nthis : x ∈ maximalIdeal R\nx' : { x // x ∈ maximalIdeal R } := { val := x, property := this }\n⊢ ∃ v _n, ∀ (w : CotangentSpace R), ∃ c, c • v = w\n[PROOFSTEP]\nuse Submodule.Quotient.mk x'\n[GOAL]\ncase h\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\ntfae_2_to_1 : ValuationRing R → DiscreteValuationRing R\ntfae_1_to_4 : DiscreteValuationRing R → IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P\ntfae_4_to_3 : (IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P) → IsDedekindDomain R\ntfae_3_to_5 : IsDedekindDomain R → Submodule.IsPrincipal (maximalIdeal R)\nx : R\nhx : maximalIdeal R = Submodule.span R {x}\nthis : x ∈ maximalIdeal R\nx' : { x // x ∈ maximalIdeal R } := { val := x, property := this }\n⊢ ∃ _n, ∀ (w : CotangentSpace R), ∃ c, c • Submodule.Quotient.mk x' = w\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.h\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\ntfae_2_to_1 : ValuationRing R → DiscreteValuationRing R\ntfae_1_to_4 : DiscreteValuationRing R → IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P\ntfae_4_to_3 : (IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P) → IsDedekindDomain R\ntfae_3_to_5 : IsDedekindDomain R → Submodule.IsPrincipal (maximalIdeal R)\nx : R\nhx : maximalIdeal R = Submodule.span R {x}\nthis : x ∈ maximalIdeal R\nx' : { x // x ∈ maximalIdeal R } := { val := x, property := this }\n⊢ ∀ (w : CotangentSpace R), ∃ c, c • Submodule.Quotient.mk x' = w\ncase h.w\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\ntfae_2_to_1 : ValuationRing R → DiscreteValuationRing R\ntfae_1_to_4 : DiscreteValuationRing R → IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P\ntfae_4_to_3 : (IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P) → IsDedekindDomain R\ntfae_3_to_5 : IsDedekindDomain R → Submodule.IsPrincipal (maximalIdeal R)\nx : R\nhx : maximalIdeal R = Submodule.span R {x}\nthis : x ∈ maximalIdeal R\nx' : { x // x ∈ maximalIdeal R } := { val := x, property := this }\n⊢ Submodule.Quotient.mk x' ≠ 0\n[PROOFSTEP]\nswap\n[GOAL]\ncase h.w\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\ntfae_2_to_1 : ValuationRing R → DiscreteValuationRing R\ntfae_1_to_4 : DiscreteValuationRing R → IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P\ntfae_4_to_3 : (IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P) → IsDedekindDomain R\ntfae_3_to_5 : IsDedekindDomain R → Submodule.IsPrincipal (maximalIdeal R)\nx : R\nhx : maximalIdeal R = Submodule.span R {x}\nthis : x ∈ maximalIdeal R\nx' : { x // x ∈ maximalIdeal R } := { val := x, property := this }\n⊢ Submodule.Quotient.mk x' ≠ 0\n[PROOFSTEP]\nintro e\n[GOAL]\ncase h.w\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\ntfae_2_to_1 : ValuationRing R → DiscreteValuationRing R\ntfae_1_to_4 : DiscreteValuationRing R → IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P\ntfae_4_to_3 : (IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P) → IsDedekindDomain R\ntfae_3_to_5 : IsDedekindDomain R → Submodule.IsPrincipal (maximalIdeal R)\nx : R\nhx : maximalIdeal R = Submodule.span R {x}\nthis : x ∈ maximalIdeal R\nx' : { x // x ∈ maximalIdeal R } := { val := x, property := this }\ne : Submodule.Quotient.mk x' = 0\n⊢ False\n[PROOFSTEP]\nrw [Submodule.Quotient.mk_eq_zero] at e \n[GOAL]\ncase h.w\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\ntfae_2_to_1 : ValuationRing R → DiscreteValuationRing R\ntfae_1_to_4 : DiscreteValuationRing R → IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P\ntfae_4_to_3 : (IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P) → IsDedekindDomain R\ntfae_3_to_5 : IsDedekindDomain R → Submodule.IsPrincipal (maximalIdeal R)\nx : R\nhx : maximalIdeal R = Submodule.span R {x}\nthis : x ∈ maximalIdeal R\nx' : { x // x ∈ maximalIdeal R } := { val := x, property := this }\ne : x' ∈ maximalIdeal R • ⊤\n⊢ False\n[PROOFSTEP]\napply Ring.ne_bot_of_isMaximal_of_not_isField (maximalIdeal.isMaximal R) h\n[GOAL]\ncase h.w\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\ntfae_2_to_1 : ValuationRing R → DiscreteValuationRing R\ntfae_1_to_4 : DiscreteValuationRing R → IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P\ntfae_4_to_3 : (IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P) → IsDedekindDomain R\ntfae_3_to_5 : IsDedekindDomain R → Submodule.IsPrincipal (maximalIdeal R)\nx : R\nhx : maximalIdeal R = Submodule.span R {x}\nthis : x ∈ maximalIdeal R\nx' : { x // x ∈ maximalIdeal R } := { val := x, property := this }\ne : x' ∈ maximalIdeal R • ⊤\n⊢ maximalIdeal R = ⊥\n[PROOFSTEP]\napply Submodule.eq_bot_of_le_smul_of_le_jacobson_bot (maximalIdeal R)\n[GOAL]\ncase h.w.hN\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\ntfae_2_to_1 : ValuationRing R → DiscreteValuationRing R\ntfae_1_to_4 : DiscreteValuationRing R → IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P\ntfae_4_to_3 : (IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P) → IsDedekindDomain R\ntfae_3_to_5 : IsDedekindDomain R → Submodule.IsPrincipal (maximalIdeal R)\nx : R\nhx : maximalIdeal R = Submodule.span R {x}\nthis : x ∈ maximalIdeal R\nx' : { x // x ∈ maximalIdeal R } := { val := x, property := this }\ne : x' ∈ maximalIdeal R • ⊤\n⊢ Submodule.FG (maximalIdeal R)\n[PROOFSTEP]\nexact ⟨{ x }, (Finset.coe_singleton x).symm ▸ hx.symm⟩\n[GOAL]\ncase h.w.hIN\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\ntfae_2_to_1 : ValuationRing R → DiscreteValuationRing R\ntfae_1_to_4 : DiscreteValuationRing R → IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P\ntfae_4_to_3 : (IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P) → IsDedekindDomain R\ntfae_3_to_5 : IsDedekindDomain R → Submodule.IsPrincipal (maximalIdeal R)\nx : R\nhx : maximalIdeal R = Submodule.span R {x}\nthis : x ∈ maximalIdeal R\nx' : { x // x ∈ maximalIdeal R } := { val := x, property := this }\ne : x' ∈ maximalIdeal R • ⊤\n⊢ maximalIdeal R ≤ maximalIdeal R • maximalIdeal R\n[PROOFSTEP]\nconv_lhs => rw [hx]\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\ntfae_2_to_1 : ValuationRing R → DiscreteValuationRing R\ntfae_1_to_4 : DiscreteValuationRing R → IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P\ntfae_4_to_3 : (IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P) → IsDedekindDomain R\ntfae_3_to_5 : IsDedekindDomain R → Submodule.IsPrincipal (maximalIdeal R)\nx : R\nhx : maximalIdeal R = Submodule.span R {x}\nthis : x ∈ maximalIdeal R\nx' : { x // x ∈ maximalIdeal R } := { val := x, property := this }\ne : x' ∈ maximalIdeal R • ⊤\n| maximalIdeal R\n[PROOFSTEP]\nrw [hx]\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\ntfae_2_to_1 : ValuationRing R → DiscreteValuationRing R\ntfae_1_to_4 : DiscreteValuationRing R → IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P\ntfae_4_to_3 : (IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P) → IsDedekindDomain R\ntfae_3_to_5 : IsDedekindDomain R → Submodule.IsPrincipal (maximalIdeal R)\nx : R\nhx : maximalIdeal R = Submodule.span R {x}\nthis : x ∈ maximalIdeal R\nx' : { x // x ∈ maximalIdeal R } := { val := x, property := this }\ne : x' ∈ maximalIdeal R • ⊤\n| maximalIdeal R\n[PROOFSTEP]\nrw [hx]\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\ntfae_2_to_1 : ValuationRing R → DiscreteValuationRing R\ntfae_1_to_4 : DiscreteValuationRing R → IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P\ntfae_4_to_3 : (IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P) → IsDedekindDomain R\ntfae_3_to_5 : IsDedekindDomain R → Submodule.IsPrincipal (maximalIdeal R)\nx : R\nhx : maximalIdeal R = Submodule.span R {x}\nthis : x ∈ maximalIdeal R\nx' : { x // x ∈ maximalIdeal R } := { val := x, property := this }\ne : x' ∈ maximalIdeal R • ⊤\n| maximalIdeal R\n[PROOFSTEP]\nrw [hx]\n[GOAL]\ncase h.w.hIN\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\ntfae_2_to_1 : ValuationRing R → DiscreteValuationRing R\ntfae_1_to_4 : DiscreteValuationRing R → IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P\ntfae_4_to_3 : (IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P) → IsDedekindDomain R\ntfae_3_to_5 : IsDedekindDomain R → Submodule.IsPrincipal (maximalIdeal R)\nx : R\nhx : maximalIdeal R = Submodule.span R {x}\nthis : x ∈ maximalIdeal R\nx' : { x // x ∈ maximalIdeal R } := { val := x, property := this }\ne : x' ∈ maximalIdeal R • ⊤\n⊢ Submodule.span R {x} ≤ maximalIdeal R • maximalIdeal R\n[PROOFSTEP]\nrw [Submodule.mem_smul_top_iff] at e \n[GOAL]\ncase h.w.hIN\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\ntfae_2_to_1 : ValuationRing R → DiscreteValuationRing R\ntfae_1_to_4 : DiscreteValuationRing R → IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P\ntfae_4_to_3 : (IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P) → IsDedekindDomain R\ntfae_3_to_5 : IsDedekindDomain R → Submodule.IsPrincipal (maximalIdeal R)\nx : R\nhx : maximalIdeal R = Submodule.span R {x}\nthis : x ∈ maximalIdeal R\nx' : { x // x ∈ maximalIdeal R } := { val := x, property := this }\ne : ↑x' ∈ maximalIdeal R • maximalIdeal R\n⊢ Submodule.span R {x} ≤ maximalIdeal R • maximalIdeal R\n[PROOFSTEP]\nrwa [Submodule.span_le, Set.singleton_subset_iff]\n[GOAL]\ncase h.w.hIjac\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\ntfae_2_to_1 : ValuationRing R → DiscreteValuationRing R\ntfae_1_to_4 : DiscreteValuationRing R → IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P\ntfae_4_to_3 : (IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P) → IsDedekindDomain R\ntfae_3_to_5 : IsDedekindDomain R → Submodule.IsPrincipal (maximalIdeal R)\nx : R\nhx : maximalIdeal R = Submodule.span R {x}\nthis : x ∈ maximalIdeal R\nx' : { x // x ∈ maximalIdeal R } := { val := x, property := this }\ne : x' ∈ maximalIdeal R • ⊤\n⊢ maximalIdeal R ≤ Ideal.jacobson ⊥\n[PROOFSTEP]\nrw [LocalRing.jacobson_eq_maximalIdeal (⊥ : Ideal R) bot_ne_top]\n[GOAL]\ncase h.h\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\ntfae_2_to_1 : ValuationRing R → DiscreteValuationRing R\ntfae_1_to_4 : DiscreteValuationRing R → IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P\ntfae_4_to_3 : (IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P) → IsDedekindDomain R\ntfae_3_to_5 : IsDedekindDomain R → Submodule.IsPrincipal (maximalIdeal R)\nx : R\nhx : maximalIdeal R = Submodule.span R {x}\nthis : x ∈ maximalIdeal R\nx' : { x // x ∈ maximalIdeal R } := { val := x, property := this }\n⊢ ∀ (w : CotangentSpace R), ∃ c, c • Submodule.Quotient.mk x' = w\n[PROOFSTEP]\nrefine' fun w => Quotient.inductionOn' w fun y => _\n[GOAL]\ncase h.h\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\ntfae_2_to_1 : ValuationRing R → DiscreteValuationRing R\ntfae_1_to_4 : DiscreteValuationRing R → IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P\ntfae_4_to_3 : (IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P) → IsDedekindDomain R\ntfae_3_to_5 : IsDedekindDomain R → Submodule.IsPrincipal (maximalIdeal R)\nx : R\nhx : maximalIdeal R = Submodule.span R {x}\nthis : x ∈ maximalIdeal R\nx' : { x // x ∈ maximalIdeal R } := { val := x, property := this }\nw : CotangentSpace R\ny : { x // x ∈ maximalIdeal R }\n⊢ ∃ c, c • Submodule.Quotient.mk x' = Quotient.mk'' y\n[PROOFSTEP]\nobtain ⟨y, hy⟩ := y\n[GOAL]\ncase h.h.mk\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\ntfae_2_to_1 : ValuationRing R → DiscreteValuationRing R\ntfae_1_to_4 : DiscreteValuationRing R → IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P\ntfae_4_to_3 : (IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P) → IsDedekindDomain R\ntfae_3_to_5 : IsDedekindDomain R → Submodule.IsPrincipal (maximalIdeal R)\nx : R\nhx : maximalIdeal R = Submodule.span R {x}\nthis : x ∈ maximalIdeal R\nx' : { x // x ∈ maximalIdeal R } := { val := x, property := this }\nw : CotangentSpace R\ny : R\nhy : y ∈ maximalIdeal R\n⊢ ∃ c, c • Submodule.Quotient.mk x' = Quotient.mk'' { val := y, property := hy }\n[PROOFSTEP]\nrw [hx, Submodule.mem_span_singleton] at hy \n[GOAL]\ncase h.h.mk\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\ntfae_2_to_1 : ValuationRing R → DiscreteValuationRing R\ntfae_1_to_4 : DiscreteValuationRing R → IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P\ntfae_4_to_3 : (IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P) → IsDedekindDomain R\ntfae_3_to_5 : IsDedekindDomain R → Submodule.IsPrincipal (maximalIdeal R)\nx : R\nhx : maximalIdeal R = Submodule.span R {x}\nthis : x ∈ maximalIdeal R\nx' : { x // x ∈ maximalIdeal R } := { val := x, property := this }\nw : CotangentSpace R\ny : R\nhy✝ : y ∈ maximalIdeal R\nhy : ∃ a, a • x = y\n⊢ ∃ c, c • Submodule.Quotient.mk x' = Quotient.mk'' { val := y, property := hy✝ }\n[PROOFSTEP]\nobtain ⟨a, rfl⟩ := hy\n[GOAL]\ncase h.h.mk.intro\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\ntfae_2_to_1 : ValuationRing R → DiscreteValuationRing R\ntfae_1_to_4 : DiscreteValuationRing R → IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P\ntfae_4_to_3 : (IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P) → IsDedekindDomain R\ntfae_3_to_5 : IsDedekindDomain R → Submodule.IsPrincipal (maximalIdeal R)\nx : R\nhx : maximalIdeal R = Submodule.span R {x}\nthis : x ∈ maximalIdeal R\nx' : { x // x ∈ maximalIdeal R } := { val := x, property := this }\nw : CotangentSpace R\na : R\nhy : a • x ∈ maximalIdeal R\n⊢ ∃ c, c • Submodule.Quotient.mk x' = Quotient.mk'' { val := a • x, property := hy }\n[PROOFSTEP]\nexact ⟨Ideal.Quotient.mk _ a, rfl⟩\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\ntfae_2_to_1 : ValuationRing R → DiscreteValuationRing R\ntfae_1_to_4 : DiscreteValuationRing R → IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P\ntfae_4_to_3 : (IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P) → IsDedekindDomain R\ntfae_3_to_5 : IsDedekindDomain R → Submodule.IsPrincipal (maximalIdeal R)\ntfae_5_to_6 : Submodule.IsPrincipal (maximalIdeal R) → ∃ v _n, ∀ (w : CotangentSpace R), ∃ c, c • v = w\n⊢ List.TFAE\n    [DiscreteValuationRing R, ValuationRing R, IsDedekindDomain R, IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P,\n      Submodule.IsPrincipal (maximalIdeal R), ∃ v _n, ∀ (w : CotangentSpace R), ∃ c, c • v = w,\n      ∀ (I : Ideal R), I ≠ ⊥ → ∃ n, I = maximalIdeal R ^ n]\n[PROOFSTEP]\ntfae_have 6 → 5\n[GOAL]\ncase tfae_6_to_5\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\ntfae_2_to_1 : ValuationRing R → DiscreteValuationRing R\ntfae_1_to_4 : DiscreteValuationRing R → IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P\ntfae_4_to_3 : (IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P) → IsDedekindDomain R\ntfae_3_to_5 : IsDedekindDomain R → Submodule.IsPrincipal (maximalIdeal R)\ntfae_5_to_6 : Submodule.IsPrincipal (maximalIdeal R) → ∃ v _n, ∀ (w : CotangentSpace R), ∃ c, c • v = w\n⊢ (∃ v _n, ∀ (w : CotangentSpace R), ∃ c, c • v = w) → Submodule.IsPrincipal (maximalIdeal R)\n[PROOFSTEP]\nrintro ⟨x, hx, hx'⟩\n[GOAL]\ncase tfae_6_to_5.intro.intro\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\ntfae_2_to_1 : ValuationRing R → DiscreteValuationRing R\ntfae_1_to_4 : DiscreteValuationRing R → IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P\ntfae_4_to_3 : (IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P) → IsDedekindDomain R\ntfae_3_to_5 : IsDedekindDomain R → Submodule.IsPrincipal (maximalIdeal R)\ntfae_5_to_6 : Submodule.IsPrincipal (maximalIdeal R) → ∃ v _n, ∀ (w : CotangentSpace R), ∃ c, c • v = w\nx : CotangentSpace R\nhx : x ≠ 0\nhx' : ∀ (w : CotangentSpace R), ∃ c, c • x = w\n⊢ Submodule.IsPrincipal (maximalIdeal R)\n[PROOFSTEP]\ninduction x using Quotient.inductionOn' with\n| h x => ?_\n[GOAL]\ncase tfae_6_to_5.intro.intro\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\ntfae_2_to_1 : ValuationRing R → DiscreteValuationRing R\ntfae_1_to_4 : DiscreteValuationRing R → IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P\ntfae_4_to_3 : (IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P) → IsDedekindDomain R\ntfae_3_to_5 : IsDedekindDomain R → Submodule.IsPrincipal (maximalIdeal R)\ntfae_5_to_6 : Submodule.IsPrincipal (maximalIdeal R) → ∃ v _n, ∀ (w : CotangentSpace R), ∃ c, c • v = w\nx : CotangentSpace R\nhx : x ≠ 0\nhx' : ∀ (w : CotangentSpace R), ∃ c, c • x = w\n⊢ Submodule.IsPrincipal (maximalIdeal R)\n[PROOFSTEP]\ninduction x using Quotient.inductionOn' with\n| h x => ?_\n[GOAL]\ncase tfae_6_to_5.intro.intro.h\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\ntfae_2_to_1 : ValuationRing R → DiscreteValuationRing R\ntfae_1_to_4 : DiscreteValuationRing R → IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P\ntfae_4_to_3 : (IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P) → IsDedekindDomain R\ntfae_3_to_5 : IsDedekindDomain R → Submodule.IsPrincipal (maximalIdeal R)\ntfae_5_to_6 : Submodule.IsPrincipal (maximalIdeal R) → ∃ v _n, ∀ (w : CotangentSpace R), ∃ c, c • v = w\nx : { x // x ∈ maximalIdeal R }\nhx : Quotient.mk'' x ≠ 0\nhx' : ∀ (w : CotangentSpace R), ∃ c, c • Quotient.mk'' x = w\n⊢ Submodule.IsPrincipal (maximalIdeal R)\n[PROOFSTEP]\nuse x\n[GOAL]\ncase h\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\ntfae_2_to_1 : ValuationRing R → DiscreteValuationRing R\ntfae_1_to_4 : DiscreteValuationRing R → IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P\ntfae_4_to_3 : (IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P) → IsDedekindDomain R\ntfae_3_to_5 : IsDedekindDomain R → Submodule.IsPrincipal (maximalIdeal R)\ntfae_5_to_6 : Submodule.IsPrincipal (maximalIdeal R) → ∃ v _n, ∀ (w : CotangentSpace R), ∃ c, c • v = w\nx : { x // x ∈ maximalIdeal R }\nhx : Quotient.mk'' x ≠ 0\nhx' : ∀ (w : CotangentSpace R), ∃ c, c • Quotient.mk'' x = w\n⊢ maximalIdeal R = Submodule.span R {↑x}\n[PROOFSTEP]\napply le_antisymm\n[GOAL]\ncase h.a\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\ntfae_2_to_1 : ValuationRing R → DiscreteValuationRing R\ntfae_1_to_4 : DiscreteValuationRing R → IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P\ntfae_4_to_3 : (IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P) → IsDedekindDomain R\ntfae_3_to_5 : IsDedekindDomain R → Submodule.IsPrincipal (maximalIdeal R)\ntfae_5_to_6 : Submodule.IsPrincipal (maximalIdeal R) → ∃ v _n, ∀ (w : CotangentSpace R), ∃ c, c • v = w\nx : { x // x ∈ maximalIdeal R }\nhx : Quotient.mk'' x ≠ 0\nhx' : ∀ (w : CotangentSpace R), ∃ c, c • Quotient.mk'' x = w\n⊢ maximalIdeal R ≤ Submodule.span R {↑x}\ncase h.a\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\ntfae_2_to_1 : ValuationRing R → DiscreteValuationRing R\ntfae_1_to_4 : DiscreteValuationRing R → IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P\ntfae_4_to_3 : (IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P) → IsDedekindDomain R\ntfae_3_to_5 : IsDedekindDomain R → Submodule.IsPrincipal (maximalIdeal R)\ntfae_5_to_6 : Submodule.IsPrincipal (maximalIdeal R) → ∃ v _n, ∀ (w : CotangentSpace R), ∃ c, c • v = w\nx : { x // x ∈ maximalIdeal R }\nhx : Quotient.mk'' x ≠ 0\nhx' : ∀ (w : CotangentSpace R), ∃ c, c • Quotient.mk'' x = w\n⊢ Submodule.span R {↑x} ≤ maximalIdeal R\n[PROOFSTEP]\nswap\n[GOAL]\ncase h.a\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\ntfae_2_to_1 : ValuationRing R → DiscreteValuationRing R\ntfae_1_to_4 : DiscreteValuationRing R → IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P\ntfae_4_to_3 : (IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P) → IsDedekindDomain R\ntfae_3_to_5 : IsDedekindDomain R → Submodule.IsPrincipal (maximalIdeal R)\ntfae_5_to_6 : Submodule.IsPrincipal (maximalIdeal R) → ∃ v _n, ∀ (w : CotangentSpace R), ∃ c, c • v = w\nx : { x // x ∈ maximalIdeal R }\nhx : Quotient.mk'' x ≠ 0\nhx' : ∀ (w : CotangentSpace R), ∃ c, c • Quotient.mk'' x = w\n⊢ Submodule.span R {↑x} ≤ maximalIdeal R\n[PROOFSTEP]\nrw [Submodule.span_le, Set.singleton_subset_iff]\n[GOAL]\ncase h.a\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\ntfae_2_to_1 : ValuationRing R → DiscreteValuationRing R\ntfae_1_to_4 : DiscreteValuationRing R → IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P\ntfae_4_to_3 : (IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P) → IsDedekindDomain R\ntfae_3_to_5 : IsDedekindDomain R → Submodule.IsPrincipal (maximalIdeal R)\ntfae_5_to_6 : Submodule.IsPrincipal (maximalIdeal R) → ∃ v _n, ∀ (w : CotangentSpace R), ∃ c, c • v = w\nx : { x // x ∈ maximalIdeal R }\nhx : Quotient.mk'' x ≠ 0\nhx' : ∀ (w : CotangentSpace R), ∃ c, c • Quotient.mk'' x = w\n⊢ ↑x ∈ ↑(maximalIdeal R)\n[PROOFSTEP]\nexact x.prop\n[GOAL]\ncase h.a\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\ntfae_2_to_1 : ValuationRing R → DiscreteValuationRing R\ntfae_1_to_4 : DiscreteValuationRing R → IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P\ntfae_4_to_3 : (IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P) → IsDedekindDomain R\ntfae_3_to_5 : IsDedekindDomain R → Submodule.IsPrincipal (maximalIdeal R)\ntfae_5_to_6 : Submodule.IsPrincipal (maximalIdeal R) → ∃ v _n, ∀ (w : CotangentSpace R), ∃ c, c • v = w\nx : { x // x ∈ maximalIdeal R }\nhx : Quotient.mk'' x ≠ 0\nhx' : ∀ (w : CotangentSpace R), ∃ c, c • Quotient.mk'' x = w\n⊢ maximalIdeal R ≤ Submodule.span R {↑x}\n[PROOFSTEP]\nhave h₁ : (Ideal.span {(x : R)} : Ideal R) ⊔ maximalIdeal R ≤ Ideal.span {(x : R)} ⊔ maximalIdeal R • maximalIdeal R :=\n  by\n  refine' sup_le le_sup_left _\n  rintro m hm\n  obtain ⟨c, hc⟩ := hx' (Submodule.Quotient.mk ⟨m, hm⟩)\n  induction c using Quotient.inductionOn' with\n  | h c => ?_\n  rw [← sub_sub_cancel (c * x) m]\n  apply sub_mem _ _\n  · refine' Ideal.mem_sup_left (Ideal.mem_span_singleton'.mpr ⟨c, rfl⟩)\n  · have := (Submodule.Quotient.eq _).mp hc\n    rw [Submodule.mem_smul_top_iff] at this \n    exact Ideal.mem_sup_right this\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\ntfae_2_to_1 : ValuationRing R → DiscreteValuationRing R\ntfae_1_to_4 : DiscreteValuationRing R → IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P\ntfae_4_to_3 : (IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P) → IsDedekindDomain R\ntfae_3_to_5 : IsDedekindDomain R → Submodule.IsPrincipal (maximalIdeal R)\ntfae_5_to_6 : Submodule.IsPrincipal (maximalIdeal R) → ∃ v _n, ∀ (w : CotangentSpace R), ∃ c, c • v = w\nx : { x // x ∈ maximalIdeal R }\nhx : Quotient.mk'' x ≠ 0\nhx' : ∀ (w : CotangentSpace R), ∃ c, c • Quotient.mk'' x = w\n⊢ Ideal.span {↑x} ⊔ maximalIdeal R ≤ Ideal.span {↑x} ⊔ maximalIdeal R • maximalIdeal R\n[PROOFSTEP]\nrefine' sup_le le_sup_left _\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\ntfae_2_to_1 : ValuationRing R → DiscreteValuationRing R\ntfae_1_to_4 : DiscreteValuationRing R → IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P\ntfae_4_to_3 : (IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P) → IsDedekindDomain R\ntfae_3_to_5 : IsDedekindDomain R → Submodule.IsPrincipal (maximalIdeal R)\ntfae_5_to_6 : Submodule.IsPrincipal (maximalIdeal R) → ∃ v _n, ∀ (w : CotangentSpace R), ∃ c, c • v = w\nx : { x // x ∈ maximalIdeal R }\nhx : Quotient.mk'' x ≠ 0\nhx' : ∀ (w : CotangentSpace R), ∃ c, c • Quotient.mk'' x = w\n⊢ maximalIdeal R ≤ Ideal.span {↑x} ⊔ maximalIdeal R • maximalIdeal R\n[PROOFSTEP]\nrintro m hm\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\ntfae_2_to_1 : ValuationRing R → DiscreteValuationRing R\ntfae_1_to_4 : DiscreteValuationRing R → IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P\ntfae_4_to_3 : (IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P) → IsDedekindDomain R\ntfae_3_to_5 : IsDedekindDomain R → Submodule.IsPrincipal (maximalIdeal R)\ntfae_5_to_6 : Submodule.IsPrincipal (maximalIdeal R) → ∃ v _n, ∀ (w : CotangentSpace R), ∃ c, c • v = w\nx : { x // x ∈ maximalIdeal R }\nhx : Quotient.mk'' x ≠ 0\nhx' : ∀ (w : CotangentSpace R), ∃ c, c • Quotient.mk'' x = w\nm : R\nhm : m ∈ maximalIdeal R\n⊢ m ∈ Ideal.span {↑x} ⊔ maximalIdeal R • maximalIdeal R\n[PROOFSTEP]\nobtain ⟨c, hc⟩ := hx' (Submodule.Quotient.mk ⟨m, hm⟩)\n[GOAL]\ncase intro\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\ntfae_2_to_1 : ValuationRing R → DiscreteValuationRing R\ntfae_1_to_4 : DiscreteValuationRing R → IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P\ntfae_4_to_3 : (IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P) → IsDedekindDomain R\ntfae_3_to_5 : IsDedekindDomain R → Submodule.IsPrincipal (maximalIdeal R)\ntfae_5_to_6 : Submodule.IsPrincipal (maximalIdeal R) → ∃ v _n, ∀ (w : CotangentSpace R), ∃ c, c • v = w\nx : { x // x ∈ maximalIdeal R }\nhx : Quotient.mk'' x ≠ 0\nhx' : ∀ (w : CotangentSpace R), ∃ c, c • Quotient.mk'' x = w\nm : R\nhm : m ∈ maximalIdeal R\nc : ResidueField R\nhc : c • Quotient.mk'' x = Submodule.Quotient.mk { val := m, property := hm }\n⊢ m ∈ Ideal.span {↑x} ⊔ maximalIdeal R • maximalIdeal R\n[PROOFSTEP]\ninduction c using Quotient.inductionOn' with\n| h c => ?_\n[GOAL]\ncase intro\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\ntfae_2_to_1 : ValuationRing R → DiscreteValuationRing R\ntfae_1_to_4 : DiscreteValuationRing R → IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P\ntfae_4_to_3 : (IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P) → IsDedekindDomain R\ntfae_3_to_5 : IsDedekindDomain R → Submodule.IsPrincipal (maximalIdeal R)\ntfae_5_to_6 : Submodule.IsPrincipal (maximalIdeal R) → ∃ v _n, ∀ (w : CotangentSpace R), ∃ c, c • v = w\nx : { x // x ∈ maximalIdeal R }\nhx : Quotient.mk'' x ≠ 0\nhx' : ∀ (w : CotangentSpace R), ∃ c, c • Quotient.mk'' x = w\nm : R\nhm : m ∈ maximalIdeal R\nc : ResidueField R\nhc : c • Quotient.mk'' x = Submodule.Quotient.mk { val := m, property := hm }\n⊢ m ∈ Ideal.span {↑x} ⊔ maximalIdeal R • maximalIdeal R\n[PROOFSTEP]\ninduction c using Quotient.inductionOn' with\n| h c => ?_\n[GOAL]\ncase intro.h\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\ntfae_2_to_1 : ValuationRing R → DiscreteValuationRing R\ntfae_1_to_4 : DiscreteValuationRing R → IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P\ntfae_4_to_3 : (IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P) → IsDedekindDomain R\ntfae_3_to_5 : IsDedekindDomain R → Submodule.IsPrincipal (maximalIdeal R)\ntfae_5_to_6 : Submodule.IsPrincipal (maximalIdeal R) → ∃ v _n, ∀ (w : CotangentSpace R), ∃ c, c • v = w\nx : { x // x ∈ maximalIdeal R }\nhx : Quotient.mk'' x ≠ 0\nhx' : ∀ (w : CotangentSpace R), ∃ c, c • Quotient.mk'' x = w\nm : R\nhm : m ∈ maximalIdeal R\nc : R\nhc : Quotient.mk'' c • Quotient.mk'' x = Submodule.Quotient.mk { val := m, property := hm }\n⊢ m ∈ Ideal.span {↑x} ⊔ maximalIdeal R • maximalIdeal R\n[PROOFSTEP]\nrw [← sub_sub_cancel (c * x) m]\n[GOAL]\ncase intro.h\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\ntfae_2_to_1 : ValuationRing R → DiscreteValuationRing R\ntfae_1_to_4 : DiscreteValuationRing R → IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P\ntfae_4_to_3 : (IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P) → IsDedekindDomain R\ntfae_3_to_5 : IsDedekindDomain R → Submodule.IsPrincipal (maximalIdeal R)\ntfae_5_to_6 : Submodule.IsPrincipal (maximalIdeal R) → ∃ v _n, ∀ (w : CotangentSpace R), ∃ c, c • v = w\nx : { x // x ∈ maximalIdeal R }\nhx : Quotient.mk'' x ≠ 0\nhx' : ∀ (w : CotangentSpace R), ∃ c, c • Quotient.mk'' x = w\nm : R\nhm : m ∈ maximalIdeal R\nc : R\nhc : Quotient.mk'' c • Quotient.mk'' x = Submodule.Quotient.mk { val := m, property := hm }\n⊢ c * ↑x - (c * ↑x - m) ∈ Ideal.span {↑x} ⊔ maximalIdeal R • maximalIdeal R\n[PROOFSTEP]\napply sub_mem _ _\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\ntfae_2_to_1 : ValuationRing R → DiscreteValuationRing R\ntfae_1_to_4 : DiscreteValuationRing R → IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P\ntfae_4_to_3 : (IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P) → IsDedekindDomain R\ntfae_3_to_5 : IsDedekindDomain R → Submodule.IsPrincipal (maximalIdeal R)\ntfae_5_to_6 : Submodule.IsPrincipal (maximalIdeal R) → ∃ v _n, ∀ (w : CotangentSpace R), ∃ c, c • v = w\nx : { x // x ∈ maximalIdeal R }\nhx : Quotient.mk'' x ≠ 0\nhx' : ∀ (w : CotangentSpace R), ∃ c, c • Quotient.mk'' x = w\nm : R\nhm : m ∈ maximalIdeal R\nc : R\nhc : Quotient.mk'' c • Quotient.mk'' x = Submodule.Quotient.mk { val := m, property := hm }\n⊢ c * ↑x ∈ Ideal.span {↑x} ⊔ maximalIdeal R • maximalIdeal R\n[PROOFSTEP]\nrefine' Ideal.mem_sup_left (Ideal.mem_span_singleton'.mpr ⟨c, rfl⟩)\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\ntfae_2_to_1 : ValuationRing R → DiscreteValuationRing R\ntfae_1_to_4 : DiscreteValuationRing R → IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P\ntfae_4_to_3 : (IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P) → IsDedekindDomain R\ntfae_3_to_5 : IsDedekindDomain R → Submodule.IsPrincipal (maximalIdeal R)\ntfae_5_to_6 : Submodule.IsPrincipal (maximalIdeal R) → ∃ v _n, ∀ (w : CotangentSpace R), ∃ c, c • v = w\nx : { x // x ∈ maximalIdeal R }\nhx : Quotient.mk'' x ≠ 0\nhx' : ∀ (w : CotangentSpace R), ∃ c, c • Quotient.mk'' x = w\nm : R\nhm : m ∈ maximalIdeal R\nc : R\nhc : Quotient.mk'' c • Quotient.mk'' x = Submodule.Quotient.mk { val := m, property := hm }\n⊢ c * ↑x - m ∈ Ideal.span {↑x} ⊔ maximalIdeal R • maximalIdeal R\n[PROOFSTEP]\nhave := (Submodule.Quotient.eq _).mp hc\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\ntfae_2_to_1 : ValuationRing R → DiscreteValuationRing R\ntfae_1_to_4 : DiscreteValuationRing R → IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P\ntfae_4_to_3 : (IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P) → IsDedekindDomain R\ntfae_3_to_5 : IsDedekindDomain R → Submodule.IsPrincipal (maximalIdeal R)\ntfae_5_to_6 : Submodule.IsPrincipal (maximalIdeal R) → ∃ v _n, ∀ (w : CotangentSpace R), ∃ c, c • v = w\nx : { x // x ∈ maximalIdeal R }\nhx : Quotient.mk'' x ≠ 0\nhx' : ∀ (w : CotangentSpace R), ∃ c, c • Quotient.mk'' x = w\nm : R\nhm : m ∈ maximalIdeal R\nc : R\nhc : Quotient.mk'' c • Quotient.mk'' x = Submodule.Quotient.mk { val := m, property := hm }\nthis : (fun x x_1 => x • x_1) c x - { val := m, property := hm } ∈ maximalIdeal R • ⊤\n⊢ c * ↑x - m ∈ Ideal.span {↑x} ⊔ maximalIdeal R • maximalIdeal R\n[PROOFSTEP]\nrw [Submodule.mem_smul_top_iff] at this \n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\ntfae_2_to_1 : ValuationRing R → DiscreteValuationRing R\ntfae_1_to_4 : DiscreteValuationRing R → IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P\ntfae_4_to_3 : (IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P) → IsDedekindDomain R\ntfae_3_to_5 : IsDedekindDomain R → Submodule.IsPrincipal (maximalIdeal R)\ntfae_5_to_6 : Submodule.IsPrincipal (maximalIdeal R) → ∃ v _n, ∀ (w : CotangentSpace R), ∃ c, c • v = w\nx : { x // x ∈ maximalIdeal R }\nhx : Quotient.mk'' x ≠ 0\nhx' : ∀ (w : CotangentSpace R), ∃ c, c • Quotient.mk'' x = w\nm : R\nhm : m ∈ maximalIdeal R\nc : R\nhc : Quotient.mk'' c • Quotient.mk'' x = Submodule.Quotient.mk { val := m, property := hm }\nthis : ↑((fun x x_1 => x • x_1) c x - { val := m, property := hm }) ∈ maximalIdeal R • maximalIdeal R\n⊢ c * ↑x - m ∈ Ideal.span {↑x} ⊔ maximalIdeal R • maximalIdeal R\n[PROOFSTEP]\nexact Ideal.mem_sup_right this\n[GOAL]\ncase h.a\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\ntfae_2_to_1 : ValuationRing R → DiscreteValuationRing R\ntfae_1_to_4 : DiscreteValuationRing R → IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P\ntfae_4_to_3 : (IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P) → IsDedekindDomain R\ntfae_3_to_5 : IsDedekindDomain R → Submodule.IsPrincipal (maximalIdeal R)\ntfae_5_to_6 : Submodule.IsPrincipal (maximalIdeal R) → ∃ v _n, ∀ (w : CotangentSpace R), ∃ c, c • v = w\nx : { x // x ∈ maximalIdeal R }\nhx : Quotient.mk'' x ≠ 0\nhx' : ∀ (w : CotangentSpace R), ∃ c, c • Quotient.mk'' x = w\nh₁ : Ideal.span {↑x} ⊔ maximalIdeal R ≤ Ideal.span {↑x} ⊔ maximalIdeal R • maximalIdeal R\n⊢ maximalIdeal R ≤ Submodule.span R {↑x}\n[PROOFSTEP]\nhave h₂ : maximalIdeal R ≤ (⊥ : Ideal R).jacobson :=\n  by\n  rw [LocalRing.jacobson_eq_maximalIdeal]\n  exact bot_ne_top\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\ntfae_2_to_1 : ValuationRing R → DiscreteValuationRing R\ntfae_1_to_4 : DiscreteValuationRing R → IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P\ntfae_4_to_3 : (IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P) → IsDedekindDomain R\ntfae_3_to_5 : IsDedekindDomain R → Submodule.IsPrincipal (maximalIdeal R)\ntfae_5_to_6 : Submodule.IsPrincipal (maximalIdeal R) → ∃ v _n, ∀ (w : CotangentSpace R), ∃ c, c • v = w\nx : { x // x ∈ maximalIdeal R }\nhx : Quotient.mk'' x ≠ 0\nhx' : ∀ (w : CotangentSpace R), ∃ c, c • Quotient.mk'' x = w\nh₁ : Ideal.span {↑x} ⊔ maximalIdeal R ≤ Ideal.span {↑x} ⊔ maximalIdeal R • maximalIdeal R\n⊢ maximalIdeal R ≤ Ideal.jacobson ⊥\n[PROOFSTEP]\nrw [LocalRing.jacobson_eq_maximalIdeal]\n[GOAL]\ncase h\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\ntfae_2_to_1 : ValuationRing R → DiscreteValuationRing R\ntfae_1_to_4 : DiscreteValuationRing R → IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P\ntfae_4_to_3 : (IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P) → IsDedekindDomain R\ntfae_3_to_5 : IsDedekindDomain R → Submodule.IsPrincipal (maximalIdeal R)\ntfae_5_to_6 : Submodule.IsPrincipal (maximalIdeal R) → ∃ v _n, ∀ (w : CotangentSpace R), ∃ c, c • v = w\nx : { x // x ∈ maximalIdeal R }\nhx : Quotient.mk'' x ≠ 0\nhx' : ∀ (w : CotangentSpace R), ∃ c, c • Quotient.mk'' x = w\nh₁ : Ideal.span {↑x} ⊔ maximalIdeal R ≤ Ideal.span {↑x} ⊔ maximalIdeal R • maximalIdeal R\n⊢ ⊥ ≠ ⊤\n[PROOFSTEP]\nexact bot_ne_top\n[GOAL]\ncase h.a\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\ntfae_2_to_1 : ValuationRing R → DiscreteValuationRing R\ntfae_1_to_4 : DiscreteValuationRing R → IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P\ntfae_4_to_3 : (IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P) → IsDedekindDomain R\ntfae_3_to_5 : IsDedekindDomain R → Submodule.IsPrincipal (maximalIdeal R)\ntfae_5_to_6 : Submodule.IsPrincipal (maximalIdeal R) → ∃ v _n, ∀ (w : CotangentSpace R), ∃ c, c • v = w\nx : { x // x ∈ maximalIdeal R }\nhx : Quotient.mk'' x ≠ 0\nhx' : ∀ (w : CotangentSpace R), ∃ c, c • Quotient.mk'' x = w\nh₁ : Ideal.span {↑x} ⊔ maximalIdeal R ≤ Ideal.span {↑x} ⊔ maximalIdeal R • maximalIdeal R\nh₂ : maximalIdeal R ≤ Ideal.jacobson ⊥\n⊢ maximalIdeal R ≤ Submodule.span R {↑x}\n[PROOFSTEP]\nhave := Submodule.smul_sup_eq_smul_sup_of_le_smul_of_le_jacobson (IsNoetherian.noetherian _) h₂ h₁\n[GOAL]\ncase h.a\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\ntfae_2_to_1 : ValuationRing R → DiscreteValuationRing R\ntfae_1_to_4 : DiscreteValuationRing R → IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P\ntfae_4_to_3 : (IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P) → IsDedekindDomain R\ntfae_3_to_5 : IsDedekindDomain R → Submodule.IsPrincipal (maximalIdeal R)\ntfae_5_to_6 : Submodule.IsPrincipal (maximalIdeal R) → ∃ v _n, ∀ (w : CotangentSpace R), ∃ c, c • v = w\nx : { x // x ∈ maximalIdeal R }\nhx : Quotient.mk'' x ≠ 0\nhx' : ∀ (w : CotangentSpace R), ∃ c, c • Quotient.mk'' x = w\nh₁ : Ideal.span {↑x} ⊔ maximalIdeal R ≤ Ideal.span {↑x} ⊔ maximalIdeal R • maximalIdeal R\nh₂ : maximalIdeal R ≤ Ideal.jacobson ⊥\nthis : Ideal.span {↑x} ⊔ maximalIdeal R • maximalIdeal R = Ideal.span {↑x} ⊔ ⊥ • maximalIdeal R\n⊢ maximalIdeal R ≤ Submodule.span R {↑x}\n[PROOFSTEP]\nrw [Submodule.bot_smul, sup_bot_eq] at this \n[GOAL]\ncase h.a\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\ntfae_2_to_1 : ValuationRing R → DiscreteValuationRing R\ntfae_1_to_4 : DiscreteValuationRing R → IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P\ntfae_4_to_3 : (IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P) → IsDedekindDomain R\ntfae_3_to_5 : IsDedekindDomain R → Submodule.IsPrincipal (maximalIdeal R)\ntfae_5_to_6 : Submodule.IsPrincipal (maximalIdeal R) → ∃ v _n, ∀ (w : CotangentSpace R), ∃ c, c • v = w\nx : { x // x ∈ maximalIdeal R }\nhx : Quotient.mk'' x ≠ 0\nhx' : ∀ (w : CotangentSpace R), ∃ c, c • Quotient.mk'' x = w\nh₁ : Ideal.span {↑x} ⊔ maximalIdeal R ≤ Ideal.span {↑x} ⊔ maximalIdeal R • maximalIdeal R\nh₂ : maximalIdeal R ≤ Ideal.jacobson ⊥\nthis : Ideal.span {↑x} ⊔ maximalIdeal R • maximalIdeal R = Ideal.span {↑x}\n⊢ maximalIdeal R ≤ Submodule.span R {↑x}\n[PROOFSTEP]\nrw [← sup_eq_left, eq_comm]\n[GOAL]\ncase h.a\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\ntfae_2_to_1 : ValuationRing R → DiscreteValuationRing R\ntfae_1_to_4 : DiscreteValuationRing R → IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P\ntfae_4_to_3 : (IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P) → IsDedekindDomain R\ntfae_3_to_5 : IsDedekindDomain R → Submodule.IsPrincipal (maximalIdeal R)\ntfae_5_to_6 : Submodule.IsPrincipal (maximalIdeal R) → ∃ v _n, ∀ (w : CotangentSpace R), ∃ c, c • v = w\nx : { x // x ∈ maximalIdeal R }\nhx : Quotient.mk'' x ≠ 0\nhx' : ∀ (w : CotangentSpace R), ∃ c, c • Quotient.mk'' x = w\nh₁ : Ideal.span {↑x} ⊔ maximalIdeal R ≤ Ideal.span {↑x} ⊔ maximalIdeal R • maximalIdeal R\nh₂ : maximalIdeal R ≤ Ideal.jacobson ⊥\nthis : Ideal.span {↑x} ⊔ maximalIdeal R • maximalIdeal R = Ideal.span {↑x}\n⊢ Submodule.span R {↑x} = Submodule.span R {↑x} ⊔ maximalIdeal R\n[PROOFSTEP]\nexact le_sup_left.antisymm (h₁.trans <| le_of_eq this)\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\ntfae_2_to_1 : ValuationRing R → DiscreteValuationRing R\ntfae_1_to_4 : DiscreteValuationRing R → IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P\ntfae_4_to_3 : (IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P) → IsDedekindDomain R\ntfae_3_to_5 : IsDedekindDomain R → Submodule.IsPrincipal (maximalIdeal R)\ntfae_5_to_6 : Submodule.IsPrincipal (maximalIdeal R) → ∃ v _n, ∀ (w : CotangentSpace R), ∃ c, c • v = w\ntfae_6_to_5 : (∃ v _n, ∀ (w : CotangentSpace R), ∃ c, c • v = w) → Submodule.IsPrincipal (maximalIdeal R)\n⊢ List.TFAE\n    [DiscreteValuationRing R, ValuationRing R, IsDedekindDomain R, IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P,\n      Submodule.IsPrincipal (maximalIdeal R), ∃ v _n, ∀ (w : CotangentSpace R), ∃ c, c • v = w,\n      ∀ (I : Ideal R), I ≠ ⊥ → ∃ n, I = maximalIdeal R ^ n]\n[PROOFSTEP]\ntfae_have 5 → 7\n[GOAL]\ncase tfae_5_to_7\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\ntfae_2_to_1 : ValuationRing R → DiscreteValuationRing R\ntfae_1_to_4 : DiscreteValuationRing R → IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P\ntfae_4_to_3 : (IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P) → IsDedekindDomain R\ntfae_3_to_5 : IsDedekindDomain R → Submodule.IsPrincipal (maximalIdeal R)\ntfae_5_to_6 : Submodule.IsPrincipal (maximalIdeal R) → ∃ v _n, ∀ (w : CotangentSpace R), ∃ c, c • v = w\ntfae_6_to_5 : (∃ v _n, ∀ (w : CotangentSpace R), ∃ c, c • v = w) → Submodule.IsPrincipal (maximalIdeal R)\n⊢ Submodule.IsPrincipal (maximalIdeal R) → ∀ (I : Ideal R), I ≠ ⊥ → ∃ n, I = maximalIdeal R ^ n\n[PROOFSTEP]\nexact exists_maximalIdeal_pow_eq_of_principal R h\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\ntfae_2_to_1 : ValuationRing R → DiscreteValuationRing R\ntfae_1_to_4 : DiscreteValuationRing R → IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P\ntfae_4_to_3 : (IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P) → IsDedekindDomain R\ntfae_3_to_5 : IsDedekindDomain R → Submodule.IsPrincipal (maximalIdeal R)\ntfae_5_to_6 : Submodule.IsPrincipal (maximalIdeal R) → ∃ v _n, ∀ (w : CotangentSpace R), ∃ c, c • v = w\ntfae_6_to_5 : (∃ v _n, ∀ (w : CotangentSpace R), ∃ c, c • v = w) → Submodule.IsPrincipal (maximalIdeal R)\ntfae_5_to_7 : Submodule.IsPrincipal (maximalIdeal R) → ∀ (I : Ideal R), I ≠ ⊥ → ∃ n, I = maximalIdeal R ^ n\n⊢ List.TFAE\n    [DiscreteValuationRing R, ValuationRing R, IsDedekindDomain R, IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P,\n      Submodule.IsPrincipal (maximalIdeal R), ∃ v _n, ∀ (w : CotangentSpace R), ∃ c, c • v = w,\n      ∀ (I : Ideal R), I ≠ ⊥ → ∃ n, I = maximalIdeal R ^ n]\n[PROOFSTEP]\ntfae_have 7 → 2\n[GOAL]\ncase tfae_7_to_2\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\ntfae_2_to_1 : ValuationRing R → DiscreteValuationRing R\ntfae_1_to_4 : DiscreteValuationRing R → IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P\ntfae_4_to_3 : (IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P) → IsDedekindDomain R\ntfae_3_to_5 : IsDedekindDomain R → Submodule.IsPrincipal (maximalIdeal R)\ntfae_5_to_6 : Submodule.IsPrincipal (maximalIdeal R) → ∃ v _n, ∀ (w : CotangentSpace R), ∃ c, c • v = w\ntfae_6_to_5 : (∃ v _n, ∀ (w : CotangentSpace R), ∃ c, c • v = w) → Submodule.IsPrincipal (maximalIdeal R)\ntfae_5_to_7 : Submodule.IsPrincipal (maximalIdeal R) → ∀ (I : Ideal R), I ≠ ⊥ → ∃ n, I = maximalIdeal R ^ n\n⊢ (∀ (I : Ideal R), I ≠ ⊥ → ∃ n, I = maximalIdeal R ^ n) → ValuationRing R\n[PROOFSTEP]\nrw [ValuationRing.iff_ideal_total]\n[GOAL]\ncase tfae_7_to_2\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\ntfae_2_to_1 : ValuationRing R → DiscreteValuationRing R\ntfae_1_to_4 : DiscreteValuationRing R → IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P\ntfae_4_to_3 : (IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P) → IsDedekindDomain R\ntfae_3_to_5 : IsDedekindDomain R → Submodule.IsPrincipal (maximalIdeal R)\ntfae_5_to_6 : Submodule.IsPrincipal (maximalIdeal R) → ∃ v _n, ∀ (w : CotangentSpace R), ∃ c, c • v = w\ntfae_6_to_5 : (∃ v _n, ∀ (w : CotangentSpace R), ∃ c, c • v = w) → Submodule.IsPrincipal (maximalIdeal R)\ntfae_5_to_7 : Submodule.IsPrincipal (maximalIdeal R) → ∀ (I : Ideal R), I ≠ ⊥ → ∃ n, I = maximalIdeal R ^ n\n⊢ (∀ (I : Ideal R), I ≠ ⊥ → ∃ n, I = maximalIdeal R ^ n) → IsTotal (Ideal R) fun x x_1 => x ≤ x_1\n[PROOFSTEP]\nintro H\n[GOAL]\ncase tfae_7_to_2\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\ntfae_2_to_1 : ValuationRing R → DiscreteValuationRing R\ntfae_1_to_4 : DiscreteValuationRing R → IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P\ntfae_4_to_3 : (IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P) → IsDedekindDomain R\ntfae_3_to_5 : IsDedekindDomain R → Submodule.IsPrincipal (maximalIdeal R)\ntfae_5_to_6 : Submodule.IsPrincipal (maximalIdeal R) → ∃ v _n, ∀ (w : CotangentSpace R), ∃ c, c • v = w\ntfae_6_to_5 : (∃ v _n, ∀ (w : CotangentSpace R), ∃ c, c • v = w) → Submodule.IsPrincipal (maximalIdeal R)\ntfae_5_to_7 : Submodule.IsPrincipal (maximalIdeal R) → ∀ (I : Ideal R), I ≠ ⊥ → ∃ n, I = maximalIdeal R ^ n\nH : ∀ (I : Ideal R), I ≠ ⊥ → ∃ n, I = maximalIdeal R ^ n\n⊢ IsTotal (Ideal R) fun x x_1 => x ≤ x_1\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase tfae_7_to_2.total\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\ntfae_2_to_1 : ValuationRing R → DiscreteValuationRing R\ntfae_1_to_4 : DiscreteValuationRing R → IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P\ntfae_4_to_3 : (IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P) → IsDedekindDomain R\ntfae_3_to_5 : IsDedekindDomain R → Submodule.IsPrincipal (maximalIdeal R)\ntfae_5_to_6 : Submodule.IsPrincipal (maximalIdeal R) → ∃ v _n, ∀ (w : CotangentSpace R), ∃ c, c • v = w\ntfae_6_to_5 : (∃ v _n, ∀ (w : CotangentSpace R), ∃ c, c • v = w) → Submodule.IsPrincipal (maximalIdeal R)\ntfae_5_to_7 : Submodule.IsPrincipal (maximalIdeal R) → ∀ (I : Ideal R), I ≠ ⊥ → ∃ n, I = maximalIdeal R ^ n\nH : ∀ (I : Ideal R), I ≠ ⊥ → ∃ n, I = maximalIdeal R ^ n\n⊢ ∀ (a b : Ideal R), a ≤ b ∨ b ≤ a\n[PROOFSTEP]\nintro I J\n[GOAL]\ncase tfae_7_to_2.total\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\ntfae_2_to_1 : ValuationRing R → DiscreteValuationRing R\ntfae_1_to_4 : DiscreteValuationRing R → IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P\ntfae_4_to_3 : (IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P) → IsDedekindDomain R\ntfae_3_to_5 : IsDedekindDomain R → Submodule.IsPrincipal (maximalIdeal R)\ntfae_5_to_6 : Submodule.IsPrincipal (maximalIdeal R) → ∃ v _n, ∀ (w : CotangentSpace R), ∃ c, c • v = w\ntfae_6_to_5 : (∃ v _n, ∀ (w : CotangentSpace R), ∃ c, c • v = w) → Submodule.IsPrincipal (maximalIdeal R)\ntfae_5_to_7 : Submodule.IsPrincipal (maximalIdeal R) → ∀ (I : Ideal R), I ≠ ⊥ → ∃ n, I = maximalIdeal R ^ n\nH : ∀ (I : Ideal R), I ≠ ⊥ → ∃ n, I = maximalIdeal R ^ n\nI J : Ideal R\n⊢ I ≤ J ∨ J ≤ I\n[PROOFSTEP]\nlet _ := Classical.decEq (Ideal R)\n[GOAL]\ncase tfae_7_to_2.total\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\ntfae_2_to_1 : ValuationRing R → DiscreteValuationRing R\ntfae_1_to_4 : DiscreteValuationRing R → IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P\ntfae_4_to_3 : (IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P) → IsDedekindDomain R\ntfae_3_to_5 : IsDedekindDomain R → Submodule.IsPrincipal (maximalIdeal R)\ntfae_5_to_6 : Submodule.IsPrincipal (maximalIdeal R) → ∃ v _n, ∀ (w : CotangentSpace R), ∃ c, c • v = w\ntfae_6_to_5 : (∃ v _n, ∀ (w : CotangentSpace R), ∃ c, c • v = w) → Submodule.IsPrincipal (maximalIdeal R)\ntfae_5_to_7 : Submodule.IsPrincipal (maximalIdeal R) → ∀ (I : Ideal R), I ≠ ⊥ → ∃ n, I = maximalIdeal R ^ n\nH : ∀ (I : Ideal R), I ≠ ⊥ → ∃ n, I = maximalIdeal R ^ n\nI J : Ideal R\nx✝ : DecidableEq (Ideal R) := Classical.decEq (Ideal R)\n⊢ I ≤ J ∨ J ≤ I\n[PROOFSTEP]\nby_cases hI : I = ⊥\n[GOAL]\ncase pos\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\ntfae_2_to_1 : ValuationRing R → DiscreteValuationRing R\ntfae_1_to_4 : DiscreteValuationRing R → IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P\ntfae_4_to_3 : (IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P) → IsDedekindDomain R\ntfae_3_to_5 : IsDedekindDomain R → Submodule.IsPrincipal (maximalIdeal R)\ntfae_5_to_6 : Submodule.IsPrincipal (maximalIdeal R) → ∃ v _n, ∀ (w : CotangentSpace R), ∃ c, c • v = w\ntfae_6_to_5 : (∃ v _n, ∀ (w : CotangentSpace R), ∃ c, c • v = w) → Submodule.IsPrincipal (maximalIdeal R)\ntfae_5_to_7 : Submodule.IsPrincipal (maximalIdeal R) → ∀ (I : Ideal R), I ≠ ⊥ → ∃ n, I = maximalIdeal R ^ n\nH : ∀ (I : Ideal R), I ≠ ⊥ → ∃ n, I = maximalIdeal R ^ n\nI J : Ideal R\nx✝ : DecidableEq (Ideal R) := Classical.decEq (Ideal R)\nhI : I = ⊥\n⊢ I ≤ J ∨ J ≤ I\n[PROOFSTEP]\nsubst hI\n[GOAL]\ncase pos\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\ntfae_2_to_1 : ValuationRing R → DiscreteValuationRing R\ntfae_1_to_4 : DiscreteValuationRing R → IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P\ntfae_4_to_3 : (IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P) → IsDedekindDomain R\ntfae_3_to_5 : IsDedekindDomain R → Submodule.IsPrincipal (maximalIdeal R)\ntfae_5_to_6 : Submodule.IsPrincipal (maximalIdeal R) → ∃ v _n, ∀ (w : CotangentSpace R), ∃ c, c • v = w\ntfae_6_to_5 : (∃ v _n, ∀ (w : CotangentSpace R), ∃ c, c • v = w) → Submodule.IsPrincipal (maximalIdeal R)\ntfae_5_to_7 : Submodule.IsPrincipal (maximalIdeal R) → ∀ (I : Ideal R), I ≠ ⊥ → ∃ n, I = maximalIdeal R ^ n\nH : ∀ (I : Ideal R), I ≠ ⊥ → ∃ n, I = maximalIdeal R ^ n\nJ : Ideal R\nx✝ : DecidableEq (Ideal R) := Classical.decEq (Ideal R)\n⊢ ⊥ ≤ J ∨ J ≤ ⊥\n[PROOFSTEP]\nleft\n[GOAL]\ncase pos.h\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\ntfae_2_to_1 : ValuationRing R → DiscreteValuationRing R\ntfae_1_to_4 : DiscreteValuationRing R → IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P\ntfae_4_to_3 : (IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P) → IsDedekindDomain R\ntfae_3_to_5 : IsDedekindDomain R → Submodule.IsPrincipal (maximalIdeal R)\ntfae_5_to_6 : Submodule.IsPrincipal (maximalIdeal R) → ∃ v _n, ∀ (w : CotangentSpace R), ∃ c, c • v = w\ntfae_6_to_5 : (∃ v _n, ∀ (w : CotangentSpace R), ∃ c, c • v = w) → Submodule.IsPrincipal (maximalIdeal R)\ntfae_5_to_7 : Submodule.IsPrincipal (maximalIdeal R) → ∀ (I : Ideal R), I ≠ ⊥ → ∃ n, I = maximalIdeal R ^ n\nH : ∀ (I : Ideal R), I ≠ ⊥ → ∃ n, I = maximalIdeal R ^ n\nJ : Ideal R\nx✝ : DecidableEq (Ideal R) := Classical.decEq (Ideal R)\n⊢ ⊥ ≤ J\n[PROOFSTEP]\nexact bot_le\n[GOAL]\ncase neg\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\ntfae_2_to_1 : ValuationRing R → DiscreteValuationRing R\ntfae_1_to_4 : DiscreteValuationRing R → IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P\ntfae_4_to_3 : (IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P) → IsDedekindDomain R\ntfae_3_to_5 : IsDedekindDomain R → Submodule.IsPrincipal (maximalIdeal R)\ntfae_5_to_6 : Submodule.IsPrincipal (maximalIdeal R) → ∃ v _n, ∀ (w : CotangentSpace R), ∃ c, c • v = w\ntfae_6_to_5 : (∃ v _n, ∀ (w : CotangentSpace R), ∃ c, c • v = w) → Submodule.IsPrincipal (maximalIdeal R)\ntfae_5_to_7 : Submodule.IsPrincipal (maximalIdeal R) → ∀ (I : Ideal R), I ≠ ⊥ → ∃ n, I = maximalIdeal R ^ n\nH : ∀ (I : Ideal R), I ≠ ⊥ → ∃ n, I = maximalIdeal R ^ n\nI J : Ideal R\nx✝ : DecidableEq (Ideal R) := Classical.decEq (Ideal R)\nhI : ¬I = ⊥\n⊢ I ≤ J ∨ J ≤ I\n[PROOFSTEP]\nby_cases hJ : J = ⊥\n[GOAL]\ncase pos\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\ntfae_2_to_1 : ValuationRing R → DiscreteValuationRing R\ntfae_1_to_4 : DiscreteValuationRing R → IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P\ntfae_4_to_3 : (IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P) → IsDedekindDomain R\ntfae_3_to_5 : IsDedekindDomain R → Submodule.IsPrincipal (maximalIdeal R)\ntfae_5_to_6 : Submodule.IsPrincipal (maximalIdeal R) → ∃ v _n, ∀ (w : CotangentSpace R), ∃ c, c • v = w\ntfae_6_to_5 : (∃ v _n, ∀ (w : CotangentSpace R), ∃ c, c • v = w) → Submodule.IsPrincipal (maximalIdeal R)\ntfae_5_to_7 : Submodule.IsPrincipal (maximalIdeal R) → ∀ (I : Ideal R), I ≠ ⊥ → ∃ n, I = maximalIdeal R ^ n\nH : ∀ (I : Ideal R), I ≠ ⊥ → ∃ n, I = maximalIdeal R ^ n\nI J : Ideal R\nx✝ : DecidableEq (Ideal R) := Classical.decEq (Ideal R)\nhI : ¬I = ⊥\nhJ : J = ⊥\n⊢ I ≤ J ∨ J ≤ I\n[PROOFSTEP]\nsubst hJ\n[GOAL]\ncase pos\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\ntfae_2_to_1 : ValuationRing R → DiscreteValuationRing R\ntfae_1_to_4 : DiscreteValuationRing R → IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P\ntfae_4_to_3 : (IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P) → IsDedekindDomain R\ntfae_3_to_5 : IsDedekindDomain R → Submodule.IsPrincipal (maximalIdeal R)\ntfae_5_to_6 : Submodule.IsPrincipal (maximalIdeal R) → ∃ v _n, ∀ (w : CotangentSpace R), ∃ c, c • v = w\ntfae_6_to_5 : (∃ v _n, ∀ (w : CotangentSpace R), ∃ c, c • v = w) → Submodule.IsPrincipal (maximalIdeal R)\ntfae_5_to_7 : Submodule.IsPrincipal (maximalIdeal R) → ∀ (I : Ideal R), I ≠ ⊥ → ∃ n, I = maximalIdeal R ^ n\nH : ∀ (I : Ideal R), I ≠ ⊥ → ∃ n, I = maximalIdeal R ^ n\nI : Ideal R\nx✝ : DecidableEq (Ideal R) := Classical.decEq (Ideal R)\nhI : ¬I = ⊥\n⊢ I ≤ ⊥ ∨ ⊥ ≤ I\n[PROOFSTEP]\nright\n[GOAL]\ncase pos.h\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\ntfae_2_to_1 : ValuationRing R → DiscreteValuationRing R\ntfae_1_to_4 : DiscreteValuationRing R → IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P\ntfae_4_to_3 : (IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P) → IsDedekindDomain R\ntfae_3_to_5 : IsDedekindDomain R → Submodule.IsPrincipal (maximalIdeal R)\ntfae_5_to_6 : Submodule.IsPrincipal (maximalIdeal R) → ∃ v _n, ∀ (w : CotangentSpace R), ∃ c, c • v = w\ntfae_6_to_5 : (∃ v _n, ∀ (w : CotangentSpace R), ∃ c, c • v = w) → Submodule.IsPrincipal (maximalIdeal R)\ntfae_5_to_7 : Submodule.IsPrincipal (maximalIdeal R) → ∀ (I : Ideal R), I ≠ ⊥ → ∃ n, I = maximalIdeal R ^ n\nH : ∀ (I : Ideal R), I ≠ ⊥ → ∃ n, I = maximalIdeal R ^ n\nI : Ideal R\nx✝ : DecidableEq (Ideal R) := Classical.decEq (Ideal R)\nhI : ¬I = ⊥\n⊢ ⊥ ≤ I\n[PROOFSTEP]\nexact bot_le\n[GOAL]\ncase neg\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\ntfae_2_to_1 : ValuationRing R → DiscreteValuationRing R\ntfae_1_to_4 : DiscreteValuationRing R → IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P\ntfae_4_to_3 : (IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P) → IsDedekindDomain R\ntfae_3_to_5 : IsDedekindDomain R → Submodule.IsPrincipal (maximalIdeal R)\ntfae_5_to_6 : Submodule.IsPrincipal (maximalIdeal R) → ∃ v _n, ∀ (w : CotangentSpace R), ∃ c, c • v = w\ntfae_6_to_5 : (∃ v _n, ∀ (w : CotangentSpace R), ∃ c, c • v = w) → Submodule.IsPrincipal (maximalIdeal R)\ntfae_5_to_7 : Submodule.IsPrincipal (maximalIdeal R) → ∀ (I : Ideal R), I ≠ ⊥ → ∃ n, I = maximalIdeal R ^ n\nH : ∀ (I : Ideal R), I ≠ ⊥ → ∃ n, I = maximalIdeal R ^ n\nI J : Ideal R\nx✝ : DecidableEq (Ideal R) := Classical.decEq (Ideal R)\nhI : ¬I = ⊥\nhJ : ¬J = ⊥\n⊢ I ≤ J ∨ J ≤ I\n[PROOFSTEP]\nobtain ⟨n, rfl⟩ := H I hI\n[GOAL]\ncase neg.intro\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\ntfae_2_to_1 : ValuationRing R → DiscreteValuationRing R\ntfae_1_to_4 : DiscreteValuationRing R → IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P\ntfae_4_to_3 : (IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P) → IsDedekindDomain R\ntfae_3_to_5 : IsDedekindDomain R → Submodule.IsPrincipal (maximalIdeal R)\ntfae_5_to_6 : Submodule.IsPrincipal (maximalIdeal R) → ∃ v _n, ∀ (w : CotangentSpace R), ∃ c, c • v = w\ntfae_6_to_5 : (∃ v _n, ∀ (w : CotangentSpace R), ∃ c, c • v = w) → Submodule.IsPrincipal (maximalIdeal R)\ntfae_5_to_7 : Submodule.IsPrincipal (maximalIdeal R) → ∀ (I : Ideal R), I ≠ ⊥ → ∃ n, I = maximalIdeal R ^ n\nH : ∀ (I : Ideal R), I ≠ ⊥ → ∃ n, I = maximalIdeal R ^ n\nJ : Ideal R\nx✝ : DecidableEq (Ideal R) := Classical.decEq (Ideal R)\nhJ : ¬J = ⊥\nn : ℕ\nhI : ¬maximalIdeal R ^ n = ⊥\n⊢ maximalIdeal R ^ n ≤ J ∨ J ≤ maximalIdeal R ^ n\n[PROOFSTEP]\nobtain ⟨m, rfl⟩ := H J hJ\n[GOAL]\ncase neg.intro.intro\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\ntfae_2_to_1 : ValuationRing R → DiscreteValuationRing R\ntfae_1_to_4 : DiscreteValuationRing R → IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P\ntfae_4_to_3 : (IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P) → IsDedekindDomain R\ntfae_3_to_5 : IsDedekindDomain R → Submodule.IsPrincipal (maximalIdeal R)\ntfae_5_to_6 : Submodule.IsPrincipal (maximalIdeal R) → ∃ v _n, ∀ (w : CotangentSpace R), ∃ c, c • v = w\ntfae_6_to_5 : (∃ v _n, ∀ (w : CotangentSpace R), ∃ c, c • v = w) → Submodule.IsPrincipal (maximalIdeal R)\ntfae_5_to_7 : Submodule.IsPrincipal (maximalIdeal R) → ∀ (I : Ideal R), I ≠ ⊥ → ∃ n, I = maximalIdeal R ^ n\nH : ∀ (I : Ideal R), I ≠ ⊥ → ∃ n, I = maximalIdeal R ^ n\nx✝ : DecidableEq (Ideal R) := Classical.decEq (Ideal R)\nn : ℕ\nhI : ¬maximalIdeal R ^ n = ⊥\nm : ℕ\nhJ : ¬maximalIdeal R ^ m = ⊥\n⊢ maximalIdeal R ^ n ≤ maximalIdeal R ^ m ∨ maximalIdeal R ^ m ≤ maximalIdeal R ^ n\n[PROOFSTEP]\ncases' le_total m n with h' h'\n[GOAL]\ncase neg.intro.intro.inl\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\ntfae_2_to_1 : ValuationRing R → DiscreteValuationRing R\ntfae_1_to_4 : DiscreteValuationRing R → IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P\ntfae_4_to_3 : (IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P) → IsDedekindDomain R\ntfae_3_to_5 : IsDedekindDomain R → Submodule.IsPrincipal (maximalIdeal R)\ntfae_5_to_6 : Submodule.IsPrincipal (maximalIdeal R) → ∃ v _n, ∀ (w : CotangentSpace R), ∃ c, c • v = w\ntfae_6_to_5 : (∃ v _n, ∀ (w : CotangentSpace R), ∃ c, c • v = w) → Submodule.IsPrincipal (maximalIdeal R)\ntfae_5_to_7 : Submodule.IsPrincipal (maximalIdeal R) → ∀ (I : Ideal R), I ≠ ⊥ → ∃ n, I = maximalIdeal R ^ n\nH : ∀ (I : Ideal R), I ≠ ⊥ → ∃ n, I = maximalIdeal R ^ n\nx✝ : DecidableEq (Ideal R) := Classical.decEq (Ideal R)\nn : ℕ\nhI : ¬maximalIdeal R ^ n = ⊥\nm : ℕ\nhJ : ¬maximalIdeal R ^ m = ⊥\nh' : m ≤ n\n⊢ maximalIdeal R ^ n ≤ maximalIdeal R ^ m ∨ maximalIdeal R ^ m ≤ maximalIdeal R ^ n\n[PROOFSTEP]\nleft\n[GOAL]\ncase neg.intro.intro.inl.h\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\ntfae_2_to_1 : ValuationRing R → DiscreteValuationRing R\ntfae_1_to_4 : DiscreteValuationRing R → IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P\ntfae_4_to_3 : (IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P) → IsDedekindDomain R\ntfae_3_to_5 : IsDedekindDomain R → Submodule.IsPrincipal (maximalIdeal R)\ntfae_5_to_6 : Submodule.IsPrincipal (maximalIdeal R) → ∃ v _n, ∀ (w : CotangentSpace R), ∃ c, c • v = w\ntfae_6_to_5 : (∃ v _n, ∀ (w : CotangentSpace R), ∃ c, c • v = w) → Submodule.IsPrincipal (maximalIdeal R)\ntfae_5_to_7 : Submodule.IsPrincipal (maximalIdeal R) → ∀ (I : Ideal R), I ≠ ⊥ → ∃ n, I = maximalIdeal R ^ n\nH : ∀ (I : Ideal R), I ≠ ⊥ → ∃ n, I = maximalIdeal R ^ n\nx✝ : DecidableEq (Ideal R) := Classical.decEq (Ideal R)\nn : ℕ\nhI : ¬maximalIdeal R ^ n = ⊥\nm : ℕ\nhJ : ¬maximalIdeal R ^ m = ⊥\nh' : m ≤ n\n⊢ maximalIdeal R ^ n ≤ maximalIdeal R ^ m\n[PROOFSTEP]\nexact Ideal.pow_le_pow h'\n[GOAL]\ncase neg.intro.intro.inr\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\ntfae_2_to_1 : ValuationRing R → DiscreteValuationRing R\ntfae_1_to_4 : DiscreteValuationRing R → IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P\ntfae_4_to_3 : (IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P) → IsDedekindDomain R\ntfae_3_to_5 : IsDedekindDomain R → Submodule.IsPrincipal (maximalIdeal R)\ntfae_5_to_6 : Submodule.IsPrincipal (maximalIdeal R) → ∃ v _n, ∀ (w : CotangentSpace R), ∃ c, c • v = w\ntfae_6_to_5 : (∃ v _n, ∀ (w : CotangentSpace R), ∃ c, c • v = w) → Submodule.IsPrincipal (maximalIdeal R)\ntfae_5_to_7 : Submodule.IsPrincipal (maximalIdeal R) → ∀ (I : Ideal R), I ≠ ⊥ → ∃ n, I = maximalIdeal R ^ n\nH : ∀ (I : Ideal R), I ≠ ⊥ → ∃ n, I = maximalIdeal R ^ n\nx✝ : DecidableEq (Ideal R) := Classical.decEq (Ideal R)\nn : ℕ\nhI : ¬maximalIdeal R ^ n = ⊥\nm : ℕ\nhJ : ¬maximalIdeal R ^ m = ⊥\nh' : n ≤ m\n⊢ maximalIdeal R ^ n ≤ maximalIdeal R ^ m ∨ maximalIdeal R ^ m ≤ maximalIdeal R ^ n\n[PROOFSTEP]\nright\n[GOAL]\ncase neg.intro.intro.inr.h\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\ntfae_2_to_1 : ValuationRing R → DiscreteValuationRing R\ntfae_1_to_4 : DiscreteValuationRing R → IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P\ntfae_4_to_3 : (IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P) → IsDedekindDomain R\ntfae_3_to_5 : IsDedekindDomain R → Submodule.IsPrincipal (maximalIdeal R)\ntfae_5_to_6 : Submodule.IsPrincipal (maximalIdeal R) → ∃ v _n, ∀ (w : CotangentSpace R), ∃ c, c • v = w\ntfae_6_to_5 : (∃ v _n, ∀ (w : CotangentSpace R), ∃ c, c • v = w) → Submodule.IsPrincipal (maximalIdeal R)\ntfae_5_to_7 : Submodule.IsPrincipal (maximalIdeal R) → ∀ (I : Ideal R), I ≠ ⊥ → ∃ n, I = maximalIdeal R ^ n\nH : ∀ (I : Ideal R), I ≠ ⊥ → ∃ n, I = maximalIdeal R ^ n\nx✝ : DecidableEq (Ideal R) := Classical.decEq (Ideal R)\nn : ℕ\nhI : ¬maximalIdeal R ^ n = ⊥\nm : ℕ\nhJ : ¬maximalIdeal R ^ m = ⊥\nh' : n ≤ m\n⊢ maximalIdeal R ^ m ≤ maximalIdeal R ^ n\n[PROOFSTEP]\nexact Ideal.pow_le_pow h'\n[GOAL]\nR : Type u_1\ninst✝⁶ : CommRing R\nK : Type u_2\ninst✝⁵ : Field K\ninst✝⁴ : Algebra R K\ninst✝³ : IsFractionRing R K\ninst✝² : IsNoetherianRing R\ninst✝¹ : LocalRing R\ninst✝ : IsDomain R\nh : ¬IsField R\nne_bot : maximalIdeal R ≠ ⊥\ntfae_1_to_2 : DiscreteValuationRing R → ValuationRing R\ntfae_2_to_1 : ValuationRing R → DiscreteValuationRing R\ntfae_1_to_4 : DiscreteValuationRing R → IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P\ntfae_4_to_3 : (IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P) → IsDedekindDomain R\ntfae_3_to_5 : IsDedekindDomain R → Submodule.IsPrincipal (maximalIdeal R)\ntfae_5_to_6 : Submodule.IsPrincipal (maximalIdeal R) → ∃ v _n, ∀ (w : CotangentSpace R), ∃ c, c • v = w\ntfae_6_to_5 : (∃ v _n, ∀ (w : CotangentSpace R), ∃ c, c • v = w) → Submodule.IsPrincipal (maximalIdeal R)\ntfae_5_to_7 : Submodule.IsPrincipal (maximalIdeal R) → ∀ (I : Ideal R), I ≠ ⊥ → ∃ n, I = maximalIdeal R ^ n\ntfae_7_to_2 : (∀ (I : Ideal R), I ≠ ⊥ → ∃ n, I = maximalIdeal R ^ n) → ValuationRing R\n⊢ List.TFAE\n    [DiscreteValuationRing R, ValuationRing R, IsDedekindDomain R, IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ Ideal.IsPrime P,\n      Submodule.IsPrincipal (maximalIdeal R), ∃ v _n, ∀ (w : CotangentSpace R), ∃ c, c • v = w,\n      ∀ (I : Ideal R), I ≠ ⊥ → ∃ n, I = maximalIdeal R ^ n]\n[PROOFSTEP]\ntfae_finish\n", "meta": {"mathlib_filename": "Mathlib.RingTheory.DiscreteValuationRing.TFAE", "llama_tokens": 94129, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.785308580887758, "lm_q2_score": 0.6442250996557036, "lm_q1q2_score": 0.5059154987828951}}
{"text": "[GOAL]\nJ : Type u_1\nC : Type u_2\ninst✝² : Category.{?u.24757, u_1} J\ninst✝¹ : Category.{?u.24761, u_2} C\ninst✝ : HasZeroMorphisms C\nF : J ⥤ ShortComplex C\n⊢ whiskerLeft F π₁Toπ₂ ≫ whiskerLeft F π₂Toπ₃ = 0\n[PROOFSTEP]\naesop_cat\n[GOAL]\nJ : Type u_1\nC : Type u_2\ninst✝² : Category.{?u.24757, u_1} J\ninst✝¹ : Category.{?u.24761, u_2} C\ninst✝ : HasZeroMorphisms C\nX✝ Y✝ : J ⥤ ShortComplex C\nφ : X✝ ⟶ Y✝\n⊢ whiskerRight φ π₁ ≫\n      ((fun F => mk (whiskerLeft F π₁Toπ₂) (whiskerLeft F π₂Toπ₃) (_ : whiskerLeft F π₁Toπ₂ ≫ whiskerLeft F π₂Toπ₃ = 0))\n          Y✝).f =\n    ((fun F => mk (whiskerLeft F π₁Toπ₂) (whiskerLeft F π₂Toπ₃) (_ : whiskerLeft F π₁Toπ₂ ≫ whiskerLeft F π₂Toπ₃ = 0))\n          X✝).f ≫\n      whiskerRight φ π₂\n[PROOFSTEP]\naesop_cat\n[GOAL]\nJ : Type u_1\nC : Type u_2\ninst✝² : Category.{?u.24757, u_1} J\ninst✝¹ : Category.{?u.24761, u_2} C\ninst✝ : HasZeroMorphisms C\nX✝ Y✝ : J ⥤ ShortComplex C\nφ : X✝ ⟶ Y✝\n⊢ whiskerRight φ π₂ ≫\n      ((fun F => mk (whiskerLeft F π₁Toπ₂) (whiskerLeft F π₂Toπ₃) (_ : whiskerLeft F π₁Toπ₂ ≫ whiskerLeft F π₂Toπ₃ = 0))\n          Y✝).g =\n    ((fun F => mk (whiskerLeft F π₁Toπ₂) (whiskerLeft F π₂Toπ₃) (_ : whiskerLeft F π₁Toπ₂ ≫ whiskerLeft F π₂Toπ₃ = 0))\n          X✝).g ≫\n      whiskerRight φ π₃\n[PROOFSTEP]\naesop_cat\n[GOAL]\nJ : Type u_1\nC : Type u_2\ninst✝² : Category.{?u.53514, u_1} J\ninst✝¹ : Category.{?u.53518, u_2} C\ninst✝ : HasZeroMorphisms C\nx✝ : ShortComplex (J ⥤ C)\n⊢ ∀ {X Y : J} (f : X ⟶ Y),\n    ((𝟭 (ShortComplex (J ⥤ C))).obj x✝).X₁.map f ≫\n        ((fun x => Iso.refl (((𝟭 (ShortComplex (J ⥤ C))).obj x✝).X₁.obj x)) Y).hom =\n      ((fun x => Iso.refl (((𝟭 (ShortComplex (J ⥤ C))).obj x✝).X₁.obj x)) X).hom ≫\n        ((functor J C ⋙ inverse J C).obj x✝).X₁.map f\n[PROOFSTEP]\naesop_cat\n[GOAL]\nJ : Type u_1\nC : Type u_2\ninst✝² : Category.{?u.53514, u_1} J\ninst✝¹ : Category.{?u.53518, u_2} C\ninst✝ : HasZeroMorphisms C\nx✝ : ShortComplex (J ⥤ C)\n⊢ ∀ {X Y : J} (f : X ⟶ Y),\n    ((𝟭 (ShortComplex (J ⥤ C))).obj x✝).X₂.map f ≫\n        ((fun x => Iso.refl (((𝟭 (ShortComplex (J ⥤ C))).obj x✝).X₂.obj x)) Y).hom =\n      ((fun x => Iso.refl (((𝟭 (ShortComplex (J ⥤ C))).obj x✝).X₂.obj x)) X).hom ≫\n        ((functor J C ⋙ inverse J C).obj x✝).X₂.map f\n[PROOFSTEP]\naesop_cat\n[GOAL]\nJ : Type u_1\nC : Type u_2\ninst✝² : Category.{?u.53514, u_1} J\ninst✝¹ : Category.{?u.53518, u_2} C\ninst✝ : HasZeroMorphisms C\nx✝ : ShortComplex (J ⥤ C)\n⊢ ∀ {X Y : J} (f : X ⟶ Y),\n    ((𝟭 (ShortComplex (J ⥤ C))).obj x✝).X₃.map f ≫\n        ((fun x => Iso.refl (((𝟭 (ShortComplex (J ⥤ C))).obj x✝).X₃.obj x)) Y).hom =\n      ((fun x => Iso.refl (((𝟭 (ShortComplex (J ⥤ C))).obj x✝).X₃.obj x)) X).hom ≫\n        ((functor J C ⋙ inverse J C).obj x✝).X₃.map f\n[PROOFSTEP]\naesop_cat\n[GOAL]\nJ : Type u_1\nC : Type u_2\ninst✝² : Category.{?u.53514, u_1} J\ninst✝¹ : Category.{?u.53518, u_2} C\ninst✝ : HasZeroMorphisms C\nx✝ : ShortComplex (J ⥤ C)\n⊢ (NatIso.ofComponents fun x => Iso.refl (((𝟭 (ShortComplex (J ⥤ C))).obj x✝).X₁.obj x)).hom ≫\n      ((functor J C ⋙ inverse J C).obj x✝).f =\n    ((𝟭 (ShortComplex (J ⥤ C))).obj x✝).f ≫\n      (NatIso.ofComponents fun x => Iso.refl (((𝟭 (ShortComplex (J ⥤ C))).obj x✝).X₂.obj x)).hom\n[PROOFSTEP]\naesop_cat\n[GOAL]\nJ : Type u_1\nC : Type u_2\ninst✝² : Category.{?u.53514, u_1} J\ninst✝¹ : Category.{?u.53518, u_2} C\ninst✝ : HasZeroMorphisms C\nx✝ : ShortComplex (J ⥤ C)\n⊢ (NatIso.ofComponents fun x => Iso.refl (((𝟭 (ShortComplex (J ⥤ C))).obj x✝).X₂.obj x)).hom ≫\n      ((functor J C ⋙ inverse J C).obj x✝).g =\n    ((𝟭 (ShortComplex (J ⥤ C))).obj x✝).g ≫\n      (NatIso.ofComponents fun x => Iso.refl (((𝟭 (ShortComplex (J ⥤ C))).obj x✝).X₃.obj x)).hom\n[PROOFSTEP]\naesop_cat\n[GOAL]\nJ : Type u_1\nC : Type u_2\ninst✝² : Category.{?u.53514, u_1} J\ninst✝¹ : Category.{?u.53518, u_2} C\ninst✝ : HasZeroMorphisms C\n⊢ ∀ {X Y : ShortComplex (J ⥤ C)} (f : X ⟶ Y),\n    (𝟭 (ShortComplex (J ⥤ C))).map f ≫\n        ((fun x =>\n              isoMk (NatIso.ofComponents fun x_1 => Iso.refl (((𝟭 (ShortComplex (J ⥤ C))).obj x).X₁.obj x_1))\n                (NatIso.ofComponents fun x_1 => Iso.refl (((𝟭 (ShortComplex (J ⥤ C))).obj x).X₂.obj x_1))\n                (NatIso.ofComponents fun x_1 => Iso.refl (((𝟭 (ShortComplex (J ⥤ C))).obj x).X₃.obj x_1)))\n            Y).hom =\n      ((fun x =>\n              isoMk (NatIso.ofComponents fun x_1 => Iso.refl (((𝟭 (ShortComplex (J ⥤ C))).obj x).X₁.obj x_1))\n                (NatIso.ofComponents fun x_1 => Iso.refl (((𝟭 (ShortComplex (J ⥤ C))).obj x).X₂.obj x_1))\n                (NatIso.ofComponents fun x_1 => Iso.refl (((𝟭 (ShortComplex (J ⥤ C))).obj x).X₃.obj x_1)))\n            X).hom ≫\n        (functor J C ⋙ inverse J C).map f\n[PROOFSTEP]\naesop_cat\n[GOAL]\nJ : Type u_1\nC : Type u_2\ninst✝² : Category.{?u.111338, u_1} J\ninst✝¹ : Category.{?u.111342, u_2} C\ninst✝ : HasZeroMorphisms C\nx✝¹ : J ⥤ ShortComplex C\nx✝ : J\n⊢ (Iso.refl (((inverse J C ⋙ functor J C).obj x✝¹).obj x✝).X₁).hom ≫ (((𝟭 (J ⥤ ShortComplex C)).obj x✝¹).obj x✝).f =\n    (((inverse J C ⋙ functor J C).obj x✝¹).obj x✝).f ≫ (Iso.refl (((inverse J C ⋙ functor J C).obj x✝¹).obj x✝).X₂).hom\n[PROOFSTEP]\naesop_cat\n[GOAL]\nJ : Type u_1\nC : Type u_2\ninst✝² : Category.{?u.111338, u_1} J\ninst✝¹ : Category.{?u.111342, u_2} C\ninst✝ : HasZeroMorphisms C\nx✝¹ : J ⥤ ShortComplex C\nx✝ : J\n⊢ (Iso.refl (((inverse J C ⋙ functor J C).obj x✝¹).obj x✝).X₂).hom ≫ (((𝟭 (J ⥤ ShortComplex C)).obj x✝¹).obj x✝).g =\n    (((inverse J C ⋙ functor J C).obj x✝¹).obj x✝).g ≫ (Iso.refl (((inverse J C ⋙ functor J C).obj x✝¹).obj x✝).X₃).hom\n[PROOFSTEP]\naesop_cat\n[GOAL]\nJ : Type u_1\nC : Type u_2\ninst✝² : Category.{?u.111338, u_1} J\ninst✝¹ : Category.{?u.111342, u_2} C\ninst✝ : HasZeroMorphisms C\nx✝ : J ⥤ ShortComplex C\n⊢ ∀ {X Y : J} (f : X ⟶ Y),\n    ((inverse J C ⋙ functor J C).obj x✝).map f ≫\n        ((fun x =>\n              isoMk (Iso.refl (((inverse J C ⋙ functor J C).obj x✝).obj x).X₁)\n                (Iso.refl (((inverse J C ⋙ functor J C).obj x✝).obj x).X₂)\n                (Iso.refl (((inverse J C ⋙ functor J C).obj x✝).obj x).X₃))\n            Y).hom =\n      ((fun x =>\n              isoMk (Iso.refl (((inverse J C ⋙ functor J C).obj x✝).obj x).X₁)\n                (Iso.refl (((inverse J C ⋙ functor J C).obj x✝).obj x).X₂)\n                (Iso.refl (((inverse J C ⋙ functor J C).obj x✝).obj x).X₃))\n            X).hom ≫\n        ((𝟭 (J ⥤ ShortComplex C)).obj x✝).map f\n[PROOFSTEP]\naesop_cat\n[GOAL]\nJ : Type u_1\nC : Type u_2\ninst✝² : Category.{?u.111338, u_1} J\ninst✝¹ : Category.{?u.111342, u_2} C\ninst✝ : HasZeroMorphisms C\n⊢ ∀ {X Y : J ⥤ ShortComplex C} (f : X ⟶ Y),\n    (inverse J C ⋙ functor J C).map f ≫\n        ((fun x =>\n              NatIso.ofComponents fun x_1 =>\n                isoMk (Iso.refl (((inverse J C ⋙ functor J C).obj x).obj x_1).X₁)\n                  (Iso.refl (((inverse J C ⋙ functor J C).obj x).obj x_1).X₂)\n                  (Iso.refl (((inverse J C ⋙ functor J C).obj x).obj x_1).X₃))\n            Y).hom =\n      ((fun x =>\n              NatIso.ofComponents fun x_1 =>\n                isoMk (Iso.refl (((inverse J C ⋙ functor J C).obj x).obj x_1).X₁)\n                  (Iso.refl (((inverse J C ⋙ functor J C).obj x).obj x_1).X₂)\n                  (Iso.refl (((inverse J C ⋙ functor J C).obj x).obj x_1).X₃))\n            X).hom ≫\n        (𝟭 (J ⥤ ShortComplex C)).map f\n[PROOFSTEP]\naesop_cat\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Homology.ShortComplex.FunctorEquivalence", "llama_tokens": 3857, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8175744850834648, "lm_q2_score": 0.6187804407739559, "lm_q1q2_score": 0.5058991002454863}}
{"text": "[GOAL]\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝ : CompleteSpace F\nsurj : Surjective ↑f\n⊢ ∃ C, C ≥ 0 ∧ ∀ (y : F), ∃ x, dist (↑f x) y ≤ 1 / 2 * ‖y‖ ∧ ‖x‖ ≤ C * ‖y‖\n[PROOFSTEP]\nhave A : ⋃ n : ℕ, closure (f '' ball 0 n) = Set.univ :=\n  by\n  refine' Subset.antisymm (subset_univ _) fun y _ => _\n  rcases surj y with ⟨x, hx⟩\n  rcases exists_nat_gt ‖x‖ with ⟨n, hn⟩\n  refine' mem_iUnion.2 ⟨n, subset_closure _⟩\n  refine' (mem_image _ _ _).2 ⟨x, ⟨_, hx⟩⟩\n  rwa [mem_ball, dist_eq_norm, sub_zero]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝ : CompleteSpace F\nsurj : Surjective ↑f\n⊢ ⋃ (n : ℕ), closure (↑f '' ball 0 ↑n) = Set.univ\n[PROOFSTEP]\nrefine' Subset.antisymm (subset_univ _) fun y _ => _\n[GOAL]\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝ : CompleteSpace F\nsurj : Surjective ↑f\ny : F\nx✝ : y ∈ Set.univ\n⊢ y ∈ ⋃ (n : ℕ), closure (↑f '' ball 0 ↑n)\n[PROOFSTEP]\nrcases surj y with ⟨x, hx⟩\n[GOAL]\ncase intro\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝ : CompleteSpace F\nsurj : Surjective ↑f\ny : F\nx✝ : y ∈ Set.univ\nx : E\nhx : ↑f x = y\n⊢ y ∈ ⋃ (n : ℕ), closure (↑f '' ball 0 ↑n)\n[PROOFSTEP]\nrcases exists_nat_gt ‖x‖ with ⟨n, hn⟩\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝ : CompleteSpace F\nsurj : Surjective ↑f\ny : F\nx✝ : y ∈ Set.univ\nx : E\nhx : ↑f x = y\nn : ℕ\nhn : ‖x‖ < ↑n\n⊢ y ∈ ⋃ (n : ℕ), closure (↑f '' ball 0 ↑n)\n[PROOFSTEP]\nrefine' mem_iUnion.2 ⟨n, subset_closure _⟩\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝ : CompleteSpace F\nsurj : Surjective ↑f\ny : F\nx✝ : y ∈ Set.univ\nx : E\nhx : ↑f x = y\nn : ℕ\nhn : ‖x‖ < ↑n\n⊢ y ∈ ↑f '' ball 0 ↑n\n[PROOFSTEP]\nrefine' (mem_image _ _ _).2 ⟨x, ⟨_, hx⟩⟩\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝ : CompleteSpace F\nsurj : Surjective ↑f\ny : F\nx✝ : y ∈ Set.univ\nx : E\nhx : ↑f x = y\nn : ℕ\nhn : ‖x‖ < ↑n\n⊢ x ∈ ball 0 ↑n\n[PROOFSTEP]\nrwa [mem_ball, dist_eq_norm, sub_zero]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝ : CompleteSpace F\nsurj : Surjective ↑f\nA : ⋃ (n : ℕ), closure (↑f '' ball 0 ↑n) = Set.univ\n⊢ ∃ C, C ≥ 0 ∧ ∀ (y : F), ∃ x, dist (↑f x) y ≤ 1 / 2 * ‖y‖ ∧ ‖x‖ ≤ C * ‖y‖\n[PROOFSTEP]\nhave : ∃ (n : ℕ) (x : _), x ∈ interior (closure (f '' ball 0 n)) :=\n  nonempty_interior_of_iUnion_of_closed (fun n => isClosed_closure) A\n[GOAL]\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝ : CompleteSpace F\nsurj : Surjective ↑f\nA : ⋃ (n : ℕ), closure (↑f '' ball 0 ↑n) = Set.univ\nthis : ∃ n x, x ∈ interior (closure (↑f '' ball 0 ↑n))\n⊢ ∃ C, C ≥ 0 ∧ ∀ (y : F), ∃ x, dist (↑f x) y ≤ 1 / 2 * ‖y‖ ∧ ‖x‖ ≤ C * ‖y‖\n[PROOFSTEP]\nsimp only [mem_interior_iff_mem_nhds, Metric.mem_nhds_iff] at this \n[GOAL]\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝ : CompleteSpace F\nsurj : Surjective ↑f\nA : ⋃ (n : ℕ), closure (↑f '' ball 0 ↑n) = Set.univ\nthis : ∃ n x ε, ε > 0 ∧ ball x ε ⊆ closure ((fun a => ↑f a) '' ball 0 ↑n)\n⊢ ∃ C, C ≥ 0 ∧ ∀ (y : F), ∃ x, dist (↑f x) y ≤ 1 / 2 * ‖y‖ ∧ ‖x‖ ≤ C * ‖y‖\n[PROOFSTEP]\nrcases this with ⟨n, a, ε, ⟨εpos, H⟩⟩\n[GOAL]\ncase intro.intro.intro.intro\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝ : CompleteSpace F\nsurj : Surjective ↑f\nA : ⋃ (n : ℕ), closure (↑f '' ball 0 ↑n) = Set.univ\nn : ℕ\na : F\nε : ℝ\nεpos : ε > 0\nH : ball a ε ⊆ closure ((fun a => ↑f a) '' ball 0 ↑n)\n⊢ ∃ C, C ≥ 0 ∧ ∀ (y : F), ∃ x, dist (↑f x) y ≤ 1 / 2 * ‖y‖ ∧ ‖x‖ ≤ C * ‖y‖\n[PROOFSTEP]\nrcases NormedField.exists_one_lt_norm 𝕜 with ⟨c, hc⟩\n[GOAL]\ncase intro.intro.intro.intro.intro\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝ : CompleteSpace F\nsurj : Surjective ↑f\nA : ⋃ (n : ℕ), closure (↑f '' ball 0 ↑n) = Set.univ\nn : ℕ\na : F\nε : ℝ\nεpos : ε > 0\nH : ball a ε ⊆ closure ((fun a => ↑f a) '' ball 0 ↑n)\nc : 𝕜\nhc : 1 < ‖c‖\n⊢ ∃ C, C ≥ 0 ∧ ∀ (y : F), ∃ x, dist (↑f x) y ≤ 1 / 2 * ‖y‖ ∧ ‖x‖ ≤ C * ‖y‖\n[PROOFSTEP]\nrefine' ⟨(ε / 2)⁻¹ * ‖c‖ * 2 * n, _, fun y => _⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.refine'_1\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝ : CompleteSpace F\nsurj : Surjective ↑f\nA : ⋃ (n : ℕ), closure (↑f '' ball 0 ↑n) = Set.univ\nn : ℕ\na : F\nε : ℝ\nεpos : ε > 0\nH : ball a ε ⊆ closure ((fun a => ↑f a) '' ball 0 ↑n)\nc : 𝕜\nhc : 1 < ‖c‖\n⊢ (ε / 2)⁻¹ * ‖c‖ * 2 * ↑n ≥ 0\n[PROOFSTEP]\nrefine' mul_nonneg (mul_nonneg (mul_nonneg _ (norm_nonneg _)) (by norm_num)) _\n[GOAL]\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝ : CompleteSpace F\nsurj : Surjective ↑f\nA : ⋃ (n : ℕ), closure (↑f '' ball 0 ↑n) = Set.univ\nn : ℕ\na : F\nε : ℝ\nεpos : ε > 0\nH : ball a ε ⊆ closure ((fun a => ↑f a) '' ball 0 ↑n)\nc : 𝕜\nhc : 1 < ‖c‖\n⊢ 0 ≤ 2\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase intro.intro.intro.intro.intro.refine'_1.refine'_1\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝ : CompleteSpace F\nsurj : Surjective ↑f\nA : ⋃ (n : ℕ), closure (↑f '' ball 0 ↑n) = Set.univ\nn : ℕ\na : F\nε : ℝ\nεpos : ε > 0\nH : ball a ε ⊆ closure ((fun a => ↑f a) '' ball 0 ↑n)\nc : 𝕜\nhc : 1 < ‖c‖\n⊢ 0 ≤ (ε / 2)⁻¹\ncase intro.intro.intro.intro.intro.refine'_1.refine'_2\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝ : CompleteSpace F\nsurj : Surjective ↑f\nA : ⋃ (n : ℕ), closure (↑f '' ball 0 ↑n) = Set.univ\nn : ℕ\na : F\nε : ℝ\nεpos : ε > 0\nH : ball a ε ⊆ closure ((fun a => ↑f a) '' ball 0 ↑n)\nc : 𝕜\nhc : 1 < ‖c‖\n⊢ 0 ≤ ↑n\n[PROOFSTEP]\nexacts [inv_nonneg.2 (div_nonneg (le_of_lt εpos) (by norm_num)), n.cast_nonneg]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝ : CompleteSpace F\nsurj : Surjective ↑f\nA : ⋃ (n : ℕ), closure (↑f '' ball 0 ↑n) = Set.univ\nn : ℕ\na : F\nε : ℝ\nεpos : ε > 0\nH : ball a ε ⊆ closure ((fun a => ↑f a) '' ball 0 ↑n)\nc : 𝕜\nhc : 1 < ‖c‖\n⊢ 0 ≤ 2\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase intro.intro.intro.intro.intro.refine'_2\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝ : CompleteSpace F\nsurj : Surjective ↑f\nA : ⋃ (n : ℕ), closure (↑f '' ball 0 ↑n) = Set.univ\nn : ℕ\na : F\nε : ℝ\nεpos : ε > 0\nH : ball a ε ⊆ closure ((fun a => ↑f a) '' ball 0 ↑n)\nc : 𝕜\nhc : 1 < ‖c‖\ny : F\n⊢ ∃ x, dist (↑f x) y ≤ 1 / 2 * ‖y‖ ∧ ‖x‖ ≤ (ε / 2)⁻¹ * ‖c‖ * 2 * ↑n * ‖y‖\n[PROOFSTEP]\nby_cases hy : y = 0\n[GOAL]\ncase pos\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝ : CompleteSpace F\nsurj : Surjective ↑f\nA : ⋃ (n : ℕ), closure (↑f '' ball 0 ↑n) = Set.univ\nn : ℕ\na : F\nε : ℝ\nεpos : ε > 0\nH : ball a ε ⊆ closure ((fun a => ↑f a) '' ball 0 ↑n)\nc : 𝕜\nhc : 1 < ‖c‖\ny : F\nhy : y = 0\n⊢ ∃ x, dist (↑f x) y ≤ 1 / 2 * ‖y‖ ∧ ‖x‖ ≤ (ε / 2)⁻¹ * ‖c‖ * 2 * ↑n * ‖y‖\n[PROOFSTEP]\nuse 0\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝ : CompleteSpace F\nsurj : Surjective ↑f\nA : ⋃ (n : ℕ), closure (↑f '' ball 0 ↑n) = Set.univ\nn : ℕ\na : F\nε : ℝ\nεpos : ε > 0\nH : ball a ε ⊆ closure ((fun a => ↑f a) '' ball 0 ↑n)\nc : 𝕜\nhc : 1 < ‖c‖\ny : F\nhy : y = 0\n⊢ dist (↑f 0) y ≤ 1 / 2 * ‖y‖ ∧ ‖0‖ ≤ (ε / 2)⁻¹ * ‖c‖ * 2 * ↑n * ‖y‖\n[PROOFSTEP]\nsimp [hy]\n[GOAL]\ncase neg\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝ : CompleteSpace F\nsurj : Surjective ↑f\nA : ⋃ (n : ℕ), closure (↑f '' ball 0 ↑n) = Set.univ\nn : ℕ\na : F\nε : ℝ\nεpos : ε > 0\nH : ball a ε ⊆ closure ((fun a => ↑f a) '' ball 0 ↑n)\nc : 𝕜\nhc : 1 < ‖c‖\ny : F\nhy : ¬y = 0\n⊢ ∃ x, dist (↑f x) y ≤ 1 / 2 * ‖y‖ ∧ ‖x‖ ≤ (ε / 2)⁻¹ * ‖c‖ * 2 * ↑n * ‖y‖\n[PROOFSTEP]\nrcases rescale_to_shell hc (half_pos εpos) hy with ⟨d, hd, ydlt, -, dinv⟩\n[GOAL]\ncase neg.intro.intro.intro.intro\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝ : CompleteSpace F\nsurj : Surjective ↑f\nA : ⋃ (n : ℕ), closure (↑f '' ball 0 ↑n) = Set.univ\nn : ℕ\na : F\nε : ℝ\nεpos : ε > 0\nH : ball a ε ⊆ closure ((fun a => ↑f a) '' ball 0 ↑n)\nc : 𝕜\nhc : 1 < ‖c‖\ny : F\nhy : ¬y = 0\nd : 𝕜\nhd : d ≠ 0\nydlt : ‖d • y‖ < ε / 2\ndinv : ‖d‖⁻¹ ≤ (ε / 2)⁻¹ * ‖c‖ * ‖y‖\n⊢ ∃ x, dist (↑f x) y ≤ 1 / 2 * ‖y‖ ∧ ‖x‖ ≤ (ε / 2)⁻¹ * ‖c‖ * 2 * ↑n * ‖y‖\n[PROOFSTEP]\nlet δ := ‖d‖ * ‖y‖ / 4\n[GOAL]\ncase neg.intro.intro.intro.intro\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝ : CompleteSpace F\nsurj : Surjective ↑f\nA : ⋃ (n : ℕ), closure (↑f '' ball 0 ↑n) = Set.univ\nn : ℕ\na : F\nε : ℝ\nεpos : ε > 0\nH : ball a ε ⊆ closure ((fun a => ↑f a) '' ball 0 ↑n)\nc : 𝕜\nhc : 1 < ‖c‖\ny : F\nhy : ¬y = 0\nd : 𝕜\nhd : d ≠ 0\nydlt : ‖d • y‖ < ε / 2\ndinv : ‖d‖⁻¹ ≤ (ε / 2)⁻¹ * ‖c‖ * ‖y‖\nδ : ℝ := ‖d‖ * ‖y‖ / 4\n⊢ ∃ x, dist (↑f x) y ≤ 1 / 2 * ‖y‖ ∧ ‖x‖ ≤ (ε / 2)⁻¹ * ‖c‖ * 2 * ↑n * ‖y‖\n[PROOFSTEP]\nhave δpos : 0 < δ := div_pos (mul_pos (norm_pos_iff.2 hd) (norm_pos_iff.2 hy)) (by norm_num)\n[GOAL]\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝ : CompleteSpace F\nsurj : Surjective ↑f\nA : ⋃ (n : ℕ), closure (↑f '' ball 0 ↑n) = Set.univ\nn : ℕ\na : F\nε : ℝ\nεpos : ε > 0\nH : ball a ε ⊆ closure ((fun a => ↑f a) '' ball 0 ↑n)\nc : 𝕜\nhc : 1 < ‖c‖\ny : F\nhy : ¬y = 0\nd : 𝕜\nhd : d ≠ 0\nydlt : ‖d • y‖ < ε / 2\ndinv : ‖d‖⁻¹ ≤ (ε / 2)⁻¹ * ‖c‖ * ‖y‖\nδ : ℝ := ‖d‖ * ‖y‖ / 4\n⊢ 0 < 4\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase neg.intro.intro.intro.intro\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝ : CompleteSpace F\nsurj : Surjective ↑f\nA : ⋃ (n : ℕ), closure (↑f '' ball 0 ↑n) = Set.univ\nn : ℕ\na : F\nε : ℝ\nεpos : ε > 0\nH : ball a ε ⊆ closure ((fun a => ↑f a) '' ball 0 ↑n)\nc : 𝕜\nhc : 1 < ‖c‖\ny : F\nhy : ¬y = 0\nd : 𝕜\nhd : d ≠ 0\nydlt : ‖d • y‖ < ε / 2\ndinv : ‖d‖⁻¹ ≤ (ε / 2)⁻¹ * ‖c‖ * ‖y‖\nδ : ℝ := ‖d‖ * ‖y‖ / 4\nδpos : 0 < δ\n⊢ ∃ x, dist (↑f x) y ≤ 1 / 2 * ‖y‖ ∧ ‖x‖ ≤ (ε / 2)⁻¹ * ‖c‖ * 2 * ↑n * ‖y‖\n[PROOFSTEP]\nhave : a + d • y ∈ ball a ε := by simp [dist_eq_norm, lt_of_le_of_lt ydlt.le (half_lt_self εpos)]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝ : CompleteSpace F\nsurj : Surjective ↑f\nA : ⋃ (n : ℕ), closure (↑f '' ball 0 ↑n) = Set.univ\nn : ℕ\na : F\nε : ℝ\nεpos : ε > 0\nH : ball a ε ⊆ closure ((fun a => ↑f a) '' ball 0 ↑n)\nc : 𝕜\nhc : 1 < ‖c‖\ny : F\nhy : ¬y = 0\nd : 𝕜\nhd : d ≠ 0\nydlt : ‖d • y‖ < ε / 2\ndinv : ‖d‖⁻¹ ≤ (ε / 2)⁻¹ * ‖c‖ * ‖y‖\nδ : ℝ := ‖d‖ * ‖y‖ / 4\nδpos : 0 < δ\n⊢ a + d • y ∈ ball a ε\n[PROOFSTEP]\nsimp [dist_eq_norm, lt_of_le_of_lt ydlt.le (half_lt_self εpos)]\n[GOAL]\ncase neg.intro.intro.intro.intro\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝ : CompleteSpace F\nsurj : Surjective ↑f\nA : ⋃ (n : ℕ), closure (↑f '' ball 0 ↑n) = Set.univ\nn : ℕ\na : F\nε : ℝ\nεpos : ε > 0\nH : ball a ε ⊆ closure ((fun a => ↑f a) '' ball 0 ↑n)\nc : 𝕜\nhc : 1 < ‖c‖\ny : F\nhy : ¬y = 0\nd : 𝕜\nhd : d ≠ 0\nydlt : ‖d • y‖ < ε / 2\ndinv : ‖d‖⁻¹ ≤ (ε / 2)⁻¹ * ‖c‖ * ‖y‖\nδ : ℝ := ‖d‖ * ‖y‖ / 4\nδpos : 0 < δ\nthis : a + d • y ∈ ball a ε\n⊢ ∃ x, dist (↑f x) y ≤ 1 / 2 * ‖y‖ ∧ ‖x‖ ≤ (ε / 2)⁻¹ * ‖c‖ * 2 * ↑n * ‖y‖\n[PROOFSTEP]\nrcases Metric.mem_closure_iff.1 (H this) _ δpos with ⟨z₁, z₁im, h₁⟩\n[GOAL]\ncase neg.intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝ : CompleteSpace F\nsurj : Surjective ↑f\nA : ⋃ (n : ℕ), closure (↑f '' ball 0 ↑n) = Set.univ\nn : ℕ\na : F\nε : ℝ\nεpos : ε > 0\nH : ball a ε ⊆ closure ((fun a => ↑f a) '' ball 0 ↑n)\nc : 𝕜\nhc : 1 < ‖c‖\ny : F\nhy : ¬y = 0\nd : 𝕜\nhd : d ≠ 0\nydlt : ‖d • y‖ < ε / 2\ndinv : ‖d‖⁻¹ ≤ (ε / 2)⁻¹ * ‖c‖ * ‖y‖\nδ : ℝ := ‖d‖ * ‖y‖ / 4\nδpos : 0 < δ\nthis : a + d • y ∈ ball a ε\nz₁ : F\nz₁im : z₁ ∈ (fun a => ↑f a) '' ball 0 ↑n\nh₁ : dist (a + d • y) z₁ < δ\n⊢ ∃ x, dist (↑f x) y ≤ 1 / 2 * ‖y‖ ∧ ‖x‖ ≤ (ε / 2)⁻¹ * ‖c‖ * 2 * ↑n * ‖y‖\n[PROOFSTEP]\nrcases(mem_image _ _ _).1 z₁im with ⟨x₁, hx₁, xz₁⟩\n[GOAL]\ncase neg.intro.intro.intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝ : CompleteSpace F\nsurj : Surjective ↑f\nA : ⋃ (n : ℕ), closure (↑f '' ball 0 ↑n) = Set.univ\nn : ℕ\na : F\nε : ℝ\nεpos : ε > 0\nH : ball a ε ⊆ closure ((fun a => ↑f a) '' ball 0 ↑n)\nc : 𝕜\nhc : 1 < ‖c‖\ny : F\nhy : ¬y = 0\nd : 𝕜\nhd : d ≠ 0\nydlt : ‖d • y‖ < ε / 2\ndinv : ‖d‖⁻¹ ≤ (ε / 2)⁻¹ * ‖c‖ * ‖y‖\nδ : ℝ := ‖d‖ * ‖y‖ / 4\nδpos : 0 < δ\nthis : a + d • y ∈ ball a ε\nz₁ : F\nz₁im : z₁ ∈ (fun a => ↑f a) '' ball 0 ↑n\nh₁ : dist (a + d • y) z₁ < δ\nx₁ : E\nhx₁ : x₁ ∈ ball 0 ↑n\nxz₁ : ↑f x₁ = z₁\n⊢ ∃ x, dist (↑f x) y ≤ 1 / 2 * ‖y‖ ∧ ‖x‖ ≤ (ε / 2)⁻¹ * ‖c‖ * 2 * ↑n * ‖y‖\n[PROOFSTEP]\nrw [← xz₁] at h₁ \n[GOAL]\ncase neg.intro.intro.intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝ : CompleteSpace F\nsurj : Surjective ↑f\nA : ⋃ (n : ℕ), closure (↑f '' ball 0 ↑n) = Set.univ\nn : ℕ\na : F\nε : ℝ\nεpos : ε > 0\nH : ball a ε ⊆ closure ((fun a => ↑f a) '' ball 0 ↑n)\nc : 𝕜\nhc : 1 < ‖c‖\ny : F\nhy : ¬y = 0\nd : 𝕜\nhd : d ≠ 0\nydlt : ‖d • y‖ < ε / 2\ndinv : ‖d‖⁻¹ ≤ (ε / 2)⁻¹ * ‖c‖ * ‖y‖\nδ : ℝ := ‖d‖ * ‖y‖ / 4\nδpos : 0 < δ\nthis : a + d • y ∈ ball a ε\nz₁ : F\nz₁im : z₁ ∈ (fun a => ↑f a) '' ball 0 ↑n\nx₁ : E\nh₁ : dist (a + d • y) (↑f x₁) < δ\nhx₁ : x₁ ∈ ball 0 ↑n\nxz₁ : ↑f x₁ = z₁\n⊢ ∃ x, dist (↑f x) y ≤ 1 / 2 * ‖y‖ ∧ ‖x‖ ≤ (ε / 2)⁻¹ * ‖c‖ * 2 * ↑n * ‖y‖\n[PROOFSTEP]\nrw [mem_ball, dist_eq_norm, sub_zero] at hx₁ \n[GOAL]\ncase neg.intro.intro.intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝ : CompleteSpace F\nsurj : Surjective ↑f\nA : ⋃ (n : ℕ), closure (↑f '' ball 0 ↑n) = Set.univ\nn : ℕ\na : F\nε : ℝ\nεpos : ε > 0\nH : ball a ε ⊆ closure ((fun a => ↑f a) '' ball 0 ↑n)\nc : 𝕜\nhc : 1 < ‖c‖\ny : F\nhy : ¬y = 0\nd : 𝕜\nhd : d ≠ 0\nydlt : ‖d • y‖ < ε / 2\ndinv : ‖d‖⁻¹ ≤ (ε / 2)⁻¹ * ‖c‖ * ‖y‖\nδ : ℝ := ‖d‖ * ‖y‖ / 4\nδpos : 0 < δ\nthis : a + d • y ∈ ball a ε\nz₁ : F\nz₁im : z₁ ∈ (fun a => ↑f a) '' ball 0 ↑n\nx₁ : E\nh₁ : dist (a + d • y) (↑f x₁) < δ\nhx₁ : ‖x₁‖ < ↑n\nxz₁ : ↑f x₁ = z₁\n⊢ ∃ x, dist (↑f x) y ≤ 1 / 2 * ‖y‖ ∧ ‖x‖ ≤ (ε / 2)⁻¹ * ‖c‖ * 2 * ↑n * ‖y‖\n[PROOFSTEP]\nhave : a ∈ ball a ε := by\n  simp\n  exact εpos\n[GOAL]\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝ : CompleteSpace F\nsurj : Surjective ↑f\nA : ⋃ (n : ℕ), closure (↑f '' ball 0 ↑n) = Set.univ\nn : ℕ\na : F\nε : ℝ\nεpos : ε > 0\nH : ball a ε ⊆ closure ((fun a => ↑f a) '' ball 0 ↑n)\nc : 𝕜\nhc : 1 < ‖c‖\ny : F\nhy : ¬y = 0\nd : 𝕜\nhd : d ≠ 0\nydlt : ‖d • y‖ < ε / 2\ndinv : ‖d‖⁻¹ ≤ (ε / 2)⁻¹ * ‖c‖ * ‖y‖\nδ : ℝ := ‖d‖ * ‖y‖ / 4\nδpos : 0 < δ\nthis : a + d • y ∈ ball a ε\nz₁ : F\nz₁im : z₁ ∈ (fun a => ↑f a) '' ball 0 ↑n\nx₁ : E\nh₁ : dist (a + d • y) (↑f x₁) < δ\nhx₁ : ‖x₁‖ < ↑n\nxz₁ : ↑f x₁ = z₁\n⊢ a ∈ ball a ε\n[PROOFSTEP]\nsimp\n[GOAL]\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝ : CompleteSpace F\nsurj : Surjective ↑f\nA : ⋃ (n : ℕ), closure (↑f '' ball 0 ↑n) = Set.univ\nn : ℕ\na : F\nε : ℝ\nεpos : ε > 0\nH : ball a ε ⊆ closure ((fun a => ↑f a) '' ball 0 ↑n)\nc : 𝕜\nhc : 1 < ‖c‖\ny : F\nhy : ¬y = 0\nd : 𝕜\nhd : d ≠ 0\nydlt : ‖d • y‖ < ε / 2\ndinv : ‖d‖⁻¹ ≤ (ε / 2)⁻¹ * ‖c‖ * ‖y‖\nδ : ℝ := ‖d‖ * ‖y‖ / 4\nδpos : 0 < δ\nthis : a + d • y ∈ ball a ε\nz₁ : F\nz₁im : z₁ ∈ (fun a => ↑f a) '' ball 0 ↑n\nx₁ : E\nh₁ : dist (a + d • y) (↑f x₁) < δ\nhx₁ : ‖x₁‖ < ↑n\nxz₁ : ↑f x₁ = z₁\n⊢ 0 < ε\n[PROOFSTEP]\nexact εpos\n[GOAL]\ncase neg.intro.intro.intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝ : CompleteSpace F\nsurj : Surjective ↑f\nA : ⋃ (n : ℕ), closure (↑f '' ball 0 ↑n) = Set.univ\nn : ℕ\na : F\nε : ℝ\nεpos : ε > 0\nH : ball a ε ⊆ closure ((fun a => ↑f a) '' ball 0 ↑n)\nc : 𝕜\nhc : 1 < ‖c‖\ny : F\nhy : ¬y = 0\nd : 𝕜\nhd : d ≠ 0\nydlt : ‖d • y‖ < ε / 2\ndinv : ‖d‖⁻¹ ≤ (ε / 2)⁻¹ * ‖c‖ * ‖y‖\nδ : ℝ := ‖d‖ * ‖y‖ / 4\nδpos : 0 < δ\nthis✝ : a + d • y ∈ ball a ε\nz₁ : F\nz₁im : z₁ ∈ (fun a => ↑f a) '' ball 0 ↑n\nx₁ : E\nh₁ : dist (a + d • y) (↑f x₁) < δ\nhx₁ : ‖x₁‖ < ↑n\nxz₁ : ↑f x₁ = z₁\nthis : a ∈ ball a ε\n⊢ ∃ x, dist (↑f x) y ≤ 1 / 2 * ‖y‖ ∧ ‖x‖ ≤ (ε / 2)⁻¹ * ‖c‖ * 2 * ↑n * ‖y‖\n[PROOFSTEP]\nrcases Metric.mem_closure_iff.1 (H this) _ δpos with ⟨z₂, z₂im, h₂⟩\n[GOAL]\ncase neg.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝ : CompleteSpace F\nsurj : Surjective ↑f\nA : ⋃ (n : ℕ), closure (↑f '' ball 0 ↑n) = Set.univ\nn : ℕ\na : F\nε : ℝ\nεpos : ε > 0\nH : ball a ε ⊆ closure ((fun a => ↑f a) '' ball 0 ↑n)\nc : 𝕜\nhc : 1 < ‖c‖\ny : F\nhy : ¬y = 0\nd : 𝕜\nhd : d ≠ 0\nydlt : ‖d • y‖ < ε / 2\ndinv : ‖d‖⁻¹ ≤ (ε / 2)⁻¹ * ‖c‖ * ‖y‖\nδ : ℝ := ‖d‖ * ‖y‖ / 4\nδpos : 0 < δ\nthis✝ : a + d • y ∈ ball a ε\nz₁ : F\nz₁im : z₁ ∈ (fun a => ↑f a) '' ball 0 ↑n\nx₁ : E\nh₁ : dist (a + d • y) (↑f x₁) < δ\nhx₁ : ‖x₁‖ < ↑n\nxz₁ : ↑f x₁ = z₁\nthis : a ∈ ball a ε\nz₂ : F\nz₂im : z₂ ∈ (fun a => ↑f a) '' ball 0 ↑n\nh₂ : dist a z₂ < δ\n⊢ ∃ x, dist (↑f x) y ≤ 1 / 2 * ‖y‖ ∧ ‖x‖ ≤ (ε / 2)⁻¹ * ‖c‖ * 2 * ↑n * ‖y‖\n[PROOFSTEP]\nrcases(mem_image _ _ _).1 z₂im with ⟨x₂, hx₂, xz₂⟩\n[GOAL]\ncase neg.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝ : CompleteSpace F\nsurj : Surjective ↑f\nA : ⋃ (n : ℕ), closure (↑f '' ball 0 ↑n) = Set.univ\nn : ℕ\na : F\nε : ℝ\nεpos : ε > 0\nH : ball a ε ⊆ closure ((fun a => ↑f a) '' ball 0 ↑n)\nc : 𝕜\nhc : 1 < ‖c‖\ny : F\nhy : ¬y = 0\nd : 𝕜\nhd : d ≠ 0\nydlt : ‖d • y‖ < ε / 2\ndinv : ‖d‖⁻¹ ≤ (ε / 2)⁻¹ * ‖c‖ * ‖y‖\nδ : ℝ := ‖d‖ * ‖y‖ / 4\nδpos : 0 < δ\nthis✝ : a + d • y ∈ ball a ε\nz₁ : F\nz₁im : z₁ ∈ (fun a => ↑f a) '' ball 0 ↑n\nx₁ : E\nh₁ : dist (a + d • y) (↑f x₁) < δ\nhx₁ : ‖x₁‖ < ↑n\nxz₁ : ↑f x₁ = z₁\nthis : a ∈ ball a ε\nz₂ : F\nz₂im : z₂ ∈ (fun a => ↑f a) '' ball 0 ↑n\nh₂ : dist a z₂ < δ\nx₂ : E\nhx₂ : x₂ ∈ ball 0 ↑n\nxz₂ : ↑f x₂ = z₂\n⊢ ∃ x, dist (↑f x) y ≤ 1 / 2 * ‖y‖ ∧ ‖x‖ ≤ (ε / 2)⁻¹ * ‖c‖ * 2 * ↑n * ‖y‖\n[PROOFSTEP]\nrw [← xz₂] at h₂ \n[GOAL]\ncase neg.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝ : CompleteSpace F\nsurj : Surjective ↑f\nA : ⋃ (n : ℕ), closure (↑f '' ball 0 ↑n) = Set.univ\nn : ℕ\na : F\nε : ℝ\nεpos : ε > 0\nH : ball a ε ⊆ closure ((fun a => ↑f a) '' ball 0 ↑n)\nc : 𝕜\nhc : 1 < ‖c‖\ny : F\nhy : ¬y = 0\nd : 𝕜\nhd : d ≠ 0\nydlt : ‖d • y‖ < ε / 2\ndinv : ‖d‖⁻¹ ≤ (ε / 2)⁻¹ * ‖c‖ * ‖y‖\nδ : ℝ := ‖d‖ * ‖y‖ / 4\nδpos : 0 < δ\nthis✝ : a + d • y ∈ ball a ε\nz₁ : F\nz₁im : z₁ ∈ (fun a => ↑f a) '' ball 0 ↑n\nx₁ : E\nh₁ : dist (a + d • y) (↑f x₁) < δ\nhx₁ : ‖x₁‖ < ↑n\nxz₁ : ↑f x₁ = z₁\nthis : a ∈ ball a ε\nz₂ : F\nz₂im : z₂ ∈ (fun a => ↑f a) '' ball 0 ↑n\nx₂ : E\nh₂ : dist a (↑f x₂) < δ\nhx₂ : x₂ ∈ ball 0 ↑n\nxz₂ : ↑f x₂ = z₂\n⊢ ∃ x, dist (↑f x) y ≤ 1 / 2 * ‖y‖ ∧ ‖x‖ ≤ (ε / 2)⁻¹ * ‖c‖ * 2 * ↑n * ‖y‖\n[PROOFSTEP]\nrw [mem_ball, dist_eq_norm, sub_zero] at hx₂ \n[GOAL]\ncase neg.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝ : CompleteSpace F\nsurj : Surjective ↑f\nA : ⋃ (n : ℕ), closure (↑f '' ball 0 ↑n) = Set.univ\nn : ℕ\na : F\nε : ℝ\nεpos : ε > 0\nH : ball a ε ⊆ closure ((fun a => ↑f a) '' ball 0 ↑n)\nc : 𝕜\nhc : 1 < ‖c‖\ny : F\nhy : ¬y = 0\nd : 𝕜\nhd : d ≠ 0\nydlt : ‖d • y‖ < ε / 2\ndinv : ‖d‖⁻¹ ≤ (ε / 2)⁻¹ * ‖c‖ * ‖y‖\nδ : ℝ := ‖d‖ * ‖y‖ / 4\nδpos : 0 < δ\nthis✝ : a + d • y ∈ ball a ε\nz₁ : F\nz₁im : z₁ ∈ (fun a => ↑f a) '' ball 0 ↑n\nx₁ : E\nh₁ : dist (a + d • y) (↑f x₁) < δ\nhx₁ : ‖x₁‖ < ↑n\nxz₁ : ↑f x₁ = z₁\nthis : a ∈ ball a ε\nz₂ : F\nz₂im : z₂ ∈ (fun a => ↑f a) '' ball 0 ↑n\nx₂ : E\nh₂ : dist a (↑f x₂) < δ\nhx₂ : ‖x₂‖ < ↑n\nxz₂ : ↑f x₂ = z₂\n⊢ ∃ x, dist (↑f x) y ≤ 1 / 2 * ‖y‖ ∧ ‖x‖ ≤ (ε / 2)⁻¹ * ‖c‖ * 2 * ↑n * ‖y‖\n[PROOFSTEP]\nlet x := x₁ - x₂\n[GOAL]\ncase neg.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝ : CompleteSpace F\nsurj : Surjective ↑f\nA : ⋃ (n : ℕ), closure (↑f '' ball 0 ↑n) = Set.univ\nn : ℕ\na : F\nε : ℝ\nεpos : ε > 0\nH : ball a ε ⊆ closure ((fun a => ↑f a) '' ball 0 ↑n)\nc : 𝕜\nhc : 1 < ‖c‖\ny : F\nhy : ¬y = 0\nd : 𝕜\nhd : d ≠ 0\nydlt : ‖d • y‖ < ε / 2\ndinv : ‖d‖⁻¹ ≤ (ε / 2)⁻¹ * ‖c‖ * ‖y‖\nδ : ℝ := ‖d‖ * ‖y‖ / 4\nδpos : 0 < δ\nthis✝ : a + d • y ∈ ball a ε\nz₁ : F\nz₁im : z₁ ∈ (fun a => ↑f a) '' ball 0 ↑n\nx₁ : E\nh₁ : dist (a + d • y) (↑f x₁) < δ\nhx₁ : ‖x₁‖ < ↑n\nxz₁ : ↑f x₁ = z₁\nthis : a ∈ ball a ε\nz₂ : F\nz₂im : z₂ ∈ (fun a => ↑f a) '' ball 0 ↑n\nx₂ : E\nh₂ : dist a (↑f x₂) < δ\nhx₂ : ‖x₂‖ < ↑n\nxz₂ : ↑f x₂ = z₂\nx : E := x₁ - x₂\n⊢ ∃ x, dist (↑f x) y ≤ 1 / 2 * ‖y‖ ∧ ‖x‖ ≤ (ε / 2)⁻¹ * ‖c‖ * 2 * ↑n * ‖y‖\n[PROOFSTEP]\nhave I : ‖f x - d • y‖ ≤ 2 * δ :=\n  calc\n    ‖f x - d • y‖ = ‖f x₁ - (a + d • y) - (f x₂ - a)‖ := by\n      congr 1\n      simp only [f.map_sub]\n      abel\n    _ ≤ ‖f x₁ - (a + d • y)‖ + ‖f x₂ - a‖ := (norm_sub_le _ _)\n    _ ≤ δ + δ := by\n      apply add_le_add\n      · rw [← dist_eq_norm, dist_comm]\n        exact le_of_lt h₁\n      · rw [← dist_eq_norm, dist_comm]\n        exact le_of_lt h₂\n    _ = 2 * δ := (two_mul _).symm\n[GOAL]\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝ : CompleteSpace F\nsurj : Surjective ↑f\nA : ⋃ (n : ℕ), closure (↑f '' ball 0 ↑n) = Set.univ\nn : ℕ\na : F\nε : ℝ\nεpos : ε > 0\nH : ball a ε ⊆ closure ((fun a => ↑f a) '' ball 0 ↑n)\nc : 𝕜\nhc : 1 < ‖c‖\ny : F\nhy : ¬y = 0\nd : 𝕜\nhd : d ≠ 0\nydlt : ‖d • y‖ < ε / 2\ndinv : ‖d‖⁻¹ ≤ (ε / 2)⁻¹ * ‖c‖ * ‖y‖\nδ : ℝ := ‖d‖ * ‖y‖ / 4\nδpos : 0 < δ\nthis✝ : a + d • y ∈ ball a ε\nz₁ : F\nz₁im : z₁ ∈ (fun a => ↑f a) '' ball 0 ↑n\nx₁ : E\nh₁ : dist (a + d • y) (↑f x₁) < δ\nhx₁ : ‖x₁‖ < ↑n\nxz₁ : ↑f x₁ = z₁\nthis : a ∈ ball a ε\nz₂ : F\nz₂im : z₂ ∈ (fun a => ↑f a) '' ball 0 ↑n\nx₂ : E\nh₂ : dist a (↑f x₂) < δ\nhx₂ : ‖x₂‖ < ↑n\nxz₂ : ↑f x₂ = z₂\nx : E := x₁ - x₂\n⊢ ‖↑f x - d • y‖ = ‖↑f x₁ - (a + d • y) - (↑f x₂ - a)‖\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_a\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝ : CompleteSpace F\nsurj : Surjective ↑f\nA : ⋃ (n : ℕ), closure (↑f '' ball 0 ↑n) = Set.univ\nn : ℕ\na : F\nε : ℝ\nεpos : ε > 0\nH : ball a ε ⊆ closure ((fun a => ↑f a) '' ball 0 ↑n)\nc : 𝕜\nhc : 1 < ‖c‖\ny : F\nhy : ¬y = 0\nd : 𝕜\nhd : d ≠ 0\nydlt : ‖d • y‖ < ε / 2\ndinv : ‖d‖⁻¹ ≤ (ε / 2)⁻¹ * ‖c‖ * ‖y‖\nδ : ℝ := ‖d‖ * ‖y‖ / 4\nδpos : 0 < δ\nthis✝ : a + d • y ∈ ball a ε\nz₁ : F\nz₁im : z₁ ∈ (fun a => ↑f a) '' ball 0 ↑n\nx₁ : E\nh₁ : dist (a + d • y) (↑f x₁) < δ\nhx₁ : ‖x₁‖ < ↑n\nxz₁ : ↑f x₁ = z₁\nthis : a ∈ ball a ε\nz₂ : F\nz₂im : z₂ ∈ (fun a => ↑f a) '' ball 0 ↑n\nx₂ : E\nh₂ : dist a (↑f x₂) < δ\nhx₂ : ‖x₂‖ < ↑n\nxz₂ : ↑f x₂ = z₂\nx : E := x₁ - x₂\n⊢ ↑f x - d • y = ↑f x₁ - (a + d • y) - (↑f x₂ - a)\n[PROOFSTEP]\nsimp only [f.map_sub]\n[GOAL]\ncase e_a\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝ : CompleteSpace F\nsurj : Surjective ↑f\nA : ⋃ (n : ℕ), closure (↑f '' ball 0 ↑n) = Set.univ\nn : ℕ\na : F\nε : ℝ\nεpos : ε > 0\nH : ball a ε ⊆ closure ((fun a => ↑f a) '' ball 0 ↑n)\nc : 𝕜\nhc : 1 < ‖c‖\ny : F\nhy : ¬y = 0\nd : 𝕜\nhd : d ≠ 0\nydlt : ‖d • y‖ < ε / 2\ndinv : ‖d‖⁻¹ ≤ (ε / 2)⁻¹ * ‖c‖ * ‖y‖\nδ : ℝ := ‖d‖ * ‖y‖ / 4\nδpos : 0 < δ\nthis✝ : a + d • y ∈ ball a ε\nz₁ : F\nz₁im : z₁ ∈ (fun a => ↑f a) '' ball 0 ↑n\nx₁ : E\nh₁ : dist (a + d • y) (↑f x₁) < δ\nhx₁ : ‖x₁‖ < ↑n\nxz₁ : ↑f x₁ = z₁\nthis : a ∈ ball a ε\nz₂ : F\nz₂im : z₂ ∈ (fun a => ↑f a) '' ball 0 ↑n\nx₂ : E\nh₂ : dist a (↑f x₂) < δ\nhx₂ : ‖x₂‖ < ↑n\nxz₂ : ↑f x₂ = z₂\nx : E := x₁ - x₂\n⊢ ↑f x₁ - ↑f x₂ - d • y = ↑f x₁ - (a + d • y) - (↑f x₂ - a)\n[PROOFSTEP]\nabel\n[GOAL]\ncase e_a\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝ : CompleteSpace F\nsurj : Surjective ↑f\nA : ⋃ (n : ℕ), closure (↑f '' ball 0 ↑n) = Set.univ\nn : ℕ\na : F\nε : ℝ\nεpos : ε > 0\nH : ball a ε ⊆ closure ((fun a => ↑f a) '' ball 0 ↑n)\nc : 𝕜\nhc : 1 < ‖c‖\ny : F\nhy : ¬y = 0\nd : 𝕜\nhd : d ≠ 0\nydlt : ‖d • y‖ < ε / 2\ndinv : ‖d‖⁻¹ ≤ (ε / 2)⁻¹ * ‖c‖ * ‖y‖\nδ : ℝ := ‖d‖ * ‖y‖ / 4\nδpos : 0 < δ\nthis✝ : a + d • y ∈ ball a ε\nz₁ : F\nz₁im : z₁ ∈ (fun a => ↑f a) '' ball 0 ↑n\nx₁ : E\nh₁ : dist (a + d • y) (↑f x₁) < δ\nhx₁ : ‖x₁‖ < ↑n\nxz₁ : ↑f x₁ = z₁\nthis : a ∈ ball a ε\nz₂ : F\nz₂im : z₂ ∈ (fun a => ↑f a) '' ball 0 ↑n\nx₂ : E\nh₂ : dist a (↑f x₂) < δ\nhx₂ : ‖x₂‖ < ↑n\nxz₂ : ↑f x₂ = z₂\nx : E := x₁ - x₂\n⊢ ↑f x₁ - ↑f x₂ - d • y = ↑f x₁ - (a + d • y) - (↑f x₂ - a)\n[PROOFSTEP]\nabel\n[GOAL]\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝ : CompleteSpace F\nsurj : Surjective ↑f\nA : ⋃ (n : ℕ), closure (↑f '' ball 0 ↑n) = Set.univ\nn : ℕ\na : F\nε : ℝ\nεpos : ε > 0\nH : ball a ε ⊆ closure ((fun a => ↑f a) '' ball 0 ↑n)\nc : 𝕜\nhc : 1 < ‖c‖\ny : F\nhy : ¬y = 0\nd : 𝕜\nhd : d ≠ 0\nydlt : ‖d • y‖ < ε / 2\ndinv : ‖d‖⁻¹ ≤ (ε / 2)⁻¹ * ‖c‖ * ‖y‖\nδ : ℝ := ‖d‖ * ‖y‖ / 4\nδpos : 0 < δ\nthis✝ : a + d • y ∈ ball a ε\nz₁ : F\nz₁im : z₁ ∈ (fun a => ↑f a) '' ball 0 ↑n\nx₁ : E\nh₁ : dist (a + d • y) (↑f x₁) < δ\nhx₁ : ‖x₁‖ < ↑n\nxz₁ : ↑f x₁ = z₁\nthis : a ∈ ball a ε\nz₂ : F\nz₂im : z₂ ∈ (fun a => ↑f a) '' ball 0 ↑n\nx₂ : E\nh₂ : dist a (↑f x₂) < δ\nhx₂ : ‖x₂‖ < ↑n\nxz₂ : ↑f x₂ = z₂\nx : E := x₁ - x₂\n⊢ ‖↑f x₁ - (a + d • y)‖ + ‖↑f x₂ - a‖ ≤ δ + δ\n[PROOFSTEP]\napply add_le_add\n[GOAL]\ncase h₁\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝ : CompleteSpace F\nsurj : Surjective ↑f\nA : ⋃ (n : ℕ), closure (↑f '' ball 0 ↑n) = Set.univ\nn : ℕ\na : F\nε : ℝ\nεpos : ε > 0\nH : ball a ε ⊆ closure ((fun a => ↑f a) '' ball 0 ↑n)\nc : 𝕜\nhc : 1 < ‖c‖\ny : F\nhy : ¬y = 0\nd : 𝕜\nhd : d ≠ 0\nydlt : ‖d • y‖ < ε / 2\ndinv : ‖d‖⁻¹ ≤ (ε / 2)⁻¹ * ‖c‖ * ‖y‖\nδ : ℝ := ‖d‖ * ‖y‖ / 4\nδpos : 0 < δ\nthis✝ : a + d • y ∈ ball a ε\nz₁ : F\nz₁im : z₁ ∈ (fun a => ↑f a) '' ball 0 ↑n\nx₁ : E\nh₁ : dist (a + d • y) (↑f x₁) < δ\nhx₁ : ‖x₁‖ < ↑n\nxz₁ : ↑f x₁ = z₁\nthis : a ∈ ball a ε\nz₂ : F\nz₂im : z₂ ∈ (fun a => ↑f a) '' ball 0 ↑n\nx₂ : E\nh₂ : dist a (↑f x₂) < δ\nhx₂ : ‖x₂‖ < ↑n\nxz₂ : ↑f x₂ = z₂\nx : E := x₁ - x₂\n⊢ ‖↑f x₁ - (a + d • y)‖ ≤ δ\n[PROOFSTEP]\nrw [← dist_eq_norm, dist_comm]\n[GOAL]\ncase h₁\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝ : CompleteSpace F\nsurj : Surjective ↑f\nA : ⋃ (n : ℕ), closure (↑f '' ball 0 ↑n) = Set.univ\nn : ℕ\na : F\nε : ℝ\nεpos : ε > 0\nH : ball a ε ⊆ closure ((fun a => ↑f a) '' ball 0 ↑n)\nc : 𝕜\nhc : 1 < ‖c‖\ny : F\nhy : ¬y = 0\nd : 𝕜\nhd : d ≠ 0\nydlt : ‖d • y‖ < ε / 2\ndinv : ‖d‖⁻¹ ≤ (ε / 2)⁻¹ * ‖c‖ * ‖y‖\nδ : ℝ := ‖d‖ * ‖y‖ / 4\nδpos : 0 < δ\nthis✝ : a + d • y ∈ ball a ε\nz₁ : F\nz₁im : z₁ ∈ (fun a => ↑f a) '' ball 0 ↑n\nx₁ : E\nh₁ : dist (a + d • y) (↑f x₁) < δ\nhx₁ : ‖x₁‖ < ↑n\nxz₁ : ↑f x₁ = z₁\nthis : a ∈ ball a ε\nz₂ : F\nz₂im : z₂ ∈ (fun a => ↑f a) '' ball 0 ↑n\nx₂ : E\nh₂ : dist a (↑f x₂) < δ\nhx₂ : ‖x₂‖ < ↑n\nxz₂ : ↑f x₂ = z₂\nx : E := x₁ - x₂\n⊢ dist (a + d • y) (↑f x₁) ≤ δ\n[PROOFSTEP]\nexact le_of_lt h₁\n[GOAL]\ncase h₂\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝ : CompleteSpace F\nsurj : Surjective ↑f\nA : ⋃ (n : ℕ), closure (↑f '' ball 0 ↑n) = Set.univ\nn : ℕ\na : F\nε : ℝ\nεpos : ε > 0\nH : ball a ε ⊆ closure ((fun a => ↑f a) '' ball 0 ↑n)\nc : 𝕜\nhc : 1 < ‖c‖\ny : F\nhy : ¬y = 0\nd : 𝕜\nhd : d ≠ 0\nydlt : ‖d • y‖ < ε / 2\ndinv : ‖d‖⁻¹ ≤ (ε / 2)⁻¹ * ‖c‖ * ‖y‖\nδ : ℝ := ‖d‖ * ‖y‖ / 4\nδpos : 0 < δ\nthis✝ : a + d • y ∈ ball a ε\nz₁ : F\nz₁im : z₁ ∈ (fun a => ↑f a) '' ball 0 ↑n\nx₁ : E\nh₁ : dist (a + d • y) (↑f x₁) < δ\nhx₁ : ‖x₁‖ < ↑n\nxz₁ : ↑f x₁ = z₁\nthis : a ∈ ball a ε\nz₂ : F\nz₂im : z₂ ∈ (fun a => ↑f a) '' ball 0 ↑n\nx₂ : E\nh₂ : dist a (↑f x₂) < δ\nhx₂ : ‖x₂‖ < ↑n\nxz₂ : ↑f x₂ = z₂\nx : E := x₁ - x₂\n⊢ ‖↑f x₂ - a‖ ≤ δ\n[PROOFSTEP]\nrw [← dist_eq_norm, dist_comm]\n[GOAL]\ncase h₂\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝ : CompleteSpace F\nsurj : Surjective ↑f\nA : ⋃ (n : ℕ), closure (↑f '' ball 0 ↑n) = Set.univ\nn : ℕ\na : F\nε : ℝ\nεpos : ε > 0\nH : ball a ε ⊆ closure ((fun a => ↑f a) '' ball 0 ↑n)\nc : 𝕜\nhc : 1 < ‖c‖\ny : F\nhy : ¬y = 0\nd : 𝕜\nhd : d ≠ 0\nydlt : ‖d • y‖ < ε / 2\ndinv : ‖d‖⁻¹ ≤ (ε / 2)⁻¹ * ‖c‖ * ‖y‖\nδ : ℝ := ‖d‖ * ‖y‖ / 4\nδpos : 0 < δ\nthis✝ : a + d • y ∈ ball a ε\nz₁ : F\nz₁im : z₁ ∈ (fun a => ↑f a) '' ball 0 ↑n\nx₁ : E\nh₁ : dist (a + d • y) (↑f x₁) < δ\nhx₁ : ‖x₁‖ < ↑n\nxz₁ : ↑f x₁ = z₁\nthis : a ∈ ball a ε\nz₂ : F\nz₂im : z₂ ∈ (fun a => ↑f a) '' ball 0 ↑n\nx₂ : E\nh₂ : dist a (↑f x₂) < δ\nhx₂ : ‖x₂‖ < ↑n\nxz₂ : ↑f x₂ = z₂\nx : E := x₁ - x₂\n⊢ dist a (↑f x₂) ≤ δ\n[PROOFSTEP]\nexact le_of_lt h₂\n[GOAL]\ncase neg.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝ : CompleteSpace F\nsurj : Surjective ↑f\nA : ⋃ (n : ℕ), closure (↑f '' ball 0 ↑n) = Set.univ\nn : ℕ\na : F\nε : ℝ\nεpos : ε > 0\nH : ball a ε ⊆ closure ((fun a => ↑f a) '' ball 0 ↑n)\nc : 𝕜\nhc : 1 < ‖c‖\ny : F\nhy : ¬y = 0\nd : 𝕜\nhd : d ≠ 0\nydlt : ‖d • y‖ < ε / 2\ndinv : ‖d‖⁻¹ ≤ (ε / 2)⁻¹ * ‖c‖ * ‖y‖\nδ : ℝ := ‖d‖ * ‖y‖ / 4\nδpos : 0 < δ\nthis✝ : a + d • y ∈ ball a ε\nz₁ : F\nz₁im : z₁ ∈ (fun a => ↑f a) '' ball 0 ↑n\nx₁ : E\nh₁ : dist (a + d • y) (↑f x₁) < δ\nhx₁ : ‖x₁‖ < ↑n\nxz₁ : ↑f x₁ = z₁\nthis : a ∈ ball a ε\nz₂ : F\nz₂im : z₂ ∈ (fun a => ↑f a) '' ball 0 ↑n\nx₂ : E\nh₂ : dist a (↑f x₂) < δ\nhx₂ : ‖x₂‖ < ↑n\nxz₂ : ↑f x₂ = z₂\nx : E := x₁ - x₂\nI : ‖↑f x - d • y‖ ≤ 2 * δ\n⊢ ∃ x, dist (↑f x) y ≤ 1 / 2 * ‖y‖ ∧ ‖x‖ ≤ (ε / 2)⁻¹ * ‖c‖ * 2 * ↑n * ‖y‖\n[PROOFSTEP]\nhave J : ‖f (d⁻¹ • x) - y‖ ≤ 1 / 2 * ‖y‖ :=\n  calc\n    ‖f (d⁻¹ • x) - y‖ = ‖d⁻¹ • f x - (d⁻¹ * d) • y‖ := by rwa [f.map_smul _, inv_mul_cancel, one_smul]\n    _ = ‖d⁻¹ • (f x - d • y)‖ := by rw [mul_smul, smul_sub]\n    _ = ‖d‖⁻¹ * ‖f x - d • y‖ := by rw [norm_smul, norm_inv]\n    _ ≤ ‖d‖⁻¹ * (2 * δ) := by\n      apply mul_le_mul_of_nonneg_left I\n      rw [inv_nonneg]\n      exact norm_nonneg _\n    _ = ‖d‖⁻¹ * ‖d‖ * ‖y‖ / 2 := by\n      simp only\n      ring\n    _ = ‖y‖ / 2 := by\n      rw [inv_mul_cancel, one_mul]\n      simp [norm_eq_zero, hd]\n    _ = 1 / 2 * ‖y‖ := by ring\n[GOAL]\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝ : CompleteSpace F\nsurj : Surjective ↑f\nA : ⋃ (n : ℕ), closure (↑f '' ball 0 ↑n) = Set.univ\nn : ℕ\na : F\nε : ℝ\nεpos : ε > 0\nH : ball a ε ⊆ closure ((fun a => ↑f a) '' ball 0 ↑n)\nc : 𝕜\nhc : 1 < ‖c‖\ny : F\nhy : ¬y = 0\nd : 𝕜\nhd : d ≠ 0\nydlt : ‖d • y‖ < ε / 2\ndinv : ‖d‖⁻¹ ≤ (ε / 2)⁻¹ * ‖c‖ * ‖y‖\nδ : ℝ := ‖d‖ * ‖y‖ / 4\nδpos : 0 < δ\nthis✝ : a + d • y ∈ ball a ε\nz₁ : F\nz₁im : z₁ ∈ (fun a => ↑f a) '' ball 0 ↑n\nx₁ : E\nh₁ : dist (a + d • y) (↑f x₁) < δ\nhx₁ : ‖x₁‖ < ↑n\nxz₁ : ↑f x₁ = z₁\nthis : a ∈ ball a ε\nz₂ : F\nz₂im : z₂ ∈ (fun a => ↑f a) '' ball 0 ↑n\nx₂ : E\nh₂ : dist a (↑f x₂) < δ\nhx₂ : ‖x₂‖ < ↑n\nxz₂ : ↑f x₂ = z₂\nx : E := x₁ - x₂\nI : ‖↑f x - d • y‖ ≤ 2 * δ\n⊢ ‖↑f (d⁻¹ • x) - y‖ = ‖d⁻¹ • ↑f x - (d⁻¹ * d) • y‖\n[PROOFSTEP]\nrwa [f.map_smul _, inv_mul_cancel, one_smul]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝ : CompleteSpace F\nsurj : Surjective ↑f\nA : ⋃ (n : ℕ), closure (↑f '' ball 0 ↑n) = Set.univ\nn : ℕ\na : F\nε : ℝ\nεpos : ε > 0\nH : ball a ε ⊆ closure ((fun a => ↑f a) '' ball 0 ↑n)\nc : 𝕜\nhc : 1 < ‖c‖\ny : F\nhy : ¬y = 0\nd : 𝕜\nhd : d ≠ 0\nydlt : ‖d • y‖ < ε / 2\ndinv : ‖d‖⁻¹ ≤ (ε / 2)⁻¹ * ‖c‖ * ‖y‖\nδ : ℝ := ‖d‖ * ‖y‖ / 4\nδpos : 0 < δ\nthis✝ : a + d • y ∈ ball a ε\nz₁ : F\nz₁im : z₁ ∈ (fun a => ↑f a) '' ball 0 ↑n\nx₁ : E\nh₁ : dist (a + d • y) (↑f x₁) < δ\nhx₁ : ‖x₁‖ < ↑n\nxz₁ : ↑f x₁ = z₁\nthis : a ∈ ball a ε\nz₂ : F\nz₂im : z₂ ∈ (fun a => ↑f a) '' ball 0 ↑n\nx₂ : E\nh₂ : dist a (↑f x₂) < δ\nhx₂ : ‖x₂‖ < ↑n\nxz₂ : ↑f x₂ = z₂\nx : E := x₁ - x₂\nI : ‖↑f x - d • y‖ ≤ 2 * δ\n⊢ ‖d⁻¹ • ↑f x - (d⁻¹ * d) • y‖ = ‖d⁻¹ • (↑f x - d • y)‖\n[PROOFSTEP]\nrw [mul_smul, smul_sub]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝ : CompleteSpace F\nsurj : Surjective ↑f\nA : ⋃ (n : ℕ), closure (↑f '' ball 0 ↑n) = Set.univ\nn : ℕ\na : F\nε : ℝ\nεpos : ε > 0\nH : ball a ε ⊆ closure ((fun a => ↑f a) '' ball 0 ↑n)\nc : 𝕜\nhc : 1 < ‖c‖\ny : F\nhy : ¬y = 0\nd : 𝕜\nhd : d ≠ 0\nydlt : ‖d • y‖ < ε / 2\ndinv : ‖d‖⁻¹ ≤ (ε / 2)⁻¹ * ‖c‖ * ‖y‖\nδ : ℝ := ‖d‖ * ‖y‖ / 4\nδpos : 0 < δ\nthis✝ : a + d • y ∈ ball a ε\nz₁ : F\nz₁im : z₁ ∈ (fun a => ↑f a) '' ball 0 ↑n\nx₁ : E\nh₁ : dist (a + d • y) (↑f x₁) < δ\nhx₁ : ‖x₁‖ < ↑n\nxz₁ : ↑f x₁ = z₁\nthis : a ∈ ball a ε\nz₂ : F\nz₂im : z₂ ∈ (fun a => ↑f a) '' ball 0 ↑n\nx₂ : E\nh₂ : dist a (↑f x₂) < δ\nhx₂ : ‖x₂‖ < ↑n\nxz₂ : ↑f x₂ = z₂\nx : E := x₁ - x₂\nI : ‖↑f x - d • y‖ ≤ 2 * δ\n⊢ ‖d⁻¹ • (↑f x - d • y)‖ = ‖d‖⁻¹ * ‖↑f x - d • y‖\n[PROOFSTEP]\nrw [norm_smul, norm_inv]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝ : CompleteSpace F\nsurj : Surjective ↑f\nA : ⋃ (n : ℕ), closure (↑f '' ball 0 ↑n) = Set.univ\nn : ℕ\na : F\nε : ℝ\nεpos : ε > 0\nH : ball a ε ⊆ closure ((fun a => ↑f a) '' ball 0 ↑n)\nc : 𝕜\nhc : 1 < ‖c‖\ny : F\nhy : ¬y = 0\nd : 𝕜\nhd : d ≠ 0\nydlt : ‖d • y‖ < ε / 2\ndinv : ‖d‖⁻¹ ≤ (ε / 2)⁻¹ * ‖c‖ * ‖y‖\nδ : ℝ := ‖d‖ * ‖y‖ / 4\nδpos : 0 < δ\nthis✝ : a + d • y ∈ ball a ε\nz₁ : F\nz₁im : z₁ ∈ (fun a => ↑f a) '' ball 0 ↑n\nx₁ : E\nh₁ : dist (a + d • y) (↑f x₁) < δ\nhx₁ : ‖x₁‖ < ↑n\nxz₁ : ↑f x₁ = z₁\nthis : a ∈ ball a ε\nz₂ : F\nz₂im : z₂ ∈ (fun a => ↑f a) '' ball 0 ↑n\nx₂ : E\nh₂ : dist a (↑f x₂) < δ\nhx₂ : ‖x₂‖ < ↑n\nxz₂ : ↑f x₂ = z₂\nx : E := x₁ - x₂\nI : ‖↑f x - d • y‖ ≤ 2 * δ\n⊢ ‖d‖⁻¹ * ‖↑f x - d • y‖ ≤ ‖d‖⁻¹ * (2 * δ)\n[PROOFSTEP]\napply mul_le_mul_of_nonneg_left I\n[GOAL]\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝ : CompleteSpace F\nsurj : Surjective ↑f\nA : ⋃ (n : ℕ), closure (↑f '' ball 0 ↑n) = Set.univ\nn : ℕ\na : F\nε : ℝ\nεpos : ε > 0\nH : ball a ε ⊆ closure ((fun a => ↑f a) '' ball 0 ↑n)\nc : 𝕜\nhc : 1 < ‖c‖\ny : F\nhy : ¬y = 0\nd : 𝕜\nhd : d ≠ 0\nydlt : ‖d • y‖ < ε / 2\ndinv : ‖d‖⁻¹ ≤ (ε / 2)⁻¹ * ‖c‖ * ‖y‖\nδ : ℝ := ‖d‖ * ‖y‖ / 4\nδpos : 0 < δ\nthis✝ : a + d • y ∈ ball a ε\nz₁ : F\nz₁im : z₁ ∈ (fun a => ↑f a) '' ball 0 ↑n\nx₁ : E\nh₁ : dist (a + d • y) (↑f x₁) < δ\nhx₁ : ‖x₁‖ < ↑n\nxz₁ : ↑f x₁ = z₁\nthis : a ∈ ball a ε\nz₂ : F\nz₂im : z₂ ∈ (fun a => ↑f a) '' ball 0 ↑n\nx₂ : E\nh₂ : dist a (↑f x₂) < δ\nhx₂ : ‖x₂‖ < ↑n\nxz₂ : ↑f x₂ = z₂\nx : E := x₁ - x₂\nI : ‖↑f x - d • y‖ ≤ 2 * δ\n⊢ 0 ≤ ‖d‖⁻¹\n[PROOFSTEP]\nrw [inv_nonneg]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝ : CompleteSpace F\nsurj : Surjective ↑f\nA : ⋃ (n : ℕ), closure (↑f '' ball 0 ↑n) = Set.univ\nn : ℕ\na : F\nε : ℝ\nεpos : ε > 0\nH : ball a ε ⊆ closure ((fun a => ↑f a) '' ball 0 ↑n)\nc : 𝕜\nhc : 1 < ‖c‖\ny : F\nhy : ¬y = 0\nd : 𝕜\nhd : d ≠ 0\nydlt : ‖d • y‖ < ε / 2\ndinv : ‖d‖⁻¹ ≤ (ε / 2)⁻¹ * ‖c‖ * ‖y‖\nδ : ℝ := ‖d‖ * ‖y‖ / 4\nδpos : 0 < δ\nthis✝ : a + d • y ∈ ball a ε\nz₁ : F\nz₁im : z₁ ∈ (fun a => ↑f a) '' ball 0 ↑n\nx₁ : E\nh₁ : dist (a + d • y) (↑f x₁) < δ\nhx₁ : ‖x₁‖ < ↑n\nxz₁ : ↑f x₁ = z₁\nthis : a ∈ ball a ε\nz₂ : F\nz₂im : z₂ ∈ (fun a => ↑f a) '' ball 0 ↑n\nx₂ : E\nh₂ : dist a (↑f x₂) < δ\nhx₂ : ‖x₂‖ < ↑n\nxz₂ : ↑f x₂ = z₂\nx : E := x₁ - x₂\nI : ‖↑f x - d • y‖ ≤ 2 * δ\n⊢ 0 ≤ ‖d‖\n[PROOFSTEP]\nexact norm_nonneg _\n[GOAL]\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝ : CompleteSpace F\nsurj : Surjective ↑f\nA : ⋃ (n : ℕ), closure (↑f '' ball 0 ↑n) = Set.univ\nn : ℕ\na : F\nε : ℝ\nεpos : ε > 0\nH : ball a ε ⊆ closure ((fun a => ↑f a) '' ball 0 ↑n)\nc : 𝕜\nhc : 1 < ‖c‖\ny : F\nhy : ¬y = 0\nd : 𝕜\nhd : d ≠ 0\nydlt : ‖d • y‖ < ε / 2\ndinv : ‖d‖⁻¹ ≤ (ε / 2)⁻¹ * ‖c‖ * ‖y‖\nδ : ℝ := ‖d‖ * ‖y‖ / 4\nδpos : 0 < δ\nthis✝ : a + d • y ∈ ball a ε\nz₁ : F\nz₁im : z₁ ∈ (fun a => ↑f a) '' ball 0 ↑n\nx₁ : E\nh₁ : dist (a + d • y) (↑f x₁) < δ\nhx₁ : ‖x₁‖ < ↑n\nxz₁ : ↑f x₁ = z₁\nthis : a ∈ ball a ε\nz₂ : F\nz₂im : z₂ ∈ (fun a => ↑f a) '' ball 0 ↑n\nx₂ : E\nh₂ : dist a (↑f x₂) < δ\nhx₂ : ‖x₂‖ < ↑n\nxz₂ : ↑f x₂ = z₂\nx : E := x₁ - x₂\nI : ‖↑f x - d • y‖ ≤ 2 * δ\n⊢ ‖d‖⁻¹ * (2 * δ) = ‖d‖⁻¹ * ‖d‖ * ‖y‖ / 2\n[PROOFSTEP]\nsimp only\n[GOAL]\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝ : CompleteSpace F\nsurj : Surjective ↑f\nA : ⋃ (n : ℕ), closure (↑f '' ball 0 ↑n) = Set.univ\nn : ℕ\na : F\nε : ℝ\nεpos : ε > 0\nH : ball a ε ⊆ closure ((fun a => ↑f a) '' ball 0 ↑n)\nc : 𝕜\nhc : 1 < ‖c‖\ny : F\nhy : ¬y = 0\nd : 𝕜\nhd : d ≠ 0\nydlt : ‖d • y‖ < ε / 2\ndinv : ‖d‖⁻¹ ≤ (ε / 2)⁻¹ * ‖c‖ * ‖y‖\nδ : ℝ := ‖d‖ * ‖y‖ / 4\nδpos : 0 < δ\nthis✝ : a + d • y ∈ ball a ε\nz₁ : F\nz₁im : z₁ ∈ (fun a => ↑f a) '' ball 0 ↑n\nx₁ : E\nh₁ : dist (a + d • y) (↑f x₁) < δ\nhx₁ : ‖x₁‖ < ↑n\nxz₁ : ↑f x₁ = z₁\nthis : a ∈ ball a ε\nz₂ : F\nz₂im : z₂ ∈ (fun a => ↑f a) '' ball 0 ↑n\nx₂ : E\nh₂ : dist a (↑f x₂) < δ\nhx₂ : ‖x₂‖ < ↑n\nxz₂ : ↑f x₂ = z₂\nx : E := x₁ - x₂\nI : ‖↑f x - d • y‖ ≤ 2 * δ\n⊢ ‖d‖⁻¹ * (2 * (‖d‖ * ‖y‖ / 4)) = ‖d‖⁻¹ * ‖d‖ * ‖y‖ / 2\n[PROOFSTEP]\nring\n[GOAL]\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝ : CompleteSpace F\nsurj : Surjective ↑f\nA : ⋃ (n : ℕ), closure (↑f '' ball 0 ↑n) = Set.univ\nn : ℕ\na : F\nε : ℝ\nεpos : ε > 0\nH : ball a ε ⊆ closure ((fun a => ↑f a) '' ball 0 ↑n)\nc : 𝕜\nhc : 1 < ‖c‖\ny : F\nhy : ¬y = 0\nd : 𝕜\nhd : d ≠ 0\nydlt : ‖d • y‖ < ε / 2\ndinv : ‖d‖⁻¹ ≤ (ε / 2)⁻¹ * ‖c‖ * ‖y‖\nδ : ℝ := ‖d‖ * ‖y‖ / 4\nδpos : 0 < δ\nthis✝ : a + d • y ∈ ball a ε\nz₁ : F\nz₁im : z₁ ∈ (fun a => ↑f a) '' ball 0 ↑n\nx₁ : E\nh₁ : dist (a + d • y) (↑f x₁) < δ\nhx₁ : ‖x₁‖ < ↑n\nxz₁ : ↑f x₁ = z₁\nthis : a ∈ ball a ε\nz₂ : F\nz₂im : z₂ ∈ (fun a => ↑f a) '' ball 0 ↑n\nx₂ : E\nh₂ : dist a (↑f x₂) < δ\nhx₂ : ‖x₂‖ < ↑n\nxz₂ : ↑f x₂ = z₂\nx : E := x₁ - x₂\nI : ‖↑f x - d • y‖ ≤ 2 * δ\n⊢ ‖d‖⁻¹ * ‖d‖ * ‖y‖ / 2 = ‖y‖ / 2\n[PROOFSTEP]\nrw [inv_mul_cancel, one_mul]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝ : CompleteSpace F\nsurj : Surjective ↑f\nA : ⋃ (n : ℕ), closure (↑f '' ball 0 ↑n) = Set.univ\nn : ℕ\na : F\nε : ℝ\nεpos : ε > 0\nH : ball a ε ⊆ closure ((fun a => ↑f a) '' ball 0 ↑n)\nc : 𝕜\nhc : 1 < ‖c‖\ny : F\nhy : ¬y = 0\nd : 𝕜\nhd : d ≠ 0\nydlt : ‖d • y‖ < ε / 2\ndinv : ‖d‖⁻¹ ≤ (ε / 2)⁻¹ * ‖c‖ * ‖y‖\nδ : ℝ := ‖d‖ * ‖y‖ / 4\nδpos : 0 < δ\nthis✝ : a + d • y ∈ ball a ε\nz₁ : F\nz₁im : z₁ ∈ (fun a => ↑f a) '' ball 0 ↑n\nx₁ : E\nh₁ : dist (a + d • y) (↑f x₁) < δ\nhx₁ : ‖x₁‖ < ↑n\nxz₁ : ↑f x₁ = z₁\nthis : a ∈ ball a ε\nz₂ : F\nz₂im : z₂ ∈ (fun a => ↑f a) '' ball 0 ↑n\nx₂ : E\nh₂ : dist a (↑f x₂) < δ\nhx₂ : ‖x₂‖ < ↑n\nxz₂ : ↑f x₂ = z₂\nx : E := x₁ - x₂\nI : ‖↑f x - d • y‖ ≤ 2 * δ\n⊢ ‖d‖ ≠ 0\n[PROOFSTEP]\nsimp [norm_eq_zero, hd]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝ : CompleteSpace F\nsurj : Surjective ↑f\nA : ⋃ (n : ℕ), closure (↑f '' ball 0 ↑n) = Set.univ\nn : ℕ\na : F\nε : ℝ\nεpos : ε > 0\nH : ball a ε ⊆ closure ((fun a => ↑f a) '' ball 0 ↑n)\nc : 𝕜\nhc : 1 < ‖c‖\ny : F\nhy : ¬y = 0\nd : 𝕜\nhd : d ≠ 0\nydlt : ‖d • y‖ < ε / 2\ndinv : ‖d‖⁻¹ ≤ (ε / 2)⁻¹ * ‖c‖ * ‖y‖\nδ : ℝ := ‖d‖ * ‖y‖ / 4\nδpos : 0 < δ\nthis✝ : a + d • y ∈ ball a ε\nz₁ : F\nz₁im : z₁ ∈ (fun a => ↑f a) '' ball 0 ↑n\nx₁ : E\nh₁ : dist (a + d • y) (↑f x₁) < δ\nhx₁ : ‖x₁‖ < ↑n\nxz₁ : ↑f x₁ = z₁\nthis : a ∈ ball a ε\nz₂ : F\nz₂im : z₂ ∈ (fun a => ↑f a) '' ball 0 ↑n\nx₂ : E\nh₂ : dist a (↑f x₂) < δ\nhx₂ : ‖x₂‖ < ↑n\nxz₂ : ↑f x₂ = z₂\nx : E := x₁ - x₂\nI : ‖↑f x - d • y‖ ≤ 2 * δ\n⊢ ‖y‖ / 2 = 1 / 2 * ‖y‖\n[PROOFSTEP]\nring\n[GOAL]\ncase neg.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝ : CompleteSpace F\nsurj : Surjective ↑f\nA : ⋃ (n : ℕ), closure (↑f '' ball 0 ↑n) = Set.univ\nn : ℕ\na : F\nε : ℝ\nεpos : ε > 0\nH : ball a ε ⊆ closure ((fun a => ↑f a) '' ball 0 ↑n)\nc : 𝕜\nhc : 1 < ‖c‖\ny : F\nhy : ¬y = 0\nd : 𝕜\nhd : d ≠ 0\nydlt : ‖d • y‖ < ε / 2\ndinv : ‖d‖⁻¹ ≤ (ε / 2)⁻¹ * ‖c‖ * ‖y‖\nδ : ℝ := ‖d‖ * ‖y‖ / 4\nδpos : 0 < δ\nthis✝ : a + d • y ∈ ball a ε\nz₁ : F\nz₁im : z₁ ∈ (fun a => ↑f a) '' ball 0 ↑n\nx₁ : E\nh₁ : dist (a + d • y) (↑f x₁) < δ\nhx₁ : ‖x₁‖ < ↑n\nxz₁ : ↑f x₁ = z₁\nthis : a ∈ ball a ε\nz₂ : F\nz₂im : z₂ ∈ (fun a => ↑f a) '' ball 0 ↑n\nx₂ : E\nh₂ : dist a (↑f x₂) < δ\nhx₂ : ‖x₂‖ < ↑n\nxz₂ : ↑f x₂ = z₂\nx : E := x₁ - x₂\nI : ‖↑f x - d • y‖ ≤ 2 * δ\nJ : ‖↑f (d⁻¹ • x) - y‖ ≤ 1 / 2 * ‖y‖\n⊢ ∃ x, dist (↑f x) y ≤ 1 / 2 * ‖y‖ ∧ ‖x‖ ≤ (ε / 2)⁻¹ * ‖c‖ * 2 * ↑n * ‖y‖\n[PROOFSTEP]\nrw [← dist_eq_norm] at J \n[GOAL]\ncase neg.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝ : CompleteSpace F\nsurj : Surjective ↑f\nA : ⋃ (n : ℕ), closure (↑f '' ball 0 ↑n) = Set.univ\nn : ℕ\na : F\nε : ℝ\nεpos : ε > 0\nH : ball a ε ⊆ closure ((fun a => ↑f a) '' ball 0 ↑n)\nc : 𝕜\nhc : 1 < ‖c‖\ny : F\nhy : ¬y = 0\nd : 𝕜\nhd : d ≠ 0\nydlt : ‖d • y‖ < ε / 2\ndinv : ‖d‖⁻¹ ≤ (ε / 2)⁻¹ * ‖c‖ * ‖y‖\nδ : ℝ := ‖d‖ * ‖y‖ / 4\nδpos : 0 < δ\nthis✝ : a + d • y ∈ ball a ε\nz₁ : F\nz₁im : z₁ ∈ (fun a => ↑f a) '' ball 0 ↑n\nx₁ : E\nh₁ : dist (a + d • y) (↑f x₁) < δ\nhx₁ : ‖x₁‖ < ↑n\nxz₁ : ↑f x₁ = z₁\nthis : a ∈ ball a ε\nz₂ : F\nz₂im : z₂ ∈ (fun a => ↑f a) '' ball 0 ↑n\nx₂ : E\nh₂ : dist a (↑f x₂) < δ\nhx₂ : ‖x₂‖ < ↑n\nxz₂ : ↑f x₂ = z₂\nx : E := x₁ - x₂\nI : ‖↑f x - d • y‖ ≤ 2 * δ\nJ : dist (↑f (d⁻¹ • x)) y ≤ 1 / 2 * ‖y‖\n⊢ ∃ x, dist (↑f x) y ≤ 1 / 2 * ‖y‖ ∧ ‖x‖ ≤ (ε / 2)⁻¹ * ‖c‖ * 2 * ↑n * ‖y‖\n[PROOFSTEP]\nhave K : ‖d⁻¹ • x‖ ≤ (ε / 2)⁻¹ * ‖c‖ * 2 * ↑n * ‖y‖ :=\n  calc\n    ‖d⁻¹ • x‖ = ‖d‖⁻¹ * ‖x₁ - x₂‖ := by rw [norm_smul, norm_inv]\n    _ ≤ (ε / 2)⁻¹ * ‖c‖ * ‖y‖ * (n + n) :=\n      by\n      refine' mul_le_mul dinv _ (norm_nonneg _) _\n      · exact le_trans (norm_sub_le _ _) (add_le_add (le_of_lt hx₁) (le_of_lt hx₂))\n      · apply mul_nonneg (mul_nonneg _ (norm_nonneg _)) (norm_nonneg _)\n        exact inv_nonneg.2 (le_of_lt (half_pos εpos))\n    _ = (ε / 2)⁻¹ * ‖c‖ * 2 * ↑n * ‖y‖ := by ring\n[GOAL]\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝ : CompleteSpace F\nsurj : Surjective ↑f\nA : ⋃ (n : ℕ), closure (↑f '' ball 0 ↑n) = Set.univ\nn : ℕ\na : F\nε : ℝ\nεpos : ε > 0\nH : ball a ε ⊆ closure ((fun a => ↑f a) '' ball 0 ↑n)\nc : 𝕜\nhc : 1 < ‖c‖\ny : F\nhy : ¬y = 0\nd : 𝕜\nhd : d ≠ 0\nydlt : ‖d • y‖ < ε / 2\ndinv : ‖d‖⁻¹ ≤ (ε / 2)⁻¹ * ‖c‖ * ‖y‖\nδ : ℝ := ‖d‖ * ‖y‖ / 4\nδpos : 0 < δ\nthis✝ : a + d • y ∈ ball a ε\nz₁ : F\nz₁im : z₁ ∈ (fun a => ↑f a) '' ball 0 ↑n\nx₁ : E\nh₁ : dist (a + d • y) (↑f x₁) < δ\nhx₁ : ‖x₁‖ < ↑n\nxz₁ : ↑f x₁ = z₁\nthis : a ∈ ball a ε\nz₂ : F\nz₂im : z₂ ∈ (fun a => ↑f a) '' ball 0 ↑n\nx₂ : E\nh₂ : dist a (↑f x₂) < δ\nhx₂ : ‖x₂‖ < ↑n\nxz₂ : ↑f x₂ = z₂\nx : E := x₁ - x₂\nI : ‖↑f x - d • y‖ ≤ 2 * δ\nJ : dist (↑f (d⁻¹ • x)) y ≤ 1 / 2 * ‖y‖\n⊢ ‖d⁻¹ • x‖ = ‖d‖⁻¹ * ‖x₁ - x₂‖\n[PROOFSTEP]\nrw [norm_smul, norm_inv]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝ : CompleteSpace F\nsurj : Surjective ↑f\nA : ⋃ (n : ℕ), closure (↑f '' ball 0 ↑n) = Set.univ\nn : ℕ\na : F\nε : ℝ\nεpos : ε > 0\nH : ball a ε ⊆ closure ((fun a => ↑f a) '' ball 0 ↑n)\nc : 𝕜\nhc : 1 < ‖c‖\ny : F\nhy : ¬y = 0\nd : 𝕜\nhd : d ≠ 0\nydlt : ‖d • y‖ < ε / 2\ndinv : ‖d‖⁻¹ ≤ (ε / 2)⁻¹ * ‖c‖ * ‖y‖\nδ : ℝ := ‖d‖ * ‖y‖ / 4\nδpos : 0 < δ\nthis✝ : a + d • y ∈ ball a ε\nz₁ : F\nz₁im : z₁ ∈ (fun a => ↑f a) '' ball 0 ↑n\nx₁ : E\nh₁ : dist (a + d • y) (↑f x₁) < δ\nhx₁ : ‖x₁‖ < ↑n\nxz₁ : ↑f x₁ = z₁\nthis : a ∈ ball a ε\nz₂ : F\nz₂im : z₂ ∈ (fun a => ↑f a) '' ball 0 ↑n\nx₂ : E\nh₂ : dist a (↑f x₂) < δ\nhx₂ : ‖x₂‖ < ↑n\nxz₂ : ↑f x₂ = z₂\nx : E := x₁ - x₂\nI : ‖↑f x - d • y‖ ≤ 2 * δ\nJ : dist (↑f (d⁻¹ • x)) y ≤ 1 / 2 * ‖y‖\n⊢ ‖d‖⁻¹ * ‖x₁ - x₂‖ ≤ (ε / 2)⁻¹ * ‖c‖ * ‖y‖ * (↑n + ↑n)\n[PROOFSTEP]\nrefine' mul_le_mul dinv _ (norm_nonneg _) _\n[GOAL]\ncase refine'_1\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝ : CompleteSpace F\nsurj : Surjective ↑f\nA : ⋃ (n : ℕ), closure (↑f '' ball 0 ↑n) = Set.univ\nn : ℕ\na : F\nε : ℝ\nεpos : ε > 0\nH : ball a ε ⊆ closure ((fun a => ↑f a) '' ball 0 ↑n)\nc : 𝕜\nhc : 1 < ‖c‖\ny : F\nhy : ¬y = 0\nd : 𝕜\nhd : d ≠ 0\nydlt : ‖d • y‖ < ε / 2\ndinv : ‖d‖⁻¹ ≤ (ε / 2)⁻¹ * ‖c‖ * ‖y‖\nδ : ℝ := ‖d‖ * ‖y‖ / 4\nδpos : 0 < δ\nthis✝ : a + d • y ∈ ball a ε\nz₁ : F\nz₁im : z₁ ∈ (fun a => ↑f a) '' ball 0 ↑n\nx₁ : E\nh₁ : dist (a + d • y) (↑f x₁) < δ\nhx₁ : ‖x₁‖ < ↑n\nxz₁ : ↑f x₁ = z₁\nthis : a ∈ ball a ε\nz₂ : F\nz₂im : z₂ ∈ (fun a => ↑f a) '' ball 0 ↑n\nx₂ : E\nh₂ : dist a (↑f x₂) < δ\nhx₂ : ‖x₂‖ < ↑n\nxz₂ : ↑f x₂ = z₂\nx : E := x₁ - x₂\nI : ‖↑f x - d • y‖ ≤ 2 * δ\nJ : dist (↑f (d⁻¹ • x)) y ≤ 1 / 2 * ‖y‖\n⊢ ‖x₁ - x₂‖ ≤ ↑n + ↑n\n[PROOFSTEP]\nexact le_trans (norm_sub_le _ _) (add_le_add (le_of_lt hx₁) (le_of_lt hx₂))\n[GOAL]\ncase refine'_2\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝ : CompleteSpace F\nsurj : Surjective ↑f\nA : ⋃ (n : ℕ), closure (↑f '' ball 0 ↑n) = Set.univ\nn : ℕ\na : F\nε : ℝ\nεpos : ε > 0\nH : ball a ε ⊆ closure ((fun a => ↑f a) '' ball 0 ↑n)\nc : 𝕜\nhc : 1 < ‖c‖\ny : F\nhy : ¬y = 0\nd : 𝕜\nhd : d ≠ 0\nydlt : ‖d • y‖ < ε / 2\ndinv : ‖d‖⁻¹ ≤ (ε / 2)⁻¹ * ‖c‖ * ‖y‖\nδ : ℝ := ‖d‖ * ‖y‖ / 4\nδpos : 0 < δ\nthis✝ : a + d • y ∈ ball a ε\nz₁ : F\nz₁im : z₁ ∈ (fun a => ↑f a) '' ball 0 ↑n\nx₁ : E\nh₁ : dist (a + d • y) (↑f x₁) < δ\nhx₁ : ‖x₁‖ < ↑n\nxz₁ : ↑f x₁ = z₁\nthis : a ∈ ball a ε\nz₂ : F\nz₂im : z₂ ∈ (fun a => ↑f a) '' ball 0 ↑n\nx₂ : E\nh₂ : dist a (↑f x₂) < δ\nhx₂ : ‖x₂‖ < ↑n\nxz₂ : ↑f x₂ = z₂\nx : E := x₁ - x₂\nI : ‖↑f x - d • y‖ ≤ 2 * δ\nJ : dist (↑f (d⁻¹ • x)) y ≤ 1 / 2 * ‖y‖\n⊢ 0 ≤ (ε / 2)⁻¹ * ‖c‖ * ‖y‖\n[PROOFSTEP]\napply mul_nonneg (mul_nonneg _ (norm_nonneg _)) (norm_nonneg _)\n[GOAL]\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝ : CompleteSpace F\nsurj : Surjective ↑f\nA : ⋃ (n : ℕ), closure (↑f '' ball 0 ↑n) = Set.univ\nn : ℕ\na : F\nε : ℝ\nεpos : ε > 0\nH : ball a ε ⊆ closure ((fun a => ↑f a) '' ball 0 ↑n)\nc : 𝕜\nhc : 1 < ‖c‖\ny : F\nhy : ¬y = 0\nd : 𝕜\nhd : d ≠ 0\nydlt : ‖d • y‖ < ε / 2\ndinv : ‖d‖⁻¹ ≤ (ε / 2)⁻¹ * ‖c‖ * ‖y‖\nδ : ℝ := ‖d‖ * ‖y‖ / 4\nδpos : 0 < δ\nthis✝ : a + d • y ∈ ball a ε\nz₁ : F\nz₁im : z₁ ∈ (fun a => ↑f a) '' ball 0 ↑n\nx₁ : E\nh₁ : dist (a + d • y) (↑f x₁) < δ\nhx₁ : ‖x₁‖ < ↑n\nxz₁ : ↑f x₁ = z₁\nthis : a ∈ ball a ε\nz₂ : F\nz₂im : z₂ ∈ (fun a => ↑f a) '' ball 0 ↑n\nx₂ : E\nh₂ : dist a (↑f x₂) < δ\nhx₂ : ‖x₂‖ < ↑n\nxz₂ : ↑f x₂ = z₂\nx : E := x₁ - x₂\nI : ‖↑f x - d • y‖ ≤ 2 * δ\nJ : dist (↑f (d⁻¹ • x)) y ≤ 1 / 2 * ‖y‖\n⊢ 0 ≤ (ε / 2)⁻¹\n[PROOFSTEP]\nexact inv_nonneg.2 (le_of_lt (half_pos εpos))\n[GOAL]\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝ : CompleteSpace F\nsurj : Surjective ↑f\nA : ⋃ (n : ℕ), closure (↑f '' ball 0 ↑n) = Set.univ\nn : ℕ\na : F\nε : ℝ\nεpos : ε > 0\nH : ball a ε ⊆ closure ((fun a => ↑f a) '' ball 0 ↑n)\nc : 𝕜\nhc : 1 < ‖c‖\ny : F\nhy : ¬y = 0\nd : 𝕜\nhd : d ≠ 0\nydlt : ‖d • y‖ < ε / 2\ndinv : ‖d‖⁻¹ ≤ (ε / 2)⁻¹ * ‖c‖ * ‖y‖\nδ : ℝ := ‖d‖ * ‖y‖ / 4\nδpos : 0 < δ\nthis✝ : a + d • y ∈ ball a ε\nz₁ : F\nz₁im : z₁ ∈ (fun a => ↑f a) '' ball 0 ↑n\nx₁ : E\nh₁ : dist (a + d • y) (↑f x₁) < δ\nhx₁ : ‖x₁‖ < ↑n\nxz₁ : ↑f x₁ = z₁\nthis : a ∈ ball a ε\nz₂ : F\nz₂im : z₂ ∈ (fun a => ↑f a) '' ball 0 ↑n\nx₂ : E\nh₂ : dist a (↑f x₂) < δ\nhx₂ : ‖x₂‖ < ↑n\nxz₂ : ↑f x₂ = z₂\nx : E := x₁ - x₂\nI : ‖↑f x - d • y‖ ≤ 2 * δ\nJ : dist (↑f (d⁻¹ • x)) y ≤ 1 / 2 * ‖y‖\n⊢ (ε / 2)⁻¹ * ‖c‖ * ‖y‖ * (↑n + ↑n) = (ε / 2)⁻¹ * ‖c‖ * 2 * ↑n * ‖y‖\n[PROOFSTEP]\nring\n[GOAL]\ncase neg.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\ninst✝⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝ : CompleteSpace F\nsurj : Surjective ↑f\nA : ⋃ (n : ℕ), closure (↑f '' ball 0 ↑n) = Set.univ\nn : ℕ\na : F\nε : ℝ\nεpos : ε > 0\nH : ball a ε ⊆ closure ((fun a => ↑f a) '' ball 0 ↑n)\nc : 𝕜\nhc : 1 < ‖c‖\ny : F\nhy : ¬y = 0\nd : 𝕜\nhd : d ≠ 0\nydlt : ‖d • y‖ < ε / 2\ndinv : ‖d‖⁻¹ ≤ (ε / 2)⁻¹ * ‖c‖ * ‖y‖\nδ : ℝ := ‖d‖ * ‖y‖ / 4\nδpos : 0 < δ\nthis✝ : a + d • y ∈ ball a ε\nz₁ : F\nz₁im : z₁ ∈ (fun a => ↑f a) '' ball 0 ↑n\nx₁ : E\nh₁ : dist (a + d • y) (↑f x₁) < δ\nhx₁ : ‖x₁‖ < ↑n\nxz₁ : ↑f x₁ = z₁\nthis : a ∈ ball a ε\nz₂ : F\nz₂im : z₂ ∈ (fun a => ↑f a) '' ball 0 ↑n\nx₂ : E\nh₂ : dist a (↑f x₂) < δ\nhx₂ : ‖x₂‖ < ↑n\nxz₂ : ↑f x₂ = z₂\nx : E := x₁ - x₂\nI : ‖↑f x - d • y‖ ≤ 2 * δ\nJ : dist (↑f (d⁻¹ • x)) y ≤ 1 / 2 * ‖y‖\nK : ‖d⁻¹ • x‖ ≤ (ε / 2)⁻¹ * ‖c‖ * 2 * ↑n * ‖y‖\n⊢ ∃ x, dist (↑f x) y ≤ 1 / 2 * ‖y‖ ∧ ‖x‖ ≤ (ε / 2)⁻¹ * ‖c‖ * 2 * ↑n * ‖y‖\n[PROOFSTEP]\nexact ⟨d⁻¹ • x, J, K⟩\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\nsurj : Surjective ↑f\n⊢ ∃ C, C > 0 ∧ ∀ (y : F), ∃ x, ↑f x = y ∧ ‖x‖ ≤ C * ‖y‖\n[PROOFSTEP]\nobtain ⟨C, C0, hC⟩ := exists_approx_preimage_norm_le f surj\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\nsurj : Surjective ↑f\nC : ℝ\nC0 : C ≥ 0\nhC : ∀ (y : F), ∃ x, dist (↑f x) y ≤ 1 / 2 * ‖y‖ ∧ ‖x‖ ≤ C * ‖y‖\n⊢ ∃ C, C > 0 ∧ ∀ (y : F), ∃ x, ↑f x = y ∧ ‖x‖ ≤ C * ‖y‖\n[PROOFSTEP]\nchoose g hg using hC\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\nsurj : Surjective ↑f\nC : ℝ\nC0 : C ≥ 0\ng : F → E\nhg : ∀ (y : F), dist (↑f (g y)) y ≤ 1 / 2 * ‖y‖ ∧ ‖g y‖ ≤ C * ‖y‖\n⊢ ∃ C, C > 0 ∧ ∀ (y : F), ∃ x, ↑f x = y ∧ ‖x‖ ≤ C * ‖y‖\n[PROOFSTEP]\nlet h y := y - f (g y)\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\nsurj : Surjective ↑f\nC : ℝ\nC0 : C ≥ 0\ng : F → E\nhg : ∀ (y : F), dist (↑f (g y)) y ≤ 1 / 2 * ‖y‖ ∧ ‖g y‖ ≤ C * ‖y‖\nh : F → F := fun y => y - ↑f (g y)\n⊢ ∃ C, C > 0 ∧ ∀ (y : F), ∃ x, ↑f x = y ∧ ‖x‖ ≤ C * ‖y‖\n[PROOFSTEP]\nhave hle : ∀ y, ‖h y‖ ≤ 1 / 2 * ‖y‖ := by\n  intro y\n  rw [← dist_eq_norm, dist_comm]\n  exact (hg y).1\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\nsurj : Surjective ↑f\nC : ℝ\nC0 : C ≥ 0\ng : F → E\nhg : ∀ (y : F), dist (↑f (g y)) y ≤ 1 / 2 * ‖y‖ ∧ ‖g y‖ ≤ C * ‖y‖\nh : F → F := fun y => y - ↑f (g y)\n⊢ ∀ (y : F), ‖h y‖ ≤ 1 / 2 * ‖y‖\n[PROOFSTEP]\nintro y\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\nsurj : Surjective ↑f\nC : ℝ\nC0 : C ≥ 0\ng : F → E\nhg : ∀ (y : F), dist (↑f (g y)) y ≤ 1 / 2 * ‖y‖ ∧ ‖g y‖ ≤ C * ‖y‖\nh : F → F := fun y => y - ↑f (g y)\ny : F\n⊢ ‖h y‖ ≤ 1 / 2 * ‖y‖\n[PROOFSTEP]\nrw [← dist_eq_norm, dist_comm]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\nsurj : Surjective ↑f\nC : ℝ\nC0 : C ≥ 0\ng : F → E\nhg : ∀ (y : F), dist (↑f (g y)) y ≤ 1 / 2 * ‖y‖ ∧ ‖g y‖ ≤ C * ‖y‖\nh : F → F := fun y => y - ↑f (g y)\ny : F\n⊢ dist (↑f (g y)) y ≤ 1 / 2 * ‖y‖\n[PROOFSTEP]\nexact (hg y).1\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\nsurj : Surjective ↑f\nC : ℝ\nC0 : C ≥ 0\ng : F → E\nhg : ∀ (y : F), dist (↑f (g y)) y ≤ 1 / 2 * ‖y‖ ∧ ‖g y‖ ≤ C * ‖y‖\nh : F → F := fun y => y - ↑f (g y)\nhle : ∀ (y : F), ‖h y‖ ≤ 1 / 2 * ‖y‖\n⊢ ∃ C, C > 0 ∧ ∀ (y : F), ∃ x, ↑f x = y ∧ ‖x‖ ≤ C * ‖y‖\n[PROOFSTEP]\nrefine' ⟨2 * C + 1, by linarith, fun y => _⟩\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\nsurj : Surjective ↑f\nC : ℝ\nC0 : C ≥ 0\ng : F → E\nhg : ∀ (y : F), dist (↑f (g y)) y ≤ 1 / 2 * ‖y‖ ∧ ‖g y‖ ≤ C * ‖y‖\nh : F → F := fun y => y - ↑f (g y)\nhle : ∀ (y : F), ‖h y‖ ≤ 1 / 2 * ‖y‖\n⊢ 2 * C + 1 > 0\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\nsurj : Surjective ↑f\nC : ℝ\nC0 : C ≥ 0\ng : F → E\nhg : ∀ (y : F), dist (↑f (g y)) y ≤ 1 / 2 * ‖y‖ ∧ ‖g y‖ ≤ C * ‖y‖\nh : F → F := fun y => y - ↑f (g y)\nhle : ∀ (y : F), ‖h y‖ ≤ 1 / 2 * ‖y‖\ny : F\n⊢ ∃ x, ↑f x = y ∧ ‖x‖ ≤ (2 * C + 1) * ‖y‖\n[PROOFSTEP]\nhave hnle : ∀ n : ℕ, ‖h^[n] y‖ ≤ (1 / 2) ^ n * ‖y‖ := by\n  intro n\n  induction' n with n IH\n  · simp only [one_div, Nat.zero_eq, one_mul, iterate_zero_apply, pow_zero, le_rfl]\n  · rw [iterate_succ']\n    apply le_trans (hle _) _\n    rw [pow_succ, mul_assoc]\n    apply mul_le_mul_of_nonneg_left IH\n    norm_num\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\nsurj : Surjective ↑f\nC : ℝ\nC0 : C ≥ 0\ng : F → E\nhg : ∀ (y : F), dist (↑f (g y)) y ≤ 1 / 2 * ‖y‖ ∧ ‖g y‖ ≤ C * ‖y‖\nh : F → F := fun y => y - ↑f (g y)\nhle : ∀ (y : F), ‖h y‖ ≤ 1 / 2 * ‖y‖\ny : F\n⊢ ∀ (n : ℕ), ‖h^[n] y‖ ≤ (1 / 2) ^ n * ‖y‖\n[PROOFSTEP]\nintro n\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\nsurj : Surjective ↑f\nC : ℝ\nC0 : C ≥ 0\ng : F → E\nhg : ∀ (y : F), dist (↑f (g y)) y ≤ 1 / 2 * ‖y‖ ∧ ‖g y‖ ≤ C * ‖y‖\nh : F → F := fun y => y - ↑f (g y)\nhle : ∀ (y : F), ‖h y‖ ≤ 1 / 2 * ‖y‖\ny : F\nn : ℕ\n⊢ ‖h^[n] y‖ ≤ (1 / 2) ^ n * ‖y‖\n[PROOFSTEP]\ninduction' n with n IH\n[GOAL]\ncase zero\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\nsurj : Surjective ↑f\nC : ℝ\nC0 : C ≥ 0\ng : F → E\nhg : ∀ (y : F), dist (↑f (g y)) y ≤ 1 / 2 * ‖y‖ ∧ ‖g y‖ ≤ C * ‖y‖\nh : F → F := fun y => y - ↑f (g y)\nhle : ∀ (y : F), ‖h y‖ ≤ 1 / 2 * ‖y‖\ny : F\n⊢ ‖h^[Nat.zero] y‖ ≤ (1 / 2) ^ Nat.zero * ‖y‖\n[PROOFSTEP]\nsimp only [one_div, Nat.zero_eq, one_mul, iterate_zero_apply, pow_zero, le_rfl]\n[GOAL]\ncase succ\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\nsurj : Surjective ↑f\nC : ℝ\nC0 : C ≥ 0\ng : F → E\nhg : ∀ (y : F), dist (↑f (g y)) y ≤ 1 / 2 * ‖y‖ ∧ ‖g y‖ ≤ C * ‖y‖\nh : F → F := fun y => y - ↑f (g y)\nhle : ∀ (y : F), ‖h y‖ ≤ 1 / 2 * ‖y‖\ny : F\nn : ℕ\nIH : ‖h^[n] y‖ ≤ (1 / 2) ^ n * ‖y‖\n⊢ ‖h^[Nat.succ n] y‖ ≤ (1 / 2) ^ Nat.succ n * ‖y‖\n[PROOFSTEP]\nrw [iterate_succ']\n[GOAL]\ncase succ\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\nsurj : Surjective ↑f\nC : ℝ\nC0 : C ≥ 0\ng : F → E\nhg : ∀ (y : F), dist (↑f (g y)) y ≤ 1 / 2 * ‖y‖ ∧ ‖g y‖ ≤ C * ‖y‖\nh : F → F := fun y => y - ↑f (g y)\nhle : ∀ (y : F), ‖h y‖ ≤ 1 / 2 * ‖y‖\ny : F\nn : ℕ\nIH : ‖h^[n] y‖ ≤ (1 / 2) ^ n * ‖y‖\n⊢ ‖(h ∘ h^[n]) y‖ ≤ (1 / 2) ^ Nat.succ n * ‖y‖\n[PROOFSTEP]\napply le_trans (hle _) _\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\nsurj : Surjective ↑f\nC : ℝ\nC0 : C ≥ 0\ng : F → E\nhg : ∀ (y : F), dist (↑f (g y)) y ≤ 1 / 2 * ‖y‖ ∧ ‖g y‖ ≤ C * ‖y‖\nh : F → F := fun y => y - ↑f (g y)\nhle : ∀ (y : F), ‖h y‖ ≤ 1 / 2 * ‖y‖\ny : F\nn : ℕ\nIH : ‖h^[n] y‖ ≤ (1 / 2) ^ n * ‖y‖\n⊢ 1 / 2 * ‖h^[n] y‖ ≤ (1 / 2) ^ Nat.succ n * ‖y‖\n[PROOFSTEP]\nrw [pow_succ, mul_assoc]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\nsurj : Surjective ↑f\nC : ℝ\nC0 : C ≥ 0\ng : F → E\nhg : ∀ (y : F), dist (↑f (g y)) y ≤ 1 / 2 * ‖y‖ ∧ ‖g y‖ ≤ C * ‖y‖\nh : F → F := fun y => y - ↑f (g y)\nhle : ∀ (y : F), ‖h y‖ ≤ 1 / 2 * ‖y‖\ny : F\nn : ℕ\nIH : ‖h^[n] y‖ ≤ (1 / 2) ^ n * ‖y‖\n⊢ 1 / 2 * ‖h^[n] y‖ ≤ 1 / 2 * ((1 / 2) ^ n * ‖y‖)\n[PROOFSTEP]\napply mul_le_mul_of_nonneg_left IH\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\nsurj : Surjective ↑f\nC : ℝ\nC0 : C ≥ 0\ng : F → E\nhg : ∀ (y : F), dist (↑f (g y)) y ≤ 1 / 2 * ‖y‖ ∧ ‖g y‖ ≤ C * ‖y‖\nh : F → F := fun y => y - ↑f (g y)\nhle : ∀ (y : F), ‖h y‖ ≤ 1 / 2 * ‖y‖\ny : F\nn : ℕ\nIH : ‖h^[n] y‖ ≤ (1 / 2) ^ n * ‖y‖\n⊢ 0 ≤ 1 / 2\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\nsurj : Surjective ↑f\nC : ℝ\nC0 : C ≥ 0\ng : F → E\nhg : ∀ (y : F), dist (↑f (g y)) y ≤ 1 / 2 * ‖y‖ ∧ ‖g y‖ ≤ C * ‖y‖\nh : F → F := fun y => y - ↑f (g y)\nhle : ∀ (y : F), ‖h y‖ ≤ 1 / 2 * ‖y‖\ny : F\nhnle : ∀ (n : ℕ), ‖h^[n] y‖ ≤ (1 / 2) ^ n * ‖y‖\n⊢ ∃ x, ↑f x = y ∧ ‖x‖ ≤ (2 * C + 1) * ‖y‖\n[PROOFSTEP]\nlet u n := g (h^[n] y)\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\nsurj : Surjective ↑f\nC : ℝ\nC0 : C ≥ 0\ng : F → E\nhg : ∀ (y : F), dist (↑f (g y)) y ≤ 1 / 2 * ‖y‖ ∧ ‖g y‖ ≤ C * ‖y‖\nh : F → F := fun y => y - ↑f (g y)\nhle : ∀ (y : F), ‖h y‖ ≤ 1 / 2 * ‖y‖\ny : F\nhnle : ∀ (n : ℕ), ‖h^[n] y‖ ≤ (1 / 2) ^ n * ‖y‖\nu : ℕ → E := fun n => g (h^[n] y)\n⊢ ∃ x, ↑f x = y ∧ ‖x‖ ≤ (2 * C + 1) * ‖y‖\n[PROOFSTEP]\nhave ule : ∀ n, ‖u n‖ ≤ (1 / 2) ^ n * (C * ‖y‖) := by\n  intro n\n  apply le_trans (hg _).2 _\n  calc\n    C * ‖h^[n] y‖ ≤ C * ((1 / 2) ^ n * ‖y‖) := mul_le_mul_of_nonneg_left (hnle n) C0\n    _ = (1 / 2) ^ n * (C * ‖y‖) := by ring\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\nsurj : Surjective ↑f\nC : ℝ\nC0 : C ≥ 0\ng : F → E\nhg : ∀ (y : F), dist (↑f (g y)) y ≤ 1 / 2 * ‖y‖ ∧ ‖g y‖ ≤ C * ‖y‖\nh : F → F := fun y => y - ↑f (g y)\nhle : ∀ (y : F), ‖h y‖ ≤ 1 / 2 * ‖y‖\ny : F\nhnle : ∀ (n : ℕ), ‖h^[n] y‖ ≤ (1 / 2) ^ n * ‖y‖\nu : ℕ → E := fun n => g (h^[n] y)\n⊢ ∀ (n : ℕ), ‖u n‖ ≤ (1 / 2) ^ n * (C * ‖y‖)\n[PROOFSTEP]\nintro n\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\nsurj : Surjective ↑f\nC : ℝ\nC0 : C ≥ 0\ng : F → E\nhg : ∀ (y : F), dist (↑f (g y)) y ≤ 1 / 2 * ‖y‖ ∧ ‖g y‖ ≤ C * ‖y‖\nh : F → F := fun y => y - ↑f (g y)\nhle : ∀ (y : F), ‖h y‖ ≤ 1 / 2 * ‖y‖\ny : F\nhnle : ∀ (n : ℕ), ‖h^[n] y‖ ≤ (1 / 2) ^ n * ‖y‖\nu : ℕ → E := fun n => g (h^[n] y)\nn : ℕ\n⊢ ‖u n‖ ≤ (1 / 2) ^ n * (C * ‖y‖)\n[PROOFSTEP]\napply le_trans (hg _).2 _\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\nsurj : Surjective ↑f\nC : ℝ\nC0 : C ≥ 0\ng : F → E\nhg : ∀ (y : F), dist (↑f (g y)) y ≤ 1 / 2 * ‖y‖ ∧ ‖g y‖ ≤ C * ‖y‖\nh : F → F := fun y => y - ↑f (g y)\nhle : ∀ (y : F), ‖h y‖ ≤ 1 / 2 * ‖y‖\ny : F\nhnle : ∀ (n : ℕ), ‖h^[n] y‖ ≤ (1 / 2) ^ n * ‖y‖\nu : ℕ → E := fun n => g (h^[n] y)\nn : ℕ\n⊢ C * ‖h^[n] y‖ ≤ (1 / 2) ^ n * (C * ‖y‖)\n[PROOFSTEP]\ncalc\n  C * ‖h^[n] y‖ ≤ C * ((1 / 2) ^ n * ‖y‖) := mul_le_mul_of_nonneg_left (hnle n) C0\n  _ = (1 / 2) ^ n * (C * ‖y‖) := by ring\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\nsurj : Surjective ↑f\nC : ℝ\nC0 : C ≥ 0\ng : F → E\nhg : ∀ (y : F), dist (↑f (g y)) y ≤ 1 / 2 * ‖y‖ ∧ ‖g y‖ ≤ C * ‖y‖\nh : F → F := fun y => y - ↑f (g y)\nhle : ∀ (y : F), ‖h y‖ ≤ 1 / 2 * ‖y‖\ny : F\nhnle : ∀ (n : ℕ), ‖h^[n] y‖ ≤ (1 / 2) ^ n * ‖y‖\nu : ℕ → E := fun n => g (h^[n] y)\nn : ℕ\n⊢ C * ((1 / 2) ^ n * ‖y‖) = (1 / 2) ^ n * (C * ‖y‖)\n[PROOFSTEP]\nring\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\nsurj : Surjective ↑f\nC : ℝ\nC0 : C ≥ 0\ng : F → E\nhg : ∀ (y : F), dist (↑f (g y)) y ≤ 1 / 2 * ‖y‖ ∧ ‖g y‖ ≤ C * ‖y‖\nh : F → F := fun y => y - ↑f (g y)\nhle : ∀ (y : F), ‖h y‖ ≤ 1 / 2 * ‖y‖\ny : F\nhnle : ∀ (n : ℕ), ‖h^[n] y‖ ≤ (1 / 2) ^ n * ‖y‖\nu : ℕ → E := fun n => g (h^[n] y)\nule : ∀ (n : ℕ), ‖u n‖ ≤ (1 / 2) ^ n * (C * ‖y‖)\n⊢ ∃ x, ↑f x = y ∧ ‖x‖ ≤ (2 * C + 1) * ‖y‖\n[PROOFSTEP]\nhave sNu : Summable fun n => ‖u n‖ :=\n  by\n  refine' summable_of_nonneg_of_le (fun n => norm_nonneg _) ule _\n  exact Summable.mul_right _ (summable_geometric_of_lt_1 (by norm_num) (by norm_num))\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\nsurj : Surjective ↑f\nC : ℝ\nC0 : C ≥ 0\ng : F → E\nhg : ∀ (y : F), dist (↑f (g y)) y ≤ 1 / 2 * ‖y‖ ∧ ‖g y‖ ≤ C * ‖y‖\nh : F → F := fun y => y - ↑f (g y)\nhle : ∀ (y : F), ‖h y‖ ≤ 1 / 2 * ‖y‖\ny : F\nhnle : ∀ (n : ℕ), ‖h^[n] y‖ ≤ (1 / 2) ^ n * ‖y‖\nu : ℕ → E := fun n => g (h^[n] y)\nule : ∀ (n : ℕ), ‖u n‖ ≤ (1 / 2) ^ n * (C * ‖y‖)\n⊢ Summable fun n => ‖u n‖\n[PROOFSTEP]\nrefine' summable_of_nonneg_of_le (fun n => norm_nonneg _) ule _\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\nsurj : Surjective ↑f\nC : ℝ\nC0 : C ≥ 0\ng : F → E\nhg : ∀ (y : F), dist (↑f (g y)) y ≤ 1 / 2 * ‖y‖ ∧ ‖g y‖ ≤ C * ‖y‖\nh : F → F := fun y => y - ↑f (g y)\nhle : ∀ (y : F), ‖h y‖ ≤ 1 / 2 * ‖y‖\ny : F\nhnle : ∀ (n : ℕ), ‖h^[n] y‖ ≤ (1 / 2) ^ n * ‖y‖\nu : ℕ → E := fun n => g (h^[n] y)\nule : ∀ (n : ℕ), ‖u n‖ ≤ (1 / 2) ^ n * (C * ‖y‖)\n⊢ Summable fun b => (1 / 2) ^ b * (C * ‖y‖)\n[PROOFSTEP]\nexact Summable.mul_right _ (summable_geometric_of_lt_1 (by norm_num) (by norm_num))\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\nsurj : Surjective ↑f\nC : ℝ\nC0 : C ≥ 0\ng : F → E\nhg : ∀ (y : F), dist (↑f (g y)) y ≤ 1 / 2 * ‖y‖ ∧ ‖g y‖ ≤ C * ‖y‖\nh : F → F := fun y => y - ↑f (g y)\nhle : ∀ (y : F), ‖h y‖ ≤ 1 / 2 * ‖y‖\ny : F\nhnle : ∀ (n : ℕ), ‖h^[n] y‖ ≤ (1 / 2) ^ n * ‖y‖\nu : ℕ → E := fun n => g (h^[n] y)\nule : ∀ (n : ℕ), ‖u n‖ ≤ (1 / 2) ^ n * (C * ‖y‖)\n⊢ 0 ≤ 1 / 2\n[PROOFSTEP]\nnorm_num\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\nsurj : Surjective ↑f\nC : ℝ\nC0 : C ≥ 0\ng : F → E\nhg : ∀ (y : F), dist (↑f (g y)) y ≤ 1 / 2 * ‖y‖ ∧ ‖g y‖ ≤ C * ‖y‖\nh : F → F := fun y => y - ↑f (g y)\nhle : ∀ (y : F), ‖h y‖ ≤ 1 / 2 * ‖y‖\ny : F\nhnle : ∀ (n : ℕ), ‖h^[n] y‖ ≤ (1 / 2) ^ n * ‖y‖\nu : ℕ → E := fun n => g (h^[n] y)\nule : ∀ (n : ℕ), ‖u n‖ ≤ (1 / 2) ^ n * (C * ‖y‖)\n⊢ 1 / 2 < 1\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\nsurj : Surjective ↑f\nC : ℝ\nC0 : C ≥ 0\ng : F → E\nhg : ∀ (y : F), dist (↑f (g y)) y ≤ 1 / 2 * ‖y‖ ∧ ‖g y‖ ≤ C * ‖y‖\nh : F → F := fun y => y - ↑f (g y)\nhle : ∀ (y : F), ‖h y‖ ≤ 1 / 2 * ‖y‖\ny : F\nhnle : ∀ (n : ℕ), ‖h^[n] y‖ ≤ (1 / 2) ^ n * ‖y‖\nu : ℕ → E := fun n => g (h^[n] y)\nule : ∀ (n : ℕ), ‖u n‖ ≤ (1 / 2) ^ n * (C * ‖y‖)\nsNu : Summable fun n => ‖u n‖\n⊢ ∃ x, ↑f x = y ∧ ‖x‖ ≤ (2 * C + 1) * ‖y‖\n[PROOFSTEP]\nhave su : Summable u := summable_of_summable_norm sNu\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\nsurj : Surjective ↑f\nC : ℝ\nC0 : C ≥ 0\ng : F → E\nhg : ∀ (y : F), dist (↑f (g y)) y ≤ 1 / 2 * ‖y‖ ∧ ‖g y‖ ≤ C * ‖y‖\nh : F → F := fun y => y - ↑f (g y)\nhle : ∀ (y : F), ‖h y‖ ≤ 1 / 2 * ‖y‖\ny : F\nhnle : ∀ (n : ℕ), ‖h^[n] y‖ ≤ (1 / 2) ^ n * ‖y‖\nu : ℕ → E := fun n => g (h^[n] y)\nule : ∀ (n : ℕ), ‖u n‖ ≤ (1 / 2) ^ n * (C * ‖y‖)\nsNu : Summable fun n => ‖u n‖\nsu : Summable u\n⊢ ∃ x, ↑f x = y ∧ ‖x‖ ≤ (2 * C + 1) * ‖y‖\n[PROOFSTEP]\nlet x := tsum u\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\nsurj : Surjective ↑f\nC : ℝ\nC0 : C ≥ 0\ng : F → E\nhg : ∀ (y : F), dist (↑f (g y)) y ≤ 1 / 2 * ‖y‖ ∧ ‖g y‖ ≤ C * ‖y‖\nh : F → F := fun y => y - ↑f (g y)\nhle : ∀ (y : F), ‖h y‖ ≤ 1 / 2 * ‖y‖\ny : F\nhnle : ∀ (n : ℕ), ‖h^[n] y‖ ≤ (1 / 2) ^ n * ‖y‖\nu : ℕ → E := fun n => g (h^[n] y)\nule : ∀ (n : ℕ), ‖u n‖ ≤ (1 / 2) ^ n * (C * ‖y‖)\nsNu : Summable fun n => ‖u n‖\nsu : Summable u\nx : E := tsum u\n⊢ ∃ x, ↑f x = y ∧ ‖x‖ ≤ (2 * C + 1) * ‖y‖\n[PROOFSTEP]\nhave x_ineq : ‖x‖ ≤ (2 * C + 1) * ‖y‖ :=\n  calc\n    ‖x‖ ≤ ∑' n, ‖u n‖ := norm_tsum_le_tsum_norm sNu\n    _ ≤ ∑' n, (1 / 2) ^ n * (C * ‖y‖) := (tsum_le_tsum ule sNu (Summable.mul_right _ summable_geometric_two))\n    _ = (∑' n, (1 / 2) ^ n) * (C * ‖y‖) := tsum_mul_right\n    _ = 2 * C * ‖y‖ := by rw [tsum_geometric_two, mul_assoc]\n    _ ≤ 2 * C * ‖y‖ + ‖y‖ := (le_add_of_nonneg_right (norm_nonneg y))\n    _ = (2 * C + 1) * ‖y‖ := by ring\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\nsurj : Surjective ↑f\nC : ℝ\nC0 : C ≥ 0\ng : F → E\nhg : ∀ (y : F), dist (↑f (g y)) y ≤ 1 / 2 * ‖y‖ ∧ ‖g y‖ ≤ C * ‖y‖\nh : F → F := fun y => y - ↑f (g y)\nhle : ∀ (y : F), ‖h y‖ ≤ 1 / 2 * ‖y‖\ny : F\nhnle : ∀ (n : ℕ), ‖h^[n] y‖ ≤ (1 / 2) ^ n * ‖y‖\nu : ℕ → E := fun n => g (h^[n] y)\nule : ∀ (n : ℕ), ‖u n‖ ≤ (1 / 2) ^ n * (C * ‖y‖)\nsNu : Summable fun n => ‖u n‖\nsu : Summable u\nx : E := tsum u\n⊢ (∑' (n : ℕ), (1 / 2) ^ n) * (C * ‖y‖) = 2 * C * ‖y‖\n[PROOFSTEP]\nrw [tsum_geometric_two, mul_assoc]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\nsurj : Surjective ↑f\nC : ℝ\nC0 : C ≥ 0\ng : F → E\nhg : ∀ (y : F), dist (↑f (g y)) y ≤ 1 / 2 * ‖y‖ ∧ ‖g y‖ ≤ C * ‖y‖\nh : F → F := fun y => y - ↑f (g y)\nhle : ∀ (y : F), ‖h y‖ ≤ 1 / 2 * ‖y‖\ny : F\nhnle : ∀ (n : ℕ), ‖h^[n] y‖ ≤ (1 / 2) ^ n * ‖y‖\nu : ℕ → E := fun n => g (h^[n] y)\nule : ∀ (n : ℕ), ‖u n‖ ≤ (1 / 2) ^ n * (C * ‖y‖)\nsNu : Summable fun n => ‖u n‖\nsu : Summable u\nx : E := tsum u\n⊢ 2 * C * ‖y‖ + ‖y‖ = (2 * C + 1) * ‖y‖\n[PROOFSTEP]\nring\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\nsurj : Surjective ↑f\nC : ℝ\nC0 : C ≥ 0\ng : F → E\nhg : ∀ (y : F), dist (↑f (g y)) y ≤ 1 / 2 * ‖y‖ ∧ ‖g y‖ ≤ C * ‖y‖\nh : F → F := fun y => y - ↑f (g y)\nhle : ∀ (y : F), ‖h y‖ ≤ 1 / 2 * ‖y‖\ny : F\nhnle : ∀ (n : ℕ), ‖h^[n] y‖ ≤ (1 / 2) ^ n * ‖y‖\nu : ℕ → E := fun n => g (h^[n] y)\nule : ∀ (n : ℕ), ‖u n‖ ≤ (1 / 2) ^ n * (C * ‖y‖)\nsNu : Summable fun n => ‖u n‖\nsu : Summable u\nx : E := tsum u\nx_ineq : ‖x‖ ≤ (2 * C + 1) * ‖y‖\n⊢ ∃ x, ↑f x = y ∧ ‖x‖ ≤ (2 * C + 1) * ‖y‖\n[PROOFSTEP]\nhave fsumeq : ∀ n : ℕ, f (∑ i in Finset.range n, u i) = y - h^[n] y :=\n  by\n  intro n\n  induction' n with n IH\n  · simp [f.map_zero]\n  · rw [sum_range_succ, f.map_add, IH, iterate_succ_apply', sub_add]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\nsurj : Surjective ↑f\nC : ℝ\nC0 : C ≥ 0\ng : F → E\nhg : ∀ (y : F), dist (↑f (g y)) y ≤ 1 / 2 * ‖y‖ ∧ ‖g y‖ ≤ C * ‖y‖\nh : F → F := fun y => y - ↑f (g y)\nhle : ∀ (y : F), ‖h y‖ ≤ 1 / 2 * ‖y‖\ny : F\nhnle : ∀ (n : ℕ), ‖h^[n] y‖ ≤ (1 / 2) ^ n * ‖y‖\nu : ℕ → E := fun n => g (h^[n] y)\nule : ∀ (n : ℕ), ‖u n‖ ≤ (1 / 2) ^ n * (C * ‖y‖)\nsNu : Summable fun n => ‖u n‖\nsu : Summable u\nx : E := tsum u\nx_ineq : ‖x‖ ≤ (2 * C + 1) * ‖y‖\n⊢ ∀ (n : ℕ), ↑f (∑ i in Finset.range n, u i) = y - h^[n] y\n[PROOFSTEP]\nintro n\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\nsurj : Surjective ↑f\nC : ℝ\nC0 : C ≥ 0\ng : F → E\nhg : ∀ (y : F), dist (↑f (g y)) y ≤ 1 / 2 * ‖y‖ ∧ ‖g y‖ ≤ C * ‖y‖\nh : F → F := fun y => y - ↑f (g y)\nhle : ∀ (y : F), ‖h y‖ ≤ 1 / 2 * ‖y‖\ny : F\nhnle : ∀ (n : ℕ), ‖h^[n] y‖ ≤ (1 / 2) ^ n * ‖y‖\nu : ℕ → E := fun n => g (h^[n] y)\nule : ∀ (n : ℕ), ‖u n‖ ≤ (1 / 2) ^ n * (C * ‖y‖)\nsNu : Summable fun n => ‖u n‖\nsu : Summable u\nx : E := tsum u\nx_ineq : ‖x‖ ≤ (2 * C + 1) * ‖y‖\nn : ℕ\n⊢ ↑f (∑ i in Finset.range n, u i) = y - h^[n] y\n[PROOFSTEP]\ninduction' n with n IH\n[GOAL]\ncase zero\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\nsurj : Surjective ↑f\nC : ℝ\nC0 : C ≥ 0\ng : F → E\nhg : ∀ (y : F), dist (↑f (g y)) y ≤ 1 / 2 * ‖y‖ ∧ ‖g y‖ ≤ C * ‖y‖\nh : F → F := fun y => y - ↑f (g y)\nhle : ∀ (y : F), ‖h y‖ ≤ 1 / 2 * ‖y‖\ny : F\nhnle : ∀ (n : ℕ), ‖h^[n] y‖ ≤ (1 / 2) ^ n * ‖y‖\nu : ℕ → E := fun n => g (h^[n] y)\nule : ∀ (n : ℕ), ‖u n‖ ≤ (1 / 2) ^ n * (C * ‖y‖)\nsNu : Summable fun n => ‖u n‖\nsu : Summable u\nx : E := tsum u\nx_ineq : ‖x‖ ≤ (2 * C + 1) * ‖y‖\n⊢ ↑f (∑ i in Finset.range Nat.zero, u i) = y - h^[Nat.zero] y\n[PROOFSTEP]\nsimp [f.map_zero]\n[GOAL]\ncase succ\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\nsurj : Surjective ↑f\nC : ℝ\nC0 : C ≥ 0\ng : F → E\nhg : ∀ (y : F), dist (↑f (g y)) y ≤ 1 / 2 * ‖y‖ ∧ ‖g y‖ ≤ C * ‖y‖\nh : F → F := fun y => y - ↑f (g y)\nhle : ∀ (y : F), ‖h y‖ ≤ 1 / 2 * ‖y‖\ny : F\nhnle : ∀ (n : ℕ), ‖h^[n] y‖ ≤ (1 / 2) ^ n * ‖y‖\nu : ℕ → E := fun n => g (h^[n] y)\nule : ∀ (n : ℕ), ‖u n‖ ≤ (1 / 2) ^ n * (C * ‖y‖)\nsNu : Summable fun n => ‖u n‖\nsu : Summable u\nx : E := tsum u\nx_ineq : ‖x‖ ≤ (2 * C + 1) * ‖y‖\nn : ℕ\nIH : ↑f (∑ i in Finset.range n, u i) = y - h^[n] y\n⊢ ↑f (∑ i in Finset.range (Nat.succ n), u i) = y - h^[Nat.succ n] y\n[PROOFSTEP]\nrw [sum_range_succ, f.map_add, IH, iterate_succ_apply', sub_add]\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\nsurj : Surjective ↑f\nC : ℝ\nC0 : C ≥ 0\ng : F → E\nhg : ∀ (y : F), dist (↑f (g y)) y ≤ 1 / 2 * ‖y‖ ∧ ‖g y‖ ≤ C * ‖y‖\nh : F → F := fun y => y - ↑f (g y)\nhle : ∀ (y : F), ‖h y‖ ≤ 1 / 2 * ‖y‖\ny : F\nhnle : ∀ (n : ℕ), ‖h^[n] y‖ ≤ (1 / 2) ^ n * ‖y‖\nu : ℕ → E := fun n => g (h^[n] y)\nule : ∀ (n : ℕ), ‖u n‖ ≤ (1 / 2) ^ n * (C * ‖y‖)\nsNu : Summable fun n => ‖u n‖\nsu : Summable u\nx : E := tsum u\nx_ineq : ‖x‖ ≤ (2 * C + 1) * ‖y‖\nfsumeq : ∀ (n : ℕ), ↑f (∑ i in Finset.range n, u i) = y - h^[n] y\n⊢ ∃ x, ↑f x = y ∧ ‖x‖ ≤ (2 * C + 1) * ‖y‖\n[PROOFSTEP]\nhave : Tendsto (fun n => ∑ i in Finset.range n, u i) atTop (𝓝 x) := su.hasSum.tendsto_sum_nat\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\nsurj : Surjective ↑f\nC : ℝ\nC0 : C ≥ 0\ng : F → E\nhg : ∀ (y : F), dist (↑f (g y)) y ≤ 1 / 2 * ‖y‖ ∧ ‖g y‖ ≤ C * ‖y‖\nh : F → F := fun y => y - ↑f (g y)\nhle : ∀ (y : F), ‖h y‖ ≤ 1 / 2 * ‖y‖\ny : F\nhnle : ∀ (n : ℕ), ‖h^[n] y‖ ≤ (1 / 2) ^ n * ‖y‖\nu : ℕ → E := fun n => g (h^[n] y)\nule : ∀ (n : ℕ), ‖u n‖ ≤ (1 / 2) ^ n * (C * ‖y‖)\nsNu : Summable fun n => ‖u n‖\nsu : Summable u\nx : E := tsum u\nx_ineq : ‖x‖ ≤ (2 * C + 1) * ‖y‖\nfsumeq : ∀ (n : ℕ), ↑f (∑ i in Finset.range n, u i) = y - h^[n] y\nthis : Tendsto (fun n => ∑ i in Finset.range n, u i) atTop (𝓝 x)\n⊢ ∃ x, ↑f x = y ∧ ‖x‖ ≤ (2 * C + 1) * ‖y‖\n[PROOFSTEP]\nhave L₁ : Tendsto (fun n => f (∑ i in Finset.range n, u i)) atTop (𝓝 (f x)) := (f.continuous.tendsto _).comp this\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\nsurj : Surjective ↑f\nC : ℝ\nC0 : C ≥ 0\ng : F → E\nhg : ∀ (y : F), dist (↑f (g y)) y ≤ 1 / 2 * ‖y‖ ∧ ‖g y‖ ≤ C * ‖y‖\nh : F → F := fun y => y - ↑f (g y)\nhle : ∀ (y : F), ‖h y‖ ≤ 1 / 2 * ‖y‖\ny : F\nhnle : ∀ (n : ℕ), ‖h^[n] y‖ ≤ (1 / 2) ^ n * ‖y‖\nu : ℕ → E := fun n => g (h^[n] y)\nule : ∀ (n : ℕ), ‖u n‖ ≤ (1 / 2) ^ n * (C * ‖y‖)\nsNu : Summable fun n => ‖u n‖\nsu : Summable u\nx : E := tsum u\nx_ineq : ‖x‖ ≤ (2 * C + 1) * ‖y‖\nfsumeq : ∀ (n : ℕ), ↑f (∑ i in Finset.range n, u i) = y - h^[n] y\nthis : Tendsto (fun n => ∑ i in Finset.range n, u i) atTop (𝓝 x)\nL₁ : Tendsto (fun n => ↑f (∑ i in Finset.range n, u i)) atTop (𝓝 (↑f x))\n⊢ ∃ x, ↑f x = y ∧ ‖x‖ ≤ (2 * C + 1) * ‖y‖\n[PROOFSTEP]\nsimp only [fsumeq] at L₁ \n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\nsurj : Surjective ↑f\nC : ℝ\nC0 : C ≥ 0\ng : F → E\nhg : ∀ (y : F), dist (↑f (g y)) y ≤ 1 / 2 * ‖y‖ ∧ ‖g y‖ ≤ C * ‖y‖\nh : F → F := fun y => y - ↑f (g y)\nhle : ∀ (y : F), ‖h y‖ ≤ 1 / 2 * ‖y‖\ny : F\nhnle : ∀ (n : ℕ), ‖h^[n] y‖ ≤ (1 / 2) ^ n * ‖y‖\nu : ℕ → E := fun n => g (h^[n] y)\nule : ∀ (n : ℕ), ‖u n‖ ≤ (1 / 2) ^ n * (C * ‖y‖)\nsNu : Summable fun n => ‖u n‖\nsu : Summable u\nx : E := tsum u\nx_ineq : ‖x‖ ≤ (2 * C + 1) * ‖y‖\nfsumeq : ∀ (n : ℕ), ↑f (∑ i in Finset.range n, u i) = y - h^[n] y\nthis : Tendsto (fun n => ∑ i in Finset.range n, u i) atTop (𝓝 x)\nL₁ : Tendsto (fun n => y - (fun y => y - ↑f (g y))^[n] y) atTop (𝓝 (↑f (∑' (n : ℕ), g ((fun y => y - ↑f (g y))^[n] y))))\n⊢ ∃ x, ↑f x = y ∧ ‖x‖ ≤ (2 * C + 1) * ‖y‖\n[PROOFSTEP]\nhave L₂ : Tendsto (fun n => y - h^[n] y) atTop (𝓝 (y - 0)) :=\n  by\n  refine' tendsto_const_nhds.sub _\n  rw [tendsto_iff_norm_tendsto_zero]\n  simp only [sub_zero]\n  refine' squeeze_zero (fun _ => norm_nonneg _) hnle _\n  rw [← zero_mul ‖y‖]\n  refine' (_root_.tendsto_pow_atTop_nhds_0_of_lt_1 _ _).mul tendsto_const_nhds <;> norm_num\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\nsurj : Surjective ↑f\nC : ℝ\nC0 : C ≥ 0\ng : F → E\nhg : ∀ (y : F), dist (↑f (g y)) y ≤ 1 / 2 * ‖y‖ ∧ ‖g y‖ ≤ C * ‖y‖\nh : F → F := fun y => y - ↑f (g y)\nhle : ∀ (y : F), ‖h y‖ ≤ 1 / 2 * ‖y‖\ny : F\nhnle : ∀ (n : ℕ), ‖h^[n] y‖ ≤ (1 / 2) ^ n * ‖y‖\nu : ℕ → E := fun n => g (h^[n] y)\nule : ∀ (n : ℕ), ‖u n‖ ≤ (1 / 2) ^ n * (C * ‖y‖)\nsNu : Summable fun n => ‖u n‖\nsu : Summable u\nx : E := tsum u\nx_ineq : ‖x‖ ≤ (2 * C + 1) * ‖y‖\nfsumeq : ∀ (n : ℕ), ↑f (∑ i in Finset.range n, u i) = y - h^[n] y\nthis : Tendsto (fun n => ∑ i in Finset.range n, u i) atTop (𝓝 x)\nL₁ : Tendsto (fun n => y - (fun y => y - ↑f (g y))^[n] y) atTop (𝓝 (↑f (∑' (n : ℕ), g ((fun y => y - ↑f (g y))^[n] y))))\n⊢ Tendsto (fun n => y - h^[n] y) atTop (𝓝 (y - 0))\n[PROOFSTEP]\nrefine' tendsto_const_nhds.sub _\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\nsurj : Surjective ↑f\nC : ℝ\nC0 : C ≥ 0\ng : F → E\nhg : ∀ (y : F), dist (↑f (g y)) y ≤ 1 / 2 * ‖y‖ ∧ ‖g y‖ ≤ C * ‖y‖\nh : F → F := fun y => y - ↑f (g y)\nhle : ∀ (y : F), ‖h y‖ ≤ 1 / 2 * ‖y‖\ny : F\nhnle : ∀ (n : ℕ), ‖h^[n] y‖ ≤ (1 / 2) ^ n * ‖y‖\nu : ℕ → E := fun n => g (h^[n] y)\nule : ∀ (n : ℕ), ‖u n‖ ≤ (1 / 2) ^ n * (C * ‖y‖)\nsNu : Summable fun n => ‖u n‖\nsu : Summable u\nx : E := tsum u\nx_ineq : ‖x‖ ≤ (2 * C + 1) * ‖y‖\nfsumeq : ∀ (n : ℕ), ↑f (∑ i in Finset.range n, u i) = y - h^[n] y\nthis : Tendsto (fun n => ∑ i in Finset.range n, u i) atTop (𝓝 x)\nL₁ : Tendsto (fun n => y - (fun y => y - ↑f (g y))^[n] y) atTop (𝓝 (↑f (∑' (n : ℕ), g ((fun y => y - ↑f (g y))^[n] y))))\n⊢ Tendsto (fun n => h^[n] y) atTop (𝓝 0)\n[PROOFSTEP]\nrw [tendsto_iff_norm_tendsto_zero]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\nsurj : Surjective ↑f\nC : ℝ\nC0 : C ≥ 0\ng : F → E\nhg : ∀ (y : F), dist (↑f (g y)) y ≤ 1 / 2 * ‖y‖ ∧ ‖g y‖ ≤ C * ‖y‖\nh : F → F := fun y => y - ↑f (g y)\nhle : ∀ (y : F), ‖h y‖ ≤ 1 / 2 * ‖y‖\ny : F\nhnle : ∀ (n : ℕ), ‖h^[n] y‖ ≤ (1 / 2) ^ n * ‖y‖\nu : ℕ → E := fun n => g (h^[n] y)\nule : ∀ (n : ℕ), ‖u n‖ ≤ (1 / 2) ^ n * (C * ‖y‖)\nsNu : Summable fun n => ‖u n‖\nsu : Summable u\nx : E := tsum u\nx_ineq : ‖x‖ ≤ (2 * C + 1) * ‖y‖\nfsumeq : ∀ (n : ℕ), ↑f (∑ i in Finset.range n, u i) = y - h^[n] y\nthis : Tendsto (fun n => ∑ i in Finset.range n, u i) atTop (𝓝 x)\nL₁ : Tendsto (fun n => y - (fun y => y - ↑f (g y))^[n] y) atTop (𝓝 (↑f (∑' (n : ℕ), g ((fun y => y - ↑f (g y))^[n] y))))\n⊢ Tendsto (fun e => ‖h^[e] y - 0‖) atTop (𝓝 0)\n[PROOFSTEP]\nsimp only [sub_zero]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\nsurj : Surjective ↑f\nC : ℝ\nC0 : C ≥ 0\ng : F → E\nhg : ∀ (y : F), dist (↑f (g y)) y ≤ 1 / 2 * ‖y‖ ∧ ‖g y‖ ≤ C * ‖y‖\nh : F → F := fun y => y - ↑f (g y)\nhle : ∀ (y : F), ‖h y‖ ≤ 1 / 2 * ‖y‖\ny : F\nhnle : ∀ (n : ℕ), ‖h^[n] y‖ ≤ (1 / 2) ^ n * ‖y‖\nu : ℕ → E := fun n => g (h^[n] y)\nule : ∀ (n : ℕ), ‖u n‖ ≤ (1 / 2) ^ n * (C * ‖y‖)\nsNu : Summable fun n => ‖u n‖\nsu : Summable u\nx : E := tsum u\nx_ineq : ‖x‖ ≤ (2 * C + 1) * ‖y‖\nfsumeq : ∀ (n : ℕ), ↑f (∑ i in Finset.range n, u i) = y - h^[n] y\nthis : Tendsto (fun n => ∑ i in Finset.range n, u i) atTop (𝓝 x)\nL₁ : Tendsto (fun n => y - (fun y => y - ↑f (g y))^[n] y) atTop (𝓝 (↑f (∑' (n : ℕ), g ((fun y => y - ↑f (g y))^[n] y))))\n⊢ Tendsto (fun e => ‖(fun y => y - ↑f (g y))^[e] y‖) atTop (𝓝 0)\n[PROOFSTEP]\nrefine' squeeze_zero (fun _ => norm_nonneg _) hnle _\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\nsurj : Surjective ↑f\nC : ℝ\nC0 : C ≥ 0\ng : F → E\nhg : ∀ (y : F), dist (↑f (g y)) y ≤ 1 / 2 * ‖y‖ ∧ ‖g y‖ ≤ C * ‖y‖\nh : F → F := fun y => y - ↑f (g y)\nhle : ∀ (y : F), ‖h y‖ ≤ 1 / 2 * ‖y‖\ny : F\nhnle : ∀ (n : ℕ), ‖h^[n] y‖ ≤ (1 / 2) ^ n * ‖y‖\nu : ℕ → E := fun n => g (h^[n] y)\nule : ∀ (n : ℕ), ‖u n‖ ≤ (1 / 2) ^ n * (C * ‖y‖)\nsNu : Summable fun n => ‖u n‖\nsu : Summable u\nx : E := tsum u\nx_ineq : ‖x‖ ≤ (2 * C + 1) * ‖y‖\nfsumeq : ∀ (n : ℕ), ↑f (∑ i in Finset.range n, u i) = y - h^[n] y\nthis : Tendsto (fun n => ∑ i in Finset.range n, u i) atTop (𝓝 x)\nL₁ : Tendsto (fun n => y - (fun y => y - ↑f (g y))^[n] y) atTop (𝓝 (↑f (∑' (n : ℕ), g ((fun y => y - ↑f (g y))^[n] y))))\n⊢ Tendsto (fun t => (1 / 2) ^ t * ‖y‖) atTop (𝓝 0)\n[PROOFSTEP]\nrw [← zero_mul ‖y‖]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\nsurj : Surjective ↑f\nC : ℝ\nC0 : C ≥ 0\ng : F → E\nhg : ∀ (y : F), dist (↑f (g y)) y ≤ 1 / 2 * ‖y‖ ∧ ‖g y‖ ≤ C * ‖y‖\nh : F → F := fun y => y - ↑f (g y)\nhle : ∀ (y : F), ‖h y‖ ≤ 1 / 2 * ‖y‖\ny : F\nhnle : ∀ (n : ℕ), ‖h^[n] y‖ ≤ (1 / 2) ^ n * ‖y‖\nu : ℕ → E := fun n => g (h^[n] y)\nule : ∀ (n : ℕ), ‖u n‖ ≤ (1 / 2) ^ n * (C * ‖y‖)\nsNu : Summable fun n => ‖u n‖\nsu : Summable u\nx : E := tsum u\nx_ineq : ‖x‖ ≤ (2 * C + 1) * ‖y‖\nfsumeq : ∀ (n : ℕ), ↑f (∑ i in Finset.range n, u i) = y - h^[n] y\nthis : Tendsto (fun n => ∑ i in Finset.range n, u i) atTop (𝓝 x)\nL₁ : Tendsto (fun n => y - (fun y => y - ↑f (g y))^[n] y) atTop (𝓝 (↑f (∑' (n : ℕ), g ((fun y => y - ↑f (g y))^[n] y))))\n⊢ Tendsto (fun t => (1 / 2) ^ t * ‖y‖) atTop (𝓝 (0 * ‖y‖))\n[PROOFSTEP]\nrefine' (_root_.tendsto_pow_atTop_nhds_0_of_lt_1 _ _).mul tendsto_const_nhds\n[GOAL]\ncase refine'_1\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\nsurj : Surjective ↑f\nC : ℝ\nC0 : C ≥ 0\ng : F → E\nhg : ∀ (y : F), dist (↑f (g y)) y ≤ 1 / 2 * ‖y‖ ∧ ‖g y‖ ≤ C * ‖y‖\nh : F → F := fun y => y - ↑f (g y)\nhle : ∀ (y : F), ‖h y‖ ≤ 1 / 2 * ‖y‖\ny : F\nhnle : ∀ (n : ℕ), ‖h^[n] y‖ ≤ (1 / 2) ^ n * ‖y‖\nu : ℕ → E := fun n => g (h^[n] y)\nule : ∀ (n : ℕ), ‖u n‖ ≤ (1 / 2) ^ n * (C * ‖y‖)\nsNu : Summable fun n => ‖u n‖\nsu : Summable u\nx : E := tsum u\nx_ineq : ‖x‖ ≤ (2 * C + 1) * ‖y‖\nfsumeq : ∀ (n : ℕ), ↑f (∑ i in Finset.range n, u i) = y - h^[n] y\nthis : Tendsto (fun n => ∑ i in Finset.range n, u i) atTop (𝓝 x)\nL₁ : Tendsto (fun n => y - (fun y => y - ↑f (g y))^[n] y) atTop (𝓝 (↑f (∑' (n : ℕ), g ((fun y => y - ↑f (g y))^[n] y))))\n⊢ 0 ≤ 1 / 2\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase refine'_2\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\nsurj : Surjective ↑f\nC : ℝ\nC0 : C ≥ 0\ng : F → E\nhg : ∀ (y : F), dist (↑f (g y)) y ≤ 1 / 2 * ‖y‖ ∧ ‖g y‖ ≤ C * ‖y‖\nh : F → F := fun y => y - ↑f (g y)\nhle : ∀ (y : F), ‖h y‖ ≤ 1 / 2 * ‖y‖\ny : F\nhnle : ∀ (n : ℕ), ‖h^[n] y‖ ≤ (1 / 2) ^ n * ‖y‖\nu : ℕ → E := fun n => g (h^[n] y)\nule : ∀ (n : ℕ), ‖u n‖ ≤ (1 / 2) ^ n * (C * ‖y‖)\nsNu : Summable fun n => ‖u n‖\nsu : Summable u\nx : E := tsum u\nx_ineq : ‖x‖ ≤ (2 * C + 1) * ‖y‖\nfsumeq : ∀ (n : ℕ), ↑f (∑ i in Finset.range n, u i) = y - h^[n] y\nthis : Tendsto (fun n => ∑ i in Finset.range n, u i) atTop (𝓝 x)\nL₁ : Tendsto (fun n => y - (fun y => y - ↑f (g y))^[n] y) atTop (𝓝 (↑f (∑' (n : ℕ), g ((fun y => y - ↑f (g y))^[n] y))))\n⊢ 1 / 2 < 1\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\nsurj : Surjective ↑f\nC : ℝ\nC0 : C ≥ 0\ng : F → E\nhg : ∀ (y : F), dist (↑f (g y)) y ≤ 1 / 2 * ‖y‖ ∧ ‖g y‖ ≤ C * ‖y‖\nh : F → F := fun y => y - ↑f (g y)\nhle : ∀ (y : F), ‖h y‖ ≤ 1 / 2 * ‖y‖\ny : F\nhnle : ∀ (n : ℕ), ‖h^[n] y‖ ≤ (1 / 2) ^ n * ‖y‖\nu : ℕ → E := fun n => g (h^[n] y)\nule : ∀ (n : ℕ), ‖u n‖ ≤ (1 / 2) ^ n * (C * ‖y‖)\nsNu : Summable fun n => ‖u n‖\nsu : Summable u\nx : E := tsum u\nx_ineq : ‖x‖ ≤ (2 * C + 1) * ‖y‖\nfsumeq : ∀ (n : ℕ), ↑f (∑ i in Finset.range n, u i) = y - h^[n] y\nthis : Tendsto (fun n => ∑ i in Finset.range n, u i) atTop (𝓝 x)\nL₁ : Tendsto (fun n => y - (fun y => y - ↑f (g y))^[n] y) atTop (𝓝 (↑f (∑' (n : ℕ), g ((fun y => y - ↑f (g y))^[n] y))))\nL₂ : Tendsto (fun n => y - h^[n] y) atTop (𝓝 (y - 0))\n⊢ ∃ x, ↑f x = y ∧ ‖x‖ ≤ (2 * C + 1) * ‖y‖\n[PROOFSTEP]\nhave feq : f x = y - 0 := tendsto_nhds_unique L₁ L₂\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\nsurj : Surjective ↑f\nC : ℝ\nC0 : C ≥ 0\ng : F → E\nhg : ∀ (y : F), dist (↑f (g y)) y ≤ 1 / 2 * ‖y‖ ∧ ‖g y‖ ≤ C * ‖y‖\nh : F → F := fun y => y - ↑f (g y)\nhle : ∀ (y : F), ‖h y‖ ≤ 1 / 2 * ‖y‖\ny : F\nhnle : ∀ (n : ℕ), ‖h^[n] y‖ ≤ (1 / 2) ^ n * ‖y‖\nu : ℕ → E := fun n => g (h^[n] y)\nule : ∀ (n : ℕ), ‖u n‖ ≤ (1 / 2) ^ n * (C * ‖y‖)\nsNu : Summable fun n => ‖u n‖\nsu : Summable u\nx : E := tsum u\nx_ineq : ‖x‖ ≤ (2 * C + 1) * ‖y‖\nfsumeq : ∀ (n : ℕ), ↑f (∑ i in Finset.range n, u i) = y - h^[n] y\nthis : Tendsto (fun n => ∑ i in Finset.range n, u i) atTop (𝓝 x)\nL₁ : Tendsto (fun n => y - (fun y => y - ↑f (g y))^[n] y) atTop (𝓝 (↑f (∑' (n : ℕ), g ((fun y => y - ↑f (g y))^[n] y))))\nL₂ : Tendsto (fun n => y - h^[n] y) atTop (𝓝 (y - 0))\nfeq : ↑f x = y - 0\n⊢ ∃ x, ↑f x = y ∧ ‖x‖ ≤ (2 * C + 1) * ‖y‖\n[PROOFSTEP]\nrw [sub_zero] at feq \n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\nsurj : Surjective ↑f\nC : ℝ\nC0 : C ≥ 0\ng : F → E\nhg : ∀ (y : F), dist (↑f (g y)) y ≤ 1 / 2 * ‖y‖ ∧ ‖g y‖ ≤ C * ‖y‖\nh : F → F := fun y => y - ↑f (g y)\nhle : ∀ (y : F), ‖h y‖ ≤ 1 / 2 * ‖y‖\ny : F\nhnle : ∀ (n : ℕ), ‖h^[n] y‖ ≤ (1 / 2) ^ n * ‖y‖\nu : ℕ → E := fun n => g (h^[n] y)\nule : ∀ (n : ℕ), ‖u n‖ ≤ (1 / 2) ^ n * (C * ‖y‖)\nsNu : Summable fun n => ‖u n‖\nsu : Summable u\nx : E := tsum u\nx_ineq : ‖x‖ ≤ (2 * C + 1) * ‖y‖\nfsumeq : ∀ (n : ℕ), ↑f (∑ i in Finset.range n, u i) = y - h^[n] y\nthis : Tendsto (fun n => ∑ i in Finset.range n, u i) atTop (𝓝 x)\nL₁ : Tendsto (fun n => y - (fun y => y - ↑f (g y))^[n] y) atTop (𝓝 (↑f (∑' (n : ℕ), g ((fun y => y - ↑f (g y))^[n] y))))\nL₂ : Tendsto (fun n => y - h^[n] y) atTop (𝓝 (y - 0))\nfeq : ↑f x = y\n⊢ ∃ x, ↑f x = y ∧ ‖x‖ ≤ (2 * C + 1) * ‖y‖\n[PROOFSTEP]\nexact ⟨x, feq, x_ineq⟩\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\nsurj : Surjective ↑f\n⊢ IsOpenMap ↑f\n[PROOFSTEP]\nintro s hs\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\nsurj : Surjective ↑f\ns : Set E\nhs : IsOpen s\n⊢ IsOpen (↑f '' s)\n[PROOFSTEP]\nrcases exists_preimage_norm_le f surj with ⟨C, Cpos, hC⟩\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\nsurj : Surjective ↑f\ns : Set E\nhs : IsOpen s\nC : ℝ\nCpos : C > 0\nhC : ∀ (y : F), ∃ x, ↑f x = y ∧ ‖x‖ ≤ C * ‖y‖\n⊢ IsOpen (↑f '' s)\n[PROOFSTEP]\nrefine' isOpen_iff.2 fun y yfs => _\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\nsurj : Surjective ↑f\ns : Set E\nhs : IsOpen s\nC : ℝ\nCpos : C > 0\nhC : ∀ (y : F), ∃ x, ↑f x = y ∧ ‖x‖ ≤ C * ‖y‖\ny : F\nyfs : y ∈ ↑f '' s\n⊢ ∃ ε, ε > 0 ∧ ball y ε ⊆ ↑f '' s\n[PROOFSTEP]\nrcases mem_image_iff_bex.1 yfs with ⟨x, xs, fxy⟩\n[GOAL]\ncase intro.intro.intro.intro\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\nsurj : Surjective ↑f\ns : Set E\nhs : IsOpen s\nC : ℝ\nCpos : C > 0\nhC : ∀ (y : F), ∃ x, ↑f x = y ∧ ‖x‖ ≤ C * ‖y‖\ny : F\nyfs : y ∈ ↑f '' s\nx : E\nxs : x ∈ s\nfxy : ↑f x = y\n⊢ ∃ ε, ε > 0 ∧ ball y ε ⊆ ↑f '' s\n[PROOFSTEP]\nrcases isOpen_iff.1 hs x xs with ⟨ε, εpos, hε⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\nsurj : Surjective ↑f\ns : Set E\nhs : IsOpen s\nC : ℝ\nCpos : C > 0\nhC : ∀ (y : F), ∃ x, ↑f x = y ∧ ‖x‖ ≤ C * ‖y‖\ny : F\nyfs : y ∈ ↑f '' s\nx : E\nxs : x ∈ s\nfxy : ↑f x = y\nε : ℝ\nεpos : ε > 0\nhε : ball x ε ⊆ s\n⊢ ∃ ε, ε > 0 ∧ ball y ε ⊆ ↑f '' s\n[PROOFSTEP]\nrefine' ⟨ε / C, div_pos εpos Cpos, fun z hz => _⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\nsurj : Surjective ↑f\ns : Set E\nhs : IsOpen s\nC : ℝ\nCpos : C > 0\nhC : ∀ (y : F), ∃ x, ↑f x = y ∧ ‖x‖ ≤ C * ‖y‖\ny : F\nyfs : y ∈ ↑f '' s\nx : E\nxs : x ∈ s\nfxy : ↑f x = y\nε : ℝ\nεpos : ε > 0\nhε : ball x ε ⊆ s\nz : F\nhz : z ∈ ball y (ε / C)\n⊢ z ∈ ↑f '' s\n[PROOFSTEP]\nrcases hC (z - y) with ⟨w, wim, wnorm⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\nsurj : Surjective ↑f\ns : Set E\nhs : IsOpen s\nC : ℝ\nCpos : C > 0\nhC : ∀ (y : F), ∃ x, ↑f x = y ∧ ‖x‖ ≤ C * ‖y‖\ny : F\nyfs : y ∈ ↑f '' s\nx : E\nxs : x ∈ s\nfxy : ↑f x = y\nε : ℝ\nεpos : ε > 0\nhε : ball x ε ⊆ s\nz : F\nhz : z ∈ ball y (ε / C)\nw : E\nwim : ↑f w = z - y\nwnorm : ‖w‖ ≤ C * ‖z - y‖\n⊢ z ∈ ↑f '' s\n[PROOFSTEP]\nhave : f (x + w) = z := by rw [f.map_add, wim, fxy, add_sub_cancel'_right]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\nsurj : Surjective ↑f\ns : Set E\nhs : IsOpen s\nC : ℝ\nCpos : C > 0\nhC : ∀ (y : F), ∃ x, ↑f x = y ∧ ‖x‖ ≤ C * ‖y‖\ny : F\nyfs : y ∈ ↑f '' s\nx : E\nxs : x ∈ s\nfxy : ↑f x = y\nε : ℝ\nεpos : ε > 0\nhε : ball x ε ⊆ s\nz : F\nhz : z ∈ ball y (ε / C)\nw : E\nwim : ↑f w = z - y\nwnorm : ‖w‖ ≤ C * ‖z - y‖\n⊢ ↑f (x + w) = z\n[PROOFSTEP]\nrw [f.map_add, wim, fxy, add_sub_cancel'_right]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\nsurj : Surjective ↑f\ns : Set E\nhs : IsOpen s\nC : ℝ\nCpos : C > 0\nhC : ∀ (y : F), ∃ x, ↑f x = y ∧ ‖x‖ ≤ C * ‖y‖\ny : F\nyfs : y ∈ ↑f '' s\nx : E\nxs : x ∈ s\nfxy : ↑f x = y\nε : ℝ\nεpos : ε > 0\nhε : ball x ε ⊆ s\nz : F\nhz : z ∈ ball y (ε / C)\nw : E\nwim : ↑f w = z - y\nwnorm : ‖w‖ ≤ C * ‖z - y‖\nthis : ↑f (x + w) = z\n⊢ z ∈ ↑f '' s\n[PROOFSTEP]\nrw [← this]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\nsurj : Surjective ↑f\ns : Set E\nhs : IsOpen s\nC : ℝ\nCpos : C > 0\nhC : ∀ (y : F), ∃ x, ↑f x = y ∧ ‖x‖ ≤ C * ‖y‖\ny : F\nyfs : y ∈ ↑f '' s\nx : E\nxs : x ∈ s\nfxy : ↑f x = y\nε : ℝ\nεpos : ε > 0\nhε : ball x ε ⊆ s\nz : F\nhz : z ∈ ball y (ε / C)\nw : E\nwim : ↑f w = z - y\nwnorm : ‖w‖ ≤ C * ‖z - y‖\nthis : ↑f (x + w) = z\n⊢ ↑f (x + w) ∈ ↑f '' s\n[PROOFSTEP]\nhave : x + w ∈ ball x ε :=\n  calc\n    dist (x + w) x = ‖w‖ := by\n      rw [dist_eq_norm]\n      simp\n    _ ≤ C * ‖z - y‖ := wnorm\n    _ < C * (ε / C) := by\n      apply mul_lt_mul_of_pos_left _ Cpos\n      rwa [mem_ball, dist_eq_norm] at hz \n    _ = ε := mul_div_cancel' _ (ne_of_gt Cpos)\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\nsurj : Surjective ↑f\ns : Set E\nhs : IsOpen s\nC : ℝ\nCpos : C > 0\nhC : ∀ (y : F), ∃ x, ↑f x = y ∧ ‖x‖ ≤ C * ‖y‖\ny : F\nyfs : y ∈ ↑f '' s\nx : E\nxs : x ∈ s\nfxy : ↑f x = y\nε : ℝ\nεpos : ε > 0\nhε : ball x ε ⊆ s\nz : F\nhz : z ∈ ball y (ε / C)\nw : E\nwim : ↑f w = z - y\nwnorm : ‖w‖ ≤ C * ‖z - y‖\nthis : ↑f (x + w) = z\n⊢ dist (x + w) x = ‖w‖\n[PROOFSTEP]\nrw [dist_eq_norm]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\nsurj : Surjective ↑f\ns : Set E\nhs : IsOpen s\nC : ℝ\nCpos : C > 0\nhC : ∀ (y : F), ∃ x, ↑f x = y ∧ ‖x‖ ≤ C * ‖y‖\ny : F\nyfs : y ∈ ↑f '' s\nx : E\nxs : x ∈ s\nfxy : ↑f x = y\nε : ℝ\nεpos : ε > 0\nhε : ball x ε ⊆ s\nz : F\nhz : z ∈ ball y (ε / C)\nw : E\nwim : ↑f w = z - y\nwnorm : ‖w‖ ≤ C * ‖z - y‖\nthis : ↑f (x + w) = z\n⊢ ‖x + w - x‖ = ‖w‖\n[PROOFSTEP]\nsimp\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\nsurj : Surjective ↑f\ns : Set E\nhs : IsOpen s\nC : ℝ\nCpos : C > 0\nhC : ∀ (y : F), ∃ x, ↑f x = y ∧ ‖x‖ ≤ C * ‖y‖\ny : F\nyfs : y ∈ ↑f '' s\nx : E\nxs : x ∈ s\nfxy : ↑f x = y\nε : ℝ\nεpos : ε > 0\nhε : ball x ε ⊆ s\nz : F\nhz : z ∈ ball y (ε / C)\nw : E\nwim : ↑f w = z - y\nwnorm : ‖w‖ ≤ C * ‖z - y‖\nthis : ↑f (x + w) = z\n⊢ C * ‖z - y‖ < C * (ε / C)\n[PROOFSTEP]\napply mul_lt_mul_of_pos_left _ Cpos\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\nsurj : Surjective ↑f\ns : Set E\nhs : IsOpen s\nC : ℝ\nCpos : C > 0\nhC : ∀ (y : F), ∃ x, ↑f x = y ∧ ‖x‖ ≤ C * ‖y‖\ny : F\nyfs : y ∈ ↑f '' s\nx : E\nxs : x ∈ s\nfxy : ↑f x = y\nε : ℝ\nεpos : ε > 0\nhε : ball x ε ⊆ s\nz : F\nhz : z ∈ ball y (ε / C)\nw : E\nwim : ↑f w = z - y\nwnorm : ‖w‖ ≤ C * ‖z - y‖\nthis : ↑f (x + w) = z\n⊢ ‖z - y‖ < ε / C\n[PROOFSTEP]\nrwa [mem_ball, dist_eq_norm] at hz \n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\nsurj : Surjective ↑f\ns : Set E\nhs : IsOpen s\nC : ℝ\nCpos : C > 0\nhC : ∀ (y : F), ∃ x, ↑f x = y ∧ ‖x‖ ≤ C * ‖y‖\ny : F\nyfs : y ∈ ↑f '' s\nx : E\nxs : x ∈ s\nfxy : ↑f x = y\nε : ℝ\nεpos : ε > 0\nhε : ball x ε ⊆ s\nz : F\nhz : z ∈ ball y (ε / C)\nw : E\nwim : ↑f w = z - y\nwnorm : ‖w‖ ≤ C * ‖z - y‖\nthis✝ : ↑f (x + w) = z\nthis : x + w ∈ ball x ε\n⊢ ↑f (x + w) ∈ ↑f '' s\n[PROOFSTEP]\nexact Set.mem_image_of_mem _ (hε this)\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf✝ : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\nf : E →L[𝕜] F\nhsurj : LinearMap.range f = ⊤\n⊢ ∃ fsymm, 0 < fsymm.nnnorm\n[PROOFSTEP]\nchoose C hC fsymm h using exists_preimage_norm_le _ (LinearMap.range_eq_top.mp hsurj)\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf✝ : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\nf : E →L[𝕜] F\nhsurj : LinearMap.range f = ⊤\nC : ℝ\nhC : C > 0\nfsymm : F → E\nh : ∀ (y : F), ↑f (fsymm y) = y ∧ ‖fsymm y‖ ≤ C * ‖y‖\n⊢ ∃ fsymm, 0 < fsymm.nnnorm\n[PROOFSTEP]\nuse{\n    toFun := fsymm\n    nnnorm := ⟨C, hC.lt.le⟩\n    bound' := fun y => (h y).2\n    right_inv' := fun y => (h y).1 }\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf✝ : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\nf : E →L[𝕜] F\nhsurj : LinearMap.range f = ⊤\nC : ℝ\nhC : C > 0\nfsymm : F → E\nh : ∀ (y : F), ↑f (fsymm y) = y ∧ ‖fsymm y‖ ≤ C * ‖y‖\n⊢ 0 <\n    { toFun := fsymm, nnnorm := { val := C, property := (_ : 0 ≤ C) }, bound' := (_ : ∀ (y : F), ‖fsymm y‖ ≤ C * ‖y‖),\n        right_inv' := (_ : ∀ (y : F), ↑f (fsymm y) = y) }.nnnorm\n[PROOFSTEP]\nexact hC\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf✝ : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\nf : E →L[𝕜] F\nhsurj : LinearMap.range f = ⊤\n⊢ 0 < (nonlinearRightInverseOfSurjective f hsurj).nnnorm\n[PROOFSTEP]\nrw [nonlinearRightInverseOfSurjective]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf✝ : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\nf : E →L[𝕜] F\nhsurj : LinearMap.range f = ⊤\n⊢ 0 < (Classical.choose (_ : ∃ fsymm, 0 < fsymm.nnnorm)).nnnorm\n[PROOFSTEP]\nexact Classical.choose_spec (exists_nonlinearRightInverse_of_surjective f hsurj)\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\ne : E ≃ₗ[𝕜] F\nh : Continuous ↑e\n⊢ Continuous ↑(symm e)\n[PROOFSTEP]\nrw [continuous_def]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\ne : E ≃ₗ[𝕜] F\nh : Continuous ↑e\n⊢ ∀ (s : Set E), IsOpen s → IsOpen (↑(symm e) ⁻¹' s)\n[PROOFSTEP]\nintro s hs\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\ne : E ≃ₗ[𝕜] F\nh : Continuous ↑e\ns : Set E\nhs : IsOpen s\n⊢ IsOpen (↑(symm e) ⁻¹' s)\n[PROOFSTEP]\nrw [← e.image_eq_preimage]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\ne : E ≃ₗ[𝕜] F\nh : Continuous ↑e\ns : Set E\nhs : IsOpen s\n⊢ IsOpen (↑e '' s)\n[PROOFSTEP]\nrw [← e.coe_coe] at h ⊢\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\ne : E ≃ₗ[𝕜] F\nh : Continuous ↑↑e\ns : Set E\nhs : IsOpen s\n⊢ IsOpen (↑↑e '' s)\n[PROOFSTEP]\nexact ContinuousLinearMap.isOpenMap (𝕜 := 𝕜) ⟨↑e, h⟩ e.surjective s hs\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf✝ : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\nf : E →L[𝕜] F\nhinj : ker f = ⊥\nhsurj : LinearMap.range f = ⊤\n⊢ Continuous ↑(LinearEquiv.ofBijective ↑f (_ : Injective ↑↑f ∧ Surjective ↑↑f))\n[PROOFSTEP]\nconvert f.continuous\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf✝ : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\nf : E →L[𝕜] F\nhinj : ker f = ⊥\nhsurj : LinearMap.range f = ⊤\n⊢ ↑(ofBijective f hinj hsurj) = f\n[PROOFSTEP]\next\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf✝ : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\nf : E →L[𝕜] F\nhinj : ker f = ⊥\nhsurj : LinearMap.range f = ⊤\nx✝ : E\n⊢ ↑↑(ofBijective f hinj hsurj) x✝ = ↑f x✝\n[PROOFSTEP]\nrfl\n[GOAL]\n𝕜 : Type u_1\ninst✝⁷ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 F\nf✝ : E →L[𝕜] F\ninst✝² : CompleteSpace F\ninst✝¹ : CompleteSpace E\nf : E →L[𝕜] F\nG : Submodule 𝕜 F\nh : IsCompl (LinearMap.range f) G\ninst✝ : CompleteSpace { x // x ∈ G }\nhker : ker f = ⊥\n⊢ ker (coprod f (Submodule.subtypeL G)) = ⊥\n[PROOFSTEP]\nrw [ker_coprod_of_disjoint_range]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁷ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 F\nf✝ : E →L[𝕜] F\ninst✝² : CompleteSpace F\ninst✝¹ : CompleteSpace E\nf : E →L[𝕜] F\nG : Submodule 𝕜 F\nh : IsCompl (LinearMap.range f) G\ninst✝ : CompleteSpace { x // x ∈ G }\nhker : ker f = ⊥\n⊢ Submodule.prod (ker f) (ker (Submodule.subtypeL G)) = ⊥\n[PROOFSTEP]\nrw [hker, Submodule.ker_subtypeL, Submodule.prod_bot]\n[GOAL]\ncase hd\n𝕜 : Type u_1\ninst✝⁷ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 F\nf✝ : E →L[𝕜] F\ninst✝² : CompleteSpace F\ninst✝¹ : CompleteSpace E\nf : E →L[𝕜] F\nG : Submodule 𝕜 F\nh : IsCompl (LinearMap.range f) G\ninst✝ : CompleteSpace { x // x ∈ G }\nhker : ker f = ⊥\n⊢ Disjoint (LinearMap.range f) (LinearMap.range (Submodule.subtypeL G))\n[PROOFSTEP]\nrw [Submodule.range_subtypeL]\n[GOAL]\ncase hd\n𝕜 : Type u_1\ninst✝⁷ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 F\nf✝ : E →L[𝕜] F\ninst✝² : CompleteSpace F\ninst✝¹ : CompleteSpace E\nf : E →L[𝕜] F\nG : Submodule 𝕜 F\nh : IsCompl (LinearMap.range f) G\ninst✝ : CompleteSpace { x // x ∈ G }\nhker : ker f = ⊥\n⊢ Disjoint (LinearMap.range f) G\n[PROOFSTEP]\nexact h.disjoint\n[GOAL]\n𝕜 : Type u_1\ninst✝⁷ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 F\nf✝ : E →L[𝕜] F\ninst✝² : CompleteSpace F\ninst✝¹ : CompleteSpace E\nf : E →L[𝕜] F\nG : Submodule 𝕜 F\nh : IsCompl (LinearMap.range f) G\ninst✝ : CompleteSpace { x // x ∈ G }\nhker : ker f = ⊥\n⊢ LinearMap.range (coprod f (Submodule.subtypeL G)) = ⊤\n[PROOFSTEP]\nrw [range_coprod, Submodule.range_subtypeL, h.sup_eq_top]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁷ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 F\nf✝ : E →L[𝕜] F\ninst✝² : CompleteSpace F\ninst✝¹ : CompleteSpace E\nf : E →L[𝕜] F\nG : Submodule 𝕜 F\nh : IsCompl (LinearMap.range f) G\ninst✝ : CompleteSpace { x // x ∈ G }\nhker : ker f = ⊥\n⊢ LinearMap.range f = Submodule.map (↑↑(coprodSubtypeLEquivOfIsCompl f h hker)) (Submodule.prod ⊤ ⊥)\n[PROOFSTEP]\nrw [coprodSubtypeLEquivOfIsCompl, ContinuousLinearEquiv.coe_ofBijective, coe_coprod, LinearMap.coprod_map_prod,\n  Submodule.map_bot, sup_bot_eq, Submodule.map_top]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁷ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁶ : NormedAddCommGroup E\ninst✝⁵ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace 𝕜 F\nf✝ : E →L[𝕜] F\ninst✝² : CompleteSpace F\ninst✝¹ : CompleteSpace E\nf : E →L[𝕜] F\nG : Submodule 𝕜 F\nh : IsCompl (LinearMap.range f) G\ninst✝ : CompleteSpace { x // x ∈ G }\nhker : ker f = ⊥\n⊢ LinearMap.range f = LinearMap.range ↑f\n[PROOFSTEP]\nrfl\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf✝ : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\nf : E →L[𝕜] F\nG : Submodule 𝕜 F\nh : IsCompl (LinearMap.range f) G\nhG : IsClosed ↑G\nhker : ker f = ⊥\n⊢ IsClosed ↑(LinearMap.range f)\n[PROOFSTEP]\nhaveI : CompleteSpace G := hG.completeSpace_coe\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf✝ : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\nf : E →L[𝕜] F\nG : Submodule 𝕜 F\nh : IsCompl (LinearMap.range f) G\nhG : IsClosed ↑G\nhker : ker f = ⊥\nthis : CompleteSpace { x // x ∈ G }\n⊢ IsClosed ↑(LinearMap.range f)\n[PROOFSTEP]\nlet g := coprodSubtypeLEquivOfIsCompl f h hker\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf✝ : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\nf : E →L[𝕜] F\nG : Submodule 𝕜 F\nh : IsCompl (LinearMap.range f) G\nhG : IsClosed ↑G\nhker : ker f = ⊥\nthis : CompleteSpace { x // x ∈ G }\ng : (E × { x // x ∈ G }) ≃L[𝕜] F := coprodSubtypeLEquivOfIsCompl f h hker\n⊢ IsClosed ↑(LinearMap.range f)\n[PROOFSTEP]\nrw [range_eq_map_coprodSubtypeLEquivOfIsCompl f h hker]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf✝ : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\nf : E →L[𝕜] F\nG : Submodule 𝕜 F\nh : IsCompl (LinearMap.range f) G\nhG : IsClosed ↑G\nhker : ker f = ⊥\nthis : CompleteSpace { x // x ∈ G }\ng : (E × { x // x ∈ G }) ≃L[𝕜] F := coprodSubtypeLEquivOfIsCompl f h hker\n⊢ IsClosed ↑(Submodule.map (↑↑(coprodSubtypeLEquivOfIsCompl f h hker)) (Submodule.prod ⊤ ⊥))\n[PROOFSTEP]\napply g.toHomeomorph.isClosed_image.2\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf✝ : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\nf : E →L[𝕜] F\nG : Submodule 𝕜 F\nh : IsCompl (LinearMap.range f) G\nhG : IsClosed ↑G\nhker : ker f = ⊥\nthis : CompleteSpace { x // x ∈ G }\ng : (E × { x // x ∈ G }) ≃L[𝕜] F := coprodSubtypeLEquivOfIsCompl f h hker\n⊢ IsClosed ↑(Submodule.prod ⊤ ⊥)\n[PROOFSTEP]\nexact isClosed_univ.prod isClosed_singleton\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\ng : E →ₗ[𝕜] F\nhg : IsClosed ↑(graph g)\n⊢ Continuous ↑g\n[PROOFSTEP]\nletI : CompleteSpace g.graph := completeSpace_coe_iff_isComplete.mpr hg.isComplete\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\ng : E →ₗ[𝕜] F\nhg : IsClosed ↑(graph g)\nthis : CompleteSpace { x // x ∈ graph g } := Iff.mpr completeSpace_coe_iff_isComplete (IsClosed.isComplete hg)\n⊢ Continuous ↑g\n[PROOFSTEP]\nlet φ₀ : E →ₗ[𝕜] E × F := LinearMap.id.prod g\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\ng : E →ₗ[𝕜] F\nhg : IsClosed ↑(graph g)\nthis : CompleteSpace { x // x ∈ graph g } := Iff.mpr completeSpace_coe_iff_isComplete (IsClosed.isComplete hg)\nφ₀ : E →ₗ[𝕜] E × F := prod id g\n⊢ Continuous ↑g\n[PROOFSTEP]\nhave : Function.LeftInverse Prod.fst φ₀ := fun x => rfl\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\ng : E →ₗ[𝕜] F\nhg : IsClosed ↑(graph g)\nthis✝ : CompleteSpace { x // x ∈ graph g } := Iff.mpr completeSpace_coe_iff_isComplete (IsClosed.isComplete hg)\nφ₀ : E →ₗ[𝕜] E × F := prod id g\nthis : LeftInverse Prod.fst ↑φ₀\n⊢ Continuous ↑g\n[PROOFSTEP]\nlet φ : E ≃ₗ[𝕜] g.graph := (LinearEquiv.ofLeftInverse this).trans (LinearEquiv.ofEq _ _ g.graph_eq_range_prod.symm)\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\ng : E →ₗ[𝕜] F\nhg : IsClosed ↑(graph g)\nthis✝ : CompleteSpace { x // x ∈ graph g } := Iff.mpr completeSpace_coe_iff_isComplete (IsClosed.isComplete hg)\nφ₀ : E →ₗ[𝕜] E × F := prod id g\nthis : LeftInverse Prod.fst ↑φ₀\nφ : E ≃ₗ[𝕜] { x // x ∈ graph g } :=\n  LinearEquiv.trans (LinearEquiv.ofLeftInverse this)\n    (LinearEquiv.ofEq (range φ₀) (graph g) (_ : range (prod id g) = graph g))\n⊢ Continuous ↑g\n[PROOFSTEP]\nlet ψ : g.graph ≃L[𝕜] E := φ.symm.toContinuousLinearEquivOfContinuous continuous_subtype_val.fst\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\ng : E →ₗ[𝕜] F\nhg : IsClosed ↑(graph g)\nthis✝ : CompleteSpace { x // x ∈ graph g } := Iff.mpr completeSpace_coe_iff_isComplete (IsClosed.isComplete hg)\nφ₀ : E →ₗ[𝕜] E × F := prod id g\nthis : LeftInverse Prod.fst ↑φ₀\nφ : E ≃ₗ[𝕜] { x // x ∈ graph g } :=\n  LinearEquiv.trans (LinearEquiv.ofLeftInverse this)\n    (LinearEquiv.ofEq (range φ₀) (graph g) (_ : range (prod id g) = graph g))\nψ : { x // x ∈ graph g } ≃L[𝕜] E :=\n  LinearEquiv.toContinuousLinearEquivOfContinuous (LinearEquiv.symm φ) (_ : Continuous fun a => (↑a).fst)\n⊢ Continuous ↑g\n[PROOFSTEP]\nexact (continuous_subtype_val.comp ψ.symm.continuous).snd\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\ng : E →ₗ[𝕜] F\nhg : ∀ (u : ℕ → E) (x : E) (y : F), Tendsto u atTop (𝓝 x) → Tendsto (↑g ∘ u) atTop (𝓝 y) → y = ↑g x\n⊢ Continuous ↑g\n[PROOFSTEP]\nrefine' g.continuous_of_isClosed_graph (IsSeqClosed.isClosed _)\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\ng : E →ₗ[𝕜] F\nhg : ∀ (u : ℕ → E) (x : E) (y : F), Tendsto u atTop (𝓝 x) → Tendsto (↑g ∘ u) atTop (𝓝 y) → y = ↑g x\n⊢ IsSeqClosed ↑(graph g)\n[PROOFSTEP]\nrintro φ ⟨x, y⟩ hφg hφ\n[GOAL]\ncase mk\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\ng : E →ₗ[𝕜] F\nhg : ∀ (u : ℕ → E) (x : E) (y : F), Tendsto u atTop (𝓝 x) → Tendsto (↑g ∘ u) atTop (𝓝 y) → y = ↑g x\nφ : ℕ → E × F\nx : E\ny : F\nhφg : ∀ (n : ℕ), φ n ∈ ↑(graph g)\nhφ : Tendsto φ atTop (𝓝 (x, y))\n⊢ (x, y) ∈ ↑(graph g)\n[PROOFSTEP]\nrefine' hg (Prod.fst ∘ φ) x y ((continuous_fst.tendsto _).comp hφ) _\n[GOAL]\ncase mk\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\ng : E →ₗ[𝕜] F\nhg : ∀ (u : ℕ → E) (x : E) (y : F), Tendsto u atTop (𝓝 x) → Tendsto (↑g ∘ u) atTop (𝓝 y) → y = ↑g x\nφ : ℕ → E × F\nx : E\ny : F\nhφg : ∀ (n : ℕ), φ n ∈ ↑(graph g)\nhφ : Tendsto φ atTop (𝓝 (x, y))\n⊢ Tendsto (↑g ∘ Prod.fst ∘ φ) atTop (𝓝 y)\n[PROOFSTEP]\nhave : g ∘ Prod.fst ∘ φ = Prod.snd ∘ φ := by\n  ext n\n  exact (hφg n).symm\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\ng : E →ₗ[𝕜] F\nhg : ∀ (u : ℕ → E) (x : E) (y : F), Tendsto u atTop (𝓝 x) → Tendsto (↑g ∘ u) atTop (𝓝 y) → y = ↑g x\nφ : ℕ → E × F\nx : E\ny : F\nhφg : ∀ (n : ℕ), φ n ∈ ↑(graph g)\nhφ : Tendsto φ atTop (𝓝 (x, y))\n⊢ ↑g ∘ Prod.fst ∘ φ = Prod.snd ∘ φ\n[PROOFSTEP]\next n\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\ng : E →ₗ[𝕜] F\nhg : ∀ (u : ℕ → E) (x : E) (y : F), Tendsto u atTop (𝓝 x) → Tendsto (↑g ∘ u) atTop (𝓝 y) → y = ↑g x\nφ : ℕ → E × F\nx : E\ny : F\nhφg : ∀ (n : ℕ), φ n ∈ ↑(graph g)\nhφ : Tendsto φ atTop (𝓝 (x, y))\nn : ℕ\n⊢ (↑g ∘ Prod.fst ∘ φ) n = (Prod.snd ∘ φ) n\n[PROOFSTEP]\nexact (hφg n).symm\n[GOAL]\ncase mk\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\ng : E →ₗ[𝕜] F\nhg : ∀ (u : ℕ → E) (x : E) (y : F), Tendsto u atTop (𝓝 x) → Tendsto (↑g ∘ u) atTop (𝓝 y) → y = ↑g x\nφ : ℕ → E × F\nx : E\ny : F\nhφg : ∀ (n : ℕ), φ n ∈ ↑(graph g)\nhφ : Tendsto φ atTop (𝓝 (x, y))\nthis : ↑g ∘ Prod.fst ∘ φ = Prod.snd ∘ φ\n⊢ Tendsto (↑g ∘ Prod.fst ∘ φ) atTop (𝓝 y)\n[PROOFSTEP]\nrw [this]\n[GOAL]\ncase mk\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\ng : E →ₗ[𝕜] F\nhg : ∀ (u : ℕ → E) (x : E) (y : F), Tendsto u atTop (𝓝 x) → Tendsto (↑g ∘ u) atTop (𝓝 y) → y = ↑g x\nφ : ℕ → E × F\nx : E\ny : F\nhφg : ∀ (n : ℕ), φ n ∈ ↑(graph g)\nhφ : Tendsto φ atTop (𝓝 (x, y))\nthis : ↑g ∘ Prod.fst ∘ φ = Prod.snd ∘ φ\n⊢ Tendsto (Prod.snd ∘ φ) atTop (𝓝 y)\n[PROOFSTEP]\nexact (continuous_snd.tendsto _).comp hφ\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\ng : E →ₗ[𝕜] F\nhg : IsClosed ↑(LinearMap.graph g)\n⊢ ↑(ofIsClosedGraph hg) = g\n[PROOFSTEP]\next\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\ng : E →ₗ[𝕜] F\nhg : IsClosed ↑(LinearMap.graph g)\nx✝ : E\n⊢ ↑↑(ofIsClosedGraph hg) x✝ = ↑g x✝\n[PROOFSTEP]\nrfl\n[GOAL]\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\ng : E →ₗ[𝕜] F\nhg : ∀ (u : ℕ → E) (x : E) (y : F), Tendsto u atTop (𝓝 x) → Tendsto (↑g ∘ u) atTop (𝓝 y) → y = ↑g x\n⊢ ↑(ofSeqClosedGraph hg) = g\n[PROOFSTEP]\next\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝⁶ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace 𝕜 E\nF : Type u_3\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace 𝕜 F\nf : E →L[𝕜] F\ninst✝¹ : CompleteSpace F\ninst✝ : CompleteSpace E\ng : E →ₗ[𝕜] F\nhg : ∀ (u : ℕ → E) (x : E) (y : F), Tendsto u atTop (𝓝 x) → Tendsto (↑g ∘ u) atTop (𝓝 y) → y = ↑g x\nx✝ : E\n⊢ ↑↑(ofSeqClosedGraph hg) x✝ = ↑g x✝\n[PROOFSTEP]\nrfl\n", "meta": {"mathlib_filename": "Mathlib.Analysis.NormedSpace.Banach", "llama_tokens": 72290, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8376199471193039, "lm_q2_score": 0.6039318337259583, "lm_q1q2_score": 0.5058653506292013}}
{"text": "[GOAL]\nn : ℕ\n⊢ ∀ (a b c : QuaternionGroup n), a * b * c = a * (b * c)\n[PROOFSTEP]\nrintro (i | i) (j | j) (k | k)\n[GOAL]\ncase a.a.a\nn : ℕ\ni j k : ZMod (2 * n)\n⊢ a i * a j * a k = a i * (a j * a k)\n[PROOFSTEP]\nsimp only [(· * ·), mul]\n[GOAL]\ncase a.a.xa\nn : ℕ\ni j k : ZMod (2 * n)\n⊢ a i * a j * xa k = a i * (a j * xa k)\n[PROOFSTEP]\nsimp only [(· * ·), mul]\n[GOAL]\ncase a.xa.a\nn : ℕ\ni j k : ZMod (2 * n)\n⊢ a i * xa j * a k = a i * (xa j * a k)\n[PROOFSTEP]\nsimp only [(· * ·), mul]\n[GOAL]\ncase a.xa.xa\nn : ℕ\ni j k : ZMod (2 * n)\n⊢ a i * xa j * xa k = a i * (xa j * xa k)\n[PROOFSTEP]\nsimp only [(· * ·), mul]\n[GOAL]\ncase xa.a.a\nn : ℕ\ni j k : ZMod (2 * n)\n⊢ xa i * a j * a k = xa i * (a j * a k)\n[PROOFSTEP]\nsimp only [(· * ·), mul]\n[GOAL]\ncase xa.a.xa\nn : ℕ\ni j k : ZMod (2 * n)\n⊢ xa i * a j * xa k = xa i * (a j * xa k)\n[PROOFSTEP]\nsimp only [(· * ·), mul]\n[GOAL]\ncase xa.xa.a\nn : ℕ\ni j k : ZMod (2 * n)\n⊢ xa i * xa j * a k = xa i * (xa j * a k)\n[PROOFSTEP]\nsimp only [(· * ·), mul]\n[GOAL]\ncase xa.xa.xa\nn : ℕ\ni j k : ZMod (2 * n)\n⊢ xa i * xa j * xa k = xa i * (xa j * xa k)\n[PROOFSTEP]\nsimp only [(· * ·), mul]\n[GOAL]\ncase a.a.a\nn : ℕ\ni j k : ZMod (2 * n)\n⊢ a (i + j + k) = a (i + (j + k))\n[PROOFSTEP]\nring_nf\n[GOAL]\ncase a.a.xa\nn : ℕ\ni j k : ZMod (2 * n)\n⊢ xa (k - (i + j)) = xa (k - j - i)\n[PROOFSTEP]\nring_nf\n[GOAL]\ncase a.xa.a\nn : ℕ\ni j k : ZMod (2 * n)\n⊢ xa (j - i + k) = xa (j + k - i)\n[PROOFSTEP]\nring_nf\n[GOAL]\ncase a.xa.xa\nn : ℕ\ni j k : ZMod (2 * n)\n⊢ a (↑n + k - (j - i)) = a (i + (↑n + k - j))\n[PROOFSTEP]\nring_nf\n[GOAL]\ncase xa.a.a\nn : ℕ\ni j k : ZMod (2 * n)\n⊢ xa (i + j + k) = xa (i + (j + k))\n[PROOFSTEP]\nring_nf\n[GOAL]\ncase xa.a.xa\nn : ℕ\ni j k : ZMod (2 * n)\n⊢ a (↑n + k - (i + j)) = a (↑n + (k - j) - i)\n[PROOFSTEP]\nring_nf\n[GOAL]\ncase xa.xa.a\nn : ℕ\ni j k : ZMod (2 * n)\n⊢ a (↑n + j - i + k) = a (↑n + (j + k) - i)\n[PROOFSTEP]\nring_nf\n[GOAL]\ncase xa.xa.xa\nn : ℕ\ni j k : ZMod (2 * n)\n⊢ xa (k - (↑n + j - i)) = xa (i + (↑n + k - j))\n[PROOFSTEP]\nring_nf\n[GOAL]\ncase xa.xa.xa\nn : ℕ\ni j k : ZMod (2 * n)\n⊢ xa (k + (-↑n - j) + i) = xa (k + (↑n - j) + i)\n[PROOFSTEP]\ncongr\n[GOAL]\ncase xa.xa.xa.e_a.e_a.e_a.e_a\nn : ℕ\ni j k : ZMod (2 * n)\n⊢ -↑n = ↑n\n[PROOFSTEP]\ncalc\n  -(n : ZMod (2 * n)) = 0 - n := by rw [zero_sub]\n  _ = 2 * n - n := by norm_cast; simp\n  _ = n := by ring\n[GOAL]\nn : ℕ\ni j k : ZMod (2 * n)\n⊢ -↑n = 0 - ↑n\n[PROOFSTEP]\nrw [zero_sub]\n[GOAL]\nn : ℕ\ni j k : ZMod (2 * n)\n⊢ 0 - ↑n = 2 * ↑n - ↑n\n[PROOFSTEP]\nnorm_cast\n[GOAL]\nn : ℕ\ni j k : ZMod (2 * n)\n⊢ ↑(Int.subNatNat 0 n) = ↑(Int.subNatNat (2 * n) n)\n[PROOFSTEP]\nsimp\n[GOAL]\nn : ℕ\ni j k : ZMod (2 * n)\n⊢ 2 * ↑n - ↑n = ↑n\n[PROOFSTEP]\nring\n[GOAL]\nn : ℕ\n⊢ ∀ (a : QuaternionGroup n), 1 * a = a\n[PROOFSTEP]\nrintro (i | i)\n[GOAL]\ncase a\nn : ℕ\ni : ZMod (2 * n)\n⊢ 1 * a i = a i\n[PROOFSTEP]\nexact congr_arg a (zero_add i)\n[GOAL]\ncase xa\nn : ℕ\ni : ZMod (2 * n)\n⊢ 1 * xa i = xa i\n[PROOFSTEP]\nexact congr_arg xa (sub_zero i)\n[GOAL]\nn : ℕ\n⊢ ∀ (a : QuaternionGroup n), a * 1 = a\n[PROOFSTEP]\nrintro (i | i)\n[GOAL]\ncase a\nn : ℕ\ni : ZMod (2 * n)\n⊢ a i * 1 = a i\n[PROOFSTEP]\nexact congr_arg a (add_zero i)\n[GOAL]\ncase xa\nn : ℕ\ni : ZMod (2 * n)\n⊢ xa i * 1 = xa i\n[PROOFSTEP]\nexact congr_arg xa (add_zero i)\n[GOAL]\nn : ℕ\n⊢ ∀ (a : QuaternionGroup n), a⁻¹ * a = 1\n[PROOFSTEP]\nrintro (i | i)\n[GOAL]\ncase a\nn : ℕ\ni : ZMod (2 * n)\n⊢ (a i)⁻¹ * a i = 1\n[PROOFSTEP]\nexact congr_arg a (neg_add_self i)\n[GOAL]\ncase xa\nn : ℕ\ni : ZMod (2 * n)\n⊢ (xa i)⁻¹ * xa i = 1\n[PROOFSTEP]\nexact congr_arg a (sub_self (n + i))\n[GOAL]\nn : ℕ\n⊢ Function.LeftInverse\n    (fun i =>\n      match i with\n      | a j => Sum.inl j\n      | xa j => Sum.inr j)\n    fun i =>\n    match i with\n    | Sum.inl j => a j\n    | Sum.inr j => xa j\n[PROOFSTEP]\nrintro (x | x)\n[GOAL]\ncase inl\nn : ℕ\nx : ZMod (2 * n)\n⊢ (fun i =>\n        match i with\n        | a j => Sum.inl j\n        | xa j => Sum.inr j)\n      ((fun i =>\n          match i with\n          | Sum.inl j => a j\n          | Sum.inr j => xa j)\n        (Sum.inl x)) =\n    Sum.inl x\n[PROOFSTEP]\nrfl\n[GOAL]\ncase inr\nn : ℕ\nx : ZMod (2 * n)\n⊢ (fun i =>\n        match i with\n        | a j => Sum.inl j\n        | xa j => Sum.inr j)\n      ((fun i =>\n          match i with\n          | Sum.inl j => a j\n          | Sum.inr j => xa j)\n        (Sum.inr x)) =\n    Sum.inr x\n[PROOFSTEP]\nrfl\n[GOAL]\nn : ℕ\n⊢ Function.RightInverse\n    (fun i =>\n      match i with\n      | a j => Sum.inl j\n      | xa j => Sum.inr j)\n    fun i =>\n    match i with\n    | Sum.inl j => a j\n    | Sum.inr j => xa j\n[PROOFSTEP]\nrintro (x | x)\n[GOAL]\ncase a\nn : ℕ\nx : ZMod (2 * n)\n⊢ (fun i =>\n        match i with\n        | Sum.inl j => a j\n        | Sum.inr j => xa j)\n      ((fun i =>\n          match i with\n          | a j => Sum.inl j\n          | xa j => Sum.inr j)\n        (a x)) =\n    a x\n[PROOFSTEP]\nrfl\n[GOAL]\ncase xa\nn : ℕ\nx : ZMod (2 * n)\n⊢ (fun i =>\n        match i with\n        | Sum.inl j => a j\n        | Sum.inr j => xa j)\n      ((fun i =>\n          match i with\n          | a j => Sum.inl j\n          | xa j => Sum.inr j)\n        (xa x)) =\n    xa x\n[PROOFSTEP]\nrfl\n[GOAL]\nn : ℕ\n⊢ Function.LeftInverse\n    (fun i =>\n      match i with\n      | DihedralGroup.r j => a j\n      | DihedralGroup.sr j => xa j)\n    fun i =>\n    match i with\n    | a j => DihedralGroup.r j\n    | xa j => DihedralGroup.sr j\n[PROOFSTEP]\nrintro (k | k)\n[GOAL]\ncase a\nn : ℕ\nk : ZMod (2 * 0)\n⊢ (fun i =>\n        match i with\n        | DihedralGroup.r j => a j\n        | DihedralGroup.sr j => xa j)\n      ((fun i =>\n          match i with\n          | a j => DihedralGroup.r j\n          | xa j => DihedralGroup.sr j)\n        (a k)) =\n    a k\n[PROOFSTEP]\nrfl\n[GOAL]\ncase xa\nn : ℕ\nk : ZMod (2 * 0)\n⊢ (fun i =>\n        match i with\n        | DihedralGroup.r j => a j\n        | DihedralGroup.sr j => xa j)\n      ((fun i =>\n          match i with\n          | a j => DihedralGroup.r j\n          | xa j => DihedralGroup.sr j)\n        (xa k)) =\n    xa k\n[PROOFSTEP]\nrfl\n[GOAL]\nn : ℕ\n⊢ Function.RightInverse\n    (fun i =>\n      match i with\n      | DihedralGroup.r j => a j\n      | DihedralGroup.sr j => xa j)\n    fun i =>\n    match i with\n    | a j => DihedralGroup.r j\n    | xa j => DihedralGroup.sr j\n[PROOFSTEP]\nrintro (k | k)\n[GOAL]\ncase r\nn : ℕ\nk : ZMod 0\n⊢ (fun i =>\n        match i with\n        | a j => DihedralGroup.r j\n        | xa j => DihedralGroup.sr j)\n      ((fun i =>\n          match i with\n          | DihedralGroup.r j => a j\n          | DihedralGroup.sr j => xa j)\n        (DihedralGroup.r k)) =\n    DihedralGroup.r k\n[PROOFSTEP]\nrfl\n[GOAL]\ncase sr\nn : ℕ\nk : ZMod 0\n⊢ (fun i =>\n        match i with\n        | a j => DihedralGroup.r j\n        | xa j => DihedralGroup.sr j)\n      ((fun i =>\n          match i with\n          | DihedralGroup.r j => a j\n          | DihedralGroup.sr j => xa j)\n        (DihedralGroup.sr k)) =\n    DihedralGroup.sr k\n[PROOFSTEP]\nrfl\n[GOAL]\nn : ℕ\n⊢ ∀ (x y : QuaternionGroup 0),\n    Equiv.toFun\n        {\n          toFun := fun i =>\n            match i with\n            | a j => DihedralGroup.r j\n            | xa j => DihedralGroup.sr j,\n          invFun := fun i =>\n            match i with\n            | DihedralGroup.r j => a j\n            | DihedralGroup.sr j => xa j,\n          left_inv :=\n            (_ :\n              ∀ (x : QuaternionGroup 0),\n                (fun i =>\n                      match i with\n                      | DihedralGroup.r j => a j\n                      | DihedralGroup.sr j => xa j)\n                    ((fun i =>\n                        match i with\n                        | a j => DihedralGroup.r j\n                        | xa j => DihedralGroup.sr j)\n                      x) =\n                  x),\n          right_inv :=\n            (_ :\n              ∀ (x : DihedralGroup 0),\n                (fun i =>\n                      match i with\n                      | a j => DihedralGroup.r j\n                      | xa j => DihedralGroup.sr j)\n                    ((fun i =>\n                        match i with\n                        | DihedralGroup.r j => a j\n                        | DihedralGroup.sr j => xa j)\n                      x) =\n                  x) }\n        (x * y) =\n      Equiv.toFun\n          {\n            toFun := fun i =>\n              match i with\n              | a j => DihedralGroup.r j\n              | xa j => DihedralGroup.sr j,\n            invFun := fun i =>\n              match i with\n              | DihedralGroup.r j => a j\n              | DihedralGroup.sr j => xa j,\n            left_inv :=\n              (_ :\n                ∀ (x : QuaternionGroup 0),\n                  (fun i =>\n                        match i with\n                        | DihedralGroup.r j => a j\n                        | DihedralGroup.sr j => xa j)\n                      ((fun i =>\n                          match i with\n                          | a j => DihedralGroup.r j\n                          | xa j => DihedralGroup.sr j)\n                        x) =\n                    x),\n            right_inv :=\n              (_ :\n                ∀ (x : DihedralGroup 0),\n                  (fun i =>\n                        match i with\n                        | a j => DihedralGroup.r j\n                        | xa j => DihedralGroup.sr j)\n                      ((fun i =>\n                          match i with\n                          | DihedralGroup.r j => a j\n                          | DihedralGroup.sr j => xa j)\n                        x) =\n                    x) }\n          x *\n        Equiv.toFun\n          {\n            toFun := fun i =>\n              match i with\n              | a j => DihedralGroup.r j\n              | xa j => DihedralGroup.sr j,\n            invFun := fun i =>\n              match i with\n              | DihedralGroup.r j => a j\n              | DihedralGroup.sr j => xa j,\n            left_inv :=\n              (_ :\n                ∀ (x : QuaternionGroup 0),\n                  (fun i =>\n                        match i with\n                        | DihedralGroup.r j => a j\n                        | DihedralGroup.sr j => xa j)\n                      ((fun i =>\n                          match i with\n                          | a j => DihedralGroup.r j\n                          | xa j => DihedralGroup.sr j)\n                        x) =\n                    x),\n            right_inv :=\n              (_ :\n                ∀ (x : DihedralGroup 0),\n                  (fun i =>\n                        match i with\n                        | a j => DihedralGroup.r j\n                        | xa j => DihedralGroup.sr j)\n                      ((fun i =>\n                          match i with\n                          | DihedralGroup.r j => a j\n                          | DihedralGroup.sr j => xa j)\n                        x) =\n                    x) }\n          y\n[PROOFSTEP]\nrintro (k | k) (l | l)\n[GOAL]\ncase a.a\nn : ℕ\nk l : ZMod (2 * 0)\n⊢ Equiv.toFun\n      {\n        toFun := fun i =>\n          match i with\n          | a j => DihedralGroup.r j\n          | xa j => DihedralGroup.sr j,\n        invFun := fun i =>\n          match i with\n          | DihedralGroup.r j => a j\n          | DihedralGroup.sr j => xa j,\n        left_inv :=\n          (_ :\n            ∀ (x : QuaternionGroup 0),\n              (fun i =>\n                    match i with\n                    | DihedralGroup.r j => a j\n                    | DihedralGroup.sr j => xa j)\n                  ((fun i =>\n                      match i with\n                      | a j => DihedralGroup.r j\n                      | xa j => DihedralGroup.sr j)\n                    x) =\n                x),\n        right_inv :=\n          (_ :\n            ∀ (x : DihedralGroup 0),\n              (fun i =>\n                    match i with\n                    | a j => DihedralGroup.r j\n                    | xa j => DihedralGroup.sr j)\n                  ((fun i =>\n                      match i with\n                      | DihedralGroup.r j => a j\n                      | DihedralGroup.sr j => xa j)\n                    x) =\n                x) }\n      (a k * a l) =\n    Equiv.toFun\n        {\n          toFun := fun i =>\n            match i with\n            | a j => DihedralGroup.r j\n            | xa j => DihedralGroup.sr j,\n          invFun := fun i =>\n            match i with\n            | DihedralGroup.r j => a j\n            | DihedralGroup.sr j => xa j,\n          left_inv :=\n            (_ :\n              ∀ (x : QuaternionGroup 0),\n                (fun i =>\n                      match i with\n                      | DihedralGroup.r j => a j\n                      | DihedralGroup.sr j => xa j)\n                    ((fun i =>\n                        match i with\n                        | a j => DihedralGroup.r j\n                        | xa j => DihedralGroup.sr j)\n                      x) =\n                  x),\n          right_inv :=\n            (_ :\n              ∀ (x : DihedralGroup 0),\n                (fun i =>\n                      match i with\n                      | a j => DihedralGroup.r j\n                      | xa j => DihedralGroup.sr j)\n                    ((fun i =>\n                        match i with\n                        | DihedralGroup.r j => a j\n                        | DihedralGroup.sr j => xa j)\n                      x) =\n                  x) }\n        (a k) *\n      Equiv.toFun\n        {\n          toFun := fun i =>\n            match i with\n            | a j => DihedralGroup.r j\n            | xa j => DihedralGroup.sr j,\n          invFun := fun i =>\n            match i with\n            | DihedralGroup.r j => a j\n            | DihedralGroup.sr j => xa j,\n          left_inv :=\n            (_ :\n              ∀ (x : QuaternionGroup 0),\n                (fun i =>\n                      match i with\n                      | DihedralGroup.r j => a j\n                      | DihedralGroup.sr j => xa j)\n                    ((fun i =>\n                        match i with\n                        | a j => DihedralGroup.r j\n                        | xa j => DihedralGroup.sr j)\n                      x) =\n                  x),\n          right_inv :=\n            (_ :\n              ∀ (x : DihedralGroup 0),\n                (fun i =>\n                      match i with\n                      | a j => DihedralGroup.r j\n                      | xa j => DihedralGroup.sr j)\n                    ((fun i =>\n                        match i with\n                        | DihedralGroup.r j => a j\n                        | DihedralGroup.sr j => xa j)\n                      x) =\n                  x) }\n        (a l)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase a.xa\nn : ℕ\nk l : ZMod (2 * 0)\n⊢ Equiv.toFun\n      {\n        toFun := fun i =>\n          match i with\n          | a j => DihedralGroup.r j\n          | xa j => DihedralGroup.sr j,\n        invFun := fun i =>\n          match i with\n          | DihedralGroup.r j => a j\n          | DihedralGroup.sr j => xa j,\n        left_inv :=\n          (_ :\n            ∀ (x : QuaternionGroup 0),\n              (fun i =>\n                    match i with\n                    | DihedralGroup.r j => a j\n                    | DihedralGroup.sr j => xa j)\n                  ((fun i =>\n                      match i with\n                      | a j => DihedralGroup.r j\n                      | xa j => DihedralGroup.sr j)\n                    x) =\n                x),\n        right_inv :=\n          (_ :\n            ∀ (x : DihedralGroup 0),\n              (fun i =>\n                    match i with\n                    | a j => DihedralGroup.r j\n                    | xa j => DihedralGroup.sr j)\n                  ((fun i =>\n                      match i with\n                      | DihedralGroup.r j => a j\n                      | DihedralGroup.sr j => xa j)\n                    x) =\n                x) }\n      (a k * xa l) =\n    Equiv.toFun\n        {\n          toFun := fun i =>\n            match i with\n            | a j => DihedralGroup.r j\n            | xa j => DihedralGroup.sr j,\n          invFun := fun i =>\n            match i with\n            | DihedralGroup.r j => a j\n            | DihedralGroup.sr j => xa j,\n          left_inv :=\n            (_ :\n              ∀ (x : QuaternionGroup 0),\n                (fun i =>\n                      match i with\n                      | DihedralGroup.r j => a j\n                      | DihedralGroup.sr j => xa j)\n                    ((fun i =>\n                        match i with\n                        | a j => DihedralGroup.r j\n                        | xa j => DihedralGroup.sr j)\n                      x) =\n                  x),\n          right_inv :=\n            (_ :\n              ∀ (x : DihedralGroup 0),\n                (fun i =>\n                      match i with\n                      | a j => DihedralGroup.r j\n                      | xa j => DihedralGroup.sr j)\n                    ((fun i =>\n                        match i with\n                        | DihedralGroup.r j => a j\n                        | DihedralGroup.sr j => xa j)\n                      x) =\n                  x) }\n        (a k) *\n      Equiv.toFun\n        {\n          toFun := fun i =>\n            match i with\n            | a j => DihedralGroup.r j\n            | xa j => DihedralGroup.sr j,\n          invFun := fun i =>\n            match i with\n            | DihedralGroup.r j => a j\n            | DihedralGroup.sr j => xa j,\n          left_inv :=\n            (_ :\n              ∀ (x : QuaternionGroup 0),\n                (fun i =>\n                      match i with\n                      | DihedralGroup.r j => a j\n                      | DihedralGroup.sr j => xa j)\n                    ((fun i =>\n                        match i with\n                        | a j => DihedralGroup.r j\n                        | xa j => DihedralGroup.sr j)\n                      x) =\n                  x),\n          right_inv :=\n            (_ :\n              ∀ (x : DihedralGroup 0),\n                (fun i =>\n                      match i with\n                      | a j => DihedralGroup.r j\n                      | xa j => DihedralGroup.sr j)\n                    ((fun i =>\n                        match i with\n                        | DihedralGroup.r j => a j\n                        | DihedralGroup.sr j => xa j)\n                      x) =\n                  x) }\n        (xa l)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase xa.a\nn : ℕ\nk l : ZMod (2 * 0)\n⊢ Equiv.toFun\n      {\n        toFun := fun i =>\n          match i with\n          | a j => DihedralGroup.r j\n          | xa j => DihedralGroup.sr j,\n        invFun := fun i =>\n          match i with\n          | DihedralGroup.r j => a j\n          | DihedralGroup.sr j => xa j,\n        left_inv :=\n          (_ :\n            ∀ (x : QuaternionGroup 0),\n              (fun i =>\n                    match i with\n                    | DihedralGroup.r j => a j\n                    | DihedralGroup.sr j => xa j)\n                  ((fun i =>\n                      match i with\n                      | a j => DihedralGroup.r j\n                      | xa j => DihedralGroup.sr j)\n                    x) =\n                x),\n        right_inv :=\n          (_ :\n            ∀ (x : DihedralGroup 0),\n              (fun i =>\n                    match i with\n                    | a j => DihedralGroup.r j\n                    | xa j => DihedralGroup.sr j)\n                  ((fun i =>\n                      match i with\n                      | DihedralGroup.r j => a j\n                      | DihedralGroup.sr j => xa j)\n                    x) =\n                x) }\n      (xa k * a l) =\n    Equiv.toFun\n        {\n          toFun := fun i =>\n            match i with\n            | a j => DihedralGroup.r j\n            | xa j => DihedralGroup.sr j,\n          invFun := fun i =>\n            match i with\n            | DihedralGroup.r j => a j\n            | DihedralGroup.sr j => xa j,\n          left_inv :=\n            (_ :\n              ∀ (x : QuaternionGroup 0),\n                (fun i =>\n                      match i with\n                      | DihedralGroup.r j => a j\n                      | DihedralGroup.sr j => xa j)\n                    ((fun i =>\n                        match i with\n                        | a j => DihedralGroup.r j\n                        | xa j => DihedralGroup.sr j)\n                      x) =\n                  x),\n          right_inv :=\n            (_ :\n              ∀ (x : DihedralGroup 0),\n                (fun i =>\n                      match i with\n                      | a j => DihedralGroup.r j\n                      | xa j => DihedralGroup.sr j)\n                    ((fun i =>\n                        match i with\n                        | DihedralGroup.r j => a j\n                        | DihedralGroup.sr j => xa j)\n                      x) =\n                  x) }\n        (xa k) *\n      Equiv.toFun\n        {\n          toFun := fun i =>\n            match i with\n            | a j => DihedralGroup.r j\n            | xa j => DihedralGroup.sr j,\n          invFun := fun i =>\n            match i with\n            | DihedralGroup.r j => a j\n            | DihedralGroup.sr j => xa j,\n          left_inv :=\n            (_ :\n              ∀ (x : QuaternionGroup 0),\n                (fun i =>\n                      match i with\n                      | DihedralGroup.r j => a j\n                      | DihedralGroup.sr j => xa j)\n                    ((fun i =>\n                        match i with\n                        | a j => DihedralGroup.r j\n                        | xa j => DihedralGroup.sr j)\n                      x) =\n                  x),\n          right_inv :=\n            (_ :\n              ∀ (x : DihedralGroup 0),\n                (fun i =>\n                      match i with\n                      | a j => DihedralGroup.r j\n                      | xa j => DihedralGroup.sr j)\n                    ((fun i =>\n                        match i with\n                        | DihedralGroup.r j => a j\n                        | DihedralGroup.sr j => xa j)\n                      x) =\n                  x) }\n        (a l)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase xa.xa\nn : ℕ\nk l : ZMod (2 * 0)\n⊢ Equiv.toFun\n      {\n        toFun := fun i =>\n          match i with\n          | a j => DihedralGroup.r j\n          | xa j => DihedralGroup.sr j,\n        invFun := fun i =>\n          match i with\n          | DihedralGroup.r j => a j\n          | DihedralGroup.sr j => xa j,\n        left_inv :=\n          (_ :\n            ∀ (x : QuaternionGroup 0),\n              (fun i =>\n                    match i with\n                    | DihedralGroup.r j => a j\n                    | DihedralGroup.sr j => xa j)\n                  ((fun i =>\n                      match i with\n                      | a j => DihedralGroup.r j\n                      | xa j => DihedralGroup.sr j)\n                    x) =\n                x),\n        right_inv :=\n          (_ :\n            ∀ (x : DihedralGroup 0),\n              (fun i =>\n                    match i with\n                    | a j => DihedralGroup.r j\n                    | xa j => DihedralGroup.sr j)\n                  ((fun i =>\n                      match i with\n                      | DihedralGroup.r j => a j\n                      | DihedralGroup.sr j => xa j)\n                    x) =\n                x) }\n      (xa k * xa l) =\n    Equiv.toFun\n        {\n          toFun := fun i =>\n            match i with\n            | a j => DihedralGroup.r j\n            | xa j => DihedralGroup.sr j,\n          invFun := fun i =>\n            match i with\n            | DihedralGroup.r j => a j\n            | DihedralGroup.sr j => xa j,\n          left_inv :=\n            (_ :\n              ∀ (x : QuaternionGroup 0),\n                (fun i =>\n                      match i with\n                      | DihedralGroup.r j => a j\n                      | DihedralGroup.sr j => xa j)\n                    ((fun i =>\n                        match i with\n                        | a j => DihedralGroup.r j\n                        | xa j => DihedralGroup.sr j)\n                      x) =\n                  x),\n          right_inv :=\n            (_ :\n              ∀ (x : DihedralGroup 0),\n                (fun i =>\n                      match i with\n                      | a j => DihedralGroup.r j\n                      | xa j => DihedralGroup.sr j)\n                    ((fun i =>\n                        match i with\n                        | DihedralGroup.r j => a j\n                        | DihedralGroup.sr j => xa j)\n                      x) =\n                  x) }\n        (xa k) *\n      Equiv.toFun\n        {\n          toFun := fun i =>\n            match i with\n            | a j => DihedralGroup.r j\n            | xa j => DihedralGroup.sr j,\n          invFun := fun i =>\n            match i with\n            | DihedralGroup.r j => a j\n            | DihedralGroup.sr j => xa j,\n          left_inv :=\n            (_ :\n              ∀ (x : QuaternionGroup 0),\n                (fun i =>\n                      match i with\n                      | DihedralGroup.r j => a j\n                      | DihedralGroup.sr j => xa j)\n                    ((fun i =>\n                        match i with\n                        | a j => DihedralGroup.r j\n                        | xa j => DihedralGroup.sr j)\n                      x) =\n                  x),\n          right_inv :=\n            (_ :\n              ∀ (x : DihedralGroup 0),\n                (fun i =>\n                      match i with\n                      | a j => DihedralGroup.r j\n                      | xa j => DihedralGroup.sr j)\n                    ((fun i =>\n                        match i with\n                        | DihedralGroup.r j => a j\n                        | DihedralGroup.sr j => xa j)\n                      x) =\n                  x) }\n        (xa l)\n[PROOFSTEP]\nsimp\n[GOAL]\nn : ℕ\n⊢ a 0 ≠ xa 0\n[PROOFSTEP]\nrevert n\n[GOAL]\n⊢ ∀ {n : ℕ}, a 0 ≠ xa 0\n[PROOFSTEP]\nsimp\n[GOAL]\nn : ℕ\ninst✝ : NeZero n\n⊢ Fintype.card (QuaternionGroup n) = 4 * n\n[PROOFSTEP]\nrw [← Fintype.card_eq.mpr ⟨fintypeHelper⟩, Fintype.card_sum, ZMod.card, two_mul]\n[GOAL]\nn : ℕ\ninst✝ : NeZero n\n⊢ n + n + (n + n) = 4 * n\n[PROOFSTEP]\nring\n[GOAL]\nn k : ℕ\n⊢ a 1 ^ k = a ↑k\n[PROOFSTEP]\ninduction' k with k IH\n[GOAL]\ncase zero\nn : ℕ\n⊢ a 1 ^ Nat.zero = a ↑Nat.zero\n[PROOFSTEP]\nrw [Nat.cast_zero]\n[GOAL]\ncase zero\nn : ℕ\n⊢ a 1 ^ Nat.zero = a 0\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ\nn k : ℕ\nIH : a 1 ^ k = a ↑k\n⊢ a 1 ^ Nat.succ k = a ↑(Nat.succ k)\n[PROOFSTEP]\nrw [pow_succ, IH, a_mul_a]\n[GOAL]\ncase succ\nn k : ℕ\nIH : a 1 ^ k = a ↑k\n⊢ a (1 + ↑k) = a ↑(Nat.succ k)\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase succ.e_a\nn k : ℕ\nIH : a 1 ^ k = a ↑k\n⊢ 1 + ↑k = ↑(Nat.succ k)\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase succ.e_a\nn k : ℕ\nIH : a 1 ^ k = a ↑k\n⊢ ↑(1 + k) = ↑(Nat.succ k)\n[PROOFSTEP]\nrw [Nat.one_add]\n[GOAL]\nn : ℕ\n⊢ a 1 ^ (2 * n) = 1\n[PROOFSTEP]\nrw [a_one_pow, one_def]\n[GOAL]\nn : ℕ\n⊢ a ↑(2 * n) = a 0\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_a\nn : ℕ\n⊢ ↑(2 * n) = 0\n[PROOFSTEP]\nexact ZMod.nat_cast_self _\n[GOAL]\nn : ℕ\ni : ZMod (2 * n)\n⊢ xa i ^ 2 = a ↑n\n[PROOFSTEP]\nsimp [sq]\n[GOAL]\nn : ℕ\ni : ZMod (2 * n)\n⊢ xa i ^ 4 = 1\n[PROOFSTEP]\nrw [pow_succ, pow_succ, sq, xa_mul_xa, xa_mul_a, xa_mul_xa, add_sub_cancel, add_sub_assoc, add_sub_cancel']\n[GOAL]\nn : ℕ\ni : ZMod (2 * n)\n⊢ a (↑n + ↑n) = 1\n[PROOFSTEP]\nnorm_cast\n[GOAL]\nn : ℕ\ni : ZMod (2 * n)\n⊢ a ↑(n + n) = 1\n[PROOFSTEP]\nrw [← two_mul]\n[GOAL]\nn : ℕ\ni : ZMod (2 * n)\n⊢ a ↑(2 * n) = 1\n[PROOFSTEP]\nsimp [one_def]\n[GOAL]\nn : ℕ\ninst✝ : NeZero n\ni : ZMod (2 * n)\n⊢ orderOf (xa i) = 4\n[PROOFSTEP]\nchange _ = 2 ^ 2\n[GOAL]\nn : ℕ\ninst✝ : NeZero n\ni : ZMod (2 * n)\n⊢ orderOf (xa i) = 2 ^ 2\n[PROOFSTEP]\nhaveI : Fact (Nat.Prime 2) := Fact.mk Nat.prime_two\n[GOAL]\nn : ℕ\ninst✝ : NeZero n\ni : ZMod (2 * n)\nthis : Fact (Nat.Prime 2)\n⊢ orderOf (xa i) = 2 ^ 2\n[PROOFSTEP]\napply orderOf_eq_prime_pow\n[GOAL]\ncase hnot\nn : ℕ\ninst✝ : NeZero n\ni : ZMod (2 * n)\nthis : Fact (Nat.Prime 2)\n⊢ ¬xa i ^ 2 ^ 1 = 1\n[PROOFSTEP]\nintro h\n[GOAL]\ncase hnot\nn : ℕ\ninst✝ : NeZero n\ni : ZMod (2 * n)\nthis : Fact (Nat.Prime 2)\nh : xa i ^ 2 ^ 1 = 1\n⊢ False\n[PROOFSTEP]\nsimp only [pow_one, xa_sq] at h \n[GOAL]\ncase hnot\nn : ℕ\ninst✝ : NeZero n\ni : ZMod (2 * n)\nthis : Fact (Nat.Prime 2)\nh : a ↑n = 1\n⊢ False\n[PROOFSTEP]\ninjection h with h'\n[GOAL]\ncase hnot\nn : ℕ\ninst✝ : NeZero n\ni : ZMod (2 * n)\nthis : Fact (Nat.Prime 2)\nh' : ↑n = 0\n⊢ False\n[PROOFSTEP]\napply_fun ZMod.val at h' \n[GOAL]\ncase hnot\nn : ℕ\ninst✝ : NeZero n\ni : ZMod (2 * n)\nthis : Fact (Nat.Prime 2)\nh' : ZMod.val ↑n = ZMod.val 0\n⊢ False\n[PROOFSTEP]\napply_fun (· / n) at h' \n[GOAL]\ncase hnot\nn : ℕ\ninst✝ : NeZero n\ni : ZMod (2 * n)\nthis : Fact (Nat.Prime 2)\nh' : ZMod.val ↑n / n = ZMod.val 0 / n\n⊢ False\n[PROOFSTEP]\nsimp only [ZMod.val_nat_cast, ZMod.val_zero, Nat.zero_div, Nat.mod_mul_left_div_self, Nat.div_self (NeZero.pos n)] at h' \n[GOAL]\ncase hfin\nn : ℕ\ninst✝ : NeZero n\ni : ZMod (2 * n)\nthis : Fact (Nat.Prime 2)\n⊢ xa i ^ 2 ^ (1 + 1) = 1\n[PROOFSTEP]\nnorm_num\n[GOAL]\nn : ℕ\n⊢ IsCyclic (QuaternionGroup 1)\n[PROOFSTEP]\napply isCyclic_of_orderOf_eq_card\n[GOAL]\ncase hx\nn : ℕ\n⊢ orderOf ?x = Fintype.card (QuaternionGroup 1)\ncase x n : ℕ ⊢ QuaternionGroup 1\n[PROOFSTEP]\nrw [card, mul_one]\n[GOAL]\ncase hx\nn : ℕ\n⊢ orderOf ?x = 4\ncase x\nn : ℕ\n⊢ QuaternionGroup 1\ncase x\nn : ℕ\n⊢ QuaternionGroup 1\ncase x n : ℕ ⊢ QuaternionGroup 1\n[PROOFSTEP]\nexact orderOf_xa 0\n[GOAL]\nn : ℕ\n⊢ orderOf (a 1) = 2 * n\n[PROOFSTEP]\ncases' eq_zero_or_neZero n with hn hn\n[GOAL]\ncase inl\nn : ℕ\nhn : n = 0\n⊢ orderOf (a 1) = 2 * n\n[PROOFSTEP]\nsubst hn\n[GOAL]\ncase inl\n⊢ orderOf (a 1) = 2 * 0\n[PROOFSTEP]\nsimp_rw [mul_zero, orderOf_eq_zero_iff']\n[GOAL]\ncase inl\n⊢ ∀ (n : ℕ), 0 < n → QuaternionGroup.a 1 ^ n ≠ 1\n[PROOFSTEP]\nintro n h\n[GOAL]\ncase inl\nn : ℕ\nh : 0 < n\n⊢ a 1 ^ n ≠ 1\n[PROOFSTEP]\nrw [one_def, a_one_pow]\n[GOAL]\ncase inl\nn : ℕ\nh : 0 < n\n⊢ a ↑n ≠ a 0\n[PROOFSTEP]\napply mt a.inj\n[GOAL]\ncase inl\nn : ℕ\nh : 0 < n\n⊢ ¬↑n = 0\n[PROOFSTEP]\nhaveI : CharZero (ZMod (2 * 0)) := ZMod.charZero\n[GOAL]\ncase inl\nn : ℕ\nh : 0 < n\nthis : CharZero (ZMod (2 * 0))\n⊢ ¬↑n = 0\n[PROOFSTEP]\nsimpa using h.ne'\n[GOAL]\ncase inr\nn : ℕ\nhn : NeZero n\n⊢ orderOf (a 1) = 2 * n\n[PROOFSTEP]\napply (Nat.le_of_dvd (NeZero.pos _) (orderOf_dvd_of_pow_eq_one (@a_one_pow_n n))).lt_or_eq.resolve_left\n[GOAL]\ncase inr\nn : ℕ\nhn : NeZero n\n⊢ ¬orderOf (a 1) < 2 * n\n[PROOFSTEP]\nintro h\n[GOAL]\ncase inr\nn : ℕ\nhn : NeZero n\nh : orderOf (a 1) < 2 * n\n⊢ False\n[PROOFSTEP]\nhave h1 : (a 1 : QuaternionGroup n) ^ orderOf (a 1) = 1 := pow_orderOf_eq_one _\n[GOAL]\ncase inr\nn : ℕ\nhn : NeZero n\nh : orderOf (a 1) < 2 * n\nh1 : a 1 ^ orderOf (a 1) = 1\n⊢ False\n[PROOFSTEP]\nrw [a_one_pow] at h1 \n[GOAL]\ncase inr\nn : ℕ\nhn : NeZero n\nh : orderOf (a 1) < 2 * n\nh1 : a ↑(orderOf (a 1)) = 1\n⊢ False\n[PROOFSTEP]\ninjection h1 with h2\n[GOAL]\ncase inr\nn : ℕ\nhn : NeZero n\nh : orderOf (a 1) < 2 * n\nh2 : ↑(orderOf (a 1)) = 0\n⊢ False\n[PROOFSTEP]\nrw [← ZMod.val_eq_zero, ZMod.val_nat_cast, Nat.mod_eq_of_lt h] at h2 \n[GOAL]\ncase inr\nn : ℕ\nhn : NeZero n\nh : orderOf (a 1) < 2 * n\nh2 : orderOf (a 1) = 0\n⊢ False\n[PROOFSTEP]\nexact absurd h2.symm (orderOf_pos _).ne\n[GOAL]\nn : ℕ\ninst✝ : NeZero n\ni : ZMod (2 * n)\n⊢ orderOf (a i) = 2 * n / Nat.gcd (2 * n) (ZMod.val i)\n[PROOFSTEP]\nconv_lhs => rw [← ZMod.nat_cast_zmod_val i]\n[GOAL]\nn : ℕ\ninst✝ : NeZero n\ni : ZMod (2 * n)\n| orderOf (a i)\n[PROOFSTEP]\nrw [← ZMod.nat_cast_zmod_val i]\n[GOAL]\nn : ℕ\ninst✝ : NeZero n\ni : ZMod (2 * n)\n| orderOf (a i)\n[PROOFSTEP]\nrw [← ZMod.nat_cast_zmod_val i]\n[GOAL]\nn : ℕ\ninst✝ : NeZero n\ni : ZMod (2 * n)\n| orderOf (a i)\n[PROOFSTEP]\nrw [← ZMod.nat_cast_zmod_val i]\n[GOAL]\nn : ℕ\ninst✝ : NeZero n\ni : ZMod (2 * n)\n⊢ orderOf (a ↑(ZMod.val i)) = 2 * n / Nat.gcd (2 * n) (ZMod.val i)\n[PROOFSTEP]\nrw [← a_one_pow, orderOf_pow, orderOf_a_one]\n[GOAL]\nn : ℕ\n⊢ Monoid.exponent (QuaternionGroup n) = 2 * lcm n 2\n[PROOFSTEP]\nrw [← normalize_eq 2, ← lcm_mul_left, normalize_eq]\n[GOAL]\nn : ℕ\n⊢ Monoid.exponent (QuaternionGroup n) = lcm (2 * n) (2 * 2)\n[PROOFSTEP]\nnorm_num\n[GOAL]\nn : ℕ\n⊢ Monoid.exponent (QuaternionGroup n) = lcm (2 * n) 4\n[PROOFSTEP]\ncases' eq_zero_or_neZero n with hn hn\n[GOAL]\ncase inl\nn : ℕ\nhn : n = 0\n⊢ Monoid.exponent (QuaternionGroup n) = lcm (2 * n) 4\n[PROOFSTEP]\nsubst hn\n[GOAL]\ncase inl\n⊢ Monoid.exponent (QuaternionGroup 0) = lcm (2 * 0) 4\n[PROOFSTEP]\nsimp only [lcm_zero_left, mul_zero]\n[GOAL]\ncase inl\n⊢ Monoid.exponent (QuaternionGroup 0) = 0\n[PROOFSTEP]\nexact Monoid.exponent_eq_zero_of_order_zero orderOf_a_one\n[GOAL]\ncase inr\nn : ℕ\nhn : NeZero n\n⊢ Monoid.exponent (QuaternionGroup n) = lcm (2 * n) 4\n[PROOFSTEP]\napply Nat.dvd_antisymm\n[GOAL]\ncase inr.a\nn : ℕ\nhn : NeZero n\n⊢ Monoid.exponent (QuaternionGroup n) ∣ lcm (2 * n) 4\n[PROOFSTEP]\napply Monoid.exponent_dvd_of_forall_pow_eq_one\n[GOAL]\ncase inr.a.hG\nn : ℕ\nhn : NeZero n\n⊢ ∀ (g : QuaternionGroup n), g ^ lcm (2 * n) 4 = 1\n[PROOFSTEP]\nrintro (m | m)\n[GOAL]\ncase inr.a.hG.a\nn : ℕ\nhn : NeZero n\nm : ZMod (2 * n)\n⊢ a m ^ lcm (2 * n) 4 = 1\n[PROOFSTEP]\nrw [← orderOf_dvd_iff_pow_eq_one, orderOf_a]\n[GOAL]\ncase inr.a.hG.a\nn : ℕ\nhn : NeZero n\nm : ZMod (2 * n)\n⊢ 2 * n / Nat.gcd (2 * n) (ZMod.val m) ∣ lcm (2 * n) 4\n[PROOFSTEP]\nrefine' Nat.dvd_trans ⟨gcd (2 * n) m.val, _⟩ (dvd_lcm_left (2 * n) 4)\n[GOAL]\ncase inr.a.hG.a\nn : ℕ\nhn : NeZero n\nm : ZMod (2 * n)\n⊢ 2 * n = 2 * n / Nat.gcd (2 * n) (ZMod.val m) * gcd (2 * n) (ZMod.val m)\n[PROOFSTEP]\nexact (Nat.div_mul_cancel (Nat.gcd_dvd_left (2 * n) m.val)).symm\n[GOAL]\ncase inr.a.hG.xa\nn : ℕ\nhn : NeZero n\nm : ZMod (2 * n)\n⊢ xa m ^ lcm (2 * n) 4 = 1\n[PROOFSTEP]\nrw [← orderOf_dvd_iff_pow_eq_one, orderOf_xa]\n[GOAL]\ncase inr.a.hG.xa\nn : ℕ\nhn : NeZero n\nm : ZMod (2 * n)\n⊢ 4 ∣ lcm (2 * n) 4\n[PROOFSTEP]\nexact dvd_lcm_right (2 * n) 4\n[GOAL]\ncase inr.a\nn : ℕ\nhn : NeZero n\n⊢ lcm (2 * n) 4 ∣ Monoid.exponent (QuaternionGroup n)\n[PROOFSTEP]\napply lcm_dvd\n[GOAL]\ncase inr.a.hab\nn : ℕ\nhn : NeZero n\n⊢ 2 * n ∣ Monoid.exponent (QuaternionGroup n)\n[PROOFSTEP]\nconvert Monoid.order_dvd_exponent (a 1)\n[GOAL]\ncase h.e'_3\nn : ℕ\nhn : NeZero n\n⊢ 2 * n = orderOf (a 1)\n[PROOFSTEP]\nexact orderOf_a_one.symm\n[GOAL]\ncase inr.a.hcb\nn : ℕ\nhn : NeZero n\n⊢ 4 ∣ Monoid.exponent (QuaternionGroup n)\n[PROOFSTEP]\nconvert Monoid.order_dvd_exponent (xa (0 : ZMod (2 * n)))\n[GOAL]\ncase h.e'_3\nn : ℕ\nhn : NeZero n\n⊢ 4 = orderOf (xa 0)\n[PROOFSTEP]\nexact (orderOf_xa 0).symm\n", "meta": {"mathlib_filename": "Mathlib.GroupTheory.SpecificGroups.Quaternion", "llama_tokens": 13339, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8479677583778257, "lm_q2_score": 0.5964331462646255, "lm_q1q2_score": 0.5057560780602484}}
{"text": "[GOAL]\nn : ℕ\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nc : Fin n → ℂ\nR θ : Fin n → ℝ\n⊢ torusMap c R θ - c = torusMap 0 R θ\n[PROOFSTEP]\next1 i\n[GOAL]\ncase h\nn : ℕ\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nc : Fin n → ℂ\nR θ : Fin n → ℝ\ni : Fin n\n⊢ (torusMap c R θ - c) i = torusMap 0 R θ i\n[PROOFSTEP]\nsimp [torusMap]\n[GOAL]\nn : ℕ\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nc : Fin n → ℂ\nR θ : Fin n → ℝ\n⊢ torusMap c R θ = c ↔ R = 0\n[PROOFSTEP]\nsimp [funext_iff, torusMap, exp_ne_zero]\n[GOAL]\nn : ℕ\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nf g : (Fin n → ℂ) → E\nc✝ : Fin n → ℂ\nR✝ : Fin n → ℝ\na : E\nc : Fin n → ℂ\nR : Fin n → ℝ\n⊢ TorusIntegrable (fun x => a) c R\n[PROOFSTEP]\nsimp [TorusIntegrable, measure_Icc_lt_top]\n[GOAL]\nn : ℕ\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nf✝ g : (Fin n → ℂ) → E\nc✝ : Fin n → ℂ\nR : Fin n → ℝ\nf : (Fin n → ℂ) → E\nc : Fin n → ℂ\n⊢ TorusIntegrable f c 0\n[PROOFSTEP]\nrw [TorusIntegrable, torusMap_zero_radius]\n[GOAL]\nn : ℕ\nE : Type u_1\ninst✝ : NormedAddCommGroup E\nf✝ g : (Fin n → ℂ) → E\nc✝ : Fin n → ℂ\nR : Fin n → ℝ\nf : (Fin n → ℂ) → E\nc : Fin n → ℂ\n⊢ IntegrableOn (fun θ => f (const (Fin n → ℝ) c θ)) (Icc 0 fun x => 2 * π)\n[PROOFSTEP]\napply torusIntegrable_const (f c) c 0\n[GOAL]\nn : ℕ\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\nf g : (Fin n → ℂ) → E\nc : Fin n → ℂ\nR : Fin n → ℝ\ninst✝ : NormedSpace ℂ E\nhf : TorusIntegrable f c R\n⊢ IntegrableOn (fun θ => (∏ i : Fin n, ↑(R i) * exp (↑(θ i) * I) * I) • f (torusMap c R θ)) (Icc 0 fun x => 2 * π)\n[PROOFSTEP]\nrefine' (hf.norm.const_mul (∏ i, |R i|)).mono' _ _\n[GOAL]\ncase refine'_1\nn : ℕ\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\nf g : (Fin n → ℂ) → E\nc : Fin n → ℂ\nR : Fin n → ℝ\ninst✝ : NormedSpace ℂ E\nhf : TorusIntegrable f c R\n⊢ AEStronglyMeasurable (fun θ => (∏ i : Fin n, ↑(R i) * exp (↑(θ i) * I) * I) • f (torusMap c R θ))\n    (Measure.restrict volume (Icc 0 fun x => 2 * π))\n[PROOFSTEP]\nrefine (Continuous.aestronglyMeasurable ?_).smul hf.1\n[GOAL]\ncase refine'_1\nn : ℕ\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\nf g : (Fin n → ℂ) → E\nc : Fin n → ℂ\nR : Fin n → ℝ\ninst✝ : NormedSpace ℂ E\nhf : TorusIntegrable f c R\n⊢ Continuous fun θ => ∏ i : Fin n, ↑(R i) * exp (↑(θ i) * I) * I\n[PROOFSTEP]\ncontinuity\n[GOAL]\ncase refine'_2\nn : ℕ\nE : Type u_1\ninst✝¹ : NormedAddCommGroup E\nf g : (Fin n → ℂ) → E\nc : Fin n → ℂ\nR : Fin n → ℝ\ninst✝ : NormedSpace ℂ E\nhf : TorusIntegrable f c R\n⊢ ∀ᵐ (a : Fin n → ℝ) ∂Measure.restrict volume (Icc 0 fun x => 2 * π),\n    ‖(∏ i : Fin n, ↑(R i) * exp (↑(a i) * I) * I) • f (torusMap c R a)‖ ≤ (∏ i : Fin n, |R i|) * ‖f (torusMap c R a)‖\n[PROOFSTEP]\nsimp [norm_smul, map_prod]\n[GOAL]\nn : ℕ\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf✝ g : (Fin n → ℂ) → E\nc✝ : Fin n → ℂ\nR : Fin n → ℝ\nhn : n ≠ 0\nf : (Fin n → ℂ) → E\nc : Fin n → ℂ\n⊢ (∯ (x : Fin n → ℂ) in T(c, 0), f x) = 0\n[PROOFSTEP]\nsimp only [torusIntegral, Pi.zero_apply, ofReal_zero, mul_zero, zero_mul, Fin.prod_const, zero_pow' n hn, zero_smul,\n  integral_zero]\n[GOAL]\nn : ℕ\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf✝ g : (Fin n → ℂ) → E\nc✝ : Fin n → ℂ\nR✝ : Fin n → ℝ\nf : (Fin n → ℂ) → E\nc : Fin n → ℂ\nR : Fin n → ℝ\n⊢ (∯ (x : Fin n → ℂ) in T(c, R), -f x) = -∯ (x : Fin n → ℂ) in T(c, R), f x\n[PROOFSTEP]\nsimp [torusIntegral, integral_neg]\n[GOAL]\nn : ℕ\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf g : (Fin n → ℂ) → E\nc : Fin n → ℂ\nR : Fin n → ℝ\nhf : TorusIntegrable f c R\nhg : TorusIntegrable g c R\n⊢ (∯ (x : Fin n → ℂ) in T(c, R), f x + g x) = (∯ (x : Fin n → ℂ) in T(c, R), f x) + ∯ (x : Fin n → ℂ) in T(c, R), g x\n[PROOFSTEP]\nsimpa only [torusIntegral, smul_add, Pi.add_apply] using integral_add hf.function_integrable hg.function_integrable\n[GOAL]\nn : ℕ\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf g : (Fin n → ℂ) → E\nc : Fin n → ℂ\nR : Fin n → ℝ\nhf : TorusIntegrable f c R\nhg : TorusIntegrable g c R\n⊢ (∯ (x : Fin n → ℂ) in T(c, R), f x - g x) = (∯ (x : Fin n → ℂ) in T(c, R), f x) - ∯ (x : Fin n → ℂ) in T(c, R), g x\n[PROOFSTEP]\nsimpa only [sub_eq_add_neg, ← torusIntegral_neg] using torusIntegral_add hf hg.neg\n[GOAL]\nn : ℕ\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℂ E\ninst✝³ : CompleteSpace E\nf✝ g : (Fin n → ℂ) → E\nc✝ : Fin n → ℂ\nR✝ : Fin n → ℝ\n𝕜 : Type u_2\ninst✝² : IsROrC 𝕜\ninst✝¹ : NormedSpace 𝕜 E\ninst✝ : SMulCommClass 𝕜 ℂ E\na : 𝕜\nf : (Fin n → ℂ) → E\nc : Fin n → ℂ\nR : Fin n → ℝ\n⊢ (∯ (x : Fin n → ℂ) in T(c, R), a • f x) = a • ∯ (x : Fin n → ℂ) in T(c, R), f x\n[PROOFSTEP]\nsimp only [torusIntegral, integral_smul, ← smul_comm a (_ : ℂ) (_ : E)]\n[GOAL]\nn : ℕ\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf g : (Fin n → ℂ) → E\nc : Fin n → ℂ\nR : Fin n → ℝ\nC : ℝ\nhf : ∀ (θ : Fin n → ℝ), ‖f (torusMap c R θ)‖ ≤ C\nθ : Fin n → ℝ\nx✝ : θ ∈ Icc 0 fun x => 2 * π\n⊢ ‖(∏ i : Fin n, ↑(R i) * exp (↑(θ i) * I) * I) • f (torusMap c R θ)‖ = (∏ i : Fin n, |R i|) * ‖f (torusMap c R θ)‖\n[PROOFSTEP]\nsimp [norm_smul]\n[GOAL]\nn : ℕ\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf g : (Fin n → ℂ) → E\nc : Fin n → ℂ\nR : Fin n → ℝ\nC : ℝ\nhf : ∀ (θ : Fin n → ℝ), ‖f (torusMap c R θ)‖ ≤ C\n⊢ (∏ i : Fin n, |R i|) * C * ENNReal.toReal (↑↑volume (Icc 0 fun x => 2 * π)) = ((2 * π) ^ n * ∏ i : Fin n, |R i|) * C\n[PROOFSTEP]\nsimp only [Pi.zero_def, Real.volume_Icc_pi_toReal fun _ => Real.two_pi_pos.le, sub_zero, Fin.prod_const, mul_assoc,\n  mul_comm ((2 * π) ^ (n : ℕ))]\n[GOAL]\nn : ℕ\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf✝ g : (Fin n → ℂ) → E\nc✝ : Fin n → ℂ\nR✝ : Fin n → ℝ\nf : (Fin 0 → ℂ) → E\nc : Fin 0 → ℂ\nR : Fin 0 → ℝ\n⊢ (∯ (x : Fin 0 → ℂ) in T(c, R), f x) = f c\n[PROOFSTEP]\nsimp only [torusIntegral, Fin.prod_univ_zero, one_smul, Subsingleton.elim (fun _ : Fin 0 => 2 * π) 0, Icc_self,\n  Measure.restrict_singleton, volume_pi, integral_smul_measure, integral_dirac,\n  Measure.pi_of_empty (fun _ : Fin 0 ↦ volume) 0, Measure.dirac_apply_of_mem (mem_singleton _),\n  Subsingleton.elim (torusMap c R 0) c]\n[GOAL]\nn : ℕ\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf✝ g : (Fin n → ℂ) → E\nc✝ : Fin n → ℂ\nR✝ : Fin n → ℝ\nf : (Fin 1 → ℂ) → E\nc : Fin 1 → ℂ\nR : Fin 1 → ℝ\n⊢ (∯ (x : Fin 1 → ℂ) in T(c, R), f x) = ∮ (z : ℂ) in C(c 0, R 0), f fun x => z\n[PROOFSTEP]\nhave H₁ : (((MeasurableEquiv.funUnique _ _).symm) ⁻¹' Icc 0 fun _ => 2 * π) = Icc 0 (2 * π) :=\n  (OrderIso.funUnique (Fin 1) ℝ).symm.preimage_Icc _ _\n[GOAL]\nn : ℕ\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf✝ g : (Fin n → ℂ) → E\nc✝ : Fin n → ℂ\nR✝ : Fin n → ℝ\nf : (Fin 1 → ℂ) → E\nc : Fin 1 → ℂ\nR : Fin 1 → ℝ\nH₁ : (↑(MeasurableEquiv.symm (MeasurableEquiv.funUnique (Fin 1) ℝ)) ⁻¹' Icc 0 fun x => 2 * π) = Icc 0 (2 * π)\n⊢ (∯ (x : Fin 1 → ℂ) in T(c, R), f x) = ∮ (z : ℂ) in C(c 0, R 0), f fun x => z\n[PROOFSTEP]\nhave H₂ : torusMap c R = fun θ _ ↦ circleMap (c 0) (R 0) (θ 0) :=\n  by\n  ext θ i : 2\n  rw [Subsingleton.elim i 0]; rfl\n[GOAL]\nn : ℕ\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf✝ g : (Fin n → ℂ) → E\nc✝ : Fin n → ℂ\nR✝ : Fin n → ℝ\nf : (Fin 1 → ℂ) → E\nc : Fin 1 → ℂ\nR : Fin 1 → ℝ\nH₁ : (↑(MeasurableEquiv.symm (MeasurableEquiv.funUnique (Fin 1) ℝ)) ⁻¹' Icc 0 fun x => 2 * π) = Icc 0 (2 * π)\n⊢ torusMap c R = fun θ x => circleMap (c 0) (R 0) (θ 0)\n[PROOFSTEP]\next θ i : 2\n[GOAL]\ncase h.h\nn : ℕ\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf✝ g : (Fin n → ℂ) → E\nc✝ : Fin n → ℂ\nR✝ : Fin n → ℝ\nf : (Fin 1 → ℂ) → E\nc : Fin 1 → ℂ\nR : Fin 1 → ℝ\nH₁ : (↑(MeasurableEquiv.symm (MeasurableEquiv.funUnique (Fin 1) ℝ)) ⁻¹' Icc 0 fun x => 2 * π) = Icc 0 (2 * π)\nθ : Fin 1 → ℝ\ni : Fin 1\n⊢ torusMap c R θ i = circleMap (c 0) (R 0) (θ 0)\n[PROOFSTEP]\nrw [Subsingleton.elim i 0]\n[GOAL]\ncase h.h\nn : ℕ\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf✝ g : (Fin n → ℂ) → E\nc✝ : Fin n → ℂ\nR✝ : Fin n → ℝ\nf : (Fin 1 → ℂ) → E\nc : Fin 1 → ℂ\nR : Fin 1 → ℝ\nH₁ : (↑(MeasurableEquiv.symm (MeasurableEquiv.funUnique (Fin 1) ℝ)) ⁻¹' Icc 0 fun x => 2 * π) = Icc 0 (2 * π)\nθ : Fin 1 → ℝ\ni : Fin 1\n⊢ torusMap c R θ 0 = circleMap (c 0) (R 0) (θ 0)\n[PROOFSTEP]\nrfl\n[GOAL]\nn : ℕ\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf✝ g : (Fin n → ℂ) → E\nc✝ : Fin n → ℂ\nR✝ : Fin n → ℝ\nf : (Fin 1 → ℂ) → E\nc : Fin 1 → ℂ\nR : Fin 1 → ℝ\nH₁ : (↑(MeasurableEquiv.symm (MeasurableEquiv.funUnique (Fin 1) ℝ)) ⁻¹' Icc 0 fun x => 2 * π) = Icc 0 (2 * π)\nH₂ : torusMap c R = fun θ x => circleMap (c 0) (R 0) (θ 0)\n⊢ (∯ (x : Fin 1 → ℂ) in T(c, R), f x) = ∮ (z : ℂ) in C(c 0, R 0), f fun x => z\n[PROOFSTEP]\nrw [torusIntegral, circleIntegral, intervalIntegral.integral_of_le Real.two_pi_pos.le,\n  Measure.restrict_congr_set Ioc_ae_eq_Icc, ←\n  ((volume_preserving_funUnique (Fin 1) ℝ).symm _).set_integral_preimage_emb (MeasurableEquiv.measurableEmbedding _),\n  H₁, H₂]\n[GOAL]\nn : ℕ\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf✝ g : (Fin n → ℂ) → E\nc✝ : Fin n → ℂ\nR✝ : Fin n → ℝ\nf : (Fin 1 → ℂ) → E\nc : Fin 1 → ℂ\nR : Fin 1 → ℝ\nH₁ : (↑(MeasurableEquiv.symm (MeasurableEquiv.funUnique (Fin 1) ℝ)) ⁻¹' Icc 0 fun x => 2 * π) = Icc 0 (2 * π)\nH₂ : torusMap c R = fun θ x => circleMap (c 0) (R 0) (θ 0)\n⊢ ∫ (x : ℝ) in Icc 0 (2 * π),\n      (∏ i : Fin 1, ↑(R i) * exp (↑(↑(MeasurableEquiv.symm (MeasurableEquiv.funUnique (Fin 1) ℝ)) x i) * I) * I) •\n        f ((fun θ x => circleMap (c 0) (R 0) (θ 0)) (↑(MeasurableEquiv.symm (MeasurableEquiv.funUnique (Fin 1) ℝ)) x)) =\n    ∫ (x : ℝ) in Icc 0 (2 * π), deriv (circleMap (c 0) (R 0)) x • f fun x_1 => circleMap (c 0) (R 0) x\n[PROOFSTEP]\nsimp [circleMap_zero]\n[GOAL]\nn : ℕ\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf✝ g : (Fin n → ℂ) → E\nc✝ : Fin n → ℂ\nR✝ : Fin n → ℝ\nf : (Fin (n + 1) → ℂ) → E\nc : Fin (n + 1) → ℂ\nR : Fin (n + 1) → ℝ\nhf : TorusIntegrable f c R\ni : Fin (n + 1)\n⊢ (∯ (x : Fin (n + 1) → ℂ) in T(c, R), f x) =\n    ∮ (x : ℂ) in C(c i, R i), ∯ (y : Fin n → ℂ) in T(c ∘ Fin.succAbove i, R ∘ Fin.succAbove i), f (Fin.insertNth i x y)\n[PROOFSTEP]\nset e : ℝ × ℝⁿ ≃ᵐ ℝⁿ⁺¹ := (MeasurableEquiv.piFinSuccAboveEquiv (fun _ => ℝ) i).symm\n[GOAL]\nn : ℕ\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf✝ g : (Fin n → ℂ) → E\nc✝ : Fin n → ℂ\nR✝ : Fin n → ℝ\nf : (Fin (n + 1) → ℂ) → E\nc : Fin (n + 1) → ℂ\nR : Fin (n + 1) → ℝ\nhf : TorusIntegrable f c R\ni : Fin (n + 1)\ne : ℝ × (Fin n → ℝ) ≃ᵐ (Fin (n + 1) → ℝ) := MeasurableEquiv.symm (MeasurableEquiv.piFinSuccAboveEquiv (fun x => ℝ) i)\n⊢ (∯ (x : Fin (n + 1) → ℂ) in T(c, R), f x) =\n    ∮ (x : ℂ) in C(c i, R i), ∯ (y : Fin n → ℂ) in T(c ∘ Fin.succAbove i, R ∘ Fin.succAbove i), f (Fin.insertNth i x y)\n[PROOFSTEP]\nhave hem : MeasurePreserving e := (volume_preserving_piFinSuccAboveEquiv (fun _ : Fin (n + 1) => ℝ) i).symm _\n[GOAL]\nn : ℕ\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf✝ g : (Fin n → ℂ) → E\nc✝ : Fin n → ℂ\nR✝ : Fin n → ℝ\nf : (Fin (n + 1) → ℂ) → E\nc : Fin (n + 1) → ℂ\nR : Fin (n + 1) → ℝ\nhf : TorusIntegrable f c R\ni : Fin (n + 1)\ne : ℝ × (Fin n → ℝ) ≃ᵐ (Fin (n + 1) → ℝ) := MeasurableEquiv.symm (MeasurableEquiv.piFinSuccAboveEquiv (fun x => ℝ) i)\nhem : MeasurePreserving ↑e\n⊢ (∯ (x : Fin (n + 1) → ℂ) in T(c, R), f x) =\n    ∮ (x : ℂ) in C(c i, R i), ∯ (y : Fin n → ℂ) in T(c ∘ Fin.succAbove i, R ∘ Fin.succAbove i), f (Fin.insertNth i x y)\n[PROOFSTEP]\nhave heπ : (e ⁻¹' Icc 0 fun _ => 2 * π) = Icc 0 (2 * π) ×ˢ Icc (0 : ℝⁿ) fun _ => 2 * π :=\n  ((OrderIso.piFinSuccAboveIso (fun _ => ℝ) i).symm.preimage_Icc _ _).trans (Icc_prod_eq _ _)\n[GOAL]\nn : ℕ\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf✝ g : (Fin n → ℂ) → E\nc✝ : Fin n → ℂ\nR✝ : Fin n → ℝ\nf : (Fin (n + 1) → ℂ) → E\nc : Fin (n + 1) → ℂ\nR : Fin (n + 1) → ℝ\nhf : TorusIntegrable f c R\ni : Fin (n + 1)\ne : ℝ × (Fin n → ℝ) ≃ᵐ (Fin (n + 1) → ℝ) := MeasurableEquiv.symm (MeasurableEquiv.piFinSuccAboveEquiv (fun x => ℝ) i)\nhem : MeasurePreserving ↑e\nheπ : (↑e ⁻¹' Icc 0 fun x => 2 * π) = Icc 0 (2 * π) ×ˢ Icc 0 fun x => 2 * π\n⊢ (∯ (x : Fin (n + 1) → ℂ) in T(c, R), f x) =\n    ∮ (x : ℂ) in C(c i, R i), ∯ (y : Fin n → ℂ) in T(c ∘ Fin.succAbove i, R ∘ Fin.succAbove i), f (Fin.insertNth i x y)\n[PROOFSTEP]\nrw [torusIntegral, ← hem.map_eq, set_integral_map_equiv, heπ, Measure.volume_eq_prod, set_integral_prod,\n  circleIntegral_def_Icc]\n[GOAL]\nn : ℕ\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf✝ g : (Fin n → ℂ) → E\nc✝ : Fin n → ℂ\nR✝ : Fin n → ℝ\nf : (Fin (n + 1) → ℂ) → E\nc : Fin (n + 1) → ℂ\nR : Fin (n + 1) → ℝ\nhf : TorusIntegrable f c R\ni : Fin (n + 1)\ne : ℝ × (Fin n → ℝ) ≃ᵐ (Fin (n + 1) → ℝ) := MeasurableEquiv.symm (MeasurableEquiv.piFinSuccAboveEquiv (fun x => ℝ) i)\nhem : MeasurePreserving ↑e\nheπ : (↑e ⁻¹' Icc 0 fun x => 2 * π) = Icc 0 (2 * π) ×ˢ Icc 0 fun x => 2 * π\n⊢ ∫ (x : ℝ) in Icc 0 (2 * π),\n      ∫ (y : Fin n → ℝ) in Icc 0 fun x => 2 * π,\n        (∏ i : Fin (n + 1), ↑(R i) * exp (↑(↑e (x, y) i) * I) * I) • f (torusMap c R (↑e (x, y))) =\n    ∫ (θ : ℝ) in Icc 0 (2 * π),\n      deriv (circleMap (c i) (R i)) θ •\n        ∯ (y : Fin n → ℂ) in T(c ∘ Fin.succAbove i, R ∘ Fin.succAbove i),\n          f (Fin.insertNth i (circleMap (c i) (R i) θ) y)\n[PROOFSTEP]\nrefine' set_integral_congr measurableSet_Icc fun θ _ => _\n[GOAL]\nn : ℕ\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf✝ g : (Fin n → ℂ) → E\nc✝ : Fin n → ℂ\nR✝ : Fin n → ℝ\nf : (Fin (n + 1) → ℂ) → E\nc : Fin (n + 1) → ℂ\nR : Fin (n + 1) → ℝ\nhf : TorusIntegrable f c R\ni : Fin (n + 1)\ne : ℝ × (Fin n → ℝ) ≃ᵐ (Fin (n + 1) → ℝ) := MeasurableEquiv.symm (MeasurableEquiv.piFinSuccAboveEquiv (fun x => ℝ) i)\nhem : MeasurePreserving ↑e\nheπ : (↑e ⁻¹' Icc 0 fun x => 2 * π) = Icc 0 (2 * π) ×ˢ Icc 0 fun x => 2 * π\nθ : ℝ\nx✝ : θ ∈ Icc 0 (2 * π)\n⊢ ∫ (y : Fin n → ℝ) in Icc 0 fun x => 2 * π,\n      (∏ i : Fin (n + 1), ↑(R i) * exp (↑(↑e (θ, y) i) * I) * I) • f (torusMap c R (↑e (θ, y))) =\n    deriv (circleMap (c i) (R i)) θ •\n      ∯ (y : Fin n → ℂ) in T(c ∘ Fin.succAbove i, R ∘ Fin.succAbove i), f (Fin.insertNth i (circleMap (c i) (R i) θ) y)\n[PROOFSTEP]\nsimp only [torusIntegral, ← integral_smul, deriv_circleMap, i.prod_univ_succAbove _, smul_smul, torusMap,\n  circleMap_zero]\n[GOAL]\nn : ℕ\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf✝ g : (Fin n → ℂ) → E\nc✝ : Fin n → ℂ\nR✝ : Fin n → ℝ\nf : (Fin (n + 1) → ℂ) → E\nc : Fin (n + 1) → ℂ\nR : Fin (n + 1) → ℝ\nhf : TorusIntegrable f c R\ni : Fin (n + 1)\ne : ℝ × (Fin n → ℝ) ≃ᵐ (Fin (n + 1) → ℝ) := MeasurableEquiv.symm (MeasurableEquiv.piFinSuccAboveEquiv (fun x => ℝ) i)\nhem : MeasurePreserving ↑e\nheπ : (↑e ⁻¹' Icc 0 fun x => 2 * π) = Icc 0 (2 * π) ×ˢ Icc 0 fun x => 2 * π\nθ : ℝ\nx✝ : θ ∈ Icc 0 (2 * π)\n⊢ (∫ (y : Fin n → ℝ) in Icc 0 fun x => 2 * π,\n      (↑(R i) * exp (↑(↑(MeasurableEquiv.symm (MeasurableEquiv.piFinSuccAboveEquiv (fun x => ℝ) i)) (θ, y) i) * I) * I *\n          ∏ i_1 : Fin n,\n            ↑(R (Fin.succAbove i i_1)) *\n                exp\n                  (↑(↑(MeasurableEquiv.symm (MeasurableEquiv.piFinSuccAboveEquiv (fun x => ℝ) i)) (θ, y)\n                        (Fin.succAbove i i_1)) *\n                    I) *\n              I) •\n        f fun i_1 =>\n          c i_1 +\n            ↑(R i_1) *\n              exp (↑(↑(MeasurableEquiv.symm (MeasurableEquiv.piFinSuccAboveEquiv (fun x => ℝ) i)) (θ, y) i_1) * I)) =\n    ∫ (a : Fin n → ℝ) in Icc 0 fun x => 2 * π,\n      (↑(R i) * exp (↑θ * I) * I * ∏ i_1 : Fin n, ↑((R ∘ Fin.succAbove i) i_1) * exp (↑(a i_1) * I) * I) •\n        f\n          (Fin.insertNth i (circleMap (c i) (R i) θ) fun i_1 =>\n            (c ∘ Fin.succAbove i) i_1 + ↑((R ∘ Fin.succAbove i) i_1) * exp (↑(a i_1) * I))\n[PROOFSTEP]\nrefine' set_integral_congr measurableSet_Icc fun Θ _ => _\n[GOAL]\nn : ℕ\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf✝ g : (Fin n → ℂ) → E\nc✝ : Fin n → ℂ\nR✝ : Fin n → ℝ\nf : (Fin (n + 1) → ℂ) → E\nc : Fin (n + 1) → ℂ\nR : Fin (n + 1) → ℝ\nhf : TorusIntegrable f c R\ni : Fin (n + 1)\ne : ℝ × (Fin n → ℝ) ≃ᵐ (Fin (n + 1) → ℝ) := MeasurableEquiv.symm (MeasurableEquiv.piFinSuccAboveEquiv (fun x => ℝ) i)\nhem : MeasurePreserving ↑e\nheπ : (↑e ⁻¹' Icc 0 fun x => 2 * π) = Icc 0 (2 * π) ×ˢ Icc 0 fun x => 2 * π\nθ : ℝ\nx✝¹ : θ ∈ Icc 0 (2 * π)\nΘ : Fin n → ℝ\nx✝ : Θ ∈ Icc 0 fun x => 2 * π\n⊢ ((↑(R i) * exp (↑(↑(MeasurableEquiv.symm (MeasurableEquiv.piFinSuccAboveEquiv (fun x => ℝ) i)) (θ, Θ) i) * I) * I *\n        ∏ i_1 : Fin n,\n          ↑(R (Fin.succAbove i i_1)) *\n              exp\n                (↑(↑(MeasurableEquiv.symm (MeasurableEquiv.piFinSuccAboveEquiv (fun x => ℝ) i)) (θ, Θ)\n                      (Fin.succAbove i i_1)) *\n                  I) *\n            I) •\n      f fun i_1 =>\n        c i_1 +\n          ↑(R i_1) *\n            exp (↑(↑(MeasurableEquiv.symm (MeasurableEquiv.piFinSuccAboveEquiv (fun x => ℝ) i)) (θ, Θ) i_1) * I)) =\n    (↑(R i) * exp (↑θ * I) * I * ∏ i_1 : Fin n, ↑((R ∘ Fin.succAbove i) i_1) * exp (↑(Θ i_1) * I) * I) •\n      f\n        (Fin.insertNth i (circleMap (c i) (R i) θ) fun i_1 =>\n          (c ∘ Fin.succAbove i) i_1 + ↑((R ∘ Fin.succAbove i) i_1) * exp (↑(Θ i_1) * I))\n[PROOFSTEP]\nsimp only [MeasurableEquiv.piFinSuccAboveEquiv_symm_apply, i.insertNth_apply_same, i.insertNth_apply_succAbove, (· ∘ ·)]\n[GOAL]\nn : ℕ\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf✝ g : (Fin n → ℂ) → E\nc✝ : Fin n → ℂ\nR✝ : Fin n → ℝ\nf : (Fin (n + 1) → ℂ) → E\nc : Fin (n + 1) → ℂ\nR : Fin (n + 1) → ℝ\nhf : TorusIntegrable f c R\ni : Fin (n + 1)\ne : ℝ × (Fin n → ℝ) ≃ᵐ (Fin (n + 1) → ℝ) := MeasurableEquiv.symm (MeasurableEquiv.piFinSuccAboveEquiv (fun x => ℝ) i)\nhem : MeasurePreserving ↑e\nheπ : (↑e ⁻¹' Icc 0 fun x => 2 * π) = Icc 0 (2 * π) ×ˢ Icc 0 fun x => 2 * π\nθ : ℝ\nx✝¹ : θ ∈ Icc 0 (2 * π)\nΘ : Fin n → ℝ\nx✝ : Θ ∈ Icc 0 fun x => 2 * π\n⊢ ((↑(R i) * exp (↑θ * I) * I * ∏ x : Fin n, ↑(R (Fin.succAbove i x)) * exp (↑(Θ x) * I) * I) •\n      f fun i_1 => c i_1 + ↑(R i_1) * exp (↑(Fin.insertNth i θ Θ i_1) * I)) =\n    (↑(R i) * exp (↑θ * I) * I * ∏ x : Fin n, ↑(R (Fin.succAbove i x)) * exp (↑(Θ x) * I) * I) •\n      f\n        (Fin.insertNth i (circleMap (c i) (R i) θ) fun i_1 =>\n          c (Fin.succAbove i i_1) + ↑(R (Fin.succAbove i i_1)) * exp (↑(Θ i_1) * I))\n[PROOFSTEP]\ncongr 2\n[GOAL]\ncase e_a.e_a\nn : ℕ\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf✝ g : (Fin n → ℂ) → E\nc✝ : Fin n → ℂ\nR✝ : Fin n → ℝ\nf : (Fin (n + 1) → ℂ) → E\nc : Fin (n + 1) → ℂ\nR : Fin (n + 1) → ℝ\nhf : TorusIntegrable f c R\ni : Fin (n + 1)\ne : ℝ × (Fin n → ℝ) ≃ᵐ (Fin (n + 1) → ℝ) := MeasurableEquiv.symm (MeasurableEquiv.piFinSuccAboveEquiv (fun x => ℝ) i)\nhem : MeasurePreserving ↑e\nheπ : (↑e ⁻¹' Icc 0 fun x => 2 * π) = Icc 0 (2 * π) ×ˢ Icc 0 fun x => 2 * π\nθ : ℝ\nx✝¹ : θ ∈ Icc 0 (2 * π)\nΘ : Fin n → ℝ\nx✝ : Θ ∈ Icc 0 fun x => 2 * π\n⊢ (fun i_1 => c i_1 + ↑(R i_1) * exp (↑(Fin.insertNth i θ Θ i_1) * I)) =\n    Fin.insertNth i (circleMap (c i) (R i) θ) fun i_1 =>\n      c (Fin.succAbove i i_1) + ↑(R (Fin.succAbove i i_1)) * exp (↑(Θ i_1) * I)\n[PROOFSTEP]\nsimp only [funext_iff, i.forall_iff_succAbove, circleMap, Fin.insertNth_apply_same, eq_self_iff_true,\n  Fin.insertNth_apply_succAbove, imp_true_iff, and_self_iff]\n[GOAL]\ncase hf\nn : ℕ\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf✝ g : (Fin n → ℂ) → E\nc✝ : Fin n → ℂ\nR✝ : Fin n → ℝ\nf : (Fin (n + 1) → ℂ) → E\nc : Fin (n + 1) → ℂ\nR : Fin (n + 1) → ℝ\nhf : TorusIntegrable f c R\ni : Fin (n + 1)\ne : ℝ × (Fin n → ℝ) ≃ᵐ (Fin (n + 1) → ℝ) := MeasurableEquiv.symm (MeasurableEquiv.piFinSuccAboveEquiv (fun x => ℝ) i)\nhem : MeasurePreserving ↑e\nheπ : (↑e ⁻¹' Icc 0 fun x => 2 * π) = Icc 0 (2 * π) ×ˢ Icc 0 fun x => 2 * π\n⊢ IntegrableOn (fun x => (∏ i : Fin (n + 1), ↑(R i) * exp (↑(↑e x i) * I) * I) • f (torusMap c R (↑e x)))\n    (Icc 0 (2 * π) ×ˢ Icc 0 fun x => 2 * π)\n[PROOFSTEP]\nhave := hf.function_integrable\n[GOAL]\ncase hf\nn : ℕ\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf✝ g : (Fin n → ℂ) → E\nc✝ : Fin n → ℂ\nR✝ : Fin n → ℝ\nf : (Fin (n + 1) → ℂ) → E\nc : Fin (n + 1) → ℂ\nR : Fin (n + 1) → ℝ\nhf : TorusIntegrable f c R\ni : Fin (n + 1)\ne : ℝ × (Fin n → ℝ) ≃ᵐ (Fin (n + 1) → ℝ) := MeasurableEquiv.symm (MeasurableEquiv.piFinSuccAboveEquiv (fun x => ℝ) i)\nhem : MeasurePreserving ↑e\nheπ : (↑e ⁻¹' Icc 0 fun x => 2 * π) = Icc 0 (2 * π) ×ˢ Icc 0 fun x => 2 * π\nthis :\n  IntegrableOn (fun θ => (∏ i : Fin (n + 1), ↑(R i) * exp (↑(θ i) * I) * I) • f (torusMap c R θ)) (Icc 0 fun x => 2 * π)\n⊢ IntegrableOn (fun x => (∏ i : Fin (n + 1), ↑(R i) * exp (↑(↑e x i) * I) * I) • f (torusMap c R (↑e x)))\n    (Icc 0 (2 * π) ×ˢ Icc 0 fun x => 2 * π)\n[PROOFSTEP]\nrwa [← hem.integrableOn_comp_preimage e.measurableEmbedding, heπ] at this \n[GOAL]\nn : ℕ\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : NormedSpace ℂ E\ninst✝ : CompleteSpace E\nf✝ g : (Fin n → ℂ) → E\nc✝ : Fin n → ℂ\nR✝ : Fin n → ℝ\nf : (Fin (n + 1) → ℂ) → E\nc : Fin (n + 1) → ℂ\nR : Fin (n + 1) → ℝ\nhf : TorusIntegrable f c R\n⊢ (∯ (x : Fin (n + 1) → ℂ) in T(c, R), f x) =\n    ∮ (x : ℂ) in C(c 0, R 0), ∯ (y : Fin n → ℂ) in T(c ∘ Fin.succ, R ∘ Fin.succ), f (Fin.cons x y)\n[PROOFSTEP]\nsimpa using torusIntegral_succAbove hf 0\n", "meta": {"mathlib_filename": "Mathlib.MeasureTheory.Integral.TorusIntegral", "llama_tokens": 11801, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8267117983401363, "lm_q2_score": 0.6113819732941511, "lm_q1q2_score": 0.5054366906147488}}
{"text": "[GOAL]\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nH : Subgraph G\n⊢ Subgraph.Connected H ↔ Subgraph.Preconnected H ∧ Set.Nonempty H.verts\n[PROOFSTEP]\nrw [H.connected_iff', connected_iff, H.preconnected_iff, Set.nonempty_coe_sort]\n[GOAL]\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nH : Subgraph G\nh : Subgraph.Connected H\n⊢ Subgraph.Preconnected H\n[PROOFSTEP]\nrw [H.connected_iff] at h \n[GOAL]\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nH : Subgraph G\nh : Subgraph.Preconnected H ∧ Set.Nonempty H.verts\n⊢ Subgraph.Preconnected H\n[PROOFSTEP]\nexact h.1\n[GOAL]\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nH : Subgraph G\nh : Subgraph.Connected H\n⊢ Set.Nonempty H.verts\n[PROOFSTEP]\nrw [H.connected_iff] at h \n[GOAL]\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nH : Subgraph G\nh : Subgraph.Preconnected H ∧ Set.Nonempty H.verts\n⊢ Set.Nonempty H.verts\n[PROOFSTEP]\nexact h.2\n[GOAL]\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nv : V\n⊢ Subgraph.Connected (SimpleGraph.singletonSubgraph G v)\n[PROOFSTEP]\nrefine ⟨⟨?_⟩⟩\n[GOAL]\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nv : V\n⊢ Preconnected (Subgraph.coe (SimpleGraph.singletonSubgraph G v))\n[PROOFSTEP]\nrintro ⟨a, ha⟩ ⟨b, hb⟩\n[GOAL]\ncase mk.mk\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nv a : V\nha : a ∈ (SimpleGraph.singletonSubgraph G v).verts\nb : V\nhb : b ∈ (SimpleGraph.singletonSubgraph G v).verts\n⊢ Reachable (Subgraph.coe (SimpleGraph.singletonSubgraph G v)) { val := a, property := ha } { val := b, property := hb }\n[PROOFSTEP]\nsimp only [singletonSubgraph_verts, Set.mem_singleton_iff] at ha hb \n[GOAL]\ncase mk.mk\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nv a : V\nha✝ : a ∈ (SimpleGraph.singletonSubgraph G v).verts\nb : V\nhb✝ : b ∈ (SimpleGraph.singletonSubgraph G v).verts\nha : a = v\nhb : b = v\n⊢ Reachable (Subgraph.coe (SimpleGraph.singletonSubgraph G v)) { val := a, property := ha✝ }\n    { val := b, property := hb✝ }\n[PROOFSTEP]\nsubst_vars\n[GOAL]\ncase mk.mk\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nb : V\nha hb : b = b\n⊢ Reachable (Subgraph.coe (SimpleGraph.singletonSubgraph G b)) { val := b, property := (_ : b = b) }\n    { val := b, property := (_ : b = b) }\n[PROOFSTEP]\nrfl\n[GOAL]\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nv w : V\nhvw : SimpleGraph.Adj G v w\n⊢ Subgraph.Connected (subgraphOfAdj G hvw)\n[PROOFSTEP]\nrefine ⟨⟨?_⟩⟩\n[GOAL]\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nv w : V\nhvw : SimpleGraph.Adj G v w\n⊢ Preconnected (Subgraph.coe (subgraphOfAdj G hvw))\n[PROOFSTEP]\nrintro ⟨a, ha⟩ ⟨b, hb⟩\n[GOAL]\ncase mk.mk\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nv w : V\nhvw : SimpleGraph.Adj G v w\na : V\nha : a ∈ (subgraphOfAdj G hvw).verts\nb : V\nhb : b ∈ (subgraphOfAdj G hvw).verts\n⊢ Reachable (Subgraph.coe (subgraphOfAdj G hvw)) { val := a, property := ha } { val := b, property := hb }\n[PROOFSTEP]\nsimp only [subgraphOfAdj_verts, Set.mem_insert_iff, Set.mem_singleton_iff] at ha hb \n[GOAL]\ncase mk.mk\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nv w : V\nhvw : SimpleGraph.Adj G v w\na : V\nha✝ : a ∈ (subgraphOfAdj G hvw).verts\nb : V\nhb✝ : b ∈ (subgraphOfAdj G hvw).verts\nha : a = v ∨ a = w\nhb : b = v ∨ b = w\n⊢ Reachable (Subgraph.coe (subgraphOfAdj G hvw)) { val := a, property := ha✝ } { val := b, property := hb✝ }\n[PROOFSTEP]\nobtain rfl | rfl := ha\n[GOAL]\ncase mk.mk.inl\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nw a b : V\nhvw : SimpleGraph.Adj G a w\nha : a ∈ (subgraphOfAdj G hvw).verts\nhb✝ : b ∈ (subgraphOfAdj G hvw).verts\nhb : b = a ∨ b = w\n⊢ Reachable (Subgraph.coe (subgraphOfAdj G hvw)) { val := a, property := ha } { val := b, property := hb✝ }\n[PROOFSTEP]\nobtain rfl | rfl := hb\n[GOAL]\ncase mk.mk.inr\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nv a b : V\nhvw : SimpleGraph.Adj G v a\nha : a ∈ (subgraphOfAdj G hvw).verts\nhb✝ : b ∈ (subgraphOfAdj G hvw).verts\nhb : b = v ∨ b = a\n⊢ Reachable (Subgraph.coe (subgraphOfAdj G hvw)) { val := a, property := ha } { val := b, property := hb✝ }\n[PROOFSTEP]\nobtain rfl | rfl := hb\n[GOAL]\ncase mk.mk.inl.inl\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nw b : V\nhvw : SimpleGraph.Adj G b w\nha hb : b ∈ (subgraphOfAdj G hvw).verts\n⊢ Reachable (Subgraph.coe (subgraphOfAdj G hvw)) { val := b, property := ha } { val := b, property := hb }\n[PROOFSTEP]\nfirst\n| rfl\n| (apply Adj.reachable; simp)\n[GOAL]\ncase mk.mk.inl.inl\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nw b : V\nhvw : SimpleGraph.Adj G b w\nha hb : b ∈ (subgraphOfAdj G hvw).verts\n⊢ Reachable (Subgraph.coe (subgraphOfAdj G hvw)) { val := b, property := ha } { val := b, property := hb }\n[PROOFSTEP]\nrfl\n[GOAL]\ncase mk.mk.inl.inr\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\na b : V\nhvw : SimpleGraph.Adj G a b\nha : a ∈ (subgraphOfAdj G hvw).verts\nhb : b ∈ (subgraphOfAdj G hvw).verts\n⊢ Reachable (Subgraph.coe (subgraphOfAdj G hvw)) { val := a, property := ha } { val := b, property := hb }\n[PROOFSTEP]\nfirst\n| rfl\n| (apply Adj.reachable; simp)\n[GOAL]\ncase mk.mk.inl.inr\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\na b : V\nhvw : SimpleGraph.Adj G a b\nha : a ∈ (subgraphOfAdj G hvw).verts\nhb : b ∈ (subgraphOfAdj G hvw).verts\n⊢ Reachable (Subgraph.coe (subgraphOfAdj G hvw)) { val := a, property := ha } { val := b, property := hb }\n[PROOFSTEP]\nrfl\n[GOAL]\ncase mk.mk.inl.inr\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\na b : V\nhvw : SimpleGraph.Adj G a b\nha : a ∈ (subgraphOfAdj G hvw).verts\nhb : b ∈ (subgraphOfAdj G hvw).verts\n⊢ Reachable (Subgraph.coe (subgraphOfAdj G hvw)) { val := a, property := ha } { val := b, property := hb }\n[PROOFSTEP]\napply Adj.reachable\n[GOAL]\ncase mk.mk.inl.inr.h\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\na b : V\nhvw : SimpleGraph.Adj G a b\nha : a ∈ (subgraphOfAdj G hvw).verts\nhb : b ∈ (subgraphOfAdj G hvw).verts\n⊢ SimpleGraph.Adj (Subgraph.coe (subgraphOfAdj G hvw)) { val := a, property := ha } { val := b, property := hb }\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mk.mk.inr.inl\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\na b : V\nhvw : SimpleGraph.Adj G b a\nha : a ∈ (subgraphOfAdj G hvw).verts\nhb : b ∈ (subgraphOfAdj G hvw).verts\n⊢ Reachable (Subgraph.coe (subgraphOfAdj G hvw)) { val := a, property := ha } { val := b, property := hb }\n[PROOFSTEP]\nfirst\n| rfl\n| (apply Adj.reachable; simp)\n[GOAL]\ncase mk.mk.inr.inl\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\na b : V\nhvw : SimpleGraph.Adj G b a\nha : a ∈ (subgraphOfAdj G hvw).verts\nhb : b ∈ (subgraphOfAdj G hvw).verts\n⊢ Reachable (Subgraph.coe (subgraphOfAdj G hvw)) { val := a, property := ha } { val := b, property := hb }\n[PROOFSTEP]\nrfl\n[GOAL]\ncase mk.mk.inr.inl\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\na b : V\nhvw : SimpleGraph.Adj G b a\nha : a ∈ (subgraphOfAdj G hvw).verts\nhb : b ∈ (subgraphOfAdj G hvw).verts\n⊢ Reachable (Subgraph.coe (subgraphOfAdj G hvw)) { val := a, property := ha } { val := b, property := hb }\n[PROOFSTEP]\napply Adj.reachable\n[GOAL]\ncase mk.mk.inr.inl.h\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\na b : V\nhvw : SimpleGraph.Adj G b a\nha : a ∈ (subgraphOfAdj G hvw).verts\nhb : b ∈ (subgraphOfAdj G hvw).verts\n⊢ SimpleGraph.Adj (Subgraph.coe (subgraphOfAdj G hvw)) { val := a, property := ha } { val := b, property := hb }\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mk.mk.inr.inr\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nv b : V\nhvw : SimpleGraph.Adj G v b\nha hb : b ∈ (subgraphOfAdj G hvw).verts\n⊢ Reachable (Subgraph.coe (subgraphOfAdj G hvw)) { val := b, property := ha } { val := b, property := hb }\n[PROOFSTEP]\nfirst\n| rfl\n| (apply Adj.reachable; simp)\n[GOAL]\ncase mk.mk.inr.inr\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nv b : V\nhvw : SimpleGraph.Adj G v b\nha hb : b ∈ (subgraphOfAdj G hvw).verts\n⊢ Reachable (Subgraph.coe (subgraphOfAdj G hvw)) { val := b, property := ha } { val := b, property := hb }\n[PROOFSTEP]\nrfl\n[GOAL]\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nu v : V\nhuv : SimpleGraph.Adj G u v\n⊢ Subgraph.Connected (induce ⊤ {u, v})\n[PROOFSTEP]\nrw [← subgraphOfAdj_eq_induce huv]\n[GOAL]\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nu v : V\nhuv : SimpleGraph.Adj G u v\n⊢ Subgraph.Connected (subgraphOfAdj G huv)\n[PROOFSTEP]\nexact subgraphOfAdj_connected huv\n[GOAL]\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nH H' : Subgraph G\nhle : H ≤ H'\nhv : H.verts = H'.verts\nh : Subgraph.Connected H\n⊢ Subgraph.Connected H'\n[PROOFSTEP]\nrw [← Subgraph.copy_eq H' H.verts hv H'.Adj rfl]\n[GOAL]\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nH H' : Subgraph G\nhle : H ≤ H'\nhv : H.verts = H'.verts\nh : Subgraph.Connected H\n⊢ Subgraph.Connected (copy H' H.verts hv H'.Adj (_ : H'.Adj = H'.Adj))\n[PROOFSTEP]\nrefine ⟨h.coe.mono ?_⟩\n[GOAL]\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nH H' : Subgraph G\nhle : H ≤ H'\nhv : H.verts = H'.verts\nh : Subgraph.Connected H\n⊢ Subgraph.coe H ≤ Subgraph.coe (copy H' H.verts hv H'.Adj (_ : H'.Adj = H'.Adj))\n[PROOFSTEP]\nrintro ⟨v, hv⟩ ⟨w, hw⟩ hvw\n[GOAL]\ncase mk.mk\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nH H' : Subgraph G\nhle : H ≤ H'\nhv✝ : H.verts = H'.verts\nh : Subgraph.Connected H\nv : V\nhv : v ∈ H.verts\nw : V\nhw : w ∈ H.verts\nhvw : SimpleGraph.Adj (Subgraph.coe H) { val := v, property := hv } { val := w, property := hw }\n⊢ SimpleGraph.Adj (Subgraph.coe (copy H' H.verts hv✝ H'.Adj (_ : H'.Adj = H'.Adj))) { val := v, property := hv }\n    { val := w, property := hw }\n[PROOFSTEP]\nexact hle.2 hvw\n[GOAL]\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nH H' : Subgraph G\nhle : ∀ (v w : V), Adj H v w → Adj H' v w\nhv : H.verts = H'.verts\nh : Subgraph.Connected H\n⊢ Subgraph.Connected H'\n[PROOFSTEP]\nexact h.mono ⟨hv.le, hle⟩ hv\n[GOAL]\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nH K : Subgraph G\nhH : Subgraph.Connected H\nhK : Subgraph.Connected K\nhn : Set.Nonempty (H ⊓ K).verts\n⊢ Subgraph.Connected (H ⊔ K)\n[PROOFSTEP]\nrw [Subgraph.connected_iff', connected_iff_exists_forall_reachable]\n[GOAL]\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nH K : Subgraph G\nhH : Subgraph.Connected H\nhK : Subgraph.Connected K\nhn : Set.Nonempty (H ⊓ K).verts\n⊢ ∃ v, ∀ (w : ↑(H ⊔ K).verts), Reachable (Subgraph.coe (H ⊔ K)) v w\n[PROOFSTEP]\nobtain ⟨u, hu, hu'⟩ := hn\n[GOAL]\ncase intro.intro\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nH K : Subgraph G\nhH : Subgraph.Connected H\nhK : Subgraph.Connected K\nu : V\nhu : u ∈ H.verts\nhu' : u ∈ K.verts\n⊢ ∃ v, ∀ (w : ↑(H ⊔ K).verts), Reachable (Subgraph.coe (H ⊔ K)) v w\n[PROOFSTEP]\nexists ⟨u, Or.inl hu⟩\n[GOAL]\ncase intro.intro\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nH K : Subgraph G\nhH : Subgraph.Connected H\nhK : Subgraph.Connected K\nu : V\nhu : u ∈ H.verts\nhu' : u ∈ K.verts\n⊢ ∀ (w : ↑(H ⊔ K).verts), Reachable (Subgraph.coe (H ⊔ K)) { val := u, property := (_ : u ∈ H.verts ∨ u ∈ K.verts) } w\n[PROOFSTEP]\nrintro ⟨v, (hv | hv)⟩\n[GOAL]\ncase intro.intro.mk.inl\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nH K : Subgraph G\nhH : Subgraph.Connected H\nhK : Subgraph.Connected K\nu : V\nhu : u ∈ H.verts\nhu' : u ∈ K.verts\nv : V\nhv : v ∈ H.verts\n⊢ Reachable (Subgraph.coe (H ⊔ K)) { val := u, property := (_ : u ∈ H.verts ∨ u ∈ K.verts) }\n    { val := v, property := (_ : v ∈ H.verts ∨ v ∈ K.verts) }\n[PROOFSTEP]\nexact Reachable.map (Subgraph.inclusion (le_sup_left : H ≤ H ⊔ K)) (hH ⟨u, hu⟩ ⟨v, hv⟩)\n[GOAL]\ncase intro.intro.mk.inr\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nH K : Subgraph G\nhH : Subgraph.Connected H\nhK : Subgraph.Connected K\nu : V\nhu : u ∈ H.verts\nhu' : u ∈ K.verts\nv : V\nhv : v ∈ K.verts\n⊢ Reachable (Subgraph.coe (H ⊔ K)) { val := u, property := (_ : u ∈ H.verts ∨ u ∈ K.verts) }\n    { val := v, property := (_ : v ∈ H.verts ∨ v ∈ K.verts) }\n[PROOFSTEP]\nexact Reachable.map (Subgraph.inclusion (le_sup_right : K ≤ H ⊔ K)) (hK ⟨u, hu'⟩ ⟨v, hv⟩)\n[GOAL]\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nu v : V\np : Walk G u v\n⊢ Subgraph.Connected (Walk.toSubgraph p)\n[PROOFSTEP]\ninduction p with\n| nil => apply singletonSubgraph_connected\n| cons h p ih =>\n  apply (subgraphOfAdj_connected h).sup ih\n  rename_i w _\n  exists w\n  simp\n[GOAL]\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nu v : V\np : Walk G u v\n⊢ Subgraph.Connected (Walk.toSubgraph p)\n[PROOFSTEP]\ninduction p with\n| nil => apply singletonSubgraph_connected\n| cons h p ih =>\n  apply (subgraphOfAdj_connected h).sup ih\n  rename_i w _\n  exists w\n  simp\n[GOAL]\ncase nil\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nu v u✝ : V\n⊢ Subgraph.Connected (Walk.toSubgraph Walk.nil)\n[PROOFSTEP]\n\n| nil => apply singletonSubgraph_connected\n[GOAL]\ncase nil\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nu v u✝ : V\n⊢ Subgraph.Connected (Walk.toSubgraph Walk.nil)\n[PROOFSTEP]\napply singletonSubgraph_connected\n[GOAL]\ncase cons\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nu v u✝ v✝ w✝ : V\nh : SimpleGraph.Adj G u✝ v✝\np : Walk G v✝ w✝\nih : Subgraph.Connected (Walk.toSubgraph p)\n⊢ Subgraph.Connected (Walk.toSubgraph (Walk.cons h p))\n[PROOFSTEP]\n\n| cons h p ih =>\n  apply (subgraphOfAdj_connected h).sup ih\n  rename_i w _\n  exists w\n  simp\n[GOAL]\ncase cons\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nu v u✝ v✝ w✝ : V\nh : SimpleGraph.Adj G u✝ v✝\np : Walk G v✝ w✝\nih : Subgraph.Connected (Walk.toSubgraph p)\n⊢ Subgraph.Connected (Walk.toSubgraph (Walk.cons h p))\n[PROOFSTEP]\napply (subgraphOfAdj_connected h).sup ih\n[GOAL]\ncase cons\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nu v u✝ v✝ w✝ : V\nh : SimpleGraph.Adj G u✝ v✝\np : Walk G v✝ w✝\nih : Subgraph.Connected (Walk.toSubgraph p)\n⊢ Set.Nonempty (subgraphOfAdj G h ⊓ Walk.toSubgraph p).verts\n[PROOFSTEP]\nrename_i w _\n[GOAL]\ncase cons\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nu v u✝ w w✝ : V\nh : SimpleGraph.Adj G u✝ w\np : Walk G w w✝\nih : Subgraph.Connected (Walk.toSubgraph p)\n⊢ Set.Nonempty (subgraphOfAdj G h ⊓ Walk.toSubgraph p).verts\n[PROOFSTEP]\nexists w\n[GOAL]\ncase cons\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nu v u✝ w w✝ : V\nh : SimpleGraph.Adj G u✝ w\np : Walk G w w✝\nih : Subgraph.Connected (Walk.toSubgraph p)\n⊢ w ∈ (subgraphOfAdj G h ⊓ Walk.toSubgraph p).verts\n[PROOFSTEP]\nsimp\n[GOAL]\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nH : Subgraph G\ns t : Set V\nsconn : Subgraph.Connected (induce H s)\ntconn : Subgraph.Connected (induce H t)\nsintert : Set.Nonempty (s ⊓ t)\n⊢ Subgraph.Connected (induce H (s ∪ t))\n[PROOFSTEP]\nrefine (sconn.sup tconn sintert).mono ?_ ?_\n[GOAL]\ncase refine_1\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nH : Subgraph G\ns t : Set V\nsconn : Subgraph.Connected (induce H s)\ntconn : Subgraph.Connected (induce H t)\nsintert : Set.Nonempty (s ⊓ t)\n⊢ induce H s ⊔ induce H t ≤ induce H (s ∪ t)\n[PROOFSTEP]\napply le_induce_union\n[GOAL]\ncase refine_2\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nH : Subgraph G\ns t : Set V\nsconn : Subgraph.Connected (induce H s)\ntconn : Subgraph.Connected (induce H t)\nsintert : Set.Nonempty (s ⊓ t)\n⊢ (induce H s ⊔ induce H t).verts = (induce H (s ∪ t)).verts\n[PROOFSTEP]\nsimp\n[GOAL]\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nH K : Subgraph G\nHconn : Subgraph.Connected H\nKconn : Subgraph.Connected K\nu v : V\nuH : u ∈ H.verts\nvK : v ∈ K.verts\nhuv : SimpleGraph.Adj G u v\n⊢ Subgraph.Connected (induce ⊤ {u, v} ⊔ H ⊔ K)\n[PROOFSTEP]\nrefine ((top_induce_pair_connected_of_adj huv).sup Hconn ?_).sup Kconn ?_\n[GOAL]\ncase refine_1\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nH K : Subgraph G\nHconn : Subgraph.Connected H\nKconn : Subgraph.Connected K\nu v : V\nuH : u ∈ H.verts\nvK : v ∈ K.verts\nhuv : SimpleGraph.Adj G u v\n⊢ Set.Nonempty (induce ⊤ {u, v} ⊓ H).verts\n[PROOFSTEP]\nexact ⟨u, by simp [uH]⟩\n[GOAL]\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nH K : Subgraph G\nHconn : Subgraph.Connected H\nKconn : Subgraph.Connected K\nu v : V\nuH : u ∈ H.verts\nvK : v ∈ K.verts\nhuv : SimpleGraph.Adj G u v\n⊢ u ∈ (induce ⊤ {u, v} ⊓ H).verts\n[PROOFSTEP]\nsimp [uH]\n[GOAL]\ncase refine_2\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nH K : Subgraph G\nHconn : Subgraph.Connected H\nKconn : Subgraph.Connected K\nu v : V\nuH : u ∈ H.verts\nvK : v ∈ K.verts\nhuv : SimpleGraph.Adj G u v\n⊢ Set.Nonempty ((induce ⊤ {u, v} ⊔ H) ⊓ K).verts\n[PROOFSTEP]\nexact ⟨v, by simp [vK]⟩\n[GOAL]\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nH K : Subgraph G\nHconn : Subgraph.Connected H\nKconn : Subgraph.Connected K\nu v : V\nuH : u ∈ H.verts\nvK : v ∈ K.verts\nhuv : SimpleGraph.Adj G u v\n⊢ v ∈ ((induce ⊤ {u, v} ⊔ H) ⊓ K).verts\n[PROOFSTEP]\nsimp [vK]\n[GOAL]\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nH : Subgraph G\n⊢ Subgraph.Preconnected H ↔ ∀ {u v : V}, u ∈ H.verts → v ∈ H.verts → ∃ p, Walk.toSubgraph p ≤ H\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nH : Subgraph G\n⊢ Subgraph.Preconnected H → ∀ {u v : V}, u ∈ H.verts → v ∈ H.verts → ∃ p, Walk.toSubgraph p ≤ H\n[PROOFSTEP]\nintro hc u v hu hv\n[GOAL]\ncase mp\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nH : Subgraph G\nhc : Subgraph.Preconnected H\nu v : V\nhu : u ∈ H.verts\nhv : v ∈ H.verts\n⊢ ∃ p, Walk.toSubgraph p ≤ H\n[PROOFSTEP]\nrefine (hc ⟨_, hu⟩ ⟨_, hv⟩).elim fun p => ?_\n[GOAL]\ncase mp\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nH : Subgraph G\nhc : Subgraph.Preconnected H\nu v : V\nhu : u ∈ H.verts\nhv : v ∈ H.verts\np : Walk (Subgraph.coe H) { val := u, property := hu } { val := v, property := hv }\n⊢ ∃ p, Walk.toSubgraph p ≤ H\n[PROOFSTEP]\nexists p.map (Subgraph.hom _)\n[GOAL]\ncase mp\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nH : Subgraph G\nhc : Subgraph.Preconnected H\nu v : V\nhu : u ∈ H.verts\nhv : v ∈ H.verts\np : Walk (Subgraph.coe H) { val := u, property := hu } { val := v, property := hv }\n⊢ Walk.toSubgraph (Walk.map (Subgraph.hom H) p) ≤ H\n[PROOFSTEP]\nsimp [coeSubgraph_le]\n[GOAL]\ncase mpr\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nH : Subgraph G\n⊢ (∀ {u v : V}, u ∈ H.verts → v ∈ H.verts → ∃ p, Walk.toSubgraph p ≤ H) → Subgraph.Preconnected H\n[PROOFSTEP]\nintro hw\n[GOAL]\ncase mpr\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nH : Subgraph G\nhw : ∀ {u v : V}, u ∈ H.verts → v ∈ H.verts → ∃ p, Walk.toSubgraph p ≤ H\n⊢ Subgraph.Preconnected H\n[PROOFSTEP]\nrw [Subgraph.preconnected_iff]\n[GOAL]\ncase mpr\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nH : Subgraph G\nhw : ∀ {u v : V}, u ∈ H.verts → v ∈ H.verts → ∃ p, Walk.toSubgraph p ≤ H\n⊢ Preconnected (Subgraph.coe H)\n[PROOFSTEP]\nrintro ⟨u, hu⟩ ⟨v, hv⟩\n[GOAL]\ncase mpr.mk.mk\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nH : Subgraph G\nhw : ∀ {u v : V}, u ∈ H.verts → v ∈ H.verts → ∃ p, Walk.toSubgraph p ≤ H\nu : V\nhu : u ∈ H.verts\nv : V\nhv : v ∈ H.verts\n⊢ Reachable (Subgraph.coe H) { val := u, property := hu } { val := v, property := hv }\n[PROOFSTEP]\nobtain ⟨p, h⟩ := hw hu hv\n[GOAL]\ncase mpr.mk.mk.intro\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nH : Subgraph G\nhw : ∀ {u v : V}, u ∈ H.verts → v ∈ H.verts → ∃ p, Walk.toSubgraph p ≤ H\nu : V\nhu : u ∈ H.verts\nv : V\nhv : v ∈ H.verts\np : Walk G u v\nh : Walk.toSubgraph p ≤ H\n⊢ Reachable (Subgraph.coe H) { val := u, property := hu } { val := v, property := hv }\n[PROOFSTEP]\nexact\n  Reachable.map (Subgraph.inclusion h)\n    (p.toSubgraph_connected ⟨_, p.start_mem_verts_toSubgraph⟩ ⟨_, p.end_mem_verts_toSubgraph⟩)\n[GOAL]\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nH : Subgraph G\n⊢ Subgraph.Connected H ↔ Set.Nonempty H.verts ∧ ∀ {u v : V}, u ∈ H.verts → v ∈ H.verts → ∃ p, Walk.toSubgraph p ≤ H\n[PROOFSTEP]\nrw [H.connected_iff, preconnected_iff_forall_exists_walk_subgraph, and_comm]\n[GOAL]\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\ns : Set V\n⊢ Connected (induce s G) ↔ Subgraph.Connected (Subgraph.induce ⊤ s)\n[PROOFSTEP]\nrw [induce_eq_coe_induce_top, ← Subgraph.connected_iff']\n[GOAL]\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\ns t : Set V\nsconn : Connected (induce s G)\ntconn : Connected (induce t G)\nsintert : Set.Nonempty (s ∩ t)\n⊢ Connected (induce (s ∪ t) G)\n[PROOFSTEP]\nrw [connected_induce_iff] at sconn tconn ⊢\n[GOAL]\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\ns t : Set V\nsconn : Subgraph.Connected (Subgraph.induce ⊤ s)\ntconn : Subgraph.Connected (Subgraph.induce ⊤ t)\nsintert : Set.Nonempty (s ∩ t)\n⊢ Subgraph.Connected (Subgraph.induce ⊤ (s ∪ t))\n[PROOFSTEP]\nexact Subgraph.induce_union_connected sconn tconn sintert\n[GOAL]\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nu v : V\nhuv : Adj G u v\n⊢ Connected (induce {u, v} G)\n[PROOFSTEP]\nrw [connected_induce_iff]\n[GOAL]\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nu v : V\nhuv : Adj G u v\n⊢ Subgraph.Connected (Subgraph.induce ⊤ {u, v})\n[PROOFSTEP]\nexact Subgraph.top_induce_pair_connected_of_adj huv\n[GOAL]\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nH : Subgraph G\nh : Subgraph.Connected H\n⊢ Connected (SimpleGraph.induce H.verts G)\n[PROOFSTEP]\nrw [connected_induce_iff]\n[GOAL]\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nH : Subgraph G\nh : Subgraph.Connected H\n⊢ Subgraph.Connected (induce ⊤ H.verts)\n[PROOFSTEP]\nexact h.mono le_induce_top_verts (by exact rfl)\n[GOAL]\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nH : Subgraph G\nh : Subgraph.Connected H\n⊢ H.verts = (induce ⊤ H.verts).verts\n[PROOFSTEP]\nexact rfl\n[GOAL]\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nu v : V\np : Walk G u v\n⊢ Connected (induce {v_1 | v_1 ∈ support p} G)\n[PROOFSTEP]\nrw [← p.verts_toSubgraph]\n[GOAL]\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nu v : V\np : Walk G u v\n⊢ Connected (induce (Walk.toSubgraph p).verts G)\n[PROOFSTEP]\nexact p.toSubgraph_connected.induce_verts\n[GOAL]\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nv w : V\ns t : Set V\nsconn : Connected (induce s G)\ntconn : Connected (induce t G)\nhv : v ∈ s\nhw : w ∈ t\nha : Adj G v w\n⊢ Connected (induce (s ∪ t) G)\n[PROOFSTEP]\nrw [connected_induce_iff] at sconn tconn ⊢\n[GOAL]\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nv w : V\ns t : Set V\nsconn : Subgraph.Connected (Subgraph.induce ⊤ s)\ntconn : Subgraph.Connected (Subgraph.induce ⊤ t)\nhv : v ∈ s\nhw : w ∈ t\nha : Adj G v w\n⊢ Subgraph.Connected (Subgraph.induce ⊤ (s ∪ t))\n[PROOFSTEP]\napply (sconn.adj_union tconn hv hw ha).mono\n[GOAL]\ncase hle\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nv w : V\ns t : Set V\nsconn : Subgraph.Connected (Subgraph.induce ⊤ s)\ntconn : Subgraph.Connected (Subgraph.induce ⊤ t)\nhv : v ∈ s\nhw : w ∈ t\nha : Adj G v w\n⊢ Subgraph.induce ⊤ {v, w} ⊔ Subgraph.induce ⊤ s ⊔ Subgraph.induce ⊤ t ≤ Subgraph.induce ⊤ (s ∪ t)\n[PROOFSTEP]\nsimp only [Set.mem_singleton_iff, sup_le_iff, Subgraph.le_induce_union_left, Subgraph.le_induce_union_right, and_true, ←\n  Subgraph.subgraphOfAdj_eq_induce ha]\n[GOAL]\ncase hle\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nv w : V\ns t : Set V\nsconn : Subgraph.Connected (Subgraph.induce ⊤ s)\ntconn : Subgraph.Connected (Subgraph.induce ⊤ t)\nhv : v ∈ s\nhw : w ∈ t\nha : Adj G v w\n⊢ subgraphOfAdj G ha ≤ Subgraph.induce ⊤ (s ∪ t)\n[PROOFSTEP]\napply subgraphOfAdj_le_of_adj\n[GOAL]\ncase hle.h\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nv w : V\ns t : Set V\nsconn : Subgraph.Connected (Subgraph.induce ⊤ s)\ntconn : Subgraph.Connected (Subgraph.induce ⊤ t)\nhv : v ∈ s\nhw : w ∈ t\nha : Adj G v w\n⊢ Subgraph.Adj (Subgraph.induce ⊤ (s ∪ t)) v w\n[PROOFSTEP]\nsimp [hv, hw, ha]\n[GOAL]\ncase hv\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nv w : V\ns t : Set V\nsconn : Subgraph.Connected (Subgraph.induce ⊤ s)\ntconn : Subgraph.Connected (Subgraph.induce ⊤ t)\nhv : v ∈ s\nhw : w ∈ t\nha : Adj G v w\n⊢ (Subgraph.induce ⊤ {v, w} ⊔ Subgraph.induce ⊤ s ⊔ Subgraph.induce ⊤ t).verts = (Subgraph.induce ⊤ (s ∪ t)).verts\n[PROOFSTEP]\nsimp only [Set.mem_singleton_iff, sup_le_iff, Subgraph.verts_sup, Subgraph.induce_verts]\n[GOAL]\ncase hv\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nv w : V\ns t : Set V\nsconn : Subgraph.Connected (Subgraph.induce ⊤ s)\ntconn : Subgraph.Connected (Subgraph.induce ⊤ t)\nhv : v ∈ s\nhw : w ∈ t\nha : Adj G v w\n⊢ {v, w} ∪ s ∪ t = s ∪ t\n[PROOFSTEP]\nrw [Set.union_assoc]\n[GOAL]\ncase hv\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nv w : V\ns t : Set V\nsconn : Subgraph.Connected (Subgraph.induce ⊤ s)\ntconn : Subgraph.Connected (Subgraph.induce ⊤ t)\nhv : v ∈ s\nhw : w ∈ t\nha : Adj G v w\n⊢ {v, w} ∪ (s ∪ t) = s ∪ t\n[PROOFSTEP]\nsimp [Set.insert_subset_iff, Set.singleton_subset_iff, hv, hw]\n[GOAL]\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\ns : Set V\nu : V\nhu : u ∈ s\npatches :\n  ∀ {v : V}, v ∈ s → ∃ s' x hu' hv', Reachable (induce s' G) { val := u, property := hu' } { val := v, property := hv' }\n⊢ Connected (induce s G)\n[PROOFSTEP]\nrw [connected_iff_exists_forall_reachable]\n[GOAL]\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\ns : Set V\nu : V\nhu : u ∈ s\npatches :\n  ∀ {v : V}, v ∈ s → ∃ s' x hu' hv', Reachable (induce s' G) { val := u, property := hu' } { val := v, property := hv' }\n⊢ ∃ v, ∀ (w : ↑s), Reachable (induce s G) v w\n[PROOFSTEP]\nrefine ⟨⟨u, hu⟩, ?_⟩\n[GOAL]\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\ns : Set V\nu : V\nhu : u ∈ s\npatches :\n  ∀ {v : V}, v ∈ s → ∃ s' x hu' hv', Reachable (induce s' G) { val := u, property := hu' } { val := v, property := hv' }\n⊢ ∀ (w : ↑s), Reachable (induce s G) { val := u, property := hu } w\n[PROOFSTEP]\nrintro ⟨v, hv⟩\n[GOAL]\ncase mk\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\ns : Set V\nu : V\nhu : u ∈ s\npatches :\n  ∀ {v : V}, v ∈ s → ∃ s' x hu' hv', Reachable (induce s' G) { val := u, property := hu' } { val := v, property := hv' }\nv : V\nhv : v ∈ s\n⊢ Reachable (induce s G) { val := u, property := hu } { val := v, property := hv }\n[PROOFSTEP]\nobtain ⟨sv, svs, hu', hv', uv⟩ := patches hv\n[GOAL]\ncase mk.intro.intro.intro.intro\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\ns : Set V\nu : V\nhu : u ∈ s\npatches :\n  ∀ {v : V}, v ∈ s → ∃ s' x hu' hv', Reachable (induce s' G) { val := u, property := hu' } { val := v, property := hv' }\nv : V\nhv : v ∈ s\nsv : Set V\nsvs : sv ⊆ s\nhu' : u ∈ sv\nhv' : v ∈ sv\nuv : Reachable (induce sv G) { val := u, property := hu' } { val := v, property := hv' }\n⊢ Reachable (induce s G) { val := u, property := hu } { val := v, property := hv }\n[PROOFSTEP]\nexact uv.map (induceHomOfLE _ svs).toHom\n[GOAL]\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nS : Set (Set V)\nSn : Set.Nonempty S\nSnd : ∀ {s t : Set V}, s ∈ S → t ∈ S → Set.Nonempty (s ∩ t)\nSc : ∀ {s : Set V}, s ∈ S → Connected (induce s G)\n⊢ Connected (induce (⋃₀ S) G)\n[PROOFSTEP]\nobtain ⟨s, sS⟩ := Sn\n[GOAL]\ncase intro\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nS : Set (Set V)\nSnd : ∀ {s t : Set V}, s ∈ S → t ∈ S → Set.Nonempty (s ∩ t)\nSc : ∀ {s : Set V}, s ∈ S → Connected (induce s G)\ns : Set V\nsS : s ∈ S\n⊢ Connected (induce (⋃₀ S) G)\n[PROOFSTEP]\nobtain ⟨v, vs⟩ := (Sc sS).nonempty\n[GOAL]\ncase intro.intro.mk\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nS : Set (Set V)\nSnd : ∀ {s t : Set V}, s ∈ S → t ∈ S → Set.Nonempty (s ∩ t)\nSc : ∀ {s : Set V}, s ∈ S → Connected (induce s G)\ns : Set V\nsS : s ∈ S\nv : V\nvs : v ∈ s\n⊢ Connected (induce (⋃₀ S) G)\n[PROOFSTEP]\napply G.induce_connected_of_patches _ (Set.subset_sUnion_of_mem sS vs)\n[GOAL]\ncase intro.intro.mk\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nS : Set (Set V)\nSnd : ∀ {s t : Set V}, s ∈ S → t ∈ S → Set.Nonempty (s ∩ t)\nSc : ∀ {s : Set V}, s ∈ S → Connected (induce s G)\ns : Set V\nsS : s ∈ S\nv : V\nvs : v ∈ s\n⊢ ∀ {v_1 : V},\n    v_1 ∈ ⋃₀ S → ∃ s' x hu' hv', Reachable (induce s' G) { val := v, property := hu' } { val := v_1, property := hv' }\n[PROOFSTEP]\nrintro w hw\n[GOAL]\ncase intro.intro.mk\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nS : Set (Set V)\nSnd : ∀ {s t : Set V}, s ∈ S → t ∈ S → Set.Nonempty (s ∩ t)\nSc : ∀ {s : Set V}, s ∈ S → Connected (induce s G)\ns : Set V\nsS : s ∈ S\nv : V\nvs : v ∈ s\nw : V\nhw : w ∈ ⋃₀ S\n⊢ ∃ s' x hu' hv', Reachable (induce s' G) { val := v, property := hu' } { val := w, property := hv' }\n[PROOFSTEP]\nsimp only [Set.mem_sUnion, exists_prop] at hw \n[GOAL]\ncase intro.intro.mk\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nS : Set (Set V)\nSnd : ∀ {s t : Set V}, s ∈ S → t ∈ S → Set.Nonempty (s ∩ t)\nSc : ∀ {s : Set V}, s ∈ S → Connected (induce s G)\ns : Set V\nsS : s ∈ S\nv : V\nvs : v ∈ s\nw : V\nhw : ∃ t, t ∈ S ∧ w ∈ t\n⊢ ∃ s' x hu' hv', Reachable (induce s' G) { val := v, property := hu' } { val := w, property := hv' }\n[PROOFSTEP]\nobtain ⟨t, tS, wt⟩ := hw\n[GOAL]\ncase intro.intro.mk.intro.intro\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nS : Set (Set V)\nSnd : ∀ {s t : Set V}, s ∈ S → t ∈ S → Set.Nonempty (s ∩ t)\nSc : ∀ {s : Set V}, s ∈ S → Connected (induce s G)\ns : Set V\nsS : s ∈ S\nv : V\nvs : v ∈ s\nw : V\nt : Set V\ntS : t ∈ S\nwt : w ∈ t\n⊢ ∃ s' x hu' hv', Reachable (induce s' G) { val := v, property := hu' } { val := w, property := hv' }\n[PROOFSTEP]\nrefine\n  ⟨s ∪ t, Set.union_subset (Set.subset_sUnion_of_mem sS) (Set.subset_sUnion_of_mem tS), Or.inl vs, Or.inr wt,\n    induce_union_connected (Sc sS) (Sc tS) (Snd sS tS) _ _⟩\n[GOAL]\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nGpc : Preconnected G\nt : Finset V\ntn : Finset.Nonempty t\n⊢ ∃ t', t ⊆ t' ∧ Connected (induce (↑t') G)\n[PROOFSTEP]\nclassical\nobtain ⟨u, ut⟩ := tn\nrefine ⟨t.biUnion (fun v => (Gpc u v).some.support.toFinset), fun v vt => ?_, ?_⟩\n· simp only [Finset.mem_biUnion, List.mem_toFinset, exists_prop]\n  refine ⟨v, vt, Walk.end_mem_support _⟩\n· apply G.induce_connected_of_patches u\n  · simp only [Finset.coe_biUnion, Finset.mem_coe, List.coe_toFinset, Set.mem_iUnion, Set.mem_setOf_eq,\n      Walk.start_mem_support, exists_prop, and_true]\n    exact ⟨u, ut⟩\n  intros v hv\n  simp only [Finset.mem_coe, Finset.mem_biUnion, List.mem_toFinset, exists_prop] at hv \n  obtain ⟨w, wt, hw⟩ := hv\n  refine ⟨{x | x ∈ (Gpc u w).some.support}, ?_, ?_⟩\n  · simp only [Finset.coe_biUnion, Finset.mem_coe, List.coe_toFinset]\n    exact fun x xw => Set.mem_iUnion₂.mpr ⟨w, wt, xw⟩\n  · simp only [Set.mem_setOf_eq, Walk.start_mem_support, exists_true_left]\n    refine ⟨hw, Walk.connected_induce_support _ _ _⟩\n[GOAL]\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nGpc : Preconnected G\nt : Finset V\ntn : Finset.Nonempty t\n⊢ ∃ t', t ⊆ t' ∧ Connected (induce (↑t') G)\n[PROOFSTEP]\nobtain ⟨u, ut⟩ := tn\n[GOAL]\ncase intro\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nGpc : Preconnected G\nt : Finset V\nu : V\nut : u ∈ t\n⊢ ∃ t', t ⊆ t' ∧ Connected (induce (↑t') G)\n[PROOFSTEP]\nrefine ⟨t.biUnion (fun v => (Gpc u v).some.support.toFinset), fun v vt => ?_, ?_⟩\n[GOAL]\ncase intro.refine_1\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nGpc : Preconnected G\nt : Finset V\nu : V\nut : u ∈ t\nv : V\nvt : v ∈ t\n⊢ v ∈ Finset.biUnion t fun v => List.toFinset (Walk.support (Nonempty.some (_ : Reachable G u v)))\n[PROOFSTEP]\nsimp only [Finset.mem_biUnion, List.mem_toFinset, exists_prop]\n[GOAL]\ncase intro.refine_1\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nGpc : Preconnected G\nt : Finset V\nu : V\nut : u ∈ t\nv : V\nvt : v ∈ t\n⊢ ∃ a, a ∈ t ∧ v ∈ Walk.support (Nonempty.some (_ : Reachable G u a))\n[PROOFSTEP]\nrefine ⟨v, vt, Walk.end_mem_support _⟩\n[GOAL]\ncase intro.refine_2\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nGpc : Preconnected G\nt : Finset V\nu : V\nut : u ∈ t\n⊢ Connected (induce (↑(Finset.biUnion t fun v => List.toFinset (Walk.support (Nonempty.some (_ : Reachable G u v))))) G)\n[PROOFSTEP]\napply G.induce_connected_of_patches u\n[GOAL]\ncase intro.refine_2.hu\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nGpc : Preconnected G\nt : Finset V\nu : V\nut : u ∈ t\n⊢ u ∈ ↑(Finset.biUnion t fun v => List.toFinset (Walk.support (Nonempty.some (_ : Reachable G u v))))\n[PROOFSTEP]\nsimp only [Finset.coe_biUnion, Finset.mem_coe, List.coe_toFinset, Set.mem_iUnion, Set.mem_setOf_eq,\n  Walk.start_mem_support, exists_prop, and_true]\n[GOAL]\ncase intro.refine_2.hu\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nGpc : Preconnected G\nt : Finset V\nu : V\nut : u ∈ t\n⊢ ∃ i, i ∈ t\n[PROOFSTEP]\nexact ⟨u, ut⟩\n[GOAL]\ncase intro.refine_2.patches\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nGpc : Preconnected G\nt : Finset V\nu : V\nut : u ∈ t\n⊢ ∀ {v : V},\n    v ∈ ↑(Finset.biUnion t fun v => List.toFinset (Walk.support (Nonempty.some (_ : Reachable G u v)))) →\n      ∃ s' x hu' hv', Reachable (induce s' G) { val := u, property := hu' } { val := v, property := hv' }\n[PROOFSTEP]\nintros v hv\n[GOAL]\ncase intro.refine_2.patches\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nGpc : Preconnected G\nt : Finset V\nu : V\nut : u ∈ t\nv : V\nhv : v ∈ ↑(Finset.biUnion t fun v => List.toFinset (Walk.support (Nonempty.some (_ : Reachable G u v))))\n⊢ ∃ s' x hu' hv', Reachable (induce s' G) { val := u, property := hu' } { val := v, property := hv' }\n[PROOFSTEP]\nsimp only [Finset.mem_coe, Finset.mem_biUnion, List.mem_toFinset, exists_prop] at hv \n[GOAL]\ncase intro.refine_2.patches\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nGpc : Preconnected G\nt : Finset V\nu : V\nut : u ∈ t\nv : V\nhv : ∃ a, a ∈ t ∧ v ∈ Walk.support (Nonempty.some (_ : Reachable G u a))\n⊢ ∃ s' x hu' hv', Reachable (induce s' G) { val := u, property := hu' } { val := v, property := hv' }\n[PROOFSTEP]\nobtain ⟨w, wt, hw⟩ := hv\n[GOAL]\ncase intro.refine_2.patches.intro.intro\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nGpc : Preconnected G\nt : Finset V\nu : V\nut : u ∈ t\nv w : V\nwt : w ∈ t\nhw : v ∈ Walk.support (Nonempty.some (_ : Reachable G u w))\n⊢ ∃ s' x hu' hv', Reachable (induce s' G) { val := u, property := hu' } { val := v, property := hv' }\n[PROOFSTEP]\nrefine ⟨{x | x ∈ (Gpc u w).some.support}, ?_, ?_⟩\n[GOAL]\ncase intro.refine_2.patches.intro.intro.refine_1\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nGpc : Preconnected G\nt : Finset V\nu : V\nut : u ∈ t\nv w : V\nwt : w ∈ t\nhw : v ∈ Walk.support (Nonempty.some (_ : Reachable G u w))\n⊢ {x | x ∈ Walk.support (Nonempty.some (_ : Reachable G u w))} ⊆\n    ↑(Finset.biUnion t fun v => List.toFinset (Walk.support (Nonempty.some (_ : Reachable G u v))))\n[PROOFSTEP]\nsimp only [Finset.coe_biUnion, Finset.mem_coe, List.coe_toFinset]\n[GOAL]\ncase intro.refine_2.patches.intro.intro.refine_1\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nGpc : Preconnected G\nt : Finset V\nu : V\nut : u ∈ t\nv w : V\nwt : w ∈ t\nhw : v ∈ Walk.support (Nonempty.some (_ : Reachable G u w))\n⊢ {x | x ∈ Walk.support (Nonempty.some (_ : Reachable G u w))} ⊆\n    ⋃ (x : V) (_ : x ∈ t), {a | a ∈ Walk.support (Nonempty.some (_ : Reachable G u x))}\n[PROOFSTEP]\nexact fun x xw => Set.mem_iUnion₂.mpr ⟨w, wt, xw⟩\n[GOAL]\ncase intro.refine_2.patches.intro.intro.refine_2\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nGpc : Preconnected G\nt : Finset V\nu : V\nut : u ∈ t\nv w : V\nwt : w ∈ t\nhw : v ∈ Walk.support (Nonempty.some (_ : Reachable G u w))\n⊢ ∃ hu' hv',\n    Reachable (induce {x | x ∈ Walk.support (Nonempty.some (_ : Reachable G u w))} G) { val := u, property := hu' }\n      { val := v, property := hv' }\n[PROOFSTEP]\nsimp only [Set.mem_setOf_eq, Walk.start_mem_support, exists_true_left]\n[GOAL]\ncase intro.refine_2.patches.intro.intro.refine_2\nV : Type u\nV' : Type v\nG : SimpleGraph V\nG' : SimpleGraph V'\nGpc : Preconnected G\nt : Finset V\nu : V\nut : u ∈ t\nv w : V\nwt : w ∈ t\nhw : v ∈ Walk.support (Nonempty.some (_ : Reachable G u w))\n⊢ ∃ hv',\n    Reachable (induce {x | x ∈ Walk.support (Nonempty.some (_ : Reachable G u w))} G)\n      { val := u, property := (_ : u ∈ {x | x ∈ Walk.support (Nonempty.some (_ : Reachable G u w))}) }\n      { val := v, property := hv' }\n[PROOFSTEP]\nrefine ⟨hw, Walk.connected_induce_support _ _ _⟩\n", "meta": {"mathlib_filename": "Mathlib.Combinatorics.SimpleGraph.Connectivity.Subgraph", "llama_tokens": 16711, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7799929104825006, "lm_q2_score": 0.647798211152541, "lm_q1q2_score": 0.505278012122228}}
{"text": "[GOAL]\nα : Type u_1\nN : Type u_2\ninst✝ : Zero N\nr : α → α → Prop\ns : N → N → Prop\nhbot : ∀ ⦃n : N⦄, ¬s n 0\nhs : WellFounded s\nx : α →₀ N\nh : ∀ (a : α), a ∈ x.support → Acc (rᶜ ⊓ fun x x_1 => x ≠ x_1) a\n⊢ Acc (Finsupp.Lex r s) x\n[PROOFSTEP]\nrw [lex_eq_invImage_dfinsupp_lex]\n[GOAL]\nα : Type u_1\nN : Type u_2\ninst✝ : Zero N\nr : α → α → Prop\ns : N → N → Prop\nhbot : ∀ ⦃n : N⦄, ¬s n 0\nhs : WellFounded s\nx : α →₀ N\nh : ∀ (a : α), a ∈ x.support → Acc (rᶜ ⊓ fun x x_1 => x ≠ x_1) a\n⊢ Acc (InvImage (DFinsupp.Lex r fun x => s) toDFinsupp) x\n[PROOFSTEP]\nclassical\nrefine' InvImage.accessible toDFinsupp (DFinsupp.Lex.acc (fun _ => hbot) (fun _ => hs) _ _)\nsimpa only [toDFinsupp_support] using h\n[GOAL]\nα : Type u_1\nN : Type u_2\ninst✝ : Zero N\nr : α → α → Prop\ns : N → N → Prop\nhbot : ∀ ⦃n : N⦄, ¬s n 0\nhs : WellFounded s\nx : α →₀ N\nh : ∀ (a : α), a ∈ x.support → Acc (rᶜ ⊓ fun x x_1 => x ≠ x_1) a\n⊢ Acc (InvImage (DFinsupp.Lex r fun x => s) toDFinsupp) x\n[PROOFSTEP]\nrefine' InvImage.accessible toDFinsupp (DFinsupp.Lex.acc (fun _ => hbot) (fun _ => hs) _ _)\n[GOAL]\nα : Type u_1\nN : Type u_2\ninst✝ : Zero N\nr : α → α → Prop\ns : N → N → Prop\nhbot : ∀ ⦃n : N⦄, ¬s n 0\nhs : WellFounded s\nx : α →₀ N\nh : ∀ (a : α), a ∈ x.support → Acc (rᶜ ⊓ fun x x_1 => x ≠ x_1) a\n⊢ ∀ (i : α), i ∈ DFinsupp.support (toDFinsupp x) → Acc (rᶜ ⊓ fun x x_1 => x ≠ x_1) i\n[PROOFSTEP]\nsimpa only [toDFinsupp_support] using h\n", "meta": {"mathlib_filename": "Mathlib.Data.Finsupp.WellFounded", "llama_tokens": 749, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7799929002541068, "lm_q2_score": 0.6477982179521103, "lm_q1q2_score": 0.5052780107999085}}
{"text": "[GOAL]\nR : Type u_1\ninst✝ : CommRing R\n⊢ bernsteinPolynomial ℤ 3 2 = 3 * X ^ 2 - 3 * X ^ 3\n[PROOFSTEP]\nsimp [bernsteinPolynomial, choose]\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\n⊢ (1 + 1 + 1) * X ^ 2 * (1 - X) = 3 * X ^ 2 - 3 * X ^ 3\n[PROOFSTEP]\nnorm_num\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\n⊢ 3 * X ^ 2 * (1 - X) = 3 * X ^ 2 - 3 * X ^ 3\n[PROOFSTEP]\nring\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nn ν : ℕ\nh : n < ν\n⊢ bernsteinPolynomial R n ν = 0\n[PROOFSTEP]\nsimp [bernsteinPolynomial, Nat.choose_eq_zero_of_lt h]\n[GOAL]\nR : Type u_1\ninst✝¹ : CommRing R\nS : Type u_2\ninst✝ : CommRing S\nf : R →+* S\nn ν : ℕ\n⊢ Polynomial.map f (bernsteinPolynomial R n ν) = bernsteinPolynomial S n ν\n[PROOFSTEP]\nsimp [bernsteinPolynomial]\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nn ν : ℕ\nh : ν ≤ n\n⊢ Polynomial.comp (bernsteinPolynomial R n ν) (1 - X) = bernsteinPolynomial R n (n - ν)\n[PROOFSTEP]\nsimp [bernsteinPolynomial, h, tsub_tsub_assoc, mul_right_comm]\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nn ν : ℕ\nh : ν ≤ n\n⊢ bernsteinPolynomial R n ν = Polynomial.comp (bernsteinPolynomial R n (n - ν)) (1 - X)\n[PROOFSTEP]\nsimp [← flip _ _ _ h, Polynomial.comp_assoc]\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nn ν : ℕ\n⊢ Polynomial.eval 0 (bernsteinPolynomial R n ν) = if ν = 0 then 1 else 0\n[PROOFSTEP]\nrw [bernsteinPolynomial]\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nn ν : ℕ\n⊢ Polynomial.eval 0 (↑(choose n ν) * X ^ ν * (1 - X) ^ (n - ν)) = if ν = 0 then 1 else 0\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nR : Type u_1\ninst✝ : CommRing R\nn ν : ℕ\nh : ν = 0\n⊢ Polynomial.eval 0 (↑(choose n ν) * X ^ ν * (1 - X) ^ (n - ν)) = 1\n[PROOFSTEP]\nsubst h\n[GOAL]\ncase pos\nR : Type u_1\ninst✝ : CommRing R\nn : ℕ\n⊢ Polynomial.eval 0 (↑(choose n 0) * X ^ 0 * (1 - X) ^ (n - 0)) = 1\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg\nR : Type u_1\ninst✝ : CommRing R\nn ν : ℕ\nh : ¬ν = 0\n⊢ Polynomial.eval 0 (↑(choose n ν) * X ^ ν * (1 - X) ^ (n - ν)) = 0\n[PROOFSTEP]\nsimp [zero_pow (Nat.pos_of_ne_zero h)]\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nn ν : ℕ\n⊢ Polynomial.eval 1 (bernsteinPolynomial R n ν) = if ν = n then 1 else 0\n[PROOFSTEP]\nrw [bernsteinPolynomial]\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nn ν : ℕ\n⊢ Polynomial.eval 1 (↑(choose n ν) * X ^ ν * (1 - X) ^ (n - ν)) = if ν = n then 1 else 0\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nR : Type u_1\ninst✝ : CommRing R\nn ν : ℕ\nh : ν = n\n⊢ Polynomial.eval 1 (↑(choose n ν) * X ^ ν * (1 - X) ^ (n - ν)) = 1\n[PROOFSTEP]\nsubst h\n[GOAL]\ncase pos\nR : Type u_1\ninst✝ : CommRing R\nν : ℕ\n⊢ Polynomial.eval 1 (↑(choose ν ν) * X ^ ν * (1 - X) ^ (ν - ν)) = 1\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg\nR : Type u_1\ninst✝ : CommRing R\nn ν : ℕ\nh : ¬ν = n\n⊢ Polynomial.eval 1 (↑(choose n ν) * X ^ ν * (1 - X) ^ (n - ν)) = 0\n[PROOFSTEP]\nobtain w | w := (n - ν).eq_zero_or_pos\n[GOAL]\ncase neg.inl\nR : Type u_1\ninst✝ : CommRing R\nn ν : ℕ\nh : ¬ν = n\nw : n - ν = 0\n⊢ Polynomial.eval 1 (↑(choose n ν) * X ^ ν * (1 - X) ^ (n - ν)) = 0\n[PROOFSTEP]\nsimp [Nat.choose_eq_zero_of_lt ((tsub_eq_zero_iff_le.mp w).lt_of_ne (Ne.symm h))]\n[GOAL]\ncase neg.inr\nR : Type u_1\ninst✝ : CommRing R\nn ν : ℕ\nh : ¬ν = n\nw : n - ν > 0\n⊢ Polynomial.eval 1 (↑(choose n ν) * X ^ ν * (1 - X) ^ (n - ν)) = 0\n[PROOFSTEP]\nsimp [zero_pow w]\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nn ν : ℕ\n⊢ ↑Polynomial.derivative (bernsteinPolynomial R (n + 1) (ν + 1)) =\n    (↑n + 1) * (bernsteinPolynomial R n ν - bernsteinPolynomial R n (ν + 1))\n[PROOFSTEP]\nrw [bernsteinPolynomial]\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nn ν : ℕ\n⊢ ↑Polynomial.derivative (↑(choose (n + 1) (ν + 1)) * X ^ (ν + 1) * (1 - X) ^ (n + 1 - (ν + 1))) =\n    (↑n + 1) * (bernsteinPolynomial R n ν - bernsteinPolynomial R n (ν + 1))\n[PROOFSTEP]\nsuffices\n  ((n + 1).choose (ν + 1) : R[X]) * ((↑(ν + 1 : ℕ) : R[X]) * X ^ ν) * (1 - X) ^ (n - ν) -\n      ((n + 1).choose (ν + 1) : R[X]) * X ^ (ν + 1) * ((↑(n - ν) : R[X]) * (1 - X) ^ (n - ν - 1)) =\n    (↑(n + 1) : R[X]) *\n      ((n.choose ν : R[X]) * X ^ ν * (1 - X) ^ (n - ν) -\n        (n.choose (ν + 1) : R[X]) * X ^ (ν + 1) * (1 - X) ^ (n - (ν + 1)))\n  by\n  simpa [Polynomial.derivative_pow, ← sub_eq_add_neg, Nat.succ_sub_succ_eq_sub, Polynomial.derivative_mul,\n    Polynomial.derivative_nat_cast, zero_mul, Nat.cast_add, algebraMap.coe_one, Polynomial.derivative_X, mul_one,\n    zero_add, Polynomial.derivative_sub, Polynomial.derivative_one, zero_sub, mul_neg, Nat.sub_zero,\n    bernsteinPolynomial, map_add, map_natCast, Nat.cast_one]\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nn ν : ℕ\nthis :\n  ↑(choose (n + 1) (ν + 1)) * (↑(ν + 1) * X ^ ν) * (1 - X) ^ (n - ν) -\n      ↑(choose (n + 1) (ν + 1)) * X ^ (ν + 1) * (↑(n - ν) * (1 - X) ^ (n - ν - 1)) =\n    ↑(n + 1) * (↑(choose n ν) * X ^ ν * (1 - X) ^ (n - ν) - ↑(choose n (ν + 1)) * X ^ (ν + 1) * (1 - X) ^ (n - (ν + 1)))\n⊢ ↑Polynomial.derivative (↑(choose (n + 1) (ν + 1)) * X ^ (ν + 1) * (1 - X) ^ (n + 1 - (ν + 1))) =\n    (↑n + 1) * (bernsteinPolynomial R n ν - bernsteinPolynomial R n (ν + 1))\n[PROOFSTEP]\nsimpa [Polynomial.derivative_pow, ← sub_eq_add_neg, Nat.succ_sub_succ_eq_sub, Polynomial.derivative_mul,\n  Polynomial.derivative_nat_cast, zero_mul, Nat.cast_add, algebraMap.coe_one, Polynomial.derivative_X, mul_one,\n  zero_add, Polynomial.derivative_sub, Polynomial.derivative_one, zero_sub, mul_neg, Nat.sub_zero, bernsteinPolynomial,\n  map_add, map_natCast, Nat.cast_one]\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nn ν : ℕ\n⊢ ↑(choose (n + 1) (ν + 1)) * (↑(ν + 1) * X ^ ν) * (1 - X) ^ (n - ν) -\n      ↑(choose (n + 1) (ν + 1)) * X ^ (ν + 1) * (↑(n - ν) * (1 - X) ^ (n - ν - 1)) =\n    ↑(n + 1) * (↑(choose n ν) * X ^ ν * (1 - X) ^ (n - ν) - ↑(choose n (ν + 1)) * X ^ (ν + 1) * (1 - X) ^ (n - (ν + 1)))\n[PROOFSTEP]\nconv_rhs =>\n  rw [mul_sub]\n    -- We'll prove the two terms match up separately.\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nn ν : ℕ\n| ↑(n + 1) * (↑(choose n ν) * X ^ ν * (1 - X) ^ (n - ν) - ↑(choose n (ν + 1)) * X ^ (ν + 1) * (1 - X) ^ (n - (ν + 1)))\n[PROOFSTEP]\nrw [mul_sub]\n    -- We'll prove the two terms match up separately.\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nn ν : ℕ\n| ↑(n + 1) * (↑(choose n ν) * X ^ ν * (1 - X) ^ (n - ν) - ↑(choose n (ν + 1)) * X ^ (ν + 1) * (1 - X) ^ (n - (ν + 1)))\n[PROOFSTEP]\nrw [mul_sub]\n    -- We'll prove the two terms match up separately.\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nn ν : ℕ\n| ↑(n + 1) * (↑(choose n ν) * X ^ ν * (1 - X) ^ (n - ν) - ↑(choose n (ν + 1)) * X ^ (ν + 1) * (1 - X) ^ (n - (ν + 1)))\n[PROOFSTEP]\nrw [mul_sub]\n  -- We'll prove the two terms match up separately.\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nn ν : ℕ\n⊢ ↑(choose (n + 1) (ν + 1)) * (↑(ν + 1) * X ^ ν) * (1 - X) ^ (n - ν) -\n      ↑(choose (n + 1) (ν + 1)) * X ^ (ν + 1) * (↑(n - ν) * (1 - X) ^ (n - ν - 1)) =\n    ↑(n + 1) * (↑(choose n ν) * X ^ ν * (1 - X) ^ (n - ν)) -\n      ↑(n + 1) * (↑(choose n (ν + 1)) * X ^ (ν + 1) * (1 - X) ^ (n - (ν + 1)))\n[PROOFSTEP]\nrefine' congr (congr_arg Sub.sub _) _\n[GOAL]\ncase refine'_1\nR : Type u_1\ninst✝ : CommRing R\nn ν : ℕ\n⊢ ↑(choose (n + 1) (ν + 1)) * (↑(ν + 1) * X ^ ν) * (1 - X) ^ (n - ν) =\n    ↑(n + 1) * (↑(choose n ν) * X ^ ν * (1 - X) ^ (n - ν))\n[PROOFSTEP]\nsimp only [← mul_assoc]\n[GOAL]\ncase refine'_1\nR : Type u_1\ninst✝ : CommRing R\nn ν : ℕ\n⊢ ↑(choose (n + 1) (ν + 1)) * ↑(ν + 1) * X ^ ν * (1 - X) ^ (n - ν) =\n    ↑(n + 1) * ↑(choose n ν) * X ^ ν * (1 - X) ^ (n - ν)\n[PROOFSTEP]\nrefine' congr (congr_arg (· * ·) (congr (congr_arg (· * ·) _) rfl)) rfl\n[GOAL]\ncase refine'_1\nR : Type u_1\ninst✝ : CommRing R\nn ν : ℕ\n⊢ ↑(choose (n + 1) (ν + 1)) * ↑(ν + 1) = ↑(n + 1) * ↑(choose n ν)\n[PROOFSTEP]\nexact_mod_cast congr_arg (fun m : ℕ => (m : R[X])) (Nat.succ_mul_choose_eq n ν).symm\n[GOAL]\ncase refine'_2\nR : Type u_1\ninst✝ : CommRing R\nn ν : ℕ\n⊢ ↑(choose (n + 1) (ν + 1)) * X ^ (ν + 1) * (↑(n - ν) * (1 - X) ^ (n - ν - 1)) =\n    ↑(n + 1) * (↑(choose n (ν + 1)) * X ^ (ν + 1) * (1 - X) ^ (n - (ν + 1)))\n[PROOFSTEP]\nrw [← tsub_add_eq_tsub_tsub, ← mul_assoc, ← mul_assoc]\n[GOAL]\ncase refine'_2\nR : Type u_1\ninst✝ : CommRing R\nn ν : ℕ\n⊢ ↑(choose (n + 1) (ν + 1)) * X ^ (ν + 1) * ↑(n - ν) * (1 - X) ^ (n - (ν + 1)) =\n    ↑(n + 1) * (↑(choose n (ν + 1)) * X ^ (ν + 1)) * (1 - X) ^ (n - (ν + 1))\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase refine'_2.e_a\nR : Type u_1\ninst✝ : CommRing R\nn ν : ℕ\n⊢ ↑(choose (n + 1) (ν + 1)) * X ^ (ν + 1) * ↑(n - ν) = ↑(n + 1) * (↑(choose n (ν + 1)) * X ^ (ν + 1))\n[PROOFSTEP]\nrw [mul_comm, ← mul_assoc, ← mul_assoc]\n[GOAL]\ncase refine'_2.e_a\nR : Type u_1\ninst✝ : CommRing R\nn ν : ℕ\n⊢ ↑(n - ν) * ↑(choose (n + 1) (ν + 1)) * X ^ (ν + 1) = ↑(n + 1) * ↑(choose n (ν + 1)) * X ^ (ν + 1)\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase refine'_2.e_a.e_a\nR : Type u_1\ninst✝ : CommRing R\nn ν : ℕ\n⊢ ↑(n - ν) * ↑(choose (n + 1) (ν + 1)) = ↑(n + 1) * ↑(choose n (ν + 1))\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase refine'_2.e_a.e_a\nR : Type u_1\ninst✝ : CommRing R\nn ν : ℕ\n⊢ ↑((n - ν) * choose (n + 1) (ν + 1)) = ↑((n + 1) * choose n (ν + 1))\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase refine'_2.e_a.e_a.e_a\nR : Type u_1\ninst✝ : CommRing R\nn ν : ℕ\n⊢ (n - ν) * choose (n + 1) (ν + 1) = (n + 1) * choose n (ν + 1)\n[PROOFSTEP]\nconvert (Nat.choose_mul_succ_eq n (ν + 1)).symm using 1\n[GOAL]\ncase h.e'_2\nR : Type u_1\ninst✝ : CommRing R\nn ν : ℕ\n⊢ (n - ν) * choose (n + 1) (ν + 1) = choose (n + 1) (ν + 1) * (n + 1 - (ν + 1))\n[PROOFSTEP]\nrw [mul_comm, Nat.succ_sub_succ_eq_sub]\n[GOAL]\ncase h.e'_3\nR : Type u_1\ninst✝ : CommRing R\nn ν : ℕ\n⊢ (n + 1) * choose n (ν + 1) = choose n (ν + 1) * (n + 1)\n[PROOFSTEP]\napply mul_comm\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nn ν : ℕ\n⊢ ↑Polynomial.derivative (bernsteinPolynomial R n (ν + 1)) =\n    ↑n * (bernsteinPolynomial R (n - 1) ν - bernsteinPolynomial R (n - 1) (ν + 1))\n[PROOFSTEP]\ncases n\n[GOAL]\ncase zero\nR : Type u_1\ninst✝ : CommRing R\nν : ℕ\n⊢ ↑Polynomial.derivative (bernsteinPolynomial R Nat.zero (ν + 1)) =\n    ↑Nat.zero * (bernsteinPolynomial R (Nat.zero - 1) ν - bernsteinPolynomial R (Nat.zero - 1) (ν + 1))\n[PROOFSTEP]\nsimp [bernsteinPolynomial]\n[GOAL]\ncase succ\nR : Type u_1\ninst✝ : CommRing R\nν n✝ : ℕ\n⊢ ↑Polynomial.derivative (bernsteinPolynomial R (Nat.succ n✝) (ν + 1)) =\n    ↑(Nat.succ n✝) * (bernsteinPolynomial R (Nat.succ n✝ - 1) ν - bernsteinPolynomial R (Nat.succ n✝ - 1) (ν + 1))\n[PROOFSTEP]\nrw [Nat.cast_succ]\n[GOAL]\ncase succ\nR : Type u_1\ninst✝ : CommRing R\nν n✝ : ℕ\n⊢ ↑Polynomial.derivative (bernsteinPolynomial R (Nat.succ n✝) (ν + 1)) =\n    (↑n✝ + 1) * (bernsteinPolynomial R (Nat.succ n✝ - 1) ν - bernsteinPolynomial R (Nat.succ n✝ - 1) (ν + 1))\n[PROOFSTEP]\napply derivative_succ_aux\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nn : ℕ\n⊢ ↑Polynomial.derivative (bernsteinPolynomial R n 0) = -↑n * bernsteinPolynomial R (n - 1) 0\n[PROOFSTEP]\nsimp [bernsteinPolynomial, Polynomial.derivative_pow]\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nn ν k : ℕ\n⊢ k < ν → Polynomial.eval 0 ((↑Polynomial.derivative)^[k] (bernsteinPolynomial R n ν)) = 0\n[PROOFSTEP]\ncases' ν with ν\n[GOAL]\ncase zero\nR : Type u_1\ninst✝ : CommRing R\nn k : ℕ\n⊢ k < Nat.zero → Polynomial.eval 0 ((↑Polynomial.derivative)^[k] (bernsteinPolynomial R n Nat.zero)) = 0\n[PROOFSTEP]\nrintro ⟨⟩\n[GOAL]\ncase succ\nR : Type u_1\ninst✝ : CommRing R\nn k ν : ℕ\n⊢ k < Nat.succ ν → Polynomial.eval 0 ((↑Polynomial.derivative)^[k] (bernsteinPolynomial R n (Nat.succ ν))) = 0\n[PROOFSTEP]\nrw [Nat.lt_succ_iff]\n[GOAL]\ncase succ\nR : Type u_1\ninst✝ : CommRing R\nn k ν : ℕ\n⊢ k ≤ ν → Polynomial.eval 0 ((↑Polynomial.derivative)^[k] (bernsteinPolynomial R n (Nat.succ ν))) = 0\n[PROOFSTEP]\ninduction' k with k ih generalizing n ν\n[GOAL]\ncase succ.zero\nR : Type u_1\ninst✝ : CommRing R\nn✝ ν✝ n ν : ℕ\n⊢ Nat.zero ≤ ν → Polynomial.eval 0 ((↑Polynomial.derivative)^[Nat.zero] (bernsteinPolynomial R n (Nat.succ ν))) = 0\n[PROOFSTEP]\nsimp [eval_at_0]\n[GOAL]\ncase succ.succ\nR : Type u_1\ninst✝ : CommRing R\nn✝ ν✝ k : ℕ\nih : ∀ (n ν : ℕ), k ≤ ν → Polynomial.eval 0 ((↑Polynomial.derivative)^[k] (bernsteinPolynomial R n (Nat.succ ν))) = 0\nn ν : ℕ\n⊢ Nat.succ k ≤ ν → Polynomial.eval 0 ((↑Polynomial.derivative)^[Nat.succ k] (bernsteinPolynomial R n (Nat.succ ν))) = 0\n[PROOFSTEP]\nsimp only [derivative_succ, Int.coe_nat_eq_zero, mul_eq_zero, Function.comp_apply, Function.iterate_succ,\n  Polynomial.iterate_derivative_sub, Polynomial.iterate_derivative_nat_cast_mul, Polynomial.eval_mul,\n  Polynomial.eval_nat_cast, Polynomial.eval_sub]\n[GOAL]\ncase succ.succ\nR : Type u_1\ninst✝ : CommRing R\nn✝ ν✝ k : ℕ\nih : ∀ (n ν : ℕ), k ≤ ν → Polynomial.eval 0 ((↑Polynomial.derivative)^[k] (bernsteinPolynomial R n (Nat.succ ν))) = 0\nn ν : ℕ\n⊢ Nat.succ k ≤ ν →\n    ↑n *\n        (Polynomial.eval 0 ((↑Polynomial.derivative)^[k] (bernsteinPolynomial R (n - 1) ν)) -\n          Polynomial.eval 0 ((↑Polynomial.derivative)^[k] (bernsteinPolynomial R (n - 1) (ν + 1)))) =\n      0\n[PROOFSTEP]\nintro h\n[GOAL]\ncase succ.succ\nR : Type u_1\ninst✝ : CommRing R\nn✝ ν✝ k : ℕ\nih : ∀ (n ν : ℕ), k ≤ ν → Polynomial.eval 0 ((↑Polynomial.derivative)^[k] (bernsteinPolynomial R n (Nat.succ ν))) = 0\nn ν : ℕ\nh : Nat.succ k ≤ ν\n⊢ ↑n *\n      (Polynomial.eval 0 ((↑Polynomial.derivative)^[k] (bernsteinPolynomial R (n - 1) ν)) -\n        Polynomial.eval 0 ((↑Polynomial.derivative)^[k] (bernsteinPolynomial R (n - 1) (ν + 1)))) =\n    0\n[PROOFSTEP]\napply mul_eq_zero_of_right\n[GOAL]\ncase succ.succ.h\nR : Type u_1\ninst✝ : CommRing R\nn✝ ν✝ k : ℕ\nih : ∀ (n ν : ℕ), k ≤ ν → Polynomial.eval 0 ((↑Polynomial.derivative)^[k] (bernsteinPolynomial R n (Nat.succ ν))) = 0\nn ν : ℕ\nh : Nat.succ k ≤ ν\n⊢ Polynomial.eval 0 ((↑Polynomial.derivative)^[k] (bernsteinPolynomial R (n - 1) ν)) -\n      Polynomial.eval 0 ((↑Polynomial.derivative)^[k] (bernsteinPolynomial R (n - 1) (ν + 1))) =\n    0\n[PROOFSTEP]\nrw [ih _ _ (Nat.le_of_succ_le h), sub_zero]\n[GOAL]\ncase succ.succ.h\nR : Type u_1\ninst✝ : CommRing R\nn✝ ν✝ k : ℕ\nih : ∀ (n ν : ℕ), k ≤ ν → Polynomial.eval 0 ((↑Polynomial.derivative)^[k] (bernsteinPolynomial R n (Nat.succ ν))) = 0\nn ν : ℕ\nh : Nat.succ k ≤ ν\n⊢ Polynomial.eval 0 ((↑Polynomial.derivative)^[k] (bernsteinPolynomial R (n - 1) ν)) = 0\n[PROOFSTEP]\nconvert ih _ _ (Nat.pred_le_pred h)\n[GOAL]\ncase h.e'_2.h.e'_4.h.h.e'_4.h.e'_4\nR : Type u_1\ninst✝ : CommRing R\nn✝ ν✝ k : ℕ\nih : ∀ (n ν : ℕ), k ≤ ν → Polynomial.eval 0 ((↑Polynomial.derivative)^[k] (bernsteinPolynomial R n (Nat.succ ν))) = 0\nn ν : ℕ\nh : Nat.succ k ≤ ν\ne_2✝ : Ring.toSemiring = CommSemiring.toSemiring\n⊢ ν = Nat.succ (Nat.pred ν)\n[PROOFSTEP]\nexact (Nat.succ_pred_eq_of_pos (k.succ_pos.trans_le h)).symm\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nn ν : ℕ\n⊢ eval 0 ((↑derivative)^[ν] (bernsteinPolynomial R n ν)) = eval (↑(n - (ν - 1))) (pochhammer R ν)\n[PROOFSTEP]\nby_cases h : ν ≤ n\n[GOAL]\ncase pos\nR : Type u_1\ninst✝ : CommRing R\nn ν : ℕ\nh : ν ≤ n\n⊢ eval 0 ((↑derivative)^[ν] (bernsteinPolynomial R n ν)) = eval (↑(n - (ν - 1))) (pochhammer R ν)\n[PROOFSTEP]\ninduction' ν with ν ih generalizing n\n[GOAL]\ncase pos.zero\nR : Type u_1\ninst✝ : CommRing R\nn✝ ν : ℕ\nh✝ : ν ≤ n✝\nn : ℕ\nh : Nat.zero ≤ n\n⊢ eval 0 ((↑derivative)^[Nat.zero] (bernsteinPolynomial R n Nat.zero)) =\n    eval (↑(n - (Nat.zero - 1))) (pochhammer R Nat.zero)\n[PROOFSTEP]\nsimp [eval_at_0]\n[GOAL]\ncase pos.succ\nR : Type u_1\ninst✝ : CommRing R\nn✝ ν✝ : ℕ\nh✝ : ν✝ ≤ n✝\nν : ℕ\nih : ∀ (n : ℕ), ν ≤ n → eval 0 ((↑derivative)^[ν] (bernsteinPolynomial R n ν)) = eval (↑(n - (ν - 1))) (pochhammer R ν)\nn : ℕ\nh : Nat.succ ν ≤ n\n⊢ eval 0 ((↑derivative)^[Nat.succ ν] (bernsteinPolynomial R n (Nat.succ ν))) =\n    eval (↑(n - (Nat.succ ν - 1))) (pochhammer R (Nat.succ ν))\n[PROOFSTEP]\nhave h' : ν ≤ n - 1 := le_tsub_of_add_le_right h\n[GOAL]\ncase pos.succ\nR : Type u_1\ninst✝ : CommRing R\nn✝ ν✝ : ℕ\nh✝ : ν✝ ≤ n✝\nν : ℕ\nih : ∀ (n : ℕ), ν ≤ n → eval 0 ((↑derivative)^[ν] (bernsteinPolynomial R n ν)) = eval (↑(n - (ν - 1))) (pochhammer R ν)\nn : ℕ\nh : Nat.succ ν ≤ n\nh' : ν ≤ n - 1\n⊢ eval 0 ((↑derivative)^[Nat.succ ν] (bernsteinPolynomial R n (Nat.succ ν))) =\n    eval (↑(n - (Nat.succ ν - 1))) (pochhammer R (Nat.succ ν))\n[PROOFSTEP]\nsimp only [derivative_succ, ih (n - 1) h', iterate_derivative_succ_at_0_eq_zero, Nat.succ_sub_succ_eq_sub, tsub_zero,\n  sub_zero, iterate_derivative_sub, iterate_derivative_nat_cast_mul, eval_one, eval_mul, eval_add, eval_sub, eval_X,\n  eval_comp, eval_nat_cast, Function.comp_apply, Function.iterate_succ, pochhammer_succ_left]\n[GOAL]\ncase pos.succ\nR : Type u_1\ninst✝ : CommRing R\nn✝ ν✝ : ℕ\nh✝ : ν✝ ≤ n✝\nν : ℕ\nih : ∀ (n : ℕ), ν ≤ n → eval 0 ((↑derivative)^[ν] (bernsteinPolynomial R n ν)) = eval (↑(n - (ν - 1))) (pochhammer R ν)\nn : ℕ\nh : Nat.succ ν ≤ n\nh' : ν ≤ n - 1\n⊢ ↑n * eval (↑(n - 1 - (ν - 1))) (pochhammer R ν) = ↑(n - ν) * eval (↑(n - ν) + 1) (pochhammer R ν)\n[PROOFSTEP]\nobtain rfl | h'' := ν.eq_zero_or_pos\n[GOAL]\ncase pos.succ.inl\nR : Type u_1\ninst✝ : CommRing R\nn✝ ν : ℕ\nh✝ : ν ≤ n✝\nn : ℕ\nih : ∀ (n : ℕ), 0 ≤ n → eval 0 ((↑derivative)^[0] (bernsteinPolynomial R n 0)) = eval (↑(n - (0 - 1))) (pochhammer R 0)\nh : Nat.succ 0 ≤ n\nh' : 0 ≤ n - 1\n⊢ ↑n * eval (↑(n - 1 - (0 - 1))) (pochhammer R 0) = ↑(n - 0) * eval (↑(n - 0) + 1) (pochhammer R 0)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase pos.succ.inr\nR : Type u_1\ninst✝ : CommRing R\nn✝ ν✝ : ℕ\nh✝ : ν✝ ≤ n✝\nν : ℕ\nih : ∀ (n : ℕ), ν ≤ n → eval 0 ((↑derivative)^[ν] (bernsteinPolynomial R n ν)) = eval (↑(n - (ν - 1))) (pochhammer R ν)\nn : ℕ\nh : Nat.succ ν ≤ n\nh' : ν ≤ n - 1\nh'' : ν > 0\n⊢ ↑n * eval (↑(n - 1 - (ν - 1))) (pochhammer R ν) = ↑(n - ν) * eval (↑(n - ν) + 1) (pochhammer R ν)\n[PROOFSTEP]\nhave : n - 1 - (ν - 1) = n - ν := by\n  rw [gt_iff_lt, ← Nat.succ_le_iff] at h'' \n  rw [← tsub_add_eq_tsub_tsub, add_comm, tsub_add_cancel_of_le h'']\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nn✝ ν✝ : ℕ\nh✝ : ν✝ ≤ n✝\nν : ℕ\nih : ∀ (n : ℕ), ν ≤ n → eval 0 ((↑derivative)^[ν] (bernsteinPolynomial R n ν)) = eval (↑(n - (ν - 1))) (pochhammer R ν)\nn : ℕ\nh : Nat.succ ν ≤ n\nh' : ν ≤ n - 1\nh'' : ν > 0\n⊢ n - 1 - (ν - 1) = n - ν\n[PROOFSTEP]\nrw [gt_iff_lt, ← Nat.succ_le_iff] at h'' \n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nn✝ ν✝ : ℕ\nh✝ : ν✝ ≤ n✝\nν : ℕ\nih : ∀ (n : ℕ), ν ≤ n → eval 0 ((↑derivative)^[ν] (bernsteinPolynomial R n ν)) = eval (↑(n - (ν - 1))) (pochhammer R ν)\nn : ℕ\nh : Nat.succ ν ≤ n\nh' : ν ≤ n - 1\nh'' : Nat.succ 0 ≤ ν\n⊢ n - 1 - (ν - 1) = n - ν\n[PROOFSTEP]\nrw [← tsub_add_eq_tsub_tsub, add_comm, tsub_add_cancel_of_le h'']\n[GOAL]\ncase pos.succ.inr\nR : Type u_1\ninst✝ : CommRing R\nn✝ ν✝ : ℕ\nh✝ : ν✝ ≤ n✝\nν : ℕ\nih : ∀ (n : ℕ), ν ≤ n → eval 0 ((↑derivative)^[ν] (bernsteinPolynomial R n ν)) = eval (↑(n - (ν - 1))) (pochhammer R ν)\nn : ℕ\nh : Nat.succ ν ≤ n\nh' : ν ≤ n - 1\nh'' : ν > 0\nthis : n - 1 - (ν - 1) = n - ν\n⊢ ↑n * eval (↑(n - 1 - (ν - 1))) (pochhammer R ν) = ↑(n - ν) * eval (↑(n - ν) + 1) (pochhammer R ν)\n[PROOFSTEP]\nrw [this, pochhammer_eval_succ]\n[GOAL]\ncase pos.succ.inr\nR : Type u_1\ninst✝ : CommRing R\nn✝ ν✝ : ℕ\nh✝ : ν✝ ≤ n✝\nν : ℕ\nih : ∀ (n : ℕ), ν ≤ n → eval 0 ((↑derivative)^[ν] (bernsteinPolynomial R n ν)) = eval (↑(n - (ν - 1))) (pochhammer R ν)\nn : ℕ\nh : Nat.succ ν ≤ n\nh' : ν ≤ n - 1\nh'' : ν > 0\nthis : n - 1 - (ν - 1) = n - ν\n⊢ ↑n * eval (↑(n - ν)) (pochhammer R ν) = (↑(n - ν) + ↑ν) * eval (↑(n - ν)) (pochhammer R ν)\n[PROOFSTEP]\nrw_mod_cast [tsub_add_cancel_of_le (h'.trans n.pred_le)]\n[GOAL]\ncase neg\nR : Type u_1\ninst✝ : CommRing R\nn ν : ℕ\nh : ¬ν ≤ n\n⊢ eval 0 ((↑derivative)^[ν] (bernsteinPolynomial R n ν)) = eval (↑(n - (ν - 1))) (pochhammer R ν)\n[PROOFSTEP]\nsimp only [not_le] at h \n[GOAL]\ncase neg\nR : Type u_1\ninst✝ : CommRing R\nn ν : ℕ\nh : n < ν\n⊢ eval 0 ((↑derivative)^[ν] (bernsteinPolynomial R n ν)) = eval (↑(n - (ν - 1))) (pochhammer R ν)\n[PROOFSTEP]\nrw [tsub_eq_zero_iff_le.mpr (Nat.le_pred_of_lt h), eq_zero_of_lt R h]\n[GOAL]\ncase neg\nR : Type u_1\ninst✝ : CommRing R\nn ν : ℕ\nh : n < ν\n⊢ eval 0 ((↑derivative)^[ν] 0) = eval (↑0) (pochhammer R ν)\n[PROOFSTEP]\nsimp [pos_iff_ne_zero.mp (pos_of_gt h)]\n[GOAL]\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CharZero R\nn ν : ℕ\nh : ν ≤ n\n⊢ eval 0 ((↑derivative)^[ν] (bernsteinPolynomial R n ν)) ≠ 0\n[PROOFSTEP]\nsimp only [Int.coe_nat_eq_zero, bernsteinPolynomial.iterate_derivative_at_0, Ne.def, Nat.cast_eq_zero]\n[GOAL]\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CharZero R\nn ν : ℕ\nh : ν ≤ n\n⊢ ¬eval (↑(n - (ν - 1))) (pochhammer R ν) = 0\n[PROOFSTEP]\nsimp only [← pochhammer_eval_cast]\n[GOAL]\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CharZero R\nn ν : ℕ\nh : ν ≤ n\n⊢ ¬↑(eval (n - (ν - 1)) (pochhammer ℕ ν)) = 0\n[PROOFSTEP]\nnorm_cast\n[GOAL]\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CharZero R\nn ν : ℕ\nh : ν ≤ n\n⊢ ¬eval (n - (ν - 1)) (pochhammer ℕ ν) = 0\n[PROOFSTEP]\napply ne_of_gt\n[GOAL]\ncase h\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CharZero R\nn ν : ℕ\nh : ν ≤ n\n⊢ 0 < eval (n - (ν - 1)) (pochhammer ℕ ν)\n[PROOFSTEP]\nobtain rfl | h' := Nat.eq_zero_or_pos ν\n[GOAL]\ncase h.inl\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CharZero R\nn : ℕ\nh : 0 ≤ n\n⊢ 0 < eval (n - (0 - 1)) (pochhammer ℕ 0)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.inr\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CharZero R\nn ν : ℕ\nh : ν ≤ n\nh' : ν > 0\n⊢ 0 < eval (n - (ν - 1)) (pochhammer ℕ ν)\n[PROOFSTEP]\nrw [← Nat.succ_pred_eq_of_pos h'] at h \n[GOAL]\ncase h.inr\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CharZero R\nn ν : ℕ\nh : Nat.succ (Nat.pred ν) ≤ n\nh' : ν > 0\n⊢ 0 < eval (n - (ν - 1)) (pochhammer ℕ ν)\n[PROOFSTEP]\nexact pochhammer_pos _ _ (tsub_pos_of_lt (Nat.lt_of_succ_le h))\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nn ν k : ℕ\n⊢ k < n - ν → eval 1 ((↑derivative)^[k] (bernsteinPolynomial R n ν)) = 0\n[PROOFSTEP]\nintro w\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nn ν k : ℕ\nw : k < n - ν\n⊢ eval 1 ((↑derivative)^[k] (bernsteinPolynomial R n ν)) = 0\n[PROOFSTEP]\nrw [flip' _ _ _ (tsub_pos_iff_lt.mp (pos_of_gt w)).le]\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nn ν k : ℕ\nw : k < n - ν\n⊢ eval 1 ((↑derivative)^[k] (comp (bernsteinPolynomial R n (n - ν)) (1 - X))) = 0\n[PROOFSTEP]\nsimp [Polynomial.eval_comp, iterate_derivative_at_0_eq_zero_of_lt R n w]\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nn ν : ℕ\nh : ν ≤ n\n⊢ eval 1 ((↑derivative)^[n - ν] (bernsteinPolynomial R n ν)) = (-1) ^ (n - ν) * eval (↑ν + 1) (pochhammer R (n - ν))\n[PROOFSTEP]\nrw [flip' _ _ _ h]\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nn ν : ℕ\nh : ν ≤ n\n⊢ eval 1 ((↑derivative)^[n - ν] (comp (bernsteinPolynomial R n (n - ν)) (1 - X))) =\n    (-1) ^ (n - ν) * eval (↑ν + 1) (pochhammer R (n - ν))\n[PROOFSTEP]\nsimp [Polynomial.eval_comp, h]\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nn ν : ℕ\nh : ν ≤ n\n⊢ (-1) ^ (n - ν) * eval (↑(n - (n - ν - 1))) (pochhammer R (n - ν)) =\n    (-1) ^ (n - ν) * eval (↑ν + 1) (pochhammer R (n - ν))\n[PROOFSTEP]\nobtain rfl | h' := h.eq_or_lt\n[GOAL]\ncase inl\nR : Type u_1\ninst✝ : CommRing R\nν : ℕ\nh : ν ≤ ν\n⊢ (-1) ^ (ν - ν) * eval (↑(ν - (ν - ν - 1))) (pochhammer R (ν - ν)) =\n    (-1) ^ (ν - ν) * eval (↑ν + 1) (pochhammer R (ν - ν))\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\nR : Type u_1\ninst✝ : CommRing R\nn ν : ℕ\nh : ν ≤ n\nh' : ν < n\n⊢ (-1) ^ (n - ν) * eval (↑(n - (n - ν - 1))) (pochhammer R (n - ν)) =\n    (-1) ^ (n - ν) * eval (↑ν + 1) (pochhammer R (n - ν))\n[PROOFSTEP]\ncongr\n[GOAL]\ncase inr.e_a.e_a\nR : Type u_1\ninst✝ : CommRing R\nn ν : ℕ\nh : ν ≤ n\nh' : ν < n\n⊢ ↑(n - (n - ν - 1)) = ↑ν + 1\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase inr.e_a.e_a\nR : Type u_1\ninst✝ : CommRing R\nn ν : ℕ\nh : ν ≤ n\nh' : ν < n\n⊢ ↑(n - (n - ν - 1)) = ↑(ν + 1)\n[PROOFSTEP]\nrw [← tsub_add_eq_tsub_tsub, tsub_tsub_cancel_of_le (Nat.succ_le_iff.mpr h')]\n[GOAL]\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CharZero R\nn ν : ℕ\nh : ν ≤ n\n⊢ eval 1 ((↑derivative)^[n - ν] (bernsteinPolynomial R n ν)) ≠ 0\n[PROOFSTEP]\nrw [bernsteinPolynomial.iterate_derivative_at_1 _ _ _ h, Ne.def, neg_one_pow_mul_eq_zero_iff, ← Nat.cast_succ, ←\n  pochhammer_eval_cast, ← Nat.cast_zero, Nat.cast_inj]\n[GOAL]\nR : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CharZero R\nn ν : ℕ\nh : ν ≤ n\n⊢ ¬eval (Nat.succ ν) (pochhammer ℕ (n - ν)) = 0\n[PROOFSTEP]\nexact (pochhammer_pos _ _ (Nat.succ_pos ν)).ne'\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nn k : ℕ\nh : k ≤ n + 1\n⊢ LinearIndependent ℚ fun ν => bernsteinPolynomial ℚ n ↑ν\n[PROOFSTEP]\ninduction' k with k ih\n[GOAL]\ncase zero\nR : Type u_1\ninst✝ : CommRing R\nn k : ℕ\nh✝ : k ≤ n + 1\nh : Nat.zero ≤ n + 1\n⊢ LinearIndependent ℚ fun ν => bernsteinPolynomial ℚ n ↑ν\n[PROOFSTEP]\nsimp [Nat.zero_eq]\n[GOAL]\ncase zero\nR : Type u_1\ninst✝ : CommRing R\nn k : ℕ\nh✝ : k ≤ n + 1\nh : Nat.zero ≤ n + 1\n⊢ LinearIndependent ℚ fun ν => bernsteinPolynomial ℚ n ↑ν\n[PROOFSTEP]\napply linearIndependent_empty_type\n[GOAL]\ncase succ\nR : Type u_1\ninst✝ : CommRing R\nn k✝ : ℕ\nh✝ : k✝ ≤ n + 1\nk : ℕ\nih : k ≤ n + 1 → LinearIndependent ℚ fun ν => bernsteinPolynomial ℚ n ↑ν\nh : Nat.succ k ≤ n + 1\n⊢ LinearIndependent ℚ fun ν => bernsteinPolynomial ℚ n ↑ν\n[PROOFSTEP]\napply linearIndependent_fin_succ'.mpr\n[GOAL]\ncase succ\nR : Type u_1\ninst✝ : CommRing R\nn k✝ : ℕ\nh✝ : k✝ ≤ n + 1\nk : ℕ\nih : k ≤ n + 1 → LinearIndependent ℚ fun ν => bernsteinPolynomial ℚ n ↑ν\nh : Nat.succ k ≤ n + 1\n⊢ LinearIndependent ℚ (Fin.init fun ν => bernsteinPolynomial ℚ n ↑ν) ∧\n    ¬bernsteinPolynomial ℚ n ↑(Fin.last k) ∈ span ℚ (Set.range (Fin.init fun ν => bernsteinPolynomial ℚ n ↑ν))\n[PROOFSTEP]\nfconstructor\n[GOAL]\ncase succ.left\nR : Type u_1\ninst✝ : CommRing R\nn k✝ : ℕ\nh✝ : k✝ ≤ n + 1\nk : ℕ\nih : k ≤ n + 1 → LinearIndependent ℚ fun ν => bernsteinPolynomial ℚ n ↑ν\nh : Nat.succ k ≤ n + 1\n⊢ LinearIndependent ℚ (Fin.init fun ν => bernsteinPolynomial ℚ n ↑ν)\n[PROOFSTEP]\nexact ih (le_of_lt h)\n[GOAL]\ncase succ.right\nR : Type u_1\ninst✝ : CommRing R\nn k✝ : ℕ\nh✝ : k✝ ≤ n + 1\nk : ℕ\nih : k ≤ n + 1 → LinearIndependent ℚ fun ν => bernsteinPolynomial ℚ n ↑ν\nh : Nat.succ k ≤ n + 1\n⊢ ¬bernsteinPolynomial ℚ n ↑(Fin.last k) ∈ span ℚ (Set.range (Fin.init fun ν => bernsteinPolynomial ℚ n ↑ν))\n[PROOFSTEP]\nclear ih\n[GOAL]\ncase succ.right\nR : Type u_1\ninst✝ : CommRing R\nn k✝ : ℕ\nh✝ : k✝ ≤ n + 1\nk : ℕ\nh : Nat.succ k ≤ n + 1\n⊢ ¬bernsteinPolynomial ℚ n ↑(Fin.last k) ∈ span ℚ (Set.range (Fin.init fun ν => bernsteinPolynomial ℚ n ↑ν))\n[PROOFSTEP]\nsimp only [Nat.succ_eq_add_one, add_le_add_iff_right] at h \n[GOAL]\ncase succ.right\nR : Type u_1\ninst✝ : CommRing R\nn k✝ : ℕ\nh✝ : k✝ ≤ n + 1\nk : ℕ\nh : k ≤ n\n⊢ ¬bernsteinPolynomial ℚ n ↑(Fin.last k) ∈ span ℚ (Set.range (Fin.init fun ν => bernsteinPolynomial ℚ n ↑ν))\n[PROOFSTEP]\nsimp only [Fin.val_last, Fin.init_def]\n[GOAL]\ncase succ.right\nR : Type u_1\ninst✝ : CommRing R\nn k✝ : ℕ\nh✝ : k✝ ≤ n + 1\nk : ℕ\nh : k ≤ n\n⊢ ¬bernsteinPolynomial ℚ n k ∈ span ℚ (Set.range fun k_1 => bernsteinPolynomial ℚ n ↑(Fin.castSucc k_1))\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase succ.right\nR : Type u_1\ninst✝ : CommRing R\nn k✝ : ℕ\nh✝ : k✝ ≤ n + 1\nk : ℕ\nh : k ≤ n\n⊢ ¬bernsteinPolynomial ℚ n k ∈ span ℚ (Set.range fun k_1 => bernsteinPolynomial ℚ n ↑k_1)\n[PROOFSTEP]\napply not_mem_span_of_apply_not_mem_span_image (@Polynomial.derivative ℚ _ ^ (n - k))\n[GOAL]\ncase succ.right\nR : Type u_1\ninst✝ : CommRing R\nn k✝ : ℕ\nh✝ : k✝ ≤ n + 1\nk : ℕ\nh : k ≤ n\n⊢ ¬↑(derivative ^ (n - k)) (bernsteinPolynomial ℚ n k) ∈\n      span ℚ (↑(derivative ^ (n - k)) '' Set.range fun k_1 => bernsteinPolynomial ℚ n ↑k_1)\n[PROOFSTEP]\nsimp only [not_exists, not_and, Submodule.mem_map, Submodule.span_image]\n[GOAL]\ncase succ.right\nR : Type u_1\ninst✝ : CommRing R\nn k✝ : ℕ\nh✝ : k✝ ≤ n + 1\nk : ℕ\nh : k ≤ n\n⊢ ∀ (x : ℚ[X]),\n    x ∈ span ℚ (Set.range fun k_1 => bernsteinPolynomial ℚ n ↑k_1) →\n      ¬↑(derivative ^ (n - k)) x = ↑(derivative ^ (n - k)) (bernsteinPolynomial ℚ n k)\n[PROOFSTEP]\nintro p m\n[GOAL]\ncase succ.right\nR : Type u_1\ninst✝ : CommRing R\nn k✝ : ℕ\nh✝ : k✝ ≤ n + 1\nk : ℕ\nh : k ≤ n\np : ℚ[X]\nm : p ∈ span ℚ (Set.range fun k_1 => bernsteinPolynomial ℚ n ↑k_1)\n⊢ ¬↑(derivative ^ (n - k)) p = ↑(derivative ^ (n - k)) (bernsteinPolynomial ℚ n k)\n[PROOFSTEP]\napply_fun Polynomial.eval (1 : ℚ)\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nn k✝ : ℕ\nh✝ : k✝ ≤ n + 1\nk : ℕ\nh : k ≤ n\np : ℚ[X]\nm : p ∈ span ℚ (Set.range fun k_1 => bernsteinPolynomial ℚ n ↑k_1)\n⊢ eval 1 (↑(derivative ^ (n - k)) p) ≠ eval 1 (↑(derivative ^ (n - k)) (bernsteinPolynomial ℚ n k))\n[PROOFSTEP]\nsimp only [LinearMap.pow_apply]\n  -- The right hand side is nonzero,\n        -- so it will suffice to show the left hand side is always zero.\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nn k✝ : ℕ\nh✝ : k✝ ≤ n + 1\nk : ℕ\nh : k ≤ n\np : ℚ[X]\nm : p ∈ span ℚ (Set.range fun k_1 => bernsteinPolynomial ℚ n ↑k_1)\n⊢ eval 1 ((↑derivative)^[n - k] p) ≠ eval 1 ((↑derivative)^[n - k] (bernsteinPolynomial ℚ n k))\n[PROOFSTEP]\nsuffices (Polynomial.derivative^[n - k] p).eval 1 = 0 by\n  rw [this]\n  exact (iterate_derivative_at_1_ne_zero ℚ n k h).symm\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nn k✝ : ℕ\nh✝ : k✝ ≤ n + 1\nk : ℕ\nh : k ≤ n\np : ℚ[X]\nm : p ∈ span ℚ (Set.range fun k_1 => bernsteinPolynomial ℚ n ↑k_1)\nthis : eval 1 ((↑derivative)^[n - k] p) = 0\n⊢ eval 1 ((↑derivative)^[n - k] p) ≠ eval 1 ((↑derivative)^[n - k] (bernsteinPolynomial ℚ n k))\n[PROOFSTEP]\nrw [this]\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nn k✝ : ℕ\nh✝ : k✝ ≤ n + 1\nk : ℕ\nh : k ≤ n\np : ℚ[X]\nm : p ∈ span ℚ (Set.range fun k_1 => bernsteinPolynomial ℚ n ↑k_1)\nthis : eval 1 ((↑derivative)^[n - k] p) = 0\n⊢ 0 ≠ eval 1 ((↑derivative)^[n - k] (bernsteinPolynomial ℚ n k))\n[PROOFSTEP]\nexact (iterate_derivative_at_1_ne_zero ℚ n k h).symm\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nn k✝ : ℕ\nh✝ : k✝ ≤ n + 1\nk : ℕ\nh : k ≤ n\np : ℚ[X]\nm : p ∈ span ℚ (Set.range fun k_1 => bernsteinPolynomial ℚ n ↑k_1)\n⊢ eval 1 ((↑derivative)^[n - k] p) = 0\n[PROOFSTEP]\nrefine span_induction m ?_ ?_ ?_ ?_\n[GOAL]\ncase refine_1\nR : Type u_1\ninst✝ : CommRing R\nn k✝ : ℕ\nh✝ : k✝ ≤ n + 1\nk : ℕ\nh : k ≤ n\np : ℚ[X]\nm : p ∈ span ℚ (Set.range fun k_1 => bernsteinPolynomial ℚ n ↑k_1)\n⊢ ∀ (x : ℚ[X]), (x ∈ Set.range fun k_1 => bernsteinPolynomial ℚ n ↑k_1) → eval 1 ((↑derivative)^[n - k] x) = 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase refine_1\nR : Type u_1\ninst✝ : CommRing R\nn k✝ : ℕ\nh✝ : k✝ ≤ n + 1\nk : ℕ\nh : k ≤ n\np : ℚ[X]\nm : p ∈ span ℚ (Set.range fun k_1 => bernsteinPolynomial ℚ n ↑k_1)\n⊢ ∀ (a : Fin k), eval 1 ((↑derivative)^[n - k] (bernsteinPolynomial ℚ n ↑a)) = 0\n[PROOFSTEP]\nrintro ⟨a, w⟩\n[GOAL]\ncase refine_1.mk\nR : Type u_1\ninst✝ : CommRing R\nn k✝ : ℕ\nh✝ : k✝ ≤ n + 1\nk : ℕ\nh : k ≤ n\np : ℚ[X]\nm : p ∈ span ℚ (Set.range fun k_1 => bernsteinPolynomial ℚ n ↑k_1)\na : ℕ\nw : a < k\n⊢ eval 1 ((↑derivative)^[n - k] (bernsteinPolynomial ℚ n ↑{ val := a, isLt := w })) = 0\n[PROOFSTEP]\nsimp only [Fin.val_mk]\n[GOAL]\ncase refine_1.mk\nR : Type u_1\ninst✝ : CommRing R\nn k✝ : ℕ\nh✝ : k✝ ≤ n + 1\nk : ℕ\nh : k ≤ n\np : ℚ[X]\nm : p ∈ span ℚ (Set.range fun k_1 => bernsteinPolynomial ℚ n ↑k_1)\na : ℕ\nw : a < k\n⊢ eval 1 ((↑derivative)^[n - k] (bernsteinPolynomial ℚ n a)) = 0\n[PROOFSTEP]\nrw [iterate_derivative_at_1_eq_zero_of_lt ℚ n ((tsub_lt_tsub_iff_left_of_le h).mpr w)]\n[GOAL]\ncase refine_2\nR : Type u_1\ninst✝ : CommRing R\nn k✝ : ℕ\nh✝ : k✝ ≤ n + 1\nk : ℕ\nh : k ≤ n\np : ℚ[X]\nm : p ∈ span ℚ (Set.range fun k_1 => bernsteinPolynomial ℚ n ↑k_1)\n⊢ eval 1 ((↑derivative)^[n - k] 0) = 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase refine_3\nR : Type u_1\ninst✝ : CommRing R\nn k✝ : ℕ\nh✝ : k✝ ≤ n + 1\nk : ℕ\nh : k ≤ n\np : ℚ[X]\nm : p ∈ span ℚ (Set.range fun k_1 => bernsteinPolynomial ℚ n ↑k_1)\n⊢ ∀ (x y : ℚ[X]),\n    eval 1 ((↑derivative)^[n - k] x) = 0 →\n      eval 1 ((↑derivative)^[n - k] y) = 0 → eval 1 ((↑derivative)^[n - k] (x + y)) = 0\n[PROOFSTEP]\nintro x y hx hy\n[GOAL]\ncase refine_3\nR : Type u_1\ninst✝ : CommRing R\nn k✝ : ℕ\nh✝ : k✝ ≤ n + 1\nk : ℕ\nh : k ≤ n\np : ℚ[X]\nm : p ∈ span ℚ (Set.range fun k_1 => bernsteinPolynomial ℚ n ↑k_1)\nx y : ℚ[X]\nhx : eval 1 ((↑derivative)^[n - k] x) = 0\nhy : eval 1 ((↑derivative)^[n - k] y) = 0\n⊢ eval 1 ((↑derivative)^[n - k] (x + y)) = 0\n[PROOFSTEP]\nsimp [hx, hy]\n[GOAL]\ncase refine_4\nR : Type u_1\ninst✝ : CommRing R\nn k✝ : ℕ\nh✝ : k✝ ≤ n + 1\nk : ℕ\nh : k ≤ n\np : ℚ[X]\nm : p ∈ span ℚ (Set.range fun k_1 => bernsteinPolynomial ℚ n ↑k_1)\n⊢ ∀ (a : ℚ) (x : ℚ[X]), eval 1 ((↑derivative)^[n - k] x) = 0 → eval 1 ((↑derivative)^[n - k] (a • x)) = 0\n[PROOFSTEP]\nintro a x h\n[GOAL]\ncase refine_4\nR : Type u_1\ninst✝ : CommRing R\nn k✝ : ℕ\nh✝¹ : k✝ ≤ n + 1\nk : ℕ\nh✝ : k ≤ n\np : ℚ[X]\nm : p ∈ span ℚ (Set.range fun k_1 => bernsteinPolynomial ℚ n ↑k_1)\na : ℚ\nx : ℚ[X]\nh : eval 1 ((↑derivative)^[n - k] x) = 0\n⊢ eval 1 ((↑derivative)^[n - k] (a • x)) = 0\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nn : ℕ\n⊢ ∑ ν in Finset.range (n + 1), bernsteinPolynomial R n ν = (X + (1 - X)) ^ n\n[PROOFSTEP]\nrw [add_pow]\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nn : ℕ\n⊢ ∑ ν in Finset.range (n + 1), bernsteinPolynomial R n ν =\n    ∑ m in Finset.range (n + 1), X ^ m * (1 - X) ^ (n - m) * ↑(choose n m)\n[PROOFSTEP]\nsimp only [bernsteinPolynomial, mul_comm, mul_assoc, mul_left_comm]\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nn : ℕ\n⊢ (X + (1 - X)) ^ n = 1\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nn : ℕ\n⊢ ∑ ν in Finset.range (n + 1), ν • bernsteinPolynomial R n ν = n • X\n[PROOFSTEP]\nlet x : MvPolynomial Bool R := MvPolynomial.X true\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nn : ℕ\nx : MvPolynomial Bool R := MvPolynomial.X true\n⊢ ∑ ν in Finset.range (n + 1), ν • bernsteinPolynomial R n ν = n • X\n[PROOFSTEP]\nlet y : MvPolynomial Bool R := MvPolynomial.X false\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nn : ℕ\nx : MvPolynomial Bool R := MvPolynomial.X true\ny : MvPolynomial Bool R := MvPolynomial.X false\n⊢ ∑ ν in Finset.range (n + 1), ν • bernsteinPolynomial R n ν = n • X\n[PROOFSTEP]\nhave pderiv_true_x : pderiv true x = 1 := by rw [pderiv_X]; rfl\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nn : ℕ\nx : MvPolynomial Bool R := MvPolynomial.X true\ny : MvPolynomial Bool R := MvPolynomial.X false\n⊢ ↑(pderiv true) x = 1\n[PROOFSTEP]\nrw [pderiv_X]\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nn : ℕ\nx : MvPolynomial Bool R := MvPolynomial.X true\ny : MvPolynomial Bool R := MvPolynomial.X false\n⊢ Pi.single true 1 true = 1\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nn : ℕ\nx : MvPolynomial Bool R := MvPolynomial.X true\ny : MvPolynomial Bool R := MvPolynomial.X false\npderiv_true_x : ↑(pderiv true) x = 1\n⊢ ∑ ν in Finset.range (n + 1), ν • bernsteinPolynomial R n ν = n • X\n[PROOFSTEP]\nhave pderiv_true_y : pderiv true y = 0 := by rw [pderiv_X]; rfl\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nn : ℕ\nx : MvPolynomial Bool R := MvPolynomial.X true\ny : MvPolynomial Bool R := MvPolynomial.X false\npderiv_true_x : ↑(pderiv true) x = 1\n⊢ ↑(pderiv true) y = 0\n[PROOFSTEP]\nrw [pderiv_X]\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nn : ℕ\nx : MvPolynomial Bool R := MvPolynomial.X true\ny : MvPolynomial Bool R := MvPolynomial.X false\npderiv_true_x : ↑(pderiv true) x = 1\n⊢ Pi.single true 1 false = 0\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nn : ℕ\nx : MvPolynomial Bool R := MvPolynomial.X true\ny : MvPolynomial Bool R := MvPolynomial.X false\npderiv_true_x : ↑(pderiv true) x = 1\npderiv_true_y : ↑(pderiv true) y = 0\n⊢ ∑ ν in Finset.range (n + 1), ν • bernsteinPolynomial R n ν = n • X\n[PROOFSTEP]\nlet e : Bool → R[X] := fun i =>\n  cond i X\n    (1 - X)\n      -- Start with `(x+y)^n = (x+y)^n`,\n        -- take the `x`-derivative, evaluate at `x=X, y=1-X`, and multiply by `X`:\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nn : ℕ\nx : MvPolynomial Bool R := MvPolynomial.X true\ny : MvPolynomial Bool R := MvPolynomial.X false\npderiv_true_x : ↑(pderiv true) x = 1\npderiv_true_y : ↑(pderiv true) y = 0\ne : Bool → R[X] := fun i => bif i then X else 1 - X\n⊢ ∑ ν in Finset.range (n + 1), ν • bernsteinPolynomial R n ν = n • X\n[PROOFSTEP]\ntrans MvPolynomial.aeval e (pderiv true ((x + y) ^ n)) * X\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nn : ℕ\nx : MvPolynomial Bool R := MvPolynomial.X true\ny : MvPolynomial Bool R := MvPolynomial.X false\npderiv_true_x : ↑(pderiv true) x = 1\npderiv_true_y : ↑(pderiv true) y = 0\ne : Bool → R[X] := fun i => bif i then X else 1 - X\n⊢ ∑ ν in Finset.range (n + 1), ν • bernsteinPolynomial R n ν =\n    ↑(MvPolynomial.aeval e) (↑(pderiv true) ((x + y) ^ n)) * X\n[PROOFSTEP]\nhave w :\n  ∀ k : ℕ,\n    k • bernsteinPolynomial R n k =\n      (k : R[X]) * Polynomial.X ^ (k - 1) * (1 - Polynomial.X) ^ (n - k) * (n.choose k : R[X]) * Polynomial.X :=\n  by\n  rintro (_ | k)\n  · simp\n  · rw [bernsteinPolynomial]\n    simp only [← nat_cast_mul, Nat.succ_eq_add_one, Nat.add_succ_sub_one, add_zero, pow_succ]\n    push_cast\n    ring\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nn : ℕ\nx : MvPolynomial Bool R := MvPolynomial.X true\ny : MvPolynomial Bool R := MvPolynomial.X false\npderiv_true_x : ↑(pderiv true) x = 1\npderiv_true_y : ↑(pderiv true) y = 0\ne : Bool → R[X] := fun i => bif i then X else 1 - X\n⊢ ∀ (k : ℕ), k • bernsteinPolynomial R n k = ↑k * X ^ (k - 1) * (1 - X) ^ (n - k) * ↑(choose n k) * X\n[PROOFSTEP]\nrintro (_ | k)\n[GOAL]\ncase zero\nR : Type u_1\ninst✝ : CommRing R\nn : ℕ\nx : MvPolynomial Bool R := MvPolynomial.X true\ny : MvPolynomial Bool R := MvPolynomial.X false\npderiv_true_x : ↑(pderiv true) x = 1\npderiv_true_y : ↑(pderiv true) y = 0\ne : Bool → R[X] := fun i => bif i then X else 1 - X\n⊢ Nat.zero • bernsteinPolynomial R n Nat.zero =\n    ↑Nat.zero * X ^ (Nat.zero - 1) * (1 - X) ^ (n - Nat.zero) * ↑(choose n Nat.zero) * X\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\nR : Type u_1\ninst✝ : CommRing R\nn : ℕ\nx : MvPolynomial Bool R := MvPolynomial.X true\ny : MvPolynomial Bool R := MvPolynomial.X false\npderiv_true_x : ↑(pderiv true) x = 1\npderiv_true_y : ↑(pderiv true) y = 0\ne : Bool → R[X] := fun i => bif i then X else 1 - X\nk : ℕ\n⊢ Nat.succ k • bernsteinPolynomial R n (Nat.succ k) =\n    ↑(Nat.succ k) * X ^ (Nat.succ k - 1) * (1 - X) ^ (n - Nat.succ k) * ↑(choose n (Nat.succ k)) * X\n[PROOFSTEP]\nrw [bernsteinPolynomial]\n[GOAL]\ncase succ\nR : Type u_1\ninst✝ : CommRing R\nn : ℕ\nx : MvPolynomial Bool R := MvPolynomial.X true\ny : MvPolynomial Bool R := MvPolynomial.X false\npderiv_true_x : ↑(pderiv true) x = 1\npderiv_true_y : ↑(pderiv true) y = 0\ne : Bool → R[X] := fun i => bif i then X else 1 - X\nk : ℕ\n⊢ Nat.succ k • (↑(choose n (Nat.succ k)) * X ^ Nat.succ k * (1 - X) ^ (n - Nat.succ k)) =\n    ↑(Nat.succ k) * X ^ (Nat.succ k - 1) * (1 - X) ^ (n - Nat.succ k) * ↑(choose n (Nat.succ k)) * X\n[PROOFSTEP]\nsimp only [← nat_cast_mul, Nat.succ_eq_add_one, Nat.add_succ_sub_one, add_zero, pow_succ]\n[GOAL]\ncase succ\nR : Type u_1\ninst✝ : CommRing R\nn : ℕ\nx : MvPolynomial Bool R := MvPolynomial.X true\ny : MvPolynomial Bool R := MvPolynomial.X false\npderiv_true_x : ↑(pderiv true) x = 1\npderiv_true_y : ↑(pderiv true) y = 0\ne : Bool → R[X] := fun i => bif i then X else 1 - X\nk : ℕ\n⊢ ↑(k + 1) * (↑(choose n (k + 1)) * (X * X ^ k) * (1 - X) ^ (n - (k + 1))) =\n    ↑(k + 1) * X ^ k * (1 - X) ^ (n - (k + 1)) * ↑(choose n (k + 1)) * X\n[PROOFSTEP]\npush_cast\n[GOAL]\ncase succ\nR : Type u_1\ninst✝ : CommRing R\nn : ℕ\nx : MvPolynomial Bool R := MvPolynomial.X true\ny : MvPolynomial Bool R := MvPolynomial.X false\npderiv_true_x : ↑(pderiv true) x = 1\npderiv_true_y : ↑(pderiv true) y = 0\ne : Bool → R[X] := fun i => bif i then X else 1 - X\nk : ℕ\n⊢ (↑k + 1) * (↑(choose n (k + 1)) * (X * X ^ k) * (1 - X) ^ (n - (k + 1))) =\n    (↑k + 1) * X ^ k * (1 - X) ^ (n - (k + 1)) * ↑(choose n (k + 1)) * X\n[PROOFSTEP]\nring\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nn : ℕ\nx : MvPolynomial Bool R := MvPolynomial.X true\ny : MvPolynomial Bool R := MvPolynomial.X false\npderiv_true_x : ↑(pderiv true) x = 1\npderiv_true_y : ↑(pderiv true) y = 0\ne : Bool → R[X] := fun i => bif i then X else 1 - X\nw : ∀ (k : ℕ), k • bernsteinPolynomial R n k = ↑k * X ^ (k - 1) * (1 - X) ^ (n - k) * ↑(choose n k) * X\n⊢ ∑ ν in Finset.range (n + 1), ν • bernsteinPolynomial R n ν =\n    ↑(MvPolynomial.aeval e) (↑(pderiv true) ((x + y) ^ n)) * X\n[PROOFSTEP]\nrw [add_pow, (pderiv true).map_sum, (MvPolynomial.aeval e).map_sum, Finset.sum_mul]\n  -- Step inside the sum:\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nn : ℕ\nx : MvPolynomial Bool R := MvPolynomial.X true\ny : MvPolynomial Bool R := MvPolynomial.X false\npderiv_true_x : ↑(pderiv true) x = 1\npderiv_true_y : ↑(pderiv true) y = 0\ne : Bool → R[X] := fun i => bif i then X else 1 - X\nw : ∀ (k : ℕ), k • bernsteinPolynomial R n k = ↑k * X ^ (k - 1) * (1 - X) ^ (n - k) * ↑(choose n k) * X\n⊢ ∑ ν in Finset.range (n + 1), ν • bernsteinPolynomial R n ν =\n    ∑ x_1 in Finset.range (n + 1),\n      ↑(MvPolynomial.aeval e) (↑(pderiv true) (x ^ x_1 * y ^ (n - x_1) * ↑(choose n x_1))) * X\n[PROOFSTEP]\nrefine' Finset.sum_congr rfl fun k _ => (w k).trans _\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nn : ℕ\nx : MvPolynomial Bool R := MvPolynomial.X true\ny : MvPolynomial Bool R := MvPolynomial.X false\npderiv_true_x : ↑(pderiv true) x = 1\npderiv_true_y : ↑(pderiv true) y = 0\ne : Bool → R[X] := fun i => bif i then X else 1 - X\nw : ∀ (k : ℕ), k • bernsteinPolynomial R n k = ↑k * X ^ (k - 1) * (1 - X) ^ (n - k) * ↑(choose n k) * X\nk : ℕ\nx✝ : k ∈ Finset.range (n + 1)\n⊢ ↑k * X ^ (k - 1) * (1 - X) ^ (n - k) * ↑(choose n k) * X =\n    ↑(MvPolynomial.aeval e) (↑(pderiv true) (x ^ k * y ^ (n - k) * ↑(choose n k))) * X\n[PROOFSTEP]\nsimp only [pderiv_true_x, pderiv_true_y, Algebra.id.smul_eq_mul, nsmul_eq_mul, Bool.cond_true, Bool.cond_false,\n  add_zero, mul_one, mul_zero, smul_zero, MvPolynomial.aeval_X, MvPolynomial.pderiv_mul, Derivation.leibniz_pow,\n  Derivation.map_coe_nat, map_natCast, map_pow, map_mul]\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nn : ℕ\nx : MvPolynomial Bool R := MvPolynomial.X true\ny : MvPolynomial Bool R := MvPolynomial.X false\npderiv_true_x : ↑(pderiv true) x = 1\npderiv_true_y : ↑(pderiv true) y = 0\ne : Bool → R[X] := fun i => bif i then X else 1 - X\n⊢ ↑(MvPolynomial.aeval e) (↑(pderiv true) ((x + y) ^ n)) * X = n • X\n[PROOFSTEP]\nrw [(pderiv true).leibniz_pow, (pderiv true).map_add, pderiv_true_x, pderiv_true_y]\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nn : ℕ\nx : MvPolynomial Bool R := MvPolynomial.X true\ny : MvPolynomial Bool R := MvPolynomial.X false\npderiv_true_x : ↑(pderiv true) x = 1\npderiv_true_y : ↑(pderiv true) y = 0\ne : Bool → R[X] := fun i => bif i then X else 1 - X\n⊢ ↑(MvPolynomial.aeval e) (n • (x + y) ^ (n - 1) • (1 + 0)) * X = n • X\n[PROOFSTEP]\nsimp only [Algebra.id.smul_eq_mul, nsmul_eq_mul, map_natCast, map_pow, map_add, map_mul, Bool.cond_true,\n  Bool.cond_false, MvPolynomial.aeval_X, add_sub_cancel'_right, one_pow, add_zero, mul_one]\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nn : ℕ\n⊢ ∑ ν in Finset.range (n + 1), (ν * (ν - 1)) • bernsteinPolynomial R n ν = (n * (n - 1)) • X ^ 2\n[PROOFSTEP]\nlet x : MvPolynomial Bool R := MvPolynomial.X true\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nn : ℕ\nx : MvPolynomial Bool R := MvPolynomial.X true\n⊢ ∑ ν in Finset.range (n + 1), (ν * (ν - 1)) • bernsteinPolynomial R n ν = (n * (n - 1)) • X ^ 2\n[PROOFSTEP]\nlet y : MvPolynomial Bool R := MvPolynomial.X false\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nn : ℕ\nx : MvPolynomial Bool R := MvPolynomial.X true\ny : MvPolynomial Bool R := MvPolynomial.X false\n⊢ ∑ ν in Finset.range (n + 1), (ν * (ν - 1)) • bernsteinPolynomial R n ν = (n * (n - 1)) • X ^ 2\n[PROOFSTEP]\nhave pderiv_true_x : pderiv true x = 1 := by rw [pderiv_X]; rfl\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nn : ℕ\nx : MvPolynomial Bool R := MvPolynomial.X true\ny : MvPolynomial Bool R := MvPolynomial.X false\n⊢ ↑(pderiv true) x = 1\n[PROOFSTEP]\nrw [pderiv_X]\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nn : ℕ\nx : MvPolynomial Bool R := MvPolynomial.X true\ny : MvPolynomial Bool R := MvPolynomial.X false\n⊢ Pi.single true 1 true = 1\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nn : ℕ\nx : MvPolynomial Bool R := MvPolynomial.X true\ny : MvPolynomial Bool R := MvPolynomial.X false\npderiv_true_x : ↑(pderiv true) x = 1\n⊢ ∑ ν in Finset.range (n + 1), (ν * (ν - 1)) • bernsteinPolynomial R n ν = (n * (n - 1)) • X ^ 2\n[PROOFSTEP]\nhave pderiv_true_y : pderiv true y = 0 := by rw [pderiv_X]; rfl\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nn : ℕ\nx : MvPolynomial Bool R := MvPolynomial.X true\ny : MvPolynomial Bool R := MvPolynomial.X false\npderiv_true_x : ↑(pderiv true) x = 1\n⊢ ↑(pderiv true) y = 0\n[PROOFSTEP]\nrw [pderiv_X]\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nn : ℕ\nx : MvPolynomial Bool R := MvPolynomial.X true\ny : MvPolynomial Bool R := MvPolynomial.X false\npderiv_true_x : ↑(pderiv true) x = 1\n⊢ Pi.single true 1 false = 0\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nn : ℕ\nx : MvPolynomial Bool R := MvPolynomial.X true\ny : MvPolynomial Bool R := MvPolynomial.X false\npderiv_true_x : ↑(pderiv true) x = 1\npderiv_true_y : ↑(pderiv true) y = 0\n⊢ ∑ ν in Finset.range (n + 1), (ν * (ν - 1)) • bernsteinPolynomial R n ν = (n * (n - 1)) • X ^ 2\n[PROOFSTEP]\nlet e : Bool → R[X] := fun i =>\n  cond i X\n    (1 - X)\n      -- Start with `(x+y)^n = (x+y)^n`,\n        -- take the second `x`-derivative, evaluate at `x=X, y=1-X`, and multiply by `X`:\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nn : ℕ\nx : MvPolynomial Bool R := MvPolynomial.X true\ny : MvPolynomial Bool R := MvPolynomial.X false\npderiv_true_x : ↑(pderiv true) x = 1\npderiv_true_y : ↑(pderiv true) y = 0\ne : Bool → R[X] := fun i => bif i then X else 1 - X\n⊢ ∑ ν in Finset.range (n + 1), (ν * (ν - 1)) • bernsteinPolynomial R n ν = (n * (n - 1)) • X ^ 2\n[PROOFSTEP]\ntrans\n  MvPolynomial.aeval e (pderiv true (pderiv true ((x + y) ^ n))) *\n    X ^\n      2\n        -- On the left hand side we'll use the binomial theorem, then simplify.\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nn : ℕ\nx : MvPolynomial Bool R := MvPolynomial.X true\ny : MvPolynomial Bool R := MvPolynomial.X false\npderiv_true_x : ↑(pderiv true) x = 1\npderiv_true_y : ↑(pderiv true) y = 0\ne : Bool → R[X] := fun i => bif i then X else 1 - X\n⊢ ∑ ν in Finset.range (n + 1), (ν * (ν - 1)) • bernsteinPolynomial R n ν =\n    ↑(MvPolynomial.aeval e) (↑(pderiv true) (↑(pderiv true) ((x + y) ^ n))) * X ^ 2\n[PROOFSTEP]\nhave w :\n  ∀ k : ℕ,\n    (k * (k - 1)) • bernsteinPolynomial R n k =\n      (n.choose k : R[X]) *\n          ((1 - Polynomial.X) ^ (n - k) * ((k : R[X]) * ((↑(k - 1) : R[X]) * Polynomial.X ^ (k - 1 - 1)))) *\n        Polynomial.X ^ 2 :=\n  by\n  rintro (_ | _ | k)\n  · simp\n  · simp\n  · rw [bernsteinPolynomial]\n    simp only [← nat_cast_mul, Nat.succ_eq_add_one, Nat.add_succ_sub_one, add_zero, pow_succ]\n    push_cast\n    ring\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nn : ℕ\nx : MvPolynomial Bool R := MvPolynomial.X true\ny : MvPolynomial Bool R := MvPolynomial.X false\npderiv_true_x : ↑(pderiv true) x = 1\npderiv_true_y : ↑(pderiv true) y = 0\ne : Bool → R[X] := fun i => bif i then X else 1 - X\n⊢ ∀ (k : ℕ),\n    (k * (k - 1)) • bernsteinPolynomial R n k =\n      ↑(choose n k) * ((1 - X) ^ (n - k) * (↑k * (↑(k - 1) * X ^ (k - 1 - 1)))) * X ^ 2\n[PROOFSTEP]\nrintro (_ | _ | k)\n[GOAL]\ncase zero\nR : Type u_1\ninst✝ : CommRing R\nn : ℕ\nx : MvPolynomial Bool R := MvPolynomial.X true\ny : MvPolynomial Bool R := MvPolynomial.X false\npderiv_true_x : ↑(pderiv true) x = 1\npderiv_true_y : ↑(pderiv true) y = 0\ne : Bool → R[X] := fun i => bif i then X else 1 - X\n⊢ (Nat.zero * (Nat.zero - 1)) • bernsteinPolynomial R n Nat.zero =\n    ↑(choose n Nat.zero) * ((1 - X) ^ (n - Nat.zero) * (↑Nat.zero * (↑(Nat.zero - 1) * X ^ (Nat.zero - 1 - 1)))) * X ^ 2\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ.zero\nR : Type u_1\ninst✝ : CommRing R\nn : ℕ\nx : MvPolynomial Bool R := MvPolynomial.X true\ny : MvPolynomial Bool R := MvPolynomial.X false\npderiv_true_x : ↑(pderiv true) x = 1\npderiv_true_y : ↑(pderiv true) y = 0\ne : Bool → R[X] := fun i => bif i then X else 1 - X\n⊢ (Nat.succ Nat.zero * (Nat.succ Nat.zero - 1)) • bernsteinPolynomial R n (Nat.succ Nat.zero) =\n    ↑(choose n (Nat.succ Nat.zero)) *\n        ((1 - X) ^ (n - Nat.succ Nat.zero) *\n          (↑(Nat.succ Nat.zero) * (↑(Nat.succ Nat.zero - 1) * X ^ (Nat.succ Nat.zero - 1 - 1)))) *\n      X ^ 2\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ.succ\nR : Type u_1\ninst✝ : CommRing R\nn : ℕ\nx : MvPolynomial Bool R := MvPolynomial.X true\ny : MvPolynomial Bool R := MvPolynomial.X false\npderiv_true_x : ↑(pderiv true) x = 1\npderiv_true_y : ↑(pderiv true) y = 0\ne : Bool → R[X] := fun i => bif i then X else 1 - X\nk : ℕ\n⊢ (Nat.succ (Nat.succ k) * (Nat.succ (Nat.succ k) - 1)) • bernsteinPolynomial R n (Nat.succ (Nat.succ k)) =\n    ↑(choose n (Nat.succ (Nat.succ k))) *\n        ((1 - X) ^ (n - Nat.succ (Nat.succ k)) *\n          (↑(Nat.succ (Nat.succ k)) * (↑(Nat.succ (Nat.succ k) - 1) * X ^ (Nat.succ (Nat.succ k) - 1 - 1)))) *\n      X ^ 2\n[PROOFSTEP]\nrw [bernsteinPolynomial]\n[GOAL]\ncase succ.succ\nR : Type u_1\ninst✝ : CommRing R\nn : ℕ\nx : MvPolynomial Bool R := MvPolynomial.X true\ny : MvPolynomial Bool R := MvPolynomial.X false\npderiv_true_x : ↑(pderiv true) x = 1\npderiv_true_y : ↑(pderiv true) y = 0\ne : Bool → R[X] := fun i => bif i then X else 1 - X\nk : ℕ\n⊢ (Nat.succ (Nat.succ k) * (Nat.succ (Nat.succ k) - 1)) •\n      (↑(choose n (Nat.succ (Nat.succ k))) * X ^ Nat.succ (Nat.succ k) * (1 - X) ^ (n - Nat.succ (Nat.succ k))) =\n    ↑(choose n (Nat.succ (Nat.succ k))) *\n        ((1 - X) ^ (n - Nat.succ (Nat.succ k)) *\n          (↑(Nat.succ (Nat.succ k)) * (↑(Nat.succ (Nat.succ k) - 1) * X ^ (Nat.succ (Nat.succ k) - 1 - 1)))) *\n      X ^ 2\n[PROOFSTEP]\nsimp only [← nat_cast_mul, Nat.succ_eq_add_one, Nat.add_succ_sub_one, add_zero, pow_succ]\n[GOAL]\ncase succ.succ\nR : Type u_1\ninst✝ : CommRing R\nn : ℕ\nx : MvPolynomial Bool R := MvPolynomial.X true\ny : MvPolynomial Bool R := MvPolynomial.X false\npderiv_true_x : ↑(pderiv true) x = 1\npderiv_true_y : ↑(pderiv true) y = 0\ne : Bool → R[X] := fun i => bif i then X else 1 - X\nk : ℕ\n⊢ ↑((k + 1 + 1) * (k + 1)) * (↑(choose n (k + 1 + 1)) * (X * (X * X ^ k)) * (1 - X) ^ (n - (k + 1 + 1))) =\n    ↑(choose n (k + 1 + 1)) * ((1 - X) ^ (n - (k + 1 + 1)) * (↑(k + 1 + 1) * (↑(k + 1) * X ^ k))) * (X * (X * X ^ 0))\n[PROOFSTEP]\npush_cast\n[GOAL]\ncase succ.succ\nR : Type u_1\ninst✝ : CommRing R\nn : ℕ\nx : MvPolynomial Bool R := MvPolynomial.X true\ny : MvPolynomial Bool R := MvPolynomial.X false\npderiv_true_x : ↑(pderiv true) x = 1\npderiv_true_y : ↑(pderiv true) y = 0\ne : Bool → R[X] := fun i => bif i then X else 1 - X\nk : ℕ\n⊢ (↑k + 1 + 1) * (↑k + 1) * (↑(choose n (k + 1 + 1)) * (X * (X * X ^ k)) * (1 - X) ^ (n - (k + 1 + 1))) =\n    ↑(choose n (k + 1 + 1)) * ((1 - X) ^ (n - (k + 1 + 1)) * ((↑k + 1 + 1) * ((↑k + 1) * X ^ k))) * (X * (X * X ^ 0))\n[PROOFSTEP]\nring\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nn : ℕ\nx : MvPolynomial Bool R := MvPolynomial.X true\ny : MvPolynomial Bool R := MvPolynomial.X false\npderiv_true_x : ↑(pderiv true) x = 1\npderiv_true_y : ↑(pderiv true) y = 0\ne : Bool → R[X] := fun i => bif i then X else 1 - X\nw :\n  ∀ (k : ℕ),\n    (k * (k - 1)) • bernsteinPolynomial R n k =\n      ↑(choose n k) * ((1 - X) ^ (n - k) * (↑k * (↑(k - 1) * X ^ (k - 1 - 1)))) * X ^ 2\n⊢ ∑ ν in Finset.range (n + 1), (ν * (ν - 1)) • bernsteinPolynomial R n ν =\n    ↑(MvPolynomial.aeval e) (↑(pderiv true) (↑(pderiv true) ((x + y) ^ n))) * X ^ 2\n[PROOFSTEP]\nrw [add_pow, (pderiv true).map_sum, (pderiv true).map_sum, (MvPolynomial.aeval e).map_sum, Finset.sum_mul]\n  -- Step inside the sum:\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nn : ℕ\nx : MvPolynomial Bool R := MvPolynomial.X true\ny : MvPolynomial Bool R := MvPolynomial.X false\npderiv_true_x : ↑(pderiv true) x = 1\npderiv_true_y : ↑(pderiv true) y = 0\ne : Bool → R[X] := fun i => bif i then X else 1 - X\nw :\n  ∀ (k : ℕ),\n    (k * (k - 1)) • bernsteinPolynomial R n k =\n      ↑(choose n k) * ((1 - X) ^ (n - k) * (↑k * (↑(k - 1) * X ^ (k - 1 - 1)))) * X ^ 2\n⊢ ∑ ν in Finset.range (n + 1), (ν * (ν - 1)) • bernsteinPolynomial R n ν =\n    ∑ x_1 in Finset.range (n + 1),\n      ↑(MvPolynomial.aeval e) (↑(pderiv true) (↑(pderiv true) (x ^ x_1 * y ^ (n - x_1) * ↑(choose n x_1)))) * X ^ 2\n[PROOFSTEP]\nrefine' Finset.sum_congr rfl fun k _ => (w k).trans _\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nn : ℕ\nx : MvPolynomial Bool R := MvPolynomial.X true\ny : MvPolynomial Bool R := MvPolynomial.X false\npderiv_true_x : ↑(pderiv true) x = 1\npderiv_true_y : ↑(pderiv true) y = 0\ne : Bool → R[X] := fun i => bif i then X else 1 - X\nw :\n  ∀ (k : ℕ),\n    (k * (k - 1)) • bernsteinPolynomial R n k =\n      ↑(choose n k) * ((1 - X) ^ (n - k) * (↑k * (↑(k - 1) * X ^ (k - 1 - 1)))) * X ^ 2\nk : ℕ\nx✝ : k ∈ Finset.range (n + 1)\n⊢ ↑(choose n k) * ((1 - X) ^ (n - k) * (↑k * (↑(k - 1) * X ^ (k - 1 - 1)))) * X ^ 2 =\n    ↑(MvPolynomial.aeval e) (↑(pderiv true) (↑(pderiv true) (x ^ k * y ^ (n - k) * ↑(choose n k)))) * X ^ 2\n[PROOFSTEP]\nsimp only [pderiv_true_x, pderiv_true_y, Algebra.id.smul_eq_mul, nsmul_eq_mul, Bool.cond_true, Bool.cond_false,\n  add_zero, zero_add, mul_zero, smul_zero, mul_one, MvPolynomial.aeval_X, MvPolynomial.pderiv_X_self,\n  MvPolynomial.pderiv_X_of_ne, Derivation.leibniz_pow, Derivation.leibniz, Derivation.map_coe_nat, map_natCast, map_pow,\n  map_mul, map_add]\n  -- On the right hand side, we'll just simplify.\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nn : ℕ\nx : MvPolynomial Bool R := MvPolynomial.X true\ny : MvPolynomial Bool R := MvPolynomial.X false\npderiv_true_x : ↑(pderiv true) x = 1\npderiv_true_y : ↑(pderiv true) y = 0\ne : Bool → R[X] := fun i => bif i then X else 1 - X\n⊢ ↑(MvPolynomial.aeval e) (↑(pderiv true) (↑(pderiv true) ((x + y) ^ n))) * X ^ 2 = (n * (n - 1)) • X ^ 2\n[PROOFSTEP]\nsimp only [pderiv_one, pderiv_mul, (pderiv _).leibniz_pow, (pderiv _).map_coe_nat, (pderiv true).map_add, pderiv_true_x,\n  pderiv_true_y, Algebra.id.smul_eq_mul, add_zero, mul_one, Derivation.map_smul_of_tower, map_nsmul, map_pow, map_add,\n  Bool.cond_true, Bool.cond_false, MvPolynomial.aeval_X, add_sub_cancel'_right, one_pow, smul_smul, smul_one_mul]\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nn : ℕ\n⊢ ∑ ν in Finset.range (n + 1), (n • X - ↑ν) ^ 2 * bernsteinPolynomial R n ν = n • X * (1 - X)\n[PROOFSTEP]\nhave p :\n  ((((Finset.range (n + 1)).sum fun ν => (ν * (ν - 1)) • bernsteinPolynomial R n ν) +\n        (1 - (2 * n) • Polynomial.X) * (Finset.range (n + 1)).sum fun ν => ν • bernsteinPolynomial R n ν) +\n      n ^ 2 • X ^ 2 * (Finset.range (n + 1)).sum fun ν => bernsteinPolynomial R n ν) =\n    _ :=\n  rfl\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nn : ℕ\np :\n  ∑ ν in Finset.range (n + 1), (ν * (ν - 1)) • bernsteinPolynomial R n ν +\n        (↑1 - (2 * n) • X) * ∑ ν in Finset.range (n + 1), ν • bernsteinPolynomial R n ν +\n      n ^ 2 • X ^ 2 * ∑ ν in Finset.range (n + 1), bernsteinPolynomial R n ν =\n    ∑ ν in Finset.range (n + 1), (ν * (ν - 1)) • bernsteinPolynomial R n ν +\n        (↑1 - (2 * n) • X) * ∑ ν in Finset.range (n + 1), ν • bernsteinPolynomial R n ν +\n      n ^ 2 • X ^ 2 * ∑ ν in Finset.range (n + 1), bernsteinPolynomial R n ν\n⊢ ∑ ν in Finset.range (n + 1), (n • X - ↑ν) ^ 2 * bernsteinPolynomial R n ν = n • X * (1 - X)\n[PROOFSTEP]\nconv at p =>\n  lhs\n  rw [Finset.mul_sum, Finset.mul_sum, ← Finset.sum_add_distrib, ← Finset.sum_add_distrib]\n  simp only [← nat_cast_mul]\n  simp only [← mul_assoc]\n  simp only [← add_mul]\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nn : ℕ\np :\n  ∑ ν in Finset.range (n + 1), (ν * (ν - 1)) • bernsteinPolynomial R n ν +\n        (↑1 - (2 * n) • X) * ∑ ν in Finset.range (n + 1), ν • bernsteinPolynomial R n ν +\n      n ^ 2 • X ^ 2 * ∑ ν in Finset.range (n + 1), bernsteinPolynomial R n ν =\n    ∑ ν in Finset.range (n + 1), (ν * (ν - 1)) • bernsteinPolynomial R n ν +\n        (↑1 - (2 * n) • X) * ∑ ν in Finset.range (n + 1), ν • bernsteinPolynomial R n ν +\n      n ^ 2 • X ^ 2 * ∑ ν in Finset.range (n + 1), bernsteinPolynomial R n ν\n| ∑ ν in Finset.range (n + 1), (ν * (ν - 1)) • bernsteinPolynomial R n ν +\n        (↑1 - (2 * n) • X) * ∑ ν in Finset.range (n + 1), ν • bernsteinPolynomial R n ν +\n      n ^ 2 • X ^ 2 * ∑ ν in Finset.range (n + 1), bernsteinPolynomial R n ν =\n    ∑ ν in Finset.range (n + 1), (ν * (ν - 1)) • bernsteinPolynomial R n ν +\n        (↑1 - (2 * n) • X) * ∑ ν in Finset.range (n + 1), ν • bernsteinPolynomial R n ν +\n      n ^ 2 • X ^ 2 * ∑ ν in Finset.range (n + 1), bernsteinPolynomial R n ν\n[PROOFSTEP]\n  lhs\n  rw [Finset.mul_sum, Finset.mul_sum, ← Finset.sum_add_distrib, ← Finset.sum_add_distrib]\n  simp only [← nat_cast_mul]\n  simp only [← mul_assoc]\n  simp only [← add_mul]\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nn : ℕ\np :\n  ∑ ν in Finset.range (n + 1), (ν * (ν - 1)) • bernsteinPolynomial R n ν +\n        (↑1 - (2 * n) • X) * ∑ ν in Finset.range (n + 1), ν • bernsteinPolynomial R n ν +\n      n ^ 2 • X ^ 2 * ∑ ν in Finset.range (n + 1), bernsteinPolynomial R n ν =\n    ∑ ν in Finset.range (n + 1), (ν * (ν - 1)) • bernsteinPolynomial R n ν +\n        (↑1 - (2 * n) • X) * ∑ ν in Finset.range (n + 1), ν • bernsteinPolynomial R n ν +\n      n ^ 2 • X ^ 2 * ∑ ν in Finset.range (n + 1), bernsteinPolynomial R n ν\n| ∑ ν in Finset.range (n + 1), (ν * (ν - 1)) • bernsteinPolynomial R n ν +\n        (↑1 - (2 * n) • X) * ∑ ν in Finset.range (n + 1), ν • bernsteinPolynomial R n ν +\n      n ^ 2 • X ^ 2 * ∑ ν in Finset.range (n + 1), bernsteinPolynomial R n ν =\n    ∑ ν in Finset.range (n + 1), (ν * (ν - 1)) • bernsteinPolynomial R n ν +\n        (↑1 - (2 * n) • X) * ∑ ν in Finset.range (n + 1), ν • bernsteinPolynomial R n ν +\n      n ^ 2 • X ^ 2 * ∑ ν in Finset.range (n + 1), bernsteinPolynomial R n ν\n[PROOFSTEP]\n  lhs\n  rw [Finset.mul_sum, Finset.mul_sum, ← Finset.sum_add_distrib, ← Finset.sum_add_distrib]\n  simp only [← nat_cast_mul]\n  simp only [← mul_assoc]\n  simp only [← add_mul]\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nn : ℕ\np :\n  ∑ ν in Finset.range (n + 1), (ν * (ν - 1)) • bernsteinPolynomial R n ν +\n        (↑1 - (2 * n) • X) * ∑ ν in Finset.range (n + 1), ν • bernsteinPolynomial R n ν +\n      n ^ 2 • X ^ 2 * ∑ ν in Finset.range (n + 1), bernsteinPolynomial R n ν =\n    ∑ ν in Finset.range (n + 1), (ν * (ν - 1)) • bernsteinPolynomial R n ν +\n        (↑1 - (2 * n) • X) * ∑ ν in Finset.range (n + 1), ν • bernsteinPolynomial R n ν +\n      n ^ 2 • X ^ 2 * ∑ ν in Finset.range (n + 1), bernsteinPolynomial R n ν\n| ∑ ν in Finset.range (n + 1), (ν * (ν - 1)) • bernsteinPolynomial R n ν +\n        (↑1 - (2 * n) • X) * ∑ ν in Finset.range (n + 1), ν • bernsteinPolynomial R n ν +\n      n ^ 2 • X ^ 2 * ∑ ν in Finset.range (n + 1), bernsteinPolynomial R n ν =\n    ∑ ν in Finset.range (n + 1), (ν * (ν - 1)) • bernsteinPolynomial R n ν +\n        (↑1 - (2 * n) • X) * ∑ ν in Finset.range (n + 1), ν • bernsteinPolynomial R n ν +\n      n ^ 2 • X ^ 2 * ∑ ν in Finset.range (n + 1), bernsteinPolynomial R n ν\n[PROOFSTEP]\nlhs\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nn : ℕ\np :\n  ∑ ν in Finset.range (n + 1), (ν * (ν - 1)) • bernsteinPolynomial R n ν +\n        (↑1 - (2 * n) • X) * ∑ ν in Finset.range (n + 1), ν • bernsteinPolynomial R n ν +\n      n ^ 2 • X ^ 2 * ∑ ν in Finset.range (n + 1), bernsteinPolynomial R n ν =\n    ∑ ν in Finset.range (n + 1), (ν * (ν - 1)) • bernsteinPolynomial R n ν +\n        (↑1 - (2 * n) • X) * ∑ ν in Finset.range (n + 1), ν • bernsteinPolynomial R n ν +\n      n ^ 2 • X ^ 2 * ∑ ν in Finset.range (n + 1), bernsteinPolynomial R n ν\n| ∑ ν in Finset.range (n + 1), (ν * (ν - 1)) • bernsteinPolynomial R n ν +\n      (↑1 - (2 * n) • X) * ∑ ν in Finset.range (n + 1), ν • bernsteinPolynomial R n ν +\n    n ^ 2 • X ^ 2 * ∑ ν in Finset.range (n + 1), bernsteinPolynomial R n ν\n[PROOFSTEP]\nrw [Finset.mul_sum, Finset.mul_sum, ← Finset.sum_add_distrib, ← Finset.sum_add_distrib]\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nn : ℕ\np :\n  ∑ ν in Finset.range (n + 1), (ν * (ν - 1)) • bernsteinPolynomial R n ν +\n        (↑1 - (2 * n) • X) * ∑ ν in Finset.range (n + 1), ν • bernsteinPolynomial R n ν +\n      n ^ 2 • X ^ 2 * ∑ ν in Finset.range (n + 1), bernsteinPolynomial R n ν =\n    ∑ ν in Finset.range (n + 1), (ν * (ν - 1)) • bernsteinPolynomial R n ν +\n        (↑1 - (2 * n) • X) * ∑ ν in Finset.range (n + 1), ν • bernsteinPolynomial R n ν +\n      n ^ 2 • X ^ 2 * ∑ ν in Finset.range (n + 1), bernsteinPolynomial R n ν\n| ∑ x in Finset.range (n + 1),\n    ((x * (x - 1)) • bernsteinPolynomial R n x + (↑1 - (2 * n) • X) * x • bernsteinPolynomial R n x +\n      n ^ 2 • X ^ 2 * bernsteinPolynomial R n x)\n[PROOFSTEP]\nsimp only [← nat_cast_mul]\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nn : ℕ\np :\n  ∑ ν in Finset.range (n + 1), (ν * (ν - 1)) • bernsteinPolynomial R n ν +\n        (↑1 - (2 * n) • X) * ∑ ν in Finset.range (n + 1), ν • bernsteinPolynomial R n ν +\n      n ^ 2 • X ^ 2 * ∑ ν in Finset.range (n + 1), bernsteinPolynomial R n ν =\n    ∑ ν in Finset.range (n + 1), (ν * (ν - 1)) • bernsteinPolynomial R n ν +\n        (↑1 - (2 * n) • X) * ∑ ν in Finset.range (n + 1), ν • bernsteinPolynomial R n ν +\n      n ^ 2 • X ^ 2 * ∑ ν in Finset.range (n + 1), bernsteinPolynomial R n ν\n| ∑ x in Finset.range (n + 1),\n    (↑(x * (x - 1)) * bernsteinPolynomial R n x + (↑1 - ↑(2 * n) * X) * (↑x * bernsteinPolynomial R n x) +\n      ↑(n ^ 2) * X ^ 2 * bernsteinPolynomial R n x)\n[PROOFSTEP]\nsimp only [← mul_assoc]\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nn : ℕ\np :\n  ∑ ν in Finset.range (n + 1), (ν * (ν - 1)) • bernsteinPolynomial R n ν +\n        (↑1 - (2 * n) • X) * ∑ ν in Finset.range (n + 1), ν • bernsteinPolynomial R n ν +\n      n ^ 2 • X ^ 2 * ∑ ν in Finset.range (n + 1), bernsteinPolynomial R n ν =\n    ∑ ν in Finset.range (n + 1), (ν * (ν - 1)) • bernsteinPolynomial R n ν +\n        (↑1 - (2 * n) • X) * ∑ ν in Finset.range (n + 1), ν • bernsteinPolynomial R n ν +\n      n ^ 2 • X ^ 2 * ∑ ν in Finset.range (n + 1), bernsteinPolynomial R n ν\n| ∑ x in Finset.range (n + 1),\n    (↑(x * (x - 1)) * bernsteinPolynomial R n x + (↑1 - ↑(2 * n) * X) * ↑x * bernsteinPolynomial R n x +\n      ↑(n ^ 2) * X ^ 2 * bernsteinPolynomial R n x)\n[PROOFSTEP]\nsimp only [← add_mul]\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nn : ℕ\np :\n  ∑ x in Finset.range (n + 1),\n      (↑(x * (x - 1)) + (↑1 - ↑(2 * n) * X) * ↑x + ↑(n ^ 2) * X ^ 2) * bernsteinPolynomial R n x =\n    ∑ ν in Finset.range (n + 1), (ν * (ν - 1)) • bernsteinPolynomial R n ν +\n        (↑1 - (2 * n) • X) * ∑ ν in Finset.range (n + 1), ν • bernsteinPolynomial R n ν +\n      n ^ 2 • X ^ 2 * ∑ ν in Finset.range (n + 1), bernsteinPolynomial R n ν\n⊢ ∑ ν in Finset.range (n + 1), (n • X - ↑ν) ^ 2 * bernsteinPolynomial R n ν = n • X * (1 - X)\n[PROOFSTEP]\nconv at p =>\n  rhs\n  rw [sum, sum_smul, sum_mul_smul, ← nat_cast_mul]\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nn : ℕ\np :\n  ∑ x in Finset.range (n + 1),\n      (↑(x * (x - 1)) + (↑1 - ↑(2 * n) * X) * ↑x + ↑(n ^ 2) * X ^ 2) * bernsteinPolynomial R n x =\n    ∑ ν in Finset.range (n + 1), (ν * (ν - 1)) • bernsteinPolynomial R n ν +\n        (↑1 - (2 * n) • X) * ∑ ν in Finset.range (n + 1), ν • bernsteinPolynomial R n ν +\n      n ^ 2 • X ^ 2 * ∑ ν in Finset.range (n + 1), bernsteinPolynomial R n ν\n| ∑ x in Finset.range (n + 1),\n      (↑(x * (x - 1)) + (↑1 - ↑(2 * n) * X) * ↑x + ↑(n ^ 2) * X ^ 2) * bernsteinPolynomial R n x =\n    ∑ ν in Finset.range (n + 1), (ν * (ν - 1)) • bernsteinPolynomial R n ν +\n        (↑1 - (2 * n) • X) * ∑ ν in Finset.range (n + 1), ν • bernsteinPolynomial R n ν +\n      n ^ 2 • X ^ 2 * ∑ ν in Finset.range (n + 1), bernsteinPolynomial R n ν\n[PROOFSTEP]\n  rhs\n  rw [sum, sum_smul, sum_mul_smul, ← nat_cast_mul]\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nn : ℕ\np :\n  ∑ x in Finset.range (n + 1),\n      (↑(x * (x - 1)) + (↑1 - ↑(2 * n) * X) * ↑x + ↑(n ^ 2) * X ^ 2) * bernsteinPolynomial R n x =\n    ∑ ν in Finset.range (n + 1), (ν * (ν - 1)) • bernsteinPolynomial R n ν +\n        (↑1 - (2 * n) • X) * ∑ ν in Finset.range (n + 1), ν • bernsteinPolynomial R n ν +\n      n ^ 2 • X ^ 2 * ∑ ν in Finset.range (n + 1), bernsteinPolynomial R n ν\n| ∑ x in Finset.range (n + 1),\n      (↑(x * (x - 1)) + (↑1 - ↑(2 * n) * X) * ↑x + ↑(n ^ 2) * X ^ 2) * bernsteinPolynomial R n x =\n    ∑ ν in Finset.range (n + 1), (ν * (ν - 1)) • bernsteinPolynomial R n ν +\n        (↑1 - (2 * n) • X) * ∑ ν in Finset.range (n + 1), ν • bernsteinPolynomial R n ν +\n      n ^ 2 • X ^ 2 * ∑ ν in Finset.range (n + 1), bernsteinPolynomial R n ν\n[PROOFSTEP]\n  rhs\n  rw [sum, sum_smul, sum_mul_smul, ← nat_cast_mul]\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nn : ℕ\np :\n  ∑ x in Finset.range (n + 1),\n      (↑(x * (x - 1)) + (↑1 - ↑(2 * n) * X) * ↑x + ↑(n ^ 2) * X ^ 2) * bernsteinPolynomial R n x =\n    ∑ ν in Finset.range (n + 1), (ν * (ν - 1)) • bernsteinPolynomial R n ν +\n        (↑1 - (2 * n) • X) * ∑ ν in Finset.range (n + 1), ν • bernsteinPolynomial R n ν +\n      n ^ 2 • X ^ 2 * ∑ ν in Finset.range (n + 1), bernsteinPolynomial R n ν\n| ∑ x in Finset.range (n + 1),\n      (↑(x * (x - 1)) + (↑1 - ↑(2 * n) * X) * ↑x + ↑(n ^ 2) * X ^ 2) * bernsteinPolynomial R n x =\n    ∑ ν in Finset.range (n + 1), (ν * (ν - 1)) • bernsteinPolynomial R n ν +\n        (↑1 - (2 * n) • X) * ∑ ν in Finset.range (n + 1), ν • bernsteinPolynomial R n ν +\n      n ^ 2 • X ^ 2 * ∑ ν in Finset.range (n + 1), bernsteinPolynomial R n ν\n[PROOFSTEP]\nrhs\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nn : ℕ\np :\n  ∑ x in Finset.range (n + 1),\n      (↑(x * (x - 1)) + (↑1 - ↑(2 * n) * X) * ↑x + ↑(n ^ 2) * X ^ 2) * bernsteinPolynomial R n x =\n    ∑ ν in Finset.range (n + 1), (ν * (ν - 1)) • bernsteinPolynomial R n ν +\n        (↑1 - (2 * n) • X) * ∑ ν in Finset.range (n + 1), ν • bernsteinPolynomial R n ν +\n      n ^ 2 • X ^ 2 * ∑ ν in Finset.range (n + 1), bernsteinPolynomial R n ν\n| ∑ ν in Finset.range (n + 1), (ν * (ν - 1)) • bernsteinPolynomial R n ν +\n      (↑1 - (2 * n) • X) * ∑ ν in Finset.range (n + 1), ν • bernsteinPolynomial R n ν +\n    n ^ 2 • X ^ 2 * ∑ ν in Finset.range (n + 1), bernsteinPolynomial R n ν\n[PROOFSTEP]\nrw [sum, sum_smul, sum_mul_smul, ← nat_cast_mul]\n[GOAL]\nR : Type u_1\ninst✝ : CommRing R\nn : ℕ\np :\n  ∑ x in Finset.range (n + 1),\n      (↑(x * (x - 1)) + (↑1 - ↑(2 * n) * X) * ↑x + ↑(n ^ 2) * X ^ 2) * bernsteinPolynomial R n x =\n    ↑(n * (n - 1)) * X ^ 2 + (↑1 - (2 * n) • X) * n • X + n ^ 2 • X ^ 2 * 1\n⊢ ∑ ν in Finset.range (n + 1), (n • X - ↑ν) ^ 2 * bernsteinPolynomial R n ν = n • X * (1 - X)\n[PROOFSTEP]\ncalc\n  _ = _ := Finset.sum_congr rfl fun k m => ?_\n  _ = _ := p\n  _ = _ := ?_\n[GOAL]\ncase calc_1\nR : Type u_1\ninst✝ : CommRing R\nn : ℕ\np :\n  ∑ x in Finset.range (n + 1),\n      (↑(x * (x - 1)) + (↑1 - ↑(2 * n) * X) * ↑x + ↑(n ^ 2) * X ^ 2) * bernsteinPolynomial R n x =\n    ↑(n * (n - 1)) * X ^ 2 + (↑1 - (2 * n) • X) * n • X + n ^ 2 • X ^ 2 * 1\nk : ℕ\nm : k ∈ Finset.range (n + 1)\n⊢ (n • X - ↑k) ^ 2 * bernsteinPolynomial R n k =\n    (↑(k * (k - 1)) + (↑1 - ↑(2 * n) * X) * ↑k + ↑(n ^ 2) * X ^ 2) * bernsteinPolynomial R n k\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase calc_1.e_a\nR : Type u_1\ninst✝ : CommRing R\nn : ℕ\np :\n  ∑ x in Finset.range (n + 1),\n      (↑(x * (x - 1)) + (↑1 - ↑(2 * n) * X) * ↑x + ↑(n ^ 2) * X ^ 2) * bernsteinPolynomial R n x =\n    ↑(n * (n - 1)) * X ^ 2 + (↑1 - (2 * n) • X) * n • X + n ^ 2 • X ^ 2 * 1\nk : ℕ\nm : k ∈ Finset.range (n + 1)\n⊢ (n • X - ↑k) ^ 2 = ↑(k * (k - 1)) + (↑1 - ↑(2 * n) * X) * ↑k + ↑(n ^ 2) * X ^ 2\n[PROOFSTEP]\nsimp only [← nat_cast_mul, push_cast]\n[GOAL]\ncase calc_1.e_a\nR : Type u_1\ninst✝ : CommRing R\nn : ℕ\np :\n  ∑ x in Finset.range (n + 1),\n      (↑(x * (x - 1)) + (↑1 - ↑(2 * n) * X) * ↑x + ↑(n ^ 2) * X ^ 2) * bernsteinPolynomial R n x =\n    ↑(n * (n - 1)) * X ^ 2 + (↑1 - (2 * n) • X) * n • X + n ^ 2 • X ^ 2 * 1\nk : ℕ\nm : k ∈ Finset.range (n + 1)\n⊢ (↑n * X - ↑k) ^ 2 = ↑k * ↑(k - 1) + (1 - 2 * ↑n * X) * ↑k + ↑n ^ 2 * X ^ 2\n[PROOFSTEP]\ncases k\n[GOAL]\ncase calc_1.e_a.zero\nR : Type u_1\ninst✝ : CommRing R\nn : ℕ\np :\n  ∑ x in Finset.range (n + 1),\n      (↑(x * (x - 1)) + (↑1 - ↑(2 * n) * X) * ↑x + ↑(n ^ 2) * X ^ 2) * bernsteinPolynomial R n x =\n    ↑(n * (n - 1)) * X ^ 2 + (↑1 - (2 * n) • X) * n • X + n ^ 2 • X ^ 2 * 1\nm : Nat.zero ∈ Finset.range (n + 1)\n⊢ (↑n * X - ↑Nat.zero) ^ 2 = ↑Nat.zero * ↑(Nat.zero - 1) + (1 - 2 * ↑n * X) * ↑Nat.zero + ↑n ^ 2 * X ^ 2\n[PROOFSTEP]\nsimp\n[GOAL]\ncase calc_1.e_a.zero\nR : Type u_1\ninst✝ : CommRing R\nn : ℕ\np :\n  ∑ x in Finset.range (n + 1),\n      (↑(x * (x - 1)) + (↑1 - ↑(2 * n) * X) * ↑x + ↑(n ^ 2) * X ^ 2) * bernsteinPolynomial R n x =\n    ↑(n * (n - 1)) * X ^ 2 + (↑1 - (2 * n) • X) * n • X + n ^ 2 • X ^ 2 * 1\nm : Nat.zero ∈ Finset.range (n + 1)\n⊢ (↑n * X) ^ 2 = ↑n ^ 2 * X ^ 2\n[PROOFSTEP]\nring\n[GOAL]\ncase calc_1.e_a.succ\nR : Type u_1\ninst✝ : CommRing R\nn : ℕ\np :\n  ∑ x in Finset.range (n + 1),\n      (↑(x * (x - 1)) + (↑1 - ↑(2 * n) * X) * ↑x + ↑(n ^ 2) * X ^ 2) * bernsteinPolynomial R n x =\n    ↑(n * (n - 1)) * X ^ 2 + (↑1 - (2 * n) • X) * n • X + n ^ 2 • X ^ 2 * 1\nn✝ : ℕ\nm : Nat.succ n✝ ∈ Finset.range (n + 1)\n⊢ (↑n * X - ↑(Nat.succ n✝)) ^ 2 =\n    ↑(Nat.succ n✝) * ↑(Nat.succ n✝ - 1) + (1 - 2 * ↑n * X) * ↑(Nat.succ n✝) + ↑n ^ 2 * X ^ 2\n[PROOFSTEP]\nsimp\n[GOAL]\ncase calc_1.e_a.succ\nR : Type u_1\ninst✝ : CommRing R\nn : ℕ\np :\n  ∑ x in Finset.range (n + 1),\n      (↑(x * (x - 1)) + (↑1 - ↑(2 * n) * X) * ↑x + ↑(n ^ 2) * X ^ 2) * bernsteinPolynomial R n x =\n    ↑(n * (n - 1)) * X ^ 2 + (↑1 - (2 * n) • X) * n • X + n ^ 2 • X ^ 2 * 1\nn✝ : ℕ\nm : Nat.succ n✝ ∈ Finset.range (n + 1)\n⊢ (↑n * X - (↑n✝ + 1)) ^ 2 = (↑n✝ + 1) * ↑n✝ + (1 - 2 * ↑n * X) * (↑n✝ + 1) + ↑n ^ 2 * X ^ 2\n[PROOFSTEP]\nring\n[GOAL]\ncase calc_2\nR : Type u_1\ninst✝ : CommRing R\nn : ℕ\np :\n  ∑ x in Finset.range (n + 1),\n      (↑(x * (x - 1)) + (↑1 - ↑(2 * n) * X) * ↑x + ↑(n ^ 2) * X ^ 2) * bernsteinPolynomial R n x =\n    ↑(n * (n - 1)) * X ^ 2 + (↑1 - (2 * n) • X) * n • X + n ^ 2 • X ^ 2 * 1\n⊢ ↑(n * (n - 1)) * X ^ 2 + (↑1 - (2 * n) • X) * n • X + n ^ 2 • X ^ 2 * 1 = n • X * (1 - X)\n[PROOFSTEP]\nsimp only [← nat_cast_mul, push_cast]\n[GOAL]\ncase calc_2\nR : Type u_1\ninst✝ : CommRing R\nn : ℕ\np :\n  ∑ x in Finset.range (n + 1),\n      (↑(x * (x - 1)) + (↑1 - ↑(2 * n) * X) * ↑x + ↑(n ^ 2) * X ^ 2) * bernsteinPolynomial R n x =\n    ↑(n * (n - 1)) * X ^ 2 + (↑1 - (2 * n) • X) * n • X + n ^ 2 • X ^ 2 * 1\n⊢ ↑n * ↑(n - 1) * X ^ 2 + (1 - 2 * ↑n * X) * (↑n * X) + ↑n ^ 2 * X ^ 2 * 1 = ↑n * X * (1 - X)\n[PROOFSTEP]\ncases n\n[GOAL]\ncase calc_2.zero\nR : Type u_1\ninst✝ : CommRing R\np :\n  ∑ x in Finset.range (Nat.zero + 1),\n      (↑(x * (x - 1)) + (↑1 - ↑(2 * Nat.zero) * X) * ↑x + ↑(Nat.zero ^ 2) * X ^ 2) * bernsteinPolynomial R Nat.zero x =\n    ↑(Nat.zero * (Nat.zero - 1)) * X ^ 2 + (↑1 - (2 * Nat.zero) • X) * Nat.zero • X + Nat.zero ^ 2 • X ^ 2 * 1\n⊢ ↑Nat.zero * ↑(Nat.zero - 1) * X ^ 2 + (1 - 2 * ↑Nat.zero * X) * (↑Nat.zero * X) + ↑Nat.zero ^ 2 * X ^ 2 * 1 =\n    ↑Nat.zero * X * (1 - X)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase calc_2.succ\nR : Type u_1\ninst✝ : CommRing R\nn✝ : ℕ\np :\n  ∑ x in Finset.range (Nat.succ n✝ + 1),\n      (↑(x * (x - 1)) + (↑1 - ↑(2 * Nat.succ n✝) * X) * ↑x + ↑(Nat.succ n✝ ^ 2) * X ^ 2) *\n        bernsteinPolynomial R (Nat.succ n✝) x =\n    ↑(Nat.succ n✝ * (Nat.succ n✝ - 1)) * X ^ 2 + (↑1 - (2 * Nat.succ n✝) • X) * Nat.succ n✝ • X +\n      Nat.succ n✝ ^ 2 • X ^ 2 * 1\n⊢ ↑(Nat.succ n✝) * ↑(Nat.succ n✝ - 1) * X ^ 2 + (1 - 2 * ↑(Nat.succ n✝) * X) * (↑(Nat.succ n✝) * X) +\n      ↑(Nat.succ n✝) ^ 2 * X ^ 2 * 1 =\n    ↑(Nat.succ n✝) * X * (1 - X)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase calc_2.succ\nR : Type u_1\ninst✝ : CommRing R\nn✝ : ℕ\np :\n  ∑ x in Finset.range (Nat.succ n✝ + 1),\n      (↑(x * (x - 1)) + (↑1 - ↑(2 * Nat.succ n✝) * X) * ↑x + ↑(Nat.succ n✝ ^ 2) * X ^ 2) *\n        bernsteinPolynomial R (Nat.succ n✝) x =\n    ↑(Nat.succ n✝ * (Nat.succ n✝ - 1)) * X ^ 2 + (↑1 - (2 * Nat.succ n✝) • X) * Nat.succ n✝ • X +\n      Nat.succ n✝ ^ 2 • X ^ 2 * 1\n⊢ (↑n✝ + 1) * ↑n✝ * X ^ 2 + (1 - 2 * (↑n✝ + 1) * X) * ((↑n✝ + 1) * X) + (↑n✝ + 1) ^ 2 * X ^ 2 = (↑n✝ + 1) * X * (1 - X)\n[PROOFSTEP]\nring\n", "meta": {"mathlib_filename": "Mathlib.RingTheory.Polynomial.Bernstein", "llama_tokens": 36664, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7799929002541068, "lm_q2_score": 0.647798211152541, "lm_q1q2_score": 0.5052780054962928}}
{"text": "[GOAL]\nR : Type u\nA : Type v\ninst✝² : CommSemiring R\ninst✝¹ : Ring A\ninst✝ : Algebra R A\nr : Rˣ\ns : R\na : A\nh : IsUnit (r • ↑↑ₐ s - a)\n⊢ (↑↑ₐ s - r⁻¹ • a) * r • ↑(IsUnit.unit h)⁻¹ = 1\n[PROOFSTEP]\nrw [mul_smul_comm, ← smul_mul_assoc, smul_sub, smul_inv_smul, h.mul_val_inv]\n[GOAL]\nR : Type u\nA : Type v\ninst✝² : CommSemiring R\ninst✝¹ : Ring A\ninst✝ : Algebra R A\nr : Rˣ\ns : R\na : A\nh : IsUnit (r • ↑↑ₐ s - a)\n⊢ r • ↑(IsUnit.unit h)⁻¹ * (↑↑ₐ s - r⁻¹ • a) = 1\n[PROOFSTEP]\nrw [smul_mul_assoc, ← mul_smul_comm, smul_sub, smul_inv_smul, h.val_inv_mul]\n[GOAL]\nR : Type u\nA : Type v\ninst✝² : CommSemiring R\ninst✝¹ : Ring A\ninst✝ : Algebra R A\nr : R\na : A\n⊢ ¬r ∈ σ a ↔ IsUnit (↑↑ₐ r - a)\n[PROOFSTEP]\napply not_iff_not.mp\n[GOAL]\nR : Type u\nA : Type v\ninst✝² : CommSemiring R\ninst✝¹ : Ring A\ninst✝ : Algebra R A\nr : R\na : A\n⊢ ¬¬r ∈ σ a ↔ ¬IsUnit (↑↑ₐ r - a)\n[PROOFSTEP]\nsimp [Set.not_not_mem, mem_iff]\n[GOAL]\nR : Type u\nA : Type v\ninst✝² : CommSemiring R\ninst✝¹ : Ring A\ninst✝ : Algebra R A\na : A\n⊢ 0 ∈ σ a ↔ ¬IsUnit a\n[PROOFSTEP]\nrw [mem_iff, map_zero, zero_sub, IsUnit.neg_iff]\n[GOAL]\nR : Type u\nA : Type v\ninst✝² : CommSemiring R\ninst✝¹ : Ring A\ninst✝ : Algebra R A\na : A\n⊢ ¬0 ∈ σ a ↔ IsUnit a\n[PROOFSTEP]\nrw [zero_mem_iff, Classical.not_not]\n[GOAL]\nR : Type u\nA : Type v\ninst✝² : CommSemiring R\ninst✝¹ : Ring A\ninst✝ : Algebra R A\nr : R\na b c : A\nh₁ : (↑↑ₐ r - a) * b = 1\nh₂ : c * (↑↑ₐ r - a) = 1\n⊢ b * (↑↑ₐ r - a) = 1\n[PROOFSTEP]\nrwa [← left_inv_eq_right_inv h₂ h₁]\n[GOAL]\nR : Type u\nA : Type v\ninst✝³ : CommSemiring R\ninst✝² : Ring A\ninst✝¹ : Algebra R A\ninst✝ : Subsingleton A\na : A\n⊢ resolventSet R a = univ\n[PROOFSTEP]\nsimp_rw [resolventSet, Subsingleton.elim (algebraMap R A _ - a) 1, isUnit_one, Set.setOf_true]\n[GOAL]\nR : Type u\nA : Type v\ninst✝³ : CommSemiring R\ninst✝² : Ring A\ninst✝¹ : Algebra R A\ninst✝ : Subsingleton A\na : A\n⊢ σ a = ∅\n[PROOFSTEP]\nrw [spectrum, resolventSet_of_subsingleton, Set.compl_univ]\n[GOAL]\nR : Type u\nA : Type v\ninst✝² : CommSemiring R\ninst✝¹ : Ring A\ninst✝ : Algebra R A\nr : Rˣ\ns : R\na : A\n⊢ r • resolvent a s = resolvent (r⁻¹ • a) (r⁻¹ • s)\n[PROOFSTEP]\nby_cases h : s ∈ spectrum R a\n[GOAL]\ncase pos\nR : Type u\nA : Type v\ninst✝² : CommSemiring R\ninst✝¹ : Ring A\ninst✝ : Algebra R A\nr : Rˣ\ns : R\na : A\nh : s ∈ σ a\n⊢ r • resolvent a s = resolvent (r⁻¹ • a) (r⁻¹ • s)\n[PROOFSTEP]\nrw [mem_iff] at h \n[GOAL]\ncase pos\nR : Type u\nA : Type v\ninst✝² : CommSemiring R\ninst✝¹ : Ring A\ninst✝ : Algebra R A\nr : Rˣ\ns : R\na : A\nh : ¬IsUnit (↑↑ₐ s - a)\n⊢ r • resolvent a s = resolvent (r⁻¹ • a) (r⁻¹ • s)\n[PROOFSTEP]\nsimp only [resolvent, Algebra.algebraMap_eq_smul_one] at *\n[GOAL]\ncase pos\nR : Type u\nA : Type v\ninst✝² : CommSemiring R\ninst✝¹ : Ring A\ninst✝ : Algebra R A\nr : Rˣ\ns : R\na : A\nh : ¬IsUnit (s • 1 - a)\n⊢ r • Ring.inverse (s • 1 - a) = Ring.inverse ((r⁻¹ • s) • 1 - r⁻¹ • a)\n[PROOFSTEP]\nrw [smul_assoc, ← smul_sub]\n[GOAL]\ncase pos\nR : Type u\nA : Type v\ninst✝² : CommSemiring R\ninst✝¹ : Ring A\ninst✝ : Algebra R A\nr : Rˣ\ns : R\na : A\nh : ¬IsUnit (s • 1 - a)\n⊢ r • Ring.inverse (s • 1 - a) = Ring.inverse (r⁻¹ • (s • 1 - a))\n[PROOFSTEP]\nhave h' : ¬IsUnit (r⁻¹ • (s • (1 : A) - a)) := fun hu => h (by simpa only [smul_inv_smul] using IsUnit.smul r hu)\n[GOAL]\nR : Type u\nA : Type v\ninst✝² : CommSemiring R\ninst✝¹ : Ring A\ninst✝ : Algebra R A\nr : Rˣ\ns : R\na : A\nh : ¬IsUnit (s • 1 - a)\nhu : IsUnit (r⁻¹ • (s • 1 - a))\n⊢ IsUnit (s • 1 - a)\n[PROOFSTEP]\nsimpa only [smul_inv_smul] using IsUnit.smul r hu\n[GOAL]\ncase pos\nR : Type u\nA : Type v\ninst✝² : CommSemiring R\ninst✝¹ : Ring A\ninst✝ : Algebra R A\nr : Rˣ\ns : R\na : A\nh : ¬IsUnit (s • 1 - a)\nh' : ¬IsUnit (r⁻¹ • (s • 1 - a))\n⊢ r • Ring.inverse (s • 1 - a) = Ring.inverse (r⁻¹ • (s • 1 - a))\n[PROOFSTEP]\nsimp only [Ring.inverse_non_unit _ h, Ring.inverse_non_unit _ h', smul_zero]\n[GOAL]\ncase neg\nR : Type u\nA : Type v\ninst✝² : CommSemiring R\ninst✝¹ : Ring A\ninst✝ : Algebra R A\nr : Rˣ\ns : R\na : A\nh : ¬s ∈ σ a\n⊢ r • resolvent a s = resolvent (r⁻¹ • a) (r⁻¹ • s)\n[PROOFSTEP]\nsimp only [resolvent]\n[GOAL]\ncase neg\nR : Type u\nA : Type v\ninst✝² : CommSemiring R\ninst✝¹ : Ring A\ninst✝ : Algebra R A\nr : Rˣ\ns : R\na : A\nh : ¬s ∈ σ a\n⊢ r • Ring.inverse (↑↑ₐ s - a) = Ring.inverse (↑↑ₐ (r⁻¹ • s) - r⁻¹ • a)\n[PROOFSTEP]\nhave h' : IsUnit (r • algebraMap R A (r⁻¹ • s) - a) := by\n  simpa [Algebra.algebraMap_eq_smul_one, smul_assoc] using not_mem_iff.mp h\n[GOAL]\nR : Type u\nA : Type v\ninst✝² : CommSemiring R\ninst✝¹ : Ring A\ninst✝ : Algebra R A\nr : Rˣ\ns : R\na : A\nh : ¬s ∈ σ a\n⊢ IsUnit (r • ↑↑ₐ (r⁻¹ • s) - a)\n[PROOFSTEP]\nsimpa [Algebra.algebraMap_eq_smul_one, smul_assoc] using not_mem_iff.mp h\n[GOAL]\ncase neg\nR : Type u\nA : Type v\ninst✝² : CommSemiring R\ninst✝¹ : Ring A\ninst✝ : Algebra R A\nr : Rˣ\ns : R\na : A\nh : ¬s ∈ σ a\nh' : IsUnit (r • ↑↑ₐ (r⁻¹ • s) - a)\n⊢ r • Ring.inverse (↑↑ₐ s - a) = Ring.inverse (↑↑ₐ (r⁻¹ • s) - r⁻¹ • a)\n[PROOFSTEP]\nrw [← h'.subInvSMul_val, ← (not_mem_iff.mp h).unit_spec, Ring.inverse_unit, Ring.inverse_unit, ←\n  h'.subInvSMul.inv_eq_val_inv, h'.subInvSMul_inv]\n[GOAL]\ncase neg\nR : Type u\nA : Type v\ninst✝² : CommSemiring R\ninst✝¹ : Ring A\ninst✝ : Algebra R A\nr : Rˣ\ns : R\na : A\nh : ¬s ∈ σ a\nh' : IsUnit (r • ↑↑ₐ (r⁻¹ • s) - a)\n⊢ r • ↑(IsUnit.unit (_ : IsUnit (↑↑ₐ s - a)))⁻¹ = r • ↑(IsUnit.unit h')⁻¹\n[PROOFSTEP]\nsimp only [Algebra.algebraMap_eq_smul_one, smul_assoc, smul_inv_smul]\n[GOAL]\nR : Type u\nA : Type v\ninst✝² : CommSemiring R\ninst✝¹ : Ring A\ninst✝ : Algebra R A\nr : Rˣ\na : A\n⊢ r • resolvent a ↑r = resolvent (r⁻¹ • a) 1\n[PROOFSTEP]\nsimpa only [Units.smul_def, Algebra.id.smul_eq_mul, Units.inv_mul] using @units_smul_resolvent _ _ _ _ _ r r a\n[GOAL]\nR : Type u\nA : Type v\ninst✝² : CommSemiring R\ninst✝¹ : Ring A\ninst✝ : Algebra R A\nr : Rˣ\na : Aˣ\nh : ↑r ∈ resolventSet R ↑a\n⊢ ↑r⁻¹ ∈ resolventSet R ↑a⁻¹\n[PROOFSTEP]\nrw [mem_resolventSet_iff, Algebra.algebraMap_eq_smul_one, ← Units.smul_def] at h ⊢\n[GOAL]\nR : Type u\nA : Type v\ninst✝² : CommSemiring R\ninst✝¹ : Ring A\ninst✝ : Algebra R A\nr : Rˣ\na : Aˣ\nh : IsUnit (r • 1 - ↑a)\n⊢ IsUnit (r⁻¹ • 1 - ↑a⁻¹)\n[PROOFSTEP]\nrw [IsUnit.smul_sub_iff_sub_inv_smul, inv_inv, IsUnit.sub_iff]\n[GOAL]\nR : Type u\nA : Type v\ninst✝² : CommSemiring R\ninst✝¹ : Ring A\ninst✝ : Algebra R A\nr : Rˣ\na : Aˣ\nh : IsUnit (r • 1 - ↑a)\n⊢ IsUnit (r • ↑a⁻¹ - 1)\n[PROOFSTEP]\nhave h₁ : (a : A) * (r • (↑a⁻¹ : A) - 1) = r • (1 : A) - a := by rw [mul_sub, mul_smul_comm, a.mul_inv, mul_one]\n[GOAL]\nR : Type u\nA : Type v\ninst✝² : CommSemiring R\ninst✝¹ : Ring A\ninst✝ : Algebra R A\nr : Rˣ\na : Aˣ\nh : IsUnit (r • 1 - ↑a)\n⊢ ↑a * (r • ↑a⁻¹ - 1) = r • 1 - ↑a\n[PROOFSTEP]\nrw [mul_sub, mul_smul_comm, a.mul_inv, mul_one]\n[GOAL]\nR : Type u\nA : Type v\ninst✝² : CommSemiring R\ninst✝¹ : Ring A\ninst✝ : Algebra R A\nr : Rˣ\na : Aˣ\nh : IsUnit (r • 1 - ↑a)\nh₁ : ↑a * (r • ↑a⁻¹ - 1) = r • 1 - ↑a\n⊢ IsUnit (r • ↑a⁻¹ - 1)\n[PROOFSTEP]\nhave h₂ : (r • (↑a⁻¹ : A) - 1) * a = r • (1 : A) - a := by rw [sub_mul, smul_mul_assoc, a.inv_mul, one_mul]\n[GOAL]\nR : Type u\nA : Type v\ninst✝² : CommSemiring R\ninst✝¹ : Ring A\ninst✝ : Algebra R A\nr : Rˣ\na : Aˣ\nh : IsUnit (r • 1 - ↑a)\nh₁ : ↑a * (r • ↑a⁻¹ - 1) = r • 1 - ↑a\n⊢ (r • ↑a⁻¹ - 1) * ↑a = r • 1 - ↑a\n[PROOFSTEP]\nrw [sub_mul, smul_mul_assoc, a.inv_mul, one_mul]\n[GOAL]\nR : Type u\nA : Type v\ninst✝² : CommSemiring R\ninst✝¹ : Ring A\ninst✝ : Algebra R A\nr : Rˣ\na : Aˣ\nh : IsUnit (r • 1 - ↑a)\nh₁ : ↑a * (r • ↑a⁻¹ - 1) = r • 1 - ↑a\nh₂ : (r • ↑a⁻¹ - 1) * ↑a = r • 1 - ↑a\n⊢ IsUnit (r • ↑a⁻¹ - 1)\n[PROOFSTEP]\nhave hcomm : Commute (a : A) (r • (↑a⁻¹ : A) - 1) := by rwa [← h₂] at h₁ \n[GOAL]\nR : Type u\nA : Type v\ninst✝² : CommSemiring R\ninst✝¹ : Ring A\ninst✝ : Algebra R A\nr : Rˣ\na : Aˣ\nh : IsUnit (r • 1 - ↑a)\nh₁ : ↑a * (r • ↑a⁻¹ - 1) = r • 1 - ↑a\nh₂ : (r • ↑a⁻¹ - 1) * ↑a = r • 1 - ↑a\n⊢ Commute (↑a) (r • ↑a⁻¹ - 1)\n[PROOFSTEP]\nrwa [← h₂] at h₁ \n[GOAL]\nR : Type u\nA : Type v\ninst✝² : CommSemiring R\ninst✝¹ : Ring A\ninst✝ : Algebra R A\nr : Rˣ\na : Aˣ\nh : IsUnit (r • 1 - ↑a)\nh₁ : ↑a * (r • ↑a⁻¹ - 1) = r • 1 - ↑a\nh₂ : (r • ↑a⁻¹ - 1) * ↑a = r • 1 - ↑a\nhcomm : Commute (↑a) (r • ↑a⁻¹ - 1)\n⊢ IsUnit (r • ↑a⁻¹ - 1)\n[PROOFSTEP]\nexact (hcomm.isUnit_mul_iff.mp (h₁.symm ▸ h)).2\n[GOAL]\nR : Type u\nA : Type v\ninst✝² : CommSemiring R\ninst✝¹ : Ring A\ninst✝ : Algebra R A\na : Aˣ\n⊢ 0 ∈ resolventSet R ↑a\n[PROOFSTEP]\nsimpa only [mem_resolventSet_iff, ← not_mem_iff, zero_not_mem_iff] using a.isUnit\n[GOAL]\nR : Type u\nA : Type v\ninst✝² : CommSemiring R\ninst✝¹ : Ring A\ninst✝ : Algebra R A\na : A\nr s : R\n⊢ r + s ∈ σ a ↔ r ∈ σ (-↑↑ₐ s + a)\n[PROOFSTEP]\nsimp only [mem_iff, sub_neg_eq_add, ← sub_sub, map_add]\n[GOAL]\nR : Type u\nA : Type v\ninst✝² : CommSemiring R\ninst✝¹ : Ring A\ninst✝ : Algebra R A\na : A\nr s : R\n⊢ r + s ∈ σ (↑↑ₐ s + a) ↔ r ∈ σ a\n[PROOFSTEP]\nrw [add_mem_iff, neg_add_cancel_left]\n[GOAL]\nR : Type u\nA : Type v\ninst✝² : CommSemiring R\ninst✝¹ : Ring A\ninst✝ : Algebra R A\na : A\ns : R\nr : Rˣ\n⊢ r • s ∈ σ (r • a) ↔ s ∈ σ a\n[PROOFSTEP]\nsimp only [mem_iff, not_iff_not, Algebra.algebraMap_eq_smul_one, smul_assoc, ← smul_sub, isUnit_smul_iff]\n[GOAL]\nR : Type u\nA : Type v\ninst✝² : CommSemiring R\ninst✝¹ : Ring A\ninst✝ : Algebra R A\na : A\nr : Rˣ\n⊢ σ (r • a) = r • σ a\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nR : Type u\nA : Type v\ninst✝² : CommSemiring R\ninst✝¹ : Ring A\ninst✝ : Algebra R A\na : A\nr : Rˣ\nx : R\n⊢ x ∈ σ (r • a) ↔ x ∈ r • σ a\n[PROOFSTEP]\nhave x_eq : x = r • r⁻¹ • x := by simp\n[GOAL]\nR : Type u\nA : Type v\ninst✝² : CommSemiring R\ninst✝¹ : Ring A\ninst✝ : Algebra R A\na : A\nr : Rˣ\nx : R\n⊢ x = r • r⁻¹ • x\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h\nR : Type u\nA : Type v\ninst✝² : CommSemiring R\ninst✝¹ : Ring A\ninst✝ : Algebra R A\na : A\nr : Rˣ\nx : R\nx_eq : x = r • r⁻¹ • x\n⊢ x ∈ σ (r • a) ↔ x ∈ r • σ a\n[PROOFSTEP]\nnth_rw 1 [x_eq]\n[GOAL]\ncase h\nR : Type u\nA : Type v\ninst✝² : CommSemiring R\ninst✝¹ : Ring A\ninst✝ : Algebra R A\na : A\nr : Rˣ\nx : R\nx_eq : x = r • r⁻¹ • x\n⊢ r • r⁻¹ • x ∈ σ (r • a) ↔ x ∈ r • σ a\n[PROOFSTEP]\nrw [smul_mem_smul_iff]\n[GOAL]\ncase h\nR : Type u\nA : Type v\ninst✝² : CommSemiring R\ninst✝¹ : Ring A\ninst✝ : Algebra R A\na : A\nr : Rˣ\nx : R\nx_eq : x = r • r⁻¹ • x\n⊢ r⁻¹ • x ∈ σ a ↔ x ∈ r • σ a\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nR : Type u\nA : Type v\ninst✝² : CommSemiring R\ninst✝¹ : Ring A\ninst✝ : Algebra R A\na : A\nr : Rˣ\nx : R\nx_eq : x = r • r⁻¹ • x\n⊢ r⁻¹ • x ∈ σ a → x ∈ r • σ a\n[PROOFSTEP]\nexact fun h => ⟨r⁻¹ • x, ⟨h, show r • r⁻¹ • x = x by simp⟩⟩\n[GOAL]\nR : Type u\nA : Type v\ninst✝² : CommSemiring R\ninst✝¹ : Ring A\ninst✝ : Algebra R A\na : A\nr : Rˣ\nx : R\nx_eq : x = r • r⁻¹ • x\nh : r⁻¹ • x ∈ σ a\n⊢ r • r⁻¹ • x = x\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.mpr\nR : Type u\nA : Type v\ninst✝² : CommSemiring R\ninst✝¹ : Ring A\ninst✝ : Algebra R A\na : A\nr : Rˣ\nx : R\nx_eq : x = r • r⁻¹ • x\n⊢ x ∈ r • σ a → r⁻¹ • x ∈ σ a\n[PROOFSTEP]\nrintro ⟨w, _, (x'_eq : r • w = x)⟩\n[GOAL]\ncase h.mpr.intro.intro\nR : Type u\nA : Type v\ninst✝² : CommSemiring R\ninst✝¹ : Ring A\ninst✝ : Algebra R A\na : A\nr : Rˣ\nx : R\nx_eq : x = r • r⁻¹ • x\nw : R\nleft✝ : w ∈ σ a\nx'_eq : r • w = x\n⊢ r⁻¹ • x ∈ σ a\n[PROOFSTEP]\nsimpa [← x'_eq]\n[GOAL]\nR : Type u\nA : Type v\ninst✝² : CommSemiring R\ninst✝¹ : Ring A\ninst✝ : Algebra R A\na b : A\nr : Rˣ\n⊢ ↑r ∈ σ (a * b) ↔ ↑r ∈ σ (b * a)\n[PROOFSTEP]\nhave h₁ : ∀ x y : A, IsUnit (1 - x * y) → IsUnit (1 - y * x) :=\n  by\n  refine' fun x y h => ⟨⟨1 - y * x, 1 + y * h.unit.inv * x, _, _⟩, rfl⟩\n  calc\n    (1 - y * x) * (1 + y * (IsUnit.unit h).inv * x) = 1 - y * x + y * ((1 - x * y) * h.unit.inv) * x := by noncomm_ring\n    _ = 1 := by simp only [Units.inv_eq_val_inv, IsUnit.mul_val_inv, mul_one, sub_add_cancel]\n  calc\n    (1 + y * (IsUnit.unit h).inv * x) * (1 - y * x) = 1 - y * x + y * (h.unit.inv * (1 - x * y)) * x := by noncomm_ring\n    _ = 1 := by simp only [Units.inv_eq_val_inv, IsUnit.val_inv_mul, mul_one, sub_add_cancel]\n[GOAL]\nR : Type u\nA : Type v\ninst✝² : CommSemiring R\ninst✝¹ : Ring A\ninst✝ : Algebra R A\na b : A\nr : Rˣ\n⊢ ∀ (x y : A), IsUnit (1 - x * y) → IsUnit (1 - y * x)\n[PROOFSTEP]\nrefine' fun x y h => ⟨⟨1 - y * x, 1 + y * h.unit.inv * x, _, _⟩, rfl⟩\n[GOAL]\ncase refine'_1\nR : Type u\nA : Type v\ninst✝² : CommSemiring R\ninst✝¹ : Ring A\ninst✝ : Algebra R A\na b : A\nr : Rˣ\nx y : A\nh : IsUnit (1 - x * y)\n⊢ (1 - y * x) * (1 + y * (IsUnit.unit h).inv * x) = 1\ncase refine'_2\nR : Type u\nA : Type v\ninst✝² : CommSemiring R\ninst✝¹ : Ring A\ninst✝ : Algebra R A\na b : A\nr : Rˣ\nx y : A\nh : IsUnit (1 - x * y)\n⊢ (1 + y * (IsUnit.unit h).inv * x) * (1 - y * x) = 1\n[PROOFSTEP]\ncalc\n  (1 - y * x) * (1 + y * (IsUnit.unit h).inv * x) = 1 - y * x + y * ((1 - x * y) * h.unit.inv) * x := by noncomm_ring\n  _ = 1 := by simp only [Units.inv_eq_val_inv, IsUnit.mul_val_inv, mul_one, sub_add_cancel]\n[GOAL]\nR : Type u\nA : Type v\ninst✝² : CommSemiring R\ninst✝¹ : Ring A\ninst✝ : Algebra R A\na b : A\nr : Rˣ\nx y : A\nh : IsUnit (1 - x * y)\n⊢ (1 - y * x) * (1 + y * (IsUnit.unit h).inv * x) = 1 - y * x + y * ((1 - x * y) * (IsUnit.unit h).inv) * x\n[PROOFSTEP]\nnoncomm_ring\n[GOAL]\nR : Type u\nA : Type v\ninst✝² : CommSemiring R\ninst✝¹ : Ring A\ninst✝ : Algebra R A\na b : A\nr : Rˣ\nx y : A\nh : IsUnit (1 - x * y)\n⊢ 1 - y * x + y * ((1 - x * y) * (IsUnit.unit h).inv) * x = 1\n[PROOFSTEP]\nsimp only [Units.inv_eq_val_inv, IsUnit.mul_val_inv, mul_one, sub_add_cancel]\n[GOAL]\ncase refine'_2\nR : Type u\nA : Type v\ninst✝² : CommSemiring R\ninst✝¹ : Ring A\ninst✝ : Algebra R A\na b : A\nr : Rˣ\nx y : A\nh : IsUnit (1 - x * y)\n⊢ (1 + y * (IsUnit.unit h).inv * x) * (1 - y * x) = 1\n[PROOFSTEP]\ncalc\n  (1 + y * (IsUnit.unit h).inv * x) * (1 - y * x) = 1 - y * x + y * (h.unit.inv * (1 - x * y)) * x := by noncomm_ring\n  _ = 1 := by simp only [Units.inv_eq_val_inv, IsUnit.val_inv_mul, mul_one, sub_add_cancel]\n[GOAL]\nR : Type u\nA : Type v\ninst✝² : CommSemiring R\ninst✝¹ : Ring A\ninst✝ : Algebra R A\na b : A\nr : Rˣ\nx y : A\nh : IsUnit (1 - x * y)\n⊢ (1 + y * (IsUnit.unit h).inv * x) * (1 - y * x) = 1 - y * x + y * ((IsUnit.unit h).inv * (1 - x * y)) * x\n[PROOFSTEP]\nnoncomm_ring\n[GOAL]\nR : Type u\nA : Type v\ninst✝² : CommSemiring R\ninst✝¹ : Ring A\ninst✝ : Algebra R A\na b : A\nr : Rˣ\nx y : A\nh : IsUnit (1 - x * y)\n⊢ 1 - y * x + y * ((IsUnit.unit h).inv * (1 - x * y)) * x = 1\n[PROOFSTEP]\nsimp only [Units.inv_eq_val_inv, IsUnit.val_inv_mul, mul_one, sub_add_cancel]\n[GOAL]\nR : Type u\nA : Type v\ninst✝² : CommSemiring R\ninst✝¹ : Ring A\ninst✝ : Algebra R A\na b : A\nr : Rˣ\nh₁ : ∀ (x y : A), IsUnit (1 - x * y) → IsUnit (1 - y * x)\n⊢ ↑r ∈ σ (a * b) ↔ ↑r ∈ σ (b * a)\n[PROOFSTEP]\nhave := Iff.intro (h₁ (r⁻¹ • a) b) (h₁ b (r⁻¹ • a))\n[GOAL]\nR : Type u\nA : Type v\ninst✝² : CommSemiring R\ninst✝¹ : Ring A\ninst✝ : Algebra R A\na b : A\nr : Rˣ\nh₁ : ∀ (x y : A), IsUnit (1 - x * y) → IsUnit (1 - y * x)\nthis : IsUnit (1 - r⁻¹ • a * b) ↔ IsUnit (1 - b * r⁻¹ • a)\n⊢ ↑r ∈ σ (a * b) ↔ ↑r ∈ σ (b * a)\n[PROOFSTEP]\nrw [mul_smul_comm r⁻¹ b a] at this \n[GOAL]\nR : Type u\nA : Type v\ninst✝² : CommSemiring R\ninst✝¹ : Ring A\ninst✝ : Algebra R A\na b : A\nr : Rˣ\nh₁ : ∀ (x y : A), IsUnit (1 - x * y) → IsUnit (1 - y * x)\nthis : IsUnit (1 - r⁻¹ • a * b) ↔ IsUnit (1 - r⁻¹ • (b * a))\n⊢ ↑r ∈ σ (a * b) ↔ ↑r ∈ σ (b * a)\n[PROOFSTEP]\nsimpa only [mem_iff, not_iff_not, Algebra.algebraMap_eq_smul_one, ← Units.smul_def, IsUnit.smul_sub_iff_sub_inv_smul,\n  smul_mul_assoc]\n[GOAL]\nR : Type u\nA : Type v\ninst✝⁵ : CommSemiring R\ninst✝⁴ : Ring A\ninst✝³ : Algebra R A\ninst✝² : InvolutiveStar R\ninst✝¹ : StarRing A\ninst✝ : StarModule R A\nr : R\na : A\n⊢ star r ∈ resolventSet R a ↔ r ∈ resolventSet R (star a)\n[PROOFSTEP]\nrefine' ⟨fun h => _, fun h => _⟩\n[GOAL]\ncase refine'_1\nR : Type u\nA : Type v\ninst✝⁵ : CommSemiring R\ninst✝⁴ : Ring A\ninst✝³ : Algebra R A\ninst✝² : InvolutiveStar R\ninst✝¹ : StarRing A\ninst✝ : StarModule R A\nr : R\na : A\nh : star r ∈ resolventSet R a\n⊢ r ∈ resolventSet R (star a)\n[PROOFSTEP]\nsimpa only [mem_resolventSet_iff, Algebra.algebraMap_eq_smul_one, star_sub, star_smul, star_star, star_one] using\n  IsUnit.star h\n[GOAL]\ncase refine'_2\nR : Type u\nA : Type v\ninst✝⁵ : CommSemiring R\ninst✝⁴ : Ring A\ninst✝³ : Algebra R A\ninst✝² : InvolutiveStar R\ninst✝¹ : StarRing A\ninst✝ : StarModule R A\nr : R\na : A\nh : r ∈ resolventSet R (star a)\n⊢ star r ∈ resolventSet R a\n[PROOFSTEP]\nsimpa only [mem_resolventSet_iff, Algebra.algebraMap_eq_smul_one, star_sub, star_smul, star_star, star_one] using\n  IsUnit.star h\n[GOAL]\nR : Type u\nA : Type v\ninst✝⁵ : CommSemiring R\ninst✝⁴ : Ring A\ninst✝³ : Algebra R A\ninst✝² : InvolutiveStar R\ninst✝¹ : StarRing A\ninst✝ : StarModule R A\na : A\n⊢ σ (star a) = star (σ a)\n[PROOFSTEP]\next\n[GOAL]\ncase h\nR : Type u\nA : Type v\ninst✝⁵ : CommSemiring R\ninst✝⁴ : Ring A\ninst✝³ : Algebra R A\ninst✝² : InvolutiveStar R\ninst✝¹ : StarRing A\ninst✝ : StarModule R A\na : A\nx✝ : R\n⊢ x✝ ∈ σ (star a) ↔ x✝ ∈ star (σ a)\n[PROOFSTEP]\nsimpa only [Set.mem_star, mem_iff, not_iff_not] using star_mem_resolventSet_iff.symm\n[GOAL]\nR : Type u\nA : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring A\ninst✝ : Algebra R A\na : A\nr x : R\n⊢ x ∈ {r} + σ a ↔ x ∈ σ (↑↑ₐ r + a)\n[PROOFSTEP]\nrw [singleton_add, image_add_left, mem_preimage]\n[GOAL]\nR : Type u\nA : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring A\ninst✝ : Algebra R A\na : A\nr x : R\n⊢ (fun x x_1 => x + x_1) (-r) x ∈ σ a ↔ x ∈ σ (↑↑ₐ r + a)\n[PROOFSTEP]\nsimp only\n[GOAL]\nR : Type u\nA : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring A\ninst✝ : Algebra R A\na : A\nr x : R\n⊢ -r + x ∈ σ a ↔ x ∈ σ (↑↑ₐ r + a)\n[PROOFSTEP]\nrw [add_comm, add_mem_iff, map_neg, neg_neg]\n[GOAL]\nR : Type u\nA : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring A\ninst✝ : Algebra R A\na : A\nx : R\n⊢ x ∈ -σ a ↔ x ∈ σ (-a)\n[PROOFSTEP]\nsimp only [mem_neg, mem_iff, map_neg, ← neg_add', IsUnit.neg_iff, sub_neg_eq_add]\n[GOAL]\nR : Type u\nA : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring A\ninst✝ : Algebra R A\na : A\nr : R\n⊢ {r} - σ a = σ (↑↑ₐ r - a)\n[PROOFSTEP]\nrw [sub_eq_add_neg, neg_eq, singleton_add_eq, sub_eq_add_neg]\n[GOAL]\nR : Type u\nA : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring A\ninst✝ : Algebra R A\na : A\nr : R\n⊢ σ a - {r} = σ (a - ↑↑ₐ r)\n[PROOFSTEP]\nsimpa only [neg_sub, neg_eq] using congr_arg Neg.neg (singleton_sub_eq a r)\n[GOAL]\n𝕜 : Type u\nA : Type v\ninst✝³ : Field 𝕜\ninst✝² : Ring A\ninst✝¹ : Algebra 𝕜 A\ninst✝ : Nontrivial A\n⊢ σ 0 = {0}\n[PROOFSTEP]\nrefine' Set.Subset.antisymm _ (by simp [Algebra.algebraMap_eq_smul_one, mem_iff])\n[GOAL]\n𝕜 : Type u\nA : Type v\ninst✝³ : Field 𝕜\ninst✝² : Ring A\ninst✝¹ : Algebra 𝕜 A\ninst✝ : Nontrivial A\n⊢ {0} ⊆ σ 0\n[PROOFSTEP]\nsimp [Algebra.algebraMap_eq_smul_one, mem_iff]\n[GOAL]\n𝕜 : Type u\nA : Type v\ninst✝³ : Field 𝕜\ninst✝² : Ring A\ninst✝¹ : Algebra 𝕜 A\ninst✝ : Nontrivial A\n⊢ σ 0 ⊆ {0}\n[PROOFSTEP]\nrw [spectrum, Set.compl_subset_comm]\n[GOAL]\n𝕜 : Type u\nA : Type v\ninst✝³ : Field 𝕜\ninst✝² : Ring A\ninst✝¹ : Algebra 𝕜 A\ninst✝ : Nontrivial A\n⊢ {0}ᶜ ⊆ resolventSet 𝕜 0\n[PROOFSTEP]\nintro k hk\n[GOAL]\n𝕜 : Type u\nA : Type v\ninst✝³ : Field 𝕜\ninst✝² : Ring A\ninst✝¹ : Algebra 𝕜 A\ninst✝ : Nontrivial A\nk : 𝕜\nhk : k ∈ {0}ᶜ\n⊢ k ∈ resolventSet 𝕜 0\n[PROOFSTEP]\nrw [Set.mem_compl_singleton_iff] at hk \n[GOAL]\n𝕜 : Type u\nA : Type v\ninst✝³ : Field 𝕜\ninst✝² : Ring A\ninst✝¹ : Algebra 𝕜 A\ninst✝ : Nontrivial A\nk : 𝕜\nhk : k ≠ 0\n⊢ k ∈ resolventSet 𝕜 0\n[PROOFSTEP]\nhave : IsUnit (Units.mk0 k hk • (1 : A)) := IsUnit.smul (Units.mk0 k hk) isUnit_one\n[GOAL]\n𝕜 : Type u\nA : Type v\ninst✝³ : Field 𝕜\ninst✝² : Ring A\ninst✝¹ : Algebra 𝕜 A\ninst✝ : Nontrivial A\nk : 𝕜\nhk : k ≠ 0\nthis : IsUnit (Units.mk0 k hk • 1)\n⊢ k ∈ resolventSet 𝕜 0\n[PROOFSTEP]\nsimpa [mem_resolventSet_iff, Algebra.algebraMap_eq_smul_one]\n[GOAL]\n𝕜 : Type u\nA : Type v\ninst✝³ : Field 𝕜\ninst✝² : Ring A\ninst✝¹ : Algebra 𝕜 A\ninst✝ : Nontrivial A\nk : 𝕜\n⊢ σ (↑↑ₐ k) = {k}\n[PROOFSTEP]\nrw [← add_zero (↑ₐ k), ← singleton_add_eq, zero_eq, Set.singleton_add_singleton, add_zero]\n[GOAL]\n𝕜 : Type u\nA : Type v\ninst✝³ : Field 𝕜\ninst✝² : Ring A\ninst✝¹ : Algebra 𝕜 A\ninst✝ : Nontrivial A\n⊢ σ 1 = σ (↑↑ₐ 1)\n[PROOFSTEP]\nrw [Algebra.algebraMap_eq_smul_one, one_smul]\n[GOAL]\n𝕜 : Type u\nA : Type v\ninst✝³ : Field 𝕜\ninst✝² : Ring A\ninst✝¹ : Algebra 𝕜 A\ninst✝ : Nontrivial A\nk : 𝕜\na : A\nha : Set.Nonempty (σ a)\n⊢ σ (k • a) = k • σ a\n[PROOFSTEP]\nrcases eq_or_ne k 0 with (rfl | h)\n[GOAL]\ncase inl\n𝕜 : Type u\nA : Type v\ninst✝³ : Field 𝕜\ninst✝² : Ring A\ninst✝¹ : Algebra 𝕜 A\ninst✝ : Nontrivial A\na : A\nha : Set.Nonempty (σ a)\n⊢ σ (0 • a) = 0 • σ a\n[PROOFSTEP]\nsimpa [ha, zero_smul_set] using (show {(0 : 𝕜)} = (0 : Set 𝕜) from rfl)\n[GOAL]\ncase inr\n𝕜 : Type u\nA : Type v\ninst✝³ : Field 𝕜\ninst✝² : Ring A\ninst✝¹ : Algebra 𝕜 A\ninst✝ : Nontrivial A\nk : 𝕜\na : A\nha : Set.Nonempty (σ a)\nh : k ≠ 0\n⊢ σ (k • a) = k • σ a\n[PROOFSTEP]\nexact unit_smul_eq_smul a (Units.mk0 k h)\n[GOAL]\n𝕜 : Type u\nA : Type v\ninst✝² : Field 𝕜\ninst✝¹ : Ring A\ninst✝ : Algebra 𝕜 A\na b : A\n⊢ σ (a * b) \\ {0} = σ (b * a) \\ {0}\n[PROOFSTEP]\nsuffices h : ∀ x y : A, σ (x * y) \\ {0} ⊆ σ (y * x) \\ {0}\n[GOAL]\n𝕜 : Type u\nA : Type v\ninst✝² : Field 𝕜\ninst✝¹ : Ring A\ninst✝ : Algebra 𝕜 A\na b : A\nh : ∀ (x y : A), σ (x * y) \\ {0} ⊆ σ (y * x) \\ {0}\n⊢ σ (a * b) \\ {0} = σ (b * a) \\ {0}\n[PROOFSTEP]\nexact Set.eq_of_subset_of_subset (h a b) (h b a)\n[GOAL]\ncase h\n𝕜 : Type u\nA : Type v\ninst✝² : Field 𝕜\ninst✝¹ : Ring A\ninst✝ : Algebra 𝕜 A\na b : A\n⊢ ∀ (x y : A), σ (x * y) \\ {0} ⊆ σ (y * x) \\ {0}\n[PROOFSTEP]\nrintro _ _ k ⟨k_mem, k_neq⟩\n[GOAL]\ncase h.intro\n𝕜 : Type u\nA : Type v\ninst✝² : Field 𝕜\ninst✝¹ : Ring A\ninst✝ : Algebra 𝕜 A\na b x✝ y✝ : A\nk : 𝕜\nk_mem : k ∈ σ (x✝ * y✝)\nk_neq : ¬k ∈ {0}\n⊢ k ∈ σ (y✝ * x✝) \\ {0}\n[PROOFSTEP]\nchange ((Units.mk0 k k_neq) : 𝕜) ∈ _ at k_mem \n[GOAL]\ncase h.intro\n𝕜 : Type u\nA : Type v\ninst✝² : Field 𝕜\ninst✝¹ : Ring A\ninst✝ : Algebra 𝕜 A\na b x✝ y✝ : A\nk : 𝕜\nk_neq : ¬k ∈ {0}\nk_mem : ↑(Units.mk0 k k_neq) ∈ σ (x✝ * y✝)\n⊢ k ∈ σ (y✝ * x✝) \\ {0}\n[PROOFSTEP]\nexact ⟨unit_mem_mul_iff_mem_swap_mul.mp k_mem, k_neq⟩\n[GOAL]\n𝕜 : Type u\nA : Type v\ninst✝² : Field 𝕜\ninst✝¹ : Ring A\ninst✝ : Algebra 𝕜 A\na : Aˣ\n⊢ (σ ↑a)⁻¹ = σ ↑a⁻¹\n[PROOFSTEP]\nrefine' Set.eq_of_subset_of_subset (fun k hk => _) fun k hk => _\n[GOAL]\ncase refine'_1\n𝕜 : Type u\nA : Type v\ninst✝² : Field 𝕜\ninst✝¹ : Ring A\ninst✝ : Algebra 𝕜 A\na : Aˣ\nk : 𝕜\nhk : k ∈ (σ ↑a)⁻¹\n⊢ k ∈ σ ↑a⁻¹\n[PROOFSTEP]\nrw [Set.mem_inv] at hk \n[GOAL]\ncase refine'_1\n𝕜 : Type u\nA : Type v\ninst✝² : Field 𝕜\ninst✝¹ : Ring A\ninst✝ : Algebra 𝕜 A\na : Aˣ\nk : 𝕜\nhk : k⁻¹ ∈ σ ↑a\n⊢ k ∈ σ ↑a⁻¹\n[PROOFSTEP]\nhave : k ≠ 0 := by simpa only [inv_inv] using inv_ne_zero (ne_zero_of_mem_of_unit hk)\n[GOAL]\n𝕜 : Type u\nA : Type v\ninst✝² : Field 𝕜\ninst✝¹ : Ring A\ninst✝ : Algebra 𝕜 A\na : Aˣ\nk : 𝕜\nhk : k⁻¹ ∈ σ ↑a\n⊢ k ≠ 0\n[PROOFSTEP]\nsimpa only [inv_inv] using inv_ne_zero (ne_zero_of_mem_of_unit hk)\n[GOAL]\ncase refine'_1\n𝕜 : Type u\nA : Type v\ninst✝² : Field 𝕜\ninst✝¹ : Ring A\ninst✝ : Algebra 𝕜 A\na : Aˣ\nk : 𝕜\nhk : k⁻¹ ∈ σ ↑a\nthis : k ≠ 0\n⊢ k ∈ σ ↑a⁻¹\n[PROOFSTEP]\nlift k to 𝕜ˣ using isUnit_iff_ne_zero.mpr this\n[GOAL]\ncase refine'_1.intro\n𝕜 : Type u\nA : Type v\ninst✝² : Field 𝕜\ninst✝¹ : Ring A\ninst✝ : Algebra 𝕜 A\na : Aˣ\nk : 𝕜ˣ\nhk : (↑k)⁻¹ ∈ σ ↑a\nthis : ↑k ≠ 0\n⊢ ↑k ∈ σ ↑a⁻¹\n[PROOFSTEP]\nrw [← Units.val_inv_eq_inv_val k] at hk \n[GOAL]\ncase refine'_1.intro\n𝕜 : Type u\nA : Type v\ninst✝² : Field 𝕜\ninst✝¹ : Ring A\ninst✝ : Algebra 𝕜 A\na : Aˣ\nk : 𝕜ˣ\nhk : ↑k⁻¹ ∈ σ ↑a\nthis : ↑k ≠ 0\n⊢ ↑k ∈ σ ↑a⁻¹\n[PROOFSTEP]\nexact inv_mem_iff.mp hk\n[GOAL]\ncase refine'_2\n𝕜 : Type u\nA : Type v\ninst✝² : Field 𝕜\ninst✝¹ : Ring A\ninst✝ : Algebra 𝕜 A\na : Aˣ\nk : 𝕜\nhk : k ∈ σ ↑a⁻¹\n⊢ k ∈ (σ ↑a)⁻¹\n[PROOFSTEP]\nlift k to 𝕜ˣ using isUnit_iff_ne_zero.mpr (ne_zero_of_mem_of_unit hk)\n[GOAL]\ncase refine'_2.intro\n𝕜 : Type u\nA : Type v\ninst✝² : Field 𝕜\ninst✝¹ : Ring A\ninst✝ : Algebra 𝕜 A\na : Aˣ\nk : 𝕜ˣ\nhk : ↑k ∈ σ ↑a⁻¹\n⊢ ↑k ∈ (σ ↑a)⁻¹\n[PROOFSTEP]\nsimpa only [Units.val_inv_eq_inv_val] using inv_mem_iff.mp hk\n[GOAL]\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\ninst✝⁵ : CommSemiring R\ninst✝⁴ : Ring A\ninst✝³ : Algebra R A\ninst✝² : Ring B\ninst✝¹ : Algebra R B\ninst✝ : AlgHomClass F R A B\nφ : F\na : A\nr : R\nh : r ∈ resolventSet R a\n⊢ r ∈ resolventSet R (↑φ a)\n[PROOFSTEP]\nsimpa only [map_sub, AlgHomClass.commutes] using h.map φ\n[GOAL]\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\ninst✝⁶ : CommRing R\ninst✝⁵ : Ring A\ninst✝⁴ : Algebra R A\ninst✝³ : Ring B\ninst✝² : Algebra R B\ninst✝¹ : AlgHomClass F R A R\ninst✝ : Nontrivial R\nφ : F\na : A\n⊢ ↑φ a ∈ σ a\n[PROOFSTEP]\nhave h : ↑ₐ (φ a) - a ∈ RingHom.ker (φ : A →+* R) := by\n  simp only [RingHom.mem_ker, map_sub, RingHom.coe_coe, AlgHomClass.commutes, Algebra.id.map_eq_id, RingHom.id_apply,\n    sub_self]\n[GOAL]\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\ninst✝⁶ : CommRing R\ninst✝⁵ : Ring A\ninst✝⁴ : Algebra R A\ninst✝³ : Ring B\ninst✝² : Algebra R B\ninst✝¹ : AlgHomClass F R A R\ninst✝ : Nontrivial R\nφ : F\na : A\n⊢ ↑↑ₐ (↑φ a) - a ∈ RingHom.ker ↑φ\n[PROOFSTEP]\nsimp only [RingHom.mem_ker, map_sub, RingHom.coe_coe, AlgHomClass.commutes, Algebra.id.map_eq_id, RingHom.id_apply,\n  sub_self]\n[GOAL]\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\ninst✝⁶ : CommRing R\ninst✝⁵ : Ring A\ninst✝⁴ : Algebra R A\ninst✝³ : Ring B\ninst✝² : Algebra R B\ninst✝¹ : AlgHomClass F R A R\ninst✝ : Nontrivial R\nφ : F\na : A\nh : ↑↑ₐ (↑φ a) - a ∈ RingHom.ker ↑φ\n⊢ ↑φ a ∈ σ a\n[PROOFSTEP]\nsimp only [spectrum.mem_iff, ← mem_nonunits_iff, coe_subset_nonunits (RingHom.ker_ne_top (φ : A →+* R)) h]\n[GOAL]\nF : Type u_1\nR : Type u_2\nA : Type u_3\nB : Type u_4\ninst✝⁵ : CommSemiring R\ninst✝⁴ : Ring A\ninst✝³ : Ring B\ninst✝² : Algebra R A\ninst✝¹ : Algebra R B\ninst✝ : AlgEquivClass F R A B\nf : F\na : A\n⊢ spectrum R a ⊆ spectrum R (↑f a)\n[PROOFSTEP]\nsimpa only [AlgEquiv.coe_algHom, AlgEquiv.coe_coe_symm_apply_coe_apply] using\n  AlgHom.spectrum_apply_subset (f : A ≃ₐ[R] B).symm (f a)\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Algebra.Spectrum", "llama_tokens": 13705, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7931059511841119, "lm_q2_score": 0.6370307806984444, "lm_q1q2_score": 0.5052329032593972}}
{"text": "[GOAL]\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nθ : Real.Angle\n⊢ ∀ (x y : V),\n    inner (↑(Real.Angle.cos θ • LinearMap.id + Real.Angle.sin θ • ↑(rightAngleRotation o).toLinearEquiv) x)\n        (↑(Real.Angle.cos θ • LinearMap.id + Real.Angle.sin θ • ↑(rightAngleRotation o).toLinearEquiv) y) =\n      inner x y\n[PROOFSTEP]\nintro x y\n[GOAL]\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nθ : Real.Angle\nx y : V\n⊢ inner (↑(Real.Angle.cos θ • LinearMap.id + Real.Angle.sin θ • ↑(rightAngleRotation o).toLinearEquiv) x)\n      (↑(Real.Angle.cos θ • LinearMap.id + Real.Angle.sin θ • ↑(rightAngleRotation o).toLinearEquiv) y) =\n    inner x y\n[PROOFSTEP]\nsimp only [IsROrC.conj_to_real, id.def, LinearMap.smul_apply, LinearMap.add_apply, LinearMap.id_coe,\n  LinearEquiv.coe_coe, LinearIsometryEquiv.coe_toLinearEquiv, Orientation.areaForm_rightAngleRotation_left,\n  Orientation.inner_rightAngleRotation_left, Orientation.inner_rightAngleRotation_right, inner_add_left,\n  inner_smul_left, inner_add_right, inner_smul_right]\n[GOAL]\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nθ : Real.Angle\nx y : V\n⊢ Real.Angle.cos θ * (Real.Angle.cos θ * inner x y + Real.Angle.sin θ * ↑(↑(areaForm o) x) y) +\n      Real.Angle.sin θ * (Real.Angle.cos θ * -↑(↑(areaForm o) x) y + Real.Angle.sin θ * - -inner x y) =\n    inner x y\n[PROOFSTEP]\nlinear_combination inner (𝕜 := ℝ) x y * θ.cos_sq_add_sin_sq\n[GOAL]\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nθ : Real.Angle\n⊢ LinearMap.comp (rotationAux o θ).toLinearMap\n      (Real.Angle.cos θ • LinearMap.id - Real.Angle.sin θ • ↑(rightAngleRotation o).toLinearEquiv) =\n    LinearMap.id\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nθ : Real.Angle\nx : V\n⊢ ↑(LinearMap.comp (rotationAux o θ).toLinearMap\n          (Real.Angle.cos θ • LinearMap.id - Real.Angle.sin θ • ↑(rightAngleRotation o).toLinearEquiv))\n      x =\n    ↑LinearMap.id x\n[PROOFSTEP]\nconvert congr_arg (fun t : ℝ => t • x) θ.cos_sq_add_sin_sq using 1\n[GOAL]\ncase h.e'_2\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nθ : Real.Angle\nx : V\n⊢ ↑(LinearMap.comp (rotationAux o θ).toLinearMap\n          (Real.Angle.cos θ • LinearMap.id - Real.Angle.sin θ • ↑(rightAngleRotation o).toLinearEquiv))\n      x =\n    (Real.Angle.cos θ ^ 2 + Real.Angle.sin θ ^ 2) • x\n[PROOFSTEP]\nsimp only [o.rightAngleRotation_rightAngleRotation, o.rotationAux_apply, Function.comp_apply, id.def,\n  LinearEquiv.coe_coe, LinearIsometry.coe_toLinearMap, LinearIsometryEquiv.coe_toLinearEquiv, map_smul, map_sub,\n  LinearMap.coe_comp, LinearMap.id_coe, LinearMap.smul_apply, LinearMap.sub_apply, ← mul_smul, add_smul, smul_add,\n  smul_neg, smul_sub, mul_comm, sq]\n[GOAL]\ncase h.e'_2\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nθ : Real.Angle\nx : V\n⊢ (Real.Angle.cos θ * Real.Angle.cos θ) • x + (Real.Angle.cos θ * Real.Angle.sin θ) • ↑(rightAngleRotation o) x -\n      ((Real.Angle.cos θ * Real.Angle.sin θ) • ↑(rightAngleRotation o) x +\n        -((Real.Angle.sin θ * Real.Angle.sin θ) • x)) =\n    (Real.Angle.cos θ * Real.Angle.cos θ) • x + (Real.Angle.sin θ * Real.Angle.sin θ) • x\n[PROOFSTEP]\nabel\n[GOAL]\ncase h.e'_2\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nθ : Real.Angle\nx : V\n⊢ (Real.Angle.cos θ * Real.Angle.cos θ) • x + (Real.Angle.cos θ * Real.Angle.sin θ) • ↑(rightAngleRotation o) x -\n      ((Real.Angle.cos θ * Real.Angle.sin θ) • ↑(rightAngleRotation o) x +\n        -((Real.Angle.sin θ * Real.Angle.sin θ) • x)) =\n    (Real.Angle.cos θ * Real.Angle.cos θ) • x + (Real.Angle.sin θ * Real.Angle.sin θ) • x\n[PROOFSTEP]\nabel\n[GOAL]\ncase h.e'_3\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nθ : Real.Angle\nx : V\n⊢ ↑LinearMap.id x = 1 • x\n[PROOFSTEP]\nsimp\n[GOAL]\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nθ : Real.Angle\n⊢ LinearMap.comp (Real.Angle.cos θ • LinearMap.id - Real.Angle.sin θ • ↑(rightAngleRotation o).toLinearEquiv)\n      (rotationAux o θ).toLinearMap =\n    LinearMap.id\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nθ : Real.Angle\nx : V\n⊢ ↑(LinearMap.comp (Real.Angle.cos θ • LinearMap.id - Real.Angle.sin θ • ↑(rightAngleRotation o).toLinearEquiv)\n          (rotationAux o θ).toLinearMap)\n      x =\n    ↑LinearMap.id x\n[PROOFSTEP]\nconvert congr_arg (fun t : ℝ => t • x) θ.cos_sq_add_sin_sq using 1\n[GOAL]\ncase h.e'_2\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nθ : Real.Angle\nx : V\n⊢ ↑(LinearMap.comp (Real.Angle.cos θ • LinearMap.id - Real.Angle.sin θ • ↑(rightAngleRotation o).toLinearEquiv)\n          (rotationAux o θ).toLinearMap)\n      x =\n    (Real.Angle.cos θ ^ 2 + Real.Angle.sin θ ^ 2) • x\n[PROOFSTEP]\nsimp only [o.rightAngleRotation_rightAngleRotation, o.rotationAux_apply, Function.comp_apply, id.def,\n  LinearEquiv.coe_coe, LinearIsometry.coe_toLinearMap, LinearIsometryEquiv.coe_toLinearEquiv, map_add, map_smul,\n  LinearMap.coe_comp, LinearMap.id_coe, LinearMap.smul_apply, LinearMap.sub_apply, add_smul, smul_neg, smul_sub,\n  smul_smul]\n[GOAL]\ncase h.e'_2\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nθ : Real.Angle\nx : V\n⊢ (Real.Angle.cos θ * Real.Angle.cos θ) • x - (Real.Angle.cos θ * Real.Angle.sin θ) • ↑(rightAngleRotation o) x +\n      ((Real.Angle.sin θ * Real.Angle.cos θ) • ↑(rightAngleRotation o) x -\n        -((Real.Angle.sin θ * Real.Angle.sin θ) • x)) =\n    Real.Angle.cos θ ^ 2 • x + Real.Angle.sin θ ^ 2 • x\n[PROOFSTEP]\nring_nf\n[GOAL]\ncase h.e'_2\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nθ : Real.Angle\nx : V\n⊢ Real.Angle.cos θ ^ 2 • x - (Real.Angle.cos θ * Real.Angle.sin θ) • ↑(rightAngleRotation o) x +\n      ((Real.Angle.cos θ * Real.Angle.sin θ) • ↑(rightAngleRotation o) x - -(Real.Angle.sin θ ^ 2 • x)) =\n    Real.Angle.cos θ ^ 2 • x + Real.Angle.sin θ ^ 2 • x\n[PROOFSTEP]\nabel\n[GOAL]\ncase h.e'_2\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nθ : Real.Angle\nx : V\n⊢ Real.Angle.cos θ ^ 2 • x - (Real.Angle.cos θ * Real.Angle.sin θ) • ↑(rightAngleRotation o) x +\n      ((Real.Angle.cos θ * Real.Angle.sin θ) • ↑(rightAngleRotation o) x - -(Real.Angle.sin θ ^ 2 • x)) =\n    Real.Angle.cos θ ^ 2 • x + Real.Angle.sin θ ^ 2 • x\n[PROOFSTEP]\nabel\n[GOAL]\ncase h.e'_3\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nθ : Real.Angle\nx : V\n⊢ ↑LinearMap.id x = 1 • x\n[PROOFSTEP]\nsimp\n[GOAL]\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nθ : Real.Angle\nx : V\nhx : x ≠ 0\n⊢ ↑(rotation o θ).toLinearEquiv =\n    ↑(Matrix.toLin (basisRightAngleRotation o x hx) (basisRightAngleRotation o x hx))\n      (↑Matrix.of ![![Real.Angle.cos θ, -Real.Angle.sin θ], ![Real.Angle.sin θ, Real.Angle.cos θ]])\n[PROOFSTEP]\napply (o.basisRightAngleRotation x hx).ext\n[GOAL]\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nθ : Real.Angle\nx : V\nhx : x ≠ 0\n⊢ ∀ (i : Fin 2),\n    ↑↑(rotation o θ).toLinearEquiv (↑(basisRightAngleRotation o x hx) i) =\n      ↑(↑(Matrix.toLin (basisRightAngleRotation o x hx) (basisRightAngleRotation o x hx))\n            (↑Matrix.of ![![Real.Angle.cos θ, -Real.Angle.sin θ], ![Real.Angle.sin θ, Real.Angle.cos θ]]))\n        (↑(basisRightAngleRotation o x hx) i)\n[PROOFSTEP]\nintro i\n[GOAL]\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nθ : Real.Angle\nx : V\nhx : x ≠ 0\ni : Fin 2\n⊢ ↑↑(rotation o θ).toLinearEquiv (↑(basisRightAngleRotation o x hx) i) =\n    ↑(↑(Matrix.toLin (basisRightAngleRotation o x hx) (basisRightAngleRotation o x hx))\n          (↑Matrix.of ![![Real.Angle.cos θ, -Real.Angle.sin θ], ![Real.Angle.sin θ, Real.Angle.cos θ]]))\n      (↑(basisRightAngleRotation o x hx) i)\n[PROOFSTEP]\nfin_cases i\n[GOAL]\ncase head\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nθ : Real.Angle\nx : V\nhx : x ≠ 0\n⊢ ↑↑(rotation o θ).toLinearEquiv (↑(basisRightAngleRotation o x hx) { val := 0, isLt := (_ : 0 < 2) }) =\n    ↑(↑(Matrix.toLin (basisRightAngleRotation o x hx) (basisRightAngleRotation o x hx))\n          (↑Matrix.of ![![Real.Angle.cos θ, -Real.Angle.sin θ], ![Real.Angle.sin θ, Real.Angle.cos θ]]))\n      (↑(basisRightAngleRotation o x hx) { val := 0, isLt := (_ : 0 < 2) })\n[PROOFSTEP]\nrw [Matrix.toLin_self]\n[GOAL]\ncase head\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nθ : Real.Angle\nx : V\nhx : x ≠ 0\n⊢ ↑↑(rotation o θ).toLinearEquiv (↑(basisRightAngleRotation o x hx) { val := 0, isLt := (_ : 0 < 2) }) =\n    Finset.sum Finset.univ fun j =>\n      ↑Matrix.of ![![Real.Angle.cos θ, -Real.Angle.sin θ], ![Real.Angle.sin θ, Real.Angle.cos θ]] j\n          { val := 0, isLt := (_ : 0 < 2) } •\n        ↑(basisRightAngleRotation o x hx) j\n[PROOFSTEP]\nsimp [rotation_apply, Fin.sum_univ_succ]\n[GOAL]\ncase tail.head\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nθ : Real.Angle\nx : V\nhx : x ≠ 0\n⊢ ↑↑(rotation o θ).toLinearEquiv (↑(basisRightAngleRotation o x hx) { val := 1, isLt := (_ : (fun a => a < 2) 1) }) =\n    ↑(↑(Matrix.toLin (basisRightAngleRotation o x hx) (basisRightAngleRotation o x hx))\n          (↑Matrix.of ![![Real.Angle.cos θ, -Real.Angle.sin θ], ![Real.Angle.sin θ, Real.Angle.cos θ]]))\n      (↑(basisRightAngleRotation o x hx) { val := 1, isLt := (_ : (fun a => a < 2) 1) })\n[PROOFSTEP]\nrw [Matrix.toLin_self]\n[GOAL]\ncase tail.head\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nθ : Real.Angle\nx : V\nhx : x ≠ 0\n⊢ ↑↑(rotation o θ).toLinearEquiv (↑(basisRightAngleRotation o x hx) { val := 1, isLt := (_ : (fun a => a < 2) 1) }) =\n    Finset.sum Finset.univ fun j =>\n      ↑Matrix.of ![![Real.Angle.cos θ, -Real.Angle.sin θ], ![Real.Angle.sin θ, Real.Angle.cos θ]] j\n          { val := 1, isLt := (_ : (fun a => a < 2) 1) } •\n        ↑(basisRightAngleRotation o x hx) j\n[PROOFSTEP]\nsimp [rotation_apply, Fin.sum_univ_succ, add_comm]\n[GOAL]\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nθ : Real.Angle\n⊢ ↑LinearMap.det ↑(rotation o θ).toLinearEquiv = 1\n[PROOFSTEP]\nhaveI : Nontrivial V := FiniteDimensional.nontrivial_of_finrank_eq_succ (@Fact.out (finrank ℝ V = 2) _)\n[GOAL]\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nθ : Real.Angle\nthis : Nontrivial V\n⊢ ↑LinearMap.det ↑(rotation o θ).toLinearEquiv = 1\n[PROOFSTEP]\nobtain ⟨x, hx⟩ : ∃ x, x ≠ (0 : V) := exists_ne (0 : V)\n[GOAL]\ncase intro\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nθ : Real.Angle\nthis : Nontrivial V\nx : V\nhx : x ≠ 0\n⊢ ↑LinearMap.det ↑(rotation o θ).toLinearEquiv = 1\n[PROOFSTEP]\nrw [o.rotation_eq_matrix_toLin θ hx]\n[GOAL]\ncase intro\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nθ : Real.Angle\nthis : Nontrivial V\nx : V\nhx : x ≠ 0\n⊢ ↑LinearMap.det\n      (↑(Matrix.toLin (basisRightAngleRotation o x hx) (basisRightAngleRotation o x hx))\n        (↑Matrix.of ![![Real.Angle.cos θ, -Real.Angle.sin θ], ![Real.Angle.sin θ, Real.Angle.cos θ]])) =\n    1\n[PROOFSTEP]\nsimpa [sq] using θ.cos_sq_add_sin_sq\n[GOAL]\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nθ : Real.Angle\n⊢ ↑(↑LinearEquiv.det (rotation o θ).toLinearEquiv) = ↑1\n[PROOFSTEP]\nsimpa only [LinearEquiv.coe_det, Units.val_one] using o.det_rotation θ\n[GOAL]\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nθ : Real.Angle\n⊢ LinearIsometryEquiv.symm (rotation o θ) = rotation o (-θ)\n[PROOFSTEP]\next\n[GOAL]\ncase h\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nθ : Real.Angle\nx✝ : V\n⊢ ↑(LinearIsometryEquiv.symm (rotation o θ)) x✝ = ↑(rotation o (-θ)) x✝\n[PROOFSTEP]\nsimp [o.rotation_apply, o.rotation_symm_apply, sub_eq_add_neg]\n[GOAL]\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\n⊢ rotation o 0 = LinearIsometryEquiv.refl ℝ V\n[PROOFSTEP]\next\n[GOAL]\ncase h\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx✝ : V\n⊢ ↑(rotation o 0) x✝ = ↑(LinearIsometryEquiv.refl ℝ V) x✝\n[PROOFSTEP]\nsimp [rotation]\n[GOAL]\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\n⊢ rotation o ↑π = LinearIsometryEquiv.neg ℝ\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx : V\n⊢ ↑(rotation o ↑π) x = ↑(LinearIsometryEquiv.neg ℝ) x\n[PROOFSTEP]\nsimp [rotation]\n[GOAL]\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx : V\n⊢ ↑(rotation o ↑π) x = -x\n[PROOFSTEP]\nsimp\n[GOAL]\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\n⊢ rotation o ↑(π / 2) = rightAngleRotation o\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx : V\n⊢ ↑(rotation o ↑(π / 2)) x = ↑(rightAngleRotation o) x\n[PROOFSTEP]\nsimp [rotation]\n[GOAL]\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nθ₁ θ₂ : Real.Angle\nx : V\n⊢ ↑(rotation o θ₁) (↑(rotation o θ₂) x) = ↑(rotation o (θ₁ + θ₂)) x\n[PROOFSTEP]\nsimp only [o.rotation_apply, ← mul_smul, Real.Angle.cos_add, Real.Angle.sin_add, add_smul, sub_smul,\n  LinearIsometryEquiv.trans_apply, smul_add, LinearIsometryEquiv.map_add, LinearIsometryEquiv.map_smul,\n  rightAngleRotation_rightAngleRotation, smul_neg]\n[GOAL]\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nθ₁ θ₂ : Real.Angle\nx : V\n⊢ (Real.Angle.cos θ₂ * Real.Angle.cos θ₁) • x + (Real.Angle.cos θ₂ * Real.Angle.sin θ₁) • ↑(rightAngleRotation o) x +\n      ((Real.Angle.sin θ₂ * Real.Angle.cos θ₁) • ↑(rightAngleRotation o) x +\n        -((Real.Angle.sin θ₂ * Real.Angle.sin θ₁) • x)) =\n    (Real.Angle.cos θ₁ * Real.Angle.cos θ₂) • x - (Real.Angle.sin θ₁ * Real.Angle.sin θ₂) • x +\n      ((Real.Angle.sin θ₁ * Real.Angle.cos θ₂) • ↑(rightAngleRotation o) x +\n        (Real.Angle.cos θ₁ * Real.Angle.sin θ₂) • ↑(rightAngleRotation o) x)\n[PROOFSTEP]\nring_nf\n[GOAL]\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nθ₁ θ₂ : Real.Angle\nx : V\n⊢ (Real.Angle.cos θ₂ * Real.Angle.cos θ₁) • x + (Real.Angle.cos θ₂ * Real.Angle.sin θ₁) • ↑(rightAngleRotation o) x +\n      ((Real.Angle.cos θ₁ * Real.Angle.sin θ₂) • ↑(rightAngleRotation o) x +\n        -((Real.Angle.sin θ₁ * Real.Angle.sin θ₂) • x)) =\n    (Real.Angle.cos θ₂ * Real.Angle.cos θ₁) • x - (Real.Angle.sin θ₁ * Real.Angle.sin θ₂) • x +\n      ((Real.Angle.cos θ₂ * Real.Angle.sin θ₁) • ↑(rightAngleRotation o) x +\n        (Real.Angle.cos θ₁ * Real.Angle.sin θ₂) • ↑(rightAngleRotation o) x)\n[PROOFSTEP]\nabel\n[GOAL]\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nθ₁ θ₂ : Real.Angle\nx : V\n⊢ (Real.Angle.cos θ₂ * Real.Angle.cos θ₁) • x + (Real.Angle.cos θ₂ * Real.Angle.sin θ₁) • ↑(rightAngleRotation o) x +\n      ((Real.Angle.cos θ₁ * Real.Angle.sin θ₂) • ↑(rightAngleRotation o) x +\n        -((Real.Angle.sin θ₁ * Real.Angle.sin θ₂) • x)) =\n    (Real.Angle.cos θ₂ * Real.Angle.cos θ₁) • x - (Real.Angle.sin θ₁ * Real.Angle.sin θ₂) • x +\n      ((Real.Angle.cos θ₂ * Real.Angle.sin θ₁) • ↑(rightAngleRotation o) x +\n        (Real.Angle.cos θ₁ * Real.Angle.sin θ₂) • ↑(rightAngleRotation o) x)\n[PROOFSTEP]\nabel\n[GOAL]\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nθ₁ θ₂ : Real.Angle\nx✝ : V\n⊢ ↑(LinearIsometryEquiv.trans (rotation o θ₁) (rotation o θ₂)) x✝ = ↑(rotation o (θ₂ + θ₁)) x✝\n[PROOFSTEP]\nrw [← rotation_rotation, LinearIsometryEquiv.trans_apply]\n[GOAL]\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nθ : Real.Angle\n⊢ ↑(↑(kahler o) (↑(rotation o θ) x)) y = ↑(starRingEnd ℂ) ↑(Real.Angle.expMapCircle θ) * ↑(↑(kahler o) x) y\n[PROOFSTEP]\nsimp only [o.rotation_apply, map_add, map_mul, LinearMap.map_smulₛₗ, RingHom.id_apply, LinearMap.add_apply,\n  LinearMap.smul_apply, real_smul, kahler_rightAngleRotation_left, Real.Angle.coe_expMapCircle, Complex.conj_ofReal,\n  conj_I]\n[GOAL]\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nθ : Real.Angle\n⊢ ↑(Real.Angle.cos θ) * ↑(↑(kahler o) x) y + ↑(Real.Angle.sin θ) * (-I * ↑(↑(kahler o) x) y) =\n    (↑(Real.Angle.cos θ) + ↑(Real.Angle.sin θ) * -I) * ↑(↑(kahler o) x) y\n[PROOFSTEP]\nring\n[GOAL]\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nθ : Real.Angle\nx : V\n⊢ -↑(rotation o θ) x = ↑(rotation o (↑π + θ)) x\n[PROOFSTEP]\nrw [← o.rotation_pi_apply, rotation_rotation]\n[GOAL]\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx : V\n⊢ -↑(rotation o ↑(-π / 2)) x = ↑(rotation o ↑(π / 2)) x\n[PROOFSTEP]\nrw [neg_rotation, ← Real.Angle.coe_add, neg_div, ← sub_eq_add_neg, sub_half]\n[GOAL]\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nθ : Real.Angle\n⊢ ↑(↑(kahler o) (↑(rotation o θ) x)) y = ↑(Real.Angle.expMapCircle (-θ)) * ↑(↑(kahler o) x) y\n[PROOFSTEP]\nsimp only [Real.Angle.expMapCircle_neg, coe_inv_circle_eq_conj, kahler_rotation_left]\n[GOAL]\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nθ : Real.Angle\n⊢ ↑(↑(kahler o) x) (↑(rotation o θ) y) = ↑(Real.Angle.expMapCircle θ) * ↑(↑(kahler o) x) y\n[PROOFSTEP]\nsimp only [o.rotation_apply, map_add, LinearMap.map_smulₛₗ, RingHom.id_apply, real_smul,\n  kahler_rightAngleRotation_right, Real.Angle.coe_expMapCircle]\n[GOAL]\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nθ : Real.Angle\n⊢ ↑(Real.Angle.cos θ) * ↑(↑(kahler o) x) y + ↑(Real.Angle.sin θ) * (I * ↑(↑(kahler o) x) y) =\n    (↑(Real.Angle.cos θ) + ↑(Real.Angle.sin θ) * I) * ↑(↑(kahler o) x) y\n[PROOFSTEP]\nring\n[GOAL]\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\nθ : Real.Angle\n⊢ oangle o (↑(rotation o θ) x) y = oangle o x y - θ\n[PROOFSTEP]\nsimp only [oangle, o.kahler_rotation_left']\n[GOAL]\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\nθ : Real.Angle\n⊢ ↑(arg (↑(Real.Angle.expMapCircle (-θ)) * ↑(↑(kahler o) x) y)) = ↑(arg (↑(↑(kahler o) x) y)) - θ\n[PROOFSTEP]\nrw [Complex.arg_mul_coe_angle, Real.Angle.arg_expMapCircle]\n[GOAL]\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\nθ : Real.Angle\n⊢ -θ + ↑(arg (↑(↑(kahler o) x) y)) = ↑(arg (↑(↑(kahler o) x) y)) - θ\n[PROOFSTEP]\nabel\n[GOAL]\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\nθ : Real.Angle\n⊢ -θ + ↑(arg (↑(↑(kahler o) x) y)) = ↑(arg (↑(↑(kahler o) x) y)) - θ\n[PROOFSTEP]\nabel\n[GOAL]\ncase hx\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\nθ : Real.Angle\n⊢ ↑(Real.Angle.expMapCircle (-θ)) ≠ 0\n[PROOFSTEP]\nexact ne_zero_of_mem_circle _\n[GOAL]\ncase hy\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\nθ : Real.Angle\n⊢ ↑(↑(kahler o) x) y ≠ 0\n[PROOFSTEP]\nexact o.kahler_ne_zero hx hy\n[GOAL]\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\nθ : Real.Angle\n⊢ oangle o x (↑(rotation o θ) y) = oangle o x y + θ\n[PROOFSTEP]\nsimp only [oangle, o.kahler_rotation_right]\n[GOAL]\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\nθ : Real.Angle\n⊢ ↑(arg (↑(Real.Angle.expMapCircle θ) * ↑(↑(kahler o) x) y)) = ↑(arg (↑(↑(kahler o) x) y)) + θ\n[PROOFSTEP]\nrw [Complex.arg_mul_coe_angle, Real.Angle.arg_expMapCircle]\n[GOAL]\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\nθ : Real.Angle\n⊢ θ + ↑(arg (↑(↑(kahler o) x) y)) = ↑(arg (↑(↑(kahler o) x) y)) + θ\n[PROOFSTEP]\nabel\n[GOAL]\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\nθ : Real.Angle\n⊢ θ + ↑(arg (↑(↑(kahler o) x) y)) = ↑(arg (↑(↑(kahler o) x) y)) + θ\n[PROOFSTEP]\nabel\n[GOAL]\ncase hx\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\nθ : Real.Angle\n⊢ ↑(Real.Angle.expMapCircle θ) ≠ 0\n[PROOFSTEP]\nexact ne_zero_of_mem_circle _\n[GOAL]\ncase hy\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\nθ : Real.Angle\n⊢ ↑(↑(kahler o) x) y ≠ 0\n[PROOFSTEP]\nexact o.kahler_ne_zero hx hy\n[GOAL]\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx : V\nhx : x ≠ 0\nθ : Real.Angle\n⊢ oangle o (↑(rotation o θ) x) x = -θ\n[PROOFSTEP]\nsimp [hx]\n[GOAL]\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx : V\nhx : x ≠ 0\nθ : Real.Angle\n⊢ oangle o x (↑(rotation o θ) x) = θ\n[PROOFSTEP]\nsimp [hx]\n[GOAL]\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\n⊢ oangle o (↑(rotation o (oangle o x y)) x) y = 0\n[PROOFSTEP]\nby_cases hx : x = 0\n[GOAL]\ncase pos\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nhx : x = 0\n⊢ oangle o (↑(rotation o (oangle o x y)) x) y = 0\n[PROOFSTEP]\nsimp [hx]\n[GOAL]\ncase neg\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nhx : ¬x = 0\n⊢ oangle o (↑(rotation o (oangle o x y)) x) y = 0\n[PROOFSTEP]\nby_cases hy : y = 0\n[GOAL]\ncase pos\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nhx : ¬x = 0\nhy : y = 0\n⊢ oangle o (↑(rotation o (oangle o x y)) x) y = 0\n[PROOFSTEP]\nsimp [hy]\n[GOAL]\ncase neg\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nhx : ¬x = 0\nhy : ¬y = 0\n⊢ oangle o (↑(rotation o (oangle o x y)) x) y = 0\n[PROOFSTEP]\nsimp [hx, hy]\n[GOAL]\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\n⊢ oangle o y (↑(rotation o (oangle o x y)) x) = 0\n[PROOFSTEP]\nrw [oangle_rev]\n[GOAL]\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\n⊢ -oangle o (↑(rotation o (oangle o x y)) x) y = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nθ : Real.Angle\n⊢ oangle o (↑(rotation o θ) x) (↑(rotation o θ) y) = oangle o x y\n[PROOFSTEP]\nby_cases hx : x = 0\n[GOAL]\ncase pos\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nθ : Real.Angle\nhx : x = 0\n⊢ oangle o (↑(rotation o θ) x) (↑(rotation o θ) y) = oangle o x y\n[PROOFSTEP]\nby_cases hy : y = 0\n[GOAL]\ncase neg\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nθ : Real.Angle\nhx : ¬x = 0\n⊢ oangle o (↑(rotation o θ) x) (↑(rotation o θ) y) = oangle o x y\n[PROOFSTEP]\nby_cases hy : y = 0\n[GOAL]\ncase pos\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nθ : Real.Angle\nhx : x = 0\nhy : y = 0\n⊢ oangle o (↑(rotation o θ) x) (↑(rotation o θ) y) = oangle o x y\n[PROOFSTEP]\nsimp [hx, hy]\n[GOAL]\ncase neg\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nθ : Real.Angle\nhx : x = 0\nhy : ¬y = 0\n⊢ oangle o (↑(rotation o θ) x) (↑(rotation o θ) y) = oangle o x y\n[PROOFSTEP]\nsimp [hx, hy]\n[GOAL]\ncase pos\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nθ : Real.Angle\nhx : ¬x = 0\nhy : y = 0\n⊢ oangle o (↑(rotation o θ) x) (↑(rotation o θ) y) = oangle o x y\n[PROOFSTEP]\nsimp [hx, hy]\n[GOAL]\ncase neg\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nθ : Real.Angle\nhx : ¬x = 0\nhy : ¬y = 0\n⊢ oangle o (↑(rotation o θ) x) (↑(rotation o θ) y) = oangle o x y\n[PROOFSTEP]\nsimp [hx, hy]\n[GOAL]\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx : V\nhx : x ≠ 0\nθ : Real.Angle\n⊢ ↑(rotation o θ) x = x ↔ θ = 0\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx : V\nhx : x ≠ 0\nθ : Real.Angle\n⊢ ↑(rotation o θ) x = x → θ = 0\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx : V\nhx : x ≠ 0\nθ : Real.Angle\nh : ↑(rotation o θ) x = x\n⊢ θ = 0\n[PROOFSTEP]\nrw [eq_comm]\n[GOAL]\ncase mp\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx : V\nhx : x ≠ 0\nθ : Real.Angle\nh : ↑(rotation o θ) x = x\n⊢ 0 = θ\n[PROOFSTEP]\nsimpa [hx, h] using o.oangle_rotation_right hx hx θ\n[GOAL]\ncase mpr\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx : V\nhx : x ≠ 0\nθ : Real.Angle\n⊢ θ = 0 → ↑(rotation o θ) x = x\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx : V\nhx : x ≠ 0\nθ : Real.Angle\nh : θ = 0\n⊢ ↑(rotation o θ) x = x\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx : V\nhx : x ≠ 0\nθ : Real.Angle\n⊢ x = ↑(rotation o θ) x ↔ θ = 0\n[PROOFSTEP]\nrw [← o.rotation_eq_self_iff_angle_eq_zero hx, eq_comm]\n[GOAL]\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx : V\nθ : Real.Angle\n⊢ ↑(rotation o θ) x = x ↔ x = 0 ∨ θ = 0\n[PROOFSTEP]\nby_cases h : x = 0\n[GOAL]\ncase pos\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx : V\nθ : Real.Angle\nh : x = 0\n⊢ ↑(rotation o θ) x = x ↔ x = 0 ∨ θ = 0\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase neg\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx : V\nθ : Real.Angle\nh : ¬x = 0\n⊢ ↑(rotation o θ) x = x ↔ x = 0 ∨ θ = 0\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx : V\nθ : Real.Angle\n⊢ x = ↑(rotation o θ) x ↔ x = 0 ∨ θ = 0\n[PROOFSTEP]\nrw [← rotation_eq_self_iff, eq_comm]\n[GOAL]\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\n⊢ ↑(rotation o (oangle o x y)) x = y ↔ ‖x‖ = ‖y‖\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\n⊢ ↑(rotation o (oangle o x y)) x = y → ‖x‖ = ‖y‖\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : ↑(rotation o (oangle o x y)) x = y\n⊢ ‖x‖ = ‖y‖\n[PROOFSTEP]\nrw [← h, LinearIsometryEquiv.norm_map]\n[GOAL]\ncase mpr\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\n⊢ ‖x‖ = ‖y‖ → ↑(rotation o (oangle o x y)) x = y\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : ‖x‖ = ‖y‖\n⊢ ↑(rotation o (oangle o x y)) x = y\n[PROOFSTEP]\nrw [o.eq_iff_oangle_eq_zero_of_norm_eq]\n[GOAL]\ncase mpr\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : ‖x‖ = ‖y‖\n⊢ oangle o (↑(rotation o (oangle o x y)) x) y = 0\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase mpr\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : ‖x‖ = ‖y‖\n⊢ ‖↑(rotation o (oangle o x y)) x‖ = ‖y‖\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\nθ : Real.Angle\n⊢ oangle o x y = θ ↔ y = (‖y‖ / ‖x‖) • ↑(rotation o θ) x\n[PROOFSTEP]\nhave hp := div_pos (norm_pos_iff.2 hy) (norm_pos_iff.2 hx)\n[GOAL]\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\nθ : Real.Angle\nhp : 0 < ‖y‖ / ‖x‖\n⊢ oangle o x y = θ ↔ y = (‖y‖ / ‖x‖) • ↑(rotation o θ) x\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\nθ : Real.Angle\nhp : 0 < ‖y‖ / ‖x‖\n⊢ oangle o x y = θ → y = (‖y‖ / ‖x‖) • ↑(rotation o θ) x\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase mp\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\nhp : 0 < ‖y‖ / ‖x‖\n⊢ y = (‖y‖ / ‖x‖) • ↑(rotation o (oangle o x y)) x\n[PROOFSTEP]\nrw [← LinearIsometryEquiv.map_smul, ← o.oangle_smul_left_of_pos x y hp, eq_comm, rotation_oangle_eq_iff_norm_eq,\n  norm_smul, Real.norm_of_nonneg hp.le, div_mul_cancel _ (norm_ne_zero_iff.2 hx)]\n[GOAL]\ncase mpr\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\nθ : Real.Angle\nhp : 0 < ‖y‖ / ‖x‖\n⊢ y = (‖y‖ / ‖x‖) • ↑(rotation o θ) x → oangle o x y = θ\n[PROOFSTEP]\nintro hye\n[GOAL]\ncase mpr\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\nθ : Real.Angle\nhp : 0 < ‖y‖ / ‖x‖\nhye : y = (‖y‖ / ‖x‖) • ↑(rotation o θ) x\n⊢ oangle o x y = θ\n[PROOFSTEP]\nrw [hye, o.oangle_smul_right_of_pos _ _ hp, o.oangle_rotation_self_right hx]\n[GOAL]\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\nθ : Real.Angle\n⊢ oangle o x y = θ ↔ ∃ r, 0 < r ∧ y = r • ↑(rotation o θ) x\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\nθ : Real.Angle\n⊢ oangle o x y = θ → ∃ r, 0 < r ∧ y = r • ↑(rotation o θ) x\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\nθ : Real.Angle\nh : oangle o x y = θ\n⊢ ∃ r, 0 < r ∧ y = r • ↑(rotation o θ) x\n[PROOFSTEP]\nrw [o.oangle_eq_iff_eq_norm_div_norm_smul_rotation_of_ne_zero hx hy] at h \n[GOAL]\ncase mp\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\nθ : Real.Angle\nh : y = (‖y‖ / ‖x‖) • ↑(rotation o θ) x\n⊢ ∃ r, 0 < r ∧ y = r • ↑(rotation o θ) x\n[PROOFSTEP]\nexact ⟨‖y‖ / ‖x‖, div_pos (norm_pos_iff.2 hy) (norm_pos_iff.2 hx), h⟩\n[GOAL]\ncase mpr\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nhx : x ≠ 0\nhy : y ≠ 0\nθ : Real.Angle\n⊢ (∃ r, 0 < r ∧ y = r • ↑(rotation o θ) x) → oangle o x y = θ\n[PROOFSTEP]\nrintro ⟨r, hr, rfl⟩\n[GOAL]\ncase mpr.intro.intro\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx : V\nhx : x ≠ 0\nθ : Real.Angle\nr : ℝ\nhr : 0 < r\nhy : r • ↑(rotation o θ) x ≠ 0\n⊢ oangle o x (r • ↑(rotation o θ) x) = θ\n[PROOFSTEP]\nrw [o.oangle_smul_right_of_pos _ _ hr, o.oangle_rotation_self_right hx]\n[GOAL]\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nθ : Real.Angle\n⊢ oangle o x y = θ ↔ x ≠ 0 ∧ y ≠ 0 ∧ y = (‖y‖ / ‖x‖) • ↑(rotation o θ) x ∨ θ = 0 ∧ (x = 0 ∨ y = 0)\n[PROOFSTEP]\nby_cases hx : x = 0\n[GOAL]\ncase pos\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nθ : Real.Angle\nhx : x = 0\n⊢ oangle o x y = θ ↔ x ≠ 0 ∧ y ≠ 0 ∧ y = (‖y‖ / ‖x‖) • ↑(rotation o θ) x ∨ θ = 0 ∧ (x = 0 ∨ y = 0)\n[PROOFSTEP]\nsimp [hx, eq_comm]\n[GOAL]\ncase neg\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nθ : Real.Angle\nhx : ¬x = 0\n⊢ oangle o x y = θ ↔ x ≠ 0 ∧ y ≠ 0 ∧ y = (‖y‖ / ‖x‖) • ↑(rotation o θ) x ∨ θ = 0 ∧ (x = 0 ∨ y = 0)\n[PROOFSTEP]\nby_cases hy : y = 0\n[GOAL]\ncase pos\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nθ : Real.Angle\nhx : ¬x = 0\nhy : y = 0\n⊢ oangle o x y = θ ↔ x ≠ 0 ∧ y ≠ 0 ∧ y = (‖y‖ / ‖x‖) • ↑(rotation o θ) x ∨ θ = 0 ∧ (x = 0 ∨ y = 0)\n[PROOFSTEP]\nsimp [hy, eq_comm]\n[GOAL]\ncase neg\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nθ : Real.Angle\nhx : ¬x = 0\nhy : ¬y = 0\n⊢ oangle o x y = θ ↔ x ≠ 0 ∧ y ≠ 0 ∧ y = (‖y‖ / ‖x‖) • ↑(rotation o θ) x ∨ θ = 0 ∧ (x = 0 ∨ y = 0)\n[PROOFSTEP]\nrw [o.oangle_eq_iff_eq_norm_div_norm_smul_rotation_of_ne_zero hx hy]\n[GOAL]\ncase neg\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nθ : Real.Angle\nhx : ¬x = 0\nhy : ¬y = 0\n⊢ y = (‖y‖ / ‖x‖) • ↑(rotation o θ) x ↔ x ≠ 0 ∧ y ≠ 0 ∧ y = (‖y‖ / ‖x‖) • ↑(rotation o θ) x ∨ θ = 0 ∧ (x = 0 ∨ y = 0)\n[PROOFSTEP]\nsimp [hx, hy]\n[GOAL]\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nθ : Real.Angle\n⊢ oangle o x y = θ ↔ (x ≠ 0 ∧ y ≠ 0 ∧ ∃ r, 0 < r ∧ y = r • ↑(rotation o θ) x) ∨ θ = 0 ∧ (x = 0 ∨ y = 0)\n[PROOFSTEP]\nby_cases hx : x = 0\n[GOAL]\ncase pos\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nθ : Real.Angle\nhx : x = 0\n⊢ oangle o x y = θ ↔ (x ≠ 0 ∧ y ≠ 0 ∧ ∃ r, 0 < r ∧ y = r • ↑(rotation o θ) x) ∨ θ = 0 ∧ (x = 0 ∨ y = 0)\n[PROOFSTEP]\nsimp [hx, eq_comm]\n[GOAL]\ncase neg\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nθ : Real.Angle\nhx : ¬x = 0\n⊢ oangle o x y = θ ↔ (x ≠ 0 ∧ y ≠ 0 ∧ ∃ r, 0 < r ∧ y = r • ↑(rotation o θ) x) ∨ θ = 0 ∧ (x = 0 ∨ y = 0)\n[PROOFSTEP]\nby_cases hy : y = 0\n[GOAL]\ncase pos\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nθ : Real.Angle\nhx : ¬x = 0\nhy : y = 0\n⊢ oangle o x y = θ ↔ (x ≠ 0 ∧ y ≠ 0 ∧ ∃ r, 0 < r ∧ y = r • ↑(rotation o θ) x) ∨ θ = 0 ∧ (x = 0 ∨ y = 0)\n[PROOFSTEP]\nsimp [hy, eq_comm]\n[GOAL]\ncase neg\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nθ : Real.Angle\nhx : ¬x = 0\nhy : ¬y = 0\n⊢ oangle o x y = θ ↔ (x ≠ 0 ∧ y ≠ 0 ∧ ∃ r, 0 < r ∧ y = r • ↑(rotation o θ) x) ∨ θ = 0 ∧ (x = 0 ∨ y = 0)\n[PROOFSTEP]\nrw [o.oangle_eq_iff_eq_pos_smul_rotation_of_ne_zero hx hy]\n[GOAL]\ncase neg\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nθ : Real.Angle\nhx : ¬x = 0\nhy : ¬y = 0\n⊢ (∃ r, 0 < r ∧ y = r • ↑(rotation o θ) x) ↔\n    (x ≠ 0 ∧ y ≠ 0 ∧ ∃ r, 0 < r ∧ y = r • ↑(rotation o θ) x) ∨ θ = 0 ∧ (x = 0 ∨ y = 0)\n[PROOFSTEP]\nsimp [hx, hy]\n[GOAL]\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nf : V ≃ₗᵢ[ℝ] V\nhd : 0 < ↑LinearMap.det ↑f.toLinearEquiv\n⊢ ∃ θ, f = rotation o θ\n[PROOFSTEP]\nhaveI : Nontrivial V := FiniteDimensional.nontrivial_of_finrank_eq_succ (@Fact.out (finrank ℝ V = 2) _)\n[GOAL]\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nf : V ≃ₗᵢ[ℝ] V\nhd : 0 < ↑LinearMap.det ↑f.toLinearEquiv\nthis : Nontrivial V\n⊢ ∃ θ, f = rotation o θ\n[PROOFSTEP]\nobtain ⟨x, hx⟩ : ∃ x, x ≠ (0 : V) := exists_ne (0 : V)\n[GOAL]\ncase intro\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nf : V ≃ₗᵢ[ℝ] V\nhd : 0 < ↑LinearMap.det ↑f.toLinearEquiv\nthis : Nontrivial V\nx : V\nhx : x ≠ 0\n⊢ ∃ θ, f = rotation o θ\n[PROOFSTEP]\nuse o.oangle x (f x)\n[GOAL]\ncase h\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nf : V ≃ₗᵢ[ℝ] V\nhd : 0 < ↑LinearMap.det ↑f.toLinearEquiv\nthis : Nontrivial V\nx : V\nhx : x ≠ 0\n⊢ f = rotation o (oangle o x (↑f x))\n[PROOFSTEP]\napply LinearIsometryEquiv.toLinearEquiv_injective\n[GOAL]\ncase h.a\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nf : V ≃ₗᵢ[ℝ] V\nhd : 0 < ↑LinearMap.det ↑f.toLinearEquiv\nthis : Nontrivial V\nx : V\nhx : x ≠ 0\n⊢ f.toLinearEquiv = (rotation o (oangle o x (↑f x))).toLinearEquiv\n[PROOFSTEP]\napply LinearEquiv.toLinearMap_injective\n[GOAL]\ncase h.a.a\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nf : V ≃ₗᵢ[ℝ] V\nhd : 0 < ↑LinearMap.det ↑f.toLinearEquiv\nthis : Nontrivial V\nx : V\nhx : x ≠ 0\n⊢ ↑f.toLinearEquiv = ↑(rotation o (oangle o x (↑f x))).toLinearEquiv\n[PROOFSTEP]\napply (o.basisRightAngleRotation x hx).ext\n[GOAL]\ncase h.a.a\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nf : V ≃ₗᵢ[ℝ] V\nhd : 0 < ↑LinearMap.det ↑f.toLinearEquiv\nthis : Nontrivial V\nx : V\nhx : x ≠ 0\n⊢ ∀ (i : Fin 2),\n    ↑↑f.toLinearEquiv (↑(basisRightAngleRotation o x hx) i) =\n      ↑↑(rotation o (oangle o x (↑f x))).toLinearEquiv (↑(basisRightAngleRotation o x hx) i)\n[PROOFSTEP]\nintro i\n[GOAL]\ncase h.a.a\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nf : V ≃ₗᵢ[ℝ] V\nhd : 0 < ↑LinearMap.det ↑f.toLinearEquiv\nthis : Nontrivial V\nx : V\nhx : x ≠ 0\ni : Fin 2\n⊢ ↑↑f.toLinearEquiv (↑(basisRightAngleRotation o x hx) i) =\n    ↑↑(rotation o (oangle o x (↑f x))).toLinearEquiv (↑(basisRightAngleRotation o x hx) i)\n[PROOFSTEP]\nsymm\n[GOAL]\ncase h.a.a\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nf : V ≃ₗᵢ[ℝ] V\nhd : 0 < ↑LinearMap.det ↑f.toLinearEquiv\nthis : Nontrivial V\nx : V\nhx : x ≠ 0\ni : Fin 2\n⊢ ↑↑(rotation o (oangle o x (↑f x))).toLinearEquiv (↑(basisRightAngleRotation o x hx) i) =\n    ↑↑f.toLinearEquiv (↑(basisRightAngleRotation o x hx) i)\n[PROOFSTEP]\nfin_cases i\n[GOAL]\ncase h.a.a.head\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nf : V ≃ₗᵢ[ℝ] V\nhd : 0 < ↑LinearMap.det ↑f.toLinearEquiv\nthis : Nontrivial V\nx : V\nhx : x ≠ 0\n⊢ ↑↑(rotation o (oangle o x (↑f x))).toLinearEquiv\n      (↑(basisRightAngleRotation o x hx) { val := 0, isLt := (_ : 0 < 2) }) =\n    ↑↑f.toLinearEquiv (↑(basisRightAngleRotation o x hx) { val := 0, isLt := (_ : 0 < 2) })\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.a.a.tail.head\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nf : V ≃ₗᵢ[ℝ] V\nhd : 0 < ↑LinearMap.det ↑f.toLinearEquiv\nthis : Nontrivial V\nx : V\nhx : x ≠ 0\n⊢ ↑↑(rotation o (oangle o x (↑f x))).toLinearEquiv\n      (↑(basisRightAngleRotation o x hx) { val := 1, isLt := (_ : (fun a => a < 2) 1) }) =\n    ↑↑f.toLinearEquiv (↑(basisRightAngleRotation o x hx) { val := 1, isLt := (_ : (fun a => a < 2) 1) })\n[PROOFSTEP]\nhave : o.oangle (J x) (f (J x)) = o.oangle x (f x) := by\n  simp only [oangle, o.linearIsometryEquiv_comp_rightAngleRotation f hd, o.kahler_comp_rightAngleRotation]\n[GOAL]\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nf : V ≃ₗᵢ[ℝ] V\nhd : 0 < ↑LinearMap.det ↑f.toLinearEquiv\nthis : Nontrivial V\nx : V\nhx : x ≠ 0\n⊢ oangle o (↑(rightAngleRotation o) x) (↑f (↑(rightAngleRotation o) x)) = oangle o x (↑f x)\n[PROOFSTEP]\nsimp only [oangle, o.linearIsometryEquiv_comp_rightAngleRotation f hd, o.kahler_comp_rightAngleRotation]\n[GOAL]\ncase h.a.a.tail.head\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nf : V ≃ₗᵢ[ℝ] V\nhd : 0 < ↑LinearMap.det ↑f.toLinearEquiv\nthis✝ : Nontrivial V\nx : V\nhx : x ≠ 0\nthis : oangle o (↑(rightAngleRotation o) x) (↑f (↑(rightAngleRotation o) x)) = oangle o x (↑f x)\n⊢ ↑↑(rotation o (oangle o x (↑f x))).toLinearEquiv\n      (↑(basisRightAngleRotation o x hx) { val := 1, isLt := (_ : (fun a => a < 2) 1) }) =\n    ↑↑f.toLinearEquiv (↑(basisRightAngleRotation o x hx) { val := 1, isLt := (_ : (fun a => a < 2) 1) })\n[PROOFSTEP]\nsimp [← this]\n[GOAL]\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nθ : Real.Angle\nf : V ≃ₗᵢ[ℝ] V'\nx : V'\n⊢ ↑(rotation (↑(map (Fin 2) f.toLinearEquiv) o) θ) x = ↑f (↑(rotation o θ) (↑(LinearIsometryEquiv.symm f) x))\n[PROOFSTEP]\nsimp [rotation_apply, o.rightAngleRotation_map]\n[GOAL]\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nθ : Real.Angle\nz : ℂ\n⊢ ↑(rotation Complex.orientation θ) z = ↑(Real.Angle.expMapCircle θ) * z\n[PROOFSTEP]\nsimp only [rotation_apply, Complex.rightAngleRotation, Real.Angle.coe_expMapCircle, real_smul]\n[GOAL]\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nθ : Real.Angle\nz : ℂ\n⊢ ↑(Real.Angle.cos θ) * z + ↑(Real.Angle.sin θ) * (I * z) = (↑(Real.Angle.cos θ) + ↑(Real.Angle.sin θ) * I) * z\n[PROOFSTEP]\nring\n[GOAL]\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nθ : Real.Angle\nf : V ≃ₗᵢ[ℝ] ℂ\nhf : ↑(map (Fin 2) f.toLinearEquiv) o = Complex.orientation\nx : V\n⊢ ↑f (↑(rotation o θ) x) = ↑(Real.Angle.expMapCircle θ) * ↑f x\n[PROOFSTEP]\nrw [← Complex.rotation, ← hf, o.rotation_map, LinearIsometryEquiv.symm_apply_apply]\n[GOAL]\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nθ : Real.Angle\n⊢ ∀ (x : V), ↑(rotation (-o) θ) x = ↑(rotation o (-θ)) x\n[PROOFSTEP]\nsimp [rotation_apply]\n[GOAL]\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx : V\n⊢ inner (↑(rotation o ↑(π / 2)) x) x = 0\n[PROOFSTEP]\nrw [rotation_pi_div_two, inner_rightAngleRotation_self]\n[GOAL]\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx : V\n⊢ inner x (↑(rotation o ↑(π / 2)) x) = 0\n[PROOFSTEP]\nrw [real_inner_comm, inner_rotation_pi_div_two_left]\n[GOAL]\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx : V\nr : ℝ\n⊢ inner (r • ↑(rotation o ↑(π / 2)) x) x = 0\n[PROOFSTEP]\nrw [inner_smul_left, inner_rotation_pi_div_two_left, mul_zero]\n[GOAL]\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx : V\nr : ℝ\n⊢ inner x (r • ↑(rotation o ↑(π / 2)) x) = 0\n[PROOFSTEP]\nrw [real_inner_comm, inner_smul_rotation_pi_div_two_left]\n[GOAL]\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx : V\nr : ℝ\n⊢ inner (↑(rotation o ↑(π / 2)) x) (r • x) = 0\n[PROOFSTEP]\nrw [inner_smul_right, inner_rotation_pi_div_two_left, mul_zero]\n[GOAL]\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx : V\nr : ℝ\n⊢ inner (r • x) (↑(rotation o ↑(π / 2)) x) = 0\n[PROOFSTEP]\nrw [real_inner_comm, inner_rotation_pi_div_two_left_smul]\n[GOAL]\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx : V\nr₁ r₂ : ℝ\n⊢ inner (r₁ • ↑(rotation o ↑(π / 2)) x) (r₂ • x) = 0\n[PROOFSTEP]\nrw [inner_smul_right, inner_smul_rotation_pi_div_two_left, mul_zero]\n[GOAL]\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx : V\nr₁ r₂ : ℝ\n⊢ inner (r₂ • x) (r₁ • ↑(rotation o ↑(π / 2)) x) = 0\n[PROOFSTEP]\nrw [real_inner_comm, inner_smul_rotation_pi_div_two_smul_left]\n[GOAL]\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\n⊢ inner x y = 0 ↔ x = 0 ∨ ∃ r, r • ↑(rotation o ↑(π / 2)) x = y\n[PROOFSTEP]\nrw [← o.eq_zero_or_oangle_eq_iff_inner_eq_zero]\n[GOAL]\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\n⊢ x = 0 ∨ y = 0 ∨ oangle o x y = ↑(π / 2) ∨ oangle o x y = ↑(-π / 2) ↔ x = 0 ∨ ∃ r, r • ↑(rotation o ↑(π / 2)) x = y\n[PROOFSTEP]\nrefine' ⟨fun h => _, fun h => _⟩\n[GOAL]\ncase refine'_1\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : x = 0 ∨ y = 0 ∨ oangle o x y = ↑(π / 2) ∨ oangle o x y = ↑(-π / 2)\n⊢ x = 0 ∨ ∃ r, r • ↑(rotation o ↑(π / 2)) x = y\n[PROOFSTEP]\nrcases h with (rfl | rfl | h | h)\n[GOAL]\ncase refine'_1.inl\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\ny : V\n⊢ 0 = 0 ∨ ∃ r, r • ↑(rotation o ↑(π / 2)) 0 = y\n[PROOFSTEP]\nexact Or.inl rfl\n[GOAL]\ncase refine'_1.inr.inl\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx : V\n⊢ x = 0 ∨ ∃ r, r • ↑(rotation o ↑(π / 2)) x = 0\n[PROOFSTEP]\nexact Or.inr ⟨0, zero_smul _ _⟩\n[GOAL]\ncase refine'_1.inr.inr.inl\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(π / 2)\n⊢ x = 0 ∨ ∃ r, r • ↑(rotation o ↑(π / 2)) x = y\n[PROOFSTEP]\nobtain ⟨r, _, rfl⟩ :=\n  (o.oangle_eq_iff_eq_pos_smul_rotation_of_ne_zero (o.left_ne_zero_of_oangle_eq_pi_div_two h)\n        (o.right_ne_zero_of_oangle_eq_pi_div_two h) _).1\n    h\n[GOAL]\ncase refine'_1.inr.inr.inl.intro.intro\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx : V\nr : ℝ\nleft✝ : 0 < r\nh : oangle o x (r • ↑(rotation o ↑(π / 2)) x) = ↑(π / 2)\n⊢ x = 0 ∨ ∃ r_1, r_1 • ↑(rotation o ↑(π / 2)) x = r • ↑(rotation o ↑(π / 2)) x\n[PROOFSTEP]\nexact Or.inr ⟨r, rfl⟩\n[GOAL]\ncase refine'_1.inr.inr.inr\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : oangle o x y = ↑(-π / 2)\n⊢ x = 0 ∨ ∃ r, r • ↑(rotation o ↑(π / 2)) x = y\n[PROOFSTEP]\nobtain ⟨r, _, rfl⟩ :=\n  (o.oangle_eq_iff_eq_pos_smul_rotation_of_ne_zero (o.left_ne_zero_of_oangle_eq_neg_pi_div_two h)\n        (o.right_ne_zero_of_oangle_eq_neg_pi_div_two h) _).1\n    h\n[GOAL]\ncase refine'_1.inr.inr.inr.intro.intro\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx : V\nr : ℝ\nleft✝ : 0 < r\nh : oangle o x (r • ↑(rotation o ↑(-π / 2)) x) = ↑(-π / 2)\n⊢ x = 0 ∨ ∃ r_1, r_1 • ↑(rotation o ↑(π / 2)) x = r • ↑(rotation o ↑(-π / 2)) x\n[PROOFSTEP]\nrefine' Or.inr ⟨-r, _⟩\n[GOAL]\ncase refine'_1.inr.inr.inr.intro.intro\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx : V\nr : ℝ\nleft✝ : 0 < r\nh : oangle o x (r • ↑(rotation o ↑(-π / 2)) x) = ↑(-π / 2)\n⊢ -r • ↑(rotation o ↑(π / 2)) x = r • ↑(rotation o ↑(-π / 2)) x\n[PROOFSTEP]\nrw [neg_smul, ← smul_neg, o.neg_rotation_pi_div_two]\n[GOAL]\ncase refine'_2\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx y : V\nh : x = 0 ∨ ∃ r, r • ↑(rotation o ↑(π / 2)) x = y\n⊢ x = 0 ∨ y = 0 ∨ oangle o x y = ↑(π / 2) ∨ oangle o x y = ↑(-π / 2)\n[PROOFSTEP]\nrcases h with (rfl | ⟨r, rfl⟩)\n[GOAL]\ncase refine'_2.inl\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\ny : V\n⊢ 0 = 0 ∨ y = 0 ∨ oangle o 0 y = ↑(π / 2) ∨ oangle o 0 y = ↑(-π / 2)\n[PROOFSTEP]\nexact Or.inl rfl\n[GOAL]\ncase refine'_2.inr.intro\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx : V\nr : ℝ\n⊢ x = 0 ∨\n    r • ↑(rotation o ↑(π / 2)) x = 0 ∨\n      oangle o x (r • ↑(rotation o ↑(π / 2)) x) = ↑(π / 2) ∨ oangle o x (r • ↑(rotation o ↑(π / 2)) x) = ↑(-π / 2)\n[PROOFSTEP]\nby_cases hx : x = 0\n[GOAL]\ncase pos\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx : V\nr : ℝ\nhx : x = 0\n⊢ x = 0 ∨\n    r • ↑(rotation o ↑(π / 2)) x = 0 ∨\n      oangle o x (r • ↑(rotation o ↑(π / 2)) x) = ↑(π / 2) ∨ oangle o x (r • ↑(rotation o ↑(π / 2)) x) = ↑(-π / 2)\n[PROOFSTEP]\nexact Or.inl hx\n[GOAL]\ncase neg\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx : V\nr : ℝ\nhx : ¬x = 0\n⊢ x = 0 ∨\n    r • ↑(rotation o ↑(π / 2)) x = 0 ∨\n      oangle o x (r • ↑(rotation o ↑(π / 2)) x) = ↑(π / 2) ∨ oangle o x (r • ↑(rotation o ↑(π / 2)) x) = ↑(-π / 2)\n[PROOFSTEP]\nrcases lt_trichotomy r 0 with (hr | rfl | hr)\n[GOAL]\ncase neg.inl\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx : V\nr : ℝ\nhx : ¬x = 0\nhr : r < 0\n⊢ x = 0 ∨\n    r • ↑(rotation o ↑(π / 2)) x = 0 ∨\n      oangle o x (r • ↑(rotation o ↑(π / 2)) x) = ↑(π / 2) ∨ oangle o x (r • ↑(rotation o ↑(π / 2)) x) = ↑(-π / 2)\n[PROOFSTEP]\nrefine' Or.inr (Or.inr (Or.inr _))\n[GOAL]\ncase neg.inl\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx : V\nr : ℝ\nhx : ¬x = 0\nhr : r < 0\n⊢ oangle o x (r • ↑(rotation o ↑(π / 2)) x) = ↑(-π / 2)\n[PROOFSTEP]\nrw [o.oangle_smul_right_of_neg _ _ hr, o.neg_rotation_pi_div_two, o.oangle_rotation_self_right hx]\n[GOAL]\ncase neg.inr.inl\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx : V\nhx : ¬x = 0\n⊢ x = 0 ∨\n    0 • ↑(rotation o ↑(π / 2)) x = 0 ∨\n      oangle o x (0 • ↑(rotation o ↑(π / 2)) x) = ↑(π / 2) ∨ oangle o x (0 • ↑(rotation o ↑(π / 2)) x) = ↑(-π / 2)\n[PROOFSTEP]\nexact Or.inr (Or.inl (zero_smul _ _))\n[GOAL]\ncase neg.inr.inr\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx : V\nr : ℝ\nhx : ¬x = 0\nhr : 0 < r\n⊢ x = 0 ∨\n    r • ↑(rotation o ↑(π / 2)) x = 0 ∨\n      oangle o x (r • ↑(rotation o ↑(π / 2)) x) = ↑(π / 2) ∨ oangle o x (r • ↑(rotation o ↑(π / 2)) x) = ↑(-π / 2)\n[PROOFSTEP]\nrefine' Or.inr (Or.inr (Or.inl _))\n[GOAL]\ncase neg.inr.inr\nV : Type u_1\nV' : Type u_2\ninst✝⁵ : NormedAddCommGroup V\ninst✝⁴ : NormedAddCommGroup V'\ninst✝³ : InnerProductSpace ℝ V\ninst✝² : InnerProductSpace ℝ V'\ninst✝¹ : Fact (finrank ℝ V = 2)\ninst✝ : Fact (finrank ℝ V' = 2)\no : Orientation ℝ V (Fin 2)\nx : V\nr : ℝ\nhx : ¬x = 0\nhr : 0 < r\n⊢ oangle o x (r • ↑(rotation o ↑(π / 2)) x) = ↑(π / 2)\n[PROOFSTEP]\nrw [o.oangle_smul_right_of_pos _ _ hr, o.oangle_rotation_self_right hx]\n", "meta": {"mathlib_filename": "Mathlib.Geometry.Euclidean.Angle.Oriented.Rotation", "llama_tokens": 37645, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7662936484231889, "lm_q2_score": 0.6584175139669997, "lm_q1q2_score": 0.5045411589634982}}
{"text": "[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\ninst✝⁷ : TopologicalSpace α\ninst✝⁶ : Preorder α\ninst✝⁵ : TopologicalSpace β\ninst✝⁴ : Preorder β\ninst✝³ : TopologicalSpace γ\ninst✝² : Preorder γ\ninst✝¹ : TopologicalSpace δ\ninst✝ : Preorder δ\nf g : α →Co β\nh : (fun f => f.toFun) f = (fun f => f.toFun) g\n⊢ f = g\n[PROOFSTEP]\nobtain ⟨⟨_, _⟩, _⟩ := f\n[GOAL]\ncase mk.mk\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\ninst✝⁷ : TopologicalSpace α\ninst✝⁶ : Preorder α\ninst✝⁵ : TopologicalSpace β\ninst✝⁴ : Preorder β\ninst✝³ : TopologicalSpace γ\ninst✝² : Preorder γ\ninst✝¹ : TopologicalSpace δ\ninst✝ : Preorder δ\ng : α →Co β\ntoFun✝ : α → β\nmonotone'✝ : Monotone toFun✝\ncontinuous_toFun✝ : Continuous { toFun := toFun✝, monotone' := monotone'✝ }.toFun\nh :\n  (fun f => f.toFun)\n      { toOrderHom := { toFun := toFun✝, monotone' := monotone'✝ }, continuous_toFun := continuous_toFun✝ } =\n    (fun f => f.toFun) g\n⊢ { toOrderHom := { toFun := toFun✝, monotone' := monotone'✝ }, continuous_toFun := continuous_toFun✝ } = g\n[PROOFSTEP]\nobtain ⟨⟨_, _⟩, _⟩ := g\n[GOAL]\ncase mk.mk.mk.mk\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\ninst✝⁷ : TopologicalSpace α\ninst✝⁶ : Preorder α\ninst✝⁵ : TopologicalSpace β\ninst✝⁴ : Preorder β\ninst✝³ : TopologicalSpace γ\ninst✝² : Preorder γ\ninst✝¹ : TopologicalSpace δ\ninst✝ : Preorder δ\ntoFun✝¹ : α → β\nmonotone'✝¹ : Monotone toFun✝¹\ncontinuous_toFun✝¹ : Continuous { toFun := toFun✝¹, monotone' := monotone'✝¹ }.toFun\ntoFun✝ : α → β\nmonotone'✝ : Monotone toFun✝\ncontinuous_toFun✝ : Continuous { toFun := toFun✝, monotone' := monotone'✝ }.toFun\nh :\n  (fun f => f.toFun)\n      { toOrderHom := { toFun := toFun✝¹, monotone' := monotone'✝¹ }, continuous_toFun := continuous_toFun✝¹ } =\n    (fun f => f.toFun)\n      { toOrderHom := { toFun := toFun✝, monotone' := monotone'✝ }, continuous_toFun := continuous_toFun✝ }\n⊢ { toOrderHom := { toFun := toFun✝¹, monotone' := monotone'✝¹ }, continuous_toFun := continuous_toFun✝¹ } =\n    { toOrderHom := { toFun := toFun✝, monotone' := monotone'✝ }, continuous_toFun := continuous_toFun✝ }\n[PROOFSTEP]\ncongr\n[GOAL]\nF : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nδ : Type u_5\ninst✝⁷ : TopologicalSpace α\ninst✝⁶ : Preorder α\ninst✝⁵ : TopologicalSpace β\ninst✝⁴ : Preorder β\ninst✝³ : TopologicalSpace γ\ninst✝² : Preorder γ\ninst✝¹ : TopologicalSpace δ\ninst✝ : Preorder δ\ng : β →Co γ\nf₁ f₂ : α →Co β\nhg : Injective ↑g\nh : comp g f₁ = comp g f₂\na : α\n⊢ ↑g (↑f₁ a) = ↑g (↑f₂ a)\n[PROOFSTEP]\nrw [← comp_apply, h, comp_apply]\n", "meta": {"mathlib_filename": "Mathlib.Topology.Order.Hom.Basic", "llama_tokens": 1224, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7745833841649232, "lm_q2_score": 0.6513548714339145, "lm_q1q2_score": 0.5045286606075899}}
{"text": "[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nproj : Z → B\ne✝ : Pretrivialization F proj\nx : Z\ne e' : Pretrivialization F proj\nh₁ : e.toLocalEquiv = e'.toLocalEquiv\nh₂ : e.baseSet = e'.baseSet\n⊢ e = e'\n[PROOFSTEP]\ncases e\n[GOAL]\ncase mk\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nproj : Z → B\ne : Pretrivialization F proj\nx : Z\ne' : Pretrivialization F proj\ntoLocalEquiv✝ : LocalEquiv Z (B × F)\nopen_target✝ : IsOpen toLocalEquiv✝.target\nbaseSet✝ : Set B\nopen_baseSet✝ : IsOpen baseSet✝\nsource_eq✝ : toLocalEquiv✝.source = proj ⁻¹' baseSet✝\ntarget_eq✝ : toLocalEquiv✝.target = baseSet✝ ×ˢ univ\nproj_toFun✝ : ∀ (p : Z), p ∈ toLocalEquiv✝.source → (↑toLocalEquiv✝ p).fst = proj p\nh₁ :\n  { toLocalEquiv := toLocalEquiv✝, open_target := open_target✝, baseSet := baseSet✝, open_baseSet := open_baseSet✝,\n        source_eq := source_eq✝, target_eq := target_eq✝, proj_toFun := proj_toFun✝ }.toLocalEquiv =\n    e'.toLocalEquiv\nh₂ :\n  { toLocalEquiv := toLocalEquiv✝, open_target := open_target✝, baseSet := baseSet✝, open_baseSet := open_baseSet✝,\n        source_eq := source_eq✝, target_eq := target_eq✝, proj_toFun := proj_toFun✝ }.baseSet =\n    e'.baseSet\n⊢ { toLocalEquiv := toLocalEquiv✝, open_target := open_target✝, baseSet := baseSet✝, open_baseSet := open_baseSet✝,\n      source_eq := source_eq✝, target_eq := target_eq✝, proj_toFun := proj_toFun✝ } =\n    e'\n[PROOFSTEP]\ncases e'\n[GOAL]\ncase mk.mk\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nproj : Z → B\ne : Pretrivialization F proj\nx : Z\ntoLocalEquiv✝¹ : LocalEquiv Z (B × F)\nopen_target✝¹ : IsOpen toLocalEquiv✝¹.target\nbaseSet✝¹ : Set B\nopen_baseSet✝¹ : IsOpen baseSet✝¹\nsource_eq✝¹ : toLocalEquiv✝¹.source = proj ⁻¹' baseSet✝¹\ntarget_eq✝¹ : toLocalEquiv✝¹.target = baseSet✝¹ ×ˢ univ\nproj_toFun✝¹ : ∀ (p : Z), p ∈ toLocalEquiv✝¹.source → (↑toLocalEquiv✝¹ p).fst = proj p\ntoLocalEquiv✝ : LocalEquiv Z (B × F)\nopen_target✝ : IsOpen toLocalEquiv✝.target\nbaseSet✝ : Set B\nopen_baseSet✝ : IsOpen baseSet✝\nsource_eq✝ : toLocalEquiv✝.source = proj ⁻¹' baseSet✝\ntarget_eq✝ : toLocalEquiv✝.target = baseSet✝ ×ˢ univ\nproj_toFun✝ : ∀ (p : Z), p ∈ toLocalEquiv✝.source → (↑toLocalEquiv✝ p).fst = proj p\nh₁ :\n  { toLocalEquiv := toLocalEquiv✝¹, open_target := open_target✝¹, baseSet := baseSet✝¹, open_baseSet := open_baseSet✝¹,\n        source_eq := source_eq✝¹, target_eq := target_eq✝¹, proj_toFun := proj_toFun✝¹ }.toLocalEquiv =\n    { toLocalEquiv := toLocalEquiv✝, open_target := open_target✝, baseSet := baseSet✝, open_baseSet := open_baseSet✝,\n        source_eq := source_eq✝, target_eq := target_eq✝, proj_toFun := proj_toFun✝ }.toLocalEquiv\nh₂ :\n  { toLocalEquiv := toLocalEquiv✝¹, open_target := open_target✝¹, baseSet := baseSet✝¹, open_baseSet := open_baseSet✝¹,\n        source_eq := source_eq✝¹, target_eq := target_eq✝¹, proj_toFun := proj_toFun✝¹ }.baseSet =\n    { toLocalEquiv := toLocalEquiv✝, open_target := open_target✝, baseSet := baseSet✝, open_baseSet := open_baseSet✝,\n        source_eq := source_eq✝, target_eq := target_eq✝, proj_toFun := proj_toFun✝ }.baseSet\n⊢ { toLocalEquiv := toLocalEquiv✝¹, open_target := open_target✝¹, baseSet := baseSet✝¹, open_baseSet := open_baseSet✝¹,\n      source_eq := source_eq✝¹, target_eq := target_eq✝¹, proj_toFun := proj_toFun✝¹ } =\n    { toLocalEquiv := toLocalEquiv✝, open_target := open_target✝, baseSet := baseSet✝, open_baseSet := open_baseSet✝,\n      source_eq := source_eq✝, target_eq := target_eq✝, proj_toFun := proj_toFun✝ }\n[PROOFSTEP]\ncongr\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nproj : Z → B\ne✝ : Pretrivialization F proj\nx : Z\ne e' : Pretrivialization F proj\nh₁ : ∀ (x : Z), ↑e x = ↑e' x\nh₂ : ∀ (x : B × F), ↑(LocalEquiv.symm e.toLocalEquiv) x = ↑(LocalEquiv.symm e'.toLocalEquiv) x\nh₃ : e.baseSet = e'.baseSet\n⊢ e = e'\n[PROOFSTEP]\next1 <;> [ext1; exact h₃]\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nproj : Z → B\ne✝ : Pretrivialization F proj\nx : Z\ne e' : Pretrivialization F proj\nh₁ : ∀ (x : Z), ↑e x = ↑e' x\nh₂ : ∀ (x : B × F), ↑(LocalEquiv.symm e.toLocalEquiv) x = ↑(LocalEquiv.symm e'.toLocalEquiv) x\nh₃ : e.baseSet = e'.baseSet\n⊢ e = e'\n[PROOFSTEP]\next1\n[GOAL]\ncase h₁\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nproj : Z → B\ne✝ : Pretrivialization F proj\nx : Z\ne e' : Pretrivialization F proj\nh₁ : ∀ (x : Z), ↑e x = ↑e' x\nh₂ : ∀ (x : B × F), ↑(LocalEquiv.symm e.toLocalEquiv) x = ↑(LocalEquiv.symm e'.toLocalEquiv) x\nh₃ : e.baseSet = e'.baseSet\n⊢ e.toLocalEquiv = e'.toLocalEquiv\n[PROOFSTEP]\next1\n[GOAL]\ncase h₂\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nproj : Z → B\ne✝ : Pretrivialization F proj\nx : Z\ne e' : Pretrivialization F proj\nh₁ : ∀ (x : Z), ↑e x = ↑e' x\nh₂ : ∀ (x : B × F), ↑(LocalEquiv.symm e.toLocalEquiv) x = ↑(LocalEquiv.symm e'.toLocalEquiv) x\nh₃ : e.baseSet = e'.baseSet\n⊢ e.baseSet = e'.baseSet\n[PROOFSTEP]\nexact h₃\n[GOAL]\ncase h₁.h\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nproj : Z → B\ne✝ : Pretrivialization F proj\nx : Z\ne e' : Pretrivialization F proj\nh₁ : ∀ (x : Z), ↑e x = ↑e' x\nh₂ : ∀ (x : B × F), ↑(LocalEquiv.symm e.toLocalEquiv) x = ↑(LocalEquiv.symm e'.toLocalEquiv) x\nh₃ : e.baseSet = e'.baseSet\nx✝ : Z\n⊢ ↑e.toLocalEquiv x✝ = ↑e'.toLocalEquiv x✝\n[PROOFSTEP]\napply h₁\n[GOAL]\ncase h₁.hsymm\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nproj : Z → B\ne✝ : Pretrivialization F proj\nx : Z\ne e' : Pretrivialization F proj\nh₁ : ∀ (x : Z), ↑e x = ↑e' x\nh₂ : ∀ (x : B × F), ↑(LocalEquiv.symm e.toLocalEquiv) x = ↑(LocalEquiv.symm e'.toLocalEquiv) x\nh₃ : e.baseSet = e'.baseSet\nx✝ : B × F\n⊢ ↑(LocalEquiv.symm e.toLocalEquiv) x✝ = ↑(LocalEquiv.symm e'.toLocalEquiv) x✝\n[PROOFSTEP]\napply h₂\n[GOAL]\ncase h₁.hs\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nproj : Z → B\ne✝ : Pretrivialization F proj\nx : Z\ne e' : Pretrivialization F proj\nh₁ : ∀ (x : Z), ↑e x = ↑e' x\nh₂ : ∀ (x : B × F), ↑(LocalEquiv.symm e.toLocalEquiv) x = ↑(LocalEquiv.symm e'.toLocalEquiv) x\nh₃ : e.baseSet = e'.baseSet\n⊢ e.source = e'.source\n[PROOFSTEP]\nrw [e.source_eq, e'.source_eq, h₃]\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝² : TopologicalSpace B\ninst✝¹ : TopologicalSpace F\nproj : Z → B\ne✝ : Pretrivialization F proj\nx : Z\ninst✝ : Nonempty F\ne e' : Pretrivialization F proj\nh : e.toLocalEquiv = e'.toLocalEquiv\n⊢ e = e'\n[PROOFSTEP]\nrefine ext' _ _ h ?_\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝² : TopologicalSpace B\ninst✝¹ : TopologicalSpace F\nproj : Z → B\ne✝ : Pretrivialization F proj\nx : Z\ninst✝ : Nonempty F\ne e' : Pretrivialization F proj\nh : e.toLocalEquiv = e'.toLocalEquiv\n⊢ e.baseSet = e'.baseSet\n[PROOFSTEP]\nsimpa only [fst_image_prod, univ_nonempty, target_eq] using congr_arg (Prod.fst '' LocalEquiv.target ·) h\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nproj : Z → B\ne : Pretrivialization F proj\nx : Z\n⊢ x ∈ e.source ↔ proj x ∈ e.baseSet\n[PROOFSTEP]\nrw [e.source_eq, mem_preimage]\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nproj : Z → B\ne : Pretrivialization F proj\nx✝ : Z\nx : B × F\n⊢ x ∈ e.target ↔ x.fst ∈ e.baseSet\n[PROOFSTEP]\nrw [e.target_eq, prod_univ, mem_preimage]\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nproj : Z → B\ne : Pretrivialization F proj\nx✝ : Z\nx : B × F\nhx : x ∈ e.target\n⊢ proj (↑(LocalEquiv.symm e.toLocalEquiv) x) = x.fst\n[PROOFSTEP]\nhave := (e.coe_fst (e.map_target hx)).symm\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nproj : Z → B\ne : Pretrivialization F proj\nx✝ : Z\nx : B × F\nhx : x ∈ e.target\nthis : proj (↑(LocalEquiv.symm e.toLocalEquiv) x) = (↑e (↑(LocalEquiv.symm e.toLocalEquiv) x)).fst\n⊢ proj (↑(LocalEquiv.symm e.toLocalEquiv) x) = x.fst\n[PROOFSTEP]\nrwa [← e.coe_coe, e.right_inv hx] at this \n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nproj : Z → B\ne : Pretrivialization F proj\nx✝ x : Z\nex : x ∈ e.source\n⊢ ↑(LocalEquiv.symm e.toLocalEquiv) (proj x, (↑e x).snd) = x\n[PROOFSTEP]\nrw [← e.coe_fst ex, Prod.mk.eta, ← e.coe_coe, e.left_inv ex]\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nproj : Z → B\ne : Pretrivialization F proj\nx : Z\n⊢ ↑(LocalEquiv.symm e.toLocalEquiv) ⁻¹' (proj ⁻¹' e.baseSet) ∩ e.target = e.target\n[PROOFSTEP]\nrefine' inter_eq_right_iff_subset.mpr fun x hx => _\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nproj : Z → B\ne : Pretrivialization F proj\nx✝ : Z\nx : B × F\nhx : x ∈ e.target\n⊢ x ∈ ↑(LocalEquiv.symm e.toLocalEquiv) ⁻¹' (proj ⁻¹' e.baseSet)\n[PROOFSTEP]\nsimp only [mem_preimage, LocalEquiv.invFun_as_coe, e.proj_symm_apply hx]\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nproj : Z → B\ne : Pretrivialization F proj\nx✝ : Z\nx : B × F\nhx : x ∈ e.target\n⊢ x.fst ∈ e.baseSet\n[PROOFSTEP]\nexact e.mem_target.mp hx\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nproj : Z → B\ne : Pretrivialization F proj\nx : Z\ns : Set B\n⊢ ↑(LocalEquiv.symm e.toLocalEquiv) ⁻¹' (proj ⁻¹' s) ∩ e.baseSet ×ˢ univ = (s ∩ e.baseSet) ×ˢ univ\n[PROOFSTEP]\next ⟨x, y⟩\n[GOAL]\ncase h.mk\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nproj : Z → B\ne : Pretrivialization F proj\nx✝ : Z\ns : Set B\nx : B\ny : F\n⊢ (x, y) ∈ ↑(LocalEquiv.symm e.toLocalEquiv) ⁻¹' (proj ⁻¹' s) ∩ e.baseSet ×ˢ univ ↔ (x, y) ∈ (s ∩ e.baseSet) ×ˢ univ\n[PROOFSTEP]\nsuffices x ∈ e.baseSet → (proj (e.toLocalEquiv.symm (x, y)) ∈ s ↔ x ∈ s) by\n  simpa only [prod_mk_mem_set_prod_eq, mem_inter_iff, and_true_iff, mem_univ, and_congr_left_iff]\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nproj : Z → B\ne : Pretrivialization F proj\nx✝ : Z\ns : Set B\nx : B\ny : F\nthis : x ∈ e.baseSet → (proj (↑(LocalEquiv.symm e.toLocalEquiv) (x, y)) ∈ s ↔ x ∈ s)\n⊢ (x, y) ∈ ↑(LocalEquiv.symm e.toLocalEquiv) ⁻¹' (proj ⁻¹' s) ∩ e.baseSet ×ˢ univ ↔ (x, y) ∈ (s ∩ e.baseSet) ×ˢ univ\n[PROOFSTEP]\nsimpa only [prod_mk_mem_set_prod_eq, mem_inter_iff, and_true_iff, mem_univ, and_congr_left_iff]\n[GOAL]\ncase h.mk\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nproj : Z → B\ne : Pretrivialization F proj\nx✝ : Z\ns : Set B\nx : B\ny : F\n⊢ x ∈ e.baseSet → (proj (↑(LocalEquiv.symm e.toLocalEquiv) (x, y)) ∈ s ↔ x ∈ s)\n[PROOFSTEP]\nintro h\n[GOAL]\ncase h.mk\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nproj : Z → B\ne : Pretrivialization F proj\nx✝ : Z\ns : Set B\nx : B\ny : F\nh : x ∈ e.baseSet\n⊢ proj (↑(LocalEquiv.symm e.toLocalEquiv) (x, y)) ∈ s ↔ x ∈ s\n[PROOFSTEP]\nrw [e.proj_symm_apply' h]\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nproj : Z → B\ne✝ : Pretrivialization F proj\nx : Z\ne f : Pretrivialization F proj\n⊢ f.target ∩ ↑(LocalEquiv.symm f.toLocalEquiv) ⁻¹' e.source = (e.baseSet ∩ f.baseSet) ×ˢ univ\n[PROOFSTEP]\nrw [inter_comm, f.target_eq, e.source_eq, f.preimage_symm_proj_inter]\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nproj : Z → B\ne✝ : Pretrivialization F proj\nx : Z\ne f : Pretrivialization F proj\n⊢ (LocalEquiv.trans (LocalEquiv.symm f.toLocalEquiv) e.toLocalEquiv).source = (e.baseSet ∩ f.baseSet) ×ˢ univ\n[PROOFSTEP]\nrw [LocalEquiv.trans_source, LocalEquiv.symm_source, e.target_inter_preimage_symm_source_eq]\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nproj : Z → B\ne✝ : Pretrivialization F proj\nx : Z\ne e' : Pretrivialization F proj\n⊢ LocalEquiv.symm (LocalEquiv.trans (LocalEquiv.symm e.toLocalEquiv) e'.toLocalEquiv) =\n    LocalEquiv.trans (LocalEquiv.symm e'.toLocalEquiv) e.toLocalEquiv\n[PROOFSTEP]\nrw [LocalEquiv.trans_symm_eq_symm_trans_symm, LocalEquiv.symm_symm]\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nproj : Z → B\ne✝ : Pretrivialization F proj\nx : Z\ne e' : Pretrivialization F proj\n⊢ (LocalEquiv.trans (LocalEquiv.symm e.toLocalEquiv) e'.toLocalEquiv).source = (e.baseSet ∩ e'.baseSet) ×ˢ univ\n[PROOFSTEP]\nrw [LocalEquiv.trans_source, e'.source_eq, LocalEquiv.symm_source, e.target_eq, inter_comm, e.preimage_symm_proj_inter,\n  inter_comm]\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝¹ : TopologicalSpace B\ninst✝ : TopologicalSpace F\nproj : Z → B\ne✝ : Pretrivialization F proj\nx : Z\ne e' : Pretrivialization F proj\n⊢ (LocalEquiv.trans (LocalEquiv.symm e.toLocalEquiv) e'.toLocalEquiv).target = (e.baseSet ∩ e'.baseSet) ×ˢ univ\n[PROOFSTEP]\nrw [← LocalEquiv.symm_source, symm_trans_symm, symm_trans_source_eq, inter_comm]\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝² : TopologicalSpace B\ninst✝¹ : TopologicalSpace F\nproj : Z → B\ne✝ : Pretrivialization F proj\nx : Z\ne' : Pretrivialization F TotalSpace.proj\nx' : TotalSpace F E\nb✝ : B\ny✝ : E b✝\ninst✝ : (x : B) → Zero (E x)\ne : Pretrivialization F TotalSpace.proj\nb : B\nhb : b ∈ e.baseSet\ny : F\n⊢ { proj := b, snd := Pretrivialization.symm e b y } = ↑(LocalEquiv.symm e.toLocalEquiv) (b, y)\n[PROOFSTEP]\nsimp only [e.symm_apply hb, TotalSpace.mk_cast (e.proj_symm_apply' hb), TotalSpace.eta]\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝² : TopologicalSpace B\ninst✝¹ : TopologicalSpace F\nproj : Z → B\ne✝ : Pretrivialization F proj\nx : Z\ne' : Pretrivialization F TotalSpace.proj\nx' : TotalSpace F E\nb : B\ny : E b\ninst✝ : (x : B) → Zero (E x)\ne : Pretrivialization F TotalSpace.proj\nz : TotalSpace F E\nhz : z.proj ∈ e.baseSet\n⊢ Pretrivialization.symm e z.proj (↑e z).snd = z.snd\n[PROOFSTEP]\nrw [e.symm_apply hz, cast_eq_iff_heq, e.mk_proj_snd' hz, e.symm_apply_apply (e.mem_source.mpr hz)]\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝² : TopologicalSpace B\ninst✝¹ : TopologicalSpace F\nproj : Z → B\ne✝ : Pretrivialization F proj\nx : Z\ne' : Pretrivialization F TotalSpace.proj\nx' : TotalSpace F E\nb✝ : B\ny✝ : E b✝\ninst✝ : (x : B) → Zero (E x)\ne : Pretrivialization F TotalSpace.proj\nb : B\nhb : b ∈ e.baseSet\ny : F\n⊢ ↑e { proj := b, snd := Pretrivialization.symm e b y } = (b, y)\n[PROOFSTEP]\nrw [e.mk_symm hb, e.apply_symm_apply (e.mk_mem_target.mpr hb)]\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝³ : TopologicalSpace B\ninst✝² : TopologicalSpace F\nproj : Z → B\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace (TotalSpace F E)\ne✝ : Trivialization F proj\nx : Z\ne e' : Trivialization F proj\nh₁ : e.toLocalHomeomorph = e'.toLocalHomeomorph\nh₂ : e.baseSet = e'.baseSet\n⊢ e = e'\n[PROOFSTEP]\ncases e\n[GOAL]\ncase mk\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝³ : TopologicalSpace B\ninst✝² : TopologicalSpace F\nproj : Z → B\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace (TotalSpace F E)\ne : Trivialization F proj\nx : Z\ne' : Trivialization F proj\ntoLocalHomeomorph✝ : LocalHomeomorph Z (B × F)\nbaseSet✝ : Set B\nopen_baseSet✝ : IsOpen baseSet✝\nsource_eq✝ : toLocalHomeomorph✝.source = proj ⁻¹' baseSet✝\ntarget_eq✝ : toLocalHomeomorph✝.target = baseSet✝ ×ˢ univ\nproj_toFun✝ : ∀ (p : Z), p ∈ toLocalHomeomorph✝.source → (↑toLocalHomeomorph✝ p).fst = proj p\nh₁ :\n  { toLocalHomeomorph := toLocalHomeomorph✝, baseSet := baseSet✝, open_baseSet := open_baseSet✝,\n        source_eq := source_eq✝, target_eq := target_eq✝, proj_toFun := proj_toFun✝ }.toLocalHomeomorph =\n    e'.toLocalHomeomorph\nh₂ :\n  { toLocalHomeomorph := toLocalHomeomorph✝, baseSet := baseSet✝, open_baseSet := open_baseSet✝,\n        source_eq := source_eq✝, target_eq := target_eq✝, proj_toFun := proj_toFun✝ }.baseSet =\n    e'.baseSet\n⊢ { toLocalHomeomorph := toLocalHomeomorph✝, baseSet := baseSet✝, open_baseSet := open_baseSet✝,\n      source_eq := source_eq✝, target_eq := target_eq✝, proj_toFun := proj_toFun✝ } =\n    e'\n[PROOFSTEP]\ncases e'\n[GOAL]\ncase mk.mk\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝³ : TopologicalSpace B\ninst✝² : TopologicalSpace F\nproj : Z → B\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace (TotalSpace F E)\ne : Trivialization F proj\nx : Z\ntoLocalHomeomorph✝¹ : LocalHomeomorph Z (B × F)\nbaseSet✝¹ : Set B\nopen_baseSet✝¹ : IsOpen baseSet✝¹\nsource_eq✝¹ : toLocalHomeomorph✝¹.source = proj ⁻¹' baseSet✝¹\ntarget_eq✝¹ : toLocalHomeomorph✝¹.target = baseSet✝¹ ×ˢ univ\nproj_toFun✝¹ : ∀ (p : Z), p ∈ toLocalHomeomorph✝¹.source → (↑toLocalHomeomorph✝¹ p).fst = proj p\ntoLocalHomeomorph✝ : LocalHomeomorph Z (B × F)\nbaseSet✝ : Set B\nopen_baseSet✝ : IsOpen baseSet✝\nsource_eq✝ : toLocalHomeomorph✝.source = proj ⁻¹' baseSet✝\ntarget_eq✝ : toLocalHomeomorph✝.target = baseSet✝ ×ˢ univ\nproj_toFun✝ : ∀ (p : Z), p ∈ toLocalHomeomorph✝.source → (↑toLocalHomeomorph✝ p).fst = proj p\nh₁ :\n  { toLocalHomeomorph := toLocalHomeomorph✝¹, baseSet := baseSet✝¹, open_baseSet := open_baseSet✝¹,\n        source_eq := source_eq✝¹, target_eq := target_eq✝¹, proj_toFun := proj_toFun✝¹ }.toLocalHomeomorph =\n    { toLocalHomeomorph := toLocalHomeomorph✝, baseSet := baseSet✝, open_baseSet := open_baseSet✝,\n        source_eq := source_eq✝, target_eq := target_eq✝, proj_toFun := proj_toFun✝ }.toLocalHomeomorph\nh₂ :\n  { toLocalHomeomorph := toLocalHomeomorph✝¹, baseSet := baseSet✝¹, open_baseSet := open_baseSet✝¹,\n        source_eq := source_eq✝¹, target_eq := target_eq✝¹, proj_toFun := proj_toFun✝¹ }.baseSet =\n    { toLocalHomeomorph := toLocalHomeomorph✝, baseSet := baseSet✝, open_baseSet := open_baseSet✝,\n        source_eq := source_eq✝, target_eq := target_eq✝, proj_toFun := proj_toFun✝ }.baseSet\n⊢ { toLocalHomeomorph := toLocalHomeomorph✝¹, baseSet := baseSet✝¹, open_baseSet := open_baseSet✝¹,\n      source_eq := source_eq✝¹, target_eq := target_eq✝¹, proj_toFun := proj_toFun✝¹ } =\n    { toLocalHomeomorph := toLocalHomeomorph✝, baseSet := baseSet✝, open_baseSet := open_baseSet✝,\n      source_eq := source_eq✝, target_eq := target_eq✝, proj_toFun := proj_toFun✝ }\n[PROOFSTEP]\ncongr\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝³ : TopologicalSpace B\ninst✝² : TopologicalSpace F\nproj : Z → B\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace (TotalSpace F E)\ne✝ : Trivialization F proj\nx : Z\ne e' : Trivialization F proj\nh : (fun e => toPretrivialization e) e = (fun e => toPretrivialization e) e'\n⊢ e = e'\n[PROOFSTEP]\next1\n[GOAL]\ncase h₁\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝³ : TopologicalSpace B\ninst✝² : TopologicalSpace F\nproj : Z → B\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace (TotalSpace F E)\ne✝ : Trivialization F proj\nx : Z\ne e' : Trivialization F proj\nh : (fun e => toPretrivialization e) e = (fun e => toPretrivialization e) e'\n⊢ e.toLocalHomeomorph = e'.toLocalHomeomorph\ncase h₂\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝³ : TopologicalSpace B\ninst✝² : TopologicalSpace F\nproj : Z → B\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace (TotalSpace F E)\ne✝ : Trivialization F proj\nx : Z\ne e' : Trivialization F proj\nh : (fun e => toPretrivialization e) e = (fun e => toPretrivialization e) e'\n⊢ e.baseSet = e'.baseSet\n[PROOFSTEP]\nexacts [LocalHomeomorph.toLocalEquiv_injective (congr_arg Pretrivialization.toLocalEquiv h),\n  congr_arg Pretrivialization.baseSet h]\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝³ : TopologicalSpace B\ninst✝² : TopologicalSpace F\nproj : Z → B\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace (TotalSpace F E)\ne : Trivialization F proj\nx : Z\n⊢ x ∈ e.source ↔ proj x ∈ e.baseSet\n[PROOFSTEP]\nrw [e.source_eq, mem_preimage]\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝³ : TopologicalSpace B\ninst✝² : TopologicalSpace F\nproj : Z → B\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace (TotalSpace F E)\ne : Trivialization F proj\nx : Z\nex : x ∈ e.source\n⊢ map proj (𝓝 x) = 𝓝 (proj x)\n[PROOFSTEP]\nrw [← e.coe_fst ex, ← map_congr (e.coe_fst_eventuallyEq_proj ex), ← map_map, ← e.coe_coe, e.map_nhds_eq ex,\n  map_fst_nhds]\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝³ : TopologicalSpace B\ninst✝² : TopologicalSpace F\nproj : Z → B\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace (TotalSpace F E)\ne : Trivialization F proj\nx : Z\nα : Type u_6\nl : Filter α\nf : α → Z\nz : Z\nhz : z ∈ e.source\n⊢ Tendsto f l (𝓝 z) ↔ Tendsto (proj ∘ f) l (𝓝 (proj z)) ∧ Tendsto (fun x => (↑e (f x)).snd) l (𝓝 (↑e z).snd)\n[PROOFSTEP]\nrw [e.nhds_eq_comap_inf_principal hz, tendsto_inf, tendsto_comap_iff, Prod.tendsto_iff, coe_coe, tendsto_principal,\n  coe_fst _ hz]\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝³ : TopologicalSpace B\ninst✝² : TopologicalSpace F\nproj : Z → B\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace (TotalSpace F E)\ne : Trivialization F proj\nx : Z\nα : Type u_6\nl : Filter α\nf : α → Z\nz : Z\nhz : z ∈ e.source\n⊢ ((Tendsto (fun n => ((↑e ∘ f) n).fst) l (𝓝 (proj z)) ∧ Tendsto (fun n => ((↑e ∘ f) n).snd) l (𝓝 (↑e z).snd)) ∧\n      ∀ᶠ (a : α) in l, f a ∈ e.source) ↔\n    Tendsto (proj ∘ f) l (𝓝 (proj z)) ∧ Tendsto (fun x => (↑e (f x)).snd) l (𝓝 (↑e z).snd)\n[PROOFSTEP]\nby_cases hl : ∀ᶠ x in l, f x ∈ e.source\n[GOAL]\ncase pos\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝³ : TopologicalSpace B\ninst✝² : TopologicalSpace F\nproj : Z → B\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace (TotalSpace F E)\ne : Trivialization F proj\nx : Z\nα : Type u_6\nl : Filter α\nf : α → Z\nz : Z\nhz : z ∈ e.source\nhl : ∀ᶠ (x : α) in l, f x ∈ e.source\n⊢ ((Tendsto (fun n => ((↑e ∘ f) n).fst) l (𝓝 (proj z)) ∧ Tendsto (fun n => ((↑e ∘ f) n).snd) l (𝓝 (↑e z).snd)) ∧\n      ∀ᶠ (a : α) in l, f a ∈ e.source) ↔\n    Tendsto (proj ∘ f) l (𝓝 (proj z)) ∧ Tendsto (fun x => (↑e (f x)).snd) l (𝓝 (↑e z).snd)\n[PROOFSTEP]\nsimp only [hl, and_true]\n[GOAL]\ncase pos\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝³ : TopologicalSpace B\ninst✝² : TopologicalSpace F\nproj : Z → B\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace (TotalSpace F E)\ne : Trivialization F proj\nx : Z\nα : Type u_6\nl : Filter α\nf : α → Z\nz : Z\nhz : z ∈ e.source\nhl : ∀ᶠ (x : α) in l, f x ∈ e.source\n⊢ Tendsto (fun n => ((↑e ∘ f) n).fst) l (𝓝 (proj z)) ∧ Tendsto (fun n => ((↑e ∘ f) n).snd) l (𝓝 (↑e z).snd) ↔\n    Tendsto (proj ∘ f) l (𝓝 (proj z)) ∧ Tendsto (fun x => (↑e (f x)).snd) l (𝓝 (↑e z).snd)\n[PROOFSTEP]\nrefine (tendsto_congr' ?_).and Iff.rfl\n[GOAL]\ncase pos\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝³ : TopologicalSpace B\ninst✝² : TopologicalSpace F\nproj : Z → B\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace (TotalSpace F E)\ne : Trivialization F proj\nx : Z\nα : Type u_6\nl : Filter α\nf : α → Z\nz : Z\nhz : z ∈ e.source\nhl : ∀ᶠ (x : α) in l, f x ∈ e.source\n⊢ (fun n => ((↑e ∘ f) n).fst) =ᶠ[l] proj ∘ f\n[PROOFSTEP]\nexact hl.mono fun x ↦ e.coe_fst\n[GOAL]\ncase neg\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝³ : TopologicalSpace B\ninst✝² : TopologicalSpace F\nproj : Z → B\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace (TotalSpace F E)\ne : Trivialization F proj\nx : Z\nα : Type u_6\nl : Filter α\nf : α → Z\nz : Z\nhz : z ∈ e.source\nhl : ¬∀ᶠ (x : α) in l, f x ∈ e.source\n⊢ ((Tendsto (fun n => ((↑e ∘ f) n).fst) l (𝓝 (proj z)) ∧ Tendsto (fun n => ((↑e ∘ f) n).snd) l (𝓝 (↑e z).snd)) ∧\n      ∀ᶠ (a : α) in l, f a ∈ e.source) ↔\n    Tendsto (proj ∘ f) l (𝓝 (proj z)) ∧ Tendsto (fun x => (↑e (f x)).snd) l (𝓝 (↑e z).snd)\n[PROOFSTEP]\nsimp only [hl, and_false, false_iff, not_and]\n[GOAL]\ncase neg\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝³ : TopologicalSpace B\ninst✝² : TopologicalSpace F\nproj : Z → B\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace (TotalSpace F E)\ne : Trivialization F proj\nx : Z\nα : Type u_6\nl : Filter α\nf : α → Z\nz : Z\nhz : z ∈ e.source\nhl : ¬∀ᶠ (x : α) in l, f x ∈ e.source\n⊢ Tendsto (proj ∘ f) l (𝓝 (proj z)) → ¬Tendsto (fun x => (↑e (f x)).snd) l (𝓝 (↑e z).snd)\n[PROOFSTEP]\nrw [e.source_eq] at hl hz \n[GOAL]\ncase neg\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝³ : TopologicalSpace B\ninst✝² : TopologicalSpace F\nproj : Z → B\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace (TotalSpace F E)\ne : Trivialization F proj\nx : Z\nα : Type u_6\nl : Filter α\nf : α → Z\nz : Z\nhz : z ∈ proj ⁻¹' e.baseSet\nhl : ¬∀ᶠ (x : α) in l, f x ∈ proj ⁻¹' e.baseSet\n⊢ Tendsto (proj ∘ f) l (𝓝 (proj z)) → ¬Tendsto (fun x => (↑e (f x)).snd) l (𝓝 (↑e z).snd)\n[PROOFSTEP]\nexact fun h _ ↦ hl <| h <| e.open_baseSet.mem_nhds hz\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝³ : TopologicalSpace B\ninst✝² : TopologicalSpace F\nproj : Z → B\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace (TotalSpace F E)\ne : Trivialization F proj\nx z : Z\nhz : z ∈ e.source\n⊢ 𝓝 z = comap proj (𝓝 (proj z)) ⊓ comap (Prod.snd ∘ ↑e) (𝓝 (↑e z).snd)\n[PROOFSTEP]\nrefine eq_of_forall_le_iff fun l ↦ ?_\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝³ : TopologicalSpace B\ninst✝² : TopologicalSpace F\nproj : Z → B\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace (TotalSpace F E)\ne : Trivialization F proj\nx z : Z\nhz : z ∈ e.source\nl : Filter Z\n⊢ l ≤ 𝓝 z ↔ l ≤ comap proj (𝓝 (proj z)) ⊓ comap (Prod.snd ∘ ↑e) (𝓝 (↑e z).snd)\n[PROOFSTEP]\nrw [le_inf_iff, ← tendsto_iff_comap, ← tendsto_iff_comap]\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝³ : TopologicalSpace B\ninst✝² : TopologicalSpace F\nproj : Z → B\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace (TotalSpace F E)\ne : Trivialization F proj\nx z : Z\nhz : z ∈ e.source\nl : Filter Z\n⊢ l ≤ 𝓝 z ↔ Tendsto proj l (𝓝 (proj z)) ∧ Tendsto (Prod.snd ∘ ↑e) l (𝓝 (↑e z).snd)\n[PROOFSTEP]\nexact e.tendsto_nhds_iff hz\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝³ : TopologicalSpace B\ninst✝² : TopologicalSpace F\nproj : Z → B\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace (TotalSpace F E)\ne : Trivialization F proj\nx : Z\nb : B\nhb : b ∈ e.baseSet\np : F\n⊢ ↑(LocalHomeomorph.symm e.toLocalHomeomorph) (b, p) ∈ proj ⁻¹' {b}\n[PROOFSTEP]\nrw [mem_preimage, e.proj_symm_apply' hb, mem_singleton_iff]\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝⁴ : TopologicalSpace B\ninst✝³ : TopologicalSpace F\nproj : Z → B\ninst✝² : TopologicalSpace Z\ninst✝¹ : TopologicalSpace (TotalSpace F E)\ne : Trivialization F proj\nx : Z\nZ' : Type u_6\ninst✝ : TopologicalSpace Z'\nh : Z' ≃ₜ Z\n⊢ (LocalHomeomorph.trans (Homeomorph.toLocalHomeomorph h) e.toLocalHomeomorph).toLocalEquiv.source =\n    proj ∘ ↑h ⁻¹' e.baseSet\n[PROOFSTEP]\nsimp [source_eq, preimage_preimage, (· ∘ ·)]\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝⁴ : TopologicalSpace B\ninst✝³ : TopologicalSpace F\nproj : Z → B\ninst✝² : TopologicalSpace Z\ninst✝¹ : TopologicalSpace (TotalSpace F E)\ne : Trivialization F proj\nx : Z\nZ' : Type u_6\ninst✝ : TopologicalSpace Z'\nh : Z' ≃ₜ Z\n⊢ (LocalHomeomorph.trans (Homeomorph.toLocalHomeomorph h) e.toLocalHomeomorph).toLocalEquiv.target = e.baseSet ×ˢ univ\n[PROOFSTEP]\nsimp [target_eq]\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝⁴ : TopologicalSpace B\ninst✝³ : TopologicalSpace F\nproj : Z → B\ninst✝² : TopologicalSpace Z\ninst✝¹ : TopologicalSpace (TotalSpace F E)\ne : Trivialization F proj\nx : Z\nZ' : Type u_6\ninst✝ : TopologicalSpace Z'\nh : Z' ≃ₜ Z\np : Z'\nhp : p ∈ (LocalHomeomorph.trans (Homeomorph.toLocalHomeomorph h) e.toLocalHomeomorph).toLocalEquiv.source\n⊢ (↑(LocalHomeomorph.trans (Homeomorph.toLocalHomeomorph h) e.toLocalHomeomorph) p).fst = (proj ∘ ↑h) p\n[PROOFSTEP]\nhave hp : h p ∈ e.source := by simpa using hp\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝⁴ : TopologicalSpace B\ninst✝³ : TopologicalSpace F\nproj : Z → B\ninst✝² : TopologicalSpace Z\ninst✝¹ : TopologicalSpace (TotalSpace F E)\ne : Trivialization F proj\nx : Z\nZ' : Type u_6\ninst✝ : TopologicalSpace Z'\nh : Z' ≃ₜ Z\np : Z'\nhp : p ∈ (LocalHomeomorph.trans (Homeomorph.toLocalHomeomorph h) e.toLocalHomeomorph).toLocalEquiv.source\n⊢ ↑h p ∈ e.source\n[PROOFSTEP]\nsimpa using hp\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝⁴ : TopologicalSpace B\ninst✝³ : TopologicalSpace F\nproj : Z → B\ninst✝² : TopologicalSpace Z\ninst✝¹ : TopologicalSpace (TotalSpace F E)\ne : Trivialization F proj\nx : Z\nZ' : Type u_6\ninst✝ : TopologicalSpace Z'\nh : Z' ≃ₜ Z\np : Z'\nhp✝ : p ∈ (LocalHomeomorph.trans (Homeomorph.toLocalHomeomorph h) e.toLocalHomeomorph).toLocalEquiv.source\nhp : ↑h p ∈ e.source\n⊢ (↑(LocalHomeomorph.trans (Homeomorph.toLocalHomeomorph h) e.toLocalHomeomorph) p).fst = (proj ∘ ↑h) p\n[PROOFSTEP]\nsimp [hp]\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝⁴ : TopologicalSpace B\ninst✝³ : TopologicalSpace F\nproj : Z → B\ninst✝² : TopologicalSpace Z\ninst✝¹ : TopologicalSpace (TotalSpace F E)\ne✝ : Trivialization F proj\nx : Z\nX : Type u_6\ninst✝ : TopologicalSpace X\nf : Z → X\nz : Z\ne : Trivialization F proj\nhe : proj z ∈ e.baseSet\nhf : ContinuousAt (f ∘ ↑(LocalEquiv.symm e.toLocalEquiv)) (↑e z)\n⊢ ContinuousAt f z\n[PROOFSTEP]\nhave hez : z ∈ e.toLocalEquiv.symm.target :=\n  by\n  rw [LocalEquiv.symm_target, e.mem_source]\n  exact he\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝⁴ : TopologicalSpace B\ninst✝³ : TopologicalSpace F\nproj : Z → B\ninst✝² : TopologicalSpace Z\ninst✝¹ : TopologicalSpace (TotalSpace F E)\ne✝ : Trivialization F proj\nx : Z\nX : Type u_6\ninst✝ : TopologicalSpace X\nf : Z → X\nz : Z\ne : Trivialization F proj\nhe : proj z ∈ e.baseSet\nhf : ContinuousAt (f ∘ ↑(LocalEquiv.symm e.toLocalEquiv)) (↑e z)\n⊢ z ∈ (LocalEquiv.symm e.toLocalEquiv).target\n[PROOFSTEP]\nrw [LocalEquiv.symm_target, e.mem_source]\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝⁴ : TopologicalSpace B\ninst✝³ : TopologicalSpace F\nproj : Z → B\ninst✝² : TopologicalSpace Z\ninst✝¹ : TopologicalSpace (TotalSpace F E)\ne✝ : Trivialization F proj\nx : Z\nX : Type u_6\ninst✝ : TopologicalSpace X\nf : Z → X\nz : Z\ne : Trivialization F proj\nhe : proj z ∈ e.baseSet\nhf : ContinuousAt (f ∘ ↑(LocalEquiv.symm e.toLocalEquiv)) (↑e z)\n⊢ proj z ∈ e.baseSet\n[PROOFSTEP]\nexact he\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝⁴ : TopologicalSpace B\ninst✝³ : TopologicalSpace F\nproj : Z → B\ninst✝² : TopologicalSpace Z\ninst✝¹ : TopologicalSpace (TotalSpace F E)\ne✝ : Trivialization F proj\nx : Z\nX : Type u_6\ninst✝ : TopologicalSpace X\nf : Z → X\nz : Z\ne : Trivialization F proj\nhe : proj z ∈ e.baseSet\nhf : ContinuousAt (f ∘ ↑(LocalEquiv.symm e.toLocalEquiv)) (↑e z)\nhez : z ∈ (LocalEquiv.symm e.toLocalEquiv).target\n⊢ ContinuousAt f z\n[PROOFSTEP]\nrwa [e.toLocalHomeomorph.symm.continuousAt_iff_continuousAt_comp_right hez, LocalHomeomorph.symm_symm]\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝⁴ : TopologicalSpace B\ninst✝³ : TopologicalSpace F\nproj : Z → B\ninst✝² : TopologicalSpace Z\ninst✝¹ : TopologicalSpace (TotalSpace F E)\ne✝ : Trivialization F proj\nx✝ : Z\nX : Type u_6\ninst✝ : TopologicalSpace X\nf : X → Z\nx : X\ne : Trivialization F proj\nhf_proj : ContinuousAt (proj ∘ f) x\nhe : proj (f x) ∈ e.baseSet\nhf : ContinuousAt (↑e ∘ f) x\n⊢ ContinuousAt f x\n[PROOFSTEP]\nrw [e.continuousAt_iff_continuousAt_comp_left]\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝⁴ : TopologicalSpace B\ninst✝³ : TopologicalSpace F\nproj : Z → B\ninst✝² : TopologicalSpace Z\ninst✝¹ : TopologicalSpace (TotalSpace F E)\ne✝ : Trivialization F proj\nx✝ : Z\nX : Type u_6\ninst✝ : TopologicalSpace X\nf : X → Z\nx : X\ne : Trivialization F proj\nhf_proj : ContinuousAt (proj ∘ f) x\nhe : proj (f x) ∈ e.baseSet\nhf : ContinuousAt (↑e ∘ f) x\n⊢ ContinuousAt (↑e.toLocalHomeomorph ∘ f) x\n[PROOFSTEP]\nexact hf\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝⁴ : TopologicalSpace B\ninst✝³ : TopologicalSpace F\nproj : Z → B\ninst✝² : TopologicalSpace Z\ninst✝¹ : TopologicalSpace (TotalSpace F E)\ne✝ : Trivialization F proj\nx✝ : Z\nX : Type u_6\ninst✝ : TopologicalSpace X\nf : X → Z\nx : X\ne : Trivialization F proj\nhf_proj : ContinuousAt (proj ∘ f) x\nhe : proj (f x) ∈ e.baseSet\nhf : ContinuousAt (↑e ∘ f) x\n⊢ f ⁻¹' e.source ∈ 𝓝 x\n[PROOFSTEP]\nrw [e.source_eq, ← preimage_comp]\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝⁴ : TopologicalSpace B\ninst✝³ : TopologicalSpace F\nproj : Z → B\ninst✝² : TopologicalSpace Z\ninst✝¹ : TopologicalSpace (TotalSpace F E)\ne✝ : Trivialization F proj\nx✝ : Z\nX : Type u_6\ninst✝ : TopologicalSpace X\nf : X → Z\nx : X\ne : Trivialization F proj\nhf_proj : ContinuousAt (proj ∘ f) x\nhe : proj (f x) ∈ e.baseSet\nhf : ContinuousAt (↑e ∘ f) x\n⊢ proj ∘ f ⁻¹' e.baseSet ∈ 𝓝 x\n[PROOFSTEP]\nexact hf_proj.preimage_mem_nhds (e.open_baseSet.mem_nhds he)\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝⁴ : TopologicalSpace B\ninst✝³ : TopologicalSpace F\nproj : Z → B\ninst✝² : TopologicalSpace Z\ninst✝¹ : TopologicalSpace (TotalSpace F E)\ne✝ : Trivialization F proj\nx : Z\ne' : Trivialization F TotalSpace.proj\nx' : TotalSpace F E\nb : B\ny : E b\ninst✝ : (x : B) → Zero (E x)\ne : Trivialization F TotalSpace.proj\n⊢ ContinuousOn (fun z => TotalSpace.mk' F z.fst (Trivialization.symm e z.fst z.snd)) (e.baseSet ×ˢ univ)\n[PROOFSTEP]\nhave : ∀ z ∈ e.baseSet ×ˢ (univ : Set F), TotalSpace.mk z.1 (e.symm z.1 z.2) = e.toLocalHomeomorph.symm z :=\n  by\n  rintro x ⟨hx : x.1 ∈ e.baseSet, _⟩\n  rw [e.mk_symm hx]\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝⁴ : TopologicalSpace B\ninst✝³ : TopologicalSpace F\nproj : Z → B\ninst✝² : TopologicalSpace Z\ninst✝¹ : TopologicalSpace (TotalSpace F E)\ne✝ : Trivialization F proj\nx : Z\ne' : Trivialization F TotalSpace.proj\nx' : TotalSpace F E\nb : B\ny : E b\ninst✝ : (x : B) → Zero (E x)\ne : Trivialization F TotalSpace.proj\n⊢ ∀ (z : B × F),\n    z ∈ e.baseSet ×ˢ univ →\n      { proj := z.fst, snd := Trivialization.symm e z.fst z.snd } = ↑(LocalHomeomorph.symm e.toLocalHomeomorph) z\n[PROOFSTEP]\nrintro x ⟨hx : x.1 ∈ e.baseSet, _⟩\n[GOAL]\ncase intro\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝⁴ : TopologicalSpace B\ninst✝³ : TopologicalSpace F\nproj : Z → B\ninst✝² : TopologicalSpace Z\ninst✝¹ : TopologicalSpace (TotalSpace F E)\ne✝ : Trivialization F proj\nx✝ : Z\ne' : Trivialization F TotalSpace.proj\nx' : TotalSpace F E\nb : B\ny : E b\ninst✝ : (x : B) → Zero (E x)\ne : Trivialization F TotalSpace.proj\nx : B × F\nhx : x.fst ∈ e.baseSet\nright✝ : x.snd ∈ univ\n⊢ { proj := x.fst, snd := Trivialization.symm e x.fst x.snd } = ↑(LocalHomeomorph.symm e.toLocalHomeomorph) x\n[PROOFSTEP]\nrw [e.mk_symm hx]\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝⁴ : TopologicalSpace B\ninst✝³ : TopologicalSpace F\nproj : Z → B\ninst✝² : TopologicalSpace Z\ninst✝¹ : TopologicalSpace (TotalSpace F E)\ne✝ : Trivialization F proj\nx : Z\ne' : Trivialization F TotalSpace.proj\nx' : TotalSpace F E\nb : B\ny : E b\ninst✝ : (x : B) → Zero (E x)\ne : Trivialization F TotalSpace.proj\nthis :\n  ∀ (z : B × F),\n    z ∈ e.baseSet ×ˢ univ →\n      { proj := z.fst, snd := Trivialization.symm e z.fst z.snd } = ↑(LocalHomeomorph.symm e.toLocalHomeomorph) z\n⊢ ContinuousOn (fun z => TotalSpace.mk' F z.fst (Trivialization.symm e z.fst z.snd)) (e.baseSet ×ˢ univ)\n[PROOFSTEP]\nrefine' ContinuousOn.congr _ this\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝⁴ : TopologicalSpace B\ninst✝³ : TopologicalSpace F\nproj : Z → B\ninst✝² : TopologicalSpace Z\ninst✝¹ : TopologicalSpace (TotalSpace F E)\ne✝ : Trivialization F proj\nx : Z\ne' : Trivialization F TotalSpace.proj\nx' : TotalSpace F E\nb : B\ny : E b\ninst✝ : (x : B) → Zero (E x)\ne : Trivialization F TotalSpace.proj\nthis :\n  ∀ (z : B × F),\n    z ∈ e.baseSet ×ˢ univ →\n      { proj := z.fst, snd := Trivialization.symm e z.fst z.snd } = ↑(LocalHomeomorph.symm e.toLocalHomeomorph) z\n⊢ ContinuousOn (fun x => ↑(LocalHomeomorph.symm e.toLocalHomeomorph) x) (e.baseSet ×ˢ univ)\n[PROOFSTEP]\nrw [← e.target_eq]\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝⁴ : TopologicalSpace B\ninst✝³ : TopologicalSpace F\nproj : Z → B\ninst✝² : TopologicalSpace Z\ninst✝¹ : TopologicalSpace (TotalSpace F E)\ne✝ : Trivialization F proj\nx : Z\ne' : Trivialization F TotalSpace.proj\nx' : TotalSpace F E\nb : B\ny : E b\ninst✝ : (x : B) → Zero (E x)\ne : Trivialization F TotalSpace.proj\nthis :\n  ∀ (z : B × F),\n    z ∈ e.baseSet ×ˢ univ →\n      { proj := z.fst, snd := Trivialization.symm e z.fst z.snd } = ↑(LocalHomeomorph.symm e.toLocalHomeomorph) z\n⊢ ContinuousOn (fun x => ↑(LocalHomeomorph.symm e.toLocalHomeomorph) x) e.target\n[PROOFSTEP]\nexact e.toLocalHomeomorph.continuousOn_symm\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝⁴ : TopologicalSpace B\ninst✝³ : TopologicalSpace F\nproj : Z → B\ninst✝² : TopologicalSpace Z\ninst✝¹ : TopologicalSpace (TotalSpace F E)\ne✝ : Trivialization F proj\nx : Z\ne' : Trivialization F TotalSpace.proj\nx' : TotalSpace F E\nb : B\ny : E b\nF' : Type u_6\ninst✝ : TopologicalSpace F'\ne : Trivialization F proj\nh : F ≃ₜ F'\n⊢ (LocalHomeomorph.transHomeomorph e.toLocalHomeomorph\n          (Homeomorph.prodCongr (Homeomorph.refl B) h)).toLocalEquiv.target =\n    e.baseSet ×ˢ univ\n[PROOFSTEP]\nsimp [target_eq, prod_univ, preimage_preimage]\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝³ : TopologicalSpace B\ninst✝² : TopologicalSpace F\nproj : Z → B\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace (TotalSpace F E)\ne : Trivialization F proj\nx✝ : Z\ne' : Trivialization F TotalSpace.proj\nx' : TotalSpace F E\nb✝ : B\ny : E b✝\ne₁ e₂ : Trivialization F proj\nb : B\nh₁ : b ∈ e₁.baseSet\nh₂ : b ∈ e₂.baseSet\nx : F\n⊢ (b, coordChange e₁ e₂ b x) = ↑e₂ (↑(LocalHomeomorph.symm e₁.toLocalHomeomorph) (b, x))\n[PROOFSTEP]\nrefine' Prod.ext _ rfl\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝³ : TopologicalSpace B\ninst✝² : TopologicalSpace F\nproj : Z → B\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace (TotalSpace F E)\ne : Trivialization F proj\nx✝ : Z\ne' : Trivialization F TotalSpace.proj\nx' : TotalSpace F E\nb✝ : B\ny : E b✝\ne₁ e₂ : Trivialization F proj\nb : B\nh₁ : b ∈ e₁.baseSet\nh₂ : b ∈ e₂.baseSet\nx : F\n⊢ (b, coordChange e₁ e₂ b x).fst = (↑e₂ (↑(LocalHomeomorph.symm e₁.toLocalHomeomorph) (b, x))).fst\n[PROOFSTEP]\nrw [e₂.coe_fst', ← e₁.coe_fst', e₁.apply_symm_apply' h₁]\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝³ : TopologicalSpace B\ninst✝² : TopologicalSpace F\nproj : Z → B\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace (TotalSpace F E)\ne : Trivialization F proj\nx✝ : Z\ne' : Trivialization F TotalSpace.proj\nx' : TotalSpace F E\nb✝ : B\ny : E b✝\ne₁ e₂ : Trivialization F proj\nb : B\nh₁ : b ∈ e₁.baseSet\nh₂ : b ∈ e₂.baseSet\nx : F\n⊢ proj (↑(LocalHomeomorph.symm e₁.toLocalHomeomorph) (b, x)) ∈ e₁.baseSet\n[PROOFSTEP]\nrwa [e₁.proj_symm_apply' h₁]\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝³ : TopologicalSpace B\ninst✝² : TopologicalSpace F\nproj : Z → B\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace (TotalSpace F E)\ne : Trivialization F proj\nx✝ : Z\ne' : Trivialization F TotalSpace.proj\nx' : TotalSpace F E\nb✝ : B\ny : E b✝\ne₁ e₂ : Trivialization F proj\nb : B\nh₁ : b ∈ e₁.baseSet\nh₂ : b ∈ e₂.baseSet\nx : F\n⊢ proj (↑(LocalHomeomorph.symm e₁.toLocalHomeomorph) (b, x)) ∈ e₂.baseSet\n[PROOFSTEP]\nrwa [e₁.proj_symm_apply' h₁]\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝³ : TopologicalSpace B\ninst✝² : TopologicalSpace F\nproj : Z → B\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace (TotalSpace F E)\ne : Trivialization F proj\nx : Z\ne' : Trivialization F TotalSpace.proj\nx' : TotalSpace F E\nb : B\ny : E b\ne₁ e₂ : Trivialization F proj\np : Z\nh : proj p ∈ e₁.baseSet\n⊢ coordChange e₁ e₂ (proj p) (↑e₁ p).snd = (↑e₂ p).snd\n[PROOFSTEP]\nrw [coordChange, e₁.symm_apply_mk_proj (e₁.mem_source.2 h)]\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝³ : TopologicalSpace B\ninst✝² : TopologicalSpace F\nproj : Z → B\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace (TotalSpace F E)\ne✝ : Trivialization F proj\nx✝ : Z\ne' : Trivialization F TotalSpace.proj\nx' : TotalSpace F E\nb✝ : B\ny : E b✝\ne : Trivialization F proj\nb : B\nh : b ∈ e.baseSet\nx : F\n⊢ coordChange e e b x = x\n[PROOFSTEP]\nrw [coordChange, e.apply_symm_apply' h]\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝³ : TopologicalSpace B\ninst✝² : TopologicalSpace F\nproj : Z → B\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace (TotalSpace F E)\ne : Trivialization F proj\nx✝ : Z\ne' : Trivialization F TotalSpace.proj\nx' : TotalSpace F E\nb✝ : B\ny : E b✝\ne₁ e₂ e₃ : Trivialization F proj\nb : B\nh₁ : b ∈ e₁.baseSet\nh₂ : b ∈ e₂.baseSet\nx : F\n⊢ coordChange e₂ e₃ b (coordChange e₁ e₂ b x) = coordChange e₁ e₃ b x\n[PROOFSTEP]\nrw [coordChange, e₁.mk_coordChange _ h₁ h₂, ← e₂.coe_coe, e₂.left_inv, coordChange]\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝³ : TopologicalSpace B\ninst✝² : TopologicalSpace F\nproj : Z → B\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace (TotalSpace F E)\ne : Trivialization F proj\nx✝ : Z\ne' : Trivialization F TotalSpace.proj\nx' : TotalSpace F E\nb✝ : B\ny : E b✝\ne₁ e₂ e₃ : Trivialization F proj\nb : B\nh₁ : b ∈ e₁.baseSet\nh₂ : b ∈ e₂.baseSet\nx : F\n⊢ ↑(LocalHomeomorph.symm e₁.toLocalHomeomorph) (b, x) ∈ e₂.source\n[PROOFSTEP]\nrwa [e₂.mem_source, e₁.proj_symm_apply' h₁]\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝³ : TopologicalSpace B\ninst✝² : TopologicalSpace F\nproj : Z → B\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace (TotalSpace F E)\ne : Trivialization F proj\nx : Z\ne' : Trivialization F TotalSpace.proj\nx' : TotalSpace F E\nb✝ : B\ny : E b✝\ne₁ e₂ : Trivialization F proj\nb : B\nh₁ : b ∈ e₁.baseSet\nh₂ : b ∈ e₂.baseSet\n⊢ Continuous (coordChange e₁ e₂ b)\n[PROOFSTEP]\nrefine'\n  continuous_snd.comp\n    (e₂.toLocalHomeomorph.continuousOn.comp_continuous (e₁.toLocalHomeomorph.continuousOn_symm.comp_continuous _ _) _)\n[GOAL]\ncase refine'_1\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝³ : TopologicalSpace B\ninst✝² : TopologicalSpace F\nproj : Z → B\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace (TotalSpace F E)\ne : Trivialization F proj\nx : Z\ne' : Trivialization F TotalSpace.proj\nx' : TotalSpace F E\nb✝ : B\ny : E b✝\ne₁ e₂ : Trivialization F proj\nb : B\nh₁ : b ∈ e₁.baseSet\nh₂ : b ∈ e₂.baseSet\n⊢ Continuous fun x => (b, x)\n[PROOFSTEP]\nexact continuous_const.prod_mk continuous_id\n[GOAL]\ncase refine'_2\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝³ : TopologicalSpace B\ninst✝² : TopologicalSpace F\nproj : Z → B\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace (TotalSpace F E)\ne : Trivialization F proj\nx : Z\ne' : Trivialization F TotalSpace.proj\nx' : TotalSpace F E\nb✝ : B\ny : E b✝\ne₁ e₂ : Trivialization F proj\nb : B\nh₁ : b ∈ e₁.baseSet\nh₂ : b ∈ e₂.baseSet\n⊢ ∀ (x : F), (b, x) ∈ e₁.target\n[PROOFSTEP]\nexact fun x => e₁.mem_target.2 h₁\n[GOAL]\ncase refine'_3\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝³ : TopologicalSpace B\ninst✝² : TopologicalSpace F\nproj : Z → B\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace (TotalSpace F E)\ne : Trivialization F proj\nx : Z\ne' : Trivialization F TotalSpace.proj\nx' : TotalSpace F E\nb✝ : B\ny : E b✝\ne₁ e₂ : Trivialization F proj\nb : B\nh₁ : b ∈ e₁.baseSet\nh₂ : b ∈ e₂.baseSet\n⊢ ∀ (x : F), ↑(LocalHomeomorph.symm e₁.toLocalHomeomorph) (b, x) ∈ e₂.source\n[PROOFSTEP]\nintro x\n[GOAL]\ncase refine'_3\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝³ : TopologicalSpace B\ninst✝² : TopologicalSpace F\nproj : Z → B\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace (TotalSpace F E)\ne : Trivialization F proj\nx✝ : Z\ne' : Trivialization F TotalSpace.proj\nx' : TotalSpace F E\nb✝ : B\ny : E b✝\ne₁ e₂ : Trivialization F proj\nb : B\nh₁ : b ∈ e₁.baseSet\nh₂ : b ∈ e₂.baseSet\nx : F\n⊢ ↑(LocalHomeomorph.symm e₁.toLocalHomeomorph) (b, x) ∈ e₂.source\n[PROOFSTEP]\nrwa [e₂.mem_source, e₁.proj_symm_apply' h₁]\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝³ : TopologicalSpace B\ninst✝² : TopologicalSpace F\nproj : Z → B\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace (TotalSpace F E)\ne : Trivialization F proj\nx✝ : Z\ne' : Trivialization F TotalSpace.proj\nx' : TotalSpace F E\nb✝ : B\ny : E b✝\ne₁ e₂ : Trivialization F proj\nb : B\nh₁ : b ∈ e₁.baseSet\nh₂ : b ∈ e₂.baseSet\nx : F\n⊢ coordChange e₂ e₁ b (coordChange e₁ e₂ b x) = x\n[PROOFSTEP]\nsimp only [*, coordChange_coordChange, coordChange_same_apply]\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝³ : TopologicalSpace B\ninst✝² : TopologicalSpace F\nproj : Z → B\ninst✝¹ : TopologicalSpace Z\ninst✝ : TopologicalSpace (TotalSpace F E)\ne : Trivialization F proj\nx✝ : Z\ne' : Trivialization F TotalSpace.proj\nx' : TotalSpace F E\nb✝ : B\ny : E b✝\ne₁ e₂ : Trivialization F proj\nb : B\nh₁ : b ∈ e₁.baseSet\nh₂ : b ∈ e₂.baseSet\nx : F\n⊢ coordChange e₁ e₂ b (coordChange e₂ e₁ b x) = x\n[PROOFSTEP]\nsimp only [*, coordChange_coordChange, coordChange_same_apply]\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝⁴ : TopologicalSpace B\ninst✝³ : TopologicalSpace F\nproj : Z → B\ninst✝² : TopologicalSpace Z\ninst✝¹ : TopologicalSpace (TotalSpace F E)\ne✝ : Trivialization F proj\nx✝ : Z\ne' : Trivialization F TotalSpace.proj\nx' : TotalSpace F E\nb : B\ny : E b\nB' : Type u_6\ninst✝ : TopologicalSpace B'\ne : Trivialization F proj\ns : Set B\nx : Z\nhx : x ∈ e.source\n⊢ ↑e.toLocalHomeomorph x ∈ s ×ˢ univ ↔ x ∈ proj ⁻¹' s\n[PROOFSTEP]\nsimp [e.coe_fst', hx]\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝⁴ : TopologicalSpace B\ninst✝³ : TopologicalSpace F\nproj : Z → B\ninst✝² : TopologicalSpace Z\ninst✝¹ : TopologicalSpace (TotalSpace F E)\ne✝ : Trivialization F proj\nx : Z\ne' : Trivialization F TotalSpace.proj\nx' : TotalSpace F E\nb : B\ny : E b\nB' : Type u_6\ninst✝ : TopologicalSpace B'\ne : Trivialization F proj\ns : Set B\nhs : IsOpen s\n⊢ (LocalHomeomorph.symm\n          (LocalHomeomorph.IsImage.restr\n            (_ : LocalHomeomorph.IsImage (LocalHomeomorph.symm e.toLocalHomeomorph) (s ×ˢ univ) (proj ⁻¹' s))\n            (_ :\n              IsOpen\n                ((LocalHomeomorph.symm e.toLocalHomeomorph).toLocalEquiv.source ∩ s ×ˢ univ)))).toLocalEquiv.source =\n    proj ⁻¹' (e.baseSet ∩ s)\n[PROOFSTEP]\nsimp [source_eq]\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝⁴ : TopologicalSpace B\ninst✝³ : TopologicalSpace F\nproj : Z → B\ninst✝² : TopologicalSpace Z\ninst✝¹ : TopologicalSpace (TotalSpace F E)\ne✝ : Trivialization F proj\nx : Z\ne' : Trivialization F TotalSpace.proj\nx' : TotalSpace F E\nb : B\ny : E b\nB' : Type u_6\ninst✝ : TopologicalSpace B'\ne : Trivialization F proj\ns : Set B\nhs : IsOpen s\n⊢ (LocalHomeomorph.symm\n          (LocalHomeomorph.IsImage.restr\n            (_ : LocalHomeomorph.IsImage (LocalHomeomorph.symm e.toLocalHomeomorph) (s ×ˢ univ) (proj ⁻¹' s))\n            (_ :\n              IsOpen\n                ((LocalHomeomorph.symm e.toLocalHomeomorph).toLocalEquiv.source ∩ s ×ˢ univ)))).toLocalEquiv.target =\n    (e.baseSet ∩ s) ×ˢ univ\n[PROOFSTEP]\nsimp [target_eq, prod_univ]\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝⁴ : TopologicalSpace B\ninst✝³ : TopologicalSpace F\nproj : Z → B\ninst✝² : TopologicalSpace Z\ninst✝¹ : TopologicalSpace (TotalSpace F E)\ne✝ : Trivialization F proj\nx : Z\ne' : Trivialization F TotalSpace.proj\nx' : TotalSpace F E\nb : B\ny : E b\nB' : Type u_6\ninst✝ : TopologicalSpace B'\ne : Trivialization F proj\ns : Set B\n⊢ e.source ∩ frontier (proj ⁻¹' s) = proj ⁻¹' (e.baseSet ∩ frontier s)\n[PROOFSTEP]\nrw [← (e.isImage_preimage_prod s).frontier.preimage_eq, frontier_prod_univ_eq, (e.isImage_preimage_prod _).preimage_eq,\n  e.source_eq, preimage_inter]\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝⁴ : TopologicalSpace B\ninst✝³ : TopologicalSpace F\nproj : Z → B\ninst✝² : TopologicalSpace Z\ninst✝¹ : TopologicalSpace (TotalSpace F E)\ne✝ : Trivialization F proj\nx : Z\ne'✝ : Trivialization F TotalSpace.proj\nx' : TotalSpace F E\nb : B\ny : E b\nB' : Type u_6\ninst✝ : TopologicalSpace B'\ne e' : Trivialization F proj\ns : Set B\nHs : e.baseSet ∩ frontier s = e'.baseSet ∩ frontier s\nHeq : EqOn (↑e) (↑e') (proj ⁻¹' (e.baseSet ∩ frontier s))\n⊢ e.source ∩ frontier (proj ⁻¹' s) = e'.source ∩ frontier (proj ⁻¹' s)\n[PROOFSTEP]\nrw [e.frontier_preimage, e'.frontier_preimage, Hs]\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝⁴ : TopologicalSpace B\ninst✝³ : TopologicalSpace F\nproj : Z → B\ninst✝² : TopologicalSpace Z\ninst✝¹ : TopologicalSpace (TotalSpace F E)\ne✝ : Trivialization F proj\nx : Z\ne'✝ : Trivialization F TotalSpace.proj\nx' : TotalSpace F E\nb : B\ny : E b\nB' : Type u_6\ninst✝ : TopologicalSpace B'\ne e' : Trivialization F proj\ns : Set B\nHs : e.baseSet ∩ frontier s = e'.baseSet ∩ frontier s\nHeq : EqOn (↑e) (↑e') (proj ⁻¹' (e.baseSet ∩ frontier s))\n⊢ EqOn (↑e.toLocalHomeomorph) (↑e'.toLocalHomeomorph) (e.source ∩ frontier (proj ⁻¹' s))\n[PROOFSTEP]\nrwa [e.frontier_preimage]\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝⁴ : TopologicalSpace B\ninst✝³ : TopologicalSpace F\nproj : Z → B\ninst✝² : TopologicalSpace Z\ninst✝¹ : TopologicalSpace (TotalSpace F E)\ne✝ : Trivialization F proj\nx : Z\ne'✝ : Trivialization F TotalSpace.proj\nx' : TotalSpace F E\nb : B\ny : E b\nB' : Type u_6\ninst✝ : TopologicalSpace B'\ne e' : Trivialization F proj\ns : Set B\nHs : e.baseSet ∩ frontier s = e'.baseSet ∩ frontier s\nHeq : EqOn (↑e) (↑e') (proj ⁻¹' (e.baseSet ∩ frontier s))\n⊢ (LocalHomeomorph.piecewise e.toLocalHomeomorph e'.toLocalHomeomorph (proj ⁻¹' s) (s ×ˢ univ)\n          (_ : LocalHomeomorph.IsImage e.toLocalHomeomorph (proj ⁻¹' s) (s ×ˢ univ))\n          (_ : LocalHomeomorph.IsImage e'.toLocalHomeomorph (proj ⁻¹' s) (s ×ˢ univ))\n          (_ : e.source ∩ frontier (proj ⁻¹' s) = e'.source ∩ frontier (proj ⁻¹' s))\n          (_ :\n            EqOn (↑e.toLocalHomeomorph) (↑e'.toLocalHomeomorph)\n              (e.source ∩ frontier (proj ⁻¹' s)))).toLocalEquiv.source =\n    proj ⁻¹' Set.ite s e.baseSet e'.baseSet\n[PROOFSTEP]\nsimp [source_eq]\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝⁴ : TopologicalSpace B\ninst✝³ : TopologicalSpace F\nproj : Z → B\ninst✝² : TopologicalSpace Z\ninst✝¹ : TopologicalSpace (TotalSpace F E)\ne✝ : Trivialization F proj\nx : Z\ne'✝ : Trivialization F TotalSpace.proj\nx' : TotalSpace F E\nb : B\ny : E b\nB' : Type u_6\ninst✝ : TopologicalSpace B'\ne e' : Trivialization F proj\ns : Set B\nHs : e.baseSet ∩ frontier s = e'.baseSet ∩ frontier s\nHeq : EqOn (↑e) (↑e') (proj ⁻¹' (e.baseSet ∩ frontier s))\n⊢ (LocalHomeomorph.piecewise e.toLocalHomeomorph e'.toLocalHomeomorph (proj ⁻¹' s) (s ×ˢ univ)\n          (_ : LocalHomeomorph.IsImage e.toLocalHomeomorph (proj ⁻¹' s) (s ×ˢ univ))\n          (_ : LocalHomeomorph.IsImage e'.toLocalHomeomorph (proj ⁻¹' s) (s ×ˢ univ))\n          (_ : e.source ∩ frontier (proj ⁻¹' s) = e'.source ∩ frontier (proj ⁻¹' s))\n          (_ :\n            EqOn (↑e.toLocalHomeomorph) (↑e'.toLocalHomeomorph)\n              (e.source ∩ frontier (proj ⁻¹' s)))).toLocalEquiv.target =\n    Set.ite s e.baseSet e'.baseSet ×ˢ univ\n[PROOFSTEP]\nsimp [target_eq, prod_univ]\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝⁴ : TopologicalSpace B\ninst✝³ : TopologicalSpace F\nproj : Z → B\ninst✝² : TopologicalSpace Z\ninst✝¹ : TopologicalSpace (TotalSpace F E)\ne✝ : Trivialization F proj\nx : Z\ne'✝ : Trivialization F TotalSpace.proj\nx' : TotalSpace F E\nb : B\ny : E b\nB' : Type u_6\ninst✝ : TopologicalSpace B'\ne e' : Trivialization F proj\ns : Set B\nHs : e.baseSet ∩ frontier s = e'.baseSet ∩ frontier s\nHeq : EqOn (↑e) (↑e') (proj ⁻¹' (e.baseSet ∩ frontier s))\np : Z\n⊢ p ∈\n      (LocalHomeomorph.piecewise e.toLocalHomeomorph e'.toLocalHomeomorph (proj ⁻¹' s) (s ×ˢ univ)\n            (_ : LocalHomeomorph.IsImage e.toLocalHomeomorph (proj ⁻¹' s) (s ×ˢ univ))\n            (_ : LocalHomeomorph.IsImage e'.toLocalHomeomorph (proj ⁻¹' s) (s ×ˢ univ))\n            (_ : e.source ∩ frontier (proj ⁻¹' s) = e'.source ∩ frontier (proj ⁻¹' s))\n            (_ :\n              EqOn (↑e.toLocalHomeomorph) (↑e'.toLocalHomeomorph)\n                (e.source ∩ frontier (proj ⁻¹' s)))).toLocalEquiv.source →\n    (↑(LocalHomeomorph.piecewise e.toLocalHomeomorph e'.toLocalHomeomorph (proj ⁻¹' s) (s ×ˢ univ)\n              (_ : LocalHomeomorph.IsImage e.toLocalHomeomorph (proj ⁻¹' s) (s ×ˢ univ))\n              (_ : LocalHomeomorph.IsImage e'.toLocalHomeomorph (proj ⁻¹' s) (s ×ˢ univ))\n              (_ : e.source ∩ frontier (proj ⁻¹' s) = e'.source ∩ frontier (proj ⁻¹' s))\n              (_ : EqOn (↑e.toLocalHomeomorph) (↑e'.toLocalHomeomorph) (e.source ∩ frontier (proj ⁻¹' s))))\n          p).fst =\n      proj p\n[PROOFSTEP]\nrintro\n  (⟨he, hs⟩ | ⟨he, hs⟩)\n      -- porting note: was `<;> simp [*]`\n[GOAL]\ncase inl.intro\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝⁴ : TopologicalSpace B\ninst✝³ : TopologicalSpace F\nproj : Z → B\ninst✝² : TopologicalSpace Z\ninst✝¹ : TopologicalSpace (TotalSpace F E)\ne✝ : Trivialization F proj\nx : Z\ne'✝ : Trivialization F TotalSpace.proj\nx' : TotalSpace F E\nb : B\ny : E b\nB' : Type u_6\ninst✝ : TopologicalSpace B'\ne e' : Trivialization F proj\ns : Set B\nHs : e.baseSet ∩ frontier s = e'.baseSet ∩ frontier s\nHeq : EqOn (↑e) (↑e') (proj ⁻¹' (e.baseSet ∩ frontier s))\np : Z\nhe : p ∈ e.source\nhs : p ∈ proj ⁻¹' s\n⊢ (↑(LocalHomeomorph.piecewise e.toLocalHomeomorph e'.toLocalHomeomorph (proj ⁻¹' s) (s ×ˢ univ)\n            (_ : LocalHomeomorph.IsImage e.toLocalHomeomorph (proj ⁻¹' s) (s ×ˢ univ))\n            (_ : LocalHomeomorph.IsImage e'.toLocalHomeomorph (proj ⁻¹' s) (s ×ˢ univ))\n            (_ : e.source ∩ frontier (proj ⁻¹' s) = e'.source ∩ frontier (proj ⁻¹' s))\n            (_ : EqOn (↑e.toLocalHomeomorph) (↑e'.toLocalHomeomorph) (e.source ∩ frontier (proj ⁻¹' s))))\n        p).fst =\n    proj p\n[PROOFSTEP]\nsimp [piecewise_eq_of_mem _ _ _ hs, *]\n[GOAL]\ncase inr.intro\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝⁴ : TopologicalSpace B\ninst✝³ : TopologicalSpace F\nproj : Z → B\ninst✝² : TopologicalSpace Z\ninst✝¹ : TopologicalSpace (TotalSpace F E)\ne✝ : Trivialization F proj\nx : Z\ne'✝ : Trivialization F TotalSpace.proj\nx' : TotalSpace F E\nb : B\ny : E b\nB' : Type u_6\ninst✝ : TopologicalSpace B'\ne e' : Trivialization F proj\ns : Set B\nHs : e.baseSet ∩ frontier s = e'.baseSet ∩ frontier s\nHeq : EqOn (↑e) (↑e') (proj ⁻¹' (e.baseSet ∩ frontier s))\np : Z\nhe : p ∈ e'.source\nhs : ¬p ∈ proj ⁻¹' s\n⊢ (↑(LocalHomeomorph.piecewise e.toLocalHomeomorph e'.toLocalHomeomorph (proj ⁻¹' s) (s ×ˢ univ)\n            (_ : LocalHomeomorph.IsImage e.toLocalHomeomorph (proj ⁻¹' s) (s ×ˢ univ))\n            (_ : LocalHomeomorph.IsImage e'.toLocalHomeomorph (proj ⁻¹' s) (s ×ˢ univ))\n            (_ : e.source ∩ frontier (proj ⁻¹' s) = e'.source ∩ frontier (proj ⁻¹' s))\n            (_ : EqOn (↑e.toLocalHomeomorph) (↑e'.toLocalHomeomorph) (e.source ∩ frontier (proj ⁻¹' s))))\n        p).fst =\n    proj p\n[PROOFSTEP]\nsimp [piecewise_eq_of_not_mem _ _ _ hs, *]\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace F\nproj : Z → B\ninst✝⁴ : TopologicalSpace Z\ninst✝³ : TopologicalSpace (TotalSpace F E)\ne✝ : Trivialization F proj\nx✝ : Z\ne'✝ : Trivialization F TotalSpace.proj\nx' : TotalSpace F E\nb : B\ny : E b\nB' : Type u_6\ninst✝² : TopologicalSpace B'\ninst✝¹ : LinearOrder B\ninst✝ : OrderTopology B\ne e' : Trivialization F proj\na : B\nHe : a ∈ e.baseSet\nHe' : a ∈ e'.baseSet\nHeq : ∀ (p : Z), proj p = a → ↑e p = ↑e' p\nx : B\nhx : x ∈ frontier (Iic a)\n⊢ x ∈ e.baseSet ↔ x ∈ e'.baseSet\n[PROOFSTEP]\nobtain rfl : x = a := mem_singleton_iff.1 (frontier_Iic_subset _ hx)\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace F\nproj : Z → B\ninst✝⁴ : TopologicalSpace Z\ninst✝³ : TopologicalSpace (TotalSpace F E)\ne✝ : Trivialization F proj\nx✝ : Z\ne'✝ : Trivialization F TotalSpace.proj\nx' : TotalSpace F E\nb : B\ny : E b\nB' : Type u_6\ninst✝² : TopologicalSpace B'\ninst✝¹ : LinearOrder B\ninst✝ : OrderTopology B\ne e' : Trivialization F proj\nx : B\nHe : x ∈ e.baseSet\nHe' : x ∈ e'.baseSet\nHeq : ∀ (p : Z), proj p = x → ↑e p = ↑e' p\nhx : x ∈ frontier (Iic x)\n⊢ x ∈ e.baseSet ↔ x ∈ e'.baseSet\n[PROOFSTEP]\nsimp [He, He']\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace F\nproj : Z → B\ninst✝⁴ : TopologicalSpace Z\ninst✝³ : TopologicalSpace (TotalSpace F E)\ne✝ : Trivialization F proj\nx : Z\ne'✝ : Trivialization F TotalSpace.proj\nx' : TotalSpace F E\nb : B\ny : E b\nB' : Type u_6\ninst✝² : TopologicalSpace B'\ninst✝¹ : LinearOrder B\ninst✝ : OrderTopology B\ne e' : Trivialization F proj\na : B\nHe : a ∈ e.baseSet\nHe' : a ∈ e'.baseSet\n⊢ ∀ (p : Z), proj p = a → ↑e p = ↑(transFiberHomeomorph e' (Trivialization.coordChangeHomeomorph e' e He' He)) p\n[PROOFSTEP]\nrintro p rfl\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace F\nproj : Z → B\ninst✝⁴ : TopologicalSpace Z\ninst✝³ : TopologicalSpace (TotalSpace F E)\ne✝ : Trivialization F proj\nx : Z\ne'✝ : Trivialization F TotalSpace.proj\nx' : TotalSpace F E\nb : B\ny : E b\nB' : Type u_6\ninst✝² : TopologicalSpace B'\ninst✝¹ : LinearOrder B\ninst✝ : OrderTopology B\ne e' : Trivialization F proj\np : Z\nHe : proj p ∈ e.baseSet\nHe' : proj p ∈ e'.baseSet\n⊢ ↑e p = ↑(transFiberHomeomorph e' (Trivialization.coordChangeHomeomorph e' e He' He)) p\n[PROOFSTEP]\next1\n[GOAL]\ncase h₁\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace F\nproj : Z → B\ninst✝⁴ : TopologicalSpace Z\ninst✝³ : TopologicalSpace (TotalSpace F E)\ne✝ : Trivialization F proj\nx : Z\ne'✝ : Trivialization F TotalSpace.proj\nx' : TotalSpace F E\nb : B\ny : E b\nB' : Type u_6\ninst✝² : TopologicalSpace B'\ninst✝¹ : LinearOrder B\ninst✝ : OrderTopology B\ne e' : Trivialization F proj\np : Z\nHe : proj p ∈ e.baseSet\nHe' : proj p ∈ e'.baseSet\n⊢ (↑e p).fst = (↑(transFiberHomeomorph e' (Trivialization.coordChangeHomeomorph e' e He' He)) p).fst\n[PROOFSTEP]\nsimp [e.coe_fst', e'.coe_fst', *]\n[GOAL]\ncase h₂\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝⁶ : TopologicalSpace B\ninst✝⁵ : TopologicalSpace F\nproj : Z → B\ninst✝⁴ : TopologicalSpace Z\ninst✝³ : TopologicalSpace (TotalSpace F E)\ne✝ : Trivialization F proj\nx : Z\ne'✝ : Trivialization F TotalSpace.proj\nx' : TotalSpace F E\nb : B\ny : E b\nB' : Type u_6\ninst✝² : TopologicalSpace B'\ninst✝¹ : LinearOrder B\ninst✝ : OrderTopology B\ne e' : Trivialization F proj\np : Z\nHe : proj p ∈ e.baseSet\nHe' : proj p ∈ e'.baseSet\n⊢ (↑e p).snd = (↑(transFiberHomeomorph e' (Trivialization.coordChangeHomeomorph e' e He' He)) p).snd\n[PROOFSTEP]\nsimp [coordChange_apply_snd, *]\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝⁴ : TopologicalSpace B\ninst✝³ : TopologicalSpace F\nproj : Z → B\ninst✝² : TopologicalSpace Z\ninst✝¹ : TopologicalSpace (TotalSpace F E)\ne✝ : Trivialization F proj\nx : Z\ne'✝ : Trivialization F TotalSpace.proj\nx' : TotalSpace F E\nb : B\ny : E b\nB' : Type u_6\ninst✝ : TopologicalSpace B'\ne e' : Trivialization F proj\nH : Disjoint e.baseSet e'.baseSet\n⊢ Disjoint e.source e'.source\n[PROOFSTEP]\nrw [e.source_eq, e'.source_eq]\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝⁴ : TopologicalSpace B\ninst✝³ : TopologicalSpace F\nproj : Z → B\ninst✝² : TopologicalSpace Z\ninst✝¹ : TopologicalSpace (TotalSpace F E)\ne✝ : Trivialization F proj\nx : Z\ne'✝ : Trivialization F TotalSpace.proj\nx' : TotalSpace F E\nb : B\ny : E b\nB' : Type u_6\ninst✝ : TopologicalSpace B'\ne e' : Trivialization F proj\nH : Disjoint e.baseSet e'.baseSet\n⊢ Disjoint (proj ⁻¹' e.baseSet) (proj ⁻¹' e'.baseSet)\n[PROOFSTEP]\nexact H.preimage _\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝⁴ : TopologicalSpace B\ninst✝³ : TopologicalSpace F\nproj : Z → B\ninst✝² : TopologicalSpace Z\ninst✝¹ : TopologicalSpace (TotalSpace F E)\ne✝ : Trivialization F proj\nx : Z\ne'✝ : Trivialization F TotalSpace.proj\nx' : TotalSpace F E\nb : B\ny : E b\nB' : Type u_6\ninst✝ : TopologicalSpace B'\ne e' : Trivialization F proj\nH : Disjoint e.baseSet e'.baseSet\n⊢ Disjoint e.target e'.target\n[PROOFSTEP]\nrw [e.target_eq, e'.target_eq, disjoint_iff_inf_le]\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝⁴ : TopologicalSpace B\ninst✝³ : TopologicalSpace F\nproj : Z → B\ninst✝² : TopologicalSpace Z\ninst✝¹ : TopologicalSpace (TotalSpace F E)\ne✝ : Trivialization F proj\nx : Z\ne'✝ : Trivialization F TotalSpace.proj\nx' : TotalSpace F E\nb : B\ny : E b\nB' : Type u_6\ninst✝ : TopologicalSpace B'\ne e' : Trivialization F proj\nH : Disjoint e.baseSet e'.baseSet\n⊢ e.baseSet ×ˢ univ ⊓ e'.baseSet ×ˢ univ ≤ ⊥\n[PROOFSTEP]\nintro x hx\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝⁴ : TopologicalSpace B\ninst✝³ : TopologicalSpace F\nproj : Z → B\ninst✝² : TopologicalSpace Z\ninst✝¹ : TopologicalSpace (TotalSpace F E)\ne✝ : Trivialization F proj\nx✝ : Z\ne'✝ : Trivialization F TotalSpace.proj\nx' : TotalSpace F E\nb : B\ny : E b\nB' : Type u_6\ninst✝ : TopologicalSpace B'\ne e' : Trivialization F proj\nH : Disjoint e.baseSet e'.baseSet\nx : B × F\nhx : x ∈ e.baseSet ×ˢ univ ⊓ e'.baseSet ×ˢ univ\n⊢ x ∈ ⊥\n[PROOFSTEP]\nexact H.le_bot ⟨hx.1.1, hx.2.1⟩\n[GOAL]\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝⁴ : TopologicalSpace B\ninst✝³ : TopologicalSpace F\nproj : Z → B\ninst✝² : TopologicalSpace Z\ninst✝¹ : TopologicalSpace (TotalSpace F E)\ne✝ : Trivialization F proj\nx : Z\ne'✝ : Trivialization F TotalSpace.proj\nx' : TotalSpace F E\nb : B\ny : E b\nB' : Type u_6\ninst✝ : TopologicalSpace B'\ne e' : Trivialization F proj\nH : Disjoint e.baseSet e'.baseSet\n⊢ ∀ (p : Z),\n    p ∈\n        (LocalHomeomorph.disjointUnion e.toLocalHomeomorph e'.toLocalHomeomorph (_ : Disjoint e.source e'.source)\n              (_ : Disjoint e.target e'.target)).toLocalEquiv.source →\n      (↑(LocalHomeomorph.disjointUnion e.toLocalHomeomorph e'.toLocalHomeomorph (_ : Disjoint e.source e'.source)\n                (_ : Disjoint e.target e'.target))\n            p).fst =\n        proj p\n[PROOFSTEP]\nrintro p (hp | hp')\n[GOAL]\ncase inl\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝⁴ : TopologicalSpace B\ninst✝³ : TopologicalSpace F\nproj : Z → B\ninst✝² : TopologicalSpace Z\ninst✝¹ : TopologicalSpace (TotalSpace F E)\ne✝ : Trivialization F proj\nx : Z\ne'✝ : Trivialization F TotalSpace.proj\nx' : TotalSpace F E\nb : B\ny : E b\nB' : Type u_6\ninst✝ : TopologicalSpace B'\ne e' : Trivialization F proj\nH : Disjoint e.baseSet e'.baseSet\np : Z\nhp : p ∈ e.source\n⊢ (↑(LocalHomeomorph.disjointUnion e.toLocalHomeomorph e'.toLocalHomeomorph (_ : Disjoint e.source e'.source)\n            (_ : Disjoint e.target e'.target))\n        p).fst =\n    proj p\n[PROOFSTEP]\nshow (e.source.piecewise e e' p).1 = proj p\n[GOAL]\ncase inl\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝⁴ : TopologicalSpace B\ninst✝³ : TopologicalSpace F\nproj : Z → B\ninst✝² : TopologicalSpace Z\ninst✝¹ : TopologicalSpace (TotalSpace F E)\ne✝ : Trivialization F proj\nx : Z\ne'✝ : Trivialization F TotalSpace.proj\nx' : TotalSpace F E\nb : B\ny : E b\nB' : Type u_6\ninst✝ : TopologicalSpace B'\ne e' : Trivialization F proj\nH : Disjoint e.baseSet e'.baseSet\np : Z\nhp : p ∈ e.source\n⊢ (Set.piecewise e.source (↑e) (↑e') p).fst = proj p\n[PROOFSTEP]\nrw [piecewise_eq_of_mem, e.coe_fst]\n[GOAL]\ncase inl\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝⁴ : TopologicalSpace B\ninst✝³ : TopologicalSpace F\nproj : Z → B\ninst✝² : TopologicalSpace Z\ninst✝¹ : TopologicalSpace (TotalSpace F E)\ne✝ : Trivialization F proj\nx : Z\ne'✝ : Trivialization F TotalSpace.proj\nx' : TotalSpace F E\nb : B\ny : E b\nB' : Type u_6\ninst✝ : TopologicalSpace B'\ne e' : Trivialization F proj\nH : Disjoint e.baseSet e'.baseSet\np : Z\nhp : p ∈ e.source\n⊢ p ∈ e.source\n[PROOFSTEP]\nexact hp\n[GOAL]\ncase inl.hi\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝⁴ : TopologicalSpace B\ninst✝³ : TopologicalSpace F\nproj : Z → B\ninst✝² : TopologicalSpace Z\ninst✝¹ : TopologicalSpace (TotalSpace F E)\ne✝ : Trivialization F proj\nx : Z\ne'✝ : Trivialization F TotalSpace.proj\nx' : TotalSpace F E\nb : B\ny : E b\nB' : Type u_6\ninst✝ : TopologicalSpace B'\ne e' : Trivialization F proj\nH : Disjoint e.baseSet e'.baseSet\np : Z\nhp : p ∈ e.source\n⊢ p ∈ e.source\n[PROOFSTEP]\nexact hp\n[GOAL]\ncase inr\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝⁴ : TopologicalSpace B\ninst✝³ : TopologicalSpace F\nproj : Z → B\ninst✝² : TopologicalSpace Z\ninst✝¹ : TopologicalSpace (TotalSpace F E)\ne✝ : Trivialization F proj\nx : Z\ne'✝ : Trivialization F TotalSpace.proj\nx' : TotalSpace F E\nb : B\ny : E b\nB' : Type u_6\ninst✝ : TopologicalSpace B'\ne e' : Trivialization F proj\nH : Disjoint e.baseSet e'.baseSet\np : Z\nhp' : p ∈ e'.source\n⊢ (↑(LocalHomeomorph.disjointUnion e.toLocalHomeomorph e'.toLocalHomeomorph (_ : Disjoint e.source e'.source)\n            (_ : Disjoint e.target e'.target))\n        p).fst =\n    proj p\n[PROOFSTEP]\nshow (e.source.piecewise e e' p).1 = proj p\n[GOAL]\ncase inr\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝⁴ : TopologicalSpace B\ninst✝³ : TopologicalSpace F\nproj : Z → B\ninst✝² : TopologicalSpace Z\ninst✝¹ : TopologicalSpace (TotalSpace F E)\ne✝ : Trivialization F proj\nx : Z\ne'✝ : Trivialization F TotalSpace.proj\nx' : TotalSpace F E\nb : B\ny : E b\nB' : Type u_6\ninst✝ : TopologicalSpace B'\ne e' : Trivialization F proj\nH : Disjoint e.baseSet e'.baseSet\np : Z\nhp' : p ∈ e'.source\n⊢ (Set.piecewise e.source (↑e) (↑e') p).fst = proj p\n[PROOFSTEP]\nrw [piecewise_eq_of_not_mem, e'.coe_fst hp']\n[GOAL]\ncase inr.hi\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝⁴ : TopologicalSpace B\ninst✝³ : TopologicalSpace F\nproj : Z → B\ninst✝² : TopologicalSpace Z\ninst✝¹ : TopologicalSpace (TotalSpace F E)\ne✝ : Trivialization F proj\nx : Z\ne'✝ : Trivialization F TotalSpace.proj\nx' : TotalSpace F E\nb : B\ny : E b\nB' : Type u_6\ninst✝ : TopologicalSpace B'\ne e' : Trivialization F proj\nH : Disjoint e.baseSet e'.baseSet\np : Z\nhp' : p ∈ e'.source\n⊢ ¬p ∈ e.source\n[PROOFSTEP]\nsimp only [source_eq] at hp' ⊢\n[GOAL]\ncase inr.hi\nι : Type u_1\nB : Type u_2\nF : Type u_3\nE : B → Type u_4\nZ : Type u_5\ninst✝⁴ : TopologicalSpace B\ninst✝³ : TopologicalSpace F\nproj : Z → B\ninst✝² : TopologicalSpace Z\ninst✝¹ : TopologicalSpace (TotalSpace F E)\ne✝ : Trivialization F proj\nx : Z\ne'✝ : Trivialization F TotalSpace.proj\nx' : TotalSpace F E\nb : B\ny : E b\nB' : Type u_6\ninst✝ : TopologicalSpace B'\ne e' : Trivialization F proj\nH : Disjoint e.baseSet e'.baseSet\np : Z\nhp' : p ∈ proj ⁻¹' e'.baseSet\n⊢ ¬p ∈ proj ⁻¹' e.baseSet\n[PROOFSTEP]\nexact fun h => H.le_bot ⟨h, hp'⟩\n", "meta": {"mathlib_filename": "Mathlib.Topology.FiberBundle.Trivialization", "llama_tokens": 31632, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8152324938410784, "lm_q2_score": 0.6187804337438501, "lm_q1q2_score": 0.504449916141063}}
{"text": "[GOAL]\nG : Type u_1\ninst✝⁹ : Group G\ninst✝⁸ : MeasurableSpace G\ninst✝⁷ : TopologicalSpace G\ninst✝⁶ : TopologicalGroup G\ninst✝⁵ : BorelSpace G\nμ : Measure G\nΓ : Subgroup G\n𝓕 : Set G\nh𝓕 : IsFundamentalDomain { x // x ∈ ↑Subgroup.opposite Γ } 𝓕\ninst✝⁴ : Countable { x // x ∈ Γ }\ninst✝³ : MeasurableSpace (G ⧸ Γ)\ninst✝² : BorelSpace (G ⧸ Γ)\ninst✝¹ : IsMulLeftInvariant μ\ninst✝ : IsMulRightInvariant μ\ng : G\nA : Set (G ⧸ Γ)\nhA : MeasurableSet A\n⊢ ↑↑(map QuotientGroup.mk (Measure.restrict μ 𝓕)) ((fun x => g • x) ⁻¹' A) =\n    ↑↑(map QuotientGroup.mk (Measure.restrict μ 𝓕)) A\n[PROOFSTEP]\nlet π : G → G ⧸ Γ := QuotientGroup.mk\n[GOAL]\nG : Type u_1\ninst✝⁹ : Group G\ninst✝⁸ : MeasurableSpace G\ninst✝⁷ : TopologicalSpace G\ninst✝⁶ : TopologicalGroup G\ninst✝⁵ : BorelSpace G\nμ : Measure G\nΓ : Subgroup G\n𝓕 : Set G\nh𝓕 : IsFundamentalDomain { x // x ∈ ↑Subgroup.opposite Γ } 𝓕\ninst✝⁴ : Countable { x // x ∈ Γ }\ninst✝³ : MeasurableSpace (G ⧸ Γ)\ninst✝² : BorelSpace (G ⧸ Γ)\ninst✝¹ : IsMulLeftInvariant μ\ninst✝ : IsMulRightInvariant μ\ng : G\nA : Set (G ⧸ Γ)\nhA : MeasurableSet A\nπ : G → G ⧸ Γ := QuotientGroup.mk\n⊢ ↑↑(map QuotientGroup.mk (Measure.restrict μ 𝓕)) ((fun x => g • x) ⁻¹' A) =\n    ↑↑(map QuotientGroup.mk (Measure.restrict μ 𝓕)) A\n[PROOFSTEP]\nhave meas_π : Measurable π := continuous_quotient_mk'.measurable\n[GOAL]\nG : Type u_1\ninst✝⁹ : Group G\ninst✝⁸ : MeasurableSpace G\ninst✝⁷ : TopologicalSpace G\ninst✝⁶ : TopologicalGroup G\ninst✝⁵ : BorelSpace G\nμ : Measure G\nΓ : Subgroup G\n𝓕 : Set G\nh𝓕 : IsFundamentalDomain { x // x ∈ ↑Subgroup.opposite Γ } 𝓕\ninst✝⁴ : Countable { x // x ∈ Γ }\ninst✝³ : MeasurableSpace (G ⧸ Γ)\ninst✝² : BorelSpace (G ⧸ Γ)\ninst✝¹ : IsMulLeftInvariant μ\ninst✝ : IsMulRightInvariant μ\ng : G\nA : Set (G ⧸ Γ)\nhA : MeasurableSet A\nπ : G → G ⧸ Γ := QuotientGroup.mk\nmeas_π : Measurable π\n⊢ ↑↑(map QuotientGroup.mk (Measure.restrict μ 𝓕)) ((fun x => g • x) ⁻¹' A) =\n    ↑↑(map QuotientGroup.mk (Measure.restrict μ 𝓕)) A\n[PROOFSTEP]\nhave 𝓕meas : NullMeasurableSet 𝓕 μ := h𝓕.nullMeasurableSet\n[GOAL]\nG : Type u_1\ninst✝⁹ : Group G\ninst✝⁸ : MeasurableSpace G\ninst✝⁷ : TopologicalSpace G\ninst✝⁶ : TopologicalGroup G\ninst✝⁵ : BorelSpace G\nμ : Measure G\nΓ : Subgroup G\n𝓕 : Set G\nh𝓕 : IsFundamentalDomain { x // x ∈ ↑Subgroup.opposite Γ } 𝓕\ninst✝⁴ : Countable { x // x ∈ Γ }\ninst✝³ : MeasurableSpace (G ⧸ Γ)\ninst✝² : BorelSpace (G ⧸ Γ)\ninst✝¹ : IsMulLeftInvariant μ\ninst✝ : IsMulRightInvariant μ\ng : G\nA : Set (G ⧸ Γ)\nhA : MeasurableSet A\nπ : G → G ⧸ Γ := QuotientGroup.mk\nmeas_π : Measurable π\n𝓕meas : NullMeasurableSet 𝓕\n⊢ ↑↑(map QuotientGroup.mk (Measure.restrict μ 𝓕)) ((fun x => g • x) ⁻¹' A) =\n    ↑↑(map QuotientGroup.mk (Measure.restrict μ 𝓕)) A\n[PROOFSTEP]\nhave meas_πA : MeasurableSet (π ⁻¹' A) := measurableSet_preimage meas_π hA\n[GOAL]\nG : Type u_1\ninst✝⁹ : Group G\ninst✝⁸ : MeasurableSpace G\ninst✝⁷ : TopologicalSpace G\ninst✝⁶ : TopologicalGroup G\ninst✝⁵ : BorelSpace G\nμ : Measure G\nΓ : Subgroup G\n𝓕 : Set G\nh𝓕 : IsFundamentalDomain { x // x ∈ ↑Subgroup.opposite Γ } 𝓕\ninst✝⁴ : Countable { x // x ∈ Γ }\ninst✝³ : MeasurableSpace (G ⧸ Γ)\ninst✝² : BorelSpace (G ⧸ Γ)\ninst✝¹ : IsMulLeftInvariant μ\ninst✝ : IsMulRightInvariant μ\ng : G\nA : Set (G ⧸ Γ)\nhA : MeasurableSet A\nπ : G → G ⧸ Γ := QuotientGroup.mk\nmeas_π : Measurable π\n𝓕meas : NullMeasurableSet 𝓕\nmeas_πA : MeasurableSet (π ⁻¹' A)\n⊢ ↑↑(map QuotientGroup.mk (Measure.restrict μ 𝓕)) ((fun x => g • x) ⁻¹' A) =\n    ↑↑(map QuotientGroup.mk (Measure.restrict μ 𝓕)) A\n[PROOFSTEP]\nrw [Measure.map_apply meas_π hA, Measure.map_apply meas_π (measurableSet_preimage (measurable_const_smul g) hA),\n  Measure.restrict_apply₀' 𝓕meas, Measure.restrict_apply₀' 𝓕meas]\n[GOAL]\nG : Type u_1\ninst✝⁹ : Group G\ninst✝⁸ : MeasurableSpace G\ninst✝⁷ : TopologicalSpace G\ninst✝⁶ : TopologicalGroup G\ninst✝⁵ : BorelSpace G\nμ : Measure G\nΓ : Subgroup G\n𝓕 : Set G\nh𝓕 : IsFundamentalDomain { x // x ∈ ↑Subgroup.opposite Γ } 𝓕\ninst✝⁴ : Countable { x // x ∈ Γ }\ninst✝³ : MeasurableSpace (G ⧸ Γ)\ninst✝² : BorelSpace (G ⧸ Γ)\ninst✝¹ : IsMulLeftInvariant μ\ninst✝ : IsMulRightInvariant μ\ng : G\nA : Set (G ⧸ Γ)\nhA : MeasurableSet A\nπ : G → G ⧸ Γ := QuotientGroup.mk\nmeas_π : Measurable π\n𝓕meas : NullMeasurableSet 𝓕\nmeas_πA : MeasurableSet (π ⁻¹' A)\n⊢ ↑↑μ (π ⁻¹' ((fun x x_1 => x • x_1) g ⁻¹' A) ∩ 𝓕) = ↑↑μ (π ⁻¹' A ∩ 𝓕)\n[PROOFSTEP]\nset π_preA := π ⁻¹' A\n[GOAL]\nG : Type u_1\ninst✝⁹ : Group G\ninst✝⁸ : MeasurableSpace G\ninst✝⁷ : TopologicalSpace G\ninst✝⁶ : TopologicalGroup G\ninst✝⁵ : BorelSpace G\nμ : Measure G\nΓ : Subgroup G\n𝓕 : Set G\nh𝓕 : IsFundamentalDomain { x // x ∈ ↑Subgroup.opposite Γ } 𝓕\ninst✝⁴ : Countable { x // x ∈ Γ }\ninst✝³ : MeasurableSpace (G ⧸ Γ)\ninst✝² : BorelSpace (G ⧸ Γ)\ninst✝¹ : IsMulLeftInvariant μ\ninst✝ : IsMulRightInvariant μ\ng : G\nA : Set (G ⧸ Γ)\nhA : MeasurableSet A\nπ : G → G ⧸ Γ := QuotientGroup.mk\nmeas_π : Measurable π\n𝓕meas : NullMeasurableSet 𝓕\nπ_preA : Set G := π ⁻¹' A\nmeas_πA : MeasurableSet π_preA\n⊢ ↑↑μ (π ⁻¹' ((fun x x_1 => x • x_1) g ⁻¹' A) ∩ 𝓕) = ↑↑μ (π_preA ∩ 𝓕)\n[PROOFSTEP]\nhave : π ⁻¹' ((fun x : G ⧸ Γ => g • x) ⁻¹' A) = (g * ·) ⁻¹' π_preA := by ext1; simp\n[GOAL]\nG : Type u_1\ninst✝⁹ : Group G\ninst✝⁸ : MeasurableSpace G\ninst✝⁷ : TopologicalSpace G\ninst✝⁶ : TopologicalGroup G\ninst✝⁵ : BorelSpace G\nμ : Measure G\nΓ : Subgroup G\n𝓕 : Set G\nh𝓕 : IsFundamentalDomain { x // x ∈ ↑Subgroup.opposite Γ } 𝓕\ninst✝⁴ : Countable { x // x ∈ Γ }\ninst✝³ : MeasurableSpace (G ⧸ Γ)\ninst✝² : BorelSpace (G ⧸ Γ)\ninst✝¹ : IsMulLeftInvariant μ\ninst✝ : IsMulRightInvariant μ\ng : G\nA : Set (G ⧸ Γ)\nhA : MeasurableSet A\nπ : G → G ⧸ Γ := QuotientGroup.mk\nmeas_π : Measurable π\n𝓕meas : NullMeasurableSet 𝓕\nπ_preA : Set G := π ⁻¹' A\nmeas_πA : MeasurableSet π_preA\n⊢ π ⁻¹' ((fun x => g • x) ⁻¹' A) = (fun x => g * x) ⁻¹' π_preA\n[PROOFSTEP]\next1\n[GOAL]\ncase h\nG : Type u_1\ninst✝⁹ : Group G\ninst✝⁸ : MeasurableSpace G\ninst✝⁷ : TopologicalSpace G\ninst✝⁶ : TopologicalGroup G\ninst✝⁵ : BorelSpace G\nμ : Measure G\nΓ : Subgroup G\n𝓕 : Set G\nh𝓕 : IsFundamentalDomain { x // x ∈ ↑Subgroup.opposite Γ } 𝓕\ninst✝⁴ : Countable { x // x ∈ Γ }\ninst✝³ : MeasurableSpace (G ⧸ Γ)\ninst✝² : BorelSpace (G ⧸ Γ)\ninst✝¹ : IsMulLeftInvariant μ\ninst✝ : IsMulRightInvariant μ\ng : G\nA : Set (G ⧸ Γ)\nhA : MeasurableSet A\nπ : G → G ⧸ Γ := QuotientGroup.mk\nmeas_π : Measurable π\n𝓕meas : NullMeasurableSet 𝓕\nπ_preA : Set G := π ⁻¹' A\nmeas_πA : MeasurableSet π_preA\nx✝ : G\n⊢ x✝ ∈ π ⁻¹' ((fun x => g • x) ⁻¹' A) ↔ x✝ ∈ (fun x => g * x) ⁻¹' π_preA\n[PROOFSTEP]\nsimp\n[GOAL]\nG : Type u_1\ninst✝⁹ : Group G\ninst✝⁸ : MeasurableSpace G\ninst✝⁷ : TopologicalSpace G\ninst✝⁶ : TopologicalGroup G\ninst✝⁵ : BorelSpace G\nμ : Measure G\nΓ : Subgroup G\n𝓕 : Set G\nh𝓕 : IsFundamentalDomain { x // x ∈ ↑Subgroup.opposite Γ } 𝓕\ninst✝⁴ : Countable { x // x ∈ Γ }\ninst✝³ : MeasurableSpace (G ⧸ Γ)\ninst✝² : BorelSpace (G ⧸ Γ)\ninst✝¹ : IsMulLeftInvariant μ\ninst✝ : IsMulRightInvariant μ\ng : G\nA : Set (G ⧸ Γ)\nhA : MeasurableSet A\nπ : G → G ⧸ Γ := QuotientGroup.mk\nmeas_π : Measurable π\n𝓕meas : NullMeasurableSet 𝓕\nπ_preA : Set G := π ⁻¹' A\nmeas_πA : MeasurableSet π_preA\nthis : π ⁻¹' ((fun x => g • x) ⁻¹' A) = (fun x => g * x) ⁻¹' π_preA\n⊢ ↑↑μ (π ⁻¹' ((fun x x_1 => x • x_1) g ⁻¹' A) ∩ 𝓕) = ↑↑μ (π_preA ∩ 𝓕)\n[PROOFSTEP]\nrw [this]\n[GOAL]\nG : Type u_1\ninst✝⁹ : Group G\ninst✝⁸ : MeasurableSpace G\ninst✝⁷ : TopologicalSpace G\ninst✝⁶ : TopologicalGroup G\ninst✝⁵ : BorelSpace G\nμ : Measure G\nΓ : Subgroup G\n𝓕 : Set G\nh𝓕 : IsFundamentalDomain { x // x ∈ ↑Subgroup.opposite Γ } 𝓕\ninst✝⁴ : Countable { x // x ∈ Γ }\ninst✝³ : MeasurableSpace (G ⧸ Γ)\ninst✝² : BorelSpace (G ⧸ Γ)\ninst✝¹ : IsMulLeftInvariant μ\ninst✝ : IsMulRightInvariant μ\ng : G\nA : Set (G ⧸ Γ)\nhA : MeasurableSet A\nπ : G → G ⧸ Γ := QuotientGroup.mk\nmeas_π : Measurable π\n𝓕meas : NullMeasurableSet 𝓕\nπ_preA : Set G := π ⁻¹' A\nmeas_πA : MeasurableSet π_preA\nthis : π ⁻¹' ((fun x => g • x) ⁻¹' A) = (fun x => g * x) ⁻¹' π_preA\n⊢ ↑↑μ ((fun x => g * x) ⁻¹' π_preA ∩ 𝓕) = ↑↑μ (π_preA ∩ 𝓕)\n[PROOFSTEP]\nhave : μ ((g * ·) ⁻¹' π_preA ∩ 𝓕) = μ (π_preA ∩ (g⁻¹ * ·) ⁻¹' 𝓕) :=\n  by\n  trans μ ((g * ·) ⁻¹' (π_preA ∩ (g⁻¹ * ·) ⁻¹' 𝓕))\n  · rw [preimage_inter]\n    congr 2\n    simp [Set.preimage]\n  rw [measure_preimage_mul]\n[GOAL]\nG : Type u_1\ninst✝⁹ : Group G\ninst✝⁸ : MeasurableSpace G\ninst✝⁷ : TopologicalSpace G\ninst✝⁶ : TopologicalGroup G\ninst✝⁵ : BorelSpace G\nμ : Measure G\nΓ : Subgroup G\n𝓕 : Set G\nh𝓕 : IsFundamentalDomain { x // x ∈ ↑Subgroup.opposite Γ } 𝓕\ninst✝⁴ : Countable { x // x ∈ Γ }\ninst✝³ : MeasurableSpace (G ⧸ Γ)\ninst✝² : BorelSpace (G ⧸ Γ)\ninst✝¹ : IsMulLeftInvariant μ\ninst✝ : IsMulRightInvariant μ\ng : G\nA : Set (G ⧸ Γ)\nhA : MeasurableSet A\nπ : G → G ⧸ Γ := QuotientGroup.mk\nmeas_π : Measurable π\n𝓕meas : NullMeasurableSet 𝓕\nπ_preA : Set G := π ⁻¹' A\nmeas_πA : MeasurableSet π_preA\nthis : π ⁻¹' ((fun x => g • x) ⁻¹' A) = (fun x => g * x) ⁻¹' π_preA\n⊢ ↑↑μ ((fun x => g * x) ⁻¹' π_preA ∩ 𝓕) = ↑↑μ (π_preA ∩ (fun x => g⁻¹ * x) ⁻¹' 𝓕)\n[PROOFSTEP]\ntrans μ ((g * ·) ⁻¹' (π_preA ∩ (g⁻¹ * ·) ⁻¹' 𝓕))\n[GOAL]\nG : Type u_1\ninst✝⁹ : Group G\ninst✝⁸ : MeasurableSpace G\ninst✝⁷ : TopologicalSpace G\ninst✝⁶ : TopologicalGroup G\ninst✝⁵ : BorelSpace G\nμ : Measure G\nΓ : Subgroup G\n𝓕 : Set G\nh𝓕 : IsFundamentalDomain { x // x ∈ ↑Subgroup.opposite Γ } 𝓕\ninst✝⁴ : Countable { x // x ∈ Γ }\ninst✝³ : MeasurableSpace (G ⧸ Γ)\ninst✝² : BorelSpace (G ⧸ Γ)\ninst✝¹ : IsMulLeftInvariant μ\ninst✝ : IsMulRightInvariant μ\ng : G\nA : Set (G ⧸ Γ)\nhA : MeasurableSet A\nπ : G → G ⧸ Γ := QuotientGroup.mk\nmeas_π : Measurable π\n𝓕meas : NullMeasurableSet 𝓕\nπ_preA : Set G := π ⁻¹' A\nmeas_πA : MeasurableSet π_preA\nthis : π ⁻¹' ((fun x => g • x) ⁻¹' A) = (fun x => g * x) ⁻¹' π_preA\n⊢ ↑↑μ ((fun x => g * x) ⁻¹' π_preA ∩ 𝓕) = ↑↑μ ((fun x => g * x) ⁻¹' (π_preA ∩ (fun x => g⁻¹ * x) ⁻¹' 𝓕))\n[PROOFSTEP]\nrw [preimage_inter]\n[GOAL]\nG : Type u_1\ninst✝⁹ : Group G\ninst✝⁸ : MeasurableSpace G\ninst✝⁷ : TopologicalSpace G\ninst✝⁶ : TopologicalGroup G\ninst✝⁵ : BorelSpace G\nμ : Measure G\nΓ : Subgroup G\n𝓕 : Set G\nh𝓕 : IsFundamentalDomain { x // x ∈ ↑Subgroup.opposite Γ } 𝓕\ninst✝⁴ : Countable { x // x ∈ Γ }\ninst✝³ : MeasurableSpace (G ⧸ Γ)\ninst✝² : BorelSpace (G ⧸ Γ)\ninst✝¹ : IsMulLeftInvariant μ\ninst✝ : IsMulRightInvariant μ\ng : G\nA : Set (G ⧸ Γ)\nhA : MeasurableSet A\nπ : G → G ⧸ Γ := QuotientGroup.mk\nmeas_π : Measurable π\n𝓕meas : NullMeasurableSet 𝓕\nπ_preA : Set G := π ⁻¹' A\nmeas_πA : MeasurableSet π_preA\nthis : π ⁻¹' ((fun x => g • x) ⁻¹' A) = (fun x => g * x) ⁻¹' π_preA\n⊢ ↑↑μ ((fun x => g * x) ⁻¹' π_preA ∩ 𝓕) =\n    ↑↑μ ((fun x => g * x) ⁻¹' π_preA ∩ (fun x => g * x) ⁻¹' ((fun x => g⁻¹ * x) ⁻¹' 𝓕))\n[PROOFSTEP]\ncongr 2\n[GOAL]\ncase e_a.e_a\nG : Type u_1\ninst✝⁹ : Group G\ninst✝⁸ : MeasurableSpace G\ninst✝⁷ : TopologicalSpace G\ninst✝⁶ : TopologicalGroup G\ninst✝⁵ : BorelSpace G\nμ : Measure G\nΓ : Subgroup G\n𝓕 : Set G\nh𝓕 : IsFundamentalDomain { x // x ∈ ↑Subgroup.opposite Γ } 𝓕\ninst✝⁴ : Countable { x // x ∈ Γ }\ninst✝³ : MeasurableSpace (G ⧸ Γ)\ninst✝² : BorelSpace (G ⧸ Γ)\ninst✝¹ : IsMulLeftInvariant μ\ninst✝ : IsMulRightInvariant μ\ng : G\nA : Set (G ⧸ Γ)\nhA : MeasurableSet A\nπ : G → G ⧸ Γ := QuotientGroup.mk\nmeas_π : Measurable π\n𝓕meas : NullMeasurableSet 𝓕\nπ_preA : Set G := π ⁻¹' A\nmeas_πA : MeasurableSet π_preA\nthis : π ⁻¹' ((fun x => g • x) ⁻¹' A) = (fun x => g * x) ⁻¹' π_preA\n⊢ 𝓕 = (fun x => g * x) ⁻¹' ((fun x => g⁻¹ * x) ⁻¹' 𝓕)\n[PROOFSTEP]\nsimp [Set.preimage]\n[GOAL]\nG : Type u_1\ninst✝⁹ : Group G\ninst✝⁸ : MeasurableSpace G\ninst✝⁷ : TopologicalSpace G\ninst✝⁶ : TopologicalGroup G\ninst✝⁵ : BorelSpace G\nμ : Measure G\nΓ : Subgroup G\n𝓕 : Set G\nh𝓕 : IsFundamentalDomain { x // x ∈ ↑Subgroup.opposite Γ } 𝓕\ninst✝⁴ : Countable { x // x ∈ Γ }\ninst✝³ : MeasurableSpace (G ⧸ Γ)\ninst✝² : BorelSpace (G ⧸ Γ)\ninst✝¹ : IsMulLeftInvariant μ\ninst✝ : IsMulRightInvariant μ\ng : G\nA : Set (G ⧸ Γ)\nhA : MeasurableSet A\nπ : G → G ⧸ Γ := QuotientGroup.mk\nmeas_π : Measurable π\n𝓕meas : NullMeasurableSet 𝓕\nπ_preA : Set G := π ⁻¹' A\nmeas_πA : MeasurableSet π_preA\nthis : π ⁻¹' ((fun x => g • x) ⁻¹' A) = (fun x => g * x) ⁻¹' π_preA\n⊢ ↑↑μ ((fun x => g * x) ⁻¹' (π_preA ∩ (fun x => g⁻¹ * x) ⁻¹' 𝓕)) = ↑↑μ (π_preA ∩ (fun x => g⁻¹ * x) ⁻¹' 𝓕)\n[PROOFSTEP]\nrw [measure_preimage_mul]\n[GOAL]\nG : Type u_1\ninst✝⁹ : Group G\ninst✝⁸ : MeasurableSpace G\ninst✝⁷ : TopologicalSpace G\ninst✝⁶ : TopologicalGroup G\ninst✝⁵ : BorelSpace G\nμ : Measure G\nΓ : Subgroup G\n𝓕 : Set G\nh𝓕 : IsFundamentalDomain { x // x ∈ ↑Subgroup.opposite Γ } 𝓕\ninst✝⁴ : Countable { x // x ∈ Γ }\ninst✝³ : MeasurableSpace (G ⧸ Γ)\ninst✝² : BorelSpace (G ⧸ Γ)\ninst✝¹ : IsMulLeftInvariant μ\ninst✝ : IsMulRightInvariant μ\ng : G\nA : Set (G ⧸ Γ)\nhA : MeasurableSet A\nπ : G → G ⧸ Γ := QuotientGroup.mk\nmeas_π : Measurable π\n𝓕meas : NullMeasurableSet 𝓕\nπ_preA : Set G := π ⁻¹' A\nmeas_πA : MeasurableSet π_preA\nthis✝ : π ⁻¹' ((fun x => g • x) ⁻¹' A) = (fun x => g * x) ⁻¹' π_preA\nthis : ↑↑μ ((fun x => g * x) ⁻¹' π_preA ∩ 𝓕) = ↑↑μ (π_preA ∩ (fun x => g⁻¹ * x) ⁻¹' 𝓕)\n⊢ ↑↑μ ((fun x => g * x) ⁻¹' π_preA ∩ 𝓕) = ↑↑μ (π_preA ∩ 𝓕)\n[PROOFSTEP]\nrw [this]\n[GOAL]\nG : Type u_1\ninst✝⁹ : Group G\ninst✝⁸ : MeasurableSpace G\ninst✝⁷ : TopologicalSpace G\ninst✝⁶ : TopologicalGroup G\ninst✝⁵ : BorelSpace G\nμ : Measure G\nΓ : Subgroup G\n𝓕 : Set G\nh𝓕 : IsFundamentalDomain { x // x ∈ ↑Subgroup.opposite Γ } 𝓕\ninst✝⁴ : Countable { x // x ∈ Γ }\ninst✝³ : MeasurableSpace (G ⧸ Γ)\ninst✝² : BorelSpace (G ⧸ Γ)\ninst✝¹ : IsMulLeftInvariant μ\ninst✝ : IsMulRightInvariant μ\ng : G\nA : Set (G ⧸ Γ)\nhA : MeasurableSet A\nπ : G → G ⧸ Γ := QuotientGroup.mk\nmeas_π : Measurable π\n𝓕meas : NullMeasurableSet 𝓕\nπ_preA : Set G := π ⁻¹' A\nmeas_πA : MeasurableSet π_preA\nthis✝ : π ⁻¹' ((fun x => g • x) ⁻¹' A) = (fun x => g * x) ⁻¹' π_preA\nthis : ↑↑μ ((fun x => g * x) ⁻¹' π_preA ∩ 𝓕) = ↑↑μ (π_preA ∩ (fun x => g⁻¹ * x) ⁻¹' 𝓕)\n⊢ ↑↑μ (π_preA ∩ (fun x => g⁻¹ * x) ⁻¹' 𝓕) = ↑↑μ (π_preA ∩ 𝓕)\n[PROOFSTEP]\nhave h𝓕_translate_fundom : IsFundamentalDomain (Subgroup.opposite Γ) (g • 𝓕) μ := h𝓕.smul_of_comm g\n[GOAL]\nG : Type u_1\ninst✝⁹ : Group G\ninst✝⁸ : MeasurableSpace G\ninst✝⁷ : TopologicalSpace G\ninst✝⁶ : TopologicalGroup G\ninst✝⁵ : BorelSpace G\nμ : Measure G\nΓ : Subgroup G\n𝓕 : Set G\nh𝓕 : IsFundamentalDomain { x // x ∈ ↑Subgroup.opposite Γ } 𝓕\ninst✝⁴ : Countable { x // x ∈ Γ }\ninst✝³ : MeasurableSpace (G ⧸ Γ)\ninst✝² : BorelSpace (G ⧸ Γ)\ninst✝¹ : IsMulLeftInvariant μ\ninst✝ : IsMulRightInvariant μ\ng : G\nA : Set (G ⧸ Γ)\nhA : MeasurableSet A\nπ : G → G ⧸ Γ := QuotientGroup.mk\nmeas_π : Measurable π\n𝓕meas : NullMeasurableSet 𝓕\nπ_preA : Set G := π ⁻¹' A\nmeas_πA : MeasurableSet π_preA\nthis✝ : π ⁻¹' ((fun x => g • x) ⁻¹' A) = (fun x => g * x) ⁻¹' π_preA\nthis : ↑↑μ ((fun x => g * x) ⁻¹' π_preA ∩ 𝓕) = ↑↑μ (π_preA ∩ (fun x => g⁻¹ * x) ⁻¹' 𝓕)\nh𝓕_translate_fundom : IsFundamentalDomain { x // x ∈ ↑Subgroup.opposite Γ } (g • 𝓕)\n⊢ ↑↑μ (π_preA ∩ (fun x => g⁻¹ * x) ⁻¹' 𝓕) = ↑↑μ (π_preA ∩ 𝓕)\n[PROOFSTEP]\nrw [h𝓕.measure_set_eq h𝓕_translate_fundom meas_πA, ← preimage_smul_inv]\n[GOAL]\nG : Type u_1\ninst✝⁹ : Group G\ninst✝⁸ : MeasurableSpace G\ninst✝⁷ : TopologicalSpace G\ninst✝⁶ : TopologicalGroup G\ninst✝⁵ : BorelSpace G\nμ : Measure G\nΓ : Subgroup G\n𝓕 : Set G\nh𝓕 : IsFundamentalDomain { x // x ∈ ↑Subgroup.opposite Γ } 𝓕\ninst✝⁴ : Countable { x // x ∈ Γ }\ninst✝³ : MeasurableSpace (G ⧸ Γ)\ninst✝² : BorelSpace (G ⧸ Γ)\ninst✝¹ : IsMulLeftInvariant μ\ninst✝ : IsMulRightInvariant μ\ng : G\nA : Set (G ⧸ Γ)\nhA : MeasurableSet A\nπ : G → G ⧸ Γ := QuotientGroup.mk\nmeas_π : Measurable π\n𝓕meas : NullMeasurableSet 𝓕\nπ_preA : Set G := π ⁻¹' A\nmeas_πA : MeasurableSet π_preA\nthis✝ : π ⁻¹' ((fun x => g • x) ⁻¹' A) = (fun x => g * x) ⁻¹' π_preA\nthis : ↑↑μ ((fun x => g * x) ⁻¹' π_preA ∩ 𝓕) = ↑↑μ (π_preA ∩ (fun x => g⁻¹ * x) ⁻¹' 𝓕)\nh𝓕_translate_fundom : IsFundamentalDomain { x // x ∈ ↑Subgroup.opposite Γ } (g • 𝓕)\n⊢ ↑↑μ (π_preA ∩ (fun x => g⁻¹ * x) ⁻¹' 𝓕) = ↑↑μ (π_preA ∩ (fun x => g⁻¹ • x) ⁻¹' 𝓕)\nG : Type u_1\ninst✝⁹ : Group G\ninst✝⁸ : MeasurableSpace G\ninst✝⁷ : TopologicalSpace G\ninst✝⁶ : TopologicalGroup G\ninst✝⁵ : BorelSpace G\nμ : Measure G\nΓ : Subgroup G\n𝓕 : Set G\nh𝓕 : IsFundamentalDomain { x // x ∈ ↑Subgroup.opposite Γ } 𝓕\ninst✝⁴ : Countable { x // x ∈ Γ }\ninst✝³ : MeasurableSpace (G ⧸ Γ)\ninst✝² : BorelSpace (G ⧸ Γ)\ninst✝¹ : IsMulLeftInvariant μ\ninst✝ : IsMulRightInvariant μ\ng : G\nA : Set (G ⧸ Γ)\nhA : MeasurableSet A\nπ : G → G ⧸ Γ := QuotientGroup.mk\nmeas_π : Measurable π\n𝓕meas : NullMeasurableSet 𝓕\nπ_preA : Set G := π ⁻¹' A\nmeas_πA : MeasurableSet π_preA\nthis✝ : π ⁻¹' ((fun x => g • x) ⁻¹' A) = (fun x => g * x) ⁻¹' π_preA\nthis : ↑↑μ ((fun x => g * x) ⁻¹' π_preA ∩ 𝓕) = ↑↑μ (π_preA ∩ (fun x => g⁻¹ * x) ⁻¹' 𝓕)\nh𝓕_translate_fundom : IsFundamentalDomain { x // x ∈ ↑Subgroup.opposite Γ } (g • 𝓕)\n⊢ ∀ (g : { x // x ∈ ↑Subgroup.opposite Γ }), (fun x => g • x) ⁻¹' π_preA = π_preA\n[PROOFSTEP]\nrfl\n[GOAL]\nG : Type u_1\ninst✝⁹ : Group G\ninst✝⁸ : MeasurableSpace G\ninst✝⁷ : TopologicalSpace G\ninst✝⁶ : TopologicalGroup G\ninst✝⁵ : BorelSpace G\nμ : Measure G\nΓ : Subgroup G\n𝓕 : Set G\nh𝓕 : IsFundamentalDomain { x // x ∈ ↑Subgroup.opposite Γ } 𝓕\ninst✝⁴ : Countable { x // x ∈ Γ }\ninst✝³ : MeasurableSpace (G ⧸ Γ)\ninst✝² : BorelSpace (G ⧸ Γ)\ninst✝¹ : IsMulLeftInvariant μ\ninst✝ : IsMulRightInvariant μ\ng : G\nA : Set (G ⧸ Γ)\nhA : MeasurableSet A\nπ : G → G ⧸ Γ := QuotientGroup.mk\nmeas_π : Measurable π\n𝓕meas : NullMeasurableSet 𝓕\nπ_preA : Set G := π ⁻¹' A\nmeas_πA : MeasurableSet π_preA\nthis✝ : π ⁻¹' ((fun x => g • x) ⁻¹' A) = (fun x => g * x) ⁻¹' π_preA\nthis : ↑↑μ ((fun x => g * x) ⁻¹' π_preA ∩ 𝓕) = ↑↑μ (π_preA ∩ (fun x => g⁻¹ * x) ⁻¹' 𝓕)\nh𝓕_translate_fundom : IsFundamentalDomain { x // x ∈ ↑Subgroup.opposite Γ } (g • 𝓕)\n⊢ ∀ (g : { x // x ∈ ↑Subgroup.opposite Γ }), (fun x => g • x) ⁻¹' π_preA = π_preA\n[PROOFSTEP]\nrintro ⟨γ, γ_in_Γ⟩\n[GOAL]\ncase mk\nG : Type u_1\ninst✝⁹ : Group G\ninst✝⁸ : MeasurableSpace G\ninst✝⁷ : TopologicalSpace G\ninst✝⁶ : TopologicalGroup G\ninst✝⁵ : BorelSpace G\nμ : Measure G\nΓ : Subgroup G\n𝓕 : Set G\nh𝓕 : IsFundamentalDomain { x // x ∈ ↑Subgroup.opposite Γ } 𝓕\ninst✝⁴ : Countable { x // x ∈ Γ }\ninst✝³ : MeasurableSpace (G ⧸ Γ)\ninst✝² : BorelSpace (G ⧸ Γ)\ninst✝¹ : IsMulLeftInvariant μ\ninst✝ : IsMulRightInvariant μ\ng : G\nA : Set (G ⧸ Γ)\nhA : MeasurableSet A\nπ : G → G ⧸ Γ := QuotientGroup.mk\nmeas_π : Measurable π\n𝓕meas : NullMeasurableSet 𝓕\nπ_preA : Set G := π ⁻¹' A\nmeas_πA : MeasurableSet π_preA\nthis✝ : π ⁻¹' ((fun x => g • x) ⁻¹' A) = (fun x => g * x) ⁻¹' π_preA\nthis : ↑↑μ ((fun x => g * x) ⁻¹' π_preA ∩ 𝓕) = ↑↑μ (π_preA ∩ (fun x => g⁻¹ * x) ⁻¹' 𝓕)\nh𝓕_translate_fundom : IsFundamentalDomain { x // x ∈ ↑Subgroup.opposite Γ } (g • 𝓕)\nγ : Gᵐᵒᵖ\nγ_in_Γ : γ ∈ ↑Subgroup.opposite Γ\n⊢ (fun x => { val := γ, property := γ_in_Γ } • x) ⁻¹' π_preA = π_preA\n[PROOFSTEP]\next x\n[GOAL]\ncase mk.h\nG : Type u_1\ninst✝⁹ : Group G\ninst✝⁸ : MeasurableSpace G\ninst✝⁷ : TopologicalSpace G\ninst✝⁶ : TopologicalGroup G\ninst✝⁵ : BorelSpace G\nμ : Measure G\nΓ : Subgroup G\n𝓕 : Set G\nh𝓕 : IsFundamentalDomain { x // x ∈ ↑Subgroup.opposite Γ } 𝓕\ninst✝⁴ : Countable { x // x ∈ Γ }\ninst✝³ : MeasurableSpace (G ⧸ Γ)\ninst✝² : BorelSpace (G ⧸ Γ)\ninst✝¹ : IsMulLeftInvariant μ\ninst✝ : IsMulRightInvariant μ\ng : G\nA : Set (G ⧸ Γ)\nhA : MeasurableSet A\nπ : G → G ⧸ Γ := QuotientGroup.mk\nmeas_π : Measurable π\n𝓕meas : NullMeasurableSet 𝓕\nπ_preA : Set G := π ⁻¹' A\nmeas_πA : MeasurableSet π_preA\nthis✝ : π ⁻¹' ((fun x => g • x) ⁻¹' A) = (fun x => g * x) ⁻¹' π_preA\nthis : ↑↑μ ((fun x => g * x) ⁻¹' π_preA ∩ 𝓕) = ↑↑μ (π_preA ∩ (fun x => g⁻¹ * x) ⁻¹' 𝓕)\nh𝓕_translate_fundom : IsFundamentalDomain { x // x ∈ ↑Subgroup.opposite Γ } (g • 𝓕)\nγ : Gᵐᵒᵖ\nγ_in_Γ : γ ∈ ↑Subgroup.opposite Γ\nx : G\n⊢ x ∈ (fun x => { val := γ, property := γ_in_Γ } • x) ⁻¹' π_preA ↔ x ∈ π_preA\n[PROOFSTEP]\nhave : π (x * MulOpposite.unop γ) = π x := by simpa [QuotientGroup.eq'] using γ_in_Γ\n[GOAL]\nG : Type u_1\ninst✝⁹ : Group G\ninst✝⁸ : MeasurableSpace G\ninst✝⁷ : TopologicalSpace G\ninst✝⁶ : TopologicalGroup G\ninst✝⁵ : BorelSpace G\nμ : Measure G\nΓ : Subgroup G\n𝓕 : Set G\nh𝓕 : IsFundamentalDomain { x // x ∈ ↑Subgroup.opposite Γ } 𝓕\ninst✝⁴ : Countable { x // x ∈ Γ }\ninst✝³ : MeasurableSpace (G ⧸ Γ)\ninst✝² : BorelSpace (G ⧸ Γ)\ninst✝¹ : IsMulLeftInvariant μ\ninst✝ : IsMulRightInvariant μ\ng : G\nA : Set (G ⧸ Γ)\nhA : MeasurableSet A\nπ : G → G ⧸ Γ := QuotientGroup.mk\nmeas_π : Measurable π\n𝓕meas : NullMeasurableSet 𝓕\nπ_preA : Set G := π ⁻¹' A\nmeas_πA : MeasurableSet π_preA\nthis✝ : π ⁻¹' ((fun x => g • x) ⁻¹' A) = (fun x => g * x) ⁻¹' π_preA\nthis : ↑↑μ ((fun x => g * x) ⁻¹' π_preA ∩ 𝓕) = ↑↑μ (π_preA ∩ (fun x => g⁻¹ * x) ⁻¹' 𝓕)\nh𝓕_translate_fundom : IsFundamentalDomain { x // x ∈ ↑Subgroup.opposite Γ } (g • 𝓕)\nγ : Gᵐᵒᵖ\nγ_in_Γ : γ ∈ ↑Subgroup.opposite Γ\nx : G\n⊢ π (x * MulOpposite.unop γ) = π x\n[PROOFSTEP]\nsimpa [QuotientGroup.eq'] using γ_in_Γ\n[GOAL]\ncase mk.h\nG : Type u_1\ninst✝⁹ : Group G\ninst✝⁸ : MeasurableSpace G\ninst✝⁷ : TopologicalSpace G\ninst✝⁶ : TopologicalGroup G\ninst✝⁵ : BorelSpace G\nμ : Measure G\nΓ : Subgroup G\n𝓕 : Set G\nh𝓕 : IsFundamentalDomain { x // x ∈ ↑Subgroup.opposite Γ } 𝓕\ninst✝⁴ : Countable { x // x ∈ Γ }\ninst✝³ : MeasurableSpace (G ⧸ Γ)\ninst✝² : BorelSpace (G ⧸ Γ)\ninst✝¹ : IsMulLeftInvariant μ\ninst✝ : IsMulRightInvariant μ\ng : G\nA : Set (G ⧸ Γ)\nhA : MeasurableSet A\nπ : G → G ⧸ Γ := QuotientGroup.mk\nmeas_π : Measurable π\n𝓕meas : NullMeasurableSet 𝓕\nπ_preA : Set G := π ⁻¹' A\nmeas_πA : MeasurableSet π_preA\nthis✝¹ : π ⁻¹' ((fun x => g • x) ⁻¹' A) = (fun x => g * x) ⁻¹' π_preA\nthis✝ : ↑↑μ ((fun x => g * x) ⁻¹' π_preA ∩ 𝓕) = ↑↑μ (π_preA ∩ (fun x => g⁻¹ * x) ⁻¹' 𝓕)\nh𝓕_translate_fundom : IsFundamentalDomain { x // x ∈ ↑Subgroup.opposite Γ } (g • 𝓕)\nγ : Gᵐᵒᵖ\nγ_in_Γ : γ ∈ ↑Subgroup.opposite Γ\nx : G\nthis : π (x * MulOpposite.unop γ) = π x\n⊢ x ∈ (fun x => { val := γ, property := γ_in_Γ } • x) ⁻¹' π_preA ↔ x ∈ π_preA\n[PROOFSTEP]\nsimp only [(· • ·), ← this, mem_preimage]\n[GOAL]\ncase mk.h\nG : Type u_1\ninst✝⁹ : Group G\ninst✝⁸ : MeasurableSpace G\ninst✝⁷ : TopologicalSpace G\ninst✝⁶ : TopologicalGroup G\ninst✝⁵ : BorelSpace G\nμ : Measure G\nΓ : Subgroup G\n𝓕 : Set G\nh𝓕 : IsFundamentalDomain { x // x ∈ ↑Subgroup.opposite Γ } 𝓕\ninst✝⁴ : Countable { x // x ∈ Γ }\ninst✝³ : MeasurableSpace (G ⧸ Γ)\ninst✝² : BorelSpace (G ⧸ Γ)\ninst✝¹ : IsMulLeftInvariant μ\ninst✝ : IsMulRightInvariant μ\ng : G\nA : Set (G ⧸ Γ)\nhA : MeasurableSet A\nπ : G → G ⧸ Γ := QuotientGroup.mk\nmeas_π : Measurable π\n𝓕meas : NullMeasurableSet 𝓕\nπ_preA : Set G := π ⁻¹' A\nmeas_πA : MeasurableSet π_preA\nthis✝¹ : π ⁻¹' ((fun x => g • x) ⁻¹' A) = (fun x => g * x) ⁻¹' π_preA\nthis✝ : ↑↑μ ((fun x => g * x) ⁻¹' π_preA ∩ 𝓕) = ↑↑μ (π_preA ∩ (fun x => g⁻¹ * x) ⁻¹' 𝓕)\nh𝓕_translate_fundom : IsFundamentalDomain { x // x ∈ ↑Subgroup.opposite Γ } (g • 𝓕)\nγ : Gᵐᵒᵖ\nγ_in_Γ : γ ∈ ↑Subgroup.opposite Γ\nx : G\nthis : π (x * MulOpposite.unop γ) = π x\n⊢ ↑(SMul.smul { val := γ, property := γ_in_Γ } x) ∈ A ↔ ↑(x * MulOpposite.unop γ) ∈ A\n[PROOFSTEP]\nrfl\n[GOAL]\nG : Type u_1\ninst✝¹⁰ : Group G\ninst✝⁹ : MeasurableSpace G\ninst✝⁸ : TopologicalSpace G\ninst✝⁷ : TopologicalGroup G\ninst✝⁶ : BorelSpace G\nμ : Measure G\nΓ : Subgroup G\n𝓕 : Set G\nh𝓕 : IsFundamentalDomain { x // x ∈ ↑Subgroup.opposite Γ } 𝓕\ninst✝⁵ : Countable { x // x ∈ Γ }\ninst✝⁴ : MeasurableSpace (G ⧸ Γ)\ninst✝³ : BorelSpace (G ⧸ Γ)\ninst✝² : Subgroup.Normal Γ\ninst✝¹ : IsMulLeftInvariant μ\ninst✝ : IsMulRightInvariant μ\nx : G ⧸ Γ\n⊢ map (fun x_1 => x * x_1) (map (↑(QuotientGroup.mk' Γ)) (Measure.restrict μ 𝓕)) =\n    map (↑(QuotientGroup.mk' Γ)) (Measure.restrict μ 𝓕)\n[PROOFSTEP]\napply Measure.ext\n[GOAL]\ncase h\nG : Type u_1\ninst✝¹⁰ : Group G\ninst✝⁹ : MeasurableSpace G\ninst✝⁸ : TopologicalSpace G\ninst✝⁷ : TopologicalGroup G\ninst✝⁶ : BorelSpace G\nμ : Measure G\nΓ : Subgroup G\n𝓕 : Set G\nh𝓕 : IsFundamentalDomain { x // x ∈ ↑Subgroup.opposite Γ } 𝓕\ninst✝⁵ : Countable { x // x ∈ Γ }\ninst✝⁴ : MeasurableSpace (G ⧸ Γ)\ninst✝³ : BorelSpace (G ⧸ Γ)\ninst✝² : Subgroup.Normal Γ\ninst✝¹ : IsMulLeftInvariant μ\ninst✝ : IsMulRightInvariant μ\nx : G ⧸ Γ\n⊢ ∀ (s : Set (G ⧸ Γ)),\n    MeasurableSet s →\n      ↑↑(map (fun x_1 => x * x_1) (map (↑(QuotientGroup.mk' Γ)) (Measure.restrict μ 𝓕))) s =\n        ↑↑(map (↑(QuotientGroup.mk' Γ)) (Measure.restrict μ 𝓕)) s\n[PROOFSTEP]\nintro A hA\n[GOAL]\ncase h\nG : Type u_1\ninst✝¹⁰ : Group G\ninst✝⁹ : MeasurableSpace G\ninst✝⁸ : TopologicalSpace G\ninst✝⁷ : TopologicalGroup G\ninst✝⁶ : BorelSpace G\nμ : Measure G\nΓ : Subgroup G\n𝓕 : Set G\nh𝓕 : IsFundamentalDomain { x // x ∈ ↑Subgroup.opposite Γ } 𝓕\ninst✝⁵ : Countable { x // x ∈ Γ }\ninst✝⁴ : MeasurableSpace (G ⧸ Γ)\ninst✝³ : BorelSpace (G ⧸ Γ)\ninst✝² : Subgroup.Normal Γ\ninst✝¹ : IsMulLeftInvariant μ\ninst✝ : IsMulRightInvariant μ\nx : G ⧸ Γ\nA : Set (G ⧸ Γ)\nhA : MeasurableSet A\n⊢ ↑↑(map (fun x_1 => x * x_1) (map (↑(QuotientGroup.mk' Γ)) (Measure.restrict μ 𝓕))) A =\n    ↑↑(map (↑(QuotientGroup.mk' Γ)) (Measure.restrict μ 𝓕)) A\n[PROOFSTEP]\nobtain ⟨x₁, h⟩ := @Quotient.exists_rep _ (QuotientGroup.leftRel Γ) x\n[GOAL]\ncase h.intro\nG : Type u_1\ninst✝¹⁰ : Group G\ninst✝⁹ : MeasurableSpace G\ninst✝⁸ : TopologicalSpace G\ninst✝⁷ : TopologicalGroup G\ninst✝⁶ : BorelSpace G\nμ : Measure G\nΓ : Subgroup G\n𝓕 : Set G\nh𝓕 : IsFundamentalDomain { x // x ∈ ↑Subgroup.opposite Γ } 𝓕\ninst✝⁵ : Countable { x // x ∈ Γ }\ninst✝⁴ : MeasurableSpace (G ⧸ Γ)\ninst✝³ : BorelSpace (G ⧸ Γ)\ninst✝² : Subgroup.Normal Γ\ninst✝¹ : IsMulLeftInvariant μ\ninst✝ : IsMulRightInvariant μ\nx : G ⧸ Γ\nA : Set (G ⧸ Γ)\nhA : MeasurableSet A\nx₁ : G\nh : Quotient.mk (QuotientGroup.leftRel Γ) x₁ = x\n⊢ ↑↑(map (fun x_1 => x * x_1) (map (↑(QuotientGroup.mk' Γ)) (Measure.restrict μ 𝓕))) A =\n    ↑↑(map (↑(QuotientGroup.mk' Γ)) (Measure.restrict μ 𝓕)) A\n[PROOFSTEP]\nhaveI := h𝓕.smulInvariantMeasure_map\n[GOAL]\ncase h.intro\nG : Type u_1\ninst✝¹⁰ : Group G\ninst✝⁹ : MeasurableSpace G\ninst✝⁸ : TopologicalSpace G\ninst✝⁷ : TopologicalGroup G\ninst✝⁶ : BorelSpace G\nμ : Measure G\nΓ : Subgroup G\n𝓕 : Set G\nh𝓕 : IsFundamentalDomain { x // x ∈ ↑Subgroup.opposite Γ } 𝓕\ninst✝⁵ : Countable { x // x ∈ Γ }\ninst✝⁴ : MeasurableSpace (G ⧸ Γ)\ninst✝³ : BorelSpace (G ⧸ Γ)\ninst✝² : Subgroup.Normal Γ\ninst✝¹ : IsMulLeftInvariant μ\ninst✝ : IsMulRightInvariant μ\nx : G ⧸ Γ\nA : Set (G ⧸ Γ)\nhA : MeasurableSet A\nx₁ : G\nh : Quotient.mk (QuotientGroup.leftRel Γ) x₁ = x\nthis : SMulInvariantMeasure G (G ⧸ Γ) (map QuotientGroup.mk (Measure.restrict μ 𝓕))\n⊢ ↑↑(map (fun x_1 => x * x_1) (map (↑(QuotientGroup.mk' Γ)) (Measure.restrict μ 𝓕))) A =\n    ↑↑(map (↑(QuotientGroup.mk' Γ)) (Measure.restrict μ 𝓕)) A\n[PROOFSTEP]\nconvert measure_preimage_smul x₁ ((Measure.map QuotientGroup.mk) (μ.restrict 𝓕)) A using 1\n[GOAL]\ncase h.e'_2\nG : Type u_1\ninst✝¹⁰ : Group G\ninst✝⁹ : MeasurableSpace G\ninst✝⁸ : TopologicalSpace G\ninst✝⁷ : TopologicalGroup G\ninst✝⁶ : BorelSpace G\nμ : Measure G\nΓ : Subgroup G\n𝓕 : Set G\nh𝓕 : IsFundamentalDomain { x // x ∈ ↑Subgroup.opposite Γ } 𝓕\ninst✝⁵ : Countable { x // x ∈ Γ }\ninst✝⁴ : MeasurableSpace (G ⧸ Γ)\ninst✝³ : BorelSpace (G ⧸ Γ)\ninst✝² : Subgroup.Normal Γ\ninst✝¹ : IsMulLeftInvariant μ\ninst✝ : IsMulRightInvariant μ\nx : G ⧸ Γ\nA : Set (G ⧸ Γ)\nhA : MeasurableSet A\nx₁ : G\nh : Quotient.mk (QuotientGroup.leftRel Γ) x₁ = x\nthis : SMulInvariantMeasure G (G ⧸ Γ) (map QuotientGroup.mk (Measure.restrict μ 𝓕))\n⊢ ↑↑(map (fun x_1 => x * x_1) (map (↑(QuotientGroup.mk' Γ)) (Measure.restrict μ 𝓕))) A =\n    ↑↑(map QuotientGroup.mk (Measure.restrict μ 𝓕)) ((fun x => x₁ • x) ⁻¹' A)\n[PROOFSTEP]\nrw [← h, Measure.map_apply]\n[GOAL]\ncase h.e'_2\nG : Type u_1\ninst✝¹⁰ : Group G\ninst✝⁹ : MeasurableSpace G\ninst✝⁸ : TopologicalSpace G\ninst✝⁷ : TopologicalGroup G\ninst✝⁶ : BorelSpace G\nμ : Measure G\nΓ : Subgroup G\n𝓕 : Set G\nh𝓕 : IsFundamentalDomain { x // x ∈ ↑Subgroup.opposite Γ } 𝓕\ninst✝⁵ : Countable { x // x ∈ Γ }\ninst✝⁴ : MeasurableSpace (G ⧸ Γ)\ninst✝³ : BorelSpace (G ⧸ Γ)\ninst✝² : Subgroup.Normal Γ\ninst✝¹ : IsMulLeftInvariant μ\ninst✝ : IsMulRightInvariant μ\nx : G ⧸ Γ\nA : Set (G ⧸ Γ)\nhA : MeasurableSet A\nx₁ : G\nh : Quotient.mk (QuotientGroup.leftRel Γ) x₁ = x\nthis : SMulInvariantMeasure G (G ⧸ Γ) (map QuotientGroup.mk (Measure.restrict μ 𝓕))\n⊢ ↑↑(map (↑(QuotientGroup.mk' Γ)) (Measure.restrict μ 𝓕))\n      ((fun x => Quotient.mk (QuotientGroup.leftRel Γ) x₁ * x) ⁻¹' A) =\n    ↑↑(map QuotientGroup.mk (Measure.restrict μ 𝓕)) ((fun x => x₁ • x) ⁻¹' A)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h.e'_2.hf\nG : Type u_1\ninst✝¹⁰ : Group G\ninst✝⁹ : MeasurableSpace G\ninst✝⁸ : TopologicalSpace G\ninst✝⁷ : TopologicalGroup G\ninst✝⁶ : BorelSpace G\nμ : Measure G\nΓ : Subgroup G\n𝓕 : Set G\nh𝓕 : IsFundamentalDomain { x // x ∈ ↑Subgroup.opposite Γ } 𝓕\ninst✝⁵ : Countable { x // x ∈ Γ }\ninst✝⁴ : MeasurableSpace (G ⧸ Γ)\ninst✝³ : BorelSpace (G ⧸ Γ)\ninst✝² : Subgroup.Normal Γ\ninst✝¹ : IsMulLeftInvariant μ\ninst✝ : IsMulRightInvariant μ\nx : G ⧸ Γ\nA : Set (G ⧸ Γ)\nhA : MeasurableSet A\nx₁ : G\nh : Quotient.mk (QuotientGroup.leftRel Γ) x₁ = x\nthis : SMulInvariantMeasure G (G ⧸ Γ) (map QuotientGroup.mk (Measure.restrict μ 𝓕))\n⊢ Measurable fun x => Quotient.mk (QuotientGroup.leftRel Γ) x₁ * x\n[PROOFSTEP]\nexact measurable_const_mul _\n[GOAL]\ncase h.e'_2.hs\nG : Type u_1\ninst✝¹⁰ : Group G\ninst✝⁹ : MeasurableSpace G\ninst✝⁸ : TopologicalSpace G\ninst✝⁷ : TopologicalGroup G\ninst✝⁶ : BorelSpace G\nμ : Measure G\nΓ : Subgroup G\n𝓕 : Set G\nh𝓕 : IsFundamentalDomain { x // x ∈ ↑Subgroup.opposite Γ } 𝓕\ninst✝⁵ : Countable { x // x ∈ Γ }\ninst✝⁴ : MeasurableSpace (G ⧸ Γ)\ninst✝³ : BorelSpace (G ⧸ Γ)\ninst✝² : Subgroup.Normal Γ\ninst✝¹ : IsMulLeftInvariant μ\ninst✝ : IsMulRightInvariant μ\nx : G ⧸ Γ\nA : Set (G ⧸ Γ)\nhA : MeasurableSet A\nx₁ : G\nh : Quotient.mk (QuotientGroup.leftRel Γ) x₁ = x\nthis : SMulInvariantMeasure G (G ⧸ Γ) (map QuotientGroup.mk (Measure.restrict μ 𝓕))\n⊢ MeasurableSet A\n[PROOFSTEP]\nexact hA\n[GOAL]\nG : Type u_1\ninst✝¹² : Group G\ninst✝¹¹ : MeasurableSpace G\ninst✝¹⁰ : TopologicalSpace G\ninst✝⁹ : TopologicalGroup G\ninst✝⁸ : BorelSpace G\nμ : Measure G\nΓ : Subgroup G\n𝓕 : Set G\nh𝓕 : IsFundamentalDomain { x // x ∈ ↑Subgroup.opposite Γ } 𝓕\ninst✝⁷ : Countable { x // x ∈ Γ }\ninst✝⁶ : MeasurableSpace (G ⧸ Γ)\ninst✝⁵ : BorelSpace (G ⧸ Γ)\ninst✝⁴ : T2Space (G ⧸ Γ)\ninst✝³ : SecondCountableTopology (G ⧸ Γ)\nK : PositiveCompacts (G ⧸ Γ)\ninst✝² : Subgroup.Normal Γ\ninst✝¹ : IsHaarMeasure μ\ninst✝ : IsMulRightInvariant μ\nh𝓕_finite : ↑↑μ 𝓕 < ⊤\n⊢ map (↑(QuotientGroup.mk' Γ)) (Measure.restrict μ 𝓕) = ↑↑μ (𝓕 ∩ ↑(QuotientGroup.mk' Γ) ⁻¹' ↑K) • haarMeasure K\n[PROOFSTEP]\nlet π : G →* G ⧸ Γ := QuotientGroup.mk' Γ\n[GOAL]\nG : Type u_1\ninst✝¹² : Group G\ninst✝¹¹ : MeasurableSpace G\ninst✝¹⁰ : TopologicalSpace G\ninst✝⁹ : TopologicalGroup G\ninst✝⁸ : BorelSpace G\nμ : Measure G\nΓ : Subgroup G\n𝓕 : Set G\nh𝓕 : IsFundamentalDomain { x // x ∈ ↑Subgroup.opposite Γ } 𝓕\ninst✝⁷ : Countable { x // x ∈ Γ }\ninst✝⁶ : MeasurableSpace (G ⧸ Γ)\ninst✝⁵ : BorelSpace (G ⧸ Γ)\ninst✝⁴ : T2Space (G ⧸ Γ)\ninst✝³ : SecondCountableTopology (G ⧸ Γ)\nK : PositiveCompacts (G ⧸ Γ)\ninst✝² : Subgroup.Normal Γ\ninst✝¹ : IsHaarMeasure μ\ninst✝ : IsMulRightInvariant μ\nh𝓕_finite : ↑↑μ 𝓕 < ⊤\nπ : G →* G ⧸ Γ := QuotientGroup.mk' Γ\n⊢ map (↑(QuotientGroup.mk' Γ)) (Measure.restrict μ 𝓕) = ↑↑μ (𝓕 ∩ ↑(QuotientGroup.mk' Γ) ⁻¹' ↑K) • haarMeasure K\n[PROOFSTEP]\nhave meas_π : Measurable π := continuous_quotient_mk'.measurable\n[GOAL]\nG : Type u_1\ninst✝¹² : Group G\ninst✝¹¹ : MeasurableSpace G\ninst✝¹⁰ : TopologicalSpace G\ninst✝⁹ : TopologicalGroup G\ninst✝⁸ : BorelSpace G\nμ : Measure G\nΓ : Subgroup G\n𝓕 : Set G\nh𝓕 : IsFundamentalDomain { x // x ∈ ↑Subgroup.opposite Γ } 𝓕\ninst✝⁷ : Countable { x // x ∈ Γ }\ninst✝⁶ : MeasurableSpace (G ⧸ Γ)\ninst✝⁵ : BorelSpace (G ⧸ Γ)\ninst✝⁴ : T2Space (G ⧸ Γ)\ninst✝³ : SecondCountableTopology (G ⧸ Γ)\nK : PositiveCompacts (G ⧸ Γ)\ninst✝² : Subgroup.Normal Γ\ninst✝¹ : IsHaarMeasure μ\ninst✝ : IsMulRightInvariant μ\nh𝓕_finite : ↑↑μ 𝓕 < ⊤\nπ : G →* G ⧸ Γ := QuotientGroup.mk' Γ\nmeas_π : Measurable ↑π\n⊢ map (↑(QuotientGroup.mk' Γ)) (Measure.restrict μ 𝓕) = ↑↑μ (𝓕 ∩ ↑(QuotientGroup.mk' Γ) ⁻¹' ↑K) • haarMeasure K\n[PROOFSTEP]\nhave 𝓕meas : NullMeasurableSet 𝓕 μ := h𝓕.nullMeasurableSet\n[GOAL]\nG : Type u_1\ninst✝¹² : Group G\ninst✝¹¹ : MeasurableSpace G\ninst✝¹⁰ : TopologicalSpace G\ninst✝⁹ : TopologicalGroup G\ninst✝⁸ : BorelSpace G\nμ : Measure G\nΓ : Subgroup G\n𝓕 : Set G\nh𝓕 : IsFundamentalDomain { x // x ∈ ↑Subgroup.opposite Γ } 𝓕\ninst✝⁷ : Countable { x // x ∈ Γ }\ninst✝⁶ : MeasurableSpace (G ⧸ Γ)\ninst✝⁵ : BorelSpace (G ⧸ Γ)\ninst✝⁴ : T2Space (G ⧸ Γ)\ninst✝³ : SecondCountableTopology (G ⧸ Γ)\nK : PositiveCompacts (G ⧸ Γ)\ninst✝² : Subgroup.Normal Γ\ninst✝¹ : IsHaarMeasure μ\ninst✝ : IsMulRightInvariant μ\nh𝓕_finite : ↑↑μ 𝓕 < ⊤\nπ : G →* G ⧸ Γ := QuotientGroup.mk' Γ\nmeas_π : Measurable ↑π\n𝓕meas : NullMeasurableSet 𝓕\n⊢ map (↑(QuotientGroup.mk' Γ)) (Measure.restrict μ 𝓕) = ↑↑μ (𝓕 ∩ ↑(QuotientGroup.mk' Γ) ⁻¹' ↑K) • haarMeasure K\n[PROOFSTEP]\nhaveI := Fact.mk h𝓕_finite\n[GOAL]\nG : Type u_1\ninst✝¹² : Group G\ninst✝¹¹ : MeasurableSpace G\ninst✝¹⁰ : TopologicalSpace G\ninst✝⁹ : TopologicalGroup G\ninst✝⁸ : BorelSpace G\nμ : Measure G\nΓ : Subgroup G\n𝓕 : Set G\nh𝓕 : IsFundamentalDomain { x // x ∈ ↑Subgroup.opposite Γ } 𝓕\ninst✝⁷ : Countable { x // x ∈ Γ }\ninst✝⁶ : MeasurableSpace (G ⧸ Γ)\ninst✝⁵ : BorelSpace (G ⧸ Γ)\ninst✝⁴ : T2Space (G ⧸ Γ)\ninst✝³ : SecondCountableTopology (G ⧸ Γ)\nK : PositiveCompacts (G ⧸ Γ)\ninst✝² : Subgroup.Normal Γ\ninst✝¹ : IsHaarMeasure μ\ninst✝ : IsMulRightInvariant μ\nh𝓕_finite : ↑↑μ 𝓕 < ⊤\nπ : G →* G ⧸ Γ := QuotientGroup.mk' Γ\nmeas_π : Measurable ↑π\n𝓕meas : NullMeasurableSet 𝓕\nthis : Fact (↑↑μ 𝓕 < ⊤)\n⊢ map (↑(QuotientGroup.mk' Γ)) (Measure.restrict μ 𝓕) = ↑↑μ (𝓕 ∩ ↑(QuotientGroup.mk' Γ) ⁻¹' ↑K) • haarMeasure K\n[PROOFSTEP]\nhaveI : (Measure.map (QuotientGroup.mk' Γ) (μ.restrict 𝓕)).IsMulLeftInvariant := h𝓕.isMulLeftInvariant_map\n[GOAL]\nG : Type u_1\ninst✝¹² : Group G\ninst✝¹¹ : MeasurableSpace G\ninst✝¹⁰ : TopologicalSpace G\ninst✝⁹ : TopologicalGroup G\ninst✝⁸ : BorelSpace G\nμ : Measure G\nΓ : Subgroup G\n𝓕 : Set G\nh𝓕 : IsFundamentalDomain { x // x ∈ ↑Subgroup.opposite Γ } 𝓕\ninst✝⁷ : Countable { x // x ∈ Γ }\ninst✝⁶ : MeasurableSpace (G ⧸ Γ)\ninst✝⁵ : BorelSpace (G ⧸ Γ)\ninst✝⁴ : T2Space (G ⧸ Γ)\ninst✝³ : SecondCountableTopology (G ⧸ Γ)\nK : PositiveCompacts (G ⧸ Γ)\ninst✝² : Subgroup.Normal Γ\ninst✝¹ : IsHaarMeasure μ\ninst✝ : IsMulRightInvariant μ\nh𝓕_finite : ↑↑μ 𝓕 < ⊤\nπ : G →* G ⧸ Γ := QuotientGroup.mk' Γ\nmeas_π : Measurable ↑π\n𝓕meas : NullMeasurableSet 𝓕\nthis✝ : Fact (↑↑μ 𝓕 < ⊤)\nthis : IsMulLeftInvariant (map (↑(QuotientGroup.mk' Γ)) (Measure.restrict μ 𝓕))\n⊢ map (↑(QuotientGroup.mk' Γ)) (Measure.restrict μ 𝓕) = ↑↑μ (𝓕 ∩ ↑(QuotientGroup.mk' Γ) ⁻¹' ↑K) • haarMeasure K\n[PROOFSTEP]\nrw [Measure.haarMeasure_unique (Measure.map (QuotientGroup.mk' Γ) (μ.restrict 𝓕)) K, Measure.map_apply meas_π,\n  Measure.restrict_apply₀' 𝓕meas, inter_comm]\n[GOAL]\nG : Type u_1\ninst✝¹² : Group G\ninst✝¹¹ : MeasurableSpace G\ninst✝¹⁰ : TopologicalSpace G\ninst✝⁹ : TopologicalGroup G\ninst✝⁸ : BorelSpace G\nμ : Measure G\nΓ : Subgroup G\n𝓕 : Set G\nh𝓕 : IsFundamentalDomain { x // x ∈ ↑Subgroup.opposite Γ } 𝓕\ninst✝⁷ : Countable { x // x ∈ Γ }\ninst✝⁶ : MeasurableSpace (G ⧸ Γ)\ninst✝⁵ : BorelSpace (G ⧸ Γ)\ninst✝⁴ : T2Space (G ⧸ Γ)\ninst✝³ : SecondCountableTopology (G ⧸ Γ)\nK : PositiveCompacts (G ⧸ Γ)\ninst✝² : Subgroup.Normal Γ\ninst✝¹ : IsHaarMeasure μ\ninst✝ : IsMulRightInvariant μ\nh𝓕_finite : ↑↑μ 𝓕 < ⊤\nπ : G →* G ⧸ Γ := QuotientGroup.mk' Γ\nmeas_π : Measurable ↑π\n𝓕meas : NullMeasurableSet 𝓕\nthis✝ : Fact (↑↑μ 𝓕 < ⊤)\nthis : IsMulLeftInvariant (map (↑(QuotientGroup.mk' Γ)) (Measure.restrict μ 𝓕))\n⊢ MeasurableSet ↑K\n[PROOFSTEP]\nexact K.isCompact.measurableSet\n[GOAL]\nG : Type u_1\ninst✝¹² : Group G\ninst✝¹¹ : MeasurableSpace G\ninst✝¹⁰ : TopologicalSpace G\ninst✝⁹ : TopologicalGroup G\ninst✝⁸ : BorelSpace G\nμ : Measure G\nΓ : Subgroup G\n𝓕 : Set G\nh𝓕 : IsFundamentalDomain { x // x ∈ ↑Subgroup.opposite Γ } 𝓕\ninst✝⁷ : Countable { x // x ∈ Γ }\ninst✝⁶ : MeasurableSpace (G ⧸ Γ)\ninst✝⁵ : BorelSpace (G ⧸ Γ)\ninst✝⁴ : T2Space (G ⧸ Γ)\ninst✝³ : SecondCountableTopology (G ⧸ Γ)\nK : PositiveCompacts (G ⧸ Γ)\ninst✝² : Subgroup.Normal Γ\ninst✝¹ : IsHaarMeasure μ\ninst✝ : IsMulRightInvariant μ\nh𝓕_finite : ↑↑μ 𝓕 < ⊤\nc : ℝ≥0\nh : ↑↑μ (𝓕 ∩ ↑(QuotientGroup.mk' Γ) ⁻¹' ↑K) = ↑c\n⊢ map (↑(QuotientGroup.mk' Γ)) (Measure.restrict μ 𝓕) = c • haarMeasure K\n[PROOFSTEP]\nrw [h𝓕.map_restrict_quotient K h𝓕_finite, h]\n[GOAL]\nG : Type u_1\ninst✝¹² : Group G\ninst✝¹¹ : MeasurableSpace G\ninst✝¹⁰ : TopologicalSpace G\ninst✝⁹ : TopologicalGroup G\ninst✝⁸ : BorelSpace G\nμ : Measure G\nΓ : Subgroup G\n𝓕 : Set G\nh𝓕 : IsFundamentalDomain { x // x ∈ ↑Subgroup.opposite Γ } 𝓕\ninst✝⁷ : Countable { x // x ∈ Γ }\ninst✝⁶ : MeasurableSpace (G ⧸ Γ)\ninst✝⁵ : BorelSpace (G ⧸ Γ)\ninst✝⁴ : T2Space (G ⧸ Γ)\ninst✝³ : SecondCountableTopology (G ⧸ Γ)\nK : PositiveCompacts (G ⧸ Γ)\ninst✝² : Subgroup.Normal Γ\ninst✝¹ : IsHaarMeasure μ\ninst✝ : IsMulRightInvariant μ\nh𝓕_finite : ↑↑μ 𝓕 < ⊤\nc : ℝ≥0\nh : ↑↑μ (𝓕 ∩ ↑(QuotientGroup.mk' Γ) ⁻¹' ↑K) = ↑c\n⊢ ↑c • haarMeasure K = c • haarMeasure K\n[PROOFSTEP]\nrfl\n", "meta": {"mathlib_filename": "Mathlib.MeasureTheory.Measure.Haar.Quotient", "llama_tokens": 20172, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8791467706759584, "lm_q2_score": 0.5736784074525096, "lm_q1q2_score": 0.5043475193184005}}
{"text": "[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : Ring R\ninst✝ : LinearOrderedCommRing S\nabv : AbsoluteValue ℤ S\nx : ℤˣ\n⊢ ↑abv ↑x = 1\n[PROOFSTEP]\nrcases Int.units_eq_one_or x with (rfl | rfl)\n[GOAL]\ncase inl\nR : Type u_1\nS : Type u_2\ninst✝¹ : Ring R\ninst✝ : LinearOrderedCommRing S\nabv : AbsoluteValue ℤ S\n⊢ ↑abv ↑1 = 1\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\nR : Type u_1\nS : Type u_2\ninst✝¹ : Ring R\ninst✝ : LinearOrderedCommRing S\nabv : AbsoluteValue ℤ S\n⊢ ↑abv ↑(-1) = 1\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝² : Ring R\ninst✝¹ : LinearOrderedCommRing S\ninst✝ : Nontrivial R\nabv : AbsoluteValue R S\nx : ℤˣ\n⊢ ↑abv ↑↑x = 1\n[PROOFSTEP]\nrcases Int.units_eq_one_or x with (rfl | rfl)\n[GOAL]\ncase inl\nR : Type u_1\nS : Type u_2\ninst✝² : Ring R\ninst✝¹ : LinearOrderedCommRing S\ninst✝ : Nontrivial R\nabv : AbsoluteValue R S\n⊢ ↑abv ↑↑1 = 1\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\nR : Type u_1\nS : Type u_2\ninst✝² : Ring R\ninst✝¹ : LinearOrderedCommRing S\ninst✝ : Nontrivial R\nabv : AbsoluteValue R S\n⊢ ↑abv ↑↑(-1) = 1\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : Ring R\ninst✝ : LinearOrderedCommRing S\nabv : AbsoluteValue R S\nx : ℤˣ\ny : R\n⊢ ↑abv (x • y) = ↑abv y\n[PROOFSTEP]\nrcases Int.units_eq_one_or x with (rfl | rfl)\n[GOAL]\ncase inl\nR : Type u_1\nS : Type u_2\ninst✝¹ : Ring R\ninst✝ : LinearOrderedCommRing S\nabv : AbsoluteValue R S\ny : R\n⊢ ↑abv (1 • y) = ↑abv y\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\nR : Type u_1\nS : Type u_2\ninst✝¹ : Ring R\ninst✝ : LinearOrderedCommRing S\nabv : AbsoluteValue R S\ny : R\n⊢ ↑abv (-1 • y) = ↑abv y\n[PROOFSTEP]\nsimp\n", "meta": {"mathlib_filename": "Mathlib.Data.Int.AbsoluteValue", "llama_tokens": 814, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.757794360334681, "lm_q2_score": 0.6654105521116443, "lm_q1q2_score": 0.5042443636973905}}
{"text": "[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nM : Matrix n n R\n⊢ det M = ∑ σ : Perm n, ↑↑(↑sign σ) * ∏ i : n, M (↑σ i) i\n[PROOFSTEP]\nsimp [det_apply, Units.smul_def]\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nd : n → R\n⊢ det (diagonal d) = ∏ i : n, d i\n[PROOFSTEP]\nrw [det_apply']\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nd : n → R\n⊢ ∑ σ : Perm n, ↑↑(↑sign σ) * ∏ i : n, diagonal d (↑σ i) i = ∏ i : n, d i\n[PROOFSTEP]\nrefine' (Finset.sum_eq_single 1 _ _).trans _\n[GOAL]\ncase refine'_1\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nd : n → R\n⊢ ∀ (b : Perm n), b ∈ univ → b ≠ 1 → ↑↑(↑sign b) * ∏ i : n, diagonal d (↑b i) i = 0\n[PROOFSTEP]\nrintro σ - h2\n[GOAL]\ncase refine'_1\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nd : n → R\nσ : Perm n\nh2 : σ ≠ 1\n⊢ ↑↑(↑sign σ) * ∏ i : n, diagonal d (↑σ i) i = 0\n[PROOFSTEP]\ncases' not_forall.1 (mt Equiv.ext h2) with x h3\n[GOAL]\ncase refine'_1.intro\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nd : n → R\nσ : Perm n\nh2 : σ ≠ 1\nx : n\nh3 : ¬↑σ x = ↑1 x\n⊢ ↑↑(↑sign σ) * ∏ i : n, diagonal d (↑σ i) i = 0\n[PROOFSTEP]\nconvert mul_zero (ε σ)\n[GOAL]\ncase h.e'_2.h.e'_6\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nd : n → R\nσ : Perm n\nh2 : σ ≠ 1\nx : n\nh3 : ¬↑σ x = ↑1 x\n⊢ ∏ i : n, diagonal d (↑σ i) i = 0\n[PROOFSTEP]\napply Finset.prod_eq_zero (mem_univ x)\n[GOAL]\ncase h.e'_2.h.e'_6\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nd : n → R\nσ : Perm n\nh2 : σ ≠ 1\nx : n\nh3 : ¬↑σ x = ↑1 x\n⊢ diagonal d (↑σ x) x = 0\n[PROOFSTEP]\nexact if_neg h3\n[GOAL]\ncase refine'_2\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nd : n → R\n⊢ ¬1 ∈ univ → ↑↑(↑sign 1) * ∏ i : n, diagonal d (↑1 i) i = 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase refine'_3\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nd : n → R\n⊢ ↑↑(↑sign 1) * ∏ i : n, diagonal d (↑1 i) i = ∏ i : n, d i\n[PROOFSTEP]\nsimp\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\n⊢ det 1 = 1\n[PROOFSTEP]\nrw [← diagonal_one]\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\n⊢ det (diagonal fun x => 1) = 1\n[PROOFSTEP]\nsimp [-diagonal_one]\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁵ : DecidableEq n\ninst✝⁴ : Fintype n\ninst✝³ : DecidableEq m\ninst✝² : Fintype m\nR : Type v\ninst✝¹ : CommRing R\ninst✝ : IsEmpty n\nA : Matrix n n R\n⊢ det A = 1\n[PROOFSTEP]\nsimp [det_apply]\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁵ : DecidableEq n\ninst✝⁴ : Fintype n\ninst✝³ : DecidableEq m\ninst✝² : Fintype m\nR : Type v\ninst✝¹ : CommRing R\ninst✝ : IsEmpty n\n⊢ det = const (Matrix n n R) 1\n[PROOFSTEP]\next\n[GOAL]\ncase h\nm : Type u_1\nn : Type u_2\ninst✝⁵ : DecidableEq n\ninst✝⁴ : Fintype n\ninst✝³ : DecidableEq m\ninst✝² : Fintype m\nR : Type v\ninst✝¹ : CommRing R\ninst✝ : IsEmpty n\nx✝ : Matrix n n R\n⊢ det x✝ = const (Matrix n n R) 1 x✝\n[PROOFSTEP]\nexact det_isEmpty\n[GOAL]\nm : Type u_1\nn✝ : Type u_2\ninst✝⁷ : DecidableEq n✝\ninst✝⁶ : Fintype n✝\ninst✝⁵ : DecidableEq m\ninst✝⁴ : Fintype m\nR : Type v\ninst✝³ : CommRing R\nn : Type u_3\ninst✝² : Unique n\ninst✝¹ : DecidableEq n\ninst✝ : Fintype n\nA : Matrix n n R\n⊢ det A = A default default\n[PROOFSTEP]\nsimp [det_apply, univ_unique]\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁵ : DecidableEq n\ninst✝⁴ : Fintype n\ninst✝³ : DecidableEq m\ninst✝² : Fintype m\nR : Type v\ninst✝¹ : CommRing R\ninst✝ : Subsingleton n\nA : Matrix n n R\nk : n\n⊢ det A = A k k\n[PROOFSTEP]\nhave := uniqueOfSubsingleton k\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁵ : DecidableEq n\ninst✝⁴ : Fintype n\ninst✝³ : DecidableEq m\ninst✝² : Fintype m\nR : Type v\ninst✝¹ : CommRing R\ninst✝ : Subsingleton n\nA : Matrix n n R\nk : n\nthis : Unique n\n⊢ det A = A k k\n[PROOFSTEP]\nconvert det_unique A\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nM N : Matrix n n R\np : n → n\nH : ¬Bijective p\n⊢ ∑ σ : Perm n, ↑↑(↑sign σ) * ∏ x : n, M (↑σ x) (p x) * N (p x) x = 0\n[PROOFSTEP]\nobtain ⟨i, j, hpij, hij⟩ : ∃ i j, p i = p j ∧ i ≠ j :=\n  by\n  rw [← Finite.injective_iff_bijective, Injective] at H \n  push_neg at H \n  exact H\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nM N : Matrix n n R\np : n → n\nH : ¬Bijective p\n⊢ ∃ i j, p i = p j ∧ i ≠ j\n[PROOFSTEP]\nrw [← Finite.injective_iff_bijective, Injective] at H \n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nM N : Matrix n n R\np : n → n\nH : ¬∀ ⦃a₁ a₂ : n⦄, p a₁ = p a₂ → a₁ = a₂\n⊢ ∃ i j, p i = p j ∧ i ≠ j\n[PROOFSTEP]\npush_neg at H \n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nM N : Matrix n n R\np : n → n\nH : Exists fun ⦃a₁⦄ => Exists fun ⦃a₂⦄ => p a₁ = p a₂ ∧ a₁ ≠ a₂\n⊢ ∃ i j, p i = p j ∧ i ≠ j\n[PROOFSTEP]\nexact H\n[GOAL]\ncase intro.intro.intro\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nM N : Matrix n n R\np : n → n\nH : ¬Bijective p\ni j : n\nhpij : p i = p j\nhij : i ≠ j\n⊢ ∑ σ : Perm n, ↑↑(↑sign σ) * ∏ x : n, M (↑σ x) (p x) * N (p x) x = 0\n[PROOFSTEP]\nexact\n  sum_involution (fun σ _ => σ * Equiv.swap i j)\n    (fun σ _ =>\n      by\n      have : (∏ x, M (σ x) (p x)) = ∏ x, M ((σ * Equiv.swap i j) x) (p x) :=\n        Fintype.prod_equiv (swap i j) _ _ (by simp [apply_swap_eq_self hpij])\n      simp [this, sign_swap hij, -sign_swap', prod_mul_distrib])\n    (fun σ _ _ => (not_congr mul_swap_eq_iff).mpr hij) (fun _ _ => mem_univ _) fun σ _ => mul_swap_involutive i j σ\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nM N : Matrix n n R\np : n → n\nH : ¬Bijective p\ni j : n\nhpij : p i = p j\nhij : i ≠ j\nσ : Perm n\nx✝ : σ ∈ univ\n⊢ ↑↑(↑sign σ) * ∏ x : n, M (↑σ x) (p x) * N (p x) x +\n      ↑↑(↑sign ((fun σ x => σ * Equiv.swap i j) σ x✝)) *\n        ∏ x : n, M (↑((fun σ x => σ * Equiv.swap i j) σ x✝) x) (p x) * N (p x) x =\n    0\n[PROOFSTEP]\nhave : (∏ x, M (σ x) (p x)) = ∏ x, M ((σ * Equiv.swap i j) x) (p x) :=\n  Fintype.prod_equiv (swap i j) _ _ (by simp [apply_swap_eq_self hpij])\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nM N : Matrix n n R\np : n → n\nH : ¬Bijective p\ni j : n\nhpij : p i = p j\nhij : i ≠ j\nσ : Perm n\nx✝ : σ ∈ univ\n⊢ ∀ (x : n), M (↑σ x) (p x) = M (↑(σ * Equiv.swap i j) (↑(Equiv.swap i j) x)) (p (↑(Equiv.swap i j) x))\n[PROOFSTEP]\nsimp [apply_swap_eq_self hpij]\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nM N : Matrix n n R\np : n → n\nH : ¬Bijective p\ni j : n\nhpij : p i = p j\nhij : i ≠ j\nσ : Perm n\nx✝ : σ ∈ univ\nthis : ∏ x : n, M (↑σ x) (p x) = ∏ x : n, M (↑(σ * Equiv.swap i j) x) (p x)\n⊢ ↑↑(↑sign σ) * ∏ x : n, M (↑σ x) (p x) * N (p x) x +\n      ↑↑(↑sign ((fun σ x => σ * Equiv.swap i j) σ x✝)) *\n        ∏ x : n, M (↑((fun σ x => σ * Equiv.swap i j) σ x✝) x) (p x) * N (p x) x =\n    0\n[PROOFSTEP]\nsimp [this, sign_swap hij, -sign_swap', prod_mul_distrib]\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nM N : Matrix n n R\n⊢ det (M * N) = ∑ p : n → n, ∑ σ : Perm n, ↑↑(↑sign σ) * ∏ i : n, M (↑σ i) (p i) * N (p i) i\n[PROOFSTEP]\nsimp only [det_apply', mul_apply, prod_univ_sum, mul_sum, Fintype.piFinset_univ]\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nM N : Matrix n n R\n⊢ ∑ x : Perm n, ∑ x_1 : n → n, ↑↑(↑sign x) * ∏ x_2 : n, M (↑x x_2) (x_1 x_2) * N (x_1 x_2) x_2 =\n    ∑ x : n → n, ∑ x_1 : Perm n, ↑↑(↑sign x_1) * ∏ x_2 : n, M (↑x_1 x_2) (x x_2) * N (x x_2) x_2\n[PROOFSTEP]\nrw [Finset.sum_comm]\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nM N : Matrix n n R\nf : n → n\nx✝ : f ∈ univ\nhbij : ¬f ∈ filter Bijective univ\n⊢ ¬Bijective fun i => f i\n[PROOFSTEP]\nsimpa only [true_and_iff, mem_filter, mem_univ] using hbij\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nM N : Matrix n n R\nx✝³ x✝² : n → n\nx✝¹ : x✝³ ∈ filter Bijective univ\nx✝ : x✝² ∈ filter Bijective univ\nh : (fun p h => ofBijective p (_ : Bijective p)) x✝³ x✝¹ = (fun p h => ofBijective p (_ : Bijective p)) x✝² x✝\n⊢ x✝³ = x✝²\n[PROOFSTEP]\ninjection h\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nM N : Matrix n n R\n⊢ ∑ τ : Perm n, ∑ σ : Perm n, ↑↑(↑sign σ) * ∏ i : n, M (↑σ i) (↑τ i) * N (↑τ i) i =\n    ∑ σ : Perm n, ∑ τ : Perm n, (∏ i : n, N (↑σ i) i) * ↑↑(↑sign τ) * ∏ j : n, M (↑τ j) (↑σ j)\n[PROOFSTEP]\nsimp only [mul_comm, mul_left_comm, prod_mul_distrib, mul_assoc]\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nM N : Matrix n n R\nσ : Perm n\nx✝ : σ ∈ univ\nτ : Perm n\n⊢ (∏ i : n, N (↑σ i) i) * ↑↑(↑sign τ) * ∏ j : n, M (↑τ j) (↑σ j) =\n    (∏ i : n, N (↑σ i) i) * (↑↑(↑sign σ) * ↑↑(↑sign (↑(Equiv.mulRight σ⁻¹) τ))) *\n      ∏ i : n, M (↑(↑(Equiv.mulRight σ⁻¹) τ) i) i\n[PROOFSTEP]\nhave : (∏ j, M (τ j) (σ j)) = ∏ j, M ((τ * σ⁻¹) j) j :=\n  by\n  rw [← (σ⁻¹ : _ ≃ _).prod_comp]\n  simp only [Equiv.Perm.coe_mul, apply_inv_self, Function.comp_apply]\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nM N : Matrix n n R\nσ : Perm n\nx✝ : σ ∈ univ\nτ : Perm n\n⊢ ∏ j : n, M (↑τ j) (↑σ j) = ∏ j : n, M (↑(τ * σ⁻¹) j) j\n[PROOFSTEP]\nrw [← (σ⁻¹ : _ ≃ _).prod_comp]\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nM N : Matrix n n R\nσ : Perm n\nx✝ : σ ∈ univ\nτ : Perm n\n⊢ ∏ i : n, M (↑τ (↑σ⁻¹ i)) (↑σ (↑σ⁻¹ i)) = ∏ j : n, M (↑(τ * σ⁻¹) j) j\n[PROOFSTEP]\nsimp only [Equiv.Perm.coe_mul, apply_inv_self, Function.comp_apply]\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nM N : Matrix n n R\nσ : Perm n\nx✝ : σ ∈ univ\nτ : Perm n\nthis : ∏ j : n, M (↑τ j) (↑σ j) = ∏ j : n, M (↑(τ * σ⁻¹) j) j\n⊢ (∏ i : n, N (↑σ i) i) * ↑↑(↑sign τ) * ∏ j : n, M (↑τ j) (↑σ j) =\n    (∏ i : n, N (↑σ i) i) * (↑↑(↑sign σ) * ↑↑(↑sign (↑(Equiv.mulRight σ⁻¹) τ))) *\n      ∏ i : n, M (↑(↑(Equiv.mulRight σ⁻¹) τ) i) i\n[PROOFSTEP]\nhave h : ε σ * ε (τ * σ⁻¹) = ε τ :=\n  calc\n    ε σ * ε (τ * σ⁻¹) = ε (τ * σ⁻¹ * σ) := by\n      rw [mul_comm, sign_mul (τ * σ⁻¹)]\n      simp only [Int.cast_mul, Units.val_mul]\n    _ = ε τ := by simp only [inv_mul_cancel_right]\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nM N : Matrix n n R\nσ : Perm n\nx✝ : σ ∈ univ\nτ : Perm n\nthis : ∏ j : n, M (↑τ j) (↑σ j) = ∏ j : n, M (↑(τ * σ⁻¹) j) j\n⊢ ↑↑(↑sign σ) * ↑↑(↑sign (τ * σ⁻¹)) = ↑↑(↑sign (τ * σ⁻¹ * σ))\n[PROOFSTEP]\nrw [mul_comm, sign_mul (τ * σ⁻¹)]\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nM N : Matrix n n R\nσ : Perm n\nx✝ : σ ∈ univ\nτ : Perm n\nthis : ∏ j : n, M (↑τ j) (↑σ j) = ∏ j : n, M (↑(τ * σ⁻¹) j) j\n⊢ ↑↑(↑sign (τ * σ⁻¹)) * ↑↑(↑sign σ) = ↑↑(↑sign (τ * σ⁻¹) * ↑sign σ)\n[PROOFSTEP]\nsimp only [Int.cast_mul, Units.val_mul]\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nM N : Matrix n n R\nσ : Perm n\nx✝ : σ ∈ univ\nτ : Perm n\nthis : ∏ j : n, M (↑τ j) (↑σ j) = ∏ j : n, M (↑(τ * σ⁻¹) j) j\n⊢ ↑↑(↑sign (τ * σ⁻¹ * σ)) = ↑↑(↑sign τ)\n[PROOFSTEP]\nsimp only [inv_mul_cancel_right]\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nM N : Matrix n n R\nσ : Perm n\nx✝ : σ ∈ univ\nτ : Perm n\nthis : ∏ j : n, M (↑τ j) (↑σ j) = ∏ j : n, M (↑(τ * σ⁻¹) j) j\nh : ↑↑(↑sign σ) * ↑↑(↑sign (τ * σ⁻¹)) = ↑↑(↑sign τ)\n⊢ (∏ i : n, N (↑σ i) i) * ↑↑(↑sign τ) * ∏ j : n, M (↑τ j) (↑σ j) =\n    (∏ i : n, N (↑σ i) i) * (↑↑(↑sign σ) * ↑↑(↑sign (↑(Equiv.mulRight σ⁻¹) τ))) *\n      ∏ i : n, M (↑(↑(Equiv.mulRight σ⁻¹) τ) i) i\n[PROOFSTEP]\nsimp_rw [Equiv.coe_mulRight, h]\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nM N : Matrix n n R\nσ : Perm n\nx✝ : σ ∈ univ\nτ : Perm n\nthis : ∏ j : n, M (↑τ j) (↑σ j) = ∏ j : n, M (↑(τ * σ⁻¹) j) j\nh : ↑↑(↑sign σ) * ↑↑(↑sign (τ * σ⁻¹)) = ↑↑(↑sign τ)\n⊢ (∏ x : n, N (↑σ x) x) * ↑↑(↑sign τ) * ∏ x : n, M (↑τ x) (↑σ x) =\n    (∏ x : n, N (↑σ x) x) * ↑↑(↑sign τ) * ∏ x : n, M (↑(τ * σ⁻¹) x) x\n[PROOFSTEP]\nsimp only [this]\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nM N : Matrix n n R\n⊢ ∑ σ : Perm n, ∑ τ : Perm n, (∏ i : n, N (↑σ i) i) * (↑↑(↑sign σ) * ↑↑(↑sign τ)) * ∏ i : n, M (↑τ i) i = det M * det N\n[PROOFSTEP]\nsimp only [det_apply', Finset.mul_sum, mul_comm, mul_left_comm, mul_assoc]\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nM N : Matrix m m R\n⊢ det (M * N) = det (N * M)\n[PROOFSTEP]\nrw [det_mul, det_mul, mul_comm]\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nM N P : Matrix m m R\n⊢ det (M * (N * P)) = det (N * (M * P))\n[PROOFSTEP]\nrw [← Matrix.mul_assoc, ← Matrix.mul_assoc, det_mul, det_mul_comm M N, ← det_mul]\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nM N P : Matrix m m R\n⊢ det (M * N * P) = det (M * P * N)\n[PROOFSTEP]\nrw [Matrix.mul_assoc, Matrix.mul_assoc, det_mul, det_mul_comm N P, ← det_mul]\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nM : (Matrix m m R)ˣ\nN : Matrix m m R\n⊢ det (↑M * N * ↑M⁻¹) = det N\n[PROOFSTEP]\nrw [det_mul_right_comm, Units.mul_inv, one_mul]\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nM : Matrix n n R\n⊢ det Mᵀ = det M\n[PROOFSTEP]\nrw [det_apply', det_apply']\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nM : Matrix n n R\n⊢ ∑ σ : Perm n, ↑↑(↑sign σ) * ∏ i : n, Mᵀ (↑σ i) i = ∑ σ : Perm n, ↑↑(↑sign σ) * ∏ i : n, M (↑σ i) i\n[PROOFSTEP]\nrefine' Fintype.sum_bijective _ inv_involutive.bijective _ _ _\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nM : Matrix n n R\n⊢ ∀ (x : Perm n), ↑↑(↑sign x) * ∏ i : n, Mᵀ (↑x i) i = ↑↑(↑sign x⁻¹) * ∏ i : n, M (↑x⁻¹ i) i\n[PROOFSTEP]\nintro σ\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nM : Matrix n n R\nσ : Perm n\n⊢ ↑↑(↑sign σ) * ∏ i : n, Mᵀ (↑σ i) i = ↑↑(↑sign σ⁻¹) * ∏ i : n, M (↑σ⁻¹ i) i\n[PROOFSTEP]\nrw [sign_inv]\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nM : Matrix n n R\nσ : Perm n\n⊢ ↑↑(↑sign σ) * ∏ i : n, Mᵀ (↑σ i) i = ↑↑(↑sign σ) * ∏ i : n, M (↑σ⁻¹ i) i\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_a\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nM : Matrix n n R\nσ : Perm n\n⊢ ∏ i : n, Mᵀ (↑σ i) i = ∏ i : n, M (↑σ⁻¹ i) i\n[PROOFSTEP]\napply Fintype.prod_equiv σ\n[GOAL]\ncase e_a.h\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nM : Matrix n n R\nσ : Perm n\n⊢ ∀ (x : n), Mᵀ (↑σ x) x = M (↑σ⁻¹ (↑σ x)) (↑σ x)\n[PROOFSTEP]\nintros\n[GOAL]\ncase e_a.h\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nM : Matrix n n R\nσ : Perm n\nx✝ : n\n⊢ Mᵀ (↑σ x✝) x✝ = M (↑σ⁻¹ (↑σ x✝)) (↑σ x✝)\n[PROOFSTEP]\nsimp\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nσ : Perm n\nM : Matrix n n R\n⊢ ↑sign σ • ↑detRowAlternating M = ↑↑(↑sign σ) * det M\n[PROOFSTEP]\nsimp [Units.smul_def]\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\ne : n ≃ m\nA : Matrix m m R\n⊢ det (submatrix A ↑e ↑e) = det A\n[PROOFSTEP]\nrw [det_apply', det_apply']\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\ne : n ≃ m\nA : Matrix m m R\n⊢ ∑ σ : Perm n, ↑↑(↑sign σ) * ∏ i : n, submatrix A (↑e) (↑e) (↑σ i) i = ∑ σ : Perm m, ↑↑(↑sign σ) * ∏ i : m, A (↑σ i) i\n[PROOFSTEP]\napply Fintype.sum_equiv (Equiv.permCongr e)\n[GOAL]\ncase h\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\ne : n ≃ m\nA : Matrix m m R\n⊢ ∀ (x : Perm n),\n    ↑↑(↑sign x) * ∏ i : n, submatrix A (↑e) (↑e) (↑x i) i =\n      ↑↑(↑sign (↑(permCongr e) x)) * ∏ i : m, A (↑(↑(permCongr e) x) i) i\n[PROOFSTEP]\nintro σ\n[GOAL]\ncase h\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\ne : n ≃ m\nA : Matrix m m R\nσ : Perm n\n⊢ ↑↑(↑sign σ) * ∏ i : n, submatrix A (↑e) (↑e) (↑σ i) i =\n    ↑↑(↑sign (↑(permCongr e) σ)) * ∏ i : m, A (↑(↑(permCongr e) σ) i) i\n[PROOFSTEP]\nrw [Equiv.Perm.sign_permCongr e σ]\n[GOAL]\ncase h\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\ne : n ≃ m\nA : Matrix m m R\nσ : Perm n\n⊢ ↑↑(↑sign σ) * ∏ i : n, submatrix A (↑e) (↑e) (↑σ i) i = ↑↑(↑sign σ) * ∏ i : m, A (↑(↑(permCongr e) σ) i) i\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase h.e_a\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\ne : n ≃ m\nA : Matrix m m R\nσ : Perm n\n⊢ ∏ i : n, submatrix A (↑e) (↑e) (↑σ i) i = ∏ i : m, A (↑(↑(permCongr e) σ) i) i\n[PROOFSTEP]\napply Fintype.prod_equiv e\n[GOAL]\ncase h.e_a.h\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\ne : n ≃ m\nA : Matrix m m R\nσ : Perm n\n⊢ ∀ (x : n), submatrix A (↑e) (↑e) (↑σ x) x = A (↑(↑(permCongr e) σ) (↑e x)) (↑e x)\n[PROOFSTEP]\nintro i\n[GOAL]\ncase h.e_a.h\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\ne : n ≃ m\nA : Matrix m m R\nσ : Perm n\ni : n\n⊢ submatrix A (↑e) (↑e) (↑σ i) i = A (↑(↑(permCongr e) σ) (↑e i)) (↑e i)\n[PROOFSTEP]\nrw [Equiv.permCongr_apply, Equiv.symm_apply_apply, submatrix_apply]\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nσ : Perm n\n⊢ det (PEquiv.toMatrix (toPEquiv σ)) = ↑↑(↑sign σ)\n[PROOFSTEP]\nrw [← Matrix.mul_one (σ.toPEquiv.toMatrix : Matrix n n R), PEquiv.toPEquiv_mul_matrix, det_permute, det_one, mul_one]\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nA : Matrix n n R\nc : R\n⊢ det (c • A) = det ((diagonal fun x => c) * A)\n[PROOFSTEP]\nrw [smul_eq_diagonal_mul]\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nA : Matrix n n R\nc : R\n⊢ det (diagonal fun x => c) * det A = c ^ Fintype.card n * det A\n[PROOFSTEP]\nsimp [card_univ]\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁸ : DecidableEq n\ninst✝⁷ : Fintype n\ninst✝⁶ : DecidableEq m\ninst✝⁵ : Fintype m\nR : Type v\ninst✝⁴ : CommRing R\nα : Type u_3\ninst✝³ : Monoid α\ninst✝² : DistribMulAction α R\ninst✝¹ : IsScalarTower α R R\ninst✝ : SMulCommClass α R R\nc : α\nA : Matrix n n R\n⊢ det (c • A) = c ^ Fintype.card n • det A\n[PROOFSTEP]\nrw [← smul_one_smul R c A, det_smul, smul_pow, one_pow, smul_mul_assoc, one_mul]\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nA : Matrix n n R\n⊢ det (-A) = (-1) ^ Fintype.card n * det A\n[PROOFSTEP]\nrw [← det_smul, neg_one_smul]\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nA : Matrix n n R\n⊢ det (-A) = (-1) ^ Fintype.card n • det A\n[PROOFSTEP]\nrw [← det_smul_of_tower, Units.neg_smul, one_smul]\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nv : n → R\nA : Matrix n n R\n⊢ (↑of fun i j => v j * A i j) = A * diagonal v\n[PROOFSTEP]\next\n[GOAL]\ncase a.h\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nv : n → R\nA : Matrix n n R\ni✝ x✝ : n\n⊢ ↑of (fun i j => v j * A i j) i✝ x✝ = (A * diagonal v) i✝ x✝\n[PROOFSTEP]\nsimp [mul_comm]\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nv : n → R\nA : Matrix n n R\n⊢ det (A * diagonal v) = (∏ i : n, v i) * det A\n[PROOFSTEP]\nrw [det_mul, det_diagonal, mul_comm]\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁵ : DecidableEq n\ninst✝⁴ : Fintype n\ninst✝³ : DecidableEq m\ninst✝² : Fintype m\nR : Type v\ninst✝¹ : CommRing R\nS : Type w\ninst✝ : CommRing S\nf : R →+* S\nM : Matrix n n R\n⊢ ↑f (det M) = det (↑(RingHom.mapMatrix f) M)\n[PROOFSTEP]\nsimp [Matrix.det_apply', f.map_sum, f.map_prod]\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nA : Matrix n n R\nj : n\nh : ∀ (i : n), A i j = 0\n⊢ det A = 0\n[PROOFSTEP]\nrw [← det_transpose]\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nA : Matrix n n R\nj : n\nh : ∀ (i : n), A i j = 0\n⊢ det Aᵀ = 0\n[PROOFSTEP]\nexact det_eq_zero_of_row_eq_zero j h\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nM : Matrix n n R\ni j : n\ni_ne_j : i ≠ j\nhij : ∀ (k : n), M k i = M k j\n⊢ det M = 0\n[PROOFSTEP]\nrw [← det_transpose, det_zero_of_row_eq i_ne_j]\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nM : Matrix n n R\ni j : n\ni_ne_j : i ≠ j\nhij : ∀ (k : n), M k i = M k j\n⊢ Mᵀ i = Mᵀ j\n[PROOFSTEP]\nexact funext hij\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nM : Matrix n n R\nj : n\nu v : n → R\n⊢ det (updateColumn M j (u + v)) = det (updateColumn M j u) + det (updateColumn M j v)\n[PROOFSTEP]\nrw [← det_transpose, ← updateRow_transpose, det_updateRow_add]\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nM : Matrix n n R\nj : n\nu v : n → R\n⊢ det (updateRow Mᵀ j u) + det (updateRow Mᵀ j v) = det (updateColumn M j u) + det (updateColumn M j v)\n[PROOFSTEP]\nsimp [updateRow_transpose, det_transpose]\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nM : Matrix n n R\nj : n\ns : R\nu : n → R\n⊢ det (updateColumn M j (s • u)) = s * det (updateColumn M j u)\n[PROOFSTEP]\nrw [← det_transpose, ← updateRow_transpose, det_updateRow_smul]\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nM : Matrix n n R\nj : n\ns : R\nu : n → R\n⊢ s * det (updateRow Mᵀ j u) = s * det (updateColumn M j u)\n[PROOFSTEP]\nsimp [updateRow_transpose, det_transpose]\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nM : Matrix n n R\nj : n\ns : R\nu : n → R\n⊢ det (updateColumn (s • M) j u) = s ^ (Fintype.card n - 1) * det (updateColumn M j u)\n[PROOFSTEP]\nrw [← det_transpose, ← updateRow_transpose, transpose_smul, det_updateRow_smul']\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nM : Matrix n n R\nj : n\ns : R\nu : n → R\n⊢ s ^ (Fintype.card n - 1) * det (updateRow Mᵀ j u) = s ^ (Fintype.card n - 1) * det (updateColumn M j u)\n[PROOFSTEP]\nsimp [updateRow_transpose, det_transpose]\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nA B C : Matrix n n R\nhC : det C = 1\nhA : A = B * C\n⊢ det B * det C = det B\n[PROOFSTEP]\nrw [hC, mul_one]\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nA B C : Matrix n n R\nhC : det C = 1\nhA : A = C * B\n⊢ det C * det B = det B\n[PROOFSTEP]\nrw [hC, one_mul]\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nA : Matrix n n R\ni j : n\nhij : i ≠ j\n⊢ det (updateRow A i (A i + A j)) = det A\n[PROOFSTEP]\nsimp [det_updateRow_add, det_zero_of_row_eq hij (updateRow_self.trans (updateRow_ne hij.symm).symm)]\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nA : Matrix n n R\ni j : n\nhij : i ≠ j\n⊢ det (updateColumn A i fun k => A k i + A k j) = det A\n[PROOFSTEP]\nrw [← det_transpose, ← updateRow_transpose, ← det_transpose A]\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nA : Matrix n n R\ni j : n\nhij : i ≠ j\n⊢ det (updateRow Aᵀ i fun k => A k i + A k j) = det Aᵀ\n[PROOFSTEP]\nexact det_updateRow_add_self Aᵀ hij\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nA : Matrix n n R\ni j : n\nhij : i ≠ j\nc : R\n⊢ det (updateRow A i (A i + c • A j)) = det A\n[PROOFSTEP]\nsimp [det_updateRow_add, det_updateRow_smul, det_zero_of_row_eq hij (updateRow_self.trans (updateRow_ne hij.symm).symm)]\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nA : Matrix n n R\ni j : n\nhij : i ≠ j\nc : R\n⊢ det (updateColumn A i fun k => A k i + c • A k j) = det A\n[PROOFSTEP]\nrw [← det_transpose, ← updateRow_transpose, ← det_transpose A]\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nA : Matrix n n R\ni j : n\nhij : i ≠ j\nc : R\n⊢ det (updateRow Aᵀ i fun k => A k i + c • A k j) = det Aᵀ\n[PROOFSTEP]\nexact det_updateRow_add_smul_self Aᵀ hij c\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nA B : Matrix n n R\ns : Finset n\n⊢ ∀ (c : n → R),\n    (∀ (i : n), ¬i ∈ s → c i = 0) → ∀ (k : n), ¬k ∈ s → (∀ (i j : n), A i j = B i j + c i * B k j) → det A = det B\n[PROOFSTEP]\ninduction s using Finset.induction_on generalizing B with\n| empty =>\n  rintro c hs k - A_eq\n  have : ∀ i, c i = 0 := by\n    intro i\n    specialize hs i\n    contrapose! hs\n    simp [hs]\n  congr\n  ext i j\n  rw [A_eq, this, zero_mul, add_zero]\n| @insert i s _hi ih =>\n  intro c hs k hk A_eq\n  have hAi : A i = B i + c i • B k := funext (A_eq i)\n  rw [@ih (updateRow B i (A i)) (Function.update c i 0), hAi, det_updateRow_add_smul_self]\n  · exact mt (fun h => show k ∈ insert i s from h ▸ Finset.mem_insert_self _ _) hk\n  · intro i' hi'\n    rw [Function.update_apply]\n    split_ifs with hi'i\n    · rfl\n    · exact hs i' fun h => hi' ((Finset.mem_insert.mp h).resolve_left hi'i)\n  · exact k\n  · exact fun h => hk (Finset.mem_insert_of_mem h)\n  · intro i' j'\n    rw [updateRow_apply, Function.update_apply]\n    split_ifs with hi'i\n    · simp [hi'i]\n    rw [A_eq, updateRow_ne fun h : k = i => hk <| h ▸ Finset.mem_insert_self k s]\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nA B : Matrix n n R\ns : Finset n\n⊢ ∀ (c : n → R),\n    (∀ (i : n), ¬i ∈ s → c i = 0) → ∀ (k : n), ¬k ∈ s → (∀ (i j : n), A i j = B i j + c i * B k j) → det A = det B\n[PROOFSTEP]\ninduction s using Finset.induction_on generalizing B with\n| empty =>\n  rintro c hs k - A_eq\n  have : ∀ i, c i = 0 := by\n    intro i\n    specialize hs i\n    contrapose! hs\n    simp [hs]\n  congr\n  ext i j\n  rw [A_eq, this, zero_mul, add_zero]\n| @insert i s _hi ih =>\n  intro c hs k hk A_eq\n  have hAi : A i = B i + c i • B k := funext (A_eq i)\n  rw [@ih (updateRow B i (A i)) (Function.update c i 0), hAi, det_updateRow_add_smul_self]\n  · exact mt (fun h => show k ∈ insert i s from h ▸ Finset.mem_insert_self _ _) hk\n  · intro i' hi'\n    rw [Function.update_apply]\n    split_ifs with hi'i\n    · rfl\n    · exact hs i' fun h => hi' ((Finset.mem_insert.mp h).resolve_left hi'i)\n  · exact k\n  · exact fun h => hk (Finset.mem_insert_of_mem h)\n  · intro i' j'\n    rw [updateRow_apply, Function.update_apply]\n    split_ifs with hi'i\n    · simp [hi'i]\n    rw [A_eq, updateRow_ne fun h : k = i => hk <| h ▸ Finset.mem_insert_self k s]\n[GOAL]\ncase empty\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nA B : Matrix n n R\n⊢ ∀ (c : n → R),\n    (∀ (i : n), ¬i ∈ ∅ → c i = 0) → ∀ (k : n), ¬k ∈ ∅ → (∀ (i j : n), A i j = B i j + c i * B k j) → det A = det B\n[PROOFSTEP]\n\n| empty =>\n  rintro c hs k - A_eq\n  have : ∀ i, c i = 0 := by\n    intro i\n    specialize hs i\n    contrapose! hs\n    simp [hs]\n  congr\n  ext i j\n  rw [A_eq, this, zero_mul, add_zero]\n[GOAL]\ncase empty\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nA B : Matrix n n R\n⊢ ∀ (c : n → R),\n    (∀ (i : n), ¬i ∈ ∅ → c i = 0) → ∀ (k : n), ¬k ∈ ∅ → (∀ (i j : n), A i j = B i j + c i * B k j) → det A = det B\n[PROOFSTEP]\nrintro c hs k - A_eq\n[GOAL]\ncase empty\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nA B : Matrix n n R\nc : n → R\nhs : ∀ (i : n), ¬i ∈ ∅ → c i = 0\nk : n\nA_eq : ∀ (i j : n), A i j = B i j + c i * B k j\n⊢ det A = det B\n[PROOFSTEP]\nhave : ∀ i, c i = 0 := by\n  intro i\n  specialize hs i\n  contrapose! hs\n  simp [hs]\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nA B : Matrix n n R\nc : n → R\nhs : ∀ (i : n), ¬i ∈ ∅ → c i = 0\nk : n\nA_eq : ∀ (i j : n), A i j = B i j + c i * B k j\n⊢ ∀ (i : n), c i = 0\n[PROOFSTEP]\nintro i\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nA B : Matrix n n R\nc : n → R\nhs : ∀ (i : n), ¬i ∈ ∅ → c i = 0\nk : n\nA_eq : ∀ (i j : n), A i j = B i j + c i * B k j\ni : n\n⊢ c i = 0\n[PROOFSTEP]\nspecialize hs i\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nA B : Matrix n n R\nc : n → R\nk : n\nA_eq : ∀ (i j : n), A i j = B i j + c i * B k j\ni : n\nhs : ¬i ∈ ∅ → c i = 0\n⊢ c i = 0\n[PROOFSTEP]\ncontrapose! hs\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nA B : Matrix n n R\nc : n → R\nk : n\nA_eq : ∀ (i j : n), A i j = B i j + c i * B k j\ni : n\nhs : c i ≠ 0\n⊢ ¬i ∈ ∅ ∧ c i ≠ 0\n[PROOFSTEP]\nsimp [hs]\n[GOAL]\ncase empty\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nA B : Matrix n n R\nc : n → R\nhs : ∀ (i : n), ¬i ∈ ∅ → c i = 0\nk : n\nA_eq : ∀ (i j : n), A i j = B i j + c i * B k j\nthis : ∀ (i : n), c i = 0\n⊢ det A = det B\n[PROOFSTEP]\ncongr\n[GOAL]\ncase empty.e_M\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nA B : Matrix n n R\nc : n → R\nhs : ∀ (i : n), ¬i ∈ ∅ → c i = 0\nk : n\nA_eq : ∀ (i j : n), A i j = B i j + c i * B k j\nthis : ∀ (i : n), c i = 0\n⊢ A = B\n[PROOFSTEP]\next i j\n[GOAL]\ncase empty.e_M.a.h\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nA B : Matrix n n R\nc : n → R\nhs : ∀ (i : n), ¬i ∈ ∅ → c i = 0\nk : n\nA_eq : ∀ (i j : n), A i j = B i j + c i * B k j\nthis : ∀ (i : n), c i = 0\ni j : n\n⊢ A i j = B i j\n[PROOFSTEP]\nrw [A_eq, this, zero_mul, add_zero]\n[GOAL]\ncase insert\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nA : Matrix n n R\ni : n\ns : Finset n\n_hi : ¬i ∈ s\nih :\n  ∀ {B : Matrix n n R} (c : n → R),\n    (∀ (i : n), ¬i ∈ s → c i = 0) → ∀ (k : n), ¬k ∈ s → (∀ (i j : n), A i j = B i j + c i * B k j) → det A = det B\nB : Matrix n n R\n⊢ ∀ (c : n → R),\n    (∀ (i_1 : n), ¬i_1 ∈ insert i s → c i_1 = 0) →\n      ∀ (k : n), ¬k ∈ insert i s → (∀ (i j : n), A i j = B i j + c i * B k j) → det A = det B\n[PROOFSTEP]\n\n| @insert i s _hi ih =>\n  intro c hs k hk A_eq\n  have hAi : A i = B i + c i • B k := funext (A_eq i)\n  rw [@ih (updateRow B i (A i)) (Function.update c i 0), hAi, det_updateRow_add_smul_self]\n  · exact mt (fun h => show k ∈ insert i s from h ▸ Finset.mem_insert_self _ _) hk\n  · intro i' hi'\n    rw [Function.update_apply]\n    split_ifs with hi'i\n    · rfl\n    · exact hs i' fun h => hi' ((Finset.mem_insert.mp h).resolve_left hi'i)\n  · exact k\n  · exact fun h => hk (Finset.mem_insert_of_mem h)\n  · intro i' j'\n    rw [updateRow_apply, Function.update_apply]\n    split_ifs with hi'i\n    · simp [hi'i]\n    rw [A_eq, updateRow_ne fun h : k = i => hk <| h ▸ Finset.mem_insert_self k s]\n[GOAL]\ncase insert\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nA : Matrix n n R\ni : n\ns : Finset n\n_hi : ¬i ∈ s\nih :\n  ∀ {B : Matrix n n R} (c : n → R),\n    (∀ (i : n), ¬i ∈ s → c i = 0) → ∀ (k : n), ¬k ∈ s → (∀ (i j : n), A i j = B i j + c i * B k j) → det A = det B\nB : Matrix n n R\n⊢ ∀ (c : n → R),\n    (∀ (i_1 : n), ¬i_1 ∈ insert i s → c i_1 = 0) →\n      ∀ (k : n), ¬k ∈ insert i s → (∀ (i j : n), A i j = B i j + c i * B k j) → det A = det B\n[PROOFSTEP]\nintro c hs k hk A_eq\n[GOAL]\ncase insert\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nA : Matrix n n R\ni : n\ns : Finset n\n_hi : ¬i ∈ s\nih :\n  ∀ {B : Matrix n n R} (c : n → R),\n    (∀ (i : n), ¬i ∈ s → c i = 0) → ∀ (k : n), ¬k ∈ s → (∀ (i j : n), A i j = B i j + c i * B k j) → det A = det B\nB : Matrix n n R\nc : n → R\nhs : ∀ (i_1 : n), ¬i_1 ∈ insert i s → c i_1 = 0\nk : n\nhk : ¬k ∈ insert i s\nA_eq : ∀ (i j : n), A i j = B i j + c i * B k j\n⊢ det A = det B\n[PROOFSTEP]\nhave hAi : A i = B i + c i • B k := funext (A_eq i)\n[GOAL]\ncase insert\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nA : Matrix n n R\ni : n\ns : Finset n\n_hi : ¬i ∈ s\nih :\n  ∀ {B : Matrix n n R} (c : n → R),\n    (∀ (i : n), ¬i ∈ s → c i = 0) → ∀ (k : n), ¬k ∈ s → (∀ (i j : n), A i j = B i j + c i * B k j) → det A = det B\nB : Matrix n n R\nc : n → R\nhs : ∀ (i_1 : n), ¬i_1 ∈ insert i s → c i_1 = 0\nk : n\nhk : ¬k ∈ insert i s\nA_eq : ∀ (i j : n), A i j = B i j + c i * B k j\nhAi : A i = B i + c i • B k\n⊢ det A = det B\n[PROOFSTEP]\nrw [@ih (updateRow B i (A i)) (Function.update c i 0), hAi, det_updateRow_add_smul_self]\n[GOAL]\ncase insert.hij\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nA : Matrix n n R\ni : n\ns : Finset n\n_hi : ¬i ∈ s\nih :\n  ∀ {B : Matrix n n R} (c : n → R),\n    (∀ (i : n), ¬i ∈ s → c i = 0) → ∀ (k : n), ¬k ∈ s → (∀ (i j : n), A i j = B i j + c i * B k j) → det A = det B\nB : Matrix n n R\nc : n → R\nhs : ∀ (i_1 : n), ¬i_1 ∈ insert i s → c i_1 = 0\nk : n\nhk : ¬k ∈ insert i s\nA_eq : ∀ (i j : n), A i j = B i j + c i * B k j\nhAi : A i = B i + c i • B k\n⊢ i ≠ k\n[PROOFSTEP]\nexact mt (fun h => show k ∈ insert i s from h ▸ Finset.mem_insert_self _ _) hk\n[GOAL]\ncase insert.x\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nA : Matrix n n R\ni : n\ns : Finset n\n_hi : ¬i ∈ s\nih :\n  ∀ {B : Matrix n n R} (c : n → R),\n    (∀ (i : n), ¬i ∈ s → c i = 0) → ∀ (k : n), ¬k ∈ s → (∀ (i j : n), A i j = B i j + c i * B k j) → det A = det B\nB : Matrix n n R\nc : n → R\nhs : ∀ (i_1 : n), ¬i_1 ∈ insert i s → c i_1 = 0\nk : n\nhk : ¬k ∈ insert i s\nA_eq : ∀ (i j : n), A i j = B i j + c i * B k j\nhAi : A i = B i + c i • B k\n⊢ ∀ (i_1 : n), ¬i_1 ∈ s → update c i 0 i_1 = 0\n[PROOFSTEP]\nintro i' hi'\n[GOAL]\ncase insert.x\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nA : Matrix n n R\ni : n\ns : Finset n\n_hi : ¬i ∈ s\nih :\n  ∀ {B : Matrix n n R} (c : n → R),\n    (∀ (i : n), ¬i ∈ s → c i = 0) → ∀ (k : n), ¬k ∈ s → (∀ (i j : n), A i j = B i j + c i * B k j) → det A = det B\nB : Matrix n n R\nc : n → R\nhs : ∀ (i_1 : n), ¬i_1 ∈ insert i s → c i_1 = 0\nk : n\nhk : ¬k ∈ insert i s\nA_eq : ∀ (i j : n), A i j = B i j + c i * B k j\nhAi : A i = B i + c i • B k\ni' : n\nhi' : ¬i' ∈ s\n⊢ update c i 0 i' = 0\n[PROOFSTEP]\nrw [Function.update_apply]\n[GOAL]\ncase insert.x\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nA : Matrix n n R\ni : n\ns : Finset n\n_hi : ¬i ∈ s\nih :\n  ∀ {B : Matrix n n R} (c : n → R),\n    (∀ (i : n), ¬i ∈ s → c i = 0) → ∀ (k : n), ¬k ∈ s → (∀ (i j : n), A i j = B i j + c i * B k j) → det A = det B\nB : Matrix n n R\nc : n → R\nhs : ∀ (i_1 : n), ¬i_1 ∈ insert i s → c i_1 = 0\nk : n\nhk : ¬k ∈ insert i s\nA_eq : ∀ (i j : n), A i j = B i j + c i * B k j\nhAi : A i = B i + c i • B k\ni' : n\nhi' : ¬i' ∈ s\n⊢ (if i' = i then 0 else c i') = 0\n[PROOFSTEP]\nsplit_ifs with hi'i\n[GOAL]\ncase pos\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nA : Matrix n n R\ni : n\ns : Finset n\n_hi : ¬i ∈ s\nih :\n  ∀ {B : Matrix n n R} (c : n → R),\n    (∀ (i : n), ¬i ∈ s → c i = 0) → ∀ (k : n), ¬k ∈ s → (∀ (i j : n), A i j = B i j + c i * B k j) → det A = det B\nB : Matrix n n R\nc : n → R\nhs : ∀ (i_1 : n), ¬i_1 ∈ insert i s → c i_1 = 0\nk : n\nhk : ¬k ∈ insert i s\nA_eq : ∀ (i j : n), A i j = B i j + c i * B k j\nhAi : A i = B i + c i • B k\ni' : n\nhi' : ¬i' ∈ s\nhi'i : i' = i\n⊢ 0 = 0\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nA : Matrix n n R\ni : n\ns : Finset n\n_hi : ¬i ∈ s\nih :\n  ∀ {B : Matrix n n R} (c : n → R),\n    (∀ (i : n), ¬i ∈ s → c i = 0) → ∀ (k : n), ¬k ∈ s → (∀ (i j : n), A i j = B i j + c i * B k j) → det A = det B\nB : Matrix n n R\nc : n → R\nhs : ∀ (i_1 : n), ¬i_1 ∈ insert i s → c i_1 = 0\nk : n\nhk : ¬k ∈ insert i s\nA_eq : ∀ (i j : n), A i j = B i j + c i * B k j\nhAi : A i = B i + c i • B k\ni' : n\nhi' : ¬i' ∈ s\nhi'i : ¬i' = i\n⊢ c i' = 0\n[PROOFSTEP]\nexact hs i' fun h => hi' ((Finset.mem_insert.mp h).resolve_left hi'i)\n[GOAL]\ncase insert.k\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nA : Matrix n n R\ni : n\ns : Finset n\n_hi : ¬i ∈ s\nih :\n  ∀ {B : Matrix n n R} (c : n → R),\n    (∀ (i : n), ¬i ∈ s → c i = 0) → ∀ (k : n), ¬k ∈ s → (∀ (i j : n), A i j = B i j + c i * B k j) → det A = det B\nB : Matrix n n R\nc : n → R\nhs : ∀ (i_1 : n), ¬i_1 ∈ insert i s → c i_1 = 0\nk : n\nhk : ¬k ∈ insert i s\nA_eq : ∀ (i j : n), A i j = B i j + c i * B k j\nhAi : A i = B i + c i • B k\n⊢ n\n[PROOFSTEP]\nexact k\n[GOAL]\ncase insert.x\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nA : Matrix n n R\ni : n\ns : Finset n\n_hi : ¬i ∈ s\nih :\n  ∀ {B : Matrix n n R} (c : n → R),\n    (∀ (i : n), ¬i ∈ s → c i = 0) → ∀ (k : n), ¬k ∈ s → (∀ (i j : n), A i j = B i j + c i * B k j) → det A = det B\nB : Matrix n n R\nc : n → R\nhs : ∀ (i_1 : n), ¬i_1 ∈ insert i s → c i_1 = 0\nk : n\nhk : ¬k ∈ insert i s\nA_eq : ∀ (i j : n), A i j = B i j + c i * B k j\nhAi : A i = B i + c i • B k\n⊢ ¬k ∈ s\n[PROOFSTEP]\nexact fun h => hk (Finset.mem_insert_of_mem h)\n[GOAL]\ncase insert.x\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nA : Matrix n n R\ni : n\ns : Finset n\n_hi : ¬i ∈ s\nih :\n  ∀ {B : Matrix n n R} (c : n → R),\n    (∀ (i : n), ¬i ∈ s → c i = 0) → ∀ (k : n), ¬k ∈ s → (∀ (i j : n), A i j = B i j + c i * B k j) → det A = det B\nB : Matrix n n R\nc : n → R\nhs : ∀ (i_1 : n), ¬i_1 ∈ insert i s → c i_1 = 0\nk : n\nhk : ¬k ∈ insert i s\nA_eq : ∀ (i j : n), A i j = B i j + c i * B k j\nhAi : A i = B i + c i • B k\n⊢ ∀ (i_1 j : n), A i_1 j = updateRow B i (A i) i_1 j + update c i 0 i_1 * updateRow B i (A i) k j\n[PROOFSTEP]\nintro i' j'\n[GOAL]\ncase insert.x\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nA : Matrix n n R\ni : n\ns : Finset n\n_hi : ¬i ∈ s\nih :\n  ∀ {B : Matrix n n R} (c : n → R),\n    (∀ (i : n), ¬i ∈ s → c i = 0) → ∀ (k : n), ¬k ∈ s → (∀ (i j : n), A i j = B i j + c i * B k j) → det A = det B\nB : Matrix n n R\nc : n → R\nhs : ∀ (i_1 : n), ¬i_1 ∈ insert i s → c i_1 = 0\nk : n\nhk : ¬k ∈ insert i s\nA_eq : ∀ (i j : n), A i j = B i j + c i * B k j\nhAi : A i = B i + c i • B k\ni' j' : n\n⊢ A i' j' = updateRow B i (A i) i' j' + update c i 0 i' * updateRow B i (A i) k j'\n[PROOFSTEP]\nrw [updateRow_apply, Function.update_apply]\n[GOAL]\ncase insert.x\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nA : Matrix n n R\ni : n\ns : Finset n\n_hi : ¬i ∈ s\nih :\n  ∀ {B : Matrix n n R} (c : n → R),\n    (∀ (i : n), ¬i ∈ s → c i = 0) → ∀ (k : n), ¬k ∈ s → (∀ (i j : n), A i j = B i j + c i * B k j) → det A = det B\nB : Matrix n n R\nc : n → R\nhs : ∀ (i_1 : n), ¬i_1 ∈ insert i s → c i_1 = 0\nk : n\nhk : ¬k ∈ insert i s\nA_eq : ∀ (i j : n), A i j = B i j + c i * B k j\nhAi : A i = B i + c i • B k\ni' j' : n\n⊢ A i' j' = (if i' = i then A i j' else B i' j') + (if i' = i then 0 else c i') * updateRow B i (A i) k j'\n[PROOFSTEP]\nsplit_ifs with hi'i\n[GOAL]\ncase pos\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nA : Matrix n n R\ni : n\ns : Finset n\n_hi : ¬i ∈ s\nih :\n  ∀ {B : Matrix n n R} (c : n → R),\n    (∀ (i : n), ¬i ∈ s → c i = 0) → ∀ (k : n), ¬k ∈ s → (∀ (i j : n), A i j = B i j + c i * B k j) → det A = det B\nB : Matrix n n R\nc : n → R\nhs : ∀ (i_1 : n), ¬i_1 ∈ insert i s → c i_1 = 0\nk : n\nhk : ¬k ∈ insert i s\nA_eq : ∀ (i j : n), A i j = B i j + c i * B k j\nhAi : A i = B i + c i • B k\ni' j' : n\nhi'i : i' = i\n⊢ A i' j' = A i j' + 0 * updateRow B i (A i) k j'\n[PROOFSTEP]\nsimp [hi'i]\n[GOAL]\ncase neg\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nA : Matrix n n R\ni : n\ns : Finset n\n_hi : ¬i ∈ s\nih :\n  ∀ {B : Matrix n n R} (c : n → R),\n    (∀ (i : n), ¬i ∈ s → c i = 0) → ∀ (k : n), ¬k ∈ s → (∀ (i j : n), A i j = B i j + c i * B k j) → det A = det B\nB : Matrix n n R\nc : n → R\nhs : ∀ (i_1 : n), ¬i_1 ∈ insert i s → c i_1 = 0\nk : n\nhk : ¬k ∈ insert i s\nA_eq : ∀ (i j : n), A i j = B i j + c i * B k j\nhAi : A i = B i + c i • B k\ni' j' : n\nhi'i : ¬i' = i\n⊢ A i' j' = B i' j' + c i' * updateRow B i (A i) k j'\n[PROOFSTEP]\nrw [A_eq, updateRow_ne fun h : k = i => hk <| h ▸ Finset.mem_insert_self k s]\n[GOAL]\nm : Type u_1\nn✝ : Type u_2\ninst✝⁴ : DecidableEq n✝\ninst✝³ : Fintype n✝\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nn : ℕ\nk : Fin (n + 1)\n⊢ ∀ (c : Fin n → R),\n    (∀ (i : Fin n), k < Fin.succ i → c i = 0) →\n      ∀ {M N : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R},\n        (∀ (j : Fin (Nat.succ n)), M 0 j = N 0 j) →\n          (∀ (i : Fin n) (j : Fin (Nat.succ n)), M (Fin.succ i) j = N (Fin.succ i) j + c i * M (Fin.castSucc i) j) →\n            det M = det N\n[PROOFSTEP]\nrefine' Fin.induction _ (fun k ih => _) k\n[GOAL]\ncase refine'_1\nm : Type u_1\nn✝ : Type u_2\ninst✝⁴ : DecidableEq n✝\ninst✝³ : Fintype n✝\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nn : ℕ\nk : Fin (n + 1)\n⊢ ∀ (c : Fin n → R),\n    (∀ (i : Fin n), 0 < Fin.succ i → c i = 0) →\n      ∀ {M N : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R},\n        (∀ (j : Fin (Nat.succ n)), M 0 j = N 0 j) →\n          (∀ (i : Fin n) (j : Fin (Nat.succ n)), M (Fin.succ i) j = N (Fin.succ i) j + c i * M (Fin.castSucc i) j) →\n            det M = det N\n[PROOFSTEP]\nintro c hc M N h0 hsucc\n[GOAL]\ncase refine'_2\nm : Type u_1\nn✝ : Type u_2\ninst✝⁴ : DecidableEq n✝\ninst✝³ : Fintype n✝\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nn : ℕ\nk✝ : Fin (n + 1)\nk : Fin n\nih :\n  ∀ (c : Fin n → R),\n    (∀ (i : Fin n), Fin.castSucc k < Fin.succ i → c i = 0) →\n      ∀ {M N : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R},\n        (∀ (j : Fin (Nat.succ n)), M 0 j = N 0 j) →\n          (∀ (i : Fin n) (j : Fin (Nat.succ n)), M (Fin.succ i) j = N (Fin.succ i) j + c i * M (Fin.castSucc i) j) →\n            det M = det N\n⊢ ∀ (c : Fin n → R),\n    (∀ (i : Fin n), Fin.succ k < Fin.succ i → c i = 0) →\n      ∀ {M N : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R},\n        (∀ (j : Fin (Nat.succ n)), M 0 j = N 0 j) →\n          (∀ (i : Fin n) (j : Fin (Nat.succ n)), M (Fin.succ i) j = N (Fin.succ i) j + c i * M (Fin.castSucc i) j) →\n            det M = det N\n[PROOFSTEP]\nintro c hc M N h0 hsucc\n[GOAL]\ncase refine'_1\nm : Type u_1\nn✝ : Type u_2\ninst✝⁴ : DecidableEq n✝\ninst✝³ : Fintype n✝\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nn : ℕ\nk : Fin (n + 1)\nc : Fin n → R\nhc : ∀ (i : Fin n), 0 < Fin.succ i → c i = 0\nM N : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R\nh0 : ∀ (j : Fin (Nat.succ n)), M 0 j = N 0 j\nhsucc : ∀ (i : Fin n) (j : Fin (Nat.succ n)), M (Fin.succ i) j = N (Fin.succ i) j + c i * M (Fin.castSucc i) j\n⊢ det M = det N\n[PROOFSTEP]\ncongr\n[GOAL]\ncase refine'_1.e_M\nm : Type u_1\nn✝ : Type u_2\ninst✝⁴ : DecidableEq n✝\ninst✝³ : Fintype n✝\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nn : ℕ\nk : Fin (n + 1)\nc : Fin n → R\nhc : ∀ (i : Fin n), 0 < Fin.succ i → c i = 0\nM N : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R\nh0 : ∀ (j : Fin (Nat.succ n)), M 0 j = N 0 j\nhsucc : ∀ (i : Fin n) (j : Fin (Nat.succ n)), M (Fin.succ i) j = N (Fin.succ i) j + c i * M (Fin.castSucc i) j\n⊢ M = N\n[PROOFSTEP]\next i j\n[GOAL]\ncase refine'_1.e_M.a.h\nm : Type u_1\nn✝ : Type u_2\ninst✝⁴ : DecidableEq n✝\ninst✝³ : Fintype n✝\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nn : ℕ\nk : Fin (n + 1)\nc : Fin n → R\nhc : ∀ (i : Fin n), 0 < Fin.succ i → c i = 0\nM N : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R\nh0 : ∀ (j : Fin (Nat.succ n)), M 0 j = N 0 j\nhsucc : ∀ (i : Fin n) (j : Fin (Nat.succ n)), M (Fin.succ i) j = N (Fin.succ i) j + c i * M (Fin.castSucc i) j\ni j : Fin (Nat.succ n)\n⊢ M i j = N i j\n[PROOFSTEP]\nrefine' Fin.cases (h0 j) (fun i => _) i\n[GOAL]\ncase refine'_1.e_M.a.h\nm : Type u_1\nn✝ : Type u_2\ninst✝⁴ : DecidableEq n✝\ninst✝³ : Fintype n✝\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nn : ℕ\nk : Fin (n + 1)\nc : Fin n → R\nhc : ∀ (i : Fin n), 0 < Fin.succ i → c i = 0\nM N : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R\nh0 : ∀ (j : Fin (Nat.succ n)), M 0 j = N 0 j\nhsucc : ∀ (i : Fin n) (j : Fin (Nat.succ n)), M (Fin.succ i) j = N (Fin.succ i) j + c i * M (Fin.castSucc i) j\ni✝ j : Fin (Nat.succ n)\ni : Fin n\n⊢ M (Fin.succ i) j = N (Fin.succ i) j\n[PROOFSTEP]\nrw [hsucc, hc i (Fin.succ_pos _), zero_mul, add_zero]\n[GOAL]\ncase refine'_2\nm : Type u_1\nn✝ : Type u_2\ninst✝⁴ : DecidableEq n✝\ninst✝³ : Fintype n✝\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nn : ℕ\nk✝ : Fin (n + 1)\nk : Fin n\nih :\n  ∀ (c : Fin n → R),\n    (∀ (i : Fin n), Fin.castSucc k < Fin.succ i → c i = 0) →\n      ∀ {M N : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R},\n        (∀ (j : Fin (Nat.succ n)), M 0 j = N 0 j) →\n          (∀ (i : Fin n) (j : Fin (Nat.succ n)), M (Fin.succ i) j = N (Fin.succ i) j + c i * M (Fin.castSucc i) j) →\n            det M = det N\nc : Fin n → R\nhc : ∀ (i : Fin n), Fin.succ k < Fin.succ i → c i = 0\nM N : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R\nh0 : ∀ (j : Fin (Nat.succ n)), M 0 j = N 0 j\nhsucc : ∀ (i : Fin n) (j : Fin (Nat.succ n)), M (Fin.succ i) j = N (Fin.succ i) j + c i * M (Fin.castSucc i) j\n⊢ det M = det N\n[PROOFSTEP]\nset M' := updateRow M k.succ (N k.succ) with hM'\n[GOAL]\ncase refine'_2\nm : Type u_1\nn✝ : Type u_2\ninst✝⁴ : DecidableEq n✝\ninst✝³ : Fintype n✝\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nn : ℕ\nk✝ : Fin (n + 1)\nk : Fin n\nih :\n  ∀ (c : Fin n → R),\n    (∀ (i : Fin n), Fin.castSucc k < Fin.succ i → c i = 0) →\n      ∀ {M N : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R},\n        (∀ (j : Fin (Nat.succ n)), M 0 j = N 0 j) →\n          (∀ (i : Fin n) (j : Fin (Nat.succ n)), M (Fin.succ i) j = N (Fin.succ i) j + c i * M (Fin.castSucc i) j) →\n            det M = det N\nc : Fin n → R\nhc : ∀ (i : Fin n), Fin.succ k < Fin.succ i → c i = 0\nM N : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R\nh0 : ∀ (j : Fin (Nat.succ n)), M 0 j = N 0 j\nhsucc : ∀ (i : Fin n) (j : Fin (Nat.succ n)), M (Fin.succ i) j = N (Fin.succ i) j + c i * M (Fin.castSucc i) j\nM' : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R := updateRow M (Fin.succ k) (N (Fin.succ k))\nhM' : M' = updateRow M (Fin.succ k) (N (Fin.succ k))\n⊢ det M = det N\n[PROOFSTEP]\nhave hM : M = updateRow M' k.succ (M' k.succ + c k • M (Fin.castSucc k)) :=\n  by\n  ext i j\n  by_cases hi : i = k.succ\n  · simp [hi, hM', hsucc, updateRow_self]\n  rw [updateRow_ne hi, hM', updateRow_ne hi]\n[GOAL]\nm : Type u_1\nn✝ : Type u_2\ninst✝⁴ : DecidableEq n✝\ninst✝³ : Fintype n✝\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nn : ℕ\nk✝ : Fin (n + 1)\nk : Fin n\nih :\n  ∀ (c : Fin n → R),\n    (∀ (i : Fin n), Fin.castSucc k < Fin.succ i → c i = 0) →\n      ∀ {M N : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R},\n        (∀ (j : Fin (Nat.succ n)), M 0 j = N 0 j) →\n          (∀ (i : Fin n) (j : Fin (Nat.succ n)), M (Fin.succ i) j = N (Fin.succ i) j + c i * M (Fin.castSucc i) j) →\n            det M = det N\nc : Fin n → R\nhc : ∀ (i : Fin n), Fin.succ k < Fin.succ i → c i = 0\nM N : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R\nh0 : ∀ (j : Fin (Nat.succ n)), M 0 j = N 0 j\nhsucc : ∀ (i : Fin n) (j : Fin (Nat.succ n)), M (Fin.succ i) j = N (Fin.succ i) j + c i * M (Fin.castSucc i) j\nM' : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R := updateRow M (Fin.succ k) (N (Fin.succ k))\nhM' : M' = updateRow M (Fin.succ k) (N (Fin.succ k))\n⊢ M = updateRow M' (Fin.succ k) (M' (Fin.succ k) + c k • M (Fin.castSucc k))\n[PROOFSTEP]\next i j\n[GOAL]\ncase a.h\nm : Type u_1\nn✝ : Type u_2\ninst✝⁴ : DecidableEq n✝\ninst✝³ : Fintype n✝\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nn : ℕ\nk✝ : Fin (n + 1)\nk : Fin n\nih :\n  ∀ (c : Fin n → R),\n    (∀ (i : Fin n), Fin.castSucc k < Fin.succ i → c i = 0) →\n      ∀ {M N : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R},\n        (∀ (j : Fin (Nat.succ n)), M 0 j = N 0 j) →\n          (∀ (i : Fin n) (j : Fin (Nat.succ n)), M (Fin.succ i) j = N (Fin.succ i) j + c i * M (Fin.castSucc i) j) →\n            det M = det N\nc : Fin n → R\nhc : ∀ (i : Fin n), Fin.succ k < Fin.succ i → c i = 0\nM N : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R\nh0 : ∀ (j : Fin (Nat.succ n)), M 0 j = N 0 j\nhsucc : ∀ (i : Fin n) (j : Fin (Nat.succ n)), M (Fin.succ i) j = N (Fin.succ i) j + c i * M (Fin.castSucc i) j\nM' : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R := updateRow M (Fin.succ k) (N (Fin.succ k))\nhM' : M' = updateRow M (Fin.succ k) (N (Fin.succ k))\ni j : Fin (Nat.succ n)\n⊢ M i j = updateRow M' (Fin.succ k) (M' (Fin.succ k) + c k • M (Fin.castSucc k)) i j\n[PROOFSTEP]\nby_cases hi : i = k.succ\n[GOAL]\ncase pos\nm : Type u_1\nn✝ : Type u_2\ninst✝⁴ : DecidableEq n✝\ninst✝³ : Fintype n✝\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nn : ℕ\nk✝ : Fin (n + 1)\nk : Fin n\nih :\n  ∀ (c : Fin n → R),\n    (∀ (i : Fin n), Fin.castSucc k < Fin.succ i → c i = 0) →\n      ∀ {M N : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R},\n        (∀ (j : Fin (Nat.succ n)), M 0 j = N 0 j) →\n          (∀ (i : Fin n) (j : Fin (Nat.succ n)), M (Fin.succ i) j = N (Fin.succ i) j + c i * M (Fin.castSucc i) j) →\n            det M = det N\nc : Fin n → R\nhc : ∀ (i : Fin n), Fin.succ k < Fin.succ i → c i = 0\nM N : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R\nh0 : ∀ (j : Fin (Nat.succ n)), M 0 j = N 0 j\nhsucc : ∀ (i : Fin n) (j : Fin (Nat.succ n)), M (Fin.succ i) j = N (Fin.succ i) j + c i * M (Fin.castSucc i) j\nM' : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R := updateRow M (Fin.succ k) (N (Fin.succ k))\nhM' : M' = updateRow M (Fin.succ k) (N (Fin.succ k))\ni j : Fin (Nat.succ n)\nhi : i = Fin.succ k\n⊢ M i j = updateRow M' (Fin.succ k) (M' (Fin.succ k) + c k • M (Fin.castSucc k)) i j\n[PROOFSTEP]\nsimp [hi, hM', hsucc, updateRow_self]\n[GOAL]\ncase neg\nm : Type u_1\nn✝ : Type u_2\ninst✝⁴ : DecidableEq n✝\ninst✝³ : Fintype n✝\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nn : ℕ\nk✝ : Fin (n + 1)\nk : Fin n\nih :\n  ∀ (c : Fin n → R),\n    (∀ (i : Fin n), Fin.castSucc k < Fin.succ i → c i = 0) →\n      ∀ {M N : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R},\n        (∀ (j : Fin (Nat.succ n)), M 0 j = N 0 j) →\n          (∀ (i : Fin n) (j : Fin (Nat.succ n)), M (Fin.succ i) j = N (Fin.succ i) j + c i * M (Fin.castSucc i) j) →\n            det M = det N\nc : Fin n → R\nhc : ∀ (i : Fin n), Fin.succ k < Fin.succ i → c i = 0\nM N : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R\nh0 : ∀ (j : Fin (Nat.succ n)), M 0 j = N 0 j\nhsucc : ∀ (i : Fin n) (j : Fin (Nat.succ n)), M (Fin.succ i) j = N (Fin.succ i) j + c i * M (Fin.castSucc i) j\nM' : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R := updateRow M (Fin.succ k) (N (Fin.succ k))\nhM' : M' = updateRow M (Fin.succ k) (N (Fin.succ k))\ni j : Fin (Nat.succ n)\nhi : ¬i = Fin.succ k\n⊢ M i j = updateRow M' (Fin.succ k) (M' (Fin.succ k) + c k • M (Fin.castSucc k)) i j\n[PROOFSTEP]\nrw [updateRow_ne hi, hM', updateRow_ne hi]\n[GOAL]\ncase refine'_2\nm : Type u_1\nn✝ : Type u_2\ninst✝⁴ : DecidableEq n✝\ninst✝³ : Fintype n✝\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nn : ℕ\nk✝ : Fin (n + 1)\nk : Fin n\nih :\n  ∀ (c : Fin n → R),\n    (∀ (i : Fin n), Fin.castSucc k < Fin.succ i → c i = 0) →\n      ∀ {M N : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R},\n        (∀ (j : Fin (Nat.succ n)), M 0 j = N 0 j) →\n          (∀ (i : Fin n) (j : Fin (Nat.succ n)), M (Fin.succ i) j = N (Fin.succ i) j + c i * M (Fin.castSucc i) j) →\n            det M = det N\nc : Fin n → R\nhc : ∀ (i : Fin n), Fin.succ k < Fin.succ i → c i = 0\nM N : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R\nh0 : ∀ (j : Fin (Nat.succ n)), M 0 j = N 0 j\nhsucc : ∀ (i : Fin n) (j : Fin (Nat.succ n)), M (Fin.succ i) j = N (Fin.succ i) j + c i * M (Fin.castSucc i) j\nM' : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R := updateRow M (Fin.succ k) (N (Fin.succ k))\nhM' : M' = updateRow M (Fin.succ k) (N (Fin.succ k))\nhM : M = updateRow M' (Fin.succ k) (M' (Fin.succ k) + c k • M (Fin.castSucc k))\n⊢ det M = det N\n[PROOFSTEP]\nhave k_ne_succ : (Fin.castSucc k) ≠ k.succ := (Fin.castSucc_lt_succ k).ne\n[GOAL]\ncase refine'_2\nm : Type u_1\nn✝ : Type u_2\ninst✝⁴ : DecidableEq n✝\ninst✝³ : Fintype n✝\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nn : ℕ\nk✝ : Fin (n + 1)\nk : Fin n\nih :\n  ∀ (c : Fin n → R),\n    (∀ (i : Fin n), Fin.castSucc k < Fin.succ i → c i = 0) →\n      ∀ {M N : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R},\n        (∀ (j : Fin (Nat.succ n)), M 0 j = N 0 j) →\n          (∀ (i : Fin n) (j : Fin (Nat.succ n)), M (Fin.succ i) j = N (Fin.succ i) j + c i * M (Fin.castSucc i) j) →\n            det M = det N\nc : Fin n → R\nhc : ∀ (i : Fin n), Fin.succ k < Fin.succ i → c i = 0\nM N : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R\nh0 : ∀ (j : Fin (Nat.succ n)), M 0 j = N 0 j\nhsucc : ∀ (i : Fin n) (j : Fin (Nat.succ n)), M (Fin.succ i) j = N (Fin.succ i) j + c i * M (Fin.castSucc i) j\nM' : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R := updateRow M (Fin.succ k) (N (Fin.succ k))\nhM' : M' = updateRow M (Fin.succ k) (N (Fin.succ k))\nhM : M = updateRow M' (Fin.succ k) (M' (Fin.succ k) + c k • M (Fin.castSucc k))\nk_ne_succ : Fin.castSucc k ≠ Fin.succ k\n⊢ det M = det N\n[PROOFSTEP]\nhave M_k : M (Fin.castSucc k) = M' (Fin.castSucc k) := (updateRow_ne k_ne_succ).symm\n[GOAL]\ncase refine'_2\nm : Type u_1\nn✝ : Type u_2\ninst✝⁴ : DecidableEq n✝\ninst✝³ : Fintype n✝\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nn : ℕ\nk✝ : Fin (n + 1)\nk : Fin n\nih :\n  ∀ (c : Fin n → R),\n    (∀ (i : Fin n), Fin.castSucc k < Fin.succ i → c i = 0) →\n      ∀ {M N : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R},\n        (∀ (j : Fin (Nat.succ n)), M 0 j = N 0 j) →\n          (∀ (i : Fin n) (j : Fin (Nat.succ n)), M (Fin.succ i) j = N (Fin.succ i) j + c i * M (Fin.castSucc i) j) →\n            det M = det N\nc : Fin n → R\nhc : ∀ (i : Fin n), Fin.succ k < Fin.succ i → c i = 0\nM N : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R\nh0 : ∀ (j : Fin (Nat.succ n)), M 0 j = N 0 j\nhsucc : ∀ (i : Fin n) (j : Fin (Nat.succ n)), M (Fin.succ i) j = N (Fin.succ i) j + c i * M (Fin.castSucc i) j\nM' : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R := updateRow M (Fin.succ k) (N (Fin.succ k))\nhM' : M' = updateRow M (Fin.succ k) (N (Fin.succ k))\nhM : M = updateRow M' (Fin.succ k) (M' (Fin.succ k) + c k • M (Fin.castSucc k))\nk_ne_succ : Fin.castSucc k ≠ Fin.succ k\nM_k : M (Fin.castSucc k) = M' (Fin.castSucc k)\n⊢ det M = det N\n[PROOFSTEP]\nrw [hM, M_k, det_updateRow_add_smul_self M' k_ne_succ.symm, ih (Function.update c k 0)]\n[GOAL]\ncase refine'_2._hc\nm : Type u_1\nn✝ : Type u_2\ninst✝⁴ : DecidableEq n✝\ninst✝³ : Fintype n✝\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nn : ℕ\nk✝ : Fin (n + 1)\nk : Fin n\nih :\n  ∀ (c : Fin n → R),\n    (∀ (i : Fin n), Fin.castSucc k < Fin.succ i → c i = 0) →\n      ∀ {M N : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R},\n        (∀ (j : Fin (Nat.succ n)), M 0 j = N 0 j) →\n          (∀ (i : Fin n) (j : Fin (Nat.succ n)), M (Fin.succ i) j = N (Fin.succ i) j + c i * M (Fin.castSucc i) j) →\n            det M = det N\nc : Fin n → R\nhc : ∀ (i : Fin n), Fin.succ k < Fin.succ i → c i = 0\nM N : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R\nh0 : ∀ (j : Fin (Nat.succ n)), M 0 j = N 0 j\nhsucc : ∀ (i : Fin n) (j : Fin (Nat.succ n)), M (Fin.succ i) j = N (Fin.succ i) j + c i * M (Fin.castSucc i) j\nM' : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R := updateRow M (Fin.succ k) (N (Fin.succ k))\nhM' : M' = updateRow M (Fin.succ k) (N (Fin.succ k))\nhM : M = updateRow M' (Fin.succ k) (M' (Fin.succ k) + c k • M (Fin.castSucc k))\nk_ne_succ : Fin.castSucc k ≠ Fin.succ k\nM_k : M (Fin.castSucc k) = M' (Fin.castSucc k)\n⊢ ∀ (i : Fin n), Fin.castSucc k < Fin.succ i → update c k 0 i = 0\n[PROOFSTEP]\nintro i hi\n[GOAL]\ncase refine'_2._hc\nm : Type u_1\nn✝ : Type u_2\ninst✝⁴ : DecidableEq n✝\ninst✝³ : Fintype n✝\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nn : ℕ\nk✝ : Fin (n + 1)\nk : Fin n\nih :\n  ∀ (c : Fin n → R),\n    (∀ (i : Fin n), Fin.castSucc k < Fin.succ i → c i = 0) →\n      ∀ {M N : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R},\n        (∀ (j : Fin (Nat.succ n)), M 0 j = N 0 j) →\n          (∀ (i : Fin n) (j : Fin (Nat.succ n)), M (Fin.succ i) j = N (Fin.succ i) j + c i * M (Fin.castSucc i) j) →\n            det M = det N\nc : Fin n → R\nhc : ∀ (i : Fin n), Fin.succ k < Fin.succ i → c i = 0\nM N : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R\nh0 : ∀ (j : Fin (Nat.succ n)), M 0 j = N 0 j\nhsucc : ∀ (i : Fin n) (j : Fin (Nat.succ n)), M (Fin.succ i) j = N (Fin.succ i) j + c i * M (Fin.castSucc i) j\nM' : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R := updateRow M (Fin.succ k) (N (Fin.succ k))\nhM' : M' = updateRow M (Fin.succ k) (N (Fin.succ k))\nhM : M = updateRow M' (Fin.succ k) (M' (Fin.succ k) + c k • M (Fin.castSucc k))\nk_ne_succ : Fin.castSucc k ≠ Fin.succ k\nM_k : M (Fin.castSucc k) = M' (Fin.castSucc k)\ni : Fin n\nhi : Fin.castSucc k < Fin.succ i\n⊢ update c k 0 i = 0\n[PROOFSTEP]\nrw [Fin.lt_iff_val_lt_val, Fin.coe_castSucc, Fin.val_succ, Nat.lt_succ_iff] at hi \n[GOAL]\ncase refine'_2._hc\nm : Type u_1\nn✝ : Type u_2\ninst✝⁴ : DecidableEq n✝\ninst✝³ : Fintype n✝\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nn : ℕ\nk✝ : Fin (n + 1)\nk : Fin n\nih :\n  ∀ (c : Fin n → R),\n    (∀ (i : Fin n), Fin.castSucc k < Fin.succ i → c i = 0) →\n      ∀ {M N : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R},\n        (∀ (j : Fin (Nat.succ n)), M 0 j = N 0 j) →\n          (∀ (i : Fin n) (j : Fin (Nat.succ n)), M (Fin.succ i) j = N (Fin.succ i) j + c i * M (Fin.castSucc i) j) →\n            det M = det N\nc : Fin n → R\nhc : ∀ (i : Fin n), Fin.succ k < Fin.succ i → c i = 0\nM N : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R\nh0 : ∀ (j : Fin (Nat.succ n)), M 0 j = N 0 j\nhsucc : ∀ (i : Fin n) (j : Fin (Nat.succ n)), M (Fin.succ i) j = N (Fin.succ i) j + c i * M (Fin.castSucc i) j\nM' : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R := updateRow M (Fin.succ k) (N (Fin.succ k))\nhM' : M' = updateRow M (Fin.succ k) (N (Fin.succ k))\nhM : M = updateRow M' (Fin.succ k) (M' (Fin.succ k) + c k • M (Fin.castSucc k))\nk_ne_succ : Fin.castSucc k ≠ Fin.succ k\nM_k : M (Fin.castSucc k) = M' (Fin.castSucc k)\ni : Fin n\nhi : ↑k ≤ ↑i\n⊢ update c k 0 i = 0\n[PROOFSTEP]\nrw [Function.update_apply]\n[GOAL]\ncase refine'_2._hc\nm : Type u_1\nn✝ : Type u_2\ninst✝⁴ : DecidableEq n✝\ninst✝³ : Fintype n✝\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nn : ℕ\nk✝ : Fin (n + 1)\nk : Fin n\nih :\n  ∀ (c : Fin n → R),\n    (∀ (i : Fin n), Fin.castSucc k < Fin.succ i → c i = 0) →\n      ∀ {M N : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R},\n        (∀ (j : Fin (Nat.succ n)), M 0 j = N 0 j) →\n          (∀ (i : Fin n) (j : Fin (Nat.succ n)), M (Fin.succ i) j = N (Fin.succ i) j + c i * M (Fin.castSucc i) j) →\n            det M = det N\nc : Fin n → R\nhc : ∀ (i : Fin n), Fin.succ k < Fin.succ i → c i = 0\nM N : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R\nh0 : ∀ (j : Fin (Nat.succ n)), M 0 j = N 0 j\nhsucc : ∀ (i : Fin n) (j : Fin (Nat.succ n)), M (Fin.succ i) j = N (Fin.succ i) j + c i * M (Fin.castSucc i) j\nM' : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R := updateRow M (Fin.succ k) (N (Fin.succ k))\nhM' : M' = updateRow M (Fin.succ k) (N (Fin.succ k))\nhM : M = updateRow M' (Fin.succ k) (M' (Fin.succ k) + c k • M (Fin.castSucc k))\nk_ne_succ : Fin.castSucc k ≠ Fin.succ k\nM_k : M (Fin.castSucc k) = M' (Fin.castSucc k)\ni : Fin n\nhi : ↑k ≤ ↑i\n⊢ (if i = k then 0 else c i) = 0\n[PROOFSTEP]\nsplit_ifs with hik\n[GOAL]\ncase pos\nm : Type u_1\nn✝ : Type u_2\ninst✝⁴ : DecidableEq n✝\ninst✝³ : Fintype n✝\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nn : ℕ\nk✝ : Fin (n + 1)\nk : Fin n\nih :\n  ∀ (c : Fin n → R),\n    (∀ (i : Fin n), Fin.castSucc k < Fin.succ i → c i = 0) →\n      ∀ {M N : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R},\n        (∀ (j : Fin (Nat.succ n)), M 0 j = N 0 j) →\n          (∀ (i : Fin n) (j : Fin (Nat.succ n)), M (Fin.succ i) j = N (Fin.succ i) j + c i * M (Fin.castSucc i) j) →\n            det M = det N\nc : Fin n → R\nhc : ∀ (i : Fin n), Fin.succ k < Fin.succ i → c i = 0\nM N : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R\nh0 : ∀ (j : Fin (Nat.succ n)), M 0 j = N 0 j\nhsucc : ∀ (i : Fin n) (j : Fin (Nat.succ n)), M (Fin.succ i) j = N (Fin.succ i) j + c i * M (Fin.castSucc i) j\nM' : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R := updateRow M (Fin.succ k) (N (Fin.succ k))\nhM' : M' = updateRow M (Fin.succ k) (N (Fin.succ k))\nhM : M = updateRow M' (Fin.succ k) (M' (Fin.succ k) + c k • M (Fin.castSucc k))\nk_ne_succ : Fin.castSucc k ≠ Fin.succ k\nM_k : M (Fin.castSucc k) = M' (Fin.castSucc k)\ni : Fin n\nhi : ↑k ≤ ↑i\nhik : i = k\n⊢ 0 = 0\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg\nm : Type u_1\nn✝ : Type u_2\ninst✝⁴ : DecidableEq n✝\ninst✝³ : Fintype n✝\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nn : ℕ\nk✝ : Fin (n + 1)\nk : Fin n\nih :\n  ∀ (c : Fin n → R),\n    (∀ (i : Fin n), Fin.castSucc k < Fin.succ i → c i = 0) →\n      ∀ {M N : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R},\n        (∀ (j : Fin (Nat.succ n)), M 0 j = N 0 j) →\n          (∀ (i : Fin n) (j : Fin (Nat.succ n)), M (Fin.succ i) j = N (Fin.succ i) j + c i * M (Fin.castSucc i) j) →\n            det M = det N\nc : Fin n → R\nhc : ∀ (i : Fin n), Fin.succ k < Fin.succ i → c i = 0\nM N : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R\nh0 : ∀ (j : Fin (Nat.succ n)), M 0 j = N 0 j\nhsucc : ∀ (i : Fin n) (j : Fin (Nat.succ n)), M (Fin.succ i) j = N (Fin.succ i) j + c i * M (Fin.castSucc i) j\nM' : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R := updateRow M (Fin.succ k) (N (Fin.succ k))\nhM' : M' = updateRow M (Fin.succ k) (N (Fin.succ k))\nhM : M = updateRow M' (Fin.succ k) (M' (Fin.succ k) + c k • M (Fin.castSucc k))\nk_ne_succ : Fin.castSucc k ≠ Fin.succ k\nM_k : M (Fin.castSucc k) = M' (Fin.castSucc k)\ni : Fin n\nhi : ↑k ≤ ↑i\nhik : ¬i = k\n⊢ c i = 0\n[PROOFSTEP]\nexact hc _ (Fin.succ_lt_succ_iff.mpr (lt_of_le_of_ne hi (Ne.symm hik)))\n[GOAL]\ncase refine'_2._h0\nm : Type u_1\nn✝ : Type u_2\ninst✝⁴ : DecidableEq n✝\ninst✝³ : Fintype n✝\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nn : ℕ\nk✝ : Fin (n + 1)\nk : Fin n\nih :\n  ∀ (c : Fin n → R),\n    (∀ (i : Fin n), Fin.castSucc k < Fin.succ i → c i = 0) →\n      ∀ {M N : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R},\n        (∀ (j : Fin (Nat.succ n)), M 0 j = N 0 j) →\n          (∀ (i : Fin n) (j : Fin (Nat.succ n)), M (Fin.succ i) j = N (Fin.succ i) j + c i * M (Fin.castSucc i) j) →\n            det M = det N\nc : Fin n → R\nhc : ∀ (i : Fin n), Fin.succ k < Fin.succ i → c i = 0\nM N : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R\nh0 : ∀ (j : Fin (Nat.succ n)), M 0 j = N 0 j\nhsucc : ∀ (i : Fin n) (j : Fin (Nat.succ n)), M (Fin.succ i) j = N (Fin.succ i) j + c i * M (Fin.castSucc i) j\nM' : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R := updateRow M (Fin.succ k) (N (Fin.succ k))\nhM' : M' = updateRow M (Fin.succ k) (N (Fin.succ k))\nhM : M = updateRow M' (Fin.succ k) (M' (Fin.succ k) + c k • M (Fin.castSucc k))\nk_ne_succ : Fin.castSucc k ≠ Fin.succ k\nM_k : M (Fin.castSucc k) = M' (Fin.castSucc k)\n⊢ ∀ (j : Fin (Nat.succ n)), M' 0 j = N 0 j\n[PROOFSTEP]\nrwa [hM', updateRow_ne (Fin.succ_ne_zero _).symm]\n[GOAL]\ncase refine'_2._hsucc\nm : Type u_1\nn✝ : Type u_2\ninst✝⁴ : DecidableEq n✝\ninst✝³ : Fintype n✝\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nn : ℕ\nk✝ : Fin (n + 1)\nk : Fin n\nih :\n  ∀ (c : Fin n → R),\n    (∀ (i : Fin n), Fin.castSucc k < Fin.succ i → c i = 0) →\n      ∀ {M N : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R},\n        (∀ (j : Fin (Nat.succ n)), M 0 j = N 0 j) →\n          (∀ (i : Fin n) (j : Fin (Nat.succ n)), M (Fin.succ i) j = N (Fin.succ i) j + c i * M (Fin.castSucc i) j) →\n            det M = det N\nc : Fin n → R\nhc : ∀ (i : Fin n), Fin.succ k < Fin.succ i → c i = 0\nM N : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R\nh0 : ∀ (j : Fin (Nat.succ n)), M 0 j = N 0 j\nhsucc : ∀ (i : Fin n) (j : Fin (Nat.succ n)), M (Fin.succ i) j = N (Fin.succ i) j + c i * M (Fin.castSucc i) j\nM' : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R := updateRow M (Fin.succ k) (N (Fin.succ k))\nhM' : M' = updateRow M (Fin.succ k) (N (Fin.succ k))\nhM : M = updateRow M' (Fin.succ k) (M' (Fin.succ k) + c k • M (Fin.castSucc k))\nk_ne_succ : Fin.castSucc k ≠ Fin.succ k\nM_k : M (Fin.castSucc k) = M' (Fin.castSucc k)\n⊢ ∀ (i : Fin n) (j : Fin (Nat.succ n)), M' (Fin.succ i) j = N (Fin.succ i) j + update c k 0 i * M' (Fin.castSucc i) j\n[PROOFSTEP]\nintro i j\n[GOAL]\ncase refine'_2._hsucc\nm : Type u_1\nn✝ : Type u_2\ninst✝⁴ : DecidableEq n✝\ninst✝³ : Fintype n✝\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nn : ℕ\nk✝ : Fin (n + 1)\nk : Fin n\nih :\n  ∀ (c : Fin n → R),\n    (∀ (i : Fin n), Fin.castSucc k < Fin.succ i → c i = 0) →\n      ∀ {M N : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R},\n        (∀ (j : Fin (Nat.succ n)), M 0 j = N 0 j) →\n          (∀ (i : Fin n) (j : Fin (Nat.succ n)), M (Fin.succ i) j = N (Fin.succ i) j + c i * M (Fin.castSucc i) j) →\n            det M = det N\nc : Fin n → R\nhc : ∀ (i : Fin n), Fin.succ k < Fin.succ i → c i = 0\nM N : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R\nh0 : ∀ (j : Fin (Nat.succ n)), M 0 j = N 0 j\nhsucc : ∀ (i : Fin n) (j : Fin (Nat.succ n)), M (Fin.succ i) j = N (Fin.succ i) j + c i * M (Fin.castSucc i) j\nM' : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R := updateRow M (Fin.succ k) (N (Fin.succ k))\nhM' : M' = updateRow M (Fin.succ k) (N (Fin.succ k))\nhM : M = updateRow M' (Fin.succ k) (M' (Fin.succ k) + c k • M (Fin.castSucc k))\nk_ne_succ : Fin.castSucc k ≠ Fin.succ k\nM_k : M (Fin.castSucc k) = M' (Fin.castSucc k)\ni : Fin n\nj : Fin (Nat.succ n)\n⊢ M' (Fin.succ i) j = N (Fin.succ i) j + update c k 0 i * M' (Fin.castSucc i) j\n[PROOFSTEP]\nrw [Function.update_apply]\n[GOAL]\ncase refine'_2._hsucc\nm : Type u_1\nn✝ : Type u_2\ninst✝⁴ : DecidableEq n✝\ninst✝³ : Fintype n✝\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nn : ℕ\nk✝ : Fin (n + 1)\nk : Fin n\nih :\n  ∀ (c : Fin n → R),\n    (∀ (i : Fin n), Fin.castSucc k < Fin.succ i → c i = 0) →\n      ∀ {M N : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R},\n        (∀ (j : Fin (Nat.succ n)), M 0 j = N 0 j) →\n          (∀ (i : Fin n) (j : Fin (Nat.succ n)), M (Fin.succ i) j = N (Fin.succ i) j + c i * M (Fin.castSucc i) j) →\n            det M = det N\nc : Fin n → R\nhc : ∀ (i : Fin n), Fin.succ k < Fin.succ i → c i = 0\nM N : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R\nh0 : ∀ (j : Fin (Nat.succ n)), M 0 j = N 0 j\nhsucc : ∀ (i : Fin n) (j : Fin (Nat.succ n)), M (Fin.succ i) j = N (Fin.succ i) j + c i * M (Fin.castSucc i) j\nM' : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R := updateRow M (Fin.succ k) (N (Fin.succ k))\nhM' : M' = updateRow M (Fin.succ k) (N (Fin.succ k))\nhM : M = updateRow M' (Fin.succ k) (M' (Fin.succ k) + c k • M (Fin.castSucc k))\nk_ne_succ : Fin.castSucc k ≠ Fin.succ k\nM_k : M (Fin.castSucc k) = M' (Fin.castSucc k)\ni : Fin n\nj : Fin (Nat.succ n)\n⊢ M' (Fin.succ i) j = N (Fin.succ i) j + (if i = k then 0 else c i) * M' (Fin.castSucc i) j\n[PROOFSTEP]\nsplit_ifs with hik\n[GOAL]\ncase pos\nm : Type u_1\nn✝ : Type u_2\ninst✝⁴ : DecidableEq n✝\ninst✝³ : Fintype n✝\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nn : ℕ\nk✝ : Fin (n + 1)\nk : Fin n\nih :\n  ∀ (c : Fin n → R),\n    (∀ (i : Fin n), Fin.castSucc k < Fin.succ i → c i = 0) →\n      ∀ {M N : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R},\n        (∀ (j : Fin (Nat.succ n)), M 0 j = N 0 j) →\n          (∀ (i : Fin n) (j : Fin (Nat.succ n)), M (Fin.succ i) j = N (Fin.succ i) j + c i * M (Fin.castSucc i) j) →\n            det M = det N\nc : Fin n → R\nhc : ∀ (i : Fin n), Fin.succ k < Fin.succ i → c i = 0\nM N : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R\nh0 : ∀ (j : Fin (Nat.succ n)), M 0 j = N 0 j\nhsucc : ∀ (i : Fin n) (j : Fin (Nat.succ n)), M (Fin.succ i) j = N (Fin.succ i) j + c i * M (Fin.castSucc i) j\nM' : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R := updateRow M (Fin.succ k) (N (Fin.succ k))\nhM' : M' = updateRow M (Fin.succ k) (N (Fin.succ k))\nhM : M = updateRow M' (Fin.succ k) (M' (Fin.succ k) + c k • M (Fin.castSucc k))\nk_ne_succ : Fin.castSucc k ≠ Fin.succ k\nM_k : M (Fin.castSucc k) = M' (Fin.castSucc k)\ni : Fin n\nj : Fin (Nat.succ n)\nhik : i = k\n⊢ M' (Fin.succ i) j = N (Fin.succ i) j + 0 * M' (Fin.castSucc i) j\n[PROOFSTEP]\nrw [zero_mul, add_zero, hM', hik, updateRow_self]\n[GOAL]\ncase neg\nm : Type u_1\nn✝ : Type u_2\ninst✝⁴ : DecidableEq n✝\ninst✝³ : Fintype n✝\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nn : ℕ\nk✝ : Fin (n + 1)\nk : Fin n\nih :\n  ∀ (c : Fin n → R),\n    (∀ (i : Fin n), Fin.castSucc k < Fin.succ i → c i = 0) →\n      ∀ {M N : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R},\n        (∀ (j : Fin (Nat.succ n)), M 0 j = N 0 j) →\n          (∀ (i : Fin n) (j : Fin (Nat.succ n)), M (Fin.succ i) j = N (Fin.succ i) j + c i * M (Fin.castSucc i) j) →\n            det M = det N\nc : Fin n → R\nhc : ∀ (i : Fin n), Fin.succ k < Fin.succ i → c i = 0\nM N : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R\nh0 : ∀ (j : Fin (Nat.succ n)), M 0 j = N 0 j\nhsucc : ∀ (i : Fin n) (j : Fin (Nat.succ n)), M (Fin.succ i) j = N (Fin.succ i) j + c i * M (Fin.castSucc i) j\nM' : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R := updateRow M (Fin.succ k) (N (Fin.succ k))\nhM' : M' = updateRow M (Fin.succ k) (N (Fin.succ k))\nhM : M = updateRow M' (Fin.succ k) (M' (Fin.succ k) + c k • M (Fin.castSucc k))\nk_ne_succ : Fin.castSucc k ≠ Fin.succ k\nM_k : M (Fin.castSucc k) = M' (Fin.castSucc k)\ni : Fin n\nj : Fin (Nat.succ n)\nhik : ¬i = k\n⊢ M' (Fin.succ i) j = N (Fin.succ i) j + c i * M' (Fin.castSucc i) j\n[PROOFSTEP]\nrw [hM', updateRow_ne ((Fin.succ_injective _).ne hik), hsucc]\n[GOAL]\ncase neg\nm : Type u_1\nn✝ : Type u_2\ninst✝⁴ : DecidableEq n✝\ninst✝³ : Fintype n✝\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nn : ℕ\nk✝ : Fin (n + 1)\nk : Fin n\nih :\n  ∀ (c : Fin n → R),\n    (∀ (i : Fin n), Fin.castSucc k < Fin.succ i → c i = 0) →\n      ∀ {M N : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R},\n        (∀ (j : Fin (Nat.succ n)), M 0 j = N 0 j) →\n          (∀ (i : Fin n) (j : Fin (Nat.succ n)), M (Fin.succ i) j = N (Fin.succ i) j + c i * M (Fin.castSucc i) j) →\n            det M = det N\nc : Fin n → R\nhc : ∀ (i : Fin n), Fin.succ k < Fin.succ i → c i = 0\nM N : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R\nh0 : ∀ (j : Fin (Nat.succ n)), M 0 j = N 0 j\nhsucc : ∀ (i : Fin n) (j : Fin (Nat.succ n)), M (Fin.succ i) j = N (Fin.succ i) j + c i * M (Fin.castSucc i) j\nM' : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R := updateRow M (Fin.succ k) (N (Fin.succ k))\nhM' : M' = updateRow M (Fin.succ k) (N (Fin.succ k))\nhM : M = updateRow M' (Fin.succ k) (M' (Fin.succ k) + c k • M (Fin.castSucc k))\nk_ne_succ : Fin.castSucc k ≠ Fin.succ k\nM_k : M (Fin.castSucc k) = M' (Fin.castSucc k)\ni : Fin n\nj : Fin (Nat.succ n)\nhik : ¬i = k\n⊢ N (Fin.succ i) j + c i * M (Fin.castSucc i) j =\n    N (Fin.succ i) j + c i * updateRow M (Fin.succ k) (N (Fin.succ k)) (Fin.castSucc i) j\n[PROOFSTEP]\nby_cases hik2 : k < i\n[GOAL]\ncase pos\nm : Type u_1\nn✝ : Type u_2\ninst✝⁴ : DecidableEq n✝\ninst✝³ : Fintype n✝\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nn : ℕ\nk✝ : Fin (n + 1)\nk : Fin n\nih :\n  ∀ (c : Fin n → R),\n    (∀ (i : Fin n), Fin.castSucc k < Fin.succ i → c i = 0) →\n      ∀ {M N : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R},\n        (∀ (j : Fin (Nat.succ n)), M 0 j = N 0 j) →\n          (∀ (i : Fin n) (j : Fin (Nat.succ n)), M (Fin.succ i) j = N (Fin.succ i) j + c i * M (Fin.castSucc i) j) →\n            det M = det N\nc : Fin n → R\nhc : ∀ (i : Fin n), Fin.succ k < Fin.succ i → c i = 0\nM N : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R\nh0 : ∀ (j : Fin (Nat.succ n)), M 0 j = N 0 j\nhsucc : ∀ (i : Fin n) (j : Fin (Nat.succ n)), M (Fin.succ i) j = N (Fin.succ i) j + c i * M (Fin.castSucc i) j\nM' : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R := updateRow M (Fin.succ k) (N (Fin.succ k))\nhM' : M' = updateRow M (Fin.succ k) (N (Fin.succ k))\nhM : M = updateRow M' (Fin.succ k) (M' (Fin.succ k) + c k • M (Fin.castSucc k))\nk_ne_succ : Fin.castSucc k ≠ Fin.succ k\nM_k : M (Fin.castSucc k) = M' (Fin.castSucc k)\ni : Fin n\nj : Fin (Nat.succ n)\nhik : ¬i = k\nhik2 : k < i\n⊢ N (Fin.succ i) j + c i * M (Fin.castSucc i) j =\n    N (Fin.succ i) j + c i * updateRow M (Fin.succ k) (N (Fin.succ k)) (Fin.castSucc i) j\n[PROOFSTEP]\nsimp [hc i (Fin.succ_lt_succ_iff.mpr hik2)]\n[GOAL]\ncase neg\nm : Type u_1\nn✝ : Type u_2\ninst✝⁴ : DecidableEq n✝\ninst✝³ : Fintype n✝\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nn : ℕ\nk✝ : Fin (n + 1)\nk : Fin n\nih :\n  ∀ (c : Fin n → R),\n    (∀ (i : Fin n), Fin.castSucc k < Fin.succ i → c i = 0) →\n      ∀ {M N : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R},\n        (∀ (j : Fin (Nat.succ n)), M 0 j = N 0 j) →\n          (∀ (i : Fin n) (j : Fin (Nat.succ n)), M (Fin.succ i) j = N (Fin.succ i) j + c i * M (Fin.castSucc i) j) →\n            det M = det N\nc : Fin n → R\nhc : ∀ (i : Fin n), Fin.succ k < Fin.succ i → c i = 0\nM N : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R\nh0 : ∀ (j : Fin (Nat.succ n)), M 0 j = N 0 j\nhsucc : ∀ (i : Fin n) (j : Fin (Nat.succ n)), M (Fin.succ i) j = N (Fin.succ i) j + c i * M (Fin.castSucc i) j\nM' : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R := updateRow M (Fin.succ k) (N (Fin.succ k))\nhM' : M' = updateRow M (Fin.succ k) (N (Fin.succ k))\nhM : M = updateRow M' (Fin.succ k) (M' (Fin.succ k) + c k • M (Fin.castSucc k))\nk_ne_succ : Fin.castSucc k ≠ Fin.succ k\nM_k : M (Fin.castSucc k) = M' (Fin.castSucc k)\ni : Fin n\nj : Fin (Nat.succ n)\nhik : ¬i = k\nhik2 : ¬k < i\n⊢ N (Fin.succ i) j + c i * M (Fin.castSucc i) j =\n    N (Fin.succ i) j + c i * updateRow M (Fin.succ k) (N (Fin.succ k)) (Fin.castSucc i) j\n[PROOFSTEP]\nrw [updateRow_ne]\n[GOAL]\ncase neg\nm : Type u_1\nn✝ : Type u_2\ninst✝⁴ : DecidableEq n✝\ninst✝³ : Fintype n✝\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nn : ℕ\nk✝ : Fin (n + 1)\nk : Fin n\nih :\n  ∀ (c : Fin n → R),\n    (∀ (i : Fin n), Fin.castSucc k < Fin.succ i → c i = 0) →\n      ∀ {M N : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R},\n        (∀ (j : Fin (Nat.succ n)), M 0 j = N 0 j) →\n          (∀ (i : Fin n) (j : Fin (Nat.succ n)), M (Fin.succ i) j = N (Fin.succ i) j + c i * M (Fin.castSucc i) j) →\n            det M = det N\nc : Fin n → R\nhc : ∀ (i : Fin n), Fin.succ k < Fin.succ i → c i = 0\nM N : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R\nh0 : ∀ (j : Fin (Nat.succ n)), M 0 j = N 0 j\nhsucc : ∀ (i : Fin n) (j : Fin (Nat.succ n)), M (Fin.succ i) j = N (Fin.succ i) j + c i * M (Fin.castSucc i) j\nM' : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R := updateRow M (Fin.succ k) (N (Fin.succ k))\nhM' : M' = updateRow M (Fin.succ k) (N (Fin.succ k))\nhM : M = updateRow M' (Fin.succ k) (M' (Fin.succ k) + c k • M (Fin.castSucc k))\nk_ne_succ : Fin.castSucc k ≠ Fin.succ k\nM_k : M (Fin.castSucc k) = M' (Fin.castSucc k)\ni : Fin n\nj : Fin (Nat.succ n)\nhik : ¬i = k\nhik2 : ¬k < i\n⊢ Fin.castSucc i ≠ Fin.succ k\n[PROOFSTEP]\napply ne_of_lt\n[GOAL]\ncase neg.h\nm : Type u_1\nn✝ : Type u_2\ninst✝⁴ : DecidableEq n✝\ninst✝³ : Fintype n✝\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nn : ℕ\nk✝ : Fin (n + 1)\nk : Fin n\nih :\n  ∀ (c : Fin n → R),\n    (∀ (i : Fin n), Fin.castSucc k < Fin.succ i → c i = 0) →\n      ∀ {M N : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R},\n        (∀ (j : Fin (Nat.succ n)), M 0 j = N 0 j) →\n          (∀ (i : Fin n) (j : Fin (Nat.succ n)), M (Fin.succ i) j = N (Fin.succ i) j + c i * M (Fin.castSucc i) j) →\n            det M = det N\nc : Fin n → R\nhc : ∀ (i : Fin n), Fin.succ k < Fin.succ i → c i = 0\nM N : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R\nh0 : ∀ (j : Fin (Nat.succ n)), M 0 j = N 0 j\nhsucc : ∀ (i : Fin n) (j : Fin (Nat.succ n)), M (Fin.succ i) j = N (Fin.succ i) j + c i * M (Fin.castSucc i) j\nM' : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R := updateRow M (Fin.succ k) (N (Fin.succ k))\nhM' : M' = updateRow M (Fin.succ k) (N (Fin.succ k))\nhM : M = updateRow M' (Fin.succ k) (M' (Fin.succ k) + c k • M (Fin.castSucc k))\nk_ne_succ : Fin.castSucc k ≠ Fin.succ k\nM_k : M (Fin.castSucc k) = M' (Fin.castSucc k)\ni : Fin n\nj : Fin (Nat.succ n)\nhik : ¬i = k\nhik2 : ¬k < i\n⊢ Fin.castSucc i < Fin.succ k\n[PROOFSTEP]\nrwa [Fin.lt_iff_val_lt_val, Fin.coe_castSucc, Fin.val_succ, Nat.lt_succ_iff, ← not_lt]\n[GOAL]\nm : Type u_1\nn✝ : Type u_2\ninst✝⁴ : DecidableEq n✝\ninst✝³ : Fintype n✝\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nn : ℕ\nA B : Matrix (Fin (n + 1)) (Fin (n + 1)) R\nc : Fin n → R\nA_zero : ∀ (i : Fin (n + 1)), A i 0 = B i 0\nA_succ : ∀ (i : Fin (n + 1)) (j : Fin n), A i (Fin.succ j) = B i (Fin.succ j) + c j * A i (Fin.castSucc j)\n⊢ det A = det B\n[PROOFSTEP]\nrw [← det_transpose A, ← det_transpose B]\n[GOAL]\nm : Type u_1\nn✝ : Type u_2\ninst✝⁴ : DecidableEq n✝\ninst✝³ : Fintype n✝\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nn : ℕ\nA B : Matrix (Fin (n + 1)) (Fin (n + 1)) R\nc : Fin n → R\nA_zero : ∀ (i : Fin (n + 1)), A i 0 = B i 0\nA_succ : ∀ (i : Fin (n + 1)) (j : Fin n), A i (Fin.succ j) = B i (Fin.succ j) + c j * A i (Fin.castSucc j)\n⊢ det Aᵀ = det Bᵀ\n[PROOFSTEP]\nexact det_eq_of_forall_row_eq_smul_add_pred c A_zero fun i j => A_succ j i\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁶ : DecidableEq n\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq m\ninst✝³ : Fintype m\nR : Type v\ninst✝² : CommRing R\no : Type u_3\ninst✝¹ : Fintype o\ninst✝ : DecidableEq o\nM : o → Matrix n n R\n⊢ det (blockDiagonal M) = ∏ k : o, det (M k)\n[PROOFSTEP]\nsimp_rw [det_apply']\n  -- The right hand side is a product of sums, rewrite it as a sum of products.\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁶ : DecidableEq n\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq m\ninst✝³ : Fintype m\nR : Type v\ninst✝² : CommRing R\no : Type u_3\ninst✝¹ : Fintype o\ninst✝ : DecidableEq o\nM : o → Matrix n n R\n⊢ ∑ x : Perm (n × o), ↑↑(↑sign x) * ∏ x_1 : n × o, blockDiagonal M (↑x x_1) x_1 =\n    ∏ x : o, ∑ x_1 : Perm n, ↑↑(↑sign x_1) * ∏ x_2 : n, M x (↑x_1 x_2) x_2\n[PROOFSTEP]\nrw [Finset.prod_sum]\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁶ : DecidableEq n\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq m\ninst✝³ : Fintype m\nR : Type v\ninst✝² : CommRing R\no : Type u_3\ninst✝¹ : Fintype o\ninst✝ : DecidableEq o\nM : o → Matrix n n R\n⊢ ∑ x : Perm (n × o), ↑↑(↑sign x) * ∏ x_1 : n × o, blockDiagonal M (↑x x_1) x_1 =\n    ∑ p in pi univ fun x => univ,\n      ∏ x in attach univ, ↑↑(↑sign (p ↑x (_ : ↑x ∈ univ))) * ∏ x_1 : n, M (↑x) (↑(p ↑x (_ : ↑x ∈ univ)) x_1) x_1\n[PROOFSTEP]\nsimp_rw [Finset.prod_attach_univ, Finset.univ_pi_univ]\n  -- We claim that the only permutations contributing to the sum are those that\n    -- preserve their second component.\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁶ : DecidableEq n\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq m\ninst✝³ : Fintype m\nR : Type v\ninst✝² : CommRing R\no : Type u_3\ninst✝¹ : Fintype o\ninst✝ : DecidableEq o\nM : o → Matrix n n R\n⊢ ∑ x : Perm (n × o), ↑↑(↑sign x) * ∏ x_1 : n × o, blockDiagonal M (↑x x_1) x_1 =\n    ∑ x : (a : o) → a ∈ univ → Perm n,\n      ∏ x_1 : o,\n        ↑↑(↑sign (x x_1 (_ : ↑{ val := x_1, property := (_ : x_1 ∈ univ) } ∈ univ))) *\n          ∏ x_2 : n, M x_1 (↑(x x_1 (_ : ↑{ val := x_1, property := (_ : x_1 ∈ univ) } ∈ univ)) x_2) x_2\n[PROOFSTEP]\nlet preserving_snd : Finset (Equiv.Perm (n × o)) := Finset.univ.filter fun σ => ∀ x, (σ x).snd = x.snd\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁶ : DecidableEq n\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq m\ninst✝³ : Fintype m\nR : Type v\ninst✝² : CommRing R\no : Type u_3\ninst✝¹ : Fintype o\ninst✝ : DecidableEq o\nM : o → Matrix n n R\npreserving_snd : Finset (Perm (n × o)) := filter (fun σ => ∀ (x : n × o), (↑σ x).snd = x.snd) univ\n⊢ ∑ x : Perm (n × o), ↑↑(↑sign x) * ∏ x_1 : n × o, blockDiagonal M (↑x x_1) x_1 =\n    ∑ x : (a : o) → a ∈ univ → Perm n,\n      ∏ x_1 : o,\n        ↑↑(↑sign (x x_1 (_ : ↑{ val := x_1, property := (_ : x_1 ∈ univ) } ∈ univ))) *\n          ∏ x_2 : n, M x_1 (↑(x x_1 (_ : ↑{ val := x_1, property := (_ : x_1 ∈ univ) } ∈ univ)) x_2) x_2\n[PROOFSTEP]\nhave mem_preserving_snd : ∀ {σ : Equiv.Perm (n × o)}, σ ∈ preserving_snd ↔ ∀ x, (σ x).snd = x.snd := fun {σ} =>\n  Finset.mem_filter.trans ⟨fun h => h.2, fun h => ⟨Finset.mem_univ _, h⟩⟩\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁶ : DecidableEq n\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq m\ninst✝³ : Fintype m\nR : Type v\ninst✝² : CommRing R\no : Type u_3\ninst✝¹ : Fintype o\ninst✝ : DecidableEq o\nM : o → Matrix n n R\npreserving_snd : Finset (Perm (n × o)) := filter (fun σ => ∀ (x : n × o), (↑σ x).snd = x.snd) univ\nmem_preserving_snd : ∀ {σ : Perm (n × o)}, σ ∈ preserving_snd ↔ ∀ (x : n × o), (↑σ x).snd = x.snd\n⊢ ∑ x : Perm (n × o), ↑↑(↑sign x) * ∏ x_1 : n × o, blockDiagonal M (↑x x_1) x_1 =\n    ∑ x : (a : o) → a ∈ univ → Perm n,\n      ∏ x_1 : o,\n        ↑↑(↑sign (x x_1 (_ : ↑{ val := x_1, property := (_ : x_1 ∈ univ) } ∈ univ))) *\n          ∏ x_2 : n, M x_1 (↑(x x_1 (_ : ↑{ val := x_1, property := (_ : x_1 ∈ univ) } ∈ univ)) x_2) x_2\n[PROOFSTEP]\nrw [← Finset.sum_subset (Finset.subset_univ preserving_snd) _]\n  -- And that these are in bijection with `o → Equiv.Perm m`.\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁶ : DecidableEq n\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq m\ninst✝³ : Fintype m\nR : Type v\ninst✝² : CommRing R\no : Type u_3\ninst✝¹ : Fintype o\ninst✝ : DecidableEq o\nM : o → Matrix n n R\npreserving_snd : Finset (Perm (n × o)) := filter (fun σ => ∀ (x : n × o), (↑σ x).snd = x.snd) univ\nmem_preserving_snd : ∀ {σ : Perm (n × o)}, σ ∈ preserving_snd ↔ ∀ (x : n × o), (↑σ x).snd = x.snd\n⊢ ∑ x in preserving_snd, ↑↑(↑sign x) * ∏ x_1 : n × o, blockDiagonal M (↑x x_1) x_1 =\n    ∑ x : (a : o) → a ∈ univ → Perm n,\n      ∏ x_1 : o,\n        ↑↑(↑sign (x x_1 (_ : ↑{ val := x_1, property := (_ : x_1 ∈ univ) } ∈ univ))) *\n          ∏ x_2 : n, M x_1 (↑(x x_1 (_ : ↑{ val := x_1, property := (_ : x_1 ∈ univ) } ∈ univ)) x_2) x_2\nm : Type u_1\nn : Type u_2\ninst✝⁶ : DecidableEq n\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq m\ninst✝³ : Fintype m\nR : Type v\ninst✝² : CommRing R\no : Type u_3\ninst✝¹ : Fintype o\ninst✝ : DecidableEq o\nM : o → Matrix n n R\npreserving_snd : Finset (Perm (n × o)) := filter (fun σ => ∀ (x : n × o), (↑σ x).snd = x.snd) univ\nmem_preserving_snd : ∀ {σ : Perm (n × o)}, σ ∈ preserving_snd ↔ ∀ (x : n × o), (↑σ x).snd = x.snd\n⊢ ∀ (x : Perm (n × o)), x ∈ univ → ¬x ∈ preserving_snd → ↑↑(↑sign x) * ∏ x_1 : n × o, blockDiagonal M (↑x x_1) x_1 = 0\n[PROOFSTEP]\nrw [(Finset.sum_bij\n      (fun (σ : ∀ k : o, k ∈ Finset.univ → Equiv.Perm n) _ => prodCongrLeft fun k => σ k (Finset.mem_univ k)) _ _ _\n      _).symm]\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁶ : DecidableEq n\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq m\ninst✝³ : Fintype m\nR : Type v\ninst✝² : CommRing R\no : Type u_3\ninst✝¹ : Fintype o\ninst✝ : DecidableEq o\nM : o → Matrix n n R\npreserving_snd : Finset (Perm (n × o)) := filter (fun σ => ∀ (x : n × o), (↑σ x).snd = x.snd) univ\nmem_preserving_snd : ∀ {σ : Perm (n × o)}, σ ∈ preserving_snd ↔ ∀ (x : n × o), (↑σ x).snd = x.snd\n⊢ ∀ (a : (k : o) → k ∈ univ → Perm n) (ha : a ∈ univ),\n    (fun σ x => prodCongrLeft fun k => σ k (_ : k ∈ univ)) a ha ∈ preserving_snd\n[PROOFSTEP]\nintro σ _\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁶ : DecidableEq n\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq m\ninst✝³ : Fintype m\nR : Type v\ninst✝² : CommRing R\no : Type u_3\ninst✝¹ : Fintype o\ninst✝ : DecidableEq o\nM : o → Matrix n n R\npreserving_snd : Finset (Perm (n × o)) := filter (fun σ => ∀ (x : n × o), (↑σ x).snd = x.snd) univ\nmem_preserving_snd : ∀ {σ : Perm (n × o)}, σ ∈ preserving_snd ↔ ∀ (x : n × o), (↑σ x).snd = x.snd\nσ : (k : o) → k ∈ univ → Perm n\nha✝ : σ ∈ univ\n⊢ (fun σ x => prodCongrLeft fun k => σ k (_ : k ∈ univ)) σ ha✝ ∈ preserving_snd\n[PROOFSTEP]\nrw [mem_preserving_snd]\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁶ : DecidableEq n\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq m\ninst✝³ : Fintype m\nR : Type v\ninst✝² : CommRing R\no : Type u_3\ninst✝¹ : Fintype o\ninst✝ : DecidableEq o\nM : o → Matrix n n R\npreserving_snd : Finset (Perm (n × o)) := filter (fun σ => ∀ (x : n × o), (↑σ x).snd = x.snd) univ\nmem_preserving_snd : ∀ {σ : Perm (n × o)}, σ ∈ preserving_snd ↔ ∀ (x : n × o), (↑σ x).snd = x.snd\nσ : (k : o) → k ∈ univ → Perm n\nha✝ : σ ∈ univ\n⊢ ∀ (x : n × o), (↑((fun σ x => prodCongrLeft fun k => σ k (_ : k ∈ univ)) σ ha✝) x).snd = x.snd\n[PROOFSTEP]\nrintro ⟨-, x⟩\n[GOAL]\ncase mk\nm : Type u_1\nn : Type u_2\ninst✝⁶ : DecidableEq n\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq m\ninst✝³ : Fintype m\nR : Type v\ninst✝² : CommRing R\no : Type u_3\ninst✝¹ : Fintype o\ninst✝ : DecidableEq o\nM : o → Matrix n n R\npreserving_snd : Finset (Perm (n × o)) := filter (fun σ => ∀ (x : n × o), (↑σ x).snd = x.snd) univ\nmem_preserving_snd : ∀ {σ : Perm (n × o)}, σ ∈ preserving_snd ↔ ∀ (x : n × o), (↑σ x).snd = x.snd\nσ : (k : o) → k ∈ univ → Perm n\nha✝ : σ ∈ univ\nfst✝ : n\nx : o\n⊢ (↑((fun σ x => prodCongrLeft fun k => σ k (_ : k ∈ univ)) σ ha✝) (fst✝, x)).snd = (fst✝, x).snd\n[PROOFSTEP]\nsimp only [prodCongrLeft_apply]\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁶ : DecidableEq n\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq m\ninst✝³ : Fintype m\nR : Type v\ninst✝² : CommRing R\no : Type u_3\ninst✝¹ : Fintype o\ninst✝ : DecidableEq o\nM : o → Matrix n n R\npreserving_snd : Finset (Perm (n × o)) := filter (fun σ => ∀ (x : n × o), (↑σ x).snd = x.snd) univ\nmem_preserving_snd : ∀ {σ : Perm (n × o)}, σ ∈ preserving_snd ↔ ∀ (x : n × o), (↑σ x).snd = x.snd\n⊢ ∀ (a : (k : o) → k ∈ univ → Perm n) (ha : a ∈ univ),\n    ∏ x : o,\n        ↑↑(↑sign (a x (_ : ↑{ val := x, property := (_ : x ∈ univ) } ∈ univ))) *\n          ∏ x_1 : n, M x (↑(a x (_ : ↑{ val := x, property := (_ : x ∈ univ) } ∈ univ)) x_1) x_1 =\n      ↑↑(↑sign ((fun σ x => prodCongrLeft fun k => σ k (_ : k ∈ univ)) a ha)) *\n        ∏ x : n × o, blockDiagonal M (↑((fun σ x => prodCongrLeft fun k => σ k (_ : k ∈ univ)) a ha) x) x\n[PROOFSTEP]\nintro σ _\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁶ : DecidableEq n\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq m\ninst✝³ : Fintype m\nR : Type v\ninst✝² : CommRing R\no : Type u_3\ninst✝¹ : Fintype o\ninst✝ : DecidableEq o\nM : o → Matrix n n R\npreserving_snd : Finset (Perm (n × o)) := filter (fun σ => ∀ (x : n × o), (↑σ x).snd = x.snd) univ\nmem_preserving_snd : ∀ {σ : Perm (n × o)}, σ ∈ preserving_snd ↔ ∀ (x : n × o), (↑σ x).snd = x.snd\nσ : (k : o) → k ∈ univ → Perm n\nha✝ : σ ∈ univ\n⊢ ∏ x : o,\n      ↑↑(↑sign (σ x (_ : ↑{ val := x, property := (_ : x ∈ univ) } ∈ univ))) *\n        ∏ x_1 : n, M x (↑(σ x (_ : ↑{ val := x, property := (_ : x ∈ univ) } ∈ univ)) x_1) x_1 =\n    ↑↑(↑sign ((fun σ x => prodCongrLeft fun k => σ k (_ : k ∈ univ)) σ ha✝)) *\n      ∏ x : n × o, blockDiagonal M (↑((fun σ x => prodCongrLeft fun k => σ k (_ : k ∈ univ)) σ ha✝) x) x\n[PROOFSTEP]\nrw [Finset.prod_mul_distrib, ← Finset.univ_product_univ, Finset.prod_product_right]\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁶ : DecidableEq n\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq m\ninst✝³ : Fintype m\nR : Type v\ninst✝² : CommRing R\no : Type u_3\ninst✝¹ : Fintype o\ninst✝ : DecidableEq o\nM : o → Matrix n n R\npreserving_snd : Finset (Perm (n × o)) := filter (fun σ => ∀ (x : n × o), (↑σ x).snd = x.snd) univ\nmem_preserving_snd : ∀ {σ : Perm (n × o)}, σ ∈ preserving_snd ↔ ∀ (x : n × o), (↑σ x).snd = x.snd\nσ : (k : o) → k ∈ univ → Perm n\nha✝ : σ ∈ univ\n⊢ (∏ x : o, ↑↑(↑sign (σ x (_ : ↑{ val := x, property := (_ : x ∈ univ) } ∈ univ)))) *\n      ∏ x : o, ∏ x_1 : n, M x (↑(σ x (_ : ↑{ val := x, property := (_ : x ∈ univ) } ∈ univ)) x_1) x_1 =\n    ↑↑(↑sign ((fun σ x => prodCongrLeft fun k => σ k (_ : k ∈ univ)) σ ha✝)) *\n      ∏ y : o, ∏ x : n, blockDiagonal M (↑((fun σ x => prodCongrLeft fun k => σ k (_ : k ∈ univ)) σ ha✝) (x, y)) (x, y)\n[PROOFSTEP]\nsimp only [sign_prodCongrLeft, Units.coe_prod, Int.cast_prod, blockDiagonal_apply_eq, prodCongrLeft_apply]\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁶ : DecidableEq n\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq m\ninst✝³ : Fintype m\nR : Type v\ninst✝² : CommRing R\no : Type u_3\ninst✝¹ : Fintype o\ninst✝ : DecidableEq o\nM : o → Matrix n n R\npreserving_snd : Finset (Perm (n × o)) := filter (fun σ => ∀ (x : n × o), (↑σ x).snd = x.snd) univ\nmem_preserving_snd : ∀ {σ : Perm (n × o)}, σ ∈ preserving_snd ↔ ∀ (x : n × o), (↑σ x).snd = x.snd\n⊢ ∀ (a₁ a₂ : (k : o) → k ∈ univ → Perm n) (ha₁ : a₁ ∈ univ) (ha₂ : a₂ ∈ univ),\n    (fun σ x => prodCongrLeft fun k => σ k (_ : k ∈ univ)) a₁ ha₁ =\n        (fun σ x => prodCongrLeft fun k => σ k (_ : k ∈ univ)) a₂ ha₂ →\n      a₁ = a₂\n[PROOFSTEP]\nintro σ σ' _ _ eq\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁶ : DecidableEq n\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq m\ninst✝³ : Fintype m\nR : Type v\ninst✝² : CommRing R\no : Type u_3\ninst✝¹ : Fintype o\ninst✝ : DecidableEq o\nM : o → Matrix n n R\npreserving_snd : Finset (Perm (n × o)) := filter (fun σ => ∀ (x : n × o), (↑σ x).snd = x.snd) univ\nmem_preserving_snd : ∀ {σ : Perm (n × o)}, σ ∈ preserving_snd ↔ ∀ (x : n × o), (↑σ x).snd = x.snd\nσ σ' : (k : o) → k ∈ univ → Perm n\nha₁✝ : σ ∈ univ\nha₂✝ : σ' ∈ univ\neq :\n  (fun σ x => prodCongrLeft fun k => σ k (_ : k ∈ univ)) σ ha₁✝ =\n    (fun σ x => prodCongrLeft fun k => σ k (_ : k ∈ univ)) σ' ha₂✝\n⊢ σ = σ'\n[PROOFSTEP]\next x hx k\n[GOAL]\ncase h.h.H\nm : Type u_1\nn : Type u_2\ninst✝⁶ : DecidableEq n\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq m\ninst✝³ : Fintype m\nR : Type v\ninst✝² : CommRing R\no : Type u_3\ninst✝¹ : Fintype o\ninst✝ : DecidableEq o\nM : o → Matrix n n R\npreserving_snd : Finset (Perm (n × o)) := filter (fun σ => ∀ (x : n × o), (↑σ x).snd = x.snd) univ\nmem_preserving_snd : ∀ {σ : Perm (n × o)}, σ ∈ preserving_snd ↔ ∀ (x : n × o), (↑σ x).snd = x.snd\nσ σ' : (k : o) → k ∈ univ → Perm n\nha₁✝ : σ ∈ univ\nha₂✝ : σ' ∈ univ\neq :\n  (fun σ x => prodCongrLeft fun k => σ k (_ : k ∈ univ)) σ ha₁✝ =\n    (fun σ x => prodCongrLeft fun k => σ k (_ : k ∈ univ)) σ' ha₂✝\nx : o\nhx : x ∈ univ\nk : n\n⊢ ↑(σ x hx) k = ↑(σ' x hx) k\n[PROOFSTEP]\nsimp only at eq \n[GOAL]\ncase h.h.H\nm : Type u_1\nn : Type u_2\ninst✝⁶ : DecidableEq n\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq m\ninst✝³ : Fintype m\nR : Type v\ninst✝² : CommRing R\no : Type u_3\ninst✝¹ : Fintype o\ninst✝ : DecidableEq o\nM : o → Matrix n n R\npreserving_snd : Finset (Perm (n × o)) := filter (fun σ => ∀ (x : n × o), (↑σ x).snd = x.snd) univ\nmem_preserving_snd : ∀ {σ : Perm (n × o)}, σ ∈ preserving_snd ↔ ∀ (x : n × o), (↑σ x).snd = x.snd\nσ σ' : (k : o) → k ∈ univ → Perm n\nha₁✝ : σ ∈ univ\nha₂✝ : σ' ∈ univ\neq : (prodCongrLeft fun k => σ k (_ : k ∈ univ)) = prodCongrLeft fun k => σ' k (_ : k ∈ univ)\nx : o\nhx : x ∈ univ\nk : n\n⊢ ↑(σ x hx) k = ↑(σ' x hx) k\n[PROOFSTEP]\nhave :\n  ∀ k x,\n    prodCongrLeft (fun k => σ k (Finset.mem_univ _)) (k, x) =\n      prodCongrLeft (fun k => σ' k (Finset.mem_univ _)) (k, x) :=\n  fun k x => by rw [eq]\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁶ : DecidableEq n\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq m\ninst✝³ : Fintype m\nR : Type v\ninst✝² : CommRing R\no : Type u_3\ninst✝¹ : Fintype o\ninst✝ : DecidableEq o\nM : o → Matrix n n R\npreserving_snd : Finset (Perm (n × o)) := filter (fun σ => ∀ (x : n × o), (↑σ x).snd = x.snd) univ\nmem_preserving_snd : ∀ {σ : Perm (n × o)}, σ ∈ preserving_snd ↔ ∀ (x : n × o), (↑σ x).snd = x.snd\nσ σ' : (k : o) → k ∈ univ → Perm n\nha₁✝ : σ ∈ univ\nha₂✝ : σ' ∈ univ\neq : (prodCongrLeft fun k => σ k (_ : k ∈ univ)) = prodCongrLeft fun k => σ' k (_ : k ∈ univ)\nx✝ : o\nhx : x✝ ∈ univ\nk✝ k : n\nx : o\n⊢ ↑(prodCongrLeft fun k => σ k (_ : k ∈ univ)) (k, x) = ↑(prodCongrLeft fun k => σ' k (_ : k ∈ univ)) (k, x)\n[PROOFSTEP]\nrw [eq]\n[GOAL]\ncase h.h.H\nm : Type u_1\nn : Type u_2\ninst✝⁶ : DecidableEq n\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq m\ninst✝³ : Fintype m\nR : Type v\ninst✝² : CommRing R\no : Type u_3\ninst✝¹ : Fintype o\ninst✝ : DecidableEq o\nM : o → Matrix n n R\npreserving_snd : Finset (Perm (n × o)) := filter (fun σ => ∀ (x : n × o), (↑σ x).snd = x.snd) univ\nmem_preserving_snd : ∀ {σ : Perm (n × o)}, σ ∈ preserving_snd ↔ ∀ (x : n × o), (↑σ x).snd = x.snd\nσ σ' : (k : o) → k ∈ univ → Perm n\nha₁✝ : σ ∈ univ\nha₂✝ : σ' ∈ univ\neq : (prodCongrLeft fun k => σ k (_ : k ∈ univ)) = prodCongrLeft fun k => σ' k (_ : k ∈ univ)\nx : o\nhx : x ∈ univ\nk : n\nthis :\n  ∀ (k : n) (x : o),\n    ↑(prodCongrLeft fun k => σ k (_ : k ∈ univ)) (k, x) = ↑(prodCongrLeft fun k => σ' k (_ : k ∈ univ)) (k, x)\n⊢ ↑(σ x hx) k = ↑(σ' x hx) k\n[PROOFSTEP]\nsimp only [prodCongrLeft_apply, Prod.mk.inj_iff] at this \n[GOAL]\ncase h.h.H\nm : Type u_1\nn : Type u_2\ninst✝⁶ : DecidableEq n\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq m\ninst✝³ : Fintype m\nR : Type v\ninst✝² : CommRing R\no : Type u_3\ninst✝¹ : Fintype o\ninst✝ : DecidableEq o\nM : o → Matrix n n R\npreserving_snd : Finset (Perm (n × o)) := filter (fun σ => ∀ (x : n × o), (↑σ x).snd = x.snd) univ\nmem_preserving_snd : ∀ {σ : Perm (n × o)}, σ ∈ preserving_snd ↔ ∀ (x : n × o), (↑σ x).snd = x.snd\nσ σ' : (k : o) → k ∈ univ → Perm n\nha₁✝ : σ ∈ univ\nha₂✝ : σ' ∈ univ\neq : (prodCongrLeft fun k => σ k (_ : k ∈ univ)) = prodCongrLeft fun k => σ' k (_ : k ∈ univ)\nx : o\nhx : x ∈ univ\nk : n\nthis : ∀ (k : n) (x : o), ↑(σ x (_ : x ∈ univ)) k = ↑(σ' x (_ : x ∈ univ)) k ∧ True\n⊢ ↑(σ x hx) k = ↑(σ' x hx) k\n[PROOFSTEP]\nexact (this k x).1\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁶ : DecidableEq n\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq m\ninst✝³ : Fintype m\nR : Type v\ninst✝² : CommRing R\no : Type u_3\ninst✝¹ : Fintype o\ninst✝ : DecidableEq o\nM : o → Matrix n n R\npreserving_snd : Finset (Perm (n × o)) := filter (fun σ => ∀ (x : n × o), (↑σ x).snd = x.snd) univ\nmem_preserving_snd : ∀ {σ : Perm (n × o)}, σ ∈ preserving_snd ↔ ∀ (x : n × o), (↑σ x).snd = x.snd\n⊢ ∀ (b : n × o ≃ n × o), b ∈ preserving_snd → ∃ a ha, b = (fun σ x => prodCongrLeft fun k => σ k (_ : k ∈ univ)) a ha\n[PROOFSTEP]\nintro σ hσ\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁶ : DecidableEq n\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq m\ninst✝³ : Fintype m\nR : Type v\ninst✝² : CommRing R\no : Type u_3\ninst✝¹ : Fintype o\ninst✝ : DecidableEq o\nM : o → Matrix n n R\npreserving_snd : Finset (Perm (n × o)) := filter (fun σ => ∀ (x : n × o), (↑σ x).snd = x.snd) univ\nmem_preserving_snd : ∀ {σ : Perm (n × o)}, σ ∈ preserving_snd ↔ ∀ (x : n × o), (↑σ x).snd = x.snd\nσ : n × o ≃ n × o\nhσ : σ ∈ preserving_snd\n⊢ ∃ a ha, σ = (fun σ x => prodCongrLeft fun k => σ k (_ : k ∈ univ)) a ha\n[PROOFSTEP]\nrw [mem_preserving_snd] at hσ \n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁶ : DecidableEq n\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq m\ninst✝³ : Fintype m\nR : Type v\ninst✝² : CommRing R\no : Type u_3\ninst✝¹ : Fintype o\ninst✝ : DecidableEq o\nM : o → Matrix n n R\npreserving_snd : Finset (Perm (n × o)) := filter (fun σ => ∀ (x : n × o), (↑σ x).snd = x.snd) univ\nmem_preserving_snd : ∀ {σ : Perm (n × o)}, σ ∈ preserving_snd ↔ ∀ (x : n × o), (↑σ x).snd = x.snd\nσ : n × o ≃ n × o\nhσ : ∀ (x : n × o), (↑σ x).snd = x.snd\n⊢ ∃ a ha, σ = (fun σ x => prodCongrLeft fun k => σ k (_ : k ∈ univ)) a ha\n[PROOFSTEP]\nhave hσ' : ∀ x, (σ⁻¹ x).snd = x.snd := by\n  intro x\n  conv_rhs => rw [← Perm.apply_inv_self σ x, hσ]\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁶ : DecidableEq n\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq m\ninst✝³ : Fintype m\nR : Type v\ninst✝² : CommRing R\no : Type u_3\ninst✝¹ : Fintype o\ninst✝ : DecidableEq o\nM : o → Matrix n n R\npreserving_snd : Finset (Perm (n × o)) := filter (fun σ => ∀ (x : n × o), (↑σ x).snd = x.snd) univ\nmem_preserving_snd : ∀ {σ : Perm (n × o)}, σ ∈ preserving_snd ↔ ∀ (x : n × o), (↑σ x).snd = x.snd\nσ : n × o ≃ n × o\nhσ : ∀ (x : n × o), (↑σ x).snd = x.snd\n⊢ ∀ (x : n × o), (↑σ⁻¹ x).snd = x.snd\n[PROOFSTEP]\nintro x\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁶ : DecidableEq n\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq m\ninst✝³ : Fintype m\nR : Type v\ninst✝² : CommRing R\no : Type u_3\ninst✝¹ : Fintype o\ninst✝ : DecidableEq o\nM : o → Matrix n n R\npreserving_snd : Finset (Perm (n × o)) := filter (fun σ => ∀ (x : n × o), (↑σ x).snd = x.snd) univ\nmem_preserving_snd : ∀ {σ : Perm (n × o)}, σ ∈ preserving_snd ↔ ∀ (x : n × o), (↑σ x).snd = x.snd\nσ : n × o ≃ n × o\nhσ : ∀ (x : n × o), (↑σ x).snd = x.snd\nx : n × o\n⊢ (↑σ⁻¹ x).snd = x.snd\n[PROOFSTEP]\nconv_rhs => rw [← Perm.apply_inv_self σ x, hσ]\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁶ : DecidableEq n\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq m\ninst✝³ : Fintype m\nR : Type v\ninst✝² : CommRing R\no : Type u_3\ninst✝¹ : Fintype o\ninst✝ : DecidableEq o\nM : o → Matrix n n R\npreserving_snd : Finset (Perm (n × o)) := filter (fun σ => ∀ (x : n × o), (↑σ x).snd = x.snd) univ\nmem_preserving_snd : ∀ {σ : Perm (n × o)}, σ ∈ preserving_snd ↔ ∀ (x : n × o), (↑σ x).snd = x.snd\nσ : n × o ≃ n × o\nhσ : ∀ (x : n × o), (↑σ x).snd = x.snd\nx : n × o\n| x.snd\n[PROOFSTEP]\nrw [← Perm.apply_inv_self σ x, hσ]\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁶ : DecidableEq n\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq m\ninst✝³ : Fintype m\nR : Type v\ninst✝² : CommRing R\no : Type u_3\ninst✝¹ : Fintype o\ninst✝ : DecidableEq o\nM : o → Matrix n n R\npreserving_snd : Finset (Perm (n × o)) := filter (fun σ => ∀ (x : n × o), (↑σ x).snd = x.snd) univ\nmem_preserving_snd : ∀ {σ : Perm (n × o)}, σ ∈ preserving_snd ↔ ∀ (x : n × o), (↑σ x).snd = x.snd\nσ : n × o ≃ n × o\nhσ : ∀ (x : n × o), (↑σ x).snd = x.snd\nx : n × o\n| x.snd\n[PROOFSTEP]\nrw [← Perm.apply_inv_self σ x, hσ]\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁶ : DecidableEq n\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq m\ninst✝³ : Fintype m\nR : Type v\ninst✝² : CommRing R\no : Type u_3\ninst✝¹ : Fintype o\ninst✝ : DecidableEq o\nM : o → Matrix n n R\npreserving_snd : Finset (Perm (n × o)) := filter (fun σ => ∀ (x : n × o), (↑σ x).snd = x.snd) univ\nmem_preserving_snd : ∀ {σ : Perm (n × o)}, σ ∈ preserving_snd ↔ ∀ (x : n × o), (↑σ x).snd = x.snd\nσ : n × o ≃ n × o\nhσ : ∀ (x : n × o), (↑σ x).snd = x.snd\nx : n × o\n| x.snd\n[PROOFSTEP]\nrw [← Perm.apply_inv_self σ x, hσ]\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁶ : DecidableEq n\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq m\ninst✝³ : Fintype m\nR : Type v\ninst✝² : CommRing R\no : Type u_3\ninst✝¹ : Fintype o\ninst✝ : DecidableEq o\nM : o → Matrix n n R\npreserving_snd : Finset (Perm (n × o)) := filter (fun σ => ∀ (x : n × o), (↑σ x).snd = x.snd) univ\nmem_preserving_snd : ∀ {σ : Perm (n × o)}, σ ∈ preserving_snd ↔ ∀ (x : n × o), (↑σ x).snd = x.snd\nσ : n × o ≃ n × o\nhσ : ∀ (x : n × o), (↑σ x).snd = x.snd\nhσ' : ∀ (x : n × o), (↑σ⁻¹ x).snd = x.snd\n⊢ ∃ a ha, σ = (fun σ x => prodCongrLeft fun k => σ k (_ : k ∈ univ)) a ha\n[PROOFSTEP]\nhave mk_apply_eq : ∀ k x, ((σ (x, k)).fst, k) = σ (x, k) :=\n  by\n  intro k x\n  ext\n  · simp only\n  · simp only [hσ]\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁶ : DecidableEq n\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq m\ninst✝³ : Fintype m\nR : Type v\ninst✝² : CommRing R\no : Type u_3\ninst✝¹ : Fintype o\ninst✝ : DecidableEq o\nM : o → Matrix n n R\npreserving_snd : Finset (Perm (n × o)) := filter (fun σ => ∀ (x : n × o), (↑σ x).snd = x.snd) univ\nmem_preserving_snd : ∀ {σ : Perm (n × o)}, σ ∈ preserving_snd ↔ ∀ (x : n × o), (↑σ x).snd = x.snd\nσ : n × o ≃ n × o\nhσ : ∀ (x : n × o), (↑σ x).snd = x.snd\nhσ' : ∀ (x : n × o), (↑σ⁻¹ x).snd = x.snd\n⊢ ∀ (k : o) (x : n), ((↑σ (x, k)).fst, k) = ↑σ (x, k)\n[PROOFSTEP]\nintro k x\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁶ : DecidableEq n\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq m\ninst✝³ : Fintype m\nR : Type v\ninst✝² : CommRing R\no : Type u_3\ninst✝¹ : Fintype o\ninst✝ : DecidableEq o\nM : o → Matrix n n R\npreserving_snd : Finset (Perm (n × o)) := filter (fun σ => ∀ (x : n × o), (↑σ x).snd = x.snd) univ\nmem_preserving_snd : ∀ {σ : Perm (n × o)}, σ ∈ preserving_snd ↔ ∀ (x : n × o), (↑σ x).snd = x.snd\nσ : n × o ≃ n × o\nhσ : ∀ (x : n × o), (↑σ x).snd = x.snd\nhσ' : ∀ (x : n × o), (↑σ⁻¹ x).snd = x.snd\nk : o\nx : n\n⊢ ((↑σ (x, k)).fst, k) = ↑σ (x, k)\n[PROOFSTEP]\next\n[GOAL]\ncase h₁\nm : Type u_1\nn : Type u_2\ninst✝⁶ : DecidableEq n\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq m\ninst✝³ : Fintype m\nR : Type v\ninst✝² : CommRing R\no : Type u_3\ninst✝¹ : Fintype o\ninst✝ : DecidableEq o\nM : o → Matrix n n R\npreserving_snd : Finset (Perm (n × o)) := filter (fun σ => ∀ (x : n × o), (↑σ x).snd = x.snd) univ\nmem_preserving_snd : ∀ {σ : Perm (n × o)}, σ ∈ preserving_snd ↔ ∀ (x : n × o), (↑σ x).snd = x.snd\nσ : n × o ≃ n × o\nhσ : ∀ (x : n × o), (↑σ x).snd = x.snd\nhσ' : ∀ (x : n × o), (↑σ⁻¹ x).snd = x.snd\nk : o\nx : n\n⊢ ((↑σ (x, k)).fst, k).fst = (↑σ (x, k)).fst\n[PROOFSTEP]\nsimp only\n[GOAL]\ncase h₂\nm : Type u_1\nn : Type u_2\ninst✝⁶ : DecidableEq n\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq m\ninst✝³ : Fintype m\nR : Type v\ninst✝² : CommRing R\no : Type u_3\ninst✝¹ : Fintype o\ninst✝ : DecidableEq o\nM : o → Matrix n n R\npreserving_snd : Finset (Perm (n × o)) := filter (fun σ => ∀ (x : n × o), (↑σ x).snd = x.snd) univ\nmem_preserving_snd : ∀ {σ : Perm (n × o)}, σ ∈ preserving_snd ↔ ∀ (x : n × o), (↑σ x).snd = x.snd\nσ : n × o ≃ n × o\nhσ : ∀ (x : n × o), (↑σ x).snd = x.snd\nhσ' : ∀ (x : n × o), (↑σ⁻¹ x).snd = x.snd\nk : o\nx : n\n⊢ ((↑σ (x, k)).fst, k).snd = (↑σ (x, k)).snd\n[PROOFSTEP]\nsimp only [hσ]\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁶ : DecidableEq n\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq m\ninst✝³ : Fintype m\nR : Type v\ninst✝² : CommRing R\no : Type u_3\ninst✝¹ : Fintype o\ninst✝ : DecidableEq o\nM : o → Matrix n n R\npreserving_snd : Finset (Perm (n × o)) := filter (fun σ => ∀ (x : n × o), (↑σ x).snd = x.snd) univ\nmem_preserving_snd : ∀ {σ : Perm (n × o)}, σ ∈ preserving_snd ↔ ∀ (x : n × o), (↑σ x).snd = x.snd\nσ : n × o ≃ n × o\nhσ : ∀ (x : n × o), (↑σ x).snd = x.snd\nhσ' : ∀ (x : n × o), (↑σ⁻¹ x).snd = x.snd\nmk_apply_eq : ∀ (k : o) (x : n), ((↑σ (x, k)).fst, k) = ↑σ (x, k)\n⊢ ∃ a ha, σ = (fun σ x => prodCongrLeft fun k => σ k (_ : k ∈ univ)) a ha\n[PROOFSTEP]\nhave mk_inv_apply_eq : ∀ k x, ((σ⁻¹ (x, k)).fst, k) = σ⁻¹ (x, k) :=\n  by\n  intro k x\n  conv_lhs => rw [← Perm.apply_inv_self σ (x, k)]\n  ext\n  · simp only [apply_inv_self]\n  · simp only [hσ']\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁶ : DecidableEq n\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq m\ninst✝³ : Fintype m\nR : Type v\ninst✝² : CommRing R\no : Type u_3\ninst✝¹ : Fintype o\ninst✝ : DecidableEq o\nM : o → Matrix n n R\npreserving_snd : Finset (Perm (n × o)) := filter (fun σ => ∀ (x : n × o), (↑σ x).snd = x.snd) univ\nmem_preserving_snd : ∀ {σ : Perm (n × o)}, σ ∈ preserving_snd ↔ ∀ (x : n × o), (↑σ x).snd = x.snd\nσ : n × o ≃ n × o\nhσ : ∀ (x : n × o), (↑σ x).snd = x.snd\nhσ' : ∀ (x : n × o), (↑σ⁻¹ x).snd = x.snd\nmk_apply_eq : ∀ (k : o) (x : n), ((↑σ (x, k)).fst, k) = ↑σ (x, k)\n⊢ ∀ (k : o) (x : n), ((↑σ⁻¹ (x, k)).fst, k) = ↑σ⁻¹ (x, k)\n[PROOFSTEP]\nintro k x\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁶ : DecidableEq n\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq m\ninst✝³ : Fintype m\nR : Type v\ninst✝² : CommRing R\no : Type u_3\ninst✝¹ : Fintype o\ninst✝ : DecidableEq o\nM : o → Matrix n n R\npreserving_snd : Finset (Perm (n × o)) := filter (fun σ => ∀ (x : n × o), (↑σ x).snd = x.snd) univ\nmem_preserving_snd : ∀ {σ : Perm (n × o)}, σ ∈ preserving_snd ↔ ∀ (x : n × o), (↑σ x).snd = x.snd\nσ : n × o ≃ n × o\nhσ : ∀ (x : n × o), (↑σ x).snd = x.snd\nhσ' : ∀ (x : n × o), (↑σ⁻¹ x).snd = x.snd\nmk_apply_eq : ∀ (k : o) (x : n), ((↑σ (x, k)).fst, k) = ↑σ (x, k)\nk : o\nx : n\n⊢ ((↑σ⁻¹ (x, k)).fst, k) = ↑σ⁻¹ (x, k)\n[PROOFSTEP]\nconv_lhs => rw [← Perm.apply_inv_self σ (x, k)]\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁶ : DecidableEq n\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq m\ninst✝³ : Fintype m\nR : Type v\ninst✝² : CommRing R\no : Type u_3\ninst✝¹ : Fintype o\ninst✝ : DecidableEq o\nM : o → Matrix n n R\npreserving_snd : Finset (Perm (n × o)) := filter (fun σ => ∀ (x : n × o), (↑σ x).snd = x.snd) univ\nmem_preserving_snd : ∀ {σ : Perm (n × o)}, σ ∈ preserving_snd ↔ ∀ (x : n × o), (↑σ x).snd = x.snd\nσ : n × o ≃ n × o\nhσ : ∀ (x : n × o), (↑σ x).snd = x.snd\nhσ' : ∀ (x : n × o), (↑σ⁻¹ x).snd = x.snd\nmk_apply_eq : ∀ (k : o) (x : n), ((↑σ (x, k)).fst, k) = ↑σ (x, k)\nk : o\nx : n\n| ((↑σ⁻¹ (x, k)).fst, k)\n[PROOFSTEP]\nrw [← Perm.apply_inv_self σ (x, k)]\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁶ : DecidableEq n\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq m\ninst✝³ : Fintype m\nR : Type v\ninst✝² : CommRing R\no : Type u_3\ninst✝¹ : Fintype o\ninst✝ : DecidableEq o\nM : o → Matrix n n R\npreserving_snd : Finset (Perm (n × o)) := filter (fun σ => ∀ (x : n × o), (↑σ x).snd = x.snd) univ\nmem_preserving_snd : ∀ {σ : Perm (n × o)}, σ ∈ preserving_snd ↔ ∀ (x : n × o), (↑σ x).snd = x.snd\nσ : n × o ≃ n × o\nhσ : ∀ (x : n × o), (↑σ x).snd = x.snd\nhσ' : ∀ (x : n × o), (↑σ⁻¹ x).snd = x.snd\nmk_apply_eq : ∀ (k : o) (x : n), ((↑σ (x, k)).fst, k) = ↑σ (x, k)\nk : o\nx : n\n| ((↑σ⁻¹ (x, k)).fst, k)\n[PROOFSTEP]\nrw [← Perm.apply_inv_self σ (x, k)]\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁶ : DecidableEq n\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq m\ninst✝³ : Fintype m\nR : Type v\ninst✝² : CommRing R\no : Type u_3\ninst✝¹ : Fintype o\ninst✝ : DecidableEq o\nM : o → Matrix n n R\npreserving_snd : Finset (Perm (n × o)) := filter (fun σ => ∀ (x : n × o), (↑σ x).snd = x.snd) univ\nmem_preserving_snd : ∀ {σ : Perm (n × o)}, σ ∈ preserving_snd ↔ ∀ (x : n × o), (↑σ x).snd = x.snd\nσ : n × o ≃ n × o\nhσ : ∀ (x : n × o), (↑σ x).snd = x.snd\nhσ' : ∀ (x : n × o), (↑σ⁻¹ x).snd = x.snd\nmk_apply_eq : ∀ (k : o) (x : n), ((↑σ (x, k)).fst, k) = ↑σ (x, k)\nk : o\nx : n\n| ((↑σ⁻¹ (x, k)).fst, k)\n[PROOFSTEP]\nrw [← Perm.apply_inv_self σ (x, k)]\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁶ : DecidableEq n\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq m\ninst✝³ : Fintype m\nR : Type v\ninst✝² : CommRing R\no : Type u_3\ninst✝¹ : Fintype o\ninst✝ : DecidableEq o\nM : o → Matrix n n R\npreserving_snd : Finset (Perm (n × o)) := filter (fun σ => ∀ (x : n × o), (↑σ x).snd = x.snd) univ\nmem_preserving_snd : ∀ {σ : Perm (n × o)}, σ ∈ preserving_snd ↔ ∀ (x : n × o), (↑σ x).snd = x.snd\nσ : n × o ≃ n × o\nhσ : ∀ (x : n × o), (↑σ x).snd = x.snd\nhσ' : ∀ (x : n × o), (↑σ⁻¹ x).snd = x.snd\nmk_apply_eq : ∀ (k : o) (x : n), ((↑σ (x, k)).fst, k) = ↑σ (x, k)\nk : o\nx : n\n⊢ ((↑σ⁻¹ (↑σ (↑σ⁻¹ (x, k)))).fst, k) = ↑σ⁻¹ (x, k)\n[PROOFSTEP]\next\n[GOAL]\ncase h₁\nm : Type u_1\nn : Type u_2\ninst✝⁶ : DecidableEq n\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq m\ninst✝³ : Fintype m\nR : Type v\ninst✝² : CommRing R\no : Type u_3\ninst✝¹ : Fintype o\ninst✝ : DecidableEq o\nM : o → Matrix n n R\npreserving_snd : Finset (Perm (n × o)) := filter (fun σ => ∀ (x : n × o), (↑σ x).snd = x.snd) univ\nmem_preserving_snd : ∀ {σ : Perm (n × o)}, σ ∈ preserving_snd ↔ ∀ (x : n × o), (↑σ x).snd = x.snd\nσ : n × o ≃ n × o\nhσ : ∀ (x : n × o), (↑σ x).snd = x.snd\nhσ' : ∀ (x : n × o), (↑σ⁻¹ x).snd = x.snd\nmk_apply_eq : ∀ (k : o) (x : n), ((↑σ (x, k)).fst, k) = ↑σ (x, k)\nk : o\nx : n\n⊢ ((↑σ⁻¹ (↑σ (↑σ⁻¹ (x, k)))).fst, k).fst = (↑σ⁻¹ (x, k)).fst\n[PROOFSTEP]\nsimp only [apply_inv_self]\n[GOAL]\ncase h₂\nm : Type u_1\nn : Type u_2\ninst✝⁶ : DecidableEq n\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq m\ninst✝³ : Fintype m\nR : Type v\ninst✝² : CommRing R\no : Type u_3\ninst✝¹ : Fintype o\ninst✝ : DecidableEq o\nM : o → Matrix n n R\npreserving_snd : Finset (Perm (n × o)) := filter (fun σ => ∀ (x : n × o), (↑σ x).snd = x.snd) univ\nmem_preserving_snd : ∀ {σ : Perm (n × o)}, σ ∈ preserving_snd ↔ ∀ (x : n × o), (↑σ x).snd = x.snd\nσ : n × o ≃ n × o\nhσ : ∀ (x : n × o), (↑σ x).snd = x.snd\nhσ' : ∀ (x : n × o), (↑σ⁻¹ x).snd = x.snd\nmk_apply_eq : ∀ (k : o) (x : n), ((↑σ (x, k)).fst, k) = ↑σ (x, k)\nk : o\nx : n\n⊢ ((↑σ⁻¹ (↑σ (↑σ⁻¹ (x, k)))).fst, k).snd = (↑σ⁻¹ (x, k)).snd\n[PROOFSTEP]\nsimp only [hσ']\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁶ : DecidableEq n\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq m\ninst✝³ : Fintype m\nR : Type v\ninst✝² : CommRing R\no : Type u_3\ninst✝¹ : Fintype o\ninst✝ : DecidableEq o\nM : o → Matrix n n R\npreserving_snd : Finset (Perm (n × o)) := filter (fun σ => ∀ (x : n × o), (↑σ x).snd = x.snd) univ\nmem_preserving_snd : ∀ {σ : Perm (n × o)}, σ ∈ preserving_snd ↔ ∀ (x : n × o), (↑σ x).snd = x.snd\nσ : n × o ≃ n × o\nhσ : ∀ (x : n × o), (↑σ x).snd = x.snd\nhσ' : ∀ (x : n × o), (↑σ⁻¹ x).snd = x.snd\nmk_apply_eq : ∀ (k : o) (x : n), ((↑σ (x, k)).fst, k) = ↑σ (x, k)\nmk_inv_apply_eq : ∀ (k : o) (x : n), ((↑σ⁻¹ (x, k)).fst, k) = ↑σ⁻¹ (x, k)\n⊢ ∃ a ha, σ = (fun σ x => prodCongrLeft fun k => σ k (_ : k ∈ univ)) a ha\n[PROOFSTEP]\nrefine' ⟨fun k _ => ⟨fun x => (σ (x, k)).fst, fun x => (σ⁻¹ (x, k)).fst, _, _⟩, _, _⟩\n[GOAL]\ncase refine'_1\nm : Type u_1\nn : Type u_2\ninst✝⁶ : DecidableEq n\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq m\ninst✝³ : Fintype m\nR : Type v\ninst✝² : CommRing R\no : Type u_3\ninst✝¹ : Fintype o\ninst✝ : DecidableEq o\nM : o → Matrix n n R\npreserving_snd : Finset (Perm (n × o)) := filter (fun σ => ∀ (x : n × o), (↑σ x).snd = x.snd) univ\nmem_preserving_snd : ∀ {σ : Perm (n × o)}, σ ∈ preserving_snd ↔ ∀ (x : n × o), (↑σ x).snd = x.snd\nσ : n × o ≃ n × o\nhσ : ∀ (x : n × o), (↑σ x).snd = x.snd\nhσ' : ∀ (x : n × o), (↑σ⁻¹ x).snd = x.snd\nmk_apply_eq : ∀ (k : o) (x : n), ((↑σ (x, k)).fst, k) = ↑σ (x, k)\nmk_inv_apply_eq : ∀ (k : o) (x : n), ((↑σ⁻¹ (x, k)).fst, k) = ↑σ⁻¹ (x, k)\nk : o\nx✝ : k ∈ univ\n⊢ LeftInverse (fun x => (↑σ⁻¹ (x, k)).fst) fun x => (↑σ (x, k)).fst\n[PROOFSTEP]\nintro x\n[GOAL]\ncase refine'_1\nm : Type u_1\nn : Type u_2\ninst✝⁶ : DecidableEq n\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq m\ninst✝³ : Fintype m\nR : Type v\ninst✝² : CommRing R\no : Type u_3\ninst✝¹ : Fintype o\ninst✝ : DecidableEq o\nM : o → Matrix n n R\npreserving_snd : Finset (Perm (n × o)) := filter (fun σ => ∀ (x : n × o), (↑σ x).snd = x.snd) univ\nmem_preserving_snd : ∀ {σ : Perm (n × o)}, σ ∈ preserving_snd ↔ ∀ (x : n × o), (↑σ x).snd = x.snd\nσ : n × o ≃ n × o\nhσ : ∀ (x : n × o), (↑σ x).snd = x.snd\nhσ' : ∀ (x : n × o), (↑σ⁻¹ x).snd = x.snd\nmk_apply_eq : ∀ (k : o) (x : n), ((↑σ (x, k)).fst, k) = ↑σ (x, k)\nmk_inv_apply_eq : ∀ (k : o) (x : n), ((↑σ⁻¹ (x, k)).fst, k) = ↑σ⁻¹ (x, k)\nk : o\nx✝ : k ∈ univ\nx : n\n⊢ (fun x => (↑σ⁻¹ (x, k)).fst) ((fun x => (↑σ (x, k)).fst) x) = x\n[PROOFSTEP]\nsimp only [mk_apply_eq, inv_apply_self]\n[GOAL]\ncase refine'_2\nm : Type u_1\nn : Type u_2\ninst✝⁶ : DecidableEq n\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq m\ninst✝³ : Fintype m\nR : Type v\ninst✝² : CommRing R\no : Type u_3\ninst✝¹ : Fintype o\ninst✝ : DecidableEq o\nM : o → Matrix n n R\npreserving_snd : Finset (Perm (n × o)) := filter (fun σ => ∀ (x : n × o), (↑σ x).snd = x.snd) univ\nmem_preserving_snd : ∀ {σ : Perm (n × o)}, σ ∈ preserving_snd ↔ ∀ (x : n × o), (↑σ x).snd = x.snd\nσ : n × o ≃ n × o\nhσ : ∀ (x : n × o), (↑σ x).snd = x.snd\nhσ' : ∀ (x : n × o), (↑σ⁻¹ x).snd = x.snd\nmk_apply_eq : ∀ (k : o) (x : n), ((↑σ (x, k)).fst, k) = ↑σ (x, k)\nmk_inv_apply_eq : ∀ (k : o) (x : n), ((↑σ⁻¹ (x, k)).fst, k) = ↑σ⁻¹ (x, k)\nk : o\nx✝ : k ∈ univ\n⊢ Function.RightInverse (fun x => (↑σ⁻¹ (x, k)).fst) fun x => (↑σ (x, k)).fst\n[PROOFSTEP]\nintro x\n[GOAL]\ncase refine'_2\nm : Type u_1\nn : Type u_2\ninst✝⁶ : DecidableEq n\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq m\ninst✝³ : Fintype m\nR : Type v\ninst✝² : CommRing R\no : Type u_3\ninst✝¹ : Fintype o\ninst✝ : DecidableEq o\nM : o → Matrix n n R\npreserving_snd : Finset (Perm (n × o)) := filter (fun σ => ∀ (x : n × o), (↑σ x).snd = x.snd) univ\nmem_preserving_snd : ∀ {σ : Perm (n × o)}, σ ∈ preserving_snd ↔ ∀ (x : n × o), (↑σ x).snd = x.snd\nσ : n × o ≃ n × o\nhσ : ∀ (x : n × o), (↑σ x).snd = x.snd\nhσ' : ∀ (x : n × o), (↑σ⁻¹ x).snd = x.snd\nmk_apply_eq : ∀ (k : o) (x : n), ((↑σ (x, k)).fst, k) = ↑σ (x, k)\nmk_inv_apply_eq : ∀ (k : o) (x : n), ((↑σ⁻¹ (x, k)).fst, k) = ↑σ⁻¹ (x, k)\nk : o\nx✝ : k ∈ univ\nx : n\n⊢ (fun x => (↑σ (x, k)).fst) ((fun x => (↑σ⁻¹ (x, k)).fst) x) = x\n[PROOFSTEP]\nsimp only [mk_inv_apply_eq, apply_inv_self]\n[GOAL]\ncase refine'_3\nm : Type u_1\nn : Type u_2\ninst✝⁶ : DecidableEq n\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq m\ninst✝³ : Fintype m\nR : Type v\ninst✝² : CommRing R\no : Type u_3\ninst✝¹ : Fintype o\ninst✝ : DecidableEq o\nM : o → Matrix n n R\npreserving_snd : Finset (Perm (n × o)) := filter (fun σ => ∀ (x : n × o), (↑σ x).snd = x.snd) univ\nmem_preserving_snd : ∀ {σ : Perm (n × o)}, σ ∈ preserving_snd ↔ ∀ (x : n × o), (↑σ x).snd = x.snd\nσ : n × o ≃ n × o\nhσ : ∀ (x : n × o), (↑σ x).snd = x.snd\nhσ' : ∀ (x : n × o), (↑σ⁻¹ x).snd = x.snd\nmk_apply_eq : ∀ (k : o) (x : n), ((↑σ (x, k)).fst, k) = ↑σ (x, k)\nmk_inv_apply_eq : ∀ (k : o) (x : n), ((↑σ⁻¹ (x, k)).fst, k) = ↑σ⁻¹ (x, k)\n⊢ (fun k x =>\n      { toFun := fun x => (↑σ (x, k)).fst, invFun := fun x => (↑σ⁻¹ (x, k)).fst,\n        left_inv := (_ : ∀ (x : n), (↑σ⁻¹ ((↑σ (x, k)).fst, k)).fst = x),\n        right_inv := (_ : ∀ (x : n), (↑σ ((↑σ⁻¹ (x, k)).fst, k)).fst = x) }) ∈\n    univ\n[PROOFSTEP]\napply Finset.mem_univ\n[GOAL]\ncase refine'_4\nm : Type u_1\nn : Type u_2\ninst✝⁶ : DecidableEq n\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq m\ninst✝³ : Fintype m\nR : Type v\ninst✝² : CommRing R\no : Type u_3\ninst✝¹ : Fintype o\ninst✝ : DecidableEq o\nM : o → Matrix n n R\npreserving_snd : Finset (Perm (n × o)) := filter (fun σ => ∀ (x : n × o), (↑σ x).snd = x.snd) univ\nmem_preserving_snd : ∀ {σ : Perm (n × o)}, σ ∈ preserving_snd ↔ ∀ (x : n × o), (↑σ x).snd = x.snd\nσ : n × o ≃ n × o\nhσ : ∀ (x : n × o), (↑σ x).snd = x.snd\nhσ' : ∀ (x : n × o), (↑σ⁻¹ x).snd = x.snd\nmk_apply_eq : ∀ (k : o) (x : n), ((↑σ (x, k)).fst, k) = ↑σ (x, k)\nmk_inv_apply_eq : ∀ (k : o) (x : n), ((↑σ⁻¹ (x, k)).fst, k) = ↑σ⁻¹ (x, k)\n⊢ σ =\n    (fun σ x => prodCongrLeft fun k => σ k (_ : k ∈ univ))\n      (fun k x =>\n        { toFun := fun x => (↑σ (x, k)).fst, invFun := fun x => (↑σ⁻¹ (x, k)).fst,\n          left_inv := (_ : ∀ (x : n), (↑σ⁻¹ ((↑σ (x, k)).fst, k)).fst = x),\n          right_inv := (_ : ∀ (x : n), (↑σ ((↑σ⁻¹ (x, k)).fst, k)).fst = x) })\n      (_ :\n        (fun k x =>\n            { toFun := fun x => (↑σ (x, k)).fst, invFun := fun x => (↑σ⁻¹ (x, k)).fst,\n              left_inv := (_ : ∀ (x : n), (↑σ⁻¹ ((↑σ (x, k)).fst, k)).fst = x),\n              right_inv := (_ : ∀ (x : n), (↑σ ((↑σ⁻¹ (x, k)).fst, k)).fst = x) }) ∈\n          univ)\n[PROOFSTEP]\next ⟨k, x⟩\n[GOAL]\ncase refine'_4.H.mk.h₁\nm : Type u_1\nn : Type u_2\ninst✝⁶ : DecidableEq n\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq m\ninst✝³ : Fintype m\nR : Type v\ninst✝² : CommRing R\no : Type u_3\ninst✝¹ : Fintype o\ninst✝ : DecidableEq o\nM : o → Matrix n n R\npreserving_snd : Finset (Perm (n × o)) := filter (fun σ => ∀ (x : n × o), (↑σ x).snd = x.snd) univ\nmem_preserving_snd : ∀ {σ : Perm (n × o)}, σ ∈ preserving_snd ↔ ∀ (x : n × o), (↑σ x).snd = x.snd\nσ : n × o ≃ n × o\nhσ : ∀ (x : n × o), (↑σ x).snd = x.snd\nhσ' : ∀ (x : n × o), (↑σ⁻¹ x).snd = x.snd\nmk_apply_eq : ∀ (k : o) (x : n), ((↑σ (x, k)).fst, k) = ↑σ (x, k)\nmk_inv_apply_eq : ∀ (k : o) (x : n), ((↑σ⁻¹ (x, k)).fst, k) = ↑σ⁻¹ (x, k)\nk : n\nx : o\n⊢ (↑σ (k, x)).fst =\n    (↑((fun σ x => prodCongrLeft fun k => σ k (_ : k ∈ univ))\n            (fun k x =>\n              { toFun := fun x => (↑σ (x, k)).fst, invFun := fun x => (↑σ⁻¹ (x, k)).fst,\n                left_inv := (_ : ∀ (x : n), (↑σ⁻¹ ((↑σ (x, k)).fst, k)).fst = x),\n                right_inv := (_ : ∀ (x : n), (↑σ ((↑σ⁻¹ (x, k)).fst, k)).fst = x) })\n            (_ :\n              (fun k x =>\n                  { toFun := fun x => (↑σ (x, k)).fst, invFun := fun x => (↑σ⁻¹ (x, k)).fst,\n                    left_inv := (_ : ∀ (x : n), (↑σ⁻¹ ((↑σ (x, k)).fst, k)).fst = x),\n                    right_inv := (_ : ∀ (x : n), (↑σ ((↑σ⁻¹ (x, k)).fst, k)).fst = x) }) ∈\n                univ))\n        (k, x)).fst\n[PROOFSTEP]\nsimp only [coe_fn_mk, prodCongrLeft_apply]\n[GOAL]\ncase refine'_4.H.mk.h₂\nm : Type u_1\nn : Type u_2\ninst✝⁶ : DecidableEq n\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq m\ninst✝³ : Fintype m\nR : Type v\ninst✝² : CommRing R\no : Type u_3\ninst✝¹ : Fintype o\ninst✝ : DecidableEq o\nM : o → Matrix n n R\npreserving_snd : Finset (Perm (n × o)) := filter (fun σ => ∀ (x : n × o), (↑σ x).snd = x.snd) univ\nmem_preserving_snd : ∀ {σ : Perm (n × o)}, σ ∈ preserving_snd ↔ ∀ (x : n × o), (↑σ x).snd = x.snd\nσ : n × o ≃ n × o\nhσ : ∀ (x : n × o), (↑σ x).snd = x.snd\nhσ' : ∀ (x : n × o), (↑σ⁻¹ x).snd = x.snd\nmk_apply_eq : ∀ (k : o) (x : n), ((↑σ (x, k)).fst, k) = ↑σ (x, k)\nmk_inv_apply_eq : ∀ (k : o) (x : n), ((↑σ⁻¹ (x, k)).fst, k) = ↑σ⁻¹ (x, k)\nk : n\nx : o\n⊢ (↑σ (k, x)).snd =\n    (↑((fun σ x => prodCongrLeft fun k => σ k (_ : k ∈ univ))\n            (fun k x =>\n              { toFun := fun x => (↑σ (x, k)).fst, invFun := fun x => (↑σ⁻¹ (x, k)).fst,\n                left_inv := (_ : ∀ (x : n), (↑σ⁻¹ ((↑σ (x, k)).fst, k)).fst = x),\n                right_inv := (_ : ∀ (x : n), (↑σ ((↑σ⁻¹ (x, k)).fst, k)).fst = x) })\n            (_ :\n              (fun k x =>\n                  { toFun := fun x => (↑σ (x, k)).fst, invFun := fun x => (↑σ⁻¹ (x, k)).fst,\n                    left_inv := (_ : ∀ (x : n), (↑σ⁻¹ ((↑σ (x, k)).fst, k)).fst = x),\n                    right_inv := (_ : ∀ (x : n), (↑σ ((↑σ⁻¹ (x, k)).fst, k)).fst = x) }) ∈\n                univ))\n        (k, x)).snd\n[PROOFSTEP]\nsimp only [prodCongrLeft_apply, hσ]\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁶ : DecidableEq n\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq m\ninst✝³ : Fintype m\nR : Type v\ninst✝² : CommRing R\no : Type u_3\ninst✝¹ : Fintype o\ninst✝ : DecidableEq o\nM : o → Matrix n n R\npreserving_snd : Finset (Perm (n × o)) := filter (fun σ => ∀ (x : n × o), (↑σ x).snd = x.snd) univ\nmem_preserving_snd : ∀ {σ : Perm (n × o)}, σ ∈ preserving_snd ↔ ∀ (x : n × o), (↑σ x).snd = x.snd\n⊢ ∀ (x : Perm (n × o)), x ∈ univ → ¬x ∈ preserving_snd → ↑↑(↑sign x) * ∏ x_1 : n × o, blockDiagonal M (↑x x_1) x_1 = 0\n[PROOFSTEP]\nintro σ _ hσ\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁶ : DecidableEq n\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq m\ninst✝³ : Fintype m\nR : Type v\ninst✝² : CommRing R\no : Type u_3\ninst✝¹ : Fintype o\ninst✝ : DecidableEq o\nM : o → Matrix n n R\npreserving_snd : Finset (Perm (n × o)) := filter (fun σ => ∀ (x : n × o), (↑σ x).snd = x.snd) univ\nmem_preserving_snd : ∀ {σ : Perm (n × o)}, σ ∈ preserving_snd ↔ ∀ (x : n × o), (↑σ x).snd = x.snd\nσ : Perm (n × o)\na✝ : σ ∈ univ\nhσ : ¬σ ∈ preserving_snd\n⊢ ↑↑(↑sign σ) * ∏ x : n × o, blockDiagonal M (↑σ x) x = 0\n[PROOFSTEP]\nrw [mem_preserving_snd] at hσ \n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁶ : DecidableEq n\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq m\ninst✝³ : Fintype m\nR : Type v\ninst✝² : CommRing R\no : Type u_3\ninst✝¹ : Fintype o\ninst✝ : DecidableEq o\nM : o → Matrix n n R\npreserving_snd : Finset (Perm (n × o)) := filter (fun σ => ∀ (x : n × o), (↑σ x).snd = x.snd) univ\nmem_preserving_snd : ∀ {σ : Perm (n × o)}, σ ∈ preserving_snd ↔ ∀ (x : n × o), (↑σ x).snd = x.snd\nσ : Perm (n × o)\na✝ : σ ∈ univ\nhσ : ¬∀ (x : n × o), (↑σ x).snd = x.snd\n⊢ ↑↑(↑sign σ) * ∏ x : n × o, blockDiagonal M (↑σ x) x = 0\n[PROOFSTEP]\nobtain ⟨⟨k, x⟩, hkx⟩ := not_forall.mp hσ\n[GOAL]\ncase intro.mk\nm : Type u_1\nn : Type u_2\ninst✝⁶ : DecidableEq n\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq m\ninst✝³ : Fintype m\nR : Type v\ninst✝² : CommRing R\no : Type u_3\ninst✝¹ : Fintype o\ninst✝ : DecidableEq o\nM : o → Matrix n n R\npreserving_snd : Finset (Perm (n × o)) := filter (fun σ => ∀ (x : n × o), (↑σ x).snd = x.snd) univ\nmem_preserving_snd : ∀ {σ : Perm (n × o)}, σ ∈ preserving_snd ↔ ∀ (x : n × o), (↑σ x).snd = x.snd\nσ : Perm (n × o)\na✝ : σ ∈ univ\nhσ : ¬∀ (x : n × o), (↑σ x).snd = x.snd\nk : n\nx : o\nhkx : ¬(↑σ (k, x)).snd = (k, x).snd\n⊢ ↑↑(↑sign σ) * ∏ x : n × o, blockDiagonal M (↑σ x) x = 0\n[PROOFSTEP]\nrw [Finset.prod_eq_zero (Finset.mem_univ (k, x)), mul_zero]\n[GOAL]\ncase intro.mk\nm : Type u_1\nn : Type u_2\ninst✝⁶ : DecidableEq n\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq m\ninst✝³ : Fintype m\nR : Type v\ninst✝² : CommRing R\no : Type u_3\ninst✝¹ : Fintype o\ninst✝ : DecidableEq o\nM : o → Matrix n n R\npreserving_snd : Finset (Perm (n × o)) := filter (fun σ => ∀ (x : n × o), (↑σ x).snd = x.snd) univ\nmem_preserving_snd : ∀ {σ : Perm (n × o)}, σ ∈ preserving_snd ↔ ∀ (x : n × o), (↑σ x).snd = x.snd\nσ : Perm (n × o)\na✝ : σ ∈ univ\nhσ : ¬∀ (x : n × o), (↑σ x).snd = x.snd\nk : n\nx : o\nhkx : ¬(↑σ (k, x)).snd = (k, x).snd\n⊢ blockDiagonal M (↑σ (k, x)) (k, x) = 0\n[PROOFSTEP]\nrw [← @Prod.mk.eta _ _ (σ (k, x)), blockDiagonal_apply_ne]\n[GOAL]\ncase intro.mk.h\nm : Type u_1\nn : Type u_2\ninst✝⁶ : DecidableEq n\ninst✝⁵ : Fintype n\ninst✝⁴ : DecidableEq m\ninst✝³ : Fintype m\nR : Type v\ninst✝² : CommRing R\no : Type u_3\ninst✝¹ : Fintype o\ninst✝ : DecidableEq o\nM : o → Matrix n n R\npreserving_snd : Finset (Perm (n × o)) := filter (fun σ => ∀ (x : n × o), (↑σ x).snd = x.snd) univ\nmem_preserving_snd : ∀ {σ : Perm (n × o)}, σ ∈ preserving_snd ↔ ∀ (x : n × o), (↑σ x).snd = x.snd\nσ : Perm (n × o)\na✝ : σ ∈ univ\nhσ : ¬∀ (x : n × o), (↑σ x).snd = x.snd\nk : n\nx : o\nhkx : ¬(↑σ (k, x)).snd = (k, x).snd\n⊢ (↑σ (k, x)).snd ≠ x\n[PROOFSTEP]\nexact hkx\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nA : Matrix m m R\nB : Matrix m n R\nD : Matrix n n R\n⊢ det (fromBlocks A B 0 D) = det A * det D\n[PROOFSTEP]\nclassical\nsimp_rw [det_apply']\nconvert Eq.symm <| sum_subset (β := R) (subset_univ ((sumCongrHom m n).range : Set (Perm (Sum m n))).toFinset) ?_\nrw [sum_mul_sum]\nsimp_rw [univ_product_univ]\nrw [(sum_bij (fun (σ : Perm m × Perm n) _ => Equiv.sumCongr σ.fst σ.snd) _ _ _ _).symm]\n· intro σ₁₂ h\n  simp only\n  erw [Set.mem_toFinset, MonoidHom.mem_range]\n  use σ₁₂\n  simp only [sumCongrHom_apply]\n· simp only [forall_prop_of_true, Prod.forall, mem_univ]\n  intro σ₁ σ₂\n  rw [Fintype.prod_sum_type]\n  simp_rw [Equiv.sumCongr_apply, Sum.map_inr, Sum.map_inl, fromBlocks_apply₁₁, fromBlocks_apply₂₂]\n  rw [mul_mul_mul_comm]\n  congr\n  rw [sign_sumCongr, Units.val_mul, Int.cast_mul]\n· intro σ₁ σ₂ h₁ h₂\n  dsimp only\n  intro h\n  have h2 : ∀ x, Perm.sumCongr σ₁.fst σ₁.snd x = Perm.sumCongr σ₂.fst σ₂.snd x :=\n    by\n    intro x\n    exact congr_fun (congr_arg toFun h) x\n  simp only [Sum.map_inr, Sum.map_inl, Perm.sumCongr_apply, Sum.forall, Sum.inl.injEq, Sum.inr.injEq] at h2 \n  ext x\n  · exact h2.left x\n  · exact h2.right x\n· intro σ hσ\n  erw [Set.mem_toFinset, MonoidHom.mem_range] at hσ \n  obtain ⟨σ₁₂, hσ₁₂⟩ := hσ\n  use σ₁₂\n  rw [← hσ₁₂]\n  simp\n· rintro σ - hσn\n  have h1 : ¬∀ x, ∃ y, Sum.inl y = σ (Sum.inl x) :=\n    by\n    rw [Set.mem_toFinset] at hσn \n    simpa only [Set.MapsTo, Set.mem_range, forall_exists_index, forall_apply_eq_imp_iff'] using\n      mt mem_sumCongrHom_range_of_perm_mapsTo_inl hσn\n  obtain ⟨a, ha⟩ := not_forall.mp h1\n  cases' hx : σ (Sum.inl a) with a2 b\n  · have hn := (not_exists.mp ha) a2\n    exact absurd hx.symm hn\n  · rw [Finset.prod_eq_zero (Finset.mem_univ (Sum.inl a)), mul_zero]\n    rw [hx, fromBlocks_apply₂₁, zero_apply]\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nA : Matrix m m R\nB : Matrix m n R\nD : Matrix n n R\n⊢ det (fromBlocks A B 0 D) = det A * det D\n[PROOFSTEP]\nsimp_rw [det_apply']\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nA : Matrix m m R\nB : Matrix m n R\nD : Matrix n n R\n⊢ ∑ x : Perm (m ⊕ n), ↑↑(↑sign x) * ∏ x_1 : m ⊕ n, fromBlocks A B 0 D (↑x x_1) x_1 =\n    (∑ x : Perm m, ↑↑(↑sign x) * ∏ x_1 : m, A (↑x x_1) x_1) * ∑ x : Perm n, ↑↑(↑sign x) * ∏ x_1 : n, D (↑x x_1) x_1\n[PROOFSTEP]\nconvert Eq.symm <| sum_subset (β := R) (subset_univ ((sumCongrHom m n).range : Set (Perm (Sum m n))).toFinset) ?_\n[GOAL]\ncase h.e'_3\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nA : Matrix m m R\nB : Matrix m n R\nD : Matrix n n R\n⊢ (∑ x : Perm m, ↑↑(↑sign x) * ∏ x_1 : m, A (↑x x_1) x_1) * ∑ x : Perm n, ↑↑(↑sign x) * ∏ x_1 : n, D (↑x x_1) x_1 =\n    ∑ x in Set.toFinset ↑(MonoidHom.range (sumCongrHom m n)),\n      ↑↑(↑sign x) * ∏ x_1 : m ⊕ n, fromBlocks A B 0 D (↑x x_1) x_1\ncase convert_2\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nA : Matrix m m R\nB : Matrix m n R\nD : Matrix n n R\n⊢ ∀ (x : Perm (m ⊕ n)),\n    x ∈ univ →\n      ¬x ∈ Set.toFinset ↑(MonoidHom.range (sumCongrHom m n)) →\n        ↑↑(↑sign x) * ∏ x_1 : m ⊕ n, fromBlocks A B 0 D (↑x x_1) x_1 = 0\n[PROOFSTEP]\nrw [sum_mul_sum]\n[GOAL]\ncase h.e'_3\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nA : Matrix m m R\nB : Matrix m n R\nD : Matrix n n R\n⊢ ∑ p in univ ×ˢ univ, (↑↑(↑sign p.fst) * ∏ x : m, A (↑p.fst x) x) * (↑↑(↑sign p.snd) * ∏ x : n, D (↑p.snd x) x) =\n    ∑ x in Set.toFinset ↑(MonoidHom.range (sumCongrHom m n)),\n      ↑↑(↑sign x) * ∏ x_1 : m ⊕ n, fromBlocks A B 0 D (↑x x_1) x_1\ncase convert_2\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nA : Matrix m m R\nB : Matrix m n R\nD : Matrix n n R\n⊢ ∀ (x : Perm (m ⊕ n)),\n    x ∈ univ →\n      ¬x ∈ Set.toFinset ↑(MonoidHom.range (sumCongrHom m n)) →\n        ↑↑(↑sign x) * ∏ x_1 : m ⊕ n, fromBlocks A B 0 D (↑x x_1) x_1 = 0\n[PROOFSTEP]\nsimp_rw [univ_product_univ]\n[GOAL]\ncase h.e'_3\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nA : Matrix m m R\nB : Matrix m n R\nD : Matrix n n R\n⊢ ∑ p : Perm m × Perm n, (↑↑(↑sign p.fst) * ∏ x : m, A (↑p.fst x) x) * (↑↑(↑sign p.snd) * ∏ x : n, D (↑p.snd x) x) =\n    ∑ x in Set.toFinset ↑(MonoidHom.range (sumCongrHom m n)),\n      ↑↑(↑sign x) * ∏ x_1 : m ⊕ n, fromBlocks A B 0 D (↑x x_1) x_1\ncase convert_2\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nA : Matrix m m R\nB : Matrix m n R\nD : Matrix n n R\n⊢ ∀ (x : Perm (m ⊕ n)),\n    x ∈ univ →\n      ¬x ∈ Set.toFinset ↑(MonoidHom.range (sumCongrHom m n)) →\n        ↑↑(↑sign x) * ∏ x_1 : m ⊕ n, fromBlocks A B 0 D (↑x x_1) x_1 = 0\n[PROOFSTEP]\nrw [(sum_bij (fun (σ : Perm m × Perm n) _ => Equiv.sumCongr σ.fst σ.snd) _ _ _ _).symm]\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nA : Matrix m m R\nB : Matrix m n R\nD : Matrix n n R\n⊢ ∀ (a : Perm m × Perm n) (ha : a ∈ univ),\n    (fun σ x => Equiv.sumCongr σ.fst σ.snd) a ha ∈ Set.toFinset ↑(MonoidHom.range (sumCongrHom m n))\n[PROOFSTEP]\nintro σ₁₂ h\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nA : Matrix m m R\nB : Matrix m n R\nD : Matrix n n R\nσ₁₂ : Perm m × Perm n\nh : σ₁₂ ∈ univ\n⊢ (fun σ x => Equiv.sumCongr σ.fst σ.snd) σ₁₂ h ∈ Set.toFinset ↑(MonoidHom.range (sumCongrHom m n))\n[PROOFSTEP]\nsimp only\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nA : Matrix m m R\nB : Matrix m n R\nD : Matrix n n R\nσ₁₂ : Perm m × Perm n\nh : σ₁₂ ∈ univ\n⊢ Equiv.sumCongr σ₁₂.fst σ₁₂.snd ∈ Set.toFinset ↑(MonoidHom.range (sumCongrHom m n))\n[PROOFSTEP]\nerw [Set.mem_toFinset, MonoidHom.mem_range]\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nA : Matrix m m R\nB : Matrix m n R\nD : Matrix n n R\nσ₁₂ : Perm m × Perm n\nh : σ₁₂ ∈ univ\n⊢ ∃ x, ↑(sumCongrHom m n) x = Equiv.sumCongr σ₁₂.fst σ₁₂.snd\n[PROOFSTEP]\nuse σ₁₂\n[GOAL]\ncase h\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nA : Matrix m m R\nB : Matrix m n R\nD : Matrix n n R\nσ₁₂ : Perm m × Perm n\nh : σ₁₂ ∈ univ\n⊢ ↑(sumCongrHom m n) σ₁₂ = Equiv.sumCongr σ₁₂.fst σ₁₂.snd\n[PROOFSTEP]\nsimp only [sumCongrHom_apply]\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nA : Matrix m m R\nB : Matrix m n R\nD : Matrix n n R\n⊢ ∀ (a : Perm m × Perm n) (ha : a ∈ univ),\n    (↑↑(↑sign a.fst) * ∏ x : m, A (↑a.fst x) x) * (↑↑(↑sign a.snd) * ∏ x : n, D (↑a.snd x) x) =\n      ↑↑(↑sign ((fun σ x => Equiv.sumCongr σ.fst σ.snd) a ha)) *\n        ∏ x : m ⊕ n, fromBlocks A B 0 D (↑((fun σ x => Equiv.sumCongr σ.fst σ.snd) a ha) x) x\n[PROOFSTEP]\nsimp only [forall_prop_of_true, Prod.forall, mem_univ]\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nA : Matrix m m R\nB : Matrix m n R\nD : Matrix n n R\n⊢ ∀ (a : Perm m) (b : Perm n),\n    (↑↑(↑sign a) * ∏ x : m, A (↑a x) x) * (↑↑(↑sign b) * ∏ x : n, D (↑b x) x) =\n      ↑↑(↑sign (Equiv.sumCongr a b)) * ∏ x : m ⊕ n, fromBlocks A B 0 D (↑(Equiv.sumCongr a b) x) x\n[PROOFSTEP]\nintro σ₁ σ₂\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nA : Matrix m m R\nB : Matrix m n R\nD : Matrix n n R\nσ₁ : Perm m\nσ₂ : Perm n\n⊢ (↑↑(↑sign σ₁) * ∏ x : m, A (↑σ₁ x) x) * (↑↑(↑sign σ₂) * ∏ x : n, D (↑σ₂ x) x) =\n    ↑↑(↑sign (Equiv.sumCongr σ₁ σ₂)) * ∏ x : m ⊕ n, fromBlocks A B 0 D (↑(Equiv.sumCongr σ₁ σ₂) x) x\n[PROOFSTEP]\nrw [Fintype.prod_sum_type]\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nA : Matrix m m R\nB : Matrix m n R\nD : Matrix n n R\nσ₁ : Perm m\nσ₂ : Perm n\n⊢ (↑↑(↑sign σ₁) * ∏ x : m, A (↑σ₁ x) x) * (↑↑(↑sign σ₂) * ∏ x : n, D (↑σ₂ x) x) =\n    ↑↑(↑sign (Equiv.sumCongr σ₁ σ₂)) *\n      ((∏ a₁ : m, fromBlocks A B 0 D (↑(Equiv.sumCongr σ₁ σ₂) (Sum.inl a₁)) (Sum.inl a₁)) *\n        ∏ a₂ : n, fromBlocks A B 0 D (↑(Equiv.sumCongr σ₁ σ₂) (Sum.inr a₂)) (Sum.inr a₂))\n[PROOFSTEP]\nsimp_rw [Equiv.sumCongr_apply, Sum.map_inr, Sum.map_inl, fromBlocks_apply₁₁, fromBlocks_apply₂₂]\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nA : Matrix m m R\nB : Matrix m n R\nD : Matrix n n R\nσ₁ : Perm m\nσ₂ : Perm n\n⊢ (↑↑(↑sign σ₁) * ∏ x : m, A (↑σ₁ x) x) * (↑↑(↑sign σ₂) * ∏ x : n, D (↑σ₂ x) x) =\n    ↑↑(↑sign (Equiv.sumCongr σ₁ σ₂)) * ((∏ x : m, A (↑σ₁ x) x) * ∏ x : n, D (↑σ₂ x) x)\n[PROOFSTEP]\nrw [mul_mul_mul_comm]\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nA : Matrix m m R\nB : Matrix m n R\nD : Matrix n n R\nσ₁ : Perm m\nσ₂ : Perm n\n⊢ ↑↑(↑sign σ₁) * ↑↑(↑sign σ₂) * ((∏ x : m, A (↑σ₁ x) x) * ∏ x : n, D (↑σ₂ x) x) =\n    ↑↑(↑sign (Equiv.sumCongr σ₁ σ₂)) * ((∏ x : m, A (↑σ₁ x) x) * ∏ x : n, D (↑σ₂ x) x)\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_a\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nA : Matrix m m R\nB : Matrix m n R\nD : Matrix n n R\nσ₁ : Perm m\nσ₂ : Perm n\n⊢ ↑↑(↑sign σ₁) * ↑↑(↑sign σ₂) = ↑↑(↑sign (Equiv.sumCongr σ₁ σ₂))\n[PROOFSTEP]\nrw [sign_sumCongr, Units.val_mul, Int.cast_mul]\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nA : Matrix m m R\nB : Matrix m n R\nD : Matrix n n R\n⊢ ∀ (a₁ a₂ : Perm m × Perm n) (ha₁ : a₁ ∈ univ) (ha₂ : a₂ ∈ univ),\n    (fun σ x => Equiv.sumCongr σ.fst σ.snd) a₁ ha₁ = (fun σ x => Equiv.sumCongr σ.fst σ.snd) a₂ ha₂ → a₁ = a₂\n[PROOFSTEP]\nintro σ₁ σ₂ h₁ h₂\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nA : Matrix m m R\nB : Matrix m n R\nD : Matrix n n R\nσ₁ σ₂ : Perm m × Perm n\nh₁ : σ₁ ∈ univ\nh₂ : σ₂ ∈ univ\n⊢ (fun σ x => Equiv.sumCongr σ.fst σ.snd) σ₁ h₁ = (fun σ x => Equiv.sumCongr σ.fst σ.snd) σ₂ h₂ → σ₁ = σ₂\n[PROOFSTEP]\ndsimp only\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nA : Matrix m m R\nB : Matrix m n R\nD : Matrix n n R\nσ₁ σ₂ : Perm m × Perm n\nh₁ : σ₁ ∈ univ\nh₂ : σ₂ ∈ univ\n⊢ Equiv.sumCongr σ₁.fst σ₁.snd = Equiv.sumCongr σ₂.fst σ₂.snd → σ₁ = σ₂\n[PROOFSTEP]\nintro h\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nA : Matrix m m R\nB : Matrix m n R\nD : Matrix n n R\nσ₁ σ₂ : Perm m × Perm n\nh₁ : σ₁ ∈ univ\nh₂ : σ₂ ∈ univ\nh : Equiv.sumCongr σ₁.fst σ₁.snd = Equiv.sumCongr σ₂.fst σ₂.snd\n⊢ σ₁ = σ₂\n[PROOFSTEP]\nhave h2 : ∀ x, Perm.sumCongr σ₁.fst σ₁.snd x = Perm.sumCongr σ₂.fst σ₂.snd x :=\n  by\n  intro x\n  exact congr_fun (congr_arg toFun h) x\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nA : Matrix m m R\nB : Matrix m n R\nD : Matrix n n R\nσ₁ σ₂ : Perm m × Perm n\nh₁ : σ₁ ∈ univ\nh₂ : σ₂ ∈ univ\nh : Equiv.sumCongr σ₁.fst σ₁.snd = Equiv.sumCongr σ₂.fst σ₂.snd\n⊢ ∀ (x : m ⊕ n), ↑(Perm.sumCongr σ₁.fst σ₁.snd) x = ↑(Perm.sumCongr σ₂.fst σ₂.snd) x\n[PROOFSTEP]\nintro x\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nA : Matrix m m R\nB : Matrix m n R\nD : Matrix n n R\nσ₁ σ₂ : Perm m × Perm n\nh₁ : σ₁ ∈ univ\nh₂ : σ₂ ∈ univ\nh : Equiv.sumCongr σ₁.fst σ₁.snd = Equiv.sumCongr σ₂.fst σ₂.snd\nx : m ⊕ n\n⊢ ↑(Perm.sumCongr σ₁.fst σ₁.snd) x = ↑(Perm.sumCongr σ₂.fst σ₂.snd) x\n[PROOFSTEP]\nexact congr_fun (congr_arg toFun h) x\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nA : Matrix m m R\nB : Matrix m n R\nD : Matrix n n R\nσ₁ σ₂ : Perm m × Perm n\nh₁ : σ₁ ∈ univ\nh₂ : σ₂ ∈ univ\nh : Equiv.sumCongr σ₁.fst σ₁.snd = Equiv.sumCongr σ₂.fst σ₂.snd\nh2 : ∀ (x : m ⊕ n), ↑(Perm.sumCongr σ₁.fst σ₁.snd) x = ↑(Perm.sumCongr σ₂.fst σ₂.snd) x\n⊢ σ₁ = σ₂\n[PROOFSTEP]\nsimp only [Sum.map_inr, Sum.map_inl, Perm.sumCongr_apply, Sum.forall, Sum.inl.injEq, Sum.inr.injEq] at h2 \n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nA : Matrix m m R\nB : Matrix m n R\nD : Matrix n n R\nσ₁ σ₂ : Perm m × Perm n\nh₁ : σ₁ ∈ univ\nh₂ : σ₂ ∈ univ\nh : Equiv.sumCongr σ₁.fst σ₁.snd = Equiv.sumCongr σ₂.fst σ₂.snd\nh2 : (∀ (a : m), ↑σ₁.fst a = ↑σ₂.fst a) ∧ ∀ (b : n), ↑σ₁.snd b = ↑σ₂.snd b\n⊢ σ₁ = σ₂\n[PROOFSTEP]\next x\n[GOAL]\ncase h₁.H\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nA : Matrix m m R\nB : Matrix m n R\nD : Matrix n n R\nσ₁ σ₂ : Perm m × Perm n\nh₁ : σ₁ ∈ univ\nh₂ : σ₂ ∈ univ\nh : Equiv.sumCongr σ₁.fst σ₁.snd = Equiv.sumCongr σ₂.fst σ₂.snd\nh2 : (∀ (a : m), ↑σ₁.fst a = ↑σ₂.fst a) ∧ ∀ (b : n), ↑σ₁.snd b = ↑σ₂.snd b\nx : m\n⊢ ↑σ₁.fst x = ↑σ₂.fst x\n[PROOFSTEP]\nexact h2.left x\n[GOAL]\ncase h₂.H\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nA : Matrix m m R\nB : Matrix m n R\nD : Matrix n n R\nσ₁ σ₂ : Perm m × Perm n\nh₁ : σ₁ ∈ univ\nh₂ : σ₂ ∈ univ\nh : Equiv.sumCongr σ₁.fst σ₁.snd = Equiv.sumCongr σ₂.fst σ₂.snd\nh2 : (∀ (a : m), ↑σ₁.fst a = ↑σ₂.fst a) ∧ ∀ (b : n), ↑σ₁.snd b = ↑σ₂.snd b\nx : n\n⊢ ↑σ₁.snd x = ↑σ₂.snd x\n[PROOFSTEP]\nexact h2.right x\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nA : Matrix m m R\nB : Matrix m n R\nD : Matrix n n R\n⊢ ∀ (b : m ⊕ n ≃ m ⊕ n),\n    b ∈ Set.toFinset ↑(MonoidHom.range (sumCongrHom m n)) → ∃ a ha, b = (fun σ x => Equiv.sumCongr σ.fst σ.snd) a ha\n[PROOFSTEP]\nintro σ hσ\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nA : Matrix m m R\nB : Matrix m n R\nD : Matrix n n R\nσ : m ⊕ n ≃ m ⊕ n\nhσ : σ ∈ Set.toFinset ↑(MonoidHom.range (sumCongrHom m n))\n⊢ ∃ a ha, σ = (fun σ x => Equiv.sumCongr σ.fst σ.snd) a ha\n[PROOFSTEP]\nerw [Set.mem_toFinset, MonoidHom.mem_range] at hσ \n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nA : Matrix m m R\nB : Matrix m n R\nD : Matrix n n R\nσ : m ⊕ n ≃ m ⊕ n\nhσ : ∃ x, ↑(sumCongrHom m n) x = σ\n⊢ ∃ a ha, σ = (fun σ x => Equiv.sumCongr σ.fst σ.snd) a ha\n[PROOFSTEP]\nobtain ⟨σ₁₂, hσ₁₂⟩ := hσ\n[GOAL]\ncase intro\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nA : Matrix m m R\nB : Matrix m n R\nD : Matrix n n R\nσ : m ⊕ n ≃ m ⊕ n\nσ₁₂ : Perm m × Perm n\nhσ₁₂ : ↑(sumCongrHom m n) σ₁₂ = σ\n⊢ ∃ a ha, σ = (fun σ x => Equiv.sumCongr σ.fst σ.snd) a ha\n[PROOFSTEP]\nuse σ₁₂\n[GOAL]\ncase h\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nA : Matrix m m R\nB : Matrix m n R\nD : Matrix n n R\nσ : m ⊕ n ≃ m ⊕ n\nσ₁₂ : Perm m × Perm n\nhσ₁₂ : ↑(sumCongrHom m n) σ₁₂ = σ\n⊢ ∃ ha, σ = (fun σ x => Equiv.sumCongr σ.fst σ.snd) σ₁₂ ha\n[PROOFSTEP]\nrw [← hσ₁₂]\n[GOAL]\ncase h\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nA : Matrix m m R\nB : Matrix m n R\nD : Matrix n n R\nσ : m ⊕ n ≃ m ⊕ n\nσ₁₂ : Perm m × Perm n\nhσ₁₂ : ↑(sumCongrHom m n) σ₁₂ = σ\n⊢ ∃ ha, ↑(sumCongrHom m n) σ₁₂ = (fun σ x => Equiv.sumCongr σ.fst σ.snd) σ₁₂ ha\n[PROOFSTEP]\nsimp\n[GOAL]\ncase convert_2\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nA : Matrix m m R\nB : Matrix m n R\nD : Matrix n n R\n⊢ ∀ (x : Perm (m ⊕ n)),\n    x ∈ univ →\n      ¬x ∈ Set.toFinset ↑(MonoidHom.range (sumCongrHom m n)) →\n        ↑↑(↑sign x) * ∏ x_1 : m ⊕ n, fromBlocks A B 0 D (↑x x_1) x_1 = 0\n[PROOFSTEP]\nrintro σ - hσn\n[GOAL]\ncase convert_2\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nA : Matrix m m R\nB : Matrix m n R\nD : Matrix n n R\nσ : Perm (m ⊕ n)\nhσn : ¬σ ∈ Set.toFinset ↑(MonoidHom.range (sumCongrHom m n))\n⊢ ↑↑(↑sign σ) * ∏ x : m ⊕ n, fromBlocks A B 0 D (↑σ x) x = 0\n[PROOFSTEP]\nhave h1 : ¬∀ x, ∃ y, Sum.inl y = σ (Sum.inl x) :=\n  by\n  rw [Set.mem_toFinset] at hσn \n  simpa only [Set.MapsTo, Set.mem_range, forall_exists_index, forall_apply_eq_imp_iff'] using\n    mt mem_sumCongrHom_range_of_perm_mapsTo_inl hσn\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nA : Matrix m m R\nB : Matrix m n R\nD : Matrix n n R\nσ : Perm (m ⊕ n)\nhσn : ¬σ ∈ Set.toFinset ↑(MonoidHom.range (sumCongrHom m n))\n⊢ ¬∀ (x : m), ∃ y, Sum.inl y = ↑σ (Sum.inl x)\n[PROOFSTEP]\nrw [Set.mem_toFinset] at hσn \n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nA : Matrix m m R\nB : Matrix m n R\nD : Matrix n n R\nσ : Perm (m ⊕ n)\nhσn : ¬σ ∈ ↑(MonoidHom.range (sumCongrHom m n))\n⊢ ¬∀ (x : m), ∃ y, Sum.inl y = ↑σ (Sum.inl x)\n[PROOFSTEP]\nsimpa only [Set.MapsTo, Set.mem_range, forall_exists_index, forall_apply_eq_imp_iff'] using\n  mt mem_sumCongrHom_range_of_perm_mapsTo_inl hσn\n[GOAL]\ncase convert_2\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nA : Matrix m m R\nB : Matrix m n R\nD : Matrix n n R\nσ : Perm (m ⊕ n)\nhσn : ¬σ ∈ Set.toFinset ↑(MonoidHom.range (sumCongrHom m n))\nh1 : ¬∀ (x : m), ∃ y, Sum.inl y = ↑σ (Sum.inl x)\n⊢ ↑↑(↑sign σ) * ∏ x : m ⊕ n, fromBlocks A B 0 D (↑σ x) x = 0\n[PROOFSTEP]\nobtain ⟨a, ha⟩ := not_forall.mp h1\n[GOAL]\ncase convert_2.intro\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nA : Matrix m m R\nB : Matrix m n R\nD : Matrix n n R\nσ : Perm (m ⊕ n)\nhσn : ¬σ ∈ Set.toFinset ↑(MonoidHom.range (sumCongrHom m n))\nh1 : ¬∀ (x : m), ∃ y, Sum.inl y = ↑σ (Sum.inl x)\na : m\nha : ¬∃ y, Sum.inl y = ↑σ (Sum.inl a)\n⊢ ↑↑(↑sign σ) * ∏ x : m ⊕ n, fromBlocks A B 0 D (↑σ x) x = 0\n[PROOFSTEP]\ncases' hx : σ (Sum.inl a) with a2 b\n[GOAL]\ncase convert_2.intro.inl\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nA : Matrix m m R\nB : Matrix m n R\nD : Matrix n n R\nσ : Perm (m ⊕ n)\nhσn : ¬σ ∈ Set.toFinset ↑(MonoidHom.range (sumCongrHom m n))\nh1 : ¬∀ (x : m), ∃ y, Sum.inl y = ↑σ (Sum.inl x)\na : m\nha : ¬∃ y, Sum.inl y = ↑σ (Sum.inl a)\na2 : m\nhx : ↑σ (Sum.inl a) = Sum.inl a2\n⊢ ↑↑(↑sign σ) * ∏ x : m ⊕ n, fromBlocks A B 0 D (↑σ x) x = 0\n[PROOFSTEP]\nhave hn := (not_exists.mp ha) a2\n[GOAL]\ncase convert_2.intro.inl\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nA : Matrix m m R\nB : Matrix m n R\nD : Matrix n n R\nσ : Perm (m ⊕ n)\nhσn : ¬σ ∈ Set.toFinset ↑(MonoidHom.range (sumCongrHom m n))\nh1 : ¬∀ (x : m), ∃ y, Sum.inl y = ↑σ (Sum.inl x)\na : m\nha : ¬∃ y, Sum.inl y = ↑σ (Sum.inl a)\na2 : m\nhx : ↑σ (Sum.inl a) = Sum.inl a2\nhn : ¬Sum.inl a2 = ↑σ (Sum.inl a)\n⊢ ↑↑(↑sign σ) * ∏ x : m ⊕ n, fromBlocks A B 0 D (↑σ x) x = 0\n[PROOFSTEP]\nexact absurd hx.symm hn\n[GOAL]\ncase convert_2.intro.inr\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nA : Matrix m m R\nB : Matrix m n R\nD : Matrix n n R\nσ : Perm (m ⊕ n)\nhσn : ¬σ ∈ Set.toFinset ↑(MonoidHom.range (sumCongrHom m n))\nh1 : ¬∀ (x : m), ∃ y, Sum.inl y = ↑σ (Sum.inl x)\na : m\nha : ¬∃ y, Sum.inl y = ↑σ (Sum.inl a)\nb : n\nhx : ↑σ (Sum.inl a) = Sum.inr b\n⊢ ↑↑(↑sign σ) * ∏ x : m ⊕ n, fromBlocks A B 0 D (↑σ x) x = 0\n[PROOFSTEP]\nrw [Finset.prod_eq_zero (Finset.mem_univ (Sum.inl a)), mul_zero]\n[GOAL]\ncase convert_2.intro.inr\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nA : Matrix m m R\nB : Matrix m n R\nD : Matrix n n R\nσ : Perm (m ⊕ n)\nhσn : ¬σ ∈ Set.toFinset ↑(MonoidHom.range (sumCongrHom m n))\nh1 : ¬∀ (x : m), ∃ y, Sum.inl y = ↑σ (Sum.inl x)\na : m\nha : ¬∃ y, Sum.inl y = ↑σ (Sum.inl a)\nb : n\nhx : ↑σ (Sum.inl a) = Sum.inr b\n⊢ fromBlocks A B 0 D (↑σ (Sum.inl a)) (Sum.inl a) = 0\n[PROOFSTEP]\nrw [hx, fromBlocks_apply₂₁, zero_apply]\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nA : Matrix m m R\nC : Matrix n m R\nD : Matrix n n R\n⊢ det (fromBlocks A 0 C D) = det A * det D\n[PROOFSTEP]\nrw [← det_transpose, fromBlocks_transpose, transpose_zero, det_fromBlocks_zero₂₁, det_transpose, det_transpose]\n[GOAL]\nm : Type u_1\nn✝ : Type u_2\ninst✝⁴ : DecidableEq n✝\ninst✝³ : Fintype n✝\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nn : ℕ\nA : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R\n⊢ det A = ∑ i : Fin (Nat.succ n), (-1) ^ ↑i * A i 0 * det (submatrix A (Fin.succAbove i) Fin.succ)\n[PROOFSTEP]\nrw [Matrix.det_apply, Finset.univ_perm_fin_succ, ← Finset.univ_product_univ]\n[GOAL]\nm : Type u_1\nn✝ : Type u_2\ninst✝⁴ : DecidableEq n✝\ninst✝³ : Fintype n✝\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nn : ℕ\nA : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R\n⊢ ∑ σ in Finset.map (Equiv.toEmbedding decomposeFin.symm) (univ ×ˢ univ), ↑sign σ • ∏ i : Fin (Nat.succ n), A (↑σ i) i =\n    ∑ i : Fin (Nat.succ n), (-1) ^ ↑i * A i 0 * det (submatrix A (Fin.succAbove i) Fin.succ)\n[PROOFSTEP]\nsimp only [Finset.sum_map, Equiv.toEmbedding_apply, Finset.sum_product, Matrix.submatrix]\n[GOAL]\nm : Type u_1\nn✝ : Type u_2\ninst✝⁴ : DecidableEq n✝\ninst✝³ : Fintype n✝\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nn : ℕ\nA : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R\n⊢ ∑ x : Fin (Nat.succ n),\n      ∑ y : Perm (Fin n),\n        ↑sign (↑decomposeFin.symm (x, y)) • ∏ x_1 : Fin (Nat.succ n), A (↑(↑decomposeFin.symm (x, y)) x_1) x_1 =\n    ∑ x : Fin (Nat.succ n), (-1) ^ ↑x * A x 0 * det (↑of fun i j => A (Fin.succAbove x i) (Fin.succ j))\n[PROOFSTEP]\nrefine' Finset.sum_congr rfl fun i _ => Fin.cases _ (fun i => _) i\n[GOAL]\ncase refine'_1\nm : Type u_1\nn✝ : Type u_2\ninst✝⁴ : DecidableEq n✝\ninst✝³ : Fintype n✝\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nn : ℕ\nA : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R\ni : Fin (Nat.succ n)\nx✝ : i ∈ univ\n⊢ ∑ y : Perm (Fin n), ↑sign (↑decomposeFin.symm (0, y)) • ∏ x : Fin (Nat.succ n), A (↑(↑decomposeFin.symm (0, y)) x) x =\n    (-1) ^ ↑0 * A 0 0 * det (↑of fun i j => A (Fin.succAbove 0 i) (Fin.succ j))\n[PROOFSTEP]\nsimp only [Fin.prod_univ_succ, Matrix.det_apply, Finset.mul_sum, Equiv.Perm.decomposeFin_symm_apply_zero, Fin.val_zero,\n  one_mul, Equiv.Perm.decomposeFin.symm_sign, Equiv.swap_self, if_true, id.def, eq_self_iff_true,\n  Equiv.Perm.decomposeFin_symm_apply_succ, Fin.succAbove_zero, Equiv.coe_refl, pow_zero, mul_smul_comm, of_apply]\n  -- `univ_perm_fin_succ` gives a different embedding of `Perm (Fin n)` into\n    -- `Perm (Fin n.succ)` than the determinant of the submatrix we want,\n    -- permute `A` so that we get the correct one.\n[GOAL]\ncase refine'_2\nm : Type u_1\nn✝ : Type u_2\ninst✝⁴ : DecidableEq n✝\ninst✝³ : Fintype n✝\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nn : ℕ\nA : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R\ni✝ : Fin (Nat.succ n)\nx✝ : i✝ ∈ univ\ni : Fin n\n⊢ ∑ y : Perm (Fin n),\n      ↑sign (↑decomposeFin.symm (Fin.succ i, y)) •\n        ∏ x : Fin (Nat.succ n), A (↑(↑decomposeFin.symm (Fin.succ i, y)) x) x =\n    (-1) ^ ↑(Fin.succ i) * A (Fin.succ i) 0 * det (↑of fun i_1 j => A (Fin.succAbove (Fin.succ i) i_1) (Fin.succ j))\n[PROOFSTEP]\nhave : (-1 : R) ^ (i : ℕ) = (Perm.sign i.cycleRange) := by simp [Fin.sign_cycleRange]\n[GOAL]\nm : Type u_1\nn✝ : Type u_2\ninst✝⁴ : DecidableEq n✝\ninst✝³ : Fintype n✝\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nn : ℕ\nA : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R\ni✝ : Fin (Nat.succ n)\nx✝ : i✝ ∈ univ\ni : Fin n\n⊢ (-1) ^ ↑i = ↑↑(↑sign (Fin.cycleRange i))\n[PROOFSTEP]\nsimp [Fin.sign_cycleRange]\n[GOAL]\ncase refine'_2\nm : Type u_1\nn✝ : Type u_2\ninst✝⁴ : DecidableEq n✝\ninst✝³ : Fintype n✝\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nn : ℕ\nA : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R\ni✝ : Fin (Nat.succ n)\nx✝ : i✝ ∈ univ\ni : Fin n\nthis : (-1) ^ ↑i = ↑↑(↑sign (Fin.cycleRange i))\n⊢ ∑ y : Perm (Fin n),\n      ↑sign (↑decomposeFin.symm (Fin.succ i, y)) •\n        ∏ x : Fin (Nat.succ n), A (↑(↑decomposeFin.symm (Fin.succ i, y)) x) x =\n    (-1) ^ ↑(Fin.succ i) * A (Fin.succ i) 0 * det (↑of fun i_1 j => A (Fin.succAbove (Fin.succ i) i_1) (Fin.succ j))\n[PROOFSTEP]\nrw [Fin.val_succ, pow_succ, this, mul_assoc, mul_assoc, mul_left_comm (ε _), ← det_permute, Matrix.det_apply,\n  Finset.mul_sum, Finset.mul_sum]\n  -- now we just need to move the corresponding parts to the same place\n[GOAL]\ncase refine'_2\nm : Type u_1\nn✝ : Type u_2\ninst✝⁴ : DecidableEq n✝\ninst✝³ : Fintype n✝\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nn : ℕ\nA : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R\ni✝ : Fin (Nat.succ n)\nx✝ : i✝ ∈ univ\ni : Fin n\nthis : (-1) ^ ↑i = ↑↑(↑sign (Fin.cycleRange i))\n⊢ ∑ y : Perm (Fin n),\n      ↑sign (↑decomposeFin.symm (Fin.succ i, y)) •\n        ∏ x : Fin (Nat.succ n), A (↑(↑decomposeFin.symm (Fin.succ i, y)) x) x =\n    ∑ x : Perm (Fin n),\n      -1 *\n        (A (Fin.succ i) 0 *\n          ↑sign x •\n            ∏ i_1 : Fin n,\n              ↑of (fun i_2 j => A (Fin.succAbove (Fin.succ i) i_2) (Fin.succ j)) (↑(Fin.cycleRange i) (↑x i_1)) i_1)\n[PROOFSTEP]\nrefine' Finset.sum_congr rfl fun σ _ => _\n[GOAL]\ncase refine'_2\nm : Type u_1\nn✝ : Type u_2\ninst✝⁴ : DecidableEq n✝\ninst✝³ : Fintype n✝\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nn : ℕ\nA : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R\ni✝ : Fin (Nat.succ n)\nx✝¹ : i✝ ∈ univ\ni : Fin n\nthis : (-1) ^ ↑i = ↑↑(↑sign (Fin.cycleRange i))\nσ : Perm (Fin n)\nx✝ : σ ∈ univ\n⊢ ↑sign (↑decomposeFin.symm (Fin.succ i, σ)) • ∏ x : Fin (Nat.succ n), A (↑(↑decomposeFin.symm (Fin.succ i, σ)) x) x =\n    -1 *\n      (A (Fin.succ i) 0 *\n        ↑sign σ •\n          ∏ i_1 : Fin n,\n            ↑of (fun i_2 j => A (Fin.succAbove (Fin.succ i) i_2) (Fin.succ j)) (↑(Fin.cycleRange i) (↑σ i_1)) i_1)\n[PROOFSTEP]\nrw [Equiv.Perm.decomposeFin.symm_sign, if_neg (Fin.succ_ne_zero i)]\n[GOAL]\ncase refine'_2\nm : Type u_1\nn✝ : Type u_2\ninst✝⁴ : DecidableEq n✝\ninst✝³ : Fintype n✝\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nn : ℕ\nA : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R\ni✝ : Fin (Nat.succ n)\nx✝¹ : i✝ ∈ univ\ni : Fin n\nthis : (-1) ^ ↑i = ↑↑(↑sign (Fin.cycleRange i))\nσ : Perm (Fin n)\nx✝ : σ ∈ univ\n⊢ (-1 * ↑sign σ) • ∏ x : Fin (Nat.succ n), A (↑(↑decomposeFin.symm (Fin.succ i, σ)) x) x =\n    -1 *\n      (A (Fin.succ i) 0 *\n        ↑sign σ •\n          ∏ i_1 : Fin n,\n            ↑of (fun i_2 j => A (Fin.succAbove (Fin.succ i) i_2) (Fin.succ j)) (↑(Fin.cycleRange i) (↑σ i_1)) i_1)\n[PROOFSTEP]\ncalc\n  ((-1 * Perm.sign σ : ℤ) • ∏ i', A (Perm.decomposeFin.symm (Fin.succ i, σ) i') i') =\n      (-1 * Perm.sign σ : ℤ) •\n        (A (Fin.succ i) 0 * ∏ i', A ((Fin.succ i).succAbove (Fin.cycleRange i (σ i'))) i'.succ) :=\n    by\n    simp only [Fin.prod_univ_succ, Fin.succAbove_cycleRange, Equiv.Perm.decomposeFin_symm_apply_zero,\n      Equiv.Perm.decomposeFin_symm_apply_succ]\n  _ =\n      -1 *\n        (A (Fin.succ i) 0 * (Perm.sign σ : ℤ) • ∏ i', A ((Fin.succ i).succAbove (Fin.cycleRange i (σ i'))) i'.succ) :=\n    by\n    simp [mul_assoc, mul_comm, _root_.neg_mul, one_mul, zsmul_eq_mul, neg_inj, neg_smul, Fin.succAbove_cycleRange,\n      mul_left_comm]\n[GOAL]\nm : Type u_1\nn✝ : Type u_2\ninst✝⁴ : DecidableEq n✝\ninst✝³ : Fintype n✝\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nn : ℕ\nA : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R\ni✝ : Fin (Nat.succ n)\nx✝¹ : i✝ ∈ univ\ni : Fin n\nthis : (-1) ^ ↑i = ↑↑(↑sign (Fin.cycleRange i))\nσ : Perm (Fin n)\nx✝ : σ ∈ univ\n⊢ (-1 * ↑(↑sign σ)) • ∏ i' : Fin (Nat.succ n), A (↑(↑decomposeFin.symm (Fin.succ i, σ)) i') i' =\n    (-1 * ↑(↑sign σ)) •\n      (A (Fin.succ i) 0 * ∏ i' : Fin n, A (Fin.succAbove (Fin.succ i) (↑(Fin.cycleRange i) (↑σ i'))) (Fin.succ i'))\n[PROOFSTEP]\nsimp only [Fin.prod_univ_succ, Fin.succAbove_cycleRange, Equiv.Perm.decomposeFin_symm_apply_zero,\n  Equiv.Perm.decomposeFin_symm_apply_succ]\n[GOAL]\nm : Type u_1\nn✝ : Type u_2\ninst✝⁴ : DecidableEq n✝\ninst✝³ : Fintype n✝\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nn : ℕ\nA : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R\ni✝ : Fin (Nat.succ n)\nx✝¹ : i✝ ∈ univ\ni : Fin n\nthis : (-1) ^ ↑i = ↑↑(↑sign (Fin.cycleRange i))\nσ : Perm (Fin n)\nx✝ : σ ∈ univ\n⊢ (-1 * ↑(↑sign σ)) •\n      (A (Fin.succ i) 0 * ∏ i' : Fin n, A (Fin.succAbove (Fin.succ i) (↑(Fin.cycleRange i) (↑σ i'))) (Fin.succ i')) =\n    -1 *\n      (A (Fin.succ i) 0 *\n        ↑(↑sign σ) • ∏ i' : Fin n, A (Fin.succAbove (Fin.succ i) (↑(Fin.cycleRange i) (↑σ i'))) (Fin.succ i'))\n[PROOFSTEP]\nsimp [mul_assoc, mul_comm, _root_.neg_mul, one_mul, zsmul_eq_mul, neg_inj, neg_smul, Fin.succAbove_cycleRange,\n  mul_left_comm]\n[GOAL]\nm : Type u_1\nn✝ : Type u_2\ninst✝⁴ : DecidableEq n✝\ninst✝³ : Fintype n✝\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nn : ℕ\nA : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R\n⊢ det A = ∑ j : Fin (Nat.succ n), (-1) ^ ↑j * A 0 j * det (submatrix A Fin.succ (Fin.succAbove j))\n[PROOFSTEP]\nrw [← det_transpose A, det_succ_column_zero]\n[GOAL]\nm : Type u_1\nn✝ : Type u_2\ninst✝⁴ : DecidableEq n✝\ninst✝³ : Fintype n✝\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nn : ℕ\nA : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R\n⊢ ∑ i : Fin (Nat.succ n), (-1) ^ ↑i * Aᵀ i 0 * det (submatrix Aᵀ (Fin.succAbove i) Fin.succ) =\n    ∑ j : Fin (Nat.succ n), (-1) ^ ↑j * A 0 j * det (submatrix A Fin.succ (Fin.succAbove j))\n[PROOFSTEP]\nrefine' Finset.sum_congr rfl fun i _ => _\n[GOAL]\nm : Type u_1\nn✝ : Type u_2\ninst✝⁴ : DecidableEq n✝\ninst✝³ : Fintype n✝\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nn : ℕ\nA : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R\ni : Fin (Nat.succ n)\nx✝ : i ∈ univ\n⊢ (-1) ^ ↑i * Aᵀ i 0 * det (submatrix Aᵀ (Fin.succAbove i) Fin.succ) =\n    (-1) ^ ↑i * A 0 i * det (submatrix A Fin.succ (Fin.succAbove i))\n[PROOFSTEP]\nrw [← det_transpose]\n[GOAL]\nm : Type u_1\nn✝ : Type u_2\ninst✝⁴ : DecidableEq n✝\ninst✝³ : Fintype n✝\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nn : ℕ\nA : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R\ni : Fin (Nat.succ n)\nx✝ : i ∈ univ\n⊢ (-1) ^ ↑i * Aᵀ i 0 * det (submatrix Aᵀ (Fin.succAbove i) Fin.succ)ᵀ =\n    (-1) ^ ↑i * A 0 i * det (submatrix A Fin.succ (Fin.succAbove i))\n[PROOFSTEP]\nsimp only [transpose_apply, transpose_submatrix, transpose_transpose]\n[GOAL]\nm : Type u_1\nn✝ : Type u_2\ninst✝⁴ : DecidableEq n✝\ninst✝³ : Fintype n✝\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nn : ℕ\nA : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R\ni : Fin (Nat.succ n)\n⊢ det A = ∑ j : Fin (Nat.succ n), (-1) ^ (↑i + ↑j) * A i j * det (submatrix A (Fin.succAbove i) (Fin.succAbove j))\n[PROOFSTEP]\nsimp_rw [pow_add, mul_assoc, ← mul_sum]\n[GOAL]\nm : Type u_1\nn✝ : Type u_2\ninst✝⁴ : DecidableEq n✝\ninst✝³ : Fintype n✝\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nn : ℕ\nA : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R\ni : Fin (Nat.succ n)\n⊢ det A =\n    (-1) ^ ↑i * ∑ x : Fin (Nat.succ n), (-1) ^ ↑x * (A i x * det (submatrix A (Fin.succAbove i) (Fin.succAbove x)))\n[PROOFSTEP]\nhave : det A = (-1 : R) ^ (i : ℕ) * (Perm.sign i.cycleRange⁻¹) * det A := by\n  calc\n    det A = ↑((-1 : ℤˣ) ^ (i : ℕ) * (-1 : ℤˣ) ^ (i : ℕ) : ℤˣ) * det A := by simp\n    _ = (-1 : R) ^ (i : ℕ) * (Perm.sign i.cycleRange⁻¹) * det A := by simp [-Int.units_mul_self]\n[GOAL]\nm : Type u_1\nn✝ : Type u_2\ninst✝⁴ : DecidableEq n✝\ninst✝³ : Fintype n✝\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nn : ℕ\nA : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R\ni : Fin (Nat.succ n)\n⊢ det A = (-1) ^ ↑i * ↑↑(↑sign (Fin.cycleRange i)⁻¹) * det A\n[PROOFSTEP]\ncalc\n  det A = ↑((-1 : ℤˣ) ^ (i : ℕ) * (-1 : ℤˣ) ^ (i : ℕ) : ℤˣ) * det A := by simp\n  _ = (-1 : R) ^ (i : ℕ) * (Perm.sign i.cycleRange⁻¹) * det A := by simp [-Int.units_mul_self]\n[GOAL]\nm : Type u_1\nn✝ : Type u_2\ninst✝⁴ : DecidableEq n✝\ninst✝³ : Fintype n✝\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nn : ℕ\nA : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R\ni : Fin (Nat.succ n)\n⊢ det A = ↑↑((-1) ^ ↑i * (-1) ^ ↑i) * det A\n[PROOFSTEP]\nsimp\n[GOAL]\nm : Type u_1\nn✝ : Type u_2\ninst✝⁴ : DecidableEq n✝\ninst✝³ : Fintype n✝\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nn : ℕ\nA : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R\ni : Fin (Nat.succ n)\n⊢ ↑↑((-1) ^ ↑i * (-1) ^ ↑i) * det A = (-1) ^ ↑i * ↑↑(↑sign (Fin.cycleRange i)⁻¹) * det A\n[PROOFSTEP]\nsimp [-Int.units_mul_self]\n[GOAL]\nm : Type u_1\nn✝ : Type u_2\ninst✝⁴ : DecidableEq n✝\ninst✝³ : Fintype n✝\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nn : ℕ\nA : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R\ni : Fin (Nat.succ n)\nthis : det A = (-1) ^ ↑i * ↑↑(↑sign (Fin.cycleRange i)⁻¹) * det A\n⊢ det A =\n    (-1) ^ ↑i * ∑ x : Fin (Nat.succ n), (-1) ^ ↑x * (A i x * det (submatrix A (Fin.succAbove i) (Fin.succAbove x)))\n[PROOFSTEP]\nrw [this, mul_assoc]\n[GOAL]\nm : Type u_1\nn✝ : Type u_2\ninst✝⁴ : DecidableEq n✝\ninst✝³ : Fintype n✝\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nn : ℕ\nA : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R\ni : Fin (Nat.succ n)\nthis : det A = (-1) ^ ↑i * ↑↑(↑sign (Fin.cycleRange i)⁻¹) * det A\n⊢ (-1) ^ ↑i * (↑↑(↑sign (Fin.cycleRange i)⁻¹) * det A) =\n    (-1) ^ ↑i * ∑ x : Fin (Nat.succ n), (-1) ^ ↑x * (A i x * det (submatrix A (Fin.succAbove i) (Fin.succAbove x)))\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_a\nm : Type u_1\nn✝ : Type u_2\ninst✝⁴ : DecidableEq n✝\ninst✝³ : Fintype n✝\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nn : ℕ\nA : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R\ni : Fin (Nat.succ n)\nthis : det A = (-1) ^ ↑i * ↑↑(↑sign (Fin.cycleRange i)⁻¹) * det A\n⊢ ↑↑(↑sign (Fin.cycleRange i)⁻¹) * det A =\n    ∑ x : Fin (Nat.succ n), (-1) ^ ↑x * (A i x * det (submatrix A (Fin.succAbove i) (Fin.succAbove x)))\n[PROOFSTEP]\nrw [← det_permute, det_succ_row_zero]\n[GOAL]\ncase e_a\nm : Type u_1\nn✝ : Type u_2\ninst✝⁴ : DecidableEq n✝\ninst✝³ : Fintype n✝\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nn : ℕ\nA : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R\ni : Fin (Nat.succ n)\nthis : det A = (-1) ^ ↑i * ↑↑(↑sign (Fin.cycleRange i)⁻¹) * det A\n⊢ ∑ j : Fin (Nat.succ n),\n      (-1) ^ ↑j * A (↑(Fin.cycleRange i)⁻¹ 0) j *\n        det (submatrix (fun i_1 => A (↑(Fin.cycleRange i)⁻¹ i_1)) Fin.succ (Fin.succAbove j)) =\n    ∑ x : Fin (Nat.succ n), (-1) ^ ↑x * (A i x * det (submatrix A (Fin.succAbove i) (Fin.succAbove x)))\n[PROOFSTEP]\nrefine' Finset.sum_congr rfl fun j _ => _\n[GOAL]\ncase e_a\nm : Type u_1\nn✝ : Type u_2\ninst✝⁴ : DecidableEq n✝\ninst✝³ : Fintype n✝\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nn : ℕ\nA : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R\ni : Fin (Nat.succ n)\nthis : det A = (-1) ^ ↑i * ↑↑(↑sign (Fin.cycleRange i)⁻¹) * det A\nj : Fin (Nat.succ n)\nx✝ : j ∈ univ\n⊢ (-1) ^ ↑j * A (↑(Fin.cycleRange i)⁻¹ 0) j *\n      det (submatrix (fun i_1 => A (↑(Fin.cycleRange i)⁻¹ i_1)) Fin.succ (Fin.succAbove j)) =\n    (-1) ^ ↑j * (A i j * det (submatrix A (Fin.succAbove i) (Fin.succAbove j)))\n[PROOFSTEP]\nrw [mul_assoc, Matrix.submatrix, Matrix.submatrix]\n[GOAL]\ncase e_a\nm : Type u_1\nn✝ : Type u_2\ninst✝⁴ : DecidableEq n✝\ninst✝³ : Fintype n✝\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nn : ℕ\nA : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R\ni : Fin (Nat.succ n)\nthis : det A = (-1) ^ ↑i * ↑↑(↑sign (Fin.cycleRange i)⁻¹) * det A\nj : Fin (Nat.succ n)\nx✝ : j ∈ univ\n⊢ (-1) ^ ↑j *\n      (A (↑(Fin.cycleRange i)⁻¹ 0) j *\n        det (↑of fun i_1 j_1 => A (↑(Fin.cycleRange i)⁻¹ (Fin.succ i_1)) (Fin.succAbove j j_1))) =\n    (-1) ^ ↑j * (A i j * det (↑of fun i_1 j_1 => A (Fin.succAbove i i_1) (Fin.succAbove j j_1)))\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_a.e_a.e_a.e_a\nm : Type u_1\nn✝ : Type u_2\ninst✝⁴ : DecidableEq n✝\ninst✝³ : Fintype n✝\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nn : ℕ\nA : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R\ni : Fin (Nat.succ n)\nthis : det A = (-1) ^ ↑i * ↑↑(↑sign (Fin.cycleRange i)⁻¹) * det A\nj : Fin (Nat.succ n)\nx✝ : j ∈ univ\n⊢ ↑(Fin.cycleRange i)⁻¹ 0 = i\n[PROOFSTEP]\nrw [Equiv.Perm.inv_def, Fin.cycleRange_symm_zero]\n[GOAL]\ncase e_a.e_a.e_a.e_M.h.e_6.h\nm : Type u_1\nn✝ : Type u_2\ninst✝⁴ : DecidableEq n✝\ninst✝³ : Fintype n✝\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nn : ℕ\nA : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R\ni : Fin (Nat.succ n)\nthis : det A = (-1) ^ ↑i * ↑↑(↑sign (Fin.cycleRange i)⁻¹) * det A\nj : Fin (Nat.succ n)\nx✝ : j ∈ univ\n⊢ (fun i_1 j_1 => A (↑(Fin.cycleRange i)⁻¹ (Fin.succ i_1)) (Fin.succAbove j j_1)) = fun i_1 j_1 =>\n    A (Fin.succAbove i i_1) (Fin.succAbove j j_1)\n[PROOFSTEP]\next i' j'\n[GOAL]\ncase e_a.e_a.e_a.e_M.h.e_6.h.h.h\nm : Type u_1\nn✝ : Type u_2\ninst✝⁴ : DecidableEq n✝\ninst✝³ : Fintype n✝\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nn : ℕ\nA : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R\ni : Fin (Nat.succ n)\nthis : det A = (-1) ^ ↑i * ↑↑(↑sign (Fin.cycleRange i)⁻¹) * det A\nj : Fin (Nat.succ n)\nx✝ : j ∈ univ\ni' j' : Fin n\n⊢ A (↑(Fin.cycleRange i)⁻¹ (Fin.succ i')) (Fin.succAbove j j') = A (Fin.succAbove i i') (Fin.succAbove j j')\n[PROOFSTEP]\nrw [Equiv.Perm.inv_def, Fin.cycleRange_symm_succ]\n[GOAL]\nm : Type u_1\nn✝ : Type u_2\ninst✝⁴ : DecidableEq n✝\ninst✝³ : Fintype n✝\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nn : ℕ\nA : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R\nj : Fin (Nat.succ n)\n⊢ det A = ∑ i : Fin (Nat.succ n), (-1) ^ (↑i + ↑j) * A i j * det (submatrix A (Fin.succAbove i) (Fin.succAbove j))\n[PROOFSTEP]\nrw [← det_transpose, det_succ_row _ j]\n[GOAL]\nm : Type u_1\nn✝ : Type u_2\ninst✝⁴ : DecidableEq n✝\ninst✝³ : Fintype n✝\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nn : ℕ\nA : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R\nj : Fin (Nat.succ n)\n⊢ ∑ j_1 : Fin (Nat.succ n), (-1) ^ (↑j + ↑j_1) * Aᵀ j j_1 * det (submatrix Aᵀ (Fin.succAbove j) (Fin.succAbove j_1)) =\n    ∑ i : Fin (Nat.succ n), (-1) ^ (↑i + ↑j) * A i j * det (submatrix A (Fin.succAbove i) (Fin.succAbove j))\n[PROOFSTEP]\nrefine' Finset.sum_congr rfl fun i _ => _\n[GOAL]\nm : Type u_1\nn✝ : Type u_2\ninst✝⁴ : DecidableEq n✝\ninst✝³ : Fintype n✝\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nn : ℕ\nA : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) R\nj i : Fin (Nat.succ n)\nx✝ : i ∈ univ\n⊢ (-1) ^ (↑j + ↑i) * Aᵀ j i * det (submatrix Aᵀ (Fin.succAbove j) (Fin.succAbove i)) =\n    (-1) ^ (↑i + ↑j) * A i j * det (submatrix A (Fin.succAbove i) (Fin.succAbove j))\n[PROOFSTEP]\nrw [add_comm, ← det_transpose, transpose_apply, transpose_submatrix, transpose_transpose]\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nA : Matrix (Fin 2) (Fin 2) R\n⊢ det A = A 0 0 * A 1 1 - A 0 1 * A 1 0\n[PROOFSTEP]\nsimp [Matrix.det_succ_row_zero, Fin.sum_univ_succ]\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nA : Matrix (Fin 2) (Fin 2) R\n⊢ A 0 0 * A 1 1 + -(A 0 1 * A 1 0) = A 0 0 * A 1 1 - A 0 1 * A 1 0\n[PROOFSTEP]\nring\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nA : Matrix (Fin 3) (Fin 3) R\n⊢ det A =\n    A 0 0 * A 1 1 * A 2 2 - A 0 0 * A 1 2 * A 2 1 - A 0 1 * A 1 0 * A 2 2 + A 0 1 * A 1 2 * A 2 0 +\n        A 0 2 * A 1 0 * A 2 1 -\n      A 0 2 * A 1 1 * A 2 0\n[PROOFSTEP]\nsimp [Matrix.det_succ_row_zero, Fin.sum_univ_succ]\n[GOAL]\nm : Type u_1\nn : Type u_2\ninst✝⁴ : DecidableEq n\ninst✝³ : Fintype n\ninst✝² : DecidableEq m\ninst✝¹ : Fintype m\nR : Type v\ninst✝ : CommRing R\nA : Matrix (Fin 3) (Fin 3) R\n⊢ A 0 0 * (A 1 1 * A 2 2 + -(A 1 2 * A 2 1)) +\n      (-(A 0 1 * (A 1 0 * A 2 2 + -(A 1 2 * A 2 0))) + A 0 2 * (A 1 0 * A 2 1 + -(A 1 1 * A 2 0))) =\n    A 0 0 * A 1 1 * A 2 2 - A 0 0 * A 1 2 * A 2 1 - A 0 1 * A 1 0 * A 2 2 + A 0 1 * A 1 2 * A 2 0 +\n        A 0 2 * A 1 0 * A 2 1 -\n      A 0 2 * A 1 1 * A 2 0\n[PROOFSTEP]\nring\n", "meta": {"mathlib_filename": "Mathlib.LinearAlgebra.Matrix.Determinant", "llama_tokens": 90256, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7956580952177051, "lm_q2_score": 0.6334102636778401, "lm_q1q2_score": 0.5039780038892546}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\nn n' m : ℕ\ns✝ : Sym α n\na✝ b a : α\ns : Sym α n\n⊢ ↑Multiset.card (a ::ₘ ↑s) = Nat.succ n\n[PROOFSTEP]\nrw [Multiset.card_cons, s.2]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nn n' m : ℕ\ns : Sym α n\na✝ b a : α\nv : Vector α n\n⊢ ofVector (a ::ᵥ v) = a ::ₛ ofVector v\n[PROOFSTEP]\ncases v\n[GOAL]\ncase mk\nα : Type u_1\nβ : Type u_2\nn n' m : ℕ\ns : Sym α n\na✝ b a : α\nval✝ : List α\nproperty✝ : List.length val✝ = n\n⊢ ofVector (a ::ᵥ { val := val✝, property := property✝ }) = a ::ₛ ofVector { val := val✝, property := property✝ }\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nn n' m : ℕ\ns : Sym α n\na✝ b a : α\nv : Vector α n\n⊢ ↑(a ::ₛ ofVector v) = ↑(ofVector (a ::ᵥ v))\n[PROOFSTEP]\ncases v\n[GOAL]\ncase mk\nα : Type u_1\nβ : Type u_2\nn n' m : ℕ\ns : Sym α n\na✝ b a : α\nval✝ : List α\nproperty✝ : List.length val✝ = n\n⊢ ↑(a ::ₛ ofVector { val := val✝, property := property✝ }) = ↑(ofVector (a ::ᵥ { val := val✝, property := property✝ }))\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nn n' m✝ : ℕ\ns : Sym α n\na✝ b : α\ninst✝ : DecidableEq α\nm : Multiset α\nhc : ↑Multiset.card m = n + 1\na : α\nh : a ∈ m\n⊢ ↑Multiset.card (Multiset.erase m a) = n\n[PROOFSTEP]\nrw [Multiset.card_erase_of_mem h, hc]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nn n' m✝ : ℕ\ns : Sym α n\na✝ b : α\ninst✝ : DecidableEq α\nm : Multiset α\nhc : ↑Multiset.card m = n + 1\na : α\nh : a ∈ m\n⊢ Nat.pred (n + 1) = n\n[PROOFSTEP]\nrfl\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nn✝ n' m : ℕ\ns : Sym α✝ n✝\na b : α✝\nα : Type u_3\nn : ℕ\nx✝ : List α\n⊢ List.length x✝ = n ↔ ↑Multiset.card (Quotient.mk (List.isSetoid α) x✝) = n\n[PROOFSTEP]\nrfl\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nn✝ n' m : ℕ\ns : Sym α✝ n✝\na b : α✝\nα : Type u_3\nn : ℕ\nx✝¹ x✝ : { l // List.length l = n }\n⊢ Setoid.r x✝¹ x✝ ↔ ↑x✝¹ ≈ ↑x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nn✝ n' m : ℕ\ns✝ : Sym α✝ n✝\na✝ b : α✝\nα : Type u_3\nn : ℕ\na : α\ns : Sym α n\n⊢ (a :: ↑symEquivSym' s) = ↑symEquivSym' (a ::ₛ s)\n[PROOFSTEP]\nrcases s with ⟨⟨l⟩, _⟩\n[GOAL]\ncase mk.mk\nα✝ : Type u_1\nβ : Type u_2\nn✝ n' m : ℕ\ns : Sym α✝ n✝\na✝ b : α✝\nα : Type u_3\nn : ℕ\na : α\nval✝ : Multiset α\nl : List α\nproperty✝ : ↑Multiset.card (Quot.mk Setoid.r l) = n\n⊢ (a :: ↑symEquivSym' { val := Quot.mk Setoid.r l, property := property✝ }) =\n    ↑symEquivSym' (a ::ₛ { val := Quot.mk Setoid.r l, property := property✝ })\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nn n' m : ℕ\ns : Sym α n\na b : α\n⊢ s = replicate n a ↔ ∀ (b : α), b ∈ s → b = a\n[PROOFSTEP]\nerw [Subtype.ext_iff, Multiset.eq_replicate]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nn n' m : ℕ\ns : Sym α n\na b : α\n⊢ (↑Multiset.card ↑s = n ∧ ∀ (b : α), b ∈ ↑s → b = a) ↔ ∀ (b : α), b ∈ s → b = a\n[PROOFSTEP]\nexact and_iff_right s.2\n[GOAL]\nα : Type u_1\nβ : Type u_2\nn n' m : ℕ\ns✝ : Sym α n\na b : α\ns : Sym α (Nat.succ n)\n⊢ ∃ a s', s = a ::ₛ s'\n[PROOFSTEP]\nobtain ⟨a, ha⟩ := exists_mem s\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nn n' m : ℕ\ns✝ : Sym α n\na✝ b : α\ns : Sym α (Nat.succ n)\na : α\nha : a ∈ s\n⊢ ∃ a s', s = a ::ₛ s'\n[PROOFSTEP]\nclassical exact ⟨a, s.erase a ha, (cons_erase ha).symm⟩\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nn n' m : ℕ\ns✝ : Sym α n\na✝ b : α\ns : Sym α (Nat.succ n)\na : α\nha : a ∈ s\n⊢ ∃ a s', s = a ::ₛ s'\n[PROOFSTEP]\nexact ⟨a, s.erase a ha, (cons_erase ha).symm⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nn✝ n' m : ℕ\ns : Sym α n✝\na b : α\ninst✝ : Subsingleton α\nn : ℕ\n⊢ ∀ (a b : Sym α n), a = b\n[PROOFSTEP]\ncases n\n[GOAL]\ncase zero\nα : Type u_1\nβ : Type u_2\nn n' m : ℕ\ns : Sym α n\na b : α\ninst✝ : Subsingleton α\n⊢ ∀ (a b : Sym α Nat.zero), a = b\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\nα : Type u_1\nβ : Type u_2\nn n' m : ℕ\ns : Sym α n\na b : α\ninst✝ : Subsingleton α\nn✝ : ℕ\n⊢ ∀ (a b : Sym α (Nat.succ n✝)), a = b\n[PROOFSTEP]\nintro s s'\n[GOAL]\ncase succ\nα : Type u_1\nβ : Type u_2\nn n' m : ℕ\ns✝ : Sym α n\na b : α\ninst✝ : Subsingleton α\nn✝ : ℕ\ns s' : Sym α (Nat.succ n✝)\n⊢ s = s'\n[PROOFSTEP]\nobtain ⟨b, -⟩ := exists_mem s\n[GOAL]\ncase succ.intro\nα : Type u_1\nβ : Type u_2\nn n' m : ℕ\ns✝ : Sym α n\na b✝ : α\ninst✝ : Subsingleton α\nn✝ : ℕ\ns s' : Sym α (Nat.succ n✝)\nb : α\n⊢ s = s'\n[PROOFSTEP]\nrw [eq_replicate_of_subsingleton b s', eq_replicate_of_subsingleton b s]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nn✝ n' m : ℕ\ns✝ : Sym α n✝\na b : α\nn : ℕ\ninst✝ : IsEmpty α\ns : Sym α (Nat.succ n)\n⊢ False\n[PROOFSTEP]\nobtain ⟨a, -⟩ := exists_mem s\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nn✝ n' m : ℕ\ns✝ : Sym α n✝\na✝ b : α\nn : ℕ\ninst✝ : IsEmpty α\ns : Sym α (Nat.succ n)\na : α\n⊢ False\n[PROOFSTEP]\nexact isEmptyElim a\n[GOAL]\nα : Type u_1\nβ : Type u_2\nn✝ n' m : ℕ\ns : Sym α n✝\na b : α\nn : ℕ\nf : α → β\nx : Sym α n\n⊢ ↑Multiset.card (Multiset.map f ↑x) = n\n[PROOFSTEP]\nsimpa [Multiset.card_map] using x.property\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nn✝ n' m : ℕ\ns✝ : Sym α✝ n✝\na b : α✝\nα : Type u_3\nn : ℕ\ns : Sym α n\n⊢ map (fun x => x) s = s\n[PROOFSTEP]\next\n[GOAL]\ncase h\nα✝ : Type u_1\nβ : Type u_2\nn✝ n' m : ℕ\ns✝ : Sym α✝ n✝\na b : α✝\nα : Type u_3\nn : ℕ\ns : Sym α n\n⊢ ↑(map (fun x => x) s) = ↑s\n[PROOFSTEP]\nsimp [Sym.map]\n[GOAL]\ncase h\nα✝ : Type u_1\nβ : Type u_2\nn✝ n' m : ℕ\ns✝ : Sym α✝ n✝\na b : α✝\nα : Type u_3\nn : ℕ\ns : Sym α n\n⊢ { val := ↑s, property := (_ : (fun s => ↑Multiset.card s = n) ↑s) } = s\n[PROOFSTEP]\nrfl\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nn✝ n' m : ℕ\ns✝ : Sym α✝ n✝\na b : α✝\nα : Type u_3\nn : ℕ\ns : Sym α n\n⊢ map id s = s\n[PROOFSTEP]\next\n[GOAL]\ncase h\nα✝ : Type u_1\nβ : Type u_2\nn✝ n' m : ℕ\ns✝ : Sym α✝ n✝\na b : α✝\nα : Type u_3\nn : ℕ\ns : Sym α n\n⊢ ↑(map id s) = ↑s\n[PROOFSTEP]\nsimp [Sym.map]\n[GOAL]\ncase h\nα✝ : Type u_1\nβ : Type u_2\nn✝ n' m : ℕ\ns✝ : Sym α✝ n✝\na b : α✝\nα : Type u_3\nn : ℕ\ns : Sym α n\n⊢ { val := ↑s, property := (_ : (fun s => ↑Multiset.card s = n) ↑s) } = s\n[PROOFSTEP]\nrfl\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nn✝ n' m : ℕ\ns✝ : Sym α✝ n✝\na b : α✝\nα : Type u_3\nβ : Type u_4\nγ : Type u_5\nn : ℕ\ng : β → γ\nf : α → β\ns : Sym α n\n⊢ ↑(map g (map f s)) = ↑(map (g ∘ f) s)\n[PROOFSTEP]\ndsimp only [Sym.map]\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nn✝ n' m : ℕ\ns✝ : Sym α✝ n✝\na b : α✝\nα : Type u_3\nβ : Type u_4\nγ : Type u_5\nn : ℕ\ng : β → γ\nf : α → β\ns : Sym α n\n⊢ Multiset.map g (Multiset.map f ↑s) = Multiset.map (g ∘ f) ↑s\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nn n' m✝ : ℕ\ns : Sym α n\na b : α\nf : α → β\nm : Multiset α\nhc : ↑Multiset.card m = n\n⊢ ↑Multiset.card (Multiset.map f m) = n\n[PROOFSTEP]\nsimp [hc]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nn n' m : ℕ\ns : Sym α n\na b : α\ne : α ≃ β\nx : Sym α n\n⊢ map (↑e.symm) (map (↑e) x) = x\n[PROOFSTEP]\nrw [map_map, Equiv.symm_comp_self, map_id]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nn n' m : ℕ\ns : Sym α n\na b : α\ne : α ≃ β\nx : Sym β n\n⊢ map (↑e) (map (↑e.symm) x) = x\n[PROOFSTEP]\nrw [map_map, Equiv.self_comp_symm, map_id]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nn n' m : ℕ\ns✝ : Sym α n\na b : α\ns : Sym α n\n⊢ ↑Multiset.card (Multiset.attach ↑s) = n\n[PROOFSTEP]\nconv_rhs => rw [← s.2, ← Multiset.card_attach]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nn n' m : ℕ\ns✝ : Sym α n\na b : α\ns : Sym α n\n| n\n[PROOFSTEP]\nrw [← s.2, ← Multiset.card_attach]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nn n' m : ℕ\ns✝ : Sym α n\na b : α\ns : Sym α n\n| n\n[PROOFSTEP]\nrw [← s.2, ← Multiset.card_attach]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nn n' m : ℕ\ns✝ : Sym α n\na b : α\ns : Sym α n\n| n\n[PROOFSTEP]\nrw [← s.2, ← Multiset.card_attach]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nn n' m : ℕ\ns✝ : Sym α n\na b : α\ns : Sym α n\ns' : Sym α n'\n⊢ ↑Multiset.card (↑s + ↑s') = n + n'\n[PROOFSTEP]\nrw [map_add, s.2, s'.2]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nn n' m : ℕ\ns✝ : Sym α n\na b : α\ns s' : Sym α n'\n⊢ append s s' = ↑(Sym.cast (_ : n' + n' = n' + n')) (append s' s)\n[PROOFSTEP]\next\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nn n' m : ℕ\ns✝ : Sym α n\na b : α\ns s' : Sym α n'\n⊢ ↑(append s s') = ↑(↑(Sym.cast (_ : n' + n' = n' + n')) (append s' s))\n[PROOFSTEP]\nsimp [append, add_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nn n' m : ℕ\ns✝ : Sym α n\na✝ b✝ a b : α\ni : Fin (n + 1)\ns : Sym α (n - ↑i)\n⊢ a ∈ fill b i s ↔ ↑i ≠ 0 ∧ a = b ∨ a ∈ s\n[PROOFSTEP]\nrw [fill, mem_cast, mem_append_iff, or_comm, mem_replicate]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nn n' m✝ : ℕ\ns : Sym α n\na✝ b : α\ninst✝ : DecidableEq α\na : α\nm : Sym α n\n⊢ ↑card ↑m < n + 1\n[PROOFSTEP]\nrw [m.2, Nat.lt_succ_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nn n' m✝ : ℕ\ns : Sym α n\na✝ b : α\ninst✝ : DecidableEq α\na : α\nm : Sym α n\n⊢ ↑card (filter ((fun x x_1 => x ≠ x_1) a) ↑m) + ↑{ val := count a ↑m, isLt := (_ : count a ↑m < n + 1) } = ↑card ↑m\n[PROOFSTEP]\nrw [← countp_eq_card_filter, add_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nn n' m✝ : ℕ\ns : Sym α n\na✝ b : α\ninst✝ : DecidableEq α\na : α\nm : Sym α n\n⊢ ↑{ val := count a ↑m, isLt := (_ : count a ↑m < n + 1) } + countp ((fun x x_1 => x ≠ x_1) a) ↑m = ↑card ↑m\n[PROOFSTEP]\nsimp only [eq_comm, Ne.def, count]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nn n' m✝ : ℕ\ns : Sym α n\na✝ b : α\ninst✝ : DecidableEq α\na : α\nm : Sym α n\n⊢ countp (fun x => a = x) ↑m + countp (fun x => ¬a = x) ↑m = ↑card ↑m\n[PROOFSTEP]\nrw [← card_eq_countp_add_countp _ _]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nn n' m : ℕ\ns : Sym α n\na b : α\nm₁ m₂ : (i : Fin (n + 1)) × Sym α (n - ↑i)\nh : ↑m₁.snd = ↑m₂.snd\n⊢ ↑m₁.fst = ↑m₂.fst\n[PROOFSTEP]\nrw [← Nat.sub_sub_self (Nat.le_of_lt_succ m₁.1.is_lt), ← m₁.2.2, val_eq_coe, h, ← val_eq_coe, m₂.2.2,\n  Nat.sub_sub_self (Nat.le_of_lt_succ m₂.1.is_lt)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nn n' m✝ : ℕ\ns : Sym α n\na✝ b : α\ninst✝ : DecidableEq α\na : α\nm : Sym α n\n⊢ ↑(fill a (filterNe a m).fst (filterNe a m).snd) = ↑m\n[PROOFSTEP]\nrw [coe_fill, filterNe, ← val_eq_coe, Subtype.coe_mk, Fin.val_mk]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nn n' m✝ : ℕ\ns : Sym α n\na✝ b : α\ninst✝ : DecidableEq α\na : α\nm : Sym α n\n⊢ filter ((fun x x_1 => x ≠ x_1) a) ↑m + ↑(replicate (count a ↑m) a) = ↑m\n[PROOFSTEP]\next b\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nn n' m✝ : ℕ\ns : Sym α n\na✝ b✝ : α\ninst✝ : DecidableEq α\na : α\nm : Sym α n\nb : α\n⊢ count b (filter ((fun x x_1 => x ≠ x_1) a) ↑m + ↑(replicate (count a ↑m) a)) = count b ↑m\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nn n' m✝ : ℕ\ns : Sym α n\na✝ b✝ : α\ninst✝ : DecidableEq α\na : α\nm : Sym α n\nb : α\n⊢ count b (filter (fun x => ¬a = x) ↑m + ↑(replicate (count a ↑m) a)) = count b ↑m\n[PROOFSTEP]\nrw [count_add, count_filter, Sym.coe_replicate, count_replicate]\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nn n' m✝ : ℕ\ns : Sym α n\na✝ b✝ : α\ninst✝ : DecidableEq α\na : α\nm : Sym α n\nb : α\n⊢ ((if ¬a = b then count b ↑m else 0) + if b = a then count a ↑m else 0) = count b ↑m\n[PROOFSTEP]\nobtain rfl | h := eq_or_ne a b\n[GOAL]\ncase a.inl\nα : Type u_1\nβ : Type u_2\nn n' m✝ : ℕ\ns : Sym α n\na✝ b : α\ninst✝ : DecidableEq α\na : α\nm : Sym α n\n⊢ ((if ¬a = a then count a ↑m else 0) + if a = a then count a ↑m else 0) = count a ↑m\n[PROOFSTEP]\nrw [if_pos rfl, if_neg (not_not.2 rfl), zero_add]\n[GOAL]\ncase a.inr\nα : Type u_1\nβ : Type u_2\nn n' m✝ : ℕ\ns : Sym α n\na✝ b✝ : α\ninst✝ : DecidableEq α\na : α\nm : Sym α n\nb : α\nh : a ≠ b\n⊢ ((if ¬a = b then count b ↑m else 0) + if b = a then count a ↑m else 0) = count b ↑m\n[PROOFSTEP]\nrw [if_pos h, if_neg h.symm, add_zero]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nn n' m✝ : ℕ\ns : Sym α n\na✝ b : α\ninst✝ : DecidableEq α\na : α\nm : (i : Fin (n + 1)) × Sym α (n - ↑i)\nh : ¬a ∈ m.snd\n⊢ ↑(filterNe a (fill a m.fst m.snd)).snd = ↑m.snd\n[PROOFSTEP]\nrw [filterNe, ← val_eq_coe, Subtype.coe_mk, val_eq_coe, coe_fill]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nn n' m✝ : ℕ\ns : Sym α n\na✝ b : α\ninst✝ : DecidableEq α\na : α\nm : (i : Fin (n + 1)) × Sym α (n - ↑i)\nh : ¬a ∈ m.snd\n⊢ filter ((fun x x_1 => x ≠ x_1) a) (↑m.snd + ↑(replicate (↑m.fst) a)) = ↑m.snd\n[PROOFSTEP]\nrw [filter_add, filter_eq_self.2, add_right_eq_self, eq_zero_iff_forall_not_mem]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nn n' m✝ : ℕ\ns : Sym α n\na✝ b : α\ninst✝ : DecidableEq α\na : α\nm : (i : Fin (n + 1)) × Sym α (n - ↑i)\nh : ¬a ∈ m.snd\n⊢ ∀ (a_1 : α), ¬a_1 ∈ filter ((fun x x_1 => x ≠ x_1) a) ↑(replicate (↑m.fst) a)\n[PROOFSTEP]\nintro b hb\n[GOAL]\nα : Type u_1\nβ : Type u_2\nn n' m✝ : ℕ\ns : Sym α n\na✝ b✝ : α\ninst✝ : DecidableEq α\na : α\nm : (i : Fin (n + 1)) × Sym α (n - ↑i)\nh : ¬a ∈ m.snd\nb : α\nhb : b ∈ filter ((fun x x_1 => x ≠ x_1) a) ↑(replicate (↑m.fst) a)\n⊢ False\n[PROOFSTEP]\nrw [mem_filter, Sym.mem_coe, mem_replicate] at hb \n[GOAL]\nα : Type u_1\nβ : Type u_2\nn n' m✝ : ℕ\ns : Sym α n\na✝ b✝ : α\ninst✝ : DecidableEq α\na : α\nm : (i : Fin (n + 1)) × Sym α (n - ↑i)\nh : ¬a ∈ m.snd\nb : α\nhb : (↑m.fst ≠ 0 ∧ b = a) ∧ (fun x x_1 => x ≠ x_1) a b\n⊢ False\n[PROOFSTEP]\nexact hb.2 hb.1.2.symm\n[GOAL]\nα : Type u_1\nβ : Type u_2\nn n' m✝ : ℕ\ns : Sym α n\na✝ b : α\ninst✝ : DecidableEq α\na : α\nm : (i : Fin (n + 1)) × Sym α (n - ↑i)\nh : ¬a ∈ m.snd\n⊢ ∀ (a_1 : α), a_1 ∈ ↑m.snd → (fun x x_1 => x ≠ x_1) a a_1\n[PROOFSTEP]\nexact fun a ha ha' => h <| ha'.symm ▸ ha\n[GOAL]\nα : Type u_1\nn : ℕ\ninst✝ : DecidableEq α\ns : Sym (Option α) (Nat.succ n)\n⊢ decode (encode s) = s\n[PROOFSTEP]\nby_cases h : none ∈ s\n[GOAL]\ncase pos\nα : Type u_1\nn : ℕ\ninst✝ : DecidableEq α\ns : Sym (Option α) (Nat.succ n)\nh : none ∈ s\n⊢ decode (encode s) = s\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase neg\nα : Type u_1\nn : ℕ\ninst✝ : DecidableEq α\ns : Sym (Option α) (Nat.succ n)\nh : ¬none ∈ s\n⊢ decode (encode s) = s\n[PROOFSTEP]\nsimp only [decode, h, not_false_iff, encode_of_not_none_mem, Embedding.some_apply, map_map, comp_apply, Option.some_get]\n[GOAL]\ncase neg\nα : Type u_1\nn : ℕ\ninst✝ : DecidableEq α\ns : Sym (Option α) (Nat.succ n)\nh : ¬none ∈ s\n⊢ map (fun x => ↑x) (attach s) = s\n[PROOFSTEP]\nconvert s.attach_map_coe\n[GOAL]\nα : Type u_1\nn : ℕ\ninst✝ : DecidableEq α\ns : Sym (Option α) n ⊕ Sym α (Nat.succ n)\n⊢ encode (decode s) = s\n[PROOFSTEP]\nobtain s | s := s\n[GOAL]\ncase inl\nα : Type u_1\nn : ℕ\ninst✝ : DecidableEq α\ns : Sym (Option α) n\n⊢ encode (decode (Sum.inl s)) = Sum.inl s\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\nα : Type u_1\nn : ℕ\ninst✝ : DecidableEq α\ns : Sym α (Nat.succ n)\n⊢ encode (decode (Sum.inr s)) = Sum.inr s\n[PROOFSTEP]\nunfold SymOptionSuccEquiv.encode\n[GOAL]\ncase inr\nα : Type u_1\nn : ℕ\ninst✝ : DecidableEq α\ns : Sym α (Nat.succ n)\n⊢ (if h : none ∈ decode (Sum.inr s) then Sum.inl (erase (decode (Sum.inr s)) none h)\n    else Sum.inr (map (fun o => Option.get ↑o (_ : Option.isSome ↑o = true)) (attach (decode (Sum.inr s))))) =\n    Sum.inr s\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nα : Type u_1\nn : ℕ\ninst✝ : DecidableEq α\ns : Sym α (Nat.succ n)\nh : none ∈ decode (Sum.inr s)\n⊢ False\n[PROOFSTEP]\nobtain ⟨a, _, ha⟩ := Multiset.mem_map.mp h\n[GOAL]\ncase pos.intro.intro\nα : Type u_1\nn : ℕ\ninst✝ : DecidableEq α\ns : Sym α (Nat.succ n)\nh : none ∈ decode (Sum.inr s)\na : α\nleft✝ : a ∈ ↑s\nha : ↑Embedding.some a = none\n⊢ False\n[PROOFSTEP]\nexact Option.some_ne_none _ ha\n[GOAL]\ncase neg\nα : Type u_1\nn : ℕ\ninst✝ : DecidableEq α\ns : Sym α (Nat.succ n)\nh : ¬none ∈ decode (Sum.inr s)\n⊢ Sum.inr (map (fun o => Option.get ↑o (_ : Option.isSome ↑o = true)) (attach (decode (Sum.inr s)))) = Sum.inr s\n[PROOFSTEP]\nrefine' congr_arg Sum.inr _\n[GOAL]\ncase neg\nα : Type u_1\nn : ℕ\ninst✝ : DecidableEq α\ns : Sym α (Nat.succ n)\nh : ¬none ∈ decode (Sum.inr s)\n⊢ map (fun o => Option.get ↑o (_ : Option.isSome ↑o = true)) (attach (decode (Sum.inr s))) = s\n[PROOFSTEP]\nrefine' map_injective (Option.some_injective _) _ _\n[GOAL]\ncase neg\nα : Type u_1\nn : ℕ\ninst✝ : DecidableEq α\ns : Sym α (Nat.succ n)\nh : ¬none ∈ decode (Sum.inr s)\n⊢ map some (map (fun o => Option.get ↑o (_ : Option.isSome ↑o = true)) (attach (decode (Sum.inr s)))) = map some s\n[PROOFSTEP]\nrefine' Eq.trans _ (Eq.trans (SymOptionSuccEquiv.decode (Sum.inr s)).attach_map_coe _)\n[GOAL]\ncase neg.refine'_1\nα : Type u_1\nn : ℕ\ninst✝ : DecidableEq α\ns : Sym α (Nat.succ n)\nh : ¬none ∈ decode (Sum.inr s)\n⊢ map some (map (fun o => Option.get ↑o (_ : Option.isSome ↑o = true)) (attach (decode (Sum.inr s)))) =\n    map Subtype.val (attach (decode (Sum.inr s)))\ncase neg.refine'_2\nα : Type u_1\nn : ℕ\ninst✝ : DecidableEq α\ns : Sym α (Nat.succ n)\nh : ¬none ∈ decode (Sum.inr s)\n⊢ decode (Sum.inr s) = map some s\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg.refine'_2\nα : Type u_1\nn : ℕ\ninst✝ : DecidableEq α\ns : Sym α (Nat.succ n)\nh : ¬none ∈ decode (Sum.inr s)\n⊢ decode (Sum.inr s) = map some s\n[PROOFSTEP]\nsimp\n", "meta": {"mathlib_filename": "Mathlib.Data.Sym.Basic", "llama_tokens": 8971, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7490872243177518, "lm_q2_score": 0.6723316926137812, "lm_q1q2_score": 0.5036350814409133}}
{"text": "[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\n⊢ LinearIndependent R v ↔ ∀ (l : ι →₀ R), ↑(Finsupp.total ι M R v) l = 0 → l = 0\n[PROOFSTEP]\nsimp [LinearIndependent, LinearMap.ker_eq_bot']\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhf : ∀ (l : ι →₀ R), ↑(Finsupp.total ι M R v) l = 0 → l = 0\ns : Finset ι\ng : ι → R\nhg : ∑ i in s, g i • v i = 0\ni : ι\nhis : i ∈ s\n⊢ ↑(Finsupp.total ι M R v) (∑ i in s, Finsupp.single i (g i)) = 0\n[PROOFSTEP]\nsimpa only [LinearMap.map_sum, Finsupp.total_single] using hg\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhf : ∀ (l : ι →₀ R), ↑(Finsupp.total ι M R v) l = 0 → l = 0\ns : Finset ι\ng : ι → R\nhg : ∑ i in s, g i • v i = 0\ni : ι\nhis : i ∈ s\nh : ∑ i in s, Finsupp.single i (g i) = 0\n⊢ g i = ↑(Finsupp.lapply i) (Finsupp.single i (g i))\n[PROOFSTEP]\n{rw [Finsupp.lapply_apply, Finsupp.single_eq_same]\n}\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhf : ∀ (l : ι →₀ R), ↑(Finsupp.total ι M R v) l = 0 → l = 0\ns : Finset ι\ng : ι → R\nhg : ∑ i in s, g i • v i = 0\ni : ι\nhis : i ∈ s\nh : ∑ i in s, Finsupp.single i (g i) = 0\n⊢ g i = ↑(Finsupp.lapply i) (Finsupp.single i (g i))\n[PROOFSTEP]\nrw [Finsupp.lapply_apply, Finsupp.single_eq_same]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhf : ∀ (l : ι →₀ R), ↑(Finsupp.total ι M R v) l = 0 → l = 0\ns : Finset ι\ng : ι → R\nhg : ∑ i in s, g i • v i = 0\ni : ι\nhis : i ∈ s\nh : ∑ i in s, Finsupp.single i (g i) = 0\nj : ι\n_hjs : j ∈ s\nhji : j ≠ i\n⊢ ↑(Finsupp.lapply i) (Finsupp.single j (g j)) = 0\n[PROOFSTEP]\nrw [Finsupp.lapply_apply, Finsupp.single_eq_of_ne hji]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\n⊢ LinearIndependent R v ↔\n    ∀ (s : Finset ι) (g : ι → R), (∀ (i : ι), ¬i ∈ s → g i = 0) → ∑ i in s, g i • v i = 0 → ∀ (i : ι), g i = 0\n[PROOFSTEP]\nclassical exact\n  linearIndependent_iff'.trans\n    ⟨fun H s g hg hv i => if his : i ∈ s then H s g hv i his else hg i his, fun H s g hg i hi =>\n      by\n      convert\n        H s (fun j => if j ∈ s then g j else 0) (fun j hj => if_neg hj)\n          (by simp_rw [ite_smul, zero_smul, Finset.sum_extend_by_zero, hg]) i\n      exact (if_pos hi).symm⟩\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\n⊢ LinearIndependent R v ↔\n    ∀ (s : Finset ι) (g : ι → R), (∀ (i : ι), ¬i ∈ s → g i = 0) → ∑ i in s, g i • v i = 0 → ∀ (i : ι), g i = 0\n[PROOFSTEP]\nexact\n  linearIndependent_iff'.trans\n    ⟨fun H s g hg hv i => if his : i ∈ s then H s g hv i his else hg i his, fun H s g hg i hi =>\n      by\n      convert\n        H s (fun j => if j ∈ s then g j else 0) (fun j hj => if_neg hj)\n          (by simp_rw [ite_smul, zero_smul, Finset.sum_extend_by_zero, hg]) i\n      exact (if_pos hi).symm⟩\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nH : ∀ (s : Finset ι) (g : ι → R), (∀ (i : ι), ¬i ∈ s → g i = 0) → ∑ i in s, g i • v i = 0 → ∀ (i : ι), g i = 0\ns : Finset ι\ng : ι → R\nhg : ∑ i in s, g i • v i = 0\ni : ι\nhi : i ∈ s\n⊢ g i = 0\n[PROOFSTEP]\nconvert\n  H s (fun j => if j ∈ s then g j else 0) (fun j hj => if_neg hj)\n    (by simp_rw [ite_smul, zero_smul, Finset.sum_extend_by_zero, hg]) i\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nH : ∀ (s : Finset ι) (g : ι → R), (∀ (i : ι), ¬i ∈ s → g i = 0) → ∑ i in s, g i • v i = 0 → ∀ (i : ι), g i = 0\ns : Finset ι\ng : ι → R\nhg : ∑ i in s, g i • v i = 0\ni : ι\nhi : i ∈ s\n⊢ ∑ i in s, (fun j => if j ∈ s then g j else 0) i • v i = 0\n[PROOFSTEP]\nsimp_rw [ite_smul, zero_smul, Finset.sum_extend_by_zero, hg]\n[GOAL]\ncase h.e'_2\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nH : ∀ (s : Finset ι) (g : ι → R), (∀ (i : ι), ¬i ∈ s → g i = 0) → ∑ i in s, g i • v i = 0 → ∀ (i : ι), g i = 0\ns : Finset ι\ng : ι → R\nhg : ∑ i in s, g i • v i = 0\ni : ι\nhi : i ∈ s\n⊢ g i = if i ∈ s then g i else 0\n[PROOFSTEP]\nexact (if_pos hi).symm\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\n⊢ ¬LinearIndependent R v ↔ ∃ s g, ∑ i in s, g i • v i = 0 ∧ ∃ i, i ∈ s ∧ g i ≠ 0\n[PROOFSTEP]\nrw [linearIndependent_iff']\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\n⊢ (¬∀ (s : Finset ι) (g : ι → R), ∑ i in s, g i • v i = 0 → ∀ (i : ι), i ∈ s → g i = 0) ↔\n    ∃ s g, ∑ i in s, g i • v i = 0 ∧ ∃ i, i ∈ s ∧ g i ≠ 0\n[PROOFSTEP]\nsimp only [exists_prop, not_forall]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁷ : Semiring R\ninst✝⁶ : AddCommMonoid M\ninst✝⁵ : AddCommMonoid M'\ninst✝⁴ : AddCommMonoid M''\ninst✝³ : Module R M\ninst✝² : Module R M'\ninst✝¹ : Module R M''\na b : R\nx y : M\ninst✝ : Fintype ι\n⊢ LinearIndependent R v ↔ ∀ (g : ι → R), ∑ i : ι, g i • v i = 0 → ∀ (i : ι), g i = 0\n[PROOFSTEP]\nrefine'\n  ⟨fun H g => by simpa using linearIndependent_iff'.1 H Finset.univ g, fun H =>\n    linearIndependent_iff''.2 fun s g hg hs i => H _ _ _⟩\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁷ : Semiring R\ninst✝⁶ : AddCommMonoid M\ninst✝⁵ : AddCommMonoid M'\ninst✝⁴ : AddCommMonoid M''\ninst✝³ : Module R M\ninst✝² : Module R M'\ninst✝¹ : Module R M''\na b : R\nx y : M\ninst✝ : Fintype ι\nH : LinearIndependent R v\ng : ι → R\n⊢ ∑ i : ι, g i • v i = 0 → ∀ (i : ι), g i = 0\n[PROOFSTEP]\nsimpa using linearIndependent_iff'.1 H Finset.univ g\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁷ : Semiring R\ninst✝⁶ : AddCommMonoid M\ninst✝⁵ : AddCommMonoid M'\ninst✝⁴ : AddCommMonoid M''\ninst✝³ : Module R M\ninst✝² : Module R M'\ninst✝¹ : Module R M''\na b : R\nx y : M\ninst✝ : Fintype ι\nH : ∀ (g : ι → R), ∑ i : ι, g i • v i = 0 → ∀ (i : ι), g i = 0\ns : Finset ι\ng : ι → R\nhg : ∀ (i : ι), ¬i ∈ s → g i = 0\nhs : ∑ i in s, g i • v i = 0\ni : ι\n⊢ ∑ i : ι, g i • v i = 0\n[PROOFSTEP]\nrw [← hs]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁷ : Semiring R\ninst✝⁶ : AddCommMonoid M\ninst✝⁵ : AddCommMonoid M'\ninst✝⁴ : AddCommMonoid M''\ninst✝³ : Module R M\ninst✝² : Module R M'\ninst✝¹ : Module R M''\na b : R\nx y : M\ninst✝ : Fintype ι\nH : ∀ (g : ι → R), ∑ i : ι, g i • v i = 0 → ∀ (i : ι), g i = 0\ns : Finset ι\ng : ι → R\nhg : ∀ (i : ι), ¬i ∈ s → g i = 0\nhs : ∑ i in s, g i • v i = 0\ni : ι\n⊢ ∑ i : ι, g i • v i = ∑ i in s, g i • v i\n[PROOFSTEP]\nrefine' (Finset.sum_subset (Finset.subset_univ _) fun i _ hi => _).symm\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁷ : Semiring R\ninst✝⁶ : AddCommMonoid M\ninst✝⁵ : AddCommMonoid M'\ninst✝⁴ : AddCommMonoid M''\ninst✝³ : Module R M\ninst✝² : Module R M'\ninst✝¹ : Module R M''\na b : R\nx y : M\ninst✝ : Fintype ι\nH : ∀ (g : ι → R), ∑ i : ι, g i • v i = 0 → ∀ (i : ι), g i = 0\ns : Finset ι\ng : ι → R\nhg : ∀ (i : ι), ¬i ∈ s → g i = 0\nhs : ∑ i in s, g i • v i = 0\ni✝ i : ι\nx✝ : i ∈ Finset.univ\nhi : ¬i ∈ s\n⊢ g i • v i = 0\n[PROOFSTEP]\nrw [hg i hi, zero_smul]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁸ : Semiring R\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : AddCommMonoid M'\ninst✝⁵ : AddCommMonoid M''\ninst✝⁴ : Module R M\ninst✝³ : Module R M'\ninst✝² : Module R M''\na b : R\nx y : M\ninst✝¹ : Fintype ι\ninst✝ : DecidableEq ι\n⊢ LinearIndependent R v ↔\n    LinearMap.ker (↑(LinearMap.lsum R (fun x => R) ℕ) fun i => LinearMap.smulRight LinearMap.id (v i)) = ⊥\n[PROOFSTEP]\nsimp [Fintype.linearIndependent_iff, LinearMap.ker_eq_bot', funext_iff]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁷ : Semiring R\ninst✝⁶ : AddCommMonoid M\ninst✝⁵ : AddCommMonoid M'\ninst✝⁴ : AddCommMonoid M''\ninst✝³ : Module R M\ninst✝² : Module R M'\ninst✝¹ : Module R M''\na b : R\nx y : M\ninst✝ : Fintype ι\n⊢ ¬LinearIndependent R v ↔ ∃ g, ∑ i : ι, g i • v i = 0 ∧ ∃ i, g i ≠ 0\n[PROOFSTEP]\nsimpa using not_iff_not.2 Fintype.linearIndependent_iff\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁷ : Semiring R\ninst✝⁶ : AddCommMonoid M\ninst✝⁵ : AddCommMonoid M'\ninst✝⁴ : AddCommMonoid M''\ninst✝³ : Module R M\ninst✝² : Module R M'\ninst✝¹ : Module R M''\na b : R\nx y : M\ninst✝ : Nontrivial R\ni : ι\nhv : LinearIndependent R v\nh : v i = 0\n⊢ 1 = 0\n[PROOFSTEP]\nsuffices (Finsupp.single i 1 : ι →₀ R) i = 0 by simpa\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁷ : Semiring R\ninst✝⁶ : AddCommMonoid M\ninst✝⁵ : AddCommMonoid M'\ninst✝⁴ : AddCommMonoid M''\ninst✝³ : Module R M\ninst✝² : Module R M'\ninst✝¹ : Module R M''\na b : R\nx y : M\ninst✝ : Nontrivial R\ni : ι\nhv : LinearIndependent R v\nh : v i = 0\nthis : ↑(Finsupp.single i 1) i = 0\n⊢ 1 = 0\n[PROOFSTEP]\nsimpa\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁷ : Semiring R\ninst✝⁶ : AddCommMonoid M\ninst✝⁵ : AddCommMonoid M'\ninst✝⁴ : AddCommMonoid M''\ninst✝³ : Module R M\ninst✝² : Module R M'\ninst✝¹ : Module R M''\na b : R\nx y : M\ninst✝ : Nontrivial R\ni : ι\nhv : LinearIndependent R v\nh : v i = 0\n⊢ ↑(Finsupp.single i 1) i = 0\n[PROOFSTEP]\nrw [linearIndependent_iff.1 hv (Finsupp.single i 1)]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁷ : Semiring R\ninst✝⁶ : AddCommMonoid M\ninst✝⁵ : AddCommMonoid M'\ninst✝⁴ : AddCommMonoid M''\ninst✝³ : Module R M\ninst✝² : Module R M'\ninst✝¹ : Module R M''\na b : R\nx y : M\ninst✝ : Nontrivial R\ni : ι\nhv : LinearIndependent R v\nh : v i = 0\n⊢ ↑0 i = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁷ : Semiring R\ninst✝⁶ : AddCommMonoid M\ninst✝⁵ : AddCommMonoid M'\ninst✝⁴ : AddCommMonoid M''\ninst✝³ : Module R M\ninst✝² : Module R M'\ninst✝¹ : Module R M''\na b : R\nx y : M\ninst✝ : Nontrivial R\ni : ι\nhv : LinearIndependent R v\nh : v i = 0\n⊢ ↑(Finsupp.total ι M R v) (Finsupp.single i 1) = 0\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx✝ y✝ x y : M\nh : LinearIndependent R ![x, y]\ns t : R\nh' : s • x + t • y = 0\n⊢ s = 0 ∧ t = 0\n[PROOFSTEP]\nhave := linearIndependent_iff'.1 h Finset.univ ![s, t]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx✝ y✝ x y : M\nh : LinearIndependent R ![x, y]\ns t : R\nh' : s • x + t • y = 0\nthis :\n  ∑ i : Fin (Nat.succ (Nat.succ 0)), Matrix.vecCons s ![t] i • Matrix.vecCons x ![y] i = 0 →\n    ∀ (i : Fin (Nat.succ (Nat.succ 0))), i ∈ Finset.univ → Matrix.vecCons s ![t] i = 0\n⊢ s = 0 ∧ t = 0\n[PROOFSTEP]\nsimp only [Fin.sum_univ_two, Matrix.cons_val_zero, Matrix.cons_val_one, Matrix.head_cons, h', Finset.mem_univ,\n  forall_true_left] at this \n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx✝ y✝ x y : M\nh : LinearIndependent R ![x, y]\ns t : R\nh' : s • x + t • y = 0\nthis : ∀ (i : Fin (Nat.succ (Nat.succ 0))), Matrix.vecCons s ![t] i = 0\n⊢ s = 0 ∧ t = 0\n[PROOFSTEP]\nexact ⟨this 0, this 1⟩\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nh : LinearIndependent R v\nf : ι' → ι\nhf : Injective f\n⊢ LinearIndependent R (v ∘ f)\n[PROOFSTEP]\nrw [linearIndependent_iff, Finsupp.total_comp]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nh : LinearIndependent R v\nf : ι' → ι\nhf : Injective f\n⊢ ∀ (l : ι' →₀ R), ↑(LinearMap.comp (Finsupp.total ι M R v) (Finsupp.lmapDomain R R f)) l = 0 → l = 0\n[PROOFSTEP]\nintro l hl\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nh : LinearIndependent R v\nf : ι' → ι\nhf : Injective f\nl : ι' →₀ R\nhl : ↑(LinearMap.comp (Finsupp.total ι M R v) (Finsupp.lmapDomain R R f)) l = 0\n⊢ l = 0\n[PROOFSTEP]\nhave h_map_domain : ∀ x, (Finsupp.mapDomain f l) (f x) = 0 := by\n  rw [linearIndependent_iff.1 h (Finsupp.mapDomain f l) hl]; simp\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nh : LinearIndependent R v\nf : ι' → ι\nhf : Injective f\nl : ι' →₀ R\nhl : ↑(LinearMap.comp (Finsupp.total ι M R v) (Finsupp.lmapDomain R R f)) l = 0\n⊢ ∀ (x : ι'), ↑(Finsupp.mapDomain f l) (f x) = 0\n[PROOFSTEP]\nrw [linearIndependent_iff.1 h (Finsupp.mapDomain f l) hl]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nh : LinearIndependent R v\nf : ι' → ι\nhf : Injective f\nl : ι' →₀ R\nhl : ↑(LinearMap.comp (Finsupp.total ι M R v) (Finsupp.lmapDomain R R f)) l = 0\n⊢ ∀ (x : ι'), ↑0 (f x) = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nh : LinearIndependent R v\nf : ι' → ι\nhf : Injective f\nl : ι' →₀ R\nhl : ↑(LinearMap.comp (Finsupp.total ι M R v) (Finsupp.lmapDomain R R f)) l = 0\nh_map_domain : ∀ (x : ι'), ↑(Finsupp.mapDomain f l) (f x) = 0\n⊢ l = 0\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx✝ y : M\nh : LinearIndependent R v\nf : ι' → ι\nhf : Injective f\nl : ι' →₀ R\nhl : ↑(LinearMap.comp (Finsupp.total ι M R v) (Finsupp.lmapDomain R R f)) l = 0\nh_map_domain : ∀ (x : ι'), ↑(Finsupp.mapDomain f l) (f x) = 0\nx : ι'\n⊢ ↑l x = ↑0 x\n[PROOFSTEP]\nconvert h_map_domain x\n[GOAL]\ncase h.e'_2\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx✝ y : M\nh : LinearIndependent R v\nf : ι' → ι\nhf : Injective f\nl : ι' →₀ R\nhl : ↑(LinearMap.comp (Finsupp.total ι M R v) (Finsupp.lmapDomain R R f)) l = 0\nh_map_domain : ∀ (x : ι'), ↑(Finsupp.mapDomain f l) (f x) = 0\nx : ι'\n⊢ ↑l x = ↑(Finsupp.mapDomain f l) (f x)\n[PROOFSTEP]\nrw [Finsupp.mapDomain_apply hf]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\ni : LinearIndependent R v\n⊢ LinearIndependent R Subtype.val\n[PROOFSTEP]\nsimpa using i.comp _ (rangeSplitting_injective v)\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhv : LinearIndependent R v\nf : M →ₗ[R] M'\nhf_inj : Disjoint (span R (range v)) (LinearMap.ker f)\n⊢ LinearIndependent R (↑f ∘ v)\n[PROOFSTEP]\nrw [disjoint_iff_inf_le, ← Set.image_univ, Finsupp.span_image_eq_map_total, map_inf_eq_map_inf_comap,\n  map_le_iff_le_comap, comap_bot, Finsupp.supported_univ, top_inf_eq] at hf_inj \n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhv : LinearIndependent R v\nf : M →ₗ[R] M'\nhf_inj : comap (Finsupp.total ι M R v) (LinearMap.ker f) ≤ LinearMap.ker (Finsupp.total ι M R v)\n⊢ LinearIndependent R (↑f ∘ v)\n[PROOFSTEP]\nunfold LinearIndependent at hv ⊢\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhv : LinearMap.ker (Finsupp.total ι M R v) = ⊥\nf : M →ₗ[R] M'\nhf_inj : comap (Finsupp.total ι M R v) (LinearMap.ker f) ≤ LinearMap.ker (Finsupp.total ι M R v)\n⊢ LinearMap.ker (Finsupp.total ι M' R (↑f ∘ v)) = ⊥\n[PROOFSTEP]\nrw [hv, le_bot_iff] at hf_inj \n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhv : LinearMap.ker (Finsupp.total ι M R v) = ⊥\nf : M →ₗ[R] M'\nhf_inj : comap (Finsupp.total ι M R v) (LinearMap.ker f) = ⊥\n⊢ LinearMap.ker (Finsupp.total ι M' R (↑f ∘ v)) = ⊥\n[PROOFSTEP]\nhaveI : Inhabited M := ⟨0⟩\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhv : LinearMap.ker (Finsupp.total ι M R v) = ⊥\nf : M →ₗ[R] M'\nhf_inj : comap (Finsupp.total ι M R v) (LinearMap.ker f) = ⊥\nthis : Inhabited M\n⊢ LinearMap.ker (Finsupp.total ι M' R (↑f ∘ v)) = ⊥\n[PROOFSTEP]\nrw [Finsupp.total_comp, @Finsupp.lmapDomain_total _ _ R _ _ _ _ _ _ _ _ _ _ f, LinearMap.ker_comp, hf_inj]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhv : LinearMap.ker (Finsupp.total ι M R v) = ⊥\nf : M →ₗ[R] M'\nhf_inj : comap (Finsupp.total ι M R v) (LinearMap.ker f) = ⊥\nthis : Inhabited M\n⊢ ∀ (i : ι), ↑f (v i) = ↑f (v i)\n[PROOFSTEP]\nexact fun _ => rfl\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nf : M →ₗ[R] M'\nhv : LinearIndependent R (↑f ∘ v)\n⊢ Disjoint (span R (range v)) (LinearMap.ker f)\n[PROOFSTEP]\nrw [LinearIndependent, Finsupp.total_comp, Finsupp.lmapDomain_total R _ f (fun _ ↦ rfl), LinearMap.ker_comp] at hv \n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nf : M →ₗ[R] M'\nhv : comap (Finsupp.total ι M R fun x => v x) (LinearMap.ker f) = ⊥\n⊢ Disjoint (span R (range v)) (LinearMap.ker f)\n[PROOFSTEP]\nrw [disjoint_iff_inf_le, ← Set.image_univ, Finsupp.span_image_eq_map_total, map_inf_eq_map_inf_comap, hv, inf_bot_eq,\n  map_bot]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhv : LinearIndependent R v\nf : M →ₗ[R] M'\nhf_inj : LinearMap.ker f = ⊥\n⊢ Disjoint (span R (range v)) (LinearMap.ker f)\n[PROOFSTEP]\nsimp [hf_inj]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nf : M →ₗ[R] M'\nhfv : LinearIndependent R (↑f ∘ v)\ns : Finset ι\ng : ι → R\nhg : ∑ i in s, g i • v i = 0\ni : ι\nhis : i ∈ s\n⊢ ∑ i in s, g i • ↑f (v i) = 0\n[PROOFSTEP]\nsimp_rw [← f.map_smul, ← f.map_sum, hg, f.map_zero]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nf : M →ₗ[R] M'\nhf_inj : ker f = ⊥\nh : LinearIndependent R v\n⊢ Disjoint (span R (Set.range v)) (ker f)\n[PROOFSTEP]\nsimp only [hf_inj, disjoint_bot_right]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv✝ : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx✝ y : M\nm : ℕ\nx : M\nv : Fin m → M\nhli : LinearIndependent R v\nx_ortho : ∀ (c : R) (y : { x // x ∈ span R (range v) }), c • x + ↑y = 0 → c = 0\n⊢ LinearIndependent R (Fin.cons x v)\n[PROOFSTEP]\nrw [Fintype.linearIndependent_iff] at hli ⊢\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv✝ : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx✝ y : M\nm : ℕ\nx : M\nv : Fin m → M\nhli✝ : LinearIndependent R v\nhli : ∀ (g : Fin m → R), ∑ i : Fin m, g i • v i = 0 → ∀ (i : Fin m), g i = 0\nx_ortho : ∀ (c : R) (y : { x // x ∈ span R (range v) }), c • x + ↑y = 0 → c = 0\n⊢ ∀ (g : Fin (m + 1) → R), ∑ i : Fin (m + 1), g i • Fin.cons x v i = 0 → ∀ (i : Fin (m + 1)), g i = 0\n[PROOFSTEP]\nrintro g total_eq j\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv✝ : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx✝ y : M\nm : ℕ\nx : M\nv : Fin m → M\nhli✝ : LinearIndependent R v\nhli : ∀ (g : Fin m → R), ∑ i : Fin m, g i • v i = 0 → ∀ (i : Fin m), g i = 0\nx_ortho : ∀ (c : R) (y : { x // x ∈ span R (range v) }), c • x + ↑y = 0 → c = 0\ng : Fin (m + 1) → R\ntotal_eq : ∑ i : Fin (m + 1), g i • Fin.cons x v i = 0\nj : Fin (m + 1)\n⊢ g j = 0\n[PROOFSTEP]\nsimp_rw [Fin.sum_univ_succ, Fin.cons_zero, Fin.cons_succ] at total_eq \n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv✝ : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx✝ y : M\nm : ℕ\nx : M\nv : Fin m → M\nhli✝ : LinearIndependent R v\nhli : ∀ (g : Fin m → R), ∑ i : Fin m, g i • v i = 0 → ∀ (i : Fin m), g i = 0\nx_ortho : ∀ (c : R) (y : { x // x ∈ span R (range v) }), c • x + ↑y = 0 → c = 0\ng : Fin (m + 1) → R\nj : Fin (m + 1)\ntotal_eq : g 0 • x + ∑ x : Fin m, g (Fin.succ x) • v x = 0\n⊢ g j = 0\n[PROOFSTEP]\nhave : g 0 = 0 := by\n  refine' x_ortho (g 0) ⟨∑ i : Fin m, g i.succ • v i, _⟩ total_eq\n  exact sum_mem fun i _ => smul_mem _ _ (subset_span ⟨i, rfl⟩)\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv✝ : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx✝ y : M\nm : ℕ\nx : M\nv : Fin m → M\nhli✝ : LinearIndependent R v\nhli : ∀ (g : Fin m → R), ∑ i : Fin m, g i • v i = 0 → ∀ (i : Fin m), g i = 0\nx_ortho : ∀ (c : R) (y : { x // x ∈ span R (range v) }), c • x + ↑y = 0 → c = 0\ng : Fin (m + 1) → R\nj : Fin (m + 1)\ntotal_eq : g 0 • x + ∑ x : Fin m, g (Fin.succ x) • v x = 0\n⊢ g 0 = 0\n[PROOFSTEP]\nrefine' x_ortho (g 0) ⟨∑ i : Fin m, g i.succ • v i, _⟩ total_eq\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv✝ : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx✝ y : M\nm : ℕ\nx : M\nv : Fin m → M\nhli✝ : LinearIndependent R v\nhli : ∀ (g : Fin m → R), ∑ i : Fin m, g i • v i = 0 → ∀ (i : Fin m), g i = 0\nx_ortho : ∀ (c : R) (y : { x // x ∈ span R (range v) }), c • x + ↑y = 0 → c = 0\ng : Fin (m + 1) → R\nj : Fin (m + 1)\ntotal_eq : g 0 • x + ∑ x : Fin m, g (Fin.succ x) • v x = 0\n⊢ ∑ i : Fin m, g (Fin.succ i) • v i ∈ span R (range v)\n[PROOFSTEP]\nexact sum_mem fun i _ => smul_mem _ _ (subset_span ⟨i, rfl⟩)\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv✝ : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx✝ y : M\nm : ℕ\nx : M\nv : Fin m → M\nhli✝ : LinearIndependent R v\nhli : ∀ (g : Fin m → R), ∑ i : Fin m, g i • v i = 0 → ∀ (i : Fin m), g i = 0\nx_ortho : ∀ (c : R) (y : { x // x ∈ span R (range v) }), c • x + ↑y = 0 → c = 0\ng : Fin (m + 1) → R\nj : Fin (m + 1)\ntotal_eq : g 0 • x + ∑ x : Fin m, g (Fin.succ x) • v x = 0\nthis : g 0 = 0\n⊢ g j = 0\n[PROOFSTEP]\nrw [this, zero_smul, zero_add] at total_eq \n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv✝ : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx✝ y : M\nm : ℕ\nx : M\nv : Fin m → M\nhli✝ : LinearIndependent R v\nhli : ∀ (g : Fin m → R), ∑ i : Fin m, g i • v i = 0 → ∀ (i : Fin m), g i = 0\nx_ortho : ∀ (c : R) (y : { x // x ∈ span R (range v) }), c • x + ↑y = 0 → c = 0\ng : Fin (m + 1) → R\nj : Fin (m + 1)\ntotal_eq : ∑ x : Fin m, g (Fin.succ x) • v x = 0\nthis : g 0 = 0\n⊢ g j = 0\n[PROOFSTEP]\nexact Fin.cases this (hli _ total_eq) j\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝¹⁰ : Semiring R\ninst✝⁹ : AddCommMonoid M\ninst✝⁸ : AddCommMonoid M'\ninst✝⁷ : AddCommMonoid M''\ninst✝⁶ : Module R M\ninst✝⁵ : Module R M'\ninst✝⁴ : Module R M''\na b : R\nx y : M\ninst✝³ : Semiring K\ninst✝² : SMulWithZero R K\ninst✝¹ : Module K M\ninst✝ : IsScalarTower R K M\nhinj : Injective fun r => r • 1\nli : LinearIndependent K v\n⊢ LinearIndependent R v\n[PROOFSTEP]\nrefine' linearIndependent_iff'.mpr fun s g hg i hi => hinj _\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝¹⁰ : Semiring R\ninst✝⁹ : AddCommMonoid M\ninst✝⁸ : AddCommMonoid M'\ninst✝⁷ : AddCommMonoid M''\ninst✝⁶ : Module R M\ninst✝⁵ : Module R M'\ninst✝⁴ : Module R M''\na b : R\nx y : M\ninst✝³ : Semiring K\ninst✝² : SMulWithZero R K\ninst✝¹ : Module K M\ninst✝ : IsScalarTower R K M\nhinj : Injective fun r => r • 1\nli : LinearIndependent K v\ns : Finset ι\ng : ι → R\nhg : ∑ i in s, g i • v i = 0\ni : ι\nhi : i ∈ s\n⊢ (fun r => r • 1) (g i) = (fun r => r • 1) 0\n[PROOFSTEP]\ndsimp only\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝¹⁰ : Semiring R\ninst✝⁹ : AddCommMonoid M\ninst✝⁸ : AddCommMonoid M'\ninst✝⁷ : AddCommMonoid M''\ninst✝⁶ : Module R M\ninst✝⁵ : Module R M'\ninst✝⁴ : Module R M''\na b : R\nx y : M\ninst✝³ : Semiring K\ninst✝² : SMulWithZero R K\ninst✝¹ : Module K M\ninst✝ : IsScalarTower R K M\nhinj : Injective fun r => r • 1\nli : LinearIndependent K v\ns : Finset ι\ng : ι → R\nhg : ∑ i in s, g i • v i = 0\ni : ι\nhi : i ∈ s\n⊢ g i • 1 = 0 • 1\n[PROOFSTEP]\nrw [zero_smul]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝¹⁰ : Semiring R\ninst✝⁹ : AddCommMonoid M\ninst✝⁸ : AddCommMonoid M'\ninst✝⁷ : AddCommMonoid M''\ninst✝⁶ : Module R M\ninst✝⁵ : Module R M'\ninst✝⁴ : Module R M''\na b : R\nx y : M\ninst✝³ : Semiring K\ninst✝² : SMulWithZero R K\ninst✝¹ : Module K M\ninst✝ : IsScalarTower R K M\nhinj : Injective fun r => r • 1\nli : LinearIndependent K v\ns : Finset ι\ng : ι → R\nhg : ∑ i in s, g i • v i = 0\ni : ι\nhi : i ∈ s\n⊢ g i • 1 = 0\n[PROOFSTEP]\nrefine' (linearIndependent_iff'.mp li : _) _ (g · • (1 : K)) _ i hi\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝¹⁰ : Semiring R\ninst✝⁹ : AddCommMonoid M\ninst✝⁸ : AddCommMonoid M'\ninst✝⁷ : AddCommMonoid M''\ninst✝⁶ : Module R M\ninst✝⁵ : Module R M'\ninst✝⁴ : Module R M''\na b : R\nx y : M\ninst✝³ : Semiring K\ninst✝² : SMulWithZero R K\ninst✝¹ : Module K M\ninst✝ : IsScalarTower R K M\nhinj : Injective fun r => r • 1\nli : LinearIndependent K v\ns : Finset ι\ng : ι → R\nhg : ∑ i in s, g i • v i = 0\ni : ι\nhi : i ∈ s\n⊢ ∑ i in s, (fun x => g x • 1) i • v i = 0\n[PROOFSTEP]\nsimp_rw [smul_assoc, one_smul]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝¹⁰ : Semiring R\ninst✝⁹ : AddCommMonoid M\ninst✝⁸ : AddCommMonoid M'\ninst✝⁷ : AddCommMonoid M''\ninst✝⁶ : Module R M\ninst✝⁵ : Module R M'\ninst✝⁴ : Module R M''\na b : R\nx y : M\ninst✝³ : Semiring K\ninst✝² : SMulWithZero R K\ninst✝¹ : Module K M\ninst✝ : IsScalarTower R K M\nhinj : Injective fun r => r • 1\nli : LinearIndependent K v\ns : Finset ι\ng : ι → R\nhg : ∑ i in s, g i • v i = 0\ni : ι\nhi : i ∈ s\n⊢ ∑ x in s, g x • v x = 0\n[PROOFSTEP]\nexact hg\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\ns : Set M\nli : LinearIndependent R Subtype.val\nt : Finset ↑s\n⊢ LinearIndependent R Subtype.val\n[PROOFSTEP]\nlet f : t.map (Embedding.subtype s) → s := fun x =>\n  ⟨x.1, by\n    obtain ⟨x, h⟩ := x\n    rw [Finset.mem_map] at h \n    obtain ⟨a, _ha, rfl⟩ := h\n    simp only [Subtype.coe_prop, Embedding.coe_subtype]⟩\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx✝ y : M\ns : Set M\nli : LinearIndependent R Subtype.val\nt : Finset ↑s\nx : { x // x ∈ Finset.map (Embedding.subtype s) t }\n⊢ ↑x ∈ s\n[PROOFSTEP]\nobtain ⟨x, h⟩ := x\n[GOAL]\ncase mk\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx✝ y : M\ns : Set M\nli : LinearIndependent R Subtype.val\nt : Finset ↑s\nx : M\nh : x ∈ Finset.map (Embedding.subtype s) t\n⊢ ↑{ val := x, property := h } ∈ s\n[PROOFSTEP]\nrw [Finset.mem_map] at h \n[GOAL]\ncase mk\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx✝ y : M\ns : Set M\nli : LinearIndependent R Subtype.val\nt : Finset ↑s\nx : M\nh✝ : x ∈ Finset.map (Embedding.subtype s) t\nh : ∃ a, a ∈ t ∧ ↑(Embedding.subtype s) a = x\n⊢ ↑{ val := x, property := h✝ } ∈ s\n[PROOFSTEP]\nobtain ⟨a, _ha, rfl⟩ := h\n[GOAL]\ncase mk.intro.intro\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na✝ b : R\nx y : M\ns : Set M\nli : LinearIndependent R Subtype.val\nt : Finset ↑s\na : Subtype s\n_ha : a ∈ t\nh : ↑(Embedding.subtype s) a ∈ Finset.map (Embedding.subtype s) t\n⊢ ↑{ val := ↑(Embedding.subtype s) a, property := h } ∈ s\n[PROOFSTEP]\nsimp only [Subtype.coe_prop, Embedding.coe_subtype]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\ns : Set M\nli : LinearIndependent R Subtype.val\nt : Finset ↑s\nf : { x // x ∈ Finset.map (Embedding.subtype s) t } → ↑s := fun x => { val := ↑x, property := (_ : ↑x ∈ s) }\n⊢ LinearIndependent R Subtype.val\n[PROOFSTEP]\nconvert LinearIndependent.comp li f ?_\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\ns : Set M\nli : LinearIndependent R Subtype.val\nt : Finset ↑s\nf : { x // x ∈ Finset.map (Embedding.subtype s) t } → ↑s := fun x => { val := ↑x, property := (_ : ↑x ∈ s) }\n⊢ Injective f\n[PROOFSTEP]\nrintro ⟨x, hx⟩ ⟨y, hy⟩\n[GOAL]\ncase mk.mk\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx✝ y✝ : M\ns : Set M\nli : LinearIndependent R Subtype.val\nt : Finset ↑s\nf : { x // x ∈ Finset.map (Embedding.subtype s) t } → ↑s := fun x => { val := ↑x, property := (_ : ↑x ∈ s) }\nx : M\nhx : x ∈ Finset.map (Embedding.subtype s) t\ny : M\nhy : y ∈ Finset.map (Embedding.subtype s) t\n⊢ f { val := x, property := hx } = f { val := y, property := hy } →\n    { val := x, property := hx } = { val := y, property := hy }\n[PROOFSTEP]\nrw [Finset.mem_map] at hx hy \n[GOAL]\ncase mk.mk\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx✝ y✝ : M\ns : Set M\nli : LinearIndependent R Subtype.val\nt : Finset ↑s\nf : { x // x ∈ Finset.map (Embedding.subtype s) t } → ↑s := fun x => { val := ↑x, property := (_ : ↑x ∈ s) }\nx : M\nhx✝ : x ∈ Finset.map (Embedding.subtype s) t\nhx : ∃ a, a ∈ t ∧ ↑(Embedding.subtype s) a = x\ny : M\nhy✝ : y ∈ Finset.map (Embedding.subtype s) t\nhy : ∃ a, a ∈ t ∧ ↑(Embedding.subtype s) a = y\n⊢ f { val := x, property := hx✝ } = f { val := y, property := hy✝ } →\n    { val := x, property := hx✝ } = { val := y, property := hy✝ }\n[PROOFSTEP]\nobtain ⟨a, _ha, rfl⟩ := hx\n[GOAL]\ncase mk.mk.intro.intro\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na✝ b : R\nx y✝ : M\ns : Set M\nli : LinearIndependent R Subtype.val\nt : Finset ↑s\nf : { x // x ∈ Finset.map (Embedding.subtype s) t } → ↑s := fun x => { val := ↑x, property := (_ : ↑x ∈ s) }\ny : M\nhy✝ : y ∈ Finset.map (Embedding.subtype s) t\nhy : ∃ a, a ∈ t ∧ ↑(Embedding.subtype s) a = y\na : Subtype s\n_ha : a ∈ t\nhx : ↑(Embedding.subtype s) a ∈ Finset.map (Embedding.subtype s) t\n⊢ f { val := ↑(Embedding.subtype s) a, property := hx } = f { val := y, property := hy✝ } →\n    { val := ↑(Embedding.subtype s) a, property := hx } = { val := y, property := hy✝ }\n[PROOFSTEP]\nobtain ⟨b, _hb, rfl⟩ := hy\n[GOAL]\ncase mk.mk.intro.intro.intro.intro\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na✝ b✝ : R\nx y : M\ns : Set M\nli : LinearIndependent R Subtype.val\nt : Finset ↑s\nf : { x // x ∈ Finset.map (Embedding.subtype s) t } → ↑s := fun x => { val := ↑x, property := (_ : ↑x ∈ s) }\na : Subtype s\n_ha : a ∈ t\nhx : ↑(Embedding.subtype s) a ∈ Finset.map (Embedding.subtype s) t\nb : Subtype s\n_hb : b ∈ t\nhy : ↑(Embedding.subtype s) b ∈ Finset.map (Embedding.subtype s) t\n⊢ f { val := ↑(Embedding.subtype s) a, property := hx } = f { val := ↑(Embedding.subtype s) b, property := hy } →\n    { val := ↑(Embedding.subtype s) a, property := hx } = { val := ↑(Embedding.subtype s) b, property := hy }\n[PROOFSTEP]\nsimp only [imp_self, Subtype.mk_eq_mk]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nn : ℕ\nH : ∀ (s : Finset M), (LinearIndependent R fun i => ↑i) → Finset.card s ≤ n\n⊢ ∀ (s : Set M), LinearIndependent R Subtype.val → #↑s ≤ ↑n\n[PROOFSTEP]\nintro s li\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nn : ℕ\nH : ∀ (s : Finset M), (LinearIndependent R fun i => ↑i) → Finset.card s ≤ n\ns : Set M\nli : LinearIndependent R Subtype.val\n⊢ #↑s ≤ ↑n\n[PROOFSTEP]\napply Cardinal.card_le_of\n[GOAL]\ncase H\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nn : ℕ\nH : ∀ (s : Finset M), (LinearIndependent R fun i => ↑i) → Finset.card s ≤ n\ns : Set M\nli : LinearIndependent R Subtype.val\n⊢ ∀ (s_1 : Finset ↑s), Finset.card s_1 ≤ n\n[PROOFSTEP]\nintro t\n[GOAL]\ncase H\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nn : ℕ\nH : ∀ (s : Finset M), (LinearIndependent R fun i => ↑i) → Finset.card s ≤ n\ns : Set M\nli : LinearIndependent R Subtype.val\nt : Finset ↑s\n⊢ Finset.card t ≤ n\n[PROOFSTEP]\nrw [← Finset.card_map (Embedding.subtype s)]\n[GOAL]\ncase H\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nn : ℕ\nH : ∀ (s : Finset M), (LinearIndependent R fun i => ↑i) → Finset.card s ≤ n\ns : Set M\nli : LinearIndependent R Subtype.val\nt : Finset ↑s\n⊢ Finset.card (Finset.map (Embedding.subtype s) t) ≤ n\n[PROOFSTEP]\napply H\n[GOAL]\ncase H.a\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nn : ℕ\nH : ∀ (s : Finset M), (LinearIndependent R fun i => ↑i) → Finset.card s ≤ n\ns : Set M\nli : LinearIndependent R Subtype.val\nt : Finset ↑s\n⊢ LinearIndependent R fun i => ↑i\n[PROOFSTEP]\napply linearIndependent_finset_map_embedding_subtype _ li\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\ns : Set ι\n⊢ LinearIndependent R (v ∘ Subtype.val) ↔\n    ∀ (l : ι →₀ R), l ∈ Finsupp.supported R R s → ↑(Finsupp.total ι M R v) l = 0 → l = 0\n[PROOFSTEP]\nsimp only [linearIndependent_iff, (· ∘ ·), Finsupp.mem_supported, Finsupp.total_apply, Set.subset_def, Finset.mem_coe]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\ns : Set ι\n⊢ (∀ (l : ↑s →₀ R), (Finsupp.sum l fun i a => a • v ↑i) = 0 → l = 0) ↔\n    ∀ (l : ι →₀ R), (∀ (x : ι), x ∈ l.support → x ∈ s) → (Finsupp.sum l fun i a => a • v i) = 0 → l = 0\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\ns : Set ι\n⊢ (∀ (l : ↑s →₀ R), (Finsupp.sum l fun i a => a • v ↑i) = 0 → l = 0) →\n    ∀ (l : ι →₀ R), (∀ (x : ι), x ∈ l.support → x ∈ s) → (Finsupp.sum l fun i a => a • v i) = 0 → l = 0\n[PROOFSTEP]\nintro h l hl₁ hl₂\n[GOAL]\ncase mp\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\ns : Set ι\nh : ∀ (l : ↑s →₀ R), (Finsupp.sum l fun i a => a • v ↑i) = 0 → l = 0\nl : ι →₀ R\nhl₁ : ∀ (x : ι), x ∈ l.support → x ∈ s\nhl₂ : (Finsupp.sum l fun i a => a • v i) = 0\n⊢ l = 0\n[PROOFSTEP]\nhave := h (l.subtypeDomain s) ((Finsupp.sum_subtypeDomain_index hl₁).trans hl₂)\n[GOAL]\ncase mp\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\ns : Set ι\nh : ∀ (l : ↑s →₀ R), (Finsupp.sum l fun i a => a • v ↑i) = 0 → l = 0\nl : ι →₀ R\nhl₁ : ∀ (x : ι), x ∈ l.support → x ∈ s\nhl₂ : (Finsupp.sum l fun i a => a • v i) = 0\nthis : Finsupp.subtypeDomain s l = 0\n⊢ l = 0\n[PROOFSTEP]\nexact (Finsupp.subtypeDomain_eq_zero_iff hl₁).1 this\n[GOAL]\ncase mpr\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\ns : Set ι\n⊢ (∀ (l : ι →₀ R), (∀ (x : ι), x ∈ l.support → x ∈ s) → (Finsupp.sum l fun i a => a • v i) = 0 → l = 0) →\n    ∀ (l : ↑s →₀ R), (Finsupp.sum l fun i a => a • v ↑i) = 0 → l = 0\n[PROOFSTEP]\nintro h l hl\n[GOAL]\ncase mpr\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\ns : Set ι\nh : ∀ (l : ι →₀ R), (∀ (x : ι), x ∈ l.support → x ∈ s) → (Finsupp.sum l fun i a => a • v i) = 0 → l = 0\nl : ↑s →₀ R\nhl : (Finsupp.sum l fun i a => a • v ↑i) = 0\n⊢ l = 0\n[PROOFSTEP]\nrefine' Finsupp.embDomain_eq_zero.1 (h (l.embDomain <| Function.Embedding.subtype s) _ _)\n[GOAL]\ncase mpr.refine'_1\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\ns : Set ι\nh : ∀ (l : ι →₀ R), (∀ (x : ι), x ∈ l.support → x ∈ s) → (Finsupp.sum l fun i a => a • v i) = 0 → l = 0\nl : ↑s →₀ R\nhl : (Finsupp.sum l fun i a => a • v ↑i) = 0\n⊢ ∀ (x : ι), x ∈ (Finsupp.embDomain (Embedding.subtype s) l).support → x ∈ s\n[PROOFSTEP]\nsuffices ∀ i hi, ¬l ⟨i, hi⟩ = 0 → i ∈ s by simpa\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\ns : Set ι\nh : ∀ (l : ι →₀ R), (∀ (x : ι), x ∈ l.support → x ∈ s) → (Finsupp.sum l fun i a => a • v i) = 0 → l = 0\nl : ↑s →₀ R\nhl : (Finsupp.sum l fun i a => a • v ↑i) = 0\nthis : ∀ (i : ι) (hi : i ∈ s), ¬↑l { val := i, property := hi } = 0 → i ∈ s\n⊢ ∀ (x : ι), x ∈ (Finsupp.embDomain (Embedding.subtype s) l).support → x ∈ s\n[PROOFSTEP]\nsimpa\n[GOAL]\ncase mpr.refine'_1\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\ns : Set ι\nh : ∀ (l : ι →₀ R), (∀ (x : ι), x ∈ l.support → x ∈ s) → (Finsupp.sum l fun i a => a • v i) = 0 → l = 0\nl : ↑s →₀ R\nhl : (Finsupp.sum l fun i a => a • v ↑i) = 0\n⊢ ∀ (i : ι) (hi : i ∈ s), ¬↑l { val := i, property := hi } = 0 → i ∈ s\n[PROOFSTEP]\nintros\n[GOAL]\ncase mpr.refine'_1\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\ns : Set ι\nh : ∀ (l : ι →₀ R), (∀ (x : ι), x ∈ l.support → x ∈ s) → (Finsupp.sum l fun i a => a • v i) = 0 → l = 0\nl : ↑s →₀ R\nhl : (Finsupp.sum l fun i a => a • v ↑i) = 0\ni✝ : ι\nhi✝ : i✝ ∈ s\na✝ : ¬↑l { val := i✝, property := hi✝ } = 0\n⊢ i✝ ∈ s\n[PROOFSTEP]\nassumption\n[GOAL]\ncase mpr.refine'_2\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\ns : Set ι\nh : ∀ (l : ι →₀ R), (∀ (x : ι), x ∈ l.support → x ∈ s) → (Finsupp.sum l fun i a => a • v i) = 0 → l = 0\nl : ↑s →₀ R\nhl : (Finsupp.sum l fun i a => a • v ↑i) = 0\n⊢ (Finsupp.sum (Finsupp.embDomain (Embedding.subtype s) l) fun i a => a • v i) = 0\n[PROOFSTEP]\nrwa [Finsupp.embDomain_eq_mapDomain, Finsupp.sum_mapDomain_index]\n[GOAL]\ncase mpr.refine'_2.h_zero\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\ns : Set ι\nh : ∀ (l : ι →₀ R), (∀ (x : ι), x ∈ l.support → x ∈ s) → (Finsupp.sum l fun i a => a • v i) = 0 → l = 0\nl : ↑s →₀ R\nhl : (Finsupp.sum l fun i a => a • v ↑i) = 0\n⊢ ∀ (b : ι), 0 • v b = 0\ncase mpr.refine'_2.h_add\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\ns : Set ι\nh : ∀ (l : ι →₀ R), (∀ (x : ι), x ∈ l.support → x ∈ s) → (Finsupp.sum l fun i a => a • v i) = 0 → l = 0\nl : ↑s →₀ R\nhl : (Finsupp.sum l fun i a => a • v ↑i) = 0\n⊢ ∀ (b : ι) (m₁ m₂ : R), (m₁ + m₂) • v b = m₁ • v b + m₂ • v b\n[PROOFSTEP]\nexacts [fun _ => zero_smul _ _, fun _ _ _ => add_smul _ _ _]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\ns : Set ι\n⊢ ¬LinearIndependent R (v ∘ Subtype.val) ↔ ∃ f, f ∈ Finsupp.supported R R s ∧ ↑(Finsupp.total ι M R v) f = 0 ∧ f ≠ 0\n[PROOFSTEP]\nsimp [linearIndependent_comp_subtype, and_left_comm]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\ns : Set M\n⊢ (LinearIndependent R fun x => ↑x) ↔\n    ∀ (l : M →₀ R), l ∈ Finsupp.supported R R s → ↑(Finsupp.total M M R id) l = 0 → l = 0\n[PROOFSTEP]\napply @linearIndependent_comp_subtype _ _ _ id\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\ns : Set ι\n⊢ LinearIndependent R (v ∘ Subtype.val) ↔ Disjoint (Finsupp.supported R R s) (LinearMap.ker (Finsupp.total ι M R v))\n[PROOFSTEP]\nrw [linearIndependent_comp_subtype, LinearMap.disjoint_ker]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\ns : Set M\n⊢ (LinearIndependent R fun x => ↑x) ↔ Disjoint (Finsupp.supported R R s) (LinearMap.ker (Finsupp.total M M R id))\n[PROOFSTEP]\napply @linearIndependent_comp_subtype_disjoint _ _ _ id\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\ns : Set M\n⊢ (LinearIndependent R fun x => ↑x) ↔ LinearMap.ker (Finsupp.totalOn M M R id s) = ⊥\n[PROOFSTEP]\nrw [Finsupp.totalOn, LinearMap.ker, LinearMap.comap_codRestrict, Submodule.map_bot, comap_bot, LinearMap.ker_comp,\n  linearIndependent_subtype_disjoint, disjoint_iff_inf_le, ← map_comap_subtype, map_le_iff_le_comap, comap_bot,\n  ker_subtype, le_bot_iff]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\n⊢ LinearIndependent R fun x => ↑x\n[PROOFSTEP]\nsimp [linearIndependent_subtype_disjoint]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nt s : Set M\nh : t ⊆ s\n⊢ (LinearIndependent R fun x => ↑x) → LinearIndependent R fun x => ↑x\n[PROOFSTEP]\nsimp only [linearIndependent_subtype_disjoint]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nt s : Set M\nh : t ⊆ s\n⊢ Disjoint (Finsupp.supported R R s) (LinearMap.ker (Finsupp.total M M R id)) →\n    Disjoint (Finsupp.supported R R t) (LinearMap.ker (Finsupp.total M M R id))\n[PROOFSTEP]\nexact Disjoint.mono_left (Finsupp.supported_mono h)\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nη : Type u_8\ns : η → Set M\nhs : Directed (fun x x_1 => x ⊆ x_1) s\nh : ∀ (i : η), LinearIndependent R fun x => ↑x\n⊢ LinearIndependent R fun x => ↑x\n[PROOFSTEP]\nby_cases hη : Nonempty η\n[GOAL]\ncase pos\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nη : Type u_8\ns : η → Set M\nhs : Directed (fun x x_1 => x ⊆ x_1) s\nh : ∀ (i : η), LinearIndependent R fun x => ↑x\nhη : Nonempty η\n⊢ LinearIndependent R fun x => ↑x\n[PROOFSTEP]\nskip\n[GOAL]\ncase pos\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nη : Type u_8\ns : η → Set M\nhs : Directed (fun x x_1 => x ⊆ x_1) s\nh : ∀ (i : η), LinearIndependent R fun x => ↑x\nhη : Nonempty η\n⊢ LinearIndependent R fun x => ↑x\n[PROOFSTEP]\nrefine' linearIndependent_of_finite (⋃ i, s i) fun t ht ft => _\n[GOAL]\ncase pos\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nη : Type u_8\ns : η → Set M\nhs : Directed (fun x x_1 => x ⊆ x_1) s\nh : ∀ (i : η), LinearIndependent R fun x => ↑x\nhη : Nonempty η\nt : Set M\nht : t ⊆ ⋃ (i : η), s i\nft : Set.Finite t\n⊢ LinearIndependent R fun x => ↑x\n[PROOFSTEP]\nrcases finite_subset_iUnion ft ht with ⟨I, fi, hI⟩\n[GOAL]\ncase pos.intro.intro\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nη : Type u_8\ns : η → Set M\nhs : Directed (fun x x_1 => x ⊆ x_1) s\nh : ∀ (i : η), LinearIndependent R fun x => ↑x\nhη : Nonempty η\nt : Set M\nht : t ⊆ ⋃ (i : η), s i\nft : Set.Finite t\nI : Set η\nfi : Set.Finite I\nhI : t ⊆ ⋃ (i : η) (_ : i ∈ I), s i\n⊢ LinearIndependent R fun x => ↑x\n[PROOFSTEP]\nrcases hs.finset_le fi.toFinset with ⟨i, hi⟩\n[GOAL]\ncase pos.intro.intro.intro\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nη : Type u_8\ns : η → Set M\nhs : Directed (fun x x_1 => x ⊆ x_1) s\nh : ∀ (i : η), LinearIndependent R fun x => ↑x\nhη : Nonempty η\nt : Set M\nht : t ⊆ ⋃ (i : η), s i\nft : Set.Finite t\nI : Set η\nfi : Set.Finite I\nhI : t ⊆ ⋃ (i : η) (_ : i ∈ I), s i\ni : η\nhi : ∀ (i_1 : η), i_1 ∈ Finite.toFinset fi → s i_1 ⊆ s i\n⊢ LinearIndependent R fun x => ↑x\n[PROOFSTEP]\nexact (h i).mono (Subset.trans hI <| iUnion₂_subset fun j hj => hi j (fi.mem_toFinset.2 hj))\n[GOAL]\ncase neg\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nη : Type u_8\ns : η → Set M\nhs : Directed (fun x x_1 => x ⊆ x_1) s\nh : ∀ (i : η), LinearIndependent R fun x => ↑x\nhη : ¬Nonempty η\n⊢ LinearIndependent R fun x => ↑x\n[PROOFSTEP]\nrefine (linearIndependent_empty R M).mono (t := iUnion (s ·)) ?_\n[GOAL]\ncase neg\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nη : Type u_8\ns : η → Set M\nhs : Directed (fun x x_1 => x ⊆ x_1) s\nh : ∀ (i : η), LinearIndependent R fun x => ↑x\nhη : ¬Nonempty η\n⊢ ⋃ (x : η), s x ⊆ ∅\n[PROOFSTEP]\nrintro _ ⟨_, ⟨i, _⟩, _⟩\n[GOAL]\ncase neg.intro.intro.intro\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nη : Type u_8\ns : η → Set M\nhs : Directed (fun x x_1 => x ⊆ x_1) s\nh : ∀ (i : η), LinearIndependent R fun x => ↑x\nhη : ¬Nonempty η\na✝ : M\nw✝ : Set M\nright✝ : a✝ ∈ w✝\ni : η\nh✝ : (fun x => s x) i = w✝\n⊢ a✝ ∈ ∅\n[PROOFSTEP]\nexact hη ⟨i⟩\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\ns : Set (Set M)\nhs : DirectedOn (fun x x_1 => x ⊆ x_1) s\nh : ∀ (a : Set M), a ∈ s → LinearIndependent R Subtype.val\n⊢ LinearIndependent R fun x => ↑x\n[PROOFSTEP]\nrw [sUnion_eq_iUnion]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\ns : Set (Set M)\nhs : DirectedOn (fun x x_1 => x ⊆ x_1) s\nh : ∀ (a : Set M), a ∈ s → LinearIndependent R Subtype.val\n⊢ LinearIndependent R fun x => ↑x\n[PROOFSTEP]\nexact linearIndependent_iUnion_of_directed hs.directed_val (by simpa using h)\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\ns : Set (Set M)\nhs : DirectedOn (fun x x_1 => x ⊆ x_1) s\nh : ∀ (a : Set M), a ∈ s → LinearIndependent R Subtype.val\n⊢ ∀ (i : ↑s), LinearIndependent R fun x => ↑x\n[PROOFSTEP]\nsimpa using h\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nη : Type u_8\ns : Set η\nt : η → Set M\nhs : DirectedOn (t ⁻¹'o fun x x_1 => x ⊆ x_1) s\nh : ∀ (a : η), a ∈ s → LinearIndependent R fun x => ↑x\n⊢ LinearIndependent R fun x => ↑x\n[PROOFSTEP]\nrw [biUnion_eq_iUnion]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nη : Type u_8\ns : Set η\nt : η → Set M\nhs : DirectedOn (t ⁻¹'o fun x x_1 => x ⊆ x_1) s\nh : ∀ (a : η), a ∈ s → LinearIndependent R fun x => ↑x\n⊢ LinearIndependent R fun x => ↑x\n[PROOFSTEP]\nexact linearIndependent_iUnion_of_directed (directed_comp.2 <| hs.directed_val) (by simpa using h)\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Semiring R\ninst✝⁵ : AddCommMonoid M\ninst✝⁴ : AddCommMonoid M'\ninst✝³ : AddCommMonoid M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nη : Type u_8\ns : Set η\nt : η → Set M\nhs : DirectedOn (t ⁻¹'o fun x x_1 => x ⊆ x_1) s\nh : ∀ (a : η), a ∈ s → LinearIndependent R fun x => ↑x\n⊢ ∀ (i : ↑s), LinearIndependent R fun x => ↑x\n[PROOFSTEP]\nsimpa using h\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁷ : Ring R\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M'\ninst✝⁴ : AddCommGroup M''\ninst✝³ : Module R M\ninst✝² : Module R M'\ninst✝¹ : Module R M''\na b : R\nx y : M\ninst✝ : Nontrivial R\nhv : LinearIndependent R v\n⊢ Injective v\n[PROOFSTEP]\nintro i j hij\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁷ : Ring R\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M'\ninst✝⁴ : AddCommGroup M''\ninst✝³ : Module R M\ninst✝² : Module R M'\ninst✝¹ : Module R M''\na b : R\nx y : M\ninst✝ : Nontrivial R\nhv : LinearIndependent R v\ni j : ι\nhij : v i = v j\n⊢ i = j\n[PROOFSTEP]\nlet l : ι →₀ R := Finsupp.single i (1 : R) - Finsupp.single j 1\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁷ : Ring R\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M'\ninst✝⁴ : AddCommGroup M''\ninst✝³ : Module R M\ninst✝² : Module R M'\ninst✝¹ : Module R M''\na b : R\nx y : M\ninst✝ : Nontrivial R\nhv : LinearIndependent R v\ni j : ι\nhij : v i = v j\nl : ι →₀ R := Finsupp.single i 1 - Finsupp.single j 1\n⊢ i = j\n[PROOFSTEP]\nhave h_total : Finsupp.total ι M R v l = 0 :=\n  by\n  simp_rw [LinearMap.map_sub, Finsupp.total_apply]\n  simp [hij]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁷ : Ring R\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M'\ninst✝⁴ : AddCommGroup M''\ninst✝³ : Module R M\ninst✝² : Module R M'\ninst✝¹ : Module R M''\na b : R\nx y : M\ninst✝ : Nontrivial R\nhv : LinearIndependent R v\ni j : ι\nhij : v i = v j\nl : ι →₀ R := Finsupp.single i 1 - Finsupp.single j 1\n⊢ ↑(Finsupp.total ι M R v) l = 0\n[PROOFSTEP]\nsimp_rw [LinearMap.map_sub, Finsupp.total_apply]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁷ : Ring R\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M'\ninst✝⁴ : AddCommGroup M''\ninst✝³ : Module R M\ninst✝² : Module R M'\ninst✝¹ : Module R M''\na b : R\nx y : M\ninst✝ : Nontrivial R\nhv : LinearIndependent R v\ni j : ι\nhij : v i = v j\nl : ι →₀ R := Finsupp.single i 1 - Finsupp.single j 1\n⊢ ((Finsupp.sum (Finsupp.single i 1) fun i a => a • v i) - Finsupp.sum (Finsupp.single j 1) fun i a => a • v i) = 0\n[PROOFSTEP]\nsimp [hij]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁷ : Ring R\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M'\ninst✝⁴ : AddCommGroup M''\ninst✝³ : Module R M\ninst✝² : Module R M'\ninst✝¹ : Module R M''\na b : R\nx y : M\ninst✝ : Nontrivial R\nhv : LinearIndependent R v\ni j : ι\nhij : v i = v j\nl : ι →₀ R := Finsupp.single i 1 - Finsupp.single j 1\nh_total : ↑(Finsupp.total ι M R v) l = 0\n⊢ i = j\n[PROOFSTEP]\nhave h_single_eq : Finsupp.single i (1 : R) = Finsupp.single j 1 :=\n  by\n  rw [linearIndependent_iff] at hv \n  simp [eq_add_of_sub_eq' (hv l h_total)]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁷ : Ring R\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M'\ninst✝⁴ : AddCommGroup M''\ninst✝³ : Module R M\ninst✝² : Module R M'\ninst✝¹ : Module R M''\na b : R\nx y : M\ninst✝ : Nontrivial R\nhv : LinearIndependent R v\ni j : ι\nhij : v i = v j\nl : ι →₀ R := Finsupp.single i 1 - Finsupp.single j 1\nh_total : ↑(Finsupp.total ι M R v) l = 0\n⊢ Finsupp.single i 1 = Finsupp.single j 1\n[PROOFSTEP]\nrw [linearIndependent_iff] at hv \n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁷ : Ring R\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M'\ninst✝⁴ : AddCommGroup M''\ninst✝³ : Module R M\ninst✝² : Module R M'\ninst✝¹ : Module R M''\na b : R\nx y : M\ninst✝ : Nontrivial R\nhv : ∀ (l : ι →₀ R), ↑(Finsupp.total ι M R v) l = 0 → l = 0\ni j : ι\nhij : v i = v j\nl : ι →₀ R := Finsupp.single i 1 - Finsupp.single j 1\nh_total : ↑(Finsupp.total ι M R v) l = 0\n⊢ Finsupp.single i 1 = Finsupp.single j 1\n[PROOFSTEP]\nsimp [eq_add_of_sub_eq' (hv l h_total)]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁷ : Ring R\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M'\ninst✝⁴ : AddCommGroup M''\ninst✝³ : Module R M\ninst✝² : Module R M'\ninst✝¹ : Module R M''\na b : R\nx y : M\ninst✝ : Nontrivial R\nhv : LinearIndependent R v\ni j : ι\nhij : v i = v j\nl : ι →₀ R := Finsupp.single i 1 - Finsupp.single j 1\nh_total : ↑(Finsupp.total ι M R v) l = 0\nh_single_eq : Finsupp.single i 1 = Finsupp.single j 1\n⊢ i = j\n[PROOFSTEP]\nsimpa [Finsupp.single_eq_single_iff] using h_single_eq\n[GOAL]\nι✝ : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι✝ → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nι : Type u_8\nf : ι → M\nhf : LinearIndependent R f\n⊢ LinearIndependent R Subtype.val\n[PROOFSTEP]\nnontriviality R\n[GOAL]\nι✝ : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι✝ → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nι : Type u_8\nf : ι → M\nhf : LinearIndependent R f\n✝ : Nontrivial R\n⊢ LinearIndependent R Subtype.val\n[PROOFSTEP]\nexact (linearIndependent_subtype_range hf.injective).2 hf\n[GOAL]\nι✝ : Type u'\nι'✝ : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι✝ → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nι : Type u_8\nι' : Type u_9\ns : Set ι\nf : ι → ι'\ng : ι' → M\nhs : LinearIndependent R fun x => g (f ↑x)\n⊢ LinearIndependent R fun x => g ↑x\n[PROOFSTEP]\nnontriviality R\n[GOAL]\nι✝ : Type u'\nι'✝ : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι✝ → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nι : Type u_8\nι' : Type u_9\ns : Set ι\nf : ι → ι'\ng : ι' → M\nhs : LinearIndependent R fun x => g (f ↑x)\n✝ : Nontrivial R\n⊢ LinearIndependent R fun x => g ↑x\n[PROOFSTEP]\nhave : InjOn f s := injOn_iff_injective.2 hs.injective.of_comp\n[GOAL]\nι✝ : Type u'\nι'✝ : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι✝ → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nι : Type u_8\nι' : Type u_9\ns : Set ι\nf : ι → ι'\ng : ι' → M\nhs : LinearIndependent R fun x => g (f ↑x)\n✝ : Nontrivial R\nthis : InjOn f s\n⊢ LinearIndependent R fun x => g ↑x\n[PROOFSTEP]\nexact (linearIndependent_equiv' (Equiv.Set.imageOfInjOn f s this) rfl).1 hs\n[GOAL]\nι✝ : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι✝ → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nι : Type u_8\ns : Set ι\nf : ι → M\nhs : LinearIndependent R fun x => f ↑x\n⊢ LinearIndependent R fun x => ↑x\n[PROOFSTEP]\nconvert LinearIndependent.image_of_comp s f id hs\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv✝ : ι → M\ninst✝¹⁰ : Ring R\ninst✝⁹ : AddCommGroup M\ninst✝⁸ : AddCommGroup M'\ninst✝⁷ : AddCommGroup M''\ninst✝⁶ : Module R M\ninst✝⁵ : Module R M'\ninst✝⁴ : Module R M''\na b : R\nx y : M\nG : Type u_8\nhG : Group G\ninst✝³ : DistribMulAction G R\ninst✝² : DistribMulAction G M\ninst✝¹ : IsScalarTower G R M\ninst✝ : SMulCommClass G R M\nv : ι → M\nhv : LinearIndependent R v\nw : ι → G\n⊢ LinearIndependent R (w • v)\n[PROOFSTEP]\nrw [linearIndependent_iff''] at hv ⊢\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv✝ : ι → M\ninst✝¹⁰ : Ring R\ninst✝⁹ : AddCommGroup M\ninst✝⁸ : AddCommGroup M'\ninst✝⁷ : AddCommGroup M''\ninst✝⁶ : Module R M\ninst✝⁵ : Module R M'\ninst✝⁴ : Module R M''\na b : R\nx y : M\nG : Type u_8\nhG : Group G\ninst✝³ : DistribMulAction G R\ninst✝² : DistribMulAction G M\ninst✝¹ : IsScalarTower G R M\ninst✝ : SMulCommClass G R M\nv : ι → M\nhv : ∀ (s : Finset ι) (g : ι → R), (∀ (i : ι), ¬i ∈ s → g i = 0) → ∑ i in s, g i • v i = 0 → ∀ (i : ι), g i = 0\nw : ι → G\n⊢ ∀ (s : Finset ι) (g : ι → R), (∀ (i : ι), ¬i ∈ s → g i = 0) → ∑ i in s, g i • (w • v) i = 0 → ∀ (i : ι), g i = 0\n[PROOFSTEP]\nintro s g hgs hsum i\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv✝ : ι → M\ninst✝¹⁰ : Ring R\ninst✝⁹ : AddCommGroup M\ninst✝⁸ : AddCommGroup M'\ninst✝⁷ : AddCommGroup M''\ninst✝⁶ : Module R M\ninst✝⁵ : Module R M'\ninst✝⁴ : Module R M''\na b : R\nx y : M\nG : Type u_8\nhG : Group G\ninst✝³ : DistribMulAction G R\ninst✝² : DistribMulAction G M\ninst✝¹ : IsScalarTower G R M\ninst✝ : SMulCommClass G R M\nv : ι → M\nhv : ∀ (s : Finset ι) (g : ι → R), (∀ (i : ι), ¬i ∈ s → g i = 0) → ∑ i in s, g i • v i = 0 → ∀ (i : ι), g i = 0\nw : ι → G\ns : Finset ι\ng : ι → R\nhgs : ∀ (i : ι), ¬i ∈ s → g i = 0\nhsum : ∑ i in s, g i • (w • v) i = 0\ni : ι\n⊢ g i = 0\n[PROOFSTEP]\nrefine' (smul_eq_zero_iff_eq (w i)).1 _\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv✝ : ι → M\ninst✝¹⁰ : Ring R\ninst✝⁹ : AddCommGroup M\ninst✝⁸ : AddCommGroup M'\ninst✝⁷ : AddCommGroup M''\ninst✝⁶ : Module R M\ninst✝⁵ : Module R M'\ninst✝⁴ : Module R M''\na b : R\nx y : M\nG : Type u_8\nhG : Group G\ninst✝³ : DistribMulAction G R\ninst✝² : DistribMulAction G M\ninst✝¹ : IsScalarTower G R M\ninst✝ : SMulCommClass G R M\nv : ι → M\nhv : ∀ (s : Finset ι) (g : ι → R), (∀ (i : ι), ¬i ∈ s → g i = 0) → ∑ i in s, g i • v i = 0 → ∀ (i : ι), g i = 0\nw : ι → G\ns : Finset ι\ng : ι → R\nhgs : ∀ (i : ι), ¬i ∈ s → g i = 0\nhsum : ∑ i in s, g i • (w • v) i = 0\ni : ι\n⊢ w i • g i = 0\n[PROOFSTEP]\nrefine' hv s (fun i => w i • g i) (fun i hi => _) _ i\n[GOAL]\ncase refine'_1\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv✝ : ι → M\ninst✝¹⁰ : Ring R\ninst✝⁹ : AddCommGroup M\ninst✝⁸ : AddCommGroup M'\ninst✝⁷ : AddCommGroup M''\ninst✝⁶ : Module R M\ninst✝⁵ : Module R M'\ninst✝⁴ : Module R M''\na b : R\nx y : M\nG : Type u_8\nhG : Group G\ninst✝³ : DistribMulAction G R\ninst✝² : DistribMulAction G M\ninst✝¹ : IsScalarTower G R M\ninst✝ : SMulCommClass G R M\nv : ι → M\nhv : ∀ (s : Finset ι) (g : ι → R), (∀ (i : ι), ¬i ∈ s → g i = 0) → ∑ i in s, g i • v i = 0 → ∀ (i : ι), g i = 0\nw : ι → G\ns : Finset ι\ng : ι → R\nhgs : ∀ (i : ι), ¬i ∈ s → g i = 0\nhsum : ∑ i in s, g i • (w • v) i = 0\ni✝ i : ι\nhi : ¬i ∈ s\n⊢ (fun i => w i • g i) i = 0\n[PROOFSTEP]\ndsimp only\n[GOAL]\ncase refine'_1\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv✝ : ι → M\ninst✝¹⁰ : Ring R\ninst✝⁹ : AddCommGroup M\ninst✝⁸ : AddCommGroup M'\ninst✝⁷ : AddCommGroup M''\ninst✝⁶ : Module R M\ninst✝⁵ : Module R M'\ninst✝⁴ : Module R M''\na b : R\nx y : M\nG : Type u_8\nhG : Group G\ninst✝³ : DistribMulAction G R\ninst✝² : DistribMulAction G M\ninst✝¹ : IsScalarTower G R M\ninst✝ : SMulCommClass G R M\nv : ι → M\nhv : ∀ (s : Finset ι) (g : ι → R), (∀ (i : ι), ¬i ∈ s → g i = 0) → ∑ i in s, g i • v i = 0 → ∀ (i : ι), g i = 0\nw : ι → G\ns : Finset ι\ng : ι → R\nhgs : ∀ (i : ι), ¬i ∈ s → g i = 0\nhsum : ∑ i in s, g i • (w • v) i = 0\ni✝ i : ι\nhi : ¬i ∈ s\n⊢ w i • g i = 0\n[PROOFSTEP]\nexact (hgs i hi).symm ▸ smul_zero _\n[GOAL]\ncase refine'_2\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv✝ : ι → M\ninst✝¹⁰ : Ring R\ninst✝⁹ : AddCommGroup M\ninst✝⁸ : AddCommGroup M'\ninst✝⁷ : AddCommGroup M''\ninst✝⁶ : Module R M\ninst✝⁵ : Module R M'\ninst✝⁴ : Module R M''\na b : R\nx y : M\nG : Type u_8\nhG : Group G\ninst✝³ : DistribMulAction G R\ninst✝² : DistribMulAction G M\ninst✝¹ : IsScalarTower G R M\ninst✝ : SMulCommClass G R M\nv : ι → M\nhv : ∀ (s : Finset ι) (g : ι → R), (∀ (i : ι), ¬i ∈ s → g i = 0) → ∑ i in s, g i • v i = 0 → ∀ (i : ι), g i = 0\nw : ι → G\ns : Finset ι\ng : ι → R\nhgs : ∀ (i : ι), ¬i ∈ s → g i = 0\nhsum : ∑ i in s, g i • (w • v) i = 0\ni : ι\n⊢ ∑ i in s, (fun i => w i • g i) i • v i = 0\n[PROOFSTEP]\nrw [← hsum, Finset.sum_congr rfl _]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv✝ : ι → M\ninst✝¹⁰ : Ring R\ninst✝⁹ : AddCommGroup M\ninst✝⁸ : AddCommGroup M'\ninst✝⁷ : AddCommGroup M''\ninst✝⁶ : Module R M\ninst✝⁵ : Module R M'\ninst✝⁴ : Module R M''\na b : R\nx y : M\nG : Type u_8\nhG : Group G\ninst✝³ : DistribMulAction G R\ninst✝² : DistribMulAction G M\ninst✝¹ : IsScalarTower G R M\ninst✝ : SMulCommClass G R M\nv : ι → M\nhv : ∀ (s : Finset ι) (g : ι → R), (∀ (i : ι), ¬i ∈ s → g i = 0) → ∑ i in s, g i • v i = 0 → ∀ (i : ι), g i = 0\nw : ι → G\ns : Finset ι\ng : ι → R\nhgs : ∀ (i : ι), ¬i ∈ s → g i = 0\nhsum : ∑ i in s, g i • (w • v) i = 0\ni : ι\n⊢ ∀ (x : ι), x ∈ s → (fun i => w i • g i) x • v x = g x • (w • v) x\n[PROOFSTEP]\nintros\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv✝ : ι → M\ninst✝¹⁰ : Ring R\ninst✝⁹ : AddCommGroup M\ninst✝⁸ : AddCommGroup M'\ninst✝⁷ : AddCommGroup M''\ninst✝⁶ : Module R M\ninst✝⁵ : Module R M'\ninst✝⁴ : Module R M''\na b : R\nx y : M\nG : Type u_8\nhG : Group G\ninst✝³ : DistribMulAction G R\ninst✝² : DistribMulAction G M\ninst✝¹ : IsScalarTower G R M\ninst✝ : SMulCommClass G R M\nv : ι → M\nhv : ∀ (s : Finset ι) (g : ι → R), (∀ (i : ι), ¬i ∈ s → g i = 0) → ∑ i in s, g i • v i = 0 → ∀ (i : ι), g i = 0\nw : ι → G\ns : Finset ι\ng : ι → R\nhgs : ∀ (i : ι), ¬i ∈ s → g i = 0\nhsum : ∑ i in s, g i • (w • v) i = 0\ni x✝ : ι\na✝ : x✝ ∈ s\n⊢ (fun i => w i • g i) x✝ • v x✝ = g x✝ • (w • v) x✝\n[PROOFSTEP]\nerw [Pi.smul_apply, smul_assoc, smul_comm]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv✝ : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nv : ι → M\nhv : LinearIndependent R v\nw : ι → Rˣ\n⊢ LinearIndependent R (w • v)\n[PROOFSTEP]\nrw [linearIndependent_iff''] at hv ⊢\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv✝ : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nv : ι → M\nhv : ∀ (s : Finset ι) (g : ι → R), (∀ (i : ι), ¬i ∈ s → g i = 0) → ∑ i in s, g i • v i = 0 → ∀ (i : ι), g i = 0\nw : ι → Rˣ\n⊢ ∀ (s : Finset ι) (g : ι → R), (∀ (i : ι), ¬i ∈ s → g i = 0) → ∑ i in s, g i • (w • v) i = 0 → ∀ (i : ι), g i = 0\n[PROOFSTEP]\nintro s g hgs hsum i\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv✝ : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nv : ι → M\nhv : ∀ (s : Finset ι) (g : ι → R), (∀ (i : ι), ¬i ∈ s → g i = 0) → ∑ i in s, g i • v i = 0 → ∀ (i : ι), g i = 0\nw : ι → Rˣ\ns : Finset ι\ng : ι → R\nhgs : ∀ (i : ι), ¬i ∈ s → g i = 0\nhsum : ∑ i in s, g i • (w • v) i = 0\ni : ι\n⊢ g i = 0\n[PROOFSTEP]\nrw [← (w i).mul_left_eq_zero]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv✝ : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nv : ι → M\nhv : ∀ (s : Finset ι) (g : ι → R), (∀ (i : ι), ¬i ∈ s → g i = 0) → ∑ i in s, g i • v i = 0 → ∀ (i : ι), g i = 0\nw : ι → Rˣ\ns : Finset ι\ng : ι → R\nhgs : ∀ (i : ι), ¬i ∈ s → g i = 0\nhsum : ∑ i in s, g i • (w • v) i = 0\ni : ι\n⊢ g i * ↑(w i) = 0\n[PROOFSTEP]\nrefine' hv s (fun i => g i • (w i : R)) (fun i hi => _) _ i\n[GOAL]\ncase refine'_1\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv✝ : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nv : ι → M\nhv : ∀ (s : Finset ι) (g : ι → R), (∀ (i : ι), ¬i ∈ s → g i = 0) → ∑ i in s, g i • v i = 0 → ∀ (i : ι), g i = 0\nw : ι → Rˣ\ns : Finset ι\ng : ι → R\nhgs : ∀ (i : ι), ¬i ∈ s → g i = 0\nhsum : ∑ i in s, g i • (w • v) i = 0\ni✝ i : ι\nhi : ¬i ∈ s\n⊢ (fun i => g i • ↑(w i)) i = 0\n[PROOFSTEP]\ndsimp only\n[GOAL]\ncase refine'_1\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv✝ : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nv : ι → M\nhv : ∀ (s : Finset ι) (g : ι → R), (∀ (i : ι), ¬i ∈ s → g i = 0) → ∑ i in s, g i • v i = 0 → ∀ (i : ι), g i = 0\nw : ι → Rˣ\ns : Finset ι\ng : ι → R\nhgs : ∀ (i : ι), ¬i ∈ s → g i = 0\nhsum : ∑ i in s, g i • (w • v) i = 0\ni✝ i : ι\nhi : ¬i ∈ s\n⊢ g i • ↑(w i) = 0\n[PROOFSTEP]\nexact (hgs i hi).symm ▸ zero_smul _ _\n[GOAL]\ncase refine'_2\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv✝ : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nv : ι → M\nhv : ∀ (s : Finset ι) (g : ι → R), (∀ (i : ι), ¬i ∈ s → g i = 0) → ∑ i in s, g i • v i = 0 → ∀ (i : ι), g i = 0\nw : ι → Rˣ\ns : Finset ι\ng : ι → R\nhgs : ∀ (i : ι), ¬i ∈ s → g i = 0\nhsum : ∑ i in s, g i • (w • v) i = 0\ni : ι\n⊢ ∑ i in s, (fun i => g i • ↑(w i)) i • v i = 0\n[PROOFSTEP]\nrw [← hsum, Finset.sum_congr rfl _]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv✝ : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nv : ι → M\nhv : ∀ (s : Finset ι) (g : ι → R), (∀ (i : ι), ¬i ∈ s → g i = 0) → ∑ i in s, g i • v i = 0 → ∀ (i : ι), g i = 0\nw : ι → Rˣ\ns : Finset ι\ng : ι → R\nhgs : ∀ (i : ι), ¬i ∈ s → g i = 0\nhsum : ∑ i in s, g i • (w • v) i = 0\ni : ι\n⊢ ∀ (x : ι), x ∈ s → (fun i => g i • ↑(w i)) x • v x = g x • (w • v) x\n[PROOFSTEP]\nintros\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv✝ : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nv : ι → M\nhv : ∀ (s : Finset ι) (g : ι → R), (∀ (i : ι), ¬i ∈ s → g i = 0) → ∑ i in s, g i • v i = 0 → ∀ (i : ι), g i = 0\nw : ι → Rˣ\ns : Finset ι\ng : ι → R\nhgs : ∀ (i : ι), ¬i ∈ s → g i = 0\nhsum : ∑ i in s, g i • (w • v) i = 0\ni x✝ : ι\na✝ : x✝ ∈ s\n⊢ (fun i => g i • ↑(w i)) x✝ • v x✝ = g x✝ • (w • v) x✝\n[PROOFSTEP]\nerw [Pi.smul_apply, smul_assoc]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv✝ : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nv : ι → M\nhv : ∀ (s : Finset ι) (g : ι → R), (∀ (i : ι), ¬i ∈ s → g i = 0) → ∑ i in s, g i • v i = 0 → ∀ (i : ι), g i = 0\nw : ι → Rˣ\ns : Finset ι\ng : ι → R\nhgs : ∀ (i : ι), ¬i ∈ s → g i = 0\nhsum : ∑ i in s, g i • (w • v) i = 0\ni x✝ : ι\na✝ : x✝ ∈ s\n⊢ g x✝ • ↑(w x✝) • v x✝ = g x✝ • w x✝ • v x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx✝ y✝ x y : M\nh : LinearIndependent R ![x, y]\ns t s' t' : R\nh' : s • x + t • y = s' • x + t' • y\n⊢ s = s' ∧ t = t'\n[PROOFSTEP]\nhave : (s - s') • x + (t - t') • y = 0 :=\n  by\n  rw [← sub_eq_zero_of_eq h', ← sub_eq_zero]\n  simp only [sub_smul]\n  abel\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx✝ y✝ x y : M\nh : LinearIndependent R ![x, y]\ns t s' t' : R\nh' : s • x + t • y = s' • x + t' • y\n⊢ (s - s') • x + (t - t') • y = 0\n[PROOFSTEP]\nrw [← sub_eq_zero_of_eq h', ← sub_eq_zero]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx✝ y✝ x y : M\nh : LinearIndependent R ![x, y]\ns t s' t' : R\nh' : s • x + t • y = s' • x + t' • y\n⊢ (s - s') • x + (t - t') • y - (s • x + t • y - (s' • x + t' • y)) = 0\n[PROOFSTEP]\nsimp only [sub_smul]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx✝ y✝ x y : M\nh : LinearIndependent R ![x, y]\ns t s' t' : R\nh' : s • x + t • y = s' • x + t' • y\n⊢ s • x - s' • x + (t • y - t' • y) - (s • x + t • y - (s' • x + t' • y)) = 0\n[PROOFSTEP]\nabel\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx✝ y✝ x y : M\nh : LinearIndependent R ![x, y]\ns t s' t' : R\nh' : s • x + t • y = s' • x + t' • y\n⊢ s • x - s' • x + (t • y - t' • y) - (s • x + t • y - (s' • x + t' • y)) = 0\n[PROOFSTEP]\nabel\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx✝ y✝ x y : M\nh : LinearIndependent R ![x, y]\ns t s' t' : R\nh' : s • x + t • y = s' • x + t' • y\nthis : (s - s') • x + (t - t') • y = 0\n⊢ s = s' ∧ t = t'\n[PROOFSTEP]\nsimpa [sub_eq_zero] using h.eq_zero_of_pair this\n[GOAL]\nι✝ : Type u'\nι' : Type u_1\nR✝ : Type u_2\nK : Type u_3\nM✝ : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv✝ : ι✝ → M✝\ninst✝¹⁰ : Ring R✝\ninst✝⁹ : AddCommGroup M✝\ninst✝⁸ : AddCommGroup M'\ninst✝⁷ : AddCommGroup M''\ninst✝⁶ : Module R✝ M✝\ninst✝⁵ : Module R✝ M'\ninst✝⁴ : Module R✝ M''\na b : R✝\nx y : M✝\nι : Type w\nR : Type u\ninst✝³ : Ring R\ninst✝² : Nontrivial R\nM : Type v\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nv : ι → M\ni : LinearIndependent R v\n⊢ Maximal i ↔ ∀ (κ : Type v) (w : κ → M), LinearIndependent R w → ∀ (j : ι → κ), w ∘ j = v → Surjective j\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nι✝ : Type u'\nι' : Type u_1\nR✝ : Type u_2\nK : Type u_3\nM✝ : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv✝ : ι✝ → M✝\ninst✝¹⁰ : Ring R✝\ninst✝⁹ : AddCommGroup M✝\ninst✝⁸ : AddCommGroup M'\ninst✝⁷ : AddCommGroup M''\ninst✝⁶ : Module R✝ M✝\ninst✝⁵ : Module R✝ M'\ninst✝⁴ : Module R✝ M''\na b : R✝\nx y : M✝\nι : Type w\nR : Type u\ninst✝³ : Ring R\ninst✝² : Nontrivial R\nM : Type v\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nv : ι → M\ni : LinearIndependent R v\n⊢ Maximal i → ∀ (κ : Type v) (w : κ → M), LinearIndependent R w → ∀ (j : ι → κ), w ∘ j = v → Surjective j\n[PROOFSTEP]\nrintro p κ w i' j rfl\n[GOAL]\ncase mp\nι✝ : Type u'\nι' : Type u_1\nR✝ : Type u_2\nK : Type u_3\nM✝ : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι✝ → M✝\ninst✝¹⁰ : Ring R✝\ninst✝⁹ : AddCommGroup M✝\ninst✝⁸ : AddCommGroup M'\ninst✝⁷ : AddCommGroup M''\ninst✝⁶ : Module R✝ M✝\ninst✝⁵ : Module R✝ M'\ninst✝⁴ : Module R✝ M''\na b : R✝\nx y : M✝\nι : Type w\nR : Type u\ninst✝³ : Ring R\ninst✝² : Nontrivial R\nM : Type v\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nκ : Type v\nw : κ → M\ni' : LinearIndependent R w\nj : ι → κ\ni : LinearIndependent R (w ∘ j)\np : Maximal i\n⊢ Surjective j\n[PROOFSTEP]\nspecialize p (range w) i'.coe_range (range_comp_subset_range _ _)\n[GOAL]\ncase mp\nι✝ : Type u'\nι' : Type u_1\nR✝ : Type u_2\nK : Type u_3\nM✝ : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι✝ → M✝\ninst✝¹⁰ : Ring R✝\ninst✝⁹ : AddCommGroup M✝\ninst✝⁸ : AddCommGroup M'\ninst✝⁷ : AddCommGroup M''\ninst✝⁶ : Module R✝ M✝\ninst✝⁵ : Module R✝ M'\ninst✝⁴ : Module R✝ M''\na b : R✝\nx y : M✝\nι : Type w\nR : Type u\ninst✝³ : Ring R\ninst✝² : Nontrivial R\nM : Type v\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nκ : Type v\nw : κ → M\ni' : LinearIndependent R w\nj : ι → κ\ni : LinearIndependent R (w ∘ j)\np : range (w ∘ j) = range w\n⊢ Surjective j\n[PROOFSTEP]\nrw [range_comp, ← @image_univ _ _ w] at p \n[GOAL]\ncase mp\nι✝ : Type u'\nι' : Type u_1\nR✝ : Type u_2\nK : Type u_3\nM✝ : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι✝ → M✝\ninst✝¹⁰ : Ring R✝\ninst✝⁹ : AddCommGroup M✝\ninst✝⁸ : AddCommGroup M'\ninst✝⁷ : AddCommGroup M''\ninst✝⁶ : Module R✝ M✝\ninst✝⁵ : Module R✝ M'\ninst✝⁴ : Module R✝ M''\na b : R✝\nx y : M✝\nι : Type w\nR : Type u\ninst✝³ : Ring R\ninst✝² : Nontrivial R\nM : Type v\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nκ : Type v\nw : κ → M\ni' : LinearIndependent R w\nj : ι → κ\ni : LinearIndependent R (w ∘ j)\np : w '' range j = w '' univ\n⊢ Surjective j\n[PROOFSTEP]\nexact range_iff_surjective.mp (image_injective.mpr i'.injective p)\n[GOAL]\ncase mpr\nι✝ : Type u'\nι' : Type u_1\nR✝ : Type u_2\nK : Type u_3\nM✝ : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv✝ : ι✝ → M✝\ninst✝¹⁰ : Ring R✝\ninst✝⁹ : AddCommGroup M✝\ninst✝⁸ : AddCommGroup M'\ninst✝⁷ : AddCommGroup M''\ninst✝⁶ : Module R✝ M✝\ninst✝⁵ : Module R✝ M'\ninst✝⁴ : Module R✝ M''\na b : R✝\nx y : M✝\nι : Type w\nR : Type u\ninst✝³ : Ring R\ninst✝² : Nontrivial R\nM : Type v\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nv : ι → M\ni : LinearIndependent R v\n⊢ (∀ (κ : Type v) (w : κ → M), LinearIndependent R w → ∀ (j : ι → κ), w ∘ j = v → Surjective j) → Maximal i\n[PROOFSTEP]\nintro p w i' h\n[GOAL]\ncase mpr\nι✝ : Type u'\nι' : Type u_1\nR✝ : Type u_2\nK : Type u_3\nM✝ : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv✝ : ι✝ → M✝\ninst✝¹⁰ : Ring R✝\ninst✝⁹ : AddCommGroup M✝\ninst✝⁸ : AddCommGroup M'\ninst✝⁷ : AddCommGroup M''\ninst✝⁶ : Module R✝ M✝\ninst✝⁵ : Module R✝ M'\ninst✝⁴ : Module R✝ M''\na b : R✝\nx y : M✝\nι : Type w\nR : Type u\ninst✝³ : Ring R\ninst✝² : Nontrivial R\nM : Type v\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nv : ι → M\ni : LinearIndependent R v\np : ∀ (κ : Type v) (w : κ → M), LinearIndependent R w → ∀ (j : ι → κ), w ∘ j = v → Surjective j\nw : Set M\ni' : LinearIndependent R Subtype.val\nh : range v ≤ w\n⊢ range v = w\n[PROOFSTEP]\nspecialize\n  p w ((↑) : w → M) i' (fun i => ⟨v i, range_subset_iff.mp h i⟩)\n    (by\n      ext\n      simp)\n[GOAL]\nι✝ : Type u'\nι' : Type u_1\nR✝ : Type u_2\nK : Type u_3\nM✝ : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv✝ : ι✝ → M✝\ninst✝¹⁰ : Ring R✝\ninst✝⁹ : AddCommGroup M✝\ninst✝⁸ : AddCommGroup M'\ninst✝⁷ : AddCommGroup M''\ninst✝⁶ : Module R✝ M✝\ninst✝⁵ : Module R✝ M'\ninst✝⁴ : Module R✝ M''\na b : R✝\nx y : M✝\nι : Type w\nR : Type u\ninst✝³ : Ring R\ninst✝² : Nontrivial R\nM : Type v\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nv : ι → M\ni : LinearIndependent R v\np : ∀ (κ : Type v) (w : κ → M), LinearIndependent R w → ∀ (j : ι → κ), w ∘ j = v → Surjective j\nw : Set M\ni' : LinearIndependent R Subtype.val\nh : range v ≤ w\n⊢ (Subtype.val ∘ fun i => { val := v i, property := (_ : v i ∈ w) }) = v\n[PROOFSTEP]\next\n[GOAL]\ncase h\nι✝ : Type u'\nι' : Type u_1\nR✝ : Type u_2\nK : Type u_3\nM✝ : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv✝ : ι✝ → M✝\ninst✝¹⁰ : Ring R✝\ninst✝⁹ : AddCommGroup M✝\ninst✝⁸ : AddCommGroup M'\ninst✝⁷ : AddCommGroup M''\ninst✝⁶ : Module R✝ M✝\ninst✝⁵ : Module R✝ M'\ninst✝⁴ : Module R✝ M''\na b : R✝\nx y : M✝\nι : Type w\nR : Type u\ninst✝³ : Ring R\ninst✝² : Nontrivial R\nM : Type v\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nv : ι → M\ni : LinearIndependent R v\np : ∀ (κ : Type v) (w : κ → M), LinearIndependent R w → ∀ (j : ι → κ), w ∘ j = v → Surjective j\nw : Set M\ni' : LinearIndependent R Subtype.val\nh : range v ≤ w\nx✝ : ι\n⊢ (Subtype.val ∘ fun i => { val := v i, property := (_ : v i ∈ w) }) x✝ = v x✝\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mpr\nι✝ : Type u'\nι' : Type u_1\nR✝ : Type u_2\nK : Type u_3\nM✝ : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv✝ : ι✝ → M✝\ninst✝¹⁰ : Ring R✝\ninst✝⁹ : AddCommGroup M✝\ninst✝⁸ : AddCommGroup M'\ninst✝⁷ : AddCommGroup M''\ninst✝⁶ : Module R✝ M✝\ninst✝⁵ : Module R✝ M'\ninst✝⁴ : Module R✝ M''\na b : R✝\nx y : M✝\nι : Type w\nR : Type u\ninst✝³ : Ring R\ninst✝² : Nontrivial R\nM : Type v\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nv : ι → M\ni : LinearIndependent R v\nw : Set M\ni' : LinearIndependent R Subtype.val\nh : range v ≤ w\np : Surjective fun i => { val := v i, property := (_ : v i ∈ w) }\n⊢ range v = w\n[PROOFSTEP]\nhave q := congr_arg (fun s => ((↑) : w → M) '' s) p.range_eq\n[GOAL]\ncase mpr\nι✝ : Type u'\nι' : Type u_1\nR✝ : Type u_2\nK : Type u_3\nM✝ : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv✝ : ι✝ → M✝\ninst✝¹⁰ : Ring R✝\ninst✝⁹ : AddCommGroup M✝\ninst✝⁸ : AddCommGroup M'\ninst✝⁷ : AddCommGroup M''\ninst✝⁶ : Module R✝ M✝\ninst✝⁵ : Module R✝ M'\ninst✝⁴ : Module R✝ M''\na b : R✝\nx y : M✝\nι : Type w\nR : Type u\ninst✝³ : Ring R\ninst✝² : Nontrivial R\nM : Type v\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nv : ι → M\ni : LinearIndependent R v\nw : Set M\ni' : LinearIndependent R Subtype.val\nh : range v ≤ w\np : Surjective fun i => { val := v i, property := (_ : v i ∈ w) }\nq :\n  (fun s => Subtype.val '' s) (range fun i => { val := v i, property := (_ : v i ∈ w) }) =\n    (fun s => Subtype.val '' s) univ\n⊢ range v = w\n[PROOFSTEP]\ndsimp at q \n[GOAL]\ncase mpr\nι✝ : Type u'\nι' : Type u_1\nR✝ : Type u_2\nK : Type u_3\nM✝ : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv✝ : ι✝ → M✝\ninst✝¹⁰ : Ring R✝\ninst✝⁹ : AddCommGroup M✝\ninst✝⁸ : AddCommGroup M'\ninst✝⁷ : AddCommGroup M''\ninst✝⁶ : Module R✝ M✝\ninst✝⁵ : Module R✝ M'\ninst✝⁴ : Module R✝ M''\na b : R✝\nx y : M✝\nι : Type w\nR : Type u\ninst✝³ : Ring R\ninst✝² : Nontrivial R\nM : Type v\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nv : ι → M\ni : LinearIndependent R v\nw : Set M\ni' : LinearIndependent R Subtype.val\nh : range v ≤ w\np : Surjective fun i => { val := v i, property := (_ : v i ∈ w) }\nq : (Subtype.val '' range fun i => { val := v i, property := (_ : v i ∈ w) }) = Subtype.val '' univ\n⊢ range v = w\n[PROOFSTEP]\nrw [← image_univ, image_image] at q \n[GOAL]\ncase mpr\nι✝ : Type u'\nι' : Type u_1\nR✝ : Type u_2\nK : Type u_3\nM✝ : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv✝ : ι✝ → M✝\ninst✝¹⁰ : Ring R✝\ninst✝⁹ : AddCommGroup M✝\ninst✝⁸ : AddCommGroup M'\ninst✝⁷ : AddCommGroup M''\ninst✝⁶ : Module R✝ M✝\ninst✝⁵ : Module R✝ M'\ninst✝⁴ : Module R✝ M''\na b : R✝\nx y : M✝\nι : Type w\nR : Type u\ninst✝³ : Ring R\ninst✝² : Nontrivial R\nM : Type v\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nv : ι → M\ni : LinearIndependent R v\nw : Set M\ni' : LinearIndependent R Subtype.val\nh : range v ≤ w\np : Surjective fun i => { val := v i, property := (_ : v i ∈ w) }\nq : (fun x => ↑{ val := v x, property := (_ : v x ∈ w) }) '' univ = Subtype.val '' univ\n⊢ range v = w\n[PROOFSTEP]\nsimpa using q\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM✝ : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv✝ : ι → M✝\ninst✝⁸ : Ring R\ninst✝⁷ : AddCommGroup M✝\ninst✝⁶ : AddCommGroup M'\ninst✝⁵ : AddCommGroup M''\ninst✝⁴ : Module R M✝\ninst✝³ : Module R M'\ninst✝² : Module R M''\na b : R\nx y : M✝\nM : Type u_8\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nv : ι → M\nli : LinearIndependent R v\nc d : R\ni j : ι\nhc : c ≠ 0\nh : c • v i = d • v j\n⊢ i = j\n[PROOFSTEP]\nlet l : ι →₀ R := Finsupp.single i c - Finsupp.single j d\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM✝ : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv✝ : ι → M✝\ninst✝⁸ : Ring R\ninst✝⁷ : AddCommGroup M✝\ninst✝⁶ : AddCommGroup M'\ninst✝⁵ : AddCommGroup M''\ninst✝⁴ : Module R M✝\ninst✝³ : Module R M'\ninst✝² : Module R M''\na b : R\nx y : M✝\nM : Type u_8\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nv : ι → M\nli : LinearIndependent R v\nc d : R\ni j : ι\nhc : c ≠ 0\nh : c • v i = d • v j\nl : ι →₀ R := Finsupp.single i c - Finsupp.single j d\n⊢ i = j\n[PROOFSTEP]\nhave h_total : Finsupp.total ι M R v l = 0 :=\n  by\n  simp_rw [LinearMap.map_sub, Finsupp.total_apply]\n  simp [h]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM✝ : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv✝ : ι → M✝\ninst✝⁸ : Ring R\ninst✝⁷ : AddCommGroup M✝\ninst✝⁶ : AddCommGroup M'\ninst✝⁵ : AddCommGroup M''\ninst✝⁴ : Module R M✝\ninst✝³ : Module R M'\ninst✝² : Module R M''\na b : R\nx y : M✝\nM : Type u_8\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nv : ι → M\nli : LinearIndependent R v\nc d : R\ni j : ι\nhc : c ≠ 0\nh : c • v i = d • v j\nl : ι →₀ R := Finsupp.single i c - Finsupp.single j d\n⊢ ↑(Finsupp.total ι M R v) l = 0\n[PROOFSTEP]\nsimp_rw [LinearMap.map_sub, Finsupp.total_apply]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM✝ : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv✝ : ι → M✝\ninst✝⁸ : Ring R\ninst✝⁷ : AddCommGroup M✝\ninst✝⁶ : AddCommGroup M'\ninst✝⁵ : AddCommGroup M''\ninst✝⁴ : Module R M✝\ninst✝³ : Module R M'\ninst✝² : Module R M''\na b : R\nx y : M✝\nM : Type u_8\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nv : ι → M\nli : LinearIndependent R v\nc d : R\ni j : ι\nhc : c ≠ 0\nh : c • v i = d • v j\nl : ι →₀ R := Finsupp.single i c - Finsupp.single j d\n⊢ ((Finsupp.sum (Finsupp.single i c) fun i a => a • v i) - Finsupp.sum (Finsupp.single j d) fun i a => a • v i) = 0\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM✝ : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv✝ : ι → M✝\ninst✝⁸ : Ring R\ninst✝⁷ : AddCommGroup M✝\ninst✝⁶ : AddCommGroup M'\ninst✝⁵ : AddCommGroup M''\ninst✝⁴ : Module R M✝\ninst✝³ : Module R M'\ninst✝² : Module R M''\na b : R\nx y : M✝\nM : Type u_8\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nv : ι → M\nli : LinearIndependent R v\nc d : R\ni j : ι\nhc : c ≠ 0\nh : c • v i = d • v j\nl : ι →₀ R := Finsupp.single i c - Finsupp.single j d\nh_total : ↑(Finsupp.total ι M R v) l = 0\n⊢ i = j\n[PROOFSTEP]\nhave h_single_eq : Finsupp.single i c = Finsupp.single j d :=\n  by\n  rw [linearIndependent_iff] at li \n  simp [eq_add_of_sub_eq' (li l h_total)]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM✝ : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv✝ : ι → M✝\ninst✝⁸ : Ring R\ninst✝⁷ : AddCommGroup M✝\ninst✝⁶ : AddCommGroup M'\ninst✝⁵ : AddCommGroup M''\ninst✝⁴ : Module R M✝\ninst✝³ : Module R M'\ninst✝² : Module R M''\na b : R\nx y : M✝\nM : Type u_8\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nv : ι → M\nli : LinearIndependent R v\nc d : R\ni j : ι\nhc : c ≠ 0\nh : c • v i = d • v j\nl : ι →₀ R := Finsupp.single i c - Finsupp.single j d\nh_total : ↑(Finsupp.total ι M R v) l = 0\n⊢ Finsupp.single i c = Finsupp.single j d\n[PROOFSTEP]\nrw [linearIndependent_iff] at li \n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM✝ : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv✝ : ι → M✝\ninst✝⁸ : Ring R\ninst✝⁷ : AddCommGroup M✝\ninst✝⁶ : AddCommGroup M'\ninst✝⁵ : AddCommGroup M''\ninst✝⁴ : Module R M✝\ninst✝³ : Module R M'\ninst✝² : Module R M''\na b : R\nx y : M✝\nM : Type u_8\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nv : ι → M\nli : ∀ (l : ι →₀ R), ↑(Finsupp.total ι M R v) l = 0 → l = 0\nc d : R\ni j : ι\nhc : c ≠ 0\nh : c • v i = d • v j\nl : ι →₀ R := Finsupp.single i c - Finsupp.single j d\nh_total : ↑(Finsupp.total ι M R v) l = 0\n⊢ Finsupp.single i c = Finsupp.single j d\n[PROOFSTEP]\nsimp [eq_add_of_sub_eq' (li l h_total)]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM✝ : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv✝ : ι → M✝\ninst✝⁸ : Ring R\ninst✝⁷ : AddCommGroup M✝\ninst✝⁶ : AddCommGroup M'\ninst✝⁵ : AddCommGroup M''\ninst✝⁴ : Module R M✝\ninst✝³ : Module R M'\ninst✝² : Module R M''\na b : R\nx y : M✝\nM : Type u_8\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nv : ι → M\nli : LinearIndependent R v\nc d : R\ni j : ι\nhc : c ≠ 0\nh : c • v i = d • v j\nl : ι →₀ R := Finsupp.single i c - Finsupp.single j d\nh_total : ↑(Finsupp.total ι M R v) l = 0\nh_single_eq : Finsupp.single i c = Finsupp.single j d\n⊢ i = j\n[PROOFSTEP]\nrcases(Finsupp.single_eq_single_iff _ _ _ _).mp h_single_eq with (⟨H, _⟩ | ⟨hc, _⟩)\n[GOAL]\ncase inl.intro\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM✝ : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv✝ : ι → M✝\ninst✝⁸ : Ring R\ninst✝⁷ : AddCommGroup M✝\ninst✝⁶ : AddCommGroup M'\ninst✝⁵ : AddCommGroup M''\ninst✝⁴ : Module R M✝\ninst✝³ : Module R M'\ninst✝² : Module R M''\na b : R\nx y : M✝\nM : Type u_8\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nv : ι → M\nli : LinearIndependent R v\nc d : R\ni j : ι\nhc : c ≠ 0\nh : c • v i = d • v j\nl : ι →₀ R := Finsupp.single i c - Finsupp.single j d\nh_total : ↑(Finsupp.total ι M R v) l = 0\nh_single_eq : Finsupp.single i c = Finsupp.single j d\nH : i = j\nright✝ : c = d\n⊢ i = j\n[PROOFSTEP]\nexact H\n[GOAL]\ncase inr.intro\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM✝ : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv✝ : ι → M✝\ninst✝⁸ : Ring R\ninst✝⁷ : AddCommGroup M✝\ninst✝⁶ : AddCommGroup M'\ninst✝⁵ : AddCommGroup M''\ninst✝⁴ : Module R M✝\ninst✝³ : Module R M'\ninst✝² : Module R M''\na b : R\nx y : M✝\nM : Type u_8\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nv : ι → M\nli : LinearIndependent R v\nc d : R\ni j : ι\nhc✝ : c ≠ 0\nh : c • v i = d • v j\nl : ι →₀ R := Finsupp.single i c - Finsupp.single j d\nh_total : ↑(Finsupp.total ι M R v) l = 0\nh_single_eq : Finsupp.single i c = Finsupp.single j d\nhc : c = 0\nright✝ : d = 0\n⊢ i = j\n[PROOFSTEP]\ncontradiction\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhv : LinearIndependent R v\ns t : Set ι\nhs : Disjoint s t\n⊢ Disjoint (span R (v '' s)) (span R (v '' t))\n[PROOFSTEP]\nsimp only [disjoint_def, Finsupp.mem_span_image_iff_total]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhv : LinearIndependent R v\ns t : Set ι\nhs : Disjoint s t\n⊢ ∀ (x : M),\n    (∃ l, l ∈ Finsupp.supported R R s ∧ ↑(Finsupp.total ι M R v) l = x) →\n      (∃ l, l ∈ Finsupp.supported R R t ∧ ↑(Finsupp.total ι M R v) l = x) → x = 0\n[PROOFSTEP]\nrintro _ ⟨l₁, hl₁, rfl⟩ ⟨l₂, hl₂, H⟩\n[GOAL]\ncase intro.intro.intro.intro\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhv : LinearIndependent R v\ns t : Set ι\nhs : Disjoint s t\nl₁ : ι →₀ R\nhl₁ : l₁ ∈ Finsupp.supported R R s\nl₂ : ι →₀ R\nhl₂ : l₂ ∈ Finsupp.supported R R t\nH : ↑(Finsupp.total ι M R v) l₂ = ↑(Finsupp.total ι M R v) l₁\n⊢ ↑(Finsupp.total ι M R v) l₁ = 0\n[PROOFSTEP]\nrw [hv.injective_total.eq_iff] at H \n[GOAL]\ncase intro.intro.intro.intro\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhv : LinearIndependent R v\ns t : Set ι\nhs : Disjoint s t\nl₁ : ι →₀ R\nhl₁ : l₁ ∈ Finsupp.supported R R s\nl₂ : ι →₀ R\nhl₂ : l₂ ∈ Finsupp.supported R R t\nH : l₂ = l₁\n⊢ ↑(Finsupp.total ι M R v) l₁ = 0\n[PROOFSTEP]\nsubst l₂\n[GOAL]\ncase intro.intro.intro.intro\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhv : LinearIndependent R v\ns t : Set ι\nhs : Disjoint s t\nl₁ : ι →₀ R\nhl₁ : l₁ ∈ Finsupp.supported R R s\nhl₂ : l₁ ∈ Finsupp.supported R R t\n⊢ ↑(Finsupp.total ι M R v) l₁ = 0\n[PROOFSTEP]\nhave : l₁ = 0 := Submodule.disjoint_def.mp (Finsupp.disjoint_supported_supported hs) _ hl₁ hl₂\n[GOAL]\ncase intro.intro.intro.intro\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhv : LinearIndependent R v\ns t : Set ι\nhs : Disjoint s t\nl₁ : ι →₀ R\nhl₁ : l₁ ∈ Finsupp.supported R R s\nhl₂ : l₁ ∈ Finsupp.supported R R t\nthis : l₁ = 0\n⊢ ↑(Finsupp.total ι M R v) l₁ = 0\n[PROOFSTEP]\nsimp [this]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁷ : Ring R\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M'\ninst✝⁴ : AddCommGroup M''\ninst✝³ : Module R M\ninst✝² : Module R M'\ninst✝¹ : Module R M''\na b : R\nx✝ y : M\ninst✝ : Nontrivial R\nhv : LinearIndependent R v\ns : Set ι\nx : ι\nh : ¬x ∈ s\n⊢ ¬v x ∈ span R (v '' s)\n[PROOFSTEP]\nhave h' : v x ∈ Submodule.span R (v '' { x }) :=\n  by\n  rw [Set.image_singleton]\n  exact mem_span_singleton_self (v x)\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁷ : Ring R\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M'\ninst✝⁴ : AddCommGroup M''\ninst✝³ : Module R M\ninst✝² : Module R M'\ninst✝¹ : Module R M''\na b : R\nx✝ y : M\ninst✝ : Nontrivial R\nhv : LinearIndependent R v\ns : Set ι\nx : ι\nh : ¬x ∈ s\n⊢ v x ∈ span R (v '' {x})\n[PROOFSTEP]\nrw [Set.image_singleton]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁷ : Ring R\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M'\ninst✝⁴ : AddCommGroup M''\ninst✝³ : Module R M\ninst✝² : Module R M'\ninst✝¹ : Module R M''\na b : R\nx✝ y : M\ninst✝ : Nontrivial R\nhv : LinearIndependent R v\ns : Set ι\nx : ι\nh : ¬x ∈ s\n⊢ v x ∈ span R {v x}\n[PROOFSTEP]\nexact mem_span_singleton_self (v x)\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁷ : Ring R\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M'\ninst✝⁴ : AddCommGroup M''\ninst✝³ : Module R M\ninst✝² : Module R M'\ninst✝¹ : Module R M''\na b : R\nx✝ y : M\ninst✝ : Nontrivial R\nhv : LinearIndependent R v\ns : Set ι\nx : ι\nh : ¬x ∈ s\nh' : v x ∈ span R (v '' {x})\n⊢ ¬v x ∈ span R (v '' s)\n[PROOFSTEP]\nintro w\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁷ : Ring R\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M'\ninst✝⁴ : AddCommGroup M''\ninst✝³ : Module R M\ninst✝² : Module R M'\ninst✝¹ : Module R M''\na b : R\nx✝ y : M\ninst✝ : Nontrivial R\nhv : LinearIndependent R v\ns : Set ι\nx : ι\nh : ¬x ∈ s\nh' : v x ∈ span R (v '' {x})\nw : v x ∈ span R (v '' s)\n⊢ False\n[PROOFSTEP]\napply LinearIndependent.ne_zero x hv\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁷ : Ring R\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M'\ninst✝⁴ : AddCommGroup M''\ninst✝³ : Module R M\ninst✝² : Module R M'\ninst✝¹ : Module R M''\na b : R\nx✝ y : M\ninst✝ : Nontrivial R\nhv : LinearIndependent R v\ns : Set ι\nx : ι\nh : ¬x ∈ s\nh' : v x ∈ span R (v '' {x})\nw : v x ∈ span R (v '' s)\n⊢ v x = 0\n[PROOFSTEP]\nrefine' disjoint_def.1 (hv.disjoint_span_image _) (v x) h' w\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁷ : Ring R\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M'\ninst✝⁴ : AddCommGroup M''\ninst✝³ : Module R M\ninst✝² : Module R M'\ninst✝¹ : Module R M''\na b : R\nx✝ y : M\ninst✝ : Nontrivial R\nhv : LinearIndependent R v\ns : Set ι\nx : ι\nh : ¬x ∈ s\nh' : v x ∈ span R (v '' {x})\nw : v x ∈ span R (v '' s)\n⊢ Disjoint {x} s\n[PROOFSTEP]\nsimpa using h\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁷ : Ring R\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M'\ninst✝⁴ : AddCommGroup M''\ninst✝³ : Module R M\ninst✝² : Module R M'\ninst✝¹ : Module R M''\na b : R\nx✝ y : M\ninst✝ : Nontrivial R\nhv : LinearIndependent R v\nx : ι\nf : ι →₀ R\nh : ¬x ∈ f.support\n⊢ ↑(Finsupp.total ι M R v) f ≠ v x\n[PROOFSTEP]\nreplace h : x ∉ (f.support : Set ι) := h\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁷ : Ring R\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M'\ninst✝⁴ : AddCommGroup M''\ninst✝³ : Module R M\ninst✝² : Module R M'\ninst✝¹ : Module R M''\na b : R\nx✝ y : M\ninst✝ : Nontrivial R\nhv : LinearIndependent R v\nx : ι\nf : ι →₀ R\nh : ¬x ∈ ↑f.support\n⊢ ↑(Finsupp.total ι M R v) f ≠ v x\n[PROOFSTEP]\nhave p := hv.not_mem_span_image h\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁷ : Ring R\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M'\ninst✝⁴ : AddCommGroup M''\ninst✝³ : Module R M\ninst✝² : Module R M'\ninst✝¹ : Module R M''\na b : R\nx✝ y : M\ninst✝ : Nontrivial R\nhv : LinearIndependent R v\nx : ι\nf : ι →₀ R\nh : ¬x ∈ ↑f.support\np : ¬v x ∈ span R (v '' ↑f.support)\n⊢ ↑(Finsupp.total ι M R v) f ≠ v x\n[PROOFSTEP]\nintro w\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁷ : Ring R\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M'\ninst✝⁴ : AddCommGroup M''\ninst✝³ : Module R M\ninst✝² : Module R M'\ninst✝¹ : Module R M''\na b : R\nx✝ y : M\ninst✝ : Nontrivial R\nhv : LinearIndependent R v\nx : ι\nf : ι →₀ R\nh : ¬x ∈ ↑f.support\np : ¬v x ∈ span R (v '' ↑f.support)\nw : ↑(Finsupp.total ι M R v) f = v x\n⊢ False\n[PROOFSTEP]\nrw [← w] at p \n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁷ : Ring R\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M'\ninst✝⁴ : AddCommGroup M''\ninst✝³ : Module R M\ninst✝² : Module R M'\ninst✝¹ : Module R M''\na b : R\nx✝ y : M\ninst✝ : Nontrivial R\nhv : LinearIndependent R v\nx : ι\nf : ι →₀ R\nh : ¬x ∈ ↑f.support\np : ¬↑(Finsupp.total ι M R v) f ∈ span R (v '' ↑f.support)\nw : ↑(Finsupp.total ι M R v) f = v x\n⊢ False\n[PROOFSTEP]\nrw [Finsupp.span_image_eq_map_total] at p \n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁷ : Ring R\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M'\ninst✝⁴ : AddCommGroup M''\ninst✝³ : Module R M\ninst✝² : Module R M'\ninst✝¹ : Module R M''\na b : R\nx✝ y : M\ninst✝ : Nontrivial R\nhv : LinearIndependent R v\nx : ι\nf : ι →₀ R\nh : ¬x ∈ ↑f.support\np : ¬↑(Finsupp.total ι M R v) f ∈ Submodule.map (Finsupp.total ι M R v) (Finsupp.supported R R ↑f.support)\nw : ↑(Finsupp.total ι M R v) f = v x\n⊢ False\n[PROOFSTEP]\nsimp only [not_exists, not_and, mem_map] at p \n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁷ : Ring R\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M'\ninst✝⁴ : AddCommGroup M''\ninst✝³ : Module R M\ninst✝² : Module R M'\ninst✝¹ : Module R M''\na b : R\nx✝ y : M\ninst✝ : Nontrivial R\nhv : LinearIndependent R v\nx : ι\nf : ι →₀ R\nh : ¬x ∈ ↑f.support\nw : ↑(Finsupp.total ι M R v) f = v x\np : ∀ (x : ι →₀ R), x ∈ Finsupp.supported R R ↑f.support → ¬↑(Finsupp.total ι M R v) x = ↑(Finsupp.total ι M R v) f\n⊢ False\n[PROOFSTEP]\nexact p f (f.mem_supported_support R) rfl\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv✝ : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nv : ι ⊕ ι' → M\n⊢ LinearIndependent R v ↔\n    LinearIndependent R (v ∘ Sum.inl) ∧\n      LinearIndependent R (v ∘ Sum.inr) ∧ Disjoint (span R (range (v ∘ Sum.inl))) (span R (range (v ∘ Sum.inr)))\n[PROOFSTEP]\nclassical\nrw [range_comp v, range_comp v]\nrefine' ⟨_, _⟩\n· intro h\n  refine' ⟨h.comp _ Sum.inl_injective, h.comp _ Sum.inr_injective, _⟩\n  refine'\n    h.disjoint_span_image\n      _\n        -- Porting note: `isCompl_range_inl_range_inr.1` timeouts.\n  exact IsCompl.disjoint isCompl_range_inl_range_inr\nrintro ⟨hl, hr, hlr⟩\nrw [linearIndependent_iff'] at *\nintro s g hg i hi\nhave :\n  ((∑ i in s.preimage Sum.inl (Sum.inl_injective.injOn _), (fun x => g x • v x) (Sum.inl i)) +\n      ∑ i in s.preimage Sum.inr (Sum.inr_injective.injOn _), (fun x => g x • v x) (Sum.inr i)) =\n    0 :=\n  by\n  -- Porting note: `g` must be specified.\n  rw [Finset.sum_preimage' (g := fun x => g x • v x), Finset.sum_preimage' (g := fun x => g x • v x), ←\n    Finset.sum_union, ← Finset.filter_or]\n  · simpa only [← mem_union, range_inl_union_range_inr, mem_univ, Finset.filter_True]\n  ·\n    -- Porting note: Here was one `exact`, but timeouted.\n    refine Finset.disjoint_filter.2 fun x _ hx => disjoint_left.1 ?_ hx\n    exact IsCompl.disjoint isCompl_range_inl_range_inr\n· rw [← eq_neg_iff_add_eq_zero] at this \n  rw [disjoint_def'] at hlr \n  have A := by\n    refine hlr _ (sum_mem fun i _ => ?_) _ (neg_mem <| sum_mem fun i _ => ?_) this\n    · exact smul_mem _ _ (subset_span ⟨Sum.inl i, mem_range_self _, rfl⟩)\n    · exact smul_mem _ _ (subset_span ⟨Sum.inr i, mem_range_self _, rfl⟩)\n  cases' i with i i\n  · exact hl _ _ A i (Finset.mem_preimage.2 hi)\n  · rw [this, neg_eq_zero] at A \n    exact hr _ _ A i (Finset.mem_preimage.2 hi)\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv✝ : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nv : ι ⊕ ι' → M\n⊢ LinearIndependent R v ↔\n    LinearIndependent R (v ∘ Sum.inl) ∧\n      LinearIndependent R (v ∘ Sum.inr) ∧ Disjoint (span R (range (v ∘ Sum.inl))) (span R (range (v ∘ Sum.inr)))\n[PROOFSTEP]\nrw [range_comp v, range_comp v]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv✝ : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nv : ι ⊕ ι' → M\n⊢ LinearIndependent R v ↔\n    LinearIndependent R (v ∘ Sum.inl) ∧\n      LinearIndependent R (v ∘ Sum.inr) ∧ Disjoint (span R (v '' range Sum.inl)) (span R (v '' range Sum.inr))\n[PROOFSTEP]\nrefine' ⟨_, _⟩\n[GOAL]\ncase refine'_1\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv✝ : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nv : ι ⊕ ι' → M\n⊢ LinearIndependent R v →\n    LinearIndependent R (v ∘ Sum.inl) ∧\n      LinearIndependent R (v ∘ Sum.inr) ∧ Disjoint (span R (v '' range Sum.inl)) (span R (v '' range Sum.inr))\n[PROOFSTEP]\nintro h\n[GOAL]\ncase refine'_1\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv✝ : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nv : ι ⊕ ι' → M\nh : LinearIndependent R v\n⊢ LinearIndependent R (v ∘ Sum.inl) ∧\n    LinearIndependent R (v ∘ Sum.inr) ∧ Disjoint (span R (v '' range Sum.inl)) (span R (v '' range Sum.inr))\n[PROOFSTEP]\nrefine' ⟨h.comp _ Sum.inl_injective, h.comp _ Sum.inr_injective, _⟩\n[GOAL]\ncase refine'_1\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv✝ : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nv : ι ⊕ ι' → M\nh : LinearIndependent R v\n⊢ Disjoint (span R (v '' range Sum.inl)) (span R (v '' range Sum.inr))\n[PROOFSTEP]\nrefine'\n  h.disjoint_span_image\n    _\n      -- Porting note: `isCompl_range_inl_range_inr.1` timeouts.\n[GOAL]\ncase refine'_1\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv✝ : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nv : ι ⊕ ι' → M\nh : LinearIndependent R v\n⊢ Disjoint (range Sum.inl) (range Sum.inr)\n[PROOFSTEP]\nexact IsCompl.disjoint isCompl_range_inl_range_inr\n[GOAL]\ncase refine'_2\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv✝ : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nv : ι ⊕ ι' → M\n⊢ LinearIndependent R (v ∘ Sum.inl) ∧\n      LinearIndependent R (v ∘ Sum.inr) ∧ Disjoint (span R (v '' range Sum.inl)) (span R (v '' range Sum.inr)) →\n    LinearIndependent R v\n[PROOFSTEP]\nrintro ⟨hl, hr, hlr⟩\n[GOAL]\ncase refine'_2.intro.intro\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv✝ : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nv : ι ⊕ ι' → M\nhl : LinearIndependent R (v ∘ Sum.inl)\nhr : LinearIndependent R (v ∘ Sum.inr)\nhlr : Disjoint (span R (v '' range Sum.inl)) (span R (v '' range Sum.inr))\n⊢ LinearIndependent R v\n[PROOFSTEP]\nrw [linearIndependent_iff'] at *\n[GOAL]\ncase refine'_2.intro.intro\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv✝ : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nv : ι ⊕ ι' → M\nhl : ∀ (s : Finset ι) (g : ι → R), ∑ i in s, g i • (v ∘ Sum.inl) i = 0 → ∀ (i : ι), i ∈ s → g i = 0\nhr : ∀ (s : Finset ι') (g : ι' → R), ∑ i in s, g i • (v ∘ Sum.inr) i = 0 → ∀ (i : ι'), i ∈ s → g i = 0\nhlr : Disjoint (span R (v '' range Sum.inl)) (span R (v '' range Sum.inr))\n⊢ ∀ (s : Finset (ι ⊕ ι')) (g : ι ⊕ ι' → R), ∑ i in s, g i • v i = 0 → ∀ (i : ι ⊕ ι'), i ∈ s → g i = 0\n[PROOFSTEP]\nintro s g hg i hi\n[GOAL]\ncase refine'_2.intro.intro\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv✝ : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nv : ι ⊕ ι' → M\nhl : ∀ (s : Finset ι) (g : ι → R), ∑ i in s, g i • (v ∘ Sum.inl) i = 0 → ∀ (i : ι), i ∈ s → g i = 0\nhr : ∀ (s : Finset ι') (g : ι' → R), ∑ i in s, g i • (v ∘ Sum.inr) i = 0 → ∀ (i : ι'), i ∈ s → g i = 0\nhlr : Disjoint (span R (v '' range Sum.inl)) (span R (v '' range Sum.inr))\ns : Finset (ι ⊕ ι')\ng : ι ⊕ ι' → R\nhg : ∑ i in s, g i • v i = 0\ni : ι ⊕ ι'\nhi : i ∈ s\n⊢ g i = 0\n[PROOFSTEP]\nhave :\n  ((∑ i in s.preimage Sum.inl (Sum.inl_injective.injOn _), (fun x => g x • v x) (Sum.inl i)) +\n      ∑ i in s.preimage Sum.inr (Sum.inr_injective.injOn _), (fun x => g x • v x) (Sum.inr i)) =\n    0 :=\n  by\n  -- Porting note: `g` must be specified.\n  rw [Finset.sum_preimage' (g := fun x => g x • v x), Finset.sum_preimage' (g := fun x => g x • v x), ←\n    Finset.sum_union, ← Finset.filter_or]\n  · simpa only [← mem_union, range_inl_union_range_inr, mem_univ, Finset.filter_True]\n  ·\n    -- Porting note: Here was one `exact`, but timeouted.\n    refine Finset.disjoint_filter.2 fun x _ hx => disjoint_left.1 ?_ hx\n    exact IsCompl.disjoint isCompl_range_inl_range_inr\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv✝ : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nv : ι ⊕ ι' → M\nhl : ∀ (s : Finset ι) (g : ι → R), ∑ i in s, g i • (v ∘ Sum.inl) i = 0 → ∀ (i : ι), i ∈ s → g i = 0\nhr : ∀ (s : Finset ι') (g : ι' → R), ∑ i in s, g i • (v ∘ Sum.inr) i = 0 → ∀ (i : ι'), i ∈ s → g i = 0\nhlr : Disjoint (span R (v '' range Sum.inl)) (span R (v '' range Sum.inr))\ns : Finset (ι ⊕ ι')\ng : ι ⊕ ι' → R\nhg : ∑ i in s, g i • v i = 0\ni : ι ⊕ ι'\nhi : i ∈ s\n⊢ ∑ i in Finset.preimage s Sum.inl (_ : InjOn Sum.inl (Sum.inl ⁻¹' ↑s)), (fun x => g x • v x) (Sum.inl i) +\n      ∑ i in Finset.preimage s Sum.inr (_ : InjOn Sum.inr (Sum.inr ⁻¹' ↑s)), (fun x => g x • v x) (Sum.inr i) =\n    0\n[PROOFSTEP]\nrw [Finset.sum_preimage' (g := fun x => g x • v x), Finset.sum_preimage' (g := fun x => g x • v x), ← Finset.sum_union,\n  ← Finset.filter_or]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv✝ : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nv : ι ⊕ ι' → M\nhl : ∀ (s : Finset ι) (g : ι → R), ∑ i in s, g i • (v ∘ Sum.inl) i = 0 → ∀ (i : ι), i ∈ s → g i = 0\nhr : ∀ (s : Finset ι') (g : ι' → R), ∑ i in s, g i • (v ∘ Sum.inr) i = 0 → ∀ (i : ι'), i ∈ s → g i = 0\nhlr : Disjoint (span R (v '' range Sum.inl)) (span R (v '' range Sum.inr))\ns : Finset (ι ⊕ ι')\ng : ι ⊕ ι' → R\nhg : ∑ i in s, g i • v i = 0\ni : ι ⊕ ι'\nhi : i ∈ s\n⊢ ∑ x in Finset.filter (fun a => a ∈ range Sum.inl ∨ a ∈ range Sum.inr) s, g x • v x = 0\n[PROOFSTEP]\nsimpa only [← mem_union, range_inl_union_range_inr, mem_univ, Finset.filter_True]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv✝ : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nv : ι ⊕ ι' → M\nhl : ∀ (s : Finset ι) (g : ι → R), ∑ i in s, g i • (v ∘ Sum.inl) i = 0 → ∀ (i : ι), i ∈ s → g i = 0\nhr : ∀ (s : Finset ι') (g : ι' → R), ∑ i in s, g i • (v ∘ Sum.inr) i = 0 → ∀ (i : ι'), i ∈ s → g i = 0\nhlr : Disjoint (span R (v '' range Sum.inl)) (span R (v '' range Sum.inr))\ns : Finset (ι ⊕ ι')\ng : ι ⊕ ι' → R\nhg : ∑ i in s, g i • v i = 0\ni : ι ⊕ ι'\nhi : i ∈ s\n⊢ Disjoint (Finset.filter (fun x => x ∈ range Sum.inl) s) (Finset.filter (fun x => x ∈ range Sum.inr) s)\n[PROOFSTEP]\nrefine Finset.disjoint_filter.2 fun x _ hx => disjoint_left.1 ?_ hx\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv✝ : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx✝¹ y : M\nv : ι ⊕ ι' → M\nhl : ∀ (s : Finset ι) (g : ι → R), ∑ i in s, g i • (v ∘ Sum.inl) i = 0 → ∀ (i : ι), i ∈ s → g i = 0\nhr : ∀ (s : Finset ι') (g : ι' → R), ∑ i in s, g i • (v ∘ Sum.inr) i = 0 → ∀ (i : ι'), i ∈ s → g i = 0\nhlr : Disjoint (span R (v '' range Sum.inl)) (span R (v '' range Sum.inr))\ns : Finset (ι ⊕ ι')\ng : ι ⊕ ι' → R\nhg : ∑ i in s, g i • v i = 0\ni : ι ⊕ ι'\nhi : i ∈ s\nx : ι ⊕ ι'\nx✝ : x ∈ s\nhx : x ∈ range Sum.inl\n⊢ Disjoint (range Sum.inl) (range Sum.inr)\n[PROOFSTEP]\nexact IsCompl.disjoint isCompl_range_inl_range_inr\n[GOAL]\ncase refine'_2.intro.intro\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv✝ : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nv : ι ⊕ ι' → M\nhl : ∀ (s : Finset ι) (g : ι → R), ∑ i in s, g i • (v ∘ Sum.inl) i = 0 → ∀ (i : ι), i ∈ s → g i = 0\nhr : ∀ (s : Finset ι') (g : ι' → R), ∑ i in s, g i • (v ∘ Sum.inr) i = 0 → ∀ (i : ι'), i ∈ s → g i = 0\nhlr : Disjoint (span R (v '' range Sum.inl)) (span R (v '' range Sum.inr))\ns : Finset (ι ⊕ ι')\ng : ι ⊕ ι' → R\nhg : ∑ i in s, g i • v i = 0\ni : ι ⊕ ι'\nhi : i ∈ s\nthis :\n  ∑ i in Finset.preimage s Sum.inl (_ : InjOn Sum.inl (Sum.inl ⁻¹' ↑s)), (fun x => g x • v x) (Sum.inl i) +\n      ∑ i in Finset.preimage s Sum.inr (_ : InjOn Sum.inr (Sum.inr ⁻¹' ↑s)), (fun x => g x • v x) (Sum.inr i) =\n    0\n⊢ g i = 0\n[PROOFSTEP]\nrw [← eq_neg_iff_add_eq_zero] at this \n[GOAL]\ncase refine'_2.intro.intro\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv✝ : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nv : ι ⊕ ι' → M\nhl : ∀ (s : Finset ι) (g : ι → R), ∑ i in s, g i • (v ∘ Sum.inl) i = 0 → ∀ (i : ι), i ∈ s → g i = 0\nhr : ∀ (s : Finset ι') (g : ι' → R), ∑ i in s, g i • (v ∘ Sum.inr) i = 0 → ∀ (i : ι'), i ∈ s → g i = 0\nhlr : Disjoint (span R (v '' range Sum.inl)) (span R (v '' range Sum.inr))\ns : Finset (ι ⊕ ι')\ng : ι ⊕ ι' → R\nhg : ∑ i in s, g i • v i = 0\ni : ι ⊕ ι'\nhi : i ∈ s\nthis :\n  ∑ i in Finset.preimage s Sum.inl (_ : InjOn Sum.inl (Sum.inl ⁻¹' ↑s)), (fun x => g x • v x) (Sum.inl i) =\n    -∑ i in Finset.preimage s Sum.inr (_ : InjOn Sum.inr (Sum.inr ⁻¹' ↑s)), (fun x => g x • v x) (Sum.inr i)\n⊢ g i = 0\n[PROOFSTEP]\nrw [disjoint_def'] at hlr \n[GOAL]\ncase refine'_2.intro.intro\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv✝ : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nv : ι ⊕ ι' → M\nhl : ∀ (s : Finset ι) (g : ι → R), ∑ i in s, g i • (v ∘ Sum.inl) i = 0 → ∀ (i : ι), i ∈ s → g i = 0\nhr : ∀ (s : Finset ι') (g : ι' → R), ∑ i in s, g i • (v ∘ Sum.inr) i = 0 → ∀ (i : ι'), i ∈ s → g i = 0\nhlr : ∀ (x : M), x ∈ span R (v '' range Sum.inl) → ∀ (y : M), y ∈ span R (v '' range Sum.inr) → x = y → x = 0\ns : Finset (ι ⊕ ι')\ng : ι ⊕ ι' → R\nhg : ∑ i in s, g i • v i = 0\ni : ι ⊕ ι'\nhi : i ∈ s\nthis :\n  ∑ i in Finset.preimage s Sum.inl (_ : InjOn Sum.inl (Sum.inl ⁻¹' ↑s)), (fun x => g x • v x) (Sum.inl i) =\n    -∑ i in Finset.preimage s Sum.inr (_ : InjOn Sum.inr (Sum.inr ⁻¹' ↑s)), (fun x => g x • v x) (Sum.inr i)\n⊢ g i = 0\n[PROOFSTEP]\nhave A := by\n  refine hlr _ (sum_mem fun i _ => ?_) _ (neg_mem <| sum_mem fun i _ => ?_) this\n  · exact smul_mem _ _ (subset_span ⟨Sum.inl i, mem_range_self _, rfl⟩)\n  · exact smul_mem _ _ (subset_span ⟨Sum.inr i, mem_range_self _, rfl⟩)\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv✝ : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nv : ι ⊕ ι' → M\nhl : ∀ (s : Finset ι) (g : ι → R), ∑ i in s, g i • (v ∘ Sum.inl) i = 0 → ∀ (i : ι), i ∈ s → g i = 0\nhr : ∀ (s : Finset ι') (g : ι' → R), ∑ i in s, g i • (v ∘ Sum.inr) i = 0 → ∀ (i : ι'), i ∈ s → g i = 0\nhlr : ∀ (x : M), x ∈ span R (v '' range Sum.inl) → ∀ (y : M), y ∈ span R (v '' range Sum.inr) → x = y → x = 0\ns : Finset (ι ⊕ ι')\ng : ι ⊕ ι' → R\nhg : ∑ i in s, g i • v i = 0\ni : ι ⊕ ι'\nhi : i ∈ s\nthis :\n  ∑ i in Finset.preimage s Sum.inl (_ : InjOn Sum.inl (Sum.inl ⁻¹' ↑s)), (fun x => g x • v x) (Sum.inl i) =\n    -∑ i in Finset.preimage s Sum.inr (_ : InjOn Sum.inr (Sum.inr ⁻¹' ↑s)), (fun x => g x • v x) (Sum.inr i)\n⊢ ?m.395655\n[PROOFSTEP]\nrefine hlr _ (sum_mem fun i _ => ?_) _ (neg_mem <| sum_mem fun i _ => ?_) this\n[GOAL]\ncase refine_1\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv✝ : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nv : ι ⊕ ι' → M\nhl : ∀ (s : Finset ι) (g : ι → R), ∑ i in s, g i • (v ∘ Sum.inl) i = 0 → ∀ (i : ι), i ∈ s → g i = 0\nhr : ∀ (s : Finset ι') (g : ι' → R), ∑ i in s, g i • (v ∘ Sum.inr) i = 0 → ∀ (i : ι'), i ∈ s → g i = 0\nhlr : ∀ (x : M), x ∈ span R (v '' range Sum.inl) → ∀ (y : M), y ∈ span R (v '' range Sum.inr) → x = y → x = 0\ns : Finset (ι ⊕ ι')\ng : ι ⊕ ι' → R\nhg : ∑ i in s, g i • v i = 0\ni✝ : ι ⊕ ι'\nhi : i✝ ∈ s\nthis :\n  ∑ i in Finset.preimage s Sum.inl (_ : InjOn Sum.inl (Sum.inl ⁻¹' ↑s)), (fun x => g x • v x) (Sum.inl i) =\n    -∑ i in Finset.preimage s Sum.inr (_ : InjOn Sum.inr (Sum.inr ⁻¹' ↑s)), (fun x => g x • v x) (Sum.inr i)\ni : ι\nx✝ : i ∈ Finset.preimage s Sum.inl (_ : InjOn Sum.inl (Sum.inl ⁻¹' ↑s))\n⊢ (fun x => g x • v x) (Sum.inl i) ∈ span R (v '' range Sum.inl)\n[PROOFSTEP]\nexact smul_mem _ _ (subset_span ⟨Sum.inl i, mem_range_self _, rfl⟩)\n[GOAL]\ncase refine_2\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv✝ : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nv : ι ⊕ ι' → M\nhl : ∀ (s : Finset ι) (g : ι → R), ∑ i in s, g i • (v ∘ Sum.inl) i = 0 → ∀ (i : ι), i ∈ s → g i = 0\nhr : ∀ (s : Finset ι') (g : ι' → R), ∑ i in s, g i • (v ∘ Sum.inr) i = 0 → ∀ (i : ι'), i ∈ s → g i = 0\nhlr : ∀ (x : M), x ∈ span R (v '' range Sum.inl) → ∀ (y : M), y ∈ span R (v '' range Sum.inr) → x = y → x = 0\ns : Finset (ι ⊕ ι')\ng : ι ⊕ ι' → R\nhg : ∑ i in s, g i • v i = 0\ni✝ : ι ⊕ ι'\nhi : i✝ ∈ s\nthis :\n  ∑ i in Finset.preimage s Sum.inl (_ : InjOn Sum.inl (Sum.inl ⁻¹' ↑s)), (fun x => g x • v x) (Sum.inl i) =\n    -∑ i in Finset.preimage s Sum.inr (_ : InjOn Sum.inr (Sum.inr ⁻¹' ↑s)), (fun x => g x • v x) (Sum.inr i)\ni : ι'\nx✝ : i ∈ Finset.preimage s Sum.inr (_ : InjOn Sum.inr (Sum.inr ⁻¹' ↑s))\n⊢ (fun x => g x • v x) (Sum.inr i) ∈ span R (v '' range Sum.inr)\n[PROOFSTEP]\nexact smul_mem _ _ (subset_span ⟨Sum.inr i, mem_range_self _, rfl⟩)\n[GOAL]\ncase refine'_2.intro.intro\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv✝ : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nv : ι ⊕ ι' → M\nhl : ∀ (s : Finset ι) (g : ι → R), ∑ i in s, g i • (v ∘ Sum.inl) i = 0 → ∀ (i : ι), i ∈ s → g i = 0\nhr : ∀ (s : Finset ι') (g : ι' → R), ∑ i in s, g i • (v ∘ Sum.inr) i = 0 → ∀ (i : ι'), i ∈ s → g i = 0\nhlr : ∀ (x : M), x ∈ span R (v '' range Sum.inl) → ∀ (y : M), y ∈ span R (v '' range Sum.inr) → x = y → x = 0\ns : Finset (ι ⊕ ι')\ng : ι ⊕ ι' → R\nhg : ∑ i in s, g i • v i = 0\ni : ι ⊕ ι'\nhi : i ∈ s\nthis :\n  ∑ i in Finset.preimage s Sum.inl (_ : InjOn Sum.inl (Sum.inl ⁻¹' ↑s)), (fun x => g x • v x) (Sum.inl i) =\n    -∑ i in Finset.preimage s Sum.inr (_ : InjOn Sum.inr (Sum.inr ⁻¹' ↑s)), (fun x => g x • v x) (Sum.inr i)\nA : ∑ c in Finset.preimage s Sum.inl (_ : InjOn Sum.inl (Sum.inl ⁻¹' ↑s)), (fun x => g x • v x) (Sum.inl c) = 0\n⊢ g i = 0\n[PROOFSTEP]\ncases' i with i i\n[GOAL]\ncase refine'_2.intro.intro.inl\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv✝ : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nv : ι ⊕ ι' → M\nhl : ∀ (s : Finset ι) (g : ι → R), ∑ i in s, g i • (v ∘ Sum.inl) i = 0 → ∀ (i : ι), i ∈ s → g i = 0\nhr : ∀ (s : Finset ι') (g : ι' → R), ∑ i in s, g i • (v ∘ Sum.inr) i = 0 → ∀ (i : ι'), i ∈ s → g i = 0\nhlr : ∀ (x : M), x ∈ span R (v '' range Sum.inl) → ∀ (y : M), y ∈ span R (v '' range Sum.inr) → x = y → x = 0\ns : Finset (ι ⊕ ι')\ng : ι ⊕ ι' → R\nhg : ∑ i in s, g i • v i = 0\nthis :\n  ∑ i in Finset.preimage s Sum.inl (_ : InjOn Sum.inl (Sum.inl ⁻¹' ↑s)), (fun x => g x • v x) (Sum.inl i) =\n    -∑ i in Finset.preimage s Sum.inr (_ : InjOn Sum.inr (Sum.inr ⁻¹' ↑s)), (fun x => g x • v x) (Sum.inr i)\nA : ∑ c in Finset.preimage s Sum.inl (_ : InjOn Sum.inl (Sum.inl ⁻¹' ↑s)), (fun x => g x • v x) (Sum.inl c) = 0\ni : ι\nhi : Sum.inl i ∈ s\n⊢ g (Sum.inl i) = 0\n[PROOFSTEP]\nexact hl _ _ A i (Finset.mem_preimage.2 hi)\n[GOAL]\ncase refine'_2.intro.intro.inr\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv✝ : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nv : ι ⊕ ι' → M\nhl : ∀ (s : Finset ι) (g : ι → R), ∑ i in s, g i • (v ∘ Sum.inl) i = 0 → ∀ (i : ι), i ∈ s → g i = 0\nhr : ∀ (s : Finset ι') (g : ι' → R), ∑ i in s, g i • (v ∘ Sum.inr) i = 0 → ∀ (i : ι'), i ∈ s → g i = 0\nhlr : ∀ (x : M), x ∈ span R (v '' range Sum.inl) → ∀ (y : M), y ∈ span R (v '' range Sum.inr) → x = y → x = 0\ns : Finset (ι ⊕ ι')\ng : ι ⊕ ι' → R\nhg : ∑ i in s, g i • v i = 0\nthis :\n  ∑ i in Finset.preimage s Sum.inl (_ : InjOn Sum.inl (Sum.inl ⁻¹' ↑s)), (fun x => g x • v x) (Sum.inl i) =\n    -∑ i in Finset.preimage s Sum.inr (_ : InjOn Sum.inr (Sum.inr ⁻¹' ↑s)), (fun x => g x • v x) (Sum.inr i)\nA : ∑ c in Finset.preimage s Sum.inl (_ : InjOn Sum.inl (Sum.inl ⁻¹' ↑s)), (fun x => g x • v x) (Sum.inl c) = 0\ni : ι'\nhi : Sum.inr i ∈ s\n⊢ g (Sum.inr i) = 0\n[PROOFSTEP]\nrw [this, neg_eq_zero] at A \n[GOAL]\ncase refine'_2.intro.intro.inr\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv✝ : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nv : ι ⊕ ι' → M\nhl : ∀ (s : Finset ι) (g : ι → R), ∑ i in s, g i • (v ∘ Sum.inl) i = 0 → ∀ (i : ι), i ∈ s → g i = 0\nhr : ∀ (s : Finset ι') (g : ι' → R), ∑ i in s, g i • (v ∘ Sum.inr) i = 0 → ∀ (i : ι'), i ∈ s → g i = 0\nhlr : ∀ (x : M), x ∈ span R (v '' range Sum.inl) → ∀ (y : M), y ∈ span R (v '' range Sum.inr) → x = y → x = 0\ns : Finset (ι ⊕ ι')\ng : ι ⊕ ι' → R\nhg : ∑ i in s, g i • v i = 0\nthis :\n  ∑ i in Finset.preimage s Sum.inl (_ : InjOn Sum.inl (Sum.inl ⁻¹' ↑s)), (fun x => g x • v x) (Sum.inl i) =\n    -∑ i in Finset.preimage s Sum.inr (_ : InjOn Sum.inr (Sum.inr ⁻¹' ↑s)), (fun x => g x • v x) (Sum.inr i)\nA : ∑ i in Finset.preimage s Sum.inr (_ : InjOn Sum.inr (Sum.inr ⁻¹' ↑s)), (fun x => g x • v x) (Sum.inr i) = 0\ni : ι'\nhi : Sum.inr i ∈ s\n⊢ g (Sum.inr i) = 0\n[PROOFSTEP]\nexact hr _ _ A i (Finset.mem_preimage.2 hi)\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\ns t : Set M\nhs : LinearIndependent R fun x => ↑x\nht : LinearIndependent R fun x => ↑x\nhst : Disjoint (span R s) (span R t)\n⊢ Disjoint (span R (range fun x => ↑x)) (span R (range fun x => ↑x))\n[PROOFSTEP]\nsimpa\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\ns t : Set M\nhs : LinearIndependent R fun x => ↑x\nht : LinearIndependent R fun x => ↑x\nhst : Disjoint (span R s) (span R t)\n⊢ range (Sum.elim (fun x => ↑x) fun x => ↑x) = s ∪ t\n[PROOFSTEP]\nsimp\n[GOAL]\nι✝ : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι✝ → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nι : Type u_8\nf : ι → Set M\nhl : ∀ (i : ι), LinearIndependent R fun x => ↑x\nhd : ∀ (i : ι) (t : Set ι), Set.Finite t → ¬i ∈ t → Disjoint (span R (f i)) (⨆ (i : ι) (_ : i ∈ t), span R (f i))\n⊢ LinearIndependent R fun x => ↑x\n[PROOFSTEP]\nclassical\nrw [iUnion_eq_iUnion_finset f]\napply linearIndependent_iUnion_of_directed\n· apply directed_of_sup\n  exact fun t₁ t₂ ht => iUnion_mono fun i => iUnion_subset_iUnion_const fun h => ht h\nintro t\ninduction' t using Finset.induction_on with i s his ih\n· refine' (linearIndependent_empty R M).mono _\n  simp\n· rw [Finset.set_biUnion_insert]\n  refine' (hl _).union ih _\n  rw [span_iUnion₂]\n  exact hd i s s.finite_toSet his\n[GOAL]\nι✝ : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι✝ → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nι : Type u_8\nf : ι → Set M\nhl : ∀ (i : ι), LinearIndependent R fun x => ↑x\nhd : ∀ (i : ι) (t : Set ι), Set.Finite t → ¬i ∈ t → Disjoint (span R (f i)) (⨆ (i : ι) (_ : i ∈ t), span R (f i))\n⊢ LinearIndependent R fun x => ↑x\n[PROOFSTEP]\nrw [iUnion_eq_iUnion_finset f]\n[GOAL]\nι✝ : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι✝ → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nι : Type u_8\nf : ι → Set M\nhl : ∀ (i : ι), LinearIndependent R fun x => ↑x\nhd : ∀ (i : ι) (t : Set ι), Set.Finite t → ¬i ∈ t → Disjoint (span R (f i)) (⨆ (i : ι) (_ : i ∈ t), span R (f i))\n⊢ LinearIndependent R fun x => ↑x\n[PROOFSTEP]\napply linearIndependent_iUnion_of_directed\n[GOAL]\ncase hs\nι✝ : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι✝ → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nι : Type u_8\nf : ι → Set M\nhl : ∀ (i : ι), LinearIndependent R fun x => ↑x\nhd : ∀ (i : ι) (t : Set ι), Set.Finite t → ¬i ∈ t → Disjoint (span R (f i)) (⨆ (i : ι) (_ : i ∈ t), span R (f i))\n⊢ Directed (fun x x_1 => x ⊆ x_1) fun i => ⋃ (i_1 : ι) (_ : i_1 ∈ i), f i_1\n[PROOFSTEP]\napply directed_of_sup\n[GOAL]\ncase hs.H\nι✝ : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι✝ → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nι : Type u_8\nf : ι → Set M\nhl : ∀ (i : ι), LinearIndependent R fun x => ↑x\nhd : ∀ (i : ι) (t : Set ι), Set.Finite t → ¬i ∈ t → Disjoint (span R (f i)) (⨆ (i : ι) (_ : i ∈ t), span R (f i))\n⊢ ∀ ⦃i j : Finset ι⦄, i ≤ j → ⋃ (i_1 : ι) (_ : i_1 ∈ i), f i_1 ⊆ ⋃ (i : ι) (_ : i ∈ j), f i\n[PROOFSTEP]\nexact fun t₁ t₂ ht => iUnion_mono fun i => iUnion_subset_iUnion_const fun h => ht h\n[GOAL]\ncase h\nι✝ : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι✝ → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nι : Type u_8\nf : ι → Set M\nhl : ∀ (i : ι), LinearIndependent R fun x => ↑x\nhd : ∀ (i : ι) (t : Set ι), Set.Finite t → ¬i ∈ t → Disjoint (span R (f i)) (⨆ (i : ι) (_ : i ∈ t), span R (f i))\n⊢ ∀ (i : Finset ι), LinearIndependent R fun x => ↑x\n[PROOFSTEP]\nintro t\n[GOAL]\ncase h\nι✝ : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι✝ → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nι : Type u_8\nf : ι → Set M\nhl : ∀ (i : ι), LinearIndependent R fun x => ↑x\nhd : ∀ (i : ι) (t : Set ι), Set.Finite t → ¬i ∈ t → Disjoint (span R (f i)) (⨆ (i : ι) (_ : i ∈ t), span R (f i))\nt : Finset ι\n⊢ LinearIndependent R fun x => ↑x\n[PROOFSTEP]\ninduction' t using Finset.induction_on with i s his ih\n[GOAL]\ncase h.empty\nι✝ : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι✝ → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nι : Type u_8\nf : ι → Set M\nhl : ∀ (i : ι), LinearIndependent R fun x => ↑x\nhd : ∀ (i : ι) (t : Set ι), Set.Finite t → ¬i ∈ t → Disjoint (span R (f i)) (⨆ (i : ι) (_ : i ∈ t), span R (f i))\n⊢ LinearIndependent R fun x => ↑x\n[PROOFSTEP]\nrefine' (linearIndependent_empty R M).mono _\n[GOAL]\ncase h.empty\nι✝ : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι✝ → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nι : Type u_8\nf : ι → Set M\nhl : ∀ (i : ι), LinearIndependent R fun x => ↑x\nhd : ∀ (i : ι) (t : Set ι), Set.Finite t → ¬i ∈ t → Disjoint (span R (f i)) (⨆ (i : ι) (_ : i ∈ t), span R (f i))\n⊢ ⋃ (i : ι) (_ : i ∈ ∅), f i ⊆ ∅\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.insert\nι✝ : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι✝ → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nι : Type u_8\nf : ι → Set M\nhl : ∀ (i : ι), LinearIndependent R fun x => ↑x\nhd : ∀ (i : ι) (t : Set ι), Set.Finite t → ¬i ∈ t → Disjoint (span R (f i)) (⨆ (i : ι) (_ : i ∈ t), span R (f i))\ni : ι\ns : Finset ι\nhis : ¬i ∈ s\nih : LinearIndependent R fun x => ↑x\n⊢ LinearIndependent R fun x => ↑x\n[PROOFSTEP]\nrw [Finset.set_biUnion_insert]\n[GOAL]\ncase h.insert\nι✝ : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι✝ → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nι : Type u_8\nf : ι → Set M\nhl : ∀ (i : ι), LinearIndependent R fun x => ↑x\nhd : ∀ (i : ι) (t : Set ι), Set.Finite t → ¬i ∈ t → Disjoint (span R (f i)) (⨆ (i : ι) (_ : i ∈ t), span R (f i))\ni : ι\ns : Finset ι\nhis : ¬i ∈ s\nih : LinearIndependent R fun x => ↑x\n⊢ LinearIndependent R fun x => ↑x\n[PROOFSTEP]\nrefine' (hl _).union ih _\n[GOAL]\ncase h.insert\nι✝ : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι✝ → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nι : Type u_8\nf : ι → Set M\nhl : ∀ (i : ι), LinearIndependent R fun x => ↑x\nhd : ∀ (i : ι) (t : Set ι), Set.Finite t → ¬i ∈ t → Disjoint (span R (f i)) (⨆ (i : ι) (_ : i ∈ t), span R (f i))\ni : ι\ns : Finset ι\nhis : ¬i ∈ s\nih : LinearIndependent R fun x => ↑x\n⊢ Disjoint (span R (f i)) (span R (⋃ (x : ι) (_ : x ∈ s), f x))\n[PROOFSTEP]\nrw [span_iUnion₂]\n[GOAL]\ncase h.insert\nι✝ : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι✝ → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nι : Type u_8\nf : ι → Set M\nhl : ∀ (i : ι), LinearIndependent R fun x => ↑x\nhd : ∀ (i : ι) (t : Set ι), Set.Finite t → ¬i ∈ t → Disjoint (span R (f i)) (⨆ (i : ι) (_ : i ∈ t), span R (f i))\ni : ι\ns : Finset ι\nhis : ¬i ∈ s\nih : LinearIndependent R fun x => ↑x\n⊢ Disjoint (span R (f i)) (⨆ (i : ι) (_ : i ∈ s), span R (f i))\n[PROOFSTEP]\nexact hd i s s.finite_toSet his\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nη : Type u_8\nιs : η → Type u_9\nf : (j : η) → ιs j → M\nhindep : ∀ (j : η), LinearIndependent R (f j)\nhd :\n  ∀ (i : η) (t : Set η),\n    Set.Finite t → ¬i ∈ t → Disjoint (span R (range (f i))) (⨆ (i : η) (_ : i ∈ t), span R (range (f i)))\n⊢ LinearIndependent R fun ji => f ji.fst ji.snd\n[PROOFSTEP]\nnontriviality R\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nη : Type u_8\nιs : η → Type u_9\nf : (j : η) → ιs j → M\nhindep : ∀ (j : η), LinearIndependent R (f j)\nhd :\n  ∀ (i : η) (t : Set η),\n    Set.Finite t → ¬i ∈ t → Disjoint (span R (range (f i))) (⨆ (i : η) (_ : i ∈ t), span R (range (f i)))\n✝ : Nontrivial R\n⊢ LinearIndependent R fun ji => f ji.fst ji.snd\n[PROOFSTEP]\napply LinearIndependent.of_subtype_range\n[GOAL]\ncase hf\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nη : Type u_8\nιs : η → Type u_9\nf : (j : η) → ιs j → M\nhindep : ∀ (j : η), LinearIndependent R (f j)\nhd :\n  ∀ (i : η) (t : Set η),\n    Set.Finite t → ¬i ∈ t → Disjoint (span R (range (f i))) (⨆ (i : η) (_ : i ∈ t), span R (range (f i)))\n✝ : Nontrivial R\n⊢ Injective fun ji => f ji.fst ji.snd\n[PROOFSTEP]\nrintro ⟨x₁, x₂⟩ ⟨y₁, y₂⟩ hxy\n[GOAL]\ncase hf.mk.mk\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nη : Type u_8\nιs : η → Type u_9\nf : (j : η) → ιs j → M\nhindep : ∀ (j : η), LinearIndependent R (f j)\nhd :\n  ∀ (i : η) (t : Set η),\n    Set.Finite t → ¬i ∈ t → Disjoint (span R (range (f i))) (⨆ (i : η) (_ : i ∈ t), span R (range (f i)))\n✝ : Nontrivial R\nx₁ : η\nx₂ : ιs x₁\ny₁ : η\ny₂ : ιs y₁\nhxy : (fun ji => f ji.fst ji.snd) { fst := x₁, snd := x₂ } = (fun ji => f ji.fst ji.snd) { fst := y₁, snd := y₂ }\n⊢ { fst := x₁, snd := x₂ } = { fst := y₁, snd := y₂ }\n[PROOFSTEP]\nby_cases h_cases : x₁ = y₁\n[GOAL]\ncase pos\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nη : Type u_8\nιs : η → Type u_9\nf : (j : η) → ιs j → M\nhindep : ∀ (j : η), LinearIndependent R (f j)\nhd :\n  ∀ (i : η) (t : Set η),\n    Set.Finite t → ¬i ∈ t → Disjoint (span R (range (f i))) (⨆ (i : η) (_ : i ∈ t), span R (range (f i)))\n✝ : Nontrivial R\nx₁ : η\nx₂ : ιs x₁\ny₁ : η\ny₂ : ιs y₁\nhxy : (fun ji => f ji.fst ji.snd) { fst := x₁, snd := x₂ } = (fun ji => f ji.fst ji.snd) { fst := y₁, snd := y₂ }\nh_cases : x₁ = y₁\n⊢ { fst := x₁, snd := x₂ } = { fst := y₁, snd := y₂ }\ncase neg\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nη : Type u_8\nιs : η → Type u_9\nf : (j : η) → ιs j → M\nhindep : ∀ (j : η), LinearIndependent R (f j)\nhd :\n  ∀ (i : η) (t : Set η),\n    Set.Finite t → ¬i ∈ t → Disjoint (span R (range (f i))) (⨆ (i : η) (_ : i ∈ t), span R (range (f i)))\n✝ : Nontrivial R\nx₁ : η\nx₂ : ιs x₁\ny₁ : η\ny₂ : ιs y₁\nhxy : (fun ji => f ji.fst ji.snd) { fst := x₁, snd := x₂ } = (fun ji => f ji.fst ji.snd) { fst := y₁, snd := y₂ }\nh_cases : ¬x₁ = y₁\n⊢ { fst := x₁, snd := x₂ } = { fst := y₁, snd := y₂ }\n[PROOFSTEP]\nsubst h_cases\n[GOAL]\ncase pos\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nη : Type u_8\nιs : η → Type u_9\nf : (j : η) → ιs j → M\nhindep : ∀ (j : η), LinearIndependent R (f j)\nhd :\n  ∀ (i : η) (t : Set η),\n    Set.Finite t → ¬i ∈ t → Disjoint (span R (range (f i))) (⨆ (i : η) (_ : i ∈ t), span R (range (f i)))\n✝ : Nontrivial R\nx₁ : η\nx₂ y₂ : ιs x₁\nhxy : (fun ji => f ji.fst ji.snd) { fst := x₁, snd := x₂ } = (fun ji => f ji.fst ji.snd) { fst := x₁, snd := y₂ }\n⊢ { fst := x₁, snd := x₂ } = { fst := x₁, snd := y₂ }\n[PROOFSTEP]\napply Sigma.eq\n[GOAL]\ncase pos.a\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nη : Type u_8\nιs : η → Type u_9\nf : (j : η) → ιs j → M\nhindep : ∀ (j : η), LinearIndependent R (f j)\nhd :\n  ∀ (i : η) (t : Set η),\n    Set.Finite t → ¬i ∈ t → Disjoint (span R (range (f i))) (⨆ (i : η) (_ : i ∈ t), span R (range (f i)))\n✝ : Nontrivial R\nx₁ : η\nx₂ y₂ : ιs x₁\nhxy : (fun ji => f ji.fst ji.snd) { fst := x₁, snd := x₂ } = (fun ji => f ji.fst ji.snd) { fst := x₁, snd := y₂ }\n⊢ Eq.recOn ?pos.h₁✝ { fst := x₁, snd := x₂ }.snd = { fst := x₁, snd := y₂ }.snd\ncase pos.h₁\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nη : Type u_8\nιs : η → Type u_9\nf : (j : η) → ιs j → M\nhindep : ∀ (j : η), LinearIndependent R (f j)\nhd :\n  ∀ (i : η) (t : Set η),\n    Set.Finite t → ¬i ∈ t → Disjoint (span R (range (f i))) (⨆ (i : η) (_ : i ∈ t), span R (range (f i)))\n✝ : Nontrivial R\nx₁ : η\nx₂ y₂ : ιs x₁\nhxy : (fun ji => f ji.fst ji.snd) { fst := x₁, snd := x₂ } = (fun ji => f ji.fst ji.snd) { fst := x₁, snd := y₂ }\n⊢ { fst := x₁, snd := x₂ }.fst = { fst := x₁, snd := y₂ }.fst\n[PROOFSTEP]\nrw [LinearIndependent.injective (hindep _) hxy]\n[GOAL]\ncase pos.h₁\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nη : Type u_8\nιs : η → Type u_9\nf : (j : η) → ιs j → M\nhindep : ∀ (j : η), LinearIndependent R (f j)\nhd :\n  ∀ (i : η) (t : Set η),\n    Set.Finite t → ¬i ∈ t → Disjoint (span R (range (f i))) (⨆ (i : η) (_ : i ∈ t), span R (range (f i)))\n✝ : Nontrivial R\nx₁ : η\nx₂ y₂ : ιs x₁\nhxy : (fun ji => f ji.fst ji.snd) { fst := x₁, snd := x₂ } = (fun ji => f ji.fst ji.snd) { fst := x₁, snd := y₂ }\n⊢ { fst := x₁, snd := x₂ }.fst = { fst := x₁, snd := y₂ }.fst\ncase pos.h₁\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nη : Type u_8\nιs : η → Type u_9\nf : (j : η) → ιs j → M\nhindep : ∀ (j : η), LinearIndependent R (f j)\nhd :\n  ∀ (i : η) (t : Set η),\n    Set.Finite t → ¬i ∈ t → Disjoint (span R (range (f i))) (⨆ (i : η) (_ : i ∈ t), span R (range (f i)))\n✝ : Nontrivial R\nx₁ : η\nx₂ y₂ : ιs x₁\nhxy : (fun ji => f ji.fst ji.snd) { fst := x₁, snd := x₂ } = (fun ji => f ji.fst ji.snd) { fst := x₁, snd := y₂ }\n⊢ { fst := x₁, snd := x₂ }.fst = { fst := x₁, snd := y₂ }.fst\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nη : Type u_8\nιs : η → Type u_9\nf : (j : η) → ιs j → M\nhindep : ∀ (j : η), LinearIndependent R (f j)\nhd :\n  ∀ (i : η) (t : Set η),\n    Set.Finite t → ¬i ∈ t → Disjoint (span R (range (f i))) (⨆ (i : η) (_ : i ∈ t), span R (range (f i)))\n✝ : Nontrivial R\nx₁ : η\nx₂ : ιs x₁\ny₁ : η\ny₂ : ιs y₁\nhxy : (fun ji => f ji.fst ji.snd) { fst := x₁, snd := x₂ } = (fun ji => f ji.fst ji.snd) { fst := y₁, snd := y₂ }\nh_cases : ¬x₁ = y₁\n⊢ { fst := x₁, snd := x₂ } = { fst := y₁, snd := y₂ }\n[PROOFSTEP]\nhave h0 : f x₁ x₂ = 0 :=\n  by\n  apply\n    disjoint_def.1 (hd x₁ { y₁ } (finite_singleton y₁) fun h => h_cases (eq_of_mem_singleton h)) (f x₁ x₂)\n      (subset_span (mem_range_self _))\n  rw [iSup_singleton]\n  simp only at hxy \n  rw [hxy]\n  exact subset_span (mem_range_self y₂)\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nη : Type u_8\nιs : η → Type u_9\nf : (j : η) → ιs j → M\nhindep : ∀ (j : η), LinearIndependent R (f j)\nhd :\n  ∀ (i : η) (t : Set η),\n    Set.Finite t → ¬i ∈ t → Disjoint (span R (range (f i))) (⨆ (i : η) (_ : i ∈ t), span R (range (f i)))\n✝ : Nontrivial R\nx₁ : η\nx₂ : ιs x₁\ny₁ : η\ny₂ : ιs y₁\nhxy : (fun ji => f ji.fst ji.snd) { fst := x₁, snd := x₂ } = (fun ji => f ji.fst ji.snd) { fst := y₁, snd := y₂ }\nh_cases : ¬x₁ = y₁\n⊢ f x₁ x₂ = 0\n[PROOFSTEP]\napply\n  disjoint_def.1 (hd x₁ { y₁ } (finite_singleton y₁) fun h => h_cases (eq_of_mem_singleton h)) (f x₁ x₂)\n    (subset_span (mem_range_self _))\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nη : Type u_8\nιs : η → Type u_9\nf : (j : η) → ιs j → M\nhindep : ∀ (j : η), LinearIndependent R (f j)\nhd :\n  ∀ (i : η) (t : Set η),\n    Set.Finite t → ¬i ∈ t → Disjoint (span R (range (f i))) (⨆ (i : η) (_ : i ∈ t), span R (range (f i)))\n✝ : Nontrivial R\nx₁ : η\nx₂ : ιs x₁\ny₁ : η\ny₂ : ιs y₁\nhxy : (fun ji => f ji.fst ji.snd) { fst := x₁, snd := x₂ } = (fun ji => f ji.fst ji.snd) { fst := y₁, snd := y₂ }\nh_cases : ¬x₁ = y₁\n⊢ f x₁ x₂ ∈ ⨆ (i : η) (_ : i ∈ {y₁}), span R (range (f i))\n[PROOFSTEP]\nrw [iSup_singleton]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nη : Type u_8\nιs : η → Type u_9\nf : (j : η) → ιs j → M\nhindep : ∀ (j : η), LinearIndependent R (f j)\nhd :\n  ∀ (i : η) (t : Set η),\n    Set.Finite t → ¬i ∈ t → Disjoint (span R (range (f i))) (⨆ (i : η) (_ : i ∈ t), span R (range (f i)))\n✝ : Nontrivial R\nx₁ : η\nx₂ : ιs x₁\ny₁ : η\ny₂ : ιs y₁\nhxy : (fun ji => f ji.fst ji.snd) { fst := x₁, snd := x₂ } = (fun ji => f ji.fst ji.snd) { fst := y₁, snd := y₂ }\nh_cases : ¬x₁ = y₁\n⊢ f x₁ x₂ ∈ span R (range (f y₁))\n[PROOFSTEP]\nsimp only at hxy \n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nη : Type u_8\nιs : η → Type u_9\nf : (j : η) → ιs j → M\nhindep : ∀ (j : η), LinearIndependent R (f j)\nhd :\n  ∀ (i : η) (t : Set η),\n    Set.Finite t → ¬i ∈ t → Disjoint (span R (range (f i))) (⨆ (i : η) (_ : i ∈ t), span R (range (f i)))\n✝ : Nontrivial R\nx₁ : η\nx₂ : ιs x₁\ny₁ : η\ny₂ : ιs y₁\nhxy : f x₁ x₂ = f y₁ y₂\nh_cases : ¬x₁ = y₁\n⊢ f x₁ x₂ ∈ span R (range (f y₁))\n[PROOFSTEP]\nrw [hxy]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nη : Type u_8\nιs : η → Type u_9\nf : (j : η) → ιs j → M\nhindep : ∀ (j : η), LinearIndependent R (f j)\nhd :\n  ∀ (i : η) (t : Set η),\n    Set.Finite t → ¬i ∈ t → Disjoint (span R (range (f i))) (⨆ (i : η) (_ : i ∈ t), span R (range (f i)))\n✝ : Nontrivial R\nx₁ : η\nx₂ : ιs x₁\ny₁ : η\ny₂ : ιs y₁\nhxy : f x₁ x₂ = f y₁ y₂\nh_cases : ¬x₁ = y₁\n⊢ f y₁ y₂ ∈ span R (range (f y₁))\n[PROOFSTEP]\nexact subset_span (mem_range_self y₂)\n[GOAL]\ncase neg\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nη : Type u_8\nιs : η → Type u_9\nf : (j : η) → ιs j → M\nhindep : ∀ (j : η), LinearIndependent R (f j)\nhd :\n  ∀ (i : η) (t : Set η),\n    Set.Finite t → ¬i ∈ t → Disjoint (span R (range (f i))) (⨆ (i : η) (_ : i ∈ t), span R (range (f i)))\n✝ : Nontrivial R\nx₁ : η\nx₂ : ιs x₁\ny₁ : η\ny₂ : ιs y₁\nhxy : (fun ji => f ji.fst ji.snd) { fst := x₁, snd := x₂ } = (fun ji => f ji.fst ji.snd) { fst := y₁, snd := y₂ }\nh_cases : ¬x₁ = y₁\nh0 : f x₁ x₂ = 0\n⊢ { fst := x₁, snd := x₂ } = { fst := y₁, snd := y₂ }\n[PROOFSTEP]\nexact False.elim ((hindep x₁).ne_zero _ h0)\n[GOAL]\ncase a\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nη : Type u_8\nιs : η → Type u_9\nf : (j : η) → ιs j → M\nhindep : ∀ (j : η), LinearIndependent R (f j)\nhd :\n  ∀ (i : η) (t : Set η),\n    Set.Finite t → ¬i ∈ t → Disjoint (span R (range (f i))) (⨆ (i : η) (_ : i ∈ t), span R (range (f i)))\n✝ : Nontrivial R\n⊢ LinearIndependent R Subtype.val\n[PROOFSTEP]\nrw [range_sigma_eq_iUnion_range]\n[GOAL]\ncase a\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nη : Type u_8\nιs : η → Type u_9\nf : (j : η) → ιs j → M\nhindep : ∀ (j : η), LinearIndependent R (f j)\nhd :\n  ∀ (i : η) (t : Set η),\n    Set.Finite t → ¬i ∈ t → Disjoint (span R (range (f i))) (⨆ (i : η) (_ : i ∈ t), span R (range (f i)))\n✝ : Nontrivial R\n⊢ LinearIndependent R Subtype.val\n[PROOFSTEP]\napply linearIndependent_iUnion_finite_subtype (fun j => (hindep j).to_subtype_range) hd\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhv✝ hv : LinearIndependent R v\n⊢ (ι →₀ R) ≃ₗ[R] { x // x ∈ span R (range v) }\n[PROOFSTEP]\napply LinearEquiv.ofBijective (LinearMap.codRestrict (span R (range v)) (Finsupp.total ι M R v) _)\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhv✝ hv : LinearIndependent R v\n⊢ Bijective ↑(LinearMap.codRestrict (span R (range v)) (Finsupp.total ι M R v) ?m.425197)\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhv✝ hv : LinearIndependent R v\n⊢ ∀ (c : ι →₀ R), ↑(Finsupp.total ι M R v) c ∈ span R (range v)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase left\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhv✝ hv : LinearIndependent R v\n⊢ Injective ↑(LinearMap.codRestrict (span R (range v)) (Finsupp.total ι M R v) ?m.425197)\n[PROOFSTEP]\nrw [← LinearMap.ker_eq_bot, LinearMap.ker_codRestrict]\n[GOAL]\ncase left\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhv✝ hv : LinearIndependent R v\n⊢ LinearMap.ker (Finsupp.total ι M R v) = ⊥\ncase left.hf\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhv✝ hv : LinearIndependent R v\n⊢ ∀ (c : ι →₀ R), ↑(Finsupp.total ι M R v) c ∈ span R (range v)\n[PROOFSTEP]\napply hv\n[GOAL]\ncase left.hf\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhv✝ hv : LinearIndependent R v\n⊢ ∀ (c : ι →₀ R), ↑(Finsupp.total ι M R v) c ∈ span R (range v)\n[PROOFSTEP]\nintro l\n[GOAL]\ncase left.hf\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhv✝ hv : LinearIndependent R v\nl : ι →₀ R\n⊢ ↑(Finsupp.total ι M R v) l ∈ span R (range v)\n[PROOFSTEP]\nrw [← Finsupp.range_total]\n[GOAL]\ncase left.hf\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhv✝ hv : LinearIndependent R v\nl : ι →₀ R\n⊢ ↑(Finsupp.total ι M R v) l ∈ LinearMap.range (Finsupp.total ι M R v)\n[PROOFSTEP]\nrw [LinearMap.mem_range]\n[GOAL]\ncase left.hf\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhv✝ hv : LinearIndependent R v\nl : ι →₀ R\n⊢ ∃ y, ↑(Finsupp.total ι M R v) y = ↑(Finsupp.total ι M R v) l\n[PROOFSTEP]\napply mem_range_self l\n[GOAL]\ncase right\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhv✝ hv : LinearIndependent R v\n⊢ Surjective\n    ↑(LinearMap.codRestrict (span R (range v)) (Finsupp.total ι M R v)\n        (_ : ∀ (l : ι →₀ R), ↑(Finsupp.total ι M R v) l ∈ span R (range v)))\n[PROOFSTEP]\nrw [← LinearMap.range_eq_top, LinearMap.range_eq_map, LinearMap.map_codRestrict, ← LinearMap.range_le_iff_comap,\n  range_subtype, Submodule.map_top]\n[GOAL]\ncase right\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhv✝ hv : LinearIndependent R v\n⊢ span R (range v) ≤ LinearMap.range (Finsupp.total ι M R v)\n[PROOFSTEP]\nrw [Finsupp.range_total]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhv : LinearIndependent R v\n⊢ LinearMap.ker (repr hv) = ⊥\n[PROOFSTEP]\nrw [LinearIndependent.repr, LinearEquiv.ker]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhv : LinearIndependent R v\n⊢ LinearMap.range (repr hv) = ⊤\n[PROOFSTEP]\nrw [LinearIndependent.repr, LinearEquiv.range]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx✝ y : M\nhv : LinearIndependent R v\nl : ι →₀ R\nx : { x // x ∈ span R (range v) }\neq : ↑(Finsupp.total ι M R v) l = ↑x\n⊢ ↑(repr hv) x = l\n[PROOFSTEP]\nhave : ↑((LinearIndependent.totalEquiv hv : (ι →₀ R) →ₗ[R] span R (range v)) l) = Finsupp.total ι M R v l := rfl\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx✝ y : M\nhv : LinearIndependent R v\nl : ι →₀ R\nx : { x // x ∈ span R (range v) }\neq : ↑(Finsupp.total ι M R v) l = ↑x\nthis : ↑(↑↑(totalEquiv hv) l) = ↑(Finsupp.total ι M R v) l\n⊢ ↑(repr hv) x = l\n[PROOFSTEP]\nhave : (LinearIndependent.totalEquiv hv : (ι →₀ R) →ₗ[R] span R (range v)) l = x :=\n  by\n  rw [eq] at this \n  exact Subtype.ext_iff.2 this\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx✝ y : M\nhv : LinearIndependent R v\nl : ι →₀ R\nx : { x // x ∈ span R (range v) }\neq : ↑(Finsupp.total ι M R v) l = ↑x\nthis : ↑(↑↑(totalEquiv hv) l) = ↑(Finsupp.total ι M R v) l\n⊢ ↑↑(totalEquiv hv) l = x\n[PROOFSTEP]\nrw [eq] at this \n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx✝ y : M\nhv : LinearIndependent R v\nl : ι →₀ R\nx : { x // x ∈ span R (range v) }\neq : ↑(Finsupp.total ι M R v) l = ↑x\nthis : ↑(↑↑(totalEquiv hv) l) = ↑x\n⊢ ↑↑(totalEquiv hv) l = x\n[PROOFSTEP]\nexact Subtype.ext_iff.2 this\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx✝ y : M\nhv : LinearIndependent R v\nl : ι →₀ R\nx : { x // x ∈ span R (range v) }\neq : ↑(Finsupp.total ι M R v) l = ↑x\nthis✝ : ↑(↑↑(totalEquiv hv) l) = ↑(Finsupp.total ι M R v) l\nthis : ↑↑(totalEquiv hv) l = x\n⊢ ↑(repr hv) x = l\n[PROOFSTEP]\nrw [← LinearEquiv.symm_apply_apply hv.totalEquiv l]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx✝ y : M\nhv : LinearIndependent R v\nl : ι →₀ R\nx : { x // x ∈ span R (range v) }\neq : ↑(Finsupp.total ι M R v) l = ↑x\nthis✝ : ↑(↑↑(totalEquiv hv) l) = ↑(Finsupp.total ι M R v) l\nthis : ↑↑(totalEquiv hv) l = x\n⊢ ↑(repr hv) x = ↑(LinearEquiv.symm (totalEquiv hv)) (↑(totalEquiv hv) l)\n[PROOFSTEP]\nrw [← this]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx✝ y : M\nhv : LinearIndependent R v\nl : ι →₀ R\nx : { x // x ∈ span R (range v) }\neq : ↑(Finsupp.total ι M R v) l = ↑x\nthis✝ : ↑(↑↑(totalEquiv hv) l) = ↑(Finsupp.total ι M R v) l\nthis : ↑↑(totalEquiv hv) l = x\n⊢ ↑(repr hv) (↑↑(totalEquiv hv) l) = ↑(LinearEquiv.symm (totalEquiv hv)) (↑(totalEquiv hv) l)\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx✝ y : M\nhv : LinearIndependent R v\ni : ι\nx : { x // x ∈ span R (range v) }\nhx : ↑x = v i\n⊢ ↑(repr hv) x = Finsupp.single i 1\n[PROOFSTEP]\napply hv.repr_eq\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx✝ y : M\nhv : LinearIndependent R v\ni : ι\nx : { x // x ∈ span R (range v) }\nhx : ↑x = v i\n⊢ ↑(Finsupp.total ι M R v) (Finsupp.single i 1) = ↑x\n[PROOFSTEP]\nsimp [Finsupp.total_single, hx]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁷ : Ring R\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M'\ninst✝⁴ : AddCommGroup M''\ninst✝³ : Module R M\ninst✝² : Module R M'\ninst✝¹ : Module R M''\na b : R\nx✝ y : M\nhv : LinearIndependent R v\ninst✝ : Nontrivial R\nx : { x // x ∈ span R (range v) }\n⊢ Span.repr R (range v) x = Finsupp.equivMapDomain (Equiv.ofInjective v (_ : Injective v)) (↑(repr hv) x)\n[PROOFSTEP]\nhave p : (Span.repr R (Set.range v) x).equivMapDomain (Equiv.ofInjective _ hv.injective).symm = hv.repr x :=\n  by\n  apply (LinearIndependent.totalEquiv hv).injective\n  ext\n  simp only [LinearIndependent.totalEquiv_apply_coe, Equiv.self_comp_ofInjective_symm, LinearIndependent.total_repr,\n    Finsupp.total_equivMapDomain, Span.finsupp_total_repr]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁷ : Ring R\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M'\ninst✝⁴ : AddCommGroup M''\ninst✝³ : Module R M\ninst✝² : Module R M'\ninst✝¹ : Module R M''\na b : R\nx✝ y : M\nhv : LinearIndependent R v\ninst✝ : Nontrivial R\nx : { x // x ∈ span R (range v) }\n⊢ Finsupp.equivMapDomain (Equiv.ofInjective v (_ : Injective v)).symm (Span.repr R (range v) x) = ↑(repr hv) x\n[PROOFSTEP]\napply (LinearIndependent.totalEquiv hv).injective\n[GOAL]\ncase a\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁷ : Ring R\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M'\ninst✝⁴ : AddCommGroup M''\ninst✝³ : Module R M\ninst✝² : Module R M'\ninst✝¹ : Module R M''\na b : R\nx✝ y : M\nhv : LinearIndependent R v\ninst✝ : Nontrivial R\nx : { x // x ∈ span R (range v) }\n⊢ ↑(totalEquiv hv) (Finsupp.equivMapDomain (Equiv.ofInjective v (_ : Injective v)).symm (Span.repr R (range v) x)) =\n    ↑(totalEquiv hv) (↑(repr hv) x)\n[PROOFSTEP]\next\n[GOAL]\ncase a.a\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁷ : Ring R\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M'\ninst✝⁴ : AddCommGroup M''\ninst✝³ : Module R M\ninst✝² : Module R M'\ninst✝¹ : Module R M''\na b : R\nx✝ y : M\nhv : LinearIndependent R v\ninst✝ : Nontrivial R\nx : { x // x ∈ span R (range v) }\n⊢ ↑(↑(totalEquiv hv) (Finsupp.equivMapDomain (Equiv.ofInjective v (_ : Injective v)).symm (Span.repr R (range v) x))) =\n    ↑(↑(totalEquiv hv) (↑(repr hv) x))\n[PROOFSTEP]\nsimp only [LinearIndependent.totalEquiv_apply_coe, Equiv.self_comp_ofInjective_symm, LinearIndependent.total_repr,\n  Finsupp.total_equivMapDomain, Span.finsupp_total_repr]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁷ : Ring R\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M'\ninst✝⁴ : AddCommGroup M''\ninst✝³ : Module R M\ninst✝² : Module R M'\ninst✝¹ : Module R M''\na b : R\nx✝ y : M\nhv : LinearIndependent R v\ninst✝ : Nontrivial R\nx : { x // x ∈ span R (range v) }\np : Finsupp.equivMapDomain (Equiv.ofInjective v (_ : Injective v)).symm (Span.repr R (range v) x) = ↑(repr hv) x\n⊢ Span.repr R (range v) x = Finsupp.equivMapDomain (Equiv.ofInjective v (_ : Injective v)) (↑(repr hv) x)\n[PROOFSTEP]\next ⟨_, ⟨i, rfl⟩⟩\n[GOAL]\ncase h.mk.intro\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁷ : Ring R\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M'\ninst✝⁴ : AddCommGroup M''\ninst✝³ : Module R M\ninst✝² : Module R M'\ninst✝¹ : Module R M''\na b : R\nx✝ y : M\nhv : LinearIndependent R v\ninst✝ : Nontrivial R\nx : { x // x ∈ span R (range v) }\np : Finsupp.equivMapDomain (Equiv.ofInjective v (_ : Injective v)).symm (Span.repr R (range v) x) = ↑(repr hv) x\ni : ι\n⊢ ↑(Span.repr R (range v) x) { val := v i, property := (_ : ∃ y, v y = v i) } =\n    ↑(Finsupp.equivMapDomain (Equiv.ofInjective v (_ : Injective v)) (↑(repr hv) x))\n      { val := v i, property := (_ : ∃ y, v y = v i) }\n[PROOFSTEP]\nsimp [← p]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na✝ b : R\nx y : M\nhv✝ hv : LinearIndependent R v\ni : ι\na : R\nha : a • v i ∈ span R (v '' (univ \\ {i}))\n⊢ a = 0\n[PROOFSTEP]\nrw [Finsupp.span_image_eq_map_total, mem_map] at ha \n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na✝ b : R\nx y : M\nhv✝ hv : LinearIndependent R v\ni : ι\na : R\nha : ∃ y, y ∈ Finsupp.supported R R (univ \\ {i}) ∧ ↑(Finsupp.total ι M R v) y = a • v i\n⊢ a = 0\n[PROOFSTEP]\nrcases ha with ⟨l, hl, e⟩\n[GOAL]\ncase intro.intro\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na✝ b : R\nx y : M\nhv✝ hv : LinearIndependent R v\ni : ι\na : R\nl : ι →₀ R\nhl : l ∈ Finsupp.supported R R (univ \\ {i})\ne : ↑(Finsupp.total ι M R v) l = a • v i\n⊢ a = 0\n[PROOFSTEP]\nrw [sub_eq_zero.1 (linearIndependent_iff.1 hv (l - Finsupp.single i a) (by simp [e]))] at hl \n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na✝ b : R\nx y : M\nhv✝ hv : LinearIndependent R v\ni : ι\na : R\nl : ι →₀ R\nhl : l ∈ Finsupp.supported R R (univ \\ {i})\ne : ↑(Finsupp.total ι M R v) l = a • v i\n⊢ ↑(Finsupp.total ι M R v) (l - Finsupp.single i a) = 0\n[PROOFSTEP]\nsimp [e]\n[GOAL]\ncase intro.intro\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na✝ b : R\nx y : M\nhv✝ hv : LinearIndependent R v\ni : ι\na : R\nl : ι →₀ R\nhl : Finsupp.single i a ∈ Finsupp.supported R R (univ \\ {i})\ne : ↑(Finsupp.total ι M R v) l = a • v i\n⊢ a = 0\n[PROOFSTEP]\nby_contra hn\n[GOAL]\ncase intro.intro\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na✝ b : R\nx y : M\nhv✝ hv : LinearIndependent R v\ni : ι\na : R\nl : ι →₀ R\nhl : Finsupp.single i a ∈ Finsupp.supported R R (univ \\ {i})\ne : ↑(Finsupp.total ι M R v) l = a • v i\nhn : ¬a = 0\n⊢ False\n[PROOFSTEP]\nexact (not_mem_of_mem_diff (hl <| by simp [hn])) (mem_singleton _)\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na✝ b : R\nx y : M\nhv✝ hv : LinearIndependent R v\ni : ι\na : R\nl : ι →₀ R\nhl : Finsupp.single i a ∈ Finsupp.supported R R (univ \\ {i})\ne : ↑(Finsupp.total ι M R v) l = a • v i\nhn : ¬a = 0\n⊢ i ∈ ↑(Finsupp.single i a).support\n[PROOFSTEP]\nsimp [hn]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhv : LinearIndependent R v\nH : ∀ (i : ι) (a : R), a • v i ∈ span R (v '' (univ \\ {i})) → a = 0\nl : ι →₀ R\nhl : ↑(Finsupp.total ι M R v) l = 0\n⊢ l = 0\n[PROOFSTEP]\next i\n[GOAL]\ncase h\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhv : LinearIndependent R v\nH : ∀ (i : ι) (a : R), a • v i ∈ span R (v '' (univ \\ {i})) → a = 0\nl : ι →₀ R\nhl : ↑(Finsupp.total ι M R v) l = 0\ni : ι\n⊢ ↑l i = ↑0 i\n[PROOFSTEP]\nsimp only [Finsupp.zero_apply]\n[GOAL]\ncase h\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhv : LinearIndependent R v\nH : ∀ (i : ι) (a : R), a • v i ∈ span R (v '' (univ \\ {i})) → a = 0\nl : ι →₀ R\nhl : ↑(Finsupp.total ι M R v) l = 0\ni : ι\n⊢ ↑l i = 0\n[PROOFSTEP]\nby_contra hn\n[GOAL]\ncase h\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhv : LinearIndependent R v\nH : ∀ (i : ι) (a : R), a • v i ∈ span R (v '' (univ \\ {i})) → a = 0\nl : ι →₀ R\nhl : ↑(Finsupp.total ι M R v) l = 0\ni : ι\nhn : ¬↑l i = 0\n⊢ False\n[PROOFSTEP]\nrefine' hn (H i _ _)\n[GOAL]\ncase h\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhv : LinearIndependent R v\nH : ∀ (i : ι) (a : R), a • v i ∈ span R (v '' (univ \\ {i})) → a = 0\nl : ι →₀ R\nhl : ↑(Finsupp.total ι M R v) l = 0\ni : ι\nhn : ¬↑l i = 0\n⊢ ↑l i • v i ∈ span R (v '' (univ \\ {i}))\n[PROOFSTEP]\nrefine' (Finsupp.mem_span_image_iff_total R).2 ⟨Finsupp.single i (l i) - l, _, _⟩\n[GOAL]\ncase h.refine'_1\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhv : LinearIndependent R v\nH : ∀ (i : ι) (a : R), a • v i ∈ span R (v '' (univ \\ {i})) → a = 0\nl : ι →₀ R\nhl : ↑(Finsupp.total ι M R v) l = 0\ni : ι\nhn : ¬↑l i = 0\n⊢ Finsupp.single i (↑l i) - l ∈ Finsupp.supported R R (univ \\ {i})\n[PROOFSTEP]\nrw [Finsupp.mem_supported']\n[GOAL]\ncase h.refine'_1\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhv : LinearIndependent R v\nH : ∀ (i : ι) (a : R), a • v i ∈ span R (v '' (univ \\ {i})) → a = 0\nl : ι →₀ R\nhl : ↑(Finsupp.total ι M R v) l = 0\ni : ι\nhn : ¬↑l i = 0\n⊢ ∀ (x : ι), ¬x ∈ univ \\ {i} → ↑(Finsupp.single i (↑l i) - l) x = 0\n[PROOFSTEP]\nintro j hj\n[GOAL]\ncase h.refine'_1\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhv : LinearIndependent R v\nH : ∀ (i : ι) (a : R), a • v i ∈ span R (v '' (univ \\ {i})) → a = 0\nl : ι →₀ R\nhl : ↑(Finsupp.total ι M R v) l = 0\ni : ι\nhn : ¬↑l i = 0\nj : ι\nhj : ¬j ∈ univ \\ {i}\n⊢ ↑(Finsupp.single i (↑l i) - l) j = 0\n[PROOFSTEP]\nhave hij : j = i :=\n  Classical.not_not.1 fun hij : j ≠ i => hj ((mem_diff _).2 ⟨mem_univ _, fun h => hij (eq_of_mem_singleton h)⟩)\n[GOAL]\ncase h.refine'_1\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhv : LinearIndependent R v\nH : ∀ (i : ι) (a : R), a • v i ∈ span R (v '' (univ \\ {i})) → a = 0\nl : ι →₀ R\nhl : ↑(Finsupp.total ι M R v) l = 0\ni : ι\nhn : ¬↑l i = 0\nj : ι\nhj : ¬j ∈ univ \\ {i}\nhij : j = i\n⊢ ↑(Finsupp.single i (↑l i) - l) j = 0\n[PROOFSTEP]\nsimp [hij]\n[GOAL]\ncase h.refine'_2\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhv : LinearIndependent R v\nH : ∀ (i : ι) (a : R), a • v i ∈ span R (v '' (univ \\ {i})) → a = 0\nl : ι →₀ R\nhl : ↑(Finsupp.total ι M R v) l = 0\ni : ι\nhn : ¬↑l i = 0\n⊢ ↑(Finsupp.total ι M R v) (Finsupp.single i (↑l i) - l) = ↑l i • v i\n[PROOFSTEP]\nsimp [hl]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhv✝ hv : LinearIndependent R v\n⊢ CompleteLattice.Independent fun i => span R {v i}\n[PROOFSTEP]\nrefine' CompleteLattice.independent_def.mp fun i => _\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhv✝ hv : LinearIndependent R v\ni : ι\n⊢ Disjoint ((fun i => span R {v i}) i) (⨆ (j : ι) (_ : j ≠ i), (fun i => span R {v i}) j)\n[PROOFSTEP]\nrw [disjoint_iff_inf_le]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhv✝ hv : LinearIndependent R v\ni : ι\n⊢ (fun i => span R {v i}) i ⊓ ⨆ (j : ι) (_ : j ≠ i), (fun i => span R {v i}) j ≤ ⊥\n[PROOFSTEP]\nintro m hm\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhv✝ hv : LinearIndependent R v\ni : ι\nm : M\nhm : m ∈ (fun i => span R {v i}) i ⊓ ⨆ (j : ι) (_ : j ≠ i), (fun i => span R {v i}) j\n⊢ m ∈ ⊥\n[PROOFSTEP]\nsimp only [mem_inf, mem_span_singleton, iSup_subtype', ← span_range_eq_iSup] at hm \n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhv✝ hv : LinearIndependent R v\ni : ι\nm : M\nhm : (∃ a, a • v i = m) ∧ m ∈ span R (range fun i_1 => v ↑i_1)\n⊢ m ∈ ⊥\n[PROOFSTEP]\nobtain ⟨⟨r, rfl⟩, hm⟩ := hm\n[GOAL]\ncase intro.intro\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhv✝ hv : LinearIndependent R v\ni : ι\nr : R\nhm : r • v i ∈ span R (range fun i_1 => v ↑i_1)\n⊢ r • v i ∈ ⊥\n[PROOFSTEP]\nsuffices r = 0 by simp [this]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhv✝ hv : LinearIndependent R v\ni : ι\nr : R\nhm : r • v i ∈ span R (range fun i_1 => v ↑i_1)\nthis : r = 0\n⊢ r • v i ∈ ⊥\n[PROOFSTEP]\nsimp [this]\n[GOAL]\ncase intro.intro\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhv✝ hv : LinearIndependent R v\ni : ι\nr : R\nhm : r • v i ∈ span R (range fun i_1 => v ↑i_1)\n⊢ r = 0\n[PROOFSTEP]\napply linearIndependent_iff_not_smul_mem_span.mp hv i\n[GOAL]\ncase intro.intro.a\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhv✝ hv : LinearIndependent R v\ni : ι\nr : R\nhm : r • v i ∈ span R (range fun i_1 => v ↑i_1)\n⊢ r • v i ∈ span R (v '' (univ \\ {i}))\n[PROOFSTEP]\nsuffices v '' (univ \\ { i }) = range fun j : { j // j ≠ i } => v j by rwa [this]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhv✝ hv : LinearIndependent R v\ni : ι\nr : R\nhm : r • v i ∈ span R (range fun i_1 => v ↑i_1)\nthis : v '' (univ \\ {i}) = range fun j => v ↑j\n⊢ r • v i ∈ span R (v '' (univ \\ {i}))\n[PROOFSTEP]\nrwa [this]\n[GOAL]\ncase intro.intro.a\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhv✝ hv : LinearIndependent R v\ni : ι\nr : R\nhm : r • v i ∈ span R (range fun i_1 => v ↑i_1)\n⊢ v '' (univ \\ {i}) = range fun j => v ↑j\n[PROOFSTEP]\next\n[GOAL]\ncase intro.intro.a.h\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhv✝ hv : LinearIndependent R v\ni : ι\nr : R\nhm : r • v i ∈ span R (range fun i_1 => v ↑i_1)\nx✝ : M\n⊢ x✝ ∈ v '' (univ \\ {i}) ↔ x✝ ∈ range fun j => v ↑j\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhv : LinearIndependent R v\ns : ι → M\n⊢ ∃ I, (LinearIndependent R fun x => s ↑x) ∧ ∀ (J : Set ι), I ⊆ J → (LinearIndependent R fun x => s ↑x) → I = J\n[PROOFSTEP]\nlet indep : Set ι → Prop := fun I => LinearIndependent R (s ∘ (↑) : I → M)\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhv : LinearIndependent R v\ns : ι → M\nindep : Set ι → Prop := fun I => LinearIndependent R (s ∘ Subtype.val)\n⊢ ∃ I, (LinearIndependent R fun x => s ↑x) ∧ ∀ (J : Set ι), I ⊆ J → (LinearIndependent R fun x => s ↑x) → I = J\n[PROOFSTEP]\nlet X := { I : Set ι // indep I }\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhv : LinearIndependent R v\ns : ι → M\nindep : Set ι → Prop := fun I => LinearIndependent R (s ∘ Subtype.val)\nX : Type u' := { I // indep I }\n⊢ ∃ I, (LinearIndependent R fun x => s ↑x) ∧ ∀ (J : Set ι), I ⊆ J → (LinearIndependent R fun x => s ↑x) → I = J\n[PROOFSTEP]\nlet r : X → X → Prop := fun I J => I.1 ⊆ J.1\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhv : LinearIndependent R v\ns : ι → M\nindep : Set ι → Prop := fun I => LinearIndependent R (s ∘ Subtype.val)\nX : Type u' := { I // indep I }\nr : X → X → Prop := fun I J => ↑I ⊆ ↑J\n⊢ ∃ I, (LinearIndependent R fun x => s ↑x) ∧ ∀ (J : Set ι), I ⊆ J → (LinearIndependent R fun x => s ↑x) → I = J\n[PROOFSTEP]\nhave key : ∀ c : Set X, IsChain r c → indep (⋃ (I : X) (_ : I ∈ c), I) :=\n  by\n  intro c hc\n  dsimp\n  rw [linearIndependent_comp_subtype]\n  intro f hsupport hsum\n  rcases eq_empty_or_nonempty c with (rfl | hn)\n  · simpa using hsupport\n  haveI : IsRefl X r := ⟨fun _ => Set.Subset.refl _⟩\n  obtain ⟨I, _I_mem, hI⟩ : ∃ I ∈ c, (f.support : Set ι) ⊆ I :=\n    hc.directedOn.exists_mem_subset_of_finset_subset_biUnion hn hsupport\n  exact linearIndependent_comp_subtype.mp I.2 f hI hsum\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhv : LinearIndependent R v\ns : ι → M\nindep : Set ι → Prop := fun I => LinearIndependent R (s ∘ Subtype.val)\nX : Type u' := { I // indep I }\nr : X → X → Prop := fun I J => ↑I ⊆ ↑J\n⊢ ∀ (c : Set X), IsChain r c → indep (⋃ (I : X) (_ : I ∈ c), ↑I)\n[PROOFSTEP]\nintro c hc\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhv : LinearIndependent R v\ns : ι → M\nindep : Set ι → Prop := fun I => LinearIndependent R (s ∘ Subtype.val)\nX : Type u' := { I // indep I }\nr : X → X → Prop := fun I J => ↑I ⊆ ↑J\nc : Set X\nhc : IsChain r c\n⊢ indep (⋃ (I : X) (_ : I ∈ c), ↑I)\n[PROOFSTEP]\ndsimp\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhv : LinearIndependent R v\ns : ι → M\nindep : Set ι → Prop := fun I => LinearIndependent R (s ∘ Subtype.val)\nX : Type u' := { I // indep I }\nr : X → X → Prop := fun I J => ↑I ⊆ ↑J\nc : Set X\nhc : IsChain r c\n⊢ LinearIndependent R (s ∘ Subtype.val)\n[PROOFSTEP]\nrw [linearIndependent_comp_subtype]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhv : LinearIndependent R v\ns : ι → M\nindep : Set ι → Prop := fun I => LinearIndependent R (s ∘ Subtype.val)\nX : Type u' := { I // indep I }\nr : X → X → Prop := fun I J => ↑I ⊆ ↑J\nc : Set X\nhc : IsChain r c\n⊢ ∀ (l : ι →₀ R),\n    l ∈ Finsupp.supported R R (⋃ (I : { I // LinearIndependent R (s ∘ Subtype.val) }) (_ : I ∈ c), ↑I) →\n      ↑(Finsupp.total ι M R s) l = 0 → l = 0\n[PROOFSTEP]\nintro f hsupport hsum\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhv : LinearIndependent R v\ns : ι → M\nindep : Set ι → Prop := fun I => LinearIndependent R (s ∘ Subtype.val)\nX : Type u' := { I // indep I }\nr : X → X → Prop := fun I J => ↑I ⊆ ↑J\nc : Set X\nhc : IsChain r c\nf : ι →₀ R\nhsupport : f ∈ Finsupp.supported R R (⋃ (I : { I // LinearIndependent R (s ∘ Subtype.val) }) (_ : I ∈ c), ↑I)\nhsum : ↑(Finsupp.total ι M R s) f = 0\n⊢ f = 0\n[PROOFSTEP]\nrcases eq_empty_or_nonempty c with (rfl | hn)\n[GOAL]\ncase inl\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhv : LinearIndependent R v\ns : ι → M\nindep : Set ι → Prop := fun I => LinearIndependent R (s ∘ Subtype.val)\nX : Type u' := { I // indep I }\nr : X → X → Prop := fun I J => ↑I ⊆ ↑J\nf : ι →₀ R\nhsum : ↑(Finsupp.total ι M R s) f = 0\nhc : IsChain r ∅\nhsupport : f ∈ Finsupp.supported R R (⋃ (I : { I // LinearIndependent R (s ∘ Subtype.val) }) (_ : I ∈ ∅), ↑I)\n⊢ f = 0\n[PROOFSTEP]\nsimpa using hsupport\n[GOAL]\ncase inr\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhv : LinearIndependent R v\ns : ι → M\nindep : Set ι → Prop := fun I => LinearIndependent R (s ∘ Subtype.val)\nX : Type u' := { I // indep I }\nr : X → X → Prop := fun I J => ↑I ⊆ ↑J\nc : Set X\nhc : IsChain r c\nf : ι →₀ R\nhsupport : f ∈ Finsupp.supported R R (⋃ (I : { I // LinearIndependent R (s ∘ Subtype.val) }) (_ : I ∈ c), ↑I)\nhsum : ↑(Finsupp.total ι M R s) f = 0\nhn : Set.Nonempty c\n⊢ f = 0\n[PROOFSTEP]\nhaveI : IsRefl X r := ⟨fun _ => Set.Subset.refl _⟩\n[GOAL]\ncase inr\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhv : LinearIndependent R v\ns : ι → M\nindep : Set ι → Prop := fun I => LinearIndependent R (s ∘ Subtype.val)\nX : Type u' := { I // indep I }\nr : X → X → Prop := fun I J => ↑I ⊆ ↑J\nc : Set X\nhc : IsChain r c\nf : ι →₀ R\nhsupport : f ∈ Finsupp.supported R R (⋃ (I : { I // LinearIndependent R (s ∘ Subtype.val) }) (_ : I ∈ c), ↑I)\nhsum : ↑(Finsupp.total ι M R s) f = 0\nhn : Set.Nonempty c\nthis : IsRefl X r\n⊢ f = 0\n[PROOFSTEP]\nobtain ⟨I, _I_mem, hI⟩ : ∃ I ∈ c, (f.support : Set ι) ⊆ I :=\n  hc.directedOn.exists_mem_subset_of_finset_subset_biUnion hn hsupport\n[GOAL]\ncase inr.intro.intro\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhv : LinearIndependent R v\ns : ι → M\nindep : Set ι → Prop := fun I => LinearIndependent R (s ∘ Subtype.val)\nX : Type u' := { I // indep I }\nr : X → X → Prop := fun I J => ↑I ⊆ ↑J\nc : Set X\nhc : IsChain r c\nf : ι →₀ R\nhsupport : f ∈ Finsupp.supported R R (⋃ (I : { I // LinearIndependent R (s ∘ Subtype.val) }) (_ : I ∈ c), ↑I)\nhsum : ↑(Finsupp.total ι M R s) f = 0\nhn : Set.Nonempty c\nthis : IsRefl X r\nI : X\n_I_mem : I ∈ c\nhI : ↑f.support ⊆ ↑I\n⊢ f = 0\n[PROOFSTEP]\nexact linearIndependent_comp_subtype.mp I.2 f hI hsum\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhv : LinearIndependent R v\ns : ι → M\nindep : Set ι → Prop := fun I => LinearIndependent R (s ∘ Subtype.val)\nX : Type u' := { I // indep I }\nr : X → X → Prop := fun I J => ↑I ⊆ ↑J\nkey : ∀ (c : Set X), IsChain r c → indep (⋃ (I : X) (_ : I ∈ c), ↑I)\n⊢ ∃ I, (LinearIndependent R fun x => s ↑x) ∧ ∀ (J : Set ι), I ⊆ J → (LinearIndependent R fun x => s ↑x) → I = J\n[PROOFSTEP]\nhave trans : Transitive r := fun I J K => Set.Subset.trans\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhv : LinearIndependent R v\ns : ι → M\nindep : Set ι → Prop := fun I => LinearIndependent R (s ∘ Subtype.val)\nX : Type u' := { I // indep I }\nr : X → X → Prop := fun I J => ↑I ⊆ ↑J\nkey : ∀ (c : Set X), IsChain r c → indep (⋃ (I : X) (_ : I ∈ c), ↑I)\ntrans : Transitive r\n⊢ ∃ I, (LinearIndependent R fun x => s ↑x) ∧ ∀ (J : Set ι), I ⊆ J → (LinearIndependent R fun x => s ↑x) → I = J\n[PROOFSTEP]\nobtain ⟨⟨I, hli : indep I⟩, hmax : ∀ a, r ⟨I, hli⟩ a → r a ⟨I, hli⟩⟩ :=\n  @exists_maximal_of_chains_bounded _ r\n    (fun c hc => ⟨⟨⋃ I ∈ c, (I : Set ι), key c hc⟩, fun I => Set.subset_biUnion_of_mem⟩) @trans\n[GOAL]\ncase intro.mk\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhv : LinearIndependent R v\ns : ι → M\nindep : Set ι → Prop := fun I => LinearIndependent R (s ∘ Subtype.val)\nX : Type u' := { I // indep I }\nr : X → X → Prop := fun I J => ↑I ⊆ ↑J\nkey : ∀ (c : Set X), IsChain r c → indep (⋃ (I : X) (_ : I ∈ c), ↑I)\ntrans : Transitive r\nI : Set ι\nhli : indep I\nhmax : ∀ (a : X), r { val := I, property := hli } a → r a { val := I, property := hli }\n⊢ ∃ I, (LinearIndependent R fun x => s ↑x) ∧ ∀ (J : Set ι), I ⊆ J → (LinearIndependent R fun x => s ↑x) → I = J\n[PROOFSTEP]\nexact ⟨I, hli, fun J hsub hli => Set.Subset.antisymm hsub (hmax ⟨J, hli⟩ hsub)⟩\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhv : LinearIndependent R v\ns : ι → M\n⊢ ∃ I, (LinearIndependent R fun x => s ↑x) ∧ ∀ (i : ι), ¬i ∈ I → ∃ a, a ≠ 0 ∧ a • s i ∈ span R (s '' I)\n[PROOFSTEP]\nclassical\nrcases exists_maximal_independent' R s with ⟨I, hIlinind, hImaximal⟩\nuse I, hIlinind\nintro i hi\nspecialize hImaximal (I ∪ { i }) (by simp)\nset J := I ∪ { i } with hJ\nhave memJ : ∀ {x}, x ∈ J ↔ x = i ∨ x ∈ I := by simp [hJ]\nhave hiJ : i ∈ J := by simp\nhave h := by\n  refine mt hImaximal ?_\n  · intro h2\n    rw [h2] at hi \n    exact absurd hiJ hi\nobtain ⟨f, supp_f, sum_f, f_ne⟩ := linearDependent_comp_subtype.mp h\nhave hfi : f i ≠ 0 := by\n  contrapose hIlinind\n  refine' linearDependent_comp_subtype.mpr ⟨f, _, sum_f, f_ne⟩\n  simp only [Finsupp.mem_supported, hJ] at supp_f ⊢\n  rintro x hx\n  refine' (memJ.mp (supp_f hx)).resolve_left _\n  rintro rfl\n  exact hIlinind (Finsupp.mem_support_iff.mp hx)\nuse f i, hfi\nhave hfi' : i ∈ f.support := Finsupp.mem_support_iff.mpr hfi\nrw [← Finset.insert_erase hfi', Finset.sum_insert (Finset.not_mem_erase _ _), add_eq_zero_iff_eq_neg] at sum_f \nrw [sum_f]\nrefine' neg_mem (sum_mem fun c hc => smul_mem _ _ (subset_span ⟨c, _, rfl⟩))\nexact (memJ.mp (supp_f (Finset.erase_subset _ _ hc))).resolve_left (Finset.ne_of_mem_erase hc)\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhv : LinearIndependent R v\ns : ι → M\n⊢ ∃ I, (LinearIndependent R fun x => s ↑x) ∧ ∀ (i : ι), ¬i ∈ I → ∃ a, a ≠ 0 ∧ a • s i ∈ span R (s '' I)\n[PROOFSTEP]\nrcases exists_maximal_independent' R s with ⟨I, hIlinind, hImaximal⟩\n[GOAL]\ncase intro.intro\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhv : LinearIndependent R v\ns : ι → M\nI : Set ι\nhIlinind : LinearIndependent R fun x => s ↑x\nhImaximal : ∀ (J : Set ι), I ⊆ J → (LinearIndependent R fun x => s ↑x) → I = J\n⊢ ∃ I, (LinearIndependent R fun x => s ↑x) ∧ ∀ (i : ι), ¬i ∈ I → ∃ a, a ≠ 0 ∧ a • s i ∈ span R (s '' I)\n[PROOFSTEP]\nuse I, hIlinind\n[GOAL]\ncase right\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhv : LinearIndependent R v\ns : ι → M\nI : Set ι\nhIlinind : LinearIndependent R fun x => s ↑x\nhImaximal : ∀ (J : Set ι), I ⊆ J → (LinearIndependent R fun x => s ↑x) → I = J\n⊢ ∀ (i : ι), ¬i ∈ I → ∃ a, a ≠ 0 ∧ a • s i ∈ span R (s '' I)\n[PROOFSTEP]\nintro i hi\n[GOAL]\ncase right\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhv : LinearIndependent R v\ns : ι → M\nI : Set ι\nhIlinind : LinearIndependent R fun x => s ↑x\nhImaximal : ∀ (J : Set ι), I ⊆ J → (LinearIndependent R fun x => s ↑x) → I = J\ni : ι\nhi : ¬i ∈ I\n⊢ ∃ a, a ≠ 0 ∧ a • s i ∈ span R (s '' I)\n[PROOFSTEP]\nspecialize hImaximal (I ∪ { i }) (by simp)\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhv : LinearIndependent R v\ns : ι → M\nI : Set ι\nhIlinind : LinearIndependent R fun x => s ↑x\nhImaximal : ∀ (J : Set ι), I ⊆ J → (LinearIndependent R fun x => s ↑x) → I = J\ni : ι\nhi : ¬i ∈ I\n⊢ I ⊆ I ∪ {i}\n[PROOFSTEP]\nsimp\n[GOAL]\ncase right\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhv : LinearIndependent R v\ns : ι → M\nI : Set ι\nhIlinind : LinearIndependent R fun x => s ↑x\ni : ι\nhi : ¬i ∈ I\nhImaximal : (LinearIndependent R fun x => s ↑x) → I = I ∪ {i}\n⊢ ∃ a, a ≠ 0 ∧ a • s i ∈ span R (s '' I)\n[PROOFSTEP]\nset J := I ∪ { i } with hJ\n[GOAL]\ncase right\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhv : LinearIndependent R v\ns : ι → M\nI : Set ι\nhIlinind : LinearIndependent R fun x => s ↑x\ni : ι\nhi : ¬i ∈ I\nJ : Set ι := I ∪ {i}\nhImaximal : (LinearIndependent R fun x => s ↑x) → I = J\nhJ : J = I ∪ {i}\n⊢ ∃ a, a ≠ 0 ∧ a • s i ∈ span R (s '' I)\n[PROOFSTEP]\nhave memJ : ∀ {x}, x ∈ J ↔ x = i ∨ x ∈ I := by simp [hJ]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhv : LinearIndependent R v\ns : ι → M\nI : Set ι\nhIlinind : LinearIndependent R fun x => s ↑x\ni : ι\nhi : ¬i ∈ I\nJ : Set ι := I ∪ {i}\nhImaximal : (LinearIndependent R fun x => s ↑x) → I = J\nhJ : J = I ∪ {i}\n⊢ ∀ {x : ι}, x ∈ J ↔ x = i ∨ x ∈ I\n[PROOFSTEP]\nsimp [hJ]\n[GOAL]\ncase right\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhv : LinearIndependent R v\ns : ι → M\nI : Set ι\nhIlinind : LinearIndependent R fun x => s ↑x\ni : ι\nhi : ¬i ∈ I\nJ : Set ι := I ∪ {i}\nhImaximal : (LinearIndependent R fun x => s ↑x) → I = J\nhJ : J = I ∪ {i}\nmemJ : ∀ {x : ι}, x ∈ J ↔ x = i ∨ x ∈ I\n⊢ ∃ a, a ≠ 0 ∧ a • s i ∈ span R (s '' I)\n[PROOFSTEP]\nhave hiJ : i ∈ J := by simp\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhv : LinearIndependent R v\ns : ι → M\nI : Set ι\nhIlinind : LinearIndependent R fun x => s ↑x\ni : ι\nhi : ¬i ∈ I\nJ : Set ι := I ∪ {i}\nhImaximal : (LinearIndependent R fun x => s ↑x) → I = J\nhJ : J = I ∪ {i}\nmemJ : ∀ {x : ι}, x ∈ J ↔ x = i ∨ x ∈ I\n⊢ i ∈ J\n[PROOFSTEP]\nsimp\n[GOAL]\ncase right\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhv : LinearIndependent R v\ns : ι → M\nI : Set ι\nhIlinind : LinearIndependent R fun x => s ↑x\ni : ι\nhi : ¬i ∈ I\nJ : Set ι := I ∪ {i}\nhImaximal : (LinearIndependent R fun x => s ↑x) → I = J\nhJ : J = I ∪ {i}\nmemJ : ∀ {x : ι}, x ∈ J ↔ x = i ∨ x ∈ I\nhiJ : i ∈ J\n⊢ ∃ a, a ≠ 0 ∧ a • s i ∈ span R (s '' I)\n[PROOFSTEP]\nhave h := by\n  refine mt hImaximal ?_\n  · intro h2\n    rw [h2] at hi \n    exact absurd hiJ hi\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhv : LinearIndependent R v\ns : ι → M\nI : Set ι\nhIlinind : LinearIndependent R fun x => s ↑x\ni : ι\nhi : ¬i ∈ I\nJ : Set ι := I ∪ {i}\nhImaximal : (LinearIndependent R fun x => s ↑x) → I = J\nhJ : J = I ∪ {i}\nmemJ : ∀ {x : ι}, x ∈ J ↔ x = i ∨ x ∈ I\nhiJ : i ∈ J\n⊢ ?m.535465\n[PROOFSTEP]\nrefine mt hImaximal ?_\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhv : LinearIndependent R v\ns : ι → M\nI : Set ι\nhIlinind : LinearIndependent R fun x => s ↑x\ni : ι\nhi : ¬i ∈ I\nJ : Set ι := I ∪ {i}\nhImaximal : (LinearIndependent R fun x => s ↑x) → I = J\nhJ : J = I ∪ {i}\nmemJ : ∀ {x : ι}, x ∈ J ↔ x = i ∨ x ∈ I\nhiJ : i ∈ J\n⊢ ¬I = J\n[PROOFSTEP]\nintro h2\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhv : LinearIndependent R v\ns : ι → M\nI : Set ι\nhIlinind : LinearIndependent R fun x => s ↑x\ni : ι\nhi : ¬i ∈ I\nJ : Set ι := I ∪ {i}\nhImaximal : (LinearIndependent R fun x => s ↑x) → I = J\nhJ : J = I ∪ {i}\nmemJ : ∀ {x : ι}, x ∈ J ↔ x = i ∨ x ∈ I\nhiJ : i ∈ J\nh2 : I = J\n⊢ False\n[PROOFSTEP]\nrw [h2] at hi \n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhv : LinearIndependent R v\ns : ι → M\nI : Set ι\nhIlinind : LinearIndependent R fun x => s ↑x\ni : ι\nJ : Set ι := I ∪ {i}\nhi : ¬i ∈ J\nhImaximal : (LinearIndependent R fun x => s ↑x) → I = J\nhJ : J = I ∪ {i}\nmemJ : ∀ {x : ι}, x ∈ J ↔ x = i ∨ x ∈ I\nhiJ : i ∈ J\nh2 : I = J\n⊢ False\n[PROOFSTEP]\nexact absurd hiJ hi\n[GOAL]\ncase right\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhv : LinearIndependent R v\ns : ι → M\nI : Set ι\nhIlinind : LinearIndependent R fun x => s ↑x\ni : ι\nhi : ¬i ∈ I\nJ : Set ι := I ∪ {i}\nhImaximal : (LinearIndependent R fun x => s ↑x) → I = J\nhJ : J = I ∪ {i}\nmemJ : ∀ {x : ι}, x ∈ J ↔ x = i ∨ x ∈ I\nhiJ : i ∈ J\nh : ¬LinearIndependent R fun x => s ↑x\n⊢ ∃ a, a ≠ 0 ∧ a • s i ∈ span R (s '' I)\n[PROOFSTEP]\nobtain ⟨f, supp_f, sum_f, f_ne⟩ := linearDependent_comp_subtype.mp h\n[GOAL]\ncase right.intro.intro.intro\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhv : LinearIndependent R v\ns : ι → M\nI : Set ι\nhIlinind : LinearIndependent R fun x => s ↑x\ni : ι\nhi : ¬i ∈ I\nJ : Set ι := I ∪ {i}\nhImaximal : (LinearIndependent R fun x => s ↑x) → I = J\nhJ : J = I ∪ {i}\nmemJ : ∀ {x : ι}, x ∈ J ↔ x = i ∨ x ∈ I\nhiJ : i ∈ J\nh : ¬LinearIndependent R fun x => s ↑x\nf : ι →₀ R\nsupp_f : f ∈ Finsupp.supported R R J\nsum_f : ∑ i in f.support, ↑f i • s i = 0\nf_ne : f ≠ 0\n⊢ ∃ a, a ≠ 0 ∧ a • s i ∈ span R (s '' I)\n[PROOFSTEP]\nhave hfi : f i ≠ 0 := by\n  contrapose hIlinind\n  refine' linearDependent_comp_subtype.mpr ⟨f, _, sum_f, f_ne⟩\n  simp only [Finsupp.mem_supported, hJ] at supp_f ⊢\n  rintro x hx\n  refine' (memJ.mp (supp_f hx)).resolve_left _\n  rintro rfl\n  exact hIlinind (Finsupp.mem_support_iff.mp hx)\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhv : LinearIndependent R v\ns : ι → M\nI : Set ι\nhIlinind : LinearIndependent R fun x => s ↑x\ni : ι\nhi : ¬i ∈ I\nJ : Set ι := I ∪ {i}\nhImaximal : (LinearIndependent R fun x => s ↑x) → I = J\nhJ : J = I ∪ {i}\nmemJ : ∀ {x : ι}, x ∈ J ↔ x = i ∨ x ∈ I\nhiJ : i ∈ J\nh : ¬LinearIndependent R fun x => s ↑x\nf : ι →₀ R\nsupp_f : f ∈ Finsupp.supported R R J\nsum_f : ∑ i in f.support, ↑f i • s i = 0\nf_ne : f ≠ 0\n⊢ ↑f i ≠ 0\n[PROOFSTEP]\ncontrapose hIlinind\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhv : LinearIndependent R v\ns : ι → M\nI : Set ι\ni : ι\nhi : ¬i ∈ I\nJ : Set ι := I ∪ {i}\nhImaximal : (LinearIndependent R fun x => s ↑x) → I = J\nhJ : J = I ∪ {i}\nmemJ : ∀ {x : ι}, x ∈ J ↔ x = i ∨ x ∈ I\nhiJ : i ∈ J\nh : ¬LinearIndependent R fun x => s ↑x\nf : ι →₀ R\nsupp_f : f ∈ Finsupp.supported R R J\nsum_f : ∑ i in f.support, ↑f i • s i = 0\nf_ne : f ≠ 0\nhIlinind : ¬↑f i ≠ 0\n⊢ ¬LinearIndependent R fun x => s ↑x\n[PROOFSTEP]\nrefine' linearDependent_comp_subtype.mpr ⟨f, _, sum_f, f_ne⟩\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhv : LinearIndependent R v\ns : ι → M\nI : Set ι\ni : ι\nhi : ¬i ∈ I\nJ : Set ι := I ∪ {i}\nhImaximal : (LinearIndependent R fun x => s ↑x) → I = J\nhJ : J = I ∪ {i}\nmemJ : ∀ {x : ι}, x ∈ J ↔ x = i ∨ x ∈ I\nhiJ : i ∈ J\nh : ¬LinearIndependent R fun x => s ↑x\nf : ι →₀ R\nsupp_f : f ∈ Finsupp.supported R R J\nsum_f : ∑ i in f.support, ↑f i • s i = 0\nf_ne : f ≠ 0\nhIlinind : ¬↑f i ≠ 0\n⊢ f ∈ Finsupp.supported R R I\n[PROOFSTEP]\nsimp only [Finsupp.mem_supported, hJ] at supp_f ⊢\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhv : LinearIndependent R v\ns : ι → M\nI : Set ι\ni : ι\nhi : ¬i ∈ I\nJ : Set ι := I ∪ {i}\nhImaximal : (LinearIndependent R fun x => s ↑x) → I = J\nhJ : J = I ∪ {i}\nmemJ : ∀ {x : ι}, x ∈ J ↔ x = i ∨ x ∈ I\nhiJ : i ∈ J\nh : ¬LinearIndependent R fun x => s ↑x\nf : ι →₀ R\nsum_f : ∑ i in f.support, ↑f i • s i = 0\nf_ne : f ≠ 0\nhIlinind : ¬↑f i ≠ 0\nsupp_f : ↑f.support ⊆ I ∪ {i}\n⊢ ↑f.support ⊆ I\n[PROOFSTEP]\nrintro x hx\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx✝ y : M\nhv : LinearIndependent R v\ns : ι → M\nI : Set ι\ni : ι\nhi : ¬i ∈ I\nJ : Set ι := I ∪ {i}\nhImaximal : (LinearIndependent R fun x => s ↑x) → I = J\nhJ : J = I ∪ {i}\nmemJ : ∀ {x : ι}, x ∈ J ↔ x = i ∨ x ∈ I\nhiJ : i ∈ J\nh : ¬LinearIndependent R fun x => s ↑x\nf : ι →₀ R\nsum_f : ∑ i in f.support, ↑f i • s i = 0\nf_ne : f ≠ 0\nhIlinind : ¬↑f i ≠ 0\nsupp_f : ↑f.support ⊆ I ∪ {i}\nx : ι\nhx : x ∈ ↑f.support\n⊢ x ∈ I\n[PROOFSTEP]\nrefine' (memJ.mp (supp_f hx)).resolve_left _\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx✝ y : M\nhv : LinearIndependent R v\ns : ι → M\nI : Set ι\ni : ι\nhi : ¬i ∈ I\nJ : Set ι := I ∪ {i}\nhImaximal : (LinearIndependent R fun x => s ↑x) → I = J\nhJ : J = I ∪ {i}\nmemJ : ∀ {x : ι}, x ∈ J ↔ x = i ∨ x ∈ I\nhiJ : i ∈ J\nh : ¬LinearIndependent R fun x => s ↑x\nf : ι →₀ R\nsum_f : ∑ i in f.support, ↑f i • s i = 0\nf_ne : f ≠ 0\nhIlinind : ¬↑f i ≠ 0\nsupp_f : ↑f.support ⊆ I ∪ {i}\nx : ι\nhx : x ∈ ↑f.support\n⊢ ¬x = i\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx✝ y : M\nhv : LinearIndependent R v\ns : ι → M\nI : Set ι\nf : ι →₀ R\nsum_f : ∑ i in f.support, ↑f i • s i = 0\nf_ne : f ≠ 0\nx : ι\nhx : x ∈ ↑f.support\nhi : ¬x ∈ I\nJ : Set ι := I ∪ {x}\nhImaximal : (LinearIndependent R fun x => s ↑x) → I = J\nhJ : J = I ∪ {x}\nmemJ : ∀ {x_1 : ι}, x_1 ∈ J ↔ x_1 = x ∨ x_1 ∈ I\nhiJ : x ∈ J\nh : ¬LinearIndependent R fun x => s ↑x\nhIlinind : ¬↑f x ≠ 0\nsupp_f : ↑f.support ⊆ I ∪ {x}\n⊢ False\n[PROOFSTEP]\nexact hIlinind (Finsupp.mem_support_iff.mp hx)\n[GOAL]\ncase right.intro.intro.intro\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhv : LinearIndependent R v\ns : ι → M\nI : Set ι\nhIlinind : LinearIndependent R fun x => s ↑x\ni : ι\nhi : ¬i ∈ I\nJ : Set ι := I ∪ {i}\nhImaximal : (LinearIndependent R fun x => s ↑x) → I = J\nhJ : J = I ∪ {i}\nmemJ : ∀ {x : ι}, x ∈ J ↔ x = i ∨ x ∈ I\nhiJ : i ∈ J\nh : ¬LinearIndependent R fun x => s ↑x\nf : ι →₀ R\nsupp_f : f ∈ Finsupp.supported R R J\nsum_f : ∑ i in f.support, ↑f i • s i = 0\nf_ne : f ≠ 0\nhfi : ↑f i ≠ 0\n⊢ ∃ a, a ≠ 0 ∧ a • s i ∈ span R (s '' I)\n[PROOFSTEP]\nuse f i, hfi\n[GOAL]\ncase right\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhv : LinearIndependent R v\ns : ι → M\nI : Set ι\nhIlinind : LinearIndependent R fun x => s ↑x\ni : ι\nhi : ¬i ∈ I\nJ : Set ι := I ∪ {i}\nhImaximal : (LinearIndependent R fun x => s ↑x) → I = J\nhJ : J = I ∪ {i}\nmemJ : ∀ {x : ι}, x ∈ J ↔ x = i ∨ x ∈ I\nhiJ : i ∈ J\nh : ¬LinearIndependent R fun x => s ↑x\nf : ι →₀ R\nsupp_f : f ∈ Finsupp.supported R R J\nsum_f : ∑ i in f.support, ↑f i • s i = 0\nf_ne : f ≠ 0\nhfi : ↑f i ≠ 0\n⊢ ↑f i • s i ∈ span R (s '' I)\n[PROOFSTEP]\nhave hfi' : i ∈ f.support := Finsupp.mem_support_iff.mpr hfi\n[GOAL]\ncase right\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhv : LinearIndependent R v\ns : ι → M\nI : Set ι\nhIlinind : LinearIndependent R fun x => s ↑x\ni : ι\nhi : ¬i ∈ I\nJ : Set ι := I ∪ {i}\nhImaximal : (LinearIndependent R fun x => s ↑x) → I = J\nhJ : J = I ∪ {i}\nmemJ : ∀ {x : ι}, x ∈ J ↔ x = i ∨ x ∈ I\nhiJ : i ∈ J\nh : ¬LinearIndependent R fun x => s ↑x\nf : ι →₀ R\nsupp_f : f ∈ Finsupp.supported R R J\nsum_f : ∑ i in f.support, ↑f i • s i = 0\nf_ne : f ≠ 0\nhfi : ↑f i ≠ 0\nhfi' : i ∈ f.support\n⊢ ↑f i • s i ∈ span R (s '' I)\n[PROOFSTEP]\nrw [← Finset.insert_erase hfi', Finset.sum_insert (Finset.not_mem_erase _ _), add_eq_zero_iff_eq_neg] at sum_f \n[GOAL]\ncase right\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhv : LinearIndependent R v\ns : ι → M\nI : Set ι\nhIlinind : LinearIndependent R fun x => s ↑x\ni : ι\nhi : ¬i ∈ I\nJ : Set ι := I ∪ {i}\nhImaximal : (LinearIndependent R fun x => s ↑x) → I = J\nhJ : J = I ∪ {i}\nmemJ : ∀ {x : ι}, x ∈ J ↔ x = i ∨ x ∈ I\nhiJ : i ∈ J\nh : ¬LinearIndependent R fun x => s ↑x\nf : ι →₀ R\nsupp_f : f ∈ Finsupp.supported R R J\nsum_f : ↑f i • s i = -∑ x in Finset.erase f.support i, ↑f x • s x\nf_ne : f ≠ 0\nhfi : ↑f i ≠ 0\nhfi' : i ∈ f.support\n⊢ ↑f i • s i ∈ span R (s '' I)\n[PROOFSTEP]\nrw [sum_f]\n[GOAL]\ncase right\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhv : LinearIndependent R v\ns : ι → M\nI : Set ι\nhIlinind : LinearIndependent R fun x => s ↑x\ni : ι\nhi : ¬i ∈ I\nJ : Set ι := I ∪ {i}\nhImaximal : (LinearIndependent R fun x => s ↑x) → I = J\nhJ : J = I ∪ {i}\nmemJ : ∀ {x : ι}, x ∈ J ↔ x = i ∨ x ∈ I\nhiJ : i ∈ J\nh : ¬LinearIndependent R fun x => s ↑x\nf : ι →₀ R\nsupp_f : f ∈ Finsupp.supported R R J\nsum_f : ↑f i • s i = -∑ x in Finset.erase f.support i, ↑f x • s x\nf_ne : f ≠ 0\nhfi : ↑f i ≠ 0\nhfi' : i ∈ f.support\n⊢ -∑ x in Finset.erase f.support i, ↑f x • s x ∈ span R (s '' I)\n[PROOFSTEP]\nrefine' neg_mem (sum_mem fun c hc => smul_mem _ _ (subset_span ⟨c, _, rfl⟩))\n[GOAL]\ncase right\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nhv : LinearIndependent R v\ns : ι → M\nI : Set ι\nhIlinind : LinearIndependent R fun x => s ↑x\ni : ι\nhi : ¬i ∈ I\nJ : Set ι := I ∪ {i}\nhImaximal : (LinearIndependent R fun x => s ↑x) → I = J\nhJ : J = I ∪ {i}\nmemJ : ∀ {x : ι}, x ∈ J ↔ x = i ∨ x ∈ I\nhiJ : i ∈ J\nh : ¬LinearIndependent R fun x => s ↑x\nf : ι →₀ R\nsupp_f : f ∈ Finsupp.supported R R J\nsum_f : ↑f i • s i = -∑ x in Finset.erase f.support i, ↑f x • s x\nf_ne : f ≠ 0\nhfi : ↑f i ≠ 0\nhfi' : i ∈ f.support\nc : ι\nhc : c ∈ Finset.erase f.support i\n⊢ c ∈ I\n[PROOFSTEP]\nexact (memJ.mp (supp_f (Finset.erase_subset _ _ hc))).resolve_left (Finset.ne_of_mem_erase hc)\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁷ : Ring R\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M'\ninst✝⁴ : AddCommGroup M''\ninst✝³ : Module R M\ninst✝² : Module R M'\ninst✝¹ : Module R M''\na b : R\nx y : M\ninst✝ : Nontrivial R\nhv : LinearIndependent R v\nf : ι' ↪ ι\nhss : range v ⊆ ↑(span R (range (v ∘ ↑f)))\n⊢ Surjective ↑f\n[PROOFSTEP]\nintro i\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁷ : Ring R\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M'\ninst✝⁴ : AddCommGroup M''\ninst✝³ : Module R M\ninst✝² : Module R M'\ninst✝¹ : Module R M''\na b : R\nx y : M\ninst✝ : Nontrivial R\nhv : LinearIndependent R v\nf : ι' ↪ ι\nhss : range v ⊆ ↑(span R (range (v ∘ ↑f)))\ni : ι\n⊢ ∃ a, ↑f a = i\n[PROOFSTEP]\nlet repr : (span R (range (v ∘ f)) : Type _) → ι' →₀ R := (hv.comp f f.injective).repr\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁷ : Ring R\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M'\ninst✝⁴ : AddCommGroup M''\ninst✝³ : Module R M\ninst✝² : Module R M'\ninst✝¹ : Module R M''\na b : R\nx y : M\ninst✝ : Nontrivial R\nhv : LinearIndependent R v\nf : ι' ↪ ι\nhss : range v ⊆ ↑(span R (range (v ∘ ↑f)))\ni : ι\nrepr : { x // x ∈ span R (range (v ∘ ↑f)) } → ι' →₀ R := ↑(LinearIndependent.repr (_ : LinearIndependent R (v ∘ ↑f)))\n⊢ ∃ a, ↑f a = i\n[PROOFSTEP]\nlet l := (repr ⟨v i, hss (mem_range_self i)⟩).mapDomain f\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁷ : Ring R\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M'\ninst✝⁴ : AddCommGroup M''\ninst✝³ : Module R M\ninst✝² : Module R M'\ninst✝¹ : Module R M''\na b : R\nx y : M\ninst✝ : Nontrivial R\nhv : LinearIndependent R v\nf : ι' ↪ ι\nhss : range v ⊆ ↑(span R (range (v ∘ ↑f)))\ni : ι\nrepr : { x // x ∈ span R (range (v ∘ ↑f)) } → ι' →₀ R := ↑(LinearIndependent.repr (_ : LinearIndependent R (v ∘ ↑f)))\nl : ι →₀ R := Finsupp.mapDomain (↑f) (repr { val := v i, property := (_ : v i ∈ ↑(span R (range (v ∘ ↑f)))) })\n⊢ ∃ a, ↑f a = i\n[PROOFSTEP]\nhave h_total_l : Finsupp.total ι M R v l = v i := by\n  dsimp only []\n  rw [Finsupp.total_mapDomain]\n  rw [(hv.comp f f.injective).total_repr]\n    -- Porting note: `rfl` isn't necessary.\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁷ : Ring R\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M'\ninst✝⁴ : AddCommGroup M''\ninst✝³ : Module R M\ninst✝² : Module R M'\ninst✝¹ : Module R M''\na b : R\nx y : M\ninst✝ : Nontrivial R\nhv : LinearIndependent R v\nf : ι' ↪ ι\nhss : range v ⊆ ↑(span R (range (v ∘ ↑f)))\ni : ι\nrepr : { x // x ∈ span R (range (v ∘ ↑f)) } → ι' →₀ R := ↑(LinearIndependent.repr (_ : LinearIndependent R (v ∘ ↑f)))\nl : ι →₀ R := Finsupp.mapDomain (↑f) (repr { val := v i, property := (_ : v i ∈ ↑(span R (range (v ∘ ↑f)))) })\n⊢ ↑(Finsupp.total ι M R v) l = v i\n[PROOFSTEP]\ndsimp only []\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁷ : Ring R\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M'\ninst✝⁴ : AddCommGroup M''\ninst✝³ : Module R M\ninst✝² : Module R M'\ninst✝¹ : Module R M''\na b : R\nx y : M\ninst✝ : Nontrivial R\nhv : LinearIndependent R v\nf : ι' ↪ ι\nhss : range v ⊆ ↑(span R (range (v ∘ ↑f)))\ni : ι\nrepr : { x // x ∈ span R (range (v ∘ ↑f)) } → ι' →₀ R := ↑(LinearIndependent.repr (_ : LinearIndependent R (v ∘ ↑f)))\nl : ι →₀ R := Finsupp.mapDomain (↑f) (repr { val := v i, property := (_ : v i ∈ ↑(span R (range (v ∘ ↑f)))) })\n⊢ ↑(Finsupp.total ι M R v)\n      (Finsupp.mapDomain (↑f)\n        (↑(LinearIndependent.repr (_ : LinearIndependent R (v ∘ ↑f)))\n          { val := v i, property := (_ : v i ∈ ↑(span R (range (v ∘ ↑f)))) })) =\n    v i\n[PROOFSTEP]\nrw [Finsupp.total_mapDomain]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁷ : Ring R\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M'\ninst✝⁴ : AddCommGroup M''\ninst✝³ : Module R M\ninst✝² : Module R M'\ninst✝¹ : Module R M''\na b : R\nx y : M\ninst✝ : Nontrivial R\nhv : LinearIndependent R v\nf : ι' ↪ ι\nhss : range v ⊆ ↑(span R (range (v ∘ ↑f)))\ni : ι\nrepr : { x // x ∈ span R (range (v ∘ ↑f)) } → ι' →₀ R := ↑(LinearIndependent.repr (_ : LinearIndependent R (v ∘ ↑f)))\nl : ι →₀ R := Finsupp.mapDomain (↑f) (repr { val := v i, property := (_ : v i ∈ ↑(span R (range (v ∘ ↑f)))) })\n⊢ ↑(Finsupp.total ι' M R (v ∘ ↑f))\n      (↑(LinearIndependent.repr (_ : LinearIndependent R (v ∘ ↑f)))\n        { val := v i, property := (_ : v i ∈ ↑(span R (range (v ∘ ↑f)))) }) =\n    v i\n[PROOFSTEP]\nrw [(hv.comp f f.injective).total_repr]\n  -- Porting note: `rfl` isn't necessary.\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁷ : Ring R\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M'\ninst✝⁴ : AddCommGroup M''\ninst✝³ : Module R M\ninst✝² : Module R M'\ninst✝¹ : Module R M''\na b : R\nx y : M\ninst✝ : Nontrivial R\nhv : LinearIndependent R v\nf : ι' ↪ ι\nhss : range v ⊆ ↑(span R (range (v ∘ ↑f)))\ni : ι\nrepr : { x // x ∈ span R (range (v ∘ ↑f)) } → ι' →₀ R := ↑(LinearIndependent.repr (_ : LinearIndependent R (v ∘ ↑f)))\nl : ι →₀ R := Finsupp.mapDomain (↑f) (repr { val := v i, property := (_ : v i ∈ ↑(span R (range (v ∘ ↑f)))) })\nh_total_l : ↑(Finsupp.total ι M R v) l = v i\n⊢ ∃ a, ↑f a = i\n[PROOFSTEP]\nhave h_total_eq : (Finsupp.total ι M R v) l = (Finsupp.total ι M R v) (Finsupp.single i 1) := by\n  rw [h_total_l, Finsupp.total_single, one_smul]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁷ : Ring R\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M'\ninst✝⁴ : AddCommGroup M''\ninst✝³ : Module R M\ninst✝² : Module R M'\ninst✝¹ : Module R M''\na b : R\nx y : M\ninst✝ : Nontrivial R\nhv : LinearIndependent R v\nf : ι' ↪ ι\nhss : range v ⊆ ↑(span R (range (v ∘ ↑f)))\ni : ι\nrepr : { x // x ∈ span R (range (v ∘ ↑f)) } → ι' →₀ R := ↑(LinearIndependent.repr (_ : LinearIndependent R (v ∘ ↑f)))\nl : ι →₀ R := Finsupp.mapDomain (↑f) (repr { val := v i, property := (_ : v i ∈ ↑(span R (range (v ∘ ↑f)))) })\nh_total_l : ↑(Finsupp.total ι M R v) l = v i\n⊢ ↑(Finsupp.total ι M R v) l = ↑(Finsupp.total ι M R v) (Finsupp.single i 1)\n[PROOFSTEP]\nrw [h_total_l, Finsupp.total_single, one_smul]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁷ : Ring R\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M'\ninst✝⁴ : AddCommGroup M''\ninst✝³ : Module R M\ninst✝² : Module R M'\ninst✝¹ : Module R M''\na b : R\nx y : M\ninst✝ : Nontrivial R\nhv : LinearIndependent R v\nf : ι' ↪ ι\nhss : range v ⊆ ↑(span R (range (v ∘ ↑f)))\ni : ι\nrepr : { x // x ∈ span R (range (v ∘ ↑f)) } → ι' →₀ R := ↑(LinearIndependent.repr (_ : LinearIndependent R (v ∘ ↑f)))\nl : ι →₀ R := Finsupp.mapDomain (↑f) (repr { val := v i, property := (_ : v i ∈ ↑(span R (range (v ∘ ↑f)))) })\nh_total_l : ↑(Finsupp.total ι M R v) l = v i\nh_total_eq : ↑(Finsupp.total ι M R v) l = ↑(Finsupp.total ι M R v) (Finsupp.single i 1)\n⊢ ∃ a, ↑f a = i\n[PROOFSTEP]\nhave l_eq : l = _ := LinearMap.ker_eq_bot.1 hv h_total_eq\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁷ : Ring R\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M'\ninst✝⁴ : AddCommGroup M''\ninst✝³ : Module R M\ninst✝² : Module R M'\ninst✝¹ : Module R M''\na b : R\nx y : M\ninst✝ : Nontrivial R\nhv : LinearIndependent R v\nf : ι' ↪ ι\nhss : range v ⊆ ↑(span R (range (v ∘ ↑f)))\ni : ι\nrepr : { x // x ∈ span R (range (v ∘ ↑f)) } → ι' →₀ R := ↑(LinearIndependent.repr (_ : LinearIndependent R (v ∘ ↑f)))\nl : ι →₀ R := Finsupp.mapDomain (↑f) (repr { val := v i, property := (_ : v i ∈ ↑(span R (range (v ∘ ↑f)))) })\nh_total_l : ↑(Finsupp.total ι M R v) l = v i\nh_total_eq : ↑(Finsupp.total ι M R v) l = ↑(Finsupp.total ι M R v) (Finsupp.single i 1)\nl_eq : l = Finsupp.single i 1\n⊢ ∃ a, ↑f a = i\n[PROOFSTEP]\ndsimp only [] at l_eq \n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁷ : Ring R\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M'\ninst✝⁴ : AddCommGroup M''\ninst✝³ : Module R M\ninst✝² : Module R M'\ninst✝¹ : Module R M''\na b : R\nx y : M\ninst✝ : Nontrivial R\nhv : LinearIndependent R v\nf : ι' ↪ ι\nhss : range v ⊆ ↑(span R (range (v ∘ ↑f)))\ni : ι\nrepr : { x // x ∈ span R (range (v ∘ ↑f)) } → ι' →₀ R := ↑(LinearIndependent.repr (_ : LinearIndependent R (v ∘ ↑f)))\nl : ι →₀ R := Finsupp.mapDomain (↑f) (repr { val := v i, property := (_ : v i ∈ ↑(span R (range (v ∘ ↑f)))) })\nh_total_l : ↑(Finsupp.total ι M R v) l = v i\nh_total_eq : ↑(Finsupp.total ι M R v) l = ↑(Finsupp.total ι M R v) (Finsupp.single i 1)\nl_eq :\n  Finsupp.mapDomain (↑f)\n      (↑(LinearIndependent.repr (_ : LinearIndependent R (v ∘ ↑f)))\n        { val := v i, property := (_ : v i ∈ ↑(span R (range (v ∘ ↑f)))) }) =\n    Finsupp.single i 1\n⊢ ∃ a, ↑f a = i\n[PROOFSTEP]\nrw [← Finsupp.embDomain_eq_mapDomain] at l_eq \n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁷ : Ring R\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M'\ninst✝⁴ : AddCommGroup M''\ninst✝³ : Module R M\ninst✝² : Module R M'\ninst✝¹ : Module R M''\na b : R\nx y : M\ninst✝ : Nontrivial R\nhv : LinearIndependent R v\nf : ι' ↪ ι\nhss : range v ⊆ ↑(span R (range (v ∘ ↑f)))\ni : ι\nrepr : { x // x ∈ span R (range (v ∘ ↑f)) } → ι' →₀ R := ↑(LinearIndependent.repr (_ : LinearIndependent R (v ∘ ↑f)))\nl : ι →₀ R := Finsupp.mapDomain (↑f) (repr { val := v i, property := (_ : v i ∈ ↑(span R (range (v ∘ ↑f)))) })\nh_total_l : ↑(Finsupp.total ι M R v) l = v i\nh_total_eq : ↑(Finsupp.total ι M R v) l = ↑(Finsupp.total ι M R v) (Finsupp.single i 1)\nl_eq :\n  Finsupp.embDomain f\n      (↑(LinearIndependent.repr (_ : LinearIndependent R (v ∘ ↑f)))\n        { val := v i, property := (_ : v i ∈ ↑(span R (range (v ∘ ↑f)))) }) =\n    Finsupp.single i 1\n⊢ ∃ a, ↑f a = i\n[PROOFSTEP]\nrcases Finsupp.single_of_embDomain_single (repr ⟨v i, _⟩) f i (1 : R) zero_ne_one.symm l_eq with ⟨i', hi'⟩\n[GOAL]\ncase intro\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁷ : Ring R\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M'\ninst✝⁴ : AddCommGroup M''\ninst✝³ : Module R M\ninst✝² : Module R M'\ninst✝¹ : Module R M''\na b : R\nx y : M\ninst✝ : Nontrivial R\nhv : LinearIndependent R v\nf : ι' ↪ ι\nhss : range v ⊆ ↑(span R (range (v ∘ ↑f)))\ni : ι\nrepr : { x // x ∈ span R (range (v ∘ ↑f)) } → ι' →₀ R := ↑(LinearIndependent.repr (_ : LinearIndependent R (v ∘ ↑f)))\nl : ι →₀ R := Finsupp.mapDomain (↑f) (repr { val := v i, property := (_ : v i ∈ ↑(span R (range (v ∘ ↑f)))) })\nh_total_l : ↑(Finsupp.total ι M R v) l = v i\nh_total_eq : ↑(Finsupp.total ι M R v) l = ↑(Finsupp.total ι M R v) (Finsupp.single i 1)\nl_eq :\n  Finsupp.embDomain f\n      (↑(LinearIndependent.repr (_ : LinearIndependent R (v ∘ ↑f)))\n        { val := v i, property := (_ : v i ∈ ↑(span R (range (v ∘ ↑f)))) }) =\n    Finsupp.single i 1\ni' : ι'\nhi' : repr { val := v i, property := (_ : v i ∈ ↑(span R (range (v ∘ ↑f)))) } = Finsupp.single i' 1 ∧ ↑f i' = i\n⊢ ∃ a, ↑f a = i\n[PROOFSTEP]\nuse i'\n[GOAL]\ncase h\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁷ : Ring R\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M'\ninst✝⁴ : AddCommGroup M''\ninst✝³ : Module R M\ninst✝² : Module R M'\ninst✝¹ : Module R M''\na b : R\nx y : M\ninst✝ : Nontrivial R\nhv : LinearIndependent R v\nf : ι' ↪ ι\nhss : range v ⊆ ↑(span R (range (v ∘ ↑f)))\ni : ι\nrepr : { x // x ∈ span R (range (v ∘ ↑f)) } → ι' →₀ R := ↑(LinearIndependent.repr (_ : LinearIndependent R (v ∘ ↑f)))\nl : ι →₀ R := Finsupp.mapDomain (↑f) (repr { val := v i, property := (_ : v i ∈ ↑(span R (range (v ∘ ↑f)))) })\nh_total_l : ↑(Finsupp.total ι M R v) l = v i\nh_total_eq : ↑(Finsupp.total ι M R v) l = ↑(Finsupp.total ι M R v) (Finsupp.single i 1)\nl_eq :\n  Finsupp.embDomain f\n      (↑(LinearIndependent.repr (_ : LinearIndependent R (v ∘ ↑f)))\n        { val := v i, property := (_ : v i ∈ ↑(span R (range (v ∘ ↑f)))) }) =\n    Finsupp.single i 1\ni' : ι'\nhi' : repr { val := v i, property := (_ : v i ∈ ↑(span R (range (v ∘ ↑f)))) } = Finsupp.single i' 1 ∧ ↑f i' = i\n⊢ ↑f i' = i\n[PROOFSTEP]\nexact hi'.2\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁷ : Ring R\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M'\ninst✝⁴ : AddCommGroup M''\ninst✝³ : Module R M\ninst✝² : Module R M'\ninst✝¹ : Module R M''\na b : R\nx y : M\ninst✝ : Nontrivial R\ns t : Set M\nhs : LinearIndependent R fun x => ↑x\nh : t ⊆ s\nhst : s ⊆ ↑(span R t)\n⊢ s = t\n[PROOFSTEP]\nlet f : t ↪ s := ⟨fun x => ⟨x.1, h x.2⟩, fun a b hab => Subtype.coe_injective (Subtype.mk.inj hab)⟩\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁷ : Ring R\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M'\ninst✝⁴ : AddCommGroup M''\ninst✝³ : Module R M\ninst✝² : Module R M'\ninst✝¹ : Module R M''\na b : R\nx y : M\ninst✝ : Nontrivial R\ns t : Set M\nhs : LinearIndependent R fun x => ↑x\nh : t ⊆ s\nhst : s ⊆ ↑(span R t)\nf : ↑t ↪ ↑s :=\n  { toFun := fun x => { val := ↑x, property := (_ : ↑x ∈ s) },\n    inj' :=\n      (_ :\n        ∀ (a b : ↑t),\n          (fun x => { val := ↑x, property := (_ : ↑x ∈ s) }) a = (fun x => { val := ↑x, property := (_ : ↑x ∈ s) }) b →\n            a = b) }\n⊢ s = t\n[PROOFSTEP]\nhave h_surj : Surjective f := by\n  apply surjective_of_linearIndependent_of_span hs f _\n  convert hst <;> simp [comp]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁷ : Ring R\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M'\ninst✝⁴ : AddCommGroup M''\ninst✝³ : Module R M\ninst✝² : Module R M'\ninst✝¹ : Module R M''\na b : R\nx y : M\ninst✝ : Nontrivial R\ns t : Set M\nhs : LinearIndependent R fun x => ↑x\nh : t ⊆ s\nhst : s ⊆ ↑(span R t)\nf : ↑t ↪ ↑s :=\n  { toFun := fun x => { val := ↑x, property := (_ : ↑x ∈ s) },\n    inj' :=\n      (_ :\n        ∀ (a b : ↑t),\n          (fun x => { val := ↑x, property := (_ : ↑x ∈ s) }) a = (fun x => { val := ↑x, property := (_ : ↑x ∈ s) }) b →\n            a = b) }\n⊢ Surjective ↑f\n[PROOFSTEP]\napply surjective_of_linearIndependent_of_span hs f _\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁷ : Ring R\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M'\ninst✝⁴ : AddCommGroup M''\ninst✝³ : Module R M\ninst✝² : Module R M'\ninst✝¹ : Module R M''\na b : R\nx y : M\ninst✝ : Nontrivial R\ns t : Set M\nhs : LinearIndependent R fun x => ↑x\nh : t ⊆ s\nhst : s ⊆ ↑(span R t)\nf : ↑t ↪ ↑s :=\n  { toFun := fun x => { val := ↑x, property := (_ : ↑x ∈ s) },\n    inj' :=\n      (_ :\n        ∀ (a b : ↑t),\n          (fun x => { val := ↑x, property := (_ : ↑x ∈ s) }) a = (fun x => { val := ↑x, property := (_ : ↑x ∈ s) }) b →\n            a = b) }\n⊢ (range fun x => ↑x) ⊆ ↑(span R (range ((fun x => ↑x) ∘ ↑f)))\n[PROOFSTEP]\nconvert hst\n[GOAL]\ncase h.e'_3\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁷ : Ring R\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M'\ninst✝⁴ : AddCommGroup M''\ninst✝³ : Module R M\ninst✝² : Module R M'\ninst✝¹ : Module R M''\na b : R\nx y : M\ninst✝ : Nontrivial R\ns t : Set M\nhs : LinearIndependent R fun x => ↑x\nh : t ⊆ s\nhst : s ⊆ ↑(span R t)\nf : ↑t ↪ ↑s :=\n  { toFun := fun x => { val := ↑x, property := (_ : ↑x ∈ s) },\n    inj' :=\n      (_ :\n        ∀ (a b : ↑t),\n          (fun x => { val := ↑x, property := (_ : ↑x ∈ s) }) a = (fun x => { val := ↑x, property := (_ : ↑x ∈ s) }) b →\n            a = b) }\n⊢ (range fun x => ↑x) = s\n[PROOFSTEP]\nsimp [comp]\n[GOAL]\ncase h.e'_4.h.e'_4.h.e'_6\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁷ : Ring R\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M'\ninst✝⁴ : AddCommGroup M''\ninst✝³ : Module R M\ninst✝² : Module R M'\ninst✝¹ : Module R M''\na b : R\nx y : M\ninst✝ : Nontrivial R\ns t : Set M\nhs : LinearIndependent R fun x => ↑x\nh : t ⊆ s\nhst : s ⊆ ↑(span R t)\nf : ↑t ↪ ↑s :=\n  { toFun := fun x => { val := ↑x, property := (_ : ↑x ∈ s) },\n    inj' :=\n      (_ :\n        ∀ (a b : ↑t),\n          (fun x => { val := ↑x, property := (_ : ↑x ∈ s) }) a = (fun x => { val := ↑x, property := (_ : ↑x ∈ s) }) b →\n            a = b) }\n⊢ range ((fun x => ↑x) ∘ ↑f) = t\n[PROOFSTEP]\nsimp [comp]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁷ : Ring R\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M'\ninst✝⁴ : AddCommGroup M''\ninst✝³ : Module R M\ninst✝² : Module R M'\ninst✝¹ : Module R M''\na b : R\nx y : M\ninst✝ : Nontrivial R\ns t : Set M\nhs : LinearIndependent R fun x => ↑x\nh : t ⊆ s\nhst : s ⊆ ↑(span R t)\nf : ↑t ↪ ↑s :=\n  { toFun := fun x => { val := ↑x, property := (_ : ↑x ∈ s) },\n    inj' :=\n      (_ :\n        ∀ (a b : ↑t),\n          (fun x => { val := ↑x, property := (_ : ↑x ∈ s) }) a = (fun x => { val := ↑x, property := (_ : ↑x ∈ s) }) b →\n            a = b) }\nh_surj : Surjective ↑f\n⊢ s = t\n[PROOFSTEP]\nshow s = t\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁷ : Ring R\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M'\ninst✝⁴ : AddCommGroup M''\ninst✝³ : Module R M\ninst✝² : Module R M'\ninst✝¹ : Module R M''\na b : R\nx y : M\ninst✝ : Nontrivial R\ns t : Set M\nhs : LinearIndependent R fun x => ↑x\nh : t ⊆ s\nhst : s ⊆ ↑(span R t)\nf : ↑t ↪ ↑s :=\n  { toFun := fun x => { val := ↑x, property := (_ : ↑x ∈ s) },\n    inj' :=\n      (_ :\n        ∀ (a b : ↑t),\n          (fun x => { val := ↑x, property := (_ : ↑x ∈ s) }) a = (fun x => { val := ↑x, property := (_ : ↑x ∈ s) }) b →\n            a = b) }\nh_surj : Surjective ↑f\n⊢ s = t\n[PROOFSTEP]\napply Subset.antisymm _ h\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁷ : Ring R\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M'\ninst✝⁴ : AddCommGroup M''\ninst✝³ : Module R M\ninst✝² : Module R M'\ninst✝¹ : Module R M''\na b : R\nx y : M\ninst✝ : Nontrivial R\ns t : Set M\nhs : LinearIndependent R fun x => ↑x\nh : t ⊆ s\nhst : s ⊆ ↑(span R t)\nf : ↑t ↪ ↑s :=\n  { toFun := fun x => { val := ↑x, property := (_ : ↑x ∈ s) },\n    inj' :=\n      (_ :\n        ∀ (a b : ↑t),\n          (fun x => { val := ↑x, property := (_ : ↑x ∈ s) }) a = (fun x => { val := ↑x, property := (_ : ↑x ∈ s) }) b →\n            a = b) }\nh_surj : Surjective ↑f\n⊢ s ⊆ t\n[PROOFSTEP]\nintro x hx\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁷ : Ring R\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M'\ninst✝⁴ : AddCommGroup M''\ninst✝³ : Module R M\ninst✝² : Module R M'\ninst✝¹ : Module R M''\na b : R\nx✝ y : M\ninst✝ : Nontrivial R\ns t : Set M\nhs : LinearIndependent R fun x => ↑x\nh : t ⊆ s\nhst : s ⊆ ↑(span R t)\nf : ↑t ↪ ↑s :=\n  { toFun := fun x => { val := ↑x, property := (_ : ↑x ∈ s) },\n    inj' :=\n      (_ :\n        ∀ (a b : ↑t),\n          (fun x => { val := ↑x, property := (_ : ↑x ∈ s) }) a = (fun x => { val := ↑x, property := (_ : ↑x ∈ s) }) b →\n            a = b) }\nh_surj : Surjective ↑f\nx : M\nhx : x ∈ s\n⊢ x ∈ t\n[PROOFSTEP]\nrcases h_surj ⟨x, hx⟩ with ⟨y, hy⟩\n[GOAL]\ncase intro\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁷ : Ring R\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M'\ninst✝⁴ : AddCommGroup M''\ninst✝³ : Module R M\ninst✝² : Module R M'\ninst✝¹ : Module R M''\na b : R\nx✝ y✝ : M\ninst✝ : Nontrivial R\ns t : Set M\nhs : LinearIndependent R fun x => ↑x\nh : t ⊆ s\nhst : s ⊆ ↑(span R t)\nf : ↑t ↪ ↑s :=\n  { toFun := fun x => { val := ↑x, property := (_ : ↑x ∈ s) },\n    inj' :=\n      (_ :\n        ∀ (a b : ↑t),\n          (fun x => { val := ↑x, property := (_ : ↑x ∈ s) }) a = (fun x => { val := ↑x, property := (_ : ↑x ∈ s) }) b →\n            a = b) }\nh_surj : Surjective ↑f\nx : M\nhx : x ∈ s\ny : ↑t\nhy : ↑f y = { val := x, property := hx }\n⊢ x ∈ t\n[PROOFSTEP]\nconvert y.mem\n[GOAL]\ncase h.e'_4\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁷ : Ring R\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M'\ninst✝⁴ : AddCommGroup M''\ninst✝³ : Module R M\ninst✝² : Module R M'\ninst✝¹ : Module R M''\na b : R\nx✝ y✝ : M\ninst✝ : Nontrivial R\ns t : Set M\nhs : LinearIndependent R fun x => ↑x\nh : t ⊆ s\nhst : s ⊆ ↑(span R t)\nf : ↑t ↪ ↑s :=\n  { toFun := fun x => { val := ↑x, property := (_ : ↑x ∈ s) },\n    inj' :=\n      (_ :\n        ∀ (a b : ↑t),\n          (fun x => { val := ↑x, property := (_ : ↑x ∈ s) }) a = (fun x => { val := ↑x, property := (_ : ↑x ∈ s) }) b →\n            a = b) }\nh_surj : Surjective ↑f\nx : M\nhx : x ∈ s\ny : ↑t\nhy : ↑f y = { val := x, property := hx }\n⊢ x = ↑y\n[PROOFSTEP]\nrw [← Subtype.mk.inj hy]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\ns : Set M\nf : M →ₗ[R] M'\nhs : LinearIndependent R fun x => ↑x\nhf_inj : Disjoint (span R s) (ker f)\n⊢ LinearIndependent R fun x => ↑x\n[PROOFSTEP]\nrw [← @Subtype.range_coe _ s] at hf_inj \n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\ns : Set M\nf : M →ₗ[R] M'\nhs : LinearIndependent R fun x => ↑x\nhf_inj : Disjoint (span R (Set.range Subtype.val)) (ker f)\n⊢ LinearIndependent R fun x => ↑x\n[PROOFSTEP]\nrefine' (hs.map hf_inj).to_subtype_range' _\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\ns : Set M\nf : M →ₗ[R] M'\nhs : LinearIndependent R fun x => ↑x\nhf_inj : Disjoint (span R (Set.range Subtype.val)) (ker f)\n⊢ Set.range (↑f ∘ fun x => ↑x) = ↑f '' s\n[PROOFSTEP]\nsimp [Set.range_comp f]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\ns : Set M\nt : Set M'\nhs : LinearIndependent R fun x => ↑x\nht : LinearIndependent R fun x => ↑x\n⊢ LinearIndependent R fun x => ↑x\n[PROOFSTEP]\nrefine' (hs.image_subtype _).union (ht.image_subtype _) _ <;> [simp; simp; skip]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\ns : Set M\nt : Set M'\nhs : LinearIndependent R fun x => ↑x\nht : LinearIndependent R fun x => ↑x\n⊢ LinearIndependent R fun x => ↑x\n[PROOFSTEP]\nrefine' (hs.image_subtype _).union (ht.image_subtype _) _\n[GOAL]\ncase refine'_1\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\ns : Set M\nt : Set M'\nhs : LinearIndependent R fun x => ↑x\nht : LinearIndependent R fun x => ↑x\n⊢ Disjoint (span R s) (ker (inl R M M'))\n[PROOFSTEP]\nsimp\n[GOAL]\ncase refine'_2\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\ns : Set M\nt : Set M'\nhs : LinearIndependent R fun x => ↑x\nht : LinearIndependent R fun x => ↑x\n⊢ Disjoint (span R t) (ker (inr R M M'))\n[PROOFSTEP]\nsimp\n[GOAL]\ncase refine'_3\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\ns : Set M\nt : Set M'\nhs : LinearIndependent R fun x => ↑x\nht : LinearIndependent R fun x => ↑x\n⊢ Disjoint (span R (↑(inl R M M') '' s)) (span R (↑(inr R M M') '' t))\n[PROOFSTEP]\nskip\n[GOAL]\ncase refine'_3\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\ns : Set M\nt : Set M'\nhs : LinearIndependent R fun x => ↑x\nht : LinearIndependent R fun x => ↑x\n⊢ Disjoint (span R (↑(inl R M M') '' s)) (span R (↑(inr R M M') '' t))\n[PROOFSTEP]\nsimp only [span_image]\n[GOAL]\ncase refine'_3\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\ns : Set M\nt : Set M'\nhs : LinearIndependent R fun x => ↑x\nht : LinearIndependent R fun x => ↑x\n⊢ Disjoint (Submodule.map (inl R M M') (span R s)) (Submodule.map (inr R M M') (span R t))\n[PROOFSTEP]\nsimp [disjoint_iff, prod_inf_prod]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv✝ : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nv : ι → M\nv' : ι' → M'\nhv : LinearIndependent R v\nhv' : LinearIndependent R v'\n⊢ Disjoint (span R (Set.range (↑(inl R M M') ∘ v))) (span R (Set.range (↑(inr R M M') ∘ v')))\n[PROOFSTEP]\nrefine' isCompl_range_inl_inr.disjoint.mono _ _\n[GOAL]\ncase refine'_1\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv✝ : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nv : ι → M\nv' : ι' → M'\nhv : LinearIndependent R v\nhv' : LinearIndependent R v'\n⊢ span R (Set.range (↑(inl R M M') ∘ v)) ≤ LinearMap.range (inl R M M')\n[PROOFSTEP]\nsimp only [span_le, range_coe, range_comp_subset_range]\n[GOAL]\ncase refine'_2\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv✝ : ι → M\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : AddCommGroup M''\ninst✝² : Module R M\ninst✝¹ : Module R M'\ninst✝ : Module R M''\na b : R\nx y : M\nv : ι → M\nv' : ι' → M'\nhv : LinearIndependent R v\nhv' : LinearIndependent R v'\n⊢ span R (Set.range (↑(inr R M M') ∘ v')) ≤ LinearMap.range (inr R M M')\n[PROOFSTEP]\nsimp only [span_le, range_coe, range_comp_subset_range]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁹ : Ring R\ninst✝⁸ : AddCommGroup M\ninst✝⁷ : AddCommGroup M'\ninst✝⁶ : AddCommGroup M''\ninst✝⁵ : Module R M\ninst✝⁴ : Module R M'\ninst✝³ : Module R M''\na b : R\nx y : M\nG : Type u_8\ninst✝² : Monoid G\nL : Type u_9\ninst✝¹ : CommRing L\ninst✝ : NoZeroDivisors L\n⊢ LinearIndependent L fun f => ↑f\n[PROOFSTEP]\nletI := Classical.decEq (G →* L)\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁹ : Ring R\ninst✝⁸ : AddCommGroup M\ninst✝⁷ : AddCommGroup M'\ninst✝⁶ : AddCommGroup M''\ninst✝⁵ : Module R M\ninst✝⁴ : Module R M'\ninst✝³ : Module R M''\na b : R\nx y : M\nG : Type u_8\ninst✝² : Monoid G\nL : Type u_9\ninst✝¹ : CommRing L\ninst✝ : NoZeroDivisors L\nthis : DecidableEq (G →* L) := Classical.decEq (G →* L)\n⊢ LinearIndependent L fun f => ↑f\n[PROOFSTEP]\nletI : MulAction L L := DistribMulAction.toMulAction\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁹ : Ring R\ninst✝⁸ : AddCommGroup M\ninst✝⁷ : AddCommGroup M'\ninst✝⁶ : AddCommGroup M''\ninst✝⁵ : Module R M\ninst✝⁴ : Module R M'\ninst✝³ : Module R M''\na b : R\nx y : M\nG : Type u_8\ninst✝² : Monoid G\nL : Type u_9\ninst✝¹ : CommRing L\ninst✝ : NoZeroDivisors L\nthis✝ : DecidableEq (G →* L) := Classical.decEq (G →* L)\nthis : MulAction L L := DistribMulAction.toMulAction\n⊢ LinearIndependent L fun f => ↑f\n[PROOFSTEP]\nexact\n  linearIndependent_iff'.2\n      -- To do this, we use `Finset` induction,\n          -- Porting note: `False.elim` → `fun h => False.elim <| Finset.not_mem_empty _ h`\n    fun s =>\n    Finset.induction_on s (fun g _hg i h => False.elim <| Finset.not_mem_empty _ h)\n      fun a s has ih g hg =>\n        -- Here\n                -- * `a` is a new character we will insert into the `Finset` of characters `s`,\n                -- * `ih` is the fact that only the trivial linear combination of characters in `s` is zero\n                -- * `hg` is the fact that `g` are the coefficients of a linear combination summing to zero\n                -- and it remains to prove that `g` vanishes on `insert a s`.\n                -- We now make the key calculation:\n                -- For any character `i` in the original `Finset`, we have `g i • i = g i • a` as functions\n                -- on the monoid `G`.\n      have h1 : ∀ i ∈ s, (g i • (i : G → L)) = g i • (a : G → L) := fun i his =>\n        funext\n          fun x : G =>\n            -- We prove these expressions are equal by showing\n                        -- the differences of their values on each monoid element `x` is zero\n          eq_of_sub_eq_zero <|\n            ih (fun j => g j * j x - g j * a x)\n              (funext fun y : G =>\n                calc\n                  -- After that, it's just a chase scene.\n                  (∑ i in s, ((g i * i x - g i * a x) • (i : G → L))) y = ∑ i in s, (g i * i x - g i * a x) * i y :=\n                    Finset.sum_apply _ _ _\n                  _ = ∑ i in s, (g i * i x * i y - g i * a x * i y) := (Finset.sum_congr rfl fun _ _ => sub_mul _ _ _)\n                  _ = (∑ i in s, g i * i x * i y) - ∑ i in s, g i * a x * i y := Finset.sum_sub_distrib\n                  _ = (g a * a x * a y + ∑ i in s, g i * i x * i y) - (g a * a x * a y + ∑ i in s, g i * a x * i y) :=\n                    by rw [add_sub_add_left_eq_sub]\n                  _ = (∑ i in insert a s, g i * i x * i y) - ∑ i in insert a s, g i * a x * i y := by\n                    rw [Finset.sum_insert has, Finset.sum_insert has]\n                  _ = (∑ i in insert a s, g i * i (x * y)) - ∑ i in insert a s, a x * (g i * i y) :=\n                    (congr (congr_arg Sub.sub (Finset.sum_congr rfl fun i _ => by rw [i.map_mul, mul_assoc]))\n                      (Finset.sum_congr rfl fun _ _ => by rw [mul_assoc, mul_left_comm]))\n                  _ =\n                      (∑ i in insert a s, (g i • (i : G → L))) (x * y) -\n                        a x * (∑ i in insert a s, (g i • (i : G → L))) y :=\n                    by rw [Finset.sum_apply, Finset.sum_apply, Finset.mul_sum]; rfl\n                  _ = 0 - a x * 0 := by rw [hg]; rfl\n                  _ = 0 := by rw [mul_zero, sub_zero])\n              i his\n      have h2 : ∀ i : G →* L, i ∈ s → ∃ y, i y ≠ a y := fun i his =>\n        Classical.by_contradiction fun h =>\n          have hia : i = a := MonoidHom.ext fun y => Classical.by_contradiction fun hy => h ⟨y, hy⟩\n          has <| hia ▸ his\n      have h3 : ∀ i ∈ s, g i = 0 := fun i his =>\n        let ⟨y, hy⟩ := h2 i his\n        have h : g i • i y = g i • a y := congr_fun (h1 i his) y\n        Or.resolve_right (mul_eq_zero.1 <| by rw [mul_sub, sub_eq_zero]; exact h)\n          (sub_ne_zero_of_ne hy)\n            -- And so, using the fact that the linear combination over `s` and over `insert a s` both\n                    -- vanish, we deduce that `g a = 0`.\n      have h4 : g a = 0 :=\n        calc\n          g a = g a * 1 := (mul_one _).symm\n          _ = (g a • (a : G → L)) 1 := by rw [← a.map_one]; rfl\n          _ = (∑ i in insert a s, (g i • (i : G → L))) 1 :=\n            by\n            rw [Finset.sum_eq_single a]\n            · intro i his hia\n              rw [Finset.mem_insert] at his \n              rw [h3 i (his.resolve_left hia), zero_smul]\n            · intro haas\n              exfalso\n              apply haas\n              exact Finset.mem_insert_self a s\n          _ = 0 := by rw [hg];\n            rfl\n              -- Now we're done; the last two facts together imply that `g` vanishes on every element\n                      -- of `insert a s`.\n      (Finset.forall_mem_insert _ _ _).2 ⟨h4, h3⟩\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁹ : Ring R\ninst✝⁸ : AddCommGroup M\ninst✝⁷ : AddCommGroup M'\ninst✝⁶ : AddCommGroup M''\ninst✝⁵ : Module R M\ninst✝⁴ : Module R M'\ninst✝³ : Module R M''\na✝ b : R\nx✝ y✝ : M\nG : Type u_8\ninst✝² : Monoid G\nL : Type u_9\ninst✝¹ : CommRing L\ninst✝ : NoZeroDivisors L\nthis✝ : DecidableEq (G →* L) := Classical.decEq (G →* L)\nthis : MulAction L L := DistribMulAction.toMulAction\ns✝ : Finset (G →* L)\na : G →* L\ns : Finset (G →* L)\nhas : ¬a ∈ s\nih : ∀ (g : (G →* L) → L), ∑ i in s, g i • ↑i = 0 → ∀ (i : G →* L), i ∈ s → g i = 0\ng : (G →* L) → L\nhg : ∑ i in insert a s, g i • ↑i = 0\ni : G →* L\nhis : i ∈ s\nx y : G\n⊢ ∑ i in s, g i * ↑i x * ↑i y - ∑ i in s, g i * ↑a x * ↑i y =\n    g a * ↑a x * ↑a y + ∑ i in s, g i * ↑i x * ↑i y - (g a * ↑a x * ↑a y + ∑ i in s, g i * ↑a x * ↑i y)\n[PROOFSTEP]\nrw [add_sub_add_left_eq_sub]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁹ : Ring R\ninst✝⁸ : AddCommGroup M\ninst✝⁷ : AddCommGroup M'\ninst✝⁶ : AddCommGroup M''\ninst✝⁵ : Module R M\ninst✝⁴ : Module R M'\ninst✝³ : Module R M''\na✝ b : R\nx✝ y✝ : M\nG : Type u_8\ninst✝² : Monoid G\nL : Type u_9\ninst✝¹ : CommRing L\ninst✝ : NoZeroDivisors L\nthis✝ : DecidableEq (G →* L) := Classical.decEq (G →* L)\nthis : MulAction L L := DistribMulAction.toMulAction\ns✝ : Finset (G →* L)\na : G →* L\ns : Finset (G →* L)\nhas : ¬a ∈ s\nih : ∀ (g : (G →* L) → L), ∑ i in s, g i • ↑i = 0 → ∀ (i : G →* L), i ∈ s → g i = 0\ng : (G →* L) → L\nhg : ∑ i in insert a s, g i • ↑i = 0\ni : G →* L\nhis : i ∈ s\nx y : G\n⊢ g a * ↑a x * ↑a y + ∑ i in s, g i * ↑i x * ↑i y - (g a * ↑a x * ↑a y + ∑ i in s, g i * ↑a x * ↑i y) =\n    ∑ i in insert a s, g i * ↑i x * ↑i y - ∑ i in insert a s, g i * ↑a x * ↑i y\n[PROOFSTEP]\nrw [Finset.sum_insert has, Finset.sum_insert has]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁹ : Ring R\ninst✝⁸ : AddCommGroup M\ninst✝⁷ : AddCommGroup M'\ninst✝⁶ : AddCommGroup M''\ninst✝⁵ : Module R M\ninst✝⁴ : Module R M'\ninst✝³ : Module R M''\na✝ b : R\nx✝¹ y✝ : M\nG : Type u_8\ninst✝² : Monoid G\nL : Type u_9\ninst✝¹ : CommRing L\ninst✝ : NoZeroDivisors L\nthis✝ : DecidableEq (G →* L) := Classical.decEq (G →* L)\nthis : MulAction L L := DistribMulAction.toMulAction\ns✝ : Finset (G →* L)\na : G →* L\ns : Finset (G →* L)\nhas : ¬a ∈ s\nih : ∀ (g : (G →* L) → L), ∑ i in s, g i • ↑i = 0 → ∀ (i : G →* L), i ∈ s → g i = 0\ng : (G →* L) → L\nhg : ∑ i in insert a s, g i • ↑i = 0\ni✝ : G →* L\nhis : i✝ ∈ s\nx y : G\ni : G →* L\nx✝ : i ∈ insert a s\n⊢ g i * ↑i x * ↑i y = g i * ↑i (x * y)\n[PROOFSTEP]\nrw [i.map_mul, mul_assoc]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁹ : Ring R\ninst✝⁸ : AddCommGroup M\ninst✝⁷ : AddCommGroup M'\ninst✝⁶ : AddCommGroup M''\ninst✝⁵ : Module R M\ninst✝⁴ : Module R M'\ninst✝³ : Module R M''\na✝ b : R\nx✝² y✝ : M\nG : Type u_8\ninst✝² : Monoid G\nL : Type u_9\ninst✝¹ : CommRing L\ninst✝ : NoZeroDivisors L\nthis✝ : DecidableEq (G →* L) := Classical.decEq (G →* L)\nthis : MulAction L L := DistribMulAction.toMulAction\ns✝ : Finset (G →* L)\na : G →* L\ns : Finset (G →* L)\nhas : ¬a ∈ s\nih : ∀ (g : (G →* L) → L), ∑ i in s, g i • ↑i = 0 → ∀ (i : G →* L), i ∈ s → g i = 0\ng : (G →* L) → L\nhg : ∑ i in insert a s, g i • ↑i = 0\ni : G →* L\nhis : i ∈ s\nx y : G\nx✝¹ : G →* L\nx✝ : x✝¹ ∈ insert a s\n⊢ g x✝¹ * ↑a x * ↑x✝¹ y = ↑a x * (g x✝¹ * ↑x✝¹ y)\n[PROOFSTEP]\nrw [mul_assoc, mul_left_comm]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁹ : Ring R\ninst✝⁸ : AddCommGroup M\ninst✝⁷ : AddCommGroup M'\ninst✝⁶ : AddCommGroup M''\ninst✝⁵ : Module R M\ninst✝⁴ : Module R M'\ninst✝³ : Module R M''\na✝ b : R\nx✝ y✝ : M\nG : Type u_8\ninst✝² : Monoid G\nL : Type u_9\ninst✝¹ : CommRing L\ninst✝ : NoZeroDivisors L\nthis✝ : DecidableEq (G →* L) := Classical.decEq (G →* L)\nthis : MulAction L L := DistribMulAction.toMulAction\ns✝ : Finset (G →* L)\na : G →* L\ns : Finset (G →* L)\nhas : ¬a ∈ s\nih : ∀ (g : (G →* L) → L), ∑ i in s, g i • ↑i = 0 → ∀ (i : G →* L), i ∈ s → g i = 0\ng : (G →* L) → L\nhg : ∑ i in insert a s, g i • ↑i = 0\ni : G →* L\nhis : i ∈ s\nx y : G\n⊢ ∑ i in insert a s, g i * ↑i (x * y) - ∑ i in insert a s, ↑a x * (g i * ↑i y) =\n    Finset.sum (insert a s) (fun i => g i • ↑i) (x * y) - ↑a x * Finset.sum (insert a s) (fun i => g i • ↑i) y\n[PROOFSTEP]\nrw [Finset.sum_apply, Finset.sum_apply, Finset.mul_sum]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁹ : Ring R\ninst✝⁸ : AddCommGroup M\ninst✝⁷ : AddCommGroup M'\ninst✝⁶ : AddCommGroup M''\ninst✝⁵ : Module R M\ninst✝⁴ : Module R M'\ninst✝³ : Module R M''\na✝ b : R\nx✝ y✝ : M\nG : Type u_8\ninst✝² : Monoid G\nL : Type u_9\ninst✝¹ : CommRing L\ninst✝ : NoZeroDivisors L\nthis✝ : DecidableEq (G →* L) := Classical.decEq (G →* L)\nthis : MulAction L L := DistribMulAction.toMulAction\ns✝ : Finset (G →* L)\na : G →* L\ns : Finset (G →* L)\nhas : ¬a ∈ s\nih : ∀ (g : (G →* L) → L), ∑ i in s, g i • ↑i = 0 → ∀ (i : G →* L), i ∈ s → g i = 0\ng : (G →* L) → L\nhg : ∑ i in insert a s, g i • ↑i = 0\ni : G →* L\nhis : i ∈ s\nx y : G\n⊢ ∑ i in insert a s, g i * ↑i (x * y) - ∑ i in insert a s, ↑a x * (g i * ↑i y) =\n    ∑ c in insert a s, (g c • ↑c) (x * y) - ∑ x_1 in insert a s, ↑a x * (g x_1 • ↑x_1) y\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁹ : Ring R\ninst✝⁸ : AddCommGroup M\ninst✝⁷ : AddCommGroup M'\ninst✝⁶ : AddCommGroup M''\ninst✝⁵ : Module R M\ninst✝⁴ : Module R M'\ninst✝³ : Module R M''\na✝ b : R\nx✝ y✝ : M\nG : Type u_8\ninst✝² : Monoid G\nL : Type u_9\ninst✝¹ : CommRing L\ninst✝ : NoZeroDivisors L\nthis✝ : DecidableEq (G →* L) := Classical.decEq (G →* L)\nthis : MulAction L L := DistribMulAction.toMulAction\ns✝ : Finset (G →* L)\na : G →* L\ns : Finset (G →* L)\nhas : ¬a ∈ s\nih : ∀ (g : (G →* L) → L), ∑ i in s, g i • ↑i = 0 → ∀ (i : G →* L), i ∈ s → g i = 0\ng : (G →* L) → L\nhg : ∑ i in insert a s, g i • ↑i = 0\ni : G →* L\nhis : i ∈ s\nx y : G\n⊢ Finset.sum (insert a s) (fun i => g i • ↑i) (x * y) - ↑a x * Finset.sum (insert a s) (fun i => g i • ↑i) y =\n    0 - ↑a x * 0\n[PROOFSTEP]\nrw [hg]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁹ : Ring R\ninst✝⁸ : AddCommGroup M\ninst✝⁷ : AddCommGroup M'\ninst✝⁶ : AddCommGroup M''\ninst✝⁵ : Module R M\ninst✝⁴ : Module R M'\ninst✝³ : Module R M''\na✝ b : R\nx✝ y✝ : M\nG : Type u_8\ninst✝² : Monoid G\nL : Type u_9\ninst✝¹ : CommRing L\ninst✝ : NoZeroDivisors L\nthis✝ : DecidableEq (G →* L) := Classical.decEq (G →* L)\nthis : MulAction L L := DistribMulAction.toMulAction\ns✝ : Finset (G →* L)\na : G →* L\ns : Finset (G →* L)\nhas : ¬a ∈ s\nih : ∀ (g : (G →* L) → L), ∑ i in s, g i • ↑i = 0 → ∀ (i : G →* L), i ∈ s → g i = 0\ng : (G →* L) → L\nhg : ∑ i in insert a s, g i • ↑i = 0\ni : G →* L\nhis : i ∈ s\nx y : G\n⊢ OfNat.ofNat 0 (x * y) - ↑a x * OfNat.ofNat 0 y = 0 - ↑a x * 0\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁹ : Ring R\ninst✝⁸ : AddCommGroup M\ninst✝⁷ : AddCommGroup M'\ninst✝⁶ : AddCommGroup M''\ninst✝⁵ : Module R M\ninst✝⁴ : Module R M'\ninst✝³ : Module R M''\na✝ b : R\nx✝ y✝ : M\nG : Type u_8\ninst✝² : Monoid G\nL : Type u_9\ninst✝¹ : CommRing L\ninst✝ : NoZeroDivisors L\nthis✝ : DecidableEq (G →* L) := Classical.decEq (G →* L)\nthis : MulAction L L := DistribMulAction.toMulAction\ns✝ : Finset (G →* L)\na : G →* L\ns : Finset (G →* L)\nhas : ¬a ∈ s\nih : ∀ (g : (G →* L) → L), ∑ i in s, g i • ↑i = 0 → ∀ (i : G →* L), i ∈ s → g i = 0\ng : (G →* L) → L\nhg : ∑ i in insert a s, g i • ↑i = 0\ni : G →* L\nhis : i ∈ s\nx y : G\n⊢ 0 - ↑a x * 0 = 0\n[PROOFSTEP]\nrw [mul_zero, sub_zero]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁹ : Ring R\ninst✝⁸ : AddCommGroup M\ninst✝⁷ : AddCommGroup M'\ninst✝⁶ : AddCommGroup M''\ninst✝⁵ : Module R M\ninst✝⁴ : Module R M'\ninst✝³ : Module R M''\na✝ b : R\nx y✝ : M\nG : Type u_8\ninst✝² : Monoid G\nL : Type u_9\ninst✝¹ : CommRing L\ninst✝ : NoZeroDivisors L\nthis✝ : DecidableEq (G →* L) := Classical.decEq (G →* L)\nthis : MulAction L L := DistribMulAction.toMulAction\ns✝ : Finset (G →* L)\na : G →* L\ns : Finset (G →* L)\nhas : ¬a ∈ s\nih : ∀ (g : (G →* L) → L), ∑ i in s, g i • ↑i = 0 → ∀ (i : G →* L), i ∈ s → g i = 0\ng : (G →* L) → L\nhg : ∑ i in insert a s, g i • ↑i = 0\nh1 : ∀ (i : G →* L), i ∈ s → g i • ↑i = g i • ↑a\nh2 : ∀ (i : G →* L), i ∈ s → ∃ y, ↑i y ≠ ↑a y\ni : G →* L\nhis : i ∈ s\ny : G\nhy : ↑i y ≠ ↑a y\nh : g i • ↑i y = g i • ↑a y\n⊢ g i * (↑i y - ↑a y) = 0\n[PROOFSTEP]\nrw [mul_sub, sub_eq_zero]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁹ : Ring R\ninst✝⁸ : AddCommGroup M\ninst✝⁷ : AddCommGroup M'\ninst✝⁶ : AddCommGroup M''\ninst✝⁵ : Module R M\ninst✝⁴ : Module R M'\ninst✝³ : Module R M''\na✝ b : R\nx y✝ : M\nG : Type u_8\ninst✝² : Monoid G\nL : Type u_9\ninst✝¹ : CommRing L\ninst✝ : NoZeroDivisors L\nthis✝ : DecidableEq (G →* L) := Classical.decEq (G →* L)\nthis : MulAction L L := DistribMulAction.toMulAction\ns✝ : Finset (G →* L)\na : G →* L\ns : Finset (G →* L)\nhas : ¬a ∈ s\nih : ∀ (g : (G →* L) → L), ∑ i in s, g i • ↑i = 0 → ∀ (i : G →* L), i ∈ s → g i = 0\ng : (G →* L) → L\nhg : ∑ i in insert a s, g i • ↑i = 0\nh1 : ∀ (i : G →* L), i ∈ s → g i • ↑i = g i • ↑a\nh2 : ∀ (i : G →* L), i ∈ s → ∃ y, ↑i y ≠ ↑a y\ni : G →* L\nhis : i ∈ s\ny : G\nhy : ↑i y ≠ ↑a y\nh : g i • ↑i y = g i • ↑a y\n⊢ g i * ↑i y = g i * ↑a y\n[PROOFSTEP]\nexact h\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁹ : Ring R\ninst✝⁸ : AddCommGroup M\ninst✝⁷ : AddCommGroup M'\ninst✝⁶ : AddCommGroup M''\ninst✝⁵ : Module R M\ninst✝⁴ : Module R M'\ninst✝³ : Module R M''\na✝ b : R\nx y : M\nG : Type u_8\ninst✝² : Monoid G\nL : Type u_9\ninst✝¹ : CommRing L\ninst✝ : NoZeroDivisors L\nthis✝ : DecidableEq (G →* L) := Classical.decEq (G →* L)\nthis : MulAction L L := DistribMulAction.toMulAction\ns✝ : Finset (G →* L)\na : G →* L\ns : Finset (G →* L)\nhas : ¬a ∈ s\nih : ∀ (g : (G →* L) → L), ∑ i in s, g i • ↑i = 0 → ∀ (i : G →* L), i ∈ s → g i = 0\ng : (G →* L) → L\nhg : ∑ i in insert a s, g i • ↑i = 0\nh1 : ∀ (i : G →* L), i ∈ s → g i • ↑i = g i • ↑a\nh2 : ∀ (i : G →* L), i ∈ s → ∃ y, ↑i y ≠ ↑a y\nh3 : ∀ (i : G →* L), i ∈ s → g i = 0\n⊢ g a * 1 = (g a • ↑a) 1\n[PROOFSTEP]\nrw [← a.map_one]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁹ : Ring R\ninst✝⁸ : AddCommGroup M\ninst✝⁷ : AddCommGroup M'\ninst✝⁶ : AddCommGroup M''\ninst✝⁵ : Module R M\ninst✝⁴ : Module R M'\ninst✝³ : Module R M''\na✝ b : R\nx y : M\nG : Type u_8\ninst✝² : Monoid G\nL : Type u_9\ninst✝¹ : CommRing L\ninst✝ : NoZeroDivisors L\nthis✝ : DecidableEq (G →* L) := Classical.decEq (G →* L)\nthis : MulAction L L := DistribMulAction.toMulAction\ns✝ : Finset (G →* L)\na : G →* L\ns : Finset (G →* L)\nhas : ¬a ∈ s\nih : ∀ (g : (G →* L) → L), ∑ i in s, g i • ↑i = 0 → ∀ (i : G →* L), i ∈ s → g i = 0\ng : (G →* L) → L\nhg : ∑ i in insert a s, g i • ↑i = 0\nh1 : ∀ (i : G →* L), i ∈ s → g i • ↑i = g i • ↑a\nh2 : ∀ (i : G →* L), i ∈ s → ∃ y, ↑i y ≠ ↑a y\nh3 : ∀ (i : G →* L), i ∈ s → g i = 0\n⊢ g a * ↑a 1 = (g a • ↑a) 1\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁹ : Ring R\ninst✝⁸ : AddCommGroup M\ninst✝⁷ : AddCommGroup M'\ninst✝⁶ : AddCommGroup M''\ninst✝⁵ : Module R M\ninst✝⁴ : Module R M'\ninst✝³ : Module R M''\na✝ b : R\nx y : M\nG : Type u_8\ninst✝² : Monoid G\nL : Type u_9\ninst✝¹ : CommRing L\ninst✝ : NoZeroDivisors L\nthis✝ : DecidableEq (G →* L) := Classical.decEq (G →* L)\nthis : MulAction L L := DistribMulAction.toMulAction\ns✝ : Finset (G →* L)\na : G →* L\ns : Finset (G →* L)\nhas : ¬a ∈ s\nih : ∀ (g : (G →* L) → L), ∑ i in s, g i • ↑i = 0 → ∀ (i : G →* L), i ∈ s → g i = 0\ng : (G →* L) → L\nhg : ∑ i in insert a s, g i • ↑i = 0\nh1 : ∀ (i : G →* L), i ∈ s → g i • ↑i = g i • ↑a\nh2 : ∀ (i : G →* L), i ∈ s → ∃ y, ↑i y ≠ ↑a y\nh3 : ∀ (i : G →* L), i ∈ s → g i = 0\n⊢ (g a • ↑a) 1 = Finset.sum (insert a s) (fun i => g i • ↑i) 1\n[PROOFSTEP]\nrw [Finset.sum_eq_single a]\n[GOAL]\ncase h₀\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁹ : Ring R\ninst✝⁸ : AddCommGroup M\ninst✝⁷ : AddCommGroup M'\ninst✝⁶ : AddCommGroup M''\ninst✝⁵ : Module R M\ninst✝⁴ : Module R M'\ninst✝³ : Module R M''\na✝ b : R\nx y : M\nG : Type u_8\ninst✝² : Monoid G\nL : Type u_9\ninst✝¹ : CommRing L\ninst✝ : NoZeroDivisors L\nthis✝ : DecidableEq (G →* L) := Classical.decEq (G →* L)\nthis : MulAction L L := DistribMulAction.toMulAction\ns✝ : Finset (G →* L)\na : G →* L\ns : Finset (G →* L)\nhas : ¬a ∈ s\nih : ∀ (g : (G →* L) → L), ∑ i in s, g i • ↑i = 0 → ∀ (i : G →* L), i ∈ s → g i = 0\ng : (G →* L) → L\nhg : ∑ i in insert a s, g i • ↑i = 0\nh1 : ∀ (i : G →* L), i ∈ s → g i • ↑i = g i • ↑a\nh2 : ∀ (i : G →* L), i ∈ s → ∃ y, ↑i y ≠ ↑a y\nh3 : ∀ (i : G →* L), i ∈ s → g i = 0\n⊢ ∀ (b : G →* L), b ∈ insert a s → b ≠ a → g b • ↑b = 0\n[PROOFSTEP]\nintro i his hia\n[GOAL]\ncase h₀\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁹ : Ring R\ninst✝⁸ : AddCommGroup M\ninst✝⁷ : AddCommGroup M'\ninst✝⁶ : AddCommGroup M''\ninst✝⁵ : Module R M\ninst✝⁴ : Module R M'\ninst✝³ : Module R M''\na✝ b : R\nx y : M\nG : Type u_8\ninst✝² : Monoid G\nL : Type u_9\ninst✝¹ : CommRing L\ninst✝ : NoZeroDivisors L\nthis✝ : DecidableEq (G →* L) := Classical.decEq (G →* L)\nthis : MulAction L L := DistribMulAction.toMulAction\ns✝ : Finset (G →* L)\na : G →* L\ns : Finset (G →* L)\nhas : ¬a ∈ s\nih : ∀ (g : (G →* L) → L), ∑ i in s, g i • ↑i = 0 → ∀ (i : G →* L), i ∈ s → g i = 0\ng : (G →* L) → L\nhg : ∑ i in insert a s, g i • ↑i = 0\nh1 : ∀ (i : G →* L), i ∈ s → g i • ↑i = g i • ↑a\nh2 : ∀ (i : G →* L), i ∈ s → ∃ y, ↑i y ≠ ↑a y\nh3 : ∀ (i : G →* L), i ∈ s → g i = 0\ni : G →* L\nhis : i ∈ insert a s\nhia : i ≠ a\n⊢ g i • ↑i = 0\n[PROOFSTEP]\nrw [Finset.mem_insert] at his \n[GOAL]\ncase h₀\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁹ : Ring R\ninst✝⁸ : AddCommGroup M\ninst✝⁷ : AddCommGroup M'\ninst✝⁶ : AddCommGroup M''\ninst✝⁵ : Module R M\ninst✝⁴ : Module R M'\ninst✝³ : Module R M''\na✝ b : R\nx y : M\nG : Type u_8\ninst✝² : Monoid G\nL : Type u_9\ninst✝¹ : CommRing L\ninst✝ : NoZeroDivisors L\nthis✝ : DecidableEq (G →* L) := Classical.decEq (G →* L)\nthis : MulAction L L := DistribMulAction.toMulAction\ns✝ : Finset (G →* L)\na : G →* L\ns : Finset (G →* L)\nhas : ¬a ∈ s\nih : ∀ (g : (G →* L) → L), ∑ i in s, g i • ↑i = 0 → ∀ (i : G →* L), i ∈ s → g i = 0\ng : (G →* L) → L\nhg : ∑ i in insert a s, g i • ↑i = 0\nh1 : ∀ (i : G →* L), i ∈ s → g i • ↑i = g i • ↑a\nh2 : ∀ (i : G →* L), i ∈ s → ∃ y, ↑i y ≠ ↑a y\nh3 : ∀ (i : G →* L), i ∈ s → g i = 0\ni : G →* L\nhis : i = a ∨ i ∈ s\nhia : i ≠ a\n⊢ g i • ↑i = 0\n[PROOFSTEP]\nrw [h3 i (his.resolve_left hia), zero_smul]\n[GOAL]\ncase h₁\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁹ : Ring R\ninst✝⁸ : AddCommGroup M\ninst✝⁷ : AddCommGroup M'\ninst✝⁶ : AddCommGroup M''\ninst✝⁵ : Module R M\ninst✝⁴ : Module R M'\ninst✝³ : Module R M''\na✝ b : R\nx y : M\nG : Type u_8\ninst✝² : Monoid G\nL : Type u_9\ninst✝¹ : CommRing L\ninst✝ : NoZeroDivisors L\nthis✝ : DecidableEq (G →* L) := Classical.decEq (G →* L)\nthis : MulAction L L := DistribMulAction.toMulAction\ns✝ : Finset (G →* L)\na : G →* L\ns : Finset (G →* L)\nhas : ¬a ∈ s\nih : ∀ (g : (G →* L) → L), ∑ i in s, g i • ↑i = 0 → ∀ (i : G →* L), i ∈ s → g i = 0\ng : (G →* L) → L\nhg : ∑ i in insert a s, g i • ↑i = 0\nh1 : ∀ (i : G →* L), i ∈ s → g i • ↑i = g i • ↑a\nh2 : ∀ (i : G →* L), i ∈ s → ∃ y, ↑i y ≠ ↑a y\nh3 : ∀ (i : G →* L), i ∈ s → g i = 0\n⊢ ¬a ∈ insert a s → g a • ↑a = 0\n[PROOFSTEP]\nintro haas\n[GOAL]\ncase h₁\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁹ : Ring R\ninst✝⁸ : AddCommGroup M\ninst✝⁷ : AddCommGroup M'\ninst✝⁶ : AddCommGroup M''\ninst✝⁵ : Module R M\ninst✝⁴ : Module R M'\ninst✝³ : Module R M''\na✝ b : R\nx y : M\nG : Type u_8\ninst✝² : Monoid G\nL : Type u_9\ninst✝¹ : CommRing L\ninst✝ : NoZeroDivisors L\nthis✝ : DecidableEq (G →* L) := Classical.decEq (G →* L)\nthis : MulAction L L := DistribMulAction.toMulAction\ns✝ : Finset (G →* L)\na : G →* L\ns : Finset (G →* L)\nhas : ¬a ∈ s\nih : ∀ (g : (G →* L) → L), ∑ i in s, g i • ↑i = 0 → ∀ (i : G →* L), i ∈ s → g i = 0\ng : (G →* L) → L\nhg : ∑ i in insert a s, g i • ↑i = 0\nh1 : ∀ (i : G →* L), i ∈ s → g i • ↑i = g i • ↑a\nh2 : ∀ (i : G →* L), i ∈ s → ∃ y, ↑i y ≠ ↑a y\nh3 : ∀ (i : G →* L), i ∈ s → g i = 0\nhaas : ¬a ∈ insert a s\n⊢ g a • ↑a = 0\n[PROOFSTEP]\nexfalso\n[GOAL]\ncase h₁.h\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁹ : Ring R\ninst✝⁸ : AddCommGroup M\ninst✝⁷ : AddCommGroup M'\ninst✝⁶ : AddCommGroup M''\ninst✝⁵ : Module R M\ninst✝⁴ : Module R M'\ninst✝³ : Module R M''\na✝ b : R\nx y : M\nG : Type u_8\ninst✝² : Monoid G\nL : Type u_9\ninst✝¹ : CommRing L\ninst✝ : NoZeroDivisors L\nthis✝ : DecidableEq (G →* L) := Classical.decEq (G →* L)\nthis : MulAction L L := DistribMulAction.toMulAction\ns✝ : Finset (G →* L)\na : G →* L\ns : Finset (G →* L)\nhas : ¬a ∈ s\nih : ∀ (g : (G →* L) → L), ∑ i in s, g i • ↑i = 0 → ∀ (i : G →* L), i ∈ s → g i = 0\ng : (G →* L) → L\nhg : ∑ i in insert a s, g i • ↑i = 0\nh1 : ∀ (i : G →* L), i ∈ s → g i • ↑i = g i • ↑a\nh2 : ∀ (i : G →* L), i ∈ s → ∃ y, ↑i y ≠ ↑a y\nh3 : ∀ (i : G →* L), i ∈ s → g i = 0\nhaas : ¬a ∈ insert a s\n⊢ False\n[PROOFSTEP]\napply haas\n[GOAL]\ncase h₁.h\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁹ : Ring R\ninst✝⁸ : AddCommGroup M\ninst✝⁷ : AddCommGroup M'\ninst✝⁶ : AddCommGroup M''\ninst✝⁵ : Module R M\ninst✝⁴ : Module R M'\ninst✝³ : Module R M''\na✝ b : R\nx y : M\nG : Type u_8\ninst✝² : Monoid G\nL : Type u_9\ninst✝¹ : CommRing L\ninst✝ : NoZeroDivisors L\nthis✝ : DecidableEq (G →* L) := Classical.decEq (G →* L)\nthis : MulAction L L := DistribMulAction.toMulAction\ns✝ : Finset (G →* L)\na : G →* L\ns : Finset (G →* L)\nhas : ¬a ∈ s\nih : ∀ (g : (G →* L) → L), ∑ i in s, g i • ↑i = 0 → ∀ (i : G →* L), i ∈ s → g i = 0\ng : (G →* L) → L\nhg : ∑ i in insert a s, g i • ↑i = 0\nh1 : ∀ (i : G →* L), i ∈ s → g i • ↑i = g i • ↑a\nh2 : ∀ (i : G →* L), i ∈ s → ∃ y, ↑i y ≠ ↑a y\nh3 : ∀ (i : G →* L), i ∈ s → g i = 0\nhaas : ¬a ∈ insert a s\n⊢ a ∈ insert a s\n[PROOFSTEP]\nexact Finset.mem_insert_self a s\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁹ : Ring R\ninst✝⁸ : AddCommGroup M\ninst✝⁷ : AddCommGroup M'\ninst✝⁶ : AddCommGroup M''\ninst✝⁵ : Module R M\ninst✝⁴ : Module R M'\ninst✝³ : Module R M''\na✝ b : R\nx y : M\nG : Type u_8\ninst✝² : Monoid G\nL : Type u_9\ninst✝¹ : CommRing L\ninst✝ : NoZeroDivisors L\nthis✝ : DecidableEq (G →* L) := Classical.decEq (G →* L)\nthis : MulAction L L := DistribMulAction.toMulAction\ns✝ : Finset (G →* L)\na : G →* L\ns : Finset (G →* L)\nhas : ¬a ∈ s\nih : ∀ (g : (G →* L) → L), ∑ i in s, g i • ↑i = 0 → ∀ (i : G →* L), i ∈ s → g i = 0\ng : (G →* L) → L\nhg : ∑ i in insert a s, g i • ↑i = 0\nh1 : ∀ (i : G →* L), i ∈ s → g i • ↑i = g i • ↑a\nh2 : ∀ (i : G →* L), i ∈ s → ∃ y, ↑i y ≠ ↑a y\nh3 : ∀ (i : G →* L), i ∈ s → g i = 0\n⊢ Finset.sum (insert a s) (fun i => g i • ↑i) 1 = 0\n[PROOFSTEP]\nrw [hg]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁹ : Ring R\ninst✝⁸ : AddCommGroup M\ninst✝⁷ : AddCommGroup M'\ninst✝⁶ : AddCommGroup M''\ninst✝⁵ : Module R M\ninst✝⁴ : Module R M'\ninst✝³ : Module R M''\na✝ b : R\nx y : M\nG : Type u_8\ninst✝² : Monoid G\nL : Type u_9\ninst✝¹ : CommRing L\ninst✝ : NoZeroDivisors L\nthis✝ : DecidableEq (G →* L) := Classical.decEq (G →* L)\nthis : MulAction L L := DistribMulAction.toMulAction\ns✝ : Finset (G →* L)\na : G →* L\ns : Finset (G →* L)\nhas : ¬a ∈ s\nih : ∀ (g : (G →* L) → L), ∑ i in s, g i • ↑i = 0 → ∀ (i : G →* L), i ∈ s → g i = 0\ng : (G →* L) → L\nhg : ∑ i in insert a s, g i • ↑i = 0\nh1 : ∀ (i : G →* L), i ∈ s → g i • ↑i = g i • ↑a\nh2 : ∀ (i : G →* L), i ∈ s → ∃ y, ↑i y ≠ ↑a y\nh3 : ∀ (i : G →* L), i ∈ s → g i = 0\n⊢ OfNat.ofNat 0 1 = 0\n[PROOFSTEP]\nrfl\n  -- Now we're done; the last two facts together imply that `g` vanishes on every element\n          -- of `insert a s`.\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁷ : Ring R\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M'\ninst✝⁴ : AddCommGroup M''\ninst✝³ : Module R M\ninst✝² : Module R M'\ninst✝¹ : Module R M''\na b : R\nx y : M\ninst✝ : Nontrivial R\ns t u : Set M\nhl : LinearIndependent R Subtype.val\nhsu : s ⊆ u\nhtu : t ⊆ u\nhst : span R s ≤ span R t\n⊢ s ⊆ t\n[PROOFSTEP]\nhave :=\n  eq_of_linearIndependent_of_span_subtype (hl.mono (Set.union_subset hsu htu)) (Set.subset_union_right _ _)\n    (Set.union_subset (Set.Subset.trans subset_span hst) subset_span)\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁷ : Ring R\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M'\ninst✝⁴ : AddCommGroup M''\ninst✝³ : Module R M\ninst✝² : Module R M'\ninst✝¹ : Module R M''\na b : R\nx y : M\ninst✝ : Nontrivial R\ns t u : Set M\nhl : LinearIndependent R Subtype.val\nhsu : s ⊆ u\nhtu : t ⊆ u\nhst : span R s ≤ span R t\nthis : s ∪ t = t\n⊢ s ⊆ t\n[PROOFSTEP]\nrw [← this]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\nv : ι → M\ninst✝⁷ : Ring R\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : AddCommGroup M'\ninst✝⁴ : AddCommGroup M''\ninst✝³ : Module R M\ninst✝² : Module R M'\ninst✝¹ : Module R M''\na b : R\nx y : M\ninst✝ : Nontrivial R\ns t u : Set M\nhl : LinearIndependent R Subtype.val\nhsu : s ⊆ u\nhtu : t ⊆ u\nhst : span R s ≤ span R t\nthis : s ∪ t = t\n⊢ s ⊆ s ∪ t\n[PROOFSTEP]\napply Set.subset_union_left\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁷ : Ring R\ninst✝⁶ : Nontrivial R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : Module R M\ninst✝² : NoZeroSMulDivisors R M\ninst✝¹ : Module R M'\nv✝ : ι → M\ns t : Set M\nx y z : M\nv : ι → M\ninst✝ : Unique ι\n⊢ LinearIndependent R v ↔ v default ≠ 0\n[PROOFSTEP]\nsimp only [linearIndependent_iff, Finsupp.total_unique, smul_eq_zero]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁷ : Ring R\ninst✝⁶ : Nontrivial R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : Module R M\ninst✝² : NoZeroSMulDivisors R M\ninst✝¹ : Module R M'\nv✝ : ι → M\ns t : Set M\nx y z : M\nv : ι → M\ninst✝ : Unique ι\n⊢ (∀ (l : ι →₀ R), ↑l default = 0 ∨ v default = 0 → l = 0) ↔ v default ≠ 0\n[PROOFSTEP]\nrefine' ⟨fun h hv => _, fun hv l hl => Finsupp.unique_ext <| hl.resolve_right hv⟩\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁷ : Ring R\ninst✝⁶ : Nontrivial R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : Module R M\ninst✝² : NoZeroSMulDivisors R M\ninst✝¹ : Module R M'\nv✝ : ι → M\ns t : Set M\nx y z : M\nv : ι → M\ninst✝ : Unique ι\nh : ∀ (l : ι →₀ R), ↑l default = 0 ∨ v default = 0 → l = 0\nhv : v default = 0\n⊢ False\n[PROOFSTEP]\nhave := h (Finsupp.single default 1) (Or.inr hv)\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁷ : Ring R\ninst✝⁶ : Nontrivial R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M'\ninst✝³ : Module R M\ninst✝² : NoZeroSMulDivisors R M\ninst✝¹ : Module R M'\nv✝ : ι → M\ns t : Set M\nx y z : M\nv : ι → M\ninst✝ : Unique ι\nh : ∀ (l : ι →₀ R), ↑l default = 0 ∨ v default = 0 → l = 0\nhv : v default = 0\nthis : Finsupp.single default 1 = 0\n⊢ False\n[PROOFSTEP]\nexact one_ne_zero (Finsupp.single_eq_zero.1 this)\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t : Set V\nx y z : V\n⊢ x ∈ span K (insert y s) → ¬x ∈ span K s → y ∈ span K (insert x s)\n[PROOFSTEP]\nsimp [mem_span_insert]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t : Set V\nx y z : V\n⊢ ∀ (x_1 : K) (x_2 : V), x_2 ∈ span K s → x = x_1 • y + x_2 → ¬x ∈ span K s → ∃ a z, z ∈ span K s ∧ y = a • x + z\n[PROOFSTEP]\nrintro a z hz rfl h\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t : Set V\ny z✝ : V\na : K\nz : V\nhz : z ∈ span K s\nh : ¬a • y + z ∈ span K s\n⊢ ∃ a_1 z_1, z_1 ∈ span K s ∧ y = a_1 • (a • y + z) + z_1\n[PROOFSTEP]\nrefine' ⟨a⁻¹, -a⁻¹ • z, smul_mem _ _ hz, _⟩\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t : Set V\ny z✝ : V\na : K\nz : V\nhz : z ∈ span K s\nh : ¬a • y + z ∈ span K s\n⊢ y = a⁻¹ • (a • y + z) + -a⁻¹ • z\n[PROOFSTEP]\nhave a0 : a ≠ 0 := by\n  rintro rfl\n  simp_all\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t : Set V\ny z✝ : V\na : K\nz : V\nhz : z ∈ span K s\nh : ¬a • y + z ∈ span K s\n⊢ a ≠ 0\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t : Set V\ny z✝ z : V\nhz : z ∈ span K s\nh : ¬0 • y + z ∈ span K s\n⊢ False\n[PROOFSTEP]\nsimp_all\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t : Set V\ny z✝ : V\na : K\nz : V\nhz : z ∈ span K s\nh : ¬a • y + z ∈ span K s\na0 : a ≠ 0\n⊢ y = a⁻¹ • (a • y + z) + -a⁻¹ • z\n[PROOFSTEP]\nsimp [a0, smul_add, smul_smul]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t : Set V\nx y z : V\n⊢ LinearIndependent K v ↔ ∀ (i : ι), ¬v i ∈ span K (v '' (univ \\ {i}))\n[PROOFSTEP]\napply linearIndependent_iff_not_smul_mem_span.trans\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t : Set V\nx y z : V\n⊢ (∀ (i : ι) (a : K), a • v i ∈ span K (v '' (univ \\ {i})) → a = 0) ↔ ∀ (i : ι), ¬v i ∈ span K (v '' (univ \\ {i}))\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t : Set V\nx y z : V\n⊢ (∀ (i : ι) (a : K), a • v i ∈ span K (v '' (univ \\ {i})) → a = 0) → ∀ (i : ι), ¬v i ∈ span K (v '' (univ \\ {i}))\n[PROOFSTEP]\nintro h i h_in_span\n[GOAL]\ncase mp\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t : Set V\nx y z : V\nh : ∀ (i : ι) (a : K), a • v i ∈ span K (v '' (univ \\ {i})) → a = 0\ni : ι\nh_in_span : v i ∈ span K (v '' (univ \\ {i}))\n⊢ False\n[PROOFSTEP]\napply one_ne_zero (h i 1 (by simp [h_in_span]))\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t : Set V\nx y z : V\nh : ∀ (i : ι) (a : K), a • v i ∈ span K (v '' (univ \\ {i})) → a = 0\ni : ι\nh_in_span : v i ∈ span K (v '' (univ \\ {i}))\n⊢ 1 • v i ∈ span K (v '' (univ \\ {i}))\n[PROOFSTEP]\nsimp [h_in_span]\n[GOAL]\ncase mpr\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t : Set V\nx y z : V\n⊢ (∀ (i : ι), ¬v i ∈ span K (v '' (univ \\ {i}))) → ∀ (i : ι) (a : K), a • v i ∈ span K (v '' (univ \\ {i})) → a = 0\n[PROOFSTEP]\nintro h i a ha\n[GOAL]\ncase mpr\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t : Set V\nx y z : V\nh : ∀ (i : ι), ¬v i ∈ span K (v '' (univ \\ {i}))\ni : ι\na : K\nha : a • v i ∈ span K (v '' (univ \\ {i}))\n⊢ a = 0\n[PROOFSTEP]\nby_contra ha'\n[GOAL]\ncase mpr\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t : Set V\nx y z : V\nh : ∀ (i : ι), ¬v i ∈ span K (v '' (univ \\ {i}))\ni : ι\na : K\nha : a • v i ∈ span K (v '' (univ \\ {i}))\nha' : ¬a = 0\n⊢ False\n[PROOFSTEP]\nexact False.elim (h _ ((smul_mem_iff _ ha').1 ha))\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t : Set V\nx y z : V\nhs : LinearIndependent K fun b => ↑b\nhx : ¬x ∈ span K s\n⊢ LinearIndependent K fun b => ↑b\n[PROOFSTEP]\nrw [← union_singleton]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t : Set V\nx y z : V\nhs : LinearIndependent K fun b => ↑b\nhx : ¬x ∈ span K s\n⊢ LinearIndependent K fun b => ↑b\n[PROOFSTEP]\nhave x0 : x ≠ 0 := mt (by rintro rfl; apply zero_mem (span K s)) hx\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t : Set V\nx y z : V\nhs : LinearIndependent K fun b => ↑b\nhx : ¬x ∈ span K s\n⊢ x = 0 → x ∈ span K s\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t : Set V\ny z : V\nhs : LinearIndependent K fun b => ↑b\nhx : ¬0 ∈ span K s\n⊢ 0 ∈ span K s\n[PROOFSTEP]\napply zero_mem (span K s)\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t : Set V\nx y z : V\nhs : LinearIndependent K fun b => ↑b\nhx : ¬x ∈ span K s\nx0 : x ≠ 0\n⊢ LinearIndependent K fun b => ↑b\n[PROOFSTEP]\napply hs.union (linearIndependent_singleton x0)\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t : Set V\nx y z : V\nhs : LinearIndependent K fun b => ↑b\nhx : ¬x ∈ span K s\nx0 : x ≠ 0\n⊢ Disjoint (span K s) (span K {x})\n[PROOFSTEP]\nrwa [disjoint_span_singleton' x0]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t : Set V\nx y z : V\n⊢ (LinearIndependent K fun o => Option.casesOn' o x v) ↔ LinearIndependent K v ∧ ¬x ∈ span K (range v)\n[PROOFSTEP]\nrw [← linearIndependent_equiv (Equiv.optionEquivSumPUnit.{_, u'} ι).symm, linearIndependent_sum, @range_unique _ PUnit,\n  @linearIndependent_unique_iff PUnit, disjoint_span_singleton]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t : Set V\nx y z : V\n⊢ LinearIndependent K (((fun o => Option.casesOn' o x v) ∘ ↑(Equiv.optionEquivSumPUnit ι).symm) ∘ Sum.inl) ∧\n      (((fun o => Option.casesOn' o x v) ∘ ↑(Equiv.optionEquivSumPUnit ι).symm) ∘ Sum.inr) default ≠ 0 ∧\n        ((((fun o => Option.casesOn' o x v) ∘ ↑(Equiv.optionEquivSumPUnit ι).symm) ∘ Sum.inr) default ∈\n            span K (range (((fun o => Option.casesOn' o x v) ∘ ↑(Equiv.optionEquivSumPUnit ι).symm) ∘ Sum.inl)) →\n          (((fun o => Option.casesOn' o x v) ∘ ↑(Equiv.optionEquivSumPUnit ι).symm) ∘ Sum.inr) default = 0) ↔\n    LinearIndependent K v ∧ ¬x ∈ span K (range v)\n[PROOFSTEP]\ndsimp [(· ∘ ·)]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t : Set V\nx y z : V\n⊢ (LinearIndependent K fun x => v x) ∧ ¬x = 0 ∧ (x ∈ span K (range fun x => v x) → x = 0) ↔\n    LinearIndependent K v ∧ ¬x ∈ span K (range v)\n[PROOFSTEP]\nrefine' ⟨fun h => ⟨h.1, fun hx => h.2.1 <| h.2.2 hx⟩, fun h => ⟨h.1, _, fun hx => (h.2 hx).elim⟩⟩\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t : Set V\nx y z : V\nh : LinearIndependent K v ∧ ¬x ∈ span K (range v)\n⊢ ¬x = 0\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t : Set V\ny z : V\nh : LinearIndependent K v ∧ ¬0 ∈ span K (range v)\n⊢ False\n[PROOFSTEP]\nexact h.2 (zero_mem _)\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv✝ : ι → V\ns t : Set V\nx y z : V\nv : Option ι → V\n⊢ LinearIndependent K v ↔ LinearIndependent K (v ∘ some) ∧ ¬v none ∈ span K (range (v ∘ some))\n[PROOFSTEP]\nsimp only [← linearIndependent_option', Option.casesOn'_none_coe]\n[GOAL]\nι✝ : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι✝ → V\ns✝ t : Set V\nx y z : V\nι : Type u_8\ns : Set ι\na : ι\nf : ι → V\nhas : ¬a ∈ s\n⊢ (LinearIndependent K fun x => f ↑x) ↔ (LinearIndependent K fun x => f ↑x) ∧ ¬f a ∈ span K (f '' s)\n[PROOFSTEP]\nclassical\nrw [← linearIndependent_equiv ((Equiv.optionEquivSumPUnit _).trans (Equiv.Set.insert has).symm),\n  linearIndependent_option]\n  -- Porting note: `simp [(· ∘ ·), range_comp f]` → `simp [(· ∘ ·)]; erw [range_comp f ..]; simp`\n    -- https://github.com/leanprover-community/mathlib4/issues/5164\nsimp only [(· ∘ ·)]\nerw [range_comp f ((↑) : s → ι)]\nsimp\n[GOAL]\nι✝ : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι✝ → V\ns✝ t : Set V\nx y z : V\nι : Type u_8\ns : Set ι\na : ι\nf : ι → V\nhas : ¬a ∈ s\n⊢ (LinearIndependent K fun x => f ↑x) ↔ (LinearIndependent K fun x => f ↑x) ∧ ¬f a ∈ span K (f '' s)\n[PROOFSTEP]\nrw [← linearIndependent_equiv ((Equiv.optionEquivSumPUnit _).trans (Equiv.Set.insert has).symm),\n  linearIndependent_option]\n  -- Porting note: `simp [(· ∘ ·), range_comp f]` → `simp [(· ∘ ·)]; erw [range_comp f ..]; simp`\n    -- https://github.com/leanprover-community/mathlib4/issues/5164\n[GOAL]\nι✝ : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι✝ → V\ns✝ t : Set V\nx y z : V\nι : Type u_8\ns : Set ι\na : ι\nf : ι → V\nhas : ¬a ∈ s\n⊢ LinearIndependent K (((fun x => f ↑x) ∘ ↑((Equiv.optionEquivSumPUnit ↑s).trans (Equiv.Set.insert has).symm)) ∘ some) ∧\n      ¬((fun x => f ↑x) ∘ ↑((Equiv.optionEquivSumPUnit ↑s).trans (Equiv.Set.insert has).symm)) none ∈\n          span K\n            (range (((fun x => f ↑x) ∘ ↑((Equiv.optionEquivSumPUnit ↑s).trans (Equiv.Set.insert has).symm)) ∘ some)) ↔\n    (LinearIndependent K fun x => f ↑x) ∧ ¬f a ∈ span K (f '' s)\n[PROOFSTEP]\nsimp only [(· ∘ ·)]\n[GOAL]\nι✝ : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι✝ → V\ns✝ t : Set V\nx y z : V\nι : Type u_8\ns : Set ι\na : ι\nf : ι → V\nhas : ¬a ∈ s\n⊢ (LinearIndependent K fun x => f ↑(↑((Equiv.optionEquivSumPUnit ↑s).trans (Equiv.Set.insert has).symm) (some x))) ∧\n      ¬f ↑(↑((Equiv.optionEquivSumPUnit ↑s).trans (Equiv.Set.insert has).symm) none) ∈\n          span K (range fun x => f ↑(↑((Equiv.optionEquivSumPUnit ↑s).trans (Equiv.Set.insert has).symm) (some x))) ↔\n    (LinearIndependent K fun x => f ↑x) ∧ ¬f a ∈ span K (f '' s)\n[PROOFSTEP]\nerw [range_comp f ((↑) : s → ι)]\n[GOAL]\nι✝ : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι✝ → V\ns✝ t : Set V\nx y z : V\nι : Type u_8\ns : Set ι\na : ι\nf : ι → V\nhas : ¬a ∈ s\n⊢ (LinearIndependent K fun x => f ↑(↑((Equiv.optionEquivSumPUnit ↑s).trans (Equiv.Set.insert has).symm) (some x))) ∧\n      ¬f ↑(↑((Equiv.optionEquivSumPUnit ↑s).trans (Equiv.Set.insert has).symm) none) ∈ span K (f '' range Subtype.val) ↔\n    (LinearIndependent K fun x => f ↑x) ∧ ¬f a ∈ span K (f '' s)\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t : Set V\nx y z : V\nhxs : ¬x ∈ s\n⊢ (LinearIndependent K fun x => id ↑x) ∧ ¬id x ∈ span K (id '' s) ↔ (LinearIndependent K fun b => ↑b) ∧ ¬x ∈ span K s\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv✝ : ι → V\ns t : Set V\nx y z : V\nn : ℕ\nv : Fin n → V\n⊢ LinearIndependent K (Fin.cons x v) ↔ LinearIndependent K v ∧ ¬x ∈ span K (range v)\n[PROOFSTEP]\nrw [← linearIndependent_equiv (finSuccEquiv n).symm, linearIndependent_option]\n  -- Porting note: `convert Iff.rfl; ...` → `exact Iff.rfl`\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv✝ : ι → V\ns t : Set V\nx y z : V\nn : ℕ\nv : Fin n → V\n⊢ LinearIndependent K ((Fin.cons x v ∘ ↑(finSuccEquiv n).symm) ∘ some) ∧\n      ¬(Fin.cons x v ∘ ↑(finSuccEquiv n).symm) none ∈ span K (range ((Fin.cons x v ∘ ↑(finSuccEquiv n).symm) ∘ some)) ↔\n    LinearIndependent K v ∧ ¬x ∈ span K (range v)\n[PROOFSTEP]\nexact Iff.rfl\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv✝ : ι → V\ns t : Set V\nx y z : V\nn : ℕ\nv : Fin n → V\n⊢ LinearIndependent K (Fin.snoc v x) ↔ LinearIndependent K v ∧ ¬x ∈ span K (range v)\n[PROOFSTEP]\nerw [Fin.snoc_eq_cons_rotate, linearIndependent_equiv, linearIndependent_fin_cons]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv✝ : ι → V\ns t : Set V\nx y z : V\nn : ℕ\nv : Fin (n + 1) → V\n⊢ LinearIndependent K v ↔ LinearIndependent K (Fin.tail v) ∧ ¬v 0 ∈ span K (range (Fin.tail v))\n[PROOFSTEP]\nrw [← linearIndependent_fin_cons, Fin.cons_self_tail]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv✝ : ι → V\ns t : Set V\nx y z : V\nn : ℕ\nv : Fin (n + 1) → V\n⊢ LinearIndependent K v ↔ LinearIndependent K (Fin.init v) ∧ ¬v (Fin.last n) ∈ span K (range (Fin.init v))\n[PROOFSTEP]\nrw [← linearIndependent_fin_snoc, Fin.snoc_init_self]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t : Set V\nx y z : V\nf : Fin 2 → V\n⊢ LinearIndependent K f ↔ f 1 ≠ 0 ∧ ∀ (a : K), a • f 1 ≠ f 0\n[PROOFSTEP]\nrw [linearIndependent_fin_succ, linearIndependent_unique_iff, range_unique, mem_span_singleton, not_exists,\n  show Fin.tail f default = f 1 by rw [← Fin.succ_zero_eq_one]; rfl]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t : Set V\nx y z : V\nf : Fin 2 → V\n⊢ Fin.tail f default = f 1\n[PROOFSTEP]\nrw [← Fin.succ_zero_eq_one]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t : Set V\nx y z : V\nf : Fin 2 → V\n⊢ Fin.tail f default = f (Fin.succ 0)\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t : Set V\nx y z : V\nhs : LinearIndependent K Subtype.val\nhst : s ⊆ t\n⊢ ∃ b x, s ⊆ b ∧ t ⊆ ↑(span K b) ∧ LinearIndependent K Subtype.val\n[PROOFSTEP]\nhave := by\n  refine zorn_subset_nonempty {b | b ⊆ t ∧ LinearIndependent K ((↑) : b → V)} ?_ _ ⟨hst, hs⟩\n  · refine' fun c hc cc _c0 => ⟨⋃₀ c, ⟨_, _⟩, fun x => _⟩\n    · exact sUnion_subset fun x xc => (hc xc).1\n    · exact linearIndependent_sUnion_of_directed cc.directedOn fun x xc => (hc xc).2\n    · exact subset_sUnion_of_mem\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t : Set V\nx y z : V\nhs : LinearIndependent K Subtype.val\nhst : s ⊆ t\n⊢ ?m.1310755\n[PROOFSTEP]\nrefine zorn_subset_nonempty {b | b ⊆ t ∧ LinearIndependent K ((↑) : b → V)} ?_ _ ⟨hst, hs⟩\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t : Set V\nx y z : V\nhs : LinearIndependent K Subtype.val\nhst : s ⊆ t\n⊢ ∀ (c : Set (Set V)),\n    c ⊆ {b | b ⊆ t ∧ LinearIndependent K Subtype.val} →\n      IsChain (fun x x_1 => x ⊆ x_1) c →\n        Set.Nonempty c → ∃ ub, ub ∈ {b | b ⊆ t ∧ LinearIndependent K Subtype.val} ∧ ∀ (s : Set V), s ∈ c → s ⊆ ub\n[PROOFSTEP]\nrefine' fun c hc cc _c0 => ⟨⋃₀ c, ⟨_, _⟩, fun x => _⟩\n[GOAL]\ncase refine'_1\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t : Set V\nx y z : V\nhs : LinearIndependent K Subtype.val\nhst : s ⊆ t\nc : Set (Set V)\nhc : c ⊆ {b | b ⊆ t ∧ LinearIndependent K Subtype.val}\ncc : IsChain (fun x x_1 => x ⊆ x_1) c\n_c0 : Set.Nonempty c\n⊢ ⋃₀ c ⊆ t\n[PROOFSTEP]\nexact sUnion_subset fun x xc => (hc xc).1\n[GOAL]\ncase refine'_2\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t : Set V\nx y z : V\nhs : LinearIndependent K Subtype.val\nhst : s ⊆ t\nc : Set (Set V)\nhc : c ⊆ {b | b ⊆ t ∧ LinearIndependent K Subtype.val}\ncc : IsChain (fun x x_1 => x ⊆ x_1) c\n_c0 : Set.Nonempty c\n⊢ LinearIndependent K Subtype.val\n[PROOFSTEP]\nexact linearIndependent_sUnion_of_directed cc.directedOn fun x xc => (hc xc).2\n[GOAL]\ncase refine'_3\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t : Set V\nx✝ y z : V\nhs : LinearIndependent K Subtype.val\nhst : s ⊆ t\nc : Set (Set V)\nhc : c ⊆ {b | b ⊆ t ∧ LinearIndependent K Subtype.val}\ncc : IsChain (fun x x_1 => x ⊆ x_1) c\n_c0 : Set.Nonempty c\nx : Set V\n⊢ x ∈ c → x ⊆ ⋃₀ c\n[PROOFSTEP]\nexact subset_sUnion_of_mem\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t : Set V\nx y z : V\nhs : LinearIndependent K Subtype.val\nhst : s ⊆ t\nthis :\n  ∃ m,\n    m ∈ {b | b ⊆ t ∧ LinearIndependent K Subtype.val} ∧\n      s ⊆ m ∧ ∀ (a : Set V), a ∈ {b | b ⊆ t ∧ LinearIndependent K Subtype.val} → m ⊆ a → a = m\n⊢ ∃ b x, s ⊆ b ∧ t ⊆ ↑(span K b) ∧ LinearIndependent K Subtype.val\n[PROOFSTEP]\nrcases this with ⟨b, ⟨bt, bi⟩, sb, h⟩\n[GOAL]\ncase intro.intro.intro.intro\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t : Set V\nx y z : V\nhs : LinearIndependent K Subtype.val\nhst : s ⊆ t\nb : Set V\nbt : b ⊆ t\nbi : LinearIndependent K Subtype.val\nsb : s ⊆ b\nh : ∀ (a : Set V), a ∈ {b | b ⊆ t ∧ LinearIndependent K Subtype.val} → b ⊆ a → a = b\n⊢ ∃ b x, s ⊆ b ∧ t ⊆ ↑(span K b) ∧ LinearIndependent K Subtype.val\n[PROOFSTEP]\nrefine' ⟨b, bt, sb, fun x xt => _, bi⟩\n[GOAL]\ncase intro.intro.intro.intro\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t : Set V\nx✝ y z : V\nhs : LinearIndependent K Subtype.val\nhst : s ⊆ t\nb : Set V\nbt : b ⊆ t\nbi : LinearIndependent K Subtype.val\nsb : s ⊆ b\nh : ∀ (a : Set V), a ∈ {b | b ⊆ t ∧ LinearIndependent K Subtype.val} → b ⊆ a → a = b\nx : V\nxt : x ∈ t\n⊢ x ∈ ↑(span K b)\n[PROOFSTEP]\nby_contra hn\n[GOAL]\ncase intro.intro.intro.intro\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t : Set V\nx✝ y z : V\nhs : LinearIndependent K Subtype.val\nhst : s ⊆ t\nb : Set V\nbt : b ⊆ t\nbi : LinearIndependent K Subtype.val\nsb : s ⊆ b\nh : ∀ (a : Set V), a ∈ {b | b ⊆ t ∧ LinearIndependent K Subtype.val} → b ⊆ a → a = b\nx : V\nxt : x ∈ t\nhn : ¬x ∈ ↑(span K b)\n⊢ False\n[PROOFSTEP]\napply hn\n[GOAL]\ncase intro.intro.intro.intro\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t : Set V\nx✝ y z : V\nhs : LinearIndependent K Subtype.val\nhst : s ⊆ t\nb : Set V\nbt : b ⊆ t\nbi : LinearIndependent K Subtype.val\nsb : s ⊆ b\nh : ∀ (a : Set V), a ∈ {b | b ⊆ t ∧ LinearIndependent K Subtype.val} → b ⊆ a → a = b\nx : V\nxt : x ∈ t\nhn : ¬x ∈ ↑(span K b)\n⊢ x ∈ ↑(span K b)\n[PROOFSTEP]\nrw [← h _ ⟨insert_subset_iff.2 ⟨xt, bt⟩, bi.insert hn⟩ (subset_insert _ _)]\n[GOAL]\ncase intro.intro.intro.intro\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t : Set V\nx✝ y z : V\nhs : LinearIndependent K Subtype.val\nhst : s ⊆ t\nb : Set V\nbt : b ⊆ t\nbi : LinearIndependent K Subtype.val\nsb : s ⊆ b\nh : ∀ (a : Set V), a ∈ {b | b ⊆ t ∧ LinearIndependent K Subtype.val} → b ⊆ a → a = b\nx : V\nxt : x ∈ t\nhn : ¬x ∈ ↑(span K b)\n⊢ x ∈ ↑(span K (insert x b))\n[PROOFSTEP]\nexact subset_span (mem_insert _ _)\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t : Set V\nx y z : V\n⊢ ∃ b x, span K b = span K t ∧ LinearIndependent K Subtype.val\n[PROOFSTEP]\nobtain ⟨b, hb₁, -, hb₂, hb₃⟩ := exists_linearIndependent_extension (linearIndependent_empty K V) (Set.empty_subset t)\n[GOAL]\ncase intro.intro.intro.intro\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t : Set V\nx y z : V\nb : Set V\nhb₁ : b ⊆ t\nhb₂ : t ⊆ ↑(span K b)\nhb₃ : LinearIndependent K Subtype.val\n⊢ ∃ b x, span K b = span K t ∧ LinearIndependent K Subtype.val\n[PROOFSTEP]\nexact ⟨b, hb₁, (span_eq_of_le _ hb₂ (Submodule.span_mono hb₁)).symm, hb₃⟩\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t✝ : Set V\nx y z : V\nt : Finset V\nhs : LinearIndependent K fun x => ↑x\nhst : s ⊆ ↑(span K ↑t)\n⊢ ∃ t', ↑t' ⊆ s ∪ ↑t ∧ s ⊆ ↑t' ∧ Finset.card t' = Finset.card t\n[PROOFSTEP]\nclassical\nhave :\n  ∀ t : Finset V,\n    ∀ s' : Finset V,\n      ↑s' ⊆ s →\n        s ∩ ↑t = ∅ →\n          s ⊆ (span K ↑(s' ∪ t) : Submodule K V) → ∃ t' : Finset V, ↑t' ⊆ s ∪ ↑t ∧ s ⊆ ↑t' ∧ t'.card = (s' ∪ t).card :=\n  fun t =>\n  Finset.induction_on t\n    (fun s' hs' _ hss' =>\n      have : s = ↑s' := eq_of_linearIndependent_of_span_subtype hs hs' <| by simpa using hss'\n      ⟨s', by simp [this]⟩)\n    fun b₁ t hb₁t ih s' hs' hst hss' =>\n    have hb₁s : b₁ ∉ s := fun h =>\n      by\n      have : b₁ ∈ s ∩ ↑(insert b₁ t) := ⟨h, Finset.mem_insert_self _ _⟩\n      rwa [hst] at this \n    have hb₁s' : b₁ ∉ s' := fun h => hb₁s <| hs' h\n    have hst : s ∩ ↑t = ∅ :=\n      eq_empty_of_subset_empty <|\n        -- Porting note: `-inter_subset_left, -subset_inter_iff` required.Subset.trans\n          (by simp [inter_subset_inter, Subset.refl, -inter_subset_left, -subset_inter_iff]) (le_of_eq hst)\n    Classical.by_cases (p := s ⊆ (span K ↑(s' ∪ t) : Submodule K V))\n      (fun this =>\n        let ⟨u, hust, hsu, Eq⟩ := ih _ hs' hst this\n        have hb₁u : b₁ ∉ u := fun h => (hust h).elim hb₁s hb₁t\n        ⟨insert b₁ u, by simp [insert_subset_insert hust], Subset.trans hsu (by simp), by simp [Eq, hb₁t, hb₁s', hb₁u]⟩)\n      fun this =>\n      let ⟨b₂, hb₂s, hb₂t⟩ := not_subset.mp this\n      have hb₂t' : b₂ ∉ s' ∪ t := fun h => hb₂t <| subset_span h\n      have : s ⊆ (span K ↑(insert b₂ s' ∪ t) : Submodule K V) := fun b₃ hb₃ =>\n        by\n        have : ↑(s' ∪ insert b₁ t) ⊆ insert b₁ (insert b₂ ↑(s' ∪ t) : Set V) := by\n          -- Porting note: Too many theorems to be excluded, so\n                      --               `simp only` is shorter.simp only [insert_eq, union_subset_union, Subset.refl,\n            subset_union_right, Finset.union_insert, Finset.coe_insert]\n        have hb₃ : b₃ ∈ span K (insert b₁ (insert b₂ ↑(s' ∪ t) : Set V)) := span_mono this (hss' hb₃)\n        have : s ⊆ (span K (insert b₁ ↑(s' ∪ t)) : Submodule K V) := by\n          simpa [insert_eq, -singleton_union, -union_singleton] using hss'\n        have hb₁ : b₁ ∈ span K (insert b₂ ↑(s' ∪ t)) := by exact mem_span_insert_exchange (this hb₂s) hb₂t\n        rw [span_insert_eq_span hb₁] at hb₃ ; simpa using hb₃\n      let ⟨u, hust, hsu, eq⟩ := ih _ (by simp [insert_subset_iff, hb₂s, hs']) hst this\n      ⟨u, Subset.trans hust <| union_subset_union (Subset.refl _) (by simp [subset_insert]), hsu, by\n        simp [eq, Finset.card_insert_of_not_mem hb₂t', hb₁t, hb₁s']⟩\nhave eq : ((t.filter fun x => x ∈ s) ∪ t.filter fun x => x ∉ s) = t :=\n  by\n  ext1 x\n  by_cases x ∈ s <;> simp [*]\napply\n  Exists.elim\n    (this (t.filter fun x => x ∉ s) (t.filter fun x => x ∈ s) (by simp [Set.subset_def])\n      (by simp (config := { contextual := true }) [Set.ext_iff]) (by rwa [eq]))\nintro u h\nexact\n  ⟨u, Subset.trans h.1 (by simp (config := { contextual := true }) [subset_def, and_imp, or_imp]), h.2.1, by\n    simp only [h.2.2, eq]⟩\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t✝ : Set V\nx y z : V\nt : Finset V\nhs : LinearIndependent K fun x => ↑x\nhst : s ⊆ ↑(span K ↑t)\n⊢ ∃ t', ↑t' ⊆ s ∪ ↑t ∧ s ⊆ ↑t' ∧ Finset.card t' = Finset.card t\n[PROOFSTEP]\nhave :\n  ∀ t : Finset V,\n    ∀ s' : Finset V,\n      ↑s' ⊆ s →\n        s ∩ ↑t = ∅ →\n          s ⊆ (span K ↑(s' ∪ t) : Submodule K V) → ∃ t' : Finset V, ↑t' ⊆ s ∪ ↑t ∧ s ⊆ ↑t' ∧ t'.card = (s' ∪ t).card :=\n  fun t =>\n  Finset.induction_on t\n    (fun s' hs' _ hss' =>\n      have : s = ↑s' := eq_of_linearIndependent_of_span_subtype hs hs' <| by simpa using hss'\n      ⟨s', by simp [this]⟩)\n    fun b₁ t hb₁t ih s' hs' hst hss' =>\n    have hb₁s : b₁ ∉ s := fun h =>\n      by\n      have : b₁ ∈ s ∩ ↑(insert b₁ t) := ⟨h, Finset.mem_insert_self _ _⟩\n      rwa [hst] at this \n    have hb₁s' : b₁ ∉ s' := fun h => hb₁s <| hs' h\n    have hst : s ∩ ↑t = ∅ :=\n      eq_empty_of_subset_empty <|\n        -- Porting note: `-inter_subset_left, -subset_inter_iff` required.Subset.trans\n          (by simp [inter_subset_inter, Subset.refl, -inter_subset_left, -subset_inter_iff]) (le_of_eq hst)\n    Classical.by_cases (p := s ⊆ (span K ↑(s' ∪ t) : Submodule K V))\n      (fun this =>\n        let ⟨u, hust, hsu, Eq⟩ := ih _ hs' hst this\n        have hb₁u : b₁ ∉ u := fun h => (hust h).elim hb₁s hb₁t\n        ⟨insert b₁ u, by simp [insert_subset_insert hust], Subset.trans hsu (by simp), by simp [Eq, hb₁t, hb₁s', hb₁u]⟩)\n      fun this =>\n      let ⟨b₂, hb₂s, hb₂t⟩ := not_subset.mp this\n      have hb₂t' : b₂ ∉ s' ∪ t := fun h => hb₂t <| subset_span h\n      have : s ⊆ (span K ↑(insert b₂ s' ∪ t) : Submodule K V) := fun b₃ hb₃ =>\n        by\n        have : ↑(s' ∪ insert b₁ t) ⊆ insert b₁ (insert b₂ ↑(s' ∪ t) : Set V) := by\n          -- Porting note: Too many theorems to be excluded, so\n                      --               `simp only` is shorter.simp only [insert_eq, union_subset_union, Subset.refl,\n            subset_union_right, Finset.union_insert, Finset.coe_insert]\n        have hb₃ : b₃ ∈ span K (insert b₁ (insert b₂ ↑(s' ∪ t) : Set V)) := span_mono this (hss' hb₃)\n        have : s ⊆ (span K (insert b₁ ↑(s' ∪ t)) : Submodule K V) := by\n          simpa [insert_eq, -singleton_union, -union_singleton] using hss'\n        have hb₁ : b₁ ∈ span K (insert b₂ ↑(s' ∪ t)) := by exact mem_span_insert_exchange (this hb₂s) hb₂t\n        rw [span_insert_eq_span hb₁] at hb₃ ; simpa using hb₃\n      let ⟨u, hust, hsu, eq⟩ := ih _ (by simp [insert_subset_iff, hb₂s, hs']) hst this\n      ⟨u, Subset.trans hust <| union_subset_union (Subset.refl _) (by simp [subset_insert]), hsu, by\n        simp [eq, Finset.card_insert_of_not_mem hb₂t', hb₁t, hb₁s']⟩\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t✝¹ : Set V\nx y z : V\nt✝ : Finset V\nhs : LinearIndependent K fun x => ↑x\nhst : s ⊆ ↑(span K ↑t✝)\nt s' : Finset V\nhs' : ↑s' ⊆ s\nx✝ : s ∩ ↑∅ = ∅\nhss' : s ⊆ ↑(span K ↑(s' ∪ ∅))\n⊢ s ⊆ ↑(span K ↑s')\n[PROOFSTEP]\nsimpa using hss'\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t✝¹ : Set V\nx y z : V\nt✝ : Finset V\nhs : LinearIndependent K fun x => ↑x\nhst : s ⊆ ↑(span K ↑t✝)\nt s' : Finset V\nhs' : ↑s' ⊆ s\nx✝ : s ∩ ↑∅ = ∅\nhss' : s ⊆ ↑(span K ↑(s' ∪ ∅))\nthis : s = ↑s'\n⊢ ↑s' ⊆ s ∪ ↑∅ ∧ s ⊆ ↑s' ∧ Finset.card s' = Finset.card (s' ∪ ∅)\n[PROOFSTEP]\nsimp [this]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t✝² : Set V\nx y z : V\nt✝¹ : Finset V\nhs : LinearIndependent K fun x => ↑x\nhst✝ : s ⊆ ↑(span K ↑t✝¹)\nt✝ : Finset V\nb₁ : V\nt : Finset V\nhb₁t : ¬b₁ ∈ t\nih :\n  ∀ (s' : Finset V),\n    ↑s' ⊆ s →\n      s ∩ ↑t = ∅ → s ⊆ ↑(span K ↑(s' ∪ t)) → ∃ t', ↑t' ⊆ s ∪ ↑t ∧ s ⊆ ↑t' ∧ Finset.card t' = Finset.card (s' ∪ t)\ns' : Finset V\nhs' : ↑s' ⊆ s\nhst : s ∩ ↑(insert b₁ t) = ∅\nhss' : s ⊆ ↑(span K ↑(s' ∪ insert b₁ t))\nh : b₁ ∈ s\n⊢ False\n[PROOFSTEP]\nhave : b₁ ∈ s ∩ ↑(insert b₁ t) := ⟨h, Finset.mem_insert_self _ _⟩\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t✝² : Set V\nx y z : V\nt✝¹ : Finset V\nhs : LinearIndependent K fun x => ↑x\nhst✝ : s ⊆ ↑(span K ↑t✝¹)\nt✝ : Finset V\nb₁ : V\nt : Finset V\nhb₁t : ¬b₁ ∈ t\nih :\n  ∀ (s' : Finset V),\n    ↑s' ⊆ s →\n      s ∩ ↑t = ∅ → s ⊆ ↑(span K ↑(s' ∪ t)) → ∃ t', ↑t' ⊆ s ∪ ↑t ∧ s ⊆ ↑t' ∧ Finset.card t' = Finset.card (s' ∪ t)\ns' : Finset V\nhs' : ↑s' ⊆ s\nhst : s ∩ ↑(insert b₁ t) = ∅\nhss' : s ⊆ ↑(span K ↑(s' ∪ insert b₁ t))\nh : b₁ ∈ s\nthis : b₁ ∈ s ∩ ↑(insert b₁ t)\n⊢ False\n[PROOFSTEP]\nrwa [hst] at this \n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t✝² : Set V\nx y z : V\nt✝¹ : Finset V\nhs : LinearIndependent K fun x => ↑x\nhst✝ : s ⊆ ↑(span K ↑t✝¹)\nt✝ : Finset V\nb₁ : V\nt : Finset V\nhb₁t : ¬b₁ ∈ t\nih :\n  ∀ (s' : Finset V),\n    ↑s' ⊆ s →\n      s ∩ ↑t = ∅ → s ⊆ ↑(span K ↑(s' ∪ t)) → ∃ t', ↑t' ⊆ s ∪ ↑t ∧ s ⊆ ↑t' ∧ Finset.card t' = Finset.card (s' ∪ t)\ns' : Finset V\nhs' : ↑s' ⊆ s\nhst : s ∩ ↑(insert b₁ t) = ∅\nhss' : s ⊆ ↑(span K ↑(s' ∪ insert b₁ t))\nhb₁s : ¬b₁ ∈ s\nhb₁s' : ¬b₁ ∈ s'\n⊢ s ∩ ↑t ⊆ s ∩ ↑(insert b₁ t)\n[PROOFSTEP]\nsimp [inter_subset_inter, Subset.refl, -inter_subset_left, -subset_inter_iff]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t✝² : Set V\nx y z : V\nt✝¹ : Finset V\nhs : LinearIndependent K fun x => ↑x\nhst✝¹ : s ⊆ ↑(span K ↑t✝¹)\nt✝ : Finset V\nb₁ : V\nt : Finset V\nhb₁t : ¬b₁ ∈ t\nih :\n  ∀ (s' : Finset V),\n    ↑s' ⊆ s →\n      s ∩ ↑t = ∅ → s ⊆ ↑(span K ↑(s' ∪ t)) → ∃ t', ↑t' ⊆ s ∪ ↑t ∧ s ⊆ ↑t' ∧ Finset.card t' = Finset.card (s' ∪ t)\ns' : Finset V\nhs' : ↑s' ⊆ s\nhst✝ : s ∩ ↑(insert b₁ t) = ∅\nhss' : s ⊆ ↑(span K ↑(s' ∪ insert b₁ t))\nhb₁s : ¬b₁ ∈ s\nhb₁s' : ¬b₁ ∈ s'\nhst : s ∩ ↑t = ∅\nthis : s ⊆ ↑(span K ↑(s' ∪ t))\nu : Finset V\nhust : ↑u ⊆ s ∪ ↑t\nhsu : s ⊆ ↑u\nEq : Finset.card u = Finset.card (s' ∪ t)\nhb₁u : ¬b₁ ∈ u\n⊢ ↑(insert b₁ u) ⊆ s ∪ ↑(insert b₁ t)\n[PROOFSTEP]\nsimp [insert_subset_insert hust]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t✝² : Set V\nx y z : V\nt✝¹ : Finset V\nhs : LinearIndependent K fun x => ↑x\nhst✝¹ : s ⊆ ↑(span K ↑t✝¹)\nt✝ : Finset V\nb₁ : V\nt : Finset V\nhb₁t : ¬b₁ ∈ t\nih :\n  ∀ (s' : Finset V),\n    ↑s' ⊆ s →\n      s ∩ ↑t = ∅ → s ⊆ ↑(span K ↑(s' ∪ t)) → ∃ t', ↑t' ⊆ s ∪ ↑t ∧ s ⊆ ↑t' ∧ Finset.card t' = Finset.card (s' ∪ t)\ns' : Finset V\nhs' : ↑s' ⊆ s\nhst✝ : s ∩ ↑(insert b₁ t) = ∅\nhss' : s ⊆ ↑(span K ↑(s' ∪ insert b₁ t))\nhb₁s : ¬b₁ ∈ s\nhb₁s' : ¬b₁ ∈ s'\nhst : s ∩ ↑t = ∅\nthis : s ⊆ ↑(span K ↑(s' ∪ t))\nu : Finset V\nhust : ↑u ⊆ s ∪ ↑t\nhsu : s ⊆ ↑u\nEq : Finset.card u = Finset.card (s' ∪ t)\nhb₁u : ¬b₁ ∈ u\n⊢ ↑u ⊆ ↑(insert b₁ u)\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t✝² : Set V\nx y z : V\nt✝¹ : Finset V\nhs : LinearIndependent K fun x => ↑x\nhst✝¹ : s ⊆ ↑(span K ↑t✝¹)\nt✝ : Finset V\nb₁ : V\nt : Finset V\nhb₁t : ¬b₁ ∈ t\nih :\n  ∀ (s' : Finset V),\n    ↑s' ⊆ s →\n      s ∩ ↑t = ∅ → s ⊆ ↑(span K ↑(s' ∪ t)) → ∃ t', ↑t' ⊆ s ∪ ↑t ∧ s ⊆ ↑t' ∧ Finset.card t' = Finset.card (s' ∪ t)\ns' : Finset V\nhs' : ↑s' ⊆ s\nhst✝ : s ∩ ↑(insert b₁ t) = ∅\nhss' : s ⊆ ↑(span K ↑(s' ∪ insert b₁ t))\nhb₁s : ¬b₁ ∈ s\nhb₁s' : ¬b₁ ∈ s'\nhst : s ∩ ↑t = ∅\nthis : s ⊆ ↑(span K ↑(s' ∪ t))\nu : Finset V\nhust : ↑u ⊆ s ∪ ↑t\nhsu : s ⊆ ↑u\nEq : Finset.card u = Finset.card (s' ∪ t)\nhb₁u : ¬b₁ ∈ u\n⊢ Finset.card (insert b₁ u) = Finset.card (s' ∪ insert b₁ t)\n[PROOFSTEP]\nsimp [Eq, hb₁t, hb₁s', hb₁u]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t✝² : Set V\nx y z : V\nt✝¹ : Finset V\nhs : LinearIndependent K fun x => ↑x\nhst✝¹ : s ⊆ ↑(span K ↑t✝¹)\nt✝ : Finset V\nb₁ : V\nt : Finset V\nhb₁t : ¬b₁ ∈ t\nih :\n  ∀ (s' : Finset V),\n    ↑s' ⊆ s →\n      s ∩ ↑t = ∅ → s ⊆ ↑(span K ↑(s' ∪ t)) → ∃ t', ↑t' ⊆ s ∪ ↑t ∧ s ⊆ ↑t' ∧ Finset.card t' = Finset.card (s' ∪ t)\ns' : Finset V\nhs' : ↑s' ⊆ s\nhst✝ : s ∩ ↑(insert b₁ t) = ∅\nhss' : s ⊆ ↑(span K ↑(s' ∪ insert b₁ t))\nhb₁s : ¬b₁ ∈ s\nhb₁s' : ¬b₁ ∈ s'\nhst : s ∩ ↑t = ∅\nthis : ¬s ⊆ ↑(span K ↑(s' ∪ t))\nb₂ : V\nhb₂s : b₂ ∈ s\nhb₂t : ¬b₂ ∈ ↑(span K ↑(s' ∪ t))\nhb₂t' : ¬b₂ ∈ s' ∪ t\nb₃ : V\nhb₃ : b₃ ∈ s\n⊢ b₃ ∈ ↑(span K ↑(insert b₂ s' ∪ t))\n[PROOFSTEP]\nhave : ↑(s' ∪ insert b₁ t) ⊆ insert b₁ (insert b₂ ↑(s' ∪ t) : Set V) := by\n  -- Porting note: Too many theorems to be excluded, so\n              --               `simp only` is shorter.simp only [insert_eq, union_subset_union, Subset.refl,\n    subset_union_right, Finset.union_insert, Finset.coe_insert]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t✝² : Set V\nx y z : V\nt✝¹ : Finset V\nhs : LinearIndependent K fun x => ↑x\nhst✝¹ : s ⊆ ↑(span K ↑t✝¹)\nt✝ : Finset V\nb₁ : V\nt : Finset V\nhb₁t : ¬b₁ ∈ t\nih :\n  ∀ (s' : Finset V),\n    ↑s' ⊆ s →\n      s ∩ ↑t = ∅ → s ⊆ ↑(span K ↑(s' ∪ t)) → ∃ t', ↑t' ⊆ s ∪ ↑t ∧ s ⊆ ↑t' ∧ Finset.card t' = Finset.card (s' ∪ t)\ns' : Finset V\nhs' : ↑s' ⊆ s\nhst✝ : s ∩ ↑(insert b₁ t) = ∅\nhss' : s ⊆ ↑(span K ↑(s' ∪ insert b₁ t))\nhb₁s : ¬b₁ ∈ s\nhb₁s' : ¬b₁ ∈ s'\nhst : s ∩ ↑t = ∅\nthis : ¬s ⊆ ↑(span K ↑(s' ∪ t))\nb₂ : V\nhb₂s : b₂ ∈ s\nhb₂t : ¬b₂ ∈ ↑(span K ↑(s' ∪ t))\nhb₂t' : ¬b₂ ∈ s' ∪ t\nb₃ : V\nhb₃ : b₃ ∈ s\n⊢ ↑(s' ∪ insert b₁ t) ⊆ insert b₁ (insert b₂ ↑(s' ∪ t))\n[PROOFSTEP]\nsimp only [insert_eq, union_subset_union, Subset.refl, subset_union_right, Finset.union_insert, Finset.coe_insert]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t✝² : Set V\nx y z : V\nt✝¹ : Finset V\nhs : LinearIndependent K fun x => ↑x\nhst✝¹ : s ⊆ ↑(span K ↑t✝¹)\nt✝ : Finset V\nb₁ : V\nt : Finset V\nhb₁t : ¬b₁ ∈ t\nih :\n  ∀ (s' : Finset V),\n    ↑s' ⊆ s →\n      s ∩ ↑t = ∅ → s ⊆ ↑(span K ↑(s' ∪ t)) → ∃ t', ↑t' ⊆ s ∪ ↑t ∧ s ⊆ ↑t' ∧ Finset.card t' = Finset.card (s' ∪ t)\ns' : Finset V\nhs' : ↑s' ⊆ s\nhst✝ : s ∩ ↑(insert b₁ t) = ∅\nhss' : s ⊆ ↑(span K ↑(s' ∪ insert b₁ t))\nhb₁s : ¬b₁ ∈ s\nhb₁s' : ¬b₁ ∈ s'\nhst : s ∩ ↑t = ∅\nthis✝ : ¬s ⊆ ↑(span K ↑(s' ∪ t))\nb₂ : V\nhb₂s : b₂ ∈ s\nhb₂t : ¬b₂ ∈ ↑(span K ↑(s' ∪ t))\nhb₂t' : ¬b₂ ∈ s' ∪ t\nb₃ : V\nhb₃ : b₃ ∈ s\nthis : ↑(s' ∪ insert b₁ t) ⊆ insert b₁ (insert b₂ ↑(s' ∪ t))\n⊢ b₃ ∈ ↑(span K ↑(insert b₂ s' ∪ t))\n[PROOFSTEP]\nhave hb₃ : b₃ ∈ span K (insert b₁ (insert b₂ ↑(s' ∪ t) : Set V)) := span_mono this (hss' hb₃)\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t✝² : Set V\nx y z : V\nt✝¹ : Finset V\nhs : LinearIndependent K fun x => ↑x\nhst✝¹ : s ⊆ ↑(span K ↑t✝¹)\nt✝ : Finset V\nb₁ : V\nt : Finset V\nhb₁t : ¬b₁ ∈ t\nih :\n  ∀ (s' : Finset V),\n    ↑s' ⊆ s →\n      s ∩ ↑t = ∅ → s ⊆ ↑(span K ↑(s' ∪ t)) → ∃ t', ↑t' ⊆ s ∪ ↑t ∧ s ⊆ ↑t' ∧ Finset.card t' = Finset.card (s' ∪ t)\ns' : Finset V\nhs' : ↑s' ⊆ s\nhst✝ : s ∩ ↑(insert b₁ t) = ∅\nhss' : s ⊆ ↑(span K ↑(s' ∪ insert b₁ t))\nhb₁s : ¬b₁ ∈ s\nhb₁s' : ¬b₁ ∈ s'\nhst : s ∩ ↑t = ∅\nthis✝ : ¬s ⊆ ↑(span K ↑(s' ∪ t))\nb₂ : V\nhb₂s : b₂ ∈ s\nhb₂t : ¬b₂ ∈ ↑(span K ↑(s' ∪ t))\nhb₂t' : ¬b₂ ∈ s' ∪ t\nb₃ : V\nhb₃✝ : b₃ ∈ s\nthis : ↑(s' ∪ insert b₁ t) ⊆ insert b₁ (insert b₂ ↑(s' ∪ t))\nhb₃ : b₃ ∈ span K (insert b₁ (insert b₂ ↑(s' ∪ t)))\n⊢ b₃ ∈ ↑(span K ↑(insert b₂ s' ∪ t))\n[PROOFSTEP]\nhave : s ⊆ (span K (insert b₁ ↑(s' ∪ t)) : Submodule K V) := by\n  simpa [insert_eq, -singleton_union, -union_singleton] using hss'\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t✝² : Set V\nx y z : V\nt✝¹ : Finset V\nhs : LinearIndependent K fun x => ↑x\nhst✝¹ : s ⊆ ↑(span K ↑t✝¹)\nt✝ : Finset V\nb₁ : V\nt : Finset V\nhb₁t : ¬b₁ ∈ t\nih :\n  ∀ (s' : Finset V),\n    ↑s' ⊆ s →\n      s ∩ ↑t = ∅ → s ⊆ ↑(span K ↑(s' ∪ t)) → ∃ t', ↑t' ⊆ s ∪ ↑t ∧ s ⊆ ↑t' ∧ Finset.card t' = Finset.card (s' ∪ t)\ns' : Finset V\nhs' : ↑s' ⊆ s\nhst✝ : s ∩ ↑(insert b₁ t) = ∅\nhss' : s ⊆ ↑(span K ↑(s' ∪ insert b₁ t))\nhb₁s : ¬b₁ ∈ s\nhb₁s' : ¬b₁ ∈ s'\nhst : s ∩ ↑t = ∅\nthis✝ : ¬s ⊆ ↑(span K ↑(s' ∪ t))\nb₂ : V\nhb₂s : b₂ ∈ s\nhb₂t : ¬b₂ ∈ ↑(span K ↑(s' ∪ t))\nhb₂t' : ¬b₂ ∈ s' ∪ t\nb₃ : V\nhb₃✝ : b₃ ∈ s\nthis : ↑(s' ∪ insert b₁ t) ⊆ insert b₁ (insert b₂ ↑(s' ∪ t))\nhb₃ : b₃ ∈ span K (insert b₁ (insert b₂ ↑(s' ∪ t)))\n⊢ s ⊆ ↑(span K (insert b₁ ↑(s' ∪ t)))\n[PROOFSTEP]\nsimpa [insert_eq, -singleton_union, -union_singleton] using hss'\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t✝² : Set V\nx y z : V\nt✝¹ : Finset V\nhs : LinearIndependent K fun x => ↑x\nhst✝¹ : s ⊆ ↑(span K ↑t✝¹)\nt✝ : Finset V\nb₁ : V\nt : Finset V\nhb₁t : ¬b₁ ∈ t\nih :\n  ∀ (s' : Finset V),\n    ↑s' ⊆ s →\n      s ∩ ↑t = ∅ → s ⊆ ↑(span K ↑(s' ∪ t)) → ∃ t', ↑t' ⊆ s ∪ ↑t ∧ s ⊆ ↑t' ∧ Finset.card t' = Finset.card (s' ∪ t)\ns' : Finset V\nhs' : ↑s' ⊆ s\nhst✝ : s ∩ ↑(insert b₁ t) = ∅\nhss' : s ⊆ ↑(span K ↑(s' ∪ insert b₁ t))\nhb₁s : ¬b₁ ∈ s\nhb₁s' : ¬b₁ ∈ s'\nhst : s ∩ ↑t = ∅\nthis✝¹ : ¬s ⊆ ↑(span K ↑(s' ∪ t))\nb₂ : V\nhb₂s : b₂ ∈ s\nhb₂t : ¬b₂ ∈ ↑(span K ↑(s' ∪ t))\nhb₂t' : ¬b₂ ∈ s' ∪ t\nb₃ : V\nhb₃✝ : b₃ ∈ s\nthis✝ : ↑(s' ∪ insert b₁ t) ⊆ insert b₁ (insert b₂ ↑(s' ∪ t))\nhb₃ : b₃ ∈ span K (insert b₁ (insert b₂ ↑(s' ∪ t)))\nthis : s ⊆ ↑(span K (insert b₁ ↑(s' ∪ t)))\n⊢ b₃ ∈ ↑(span K ↑(insert b₂ s' ∪ t))\n[PROOFSTEP]\nhave hb₁ : b₁ ∈ span K (insert b₂ ↑(s' ∪ t)) := by exact mem_span_insert_exchange (this hb₂s) hb₂t\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t✝² : Set V\nx y z : V\nt✝¹ : Finset V\nhs : LinearIndependent K fun x => ↑x\nhst✝¹ : s ⊆ ↑(span K ↑t✝¹)\nt✝ : Finset V\nb₁ : V\nt : Finset V\nhb₁t : ¬b₁ ∈ t\nih :\n  ∀ (s' : Finset V),\n    ↑s' ⊆ s →\n      s ∩ ↑t = ∅ → s ⊆ ↑(span K ↑(s' ∪ t)) → ∃ t', ↑t' ⊆ s ∪ ↑t ∧ s ⊆ ↑t' ∧ Finset.card t' = Finset.card (s' ∪ t)\ns' : Finset V\nhs' : ↑s' ⊆ s\nhst✝ : s ∩ ↑(insert b₁ t) = ∅\nhss' : s ⊆ ↑(span K ↑(s' ∪ insert b₁ t))\nhb₁s : ¬b₁ ∈ s\nhb₁s' : ¬b₁ ∈ s'\nhst : s ∩ ↑t = ∅\nthis✝¹ : ¬s ⊆ ↑(span K ↑(s' ∪ t))\nb₂ : V\nhb₂s : b₂ ∈ s\nhb₂t : ¬b₂ ∈ ↑(span K ↑(s' ∪ t))\nhb₂t' : ¬b₂ ∈ s' ∪ t\nb₃ : V\nhb₃✝ : b₃ ∈ s\nthis✝ : ↑(s' ∪ insert b₁ t) ⊆ insert b₁ (insert b₂ ↑(s' ∪ t))\nhb₃ : b₃ ∈ span K (insert b₁ (insert b₂ ↑(s' ∪ t)))\nthis : s ⊆ ↑(span K (insert b₁ ↑(s' ∪ t)))\n⊢ b₁ ∈ span K (insert b₂ ↑(s' ∪ t))\n[PROOFSTEP]\nexact mem_span_insert_exchange (this hb₂s) hb₂t\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t✝² : Set V\nx y z : V\nt✝¹ : Finset V\nhs : LinearIndependent K fun x => ↑x\nhst✝¹ : s ⊆ ↑(span K ↑t✝¹)\nt✝ : Finset V\nb₁ : V\nt : Finset V\nhb₁t : ¬b₁ ∈ t\nih :\n  ∀ (s' : Finset V),\n    ↑s' ⊆ s →\n      s ∩ ↑t = ∅ → s ⊆ ↑(span K ↑(s' ∪ t)) → ∃ t', ↑t' ⊆ s ∪ ↑t ∧ s ⊆ ↑t' ∧ Finset.card t' = Finset.card (s' ∪ t)\ns' : Finset V\nhs' : ↑s' ⊆ s\nhst✝ : s ∩ ↑(insert b₁ t) = ∅\nhss' : s ⊆ ↑(span K ↑(s' ∪ insert b₁ t))\nhb₁s : ¬b₁ ∈ s\nhb₁s' : ¬b₁ ∈ s'\nhst : s ∩ ↑t = ∅\nthis✝¹ : ¬s ⊆ ↑(span K ↑(s' ∪ t))\nb₂ : V\nhb₂s : b₂ ∈ s\nhb₂t : ¬b₂ ∈ ↑(span K ↑(s' ∪ t))\nhb₂t' : ¬b₂ ∈ s' ∪ t\nb₃ : V\nhb₃✝ : b₃ ∈ s\nthis✝ : ↑(s' ∪ insert b₁ t) ⊆ insert b₁ (insert b₂ ↑(s' ∪ t))\nhb₃ : b₃ ∈ span K (insert b₁ (insert b₂ ↑(s' ∪ t)))\nthis : s ⊆ ↑(span K (insert b₁ ↑(s' ∪ t)))\nhb₁ : b₁ ∈ span K (insert b₂ ↑(s' ∪ t))\n⊢ b₃ ∈ ↑(span K ↑(insert b₂ s' ∪ t))\n[PROOFSTEP]\nrw [span_insert_eq_span hb₁] at hb₃ \n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t✝² : Set V\nx y z : V\nt✝¹ : Finset V\nhs : LinearIndependent K fun x => ↑x\nhst✝¹ : s ⊆ ↑(span K ↑t✝¹)\nt✝ : Finset V\nb₁ : V\nt : Finset V\nhb₁t : ¬b₁ ∈ t\nih :\n  ∀ (s' : Finset V),\n    ↑s' ⊆ s →\n      s ∩ ↑t = ∅ → s ⊆ ↑(span K ↑(s' ∪ t)) → ∃ t', ↑t' ⊆ s ∪ ↑t ∧ s ⊆ ↑t' ∧ Finset.card t' = Finset.card (s' ∪ t)\ns' : Finset V\nhs' : ↑s' ⊆ s\nhst✝ : s ∩ ↑(insert b₁ t) = ∅\nhss' : s ⊆ ↑(span K ↑(s' ∪ insert b₁ t))\nhb₁s : ¬b₁ ∈ s\nhb₁s' : ¬b₁ ∈ s'\nhst : s ∩ ↑t = ∅\nthis✝¹ : ¬s ⊆ ↑(span K ↑(s' ∪ t))\nb₂ : V\nhb₂s : b₂ ∈ s\nhb₂t : ¬b₂ ∈ ↑(span K ↑(s' ∪ t))\nhb₂t' : ¬b₂ ∈ s' ∪ t\nb₃ : V\nhb₃✝ : b₃ ∈ s\nthis✝ : ↑(s' ∪ insert b₁ t) ⊆ insert b₁ (insert b₂ ↑(s' ∪ t))\nhb₃ : b₃ ∈ span K (insert b₂ ↑(s' ∪ t))\nthis : s ⊆ ↑(span K (insert b₁ ↑(s' ∪ t)))\nhb₁ : b₁ ∈ span K (insert b₂ ↑(s' ∪ t))\n⊢ b₃ ∈ ↑(span K ↑(insert b₂ s' ∪ t))\n[PROOFSTEP]\nsimpa using hb₃\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t✝² : Set V\nx y z : V\nt✝¹ : Finset V\nhs : LinearIndependent K fun x => ↑x\nhst✝¹ : s ⊆ ↑(span K ↑t✝¹)\nt✝ : Finset V\nb₁ : V\nt : Finset V\nhb₁t : ¬b₁ ∈ t\nih :\n  ∀ (s' : Finset V),\n    ↑s' ⊆ s →\n      s ∩ ↑t = ∅ → s ⊆ ↑(span K ↑(s' ∪ t)) → ∃ t', ↑t' ⊆ s ∪ ↑t ∧ s ⊆ ↑t' ∧ Finset.card t' = Finset.card (s' ∪ t)\ns' : Finset V\nhs' : ↑s' ⊆ s\nhst✝ : s ∩ ↑(insert b₁ t) = ∅\nhss' : s ⊆ ↑(span K ↑(s' ∪ insert b₁ t))\nhb₁s : ¬b₁ ∈ s\nhb₁s' : ¬b₁ ∈ s'\nhst : s ∩ ↑t = ∅\nthis✝ : ¬s ⊆ ↑(span K ↑(s' ∪ t))\nb₂ : V\nhb₂s : b₂ ∈ s\nhb₂t : ¬b₂ ∈ ↑(span K ↑(s' ∪ t))\nhb₂t' : ¬b₂ ∈ s' ∪ t\nthis : s ⊆ ↑(span K ↑(insert b₂ s' ∪ t))\n⊢ ↑(insert b₂ s') ⊆ s\n[PROOFSTEP]\nsimp [insert_subset_iff, hb₂s, hs']\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t✝² : Set V\nx y z : V\nt✝¹ : Finset V\nhs : LinearIndependent K fun x => ↑x\nhst✝¹ : s ⊆ ↑(span K ↑t✝¹)\nt✝ : Finset V\nb₁ : V\nt : Finset V\nhb₁t : ¬b₁ ∈ t\nih :\n  ∀ (s' : Finset V),\n    ↑s' ⊆ s →\n      s ∩ ↑t = ∅ → s ⊆ ↑(span K ↑(s' ∪ t)) → ∃ t', ↑t' ⊆ s ∪ ↑t ∧ s ⊆ ↑t' ∧ Finset.card t' = Finset.card (s' ∪ t)\ns' : Finset V\nhs' : ↑s' ⊆ s\nhst✝ : s ∩ ↑(insert b₁ t) = ∅\nhss' : s ⊆ ↑(span K ↑(s' ∪ insert b₁ t))\nhb₁s : ¬b₁ ∈ s\nhb₁s' : ¬b₁ ∈ s'\nhst : s ∩ ↑t = ∅\nthis✝ : ¬s ⊆ ↑(span K ↑(s' ∪ t))\nb₂ : V\nhb₂s : b₂ ∈ s\nhb₂t : ¬b₂ ∈ ↑(span K ↑(s' ∪ t))\nhb₂t' : ¬b₂ ∈ s' ∪ t\nthis : s ⊆ ↑(span K ↑(insert b₂ s' ∪ t))\nu : Finset V\nhust : ↑u ⊆ s ∪ ↑t\nhsu : s ⊆ ↑u\neq : Finset.card u = Finset.card (insert b₂ s' ∪ t)\n⊢ ↑t ⊆ ↑(insert b₁ t)\n[PROOFSTEP]\nsimp [subset_insert]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t✝² : Set V\nx y z : V\nt✝¹ : Finset V\nhs : LinearIndependent K fun x => ↑x\nhst✝¹ : s ⊆ ↑(span K ↑t✝¹)\nt✝ : Finset V\nb₁ : V\nt : Finset V\nhb₁t : ¬b₁ ∈ t\nih :\n  ∀ (s' : Finset V),\n    ↑s' ⊆ s →\n      s ∩ ↑t = ∅ → s ⊆ ↑(span K ↑(s' ∪ t)) → ∃ t', ↑t' ⊆ s ∪ ↑t ∧ s ⊆ ↑t' ∧ Finset.card t' = Finset.card (s' ∪ t)\ns' : Finset V\nhs' : ↑s' ⊆ s\nhst✝ : s ∩ ↑(insert b₁ t) = ∅\nhss' : s ⊆ ↑(span K ↑(s' ∪ insert b₁ t))\nhb₁s : ¬b₁ ∈ s\nhb₁s' : ¬b₁ ∈ s'\nhst : s ∩ ↑t = ∅\nthis✝ : ¬s ⊆ ↑(span K ↑(s' ∪ t))\nb₂ : V\nhb₂s : b₂ ∈ s\nhb₂t : ¬b₂ ∈ ↑(span K ↑(s' ∪ t))\nhb₂t' : ¬b₂ ∈ s' ∪ t\nthis : s ⊆ ↑(span K ↑(insert b₂ s' ∪ t))\nu : Finset V\nhust : ↑u ⊆ s ∪ ↑t\nhsu : s ⊆ ↑u\neq : Finset.card u = Finset.card (insert b₂ s' ∪ t)\n⊢ Finset.card u = Finset.card (s' ∪ insert b₁ t)\n[PROOFSTEP]\nsimp [eq, Finset.card_insert_of_not_mem hb₂t', hb₁t, hb₁s']\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t✝ : Set V\nx y z : V\nt : Finset V\nhs : LinearIndependent K fun x => ↑x\nhst : s ⊆ ↑(span K ↑t)\nthis :\n  ∀ (t s' : Finset V),\n    ↑s' ⊆ s →\n      s ∩ ↑t = ∅ → s ⊆ ↑(span K ↑(s' ∪ t)) → ∃ t', ↑t' ⊆ s ∪ ↑t ∧ s ⊆ ↑t' ∧ Finset.card t' = Finset.card (s' ∪ t)\n⊢ ∃ t', ↑t' ⊆ s ∪ ↑t ∧ s ⊆ ↑t' ∧ Finset.card t' = Finset.card t\n[PROOFSTEP]\nhave eq : ((t.filter fun x => x ∈ s) ∪ t.filter fun x => x ∉ s) = t :=\n  by\n  ext1 x\n  by_cases x ∈ s <;> simp [*]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t✝ : Set V\nx y z : V\nt : Finset V\nhs : LinearIndependent K fun x => ↑x\nhst : s ⊆ ↑(span K ↑t)\nthis :\n  ∀ (t s' : Finset V),\n    ↑s' ⊆ s →\n      s ∩ ↑t = ∅ → s ⊆ ↑(span K ↑(s' ∪ t)) → ∃ t', ↑t' ⊆ s ∪ ↑t ∧ s ⊆ ↑t' ∧ Finset.card t' = Finset.card (s' ∪ t)\n⊢ Finset.filter (fun x => x ∈ s) t ∪ Finset.filter (fun x => ¬x ∈ s) t = t\n[PROOFSTEP]\next1 x\n[GOAL]\ncase a\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t✝ : Set V\nx✝ y z : V\nt : Finset V\nhs : LinearIndependent K fun x => ↑x\nhst : s ⊆ ↑(span K ↑t)\nthis :\n  ∀ (t s' : Finset V),\n    ↑s' ⊆ s →\n      s ∩ ↑t = ∅ → s ⊆ ↑(span K ↑(s' ∪ t)) → ∃ t', ↑t' ⊆ s ∪ ↑t ∧ s ⊆ ↑t' ∧ Finset.card t' = Finset.card (s' ∪ t)\nx : V\n⊢ x ∈ Finset.filter (fun x => x ∈ s) t ∪ Finset.filter (fun x => ¬x ∈ s) t ↔ x ∈ t\n[PROOFSTEP]\nby_cases x ∈ s\n[GOAL]\ncase a\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t✝ : Set V\nx✝ y z : V\nt : Finset V\nhs : LinearIndependent K fun x => ↑x\nhst : s ⊆ ↑(span K ↑t)\nthis :\n  ∀ (t s' : Finset V),\n    ↑s' ⊆ s →\n      s ∩ ↑t = ∅ → s ⊆ ↑(span K ↑(s' ∪ t)) → ∃ t', ↑t' ⊆ s ∪ ↑t ∧ s ⊆ ↑t' ∧ Finset.card t' = Finset.card (s' ∪ t)\nx : V\n⊢ x ∈ Finset.filter (fun x => x ∈ s) t ∪ Finset.filter (fun x => ¬x ∈ s) t ↔ x ∈ t\n[PROOFSTEP]\nby_cases x ∈ s\n[GOAL]\ncase pos\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t✝ : Set V\nx✝ y z : V\nt : Finset V\nhs : LinearIndependent K fun x => ↑x\nhst : s ⊆ ↑(span K ↑t)\nthis :\n  ∀ (t s' : Finset V),\n    ↑s' ⊆ s →\n      s ∩ ↑t = ∅ → s ⊆ ↑(span K ↑(s' ∪ t)) → ∃ t', ↑t' ⊆ s ∪ ↑t ∧ s ⊆ ↑t' ∧ Finset.card t' = Finset.card (s' ∪ t)\nx : V\nh : x ∈ s\n⊢ x ∈ Finset.filter (fun x => x ∈ s) t ∪ Finset.filter (fun x => ¬x ∈ s) t ↔ x ∈ t\n[PROOFSTEP]\nsimp [*]\n[GOAL]\ncase neg\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t✝ : Set V\nx✝ y z : V\nt : Finset V\nhs : LinearIndependent K fun x => ↑x\nhst : s ⊆ ↑(span K ↑t)\nthis :\n  ∀ (t s' : Finset V),\n    ↑s' ⊆ s →\n      s ∩ ↑t = ∅ → s ⊆ ↑(span K ↑(s' ∪ t)) → ∃ t', ↑t' ⊆ s ∪ ↑t ∧ s ⊆ ↑t' ∧ Finset.card t' = Finset.card (s' ∪ t)\nx : V\nh : ¬x ∈ s\n⊢ x ∈ Finset.filter (fun x => x ∈ s) t ∪ Finset.filter (fun x => ¬x ∈ s) t ↔ x ∈ t\n[PROOFSTEP]\nsimp [*]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t✝ : Set V\nx y z : V\nt : Finset V\nhs : LinearIndependent K fun x => ↑x\nhst : s ⊆ ↑(span K ↑t)\nthis :\n  ∀ (t s' : Finset V),\n    ↑s' ⊆ s →\n      s ∩ ↑t = ∅ → s ⊆ ↑(span K ↑(s' ∪ t)) → ∃ t', ↑t' ⊆ s ∪ ↑t ∧ s ⊆ ↑t' ∧ Finset.card t' = Finset.card (s' ∪ t)\neq : Finset.filter (fun x => x ∈ s) t ∪ Finset.filter (fun x => ¬x ∈ s) t = t\n⊢ ∃ t', ↑t' ⊆ s ∪ ↑t ∧ s ⊆ ↑t' ∧ Finset.card t' = Finset.card t\n[PROOFSTEP]\napply\n  Exists.elim\n    (this (t.filter fun x => x ∉ s) (t.filter fun x => x ∈ s) (by simp [Set.subset_def])\n      (by simp (config := { contextual := true }) [Set.ext_iff]) (by rwa [eq]))\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t✝ : Set V\nx y z : V\nt : Finset V\nhs : LinearIndependent K fun x => ↑x\nhst : s ⊆ ↑(span K ↑t)\nthis :\n  ∀ (t s' : Finset V),\n    ↑s' ⊆ s →\n      s ∩ ↑t = ∅ → s ⊆ ↑(span K ↑(s' ∪ t)) → ∃ t', ↑t' ⊆ s ∪ ↑t ∧ s ⊆ ↑t' ∧ Finset.card t' = Finset.card (s' ∪ t)\neq : Finset.filter (fun x => x ∈ s) t ∪ Finset.filter (fun x => ¬x ∈ s) t = t\n⊢ ↑(Finset.filter (fun x => x ∈ s) t) ⊆ s\n[PROOFSTEP]\nsimp [Set.subset_def]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t✝ : Set V\nx y z : V\nt : Finset V\nhs : LinearIndependent K fun x => ↑x\nhst : s ⊆ ↑(span K ↑t)\nthis :\n  ∀ (t s' : Finset V),\n    ↑s' ⊆ s →\n      s ∩ ↑t = ∅ → s ⊆ ↑(span K ↑(s' ∪ t)) → ∃ t', ↑t' ⊆ s ∪ ↑t ∧ s ⊆ ↑t' ∧ Finset.card t' = Finset.card (s' ∪ t)\neq : Finset.filter (fun x => x ∈ s) t ∪ Finset.filter (fun x => ¬x ∈ s) t = t\n⊢ s ∩ ↑(Finset.filter (fun x => ¬x ∈ s) t) = ∅\n[PROOFSTEP]\nsimp (config := { contextual := true }) [Set.ext_iff]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t✝ : Set V\nx y z : V\nt : Finset V\nhs : LinearIndependent K fun x => ↑x\nhst : s ⊆ ↑(span K ↑t)\nthis :\n  ∀ (t s' : Finset V),\n    ↑s' ⊆ s →\n      s ∩ ↑t = ∅ → s ⊆ ↑(span K ↑(s' ∪ t)) → ∃ t', ↑t' ⊆ s ∪ ↑t ∧ s ⊆ ↑t' ∧ Finset.card t' = Finset.card (s' ∪ t)\neq : Finset.filter (fun x => x ∈ s) t ∪ Finset.filter (fun x => ¬x ∈ s) t = t\n⊢ s ⊆ ↑(span K ↑(Finset.filter (fun x => x ∈ s) t ∪ Finset.filter (fun x => ¬x ∈ s) t))\n[PROOFSTEP]\nrwa [eq]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t✝ : Set V\nx y z : V\nt : Finset V\nhs : LinearIndependent K fun x => ↑x\nhst : s ⊆ ↑(span K ↑t)\nthis :\n  ∀ (t s' : Finset V),\n    ↑s' ⊆ s →\n      s ∩ ↑t = ∅ → s ⊆ ↑(span K ↑(s' ∪ t)) → ∃ t', ↑t' ⊆ s ∪ ↑t ∧ s ⊆ ↑t' ∧ Finset.card t' = Finset.card (s' ∪ t)\neq : Finset.filter (fun x => x ∈ s) t ∪ Finset.filter (fun x => ¬x ∈ s) t = t\n⊢ ∀ (a : Finset V),\n    ↑a ⊆ s ∪ ↑(Finset.filter (fun x => ¬x ∈ s) t) ∧\n        s ⊆ ↑a ∧ Finset.card a = Finset.card (Finset.filter (fun x => x ∈ s) t ∪ Finset.filter (fun x => ¬x ∈ s) t) →\n      ∃ t', ↑t' ⊆ s ∪ ↑t ∧ s ⊆ ↑t' ∧ Finset.card t' = Finset.card t\n[PROOFSTEP]\nintro u h\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t✝ : Set V\nx y z : V\nt : Finset V\nhs : LinearIndependent K fun x => ↑x\nhst : s ⊆ ↑(span K ↑t)\nthis :\n  ∀ (t s' : Finset V),\n    ↑s' ⊆ s →\n      s ∩ ↑t = ∅ → s ⊆ ↑(span K ↑(s' ∪ t)) → ∃ t', ↑t' ⊆ s ∪ ↑t ∧ s ⊆ ↑t' ∧ Finset.card t' = Finset.card (s' ∪ t)\neq : Finset.filter (fun x => x ∈ s) t ∪ Finset.filter (fun x => ¬x ∈ s) t = t\nu : Finset V\nh :\n  ↑u ⊆ s ∪ ↑(Finset.filter (fun x => ¬x ∈ s) t) ∧\n    s ⊆ ↑u ∧ Finset.card u = Finset.card (Finset.filter (fun x => x ∈ s) t ∪ Finset.filter (fun x => ¬x ∈ s) t)\n⊢ ∃ t', ↑t' ⊆ s ∪ ↑t ∧ s ⊆ ↑t' ∧ Finset.card t' = Finset.card t\n[PROOFSTEP]\nexact\n  ⟨u, Subset.trans h.1 (by simp (config := { contextual := true }) [subset_def, and_imp, or_imp]), h.2.1, by\n    simp only [h.2.2, eq]⟩\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t✝ : Set V\nx y z : V\nt : Finset V\nhs : LinearIndependent K fun x => ↑x\nhst : s ⊆ ↑(span K ↑t)\nthis :\n  ∀ (t s' : Finset V),\n    ↑s' ⊆ s →\n      s ∩ ↑t = ∅ → s ⊆ ↑(span K ↑(s' ∪ t)) → ∃ t', ↑t' ⊆ s ∪ ↑t ∧ s ⊆ ↑t' ∧ Finset.card t' = Finset.card (s' ∪ t)\neq : Finset.filter (fun x => x ∈ s) t ∪ Finset.filter (fun x => ¬x ∈ s) t = t\nu : Finset V\nh :\n  ↑u ⊆ s ∪ ↑(Finset.filter (fun x => ¬x ∈ s) t) ∧\n    s ⊆ ↑u ∧ Finset.card u = Finset.card (Finset.filter (fun x => x ∈ s) t ∪ Finset.filter (fun x => ¬x ∈ s) t)\n⊢ s ∪ ↑(Finset.filter (fun x => ¬x ∈ s) t) ⊆ s ∪ ↑t\n[PROOFSTEP]\nsimp (config := { contextual := true }) [subset_def, and_imp, or_imp]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t✝ : Set V\nx y z : V\nt : Finset V\nhs : LinearIndependent K fun x => ↑x\nhst : s ⊆ ↑(span K ↑t)\nthis :\n  ∀ (t s' : Finset V),\n    ↑s' ⊆ s →\n      s ∩ ↑t = ∅ → s ⊆ ↑(span K ↑(s' ∪ t)) → ∃ t', ↑t' ⊆ s ∪ ↑t ∧ s ⊆ ↑t' ∧ Finset.card t' = Finset.card (s' ∪ t)\neq : Finset.filter (fun x => x ∈ s) t ∪ Finset.filter (fun x => ¬x ∈ s) t = t\nu : Finset V\nh :\n  ↑u ⊆ s ∪ ↑(Finset.filter (fun x => ¬x ∈ s) t) ∧\n    s ⊆ ↑u ∧ Finset.card u = Finset.card (Finset.filter (fun x => x ∈ s) t ∪ Finset.filter (fun x => ¬x ∈ s) t)\n⊢ Finset.card u = Finset.card t\n[PROOFSTEP]\nsimp only [h.2.2, eq]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t : Set V\nx y z : V\nht : Set.Finite t\nhs : LinearIndependent K fun x => ↑x\nhst : s ⊆ ↑(span K t)\n⊢ s ⊆ ↑(span K ↑(Finite.toFinset ht))\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t : Set V\nx y z : V\nht : Set.Finite t\nhs : LinearIndependent K fun x => ↑x\nhst : s ⊆ ↑(span K t)\n⊢ s ⊆ ↑(span K t)\n[PROOFSTEP]\nassumption\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t : Set V\nx y z : V\nht : Set.Finite t\nhs : LinearIndependent K fun x => ↑x\nhst : s ⊆ ↑(span K t)\nthis✝ : s ⊆ ↑(span K ↑(Finite.toFinset ht))\nu : Finset V\n_hust : ↑u ⊆ s ∪ ↑(Finite.toFinset ht)\nhsu : s ⊆ ↑u\nEq : Finset.card u = Finset.card (Finite.toFinset ht)\nthis : Set.Finite s\n⊢ Finset.card (Finite.toFinset this) ≤ Finset.card (Finite.toFinset ht)\n[PROOFSTEP]\nrw [← Eq]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t : Set V\nx y z : V\nht : Set.Finite t\nhs : LinearIndependent K fun x => ↑x\nhst : s ⊆ ↑(span K t)\nthis✝ : s ⊆ ↑(span K ↑(Finite.toFinset ht))\nu : Finset V\n_hust : ↑u ⊆ s ∪ ↑(Finite.toFinset ht)\nhsu : s ⊆ ↑u\nEq : Finset.card u = Finset.card (Finite.toFinset ht)\nthis : Set.Finite s\n⊢ Finset.card (Finite.toFinset this) ≤ Finset.card u\n[PROOFSTEP]\nexact Finset.card_le_of_subset <| Finset.coe_subset.mp <| by simp [hsu]\n[GOAL]\nι : Type u'\nι' : Type u_1\nR : Type u_2\nK : Type u_3\nM : Type u_4\nM' : Type u_5\nM'' : Type u_6\nV : Type u\nV' : Type u_7\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t : Set V\nx y z : V\nht : Set.Finite t\nhs : LinearIndependent K fun x => ↑x\nhst : s ⊆ ↑(span K t)\nthis✝ : s ⊆ ↑(span K ↑(Finite.toFinset ht))\nu : Finset V\n_hust : ↑u ⊆ s ∪ ↑(Finite.toFinset ht)\nhsu : s ⊆ ↑u\nEq : Finset.card u = Finset.card (Finite.toFinset ht)\nthis : Set.Finite s\n⊢ ↑(Finite.toFinset this) ⊆ ↑u\n[PROOFSTEP]\nsimp [hsu]\n", "meta": {"mathlib_filename": "Mathlib.LinearAlgebra.LinearIndependent", "llama_tokens": 186254, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7905303186696747, "lm_q2_score": 0.6370308082623217, "lm_q1q2_score": 0.5035921678580136}}
{"text": "[GOAL]\nx : ℝ\nh : Liouville x\n⊢ Irrational x\n[PROOFSTEP]\nrintro\n  ⟨⟨a, b, bN0, cop⟩, rfl⟩\n      -- clear up the mess of constructions of rationals\n[GOAL]\ncase intro.mk'\na : ℤ\nb : ℕ\nbN0 : b ≠ 0\ncop : Nat.coprime (Int.natAbs a) b\nh : Liouville ↑(Rat.mk' a b)\n⊢ False\n[PROOFSTEP]\nrw [Rat.cast_mk', ← div_eq_mul_inv] at h \n[GOAL]\ncase intro.mk'\na : ℤ\nb : ℕ\nbN0 : b ≠ 0\ncop : Nat.coprime (Int.natAbs a) b\nh : Liouville (↑a / ↑b)\n⊢ False\n[PROOFSTEP]\nrcases h (b + 1) with\n  ⟨p, q, q1, a0, a1⟩\n    -- A few useful inequalities\n[GOAL]\ncase intro.mk'.intro.intro.intro.intro\na : ℤ\nb : ℕ\nbN0 : b ≠ 0\ncop : Nat.coprime (Int.natAbs a) b\nh : Liouville (↑a / ↑b)\np q : ℤ\nq1 : 1 < q\na0 : ↑a / ↑b ≠ ↑p / ↑q\na1 : |↑a / ↑b - ↑p / ↑q| < 1 / ↑q ^ (b + 1)\n⊢ False\n[PROOFSTEP]\nhave qR0 : (0 : ℝ) < q := Int.cast_pos.mpr (zero_lt_one.trans q1)\n[GOAL]\ncase intro.mk'.intro.intro.intro.intro\na : ℤ\nb : ℕ\nbN0 : b ≠ 0\ncop : Nat.coprime (Int.natAbs a) b\nh : Liouville (↑a / ↑b)\np q : ℤ\nq1 : 1 < q\na0 : ↑a / ↑b ≠ ↑p / ↑q\na1 : |↑a / ↑b - ↑p / ↑q| < 1 / ↑q ^ (b + 1)\nqR0 : 0 < ↑q\n⊢ False\n[PROOFSTEP]\nhave b0 : (b : ℝ) ≠ 0 := Nat.cast_ne_zero.mpr bN0\n[GOAL]\ncase intro.mk'.intro.intro.intro.intro\na : ℤ\nb : ℕ\nbN0 : b ≠ 0\ncop : Nat.coprime (Int.natAbs a) b\nh : Liouville (↑a / ↑b)\np q : ℤ\nq1 : 1 < q\na0 : ↑a / ↑b ≠ ↑p / ↑q\na1 : |↑a / ↑b - ↑p / ↑q| < 1 / ↑q ^ (b + 1)\nqR0 : 0 < ↑q\nb0 : ↑b ≠ 0\n⊢ False\n[PROOFSTEP]\nhave bq0 : (0 : ℝ) < b * q := mul_pos (Nat.cast_pos.mpr bN0.bot_lt) qR0\n[GOAL]\ncase intro.mk'.intro.intro.intro.intro\na : ℤ\nb : ℕ\nbN0 : b ≠ 0\ncop : Nat.coprime (Int.natAbs a) b\nh : Liouville (↑a / ↑b)\np q : ℤ\nq1 : 1 < q\na0 : ↑a / ↑b ≠ ↑p / ↑q\na1 : |↑a / ↑b - ↑p / ↑q| < 1 / ↑q ^ (b + 1)\nqR0 : 0 < ↑q\nb0 : ↑b ≠ 0\nbq0 : 0 < ↑b * ↑q\n⊢ False\n[PROOFSTEP]\nreplace a1 : |a * q - b * p| * q ^ (b + 1) < b * q\n[GOAL]\ncase a1\na : ℤ\nb : ℕ\nbN0 : b ≠ 0\ncop : Nat.coprime (Int.natAbs a) b\nh : Liouville (↑a / ↑b)\np q : ℤ\nq1 : 1 < q\na0 : ↑a / ↑b ≠ ↑p / ↑q\na1 : |↑a / ↑b - ↑p / ↑q| < 1 / ↑q ^ (b + 1)\nqR0 : 0 < ↑q\nb0 : ↑b ≠ 0\nbq0 : 0 < ↑b * ↑q\n⊢ |a * q - ↑b * p| * q ^ (b + 1) < ↑b * q\n[PROOFSTEP]\nrw [div_sub_div _ _ b0 qR0.ne', abs_div, div_lt_div_iff (abs_pos.mpr bq0.ne') (pow_pos qR0 _), abs_of_pos bq0,\n  one_mul] at a1 \n[GOAL]\ncase a1\na : ℤ\nb : ℕ\nbN0 : b ≠ 0\ncop : Nat.coprime (Int.natAbs a) b\nh : Liouville (↑a / ↑b)\np q : ℤ\nq1 : 1 < q\na0 : ↑a / ↑b ≠ ↑p / ↑q\na1 : |↑a * ↑q - ↑b * ↑p| * ↑q ^ (b + 1) < ↑b * ↑q\nqR0 : 0 < ↑q\nb0 : ↑b ≠ 0\nbq0 : 0 < ↑b * ↑q\n⊢ |a * q - ↑b * p| * q ^ (b + 1) < ↑b * q\n[PROOFSTEP]\nexact_mod_cast a1\n[GOAL]\ncase intro.mk'.intro.intro.intro.intro\na : ℤ\nb : ℕ\nbN0 : b ≠ 0\ncop : Nat.coprime (Int.natAbs a) b\nh : Liouville (↑a / ↑b)\np q : ℤ\nq1 : 1 < q\na0 : ↑a / ↑b ≠ ↑p / ↑q\nqR0 : 0 < ↑q\nb0 : ↑b ≠ 0\nbq0 : 0 < ↑b * ↑q\na1 : |a * q - ↑b * p| * q ^ (b + 1) < ↑b * q\n⊢ False\n[PROOFSTEP]\nreplace a0 : a * q - ↑b * p ≠ 0\n[GOAL]\ncase a0\na : ℤ\nb : ℕ\nbN0 : b ≠ 0\ncop : Nat.coprime (Int.natAbs a) b\nh : Liouville (↑a / ↑b)\np q : ℤ\nq1 : 1 < q\na0 : ↑a / ↑b ≠ ↑p / ↑q\nqR0 : 0 < ↑q\nb0 : ↑b ≠ 0\nbq0 : 0 < ↑b * ↑q\na1 : |a * q - ↑b * p| * q ^ (b + 1) < ↑b * q\n⊢ a * q - ↑b * p ≠ 0\n[PROOFSTEP]\nrw [Ne.def, div_eq_div_iff b0 qR0.ne', mul_comm (p : ℝ), ← sub_eq_zero] at a0 \n[GOAL]\ncase a0\na : ℤ\nb : ℕ\nbN0 : b ≠ 0\ncop : Nat.coprime (Int.natAbs a) b\nh : Liouville (↑a / ↑b)\np q : ℤ\nq1 : 1 < q\na0✝ : ¬↑a * ↑q = ↑b * ↑p\na0 : ¬↑a * ↑q - ↑b * ↑p = 0\nqR0 : 0 < ↑q\nb0 : ↑b ≠ 0\nbq0 : 0 < ↑b * ↑q\na1 : |a * q - ↑b * p| * q ^ (b + 1) < ↑b * q\n⊢ a * q - ↑b * p ≠ 0\n[PROOFSTEP]\nexact_mod_cast a0\n[GOAL]\ncase intro.mk'.intro.intro.intro.intro\na : ℤ\nb : ℕ\nbN0 : b ≠ 0\ncop : Nat.coprime (Int.natAbs a) b\nh : Liouville (↑a / ↑b)\np q : ℤ\nq1 : 1 < q\nqR0 : 0 < ↑q\nb0 : ↑b ≠ 0\nbq0 : 0 < ↑b * ↑q\na1 : |a * q - ↑b * p| * q ^ (b + 1) < ↑b * q\na0 : a * q - ↑b * p ≠ 0\n⊢ False\n[PROOFSTEP]\nlift q to ℕ using (zero_lt_one.trans q1).le\n[GOAL]\ncase intro.mk'.intro.intro.intro.intro.intro\na : ℤ\nb : ℕ\nbN0 : b ≠ 0\ncop : Nat.coprime (Int.natAbs a) b\nh : Liouville (↑a / ↑b)\np : ℤ\nb0 : ↑b ≠ 0\nq : ℕ\nq1 : 1 < ↑q\nqR0 : 0 < ↑↑q\nbq0 : 0 < ↑b * ↑↑q\na1 : |a * ↑q - ↑b * p| * ↑q ^ (b + 1) < ↑b * ↑q\na0 : a * ↑q - ↑b * p ≠ 0\n⊢ False\n[PROOFSTEP]\nhave ap : 0 < |a * ↑q - ↑b * p| := abs_pos.mpr a0\n[GOAL]\ncase intro.mk'.intro.intro.intro.intro.intro\na : ℤ\nb : ℕ\nbN0 : b ≠ 0\ncop : Nat.coprime (Int.natAbs a) b\nh : Liouville (↑a / ↑b)\np : ℤ\nb0 : ↑b ≠ 0\nq : ℕ\nq1 : 1 < ↑q\nqR0 : 0 < ↑↑q\nbq0 : 0 < ↑b * ↑↑q\na1 : |a * ↑q - ↑b * p| * ↑q ^ (b + 1) < ↑b * ↑q\na0 : a * ↑q - ↑b * p ≠ 0\nap : 0 < |a * ↑q - ↑b * p|\n⊢ False\n[PROOFSTEP]\nlift |a * ↑q - ↑b * p| to ℕ using abs_nonneg (a * ↑q - ↑b * p) with e he\n[GOAL]\ncase intro.mk'.intro.intro.intro.intro.intro.intro\na : ℤ\nb : ℕ\nbN0 : b ≠ 0\ncop : Nat.coprime (Int.natAbs a) b\nh : Liouville (↑a / ↑b)\np : ℤ\nb0 : ↑b ≠ 0\nq : ℕ\nq1 : 1 < ↑q\nqR0 : 0 < ↑↑q\nbq0 : 0 < ↑b * ↑↑q\na0 : a * ↑q - ↑b * p ≠ 0\ne : ℕ\nhe : ↑e = |a * ↑q - ↑b * p|\na1✝ a1 : ↑e * ↑q ^ (b + 1) < ↑b * ↑q\nap✝ ap : 0 < ↑e\n⊢ False\n[PROOFSTEP]\nrw [← Int.ofNat_mul, ← Int.coe_nat_pow, ← Int.ofNat_mul, Int.ofNat_lt] at a1 \n[GOAL]\ncase intro.mk'.intro.intro.intro.intro.intro.intro\na : ℤ\nb : ℕ\nbN0 : b ≠ 0\ncop : Nat.coprime (Int.natAbs a) b\nh : Liouville (↑a / ↑b)\np : ℤ\nb0 : ↑b ≠ 0\nq : ℕ\nq1 : 1 < ↑q\nqR0 : 0 < ↑↑q\nbq0 : 0 < ↑b * ↑↑q\na0 : a * ↑q - ↑b * p ≠ 0\ne : ℕ\nhe : ↑e = |a * ↑q - ↑b * p|\na1✝ : ↑e * ↑q ^ (b + 1) < ↑b * ↑q\na1 : e * q ^ (b + 1) < b * q\nap✝ ap : 0 < ↑e\n⊢ False\n[PROOFSTEP]\nexact not_le.mpr a1 (Nat.mul_lt_mul_pow_succ (Int.coe_nat_pos.mp ap) (Int.ofNat_lt.mp q1)).le\n[GOAL]\nZ : Type u_1\nN : Type u_2\nR : Type u_3\ninst✝ : PseudoMetricSpace R\nd : N → ℝ\nj : Z → N → R\nf : R → R\nα : R\nε M : ℝ\nd0 : ∀ (a : N), 1 ≤ d a\ne0 : 0 < ε\nB : ∀ ⦃y : R⦄, y ∈ closedBall α ε → dist (f α) (f y) ≤ dist α y * M\nL : ∀ ⦃z : Z⦄ ⦃a : N⦄, j z a ∈ closedBall α ε → 1 ≤ d a * dist (f α) (f (j z a))\n⊢ ∃ A, 0 < A ∧ ∀ (z : Z) (a : N), 1 ≤ d a * (dist α (j z a) * A)\n[PROOFSTEP]\nhave me0 : 0 < max (1 / ε) M :=\n  lt_max_iff.mpr\n    (Or.inl (one_div_pos.mpr e0))\n      -- The maximum between `1 / ε` and `M` works\n[GOAL]\nZ : Type u_1\nN : Type u_2\nR : Type u_3\ninst✝ : PseudoMetricSpace R\nd : N → ℝ\nj : Z → N → R\nf : R → R\nα : R\nε M : ℝ\nd0 : ∀ (a : N), 1 ≤ d a\ne0 : 0 < ε\nB : ∀ ⦃y : R⦄, y ∈ closedBall α ε → dist (f α) (f y) ≤ dist α y * M\nL : ∀ ⦃z : Z⦄ ⦃a : N⦄, j z a ∈ closedBall α ε → 1 ≤ d a * dist (f α) (f (j z a))\nme0 : 0 < max (1 / ε) M\n⊢ ∃ A, 0 < A ∧ ∀ (z : Z) (a : N), 1 ≤ d a * (dist α (j z a) * A)\n[PROOFSTEP]\nrefine'\n  ⟨max (1 / ε) M, me0, fun z a => _⟩\n    -- First, let's deal with the easy case in which we are far away from `α`\n[GOAL]\nZ : Type u_1\nN : Type u_2\nR : Type u_3\ninst✝ : PseudoMetricSpace R\nd : N → ℝ\nj : Z → N → R\nf : R → R\nα : R\nε M : ℝ\nd0 : ∀ (a : N), 1 ≤ d a\ne0 : 0 < ε\nB : ∀ ⦃y : R⦄, y ∈ closedBall α ε → dist (f α) (f y) ≤ dist α y * M\nL : ∀ ⦃z : Z⦄ ⦃a : N⦄, j z a ∈ closedBall α ε → 1 ≤ d a * dist (f α) (f (j z a))\nme0 : 0 < max (1 / ε) M\nz : Z\na : N\n⊢ 1 ≤ d a * (dist α (j z a) * max (1 / ε) M)\n[PROOFSTEP]\nby_cases dm1 : 1 ≤ dist α (j z a) * max (1 / ε) M\n[GOAL]\ncase pos\nZ : Type u_1\nN : Type u_2\nR : Type u_3\ninst✝ : PseudoMetricSpace R\nd : N → ℝ\nj : Z → N → R\nf : R → R\nα : R\nε M : ℝ\nd0 : ∀ (a : N), 1 ≤ d a\ne0 : 0 < ε\nB : ∀ ⦃y : R⦄, y ∈ closedBall α ε → dist (f α) (f y) ≤ dist α y * M\nL : ∀ ⦃z : Z⦄ ⦃a : N⦄, j z a ∈ closedBall α ε → 1 ≤ d a * dist (f α) (f (j z a))\nme0 : 0 < max (1 / ε) M\nz : Z\na : N\ndm1 : 1 ≤ dist α (j z a) * max (1 / ε) M\n⊢ 1 ≤ d a * (dist α (j z a) * max (1 / ε) M)\n[PROOFSTEP]\nexact one_le_mul_of_one_le_of_one_le (d0 a) dm1\n[GOAL]\ncase neg\nZ : Type u_1\nN : Type u_2\nR : Type u_3\ninst✝ : PseudoMetricSpace R\nd : N → ℝ\nj : Z → N → R\nf : R → R\nα : R\nε M : ℝ\nd0 : ∀ (a : N), 1 ≤ d a\ne0 : 0 < ε\nB : ∀ ⦃y : R⦄, y ∈ closedBall α ε → dist (f α) (f y) ≤ dist α y * M\nL : ∀ ⦃z : Z⦄ ⦃a : N⦄, j z a ∈ closedBall α ε → 1 ≤ d a * dist (f α) (f (j z a))\nme0 : 0 < max (1 / ε) M\nz : Z\na : N\ndm1 : ¬1 ≤ dist α (j z a) * max (1 / ε) M\n⊢ 1 ≤ d a * (dist α (j z a) * max (1 / ε) M)\n[PROOFSTEP]\nhave : j z a ∈ closedBall α ε :=\n  by\n  refine' mem_closedBall'.mp (le_trans _ ((one_div_le me0 e0).mpr (le_max_left _ _)))\n  exact (le_div_iff me0).mpr (not_le.mp dm1).le\n[GOAL]\nZ : Type u_1\nN : Type u_2\nR : Type u_3\ninst✝ : PseudoMetricSpace R\nd : N → ℝ\nj : Z → N → R\nf : R → R\nα : R\nε M : ℝ\nd0 : ∀ (a : N), 1 ≤ d a\ne0 : 0 < ε\nB : ∀ ⦃y : R⦄, y ∈ closedBall α ε → dist (f α) (f y) ≤ dist α y * M\nL : ∀ ⦃z : Z⦄ ⦃a : N⦄, j z a ∈ closedBall α ε → 1 ≤ d a * dist (f α) (f (j z a))\nme0 : 0 < max (1 / ε) M\nz : Z\na : N\ndm1 : ¬1 ≤ dist α (j z a) * max (1 / ε) M\n⊢ j z a ∈ closedBall α ε\n[PROOFSTEP]\nrefine' mem_closedBall'.mp (le_trans _ ((one_div_le me0 e0).mpr (le_max_left _ _)))\n[GOAL]\nZ : Type u_1\nN : Type u_2\nR : Type u_3\ninst✝ : PseudoMetricSpace R\nd : N → ℝ\nj : Z → N → R\nf : R → R\nα : R\nε M : ℝ\nd0 : ∀ (a : N), 1 ≤ d a\ne0 : 0 < ε\nB : ∀ ⦃y : R⦄, y ∈ closedBall α ε → dist (f α) (f y) ≤ dist α y * M\nL : ∀ ⦃z : Z⦄ ⦃a : N⦄, j z a ∈ closedBall α ε → 1 ≤ d a * dist (f α) (f (j z a))\nme0 : 0 < max (1 / ε) M\nz : Z\na : N\ndm1 : ¬1 ≤ dist α (j z a) * max (1 / ε) M\n⊢ dist α (j z a) ≤ 1 / max (1 / ε) M\n[PROOFSTEP]\nexact (le_div_iff me0).mpr (not_le.mp dm1).le\n[GOAL]\ncase neg\nZ : Type u_1\nN : Type u_2\nR : Type u_3\ninst✝ : PseudoMetricSpace R\nd : N → ℝ\nj : Z → N → R\nf : R → R\nα : R\nε M : ℝ\nd0 : ∀ (a : N), 1 ≤ d a\ne0 : 0 < ε\nB : ∀ ⦃y : R⦄, y ∈ closedBall α ε → dist (f α) (f y) ≤ dist α y * M\nL : ∀ ⦃z : Z⦄ ⦃a : N⦄, j z a ∈ closedBall α ε → 1 ≤ d a * dist (f α) (f (j z a))\nme0 : 0 < max (1 / ε) M\nz : Z\na : N\ndm1 : ¬1 ≤ dist α (j z a) * max (1 / ε) M\nthis : j z a ∈ closedBall α ε\n⊢ 1 ≤ d a * (dist α (j z a) * max (1 / ε) M)\n[PROOFSTEP]\nrefine'\n  (L this).trans\n    _\n      -- remove a common factor and use the Lipschitz assumption `B`\n[GOAL]\ncase neg\nZ : Type u_1\nN : Type u_2\nR : Type u_3\ninst✝ : PseudoMetricSpace R\nd : N → ℝ\nj : Z → N → R\nf : R → R\nα : R\nε M : ℝ\nd0 : ∀ (a : N), 1 ≤ d a\ne0 : 0 < ε\nB : ∀ ⦃y : R⦄, y ∈ closedBall α ε → dist (f α) (f y) ≤ dist α y * M\nL : ∀ ⦃z : Z⦄ ⦃a : N⦄, j z a ∈ closedBall α ε → 1 ≤ d a * dist (f α) (f (j z a))\nme0 : 0 < max (1 / ε) M\nz : Z\na : N\ndm1 : ¬1 ≤ dist α (j z a) * max (1 / ε) M\nthis : j z a ∈ closedBall α ε\n⊢ d a * dist (f α) (f (j z a)) ≤ d a * (dist α (j z a) * max (1 / ε) M)\n[PROOFSTEP]\nrefine' mul_le_mul_of_nonneg_left ((B this).trans _) (zero_le_one.trans (d0 a))\n[GOAL]\ncase neg\nZ : Type u_1\nN : Type u_2\nR : Type u_3\ninst✝ : PseudoMetricSpace R\nd : N → ℝ\nj : Z → N → R\nf : R → R\nα : R\nε M : ℝ\nd0 : ∀ (a : N), 1 ≤ d a\ne0 : 0 < ε\nB : ∀ ⦃y : R⦄, y ∈ closedBall α ε → dist (f α) (f y) ≤ dist α y * M\nL : ∀ ⦃z : Z⦄ ⦃a : N⦄, j z a ∈ closedBall α ε → 1 ≤ d a * dist (f α) (f (j z a))\nme0 : 0 < max (1 / ε) M\nz : Z\na : N\ndm1 : ¬1 ≤ dist α (j z a) * max (1 / ε) M\nthis : j z a ∈ closedBall α ε\n⊢ dist α (j z a) * M ≤ dist α (j z a) * max (1 / ε) M\n[PROOFSTEP]\nexact mul_le_mul_of_nonneg_left (le_max_right _ M) dist_nonneg\n[GOAL]\nα : ℝ\nha : Irrational α\nf : ℤ[X]\nf0 : f ≠ 0\nfa : eval α (map (algebraMap ℤ ℝ) f) = 0\n⊢ ∃ A, 0 < A ∧ ∀ (a : ℤ) (b : ℕ), 1 ≤ (↑b + 1) ^ natDegree f * (|α - ↑a / (↑b + 1)| * A)\n[PROOFSTEP]\nset fR : ℝ[X] := map (algebraMap ℤ ℝ) f\n[GOAL]\nα : ℝ\nha : Irrational α\nf : ℤ[X]\nf0 : f ≠ 0\nfR : ℝ[X] := map (algebraMap ℤ ℝ) f\nfa : eval α fR = 0\n⊢ ∃ A, 0 < A ∧ ∀ (a : ℤ) (b : ℕ), 1 ≤ (↑b + 1) ^ natDegree f * (|α - ↑a / (↑b + 1)| * A)\n[PROOFSTEP]\nobtain fR0 : fR ≠ 0 := fun fR0 =>\n  (map_injective (algebraMap ℤ ℝ) fun _ _ A => Int.cast_inj.mp A).ne f0\n    (fR0.trans (Polynomial.map_zero _).symm)\n      -- reformulating assumption `fa`: `α` is a root of `fR`.\n[GOAL]\nα : ℝ\nha : Irrational α\nf : ℤ[X]\nf0 : f ≠ 0\nfR : ℝ[X] := map (algebraMap ℤ ℝ) f\nfa : eval α fR = 0\nfR0 : fR ≠ 0\n⊢ ∃ A, 0 < A ∧ ∀ (a : ℤ) (b : ℕ), 1 ≤ (↑b + 1) ^ natDegree f * (|α - ↑a / (↑b + 1)| * A)\n[PROOFSTEP]\nhave ar : α ∈ (fR.roots.toFinset : Set ℝ) :=\n  Finset.mem_coe.mpr\n    (Multiset.mem_toFinset.mpr ((mem_roots fR0).mpr (IsRoot.def.mpr fa)))\n      -- Since the polynomial `fR` has finitely many roots, there is a closed interval centered at `α`\n        -- such that `α` is the only root of `fR` in the interval.\n[GOAL]\nα : ℝ\nha : Irrational α\nf : ℤ[X]\nf0 : f ≠ 0\nfR : ℝ[X] := map (algebraMap ℤ ℝ) f\nfa : eval α fR = 0\nfR0 : fR ≠ 0\nar : α ∈ ↑(Multiset.toFinset (roots fR))\n⊢ ∃ A, 0 < A ∧ ∀ (a : ℤ) (b : ℕ), 1 ≤ (↑b + 1) ^ natDegree f * (|α - ↑a / (↑b + 1)| * A)\n[PROOFSTEP]\nobtain ⟨ζ, z0, U⟩ : ∃ ζ > 0, closedBall α ζ ∩ fR.roots.toFinset = { α } :=\n  @exists_closedBall_inter_eq_singleton_of_discrete _ _ _ discrete_of_t1_of_finite _ ar\n[GOAL]\ncase intro.intro\nα : ℝ\nha : Irrational α\nf : ℤ[X]\nf0 : f ≠ 0\nfR : ℝ[X] := map (algebraMap ℤ ℝ) f\nfa : eval α fR = 0\nfR0 : fR ≠ 0\nar : α ∈ ↑(Multiset.toFinset (roots fR))\nζ : ℝ\nz0 : ζ > 0\nU : closedBall α ζ ∩ ↑(Multiset.toFinset (roots fR)) = {α}\n⊢ ∃ A, 0 < A ∧ ∀ (a : ℤ) (b : ℕ), 1 ≤ (↑b + 1) ^ natDegree f * (|α - ↑a / (↑b + 1)| * A)\n[PROOFSTEP]\nobtain ⟨xm, -, hM⟩ : ∃ xm : ℝ, xm ∈ Icc (α - ζ) (α + ζ) ∧ IsMaxOn (|fR.derivative.eval ·|) (Icc (α - ζ) (α + ζ)) xm :=\n  IsCompact.exists_isMaxOn isCompact_Icc ⟨α, (sub_lt_self α z0).le, (lt_add_of_pos_right α z0).le⟩\n    (continuous_abs.comp fR.derivative.continuous_aeval).continuousOn\n[GOAL]\ncase intro.intro.intro.intro\nα : ℝ\nha : Irrational α\nf : ℤ[X]\nf0 : f ≠ 0\nfR : ℝ[X] := map (algebraMap ℤ ℝ) f\nfa : eval α fR = 0\nfR0 : fR ≠ 0\nar : α ∈ ↑(Multiset.toFinset (roots fR))\nζ : ℝ\nz0 : ζ > 0\nU : closedBall α ζ ∩ ↑(Multiset.toFinset (roots fR)) = {α}\nxm : ℝ\nhM : IsMaxOn (fun x => |eval x (↑derivative fR)|) (Icc (α - ζ) (α + ζ)) xm\n⊢ ∃ A, 0 < A ∧ ∀ (a : ℤ) (b : ℕ), 1 ≤ (↑b + 1) ^ natDegree f * (|α - ↑a / (↑b + 1)| * A)\n[PROOFSTEP]\nrefine'\n  @exists_one_le_pow_mul_dist ℤ ℕ ℝ _ _ _ (fun y => fR.eval y) α ζ |fR.derivative.eval xm| _ z0 (fun y hy => _)\n    fun z a hq =>\n    _\n      -- 1: the denominators are positive -- essentially by definition;\n[GOAL]\ncase intro.intro.intro.intro.refine'_1\nα : ℝ\nha : Irrational α\nf : ℤ[X]\nf0 : f ≠ 0\nfR : ℝ[X] := map (algebraMap ℤ ℝ) f\nfa : eval α fR = 0\nfR0 : fR ≠ 0\nar : α ∈ ↑(Multiset.toFinset (roots fR))\nζ : ℝ\nz0 : ζ > 0\nU : closedBall α ζ ∩ ↑(Multiset.toFinset (roots fR)) = {α}\nxm : ℝ\nhM : IsMaxOn (fun x => |eval x (↑derivative fR)|) (Icc (α - ζ) (α + ζ)) xm\n⊢ ∀ (a : ℕ), 1 ≤ (↑a + 1) ^ natDegree f\n[PROOFSTEP]\nexact fun a =>\n  one_le_pow_of_one_le ((le_add_iff_nonneg_left 1).mpr a.cast_nonneg)\n    _\n      -- 2: the polynomial `fR` is Lipschitz at `α` -- as its derivative continuous;\n[GOAL]\ncase intro.intro.intro.intro.refine'_2\nα : ℝ\nha : Irrational α\nf : ℤ[X]\nf0 : f ≠ 0\nfR : ℝ[X] := map (algebraMap ℤ ℝ) f\nfa : eval α fR = 0\nfR0 : fR ≠ 0\nar : α ∈ ↑(Multiset.toFinset (roots fR))\nζ : ℝ\nz0 : ζ > 0\nU : closedBall α ζ ∩ ↑(Multiset.toFinset (roots fR)) = {α}\nxm : ℝ\nhM : IsMaxOn (fun x => |eval x (↑derivative fR)|) (Icc (α - ζ) (α + ζ)) xm\ny : ℝ\nhy : y ∈ closedBall α ζ\n⊢ dist ((fun y => eval y fR) α) ((fun y => eval y fR) y) ≤ dist α y * |eval xm (↑derivative fR)|\n[PROOFSTEP]\nrw [mul_comm]\n[GOAL]\ncase intro.intro.intro.intro.refine'_2\nα : ℝ\nha : Irrational α\nf : ℤ[X]\nf0 : f ≠ 0\nfR : ℝ[X] := map (algebraMap ℤ ℝ) f\nfa : eval α fR = 0\nfR0 : fR ≠ 0\nar : α ∈ ↑(Multiset.toFinset (roots fR))\nζ : ℝ\nz0 : ζ > 0\nU : closedBall α ζ ∩ ↑(Multiset.toFinset (roots fR)) = {α}\nxm : ℝ\nhM : IsMaxOn (fun x => |eval x (↑derivative fR)|) (Icc (α - ζ) (α + ζ)) xm\ny : ℝ\nhy : y ∈ closedBall α ζ\n⊢ dist ((fun y => eval y fR) α) ((fun y => eval y fR) y) ≤ |eval xm (↑derivative fR)| * dist α y\n[PROOFSTEP]\nrw [Real.closedBall_eq_Icc] at hy \n[GOAL]\ncase intro.intro.intro.intro.refine'_2\nα : ℝ\nha : Irrational α\nf : ℤ[X]\nf0 : f ≠ 0\nfR : ℝ[X] := map (algebraMap ℤ ℝ) f\nfa : eval α fR = 0\nfR0 : fR ≠ 0\nar : α ∈ ↑(Multiset.toFinset (roots fR))\nζ : ℝ\nz0 : ζ > 0\nU : closedBall α ζ ∩ ↑(Multiset.toFinset (roots fR)) = {α}\nxm : ℝ\nhM : IsMaxOn (fun x => |eval x (↑derivative fR)|) (Icc (α - ζ) (α + ζ)) xm\ny : ℝ\nhy : y ∈ Icc (α - ζ) (α + ζ)\n⊢ dist ((fun y => eval y fR) α) ((fun y => eval y fR) y) ≤ |eval xm (↑derivative fR)| * dist α y\n[PROOFSTEP]\nrefine'\n  Convex.norm_image_sub_le_of_norm_deriv_le (fun _ _ => fR.differentiableAt) (fun y h => by rw [fR.deriv]; exact hM h)\n    (convex_Icc _ _) hy (mem_Icc_iff_abs_le.mp _)\n[GOAL]\nα : ℝ\nha : Irrational α\nf : ℤ[X]\nf0 : f ≠ 0\nfR : ℝ[X] := map (algebraMap ℤ ℝ) f\nfa : eval α fR = 0\nfR0 : fR ≠ 0\nar : α ∈ ↑(Multiset.toFinset (roots fR))\nζ : ℝ\nz0 : ζ > 0\nU : closedBall α ζ ∩ ↑(Multiset.toFinset (roots fR)) = {α}\nxm : ℝ\nhM : IsMaxOn (fun x => |eval x (↑derivative fR)|) (Icc (α - ζ) (α + ζ)) xm\ny✝ : ℝ\nhy : y✝ ∈ Icc (α - ζ) (α + ζ)\ny : ℝ\nh : y ∈ Icc (α - ζ) (α + ζ)\n⊢ ‖deriv (fun x => eval x fR) y‖ ≤ |eval xm (↑derivative fR)|\n[PROOFSTEP]\nrw [fR.deriv]\n[GOAL]\nα : ℝ\nha : Irrational α\nf : ℤ[X]\nf0 : f ≠ 0\nfR : ℝ[X] := map (algebraMap ℤ ℝ) f\nfa : eval α fR = 0\nfR0 : fR ≠ 0\nar : α ∈ ↑(Multiset.toFinset (roots fR))\nζ : ℝ\nz0 : ζ > 0\nU : closedBall α ζ ∩ ↑(Multiset.toFinset (roots fR)) = {α}\nxm : ℝ\nhM : IsMaxOn (fun x => |eval x (↑derivative fR)|) (Icc (α - ζ) (α + ζ)) xm\ny✝ : ℝ\nhy : y✝ ∈ Icc (α - ζ) (α + ζ)\ny : ℝ\nh : y ∈ Icc (α - ζ) (α + ζ)\n⊢ ‖eval y (↑derivative fR)‖ ≤ |eval xm (↑derivative fR)|\n[PROOFSTEP]\nexact hM h\n[GOAL]\ncase intro.intro.intro.intro.refine'_2\nα : ℝ\nha : Irrational α\nf : ℤ[X]\nf0 : f ≠ 0\nfR : ℝ[X] := map (algebraMap ℤ ℝ) f\nfa : eval α fR = 0\nfR0 : fR ≠ 0\nar : α ∈ ↑(Multiset.toFinset (roots fR))\nζ : ℝ\nz0 : ζ > 0\nU : closedBall α ζ ∩ ↑(Multiset.toFinset (roots fR)) = {α}\nxm : ℝ\nhM : IsMaxOn (fun x => |eval x (↑derivative fR)|) (Icc (α - ζ) (α + ζ)) xm\ny : ℝ\nhy : y ∈ Icc (α - ζ) (α + ζ)\n⊢ |α - α| ≤ ζ\n[PROOFSTEP]\nexact\n  @mem_closedBall_self ℝ _ α ζ\n    (le_of_lt z0)\n      -- 3: the weird inequality of Liouville type with powers of the denominators.\n[GOAL]\ncase intro.intro.intro.intro.refine'_3\nα : ℝ\nha : Irrational α\nf : ℤ[X]\nf0 : f ≠ 0\nfR : ℝ[X] := map (algebraMap ℤ ℝ) f\nfa : eval α fR = 0\nfR0 : fR ≠ 0\nar : α ∈ ↑(Multiset.toFinset (roots fR))\nζ : ℝ\nz0 : ζ > 0\nU : closedBall α ζ ∩ ↑(Multiset.toFinset (roots fR)) = {α}\nxm : ℝ\nhM : IsMaxOn (fun x => |eval x (↑derivative fR)|) (Icc (α - ζ) (α + ζ)) xm\nz : ℤ\na : ℕ\nhq : ↑z / (↑a + 1) ∈ closedBall α ζ\n⊢ 1 ≤ (↑a + 1) ^ natDegree f * dist ((fun y => eval y fR) α) ((fun y => eval y fR) (↑z / (↑a + 1)))\n[PROOFSTEP]\nshow 1 ≤ (a + 1 : ℝ) ^ f.natDegree * |eval α fR - eval ((z : ℝ) / (a + 1)) fR|\n[GOAL]\ncase intro.intro.intro.intro.refine'_3\nα : ℝ\nha : Irrational α\nf : ℤ[X]\nf0 : f ≠ 0\nfR : ℝ[X] := map (algebraMap ℤ ℝ) f\nfa : eval α fR = 0\nfR0 : fR ≠ 0\nar : α ∈ ↑(Multiset.toFinset (roots fR))\nζ : ℝ\nz0 : ζ > 0\nU : closedBall α ζ ∩ ↑(Multiset.toFinset (roots fR)) = {α}\nxm : ℝ\nhM : IsMaxOn (fun x => |eval x (↑derivative fR)|) (Icc (α - ζ) (α + ζ)) xm\nz : ℤ\na : ℕ\nhq : ↑z / (↑a + 1) ∈ closedBall α ζ\n⊢ 1 ≤ (↑a + 1) ^ natDegree f * |eval α fR - eval (↑z / (↑a + 1)) fR|\n[PROOFSTEP]\nrw [fa, zero_sub, abs_neg]\n[GOAL]\ncase intro.intro.intro.intro.refine'_3\nα : ℝ\nha : Irrational α\nf : ℤ[X]\nf0 : f ≠ 0\nfR : ℝ[X] := map (algebraMap ℤ ℝ) f\nfa : eval α fR = 0\nfR0 : fR ≠ 0\nar : α ∈ ↑(Multiset.toFinset (roots fR))\nζ : ℝ\nz0 : ζ > 0\nU : closedBall α ζ ∩ ↑(Multiset.toFinset (roots fR)) = {α}\nxm : ℝ\nhM : IsMaxOn (fun x => |eval x (↑derivative fR)|) (Icc (α - ζ) (α + ζ)) xm\nz : ℤ\na : ℕ\nhq : ↑z / (↑a + 1) ∈ closedBall α ζ\n⊢ 1 ≤ (↑a + 1) ^ natDegree f * |eval (↑z / (↑a + 1)) fR|\n[PROOFSTEP]\nrw [show (a + 1 : ℝ) = ((a + 1 : ℕ) : ℤ) by norm_cast] at hq ⊢\n  -- key observation: the right-hand side of the inequality is an *integer*.  Therefore,\n      -- if its absolute value is not at least one, then it vanishes.  Proceed by contradiction\n[GOAL]\nα : ℝ\nha : Irrational α\nf : ℤ[X]\nf0 : f ≠ 0\nfR : ℝ[X] := map (algebraMap ℤ ℝ) f\nfa : eval α fR = 0\nfR0 : fR ≠ 0\nar : α ∈ ↑(Multiset.toFinset (roots fR))\nζ : ℝ\nz0 : ζ > 0\nU : closedBall α ζ ∩ ↑(Multiset.toFinset (roots fR)) = {α}\nxm : ℝ\nhM : IsMaxOn (fun x => |eval x (↑derivative fR)|) (Icc (α - ζ) (α + ζ)) xm\nz : ℤ\na : ℕ\nhq : ↑z / (↑a + 1) ∈ closedBall α ζ\n⊢ ↑a + 1 = ↑↑(a + 1)\n[PROOFSTEP]\nnorm_cast\n[GOAL]\nα : ℝ\nha : Irrational α\nf : ℤ[X]\nf0 : f ≠ 0\nfR : ℝ[X] := map (algebraMap ℤ ℝ) f\nfa : eval α fR = 0\nfR0 : fR ≠ 0\nar : α ∈ ↑(Multiset.toFinset (roots fR))\nζ : ℝ\nz0 : ζ > 0\nU : closedBall α ζ ∩ ↑(Multiset.toFinset (roots fR)) = {α}\nxm : ℝ\nhM : IsMaxOn (fun x => |eval x (↑derivative fR)|) (Icc (α - ζ) (α + ζ)) xm\nz : ℤ\na : ℕ\nhq : ↑z / ↑↑(a + 1) ∈ closedBall α ζ\n⊢ ↑a + 1 = ↑↑(a + 1)\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase intro.intro.intro.intro.refine'_3\nα : ℝ\nha : Irrational α\nf : ℤ[X]\nf0 : f ≠ 0\nfR : ℝ[X] := map (algebraMap ℤ ℝ) f\nfa : eval α fR = 0\nfR0 : fR ≠ 0\nar : α ∈ ↑(Multiset.toFinset (roots fR))\nζ : ℝ\nz0 : ζ > 0\nU : closedBall α ζ ∩ ↑(Multiset.toFinset (roots fR)) = {α}\nxm : ℝ\nhM : IsMaxOn (fun x => |eval x (↑derivative fR)|) (Icc (α - ζ) (α + ζ)) xm\nz : ℤ\na : ℕ\nhq : ↑z / ↑↑(a + 1) ∈ closedBall α ζ\n⊢ 1 ≤ ↑↑(a + 1) ^ natDegree f * |eval (↑z / ↑↑(a + 1)) fR|\n[PROOFSTEP]\nrefine'\n  one_le_pow_mul_abs_eval_div (Int.coe_nat_succ_pos a) fun hy =>\n    _\n      -- As the evaluation of the polynomial vanishes, we found a root of `fR` that is rational.\n          -- We know that `α` is the only root of `fR` in our interval, and `α` is irrational:\n          -- follow your nose.\n[GOAL]\ncase intro.intro.intro.intro.refine'_3\nα : ℝ\nha : Irrational α\nf : ℤ[X]\nf0 : f ≠ 0\nfR : ℝ[X] := map (algebraMap ℤ ℝ) f\nfa : eval α fR = 0\nfR0 : fR ≠ 0\nar : α ∈ ↑(Multiset.toFinset (roots fR))\nζ : ℝ\nz0 : ζ > 0\nU : closedBall α ζ ∩ ↑(Multiset.toFinset (roots fR)) = {α}\nxm : ℝ\nhM : IsMaxOn (fun x => |eval x (↑derivative fR)|) (Icc (α - ζ) (α + ζ)) xm\nz : ℤ\na : ℕ\nhq : ↑z / ↑↑(a + 1) ∈ closedBall α ζ\nhy : eval (↑z / ↑↑(a + 1)) (map (algebraMap ℤ ℝ) f) = 0\n⊢ False\n[PROOFSTEP]\nrefine' (irrational_iff_ne_rational α).mp ha z (a + 1) (mem_singleton_iff.mp _).symm\n[GOAL]\ncase intro.intro.intro.intro.refine'_3\nα : ℝ\nha : Irrational α\nf : ℤ[X]\nf0 : f ≠ 0\nfR : ℝ[X] := map (algebraMap ℤ ℝ) f\nfa : eval α fR = 0\nfR0 : fR ≠ 0\nar : α ∈ ↑(Multiset.toFinset (roots fR))\nζ : ℝ\nz0 : ζ > 0\nU : closedBall α ζ ∩ ↑(Multiset.toFinset (roots fR)) = {α}\nxm : ℝ\nhM : IsMaxOn (fun x => |eval x (↑derivative fR)|) (Icc (α - ζ) (α + ζ)) xm\nz : ℤ\na : ℕ\nhq : ↑z / ↑↑(a + 1) ∈ closedBall α ζ\nhy : eval (↑z / ↑↑(a + 1)) (map (algebraMap ℤ ℝ) f) = 0\n⊢ ↑z / ↑(↑a + 1) ∈ {α}\n[PROOFSTEP]\nrefine' U.subset _\n[GOAL]\ncase intro.intro.intro.intro.refine'_3\nα : ℝ\nha : Irrational α\nf : ℤ[X]\nf0 : f ≠ 0\nfR : ℝ[X] := map (algebraMap ℤ ℝ) f\nfa : eval α fR = 0\nfR0 : fR ≠ 0\nar : α ∈ ↑(Multiset.toFinset (roots fR))\nζ : ℝ\nz0 : ζ > 0\nU : closedBall α ζ ∩ ↑(Multiset.toFinset (roots fR)) = {α}\nxm : ℝ\nhM : IsMaxOn (fun x => |eval x (↑derivative fR)|) (Icc (α - ζ) (α + ζ)) xm\nz : ℤ\na : ℕ\nhq : ↑z / ↑↑(a + 1) ∈ closedBall α ζ\nhy : eval (↑z / ↑↑(a + 1)) (map (algebraMap ℤ ℝ) f) = 0\n⊢ ↑z / ↑(↑a + 1) ∈ closedBall α ζ ∩ ↑(Multiset.toFinset (roots fR))\n[PROOFSTEP]\nrefine' ⟨hq, Finset.mem_coe.mp (Multiset.mem_toFinset.mpr _)⟩\n[GOAL]\ncase intro.intro.intro.intro.refine'_3\nα : ℝ\nha : Irrational α\nf : ℤ[X]\nf0 : f ≠ 0\nfR : ℝ[X] := map (algebraMap ℤ ℝ) f\nfa : eval α fR = 0\nfR0 : fR ≠ 0\nar : α ∈ ↑(Multiset.toFinset (roots fR))\nζ : ℝ\nz0 : ζ > 0\nU : closedBall α ζ ∩ ↑(Multiset.toFinset (roots fR)) = {α}\nxm : ℝ\nhM : IsMaxOn (fun x => |eval x (↑derivative fR)|) (Icc (α - ζ) (α + ζ)) xm\nz : ℤ\na : ℕ\nhq : ↑z / ↑↑(a + 1) ∈ closedBall α ζ\nhy : eval (↑z / ↑↑(a + 1)) (map (algebraMap ℤ ℝ) f) = 0\n⊢ ↑z / ↑(↑a + 1) ∈ roots fR\n[PROOFSTEP]\nexact (mem_roots fR0).mpr (IsRoot.def.mpr hy)\n[GOAL]\nx : ℝ\nlx : Liouville x\n⊢ Transcendental ℤ x\n[PROOFSTEP]\nrintro\n  ⟨f : ℤ[X], f0, ef0⟩\n      -- Change `aeval x f = 0` to `eval (map _ f) = 0`, who knew.\n[GOAL]\ncase intro.intro\nx : ℝ\nlx : Liouville x\nf : ℤ[X]\nf0 : f ≠ 0\nef0 : ↑(aeval x) f = 0\n⊢ False\n[PROOFSTEP]\nreplace ef0 : (f.map (algebraMap ℤ ℝ)).eval x = 0\n[GOAL]\ncase ef0\nx : ℝ\nlx : Liouville x\nf : ℤ[X]\nf0 : f ≠ 0\nef0 : ↑(aeval x) f = 0\n⊢ eval x (map (algebraMap ℤ ℝ) f) = 0\n[PROOFSTEP]\nrwa [aeval_def, ← eval_map] at ef0 \n[GOAL]\ncase intro.intro\nx : ℝ\nlx : Liouville x\nf : ℤ[X]\nf0 : f ≠ 0\nef0 : eval x (map (algebraMap ℤ ℝ) f) = 0\n⊢ False\n[PROOFSTEP]\nobtain ⟨A, hA, h⟩ :\n  ∃ A : ℝ, 0 < A ∧ ∀ (a : ℤ) (b : ℕ), (1 : ℝ) ≤ ((b : ℝ) + 1) ^ f.natDegree * (|x - a / (b + 1)| * A) :=\n  exists_pos_real_of_irrational_root lx.irrational f0 ef0\n[GOAL]\ncase intro.intro.intro.intro\nx : ℝ\nlx : Liouville x\nf : ℤ[X]\nf0 : f ≠ 0\nef0 : eval x (map (algebraMap ℤ ℝ) f) = 0\nA : ℝ\nhA : 0 < A\nh : ∀ (a : ℤ) (b : ℕ), 1 ≤ (↑b + 1) ^ natDegree f * (|x - ↑a / (↑b + 1)| * A)\n⊢ False\n[PROOFSTEP]\nrcases pow_unbounded_of_one_lt A (lt_add_one 1) with\n  ⟨r, hn⟩\n    -- Use the Liouville property, with exponent `r + deg f`.\n[GOAL]\ncase intro.intro.intro.intro.intro\nx : ℝ\nlx : Liouville x\nf : ℤ[X]\nf0 : f ≠ 0\nef0 : eval x (map (algebraMap ℤ ℝ) f) = 0\nA : ℝ\nhA : 0 < A\nh : ∀ (a : ℤ) (b : ℕ), 1 ≤ (↑b + 1) ^ natDegree f * (|x - ↑a / (↑b + 1)| * A)\nr : ℕ\nhn : A < (1 + 1) ^ r\n⊢ False\n[PROOFSTEP]\nobtain ⟨a, b, b1, -, a1⟩ : ∃ a b : ℤ, 1 < b ∧ x ≠ a / b ∧ |x - a / b| < 1 / (b : ℝ) ^ (r + f.natDegree) :=\n  lx (r + f.natDegree)\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro\nx : ℝ\nlx : Liouville x\nf : ℤ[X]\nf0 : f ≠ 0\nef0 : eval x (map (algebraMap ℤ ℝ) f) = 0\nA : ℝ\nhA : 0 < A\nh : ∀ (a : ℤ) (b : ℕ), 1 ≤ (↑b + 1) ^ natDegree f * (|x - ↑a / (↑b + 1)| * A)\nr : ℕ\nhn : A < (1 + 1) ^ r\na b : ℤ\nb1 : 1 < b\na1 : |x - ↑a / ↑b| < 1 / ↑b ^ (r + natDegree f)\n⊢ False\n[PROOFSTEP]\nhave b0 : (0 : ℝ) < b :=\n  zero_lt_one.trans\n    (by rw [← Int.cast_one]; exact Int.cast_lt.mpr b1)\n      -- Prove that `b ^ f.nat_degree * abs (x - a / b)` is strictly smaller than itself\n        -- recall, this is a proof by contradiction!\n[GOAL]\nx : ℝ\nlx : Liouville x\nf : ℤ[X]\nf0 : f ≠ 0\nef0 : eval x (map (algebraMap ℤ ℝ) f) = 0\nA : ℝ\nhA : 0 < A\nh : ∀ (a : ℤ) (b : ℕ), 1 ≤ (↑b + 1) ^ natDegree f * (|x - ↑a / (↑b + 1)| * A)\nr : ℕ\nhn : A < (1 + 1) ^ r\na b : ℤ\nb1 : 1 < b\na1 : |x - ↑a / ↑b| < 1 / ↑b ^ (r + natDegree f)\n⊢ 1 < ↑b\n[PROOFSTEP]\nrw [← Int.cast_one]\n[GOAL]\nx : ℝ\nlx : Liouville x\nf : ℤ[X]\nf0 : f ≠ 0\nef0 : eval x (map (algebraMap ℤ ℝ) f) = 0\nA : ℝ\nhA : 0 < A\nh : ∀ (a : ℤ) (b : ℕ), 1 ≤ (↑b + 1) ^ natDegree f * (|x - ↑a / (↑b + 1)| * A)\nr : ℕ\nhn : A < (1 + 1) ^ r\na b : ℤ\nb1 : 1 < b\na1 : |x - ↑a / ↑b| < 1 / ↑b ^ (r + natDegree f)\n⊢ ↑1 < ↑b\n[PROOFSTEP]\nexact Int.cast_lt.mpr b1\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro\nx : ℝ\nlx : Liouville x\nf : ℤ[X]\nf0 : f ≠ 0\nef0 : eval x (map (algebraMap ℤ ℝ) f) = 0\nA : ℝ\nhA : 0 < A\nh : ∀ (a : ℤ) (b : ℕ), 1 ≤ (↑b + 1) ^ natDegree f * (|x - ↑a / (↑b + 1)| * A)\nr : ℕ\nhn : A < (1 + 1) ^ r\na b : ℤ\nb1 : 1 < b\na1 : |x - ↑a / ↑b| < 1 / ↑b ^ (r + natDegree f)\nb0 : 0 < ↑b\n⊢ False\n[PROOFSTEP]\nrefine'\n  lt_irrefl ((b : ℝ) ^ f.natDegree * |x - ↑a / ↑b|)\n    _\n      -- clear denominators at `a1`\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro\nx : ℝ\nlx : Liouville x\nf : ℤ[X]\nf0 : f ≠ 0\nef0 : eval x (map (algebraMap ℤ ℝ) f) = 0\nA : ℝ\nhA : 0 < A\nh : ∀ (a : ℤ) (b : ℕ), 1 ≤ (↑b + 1) ^ natDegree f * (|x - ↑a / (↑b + 1)| * A)\nr : ℕ\nhn : A < (1 + 1) ^ r\na b : ℤ\nb1 : 1 < b\na1 : |x - ↑a / ↑b| < 1 / ↑b ^ (r + natDegree f)\nb0 : 0 < ↑b\n⊢ ↑b ^ natDegree f * |x - ↑a / ↑b| < ↑b ^ natDegree f * |x - ↑a / ↑b|\n[PROOFSTEP]\nrw [lt_div_iff' (pow_pos b0 _), pow_add, mul_assoc] at a1 \n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro\nx : ℝ\nlx : Liouville x\nf : ℤ[X]\nf0 : f ≠ 0\nef0 : eval x (map (algebraMap ℤ ℝ) f) = 0\nA : ℝ\nhA : 0 < A\nh : ∀ (a : ℤ) (b : ℕ), 1 ≤ (↑b + 1) ^ natDegree f * (|x - ↑a / (↑b + 1)| * A)\nr : ℕ\nhn : A < (1 + 1) ^ r\na b : ℤ\nb1 : 1 < b\na1 : ↑b ^ r * (↑b ^ natDegree f * |x - ↑a / ↑b|) < 1\nb0 : 0 < ↑b\n⊢ ↑b ^ natDegree f * |x - ↑a / ↑b| < ↑b ^ natDegree f * |x - ↑a / ↑b|\n[PROOFSTEP]\nrefine'\n  (_ : (b : ℝ) ^ f.natDegree * |x - a / b| < 1 / A).trans_le\n    _\n      -- This branch of the proof uses the Liouville condition and the Archimedean property\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.refine'_1\nx : ℝ\nlx : Liouville x\nf : ℤ[X]\nf0 : f ≠ 0\nef0 : eval x (map (algebraMap ℤ ℝ) f) = 0\nA : ℝ\nhA : 0 < A\nh : ∀ (a : ℤ) (b : ℕ), 1 ≤ (↑b + 1) ^ natDegree f * (|x - ↑a / (↑b + 1)| * A)\nr : ℕ\nhn : A < (1 + 1) ^ r\na b : ℤ\nb1 : 1 < b\na1 : ↑b ^ r * (↑b ^ natDegree f * |x - ↑a / ↑b|) < 1\nb0 : 0 < ↑b\n⊢ ↑b ^ natDegree f * |x - ↑a / ↑b| < 1 / A\n[PROOFSTEP]\nrefine' (lt_div_iff' hA).mpr _\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.refine'_1\nx : ℝ\nlx : Liouville x\nf : ℤ[X]\nf0 : f ≠ 0\nef0 : eval x (map (algebraMap ℤ ℝ) f) = 0\nA : ℝ\nhA : 0 < A\nh : ∀ (a : ℤ) (b : ℕ), 1 ≤ (↑b + 1) ^ natDegree f * (|x - ↑a / (↑b + 1)| * A)\nr : ℕ\nhn : A < (1 + 1) ^ r\na b : ℤ\nb1 : 1 < b\na1 : ↑b ^ r * (↑b ^ natDegree f * |x - ↑a / ↑b|) < 1\nb0 : 0 < ↑b\n⊢ A * (↑b ^ natDegree f * |x - ↑a / ↑b|) < 1\n[PROOFSTEP]\nrefine' lt_of_le_of_lt _ a1\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.refine'_1\nx : ℝ\nlx : Liouville x\nf : ℤ[X]\nf0 : f ≠ 0\nef0 : eval x (map (algebraMap ℤ ℝ) f) = 0\nA : ℝ\nhA : 0 < A\nh : ∀ (a : ℤ) (b : ℕ), 1 ≤ (↑b + 1) ^ natDegree f * (|x - ↑a / (↑b + 1)| * A)\nr : ℕ\nhn : A < (1 + 1) ^ r\na b : ℤ\nb1 : 1 < b\na1 : ↑b ^ r * (↑b ^ natDegree f * |x - ↑a / ↑b|) < 1\nb0 : 0 < ↑b\n⊢ A * (↑b ^ natDegree f * |x - ↑a / ↑b|) ≤ ↑b ^ r * (↑b ^ natDegree f * |x - ↑a / ↑b|)\n[PROOFSTEP]\ngcongr\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.refine'_1.h\nx : ℝ\nlx : Liouville x\nf : ℤ[X]\nf0 : f ≠ 0\nef0 : eval x (map (algebraMap ℤ ℝ) f) = 0\nA : ℝ\nhA : 0 < A\nh : ∀ (a : ℤ) (b : ℕ), 1 ≤ (↑b + 1) ^ natDegree f * (|x - ↑a / (↑b + 1)| * A)\nr : ℕ\nhn : A < (1 + 1) ^ r\na b : ℤ\nb1 : 1 < b\na1 : ↑b ^ r * (↑b ^ natDegree f * |x - ↑a / ↑b|) < 1\nb0 : 0 < ↑b\n⊢ A ≤ ↑b ^ r\n[PROOFSTEP]\nrefine' hn.le.trans _\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.refine'_1.h\nx : ℝ\nlx : Liouville x\nf : ℤ[X]\nf0 : f ≠ 0\nef0 : eval x (map (algebraMap ℤ ℝ) f) = 0\nA : ℝ\nhA : 0 < A\nh : ∀ (a : ℤ) (b : ℕ), 1 ≤ (↑b + 1) ^ natDegree f * (|x - ↑a / (↑b + 1)| * A)\nr : ℕ\nhn : A < (1 + 1) ^ r\na b : ℤ\nb1 : 1 < b\na1 : ↑b ^ r * (↑b ^ natDegree f * |x - ↑a / ↑b|) < 1\nb0 : 0 < ↑b\n⊢ (1 + 1) ^ r ≤ ↑b ^ r\n[PROOFSTEP]\nrw [one_add_one_eq_two]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.refine'_1.h\nx : ℝ\nlx : Liouville x\nf : ℤ[X]\nf0 : f ≠ 0\nef0 : eval x (map (algebraMap ℤ ℝ) f) = 0\nA : ℝ\nhA : 0 < A\nh : ∀ (a : ℤ) (b : ℕ), 1 ≤ (↑b + 1) ^ natDegree f * (|x - ↑a / (↑b + 1)| * A)\nr : ℕ\nhn : A < (1 + 1) ^ r\na b : ℤ\nb1 : 1 < b\na1 : ↑b ^ r * (↑b ^ natDegree f * |x - ↑a / ↑b|) < 1\nb0 : 0 < ↑b\n⊢ 2 ^ r ≤ ↑b ^ r\n[PROOFSTEP]\ngcongr\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.refine'_1.h.hab\nx : ℝ\nlx : Liouville x\nf : ℤ[X]\nf0 : f ≠ 0\nef0 : eval x (map (algebraMap ℤ ℝ) f) = 0\nA : ℝ\nhA : 0 < A\nh : ∀ (a : ℤ) (b : ℕ), 1 ≤ (↑b + 1) ^ natDegree f * (|x - ↑a / (↑b + 1)| * A)\nr : ℕ\nhn : A < (1 + 1) ^ r\na b : ℤ\nb1 : 1 < b\na1 : ↑b ^ r * (↑b ^ natDegree f * |x - ↑a / ↑b|) < 1\nb0 : 0 < ↑b\n⊢ 2 ≤ ↑b\n[PROOFSTEP]\nexact\n  Int.cast_two.symm.le.trans\n    (Int.cast_le.mpr (Int.add_one_le_iff.mpr b1))\n      -- this branch of the proof exploits the \"integrality\" of evaluations of polynomials\n        -- at ratios of integers.\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.refine'_2\nx : ℝ\nlx : Liouville x\nf : ℤ[X]\nf0 : f ≠ 0\nef0 : eval x (map (algebraMap ℤ ℝ) f) = 0\nA : ℝ\nhA : 0 < A\nh : ∀ (a : ℤ) (b : ℕ), 1 ≤ (↑b + 1) ^ natDegree f * (|x - ↑a / (↑b + 1)| * A)\nr : ℕ\nhn : A < (1 + 1) ^ r\na b : ℤ\nb1 : 1 < b\na1 : ↑b ^ r * (↑b ^ natDegree f * |x - ↑a / ↑b|) < 1\nb0 : 0 < ↑b\n⊢ 1 / A ≤ ↑b ^ natDegree f * |x - ↑a / ↑b|\n[PROOFSTEP]\nlift b to ℕ using zero_le_one.trans b1.le\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.refine'_2.intro\nx : ℝ\nlx : Liouville x\nf : ℤ[X]\nf0 : f ≠ 0\nef0 : eval x (map (algebraMap ℤ ℝ) f) = 0\nA : ℝ\nhA : 0 < A\nh : ∀ (a : ℤ) (b : ℕ), 1 ≤ (↑b + 1) ^ natDegree f * (|x - ↑a / (↑b + 1)| * A)\nr : ℕ\nhn : A < (1 + 1) ^ r\na : ℤ\nb : ℕ\nb1 : 1 < ↑b\na1 : ↑↑b ^ r * (↑↑b ^ natDegree f * |x - ↑a / ↑↑b|) < 1\nb0 : 0 < ↑↑b\n⊢ 1 / A ≤ ↑↑b ^ natDegree f * |x - ↑a / ↑↑b|\n[PROOFSTEP]\nspecialize h a b.pred\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.refine'_2.intro\nx : ℝ\nlx : Liouville x\nf : ℤ[X]\nf0 : f ≠ 0\nef0 : eval x (map (algebraMap ℤ ℝ) f) = 0\nA : ℝ\nhA : 0 < A\nr : ℕ\nhn : A < (1 + 1) ^ r\na : ℤ\nb : ℕ\nb1 : 1 < ↑b\na1 : ↑↑b ^ r * (↑↑b ^ natDegree f * |x - ↑a / ↑↑b|) < 1\nb0 : 0 < ↑↑b\nh : 1 ≤ (↑(Nat.pred b) + 1) ^ natDegree f * (|x - ↑a / (↑(Nat.pred b) + 1)| * A)\n⊢ 1 / A ≤ ↑↑b ^ natDegree f * |x - ↑a / ↑↑b|\n[PROOFSTEP]\nrwa [← Nat.cast_succ, Nat.succ_pred_eq_of_pos (zero_lt_one.trans _), ← mul_assoc, ← div_le_iff hA] at h \n[GOAL]\nx : ℝ\nlx : Liouville x\nf : ℤ[X]\nf0 : f ≠ 0\nef0 : eval x (map (algebraMap ℤ ℝ) f) = 0\nA : ℝ\nhA : 0 < A\nr : ℕ\nhn : A < (1 + 1) ^ r\na : ℤ\nb : ℕ\nb1 : 1 < ↑b\na1 : ↑↑b ^ r * (↑↑b ^ natDegree f * |x - ↑a / ↑↑b|) < 1\nb0 : 0 < ↑↑b\nh : 1 ≤ ↑(Nat.succ (Nat.pred b)) ^ natDegree f * (|x - ↑a / ↑(Nat.succ (Nat.pred b))| * A)\n⊢ 1 < b\n[PROOFSTEP]\nexact Int.ofNat_lt.mp b1\n", "meta": {"mathlib_filename": "Mathlib.NumberTheory.Liouville.Basic", "llama_tokens": 19024, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8333246035907933, "lm_q2_score": 0.6039318337259584, "lm_q1q2_score": 0.5032712559355451}}
{"text": "[GOAL]\nD : GlueData\nU : Set ↑(GlueData.glued D.toGlueData)\n⊢ IsOpen U ↔ ∀ (i : D.J), IsOpen (↑(GlueData.ι D.toGlueData i) ⁻¹' U)\n[PROOFSTEP]\ndelta CategoryTheory.GlueData.ι\n[GOAL]\nD : GlueData\nU : Set ↑(GlueData.glued D.toGlueData)\n⊢ IsOpen U ↔ ∀ (i : D.J), IsOpen (↑(Multicoequalizer.π (GlueData.diagram D.toGlueData) i) ⁻¹' U)\n[PROOFSTEP]\nsimp_rw [← Multicoequalizer.ι_sigmaπ 𝖣.diagram]\n[GOAL]\nD : GlueData\nU : Set ↑(GlueData.glued D.toGlueData)\n⊢ IsOpen U ↔\n    ∀ (i : D.J),\n      IsOpen\n        (↑(Sigma.ι (GlueData.diagram D.toGlueData).right i ≫\n              Multicoequalizer.sigmaπ (GlueData.diagram D.toGlueData)) ⁻¹'\n          U)\n[PROOFSTEP]\nrw [← (homeoOfIso (Multicoequalizer.isoCoequalizer 𝖣.diagram).symm).isOpen_preimage]\n[GOAL]\nD : GlueData\nU : Set ↑(GlueData.glued D.toGlueData)\n⊢ IsOpen (↑(homeoOfIso (Multicoequalizer.isoCoequalizer (GlueData.diagram D.toGlueData)).symm) ⁻¹' U) ↔\n    ∀ (i : D.J),\n      IsOpen\n        (↑(Sigma.ι (GlueData.diagram D.toGlueData).right i ≫\n              Multicoequalizer.sigmaπ (GlueData.diagram D.toGlueData)) ⁻¹'\n          U)\n[PROOFSTEP]\nrw [coequalizer_isOpen_iff]\n[GOAL]\nD : GlueData\nU : Set ↑(GlueData.glued D.toGlueData)\n⊢ IsOpen\n      (↑(colimit.ι\n            (parallelPair (MultispanIndex.fstSigmaMap (GlueData.diagram D.toGlueData))\n              (MultispanIndex.sndSigmaMap (GlueData.diagram D.toGlueData)))\n            WalkingParallelPair.one) ⁻¹'\n        (↑(homeoOfIso (Multicoequalizer.isoCoequalizer (GlueData.diagram D.toGlueData)).symm) ⁻¹' U)) ↔\n    ∀ (i : D.J),\n      IsOpen\n        (↑(Sigma.ι (GlueData.diagram D.toGlueData).right i ≫\n              Multicoequalizer.sigmaπ (GlueData.diagram D.toGlueData)) ⁻¹'\n          U)\n[PROOFSTEP]\ndsimp only [GlueData.diagram_l, GlueData.diagram_left, GlueData.diagram_r, GlueData.diagram_right, parallelPair_obj_one]\n[GOAL]\nD : GlueData\nU : Set ↑(GlueData.glued D.toGlueData)\n⊢ IsOpen\n      (↑(colimit.ι\n            (parallelPair (MultispanIndex.fstSigmaMap (GlueData.diagram D.toGlueData))\n              (MultispanIndex.sndSigmaMap (GlueData.diagram D.toGlueData)))\n            WalkingParallelPair.one) ⁻¹'\n        (↑(homeoOfIso (Multicoequalizer.isoCoequalizer (GlueData.diagram D.toGlueData)).symm) ⁻¹' U)) ↔\n    ∀ (i : D.J), IsOpen (↑(Sigma.ι D.U i ≫ Multicoequalizer.sigmaπ (GlueData.diagram D.toGlueData)) ⁻¹' U)\n[PROOFSTEP]\nrw [colimit_isOpen_iff.{_, u}]\n  -- porting note: changed `.{u}` to `.{_,u}`.  fun fact: the proof\n                                   -- breaks down if this `rw` is merged with the `rw` above.\n[GOAL]\nD : GlueData\nU : Set ↑(GlueData.glued D.toGlueData)\n⊢ (∀ (j : Discrete D.J),\n      IsOpen\n        (↑(colimit.ι (Discrete.functor D.U) j) ⁻¹'\n          (↑(colimit.ι\n                (parallelPair (MultispanIndex.fstSigmaMap (GlueData.diagram D.toGlueData))\n                  (MultispanIndex.sndSigmaMap (GlueData.diagram D.toGlueData)))\n                WalkingParallelPair.one) ⁻¹'\n            (↑(homeoOfIso (Multicoequalizer.isoCoequalizer (GlueData.diagram D.toGlueData)).symm) ⁻¹' U)))) ↔\n    ∀ (i : D.J), IsOpen (↑(Sigma.ι D.U i ≫ Multicoequalizer.sigmaπ (GlueData.diagram D.toGlueData)) ⁻¹' U)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nD : GlueData\nU : Set ↑(GlueData.glued D.toGlueData)\n⊢ (∀ (j : Discrete D.J),\n      IsOpen\n        (↑(colimit.ι (Discrete.functor D.U) j) ⁻¹'\n          (↑(colimit.ι\n                (parallelPair (MultispanIndex.fstSigmaMap (GlueData.diagram D.toGlueData))\n                  (MultispanIndex.sndSigmaMap (GlueData.diagram D.toGlueData)))\n                WalkingParallelPair.one) ⁻¹'\n            (↑(homeoOfIso (Multicoequalizer.isoCoequalizer (GlueData.diagram D.toGlueData)).symm) ⁻¹' U)))) →\n    ∀ (i : D.J), IsOpen (↑(Sigma.ι D.U i ≫ Multicoequalizer.sigmaπ (GlueData.diagram D.toGlueData)) ⁻¹' U)\n[PROOFSTEP]\nintro h j\n[GOAL]\ncase mp\nD : GlueData\nU : Set ↑(GlueData.glued D.toGlueData)\nh :\n  ∀ (j : Discrete D.J),\n    IsOpen\n      (↑(colimit.ι (Discrete.functor D.U) j) ⁻¹'\n        (↑(colimit.ι\n              (parallelPair (MultispanIndex.fstSigmaMap (GlueData.diagram D.toGlueData))\n                (MultispanIndex.sndSigmaMap (GlueData.diagram D.toGlueData)))\n              WalkingParallelPair.one) ⁻¹'\n          (↑(homeoOfIso (Multicoequalizer.isoCoequalizer (GlueData.diagram D.toGlueData)).symm) ⁻¹' U)))\nj : D.J\n⊢ IsOpen (↑(Sigma.ι D.U j ≫ Multicoequalizer.sigmaπ (GlueData.diagram D.toGlueData)) ⁻¹' U)\n[PROOFSTEP]\nexact h ⟨j⟩\n[GOAL]\ncase mpr\nD : GlueData\nU : Set ↑(GlueData.glued D.toGlueData)\n⊢ (∀ (i : D.J), IsOpen (↑(Sigma.ι D.U i ≫ Multicoequalizer.sigmaπ (GlueData.diagram D.toGlueData)) ⁻¹' U)) →\n    ∀ (j : Discrete D.J),\n      IsOpen\n        (↑(colimit.ι (Discrete.functor D.U) j) ⁻¹'\n          (↑(colimit.ι\n                (parallelPair (MultispanIndex.fstSigmaMap (GlueData.diagram D.toGlueData))\n                  (MultispanIndex.sndSigmaMap (GlueData.diagram D.toGlueData)))\n                WalkingParallelPair.one) ⁻¹'\n            (↑(homeoOfIso (Multicoequalizer.isoCoequalizer (GlueData.diagram D.toGlueData)).symm) ⁻¹' U)))\n[PROOFSTEP]\nintro h j\n[GOAL]\ncase mpr\nD : GlueData\nU : Set ↑(GlueData.glued D.toGlueData)\nh : ∀ (i : D.J), IsOpen (↑(Sigma.ι D.U i ≫ Multicoequalizer.sigmaπ (GlueData.diagram D.toGlueData)) ⁻¹' U)\nj : Discrete D.J\n⊢ IsOpen\n    (↑(colimit.ι (Discrete.functor D.U) j) ⁻¹'\n      (↑(colimit.ι\n            (parallelPair (MultispanIndex.fstSigmaMap (GlueData.diagram D.toGlueData))\n              (MultispanIndex.sndSigmaMap (GlueData.diagram D.toGlueData)))\n            WalkingParallelPair.one) ⁻¹'\n        (↑(homeoOfIso (Multicoequalizer.isoCoequalizer (GlueData.diagram D.toGlueData)).symm) ⁻¹' U)))\n[PROOFSTEP]\ncases j\n[GOAL]\ncase mpr.mk\nD : GlueData\nU : Set ↑(GlueData.glued D.toGlueData)\nh : ∀ (i : D.J), IsOpen (↑(Sigma.ι D.U i ≫ Multicoequalizer.sigmaπ (GlueData.diagram D.toGlueData)) ⁻¹' U)\nas✝ : D.J\n⊢ IsOpen\n    (↑(colimit.ι (Discrete.functor D.U) { as := as✝ }) ⁻¹'\n      (↑(colimit.ι\n            (parallelPair (MultispanIndex.fstSigmaMap (GlueData.diagram D.toGlueData))\n              (MultispanIndex.sndSigmaMap (GlueData.diagram D.toGlueData)))\n            WalkingParallelPair.one) ⁻¹'\n        (↑(homeoOfIso (Multicoequalizer.isoCoequalizer (GlueData.diagram D.toGlueData)).symm) ⁻¹' U)))\n[PROOFSTEP]\napply h\n[GOAL]\nD : GlueData\n⊢ ∀ {x y : (i : D.J) × ↑(GlueData.U D.toGlueData i)}, Rel D x y → Rel D y x\n[PROOFSTEP]\nrintro a b (⟨⟨⟩⟩ | ⟨x, e₁, e₂⟩)\n[GOAL]\ncase inl.refl\nD : GlueData\na : (i : D.J) × ↑(GlueData.U D.toGlueData i)\n⊢ Rel D a a\ncase inr.intro.intro\nD : GlueData\na b : (i : D.J) × ↑(GlueData.U D.toGlueData i)\nx : ↑(GlueData.V D.toGlueData (a.fst, b.fst))\ne₁ : ↑(GlueData.f D.toGlueData a.fst b.fst) x = a.snd\ne₂ : ↑(GlueData.f D.toGlueData b.fst a.fst) (↑(GlueData.t D.toGlueData a.fst b.fst) x) = b.snd\n⊢ Rel D b a\n[PROOFSTEP]\nexacts [Or.inl rfl, Or.inr ⟨D.t _ _ x, by simp [e₁, e₂]⟩]\n[GOAL]\nD : GlueData\na b : (i : D.J) × ↑(GlueData.U D.toGlueData i)\nx : ↑(GlueData.V D.toGlueData (a.fst, b.fst))\ne₁ : ↑(GlueData.f D.toGlueData a.fst b.fst) x = a.snd\ne₂ : ↑(GlueData.f D.toGlueData b.fst a.fst) (↑(GlueData.t D.toGlueData a.fst b.fst) x) = b.snd\n⊢ ↑(GlueData.f D.toGlueData b.fst a.fst) (↑(GlueData.t D.toGlueData a.fst b.fst) x) = b.snd ∧\n    ↑(GlueData.f D.toGlueData a.fst b.fst)\n        (↑(GlueData.t D.toGlueData b.fst a.fst) (↑(GlueData.t D.toGlueData a.fst b.fst) x)) =\n      a.snd\n[PROOFSTEP]\nsimp [e₁, e₂]\n[GOAL]\nD : GlueData\n⊢ ∀ {x y z : (i : D.J) × ↑(GlueData.U D.toGlueData i)}, Rel D x y → Rel D y z → Rel D x z\n[PROOFSTEP]\nrintro ⟨i, a⟩ ⟨j, b⟩ ⟨k, c⟩ (⟨⟨⟩⟩ | ⟨x, e₁, e₂⟩)\n[GOAL]\ncase mk.mk.mk.inl.refl\nD : GlueData\ni : D.J\na : ↑(GlueData.U D.toGlueData i)\nk : D.J\nc : ↑(GlueData.U D.toGlueData k)\n⊢ Rel D { fst := i, snd := a } { fst := k, snd := c } → Rel D { fst := i, snd := a } { fst := k, snd := c }\ncase mk.mk.mk.inr.intro.intro\nD : GlueData\ni : D.J\na : ↑(GlueData.U D.toGlueData i)\nj : D.J\nb : ↑(GlueData.U D.toGlueData j)\nk : D.J\nc : ↑(GlueData.U D.toGlueData k)\nx : ↑(GlueData.V D.toGlueData ({ fst := i, snd := a }.fst, { fst := j, snd := b }.fst))\ne₁ : ↑(GlueData.f D.toGlueData { fst := i, snd := a }.fst { fst := j, snd := b }.fst) x = { fst := i, snd := a }.snd\ne₂ :\n  ↑(GlueData.f D.toGlueData { fst := j, snd := b }.fst { fst := i, snd := a }.fst)\n      (↑(GlueData.t D.toGlueData { fst := i, snd := a }.fst { fst := j, snd := b }.fst) x) =\n    { fst := j, snd := b }.snd\n⊢ Rel D { fst := j, snd := b } { fst := k, snd := c } → Rel D { fst := i, snd := a } { fst := k, snd := c }\n[PROOFSTEP]\nexact id\n[GOAL]\ncase mk.mk.mk.inr.intro.intro\nD : GlueData\ni : D.J\na : ↑(GlueData.U D.toGlueData i)\nj : D.J\nb : ↑(GlueData.U D.toGlueData j)\nk : D.J\nc : ↑(GlueData.U D.toGlueData k)\nx : ↑(GlueData.V D.toGlueData ({ fst := i, snd := a }.fst, { fst := j, snd := b }.fst))\ne₁ : ↑(GlueData.f D.toGlueData { fst := i, snd := a }.fst { fst := j, snd := b }.fst) x = { fst := i, snd := a }.snd\ne₂ :\n  ↑(GlueData.f D.toGlueData { fst := j, snd := b }.fst { fst := i, snd := a }.fst)\n      (↑(GlueData.t D.toGlueData { fst := i, snd := a }.fst { fst := j, snd := b }.fst) x) =\n    { fst := j, snd := b }.snd\n⊢ Rel D { fst := j, snd := b } { fst := k, snd := c } → Rel D { fst := i, snd := a } { fst := k, snd := c }\n[PROOFSTEP]\nrintro (⟨⟨⟩⟩ | ⟨y, e₃, e₄⟩)\n[GOAL]\ncase mk.mk.mk.inr.intro.intro.inl.refl\nD : GlueData\ni : D.J\na : ↑(GlueData.U D.toGlueData i)\nj : D.J\nb : ↑(GlueData.U D.toGlueData j)\nx : ↑(GlueData.V D.toGlueData ({ fst := i, snd := a }.fst, { fst := j, snd := b }.fst))\ne₁ : ↑(GlueData.f D.toGlueData { fst := i, snd := a }.fst { fst := j, snd := b }.fst) x = { fst := i, snd := a }.snd\ne₂ :\n  ↑(GlueData.f D.toGlueData { fst := j, snd := b }.fst { fst := i, snd := a }.fst)\n      (↑(GlueData.t D.toGlueData { fst := i, snd := a }.fst { fst := j, snd := b }.fst) x) =\n    { fst := j, snd := b }.snd\n⊢ Rel D { fst := i, snd := a } { fst := j, snd := b }\ncase mk.mk.mk.inr.intro.intro.inr.intro.intro\nD : GlueData\ni : D.J\na : ↑(GlueData.U D.toGlueData i)\nj : D.J\nb : ↑(GlueData.U D.toGlueData j)\nk : D.J\nc : ↑(GlueData.U D.toGlueData k)\nx : ↑(GlueData.V D.toGlueData ({ fst := i, snd := a }.fst, { fst := j, snd := b }.fst))\ne₁ : ↑(GlueData.f D.toGlueData { fst := i, snd := a }.fst { fst := j, snd := b }.fst) x = { fst := i, snd := a }.snd\ne₂ :\n  ↑(GlueData.f D.toGlueData { fst := j, snd := b }.fst { fst := i, snd := a }.fst)\n      (↑(GlueData.t D.toGlueData { fst := i, snd := a }.fst { fst := j, snd := b }.fst) x) =\n    { fst := j, snd := b }.snd\ny : ↑(GlueData.V D.toGlueData ({ fst := j, snd := b }.fst, { fst := k, snd := c }.fst))\ne₃ : ↑(GlueData.f D.toGlueData { fst := j, snd := b }.fst { fst := k, snd := c }.fst) y = { fst := j, snd := b }.snd\ne₄ :\n  ↑(GlueData.f D.toGlueData { fst := k, snd := c }.fst { fst := j, snd := b }.fst)\n      (↑(GlueData.t D.toGlueData { fst := j, snd := b }.fst { fst := k, snd := c }.fst) y) =\n    { fst := k, snd := c }.snd\n⊢ Rel D { fst := i, snd := a } { fst := k, snd := c }\n[PROOFSTEP]\nexact Or.inr ⟨x, e₁, e₂⟩\n[GOAL]\ncase mk.mk.mk.inr.intro.intro.inr.intro.intro\nD : GlueData\ni : D.J\na : ↑(GlueData.U D.toGlueData i)\nj : D.J\nb : ↑(GlueData.U D.toGlueData j)\nk : D.J\nc : ↑(GlueData.U D.toGlueData k)\nx : ↑(GlueData.V D.toGlueData ({ fst := i, snd := a }.fst, { fst := j, snd := b }.fst))\ne₁ : ↑(GlueData.f D.toGlueData { fst := i, snd := a }.fst { fst := j, snd := b }.fst) x = { fst := i, snd := a }.snd\ne₂ :\n  ↑(GlueData.f D.toGlueData { fst := j, snd := b }.fst { fst := i, snd := a }.fst)\n      (↑(GlueData.t D.toGlueData { fst := i, snd := a }.fst { fst := j, snd := b }.fst) x) =\n    { fst := j, snd := b }.snd\ny : ↑(GlueData.V D.toGlueData ({ fst := j, snd := b }.fst, { fst := k, snd := c }.fst))\ne₃ : ↑(GlueData.f D.toGlueData { fst := j, snd := b }.fst { fst := k, snd := c }.fst) y = { fst := j, snd := b }.snd\ne₄ :\n  ↑(GlueData.f D.toGlueData { fst := k, snd := c }.fst { fst := j, snd := b }.fst)\n      (↑(GlueData.t D.toGlueData { fst := j, snd := b }.fst { fst := k, snd := c }.fst) y) =\n    { fst := k, snd := c }.snd\n⊢ Rel D { fst := i, snd := a } { fst := k, snd := c }\n[PROOFSTEP]\nlet z := (pullbackIsoProdSubtype (D.f j i) (D.f j k)).inv ⟨⟨_, _⟩, e₂.trans e₃.symm⟩\n[GOAL]\ncase mk.mk.mk.inr.intro.intro.inr.intro.intro\nD : GlueData\ni : D.J\na : ↑(GlueData.U D.toGlueData i)\nj : D.J\nb : ↑(GlueData.U D.toGlueData j)\nk : D.J\nc : ↑(GlueData.U D.toGlueData k)\nx : ↑(GlueData.V D.toGlueData ({ fst := i, snd := a }.fst, { fst := j, snd := b }.fst))\ne₁ : ↑(GlueData.f D.toGlueData { fst := i, snd := a }.fst { fst := j, snd := b }.fst) x = { fst := i, snd := a }.snd\ne₂ :\n  ↑(GlueData.f D.toGlueData { fst := j, snd := b }.fst { fst := i, snd := a }.fst)\n      (↑(GlueData.t D.toGlueData { fst := i, snd := a }.fst { fst := j, snd := b }.fst) x) =\n    { fst := j, snd := b }.snd\ny : ↑(GlueData.V D.toGlueData ({ fst := j, snd := b }.fst, { fst := k, snd := c }.fst))\ne₃ : ↑(GlueData.f D.toGlueData { fst := j, snd := b }.fst { fst := k, snd := c }.fst) y = { fst := j, snd := b }.snd\ne₄ :\n  ↑(GlueData.f D.toGlueData { fst := k, snd := c }.fst { fst := j, snd := b }.fst)\n      (↑(GlueData.t D.toGlueData { fst := j, snd := b }.fst { fst := k, snd := c }.fst) y) =\n    { fst := k, snd := c }.snd\nz : (fun x => (forget TopCat).obj (pullback (GlueData.f D.toGlueData j i) (GlueData.f D.toGlueData j k)))\n  { val := (↑(GlueData.t D.toGlueData { fst := i, snd := a }.fst { fst := j, snd := b }.fst) x, y),\n    property :=\n      (_ :\n        ↑(GlueData.f D.toGlueData { fst := j, snd := b }.fst { fst := i, snd := a }.fst)\n            (↑(GlueData.t D.toGlueData { fst := i, snd := a }.fst { fst := j, snd := b }.fst) x) =\n          ↑(GlueData.f D.toGlueData j k)\n            (↑(GlueData.t D.toGlueData { fst := i, snd := a }.fst { fst := j, snd := b }.fst) x, y).snd) } :=\n  ↑(pullbackIsoProdSubtype (GlueData.f D.toGlueData j i) (GlueData.f D.toGlueData j k)).inv\n    { val := (↑(GlueData.t D.toGlueData { fst := i, snd := a }.fst { fst := j, snd := b }.fst) x, y),\n      property :=\n        (_ :\n          ↑(GlueData.f D.toGlueData { fst := j, snd := b }.fst { fst := i, snd := a }.fst)\n              (↑(GlueData.t D.toGlueData { fst := i, snd := a }.fst { fst := j, snd := b }.fst) x) =\n            ↑(GlueData.f D.toGlueData j k)\n              (↑(GlueData.t D.toGlueData { fst := i, snd := a }.fst { fst := j, snd := b }.fst) x, y).snd) }\n⊢ Rel D { fst := i, snd := a } { fst := k, snd := c }\n[PROOFSTEP]\nhave eq₁ : (D.t j i) ((pullback.fst : _  /-(D.f j k)-/ ⟶ D.V (j, i)) z) = x := by simp\n[GOAL]\nD : GlueData\ni : D.J\na : ↑(GlueData.U D.toGlueData i)\nj : D.J\nb : ↑(GlueData.U D.toGlueData j)\nk : D.J\nc : ↑(GlueData.U D.toGlueData k)\nx : ↑(GlueData.V D.toGlueData ({ fst := i, snd := a }.fst, { fst := j, snd := b }.fst))\ne₁ : ↑(GlueData.f D.toGlueData { fst := i, snd := a }.fst { fst := j, snd := b }.fst) x = { fst := i, snd := a }.snd\ne₂ :\n  ↑(GlueData.f D.toGlueData { fst := j, snd := b }.fst { fst := i, snd := a }.fst)\n      (↑(GlueData.t D.toGlueData { fst := i, snd := a }.fst { fst := j, snd := b }.fst) x) =\n    { fst := j, snd := b }.snd\ny : ↑(GlueData.V D.toGlueData ({ fst := j, snd := b }.fst, { fst := k, snd := c }.fst))\ne₃ : ↑(GlueData.f D.toGlueData { fst := j, snd := b }.fst { fst := k, snd := c }.fst) y = { fst := j, snd := b }.snd\ne₄ :\n  ↑(GlueData.f D.toGlueData { fst := k, snd := c }.fst { fst := j, snd := b }.fst)\n      (↑(GlueData.t D.toGlueData { fst := j, snd := b }.fst { fst := k, snd := c }.fst) y) =\n    { fst := k, snd := c }.snd\nz : (fun x => (forget TopCat).obj (pullback (GlueData.f D.toGlueData j i) (GlueData.f D.toGlueData j k)))\n  { val := (↑(GlueData.t D.toGlueData { fst := i, snd := a }.fst { fst := j, snd := b }.fst) x, y),\n    property :=\n      (_ :\n        ↑(GlueData.f D.toGlueData { fst := j, snd := b }.fst { fst := i, snd := a }.fst)\n            (↑(GlueData.t D.toGlueData { fst := i, snd := a }.fst { fst := j, snd := b }.fst) x) =\n          ↑(GlueData.f D.toGlueData j k)\n            (↑(GlueData.t D.toGlueData { fst := i, snd := a }.fst { fst := j, snd := b }.fst) x, y).snd) } :=\n  ↑(pullbackIsoProdSubtype (GlueData.f D.toGlueData j i) (GlueData.f D.toGlueData j k)).inv\n    { val := (↑(GlueData.t D.toGlueData { fst := i, snd := a }.fst { fst := j, snd := b }.fst) x, y),\n      property :=\n        (_ :\n          ↑(GlueData.f D.toGlueData { fst := j, snd := b }.fst { fst := i, snd := a }.fst)\n              (↑(GlueData.t D.toGlueData { fst := i, snd := a }.fst { fst := j, snd := b }.fst) x) =\n            ↑(GlueData.f D.toGlueData j k)\n              (↑(GlueData.t D.toGlueData { fst := i, snd := a }.fst { fst := j, snd := b }.fst) x, y).snd) }\n⊢ ↑(GlueData.t D.toGlueData j i) (↑pullback.fst z) = x\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mk.mk.mk.inr.intro.intro.inr.intro.intro\nD : GlueData\ni : D.J\na : ↑(GlueData.U D.toGlueData i)\nj : D.J\nb : ↑(GlueData.U D.toGlueData j)\nk : D.J\nc : ↑(GlueData.U D.toGlueData k)\nx : ↑(GlueData.V D.toGlueData ({ fst := i, snd := a }.fst, { fst := j, snd := b }.fst))\ne₁ : ↑(GlueData.f D.toGlueData { fst := i, snd := a }.fst { fst := j, snd := b }.fst) x = { fst := i, snd := a }.snd\ne₂ :\n  ↑(GlueData.f D.toGlueData { fst := j, snd := b }.fst { fst := i, snd := a }.fst)\n      (↑(GlueData.t D.toGlueData { fst := i, snd := a }.fst { fst := j, snd := b }.fst) x) =\n    { fst := j, snd := b }.snd\ny : ↑(GlueData.V D.toGlueData ({ fst := j, snd := b }.fst, { fst := k, snd := c }.fst))\ne₃ : ↑(GlueData.f D.toGlueData { fst := j, snd := b }.fst { fst := k, snd := c }.fst) y = { fst := j, snd := b }.snd\ne₄ :\n  ↑(GlueData.f D.toGlueData { fst := k, snd := c }.fst { fst := j, snd := b }.fst)\n      (↑(GlueData.t D.toGlueData { fst := j, snd := b }.fst { fst := k, snd := c }.fst) y) =\n    { fst := k, snd := c }.snd\nz : (fun x => (forget TopCat).obj (pullback (GlueData.f D.toGlueData j i) (GlueData.f D.toGlueData j k)))\n  { val := (↑(GlueData.t D.toGlueData { fst := i, snd := a }.fst { fst := j, snd := b }.fst) x, y),\n    property :=\n      (_ :\n        ↑(GlueData.f D.toGlueData { fst := j, snd := b }.fst { fst := i, snd := a }.fst)\n            (↑(GlueData.t D.toGlueData { fst := i, snd := a }.fst { fst := j, snd := b }.fst) x) =\n          ↑(GlueData.f D.toGlueData j k)\n            (↑(GlueData.t D.toGlueData { fst := i, snd := a }.fst { fst := j, snd := b }.fst) x, y).snd) } :=\n  ↑(pullbackIsoProdSubtype (GlueData.f D.toGlueData j i) (GlueData.f D.toGlueData j k)).inv\n    { val := (↑(GlueData.t D.toGlueData { fst := i, snd := a }.fst { fst := j, snd := b }.fst) x, y),\n      property :=\n        (_ :\n          ↑(GlueData.f D.toGlueData { fst := j, snd := b }.fst { fst := i, snd := a }.fst)\n              (↑(GlueData.t D.toGlueData { fst := i, snd := a }.fst { fst := j, snd := b }.fst) x) =\n            ↑(GlueData.f D.toGlueData j k)\n              (↑(GlueData.t D.toGlueData { fst := i, snd := a }.fst { fst := j, snd := b }.fst) x, y).snd) }\neq₁ : ↑(GlueData.t D.toGlueData j i) (↑pullback.fst z) = x\n⊢ Rel D { fst := i, snd := a } { fst := k, snd := c }\n[PROOFSTEP]\nhave eq₂ : (pullback.snd : _ ⟶ D.V _) z = y := pullbackIsoProdSubtype_inv_snd_apply _ _ _\n[GOAL]\ncase mk.mk.mk.inr.intro.intro.inr.intro.intro\nD : GlueData\ni : D.J\na : ↑(GlueData.U D.toGlueData i)\nj : D.J\nb : ↑(GlueData.U D.toGlueData j)\nk : D.J\nc : ↑(GlueData.U D.toGlueData k)\nx : ↑(GlueData.V D.toGlueData ({ fst := i, snd := a }.fst, { fst := j, snd := b }.fst))\ne₁ : ↑(GlueData.f D.toGlueData { fst := i, snd := a }.fst { fst := j, snd := b }.fst) x = { fst := i, snd := a }.snd\ne₂ :\n  ↑(GlueData.f D.toGlueData { fst := j, snd := b }.fst { fst := i, snd := a }.fst)\n      (↑(GlueData.t D.toGlueData { fst := i, snd := a }.fst { fst := j, snd := b }.fst) x) =\n    { fst := j, snd := b }.snd\ny : ↑(GlueData.V D.toGlueData ({ fst := j, snd := b }.fst, { fst := k, snd := c }.fst))\ne₃ : ↑(GlueData.f D.toGlueData { fst := j, snd := b }.fst { fst := k, snd := c }.fst) y = { fst := j, snd := b }.snd\ne₄ :\n  ↑(GlueData.f D.toGlueData { fst := k, snd := c }.fst { fst := j, snd := b }.fst)\n      (↑(GlueData.t D.toGlueData { fst := j, snd := b }.fst { fst := k, snd := c }.fst) y) =\n    { fst := k, snd := c }.snd\nz : (fun x => (forget TopCat).obj (pullback (GlueData.f D.toGlueData j i) (GlueData.f D.toGlueData j k)))\n  { val := (↑(GlueData.t D.toGlueData { fst := i, snd := a }.fst { fst := j, snd := b }.fst) x, y),\n    property :=\n      (_ :\n        ↑(GlueData.f D.toGlueData { fst := j, snd := b }.fst { fst := i, snd := a }.fst)\n            (↑(GlueData.t D.toGlueData { fst := i, snd := a }.fst { fst := j, snd := b }.fst) x) =\n          ↑(GlueData.f D.toGlueData j k)\n            (↑(GlueData.t D.toGlueData { fst := i, snd := a }.fst { fst := j, snd := b }.fst) x, y).snd) } :=\n  ↑(pullbackIsoProdSubtype (GlueData.f D.toGlueData j i) (GlueData.f D.toGlueData j k)).inv\n    { val := (↑(GlueData.t D.toGlueData { fst := i, snd := a }.fst { fst := j, snd := b }.fst) x, y),\n      property :=\n        (_ :\n          ↑(GlueData.f D.toGlueData { fst := j, snd := b }.fst { fst := i, snd := a }.fst)\n              (↑(GlueData.t D.toGlueData { fst := i, snd := a }.fst { fst := j, snd := b }.fst) x) =\n            ↑(GlueData.f D.toGlueData j k)\n              (↑(GlueData.t D.toGlueData { fst := i, snd := a }.fst { fst := j, snd := b }.fst) x, y).snd) }\neq₁ : ↑(GlueData.t D.toGlueData j i) (↑pullback.fst z) = x\neq₂ : ↑pullback.snd z = y\n⊢ Rel D { fst := i, snd := a } { fst := k, snd := c }\n[PROOFSTEP]\nclear_value z\n[GOAL]\ncase mk.mk.mk.inr.intro.intro.inr.intro.intro\nD : GlueData\ni : D.J\na : ↑(GlueData.U D.toGlueData i)\nj : D.J\nb : ↑(GlueData.U D.toGlueData j)\nk : D.J\nc : ↑(GlueData.U D.toGlueData k)\nx : ↑(GlueData.V D.toGlueData ({ fst := i, snd := a }.fst, { fst := j, snd := b }.fst))\ne₁ : ↑(GlueData.f D.toGlueData { fst := i, snd := a }.fst { fst := j, snd := b }.fst) x = { fst := i, snd := a }.snd\ne₂ :\n  ↑(GlueData.f D.toGlueData { fst := j, snd := b }.fst { fst := i, snd := a }.fst)\n      (↑(GlueData.t D.toGlueData { fst := i, snd := a }.fst { fst := j, snd := b }.fst) x) =\n    { fst := j, snd := b }.snd\ny : ↑(GlueData.V D.toGlueData ({ fst := j, snd := b }.fst, { fst := k, snd := c }.fst))\ne₃ : ↑(GlueData.f D.toGlueData { fst := j, snd := b }.fst { fst := k, snd := c }.fst) y = { fst := j, snd := b }.snd\ne₄ :\n  ↑(GlueData.f D.toGlueData { fst := k, snd := c }.fst { fst := j, snd := b }.fst)\n      (↑(GlueData.t D.toGlueData { fst := j, snd := b }.fst { fst := k, snd := c }.fst) y) =\n    { fst := k, snd := c }.snd\nz : (forget TopCat).obj (pullback (GlueData.f D.toGlueData j i) (GlueData.f D.toGlueData j k))\neq₁ : ↑(GlueData.t D.toGlueData j i) (↑pullback.fst z) = x\neq₂ : ↑pullback.snd z = y\n⊢ Rel D { fst := i, snd := a } { fst := k, snd := c }\n[PROOFSTEP]\nright\n[GOAL]\ncase mk.mk.mk.inr.intro.intro.inr.intro.intro.h\nD : GlueData\ni : D.J\na : ↑(GlueData.U D.toGlueData i)\nj : D.J\nb : ↑(GlueData.U D.toGlueData j)\nk : D.J\nc : ↑(GlueData.U D.toGlueData k)\nx : ↑(GlueData.V D.toGlueData ({ fst := i, snd := a }.fst, { fst := j, snd := b }.fst))\ne₁ : ↑(GlueData.f D.toGlueData { fst := i, snd := a }.fst { fst := j, snd := b }.fst) x = { fst := i, snd := a }.snd\ne₂ :\n  ↑(GlueData.f D.toGlueData { fst := j, snd := b }.fst { fst := i, snd := a }.fst)\n      (↑(GlueData.t D.toGlueData { fst := i, snd := a }.fst { fst := j, snd := b }.fst) x) =\n    { fst := j, snd := b }.snd\ny : ↑(GlueData.V D.toGlueData ({ fst := j, snd := b }.fst, { fst := k, snd := c }.fst))\ne₃ : ↑(GlueData.f D.toGlueData { fst := j, snd := b }.fst { fst := k, snd := c }.fst) y = { fst := j, snd := b }.snd\ne₄ :\n  ↑(GlueData.f D.toGlueData { fst := k, snd := c }.fst { fst := j, snd := b }.fst)\n      (↑(GlueData.t D.toGlueData { fst := j, snd := b }.fst { fst := k, snd := c }.fst) y) =\n    { fst := k, snd := c }.snd\nz : (forget TopCat).obj (pullback (GlueData.f D.toGlueData j i) (GlueData.f D.toGlueData j k))\neq₁ : ↑(GlueData.t D.toGlueData j i) (↑pullback.fst z) = x\neq₂ : ↑pullback.snd z = y\n⊢ ∃ x,\n    ↑(GlueData.f D.toGlueData { fst := i, snd := a }.fst { fst := k, snd := c }.fst) x = { fst := i, snd := a }.snd ∧\n      ↑(GlueData.f D.toGlueData { fst := k, snd := c }.fst { fst := i, snd := a }.fst)\n          (↑(GlueData.t D.toGlueData { fst := i, snd := a }.fst { fst := k, snd := c }.fst) x) =\n        { fst := k, snd := c }.snd\n[PROOFSTEP]\nuse(pullback.fst : _ ⟶ D.V (i, k)) (D.t' _ _ _ z)\n[GOAL]\ncase h\nD : GlueData\ni : D.J\na : ↑(GlueData.U D.toGlueData i)\nj : D.J\nb : ↑(GlueData.U D.toGlueData j)\nk : D.J\nc : ↑(GlueData.U D.toGlueData k)\nx : ↑(GlueData.V D.toGlueData ({ fst := i, snd := a }.fst, { fst := j, snd := b }.fst))\ne₁ : ↑(GlueData.f D.toGlueData { fst := i, snd := a }.fst { fst := j, snd := b }.fst) x = { fst := i, snd := a }.snd\ne₂ :\n  ↑(GlueData.f D.toGlueData { fst := j, snd := b }.fst { fst := i, snd := a }.fst)\n      (↑(GlueData.t D.toGlueData { fst := i, snd := a }.fst { fst := j, snd := b }.fst) x) =\n    { fst := j, snd := b }.snd\ny : ↑(GlueData.V D.toGlueData ({ fst := j, snd := b }.fst, { fst := k, snd := c }.fst))\ne₃ : ↑(GlueData.f D.toGlueData { fst := j, snd := b }.fst { fst := k, snd := c }.fst) y = { fst := j, snd := b }.snd\ne₄ :\n  ↑(GlueData.f D.toGlueData { fst := k, snd := c }.fst { fst := j, snd := b }.fst)\n      (↑(GlueData.t D.toGlueData { fst := j, snd := b }.fst { fst := k, snd := c }.fst) y) =\n    { fst := k, snd := c }.snd\nz : (forget TopCat).obj (pullback (GlueData.f D.toGlueData j i) (GlueData.f D.toGlueData j k))\neq₁ : ↑(GlueData.t D.toGlueData j i) (↑pullback.fst z) = x\neq₂ : ↑pullback.snd z = y\n⊢ ↑(GlueData.f D.toGlueData { fst := i, snd := a }.fst { fst := k, snd := c }.fst)\n        (↑pullback.fst (↑(GlueData.t' D.toGlueData j i k) z)) =\n      { fst := i, snd := a }.snd ∧\n    ↑(GlueData.f D.toGlueData { fst := k, snd := c }.fst { fst := i, snd := a }.fst)\n        (↑(GlueData.t D.toGlueData { fst := i, snd := a }.fst { fst := k, snd := c }.fst)\n          (↑pullback.fst (↑(GlueData.t' D.toGlueData j i k) z))) =\n      { fst := k, snd := c }.snd\n[PROOFSTEP]\ndsimp only at *\n[GOAL]\ncase h\nD : GlueData\ni : D.J\na : ↑(GlueData.U D.toGlueData i)\nj : D.J\nb : ↑(GlueData.U D.toGlueData j)\nk : D.J\nc : ↑(GlueData.U D.toGlueData k)\nx : ↑(GlueData.V D.toGlueData ({ fst := i, snd := a }.fst, { fst := j, snd := b }.fst))\ne₁ : ↑(GlueData.f D.toGlueData i j) x = a\ne₂ : ↑(GlueData.f D.toGlueData j i) (↑(GlueData.t D.toGlueData i j) x) = b\ny : ↑(GlueData.V D.toGlueData ({ fst := j, snd := b }.fst, { fst := k, snd := c }.fst))\ne₃ : ↑(GlueData.f D.toGlueData j k) y = b\ne₄ : ↑(GlueData.f D.toGlueData k j) (↑(GlueData.t D.toGlueData j k) y) = c\nz : (forget TopCat).obj (pullback (GlueData.f D.toGlueData j i) (GlueData.f D.toGlueData j k))\neq₁ : ↑(GlueData.t D.toGlueData j i) (↑pullback.fst z) = x\neq₂ : ↑pullback.snd z = y\n⊢ ↑(GlueData.f D.toGlueData i k) (↑pullback.fst (↑(GlueData.t' D.toGlueData j i k) z)) = a ∧\n    ↑(GlueData.f D.toGlueData k i)\n        (↑(GlueData.t D.toGlueData i k) (↑pullback.fst (↑(GlueData.t' D.toGlueData j i k) z))) =\n      c\n[PROOFSTEP]\nsubsts eq₁ eq₂ e₁ e₃ e₄\n[GOAL]\ncase h\nD : GlueData\ni j k : D.J\nz : (forget TopCat).obj (pullback (GlueData.f D.toGlueData j i) (GlueData.f D.toGlueData j k))\ne₂ :\n  ↑(GlueData.f D.toGlueData j i) (↑(GlueData.t D.toGlueData i j) (↑(GlueData.t D.toGlueData j i) (↑pullback.fst z))) =\n    ↑(GlueData.f D.toGlueData j k) (↑pullback.snd z)\n⊢ ↑(GlueData.f D.toGlueData i k) (↑pullback.fst (↑(GlueData.t' D.toGlueData j i k) z)) =\n      ↑(GlueData.f D.toGlueData i j) (↑(GlueData.t D.toGlueData j i) (↑pullback.fst z)) ∧\n    ↑(GlueData.f D.toGlueData k i)\n        (↑(GlueData.t D.toGlueData i k) (↑pullback.fst (↑(GlueData.t' D.toGlueData j i k) z))) =\n      ↑(GlueData.f D.toGlueData k j) (↑(GlueData.t D.toGlueData j k) (↑pullback.snd z))\n[PROOFSTEP]\nhave h₁ : D.t' j i k ≫ pullback.fst ≫ D.f i k = pullback.fst ≫ D.t j i ≫ D.f i j := by rw [← 𝖣.t_fac_assoc]; congr 1;\n  exact pullback.condition\n[GOAL]\nD : GlueData\ni j k : D.J\nz : (forget TopCat).obj (pullback (GlueData.f D.toGlueData j i) (GlueData.f D.toGlueData j k))\ne₂ :\n  ↑(GlueData.f D.toGlueData j i) (↑(GlueData.t D.toGlueData i j) (↑(GlueData.t D.toGlueData j i) (↑pullback.fst z))) =\n    ↑(GlueData.f D.toGlueData j k) (↑pullback.snd z)\n⊢ GlueData.t' D.toGlueData j i k ≫ pullback.fst ≫ GlueData.f D.toGlueData i k =\n    pullback.fst ≫ GlueData.t D.toGlueData j i ≫ GlueData.f D.toGlueData i j\n[PROOFSTEP]\nrw [← 𝖣.t_fac_assoc]\n[GOAL]\nD : GlueData\ni j k : D.J\nz : (forget TopCat).obj (pullback (GlueData.f D.toGlueData j i) (GlueData.f D.toGlueData j k))\ne₂ :\n  ↑(GlueData.f D.toGlueData j i) (↑(GlueData.t D.toGlueData i j) (↑(GlueData.t D.toGlueData j i) (↑pullback.fst z))) =\n    ↑(GlueData.f D.toGlueData j k) (↑pullback.snd z)\n⊢ GlueData.t' D.toGlueData j i k ≫ pullback.fst ≫ GlueData.f D.toGlueData i k =\n    GlueData.t' D.toGlueData j i k ≫ pullback.snd ≫ GlueData.f D.toGlueData i j\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_a\nD : GlueData\ni j k : D.J\nz : (forget TopCat).obj (pullback (GlueData.f D.toGlueData j i) (GlueData.f D.toGlueData j k))\ne₂ :\n  ↑(GlueData.f D.toGlueData j i) (↑(GlueData.t D.toGlueData i j) (↑(GlueData.t D.toGlueData j i) (↑pullback.fst z))) =\n    ↑(GlueData.f D.toGlueData j k) (↑pullback.snd z)\n⊢ pullback.fst ≫ GlueData.f D.toGlueData i k = pullback.snd ≫ GlueData.f D.toGlueData i j\n[PROOFSTEP]\nexact pullback.condition\n[GOAL]\ncase h\nD : GlueData\ni j k : D.J\nz : (forget TopCat).obj (pullback (GlueData.f D.toGlueData j i) (GlueData.f D.toGlueData j k))\ne₂ :\n  ↑(GlueData.f D.toGlueData j i) (↑(GlueData.t D.toGlueData i j) (↑(GlueData.t D.toGlueData j i) (↑pullback.fst z))) =\n    ↑(GlueData.f D.toGlueData j k) (↑pullback.snd z)\nh₁ :\n  GlueData.t' D.toGlueData j i k ≫ pullback.fst ≫ GlueData.f D.toGlueData i k =\n    pullback.fst ≫ GlueData.t D.toGlueData j i ≫ GlueData.f D.toGlueData i j\n⊢ ↑(GlueData.f D.toGlueData i k) (↑pullback.fst (↑(GlueData.t' D.toGlueData j i k) z)) =\n      ↑(GlueData.f D.toGlueData i j) (↑(GlueData.t D.toGlueData j i) (↑pullback.fst z)) ∧\n    ↑(GlueData.f D.toGlueData k i)\n        (↑(GlueData.t D.toGlueData i k) (↑pullback.fst (↑(GlueData.t' D.toGlueData j i k) z))) =\n      ↑(GlueData.f D.toGlueData k j) (↑(GlueData.t D.toGlueData j k) (↑pullback.snd z))\n[PROOFSTEP]\nhave h₂ : D.t' j i k ≫ pullback.fst ≫ D.t i k ≫ D.f k i = pullback.snd ≫ D.t j k ≫ D.f k j :=\n  by\n  rw [← 𝖣.t_fac_assoc]\n  apply @Epi.left_cancellation _ _ _ _ (D.t' k j i)\n  rw [𝖣.cocycle_assoc, 𝖣.t_fac_assoc, 𝖣.t_inv_assoc]\n  exact pullback.condition.symm\n[GOAL]\nD : GlueData\ni j k : D.J\nz : (forget TopCat).obj (pullback (GlueData.f D.toGlueData j i) (GlueData.f D.toGlueData j k))\ne₂ :\n  ↑(GlueData.f D.toGlueData j i) (↑(GlueData.t D.toGlueData i j) (↑(GlueData.t D.toGlueData j i) (↑pullback.fst z))) =\n    ↑(GlueData.f D.toGlueData j k) (↑pullback.snd z)\nh₁ :\n  GlueData.t' D.toGlueData j i k ≫ pullback.fst ≫ GlueData.f D.toGlueData i k =\n    pullback.fst ≫ GlueData.t D.toGlueData j i ≫ GlueData.f D.toGlueData i j\n⊢ GlueData.t' D.toGlueData j i k ≫ pullback.fst ≫ GlueData.t D.toGlueData i k ≫ GlueData.f D.toGlueData k i =\n    pullback.snd ≫ GlueData.t D.toGlueData j k ≫ GlueData.f D.toGlueData k j\n[PROOFSTEP]\nrw [← 𝖣.t_fac_assoc]\n[GOAL]\nD : GlueData\ni j k : D.J\nz : (forget TopCat).obj (pullback (GlueData.f D.toGlueData j i) (GlueData.f D.toGlueData j k))\ne₂ :\n  ↑(GlueData.f D.toGlueData j i) (↑(GlueData.t D.toGlueData i j) (↑(GlueData.t D.toGlueData j i) (↑pullback.fst z))) =\n    ↑(GlueData.f D.toGlueData j k) (↑pullback.snd z)\nh₁ :\n  GlueData.t' D.toGlueData j i k ≫ pullback.fst ≫ GlueData.f D.toGlueData i k =\n    pullback.fst ≫ GlueData.t D.toGlueData j i ≫ GlueData.f D.toGlueData i j\n⊢ GlueData.t' D.toGlueData j i k ≫ GlueData.t' D.toGlueData i k j ≫ pullback.snd ≫ GlueData.f D.toGlueData k i =\n    pullback.snd ≫ GlueData.t D.toGlueData j k ≫ GlueData.f D.toGlueData k j\n[PROOFSTEP]\napply @Epi.left_cancellation _ _ _ _ (D.t' k j i)\n[GOAL]\ncase a\nD : GlueData\ni j k : D.J\nz : (forget TopCat).obj (pullback (GlueData.f D.toGlueData j i) (GlueData.f D.toGlueData j k))\ne₂ :\n  ↑(GlueData.f D.toGlueData j i) (↑(GlueData.t D.toGlueData i j) (↑(GlueData.t D.toGlueData j i) (↑pullback.fst z))) =\n    ↑(GlueData.f D.toGlueData j k) (↑pullback.snd z)\nh₁ :\n  GlueData.t' D.toGlueData j i k ≫ pullback.fst ≫ GlueData.f D.toGlueData i k =\n    pullback.fst ≫ GlueData.t D.toGlueData j i ≫ GlueData.f D.toGlueData i j\n⊢ GlueData.t' D.toGlueData k j i ≫\n      GlueData.t' D.toGlueData j i k ≫ GlueData.t' D.toGlueData i k j ≫ pullback.snd ≫ GlueData.f D.toGlueData k i =\n    GlueData.t' D.toGlueData k j i ≫ pullback.snd ≫ GlueData.t D.toGlueData j k ≫ GlueData.f D.toGlueData k j\n[PROOFSTEP]\nrw [𝖣.cocycle_assoc, 𝖣.t_fac_assoc, 𝖣.t_inv_assoc]\n[GOAL]\ncase a\nD : GlueData\ni j k : D.J\nz : (forget TopCat).obj (pullback (GlueData.f D.toGlueData j i) (GlueData.f D.toGlueData j k))\ne₂ :\n  ↑(GlueData.f D.toGlueData j i) (↑(GlueData.t D.toGlueData i j) (↑(GlueData.t D.toGlueData j i) (↑pullback.fst z))) =\n    ↑(GlueData.f D.toGlueData j k) (↑pullback.snd z)\nh₁ :\n  GlueData.t' D.toGlueData j i k ≫ pullback.fst ≫ GlueData.f D.toGlueData i k =\n    pullback.fst ≫ GlueData.t D.toGlueData j i ≫ GlueData.f D.toGlueData i j\n⊢ pullback.snd ≫ GlueData.f D.toGlueData k i = pullback.fst ≫ GlueData.f D.toGlueData k j\n[PROOFSTEP]\nexact pullback.condition.symm\n[GOAL]\ncase h\nD : GlueData\ni j k : D.J\nz : (forget TopCat).obj (pullback (GlueData.f D.toGlueData j i) (GlueData.f D.toGlueData j k))\ne₂ :\n  ↑(GlueData.f D.toGlueData j i) (↑(GlueData.t D.toGlueData i j) (↑(GlueData.t D.toGlueData j i) (↑pullback.fst z))) =\n    ↑(GlueData.f D.toGlueData j k) (↑pullback.snd z)\nh₁ :\n  GlueData.t' D.toGlueData j i k ≫ pullback.fst ≫ GlueData.f D.toGlueData i k =\n    pullback.fst ≫ GlueData.t D.toGlueData j i ≫ GlueData.f D.toGlueData i j\nh₂ :\n  GlueData.t' D.toGlueData j i k ≫ pullback.fst ≫ GlueData.t D.toGlueData i k ≫ GlueData.f D.toGlueData k i =\n    pullback.snd ≫ GlueData.t D.toGlueData j k ≫ GlueData.f D.toGlueData k j\n⊢ ↑(GlueData.f D.toGlueData i k) (↑pullback.fst (↑(GlueData.t' D.toGlueData j i k) z)) =\n      ↑(GlueData.f D.toGlueData i j) (↑(GlueData.t D.toGlueData j i) (↑pullback.fst z)) ∧\n    ↑(GlueData.f D.toGlueData k i)\n        (↑(GlueData.t D.toGlueData i k) (↑pullback.fst (↑(GlueData.t' D.toGlueData j i k) z))) =\n      ↑(GlueData.f D.toGlueData k j) (↑(GlueData.t D.toGlueData j k) (↑pullback.snd z))\n[PROOFSTEP]\nexact ⟨ContinuousMap.congr_fun h₁ z, ContinuousMap.congr_fun h₂ z⟩\n[GOAL]\nD : GlueData\nx y : ↑(∐ D.U)\nh : ↑(GlueData.π D.toGlueData) x = ↑(GlueData.π D.toGlueData) y\n⊢ EqvGen\n    (Types.CoequalizerRel ↑(MultispanIndex.fstSigmaMap (GlueData.diagram D.toGlueData))\n      ↑(MultispanIndex.sndSigmaMap (GlueData.diagram D.toGlueData)))\n    x y\n[PROOFSTEP]\ndelta GlueData.π Multicoequalizer.sigmaπ at h \n[GOAL]\nD : GlueData\nx y : ↑(∐ D.U)\nh :\n  ↑(coequalizer.π (MultispanIndex.fstSigmaMap (GlueData.diagram D.toGlueData))\n            (MultispanIndex.sndSigmaMap (GlueData.diagram D.toGlueData)) ≫\n          (Multicoequalizer.isoCoequalizer (GlueData.diagram D.toGlueData)).inv)\n      x =\n    ↑(coequalizer.π (MultispanIndex.fstSigmaMap (GlueData.diagram D.toGlueData))\n            (MultispanIndex.sndSigmaMap (GlueData.diagram D.toGlueData)) ≫\n          (Multicoequalizer.isoCoequalizer (GlueData.diagram D.toGlueData)).inv)\n      y\n⊢ EqvGen\n    (Types.CoequalizerRel ↑(MultispanIndex.fstSigmaMap (GlueData.diagram D.toGlueData))\n      ↑(MultispanIndex.sndSigmaMap (GlueData.diagram D.toGlueData)))\n    x y\n[PROOFSTEP]\nreplace h := (TopCat.mono_iff_injective (Multicoequalizer.isoCoequalizer 𝖣.diagram).inv).mp inferInstance h\n[GOAL]\nD : GlueData\nx y : ↑(∐ D.U)\nh :\n  (coequalizer.π (MultispanIndex.fstSigmaMap (GlueData.diagram D.toGlueData))\n          (MultispanIndex.sndSigmaMap (GlueData.diagram D.toGlueData))).1\n      x =\n    (coequalizer.π (MultispanIndex.fstSigmaMap (GlueData.diagram D.toGlueData))\n          (MultispanIndex.sndSigmaMap (GlueData.diagram D.toGlueData))).1\n      y\n⊢ EqvGen\n    (Types.CoequalizerRel ↑(MultispanIndex.fstSigmaMap (GlueData.diagram D.toGlueData))\n      ↑(MultispanIndex.sndSigmaMap (GlueData.diagram D.toGlueData)))\n    x y\n[PROOFSTEP]\nlet diagram := parallelPair 𝖣.diagram.fstSigmaMap 𝖣.diagram.sndSigmaMap ⋙ forget _\n[GOAL]\nD : GlueData\nx y : ↑(∐ D.U)\nh :\n  (coequalizer.π (MultispanIndex.fstSigmaMap (GlueData.diagram D.toGlueData))\n          (MultispanIndex.sndSigmaMap (GlueData.diagram D.toGlueData))).1\n      x =\n    (coequalizer.π (MultispanIndex.fstSigmaMap (GlueData.diagram D.toGlueData))\n          (MultispanIndex.sndSigmaMap (GlueData.diagram D.toGlueData))).1\n      y\ndiagram : WalkingParallelPair ⥤ Type u :=\n  parallelPair (MultispanIndex.fstSigmaMap (GlueData.diagram D.toGlueData))\n      (MultispanIndex.sndSigmaMap (GlueData.diagram D.toGlueData)) ⋙\n    forget TopCat\n⊢ EqvGen\n    (Types.CoequalizerRel ↑(MultispanIndex.fstSigmaMap (GlueData.diagram D.toGlueData))\n      ↑(MultispanIndex.sndSigmaMap (GlueData.diagram D.toGlueData)))\n    x y\n[PROOFSTEP]\nhave : colimit.ι diagram one x = colimit.ι diagram one y :=\n  by\n  dsimp only [coequalizer.π, ContinuousMap.toFun_eq_coe] at h \n  rw [← ι_preservesColimitsIso_hom, forget_map_eq_coe, types_comp_apply, h]\n  simp\n[GOAL]\nD : GlueData\nx y : ↑(∐ D.U)\nh :\n  (coequalizer.π (MultispanIndex.fstSigmaMap (GlueData.diagram D.toGlueData))\n          (MultispanIndex.sndSigmaMap (GlueData.diagram D.toGlueData))).1\n      x =\n    (coequalizer.π (MultispanIndex.fstSigmaMap (GlueData.diagram D.toGlueData))\n          (MultispanIndex.sndSigmaMap (GlueData.diagram D.toGlueData))).1\n      y\ndiagram : WalkingParallelPair ⥤ Type u :=\n  parallelPair (MultispanIndex.fstSigmaMap (GlueData.diagram D.toGlueData))\n      (MultispanIndex.sndSigmaMap (GlueData.diagram D.toGlueData)) ⋙\n    forget TopCat\n⊢ colimit.ι diagram one x = colimit.ι diagram one y\n[PROOFSTEP]\ndsimp only [coequalizer.π, ContinuousMap.toFun_eq_coe] at h \n[GOAL]\nD : GlueData\nx y : ↑(∐ D.U)\nh :\n  ↑(colimit.ι\n          (parallelPair (MultispanIndex.fstSigmaMap (GlueData.diagram D.toGlueData))\n            (MultispanIndex.sndSigmaMap (GlueData.diagram D.toGlueData)))\n          one)\n      x =\n    ↑(colimit.ι\n          (parallelPair (MultispanIndex.fstSigmaMap (GlueData.diagram D.toGlueData))\n            (MultispanIndex.sndSigmaMap (GlueData.diagram D.toGlueData)))\n          one)\n      y\ndiagram : WalkingParallelPair ⥤ Type u :=\n  parallelPair (MultispanIndex.fstSigmaMap (GlueData.diagram D.toGlueData))\n      (MultispanIndex.sndSigmaMap (GlueData.diagram D.toGlueData)) ⋙\n    forget TopCat\n⊢ colimit.ι diagram one x = colimit.ι diagram one y\n[PROOFSTEP]\nrw [← ι_preservesColimitsIso_hom, forget_map_eq_coe, types_comp_apply, h]\n[GOAL]\nD : GlueData\nx y : ↑(∐ D.U)\nh :\n  ↑(colimit.ι\n          (parallelPair (MultispanIndex.fstSigmaMap (GlueData.diagram D.toGlueData))\n            (MultispanIndex.sndSigmaMap (GlueData.diagram D.toGlueData)))\n          one)\n      x =\n    ↑(colimit.ι\n          (parallelPair (MultispanIndex.fstSigmaMap (GlueData.diagram D.toGlueData))\n            (MultispanIndex.sndSigmaMap (GlueData.diagram D.toGlueData)))\n          one)\n      y\ndiagram : WalkingParallelPair ⥤ Type u :=\n  parallelPair (MultispanIndex.fstSigmaMap (GlueData.diagram D.toGlueData))\n      (MultispanIndex.sndSigmaMap (GlueData.diagram D.toGlueData)) ⋙\n    forget TopCat\n⊢ (preservesColimitIso (forget TopCat)\n          (parallelPair (MultispanIndex.fstSigmaMap (GlueData.diagram D.toGlueData))\n            (MultispanIndex.sndSigmaMap (GlueData.diagram D.toGlueData)))).hom\n      (↑(colimit.ι\n            (parallelPair (MultispanIndex.fstSigmaMap (GlueData.diagram D.toGlueData))\n              (MultispanIndex.sndSigmaMap (GlueData.diagram D.toGlueData)))\n            one)\n        y) =\n    (↑(colimit.ι\n            (parallelPair (MultispanIndex.fstSigmaMap (GlueData.diagram D.toGlueData))\n              (MultispanIndex.sndSigmaMap (GlueData.diagram D.toGlueData)))\n            one) ≫\n        (preservesColimitIso (forget TopCat)\n            (parallelPair (MultispanIndex.fstSigmaMap (GlueData.diagram D.toGlueData))\n              (MultispanIndex.sndSigmaMap (GlueData.diagram D.toGlueData)))).hom)\n      y\n[PROOFSTEP]\nsimp\n[GOAL]\nD : GlueData\nx y : ↑(∐ D.U)\nh :\n  (coequalizer.π (MultispanIndex.fstSigmaMap (GlueData.diagram D.toGlueData))\n          (MultispanIndex.sndSigmaMap (GlueData.diagram D.toGlueData))).1\n      x =\n    (coequalizer.π (MultispanIndex.fstSigmaMap (GlueData.diagram D.toGlueData))\n          (MultispanIndex.sndSigmaMap (GlueData.diagram D.toGlueData))).1\n      y\ndiagram : WalkingParallelPair ⥤ Type u :=\n  parallelPair (MultispanIndex.fstSigmaMap (GlueData.diagram D.toGlueData))\n      (MultispanIndex.sndSigmaMap (GlueData.diagram D.toGlueData)) ⋙\n    forget TopCat\nthis : colimit.ι diagram one x = colimit.ι diagram one y\n⊢ EqvGen\n    (Types.CoequalizerRel ↑(MultispanIndex.fstSigmaMap (GlueData.diagram D.toGlueData))\n      ↑(MultispanIndex.sndSigmaMap (GlueData.diagram D.toGlueData)))\n    x y\n[PROOFSTEP]\nhave :\n  (colimit.ι diagram _ ≫ colim.map _ ≫ (colimit.isoColimitCocone _).hom) _ =\n    (colimit.ι diagram _ ≫ colim.map _ ≫ (colimit.isoColimitCocone _).hom) _ :=\n  (congr_arg\n      (colim.map (diagramIsoParallelPair diagram).hom ≫ (colimit.isoColimitCocone (Types.coequalizerColimit _ _)).hom)\n      this :\n    _)\n    -- Porting note: was\n      -- simp only [eqToHom_refl, types_comp_apply, colimit.ι_map_assoc,\n      --   diagramIsoParallelPair_hom_app, colimit.isoColimitCocone_ι_hom, types_id_apply] at this\n      -- See https://github.com/leanprover-community/mathlib4/issues/5026\n[GOAL]\nD : GlueData\nx y : ↑(∐ D.U)\nh :\n  (coequalizer.π (MultispanIndex.fstSigmaMap (GlueData.diagram D.toGlueData))\n          (MultispanIndex.sndSigmaMap (GlueData.diagram D.toGlueData))).1\n      x =\n    (coequalizer.π (MultispanIndex.fstSigmaMap (GlueData.diagram D.toGlueData))\n          (MultispanIndex.sndSigmaMap (GlueData.diagram D.toGlueData))).1\n      y\ndiagram : WalkingParallelPair ⥤ Type u :=\n  parallelPair (MultispanIndex.fstSigmaMap (GlueData.diagram D.toGlueData))\n      (MultispanIndex.sndSigmaMap (GlueData.diagram D.toGlueData)) ⋙\n    forget TopCat\nthis✝ : colimit.ι diagram one x = colimit.ι diagram one y\nthis :\n  (colimit.ι diagram one ≫\n        colim.map (diagramIsoParallelPair diagram).hom ≫\n          (colimit.isoColimitCocone\n              (Types.coequalizerColimit (diagram.map WalkingParallelPairHom.left)\n                (diagram.map WalkingParallelPairHom.right))).hom)\n      x =\n    (colimit.ι diagram one ≫\n        colim.map (diagramIsoParallelPair diagram).hom ≫\n          (colimit.isoColimitCocone\n              (Types.coequalizerColimit (diagram.map WalkingParallelPairHom.left)\n                (diagram.map WalkingParallelPairHom.right))).hom)\n      y\n⊢ EqvGen\n    (Types.CoequalizerRel ↑(MultispanIndex.fstSigmaMap (GlueData.diagram D.toGlueData))\n      ↑(MultispanIndex.sndSigmaMap (GlueData.diagram D.toGlueData)))\n    x y\n[PROOFSTEP]\nrw [colimit.ι_map_assoc, diagramIsoParallelPair_hom_app, eqToHom_refl, colimit.isoColimitCocone_ι_hom, types_comp_apply,\n  types_id_apply, types_comp_apply, types_id_apply] at this \n[GOAL]\nD : GlueData\nx y : ↑(∐ D.U)\nh :\n  (coequalizer.π (MultispanIndex.fstSigmaMap (GlueData.diagram D.toGlueData))\n          (MultispanIndex.sndSigmaMap (GlueData.diagram D.toGlueData))).1\n      x =\n    (coequalizer.π (MultispanIndex.fstSigmaMap (GlueData.diagram D.toGlueData))\n          (MultispanIndex.sndSigmaMap (GlueData.diagram D.toGlueData))).1\n      y\ndiagram : WalkingParallelPair ⥤ Type u :=\n  parallelPair (MultispanIndex.fstSigmaMap (GlueData.diagram D.toGlueData))\n      (MultispanIndex.sndSigmaMap (GlueData.diagram D.toGlueData)) ⋙\n    forget TopCat\nthis✝ : colimit.ι diagram one x = colimit.ι diagram one y\nthis :\n  NatTrans.app\n      (Types.coequalizerColimit (diagram.map WalkingParallelPairHom.left)\n            (diagram.map WalkingParallelPairHom.right)).cocone.ι\n      one x =\n    NatTrans.app\n      (Types.coequalizerColimit (diagram.map WalkingParallelPairHom.left)\n            (diagram.map WalkingParallelPairHom.right)).cocone.ι\n      one y\n⊢ EqvGen\n    (Types.CoequalizerRel ↑(MultispanIndex.fstSigmaMap (GlueData.diagram D.toGlueData))\n      ↑(MultispanIndex.sndSigmaMap (GlueData.diagram D.toGlueData)))\n    x y\n[PROOFSTEP]\nexact Quot.eq.1 this\n[GOAL]\nD : GlueData\ni j : D.J\nx : ↑(GlueData.U D.toGlueData i)\ny : ↑(GlueData.U D.toGlueData j)\n⊢ ↑(GlueData.ι D.toGlueData i) x = ↑(GlueData.ι D.toGlueData j) y ↔ Rel D { fst := i, snd := x } { fst := j, snd := y }\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nD : GlueData\ni j : D.J\nx : ↑(GlueData.U D.toGlueData i)\ny : ↑(GlueData.U D.toGlueData j)\n⊢ ↑(GlueData.ι D.toGlueData i) x = ↑(GlueData.ι D.toGlueData j) y → Rel D { fst := i, snd := x } { fst := j, snd := y }\n[PROOFSTEP]\ndelta GlueData.ι\n[GOAL]\ncase mp\nD : GlueData\ni j : D.J\nx : ↑(GlueData.U D.toGlueData i)\ny : ↑(GlueData.U D.toGlueData j)\n⊢ ↑(Multicoequalizer.π (GlueData.diagram D.toGlueData) i) x =\n      ↑(Multicoequalizer.π (GlueData.diagram D.toGlueData) j) y →\n    Rel D { fst := i, snd := x } { fst := j, snd := y }\n[PROOFSTEP]\nsimp_rw [← Multicoequalizer.ι_sigmaπ]\n[GOAL]\ncase mp\nD : GlueData\ni j : D.J\nx : ↑(GlueData.U D.toGlueData i)\ny : ↑(GlueData.U D.toGlueData j)\n⊢ ↑(Sigma.ι (GlueData.diagram D.toGlueData).right i ≫ Multicoequalizer.sigmaπ (GlueData.diagram D.toGlueData)) x =\n      ↑(Sigma.ι (GlueData.diagram D.toGlueData).right j ≫ Multicoequalizer.sigmaπ (GlueData.diagram D.toGlueData)) y →\n    Rel D { fst := i, snd := x } { fst := j, snd := y }\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nD : GlueData\ni j : D.J\nx : ↑(GlueData.U D.toGlueData i)\ny : ↑(GlueData.U D.toGlueData j)\nh :\n  ↑(Sigma.ι (GlueData.diagram D.toGlueData).right i ≫ Multicoequalizer.sigmaπ (GlueData.diagram D.toGlueData)) x =\n    ↑(Sigma.ι (GlueData.diagram D.toGlueData).right j ≫ Multicoequalizer.sigmaπ (GlueData.diagram D.toGlueData)) y\n⊢ Rel D { fst := i, snd := x } { fst := j, snd := y }\n[PROOFSTEP]\nrw [← show _ = Sigma.mk i x from ConcreteCategory.congr_hom (sigmaIsoSigma.{_, u} D.U).inv_hom_id _]\n[GOAL]\ncase mp\nD : GlueData\ni j : D.J\nx : ↑(GlueData.U D.toGlueData i)\ny : ↑(GlueData.U D.toGlueData j)\nh :\n  ↑(Sigma.ι (GlueData.diagram D.toGlueData).right i ≫ Multicoequalizer.sigmaπ (GlueData.diagram D.toGlueData)) x =\n    ↑(Sigma.ι (GlueData.diagram D.toGlueData).right j ≫ Multicoequalizer.sigmaπ (GlueData.diagram D.toGlueData)) y\n⊢ Rel D (↑((sigmaIsoSigma D.U).inv ≫ (sigmaIsoSigma D.U).hom) { fst := i, snd := x }) { fst := j, snd := y }\n[PROOFSTEP]\nrw [← show _ = Sigma.mk j y from ConcreteCategory.congr_hom (sigmaIsoSigma.{_, u} D.U).inv_hom_id _]\n[GOAL]\ncase mp\nD : GlueData\ni j : D.J\nx : ↑(GlueData.U D.toGlueData i)\ny : ↑(GlueData.U D.toGlueData j)\nh :\n  ↑(Sigma.ι (GlueData.diagram D.toGlueData).right i ≫ Multicoequalizer.sigmaπ (GlueData.diagram D.toGlueData)) x =\n    ↑(Sigma.ι (GlueData.diagram D.toGlueData).right j ≫ Multicoequalizer.sigmaπ (GlueData.diagram D.toGlueData)) y\n⊢ Rel D (↑((sigmaIsoSigma D.U).inv ≫ (sigmaIsoSigma D.U).hom) { fst := i, snd := x })\n    (↑((sigmaIsoSigma D.U).inv ≫ (sigmaIsoSigma D.U).hom) { fst := j, snd := y })\n[PROOFSTEP]\nchange InvImage D.Rel (sigmaIsoSigma.{_, u} D.U).hom _ _\n[GOAL]\ncase mp\nD : GlueData\ni j : D.J\nx : ↑(GlueData.U D.toGlueData i)\ny : ↑(GlueData.U D.toGlueData j)\nh :\n  ↑(Sigma.ι (GlueData.diagram D.toGlueData).right i ≫ Multicoequalizer.sigmaπ (GlueData.diagram D.toGlueData)) x =\n    ↑(Sigma.ι (GlueData.diagram D.toGlueData).right j ≫ Multicoequalizer.sigmaπ (GlueData.diagram D.toGlueData)) y\n⊢ InvImage (Rel D) (↑(sigmaIsoSigma D.U).hom) (↑(sigmaIsoSigma D.U).inv { fst := i, snd := x })\n    (↑(sigmaIsoSigma D.U).inv { fst := j, snd := y })\n[PROOFSTEP]\nsimp only [TopCat.sigmaIsoSigma_inv_apply]\n[GOAL]\ncase mp\nD : GlueData\ni j : D.J\nx : ↑(GlueData.U D.toGlueData i)\ny : ↑(GlueData.U D.toGlueData j)\nh :\n  ↑(Sigma.ι (GlueData.diagram D.toGlueData).right i ≫ Multicoequalizer.sigmaπ (GlueData.diagram D.toGlueData)) x =\n    ↑(Sigma.ι (GlueData.diagram D.toGlueData).right j ≫ Multicoequalizer.sigmaπ (GlueData.diagram D.toGlueData)) y\n⊢ InvImage (Rel D) (↑(sigmaIsoSigma D.U).hom) (↑(sigmaIsoSigma D.U).inv { fst := i, snd := x })\n    (↑(sigmaIsoSigma D.U).inv { fst := j, snd := y })\n[PROOFSTEP]\nrw [← (InvImage.equivalence _ _ D.rel_equiv).eqvGen_iff]\n[GOAL]\ncase mp\nD : GlueData\ni j : D.J\nx : ↑(GlueData.U D.toGlueData i)\ny : ↑(GlueData.U D.toGlueData j)\nh :\n  ↑(Sigma.ι (GlueData.diagram D.toGlueData).right i ≫ Multicoequalizer.sigmaπ (GlueData.diagram D.toGlueData)) x =\n    ↑(Sigma.ι (GlueData.diagram D.toGlueData).right j ≫ Multicoequalizer.sigmaπ (GlueData.diagram D.toGlueData)) y\n⊢ EqvGen (InvImage (Rel D) ↑(sigmaIsoSigma D.U).hom) (↑(sigmaIsoSigma D.U).inv { fst := i, snd := x })\n    (↑(sigmaIsoSigma D.U).inv { fst := j, snd := y })\n[PROOFSTEP]\nrefine' EqvGen.mono _ (D.eqvGen_of_π_eq h : _)\n[GOAL]\ncase mp\nD : GlueData\ni j : D.J\nx : ↑(GlueData.U D.toGlueData i)\ny : ↑(GlueData.U D.toGlueData j)\nh :\n  ↑(Sigma.ι (GlueData.diagram D.toGlueData).right i ≫ Multicoequalizer.sigmaπ (GlueData.diagram D.toGlueData)) x =\n    ↑(Sigma.ι (GlueData.diagram D.toGlueData).right j ≫ Multicoequalizer.sigmaπ (GlueData.diagram D.toGlueData)) y\n⊢ ∀ (a b : (forget TopCat).obj (∐ D.U)),\n    Types.CoequalizerRel (↑(MultispanIndex.fstSigmaMap (GlueData.diagram D.toGlueData)))\n        (↑(MultispanIndex.sndSigmaMap (GlueData.diagram D.toGlueData))) a b →\n      InvImage (Rel D) (↑(sigmaIsoSigma D.U).hom) a b\n[PROOFSTEP]\nrintro _ _ ⟨x⟩\n[GOAL]\ncase mp.Rel\nD : GlueData\ni j : D.J\nx✝ : ↑(GlueData.U D.toGlueData i)\ny : ↑(GlueData.U D.toGlueData j)\nh :\n  ↑(Sigma.ι (GlueData.diagram D.toGlueData).right i ≫ Multicoequalizer.sigmaπ (GlueData.diagram D.toGlueData)) x✝ =\n    ↑(Sigma.ι (GlueData.diagram D.toGlueData).right j ≫ Multicoequalizer.sigmaπ (GlueData.diagram D.toGlueData)) y\nx : ↑(∐ (GlueData.diagram D.toGlueData).left)\n⊢ InvImage (Rel D) (↑(sigmaIsoSigma D.U).hom) (↑(MultispanIndex.fstSigmaMap (GlueData.diagram D.toGlueData)) x)\n    (↑(MultispanIndex.sndSigmaMap (GlueData.diagram D.toGlueData)) x)\n[PROOFSTEP]\nrw [← show (sigmaIsoSigma.{u, u} _).inv _ = x from ConcreteCategory.congr_hom (sigmaIsoSigma.{u, u} _).hom_inv_id x]\n[GOAL]\ncase mp.Rel\nD : GlueData\ni j : D.J\nx✝ : ↑(GlueData.U D.toGlueData i)\ny : ↑(GlueData.U D.toGlueData j)\nh :\n  ↑(Sigma.ι (GlueData.diagram D.toGlueData).right i ≫ Multicoequalizer.sigmaπ (GlueData.diagram D.toGlueData)) x✝ =\n    ↑(Sigma.ι (GlueData.diagram D.toGlueData).right j ≫ Multicoequalizer.sigmaπ (GlueData.diagram D.toGlueData)) y\nx : ↑(∐ (GlueData.diagram D.toGlueData).left)\n⊢ InvImage (Rel D) (↑(sigmaIsoSigma D.U).hom)\n    (↑(MultispanIndex.fstSigmaMap (GlueData.diagram D.toGlueData))\n      (↑(sigmaIsoSigma (GlueData.diagram D.toGlueData).left).inv\n        (↑(sigmaIsoSigma (GlueData.diagram D.toGlueData).left).hom x)))\n    (↑(MultispanIndex.sndSigmaMap (GlueData.diagram D.toGlueData))\n      (↑(sigmaIsoSigma (GlueData.diagram D.toGlueData).left).inv\n        (↑(sigmaIsoSigma (GlueData.diagram D.toGlueData).left).hom x)))\n[PROOFSTEP]\ngeneralize (sigmaIsoSigma.{u, u} D.V).hom x = x'\n[GOAL]\ncase mp.Rel\nD : GlueData\ni j : D.J\nx✝ : ↑(GlueData.U D.toGlueData i)\ny : ↑(GlueData.U D.toGlueData j)\nh :\n  ↑(Sigma.ι (GlueData.diagram D.toGlueData).right i ≫ Multicoequalizer.sigmaπ (GlueData.diagram D.toGlueData)) x✝ =\n    ↑(Sigma.ι (GlueData.diagram D.toGlueData).right j ≫ Multicoequalizer.sigmaπ (GlueData.diagram D.toGlueData)) y\nx : ↑(∐ (GlueData.diagram D.toGlueData).left)\nx' : (forget TopCat).obj (of ((i : D.J × D.J) × ↑(GlueData.V D.toGlueData i)))\n⊢ InvImage (Rel D) (↑(sigmaIsoSigma D.U).hom)\n    (↑(MultispanIndex.fstSigmaMap (GlueData.diagram D.toGlueData))\n      (↑(sigmaIsoSigma (GlueData.diagram D.toGlueData).left).inv x'))\n    (↑(MultispanIndex.sndSigmaMap (GlueData.diagram D.toGlueData))\n      (↑(sigmaIsoSigma (GlueData.diagram D.toGlueData).left).inv x'))\n[PROOFSTEP]\nobtain ⟨⟨i, j⟩, y⟩ := x'\n[GOAL]\ncase mp.Rel.mk.mk\nD : GlueData\ni✝ j✝ : D.J\nx✝ : ↑(GlueData.U D.toGlueData i✝)\ny✝ : ↑(GlueData.U D.toGlueData j✝)\nh :\n  ↑(Sigma.ι (GlueData.diagram D.toGlueData).right i✝ ≫ Multicoequalizer.sigmaπ (GlueData.diagram D.toGlueData)) x✝ =\n    ↑(Sigma.ι (GlueData.diagram D.toGlueData).right j✝ ≫ Multicoequalizer.sigmaπ (GlueData.diagram D.toGlueData)) y✝\nx : ↑(∐ (GlueData.diagram D.toGlueData).left)\ni j : D.J\ny : ↑(GlueData.V D.toGlueData (i, j))\n⊢ InvImage (Rel D) (↑(sigmaIsoSigma D.U).hom)\n    (↑(MultispanIndex.fstSigmaMap (GlueData.diagram D.toGlueData))\n      (↑(sigmaIsoSigma (GlueData.diagram D.toGlueData).left).inv { fst := (i, j), snd := y }))\n    (↑(MultispanIndex.sndSigmaMap (GlueData.diagram D.toGlueData))\n      (↑(sigmaIsoSigma (GlueData.diagram D.toGlueData).left).inv { fst := (i, j), snd := y }))\n[PROOFSTEP]\nunfold InvImage MultispanIndex.fstSigmaMap MultispanIndex.sndSigmaMap\n[GOAL]\ncase mp.Rel.mk.mk\nD : GlueData\ni✝ j✝ : D.J\nx✝ : ↑(GlueData.U D.toGlueData i✝)\ny✝ : ↑(GlueData.U D.toGlueData j✝)\nh :\n  ↑(Sigma.ι (GlueData.diagram D.toGlueData).right i✝ ≫ Multicoequalizer.sigmaπ (GlueData.diagram D.toGlueData)) x✝ =\n    ↑(Sigma.ι (GlueData.diagram D.toGlueData).right j✝ ≫ Multicoequalizer.sigmaπ (GlueData.diagram D.toGlueData)) y✝\nx : ↑(∐ (GlueData.diagram D.toGlueData).left)\ni j : D.J\ny : ↑(GlueData.V D.toGlueData (i, j))\n⊢ Rel D\n    (↑(sigmaIsoSigma D.U).hom\n      (↑(Sigma.desc fun b =>\n            MultispanIndex.fst (GlueData.diagram D.toGlueData) b ≫\n              Sigma.ι (GlueData.diagram D.toGlueData).right (MultispanIndex.fstFrom (GlueData.diagram D.toGlueData) b))\n        (↑(sigmaIsoSigma (GlueData.diagram D.toGlueData).left).inv { fst := (i, j), snd := y })))\n    (↑(sigmaIsoSigma D.U).hom\n      (↑(Sigma.desc fun b =>\n            MultispanIndex.snd (GlueData.diagram D.toGlueData) b ≫\n              Sigma.ι (GlueData.diagram D.toGlueData).right (MultispanIndex.sndFrom (GlueData.diagram D.toGlueData) b))\n        (↑(sigmaIsoSigma (GlueData.diagram D.toGlueData).left).inv { fst := (i, j), snd := y })))\n[PROOFSTEP]\nsimp only [Opens.inclusion_apply, TopCat.comp_app, sigmaIsoSigma_inv_apply, Cofan.mk_ι_app]\n[GOAL]\ncase mp.Rel.mk.mk\nD : GlueData\ni✝ j✝ : D.J\nx✝ : ↑(GlueData.U D.toGlueData i✝)\ny✝ : ↑(GlueData.U D.toGlueData j✝)\nh :\n  ↑(Sigma.ι (GlueData.diagram D.toGlueData).right i✝ ≫ Multicoequalizer.sigmaπ (GlueData.diagram D.toGlueData)) x✝ =\n    ↑(Sigma.ι (GlueData.diagram D.toGlueData).right j✝ ≫ Multicoequalizer.sigmaπ (GlueData.diagram D.toGlueData)) y✝\nx : ↑(∐ (GlueData.diagram D.toGlueData).left)\ni j : D.J\ny : ↑(GlueData.V D.toGlueData (i, j))\n⊢ Rel D\n    (↑(sigmaIsoSigma D.U).hom\n      (↑(Sigma.desc fun b =>\n            MultispanIndex.fst (GlueData.diagram D.toGlueData) b ≫\n              Sigma.ι (GlueData.diagram D.toGlueData).right (MultispanIndex.fstFrom (GlueData.diagram D.toGlueData) b))\n        (↑(Sigma.ι (GlueData.diagram D.toGlueData).left (i, j)) y)))\n    (↑(sigmaIsoSigma D.U).hom\n      (↑(Sigma.desc fun b =>\n            MultispanIndex.snd (GlueData.diagram D.toGlueData) b ≫\n              Sigma.ι (GlueData.diagram D.toGlueData).right (MultispanIndex.sndFrom (GlueData.diagram D.toGlueData) b))\n        (↑(Sigma.ι (GlueData.diagram D.toGlueData).left (i, j)) y)))\n[PROOFSTEP]\nrw [← comp_apply, colimit.ι_desc, ← comp_apply, colimit.ι_desc]\n[GOAL]\ncase mp.Rel.mk.mk\nD : GlueData\ni✝ j✝ : D.J\nx✝ : ↑(GlueData.U D.toGlueData i✝)\ny✝ : ↑(GlueData.U D.toGlueData j✝)\nh :\n  ↑(Sigma.ι (GlueData.diagram D.toGlueData).right i✝ ≫ Multicoequalizer.sigmaπ (GlueData.diagram D.toGlueData)) x✝ =\n    ↑(Sigma.ι (GlueData.diagram D.toGlueData).right j✝ ≫ Multicoequalizer.sigmaπ (GlueData.diagram D.toGlueData)) y✝\nx : ↑(∐ (GlueData.diagram D.toGlueData).left)\ni j : D.J\ny : ↑(GlueData.V D.toGlueData (i, j))\n⊢ Rel D\n    (↑(sigmaIsoSigma D.U).hom\n      (↑(NatTrans.app\n            (Cofan.mk (∐ (GlueData.diagram D.toGlueData).right) fun b =>\n                MultispanIndex.fst (GlueData.diagram D.toGlueData) b ≫\n                  Sigma.ι (GlueData.diagram D.toGlueData).right\n                    (MultispanIndex.fstFrom (GlueData.diagram D.toGlueData) b)).ι\n            { as := (i, j) })\n        y))\n    (↑(sigmaIsoSigma D.U).hom\n      (↑(NatTrans.app\n            (Cofan.mk (∐ (GlueData.diagram D.toGlueData).right) fun b =>\n                MultispanIndex.snd (GlueData.diagram D.toGlueData) b ≫\n                  Sigma.ι (GlueData.diagram D.toGlueData).right\n                    (MultispanIndex.sndFrom (GlueData.diagram D.toGlueData) b)).ι\n            { as := (i, j) })\n        y))\n[PROOFSTEP]\nerw [sigmaIsoSigma_hom_ι_apply, sigmaIsoSigma_hom_ι_apply]\n[GOAL]\ncase mp.Rel.mk.mk\nD : GlueData\ni✝ j✝ : D.J\nx✝ : ↑(GlueData.U D.toGlueData i✝)\ny✝ : ↑(GlueData.U D.toGlueData j✝)\nh :\n  ↑(Sigma.ι (GlueData.diagram D.toGlueData).right i✝ ≫ Multicoequalizer.sigmaπ (GlueData.diagram D.toGlueData)) x✝ =\n    ↑(Sigma.ι (GlueData.diagram D.toGlueData).right j✝ ≫ Multicoequalizer.sigmaπ (GlueData.diagram D.toGlueData)) y✝\nx : ↑(∐ (GlueData.diagram D.toGlueData).left)\ni j : D.J\ny : ↑(GlueData.V D.toGlueData (i, j))\n⊢ Rel D\n    { fst := MultispanIndex.fstFrom (GlueData.diagram D.toGlueData) { as := (i, j) }.as,\n      snd := ↑(MultispanIndex.fst (GlueData.diagram D.toGlueData) { as := (i, j) }.as) y }\n    { fst := MultispanIndex.sndFrom (GlueData.diagram D.toGlueData) { as := (i, j) }.as,\n      snd := ↑(MultispanIndex.snd (GlueData.diagram D.toGlueData) { as := (i, j) }.as) y }\n[PROOFSTEP]\nexact Or.inr ⟨y, by dsimp [GlueData.diagram]; simp only [true_and]; rfl⟩\n[GOAL]\nD : GlueData\ni✝ j✝ : D.J\nx✝ : ↑(GlueData.U D.toGlueData i✝)\ny✝ : ↑(GlueData.U D.toGlueData j✝)\nh :\n  ↑(Sigma.ι (GlueData.diagram D.toGlueData).right i✝ ≫ Multicoequalizer.sigmaπ (GlueData.diagram D.toGlueData)) x✝ =\n    ↑(Sigma.ι (GlueData.diagram D.toGlueData).right j✝ ≫ Multicoequalizer.sigmaπ (GlueData.diagram D.toGlueData)) y✝\nx : ↑(∐ (GlueData.diagram D.toGlueData).left)\ni j : D.J\ny : ↑(GlueData.V D.toGlueData (i, j))\n⊢ ↑(GlueData.f D.toGlueData\n            { fst := MultispanIndex.fstFrom (GlueData.diagram D.toGlueData) { as := (i, j) }.as,\n                snd := ↑(MultispanIndex.fst (GlueData.diagram D.toGlueData) { as := (i, j) }.as) y }.fst\n            { fst := MultispanIndex.sndFrom (GlueData.diagram D.toGlueData) { as := (i, j) }.as,\n                snd := ↑(MultispanIndex.snd (GlueData.diagram D.toGlueData) { as := (i, j) }.as) y }.fst)\n        y =\n      { fst := MultispanIndex.fstFrom (GlueData.diagram D.toGlueData) { as := (i, j) }.as,\n          snd := ↑(MultispanIndex.fst (GlueData.diagram D.toGlueData) { as := (i, j) }.as) y }.snd ∧\n    ↑(GlueData.f D.toGlueData\n            { fst := MultispanIndex.sndFrom (GlueData.diagram D.toGlueData) { as := (i, j) }.as,\n                snd := ↑(MultispanIndex.snd (GlueData.diagram D.toGlueData) { as := (i, j) }.as) y }.fst\n            { fst := MultispanIndex.fstFrom (GlueData.diagram D.toGlueData) { as := (i, j) }.as,\n                snd := ↑(MultispanIndex.fst (GlueData.diagram D.toGlueData) { as := (i, j) }.as) y }.fst)\n        (↑(GlueData.t D.toGlueData\n              { fst := MultispanIndex.fstFrom (GlueData.diagram D.toGlueData) { as := (i, j) }.as,\n                  snd := ↑(MultispanIndex.fst (GlueData.diagram D.toGlueData) { as := (i, j) }.as) y }.fst\n              { fst := MultispanIndex.sndFrom (GlueData.diagram D.toGlueData) { as := (i, j) }.as,\n                  snd := ↑(MultispanIndex.snd (GlueData.diagram D.toGlueData) { as := (i, j) }.as) y }.fst)\n          y) =\n      { fst := MultispanIndex.sndFrom (GlueData.diagram D.toGlueData) { as := (i, j) }.as,\n          snd := ↑(MultispanIndex.snd (GlueData.diagram D.toGlueData) { as := (i, j) }.as) y }.snd\n[PROOFSTEP]\ndsimp [GlueData.diagram]\n[GOAL]\nD : GlueData\ni✝ j✝ : D.J\nx✝ : ↑(GlueData.U D.toGlueData i✝)\ny✝ : ↑(GlueData.U D.toGlueData j✝)\nh :\n  ↑(Sigma.ι (GlueData.diagram D.toGlueData).right i✝ ≫ Multicoequalizer.sigmaπ (GlueData.diagram D.toGlueData)) x✝ =\n    ↑(Sigma.ι (GlueData.diagram D.toGlueData).right j✝ ≫ Multicoequalizer.sigmaπ (GlueData.diagram D.toGlueData)) y✝\nx : ↑(∐ (GlueData.diagram D.toGlueData).left)\ni j : D.J\ny : ↑(GlueData.V D.toGlueData (i, j))\n⊢ ↑(GlueData.f D.toGlueData i j) y = ↑(GlueData.f D.toGlueData i j) y ∧\n    ↑(GlueData.f D.toGlueData j i) (↑(GlueData.t D.toGlueData i j) y) =\n      ↑(GlueData.t D.toGlueData i j ≫ GlueData.f D.toGlueData j i) y\n[PROOFSTEP]\nsimp only [true_and]\n[GOAL]\nD : GlueData\ni✝ j✝ : D.J\nx✝ : ↑(GlueData.U D.toGlueData i✝)\ny✝ : ↑(GlueData.U D.toGlueData j✝)\nh :\n  ↑(Sigma.ι (GlueData.diagram D.toGlueData).right i✝ ≫ Multicoequalizer.sigmaπ (GlueData.diagram D.toGlueData)) x✝ =\n    ↑(Sigma.ι (GlueData.diagram D.toGlueData).right j✝ ≫ Multicoequalizer.sigmaπ (GlueData.diagram D.toGlueData)) y✝\nx : ↑(∐ (GlueData.diagram D.toGlueData).left)\ni j : D.J\ny : ↑(GlueData.V D.toGlueData (i, j))\n⊢ ↑(GlueData.f D.toGlueData j i) (↑(GlueData.t D.toGlueData i j) y) =\n    ↑(GlueData.t D.toGlueData i j ≫ GlueData.f D.toGlueData j i) y\n[PROOFSTEP]\nrfl\n[GOAL]\ncase mpr\nD : GlueData\ni j : D.J\nx : ↑(GlueData.U D.toGlueData i)\ny : ↑(GlueData.U D.toGlueData j)\n⊢ Rel D { fst := i, snd := x } { fst := j, snd := y } → ↑(GlueData.ι D.toGlueData i) x = ↑(GlueData.ι D.toGlueData j) y\n[PROOFSTEP]\nrintro (⟨⟨⟩⟩ | ⟨z, e₁, e₂⟩)\n[GOAL]\ncase mpr.inl.refl\nD : GlueData\ni : D.J\nx : ↑(GlueData.U D.toGlueData i)\n⊢ ↑(GlueData.ι D.toGlueData i) x = ↑(GlueData.ι D.toGlueData i) x\ncase mpr.inr.intro.intro\nD : GlueData\ni j : D.J\nx : ↑(GlueData.U D.toGlueData i)\ny : ↑(GlueData.U D.toGlueData j)\nz : ↑(GlueData.V D.toGlueData ({ fst := i, snd := x }.fst, { fst := j, snd := y }.fst))\ne₁ : ↑(GlueData.f D.toGlueData { fst := i, snd := x }.fst { fst := j, snd := y }.fst) z = { fst := i, snd := x }.snd\ne₂ :\n  ↑(GlueData.f D.toGlueData { fst := j, snd := y }.fst { fst := i, snd := x }.fst)\n      (↑(GlueData.t D.toGlueData { fst := i, snd := x }.fst { fst := j, snd := y }.fst) z) =\n    { fst := j, snd := y }.snd\n⊢ ↑(GlueData.ι D.toGlueData i) x = ↑(GlueData.ι D.toGlueData j) y\n[PROOFSTEP]\nrfl\n[GOAL]\ncase mpr.inr.intro.intro\nD : GlueData\ni j : D.J\nx : ↑(GlueData.U D.toGlueData i)\ny : ↑(GlueData.U D.toGlueData j)\nz : ↑(GlueData.V D.toGlueData ({ fst := i, snd := x }.fst, { fst := j, snd := y }.fst))\ne₁ : ↑(GlueData.f D.toGlueData { fst := i, snd := x }.fst { fst := j, snd := y }.fst) z = { fst := i, snd := x }.snd\ne₂ :\n  ↑(GlueData.f D.toGlueData { fst := j, snd := y }.fst { fst := i, snd := x }.fst)\n      (↑(GlueData.t D.toGlueData { fst := i, snd := x }.fst { fst := j, snd := y }.fst) z) =\n    { fst := j, snd := y }.snd\n⊢ ↑(GlueData.ι D.toGlueData i) x = ↑(GlueData.ι D.toGlueData j) y\n[PROOFSTEP]\ndsimp only at *\n  -- porting note: there were `subst e₁` and `subst e₂`, instead of the `rw`\n[GOAL]\ncase mpr.inr.intro.intro\nD : GlueData\ni j : D.J\nx : ↑(GlueData.U D.toGlueData i)\ny : ↑(GlueData.U D.toGlueData j)\nz : ↑(GlueData.V D.toGlueData ({ fst := i, snd := x }.fst, { fst := j, snd := y }.fst))\ne₁ : ↑(GlueData.f D.toGlueData i j) z = x\ne₂ : ↑(GlueData.f D.toGlueData j i) (↑(GlueData.t D.toGlueData i j) z) = y\n⊢ ↑(GlueData.ι D.toGlueData i) x = ↑(GlueData.ι D.toGlueData j) y\n[PROOFSTEP]\nrw [← e₁, ← e₂] at *\n[GOAL]\ncase mpr.inr.intro.intro\nD : GlueData\ni j : D.J\nx : ↑(GlueData.U D.toGlueData i)\ny : ↑(GlueData.U D.toGlueData j)\nz : ↑(GlueData.V D.toGlueData ({ fst := i, snd := x }.fst, { fst := j, snd := y }.fst))\ne₁ : ↑(GlueData.f D.toGlueData i j) z = ↑(GlueData.f D.toGlueData i j) z\ne₂ :\n  ↑(GlueData.f D.toGlueData j i) (↑(GlueData.t D.toGlueData i j) z) =\n    ↑(GlueData.f D.toGlueData j i) (↑(GlueData.t D.toGlueData i j) z)\n⊢ ↑(GlueData.ι D.toGlueData i) (↑(GlueData.f D.toGlueData i j) z) =\n    ↑(GlueData.ι D.toGlueData j) (↑(GlueData.f D.toGlueData j i) (↑(GlueData.t D.toGlueData i j) z))\n[PROOFSTEP]\nsimp\n[GOAL]\nD : GlueData\ni : D.J\n⊢ Function.Injective ↑(GlueData.ι D.toGlueData i)\n[PROOFSTEP]\nintro x y h\n[GOAL]\nD : GlueData\ni : D.J\nx y : (forget TopCat).obj (GlueData.U D.toGlueData i)\nh : ↑(GlueData.ι D.toGlueData i) x = ↑(GlueData.ι D.toGlueData i) y\n⊢ x = y\n[PROOFSTEP]\nrcases(D.ι_eq_iff_rel _ _ _ _).mp h with (⟨⟨⟩⟩ | ⟨_, e₁, e₂⟩)\n[GOAL]\ncase inl.refl\nD : GlueData\ni : D.J\nx : (forget TopCat).obj (GlueData.U D.toGlueData i)\nh : ↑(GlueData.ι D.toGlueData i) x = ↑(GlueData.ι D.toGlueData i) x\n⊢ x = x\n[PROOFSTEP]\nrfl\n[GOAL]\ncase inr.intro.intro\nD : GlueData\ni : D.J\nx y : (forget TopCat).obj (GlueData.U D.toGlueData i)\nh : ↑(GlueData.ι D.toGlueData i) x = ↑(GlueData.ι D.toGlueData i) y\nw✝ : ↑(GlueData.V D.toGlueData ({ fst := i, snd := x }.fst, { fst := i, snd := y }.fst))\ne₁ : ↑(GlueData.f D.toGlueData { fst := i, snd := x }.fst { fst := i, snd := y }.fst) w✝ = { fst := i, snd := x }.snd\ne₂ :\n  ↑(GlueData.f D.toGlueData { fst := i, snd := y }.fst { fst := i, snd := x }.fst)\n      (↑(GlueData.t D.toGlueData { fst := i, snd := x }.fst { fst := i, snd := y }.fst) w✝) =\n    { fst := i, snd := y }.snd\n⊢ x = y\n[PROOFSTEP]\ndsimp only at *\n  -- porting note: there were `cases e₁` and `cases e₂`, instead of the `rw`\n[GOAL]\ncase inr.intro.intro\nD : GlueData\ni : D.J\nx y : (forget TopCat).obj (GlueData.U D.toGlueData i)\nh : ↑(GlueData.ι D.toGlueData i) x = ↑(GlueData.ι D.toGlueData i) y\nw✝ : ↑(GlueData.V D.toGlueData ({ fst := i, snd := x }.fst, { fst := i, snd := y }.fst))\ne₁ : ↑(GlueData.f D.toGlueData i i) w✝ = x\ne₂ : ↑(GlueData.f D.toGlueData i i) (↑(GlueData.t D.toGlueData i i) w✝) = y\n⊢ x = y\n[PROOFSTEP]\nrw [← e₁, ← e₂]\n[GOAL]\ncase inr.intro.intro\nD : GlueData\ni : D.J\nx y : (forget TopCat).obj (GlueData.U D.toGlueData i)\nh : ↑(GlueData.ι D.toGlueData i) x = ↑(GlueData.ι D.toGlueData i) y\nw✝ : ↑(GlueData.V D.toGlueData ({ fst := i, snd := x }.fst, { fst := i, snd := y }.fst))\ne₁ : ↑(GlueData.f D.toGlueData i i) w✝ = x\ne₂ : ↑(GlueData.f D.toGlueData i i) (↑(GlueData.t D.toGlueData i i) w✝) = y\n⊢ ↑(GlueData.f D.toGlueData i i) w✝ = ↑(GlueData.f D.toGlueData i i) (↑(GlueData.t D.toGlueData i i) w✝)\n[PROOFSTEP]\nsimp\n[GOAL]\nD : GlueData\ni j : D.J\n⊢ Set.range ↑(GlueData.ι D.toGlueData i) ∩ Set.range ↑(GlueData.ι D.toGlueData j) =\n    Set.range ↑(GlueData.f D.toGlueData i j ≫ GlueData.ι D.toGlueData i)\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nD : GlueData\ni j : D.J\nx : (forget TopCat).obj (GlueData.glued D.toGlueData)\n⊢ x ∈ Set.range ↑(GlueData.ι D.toGlueData i) ∩ Set.range ↑(GlueData.ι D.toGlueData j) ↔\n    x ∈ Set.range ↑(GlueData.f D.toGlueData i j ≫ GlueData.ι D.toGlueData i)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nD : GlueData\ni j : D.J\nx : (forget TopCat).obj (GlueData.glued D.toGlueData)\n⊢ x ∈ Set.range ↑(GlueData.ι D.toGlueData i) ∩ Set.range ↑(GlueData.ι D.toGlueData j) →\n    x ∈ Set.range ↑(GlueData.f D.toGlueData i j ≫ GlueData.ι D.toGlueData i)\n[PROOFSTEP]\nrintro ⟨⟨x₁, eq₁⟩, ⟨x₂, eq₂⟩⟩\n[GOAL]\ncase h.mp.intro.intro.intro\nD : GlueData\ni j : D.J\nx : (forget TopCat).obj (GlueData.glued D.toGlueData)\nx₁ : (forget TopCat).obj (GlueData.U D.toGlueData i)\neq₁ : ↑(GlueData.ι D.toGlueData i) x₁ = x\nx₂ : (forget TopCat).obj (GlueData.U D.toGlueData j)\neq₂ : ↑(GlueData.ι D.toGlueData j) x₂ = x\n⊢ x ∈ Set.range ↑(GlueData.f D.toGlueData i j ≫ GlueData.ι D.toGlueData i)\n[PROOFSTEP]\nobtain ⟨⟨⟩⟩ | ⟨y, e₁, -⟩ := (D.ι_eq_iff_rel _ _ _ _).mp (eq₁.trans eq₂.symm)\n[GOAL]\ncase h.mp.intro.intro.intro.inl.refl\nD : GlueData\ni : D.J\nx : (forget TopCat).obj (GlueData.glued D.toGlueData)\nx₁ : (forget TopCat).obj (GlueData.U D.toGlueData i)\neq₁ eq₂ : ↑(GlueData.ι D.toGlueData i) x₁ = x\n⊢ x ∈ Set.range ↑(GlueData.f D.toGlueData i i ≫ GlueData.ι D.toGlueData i)\n[PROOFSTEP]\nexact\n  ⟨inv (D.f i i) x₁, by\n    -- Porting note: was `simp [eq₁]`\n            -- See https://github.com/leanprover-community/mathlib4/issues/5026\n    rw [TopCat.comp_app]\n    erw [CategoryTheory.IsIso.inv_hom_id_apply]\n    rw [eq₁]⟩\n[GOAL]\nD : GlueData\ni : D.J\nx : (forget TopCat).obj (GlueData.glued D.toGlueData)\nx₁ : (forget TopCat).obj (GlueData.U D.toGlueData i)\neq₁ eq₂ : ↑(GlueData.ι D.toGlueData i) x₁ = x\n⊢ ↑(GlueData.f D.toGlueData i i ≫ GlueData.ι D.toGlueData i) (↑(inv (GlueData.f D.toGlueData i i)) x₁) = x\n[PROOFSTEP]\nrw [TopCat.comp_app]\n[GOAL]\nD : GlueData\ni : D.J\nx : (forget TopCat).obj (GlueData.glued D.toGlueData)\nx₁ : (forget TopCat).obj (GlueData.U D.toGlueData i)\neq₁ eq₂ : ↑(GlueData.ι D.toGlueData i) x₁ = x\n⊢ ↑(GlueData.ι D.toGlueData i) (↑(GlueData.f D.toGlueData i i) (↑(inv (GlueData.f D.toGlueData i i)) x₁)) = x\n[PROOFSTEP]\nerw [CategoryTheory.IsIso.inv_hom_id_apply]\n[GOAL]\nD : GlueData\ni : D.J\nx : (forget TopCat).obj (GlueData.glued D.toGlueData)\nx₁ : (forget TopCat).obj (GlueData.U D.toGlueData i)\neq₁ eq₂ : ↑(GlueData.ι D.toGlueData i) x₁ = x\n⊢ ↑(GlueData.ι D.toGlueData i) x₁ = x\n[PROOFSTEP]\nrw [eq₁]\n[GOAL]\ncase h.mp.intro.intro.intro.inr.intro.intro\nD : GlueData\ni j : D.J\nx : (forget TopCat).obj (GlueData.glued D.toGlueData)\nx₁ : (forget TopCat).obj (GlueData.U D.toGlueData i)\neq₁ : ↑(GlueData.ι D.toGlueData i) x₁ = x\nx₂ : (forget TopCat).obj (GlueData.U D.toGlueData j)\neq₂ : ↑(GlueData.ι D.toGlueData j) x₂ = x\ny : ↑(GlueData.V D.toGlueData ({ fst := i, snd := x₁ }.fst, { fst := j, snd := x₂ }.fst))\ne₁ : ↑(GlueData.f D.toGlueData { fst := i, snd := x₁ }.fst { fst := j, snd := x₂ }.fst) y = { fst := i, snd := x₁ }.snd\n⊢ x ∈ Set.range ↑(GlueData.f D.toGlueData i j ≫ GlueData.ι D.toGlueData i)\n[PROOFSTEP]\ndsimp only at *\n[GOAL]\ncase h.mp.intro.intro.intro.inr.intro.intro\nD : GlueData\ni j : D.J\nx : (forget TopCat).obj (GlueData.glued D.toGlueData)\nx₁ : (forget TopCat).obj (GlueData.U D.toGlueData i)\neq₁ : ↑(GlueData.ι D.toGlueData i) x₁ = x\nx₂ : (forget TopCat).obj (GlueData.U D.toGlueData j)\neq₂ : ↑(GlueData.ι D.toGlueData j) x₂ = x\ny : ↑(GlueData.V D.toGlueData ({ fst := i, snd := x₁ }.fst, { fst := j, snd := x₂ }.fst))\ne₁ : ↑(GlueData.f D.toGlueData i j) y = x₁\n⊢ x ∈ Set.range ↑(GlueData.f D.toGlueData i j ≫ GlueData.ι D.toGlueData i)\n[PROOFSTEP]\nsubsts eq₁\n[GOAL]\ncase h.mp.intro.intro.intro.inr.intro.intro\nD : GlueData\ni j : D.J\nx₁ : (forget TopCat).obj (GlueData.U D.toGlueData i)\nx₂ : (forget TopCat).obj (GlueData.U D.toGlueData j)\ny : ↑(GlueData.V D.toGlueData ({ fst := i, snd := x₁ }.fst, { fst := j, snd := x₂ }.fst))\ne₁ : ↑(GlueData.f D.toGlueData i j) y = x₁\neq₂ : ↑(GlueData.ι D.toGlueData j) x₂ = ↑(GlueData.ι D.toGlueData i) x₁\n⊢ ↑(GlueData.ι D.toGlueData i) x₁ ∈ Set.range ↑(GlueData.f D.toGlueData i j ≫ GlueData.ι D.toGlueData i)\n[PROOFSTEP]\nexact ⟨y, by simp [e₁]⟩\n[GOAL]\nD : GlueData\ni j : D.J\nx₁ : (forget TopCat).obj (GlueData.U D.toGlueData i)\nx₂ : (forget TopCat).obj (GlueData.U D.toGlueData j)\ny : ↑(GlueData.V D.toGlueData ({ fst := i, snd := x₁ }.fst, { fst := j, snd := x₂ }.fst))\ne₁ : ↑(GlueData.f D.toGlueData i j) y = x₁\neq₂ : ↑(GlueData.ι D.toGlueData j) x₂ = ↑(GlueData.ι D.toGlueData i) x₁\n⊢ ↑(GlueData.f D.toGlueData i j ≫ GlueData.ι D.toGlueData i) y = ↑(GlueData.ι D.toGlueData i) x₁\n[PROOFSTEP]\nsimp [e₁]\n[GOAL]\ncase h.mpr\nD : GlueData\ni j : D.J\nx : (forget TopCat).obj (GlueData.glued D.toGlueData)\n⊢ x ∈ Set.range ↑(GlueData.f D.toGlueData i j ≫ GlueData.ι D.toGlueData i) →\n    x ∈ Set.range ↑(GlueData.ι D.toGlueData i) ∩ Set.range ↑(GlueData.ι D.toGlueData j)\n[PROOFSTEP]\nrintro ⟨x, hx⟩\n[GOAL]\ncase h.mpr.intro\nD : GlueData\ni j : D.J\nx✝ : (forget TopCat).obj (GlueData.glued D.toGlueData)\nx : (forget TopCat).obj (GlueData.V D.toGlueData (i, j))\nhx : ↑(GlueData.f D.toGlueData i j ≫ GlueData.ι D.toGlueData i) x = x✝\n⊢ x✝ ∈ Set.range ↑(GlueData.ι D.toGlueData i) ∩ Set.range ↑(GlueData.ι D.toGlueData j)\n[PROOFSTEP]\nexact ⟨⟨D.f i j x, hx⟩, ⟨D.f j i (D.t _ _ x), by simp [← hx]⟩⟩\n[GOAL]\nD : GlueData\ni j : D.J\nx✝ : (forget TopCat).obj (GlueData.glued D.toGlueData)\nx : (forget TopCat).obj (GlueData.V D.toGlueData (i, j))\nhx : ↑(GlueData.f D.toGlueData i j ≫ GlueData.ι D.toGlueData i) x = x✝\n⊢ ↑(GlueData.ι D.toGlueData j) (↑(GlueData.f D.toGlueData j i) (↑(GlueData.t D.toGlueData i j) x)) = x✝\n[PROOFSTEP]\nsimp [← hx]\n[GOAL]\nD : GlueData\ni j : D.J\n⊢ ↑(GlueData.ι D.toGlueData j) ⁻¹' Set.range ↑(GlueData.ι D.toGlueData i) = Set.range ↑(GlueData.f D.toGlueData j i)\n[PROOFSTEP]\nrw [← Set.preimage_image_eq (Set.range (D.f j i)) (D.ι_injective j), ← Set.image_univ, ← Set.image_univ, ←\n  Set.image_comp, ← coe_comp, Set.image_univ, Set.image_univ, ← image_inter, Set.preimage_range_inter]\n[GOAL]\nD : GlueData\ni j : D.J\nU : Set ↑(GlueData.U D.toGlueData i)\n⊢ ↑(GlueData.ι D.toGlueData j) ⁻¹' (↑(GlueData.ι D.toGlueData i) '' U) =\n    ↑(GlueData.f D.toGlueData j i) '' (↑(GlueData.t D.toGlueData j i ≫ GlueData.f D.toGlueData i j) ⁻¹' U)\n[PROOFSTEP]\nhave : D.f _ _ ⁻¹' (𝖣.ι j ⁻¹' (𝖣.ι i '' U)) = (D.t j i ≫ D.f _ _) ⁻¹' U :=\n  by\n  ext x\n  conv_rhs => rw [← Set.preimage_image_eq U (D.ι_injective _)]\n  generalize 𝖣.ι i '' U = U'\n  simp\n[GOAL]\nD : GlueData\ni j : D.J\nU : Set ↑(GlueData.U D.toGlueData i)\n⊢ ↑(GlueData.f D.toGlueData j i) ⁻¹' (↑(GlueData.ι D.toGlueData j) ⁻¹' (↑(GlueData.ι D.toGlueData i) '' U)) =\n    ↑(GlueData.t D.toGlueData j i ≫ GlueData.f D.toGlueData i j) ⁻¹' U\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nD : GlueData\ni j : D.J\nU : Set ↑(GlueData.U D.toGlueData i)\nx : (forget TopCat).obj (GlueData.V D.toGlueData (j, i))\n⊢ x ∈ ↑(GlueData.f D.toGlueData j i) ⁻¹' (↑(GlueData.ι D.toGlueData j) ⁻¹' (↑(GlueData.ι D.toGlueData i) '' U)) ↔\n    x ∈ ↑(GlueData.t D.toGlueData j i ≫ GlueData.f D.toGlueData i j) ⁻¹' U\n[PROOFSTEP]\nconv_rhs => rw [← Set.preimage_image_eq U (D.ι_injective _)]\n[GOAL]\nD : GlueData\ni j : D.J\nU : Set ↑(GlueData.U D.toGlueData i)\nx : (forget TopCat).obj (GlueData.V D.toGlueData (j, i))\n| x ∈ ↑(GlueData.t D.toGlueData j i ≫ GlueData.f D.toGlueData i j) ⁻¹' U\n[PROOFSTEP]\nrw [← Set.preimage_image_eq U (D.ι_injective _)]\n[GOAL]\nD : GlueData\ni j : D.J\nU : Set ↑(GlueData.U D.toGlueData i)\nx : (forget TopCat).obj (GlueData.V D.toGlueData (j, i))\n| x ∈ ↑(GlueData.t D.toGlueData j i ≫ GlueData.f D.toGlueData i j) ⁻¹' U\n[PROOFSTEP]\nrw [← Set.preimage_image_eq U (D.ι_injective _)]\n[GOAL]\nD : GlueData\ni j : D.J\nU : Set ↑(GlueData.U D.toGlueData i)\nx : (forget TopCat).obj (GlueData.V D.toGlueData (j, i))\n| x ∈ ↑(GlueData.t D.toGlueData j i ≫ GlueData.f D.toGlueData i j) ⁻¹' U\n[PROOFSTEP]\nrw [← Set.preimage_image_eq U (D.ι_injective _)]\n[GOAL]\ncase h\nD : GlueData\ni j : D.J\nU : Set ↑(GlueData.U D.toGlueData i)\nx : (forget TopCat).obj (GlueData.V D.toGlueData (j, i))\n⊢ x ∈ ↑(GlueData.f D.toGlueData j i) ⁻¹' (↑(GlueData.ι D.toGlueData j) ⁻¹' (↑(GlueData.ι D.toGlueData i) '' U)) ↔\n    x ∈\n      ↑(GlueData.t D.toGlueData j i ≫ GlueData.f D.toGlueData i j) ⁻¹'\n        (↑(GlueData.ι D.toGlueData i) ⁻¹' (↑(GlueData.ι D.toGlueData i) '' U))\n[PROOFSTEP]\ngeneralize 𝖣.ι i '' U = U'\n[GOAL]\ncase h\nD : GlueData\ni j : D.J\nU : Set ↑(GlueData.U D.toGlueData i)\nx : (forget TopCat).obj (GlueData.V D.toGlueData (j, i))\nU' : Set ((forget TopCat).obj (GlueData.glued D.toGlueData))\n⊢ x ∈ ↑(GlueData.f D.toGlueData j i) ⁻¹' (↑(GlueData.ι D.toGlueData j) ⁻¹' U') ↔\n    x ∈ ↑(GlueData.t D.toGlueData j i ≫ GlueData.f D.toGlueData i j) ⁻¹' (↑(GlueData.ι D.toGlueData i) ⁻¹' U')\n[PROOFSTEP]\nsimp\n[GOAL]\nD : GlueData\ni j : D.J\nU : Set ↑(GlueData.U D.toGlueData i)\nthis :\n  ↑(GlueData.f D.toGlueData j i) ⁻¹' (↑(GlueData.ι D.toGlueData j) ⁻¹' (↑(GlueData.ι D.toGlueData i) '' U)) =\n    ↑(GlueData.t D.toGlueData j i ≫ GlueData.f D.toGlueData i j) ⁻¹' U\n⊢ ↑(GlueData.ι D.toGlueData j) ⁻¹' (↑(GlueData.ι D.toGlueData i) '' U) =\n    ↑(GlueData.f D.toGlueData j i) '' (↑(GlueData.t D.toGlueData j i ≫ GlueData.f D.toGlueData i j) ⁻¹' U)\n[PROOFSTEP]\nrw [← this, Set.image_preimage_eq_inter_range]\n[GOAL]\nD : GlueData\ni j : D.J\nU : Set ↑(GlueData.U D.toGlueData i)\nthis :\n  ↑(GlueData.f D.toGlueData j i) ⁻¹' (↑(GlueData.ι D.toGlueData j) ⁻¹' (↑(GlueData.ι D.toGlueData i) '' U)) =\n    ↑(GlueData.t D.toGlueData j i ≫ GlueData.f D.toGlueData i j) ⁻¹' U\n⊢ ↑(GlueData.ι D.toGlueData j) ⁻¹' (↑(GlueData.ι D.toGlueData i) '' U) =\n    ↑(GlueData.ι D.toGlueData j) ⁻¹' (↑(GlueData.ι D.toGlueData i) '' U) ∩ Set.range ↑(GlueData.f D.toGlueData j i)\n[PROOFSTEP]\nsymm\n[GOAL]\nD : GlueData\ni j : D.J\nU : Set ↑(GlueData.U D.toGlueData i)\nthis :\n  ↑(GlueData.f D.toGlueData j i) ⁻¹' (↑(GlueData.ι D.toGlueData j) ⁻¹' (↑(GlueData.ι D.toGlueData i) '' U)) =\n    ↑(GlueData.t D.toGlueData j i ≫ GlueData.f D.toGlueData i j) ⁻¹' U\n⊢ ↑(GlueData.ι D.toGlueData j) ⁻¹' (↑(GlueData.ι D.toGlueData i) '' U) ∩ Set.range ↑(GlueData.f D.toGlueData j i) =\n    ↑(GlueData.ι D.toGlueData j) ⁻¹' (↑(GlueData.ι D.toGlueData i) '' U)\n[PROOFSTEP]\napply Set.inter_eq_self_of_subset_left\n[GOAL]\ncase a\nD : GlueData\ni j : D.J\nU : Set ↑(GlueData.U D.toGlueData i)\nthis :\n  ↑(GlueData.f D.toGlueData j i) ⁻¹' (↑(GlueData.ι D.toGlueData j) ⁻¹' (↑(GlueData.ι D.toGlueData i) '' U)) =\n    ↑(GlueData.t D.toGlueData j i ≫ GlueData.f D.toGlueData i j) ⁻¹' U\n⊢ ↑(GlueData.ι D.toGlueData j) ⁻¹' (↑(GlueData.ι D.toGlueData i) '' U) ⊆ Set.range ↑(GlueData.f D.toGlueData j i)\n[PROOFSTEP]\nrw [← D.preimage_range i j]\n[GOAL]\ncase a\nD : GlueData\ni j : D.J\nU : Set ↑(GlueData.U D.toGlueData i)\nthis :\n  ↑(GlueData.f D.toGlueData j i) ⁻¹' (↑(GlueData.ι D.toGlueData j) ⁻¹' (↑(GlueData.ι D.toGlueData i) '' U)) =\n    ↑(GlueData.t D.toGlueData j i ≫ GlueData.f D.toGlueData i j) ⁻¹' U\n⊢ ↑(GlueData.ι D.toGlueData j) ⁻¹' (↑(GlueData.ι D.toGlueData i) '' U) ⊆\n    ↑(GlueData.ι D.toGlueData j) ⁻¹' Set.range ↑(GlueData.ι D.toGlueData i)\n[PROOFSTEP]\nexact Set.preimage_mono (Set.image_subset_range _ _)\n[GOAL]\nD : GlueData\ni j : D.J\nU : Set ↑(GlueData.U D.toGlueData i)\n⊢ ↑(GlueData.ι D.toGlueData j) ⁻¹' (↑(GlueData.ι D.toGlueData i) '' U) =\n    ↑(GlueData.t D.toGlueData i j ≫ GlueData.f D.toGlueData j i) '' (↑(GlueData.f D.toGlueData i j) ⁻¹' U)\n[PROOFSTEP]\nconvert D.preimage_image_eq_image i j U using 1\n[GOAL]\ncase h.e'_3\nD : GlueData\ni j : D.J\nU : Set ↑(GlueData.U D.toGlueData i)\n⊢ ↑(GlueData.t D.toGlueData i j ≫ GlueData.f D.toGlueData j i) '' (↑(GlueData.f D.toGlueData i j) ⁻¹' U) =\n    ↑(GlueData.f D.toGlueData j i) '' (↑(GlueData.t D.toGlueData j i ≫ GlueData.f D.toGlueData i j) ⁻¹' U)\n[PROOFSTEP]\nrw [coe_comp, coe_comp]\n  -- porting note: `show` was not needed, since `rw [← Set.image_image]` worked.\n[GOAL]\ncase h.e'_3\nD : GlueData\ni j : D.J\nU : Set ↑(GlueData.U D.toGlueData i)\n⊢ ↑(GlueData.f D.toGlueData j i) ∘ ↑(GlueData.t D.toGlueData i j) '' (↑(GlueData.f D.toGlueData i j) ⁻¹' U) =\n    ↑(GlueData.f D.toGlueData j i) '' (↑(GlueData.f D.toGlueData i j) ∘ ↑(GlueData.t D.toGlueData j i) ⁻¹' U)\n[PROOFSTEP]\nshow (fun x => ((forget TopCat).map _ ((forget TopCat).map _ x))) '' _ = _\n[GOAL]\ncase h.e'_3\nD : GlueData\ni j : D.J\nU : Set ↑(GlueData.U D.toGlueData i)\n⊢ (fun x => (forget TopCat).map (GlueData.f D.toGlueData j i) ((forget TopCat).map (GlueData.t D.toGlueData i j) x)) ''\n      (↑(GlueData.f D.toGlueData i j) ⁻¹' U) =\n    ↑(GlueData.f D.toGlueData j i) '' (↑(GlueData.f D.toGlueData i j) ∘ ↑(GlueData.t D.toGlueData j i) ⁻¹' U)\n[PROOFSTEP]\nrw [← Set.image_image]\n  -- porting note: `congr 1` was here, instead of `congr_arg`, however, it did nothing.\n[GOAL]\ncase h.e'_3\nD : GlueData\ni j : D.J\nU : Set ↑(GlueData.U D.toGlueData i)\n⊢ (forget TopCat).map (GlueData.f D.toGlueData j i) ''\n      ((fun x => (forget TopCat).map (GlueData.t D.toGlueData i j) x) '' (↑(GlueData.f D.toGlueData i j) ⁻¹' U)) =\n    ↑(GlueData.f D.toGlueData j i) '' (↑(GlueData.f D.toGlueData i j) ∘ ↑(GlueData.t D.toGlueData j i) ⁻¹' U)\n[PROOFSTEP]\nrefine congr_arg ?_ ?_\n[GOAL]\ncase h.e'_3\nD : GlueData\ni j : D.J\nU : Set ↑(GlueData.U D.toGlueData i)\n⊢ (fun x => (forget TopCat).map (GlueData.t D.toGlueData i j) x) '' (↑(GlueData.f D.toGlueData i j) ⁻¹' U) =\n    ↑(GlueData.f D.toGlueData i j) ∘ ↑(GlueData.t D.toGlueData j i) ⁻¹' U\n[PROOFSTEP]\nrw [← Set.eq_preimage_iff_image_eq, Set.preimage_preimage]\n[GOAL]\ncase h.e'_3\nD : GlueData\ni j : D.J\nU : Set ↑(GlueData.U D.toGlueData i)\n⊢ ↑(GlueData.f D.toGlueData i j) ⁻¹' U =\n    (fun x =>\n        (↑(GlueData.f D.toGlueData i j) ∘ ↑(GlueData.t D.toGlueData j i))\n          ((forget TopCat).map (GlueData.t D.toGlueData i j) x)) ⁻¹'\n      U\ncase h.e'_3.hf\nD : GlueData\ni j : D.J\nU : Set ↑(GlueData.U D.toGlueData i)\n⊢ Function.Bijective fun x => (forget TopCat).map (GlueData.t D.toGlueData i j) x\n[PROOFSTEP]\nchange _ = (D.t i j ≫ D.t j i ≫ _) ⁻¹' _\n[GOAL]\ncase h.e'_3\nD : GlueData\ni j : D.J\nU : Set ↑(GlueData.U D.toGlueData i)\n⊢ ↑(GlueData.f D.toGlueData i j) ⁻¹' U =\n    ↑(GlueData.t D.toGlueData i j ≫ GlueData.t D.toGlueData j i ≫ GlueData.f D.toGlueData i j) ⁻¹' U\ncase h.e'_3.hf\nD : GlueData\ni j : D.J\nU : Set ↑(GlueData.U D.toGlueData i)\n⊢ Function.Bijective fun x => (forget TopCat).map (GlueData.t D.toGlueData i j) x\n[PROOFSTEP]\nrw [𝖣.t_inv_assoc]\n[GOAL]\ncase h.e'_3.hf\nD : GlueData\ni j : D.J\nU : Set ↑(GlueData.U D.toGlueData i)\n⊢ Function.Bijective fun x => (forget TopCat).map (GlueData.t D.toGlueData i j) x\n[PROOFSTEP]\nrw [← isIso_iff_bijective]\n[GOAL]\ncase h.e'_3.hf\nD : GlueData\ni j : D.J\nU : Set ↑(GlueData.U D.toGlueData i)\n⊢ IsIso fun x => (forget TopCat).map (GlueData.t D.toGlueData i j) x\n[PROOFSTEP]\napply (forget TopCat).map_isIso\n[GOAL]\nD : GlueData\ni : D.J\nU : Opens ↑(GlueData.U D.toGlueData i)\n⊢ IsOpen (↑(GlueData.ι D.toGlueData i) '' ↑U)\n[PROOFSTEP]\nrw [isOpen_iff]\n[GOAL]\nD : GlueData\ni : D.J\nU : Opens ↑(GlueData.U D.toGlueData i)\n⊢ ∀ (i_1 : D.J), IsOpen (↑(GlueData.ι D.toGlueData i_1) ⁻¹' (↑(GlueData.ι D.toGlueData i) '' ↑U))\n[PROOFSTEP]\nintro j\n[GOAL]\nD : GlueData\ni : D.J\nU : Opens ↑(GlueData.U D.toGlueData i)\nj : D.J\n⊢ IsOpen (↑(GlueData.ι D.toGlueData j) ⁻¹' (↑(GlueData.ι D.toGlueData i) '' ↑U))\n[PROOFSTEP]\nrw [preimage_image_eq_image]\n[GOAL]\nD : GlueData\ni : D.J\nU : Opens ↑(GlueData.U D.toGlueData i)\nj : D.J\n⊢ IsOpen (↑(GlueData.f D.toGlueData j i) '' (↑(GlueData.t D.toGlueData j i ≫ GlueData.f D.toGlueData i j) ⁻¹' ↑U))\n[PROOFSTEP]\napply (D.f_open _ _).isOpenMap\n[GOAL]\ncase a\nD : GlueData\ni : D.J\nU : Opens ↑(GlueData.U D.toGlueData i)\nj : D.J\n⊢ IsOpen (↑(GlueData.t D.toGlueData j i ≫ GlueData.f D.toGlueData i j) ⁻¹' ↑U)\n[PROOFSTEP]\napply (D.t j i ≫ D.f i j).continuous_toFun.isOpen_preimage\n[GOAL]\ncase a.a\nD : GlueData\ni : D.J\nU : Opens ↑(GlueData.U D.toGlueData i)\nj : D.J\n⊢ IsOpen ↑U\n[PROOFSTEP]\nexact U.isOpen\n[GOAL]\nD : GlueData\nh : MkCore\ni j : h.J\nx : { x // x ∈ V h j i }\n⊢ ↑(t h i j) (↑(t h j i) x) = x\n[PROOFSTEP]\nhave := h.cocycle j i j x ?_\n[GOAL]\ncase refine_2\nD : GlueData\nh : MkCore\ni j : h.J\nx : { x // x ∈ V h j i }\nthis :\n  ↑(↑(t h i j) { val := ↑(↑(t h j i) x), property := (_ : ↑(↑(t h j i) x) ∈ V h i j) }) =\n    ↑(↑(t h j j) { val := ↑x, property := ?refine_1 })\n⊢ ↑(t h i j) (↑(t h j i) x) = x\ncase refine_1 D : GlueData h : MkCore i j : h.J x : { x // x ∈ V h j i } ⊢ ↑x ∈ V h j j\n[PROOFSTEP]\nrw [h.t_id] at this \n[GOAL]\ncase refine_2\nD : GlueData\nh : MkCore\ni j : h.J\nx : { x // x ∈ V h j i }\nthis :\n  ↑(↑(t h i j) { val := ↑(↑(t h j i) x), property := (_ : ↑(↑(t h j i) x) ∈ V h i j) }) =\n    ↑(id { val := ↑x, property := ?refine_1 })\n⊢ ↑(t h i j) (↑(t h j i) x) = x\ncase refine_1\nD : GlueData\nh : MkCore\ni j : h.J\nx : { x // x ∈ V h j i }\n⊢ ↑x ∈ V h j j\ncase refine_1 D : GlueData h : MkCore i j : h.J x : { x // x ∈ V h j i } ⊢ ↑x ∈ V h j j\n[PROOFSTEP]\nconvert Subtype.eq this\n[GOAL]\ncase refine_1\nD : GlueData\nh : MkCore\ni j : h.J\nx : { x // x ∈ V h j i }\n⊢ ↑x ∈ V h j j\ncase refine_1\nD : GlueData\nh : MkCore\ni j : h.J\nx : { x // x ∈ V h j i }\n⊢ ↑x ∈ V h j j\ncase refine_1 D : GlueData h : MkCore i j : h.J x : { x // x ∈ V h j i } ⊢ ↑x ∈ V h j j\n[PROOFSTEP]\nrw [h.V_id]\n[GOAL]\ncase refine_1\nD : GlueData\nh : MkCore\ni j : h.J\nx : { x // x ∈ V h j i }\n⊢ ↑x ∈ ⊤\n[PROOFSTEP]\ntrivial\n[GOAL]\nD : GlueData\nh : MkCore\ni j : h.J\n⊢ IsIso (MkCore.t h i j)\n[PROOFSTEP]\nuse h.t j i\n[GOAL]\ncase h\nD : GlueData\nh : MkCore\ni j : h.J\n⊢ MkCore.t h i j ≫ MkCore.t h j i = 𝟙 ((Opens.toTopCat (MkCore.U h i)).obj (MkCore.V h i j)) ∧\n    MkCore.t h j i ≫ MkCore.t h i j = 𝟙 ((Opens.toTopCat (MkCore.U h j)).obj (MkCore.V h j i))\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.left\nD : GlueData\nh : MkCore\ni j : h.J\n⊢ MkCore.t h i j ≫ MkCore.t h j i = 𝟙 ((Opens.toTopCat (MkCore.U h i)).obj (MkCore.V h i j))\n[PROOFSTEP]\next1\n[GOAL]\ncase h.right\nD : GlueData\nh : MkCore\ni j : h.J\n⊢ MkCore.t h j i ≫ MkCore.t h i j = 𝟙 ((Opens.toTopCat (MkCore.U h j)).obj (MkCore.V h j i))\n[PROOFSTEP]\next1\n[GOAL]\ncase h.left.w\nD : GlueData\nh : MkCore\ni j : h.J\nx✝ : (forget TopCat).obj ((Opens.toTopCat (MkCore.U h i)).obj (MkCore.V h i j))\n⊢ ↑(MkCore.t h i j ≫ MkCore.t h j i) x✝ = ↑(𝟙 ((Opens.toTopCat (MkCore.U h i)).obj (MkCore.V h i j))) x✝\ncase h.right.w\nD : GlueData\nh : MkCore\ni j : h.J\nx✝ : (forget TopCat).obj ((Opens.toTopCat (MkCore.U h j)).obj (MkCore.V h j i))\n⊢ ↑(MkCore.t h j i ≫ MkCore.t h i j) x✝ = ↑(𝟙 ((Opens.toTopCat (MkCore.U h j)).obj (MkCore.V h j i))) x✝\n[PROOFSTEP]\nexacts [h.t_inv _ _ _, h.t_inv _ _ _]\n[GOAL]\nD : GlueData\nh : MkCore\ni j k : h.J\n⊢ pullback (Opens.inclusion (V h i j)) (Opens.inclusion (V h i k)) ⟶\n    pullback (Opens.inclusion (V h j k)) (Opens.inclusion (V h j i))\n[PROOFSTEP]\nrefine' (pullbackIsoProdSubtype _ _).hom ≫ ⟨_, _⟩ ≫ (pullbackIsoProdSubtype _ _).inv\n[GOAL]\ncase refine'_1\nD : GlueData\nh : MkCore\ni j k : h.J\n⊢ ↑(of { p // ↑(Opens.inclusion (V h i j)) p.fst = ↑(Opens.inclusion (V h i k)) p.snd }) →\n    ↑(of { p // ↑(Opens.inclusion (V h j k)) p.fst = ↑(Opens.inclusion (V h j i)) p.snd })\n[PROOFSTEP]\nintro x\n[GOAL]\ncase refine'_1\nD : GlueData\nh : MkCore\ni j k : h.J\nx : ↑(of { p // ↑(Opens.inclusion (V h i j)) p.fst = ↑(Opens.inclusion (V h i k)) p.snd })\n⊢ ↑(of { p // ↑(Opens.inclusion (V h j k)) p.fst = ↑(Opens.inclusion (V h j i)) p.snd })\n[PROOFSTEP]\nrefine' ⟨⟨⟨(h.t i j x.1.1).1, _⟩, h.t i j x.1.1⟩, rfl⟩\n[GOAL]\ncase refine'_1\nD : GlueData\nh : MkCore\ni j k : h.J\nx : ↑(of { p // ↑(Opens.inclusion (V h i j)) p.fst = ↑(Opens.inclusion (V h i k)) p.snd })\n⊢ ↑(↑(t h i j) (↑x).fst) ∈ V h j k\n[PROOFSTEP]\nrcases x with ⟨⟨⟨x, hx⟩, ⟨x', hx'⟩⟩, rfl : x = x'⟩\n[GOAL]\ncase refine'_1.mk.mk.mk.mk\nD : GlueData\nh : MkCore\ni j k : h.J\nx : ↑(U h i)\nhx : x ∈ V h i j\nhx' : x ∈ V h i k\n⊢ ↑(↑(t h i j)\n        (↑{ val := ({ val := x, property := hx }, { val := x, property := hx' }), property := (_ : x = x) }).fst) ∈\n    V h j k\n[PROOFSTEP]\nexact h.t_inter _ ⟨x, hx⟩ hx'\n[GOAL]\ncase refine'_2\nD : GlueData\nh : MkCore\ni j k : h.J\n⊢ Continuous fun x =>\n    {\n      val :=\n        ({ val := ↑(↑(t h i j) (↑x).fst), property := (_ : ↑(↑(t h i j) (↑x).fst) ∈ V h j k) }, ↑(t h i j) (↑x).fst),\n      property :=\n        (_ :\n          ↑(Opens.inclusion (V h j k))\n              ({ val := ↑(↑(t h i j) (↑x).fst), property := (_ : ↑(↑(t h i j) (↑x).fst) ∈ V h j k) },\n                  ↑(t h i j) (↑x).fst).fst =\n            ↑(Opens.inclusion (V h j k))\n              ({ val := ↑(↑(t h i j) (↑x).fst), property := (_ : ↑(↑(t h i j) (↑x).fst) ∈ V h j k) },\n                  ↑(t h i j) (↑x).fst).fst) }\n[PROOFSTEP]\nhave : Continuous (h.t i j) := map_continuous (self := ContinuousMap.toContinuousMapClass) _\n[GOAL]\ncase refine'_2\nD : GlueData\nh : MkCore\ni j k : h.J\nthis : Continuous ↑(t h i j)\n⊢ Continuous fun x =>\n    {\n      val :=\n        ({ val := ↑(↑(t h i j) (↑x).fst), property := (_ : ↑(↑(t h i j) (↑x).fst) ∈ V h j k) }, ↑(t h i j) (↑x).fst),\n      property :=\n        (_ :\n          ↑(Opens.inclusion (V h j k))\n              ({ val := ↑(↑(t h i j) (↑x).fst), property := (_ : ↑(↑(t h i j) (↑x).fst) ∈ V h j k) },\n                  ↑(t h i j) (↑x).fst).fst =\n            ↑(Opens.inclusion (V h j k))\n              ({ val := ↑(↑(t h i j) (↑x).fst), property := (_ : ↑(↑(t h i j) (↑x).fst) ∈ V h j k) },\n                  ↑(t h i j) (↑x).fst).fst) }\n[PROOFSTEP]\nexact ((Continuous.subtype_mk (by continuity) _).prod_mk (by continuity)).subtype_mk _\n[GOAL]\nD : GlueData\nh : MkCore\ni j k : h.J\nthis : Continuous ↑(t h i j)\n⊢ Continuous fun x => ↑(↑(t h i j) (↑x).fst)\n[PROOFSTEP]\ncontinuity\n[GOAL]\nD : GlueData\nh : MkCore\ni j k : h.J\nthis : Continuous ↑(t h i j)\n⊢ Continuous fun x => ↑(t h i j) (↑x).fst\n[PROOFSTEP]\ncontinuity\n[GOAL]\nD : GlueData\nh : MkCore\ni : h.J\n⊢ IsIso ((fun i j => Opens.inclusion (MkCore.V h i j)) i i)\n[PROOFSTEP]\ndsimp only\n[GOAL]\nD : GlueData\nh : MkCore\ni : h.J\n⊢ IsIso (Opens.inclusion (MkCore.V h i i))\n[PROOFSTEP]\nexact (h.V_id i).symm ▸ IsIso.of_iso (Opens.inclusionTopIso (h.U i))\n[GOAL]\nD : GlueData\nh : MkCore\ni : h.J\n⊢ MkCore.t h i i = 𝟙 ((fun i => (Opens.toTopCat (MkCore.U h i.fst)).obj (MkCore.V h i.fst i.snd)) (i, i))\n[PROOFSTEP]\next\n[GOAL]\ncase w\nD : GlueData\nh : MkCore\ni : h.J\nx✝ : (forget TopCat).obj ((Opens.toTopCat (MkCore.U h i)).obj (MkCore.V h i i))\n⊢ ↑(MkCore.t h i i) x✝ = ↑(𝟙 ((fun i => (Opens.toTopCat (MkCore.U h i.fst)).obj (MkCore.V h i.fst i.snd)) (i, i))) x✝\n[PROOFSTEP]\nrw [h.t_id]\n[GOAL]\ncase w\nD : GlueData\nh : MkCore\ni : h.J\nx✝ : (forget TopCat).obj ((Opens.toTopCat (MkCore.U h i)).obj (MkCore.V h i i))\n⊢ id x✝ = ↑(𝟙 ((fun i => (Opens.toTopCat (MkCore.U h i.fst)).obj (MkCore.V h i.fst i.snd)) (i, i))) x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nD : GlueData\nh : MkCore\ni j k : h.J\n⊢ MkCore.t' h i j k ≫ pullback.snd = pullback.fst ≫ MkCore.t h i j\n[PROOFSTEP]\ndelta MkCore.t'\n[GOAL]\nD : GlueData\nh : MkCore\ni j k : h.J\n⊢ ((pullbackIsoProdSubtype (Opens.inclusion (MkCore.V h i j)) (Opens.inclusion (MkCore.V h i k))).hom ≫\n        (ContinuousMap.mk fun x =>\n            {\n              val :=\n                ({ val := ↑(↑(MkCore.t h i j) (↑x).fst),\n                    property := (_ : ↑(↑(MkCore.t h i j) (↑x).fst) ∈ MkCore.V h j k) },\n                  ↑(MkCore.t h i j) (↑x).fst),\n              property :=\n                (_ :\n                  ↑(Opens.inclusion (MkCore.V h j k))\n                      ({ val := ↑(↑(MkCore.t h i j) (↑x).fst),\n                            property := (_ : ↑(↑(MkCore.t h i j) (↑x).fst) ∈ MkCore.V h j k) },\n                          ↑(MkCore.t h i j) (↑x).fst).fst =\n                    ↑(Opens.inclusion (MkCore.V h j k))\n                      ({ val := ↑(↑(MkCore.t h i j) (↑x).fst),\n                            property := (_ : ↑(↑(MkCore.t h i j) (↑x).fst) ∈ MkCore.V h j k) },\n                          ↑(MkCore.t h i j) (↑x).fst).fst) }) ≫\n          (pullbackIsoProdSubtype (Opens.inclusion (MkCore.V h j k)) (Opens.inclusion (MkCore.V h j i))).inv) ≫\n      pullback.snd =\n    pullback.fst ≫ MkCore.t h i j\n[PROOFSTEP]\nrw [Category.assoc, Category.assoc, pullbackIsoProdSubtype_inv_snd, ← Iso.eq_inv_comp,\n  pullbackIsoProdSubtype_inv_fst_assoc]\n[GOAL]\nD : GlueData\nh : MkCore\ni j k : h.J\n⊢ (ContinuousMap.mk fun x =>\n        {\n          val :=\n            ({ val := ↑(↑(MkCore.t h i j) (↑x).fst), property := (_ : ↑(↑(MkCore.t h i j) (↑x).fst) ∈ MkCore.V h j k) },\n              ↑(MkCore.t h i j) (↑x).fst),\n          property :=\n            (_ :\n              ↑(Opens.inclusion (MkCore.V h j k))\n                  ({ val := ↑(↑(MkCore.t h i j) (↑x).fst),\n                        property := (_ : ↑(↑(MkCore.t h i j) (↑x).fst) ∈ MkCore.V h j k) },\n                      ↑(MkCore.t h i j) (↑x).fst).fst =\n                ↑(Opens.inclusion (MkCore.V h j k))\n                  ({ val := ↑(↑(MkCore.t h i j) (↑x).fst),\n                        property := (_ : ↑(↑(MkCore.t h i j) (↑x).fst) ∈ MkCore.V h j k) },\n                      ↑(MkCore.t h i j) (↑x).fst).fst) }) ≫\n      pullbackSnd (Opens.inclusion (MkCore.V h j k)) (Opens.inclusion (MkCore.V h j i)) =\n    pullbackFst (Opens.inclusion (MkCore.V h i j)) (Opens.inclusion (MkCore.V h i k)) ≫ MkCore.t h i j\n[PROOFSTEP]\next ⟨⟨⟨x, hx⟩, ⟨x', hx'⟩⟩, rfl : x = x'⟩\n[GOAL]\ncase w.mk.mk.mk.mk\nD : GlueData\nh : MkCore\ni j k : h.J\nx : ↑(MkCore.U h i)\nhx : x ∈ MkCore.V h i j\nhx' : x ∈ MkCore.V h i k\n⊢ ↑((ContinuousMap.mk fun x =>\n            {\n              val :=\n                ({ val := ↑(↑(MkCore.t h i j) (↑x).fst),\n                    property := (_ : ↑(↑(MkCore.t h i j) (↑x).fst) ∈ MkCore.V h j k) },\n                  ↑(MkCore.t h i j) (↑x).fst),\n              property :=\n                (_ :\n                  ↑(Opens.inclusion (MkCore.V h j k))\n                      ({ val := ↑(↑(MkCore.t h i j) (↑x).fst),\n                            property := (_ : ↑(↑(MkCore.t h i j) (↑x).fst) ∈ MkCore.V h j k) },\n                          ↑(MkCore.t h i j) (↑x).fst).fst =\n                    ↑(Opens.inclusion (MkCore.V h j k))\n                      ({ val := ↑(↑(MkCore.t h i j) (↑x).fst),\n                            property := (_ : ↑(↑(MkCore.t h i j) (↑x).fst) ∈ MkCore.V h j k) },\n                          ↑(MkCore.t h i j) (↑x).fst).fst) }) ≫\n          pullbackSnd (Opens.inclusion (MkCore.V h j k)) (Opens.inclusion (MkCore.V h j i)))\n      { val := ({ val := x, property := hx }, { val := x, property := hx' }), property := (_ : x = x) } =\n    ↑(pullbackFst (Opens.inclusion (MkCore.V h i j)) (Opens.inclusion (MkCore.V h i k)) ≫ MkCore.t h i j)\n      { val := ({ val := x, property := hx }, { val := x, property := hx' }), property := (_ : x = x) }\n[PROOFSTEP]\nrfl\n[GOAL]\nD : GlueData\nh : MkCore\ni j k : h.J\n⊢ MkCore.t' h i j k ≫ MkCore.t' h j k i ≫ MkCore.t' h k i j =\n    𝟙 (pullback ((fun i j => Opens.inclusion (MkCore.V h i j)) i j) ((fun i j => Opens.inclusion (MkCore.V h i j)) i k))\n[PROOFSTEP]\ndelta MkCore.t'\n[GOAL]\nD : GlueData\nh : MkCore\ni j k : h.J\n⊢ ((pullbackIsoProdSubtype (Opens.inclusion (MkCore.V h i j)) (Opens.inclusion (MkCore.V h i k))).hom ≫\n        (ContinuousMap.mk fun x =>\n            {\n              val :=\n                ({ val := ↑(↑(MkCore.t h i j) (↑x).fst),\n                    property := (_ : ↑(↑(MkCore.t h i j) (↑x).fst) ∈ MkCore.V h j k) },\n                  ↑(MkCore.t h i j) (↑x).fst),\n              property :=\n                (_ :\n                  ↑(Opens.inclusion (MkCore.V h j k))\n                      ({ val := ↑(↑(MkCore.t h i j) (↑x).fst),\n                            property := (_ : ↑(↑(MkCore.t h i j) (↑x).fst) ∈ MkCore.V h j k) },\n                          ↑(MkCore.t h i j) (↑x).fst).fst =\n                    ↑(Opens.inclusion (MkCore.V h j k))\n                      ({ val := ↑(↑(MkCore.t h i j) (↑x).fst),\n                            property := (_ : ↑(↑(MkCore.t h i j) (↑x).fst) ∈ MkCore.V h j k) },\n                          ↑(MkCore.t h i j) (↑x).fst).fst) }) ≫\n          (pullbackIsoProdSubtype (Opens.inclusion (MkCore.V h j k)) (Opens.inclusion (MkCore.V h j i))).inv) ≫\n      ((pullbackIsoProdSubtype (Opens.inclusion (MkCore.V h j k)) (Opens.inclusion (MkCore.V h j i))).hom ≫\n          (ContinuousMap.mk fun x =>\n              {\n                val :=\n                  ({ val := ↑(↑(MkCore.t h j k) (↑x).fst),\n                      property := (_ : ↑(↑(MkCore.t h j k) (↑x).fst) ∈ MkCore.V h k i) },\n                    ↑(MkCore.t h j k) (↑x).fst),\n                property :=\n                  (_ :\n                    ↑(Opens.inclusion (MkCore.V h k i))\n                        ({ val := ↑(↑(MkCore.t h j k) (↑x).fst),\n                              property := (_ : ↑(↑(MkCore.t h j k) (↑x).fst) ∈ MkCore.V h k i) },\n                            ↑(MkCore.t h j k) (↑x).fst).fst =\n                      ↑(Opens.inclusion (MkCore.V h k i))\n                        ({ val := ↑(↑(MkCore.t h j k) (↑x).fst),\n                              property := (_ : ↑(↑(MkCore.t h j k) (↑x).fst) ∈ MkCore.V h k i) },\n                            ↑(MkCore.t h j k) (↑x).fst).fst) }) ≫\n            (pullbackIsoProdSubtype (Opens.inclusion (MkCore.V h k i)) (Opens.inclusion (MkCore.V h k j))).inv) ≫\n        (pullbackIsoProdSubtype (Opens.inclusion (MkCore.V h k i)) (Opens.inclusion (MkCore.V h k j))).hom ≫\n          (ContinuousMap.mk fun x =>\n              {\n                val :=\n                  ({ val := ↑(↑(MkCore.t h k i) (↑x).fst),\n                      property := (_ : ↑(↑(MkCore.t h k i) (↑x).fst) ∈ MkCore.V h i j) },\n                    ↑(MkCore.t h k i) (↑x).fst),\n                property :=\n                  (_ :\n                    ↑(Opens.inclusion (MkCore.V h i j))\n                        ({ val := ↑(↑(MkCore.t h k i) (↑x).fst),\n                              property := (_ : ↑(↑(MkCore.t h k i) (↑x).fst) ∈ MkCore.V h i j) },\n                            ↑(MkCore.t h k i) (↑x).fst).fst =\n                      ↑(Opens.inclusion (MkCore.V h i j))\n                        ({ val := ↑(↑(MkCore.t h k i) (↑x).fst),\n                              property := (_ : ↑(↑(MkCore.t h k i) (↑x).fst) ∈ MkCore.V h i j) },\n                            ↑(MkCore.t h k i) (↑x).fst).fst) }) ≫\n            (pullbackIsoProdSubtype (Opens.inclusion (MkCore.V h i j)) (Opens.inclusion (MkCore.V h i k))).inv =\n    𝟙 (pullback ((fun i j => Opens.inclusion (MkCore.V h i j)) i j) ((fun i j => Opens.inclusion (MkCore.V h i j)) i k))\n[PROOFSTEP]\nsimp_rw [← Category.assoc]\n[GOAL]\nD : GlueData\nh : MkCore\ni j k : h.J\n⊢ ((((((((pullbackIsoProdSubtype (Opens.inclusion (MkCore.V h i j)) (Opens.inclusion (MkCore.V h i k))).hom ≫\n                    ContinuousMap.mk fun x =>\n                      {\n                        val :=\n                          ({ val := ↑(↑(MkCore.t h i j) (↑x).fst),\n                              property := (_ : ↑(↑(MkCore.t h i j) (↑x).fst) ∈ MkCore.V h j k) },\n                            ↑(MkCore.t h i j) (↑x).fst),\n                        property :=\n                          (_ :\n                            ↑(Opens.inclusion (MkCore.V h j k))\n                                ({ val := ↑(↑(MkCore.t h i j) (↑x).fst),\n                                      property := (_ : ↑(↑(MkCore.t h i j) (↑x).fst) ∈ MkCore.V h j k) },\n                                    ↑(MkCore.t h i j) (↑x).fst).fst =\n                              ↑(Opens.inclusion (MkCore.V h j k))\n                                ({ val := ↑(↑(MkCore.t h i j) (↑x).fst),\n                                      property := (_ : ↑(↑(MkCore.t h i j) (↑x).fst) ∈ MkCore.V h j k) },\n                                    ↑(MkCore.t h i j) (↑x).fst).fst) }) ≫\n                  (pullbackIsoProdSubtype (Opens.inclusion (MkCore.V h j k)) (Opens.inclusion (MkCore.V h j i))).inv) ≫\n                (pullbackIsoProdSubtype (Opens.inclusion (MkCore.V h j k)) (Opens.inclusion (MkCore.V h j i))).hom) ≫\n              ContinuousMap.mk fun x =>\n                {\n                  val :=\n                    ({ val := ↑(↑(MkCore.t h j k) (↑x).fst),\n                        property := (_ : ↑(↑(MkCore.t h j k) (↑x).fst) ∈ MkCore.V h k i) },\n                      ↑(MkCore.t h j k) (↑x).fst),\n                  property :=\n                    (_ :\n                      ↑(Opens.inclusion (MkCore.V h k i))\n                          ({ val := ↑(↑(MkCore.t h j k) (↑x).fst),\n                                property := (_ : ↑(↑(MkCore.t h j k) (↑x).fst) ∈ MkCore.V h k i) },\n                              ↑(MkCore.t h j k) (↑x).fst).fst =\n                        ↑(Opens.inclusion (MkCore.V h k i))\n                          ({ val := ↑(↑(MkCore.t h j k) (↑x).fst),\n                                property := (_ : ↑(↑(MkCore.t h j k) (↑x).fst) ∈ MkCore.V h k i) },\n                              ↑(MkCore.t h j k) (↑x).fst).fst) }) ≫\n            (pullbackIsoProdSubtype (Opens.inclusion (MkCore.V h k i)) (Opens.inclusion (MkCore.V h k j))).inv) ≫\n          (pullbackIsoProdSubtype (Opens.inclusion (MkCore.V h k i)) (Opens.inclusion (MkCore.V h k j))).hom) ≫\n        ContinuousMap.mk fun x =>\n          {\n            val :=\n              ({ val := ↑(↑(MkCore.t h k i) (↑x).fst),\n                  property := (_ : ↑(↑(MkCore.t h k i) (↑x).fst) ∈ MkCore.V h i j) },\n                ↑(MkCore.t h k i) (↑x).fst),\n            property :=\n              (_ :\n                ↑(Opens.inclusion (MkCore.V h i j))\n                    ({ val := ↑(↑(MkCore.t h k i) (↑x).fst),\n                          property := (_ : ↑(↑(MkCore.t h k i) (↑x).fst) ∈ MkCore.V h i j) },\n                        ↑(MkCore.t h k i) (↑x).fst).fst =\n                  ↑(Opens.inclusion (MkCore.V h i j))\n                    ({ val := ↑(↑(MkCore.t h k i) (↑x).fst),\n                          property := (_ : ↑(↑(MkCore.t h k i) (↑x).fst) ∈ MkCore.V h i j) },\n                        ↑(MkCore.t h k i) (↑x).fst).fst) }) ≫\n      (pullbackIsoProdSubtype (Opens.inclusion (MkCore.V h i j)) (Opens.inclusion (MkCore.V h i k))).inv =\n    𝟙 (pullback (Opens.inclusion (MkCore.V h i j)) (Opens.inclusion (MkCore.V h i k)))\n[PROOFSTEP]\nrw [Iso.comp_inv_eq]\n[GOAL]\nD : GlueData\nh : MkCore\ni j k : h.J\n⊢ ((((((((pullbackIsoProdSubtype (Opens.inclusion (MkCore.V h i j)) (Opens.inclusion (MkCore.V h i k))).hom ≫\n                  ContinuousMap.mk fun x =>\n                    {\n                      val :=\n                        ({ val := ↑(↑(MkCore.t h i j) (↑x).fst),\n                            property := (_ : ↑(↑(MkCore.t h i j) (↑x).fst) ∈ MkCore.V h j k) },\n                          ↑(MkCore.t h i j) (↑x).fst),\n                      property :=\n                        (_ :\n                          ↑(Opens.inclusion (MkCore.V h j k))\n                              ({ val := ↑(↑(MkCore.t h i j) (↑x).fst),\n                                    property := (_ : ↑(↑(MkCore.t h i j) (↑x).fst) ∈ MkCore.V h j k) },\n                                  ↑(MkCore.t h i j) (↑x).fst).fst =\n                            ↑(Opens.inclusion (MkCore.V h j k))\n                              ({ val := ↑(↑(MkCore.t h i j) (↑x).fst),\n                                    property := (_ : ↑(↑(MkCore.t h i j) (↑x).fst) ∈ MkCore.V h j k) },\n                                  ↑(MkCore.t h i j) (↑x).fst).fst) }) ≫\n                (pullbackIsoProdSubtype (Opens.inclusion (MkCore.V h j k)) (Opens.inclusion (MkCore.V h j i))).inv) ≫\n              (pullbackIsoProdSubtype (Opens.inclusion (MkCore.V h j k)) (Opens.inclusion (MkCore.V h j i))).hom) ≫\n            ContinuousMap.mk fun x =>\n              {\n                val :=\n                  ({ val := ↑(↑(MkCore.t h j k) (↑x).fst),\n                      property := (_ : ↑(↑(MkCore.t h j k) (↑x).fst) ∈ MkCore.V h k i) },\n                    ↑(MkCore.t h j k) (↑x).fst),\n                property :=\n                  (_ :\n                    ↑(Opens.inclusion (MkCore.V h k i))\n                        ({ val := ↑(↑(MkCore.t h j k) (↑x).fst),\n                              property := (_ : ↑(↑(MkCore.t h j k) (↑x).fst) ∈ MkCore.V h k i) },\n                            ↑(MkCore.t h j k) (↑x).fst).fst =\n                      ↑(Opens.inclusion (MkCore.V h k i))\n                        ({ val := ↑(↑(MkCore.t h j k) (↑x).fst),\n                              property := (_ : ↑(↑(MkCore.t h j k) (↑x).fst) ∈ MkCore.V h k i) },\n                            ↑(MkCore.t h j k) (↑x).fst).fst) }) ≫\n          (pullbackIsoProdSubtype (Opens.inclusion (MkCore.V h k i)) (Opens.inclusion (MkCore.V h k j))).inv) ≫\n        (pullbackIsoProdSubtype (Opens.inclusion (MkCore.V h k i)) (Opens.inclusion (MkCore.V h k j))).hom) ≫\n      ContinuousMap.mk fun x =>\n        {\n          val :=\n            ({ val := ↑(↑(MkCore.t h k i) (↑x).fst), property := (_ : ↑(↑(MkCore.t h k i) (↑x).fst) ∈ MkCore.V h i j) },\n              ↑(MkCore.t h k i) (↑x).fst),\n          property :=\n            (_ :\n              ↑(Opens.inclusion (MkCore.V h i j))\n                  ({ val := ↑(↑(MkCore.t h k i) (↑x).fst),\n                        property := (_ : ↑(↑(MkCore.t h k i) (↑x).fst) ∈ MkCore.V h i j) },\n                      ↑(MkCore.t h k i) (↑x).fst).fst =\n                ↑(Opens.inclusion (MkCore.V h i j))\n                  ({ val := ↑(↑(MkCore.t h k i) (↑x).fst),\n                        property := (_ : ↑(↑(MkCore.t h k i) (↑x).fst) ∈ MkCore.V h i j) },\n                      ↑(MkCore.t h k i) (↑x).fst).fst) }) =\n    𝟙 (pullback (Opens.inclusion (MkCore.V h i j)) (Opens.inclusion (MkCore.V h i k))) ≫\n      (pullbackIsoProdSubtype (Opens.inclusion (MkCore.V h i j)) (Opens.inclusion (MkCore.V h i k))).hom\n[PROOFSTEP]\nsimp only [Iso.inv_hom_id_assoc, Category.assoc, Category.id_comp]\n[GOAL]\nD : GlueData\nh : MkCore\ni j k : h.J\n⊢ ((pullbackIsoProdSubtype (Opens.inclusion (MkCore.V h i j)) (Opens.inclusion (MkCore.V h i k))).hom ≫\n      (ContinuousMap.mk fun x =>\n          {\n            val :=\n              ({ val := ↑(↑(MkCore.t h i j) (↑x).fst),\n                  property := (_ : ↑(↑(MkCore.t h i j) (↑x).fst) ∈ MkCore.V h j k) },\n                ↑(MkCore.t h i j) (↑x).fst),\n            property :=\n              (_ :\n                ↑(Opens.inclusion (MkCore.V h j k))\n                    ({ val := ↑(↑(MkCore.t h i j) (↑x).fst),\n                          property := (_ : ↑(↑(MkCore.t h i j) (↑x).fst) ∈ MkCore.V h j k) },\n                        ↑(MkCore.t h i j) (↑x).fst).fst =\n                  ↑(Opens.inclusion (MkCore.V h j k))\n                    ({ val := ↑(↑(MkCore.t h i j) (↑x).fst),\n                          property := (_ : ↑(↑(MkCore.t h i j) (↑x).fst) ∈ MkCore.V h j k) },\n                        ↑(MkCore.t h i j) (↑x).fst).fst) }) ≫\n        (ContinuousMap.mk fun x =>\n            {\n              val :=\n                ({ val := ↑(↑(MkCore.t h j k) (↑x).fst),\n                    property := (_ : ↑(↑(MkCore.t h j k) (↑x).fst) ∈ MkCore.V h k i) },\n                  ↑(MkCore.t h j k) (↑x).fst),\n              property :=\n                (_ :\n                  ↑(Opens.inclusion (MkCore.V h k i))\n                      ({ val := ↑(↑(MkCore.t h j k) (↑x).fst),\n                            property := (_ : ↑(↑(MkCore.t h j k) (↑x).fst) ∈ MkCore.V h k i) },\n                          ↑(MkCore.t h j k) (↑x).fst).fst =\n                    ↑(Opens.inclusion (MkCore.V h k i))\n                      ({ val := ↑(↑(MkCore.t h j k) (↑x).fst),\n                            property := (_ : ↑(↑(MkCore.t h j k) (↑x).fst) ∈ MkCore.V h k i) },\n                          ↑(MkCore.t h j k) (↑x).fst).fst) }) ≫\n          ContinuousMap.mk fun x =>\n            {\n              val :=\n                ({ val := ↑(↑(MkCore.t h k i) (↑x).fst),\n                    property := (_ : ↑(↑(MkCore.t h k i) (↑x).fst) ∈ MkCore.V h i j) },\n                  ↑(MkCore.t h k i) (↑x).fst),\n              property :=\n                (_ :\n                  ↑(Opens.inclusion (MkCore.V h i j))\n                      ({ val := ↑(↑(MkCore.t h k i) (↑x).fst),\n                            property := (_ : ↑(↑(MkCore.t h k i) (↑x).fst) ∈ MkCore.V h i j) },\n                          ↑(MkCore.t h k i) (↑x).fst).fst =\n                    ↑(Opens.inclusion (MkCore.V h i j))\n                      ({ val := ↑(↑(MkCore.t h k i) (↑x).fst),\n                            property := (_ : ↑(↑(MkCore.t h k i) (↑x).fst) ∈ MkCore.V h i j) },\n                          ↑(MkCore.t h k i) (↑x).fst).fst) }) =\n    (pullbackIsoProdSubtype (Opens.inclusion (MkCore.V h i j)) (Opens.inclusion (MkCore.V h i k))).hom\n[PROOFSTEP]\nrw [← Iso.eq_inv_comp, Iso.inv_hom_id]\n[GOAL]\nD : GlueData\nh : MkCore\ni j k : h.J\n⊢ ((ContinuousMap.mk fun x =>\n        {\n          val :=\n            ({ val := ↑(↑(MkCore.t h i j) (↑x).fst), property := (_ : ↑(↑(MkCore.t h i j) (↑x).fst) ∈ MkCore.V h j k) },\n              ↑(MkCore.t h i j) (↑x).fst),\n          property :=\n            (_ :\n              ↑(Opens.inclusion (MkCore.V h j k))\n                  ({ val := ↑(↑(MkCore.t h i j) (↑x).fst),\n                        property := (_ : ↑(↑(MkCore.t h i j) (↑x).fst) ∈ MkCore.V h j k) },\n                      ↑(MkCore.t h i j) (↑x).fst).fst =\n                ↑(Opens.inclusion (MkCore.V h j k))\n                  ({ val := ↑(↑(MkCore.t h i j) (↑x).fst),\n                        property := (_ : ↑(↑(MkCore.t h i j) (↑x).fst) ∈ MkCore.V h j k) },\n                      ↑(MkCore.t h i j) (↑x).fst).fst) }) ≫\n      (ContinuousMap.mk fun x =>\n          {\n            val :=\n              ({ val := ↑(↑(MkCore.t h j k) (↑x).fst),\n                  property := (_ : ↑(↑(MkCore.t h j k) (↑x).fst) ∈ MkCore.V h k i) },\n                ↑(MkCore.t h j k) (↑x).fst),\n            property :=\n              (_ :\n                ↑(Opens.inclusion (MkCore.V h k i))\n                    ({ val := ↑(↑(MkCore.t h j k) (↑x).fst),\n                          property := (_ : ↑(↑(MkCore.t h j k) (↑x).fst) ∈ MkCore.V h k i) },\n                        ↑(MkCore.t h j k) (↑x).fst).fst =\n                  ↑(Opens.inclusion (MkCore.V h k i))\n                    ({ val := ↑(↑(MkCore.t h j k) (↑x).fst),\n                          property := (_ : ↑(↑(MkCore.t h j k) (↑x).fst) ∈ MkCore.V h k i) },\n                        ↑(MkCore.t h j k) (↑x).fst).fst) }) ≫\n        ContinuousMap.mk fun x =>\n          {\n            val :=\n              ({ val := ↑(↑(MkCore.t h k i) (↑x).fst),\n                  property := (_ : ↑(↑(MkCore.t h k i) (↑x).fst) ∈ MkCore.V h i j) },\n                ↑(MkCore.t h k i) (↑x).fst),\n            property :=\n              (_ :\n                ↑(Opens.inclusion (MkCore.V h i j))\n                    ({ val := ↑(↑(MkCore.t h k i) (↑x).fst),\n                          property := (_ : ↑(↑(MkCore.t h k i) (↑x).fst) ∈ MkCore.V h i j) },\n                        ↑(MkCore.t h k i) (↑x).fst).fst =\n                  ↑(Opens.inclusion (MkCore.V h i j))\n                    ({ val := ↑(↑(MkCore.t h k i) (↑x).fst),\n                          property := (_ : ↑(↑(MkCore.t h k i) (↑x).fst) ∈ MkCore.V h i j) },\n                        ↑(MkCore.t h k i) (↑x).fst).fst) }) =\n    𝟙 (of { p // ↑(Opens.inclusion (MkCore.V h i j)) p.fst = ↑(Opens.inclusion (MkCore.V h i k)) p.snd })\n[PROOFSTEP]\next1 ⟨⟨⟨x, hx⟩, ⟨x', hx'⟩⟩, rfl : x = x'⟩\n[GOAL]\ncase w.mk.mk.mk.mk\nD : GlueData\nh : MkCore\ni j k : h.J\nx : ↑(MkCore.U h i)\nhx : x ∈ MkCore.V h i j\nhx' : x ∈ MkCore.V h i k\n⊢ ↑((ContinuousMap.mk fun x =>\n            {\n              val :=\n                ({ val := ↑(↑(MkCore.t h i j) (↑x).fst),\n                    property := (_ : ↑(↑(MkCore.t h i j) (↑x).fst) ∈ MkCore.V h j k) },\n                  ↑(MkCore.t h i j) (↑x).fst),\n              property :=\n                (_ :\n                  ↑(Opens.inclusion (MkCore.V h j k))\n                      ({ val := ↑(↑(MkCore.t h i j) (↑x).fst),\n                            property := (_ : ↑(↑(MkCore.t h i j) (↑x).fst) ∈ MkCore.V h j k) },\n                          ↑(MkCore.t h i j) (↑x).fst).fst =\n                    ↑(Opens.inclusion (MkCore.V h j k))\n                      ({ val := ↑(↑(MkCore.t h i j) (↑x).fst),\n                            property := (_ : ↑(↑(MkCore.t h i j) (↑x).fst) ∈ MkCore.V h j k) },\n                          ↑(MkCore.t h i j) (↑x).fst).fst) }) ≫\n          (ContinuousMap.mk fun x =>\n              {\n                val :=\n                  ({ val := ↑(↑(MkCore.t h j k) (↑x).fst),\n                      property := (_ : ↑(↑(MkCore.t h j k) (↑x).fst) ∈ MkCore.V h k i) },\n                    ↑(MkCore.t h j k) (↑x).fst),\n                property :=\n                  (_ :\n                    ↑(Opens.inclusion (MkCore.V h k i))\n                        ({ val := ↑(↑(MkCore.t h j k) (↑x).fst),\n                              property := (_ : ↑(↑(MkCore.t h j k) (↑x).fst) ∈ MkCore.V h k i) },\n                            ↑(MkCore.t h j k) (↑x).fst).fst =\n                      ↑(Opens.inclusion (MkCore.V h k i))\n                        ({ val := ↑(↑(MkCore.t h j k) (↑x).fst),\n                              property := (_ : ↑(↑(MkCore.t h j k) (↑x).fst) ∈ MkCore.V h k i) },\n                            ↑(MkCore.t h j k) (↑x).fst).fst) }) ≫\n            ContinuousMap.mk fun x =>\n              {\n                val :=\n                  ({ val := ↑(↑(MkCore.t h k i) (↑x).fst),\n                      property := (_ : ↑(↑(MkCore.t h k i) (↑x).fst) ∈ MkCore.V h i j) },\n                    ↑(MkCore.t h k i) (↑x).fst),\n                property :=\n                  (_ :\n                    ↑(Opens.inclusion (MkCore.V h i j))\n                        ({ val := ↑(↑(MkCore.t h k i) (↑x).fst),\n                              property := (_ : ↑(↑(MkCore.t h k i) (↑x).fst) ∈ MkCore.V h i j) },\n                            ↑(MkCore.t h k i) (↑x).fst).fst =\n                      ↑(Opens.inclusion (MkCore.V h i j))\n                        ({ val := ↑(↑(MkCore.t h k i) (↑x).fst),\n                              property := (_ : ↑(↑(MkCore.t h k i) (↑x).fst) ∈ MkCore.V h i j) },\n                            ↑(MkCore.t h k i) (↑x).fst).fst) })\n      { val := ({ val := x, property := hx }, { val := x, property := hx' }), property := (_ : x = x) } =\n    ↑(𝟙 (of { p // ↑(Opens.inclusion (MkCore.V h i j)) p.fst = ↑(Opens.inclusion (MkCore.V h i k)) p.snd }))\n      { val := ({ val := x, property := hx }, { val := x, property := hx' }), property := (_ : x = x) }\n[PROOFSTEP]\nrw [comp_app, ContinuousMap.coe_mk, comp_app, id_app, ContinuousMap.coe_mk, Subtype.mk_eq_mk, Prod.mk.inj_iff,\n  Subtype.mk_eq_mk, Subtype.ext_iff, and_self_iff]\n[GOAL]\ncase w.mk.mk.mk.mk\nD : GlueData\nh : MkCore\ni j k : h.J\nx : ↑(MkCore.U h i)\nhx : x ∈ MkCore.V h i j\nhx' : x ∈ MkCore.V h i k\n⊢ ↑(↑(MkCore.t h k i)\n        (↑(↑(ContinuousMap.mk fun x =>\n                  {\n                    val :=\n                      ({ val := ↑(↑(MkCore.t h j k) (↑x).fst),\n                          property := (_ : ↑(↑(MkCore.t h j k) (↑x).fst) ∈ MkCore.V h k i) },\n                        ↑(MkCore.t h j k) (↑x).fst),\n                    property :=\n                      (_ :\n                        ↑(Opens.inclusion (MkCore.V h k i))\n                            ({ val := ↑(↑(MkCore.t h j k) (↑x).fst),\n                                  property := (_ : ↑(↑(MkCore.t h j k) (↑x).fst) ∈ MkCore.V h k i) },\n                                ↑(MkCore.t h j k) (↑x).fst).fst =\n                          ↑(Opens.inclusion (MkCore.V h k i))\n                            ({ val := ↑(↑(MkCore.t h j k) (↑x).fst),\n                                  property := (_ : ↑(↑(MkCore.t h j k) (↑x).fst) ∈ MkCore.V h k i) },\n                                ↑(MkCore.t h j k) (↑x).fst).fst) })\n              {\n                val :=\n                  ({\n                      val :=\n                        ↑(↑(MkCore.t h i j)\n                            (↑{ val := ({ val := x, property := hx }, { val := x, property := hx' }),\n                                  property := (_ : x = x) }).fst),\n                      property :=\n                        (_ :\n                          ↑(↑(MkCore.t h i j)\n                                (↑{ val := ({ val := x, property := hx }, { val := x, property := hx' }),\n                                      property := (_ : x = x) }).fst) ∈\n                            MkCore.V h j k) },\n                    ↑(MkCore.t h i j)\n                      (↑{ val := ({ val := x, property := hx }, { val := x, property := hx' }),\n                            property := (_ : x = x) }).fst),\n                property :=\n                  (_ :\n                    ↑(Opens.inclusion (MkCore.V h j k))\n                        ({\n                              val :=\n                                ↑(↑(MkCore.t h i j)\n                                    (↑{ val := ({ val := x, property := hx }, { val := x, property := hx' }),\n                                          property := (_ : x = x) }).fst),\n                              property :=\n                                (_ :\n                                  ↑(↑(MkCore.t h i j)\n                                        (↑{ val := ({ val := x, property := hx }, { val := x, property := hx' }),\n                                              property := (_ : x = x) }).fst) ∈\n                                    MkCore.V h j k) },\n                            ↑(MkCore.t h i j)\n                              (↑{ val := ({ val := x, property := hx }, { val := x, property := hx' }),\n                                    property := (_ : x = x) }).fst).fst =\n                      ↑(Opens.inclusion (MkCore.V h j k))\n                        ({\n                              val :=\n                                ↑(↑(MkCore.t h i j)\n                                    (↑{ val := ({ val := x, property := hx }, { val := x, property := hx' }),\n                                          property := (_ : x = x) }).fst),\n                              property :=\n                                (_ :\n                                  ↑(↑(MkCore.t h i j)\n                                        (↑{ val := ({ val := x, property := hx }, { val := x, property := hx' }),\n                                              property := (_ : x = x) }).fst) ∈\n                                    MkCore.V h j k) },\n                            ↑(MkCore.t h i j)\n                              (↑{ val := ({ val := x, property := hx }, { val := x, property := hx' }),\n                                    property := (_ : x = x) }).fst).fst) })).fst) =\n    x\n[PROOFSTEP]\nconvert congr_arg Subtype.val (h.t_inv k i ⟨x, hx'⟩) using 3\n[GOAL]\ncase h.e'_2.h.e'_3.h.e'_6\nD : GlueData\nh : MkCore\ni j k : h.J\nx : ↑(MkCore.U h i)\nhx : x ∈ MkCore.V h i j\nhx' : x ∈ MkCore.V h i k\n⊢ (↑(↑(ContinuousMap.mk fun x =>\n              {\n                val :=\n                  ({ val := ↑(↑(MkCore.t h j k) (↑x).fst),\n                      property := (_ : ↑(↑(MkCore.t h j k) (↑x).fst) ∈ MkCore.V h k i) },\n                    ↑(MkCore.t h j k) (↑x).fst),\n                property :=\n                  (_ :\n                    ↑(Opens.inclusion (MkCore.V h k i))\n                        ({ val := ↑(↑(MkCore.t h j k) (↑x).fst),\n                              property := (_ : ↑(↑(MkCore.t h j k) (↑x).fst) ∈ MkCore.V h k i) },\n                            ↑(MkCore.t h j k) (↑x).fst).fst =\n                      ↑(Opens.inclusion (MkCore.V h k i))\n                        ({ val := ↑(↑(MkCore.t h j k) (↑x).fst),\n                              property := (_ : ↑(↑(MkCore.t h j k) (↑x).fst) ∈ MkCore.V h k i) },\n                            ↑(MkCore.t h j k) (↑x).fst).fst) })\n          {\n            val :=\n              ({\n                  val :=\n                    ↑(↑(MkCore.t h i j)\n                        (↑{ val := ({ val := x, property := hx }, { val := x, property := hx' }),\n                              property := (_ : x = x) }).fst),\n                  property :=\n                    (_ :\n                      ↑(↑(MkCore.t h i j)\n                            (↑{ val := ({ val := x, property := hx }, { val := x, property := hx' }),\n                                  property := (_ : x = x) }).fst) ∈\n                        MkCore.V h j k) },\n                ↑(MkCore.t h i j)\n                  (↑{ val := ({ val := x, property := hx }, { val := x, property := hx' }),\n                        property := (_ : x = x) }).fst),\n            property :=\n              (_ :\n                ↑(Opens.inclusion (MkCore.V h j k))\n                    ({\n                          val :=\n                            ↑(↑(MkCore.t h i j)\n                                (↑{ val := ({ val := x, property := hx }, { val := x, property := hx' }),\n                                      property := (_ : x = x) }).fst),\n                          property :=\n                            (_ :\n                              ↑(↑(MkCore.t h i j)\n                                    (↑{ val := ({ val := x, property := hx }, { val := x, property := hx' }),\n                                          property := (_ : x = x) }).fst) ∈\n                                MkCore.V h j k) },\n                        ↑(MkCore.t h i j)\n                          (↑{ val := ({ val := x, property := hx }, { val := x, property := hx' }),\n                                property := (_ : x = x) }).fst).fst =\n                  ↑(Opens.inclusion (MkCore.V h j k))\n                    ({\n                          val :=\n                            ↑(↑(MkCore.t h i j)\n                                (↑{ val := ({ val := x, property := hx }, { val := x, property := hx' }),\n                                      property := (_ : x = x) }).fst),\n                          property :=\n                            (_ :\n                              ↑(↑(MkCore.t h i j)\n                                    (↑{ val := ({ val := x, property := hx }, { val := x, property := hx' }),\n                                          property := (_ : x = x) }).fst) ∈\n                                MkCore.V h j k) },\n                        ↑(MkCore.t h i j)\n                          (↑{ val := ({ val := x, property := hx }, { val := x, property := hx' }),\n                                property := (_ : x = x) }).fst).fst) })).fst =\n    ↑(MkCore.t h i k) { val := x, property := hx' }\n[PROOFSTEP]\nrefine Subtype.ext ?_\n[GOAL]\ncase h.e'_2.h.e'_3.h.e'_6\nD : GlueData\nh : MkCore\ni j k : h.J\nx : ↑(MkCore.U h i)\nhx : x ∈ MkCore.V h i j\nhx' : x ∈ MkCore.V h i k\n⊢ ↑(↑(↑(ContinuousMap.mk fun x =>\n                {\n                  val :=\n                    ({ val := ↑(↑(MkCore.t h j k) (↑x).fst),\n                        property := (_ : ↑(↑(MkCore.t h j k) (↑x).fst) ∈ MkCore.V h k i) },\n                      ↑(MkCore.t h j k) (↑x).fst),\n                  property :=\n                    (_ :\n                      ↑(Opens.inclusion (MkCore.V h k i))\n                          ({ val := ↑(↑(MkCore.t h j k) (↑x).fst),\n                                property := (_ : ↑(↑(MkCore.t h j k) (↑x).fst) ∈ MkCore.V h k i) },\n                              ↑(MkCore.t h j k) (↑x).fst).fst =\n                        ↑(Opens.inclusion (MkCore.V h k i))\n                          ({ val := ↑(↑(MkCore.t h j k) (↑x).fst),\n                                property := (_ : ↑(↑(MkCore.t h j k) (↑x).fst) ∈ MkCore.V h k i) },\n                              ↑(MkCore.t h j k) (↑x).fst).fst) })\n            {\n              val :=\n                ({\n                    val :=\n                      ↑(↑(MkCore.t h i j)\n                          (↑{ val := ({ val := x, property := hx }, { val := x, property := hx' }),\n                                property := (_ : x = x) }).fst),\n                    property :=\n                      (_ :\n                        ↑(↑(MkCore.t h i j)\n                              (↑{ val := ({ val := x, property := hx }, { val := x, property := hx' }),\n                                    property := (_ : x = x) }).fst) ∈\n                          MkCore.V h j k) },\n                  ↑(MkCore.t h i j)\n                    (↑{ val := ({ val := x, property := hx }, { val := x, property := hx' }),\n                          property := (_ : x = x) }).fst),\n              property :=\n                (_ :\n                  ↑(Opens.inclusion (MkCore.V h j k))\n                      ({\n                            val :=\n                              ↑(↑(MkCore.t h i j)\n                                  (↑{ val := ({ val := x, property := hx }, { val := x, property := hx' }),\n                                        property := (_ : x = x) }).fst),\n                            property :=\n                              (_ :\n                                ↑(↑(MkCore.t h i j)\n                                      (↑{ val := ({ val := x, property := hx }, { val := x, property := hx' }),\n                                            property := (_ : x = x) }).fst) ∈\n                                  MkCore.V h j k) },\n                          ↑(MkCore.t h i j)\n                            (↑{ val := ({ val := x, property := hx }, { val := x, property := hx' }),\n                                  property := (_ : x = x) }).fst).fst =\n                    ↑(Opens.inclusion (MkCore.V h j k))\n                      ({\n                            val :=\n                              ↑(↑(MkCore.t h i j)\n                                  (↑{ val := ({ val := x, property := hx }, { val := x, property := hx' }),\n                                        property := (_ : x = x) }).fst),\n                            property :=\n                              (_ :\n                                ↑(↑(MkCore.t h i j)\n                                      (↑{ val := ({ val := x, property := hx }, { val := x, property := hx' }),\n                                            property := (_ : x = x) }).fst) ∈\n                                  MkCore.V h j k) },\n                          ↑(MkCore.t h i j)\n                            (↑{ val := ({ val := x, property := hx }, { val := x, property := hx' }),\n                                  property := (_ : x = x) }).fst).fst) })).fst =\n    ↑(↑(MkCore.t h i k) { val := x, property := hx' })\n[PROOFSTEP]\nexact h.cocycle i j k ⟨x, hx⟩ hx'\n[GOAL]\nD : GlueData\nα : Type u\ninst✝ : TopologicalSpace α\nJ : Type u\nU : J → Opens α\ni j : J\n⊢ Continuous fun x =>\n    { val := { val := ↑↑x, property := (_ : ↑x ∈ (fun i j => (Opens.map (Opens.inclusion (U i))).obj (U j)) i j) },\n      property := (_ : ↑↑x ∈ U i) }\n[PROOFSTEP]\nrefine Continuous.subtype_mk ?_ ?_\n[GOAL]\nD : GlueData\nα : Type u\ninst✝ : TopologicalSpace α\nJ : Type u\nU : J → Opens α\ni j : J\n⊢ Continuous fun x =>\n    { val := ↑↑x, property := (_ : ↑x ∈ (fun i j => (Opens.map (Opens.inclusion (U i))).obj (U j)) i j) }\n[PROOFSTEP]\nrefine Continuous.subtype_mk ?_ ?_\n[GOAL]\nD : GlueData\nα : Type u\ninst✝ : TopologicalSpace α\nJ : Type u\nU : J → Opens α\ni j : J\n⊢ Continuous fun x => ↑↑x\n[PROOFSTEP]\ncontinuity\n[GOAL]\nD : GlueData\nα : Type u\ninst✝ : TopologicalSpace α\nJ : Type u\nU : J → Opens α\ni : J\n⊢ (fun i j => (Opens.map (Opens.inclusion (U i))).obj (U j)) i i = ⊤\n[PROOFSTEP]\next\n  -- porting note: no longer needed `cases U i`!\n[GOAL]\ncase h.h\nD : GlueData\nα : Type u\ninst✝ : TopologicalSpace α\nJ : Type u\nU : J → Opens α\ni : J\nx✝ : ↑((Opens.toTopCat (of α)).obj (U i))\n⊢ x✝ ∈ ↑((fun i j => (Opens.map (Opens.inclusion (U i))).obj (U j)) i i) ↔ x✝ ∈ ↑⊤\n[PROOFSTEP]\nsimp\n[GOAL]\nD : GlueData\nα : Type u\ninst✝ : TopologicalSpace α\nJ : Type u\nU : J → Opens α\ni : J\n⊢ ↑((fun i j =>\n          ContinuousMap.mk fun x =>\n            {\n              val :=\n                { val := ↑↑x, property := (_ : ↑x ∈ (fun i j => (Opens.map (Opens.inclusion (U i))).obj (U j)) i j) },\n              property := (_ : ↑↑x ∈ U i) })\n        i i) =\n    id\n[PROOFSTEP]\next\n[GOAL]\ncase h\nD : GlueData\nα : Type u\ninst✝ : TopologicalSpace α\nJ : Type u\nU : J → Opens α\ni : J\nx✝ :\n  (forget TopCat).obj\n    ((Opens.toTopCat ((fun i => (Opens.toTopCat (of α)).obj (U i)) i)).obj\n      ((fun i j => (Opens.map (Opens.inclusion (U i))).obj (U j)) i i))\n⊢ ↑((fun i j =>\n            ContinuousMap.mk fun x =>\n              {\n                val :=\n                  { val := ↑↑x, property := (_ : ↑x ∈ (fun i j => (Opens.map (Opens.inclusion (U i))).obj (U j)) i j) },\n                property := (_ : ↑↑x ∈ U i) })\n          i i)\n      x✝ =\n    id x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nD : GlueData\nα : Type u\ninst✝ : TopologicalSpace α\nJ : Type u\nU : J → Opens α\n⊢ ∀ (a : (GlueData.diagram (ofOpenSubsets U).toGlueData).L),\n    MultispanIndex.fst (GlueData.diagram (ofOpenSubsets U).toGlueData) a ≫\n        (fun x => Opens.inclusion (U x)) (MultispanIndex.fstFrom (GlueData.diagram (ofOpenSubsets U).toGlueData) a) =\n      MultispanIndex.snd (GlueData.diagram (ofOpenSubsets U).toGlueData) a ≫\n        (fun x => Opens.inclusion (U x)) (MultispanIndex.sndFrom (GlueData.diagram (ofOpenSubsets U).toGlueData) a)\n[PROOFSTEP]\nrintro ⟨i, j⟩\n[GOAL]\ncase mk\nD : GlueData\nα : Type u\ninst✝ : TopologicalSpace α\nJ : Type u\nU : J → Opens α\ni j : (ofOpenSubsets U).toGlueData.J\n⊢ MultispanIndex.fst (GlueData.diagram (ofOpenSubsets U).toGlueData) (i, j) ≫\n      (fun x => Opens.inclusion (U x)) (MultispanIndex.fstFrom (GlueData.diagram (ofOpenSubsets U).toGlueData) (i, j)) =\n    MultispanIndex.snd (GlueData.diagram (ofOpenSubsets U).toGlueData) (i, j) ≫\n      (fun x => Opens.inclusion (U x)) (MultispanIndex.sndFrom (GlueData.diagram (ofOpenSubsets U).toGlueData) (i, j))\n[PROOFSTEP]\next x\n[GOAL]\ncase mk.w\nD : GlueData\nα : Type u\ninst✝ : TopologicalSpace α\nJ : Type u\nU : J → Opens α\ni j : (ofOpenSubsets U).toGlueData.J\nx : (forget TopCat).obj (MultispanIndex.left (GlueData.diagram (ofOpenSubsets U).toGlueData) (i, j))\n⊢ ↑(MultispanIndex.fst (GlueData.diagram (ofOpenSubsets U).toGlueData) (i, j) ≫\n          (fun x => Opens.inclusion (U x))\n            (MultispanIndex.fstFrom (GlueData.diagram (ofOpenSubsets U).toGlueData) (i, j)))\n      x =\n    ↑(MultispanIndex.snd (GlueData.diagram (ofOpenSubsets U).toGlueData) (i, j) ≫\n          (fun x => Opens.inclusion (U x))\n            (MultispanIndex.sndFrom (GlueData.diagram (ofOpenSubsets U).toGlueData) (i, j)))\n      x\n[PROOFSTEP]\nrfl\n[GOAL]\nD : GlueData\nα : Type u\ninst✝ : TopologicalSpace α\nJ : Type u\nU : J → Opens α\n⊢ Function.Injective ↑(fromOpenSubsetsGlue U)\n[PROOFSTEP]\nintro x y e\n[GOAL]\nD : GlueData\nα : Type u\ninst✝ : TopologicalSpace α\nJ : Type u\nU : J → Opens α\nx y : (forget TopCat).obj (GlueData.glued (ofOpenSubsets U).toGlueData)\ne : ↑(fromOpenSubsetsGlue U) x = ↑(fromOpenSubsetsGlue U) y\n⊢ x = y\n[PROOFSTEP]\nobtain ⟨i, ⟨x, hx⟩, rfl⟩ := (ofOpenSubsets U).ι_jointly_surjective x\n[GOAL]\ncase intro.intro.mk\nD : GlueData\nα : Type u\ninst✝ : TopologicalSpace α\nJ : Type u\nU : J → Opens α\ny : (forget TopCat).obj (GlueData.glued (ofOpenSubsets U).toGlueData)\ni : (ofOpenSubsets U).toGlueData.J\nx : ↑(of α)\nhx : x ∈ U i\ne :\n  ↑(fromOpenSubsetsGlue U) (↑(GlueData.ι (ofOpenSubsets U).toGlueData i) { val := x, property := hx }) =\n    ↑(fromOpenSubsetsGlue U) y\n⊢ ↑(GlueData.ι (ofOpenSubsets U).toGlueData i) { val := x, property := hx } = y\n[PROOFSTEP]\nobtain ⟨j, ⟨y, hy⟩, rfl⟩ := (ofOpenSubsets U).ι_jointly_surjective y\n[GOAL]\ncase intro.intro.mk.intro.intro.mk\nD : GlueData\nα : Type u\ninst✝ : TopologicalSpace α\nJ : Type u\nU : J → Opens α\ni : (ofOpenSubsets U).toGlueData.J\nx : ↑(of α)\nhx : x ∈ U i\nj : (ofOpenSubsets U).toGlueData.J\ny : ↑(of α)\nhy : y ∈ U j\ne :\n  ↑(fromOpenSubsetsGlue U) (↑(GlueData.ι (ofOpenSubsets U).toGlueData i) { val := x, property := hx }) =\n    ↑(fromOpenSubsetsGlue U) (↑(GlueData.ι (ofOpenSubsets U).toGlueData j) { val := y, property := hy })\n⊢ ↑(GlueData.ι (ofOpenSubsets U).toGlueData i) { val := x, property := hx } =\n    ↑(GlueData.ι (ofOpenSubsets U).toGlueData j) { val := y, property := hy }\n[PROOFSTEP]\nerw [ι_fromOpenSubsetsGlue_apply, ι_fromOpenSubsetsGlue_apply] at e \n[GOAL]\ncase intro.intro.mk.intro.intro.mk\nD : GlueData\nα : Type u\ninst✝ : TopologicalSpace α\nJ : Type u\nU : J → Opens α\ni : (ofOpenSubsets U).toGlueData.J\nx : ↑(of α)\nhx : x ∈ U i\nj : (ofOpenSubsets U).toGlueData.J\ny : ↑(of α)\nhy : y ∈ U j\ne : ↑(Opens.inclusion (U i)) { val := x, property := hx } = ↑(Opens.inclusion (U j)) { val := y, property := hy }\n⊢ ↑(GlueData.ι (ofOpenSubsets U).toGlueData i) { val := x, property := hx } =\n    ↑(GlueData.ι (ofOpenSubsets U).toGlueData j) { val := y, property := hy }\n[PROOFSTEP]\nchange x = y at e \n[GOAL]\ncase intro.intro.mk.intro.intro.mk\nD : GlueData\nα : Type u\ninst✝ : TopologicalSpace α\nJ : Type u\nU : J → Opens α\ni : (ofOpenSubsets U).toGlueData.J\nx : ↑(of α)\nhx : x ∈ U i\nj : (ofOpenSubsets U).toGlueData.J\ny : ↑(of α)\nhy : y ∈ U j\ne : x = y\n⊢ ↑(GlueData.ι (ofOpenSubsets U).toGlueData i) { val := x, property := hx } =\n    ↑(GlueData.ι (ofOpenSubsets U).toGlueData j) { val := y, property := hy }\n[PROOFSTEP]\nsubst e\n[GOAL]\ncase intro.intro.mk.intro.intro.mk\nD : GlueData\nα : Type u\ninst✝ : TopologicalSpace α\nJ : Type u\nU : J → Opens α\ni : (ofOpenSubsets U).toGlueData.J\nx : ↑(of α)\nhx : x ∈ U i\nj : (ofOpenSubsets U).toGlueData.J\nhy : x ∈ U j\n⊢ ↑(GlueData.ι (ofOpenSubsets U).toGlueData i) { val := x, property := hx } =\n    ↑(GlueData.ι (ofOpenSubsets U).toGlueData j) { val := x, property := hy }\n[PROOFSTEP]\nrw [(ofOpenSubsets U).ι_eq_iff_rel]\n[GOAL]\ncase intro.intro.mk.intro.intro.mk\nD : GlueData\nα : Type u\ninst✝ : TopologicalSpace α\nJ : Type u\nU : J → Opens α\ni : (ofOpenSubsets U).toGlueData.J\nx : ↑(of α)\nhx : x ∈ U i\nj : (ofOpenSubsets U).toGlueData.J\nhy : x ∈ U j\n⊢ Rel (ofOpenSubsets U) { fst := i, snd := { val := x, property := hx } }\n    { fst := j, snd := { val := x, property := hy } }\n[PROOFSTEP]\nright\n[GOAL]\ncase intro.intro.mk.intro.intro.mk.h\nD : GlueData\nα : Type u\ninst✝ : TopologicalSpace α\nJ : Type u\nU : J → Opens α\ni : (ofOpenSubsets U).toGlueData.J\nx : ↑(of α)\nhx : x ∈ U i\nj : (ofOpenSubsets U).toGlueData.J\nhy : x ∈ U j\n⊢ ∃ x_1,\n    ↑(GlueData.f (ofOpenSubsets U).toGlueData { fst := i, snd := { val := x, property := hx } }.fst\n              { fst := j, snd := { val := x, property := hy } }.fst)\n          x_1 =\n        { fst := i, snd := { val := x, property := hx } }.snd ∧\n      ↑(GlueData.f (ofOpenSubsets U).toGlueData { fst := j, snd := { val := x, property := hy } }.fst\n              { fst := i, snd := { val := x, property := hx } }.fst)\n          (↑(GlueData.t (ofOpenSubsets U).toGlueData { fst := i, snd := { val := x, property := hx } }.fst\n                { fst := j, snd := { val := x, property := hy } }.fst)\n            x_1) =\n        { fst := j, snd := { val := x, property := hy } }.snd\n[PROOFSTEP]\nexact ⟨⟨⟨x, hx⟩, hy⟩, rfl, rfl⟩\n[GOAL]\nD : GlueData\nα : Type u\ninst✝ : TopologicalSpace α\nJ : Type u\nU : J → Opens α\n⊢ IsOpenMap ↑(fromOpenSubsetsGlue U)\n[PROOFSTEP]\nintro s hs\n[GOAL]\nD : GlueData\nα : Type u\ninst✝ : TopologicalSpace α\nJ : Type u\nU : J → Opens α\ns : Set ((forget TopCat).obj (GlueData.glued (ofOpenSubsets U).toGlueData))\nhs : IsOpen s\n⊢ IsOpen (↑(fromOpenSubsetsGlue U) '' s)\n[PROOFSTEP]\nrw [(ofOpenSubsets U).isOpen_iff] at hs \n[GOAL]\nD : GlueData\nα : Type u\ninst✝ : TopologicalSpace α\nJ : Type u\nU : J → Opens α\ns : Set ((forget TopCat).obj (GlueData.glued (ofOpenSubsets U).toGlueData))\nhs : ∀ (i : (ofOpenSubsets U).toGlueData.J), IsOpen (↑(GlueData.ι (ofOpenSubsets U).toGlueData i) ⁻¹' s)\n⊢ IsOpen (↑(fromOpenSubsetsGlue U) '' s)\n[PROOFSTEP]\nrw [isOpen_iff_forall_mem_open]\n[GOAL]\nD : GlueData\nα : Type u\ninst✝ : TopologicalSpace α\nJ : Type u\nU : J → Opens α\ns : Set ((forget TopCat).obj (GlueData.glued (ofOpenSubsets U).toGlueData))\nhs : ∀ (i : (ofOpenSubsets U).toGlueData.J), IsOpen (↑(GlueData.ι (ofOpenSubsets U).toGlueData i) ⁻¹' s)\n⊢ ∀ (x : (forget TopCat).obj (of α)),\n    x ∈ ↑(fromOpenSubsetsGlue U) '' s → ∃ t, t ⊆ ↑(fromOpenSubsetsGlue U) '' s ∧ IsOpen t ∧ x ∈ t\n[PROOFSTEP]\nrintro _ ⟨x, hx, rfl⟩\n[GOAL]\ncase intro.intro\nD : GlueData\nα : Type u\ninst✝ : TopologicalSpace α\nJ : Type u\nU : J → Opens α\ns : Set ((forget TopCat).obj (GlueData.glued (ofOpenSubsets U).toGlueData))\nhs : ∀ (i : (ofOpenSubsets U).toGlueData.J), IsOpen (↑(GlueData.ι (ofOpenSubsets U).toGlueData i) ⁻¹' s)\nx : (forget TopCat).obj (GlueData.glued (ofOpenSubsets U).toGlueData)\nhx : x ∈ s\n⊢ ∃ t, t ⊆ ↑(fromOpenSubsetsGlue U) '' s ∧ IsOpen t ∧ ↑(fromOpenSubsetsGlue U) x ∈ t\n[PROOFSTEP]\nobtain ⟨i, ⟨x, hx'⟩, rfl⟩ := (ofOpenSubsets U).ι_jointly_surjective x\n[GOAL]\ncase intro.intro.intro.intro.mk\nD : GlueData\nα : Type u\ninst✝ : TopologicalSpace α\nJ : Type u\nU : J → Opens α\ns : Set ((forget TopCat).obj (GlueData.glued (ofOpenSubsets U).toGlueData))\nhs : ∀ (i : (ofOpenSubsets U).toGlueData.J), IsOpen (↑(GlueData.ι (ofOpenSubsets U).toGlueData i) ⁻¹' s)\ni : (ofOpenSubsets U).toGlueData.J\nx : ↑(of α)\nhx' : x ∈ U i\nhx : ↑(GlueData.ι (ofOpenSubsets U).toGlueData i) { val := x, property := hx' } ∈ s\n⊢ ∃ t,\n    t ⊆ ↑(fromOpenSubsetsGlue U) '' s ∧\n      IsOpen t ∧\n        ↑(fromOpenSubsetsGlue U) (↑(GlueData.ι (ofOpenSubsets U).toGlueData i) { val := x, property := hx' }) ∈ t\n[PROOFSTEP]\nuse fromOpenSubsetsGlue U '' s ∩ Set.range (@Opens.inclusion (TopCat.of α) (U i))\n[GOAL]\ncase h\nD : GlueData\nα : Type u\ninst✝ : TopologicalSpace α\nJ : Type u\nU : J → Opens α\ns : Set ((forget TopCat).obj (GlueData.glued (ofOpenSubsets U).toGlueData))\nhs : ∀ (i : (ofOpenSubsets U).toGlueData.J), IsOpen (↑(GlueData.ι (ofOpenSubsets U).toGlueData i) ⁻¹' s)\ni : (ofOpenSubsets U).toGlueData.J\nx : ↑(of α)\nhx' : x ∈ U i\nhx : ↑(GlueData.ι (ofOpenSubsets U).toGlueData i) { val := x, property := hx' } ∈ s\n⊢ ↑(fromOpenSubsetsGlue U) '' s ∩ Set.range ↑(Opens.inclusion (U i)) ⊆ ↑(fromOpenSubsetsGlue U) '' s ∧\n    IsOpen (↑(fromOpenSubsetsGlue U) '' s ∩ Set.range ↑(Opens.inclusion (U i))) ∧\n      ↑(fromOpenSubsetsGlue U) (↑(GlueData.ι (ofOpenSubsets U).toGlueData i) { val := x, property := hx' }) ∈\n        ↑(fromOpenSubsetsGlue U) '' s ∩ Set.range ↑(Opens.inclusion (U i))\n[PROOFSTEP]\nuse Set.inter_subset_left _ _\n[GOAL]\ncase right\nD : GlueData\nα : Type u\ninst✝ : TopologicalSpace α\nJ : Type u\nU : J → Opens α\ns : Set ((forget TopCat).obj (GlueData.glued (ofOpenSubsets U).toGlueData))\nhs : ∀ (i : (ofOpenSubsets U).toGlueData.J), IsOpen (↑(GlueData.ι (ofOpenSubsets U).toGlueData i) ⁻¹' s)\ni : (ofOpenSubsets U).toGlueData.J\nx : ↑(of α)\nhx' : x ∈ U i\nhx : ↑(GlueData.ι (ofOpenSubsets U).toGlueData i) { val := x, property := hx' } ∈ s\n⊢ IsOpen (↑(fromOpenSubsetsGlue U) '' s ∩ Set.range ↑(Opens.inclusion (U i))) ∧\n    ↑(fromOpenSubsetsGlue U) (↑(GlueData.ι (ofOpenSubsets U).toGlueData i) { val := x, property := hx' }) ∈\n      ↑(fromOpenSubsetsGlue U) '' s ∩ Set.range ↑(Opens.inclusion (U i))\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase right.left\nD : GlueData\nα : Type u\ninst✝ : TopologicalSpace α\nJ : Type u\nU : J → Opens α\ns : Set ((forget TopCat).obj (GlueData.glued (ofOpenSubsets U).toGlueData))\nhs : ∀ (i : (ofOpenSubsets U).toGlueData.J), IsOpen (↑(GlueData.ι (ofOpenSubsets U).toGlueData i) ⁻¹' s)\ni : (ofOpenSubsets U).toGlueData.J\nx : ↑(of α)\nhx' : x ∈ U i\nhx : ↑(GlueData.ι (ofOpenSubsets U).toGlueData i) { val := x, property := hx' } ∈ s\n⊢ IsOpen (↑(fromOpenSubsetsGlue U) '' s ∩ Set.range ↑(Opens.inclusion (U i)))\n[PROOFSTEP]\nerw [← Set.image_preimage_eq_inter_range]\n[GOAL]\ncase right.left\nD : GlueData\nα : Type u\ninst✝ : TopologicalSpace α\nJ : Type u\nU : J → Opens α\ns : Set ((forget TopCat).obj (GlueData.glued (ofOpenSubsets U).toGlueData))\nhs : ∀ (i : (ofOpenSubsets U).toGlueData.J), IsOpen (↑(GlueData.ι (ofOpenSubsets U).toGlueData i) ⁻¹' s)\ni : (ofOpenSubsets U).toGlueData.J\nx : ↑(of α)\nhx' : x ∈ U i\nhx : ↑(GlueData.ι (ofOpenSubsets U).toGlueData i) { val := x, property := hx' } ∈ s\n⊢ IsOpen (↑(Opens.inclusion (U i)) '' (↑(Opens.inclusion (U i)) ⁻¹' (↑(fromOpenSubsetsGlue U) '' s)))\n[PROOFSTEP]\napply (Opens.openEmbedding (X := TopCat.of α) (U i)).isOpenMap\n[GOAL]\ncase right.left.a\nD : GlueData\nα : Type u\ninst✝ : TopologicalSpace α\nJ : Type u\nU : J → Opens α\ns : Set ((forget TopCat).obj (GlueData.glued (ofOpenSubsets U).toGlueData))\nhs : ∀ (i : (ofOpenSubsets U).toGlueData.J), IsOpen (↑(GlueData.ι (ofOpenSubsets U).toGlueData i) ⁻¹' s)\ni : (ofOpenSubsets U).toGlueData.J\nx : ↑(of α)\nhx' : x ∈ U i\nhx : ↑(GlueData.ι (ofOpenSubsets U).toGlueData i) { val := x, property := hx' } ∈ s\n⊢ IsOpen (↑(Opens.inclusion (U i)) ⁻¹' (↑(fromOpenSubsetsGlue U) '' s))\n[PROOFSTEP]\nconvert hs i using 1\n[GOAL]\ncase h.e'_3.h\nD : GlueData\nα : Type u\ninst✝ : TopologicalSpace α\nJ : Type u\nU : J → Opens α\ns : Set ((forget TopCat).obj (GlueData.glued (ofOpenSubsets U).toGlueData))\nhs : ∀ (i : (ofOpenSubsets U).toGlueData.J), IsOpen (↑(GlueData.ι (ofOpenSubsets U).toGlueData i) ⁻¹' s)\ni : (ofOpenSubsets U).toGlueData.J\nx : ↑(of α)\nhx' : x ∈ U i\nhx : ↑(GlueData.ι (ofOpenSubsets U).toGlueData i) { val := x, property := hx' } ∈ s\ne_1✝ :\n  (forget TopCat).obj ((Opens.toTopCat (of α)).obj (U i)) =\n    (forget TopCat).obj (GlueData.U (ofOpenSubsets U).toGlueData i)\n⊢ ↑(Opens.inclusion (U i)) ⁻¹' (↑(fromOpenSubsetsGlue U) '' s) = ↑(GlueData.ι (ofOpenSubsets U).toGlueData i) ⁻¹' s\n[PROOFSTEP]\nerw [← ι_fromOpenSubsetsGlue, coe_comp, Set.preimage_comp]\n  --  porting note: `congr 1` did nothing, so I replaced it with `apply congr_arg`\n[GOAL]\ncase h.e'_3.h\nD : GlueData\nα : Type u\ninst✝ : TopologicalSpace α\nJ : Type u\nU : J → Opens α\ns : Set ((forget TopCat).obj (GlueData.glued (ofOpenSubsets U).toGlueData))\nhs : ∀ (i : (ofOpenSubsets U).toGlueData.J), IsOpen (↑(GlueData.ι (ofOpenSubsets U).toGlueData i) ⁻¹' s)\ni : (ofOpenSubsets U).toGlueData.J\nx : ↑(of α)\nhx' : x ∈ U i\nhx : ↑(GlueData.ι (ofOpenSubsets U).toGlueData i) { val := x, property := hx' } ∈ s\ne_1✝ :\n  (forget TopCat).obj ((Opens.toTopCat (of α)).obj (U i)) =\n    (forget TopCat).obj (GlueData.U (ofOpenSubsets U).toGlueData i)\n⊢ ↑(GlueData.ι (ofOpenSubsets U).toGlueData i) ⁻¹' (↑(fromOpenSubsetsGlue U) ⁻¹' (↑(fromOpenSubsetsGlue U) '' s)) =\n    ↑(GlueData.ι (ofOpenSubsets U).toGlueData i) ⁻¹' s\n[PROOFSTEP]\napply congr_arg\n[GOAL]\ncase h.e'_3.h.h\nD : GlueData\nα : Type u\ninst✝ : TopologicalSpace α\nJ : Type u\nU : J → Opens α\ns : Set ((forget TopCat).obj (GlueData.glued (ofOpenSubsets U).toGlueData))\nhs : ∀ (i : (ofOpenSubsets U).toGlueData.J), IsOpen (↑(GlueData.ι (ofOpenSubsets U).toGlueData i) ⁻¹' s)\ni : (ofOpenSubsets U).toGlueData.J\nx : ↑(of α)\nhx' : x ∈ U i\nhx : ↑(GlueData.ι (ofOpenSubsets U).toGlueData i) { val := x, property := hx' } ∈ s\ne_1✝ :\n  (forget TopCat).obj ((Opens.toTopCat (of α)).obj (U i)) =\n    (forget TopCat).obj (GlueData.U (ofOpenSubsets U).toGlueData i)\n⊢ ↑(fromOpenSubsetsGlue U) ⁻¹' (↑(fromOpenSubsetsGlue U) '' s) = s\n[PROOFSTEP]\nrefine' Set.preimage_image_eq _ (fromOpenSubsetsGlue_injective U)\n[GOAL]\ncase right.right\nD : GlueData\nα : Type u\ninst✝ : TopologicalSpace α\nJ : Type u\nU : J → Opens α\ns : Set ((forget TopCat).obj (GlueData.glued (ofOpenSubsets U).toGlueData))\nhs : ∀ (i : (ofOpenSubsets U).toGlueData.J), IsOpen (↑(GlueData.ι (ofOpenSubsets U).toGlueData i) ⁻¹' s)\ni : (ofOpenSubsets U).toGlueData.J\nx : ↑(of α)\nhx' : x ∈ U i\nhx : ↑(GlueData.ι (ofOpenSubsets U).toGlueData i) { val := x, property := hx' } ∈ s\n⊢ ↑(fromOpenSubsetsGlue U) (↑(GlueData.ι (ofOpenSubsets U).toGlueData i) { val := x, property := hx' }) ∈\n    ↑(fromOpenSubsetsGlue U) '' s ∩ Set.range ↑(Opens.inclusion (U i))\n[PROOFSTEP]\nrefine'\n  ⟨Set.mem_image_of_mem _ hx, _⟩\n    -- porting note: another `rw ↦ erw`\n        -- See above.\n[GOAL]\ncase right.right\nD : GlueData\nα : Type u\ninst✝ : TopologicalSpace α\nJ : Type u\nU : J → Opens α\ns : Set ((forget TopCat).obj (GlueData.glued (ofOpenSubsets U).toGlueData))\nhs : ∀ (i : (ofOpenSubsets U).toGlueData.J), IsOpen (↑(GlueData.ι (ofOpenSubsets U).toGlueData i) ⁻¹' s)\ni : (ofOpenSubsets U).toGlueData.J\nx : ↑(of α)\nhx' : x ∈ U i\nhx : ↑(GlueData.ι (ofOpenSubsets U).toGlueData i) { val := x, property := hx' } ∈ s\n⊢ ↑(fromOpenSubsetsGlue U) (↑(GlueData.ι (ofOpenSubsets U).toGlueData i) { val := x, property := hx' }) ∈\n    Set.range ↑(Opens.inclusion (U i))\n[PROOFSTEP]\nerw [ι_fromOpenSubsetsGlue_apply]\n[GOAL]\ncase right.right\nD : GlueData\nα : Type u\ninst✝ : TopologicalSpace α\nJ : Type u\nU : J → Opens α\ns : Set ((forget TopCat).obj (GlueData.glued (ofOpenSubsets U).toGlueData))\nhs : ∀ (i : (ofOpenSubsets U).toGlueData.J), IsOpen (↑(GlueData.ι (ofOpenSubsets U).toGlueData i) ⁻¹' s)\ni : (ofOpenSubsets U).toGlueData.J\nx : ↑(of α)\nhx' : x ∈ U i\nhx : ↑(GlueData.ι (ofOpenSubsets U).toGlueData i) { val := x, property := hx' } ∈ s\n⊢ ↑(Opens.inclusion (U i)) { val := x, property := hx' } ∈ Set.range ↑(Opens.inclusion (U i))\n[PROOFSTEP]\nexact Set.mem_range_self _\n[GOAL]\nD : GlueData\nα : Type u\ninst✝ : TopologicalSpace α\nJ : Type u\nU : J → Opens α\n⊢ Set.range ↑(fromOpenSubsetsGlue U) = ⋃ (i : J), ↑(U i)\n[PROOFSTEP]\next\n[GOAL]\ncase h\nD : GlueData\nα : Type u\ninst✝ : TopologicalSpace α\nJ : Type u\nU : J → Opens α\nx✝ : (forget TopCat).obj (of α)\n⊢ x✝ ∈ Set.range ↑(fromOpenSubsetsGlue U) ↔ x✝ ∈ ⋃ (i : J), ↑(U i)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nD : GlueData\nα : Type u\ninst✝ : TopologicalSpace α\nJ : Type u\nU : J → Opens α\nx✝ : (forget TopCat).obj (of α)\n⊢ x✝ ∈ Set.range ↑(fromOpenSubsetsGlue U) → x✝ ∈ ⋃ (i : J), ↑(U i)\n[PROOFSTEP]\nrintro ⟨x, rfl⟩\n[GOAL]\ncase h.mp.intro\nD : GlueData\nα : Type u\ninst✝ : TopologicalSpace α\nJ : Type u\nU : J → Opens α\nx : (forget TopCat).obj (GlueData.glued (ofOpenSubsets U).toGlueData)\n⊢ ↑(fromOpenSubsetsGlue U) x ∈ ⋃ (i : J), ↑(U i)\n[PROOFSTEP]\nobtain ⟨i, ⟨x, hx'⟩, rfl⟩ := (ofOpenSubsets U).ι_jointly_surjective x\n[GOAL]\ncase h.mp.intro.intro.intro.mk\nD : GlueData\nα : Type u\ninst✝ : TopologicalSpace α\nJ : Type u\nU : J → Opens α\ni : (ofOpenSubsets U).toGlueData.J\nx : ↑(of α)\nhx' : x ∈ U i\n⊢ ↑(fromOpenSubsetsGlue U) (↑(GlueData.ι (ofOpenSubsets U).toGlueData i) { val := x, property := hx' }) ∈\n    ⋃ (i : J), ↑(U i)\n[PROOFSTEP]\nerw [ι_fromOpenSubsetsGlue_apply]\n[GOAL]\ncase h.mp.intro.intro.intro.mk\nD : GlueData\nα : Type u\ninst✝ : TopologicalSpace α\nJ : Type u\nU : J → Opens α\ni : (ofOpenSubsets U).toGlueData.J\nx : ↑(of α)\nhx' : x ∈ U i\n⊢ ↑(Opens.inclusion (U i)) { val := x, property := hx' } ∈ ⋃ (i : J), ↑(U i)\n[PROOFSTEP]\nexact Set.subset_iUnion _ i hx'\n[GOAL]\ncase h.mpr\nD : GlueData\nα : Type u\ninst✝ : TopologicalSpace α\nJ : Type u\nU : J → Opens α\nx✝ : (forget TopCat).obj (of α)\n⊢ x✝ ∈ ⋃ (i : J), ↑(U i) → x✝ ∈ Set.range ↑(fromOpenSubsetsGlue U)\n[PROOFSTEP]\nrintro ⟨_, ⟨i, rfl⟩, hx⟩\n[GOAL]\ncase h.mpr.intro.intro.intro\nD : GlueData\nα : Type u\ninst✝ : TopologicalSpace α\nJ : Type u\nU : J → Opens α\nx✝ : (forget TopCat).obj (of α)\ni : J\nhx : x✝ ∈ (fun i => ↑(U i)) i\n⊢ x✝ ∈ Set.range ↑(fromOpenSubsetsGlue U)\n[PROOFSTEP]\nrename_i x\n[GOAL]\ncase h.mpr.intro.intro.intro\nD : GlueData\nα : Type u\ninst✝ : TopologicalSpace α\nJ : Type u\nU : J → Opens α\nx : (forget TopCat).obj (of α)\ni : J\nhx : x ∈ (fun i => ↑(U i)) i\n⊢ x ∈ Set.range ↑(fromOpenSubsetsGlue U)\n[PROOFSTEP]\nrefine' ⟨(ofOpenSubsets U).toGlueData.ι i ⟨x, hx⟩, ι_fromOpenSubsetsGlue_apply _ _ _⟩\n", "meta": {"mathlib_filename": "Mathlib.Topology.Gluing", "llama_tokens": 68674, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7853085758631158, "lm_q2_score": 0.6406358411176238, "lm_q1q2_score": 0.5030968200349505}}
{"text": "[GOAL]\nV : Type u\ninst✝² : Fintype V\ninst✝¹ : DecidableEq V\nG : SimpleGraph V\ninst✝ : DecidableRel G.Adj\nn k ℓ μ : ℕ\nv w : V\n_h : v ≠ w\n⊢ ¬Adj ⊥ v w → Fintype.card ↑(commonNeighbors ⊥ v w) = 0\n[PROOFSTEP]\nsimp only [card_eq_zero, Fintype.card_ofFinset, forall_true_left, not_false_iff, bot_adj]\n[GOAL]\nV : Type u\ninst✝² : Fintype V\ninst✝¹ : DecidableEq V\nG : SimpleGraph V\ninst✝ : DecidableRel G.Adj\nn k ℓ μ : ℕ\nv w : V\n_h : v ≠ w\n⊢ filter (fun x => x ∈ commonNeighbors ⊥ v w) univ = ∅\n[PROOFSTEP]\next\n[GOAL]\ncase a\nV : Type u\ninst✝² : Fintype V\ninst✝¹ : DecidableEq V\nG : SimpleGraph V\ninst✝ : DecidableRel G.Adj\nn k ℓ μ : ℕ\nv w : V\n_h : v ≠ w\na✝ : V\n⊢ a✝ ∈ filter (fun x => x ∈ commonNeighbors ⊥ v w) univ ↔ a✝ ∈ ∅\n[PROOFSTEP]\nsimp [mem_commonNeighbors]\n[GOAL]\nV : Type u\ninst✝² : Fintype V\ninst✝¹ : DecidableEq V\nG : SimpleGraph V\ninst✝ : DecidableRel G.Adj\nn k ℓ μ : ℕ\nv w : V\nh : Adj ⊤ v w\n⊢ Fintype.card ↑(commonNeighbors ⊤ v w) = Fintype.card V - 2\n[PROOFSTEP]\nrw [card_commonNeighbors_top]\n[GOAL]\nV : Type u\ninst✝² : Fintype V\ninst✝¹ : DecidableEq V\nG : SimpleGraph V\ninst✝ : DecidableRel G.Adj\nn k ℓ μ : ℕ\nv w : V\nh : Adj ⊤ v w\n⊢ v ≠ w\n[PROOFSTEP]\nexact h\n[GOAL]\nV : Type u\ninst✝² : Fintype V\ninst✝¹ : DecidableEq V\nG : SimpleGraph V\ninst✝ : DecidableRel G.Adj\nn k ℓ μ : ℕ\nv w : V\nh : IsSRGWith G n k ℓ μ\n⊢ Finset.card (neighborFinset G v ∪ neighborFinset G w) = 2 * k - Fintype.card ↑(commonNeighbors G v w)\n[PROOFSTEP]\napply Nat.add_right_cancel (m := Fintype.card (G.commonNeighbors v w))\n[GOAL]\nV : Type u\ninst✝² : Fintype V\ninst✝¹ : DecidableEq V\nG : SimpleGraph V\ninst✝ : DecidableRel G.Adj\nn k ℓ μ : ℕ\nv w : V\nh : IsSRGWith G n k ℓ μ\n⊢ Finset.card (neighborFinset G v ∪ neighborFinset G w) + Fintype.card ↑(commonNeighbors G v w) =\n    2 * k - Fintype.card ↑(commonNeighbors G v w) + Fintype.card ↑(commonNeighbors G v w)\n[PROOFSTEP]\nrw [Nat.sub_add_cancel, ← Set.toFinset_card]\n  -- porting note: Set.toFinset_inter needs workaround to use unification to solve for one of the\n    -- instance arguments:\n[GOAL]\nV : Type u\ninst✝² : Fintype V\ninst✝¹ : DecidableEq V\nG : SimpleGraph V\ninst✝ : DecidableRel G.Adj\nn k ℓ μ : ℕ\nv w : V\nh : IsSRGWith G n k ℓ μ\n⊢ Finset.card (neighborFinset G v ∪ neighborFinset G w) + Finset.card (Set.toFinset (commonNeighbors G v w)) = 2 * k\n[PROOFSTEP]\nsimp [commonNeighbors, @Set.toFinset_inter _ _ _ _ _ _ (_), ← neighborFinset_def, Finset.card_union_add_card_inter,\n  card_neighborFinset_eq_degree, h.regular.degree_eq, two_mul]\n[GOAL]\nV : Type u\ninst✝² : Fintype V\ninst✝¹ : DecidableEq V\nG : SimpleGraph V\ninst✝ : DecidableRel G.Adj\nn k ℓ μ : ℕ\nv w : V\nh : IsSRGWith G n k ℓ μ\n⊢ Fintype.card ↑(commonNeighbors G v w) ≤ 2 * k\n[PROOFSTEP]\napply le_trans (card_commonNeighbors_le_degree_left _ _ _)\n[GOAL]\nV : Type u\ninst✝² : Fintype V\ninst✝¹ : DecidableEq V\nG : SimpleGraph V\ninst✝ : DecidableRel G.Adj\nn k ℓ μ : ℕ\nv w : V\nh : IsSRGWith G n k ℓ μ\n⊢ degree G v ≤ 2 * k\n[PROOFSTEP]\nsimp [h.regular.degree_eq, two_mul]\n[GOAL]\nV : Type u\ninst✝² : Fintype V\ninst✝¹ : DecidableEq V\nG : SimpleGraph V\ninst✝ : DecidableRel G.Adj\nn k ℓ μ : ℕ\nv w : V\nh : IsSRGWith G n k ℓ μ\nhne : v ≠ w\nha : ¬Adj G v w\n⊢ Finset.card (neighborFinset G v ∪ neighborFinset G w) = 2 * k - μ\n[PROOFSTEP]\nrw [← h.of_not_adj v w hne ha]\n[GOAL]\nV : Type u\ninst✝² : Fintype V\ninst✝¹ : DecidableEq V\nG : SimpleGraph V\ninst✝ : DecidableRel G.Adj\nn k ℓ μ : ℕ\nv w : V\nh : IsSRGWith G n k ℓ μ\nhne : v ≠ w\nha : ¬Adj G v w\n⊢ Finset.card (neighborFinset G v ∪ neighborFinset G w) = 2 * k - Fintype.card ↑(commonNeighbors G v w)\n[PROOFSTEP]\napply h.card_neighborFinset_union_eq\n[GOAL]\nV : Type u\ninst✝² : Fintype V\ninst✝¹ : DecidableEq V\nG : SimpleGraph V\ninst✝ : DecidableRel G.Adj\nn k ℓ μ : ℕ\nv w : V\nh : IsSRGWith G n k ℓ μ\nha : Adj G v w\n⊢ Finset.card (neighborFinset G v ∪ neighborFinset G w) = 2 * k - ℓ\n[PROOFSTEP]\nrw [← h.of_adj v w ha]\n[GOAL]\nV : Type u\ninst✝² : Fintype V\ninst✝¹ : DecidableEq V\nG : SimpleGraph V\ninst✝ : DecidableRel G.Adj\nn k ℓ μ : ℕ\nv w : V\nh : IsSRGWith G n k ℓ μ\nha : Adj G v w\n⊢ Finset.card (neighborFinset G v ∪ neighborFinset G w) = 2 * k - Fintype.card ↑(commonNeighbors G v w)\n[PROOFSTEP]\napply h.card_neighborFinset_union_eq\n[GOAL]\nV : Type u\ninst✝² : Fintype V\ninst✝¹ : DecidableEq V\nG : SimpleGraph V\ninst✝ : DecidableRel G.Adj\nn k ℓ μ : ℕ\nv w : V\n⊢ (neighborFinset G v)ᶜ \\ {v} ∩ ((neighborFinset G w)ᶜ \\ {w}) =\n    ((neighborFinset G v)ᶜ ∩ (neighborFinset G w)ᶜ) \\ ({w} ∪ {v})\n[PROOFSTEP]\next\n[GOAL]\ncase a\nV : Type u\ninst✝² : Fintype V\ninst✝¹ : DecidableEq V\nG : SimpleGraph V\ninst✝ : DecidableRel G.Adj\nn k ℓ μ : ℕ\nv w a✝ : V\n⊢ a✝ ∈ (neighborFinset G v)ᶜ \\ {v} ∩ ((neighborFinset G w)ᶜ \\ {w}) ↔\n    a✝ ∈ ((neighborFinset G v)ᶜ ∩ (neighborFinset G w)ᶜ) \\ ({w} ∪ {v})\n[PROOFSTEP]\nrw [← not_iff_not]\n[GOAL]\ncase a\nV : Type u\ninst✝² : Fintype V\ninst✝¹ : DecidableEq V\nG : SimpleGraph V\ninst✝ : DecidableRel G.Adj\nn k ℓ μ : ℕ\nv w a✝ : V\n⊢ ¬a✝ ∈ (neighborFinset G v)ᶜ \\ {v} ∩ ((neighborFinset G w)ᶜ \\ {w}) ↔\n    ¬a✝ ∈ ((neighborFinset G v)ᶜ ∩ (neighborFinset G w)ᶜ) \\ ({w} ∪ {v})\n[PROOFSTEP]\nsimp [imp_iff_not_or, or_assoc, or_comm, or_left_comm]\n[GOAL]\nV : Type u\ninst✝² : Fintype V\ninst✝¹ : DecidableEq V\nG : SimpleGraph V\ninst✝ : DecidableRel G.Adj\nn k ℓ μ : ℕ\nv w : V\nh : Adj G v w\n⊢ ((neighborFinset G v)ᶜ ∩ (neighborFinset G w)ᶜ) \\ ({w} ∪ {v}) = (neighborFinset G v)ᶜ ∩ (neighborFinset G w)ᶜ\n[PROOFSTEP]\next\n[GOAL]\ncase a\nV : Type u\ninst✝² : Fintype V\ninst✝¹ : DecidableEq V\nG : SimpleGraph V\ninst✝ : DecidableRel G.Adj\nn k ℓ μ : ℕ\nv w : V\nh : Adj G v w\na✝ : V\n⊢ a✝ ∈ ((neighborFinset G v)ᶜ ∩ (neighborFinset G w)ᶜ) \\ ({w} ∪ {v}) ↔\n    a✝ ∈ (neighborFinset G v)ᶜ ∩ (neighborFinset G w)ᶜ\n[PROOFSTEP]\nsimp only [and_imp, mem_union, mem_sdiff, mem_compl, and_iff_left_iff_imp, mem_neighborFinset, mem_inter, mem_singleton]\n[GOAL]\ncase a\nV : Type u\ninst✝² : Fintype V\ninst✝¹ : DecidableEq V\nG : SimpleGraph V\ninst✝ : DecidableRel G.Adj\nn k ℓ μ : ℕ\nv w : V\nh : Adj G v w\na✝ : V\n⊢ ¬Adj G v a✝ → ¬Adj G w a✝ → ¬(a✝ = w ∨ a✝ = v)\n[PROOFSTEP]\nrintro hnv hnw (rfl | rfl)\n[GOAL]\ncase a.inl\nV : Type u\ninst✝² : Fintype V\ninst✝¹ : DecidableEq V\nG : SimpleGraph V\ninst✝ : DecidableRel G.Adj\nn k ℓ μ : ℕ\nv a✝ : V\nhnv : ¬Adj G v a✝\nh : Adj G v a✝\nhnw : ¬Adj G a✝ a✝\n⊢ False\n[PROOFSTEP]\nexact hnv h\n[GOAL]\ncase a.inr\nV : Type u\ninst✝² : Fintype V\ninst✝¹ : DecidableEq V\nG : SimpleGraph V\ninst✝ : DecidableRel G.Adj\nn k ℓ μ : ℕ\nw a✝ : V\nhnw : ¬Adj G w a✝\nh : Adj G a✝ w\nhnv : ¬Adj G a✝ a✝\n⊢ False\n[PROOFSTEP]\napply hnw\n[GOAL]\ncase a.inr\nV : Type u\ninst✝² : Fintype V\ninst✝¹ : DecidableEq V\nG : SimpleGraph V\ninst✝ : DecidableRel G.Adj\nn k ℓ μ : ℕ\nw a✝ : V\nhnw : ¬Adj G w a✝\nh : Adj G a✝ w\nhnv : ¬Adj G a✝ a✝\n⊢ Adj G w a✝\n[PROOFSTEP]\nrwa [adj_comm]\n[GOAL]\nV : Type u\ninst✝² : Fintype V\ninst✝¹ : DecidableEq V\nG : SimpleGraph V\ninst✝ : DecidableRel G.Adj\nn k ℓ μ : ℕ\nh : IsSRGWith G n k ℓ μ\n⊢ IsRegularOfDegree Gᶜ (n - k - 1)\n[PROOFSTEP]\nrw [← h.card, Nat.sub_sub, add_comm, ← Nat.sub_sub]\n[GOAL]\nV : Type u\ninst✝² : Fintype V\ninst✝¹ : DecidableEq V\nG : SimpleGraph V\ninst✝ : DecidableRel G.Adj\nn k ℓ μ : ℕ\nh : IsSRGWith G n k ℓ μ\n⊢ IsRegularOfDegree Gᶜ (Fintype.card V - 1 - k)\n[PROOFSTEP]\nexact h.regular.compl\n[GOAL]\nV : Type u\ninst✝² : Fintype V\ninst✝¹ : DecidableEq V\nG : SimpleGraph V\ninst✝ : DecidableRel G.Adj\nn k ℓ μ : ℕ\nh : IsSRGWith G n k ℓ μ\nv w : V\nha : Adj Gᶜ v w\n⊢ Fintype.card ↑(commonNeighbors Gᶜ v w) = n - (2 * k - μ) - 2\n[PROOFSTEP]\nsimp only [← Set.toFinset_card, commonNeighbors, Set.toFinset_inter, neighborSet_compl, Set.toFinset_diff,\n  Set.toFinset_singleton, Set.toFinset_compl, ← neighborFinset_def]\n[GOAL]\nV : Type u\ninst✝² : Fintype V\ninst✝¹ : DecidableEq V\nG : SimpleGraph V\ninst✝ : DecidableRel G.Adj\nn k ℓ μ : ℕ\nh : IsSRGWith G n k ℓ μ\nv w : V\nha : Adj Gᶜ v w\n⊢ Finset.card ((neighborFinset G v)ᶜ \\ {v} ∩ ((neighborFinset G w)ᶜ \\ {w})) = n - (2 * k - μ) - 2\n[PROOFSTEP]\nsimp_rw [compl_neighborFinset_sdiff_inter_eq]\n[GOAL]\nV : Type u\ninst✝² : Fintype V\ninst✝¹ : DecidableEq V\nG : SimpleGraph V\ninst✝ : DecidableRel G.Adj\nn k ℓ μ : ℕ\nh : IsSRGWith G n k ℓ μ\nv w : V\nha : Adj Gᶜ v w\n⊢ Finset.card (((neighborFinset G v)ᶜ ∩ (neighborFinset G w)ᶜ) \\ ({w} ∪ {v})) = n - (2 * k - μ) - 2\n[PROOFSTEP]\nhave hne : v ≠ w := ne_of_adj _ ha\n[GOAL]\nV : Type u\ninst✝² : Fintype V\ninst✝¹ : DecidableEq V\nG : SimpleGraph V\ninst✝ : DecidableRel G.Adj\nn k ℓ μ : ℕ\nh : IsSRGWith G n k ℓ μ\nv w : V\nha : Adj Gᶜ v w\nhne : v ≠ w\n⊢ Finset.card (((neighborFinset G v)ᶜ ∩ (neighborFinset G w)ᶜ) \\ ({w} ∪ {v})) = n - (2 * k - μ) - 2\n[PROOFSTEP]\nrw [compl_adj] at ha \n[GOAL]\nV : Type u\ninst✝² : Fintype V\ninst✝¹ : DecidableEq V\nG : SimpleGraph V\ninst✝ : DecidableRel G.Adj\nn k ℓ μ : ℕ\nh : IsSRGWith G n k ℓ μ\nv w : V\nha : v ≠ w ∧ ¬Adj G v w\nhne : v ≠ w\n⊢ Finset.card (((neighborFinset G v)ᶜ ∩ (neighborFinset G w)ᶜ) \\ ({w} ∪ {v})) = n - (2 * k - μ) - 2\n[PROOFSTEP]\nrw [card_sdiff, ← insert_eq, card_insert_of_not_mem, card_singleton, ← Finset.compl_union]\n[GOAL]\nV : Type u\ninst✝² : Fintype V\ninst✝¹ : DecidableEq V\nG : SimpleGraph V\ninst✝ : DecidableRel G.Adj\nn k ℓ μ : ℕ\nh : IsSRGWith G n k ℓ μ\nv w : V\nha : v ≠ w ∧ ¬Adj G v w\nhne : v ≠ w\n⊢ Finset.card (neighborFinset G v ∪ neighborFinset G w)ᶜ - (1 + 1) = n - (2 * k - μ) - 2\n[PROOFSTEP]\nrw [card_compl, h.card_neighborFinset_union_of_not_adj hne ha.2, ← h.card]\n[GOAL]\nV : Type u\ninst✝² : Fintype V\ninst✝¹ : DecidableEq V\nG : SimpleGraph V\ninst✝ : DecidableRel G.Adj\nn k ℓ μ : ℕ\nh : IsSRGWith G n k ℓ μ\nv w : V\nha : v ≠ w ∧ ¬Adj G v w\nhne : v ≠ w\n⊢ ¬w ∈ {v}\n[PROOFSTEP]\nsimp only [hne.symm, not_false_iff, mem_singleton]\n[GOAL]\nV : Type u\ninst✝² : Fintype V\ninst✝¹ : DecidableEq V\nG : SimpleGraph V\ninst✝ : DecidableRel G.Adj\nn k ℓ μ : ℕ\nh : IsSRGWith G n k ℓ μ\nv w : V\nha : v ≠ w ∧ ¬Adj G v w\nhne : v ≠ w\n⊢ {w} ∪ {v} ⊆ (neighborFinset G v)ᶜ ∩ (neighborFinset G w)ᶜ\n[PROOFSTEP]\nintro u\n[GOAL]\nV : Type u\ninst✝² : Fintype V\ninst✝¹ : DecidableEq V\nG : SimpleGraph V\ninst✝ : DecidableRel G.Adj\nn k ℓ μ : ℕ\nh : IsSRGWith G n k ℓ μ\nv w : V\nha : v ≠ w ∧ ¬Adj G v w\nhne : v ≠ w\nu : V\n⊢ u ∈ {w} ∪ {v} → u ∈ (neighborFinset G v)ᶜ ∩ (neighborFinset G w)ᶜ\n[PROOFSTEP]\nsimp only [mem_union, mem_compl, mem_neighborFinset, mem_inter, mem_singleton]\n[GOAL]\nV : Type u\ninst✝² : Fintype V\ninst✝¹ : DecidableEq V\nG : SimpleGraph V\ninst✝ : DecidableRel G.Adj\nn k ℓ μ : ℕ\nh : IsSRGWith G n k ℓ μ\nv w : V\nha : v ≠ w ∧ ¬Adj G v w\nhne : v ≠ w\nu : V\n⊢ u = w ∨ u = v → ¬Adj G v u ∧ ¬Adj G w u\n[PROOFSTEP]\nrintro (rfl | rfl)\n[GOAL]\ncase inl\nV : Type u\ninst✝² : Fintype V\ninst✝¹ : DecidableEq V\nG : SimpleGraph V\ninst✝ : DecidableRel G.Adj\nn k ℓ μ : ℕ\nh : IsSRGWith G n k ℓ μ\nv u : V\nha : v ≠ u ∧ ¬Adj G v u\nhne : v ≠ u\n⊢ ¬Adj G v u ∧ ¬Adj G u u\n[PROOFSTEP]\nsimpa [adj_comm] using ha.2\n[GOAL]\ncase inr\nV : Type u\ninst✝² : Fintype V\ninst✝¹ : DecidableEq V\nG : SimpleGraph V\ninst✝ : DecidableRel G.Adj\nn k ℓ μ : ℕ\nh : IsSRGWith G n k ℓ μ\nw u : V\nha : u ≠ w ∧ ¬Adj G u w\nhne : u ≠ w\n⊢ ¬Adj G u u ∧ ¬Adj G w u\n[PROOFSTEP]\nsimpa [adj_comm] using ha.2\n[GOAL]\nV : Type u\ninst✝² : Fintype V\ninst✝¹ : DecidableEq V\nG : SimpleGraph V\ninst✝ : DecidableRel G.Adj\nn k ℓ μ : ℕ\nh : IsSRGWith G n k ℓ μ\nv w : V\nhn : v ≠ w\nhna : ¬Adj Gᶜ v w\n⊢ Fintype.card ↑(commonNeighbors Gᶜ v w) = n - (2 * k - ℓ)\n[PROOFSTEP]\nsimp only [← Set.toFinset_card, commonNeighbors, Set.toFinset_inter, neighborSet_compl, Set.toFinset_diff,\n  Set.toFinset_singleton, Set.toFinset_compl, ← neighborFinset_def]\n[GOAL]\nV : Type u\ninst✝² : Fintype V\ninst✝¹ : DecidableEq V\nG : SimpleGraph V\ninst✝ : DecidableRel G.Adj\nn k ℓ μ : ℕ\nh : IsSRGWith G n k ℓ μ\nv w : V\nhn : v ≠ w\nhna : ¬Adj Gᶜ v w\n⊢ Finset.card ((neighborFinset G v)ᶜ \\ {v} ∩ ((neighborFinset G w)ᶜ \\ {w})) = n - (2 * k - ℓ)\n[PROOFSTEP]\nsimp only [not_and, Classical.not_not, compl_adj] at hna \n[GOAL]\nV : Type u\ninst✝² : Fintype V\ninst✝¹ : DecidableEq V\nG : SimpleGraph V\ninst✝ : DecidableRel G.Adj\nn k ℓ μ : ℕ\nh : IsSRGWith G n k ℓ μ\nv w : V\nhn : v ≠ w\nhna : v ≠ w → Adj G v w\n⊢ Finset.card ((neighborFinset G v)ᶜ \\ {v} ∩ ((neighborFinset G w)ᶜ \\ {w})) = n - (2 * k - ℓ)\n[PROOFSTEP]\nhave h2' := hna hn\n[GOAL]\nV : Type u\ninst✝² : Fintype V\ninst✝¹ : DecidableEq V\nG : SimpleGraph V\ninst✝ : DecidableRel G.Adj\nn k ℓ μ : ℕ\nh : IsSRGWith G n k ℓ μ\nv w : V\nhn : v ≠ w\nhna : v ≠ w → Adj G v w\nh2' : Adj G v w\n⊢ Finset.card ((neighborFinset G v)ᶜ \\ {v} ∩ ((neighborFinset G w)ᶜ \\ {w})) = n - (2 * k - ℓ)\n[PROOFSTEP]\nsimp_rw [compl_neighborFinset_sdiff_inter_eq, sdiff_compl_neighborFinset_inter_eq h2']\n[GOAL]\nV : Type u\ninst✝² : Fintype V\ninst✝¹ : DecidableEq V\nG : SimpleGraph V\ninst✝ : DecidableRel G.Adj\nn k ℓ μ : ℕ\nh : IsSRGWith G n k ℓ μ\nv w : V\nhn : v ≠ w\nhna : v ≠ w → Adj G v w\nh2' : Adj G v w\n⊢ Finset.card ((neighborFinset G v)ᶜ ∩ (neighborFinset G w)ᶜ) = n - (2 * k - ℓ)\n[PROOFSTEP]\nrwa [← Finset.compl_union, card_compl, h.card_neighborFinset_union_of_adj, ← h.card]\n[GOAL]\nV : Type u\ninst✝² : Fintype V\ninst✝¹ : DecidableEq V\nG : SimpleGraph V\ninst✝ : DecidableRel G.Adj\nn k ℓ μ : ℕ\nh : IsSRGWith G n k ℓ μ\nhn : 0 < n\n⊢ k * (k - ℓ - 1) = (n - k - 1) * μ\n[PROOFSTEP]\nrw [← h.card, Fintype.card_pos_iff] at hn \n[GOAL]\nV : Type u\ninst✝² : Fintype V\ninst✝¹ : DecidableEq V\nG : SimpleGraph V\ninst✝ : DecidableRel G.Adj\nn k ℓ μ : ℕ\nh : IsSRGWith G n k ℓ μ\nhn : Nonempty V\n⊢ k * (k - ℓ - 1) = (n - k - 1) * μ\n[PROOFSTEP]\nobtain ⟨v⟩ := hn\n[GOAL]\ncase intro\nV : Type u\ninst✝² : Fintype V\ninst✝¹ : DecidableEq V\nG : SimpleGraph V\ninst✝ : DecidableRel G.Adj\nn k ℓ μ : ℕ\nh : IsSRGWith G n k ℓ μ\nv : V\n⊢ k * (k - ℓ - 1) = (n - k - 1) * μ\n[PROOFSTEP]\nconvert card_mul_eq_card_mul G.Adj (s := G.neighborFinset v) (t := Gᶜ.neighborFinset v) _ _\n[GOAL]\ncase h.e'_2.h.e'_5\nV : Type u\ninst✝² : Fintype V\ninst✝¹ : DecidableEq V\nG : SimpleGraph V\ninst✝ : DecidableRel G.Adj\nn k ℓ μ : ℕ\nh : IsSRGWith G n k ℓ μ\nv : V\n⊢ k = Finset.card (neighborFinset G v)\n[PROOFSTEP]\nsimp [h.regular v]\n[GOAL]\ncase h.e'_3.h.e'_5\nV : Type u\ninst✝² : Fintype V\ninst✝¹ : DecidableEq V\nG : SimpleGraph V\ninst✝ : DecidableRel G.Adj\nn k ℓ μ : ℕ\nh : IsSRGWith G n k ℓ μ\nv : V\n⊢ n - k - 1 = Finset.card (neighborFinset Gᶜ v)\n[PROOFSTEP]\nsimp [h.compl.regular v]\n[GOAL]\ncase intro.convert_3\nV : Type u\ninst✝² : Fintype V\ninst✝¹ : DecidableEq V\nG : SimpleGraph V\ninst✝ : DecidableRel G.Adj\nn k ℓ μ : ℕ\nh : IsSRGWith G n k ℓ μ\nv : V\n⊢ ∀ (a : V), a ∈ neighborFinset G v → Finset.card (bipartiteAbove G.Adj (neighborFinset Gᶜ v) a) = k - ℓ - 1\n[PROOFSTEP]\nintro w hw\n[GOAL]\ncase intro.convert_3\nV : Type u\ninst✝² : Fintype V\ninst✝¹ : DecidableEq V\nG : SimpleGraph V\ninst✝ : DecidableRel G.Adj\nn k ℓ μ : ℕ\nh : IsSRGWith G n k ℓ μ\nv w : V\nhw : w ∈ neighborFinset G v\n⊢ Finset.card (bipartiteAbove G.Adj (neighborFinset Gᶜ v) w) = k - ℓ - 1\n[PROOFSTEP]\nrw [mem_neighborFinset] at hw \n[GOAL]\ncase intro.convert_3\nV : Type u\ninst✝² : Fintype V\ninst✝¹ : DecidableEq V\nG : SimpleGraph V\ninst✝ : DecidableRel G.Adj\nn k ℓ μ : ℕ\nh : IsSRGWith G n k ℓ μ\nv w : V\nhw : Adj G v w\n⊢ Finset.card (bipartiteAbove G.Adj (neighborFinset Gᶜ v) w) = k - ℓ - 1\n[PROOFSTEP]\nsimp_rw [bipartiteAbove, show G.Adj w = fun a => G.Adj w a by rfl, ← mem_neighborFinset, filter_mem_eq_inter]\n[GOAL]\nV : Type u\ninst✝² : Fintype V\ninst✝¹ : DecidableEq V\nG : SimpleGraph V\ninst✝ : DecidableRel G.Adj\nn k ℓ μ : ℕ\nh : IsSRGWith G n k ℓ μ\nv w : V\nhw : Adj G v w\n⊢ Adj G w = fun a => Adj G w a\n[PROOFSTEP]\nrfl\n[GOAL]\ncase intro.convert_3\nV : Type u\ninst✝² : Fintype V\ninst✝¹ : DecidableEq V\nG : SimpleGraph V\ninst✝ : DecidableRel G.Adj\nn k ℓ μ : ℕ\nh : IsSRGWith G n k ℓ μ\nv w : V\nhw : Adj G v w\n⊢ Finset.card (neighborFinset Gᶜ v ∩ neighborFinset G w) = k - ℓ - 1\n[PROOFSTEP]\nhave s : { v } ⊆ G.neighborFinset w \\ G.neighborFinset v :=\n  by\n  rw [singleton_subset_iff, mem_sdiff, mem_neighborFinset]\n  exact ⟨hw.symm, G.not_mem_neighborFinset_self v⟩\n[GOAL]\nV : Type u\ninst✝² : Fintype V\ninst✝¹ : DecidableEq V\nG : SimpleGraph V\ninst✝ : DecidableRel G.Adj\nn k ℓ μ : ℕ\nh : IsSRGWith G n k ℓ μ\nv w : V\nhw : Adj G v w\n⊢ {v} ⊆ neighborFinset G w \\ neighborFinset G v\n[PROOFSTEP]\nrw [singleton_subset_iff, mem_sdiff, mem_neighborFinset]\n[GOAL]\nV : Type u\ninst✝² : Fintype V\ninst✝¹ : DecidableEq V\nG : SimpleGraph V\ninst✝ : DecidableRel G.Adj\nn k ℓ μ : ℕ\nh : IsSRGWith G n k ℓ μ\nv w : V\nhw : Adj G v w\n⊢ Adj G w v ∧ ¬v ∈ neighborFinset G v\n[PROOFSTEP]\nexact ⟨hw.symm, G.not_mem_neighborFinset_self v⟩\n[GOAL]\ncase intro.convert_3\nV : Type u\ninst✝² : Fintype V\ninst✝¹ : DecidableEq V\nG : SimpleGraph V\ninst✝ : DecidableRel G.Adj\nn k ℓ μ : ℕ\nh : IsSRGWith G n k ℓ μ\nv w : V\nhw : Adj G v w\ns : {v} ⊆ neighborFinset G w \\ neighborFinset G v\n⊢ Finset.card (neighborFinset Gᶜ v ∩ neighborFinset G w) = k - ℓ - 1\n[PROOFSTEP]\nrw [inter_comm, neighborFinset_compl, inter_sdiff, ← sdiff_eq_inter_compl, card_sdiff s, card_singleton, ←\n  sdiff_inter_self_left, card_sdiff (by apply inter_subset_left)]\n[GOAL]\nV : Type u\ninst✝² : Fintype V\ninst✝¹ : DecidableEq V\nG : SimpleGraph V\ninst✝ : DecidableRel G.Adj\nn k ℓ μ : ℕ\nh : IsSRGWith G n k ℓ μ\nv w : V\nhw : Adj G v w\ns : {v} ⊆ neighborFinset G w \\ neighborFinset G v\n⊢ neighborFinset G w ∩ neighborFinset G v ⊆ neighborFinset G w\n[PROOFSTEP]\napply inter_subset_left\n[GOAL]\ncase intro.convert_3\nV : Type u\ninst✝² : Fintype V\ninst✝¹ : DecidableEq V\nG : SimpleGraph V\ninst✝ : DecidableRel G.Adj\nn k ℓ μ : ℕ\nh : IsSRGWith G n k ℓ μ\nv w : V\nhw : Adj G v w\ns : {v} ⊆ neighborFinset G w \\ neighborFinset G v\n⊢ Finset.card (neighborFinset G w) - Finset.card (neighborFinset G w ∩ neighborFinset G v) - 1 = k - ℓ - 1\n[PROOFSTEP]\ncongr\n[GOAL]\ncase intro.convert_3.e_a.e_a\nV : Type u\ninst✝² : Fintype V\ninst✝¹ : DecidableEq V\nG : SimpleGraph V\ninst✝ : DecidableRel G.Adj\nn k ℓ μ : ℕ\nh : IsSRGWith G n k ℓ μ\nv w : V\nhw : Adj G v w\ns : {v} ⊆ neighborFinset G w \\ neighborFinset G v\n⊢ Finset.card (neighborFinset G w) = k\n[PROOFSTEP]\nsimp [h.regular w]\n[GOAL]\ncase intro.convert_3.e_a.e_a\nV : Type u\ninst✝² : Fintype V\ninst✝¹ : DecidableEq V\nG : SimpleGraph V\ninst✝ : DecidableRel G.Adj\nn k ℓ μ : ℕ\nh : IsSRGWith G n k ℓ μ\nv w : V\nhw : Adj G v w\ns : {v} ⊆ neighborFinset G w \\ neighborFinset G v\n⊢ Finset.card (neighborFinset G w ∩ neighborFinset G v) = ℓ\n[PROOFSTEP]\nsimp_rw [inter_comm, neighborFinset_def, ← Set.toFinset_inter, ← h.of_adj v w hw, ← Set.toFinset_card]\n[GOAL]\ncase intro.convert_3.e_a.e_a\nV : Type u\ninst✝² : Fintype V\ninst✝¹ : DecidableEq V\nG : SimpleGraph V\ninst✝ : DecidableRel G.Adj\nn k ℓ μ : ℕ\nh : IsSRGWith G n k ℓ μ\nv w : V\nhw : Adj G v w\ns : {v} ⊆ neighborFinset G w \\ neighborFinset G v\n⊢ Finset.card (Set.toFinset (neighborSet G v ∩ neighborSet G w)) = Finset.card (Set.toFinset (commonNeighbors G v w))\n[PROOFSTEP]\ncongr!\n[GOAL]\ncase intro.convert_4\nV : Type u\ninst✝² : Fintype V\ninst✝¹ : DecidableEq V\nG : SimpleGraph V\ninst✝ : DecidableRel G.Adj\nn k ℓ μ : ℕ\nh : IsSRGWith G n k ℓ μ\nv : V\n⊢ ∀ (b : V), b ∈ neighborFinset Gᶜ v → Finset.card (bipartiteBelow G.Adj (neighborFinset G v) b) = μ\n[PROOFSTEP]\nintro w hw\n[GOAL]\ncase intro.convert_4\nV : Type u\ninst✝² : Fintype V\ninst✝¹ : DecidableEq V\nG : SimpleGraph V\ninst✝ : DecidableRel G.Adj\nn k ℓ μ : ℕ\nh : IsSRGWith G n k ℓ μ\nv w : V\nhw : w ∈ neighborFinset Gᶜ v\n⊢ Finset.card (bipartiteBelow G.Adj (neighborFinset G v) w) = μ\n[PROOFSTEP]\nsimp_rw [neighborFinset_compl, mem_sdiff, mem_compl, mem_singleton, mem_neighborFinset, ← Ne.def] at hw \n[GOAL]\ncase intro.convert_4\nV : Type u\ninst✝² : Fintype V\ninst✝¹ : DecidableEq V\nG : SimpleGraph V\ninst✝ : DecidableRel G.Adj\nn k ℓ μ : ℕ\nh : IsSRGWith G n k ℓ μ\nv w : V\nhw : ¬Adj G v w ∧ w ≠ v\n⊢ Finset.card (bipartiteBelow G.Adj (neighborFinset G v) w) = μ\n[PROOFSTEP]\nsimp_rw [bipartiteBelow, adj_comm, ← mem_neighborFinset, filter_mem_eq_inter, neighborFinset_def, ← Set.toFinset_inter,\n  ← h.of_not_adj v w hw.2.symm hw.1, ← Set.toFinset_card]\n[GOAL]\ncase intro.convert_4\nV : Type u\ninst✝² : Fintype V\ninst✝¹ : DecidableEq V\nG : SimpleGraph V\ninst✝ : DecidableRel G.Adj\nn k ℓ μ : ℕ\nh : IsSRGWith G n k ℓ μ\nv w : V\nhw : ¬Adj G v w ∧ w ≠ v\n⊢ Finset.card (Set.toFinset (neighborSet G v ∩ neighborSet G w)) = Finset.card (Set.toFinset (commonNeighbors G v w))\n[PROOFSTEP]\ncongr!\n[GOAL]\nV : Type u\ninst✝³ : Fintype V\ninst✝² : DecidableEq V\nG : SimpleGraph V\ninst✝¹ : DecidableRel G.Adj\nn k ℓ μ : ℕ\nα : Type u_1\ninst✝ : Semiring α\nh : IsSRGWith G n k ℓ μ\n⊢ adjMatrix α G ^ 2 = k • 1 + ℓ • adjMatrix α G + μ • adjMatrix α Gᶜ\n[PROOFSTEP]\next v w\n[GOAL]\ncase a.h\nV : Type u\ninst✝³ : Fintype V\ninst✝² : DecidableEq V\nG : SimpleGraph V\ninst✝¹ : DecidableRel G.Adj\nn k ℓ μ : ℕ\nα : Type u_1\ninst✝ : Semiring α\nh : IsSRGWith G n k ℓ μ\nv w : V\n⊢ (adjMatrix α G ^ 2) v w = (k • 1 + ℓ • adjMatrix α G + μ • adjMatrix α Gᶜ) v w\n[PROOFSTEP]\nsimp only [adjMatrix_pow_apply_eq_card_walk, Set.coe_setOf, Matrix.add_apply, Matrix.smul_apply, adjMatrix_apply,\n  compl_adj]\n[GOAL]\ncase a.h\nV : Type u\ninst✝³ : Fintype V\ninst✝² : DecidableEq V\nG : SimpleGraph V\ninst✝¹ : DecidableRel G.Adj\nn k ℓ μ : ℕ\nα : Type u_1\ninst✝ : Semiring α\nh : IsSRGWith G n k ℓ μ\nv w : V\n⊢ ↑(Fintype.card { x // Walk.length x = 2 }) =\n    (k • OfNat.ofNat 1 v w + ℓ • if Adj G v w then 1 else 0) + μ • if v ≠ w ∧ ¬Adj G v w then 1 else 0\n[PROOFSTEP]\nrw [Fintype.card_congr (G.walkLengthTwoEquivCommonNeighbors v w)]\n[GOAL]\ncase a.h\nV : Type u\ninst✝³ : Fintype V\ninst✝² : DecidableEq V\nG : SimpleGraph V\ninst✝¹ : DecidableRel G.Adj\nn k ℓ μ : ℕ\nα : Type u_1\ninst✝ : Semiring α\nh : IsSRGWith G n k ℓ μ\nv w : V\n⊢ ↑(Fintype.card ↑(commonNeighbors G v w)) =\n    (k • OfNat.ofNat 1 v w + ℓ • if Adj G v w then 1 else 0) + μ • if v ≠ w ∧ ¬Adj G v w then 1 else 0\n[PROOFSTEP]\nobtain rfl | hn := eq_or_ne v w\n[GOAL]\ncase a.h.inl\nV : Type u\ninst✝³ : Fintype V\ninst✝² : DecidableEq V\nG : SimpleGraph V\ninst✝¹ : DecidableRel G.Adj\nn k ℓ μ : ℕ\nα : Type u_1\ninst✝ : Semiring α\nh : IsSRGWith G n k ℓ μ\nv : V\n⊢ ↑(Fintype.card ↑(commonNeighbors G v v)) =\n    (k • OfNat.ofNat 1 v v + ℓ • if Adj G v v then 1 else 0) + μ • if v ≠ v ∧ ¬Adj G v v then 1 else 0\n[PROOFSTEP]\nrw [← Set.toFinset_card]\n[GOAL]\ncase a.h.inl\nV : Type u\ninst✝³ : Fintype V\ninst✝² : DecidableEq V\nG : SimpleGraph V\ninst✝¹ : DecidableRel G.Adj\nn k ℓ μ : ℕ\nα : Type u_1\ninst✝ : Semiring α\nh : IsSRGWith G n k ℓ μ\nv : V\n⊢ ↑(Finset.card (Set.toFinset (commonNeighbors G v v))) =\n    (k • OfNat.ofNat 1 v v + ℓ • if Adj G v v then 1 else 0) + μ • if v ≠ v ∧ ¬Adj G v v then 1 else 0\n[PROOFSTEP]\nsimp [commonNeighbors, ← neighborFinset_def, h.regular v]\n[GOAL]\ncase a.h.inr\nV : Type u\ninst✝³ : Fintype V\ninst✝² : DecidableEq V\nG : SimpleGraph V\ninst✝¹ : DecidableRel G.Adj\nn k ℓ μ : ℕ\nα : Type u_1\ninst✝ : Semiring α\nh : IsSRGWith G n k ℓ μ\nv w : V\nhn : v ≠ w\n⊢ ↑(Fintype.card ↑(commonNeighbors G v w)) =\n    (k • OfNat.ofNat 1 v w + ℓ • if Adj G v w then 1 else 0) + μ • if v ≠ w ∧ ¬Adj G v w then 1 else 0\n[PROOFSTEP]\nsimp only [Matrix.one_apply_ne' hn.symm, ne_eq, hn]\n[GOAL]\ncase a.h.inr\nV : Type u\ninst✝³ : Fintype V\ninst✝² : DecidableEq V\nG : SimpleGraph V\ninst✝¹ : DecidableRel G.Adj\nn k ℓ μ : ℕ\nα : Type u_1\ninst✝ : Semiring α\nh : IsSRGWith G n k ℓ μ\nv w : V\nhn : v ≠ w\n⊢ ↑(Fintype.card ↑(commonNeighbors G v w)) =\n    (k • 0 + ℓ • if Adj G v w then 1 else 0) + μ • if True ∧ ¬Adj G v w then 1 else 0\n[PROOFSTEP]\nby_cases ha : G.Adj v w\n[GOAL]\ncase pos\nV : Type u\ninst✝³ : Fintype V\ninst✝² : DecidableEq V\nG : SimpleGraph V\ninst✝¹ : DecidableRel G.Adj\nn k ℓ μ : ℕ\nα : Type u_1\ninst✝ : Semiring α\nh : IsSRGWith G n k ℓ μ\nv w : V\nhn : v ≠ w\nha : Adj G v w\n⊢ ↑(Fintype.card ↑(commonNeighbors G v w)) =\n    (k • 0 + ℓ • if Adj G v w then 1 else 0) + μ • if True ∧ ¬Adj G v w then 1 else 0\n[PROOFSTEP]\nsimp only [ha, ite_true, ite_false, add_zero, zero_add, nsmul_eq_mul, smul_zero, mul_one]\n[GOAL]\ncase neg\nV : Type u\ninst✝³ : Fintype V\ninst✝² : DecidableEq V\nG : SimpleGraph V\ninst✝¹ : DecidableRel G.Adj\nn k ℓ μ : ℕ\nα : Type u_1\ninst✝ : Semiring α\nh : IsSRGWith G n k ℓ μ\nv w : V\nhn : v ≠ w\nha : ¬Adj G v w\n⊢ ↑(Fintype.card ↑(commonNeighbors G v w)) =\n    (k • 0 + ℓ • if Adj G v w then 1 else 0) + μ • if True ∧ ¬Adj G v w then 1 else 0\n[PROOFSTEP]\nsimp only [ha, ite_true, ite_false, add_zero, zero_add, nsmul_eq_mul, smul_zero, mul_one]\n[GOAL]\ncase pos\nV : Type u\ninst✝³ : Fintype V\ninst✝² : DecidableEq V\nG : SimpleGraph V\ninst✝¹ : DecidableRel G.Adj\nn k ℓ μ : ℕ\nα : Type u_1\ninst✝ : Semiring α\nh : IsSRGWith G n k ℓ μ\nv w : V\nhn : v ≠ w\nha : Adj G v w\n⊢ ↑(Fintype.card ↑(commonNeighbors G v w)) = ↑ℓ\n[PROOFSTEP]\nrw [h.of_adj v w ha]\n[GOAL]\ncase neg\nV : Type u\ninst✝³ : Fintype V\ninst✝² : DecidableEq V\nG : SimpleGraph V\ninst✝¹ : DecidableRel G.Adj\nn k ℓ μ : ℕ\nα : Type u_1\ninst✝ : Semiring α\nh : IsSRGWith G n k ℓ μ\nv w : V\nhn : v ≠ w\nha : ¬Adj G v w\n⊢ ↑(Fintype.card ↑(commonNeighbors G v w)) = ↑μ\n[PROOFSTEP]\nrw [h.of_not_adj v w hn ha]\n", "meta": {"mathlib_filename": "Mathlib.Combinatorics.SimpleGraph.StronglyRegular", "llama_tokens": 12881, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7520125737597972, "lm_q2_score": 0.6688802537704063, "lm_q1q2_score": 0.5030063611749895}}
{"text": "[GOAL]\nα : Type u\ninst✝ : Group α\nx y : SingleObj α\nf : x ⟶ y\n⊢ inv f = f⁻¹\n[PROOFSTEP]\napply IsIso.inv_eq_of_hom_inv_id\n[GOAL]\ncase hom_inv_id\nα : Type u\ninst✝ : Group α\nx y : SingleObj α\nf : x ⟶ y\n⊢ f ≫ f⁻¹ = 𝟙 x\n[PROOFSTEP]\nrw [comp_as_mul, inv_mul_self, id_as_one]\n[GOAL]\nα✝ α : Type u\nβ : Type v\ninst✝¹ : Monoid α\ninst✝ : Monoid β\n⊢ Function.LeftInverse\n    (fun f =>\n      {\n        toOneHom :=\n          { toFun := fun x => f.map (↑(toEnd α) x), map_one' := (_ : f.map (𝟙 (star α)) = 𝟙 (f.obj (star α))) },\n        map_mul' := (_ : ∀ (x y : α), f.map (y ≫ x) = f.map y ≫ f.map x) })\n    fun f => Functor.mk { obj := id, map := fun {X Y} => ↑f }\n[PROOFSTEP]\naesop_cat\n[GOAL]\nα✝ α : Type u\nβ : Type v\ninst✝¹ : Monoid α\ninst✝ : Monoid β\n⊢ Function.RightInverse\n    (fun f =>\n      {\n        toOneHom :=\n          { toFun := fun x => f.map (↑(toEnd α) x), map_one' := (_ : f.map (𝟙 (star α)) = 𝟙 (f.obj (star α))) },\n        map_mul' := (_ : ∀ (x y : α), f.map (y ≫ x) = f.map y ≫ f.map x) })\n    fun f => Functor.mk { obj := id, map := fun {X Y} => ↑f }\n[PROOFSTEP]\naesop_cat\n[GOAL]\nα : Type u\nC : Type ?u.20048\nG : Type ?u.20052\ninst✝¹ : Category.{?u.20049, ?u.20048} C\ninst✝ : Group G\nf : C → G\n⊢ ∀ (X : C),\n    { obj := fun x => (), map := fun {x y} x_1 => f y * (f x)⁻¹ }.map (𝟙 X) =\n      𝟙 ({ obj := fun x => (), map := fun {x y} x_1 => f y * (f x)⁻¹ }.obj X)\n[PROOFSTEP]\nintro\n[GOAL]\nα : Type u\nC : Type ?u.20048\nG : Type ?u.20052\ninst✝¹ : Category.{?u.20049, ?u.20048} C\ninst✝ : Group G\nf : C → G\nX✝ : C\n⊢ { obj := fun x => (), map := fun {x y} x_1 => f y * (f x)⁻¹ }.map (𝟙 X✝) =\n    𝟙 ({ obj := fun x => (), map := fun {x y} x_1 => f y * (f x)⁻¹ }.obj X✝)\n[PROOFSTEP]\nsimp only [SingleObj.id_as_one, mul_right_inv]\n[GOAL]\nα : Type u\nC : Type ?u.20048\nG : Type ?u.20052\ninst✝¹ : Category.{?u.20049, ?u.20048} C\ninst✝ : Group G\nf : C → G\n⊢ ∀ {X Y Z : C} (f_1 : X ⟶ Y) (g : Y ⟶ Z),\n    { obj := fun x => (), map := fun {x y} x_1 => f y * (f x)⁻¹ }.map (f_1 ≫ g) =\n      { obj := fun x => (), map := fun {x y} x_1 => f y * (f x)⁻¹ }.map f_1 ≫\n        { obj := fun x => (), map := fun {x y} x_1 => f y * (f x)⁻¹ }.map g\n[PROOFSTEP]\nintros\n[GOAL]\nα : Type u\nC : Type ?u.20048\nG : Type ?u.20052\ninst✝¹ : Category.{?u.20049, ?u.20048} C\ninst✝ : Group G\nf : C → G\nX✝ Y✝ Z✝ : C\nf✝ : X✝ ⟶ Y✝\ng✝ : Y✝ ⟶ Z✝\n⊢ { obj := fun x => (), map := fun {x y} x_1 => f y * (f x)⁻¹ }.map (f✝ ≫ g✝) =\n    { obj := fun x => (), map := fun {x y} x_1 => f y * (f x)⁻¹ }.map f✝ ≫\n      { obj := fun x => (), map := fun {x y} x_1 => f y * (f x)⁻¹ }.map g✝\n[PROOFSTEP]\ndsimp\n[GOAL]\nα : Type u\nC : Type ?u.20048\nG : Type ?u.20052\ninst✝¹ : Category.{?u.20049, ?u.20048} C\ninst✝ : Group G\nf : C → G\nX✝ Y✝ Z✝ : C\nf✝ : X✝ ⟶ Y✝\ng✝ : Y✝ ⟶ Z✝\n⊢ f Z✝ * (f X✝)⁻¹ = (f Y✝ * (f X✝)⁻¹) ≫ (f Z✝ * (f Y✝)⁻¹)\n[PROOFSTEP]\nrw [SingleObj.comp_as_mul, ← mul_assoc, mul_left_inj, mul_assoc, inv_mul_self, mul_one]\n[GOAL]\nα : Type u\ninst✝ : Monoid α\n⊢ α ≃* End (SingleObj.star α)\n[PROOFSTEP]\nexact SingleObj.toEnd α\n[GOAL]\nX✝ Y✝ : MonCat\na₁✝ a₂✝ : X✝ ⟶ Y✝\nh : toCat.map a₁✝ = toCat.map a₂✝\n⊢ a₁✝ = a₂✝\n[PROOFSTEP]\nsimpa [toCat] using h\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.SingleObj", "llama_tokens": 1752, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.808067204308405, "lm_q2_score": 0.6224593312018546, "lm_q1q2_score": 0.5029889715599621}}
{"text": "[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhm : m ≤ m0\nf : { x // x ∈ Lp E 2 }\n⊢ snorm (↑↑↑(↑(condexpL2 E 𝕜 hm) f)) 2 μ ≤ snorm (↑↑f) 2 μ\n[PROOFSTEP]\nrw [lpMeas_coe, ← ENNReal.toReal_le_toReal (Lp.snorm_ne_top _) (Lp.snorm_ne_top _), ← Lp.norm_def, ← Lp.norm_def,\n  Submodule.norm_coe]\n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhm : m ≤ m0\nf : { x // x ∈ Lp E 2 }\n⊢ ‖↑(condexpL2 E 𝕜 hm) f‖ ≤ ‖f‖\n[PROOFSTEP]\nexact norm_condexpL2_le hm f\n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhm : m ≤ m0\nf : { x // x ∈ Lp E 2 }\n⊢ ‖↑(↑(condexpL2 E 𝕜 hm) f)‖ ≤ ‖f‖\n[PROOFSTEP]\nrw [Lp.norm_def, Lp.norm_def, ← lpMeas_coe]\n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhm : m ≤ m0\nf : { x // x ∈ Lp E 2 }\n⊢ ENNReal.toReal (snorm (↑↑↑(↑(condexpL2 E 𝕜 hm) f)) 2 μ) ≤ ENNReal.toReal (snorm (↑↑f) 2 μ)\n[PROOFSTEP]\nrefine' (ENNReal.toReal_le_toReal _ (Lp.snorm_ne_top _)).mpr (snorm_condexpL2_le hm f)\n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhm : m ≤ m0\nf : { x // x ∈ Lp E 2 }\n⊢ snorm (↑↑↑(↑(condexpL2 E 𝕜 hm) f)) 2 μ ≠ ⊤\n[PROOFSTEP]\nexact Lp.snorm_ne_top _\n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nc : E\n⊢ ↑(↑(condexpL2 E 𝕜 hm) (indicatorConstLp 2 (_ : MeasurableSet s) hμs c)) =\n    indicatorConstLp 2 (_ : MeasurableSet s) hμs c\n[PROOFSTEP]\nrw [condexpL2]\n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nc : E\n⊢ ↑(↑(orthogonalProjection (lpMeas E 𝕜 m 2 μ)) (indicatorConstLp 2 (_ : MeasurableSet s) hμs c)) =\n    indicatorConstLp 2 (_ : MeasurableSet s) hμs c\n[PROOFSTEP]\nhaveI : Fact (m ≤ m0) := ⟨hm⟩\n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nc : E\nthis : Fact (m ≤ m0)\n⊢ ↑(↑(orthogonalProjection (lpMeas E 𝕜 m 2 μ)) (indicatorConstLp 2 (_ : MeasurableSet s) hμs c)) =\n    indicatorConstLp 2 (_ : MeasurableSet s) hμs c\n[PROOFSTEP]\nhave h_mem : indicatorConstLp 2 (hm s hs) hμs c ∈ lpMeas E 𝕜 m 2 μ := mem_lpMeas_indicatorConstLp hm hs hμs\n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nc : E\nthis : Fact (m ≤ m0)\nh_mem : indicatorConstLp 2 (_ : MeasurableSet s) hμs c ∈ lpMeas E 𝕜 m 2 μ\n⊢ ↑(↑(orthogonalProjection (lpMeas E 𝕜 m 2 μ)) (indicatorConstLp 2 (_ : MeasurableSet s) hμs c)) =\n    indicatorConstLp 2 (_ : MeasurableSet s) hμs c\n[PROOFSTEP]\nlet ind := (⟨indicatorConstLp 2 (hm s hs) hμs c, h_mem⟩ : lpMeas E 𝕜 m 2 μ)\n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nc : E\nthis : Fact (m ≤ m0)\nh_mem : indicatorConstLp 2 (_ : MeasurableSet s) hμs c ∈ lpMeas E 𝕜 m 2 μ\nind : { x // x ∈ lpMeas E 𝕜 m 2 μ } := { val := indicatorConstLp 2 (_ : MeasurableSet s) hμs c, property := h_mem }\n⊢ ↑(↑(orthogonalProjection (lpMeas E 𝕜 m 2 μ)) (indicatorConstLp 2 (_ : MeasurableSet s) hμs c)) =\n    indicatorConstLp 2 (_ : MeasurableSet s) hμs c\n[PROOFSTEP]\nhave h_coe_ind : (ind : α →₂[μ] E) = indicatorConstLp 2 (hm s hs) hμs c := by rfl\n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nc : E\nthis : Fact (m ≤ m0)\nh_mem : indicatorConstLp 2 (_ : MeasurableSet s) hμs c ∈ lpMeas E 𝕜 m 2 μ\nind : { x // x ∈ lpMeas E 𝕜 m 2 μ } := { val := indicatorConstLp 2 (_ : MeasurableSet s) hμs c, property := h_mem }\n⊢ ↑ind = indicatorConstLp 2 (_ : MeasurableSet s) hμs c\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nc : E\nthis : Fact (m ≤ m0)\nh_mem : indicatorConstLp 2 (_ : MeasurableSet s) hμs c ∈ lpMeas E 𝕜 m 2 μ\nind : { x // x ∈ lpMeas E 𝕜 m 2 μ } := { val := indicatorConstLp 2 (_ : MeasurableSet s) hμs c, property := h_mem }\nh_coe_ind : ↑ind = indicatorConstLp 2 (_ : MeasurableSet s) hμs c\n⊢ ↑(↑(orthogonalProjection (lpMeas E 𝕜 m 2 μ)) (indicatorConstLp 2 (_ : MeasurableSet s) hμs c)) =\n    indicatorConstLp 2 (_ : MeasurableSet s) hμs c\n[PROOFSTEP]\nhave h_orth_mem := orthogonalProjection_mem_subspace_eq_self ind\n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nc : E\nthis : Fact (m ≤ m0)\nh_mem : indicatorConstLp 2 (_ : MeasurableSet s) hμs c ∈ lpMeas E 𝕜 m 2 μ\nind : { x // x ∈ lpMeas E 𝕜 m 2 μ } := { val := indicatorConstLp 2 (_ : MeasurableSet s) hμs c, property := h_mem }\nh_coe_ind : ↑ind = indicatorConstLp 2 (_ : MeasurableSet s) hμs c\nh_orth_mem : ↑(orthogonalProjection (lpMeas E 𝕜 m 2 μ)) ↑ind = ind\n⊢ ↑(↑(orthogonalProjection (lpMeas E 𝕜 m 2 μ)) (indicatorConstLp 2 (_ : MeasurableSet s) hμs c)) =\n    indicatorConstLp 2 (_ : MeasurableSet s) hμs c\n[PROOFSTEP]\nrw [← h_coe_ind, h_orth_mem]\n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhm : m ≤ m0\nf g : { x // x ∈ Lp E 2 }\nhg : AEStronglyMeasurable' m (↑↑g) μ\n⊢ inner (↑(↑(condexpL2 E 𝕜 hm) f)) g = inner f g\n[PROOFSTEP]\nsymm\n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhm : m ≤ m0\nf g : { x // x ∈ Lp E 2 }\nhg : AEStronglyMeasurable' m (↑↑g) μ\n⊢ inner f g = inner (↑(↑(condexpL2 E 𝕜 hm) f)) g\n[PROOFSTEP]\nrw [← sub_eq_zero, ← inner_sub_left, condexpL2]\n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhm : m ≤ m0\nf g : { x // x ∈ Lp E 2 }\nhg : AEStronglyMeasurable' m (↑↑g) μ\n⊢ inner (f - ↑(↑(orthogonalProjection (lpMeas E 𝕜 m 2 μ)) f)) g = 0\n[PROOFSTEP]\nsimp only [mem_lpMeas_iff_aeStronglyMeasurable'.mpr hg, orthogonalProjection_inner_eq_zero f g]\n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhm : m ≤ m0\nf : { x // x ∈ Lp 𝕜 2 }\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\n⊢ ∫ (x : α) in s, ↑↑↑(↑(condexpL2 𝕜 𝕜 hm) f) x ∂μ = ∫ (x : α) in s, ↑↑f x ∂μ\n[PROOFSTEP]\nrw [← L2.inner_indicatorConstLp_one (𝕜 := 𝕜) (hm s hs) hμs f]\n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhm : m ≤ m0\nf : { x // x ∈ Lp 𝕜 2 }\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\n⊢ ∫ (x : α) in s, ↑↑↑(↑(condexpL2 𝕜 𝕜 hm) f) x ∂μ = inner (indicatorConstLp 2 (_ : MeasurableSet s) hμs 1) f\n[PROOFSTEP]\nhave h_eq_inner :\n  ∫ x in s, (condexpL2 𝕜 𝕜 hm f : α → 𝕜) x ∂μ = inner (indicatorConstLp 2 (hm s hs) hμs (1 : 𝕜)) (condexpL2 𝕜 𝕜 hm f) :=\n  by rw [L2.inner_indicatorConstLp_one (hm s hs) hμs]\n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhm : m ≤ m0\nf : { x // x ∈ Lp 𝕜 2 }\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\n⊢ ∫ (x : α) in s, ↑↑↑(↑(condexpL2 𝕜 𝕜 hm) f) x ∂μ =\n    inner (indicatorConstLp 2 (_ : MeasurableSet s) hμs 1) ↑(↑(condexpL2 𝕜 𝕜 hm) f)\n[PROOFSTEP]\nrw [L2.inner_indicatorConstLp_one (hm s hs) hμs]\n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhm : m ≤ m0\nf : { x // x ∈ Lp 𝕜 2 }\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nh_eq_inner :\n  ∫ (x : α) in s, ↑↑↑(↑(condexpL2 𝕜 𝕜 hm) f) x ∂μ =\n    inner (indicatorConstLp 2 (_ : MeasurableSet s) hμs 1) ↑(↑(condexpL2 𝕜 𝕜 hm) f)\n⊢ ∫ (x : α) in s, ↑↑↑(↑(condexpL2 𝕜 𝕜 hm) f) x ∂μ = inner (indicatorConstLp 2 (_ : MeasurableSet s) hμs 1) f\n[PROOFSTEP]\nrw [h_eq_inner, ← inner_condexpL2_left_eq_right, condexpL2_indicator_of_measurable hm hs hμs]\n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nf : { x // x ∈ Lp ℝ 2 }\n⊢ ∫⁻ (x : α) in s, ↑‖↑↑↑(↑(condexpL2 ℝ ℝ hm) f) x‖₊ ∂μ ≤ ∫⁻ (x : α) in s, ↑‖↑↑f x‖₊ ∂μ\n[PROOFSTEP]\nlet h_meas := lpMeas.aeStronglyMeasurable' (condexpL2 ℝ ℝ hm f)\n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nf : { x // x ∈ Lp ℝ 2 }\nh_meas : AEStronglyMeasurable' m (↑↑↑(↑(condexpL2 ℝ ℝ hm) f)) μ := lpMeas.aeStronglyMeasurable' (↑(condexpL2 ℝ ℝ hm) f)\n⊢ ∫⁻ (x : α) in s, ↑‖↑↑↑(↑(condexpL2 ℝ ℝ hm) f) x‖₊ ∂μ ≤ ∫⁻ (x : α) in s, ↑‖↑↑f x‖₊ ∂μ\n[PROOFSTEP]\nlet g := h_meas.choose\n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nf : { x // x ∈ Lp ℝ 2 }\nh_meas : AEStronglyMeasurable' m (↑↑↑(↑(condexpL2 ℝ ℝ hm) f)) μ := lpMeas.aeStronglyMeasurable' (↑(condexpL2 ℝ ℝ hm) f)\ng : α → ℝ := Exists.choose h_meas\n⊢ ∫⁻ (x : α) in s, ↑‖↑↑↑(↑(condexpL2 ℝ ℝ hm) f) x‖₊ ∂μ ≤ ∫⁻ (x : α) in s, ↑‖↑↑f x‖₊ ∂μ\n[PROOFSTEP]\nhave hg_meas : StronglyMeasurable[m] g := h_meas.choose_spec.1\n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nf : { x // x ∈ Lp ℝ 2 }\nh_meas : AEStronglyMeasurable' m (↑↑↑(↑(condexpL2 ℝ ℝ hm) f)) μ := lpMeas.aeStronglyMeasurable' (↑(condexpL2 ℝ ℝ hm) f)\ng : α → ℝ := Exists.choose h_meas\nhg_meas : StronglyMeasurable g\n⊢ ∫⁻ (x : α) in s, ↑‖↑↑↑(↑(condexpL2 ℝ ℝ hm) f) x‖₊ ∂μ ≤ ∫⁻ (x : α) in s, ↑‖↑↑f x‖₊ ∂μ\n[PROOFSTEP]\nhave hg_eq : g =ᵐ[μ] condexpL2 ℝ ℝ hm f := h_meas.choose_spec.2.symm\n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nf : { x // x ∈ Lp ℝ 2 }\nh_meas : AEStronglyMeasurable' m (↑↑↑(↑(condexpL2 ℝ ℝ hm) f)) μ := lpMeas.aeStronglyMeasurable' (↑(condexpL2 ℝ ℝ hm) f)\ng : α → ℝ := Exists.choose h_meas\nhg_meas : StronglyMeasurable g\nhg_eq : g =ᵐ[μ] ↑↑↑(↑(condexpL2 ℝ ℝ hm) f)\n⊢ ∫⁻ (x : α) in s, ↑‖↑↑↑(↑(condexpL2 ℝ ℝ hm) f) x‖₊ ∂μ ≤ ∫⁻ (x : α) in s, ↑‖↑↑f x‖₊ ∂μ\n[PROOFSTEP]\nhave hg_eq_restrict : g =ᵐ[μ.restrict s] condexpL2 ℝ ℝ hm f := ae_restrict_of_ae hg_eq\n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nf : { x // x ∈ Lp ℝ 2 }\nh_meas : AEStronglyMeasurable' m (↑↑↑(↑(condexpL2 ℝ ℝ hm) f)) μ := lpMeas.aeStronglyMeasurable' (↑(condexpL2 ℝ ℝ hm) f)\ng : α → ℝ := Exists.choose h_meas\nhg_meas : StronglyMeasurable g\nhg_eq : g =ᵐ[μ] ↑↑↑(↑(condexpL2 ℝ ℝ hm) f)\nhg_eq_restrict : g =ᵐ[Measure.restrict μ s] ↑↑↑(↑(condexpL2 ℝ ℝ hm) f)\n⊢ ∫⁻ (x : α) in s, ↑‖↑↑↑(↑(condexpL2 ℝ ℝ hm) f) x‖₊ ∂μ ≤ ∫⁻ (x : α) in s, ↑‖↑↑f x‖₊ ∂μ\n[PROOFSTEP]\nhave hg_nnnorm_eq : (fun x => (‖g x‖₊ : ℝ≥0∞)) =ᵐ[μ.restrict s] fun x => (‖(condexpL2 ℝ ℝ hm f : α → ℝ) x‖₊ : ℝ≥0∞) :=\n  by\n  refine' hg_eq_restrict.mono fun x hx => _\n  dsimp only\n  simp_rw [hx]\n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nf : { x // x ∈ Lp ℝ 2 }\nh_meas : AEStronglyMeasurable' m (↑↑↑(↑(condexpL2 ℝ ℝ hm) f)) μ := lpMeas.aeStronglyMeasurable' (↑(condexpL2 ℝ ℝ hm) f)\ng : α → ℝ := Exists.choose h_meas\nhg_meas : StronglyMeasurable g\nhg_eq : g =ᵐ[μ] ↑↑↑(↑(condexpL2 ℝ ℝ hm) f)\nhg_eq_restrict : g =ᵐ[Measure.restrict μ s] ↑↑↑(↑(condexpL2 ℝ ℝ hm) f)\n⊢ (fun x => ↑‖g x‖₊) =ᵐ[Measure.restrict μ s] fun x => ↑‖↑↑↑(↑(condexpL2 ℝ ℝ hm) f) x‖₊\n[PROOFSTEP]\nrefine' hg_eq_restrict.mono fun x hx => _\n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nf : { x // x ∈ Lp ℝ 2 }\nh_meas : AEStronglyMeasurable' m (↑↑↑(↑(condexpL2 ℝ ℝ hm) f)) μ := lpMeas.aeStronglyMeasurable' (↑(condexpL2 ℝ ℝ hm) f)\ng : α → ℝ := Exists.choose h_meas\nhg_meas : StronglyMeasurable g\nhg_eq : g =ᵐ[μ] ↑↑↑(↑(condexpL2 ℝ ℝ hm) f)\nhg_eq_restrict : g =ᵐ[Measure.restrict μ s] ↑↑↑(↑(condexpL2 ℝ ℝ hm) f)\nx : α\nhx : g x = ↑↑↑(↑(condexpL2 ℝ ℝ hm) f) x\n⊢ (fun x => ↑‖g x‖₊) x = (fun x => ↑‖↑↑↑(↑(condexpL2 ℝ ℝ hm) f) x‖₊) x\n[PROOFSTEP]\ndsimp only\n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nf : { x // x ∈ Lp ℝ 2 }\nh_meas : AEStronglyMeasurable' m (↑↑↑(↑(condexpL2 ℝ ℝ hm) f)) μ := lpMeas.aeStronglyMeasurable' (↑(condexpL2 ℝ ℝ hm) f)\ng : α → ℝ := Exists.choose h_meas\nhg_meas : StronglyMeasurable g\nhg_eq : g =ᵐ[μ] ↑↑↑(↑(condexpL2 ℝ ℝ hm) f)\nhg_eq_restrict : g =ᵐ[Measure.restrict μ s] ↑↑↑(↑(condexpL2 ℝ ℝ hm) f)\nx : α\nhx : g x = ↑↑↑(↑(condexpL2 ℝ ℝ hm) f) x\n⊢ ↑‖Exists.choose (_ : AEStronglyMeasurable' m (↑↑↑(↑(condexpL2 ℝ ℝ hm) f)) μ) x‖₊ = ↑‖↑↑↑(↑(condexpL2 ℝ ℝ hm) f) x‖₊\n[PROOFSTEP]\nsimp_rw [hx]\n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nf : { x // x ∈ Lp ℝ 2 }\nh_meas : AEStronglyMeasurable' m (↑↑↑(↑(condexpL2 ℝ ℝ hm) f)) μ := lpMeas.aeStronglyMeasurable' (↑(condexpL2 ℝ ℝ hm) f)\ng : α → ℝ := Exists.choose h_meas\nhg_meas : StronglyMeasurable g\nhg_eq : g =ᵐ[μ] ↑↑↑(↑(condexpL2 ℝ ℝ hm) f)\nhg_eq_restrict : g =ᵐ[Measure.restrict μ s] ↑↑↑(↑(condexpL2 ℝ ℝ hm) f)\nhg_nnnorm_eq : (fun x => ↑‖g x‖₊) =ᵐ[Measure.restrict μ s] fun x => ↑‖↑↑↑(↑(condexpL2 ℝ ℝ hm) f) x‖₊\n⊢ ∫⁻ (x : α) in s, ↑‖↑↑↑(↑(condexpL2 ℝ ℝ hm) f) x‖₊ ∂μ ≤ ∫⁻ (x : α) in s, ↑‖↑↑f x‖₊ ∂μ\n[PROOFSTEP]\nrw [lintegral_congr_ae hg_nnnorm_eq.symm]\n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nf : { x // x ∈ Lp ℝ 2 }\nh_meas : AEStronglyMeasurable' m (↑↑↑(↑(condexpL2 ℝ ℝ hm) f)) μ := lpMeas.aeStronglyMeasurable' (↑(condexpL2 ℝ ℝ hm) f)\ng : α → ℝ := Exists.choose h_meas\nhg_meas : StronglyMeasurable g\nhg_eq : g =ᵐ[μ] ↑↑↑(↑(condexpL2 ℝ ℝ hm) f)\nhg_eq_restrict : g =ᵐ[Measure.restrict μ s] ↑↑↑(↑(condexpL2 ℝ ℝ hm) f)\nhg_nnnorm_eq : (fun x => ↑‖g x‖₊) =ᵐ[Measure.restrict μ s] fun x => ↑‖↑↑↑(↑(condexpL2 ℝ ℝ hm) f) x‖₊\n⊢ ∫⁻ (a : α) in s, ↑‖g a‖₊ ∂μ ≤ ∫⁻ (x : α) in s, ↑‖↑↑f x‖₊ ∂μ\n[PROOFSTEP]\nrefine' lintegral_nnnorm_le_of_forall_fin_meas_integral_eq hm (Lp.stronglyMeasurable f) _ _ _ _ hs hμs\n[GOAL]\ncase refine'_1\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nf : { x // x ∈ Lp ℝ 2 }\nh_meas : AEStronglyMeasurable' m (↑↑↑(↑(condexpL2 ℝ ℝ hm) f)) μ := lpMeas.aeStronglyMeasurable' (↑(condexpL2 ℝ ℝ hm) f)\ng : α → ℝ := Exists.choose h_meas\nhg_meas : StronglyMeasurable g\nhg_eq : g =ᵐ[μ] ↑↑↑(↑(condexpL2 ℝ ℝ hm) f)\nhg_eq_restrict : g =ᵐ[Measure.restrict μ s] ↑↑↑(↑(condexpL2 ℝ ℝ hm) f)\nhg_nnnorm_eq : (fun x => ↑‖g x‖₊) =ᵐ[Measure.restrict μ s] fun x => ↑‖↑↑↑(↑(condexpL2 ℝ ℝ hm) f) x‖₊\n⊢ IntegrableOn (fun x => ↑↑f x) s\n[PROOFSTEP]\nexact integrableOn_Lp_of_measure_ne_top f fact_one_le_two_ennreal.elim hμs\n[GOAL]\ncase refine'_2\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nf : { x // x ∈ Lp ℝ 2 }\nh_meas : AEStronglyMeasurable' m (↑↑↑(↑(condexpL2 ℝ ℝ hm) f)) μ := lpMeas.aeStronglyMeasurable' (↑(condexpL2 ℝ ℝ hm) f)\ng : α → ℝ := Exists.choose h_meas\nhg_meas : StronglyMeasurable g\nhg_eq : g =ᵐ[μ] ↑↑↑(↑(condexpL2 ℝ ℝ hm) f)\nhg_eq_restrict : g =ᵐ[Measure.restrict μ s] ↑↑↑(↑(condexpL2 ℝ ℝ hm) f)\nhg_nnnorm_eq : (fun x => ↑‖g x‖₊) =ᵐ[Measure.restrict μ s] fun x => ↑‖↑↑↑(↑(condexpL2 ℝ ℝ hm) f) x‖₊\n⊢ StronglyMeasurable fun a => g a\n[PROOFSTEP]\nexact hg_meas\n[GOAL]\ncase refine'_3\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nf : { x // x ∈ Lp ℝ 2 }\nh_meas : AEStronglyMeasurable' m (↑↑↑(↑(condexpL2 ℝ ℝ hm) f)) μ := lpMeas.aeStronglyMeasurable' (↑(condexpL2 ℝ ℝ hm) f)\ng : α → ℝ := Exists.choose h_meas\nhg_meas : StronglyMeasurable g\nhg_eq : g =ᵐ[μ] ↑↑↑(↑(condexpL2 ℝ ℝ hm) f)\nhg_eq_restrict : g =ᵐ[Measure.restrict μ s] ↑↑↑(↑(condexpL2 ℝ ℝ hm) f)\nhg_nnnorm_eq : (fun x => ↑‖g x‖₊) =ᵐ[Measure.restrict μ s] fun x => ↑‖↑↑↑(↑(condexpL2 ℝ ℝ hm) f) x‖₊\n⊢ IntegrableOn (fun a => g a) s\n[PROOFSTEP]\nrw [IntegrableOn, integrable_congr hg_eq_restrict]\n[GOAL]\ncase refine'_3\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nf : { x // x ∈ Lp ℝ 2 }\nh_meas : AEStronglyMeasurable' m (↑↑↑(↑(condexpL2 ℝ ℝ hm) f)) μ := lpMeas.aeStronglyMeasurable' (↑(condexpL2 ℝ ℝ hm) f)\ng : α → ℝ := Exists.choose h_meas\nhg_meas : StronglyMeasurable g\nhg_eq : g =ᵐ[μ] ↑↑↑(↑(condexpL2 ℝ ℝ hm) f)\nhg_eq_restrict : g =ᵐ[Measure.restrict μ s] ↑↑↑(↑(condexpL2 ℝ ℝ hm) f)\nhg_nnnorm_eq : (fun x => ↑‖g x‖₊) =ᵐ[Measure.restrict μ s] fun x => ↑‖↑↑↑(↑(condexpL2 ℝ ℝ hm) f) x‖₊\n⊢ Integrable ↑↑↑(↑(condexpL2 ℝ ℝ hm) f)\n[PROOFSTEP]\nexact integrableOn_condexpL2_of_measure_ne_top hm hμs f\n[GOAL]\ncase refine'_4\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nf : { x // x ∈ Lp ℝ 2 }\nh_meas : AEStronglyMeasurable' m (↑↑↑(↑(condexpL2 ℝ ℝ hm) f)) μ := lpMeas.aeStronglyMeasurable' (↑(condexpL2 ℝ ℝ hm) f)\ng : α → ℝ := Exists.choose h_meas\nhg_meas : StronglyMeasurable g\nhg_eq : g =ᵐ[μ] ↑↑↑(↑(condexpL2 ℝ ℝ hm) f)\nhg_eq_restrict : g =ᵐ[Measure.restrict μ s] ↑↑↑(↑(condexpL2 ℝ ℝ hm) f)\nhg_nnnorm_eq : (fun x => ↑‖g x‖₊) =ᵐ[Measure.restrict μ s] fun x => ↑‖↑↑↑(↑(condexpL2 ℝ ℝ hm) f) x‖₊\n⊢ ∀ (t : Set α), MeasurableSet t → ↑↑μ t < ⊤ → ∫ (x : α) in t, g x ∂μ = ∫ (x : α) in t, ↑↑f x ∂μ\n[PROOFSTEP]\nintro t ht hμt\n[GOAL]\ncase refine'_4\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t✝ : Set α\nhm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nf : { x // x ∈ Lp ℝ 2 }\nh_meas : AEStronglyMeasurable' m (↑↑↑(↑(condexpL2 ℝ ℝ hm) f)) μ := lpMeas.aeStronglyMeasurable' (↑(condexpL2 ℝ ℝ hm) f)\ng : α → ℝ := Exists.choose h_meas\nhg_meas : StronglyMeasurable g\nhg_eq : g =ᵐ[μ] ↑↑↑(↑(condexpL2 ℝ ℝ hm) f)\nhg_eq_restrict : g =ᵐ[Measure.restrict μ s] ↑↑↑(↑(condexpL2 ℝ ℝ hm) f)\nhg_nnnorm_eq : (fun x => ↑‖g x‖₊) =ᵐ[Measure.restrict μ s] fun x => ↑‖↑↑↑(↑(condexpL2 ℝ ℝ hm) f) x‖₊\nt : Set α\nht : MeasurableSet t\nhμt : ↑↑μ t < ⊤\n⊢ ∫ (x : α) in t, g x ∂μ = ∫ (x : α) in t, ↑↑f x ∂μ\n[PROOFSTEP]\nrw [← integral_condexpL2_eq_of_fin_meas_real f ht hμt.ne]\n[GOAL]\ncase refine'_4\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t✝ : Set α\nhm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nf : { x // x ∈ Lp ℝ 2 }\nh_meas : AEStronglyMeasurable' m (↑↑↑(↑(condexpL2 ℝ ℝ hm) f)) μ := lpMeas.aeStronglyMeasurable' (↑(condexpL2 ℝ ℝ hm) f)\ng : α → ℝ := Exists.choose h_meas\nhg_meas : StronglyMeasurable g\nhg_eq : g =ᵐ[μ] ↑↑↑(↑(condexpL2 ℝ ℝ hm) f)\nhg_eq_restrict : g =ᵐ[Measure.restrict μ s] ↑↑↑(↑(condexpL2 ℝ ℝ hm) f)\nhg_nnnorm_eq : (fun x => ↑‖g x‖₊) =ᵐ[Measure.restrict μ s] fun x => ↑‖↑↑↑(↑(condexpL2 ℝ ℝ hm) f) x‖₊\nt : Set α\nht : MeasurableSet t\nhμt : ↑↑μ t < ⊤\n⊢ ∫ (x : α) in t, g x ∂μ = ∫ (x : α) in t, ↑↑↑(↑(condexpL2 ℝ ℝ ?m.662736) f) x ∂μ\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t✝ : Set α\nhm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nf : { x // x ∈ Lp ℝ 2 }\nh_meas : AEStronglyMeasurable' m (↑↑↑(↑(condexpL2 ℝ ℝ hm) f)) μ := lpMeas.aeStronglyMeasurable' (↑(condexpL2 ℝ ℝ hm) f)\ng : α → ℝ := Exists.choose h_meas\nhg_meas : StronglyMeasurable g\nhg_eq : g =ᵐ[μ] ↑↑↑(↑(condexpL2 ℝ ℝ hm) f)\nhg_eq_restrict : g =ᵐ[Measure.restrict μ s] ↑↑↑(↑(condexpL2 ℝ ℝ hm) f)\nhg_nnnorm_eq : (fun x => ↑‖g x‖₊) =ᵐ[Measure.restrict μ s] fun x => ↑‖↑↑↑(↑(condexpL2 ℝ ℝ hm) f) x‖₊\nt : Set α\nht : MeasurableSet t\nhμt : ↑↑μ t < ⊤\n⊢ m ≤ m0\n[PROOFSTEP]\nexact set_integral_congr_ae (hm t ht) (hg_eq.mono fun x hx _ => hx)\n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nf : { x // x ∈ Lp ℝ 2 }\nhf : ↑↑f =ᵐ[Measure.restrict μ s] 0\n⊢ ↑↑↑(↑(condexpL2 ℝ ℝ hm) f) =ᵐ[Measure.restrict μ s] 0\n[PROOFSTEP]\nsuffices h_nnnorm_eq_zero : ∫⁻ x in s, ‖(condexpL2 ℝ ℝ hm f : α → ℝ) x‖₊ ∂μ = 0\n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nf : { x // x ∈ Lp ℝ 2 }\nhf : ↑↑f =ᵐ[Measure.restrict μ s] 0\nh_nnnorm_eq_zero : ∫⁻ (x : α) in s, ↑‖↑↑↑(↑(condexpL2 ℝ ℝ hm) f) x‖₊ ∂μ = 0\n⊢ ↑↑↑(↑(condexpL2 ℝ ℝ hm) f) =ᵐ[Measure.restrict μ s] 0\n[PROOFSTEP]\nrw [lintegral_eq_zero_iff] at h_nnnorm_eq_zero \n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nf : { x // x ∈ Lp ℝ 2 }\nhf : ↑↑f =ᵐ[Measure.restrict μ s] 0\nh_nnnorm_eq_zero : (fun x => ↑‖↑↑↑(↑(condexpL2 ℝ ℝ hm) f) x‖₊) =ᵐ[Measure.restrict μ s] 0\n⊢ ↑↑↑(↑(condexpL2 ℝ ℝ hm) f) =ᵐ[Measure.restrict μ s] 0\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nf : { x // x ∈ Lp ℝ 2 }\nhf : ↑↑f =ᵐ[Measure.restrict μ s] 0\nh_nnnorm_eq_zero : ∫⁻ (x : α) in s, ↑‖↑↑↑(↑(condexpL2 ℝ ℝ hm) f) x‖₊ ∂μ = 0\n⊢ Measurable fun x => ↑‖↑↑↑(↑(condexpL2 ℝ ℝ hm) f) x‖₊\n[PROOFSTEP]\nrefine' h_nnnorm_eq_zero.mono fun x hx => _\n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nf : { x // x ∈ Lp ℝ 2 }\nhf : ↑↑f =ᵐ[Measure.restrict μ s] 0\nh_nnnorm_eq_zero : (fun x => ↑‖↑↑↑(↑(condexpL2 ℝ ℝ hm) f) x‖₊) =ᵐ[Measure.restrict μ s] 0\nx : α\nhx : (fun x => ↑‖↑↑↑(↑(condexpL2 ℝ ℝ hm) f) x‖₊) x = OfNat.ofNat 0 x\n⊢ ↑↑↑(↑(condexpL2 ℝ ℝ hm) f) x = OfNat.ofNat 0 x\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nf : { x // x ∈ Lp ℝ 2 }\nhf : ↑↑f =ᵐ[Measure.restrict μ s] 0\nh_nnnorm_eq_zero : ∫⁻ (x : α) in s, ↑‖↑↑↑(↑(condexpL2 ℝ ℝ hm) f) x‖₊ ∂μ = 0\n⊢ Measurable fun x => ↑‖↑↑↑(↑(condexpL2 ℝ ℝ hm) f) x‖₊\n[PROOFSTEP]\ndsimp only at hx \n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nf : { x // x ∈ Lp ℝ 2 }\nhf : ↑↑f =ᵐ[Measure.restrict μ s] 0\nh_nnnorm_eq_zero : (fun x => ↑‖↑↑↑(↑(condexpL2 ℝ ℝ hm) f) x‖₊) =ᵐ[Measure.restrict μ s] 0\nx : α\nhx : ↑‖↑↑↑(↑(condexpL2 ℝ ℝ hm) f) x‖₊ = OfNat.ofNat 0 x\n⊢ ↑↑↑(↑(condexpL2 ℝ ℝ hm) f) x = OfNat.ofNat 0 x\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nf : { x // x ∈ Lp ℝ 2 }\nhf : ↑↑f =ᵐ[Measure.restrict μ s] 0\nh_nnnorm_eq_zero : ∫⁻ (x : α) in s, ↑‖↑↑↑(↑(condexpL2 ℝ ℝ hm) f) x‖₊ ∂μ = 0\n⊢ Measurable fun x => ↑‖↑↑↑(↑(condexpL2 ℝ ℝ hm) f) x‖₊\n[PROOFSTEP]\nrw [Pi.zero_apply] at hx ⊢\n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nf : { x // x ∈ Lp ℝ 2 }\nhf : ↑↑f =ᵐ[Measure.restrict μ s] 0\nh_nnnorm_eq_zero : (fun x => ↑‖↑↑↑(↑(condexpL2 ℝ ℝ hm) f) x‖₊) =ᵐ[Measure.restrict μ s] 0\nx : α\nhx : ↑‖↑↑↑(↑(condexpL2 ℝ ℝ hm) f) x‖₊ = 0\n⊢ ↑↑↑(↑(condexpL2 ℝ ℝ hm) f) x = 0\n[PROOFSTEP]\nrwa [ENNReal.coe_eq_zero, nnnorm_eq_zero] at hx \n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nf : { x // x ∈ Lp ℝ 2 }\nhf : ↑↑f =ᵐ[Measure.restrict μ s] 0\nh_nnnorm_eq_zero : ∫⁻ (x : α) in s, ↑‖↑↑↑(↑(condexpL2 ℝ ℝ hm) f) x‖₊ ∂μ = 0\n⊢ Measurable fun x => ↑‖↑↑↑(↑(condexpL2 ℝ ℝ hm) f) x‖₊\n[PROOFSTEP]\nrefine' Measurable.coe_nnreal_ennreal (Measurable.nnnorm _)\n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nf : { x // x ∈ Lp ℝ 2 }\nhf : ↑↑f =ᵐ[Measure.restrict μ s] 0\nh_nnnorm_eq_zero : ∫⁻ (x : α) in s, ↑‖↑↑↑(↑(condexpL2 ℝ ℝ hm) f) x‖₊ ∂μ = 0\n⊢ Measurable fun x => ↑↑↑(↑(condexpL2 ℝ ℝ hm) f) x\n[PROOFSTEP]\nrw [lpMeas_coe]\n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nf : { x // x ∈ Lp ℝ 2 }\nhf : ↑↑f =ᵐ[Measure.restrict μ s] 0\nh_nnnorm_eq_zero : ∫⁻ (x : α) in s, ↑‖↑↑↑(↑(condexpL2 ℝ ℝ hm) f) x‖₊ ∂μ = 0\n⊢ Measurable fun x => ↑↑↑(↑(condexpL2 ℝ ℝ hm) f) x\n[PROOFSTEP]\nexact (Lp.stronglyMeasurable _).measurable\n[GOAL]\ncase h_nnnorm_eq_zero\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nf : { x // x ∈ Lp ℝ 2 }\nhf : ↑↑f =ᵐ[Measure.restrict μ s] 0\n⊢ ∫⁻ (x : α) in s, ↑‖↑↑↑(↑(condexpL2 ℝ ℝ hm) f) x‖₊ ∂μ = 0\n[PROOFSTEP]\nrefine' le_antisymm _ (zero_le _)\n[GOAL]\ncase h_nnnorm_eq_zero\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nf : { x // x ∈ Lp ℝ 2 }\nhf : ↑↑f =ᵐ[Measure.restrict μ s] 0\n⊢ ∫⁻ (x : α) in s, ↑‖↑↑↑(↑(condexpL2 ℝ ℝ hm) f) x‖₊ ∂μ ≤ 0\n[PROOFSTEP]\nrefine' (lintegral_nnnorm_condexpL2_le hs hμs f).trans (le_of_eq _)\n[GOAL]\ncase h_nnnorm_eq_zero\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nf : { x // x ∈ Lp ℝ 2 }\nhf : ↑↑f =ᵐ[Measure.restrict μ s] 0\n⊢ ∫⁻ (x : α) in s, ↑‖↑↑f x‖₊ ∂μ = 0\n[PROOFSTEP]\nrw [lintegral_eq_zero_iff]\n[GOAL]\ncase h_nnnorm_eq_zero\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nf : { x // x ∈ Lp ℝ 2 }\nhf : ↑↑f =ᵐ[Measure.restrict μ s] 0\n⊢ (fun x => ↑‖↑↑f x‖₊) =ᵐ[Measure.restrict μ s] 0\n[PROOFSTEP]\nrefine' hf.mono fun x hx => _\n[GOAL]\ncase h_nnnorm_eq_zero\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nf : { x // x ∈ Lp ℝ 2 }\nhf : ↑↑f =ᵐ[Measure.restrict μ s] 0\nx : α\nhx : ↑↑f x = OfNat.ofNat 0 x\n⊢ (fun x => ↑‖↑↑f x‖₊) x = OfNat.ofNat 0 x\n[PROOFSTEP]\ndsimp only\n[GOAL]\ncase h_nnnorm_eq_zero\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nf : { x // x ∈ Lp ℝ 2 }\nhf : ↑↑f =ᵐ[Measure.restrict μ s] 0\nx : α\nhx : ↑↑f x = OfNat.ofNat 0 x\n⊢ ↑‖↑↑f x‖₊ = OfNat.ofNat 0 x\n[PROOFSTEP]\nrw [hx]\n[GOAL]\ncase h_nnnorm_eq_zero\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nf : { x // x ∈ Lp ℝ 2 }\nhf : ↑↑f =ᵐ[Measure.restrict μ s] 0\nx : α\nhx : ↑↑f x = OfNat.ofNat 0 x\n⊢ ↑‖OfNat.ofNat 0 x‖₊ = OfNat.ofNat 0 x\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h_nnnorm_eq_zero\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nf : { x // x ∈ Lp ℝ 2 }\nhf : ↑↑f =ᵐ[Measure.restrict μ s] 0\n⊢ Measurable fun x => ↑‖↑↑f x‖₊\n[PROOFSTEP]\nexact (Lp.stronglyMeasurable _).ennnorm\n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nht : MeasurableSet t\nhμt : ↑↑μ t ≠ ⊤\n⊢ ∫⁻ (a : α) in t, ↑‖↑↑↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1)) a‖₊ ∂μ ≤ ↑↑μ (s ∩ t)\n[PROOFSTEP]\nrefine' (lintegral_nnnorm_condexpL2_le ht hμt _).trans (le_of_eq _)\n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nht : MeasurableSet t\nhμt : ↑↑μ t ≠ ⊤\n⊢ ∫⁻ (x : α) in t, ↑‖↑↑(indicatorConstLp 2 hs hμs 1) x‖₊ ∂μ = ↑↑μ (s ∩ t)\n[PROOFSTEP]\nhave h_eq :\n  ∫⁻ x in t, ‖(indicatorConstLp 2 hs hμs (1 : ℝ)) x‖₊ ∂μ = ∫⁻ x in t, s.indicator (fun _ => (1 : ℝ≥0∞)) x ∂μ :=\n  by\n  refine' lintegral_congr_ae (ae_restrict_of_ae _)\n  refine' (@indicatorConstLp_coeFn _ _ _ 2 _ _ _ hs hμs (1 : ℝ)).mono fun x hx => _\n  dsimp only\n  rw [hx]\n  classical\n  simp_rw [Set.indicator_apply]\n  split_ifs <;> simp\n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nht : MeasurableSet t\nhμt : ↑↑μ t ≠ ⊤\n⊢ ∫⁻ (x : α) in t, ↑‖↑↑(indicatorConstLp 2 hs hμs 1) x‖₊ ∂μ = ∫⁻ (x : α) in t, Set.indicator s (fun x => 1) x ∂μ\n[PROOFSTEP]\nrefine' lintegral_congr_ae (ae_restrict_of_ae _)\n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nht : MeasurableSet t\nhμt : ↑↑μ t ≠ ⊤\n⊢ ∀ᵐ (x : α) ∂μ, (fun x => ↑‖↑↑(indicatorConstLp 2 hs hμs 1) x‖₊) x = (fun x => Set.indicator s (fun x => 1) x) x\n[PROOFSTEP]\nrefine' (@indicatorConstLp_coeFn _ _ _ 2 _ _ _ hs hμs (1 : ℝ)).mono fun x hx => _\n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nht : MeasurableSet t\nhμt : ↑↑μ t ≠ ⊤\nx : α\nhx : ↑↑(indicatorConstLp 2 hs hμs 1) x = Set.indicator s (fun x => 1) x\n⊢ (fun x => ↑‖↑↑(indicatorConstLp 2 hs hμs 1) x‖₊) x = (fun x => Set.indicator s (fun x => 1) x) x\n[PROOFSTEP]\ndsimp only\n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nht : MeasurableSet t\nhμt : ↑↑μ t ≠ ⊤\nx : α\nhx : ↑↑(indicatorConstLp 2 hs hμs 1) x = Set.indicator s (fun x => 1) x\n⊢ ↑‖↑↑(indicatorConstLp 2 hs hμs 1) x‖₊ = Set.indicator s (fun x => 1) x\n[PROOFSTEP]\nrw [hx]\n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nht : MeasurableSet t\nhμt : ↑↑μ t ≠ ⊤\nx : α\nhx : ↑↑(indicatorConstLp 2 hs hμs 1) x = Set.indicator s (fun x => 1) x\n⊢ ↑‖Set.indicator s (fun x => 1) x‖₊ = Set.indicator s (fun x => 1) x\n[PROOFSTEP]\nclassical\nsimp_rw [Set.indicator_apply]\nsplit_ifs <;> simp\n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nht : MeasurableSet t\nhμt : ↑↑μ t ≠ ⊤\nx : α\nhx : ↑↑(indicatorConstLp 2 hs hμs 1) x = Set.indicator s (fun x => 1) x\n⊢ ↑‖Set.indicator s (fun x => 1) x‖₊ = Set.indicator s (fun x => 1) x\n[PROOFSTEP]\nsimp_rw [Set.indicator_apply]\n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nht : MeasurableSet t\nhμt : ↑↑μ t ≠ ⊤\nx : α\nhx : ↑↑(indicatorConstLp 2 hs hμs 1) x = Set.indicator s (fun x => 1) x\n⊢ ↑‖if x ∈ s then 1 else 0‖₊ = if x ∈ s then 1 else 0\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nht : MeasurableSet t\nhμt : ↑↑μ t ≠ ⊤\nx : α\nhx : ↑↑(indicatorConstLp 2 hs hμs 1) x = Set.indicator s (fun x => 1) x\nh✝ : x ∈ s\n⊢ ↑‖1‖₊ = 1\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nht : MeasurableSet t\nhμt : ↑↑μ t ≠ ⊤\nx : α\nhx : ↑↑(indicatorConstLp 2 hs hμs 1) x = Set.indicator s (fun x => 1) x\nh✝ : ¬x ∈ s\n⊢ ↑‖0‖₊ = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nht : MeasurableSet t\nhμt : ↑↑μ t ≠ ⊤\nh_eq : ∫⁻ (x : α) in t, ↑‖↑↑(indicatorConstLp 2 hs hμs 1) x‖₊ ∂μ = ∫⁻ (x : α) in t, Set.indicator s (fun x => 1) x ∂μ\n⊢ ∫⁻ (x : α) in t, ↑‖↑↑(indicatorConstLp 2 hs hμs 1) x‖₊ ∂μ = ↑↑μ (s ∩ t)\n[PROOFSTEP]\nrw [h_eq, lintegral_indicator _ hs, lintegral_const, Measure.restrict_restrict hs]\n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nht : MeasurableSet t\nhμt : ↑↑μ t ≠ ⊤\nh_eq : ∫⁻ (x : α) in t, ↑‖↑↑(indicatorConstLp 2 hs hμs 1) x‖₊ ∂μ = ∫⁻ (x : α) in t, Set.indicator s (fun x => 1) x ∂μ\n⊢ 1 * ↑↑(Measure.restrict μ (s ∩ t)) Set.univ = ↑↑μ (s ∩ t)\n[PROOFSTEP]\nsimp only [one_mul, Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply]\n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhm : m ≤ m0\nf : { x // x ∈ Lp E 2 }\nc : E\n⊢ ↑↑↑(↑(condexpL2 𝕜 𝕜 hm) (Memℒp.toLp (fun a => inner c (↑↑f a)) (_ : Memℒp (fun a => inner c (↑↑f a)) 2))) =ᵐ[μ]\n    fun a => inner c (↑↑↑(↑(condexpL2 E 𝕜 hm) f) a)\n[PROOFSTEP]\nrw [lpMeas_coe]\n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhm : m ≤ m0\nf : { x // x ∈ Lp E 2 }\nc : E\n⊢ ↑↑↑(↑(condexpL2 𝕜 𝕜 hm) (Memℒp.toLp (fun a => inner c (↑↑f a)) (_ : Memℒp (fun a => inner c (↑↑f a)) 2))) =ᵐ[μ]\n    fun a => inner c (↑↑↑(↑(condexpL2 E 𝕜 hm) f) a)\n[PROOFSTEP]\nhave h_mem_Lp : Memℒp (fun a => ⟪c, (condexpL2 E 𝕜 hm f : α → E) a⟫) 2 μ := by refine' Memℒp.const_inner _ _;\n  rw [lpMeas_coe]; exact Lp.memℒp _\n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhm : m ≤ m0\nf : { x // x ∈ Lp E 2 }\nc : E\n⊢ Memℒp (fun a => inner c (↑↑↑(↑(condexpL2 E 𝕜 hm) f) a)) 2\n[PROOFSTEP]\nrefine' Memℒp.const_inner _ _\n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhm : m ≤ m0\nf : { x // x ∈ Lp E 2 }\nc : E\n⊢ Memℒp (fun a => ↑↑↑(↑(condexpL2 E 𝕜 hm) f) a) 2\n[PROOFSTEP]\nrw [lpMeas_coe]\n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhm : m ≤ m0\nf : { x // x ∈ Lp E 2 }\nc : E\n⊢ Memℒp (fun a => ↑↑↑(↑(condexpL2 E 𝕜 hm) f) a) 2\n[PROOFSTEP]\nexact Lp.memℒp _\n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhm : m ≤ m0\nf : { x // x ∈ Lp E 2 }\nc : E\nh_mem_Lp : Memℒp (fun a => inner c (↑↑↑(↑(condexpL2 E 𝕜 hm) f) a)) 2\n⊢ ↑↑↑(↑(condexpL2 𝕜 𝕜 hm) (Memℒp.toLp (fun a => inner c (↑↑f a)) (_ : Memℒp (fun a => inner c (↑↑f a)) 2))) =ᵐ[μ]\n    fun a => inner c (↑↑↑(↑(condexpL2 E 𝕜 hm) f) a)\n[PROOFSTEP]\nhave h_eq : h_mem_Lp.toLp _ =ᵐ[μ] fun a => ⟪c, (condexpL2 E 𝕜 hm f : α → E) a⟫ := h_mem_Lp.coeFn_toLp\n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhm : m ≤ m0\nf : { x // x ∈ Lp E 2 }\nc : E\nh_mem_Lp : Memℒp (fun a => inner c (↑↑↑(↑(condexpL2 E 𝕜 hm) f) a)) 2\nh_eq :\n  ↑↑(Memℒp.toLp (fun a => inner c (↑↑↑(↑(condexpL2 E 𝕜 hm) f) a)) h_mem_Lp) =ᵐ[μ] fun a =>\n    inner c (↑↑↑(↑(condexpL2 E 𝕜 hm) f) a)\n⊢ ↑↑↑(↑(condexpL2 𝕜 𝕜 hm) (Memℒp.toLp (fun a => inner c (↑↑f a)) (_ : Memℒp (fun a => inner c (↑↑f a)) 2))) =ᵐ[μ]\n    fun a => inner c (↑↑↑(↑(condexpL2 E 𝕜 hm) f) a)\n[PROOFSTEP]\nrefine' EventuallyEq.trans _ h_eq\n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhm : m ≤ m0\nf : { x // x ∈ Lp E 2 }\nc : E\nh_mem_Lp : Memℒp (fun a => inner c (↑↑↑(↑(condexpL2 E 𝕜 hm) f) a)) 2\nh_eq :\n  ↑↑(Memℒp.toLp (fun a => inner c (↑↑↑(↑(condexpL2 E 𝕜 hm) f) a)) h_mem_Lp) =ᵐ[μ] fun a =>\n    inner c (↑↑↑(↑(condexpL2 E 𝕜 hm) f) a)\n⊢ ↑↑↑(↑(condexpL2 𝕜 𝕜 hm) (Memℒp.toLp (fun a => inner c (↑↑f a)) (_ : Memℒp (fun a => inner c (↑↑f a)) 2))) =ᵐ[μ]\n    ↑↑(Memℒp.toLp (fun a => inner c (↑↑↑(↑(condexpL2 E 𝕜 hm) f) a)) h_mem_Lp)\n[PROOFSTEP]\nrefine'\n  Lp.ae_eq_of_forall_set_integral_eq' 𝕜 hm _ _ two_ne_zero ENNReal.coe_ne_top\n    (fun s _ hμs => integrableOn_condexpL2_of_measure_ne_top hm hμs.ne _) _ _ _ _\n[GOAL]\ncase refine'_1\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhm : m ≤ m0\nf : { x // x ∈ Lp E 2 }\nc : E\nh_mem_Lp : Memℒp (fun a => inner c (↑↑↑(↑(condexpL2 E 𝕜 hm) f) a)) 2\nh_eq :\n  ↑↑(Memℒp.toLp (fun a => inner c (↑↑↑(↑(condexpL2 E 𝕜 hm) f) a)) h_mem_Lp) =ᵐ[μ] fun a =>\n    inner c (↑↑↑(↑(condexpL2 E 𝕜 hm) f) a)\n⊢ ∀ (s : Set α),\n    MeasurableSet s →\n      ↑↑μ s < ⊤ → IntegrableOn (↑↑(Memℒp.toLp (fun a => inner c (↑↑↑(↑(condexpL2 E 𝕜 hm) f) a)) h_mem_Lp)) s\n[PROOFSTEP]\nintro s _ hμs\n[GOAL]\ncase refine'_1\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns✝ t : Set α\nhm : m ≤ m0\nf : { x // x ∈ Lp E 2 }\nc : E\nh_mem_Lp : Memℒp (fun a => inner c (↑↑↑(↑(condexpL2 E 𝕜 hm) f) a)) 2\nh_eq :\n  ↑↑(Memℒp.toLp (fun a => inner c (↑↑↑(↑(condexpL2 E 𝕜 hm) f) a)) h_mem_Lp) =ᵐ[μ] fun a =>\n    inner c (↑↑↑(↑(condexpL2 E 𝕜 hm) f) a)\ns : Set α\na✝ : MeasurableSet s\nhμs : ↑↑μ s < ⊤\n⊢ IntegrableOn (↑↑(Memℒp.toLp (fun a => inner c (↑↑↑(↑(condexpL2 E 𝕜 hm) f) a)) h_mem_Lp)) s\n[PROOFSTEP]\nrw [IntegrableOn, integrable_congr (ae_restrict_of_ae h_eq)]\n[GOAL]\ncase refine'_1\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns✝ t : Set α\nhm : m ≤ m0\nf : { x // x ∈ Lp E 2 }\nc : E\nh_mem_Lp : Memℒp (fun a => inner c (↑↑↑(↑(condexpL2 E 𝕜 hm) f) a)) 2\nh_eq :\n  ↑↑(Memℒp.toLp (fun a => inner c (↑↑↑(↑(condexpL2 E 𝕜 hm) f) a)) h_mem_Lp) =ᵐ[μ] fun a =>\n    inner c (↑↑↑(↑(condexpL2 E 𝕜 hm) f) a)\ns : Set α\na✝ : MeasurableSet s\nhμs : ↑↑μ s < ⊤\n⊢ Integrable fun x => (fun a => inner c (↑↑↑(↑(condexpL2 E 𝕜 hm) f) a)) x\n[PROOFSTEP]\nexact (integrableOn_condexpL2_of_measure_ne_top hm hμs.ne _).const_inner _\n[GOAL]\ncase refine'_2\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhm : m ≤ m0\nf : { x // x ∈ Lp E 2 }\nc : E\nh_mem_Lp : Memℒp (fun a => inner c (↑↑↑(↑(condexpL2 E 𝕜 hm) f) a)) 2\nh_eq :\n  ↑↑(Memℒp.toLp (fun a => inner c (↑↑↑(↑(condexpL2 E 𝕜 hm) f) a)) h_mem_Lp) =ᵐ[μ] fun a =>\n    inner c (↑↑↑(↑(condexpL2 E 𝕜 hm) f) a)\n⊢ ∀ (s : Set α),\n    MeasurableSet s →\n      ↑↑μ s < ⊤ →\n        ∫ (x : α) in s,\n            ↑↑↑(↑(condexpL2 𝕜 𝕜 hm) (Memℒp.toLp (fun a => inner c (↑↑f a)) (_ : Memℒp (fun a => inner c (↑↑f a)) 2)))\n              x ∂μ =\n          ∫ (x : α) in s, ↑↑(Memℒp.toLp (fun a => inner c (↑↑↑(↑(condexpL2 E 𝕜 hm) f) a)) h_mem_Lp) x ∂μ\n[PROOFSTEP]\nintro s hs hμs\n[GOAL]\ncase refine'_2\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns✝ t : Set α\nhm : m ≤ m0\nf : { x // x ∈ Lp E 2 }\nc : E\nh_mem_Lp : Memℒp (fun a => inner c (↑↑↑(↑(condexpL2 E 𝕜 hm) f) a)) 2\nh_eq :\n  ↑↑(Memℒp.toLp (fun a => inner c (↑↑↑(↑(condexpL2 E 𝕜 hm) f) a)) h_mem_Lp) =ᵐ[μ] fun a =>\n    inner c (↑↑↑(↑(condexpL2 E 𝕜 hm) f) a)\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s < ⊤\n⊢ ∫ (x : α) in s,\n      ↑↑↑(↑(condexpL2 𝕜 𝕜 hm) (Memℒp.toLp (fun a => inner c (↑↑f a)) (_ : Memℒp (fun a => inner c (↑↑f a)) 2))) x ∂μ =\n    ∫ (x : α) in s, ↑↑(Memℒp.toLp (fun a => inner c (↑↑↑(↑(condexpL2 E 𝕜 hm) f) a)) h_mem_Lp) x ∂μ\n[PROOFSTEP]\nrw [← lpMeas_coe, integral_condexpL2_eq_of_fin_meas_real _ hs hμs.ne, integral_congr_ae (ae_restrict_of_ae h_eq),\n  lpMeas_coe, ← L2.inner_indicatorConstLp_eq_set_integral_inner 𝕜 (↑(condexpL2 E 𝕜 hm f)) (hm s hs) c hμs.ne, ←\n  inner_condexpL2_left_eq_right, condexpL2_indicator_of_measurable _ hs,\n  L2.inner_indicatorConstLp_eq_set_integral_inner 𝕜 f (hm s hs) c hμs.ne,\n  set_integral_congr_ae (hm s hs) ((Memℒp.coeFn_toLp ((Lp.memℒp f).const_inner c)).mono fun x hx _ => hx)]\n[GOAL]\ncase refine'_3\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhm : m ≤ m0\nf : { x // x ∈ Lp E 2 }\nc : E\nh_mem_Lp : Memℒp (fun a => inner c (↑↑↑(↑(condexpL2 E 𝕜 hm) f) a)) 2\nh_eq :\n  ↑↑(Memℒp.toLp (fun a => inner c (↑↑↑(↑(condexpL2 E 𝕜 hm) f) a)) h_mem_Lp) =ᵐ[μ] fun a =>\n    inner c (↑↑↑(↑(condexpL2 E 𝕜 hm) f) a)\n⊢ AEStronglyMeasurable' m\n    (↑↑↑(↑(condexpL2 𝕜 𝕜 hm) (Memℒp.toLp (fun a => inner c (↑↑f a)) (_ : Memℒp (fun a => inner c (↑↑f a)) 2)))) μ\n[PROOFSTEP]\nrw [← lpMeas_coe]\n[GOAL]\ncase refine'_3\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhm : m ≤ m0\nf : { x // x ∈ Lp E 2 }\nc : E\nh_mem_Lp : Memℒp (fun a => inner c (↑↑↑(↑(condexpL2 E 𝕜 hm) f) a)) 2\nh_eq :\n  ↑↑(Memℒp.toLp (fun a => inner c (↑↑↑(↑(condexpL2 E 𝕜 hm) f) a)) h_mem_Lp) =ᵐ[μ] fun a =>\n    inner c (↑↑↑(↑(condexpL2 E 𝕜 hm) f) a)\n⊢ AEStronglyMeasurable' m\n    (↑↑↑(↑(condexpL2 𝕜 𝕜 hm) (Memℒp.toLp (fun a => inner c (↑↑f a)) (_ : Memℒp (fun a => inner c (↑↑f a)) 2)))) μ\n[PROOFSTEP]\nexact lpMeas.aeStronglyMeasurable' _\n[GOAL]\ncase refine'_4\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhm : m ≤ m0\nf : { x // x ∈ Lp E 2 }\nc : E\nh_mem_Lp : Memℒp (fun a => inner c (↑↑↑(↑(condexpL2 E 𝕜 hm) f) a)) 2\nh_eq :\n  ↑↑(Memℒp.toLp (fun a => inner c (↑↑↑(↑(condexpL2 E 𝕜 hm) f) a)) h_mem_Lp) =ᵐ[μ] fun a =>\n    inner c (↑↑↑(↑(condexpL2 E 𝕜 hm) f) a)\n⊢ AEStronglyMeasurable' m (↑↑(Memℒp.toLp (fun a => inner c (↑↑↑(↑(condexpL2 E 𝕜 hm) f) a)) h_mem_Lp)) μ\n[PROOFSTEP]\nrefine' AEStronglyMeasurable'.congr _ h_eq.symm\n[GOAL]\ncase refine'_4\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhm : m ≤ m0\nf : { x // x ∈ Lp E 2 }\nc : E\nh_mem_Lp : Memℒp (fun a => inner c (↑↑↑(↑(condexpL2 E 𝕜 hm) f) a)) 2\nh_eq :\n  ↑↑(Memℒp.toLp (fun a => inner c (↑↑↑(↑(condexpL2 E 𝕜 hm) f) a)) h_mem_Lp) =ᵐ[μ] fun a =>\n    inner c (↑↑↑(↑(condexpL2 E 𝕜 hm) f) a)\n⊢ AEStronglyMeasurable' m (fun a => inner c (↑↑↑(↑(condexpL2 E 𝕜 hm) f) a)) μ\n[PROOFSTEP]\nexact (lpMeas.aeStronglyMeasurable' _).const_inner _\n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhm : m ≤ m0\nf : { x // x ∈ Lp E' 2 }\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\n⊢ ∫ (x : α) in s, ↑↑↑(↑(condexpL2 E' 𝕜 hm) f) x ∂μ = ∫ (x : α) in s, ↑↑f x ∂μ\n[PROOFSTEP]\nrw [← sub_eq_zero, lpMeas_coe, ←\n  integral_sub' (integrableOn_Lp_of_measure_ne_top _ fact_one_le_two_ennreal.elim hμs)\n    (integrableOn_Lp_of_measure_ne_top _ fact_one_le_two_ennreal.elim hμs)]\n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhm : m ≤ m0\nf : { x // x ∈ Lp E' 2 }\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\n⊢ ∫ (a : α) in s, (↑↑↑(↑(condexpL2 E' 𝕜 hm) f) - ↑↑f) a ∂μ = 0\n[PROOFSTEP]\nrefine' integral_eq_zero_of_forall_integral_inner_eq_zero 𝕜 _ _ _\n[GOAL]\ncase refine'_1\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhm : m ≤ m0\nf : { x // x ∈ Lp E' 2 }\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\n⊢ Integrable fun a => (↑↑↑(↑(condexpL2 E' 𝕜 hm) f) - ↑↑f) a\n[PROOFSTEP]\nrw [integrable_congr (ae_restrict_of_ae (Lp.coeFn_sub (↑(condexpL2 E' 𝕜 hm f)) f).symm)]\n[GOAL]\ncase refine'_1\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhm : m ≤ m0\nf : { x // x ∈ Lp E' 2 }\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\n⊢ Integrable fun x => ↑↑(↑(↑(condexpL2 E' 𝕜 hm) f) - f) x\n[PROOFSTEP]\nexact integrableOn_Lp_of_measure_ne_top _ fact_one_le_two_ennreal.elim hμs\n[GOAL]\ncase refine'_2\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhm : m ≤ m0\nf : { x // x ∈ Lp E' 2 }\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\n⊢ ∀ (c : E'), ∫ (x : α) in s, inner c ((↑↑↑(↑(condexpL2 E' 𝕜 hm) f) - ↑↑f) x) ∂μ = 0\n[PROOFSTEP]\nintro c\n[GOAL]\ncase refine'_2\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhm : m ≤ m0\nf : { x // x ∈ Lp E' 2 }\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nc : E'\n⊢ ∫ (x : α) in s, inner c ((↑↑↑(↑(condexpL2 E' 𝕜 hm) f) - ↑↑f) x) ∂μ = 0\n[PROOFSTEP]\nsimp_rw [Pi.sub_apply, inner_sub_right]\n[GOAL]\ncase refine'_2\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhm : m ≤ m0\nf : { x // x ∈ Lp E' 2 }\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nc : E'\n⊢ ∫ (x : α) in s, inner c (↑↑↑(↑(condexpL2 E' 𝕜 hm) f) x) - inner c (↑↑f x) ∂μ = 0\n[PROOFSTEP]\nrw [integral_sub ((integrableOn_Lp_of_measure_ne_top _ fact_one_le_two_ennreal.elim hμs).const_inner c)\n    ((integrableOn_Lp_of_measure_ne_top _ fact_one_le_two_ennreal.elim hμs).const_inner c)]\n[GOAL]\ncase refine'_2\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhm : m ≤ m0\nf : { x // x ∈ Lp E' 2 }\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nc : E'\n⊢ ∫ (a : α) in s, inner c (↑↑↑(↑(condexpL2 E' 𝕜 hm) f) a) ∂μ - ∫ (a : α) in s, inner c (↑↑f a) ∂μ = 0\n[PROOFSTEP]\nhave h_ae_eq_f := Memℒp.coeFn_toLp (E := 𝕜) ((Lp.memℒp f).const_inner c)\n[GOAL]\ncase refine'_2\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhm : m ≤ m0\nf : { x // x ∈ Lp E' 2 }\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nc : E'\nh_ae_eq_f :\n  ↑↑(Memℒp.toLp (fun a => inner c (↑↑f a)) (_ : Memℒp (fun a => inner c (↑↑f a)) 2)) =ᵐ[μ] fun a => inner c (↑↑f a)\n⊢ ∫ (a : α) in s, inner c (↑↑↑(↑(condexpL2 E' 𝕜 hm) f) a) ∂μ - ∫ (a : α) in s, inner c (↑↑f a) ∂μ = 0\n[PROOFSTEP]\nrw [← lpMeas_coe, sub_eq_zero, ← set_integral_congr_ae (hm s hs) ((condexpL2_const_inner hm f c).mono fun x hx _ => hx),\n  ← set_integral_congr_ae (hm s hs) (h_ae_eq_f.mono fun x hx _ => hx)]\n[GOAL]\ncase refine'_2\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹³ : IsROrC 𝕜\ninst✝¹² : NormedAddCommGroup E\ninst✝¹¹ : InnerProductSpace 𝕜 E\ninst✝¹⁰ : CompleteSpace E\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : InnerProductSpace 𝕜 E'\ninst✝⁷ : CompleteSpace E'\ninst✝⁶ : NormedSpace ℝ E'\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace 𝕜 F\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedAddCommGroup G'\ninst✝¹ : NormedSpace ℝ G'\ninst✝ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhm : m ≤ m0\nf : { x // x ∈ Lp E' 2 }\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nc : E'\nh_ae_eq_f :\n  ↑↑(Memℒp.toLp (fun a => inner c (↑↑f a)) (_ : Memℒp (fun a => inner c (↑↑f a)) 2)) =ᵐ[μ] fun a => inner c (↑↑f a)\n⊢ ∫ (x : α) in s,\n      ↑↑↑(↑(condexpL2 𝕜 𝕜 hm) (Memℒp.toLp (fun a => inner c (↑↑f a)) (_ : Memℒp (fun a => inner c (↑↑f a)) 2))) x ∂μ =\n    ∫ (x : α) in s, ↑↑(Memℒp.toLp (fun a => inner c (↑↑f a)) (_ : Memℒp (fun a => inner c (↑↑f a)) 2)) x ∂μ\n[PROOFSTEP]\nexact integral_condexpL2_eq_of_fin_meas_real _ hs hμs\n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹⁸ : IsROrC 𝕜\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : InnerProductSpace 𝕜 E\ninst✝¹⁵ : CompleteSpace E\ninst✝¹⁴ : NormedAddCommGroup E'\ninst✝¹³ : InnerProductSpace 𝕜 E'\ninst✝¹² : CompleteSpace E'\ninst✝¹¹ : NormedSpace ℝ E'\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup G\ninst✝⁷ : NormedAddCommGroup G'\ninst✝⁶ : NormedSpace ℝ G'\ninst✝⁵ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nE'' : Type u_8\n𝕜' : Type u_9\ninst✝⁴ : IsROrC 𝕜'\ninst✝³ : NormedAddCommGroup E''\ninst✝² : InnerProductSpace 𝕜' E''\ninst✝¹ : CompleteSpace E''\ninst✝ : NormedSpace ℝ E''\nhm : m ≤ m0\nT : E' →L[ℝ] E''\nf : { x // x ∈ Lp E' 2 }\n⊢ ↑↑↑(↑(condexpL2 E'' 𝕜' hm) (compLp T f)) =ᵐ[μ] ↑↑(compLp T ↑(↑(condexpL2 E' 𝕜 hm) f))\n[PROOFSTEP]\nrefine'\n  Lp.ae_eq_of_forall_set_integral_eq' 𝕜' hm _ _ two_ne_zero ENNReal.coe_ne_top\n    (fun s _ hμs => integrableOn_condexpL2_of_measure_ne_top hm hμs.ne _)\n    (fun s _ hμs => integrableOn_Lp_of_measure_ne_top _ fact_one_le_two_ennreal.elim hμs.ne) _ _ _\n[GOAL]\ncase refine'_1\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹⁸ : IsROrC 𝕜\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : InnerProductSpace 𝕜 E\ninst✝¹⁵ : CompleteSpace E\ninst✝¹⁴ : NormedAddCommGroup E'\ninst✝¹³ : InnerProductSpace 𝕜 E'\ninst✝¹² : CompleteSpace E'\ninst✝¹¹ : NormedSpace ℝ E'\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup G\ninst✝⁷ : NormedAddCommGroup G'\ninst✝⁶ : NormedSpace ℝ G'\ninst✝⁵ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nE'' : Type u_8\n𝕜' : Type u_9\ninst✝⁴ : IsROrC 𝕜'\ninst✝³ : NormedAddCommGroup E''\ninst✝² : InnerProductSpace 𝕜' E''\ninst✝¹ : CompleteSpace E''\ninst✝ : NormedSpace ℝ E''\nhm : m ≤ m0\nT : E' →L[ℝ] E''\nf : { x // x ∈ Lp E' 2 }\n⊢ ∀ (s : Set α),\n    MeasurableSet s →\n      ↑↑μ s < ⊤ →\n        ∫ (x : α) in s, ↑↑↑(↑(condexpL2 E'' 𝕜' hm) (compLp T f)) x ∂μ =\n          ∫ (x : α) in s, ↑↑(compLp T ↑(↑(condexpL2 E' 𝕜 hm) f)) x ∂μ\n[PROOFSTEP]\nintro s hs hμs\n[GOAL]\ncase refine'_1\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹⁸ : IsROrC 𝕜\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : InnerProductSpace 𝕜 E\ninst✝¹⁵ : CompleteSpace E\ninst✝¹⁴ : NormedAddCommGroup E'\ninst✝¹³ : InnerProductSpace 𝕜 E'\ninst✝¹² : CompleteSpace E'\ninst✝¹¹ : NormedSpace ℝ E'\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup G\ninst✝⁷ : NormedAddCommGroup G'\ninst✝⁶ : NormedSpace ℝ G'\ninst✝⁵ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns✝ t : Set α\nE'' : Type u_8\n𝕜' : Type u_9\ninst✝⁴ : IsROrC 𝕜'\ninst✝³ : NormedAddCommGroup E''\ninst✝² : InnerProductSpace 𝕜' E''\ninst✝¹ : CompleteSpace E''\ninst✝ : NormedSpace ℝ E''\nhm : m ≤ m0\nT : E' →L[ℝ] E''\nf : { x // x ∈ Lp E' 2 }\ns : Set α\nhs : MeasurableSet s\nhμs : ↑↑μ s < ⊤\n⊢ ∫ (x : α) in s, ↑↑↑(↑(condexpL2 E'' 𝕜' hm) (compLp T f)) x ∂μ =\n    ∫ (x : α) in s, ↑↑(compLp T ↑(↑(condexpL2 E' 𝕜 hm) f)) x ∂μ\n[PROOFSTEP]\nrw [T.set_integral_compLp _ (hm s hs),\n  T.integral_comp_comm (integrableOn_Lp_of_measure_ne_top _ fact_one_le_two_ennreal.elim hμs.ne), ← lpMeas_coe, ←\n  lpMeas_coe, integral_condexpL2_eq hm f hs hμs.ne, integral_condexpL2_eq hm (T.compLp f) hs hμs.ne,\n  T.set_integral_compLp _ (hm s hs),\n  T.integral_comp_comm (integrableOn_Lp_of_measure_ne_top f fact_one_le_two_ennreal.elim hμs.ne)]\n[GOAL]\ncase refine'_2\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹⁸ : IsROrC 𝕜\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : InnerProductSpace 𝕜 E\ninst✝¹⁵ : CompleteSpace E\ninst✝¹⁴ : NormedAddCommGroup E'\ninst✝¹³ : InnerProductSpace 𝕜 E'\ninst✝¹² : CompleteSpace E'\ninst✝¹¹ : NormedSpace ℝ E'\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup G\ninst✝⁷ : NormedAddCommGroup G'\ninst✝⁶ : NormedSpace ℝ G'\ninst✝⁵ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nE'' : Type u_8\n𝕜' : Type u_9\ninst✝⁴ : IsROrC 𝕜'\ninst✝³ : NormedAddCommGroup E''\ninst✝² : InnerProductSpace 𝕜' E''\ninst✝¹ : CompleteSpace E''\ninst✝ : NormedSpace ℝ E''\nhm : m ≤ m0\nT : E' →L[ℝ] E''\nf : { x // x ∈ Lp E' 2 }\n⊢ AEStronglyMeasurable' m (↑↑↑(↑(condexpL2 E'' 𝕜' hm) (compLp T f))) μ\n[PROOFSTEP]\nrw [← lpMeas_coe]\n[GOAL]\ncase refine'_2\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹⁸ : IsROrC 𝕜\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : InnerProductSpace 𝕜 E\ninst✝¹⁵ : CompleteSpace E\ninst✝¹⁴ : NormedAddCommGroup E'\ninst✝¹³ : InnerProductSpace 𝕜 E'\ninst✝¹² : CompleteSpace E'\ninst✝¹¹ : NormedSpace ℝ E'\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup G\ninst✝⁷ : NormedAddCommGroup G'\ninst✝⁶ : NormedSpace ℝ G'\ninst✝⁵ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nE'' : Type u_8\n𝕜' : Type u_9\ninst✝⁴ : IsROrC 𝕜'\ninst✝³ : NormedAddCommGroup E''\ninst✝² : InnerProductSpace 𝕜' E''\ninst✝¹ : CompleteSpace E''\ninst✝ : NormedSpace ℝ E''\nhm : m ≤ m0\nT : E' →L[ℝ] E''\nf : { x // x ∈ Lp E' 2 }\n⊢ AEStronglyMeasurable' m (↑↑↑(↑(condexpL2 E'' 𝕜' hm) (compLp T f))) μ\n[PROOFSTEP]\nexact lpMeas.aeStronglyMeasurable' _\n[GOAL]\ncase refine'_3\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹⁸ : IsROrC 𝕜\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : InnerProductSpace 𝕜 E\ninst✝¹⁵ : CompleteSpace E\ninst✝¹⁴ : NormedAddCommGroup E'\ninst✝¹³ : InnerProductSpace 𝕜 E'\ninst✝¹² : CompleteSpace E'\ninst✝¹¹ : NormedSpace ℝ E'\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup G\ninst✝⁷ : NormedAddCommGroup G'\ninst✝⁶ : NormedSpace ℝ G'\ninst✝⁵ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nE'' : Type u_8\n𝕜' : Type u_9\ninst✝⁴ : IsROrC 𝕜'\ninst✝³ : NormedAddCommGroup E''\ninst✝² : InnerProductSpace 𝕜' E''\ninst✝¹ : CompleteSpace E''\ninst✝ : NormedSpace ℝ E''\nhm : m ≤ m0\nT : E' →L[ℝ] E''\nf : { x // x ∈ Lp E' 2 }\n⊢ AEStronglyMeasurable' m (↑↑(compLp T ↑(↑(condexpL2 E' 𝕜 hm) f))) μ\n[PROOFSTEP]\nhave h_coe := T.coeFn_compLp (condexpL2 E' 𝕜 hm f : α →₂[μ] E')\n[GOAL]\ncase refine'_3\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹⁸ : IsROrC 𝕜\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : InnerProductSpace 𝕜 E\ninst✝¹⁵ : CompleteSpace E\ninst✝¹⁴ : NormedAddCommGroup E'\ninst✝¹³ : InnerProductSpace 𝕜 E'\ninst✝¹² : CompleteSpace E'\ninst✝¹¹ : NormedSpace ℝ E'\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup G\ninst✝⁷ : NormedAddCommGroup G'\ninst✝⁶ : NormedSpace ℝ G'\ninst✝⁵ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nE'' : Type u_8\n𝕜' : Type u_9\ninst✝⁴ : IsROrC 𝕜'\ninst✝³ : NormedAddCommGroup E''\ninst✝² : InnerProductSpace 𝕜' E''\ninst✝¹ : CompleteSpace E''\ninst✝ : NormedSpace ℝ E''\nhm : m ≤ m0\nT : E' →L[ℝ] E''\nf : { x // x ∈ Lp E' 2 }\nh_coe : ∀ᵐ (a : α) ∂μ, ↑↑(compLp T ↑(↑(condexpL2 E' 𝕜 hm) f)) a = ↑T (↑↑↑(↑(condexpL2 E' 𝕜 hm) f) a)\n⊢ AEStronglyMeasurable' m (↑↑(compLp T ↑(↑(condexpL2 E' 𝕜 hm) f))) μ\n[PROOFSTEP]\nrw [← EventuallyEq] at h_coe \n[GOAL]\ncase refine'_3\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹⁸ : IsROrC 𝕜\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : InnerProductSpace 𝕜 E\ninst✝¹⁵ : CompleteSpace E\ninst✝¹⁴ : NormedAddCommGroup E'\ninst✝¹³ : InnerProductSpace 𝕜 E'\ninst✝¹² : CompleteSpace E'\ninst✝¹¹ : NormedSpace ℝ E'\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup G\ninst✝⁷ : NormedAddCommGroup G'\ninst✝⁶ : NormedSpace ℝ G'\ninst✝⁵ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nE'' : Type u_8\n𝕜' : Type u_9\ninst✝⁴ : IsROrC 𝕜'\ninst✝³ : NormedAddCommGroup E''\ninst✝² : InnerProductSpace 𝕜' E''\ninst✝¹ : CompleteSpace E''\ninst✝ : NormedSpace ℝ E''\nhm : m ≤ m0\nT : E' →L[ℝ] E''\nf : { x // x ∈ Lp E' 2 }\nh_coe : (fun a => ↑↑(compLp T ↑(↑(condexpL2 E' 𝕜 hm) f)) a) =ᵐ[μ] fun a => ↑T (↑↑↑(↑(condexpL2 E' 𝕜 hm) f) a)\n⊢ AEStronglyMeasurable' m (↑↑(compLp T ↑(↑(condexpL2 E' 𝕜 hm) f))) μ\n[PROOFSTEP]\nrefine' AEStronglyMeasurable'.congr _ h_coe.symm\n[GOAL]\ncase refine'_3\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹⁸ : IsROrC 𝕜\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : InnerProductSpace 𝕜 E\ninst✝¹⁵ : CompleteSpace E\ninst✝¹⁴ : NormedAddCommGroup E'\ninst✝¹³ : InnerProductSpace 𝕜 E'\ninst✝¹² : CompleteSpace E'\ninst✝¹¹ : NormedSpace ℝ E'\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup G\ninst✝⁷ : NormedAddCommGroup G'\ninst✝⁶ : NormedSpace ℝ G'\ninst✝⁵ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nE'' : Type u_8\n𝕜' : Type u_9\ninst✝⁴ : IsROrC 𝕜'\ninst✝³ : NormedAddCommGroup E''\ninst✝² : InnerProductSpace 𝕜' E''\ninst✝¹ : CompleteSpace E''\ninst✝ : NormedSpace ℝ E''\nhm : m ≤ m0\nT : E' →L[ℝ] E''\nf : { x // x ∈ Lp E' 2 }\nh_coe : (fun a => ↑↑(compLp T ↑(↑(condexpL2 E' 𝕜 hm) f)) a) =ᵐ[μ] fun a => ↑T (↑↑↑(↑(condexpL2 E' 𝕜 hm) f) a)\n⊢ AEStronglyMeasurable' m (fun a => ↑T (↑↑↑(↑(condexpL2 E' 𝕜 hm) f) a)) μ\n[PROOFSTEP]\nexact (lpMeas.aeStronglyMeasurable' (condexpL2 E' 𝕜 hm f)).continuous_comp T.continuous\n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹⁸ : IsROrC 𝕜\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : InnerProductSpace 𝕜 E\ninst✝¹⁵ : CompleteSpace E\ninst✝¹⁴ : NormedAddCommGroup E'\ninst✝¹³ : InnerProductSpace 𝕜 E'\ninst✝¹² : CompleteSpace E'\ninst✝¹¹ : NormedSpace ℝ E'\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup G\ninst✝⁷ : NormedAddCommGroup G'\ninst✝⁶ : NormedSpace ℝ G'\ninst✝⁵ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nE'' : Type u_8\n𝕜' : Type u_9\ninst✝⁴ : IsROrC 𝕜'\ninst✝³ : NormedAddCommGroup E''\ninst✝² : InnerProductSpace 𝕜' E''\ninst✝¹ : CompleteSpace E''\ninst✝ : NormedSpace ℝ E''\nhm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx : E'\n⊢ ↑↑↑(↑(condexpL2 E' 𝕜 hm) (indicatorConstLp 2 hs hμs x)) =ᵐ[μ] fun a =>\n    ↑↑↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1)) a • x\n[PROOFSTEP]\nrw [indicatorConstLp_eq_toSpanSingleton_compLp hs hμs x]\n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹⁸ : IsROrC 𝕜\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : InnerProductSpace 𝕜 E\ninst✝¹⁵ : CompleteSpace E\ninst✝¹⁴ : NormedAddCommGroup E'\ninst✝¹³ : InnerProductSpace 𝕜 E'\ninst✝¹² : CompleteSpace E'\ninst✝¹¹ : NormedSpace ℝ E'\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup G\ninst✝⁷ : NormedAddCommGroup G'\ninst✝⁶ : NormedSpace ℝ G'\ninst✝⁵ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nE'' : Type u_8\n𝕜' : Type u_9\ninst✝⁴ : IsROrC 𝕜'\ninst✝³ : NormedAddCommGroup E''\ninst✝² : InnerProductSpace 𝕜' E''\ninst✝¹ : CompleteSpace E''\ninst✝ : NormedSpace ℝ E''\nhm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx : E'\n⊢ ↑↑↑(↑(condexpL2 E' 𝕜 hm) (compLp (toSpanSingleton ℝ x) (indicatorConstLp 2 hs hμs 1))) =ᵐ[μ] fun a =>\n    ↑↑↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1)) a • x\n[PROOFSTEP]\nhave h_comp := condexpL2_comp_continuousLinearMap ℝ 𝕜 hm (toSpanSingleton ℝ x) (indicatorConstLp 2 hs hμs (1 : ℝ))\n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹⁸ : IsROrC 𝕜\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : InnerProductSpace 𝕜 E\ninst✝¹⁵ : CompleteSpace E\ninst✝¹⁴ : NormedAddCommGroup E'\ninst✝¹³ : InnerProductSpace 𝕜 E'\ninst✝¹² : CompleteSpace E'\ninst✝¹¹ : NormedSpace ℝ E'\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup G\ninst✝⁷ : NormedAddCommGroup G'\ninst✝⁶ : NormedSpace ℝ G'\ninst✝⁵ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nE'' : Type u_8\n𝕜' : Type u_9\ninst✝⁴ : IsROrC 𝕜'\ninst✝³ : NormedAddCommGroup E''\ninst✝² : InnerProductSpace 𝕜' E''\ninst✝¹ : CompleteSpace E''\ninst✝ : NormedSpace ℝ E''\nhm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx : E'\nh_comp :\n  ↑↑↑(↑(condexpL2 E' 𝕜 hm) (compLp (toSpanSingleton ℝ x) (indicatorConstLp 2 hs hμs 1))) =ᵐ[μ]\n    ↑↑(compLp (toSpanSingleton ℝ x) ↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1)))\n⊢ ↑↑↑(↑(condexpL2 E' 𝕜 hm) (compLp (toSpanSingleton ℝ x) (indicatorConstLp 2 hs hμs 1))) =ᵐ[μ] fun a =>\n    ↑↑↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1)) a • x\n[PROOFSTEP]\nrw [← lpMeas_coe] at h_comp \n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹⁸ : IsROrC 𝕜\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : InnerProductSpace 𝕜 E\ninst✝¹⁵ : CompleteSpace E\ninst✝¹⁴ : NormedAddCommGroup E'\ninst✝¹³ : InnerProductSpace 𝕜 E'\ninst✝¹² : CompleteSpace E'\ninst✝¹¹ : NormedSpace ℝ E'\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup G\ninst✝⁷ : NormedAddCommGroup G'\ninst✝⁶ : NormedSpace ℝ G'\ninst✝⁵ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nE'' : Type u_8\n𝕜' : Type u_9\ninst✝⁴ : IsROrC 𝕜'\ninst✝³ : NormedAddCommGroup E''\ninst✝² : InnerProductSpace 𝕜' E''\ninst✝¹ : CompleteSpace E''\ninst✝ : NormedSpace ℝ E''\nhm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx : E'\nh_comp :\n  ↑↑↑(↑(condexpL2 E' 𝕜 hm) (compLp (toSpanSingleton ℝ x) (indicatorConstLp 2 hs hμs 1))) =ᵐ[μ]\n    ↑↑(compLp (toSpanSingleton ℝ x) ↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1)))\n⊢ ↑↑↑(↑(condexpL2 E' 𝕜 hm) (compLp (toSpanSingleton ℝ x) (indicatorConstLp 2 hs hμs 1))) =ᵐ[μ] fun a =>\n    ↑↑↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1)) a • x\n[PROOFSTEP]\nrefine' h_comp.trans _\n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹⁸ : IsROrC 𝕜\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : InnerProductSpace 𝕜 E\ninst✝¹⁵ : CompleteSpace E\ninst✝¹⁴ : NormedAddCommGroup E'\ninst✝¹³ : InnerProductSpace 𝕜 E'\ninst✝¹² : CompleteSpace E'\ninst✝¹¹ : NormedSpace ℝ E'\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup G\ninst✝⁷ : NormedAddCommGroup G'\ninst✝⁶ : NormedSpace ℝ G'\ninst✝⁵ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nE'' : Type u_8\n𝕜' : Type u_9\ninst✝⁴ : IsROrC 𝕜'\ninst✝³ : NormedAddCommGroup E''\ninst✝² : InnerProductSpace 𝕜' E''\ninst✝¹ : CompleteSpace E''\ninst✝ : NormedSpace ℝ E''\nhm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx : E'\nh_comp :\n  ↑↑↑(↑(condexpL2 E' 𝕜 hm) (compLp (toSpanSingleton ℝ x) (indicatorConstLp 2 hs hμs 1))) =ᵐ[μ]\n    ↑↑(compLp (toSpanSingleton ℝ x) ↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1)))\n⊢ ↑↑(compLp (toSpanSingleton ℝ x) ↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1))) =ᵐ[μ] fun a =>\n    ↑↑↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1)) a • x\n[PROOFSTEP]\nexact (toSpanSingleton ℝ x).coeFn_compLp _\n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹⁸ : IsROrC 𝕜\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : InnerProductSpace 𝕜 E\ninst✝¹⁵ : CompleteSpace E\ninst✝¹⁴ : NormedAddCommGroup E'\ninst✝¹³ : InnerProductSpace 𝕜 E'\ninst✝¹² : CompleteSpace E'\ninst✝¹¹ : NormedSpace ℝ E'\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup G\ninst✝⁷ : NormedAddCommGroup G'\ninst✝⁶ : NormedSpace ℝ G'\ninst✝⁵ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nE'' : Type u_8\n𝕜' : Type u_9\ninst✝⁴ : IsROrC 𝕜'\ninst✝³ : NormedAddCommGroup E''\ninst✝² : InnerProductSpace 𝕜' E''\ninst✝¹ : CompleteSpace E''\ninst✝ : NormedSpace ℝ E''\nhm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx : E'\n⊢ ↑(↑(condexpL2 E' 𝕜 hm) (indicatorConstLp 2 hs hμs x)) =\n    compLp (toSpanSingleton ℝ x) ↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1))\n[PROOFSTEP]\next1\n[GOAL]\ncase h\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹⁸ : IsROrC 𝕜\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : InnerProductSpace 𝕜 E\ninst✝¹⁵ : CompleteSpace E\ninst✝¹⁴ : NormedAddCommGroup E'\ninst✝¹³ : InnerProductSpace 𝕜 E'\ninst✝¹² : CompleteSpace E'\ninst✝¹¹ : NormedSpace ℝ E'\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup G\ninst✝⁷ : NormedAddCommGroup G'\ninst✝⁶ : NormedSpace ℝ G'\ninst✝⁵ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nE'' : Type u_8\n𝕜' : Type u_9\ninst✝⁴ : IsROrC 𝕜'\ninst✝³ : NormedAddCommGroup E''\ninst✝² : InnerProductSpace 𝕜' E''\ninst✝¹ : CompleteSpace E''\ninst✝ : NormedSpace ℝ E''\nhm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx : E'\n⊢ ↑↑↑(↑(condexpL2 E' 𝕜 hm) (indicatorConstLp 2 hs hμs x)) =ᵐ[μ]\n    ↑↑(compLp (toSpanSingleton ℝ x) ↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1)))\n[PROOFSTEP]\nrw [← lpMeas_coe]\n[GOAL]\ncase h\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹⁸ : IsROrC 𝕜\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : InnerProductSpace 𝕜 E\ninst✝¹⁵ : CompleteSpace E\ninst✝¹⁴ : NormedAddCommGroup E'\ninst✝¹³ : InnerProductSpace 𝕜 E'\ninst✝¹² : CompleteSpace E'\ninst✝¹¹ : NormedSpace ℝ E'\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup G\ninst✝⁷ : NormedAddCommGroup G'\ninst✝⁶ : NormedSpace ℝ G'\ninst✝⁵ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nE'' : Type u_8\n𝕜' : Type u_9\ninst✝⁴ : IsROrC 𝕜'\ninst✝³ : NormedAddCommGroup E''\ninst✝² : InnerProductSpace 𝕜' E''\ninst✝¹ : CompleteSpace E''\ninst✝ : NormedSpace ℝ E''\nhm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx : E'\n⊢ ↑↑↑(↑(condexpL2 E' 𝕜 hm) (indicatorConstLp 2 hs hμs x)) =ᵐ[μ]\n    ↑↑(compLp (toSpanSingleton ℝ x) ↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1)))\n[PROOFSTEP]\nrefine' (condexpL2_indicator_ae_eq_smul 𝕜 hm hs hμs x).trans _\n[GOAL]\ncase h\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹⁸ : IsROrC 𝕜\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : InnerProductSpace 𝕜 E\ninst✝¹⁵ : CompleteSpace E\ninst✝¹⁴ : NormedAddCommGroup E'\ninst✝¹³ : InnerProductSpace 𝕜 E'\ninst✝¹² : CompleteSpace E'\ninst✝¹¹ : NormedSpace ℝ E'\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup G\ninst✝⁷ : NormedAddCommGroup G'\ninst✝⁶ : NormedSpace ℝ G'\ninst✝⁵ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nE'' : Type u_8\n𝕜' : Type u_9\ninst✝⁴ : IsROrC 𝕜'\ninst✝³ : NormedAddCommGroup E''\ninst✝² : InnerProductSpace 𝕜' E''\ninst✝¹ : CompleteSpace E''\ninst✝ : NormedSpace ℝ E''\nhm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx : E'\n⊢ (fun a => ↑↑↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1)) a • x) =ᵐ[μ]\n    ↑↑(compLp (toSpanSingleton ℝ x) ↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1)))\n[PROOFSTEP]\nhave h_comp := (toSpanSingleton ℝ x).coeFn_compLp (condexpL2 ℝ ℝ hm (indicatorConstLp 2 hs hμs 1) : α →₂[μ] ℝ)\n[GOAL]\ncase h\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹⁸ : IsROrC 𝕜\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : InnerProductSpace 𝕜 E\ninst✝¹⁵ : CompleteSpace E\ninst✝¹⁴ : NormedAddCommGroup E'\ninst✝¹³ : InnerProductSpace 𝕜 E'\ninst✝¹² : CompleteSpace E'\ninst✝¹¹ : NormedSpace ℝ E'\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup G\ninst✝⁷ : NormedAddCommGroup G'\ninst✝⁶ : NormedSpace ℝ G'\ninst✝⁵ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nE'' : Type u_8\n𝕜' : Type u_9\ninst✝⁴ : IsROrC 𝕜'\ninst✝³ : NormedAddCommGroup E''\ninst✝² : InnerProductSpace 𝕜' E''\ninst✝¹ : CompleteSpace E''\ninst✝ : NormedSpace ℝ E''\nhm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx : E'\nh_comp :\n  ∀ᵐ (a : α) ∂μ,\n    ↑↑(compLp (toSpanSingleton ℝ x) ↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1))) a =\n      ↑(toSpanSingleton ℝ x) (↑↑↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1)) a)\n⊢ (fun a => ↑↑↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1)) a • x) =ᵐ[μ]\n    ↑↑(compLp (toSpanSingleton ℝ x) ↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1)))\n[PROOFSTEP]\nrw [← EventuallyEq] at h_comp \n[GOAL]\ncase h\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹⁸ : IsROrC 𝕜\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : InnerProductSpace 𝕜 E\ninst✝¹⁵ : CompleteSpace E\ninst✝¹⁴ : NormedAddCommGroup E'\ninst✝¹³ : InnerProductSpace 𝕜 E'\ninst✝¹² : CompleteSpace E'\ninst✝¹¹ : NormedSpace ℝ E'\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup G\ninst✝⁷ : NormedAddCommGroup G'\ninst✝⁶ : NormedSpace ℝ G'\ninst✝⁵ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nE'' : Type u_8\n𝕜' : Type u_9\ninst✝⁴ : IsROrC 𝕜'\ninst✝³ : NormedAddCommGroup E''\ninst✝² : InnerProductSpace 𝕜' E''\ninst✝¹ : CompleteSpace E''\ninst✝ : NormedSpace ℝ E''\nhm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx : E'\nh_comp :\n  (fun a => ↑↑(compLp (toSpanSingleton ℝ x) ↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1))) a) =ᵐ[μ] fun a =>\n    ↑(toSpanSingleton ℝ x) (↑↑↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1)) a)\n⊢ (fun a => ↑↑↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1)) a • x) =ᵐ[μ]\n    ↑↑(compLp (toSpanSingleton ℝ x) ↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1)))\n[PROOFSTEP]\nrefine' EventuallyEq.trans _ h_comp.symm\n[GOAL]\ncase h\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹⁸ : IsROrC 𝕜\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : InnerProductSpace 𝕜 E\ninst✝¹⁵ : CompleteSpace E\ninst✝¹⁴ : NormedAddCommGroup E'\ninst✝¹³ : InnerProductSpace 𝕜 E'\ninst✝¹² : CompleteSpace E'\ninst✝¹¹ : NormedSpace ℝ E'\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup G\ninst✝⁷ : NormedAddCommGroup G'\ninst✝⁶ : NormedSpace ℝ G'\ninst✝⁵ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nE'' : Type u_8\n𝕜' : Type u_9\ninst✝⁴ : IsROrC 𝕜'\ninst✝³ : NormedAddCommGroup E''\ninst✝² : InnerProductSpace 𝕜' E''\ninst✝¹ : CompleteSpace E''\ninst✝ : NormedSpace ℝ E''\nhm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx : E'\nh_comp :\n  (fun a => ↑↑(compLp (toSpanSingleton ℝ x) ↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1))) a) =ᵐ[μ] fun a =>\n    ↑(toSpanSingleton ℝ x) (↑↑↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1)) a)\n⊢ (fun a => ↑↑↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1)) a • x) =ᵐ[μ] fun a =>\n    ↑(toSpanSingleton ℝ x) (↑↑↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1)) a)\n[PROOFSTEP]\nrefine' eventually_of_forall fun y => _\n[GOAL]\ncase h\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹⁸ : IsROrC 𝕜\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : InnerProductSpace 𝕜 E\ninst✝¹⁵ : CompleteSpace E\ninst✝¹⁴ : NormedAddCommGroup E'\ninst✝¹³ : InnerProductSpace 𝕜 E'\ninst✝¹² : CompleteSpace E'\ninst✝¹¹ : NormedSpace ℝ E'\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup G\ninst✝⁷ : NormedAddCommGroup G'\ninst✝⁶ : NormedSpace ℝ G'\ninst✝⁵ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nE'' : Type u_8\n𝕜' : Type u_9\ninst✝⁴ : IsROrC 𝕜'\ninst✝³ : NormedAddCommGroup E''\ninst✝² : InnerProductSpace 𝕜' E''\ninst✝¹ : CompleteSpace E''\ninst✝ : NormedSpace ℝ E''\nhm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx : E'\nh_comp :\n  (fun a => ↑↑(compLp (toSpanSingleton ℝ x) ↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1))) a) =ᵐ[μ] fun a =>\n    ↑(toSpanSingleton ℝ x) (↑↑↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1)) a)\ny : α\n⊢ (fun a => ↑↑↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1)) a • x) y =\n    (fun a => ↑(toSpanSingleton ℝ x) (↑↑↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1)) a)) y\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹⁸ : IsROrC 𝕜\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : InnerProductSpace 𝕜 E\ninst✝¹⁵ : CompleteSpace E\ninst✝¹⁴ : NormedAddCommGroup E'\ninst✝¹³ : InnerProductSpace 𝕜 E'\ninst✝¹² : CompleteSpace E'\ninst✝¹¹ : NormedSpace ℝ E'\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup G\ninst✝⁷ : NormedAddCommGroup G'\ninst✝⁶ : NormedSpace ℝ G'\ninst✝⁵ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t✝ : Set α\nE'' : Type u_8\n𝕜' : Type u_9\ninst✝⁴ : IsROrC 𝕜'\ninst✝³ : NormedAddCommGroup E''\ninst✝² : InnerProductSpace 𝕜' E''\ninst✝¹ : CompleteSpace E''\ninst✝ : NormedSpace ℝ E''\nhm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx : E'\nt : Set α\nht : MeasurableSet t\nhμt : ↑↑μ t ≠ ⊤\na : α\nha :\n  ↑↑↑(↑(condexpL2 E' 𝕜 hm) (indicatorConstLp 2 hs hμs x)) a =\n    (fun a => ↑↑↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1)) a • x) a\nx✝ : a ∈ t\n⊢ ↑‖↑↑↑(↑(condexpL2 E' 𝕜 hm) (indicatorConstLp 2 hs hμs x)) a‖₊ =\n    ↑‖↑↑↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1)) a • x‖₊\n[PROOFSTEP]\nrw [ha]\n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹⁸ : IsROrC 𝕜\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : InnerProductSpace 𝕜 E\ninst✝¹⁵ : CompleteSpace E\ninst✝¹⁴ : NormedAddCommGroup E'\ninst✝¹³ : InnerProductSpace 𝕜 E'\ninst✝¹² : CompleteSpace E'\ninst✝¹¹ : NormedSpace ℝ E'\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup G\ninst✝⁷ : NormedAddCommGroup G'\ninst✝⁶ : NormedSpace ℝ G'\ninst✝⁵ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t✝ : Set α\nE'' : Type u_8\n𝕜' : Type u_9\ninst✝⁴ : IsROrC 𝕜'\ninst✝³ : NormedAddCommGroup E''\ninst✝² : InnerProductSpace 𝕜' E''\ninst✝¹ : CompleteSpace E''\ninst✝ : NormedSpace ℝ E''\nhm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx : E'\nt : Set α\nht : MeasurableSet t\nhμt : ↑↑μ t ≠ ⊤\n⊢ ∫⁻ (a : α) in t, ↑‖↑↑↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1)) a • x‖₊ ∂μ =\n    (∫⁻ (a : α) in t, ↑‖↑↑↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1)) a‖₊ ∂μ) * ↑‖x‖₊\n[PROOFSTEP]\nsimp_rw [nnnorm_smul, ENNReal.coe_mul]\n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹⁸ : IsROrC 𝕜\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : InnerProductSpace 𝕜 E\ninst✝¹⁵ : CompleteSpace E\ninst✝¹⁴ : NormedAddCommGroup E'\ninst✝¹³ : InnerProductSpace 𝕜 E'\ninst✝¹² : CompleteSpace E'\ninst✝¹¹ : NormedSpace ℝ E'\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup G\ninst✝⁷ : NormedAddCommGroup G'\ninst✝⁶ : NormedSpace ℝ G'\ninst✝⁵ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t✝ : Set α\nE'' : Type u_8\n𝕜' : Type u_9\ninst✝⁴ : IsROrC 𝕜'\ninst✝³ : NormedAddCommGroup E''\ninst✝² : InnerProductSpace 𝕜' E''\ninst✝¹ : CompleteSpace E''\ninst✝ : NormedSpace ℝ E''\nhm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx : E'\nt : Set α\nht : MeasurableSet t\nhμt : ↑↑μ t ≠ ⊤\n⊢ ∫⁻ (a : α) in t, ↑‖↑↑↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1)) a‖₊ * ↑‖x‖₊ ∂μ =\n    (∫⁻ (a : α) in t, ↑‖↑↑↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1)) a‖₊ ∂μ) * ↑‖x‖₊\n[PROOFSTEP]\nrw [lintegral_mul_const, lpMeas_coe]\n[GOAL]\ncase hf\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹⁸ : IsROrC 𝕜\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : InnerProductSpace 𝕜 E\ninst✝¹⁵ : CompleteSpace E\ninst✝¹⁴ : NormedAddCommGroup E'\ninst✝¹³ : InnerProductSpace 𝕜 E'\ninst✝¹² : CompleteSpace E'\ninst✝¹¹ : NormedSpace ℝ E'\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace 𝕜 F\ninst✝⁸ : NormedAddCommGroup G\ninst✝⁷ : NormedAddCommGroup G'\ninst✝⁶ : NormedSpace ℝ G'\ninst✝⁵ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t✝ : Set α\nE'' : Type u_8\n𝕜' : Type u_9\ninst✝⁴ : IsROrC 𝕜'\ninst✝³ : NormedAddCommGroup E''\ninst✝² : InnerProductSpace 𝕜' E''\ninst✝¹ : CompleteSpace E''\ninst✝ : NormedSpace ℝ E''\nhm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx : E'\nt : Set α\nht : MeasurableSet t\nhμt : ↑↑μ t ≠ ⊤\n⊢ Measurable fun a => ↑‖↑↑↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1)) a‖₊\n[PROOFSTEP]\nexact (Lp.stronglyMeasurable _).ennnorm\n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹⁹ : IsROrC 𝕜\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : InnerProductSpace 𝕜 E\ninst✝¹⁶ : CompleteSpace E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : InnerProductSpace 𝕜 E'\ninst✝¹³ : CompleteSpace E'\ninst✝¹² : NormedSpace ℝ E'\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedAddCommGroup G'\ninst✝⁷ : NormedSpace ℝ G'\ninst✝⁶ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nE'' : Type u_8\n𝕜' : Type u_9\ninst✝⁵ : IsROrC 𝕜'\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : InnerProductSpace 𝕜' E''\ninst✝² : CompleteSpace E''\ninst✝¹ : NormedSpace ℝ E''\nhm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx : E'\ninst✝ : SigmaFinite (Measure.trim μ hm)\n⊢ ∫⁻ (a : α), ↑‖↑↑↑(↑(condexpL2 E' 𝕜 hm) (indicatorConstLp 2 hs hμs x)) a‖₊ ∂μ ≤ ↑↑μ s * ↑‖x‖₊\n[PROOFSTEP]\nrefine' lintegral_le_of_forall_fin_meas_le' hm (μ s * ‖x‖₊) _ fun t ht hμt => _\n[GOAL]\ncase refine'_1\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹⁹ : IsROrC 𝕜\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : InnerProductSpace 𝕜 E\ninst✝¹⁶ : CompleteSpace E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : InnerProductSpace 𝕜 E'\ninst✝¹³ : CompleteSpace E'\ninst✝¹² : NormedSpace ℝ E'\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedAddCommGroup G'\ninst✝⁷ : NormedSpace ℝ G'\ninst✝⁶ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nE'' : Type u_8\n𝕜' : Type u_9\ninst✝⁵ : IsROrC 𝕜'\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : InnerProductSpace 𝕜' E''\ninst✝² : CompleteSpace E''\ninst✝¹ : NormedSpace ℝ E''\nhm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx : E'\ninst✝ : SigmaFinite (Measure.trim μ hm)\n⊢ AEMeasurable fun a => ↑‖↑↑↑(↑(condexpL2 E' 𝕜 hm) (indicatorConstLp 2 hs hμs x)) a‖₊\n[PROOFSTEP]\nrw [lpMeas_coe]\n[GOAL]\ncase refine'_1\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹⁹ : IsROrC 𝕜\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : InnerProductSpace 𝕜 E\ninst✝¹⁶ : CompleteSpace E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : InnerProductSpace 𝕜 E'\ninst✝¹³ : CompleteSpace E'\ninst✝¹² : NormedSpace ℝ E'\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedAddCommGroup G'\ninst✝⁷ : NormedSpace ℝ G'\ninst✝⁶ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nE'' : Type u_8\n𝕜' : Type u_9\ninst✝⁵ : IsROrC 𝕜'\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : InnerProductSpace 𝕜' E''\ninst✝² : CompleteSpace E''\ninst✝¹ : NormedSpace ℝ E''\nhm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx : E'\ninst✝ : SigmaFinite (Measure.trim μ hm)\n⊢ AEMeasurable fun a => ↑‖↑↑↑(↑(condexpL2 E' 𝕜 hm) (indicatorConstLp 2 hs hμs x)) a‖₊\n[PROOFSTEP]\nexact (Lp.aestronglyMeasurable _).ennnorm\n[GOAL]\ncase refine'_2\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹⁹ : IsROrC 𝕜\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : InnerProductSpace 𝕜 E\ninst✝¹⁶ : CompleteSpace E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : InnerProductSpace 𝕜 E'\ninst✝¹³ : CompleteSpace E'\ninst✝¹² : NormedSpace ℝ E'\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedAddCommGroup G'\ninst✝⁷ : NormedSpace ℝ G'\ninst✝⁶ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t✝ : Set α\nE'' : Type u_8\n𝕜' : Type u_9\ninst✝⁵ : IsROrC 𝕜'\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : InnerProductSpace 𝕜' E''\ninst✝² : CompleteSpace E''\ninst✝¹ : NormedSpace ℝ E''\nhm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx : E'\ninst✝ : SigmaFinite (Measure.trim μ hm)\nt : Set α\nht : MeasurableSet t\nhμt : ↑↑μ t ≠ ⊤\n⊢ ∫⁻ (x_1 : α) in t, ↑‖↑↑↑(↑(condexpL2 E' 𝕜 hm) (indicatorConstLp 2 hs hμs x)) x_1‖₊ ∂μ ≤ ↑↑μ s * ↑‖x‖₊\n[PROOFSTEP]\nrefine' (set_lintegral_nnnorm_condexpL2_indicator_le hm hs hμs x ht hμt).trans _\n[GOAL]\ncase refine'_2\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹⁹ : IsROrC 𝕜\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : InnerProductSpace 𝕜 E\ninst✝¹⁶ : CompleteSpace E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : InnerProductSpace 𝕜 E'\ninst✝¹³ : CompleteSpace E'\ninst✝¹² : NormedSpace ℝ E'\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedAddCommGroup G'\ninst✝⁷ : NormedSpace ℝ G'\ninst✝⁶ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t✝ : Set α\nE'' : Type u_8\n𝕜' : Type u_9\ninst✝⁵ : IsROrC 𝕜'\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : InnerProductSpace 𝕜' E''\ninst✝² : CompleteSpace E''\ninst✝¹ : NormedSpace ℝ E''\nhm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx : E'\ninst✝ : SigmaFinite (Measure.trim μ hm)\nt : Set α\nht : MeasurableSet t\nhμt : ↑↑μ t ≠ ⊤\n⊢ ↑↑μ (s ∩ t) * ↑‖x‖₊ ≤ ↑↑μ s * ↑‖x‖₊\n[PROOFSTEP]\nexact mul_le_mul_right' (measure_mono (Set.inter_subset_left _ _)) _\n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹⁹ : IsROrC 𝕜\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : InnerProductSpace 𝕜 E\ninst✝¹⁶ : CompleteSpace E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : InnerProductSpace 𝕜 E'\ninst✝¹³ : CompleteSpace E'\ninst✝¹² : NormedSpace ℝ E'\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedAddCommGroup G'\ninst✝⁷ : NormedSpace ℝ G'\ninst✝⁶ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nE'' : Type u_8\n𝕜' : Type u_9\ninst✝⁵ : IsROrC 𝕜'\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : InnerProductSpace 𝕜' E''\ninst✝² : CompleteSpace E''\ninst✝¹ : NormedSpace ℝ E''\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx : E'\n⊢ Integrable ↑↑↑(↑(condexpL2 E' 𝕜 hm) (indicatorConstLp 2 hs hμs x))\n[PROOFSTEP]\nrefine' integrable_of_forall_fin_meas_le' hm (μ s * ‖x‖₊) (ENNReal.mul_lt_top hμs ENNReal.coe_ne_top) _ _\n[GOAL]\ncase refine'_1\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹⁹ : IsROrC 𝕜\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : InnerProductSpace 𝕜 E\ninst✝¹⁶ : CompleteSpace E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : InnerProductSpace 𝕜 E'\ninst✝¹³ : CompleteSpace E'\ninst✝¹² : NormedSpace ℝ E'\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedAddCommGroup G'\ninst✝⁷ : NormedSpace ℝ G'\ninst✝⁶ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nE'' : Type u_8\n𝕜' : Type u_9\ninst✝⁵ : IsROrC 𝕜'\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : InnerProductSpace 𝕜' E''\ninst✝² : CompleteSpace E''\ninst✝¹ : NormedSpace ℝ E''\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx : E'\n⊢ AEStronglyMeasurable (↑↑↑(↑(condexpL2 E' 𝕜 hm) (indicatorConstLp 2 hs hμs x))) μ\n[PROOFSTEP]\nrw [lpMeas_coe]\n[GOAL]\ncase refine'_1\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹⁹ : IsROrC 𝕜\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : InnerProductSpace 𝕜 E\ninst✝¹⁶ : CompleteSpace E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : InnerProductSpace 𝕜 E'\ninst✝¹³ : CompleteSpace E'\ninst✝¹² : NormedSpace ℝ E'\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedAddCommGroup G'\ninst✝⁷ : NormedSpace ℝ G'\ninst✝⁶ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nE'' : Type u_8\n𝕜' : Type u_9\ninst✝⁵ : IsROrC 𝕜'\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : InnerProductSpace 𝕜' E''\ninst✝² : CompleteSpace E''\ninst✝¹ : NormedSpace ℝ E''\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx : E'\n⊢ AEStronglyMeasurable (↑↑↑(↑(condexpL2 E' 𝕜 hm) (indicatorConstLp 2 hs hμs x))) μ\n[PROOFSTEP]\nexact Lp.aestronglyMeasurable _\n[GOAL]\ncase refine'_2\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹⁹ : IsROrC 𝕜\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : InnerProductSpace 𝕜 E\ninst✝¹⁶ : CompleteSpace E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : InnerProductSpace 𝕜 E'\ninst✝¹³ : CompleteSpace E'\ninst✝¹² : NormedSpace ℝ E'\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedAddCommGroup G'\ninst✝⁷ : NormedSpace ℝ G'\ninst✝⁶ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nE'' : Type u_8\n𝕜' : Type u_9\ninst✝⁵ : IsROrC 𝕜'\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : InnerProductSpace 𝕜' E''\ninst✝² : CompleteSpace E''\ninst✝¹ : NormedSpace ℝ E''\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx : E'\n⊢ ∀ (s_1 : Set α),\n    MeasurableSet s_1 →\n      ↑↑μ s_1 ≠ ⊤ →\n        ∫⁻ (x_1 : α) in s_1, ↑‖↑↑↑(↑(condexpL2 E' 𝕜 hm) (indicatorConstLp 2 hs hμs x)) x_1‖₊ ∂μ ≤ ↑↑μ s * ↑‖x‖₊\n[PROOFSTEP]\nrefine' fun t ht hμt => (set_lintegral_nnnorm_condexpL2_indicator_le hm hs hμs x ht hμt).trans _\n[GOAL]\ncase refine'_2\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹⁹ : IsROrC 𝕜\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : InnerProductSpace 𝕜 E\ninst✝¹⁶ : CompleteSpace E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : InnerProductSpace 𝕜 E'\ninst✝¹³ : CompleteSpace E'\ninst✝¹² : NormedSpace ℝ E'\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedAddCommGroup G'\ninst✝⁷ : NormedSpace ℝ G'\ninst✝⁶ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t✝ : Set α\nE'' : Type u_8\n𝕜' : Type u_9\ninst✝⁵ : IsROrC 𝕜'\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : InnerProductSpace 𝕜' E''\ninst✝² : CompleteSpace E''\ninst✝¹ : NormedSpace ℝ E''\nhm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx : E'\nt : Set α\nht : MeasurableSet t\nhμt : ↑↑μ t ≠ ⊤\n⊢ ↑↑μ (s ∩ t) * ↑‖x‖₊ ≤ ↑↑μ s * ↑‖x‖₊\n[PROOFSTEP]\nexact mul_le_mul_right' (measure_mono (Set.inter_subset_left _ _)) _\n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹⁹ : IsROrC 𝕜\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : InnerProductSpace 𝕜 E\ninst✝¹⁶ : CompleteSpace E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : InnerProductSpace 𝕜 E'\ninst✝¹³ : CompleteSpace E'\ninst✝¹² : NormedSpace ℝ E'\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedAddCommGroup G'\ninst✝⁷ : NormedSpace ℝ G'\ninst✝⁶ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nE'' : Type u_8\n𝕜' : Type u_9\ninst✝⁵ : IsROrC 𝕜'\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : InnerProductSpace 𝕜' E''\ninst✝² : CompleteSpace E''\ninst✝¹ : NormedSpace ℝ E''\ninst✝ : NormedSpace ℝ G\nhm✝ hm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx : G\n⊢ AEStronglyMeasurable' m (↑↑(condexpIndSMul hm hs hμs x)) μ\n[PROOFSTEP]\nhave h : AEStronglyMeasurable' m (condexpL2 ℝ ℝ hm (indicatorConstLp 2 hs hμs 1) : α → ℝ) μ :=\n  aeStronglyMeasurable'_condexpL2 _ _\n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹⁹ : IsROrC 𝕜\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : InnerProductSpace 𝕜 E\ninst✝¹⁶ : CompleteSpace E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : InnerProductSpace 𝕜 E'\ninst✝¹³ : CompleteSpace E'\ninst✝¹² : NormedSpace ℝ E'\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedAddCommGroup G'\ninst✝⁷ : NormedSpace ℝ G'\ninst✝⁶ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nE'' : Type u_8\n𝕜' : Type u_9\ninst✝⁵ : IsROrC 𝕜'\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : InnerProductSpace 𝕜' E''\ninst✝² : CompleteSpace E''\ninst✝¹ : NormedSpace ℝ E''\ninst✝ : NormedSpace ℝ G\nhm✝ hm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx : G\nh : AEStronglyMeasurable' m (↑↑↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1))) μ\n⊢ AEStronglyMeasurable' m (↑↑(condexpIndSMul hm hs hμs x)) μ\n[PROOFSTEP]\nrw [condexpIndSMul]\n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹⁹ : IsROrC 𝕜\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : InnerProductSpace 𝕜 E\ninst✝¹⁶ : CompleteSpace E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : InnerProductSpace 𝕜 E'\ninst✝¹³ : CompleteSpace E'\ninst✝¹² : NormedSpace ℝ E'\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedAddCommGroup G'\ninst✝⁷ : NormedSpace ℝ G'\ninst✝⁶ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nE'' : Type u_8\n𝕜' : Type u_9\ninst✝⁵ : IsROrC 𝕜'\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : InnerProductSpace 𝕜' E''\ninst✝² : CompleteSpace E''\ninst✝¹ : NormedSpace ℝ E''\ninst✝ : NormedSpace ℝ G\nhm✝ hm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx : G\nh : AEStronglyMeasurable' m (↑↑↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1))) μ\n⊢ AEStronglyMeasurable' m\n    (↑↑(↑(compLpL 2 μ (toSpanSingleton ℝ x)) ↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1)))) μ\n[PROOFSTEP]\nsuffices AEStronglyMeasurable' m (toSpanSingleton ℝ x ∘ condexpL2 ℝ ℝ hm (indicatorConstLp 2 hs hμs 1)) μ\n  by\n  refine' AEStronglyMeasurable'.congr this _\n  refine' EventuallyEq.trans _ (coeFn_compLpL _ _).symm\n  rfl\n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹⁹ : IsROrC 𝕜\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : InnerProductSpace 𝕜 E\ninst✝¹⁶ : CompleteSpace E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : InnerProductSpace 𝕜 E'\ninst✝¹³ : CompleteSpace E'\ninst✝¹² : NormedSpace ℝ E'\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedAddCommGroup G'\ninst✝⁷ : NormedSpace ℝ G'\ninst✝⁶ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nE'' : Type u_8\n𝕜' : Type u_9\ninst✝⁵ : IsROrC 𝕜'\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : InnerProductSpace 𝕜' E''\ninst✝² : CompleteSpace E''\ninst✝¹ : NormedSpace ℝ E''\ninst✝ : NormedSpace ℝ G\nhm✝ hm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx : G\nh : AEStronglyMeasurable' m (↑↑↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1))) μ\nthis : AEStronglyMeasurable' m (↑(toSpanSingleton ℝ x) ∘ ↑↑↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1))) μ\n⊢ AEStronglyMeasurable' m\n    (↑↑(↑(compLpL 2 μ (toSpanSingleton ℝ x)) ↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1)))) μ\n[PROOFSTEP]\nrefine' AEStronglyMeasurable'.congr this _\n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹⁹ : IsROrC 𝕜\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : InnerProductSpace 𝕜 E\ninst✝¹⁶ : CompleteSpace E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : InnerProductSpace 𝕜 E'\ninst✝¹³ : CompleteSpace E'\ninst✝¹² : NormedSpace ℝ E'\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedAddCommGroup G'\ninst✝⁷ : NormedSpace ℝ G'\ninst✝⁶ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nE'' : Type u_8\n𝕜' : Type u_9\ninst✝⁵ : IsROrC 𝕜'\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : InnerProductSpace 𝕜' E''\ninst✝² : CompleteSpace E''\ninst✝¹ : NormedSpace ℝ E''\ninst✝ : NormedSpace ℝ G\nhm✝ hm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx : G\nh : AEStronglyMeasurable' m (↑↑↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1))) μ\nthis : AEStronglyMeasurable' m (↑(toSpanSingleton ℝ x) ∘ ↑↑↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1))) μ\n⊢ ↑(toSpanSingleton ℝ x) ∘ ↑↑↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1)) =ᵐ[μ]\n    ↑↑(↑(compLpL 2 μ (toSpanSingleton ℝ x)) ↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1)))\n[PROOFSTEP]\nrefine' EventuallyEq.trans _ (coeFn_compLpL _ _).symm\n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹⁹ : IsROrC 𝕜\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : InnerProductSpace 𝕜 E\ninst✝¹⁶ : CompleteSpace E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : InnerProductSpace 𝕜 E'\ninst✝¹³ : CompleteSpace E'\ninst✝¹² : NormedSpace ℝ E'\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedAddCommGroup G'\ninst✝⁷ : NormedSpace ℝ G'\ninst✝⁶ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nE'' : Type u_8\n𝕜' : Type u_9\ninst✝⁵ : IsROrC 𝕜'\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : InnerProductSpace 𝕜' E''\ninst✝² : CompleteSpace E''\ninst✝¹ : NormedSpace ℝ E''\ninst✝ : NormedSpace ℝ G\nhm✝ hm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx : G\nh : AEStronglyMeasurable' m (↑↑↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1))) μ\nthis : AEStronglyMeasurable' m (↑(toSpanSingleton ℝ x) ∘ ↑↑↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1))) μ\n⊢ ↑(toSpanSingleton ℝ x) ∘ ↑↑↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1)) =ᵐ[μ] fun a =>\n    ↑(toSpanSingleton ℝ x) (↑↑↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1)) a)\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹⁹ : IsROrC 𝕜\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : InnerProductSpace 𝕜 E\ninst✝¹⁶ : CompleteSpace E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : InnerProductSpace 𝕜 E'\ninst✝¹³ : CompleteSpace E'\ninst✝¹² : NormedSpace ℝ E'\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedAddCommGroup G'\ninst✝⁷ : NormedSpace ℝ G'\ninst✝⁶ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nE'' : Type u_8\n𝕜' : Type u_9\ninst✝⁵ : IsROrC 𝕜'\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : InnerProductSpace 𝕜' E''\ninst✝² : CompleteSpace E''\ninst✝¹ : NormedSpace ℝ E''\ninst✝ : NormedSpace ℝ G\nhm✝ hm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx : G\nh : AEStronglyMeasurable' m (↑↑↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1))) μ\n⊢ AEStronglyMeasurable' m (↑(toSpanSingleton ℝ x) ∘ ↑↑↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1))) μ\n[PROOFSTEP]\nexact AEStronglyMeasurable'.continuous_comp (toSpanSingleton ℝ x).continuous h\n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹⁹ : IsROrC 𝕜\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : InnerProductSpace 𝕜 E\ninst✝¹⁶ : CompleteSpace E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : InnerProductSpace 𝕜 E'\ninst✝¹³ : CompleteSpace E'\ninst✝¹² : NormedSpace ℝ E'\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedAddCommGroup G'\ninst✝⁷ : NormedSpace ℝ G'\ninst✝⁶ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nE'' : Type u_8\n𝕜' : Type u_9\ninst✝⁵ : IsROrC 𝕜'\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : InnerProductSpace 𝕜' E''\ninst✝² : CompleteSpace E''\ninst✝¹ : NormedSpace ℝ E''\ninst✝ : NormedSpace ℝ G\nhm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx y : G\n⊢ condexpIndSMul hm hs hμs (x + y) = condexpIndSMul hm hs hμs x + condexpIndSMul hm hs hμs y\n[PROOFSTEP]\nsimp_rw [condexpIndSMul]\n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹⁹ : IsROrC 𝕜\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : InnerProductSpace 𝕜 E\ninst✝¹⁶ : CompleteSpace E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : InnerProductSpace 𝕜 E'\ninst✝¹³ : CompleteSpace E'\ninst✝¹² : NormedSpace ℝ E'\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedAddCommGroup G'\ninst✝⁷ : NormedSpace ℝ G'\ninst✝⁶ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nE'' : Type u_8\n𝕜' : Type u_9\ninst✝⁵ : IsROrC 𝕜'\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : InnerProductSpace 𝕜' E''\ninst✝² : CompleteSpace E''\ninst✝¹ : NormedSpace ℝ E''\ninst✝ : NormedSpace ℝ G\nhm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx y : G\n⊢ ↑(compLpL 2 μ (toSpanSingleton ℝ (x + y))) ↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1)) =\n    ↑(compLpL 2 μ (toSpanSingleton ℝ x)) ↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1)) +\n      ↑(compLpL 2 μ (toSpanSingleton ℝ y)) ↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1))\n[PROOFSTEP]\nrw [toSpanSingleton_add, add_compLpL, add_apply]\n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹⁹ : IsROrC 𝕜\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : InnerProductSpace 𝕜 E\ninst✝¹⁶ : CompleteSpace E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : InnerProductSpace 𝕜 E'\ninst✝¹³ : CompleteSpace E'\ninst✝¹² : NormedSpace ℝ E'\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedAddCommGroup G'\ninst✝⁷ : NormedSpace ℝ G'\ninst✝⁶ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nE'' : Type u_8\n𝕜' : Type u_9\ninst✝⁵ : IsROrC 𝕜'\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : InnerProductSpace 𝕜' E''\ninst✝² : CompleteSpace E''\ninst✝¹ : NormedSpace ℝ E''\ninst✝ : NormedSpace ℝ G\nhm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nc : ℝ\nx : G\n⊢ condexpIndSMul hm hs hμs (c • x) = c • condexpIndSMul hm hs hμs x\n[PROOFSTEP]\nsimp_rw [condexpIndSMul]\n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹⁹ : IsROrC 𝕜\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : InnerProductSpace 𝕜 E\ninst✝¹⁶ : CompleteSpace E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : InnerProductSpace 𝕜 E'\ninst✝¹³ : CompleteSpace E'\ninst✝¹² : NormedSpace ℝ E'\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedAddCommGroup G'\ninst✝⁷ : NormedSpace ℝ G'\ninst✝⁶ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nE'' : Type u_8\n𝕜' : Type u_9\ninst✝⁵ : IsROrC 𝕜'\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : InnerProductSpace 𝕜' E''\ninst✝² : CompleteSpace E''\ninst✝¹ : NormedSpace ℝ E''\ninst✝ : NormedSpace ℝ G\nhm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nc : ℝ\nx : G\n⊢ ↑(compLpL 2 μ (toSpanSingleton ℝ (c • x))) ↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1)) =\n    c • ↑(compLpL 2 μ (toSpanSingleton ℝ x)) ↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1))\n[PROOFSTEP]\nrw [toSpanSingleton_smul, smul_compLpL, smul_apply]\n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝²¹ : IsROrC 𝕜\ninst✝²⁰ : NormedAddCommGroup E\ninst✝¹⁹ : InnerProductSpace 𝕜 E\ninst✝¹⁸ : CompleteSpace E\ninst✝¹⁷ : NormedAddCommGroup E'\ninst✝¹⁶ : InnerProductSpace 𝕜 E'\ninst✝¹⁵ : CompleteSpace E'\ninst✝¹⁴ : NormedSpace ℝ E'\ninst✝¹³ : NormedAddCommGroup F\ninst✝¹² : NormedSpace 𝕜 F\ninst✝¹¹ : NormedAddCommGroup G\ninst✝¹⁰ : NormedAddCommGroup G'\ninst✝⁹ : NormedSpace ℝ G'\ninst✝⁸ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nE'' : Type u_8\n𝕜' : Type u_9\ninst✝⁷ : IsROrC 𝕜'\ninst✝⁶ : NormedAddCommGroup E''\ninst✝⁵ : InnerProductSpace 𝕜' E''\ninst✝⁴ : CompleteSpace E''\ninst✝³ : NormedSpace ℝ E''\ninst✝² : NormedSpace ℝ G\nhm : m ≤ m0\ninst✝¹ : NormedSpace ℝ F\ninst✝ : SMulCommClass ℝ 𝕜 F\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nc : 𝕜\nx : F\n⊢ condexpIndSMul hm hs hμs (c • x) = c • condexpIndSMul hm hs hμs x\n[PROOFSTEP]\nrw [condexpIndSMul, condexpIndSMul, toSpanSingleton_smul', (toSpanSingleton ℝ x).smul_compLpL c, smul_apply]\n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹⁹ : IsROrC 𝕜\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : InnerProductSpace 𝕜 E\ninst✝¹⁶ : CompleteSpace E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : InnerProductSpace 𝕜 E'\ninst✝¹³ : CompleteSpace E'\ninst✝¹² : NormedSpace ℝ E'\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedAddCommGroup G'\ninst✝⁷ : NormedSpace ℝ G'\ninst✝⁶ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t✝ : Set α\nE'' : Type u_8\n𝕜' : Type u_9\ninst✝⁵ : IsROrC 𝕜'\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : InnerProductSpace 𝕜' E''\ninst✝² : CompleteSpace E''\ninst✝¹ : NormedSpace ℝ E''\ninst✝ : NormedSpace ℝ G\nhm✝ hm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx : G\nt : Set α\nht : MeasurableSet t\nhμt : ↑↑μ t ≠ ⊤\na : α\nha : ↑↑(condexpIndSMul hm hs hμs x) a = (fun a => ↑↑↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1)) a • x) a\nx✝ : a ∈ t\n⊢ ↑‖↑↑(condexpIndSMul hm hs hμs x) a‖₊ = ↑‖↑↑↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1)) a • x‖₊\n[PROOFSTEP]\nrw [ha]\n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹⁹ : IsROrC 𝕜\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : InnerProductSpace 𝕜 E\ninst✝¹⁶ : CompleteSpace E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : InnerProductSpace 𝕜 E'\ninst✝¹³ : CompleteSpace E'\ninst✝¹² : NormedSpace ℝ E'\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedAddCommGroup G'\ninst✝⁷ : NormedSpace ℝ G'\ninst✝⁶ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t✝ : Set α\nE'' : Type u_8\n𝕜' : Type u_9\ninst✝⁵ : IsROrC 𝕜'\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : InnerProductSpace 𝕜' E''\ninst✝² : CompleteSpace E''\ninst✝¹ : NormedSpace ℝ E''\ninst✝ : NormedSpace ℝ G\nhm✝ hm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx : G\nt : Set α\nht : MeasurableSet t\nhμt : ↑↑μ t ≠ ⊤\n⊢ ∫⁻ (a : α) in t, ↑‖↑↑↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1)) a • x‖₊ ∂μ =\n    (∫⁻ (a : α) in t, ↑‖↑↑↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1)) a‖₊ ∂μ) * ↑‖x‖₊\n[PROOFSTEP]\nsimp_rw [nnnorm_smul, ENNReal.coe_mul]\n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹⁹ : IsROrC 𝕜\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : InnerProductSpace 𝕜 E\ninst✝¹⁶ : CompleteSpace E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : InnerProductSpace 𝕜 E'\ninst✝¹³ : CompleteSpace E'\ninst✝¹² : NormedSpace ℝ E'\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedAddCommGroup G'\ninst✝⁷ : NormedSpace ℝ G'\ninst✝⁶ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t✝ : Set α\nE'' : Type u_8\n𝕜' : Type u_9\ninst✝⁵ : IsROrC 𝕜'\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : InnerProductSpace 𝕜' E''\ninst✝² : CompleteSpace E''\ninst✝¹ : NormedSpace ℝ E''\ninst✝ : NormedSpace ℝ G\nhm✝ hm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx : G\nt : Set α\nht : MeasurableSet t\nhμt : ↑↑μ t ≠ ⊤\n⊢ ∫⁻ (a : α) in t, ↑‖↑↑↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1)) a‖₊ * ↑‖x‖₊ ∂μ =\n    (∫⁻ (a : α) in t, ↑‖↑↑↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1)) a‖₊ ∂μ) * ↑‖x‖₊\n[PROOFSTEP]\nrw [lintegral_mul_const, lpMeas_coe]\n[GOAL]\ncase hf\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹⁹ : IsROrC 𝕜\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : InnerProductSpace 𝕜 E\ninst✝¹⁶ : CompleteSpace E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : InnerProductSpace 𝕜 E'\ninst✝¹³ : CompleteSpace E'\ninst✝¹² : NormedSpace ℝ E'\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedAddCommGroup G'\ninst✝⁷ : NormedSpace ℝ G'\ninst✝⁶ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t✝ : Set α\nE'' : Type u_8\n𝕜' : Type u_9\ninst✝⁵ : IsROrC 𝕜'\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : InnerProductSpace 𝕜' E''\ninst✝² : CompleteSpace E''\ninst✝¹ : NormedSpace ℝ E''\ninst✝ : NormedSpace ℝ G\nhm✝ hm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx : G\nt : Set α\nht : MeasurableSet t\nhμt : ↑↑μ t ≠ ⊤\n⊢ Measurable fun a => ↑‖↑↑↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1)) a‖₊\n[PROOFSTEP]\nexact (Lp.stronglyMeasurable _).ennnorm\n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝²⁰ : IsROrC 𝕜\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : InnerProductSpace 𝕜 E\ninst✝¹⁷ : CompleteSpace E\ninst✝¹⁶ : NormedAddCommGroup E'\ninst✝¹⁵ : InnerProductSpace 𝕜 E'\ninst✝¹⁴ : CompleteSpace E'\ninst✝¹³ : NormedSpace ℝ E'\ninst✝¹² : NormedAddCommGroup F\ninst✝¹¹ : NormedSpace 𝕜 F\ninst✝¹⁰ : NormedAddCommGroup G\ninst✝⁹ : NormedAddCommGroup G'\ninst✝⁸ : NormedSpace ℝ G'\ninst✝⁷ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nE'' : Type u_8\n𝕜' : Type u_9\ninst✝⁶ : IsROrC 𝕜'\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : InnerProductSpace 𝕜' E''\ninst✝³ : CompleteSpace E''\ninst✝² : NormedSpace ℝ E''\ninst✝¹ : NormedSpace ℝ G\nhm✝ hm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx : G\ninst✝ : SigmaFinite (Measure.trim μ hm)\n⊢ ∫⁻ (a : α), ↑‖↑↑(condexpIndSMul hm hs hμs x) a‖₊ ∂μ ≤ ↑↑μ s * ↑‖x‖₊\n[PROOFSTEP]\nrefine' lintegral_le_of_forall_fin_meas_le' hm (μ s * ‖x‖₊) _ fun t ht hμt => _\n[GOAL]\ncase refine'_1\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝²⁰ : IsROrC 𝕜\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : InnerProductSpace 𝕜 E\ninst✝¹⁷ : CompleteSpace E\ninst✝¹⁶ : NormedAddCommGroup E'\ninst✝¹⁵ : InnerProductSpace 𝕜 E'\ninst✝¹⁴ : CompleteSpace E'\ninst✝¹³ : NormedSpace ℝ E'\ninst✝¹² : NormedAddCommGroup F\ninst✝¹¹ : NormedSpace 𝕜 F\ninst✝¹⁰ : NormedAddCommGroup G\ninst✝⁹ : NormedAddCommGroup G'\ninst✝⁸ : NormedSpace ℝ G'\ninst✝⁷ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nE'' : Type u_8\n𝕜' : Type u_9\ninst✝⁶ : IsROrC 𝕜'\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : InnerProductSpace 𝕜' E''\ninst✝³ : CompleteSpace E''\ninst✝² : NormedSpace ℝ E''\ninst✝¹ : NormedSpace ℝ G\nhm✝ hm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx : G\ninst✝ : SigmaFinite (Measure.trim μ hm)\n⊢ AEMeasurable fun a => ↑‖↑↑(condexpIndSMul hm hs hμs x) a‖₊\n[PROOFSTEP]\nexact (Lp.aestronglyMeasurable _).ennnorm\n[GOAL]\ncase refine'_2\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝²⁰ : IsROrC 𝕜\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : InnerProductSpace 𝕜 E\ninst✝¹⁷ : CompleteSpace E\ninst✝¹⁶ : NormedAddCommGroup E'\ninst✝¹⁵ : InnerProductSpace 𝕜 E'\ninst✝¹⁴ : CompleteSpace E'\ninst✝¹³ : NormedSpace ℝ E'\ninst✝¹² : NormedAddCommGroup F\ninst✝¹¹ : NormedSpace 𝕜 F\ninst✝¹⁰ : NormedAddCommGroup G\ninst✝⁹ : NormedAddCommGroup G'\ninst✝⁸ : NormedSpace ℝ G'\ninst✝⁷ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t✝ : Set α\nE'' : Type u_8\n𝕜' : Type u_9\ninst✝⁶ : IsROrC 𝕜'\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : InnerProductSpace 𝕜' E''\ninst✝³ : CompleteSpace E''\ninst✝² : NormedSpace ℝ E''\ninst✝¹ : NormedSpace ℝ G\nhm✝ hm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx : G\ninst✝ : SigmaFinite (Measure.trim μ hm)\nt : Set α\nht : MeasurableSet t\nhμt : ↑↑μ t ≠ ⊤\n⊢ ∫⁻ (x_1 : α) in t, ↑‖↑↑(condexpIndSMul hm hs hμs x) x_1‖₊ ∂μ ≤ ↑↑μ s * ↑‖x‖₊\n[PROOFSTEP]\nrefine' (set_lintegral_nnnorm_condexpIndSMul_le hm hs hμs x ht hμt).trans _\n[GOAL]\ncase refine'_2\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝²⁰ : IsROrC 𝕜\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : InnerProductSpace 𝕜 E\ninst✝¹⁷ : CompleteSpace E\ninst✝¹⁶ : NormedAddCommGroup E'\ninst✝¹⁵ : InnerProductSpace 𝕜 E'\ninst✝¹⁴ : CompleteSpace E'\ninst✝¹³ : NormedSpace ℝ E'\ninst✝¹² : NormedAddCommGroup F\ninst✝¹¹ : NormedSpace 𝕜 F\ninst✝¹⁰ : NormedAddCommGroup G\ninst✝⁹ : NormedAddCommGroup G'\ninst✝⁸ : NormedSpace ℝ G'\ninst✝⁷ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t✝ : Set α\nE'' : Type u_8\n𝕜' : Type u_9\ninst✝⁶ : IsROrC 𝕜'\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : InnerProductSpace 𝕜' E''\ninst✝³ : CompleteSpace E''\ninst✝² : NormedSpace ℝ E''\ninst✝¹ : NormedSpace ℝ G\nhm✝ hm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx : G\ninst✝ : SigmaFinite (Measure.trim μ hm)\nt : Set α\nht : MeasurableSet t\nhμt : ↑↑μ t ≠ ⊤\n⊢ ↑↑μ (s ∩ t) * ↑‖x‖₊ ≤ ↑↑μ s * ↑‖x‖₊\n[PROOFSTEP]\nexact mul_le_mul_right' (measure_mono (Set.inter_subset_left _ _)) _\n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝²⁰ : IsROrC 𝕜\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : InnerProductSpace 𝕜 E\ninst✝¹⁷ : CompleteSpace E\ninst✝¹⁶ : NormedAddCommGroup E'\ninst✝¹⁵ : InnerProductSpace 𝕜 E'\ninst✝¹⁴ : CompleteSpace E'\ninst✝¹³ : NormedSpace ℝ E'\ninst✝¹² : NormedAddCommGroup F\ninst✝¹¹ : NormedSpace 𝕜 F\ninst✝¹⁰ : NormedAddCommGroup G\ninst✝⁹ : NormedAddCommGroup G'\ninst✝⁸ : NormedSpace ℝ G'\ninst✝⁷ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nE'' : Type u_8\n𝕜' : Type u_9\ninst✝⁶ : IsROrC 𝕜'\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : InnerProductSpace 𝕜' E''\ninst✝³ : CompleteSpace E''\ninst✝² : NormedSpace ℝ E''\ninst✝¹ : NormedSpace ℝ G\nhm✝ hm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx : G\n⊢ Integrable ↑↑(condexpIndSMul hm hs hμs x)\n[PROOFSTEP]\nrefine' integrable_of_forall_fin_meas_le' hm (μ s * ‖x‖₊) (ENNReal.mul_lt_top hμs ENNReal.coe_ne_top) _ _\n[GOAL]\ncase refine'_1\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝²⁰ : IsROrC 𝕜\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : InnerProductSpace 𝕜 E\ninst✝¹⁷ : CompleteSpace E\ninst✝¹⁶ : NormedAddCommGroup E'\ninst✝¹⁵ : InnerProductSpace 𝕜 E'\ninst✝¹⁴ : CompleteSpace E'\ninst✝¹³ : NormedSpace ℝ E'\ninst✝¹² : NormedAddCommGroup F\ninst✝¹¹ : NormedSpace 𝕜 F\ninst✝¹⁰ : NormedAddCommGroup G\ninst✝⁹ : NormedAddCommGroup G'\ninst✝⁸ : NormedSpace ℝ G'\ninst✝⁷ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nE'' : Type u_8\n𝕜' : Type u_9\ninst✝⁶ : IsROrC 𝕜'\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : InnerProductSpace 𝕜' E''\ninst✝³ : CompleteSpace E''\ninst✝² : NormedSpace ℝ E''\ninst✝¹ : NormedSpace ℝ G\nhm✝ hm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx : G\n⊢ AEStronglyMeasurable (↑↑(condexpIndSMul hm hs hμs x)) μ\n[PROOFSTEP]\nexact Lp.aestronglyMeasurable _\n[GOAL]\ncase refine'_2\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝²⁰ : IsROrC 𝕜\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : InnerProductSpace 𝕜 E\ninst✝¹⁷ : CompleteSpace E\ninst✝¹⁶ : NormedAddCommGroup E'\ninst✝¹⁵ : InnerProductSpace 𝕜 E'\ninst✝¹⁴ : CompleteSpace E'\ninst✝¹³ : NormedSpace ℝ E'\ninst✝¹² : NormedAddCommGroup F\ninst✝¹¹ : NormedSpace 𝕜 F\ninst✝¹⁰ : NormedAddCommGroup G\ninst✝⁹ : NormedAddCommGroup G'\ninst✝⁸ : NormedSpace ℝ G'\ninst✝⁷ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nE'' : Type u_8\n𝕜' : Type u_9\ninst✝⁶ : IsROrC 𝕜'\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : InnerProductSpace 𝕜' E''\ninst✝³ : CompleteSpace E''\ninst✝² : NormedSpace ℝ E''\ninst✝¹ : NormedSpace ℝ G\nhm✝ hm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx : G\n⊢ ∀ (s_1 : Set α),\n    MeasurableSet s_1 → ↑↑μ s_1 ≠ ⊤ → ∫⁻ (x_1 : α) in s_1, ↑‖↑↑(condexpIndSMul hm hs hμs x) x_1‖₊ ∂μ ≤ ↑↑μ s * ↑‖x‖₊\n[PROOFSTEP]\nrefine' fun t ht hμt => (set_lintegral_nnnorm_condexpIndSMul_le hm hs hμs x ht hμt).trans _\n[GOAL]\ncase refine'_2\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝²⁰ : IsROrC 𝕜\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : InnerProductSpace 𝕜 E\ninst✝¹⁷ : CompleteSpace E\ninst✝¹⁶ : NormedAddCommGroup E'\ninst✝¹⁵ : InnerProductSpace 𝕜 E'\ninst✝¹⁴ : CompleteSpace E'\ninst✝¹³ : NormedSpace ℝ E'\ninst✝¹² : NormedAddCommGroup F\ninst✝¹¹ : NormedSpace 𝕜 F\ninst✝¹⁰ : NormedAddCommGroup G\ninst✝⁹ : NormedAddCommGroup G'\ninst✝⁸ : NormedSpace ℝ G'\ninst✝⁷ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t✝ : Set α\nE'' : Type u_8\n𝕜' : Type u_9\ninst✝⁶ : IsROrC 𝕜'\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : InnerProductSpace 𝕜' E''\ninst✝³ : CompleteSpace E''\ninst✝² : NormedSpace ℝ E''\ninst✝¹ : NormedSpace ℝ G\nhm✝ hm : m ≤ m0\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx : G\nt : Set α\nht : MeasurableSet t\nhμt : ↑↑μ t ≠ ⊤\n⊢ ↑↑μ (s ∩ t) * ↑‖x‖₊ ≤ ↑↑μ s * ↑‖x‖₊\n[PROOFSTEP]\nexact mul_le_mul_right' (measure_mono (Set.inter_subset_left _ _)) _\n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹⁹ : IsROrC 𝕜\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : InnerProductSpace 𝕜 E\ninst✝¹⁶ : CompleteSpace E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : InnerProductSpace 𝕜 E'\ninst✝¹³ : CompleteSpace E'\ninst✝¹² : NormedSpace ℝ E'\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedAddCommGroup G'\ninst✝⁷ : NormedSpace ℝ G'\ninst✝⁶ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nE'' : Type u_8\n𝕜' : Type u_9\ninst✝⁵ : IsROrC 𝕜'\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : InnerProductSpace 𝕜' E''\ninst✝² : CompleteSpace E''\ninst✝¹ : NormedSpace ℝ E''\ninst✝ : NormedSpace ℝ G\nhm : m ≤ m0\nx : G\n⊢ condexpIndSMul hm (_ : MeasurableSet ∅) (_ : ↑↑μ ∅ ≠ ⊤) x = 0\n[PROOFSTEP]\nrw [condexpIndSMul, indicatorConstLp_empty]\n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹⁹ : IsROrC 𝕜\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : InnerProductSpace 𝕜 E\ninst✝¹⁶ : CompleteSpace E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : InnerProductSpace 𝕜 E'\ninst✝¹³ : CompleteSpace E'\ninst✝¹² : NormedSpace ℝ E'\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedAddCommGroup G'\ninst✝⁷ : NormedSpace ℝ G'\ninst✝⁶ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nE'' : Type u_8\n𝕜' : Type u_9\ninst✝⁵ : IsROrC 𝕜'\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : InnerProductSpace 𝕜' E''\ninst✝² : CompleteSpace E''\ninst✝¹ : NormedSpace ℝ E''\ninst✝ : NormedSpace ℝ G\nhm : m ≤ m0\nx : G\n⊢ ↑(compLpL 2 μ (toSpanSingleton ℝ x)) ↑(↑(condexpL2 ℝ ℝ hm) 0) = 0\n[PROOFSTEP]\nsimp only [Submodule.coe_zero, ContinuousLinearMap.map_zero]\n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹⁹ : IsROrC 𝕜\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : InnerProductSpace 𝕜 E\ninst✝¹⁶ : CompleteSpace E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : InnerProductSpace 𝕜 E'\ninst✝¹³ : CompleteSpace E'\ninst✝¹² : NormedSpace ℝ E'\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedAddCommGroup G'\ninst✝⁷ : NormedSpace ℝ G'\ninst✝⁶ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nE'' : Type u_8\n𝕜' : Type u_9\ninst✝⁵ : IsROrC 𝕜'\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : InnerProductSpace 𝕜' E''\ninst✝² : CompleteSpace E''\ninst✝¹ : NormedSpace ℝ E''\ninst✝ : NormedSpace ℝ G\nhm : m ≤ m0\nhs : MeasurableSet s\nht : MeasurableSet t\nhμs : ↑↑μ s ≠ ⊤\nhμt : ↑↑μ t ≠ ⊤\n⊢ ENNReal.toReal (↑↑μ (t ∩ s)) • 1 = ENNReal.toReal (↑↑μ (t ∩ s))\n[PROOFSTEP]\nrw [smul_eq_mul, mul_one]\n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝¹⁹ : IsROrC 𝕜\ninst✝¹⁸ : NormedAddCommGroup E\ninst✝¹⁷ : InnerProductSpace 𝕜 E\ninst✝¹⁶ : CompleteSpace E\ninst✝¹⁵ : NormedAddCommGroup E'\ninst✝¹⁴ : InnerProductSpace 𝕜 E'\ninst✝¹³ : CompleteSpace E'\ninst✝¹² : NormedSpace ℝ E'\ninst✝¹¹ : NormedAddCommGroup F\ninst✝¹⁰ : NormedSpace 𝕜 F\ninst✝⁹ : NormedAddCommGroup G\ninst✝⁸ : NormedAddCommGroup G'\ninst✝⁷ : NormedSpace ℝ G'\ninst✝⁶ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nE'' : Type u_8\n𝕜' : Type u_9\ninst✝⁵ : IsROrC 𝕜'\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : InnerProductSpace 𝕜' E''\ninst✝² : CompleteSpace E''\ninst✝¹ : NormedSpace ℝ E''\ninst✝ : NormedSpace ℝ G\nhm : m ≤ m0\nhs : MeasurableSet s\nht : MeasurableSet t\nhμs : ↑↑μ s ≠ ⊤\nhμt : ↑↑μ t ≠ ⊤\nx : G'\n⊢ (∫ (a : α) in s, ↑↑↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 ht hμt 1)) a ∂μ) • x = ENNReal.toReal (↑↑μ (t ∩ s)) • x\n[PROOFSTEP]\nrw [set_integral_condexpL2_indicator hs ht hμs hμt]\n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝²⁰ : IsROrC 𝕜\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : InnerProductSpace 𝕜 E\ninst✝¹⁷ : CompleteSpace E\ninst✝¹⁶ : NormedAddCommGroup E'\ninst✝¹⁵ : InnerProductSpace 𝕜 E'\ninst✝¹⁴ : CompleteSpace E'\ninst✝¹³ : NormedSpace ℝ E'\ninst✝¹² : NormedAddCommGroup F\ninst✝¹¹ : NormedSpace 𝕜 F\ninst✝¹⁰ : NormedAddCommGroup G\ninst✝⁹ : NormedAddCommGroup G'\ninst✝⁸ : NormedSpace ℝ G'\ninst✝⁷ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nE'' : Type u_8\n𝕜' : Type u_9\ninst✝⁶ : IsROrC 𝕜'\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : InnerProductSpace 𝕜' E''\ninst✝³ : CompleteSpace E''\ninst✝² : NormedSpace ℝ E''\ninst✝¹ : NormedSpace ℝ G\nhm✝ hm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\ninst✝ : SigmaFinite (Measure.trim μ hm)\n⊢ 0 ≤ᵐ[μ] ↑↑↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1))\n[PROOFSTEP]\nhave h : AEStronglyMeasurable' m (condexpL2 ℝ ℝ hm (indicatorConstLp 2 hs hμs 1) : α → ℝ) μ :=\n  aeStronglyMeasurable'_condexpL2 _ _\n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝²⁰ : IsROrC 𝕜\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : InnerProductSpace 𝕜 E\ninst✝¹⁷ : CompleteSpace E\ninst✝¹⁶ : NormedAddCommGroup E'\ninst✝¹⁵ : InnerProductSpace 𝕜 E'\ninst✝¹⁴ : CompleteSpace E'\ninst✝¹³ : NormedSpace ℝ E'\ninst✝¹² : NormedAddCommGroup F\ninst✝¹¹ : NormedSpace 𝕜 F\ninst✝¹⁰ : NormedAddCommGroup G\ninst✝⁹ : NormedAddCommGroup G'\ninst✝⁸ : NormedSpace ℝ G'\ninst✝⁷ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nE'' : Type u_8\n𝕜' : Type u_9\ninst✝⁶ : IsROrC 𝕜'\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : InnerProductSpace 𝕜' E''\ninst✝³ : CompleteSpace E''\ninst✝² : NormedSpace ℝ E''\ninst✝¹ : NormedSpace ℝ G\nhm✝ hm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\ninst✝ : SigmaFinite (Measure.trim μ hm)\nh : AEStronglyMeasurable' m (↑↑↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1))) μ\n⊢ 0 ≤ᵐ[μ] ↑↑↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1))\n[PROOFSTEP]\nrefine' EventuallyLE.trans_eq _ h.ae_eq_mk.symm\n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝²⁰ : IsROrC 𝕜\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : InnerProductSpace 𝕜 E\ninst✝¹⁷ : CompleteSpace E\ninst✝¹⁶ : NormedAddCommGroup E'\ninst✝¹⁵ : InnerProductSpace 𝕜 E'\ninst✝¹⁴ : CompleteSpace E'\ninst✝¹³ : NormedSpace ℝ E'\ninst✝¹² : NormedAddCommGroup F\ninst✝¹¹ : NormedSpace 𝕜 F\ninst✝¹⁰ : NormedAddCommGroup G\ninst✝⁹ : NormedAddCommGroup G'\ninst✝⁸ : NormedSpace ℝ G'\ninst✝⁷ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nE'' : Type u_8\n𝕜' : Type u_9\ninst✝⁶ : IsROrC 𝕜'\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : InnerProductSpace 𝕜' E''\ninst✝³ : CompleteSpace E''\ninst✝² : NormedSpace ℝ E''\ninst✝¹ : NormedSpace ℝ G\nhm✝ hm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\ninst✝ : SigmaFinite (Measure.trim μ hm)\nh : AEStronglyMeasurable' m (↑↑↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1))) μ\n⊢ 0 ≤ᵐ[μ] AEStronglyMeasurable'.mk (↑↑↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1))) h\n[PROOFSTEP]\nrefine' @ae_le_of_ae_le_trim _ _ _ _ _ _ hm (0 : α → ℝ) _ _\n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝²⁰ : IsROrC 𝕜\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : InnerProductSpace 𝕜 E\ninst✝¹⁷ : CompleteSpace E\ninst✝¹⁶ : NormedAddCommGroup E'\ninst✝¹⁵ : InnerProductSpace 𝕜 E'\ninst✝¹⁴ : CompleteSpace E'\ninst✝¹³ : NormedSpace ℝ E'\ninst✝¹² : NormedAddCommGroup F\ninst✝¹¹ : NormedSpace 𝕜 F\ninst✝¹⁰ : NormedAddCommGroup G\ninst✝⁹ : NormedAddCommGroup G'\ninst✝⁸ : NormedSpace ℝ G'\ninst✝⁷ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nE'' : Type u_8\n𝕜' : Type u_9\ninst✝⁶ : IsROrC 𝕜'\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : InnerProductSpace 𝕜' E''\ninst✝³ : CompleteSpace E''\ninst✝² : NormedSpace ℝ E''\ninst✝¹ : NormedSpace ℝ G\nhm✝ hm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\ninst✝ : SigmaFinite (Measure.trim μ hm)\nh : AEStronglyMeasurable' m (↑↑↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1))) μ\n⊢ 0 ≤ᵐ[Measure.trim μ hm] AEStronglyMeasurable'.mk (↑↑↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1))) h\n[PROOFSTEP]\nrefine' ae_nonneg_of_forall_set_integral_nonneg_of_sigmaFinite _ _\n[GOAL]\ncase refine'_1\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝²⁰ : IsROrC 𝕜\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : InnerProductSpace 𝕜 E\ninst✝¹⁷ : CompleteSpace E\ninst✝¹⁶ : NormedAddCommGroup E'\ninst✝¹⁵ : InnerProductSpace 𝕜 E'\ninst✝¹⁴ : CompleteSpace E'\ninst✝¹³ : NormedSpace ℝ E'\ninst✝¹² : NormedAddCommGroup F\ninst✝¹¹ : NormedSpace 𝕜 F\ninst✝¹⁰ : NormedAddCommGroup G\ninst✝⁹ : NormedAddCommGroup G'\ninst✝⁸ : NormedSpace ℝ G'\ninst✝⁷ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nE'' : Type u_8\n𝕜' : Type u_9\ninst✝⁶ : IsROrC 𝕜'\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : InnerProductSpace 𝕜' E''\ninst✝³ : CompleteSpace E''\ninst✝² : NormedSpace ℝ E''\ninst✝¹ : NormedSpace ℝ G\nhm✝ hm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\ninst✝ : SigmaFinite (Measure.trim μ hm)\nh : AEStronglyMeasurable' m (↑↑↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1))) μ\n⊢ ∀ (s_1 : Set α),\n    MeasurableSet s_1 →\n      ↑↑(Measure.trim μ hm) s_1 < ⊤ →\n        IntegrableOn (AEStronglyMeasurable'.mk (↑↑↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1))) h) s_1\n[PROOFSTEP]\nrintro t - -\n[GOAL]\ncase refine'_1\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝²⁰ : IsROrC 𝕜\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : InnerProductSpace 𝕜 E\ninst✝¹⁷ : CompleteSpace E\ninst✝¹⁶ : NormedAddCommGroup E'\ninst✝¹⁵ : InnerProductSpace 𝕜 E'\ninst✝¹⁴ : CompleteSpace E'\ninst✝¹³ : NormedSpace ℝ E'\ninst✝¹² : NormedAddCommGroup F\ninst✝¹¹ : NormedSpace 𝕜 F\ninst✝¹⁰ : NormedAddCommGroup G\ninst✝⁹ : NormedAddCommGroup G'\ninst✝⁸ : NormedSpace ℝ G'\ninst✝⁷ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t✝ : Set α\nE'' : Type u_8\n𝕜' : Type u_9\ninst✝⁶ : IsROrC 𝕜'\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : InnerProductSpace 𝕜' E''\ninst✝³ : CompleteSpace E''\ninst✝² : NormedSpace ℝ E''\ninst✝¹ : NormedSpace ℝ G\nhm✝ hm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\ninst✝ : SigmaFinite (Measure.trim μ hm)\nh : AEStronglyMeasurable' m (↑↑↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1))) μ\nt : Set α\n⊢ IntegrableOn (AEStronglyMeasurable'.mk (↑↑↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1))) h) t\n[PROOFSTEP]\nrefine @Integrable.integrableOn _ _ m _ _ _ _ ?_\n[GOAL]\ncase refine'_1\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝²⁰ : IsROrC 𝕜\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : InnerProductSpace 𝕜 E\ninst✝¹⁷ : CompleteSpace E\ninst✝¹⁶ : NormedAddCommGroup E'\ninst✝¹⁵ : InnerProductSpace 𝕜 E'\ninst✝¹⁴ : CompleteSpace E'\ninst✝¹³ : NormedSpace ℝ E'\ninst✝¹² : NormedAddCommGroup F\ninst✝¹¹ : NormedSpace 𝕜 F\ninst✝¹⁰ : NormedAddCommGroup G\ninst✝⁹ : NormedAddCommGroup G'\ninst✝⁸ : NormedSpace ℝ G'\ninst✝⁷ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t✝ : Set α\nE'' : Type u_8\n𝕜' : Type u_9\ninst✝⁶ : IsROrC 𝕜'\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : InnerProductSpace 𝕜' E''\ninst✝³ : CompleteSpace E''\ninst✝² : NormedSpace ℝ E''\ninst✝¹ : NormedSpace ℝ G\nhm✝ hm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\ninst✝ : SigmaFinite (Measure.trim μ hm)\nh : AEStronglyMeasurable' m (↑↑↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1))) μ\nt : Set α\n⊢ Integrable (AEStronglyMeasurable'.mk (↑↑↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1))) h)\n[PROOFSTEP]\nrefine' Integrable.trim hm _ _\n[GOAL]\ncase refine'_1.refine'_1\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝²⁰ : IsROrC 𝕜\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : InnerProductSpace 𝕜 E\ninst✝¹⁷ : CompleteSpace E\ninst✝¹⁶ : NormedAddCommGroup E'\ninst✝¹⁵ : InnerProductSpace 𝕜 E'\ninst✝¹⁴ : CompleteSpace E'\ninst✝¹³ : NormedSpace ℝ E'\ninst✝¹² : NormedAddCommGroup F\ninst✝¹¹ : NormedSpace 𝕜 F\ninst✝¹⁰ : NormedAddCommGroup G\ninst✝⁹ : NormedAddCommGroup G'\ninst✝⁸ : NormedSpace ℝ G'\ninst✝⁷ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t✝ : Set α\nE'' : Type u_8\n𝕜' : Type u_9\ninst✝⁶ : IsROrC 𝕜'\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : InnerProductSpace 𝕜' E''\ninst✝³ : CompleteSpace E''\ninst✝² : NormedSpace ℝ E''\ninst✝¹ : NormedSpace ℝ G\nhm✝ hm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\ninst✝ : SigmaFinite (Measure.trim μ hm)\nh : AEStronglyMeasurable' m (↑↑↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1))) μ\nt : Set α\n⊢ Integrable (AEStronglyMeasurable'.mk (↑↑↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1))) h)\n[PROOFSTEP]\nrw [integrable_congr h.ae_eq_mk.symm]\n[GOAL]\ncase refine'_1.refine'_1\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝²⁰ : IsROrC 𝕜\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : InnerProductSpace 𝕜 E\ninst✝¹⁷ : CompleteSpace E\ninst✝¹⁶ : NormedAddCommGroup E'\ninst✝¹⁵ : InnerProductSpace 𝕜 E'\ninst✝¹⁴ : CompleteSpace E'\ninst✝¹³ : NormedSpace ℝ E'\ninst✝¹² : NormedAddCommGroup F\ninst✝¹¹ : NormedSpace 𝕜 F\ninst✝¹⁰ : NormedAddCommGroup G\ninst✝⁹ : NormedAddCommGroup G'\ninst✝⁸ : NormedSpace ℝ G'\ninst✝⁷ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t✝ : Set α\nE'' : Type u_8\n𝕜' : Type u_9\ninst✝⁶ : IsROrC 𝕜'\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : InnerProductSpace 𝕜' E''\ninst✝³ : CompleteSpace E''\ninst✝² : NormedSpace ℝ E''\ninst✝¹ : NormedSpace ℝ G\nhm✝ hm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\ninst✝ : SigmaFinite (Measure.trim μ hm)\nh : AEStronglyMeasurable' m (↑↑↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1))) μ\nt : Set α\n⊢ Integrable ↑↑↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1))\n[PROOFSTEP]\nexact integrable_condexpL2_indicator hm hs hμs _\n[GOAL]\ncase refine'_1.refine'_2\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝²⁰ : IsROrC 𝕜\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : InnerProductSpace 𝕜 E\ninst✝¹⁷ : CompleteSpace E\ninst✝¹⁶ : NormedAddCommGroup E'\ninst✝¹⁵ : InnerProductSpace 𝕜 E'\ninst✝¹⁴ : CompleteSpace E'\ninst✝¹³ : NormedSpace ℝ E'\ninst✝¹² : NormedAddCommGroup F\ninst✝¹¹ : NormedSpace 𝕜 F\ninst✝¹⁰ : NormedAddCommGroup G\ninst✝⁹ : NormedAddCommGroup G'\ninst✝⁸ : NormedSpace ℝ G'\ninst✝⁷ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t✝ : Set α\nE'' : Type u_8\n𝕜' : Type u_9\ninst✝⁶ : IsROrC 𝕜'\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : InnerProductSpace 𝕜' E''\ninst✝³ : CompleteSpace E''\ninst✝² : NormedSpace ℝ E''\ninst✝¹ : NormedSpace ℝ G\nhm✝ hm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\ninst✝ : SigmaFinite (Measure.trim μ hm)\nh : AEStronglyMeasurable' m (↑↑↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1))) μ\nt : Set α\n⊢ StronglyMeasurable (AEStronglyMeasurable'.mk (↑↑↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1))) h)\n[PROOFSTEP]\nexact h.stronglyMeasurable_mk\n[GOAL]\ncase refine'_2\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝²⁰ : IsROrC 𝕜\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : InnerProductSpace 𝕜 E\ninst✝¹⁷ : CompleteSpace E\ninst✝¹⁶ : NormedAddCommGroup E'\ninst✝¹⁵ : InnerProductSpace 𝕜 E'\ninst✝¹⁴ : CompleteSpace E'\ninst✝¹³ : NormedSpace ℝ E'\ninst✝¹² : NormedAddCommGroup F\ninst✝¹¹ : NormedSpace 𝕜 F\ninst✝¹⁰ : NormedAddCommGroup G\ninst✝⁹ : NormedAddCommGroup G'\ninst✝⁸ : NormedSpace ℝ G'\ninst✝⁷ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nE'' : Type u_8\n𝕜' : Type u_9\ninst✝⁶ : IsROrC 𝕜'\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : InnerProductSpace 𝕜' E''\ninst✝³ : CompleteSpace E''\ninst✝² : NormedSpace ℝ E''\ninst✝¹ : NormedSpace ℝ G\nhm✝ hm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\ninst✝ : SigmaFinite (Measure.trim μ hm)\nh : AEStronglyMeasurable' m (↑↑↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1))) μ\n⊢ ∀ (s_1 : Set α),\n    MeasurableSet s_1 →\n      ↑↑(Measure.trim μ hm) s_1 < ⊤ →\n        0 ≤\n          ∫ (x : α) in s_1,\n            AEStronglyMeasurable'.mk (↑↑↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1))) h x ∂Measure.trim μ hm\n[PROOFSTEP]\nintro t ht hμt\n[GOAL]\ncase refine'_2\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝²⁰ : IsROrC 𝕜\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : InnerProductSpace 𝕜 E\ninst✝¹⁷ : CompleteSpace E\ninst✝¹⁶ : NormedAddCommGroup E'\ninst✝¹⁵ : InnerProductSpace 𝕜 E'\ninst✝¹⁴ : CompleteSpace E'\ninst✝¹³ : NormedSpace ℝ E'\ninst✝¹² : NormedAddCommGroup F\ninst✝¹¹ : NormedSpace 𝕜 F\ninst✝¹⁰ : NormedAddCommGroup G\ninst✝⁹ : NormedAddCommGroup G'\ninst✝⁸ : NormedSpace ℝ G'\ninst✝⁷ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t✝ : Set α\nE'' : Type u_8\n𝕜' : Type u_9\ninst✝⁶ : IsROrC 𝕜'\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : InnerProductSpace 𝕜' E''\ninst✝³ : CompleteSpace E''\ninst✝² : NormedSpace ℝ E''\ninst✝¹ : NormedSpace ℝ G\nhm✝ hm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\ninst✝ : SigmaFinite (Measure.trim μ hm)\nh : AEStronglyMeasurable' m (↑↑↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1))) μ\nt : Set α\nht : MeasurableSet t\nhμt : ↑↑(Measure.trim μ hm) t < ⊤\n⊢ 0 ≤\n    ∫ (x : α) in t,\n      AEStronglyMeasurable'.mk (↑↑↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1))) h x ∂Measure.trim μ hm\n[PROOFSTEP]\nrw [← set_integral_trim hm h.stronglyMeasurable_mk ht]\n[GOAL]\ncase refine'_2\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝²⁰ : IsROrC 𝕜\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : InnerProductSpace 𝕜 E\ninst✝¹⁷ : CompleteSpace E\ninst✝¹⁶ : NormedAddCommGroup E'\ninst✝¹⁵ : InnerProductSpace 𝕜 E'\ninst✝¹⁴ : CompleteSpace E'\ninst✝¹³ : NormedSpace ℝ E'\ninst✝¹² : NormedAddCommGroup F\ninst✝¹¹ : NormedSpace 𝕜 F\ninst✝¹⁰ : NormedAddCommGroup G\ninst✝⁹ : NormedAddCommGroup G'\ninst✝⁸ : NormedSpace ℝ G'\ninst✝⁷ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t✝ : Set α\nE'' : Type u_8\n𝕜' : Type u_9\ninst✝⁶ : IsROrC 𝕜'\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : InnerProductSpace 𝕜' E''\ninst✝³ : CompleteSpace E''\ninst✝² : NormedSpace ℝ E''\ninst✝¹ : NormedSpace ℝ G\nhm✝ hm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\ninst✝ : SigmaFinite (Measure.trim μ hm)\nh : AEStronglyMeasurable' m (↑↑↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1))) μ\nt : Set α\nht : MeasurableSet t\nhμt : ↑↑(Measure.trim μ hm) t < ⊤\n⊢ 0 ≤ ∫ (x : α) in t, AEStronglyMeasurable'.mk (↑↑↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1))) h x ∂μ\n[PROOFSTEP]\nhave h_ae : ∀ᵐ x ∂μ, x ∈ t → h.mk _ x = (condexpL2 ℝ ℝ hm (indicatorConstLp 2 hs hμs 1) : α → ℝ) x :=\n  by\n  filter_upwards [h.ae_eq_mk] with x hx\n  exact fun _ => hx.symm\n[GOAL]\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝²⁰ : IsROrC 𝕜\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : InnerProductSpace 𝕜 E\ninst✝¹⁷ : CompleteSpace E\ninst✝¹⁶ : NormedAddCommGroup E'\ninst✝¹⁵ : InnerProductSpace 𝕜 E'\ninst✝¹⁴ : CompleteSpace E'\ninst✝¹³ : NormedSpace ℝ E'\ninst✝¹² : NormedAddCommGroup F\ninst✝¹¹ : NormedSpace 𝕜 F\ninst✝¹⁰ : NormedAddCommGroup G\ninst✝⁹ : NormedAddCommGroup G'\ninst✝⁸ : NormedSpace ℝ G'\ninst✝⁷ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t✝ : Set α\nE'' : Type u_8\n𝕜' : Type u_9\ninst✝⁶ : IsROrC 𝕜'\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : InnerProductSpace 𝕜' E''\ninst✝³ : CompleteSpace E''\ninst✝² : NormedSpace ℝ E''\ninst✝¹ : NormedSpace ℝ G\nhm✝ hm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\ninst✝ : SigmaFinite (Measure.trim μ hm)\nh : AEStronglyMeasurable' m (↑↑↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1))) μ\nt : Set α\nht : MeasurableSet t\nhμt : ↑↑(Measure.trim μ hm) t < ⊤\n⊢ ∀ᵐ (x : α) ∂μ,\n    x ∈ t →\n      AEStronglyMeasurable'.mk (↑↑↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1))) h x =\n        ↑↑↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1)) x\n[PROOFSTEP]\nfilter_upwards [h.ae_eq_mk] with x hx\n[GOAL]\ncase h\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝²⁰ : IsROrC 𝕜\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : InnerProductSpace 𝕜 E\ninst✝¹⁷ : CompleteSpace E\ninst✝¹⁶ : NormedAddCommGroup E'\ninst✝¹⁵ : InnerProductSpace 𝕜 E'\ninst✝¹⁴ : CompleteSpace E'\ninst✝¹³ : NormedSpace ℝ E'\ninst✝¹² : NormedAddCommGroup F\ninst✝¹¹ : NormedSpace 𝕜 F\ninst✝¹⁰ : NormedAddCommGroup G\ninst✝⁹ : NormedAddCommGroup G'\ninst✝⁸ : NormedSpace ℝ G'\ninst✝⁷ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t✝ : Set α\nE'' : Type u_8\n𝕜' : Type u_9\ninst✝⁶ : IsROrC 𝕜'\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : InnerProductSpace 𝕜' E''\ninst✝³ : CompleteSpace E''\ninst✝² : NormedSpace ℝ E''\ninst✝¹ : NormedSpace ℝ G\nhm✝ hm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\ninst✝ : SigmaFinite (Measure.trim μ hm)\nh : AEStronglyMeasurable' m (↑↑↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1))) μ\nt : Set α\nht : MeasurableSet t\nhμt : ↑↑(Measure.trim μ hm) t < ⊤\nx : α\nhx :\n  ↑↑↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1)) x =\n    AEStronglyMeasurable'.mk (↑↑↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1))) h x\n⊢ x ∈ t →\n    AEStronglyMeasurable'.mk (↑↑↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1))) h x =\n      ↑↑↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1)) x\n[PROOFSTEP]\nexact fun _ => hx.symm\n[GOAL]\ncase refine'_2\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝²⁰ : IsROrC 𝕜\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : InnerProductSpace 𝕜 E\ninst✝¹⁷ : CompleteSpace E\ninst✝¹⁶ : NormedAddCommGroup E'\ninst✝¹⁵ : InnerProductSpace 𝕜 E'\ninst✝¹⁴ : CompleteSpace E'\ninst✝¹³ : NormedSpace ℝ E'\ninst✝¹² : NormedAddCommGroup F\ninst✝¹¹ : NormedSpace 𝕜 F\ninst✝¹⁰ : NormedAddCommGroup G\ninst✝⁹ : NormedAddCommGroup G'\ninst✝⁸ : NormedSpace ℝ G'\ninst✝⁷ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t✝ : Set α\nE'' : Type u_8\n𝕜' : Type u_9\ninst✝⁶ : IsROrC 𝕜'\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : InnerProductSpace 𝕜' E''\ninst✝³ : CompleteSpace E''\ninst✝² : NormedSpace ℝ E''\ninst✝¹ : NormedSpace ℝ G\nhm✝ hm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\ninst✝ : SigmaFinite (Measure.trim μ hm)\nh : AEStronglyMeasurable' m (↑↑↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1))) μ\nt : Set α\nht : MeasurableSet t\nhμt : ↑↑(Measure.trim μ hm) t < ⊤\nh_ae :\n  ∀ᵐ (x : α) ∂μ,\n    x ∈ t →\n      AEStronglyMeasurable'.mk (↑↑↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1))) h x =\n        ↑↑↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1)) x\n⊢ 0 ≤ ∫ (x : α) in t, AEStronglyMeasurable'.mk (↑↑↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1))) h x ∂μ\n[PROOFSTEP]\nrw [set_integral_congr_ae (hm t ht) h_ae, set_integral_condexpL2_indicator ht hs ((le_trim hm).trans_lt hμt).ne hμs]\n[GOAL]\ncase refine'_2\nα : Type u_1\nE : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝²⁰ : IsROrC 𝕜\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : InnerProductSpace 𝕜 E\ninst✝¹⁷ : CompleteSpace E\ninst✝¹⁶ : NormedAddCommGroup E'\ninst✝¹⁵ : InnerProductSpace 𝕜 E'\ninst✝¹⁴ : CompleteSpace E'\ninst✝¹³ : NormedSpace ℝ E'\ninst✝¹² : NormedAddCommGroup F\ninst✝¹¹ : NormedSpace 𝕜 F\ninst✝¹⁰ : NormedAddCommGroup G\ninst✝⁹ : NormedAddCommGroup G'\ninst✝⁸ : NormedSpace ℝ G'\ninst✝⁷ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t✝ : Set α\nE'' : Type u_8\n𝕜' : Type u_9\ninst✝⁶ : IsROrC 𝕜'\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : InnerProductSpace 𝕜' E''\ninst✝³ : CompleteSpace E''\ninst✝² : NormedSpace ℝ E''\ninst✝¹ : NormedSpace ℝ G\nhm✝ hm : m ≤ m0\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\ninst✝ : SigmaFinite (Measure.trim μ hm)\nh : AEStronglyMeasurable' m (↑↑↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1))) μ\nt : Set α\nht : MeasurableSet t\nhμt : ↑↑(Measure.trim μ hm) t < ⊤\nh_ae :\n  ∀ᵐ (x : α) ∂μ,\n    x ∈ t →\n      AEStronglyMeasurable'.mk (↑↑↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1))) h x =\n        ↑↑↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1)) x\n⊢ 0 ≤ ENNReal.toReal (↑↑μ (s ∩ t))\n[PROOFSTEP]\nexact ENNReal.toReal_nonneg\n[GOAL]\nα : Type u_1\nE✝ : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝²³ : IsROrC 𝕜\ninst✝²² : NormedAddCommGroup E✝\ninst✝²¹ : InnerProductSpace 𝕜 E✝\ninst✝²⁰ : CompleteSpace E✝\ninst✝¹⁹ : NormedAddCommGroup E'\ninst✝¹⁸ : InnerProductSpace 𝕜 E'\ninst✝¹⁷ : CompleteSpace E'\ninst✝¹⁶ : NormedSpace ℝ E'\ninst✝¹⁵ : NormedAddCommGroup F\ninst✝¹⁴ : NormedSpace 𝕜 F\ninst✝¹³ : NormedAddCommGroup G\ninst✝¹² : NormedAddCommGroup G'\ninst✝¹¹ : NormedSpace ℝ G'\ninst✝¹⁰ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nE'' : Type u_8\n𝕜' : Type u_9\ninst✝⁹ : IsROrC 𝕜'\ninst✝⁸ : NormedAddCommGroup E''\ninst✝⁷ : InnerProductSpace 𝕜' E''\ninst✝⁶ : CompleteSpace E''\ninst✝⁵ : NormedSpace ℝ E''\ninst✝⁴ : NormedSpace ℝ G\nhm : m ≤ m0\nE : Type u_10\ninst✝³ : NormedLatticeAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : OrderedSMul ℝ E\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx : E\nhx : 0 ≤ x\n⊢ 0 ≤ᵐ[μ] ↑↑(condexpIndSMul hm hs hμs x)\n[PROOFSTEP]\nrefine' EventuallyLE.trans_eq _ (condexpIndSMul_ae_eq_smul hm hs hμs x).symm\n[GOAL]\nα : Type u_1\nE✝ : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝²³ : IsROrC 𝕜\ninst✝²² : NormedAddCommGroup E✝\ninst✝²¹ : InnerProductSpace 𝕜 E✝\ninst✝²⁰ : CompleteSpace E✝\ninst✝¹⁹ : NormedAddCommGroup E'\ninst✝¹⁸ : InnerProductSpace 𝕜 E'\ninst✝¹⁷ : CompleteSpace E'\ninst✝¹⁶ : NormedSpace ℝ E'\ninst✝¹⁵ : NormedAddCommGroup F\ninst✝¹⁴ : NormedSpace 𝕜 F\ninst✝¹³ : NormedAddCommGroup G\ninst✝¹² : NormedAddCommGroup G'\ninst✝¹¹ : NormedSpace ℝ G'\ninst✝¹⁰ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nE'' : Type u_8\n𝕜' : Type u_9\ninst✝⁹ : IsROrC 𝕜'\ninst✝⁸ : NormedAddCommGroup E''\ninst✝⁷ : InnerProductSpace 𝕜' E''\ninst✝⁶ : CompleteSpace E''\ninst✝⁵ : NormedSpace ℝ E''\ninst✝⁴ : NormedSpace ℝ G\nhm : m ≤ m0\nE : Type u_10\ninst✝³ : NormedLatticeAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : OrderedSMul ℝ E\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx : E\nhx : 0 ≤ x\n⊢ 0 ≤ᵐ[μ] fun a => ↑↑↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1)) a • x\n[PROOFSTEP]\nfilter_upwards [condexpL2_indicator_nonneg hm hs hμs] with a ha\n[GOAL]\ncase h\nα : Type u_1\nE✝ : Type u_2\nE' : Type u_3\nF : Type u_4\nG : Type u_5\nG' : Type u_6\n𝕜 : Type u_7\np : ℝ≥0∞\ninst✝²³ : IsROrC 𝕜\ninst✝²² : NormedAddCommGroup E✝\ninst✝²¹ : InnerProductSpace 𝕜 E✝\ninst✝²⁰ : CompleteSpace E✝\ninst✝¹⁹ : NormedAddCommGroup E'\ninst✝¹⁸ : InnerProductSpace 𝕜 E'\ninst✝¹⁷ : CompleteSpace E'\ninst✝¹⁶ : NormedSpace ℝ E'\ninst✝¹⁵ : NormedAddCommGroup F\ninst✝¹⁴ : NormedSpace 𝕜 F\ninst✝¹³ : NormedAddCommGroup G\ninst✝¹² : NormedAddCommGroup G'\ninst✝¹¹ : NormedSpace ℝ G'\ninst✝¹⁰ : CompleteSpace G'\nm m0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nE'' : Type u_8\n𝕜' : Type u_9\ninst✝⁹ : IsROrC 𝕜'\ninst✝⁸ : NormedAddCommGroup E''\ninst✝⁷ : InnerProductSpace 𝕜' E''\ninst✝⁶ : CompleteSpace E''\ninst✝⁵ : NormedSpace ℝ E''\ninst✝⁴ : NormedSpace ℝ G\nhm : m ≤ m0\nE : Type u_10\ninst✝³ : NormedLatticeAddCommGroup E\ninst✝² : NormedSpace ℝ E\ninst✝¹ : OrderedSMul ℝ E\ninst✝ : SigmaFinite (Measure.trim μ hm)\nhs : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nx : E\nhx : 0 ≤ x\na : α\nha : OfNat.ofNat 0 a ≤ ↑↑↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1)) a\n⊢ OfNat.ofNat 0 a ≤ ↑↑↑(↑(condexpL2 ℝ ℝ hm) (indicatorConstLp 2 hs hμs 1)) a • x\n[PROOFSTEP]\nexact smul_nonneg ha hx\n", "meta": {"mathlib_filename": "Mathlib.MeasureTheory.Function.ConditionalExpectation.CondexpL2", "llama_tokens": 95484, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8128673178375734, "lm_q2_score": 0.6187804267137442, "lm_q1q2_score": 0.5029863857931904}}
{"text": "[GOAL]\nι : Type u\ns : Finset ι\nw z : ι → ℝ\nhw : ∀ (i : ι), i ∈ s → 0 ≤ w i\nhw' : ∑ i in s, w i = 1\nhz : ∀ (i : ι), i ∈ s → 0 ≤ z i\n⊢ ∏ i in s, z i ^ w i ≤ ∑ i in s, w i * z i\n[PROOFSTEP]\nby_cases A : ∃ i ∈ s, z i = 0 ∧ w i ≠ 0\n[GOAL]\ncase pos\nι : Type u\ns : Finset ι\nw z : ι → ℝ\nhw : ∀ (i : ι), i ∈ s → 0 ≤ w i\nhw' : ∑ i in s, w i = 1\nhz : ∀ (i : ι), i ∈ s → 0 ≤ z i\nA : ∃ i, i ∈ s ∧ z i = 0 ∧ w i ≠ 0\n⊢ ∏ i in s, z i ^ w i ≤ ∑ i in s, w i * z i\n[PROOFSTEP]\nrcases A with ⟨i, his, hzi, hwi⟩\n[GOAL]\ncase pos.intro.intro.intro\nι : Type u\ns : Finset ι\nw z : ι → ℝ\nhw : ∀ (i : ι), i ∈ s → 0 ≤ w i\nhw' : ∑ i in s, w i = 1\nhz : ∀ (i : ι), i ∈ s → 0 ≤ z i\ni : ι\nhis : i ∈ s\nhzi : z i = 0\nhwi : w i ≠ 0\n⊢ ∏ i in s, z i ^ w i ≤ ∑ i in s, w i * z i\n[PROOFSTEP]\nrw [prod_eq_zero his]\n[GOAL]\ncase pos.intro.intro.intro\nι : Type u\ns : Finset ι\nw z : ι → ℝ\nhw : ∀ (i : ι), i ∈ s → 0 ≤ w i\nhw' : ∑ i in s, w i = 1\nhz : ∀ (i : ι), i ∈ s → 0 ≤ z i\ni : ι\nhis : i ∈ s\nhzi : z i = 0\nhwi : w i ≠ 0\n⊢ 0 ≤ ∑ i in s, w i * z i\n[PROOFSTEP]\nexact sum_nonneg fun j hj => mul_nonneg (hw j hj) (hz j hj)\n[GOAL]\ncase pos.intro.intro.intro\nι : Type u\ns : Finset ι\nw z : ι → ℝ\nhw : ∀ (i : ι), i ∈ s → 0 ≤ w i\nhw' : ∑ i in s, w i = 1\nhz : ∀ (i : ι), i ∈ s → 0 ≤ z i\ni : ι\nhis : i ∈ s\nhzi : z i = 0\nhwi : w i ≠ 0\n⊢ z i ^ w i = 0\n[PROOFSTEP]\nrw [hzi]\n[GOAL]\ncase pos.intro.intro.intro\nι : Type u\ns : Finset ι\nw z : ι → ℝ\nhw : ∀ (i : ι), i ∈ s → 0 ≤ w i\nhw' : ∑ i in s, w i = 1\nhz : ∀ (i : ι), i ∈ s → 0 ≤ z i\ni : ι\nhis : i ∈ s\nhzi : z i = 0\nhwi : w i ≠ 0\n⊢ 0 ^ w i = 0\n[PROOFSTEP]\nexact zero_rpow hwi\n[GOAL]\ncase neg\nι : Type u\ns : Finset ι\nw z : ι → ℝ\nhw : ∀ (i : ι), i ∈ s → 0 ≤ w i\nhw' : ∑ i in s, w i = 1\nhz : ∀ (i : ι), i ∈ s → 0 ≤ z i\nA : ¬∃ i, i ∈ s ∧ z i = 0 ∧ w i ≠ 0\n⊢ ∏ i in s, z i ^ w i ≤ ∑ i in s, w i * z i\n[PROOFSTEP]\nsimp only [not_exists, not_and, Ne.def, Classical.not_not] at A \n[GOAL]\ncase neg\nι : Type u\ns : Finset ι\nw z : ι → ℝ\nhw : ∀ (i : ι), i ∈ s → 0 ≤ w i\nhw' : ∑ i in s, w i = 1\nhz : ∀ (i : ι), i ∈ s → 0 ≤ z i\nA : ∀ (x : ι), x ∈ s → z x = 0 → w x = 0\n⊢ ∏ i in s, z i ^ w i ≤ ∑ i in s, w i * z i\n[PROOFSTEP]\nhave := convexOn_exp.map_sum_le hw hw' fun i _ => Set.mem_univ <| log (z i)\n[GOAL]\ncase neg\nι : Type u\ns : Finset ι\nw z : ι → ℝ\nhw : ∀ (i : ι), i ∈ s → 0 ≤ w i\nhw' : ∑ i in s, w i = 1\nhz : ∀ (i : ι), i ∈ s → 0 ≤ z i\nA : ∀ (x : ι), x ∈ s → z x = 0 → w x = 0\nthis : exp (∑ i in s, w i • log (z i)) ≤ ∑ i in s, w i • exp (log (z i))\n⊢ ∏ i in s, z i ^ w i ≤ ∑ i in s, w i * z i\n[PROOFSTEP]\nsimp only [exp_sum, (· ∘ ·), smul_eq_mul, mul_comm (w _) (log _)] at this \n[GOAL]\ncase neg\nι : Type u\ns : Finset ι\nw z : ι → ℝ\nhw : ∀ (i : ι), i ∈ s → 0 ≤ w i\nhw' : ∑ i in s, w i = 1\nhz : ∀ (i : ι), i ∈ s → 0 ≤ z i\nA : ∀ (x : ι), x ∈ s → z x = 0 → w x = 0\nthis : ∏ x in s, exp (log (z x) * w x) ≤ ∑ x in s, w x * exp (log (z x))\n⊢ ∏ i in s, z i ^ w i ≤ ∑ i in s, w i * z i\n[PROOFSTEP]\nconvert this using 1 <;> [apply prod_congr rfl; apply sum_congr rfl]\n[GOAL]\ncase neg\nι : Type u\ns : Finset ι\nw z : ι → ℝ\nhw : ∀ (i : ι), i ∈ s → 0 ≤ w i\nhw' : ∑ i in s, w i = 1\nhz : ∀ (i : ι), i ∈ s → 0 ≤ z i\nA : ∀ (x : ι), x ∈ s → z x = 0 → w x = 0\nthis : ∏ x in s, exp (log (z x) * w x) ≤ ∑ x in s, w x * exp (log (z x))\n⊢ ∏ i in s, z i ^ w i ≤ ∑ i in s, w i * z i\n[PROOFSTEP]\nconvert this using 1\n[GOAL]\ncase h.e'_3\nι : Type u\ns : Finset ι\nw z : ι → ℝ\nhw : ∀ (i : ι), i ∈ s → 0 ≤ w i\nhw' : ∑ i in s, w i = 1\nhz : ∀ (i : ι), i ∈ s → 0 ≤ z i\nA : ∀ (x : ι), x ∈ s → z x = 0 → w x = 0\nthis : ∏ x in s, exp (log (z x) * w x) ≤ ∑ x in s, w x * exp (log (z x))\n⊢ ∏ i in s, z i ^ w i = ∏ x in s, exp (log (z x) * w x)\n[PROOFSTEP]\napply prod_congr rfl\n[GOAL]\ncase h.e'_4\nι : Type u\ns : Finset ι\nw z : ι → ℝ\nhw : ∀ (i : ι), i ∈ s → 0 ≤ w i\nhw' : ∑ i in s, w i = 1\nhz : ∀ (i : ι), i ∈ s → 0 ≤ z i\nA : ∀ (x : ι), x ∈ s → z x = 0 → w x = 0\nthis : ∏ x in s, exp (log (z x) * w x) ≤ ∑ x in s, w x * exp (log (z x))\n⊢ ∑ i in s, w i * z i = ∑ x in s, w x * exp (log (z x))\n[PROOFSTEP]\napply sum_congr rfl\n[GOAL]\ncase h.e'_3\nι : Type u\ns : Finset ι\nw z : ι → ℝ\nhw : ∀ (i : ι), i ∈ s → 0 ≤ w i\nhw' : ∑ i in s, w i = 1\nhz : ∀ (i : ι), i ∈ s → 0 ≤ z i\nA : ∀ (x : ι), x ∈ s → z x = 0 → w x = 0\nthis : ∏ x in s, exp (log (z x) * w x) ≤ ∑ x in s, w x * exp (log (z x))\n⊢ ∀ (x : ι), x ∈ s → z x ^ w x = exp (log (z x) * w x)\n[PROOFSTEP]\nintro i hi\n[GOAL]\ncase h.e'_4\nι : Type u\ns : Finset ι\nw z : ι → ℝ\nhw : ∀ (i : ι), i ∈ s → 0 ≤ w i\nhw' : ∑ i in s, w i = 1\nhz : ∀ (i : ι), i ∈ s → 0 ≤ z i\nA : ∀ (x : ι), x ∈ s → z x = 0 → w x = 0\nthis : ∏ x in s, exp (log (z x) * w x) ≤ ∑ x in s, w x * exp (log (z x))\n⊢ ∀ (x : ι), x ∈ s → w x * z x = w x * exp (log (z x))\n[PROOFSTEP]\nintro i hi\n[GOAL]\ncase h.e'_3\nι : Type u\ns : Finset ι\nw z : ι → ℝ\nhw : ∀ (i : ι), i ∈ s → 0 ≤ w i\nhw' : ∑ i in s, w i = 1\nhz : ∀ (i : ι), i ∈ s → 0 ≤ z i\nA : ∀ (x : ι), x ∈ s → z x = 0 → w x = 0\nthis : ∏ x in s, exp (log (z x) * w x) ≤ ∑ x in s, w x * exp (log (z x))\ni : ι\nhi : i ∈ s\n⊢ z i ^ w i = exp (log (z i) * w i)\n[PROOFSTEP]\ncases' eq_or_lt_of_le (hz i hi) with hz hz\n[GOAL]\ncase h.e'_3.inl\nι : Type u\ns : Finset ι\nw z : ι → ℝ\nhw : ∀ (i : ι), i ∈ s → 0 ≤ w i\nhw' : ∑ i in s, w i = 1\nhz✝ : ∀ (i : ι), i ∈ s → 0 ≤ z i\nA : ∀ (x : ι), x ∈ s → z x = 0 → w x = 0\nthis : ∏ x in s, exp (log (z x) * w x) ≤ ∑ x in s, w x * exp (log (z x))\ni : ι\nhi : i ∈ s\nhz : 0 = z i\n⊢ z i ^ w i = exp (log (z i) * w i)\n[PROOFSTEP]\nsimp [A i hi hz.symm]\n[GOAL]\ncase h.e'_3.inr\nι : Type u\ns : Finset ι\nw z : ι → ℝ\nhw : ∀ (i : ι), i ∈ s → 0 ≤ w i\nhw' : ∑ i in s, w i = 1\nhz✝ : ∀ (i : ι), i ∈ s → 0 ≤ z i\nA : ∀ (x : ι), x ∈ s → z x = 0 → w x = 0\nthis : ∏ x in s, exp (log (z x) * w x) ≤ ∑ x in s, w x * exp (log (z x))\ni : ι\nhi : i ∈ s\nhz : 0 < z i\n⊢ z i ^ w i = exp (log (z i) * w i)\n[PROOFSTEP]\nexact rpow_def_of_pos hz _\n[GOAL]\ncase h.e'_4\nι : Type u\ns : Finset ι\nw z : ι → ℝ\nhw : ∀ (i : ι), i ∈ s → 0 ≤ w i\nhw' : ∑ i in s, w i = 1\nhz : ∀ (i : ι), i ∈ s → 0 ≤ z i\nA : ∀ (x : ι), x ∈ s → z x = 0 → w x = 0\nthis : ∏ x in s, exp (log (z x) * w x) ≤ ∑ x in s, w x * exp (log (z x))\ni : ι\nhi : i ∈ s\n⊢ w i * z i = w i * exp (log (z i))\n[PROOFSTEP]\ncases' eq_or_lt_of_le (hz i hi) with hz hz\n[GOAL]\ncase h.e'_4.inl\nι : Type u\ns : Finset ι\nw z : ι → ℝ\nhw : ∀ (i : ι), i ∈ s → 0 ≤ w i\nhw' : ∑ i in s, w i = 1\nhz✝ : ∀ (i : ι), i ∈ s → 0 ≤ z i\nA : ∀ (x : ι), x ∈ s → z x = 0 → w x = 0\nthis : ∏ x in s, exp (log (z x) * w x) ≤ ∑ x in s, w x * exp (log (z x))\ni : ι\nhi : i ∈ s\nhz : 0 = z i\n⊢ w i * z i = w i * exp (log (z i))\n[PROOFSTEP]\nsimp [A i hi hz.symm]\n[GOAL]\ncase h.e'_4.inr\nι : Type u\ns : Finset ι\nw z : ι → ℝ\nhw : ∀ (i : ι), i ∈ s → 0 ≤ w i\nhw' : ∑ i in s, w i = 1\nhz✝ : ∀ (i : ι), i ∈ s → 0 ≤ z i\nA : ∀ (x : ι), x ∈ s → z x = 0 → w x = 0\nthis : ∏ x in s, exp (log (z x) * w x) ≤ ∑ x in s, w x * exp (log (z x))\ni : ι\nhi : i ∈ s\nhz : 0 < z i\n⊢ w i * z i = w i * exp (log (z i))\n[PROOFSTEP]\nrw [exp_log hz]\n[GOAL]\nι : Type u\ns : Finset ι\nw z : ι → ℝ\nx : ℝ\nhw : ∀ (i : ι), i ∈ s → 0 ≤ w i\nhw' : ∑ i in s, w i = 1\nhz : ∀ (i : ι), i ∈ s → 0 ≤ z i\nhx : ∀ (i : ι), i ∈ s → w i ≠ 0 → z i = x\n⊢ ∏ i in s, z i ^ w i = ∏ i in s, x ^ w i\n[PROOFSTEP]\nrefine' prod_congr rfl fun i hi => _\n[GOAL]\nι : Type u\ns : Finset ι\nw z : ι → ℝ\nx : ℝ\nhw : ∀ (i : ι), i ∈ s → 0 ≤ w i\nhw' : ∑ i in s, w i = 1\nhz : ∀ (i : ι), i ∈ s → 0 ≤ z i\nhx : ∀ (i : ι), i ∈ s → w i ≠ 0 → z i = x\ni : ι\nhi : i ∈ s\n⊢ z i ^ w i = x ^ w i\n[PROOFSTEP]\ncases' eq_or_ne (w i) 0 with h₀ h₀\n[GOAL]\ncase inl\nι : Type u\ns : Finset ι\nw z : ι → ℝ\nx : ℝ\nhw : ∀ (i : ι), i ∈ s → 0 ≤ w i\nhw' : ∑ i in s, w i = 1\nhz : ∀ (i : ι), i ∈ s → 0 ≤ z i\nhx : ∀ (i : ι), i ∈ s → w i ≠ 0 → z i = x\ni : ι\nhi : i ∈ s\nh₀ : w i = 0\n⊢ z i ^ w i = x ^ w i\n[PROOFSTEP]\nrw [h₀, rpow_zero, rpow_zero]\n[GOAL]\ncase inr\nι : Type u\ns : Finset ι\nw z : ι → ℝ\nx : ℝ\nhw : ∀ (i : ι), i ∈ s → 0 ≤ w i\nhw' : ∑ i in s, w i = 1\nhz : ∀ (i : ι), i ∈ s → 0 ≤ z i\nhx : ∀ (i : ι), i ∈ s → w i ≠ 0 → z i = x\ni : ι\nhi : i ∈ s\nh₀ : w i ≠ 0\n⊢ z i ^ w i = x ^ w i\n[PROOFSTEP]\nrw [hx i hi h₀]\n[GOAL]\nι : Type u\ns : Finset ι\nw z : ι → ℝ\nx : ℝ\nhw : ∀ (i : ι), i ∈ s → 0 ≤ w i\nhw' : ∑ i in s, w i = 1\nhz : ∀ (i : ι), i ∈ s → 0 ≤ z i\nhx : ∀ (i : ι), i ∈ s → w i ≠ 0 → z i = x\n⊢ ∏ i in s, x ^ w i = x\n[PROOFSTEP]\nrw [← rpow_sum_of_nonneg _ hw, hw', rpow_one]\n[GOAL]\nι : Type u\ns : Finset ι\nw z : ι → ℝ\nx : ℝ\nhw : ∀ (i : ι), i ∈ s → 0 ≤ w i\nhw' : ∑ i in s, w i = 1\nhz : ∀ (i : ι), i ∈ s → 0 ≤ z i\nhx : ∀ (i : ι), i ∈ s → w i ≠ 0 → z i = x\n⊢ 0 ≤ x\n[PROOFSTEP]\nhave : (∑ i in s, w i) ≠ 0 := by\n  rw [hw']\n  exact one_ne_zero\n[GOAL]\nι : Type u\ns : Finset ι\nw z : ι → ℝ\nx : ℝ\nhw : ∀ (i : ι), i ∈ s → 0 ≤ w i\nhw' : ∑ i in s, w i = 1\nhz : ∀ (i : ι), i ∈ s → 0 ≤ z i\nhx : ∀ (i : ι), i ∈ s → w i ≠ 0 → z i = x\n⊢ ∑ i in s, w i ≠ 0\n[PROOFSTEP]\nrw [hw']\n[GOAL]\nι : Type u\ns : Finset ι\nw z : ι → ℝ\nx : ℝ\nhw : ∀ (i : ι), i ∈ s → 0 ≤ w i\nhw' : ∑ i in s, w i = 1\nhz : ∀ (i : ι), i ∈ s → 0 ≤ z i\nhx : ∀ (i : ι), i ∈ s → w i ≠ 0 → z i = x\n⊢ 1 ≠ 0\n[PROOFSTEP]\nexact one_ne_zero\n[GOAL]\nι : Type u\ns : Finset ι\nw z : ι → ℝ\nx : ℝ\nhw : ∀ (i : ι), i ∈ s → 0 ≤ w i\nhw' : ∑ i in s, w i = 1\nhz : ∀ (i : ι), i ∈ s → 0 ≤ z i\nhx : ∀ (i : ι), i ∈ s → w i ≠ 0 → z i = x\nthis : ∑ i in s, w i ≠ 0\n⊢ 0 ≤ x\n[PROOFSTEP]\nobtain ⟨i, his, hi⟩ := exists_ne_zero_of_sum_ne_zero this\n[GOAL]\ncase intro.intro\nι : Type u\ns : Finset ι\nw z : ι → ℝ\nx : ℝ\nhw : ∀ (i : ι), i ∈ s → 0 ≤ w i\nhw' : ∑ i in s, w i = 1\nhz : ∀ (i : ι), i ∈ s → 0 ≤ z i\nhx : ∀ (i : ι), i ∈ s → w i ≠ 0 → z i = x\nthis : ∑ i in s, w i ≠ 0\ni : ι\nhis : i ∈ s\nhi : w i ≠ 0\n⊢ 0 ≤ x\n[PROOFSTEP]\nrw [← hx i his hi]\n[GOAL]\ncase intro.intro\nι : Type u\ns : Finset ι\nw z : ι → ℝ\nx : ℝ\nhw : ∀ (i : ι), i ∈ s → 0 ≤ w i\nhw' : ∑ i in s, w i = 1\nhz : ∀ (i : ι), i ∈ s → 0 ≤ z i\nhx : ∀ (i : ι), i ∈ s → w i ≠ 0 → z i = x\nthis : ∑ i in s, w i ≠ 0\ni : ι\nhis : i ∈ s\nhi : w i ≠ 0\n⊢ 0 ≤ z i\n[PROOFSTEP]\nexact hz i his\n[GOAL]\nι : Type u\ns : Finset ι\nw z : ι → ℝ\nx : ℝ\nhw' : ∑ i in s, w i = 1\nhx : ∀ (i : ι), i ∈ s → w i ≠ 0 → z i = x\n⊢ ∑ i in s, w i * z i = ∑ i in s, w i * x\n[PROOFSTEP]\nrefine' sum_congr rfl fun i hi => _\n[GOAL]\nι : Type u\ns : Finset ι\nw z : ι → ℝ\nx : ℝ\nhw' : ∑ i in s, w i = 1\nhx : ∀ (i : ι), i ∈ s → w i ≠ 0 → z i = x\ni : ι\nhi : i ∈ s\n⊢ w i * z i = w i * x\n[PROOFSTEP]\ncases' eq_or_ne (w i) 0 with hwi hwi\n[GOAL]\ncase inl\nι : Type u\ns : Finset ι\nw z : ι → ℝ\nx : ℝ\nhw' : ∑ i in s, w i = 1\nhx : ∀ (i : ι), i ∈ s → w i ≠ 0 → z i = x\ni : ι\nhi : i ∈ s\nhwi : w i = 0\n⊢ w i * z i = w i * x\n[PROOFSTEP]\nrw [hwi, zero_mul, zero_mul]\n[GOAL]\ncase inr\nι : Type u\ns : Finset ι\nw z : ι → ℝ\nx : ℝ\nhw' : ∑ i in s, w i = 1\nhx : ∀ (i : ι), i ∈ s → w i ≠ 0 → z i = x\ni : ι\nhi : i ∈ s\nhwi : w i ≠ 0\n⊢ w i * z i = w i * x\n[PROOFSTEP]\nrw [hx i hi hwi]\n[GOAL]\nι : Type u\ns : Finset ι\nw z : ι → ℝ\nx : ℝ\nhw' : ∑ i in s, w i = 1\nhx : ∀ (i : ι), i ∈ s → w i ≠ 0 → z i = x\n⊢ ∑ i in s, w i * x = x\n[PROOFSTEP]\nrw [← sum_mul, hw', one_mul]\n[GOAL]\nι : Type u\ns : Finset ι\nw z : ι → ℝ\nx : ℝ\nhw : ∀ (i : ι), i ∈ s → 0 ≤ w i\nhw' : ∑ i in s, w i = 1\nhz : ∀ (i : ι), i ∈ s → 0 ≤ z i\nhx : ∀ (i : ι), i ∈ s → w i ≠ 0 → z i = x\n⊢ ∏ i in s, z i ^ w i = ∑ i in s, w i * z i\n[PROOFSTEP]\nrw [geom_mean_weighted_of_constant, arith_mean_weighted_of_constant]\n[GOAL]\ncase x\nι : Type u\ns : Finset ι\nw z : ι → ℝ\nx : ℝ\nhw : ∀ (i : ι), i ∈ s → 0 ≤ w i\nhw' : ∑ i in s, w i = 1\nhz : ∀ (i : ι), i ∈ s → 0 ≤ z i\nhx : ∀ (i : ι), i ∈ s → w i ≠ 0 → z i = x\n⊢ ℝ\n[PROOFSTEP]\nassumption\n[GOAL]\ncase hw'\nι : Type u\ns : Finset ι\nw z : ι → ℝ\nx : ℝ\nhw : ∀ (i : ι), i ∈ s → 0 ≤ w i\nhw' : ∑ i in s, w i = 1\nhz : ∀ (i : ι), i ∈ s → 0 ≤ z i\nhx : ∀ (i : ι), i ∈ s → w i ≠ 0 → z i = x\n⊢ ∑ i in s, w i = 1\n[PROOFSTEP]\nassumption\n[GOAL]\ncase hx\nι : Type u\ns : Finset ι\nw z : ι → ℝ\nx : ℝ\nhw : ∀ (i : ι), i ∈ s → 0 ≤ w i\nhw' : ∑ i in s, w i = 1\nhz : ∀ (i : ι), i ∈ s → 0 ≤ z i\nhx : ∀ (i : ι), i ∈ s → w i ≠ 0 → z i = x\n⊢ ∀ (i : ι), i ∈ s → w i ≠ 0 → z i = x\n[PROOFSTEP]\nassumption\n[GOAL]\ncase hw\nι : Type u\ns : Finset ι\nw z : ι → ℝ\nx : ℝ\nhw : ∀ (i : ι), i ∈ s → 0 ≤ w i\nhw' : ∑ i in s, w i = 1\nhz : ∀ (i : ι), i ∈ s → 0 ≤ z i\nhx : ∀ (i : ι), i ∈ s → w i ≠ 0 → z i = x\n⊢ ∀ (i : ι), i ∈ s → 0 ≤ w i\n[PROOFSTEP]\nassumption\n[GOAL]\ncase hw'\nι : Type u\ns : Finset ι\nw z : ι → ℝ\nx : ℝ\nhw : ∀ (i : ι), i ∈ s → 0 ≤ w i\nhw' : ∑ i in s, w i = 1\nhz : ∀ (i : ι), i ∈ s → 0 ≤ z i\nhx : ∀ (i : ι), i ∈ s → w i ≠ 0 → z i = x\n⊢ ∑ i in s, w i = 1\n[PROOFSTEP]\nassumption\n[GOAL]\ncase hz\nι : Type u\ns : Finset ι\nw z : ι → ℝ\nx : ℝ\nhw : ∀ (i : ι), i ∈ s → 0 ≤ w i\nhw' : ∑ i in s, w i = 1\nhz : ∀ (i : ι), i ∈ s → 0 ≤ z i\nhx : ∀ (i : ι), i ∈ s → w i ≠ 0 → z i = x\n⊢ ∀ (i : ι), i ∈ s → 0 ≤ z i\n[PROOFSTEP]\nassumption\n[GOAL]\ncase hx\nι : Type u\ns : Finset ι\nw z : ι → ℝ\nx : ℝ\nhw : ∀ (i : ι), i ∈ s → 0 ≤ w i\nhw' : ∑ i in s, w i = 1\nhz : ∀ (i : ι), i ∈ s → 0 ≤ z i\nhx : ∀ (i : ι), i ∈ s → w i ≠ 0 → z i = x\n⊢ ∀ (i : ι), i ∈ s → w i ≠ 0 → z i = x\n[PROOFSTEP]\nassumption\n[GOAL]\nι : Type u\ns : Finset ι\nw z : ι → ℝ≥0\nhw' : ∑ i in s, w i = 1\n⊢ ∏ i in s, z i ^ ↑(w i) ≤ ∑ i in s, w i * z i\n[PROOFSTEP]\nexact_mod_cast\n  Real.geom_mean_le_arith_mean_weighted _ _ _ (fun i _ => (w i).coe_nonneg) (by assumption_mod_cast) fun i _ =>\n    (z i).coe_nonneg\n[GOAL]\nι : Type u\ns : Finset ι\nw z : ι → ℝ≥0\nhw' : ∑ i in s, w i = 1\n⊢ ∑ i in s, ↑(w i) = 1\n[PROOFSTEP]\nassumption_mod_cast\n[GOAL]\nι : Type u\ns : Finset ι\nw₁ w₂ p₁ p₂ : ℝ≥0\n⊢ w₁ + w₂ = 1 → p₁ ^ ↑w₁ * p₂ ^ ↑w₂ ≤ w₁ * p₁ + w₂ * p₂\n[PROOFSTEP]\nsimpa only [Fin.prod_univ_succ, Fin.sum_univ_succ, Finset.prod_empty, Finset.sum_empty, Fintype.univ_of_isEmpty,\n  Fin.cons_succ, Fin.cons_zero, add_zero, mul_one] using geom_mean_le_arith_mean_weighted univ ![w₁, w₂] ![p₁, p₂]\n[GOAL]\nι : Type u\ns : Finset ι\nw₁ w₂ w₃ p₁ p₂ p₃ : ℝ≥0\n⊢ w₁ + w₂ + w₃ = 1 → p₁ ^ ↑w₁ * p₂ ^ ↑w₂ * p₃ ^ ↑w₃ ≤ w₁ * p₁ + w₂ * p₂ + w₃ * p₃\n[PROOFSTEP]\nsimpa only [Fin.prod_univ_succ, Fin.sum_univ_succ, Finset.prod_empty, Finset.sum_empty, Fintype.univ_of_isEmpty,\n  Fin.cons_succ, Fin.cons_zero, add_zero, mul_one, ← add_assoc, mul_assoc] using\n  geom_mean_le_arith_mean_weighted univ ![w₁, w₂, w₃] ![p₁, p₂, p₃]\n[GOAL]\nι : Type u\ns : Finset ι\nw₁ w₂ w₃ w₄ p₁ p₂ p₃ p₄ : ℝ≥0\n⊢ w₁ + w₂ + w₃ + w₄ = 1 → p₁ ^ ↑w₁ * p₂ ^ ↑w₂ * p₃ ^ ↑w₃ * p₄ ^ ↑w₄ ≤ w₁ * p₁ + w₂ * p₂ + w₃ * p₃ + w₄ * p₄\n[PROOFSTEP]\nsimpa only [Fin.prod_univ_succ, Fin.sum_univ_succ, Finset.prod_empty, Finset.sum_empty, Fintype.univ_of_isEmpty,\n  Fin.cons_succ, Fin.cons_zero, add_zero, mul_one, ← add_assoc, mul_assoc] using\n  geom_mean_le_arith_mean_weighted univ ![w₁, w₂, w₃, w₄] ![p₁, p₂, p₃, p₄]\n[GOAL]\nι : Type u\ns : Finset ι\nw₁ w₂ p₁ p₂ : ℝ\nhw₁ : 0 ≤ w₁\nhw₂ : 0 ≤ w₂\nhp₁ : 0 ≤ p₁\nhp₂ : 0 ≤ p₂\nhw : w₁ + w₂ = 1\n⊢ ↑({ val := w₁, property := hw₁ } + { val := w₂, property := hw₂ }) = ↑1\n[PROOFSTEP]\nassumption\n[GOAL]\nι : Type u\ns : Finset ι\nw₁ w₂ w₃ w₄ p₁ p₂ p₃ p₄ : ℝ\nhw₁ : 0 ≤ w₁\nhw₂ : 0 ≤ w₂\nhw₃ : 0 ≤ w₃\nhw₄ : 0 ≤ w₄\nhp₁ : 0 ≤ p₁\nhp₂ : 0 ≤ p₂\nhp₃ : 0 ≤ p₃\nhp₄ : 0 ≤ p₄\nhw : w₁ + w₂ + w₃ + w₄ = 1\n⊢ ↑({ val := w₁, property := hw₁ } + { val := w₂, property := hw₂ } + { val := w₃, property := hw₃ } +\n        { val := w₄, property := hw₄ }) =\n    ↑1\n[PROOFSTEP]\nassumption\n[GOAL]\nι : Type u\ns : Finset ι\na b p q : ℝ\nha : 0 ≤ a\nhb : 0 ≤ b\nhpq : IsConjugateExponent p q\n⊢ a * b ≤ a ^ p / p + b ^ q / q\n[PROOFSTEP]\nsimpa [← rpow_mul, ha, hb, hpq.ne_zero, hpq.symm.ne_zero, _root_.div_eq_inv_mul] using\n  geom_mean_le_arith_mean2_weighted hpq.one_div_nonneg hpq.symm.one_div_nonneg (rpow_nonneg_of_nonneg ha p)\n    (rpow_nonneg_of_nonneg hb q) hpq.inv_add_inv_conj\n[GOAL]\nι : Type u\ns : Finset ι\na b : ℝ≥0\np q : ℝ\nhpq : Real.IsConjugateExponent p q\n⊢ a * b ≤ a ^ p / Real.toNNReal p + b ^ q / Real.toNNReal q\n[PROOFSTEP]\nnth_rw 1 [← Real.coe_toNNReal p hpq.nonneg]\n[GOAL]\nι : Type u\ns : Finset ι\na b : ℝ≥0\np q : ℝ\nhpq : Real.IsConjugateExponent p q\n⊢ a * b ≤ a ^ ↑(Real.toNNReal p) / Real.toNNReal p + b ^ q / Real.toNNReal q\n[PROOFSTEP]\nnth_rw 1 [← Real.coe_toNNReal q hpq.symm.nonneg]\n[GOAL]\nι : Type u\ns : Finset ι\na b : ℝ≥0\np q : ℝ\nhpq : Real.IsConjugateExponent p q\n⊢ a * b ≤ a ^ ↑(Real.toNNReal p) / Real.toNNReal p + b ^ ↑(Real.toNNReal q) / Real.toNNReal q\n[PROOFSTEP]\nexact young_inequality a b hpq.one_lt_nnreal hpq.inv_add_inv_conj_nnreal\n[GOAL]\nι : Type u\ns : Finset ι\na b : ℝ≥0∞\np q : ℝ\nhpq : Real.IsConjugateExponent p q\n⊢ a * b ≤ a ^ p / ENNReal.ofReal p + b ^ q / ENNReal.ofReal q\n[PROOFSTEP]\nby_cases h : a = ⊤ ∨ b = ⊤\n[GOAL]\ncase pos\nι : Type u\ns : Finset ι\na b : ℝ≥0∞\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nh : a = ⊤ ∨ b = ⊤\n⊢ a * b ≤ a ^ p / ENNReal.ofReal p + b ^ q / ENNReal.ofReal q\n[PROOFSTEP]\nrefine' le_trans le_top (le_of_eq _)\n[GOAL]\ncase pos\nι : Type u\ns : Finset ι\na b : ℝ≥0∞\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nh : a = ⊤ ∨ b = ⊤\n⊢ ⊤ = a ^ p / ENNReal.ofReal p + b ^ q / ENNReal.ofReal q\n[PROOFSTEP]\nrepeat rw [div_eq_mul_inv]\n[GOAL]\ncase pos\nι : Type u\ns : Finset ι\na b : ℝ≥0∞\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nh : a = ⊤ ∨ b = ⊤\n⊢ ⊤ = a ^ p / ENNReal.ofReal p + b ^ q / ENNReal.ofReal q\n[PROOFSTEP]\nrw [div_eq_mul_inv]\n[GOAL]\ncase pos\nι : Type u\ns : Finset ι\na b : ℝ≥0∞\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nh : a = ⊤ ∨ b = ⊤\n⊢ ⊤ = a ^ p * (ENNReal.ofReal p)⁻¹ + b ^ q / ENNReal.ofReal q\n[PROOFSTEP]\nrw [div_eq_mul_inv]\n[GOAL]\ncase pos\nι : Type u\ns : Finset ι\na b : ℝ≥0∞\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nh : a = ⊤ ∨ b = ⊤\n⊢ ⊤ = a ^ p * (ENNReal.ofReal p)⁻¹ + b ^ q * (ENNReal.ofReal q)⁻¹\n[PROOFSTEP]\nrw [div_eq_mul_inv]\n[GOAL]\ncase pos\nι : Type u\ns : Finset ι\na b : ℝ≥0∞\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nh : a = ⊤ ∨ b = ⊤\n⊢ ⊤ = a ^ p * (ENNReal.ofReal p)⁻¹ + b ^ q * (ENNReal.ofReal q)⁻¹\n[PROOFSTEP]\ncases' h with h h\n[GOAL]\ncase pos.inl\nι : Type u\ns : Finset ι\na b : ℝ≥0∞\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nh : a = ⊤\n⊢ ⊤ = a ^ p * (ENNReal.ofReal p)⁻¹ + b ^ q * (ENNReal.ofReal q)⁻¹\n[PROOFSTEP]\nrw [h]\n[GOAL]\ncase pos.inr\nι : Type u\ns : Finset ι\na b : ℝ≥0∞\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nh : b = ⊤\n⊢ ⊤ = a ^ p * (ENNReal.ofReal p)⁻¹ + b ^ q * (ENNReal.ofReal q)⁻¹\n[PROOFSTEP]\nrw [h]\n[GOAL]\ncase pos.inl\nι : Type u\ns : Finset ι\na b : ℝ≥0∞\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nh : a = ⊤\n⊢ ⊤ = ⊤ ^ p * (ENNReal.ofReal p)⁻¹ + b ^ q * (ENNReal.ofReal q)⁻¹\n[PROOFSTEP]\nsimp [h, hpq.pos, hpq.symm.pos]\n[GOAL]\ncase pos.inr\nι : Type u\ns : Finset ι\na b : ℝ≥0∞\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nh : b = ⊤\n⊢ ⊤ = a ^ p * (ENNReal.ofReal p)⁻¹ + ⊤ ^ q * (ENNReal.ofReal q)⁻¹\n[PROOFSTEP]\nsimp [h, hpq.pos, hpq.symm.pos]\n[GOAL]\ncase neg\nι : Type u\ns : Finset ι\na b : ℝ≥0∞\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nh : ¬(a = ⊤ ∨ b = ⊤)\n⊢ a * b ≤ a ^ p / ENNReal.ofReal p + b ^ q / ENNReal.ofReal q\n[PROOFSTEP]\npush_neg at h \n[GOAL]\ncase neg\nι : Type u\ns : Finset ι\na b : ℝ≥0∞\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nh : a ≠ ⊤ ∧ b ≠ ⊤\n⊢ a * b ≤ a ^ p / ENNReal.ofReal p + b ^ q / ENNReal.ofReal q\n[PROOFSTEP]\nrw [← coe_toNNReal h.left, ← coe_toNNReal h.right, ← coe_mul, coe_rpow_of_nonneg _ hpq.nonneg,\n  coe_rpow_of_nonneg _ hpq.symm.nonneg, ENNReal.ofReal, ENNReal.ofReal, ←\n  @coe_div (Real.toNNReal p) _ (by simp [hpq.pos]), ← @coe_div (Real.toNNReal q) _ (by simp [hpq.symm.pos]), ← coe_add,\n  coe_le_coe]\n[GOAL]\nι : Type u\ns : Finset ι\na b : ℝ≥0∞\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nh : a ≠ ⊤ ∧ b ≠ ⊤\n⊢ Real.toNNReal p ≠ 0\n[PROOFSTEP]\nsimp [hpq.pos]\n[GOAL]\nι : Type u\ns : Finset ι\na b : ℝ≥0∞\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nh : a ≠ ⊤ ∧ b ≠ ⊤\n⊢ Real.toNNReal q ≠ 0\n[PROOFSTEP]\nsimp [hpq.symm.pos]\n[GOAL]\ncase neg\nι : Type u\ns : Finset ι\na b : ℝ≥0∞\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nh : a ≠ ⊤ ∧ b ≠ ⊤\n⊢ ENNReal.toNNReal a * ENNReal.toNNReal b ≤\n    ENNReal.toNNReal a ^ p / Real.toNNReal p + ENNReal.toNNReal b ^ q / Real.toNNReal q\n[PROOFSTEP]\nexact NNReal.young_inequality_real a.toNNReal b.toNNReal hpq\n[GOAL]\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nhf : ∑ i in s, f i ^ p ≤ 1\nhg : ∑ i in s, g i ^ q ≤ 1\n⊢ ∑ i in s, f i * g i ≤ 1\n[PROOFSTEP]\nhave hp_ne_zero : Real.toNNReal p ≠ 0 := (zero_lt_one.trans hpq.one_lt_nnreal).ne.symm\n[GOAL]\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nhf : ∑ i in s, f i ^ p ≤ 1\nhg : ∑ i in s, g i ^ q ≤ 1\nhp_ne_zero : Real.toNNReal p ≠ 0\n⊢ ∑ i in s, f i * g i ≤ 1\n[PROOFSTEP]\nhave hq_ne_zero : Real.toNNReal q ≠ 0 := (zero_lt_one.trans hpq.symm.one_lt_nnreal).ne.symm\n[GOAL]\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nhf : ∑ i in s, f i ^ p ≤ 1\nhg : ∑ i in s, g i ^ q ≤ 1\nhp_ne_zero : Real.toNNReal p ≠ 0\nhq_ne_zero : Real.toNNReal q ≠ 0\n⊢ ∑ i in s, f i * g i ≤ 1\n[PROOFSTEP]\ncalc\n  ∑ i in s, f i * g i ≤ ∑ i in s, (f i ^ p / Real.toNNReal p + g i ^ q / Real.toNNReal q) :=\n    Finset.sum_le_sum fun i _ => young_inequality_real (f i) (g i) hpq\n  _ = (∑ i in s, f i ^ p) / Real.toNNReal p + (∑ i in s, g i ^ q) / Real.toNNReal q := by\n    rw [sum_add_distrib, sum_div, sum_div]\n  _ ≤ 1 / Real.toNNReal p + 1 / Real.toNNReal q :=\n    by\n    refine' add_le_add _ _\n    · rwa [div_le_iff hp_ne_zero, div_mul_cancel _ hp_ne_zero]\n    · rwa [div_le_iff hq_ne_zero, div_mul_cancel _ hq_ne_zero]\n  _ = 1 := hpq.inv_add_inv_conj_nnreal\n[GOAL]\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nhf : ∑ i in s, f i ^ p ≤ 1\nhg : ∑ i in s, g i ^ q ≤ 1\nhp_ne_zero : Real.toNNReal p ≠ 0\nhq_ne_zero : Real.toNNReal q ≠ 0\n⊢ ∑ i in s, (f i ^ p / Real.toNNReal p + g i ^ q / Real.toNNReal q) =\n    (∑ i in s, f i ^ p) / Real.toNNReal p + (∑ i in s, g i ^ q) / Real.toNNReal q\n[PROOFSTEP]\nrw [sum_add_distrib, sum_div, sum_div]\n[GOAL]\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nhf : ∑ i in s, f i ^ p ≤ 1\nhg : ∑ i in s, g i ^ q ≤ 1\nhp_ne_zero : Real.toNNReal p ≠ 0\nhq_ne_zero : Real.toNNReal q ≠ 0\n⊢ (∑ i in s, f i ^ p) / Real.toNNReal p + (∑ i in s, g i ^ q) / Real.toNNReal q ≤\n    1 / Real.toNNReal p + 1 / Real.toNNReal q\n[PROOFSTEP]\nrefine' add_le_add _ _\n[GOAL]\ncase refine'_1\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nhf : ∑ i in s, f i ^ p ≤ 1\nhg : ∑ i in s, g i ^ q ≤ 1\nhp_ne_zero : Real.toNNReal p ≠ 0\nhq_ne_zero : Real.toNNReal q ≠ 0\n⊢ (∑ i in s, f i ^ p) / Real.toNNReal p ≤ 1 / Real.toNNReal p\n[PROOFSTEP]\nrwa [div_le_iff hp_ne_zero, div_mul_cancel _ hp_ne_zero]\n[GOAL]\ncase refine'_2\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nhf : ∑ i in s, f i ^ p ≤ 1\nhg : ∑ i in s, g i ^ q ≤ 1\nhp_ne_zero : Real.toNNReal p ≠ 0\nhq_ne_zero : Real.toNNReal q ≠ 0\n⊢ (∑ i in s, g i ^ q) / Real.toNNReal q ≤ 1 / Real.toNNReal q\n[PROOFSTEP]\nrwa [div_le_iff hq_ne_zero, div_mul_cancel _ hq_ne_zero]\n[GOAL]\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nhf : ∑ i in s, f i ^ p = 0\n⊢ ∑ i in s, f i * g i ≤ (∑ i in s, f i ^ p) ^ (1 / p) * (∑ i in s, g i ^ q) ^ (1 / q)\n[PROOFSTEP]\nsimp only [hf, hpq.ne_zero, one_div, sum_eq_zero_iff, zero_rpow, zero_mul, inv_eq_zero, Ne.def, not_false_iff,\n  le_zero_iff, mul_eq_zero]\n[GOAL]\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nhf : ∑ i in s, f i ^ p = 0\n⊢ ∀ (x : ι), x ∈ s → f x = 0 ∨ g x = 0\n[PROOFSTEP]\nintro i his\n[GOAL]\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nhf : ∑ i in s, f i ^ p = 0\ni : ι\nhis : i ∈ s\n⊢ f i = 0 ∨ g i = 0\n[PROOFSTEP]\nleft\n[GOAL]\ncase h\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nhf : ∑ i in s, f i ^ p = 0\ni : ι\nhis : i ∈ s\n⊢ f i = 0\n[PROOFSTEP]\nrw [sum_eq_zero_iff] at hf \n[GOAL]\ncase h\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nhf : ∀ (x : ι), x ∈ s → f x ^ p = 0\ni : ι\nhis : i ∈ s\n⊢ f i = 0\n[PROOFSTEP]\nexact (rpow_eq_zero_iff.mp (hf i his)).left\n[GOAL]\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0\np q : ℝ\nhpq : Real.IsConjugateExponent p q\n⊢ ∑ i in s, f i * g i ≤ (∑ i in s, f i ^ p) ^ (1 / p) * (∑ i in s, g i ^ q) ^ (1 / q)\n[PROOFSTEP]\nby_cases hF_zero : ∑ i in s, f i ^ p = 0\n[GOAL]\ncase pos\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nhF_zero : ∑ i in s, f i ^ p = 0\n⊢ ∑ i in s, f i * g i ≤ (∑ i in s, f i ^ p) ^ (1 / p) * (∑ i in s, g i ^ q) ^ (1 / q)\n[PROOFSTEP]\nexact inner_le_Lp_mul_Lp_of_norm_eq_zero s f g hpq hF_zero\n[GOAL]\ncase neg\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nhF_zero : ¬∑ i in s, f i ^ p = 0\n⊢ ∑ i in s, f i * g i ≤ (∑ i in s, f i ^ p) ^ (1 / p) * (∑ i in s, g i ^ q) ^ (1 / q)\n[PROOFSTEP]\nby_cases hG_zero : ∑ i in s, g i ^ q = 0\n[GOAL]\ncase pos\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nhF_zero : ¬∑ i in s, f i ^ p = 0\nhG_zero : ∑ i in s, g i ^ q = 0\n⊢ ∑ i in s, f i * g i ≤ (∑ i in s, f i ^ p) ^ (1 / p) * (∑ i in s, g i ^ q) ^ (1 / q)\n[PROOFSTEP]\ncalc\n  ∑ i in s, f i * g i = ∑ i in s, g i * f i := by\n    congr with i\n    rw [mul_comm]\n  _ ≤ (∑ i in s, g i ^ q) ^ (1 / q) * (∑ i in s, f i ^ p) ^ (1 / p) :=\n    (inner_le_Lp_mul_Lp_of_norm_eq_zero s g f hpq.symm hG_zero)\n  _ = (∑ i in s, f i ^ p) ^ (1 / p) * (∑ i in s, g i ^ q) ^ (1 / q) := mul_comm _ _\n[GOAL]\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nhF_zero : ¬∑ i in s, f i ^ p = 0\nhG_zero : ∑ i in s, g i ^ q = 0\n⊢ ∑ i in s, f i * g i = ∑ i in s, g i * f i\n[PROOFSTEP]\ncongr with i\n[GOAL]\ncase e_f.h.a\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nhF_zero : ¬∑ i in s, f i ^ p = 0\nhG_zero : ∑ i in s, g i ^ q = 0\ni : ι\n⊢ ↑(f i * g i) = ↑(g i * f i)\n[PROOFSTEP]\nrw [mul_comm]\n[GOAL]\ncase neg\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nhF_zero : ¬∑ i in s, f i ^ p = 0\nhG_zero : ¬∑ i in s, g i ^ q = 0\n⊢ ∑ i in s, f i * g i ≤ (∑ i in s, f i ^ p) ^ (1 / p) * (∑ i in s, g i ^ q) ^ (1 / q)\n[PROOFSTEP]\nlet f' i := f i / (∑ i in s, f i ^ p) ^ (1 / p)\n[GOAL]\ncase neg\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nhF_zero : ¬∑ i in s, f i ^ p = 0\nhG_zero : ¬∑ i in s, g i ^ q = 0\nf' : ι → ℝ≥0 := fun i => f i / (∑ i in s, f i ^ p) ^ (1 / p)\n⊢ ∑ i in s, f i * g i ≤ (∑ i in s, f i ^ p) ^ (1 / p) * (∑ i in s, g i ^ q) ^ (1 / q)\n[PROOFSTEP]\nlet g' i := g i / (∑ i in s, g i ^ q) ^ (1 / q)\n[GOAL]\ncase neg\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nhF_zero : ¬∑ i in s, f i ^ p = 0\nhG_zero : ¬∑ i in s, g i ^ q = 0\nf' : ι → ℝ≥0 := fun i => f i / (∑ i in s, f i ^ p) ^ (1 / p)\ng' : ι → ℝ≥0 := fun i => g i / (∑ i in s, g i ^ q) ^ (1 / q)\n⊢ ∑ i in s, f i * g i ≤ (∑ i in s, f i ^ p) ^ (1 / p) * (∑ i in s, g i ^ q) ^ (1 / q)\n[PROOFSTEP]\nsuffices (∑ i in s, f' i * g' i) ≤ 1\n  by\n  simp_rw [div_mul_div_comm, ← sum_div] at this \n  rwa [div_le_iff, one_mul] at this \n  refine' mul_ne_zero _ _\n  · rw [Ne.def, rpow_eq_zero_iff, not_and_or]\n    exact Or.inl hF_zero\n  · rw [Ne.def, rpow_eq_zero_iff, not_and_or]\n    exact Or.inl hG_zero\n[GOAL]\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nhF_zero : ¬∑ i in s, f i ^ p = 0\nhG_zero : ¬∑ i in s, g i ^ q = 0\nf' : ι → ℝ≥0 := fun i => f i / (∑ i in s, f i ^ p) ^ (1 / p)\ng' : ι → ℝ≥0 := fun i => g i / (∑ i in s, g i ^ q) ^ (1 / q)\nthis : ∑ i in s, f' i * g' i ≤ 1\n⊢ ∑ i in s, f i * g i ≤ (∑ i in s, f i ^ p) ^ (1 / p) * (∑ i in s, g i ^ q) ^ (1 / q)\n[PROOFSTEP]\nsimp_rw [div_mul_div_comm, ← sum_div] at this \n[GOAL]\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nhF_zero : ¬∑ i in s, f i ^ p = 0\nhG_zero : ¬∑ i in s, g i ^ q = 0\nf' : ι → ℝ≥0 := fun i => f i / (∑ i in s, f i ^ p) ^ (1 / p)\ng' : ι → ℝ≥0 := fun i => g i / (∑ i in s, g i ^ q) ^ (1 / q)\nthis : (∑ i in s, f i * g i) / ((∑ i in s, f i ^ p) ^ (1 / p) * (∑ i in s, g i ^ q) ^ (1 / q)) ≤ 1\n⊢ ∑ i in s, f i * g i ≤ (∑ i in s, f i ^ p) ^ (1 / p) * (∑ i in s, g i ^ q) ^ (1 / q)\n[PROOFSTEP]\nrwa [div_le_iff, one_mul] at this \n[GOAL]\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nhF_zero : ¬∑ i in s, f i ^ p = 0\nhG_zero : ¬∑ i in s, g i ^ q = 0\nf' : ι → ℝ≥0 := fun i => f i / (∑ i in s, f i ^ p) ^ (1 / p)\ng' : ι → ℝ≥0 := fun i => g i / (∑ i in s, g i ^ q) ^ (1 / q)\nthis : (∑ i in s, f i * g i) / ((∑ i in s, f i ^ p) ^ (1 / p) * (∑ i in s, g i ^ q) ^ (1 / q)) ≤ 1\n⊢ (∑ i in s, f i ^ p) ^ (1 / p) * (∑ i in s, g i ^ q) ^ (1 / q) ≠ 0\n[PROOFSTEP]\nrefine' mul_ne_zero _ _\n[GOAL]\ncase refine'_1\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nhF_zero : ¬∑ i in s, f i ^ p = 0\nhG_zero : ¬∑ i in s, g i ^ q = 0\nf' : ι → ℝ≥0 := fun i => f i / (∑ i in s, f i ^ p) ^ (1 / p)\ng' : ι → ℝ≥0 := fun i => g i / (∑ i in s, g i ^ q) ^ (1 / q)\nthis : (∑ i in s, f i * g i) / ((∑ i in s, f i ^ p) ^ (1 / p) * (∑ i in s, g i ^ q) ^ (1 / q)) ≤ 1\n⊢ (∑ i in s, f i ^ p) ^ (1 / p) ≠ 0\n[PROOFSTEP]\nrw [Ne.def, rpow_eq_zero_iff, not_and_or]\n[GOAL]\ncase refine'_1\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nhF_zero : ¬∑ i in s, f i ^ p = 0\nhG_zero : ¬∑ i in s, g i ^ q = 0\nf' : ι → ℝ≥0 := fun i => f i / (∑ i in s, f i ^ p) ^ (1 / p)\ng' : ι → ℝ≥0 := fun i => g i / (∑ i in s, g i ^ q) ^ (1 / q)\nthis : (∑ i in s, f i * g i) / ((∑ i in s, f i ^ p) ^ (1 / p) * (∑ i in s, g i ^ q) ^ (1 / q)) ≤ 1\n⊢ ¬∑ i in s, f i ^ p = 0 ∨ ¬1 / p ≠ 0\n[PROOFSTEP]\nexact Or.inl hF_zero\n[GOAL]\ncase refine'_2\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nhF_zero : ¬∑ i in s, f i ^ p = 0\nhG_zero : ¬∑ i in s, g i ^ q = 0\nf' : ι → ℝ≥0 := fun i => f i / (∑ i in s, f i ^ p) ^ (1 / p)\ng' : ι → ℝ≥0 := fun i => g i / (∑ i in s, g i ^ q) ^ (1 / q)\nthis : (∑ i in s, f i * g i) / ((∑ i in s, f i ^ p) ^ (1 / p) * (∑ i in s, g i ^ q) ^ (1 / q)) ≤ 1\n⊢ (∑ i in s, g i ^ q) ^ (1 / q) ≠ 0\n[PROOFSTEP]\nrw [Ne.def, rpow_eq_zero_iff, not_and_or]\n[GOAL]\ncase refine'_2\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nhF_zero : ¬∑ i in s, f i ^ p = 0\nhG_zero : ¬∑ i in s, g i ^ q = 0\nf' : ι → ℝ≥0 := fun i => f i / (∑ i in s, f i ^ p) ^ (1 / p)\ng' : ι → ℝ≥0 := fun i => g i / (∑ i in s, g i ^ q) ^ (1 / q)\nthis : (∑ i in s, f i * g i) / ((∑ i in s, f i ^ p) ^ (1 / p) * (∑ i in s, g i ^ q) ^ (1 / q)) ≤ 1\n⊢ ¬∑ i in s, g i ^ q = 0 ∨ ¬1 / q ≠ 0\n[PROOFSTEP]\nexact Or.inl hG_zero\n[GOAL]\ncase neg\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nhF_zero : ¬∑ i in s, f i ^ p = 0\nhG_zero : ¬∑ i in s, g i ^ q = 0\nf' : ι → ℝ≥0 := fun i => f i / (∑ i in s, f i ^ p) ^ (1 / p)\ng' : ι → ℝ≥0 := fun i => g i / (∑ i in s, g i ^ q) ^ (1 / q)\n⊢ ∑ i in s, f' i * g' i ≤ 1\n[PROOFSTEP]\nrefine' inner_le_Lp_mul_Lp_of_norm_le_one s f' g' hpq (le_of_eq _) (le_of_eq _)\n[GOAL]\ncase neg.refine'_1\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nhF_zero : ¬∑ i in s, f i ^ p = 0\nhG_zero : ¬∑ i in s, g i ^ q = 0\nf' : ι → ℝ≥0 := fun i => f i / (∑ i in s, f i ^ p) ^ (1 / p)\ng' : ι → ℝ≥0 := fun i => g i / (∑ i in s, g i ^ q) ^ (1 / q)\n⊢ ∑ i in s, f' i ^ p = 1\n[PROOFSTEP]\nsimp_rw [div_rpow, ← sum_div, ← rpow_mul, one_div, inv_mul_cancel hpq.ne_zero, rpow_one, div_self hF_zero]\n[GOAL]\ncase neg.refine'_2\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nhF_zero : ¬∑ i in s, f i ^ p = 0\nhG_zero : ¬∑ i in s, g i ^ q = 0\nf' : ι → ℝ≥0 := fun i => f i / (∑ i in s, f i ^ p) ^ (1 / p)\ng' : ι → ℝ≥0 := fun i => g i / (∑ i in s, g i ^ q) ^ (1 / q)\n⊢ ∑ i in s, g' i ^ q = 1\n[PROOFSTEP]\nsimp_rw [div_rpow, ← sum_div, ← rpow_mul, one_div, inv_mul_cancel hpq.symm.ne_zero, rpow_one, div_self hG_zero]\n[GOAL]\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nhf : Summable fun i => f i ^ p\nhg : Summable fun i => g i ^ q\n⊢ (Summable fun i => f i * g i) ∧\n    ∑' (i : ι), f i * g i ≤ (∑' (i : ι), f i ^ p) ^ (1 / p) * (∑' (i : ι), g i ^ q) ^ (1 / q)\n[PROOFSTEP]\nhave H₁ : ∀ s : Finset ι, ∑ i in s, f i * g i ≤ (∑' i, f i ^ p) ^ (1 / p) * (∑' i, g i ^ q) ^ (1 / q) :=\n  by\n  intro s\n  refine' le_trans (inner_le_Lp_mul_Lq s f g hpq) (mul_le_mul _ _ bot_le bot_le)\n  · rw [NNReal.rpow_le_rpow_iff (one_div_pos.mpr hpq.pos)]\n    exact sum_le_tsum _ (fun _ _ => zero_le _) hf\n  · rw [NNReal.rpow_le_rpow_iff (one_div_pos.mpr hpq.symm.pos)]\n    exact sum_le_tsum _ (fun _ _ => zero_le _) hg\n[GOAL]\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nhf : Summable fun i => f i ^ p\nhg : Summable fun i => g i ^ q\n⊢ ∀ (s : Finset ι), ∑ i in s, f i * g i ≤ (∑' (i : ι), f i ^ p) ^ (1 / p) * (∑' (i : ι), g i ^ q) ^ (1 / q)\n[PROOFSTEP]\nintro s\n[GOAL]\nι : Type u\ns✝ : Finset ι\nf g : ι → ℝ≥0\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nhf : Summable fun i => f i ^ p\nhg : Summable fun i => g i ^ q\ns : Finset ι\n⊢ ∑ i in s, f i * g i ≤ (∑' (i : ι), f i ^ p) ^ (1 / p) * (∑' (i : ι), g i ^ q) ^ (1 / q)\n[PROOFSTEP]\nrefine' le_trans (inner_le_Lp_mul_Lq s f g hpq) (mul_le_mul _ _ bot_le bot_le)\n[GOAL]\ncase refine'_1\nι : Type u\ns✝ : Finset ι\nf g : ι → ℝ≥0\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nhf : Summable fun i => f i ^ p\nhg : Summable fun i => g i ^ q\ns : Finset ι\n⊢ (∑ i in s, f i ^ p) ^ (1 / p) ≤ (∑' (i : ι), f i ^ p) ^ (1 / p)\n[PROOFSTEP]\nrw [NNReal.rpow_le_rpow_iff (one_div_pos.mpr hpq.pos)]\n[GOAL]\ncase refine'_1\nι : Type u\ns✝ : Finset ι\nf g : ι → ℝ≥0\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nhf : Summable fun i => f i ^ p\nhg : Summable fun i => g i ^ q\ns : Finset ι\n⊢ ∑ i in s, f i ^ p ≤ ∑' (i : ι), f i ^ p\n[PROOFSTEP]\nexact sum_le_tsum _ (fun _ _ => zero_le _) hf\n[GOAL]\ncase refine'_2\nι : Type u\ns✝ : Finset ι\nf g : ι → ℝ≥0\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nhf : Summable fun i => f i ^ p\nhg : Summable fun i => g i ^ q\ns : Finset ι\n⊢ (∑ i in s, g i ^ q) ^ (1 / q) ≤ (∑' (i : ι), g i ^ q) ^ (1 / q)\n[PROOFSTEP]\nrw [NNReal.rpow_le_rpow_iff (one_div_pos.mpr hpq.symm.pos)]\n[GOAL]\ncase refine'_2\nι : Type u\ns✝ : Finset ι\nf g : ι → ℝ≥0\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nhf : Summable fun i => f i ^ p\nhg : Summable fun i => g i ^ q\ns : Finset ι\n⊢ ∑ i in s, g i ^ q ≤ ∑' (i : ι), g i ^ q\n[PROOFSTEP]\nexact sum_le_tsum _ (fun _ _ => zero_le _) hg\n[GOAL]\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nhf : Summable fun i => f i ^ p\nhg : Summable fun i => g i ^ q\nH₁ : ∀ (s : Finset ι), ∑ i in s, f i * g i ≤ (∑' (i : ι), f i ^ p) ^ (1 / p) * (∑' (i : ι), g i ^ q) ^ (1 / q)\n⊢ (Summable fun i => f i * g i) ∧\n    ∑' (i : ι), f i * g i ≤ (∑' (i : ι), f i ^ p) ^ (1 / p) * (∑' (i : ι), g i ^ q) ^ (1 / q)\n[PROOFSTEP]\nhave bdd : BddAbove (Set.range fun s => ∑ i in s, f i * g i) :=\n  by\n  refine' ⟨(∑' i, f i ^ p) ^ (1 / p) * (∑' i, g i ^ q) ^ (1 / q), _⟩\n  rintro a ⟨s, rfl⟩\n  exact H₁ s\n[GOAL]\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nhf : Summable fun i => f i ^ p\nhg : Summable fun i => g i ^ q\nH₁ : ∀ (s : Finset ι), ∑ i in s, f i * g i ≤ (∑' (i : ι), f i ^ p) ^ (1 / p) * (∑' (i : ι), g i ^ q) ^ (1 / q)\n⊢ BddAbove (Set.range fun s => ∑ i in s, f i * g i)\n[PROOFSTEP]\nrefine' ⟨(∑' i, f i ^ p) ^ (1 / p) * (∑' i, g i ^ q) ^ (1 / q), _⟩\n[GOAL]\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nhf : Summable fun i => f i ^ p\nhg : Summable fun i => g i ^ q\nH₁ : ∀ (s : Finset ι), ∑ i in s, f i * g i ≤ (∑' (i : ι), f i ^ p) ^ (1 / p) * (∑' (i : ι), g i ^ q) ^ (1 / q)\n⊢ (∑' (i : ι), f i ^ p) ^ (1 / p) * (∑' (i : ι), g i ^ q) ^ (1 / q) ∈\n    upperBounds (Set.range fun s => ∑ i in s, f i * g i)\n[PROOFSTEP]\nrintro a ⟨s, rfl⟩\n[GOAL]\ncase intro\nι : Type u\ns✝ : Finset ι\nf g : ι → ℝ≥0\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nhf : Summable fun i => f i ^ p\nhg : Summable fun i => g i ^ q\nH₁ : ∀ (s : Finset ι), ∑ i in s, f i * g i ≤ (∑' (i : ι), f i ^ p) ^ (1 / p) * (∑' (i : ι), g i ^ q) ^ (1 / q)\ns : Finset ι\n⊢ (fun s => ∑ i in s, f i * g i) s ≤ (∑' (i : ι), f i ^ p) ^ (1 / p) * (∑' (i : ι), g i ^ q) ^ (1 / q)\n[PROOFSTEP]\nexact H₁ s\n[GOAL]\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nhf : Summable fun i => f i ^ p\nhg : Summable fun i => g i ^ q\nH₁ : ∀ (s : Finset ι), ∑ i in s, f i * g i ≤ (∑' (i : ι), f i ^ p) ^ (1 / p) * (∑' (i : ι), g i ^ q) ^ (1 / q)\nbdd : BddAbove (Set.range fun s => ∑ i in s, f i * g i)\n⊢ (Summable fun i => f i * g i) ∧\n    ∑' (i : ι), f i * g i ≤ (∑' (i : ι), f i ^ p) ^ (1 / p) * (∑' (i : ι), g i ^ q) ^ (1 / q)\n[PROOFSTEP]\nhave H₂ : Summable _ := (hasSum_of_isLUB _ (isLUB_ciSup bdd)).summable\n[GOAL]\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nhf : Summable fun i => f i ^ p\nhg : Summable fun i => g i ^ q\nH₁ : ∀ (s : Finset ι), ∑ i in s, f i * g i ≤ (∑' (i : ι), f i ^ p) ^ (1 / p) * (∑' (i : ι), g i ^ q) ^ (1 / q)\nbdd : BddAbove (Set.range fun s => ∑ i in s, f i * g i)\nH₂ : Summable fun i => f i * g i\n⊢ (Summable fun i => f i * g i) ∧\n    ∑' (i : ι), f i * g i ≤ (∑' (i : ι), f i ^ p) ^ (1 / p) * (∑' (i : ι), g i ^ q) ^ (1 / q)\n[PROOFSTEP]\nexact ⟨H₂, tsum_le_of_sum_le H₂ H₁⟩\n[GOAL]\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0\nA B : ℝ≥0\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nhf : HasSum (fun i => f i ^ p) (A ^ p)\nhg : HasSum (fun i => g i ^ q) (B ^ q)\n⊢ ∃ C, C ≤ A * B ∧ HasSum (fun i => f i * g i) C\n[PROOFSTEP]\nobtain ⟨H₁, H₂⟩ := inner_le_Lp_mul_Lq_tsum hpq hf.summable hg.summable\n[GOAL]\ncase intro\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0\nA B : ℝ≥0\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nhf : HasSum (fun i => f i ^ p) (A ^ p)\nhg : HasSum (fun i => g i ^ q) (B ^ q)\nH₁ : Summable fun i => f i * g i\nH₂ : ∑' (i : ι), f i * g i ≤ (∑' (i : ι), f i ^ p) ^ (1 / p) * (∑' (i : ι), g i ^ q) ^ (1 / q)\n⊢ ∃ C, C ≤ A * B ∧ HasSum (fun i => f i * g i) C\n[PROOFSTEP]\nhave hA : A = (∑' i : ι, f i ^ p) ^ (1 / p) := by rw [hf.tsum_eq, rpow_inv_rpow_self hpq.ne_zero]\n[GOAL]\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0\nA B : ℝ≥0\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nhf : HasSum (fun i => f i ^ p) (A ^ p)\nhg : HasSum (fun i => g i ^ q) (B ^ q)\nH₁ : Summable fun i => f i * g i\nH₂ : ∑' (i : ι), f i * g i ≤ (∑' (i : ι), f i ^ p) ^ (1 / p) * (∑' (i : ι), g i ^ q) ^ (1 / q)\n⊢ A = (∑' (i : ι), f i ^ p) ^ (1 / p)\n[PROOFSTEP]\nrw [hf.tsum_eq, rpow_inv_rpow_self hpq.ne_zero]\n[GOAL]\ncase intro\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0\nA B : ℝ≥0\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nhf : HasSum (fun i => f i ^ p) (A ^ p)\nhg : HasSum (fun i => g i ^ q) (B ^ q)\nH₁ : Summable fun i => f i * g i\nH₂ : ∑' (i : ι), f i * g i ≤ (∑' (i : ι), f i ^ p) ^ (1 / p) * (∑' (i : ι), g i ^ q) ^ (1 / q)\nhA : A = (∑' (i : ι), f i ^ p) ^ (1 / p)\n⊢ ∃ C, C ≤ A * B ∧ HasSum (fun i => f i * g i) C\n[PROOFSTEP]\nhave hB : B = (∑' i : ι, g i ^ q) ^ (1 / q) := by rw [hg.tsum_eq, rpow_inv_rpow_self hpq.symm.ne_zero]\n[GOAL]\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0\nA B : ℝ≥0\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nhf : HasSum (fun i => f i ^ p) (A ^ p)\nhg : HasSum (fun i => g i ^ q) (B ^ q)\nH₁ : Summable fun i => f i * g i\nH₂ : ∑' (i : ι), f i * g i ≤ (∑' (i : ι), f i ^ p) ^ (1 / p) * (∑' (i : ι), g i ^ q) ^ (1 / q)\nhA : A = (∑' (i : ι), f i ^ p) ^ (1 / p)\n⊢ B = (∑' (i : ι), g i ^ q) ^ (1 / q)\n[PROOFSTEP]\nrw [hg.tsum_eq, rpow_inv_rpow_self hpq.symm.ne_zero]\n[GOAL]\ncase intro\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0\nA B : ℝ≥0\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nhf : HasSum (fun i => f i ^ p) (A ^ p)\nhg : HasSum (fun i => g i ^ q) (B ^ q)\nH₁ : Summable fun i => f i * g i\nH₂ : ∑' (i : ι), f i * g i ≤ (∑' (i : ι), f i ^ p) ^ (1 / p) * (∑' (i : ι), g i ^ q) ^ (1 / q)\nhA : A = (∑' (i : ι), f i ^ p) ^ (1 / p)\nhB : B = (∑' (i : ι), g i ^ q) ^ (1 / q)\n⊢ ∃ C, C ≤ A * B ∧ HasSum (fun i => f i * g i) C\n[PROOFSTEP]\nrefine' ⟨∑' i, f i * g i, _, _⟩\n[GOAL]\ncase intro.refine'_1\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0\nA B : ℝ≥0\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nhf : HasSum (fun i => f i ^ p) (A ^ p)\nhg : HasSum (fun i => g i ^ q) (B ^ q)\nH₁ : Summable fun i => f i * g i\nH₂ : ∑' (i : ι), f i * g i ≤ (∑' (i : ι), f i ^ p) ^ (1 / p) * (∑' (i : ι), g i ^ q) ^ (1 / q)\nhA : A = (∑' (i : ι), f i ^ p) ^ (1 / p)\nhB : B = (∑' (i : ι), g i ^ q) ^ (1 / q)\n⊢ ∑' (i : ι), f i * g i ≤ A * B\n[PROOFSTEP]\nsimpa [hA, hB] using H₂\n[GOAL]\ncase intro.refine'_2\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0\nA B : ℝ≥0\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nhf : HasSum (fun i => f i ^ p) (A ^ p)\nhg : HasSum (fun i => g i ^ q) (B ^ q)\nH₁ : Summable fun i => f i * g i\nH₂ : ∑' (i : ι), f i * g i ≤ (∑' (i : ι), f i ^ p) ^ (1 / p) * (∑' (i : ι), g i ^ q) ^ (1 / q)\nhA : A = (∑' (i : ι), f i ^ p) ^ (1 / p)\nhB : B = (∑' (i : ι), g i ^ q) ^ (1 / q)\n⊢ HasSum (fun i => f i * g i) (∑' (i : ι), f i * g i)\n[PROOFSTEP]\nsimpa only [rpow_self_rpow_inv hpq.ne_zero] using H₁.hasSum\n[GOAL]\nι : Type u\ns : Finset ι\nf : ι → ℝ≥0\np : ℝ\nhp : 1 ≤ p\n⊢ (∑ i in s, f i) ^ p ≤ ↑(card s) ^ (p - 1) * ∑ i in s, f i ^ p\n[PROOFSTEP]\ncases' eq_or_lt_of_le hp with hp hp\n[GOAL]\ncase inl\nι : Type u\ns : Finset ι\nf : ι → ℝ≥0\np : ℝ\nhp✝ : 1 ≤ p\nhp : 1 = p\n⊢ (∑ i in s, f i) ^ p ≤ ↑(card s) ^ (p - 1) * ∑ i in s, f i ^ p\n[PROOFSTEP]\nsimp [← hp]\n[GOAL]\ncase inr\nι : Type u\ns : Finset ι\nf : ι → ℝ≥0\np : ℝ\nhp✝ : 1 ≤ p\nhp : 1 < p\n⊢ (∑ i in s, f i) ^ p ≤ ↑(card s) ^ (p - 1) * ∑ i in s, f i ^ p\n[PROOFSTEP]\nlet q : ℝ := p / (p - 1)\n[GOAL]\ncase inr\nι : Type u\ns : Finset ι\nf : ι → ℝ≥0\np : ℝ\nhp✝ : 1 ≤ p\nhp : 1 < p\nq : ℝ := p / (p - 1)\n⊢ (∑ i in s, f i) ^ p ≤ ↑(card s) ^ (p - 1) * ∑ i in s, f i ^ p\n[PROOFSTEP]\nhave hpq : p.IsConjugateExponent q := by rw [Real.isConjugateExponent_iff hp]\n[GOAL]\nι : Type u\ns : Finset ι\nf : ι → ℝ≥0\np : ℝ\nhp✝ : 1 ≤ p\nhp : 1 < p\nq : ℝ := p / (p - 1)\n⊢ Real.IsConjugateExponent p q\n[PROOFSTEP]\nrw [Real.isConjugateExponent_iff hp]\n[GOAL]\ncase inr\nι : Type u\ns : Finset ι\nf : ι → ℝ≥0\np : ℝ\nhp✝ : 1 ≤ p\nhp : 1 < p\nq : ℝ := p / (p - 1)\nhpq : Real.IsConjugateExponent p q\n⊢ (∑ i in s, f i) ^ p ≤ ↑(card s) ^ (p - 1) * ∑ i in s, f i ^ p\n[PROOFSTEP]\nhave hp₁ : 1 / p * p = 1 := one_div_mul_cancel hpq.ne_zero\n[GOAL]\ncase inr\nι : Type u\ns : Finset ι\nf : ι → ℝ≥0\np : ℝ\nhp✝ : 1 ≤ p\nhp : 1 < p\nq : ℝ := p / (p - 1)\nhpq : Real.IsConjugateExponent p q\nhp₁ : 1 / p * p = 1\n⊢ (∑ i in s, f i) ^ p ≤ ↑(card s) ^ (p - 1) * ∑ i in s, f i ^ p\n[PROOFSTEP]\nhave hq : 1 / q * p = p - 1 := by\n  rw [← hpq.div_conj_eq_sub_one]\n  ring\n[GOAL]\nι : Type u\ns : Finset ι\nf : ι → ℝ≥0\np : ℝ\nhp✝ : 1 ≤ p\nhp : 1 < p\nq : ℝ := p / (p - 1)\nhpq : Real.IsConjugateExponent p q\nhp₁ : 1 / p * p = 1\n⊢ 1 / q * p = p - 1\n[PROOFSTEP]\nrw [← hpq.div_conj_eq_sub_one]\n[GOAL]\nι : Type u\ns : Finset ι\nf : ι → ℝ≥0\np : ℝ\nhp✝ : 1 ≤ p\nhp : 1 < p\nq : ℝ := p / (p - 1)\nhpq : Real.IsConjugateExponent p q\nhp₁ : 1 / p * p = 1\n⊢ 1 / q * p = p / q\n[PROOFSTEP]\nring\n[GOAL]\ncase inr\nι : Type u\ns : Finset ι\nf : ι → ℝ≥0\np : ℝ\nhp✝ : 1 ≤ p\nhp : 1 < p\nq : ℝ := p / (p - 1)\nhpq : Real.IsConjugateExponent p q\nhp₁ : 1 / p * p = 1\nhq : 1 / q * p = p - 1\n⊢ (∑ i in s, f i) ^ p ≤ ↑(card s) ^ (p - 1) * ∑ i in s, f i ^ p\n[PROOFSTEP]\nsimpa only [NNReal.mul_rpow, ← NNReal.rpow_mul, hp₁, hq, one_mul, one_rpow, rpow_one, Pi.one_apply, sum_const,\n  Nat.smul_one_eq_coe] using NNReal.rpow_le_rpow (inner_le_Lp_mul_Lq s 1 f hpq.symm) hpq.nonneg\n[GOAL]\nι : Type u\ns : Finset ι\nf : ι → ℝ≥0\np q : ℝ\nhpq : Real.IsConjugateExponent p q\n⊢ IsGreatest ((fun g => ∑ i in s, f i * g i) '' {g | ∑ i in s, g i ^ q ≤ 1}) ((∑ i in s, f i ^ p) ^ (1 / p))\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase left\nι : Type u\ns : Finset ι\nf : ι → ℝ≥0\np q : ℝ\nhpq : Real.IsConjugateExponent p q\n⊢ (∑ i in s, f i ^ p) ^ (1 / p) ∈ (fun g => ∑ i in s, f i * g i) '' {g | ∑ i in s, g i ^ q ≤ 1}\n[PROOFSTEP]\nuse fun i => f i ^ p / f i / (∑ i in s, f i ^ p) ^ (1 / q)\n[GOAL]\ncase h\nι : Type u\ns : Finset ι\nf : ι → ℝ≥0\np q : ℝ\nhpq : Real.IsConjugateExponent p q\n⊢ (fun i => f i ^ p / f i / (∑ i in s, f i ^ p) ^ (1 / q)) ∈ {g | ∑ i in s, g i ^ q ≤ 1} ∧\n    ((fun g => ∑ i in s, f i * g i) fun i => f i ^ p / f i / (∑ i in s, f i ^ p) ^ (1 / q)) =\n      (∑ i in s, f i ^ p) ^ (1 / p)\n[PROOFSTEP]\nby_cases hf : ∑ i in s, f i ^ p = 0\n[GOAL]\ncase pos\nι : Type u\ns : Finset ι\nf : ι → ℝ≥0\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nhf : ∑ i in s, f i ^ p = 0\n⊢ (fun i => f i ^ p / f i / (∑ i in s, f i ^ p) ^ (1 / q)) ∈ {g | ∑ i in s, g i ^ q ≤ 1} ∧\n    ((fun g => ∑ i in s, f i * g i) fun i => f i ^ p / f i / (∑ i in s, f i ^ p) ^ (1 / q)) =\n      (∑ i in s, f i ^ p) ^ (1 / p)\n[PROOFSTEP]\nsimp [hf, hpq.ne_zero, hpq.symm.ne_zero]\n[GOAL]\ncase neg\nι : Type u\ns : Finset ι\nf : ι → ℝ≥0\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nhf : ¬∑ i in s, f i ^ p = 0\n⊢ (fun i => f i ^ p / f i / (∑ i in s, f i ^ p) ^ (1 / q)) ∈ {g | ∑ i in s, g i ^ q ≤ 1} ∧\n    ((fun g => ∑ i in s, f i * g i) fun i => f i ^ p / f i / (∑ i in s, f i ^ p) ^ (1 / q)) =\n      (∑ i in s, f i ^ p) ^ (1 / p)\n[PROOFSTEP]\nhave A : p + q - q ≠ 0 := by simp [hpq.ne_zero]\n[GOAL]\nι : Type u\ns : Finset ι\nf : ι → ℝ≥0\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nhf : ¬∑ i in s, f i ^ p = 0\n⊢ p + q - q ≠ 0\n[PROOFSTEP]\nsimp [hpq.ne_zero]\n[GOAL]\ncase neg\nι : Type u\ns : Finset ι\nf : ι → ℝ≥0\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nhf : ¬∑ i in s, f i ^ p = 0\nA : p + q - q ≠ 0\n⊢ (fun i => f i ^ p / f i / (∑ i in s, f i ^ p) ^ (1 / q)) ∈ {g | ∑ i in s, g i ^ q ≤ 1} ∧\n    ((fun g => ∑ i in s, f i * g i) fun i => f i ^ p / f i / (∑ i in s, f i ^ p) ^ (1 / q)) =\n      (∑ i in s, f i ^ p) ^ (1 / p)\n[PROOFSTEP]\nhave B : ∀ y : ℝ≥0, y * y ^ p / y = y ^ p :=\n  by\n  refine' fun y => mul_div_cancel_left_of_imp fun h => _\n  simp [h, hpq.ne_zero]\n[GOAL]\nι : Type u\ns : Finset ι\nf : ι → ℝ≥0\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nhf : ¬∑ i in s, f i ^ p = 0\nA : p + q - q ≠ 0\n⊢ ∀ (y : ℝ≥0), y * y ^ p / y = y ^ p\n[PROOFSTEP]\nrefine' fun y => mul_div_cancel_left_of_imp fun h => _\n[GOAL]\nι : Type u\ns : Finset ι\nf : ι → ℝ≥0\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nhf : ¬∑ i in s, f i ^ p = 0\nA : p + q - q ≠ 0\ny : ℝ≥0\nh : y = 0\n⊢ y ^ p = 0\n[PROOFSTEP]\nsimp [h, hpq.ne_zero]\n[GOAL]\ncase neg\nι : Type u\ns : Finset ι\nf : ι → ℝ≥0\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nhf : ¬∑ i in s, f i ^ p = 0\nA : p + q - q ≠ 0\nB : ∀ (y : ℝ≥0), y * y ^ p / y = y ^ p\n⊢ (fun i => f i ^ p / f i / (∑ i in s, f i ^ p) ^ (1 / q)) ∈ {g | ∑ i in s, g i ^ q ≤ 1} ∧\n    ((fun g => ∑ i in s, f i * g i) fun i => f i ^ p / f i / (∑ i in s, f i ^ p) ^ (1 / q)) =\n      (∑ i in s, f i ^ p) ^ (1 / p)\n[PROOFSTEP]\nsimp only [Set.mem_setOf_eq, div_rpow, ← sum_div, ← rpow_mul, div_mul_cancel _ hpq.symm.ne_zero, rpow_one,\n  div_le_iff hf, one_mul, hpq.mul_eq_add, ← rpow_sub' _ A, _root_.add_sub_cancel, le_refl, true_and_iff, ←\n  mul_div_assoc, B]\n[GOAL]\ncase neg\nι : Type u\ns : Finset ι\nf : ι → ℝ≥0\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nhf : ¬∑ i in s, f i ^ p = 0\nA : p + q - q ≠ 0\nB : ∀ (y : ℝ≥0), y * y ^ p / y = y ^ p\n⊢ (∑ i in s, f i ^ p) / (∑ i in s, f i ^ p) ^ (1 / q) = (∑ i in s, f i ^ p) ^ (1 / p)\n[PROOFSTEP]\nrw [div_eq_iff, ← rpow_add hf, hpq.inv_add_inv_conj, rpow_one]\n[GOAL]\ncase neg\nι : Type u\ns : Finset ι\nf : ι → ℝ≥0\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nhf : ¬∑ i in s, f i ^ p = 0\nA : p + q - q ≠ 0\nB : ∀ (y : ℝ≥0), y * y ^ p / y = y ^ p\n⊢ (∑ i in s, f i ^ p) ^ (1 / q) ≠ 0\n[PROOFSTEP]\nsimpa [hpq.symm.ne_zero] using hf\n[GOAL]\ncase right\nι : Type u\ns : Finset ι\nf : ι → ℝ≥0\np q : ℝ\nhpq : Real.IsConjugateExponent p q\n⊢ (∑ i in s, f i ^ p) ^ (1 / p) ∈ upperBounds ((fun g => ∑ i in s, f i * g i) '' {g | ∑ i in s, g i ^ q ≤ 1})\n[PROOFSTEP]\nrintro _ ⟨g, hg, rfl⟩\n[GOAL]\ncase right.intro.intro\nι : Type u\ns : Finset ι\nf : ι → ℝ≥0\np q : ℝ\nhpq : Real.IsConjugateExponent p q\ng : ι → ℝ≥0\nhg : g ∈ {g | ∑ i in s, g i ^ q ≤ 1}\n⊢ (fun g => ∑ i in s, f i * g i) g ≤ (∑ i in s, f i ^ p) ^ (1 / p)\n[PROOFSTEP]\napply le_trans (inner_le_Lp_mul_Lq s f g hpq)\n[GOAL]\ncase right.intro.intro\nι : Type u\ns : Finset ι\nf : ι → ℝ≥0\np q : ℝ\nhpq : Real.IsConjugateExponent p q\ng : ι → ℝ≥0\nhg : g ∈ {g | ∑ i in s, g i ^ q ≤ 1}\n⊢ (∑ i in s, f i ^ p) ^ (1 / p) * (∑ i in s, g i ^ q) ^ (1 / q) ≤ (∑ i in s, f i ^ p) ^ (1 / p)\n[PROOFSTEP]\nsimpa only [mul_one] using mul_le_mul_left' (NNReal.rpow_le_one hg (le_of_lt hpq.symm.one_div_pos)) _\n[GOAL]\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0\np : ℝ\nhp : 1 ≤ p\n⊢ (∑ i in s, (f i + g i) ^ p) ^ (1 / p) ≤ (∑ i in s, f i ^ p) ^ (1 / p) + (∑ i in s, g i ^ p) ^ (1 / p)\n[PROOFSTEP]\nrcases eq_or_lt_of_le hp with (rfl | hp)\n[GOAL]\ncase inl\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0\nhp : 1 ≤ 1\n⊢ (∑ i in s, (f i + g i) ^ 1) ^ (1 / 1) ≤ (∑ i in s, f i ^ 1) ^ (1 / 1) + (∑ i in s, g i ^ 1) ^ (1 / 1)\n[PROOFSTEP]\nsimp [Finset.sum_add_distrib]\n[GOAL]\ncase inr\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0\np : ℝ\nhp✝ : 1 ≤ p\nhp : 1 < p\n⊢ (∑ i in s, (f i + g i) ^ p) ^ (1 / p) ≤ (∑ i in s, f i ^ p) ^ (1 / p) + (∑ i in s, g i ^ p) ^ (1 / p)\n[PROOFSTEP]\nhave hpq := Real.isConjugateExponent_conjugateExponent hp\n[GOAL]\ncase inr\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0\np : ℝ\nhp✝ : 1 ≤ p\nhp : 1 < p\nhpq : Real.IsConjugateExponent p (Real.conjugateExponent p)\n⊢ (∑ i in s, (f i + g i) ^ p) ^ (1 / p) ≤ (∑ i in s, f i ^ p) ^ (1 / p) + (∑ i in s, g i ^ p) ^ (1 / p)\n[PROOFSTEP]\nhave := isGreatest_Lp s (f + g) hpq\n[GOAL]\ncase inr\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0\np : ℝ\nhp✝ : 1 ≤ p\nhp : 1 < p\nhpq : Real.IsConjugateExponent p (Real.conjugateExponent p)\nthis :\n  IsGreatest ((fun g_1 => ∑ i in s, (f + g) i * g_1 i) '' {g | ∑ i in s, g i ^ Real.conjugateExponent p ≤ 1})\n    ((∑ i in s, (f + g) i ^ p) ^ (1 / p))\n⊢ (∑ i in s, (f i + g i) ^ p) ^ (1 / p) ≤ (∑ i in s, f i ^ p) ^ (1 / p) + (∑ i in s, g i ^ p) ^ (1 / p)\n[PROOFSTEP]\nsimp only [Pi.add_apply, add_mul, sum_add_distrib] at this \n[GOAL]\ncase inr\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0\np : ℝ\nhp✝ : 1 ≤ p\nhp : 1 < p\nhpq : Real.IsConjugateExponent p (Real.conjugateExponent p)\nthis :\n  IsGreatest\n    ((fun a => ∑ x in s, f x * a x + ∑ x in s, g x * a x) '' {g | ∑ i in s, g i ^ Real.conjugateExponent p ≤ 1})\n    ((∑ x in s, (f x + g x) ^ p) ^ (1 / p))\n⊢ (∑ i in s, (f i + g i) ^ p) ^ (1 / p) ≤ (∑ i in s, f i ^ p) ^ (1 / p) + (∑ i in s, g i ^ p) ^ (1 / p)\n[PROOFSTEP]\nrcases this.1 with ⟨φ, hφ, H⟩\n[GOAL]\ncase inr.intro.intro\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0\np : ℝ\nhp✝ : 1 ≤ p\nhp : 1 < p\nhpq : Real.IsConjugateExponent p (Real.conjugateExponent p)\nthis :\n  IsGreatest\n    ((fun a => ∑ x in s, f x * a x + ∑ x in s, g x * a x) '' {g | ∑ i in s, g i ^ Real.conjugateExponent p ≤ 1})\n    ((∑ x in s, (f x + g x) ^ p) ^ (1 / p))\nφ : ι → ℝ≥0\nhφ : φ ∈ {g | ∑ i in s, g i ^ Real.conjugateExponent p ≤ 1}\nH : (fun a => ∑ x in s, f x * a x + ∑ x in s, g x * a x) φ = (∑ x in s, (f x + g x) ^ p) ^ (1 / p)\n⊢ (∑ i in s, (f i + g i) ^ p) ^ (1 / p) ≤ (∑ i in s, f i ^ p) ^ (1 / p) + (∑ i in s, g i ^ p) ^ (1 / p)\n[PROOFSTEP]\nrw [← H]\n[GOAL]\ncase inr.intro.intro\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0\np : ℝ\nhp✝ : 1 ≤ p\nhp : 1 < p\nhpq : Real.IsConjugateExponent p (Real.conjugateExponent p)\nthis :\n  IsGreatest\n    ((fun a => ∑ x in s, f x * a x + ∑ x in s, g x * a x) '' {g | ∑ i in s, g i ^ Real.conjugateExponent p ≤ 1})\n    ((∑ x in s, (f x + g x) ^ p) ^ (1 / p))\nφ : ι → ℝ≥0\nhφ : φ ∈ {g | ∑ i in s, g i ^ Real.conjugateExponent p ≤ 1}\nH : (fun a => ∑ x in s, f x * a x + ∑ x in s, g x * a x) φ = (∑ x in s, (f x + g x) ^ p) ^ (1 / p)\n⊢ (fun a => ∑ x in s, f x * a x + ∑ x in s, g x * a x) φ ≤ (∑ i in s, f i ^ p) ^ (1 / p) + (∑ i in s, g i ^ p) ^ (1 / p)\n[PROOFSTEP]\nexact add_le_add ((isGreatest_Lp s f hpq).2 ⟨φ, hφ, rfl⟩) ((isGreatest_Lp s g hpq).2 ⟨φ, hφ, rfl⟩)\n[GOAL]\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0\np : ℝ\nhp : 1 ≤ p\nhf : Summable fun i => f i ^ p\nhg : Summable fun i => g i ^ p\n⊢ (Summable fun i => (f i + g i) ^ p) ∧\n    (∑' (i : ι), (f i + g i) ^ p) ^ (1 / p) ≤ (∑' (i : ι), f i ^ p) ^ (1 / p) + (∑' (i : ι), g i ^ p) ^ (1 / p)\n[PROOFSTEP]\nhave pos : 0 < p := lt_of_lt_of_le zero_lt_one hp\n[GOAL]\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0\np : ℝ\nhp : 1 ≤ p\nhf : Summable fun i => f i ^ p\nhg : Summable fun i => g i ^ p\npos : 0 < p\n⊢ (Summable fun i => (f i + g i) ^ p) ∧\n    (∑' (i : ι), (f i + g i) ^ p) ^ (1 / p) ≤ (∑' (i : ι), f i ^ p) ^ (1 / p) + (∑' (i : ι), g i ^ p) ^ (1 / p)\n[PROOFSTEP]\nhave H₁ : ∀ s : Finset ι, (∑ i in s, (f i + g i) ^ p) ≤ ((∑' i, f i ^ p) ^ (1 / p) + (∑' i, g i ^ p) ^ (1 / p)) ^ p :=\n  by\n  intro s\n  rw [← NNReal.rpow_one_div_le_iff pos]\n  refine' le_trans (Lp_add_le s f g hp) (add_le_add _ _) <;> rw [NNReal.rpow_le_rpow_iff (one_div_pos.mpr pos)] <;>\n    refine' sum_le_tsum _ (fun _ _ => zero_le _) _\n  exacts [hf, hg]\n[GOAL]\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0\np : ℝ\nhp : 1 ≤ p\nhf : Summable fun i => f i ^ p\nhg : Summable fun i => g i ^ p\npos : 0 < p\n⊢ ∀ (s : Finset ι), ∑ i in s, (f i + g i) ^ p ≤ ((∑' (i : ι), f i ^ p) ^ (1 / p) + (∑' (i : ι), g i ^ p) ^ (1 / p)) ^ p\n[PROOFSTEP]\nintro s\n[GOAL]\nι : Type u\ns✝ : Finset ι\nf g : ι → ℝ≥0\np : ℝ\nhp : 1 ≤ p\nhf : Summable fun i => f i ^ p\nhg : Summable fun i => g i ^ p\npos : 0 < p\ns : Finset ι\n⊢ ∑ i in s, (f i + g i) ^ p ≤ ((∑' (i : ι), f i ^ p) ^ (1 / p) + (∑' (i : ι), g i ^ p) ^ (1 / p)) ^ p\n[PROOFSTEP]\nrw [← NNReal.rpow_one_div_le_iff pos]\n[GOAL]\nι : Type u\ns✝ : Finset ι\nf g : ι → ℝ≥0\np : ℝ\nhp : 1 ≤ p\nhf : Summable fun i => f i ^ p\nhg : Summable fun i => g i ^ p\npos : 0 < p\ns : Finset ι\n⊢ (∑ i in s, (f i + g i) ^ p) ^ (1 / p) ≤ (∑' (i : ι), f i ^ p) ^ (1 / p) + (∑' (i : ι), g i ^ p) ^ (1 / p)\n[PROOFSTEP]\nrefine' le_trans (Lp_add_le s f g hp) (add_le_add _ _)\n[GOAL]\ncase refine'_1\nι : Type u\ns✝ : Finset ι\nf g : ι → ℝ≥0\np : ℝ\nhp : 1 ≤ p\nhf : Summable fun i => f i ^ p\nhg : Summable fun i => g i ^ p\npos : 0 < p\ns : Finset ι\n⊢ (∑ i in s, f i ^ p) ^ (1 / p) ≤ (∑' (i : ι), f i ^ p) ^ (1 / p)\n[PROOFSTEP]\nrw [NNReal.rpow_le_rpow_iff (one_div_pos.mpr pos)]\n[GOAL]\ncase refine'_2\nι : Type u\ns✝ : Finset ι\nf g : ι → ℝ≥0\np : ℝ\nhp : 1 ≤ p\nhf : Summable fun i => f i ^ p\nhg : Summable fun i => g i ^ p\npos : 0 < p\ns : Finset ι\n⊢ (∑ i in s, g i ^ p) ^ (1 / p) ≤ (∑' (i : ι), g i ^ p) ^ (1 / p)\n[PROOFSTEP]\nrw [NNReal.rpow_le_rpow_iff (one_div_pos.mpr pos)]\n[GOAL]\ncase refine'_1\nι : Type u\ns✝ : Finset ι\nf g : ι → ℝ≥0\np : ℝ\nhp : 1 ≤ p\nhf : Summable fun i => f i ^ p\nhg : Summable fun i => g i ^ p\npos : 0 < p\ns : Finset ι\n⊢ ∑ i in s, f i ^ p ≤ ∑' (i : ι), f i ^ p\n[PROOFSTEP]\nrefine' sum_le_tsum _ (fun _ _ => zero_le _) _\n[GOAL]\ncase refine'_2\nι : Type u\ns✝ : Finset ι\nf g : ι → ℝ≥0\np : ℝ\nhp : 1 ≤ p\nhf : Summable fun i => f i ^ p\nhg : Summable fun i => g i ^ p\npos : 0 < p\ns : Finset ι\n⊢ ∑ i in s, g i ^ p ≤ ∑' (i : ι), g i ^ p\n[PROOFSTEP]\nrefine' sum_le_tsum _ (fun _ _ => zero_le _) _\n[GOAL]\ncase refine'_1\nι : Type u\ns✝ : Finset ι\nf g : ι → ℝ≥0\np : ℝ\nhp : 1 ≤ p\nhf : Summable fun i => f i ^ p\nhg : Summable fun i => g i ^ p\npos : 0 < p\ns : Finset ι\n⊢ Summable fun i => f i ^ p\ncase refine'_2\nι : Type u\ns✝ : Finset ι\nf g : ι → ℝ≥0\np : ℝ\nhp : 1 ≤ p\nhf : Summable fun i => f i ^ p\nhg : Summable fun i => g i ^ p\npos : 0 < p\ns : Finset ι\n⊢ Summable fun i => g i ^ p\n[PROOFSTEP]\nexacts [hf, hg]\n[GOAL]\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0\np : ℝ\nhp : 1 ≤ p\nhf : Summable fun i => f i ^ p\nhg : Summable fun i => g i ^ p\npos : 0 < p\nH₁ :\n  ∀ (s : Finset ι), ∑ i in s, (f i + g i) ^ p ≤ ((∑' (i : ι), f i ^ p) ^ (1 / p) + (∑' (i : ι), g i ^ p) ^ (1 / p)) ^ p\n⊢ (Summable fun i => (f i + g i) ^ p) ∧\n    (∑' (i : ι), (f i + g i) ^ p) ^ (1 / p) ≤ (∑' (i : ι), f i ^ p) ^ (1 / p) + (∑' (i : ι), g i ^ p) ^ (1 / p)\n[PROOFSTEP]\nhave bdd : BddAbove (Set.range fun s => ∑ i in s, (f i + g i) ^ p) :=\n  by\n  refine' ⟨((∑' i, f i ^ p) ^ (1 / p) + (∑' i, g i ^ p) ^ (1 / p)) ^ p, _⟩\n  rintro a ⟨s, rfl⟩\n  exact H₁ s\n[GOAL]\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0\np : ℝ\nhp : 1 ≤ p\nhf : Summable fun i => f i ^ p\nhg : Summable fun i => g i ^ p\npos : 0 < p\nH₁ :\n  ∀ (s : Finset ι), ∑ i in s, (f i + g i) ^ p ≤ ((∑' (i : ι), f i ^ p) ^ (1 / p) + (∑' (i : ι), g i ^ p) ^ (1 / p)) ^ p\n⊢ BddAbove (Set.range fun s => ∑ i in s, (f i + g i) ^ p)\n[PROOFSTEP]\nrefine' ⟨((∑' i, f i ^ p) ^ (1 / p) + (∑' i, g i ^ p) ^ (1 / p)) ^ p, _⟩\n[GOAL]\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0\np : ℝ\nhp : 1 ≤ p\nhf : Summable fun i => f i ^ p\nhg : Summable fun i => g i ^ p\npos : 0 < p\nH₁ :\n  ∀ (s : Finset ι), ∑ i in s, (f i + g i) ^ p ≤ ((∑' (i : ι), f i ^ p) ^ (1 / p) + (∑' (i : ι), g i ^ p) ^ (1 / p)) ^ p\n⊢ ((∑' (i : ι), f i ^ p) ^ (1 / p) + (∑' (i : ι), g i ^ p) ^ (1 / p)) ^ p ∈\n    upperBounds (Set.range fun s => ∑ i in s, (f i + g i) ^ p)\n[PROOFSTEP]\nrintro a ⟨s, rfl⟩\n[GOAL]\ncase intro\nι : Type u\ns✝ : Finset ι\nf g : ι → ℝ≥0\np : ℝ\nhp : 1 ≤ p\nhf : Summable fun i => f i ^ p\nhg : Summable fun i => g i ^ p\npos : 0 < p\nH₁ :\n  ∀ (s : Finset ι), ∑ i in s, (f i + g i) ^ p ≤ ((∑' (i : ι), f i ^ p) ^ (1 / p) + (∑' (i : ι), g i ^ p) ^ (1 / p)) ^ p\ns : Finset ι\n⊢ (fun s => ∑ i in s, (f i + g i) ^ p) s ≤ ((∑' (i : ι), f i ^ p) ^ (1 / p) + (∑' (i : ι), g i ^ p) ^ (1 / p)) ^ p\n[PROOFSTEP]\nexact H₁ s\n[GOAL]\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0\np : ℝ\nhp : 1 ≤ p\nhf : Summable fun i => f i ^ p\nhg : Summable fun i => g i ^ p\npos : 0 < p\nH₁ :\n  ∀ (s : Finset ι), ∑ i in s, (f i + g i) ^ p ≤ ((∑' (i : ι), f i ^ p) ^ (1 / p) + (∑' (i : ι), g i ^ p) ^ (1 / p)) ^ p\nbdd : BddAbove (Set.range fun s => ∑ i in s, (f i + g i) ^ p)\n⊢ (Summable fun i => (f i + g i) ^ p) ∧\n    (∑' (i : ι), (f i + g i) ^ p) ^ (1 / p) ≤ (∑' (i : ι), f i ^ p) ^ (1 / p) + (∑' (i : ι), g i ^ p) ^ (1 / p)\n[PROOFSTEP]\nhave H₂ : Summable _ := (hasSum_of_isLUB _ (isLUB_ciSup bdd)).summable\n[GOAL]\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0\np : ℝ\nhp : 1 ≤ p\nhf : Summable fun i => f i ^ p\nhg : Summable fun i => g i ^ p\npos : 0 < p\nH₁ :\n  ∀ (s : Finset ι), ∑ i in s, (f i + g i) ^ p ≤ ((∑' (i : ι), f i ^ p) ^ (1 / p) + (∑' (i : ι), g i ^ p) ^ (1 / p)) ^ p\nbdd : BddAbove (Set.range fun s => ∑ i in s, (f i + g i) ^ p)\nH₂ : Summable fun i => (f i + g i) ^ p\n⊢ (Summable fun i => (f i + g i) ^ p) ∧\n    (∑' (i : ι), (f i + g i) ^ p) ^ (1 / p) ≤ (∑' (i : ι), f i ^ p) ^ (1 / p) + (∑' (i : ι), g i ^ p) ^ (1 / p)\n[PROOFSTEP]\nrefine' ⟨H₂, _⟩\n[GOAL]\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0\np : ℝ\nhp : 1 ≤ p\nhf : Summable fun i => f i ^ p\nhg : Summable fun i => g i ^ p\npos : 0 < p\nH₁ :\n  ∀ (s : Finset ι), ∑ i in s, (f i + g i) ^ p ≤ ((∑' (i : ι), f i ^ p) ^ (1 / p) + (∑' (i : ι), g i ^ p) ^ (1 / p)) ^ p\nbdd : BddAbove (Set.range fun s => ∑ i in s, (f i + g i) ^ p)\nH₂ : Summable fun i => (f i + g i) ^ p\n⊢ (∑' (i : ι), (f i + g i) ^ p) ^ (1 / p) ≤ (∑' (i : ι), f i ^ p) ^ (1 / p) + (∑' (i : ι), g i ^ p) ^ (1 / p)\n[PROOFSTEP]\nrw [NNReal.rpow_one_div_le_iff pos]\n[GOAL]\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0\np : ℝ\nhp : 1 ≤ p\nhf : Summable fun i => f i ^ p\nhg : Summable fun i => g i ^ p\npos : 0 < p\nH₁ :\n  ∀ (s : Finset ι), ∑ i in s, (f i + g i) ^ p ≤ ((∑' (i : ι), f i ^ p) ^ (1 / p) + (∑' (i : ι), g i ^ p) ^ (1 / p)) ^ p\nbdd : BddAbove (Set.range fun s => ∑ i in s, (f i + g i) ^ p)\nH₂ : Summable fun i => (f i + g i) ^ p\n⊢ ∑' (i : ι), (f i + g i) ^ p ≤ ((∑' (i : ι), f i ^ p) ^ (1 / p) + (∑' (i : ι), g i ^ p) ^ (1 / p)) ^ p\n[PROOFSTEP]\nrefine' tsum_le_of_sum_le H₂ H₁\n[GOAL]\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0\nA B : ℝ≥0\np : ℝ\nhp : 1 ≤ p\nhf : HasSum (fun i => f i ^ p) (A ^ p)\nhg : HasSum (fun i => g i ^ p) (B ^ p)\n⊢ ∃ C, C ≤ A + B ∧ HasSum (fun i => (f i + g i) ^ p) (C ^ p)\n[PROOFSTEP]\nhave hp' : p ≠ 0 := (lt_of_lt_of_le zero_lt_one hp).ne'\n[GOAL]\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0\nA B : ℝ≥0\np : ℝ\nhp : 1 ≤ p\nhf : HasSum (fun i => f i ^ p) (A ^ p)\nhg : HasSum (fun i => g i ^ p) (B ^ p)\nhp' : p ≠ 0\n⊢ ∃ C, C ≤ A + B ∧ HasSum (fun i => (f i + g i) ^ p) (C ^ p)\n[PROOFSTEP]\nobtain ⟨H₁, H₂⟩ := Lp_add_le_tsum hp hf.summable hg.summable\n[GOAL]\ncase intro\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0\nA B : ℝ≥0\np : ℝ\nhp : 1 ≤ p\nhf : HasSum (fun i => f i ^ p) (A ^ p)\nhg : HasSum (fun i => g i ^ p) (B ^ p)\nhp' : p ≠ 0\nH₁ : Summable fun i => (f i + g i) ^ p\nH₂ : (∑' (i : ι), (f i + g i) ^ p) ^ (1 / p) ≤ (∑' (i : ι), f i ^ p) ^ (1 / p) + (∑' (i : ι), g i ^ p) ^ (1 / p)\n⊢ ∃ C, C ≤ A + B ∧ HasSum (fun i => (f i + g i) ^ p) (C ^ p)\n[PROOFSTEP]\nhave hA : A = (∑' i : ι, f i ^ p) ^ (1 / p) := by rw [hf.tsum_eq, rpow_inv_rpow_self hp']\n[GOAL]\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0\nA B : ℝ≥0\np : ℝ\nhp : 1 ≤ p\nhf : HasSum (fun i => f i ^ p) (A ^ p)\nhg : HasSum (fun i => g i ^ p) (B ^ p)\nhp' : p ≠ 0\nH₁ : Summable fun i => (f i + g i) ^ p\nH₂ : (∑' (i : ι), (f i + g i) ^ p) ^ (1 / p) ≤ (∑' (i : ι), f i ^ p) ^ (1 / p) + (∑' (i : ι), g i ^ p) ^ (1 / p)\n⊢ A = (∑' (i : ι), f i ^ p) ^ (1 / p)\n[PROOFSTEP]\nrw [hf.tsum_eq, rpow_inv_rpow_self hp']\n[GOAL]\ncase intro\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0\nA B : ℝ≥0\np : ℝ\nhp : 1 ≤ p\nhf : HasSum (fun i => f i ^ p) (A ^ p)\nhg : HasSum (fun i => g i ^ p) (B ^ p)\nhp' : p ≠ 0\nH₁ : Summable fun i => (f i + g i) ^ p\nH₂ : (∑' (i : ι), (f i + g i) ^ p) ^ (1 / p) ≤ (∑' (i : ι), f i ^ p) ^ (1 / p) + (∑' (i : ι), g i ^ p) ^ (1 / p)\nhA : A = (∑' (i : ι), f i ^ p) ^ (1 / p)\n⊢ ∃ C, C ≤ A + B ∧ HasSum (fun i => (f i + g i) ^ p) (C ^ p)\n[PROOFSTEP]\nhave hB : B = (∑' i : ι, g i ^ p) ^ (1 / p) := by rw [hg.tsum_eq, rpow_inv_rpow_self hp']\n[GOAL]\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0\nA B : ℝ≥0\np : ℝ\nhp : 1 ≤ p\nhf : HasSum (fun i => f i ^ p) (A ^ p)\nhg : HasSum (fun i => g i ^ p) (B ^ p)\nhp' : p ≠ 0\nH₁ : Summable fun i => (f i + g i) ^ p\nH₂ : (∑' (i : ι), (f i + g i) ^ p) ^ (1 / p) ≤ (∑' (i : ι), f i ^ p) ^ (1 / p) + (∑' (i : ι), g i ^ p) ^ (1 / p)\nhA : A = (∑' (i : ι), f i ^ p) ^ (1 / p)\n⊢ B = (∑' (i : ι), g i ^ p) ^ (1 / p)\n[PROOFSTEP]\nrw [hg.tsum_eq, rpow_inv_rpow_self hp']\n[GOAL]\ncase intro\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0\nA B : ℝ≥0\np : ℝ\nhp : 1 ≤ p\nhf : HasSum (fun i => f i ^ p) (A ^ p)\nhg : HasSum (fun i => g i ^ p) (B ^ p)\nhp' : p ≠ 0\nH₁ : Summable fun i => (f i + g i) ^ p\nH₂ : (∑' (i : ι), (f i + g i) ^ p) ^ (1 / p) ≤ (∑' (i : ι), f i ^ p) ^ (1 / p) + (∑' (i : ι), g i ^ p) ^ (1 / p)\nhA : A = (∑' (i : ι), f i ^ p) ^ (1 / p)\nhB : B = (∑' (i : ι), g i ^ p) ^ (1 / p)\n⊢ ∃ C, C ≤ A + B ∧ HasSum (fun i => (f i + g i) ^ p) (C ^ p)\n[PROOFSTEP]\nrefine' ⟨(∑' i, (f i + g i) ^ p) ^ (1 / p), _, _⟩\n[GOAL]\ncase intro.refine'_1\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0\nA B : ℝ≥0\np : ℝ\nhp : 1 ≤ p\nhf : HasSum (fun i => f i ^ p) (A ^ p)\nhg : HasSum (fun i => g i ^ p) (B ^ p)\nhp' : p ≠ 0\nH₁ : Summable fun i => (f i + g i) ^ p\nH₂ : (∑' (i : ι), (f i + g i) ^ p) ^ (1 / p) ≤ (∑' (i : ι), f i ^ p) ^ (1 / p) + (∑' (i : ι), g i ^ p) ^ (1 / p)\nhA : A = (∑' (i : ι), f i ^ p) ^ (1 / p)\nhB : B = (∑' (i : ι), g i ^ p) ^ (1 / p)\n⊢ (∑' (i : ι), (f i + g i) ^ p) ^ (1 / p) ≤ A + B\n[PROOFSTEP]\nsimpa [hA, hB] using H₂\n[GOAL]\ncase intro.refine'_2\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0\nA B : ℝ≥0\np : ℝ\nhp : 1 ≤ p\nhf : HasSum (fun i => f i ^ p) (A ^ p)\nhg : HasSum (fun i => g i ^ p) (B ^ p)\nhp' : p ≠ 0\nH₁ : Summable fun i => (f i + g i) ^ p\nH₂ : (∑' (i : ι), (f i + g i) ^ p) ^ (1 / p) ≤ (∑' (i : ι), f i ^ p) ^ (1 / p) + (∑' (i : ι), g i ^ p) ^ (1 / p)\nhA : A = (∑' (i : ι), f i ^ p) ^ (1 / p)\nhB : B = (∑' (i : ι), g i ^ p) ^ (1 / p)\n⊢ HasSum (fun i => (f i + g i) ^ p) (((∑' (i : ι), (f i + g i) ^ p) ^ (1 / p)) ^ p)\n[PROOFSTEP]\nsimpa only [rpow_self_rpow_inv hp'] using H₁.hasSum\n[GOAL]\nι : Type u\ns : Finset ι\nf g : ι → ℝ\np q : ℝ\nhpq : IsConjugateExponent p q\n⊢ ∑ i in s, f i * g i ≤ (∑ i in s, |f i| ^ p) ^ (1 / p) * (∑ i in s, |g i| ^ q) ^ (1 / q)\n[PROOFSTEP]\nhave :=\n  NNReal.coe_le_coe.2\n    (NNReal.inner_le_Lp_mul_Lq s (fun i => ⟨_, abs_nonneg (f i)⟩) (fun i => ⟨_, abs_nonneg (g i)⟩) hpq)\n[GOAL]\nι : Type u\ns : Finset ι\nf g : ι → ℝ\np q : ℝ\nhpq : IsConjugateExponent p q\nthis :\n  ↑(∑ i in s,\n        (fun i => { val := |f i|, property := (_ : 0 ≤ |f i|) }) i *\n          (fun i => { val := |g i|, property := (_ : 0 ≤ |g i|) }) i) ≤\n    ↑((∑ i in s, (fun i => { val := |f i|, property := (_ : 0 ≤ |f i|) }) i ^ p) ^ (1 / p) *\n        (∑ i in s, (fun i => { val := |g i|, property := (_ : 0 ≤ |g i|) }) i ^ q) ^ (1 / q))\n⊢ ∑ i in s, f i * g i ≤ (∑ i in s, |f i| ^ p) ^ (1 / p) * (∑ i in s, |g i| ^ q) ^ (1 / q)\n[PROOFSTEP]\npush_cast at this \n[GOAL]\nι : Type u\ns : Finset ι\nf g : ι → ℝ\np q : ℝ\nhpq : IsConjugateExponent p q\nthis : ∑ x in s, |f x| * |g x| ≤ (∑ x in s, |f x| ^ p) ^ (1 / p) * (∑ x in s, |g x| ^ q) ^ (1 / q)\n⊢ ∑ i in s, f i * g i ≤ (∑ i in s, |f i| ^ p) ^ (1 / p) * (∑ i in s, |g i| ^ q) ^ (1 / q)\n[PROOFSTEP]\nrefine' le_trans (sum_le_sum fun i _ => _) this\n[GOAL]\nι : Type u\ns : Finset ι\nf g : ι → ℝ\np q : ℝ\nhpq : IsConjugateExponent p q\nthis : ∑ x in s, |f x| * |g x| ≤ (∑ x in s, |f x| ^ p) ^ (1 / p) * (∑ x in s, |g x| ^ q) ^ (1 / q)\ni : ι\nx✝ : i ∈ s\n⊢ f i * g i ≤ |f i| * |g i|\n[PROOFSTEP]\nsimp only [← abs_mul, le_abs_self]\n[GOAL]\nι : Type u\ns : Finset ι\nf g : ι → ℝ\np q : ℝ\nhp : 1 ≤ p\n⊢ (∑ i in s, |f i|) ^ p ≤ ↑(card s) ^ (p - 1) * ∑ i in s, |f i| ^ p\n[PROOFSTEP]\nhave := NNReal.coe_le_coe.2 (NNReal.rpow_sum_le_const_mul_sum_rpow s (fun i => ⟨_, abs_nonneg (f i)⟩) hp)\n[GOAL]\nι : Type u\ns : Finset ι\nf g : ι → ℝ\np q : ℝ\nhp : 1 ≤ p\nthis :\n  ↑((∑ i in s, (fun i => { val := |f i|, property := (_ : 0 ≤ |f i|) }) i) ^ p) ≤\n    ↑(↑(card s) ^ (p - 1) * ∑ i in s, (fun i => { val := |f i|, property := (_ : 0 ≤ |f i|) }) i ^ p)\n⊢ (∑ i in s, |f i|) ^ p ≤ ↑(card s) ^ (p - 1) * ∑ i in s, |f i| ^ p\n[PROOFSTEP]\npush_cast at this \n[GOAL]\nι : Type u\ns : Finset ι\nf g : ι → ℝ\np q : ℝ\nhp : 1 ≤ p\nthis : (∑ x in s, |f x|) ^ p ≤ ↑(card s) ^ (p - 1) * ∑ x in s, |f x| ^ p\n⊢ (∑ i in s, |f i|) ^ p ≤ ↑(card s) ^ (p - 1) * ∑ i in s, |f i| ^ p\n[PROOFSTEP]\nexact this\n[GOAL]\nι : Type u\ns : Finset ι\nf g : ι → ℝ\np q : ℝ\nhp : 1 ≤ p\n⊢ (∑ i in s, |f i + g i| ^ p) ^ (1 / p) ≤ (∑ i in s, |f i| ^ p) ^ (1 / p) + (∑ i in s, |g i| ^ p) ^ (1 / p)\n[PROOFSTEP]\nhave := NNReal.coe_le_coe.2 (NNReal.Lp_add_le s (fun i => ⟨_, abs_nonneg (f i)⟩) (fun i => ⟨_, abs_nonneg (g i)⟩) hp)\n[GOAL]\nι : Type u\ns : Finset ι\nf g : ι → ℝ\np q : ℝ\nhp : 1 ≤ p\nthis :\n  ↑((∑ i in s,\n          ((fun i => { val := |f i|, property := (_ : 0 ≤ |f i|) }) i +\n              (fun i => { val := |g i|, property := (_ : 0 ≤ |g i|) }) i) ^\n            p) ^\n        (1 / p)) ≤\n    ↑((∑ i in s, (fun i => { val := |f i|, property := (_ : 0 ≤ |f i|) }) i ^ p) ^ (1 / p) +\n        (∑ i in s, (fun i => { val := |g i|, property := (_ : 0 ≤ |g i|) }) i ^ p) ^ (1 / p))\n⊢ (∑ i in s, |f i + g i| ^ p) ^ (1 / p) ≤ (∑ i in s, |f i| ^ p) ^ (1 / p) + (∑ i in s, |g i| ^ p) ^ (1 / p)\n[PROOFSTEP]\npush_cast at this \n[GOAL]\nι : Type u\ns : Finset ι\nf g : ι → ℝ\np q : ℝ\nhp : 1 ≤ p\nthis : (∑ x in s, (|f x| + |g x|) ^ p) ^ (1 / p) ≤ (∑ x in s, |f x| ^ p) ^ (1 / p) + (∑ x in s, |g x| ^ p) ^ (1 / p)\n⊢ (∑ i in s, |f i + g i| ^ p) ^ (1 / p) ≤ (∑ i in s, |f i| ^ p) ^ (1 / p) + (∑ i in s, |g i| ^ p) ^ (1 / p)\n[PROOFSTEP]\nrefine' le_trans (rpow_le_rpow _ (sum_le_sum fun i _ => _) _) this\n[GOAL]\ncase refine'_1\nι : Type u\ns : Finset ι\nf g : ι → ℝ\np q : ℝ\nhp : 1 ≤ p\nthis : (∑ x in s, (|f x| + |g x|) ^ p) ^ (1 / p) ≤ (∑ x in s, |f x| ^ p) ^ (1 / p) + (∑ x in s, |g x| ^ p) ^ (1 / p)\n⊢ 0 ≤ ∑ i in s, |f i + g i| ^ p\n[PROOFSTEP]\nsimp [sum_nonneg, rpow_nonneg_of_nonneg, abs_nonneg, le_trans zero_le_one hp, abs_add, rpow_le_rpow]\n[GOAL]\ncase refine'_2\nι : Type u\ns : Finset ι\nf g : ι → ℝ\np q : ℝ\nhp : 1 ≤ p\nthis : (∑ x in s, (|f x| + |g x|) ^ p) ^ (1 / p) ≤ (∑ x in s, |f x| ^ p) ^ (1 / p) + (∑ x in s, |g x| ^ p) ^ (1 / p)\ni : ι\nx✝ : i ∈ s\n⊢ |f i + g i| ^ p ≤ (|f i| + |g i|) ^ p\n[PROOFSTEP]\nsimp [sum_nonneg, rpow_nonneg_of_nonneg, abs_nonneg, le_trans zero_le_one hp, abs_add, rpow_le_rpow]\n[GOAL]\ncase refine'_3\nι : Type u\ns : Finset ι\nf g : ι → ℝ\np q : ℝ\nhp : 1 ≤ p\nthis : (∑ x in s, (|f x| + |g x|) ^ p) ^ (1 / p) ≤ (∑ x in s, |f x| ^ p) ^ (1 / p) + (∑ x in s, |g x| ^ p) ^ (1 / p)\n⊢ 0 ≤ 1 / p\n[PROOFSTEP]\nsimp [sum_nonneg, rpow_nonneg_of_nonneg, abs_nonneg, le_trans zero_le_one hp, abs_add, rpow_le_rpow]\n[GOAL]\nι : Type u\ns : Finset ι\nf g : ι → ℝ\np q : ℝ\nhpq : IsConjugateExponent p q\nhf : ∀ (i : ι), i ∈ s → 0 ≤ f i\nhg : ∀ (i : ι), i ∈ s → 0 ≤ g i\n⊢ ∑ i in s, f i * g i ≤ (∑ i in s, f i ^ p) ^ (1 / p) * (∑ i in s, g i ^ q) ^ (1 / q)\n[PROOFSTEP]\nconvert inner_le_Lp_mul_Lq s f g hpq using 3\n[GOAL]\ncase h.e'_4.h.e'_5.h.e'_5\nι : Type u\ns : Finset ι\nf g : ι → ℝ\np q : ℝ\nhpq : IsConjugateExponent p q\nhf : ∀ (i : ι), i ∈ s → 0 ≤ f i\nhg : ∀ (i : ι), i ∈ s → 0 ≤ g i\n⊢ ∑ i in s, f i ^ p = ∑ i in s, |f i| ^ p\n[PROOFSTEP]\napply sum_congr rfl\n[GOAL]\ncase h.e'_4.h.e'_6.h.e'_5\nι : Type u\ns : Finset ι\nf g : ι → ℝ\np q : ℝ\nhpq : IsConjugateExponent p q\nhf : ∀ (i : ι), i ∈ s → 0 ≤ f i\nhg : ∀ (i : ι), i ∈ s → 0 ≤ g i\n⊢ ∑ i in s, g i ^ q = ∑ i in s, |g i| ^ q\n[PROOFSTEP]\napply sum_congr rfl\n[GOAL]\ncase h.e'_4.h.e'_5.h.e'_5\nι : Type u\ns : Finset ι\nf g : ι → ℝ\np q : ℝ\nhpq : IsConjugateExponent p q\nhf : ∀ (i : ι), i ∈ s → 0 ≤ f i\nhg : ∀ (i : ι), i ∈ s → 0 ≤ g i\n⊢ ∀ (x : ι), x ∈ s → f x ^ p = |f x| ^ p\n[PROOFSTEP]\nintro i hi\n[GOAL]\ncase h.e'_4.h.e'_6.h.e'_5\nι : Type u\ns : Finset ι\nf g : ι → ℝ\np q : ℝ\nhpq : IsConjugateExponent p q\nhf : ∀ (i : ι), i ∈ s → 0 ≤ f i\nhg : ∀ (i : ι), i ∈ s → 0 ≤ g i\n⊢ ∀ (x : ι), x ∈ s → g x ^ q = |g x| ^ q\n[PROOFSTEP]\nintro i hi\n[GOAL]\ncase h.e'_4.h.e'_5.h.e'_5\nι : Type u\ns : Finset ι\nf g : ι → ℝ\np q : ℝ\nhpq : IsConjugateExponent p q\nhf : ∀ (i : ι), i ∈ s → 0 ≤ f i\nhg : ∀ (i : ι), i ∈ s → 0 ≤ g i\ni : ι\nhi : i ∈ s\n⊢ f i ^ p = |f i| ^ p\n[PROOFSTEP]\nsimp only [abs_of_nonneg, hf i hi, hg i hi]\n[GOAL]\ncase h.e'_4.h.e'_6.h.e'_5\nι : Type u\ns : Finset ι\nf g : ι → ℝ\np q : ℝ\nhpq : IsConjugateExponent p q\nhf : ∀ (i : ι), i ∈ s → 0 ≤ f i\nhg : ∀ (i : ι), i ∈ s → 0 ≤ g i\ni : ι\nhi : i ∈ s\n⊢ g i ^ q = |g i| ^ q\n[PROOFSTEP]\nsimp only [abs_of_nonneg, hf i hi, hg i hi]\n[GOAL]\nι : Type u\ns : Finset ι\nf g : ι → ℝ\np q : ℝ\nhpq : IsConjugateExponent p q\nhf : ∀ (i : ι), 0 ≤ f i\nhg : ∀ (i : ι), 0 ≤ g i\nhf_sum : Summable fun i => f i ^ p\nhg_sum : Summable fun i => g i ^ q\n⊢ (Summable fun i => f i * g i) ∧\n    ∑' (i : ι), f i * g i ≤ (∑' (i : ι), f i ^ p) ^ (1 / p) * (∑' (i : ι), g i ^ q) ^ (1 / q)\n[PROOFSTEP]\nlift f to ι → ℝ≥0 using hf\n[GOAL]\ncase intro\nι : Type u\ns : Finset ι\ng : ι → ℝ\np q : ℝ\nhpq : IsConjugateExponent p q\nhg : ∀ (i : ι), 0 ≤ g i\nhg_sum : Summable fun i => g i ^ q\nf : ι → ℝ≥0\nhf_sum : Summable fun i => (fun i => ↑(f i)) i ^ p\n⊢ (Summable fun i => (fun i => ↑(f i)) i * g i) ∧\n    ∑' (i : ι), (fun i => ↑(f i)) i * g i ≤\n      (∑' (i : ι), (fun i => ↑(f i)) i ^ p) ^ (1 / p) * (∑' (i : ι), g i ^ q) ^ (1 / q)\n[PROOFSTEP]\nlift g to ι → ℝ≥0 using hg\n[GOAL]\ncase intro.intro\nι : Type u\ns : Finset ι\np q : ℝ\nhpq : IsConjugateExponent p q\nf : ι → ℝ≥0\nhf_sum : Summable fun i => (fun i => ↑(f i)) i ^ p\ng : ι → ℝ≥0\nhg_sum : Summable fun i => (fun i => ↑(g i)) i ^ q\n⊢ (Summable fun i => (fun i => ↑(f i)) i * (fun i => ↑(g i)) i) ∧\n    ∑' (i : ι), (fun i => ↑(f i)) i * (fun i => ↑(g i)) i ≤\n      (∑' (i : ι), (fun i => ↑(f i)) i ^ p) ^ (1 / p) * (∑' (i : ι), (fun i => ↑(g i)) i ^ q) ^ (1 / q)\n[PROOFSTEP]\nnorm_cast at *\n[GOAL]\ncase intro.intro\nι : Type u\ns : Finset ι\np q : ℝ\nhpq : IsConjugateExponent p q\nf g : ι → ℝ≥0\nhf_sum : Summable fun a => f a ^ p\nhg_sum : Summable fun a => g a ^ q\n⊢ (Summable fun a => f a * g a) ∧\n    ∑' (a : ι), f a * g a ≤ (∑' (a : ι), f a ^ p) ^ (1 / p) * (∑' (a : ι), g a ^ q) ^ (1 / q)\n[PROOFSTEP]\nexact NNReal.inner_le_Lp_mul_Lq_tsum hpq hf_sum hg_sum\n[GOAL]\nι : Type u\ns : Finset ι\nf g : ι → ℝ\np q : ℝ\nhpq : IsConjugateExponent p q\nA B : ℝ\nhA : 0 ≤ A\nhB : 0 ≤ B\nhf : ∀ (i : ι), 0 ≤ f i\nhg : ∀ (i : ι), 0 ≤ g i\nhf_sum : HasSum (fun i => f i ^ p) (A ^ p)\nhg_sum : HasSum (fun i => g i ^ q) (B ^ q)\n⊢ ∃ C, 0 ≤ C ∧ C ≤ A * B ∧ HasSum (fun i => f i * g i) C\n[PROOFSTEP]\nlift f to ι → ℝ≥0 using hf\n[GOAL]\ncase intro\nι : Type u\ns : Finset ι\ng : ι → ℝ\np q : ℝ\nhpq : IsConjugateExponent p q\nA B : ℝ\nhA : 0 ≤ A\nhB : 0 ≤ B\nhg : ∀ (i : ι), 0 ≤ g i\nhg_sum : HasSum (fun i => g i ^ q) (B ^ q)\nf : ι → ℝ≥0\nhf_sum : HasSum (fun i => (fun i => ↑(f i)) i ^ p) (A ^ p)\n⊢ ∃ C, 0 ≤ C ∧ C ≤ A * B ∧ HasSum (fun i => (fun i => ↑(f i)) i * g i) C\n[PROOFSTEP]\nlift g to ι → ℝ≥0 using hg\n[GOAL]\ncase intro.intro\nι : Type u\ns : Finset ι\np q : ℝ\nhpq : IsConjugateExponent p q\nA B : ℝ\nhA : 0 ≤ A\nhB : 0 ≤ B\nf : ι → ℝ≥0\nhf_sum : HasSum (fun i => (fun i => ↑(f i)) i ^ p) (A ^ p)\ng : ι → ℝ≥0\nhg_sum : HasSum (fun i => (fun i => ↑(g i)) i ^ q) (B ^ q)\n⊢ ∃ C, 0 ≤ C ∧ C ≤ A * B ∧ HasSum (fun i => (fun i => ↑(f i)) i * (fun i => ↑(g i)) i) C\n[PROOFSTEP]\nlift A to ℝ≥0 using hA\n[GOAL]\ncase intro.intro.intro\nι : Type u\ns : Finset ι\np q : ℝ\nhpq : IsConjugateExponent p q\nB : ℝ\nhB : 0 ≤ B\nf g : ι → ℝ≥0\nhg_sum : HasSum (fun i => (fun i => ↑(g i)) i ^ q) (B ^ q)\nA : ℝ≥0\nhf_sum : HasSum (fun i => (fun i => ↑(f i)) i ^ p) (↑A ^ p)\n⊢ ∃ C, 0 ≤ C ∧ C ≤ ↑A * B ∧ HasSum (fun i => (fun i => ↑(f i)) i * (fun i => ↑(g i)) i) C\n[PROOFSTEP]\nlift B to ℝ≥0 using hB\n[GOAL]\ncase intro.intro.intro.intro\nι : Type u\ns : Finset ι\np q : ℝ\nhpq : IsConjugateExponent p q\nf g : ι → ℝ≥0\nA : ℝ≥0\nhf_sum : HasSum (fun i => (fun i => ↑(f i)) i ^ p) (↑A ^ p)\nB : ℝ≥0\nhg_sum : HasSum (fun i => (fun i => ↑(g i)) i ^ q) (↑B ^ q)\n⊢ ∃ C, 0 ≤ C ∧ C ≤ ↑A * ↑B ∧ HasSum (fun i => (fun i => ↑(f i)) i * (fun i => ↑(g i)) i) C\n[PROOFSTEP]\nnorm_cast at hf_sum hg_sum \n[GOAL]\ncase intro.intro.intro.intro\nι : Type u\ns : Finset ι\np q : ℝ\nhpq : IsConjugateExponent p q\nf g : ι → ℝ≥0\nA B : ℝ≥0\nhf_sum : HasSum (fun a => f a ^ p) (A ^ p)\nhg_sum : HasSum (fun a => g a ^ q) (B ^ q)\n⊢ ∃ C, 0 ≤ C ∧ C ≤ ↑A * ↑B ∧ HasSum (fun i => (fun i => ↑(f i)) i * (fun i => ↑(g i)) i) C\n[PROOFSTEP]\nobtain ⟨C, hC, H⟩ := NNReal.inner_le_Lp_mul_Lq_hasSum hpq hf_sum hg_sum\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nι : Type u\ns : Finset ι\np q : ℝ\nhpq : IsConjugateExponent p q\nf g : ι → ℝ≥0\nA B : ℝ≥0\nhf_sum : HasSum (fun a => f a ^ p) (A ^ p)\nhg_sum : HasSum (fun a => g a ^ q) (B ^ q)\nC : ℝ≥0\nhC : C ≤ A * B\nH : HasSum (fun i => f i * g i) C\n⊢ ∃ C, 0 ≤ C ∧ C ≤ ↑A * ↑B ∧ HasSum (fun i => (fun i => ↑(f i)) i * (fun i => ↑(g i)) i) C\n[PROOFSTEP]\nrefine' ⟨C, C.prop, hC, _⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nι : Type u\ns : Finset ι\np q : ℝ\nhpq : IsConjugateExponent p q\nf g : ι → ℝ≥0\nA B : ℝ≥0\nhf_sum : HasSum (fun a => f a ^ p) (A ^ p)\nhg_sum : HasSum (fun a => g a ^ q) (B ^ q)\nC : ℝ≥0\nhC : C ≤ A * B\nH : HasSum (fun i => f i * g i) C\n⊢ HasSum (fun i => (fun i => ↑(f i)) i * (fun i => ↑(g i)) i) ↑C\n[PROOFSTEP]\nnorm_cast\n[GOAL]\nι : Type u\ns : Finset ι\nf g : ι → ℝ\np q : ℝ\nhp : 1 ≤ p\nhf : ∀ (i : ι), i ∈ s → 0 ≤ f i\n⊢ (∑ i in s, f i) ^ p ≤ ↑(card s) ^ (p - 1) * ∑ i in s, f i ^ p\n[PROOFSTEP]\nconvert rpow_sum_le_const_mul_sum_rpow s f hp using 2\n[GOAL]\ncase h.e'_3.h.e'_5\nι : Type u\ns : Finset ι\nf g : ι → ℝ\np q : ℝ\nhp : 1 ≤ p\nhf : ∀ (i : ι), i ∈ s → 0 ≤ f i\n⊢ ∑ i in s, f i = ∑ i in s, |f i|\n[PROOFSTEP]\napply sum_congr rfl\n[GOAL]\ncase h.e'_4.h.e'_6\nι : Type u\ns : Finset ι\nf g : ι → ℝ\np q : ℝ\nhp : 1 ≤ p\nhf : ∀ (i : ι), i ∈ s → 0 ≤ f i\n⊢ ∑ i in s, f i ^ p = ∑ i in s, |f i| ^ p\n[PROOFSTEP]\napply sum_congr rfl\n[GOAL]\ncase h.e'_3.h.e'_5\nι : Type u\ns : Finset ι\nf g : ι → ℝ\np q : ℝ\nhp : 1 ≤ p\nhf : ∀ (i : ι), i ∈ s → 0 ≤ f i\n⊢ ∀ (x : ι), x ∈ s → f x = |f x|\n[PROOFSTEP]\nintro i hi\n[GOAL]\ncase h.e'_4.h.e'_6\nι : Type u\ns : Finset ι\nf g : ι → ℝ\np q : ℝ\nhp : 1 ≤ p\nhf : ∀ (i : ι), i ∈ s → 0 ≤ f i\n⊢ ∀ (x : ι), x ∈ s → f x ^ p = |f x| ^ p\n[PROOFSTEP]\nintro i hi\n[GOAL]\ncase h.e'_3.h.e'_5\nι : Type u\ns : Finset ι\nf g : ι → ℝ\np q : ℝ\nhp : 1 ≤ p\nhf : ∀ (i : ι), i ∈ s → 0 ≤ f i\ni : ι\nhi : i ∈ s\n⊢ f i = |f i|\n[PROOFSTEP]\nsimp only [abs_of_nonneg, hf i hi]\n[GOAL]\ncase h.e'_4.h.e'_6\nι : Type u\ns : Finset ι\nf g : ι → ℝ\np q : ℝ\nhp : 1 ≤ p\nhf : ∀ (i : ι), i ∈ s → 0 ≤ f i\ni : ι\nhi : i ∈ s\n⊢ f i ^ p = |f i| ^ p\n[PROOFSTEP]\nsimp only [abs_of_nonneg, hf i hi]\n[GOAL]\nι : Type u\ns : Finset ι\nf g : ι → ℝ\np q : ℝ\nhp : 1 ≤ p\nhf : ∀ (i : ι), i ∈ s → 0 ≤ f i\nhg : ∀ (i : ι), i ∈ s → 0 ≤ g i\n⊢ (∑ i in s, (f i + g i) ^ p) ^ (1 / p) ≤ (∑ i in s, f i ^ p) ^ (1 / p) + (∑ i in s, g i ^ p) ^ (1 / p)\n[PROOFSTEP]\nconvert Lp_add_le s f g hp using 2 <;> [skip; congr 1; congr 1]\n[GOAL]\nι : Type u\ns : Finset ι\nf g : ι → ℝ\np q : ℝ\nhp : 1 ≤ p\nhf : ∀ (i : ι), i ∈ s → 0 ≤ f i\nhg : ∀ (i : ι), i ∈ s → 0 ≤ g i\n⊢ (∑ i in s, (f i + g i) ^ p) ^ (1 / p) ≤ (∑ i in s, f i ^ p) ^ (1 / p) + (∑ i in s, g i ^ p) ^ (1 / p)\n[PROOFSTEP]\nconvert Lp_add_le s f g hp using 2\n[GOAL]\ncase h.e'_3.h.e'_5\nι : Type u\ns : Finset ι\nf g : ι → ℝ\np q : ℝ\nhp : 1 ≤ p\nhf : ∀ (i : ι), i ∈ s → 0 ≤ f i\nhg : ∀ (i : ι), i ∈ s → 0 ≤ g i\n⊢ ∑ i in s, (f i + g i) ^ p = ∑ i in s, |f i + g i| ^ p\n[PROOFSTEP]\nskip\n[GOAL]\ncase h.e'_4.h.e'_5\nι : Type u\ns : Finset ι\nf g : ι → ℝ\np q : ℝ\nhp : 1 ≤ p\nhf : ∀ (i : ι), i ∈ s → 0 ≤ f i\nhg : ∀ (i : ι), i ∈ s → 0 ≤ g i\n⊢ (∑ i in s, f i ^ p) ^ (1 / p) = (∑ i in s, |f i| ^ p) ^ (1 / p)\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase h.e'_4.h.e'_6\nι : Type u\ns : Finset ι\nf g : ι → ℝ\np q : ℝ\nhp : 1 ≤ p\nhf : ∀ (i : ι), i ∈ s → 0 ≤ f i\nhg : ∀ (i : ι), i ∈ s → 0 ≤ g i\n⊢ (∑ i in s, g i ^ p) ^ (1 / p) = (∑ i in s, |g i| ^ p) ^ (1 / p)\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase h.e'_3.h.e'_5\nι : Type u\ns : Finset ι\nf g : ι → ℝ\np q : ℝ\nhp : 1 ≤ p\nhf : ∀ (i : ι), i ∈ s → 0 ≤ f i\nhg : ∀ (i : ι), i ∈ s → 0 ≤ g i\n⊢ ∑ i in s, (f i + g i) ^ p = ∑ i in s, |f i + g i| ^ p\n[PROOFSTEP]\napply sum_congr rfl\n[GOAL]\ncase h.e'_4.h.e'_5.e_a\nι : Type u\ns : Finset ι\nf g : ι → ℝ\np q : ℝ\nhp : 1 ≤ p\nhf : ∀ (i : ι), i ∈ s → 0 ≤ f i\nhg : ∀ (i : ι), i ∈ s → 0 ≤ g i\n⊢ ∑ i in s, f i ^ p = ∑ i in s, |f i| ^ p\n[PROOFSTEP]\napply sum_congr rfl\n[GOAL]\ncase h.e'_4.h.e'_6.e_a\nι : Type u\ns : Finset ι\nf g : ι → ℝ\np q : ℝ\nhp : 1 ≤ p\nhf : ∀ (i : ι), i ∈ s → 0 ≤ f i\nhg : ∀ (i : ι), i ∈ s → 0 ≤ g i\n⊢ ∑ i in s, g i ^ p = ∑ i in s, |g i| ^ p\n[PROOFSTEP]\napply sum_congr rfl\n[GOAL]\ncase h.e'_3.h.e'_5\nι : Type u\ns : Finset ι\nf g : ι → ℝ\np q : ℝ\nhp : 1 ≤ p\nhf : ∀ (i : ι), i ∈ s → 0 ≤ f i\nhg : ∀ (i : ι), i ∈ s → 0 ≤ g i\n⊢ ∀ (x : ι), x ∈ s → (f x + g x) ^ p = |f x + g x| ^ p\n[PROOFSTEP]\nintro i hi\n[GOAL]\ncase h.e'_4.h.e'_5.e_a\nι : Type u\ns : Finset ι\nf g : ι → ℝ\np q : ℝ\nhp : 1 ≤ p\nhf : ∀ (i : ι), i ∈ s → 0 ≤ f i\nhg : ∀ (i : ι), i ∈ s → 0 ≤ g i\n⊢ ∀ (x : ι), x ∈ s → f x ^ p = |f x| ^ p\n[PROOFSTEP]\nintro i hi\n[GOAL]\ncase h.e'_4.h.e'_6.e_a\nι : Type u\ns : Finset ι\nf g : ι → ℝ\np q : ℝ\nhp : 1 ≤ p\nhf : ∀ (i : ι), i ∈ s → 0 ≤ f i\nhg : ∀ (i : ι), i ∈ s → 0 ≤ g i\n⊢ ∀ (x : ι), x ∈ s → g x ^ p = |g x| ^ p\n[PROOFSTEP]\nintro i hi\n[GOAL]\ncase h.e'_3.h.e'_5\nι : Type u\ns : Finset ι\nf g : ι → ℝ\np q : ℝ\nhp : 1 ≤ p\nhf : ∀ (i : ι), i ∈ s → 0 ≤ f i\nhg : ∀ (i : ι), i ∈ s → 0 ≤ g i\ni : ι\nhi : i ∈ s\n⊢ (f i + g i) ^ p = |f i + g i| ^ p\n[PROOFSTEP]\nsimp only [abs_of_nonneg, hf i hi, hg i hi, add_nonneg]\n[GOAL]\ncase h.e'_4.h.e'_5.e_a\nι : Type u\ns : Finset ι\nf g : ι → ℝ\np q : ℝ\nhp : 1 ≤ p\nhf : ∀ (i : ι), i ∈ s → 0 ≤ f i\nhg : ∀ (i : ι), i ∈ s → 0 ≤ g i\ni : ι\nhi : i ∈ s\n⊢ f i ^ p = |f i| ^ p\n[PROOFSTEP]\nsimp only [abs_of_nonneg, hf i hi, hg i hi, add_nonneg]\n[GOAL]\ncase h.e'_4.h.e'_6.e_a\nι : Type u\ns : Finset ι\nf g : ι → ℝ\np q : ℝ\nhp : 1 ≤ p\nhf : ∀ (i : ι), i ∈ s → 0 ≤ f i\nhg : ∀ (i : ι), i ∈ s → 0 ≤ g i\ni : ι\nhi : i ∈ s\n⊢ g i ^ p = |g i| ^ p\n[PROOFSTEP]\nsimp only [abs_of_nonneg, hf i hi, hg i hi, add_nonneg]\n[GOAL]\nι : Type u\ns : Finset ι\nf g : ι → ℝ\np q : ℝ\nhp : 1 ≤ p\nhf : ∀ (i : ι), 0 ≤ f i\nhg : ∀ (i : ι), 0 ≤ g i\nhf_sum : Summable fun i => f i ^ p\nhg_sum : Summable fun i => g i ^ p\n⊢ (Summable fun i => (f i + g i) ^ p) ∧\n    (∑' (i : ι), (f i + g i) ^ p) ^ (1 / p) ≤ (∑' (i : ι), f i ^ p) ^ (1 / p) + (∑' (i : ι), g i ^ p) ^ (1 / p)\n[PROOFSTEP]\nlift f to ι → ℝ≥0 using hf\n[GOAL]\ncase intro\nι : Type u\ns : Finset ι\ng : ι → ℝ\np q : ℝ\nhp : 1 ≤ p\nhg : ∀ (i : ι), 0 ≤ g i\nhg_sum : Summable fun i => g i ^ p\nf : ι → ℝ≥0\nhf_sum : Summable fun i => (fun i => ↑(f i)) i ^ p\n⊢ (Summable fun i => ((fun i => ↑(f i)) i + g i) ^ p) ∧\n    (∑' (i : ι), ((fun i => ↑(f i)) i + g i) ^ p) ^ (1 / p) ≤\n      (∑' (i : ι), (fun i => ↑(f i)) i ^ p) ^ (1 / p) + (∑' (i : ι), g i ^ p) ^ (1 / p)\n[PROOFSTEP]\nlift g to ι → ℝ≥0 using hg\n[GOAL]\ncase intro.intro\nι : Type u\ns : Finset ι\np q : ℝ\nhp : 1 ≤ p\nf : ι → ℝ≥0\nhf_sum : Summable fun i => (fun i => ↑(f i)) i ^ p\ng : ι → ℝ≥0\nhg_sum : Summable fun i => (fun i => ↑(g i)) i ^ p\n⊢ (Summable fun i => ((fun i => ↑(f i)) i + (fun i => ↑(g i)) i) ^ p) ∧\n    (∑' (i : ι), ((fun i => ↑(f i)) i + (fun i => ↑(g i)) i) ^ p) ^ (1 / p) ≤\n      (∑' (i : ι), (fun i => ↑(f i)) i ^ p) ^ (1 / p) + (∑' (i : ι), (fun i => ↑(g i)) i ^ p) ^ (1 / p)\n[PROOFSTEP]\nnorm_cast0 at *\n[GOAL]\ncase intro.intro\nι : Type u\ns : Finset ι\np q : ℝ\nf g : ι → ℝ≥0\nhp : 1 ≤ p\nhf_sum : Summable fun a => f a ^ p\nhg_sum : Summable fun a => g a ^ p\n⊢ (Summable fun a => (f a + g a) ^ p) ∧\n    (∑' (a : ι), (f a + g a) ^ p) ^ (1 / p) ≤ (∑' (a : ι), f a ^ p) ^ (1 / p) + (∑' (a : ι), g a ^ p) ^ (1 / p)\n[PROOFSTEP]\nexact NNReal.Lp_add_le_tsum hp hf_sum hg_sum\n[GOAL]\nι : Type u\ns : Finset ι\nf g : ι → ℝ\np q : ℝ\nhp : 1 ≤ p\nhf : ∀ (i : ι), 0 ≤ f i\nhg : ∀ (i : ι), 0 ≤ g i\nA B : ℝ\nhA : 0 ≤ A\nhB : 0 ≤ B\nhfA : HasSum (fun i => f i ^ p) (A ^ p)\nhgB : HasSum (fun i => g i ^ p) (B ^ p)\n⊢ ∃ C, 0 ≤ C ∧ C ≤ A + B ∧ HasSum (fun i => (f i + g i) ^ p) (C ^ p)\n[PROOFSTEP]\nlift f to ι → ℝ≥0 using hf\n[GOAL]\ncase intro\nι : Type u\ns : Finset ι\ng : ι → ℝ\np q : ℝ\nhp : 1 ≤ p\nhg : ∀ (i : ι), 0 ≤ g i\nA B : ℝ\nhA : 0 ≤ A\nhB : 0 ≤ B\nhgB : HasSum (fun i => g i ^ p) (B ^ p)\nf : ι → ℝ≥0\nhfA : HasSum (fun i => (fun i => ↑(f i)) i ^ p) (A ^ p)\n⊢ ∃ C, 0 ≤ C ∧ C ≤ A + B ∧ HasSum (fun i => ((fun i => ↑(f i)) i + g i) ^ p) (C ^ p)\n[PROOFSTEP]\nlift g to ι → ℝ≥0 using hg\n[GOAL]\ncase intro.intro\nι : Type u\ns : Finset ι\np q : ℝ\nhp : 1 ≤ p\nA B : ℝ\nhA : 0 ≤ A\nhB : 0 ≤ B\nf : ι → ℝ≥0\nhfA : HasSum (fun i => (fun i => ↑(f i)) i ^ p) (A ^ p)\ng : ι → ℝ≥0\nhgB : HasSum (fun i => (fun i => ↑(g i)) i ^ p) (B ^ p)\n⊢ ∃ C, 0 ≤ C ∧ C ≤ A + B ∧ HasSum (fun i => ((fun i => ↑(f i)) i + (fun i => ↑(g i)) i) ^ p) (C ^ p)\n[PROOFSTEP]\nlift A to ℝ≥0 using hA\n[GOAL]\ncase intro.intro.intro\nι : Type u\ns : Finset ι\np q : ℝ\nhp : 1 ≤ p\nB : ℝ\nhB : 0 ≤ B\nf g : ι → ℝ≥0\nhgB : HasSum (fun i => (fun i => ↑(g i)) i ^ p) (B ^ p)\nA : ℝ≥0\nhfA : HasSum (fun i => (fun i => ↑(f i)) i ^ p) (↑A ^ p)\n⊢ ∃ C, 0 ≤ C ∧ C ≤ ↑A + B ∧ HasSum (fun i => ((fun i => ↑(f i)) i + (fun i => ↑(g i)) i) ^ p) (C ^ p)\n[PROOFSTEP]\nlift B to ℝ≥0 using hB\n[GOAL]\ncase intro.intro.intro.intro\nι : Type u\ns : Finset ι\np q : ℝ\nhp : 1 ≤ p\nf g : ι → ℝ≥0\nA : ℝ≥0\nhfA : HasSum (fun i => (fun i => ↑(f i)) i ^ p) (↑A ^ p)\nB : ℝ≥0\nhgB : HasSum (fun i => (fun i => ↑(g i)) i ^ p) (↑B ^ p)\n⊢ ∃ C, 0 ≤ C ∧ C ≤ ↑A + ↑B ∧ HasSum (fun i => ((fun i => ↑(f i)) i + (fun i => ↑(g i)) i) ^ p) (C ^ p)\n[PROOFSTEP]\nnorm_cast at hfA hgB \n[GOAL]\ncase intro.intro.intro.intro\nι : Type u\ns : Finset ι\np q : ℝ\nhp : 1 ≤ p\nf g : ι → ℝ≥0\nA B : ℝ≥0\nhfA : HasSum (fun a => f a ^ p) (A ^ p)\nhgB : HasSum (fun a => g a ^ p) (B ^ p)\n⊢ ∃ C, 0 ≤ C ∧ C ≤ ↑A + ↑B ∧ HasSum (fun i => ((fun i => ↑(f i)) i + (fun i => ↑(g i)) i) ^ p) (C ^ p)\n[PROOFSTEP]\nobtain ⟨C, hC₁, hC₂⟩ := NNReal.Lp_add_le_hasSum hp hfA hgB\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nι : Type u\ns : Finset ι\np q : ℝ\nhp : 1 ≤ p\nf g : ι → ℝ≥0\nA B : ℝ≥0\nhfA : HasSum (fun a => f a ^ p) (A ^ p)\nhgB : HasSum (fun a => g a ^ p) (B ^ p)\nC : ℝ≥0\nhC₁ : C ≤ A + B\nhC₂ : HasSum (fun i => (f i + g i) ^ p) (C ^ p)\n⊢ ∃ C, 0 ≤ C ∧ C ≤ ↑A + ↑B ∧ HasSum (fun i => ((fun i => ↑(f i)) i + (fun i => ↑(g i)) i) ^ p) (C ^ p)\n[PROOFSTEP]\nuse C\n[GOAL]\ncase h\nι : Type u\ns : Finset ι\np q : ℝ\nhp : 1 ≤ p\nf g : ι → ℝ≥0\nA B : ℝ≥0\nhfA : HasSum (fun a => f a ^ p) (A ^ p)\nhgB : HasSum (fun a => g a ^ p) (B ^ p)\nC : ℝ≥0\nhC₁ : C ≤ A + B\nhC₂ : HasSum (fun i => (f i + g i) ^ p) (C ^ p)\n⊢ 0 ≤ ↑C ∧ ↑C ≤ ↑A + ↑B ∧ HasSum (fun i => ((fun i => ↑(f i)) i + (fun i => ↑(g i)) i) ^ p) (↑C ^ p)\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase h\nι : Type u\ns : Finset ι\np q : ℝ\nhp : 1 ≤ p\nf g : ι → ℝ≥0\nA B : ℝ≥0\nhfA : HasSum (fun a => f a ^ p) (A ^ p)\nhgB : HasSum (fun a => g a ^ p) (B ^ p)\nC : ℝ≥0\nhC₁ : C ≤ A + B\nhC₂ : HasSum (fun i => (f i + g i) ^ p) (C ^ p)\n⊢ 0 ≤ C ∧ C ≤ A + B ∧ HasSum (fun a => (f a + g a) ^ p) (C ^ p)\n[PROOFSTEP]\nexact ⟨zero_le _, hC₁, hC₂⟩\n[GOAL]\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0∞\np q : ℝ\nhpq : Real.IsConjugateExponent p q\n⊢ ∑ i in s, f i * g i ≤ (∑ i in s, f i ^ p) ^ (1 / p) * (∑ i in s, g i ^ q) ^ (1 / q)\n[PROOFSTEP]\nby_cases H : (∑ i in s, f i ^ p) ^ (1 / p) = 0 ∨ (∑ i in s, g i ^ q) ^ (1 / q) = 0\n[GOAL]\ncase pos\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0∞\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nH : (∑ i in s, f i ^ p) ^ (1 / p) = 0 ∨ (∑ i in s, g i ^ q) ^ (1 / q) = 0\n⊢ ∑ i in s, f i * g i ≤ (∑ i in s, f i ^ p) ^ (1 / p) * (∑ i in s, g i ^ q) ^ (1 / q)\n[PROOFSTEP]\nreplace H : (∀ i ∈ s, f i = 0) ∨ ∀ i ∈ s, g i = 0\n[GOAL]\ncase H\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0∞\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nH : (∑ i in s, f i ^ p) ^ (1 / p) = 0 ∨ (∑ i in s, g i ^ q) ^ (1 / q) = 0\n⊢ (∀ (i : ι), i ∈ s → f i = 0) ∨ ∀ (i : ι), i ∈ s → g i = 0\n[PROOFSTEP]\nsimpa [ENNReal.rpow_eq_zero_iff, hpq.pos, hpq.symm.pos, asymm hpq.pos, asymm hpq.symm.pos,\n  sum_eq_zero_iff_of_nonneg] using H\n[GOAL]\ncase pos\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0∞\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nH : (∀ (i : ι), i ∈ s → f i = 0) ∨ ∀ (i : ι), i ∈ s → g i = 0\n⊢ ∑ i in s, f i * g i ≤ (∑ i in s, f i ^ p) ^ (1 / p) * (∑ i in s, g i ^ q) ^ (1 / q)\n[PROOFSTEP]\nhave : ∀ i ∈ s, f i * g i = 0 := fun i hi => by cases' H with H H <;> simp [H i hi]\n[GOAL]\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0∞\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nH : (∀ (i : ι), i ∈ s → f i = 0) ∨ ∀ (i : ι), i ∈ s → g i = 0\ni : ι\nhi : i ∈ s\n⊢ f i * g i = 0\n[PROOFSTEP]\ncases' H with H H\n[GOAL]\ncase inl\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0∞\np q : ℝ\nhpq : Real.IsConjugateExponent p q\ni : ι\nhi : i ∈ s\nH : ∀ (i : ι), i ∈ s → f i = 0\n⊢ f i * g i = 0\n[PROOFSTEP]\nsimp [H i hi]\n[GOAL]\ncase inr\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0∞\np q : ℝ\nhpq : Real.IsConjugateExponent p q\ni : ι\nhi : i ∈ s\nH : ∀ (i : ι), i ∈ s → g i = 0\n⊢ f i * g i = 0\n[PROOFSTEP]\nsimp [H i hi]\n[GOAL]\ncase pos\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0∞\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nH : (∀ (i : ι), i ∈ s → f i = 0) ∨ ∀ (i : ι), i ∈ s → g i = 0\nthis : ∀ (i : ι), i ∈ s → f i * g i = 0\n⊢ ∑ i in s, f i * g i ≤ (∑ i in s, f i ^ p) ^ (1 / p) * (∑ i in s, g i ^ q) ^ (1 / q)\n[PROOFSTEP]\nhave : ∑ i in s, f i * g i = ∑ i in s, 0 := sum_congr rfl this\n[GOAL]\ncase pos\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0∞\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nH : (∀ (i : ι), i ∈ s → f i = 0) ∨ ∀ (i : ι), i ∈ s → g i = 0\nthis✝ : ∀ (i : ι), i ∈ s → f i * g i = 0\nthis : ∑ i in s, f i * g i = ∑ i in s, 0\n⊢ ∑ i in s, f i * g i ≤ (∑ i in s, f i ^ p) ^ (1 / p) * (∑ i in s, g i ^ q) ^ (1 / q)\n[PROOFSTEP]\nsimp [this]\n[GOAL]\ncase neg\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0∞\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nH : ¬((∑ i in s, f i ^ p) ^ (1 / p) = 0 ∨ (∑ i in s, g i ^ q) ^ (1 / q) = 0)\n⊢ ∑ i in s, f i * g i ≤ (∑ i in s, f i ^ p) ^ (1 / p) * (∑ i in s, g i ^ q) ^ (1 / q)\n[PROOFSTEP]\npush_neg at H \n[GOAL]\ncase neg\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0∞\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nH : (∑ i in s, f i ^ p) ^ (1 / p) ≠ 0 ∧ (∑ i in s, g i ^ q) ^ (1 / q) ≠ 0\n⊢ ∑ i in s, f i * g i ≤ (∑ i in s, f i ^ p) ^ (1 / p) * (∑ i in s, g i ^ q) ^ (1 / q)\n[PROOFSTEP]\nby_cases H' : (∑ i in s, f i ^ p) ^ (1 / p) = ⊤ ∨ (∑ i in s, g i ^ q) ^ (1 / q) = ⊤\n[GOAL]\ncase pos\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0∞\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nH : (∑ i in s, f i ^ p) ^ (1 / p) ≠ 0 ∧ (∑ i in s, g i ^ q) ^ (1 / q) ≠ 0\nH' : (∑ i in s, f i ^ p) ^ (1 / p) = ⊤ ∨ (∑ i in s, g i ^ q) ^ (1 / q) = ⊤\n⊢ ∑ i in s, f i * g i ≤ (∑ i in s, f i ^ p) ^ (1 / p) * (∑ i in s, g i ^ q) ^ (1 / q)\n[PROOFSTEP]\ncases' H' with H' H'\n[GOAL]\ncase pos.inl\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0∞\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nH : (∑ i in s, f i ^ p) ^ (1 / p) ≠ 0 ∧ (∑ i in s, g i ^ q) ^ (1 / q) ≠ 0\nH' : (∑ i in s, f i ^ p) ^ (1 / p) = ⊤\n⊢ ∑ i in s, f i * g i ≤ (∑ i in s, f i ^ p) ^ (1 / p) * (∑ i in s, g i ^ q) ^ (1 / q)\n[PROOFSTEP]\nsimp [H', -one_div, -sum_eq_zero_iff, -rpow_eq_zero_iff, H]\n[GOAL]\ncase pos.inr\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0∞\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nH : (∑ i in s, f i ^ p) ^ (1 / p) ≠ 0 ∧ (∑ i in s, g i ^ q) ^ (1 / q) ≠ 0\nH' : (∑ i in s, g i ^ q) ^ (1 / q) = ⊤\n⊢ ∑ i in s, f i * g i ≤ (∑ i in s, f i ^ p) ^ (1 / p) * (∑ i in s, g i ^ q) ^ (1 / q)\n[PROOFSTEP]\nsimp [H', -one_div, -sum_eq_zero_iff, -rpow_eq_zero_iff, H]\n[GOAL]\ncase neg\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0∞\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nH : (∑ i in s, f i ^ p) ^ (1 / p) ≠ 0 ∧ (∑ i in s, g i ^ q) ^ (1 / q) ≠ 0\nH' : ¬((∑ i in s, f i ^ p) ^ (1 / p) = ⊤ ∨ (∑ i in s, g i ^ q) ^ (1 / q) = ⊤)\n⊢ ∑ i in s, f i * g i ≤ (∑ i in s, f i ^ p) ^ (1 / p) * (∑ i in s, g i ^ q) ^ (1 / q)\n[PROOFSTEP]\nreplace H' : (∀ i ∈ s, f i ≠ ⊤) ∧ ∀ i ∈ s, g i ≠ ⊤\n[GOAL]\ncase H'\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0∞\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nH : (∑ i in s, f i ^ p) ^ (1 / p) ≠ 0 ∧ (∑ i in s, g i ^ q) ^ (1 / q) ≠ 0\nH' : ¬((∑ i in s, f i ^ p) ^ (1 / p) = ⊤ ∨ (∑ i in s, g i ^ q) ^ (1 / q) = ⊤)\n⊢ (∀ (i : ι), i ∈ s → f i ≠ ⊤) ∧ ∀ (i : ι), i ∈ s → g i ≠ ⊤\n[PROOFSTEP]\nsimpa [ENNReal.rpow_eq_top_iff, asymm hpq.pos, asymm hpq.symm.pos, hpq.pos, hpq.symm.pos, ENNReal.sum_eq_top_iff,\n  not_or] using H'\n[GOAL]\ncase neg\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0∞\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nH : (∑ i in s, f i ^ p) ^ (1 / p) ≠ 0 ∧ (∑ i in s, g i ^ q) ^ (1 / q) ≠ 0\nH' : (∀ (i : ι), i ∈ s → f i ≠ ⊤) ∧ ∀ (i : ι), i ∈ s → g i ≠ ⊤\n⊢ ∑ i in s, f i * g i ≤ (∑ i in s, f i ^ p) ^ (1 / p) * (∑ i in s, g i ^ q) ^ (1 / q)\n[PROOFSTEP]\nhave :=\n  ENNReal.coe_le_coe.2\n    (@NNReal.inner_le_Lp_mul_Lq _ s (fun i => ENNReal.toNNReal (f i)) (fun i => ENNReal.toNNReal (g i)) _ _ hpq)\n[GOAL]\ncase neg\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0∞\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nH : (∑ i in s, f i ^ p) ^ (1 / p) ≠ 0 ∧ (∑ i in s, g i ^ q) ^ (1 / q) ≠ 0\nH' : (∀ (i : ι), i ∈ s → f i ≠ ⊤) ∧ ∀ (i : ι), i ∈ s → g i ≠ ⊤\nthis :\n  ↑(∑ i in s, (fun i => ENNReal.toNNReal (f i)) i * (fun i => ENNReal.toNNReal (g i)) i) ≤\n    ↑((∑ i in s, (fun i => ENNReal.toNNReal (f i)) i ^ p) ^ (1 / p) *\n        (∑ i in s, (fun i => ENNReal.toNNReal (g i)) i ^ q) ^ (1 / q))\n⊢ ∑ i in s, f i * g i ≤ (∑ i in s, f i ^ p) ^ (1 / p) * (∑ i in s, g i ^ q) ^ (1 / q)\n[PROOFSTEP]\nsimp [← ENNReal.coe_rpow_of_nonneg, le_of_lt hpq.pos, le_of_lt hpq.one_div_pos, le_of_lt hpq.symm.pos,\n  le_of_lt hpq.symm.one_div_pos] at this \n[GOAL]\ncase neg\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0∞\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nH : (∑ i in s, f i ^ p) ^ (1 / p) ≠ 0 ∧ (∑ i in s, g i ^ q) ^ (1 / q) ≠ 0\nH' : (∀ (i : ι), i ∈ s → f i ≠ ⊤) ∧ ∀ (i : ι), i ∈ s → g i ≠ ⊤\nthis :\n  ∑ x in s, ↑(ENNReal.toNNReal (f x)) * ↑(ENNReal.toNNReal (g x)) ≤\n    (∑ x in s, ↑(ENNReal.toNNReal (f x)) ^ p) ^ p⁻¹ * (∑ x in s, ↑(ENNReal.toNNReal (g x)) ^ q) ^ q⁻¹\n⊢ ∑ i in s, f i * g i ≤ (∑ i in s, f i ^ p) ^ (1 / p) * (∑ i in s, g i ^ q) ^ (1 / q)\n[PROOFSTEP]\nconvert this using 1 <;> [skip; congr 2] <;> [skip; skip; simp; skip; simp]\n[GOAL]\ncase neg\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0∞\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nH : (∑ i in s, f i ^ p) ^ (1 / p) ≠ 0 ∧ (∑ i in s, g i ^ q) ^ (1 / q) ≠ 0\nH' : (∀ (i : ι), i ∈ s → f i ≠ ⊤) ∧ ∀ (i : ι), i ∈ s → g i ≠ ⊤\nthis :\n  ∑ x in s, ↑(ENNReal.toNNReal (f x)) * ↑(ENNReal.toNNReal (g x)) ≤\n    (∑ x in s, ↑(ENNReal.toNNReal (f x)) ^ p) ^ p⁻¹ * (∑ x in s, ↑(ENNReal.toNNReal (g x)) ^ q) ^ q⁻¹\n⊢ ∑ i in s, f i * g i ≤ (∑ i in s, f i ^ p) ^ (1 / p) * (∑ i in s, g i ^ q) ^ (1 / q)\n[PROOFSTEP]\nconvert this using 1 <;> [skip; congr 2]\n[GOAL]\ncase neg\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0∞\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nH : (∑ i in s, f i ^ p) ^ (1 / p) ≠ 0 ∧ (∑ i in s, g i ^ q) ^ (1 / q) ≠ 0\nH' : (∀ (i : ι), i ∈ s → f i ≠ ⊤) ∧ ∀ (i : ι), i ∈ s → g i ≠ ⊤\nthis :\n  ∑ x in s, ↑(ENNReal.toNNReal (f x)) * ↑(ENNReal.toNNReal (g x)) ≤\n    (∑ x in s, ↑(ENNReal.toNNReal (f x)) ^ p) ^ p⁻¹ * (∑ x in s, ↑(ENNReal.toNNReal (g x)) ^ q) ^ q⁻¹\n⊢ ∑ i in s, f i * g i ≤ (∑ i in s, f i ^ p) ^ (1 / p) * (∑ i in s, g i ^ q) ^ (1 / q)\n[PROOFSTEP]\nconvert this using 1\n[GOAL]\ncase h.e'_3\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0∞\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nH : (∑ i in s, f i ^ p) ^ (1 / p) ≠ 0 ∧ (∑ i in s, g i ^ q) ^ (1 / q) ≠ 0\nH' : (∀ (i : ι), i ∈ s → f i ≠ ⊤) ∧ ∀ (i : ι), i ∈ s → g i ≠ ⊤\nthis :\n  ∑ x in s, ↑(ENNReal.toNNReal (f x)) * ↑(ENNReal.toNNReal (g x)) ≤\n    (∑ x in s, ↑(ENNReal.toNNReal (f x)) ^ p) ^ p⁻¹ * (∑ x in s, ↑(ENNReal.toNNReal (g x)) ^ q) ^ q⁻¹\n⊢ ∑ i in s, f i * g i = ∑ x in s, ↑(ENNReal.toNNReal (f x)) * ↑(ENNReal.toNNReal (g x))\n[PROOFSTEP]\nskip\n[GOAL]\ncase h.e'_4\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0∞\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nH : (∑ i in s, f i ^ p) ^ (1 / p) ≠ 0 ∧ (∑ i in s, g i ^ q) ^ (1 / q) ≠ 0\nH' : (∀ (i : ι), i ∈ s → f i ≠ ⊤) ∧ ∀ (i : ι), i ∈ s → g i ≠ ⊤\nthis :\n  ∑ x in s, ↑(ENNReal.toNNReal (f x)) * ↑(ENNReal.toNNReal (g x)) ≤\n    (∑ x in s, ↑(ENNReal.toNNReal (f x)) ^ p) ^ p⁻¹ * (∑ x in s, ↑(ENNReal.toNNReal (g x)) ^ q) ^ q⁻¹\n⊢ (∑ i in s, f i ^ p) ^ (1 / p) * (∑ i in s, g i ^ q) ^ (1 / q) =\n    (∑ x in s, ↑(ENNReal.toNNReal (f x)) ^ p) ^ p⁻¹ * (∑ x in s, ↑(ENNReal.toNNReal (g x)) ^ q) ^ q⁻¹\n[PROOFSTEP]\ncongr 2\n[GOAL]\ncase h.e'_3\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0∞\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nH : (∑ i in s, f i ^ p) ^ (1 / p) ≠ 0 ∧ (∑ i in s, g i ^ q) ^ (1 / q) ≠ 0\nH' : (∀ (i : ι), i ∈ s → f i ≠ ⊤) ∧ ∀ (i : ι), i ∈ s → g i ≠ ⊤\nthis :\n  ∑ x in s, ↑(ENNReal.toNNReal (f x)) * ↑(ENNReal.toNNReal (g x)) ≤\n    (∑ x in s, ↑(ENNReal.toNNReal (f x)) ^ p) ^ p⁻¹ * (∑ x in s, ↑(ENNReal.toNNReal (g x)) ^ q) ^ q⁻¹\n⊢ ∑ i in s, f i * g i = ∑ x in s, ↑(ENNReal.toNNReal (f x)) * ↑(ENNReal.toNNReal (g x))\n[PROOFSTEP]\nskip\n[GOAL]\ncase h.e'_4.e_a.e_a\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0∞\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nH : (∑ i in s, f i ^ p) ^ (1 / p) ≠ 0 ∧ (∑ i in s, g i ^ q) ^ (1 / q) ≠ 0\nH' : (∀ (i : ι), i ∈ s → f i ≠ ⊤) ∧ ∀ (i : ι), i ∈ s → g i ≠ ⊤\nthis :\n  ∑ x in s, ↑(ENNReal.toNNReal (f x)) * ↑(ENNReal.toNNReal (g x)) ≤\n    (∑ x in s, ↑(ENNReal.toNNReal (f x)) ^ p) ^ p⁻¹ * (∑ x in s, ↑(ENNReal.toNNReal (g x)) ^ q) ^ q⁻¹\n⊢ ∑ i in s, f i ^ p = ∑ x in s, ↑(ENNReal.toNNReal (f x)) ^ p\n[PROOFSTEP]\nskip\n[GOAL]\ncase h.e'_4.e_a.e_a\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0∞\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nH : (∑ i in s, f i ^ p) ^ (1 / p) ≠ 0 ∧ (∑ i in s, g i ^ q) ^ (1 / q) ≠ 0\nH' : (∀ (i : ι), i ∈ s → f i ≠ ⊤) ∧ ∀ (i : ι), i ∈ s → g i ≠ ⊤\nthis :\n  ∑ x in s, ↑(ENNReal.toNNReal (f x)) * ↑(ENNReal.toNNReal (g x)) ≤\n    (∑ x in s, ↑(ENNReal.toNNReal (f x)) ^ p) ^ p⁻¹ * (∑ x in s, ↑(ENNReal.toNNReal (g x)) ^ q) ^ q⁻¹\n⊢ 1 / p = p⁻¹\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.e'_4.e_a.e_a\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0∞\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nH : (∑ i in s, f i ^ p) ^ (1 / p) ≠ 0 ∧ (∑ i in s, g i ^ q) ^ (1 / q) ≠ 0\nH' : (∀ (i : ι), i ∈ s → f i ≠ ⊤) ∧ ∀ (i : ι), i ∈ s → g i ≠ ⊤\nthis :\n  ∑ x in s, ↑(ENNReal.toNNReal (f x)) * ↑(ENNReal.toNNReal (g x)) ≤\n    (∑ x in s, ↑(ENNReal.toNNReal (f x)) ^ p) ^ p⁻¹ * (∑ x in s, ↑(ENNReal.toNNReal (g x)) ^ q) ^ q⁻¹\n⊢ ∑ i in s, g i ^ q = ∑ x in s, ↑(ENNReal.toNNReal (g x)) ^ q\n[PROOFSTEP]\nskip\n[GOAL]\ncase h.e'_4.e_a.e_a\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0∞\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nH : (∑ i in s, f i ^ p) ^ (1 / p) ≠ 0 ∧ (∑ i in s, g i ^ q) ^ (1 / q) ≠ 0\nH' : (∀ (i : ι), i ∈ s → f i ≠ ⊤) ∧ ∀ (i : ι), i ∈ s → g i ≠ ⊤\nthis :\n  ∑ x in s, ↑(ENNReal.toNNReal (f x)) * ↑(ENNReal.toNNReal (g x)) ≤\n    (∑ x in s, ↑(ENNReal.toNNReal (f x)) ^ p) ^ p⁻¹ * (∑ x in s, ↑(ENNReal.toNNReal (g x)) ^ q) ^ q⁻¹\n⊢ 1 / q = q⁻¹\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.e'_3\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0∞\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nH : (∑ i in s, f i ^ p) ^ (1 / p) ≠ 0 ∧ (∑ i in s, g i ^ q) ^ (1 / q) ≠ 0\nH' : (∀ (i : ι), i ∈ s → f i ≠ ⊤) ∧ ∀ (i : ι), i ∈ s → g i ≠ ⊤\nthis :\n  ∑ x in s, ↑(ENNReal.toNNReal (f x)) * ↑(ENNReal.toNNReal (g x)) ≤\n    (∑ x in s, ↑(ENNReal.toNNReal (f x)) ^ p) ^ p⁻¹ * (∑ x in s, ↑(ENNReal.toNNReal (g x)) ^ q) ^ q⁻¹\n⊢ ∑ i in s, f i * g i = ∑ x in s, ↑(ENNReal.toNNReal (f x)) * ↑(ENNReal.toNNReal (g x))\n[PROOFSTEP]\nrefine Finset.sum_congr rfl fun i hi => ?_\n[GOAL]\ncase h.e'_3\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0∞\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nH : (∑ i in s, f i ^ p) ^ (1 / p) ≠ 0 ∧ (∑ i in s, g i ^ q) ^ (1 / q) ≠ 0\nH' : (∀ (i : ι), i ∈ s → f i ≠ ⊤) ∧ ∀ (i : ι), i ∈ s → g i ≠ ⊤\nthis :\n  ∑ x in s, ↑(ENNReal.toNNReal (f x)) * ↑(ENNReal.toNNReal (g x)) ≤\n    (∑ x in s, ↑(ENNReal.toNNReal (f x)) ^ p) ^ p⁻¹ * (∑ x in s, ↑(ENNReal.toNNReal (g x)) ^ q) ^ q⁻¹\ni : ι\nhi : i ∈ s\n⊢ f i * g i = ↑(ENNReal.toNNReal (f i)) * ↑(ENNReal.toNNReal (g i))\n[PROOFSTEP]\nsimp [H'.1 i hi, H'.2 i hi, -WithZero.coe_mul, WithTop.coe_mul.symm]\n[GOAL]\ncase h.e'_4.e_a.e_a\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0∞\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nH : (∑ i in s, f i ^ p) ^ (1 / p) ≠ 0 ∧ (∑ i in s, g i ^ q) ^ (1 / q) ≠ 0\nH' : (∀ (i : ι), i ∈ s → f i ≠ ⊤) ∧ ∀ (i : ι), i ∈ s → g i ≠ ⊤\nthis :\n  ∑ x in s, ↑(ENNReal.toNNReal (f x)) * ↑(ENNReal.toNNReal (g x)) ≤\n    (∑ x in s, ↑(ENNReal.toNNReal (f x)) ^ p) ^ p⁻¹ * (∑ x in s, ↑(ENNReal.toNNReal (g x)) ^ q) ^ q⁻¹\n⊢ ∑ i in s, f i ^ p = ∑ x in s, ↑(ENNReal.toNNReal (f x)) ^ p\n[PROOFSTEP]\nrefine Finset.sum_congr rfl fun i hi => ?_\n[GOAL]\ncase h.e'_4.e_a.e_a\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0∞\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nH : (∑ i in s, f i ^ p) ^ (1 / p) ≠ 0 ∧ (∑ i in s, g i ^ q) ^ (1 / q) ≠ 0\nH' : (∀ (i : ι), i ∈ s → f i ≠ ⊤) ∧ ∀ (i : ι), i ∈ s → g i ≠ ⊤\nthis :\n  ∑ x in s, ↑(ENNReal.toNNReal (f x)) * ↑(ENNReal.toNNReal (g x)) ≤\n    (∑ x in s, ↑(ENNReal.toNNReal (f x)) ^ p) ^ p⁻¹ * (∑ x in s, ↑(ENNReal.toNNReal (g x)) ^ q) ^ q⁻¹\ni : ι\nhi : i ∈ s\n⊢ f i ^ p = ↑(ENNReal.toNNReal (f i)) ^ p\n[PROOFSTEP]\nsimp [H'.1 i hi, H'.2 i hi, -WithZero.coe_mul, WithTop.coe_mul.symm]\n[GOAL]\ncase h.e'_4.e_a.e_a\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0∞\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nH : (∑ i in s, f i ^ p) ^ (1 / p) ≠ 0 ∧ (∑ i in s, g i ^ q) ^ (1 / q) ≠ 0\nH' : (∀ (i : ι), i ∈ s → f i ≠ ⊤) ∧ ∀ (i : ι), i ∈ s → g i ≠ ⊤\nthis :\n  ∑ x in s, ↑(ENNReal.toNNReal (f x)) * ↑(ENNReal.toNNReal (g x)) ≤\n    (∑ x in s, ↑(ENNReal.toNNReal (f x)) ^ p) ^ p⁻¹ * (∑ x in s, ↑(ENNReal.toNNReal (g x)) ^ q) ^ q⁻¹\n⊢ ∑ i in s, g i ^ q = ∑ x in s, ↑(ENNReal.toNNReal (g x)) ^ q\n[PROOFSTEP]\nrefine Finset.sum_congr rfl fun i hi => ?_\n[GOAL]\ncase h.e'_4.e_a.e_a\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0∞\np q : ℝ\nhpq : Real.IsConjugateExponent p q\nH : (∑ i in s, f i ^ p) ^ (1 / p) ≠ 0 ∧ (∑ i in s, g i ^ q) ^ (1 / q) ≠ 0\nH' : (∀ (i : ι), i ∈ s → f i ≠ ⊤) ∧ ∀ (i : ι), i ∈ s → g i ≠ ⊤\nthis :\n  ∑ x in s, ↑(ENNReal.toNNReal (f x)) * ↑(ENNReal.toNNReal (g x)) ≤\n    (∑ x in s, ↑(ENNReal.toNNReal (f x)) ^ p) ^ p⁻¹ * (∑ x in s, ↑(ENNReal.toNNReal (g x)) ^ q) ^ q⁻¹\ni : ι\nhi : i ∈ s\n⊢ g i ^ q = ↑(ENNReal.toNNReal (g i)) ^ q\n[PROOFSTEP]\nsimp [H'.1 i hi, H'.2 i hi, -WithZero.coe_mul, WithTop.coe_mul.symm]\n[GOAL]\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0∞\np q : ℝ\nhp : 1 ≤ p\n⊢ (∑ i in s, f i) ^ p ≤ ↑(card s) ^ (p - 1) * ∑ i in s, f i ^ p\n[PROOFSTEP]\ncases' eq_or_lt_of_le hp with hp hp\n[GOAL]\ncase inl\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0∞\np q : ℝ\nhp✝ : 1 ≤ p\nhp : 1 = p\n⊢ (∑ i in s, f i) ^ p ≤ ↑(card s) ^ (p - 1) * ∑ i in s, f i ^ p\n[PROOFSTEP]\nsimp [← hp]\n[GOAL]\ncase inr\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0∞\np q : ℝ\nhp✝ : 1 ≤ p\nhp : 1 < p\n⊢ (∑ i in s, f i) ^ p ≤ ↑(card s) ^ (p - 1) * ∑ i in s, f i ^ p\n[PROOFSTEP]\nlet q : ℝ := p / (p - 1)\n[GOAL]\ncase inr\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0∞\np q✝ : ℝ\nhp✝ : 1 ≤ p\nhp : 1 < p\nq : ℝ := p / (p - 1)\n⊢ (∑ i in s, f i) ^ p ≤ ↑(card s) ^ (p - 1) * ∑ i in s, f i ^ p\n[PROOFSTEP]\nhave hpq : p.IsConjugateExponent q := by rw [Real.isConjugateExponent_iff hp]\n[GOAL]\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0∞\np q✝ : ℝ\nhp✝ : 1 ≤ p\nhp : 1 < p\nq : ℝ := p / (p - 1)\n⊢ Real.IsConjugateExponent p q\n[PROOFSTEP]\nrw [Real.isConjugateExponent_iff hp]\n[GOAL]\ncase inr\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0∞\np q✝ : ℝ\nhp✝ : 1 ≤ p\nhp : 1 < p\nq : ℝ := p / (p - 1)\nhpq : Real.IsConjugateExponent p q\n⊢ (∑ i in s, f i) ^ p ≤ ↑(card s) ^ (p - 1) * ∑ i in s, f i ^ p\n[PROOFSTEP]\nhave hp₁ : 1 / p * p = 1 := one_div_mul_cancel hpq.ne_zero\n[GOAL]\ncase inr\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0∞\np q✝ : ℝ\nhp✝ : 1 ≤ p\nhp : 1 < p\nq : ℝ := p / (p - 1)\nhpq : Real.IsConjugateExponent p q\nhp₁ : 1 / p * p = 1\n⊢ (∑ i in s, f i) ^ p ≤ ↑(card s) ^ (p - 1) * ∑ i in s, f i ^ p\n[PROOFSTEP]\nhave hq : 1 / q * p = p - 1 := by\n  rw [← hpq.div_conj_eq_sub_one]\n  ring\n[GOAL]\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0∞\np q✝ : ℝ\nhp✝ : 1 ≤ p\nhp : 1 < p\nq : ℝ := p / (p - 1)\nhpq : Real.IsConjugateExponent p q\nhp₁ : 1 / p * p = 1\n⊢ 1 / q * p = p - 1\n[PROOFSTEP]\nrw [← hpq.div_conj_eq_sub_one]\n[GOAL]\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0∞\np q✝ : ℝ\nhp✝ : 1 ≤ p\nhp : 1 < p\nq : ℝ := p / (p - 1)\nhpq : Real.IsConjugateExponent p q\nhp₁ : 1 / p * p = 1\n⊢ 1 / q * p = p / q\n[PROOFSTEP]\nring\n[GOAL]\ncase inr\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0∞\np q✝ : ℝ\nhp✝ : 1 ≤ p\nhp : 1 < p\nq : ℝ := p / (p - 1)\nhpq : Real.IsConjugateExponent p q\nhp₁ : 1 / p * p = 1\nhq : 1 / q * p = p - 1\n⊢ (∑ i in s, f i) ^ p ≤ ↑(card s) ^ (p - 1) * ∑ i in s, f i ^ p\n[PROOFSTEP]\nsimpa only [ENNReal.mul_rpow_of_nonneg _ _ hpq.nonneg, ← ENNReal.rpow_mul, hp₁, hq, coe_one, one_mul, one_rpow,\n  rpow_one, Pi.one_apply, sum_const, Nat.smul_one_eq_coe] using\n  ENNReal.rpow_le_rpow (inner_le_Lp_mul_Lq s 1 f hpq.symm) hpq.nonneg\n[GOAL]\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0∞\np q : ℝ\nhp : 1 ≤ p\n⊢ (∑ i in s, (f i + g i) ^ p) ^ (1 / p) ≤ (∑ i in s, f i ^ p) ^ (1 / p) + (∑ i in s, g i ^ p) ^ (1 / p)\n[PROOFSTEP]\nby_cases H' : (∑ i in s, f i ^ p) ^ (1 / p) = ⊤ ∨ (∑ i in s, g i ^ p) ^ (1 / p) = ⊤\n[GOAL]\ncase pos\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0∞\np q : ℝ\nhp : 1 ≤ p\nH' : (∑ i in s, f i ^ p) ^ (1 / p) = ⊤ ∨ (∑ i in s, g i ^ p) ^ (1 / p) = ⊤\n⊢ (∑ i in s, (f i + g i) ^ p) ^ (1 / p) ≤ (∑ i in s, f i ^ p) ^ (1 / p) + (∑ i in s, g i ^ p) ^ (1 / p)\n[PROOFSTEP]\ncases' H' with H' H'\n[GOAL]\ncase pos.inl\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0∞\np q : ℝ\nhp : 1 ≤ p\nH' : (∑ i in s, f i ^ p) ^ (1 / p) = ⊤\n⊢ (∑ i in s, (f i + g i) ^ p) ^ (1 / p) ≤ (∑ i in s, f i ^ p) ^ (1 / p) + (∑ i in s, g i ^ p) ^ (1 / p)\n[PROOFSTEP]\nsimp [H', -one_div]\n[GOAL]\ncase pos.inr\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0∞\np q : ℝ\nhp : 1 ≤ p\nH' : (∑ i in s, g i ^ p) ^ (1 / p) = ⊤\n⊢ (∑ i in s, (f i + g i) ^ p) ^ (1 / p) ≤ (∑ i in s, f i ^ p) ^ (1 / p) + (∑ i in s, g i ^ p) ^ (1 / p)\n[PROOFSTEP]\nsimp [H', -one_div]\n[GOAL]\ncase neg\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0∞\np q : ℝ\nhp : 1 ≤ p\nH' : ¬((∑ i in s, f i ^ p) ^ (1 / p) = ⊤ ∨ (∑ i in s, g i ^ p) ^ (1 / p) = ⊤)\n⊢ (∑ i in s, (f i + g i) ^ p) ^ (1 / p) ≤ (∑ i in s, f i ^ p) ^ (1 / p) + (∑ i in s, g i ^ p) ^ (1 / p)\n[PROOFSTEP]\nhave pos : 0 < p := lt_of_lt_of_le zero_lt_one hp\n[GOAL]\ncase neg\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0∞\np q : ℝ\nhp : 1 ≤ p\nH' : ¬((∑ i in s, f i ^ p) ^ (1 / p) = ⊤ ∨ (∑ i in s, g i ^ p) ^ (1 / p) = ⊤)\npos : 0 < p\n⊢ (∑ i in s, (f i + g i) ^ p) ^ (1 / p) ≤ (∑ i in s, f i ^ p) ^ (1 / p) + (∑ i in s, g i ^ p) ^ (1 / p)\n[PROOFSTEP]\nreplace H' : (∀ i ∈ s, f i ≠ ⊤) ∧ ∀ i ∈ s, g i ≠ ⊤\n[GOAL]\ncase H'\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0∞\np q : ℝ\nhp : 1 ≤ p\nH' : ¬((∑ i in s, f i ^ p) ^ (1 / p) = ⊤ ∨ (∑ i in s, g i ^ p) ^ (1 / p) = ⊤)\npos : 0 < p\n⊢ (∀ (i : ι), i ∈ s → f i ≠ ⊤) ∧ ∀ (i : ι), i ∈ s → g i ≠ ⊤\n[PROOFSTEP]\nsimpa [ENNReal.rpow_eq_top_iff, asymm pos, pos, ENNReal.sum_eq_top_iff, not_or] using H'\n[GOAL]\ncase neg\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0∞\np q : ℝ\nhp : 1 ≤ p\npos : 0 < p\nH' : (∀ (i : ι), i ∈ s → f i ≠ ⊤) ∧ ∀ (i : ι), i ∈ s → g i ≠ ⊤\n⊢ (∑ i in s, (f i + g i) ^ p) ^ (1 / p) ≤ (∑ i in s, f i ^ p) ^ (1 / p) + (∑ i in s, g i ^ p) ^ (1 / p)\n[PROOFSTEP]\nhave :=\n  ENNReal.coe_le_coe.2 (@NNReal.Lp_add_le _ s (fun i => ENNReal.toNNReal (f i)) (fun i => ENNReal.toNNReal (g i)) _ hp)\n[GOAL]\ncase neg\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0∞\np q : ℝ\nhp : 1 ≤ p\npos : 0 < p\nH' : (∀ (i : ι), i ∈ s → f i ≠ ⊤) ∧ ∀ (i : ι), i ∈ s → g i ≠ ⊤\nthis :\n  ↑((∑ i in s, ((fun i => ENNReal.toNNReal (f i)) i + (fun i => ENNReal.toNNReal (g i)) i) ^ p) ^ (1 / p)) ≤\n    ↑((∑ i in s, (fun i => ENNReal.toNNReal (f i)) i ^ p) ^ (1 / p) +\n        (∑ i in s, (fun i => ENNReal.toNNReal (g i)) i ^ p) ^ (1 / p))\n⊢ (∑ i in s, (f i + g i) ^ p) ^ (1 / p) ≤ (∑ i in s, f i ^ p) ^ (1 / p) + (∑ i in s, g i ^ p) ^ (1 / p)\n[PROOFSTEP]\npush_cast [← ENNReal.coe_rpow_of_nonneg, le_of_lt pos, le_of_lt (one_div_pos.2 pos)] at this \n[GOAL]\ncase neg\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0∞\np q : ℝ\nhp : 1 ≤ p\npos : 0 < p\nH' : (∀ (i : ι), i ∈ s → f i ≠ ⊤) ∧ ∀ (i : ι), i ∈ s → g i ≠ ⊤\nthis :\n  (∑ x in s, (↑(ENNReal.toNNReal (f x)) + ↑(ENNReal.toNNReal (g x))) ^ p) ^ (1 / p) ≤\n    (∑ x in s, ↑(ENNReal.toNNReal (f x)) ^ p) ^ (1 / p) + (∑ x in s, ↑(ENNReal.toNNReal (g x)) ^ p) ^ (1 / p)\n⊢ (∑ i in s, (f i + g i) ^ p) ^ (1 / p) ≤ (∑ i in s, f i ^ p) ^ (1 / p) + (∑ i in s, g i ^ p) ^ (1 / p)\n[PROOFSTEP]\nconvert this using 2 <;> [skip; congr 1; congr 1]\n[GOAL]\ncase neg\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0∞\np q : ℝ\nhp : 1 ≤ p\npos : 0 < p\nH' : (∀ (i : ι), i ∈ s → f i ≠ ⊤) ∧ ∀ (i : ι), i ∈ s → g i ≠ ⊤\nthis :\n  (∑ x in s, (↑(ENNReal.toNNReal (f x)) + ↑(ENNReal.toNNReal (g x))) ^ p) ^ (1 / p) ≤\n    (∑ x in s, ↑(ENNReal.toNNReal (f x)) ^ p) ^ (1 / p) + (∑ x in s, ↑(ENNReal.toNNReal (g x)) ^ p) ^ (1 / p)\n⊢ (∑ i in s, (f i + g i) ^ p) ^ (1 / p) ≤ (∑ i in s, f i ^ p) ^ (1 / p) + (∑ i in s, g i ^ p) ^ (1 / p)\n[PROOFSTEP]\nconvert this using 2\n[GOAL]\ncase h.e'_3.h.e'_5\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0∞\np q : ℝ\nhp : 1 ≤ p\npos : 0 < p\nH' : (∀ (i : ι), i ∈ s → f i ≠ ⊤) ∧ ∀ (i : ι), i ∈ s → g i ≠ ⊤\nthis :\n  (∑ x in s, (↑(ENNReal.toNNReal (f x)) + ↑(ENNReal.toNNReal (g x))) ^ p) ^ (1 / p) ≤\n    (∑ x in s, ↑(ENNReal.toNNReal (f x)) ^ p) ^ (1 / p) + (∑ x in s, ↑(ENNReal.toNNReal (g x)) ^ p) ^ (1 / p)\n⊢ ∑ i in s, (f i + g i) ^ p = ∑ x in s, (↑(ENNReal.toNNReal (f x)) + ↑(ENNReal.toNNReal (g x))) ^ p\n[PROOFSTEP]\nskip\n[GOAL]\ncase h.e'_4.h.e'_5\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0∞\np q : ℝ\nhp : 1 ≤ p\npos : 0 < p\nH' : (∀ (i : ι), i ∈ s → f i ≠ ⊤) ∧ ∀ (i : ι), i ∈ s → g i ≠ ⊤\nthis :\n  (∑ x in s, (↑(ENNReal.toNNReal (f x)) + ↑(ENNReal.toNNReal (g x))) ^ p) ^ (1 / p) ≤\n    (∑ x in s, ↑(ENNReal.toNNReal (f x)) ^ p) ^ (1 / p) + (∑ x in s, ↑(ENNReal.toNNReal (g x)) ^ p) ^ (1 / p)\n⊢ (∑ i in s, f i ^ p) ^ (1 / p) = (∑ x in s, ↑(ENNReal.toNNReal (f x)) ^ p) ^ (1 / p)\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase h.e'_4.h.e'_6\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0∞\np q : ℝ\nhp : 1 ≤ p\npos : 0 < p\nH' : (∀ (i : ι), i ∈ s → f i ≠ ⊤) ∧ ∀ (i : ι), i ∈ s → g i ≠ ⊤\nthis :\n  (∑ x in s, (↑(ENNReal.toNNReal (f x)) + ↑(ENNReal.toNNReal (g x))) ^ p) ^ (1 / p) ≤\n    (∑ x in s, ↑(ENNReal.toNNReal (f x)) ^ p) ^ (1 / p) + (∑ x in s, ↑(ENNReal.toNNReal (g x)) ^ p) ^ (1 / p)\n⊢ (∑ i in s, g i ^ p) ^ (1 / p) = (∑ x in s, ↑(ENNReal.toNNReal (g x)) ^ p) ^ (1 / p)\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase h.e'_3.h.e'_5\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0∞\np q : ℝ\nhp : 1 ≤ p\npos : 0 < p\nH' : (∀ (i : ι), i ∈ s → f i ≠ ⊤) ∧ ∀ (i : ι), i ∈ s → g i ≠ ⊤\nthis :\n  (∑ x in s, (↑(ENNReal.toNNReal (f x)) + ↑(ENNReal.toNNReal (g x))) ^ p) ^ (1 / p) ≤\n    (∑ x in s, ↑(ENNReal.toNNReal (f x)) ^ p) ^ (1 / p) + (∑ x in s, ↑(ENNReal.toNNReal (g x)) ^ p) ^ (1 / p)\n⊢ ∑ i in s, (f i + g i) ^ p = ∑ x in s, (↑(ENNReal.toNNReal (f x)) + ↑(ENNReal.toNNReal (g x))) ^ p\n[PROOFSTEP]\nrefine Finset.sum_congr rfl fun i hi => ?_\n[GOAL]\ncase h.e'_3.h.e'_5\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0∞\np q : ℝ\nhp : 1 ≤ p\npos : 0 < p\nH' : (∀ (i : ι), i ∈ s → f i ≠ ⊤) ∧ ∀ (i : ι), i ∈ s → g i ≠ ⊤\nthis :\n  (∑ x in s, (↑(ENNReal.toNNReal (f x)) + ↑(ENNReal.toNNReal (g x))) ^ p) ^ (1 / p) ≤\n    (∑ x in s, ↑(ENNReal.toNNReal (f x)) ^ p) ^ (1 / p) + (∑ x in s, ↑(ENNReal.toNNReal (g x)) ^ p) ^ (1 / p)\ni : ι\nhi : i ∈ s\n⊢ (f i + g i) ^ p = (↑(ENNReal.toNNReal (f i)) + ↑(ENNReal.toNNReal (g i))) ^ p\n[PROOFSTEP]\nsimp [H'.1 i hi, H'.2 i hi]\n[GOAL]\ncase h.e'_4.h.e'_5.e_a\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0∞\np q : ℝ\nhp : 1 ≤ p\npos : 0 < p\nH' : (∀ (i : ι), i ∈ s → f i ≠ ⊤) ∧ ∀ (i : ι), i ∈ s → g i ≠ ⊤\nthis :\n  (∑ x in s, (↑(ENNReal.toNNReal (f x)) + ↑(ENNReal.toNNReal (g x))) ^ p) ^ (1 / p) ≤\n    (∑ x in s, ↑(ENNReal.toNNReal (f x)) ^ p) ^ (1 / p) + (∑ x in s, ↑(ENNReal.toNNReal (g x)) ^ p) ^ (1 / p)\n⊢ ∑ i in s, f i ^ p = ∑ x in s, ↑(ENNReal.toNNReal (f x)) ^ p\n[PROOFSTEP]\nrefine Finset.sum_congr rfl fun i hi => ?_\n[GOAL]\ncase h.e'_4.h.e'_5.e_a\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0∞\np q : ℝ\nhp : 1 ≤ p\npos : 0 < p\nH' : (∀ (i : ι), i ∈ s → f i ≠ ⊤) ∧ ∀ (i : ι), i ∈ s → g i ≠ ⊤\nthis :\n  (∑ x in s, (↑(ENNReal.toNNReal (f x)) + ↑(ENNReal.toNNReal (g x))) ^ p) ^ (1 / p) ≤\n    (∑ x in s, ↑(ENNReal.toNNReal (f x)) ^ p) ^ (1 / p) + (∑ x in s, ↑(ENNReal.toNNReal (g x)) ^ p) ^ (1 / p)\ni : ι\nhi : i ∈ s\n⊢ f i ^ p = ↑(ENNReal.toNNReal (f i)) ^ p\n[PROOFSTEP]\nsimp [H'.1 i hi, H'.2 i hi]\n[GOAL]\ncase h.e'_4.h.e'_6.e_a\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0∞\np q : ℝ\nhp : 1 ≤ p\npos : 0 < p\nH' : (∀ (i : ι), i ∈ s → f i ≠ ⊤) ∧ ∀ (i : ι), i ∈ s → g i ≠ ⊤\nthis :\n  (∑ x in s, (↑(ENNReal.toNNReal (f x)) + ↑(ENNReal.toNNReal (g x))) ^ p) ^ (1 / p) ≤\n    (∑ x in s, ↑(ENNReal.toNNReal (f x)) ^ p) ^ (1 / p) + (∑ x in s, ↑(ENNReal.toNNReal (g x)) ^ p) ^ (1 / p)\n⊢ ∑ i in s, g i ^ p = ∑ x in s, ↑(ENNReal.toNNReal (g x)) ^ p\n[PROOFSTEP]\nrefine Finset.sum_congr rfl fun i hi => ?_\n[GOAL]\ncase h.e'_4.h.e'_6.e_a\nι : Type u\ns : Finset ι\nf g : ι → ℝ≥0∞\np q : ℝ\nhp : 1 ≤ p\npos : 0 < p\nH' : (∀ (i : ι), i ∈ s → f i ≠ ⊤) ∧ ∀ (i : ι), i ∈ s → g i ≠ ⊤\nthis :\n  (∑ x in s, (↑(ENNReal.toNNReal (f x)) + ↑(ENNReal.toNNReal (g x))) ^ p) ^ (1 / p) ≤\n    (∑ x in s, ↑(ENNReal.toNNReal (f x)) ^ p) ^ (1 / p) + (∑ x in s, ↑(ENNReal.toNNReal (g x)) ^ p) ^ (1 / p)\ni : ι\nhi : i ∈ s\n⊢ g i ^ p = ↑(ENNReal.toNNReal (g i)) ^ p\n[PROOFSTEP]\nsimp [H'.1 i hi, H'.2 i hi]\n", "meta": {"mathlib_filename": "Mathlib.Analysis.MeanInequalities", "llama_tokens": 62944, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8175744806385543, "lm_q2_score": 0.6150878555160665, "lm_q1q2_score": 0.5028801340206301}}
{"text": "[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nk : ℕ\na : R\n⊢ dickson k a 2 = X ^ 2 - ↑C a * (3 - ↑k)\n[PROOFSTEP]\nsimp only [dickson, sq]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nk : ℕ\na : R\nn : ℕ\n⊢ dickson k a (n + 2) = X * dickson k a (n + 1) - ↑C a * dickson k a n\n[PROOFSTEP]\nrw [dickson]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nk : ℕ\na : R\nn : ℕ\nh : 2 ≤ n\n⊢ dickson k a n = X * dickson k a (n - 1) - ↑C a * dickson k a (n - 2)\n[PROOFSTEP]\nobtain ⟨n, rfl⟩ := Nat.exists_eq_add_of_le h\n[GOAL]\ncase intro\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nk : ℕ\na : R\nn : ℕ\nh : 2 ≤ 2 + n\n⊢ dickson k a (2 + n) = X * dickson k a (2 + n - 1) - ↑C a * dickson k a (2 + n - 2)\n[PROOFSTEP]\nrw [add_comm]\n[GOAL]\ncase intro\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nk : ℕ\na : R\nn : ℕ\nh : 2 ≤ 2 + n\n⊢ dickson k a (n + 2) = X * dickson k a (n + 2 - 1) - ↑C a * dickson k a (n + 2 - 2)\n[PROOFSTEP]\nexact dickson_add_two k a n\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nk : ℕ\na : R\nf : R →+* S\n⊢ map f (dickson k a 0) = dickson k (↑f a) 0\n[PROOFSTEP]\nsimp_rw [dickson_zero, Polynomial.map_sub, Polynomial.map_nat_cast, Polynomial.map_ofNat]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nk : ℕ\na : R\nf : R →+* S\n⊢ map f (dickson k a 1) = dickson k (↑f a) 1\n[PROOFSTEP]\nsimp only [dickson_one, map_X]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nk : ℕ\na : R\nf : R →+* S\nn : ℕ\n⊢ map f (dickson k a (n + 2)) = dickson k (↑f a) (n + 2)\n[PROOFSTEP]\nsimp only [dickson_add_two, Polynomial.map_sub, Polynomial.map_mul, map_X, map_C]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nk : ℕ\na : R\nf : R →+* S\nn : ℕ\n⊢ X * map f (dickson k a (n + 1)) - ↑C (↑f a) * map f (dickson k a n) =\n    X * dickson k (↑f a) (n + 1) - ↑C (↑f a) * dickson k (↑f a) n\n[PROOFSTEP]\nrw [map_dickson f n, map_dickson f (n + 1)]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nk : ℕ\na : R\n⊢ dickson 2 0 0 = X ^ 0\n[PROOFSTEP]\nsimp only [dickson_zero, pow_zero]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nk : ℕ\na : R\n⊢ 3 - ↑2 = 1\n[PROOFSTEP]\nnorm_num\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nk : ℕ\na : R\n⊢ dickson 2 0 1 = X ^ 1\n[PROOFSTEP]\nsimp only [dickson_one, pow_one]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nk : ℕ\na : R\nn : ℕ\n⊢ dickson 2 0 (n + 2) = X ^ (n + 2)\n[PROOFSTEP]\nsimp only [dickson_add_two, C_0, zero_mul, sub_zero]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nk : ℕ\na : R\nn : ℕ\n⊢ X * dickson 2 0 (n + 1) = X ^ (n + 2)\n[PROOFSTEP]\nrw [dickson_two_zero (n + 1), pow_add X (n + 1) 1, mul_comm, pow_one]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nk : ℕ\na x y : R\nh : x * y = 1\n⊢ eval (x + y) (dickson 1 1 0) = x ^ 0 + y ^ 0\n[PROOFSTEP]\nsuffices eval (x + y) 2 = 2 by convert this <;> norm_num\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nk : ℕ\na x y : R\nh : x * y = 1\nthis : eval (x + y) 2 = 2\n⊢ eval (x + y) (dickson 1 1 0) = x ^ 0 + y ^ 0\n[PROOFSTEP]\nconvert this\n[GOAL]\ncase h.e'_2.h.e'_4\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nk : ℕ\na x y : R\nh : x * y = 1\nthis : eval (x + y) 2 = 2\n⊢ dickson 1 1 0 = 2\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase h.e'_3\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nk : ℕ\na x y : R\nh : x * y = 1\nthis : eval (x + y) 2 = 2\n⊢ x ^ 0 + y ^ 0 = 2\n[PROOFSTEP]\nnorm_num\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nk : ℕ\na x y : R\nh : x * y = 1\n⊢ eval (x + y) 2 = 2\n[PROOFSTEP]\nexact eval_nat_cast\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nk : ℕ\na x y : R\nh : x * y = 1\n⊢ eval (x + y) (dickson 1 1 1) = x ^ 1 + y ^ 1\n[PROOFSTEP]\nsimp only [eval_X, dickson_one, pow_one]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nk : ℕ\na x y : R\nh : x * y = 1\nn : ℕ\n⊢ eval (x + y) (dickson 1 1 (n + 2)) = x ^ (n + 2) + y ^ (n + 2)\n[PROOFSTEP]\nsimp only [eval_sub, eval_mul, dickson_one_one_eval_add_inv x y h _, eval_X, dickson_add_two, C_1, eval_one]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nk : ℕ\na x y : R\nh : x * y = 1\nn : ℕ\n⊢ (x + y) * (x ^ (n + 1) + y ^ (n + 1)) - 1 * (x ^ n + y ^ n) = x ^ (n + 2) + y ^ (n + 2)\n[PROOFSTEP]\nconv_lhs => simp only [pow_succ, add_mul, mul_add, h, ← mul_assoc, mul_comm y x, one_mul]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nk : ℕ\na x y : R\nh : x * y = 1\nn : ℕ\n| (x + y) * (x ^ (n + 1) + y ^ (n + 1)) - 1 * (x ^ n + y ^ n)\n[PROOFSTEP]\nsimp only [pow_succ, add_mul, mul_add, h, ← mul_assoc, mul_comm y x, one_mul]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nk : ℕ\na x y : R\nh : x * y = 1\nn : ℕ\n| (x + y) * (x ^ (n + 1) + y ^ (n + 1)) - 1 * (x ^ n + y ^ n)\n[PROOFSTEP]\nsimp only [pow_succ, add_mul, mul_add, h, ← mul_assoc, mul_comm y x, one_mul]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nk : ℕ\na x y : R\nh : x * y = 1\nn : ℕ\n| (x + y) * (x ^ (n + 1) + y ^ (n + 1)) - 1 * (x ^ n + y ^ n)\n[PROOFSTEP]\nsimp only [pow_succ, add_mul, mul_add, h, ← mul_assoc, mul_comm y x, one_mul]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nk : ℕ\na x y : R\nh : x * y = 1\nn : ℕ\n⊢ x * x * x ^ n + x ^ n + (y ^ n + y * y * y ^ n) - (x ^ n + y ^ n) = x ^ (n + 2) + y ^ (n + 2)\n[PROOFSTEP]\nring\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝² : CommRing R\ninst✝¹ : CommRing S\nk : ℕ\na : R\ninst✝ : Invertible 2\n⊢ 2 * ↑C ⅟2 = 1\n[PROOFSTEP]\nrw [two_mul, ← C_add, invOf_two_add_invOf_two, C_1]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝² : CommRing R\ninst✝¹ : CommRing S\nk : ℕ\na : R\ninst✝ : Invertible 2\n⊢ ↑C ⅟2 * 2 = 1\n[PROOFSTEP]\nrw [mul_comm, two_mul_C_half_eq_one]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝² : CommRing R\ninst✝¹ : CommRing S\nk : ℕ\na : R\ninst✝ : Invertible 2\n⊢ dickson 1 1 0 = 2 * comp (Chebyshev.T R 0) (↑C ⅟2 * X)\n[PROOFSTEP]\nsimp only [Chebyshev.T_zero, mul_one, one_comp, dickson_zero]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝² : CommRing R\ninst✝¹ : CommRing S\nk : ℕ\na : R\ninst✝ : Invertible 2\n⊢ 3 - ↑1 = 2\n[PROOFSTEP]\nnorm_num\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝² : CommRing R\ninst✝¹ : CommRing S\nk : ℕ\na : R\ninst✝ : Invertible 2\n⊢ dickson 1 1 1 = 2 * comp (Chebyshev.T R 1) (↑C ⅟2 * X)\n[PROOFSTEP]\nrw [dickson_one, Chebyshev.T_one, X_comp, ← mul_assoc, two_mul_C_half_eq_one, one_mul]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝² : CommRing R\ninst✝¹ : CommRing S\nk : ℕ\na : R\ninst✝ : Invertible 2\nn : ℕ\n⊢ dickson 1 1 (n + 2) = 2 * comp (Chebyshev.T R (n + 2)) (↑C ⅟2 * X)\n[PROOFSTEP]\nrw [dickson_add_two, C_1, Chebyshev.T_add_two, dickson_one_one_eq_chebyshev_T (n + 1), dickson_one_one_eq_chebyshev_T n,\n  sub_comp, mul_comp, mul_comp, X_comp, ofNat_comp]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝² : CommRing R\ninst✝¹ : CommRing S\nk : ℕ\na : R\ninst✝ : Invertible 2\nn : ℕ\n⊢ X * (2 * comp (Chebyshev.T R (n + 1)) (↑C ⅟2 * X)) - 1 * (2 * comp (Chebyshev.T R n) (↑C ⅟2 * X)) =\n    2 * (↑2 * (↑C ⅟2 * X) * comp (Chebyshev.T R (n + 1)) (↑C ⅟2 * X) - comp (Chebyshev.T R n) (↑C ⅟2 * X))\n[PROOFSTEP]\nsimp_rw [← mul_assoc, Nat.cast_ofNat, two_mul_C_half_eq_one]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝² : CommRing R\ninst✝¹ : CommRing S\nk : ℕ\na : R\ninst✝ : Invertible 2\nn : ℕ\n⊢ X * 2 * comp (Chebyshev.T R (n + 1)) (↑C ⅟2 * X) - 1 * 2 * comp (Chebyshev.T R n) (↑C ⅟2 * X) =\n    2 * (1 * X * comp (Chebyshev.T R (n + 1)) (↑C ⅟2 * X) - comp (Chebyshev.T R n) (↑C ⅟2 * X))\n[PROOFSTEP]\nring\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝² : CommRing R\ninst✝¹ : CommRing S\nk : ℕ\na : R\ninst✝ : Invertible 2\nn : ℕ\n⊢ Chebyshev.T R n = ↑C ⅟2 * comp (dickson 1 1 n) (2 * X)\n[PROOFSTEP]\nrw [dickson_one_one_eq_chebyshev_T, mul_comp, ofNat_comp, comp_assoc, mul_comp, C_comp, X_comp]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝² : CommRing R\ninst✝¹ : CommRing S\nk : ℕ\na : R\ninst✝ : Invertible 2\nn : ℕ\n⊢ Chebyshev.T R n = ↑C ⅟2 * (↑2 * comp (Chebyshev.T R n) (↑C ⅟2 * (2 * X)))\n[PROOFSTEP]\nsimp_rw [← mul_assoc, Nat.cast_ofNat, C_half_mul_two_eq_one, one_mul, comp_X]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nk : ℕ\na : R\nm n : ℕ\n⊢ dickson 1 1 (m * n) = comp (dickson 1 1 m) (dickson 1 1 n)\n[PROOFSTEP]\nhave h : (1 : R) = Int.castRingHom R 1\n[GOAL]\ncase h\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nk : ℕ\na : R\nm n : ℕ\n⊢ 1 = ↑(Int.castRingHom R) 1\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nk : ℕ\na : R\nm n : ℕ\nh : 1 = ↑(Int.castRingHom R) 1\n⊢ dickson 1 1 (m * n) = comp (dickson 1 1 m) (dickson 1 1 n)\n[PROOFSTEP]\nsimp only [eq_intCast, Int.cast_one]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nk : ℕ\na : R\nm n : ℕ\nh : 1 = ↑(Int.castRingHom R) 1\n⊢ dickson 1 1 (m * n) = comp (dickson 1 1 m) (dickson 1 1 n)\n[PROOFSTEP]\nrw [h]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nk : ℕ\na : R\nm n : ℕ\nh : 1 = ↑(Int.castRingHom R) 1\n⊢ dickson 1 (↑(Int.castRingHom R) 1) (m * n) =\n    comp (dickson 1 (↑(Int.castRingHom R) 1) m) (dickson 1 (↑(Int.castRingHom R) 1) n)\n[PROOFSTEP]\nsimp only [← map_dickson (Int.castRingHom R), ← map_comp]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nk : ℕ\na : R\nm n : ℕ\nh : 1 = ↑(Int.castRingHom R) 1\n⊢ map (Int.castRingHom R) (dickson 1 1 (m * n)) = map (Int.castRingHom R) (comp (dickson 1 1 m) (dickson 1 1 n))\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_a\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nk : ℕ\na : R\nm n : ℕ\nh : 1 = ↑(Int.castRingHom R) 1\n⊢ dickson 1 1 (m * n) = comp (dickson 1 1 m) (dickson 1 1 n)\n[PROOFSTEP]\napply map_injective (Int.castRingHom ℚ) Int.cast_injective\n[GOAL]\ncase e_a.a\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nk : ℕ\na : R\nm n : ℕ\nh : 1 = ↑(Int.castRingHom R) 1\n⊢ map (Int.castRingHom ℚ) (dickson 1 1 (m * n)) = map (Int.castRingHom ℚ) (comp (dickson 1 1 m) (dickson 1 1 n))\n[PROOFSTEP]\nsimp only [map_dickson, map_comp, eq_intCast, Int.cast_one, dickson_one_one_eq_chebyshev_T, Chebyshev.T_mul, two_mul, ←\n  add_comp]\n[GOAL]\ncase e_a.a\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nk : ℕ\na : R\nm n : ℕ\nh : 1 = ↑(Int.castRingHom R) 1\n⊢ comp (comp (Chebyshev.T ℚ m + Chebyshev.T ℚ m) (Chebyshev.T ℚ n)) (↑C ⅟2 * X) =\n    comp (comp (Chebyshev.T ℚ m + Chebyshev.T ℚ m) (↑C ⅟2 * X)) (comp (Chebyshev.T ℚ n + Chebyshev.T ℚ n) (↑C ⅟2 * X))\n[PROOFSTEP]\nsimp only [← two_mul, ← comp_assoc]\n[GOAL]\ncase e_a.a\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nk : ℕ\na : R\nm n : ℕ\nh : 1 = ↑(Int.castRingHom R) 1\n⊢ comp (comp (2 * Chebyshev.T ℚ m) (Chebyshev.T ℚ n)) (↑C ⅟2 * X) =\n    comp (comp (comp (2 * Chebyshev.T ℚ m) (↑C ⅟2 * X)) (2 * Chebyshev.T ℚ n)) (↑C ⅟2 * X)\n[PROOFSTEP]\napply eval₂_congr rfl rfl\n[GOAL]\ncase e_a.a\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nk : ℕ\na : R\nm n : ℕ\nh : 1 = ↑(Int.castRingHom R) 1\n⊢ comp (2 * Chebyshev.T ℚ m) (Chebyshev.T ℚ n) = comp (comp (2 * Chebyshev.T ℚ m) (↑C ⅟2 * X)) (2 * Chebyshev.T ℚ n)\n[PROOFSTEP]\nrw [comp_assoc]\n[GOAL]\ncase e_a.a\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nk : ℕ\na : R\nm n : ℕ\nh : 1 = ↑(Int.castRingHom R) 1\n⊢ comp (2 * Chebyshev.T ℚ m) (Chebyshev.T ℚ n) = comp (2 * Chebyshev.T ℚ m) (comp (↑C ⅟2 * X) (2 * Chebyshev.T ℚ n))\n[PROOFSTEP]\napply eval₂_congr rfl _ rfl\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nk : ℕ\na : R\nm n : ℕ\nh : 1 = ↑(Int.castRingHom R) 1\n⊢ Chebyshev.T ℚ n = comp (↑C ⅟2 * X) (2 * Chebyshev.T ℚ n)\n[PROOFSTEP]\nrw [mul_comp, C_comp, X_comp, ← mul_assoc, C_half_mul_two_eq_one, one_mul]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nk : ℕ\na : R\nm n : ℕ\n⊢ comp (dickson 1 1 m) (dickson 1 1 n) = comp (dickson 1 1 n) (dickson 1 1 m)\n[PROOFSTEP]\nrw [← dickson_one_one_mul, mul_comm, dickson_one_one_mul]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝² : CommRing R\ninst✝¹ : CommRing S\nk : ℕ\na : R\np : ℕ\ninst✝ : Fact (Nat.Prime p)\n⊢ dickson 1 1 p = X ^ p\n[PROOFSTEP]\nobtain ⟨K, _, _, H⟩ : ∃ (K : Type) (_ : Field K), ∃ _ : CharP K p, Infinite K :=\n  by\n  let K := FractionRing (Polynomial (ZMod p))\n  let f : ZMod p →+* K := (algebraMap _ (FractionRing _)).comp C\n  have : CharP K p := by\n    rw [← f.charP_iff_charP]\n    infer_instance\n  haveI : Infinite K :=\n    Infinite.of_injective (algebraMap (Polynomial (ZMod p)) (FractionRing (Polynomial (ZMod p))))\n      (IsFractionRing.injective _ _)\n  refine' ⟨K, _, _, _⟩ <;> infer_instance\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝² : CommRing R\ninst✝¹ : CommRing S\nk : ℕ\na : R\np : ℕ\ninst✝ : Fact (Nat.Prime p)\n⊢ ∃ K x x, Infinite K\n[PROOFSTEP]\nlet K := FractionRing (Polynomial (ZMod p))\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝² : CommRing R\ninst✝¹ : CommRing S\nk : ℕ\na : R\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nK : Type := FractionRing (ZMod p)[X]\n⊢ ∃ K x x, Infinite K\n[PROOFSTEP]\nlet f : ZMod p →+* K := (algebraMap _ (FractionRing _)).comp C\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝² : CommRing R\ninst✝¹ : CommRing S\nk : ℕ\na : R\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nK : Type := FractionRing (ZMod p)[X]\nf : ZMod p →+* K := RingHom.comp (algebraMap (ZMod p)[X] (FractionRing (ZMod p)[X])) C\n⊢ ∃ K x x, Infinite K\n[PROOFSTEP]\nhave : CharP K p := by\n  rw [← f.charP_iff_charP]\n  infer_instance\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝² : CommRing R\ninst✝¹ : CommRing S\nk : ℕ\na : R\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nK : Type := FractionRing (ZMod p)[X]\nf : ZMod p →+* K := RingHom.comp (algebraMap (ZMod p)[X] (FractionRing (ZMod p)[X])) C\n⊢ CharP K p\n[PROOFSTEP]\nrw [← f.charP_iff_charP]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝² : CommRing R\ninst✝¹ : CommRing S\nk : ℕ\na : R\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nK : Type := FractionRing (ZMod p)[X]\nf : ZMod p →+* K := RingHom.comp (algebraMap (ZMod p)[X] (FractionRing (ZMod p)[X])) C\n⊢ CharP (ZMod p) p\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝² : CommRing R\ninst✝¹ : CommRing S\nk : ℕ\na : R\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nK : Type := FractionRing (ZMod p)[X]\nf : ZMod p →+* K := RingHom.comp (algebraMap (ZMod p)[X] (FractionRing (ZMod p)[X])) C\nthis : CharP K p\n⊢ ∃ K x x, Infinite K\n[PROOFSTEP]\nhaveI : Infinite K :=\n  Infinite.of_injective (algebraMap (Polynomial (ZMod p)) (FractionRing (Polynomial (ZMod p))))\n    (IsFractionRing.injective _ _)\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝² : CommRing R\ninst✝¹ : CommRing S\nk : ℕ\na : R\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nK : Type := FractionRing (ZMod p)[X]\nf : ZMod p →+* K := RingHom.comp (algebraMap (ZMod p)[X] (FractionRing (ZMod p)[X])) C\nthis✝ : CharP K p\nthis : Infinite K\n⊢ ∃ K x x, Infinite K\n[PROOFSTEP]\nrefine' ⟨K, _, _, _⟩\n[GOAL]\ncase refine'_1\nR : Type u_1\nS : Type u_2\ninst✝² : CommRing R\ninst✝¹ : CommRing S\nk : ℕ\na : R\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nK : Type := FractionRing (ZMod p)[X]\nf : ZMod p →+* K := RingHom.comp (algebraMap (ZMod p)[X] (FractionRing (ZMod p)[X])) C\nthis✝ : CharP K p\nthis : Infinite K\n⊢ Field K\n[PROOFSTEP]\ninfer_instance\n[GOAL]\ncase refine'_2\nR : Type u_1\nS : Type u_2\ninst✝² : CommRing R\ninst✝¹ : CommRing S\nk : ℕ\na : R\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nK : Type := FractionRing (ZMod p)[X]\nf : ZMod p →+* K := RingHom.comp (algebraMap (ZMod p)[X] (FractionRing (ZMod p)[X])) C\nthis✝ : CharP K p\nthis : Infinite K\n⊢ CharP K p\n[PROOFSTEP]\ninfer_instance\n[GOAL]\ncase refine'_3\nR : Type u_1\nS : Type u_2\ninst✝² : CommRing R\ninst✝¹ : CommRing S\nk : ℕ\na : R\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nK : Type := FractionRing (ZMod p)[X]\nf : ZMod p →+* K := RingHom.comp (algebraMap (ZMod p)[X] (FractionRing (ZMod p)[X])) C\nthis✝ : CharP K p\nthis : Infinite K\n⊢ Infinite K\n[PROOFSTEP]\ninfer_instance\n[GOAL]\ncase intro.intro.intro\nR : Type u_1\nS : Type u_2\ninst✝² : CommRing R\ninst✝¹ : CommRing S\nk : ℕ\na : R\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nK : Type\nw✝¹ : Field K\nw✝ : CharP K p\nH : Infinite K\n⊢ dickson 1 1 p = X ^ p\n[PROOFSTEP]\napply map_injective (ZMod.castHom (dvd_refl p) K) (RingHom.injective _)\n[GOAL]\ncase intro.intro.intro.a\nR : Type u_1\nS : Type u_2\ninst✝² : CommRing R\ninst✝¹ : CommRing S\nk : ℕ\na : R\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nK : Type\nw✝¹ : Field K\nw✝ : CharP K p\nH : Infinite K\n⊢ map (ZMod.castHom (_ : p ∣ p) K) (dickson 1 1 p) = map (ZMod.castHom (_ : p ∣ p) K) (X ^ p)\n[PROOFSTEP]\nrw [map_dickson, Polynomial.map_pow, map_X]\n[GOAL]\ncase intro.intro.intro.a\nR : Type u_1\nS : Type u_2\ninst✝² : CommRing R\ninst✝¹ : CommRing S\nk : ℕ\na : R\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nK : Type\nw✝¹ : Field K\nw✝ : CharP K p\nH : Infinite K\n⊢ dickson 1 (↑(ZMod.castHom (_ : p ∣ p) K) 1) p = X ^ p\n[PROOFSTEP]\napply eq_of_infinite_eval_eq\n[GOAL]\ncase intro.intro.intro.a.h\nR : Type u_1\nS : Type u_2\ninst✝² : CommRing R\ninst✝¹ : CommRing S\nk : ℕ\na : R\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nK : Type\nw✝¹ : Field K\nw✝ : CharP K p\nH : Infinite K\n⊢ Set.Infinite {x | eval x (dickson 1 (↑(ZMod.castHom (_ : p ∣ p) K) 1) p) = eval x (X ^ p)}\n[PROOFSTEP]\napply @Set.Infinite.mono _ {x : K | ∃ y, x = y + y⁻¹ ∧ y ≠ 0}\n[GOAL]\ncase intro.intro.intro.a.h.h\nR : Type u_1\nS : Type u_2\ninst✝² : CommRing R\ninst✝¹ : CommRing S\nk : ℕ\na : R\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nK : Type\nw✝¹ : Field K\nw✝ : CharP K p\nH : Infinite K\n⊢ {x | ∃ y, x = y + y⁻¹ ∧ y ≠ 0} ⊆ {x | eval x (dickson 1 (↑(ZMod.castHom (_ : p ∣ p) K) 1) p) = eval x (X ^ p)}\n[PROOFSTEP]\nrintro _ ⟨x, rfl, hx⟩\n[GOAL]\ncase intro.intro.intro.a.h.h.intro.intro\nR : Type u_1\nS : Type u_2\ninst✝² : CommRing R\ninst✝¹ : CommRing S\nk : ℕ\na : R\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nK : Type\nw✝¹ : Field K\nw✝ : CharP K p\nH : Infinite K\nx : K\nhx : x ≠ 0\n⊢ x + x⁻¹ ∈ {x | eval x (dickson 1 (↑(ZMod.castHom (_ : p ∣ p) K) 1) p) = eval x (X ^ p)}\n[PROOFSTEP]\nsimp only [eval_X, eval_pow, Set.mem_setOf_eq, @add_pow_char K _ p,\n  dickson_one_one_eval_add_inv _ _ (mul_inv_cancel hx), inv_pow, ZMod.castHom_apply, ZMod.cast_one']\n  -- Now we need to show that the set of such `x` is infinite.\n    -- If the set is finite, then we will show that `K` is also finite.\n[GOAL]\ncase intro.intro.intro.a.h.a\nR : Type u_1\nS : Type u_2\ninst✝² : CommRing R\ninst✝¹ : CommRing S\nk : ℕ\na : R\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nK : Type\nw✝¹ : Field K\nw✝ : CharP K p\nH : Infinite K\n⊢ Set.Infinite {x | ∃ y, x = y + y⁻¹ ∧ y ≠ 0}\n[PROOFSTEP]\nintro h\n[GOAL]\ncase intro.intro.intro.a.h.a\nR : Type u_1\nS : Type u_2\ninst✝² : CommRing R\ninst✝¹ : CommRing S\nk : ℕ\na : R\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nK : Type\nw✝¹ : Field K\nw✝ : CharP K p\nH : Infinite K\nh : Set.Finite {x | ∃ y, x = y + y⁻¹ ∧ y ≠ 0}\n⊢ False\n[PROOFSTEP]\nrw [← Set.infinite_univ_iff] at H \n[GOAL]\ncase intro.intro.intro.a.h.a\nR : Type u_1\nS : Type u_2\ninst✝² : CommRing R\ninst✝¹ : CommRing S\nk : ℕ\na : R\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nK : Type\nw✝¹ : Field K\nw✝ : CharP K p\nH : Set.Infinite Set.univ\nh : Set.Finite {x | ∃ y, x = y + y⁻¹ ∧ y ≠ 0}\n⊢ False\n[PROOFSTEP]\napply H\n[GOAL]\ncase intro.intro.intro.a.h.a\nR : Type u_1\nS : Type u_2\ninst✝² : CommRing R\ninst✝¹ : CommRing S\nk : ℕ\na : R\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nK : Type\nw✝¹ : Field K\nw✝ : CharP K p\nH : Set.Infinite Set.univ\nh : Set.Finite {x | ∃ y, x = y + y⁻¹ ∧ y ≠ 0}\n⊢ Set.Finite Set.univ\n[PROOFSTEP]\nsuffices (Set.univ : Set K) = {x : K | ∃ y : K, x = y + y⁻¹ ∧ y ≠ 0} >>= fun x => {y | x = y + y⁻¹ ∨ y = 0}\n  by\n  rw [this]\n  clear this\n  refine'\n    h.biUnion fun x _ =>\n      _\n        -- The following quadratic polynomial has as solutions the `y` for which `x = y + y⁻¹`.\n  let φ : K[X] := X ^ 2 - C x * X + 1\n  have hφ : φ ≠ 0 := by\n    intro H\n    have : φ.eval 0 = 0 := by rw [H, eval_zero]\n    simpa [eval_X, eval_one, eval_pow, eval_sub, sub_zero, eval_add, eval_mul, mul_zero, sq, zero_add, one_ne_zero]\n  classical\n  convert (φ.roots ∪ {0}).toFinset.finite_toSet using 1\n  ext1 y\n  simp only [Multiset.mem_toFinset, Set.mem_setOf_eq, Finset.mem_coe, Multiset.mem_union, mem_roots hφ, IsRoot,\n    eval_add, eval_sub, eval_pow, eval_mul, eval_X, eval_C, eval_one, Multiset.mem_singleton]\n  by_cases hy : y = 0\n  · simp only [hy, eq_self_iff_true, or_true_iff]\n  apply or_congr _ Iff.rfl\n  rw [← mul_left_inj' hy, eq_comm, ← sub_eq_zero, add_mul, inv_mul_cancel hy]\n  apply eq_iff_eq_cancel_right.mpr\n  ring\n    -- Finally, we prove the claim that our finite union of finite sets covers all of `K`.\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝² : CommRing R\ninst✝¹ : CommRing S\nk : ℕ\na : R\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nK : Type\nw✝¹ : Field K\nw✝ : CharP K p\nH : Set.Infinite Set.univ\nh : Set.Finite {x | ∃ y, x = y + y⁻¹ ∧ y ≠ 0}\nthis :\n  Set.univ = do\n    let x ← {x | ∃ y, x = y + y⁻¹ ∧ y ≠ 0}\n    {y | x = y + y⁻¹ ∨ y = 0}\n⊢ Set.Finite Set.univ\n[PROOFSTEP]\nrw [this]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝² : CommRing R\ninst✝¹ : CommRing S\nk : ℕ\na : R\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nK : Type\nw✝¹ : Field K\nw✝ : CharP K p\nH : Set.Infinite Set.univ\nh : Set.Finite {x | ∃ y, x = y + y⁻¹ ∧ y ≠ 0}\nthis :\n  Set.univ = do\n    let x ← {x | ∃ y, x = y + y⁻¹ ∧ y ≠ 0}\n    {y | x = y + y⁻¹ ∨ y = 0}\n⊢ Set.Finite do\n    let x ← {x | ∃ y, x = y + y⁻¹ ∧ y ≠ 0}\n    {y | x = y + y⁻¹ ∨ y = 0}\n[PROOFSTEP]\nclear this\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝² : CommRing R\ninst✝¹ : CommRing S\nk : ℕ\na : R\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nK : Type\nw✝¹ : Field K\nw✝ : CharP K p\nH : Set.Infinite Set.univ\nh : Set.Finite {x | ∃ y, x = y + y⁻¹ ∧ y ≠ 0}\n⊢ Set.Finite do\n    let x ← {x | ∃ y, x = y + y⁻¹ ∧ y ≠ 0}\n    {y | x = y + y⁻¹ ∨ y = 0}\n[PROOFSTEP]\nrefine'\n  h.biUnion fun x _ =>\n    _\n      -- The following quadratic polynomial has as solutions the `y` for which `x = y + y⁻¹`.\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝² : CommRing R\ninst✝¹ : CommRing S\nk : ℕ\na : R\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nK : Type\nw✝¹ : Field K\nw✝ : CharP K p\nH : Set.Infinite Set.univ\nh : Set.Finite {x | ∃ y, x = y + y⁻¹ ∧ y ≠ 0}\nx : K\nx✝ : x ∈ {x | ∃ y, x = y + y⁻¹ ∧ y ≠ 0}\n⊢ Set.Finite ((fun x => {y | x = y + y⁻¹ ∨ y = 0}) x)\n[PROOFSTEP]\nlet φ : K[X] := X ^ 2 - C x * X + 1\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝² : CommRing R\ninst✝¹ : CommRing S\nk : ℕ\na : R\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nK : Type\nw✝¹ : Field K\nw✝ : CharP K p\nH : Set.Infinite Set.univ\nh : Set.Finite {x | ∃ y, x = y + y⁻¹ ∧ y ≠ 0}\nx : K\nx✝ : x ∈ {x | ∃ y, x = y + y⁻¹ ∧ y ≠ 0}\nφ : K[X] := X ^ 2 - ↑C x * X + 1\n⊢ Set.Finite ((fun x => {y | x = y + y⁻¹ ∨ y = 0}) x)\n[PROOFSTEP]\nhave hφ : φ ≠ 0 := by\n  intro H\n  have : φ.eval 0 = 0 := by rw [H, eval_zero]\n  simpa [eval_X, eval_one, eval_pow, eval_sub, sub_zero, eval_add, eval_mul, mul_zero, sq, zero_add, one_ne_zero]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝² : CommRing R\ninst✝¹ : CommRing S\nk : ℕ\na : R\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nK : Type\nw✝¹ : Field K\nw✝ : CharP K p\nH : Set.Infinite Set.univ\nh : Set.Finite {x | ∃ y, x = y + y⁻¹ ∧ y ≠ 0}\nx : K\nx✝ : x ∈ {x | ∃ y, x = y + y⁻¹ ∧ y ≠ 0}\nφ : K[X] := X ^ 2 - ↑C x * X + 1\n⊢ φ ≠ 0\n[PROOFSTEP]\nintro H\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝² : CommRing R\ninst✝¹ : CommRing S\nk : ℕ\na : R\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nK : Type\nw✝¹ : Field K\nw✝ : CharP K p\nH✝ : Set.Infinite Set.univ\nh : Set.Finite {x | ∃ y, x = y + y⁻¹ ∧ y ≠ 0}\nx : K\nx✝ : x ∈ {x | ∃ y, x = y + y⁻¹ ∧ y ≠ 0}\nφ : K[X] := X ^ 2 - ↑C x * X + 1\nH : φ = 0\n⊢ False\n[PROOFSTEP]\nhave : φ.eval 0 = 0 := by rw [H, eval_zero]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝² : CommRing R\ninst✝¹ : CommRing S\nk : ℕ\na : R\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nK : Type\nw✝¹ : Field K\nw✝ : CharP K p\nH✝ : Set.Infinite Set.univ\nh : Set.Finite {x | ∃ y, x = y + y⁻¹ ∧ y ≠ 0}\nx : K\nx✝ : x ∈ {x | ∃ y, x = y + y⁻¹ ∧ y ≠ 0}\nφ : K[X] := X ^ 2 - ↑C x * X + 1\nH : φ = 0\n⊢ eval 0 φ = 0\n[PROOFSTEP]\nrw [H, eval_zero]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝² : CommRing R\ninst✝¹ : CommRing S\nk : ℕ\na : R\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nK : Type\nw✝¹ : Field K\nw✝ : CharP K p\nH✝ : Set.Infinite Set.univ\nh : Set.Finite {x | ∃ y, x = y + y⁻¹ ∧ y ≠ 0}\nx : K\nx✝ : x ∈ {x | ∃ y, x = y + y⁻¹ ∧ y ≠ 0}\nφ : K[X] := X ^ 2 - ↑C x * X + 1\nH : φ = 0\nthis : eval 0 φ = 0\n⊢ False\n[PROOFSTEP]\nsimpa [eval_X, eval_one, eval_pow, eval_sub, sub_zero, eval_add, eval_mul, mul_zero, sq, zero_add, one_ne_zero]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝² : CommRing R\ninst✝¹ : CommRing S\nk : ℕ\na : R\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nK : Type\nw✝¹ : Field K\nw✝ : CharP K p\nH : Set.Infinite Set.univ\nh : Set.Finite {x | ∃ y, x = y + y⁻¹ ∧ y ≠ 0}\nx : K\nx✝ : x ∈ {x | ∃ y, x = y + y⁻¹ ∧ y ≠ 0}\nφ : K[X] := X ^ 2 - ↑C x * X + 1\nhφ : φ ≠ 0\n⊢ Set.Finite ((fun x => {y | x = y + y⁻¹ ∨ y = 0}) x)\n[PROOFSTEP]\nclassical\nconvert (φ.roots ∪ {0}).toFinset.finite_toSet using 1\next1 y\nsimp only [Multiset.mem_toFinset, Set.mem_setOf_eq, Finset.mem_coe, Multiset.mem_union, mem_roots hφ, IsRoot, eval_add,\n  eval_sub, eval_pow, eval_mul, eval_X, eval_C, eval_one, Multiset.mem_singleton]\nby_cases hy : y = 0\n· simp only [hy, eq_self_iff_true, or_true_iff]\napply or_congr _ Iff.rfl\nrw [← mul_left_inj' hy, eq_comm, ← sub_eq_zero, add_mul, inv_mul_cancel hy]\napply eq_iff_eq_cancel_right.mpr\nring\n  -- Finally, we prove the claim that our finite union of finite sets covers all of `K`.\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝² : CommRing R\ninst✝¹ : CommRing S\nk : ℕ\na : R\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nK : Type\nw✝¹ : Field K\nw✝ : CharP K p\nH : Set.Infinite Set.univ\nh : Set.Finite {x | ∃ y, x = y + y⁻¹ ∧ y ≠ 0}\nx : K\nx✝ : x ∈ {x | ∃ y, x = y + y⁻¹ ∧ y ≠ 0}\nφ : K[X] := X ^ 2 - ↑C x * X + 1\nhφ : φ ≠ 0\n⊢ Set.Finite ((fun x => {y | x = y + y⁻¹ ∨ y = 0}) x)\n[PROOFSTEP]\nconvert (φ.roots ∪ {0}).toFinset.finite_toSet using 1\n[GOAL]\ncase h.e'_2\nR : Type u_1\nS : Type u_2\ninst✝² : CommRing R\ninst✝¹ : CommRing S\nk : ℕ\na : R\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nK : Type\nw✝¹ : Field K\nw✝ : CharP K p\nH : Set.Infinite Set.univ\nh : Set.Finite {x | ∃ y, x = y + y⁻¹ ∧ y ≠ 0}\nx : K\nx✝ : x ∈ {x | ∃ y, x = y + y⁻¹ ∧ y ≠ 0}\nφ : K[X] := X ^ 2 - ↑C x * X + 1\nhφ : φ ≠ 0\n⊢ (fun x => {y | x = y + y⁻¹ ∨ y = 0}) x = ↑(Multiset.toFinset (roots φ ∪ {0}))\n[PROOFSTEP]\next1 y\n[GOAL]\ncase h.e'_2.h\nR : Type u_1\nS : Type u_2\ninst✝² : CommRing R\ninst✝¹ : CommRing S\nk : ℕ\na : R\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nK : Type\nw✝¹ : Field K\nw✝ : CharP K p\nH : Set.Infinite Set.univ\nh : Set.Finite {x | ∃ y, x = y + y⁻¹ ∧ y ≠ 0}\nx : K\nx✝ : x ∈ {x | ∃ y, x = y + y⁻¹ ∧ y ≠ 0}\nφ : K[X] := X ^ 2 - ↑C x * X + 1\nhφ : φ ≠ 0\ny : K\n⊢ y ∈ (fun x => {y | x = y + y⁻¹ ∨ y = 0}) x ↔ y ∈ ↑(Multiset.toFinset (roots φ ∪ {0}))\n[PROOFSTEP]\nsimp only [Multiset.mem_toFinset, Set.mem_setOf_eq, Finset.mem_coe, Multiset.mem_union, mem_roots hφ, IsRoot, eval_add,\n  eval_sub, eval_pow, eval_mul, eval_X, eval_C, eval_one, Multiset.mem_singleton]\n[GOAL]\ncase h.e'_2.h\nR : Type u_1\nS : Type u_2\ninst✝² : CommRing R\ninst✝¹ : CommRing S\nk : ℕ\na : R\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nK : Type\nw✝¹ : Field K\nw✝ : CharP K p\nH : Set.Infinite Set.univ\nh : Set.Finite {x | ∃ y, x = y + y⁻¹ ∧ y ≠ 0}\nx : K\nx✝ : x ∈ {x | ∃ y, x = y + y⁻¹ ∧ y ≠ 0}\nφ : K[X] := X ^ 2 - ↑C x * X + 1\nhφ : φ ≠ 0\ny : K\n⊢ x = y + y⁻¹ ∨ y = 0 ↔ y ^ 2 - x * y + 1 = 0 ∨ y = 0\n[PROOFSTEP]\nby_cases hy : y = 0\n[GOAL]\ncase pos\nR : Type u_1\nS : Type u_2\ninst✝² : CommRing R\ninst✝¹ : CommRing S\nk : ℕ\na : R\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nK : Type\nw✝¹ : Field K\nw✝ : CharP K p\nH : Set.Infinite Set.univ\nh : Set.Finite {x | ∃ y, x = y + y⁻¹ ∧ y ≠ 0}\nx : K\nx✝ : x ∈ {x | ∃ y, x = y + y⁻¹ ∧ y ≠ 0}\nφ : K[X] := X ^ 2 - ↑C x * X + 1\nhφ : φ ≠ 0\ny : K\nhy : y = 0\n⊢ x = y + y⁻¹ ∨ y = 0 ↔ y ^ 2 - x * y + 1 = 0 ∨ y = 0\n[PROOFSTEP]\nsimp only [hy, eq_self_iff_true, or_true_iff]\n[GOAL]\ncase neg\nR : Type u_1\nS : Type u_2\ninst✝² : CommRing R\ninst✝¹ : CommRing S\nk : ℕ\na : R\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nK : Type\nw✝¹ : Field K\nw✝ : CharP K p\nH : Set.Infinite Set.univ\nh : Set.Finite {x | ∃ y, x = y + y⁻¹ ∧ y ≠ 0}\nx : K\nx✝ : x ∈ {x | ∃ y, x = y + y⁻¹ ∧ y ≠ 0}\nφ : K[X] := X ^ 2 - ↑C x * X + 1\nhφ : φ ≠ 0\ny : K\nhy : ¬y = 0\n⊢ x = y + y⁻¹ ∨ y = 0 ↔ y ^ 2 - x * y + 1 = 0 ∨ y = 0\n[PROOFSTEP]\napply or_congr _ Iff.rfl\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝² : CommRing R\ninst✝¹ : CommRing S\nk : ℕ\na : R\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nK : Type\nw✝¹ : Field K\nw✝ : CharP K p\nH : Set.Infinite Set.univ\nh : Set.Finite {x | ∃ y, x = y + y⁻¹ ∧ y ≠ 0}\nx : K\nx✝ : x ∈ {x | ∃ y, x = y + y⁻¹ ∧ y ≠ 0}\nφ : K[X] := X ^ 2 - ↑C x * X + 1\nhφ : φ ≠ 0\ny : K\nhy : ¬y = 0\n⊢ x = y + y⁻¹ ↔ y ^ 2 - x * y + 1 = 0\n[PROOFSTEP]\nrw [← mul_left_inj' hy, eq_comm, ← sub_eq_zero, add_mul, inv_mul_cancel hy]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝² : CommRing R\ninst✝¹ : CommRing S\nk : ℕ\na : R\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nK : Type\nw✝¹ : Field K\nw✝ : CharP K p\nH : Set.Infinite Set.univ\nh : Set.Finite {x | ∃ y, x = y + y⁻¹ ∧ y ≠ 0}\nx : K\nx✝ : x ∈ {x | ∃ y, x = y + y⁻¹ ∧ y ≠ 0}\nφ : K[X] := X ^ 2 - ↑C x * X + 1\nhφ : φ ≠ 0\ny : K\nhy : ¬y = 0\n⊢ y * y + 1 - x * y = 0 ↔ y ^ 2 - x * y + 1 = 0\n[PROOFSTEP]\napply eq_iff_eq_cancel_right.mpr\n[GOAL]\ncase a\nR : Type u_1\nS : Type u_2\ninst✝² : CommRing R\ninst✝¹ : CommRing S\nk : ℕ\na : R\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nK : Type\nw✝¹ : Field K\nw✝ : CharP K p\nH : Set.Infinite Set.univ\nh : Set.Finite {x | ∃ y, x = y + y⁻¹ ∧ y ≠ 0}\nx : K\nx✝ : x ∈ {x | ∃ y, x = y + y⁻¹ ∧ y ≠ 0}\nφ : K[X] := X ^ 2 - ↑C x * X + 1\nhφ : φ ≠ 0\ny : K\nhy : ¬y = 0\n⊢ y * y + 1 - x * y = y ^ 2 - x * y + 1\n[PROOFSTEP]\nring\n  -- Finally, we prove the claim that our finite union of finite sets covers all of `K`.\n[GOAL]\ncase intro.intro.intro.a.h.a\nR : Type u_1\nS : Type u_2\ninst✝² : CommRing R\ninst✝¹ : CommRing S\nk : ℕ\na : R\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nK : Type\nw✝¹ : Field K\nw✝ : CharP K p\nH : Set.Infinite Set.univ\nh : Set.Finite {x | ∃ y, x = y + y⁻¹ ∧ y ≠ 0}\n⊢ Set.univ = do\n    let x ← {x | ∃ y, x = y + y⁻¹ ∧ y ≠ 0}\n    {y | x = y + y⁻¹ ∨ y = 0}\n[PROOFSTEP]\napply (Set.eq_univ_of_forall _).symm\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝² : CommRing R\ninst✝¹ : CommRing S\nk : ℕ\na : R\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nK : Type\nw✝¹ : Field K\nw✝ : CharP K p\nH : Set.Infinite Set.univ\nh : Set.Finite {x | ∃ y, x = y + y⁻¹ ∧ y ≠ 0}\n⊢ ∀ (x : K),\n    x ∈ do\n      let x ← {x | ∃ y, x = y + y⁻¹ ∧ y ≠ 0}\n      {y | x = y + y⁻¹ ∨ y = 0}\n[PROOFSTEP]\nintro x\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝² : CommRing R\ninst✝¹ : CommRing S\nk : ℕ\na : R\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nK : Type\nw✝¹ : Field K\nw✝ : CharP K p\nH : Set.Infinite Set.univ\nh : Set.Finite {x | ∃ y, x = y + y⁻¹ ∧ y ≠ 0}\nx : K\n⊢ x ∈ do\n    let x ← {x | ∃ y, x = y + y⁻¹ ∧ y ≠ 0}\n    {y | x = y + y⁻¹ ∨ y = 0}\n[PROOFSTEP]\nsimp only [exists_prop, Set.mem_iUnion, Set.bind_def, Ne.def, Set.mem_setOf_eq]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝² : CommRing R\ninst✝¹ : CommRing S\nk : ℕ\na : R\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nK : Type\nw✝¹ : Field K\nw✝ : CharP K p\nH : Set.Infinite Set.univ\nh : Set.Finite {x | ∃ y, x = y + y⁻¹ ∧ y ≠ 0}\nx : K\n⊢ ∃ i, (∃ y, i = y + y⁻¹ ∧ ¬y = 0) ∧ (i = x + x⁻¹ ∨ x = 0)\n[PROOFSTEP]\nby_cases hx : x = 0\n[GOAL]\ncase pos\nR : Type u_1\nS : Type u_2\ninst✝² : CommRing R\ninst✝¹ : CommRing S\nk : ℕ\na : R\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nK : Type\nw✝¹ : Field K\nw✝ : CharP K p\nH : Set.Infinite Set.univ\nh : Set.Finite {x | ∃ y, x = y + y⁻¹ ∧ y ≠ 0}\nx : K\nhx : x = 0\n⊢ ∃ i, (∃ y, i = y + y⁻¹ ∧ ¬y = 0) ∧ (i = x + x⁻¹ ∨ x = 0)\n[PROOFSTEP]\nsimp only [hx, and_true_iff, eq_self_iff_true, inv_zero, or_true_iff]\n[GOAL]\ncase pos\nR : Type u_1\nS : Type u_2\ninst✝² : CommRing R\ninst✝¹ : CommRing S\nk : ℕ\na : R\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nK : Type\nw✝¹ : Field K\nw✝ : CharP K p\nH : Set.Infinite Set.univ\nh : Set.Finite {x | ∃ y, x = y + y⁻¹ ∧ y ≠ 0}\nx : K\nhx : x = 0\n⊢ ∃ i y, i = y + y⁻¹ ∧ ¬y = 0\n[PROOFSTEP]\nexact ⟨_, 1, rfl, one_ne_zero⟩\n[GOAL]\ncase neg\nR : Type u_1\nS : Type u_2\ninst✝² : CommRing R\ninst✝¹ : CommRing S\nk : ℕ\na : R\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nK : Type\nw✝¹ : Field K\nw✝ : CharP K p\nH : Set.Infinite Set.univ\nh : Set.Finite {x | ∃ y, x = y + y⁻¹ ∧ y ≠ 0}\nx : K\nhx : ¬x = 0\n⊢ ∃ i, (∃ y, i = y + y⁻¹ ∧ ¬y = 0) ∧ (i = x + x⁻¹ ∨ x = 0)\n[PROOFSTEP]\nsimp only [hx, or_false_iff, exists_eq_right]\n[GOAL]\ncase neg\nR : Type u_1\nS : Type u_2\ninst✝² : CommRing R\ninst✝¹ : CommRing S\nk : ℕ\na : R\np : ℕ\ninst✝ : Fact (Nat.Prime p)\nK : Type\nw✝¹ : Field K\nw✝ : CharP K p\nH : Set.Infinite Set.univ\nh : Set.Finite {x | ∃ y, x = y + y⁻¹ ∧ y ≠ 0}\nx : K\nhx : ¬x = 0\n⊢ ∃ y, x + x⁻¹ = y + y⁻¹ ∧ ¬y = 0\n[PROOFSTEP]\nexact ⟨_, rfl, hx⟩\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝³ : CommRing R\ninst✝² : CommRing S\nk : ℕ\na : R\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP R p\n⊢ dickson 1 1 p = X ^ p\n[PROOFSTEP]\nhave h : (1 : R) = ZMod.castHom (dvd_refl p) R 1\n[GOAL]\ncase h\nR : Type u_1\nS : Type u_2\ninst✝³ : CommRing R\ninst✝² : CommRing S\nk : ℕ\na : R\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP R p\n⊢ 1 = ↑(ZMod.castHom (_ : p ∣ p) R) 1\nR : Type u_1\nS : Type u_2\ninst✝³ : CommRing R\ninst✝² : CommRing S\nk : ℕ\na : R\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP R p\nh : 1 = ↑(ZMod.castHom (_ : p ∣ p) R) 1\n⊢ dickson 1 1 p = X ^ p\n[PROOFSTEP]\nsimp only [ZMod.castHom_apply, ZMod.cast_one']\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝³ : CommRing R\ninst✝² : CommRing S\nk : ℕ\na : R\np : ℕ\ninst✝¹ : Fact (Nat.Prime p)\ninst✝ : CharP R p\nh : 1 = ↑(ZMod.castHom (_ : p ∣ p) R) 1\n⊢ dickson 1 1 p = X ^ p\n[PROOFSTEP]\nrw [h, ← map_dickson (ZMod.castHom (dvd_refl p) R), dickson_one_one_zmod_p, Polynomial.map_pow, map_X]\n", "meta": {"mathlib_filename": "Mathlib.RingTheory.Polynomial.Dickson", "llama_tokens": 18483, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7718435083355187, "lm_q2_score": 0.6513548714339145, "lm_q1q2_score": 0.5027440291389833}}
{"text": "[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝² : Monoid M\ninst✝¹ : Monoid N\ninst✝ : Monoid P\nl l₁ l₂ : List M\na : M\n⊢ prod (a :: l) = foldl (fun x x_1 => x * x_1) (a * 1) l\n[PROOFSTEP]\nsimp only [List.prod, foldl_cons, one_mul, mul_one]\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝² : Monoid M\ninst✝¹ : Monoid N\ninst✝ : Monoid P\nl l₁ l₂ : List M\na : M\n⊢ prod (l₁ ++ l₂) = foldl (fun x x_1 => x * x_1) (foldl (fun x x_1 => x * x_1) 1 l₁ * 1) l₂\n[PROOFSTEP]\nsimp [List.prod]\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝² : Monoid M\ninst✝¹ : Monoid N\ninst✝ : Monoid P\nl l₁ l₂ : List M\na : M\n⊢ prod (concat l a) = prod l * a\n[PROOFSTEP]\nrw [concat_eq_append, prod_append, prod_singleton]\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝² : Monoid M\ninst✝¹ : Monoid N\ninst✝ : Monoid P\nl✝ l₁ l₂ : List M\na : M\nl : List (List M)\n⊢ prod (join l) = prod (map prod l)\n[PROOFSTEP]\ninduction l <;> [rfl; simp only [*, List.join, map, prod_append, prod_cons]]\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝² : Monoid M\ninst✝¹ : Monoid N\ninst✝ : Monoid P\nl✝ l₁ l₂ : List M\na : M\nl : List (List M)\n⊢ prod (join l) = prod (map prod l)\n[PROOFSTEP]\ninduction l\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝² : Monoid M\ninst✝¹ : Monoid N\ninst✝ : Monoid P\nl l₁ l₂ : List M\na : M\n⊢ prod (join []) = prod (map prod [])\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝² : Monoid M\ninst✝¹ : Monoid N\ninst✝ : Monoid P\nl l₁ l₂ : List M\na : M\nhead✝ : List M\ntail✝ : List (List M)\ntail_ih✝ : prod (join tail✝) = prod (map prod tail✝)\n⊢ prod (join (head✝ :: tail✝)) = prod (map prod (head✝ :: tail✝))\n[PROOFSTEP]\nsimp only [*, List.join, map, prod_append, prod_cons]\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝² : Monoid M\ninst✝¹ : Monoid N\ninst✝ : Monoid P\nl✝ l₁ l₂ : List M\na✝ a : M\nl : List M\n⊢ prod (a :: l) = foldr (fun x x_1 => x * x_1) 1 (a :: l)\n[PROOFSTEP]\nrw [prod_cons, foldr_cons, prod_eq_foldr]\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝² : Monoid M\ninst✝¹ : Monoid N\ninst✝ : Monoid P\nl l₁ l₂ : List M\na✝ : M\nn : ℕ\na : M\n⊢ prod (replicate n a) = a ^ n\n[PROOFSTEP]\ninduction' n with n ih\n[GOAL]\ncase zero\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝² : Monoid M\ninst✝¹ : Monoid N\ninst✝ : Monoid P\nl l₁ l₂ : List M\na✝ a : M\n⊢ prod (replicate Nat.zero a) = a ^ Nat.zero\n[PROOFSTEP]\nrw [pow_zero]\n[GOAL]\ncase zero\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝² : Monoid M\ninst✝¹ : Monoid N\ninst✝ : Monoid P\nl l₁ l₂ : List M\na✝ a : M\n⊢ prod (replicate Nat.zero a) = 1\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝² : Monoid M\ninst✝¹ : Monoid N\ninst✝ : Monoid P\nl l₁ l₂ : List M\na✝ a : M\nn : ℕ\nih : prod (replicate n a) = a ^ n\n⊢ prod (replicate (Nat.succ n) a) = a ^ Nat.succ n\n[PROOFSTEP]\nrw [replicate_succ, prod_cons, ih, pow_succ]\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝² : Monoid M\ninst✝¹ : Monoid N\ninst✝ : Monoid P\nl✝ l₁ l₂ : List M\na : M\nl : List M\nm : M\nh : ∀ (x : M), x ∈ l → x = m\n⊢ prod l = m ^ length l\n[PROOFSTEP]\nrw [← prod_replicate, ← List.eq_replicate.mpr ⟨rfl, h⟩]\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝² : Monoid M\ninst✝¹ : Monoid N\ninst✝ : Monoid P\nl✝¹ l₁ l₂ : List M\na✝ : M\nl✝ : List ι\nr : M → N → Prop\nf : ι → M\ng : ι → N\nh₁ : r 1 1\nh₂ : ∀ ⦃i : ι⦄ ⦃a : M⦄ ⦃b : N⦄, r a b → r (f i * a) (g i * b)\na : ι\nl : List ι\nhl : r (prod (map f l)) (prod (map g l))\n⊢ r (prod (map f (a :: l))) (prod (map g (a :: l)))\n[PROOFSTEP]\nsimp only [map_cons, prod_cons, h₂ hl]\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝³ : Monoid M\ninst✝² : Monoid N\ninst✝¹ : Monoid P\nl✝ l₁ l₂ : List M\na : M\nl : List M\nF : Type u_9\ninst✝ : MonoidHomClass F M N\nf : F\n⊢ prod (map (↑f) l) = ↑f (prod l)\n[PROOFSTEP]\nsimp only [prod, foldl_map, ← map_one f]\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝³ : Monoid M\ninst✝² : Monoid N\ninst✝¹ : Monoid P\nl✝ l₁ l₂ : List M\na : M\nl : List M\nF : Type u_9\ninst✝ : MonoidHomClass F M N\nf : F\n⊢ foldl (fun x y => x * ↑f y) (↑f 1) l = ↑f (foldl (fun x x_1 => x * x_1) 1 l)\n[PROOFSTEP]\nexact l.foldl_hom f (· * ·) (· * f ·) 1 (fun x y => (map_mul f x y).symm)\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝² : Monoid M\ninst✝¹ : Monoid N\ninst✝ : Monoid P\nl✝ l₁ l₂ : List M\na : M\nl : List ι\nf : M → N → P\nhf : ∀ (a b : M) (c d : N), f (a * b) (c * d) = f a c * f b d\nhf' : f 1 1 = 1\nf₁ : ι → M\nf₂ : ι → N\n⊢ prod (map (fun i => f (f₁ i) (f₂ i)) l) = f (prod (map f₁ l)) (prod (map f₂ l))\n[PROOFSTEP]\nsimp only [prod, foldl_map]\n  -- Porting note: next 3 lines used to be\n    -- convert l.foldl_hom₂ (fun a b => f a b) _ _ _ _ _ fun a b i => _\n    -- · exact hf'.symm\n    -- · exact hf _ _ _ _\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝² : Monoid M\ninst✝¹ : Monoid N\ninst✝ : Monoid P\nl✝ l₁ l₂ : List M\na : M\nl : List ι\nf : M → N → P\nhf : ∀ (a b : M) (c d : N), f (a * b) (c * d) = f a c * f b d\nhf' : f 1 1 = 1\nf₁ : ι → M\nf₂ : ι → N\n⊢ foldl (fun x y => x * f (f₁ y) (f₂ y)) 1 l = f (foldl (fun x y => x * f₁ y) 1 l) (foldl (fun x y => x * f₂ y) 1 l)\n[PROOFSTEP]\nrw [← l.foldl_hom₂ (fun a b => f a b), hf']\n[GOAL]\ncase h\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝² : Monoid M\ninst✝¹ : Monoid N\ninst✝ : Monoid P\nl✝ l₁ l₂ : List M\na : M\nl : List ι\nf : M → N → P\nhf : ∀ (a b : M) (c d : N), f (a * b) (c * d) = f a c * f b d\nhf' : f 1 1 = 1\nf₁ : ι → M\nf₂ : ι → N\n⊢ ∀ (a : M) (b : N) (i : ι), f (a * f₁ i) (b * f₂ i) = f a b * f (f₁ i) (f₂ i)\n[PROOFSTEP]\nintros\n[GOAL]\ncase h\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝² : Monoid M\ninst✝¹ : Monoid N\ninst✝ : Monoid P\nl✝ l₁ l₂ : List M\na : M\nl : List ι\nf : M → N → P\nhf : ∀ (a b : M) (c d : N), f (a * b) (c * d) = f a c * f b d\nhf' : f 1 1 = 1\nf₁ : ι → M\nf₂ : ι → N\na✝ : M\nb✝ : N\ni✝ : ι\n⊢ f (a✝ * f₁ i✝) (b✝ * f₂ i✝) = f a✝ b✝ * f (f₁ i✝) (f₂ i✝)\n[PROOFSTEP]\nexact hf _ _ _ _\n[GOAL]\nι : Type u_1\nα✝ : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝⁴ : Monoid M\ninst✝³ : Monoid N\ninst✝² : Monoid P\nl✝ l₁ l₂ : List M\na : M\nα : Type u_9\ninst✝¹ : CommMonoid α\ninst✝ : HasDistribNeg α\nl : List α\n⊢ prod (map Neg.neg l) = (-1) ^ length l * prod l\n[PROOFSTEP]\nsimpa only [id_eq, neg_mul, one_mul, map_const', prod_replicate, map_id] using @prod_map_mul α α _ l (fun _ => -1) id\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG✝ : Type u_7\nR : Type u_8\ninst✝³ : Monoid M\ninst✝² : Monoid N\ninst✝¹ : Monoid P\nl l₁ l₂ : List M\na : M\nL : List ι\nf : ι → M\nG : Type u_9\ninst✝ : MonoidHomClass G M N\ng : G\n⊢ prod (map (↑g ∘ f) L) = ↑g (prod (map f L))\n[PROOFSTEP]\nrw [← prod_hom, map_map]\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝² : Monoid M\ninst✝¹ : Monoid N\ninst✝ : Monoid P\nl l₁ l₂ : List M\na : M\nx✝ : ∀ (m : M), m ∈ [] → IsUnit m\n⊢ IsUnit (prod [])\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝² : Monoid M\ninst✝¹ : Monoid N\ninst✝ : Monoid P\nl l₁ l₂ : List M\na h : M\nt : List M\nu : ∀ (m : M), m ∈ h :: t → IsUnit m\n⊢ IsUnit (prod (h :: t))\n[PROOFSTEP]\nsimp only [List.prod_cons]\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝² : Monoid M\ninst✝¹ : Monoid N\ninst✝ : Monoid P\nl l₁ l₂ : List M\na h : M\nt : List M\nu : ∀ (m : M), m ∈ h :: t → IsUnit m\n⊢ IsUnit (h * prod t)\n[PROOFSTEP]\nexact IsUnit.mul (u h (mem_cons_self h t)) (prod_isUnit fun m mt => u m (mem_cons_of_mem h mt))\n[GOAL]\nι : Type u_1\nα✝ : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝³ : Monoid M\ninst✝² : Monoid N\ninst✝¹ : Monoid P\nl l₁ l₂ : List M\na : M\nα : Type u_9\ninst✝ : CommMonoid α\nL : List α\n⊢ IsUnit (prod L) ↔ ∀ (m : α), m ∈ L → IsUnit m\n[PROOFSTEP]\nrefine' ⟨fun h => _, prod_isUnit⟩\n[GOAL]\nι : Type u_1\nα✝ : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝³ : Monoid M\ninst✝² : Monoid N\ninst✝¹ : Monoid P\nl l₁ l₂ : List M\na : M\nα : Type u_9\ninst✝ : CommMonoid α\nL : List α\nh : IsUnit (prod L)\n⊢ ∀ (m : α), m ∈ L → IsUnit m\n[PROOFSTEP]\ninduction' L with m L ih\n[GOAL]\ncase nil\nι : Type u_1\nα✝ : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝³ : Monoid M\ninst✝² : Monoid N\ninst✝¹ : Monoid P\nl l₁ l₂ : List M\na : M\nα : Type u_9\ninst✝ : CommMonoid α\nL : List α\nh✝ : IsUnit (prod L)\nh : IsUnit (prod [])\n⊢ ∀ (m : α), m ∈ [] → IsUnit m\n[PROOFSTEP]\nexact fun m' h' => False.elim (not_mem_nil m' h')\n[GOAL]\ncase cons\nι : Type u_1\nα✝ : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝³ : Monoid M\ninst✝² : Monoid N\ninst✝¹ : Monoid P\nl l₁ l₂ : List M\na : M\nα : Type u_9\ninst✝ : CommMonoid α\nL✝ : List α\nh✝ : IsUnit (prod L✝)\nm : α\nL : List α\nih : IsUnit (prod L) → ∀ (m : α), m ∈ L → IsUnit m\nh : IsUnit (prod (m :: L))\n⊢ ∀ (m_1 : α), m_1 ∈ m :: L → IsUnit m_1\n[PROOFSTEP]\nrw [prod_cons, IsUnit.mul_iff] at h \n[GOAL]\ncase cons\nι : Type u_1\nα✝ : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝³ : Monoid M\ninst✝² : Monoid N\ninst✝¹ : Monoid P\nl l₁ l₂ : List M\na : M\nα : Type u_9\ninst✝ : CommMonoid α\nL✝ : List α\nh✝ : IsUnit (prod L✝)\nm : α\nL : List α\nih : IsUnit (prod L) → ∀ (m : α), m ∈ L → IsUnit m\nh : IsUnit m ∧ IsUnit (prod L)\n⊢ ∀ (m_1 : α), m_1 ∈ m :: L → IsUnit m_1\n[PROOFSTEP]\nexact fun m' h' => Or.elim (eq_or_mem_of_mem_cons h') (fun H => H.substr h.1) fun H => ih h.2 _ H\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝² : Monoid M\ninst✝¹ : Monoid N\ninst✝ : Monoid P\nl l₁ l₂ : List M\na : M\ni : ℕ\n⊢ prod (take i []) * prod (drop i []) = prod []\n[PROOFSTEP]\nsimp [Nat.zero_le]\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝² : Monoid M\ninst✝¹ : Monoid N\ninst✝ : Monoid P\nl l₁ l₂ : List M\na : M\nL : List M\n⊢ prod (take 0 L) * prod (drop 0 L) = prod L\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝² : Monoid M\ninst✝¹ : Monoid N\ninst✝ : Monoid P\nl l₁ l₂ : List M\na h : M\nt : List M\nn : ℕ\n⊢ prod (take (n + 1) (h :: t)) * prod (drop (n + 1) (h :: t)) = prod (h :: t)\n[PROOFSTEP]\ndsimp\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝² : Monoid M\ninst✝¹ : Monoid N\ninst✝ : Monoid P\nl l₁ l₂ : List M\na h : M\nt : List M\nn : ℕ\n⊢ prod (h :: take n t) * prod (drop n t) = prod (h :: t)\n[PROOFSTEP]\nrw [prod_cons, prod_cons, mul_assoc, prod_take_mul_prod_drop t]\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝² : Monoid M\ninst✝¹ : Monoid N\ninst✝ : Monoid P\nl l₁ l₂ : List M\na : M\ni : ℕ\np : i < length []\n⊢ prod (take (i + 1) []) = prod (take i []) * nthLe [] i p\n[PROOFSTEP]\ncases p\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝² : Monoid M\ninst✝¹ : Monoid N\ninst✝ : Monoid P\nl l₁ l₂ : List M\na h : M\nt : List M\nn : ℕ\np : n + 1 < length (h :: t)\n⊢ prod (take (n + 1 + 1) (h :: t)) = prod (take (n + 1) (h :: t)) * nthLe (h :: t) (n + 1) p\n[PROOFSTEP]\ndsimp\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝² : Monoid M\ninst✝¹ : Monoid N\ninst✝ : Monoid P\nl l₁ l₂ : List M\na h : M\nt : List M\nn : ℕ\np : n + 1 < length (h :: t)\n⊢ prod (h :: take (n + 1) t) = prod (h :: take n t) * nthLe (h :: t) (n + 1) p\n[PROOFSTEP]\nrw [prod_cons, prod_cons, prod_take_succ t n (Nat.lt_of_succ_lt_succ p), mul_assoc, nthLe_cons,\n  dif_neg (Nat.add_one_ne_zero _)]\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝² : Monoid M\ninst✝¹ : Monoid N\ninst✝ : Monoid P\nl l₁ l₂ : List M\na h : M\nt : List M\nn : ℕ\np : n + 1 < length (h :: t)\n⊢ h * (prod (take n t) * nthLe t n (_ : n < length t)) =\n    h * (prod (take n t) * nthLe t (n + 1 - 1) (_ : n + 1 - 1 < length t))\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝² : Monoid M\ninst✝¹ : Monoid N\ninst✝ : Monoid P\nl l₁ l₂ : List M\na : M\nL : List M\nh : prod L ≠ 1\n⊢ 0 < length L\n[PROOFSTEP]\ncases L\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝² : Monoid M\ninst✝¹ : Monoid N\ninst✝ : Monoid P\nl l₁ l₂ : List M\na : M\nh : prod [] ≠ 1\n⊢ 0 < length []\n[PROOFSTEP]\ncontrapose h\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝² : Monoid M\ninst✝¹ : Monoid N\ninst✝ : Monoid P\nl l₁ l₂ : List M\na : M\nh : ¬0 < length []\n⊢ ¬prod [] ≠ 1\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝² : Monoid M\ninst✝¹ : Monoid N\ninst✝ : Monoid P\nl l₁ l₂ : List M\na head✝ : M\ntail✝ : List M\nh : prod (head✝ :: tail✝) ≠ 1\n⊢ 0 < length (head✝ :: tail✝)\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝² : Monoid M\ninst✝¹ : Monoid N\ninst✝ : Monoid P\nl l₁ l₂ : List M\na✝ x : M\nxs : List M\na : M\n⊢ prod (set (x :: xs) 0 a) =\n    (prod (take 0 (x :: xs)) * if 0 < length (x :: xs) then a else 1) * prod (drop (0 + 1) (x :: xs))\n[PROOFSTEP]\nsimp [set]\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝² : Monoid M\ninst✝¹ : Monoid N\ninst✝ : Monoid P\nl l₁ l₂ : List M\na✝ x : M\nxs : List M\ni : ℕ\na : M\n⊢ prod (set (x :: xs) (i + 1) a) =\n    (prod (take (i + 1) (x :: xs)) * if i + 1 < length (x :: xs) then a else 1) * prod (drop (i + 1 + 1) (x :: xs))\n[PROOFSTEP]\nsimp [set, prod_set xs i a, mul_assoc, Nat.succ_eq_add_one]\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝² : Monoid M\ninst✝¹ : Monoid N\ninst✝ : Monoid P\nl l₁ l₂ : List M\na : M\nx✝¹ : ℕ\nx✝ : M\n⊢ prod (set [] x✝¹ x✝) = (prod (take x✝¹ []) * if x✝¹ < length [] then x✝ else 1) * prod (drop (x✝¹ + 1) [])\n[PROOFSTEP]\nsimp [set, (Nat.zero_le _).not_lt, Nat.zero_le]\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝² : Monoid M\ninst✝¹ : Monoid N\ninst✝ : Monoid P\nl✝ l₁ l₂ : List M\na : M\nl : List M\n⊢ Option.getD (get? l 0) 1 * prod (tail l) = prod l\n[PROOFSTEP]\ncases l\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝² : Monoid M\ninst✝¹ : Monoid N\ninst✝ : Monoid P\nl l₁ l₂ : List M\na : M\n⊢ Option.getD (get? [] 0) 1 * prod (tail []) = prod []\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝² : Monoid M\ninst✝¹ : Monoid N\ninst✝ : Monoid P\nl l₁ l₂ : List M\na head✝ : M\ntail✝ : List M\n⊢ Option.getD (get? (head✝ :: tail✝) 0) 1 * prod (tail (head✝ :: tail✝)) = prod (head✝ :: tail✝)\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝³ : Monoid M\ninst✝² : Monoid N\ninst✝¹ : Monoid P\nl✝ l₁ l₂ : List M\na : M\ninst✝ : Inhabited M\nl : List M\nh : l ≠ []\n⊢ headI l * prod (tail l) = prod l\n[PROOFSTEP]\ncases l <;> [contradiction; simp]\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝³ : Monoid M\ninst✝² : Monoid N\ninst✝¹ : Monoid P\nl✝ l₁ l₂ : List M\na : M\ninst✝ : Inhabited M\nl : List M\nh : l ≠ []\n⊢ headI l * prod (tail l) = prod l\n[PROOFSTEP]\ncases l\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝³ : Monoid M\ninst✝² : Monoid N\ninst✝¹ : Monoid P\nl l₁ l₂ : List M\na : M\ninst✝ : Inhabited M\nh : [] ≠ []\n⊢ headI [] * prod (tail []) = prod []\n[PROOFSTEP]\ncontradiction\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝³ : Monoid M\ninst✝² : Monoid N\ninst✝¹ : Monoid P\nl l₁ l₂ : List M\na : M\ninst✝ : Inhabited M\nhead✝ : M\ntail✝ : List M\nh : head✝ :: tail✝ ≠ []\n⊢ headI (head✝ :: tail✝) * prod (tail (head✝ :: tail✝)) = prod (head✝ :: tail✝)\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝² : Monoid M\ninst✝¹ : Monoid N\ninst✝ : Monoid P\nl✝ l₁ l₂ : List M\na : M\nl : List M\ny : M\nh : ∀ (x : M), x ∈ l → Commute y x\n⊢ Commute y (prod l)\n[PROOFSTEP]\ninduction' l with z l IH\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝² : Monoid M\ninst✝¹ : Monoid N\ninst✝ : Monoid P\nl✝ l₁ l₂ : List M\na : M\nl : List M\ny : M\nh✝ : ∀ (x : M), x ∈ l → Commute y x\nh : ∀ (x : M), x ∈ [] → Commute y x\n⊢ Commute y (prod [])\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝² : Monoid M\ninst✝¹ : Monoid N\ninst✝ : Monoid P\nl✝¹ l₁ l₂ : List M\na : M\nl✝ : List M\ny : M\nh✝ : ∀ (x : M), x ∈ l✝ → Commute y x\nz : M\nl : List M\nIH : (∀ (x : M), x ∈ l → Commute y x) → Commute y (prod l)\nh : ∀ (x : M), x ∈ z :: l → Commute y x\n⊢ Commute y (prod (z :: l))\n[PROOFSTEP]\nrw [List.forall_mem_cons] at h \n[GOAL]\ncase cons\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝² : Monoid M\ninst✝¹ : Monoid N\ninst✝ : Monoid P\nl✝¹ l₁ l₂ : List M\na : M\nl✝ : List M\ny : M\nh✝ : ∀ (x : M), x ∈ l✝ → Commute y x\nz : M\nl : List M\nIH : (∀ (x : M), x ∈ l → Commute y x) → Commute y (prod l)\nh : Commute y z ∧ ∀ (x : M), x ∈ l → Commute y x\n⊢ Commute y (prod (z :: l))\n[PROOFSTEP]\nrw [List.prod_cons]\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝² : Monoid M\ninst✝¹ : Monoid N\ninst✝ : Monoid P\nl✝¹ l₁ l₂ : List M\na : M\nl✝ : List M\ny : M\nh✝ : ∀ (x : M), x ∈ l✝ → Commute y x\nz : M\nl : List M\nIH : (∀ (x : M), x ∈ l → Commute y x) → Commute y (prod l)\nh : Commute y z ∧ ∀ (x : M), x ∈ l → Commute y x\n⊢ Commute y (z * prod l)\n[PROOFSTEP]\nexact Commute.mul_right h.1 (IH h.2)\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝⁵ : Monoid M\ninst✝⁴ : Monoid N\ninst✝³ : Monoid P\nl l₁✝ l₂✝ : List M\na : M\ninst✝² : Preorder M\ninst✝¹ : CovariantClass M M (Function.swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\ninst✝ : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\nl₁ l₂ : List M\nh : Forall₂ (fun x x_1 => x ≤ x_1) l₁ l₂\n⊢ prod l₁ ≤ prod l₂\n[PROOFSTEP]\ninduction' h with a b la lb hab ih ih'\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝⁵ : Monoid M\ninst✝⁴ : Monoid N\ninst✝³ : Monoid P\nl l₁✝ l₂✝ : List M\na : M\ninst✝² : Preorder M\ninst✝¹ : CovariantClass M M (Function.swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\ninst✝ : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\nl₁ l₂ : List M\n⊢ prod [] ≤ prod []\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝⁵ : Monoid M\ninst✝⁴ : Monoid N\ninst✝³ : Monoid P\nl l₁✝ l₂✝ : List M\na✝ : M\ninst✝² : Preorder M\ninst✝¹ : CovariantClass M M (Function.swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\ninst✝ : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\nl₁ l₂ : List M\na b : M\nla lb : List M\nhab : a ≤ b\nih : Forall₂ (fun x x_1 => x ≤ x_1) la lb\nih' : prod la ≤ prod lb\n⊢ prod (a :: la) ≤ prod (b :: lb)\n[PROOFSTEP]\nsimpa only [prod_cons] using mul_le_mul' hab ih'\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝⁵ : Monoid M\ninst✝⁴ : Monoid N\ninst✝³ : Monoid P\nl l₁✝ l₂✝ : List M\na : M\ninst✝² : Preorder M\ninst✝¹ : CovariantClass M M (Function.swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\ninst✝ : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\nl₁ l₂ : List M\nh : l₁ <+ l₂\nh₁ : ∀ (a : M), a ∈ l₂ → 1 ≤ a\n⊢ prod l₁ ≤ prod l₂\n[PROOFSTEP]\ninduction h\n[GOAL]\ncase slnil\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝⁵ : Monoid M\ninst✝⁴ : Monoid N\ninst✝³ : Monoid P\nl l₁✝ l₂✝ : List M\na : M\ninst✝² : Preorder M\ninst✝¹ : CovariantClass M M (Function.swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\ninst✝ : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\nl₁ l₂ : List M\nh₁ : ∀ (a : M), a ∈ [] → 1 ≤ a\n⊢ prod [] ≤ prod []\ncase cons\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝⁵ : Monoid M\ninst✝⁴ : Monoid N\ninst✝³ : Monoid P\nl l₁✝¹ l₂✝¹ : List M\na : M\ninst✝² : Preorder M\ninst✝¹ : CovariantClass M M (Function.swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\ninst✝ : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\nl₁ l₂ l₁✝ l₂✝ : List M\na✝¹ : M\na✝ : l₁✝ <+ l₂✝\na_ih✝ : (∀ (a : M), a ∈ l₂✝ → 1 ≤ a) → prod l₁✝ ≤ prod l₂✝\nh₁ : ∀ (a : M), a ∈ a✝¹ :: l₂✝ → 1 ≤ a\n⊢ prod l₁✝ ≤ prod (a✝¹ :: l₂✝)\ncase cons₂\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝⁵ : Monoid M\ninst✝⁴ : Monoid N\ninst✝³ : Monoid P\nl l₁✝¹ l₂✝¹ : List M\na : M\ninst✝² : Preorder M\ninst✝¹ : CovariantClass M M (Function.swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\ninst✝ : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\nl₁ l₂ l₁✝ l₂✝ : List M\na✝¹ : M\na✝ : l₁✝ <+ l₂✝\na_ih✝ : (∀ (a : M), a ∈ l₂✝ → 1 ≤ a) → prod l₁✝ ≤ prod l₂✝\nh₁ : ∀ (a : M), a ∈ a✝¹ :: l₂✝ → 1 ≤ a\n⊢ prod (a✝¹ :: l₁✝) ≤ prod (a✝¹ :: l₂✝)\n[PROOFSTEP]\ncase slnil => rfl\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝⁵ : Monoid M\ninst✝⁴ : Monoid N\ninst✝³ : Monoid P\nl l₁✝ l₂✝ : List M\na : M\ninst✝² : Preorder M\ninst✝¹ : CovariantClass M M (Function.swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\ninst✝ : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\nl₁ l₂ : List M\nh₁ : ∀ (a : M), a ∈ [] → 1 ≤ a\n⊢ prod [] ≤ prod []\n[PROOFSTEP]\ncase slnil => rfl\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝⁵ : Monoid M\ninst✝⁴ : Monoid N\ninst✝³ : Monoid P\nl l₁✝ l₂✝ : List M\na : M\ninst✝² : Preorder M\ninst✝¹ : CovariantClass M M (Function.swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\ninst✝ : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\nl₁ l₂ : List M\nh₁ : ∀ (a : M), a ∈ [] → 1 ≤ a\n⊢ prod [] ≤ prod []\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝⁵ : Monoid M\ninst✝⁴ : Monoid N\ninst✝³ : Monoid P\nl l₁✝¹ l₂✝¹ : List M\na : M\ninst✝² : Preorder M\ninst✝¹ : CovariantClass M M (Function.swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\ninst✝ : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\nl₁ l₂ l₁✝ l₂✝ : List M\na✝¹ : M\na✝ : l₁✝ <+ l₂✝\na_ih✝ : (∀ (a : M), a ∈ l₂✝ → 1 ≤ a) → prod l₁✝ ≤ prod l₂✝\nh₁ : ∀ (a : M), a ∈ a✝¹ :: l₂✝ → 1 ≤ a\n⊢ prod l₁✝ ≤ prod (a✝¹ :: l₂✝)\ncase cons₂\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝⁵ : Monoid M\ninst✝⁴ : Monoid N\ninst✝³ : Monoid P\nl l₁✝¹ l₂✝¹ : List M\na : M\ninst✝² : Preorder M\ninst✝¹ : CovariantClass M M (Function.swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\ninst✝ : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\nl₁ l₂ l₁✝ l₂✝ : List M\na✝¹ : M\na✝ : l₁✝ <+ l₂✝\na_ih✝ : (∀ (a : M), a ∈ l₂✝ → 1 ≤ a) → prod l₁✝ ≤ prod l₂✝\nh₁ : ∀ (a : M), a ∈ a✝¹ :: l₂✝ → 1 ≤ a\n⊢ prod (a✝¹ :: l₁✝) ≤ prod (a✝¹ :: l₂✝)\n[PROOFSTEP]\ncase cons l₁ l₂ a _ ih' =>\n  simp only [prod_cons, forall_mem_cons] at h₁ ⊢\n  exact (ih' h₁.2).trans (le_mul_of_one_le_left' h₁.1)\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝⁵ : Monoid M\ninst✝⁴ : Monoid N\ninst✝³ : Monoid P\nl l₁✝¹ l₂✝¹ : List M\na✝¹ : M\ninst✝² : Preorder M\ninst✝¹ : CovariantClass M M (Function.swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\ninst✝ : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\nl₁✝ l₂✝ l₁ l₂ : List M\na : M\na✝ : l₁ <+ l₂\nih' : (∀ (a : M), a ∈ l₂ → 1 ≤ a) → prod l₁ ≤ prod l₂\nh₁ : ∀ (a_1 : M), a_1 ∈ a :: l₂ → 1 ≤ a_1\n⊢ prod l₁ ≤ prod (a :: l₂)\n[PROOFSTEP]\ncase cons l₁ l₂ a _ ih' =>\n  simp only [prod_cons, forall_mem_cons] at h₁ ⊢\n  exact (ih' h₁.2).trans (le_mul_of_one_le_left' h₁.1)\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝⁵ : Monoid M\ninst✝⁴ : Monoid N\ninst✝³ : Monoid P\nl l₁✝¹ l₂✝¹ : List M\na✝¹ : M\ninst✝² : Preorder M\ninst✝¹ : CovariantClass M M (Function.swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\ninst✝ : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\nl₁✝ l₂✝ l₁ l₂ : List M\na : M\na✝ : l₁ <+ l₂\nih' : (∀ (a : M), a ∈ l₂ → 1 ≤ a) → prod l₁ ≤ prod l₂\nh₁ : ∀ (a_1 : M), a_1 ∈ a :: l₂ → 1 ≤ a_1\n⊢ prod l₁ ≤ prod (a :: l₂)\n[PROOFSTEP]\nsimp only [prod_cons, forall_mem_cons] at h₁ ⊢\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝⁵ : Monoid M\ninst✝⁴ : Monoid N\ninst✝³ : Monoid P\nl l₁✝¹ l₂✝¹ : List M\na✝¹ : M\ninst✝² : Preorder M\ninst✝¹ : CovariantClass M M (Function.swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\ninst✝ : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\nl₁✝ l₂✝ l₁ l₂ : List M\na : M\na✝ : l₁ <+ l₂\nih' : (∀ (a : M), a ∈ l₂ → 1 ≤ a) → prod l₁ ≤ prod l₂\nh₁ : 1 ≤ a ∧ ∀ (x : M), x ∈ l₂ → 1 ≤ x\n⊢ prod l₁ ≤ a * prod l₂\n[PROOFSTEP]\nexact (ih' h₁.2).trans (le_mul_of_one_le_left' h₁.1)\n[GOAL]\ncase cons₂\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝⁵ : Monoid M\ninst✝⁴ : Monoid N\ninst✝³ : Monoid P\nl l₁✝¹ l₂✝¹ : List M\na : M\ninst✝² : Preorder M\ninst✝¹ : CovariantClass M M (Function.swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\ninst✝ : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\nl₁ l₂ l₁✝ l₂✝ : List M\na✝¹ : M\na✝ : l₁✝ <+ l₂✝\na_ih✝ : (∀ (a : M), a ∈ l₂✝ → 1 ≤ a) → prod l₁✝ ≤ prod l₂✝\nh₁ : ∀ (a : M), a ∈ a✝¹ :: l₂✝ → 1 ≤ a\n⊢ prod (a✝¹ :: l₁✝) ≤ prod (a✝¹ :: l₂✝)\n[PROOFSTEP]\ncase cons₂ l₁ l₂ a _ ih' =>\n  simp only [prod_cons, forall_mem_cons] at h₁ ⊢\n  exact mul_le_mul_left' (ih' h₁.2) _\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝⁵ : Monoid M\ninst✝⁴ : Monoid N\ninst✝³ : Monoid P\nl l₁✝¹ l₂✝¹ : List M\na✝¹ : M\ninst✝² : Preorder M\ninst✝¹ : CovariantClass M M (Function.swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\ninst✝ : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\nl₁✝ l₂✝ l₁ l₂ : List M\na : M\na✝ : l₁ <+ l₂\nih' : (∀ (a : M), a ∈ l₂ → 1 ≤ a) → prod l₁ ≤ prod l₂\nh₁ : ∀ (a_1 : M), a_1 ∈ a :: l₂ → 1 ≤ a_1\n⊢ prod (a :: l₁) ≤ prod (a :: l₂)\n[PROOFSTEP]\ncase cons₂ l₁ l₂ a _ ih' =>\n  simp only [prod_cons, forall_mem_cons] at h₁ ⊢\n  exact mul_le_mul_left' (ih' h₁.2) _\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝⁵ : Monoid M\ninst✝⁴ : Monoid N\ninst✝³ : Monoid P\nl l₁✝¹ l₂✝¹ : List M\na✝¹ : M\ninst✝² : Preorder M\ninst✝¹ : CovariantClass M M (Function.swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\ninst✝ : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\nl₁✝ l₂✝ l₁ l₂ : List M\na : M\na✝ : l₁ <+ l₂\nih' : (∀ (a : M), a ∈ l₂ → 1 ≤ a) → prod l₁ ≤ prod l₂\nh₁ : ∀ (a_1 : M), a_1 ∈ a :: l₂ → 1 ≤ a_1\n⊢ prod (a :: l₁) ≤ prod (a :: l₂)\n[PROOFSTEP]\nsimp only [prod_cons, forall_mem_cons] at h₁ ⊢\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝⁵ : Monoid M\ninst✝⁴ : Monoid N\ninst✝³ : Monoid P\nl l₁✝¹ l₂✝¹ : List M\na✝¹ : M\ninst✝² : Preorder M\ninst✝¹ : CovariantClass M M (Function.swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\ninst✝ : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\nl₁✝ l₂✝ l₁ l₂ : List M\na : M\na✝ : l₁ <+ l₂\nih' : (∀ (a : M), a ∈ l₂ → 1 ≤ a) → prod l₁ ≤ prod l₂\nh₁ : 1 ≤ a ∧ ∀ (x : M), x ∈ l₂ → 1 ≤ x\n⊢ a * prod l₁ ≤ a * prod l₂\n[PROOFSTEP]\nexact mul_le_mul_left' (ih' h₁.2) _\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝⁵ : Monoid M\ninst✝⁴ : Monoid N\ninst✝³ : Monoid P\nl✝ l₁ l₂ : List M\na : M\ninst✝² : Preorder M\ninst✝¹ : CovariantClass M M (Function.swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\ninst✝ : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\nl : List ι\nf g : ι → M\nh : ∀ (i : ι), i ∈ l → f i ≤ g i\n⊢ Forall₂ (fun x x_1 => x ≤ x_1) (map f l) (map g l)\n[PROOFSTEP]\nsimpa\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝⁷ : Monoid M\ninst✝⁶ : Monoid N\ninst✝⁵ : Monoid P\nl✝ l₁ l₂ : List M\na : M\ninst✝⁴ : Preorder M\ninst✝³ : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x < x_1\ninst✝² : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\ninst✝¹ : CovariantClass M M (Function.swap fun x x_1 => x * x_1) fun x x_1 => x < x_1\ninst✝ : CovariantClass M M (Function.swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\nl : List ι\nf g : ι → M\nh₁ : ∀ (i : ι), i ∈ l → f i ≤ g i\nh₂ : ∃ i, i ∈ l ∧ f i < g i\n⊢ prod (map f l) < prod (map g l)\n[PROOFSTEP]\ninduction' l with i l ihl\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝⁷ : Monoid M\ninst✝⁶ : Monoid N\ninst✝⁵ : Monoid P\nl✝ l₁ l₂ : List M\na : M\ninst✝⁴ : Preorder M\ninst✝³ : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x < x_1\ninst✝² : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\ninst✝¹ : CovariantClass M M (Function.swap fun x x_1 => x * x_1) fun x x_1 => x < x_1\ninst✝ : CovariantClass M M (Function.swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\nl : List ι\nf g : ι → M\nh₁✝ : ∀ (i : ι), i ∈ l → f i ≤ g i\nh₂✝ : ∃ i, i ∈ l ∧ f i < g i\nh₁ : ∀ (i : ι), i ∈ [] → f i ≤ g i\nh₂ : ∃ i, i ∈ [] ∧ f i < g i\n⊢ prod (map f []) < prod (map g [])\n[PROOFSTEP]\nrcases h₂ with ⟨_, ⟨⟩, _⟩\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝⁷ : Monoid M\ninst✝⁶ : Monoid N\ninst✝⁵ : Monoid P\nl✝¹ l₁ l₂ : List M\na : M\ninst✝⁴ : Preorder M\ninst✝³ : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x < x_1\ninst✝² : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\ninst✝¹ : CovariantClass M M (Function.swap fun x x_1 => x * x_1) fun x x_1 => x < x_1\ninst✝ : CovariantClass M M (Function.swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\nl✝ : List ι\nf g : ι → M\nh₁✝ : ∀ (i : ι), i ∈ l✝ → f i ≤ g i\nh₂✝ : ∃ i, i ∈ l✝ ∧ f i < g i\ni : ι\nl : List ι\nihl : (∀ (i : ι), i ∈ l → f i ≤ g i) → (∃ i, i ∈ l ∧ f i < g i) → prod (map f l) < prod (map g l)\nh₁ : ∀ (i_1 : ι), i_1 ∈ i :: l → f i_1 ≤ g i_1\nh₂ : ∃ i_1, i_1 ∈ i :: l ∧ f i_1 < g i_1\n⊢ prod (map f (i :: l)) < prod (map g (i :: l))\n[PROOFSTEP]\nsimp only [forall_mem_cons, exists_mem_cons, map_cons, prod_cons] at h₁ h₂ ⊢\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝⁷ : Monoid M\ninst✝⁶ : Monoid N\ninst✝⁵ : Monoid P\nl✝¹ l₁ l₂ : List M\na : M\ninst✝⁴ : Preorder M\ninst✝³ : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x < x_1\ninst✝² : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\ninst✝¹ : CovariantClass M M (Function.swap fun x x_1 => x * x_1) fun x x_1 => x < x_1\ninst✝ : CovariantClass M M (Function.swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\nl✝ : List ι\nf g : ι → M\nh₁✝ : ∀ (i : ι), i ∈ l✝ → f i ≤ g i\nh₂✝ : ∃ i, i ∈ l✝ ∧ f i < g i\ni : ι\nl : List ι\nihl : (∀ (i : ι), i ∈ l → f i ≤ g i) → (∃ i, i ∈ l ∧ f i < g i) → prod (map f l) < prod (map g l)\nh₁ : f i ≤ g i ∧ ∀ (x : ι), x ∈ l → f x ≤ g x\nh₂ : f i < g i ∨ ∃ x, x ∈ l ∧ f x < g x\n⊢ f i * prod (map f l) < g i * prod (map g l)\n[PROOFSTEP]\ncases h₂\n[GOAL]\ncase cons.inl\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝⁷ : Monoid M\ninst✝⁶ : Monoid N\ninst✝⁵ : Monoid P\nl✝¹ l₁ l₂ : List M\na : M\ninst✝⁴ : Preorder M\ninst✝³ : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x < x_1\ninst✝² : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\ninst✝¹ : CovariantClass M M (Function.swap fun x x_1 => x * x_1) fun x x_1 => x < x_1\ninst✝ : CovariantClass M M (Function.swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\nl✝ : List ι\nf g : ι → M\nh₁✝ : ∀ (i : ι), i ∈ l✝ → f i ≤ g i\nh₂ : ∃ i, i ∈ l✝ ∧ f i < g i\ni : ι\nl : List ι\nihl : (∀ (i : ι), i ∈ l → f i ≤ g i) → (∃ i, i ∈ l ∧ f i < g i) → prod (map f l) < prod (map g l)\nh₁ : f i ≤ g i ∧ ∀ (x : ι), x ∈ l → f x ≤ g x\nh✝ : f i < g i\n⊢ f i * prod (map f l) < g i * prod (map g l)\n[PROOFSTEP]\nexact mul_lt_mul_of_lt_of_le ‹_› (prod_le_prod' h₁.2)\n[GOAL]\ncase cons.inr\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝⁷ : Monoid M\ninst✝⁶ : Monoid N\ninst✝⁵ : Monoid P\nl✝¹ l₁ l₂ : List M\na : M\ninst✝⁴ : Preorder M\ninst✝³ : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x < x_1\ninst✝² : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\ninst✝¹ : CovariantClass M M (Function.swap fun x x_1 => x * x_1) fun x x_1 => x < x_1\ninst✝ : CovariantClass M M (Function.swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\nl✝ : List ι\nf g : ι → M\nh₁✝ : ∀ (i : ι), i ∈ l✝ → f i ≤ g i\nh₂ : ∃ i, i ∈ l✝ ∧ f i < g i\ni : ι\nl : List ι\nihl : (∀ (i : ι), i ∈ l → f i ≤ g i) → (∃ i, i ∈ l ∧ f i < g i) → prod (map f l) < prod (map g l)\nh₁ : f i ≤ g i ∧ ∀ (x : ι), x ∈ l → f x ≤ g x\nh✝ : ∃ x, x ∈ l ∧ f x < g x\n⊢ f i * prod (map f l) < g i * prod (map g l)\n[PROOFSTEP]\nexact mul_lt_mul_of_le_of_lt h₁.1 <| ihl h₁.2 ‹_›\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝⁵ : Monoid M\ninst✝⁴ : Monoid N\ninst✝³ : Monoid P\nl✝ l₁ l₂ : List M\na : M\ninst✝² : Preorder M\ninst✝¹ : CovariantClass M M (Function.swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\ninst✝ : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\nl : List M\nn : M\nh : ∀ (x : M), x ∈ l → x ≤ n\n⊢ prod l ≤ n ^ length l\n[PROOFSTEP]\nsimpa only [map_id'', map_const', prod_replicate] using prod_le_prod' h\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝⁵ : Monoid M\ninst✝⁴ : Monoid N\ninst✝³ : Monoid P\nl✝ l₁ l₂ : List M\na : M\ninst✝² : LinearOrder M\ninst✝¹ : CovariantClass M M (Function.swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\ninst✝ : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\nl : List ι\nf g : ι → M\nh : prod (map f l) < prod (map g l)\n⊢ ∃ i, i ∈ l ∧ f i < g i\n[PROOFSTEP]\ncontrapose! h\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝⁵ : Monoid M\ninst✝⁴ : Monoid N\ninst✝³ : Monoid P\nl✝ l₁ l₂ : List M\na : M\ninst✝² : LinearOrder M\ninst✝¹ : CovariantClass M M (Function.swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\ninst✝ : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\nl : List ι\nf g : ι → M\nh : ∀ (i : ι), i ∈ l → g i ≤ f i\n⊢ prod (map g l) ≤ prod (map f l)\n[PROOFSTEP]\nexact prod_le_prod' h\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝⁷ : Monoid M\ninst✝⁶ : Monoid N\ninst✝⁵ : Monoid P\nl✝ l₁ l₂ : List M\na : M\ninst✝⁴ : LinearOrder M\ninst✝³ : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x < x_1\ninst✝² : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\ninst✝¹ : CovariantClass M M (Function.swap fun x x_1 => x * x_1) fun x x_1 => x < x_1\ninst✝ : CovariantClass M M (Function.swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\nl : List ι\nhl : l ≠ []\nf g : ι → M\nh : prod (map f l) ≤ prod (map g l)\n⊢ ∃ x, x ∈ l ∧ f x ≤ g x\n[PROOFSTEP]\ncontrapose! h\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝⁷ : Monoid M\ninst✝⁶ : Monoid N\ninst✝⁵ : Monoid P\nl✝ l₁ l₂ : List M\na : M\ninst✝⁴ : LinearOrder M\ninst✝³ : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x < x_1\ninst✝² : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\ninst✝¹ : CovariantClass M M (Function.swap fun x x_1 => x * x_1) fun x x_1 => x < x_1\ninst✝ : CovariantClass M M (Function.swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\nl : List ι\nhl : l ≠ []\nf g : ι → M\nh : ∀ (x : ι), x ∈ l → g x < f x\n⊢ prod (map g l) < prod (map f l)\n[PROOFSTEP]\nexact prod_lt_prod_of_ne_nil hl _ _ h\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝⁴ : Monoid M\ninst✝³ : Monoid N\ninst✝² : Monoid P\nl✝ l₁ l₂ : List M\na : M\ninst✝¹ : Preorder M\ninst✝ : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\nl : List M\nhl₁ : ∀ (x : M), x ∈ l → 1 ≤ x\n⊢ 1 ≤ prod l\n[PROOFSTEP]\ninduction' l with hd tl ih\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝⁴ : Monoid M\ninst✝³ : Monoid N\ninst✝² : Monoid P\nl✝ l₁ l₂ : List M\na : M\ninst✝¹ : Preorder M\ninst✝ : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\nl : List M\nhl₁✝ : ∀ (x : M), x ∈ l → 1 ≤ x\nhl₁ : ∀ (x : M), x ∈ [] → 1 ≤ x\n⊢ 1 ≤ prod []\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝⁴ : Monoid M\ninst✝³ : Monoid N\ninst✝² : Monoid P\nl✝ l₁ l₂ : List M\na : M\ninst✝¹ : Preorder M\ninst✝ : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\nl : List M\nhl₁✝ : ∀ (x : M), x ∈ l → 1 ≤ x\nhd : M\ntl : List M\nih : (∀ (x : M), x ∈ tl → 1 ≤ x) → 1 ≤ prod tl\nhl₁ : ∀ (x : M), x ∈ hd :: tl → 1 ≤ x\n⊢ 1 ≤ prod (hd :: tl)\n[PROOFSTEP]\nrw [prod_cons]\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝⁴ : Monoid M\ninst✝³ : Monoid N\ninst✝² : Monoid P\nl✝ l₁ l₂ : List M\na : M\ninst✝¹ : Preorder M\ninst✝ : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1\nl : List M\nhl₁✝ : ∀ (x : M), x ∈ l → 1 ≤ x\nhd : M\ntl : List M\nih : (∀ (x : M), x ∈ tl → 1 ≤ x) → 1 ≤ prod tl\nhl₁ : ∀ (x : M), x ∈ hd :: tl → 1 ≤ x\n⊢ 1 ≤ hd * prod tl\n[PROOFSTEP]\nexact one_le_mul (hl₁ hd (mem_cons_self hd tl)) (ih fun x h => hl₁ x (mem_cons_of_mem hd h))\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝ : MonoidWithZero M₀\nL : List M₀\nh : 0 ∈ L\n⊢ prod L = 0\n[PROOFSTEP]\ninduction' L with a L ihL\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝ : MonoidWithZero M₀\nL : List M₀\nh✝ : 0 ∈ L\nh : 0 ∈ []\n⊢ prod [] = 0\n[PROOFSTEP]\nexact absurd h (not_mem_nil _)\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝ : MonoidWithZero M₀\nL✝ : List M₀\nh✝ : 0 ∈ L✝\na : M₀\nL : List M₀\nihL : 0 ∈ L → prod L = 0\nh : 0 ∈ a :: L\n⊢ prod (a :: L) = 0\n[PROOFSTEP]\nrw [prod_cons]\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝ : MonoidWithZero M₀\nL✝ : List M₀\nh✝ : 0 ∈ L✝\na : M₀\nL : List M₀\nihL : 0 ∈ L → prod L = 0\nh : 0 ∈ a :: L\n⊢ a * prod L = 0\n[PROOFSTEP]\ncases' mem_cons.1 h with ha hL\n[GOAL]\ncase cons.inl\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝ : MonoidWithZero M₀\nL✝ : List M₀\nh✝ : 0 ∈ L✝\na : M₀\nL : List M₀\nihL : 0 ∈ L → prod L = 0\nh : 0 ∈ a :: L\nha : 0 = a\n⊢ a * prod L = 0\ncase cons.inr\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝ : MonoidWithZero M₀\nL✝ : List M₀\nh✝ : 0 ∈ L✝\na : M₀\nL : List M₀\nihL : 0 ∈ L → prod L = 0\nh : 0 ∈ a :: L\nhL : 0 ∈ L\n⊢ a * prod L = 0\n[PROOFSTEP]\nexacts [mul_eq_zero_of_left ha.symm _, mul_eq_zero_of_right _ (ihL hL)]\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝² : MonoidWithZero M₀\ninst✝¹ : Nontrivial M₀\ninst✝ : NoZeroDivisors M₀\nL : List M₀\n⊢ prod L = 0 ↔ 0 ∈ L\n[PROOFSTEP]\ninduction' L with a L ihL\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝² : MonoidWithZero M₀\ninst✝¹ : Nontrivial M₀\ninst✝ : NoZeroDivisors M₀\n⊢ prod [] = 0 ↔ 0 ∈ []\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝² : MonoidWithZero M₀\ninst✝¹ : Nontrivial M₀\ninst✝ : NoZeroDivisors M₀\na : M₀\nL : List M₀\nihL : prod L = 0 ↔ 0 ∈ L\n⊢ prod (a :: L) = 0 ↔ 0 ∈ a :: L\n[PROOFSTEP]\nrw [prod_cons, mul_eq_zero, ihL, mem_cons, eq_comm]\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝ : Group G\n⊢ (prod [])⁻¹ = prod (reverse (map (fun x => x⁻¹) []))\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝ : Group G\nx : G\nxs : List G\n⊢ (prod (x :: xs))⁻¹ = prod (reverse (map (fun x => x⁻¹) (x :: xs)))\n[PROOFSTEP]\nsimp [prod_inv_reverse xs]\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝ : Group G\n⊢ ∀ (L : List G), prod (reverse L) = (prod (map (fun x => x⁻¹) L))⁻¹\n[PROOFSTEP]\nsimp [prod_inv_reverse]\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝ : Group G\nx : G\nxs : List G\nx✝ : 0 < length (x :: xs)\n⊢ prod (drop (0 + 1) (x :: xs)) = (nthLe (x :: xs) 0 x✝)⁻¹ * prod (drop 0 (x :: xs))\n[PROOFSTEP]\nsimp [nthLe]\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝ : CommGroup G\n⊢ (prod [])⁻¹ = prod (map (fun x => x⁻¹) [])\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝ : CommGroup G\nx : G\nxs : List G\n⊢ (prod (x :: xs))⁻¹ = prod (map (fun x => x⁻¹) (x :: xs))\n[PROOFSTEP]\nsimp [mul_comm, prod_inv xs]\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝ : CommGroup G\nL : List G\nn : ℕ\na : G\n⊢ prod (set L n a) = prod L * if hn : n < length L then (nthLe L n hn)⁻¹ * a else 1\n[PROOFSTEP]\nrefine (prod_set L n a).trans ?_\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝ : CommGroup G\nL : List G\nn : ℕ\na : G\n⊢ (prod (take n L) * if n < length L then a else 1) * prod (drop (n + 1) L) =\n    prod L * if hn : n < length L then (nthLe L n hn)⁻¹ * a else 1\n[PROOFSTEP]\nsplit_ifs with hn\n[GOAL]\ncase pos\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝ : CommGroup G\nL : List G\nn : ℕ\na : G\nhn : n < length L\n⊢ prod (take n L) * a * prod (drop (n + 1) L) = prod L * ((nthLe L n hn)⁻¹ * a)\n[PROOFSTEP]\nrw [mul_comm _ a, mul_assoc a, prod_drop_succ L n hn, mul_comm _ (drop n L).prod, ← mul_assoc (take n L).prod,\n  prod_take_mul_prod_drop, mul_comm a, mul_assoc]\n[GOAL]\ncase neg\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝ : CommGroup G\nL : List G\nn : ℕ\na : G\nhn : ¬n < length L\n⊢ prod (take n L) * 1 * prod (drop (n + 1) L) = prod L * 1\n[PROOFSTEP]\nsimp only [take_all_of_le (le_of_not_lt hn), prod_nil, mul_one, drop_eq_nil_of_le ((le_of_not_lt hn).trans n.le_succ)]\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝ : LeftCancelMonoid M\nL L' : List M\nh : length L = length L'\nh' : ∀ (i : ℕ), i ≤ length L → prod (take i L) = prod (take i L')\n⊢ L = L'\n[PROOFSTEP]\nrefine ext_get h fun i h₁ h₂ => ?_\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝ : LeftCancelMonoid M\nL L' : List M\nh : length L = length L'\nh' : ∀ (i : ℕ), i ≤ length L → prod (take i L) = prod (take i L')\ni : ℕ\nh₁ : i < length L\nh₂ : i < length L'\n⊢ get L { val := i, isLt := h₁ } = get L' { val := i, isLt := h₂ }\n[PROOFSTEP]\nhave : (L.take (i + 1)).prod = (L'.take (i + 1)).prod := h' _ (Nat.succ_le_of_lt h₁)\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝ : LeftCancelMonoid M\nL L' : List M\nh : length L = length L'\nh' : ∀ (i : ℕ), i ≤ length L → prod (take i L) = prod (take i L')\ni : ℕ\nh₁ : i < length L\nh₂ : i < length L'\nthis : prod (take (i + 1) L) = prod (take (i + 1) L')\n⊢ get L { val := i, isLt := h₁ } = get L' { val := i, isLt := h₂ }\n[PROOFSTEP]\nrw [prod_take_succ L i h₁, prod_take_succ L' i h₂, h' i (le_of_lt h₁)] at this \n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝ : LeftCancelMonoid M\nL L' : List M\nh : length L = length L'\nh' : ∀ (i : ℕ), i ≤ length L → prod (take i L) = prod (take i L')\ni : ℕ\nh₁ : i < length L\nh₂ : i < length L'\nthis : prod (take i L') * nthLe L i h₁ = prod (take i L') * nthLe L' i h₂\n⊢ get L { val := i, isLt := h₁ } = get L' { val := i, isLt := h₂ }\n[PROOFSTEP]\nconvert mul_left_cancel this\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝ : CanonicallyOrderedMonoid M\nL : List M\n⊢ Monotone fun i => prod (take i L)\n[PROOFSTEP]\nrefine' monotone_nat_of_le_succ fun n => _\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝ : CanonicallyOrderedMonoid M\nL : List M\nn : ℕ\n⊢ prod (take n L) ≤ prod (take (n + 1) L)\n[PROOFSTEP]\ncases' lt_or_le n L.length with h h\n[GOAL]\ncase inl\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝ : CanonicallyOrderedMonoid M\nL : List M\nn : ℕ\nh : n < length L\n⊢ prod (take n L) ≤ prod (take (n + 1) L)\n[PROOFSTEP]\nrw [prod_take_succ _ _ h]\n[GOAL]\ncase inl\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝ : CanonicallyOrderedMonoid M\nL : List M\nn : ℕ\nh : n < length L\n⊢ prod (take n L) ≤ prod (take n L) * nthLe L n h\n[PROOFSTEP]\nexact le_self_mul\n[GOAL]\ncase inr\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝ : CanonicallyOrderedMonoid M\nL : List M\nn : ℕ\nh : length L ≤ n\n⊢ prod (take n L) ≤ prod (take (n + 1) L)\n[PROOFSTEP]\nsimp [take_all_of_le h, take_all_of_le (le_trans h (Nat.le_succ _))]\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝ : OrderedCommMonoid M\nb : M\nh : ∀ (x : M), x ∈ [b] → 1 < x\nx✝ : [b] ≠ []\n⊢ 1 < prod [b]\n[PROOFSTEP]\nsimpa using h\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝ : OrderedCommMonoid M\na b : M\nl : List M\nhl₁ : ∀ (x : M), x ∈ a :: b :: l → 1 < x\nx✝ : a :: b :: l ≠ []\n⊢ 1 < prod (a :: b :: l)\n[PROOFSTEP]\nsimp only [forall_eq_or_imp, List.mem_cons] at hl₁ \n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝ : OrderedCommMonoid M\na b : M\nl : List M\nx✝ : a :: b :: l ≠ []\nhl₁ : 1 < a ∧ 1 < b ∧ ∀ (a : M), a ∈ l → 1 < a\n⊢ 1 < prod (a :: b :: l)\n[PROOFSTEP]\nrw [List.prod_cons]\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝ : OrderedCommMonoid M\na b : M\nl : List M\nx✝ : a :: b :: l ≠ []\nhl₁ : 1 < a ∧ 1 < b ∧ ∀ (a : M), a ∈ l → 1 < a\n⊢ 1 < a * prod (b :: l)\n[PROOFSTEP]\napply one_lt_mul_of_lt_of_le' hl₁.1\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝ : OrderedCommMonoid M\na b : M\nl : List M\nx✝ : a :: b :: l ≠ []\nhl₁ : 1 < a ∧ 1 < b ∧ ∀ (a : M), a ∈ l → 1 < a\n⊢ 1 ≤ prod (b :: l)\n[PROOFSTEP]\napply le_of_lt ((b :: l).one_lt_prod_of_one_lt _ (l.cons_ne_nil b))\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝ : OrderedCommMonoid M\na b : M\nl : List M\nx✝ : a :: b :: l ≠ []\nhl₁ : 1 < a ∧ 1 < b ∧ ∀ (a : M), a ∈ l → 1 < a\n⊢ ∀ (x : M), x ∈ b :: l → 1 < x\n[PROOFSTEP]\nintro x hx\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝ : OrderedCommMonoid M\na b : M\nl : List M\nx✝ : a :: b :: l ≠ []\nhl₁ : 1 < a ∧ 1 < b ∧ ∀ (a : M), a ∈ l → 1 < a\nx : M\nhx : x ∈ b :: l\n⊢ 1 < x\n[PROOFSTEP]\ncases hx\n[GOAL]\ncase head\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝ : OrderedCommMonoid M\na b : M\nl : List M\nx✝ : a :: b :: l ≠ []\nhl₁ : 1 < a ∧ 1 < b ∧ ∀ (a : M), a ∈ l → 1 < a\n⊢ 1 < b\n[PROOFSTEP]\nexact hl₁.2.1\n[GOAL]\ncase tail\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝ : OrderedCommMonoid M\na b : M\nl : List M\nx✝ : a :: b :: l ≠ []\nhl₁ : 1 < a ∧ 1 < b ∧ ∀ (a : M), a ∈ l → 1 < a\nx : M\na✝ : Mem x l\n⊢ 1 < x\n[PROOFSTEP]\nexact hl₁.2.2 _ ‹_›\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝ : OrderedCommMonoid M\nl : List M\nhl₁ : ∀ (x : M), x ∈ l → 1 ≤ x\n⊢ ∀ (x : M), x ∈ l → x ≤ prod l\n[PROOFSTEP]\ninduction l\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝ : OrderedCommMonoid M\nhl₁ : ∀ (x : M), x ∈ [] → 1 ≤ x\n⊢ ∀ (x : M), x ∈ [] → x ≤ prod []\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝ : OrderedCommMonoid M\nhead✝ : M\ntail✝ : List M\ntail_ih✝ : (∀ (x : M), x ∈ tail✝ → 1 ≤ x) → ∀ (x : M), x ∈ tail✝ → x ≤ prod tail✝\nhl₁ : ∀ (x : M), x ∈ head✝ :: tail✝ → 1 ≤ x\n⊢ ∀ (x : M), x ∈ head✝ :: tail✝ → x ≤ prod (head✝ :: tail✝)\n[PROOFSTEP]\nsimp_rw [prod_cons, forall_mem_cons] at hl₁ ⊢\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝ : OrderedCommMonoid M\nhead✝ : M\ntail✝ : List M\ntail_ih✝ : (∀ (x : M), x ∈ tail✝ → 1 ≤ x) → ∀ (x : M), x ∈ tail✝ → x ≤ prod tail✝\nhl₁ : 1 ≤ head✝ ∧ ∀ (x : M), x ∈ tail✝ → 1 ≤ x\n⊢ head✝ ≤ head✝ * prod tail✝ ∧ ∀ (x : M), x ∈ tail✝ → x ≤ head✝ * prod tail✝\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase cons.left\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝ : OrderedCommMonoid M\nhead✝ : M\ntail✝ : List M\ntail_ih✝ : (∀ (x : M), x ∈ tail✝ → 1 ≤ x) → ∀ (x : M), x ∈ tail✝ → x ≤ prod tail✝\nhl₁ : 1 ≤ head✝ ∧ ∀ (x : M), x ∈ tail✝ → 1 ≤ x\n⊢ head✝ ≤ head✝ * prod tail✝\ncase cons.right\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝ : OrderedCommMonoid M\nhead✝ : M\ntail✝ : List M\ntail_ih✝ : (∀ (x : M), x ∈ tail✝ → 1 ≤ x) → ∀ (x : M), x ∈ tail✝ → x ≤ prod tail✝\nhl₁ : 1 ≤ head✝ ∧ ∀ (x : M), x ∈ tail✝ → 1 ≤ x\n⊢ ∀ (x : M), x ∈ tail✝ → x ≤ head✝ * prod tail✝\n[PROOFSTEP]\ncase cons.left => exact le_mul_of_one_le_right' (one_le_prod_of_one_le hl₁.2)\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝ : OrderedCommMonoid M\nhead✝ : M\ntail✝ : List M\ntail_ih✝ : (∀ (x : M), x ∈ tail✝ → 1 ≤ x) → ∀ (x : M), x ∈ tail✝ → x ≤ prod tail✝\nhl₁ : 1 ≤ head✝ ∧ ∀ (x : M), x ∈ tail✝ → 1 ≤ x\n⊢ head✝ ≤ head✝ * prod tail✝\n[PROOFSTEP]\ncase cons.left => exact le_mul_of_one_le_right' (one_le_prod_of_one_le hl₁.2)\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝ : OrderedCommMonoid M\nhead✝ : M\ntail✝ : List M\ntail_ih✝ : (∀ (x : M), x ∈ tail✝ → 1 ≤ x) → ∀ (x : M), x ∈ tail✝ → x ≤ prod tail✝\nhl₁ : 1 ≤ head✝ ∧ ∀ (x : M), x ∈ tail✝ → 1 ≤ x\n⊢ head✝ ≤ head✝ * prod tail✝\n[PROOFSTEP]\nexact le_mul_of_one_le_right' (one_le_prod_of_one_le hl₁.2)\n[GOAL]\ncase cons.right\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝ : OrderedCommMonoid M\nhead✝ : M\ntail✝ : List M\ntail_ih✝ : (∀ (x : M), x ∈ tail✝ → 1 ≤ x) → ∀ (x : M), x ∈ tail✝ → x ≤ prod tail✝\nhl₁ : 1 ≤ head✝ ∧ ∀ (x : M), x ∈ tail✝ → 1 ≤ x\n⊢ ∀ (x : M), x ∈ tail✝ → x ≤ head✝ * prod tail✝\n[PROOFSTEP]\ncase cons.right hd tl ih => exact fun x H => le_mul_of_one_le_of_le hl₁.1 (ih hl₁.right x H)\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝ : OrderedCommMonoid M\nhd : M\ntl : List M\nih : (∀ (x : M), x ∈ tl → 1 ≤ x) → ∀ (x : M), x ∈ tl → x ≤ prod tl\nhl₁ : 1 ≤ hd ∧ ∀ (x : M), x ∈ tl → 1 ≤ x\n⊢ ∀ (x : M), x ∈ tl → x ≤ hd * prod tl\n[PROOFSTEP]\ncase cons.right hd tl ih => exact fun x H => le_mul_of_one_le_of_le hl₁.1 (ih hl₁.right x H)\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝ : OrderedCommMonoid M\nhd : M\ntl : List M\nih : (∀ (x : M), x ∈ tl → 1 ≤ x) → ∀ (x : M), x ∈ tl → x ≤ prod tl\nhl₁ : 1 ≤ hd ∧ ∀ (x : M), x ∈ tl → 1 ≤ x\n⊢ ∀ (x : M), x ∈ tl → x ≤ hd * prod tl\n[PROOFSTEP]\nexact fun x H => le_mul_of_one_le_of_le hl₁.1 (ih hl₁.right x H)\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝ : Monoid M\nl : List M\nhl : ∀ (x : M), x ∈ l → x = 1\n⊢ prod l = 1\n[PROOFSTEP]\ninduction' l with i l hil\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝ : Monoid M\nl : List M\nhl✝ : ∀ (x : M), x ∈ l → x = 1\nhl : ∀ (x : M), x ∈ [] → x = 1\n⊢ prod [] = 1\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝ : Monoid M\nl✝ : List M\nhl✝ : ∀ (x : M), x ∈ l✝ → x = 1\ni : M\nl : List M\nhil : (∀ (x : M), x ∈ l → x = 1) → prod l = 1\nhl : ∀ (x : M), x ∈ i :: l → x = 1\n⊢ prod (i :: l) = 1\n[PROOFSTEP]\nrw [List.prod_cons, hil fun x hx => hl _ (mem_cons_of_mem i hx), hl _ (mem_cons_self i l), one_mul]\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝ : Monoid M\nl : List M\nh : prod l ≠ 1\n⊢ ∃ x, x ∈ l ∧ x ≠ 1\n[PROOFSTEP]\nsimpa only [not_forall, exists_prop] using mt prod_eq_one h\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝² : AddMonoid M\ninst✝¹ : AddMonoid N\ninst✝ : LinearOrder N\nf : M → N\nh0 : f 0 ≤ 0\nhadd : ∀ (x y : M), f (x + y) ≤ max (f x) (f y)\nl : List M\n⊢ f (sum l) ≤ foldr max 0 (map f l)\n[PROOFSTEP]\ninduction' l with hd tl IH\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝² : AddMonoid M\ninst✝¹ : AddMonoid N\ninst✝ : LinearOrder N\nf : M → N\nh0 : f 0 ≤ 0\nhadd : ∀ (x y : M), f (x + y) ≤ max (f x) (f y)\n⊢ f (sum []) ≤ foldr max 0 (map f [])\n[PROOFSTEP]\nsimpa using h0\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝² : AddMonoid M\ninst✝¹ : AddMonoid N\ninst✝ : LinearOrder N\nf : M → N\nh0 : f 0 ≤ 0\nhadd : ∀ (x y : M), f (x + y) ≤ max (f x) (f y)\nhd : M\ntl : List M\nIH : f (sum tl) ≤ foldr max 0 (map f tl)\n⊢ f (sum (hd :: tl)) ≤ foldr max 0 (map f (hd :: tl))\n[PROOFSTEP]\nsimp only [List.sum_cons, List.foldr_map, List.foldr] at IH ⊢\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝² : AddMonoid M\ninst✝¹ : AddMonoid N\ninst✝ : LinearOrder N\nf : M → N\nh0 : f 0 ≤ 0\nhadd : ∀ (x y : M), f (x + y) ≤ max (f x) (f y)\nhd : M\ntl : List M\nIH : f (sum tl) ≤ foldr (fun x y => max (f x) y) 0 tl\n⊢ f (hd + sum tl) ≤ max (f hd) (foldr (fun x y => max (f x) y) 0 tl)\n[PROOFSTEP]\nexact (hadd _ _).trans (max_le_max le_rfl IH)\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝¹ : DecidableEq M\ninst✝ : CommMonoid M\na b : M\nl : List M\nh : a ∈ b :: l\n⊢ a * prod (List.erase (b :: l) a) = prod (b :: l)\n[PROOFSTEP]\nobtain rfl | ⟨ne, h⟩ := Decidable.List.eq_or_ne_mem_of_mem h\n[GOAL]\ncase inl\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝¹ : DecidableEq M\ninst✝ : CommMonoid M\na : M\nl : List M\nh : a ∈ a :: l\n⊢ a * prod (List.erase (a :: l) a) = prod (a :: l)\n[PROOFSTEP]\nsimp only [List.erase, if_pos, prod_cons, beq_self_eq_true]\n[GOAL]\ncase inr.intro\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝¹ : DecidableEq M\ninst✝ : CommMonoid M\na b : M\nl : List M\nh✝ : a ∈ b :: l\nne : a ≠ b\nh : a ∈ l\n⊢ a * prod (List.erase (b :: l) a) = prod (b :: l)\n[PROOFSTEP]\nsimp only [List.erase, beq_false_of_ne ne.symm, prod_cons, prod_erase h, mul_left_comm a b]\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝¹ : DecidableEq ι\ninst✝ : CommMonoid M\nf : ι → M\na b : ι\nl : List ι\nh : a ∈ b :: l\n⊢ f a * prod (map f (List.erase (b :: l) a)) = prod (map f (b :: l))\n[PROOFSTEP]\nobtain rfl | ⟨ne, h⟩ := Decidable.List.eq_or_ne_mem_of_mem h\n[GOAL]\ncase inl\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝¹ : DecidableEq ι\ninst✝ : CommMonoid M\nf : ι → M\na : ι\nl : List ι\nh : a ∈ a :: l\n⊢ f a * prod (map f (List.erase (a :: l) a)) = prod (map f (a :: l))\n[PROOFSTEP]\nsimp only [map, erase_cons_head, prod_cons]\n[GOAL]\ncase inr.intro\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝¹ : DecidableEq ι\ninst✝ : CommMonoid M\nf : ι → M\na b : ι\nl : List ι\nh✝ : a ∈ b :: l\nne : a ≠ b\nh : a ∈ l\n⊢ f a * prod (map f (List.erase (b :: l) a)) = prod (map f (b :: l))\n[PROOFSTEP]\nsimp only [map, erase_cons_tail _ ne.symm, prod_cons, prod_map_erase _ h, mul_left_comm (f a) (f b)]\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝ : StrictOrderedSemiring R\nl : List R\nh : ∀ (a : R), a ∈ l → 0 < a\n⊢ 0 < prod l\n[PROOFSTEP]\ninduction' l with a l ih\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝ : StrictOrderedSemiring R\nl : List R\nh✝ : ∀ (a : R), a ∈ l → 0 < a\nh : ∀ (a : R), a ∈ [] → 0 < a\n⊢ 0 < prod []\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝ : StrictOrderedSemiring R\nl✝ : List R\nh✝ : ∀ (a : R), a ∈ l✝ → 0 < a\na : R\nl : List R\nih : (∀ (a : R), a ∈ l → 0 < a) → 0 < prod l\nh : ∀ (a_1 : R), a_1 ∈ a :: l → 0 < a_1\n⊢ 0 < prod (a :: l)\n[PROOFSTEP]\nrw [prod_cons]\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝ : StrictOrderedSemiring R\nl✝ : List R\nh✝ : ∀ (a : R), a ∈ l✝ → 0 < a\na : R\nl : List R\nih : (∀ (a : R), a ∈ l → 0 < a) → 0 < prod l\nh : ∀ (a_1 : R), a_1 ∈ a :: l → 0 < a_1\n⊢ 0 < a * prod l\n[PROOFSTEP]\nexact mul_pos (h _ <| mem_cons_self _ _) (ih fun a ha => h a <| mem_cons_of_mem _ ha)\n[GOAL]\nι : Type u_1\nα✝ : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\nα : Type u_9\ninst✝¹ : CanonicallyOrderedCommSemiring α\ninst✝ : Nontrivial α\n⊢ 0 < prod [] ↔ ∀ (x : α), x ∈ [] → 0 < x\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nα✝ : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\nα : Type u_9\ninst✝¹ : CanonicallyOrderedCommSemiring α\ninst✝ : Nontrivial α\nx : α\nxs : List α\n⊢ 0 < prod (x :: xs) ↔ ∀ (x_1 : α), x_1 ∈ x :: xs → 0 < x_1\n[PROOFSTEP]\nsimp_rw [prod_cons, forall_mem_cons, CanonicallyOrderedCommSemiring.mul_pos, list_prod_pos]\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\nL : List ℕ\n⊢ headI L + sum (tail L) = sum L\n[PROOFSTEP]\ncases L\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\n⊢ headI [] + sum (tail []) = sum []\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\nhead✝ : ℕ\ntail✝ : List ℕ\n⊢ headI (head✝ :: tail✝) + sum (tail (head✝ :: tail✝)) = sum (head✝ :: tail✝)\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\nL : List ℕ\n⊢ sum (tail L) = sum L - headI L\n[PROOFSTEP]\nrw [← headI_add_tail_sum L, add_comm, @add_tsub_cancel_right]\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝ : DivInvMonoid α\na b : α\nl : List α\n⊢ alternatingProd (a :: b :: l) = a / b * alternatingProd l\n[PROOFSTEP]\nrw [div_eq_mul_inv, alternatingProd_cons_cons']\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝ : CommGroup α\na : α\n⊢ alternatingProd [a] = a * (alternatingProd [])⁻¹\n[PROOFSTEP]\nrw [alternatingProd_nil, inv_one, mul_one, alternatingProd_singleton]\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝ : CommGroup α\na b : α\nl : List α\n⊢ alternatingProd (a :: b :: l) = a * (alternatingProd (b :: l))⁻¹\n[PROOFSTEP]\nrw [alternatingProd_cons_cons', alternatingProd_cons' b l, mul_inv, inv_inv, mul_assoc]\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\ninst✝ : CommGroup α\na : α\nl : List α\n⊢ alternatingProd (a :: l) = a / alternatingProd l\n[PROOFSTEP]\nrw [div_eq_mul_inv, alternatingProd_cons']\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\nl : List ℕ\nn : ℕ\n⊢ sum l % n = sum (map (fun x => x % n) l) % n\n[PROOFSTEP]\ninduction l\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\nn : ℕ\n⊢ sum [] % n = sum (map (fun x => x % n) []) % n\n[PROOFSTEP]\nsimp [Nat.add_mod, *]\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\nn head✝ : ℕ\ntail✝ : List ℕ\ntail_ih✝ : sum tail✝ % n = sum (map (fun x => x % n) tail✝) % n\n⊢ sum (head✝ :: tail✝) % n = sum (map (fun x => x % n) (head✝ :: tail✝)) % n\n[PROOFSTEP]\nsimp [Nat.add_mod, *]\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\nl : List ℕ\nn : ℕ\n⊢ prod l % n = prod (map (fun x => x % n) l) % n\n[PROOFSTEP]\ninduction l\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\nn : ℕ\n⊢ prod [] % n = prod (map (fun x => x % n) []) % n\n[PROOFSTEP]\nsimp [Nat.mul_mod, *]\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\nn head✝ : ℕ\ntail✝ : List ℕ\ntail_ih✝ : prod tail✝ % n = prod (map (fun x => x % n) tail✝) % n\n⊢ prod (head✝ :: tail✝) % n = prod (map (fun x => x % n) (head✝ :: tail✝)) % n\n[PROOFSTEP]\nsimp [Nat.mul_mod, *]\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\nl : List ℤ\nn : ℤ\n⊢ sum l % n = sum (map (fun x => x % n) l) % n\n[PROOFSTEP]\ninduction l\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\nn : ℤ\n⊢ sum [] % n = sum (map (fun x => x % n) []) % n\n[PROOFSTEP]\nsimp [Int.add_emod, *]\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\nn head✝ : ℤ\ntail✝ : List ℤ\ntail_ih✝ : sum tail✝ % n = sum (map (fun x => x % n) tail✝) % n\n⊢ sum (head✝ :: tail✝) % n = sum (map (fun x => x % n) (head✝ :: tail✝)) % n\n[PROOFSTEP]\nsimp [Int.add_emod, *]\n[GOAL]\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\nl : List ℤ\nn : ℤ\n⊢ prod l % n = prod (map (fun x => x % n) l) % n\n[PROOFSTEP]\ninduction l\n[GOAL]\ncase nil\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\nn : ℤ\n⊢ prod [] % n = prod (map (fun x => x % n) []) % n\n[PROOFSTEP]\nsimp [Int.mul_emod, *]\n[GOAL]\ncase cons\nι : Type u_1\nα : Type u_2\nM : Type u_3\nN : Type u_4\nP : Type u_5\nM₀ : Type u_6\nG : Type u_7\nR : Type u_8\nn head✝ : ℤ\ntail✝ : List ℤ\ntail_ih✝ : prod tail✝ % n = prod (map (fun x => x % n) tail✝) % n\n⊢ prod (head✝ :: tail✝) % n = prod (map (fun x => x % n) (head✝ :: tail✝)) % n\n[PROOFSTEP]\nsimp [Int.mul_emod, *]\n", "meta": {"mathlib_filename": "Mathlib.Data.List.BigOperators.Basic", "llama_tokens": 36438, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7401743505760728, "lm_q2_score": 0.679178699175393, "lm_q1q2_score": 0.5027106525872485}}
{"text": "[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nt : Term L α\n⊢ relabel id t = t\n[PROOFSTEP]\ninduction' t with _ _ _ _ ih\n[GOAL]\ncase var\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\n_a✝ : α\n⊢ relabel id (var _a✝) = var _a✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase func\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nl✝ : ℕ\n_f✝ : Functions L l✝\n_ts✝ : Fin l✝ → Term L α\nih : ∀ (a : Fin l✝), relabel id (_ts✝ a) = _ts✝ a\n⊢ relabel id (func _f✝ _ts✝) = func _f✝ _ts✝\n[PROOFSTEP]\nsimp [ih]\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nf : α → β\ng : β → γ\nt : Term L α\n⊢ relabel g (relabel f t) = relabel (g ∘ f) t\n[PROOFSTEP]\ninduction' t with _ _ _ _ ih\n[GOAL]\ncase var\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nf : α → β\ng : β → γ\n_a✝ : α\n⊢ relabel g (relabel f (var _a✝)) = relabel (g ∘ f) (var _a✝)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase func\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nf : α → β\ng : β → γ\nl✝ : ℕ\n_f✝ : Functions L l✝\n_ts✝ : Fin l✝ → Term L α\nih : ∀ (a : Fin l✝), relabel g (relabel f (_ts✝ a)) = relabel (g ∘ f) (_ts✝ a)\n⊢ relabel g (relabel f (func _f✝ _ts✝)) = relabel (g ∘ f) (func _f✝ _ts✝)\n[PROOFSTEP]\nsimp [ih]\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\ng : α ≃ β\nt : Term L α\n⊢ relabel (↑g.symm) (relabel (↑g) t) = t\n[PROOFSTEP]\nsimp\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\ng : α ≃ β\nt : Term L β\n⊢ relabel (↑g) (relabel (↑g.symm) t) = t\n[PROOFSTEP]\nsimp\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\n⊢ Function.LeftInverse varsToConstants constantsToVars\n[PROOFSTEP]\nintro t\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nt : Term (L[[γ]]) α\n⊢ varsToConstants (constantsToVars t) = t\n[PROOFSTEP]\ninduction' t with _ n f _ ih\n[GOAL]\ncase var\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\n_a✝ : α\n⊢ varsToConstants (constantsToVars (var _a✝)) = var _a✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase func\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn : ℕ\nf : Functions (L[[γ]]) n\n_ts✝ : Fin n → Term (L[[γ]]) α\nih : ∀ (a : Fin n), varsToConstants (constantsToVars (_ts✝ a)) = _ts✝ a\n⊢ varsToConstants (constantsToVars (func f _ts✝)) = func f _ts✝\n[PROOFSTEP]\ncases n\n[GOAL]\ncase func.zero\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nf : Functions (L[[γ]]) Nat.zero\n_ts✝ : Fin Nat.zero → Term (L[[γ]]) α\nih : ∀ (a : Fin Nat.zero), varsToConstants (constantsToVars (_ts✝ a)) = _ts✝ a\n⊢ varsToConstants (constantsToVars (func f _ts✝)) = func f _ts✝\n[PROOFSTEP]\ncases f\n[GOAL]\ncase func.zero.inl\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\n_ts✝ : Fin Nat.zero → Term (L[[γ]]) α\nih : ∀ (a : Fin Nat.zero), varsToConstants (constantsToVars (_ts✝ a)) = _ts✝ a\nval✝ : Functions L Nat.zero\n⊢ varsToConstants (constantsToVars (func (Sum.inl val✝) _ts✝)) = func (Sum.inl val✝) _ts✝\n[PROOFSTEP]\nsimp [constantsToVars, varsToConstants, ih]\n[GOAL]\ncase func.zero.inr\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\n_ts✝ : Fin Nat.zero → Term (L[[γ]]) α\nih : ∀ (a : Fin Nat.zero), varsToConstants (constantsToVars (_ts✝ a)) = _ts✝ a\nval✝ : Functions (constantsOn γ) Nat.zero\n⊢ varsToConstants (constantsToVars (func (Sum.inr val✝) _ts✝)) = func (Sum.inr val✝) _ts✝\n[PROOFSTEP]\nsimp [constantsToVars, varsToConstants, Constants.term]\n[GOAL]\ncase func.succ\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn✝ : ℕ\nf : Functions (L[[γ]]) (Nat.succ n✝)\n_ts✝ : Fin (Nat.succ n✝) → Term (L[[γ]]) α\nih : ∀ (a : Fin (Nat.succ n✝)), varsToConstants (constantsToVars (_ts✝ a)) = _ts✝ a\n⊢ varsToConstants (constantsToVars (func f _ts✝)) = func f _ts✝\n[PROOFSTEP]\ncases' f with f f\n[GOAL]\ncase func.succ.inl\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn✝ : ℕ\n_ts✝ : Fin (Nat.succ n✝) → Term (L[[γ]]) α\nih : ∀ (a : Fin (Nat.succ n✝)), varsToConstants (constantsToVars (_ts✝ a)) = _ts✝ a\nf : Functions L (Nat.succ n✝)\n⊢ varsToConstants (constantsToVars (func (Sum.inl f) _ts✝)) = func (Sum.inl f) _ts✝\n[PROOFSTEP]\nsimp [constantsToVars, varsToConstants, ih]\n[GOAL]\ncase func.succ.inr\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn✝ : ℕ\n_ts✝ : Fin (Nat.succ n✝) → Term (L[[γ]]) α\nih : ∀ (a : Fin (Nat.succ n✝)), varsToConstants (constantsToVars (_ts✝ a)) = _ts✝ a\nf : Functions (constantsOn γ) (Nat.succ n✝)\n⊢ varsToConstants (constantsToVars (func (Sum.inr f) _ts✝)) = func (Sum.inr f) _ts✝\n[PROOFSTEP]\nexact isEmptyElim f\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\n⊢ Function.RightInverse varsToConstants constantsToVars\n[PROOFSTEP]\nintro t\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nt : Term L (γ ⊕ α)\n⊢ constantsToVars (varsToConstants t) = t\n[PROOFSTEP]\ninduction' t with x n f _ ih\n[GOAL]\ncase var\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nx : γ ⊕ α\n⊢ constantsToVars (varsToConstants (var x)) = var x\n[PROOFSTEP]\ncases x\n[GOAL]\ncase var.inl\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nval✝ : γ\n⊢ constantsToVars (varsToConstants (var (Sum.inl val✝))) = var (Sum.inl val✝)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase var.inr\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nval✝ : α\n⊢ constantsToVars (varsToConstants (var (Sum.inr val✝))) = var (Sum.inr val✝)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase func\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn : ℕ\nf : Functions L n\n_ts✝ : Fin n → Term L (γ ⊕ α)\nih : ∀ (a : Fin n), constantsToVars (varsToConstants (_ts✝ a)) = _ts✝ a\n⊢ constantsToVars (varsToConstants (func f _ts✝)) = func f _ts✝\n[PROOFSTEP]\ncases n\n[GOAL]\ncase func.zero\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nf : Functions L Nat.zero\n_ts✝ : Fin Nat.zero → Term L (γ ⊕ α)\nih : ∀ (a : Fin Nat.zero), constantsToVars (varsToConstants (_ts✝ a)) = _ts✝ a\n⊢ constantsToVars (varsToConstants (func f _ts✝)) = func f _ts✝\n[PROOFSTEP]\nsimp [varsToConstants, constantsToVars, ih]\n[GOAL]\ncase func.succ\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn✝ : ℕ\nf : Functions L (Nat.succ n✝)\n_ts✝ : Fin (Nat.succ n✝) → Term L (γ ⊕ α)\nih : ∀ (a : Fin (Nat.succ n✝)), constantsToVars (varsToConstants (_ts✝ a)) = _ts✝ a\n⊢ constantsToVars (varsToConstants (func f _ts✝)) = func f _ts✝\n[PROOFSTEP]\nsimp [varsToConstants, constantsToVars, ih]\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\n⊢ onTerm (LHom.id L) = id\n[PROOFSTEP]\next t\n[GOAL]\ncase h\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nt : Term L α\n⊢ onTerm (LHom.id L) t = id t\n[PROOFSTEP]\ninduction' t with _ _ _ _ ih\n[GOAL]\ncase h.var\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\n_a✝ : α\n⊢ onTerm (LHom.id L) (var _a✝) = id (var _a✝)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h.func\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nl✝ : ℕ\n_f✝ : Functions L l✝\n_ts✝ : Fin l✝ → Term L α\nih : ∀ (a : Fin l✝), onTerm (LHom.id L) (_ts✝ a) = id (_ts✝ a)\n⊢ onTerm (LHom.id L) (func _f✝ _ts✝) = id (func _f✝ _ts✝)\n[PROOFSTEP]\nsimp_rw [onTerm, ih]\n[GOAL]\ncase h.func\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nl✝ : ℕ\n_f✝ : Functions L l✝\n_ts✝ : Fin l✝ → Term L α\nih : ∀ (a : Fin l✝), onTerm (LHom.id L) (_ts✝ a) = id (_ts✝ a)\n⊢ (func (onFunction (LHom.id L) _f✝) fun i => id (_ts✝ i)) = id (func _f✝ _ts✝)\n[PROOFSTEP]\nrfl\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nL'' : Language\nφ : L' →ᴸ L''\nψ : L →ᴸ L'\n⊢ onTerm (comp φ ψ) = onTerm φ ∘ onTerm ψ\n[PROOFSTEP]\next t\n[GOAL]\ncase h\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nL'' : Language\nφ : L' →ᴸ L''\nψ : L →ᴸ L'\nt : Term L α\n⊢ onTerm (comp φ ψ) t = (onTerm φ ∘ onTerm ψ) t\n[PROOFSTEP]\ninduction' t with _ _ _ _ ih\n[GOAL]\ncase h.var\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nL'' : Language\nφ : L' →ᴸ L''\nψ : L →ᴸ L'\n_a✝ : α\n⊢ onTerm (comp φ ψ) (var _a✝) = (onTerm φ ∘ onTerm ψ) (var _a✝)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h.func\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nL'' : Language\nφ : L' →ᴸ L''\nψ : L →ᴸ L'\nl✝ : ℕ\n_f✝ : Functions L l✝\n_ts✝ : Fin l✝ → Term L α\nih : ∀ (a : Fin l✝), onTerm (comp φ ψ) (_ts✝ a) = (onTerm φ ∘ onTerm ψ) (_ts✝ a)\n⊢ onTerm (comp φ ψ) (func _f✝ _ts✝) = (onTerm φ ∘ onTerm ψ) (func _f✝ _ts✝)\n[PROOFSTEP]\nsimp_rw [onTerm, ih]\n[GOAL]\ncase h.func\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nL'' : Language\nφ : L' →ᴸ L''\nψ : L →ᴸ L'\nl✝ : ℕ\n_f✝ : Functions L l✝\n_ts✝ : Fin l✝ → Term L α\nih : ∀ (a : Fin l✝), onTerm (comp φ ψ) (_ts✝ a) = (onTerm φ ∘ onTerm ψ) (_ts✝ a)\n⊢ (func (onFunction (comp φ ψ) _f✝) fun i => (onTerm φ ∘ onTerm ψ) (_ts✝ i)) = (onTerm φ ∘ onTerm ψ) (func _f✝ _ts✝)\n[PROOFSTEP]\nrfl\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nφ : L ≃ᴸ L'\n⊢ Function.LeftInverse (LHom.onTerm φ.invLHom) (LHom.onTerm φ.toLHom)\n[PROOFSTEP]\nrw [Function.leftInverse_iff_comp, ← LHom.comp_onTerm, φ.left_inv, LHom.id_onTerm]\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nφ : L ≃ᴸ L'\n⊢ Function.RightInverse (LHom.onTerm φ.invLHom) (LHom.onTerm φ.toLHom)\n[PROOFSTEP]\nrw [Function.rightInverse_iff_comp, ← LHom.comp_onTerm, φ.right_inv, LHom.id_onTerm]\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn✝ n : ℕ\nh : n ≤ n\nφ : BoundedFormula L α n\n⊢ castLE h φ = φ\n[PROOFSTEP]\ninduction' φ with _ _ _ _ _ _ _ _ _ _ _ ih1 ih2 _ _ ih3\n[GOAL]\ncase falsum\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn✝¹ n : ℕ\nh✝ : n ≤ n\nn✝ : ℕ\nh : n✝ ≤ n✝\n⊢ castLE h falsum = falsum\n[PROOFSTEP]\nrfl\n[GOAL]\ncase equal\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn✝¹ n : ℕ\nh✝ : n ≤ n\nn✝ : ℕ\nt₁✝ t₂✝ : Term L (α ⊕ Fin n✝)\nh : n✝ ≤ n✝\n⊢ castLE h (equal t₁✝ t₂✝) = equal t₁✝ t₂✝\n[PROOFSTEP]\nsimp [Fin.castLE_of_eq]\n[GOAL]\ncase rel\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn✝¹ n : ℕ\nh✝ : n ≤ n\nn✝ l✝ : ℕ\nR✝ : Relations L l✝\nts✝ : Fin l✝ → Term L (α ⊕ Fin n✝)\nh : n✝ ≤ n✝\n⊢ castLE h (rel R✝ ts✝) = rel R✝ ts✝\n[PROOFSTEP]\nsimp [Fin.castLE_of_eq]\n[GOAL]\ncase imp\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn✝¹ n : ℕ\nh✝ : n ≤ n\nn✝ : ℕ\nf₁✝ f₂✝ : BoundedFormula L α n✝\nih1 : ∀ (h : n✝ ≤ n✝), castLE h f₁✝ = f₁✝\nih2 : ∀ (h : n✝ ≤ n✝), castLE h f₂✝ = f₂✝\nh : n✝ ≤ n✝\n⊢ castLE h (imp f₁✝ f₂✝) = imp f₁✝ f₂✝\n[PROOFSTEP]\nsimp [Fin.castLE_of_eq, ih1, ih2]\n[GOAL]\ncase all\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn✝¹ n : ℕ\nh✝ : n ≤ n\nn✝ : ℕ\nf✝ : BoundedFormula L α (n✝ + 1)\nih3 : ∀ (h : n✝ + 1 ≤ n✝ + 1), castLE h f✝ = f✝\nh : n✝ ≤ n✝\n⊢ castLE h (all f✝) = all f✝\n[PROOFSTEP]\nsimp [Fin.castLE_of_eq, ih3]\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn✝ k m n : ℕ\nkm : k ≤ m\nmn : m ≤ n\nφ : BoundedFormula L α k\n⊢ castLE mn (castLE km φ) = castLE (_ : k ≤ n) φ\n[PROOFSTEP]\nrevert m n\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn k : ℕ\nφ : BoundedFormula L α k\n⊢ ∀ {m n : ℕ} (km : k ≤ m) (mn : m ≤ n), castLE mn (castLE km φ) = castLE (_ : k ≤ n) φ\n[PROOFSTEP]\ninduction' φ with _ _ _ _ _ _ _ _ _ _ _ ih1 ih2 _ _ ih3\n[GOAL]\ncase falsum\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn k n✝ : ℕ\n⊢ ∀ {m n : ℕ} (km : n✝ ≤ m) (mn : m ≤ n), castLE mn (castLE km falsum) = castLE (_ : n✝ ≤ n) falsum\n[PROOFSTEP]\nintro m n km mn\n[GOAL]\ncase equal\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn k n✝ : ℕ\nt₁✝ t₂✝ : Term L (α ⊕ Fin n✝)\n⊢ ∀ {m n : ℕ} (km : n✝ ≤ m) (mn : m ≤ n), castLE mn (castLE km (equal t₁✝ t₂✝)) = castLE (_ : n✝ ≤ n) (equal t₁✝ t₂✝)\n[PROOFSTEP]\nintro m n km mn\n[GOAL]\ncase rel\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn k n✝ l✝ : ℕ\nR✝ : Relations L l✝\nts✝ : Fin l✝ → Term L (α ⊕ Fin n✝)\n⊢ ∀ {m n : ℕ} (km : n✝ ≤ m) (mn : m ≤ n), castLE mn (castLE km (rel R✝ ts✝)) = castLE (_ : n✝ ≤ n) (rel R✝ ts✝)\n[PROOFSTEP]\nintro m n km mn\n[GOAL]\ncase imp\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn k n✝ : ℕ\nf₁✝ f₂✝ : BoundedFormula L α n✝\nih1 : ∀ {m n : ℕ} (km : n✝ ≤ m) (mn : m ≤ n), castLE mn (castLE km f₁✝) = castLE (_ : n✝ ≤ n) f₁✝\nih2 : ∀ {m n : ℕ} (km : n✝ ≤ m) (mn : m ≤ n), castLE mn (castLE km f₂✝) = castLE (_ : n✝ ≤ n) f₂✝\n⊢ ∀ {m n : ℕ} (km : n✝ ≤ m) (mn : m ≤ n), castLE mn (castLE km (imp f₁✝ f₂✝)) = castLE (_ : n✝ ≤ n) (imp f₁✝ f₂✝)\n[PROOFSTEP]\nintro m n km mn\n[GOAL]\ncase all\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn k n✝ : ℕ\nf✝ : BoundedFormula L α (n✝ + 1)\nih3 : ∀ {m n : ℕ} (km : n✝ + 1 ≤ m) (mn : m ≤ n), castLE mn (castLE km f✝) = castLE (_ : n✝ + 1 ≤ n) f✝\n⊢ ∀ {m n : ℕ} (km : n✝ ≤ m) (mn : m ≤ n), castLE mn (castLE km (all f✝)) = castLE (_ : n✝ ≤ n) (all f✝)\n[PROOFSTEP]\nintro m n km mn\n[GOAL]\ncase falsum\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn✝¹ k n✝ m n : ℕ\nkm : n✝ ≤ m\nmn : m ≤ n\n⊢ castLE mn (castLE km falsum) = castLE (_ : n✝ ≤ n) falsum\n[PROOFSTEP]\nrfl\n[GOAL]\ncase equal\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn✝¹ k n✝ : ℕ\nt₁✝ t₂✝ : Term L (α ⊕ Fin n✝)\nm n : ℕ\nkm : n✝ ≤ m\nmn : m ≤ n\n⊢ castLE mn (castLE km (equal t₁✝ t₂✝)) = castLE (_ : n✝ ≤ n) (equal t₁✝ t₂✝)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase rel\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn✝¹ k n✝ l✝ : ℕ\nR✝ : Relations L l✝\nts✝ : Fin l✝ → Term L (α ⊕ Fin n✝)\nm n : ℕ\nkm : n✝ ≤ m\nmn : m ≤ n\n⊢ castLE mn (castLE km (rel R✝ ts✝)) = castLE (_ : n✝ ≤ n) (rel R✝ ts✝)\n[PROOFSTEP]\nsimp only [castLE, eq_self_iff_true, heq_iff_eq, true_and_iff]\n[GOAL]\ncase rel\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn✝¹ k n✝ l✝ : ℕ\nR✝ : Relations L l✝\nts✝ : Fin l✝ → Term L (α ⊕ Fin n✝)\nm n : ℕ\nkm : n✝ ≤ m\nmn : m ≤ n\n⊢ rel R✝ (Term.relabel (Sum.map id (Fin.castLE mn)) ∘ Term.relabel (Sum.map id (Fin.castLE km)) ∘ ts✝) =\n    rel R✝ (Term.relabel (Sum.map id (Fin.castLE (_ : n✝ ≤ n))) ∘ ts✝)\n[PROOFSTEP]\nrw [← Function.comp.assoc, Term.relabel_comp_relabel]\n[GOAL]\ncase rel\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn✝¹ k n✝ l✝ : ℕ\nR✝ : Relations L l✝\nts✝ : Fin l✝ → Term L (α ⊕ Fin n✝)\nm n : ℕ\nkm : n✝ ≤ m\nmn : m ≤ n\n⊢ rel R✝ (Term.relabel (Sum.map id (Fin.castLE mn) ∘ Sum.map id (Fin.castLE km)) ∘ ts✝) =\n    rel R✝ (Term.relabel (Sum.map id (Fin.castLE (_ : n✝ ≤ n))) ∘ ts✝)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase imp\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn✝¹ k n✝ : ℕ\nf₁✝ f₂✝ : BoundedFormula L α n✝\nih1 : ∀ {m n : ℕ} (km : n✝ ≤ m) (mn : m ≤ n), castLE mn (castLE km f₁✝) = castLE (_ : n✝ ≤ n) f₁✝\nih2 : ∀ {m n : ℕ} (km : n✝ ≤ m) (mn : m ≤ n), castLE mn (castLE km f₂✝) = castLE (_ : n✝ ≤ n) f₂✝\nm n : ℕ\nkm : n✝ ≤ m\nmn : m ≤ n\n⊢ castLE mn (castLE km (imp f₁✝ f₂✝)) = castLE (_ : n✝ ≤ n) (imp f₁✝ f₂✝)\n[PROOFSTEP]\nsimp [ih1, ih2]\n[GOAL]\ncase all\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn✝¹ k n✝ : ℕ\nf✝ : BoundedFormula L α (n✝ + 1)\nih3 : ∀ {m n : ℕ} (km : n✝ + 1 ≤ m) (mn : m ≤ n), castLE mn (castLE km f✝) = castLE (_ : n✝ + 1 ≤ n) f✝\nm n : ℕ\nkm : n✝ ≤ m\nmn : m ≤ n\n⊢ castLE mn (castLE km (all f✝)) = castLE (_ : n✝ ≤ n) (all f✝)\n[PROOFSTEP]\nsimp only [castLE, ih3]\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn✝ n n' m : ℕ\nφ : BoundedFormula L α n\nx✝ : ℕ\n⊢ x✝ + 1 + n' ≤ x✝ + n' + 1\n[PROOFSTEP]\nrw [add_assoc, add_comm 1, add_assoc]\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn✝ : ℕ\nL'' : Language\nft : (n : ℕ) → Term L (α ⊕ Fin n) → Term L' (β ⊕ Fin n)\nfr : (n : ℕ) → Relations L n → Relations L' n\nft' : (n : ℕ) → Term L' (β ⊕ Fin n) → Term L'' (γ ⊕ Fin n)\nfr' : (n : ℕ) → Relations L' n → Relations L'' n\nn : ℕ\nφ : BoundedFormula L α n\n⊢ mapTermRel ft' fr' (fun x => id) (mapTermRel ft fr (fun x => id) φ) =\n    mapTermRel (fun x => ft' x ∘ ft x) (fun x => fr' x ∘ fr x) (fun x => id) φ\n[PROOFSTEP]\ninduction' φ with _ _ _ _ _ _ _ _ _ _ _ ih1 ih2 _ _ ih3\n[GOAL]\ncase falsum\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn✝¹ : ℕ\nL'' : Language\nft : (n : ℕ) → Term L (α ⊕ Fin n) → Term L' (β ⊕ Fin n)\nfr : (n : ℕ) → Relations L n → Relations L' n\nft' : (n : ℕ) → Term L' (β ⊕ Fin n) → Term L'' (γ ⊕ Fin n)\nfr' : (n : ℕ) → Relations L' n → Relations L'' n\nn n✝ : ℕ\n⊢ mapTermRel ft' fr' (fun x => id) (mapTermRel ft fr (fun x => id) falsum) =\n    mapTermRel (fun x => ft' x ∘ ft x) (fun x => fr' x ∘ fr x) (fun x => id) falsum\n[PROOFSTEP]\nrfl\n[GOAL]\ncase equal\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn✝¹ : ℕ\nL'' : Language\nft : (n : ℕ) → Term L (α ⊕ Fin n) → Term L' (β ⊕ Fin n)\nfr : (n : ℕ) → Relations L n → Relations L' n\nft' : (n : ℕ) → Term L' (β ⊕ Fin n) → Term L'' (γ ⊕ Fin n)\nfr' : (n : ℕ) → Relations L' n → Relations L'' n\nn n✝ : ℕ\nt₁✝ t₂✝ : Term L (α ⊕ Fin n✝)\n⊢ mapTermRel ft' fr' (fun x => id) (mapTermRel ft fr (fun x => id) (equal t₁✝ t₂✝)) =\n    mapTermRel (fun x => ft' x ∘ ft x) (fun x => fr' x ∘ fr x) (fun x => id) (equal t₁✝ t₂✝)\n[PROOFSTEP]\nsimp [mapTermRel]\n[GOAL]\ncase rel\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn✝¹ : ℕ\nL'' : Language\nft : (n : ℕ) → Term L (α ⊕ Fin n) → Term L' (β ⊕ Fin n)\nfr : (n : ℕ) → Relations L n → Relations L' n\nft' : (n : ℕ) → Term L' (β ⊕ Fin n) → Term L'' (γ ⊕ Fin n)\nfr' : (n : ℕ) → Relations L' n → Relations L'' n\nn n✝ l✝ : ℕ\nR✝ : Relations L l✝\nts✝ : Fin l✝ → Term L (α ⊕ Fin n✝)\n⊢ mapTermRel ft' fr' (fun x => id) (mapTermRel ft fr (fun x => id) (rel R✝ ts✝)) =\n    mapTermRel (fun x => ft' x ∘ ft x) (fun x => fr' x ∘ fr x) (fun x => id) (rel R✝ ts✝)\n[PROOFSTEP]\nsimp [mapTermRel]\n[GOAL]\ncase imp\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn✝¹ : ℕ\nL'' : Language\nft : (n : ℕ) → Term L (α ⊕ Fin n) → Term L' (β ⊕ Fin n)\nfr : (n : ℕ) → Relations L n → Relations L' n\nft' : (n : ℕ) → Term L' (β ⊕ Fin n) → Term L'' (γ ⊕ Fin n)\nfr' : (n : ℕ) → Relations L' n → Relations L'' n\nn n✝ : ℕ\nf₁✝ f₂✝ : BoundedFormula L α n✝\nih1 :\n  mapTermRel ft' fr' (fun x => id) (mapTermRel ft fr (fun x => id) f₁✝) =\n    mapTermRel (fun x => ft' x ∘ ft x) (fun x => fr' x ∘ fr x) (fun x => id) f₁✝\nih2 :\n  mapTermRel ft' fr' (fun x => id) (mapTermRel ft fr (fun x => id) f₂✝) =\n    mapTermRel (fun x => ft' x ∘ ft x) (fun x => fr' x ∘ fr x) (fun x => id) f₂✝\n⊢ mapTermRel ft' fr' (fun x => id) (mapTermRel ft fr (fun x => id) (imp f₁✝ f₂✝)) =\n    mapTermRel (fun x => ft' x ∘ ft x) (fun x => fr' x ∘ fr x) (fun x => id) (imp f₁✝ f₂✝)\n[PROOFSTEP]\nsimp [mapTermRel, ih1, ih2]\n[GOAL]\ncase all\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn✝¹ : ℕ\nL'' : Language\nft : (n : ℕ) → Term L (α ⊕ Fin n) → Term L' (β ⊕ Fin n)\nfr : (n : ℕ) → Relations L n → Relations L' n\nft' : (n : ℕ) → Term L' (β ⊕ Fin n) → Term L'' (γ ⊕ Fin n)\nfr' : (n : ℕ) → Relations L' n → Relations L'' n\nn n✝ : ℕ\nf✝ : BoundedFormula L α (n✝ + 1)\nih3 :\n  mapTermRel ft' fr' (fun x => id) (mapTermRel ft fr (fun x => id) f✝) =\n    mapTermRel (fun x => ft' x ∘ ft x) (fun x => fr' x ∘ fr x) (fun x => id) f✝\n⊢ mapTermRel ft' fr' (fun x => id) (mapTermRel ft fr (fun x => id) (all f✝)) =\n    mapTermRel (fun x => ft' x ∘ ft x) (fun x => fr' x ∘ fr x) (fun x => id) (all f✝)\n[PROOFSTEP]\nsimp [mapTermRel, ih3]\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn✝ n : ℕ\nφ : BoundedFormula L α n\n⊢ mapTermRel (fun x => id) (fun x => id) (fun x => id) φ = φ\n[PROOFSTEP]\ninduction' φ with _ _ _ _ _ _ _ _ _ _ _ ih1 ih2 _ _ ih3\n[GOAL]\ncase falsum\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn✝¹ n n✝ : ℕ\n⊢ mapTermRel (fun x => id) (fun x => id) (fun x => id) falsum = falsum\n[PROOFSTEP]\nrfl\n[GOAL]\ncase equal\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn✝¹ n n✝ : ℕ\nt₁✝ t₂✝ : Term L (α ⊕ Fin n✝)\n⊢ mapTermRel (fun x => id) (fun x => id) (fun x => id) (equal t₁✝ t₂✝) = equal t₁✝ t₂✝\n[PROOFSTEP]\nsimp [mapTermRel]\n[GOAL]\ncase rel\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn✝¹ n n✝ l✝ : ℕ\nR✝ : Relations L l✝\nts✝ : Fin l✝ → Term L (α ⊕ Fin n✝)\n⊢ mapTermRel (fun x => id) (fun x => id) (fun x => id) (rel R✝ ts✝) = rel R✝ ts✝\n[PROOFSTEP]\nsimp [mapTermRel]\n[GOAL]\ncase imp\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn✝¹ n n✝ : ℕ\nf₁✝ f₂✝ : BoundedFormula L α n✝\nih1 : mapTermRel (fun x => id) (fun x => id) (fun x => id) f₁✝ = f₁✝\nih2 : mapTermRel (fun x => id) (fun x => id) (fun x => id) f₂✝ = f₂✝\n⊢ mapTermRel (fun x => id) (fun x => id) (fun x => id) (imp f₁✝ f₂✝) = imp f₁✝ f₂✝\n[PROOFSTEP]\nsimp [mapTermRel, ih1, ih2]\n[GOAL]\ncase all\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn✝¹ n n✝ : ℕ\nf✝ : BoundedFormula L α (n✝ + 1)\nih3 : mapTermRel (fun x => id) (fun x => id) (fun x => id) f✝ = f✝\n⊢ mapTermRel (fun x => id) (fun x => id) (fun x => id) (all f✝) = all f✝\n[PROOFSTEP]\nsimp [mapTermRel, ih3]\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn✝ : ℕ\nft : (n : ℕ) → Term L (α ⊕ Fin n) ≃ Term L' (β ⊕ Fin n)\nfr : (n : ℕ) → Relations L n ≃ Relations L' n\nn : ℕ\nφ : BoundedFormula L α n\n⊢ mapTermRel (fun n => ↑(ft n).symm) (fun n => ↑(fr n).symm) (fun x => id)\n      (mapTermRel (fun n => ↑(ft n)) (fun n => ↑(fr n)) (fun x => id) φ) =\n    φ\n[PROOFSTEP]\nsimp\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn✝ : ℕ\nft : (n : ℕ) → Term L (α ⊕ Fin n) ≃ Term L' (β ⊕ Fin n)\nfr : (n : ℕ) → Relations L n ≃ Relations L' n\nn : ℕ\nφ : BoundedFormula L' β n\n⊢ mapTermRel (fun n => ↑(ft n)) (fun n => ↑(fr n)) (fun x => id)\n      (mapTermRel (fun n => ↑(ft n).symm) (fun n => ↑(fr n).symm) (fun x => id) φ) =\n    φ\n[PROOFSTEP]\nsimp\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn m : ℕ\ng : α → β ⊕ Fin n\nv : β → M\nxs : Fin (n + m) → M\n⊢ Sum.elim v xs ∘ relabelAux g m = Sum.elim (Sum.elim v (xs ∘ castAdd m) ∘ g) (xs ∘ natAdd n)\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn m : ℕ\ng : α → β ⊕ Fin n\nv : β → M\nxs : Fin (n + m) → M\nx : α ⊕ Fin m\n⊢ (Sum.elim v xs ∘ relabelAux g m) x = Sum.elim (Sum.elim v (xs ∘ castAdd m) ∘ g) (xs ∘ natAdd n) x\n[PROOFSTEP]\ncases' x with x x\n[GOAL]\ncase h.inl\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn m : ℕ\ng : α → β ⊕ Fin n\nv : β → M\nxs : Fin (n + m) → M\nx : α\n⊢ (Sum.elim v xs ∘ relabelAux g m) (Sum.inl x) = Sum.elim (Sum.elim v (xs ∘ castAdd m) ∘ g) (xs ∘ natAdd n) (Sum.inl x)\n[PROOFSTEP]\nsimp only [BoundedFormula.relabelAux, Function.comp_apply, Sum.map_inl, Sum.elim_inl]\n[GOAL]\ncase h.inl\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn m : ℕ\ng : α → β ⊕ Fin n\nv : β → M\nxs : Fin (n + m) → M\nx : α\n⊢ Sum.elim v xs (Sum.map id (↑finSumFinEquiv) (↑(Equiv.sumAssoc β (Fin n) (Fin m)) (Sum.inl (g x)))) =\n    Sum.elim v (xs ∘ castAdd m) (g x)\n[PROOFSTEP]\ncases' g x with l r\n[GOAL]\ncase h.inl.inl\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn m : ℕ\ng : α → β ⊕ Fin n\nv : β → M\nxs : Fin (n + m) → M\nx : α\nl : β\n⊢ Sum.elim v xs (Sum.map id (↑finSumFinEquiv) (↑(Equiv.sumAssoc β (Fin n) (Fin m)) (Sum.inl (Sum.inl l)))) =\n    Sum.elim v (xs ∘ castAdd m) (Sum.inl l)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.inl.inr\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn m : ℕ\ng : α → β ⊕ Fin n\nv : β → M\nxs : Fin (n + m) → M\nx : α\nr : Fin n\n⊢ Sum.elim v xs (Sum.map id (↑finSumFinEquiv) (↑(Equiv.sumAssoc β (Fin n) (Fin m)) (Sum.inl (Sum.inr r)))) =\n    Sum.elim v (xs ∘ castAdd m) (Sum.inr r)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.inr\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn m : ℕ\ng : α → β ⊕ Fin n\nv : β → M\nxs : Fin (n + m) → M\nx : Fin m\n⊢ (Sum.elim v xs ∘ relabelAux g m) (Sum.inr x) = Sum.elim (Sum.elim v (xs ∘ castAdd m) ∘ g) (xs ∘ natAdd n) (Sum.inr x)\n[PROOFSTEP]\nsimp [BoundedFormula.relabelAux]\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn k : ℕ\n⊢ relabelAux Sum.inl k = Sum.map id (natAdd n)\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn k : ℕ\nx : α ⊕ Fin k\n⊢ relabelAux Sum.inl k x = Sum.map id (natAdd n) x\n[PROOFSTEP]\ncases x\n[GOAL]\ncase h.inl\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn k : ℕ\nval✝ : α\n⊢ relabelAux Sum.inl k (Sum.inl val✝) = Sum.map id (natAdd n) (Sum.inl val✝)\n[PROOFSTEP]\nsimp [relabelAux]\n[GOAL]\ncase h.inr\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn k : ℕ\nval✝ : Fin k\n⊢ relabelAux Sum.inl k (Sum.inr val✝) = Sum.map id (natAdd n) (Sum.inr val✝)\n[PROOFSTEP]\nsimp [relabelAux]\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn : ℕ\ng : α → β ⊕ Fin n\nk : ℕ\nφ : BoundedFormula L α k\n⊢ relabel g (BoundedFormula.not φ) = BoundedFormula.not (relabel g φ)\n[PROOFSTEP]\nsimp [BoundedFormula.not]\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn : ℕ\ng : α → β ⊕ Fin n\nk : ℕ\nφ : BoundedFormula L α (k + 1)\n⊢ relabel g (all φ) = all (relabel g φ)\n[PROOFSTEP]\nrw [relabel, mapTermRel, relabel]\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn : ℕ\ng : α → β ⊕ Fin n\nk : ℕ\nφ : BoundedFormula L α (k + 1)\n⊢ all\n      (castLE (_ : n + k + 1 ≥ n + (k + 1))\n        (mapTermRel (fun x t => Term.relabel (relabelAux g x) t) (fun x => id)\n          (fun x => castLE (_ : n + x + 1 ≥ n + (x + 1))) φ)) =\n    all\n      (mapTermRel (fun x t => Term.relabel (relabelAux g x) t) (fun x => id)\n        (fun x => castLE (_ : n + x + 1 ≥ n + (x + 1))) φ)\n[PROOFSTEP]\nsimp\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn : ℕ\ng : α → β ⊕ Fin n\nk : ℕ\nφ : BoundedFormula L α (k + 1)\n⊢ relabel g (BoundedFormula.ex φ) = BoundedFormula.ex (relabel g φ)\n[PROOFSTEP]\nsimp [BoundedFormula.ex]\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn : ℕ\nφ : BoundedFormula L α n\n⊢ relabel Sum.inl φ = castLE (_ : 0 + n ≥ n) φ\n[PROOFSTEP]\nsimp only [relabel, relabelAux_sum_inl]\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn : ℕ\nφ : BoundedFormula L α n\n⊢ mapTermRel (fun x t => Term.relabel (Sum.map id (natAdd 0)) t) (fun x => id)\n      (fun x => castLE (_ : 0 + x + 1 ≥ 0 + (x + 1))) φ =\n    castLE (_ : 0 + n ≥ n) φ\n[PROOFSTEP]\ninduction' φ with _ _ _ _ _ _ _ _ _ _ _ ih1 ih2 _ _ ih3\n[GOAL]\ncase falsum\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn n✝ : ℕ\n⊢ mapTermRel (fun x t => Term.relabel (Sum.map id (natAdd 0)) t) (fun x => id)\n      (fun x => castLE (_ : 0 + x + 1 ≥ 0 + (x + 1))) falsum =\n    castLE (_ : 0 + n✝ ≥ n✝) falsum\n[PROOFSTEP]\nrfl\n[GOAL]\ncase equal\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn n✝ : ℕ\nt₁✝ t₂✝ : Term L (α ⊕ Fin n✝)\n⊢ mapTermRel (fun x t => Term.relabel (Sum.map id (natAdd 0)) t) (fun x => id)\n      (fun x => castLE (_ : 0 + x + 1 ≥ 0 + (x + 1))) (equal t₁✝ t₂✝) =\n    castLE (_ : 0 + n✝ ≥ n✝) (equal t₁✝ t₂✝)\n[PROOFSTEP]\nsimp [Fin.natAdd_zero, castLE_of_eq, mapTermRel]\n[GOAL]\ncase rel\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn n✝ l✝ : ℕ\nR✝ : Relations L l✝\nts✝ : Fin l✝ → Term L (α ⊕ Fin n✝)\n⊢ mapTermRel (fun x t => Term.relabel (Sum.map id (natAdd 0)) t) (fun x => id)\n      (fun x => castLE (_ : 0 + x + 1 ≥ 0 + (x + 1))) (rel R✝ ts✝) =\n    castLE (_ : 0 + n✝ ≥ n✝) (rel R✝ ts✝)\n[PROOFSTEP]\nsimp [Fin.natAdd_zero, castLE_of_eq, mapTermRel]\n[GOAL]\ncase rel\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn n✝ l✝ : ℕ\nR✝ : Relations L l✝\nts✝ : Fin l✝ → Term L (α ⊕ Fin n✝)\n⊢ (fun i => Term.relabel (Sum.map id (Fin.cast (_ : n✝ = 0 + n✝))) (ts✝ i)) =\n    Term.relabel (Sum.map id (Fin.cast (_ : n✝ = 0 + n✝))) ∘ ts✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase imp\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn n✝ : ℕ\nf₁✝ f₂✝ : BoundedFormula L α n✝\nih1 :\n  mapTermRel (fun x t => Term.relabel (Sum.map id (natAdd 0)) t) (fun x => id)\n      (fun x => castLE (_ : 0 + x + 1 ≥ 0 + (x + 1))) f₁✝ =\n    castLE (_ : 0 + n✝ ≥ n✝) f₁✝\nih2 :\n  mapTermRel (fun x t => Term.relabel (Sum.map id (natAdd 0)) t) (fun x => id)\n      (fun x => castLE (_ : 0 + x + 1 ≥ 0 + (x + 1))) f₂✝ =\n    castLE (_ : 0 + n✝ ≥ n✝) f₂✝\n⊢ mapTermRel (fun x t => Term.relabel (Sum.map id (natAdd 0)) t) (fun x => id)\n      (fun x => castLE (_ : 0 + x + 1 ≥ 0 + (x + 1))) (imp f₁✝ f₂✝) =\n    castLE (_ : 0 + n✝ ≥ n✝) (imp f₁✝ f₂✝)\n[PROOFSTEP]\nsimp [mapTermRel, ih1, ih2]\n[GOAL]\ncase all\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn n✝ : ℕ\nf✝ : BoundedFormula L α (n✝ + 1)\nih3 :\n  mapTermRel (fun x t => Term.relabel (Sum.map id (natAdd 0)) t) (fun x => id)\n      (fun x => castLE (_ : 0 + x + 1 ≥ 0 + (x + 1))) f✝ =\n    castLE (_ : 0 + (n✝ + 1) ≥ n✝ + 1) f✝\n⊢ mapTermRel (fun x t => Term.relabel (Sum.map id (natAdd 0)) t) (fun x => id)\n      (fun x => castLE (_ : 0 + x + 1 ≥ 0 + (x + 1))) (all f✝) =\n    castLE (_ : 0 + n✝ ≥ n✝) (all f✝)\n[PROOFSTEP]\nsimp [mapTermRel, ih3, castLE]\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn l : ℕ\nφ✝ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv : α → M\nxs : Fin l → M\nφ : BoundedFormula L α (n + 1)\ncon : IsAtomic (all φ)\n⊢ False\n[PROOFSTEP]\ncases con\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn l : ℕ\nφ✝ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv : α → M\nxs : Fin l → M\nφ : BoundedFormula L α (n + 1)\ncon : IsAtomic (BoundedFormula.ex φ)\n⊢ False\n[PROOFSTEP]\ncases con\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn l : ℕ\nφ✝ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv : α → M\nxs : Fin l → M\nφ : BoundedFormula L α (n + 1)\ncon : IsQF (all φ)\n⊢ False\n[PROOFSTEP]\ncases' con with _ con\n[GOAL]\ncase of_isAtomic\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn l : ℕ\nφ✝ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv : α → M\nxs : Fin l → M\nφ : BoundedFormula L α (n + 1)\ncon : IsAtomic (all φ)\n⊢ False\n[PROOFSTEP]\nexact φ.not_all_isAtomic con\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn l : ℕ\nφ✝ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv : α → M\nxs : Fin l → M\nφ : BoundedFormula L α (n + 1)\ncon : IsQF (BoundedFormula.ex φ)\n⊢ False\n[PROOFSTEP]\ncases' con with _ con _ _ con\n[GOAL]\ncase of_isAtomic\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn l : ℕ\nφ✝ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv : α → M\nxs : Fin l → M\nφ : BoundedFormula L α (n + 1)\ncon : IsAtomic (BoundedFormula.ex φ)\n⊢ False\n[PROOFSTEP]\nexact φ.not_ex_isAtomic con\n[GOAL]\ncase imp\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn l : ℕ\nφ✝ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv : α → M\nxs : Fin l → M\nφ : BoundedFormula L α (n + 1)\ncon : IsQF (all (BoundedFormula.not φ))\nh₂✝ : IsQF ⊥\n⊢ False\n[PROOFSTEP]\nexact not_all_isQF _ con\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn l : ℕ\nφ✝¹ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv : α → M\nxs : Fin l → M\nm : ℕ\nφ : BoundedFormula L α m\nh✝ : IsPrenex φ\nf : α → β ⊕ Fin n\nn✝ : ℕ\nφ✝ : BoundedFormula L α (n✝ + 1)\nx✝ : IsPrenex φ✝\nh : IsPrenex (BoundedFormula.relabel f φ✝)\n⊢ IsPrenex (BoundedFormula.relabel f (BoundedFormula.all φ✝))\n[PROOFSTEP]\nsimp [h.all]\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn l : ℕ\nφ✝¹ ψ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv : α → M\nxs : Fin l → M\nm : ℕ\nφ : BoundedFormula L α m\nh✝ : IsPrenex φ\nf : α → β ⊕ Fin n\nn✝ : ℕ\nφ✝ : BoundedFormula L α (n✝ + 1)\nx✝ : IsPrenex φ✝\nh : IsPrenex (BoundedFormula.relabel f φ✝)\n⊢ IsPrenex (BoundedFormula.relabel f (BoundedFormula.ex φ✝))\n[PROOFSTEP]\nsimp [h.ex]\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn l : ℕ\nφ✝ ψ✝ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv : α → M\nxs : Fin l → M\nφ ψ : BoundedFormula L α n\nhφ : IsQF φ\nhψ : IsPrenex ψ\n⊢ IsPrenex (toPrenexImpRight φ ψ)\n[PROOFSTEP]\ninduction' hψ with _ _ hψ _ _ _ ih1 _ _ _ ih2\n[GOAL]\ncase of_isQF\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn l : ℕ\nφ✝² ψ✝ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv : α → M\nxs : Fin l → M\nφ✝¹ ψ : BoundedFormula L α n\nhφ✝ : IsQF φ✝¹\nn✝ : ℕ\nφ✝ : BoundedFormula L α n✝\nhψ : IsQF φ✝\nφ : BoundedFormula L α n✝\nhφ : IsQF φ\n⊢ IsPrenex (toPrenexImpRight φ φ✝)\n[PROOFSTEP]\nrw [hψ.toPrenexImpRight]\n[GOAL]\ncase of_isQF\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn l : ℕ\nφ✝² ψ✝ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv : α → M\nxs : Fin l → M\nφ✝¹ ψ : BoundedFormula L α n\nhφ✝ : IsQF φ✝¹\nn✝ : ℕ\nφ✝ : BoundedFormula L α n✝\nhψ : IsQF φ✝\nφ : BoundedFormula L α n✝\nhφ : IsQF φ\n⊢ IsPrenex (imp φ φ✝)\n[PROOFSTEP]\nexact (hφ.imp hψ).isPrenex\n[GOAL]\ncase all\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn l : ℕ\nφ✝² ψ✝ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv : α → M\nxs : Fin l → M\nφ✝¹ ψ : BoundedFormula L α n\nhφ✝ : IsQF φ✝¹\nn✝ : ℕ\nφ✝ : BoundedFormula L α (n✝ + 1)\nh✝ : IsPrenex φ✝\nih1 : ∀ {φ : BoundedFormula L α (n✝ + 1)}, IsQF φ → IsPrenex (toPrenexImpRight φ φ✝)\nφ : BoundedFormula L α n✝\nhφ : IsQF φ\n⊢ IsPrenex (toPrenexImpRight φ (all φ✝))\n[PROOFSTEP]\nexact (ih1 hφ.liftAt).all\n[GOAL]\ncase ex\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn l : ℕ\nφ✝² ψ✝ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv : α → M\nxs : Fin l → M\nφ✝¹ ψ : BoundedFormula L α n\nhφ✝ : IsQF φ✝¹\nn✝ : ℕ\nφ✝ : BoundedFormula L α (n✝ + 1)\nh✝ : IsPrenex φ✝\nih2 : ∀ {φ : BoundedFormula L α (n✝ + 1)}, IsQF φ → IsPrenex (toPrenexImpRight φ φ✝)\nφ : BoundedFormula L α n✝\nhφ : IsQF φ\n⊢ IsPrenex (toPrenexImpRight φ (BoundedFormula.ex φ✝))\n[PROOFSTEP]\nexact (ih2 hφ.liftAt).ex\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn l : ℕ\nφ✝ ψ✝ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv : α → M\nxs : Fin l → M\nφ ψ : BoundedFormula L α n\nhφ : IsPrenex φ\nhψ : IsPrenex ψ\n⊢ IsPrenex (toPrenexImp φ ψ)\n[PROOFSTEP]\ninduction' hφ with _ _ hφ _ _ _ ih1 _ _ _ ih2\n[GOAL]\ncase of_isQF\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn l : ℕ\nφ✝¹ ψ✝¹ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv : α → M\nxs : Fin l → M\nφ ψ✝ : BoundedFormula L α n\nhψ✝ : IsPrenex ψ✝\nn✝ : ℕ\nφ✝ : BoundedFormula L α n✝\nhφ : IsQF φ✝\nψ : BoundedFormula L α n✝\nhψ : IsPrenex ψ\n⊢ IsPrenex (toPrenexImp φ✝ ψ)\n[PROOFSTEP]\nrw [hφ.toPrenexImp]\n[GOAL]\ncase of_isQF\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn l : ℕ\nφ✝¹ ψ✝¹ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv : α → M\nxs : Fin l → M\nφ ψ✝ : BoundedFormula L α n\nhψ✝ : IsPrenex ψ✝\nn✝ : ℕ\nφ✝ : BoundedFormula L α n✝\nhφ : IsQF φ✝\nψ : BoundedFormula L α n✝\nhψ : IsPrenex ψ\n⊢ IsPrenex (toPrenexImpRight φ✝ ψ)\n[PROOFSTEP]\nexact isPrenex_toPrenexImpRight hφ hψ\n[GOAL]\ncase all\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn l : ℕ\nφ✝¹ ψ✝¹ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv : α → M\nxs : Fin l → M\nφ ψ✝ : BoundedFormula L α n\nhψ✝ : IsPrenex ψ✝\nn✝ : ℕ\nφ✝ : BoundedFormula L α (n✝ + 1)\nh✝ : IsPrenex φ✝\nih1 : ∀ {ψ : BoundedFormula L α (n✝ + 1)}, IsPrenex ψ → IsPrenex (toPrenexImp φ✝ ψ)\nψ : BoundedFormula L α n✝\nhψ : IsPrenex ψ\n⊢ IsPrenex (toPrenexImp (all φ✝) ψ)\n[PROOFSTEP]\nexact (ih1 hψ.liftAt).ex\n[GOAL]\ncase ex\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn l : ℕ\nφ✝¹ ψ✝¹ : BoundedFormula L α l\nθ : BoundedFormula L α (Nat.succ l)\nv : α → M\nxs : Fin l → M\nφ ψ✝ : BoundedFormula L α n\nhψ✝ : IsPrenex ψ✝\nn✝ : ℕ\nφ✝ : BoundedFormula L α (n✝ + 1)\nh✝ : IsPrenex φ✝\nih2 : ∀ {ψ : BoundedFormula L α (n✝ + 1)}, IsPrenex ψ → IsPrenex (toPrenexImp φ✝ ψ)\nψ : BoundedFormula L α n✝\nhψ : IsPrenex ψ\n⊢ IsPrenex (toPrenexImp (BoundedFormula.ex φ✝) ψ)\n[PROOFSTEP]\nexact (ih2 hψ.liftAt).all\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn : ℕ\n⊢ onBoundedFormula (LHom.id L) = id\n[PROOFSTEP]\next f\n[GOAL]\ncase h\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn : ℕ\nf : BoundedFormula L α n\n⊢ onBoundedFormula (LHom.id L) f = id f\n[PROOFSTEP]\ninduction' f with _ _ _ _ _ _ _ _ _ _ _ ih1 ih2 _ _ ih3\n[GOAL]\ncase h.falsum\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn n✝ : ℕ\n⊢ onBoundedFormula (LHom.id L) falsum = id falsum\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h.equal\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn n✝ : ℕ\nt₁✝ t₂✝ : Term L (α ⊕ Fin n✝)\n⊢ onBoundedFormula (LHom.id L) (equal t₁✝ t₂✝) = id (equal t₁✝ t₂✝)\n[PROOFSTEP]\nrw [onBoundedFormula, LHom.id_onTerm, id.def, id.def, id.def, Term.bdEqual]\n[GOAL]\ncase h.rel\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn n✝ l✝ : ℕ\nR✝ : Relations L l✝\nts✝ : Fin l✝ → Term L (α ⊕ Fin n✝)\n⊢ onBoundedFormula (LHom.id L) (rel R✝ ts✝) = id (rel R✝ ts✝)\n[PROOFSTEP]\nrw [onBoundedFormula, LHom.id_onTerm]\n[GOAL]\ncase h.rel\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn n✝ l✝ : ℕ\nR✝ : Relations L l✝\nts✝ : Fin l✝ → Term L (α ⊕ Fin n✝)\n⊢ Relations.boundedFormula (onRelation (LHom.id L) R✝) (id ∘ ts✝) = id (rel R✝ ts✝)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h.imp\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn n✝ : ℕ\nf₁✝ f₂✝ : BoundedFormula L α n✝\nih1 : onBoundedFormula (LHom.id L) f₁✝ = id f₁✝\nih2 : onBoundedFormula (LHom.id L) f₂✝ = id f₂✝\n⊢ onBoundedFormula (LHom.id L) (imp f₁✝ f₂✝) = id (imp f₁✝ f₂✝)\n[PROOFSTEP]\nrw [onBoundedFormula, ih1, ih2, id.def, id.def, id.def]\n[GOAL]\ncase h.all\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn n✝ : ℕ\nf✝ : BoundedFormula L α (n✝ + 1)\nih3 : onBoundedFormula (LHom.id L) f✝ = id f✝\n⊢ onBoundedFormula (LHom.id L) (all f✝) = id (all f✝)\n[PROOFSTEP]\nrw [onBoundedFormula, ih3, id.def, id.def]\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn : ℕ\nL'' : Language\nφ : L' →ᴸ L''\nψ : L →ᴸ L'\n⊢ onBoundedFormula (comp φ ψ) = onBoundedFormula φ ∘ onBoundedFormula ψ\n[PROOFSTEP]\next f\n[GOAL]\ncase h\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn : ℕ\nL'' : Language\nφ : L' →ᴸ L''\nψ : L →ᴸ L'\nf : BoundedFormula L α n\n⊢ onBoundedFormula (comp φ ψ) f = (onBoundedFormula φ ∘ onBoundedFormula ψ) f\n[PROOFSTEP]\ninduction' f with _ _ _ _ _ _ _ _ _ _ _ ih1 ih2 _ _ ih3\n[GOAL]\ncase h.falsum\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn : ℕ\nL'' : Language\nφ : L' →ᴸ L''\nψ : L →ᴸ L'\nn✝ : ℕ\n⊢ onBoundedFormula (comp φ ψ) falsum = (onBoundedFormula φ ∘ onBoundedFormula ψ) falsum\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h.equal\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn : ℕ\nL'' : Language\nφ : L' →ᴸ L''\nψ : L →ᴸ L'\nn✝ : ℕ\nt₁✝ t₂✝ : Term L (α ⊕ Fin n✝)\n⊢ onBoundedFormula (comp φ ψ) (equal t₁✝ t₂✝) = (onBoundedFormula φ ∘ onBoundedFormula ψ) (equal t₁✝ t₂✝)\n[PROOFSTEP]\nsimp only [onBoundedFormula, comp_onTerm, Function.comp_apply]\n[GOAL]\ncase h.rel\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn : ℕ\nL'' : Language\nφ : L' →ᴸ L''\nψ : L →ᴸ L'\nn✝ l✝ : ℕ\nR✝ : Relations L l✝\nts✝ : Fin l✝ → Term L (α ⊕ Fin n✝)\n⊢ onBoundedFormula (comp φ ψ) (rel R✝ ts✝) = (onBoundedFormula φ ∘ onBoundedFormula ψ) (rel R✝ ts✝)\n[PROOFSTEP]\nsimp only [onBoundedFormula, comp_onRelation, comp_onTerm, Function.comp_apply]\n[GOAL]\ncase h.rel\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn : ℕ\nL'' : Language\nφ : L' →ᴸ L''\nψ : L →ᴸ L'\nn✝ l✝ : ℕ\nR✝ : Relations L l✝\nts✝ : Fin l✝ → Term L (α ⊕ Fin n✝)\n⊢ Relations.boundedFormula (onRelation φ (onRelation ψ R✝)) ((onTerm φ ∘ onTerm ψ) ∘ ts✝) =\n    Relations.boundedFormula (onRelation φ (onRelation ψ R✝)) (onTerm φ ∘ onTerm ψ ∘ ts✝)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h.imp\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn : ℕ\nL'' : Language\nφ : L' →ᴸ L''\nψ : L →ᴸ L'\nn✝ : ℕ\nf₁✝ f₂✝ : BoundedFormula L α n✝\nih1 : onBoundedFormula (comp φ ψ) f₁✝ = (onBoundedFormula φ ∘ onBoundedFormula ψ) f₁✝\nih2 : onBoundedFormula (comp φ ψ) f₂✝ = (onBoundedFormula φ ∘ onBoundedFormula ψ) f₂✝\n⊢ onBoundedFormula (comp φ ψ) (imp f₁✝ f₂✝) = (onBoundedFormula φ ∘ onBoundedFormula ψ) (imp f₁✝ f₂✝)\n[PROOFSTEP]\nsimp only [onBoundedFormula, Function.comp_apply, ih1, ih2, eq_self_iff_true, and_self_iff]\n[GOAL]\ncase h.all\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn : ℕ\nL'' : Language\nφ : L' →ᴸ L''\nψ : L →ᴸ L'\nn✝ : ℕ\nf✝ : BoundedFormula L α (n✝ + 1)\nih3 : onBoundedFormula (comp φ ψ) f✝ = (onBoundedFormula φ ∘ onBoundedFormula ψ) f✝\n⊢ onBoundedFormula (comp φ ψ) (all f✝) = (onBoundedFormula φ ∘ onBoundedFormula ψ) (all f✝)\n[PROOFSTEP]\nsimp only [ih3, onBoundedFormula, Function.comp_apply]\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn : ℕ\nφ : L ≃ᴸ L'\n⊢ Function.LeftInverse (LHom.onBoundedFormula φ.invLHom) (LHom.onBoundedFormula φ.toLHom)\n[PROOFSTEP]\nrw [Function.leftInverse_iff_comp, ← LHom.comp_onBoundedFormula, φ.left_inv, LHom.id_onBoundedFormula]\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn : ℕ\nφ : L ≃ᴸ L'\n⊢ Function.RightInverse (LHom.onBoundedFormula φ.invLHom) (LHom.onBoundedFormula φ.toLHom)\n[PROOFSTEP]\nrw [Function.rightInverse_iff_comp, ← LHom.comp_onBoundedFormula, φ.right_inv, LHom.id_onBoundedFormula]\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn : ℕ\ns : Set α\n⊢ distinctConstantsTheory L s =\n    ⋃ (t : Finset ↑s), distinctConstantsTheory L ↑(Finset.map (Function.Embedding.subtype fun x => x ∈ s) t)\n[PROOFSTEP]\nclassical\nsimp only [distinctConstantsTheory]\nrw [← image_iUnion, ← iUnion_inter]\nrefine' congr rfl (congr (congr rfl _) rfl)\next ⟨i, j⟩\nsimp only [prod_mk_mem_set_prod_eq, Finset.coe_map, Function.Embedding.coe_subtype, mem_iUnion, mem_image,\n  Finset.mem_coe, Subtype.exists, Subtype.coe_mk, exists_and_right, exists_eq_right]\nrefine' ⟨fun h => ⟨{⟨i, h.1⟩, ⟨j, h.2⟩}, ⟨h.1, _⟩, ⟨h.2, _⟩⟩, _⟩\n· simp\n· simp\n· rintro ⟨t, ⟨is, _⟩, ⟨js, _⟩⟩\n  exact ⟨is, js⟩\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn : ℕ\ns : Set α\n⊢ distinctConstantsTheory L s =\n    ⋃ (t : Finset ↑s), distinctConstantsTheory L ↑(Finset.map (Function.Embedding.subtype fun x => x ∈ s) t)\n[PROOFSTEP]\nsimp only [distinctConstantsTheory]\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn : ℕ\ns : Set α\n⊢ (fun ab =>\n        Formula.not (Term.equal (Constants.term (Language.con L ab.fst)) (Constants.term (Language.con L ab.snd)))) ''\n      (s ×ˢ s ∩ (diagonal α)ᶜ) =\n    ⋃ (t : Finset ↑s),\n      (fun ab =>\n          Formula.not (Term.equal (Constants.term (Language.con L ab.fst)) (Constants.term (Language.con L ab.snd)))) ''\n        (↑(Finset.map (Function.Embedding.subtype fun x => x ∈ s) t) ×ˢ\n            ↑(Finset.map (Function.Embedding.subtype fun x => x ∈ s) t) ∩\n          (diagonal α)ᶜ)\n[PROOFSTEP]\nrw [← image_iUnion, ← iUnion_inter]\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn : ℕ\ns : Set α\n⊢ (fun ab =>\n        Formula.not (Term.equal (Constants.term (Language.con L ab.fst)) (Constants.term (Language.con L ab.snd)))) ''\n      (s ×ˢ s ∩ (diagonal α)ᶜ) =\n    (fun ab =>\n        Formula.not (Term.equal (Constants.term (Language.con L ab.fst)) (Constants.term (Language.con L ab.snd)))) ''\n      ((⋃ (i : Finset ↑s),\n          ↑(Finset.map (Function.Embedding.subtype fun x => x ∈ s) i) ×ˢ\n            ↑(Finset.map (Function.Embedding.subtype fun x => x ∈ s) i)) ∩\n        (diagonal α)ᶜ)\n[PROOFSTEP]\nrefine' congr rfl (congr (congr rfl _) rfl)\n[GOAL]\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn : ℕ\ns : Set α\n⊢ s ×ˢ s =\n    ⋃ (i : Finset ↑s),\n      ↑(Finset.map (Function.Embedding.subtype fun x => x ∈ s) i) ×ˢ\n        ↑(Finset.map (Function.Embedding.subtype fun x => x ∈ s) i)\n[PROOFSTEP]\next ⟨i, j⟩\n[GOAL]\ncase h.mk\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn : ℕ\ns : Set α\ni j : α\n⊢ (i, j) ∈ s ×ˢ s ↔\n    (i, j) ∈\n      ⋃ (i : Finset ↑s),\n        ↑(Finset.map (Function.Embedding.subtype fun x => x ∈ s) i) ×ˢ\n          ↑(Finset.map (Function.Embedding.subtype fun x => x ∈ s) i)\n[PROOFSTEP]\nsimp only [prod_mk_mem_set_prod_eq, Finset.coe_map, Function.Embedding.coe_subtype, mem_iUnion, mem_image,\n  Finset.mem_coe, Subtype.exists, Subtype.coe_mk, exists_and_right, exists_eq_right]\n[GOAL]\ncase h.mk\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn : ℕ\ns : Set α\ni j : α\n⊢ i ∈ s ∧ j ∈ s ↔\n    ∃ i_1, (∃ x, { val := i, property := (_ : i ∈ s) } ∈ i_1) ∧ ∃ x, { val := j, property := (_ : j ∈ s) } ∈ i_1\n[PROOFSTEP]\nrefine' ⟨fun h => ⟨{⟨i, h.1⟩, ⟨j, h.2⟩}, ⟨h.1, _⟩, ⟨h.2, _⟩⟩, _⟩\n[GOAL]\ncase h.mk.refine'_1\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn : ℕ\ns : Set α\ni j : α\nh : i ∈ s ∧ j ∈ s\n⊢ { val := i, property := (_ : i ∈ s) } ∈ {{ val := i, property := (_ : i ∈ s) }, { val := j, property := (_ : j ∈ s) }}\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.mk.refine'_2\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn : ℕ\ns : Set α\ni j : α\nh : i ∈ s ∧ j ∈ s\n⊢ { val := j, property := (_ : j ∈ s) } ∈ {{ val := i, property := (_ : i ∈ s) }, { val := j, property := (_ : j ∈ s) }}\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.mk.refine'_3\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn : ℕ\ns : Set α\ni j : α\n⊢ (∃ i_1, (∃ x, { val := i, property := (_ : i ∈ s) } ∈ i_1) ∧ ∃ x, { val := j, property := (_ : j ∈ s) } ∈ i_1) →\n    i ∈ s ∧ j ∈ s\n[PROOFSTEP]\nrintro ⟨t, ⟨is, _⟩, ⟨js, _⟩⟩\n[GOAL]\ncase h.mk.refine'_3.intro.intro.intro.intro\nL : Language\nL' : Language\nM : Type w\nN : Type u_1\nP : Type u_2\ninst✝² : Structure L M\ninst✝¹ : Structure L N\ninst✝ : Structure L P\nα : Type u'\nβ : Type v'\nγ : Type u_3\nn : ℕ\ns : Set α\ni j : α\nt : Finset ↑s\nis : i ∈ s\nh✝¹ : { val := i, property := (_ : i ∈ s) } ∈ t\njs : j ∈ s\nh✝ : { val := j, property := (_ : j ∈ s) } ∈ t\n⊢ i ∈ s ∧ j ∈ s\n[PROOFSTEP]\nexact ⟨is, js⟩\n", "meta": {"mathlib_filename": "Mathlib.ModelTheory.Syntax", "llama_tokens": 31219, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7090191214879991, "lm_q2_score": 0.7090191337850932, "lm_q1q2_score": 0.5027081233544889}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : Preorder β\na : α\nf : α → β\ns t : Set α\nc : α\nh₁ : StrictMonoOn f s\nh₂ : StrictMonoOn f t\nhs : IsGreatest s c\nht : IsLeast t c\n⊢ StrictMonoOn f (s ∪ t)\n[PROOFSTEP]\nhave A : ∀ x, x ∈ s ∪ t → x ≤ c → x ∈ s := by\n  intro x hx hxc\n  cases hx\n  · assumption\n  rcases eq_or_lt_of_le hxc with (rfl | h'x)\n  · exact hs.1\n  exact (lt_irrefl _ (h'x.trans_le (ht.2 (by assumption)))).elim\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : Preorder β\na : α\nf : α → β\ns t : Set α\nc : α\nh₁ : StrictMonoOn f s\nh₂ : StrictMonoOn f t\nhs : IsGreatest s c\nht : IsLeast t c\n⊢ ∀ (x : α), x ∈ s ∪ t → x ≤ c → x ∈ s\n[PROOFSTEP]\nintro x hx hxc\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : Preorder β\na : α\nf : α → β\ns t : Set α\nc : α\nh₁ : StrictMonoOn f s\nh₂ : StrictMonoOn f t\nhs : IsGreatest s c\nht : IsLeast t c\nx : α\nhx : x ∈ s ∪ t\nhxc : x ≤ c\n⊢ x ∈ s\n[PROOFSTEP]\ncases hx\n[GOAL]\ncase inl\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : Preorder β\na : α\nf : α → β\ns t : Set α\nc : α\nh₁ : StrictMonoOn f s\nh₂ : StrictMonoOn f t\nhs : IsGreatest s c\nht : IsLeast t c\nx : α\nhxc : x ≤ c\nh✝ : x ∈ s\n⊢ x ∈ s\n[PROOFSTEP]\nassumption\n[GOAL]\ncase inr\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : Preorder β\na : α\nf : α → β\ns t : Set α\nc : α\nh₁ : StrictMonoOn f s\nh₂ : StrictMonoOn f t\nhs : IsGreatest s c\nht : IsLeast t c\nx : α\nhxc : x ≤ c\nh✝ : x ∈ t\n⊢ x ∈ s\n[PROOFSTEP]\nrcases eq_or_lt_of_le hxc with (rfl | h'x)\n[GOAL]\ncase inr.inl\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : Preorder β\na : α\nf : α → β\ns t : Set α\nh₁ : StrictMonoOn f s\nh₂ : StrictMonoOn f t\nx : α\nh✝ : x ∈ t\nhs : IsGreatest s x\nht : IsLeast t x\nhxc : x ≤ x\n⊢ x ∈ s\n[PROOFSTEP]\nexact hs.1\n[GOAL]\ncase inr.inr\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : Preorder β\na : α\nf : α → β\ns t : Set α\nc : α\nh₁ : StrictMonoOn f s\nh₂ : StrictMonoOn f t\nhs : IsGreatest s c\nht : IsLeast t c\nx : α\nhxc : x ≤ c\nh✝ : x ∈ t\nh'x : x < c\n⊢ x ∈ s\n[PROOFSTEP]\nexact (lt_irrefl _ (h'x.trans_le (ht.2 (by assumption)))).elim\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : Preorder β\na : α\nf : α → β\ns t : Set α\nc : α\nh₁ : StrictMonoOn f s\nh₂ : StrictMonoOn f t\nhs : IsGreatest s c\nht : IsLeast t c\nx : α\nhxc : x ≤ c\nh✝ : x ∈ t\nh'x : x < c\n⊢ x ∈ t\n[PROOFSTEP]\nassumption\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : Preorder β\na : α\nf : α → β\ns t : Set α\nc : α\nh₁ : StrictMonoOn f s\nh₂ : StrictMonoOn f t\nhs : IsGreatest s c\nht : IsLeast t c\nA : ∀ (x : α), x ∈ s ∪ t → x ≤ c → x ∈ s\n⊢ StrictMonoOn f (s ∪ t)\n[PROOFSTEP]\nhave B : ∀ x, x ∈ s ∪ t → c ≤ x → x ∈ t := by\n  intro x hx hxc\n  match hx with\n  | Or.inr hx => exact hx\n  | Or.inl hx =>\n    rcases eq_or_lt_of_le hxc with (rfl | h'x)\n    · exact ht.1\n    exact (lt_irrefl _ (h'x.trans_le (hs.2 hx))).elim\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : Preorder β\na : α\nf : α → β\ns t : Set α\nc : α\nh₁ : StrictMonoOn f s\nh₂ : StrictMonoOn f t\nhs : IsGreatest s c\nht : IsLeast t c\nA : ∀ (x : α), x ∈ s ∪ t → x ≤ c → x ∈ s\n⊢ ∀ (x : α), x ∈ s ∪ t → c ≤ x → x ∈ t\n[PROOFSTEP]\nintro x hx hxc\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : Preorder β\na : α\nf : α → β\ns t : Set α\nc : α\nh₁ : StrictMonoOn f s\nh₂ : StrictMonoOn f t\nhs : IsGreatest s c\nht : IsLeast t c\nA : ∀ (x : α), x ∈ s ∪ t → x ≤ c → x ∈ s\nx : α\nhx : x ∈ s ∪ t\nhxc : c ≤ x\n⊢ x ∈ t\n[PROOFSTEP]\nmatch hx with\n| Or.inr hx => exact hx\n| Or.inl hx =>\n  rcases eq_or_lt_of_le hxc with (rfl | h'x)\n  · exact ht.1\n  exact (lt_irrefl _ (h'x.trans_le (hs.2 hx))).elim\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : Preorder β\na : α\nf : α → β\ns t : Set α\nc : α\nh₁ : StrictMonoOn f s\nh₂ : StrictMonoOn f t\nhs : IsGreatest s c\nht : IsLeast t c\nA : ∀ (x : α), x ∈ s ∪ t → x ≤ c → x ∈ s\nx : α\nhx✝ : x ∈ s ∪ t\nhxc : c ≤ x\nhx : x ∈ t\n⊢ x ∈ t\n[PROOFSTEP]\nexact hx\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : Preorder β\na : α\nf : α → β\ns t : Set α\nc : α\nh₁ : StrictMonoOn f s\nh₂ : StrictMonoOn f t\nhs : IsGreatest s c\nht : IsLeast t c\nA : ∀ (x : α), x ∈ s ∪ t → x ≤ c → x ∈ s\nx : α\nhx✝ : x ∈ s ∪ t\nhxc : c ≤ x\nhx : x ∈ s\n⊢ x ∈ t\n[PROOFSTEP]\nrcases eq_or_lt_of_le hxc with (rfl | h'x)\n[GOAL]\ncase inl\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : Preorder β\na : α\nf : α → β\ns t : Set α\nc : α\nh₁ : StrictMonoOn f s\nh₂ : StrictMonoOn f t\nhs : IsGreatest s c\nht : IsLeast t c\nA : ∀ (x : α), x ∈ s ∪ t → x ≤ c → x ∈ s\nhx✝ : c ∈ s ∪ t\nhxc : c ≤ c\nhx : c ∈ s\n⊢ c ∈ t\n[PROOFSTEP]\nexact ht.1\n[GOAL]\ncase inr\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : Preorder β\na : α\nf : α → β\ns t : Set α\nc : α\nh₁ : StrictMonoOn f s\nh₂ : StrictMonoOn f t\nhs : IsGreatest s c\nht : IsLeast t c\nA : ∀ (x : α), x ∈ s ∪ t → x ≤ c → x ∈ s\nx : α\nhx✝ : x ∈ s ∪ t\nhxc : c ≤ x\nhx : x ∈ s\nh'x : c < x\n⊢ x ∈ t\n[PROOFSTEP]\nexact (lt_irrefl _ (h'x.trans_le (hs.2 hx))).elim\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : Preorder β\na : α\nf : α → β\ns t : Set α\nc : α\nh₁ : StrictMonoOn f s\nh₂ : StrictMonoOn f t\nhs : IsGreatest s c\nht : IsLeast t c\nA : ∀ (x : α), x ∈ s ∪ t → x ≤ c → x ∈ s\nB : ∀ (x : α), x ∈ s ∪ t → c ≤ x → x ∈ t\n⊢ StrictMonoOn f (s ∪ t)\n[PROOFSTEP]\nintro x hx y hy hxy\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : Preorder β\na : α\nf : α → β\ns t : Set α\nc : α\nh₁ : StrictMonoOn f s\nh₂ : StrictMonoOn f t\nhs : IsGreatest s c\nht : IsLeast t c\nA : ∀ (x : α), x ∈ s ∪ t → x ≤ c → x ∈ s\nB : ∀ (x : α), x ∈ s ∪ t → c ≤ x → x ∈ t\nx : α\nhx : x ∈ s ∪ t\ny : α\nhy : y ∈ s ∪ t\nhxy : x < y\n⊢ f x < f y\n[PROOFSTEP]\nrcases lt_or_le x c with (hxc | hcx)\n[GOAL]\ncase inl\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : Preorder β\na : α\nf : α → β\ns t : Set α\nc : α\nh₁ : StrictMonoOn f s\nh₂ : StrictMonoOn f t\nhs : IsGreatest s c\nht : IsLeast t c\nA : ∀ (x : α), x ∈ s ∪ t → x ≤ c → x ∈ s\nB : ∀ (x : α), x ∈ s ∪ t → c ≤ x → x ∈ t\nx : α\nhx : x ∈ s ∪ t\ny : α\nhy : y ∈ s ∪ t\nhxy : x < y\nhxc : x < c\n⊢ f x < f y\n[PROOFSTEP]\nhave xs : x ∈ s := A _ hx hxc.le\n[GOAL]\ncase inl\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : Preorder β\na : α\nf : α → β\ns t : Set α\nc : α\nh₁ : StrictMonoOn f s\nh₂ : StrictMonoOn f t\nhs : IsGreatest s c\nht : IsLeast t c\nA : ∀ (x : α), x ∈ s ∪ t → x ≤ c → x ∈ s\nB : ∀ (x : α), x ∈ s ∪ t → c ≤ x → x ∈ t\nx : α\nhx : x ∈ s ∪ t\ny : α\nhy : y ∈ s ∪ t\nhxy : x < y\nhxc : x < c\nxs : x ∈ s\n⊢ f x < f y\n[PROOFSTEP]\nrcases lt_or_le y c with (hyc | hcy)\n[GOAL]\ncase inl.inl\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : Preorder β\na : α\nf : α → β\ns t : Set α\nc : α\nh₁ : StrictMonoOn f s\nh₂ : StrictMonoOn f t\nhs : IsGreatest s c\nht : IsLeast t c\nA : ∀ (x : α), x ∈ s ∪ t → x ≤ c → x ∈ s\nB : ∀ (x : α), x ∈ s ∪ t → c ≤ x → x ∈ t\nx : α\nhx : x ∈ s ∪ t\ny : α\nhy : y ∈ s ∪ t\nhxy : x < y\nhxc : x < c\nxs : x ∈ s\nhyc : y < c\n⊢ f x < f y\n[PROOFSTEP]\nexact h₁ xs (A _ hy hyc.le) hxy\n[GOAL]\ncase inl.inr\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : Preorder β\na : α\nf : α → β\ns t : Set α\nc : α\nh₁ : StrictMonoOn f s\nh₂ : StrictMonoOn f t\nhs : IsGreatest s c\nht : IsLeast t c\nA : ∀ (x : α), x ∈ s ∪ t → x ≤ c → x ∈ s\nB : ∀ (x : α), x ∈ s ∪ t → c ≤ x → x ∈ t\nx : α\nhx : x ∈ s ∪ t\ny : α\nhy : y ∈ s ∪ t\nhxy : x < y\nhxc : x < c\nxs : x ∈ s\nhcy : c ≤ y\n⊢ f x < f y\n[PROOFSTEP]\nexact (h₁ xs hs.1 hxc).trans_le (h₂.monotoneOn ht.1 (B _ hy hcy) hcy)\n[GOAL]\ncase inr\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : Preorder β\na : α\nf : α → β\ns t : Set α\nc : α\nh₁ : StrictMonoOn f s\nh₂ : StrictMonoOn f t\nhs : IsGreatest s c\nht : IsLeast t c\nA : ∀ (x : α), x ∈ s ∪ t → x ≤ c → x ∈ s\nB : ∀ (x : α), x ∈ s ∪ t → c ≤ x → x ∈ t\nx : α\nhx : x ∈ s ∪ t\ny : α\nhy : y ∈ s ∪ t\nhxy : x < y\nhcx : c ≤ x\n⊢ f x < f y\n[PROOFSTEP]\nhave xt : x ∈ t := B _ hx hcx\n[GOAL]\ncase inr\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : Preorder β\na : α\nf : α → β\ns t : Set α\nc : α\nh₁ : StrictMonoOn f s\nh₂ : StrictMonoOn f t\nhs : IsGreatest s c\nht : IsLeast t c\nA : ∀ (x : α), x ∈ s ∪ t → x ≤ c → x ∈ s\nB : ∀ (x : α), x ∈ s ∪ t → c ≤ x → x ∈ t\nx : α\nhx : x ∈ s ∪ t\ny : α\nhy : y ∈ s ∪ t\nhxy : x < y\nhcx : c ≤ x\nxt : x ∈ t\n⊢ f x < f y\n[PROOFSTEP]\nhave yt : y ∈ t := B _ hy (hcx.trans hxy.le)\n[GOAL]\ncase inr\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : Preorder β\na : α\nf : α → β\ns t : Set α\nc : α\nh₁ : StrictMonoOn f s\nh₂ : StrictMonoOn f t\nhs : IsGreatest s c\nht : IsLeast t c\nA : ∀ (x : α), x ∈ s ∪ t → x ≤ c → x ∈ s\nB : ∀ (x : α), x ∈ s ∪ t → c ≤ x → x ∈ t\nx : α\nhx : x ∈ s ∪ t\ny : α\nhy : y ∈ s ∪ t\nhxy : x < y\nhcx : c ≤ x\nxt : x ∈ t\nyt : y ∈ t\n⊢ f x < f y\n[PROOFSTEP]\nexact h₂ xt yt hxy\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : Preorder β\na : α\nf : α → β\nh₁ : StrictMonoOn f (Iic a)\nh₂ : StrictMonoOn f (Ici a)\n⊢ StrictMono f\n[PROOFSTEP]\nrw [← strictMonoOn_univ, ← @Iic_union_Ici _ _ a]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : Preorder β\na : α\nf : α → β\nh₁ : StrictMonoOn f (Iic a)\nh₂ : StrictMonoOn f (Ici a)\n⊢ StrictMonoOn f (Iic a ∪ Ici a)\n[PROOFSTEP]\nexact StrictMonoOn.union h₁ h₂ isGreatest_Iic isLeast_Ici\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : Preorder β\na : α\nf : α → β\ns t : Set α\nc : α\nh₁ : MonotoneOn f s\nh₂ : MonotoneOn f t\nhs : IsGreatest s c\nht : IsLeast t c\n⊢ MonotoneOn f (s ∪ t)\n[PROOFSTEP]\nhave A : ∀ x, x ∈ s ∪ t → x ≤ c → x ∈ s := by\n  intro x hx hxc\n  cases hx\n  · assumption\n  rcases eq_or_lt_of_le hxc with (rfl | h'x)\n  · exact hs.1\n  exact (lt_irrefl _ (h'x.trans_le (ht.2 (by assumption)))).elim\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : Preorder β\na : α\nf : α → β\ns t : Set α\nc : α\nh₁ : MonotoneOn f s\nh₂ : MonotoneOn f t\nhs : IsGreatest s c\nht : IsLeast t c\n⊢ ∀ (x : α), x ∈ s ∪ t → x ≤ c → x ∈ s\n[PROOFSTEP]\nintro x hx hxc\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : Preorder β\na : α\nf : α → β\ns t : Set α\nc : α\nh₁ : MonotoneOn f s\nh₂ : MonotoneOn f t\nhs : IsGreatest s c\nht : IsLeast t c\nx : α\nhx : x ∈ s ∪ t\nhxc : x ≤ c\n⊢ x ∈ s\n[PROOFSTEP]\ncases hx\n[GOAL]\ncase inl\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : Preorder β\na : α\nf : α → β\ns t : Set α\nc : α\nh₁ : MonotoneOn f s\nh₂ : MonotoneOn f t\nhs : IsGreatest s c\nht : IsLeast t c\nx : α\nhxc : x ≤ c\nh✝ : x ∈ s\n⊢ x ∈ s\n[PROOFSTEP]\nassumption\n[GOAL]\ncase inr\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : Preorder β\na : α\nf : α → β\ns t : Set α\nc : α\nh₁ : MonotoneOn f s\nh₂ : MonotoneOn f t\nhs : IsGreatest s c\nht : IsLeast t c\nx : α\nhxc : x ≤ c\nh✝ : x ∈ t\n⊢ x ∈ s\n[PROOFSTEP]\nrcases eq_or_lt_of_le hxc with (rfl | h'x)\n[GOAL]\ncase inr.inl\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : Preorder β\na : α\nf : α → β\ns t : Set α\nh₁ : MonotoneOn f s\nh₂ : MonotoneOn f t\nx : α\nh✝ : x ∈ t\nhs : IsGreatest s x\nht : IsLeast t x\nhxc : x ≤ x\n⊢ x ∈ s\n[PROOFSTEP]\nexact hs.1\n[GOAL]\ncase inr.inr\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : Preorder β\na : α\nf : α → β\ns t : Set α\nc : α\nh₁ : MonotoneOn f s\nh₂ : MonotoneOn f t\nhs : IsGreatest s c\nht : IsLeast t c\nx : α\nhxc : x ≤ c\nh✝ : x ∈ t\nh'x : x < c\n⊢ x ∈ s\n[PROOFSTEP]\nexact (lt_irrefl _ (h'x.trans_le (ht.2 (by assumption)))).elim\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : Preorder β\na : α\nf : α → β\ns t : Set α\nc : α\nh₁ : MonotoneOn f s\nh₂ : MonotoneOn f t\nhs : IsGreatest s c\nht : IsLeast t c\nx : α\nhxc : x ≤ c\nh✝ : x ∈ t\nh'x : x < c\n⊢ x ∈ t\n[PROOFSTEP]\nassumption\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : Preorder β\na : α\nf : α → β\ns t : Set α\nc : α\nh₁ : MonotoneOn f s\nh₂ : MonotoneOn f t\nhs : IsGreatest s c\nht : IsLeast t c\nA : ∀ (x : α), x ∈ s ∪ t → x ≤ c → x ∈ s\n⊢ MonotoneOn f (s ∪ t)\n[PROOFSTEP]\nhave B : ∀ x, x ∈ s ∪ t → c ≤ x → x ∈ t := by\n  intro x hx hxc\n  match hx with\n  | Or.inr hx => exact hx\n  | Or.inl hx =>\n    rcases eq_or_lt_of_le hxc with (rfl | h'x)\n    · exact ht.1\n    exact (lt_irrefl _ (h'x.trans_le (hs.2 hx))).elim\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : Preorder β\na : α\nf : α → β\ns t : Set α\nc : α\nh₁ : MonotoneOn f s\nh₂ : MonotoneOn f t\nhs : IsGreatest s c\nht : IsLeast t c\nA : ∀ (x : α), x ∈ s ∪ t → x ≤ c → x ∈ s\n⊢ ∀ (x : α), x ∈ s ∪ t → c ≤ x → x ∈ t\n[PROOFSTEP]\nintro x hx hxc\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : Preorder β\na : α\nf : α → β\ns t : Set α\nc : α\nh₁ : MonotoneOn f s\nh₂ : MonotoneOn f t\nhs : IsGreatest s c\nht : IsLeast t c\nA : ∀ (x : α), x ∈ s ∪ t → x ≤ c → x ∈ s\nx : α\nhx : x ∈ s ∪ t\nhxc : c ≤ x\n⊢ x ∈ t\n[PROOFSTEP]\nmatch hx with\n| Or.inr hx => exact hx\n| Or.inl hx =>\n  rcases eq_or_lt_of_le hxc with (rfl | h'x)\n  · exact ht.1\n  exact (lt_irrefl _ (h'x.trans_le (hs.2 hx))).elim\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : Preorder β\na : α\nf : α → β\ns t : Set α\nc : α\nh₁ : MonotoneOn f s\nh₂ : MonotoneOn f t\nhs : IsGreatest s c\nht : IsLeast t c\nA : ∀ (x : α), x ∈ s ∪ t → x ≤ c → x ∈ s\nx : α\nhx✝ : x ∈ s ∪ t\nhxc : c ≤ x\nhx : x ∈ t\n⊢ x ∈ t\n[PROOFSTEP]\nexact hx\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : Preorder β\na : α\nf : α → β\ns t : Set α\nc : α\nh₁ : MonotoneOn f s\nh₂ : MonotoneOn f t\nhs : IsGreatest s c\nht : IsLeast t c\nA : ∀ (x : α), x ∈ s ∪ t → x ≤ c → x ∈ s\nx : α\nhx✝ : x ∈ s ∪ t\nhxc : c ≤ x\nhx : x ∈ s\n⊢ x ∈ t\n[PROOFSTEP]\nrcases eq_or_lt_of_le hxc with (rfl | h'x)\n[GOAL]\ncase inl\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : Preorder β\na : α\nf : α → β\ns t : Set α\nc : α\nh₁ : MonotoneOn f s\nh₂ : MonotoneOn f t\nhs : IsGreatest s c\nht : IsLeast t c\nA : ∀ (x : α), x ∈ s ∪ t → x ≤ c → x ∈ s\nhx✝ : c ∈ s ∪ t\nhxc : c ≤ c\nhx : c ∈ s\n⊢ c ∈ t\n[PROOFSTEP]\nexact ht.1\n[GOAL]\ncase inr\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : Preorder β\na : α\nf : α → β\ns t : Set α\nc : α\nh₁ : MonotoneOn f s\nh₂ : MonotoneOn f t\nhs : IsGreatest s c\nht : IsLeast t c\nA : ∀ (x : α), x ∈ s ∪ t → x ≤ c → x ∈ s\nx : α\nhx✝ : x ∈ s ∪ t\nhxc : c ≤ x\nhx : x ∈ s\nh'x : c < x\n⊢ x ∈ t\n[PROOFSTEP]\nexact (lt_irrefl _ (h'x.trans_le (hs.2 hx))).elim\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : Preorder β\na : α\nf : α → β\ns t : Set α\nc : α\nh₁ : MonotoneOn f s\nh₂ : MonotoneOn f t\nhs : IsGreatest s c\nht : IsLeast t c\nA : ∀ (x : α), x ∈ s ∪ t → x ≤ c → x ∈ s\nB : ∀ (x : α), x ∈ s ∪ t → c ≤ x → x ∈ t\n⊢ MonotoneOn f (s ∪ t)\n[PROOFSTEP]\nintro x hx y hy hxy\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : Preorder β\na : α\nf : α → β\ns t : Set α\nc : α\nh₁ : MonotoneOn f s\nh₂ : MonotoneOn f t\nhs : IsGreatest s c\nht : IsLeast t c\nA : ∀ (x : α), x ∈ s ∪ t → x ≤ c → x ∈ s\nB : ∀ (x : α), x ∈ s ∪ t → c ≤ x → x ∈ t\nx : α\nhx : x ∈ s ∪ t\ny : α\nhy : y ∈ s ∪ t\nhxy : x ≤ y\n⊢ f x ≤ f y\n[PROOFSTEP]\nrcases lt_or_le x c with (hxc | hcx)\n[GOAL]\ncase inl\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : Preorder β\na : α\nf : α → β\ns t : Set α\nc : α\nh₁ : MonotoneOn f s\nh₂ : MonotoneOn f t\nhs : IsGreatest s c\nht : IsLeast t c\nA : ∀ (x : α), x ∈ s ∪ t → x ≤ c → x ∈ s\nB : ∀ (x : α), x ∈ s ∪ t → c ≤ x → x ∈ t\nx : α\nhx : x ∈ s ∪ t\ny : α\nhy : y ∈ s ∪ t\nhxy : x ≤ y\nhxc : x < c\n⊢ f x ≤ f y\n[PROOFSTEP]\nhave xs : x ∈ s := A _ hx hxc.le\n[GOAL]\ncase inl\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : Preorder β\na : α\nf : α → β\ns t : Set α\nc : α\nh₁ : MonotoneOn f s\nh₂ : MonotoneOn f t\nhs : IsGreatest s c\nht : IsLeast t c\nA : ∀ (x : α), x ∈ s ∪ t → x ≤ c → x ∈ s\nB : ∀ (x : α), x ∈ s ∪ t → c ≤ x → x ∈ t\nx : α\nhx : x ∈ s ∪ t\ny : α\nhy : y ∈ s ∪ t\nhxy : x ≤ y\nhxc : x < c\nxs : x ∈ s\n⊢ f x ≤ f y\n[PROOFSTEP]\nrcases lt_or_le y c with (hyc | hcy)\n[GOAL]\ncase inl.inl\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : Preorder β\na : α\nf : α → β\ns t : Set α\nc : α\nh₁ : MonotoneOn f s\nh₂ : MonotoneOn f t\nhs : IsGreatest s c\nht : IsLeast t c\nA : ∀ (x : α), x ∈ s ∪ t → x ≤ c → x ∈ s\nB : ∀ (x : α), x ∈ s ∪ t → c ≤ x → x ∈ t\nx : α\nhx : x ∈ s ∪ t\ny : α\nhy : y ∈ s ∪ t\nhxy : x ≤ y\nhxc : x < c\nxs : x ∈ s\nhyc : y < c\n⊢ f x ≤ f y\n[PROOFSTEP]\nexact h₁ xs (A _ hy hyc.le) hxy\n[GOAL]\ncase inl.inr\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : Preorder β\na : α\nf : α → β\ns t : Set α\nc : α\nh₁ : MonotoneOn f s\nh₂ : MonotoneOn f t\nhs : IsGreatest s c\nht : IsLeast t c\nA : ∀ (x : α), x ∈ s ∪ t → x ≤ c → x ∈ s\nB : ∀ (x : α), x ∈ s ∪ t → c ≤ x → x ∈ t\nx : α\nhx : x ∈ s ∪ t\ny : α\nhy : y ∈ s ∪ t\nhxy : x ≤ y\nhxc : x < c\nxs : x ∈ s\nhcy : c ≤ y\n⊢ f x ≤ f y\n[PROOFSTEP]\nexact (h₁ xs hs.1 hxc.le).trans (h₂ ht.1 (B _ hy hcy) hcy)\n[GOAL]\ncase inr\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : Preorder β\na : α\nf : α → β\ns t : Set α\nc : α\nh₁ : MonotoneOn f s\nh₂ : MonotoneOn f t\nhs : IsGreatest s c\nht : IsLeast t c\nA : ∀ (x : α), x ∈ s ∪ t → x ≤ c → x ∈ s\nB : ∀ (x : α), x ∈ s ∪ t → c ≤ x → x ∈ t\nx : α\nhx : x ∈ s ∪ t\ny : α\nhy : y ∈ s ∪ t\nhxy : x ≤ y\nhcx : c ≤ x\n⊢ f x ≤ f y\n[PROOFSTEP]\nhave xt : x ∈ t := B _ hx hcx\n[GOAL]\ncase inr\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : Preorder β\na : α\nf : α → β\ns t : Set α\nc : α\nh₁ : MonotoneOn f s\nh₂ : MonotoneOn f t\nhs : IsGreatest s c\nht : IsLeast t c\nA : ∀ (x : α), x ∈ s ∪ t → x ≤ c → x ∈ s\nB : ∀ (x : α), x ∈ s ∪ t → c ≤ x → x ∈ t\nx : α\nhx : x ∈ s ∪ t\ny : α\nhy : y ∈ s ∪ t\nhxy : x ≤ y\nhcx : c ≤ x\nxt : x ∈ t\n⊢ f x ≤ f y\n[PROOFSTEP]\nhave yt : y ∈ t := B _ hy (hcx.trans hxy)\n[GOAL]\ncase inr\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : Preorder β\na : α\nf : α → β\ns t : Set α\nc : α\nh₁ : MonotoneOn f s\nh₂ : MonotoneOn f t\nhs : IsGreatest s c\nht : IsLeast t c\nA : ∀ (x : α), x ∈ s ∪ t → x ≤ c → x ∈ s\nB : ∀ (x : α), x ∈ s ∪ t → c ≤ x → x ∈ t\nx : α\nhx : x ∈ s ∪ t\ny : α\nhy : y ∈ s ∪ t\nhxy : x ≤ y\nhcx : c ≤ x\nxt : x ∈ t\nyt : y ∈ t\n⊢ f x ≤ f y\n[PROOFSTEP]\nexact h₂ xt yt hxy\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : Preorder β\na : α\nf : α → β\nh₁ : MonotoneOn f (Iic a)\nh₂ : MonotoneOn f (Ici a)\n⊢ Monotone f\n[PROOFSTEP]\nrw [← monotoneOn_univ, ← @Iic_union_Ici _ _ a]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : Preorder β\na : α\nf : α → β\nh₁ : MonotoneOn f (Iic a)\nh₂ : MonotoneOn f (Ici a)\n⊢ MonotoneOn f (Iic a ∪ Ici a)\n[PROOFSTEP]\nexact MonotoneOn.union_right h₁ h₂ isGreatest_Iic isLeast_Ici\n", "meta": {"mathlib_filename": "Mathlib.Order.Monotone.Union", "llama_tokens": 10126, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7634837635542924, "lm_q2_score": 0.6584175139669998, "lm_q1q2_score": 0.5026910815535859}}
{"text": "[GOAL]\nR : Type u_1\nS : Type u_2\nσ : Type u_3\nx : S\ninst✝¹ : CommSemiring R\ninst✝ : CommSemiring S\nf : R →+* Polynomial S\ng : σ → Polynomial S\np : MvPolynomial σ R\n⊢ Polynomial.eval x (eval₂ f g p) =\n    eval₂ (RingHom.comp (Polynomial.evalRingHom x) f) (fun s => Polynomial.eval x (g s)) p\n[PROOFSTEP]\napply induction_on p\n[GOAL]\ncase h_C\nR : Type u_1\nS : Type u_2\nσ : Type u_3\nx : S\ninst✝¹ : CommSemiring R\ninst✝ : CommSemiring S\nf : R →+* Polynomial S\ng : σ → Polynomial S\np : MvPolynomial σ R\n⊢ ∀ (a : R),\n    Polynomial.eval x (eval₂ f g (↑C a)) =\n      eval₂ (RingHom.comp (Polynomial.evalRingHom x) f) (fun s => Polynomial.eval x (g s)) (↑C a)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h_add\nR : Type u_1\nS : Type u_2\nσ : Type u_3\nx : S\ninst✝¹ : CommSemiring R\ninst✝ : CommSemiring S\nf : R →+* Polynomial S\ng : σ → Polynomial S\np : MvPolynomial σ R\n⊢ ∀ (p q : MvPolynomial σ R),\n    Polynomial.eval x (eval₂ f g p) =\n        eval₂ (RingHom.comp (Polynomial.evalRingHom x) f) (fun s => Polynomial.eval x (g s)) p →\n      Polynomial.eval x (eval₂ f g q) =\n          eval₂ (RingHom.comp (Polynomial.evalRingHom x) f) (fun s => Polynomial.eval x (g s)) q →\n        Polynomial.eval x (eval₂ f g (p + q)) =\n          eval₂ (RingHom.comp (Polynomial.evalRingHom x) f) (fun s => Polynomial.eval x (g s)) (p + q)\n[PROOFSTEP]\nintro p q hp hq\n[GOAL]\ncase h_add\nR : Type u_1\nS : Type u_2\nσ : Type u_3\nx : S\ninst✝¹ : CommSemiring R\ninst✝ : CommSemiring S\nf : R →+* Polynomial S\ng : σ → Polynomial S\np✝ p q : MvPolynomial σ R\nhp :\n  Polynomial.eval x (eval₂ f g p) =\n    eval₂ (RingHom.comp (Polynomial.evalRingHom x) f) (fun s => Polynomial.eval x (g s)) p\nhq :\n  Polynomial.eval x (eval₂ f g q) =\n    eval₂ (RingHom.comp (Polynomial.evalRingHom x) f) (fun s => Polynomial.eval x (g s)) q\n⊢ Polynomial.eval x (eval₂ f g (p + q)) =\n    eval₂ (RingHom.comp (Polynomial.evalRingHom x) f) (fun s => Polynomial.eval x (g s)) (p + q)\n[PROOFSTEP]\nsimp [hp, hq]\n[GOAL]\ncase h_X\nR : Type u_1\nS : Type u_2\nσ : Type u_3\nx : S\ninst✝¹ : CommSemiring R\ninst✝ : CommSemiring S\nf : R →+* Polynomial S\ng : σ → Polynomial S\np : MvPolynomial σ R\n⊢ ∀ (p : MvPolynomial σ R) (n : σ),\n    Polynomial.eval x (eval₂ f g p) =\n        eval₂ (RingHom.comp (Polynomial.evalRingHom x) f) (fun s => Polynomial.eval x (g s)) p →\n      Polynomial.eval x (eval₂ f g (p * X n)) =\n        eval₂ (RingHom.comp (Polynomial.evalRingHom x) f) (fun s => Polynomial.eval x (g s)) (p * X n)\n[PROOFSTEP]\nintro p n hp\n[GOAL]\ncase h_X\nR : Type u_1\nS : Type u_2\nσ : Type u_3\nx : S\ninst✝¹ : CommSemiring R\ninst✝ : CommSemiring S\nf : R →+* Polynomial S\ng : σ → Polynomial S\np✝ p : MvPolynomial σ R\nn : σ\nhp :\n  Polynomial.eval x (eval₂ f g p) =\n    eval₂ (RingHom.comp (Polynomial.evalRingHom x) f) (fun s => Polynomial.eval x (g s)) p\n⊢ Polynomial.eval x (eval₂ f g (p * X n)) =\n    eval₂ (RingHom.comp (Polynomial.evalRingHom x) f) (fun s => Polynomial.eval x (g s)) (p * X n)\n[PROOFSTEP]\nsimp [hp]\n[GOAL]\nR : Type u_1\nn : ℕ\nx : Fin n → R\ninst✝ : CommSemiring R\nf : MvPolynomial (Fin (n + 1)) R\nq : MvPolynomial (Fin n) R\n⊢ ↑(eval x) (Polynomial.eval q (↑(finSuccEquiv R n) f)) = ↑(eval fun i => Fin.cases (↑(eval x) q) x i) f\n[PROOFSTEP]\nsimp only [finSuccEquiv_apply, coe_eval₂Hom, polynomial_eval_eval₂, eval_eval₂]\n[GOAL]\nR : Type u_1\nn : ℕ\nx : Fin n → R\ninst✝ : CommSemiring R\nf : MvPolynomial (Fin (n + 1)) R\nq : MvPolynomial (Fin n) R\n⊢ eval₂ (RingHom.comp (eval x) (RingHom.comp (Polynomial.evalRingHom q) (RingHom.comp Polynomial.C C)))\n      (fun s => ↑(eval x) (Polynomial.eval q (Fin.cases Polynomial.X (fun k => ↑Polynomial.C (X k)) s))) f =\n    ↑(eval fun i => Fin.cases (↑(eval x) q) x i) f\n[PROOFSTEP]\nconv in RingHom.comp _ _ => {\n  refine @RingHom.ext _ _ _ _ _ (RingHom.id _) fun r => ?_\n  simp}\n[GOAL]\nR : Type u_1\nn : ℕ\nx : Fin n → R\ninst✝ : CommSemiring R\nf : MvPolynomial (Fin (n + 1)) R\nq : MvPolynomial (Fin n) R\n| RingHom.comp (eval x) (RingHom.comp (Polynomial.evalRingHom q) (RingHom.comp Polynomial.C C))\n[PROOFSTEP]\n{ refine @RingHom.ext _ _ _ _ _ (RingHom.id _) fun r => ?_\n  simp}\n[GOAL]\nR : Type u_1\nn : ℕ\nx : Fin n → R\ninst✝ : CommSemiring R\nf : MvPolynomial (Fin (n + 1)) R\nq : MvPolynomial (Fin n) R\n| RingHom.comp (eval x) (RingHom.comp (Polynomial.evalRingHom q) (RingHom.comp Polynomial.C C))\n[PROOFSTEP]\n{ refine @RingHom.ext _ _ _ _ _ (RingHom.id _) fun r => ?_\n  simp}\n[GOAL]\nR : Type u_1\nn : ℕ\nx : Fin n → R\ninst✝ : CommSemiring R\nf : MvPolynomial (Fin (n + 1)) R\nq : MvPolynomial (Fin n) R\n| RingHom.comp (eval x) (RingHom.comp (Polynomial.evalRingHom q) (RingHom.comp Polynomial.C C))\n[PROOFSTEP]\nrefine @RingHom.ext _ _ _ _ _ (RingHom.id _) fun r => ?_\n[GOAL]\nR : Type u_1\nn : ℕ\nx : Fin n → R\ninst✝ : CommSemiring R\nf : MvPolynomial (Fin (n + 1)) R\nq : MvPolynomial (Fin n) R\nr : R\n⊢ ↑(RingHom.comp (eval x) (RingHom.comp (Polynomial.evalRingHom q) (RingHom.comp Polynomial.C C))) r = ↑(RingHom.id R) r\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\nn : ℕ\nx : Fin n → R\ninst✝ : CommSemiring R\nf : MvPolynomial (Fin (n + 1)) R\nq : MvPolynomial (Fin n) R\n⊢ eval₂ (RingHom.id R)\n      (fun s => ↑(eval x) (Polynomial.eval q (Fin.cases Polynomial.X (fun k => ↑Polynomial.C (X k)) s))) f =\n    ↑(eval fun i => Fin.cases (↑(eval x) q) x i) f\n[PROOFSTEP]\nsimp only [eval₂_id]\n[GOAL]\nR : Type u_1\nn : ℕ\nx : Fin n → R\ninst✝ : CommSemiring R\nf : MvPolynomial (Fin (n + 1)) R\nq : MvPolynomial (Fin n) R\n⊢ ↑(eval fun s => ↑(eval x) (Polynomial.eval q (Fin.cases Polynomial.X (fun k => ↑Polynomial.C (X k)) s))) f =\n    ↑(eval fun i => Fin.cases (↑(eval x) q) x i) f\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_a.e_f\nR : Type u_1\nn : ℕ\nx : Fin n → R\ninst✝ : CommSemiring R\nf : MvPolynomial (Fin (n + 1)) R\nq : MvPolynomial (Fin n) R\n⊢ (fun s => ↑(eval x) (Polynomial.eval q (Fin.cases Polynomial.X (fun k => ↑Polynomial.C (X k)) s))) = fun i =>\n    Fin.cases (↑(eval x) q) x i\n[PROOFSTEP]\nfunext i\n[GOAL]\ncase e_a.e_f.h\nR : Type u_1\nn : ℕ\nx : Fin n → R\ninst✝ : CommSemiring R\nf : MvPolynomial (Fin (n + 1)) R\nq : MvPolynomial (Fin n) R\ni : Fin (n + 1)\n⊢ ↑(eval x) (Polynomial.eval q (Fin.cases Polynomial.X (fun k => ↑Polynomial.C (X k)) i)) = Fin.cases (↑(eval x) q) x i\n[PROOFSTEP]\nrefine Fin.cases (by simp) (by simp) i\n[GOAL]\nR : Type u_1\nn : ℕ\nx : Fin n → R\ninst✝ : CommSemiring R\nf : MvPolynomial (Fin (n + 1)) R\nq : MvPolynomial (Fin n) R\ni : Fin (n + 1)\n⊢ ↑(eval x) (Polynomial.eval q (Fin.cases Polynomial.X (fun k => ↑Polynomial.C (X k)) 0)) = Fin.cases (↑(eval x) q) x 0\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\nn : ℕ\nx : Fin n → R\ninst✝ : CommSemiring R\nf : MvPolynomial (Fin (n + 1)) R\nq : MvPolynomial (Fin n) R\ni : Fin (n + 1)\n⊢ ∀ (i : Fin n),\n    ↑(eval x) (Polynomial.eval q (Fin.cases Polynomial.X (fun k => ↑Polynomial.C (X k)) (Fin.succ i))) =\n      Fin.cases (↑(eval x) q) x (Fin.succ i)\n[PROOFSTEP]\nsimp\n", "meta": {"mathlib_filename": "Mathlib.Data.MvPolynomial.Polynomial", "llama_tokens": 3104, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7981867777396211, "lm_q2_score": 0.6297746213017459, "lm_q1q2_score": 0.5026777756790307}}
{"text": "[GOAL]\nk : Type u_1\nV₁ : Type u_2\nP₁ : Type u_3\nV₂ : Type u_4\nP₂ : Type u_5\ninst✝⁶ : Ring k\ninst✝⁵ : AddCommGroup V₁\ninst✝⁴ : AddCommGroup V₂\ninst✝³ : Module k V₁\ninst✝² : Module k V₂\ninst✝¹ : AddTorsor V₁ P₁\ninst✝ : AddTorsor V₂ P₂\nE : AffineSubspace k P₁\nEne : Nonempty { x // x ∈ E }\nφ : P₁ →ᵃ[k] P₂\n⊢ Nonempty { x // x ∈ map φ E }\n[PROOFSTEP]\nobtain ⟨x, hx⟩ := id Ene\n[GOAL]\ncase intro.mk\nk : Type u_1\nV₁ : Type u_2\nP₁ : Type u_3\nV₂ : Type u_4\nP₂ : Type u_5\ninst✝⁶ : Ring k\ninst✝⁵ : AddCommGroup V₁\ninst✝⁴ : AddCommGroup V₂\ninst✝³ : Module k V₁\ninst✝² : Module k V₂\ninst✝¹ : AddTorsor V₁ P₁\ninst✝ : AddTorsor V₂ P₂\nE : AffineSubspace k P₁\nEne : Nonempty { x // x ∈ E }\nφ : P₁ →ᵃ[k] P₂\nx : P₁\nhx : x ∈ E\n⊢ Nonempty { x // x ∈ map φ E }\n[PROOFSTEP]\nrefine' ⟨⟨φ x, AffineSubspace.mem_map.mpr ⟨x, hx, rfl⟩⟩⟩\n[GOAL]\nk : Type u_1\nV₁ : Type u_2\nP₁ : Type u_3\nV₂ : Type u_4\nP₂ : Type u_5\ninst✝⁸ : Ring k\ninst✝⁷ : AddCommGroup V₁\ninst✝⁶ : AddCommGroup V₂\ninst✝⁵ : Module k V₁\ninst✝⁴ : Module k V₂\ninst✝³ : AddTorsor V₁ P₁\ninst✝² : AddTorsor V₂ P₂\nφ : P₁ →ᵃ[k] P₂\nE : AffineSubspace k P₁\nF : AffineSubspace k P₂\ninst✝¹ : Nonempty { x // x ∈ E }\ninst✝ : Nonempty { x // x ∈ F }\nhEF : AffineSubspace.map φ E ≤ F\n⊢ { x // x ∈ E } →ᵃ[k] { x // x ∈ F }\n[PROOFSTEP]\nrefine' ⟨_, _, _⟩\n[GOAL]\ncase refine'_1\nk : Type u_1\nV₁ : Type u_2\nP₁ : Type u_3\nV₂ : Type u_4\nP₂ : Type u_5\ninst✝⁸ : Ring k\ninst✝⁷ : AddCommGroup V₁\ninst✝⁶ : AddCommGroup V₂\ninst✝⁵ : Module k V₁\ninst✝⁴ : Module k V₂\ninst✝³ : AddTorsor V₁ P₁\ninst✝² : AddTorsor V₂ P₂\nφ : P₁ →ᵃ[k] P₂\nE : AffineSubspace k P₁\nF : AffineSubspace k P₂\ninst✝¹ : Nonempty { x // x ∈ E }\ninst✝ : Nonempty { x // x ∈ F }\nhEF : AffineSubspace.map φ E ≤ F\n⊢ { x // x ∈ E } → { x // x ∈ F }\n[PROOFSTEP]\nexact fun x => ⟨φ x, hEF <| AffineSubspace.mem_map.mpr ⟨x, x.property, rfl⟩⟩\n[GOAL]\ncase refine'_2\nk : Type u_1\nV₁ : Type u_2\nP₁ : Type u_3\nV₂ : Type u_4\nP₂ : Type u_5\ninst✝⁸ : Ring k\ninst✝⁷ : AddCommGroup V₁\ninst✝⁶ : AddCommGroup V₂\ninst✝⁵ : Module k V₁\ninst✝⁴ : Module k V₂\ninst✝³ : AddTorsor V₁ P₁\ninst✝² : AddTorsor V₂ P₂\nφ : P₁ →ᵃ[k] P₂\nE : AffineSubspace k P₁\nF : AffineSubspace k P₂\ninst✝¹ : Nonempty { x // x ∈ E }\ninst✝ : Nonempty { x // x ∈ F }\nhEF : AffineSubspace.map φ E ≤ F\n⊢ { x // x ∈ AffineSubspace.direction E } →ₗ[k] { x // x ∈ AffineSubspace.direction F }\n[PROOFSTEP]\nrefine' φ.linear.restrict (_ : E.direction ≤ F.direction.comap φ.linear)\n[GOAL]\ncase refine'_2\nk : Type u_1\nV₁ : Type u_2\nP₁ : Type u_3\nV₂ : Type u_4\nP₂ : Type u_5\ninst✝⁸ : Ring k\ninst✝⁷ : AddCommGroup V₁\ninst✝⁶ : AddCommGroup V₂\ninst✝⁵ : Module k V₁\ninst✝⁴ : Module k V₂\ninst✝³ : AddTorsor V₁ P₁\ninst✝² : AddTorsor V₂ P₂\nφ : P₁ →ᵃ[k] P₂\nE : AffineSubspace k P₁\nF : AffineSubspace k P₂\ninst✝¹ : Nonempty { x // x ∈ E }\ninst✝ : Nonempty { x // x ∈ F }\nhEF : AffineSubspace.map φ E ≤ F\n⊢ AffineSubspace.direction E ≤ Submodule.comap φ.linear (AffineSubspace.direction F)\n[PROOFSTEP]\nrw [← Submodule.map_le_iff_le_comap, ← AffineSubspace.map_direction]\n[GOAL]\ncase refine'_2\nk : Type u_1\nV₁ : Type u_2\nP₁ : Type u_3\nV₂ : Type u_4\nP₂ : Type u_5\ninst✝⁸ : Ring k\ninst✝⁷ : AddCommGroup V₁\ninst✝⁶ : AddCommGroup V₂\ninst✝⁵ : Module k V₁\ninst✝⁴ : Module k V₂\ninst✝³ : AddTorsor V₁ P₁\ninst✝² : AddTorsor V₂ P₂\nφ : P₁ →ᵃ[k] P₂\nE : AffineSubspace k P₁\nF : AffineSubspace k P₂\ninst✝¹ : Nonempty { x // x ∈ E }\ninst✝ : Nonempty { x // x ∈ F }\nhEF : AffineSubspace.map φ E ≤ F\n⊢ AffineSubspace.direction (AffineSubspace.map φ E) ≤ AffineSubspace.direction F\n[PROOFSTEP]\nexact AffineSubspace.direction_le hEF\n[GOAL]\ncase refine'_3\nk : Type u_1\nV₁ : Type u_2\nP₁ : Type u_3\nV₂ : Type u_4\nP₂ : Type u_5\ninst✝⁸ : Ring k\ninst✝⁷ : AddCommGroup V₁\ninst✝⁶ : AddCommGroup V₂\ninst✝⁵ : Module k V₁\ninst✝⁴ : Module k V₂\ninst✝³ : AddTorsor V₁ P₁\ninst✝² : AddTorsor V₂ P₂\nφ : P₁ →ᵃ[k] P₂\nE : AffineSubspace k P₁\nF : AffineSubspace k P₂\ninst✝¹ : Nonempty { x // x ∈ E }\ninst✝ : Nonempty { x // x ∈ F }\nhEF : AffineSubspace.map φ E ≤ F\n⊢ ∀ (p : { x // x ∈ E }) (v : { x // x ∈ AffineSubspace.direction E }),\n    { val := ↑φ ↑(v +ᵥ p), property := (_ : ↑φ ↑(v +ᵥ p) ∈ ↑F) } =\n      ↑(LinearMap.restrict φ.linear\n              (_ : AffineSubspace.direction E ≤ Submodule.comap φ.linear (AffineSubspace.direction F)))\n          v +ᵥ\n        { val := ↑φ ↑p, property := (_ : ↑φ ↑p ∈ ↑F) }\n[PROOFSTEP]\nintro p v\n[GOAL]\ncase refine'_3\nk : Type u_1\nV₁ : Type u_2\nP₁ : Type u_3\nV₂ : Type u_4\nP₂ : Type u_5\ninst✝⁸ : Ring k\ninst✝⁷ : AddCommGroup V₁\ninst✝⁶ : AddCommGroup V₂\ninst✝⁵ : Module k V₁\ninst✝⁴ : Module k V₂\ninst✝³ : AddTorsor V₁ P₁\ninst✝² : AddTorsor V₂ P₂\nφ : P₁ →ᵃ[k] P₂\nE : AffineSubspace k P₁\nF : AffineSubspace k P₂\ninst✝¹ : Nonempty { x // x ∈ E }\ninst✝ : Nonempty { x // x ∈ F }\nhEF : AffineSubspace.map φ E ≤ F\np : { x // x ∈ E }\nv : { x // x ∈ AffineSubspace.direction E }\n⊢ { val := ↑φ ↑(v +ᵥ p), property := (_ : ↑φ ↑(v +ᵥ p) ∈ ↑F) } =\n    ↑(LinearMap.restrict φ.linear\n            (_ : AffineSubspace.direction E ≤ Submodule.comap φ.linear (AffineSubspace.direction F)))\n        v +ᵥ\n      { val := ↑φ ↑p, property := (_ : ↑φ ↑p ∈ ↑F) }\n[PROOFSTEP]\nsimp only [Subtype.ext_iff, Subtype.coe_mk, AffineSubspace.coe_vadd]\n[GOAL]\ncase refine'_3\nk : Type u_1\nV₁ : Type u_2\nP₁ : Type u_3\nV₂ : Type u_4\nP₂ : Type u_5\ninst✝⁸ : Ring k\ninst✝⁷ : AddCommGroup V₁\ninst✝⁶ : AddCommGroup V₂\ninst✝⁵ : Module k V₁\ninst✝⁴ : Module k V₂\ninst✝³ : AddTorsor V₁ P₁\ninst✝² : AddTorsor V₂ P₂\nφ : P₁ →ᵃ[k] P₂\nE : AffineSubspace k P₁\nF : AffineSubspace k P₂\ninst✝¹ : Nonempty { x // x ∈ E }\ninst✝ : Nonempty { x // x ∈ F }\nhEF : AffineSubspace.map φ E ≤ F\np : { x // x ∈ E }\nv : { x // x ∈ AffineSubspace.direction E }\n⊢ ↑φ (↑v +ᵥ ↑p) =\n    ↑(↑(LinearMap.restrict φ.linear\n              (_ : AffineSubspace.direction E ≤ Submodule.comap φ.linear (AffineSubspace.direction F)))\n          v) +ᵥ\n      ↑φ ↑p\n[PROOFSTEP]\napply AffineMap.map_vadd\n[GOAL]\nk : Type u_1\nV₁ : Type u_2\nP₁ : Type u_3\nV₂ : Type u_4\nP₂ : Type u_5\ninst✝⁶ : Ring k\ninst✝⁵ : AddCommGroup V₁\ninst✝⁴ : AddCommGroup V₂\ninst✝³ : Module k V₁\ninst✝² : Module k V₂\ninst✝¹ : AddTorsor V₁ P₁\ninst✝ : AddTorsor V₂ P₂\nφ : P₁ →ᵃ[k] P₂\nE : AffineSubspace k P₁\nF : AffineSubspace k P₂\nhEF : AffineSubspace.map φ E ≤ F\n⊢ AffineSubspace.direction E ≤ Submodule.comap φ.linear (AffineSubspace.direction F)\n[PROOFSTEP]\nrw [← Submodule.map_le_iff_le_comap, ← AffineSubspace.map_direction]\n[GOAL]\nk : Type u_1\nV₁ : Type u_2\nP₁ : Type u_3\nV₂ : Type u_4\nP₂ : Type u_5\ninst✝⁶ : Ring k\ninst✝⁵ : AddCommGroup V₁\ninst✝⁴ : AddCommGroup V₂\ninst✝³ : Module k V₁\ninst✝² : Module k V₂\ninst✝¹ : AddTorsor V₁ P₁\ninst✝ : AddTorsor V₂ P₂\nφ : P₁ →ᵃ[k] P₂\nE : AffineSubspace k P₁\nF : AffineSubspace k P₂\nhEF : AffineSubspace.map φ E ≤ F\n⊢ AffineSubspace.direction (AffineSubspace.map φ E) ≤ AffineSubspace.direction F\n[PROOFSTEP]\nexact AffineSubspace.direction_le hEF\n[GOAL]\nk : Type u_1\nV₁ : Type u_2\nP₁ : Type u_3\nV₂ : Type u_4\nP₂ : Type u_5\ninst✝⁸ : Ring k\ninst✝⁷ : AddCommGroup V₁\ninst✝⁶ : AddCommGroup V₂\ninst✝⁵ : Module k V₁\ninst✝⁴ : Module k V₂\ninst✝³ : AddTorsor V₁ P₁\ninst✝² : AddTorsor V₂ P₂\nφ : P₁ →ᵃ[k] P₂\nhφ : Function.Injective ↑φ\nE : AffineSubspace k P₁\nF : AffineSubspace k P₂\ninst✝¹ : Nonempty { x // x ∈ E }\ninst✝ : Nonempty { x // x ∈ F }\nhEF : AffineSubspace.map φ E ≤ F\n⊢ Function.Injective ↑(restrict φ hEF)\n[PROOFSTEP]\nintro x y h\n[GOAL]\nk : Type u_1\nV₁ : Type u_2\nP₁ : Type u_3\nV₂ : Type u_4\nP₂ : Type u_5\ninst✝⁸ : Ring k\ninst✝⁷ : AddCommGroup V₁\ninst✝⁶ : AddCommGroup V₂\ninst✝⁵ : Module k V₁\ninst✝⁴ : Module k V₂\ninst✝³ : AddTorsor V₁ P₁\ninst✝² : AddTorsor V₂ P₂\nφ : P₁ →ᵃ[k] P₂\nhφ : Function.Injective ↑φ\nE : AffineSubspace k P₁\nF : AffineSubspace k P₂\ninst✝¹ : Nonempty { x // x ∈ E }\ninst✝ : Nonempty { x // x ∈ F }\nhEF : AffineSubspace.map φ E ≤ F\nx y : { x // x ∈ E }\nh : ↑(restrict φ hEF) x = ↑(restrict φ hEF) y\n⊢ x = y\n[PROOFSTEP]\nsimp only [Subtype.ext_iff, Subtype.coe_mk, AffineMap.restrict.coe_apply] at h ⊢\n[GOAL]\nk : Type u_1\nV₁ : Type u_2\nP₁ : Type u_3\nV₂ : Type u_4\nP₂ : Type u_5\ninst✝⁸ : Ring k\ninst✝⁷ : AddCommGroup V₁\ninst✝⁶ : AddCommGroup V₂\ninst✝⁵ : Module k V₁\ninst✝⁴ : Module k V₂\ninst✝³ : AddTorsor V₁ P₁\ninst✝² : AddTorsor V₂ P₂\nφ : P₁ →ᵃ[k] P₂\nhφ : Function.Injective ↑φ\nE : AffineSubspace k P₁\nF : AffineSubspace k P₂\ninst✝¹ : Nonempty { x // x ∈ E }\ninst✝ : Nonempty { x // x ∈ F }\nhEF : AffineSubspace.map φ E ≤ F\nx y : { x // x ∈ E }\nh : ↑φ ↑x = ↑φ ↑y\n⊢ ↑x = ↑y\n[PROOFSTEP]\nexact hφ h\n[GOAL]\nk : Type u_1\nV₁ : Type u_2\nP₁ : Type u_3\nV₂ : Type u_4\nP₂ : Type u_5\ninst✝⁸ : Ring k\ninst✝⁷ : AddCommGroup V₁\ninst✝⁶ : AddCommGroup V₂\ninst✝⁵ : Module k V₁\ninst✝⁴ : Module k V₂\ninst✝³ : AddTorsor V₁ P₁\ninst✝² : AddTorsor V₂ P₂\nφ : P₁ →ᵃ[k] P₂\nE : AffineSubspace k P₁\nF : AffineSubspace k P₂\ninst✝¹ : Nonempty { x // x ∈ E }\ninst✝ : Nonempty { x // x ∈ F }\nh : AffineSubspace.map φ E = F\n⊢ Function.Surjective ↑(restrict φ (_ : AffineSubspace.map φ E ≤ F))\n[PROOFSTEP]\nrintro ⟨x, hx : x ∈ F⟩\n[GOAL]\ncase mk\nk : Type u_1\nV₁ : Type u_2\nP₁ : Type u_3\nV₂ : Type u_4\nP₂ : Type u_5\ninst✝⁸ : Ring k\ninst✝⁷ : AddCommGroup V₁\ninst✝⁶ : AddCommGroup V₂\ninst✝⁵ : Module k V₁\ninst✝⁴ : Module k V₂\ninst✝³ : AddTorsor V₁ P₁\ninst✝² : AddTorsor V₂ P₂\nφ : P₁ →ᵃ[k] P₂\nE : AffineSubspace k P₁\nF : AffineSubspace k P₂\ninst✝¹ : Nonempty { x // x ∈ E }\ninst✝ : Nonempty { x // x ∈ F }\nh : AffineSubspace.map φ E = F\nx : P₂\nhx : x ∈ F\n⊢ ∃ a, ↑(restrict φ (_ : AffineSubspace.map φ E ≤ F)) a = { val := x, property := hx }\n[PROOFSTEP]\nrw [← h, AffineSubspace.mem_map] at hx \n[GOAL]\ncase mk\nk : Type u_1\nV₁ : Type u_2\nP₁ : Type u_3\nV₂ : Type u_4\nP₂ : Type u_5\ninst✝⁸ : Ring k\ninst✝⁷ : AddCommGroup V₁\ninst✝⁶ : AddCommGroup V₂\ninst✝⁵ : Module k V₁\ninst✝⁴ : Module k V₂\ninst✝³ : AddTorsor V₁ P₁\ninst✝² : AddTorsor V₂ P₂\nφ : P₁ →ᵃ[k] P₂\nE : AffineSubspace k P₁\nF : AffineSubspace k P₂\ninst✝¹ : Nonempty { x // x ∈ E }\ninst✝ : Nonempty { x // x ∈ F }\nh : AffineSubspace.map φ E = F\nx : P₂\nhx✝ : x ∈ F\nhx : ∃ y, y ∈ E ∧ ↑φ y = x\n⊢ ∃ a, ↑(restrict φ (_ : AffineSubspace.map φ E ≤ F)) a = { val := x, property := hx✝ }\n[PROOFSTEP]\nobtain ⟨y, hy, rfl⟩ := hx\n[GOAL]\ncase mk.intro.intro\nk : Type u_1\nV₁ : Type u_2\nP₁ : Type u_3\nV₂ : Type u_4\nP₂ : Type u_5\ninst✝⁸ : Ring k\ninst✝⁷ : AddCommGroup V₁\ninst✝⁶ : AddCommGroup V₂\ninst✝⁵ : Module k V₁\ninst✝⁴ : Module k V₂\ninst✝³ : AddTorsor V₁ P₁\ninst✝² : AddTorsor V₂ P₂\nφ : P₁ →ᵃ[k] P₂\nE : AffineSubspace k P₁\nF : AffineSubspace k P₂\ninst✝¹ : Nonempty { x // x ∈ E }\ninst✝ : Nonempty { x // x ∈ F }\nh : AffineSubspace.map φ E = F\ny : P₁\nhy : y ∈ E\nhx : ↑φ y ∈ F\n⊢ ∃ a, ↑(restrict φ (_ : AffineSubspace.map φ E ≤ F)) a = { val := ↑φ y, property := hx }\n[PROOFSTEP]\nexact ⟨⟨y, hy⟩, rfl⟩\n", "meta": {"mathlib_filename": "Mathlib.LinearAlgebra.AffineSpace.Restrict", "llama_tokens": 5418, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8221891305219504, "lm_q2_score": 0.611381973294151, "lm_q1q2_score": 0.5026716130395124}}
{"text": "[GOAL]\nb : Bool\nh : Decidable (b = true)\n⊢ decide (b = true) = b\n[PROOFSTEP]\ncases b\n[GOAL]\ncase false\nh : Decidable (false = true)\n⊢ decide (false = true) = false\n[PROOFSTEP]\nexact decide_eq_false $ λ j => by cases j\n[GOAL]\nh : Decidable (false = true)\nj : false = true\n⊢ False\n[PROOFSTEP]\ncases j\n[GOAL]\ncase true\nh : Decidable (true = true)\n⊢ decide (true = true) = true\n[PROOFSTEP]\nexact decide_eq_true $ rfl\n[GOAL]\np : Prop\ninst✝ : Decidable p\n⊢ (decide ¬p) = !decide p\n[PROOFSTEP]\nby_cases p\n[GOAL]\np : Prop\ninst✝ : Decidable p\n⊢ (decide ¬p) = !decide p\n[PROOFSTEP]\nby_cases p\n[GOAL]\ncase pos\np : Prop\ninst✝ : Decidable p\nh : p\n⊢ (decide ¬p) = !decide p\n[PROOFSTEP]\nsimp [*]\n[GOAL]\ncase neg\np : Prop\ninst✝ : Decidable p\nh : ¬p\n⊢ (decide ¬p) = !decide p\n[PROOFSTEP]\nsimp [*]\n[GOAL]\np q : Prop\ninst✝¹ : Decidable p\ninst✝ : Decidable q\n⊢ decide (p ∧ q) = (decide p && decide q)\n[PROOFSTEP]\nby_cases p\n[GOAL]\np q : Prop\ninst✝¹ : Decidable p\ninst✝ : Decidable q\n⊢ decide (p ∧ q) = (decide p && decide q)\n[PROOFSTEP]\nby_cases p\n[GOAL]\ncase pos\np q : Prop\ninst✝¹ : Decidable p\ninst✝ : Decidable q\nh : p\n⊢ decide (p ∧ q) = (decide p && decide q)\n[PROOFSTEP]\nby_cases q\n[GOAL]\ncase pos\np q : Prop\ninst✝¹ : Decidable p\ninst✝ : Decidable q\nh : p\n⊢ decide (p ∧ q) = (decide p && decide q)\n[PROOFSTEP]\nby_cases q\n[GOAL]\ncase neg\np q : Prop\ninst✝¹ : Decidable p\ninst✝ : Decidable q\nh : ¬p\n⊢ decide (p ∧ q) = (decide p && decide q)\n[PROOFSTEP]\nby_cases q\n[GOAL]\ncase neg\np q : Prop\ninst✝¹ : Decidable p\ninst✝ : Decidable q\nh : ¬p\n⊢ decide (p ∧ q) = (decide p && decide q)\n[PROOFSTEP]\nby_cases q\n[GOAL]\ncase pos\np q : Prop\ninst✝¹ : Decidable p\ninst✝ : Decidable q\nh✝ : p\nh : q\n⊢ decide (p ∧ q) = (decide p && decide q)\n[PROOFSTEP]\nsimp [*]\n[GOAL]\ncase neg\np q : Prop\ninst✝¹ : Decidable p\ninst✝ : Decidable q\nh✝ : p\nh : ¬q\n⊢ decide (p ∧ q) = (decide p && decide q)\n[PROOFSTEP]\nsimp [*]\n[GOAL]\ncase pos\np q : Prop\ninst✝¹ : Decidable p\ninst✝ : Decidable q\nh✝ : ¬p\nh : q\n⊢ decide (p ∧ q) = (decide p && decide q)\n[PROOFSTEP]\nsimp [*]\n[GOAL]\ncase neg\np q : Prop\ninst✝¹ : Decidable p\ninst✝ : Decidable q\nh✝ : ¬p\nh : ¬q\n⊢ decide (p ∧ q) = (decide p && decide q)\n[PROOFSTEP]\nsimp [*]\n[GOAL]\np q : Prop\ninst✝¹ : Decidable p\ninst✝ : Decidable q\n⊢ decide (p ∨ q) = (decide p || decide q)\n[PROOFSTEP]\nby_cases p\n[GOAL]\np q : Prop\ninst✝¹ : Decidable p\ninst✝ : Decidable q\n⊢ decide (p ∨ q) = (decide p || decide q)\n[PROOFSTEP]\nby_cases p\n[GOAL]\ncase pos\np q : Prop\ninst✝¹ : Decidable p\ninst✝ : Decidable q\nh : p\n⊢ decide (p ∨ q) = (decide p || decide q)\n[PROOFSTEP]\nby_cases q\n[GOAL]\ncase pos\np q : Prop\ninst✝¹ : Decidable p\ninst✝ : Decidable q\nh : p\n⊢ decide (p ∨ q) = (decide p || decide q)\n[PROOFSTEP]\nby_cases q\n[GOAL]\ncase neg\np q : Prop\ninst✝¹ : Decidable p\ninst✝ : Decidable q\nh : ¬p\n⊢ decide (p ∨ q) = (decide p || decide q)\n[PROOFSTEP]\nby_cases q\n[GOAL]\ncase neg\np q : Prop\ninst✝¹ : Decidable p\ninst✝ : Decidable q\nh : ¬p\n⊢ decide (p ∨ q) = (decide p || decide q)\n[PROOFSTEP]\nby_cases q\n[GOAL]\ncase pos\np q : Prop\ninst✝¹ : Decidable p\ninst✝ : Decidable q\nh✝ : p\nh : q\n⊢ decide (p ∨ q) = (decide p || decide q)\n[PROOFSTEP]\nsimp [*]\n[GOAL]\ncase neg\np q : Prop\ninst✝¹ : Decidable p\ninst✝ : Decidable q\nh✝ : p\nh : ¬q\n⊢ decide (p ∨ q) = (decide p || decide q)\n[PROOFSTEP]\nsimp [*]\n[GOAL]\ncase pos\np q : Prop\ninst✝¹ : Decidable p\ninst✝ : Decidable q\nh✝ : ¬p\nh : q\n⊢ decide (p ∨ q) = (decide p || decide q)\n[PROOFSTEP]\nsimp [*]\n[GOAL]\ncase neg\np q : Prop\ninst✝¹ : Decidable p\ninst✝ : Decidable q\nh✝ : ¬p\nh : ¬q\n⊢ decide (p ∨ q) = (decide p || decide q)\n[PROOFSTEP]\nsimp [*]\n[GOAL]\na b : Bool\n⊢ a = b ↔ (a = true ↔ b = true)\n[PROOFSTEP]\ncases a\n[GOAL]\ncase false\nb : Bool\n⊢ false = b ↔ (false = true ↔ b = true)\n[PROOFSTEP]\ncases b\n[GOAL]\ncase true\nb : Bool\n⊢ true = b ↔ (true = true ↔ b = true)\n[PROOFSTEP]\ncases b\n[GOAL]\ncase false.false\n⊢ false = false ↔ (false = true ↔ false = true)\n[PROOFSTEP]\nsimp\n  -- Porting note: new theorem\n[GOAL]\ncase false.true\n⊢ false = true ↔ (false = true ↔ true = true)\n[PROOFSTEP]\nsimp\n  -- Porting note: new theorem\n[GOAL]\ncase true.false\n⊢ true = false ↔ (true = true ↔ false = true)\n[PROOFSTEP]\nsimp\n  -- Porting note: new theorem\n[GOAL]\ncase true.true\n⊢ true = true ↔ (true = true ↔ true = true)\n[PROOFSTEP]\nsimp\n  -- Porting note: new theorem\n[GOAL]\nα : Type u_1\ninst✝¹ : BEq α\ninst✝ : LawfulBEq α\na b : α\n⊢ (a == b) = true ↔ (b == a) = true\n[PROOFSTEP]\nsimp [@eq_comm α]\n[GOAL]\nb : Bool\n⊢ b = false ∨ b = true\n[PROOFSTEP]\ncases b\n[GOAL]\ncase false\n⊢ false = false ∨ false = true\n[PROOFSTEP]\nsimp\n[GOAL]\ncase true\n⊢ true = false ∨ true = true\n[PROOFSTEP]\nsimp\n[GOAL]\np : Bool → Prop\nh : ∀ (b : Bool), p b\n⊢ p false ∧ p true\n[PROOFSTEP]\nsimp [h]\n[GOAL]\np : Bool → Prop\nx✝ : p false ∧ p true\nb : Bool\nh₁ : p false\nh₂ : p true\n⊢ p b\n[PROOFSTEP]\ncases b\n[GOAL]\ncase false\np : Bool → Prop\nx✝ : p false ∧ p true\nh₁ : p false\nh₂ : p true\n⊢ p false\n[PROOFSTEP]\nassumption\n[GOAL]\ncase true\np : Bool → Prop\nx✝ : p false ∧ p true\nh₁ : p false\nh₂ : p true\n⊢ p true\n[PROOFSTEP]\nassumption\n[GOAL]\np : Bool → Prop\nx✝ : ∃ b, p b\nb : Bool\nh : p b\n⊢ p false ∨ p true\n[PROOFSTEP]\ncases b\n[GOAL]\ncase false\np : Bool → Prop\nx✝ : ∃ b, p b\nh : p false\n⊢ p false ∨ p true\ncase true p : Bool → Prop x✝ : ∃ b, p b h : p true ⊢ p false ∨ p true\n[PROOFSTEP]\nexact Or.inl h\n[GOAL]\ncase true\np : Bool → Prop\nx✝ : ∃ b, p b\nh : p true\n⊢ p false ∨ p true\n[PROOFSTEP]\nexact Or.inr h\n[GOAL]\nα : Type u_1\nb : Bool\nt e : α\n⊢ (bif b then t else e) = if b = true then t else e\n[PROOFSTEP]\ncases b\n[GOAL]\ncase false\nα : Type u_1\nt e : α\n⊢ (bif false then t else e) = if false = true then t else e\n[PROOFSTEP]\nsimp\n[GOAL]\ncase true\nα : Type u_1\nt e : α\n⊢ (bif true then t else e) = if true = true then t else e\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\np : Prop\ninst✝ : Decidable p\nt e : α\n⊢ (bif decide p then t else e) = if p then t else e\n[PROOFSTEP]\nby_cases p\n[GOAL]\nα : Type u_1\np : Prop\ninst✝ : Decidable p\nt e : α\n⊢ (bif decide p then t else e) = if p then t else e\n[PROOFSTEP]\nby_cases p\n[GOAL]\ncase pos\nα : Type u_1\np : Prop\ninst✝ : Decidable p\nt e : α\nh : p\n⊢ (bif decide p then t else e) = if p then t else e\n[PROOFSTEP]\nsimp [*]\n[GOAL]\ncase neg\nα : Type u_1\np : Prop\ninst✝ : Decidable p\nt e : α\nh : ¬p\n⊢ (bif decide p then t else e) = if p then t else e\n[PROOFSTEP]\nsimp [*]\n[GOAL]\nα : Type u_1\nb : Bool\nt e : α\n⊢ (bif !b then t else e) = bif b then e else t\n[PROOFSTEP]\ncases b\n[GOAL]\ncase false\nα : Type u_1\nt e : α\n⊢ (bif !false then t else e) = bif false then e else t\n[PROOFSTEP]\nrfl\n[GOAL]\ncase true\nα : Type u_1\nt e : α\n⊢ (bif !true then t else e) = bif true then e else t\n[PROOFSTEP]\nrfl\n[GOAL]\n⊢ ∀ {a b : Bool}, (a = true ↔ b = true) ↔ a = b\n[PROOFSTEP]\ndecide\n[GOAL]\n⊢ ∀ {a : Bool}, a ≠ false → a = true\n[PROOFSTEP]\ndecide\n[GOAL]\n⊢ ∀ {a : Bool}, a ≠ true → a = false\n[PROOFSTEP]\ndecide\n[GOAL]\n⊢ ∀ (a b : Bool), (a || b) = (b || a)\n[PROOFSTEP]\ndecide\n[GOAL]\n⊢ ∀ (a b c : Bool), (a || (b || c)) = (b || (a || c))\n[PROOFSTEP]\ndecide\n[GOAL]\na b : Bool\nH : a = true\n⊢ (a || b) = true\n[PROOFSTEP]\nsimp [H]\n[GOAL]\na b : Bool\nH : b = true\n⊢ (a || b) = true\n[PROOFSTEP]\ncases a\n[GOAL]\ncase false\nb : Bool\nH : b = true\n⊢ (false || b) = true\n[PROOFSTEP]\nsimp [H]\n[GOAL]\ncase true\nb : Bool\nH : b = true\n⊢ (true || b) = true\n[PROOFSTEP]\nsimp [H]\n[GOAL]\n⊢ ∀ (a b : Bool), (a && b) = (b && a)\n[PROOFSTEP]\ndecide\n[GOAL]\n⊢ ∀ (a b c : Bool), (a && (b && c)) = (b && (a && c))\n[PROOFSTEP]\ndecide\n[GOAL]\n⊢ ∀ {a b : Bool}, (a && b) = true → a = true\n[PROOFSTEP]\ndecide\n[GOAL]\n⊢ ∀ {a b : Bool}, a = true → b = true → (a && b) = true\n[PROOFSTEP]\ndecide\n[GOAL]\n⊢ ∀ {a b : Bool}, (a && b) = true → b = true\n[PROOFSTEP]\ndecide\n[GOAL]\na b c : Bool\n⊢ (a && (b || c)) = (a && b || a && c)\n[PROOFSTEP]\ncases a\n[GOAL]\ncase false\nb c : Bool\n⊢ (false && (b || c)) = (false && b || false && c)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase true\nb c : Bool\n⊢ (true && (b || c)) = (true && b || true && c)\n[PROOFSTEP]\nsimp\n[GOAL]\na b c : Bool\n⊢ ((a || b) && c) = (a && c || b && c)\n[PROOFSTEP]\ncases a\n[GOAL]\ncase false\nb c : Bool\n⊢ ((false || b) && c) = (false && c || b && c)\n[PROOFSTEP]\ncases b\n[GOAL]\ncase true\nb c : Bool\n⊢ ((true || b) && c) = (true && c || b && c)\n[PROOFSTEP]\ncases b\n[GOAL]\ncase false.false\nc : Bool\n⊢ ((false || false) && c) = (false && c || false && c)\n[PROOFSTEP]\ncases c\n[GOAL]\ncase false.true\nc : Bool\n⊢ ((false || true) && c) = (false && c || true && c)\n[PROOFSTEP]\ncases c\n[GOAL]\ncase true.false\nc : Bool\n⊢ ((true || false) && c) = (true && c || false && c)\n[PROOFSTEP]\ncases c\n[GOAL]\ncase true.true\nc : Bool\n⊢ ((true || true) && c) = (true && c || true && c)\n[PROOFSTEP]\ncases c\n[GOAL]\ncase false.false.false\n⊢ ((false || false) && false) = (false && false || false && false)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase false.false.true\n⊢ ((false || false) && true) = (false && true || false && true)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase false.true.false\n⊢ ((false || true) && false) = (false && false || true && false)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase false.true.true\n⊢ ((false || true) && true) = (false && true || true && true)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase true.false.false\n⊢ ((true || false) && false) = (true && false || false && false)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase true.false.true\n⊢ ((true || false) && true) = (true && true || false && true)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase true.true.false\n⊢ ((true || true) && false) = (true && false || true && false)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase true.true.true\n⊢ ((true || true) && true) = (true && true || true && true)\n[PROOFSTEP]\nsimp\n[GOAL]\na b c : Bool\n⊢ (a || b && c) = ((a || b) && (a || c))\n[PROOFSTEP]\ncases a\n[GOAL]\ncase false\nb c : Bool\n⊢ (false || b && c) = ((false || b) && (false || c))\n[PROOFSTEP]\nsimp\n[GOAL]\ncase true\nb c : Bool\n⊢ (true || b && c) = ((true || b) && (true || c))\n[PROOFSTEP]\nsimp\n[GOAL]\na b c : Bool\n⊢ (a && b || c) = ((a || c) && (b || c))\n[PROOFSTEP]\ncases a\n[GOAL]\ncase false\nb c : Bool\n⊢ (false && b || c) = ((false || c) && (b || c))\n[PROOFSTEP]\ncases b\n[GOAL]\ncase true\nb c : Bool\n⊢ (true && b || c) = ((true || c) && (b || c))\n[PROOFSTEP]\ncases b\n[GOAL]\ncase false.false\nc : Bool\n⊢ (false && false || c) = ((false || c) && (false || c))\n[PROOFSTEP]\ncases c\n[GOAL]\ncase false.true\nc : Bool\n⊢ (false && true || c) = ((false || c) && (true || c))\n[PROOFSTEP]\ncases c\n[GOAL]\ncase true.false\nc : Bool\n⊢ (true && false || c) = ((true || c) && (false || c))\n[PROOFSTEP]\ncases c\n[GOAL]\ncase true.true\nc : Bool\n⊢ (true && true || c) = ((true || c) && (true || c))\n[PROOFSTEP]\ncases c\n[GOAL]\ncase false.false.false\n⊢ (false && false || false) = ((false || false) && (false || false))\n[PROOFSTEP]\nsimp\n[GOAL]\ncase false.false.true\n⊢ (false && false || true) = ((false || true) && (false || true))\n[PROOFSTEP]\nsimp\n[GOAL]\ncase false.true.false\n⊢ (false && true || false) = ((false || false) && (true || false))\n[PROOFSTEP]\nsimp\n[GOAL]\ncase false.true.true\n⊢ (false && true || true) = ((false || true) && (true || true))\n[PROOFSTEP]\nsimp\n[GOAL]\ncase true.false.false\n⊢ (true && false || false) = ((true || false) && (false || false))\n[PROOFSTEP]\nsimp\n[GOAL]\ncase true.false.true\n⊢ (true && false || true) = ((true || true) && (false || true))\n[PROOFSTEP]\nsimp\n[GOAL]\ncase true.true.false\n⊢ (true && true || false) = ((true || false) && (true || false))\n[PROOFSTEP]\nsimp\n[GOAL]\ncase true.true.true\n⊢ (true && true || true) = ((true || true) && (true || true))\n[PROOFSTEP]\nsimp\n[GOAL]\n⊢ ∀ {a b : Bool}, a = !b ↔ a ≠ b\n[PROOFSTEP]\ndecide\n[GOAL]\n⊢ ∀ {a b : Bool}, (!decide (a = b)) = true ↔ a ≠ b\n[PROOFSTEP]\ndecide\n[GOAL]\n⊢ ∀ {a b : Bool}, ¬a = !b ↔ a = b\n[PROOFSTEP]\ndecide\n[GOAL]\n⊢ ∀ {a b : Bool}, ¬(!a) = b ↔ a = b\n[PROOFSTEP]\ndecide\n[GOAL]\n⊢ ∀ (b : Bool), (!b) ≠ b\n[PROOFSTEP]\ndecide\n[GOAL]\n⊢ ∀ (b : Bool), b ≠ !b\n[PROOFSTEP]\ndecide\n[GOAL]\n⊢ ∀ (a b : Bool), a = b ∨ a = !b\n[PROOFSTEP]\ndecide\n[GOAL]\n⊢ ∀ {b : Bool}, (!b) = true ↔ ¬b = true\n[PROOFSTEP]\nsimp\n[GOAL]\na : Bool\n⊢ (!decide (a = false)) = true → a = true\n[PROOFSTEP]\ncases a\n[GOAL]\ncase false\n⊢ (!decide (false = false)) = true → false = true\n[PROOFSTEP]\ndecide\n[GOAL]\ncase true\n⊢ (!decide (true = false)) = true → true = true\n[PROOFSTEP]\ndecide\n[GOAL]\na : Bool\n⊢ (!decide (a = true)) = true → a = false\n[PROOFSTEP]\ncases a\n[GOAL]\ncase false\n⊢ (!decide (false = true)) = true → false = false\n[PROOFSTEP]\ndecide\n[GOAL]\ncase true\n⊢ (!decide (true = true)) = true → true = false\n[PROOFSTEP]\ndecide\n[GOAL]\n⊢ ∀ (x : Bool), (x && !x) = false\n[PROOFSTEP]\ndecide\n[GOAL]\n⊢ ∀ (x : Bool), (!x && x) = false\n[PROOFSTEP]\ndecide\n[GOAL]\n⊢ ∀ (x : Bool), (x || !x) = true\n[PROOFSTEP]\ndecide\n[GOAL]\n⊢ ∀ (x : Bool), (!x || x) = true\n[PROOFSTEP]\ndecide\n[GOAL]\n⊢ ∀ (a b : Bool), xor a b = xor b a\n[PROOFSTEP]\ndecide\n[GOAL]\n⊢ ∀ (a b c : Bool), xor (xor a b) c = xor a (xor b c)\n[PROOFSTEP]\ndecide\n[GOAL]\n⊢ ∀ (a b c : Bool), xor a (xor b c) = xor b (xor a c)\n[PROOFSTEP]\ndecide\n[GOAL]\n⊢ ∀ (a : Bool), xor (!a) a = true\n[PROOFSTEP]\ndecide\n[GOAL]\n⊢ ∀ (a : Bool), (xor a !a) = true\n[PROOFSTEP]\ndecide\n[GOAL]\n⊢ ∀ (a b : Bool), (xor (!a) !b) = xor a b\n[PROOFSTEP]\ndecide\n[GOAL]\n⊢ ∀ (a : Bool), xor false a = a\n[PROOFSTEP]\ndecide\n[GOAL]\n⊢ ∀ (a : Bool), xor a false = a\n[PROOFSTEP]\ndecide\n[GOAL]\na b c : Bool\n⊢ (a && xor b c) = xor (a && b) (a && c)\n[PROOFSTEP]\ncases a\n[GOAL]\ncase false\nb c : Bool\n⊢ (false && xor b c) = xor (false && b) (false && c)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase true\nb c : Bool\n⊢ (true && xor b c) = xor (true && b) (true && c)\n[PROOFSTEP]\nsimp\n[GOAL]\na b c : Bool\n⊢ (xor a b && c) = xor (a && c) (b && c)\n[PROOFSTEP]\ncases a\n[GOAL]\ncase false\nb c : Bool\n⊢ (xor false b && c) = xor (false && c) (b && c)\n[PROOFSTEP]\ncases b\n[GOAL]\ncase true\nb c : Bool\n⊢ (xor true b && c) = xor (true && c) (b && c)\n[PROOFSTEP]\ncases b\n[GOAL]\ncase false.false\nc : Bool\n⊢ (xor false false && c) = xor (false && c) (false && c)\n[PROOFSTEP]\ncases c\n[GOAL]\ncase false.true\nc : Bool\n⊢ (xor false true && c) = xor (false && c) (true && c)\n[PROOFSTEP]\ncases c\n[GOAL]\ncase true.false\nc : Bool\n⊢ (xor true false && c) = xor (true && c) (false && c)\n[PROOFSTEP]\ncases c\n[GOAL]\ncase true.true\nc : Bool\n⊢ (xor true true && c) = xor (true && c) (true && c)\n[PROOFSTEP]\ncases c\n[GOAL]\ncase false.false.false\n⊢ (xor false false && false) = xor (false && false) (false && false)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase false.false.true\n⊢ (xor false false && true) = xor (false && true) (false && true)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase false.true.false\n⊢ (xor false true && false) = xor (false && false) (true && false)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase false.true.true\n⊢ (xor false true && true) = xor (false && true) (true && true)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase true.false.false\n⊢ (xor true false && false) = xor (true && false) (false && false)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase true.false.true\n⊢ (xor true false && true) = xor (true && true) (false && true)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase true.true.false\n⊢ (xor true true && false) = xor (true && false) (true && false)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase true.true.true\n⊢ (xor true true && true) = xor (true && true) (true && true)\n[PROOFSTEP]\nsimp\n[GOAL]\n⊢ ∀ {x y : Bool}, xor x y = true ↔ x ≠ y\n[PROOFSTEP]\ndecide\n[GOAL]\n⊢ ∀ (a b : Bool), (!(a && b)) = (!a || !b)\n[PROOFSTEP]\ndecide\n[GOAL]\n⊢ ∀ (a b : Bool), (!(a || b)) = (!a && !b)\n[PROOFSTEP]\ndecide\n[GOAL]\n⊢ ∀ {a b : Bool}, (!a) = !b → a = b\n[PROOFSTEP]\ndecide\n[GOAL]\n⊢ ∀ (a : Bool), a ≤ a\n[PROOFSTEP]\nunfold LE.le\n[GOAL]\n⊢ ∀ (a : Bool), { le := fun a b => a = false ∨ b = true }.1 a a\n[PROOFSTEP]\ndecide\n[GOAL]\n⊢ ∀ (a b c : Bool), a ≤ b → b ≤ c → a ≤ c\n[PROOFSTEP]\nunfold LE.le\n[GOAL]\n⊢ ∀ (a b c : Bool),\n    { le := fun a b => a = false ∨ b = true }.1 a b →\n      { le := fun a b => a = false ∨ b = true }.1 b c → { le := fun a b => a = false ∨ b = true }.1 a c\n[PROOFSTEP]\ndecide\n[GOAL]\n⊢ ∀ (a b : Bool), a ≤ b → b ≤ a → a = b\n[PROOFSTEP]\nunfold LE.le Preorder.toLE\n[GOAL]\n⊢ ∀ (a b : Bool),\n    (Preorder.mk (_ : ∀ (a : Bool), { le := fun a b => a = false ∨ b = true }.1 a a)\n              (_ :\n                ∀ (a b c : Bool),\n                  { le := fun a b => a = false ∨ b = true }.1 a b →\n                    { le := fun a b => a = false ∨ b = true }.1 b c →\n                      { le := fun a b => a = false ∨ b = true }.1 a c)).1.1\n        a b →\n      (Preorder.mk (_ : ∀ (a : Bool), { le := fun a b => a = false ∨ b = true }.1 a a)\n                (_ :\n                  ∀ (a b c : Bool),\n                    { le := fun a b => a = false ∨ b = true }.1 a b →\n                      { le := fun a b => a = false ∨ b = true }.1 b c →\n                        { le := fun a b => a = false ∨ b = true }.1 a c)).1.1\n          b a →\n        a = b\n[PROOFSTEP]\ndecide\n[GOAL]\n⊢ ∀ (a b : Bool), a ≤ b ∨ b ≤ a\n[PROOFSTEP]\nunfold LE.le Preorder.toLE PartialOrder.toPreorder\n[GOAL]\n⊢ ∀ (a b : Bool),\n    (PartialOrder.mk\n                (_ :\n                  ∀ (a b : Bool),\n                    (Preorder.mk (_ : ∀ (a : Bool), { le := fun a b => a = false ∨ b = true }.1 a a)\n                              (_ :\n                                ∀ (a b c : Bool),\n                                  { le := fun a b => a = false ∨ b = true }.1 a b →\n                                    { le := fun a b => a = false ∨ b = true }.1 b c →\n                                      { le := fun a b => a = false ∨ b = true }.1 a c)).1.1\n                        a b →\n                      (Preorder.mk (_ : ∀ (a : Bool), { le := fun a b => a = false ∨ b = true }.1 a a)\n                                (_ :\n                                  ∀ (a b c : Bool),\n                                    { le := fun a b => a = false ∨ b = true }.1 a b →\n                                      { le := fun a b => a = false ∨ b = true }.1 b c →\n                                        { le := fun a b => a = false ∨ b = true }.1 a c)).1.1\n                          b a →\n                        a = b)).1.1.1\n        a b ∨\n      (PartialOrder.mk\n                (_ :\n                  ∀ (a b : Bool),\n                    (Preorder.mk (_ : ∀ (a : Bool), { le := fun a b => a = false ∨ b = true }.1 a a)\n                              (_ :\n                                ∀ (a b c : Bool),\n                                  { le := fun a b => a = false ∨ b = true }.1 a b →\n                                    { le := fun a b => a = false ∨ b = true }.1 b c →\n                                      { le := fun a b => a = false ∨ b = true }.1 a c)).1.1\n                        a b →\n                      (Preorder.mk (_ : ∀ (a : Bool), { le := fun a b => a = false ∨ b = true }.1 a a)\n                                (_ :\n                                  ∀ (a b c : Bool),\n                                    { le := fun a b => a = false ∨ b = true }.1 a b →\n                                      { le := fun a b => a = false ∨ b = true }.1 b c →\n                                        { le := fun a b => a = false ∨ b = true }.1 a c)).1.1\n                          b a →\n                        a = b)).1.1.1\n        b a\n[PROOFSTEP]\ndecide\n[GOAL]\n⊢ DecidableRel fun x x_1 => x ≤ x_1\n[PROOFSTEP]\nunfold LE.le Preorder.toLE PartialOrder.toPreorder\n[GOAL]\n⊢ DecidableRel fun x x_1 =>\n    (PartialOrder.mk\n              (_ :\n                ∀ (a b : Bool),\n                  (Preorder.mk (_ : ∀ (a : Bool), { le := fun a b => a = false ∨ b = true }.1 a a)\n                            (_ :\n                              ∀ (a b c : Bool),\n                                { le := fun a b => a = false ∨ b = true }.1 a b →\n                                  { le := fun a b => a = false ∨ b = true }.1 b c →\n                                    { le := fun a b => a = false ∨ b = true }.1 a c)).1.1\n                      a b →\n                    (Preorder.mk (_ : ∀ (a : Bool), { le := fun a b => a = false ∨ b = true }.1 a a)\n                              (_ :\n                                ∀ (a b c : Bool),\n                                  { le := fun a b => a = false ∨ b = true }.1 a b →\n                                    { le := fun a b => a = false ∨ b = true }.1 b c →\n                                      { le := fun a b => a = false ∨ b = true }.1 a c)).1.1\n                        b a →\n                      a = b)).1.1.1\n      x x_1\n[PROOFSTEP]\nexact inferInstance\n[GOAL]\na b : Bool\n⊢ min a b = if a ≤ b then a else b\n[PROOFSTEP]\ncases a\n[GOAL]\ncase false\nb : Bool\n⊢ min false b = if false ≤ b then false else b\n[PROOFSTEP]\ncases b\n[GOAL]\ncase true\nb : Bool\n⊢ min true b = if true ≤ b then true else b\n[PROOFSTEP]\ncases b\n[GOAL]\ncase false.false\n⊢ min false false = if false ≤ false then false else false\n[PROOFSTEP]\ndecide\n[GOAL]\ncase false.true\n⊢ min false true = if false ≤ true then false else true\n[PROOFSTEP]\ndecide\n[GOAL]\ncase true.false\n⊢ min true false = if true ≤ false then true else false\n[PROOFSTEP]\ndecide\n[GOAL]\ncase true.true\n⊢ min true true = if true ≤ true then true else true\n[PROOFSTEP]\ndecide\n[GOAL]\na b : Bool\n⊢ max a b = if a ≤ b then b else a\n[PROOFSTEP]\ncases a\n[GOAL]\ncase false\nb : Bool\n⊢ max false b = if false ≤ b then b else false\n[PROOFSTEP]\ncases b\n[GOAL]\ncase true\nb : Bool\n⊢ max true b = if true ≤ b then b else true\n[PROOFSTEP]\ncases b\n[GOAL]\ncase false.false\n⊢ max false false = if false ≤ false then false else false\n[PROOFSTEP]\ndecide\n[GOAL]\ncase false.true\n⊢ max false true = if false ≤ true then true else false\n[PROOFSTEP]\ndecide\n[GOAL]\ncase true.false\n⊢ max true false = if true ≤ false then false else true\n[PROOFSTEP]\ndecide\n[GOAL]\ncase true.true\n⊢ max true true = if true ≤ true then true else true\n[PROOFSTEP]\ndecide\n[GOAL]\n⊢ ∀ {x y : Bool}, x < y ↔ x = false ∧ y = true\n[PROOFSTEP]\ndecide\n[GOAL]\n⊢ ∀ {x y : Bool}, x ≤ y ↔ x = true → y = true\n[PROOFSTEP]\ndecide\n[GOAL]\n⊢ ∀ (x y : Bool), (x && y) ≤ x\n[PROOFSTEP]\ndecide\n[GOAL]\n⊢ ∀ (x y : Bool), (x && y) ≤ y\n[PROOFSTEP]\ndecide\n[GOAL]\n⊢ ∀ {x y z : Bool}, x ≤ y → x ≤ z → x ≤ (y && z)\n[PROOFSTEP]\ndecide\n[GOAL]\n⊢ ∀ (x y : Bool), x ≤ (x || y)\n[PROOFSTEP]\ndecide\n[GOAL]\n⊢ ∀ (x y : Bool), y ≤ (x || y)\n[PROOFSTEP]\ndecide\n[GOAL]\n⊢ ∀ {x y z : Bool}, x ≤ z → y ≤ z → (x || y) ≤ z\n[PROOFSTEP]\ndecide\n[GOAL]\nn m : ℕ\nh : n ≤ m\n⊢ ofNat n ≤ ofNat m\n[PROOFSTEP]\nsimp only [ofNat, ne_eq, _root_.decide_not]\n[GOAL]\nn m : ℕ\nh : n ≤ m\n⊢ (!decide (n = 0)) ≤ !decide (m = 0)\n[PROOFSTEP]\ncases Nat.decEq n 0 with\n| isTrue hn => rw [decide_eq_true hn]; exact false_le\n| isFalse hn =>\n  cases Nat.decEq m 0 with\n  | isFalse hm => rw [decide_eq_false hm]; exact le_true\n  | isTrue hm => subst hm; have h := le_antisymm h (Nat.zero_le n); contradiction\n[GOAL]\nn m : ℕ\nh : n ≤ m\nx✝ : Decidable (n = 0)\n⊢ (!decide (n = 0)) ≤ !decide (m = 0)\n[PROOFSTEP]\ncases Nat.decEq n 0 with\n| isTrue hn => rw [decide_eq_true hn]; exact false_le\n| isFalse hn =>\n  cases Nat.decEq m 0 with\n  | isFalse hm => rw [decide_eq_false hm]; exact le_true\n  | isTrue hm => subst hm; have h := le_antisymm h (Nat.zero_le n); contradiction\n[GOAL]\ncase isTrue\nn m : ℕ\nh : n ≤ m\nhn : n = 0\n⊢ (!decide (n = 0)) ≤ !decide (m = 0)\n[PROOFSTEP]\n\n| isTrue hn => rw [decide_eq_true hn]; exact false_le\n[GOAL]\ncase isTrue\nn m : ℕ\nh : n ≤ m\nhn : n = 0\n⊢ (!decide (n = 0)) ≤ !decide (m = 0)\n[PROOFSTEP]\nrw [decide_eq_true hn]\n[GOAL]\ncase isTrue\nn m : ℕ\nh : n ≤ m\nhn : n = 0\n⊢ (!true) ≤ !decide (m = 0)\n[PROOFSTEP]\nexact false_le\n[GOAL]\ncase isFalse\nn m : ℕ\nh : n ≤ m\nhn : ¬n = 0\n⊢ (!decide (n = 0)) ≤ !decide (m = 0)\n[PROOFSTEP]\n\n| isFalse hn =>\n  cases Nat.decEq m 0 with\n  | isFalse hm => rw [decide_eq_false hm]; exact le_true\n  | isTrue hm => subst hm; have h := le_antisymm h (Nat.zero_le n); contradiction\n[GOAL]\ncase isFalse\nn m : ℕ\nh : n ≤ m\nhn : ¬n = 0\n⊢ (!decide (n = 0)) ≤ !decide (m = 0)\n[PROOFSTEP]\ncases Nat.decEq m 0 with\n| isFalse hm => rw [decide_eq_false hm]; exact le_true\n| isTrue hm => subst hm; have h := le_antisymm h (Nat.zero_le n); contradiction\n[GOAL]\ncase isFalse\nn m : ℕ\nh : n ≤ m\nhn : ¬n = 0\nx✝ : Decidable (m = 0)\n⊢ (!decide (n = 0)) ≤ !decide (m = 0)\n[PROOFSTEP]\ncases Nat.decEq m 0 with\n| isFalse hm => rw [decide_eq_false hm]; exact le_true\n| isTrue hm => subst hm; have h := le_antisymm h (Nat.zero_le n); contradiction\n[GOAL]\ncase isFalse.isFalse\nn m : ℕ\nh : n ≤ m\nhn : ¬n = 0\nhm : ¬m = 0\n⊢ (!decide (n = 0)) ≤ !decide (m = 0)\n[PROOFSTEP]\n\n| isFalse hm => rw [decide_eq_false hm]; exact le_true\n[GOAL]\ncase isFalse.isFalse\nn m : ℕ\nh : n ≤ m\nhn : ¬n = 0\nhm : ¬m = 0\n⊢ (!decide (n = 0)) ≤ !decide (m = 0)\n[PROOFSTEP]\nrw [decide_eq_false hm]\n[GOAL]\ncase isFalse.isFalse\nn m : ℕ\nh : n ≤ m\nhn : ¬n = 0\nhm : ¬m = 0\n⊢ (!decide (n = 0)) ≤ !false\n[PROOFSTEP]\nexact le_true\n[GOAL]\ncase isFalse.isTrue\nn m : ℕ\nh : n ≤ m\nhn : ¬n = 0\nhm : m = 0\n⊢ (!decide (n = 0)) ≤ !decide (m = 0)\n[PROOFSTEP]\n\n| isTrue hm => subst hm; have h := le_antisymm h (Nat.zero_le n); contradiction\n[GOAL]\ncase isFalse.isTrue\nn m : ℕ\nh : n ≤ m\nhn : ¬n = 0\nhm : m = 0\n⊢ (!decide (n = 0)) ≤ !decide (m = 0)\n[PROOFSTEP]\nsubst hm\n[GOAL]\ncase isFalse.isTrue\nn : ℕ\nhn : ¬n = 0\nh : n ≤ 0\n⊢ (!decide (n = 0)) ≤ !decide (0 = 0)\n[PROOFSTEP]\nhave h := le_antisymm h (Nat.zero_le n)\n[GOAL]\ncase isFalse.isTrue\nn : ℕ\nhn : ¬n = 0\nh✝ : n ≤ 0\nh : n = 0\n⊢ (!decide (n = 0)) ≤ !decide (0 = 0)\n[PROOFSTEP]\ncontradiction\n[GOAL]\nb₀ b₁ : Bool\nh : b₀ ≤ b₁\n⊢ toNat b₀ ≤ toNat b₁\n[PROOFSTEP]\ncases h with\n| inl h => subst h; exact Nat.zero_le _\n| inr h => subst h; cases b₀ <;> simp\n[GOAL]\nb₀ b₁ : Bool\nh : b₀ ≤ b₁\n⊢ toNat b₀ ≤ toNat b₁\n[PROOFSTEP]\ncases h with\n| inl h => subst h; exact Nat.zero_le _\n| inr h => subst h; cases b₀ <;> simp\n[GOAL]\ncase inl\nb₀ b₁ : Bool\nh : b₀ = false\n⊢ toNat b₀ ≤ toNat b₁\n[PROOFSTEP]\n\n| inl h => subst h; exact Nat.zero_le _\n[GOAL]\ncase inl\nb₀ b₁ : Bool\nh : b₀ = false\n⊢ toNat b₀ ≤ toNat b₁\n[PROOFSTEP]\nsubst h\n[GOAL]\ncase inl\nb₁ : Bool\n⊢ toNat false ≤ toNat b₁\n[PROOFSTEP]\nexact Nat.zero_le _\n[GOAL]\ncase inr\nb₀ b₁ : Bool\nh : b₁ = true\n⊢ toNat b₀ ≤ toNat b₁\n[PROOFSTEP]\n\n| inr h => subst h; cases b₀ <;> simp\n[GOAL]\ncase inr\nb₀ b₁ : Bool\nh : b₁ = true\n⊢ toNat b₀ ≤ toNat b₁\n[PROOFSTEP]\nsubst h\n[GOAL]\ncase inr\nb₀ : Bool\n⊢ toNat b₀ ≤ toNat true\n[PROOFSTEP]\ncases b₀\n[GOAL]\ncase inr.false\n⊢ toNat false ≤ toNat true\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr.true\n⊢ toNat true ≤ toNat true\n[PROOFSTEP]\nsimp\n[GOAL]\nb : Bool\n⊢ ofNat (toNat b) = b\n[PROOFSTEP]\ncases b\n[GOAL]\ncase false\n⊢ ofNat (toNat false) = false\n[PROOFSTEP]\nrfl\n[GOAL]\ncase true\n⊢ ofNat (toNat true) = true\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Sort u_1\nf : Bool → α\nH : f false ≠ f true\nx y : Bool\nhxy : f x = f y\n⊢ x = y\n[PROOFSTEP]\ncases x\n[GOAL]\ncase false\nα : Sort u_1\nf : Bool → α\nH : f false ≠ f true\ny : Bool\nhxy : f false = f y\n⊢ false = y\n[PROOFSTEP]\ncases y\n[GOAL]\ncase true\nα : Sort u_1\nf : Bool → α\nH : f false ≠ f true\ny : Bool\nhxy : f true = f y\n⊢ true = y\n[PROOFSTEP]\ncases y\n[GOAL]\ncase false.false\nα : Sort u_1\nf : Bool → α\nH : f false ≠ f true\nhxy : f false = f false\n⊢ false = false\ncase false.true\nα : Sort u_1\nf : Bool → α\nH : f false ≠ f true\nhxy : f false = f true\n⊢ false = true\ncase true.false\nα : Sort u_1\nf : Bool → α\nH : f false ≠ f true\nhxy : f true = f false\n⊢ true = false\ncase true.true α : Sort u_1 f : Bool → α H : f false ≠ f true hxy : f true = f true ⊢ true = true\n[PROOFSTEP]\nexacts [rfl, (H hxy).elim, (H hxy.symm).elim, rfl]\n[GOAL]\nf : Bool → Bool\nx : Bool\n⊢ f (f (f x)) = f x\n[PROOFSTEP]\ncases x\n[GOAL]\ncase false\nf : Bool → Bool\n⊢ f (f (f false)) = f false\n[PROOFSTEP]\ncases h₁ : f true\n[GOAL]\ncase true\nf : Bool → Bool\n⊢ f (f (f true)) = f true\n[PROOFSTEP]\ncases h₁ : f true\n[GOAL]\ncase false.false\nf : Bool → Bool\nh₁ : f true = false\n⊢ f (f (f false)) = f false\n[PROOFSTEP]\ncases h₂ : f false\n[GOAL]\ncase false.true\nf : Bool → Bool\nh₁ : f true = true\n⊢ f (f (f false)) = f false\n[PROOFSTEP]\ncases h₂ : f false\n[GOAL]\ncase true.false\nf : Bool → Bool\nh₁ : f true = false\n⊢ f (f false) = false\n[PROOFSTEP]\ncases h₂ : f false\n[GOAL]\ncase true.true\nf : Bool → Bool\nh₁ : f true = true\n⊢ f (f true) = true\n[PROOFSTEP]\ncases h₂ : f false\n[GOAL]\ncase false.false.false\nf : Bool → Bool\nh₁ : f true = false\nh₂ : f false = false\n⊢ f (f false) = false\n[PROOFSTEP]\nsimp only [h₁, h₂]\n[GOAL]\ncase false.false.true\nf : Bool → Bool\nh₁ : f true = false\nh₂ : f false = true\n⊢ f (f true) = true\n[PROOFSTEP]\nsimp only [h₁, h₂]\n[GOAL]\ncase false.true.false\nf : Bool → Bool\nh₁ : f true = true\nh₂ : f false = false\n⊢ f (f false) = false\n[PROOFSTEP]\nsimp only [h₁, h₂]\n[GOAL]\ncase false.true.true\nf : Bool → Bool\nh₁ : f true = true\nh₂ : f false = true\n⊢ f (f true) = true\n[PROOFSTEP]\nsimp only [h₁, h₂]\n[GOAL]\ncase true.false.false\nf : Bool → Bool\nh₁ : f true = false\nh₂ : f false = false\n⊢ f false = false\n[PROOFSTEP]\nsimp only [h₁, h₂]\n[GOAL]\ncase true.false.true\nf : Bool → Bool\nh₁ : f true = false\nh₂ : f false = true\n⊢ f true = false\n[PROOFSTEP]\nsimp only [h₁, h₂]\n[GOAL]\ncase true.true.false\nf : Bool → Bool\nh₁ : f true = true\nh₂ : f false = false\n⊢ f (f true) = true\n[PROOFSTEP]\nsimp only [h₁, h₂]\n[GOAL]\ncase true.true.true\nf : Bool → Bool\nh₁ : f true = true\nh₂ : f false = true\n⊢ f (f true) = true\n[PROOFSTEP]\nsimp only [h₁, h₂]\n", "meta": {"mathlib_filename": "Mathlib.Data.Bool.Basic", "llama_tokens": 12880, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7799929104825006, "lm_q2_score": 0.6442250928250375, "lm_q1q2_score": 0.5024910051584601}}
{"text": "[GOAL]\nα : Type u_1\ninst✝ : Monoid α\na b : α\nu : αˣ\n⊢ a = ↑u * (↑u⁻¹ * a)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\ninst✝ : Monoid α\na b : α\nu : αˣ\nx✝ : a ∣ b * ↑u\nc : α\nEq : b * ↑u = a * c\n⊢ b = a * (c * ↑u⁻¹)\n[PROOFSTEP]\nrw [← mul_assoc, ← Eq, Units.mul_inv_cancel_right]\n[GOAL]\nα : Type u_1\ninst✝ : Monoid α\na b : α\nu : αˣ\nh : a ∣ b\n⊢ a * ↑u * ↑u⁻¹ = a\n[PROOFSTEP]\nrw [mul_assoc, u.mul_inv, mul_one]\n[GOAL]\nα : Type u_1\ninst✝ : CommMonoid α\na b : α\nu : αˣ\n⊢ a ∣ ↑u * b ↔ a ∣ b\n[PROOFSTEP]\nrw [mul_comm]\n[GOAL]\nα : Type u_1\ninst✝ : CommMonoid α\na b : α\nu : αˣ\n⊢ a ∣ b * ↑u ↔ a ∣ b\n[PROOFSTEP]\napply dvd_mul_right\n[GOAL]\nα : Type u_1\ninst✝ : CommMonoid α\na b : α\nu : αˣ\n⊢ ↑u * a ∣ b ↔ a ∣ b\n[PROOFSTEP]\nrw [mul_comm]\n[GOAL]\nα : Type u_1\ninst✝ : CommMonoid α\na b : α\nu : αˣ\n⊢ a * ↑u ∣ b ↔ a ∣ b\n[PROOFSTEP]\napply mul_right_dvd\n[GOAL]\nα : Type u_1\ninst✝ : Monoid α\na b u : α\nhu : IsUnit u\n⊢ u ∣ a\n[PROOFSTEP]\nrcases hu with ⟨u, rfl⟩\n[GOAL]\ncase intro\nα : Type u_1\ninst✝ : Monoid α\na b : α\nu : αˣ\n⊢ ↑u ∣ a\n[PROOFSTEP]\napply Units.coe_dvd\n[GOAL]\nα : Type u_1\ninst✝ : Monoid α\na b u : α\nhu : IsUnit u\n⊢ a ∣ b * u ↔ a ∣ b\n[PROOFSTEP]\nrcases hu with ⟨u, rfl⟩\n[GOAL]\ncase intro\nα : Type u_1\ninst✝ : Monoid α\na b : α\nu : αˣ\n⊢ a ∣ b * ↑u ↔ a ∣ b\n[PROOFSTEP]\napply Units.dvd_mul_right\n[GOAL]\nα : Type u_1\ninst✝ : Monoid α\na b u : α\nhu : IsUnit u\n⊢ a * u ∣ b ↔ a ∣ b\n[PROOFSTEP]\nrcases hu with ⟨u, rfl⟩\n[GOAL]\ncase intro\nα : Type u_1\ninst✝ : Monoid α\na b : α\nu : αˣ\n⊢ a * ↑u ∣ b ↔ a ∣ b\n[PROOFSTEP]\napply Units.mul_right_dvd\n[GOAL]\nα : Type u_1\ninst✝ : CommMonoid α\na b u : α\nhu : IsUnit u\n⊢ a ∣ u * b ↔ a ∣ b\n[PROOFSTEP]\nrcases hu with ⟨u, rfl⟩\n[GOAL]\ncase intro\nα : Type u_1\ninst✝ : CommMonoid α\na b : α\nu : αˣ\n⊢ a ∣ ↑u * b ↔ a ∣ b\n[PROOFSTEP]\napply Units.dvd_mul_left\n[GOAL]\nα : Type u_1\ninst✝ : CommMonoid α\na b u : α\nhu : IsUnit u\n⊢ u * a ∣ b ↔ a ∣ b\n[PROOFSTEP]\nrcases hu with ⟨u, rfl⟩\n[GOAL]\ncase intro\nα : Type u_1\ninst✝ : CommMonoid α\na b : α\nu : αˣ\n⊢ ↑u * a ∣ b ↔ a ∣ b\n[PROOFSTEP]\napply Units.mul_left_dvd\n[GOAL]\nα : Type u_1\ninst✝ : CommMonoid α\nx : α\nx✝ : x ∣ 1\ny : α\nh : 1 = x * y\n⊢ y * x = 1\n[PROOFSTEP]\nrw [h, mul_comm]\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Divisibility.Units", "llama_tokens": 1235, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7185943925708561, "lm_q2_score": 0.6992544273261176, "lm_q1q2_score": 0.5024803104568933}}
{"text": "[GOAL]\nα β : DistLatCat\ne : ↑α ≃o ↑β\n⊢ { toSupHom := { toFun := ↑e, map_sup' := (_ : ∀ (a b : ↑α), ↑e (a ⊔ b) = ↑e a ⊔ ↑e b) },\n        map_inf' := (_ : ∀ (a b : ↑α), ↑e (a ⊓ b) = ↑e a ⊓ ↑e b) } ≫\n      {\n        toSupHom :=\n          { toFun := ↑(OrderIso.symm e),\n            map_sup' := (_ : ∀ (a b : ↑β), ↑(OrderIso.symm e) (a ⊔ b) = ↑(OrderIso.symm e) a ⊔ ↑(OrderIso.symm e) b) },\n        map_inf' := (_ : ∀ (a b : ↑β), ↑(OrderIso.symm e) (a ⊓ b) = ↑(OrderIso.symm e) a ⊓ ↑(OrderIso.symm e) b) } =\n    𝟙 α\n[PROOFSTEP]\next\n[GOAL]\ncase w\nα β : DistLatCat\ne : ↑α ≃o ↑β\nx✝ : (forget DistLatCat).obj α\n⊢ ↑({ toSupHom := { toFun := ↑e, map_sup' := (_ : ∀ (a b : ↑α), ↑e (a ⊔ b) = ↑e a ⊔ ↑e b) },\n            map_inf' := (_ : ∀ (a b : ↑α), ↑e (a ⊓ b) = ↑e a ⊓ ↑e b) } ≫\n          {\n            toSupHom :=\n              { toFun := ↑(OrderIso.symm e),\n                map_sup' :=\n                  (_ : ∀ (a b : ↑β), ↑(OrderIso.symm e) (a ⊔ b) = ↑(OrderIso.symm e) a ⊔ ↑(OrderIso.symm e) b) },\n            map_inf' := (_ : ∀ (a b : ↑β), ↑(OrderIso.symm e) (a ⊓ b) = ↑(OrderIso.symm e) a ⊓ ↑(OrderIso.symm e) b) })\n      x✝ =\n    ↑(𝟙 α) x✝\n[PROOFSTEP]\nexact e.symm_apply_apply _\n[GOAL]\nα β : DistLatCat\ne : ↑α ≃o ↑β\n⊢ {\n        toSupHom :=\n          { toFun := ↑(OrderIso.symm e),\n            map_sup' := (_ : ∀ (a b : ↑β), ↑(OrderIso.symm e) (a ⊔ b) = ↑(OrderIso.symm e) a ⊔ ↑(OrderIso.symm e) b) },\n        map_inf' := (_ : ∀ (a b : ↑β), ↑(OrderIso.symm e) (a ⊓ b) = ↑(OrderIso.symm e) a ⊓ ↑(OrderIso.symm e) b) } ≫\n      { toSupHom := { toFun := ↑e, map_sup' := (_ : ∀ (a b : ↑α), ↑e (a ⊔ b) = ↑e a ⊔ ↑e b) },\n        map_inf' := (_ : ∀ (a b : ↑α), ↑e (a ⊓ b) = ↑e a ⊓ ↑e b) } =\n    𝟙 β\n[PROOFSTEP]\next\n[GOAL]\ncase w\nα β : DistLatCat\ne : ↑α ≃o ↑β\nx✝ : (forget DistLatCat).obj β\n⊢ ↑({\n            toSupHom :=\n              { toFun := ↑(OrderIso.symm e),\n                map_sup' :=\n                  (_ : ∀ (a b : ↑β), ↑(OrderIso.symm e) (a ⊔ b) = ↑(OrderIso.symm e) a ⊔ ↑(OrderIso.symm e) b) },\n            map_inf' := (_ : ∀ (a b : ↑β), ↑(OrderIso.symm e) (a ⊓ b) = ↑(OrderIso.symm e) a ⊓ ↑(OrderIso.symm e) b) } ≫\n          { toSupHom := { toFun := ↑e, map_sup' := (_ : ∀ (a b : ↑α), ↑e (a ⊔ b) = ↑e a ⊔ ↑e b) },\n            map_inf' := (_ : ∀ (a b : ↑α), ↑e (a ⊓ b) = ↑e a ⊓ ↑e b) })\n      x✝ =\n    ↑(𝟙 β) x✝\n[PROOFSTEP]\nexact e.apply_symm_apply _\n", "meta": {"mathlib_filename": "Mathlib.Order.Category.DistLatCat", "llama_tokens": 1347, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8267117983401363, "lm_q2_score": 0.6076631698328916, "lm_q1q2_score": 0.5023623119176175}}
{"text": "[GOAL]\nX : Type u\nY : Type v\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : HSpace X\ninst✝ : HSpace Y\n⊢ Continuous fun p => (↑hmul (p.fst.fst, p.snd.fst), ↑hmul (p.fst.snd, p.snd.snd))\n[PROOFSTEP]\nexact\n  ((map_continuous HSpace.hmul).comp\n        ((continuous_fst.comp continuous_fst).prod_mk (continuous_fst.comp continuous_snd))).prod_mk\n    ((map_continuous HSpace.hmul).comp\n      ((continuous_snd.comp continuous_fst).prod_mk (continuous_snd.comp continuous_snd)))\n[GOAL]\nX : Type u\nY : Type v\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : HSpace X\ninst✝ : HSpace Y\n⊢ ↑(ContinuousMap.mk fun p => (↑hmul (p.fst.fst, p.snd.fst), ↑hmul (p.fst.snd, p.snd.snd))) ((e, e), e, e) = (e, e)\n[PROOFSTEP]\nsimp only [ContinuousMap.coe_mk, Prod.mk.inj_iff]\n[GOAL]\nX : Type u\nY : Type v\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : HSpace X\ninst✝ : HSpace Y\n⊢ ↑hmul (e, e) = e ∧ ↑hmul (e, e) = e\n[PROOFSTEP]\nexact ⟨HSpace.hmul_e_e, HSpace.hmul_e_e⟩\n[GOAL]\nX : Type u\nY : Type v\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : HSpace X\ninst✝ : HSpace Y\n⊢ HomotopyRel\n    (comp (ContinuousMap.mk fun p => (↑hmul (p.fst.fst, p.snd.fst), ↑hmul (p.fst.snd, p.snd.snd)))\n      (prodMk (const (X × Y) (e, e)) (ContinuousMap.id (X × Y))))\n    (ContinuousMap.id (X × Y)) {(e, e)}\n[PROOFSTEP]\nlet G : I × X × Y → X × Y := fun p => (HSpace.eHmul (p.1, p.2.1), HSpace.eHmul (p.1, p.2.2))\n[GOAL]\nX : Type u\nY : Type v\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : HSpace X\ninst✝ : HSpace Y\nG : ↑I × X × Y → X × Y := fun p => (↑eHmul (p.fst, p.snd.fst), ↑eHmul (p.fst, p.snd.snd))\n⊢ HomotopyRel\n    (comp (ContinuousMap.mk fun p => (↑hmul (p.fst.fst, p.snd.fst), ↑hmul (p.fst.snd, p.snd.snd)))\n      (prodMk (const (X × Y) (e, e)) (ContinuousMap.id (X × Y))))\n    (ContinuousMap.id (X × Y)) {(e, e)}\n[PROOFSTEP]\nhave hG : Continuous G :=\n  (Continuous.comp HSpace.eHmul.1.1.2 (continuous_fst.prod_mk (continuous_fst.comp continuous_snd))).prod_mk\n    (Continuous.comp HSpace.eHmul.1.1.2 (continuous_fst.prod_mk (continuous_snd.comp continuous_snd)))\n[GOAL]\nX : Type u\nY : Type v\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : HSpace X\ninst✝ : HSpace Y\nG : ↑I × X × Y → X × Y := fun p => (↑eHmul (p.fst, p.snd.fst), ↑eHmul (p.fst, p.snd.snd))\nhG : Continuous G\n⊢ HomotopyRel\n    (comp (ContinuousMap.mk fun p => (↑hmul (p.fst.fst, p.snd.fst), ↑hmul (p.fst.snd, p.snd.snd)))\n      (prodMk (const (X × Y) (e, e)) (ContinuousMap.id (X × Y))))\n    (ContinuousMap.id (X × Y)) {(e, e)}\n[PROOFSTEP]\nuse!⟨G, hG⟩\n[GOAL]\ncase map_zero_left\nX : Type u\nY : Type v\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : HSpace X\ninst✝ : HSpace Y\nG : ↑I × X × Y → X × Y := fun p => (↑eHmul (p.fst, p.snd.fst), ↑eHmul (p.fst, p.snd.snd))\nhG : Continuous G\n⊢ ∀ (x : X × Y),\n    ContinuousMap.toFun (ContinuousMap.mk G) (0, x) =\n      ↑(comp (ContinuousMap.mk fun p => (↑hmul (p.fst.fst, p.snd.fst), ↑hmul (p.fst.snd, p.snd.snd)))\n            (prodMk (const (X × Y) (e, e)) (ContinuousMap.id (X × Y))))\n        x\n[PROOFSTEP]\nrintro ⟨x, y⟩\n[GOAL]\ncase map_zero_left.mk\nX : Type u\nY : Type v\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : HSpace X\ninst✝ : HSpace Y\nG : ↑I × X × Y → X × Y := fun p => (↑eHmul (p.fst, p.snd.fst), ↑eHmul (p.fst, p.snd.snd))\nhG : Continuous G\nx : X\ny : Y\n⊢ ContinuousMap.toFun (ContinuousMap.mk G) (0, x, y) =\n    ↑(comp (ContinuousMap.mk fun p => (↑hmul (p.fst.fst, p.snd.fst), ↑hmul (p.fst.snd, p.snd.snd)))\n          (prodMk (const (X × Y) (e, e)) (ContinuousMap.id (X × Y))))\n      (x, y)\n[PROOFSTEP]\nexacts [Prod.mk.inj_iff.mpr ⟨HSpace.eHmul.1.2 x, HSpace.eHmul.1.2 y⟩]\n[GOAL]\ncase map_one_left\nX : Type u\nY : Type v\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : HSpace X\ninst✝ : HSpace Y\nG : ↑I × X × Y → X × Y := fun p => (↑eHmul (p.fst, p.snd.fst), ↑eHmul (p.fst, p.snd.snd))\nhG : Continuous G\n⊢ ∀ (x : X × Y), ContinuousMap.toFun (ContinuousMap.mk G) (1, x) = ↑(ContinuousMap.id (X × Y)) x\n[PROOFSTEP]\nrintro ⟨x, y⟩\n[GOAL]\ncase map_one_left.mk\nX : Type u\nY : Type v\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : HSpace X\ninst✝ : HSpace Y\nG : ↑I × X × Y → X × Y := fun p => (↑eHmul (p.fst, p.snd.fst), ↑eHmul (p.fst, p.snd.snd))\nhG : Continuous G\nx : X\ny : Y\n⊢ ContinuousMap.toFun (ContinuousMap.mk G) (1, x, y) = ↑(ContinuousMap.id (X × Y)) (x, y)\n[PROOFSTEP]\nexact Prod.mk.inj_iff.mpr ⟨HSpace.eHmul.1.3 x, HSpace.eHmul.1.3 y⟩\n[GOAL]\ncase prop'\nX : Type u\nY : Type v\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : HSpace X\ninst✝ : HSpace Y\nG : ↑I × X × Y → X × Y := fun p => (↑eHmul (p.fst, p.snd.fst), ↑eHmul (p.fst, p.snd.snd))\nhG : Continuous G\n⊢ ∀ (t : ↑I) (x : X × Y),\n    x ∈ {(e, e)} →\n      ↑(ContinuousMap.mk fun x =>\n                ContinuousMap.toFun\n                  { toContinuousMap := ContinuousMap.mk G,\n                      map_zero_left :=\n                        (_ :\n                          ∀ (x : X × Y),\n                            ContinuousMap.toFun (ContinuousMap.mk G) (0, x) =\n                              ↑(comp\n                                    (ContinuousMap.mk fun p =>\n                                      (↑hmul (p.fst.fst, p.snd.fst), ↑hmul (p.fst.snd, p.snd.snd)))\n                                    (prodMk (const (X × Y) (e, e)) (ContinuousMap.id (X × Y))))\n                                x),\n                      map_one_left :=\n                        (_ :\n                          ∀ (x : X × Y),\n                            ContinuousMap.toFun (ContinuousMap.mk G) (1, x) =\n                              ↑(ContinuousMap.id (X × Y)) x) }.toContinuousMap\n                  (t, x))\n            x =\n          ↑(comp (ContinuousMap.mk fun p => (↑hmul (p.fst.fst, p.snd.fst), ↑hmul (p.fst.snd, p.snd.snd)))\n                (prodMk (const (X × Y) (e, e)) (ContinuousMap.id (X × Y))))\n            x ∧\n        ↑(ContinuousMap.mk fun x =>\n                ContinuousMap.toFun\n                  { toContinuousMap := ContinuousMap.mk G,\n                      map_zero_left :=\n                        (_ :\n                          ∀ (x : X × Y),\n                            ContinuousMap.toFun (ContinuousMap.mk G) (0, x) =\n                              ↑(comp\n                                    (ContinuousMap.mk fun p =>\n                                      (↑hmul (p.fst.fst, p.snd.fst), ↑hmul (p.fst.snd, p.snd.snd)))\n                                    (prodMk (const (X × Y) (e, e)) (ContinuousMap.id (X × Y))))\n                                x),\n                      map_one_left :=\n                        (_ :\n                          ∀ (x : X × Y),\n                            ContinuousMap.toFun (ContinuousMap.mk G) (1, x) =\n                              ↑(ContinuousMap.id (X × Y)) x) }.toContinuousMap\n                  (t, x))\n            x =\n          ↑(ContinuousMap.id (X × Y)) x\n[PROOFSTEP]\nrintro t ⟨x, y⟩ h\n[GOAL]\ncase prop'.mk\nX : Type u\nY : Type v\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : HSpace X\ninst✝ : HSpace Y\nG : ↑I × X × Y → X × Y := fun p => (↑eHmul (p.fst, p.snd.fst), ↑eHmul (p.fst, p.snd.snd))\nhG : Continuous G\nt : ↑I\nx : X\ny : Y\nh : (x, y) ∈ {(e, e)}\n⊢ ↑(ContinuousMap.mk fun x =>\n            ContinuousMap.toFun\n              { toContinuousMap := ContinuousMap.mk G,\n                  map_zero_left :=\n                    (_ :\n                      ∀ (x : X × Y),\n                        ContinuousMap.toFun (ContinuousMap.mk G) (0, x) =\n                          ↑(comp\n                                (ContinuousMap.mk fun p => (↑hmul (p.fst.fst, p.snd.fst), ↑hmul (p.fst.snd, p.snd.snd)))\n                                (prodMk (const (X × Y) (e, e)) (ContinuousMap.id (X × Y))))\n                            x),\n                  map_one_left :=\n                    (_ :\n                      ∀ (x : X × Y),\n                        ContinuousMap.toFun (ContinuousMap.mk G) (1, x) =\n                          ↑(ContinuousMap.id (X × Y)) x) }.toContinuousMap\n              (t, x))\n        (x, y) =\n      ↑(comp (ContinuousMap.mk fun p => (↑hmul (p.fst.fst, p.snd.fst), ↑hmul (p.fst.snd, p.snd.snd)))\n            (prodMk (const (X × Y) (e, e)) (ContinuousMap.id (X × Y))))\n        (x, y) ∧\n    ↑(ContinuousMap.mk fun x =>\n            ContinuousMap.toFun\n              { toContinuousMap := ContinuousMap.mk G,\n                  map_zero_left :=\n                    (_ :\n                      ∀ (x : X × Y),\n                        ContinuousMap.toFun (ContinuousMap.mk G) (0, x) =\n                          ↑(comp\n                                (ContinuousMap.mk fun p => (↑hmul (p.fst.fst, p.snd.fst), ↑hmul (p.fst.snd, p.snd.snd)))\n                                (prodMk (const (X × Y) (e, e)) (ContinuousMap.id (X × Y))))\n                            x),\n                  map_one_left :=\n                    (_ :\n                      ∀ (x : X × Y),\n                        ContinuousMap.toFun (ContinuousMap.mk G) (1, x) =\n                          ↑(ContinuousMap.id (X × Y)) x) }.toContinuousMap\n              (t, x))\n        (x, y) =\n      ↑(ContinuousMap.id (X × Y)) (x, y)\n[PROOFSTEP]\nreplace h := Prod.mk.inj_iff.mp (Set.mem_singleton_iff.mp h)\n[GOAL]\ncase prop'.mk\nX : Type u\nY : Type v\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : HSpace X\ninst✝ : HSpace Y\nG : ↑I × X × Y → X × Y := fun p => (↑eHmul (p.fst, p.snd.fst), ↑eHmul (p.fst, p.snd.snd))\nhG : Continuous G\nt : ↑I\nx : X\ny : Y\nh : x = e ∧ y = e\n⊢ ↑(ContinuousMap.mk fun x =>\n            ContinuousMap.toFun\n              { toContinuousMap := ContinuousMap.mk G,\n                  map_zero_left :=\n                    (_ :\n                      ∀ (x : X × Y),\n                        ContinuousMap.toFun (ContinuousMap.mk G) (0, x) =\n                          ↑(comp\n                                (ContinuousMap.mk fun p => (↑hmul (p.fst.fst, p.snd.fst), ↑hmul (p.fst.snd, p.snd.snd)))\n                                (prodMk (const (X × Y) (e, e)) (ContinuousMap.id (X × Y))))\n                            x),\n                  map_one_left :=\n                    (_ :\n                      ∀ (x : X × Y),\n                        ContinuousMap.toFun (ContinuousMap.mk G) (1, x) =\n                          ↑(ContinuousMap.id (X × Y)) x) }.toContinuousMap\n              (t, x))\n        (x, y) =\n      ↑(comp (ContinuousMap.mk fun p => (↑hmul (p.fst.fst, p.snd.fst), ↑hmul (p.fst.snd, p.snd.snd)))\n            (prodMk (const (X × Y) (e, e)) (ContinuousMap.id (X × Y))))\n        (x, y) ∧\n    ↑(ContinuousMap.mk fun x =>\n            ContinuousMap.toFun\n              { toContinuousMap := ContinuousMap.mk G,\n                  map_zero_left :=\n                    (_ :\n                      ∀ (x : X × Y),\n                        ContinuousMap.toFun (ContinuousMap.mk G) (0, x) =\n                          ↑(comp\n                                (ContinuousMap.mk fun p => (↑hmul (p.fst.fst, p.snd.fst), ↑hmul (p.fst.snd, p.snd.snd)))\n                                (prodMk (const (X × Y) (e, e)) (ContinuousMap.id (X × Y))))\n                            x),\n                  map_one_left :=\n                    (_ :\n                      ∀ (x : X × Y),\n                        ContinuousMap.toFun (ContinuousMap.mk G) (1, x) =\n                          ↑(ContinuousMap.id (X × Y)) x) }.toContinuousMap\n              (t, x))\n        (x, y) =\n      ↑(ContinuousMap.id (X × Y)) (x, y)\n[PROOFSTEP]\nexact\n  ⟨Prod.mk.inj_iff.mpr\n      ⟨HomotopyRel.eq_fst HSpace.eHmul t (Set.mem_singleton_iff.mpr h.1),\n        HomotopyRel.eq_fst HSpace.eHmul t (Set.mem_singleton_iff.mpr h.2)⟩,\n    Prod.mk.inj_iff.mpr ⟨(HSpace.eHmul.2 t x h.1).2, (HSpace.eHmul.2 t y h.2).2⟩⟩\n[GOAL]\nX : Type u\nY : Type v\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : HSpace X\ninst✝ : HSpace Y\n⊢ HomotopyRel\n    (comp (ContinuousMap.mk fun p => (↑hmul (p.fst.fst, p.snd.fst), ↑hmul (p.fst.snd, p.snd.snd)))\n      (prodMk (ContinuousMap.id (X × Y)) (const (X × Y) (e, e))))\n    (ContinuousMap.id (X × Y)) {(e, e)}\n[PROOFSTEP]\nlet G : I × X × Y → X × Y := fun p => (HSpace.hmulE (p.1, p.2.1), HSpace.hmulE (p.1, p.2.2))\n[GOAL]\nX : Type u\nY : Type v\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : HSpace X\ninst✝ : HSpace Y\nG : ↑I × X × Y → X × Y := fun p => (↑hmulE (p.fst, p.snd.fst), ↑hmulE (p.fst, p.snd.snd))\n⊢ HomotopyRel\n    (comp (ContinuousMap.mk fun p => (↑hmul (p.fst.fst, p.snd.fst), ↑hmul (p.fst.snd, p.snd.snd)))\n      (prodMk (ContinuousMap.id (X × Y)) (const (X × Y) (e, e))))\n    (ContinuousMap.id (X × Y)) {(e, e)}\n[PROOFSTEP]\nhave hG : Continuous G :=\n  (Continuous.comp HSpace.hmulE.1.1.2 (continuous_fst.prod_mk (continuous_fst.comp continuous_snd))).prod_mk\n    (Continuous.comp HSpace.hmulE.1.1.2 (continuous_fst.prod_mk (continuous_snd.comp continuous_snd)))\n[GOAL]\nX : Type u\nY : Type v\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : HSpace X\ninst✝ : HSpace Y\nG : ↑I × X × Y → X × Y := fun p => (↑hmulE (p.fst, p.snd.fst), ↑hmulE (p.fst, p.snd.snd))\nhG : Continuous G\n⊢ HomotopyRel\n    (comp (ContinuousMap.mk fun p => (↑hmul (p.fst.fst, p.snd.fst), ↑hmul (p.fst.snd, p.snd.snd)))\n      (prodMk (ContinuousMap.id (X × Y)) (const (X × Y) (e, e))))\n    (ContinuousMap.id (X × Y)) {(e, e)}\n[PROOFSTEP]\nuse!⟨G, hG⟩\n[GOAL]\ncase map_zero_left\nX : Type u\nY : Type v\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : HSpace X\ninst✝ : HSpace Y\nG : ↑I × X × Y → X × Y := fun p => (↑hmulE (p.fst, p.snd.fst), ↑hmulE (p.fst, p.snd.snd))\nhG : Continuous G\n⊢ ∀ (x : X × Y),\n    ContinuousMap.toFun (ContinuousMap.mk G) (0, x) =\n      ↑(comp (ContinuousMap.mk fun p => (↑hmul (p.fst.fst, p.snd.fst), ↑hmul (p.fst.snd, p.snd.snd)))\n            (prodMk (ContinuousMap.id (X × Y)) (const (X × Y) (e, e))))\n        x\n[PROOFSTEP]\nrintro ⟨x, y⟩\n[GOAL]\ncase map_zero_left.mk\nX : Type u\nY : Type v\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : HSpace X\ninst✝ : HSpace Y\nG : ↑I × X × Y → X × Y := fun p => (↑hmulE (p.fst, p.snd.fst), ↑hmulE (p.fst, p.snd.snd))\nhG : Continuous G\nx : X\ny : Y\n⊢ ContinuousMap.toFun (ContinuousMap.mk G) (0, x, y) =\n    ↑(comp (ContinuousMap.mk fun p => (↑hmul (p.fst.fst, p.snd.fst), ↑hmul (p.fst.snd, p.snd.snd)))\n          (prodMk (ContinuousMap.id (X × Y)) (const (X × Y) (e, e))))\n      (x, y)\n[PROOFSTEP]\nexacts [Prod.mk.inj_iff.mpr ⟨HSpace.hmulE.1.2 x, HSpace.hmulE.1.2 y⟩]\n[GOAL]\ncase map_one_left\nX : Type u\nY : Type v\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : HSpace X\ninst✝ : HSpace Y\nG : ↑I × X × Y → X × Y := fun p => (↑hmulE (p.fst, p.snd.fst), ↑hmulE (p.fst, p.snd.snd))\nhG : Continuous G\n⊢ ∀ (x : X × Y), ContinuousMap.toFun (ContinuousMap.mk G) (1, x) = ↑(ContinuousMap.id (X × Y)) x\n[PROOFSTEP]\nrintro ⟨x, y⟩\n[GOAL]\ncase map_one_left.mk\nX : Type u\nY : Type v\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : HSpace X\ninst✝ : HSpace Y\nG : ↑I × X × Y → X × Y := fun p => (↑hmulE (p.fst, p.snd.fst), ↑hmulE (p.fst, p.snd.snd))\nhG : Continuous G\nx : X\ny : Y\n⊢ ContinuousMap.toFun (ContinuousMap.mk G) (1, x, y) = ↑(ContinuousMap.id (X × Y)) (x, y)\n[PROOFSTEP]\nexact Prod.mk.inj_iff.mpr ⟨HSpace.hmulE.1.3 x, HSpace.hmulE.1.3 y⟩\n[GOAL]\ncase prop'\nX : Type u\nY : Type v\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : HSpace X\ninst✝ : HSpace Y\nG : ↑I × X × Y → X × Y := fun p => (↑hmulE (p.fst, p.snd.fst), ↑hmulE (p.fst, p.snd.snd))\nhG : Continuous G\n⊢ ∀ (t : ↑I) (x : X × Y),\n    x ∈ {(e, e)} →\n      ↑(ContinuousMap.mk fun x =>\n                ContinuousMap.toFun\n                  { toContinuousMap := ContinuousMap.mk G,\n                      map_zero_left :=\n                        (_ :\n                          ∀ (x : X × Y),\n                            ContinuousMap.toFun (ContinuousMap.mk G) (0, x) =\n                              ↑(comp\n                                    (ContinuousMap.mk fun p =>\n                                      (↑hmul (p.fst.fst, p.snd.fst), ↑hmul (p.fst.snd, p.snd.snd)))\n                                    (prodMk (ContinuousMap.id (X × Y)) (const (X × Y) (e, e))))\n                                x),\n                      map_one_left :=\n                        (_ :\n                          ∀ (x : X × Y),\n                            ContinuousMap.toFun (ContinuousMap.mk G) (1, x) =\n                              ↑(ContinuousMap.id (X × Y)) x) }.toContinuousMap\n                  (t, x))\n            x =\n          ↑(comp (ContinuousMap.mk fun p => (↑hmul (p.fst.fst, p.snd.fst), ↑hmul (p.fst.snd, p.snd.snd)))\n                (prodMk (ContinuousMap.id (X × Y)) (const (X × Y) (e, e))))\n            x ∧\n        ↑(ContinuousMap.mk fun x =>\n                ContinuousMap.toFun\n                  { toContinuousMap := ContinuousMap.mk G,\n                      map_zero_left :=\n                        (_ :\n                          ∀ (x : X × Y),\n                            ContinuousMap.toFun (ContinuousMap.mk G) (0, x) =\n                              ↑(comp\n                                    (ContinuousMap.mk fun p =>\n                                      (↑hmul (p.fst.fst, p.snd.fst), ↑hmul (p.fst.snd, p.snd.snd)))\n                                    (prodMk (ContinuousMap.id (X × Y)) (const (X × Y) (e, e))))\n                                x),\n                      map_one_left :=\n                        (_ :\n                          ∀ (x : X × Y),\n                            ContinuousMap.toFun (ContinuousMap.mk G) (1, x) =\n                              ↑(ContinuousMap.id (X × Y)) x) }.toContinuousMap\n                  (t, x))\n            x =\n          ↑(ContinuousMap.id (X × Y)) x\n[PROOFSTEP]\nrintro t ⟨x, y⟩ h\n[GOAL]\ncase prop'.mk\nX : Type u\nY : Type v\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : HSpace X\ninst✝ : HSpace Y\nG : ↑I × X × Y → X × Y := fun p => (↑hmulE (p.fst, p.snd.fst), ↑hmulE (p.fst, p.snd.snd))\nhG : Continuous G\nt : ↑I\nx : X\ny : Y\nh : (x, y) ∈ {(e, e)}\n⊢ ↑(ContinuousMap.mk fun x =>\n            ContinuousMap.toFun\n              { toContinuousMap := ContinuousMap.mk G,\n                  map_zero_left :=\n                    (_ :\n                      ∀ (x : X × Y),\n                        ContinuousMap.toFun (ContinuousMap.mk G) (0, x) =\n                          ↑(comp\n                                (ContinuousMap.mk fun p => (↑hmul (p.fst.fst, p.snd.fst), ↑hmul (p.fst.snd, p.snd.snd)))\n                                (prodMk (ContinuousMap.id (X × Y)) (const (X × Y) (e, e))))\n                            x),\n                  map_one_left :=\n                    (_ :\n                      ∀ (x : X × Y),\n                        ContinuousMap.toFun (ContinuousMap.mk G) (1, x) =\n                          ↑(ContinuousMap.id (X × Y)) x) }.toContinuousMap\n              (t, x))\n        (x, y) =\n      ↑(comp (ContinuousMap.mk fun p => (↑hmul (p.fst.fst, p.snd.fst), ↑hmul (p.fst.snd, p.snd.snd)))\n            (prodMk (ContinuousMap.id (X × Y)) (const (X × Y) (e, e))))\n        (x, y) ∧\n    ↑(ContinuousMap.mk fun x =>\n            ContinuousMap.toFun\n              { toContinuousMap := ContinuousMap.mk G,\n                  map_zero_left :=\n                    (_ :\n                      ∀ (x : X × Y),\n                        ContinuousMap.toFun (ContinuousMap.mk G) (0, x) =\n                          ↑(comp\n                                (ContinuousMap.mk fun p => (↑hmul (p.fst.fst, p.snd.fst), ↑hmul (p.fst.snd, p.snd.snd)))\n                                (prodMk (ContinuousMap.id (X × Y)) (const (X × Y) (e, e))))\n                            x),\n                  map_one_left :=\n                    (_ :\n                      ∀ (x : X × Y),\n                        ContinuousMap.toFun (ContinuousMap.mk G) (1, x) =\n                          ↑(ContinuousMap.id (X × Y)) x) }.toContinuousMap\n              (t, x))\n        (x, y) =\n      ↑(ContinuousMap.id (X × Y)) (x, y)\n[PROOFSTEP]\nreplace h := Prod.mk.inj_iff.mp (Set.mem_singleton_iff.mp h)\n[GOAL]\ncase prop'.mk\nX : Type u\nY : Type v\ninst✝³ : TopologicalSpace X\ninst✝² : TopologicalSpace Y\ninst✝¹ : HSpace X\ninst✝ : HSpace Y\nG : ↑I × X × Y → X × Y := fun p => (↑hmulE (p.fst, p.snd.fst), ↑hmulE (p.fst, p.snd.snd))\nhG : Continuous G\nt : ↑I\nx : X\ny : Y\nh : x = e ∧ y = e\n⊢ ↑(ContinuousMap.mk fun x =>\n            ContinuousMap.toFun\n              { toContinuousMap := ContinuousMap.mk G,\n                  map_zero_left :=\n                    (_ :\n                      ∀ (x : X × Y),\n                        ContinuousMap.toFun (ContinuousMap.mk G) (0, x) =\n                          ↑(comp\n                                (ContinuousMap.mk fun p => (↑hmul (p.fst.fst, p.snd.fst), ↑hmul (p.fst.snd, p.snd.snd)))\n                                (prodMk (ContinuousMap.id (X × Y)) (const (X × Y) (e, e))))\n                            x),\n                  map_one_left :=\n                    (_ :\n                      ∀ (x : X × Y),\n                        ContinuousMap.toFun (ContinuousMap.mk G) (1, x) =\n                          ↑(ContinuousMap.id (X × Y)) x) }.toContinuousMap\n              (t, x))\n        (x, y) =\n      ↑(comp (ContinuousMap.mk fun p => (↑hmul (p.fst.fst, p.snd.fst), ↑hmul (p.fst.snd, p.snd.snd)))\n            (prodMk (ContinuousMap.id (X × Y)) (const (X × Y) (e, e))))\n        (x, y) ∧\n    ↑(ContinuousMap.mk fun x =>\n            ContinuousMap.toFun\n              { toContinuousMap := ContinuousMap.mk G,\n                  map_zero_left :=\n                    (_ :\n                      ∀ (x : X × Y),\n                        ContinuousMap.toFun (ContinuousMap.mk G) (0, x) =\n                          ↑(comp\n                                (ContinuousMap.mk fun p => (↑hmul (p.fst.fst, p.snd.fst), ↑hmul (p.fst.snd, p.snd.snd)))\n                                (prodMk (ContinuousMap.id (X × Y)) (const (X × Y) (e, e))))\n                            x),\n                  map_one_left :=\n                    (_ :\n                      ∀ (x : X × Y),\n                        ContinuousMap.toFun (ContinuousMap.mk G) (1, x) =\n                          ↑(ContinuousMap.id (X × Y)) x) }.toContinuousMap\n              (t, x))\n        (x, y) =\n      ↑(ContinuousMap.id (X × Y)) (x, y)\n[PROOFSTEP]\nexact\n  ⟨Prod.mk.inj_iff.mpr\n      ⟨HomotopyRel.eq_fst HSpace.hmulE t (Set.mem_singleton_iff.mpr h.1),\n        HomotopyRel.eq_fst HSpace.hmulE t (Set.mem_singleton_iff.mpr h.2)⟩,\n    Prod.mk.inj_iff.mpr ⟨(HSpace.hmulE.2 t x h.1).2, (HSpace.hmulE.2 t y h.2).2⟩⟩\n[GOAL]\nM : Type u\ninst✝² : MulOneClass M\ninst✝¹ : TopologicalSpace M\ninst✝ : ContinuousMul M\n⊢ comp (ContinuousMap.mk (Function.uncurry Mul.mul)) (prodMk (const M 1) (ContinuousMap.id M)) = ContinuousMap.id M\n[PROOFSTEP]\next1\n[GOAL]\ncase h\nM : Type u\ninst✝² : MulOneClass M\ninst✝¹ : TopologicalSpace M\ninst✝ : ContinuousMul M\na✝ : M\n⊢ ↑(comp (ContinuousMap.mk (Function.uncurry Mul.mul)) (prodMk (const M 1) (ContinuousMap.id M))) a✝ =\n    ↑(ContinuousMap.id M) a✝\n[PROOFSTEP]\napply one_mul\n[GOAL]\nM : Type u\ninst✝² : MulOneClass M\ninst✝¹ : TopologicalSpace M\ninst✝ : ContinuousMul M\n⊢ comp (ContinuousMap.mk (Function.uncurry Mul.mul)) (prodMk (ContinuousMap.id M) (const M 1)) = ContinuousMap.id M\n[PROOFSTEP]\next1\n[GOAL]\ncase h\nM : Type u\ninst✝² : MulOneClass M\ninst✝¹ : TopologicalSpace M\ninst✝ : ContinuousMul M\na✝ : M\n⊢ ↑(comp (ContinuousMap.mk (Function.uncurry Mul.mul)) (prodMk (ContinuousMap.id M) (const M 1))) a✝ =\n    ↑(ContinuousMap.id M) a✝\n[PROOFSTEP]\napply mul_one\n[GOAL]\nG G' : Type u\ninst✝⁵ : TopologicalSpace G\ninst✝⁴ : Group G\ninst✝³ : TopologicalGroup G\ninst✝² : TopologicalSpace G'\ninst✝¹ : Group G'\ninst✝ : TopologicalGroup G'\n⊢ hSpace (G × G') = HSpace.prod G G'\n[PROOFSTEP]\nsimp only [HSpace.prod]\n[GOAL]\nG G' : Type u\ninst✝⁵ : TopologicalSpace G\ninst✝⁴ : Group G\ninst✝³ : TopologicalGroup G\ninst✝² : TopologicalSpace G'\ninst✝¹ : Group G'\ninst✝ : TopologicalGroup G'\n⊢ hSpace (G × G') =\n    { hmul := ContinuousMap.mk fun p => (↑HSpace.hmul (p.fst.fst, p.snd.fst), ↑HSpace.hmul (p.fst.snd, p.snd.snd)),\n      e := (HSpace.e, HSpace.e),\n      hmul_e_e :=\n        (_ :\n          ↑(ContinuousMap.mk fun p => (↑HSpace.hmul (p.fst.fst, p.snd.fst), ↑HSpace.hmul (p.fst.snd, p.snd.snd)))\n              ((HSpace.e, HSpace.e), HSpace.e, HSpace.e) =\n            (HSpace.e, HSpace.e)),\n      eHmul :=\n        {\n          toHomotopy :=\n            {\n              toContinuousMap :=\n                ContinuousMap.mk fun p => (↑HSpace.eHmul (p.fst, p.snd.fst), ↑HSpace.eHmul (p.fst, p.snd.snd)),\n              map_zero_left :=\n                (_ :\n                  ∀ (x : G × G'),\n                    ContinuousMap.toFun\n                        (ContinuousMap.mk fun p => (↑HSpace.eHmul (p.fst, p.snd.fst), ↑HSpace.eHmul (p.fst, p.snd.snd)))\n                        (0, x) =\n                      ↑(comp\n                            (ContinuousMap.mk fun p =>\n                              (↑HSpace.hmul (p.fst.fst, p.snd.fst), ↑HSpace.hmul (p.fst.snd, p.snd.snd)))\n                            (prodMk (const (G × G') (HSpace.e, HSpace.e)) (ContinuousMap.id (G × G'))))\n                        x),\n              map_one_left :=\n                (_ :\n                  ∀ (x : G × G'),\n                    ContinuousMap.toFun\n                        (ContinuousMap.mk fun p => (↑HSpace.eHmul (p.fst, p.snd.fst), ↑HSpace.eHmul (p.fst, p.snd.snd)))\n                        (1, x) =\n                      ↑(ContinuousMap.id (G × G')) x) },\n          prop' :=\n            (_ :\n              ∀ (t : ↑I) (x : G × G'),\n                x ∈ {(HSpace.e, HSpace.e)} →\n                  ↑(ContinuousMap.mk fun x =>\n                            ContinuousMap.toFun\n                              {\n                                  toContinuousMap :=\n                                    ContinuousMap.mk fun p =>\n                                      (↑HSpace.eHmul (p.fst, p.snd.fst), ↑HSpace.eHmul (p.fst, p.snd.snd)),\n                                  map_zero_left :=\n                                    (_ :\n                                      ∀ (x : G × G'),\n                                        ContinuousMap.toFun\n                                            (ContinuousMap.mk fun p =>\n                                              (↑HSpace.eHmul (p.fst, p.snd.fst), ↑HSpace.eHmul (p.fst, p.snd.snd)))\n                                            (0, x) =\n                                          ↑(comp\n                                                (ContinuousMap.mk fun p =>\n                                                  (↑HSpace.hmul (p.fst.fst, p.snd.fst),\n                                                    ↑HSpace.hmul (p.fst.snd, p.snd.snd)))\n                                                (prodMk (const (G × G') (HSpace.e, HSpace.e))\n                                                  (ContinuousMap.id (G × G'))))\n                                            x),\n                                  map_one_left :=\n                                    (_ :\n                                      ∀ (x : G × G'),\n                                        ContinuousMap.toFun\n                                            (ContinuousMap.mk fun p =>\n                                              (↑HSpace.eHmul (p.fst, p.snd.fst), ↑HSpace.eHmul (p.fst, p.snd.snd)))\n                                            (1, x) =\n                                          ↑(ContinuousMap.id (G × G')) x) }.toContinuousMap\n                              (t, x))\n                        x =\n                      ↑(comp\n                            (ContinuousMap.mk fun p =>\n                              (↑HSpace.hmul (p.fst.fst, p.snd.fst), ↑HSpace.hmul (p.fst.snd, p.snd.snd)))\n                            (prodMk (const (G × G') (HSpace.e, HSpace.e)) (ContinuousMap.id (G × G'))))\n                        x ∧\n                    ↑(ContinuousMap.mk fun x =>\n                            ContinuousMap.toFun\n                              {\n                                  toContinuousMap :=\n                                    ContinuousMap.mk fun p =>\n                                      (↑HSpace.eHmul (p.fst, p.snd.fst), ↑HSpace.eHmul (p.fst, p.snd.snd)),\n                                  map_zero_left :=\n                                    (_ :\n                                      ∀ (x : G × G'),\n                                        ContinuousMap.toFun\n                                            (ContinuousMap.mk fun p =>\n                                              (↑HSpace.eHmul (p.fst, p.snd.fst), ↑HSpace.eHmul (p.fst, p.snd.snd)))\n                                            (0, x) =\n                                          ↑(comp\n                                                (ContinuousMap.mk fun p =>\n                                                  (↑HSpace.hmul (p.fst.fst, p.snd.fst),\n                                                    ↑HSpace.hmul (p.fst.snd, p.snd.snd)))\n                                                (prodMk (const (G × G') (HSpace.e, HSpace.e))\n                                                  (ContinuousMap.id (G × G'))))\n                                            x),\n                                  map_one_left :=\n                                    (_ :\n                                      ∀ (x : G × G'),\n                                        ContinuousMap.toFun\n                                            (ContinuousMap.mk fun p =>\n                                              (↑HSpace.eHmul (p.fst, p.snd.fst), ↑HSpace.eHmul (p.fst, p.snd.snd)))\n                                            (1, x) =\n                                          ↑(ContinuousMap.id (G × G')) x) }.toContinuousMap\n                              (t, x))\n                        x =\n                      ↑(ContinuousMap.id (G × G')) x) },\n      hmulE :=\n        {\n          toHomotopy :=\n            {\n              toContinuousMap :=\n                ContinuousMap.mk fun p => (↑HSpace.hmulE (p.fst, p.snd.fst), ↑HSpace.hmulE (p.fst, p.snd.snd)),\n              map_zero_left :=\n                (_ :\n                  ∀ (x : G × G'),\n                    ContinuousMap.toFun\n                        (ContinuousMap.mk fun p => (↑HSpace.hmulE (p.fst, p.snd.fst), ↑HSpace.hmulE (p.fst, p.snd.snd)))\n                        (0, x) =\n                      ↑(comp\n                            (ContinuousMap.mk fun p =>\n                              (↑HSpace.hmul (p.fst.fst, p.snd.fst), ↑HSpace.hmul (p.fst.snd, p.snd.snd)))\n                            (prodMk (ContinuousMap.id (G × G')) (const (G × G') (HSpace.e, HSpace.e))))\n                        x),\n              map_one_left :=\n                (_ :\n                  ∀ (x : G × G'),\n                    ContinuousMap.toFun\n                        (ContinuousMap.mk fun p => (↑HSpace.hmulE (p.fst, p.snd.fst), ↑HSpace.hmulE (p.fst, p.snd.snd)))\n                        (1, x) =\n                      ↑(ContinuousMap.id (G × G')) x) },\n          prop' :=\n            (_ :\n              ∀ (t : ↑I) (x : G × G'),\n                x ∈ {(HSpace.e, HSpace.e)} →\n                  ↑(ContinuousMap.mk fun x =>\n                            ContinuousMap.toFun\n                              {\n                                  toContinuousMap :=\n                                    ContinuousMap.mk fun p =>\n                                      (↑HSpace.hmulE (p.fst, p.snd.fst), ↑HSpace.hmulE (p.fst, p.snd.snd)),\n                                  map_zero_left :=\n                                    (_ :\n                                      ∀ (x : G × G'),\n                                        ContinuousMap.toFun\n                                            (ContinuousMap.mk fun p =>\n                                              (↑HSpace.hmulE (p.fst, p.snd.fst), ↑HSpace.hmulE (p.fst, p.snd.snd)))\n                                            (0, x) =\n                                          ↑(comp\n                                                (ContinuousMap.mk fun p =>\n                                                  (↑HSpace.hmul (p.fst.fst, p.snd.fst),\n                                                    ↑HSpace.hmul (p.fst.snd, p.snd.snd)))\n                                                (prodMk (ContinuousMap.id (G × G'))\n                                                  (const (G × G') (HSpace.e, HSpace.e))))\n                                            x),\n                                  map_one_left :=\n                                    (_ :\n                                      ∀ (x : G × G'),\n                                        ContinuousMap.toFun\n                                            (ContinuousMap.mk fun p =>\n                                              (↑HSpace.hmulE (p.fst, p.snd.fst), ↑HSpace.hmulE (p.fst, p.snd.snd)))\n                                            (1, x) =\n                                          ↑(ContinuousMap.id (G × G')) x) }.toContinuousMap\n                              (t, x))\n                        x =\n                      ↑(comp\n                            (ContinuousMap.mk fun p =>\n                              (↑HSpace.hmul (p.fst.fst, p.snd.fst), ↑HSpace.hmul (p.fst.snd, p.snd.snd)))\n                            (prodMk (ContinuousMap.id (G × G')) (const (G × G') (HSpace.e, HSpace.e))))\n                        x ∧\n                    ↑(ContinuousMap.mk fun x =>\n                            ContinuousMap.toFun\n                              {\n                                  toContinuousMap :=\n                                    ContinuousMap.mk fun p =>\n                                      (↑HSpace.hmulE (p.fst, p.snd.fst), ↑HSpace.hmulE (p.fst, p.snd.snd)),\n                                  map_zero_left :=\n                                    (_ :\n                                      ∀ (x : G × G'),\n                                        ContinuousMap.toFun\n                                            (ContinuousMap.mk fun p =>\n                                              (↑HSpace.hmulE (p.fst, p.snd.fst), ↑HSpace.hmulE (p.fst, p.snd.snd)))\n                                            (0, x) =\n                                          ↑(comp\n                                                (ContinuousMap.mk fun p =>\n                                                  (↑HSpace.hmul (p.fst.fst, p.snd.fst),\n                                                    ↑HSpace.hmul (p.fst.snd, p.snd.snd)))\n                                                (prodMk (ContinuousMap.id (G × G'))\n                                                  (const (G × G') (HSpace.e, HSpace.e))))\n                                            x),\n                                  map_one_left :=\n                                    (_ :\n                                      ∀ (x : G × G'),\n                                        ContinuousMap.toFun\n                                            (ContinuousMap.mk fun p =>\n                                              (↑HSpace.hmulE (p.fst, p.snd.fst), ↑HSpace.hmulE (p.fst, p.snd.snd)))\n                                            (1, x) =\n                                          ↑(ContinuousMap.id (G × G')) x) }.toContinuousMap\n                              (t, x))\n                        x =\n                      ↑(ContinuousMap.id (G × G')) x) } }\n[PROOFSTEP]\nrfl\n[GOAL]\n⊢ Continuous fun p => 2 * ↑p.fst\n[PROOFSTEP]\ncontinuity\n[GOAL]\n⊢ Continuous fun p => 1 + ↑p.snd\n[PROOFSTEP]\ncontinuity\n[GOAL]\nθ : ↑I\n⊢ 2 * ↑(0, θ).fst / (1 + ↑(0, θ).snd) ≤ 0\n[PROOFSTEP]\nsimp only [coe_zero, mul_zero, zero_div, le_refl]\n[GOAL]\nθ : ↑I\n⊢ 1 * (1 + ↑(1, θ).snd) ≤ 2 * ↑(1, θ).fst\n[PROOFSTEP]\ndsimp only\n[GOAL]\nθ : ↑I\n⊢ 1 * (1 + ↑θ) ≤ 2 * ↑1\n[PROOFSTEP]\nrw [coe_one, one_mul, mul_one, add_comm, ← one_add_one_eq_two]\n[GOAL]\nθ : ↑I\n⊢ ↑θ + 1 ≤ 1 + 1\n[PROOFSTEP]\nsimp only [add_le_add_iff_right]\n[GOAL]\nθ : ↑I\n⊢ ↑θ ≤ 1\n[PROOFSTEP]\nexact le_one _\n[GOAL]\nt : ↑I\n⊢ ↑(qRight (t, 0)) = if ↑t ≤ 1 / 2 then 2 * ↑t else 1\n[PROOFSTEP]\nsimp only [qRight, coe_zero, add_zero, div_one]\n[GOAL]\nt : ↑I\n⊢ ↑(Set.projIcc 0 1 qRight.proof_1 (2 * ↑t)) = if ↑t ≤ 1 / 2 then 2 * ↑t else 1\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nt : ↑I\nh✝ : ↑t ≤ 1 / 2\n⊢ ↑(Set.projIcc 0 1 qRight.proof_1 (2 * ↑t)) = 2 * ↑t\n[PROOFSTEP]\nrw [Set.projIcc_of_mem _ ((mul_pos_mem_iff zero_lt_two).2 _)]\n[GOAL]\nt : ↑I\nh✝ : ↑t ≤ 1 / 2\n⊢ ↑t ∈ Set.Icc 0 (1 / 2)\n[PROOFSTEP]\nrefine' ⟨t.2.1, _⟩\n[GOAL]\nt : ↑I\nh✝ : ↑t ≤ 1 / 2\n⊢ ↑t ≤ 1 / 2\n[PROOFSTEP]\ntauto\n[GOAL]\ncase neg\nt : ↑I\nh✝ : ¬↑t ≤ 1 / 2\n⊢ ↑(Set.projIcc 0 1 qRight.proof_1 (2 * ↑t)) = 1\n[PROOFSTEP]\nrw [(Set.projIcc_eq_right _).2]\n[GOAL]\ncase neg\nt : ↑I\nh✝ : ¬↑t ≤ 1 / 2\n⊢ 1 ≤ 2 * ↑t\n[PROOFSTEP]\nlinarith\n[GOAL]\nt : ↑I\nh✝ : ¬↑t ≤ 1 / 2\n⊢ 0 < 1\n[PROOFSTEP]\nexact zero_lt_one\n[GOAL]\nt : ↑I\n⊢ qRight (t, 1) = Set.projIcc 0 1 (_ : 0 ≤ 1) ↑t\n[PROOFSTEP]\nrw [qRight]\n[GOAL]\nt : ↑I\n⊢ Set.projIcc 0 1 qRight.proof_1 (2 * ↑(t, 1).fst / (1 + ↑(t, 1).snd)) = Set.projIcc 0 1 (_ : 0 ≤ 1) ↑t\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_x\nt : ↑I\n⊢ 2 * ↑(t, 1).fst / (1 + ↑(t, 1).snd) = ↑t\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase e_x\nt : ↑I\n⊢ 2 * ↑t / 2 = ↑t\n[PROOFSTEP]\napply mul_div_cancel_left\n[GOAL]\ncase e_x.ha\nt : ↑I\n⊢ 2 ≠ 0\n[PROOFSTEP]\nexact two_ne_zero\n[GOAL]\nX : Type u\ninst✝ : TopologicalSpace X\nx y : X\nθ : ↑I\nγ : Path x y\n⊢ ContinuousMap.toFun (ContinuousMap.mk fun t => ↑γ (qRight (t, θ))) 0 = x\n[PROOFSTEP]\ndsimp only\n[GOAL]\nX : Type u\ninst✝ : TopologicalSpace X\nx y : X\nθ : ↑I\nγ : Path x y\n⊢ ↑γ (qRight (0, θ)) = x\n[PROOFSTEP]\nrw [qRight_zero_left, γ.source]\n[GOAL]\nX : Type u\ninst✝ : TopologicalSpace X\nx y : X\nθ : ↑I\nγ : Path x y\n⊢ ContinuousMap.toFun (ContinuousMap.mk fun t => ↑γ (qRight (t, θ))) 1 = y\n[PROOFSTEP]\ndsimp only\n[GOAL]\nX : Type u\ninst✝ : TopologicalSpace X\nx y : X\nθ : ↑I\nγ : Path x y\n⊢ ↑γ (qRight (1, θ)) = y\n[PROOFSTEP]\nrw [qRight_one_left, γ.target]\n[GOAL]\nX : Type u\ninst✝ : TopologicalSpace X\nx y : X\nγ : Path x y\n⊢ delayReflRight 0 γ = trans γ (refl y)\n[PROOFSTEP]\next t\n[GOAL]\ncase a.h\nX : Type u\ninst✝ : TopologicalSpace X\nx y : X\nγ : Path x y\nt : ↑I\n⊢ ↑(delayReflRight 0 γ) t = ↑(trans γ (refl y)) t\n[PROOFSTEP]\nsimp only [delayReflRight, trans_apply, refl_extend, Path.coe_mk_mk, Function.comp_apply, refl_apply]\n[GOAL]\ncase a.h\nX : Type u\ninst✝ : TopologicalSpace X\nx y : X\nγ : Path x y\nt : ↑I\n⊢ ↑γ (qRight (t, 0)) = if h : ↑t ≤ 1 / 2 then ↑γ { val := 2 * ↑t, property := (_ : 2 * ↑t ∈ I) } else y\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nX : Type u\ninst✝ : TopologicalSpace X\nx y : X\nγ : Path x y\nt : ↑I\nh : ↑t ≤ 1 / 2\n⊢ ↑γ (qRight (t, 0)) = ↑γ { val := 2 * ↑t, property := (_ : 2 * ↑t ∈ I) }\ncase neg X : Type u inst✝ : TopologicalSpace X x y : X γ : Path x y t : ↑I h : ¬↑t ≤ 1 / 2 ⊢ ↑γ (qRight (t, 0)) = y\n[PROOFSTEP]\nswap\n[GOAL]\ncase neg\nX : Type u\ninst✝ : TopologicalSpace X\nx y : X\nγ : Path x y\nt : ↑I\nh : ¬↑t ≤ 1 / 2\n⊢ ↑γ (qRight (t, 0)) = y\ncase pos\nX : Type u\ninst✝ : TopologicalSpace X\nx y : X\nγ : Path x y\nt : ↑I\nh : ↑t ≤ 1 / 2\n⊢ ↑γ (qRight (t, 0)) = ↑γ { val := 2 * ↑t, property := (_ : 2 * ↑t ∈ I) }\n[PROOFSTEP]\nconv_rhs => rw [← γ.target]\n[GOAL]\nX : Type u\ninst✝ : TopologicalSpace X\nx y : X\nγ : Path x y\nt : ↑I\nh : ¬↑t ≤ 1 / 2\n| y\n[PROOFSTEP]\nrw [← γ.target]\n[GOAL]\nX : Type u\ninst✝ : TopologicalSpace X\nx y : X\nγ : Path x y\nt : ↑I\nh : ¬↑t ≤ 1 / 2\n| y\n[PROOFSTEP]\nrw [← γ.target]\n[GOAL]\nX : Type u\ninst✝ : TopologicalSpace X\nx y : X\nγ : Path x y\nt : ↑I\nh : ¬↑t ≤ 1 / 2\n| y\n[PROOFSTEP]\nrw [← γ.target]\n[GOAL]\ncase neg\nX : Type u\ninst✝ : TopologicalSpace X\nx y : X\nγ : Path x y\nt : ↑I\nh : ¬↑t ≤ 1 / 2\n⊢ ↑γ (qRight (t, 0)) = ↑γ 1\ncase pos\nX : Type u\ninst✝ : TopologicalSpace X\nx y : X\nγ : Path x y\nt : ↑I\nh : ↑t ≤ 1 / 2\n⊢ ↑γ (qRight (t, 0)) = ↑γ { val := 2 * ↑t, property := (_ : 2 * ↑t ∈ I) }\n[PROOFSTEP]\nall_goals apply congr_arg γ; ext1; rw [qRight_zero_right]\n[GOAL]\ncase neg\nX : Type u\ninst✝ : TopologicalSpace X\nx y : X\nγ : Path x y\nt : ↑I\nh : ¬↑t ≤ 1 / 2\n⊢ ↑γ (qRight (t, 0)) = ↑γ 1\n[PROOFSTEP]\napply congr_arg γ\n[GOAL]\ncase neg\nX : Type u\ninst✝ : TopologicalSpace X\nx y : X\nγ : Path x y\nt : ↑I\nh : ¬↑t ≤ 1 / 2\n⊢ qRight (t, 0) = 1\n[PROOFSTEP]\next1\n[GOAL]\ncase neg.a\nX : Type u\ninst✝ : TopologicalSpace X\nx y : X\nγ : Path x y\nt : ↑I\nh : ¬↑t ≤ 1 / 2\n⊢ ↑(qRight (t, 0)) = ↑1\n[PROOFSTEP]\nrw [qRight_zero_right]\n[GOAL]\ncase pos\nX : Type u\ninst✝ : TopologicalSpace X\nx y : X\nγ : Path x y\nt : ↑I\nh : ↑t ≤ 1 / 2\n⊢ ↑γ (qRight (t, 0)) = ↑γ { val := 2 * ↑t, property := (_ : 2 * ↑t ∈ I) }\n[PROOFSTEP]\napply congr_arg γ\n[GOAL]\ncase pos\nX : Type u\ninst✝ : TopologicalSpace X\nx y : X\nγ : Path x y\nt : ↑I\nh : ↑t ≤ 1 / 2\n⊢ qRight (t, 0) = { val := 2 * ↑t, property := (_ : 2 * ↑t ∈ I) }\n[PROOFSTEP]\next1\n[GOAL]\ncase pos.a\nX : Type u\ninst✝ : TopologicalSpace X\nx y : X\nγ : Path x y\nt : ↑I\nh : ↑t ≤ 1 / 2\n⊢ ↑(qRight (t, 0)) = ↑{ val := 2 * ↑t, property := (_ : 2 * ↑t ∈ I) }\n[PROOFSTEP]\nrw [qRight_zero_right]\n[GOAL]\ncase neg.a\nX : Type u\ninst✝ : TopologicalSpace X\nx y : X\nγ : Path x y\nt : ↑I\nh : ¬↑t ≤ 1 / 2\n⊢ (if ↑t ≤ 1 / 2 then 2 * ↑t else 1) = ↑1\ncase pos.a\nX : Type u\ninst✝ : TopologicalSpace X\nx y : X\nγ : Path x y\nt : ↑I\nh : ↑t ≤ 1 / 2\n⊢ (if ↑t ≤ 1 / 2 then 2 * ↑t else 1) = ↑{ val := 2 * ↑t, property := (_ : 2 * ↑t ∈ I) }\n[PROOFSTEP]\nexacts [if_neg h, if_pos h]\n[GOAL]\nX : Type u\ninst✝ : TopologicalSpace X\nx y : X\nγ : Path x y\n⊢ delayReflRight 1 γ = γ\n[PROOFSTEP]\next t\n[GOAL]\ncase a.h\nX : Type u\ninst✝ : TopologicalSpace X\nx y : X\nγ : Path x y\nt : ↑I\n⊢ ↑(delayReflRight 1 γ) t = ↑γ t\n[PROOFSTEP]\nexact congr_arg γ (qRight_one_right t)\n[GOAL]\nX : Type u\ninst✝ : TopologicalSpace X\nx y : X\nγ : Path x y\n⊢ delayReflLeft 0 γ = trans (refl x) γ\n[PROOFSTEP]\nsimp only [delayReflLeft, delayReflRight_zero, trans_symm, refl_symm, Path.symm_symm]\n[GOAL]\nX : Type u\ninst✝ : TopologicalSpace X\nx y : X\nγ : Path x y\n⊢ delayReflLeft 1 γ = γ\n[PROOFSTEP]\nsimp only [delayReflLeft, delayReflRight_one, Path.symm_symm]\n[GOAL]\nX : Type u\ninst✝ : TopologicalSpace X\nx✝ y x : X\n⊢ ∀ (t : ↑I) (x_1 : Path x x),\n    x_1 ∈ {refl x} →\n      ↑(ContinuousMap.mk fun x_2 =>\n                ContinuousMap.toFun\n                  { toContinuousMap := ContinuousMap.mk fun p => delayReflLeft p.fst p.snd,\n                      map_zero_left := (_ : ∀ (γ : Path x x), delayReflLeft 0 γ = trans (refl x) γ),\n                      map_one_left := (_ : ∀ (γ : Path x x), delayReflLeft 1 γ = γ) }.toContinuousMap\n                  (t, x_2))\n            x_1 =\n          ↑(comp (ContinuousMap.mk fun ρ => trans ρ.fst ρ.snd)\n                (prodMk (const (Path x x) (refl x)) (ContinuousMap.id (Path x x))))\n            x_1 ∧\n        ↑(ContinuousMap.mk fun x_2 =>\n                ContinuousMap.toFun\n                  { toContinuousMap := ContinuousMap.mk fun p => delayReflLeft p.fst p.snd,\n                      map_zero_left := (_ : ∀ (γ : Path x x), delayReflLeft 0 γ = trans (refl x) γ),\n                      map_one_left := (_ : ∀ (γ : Path x x), delayReflLeft 1 γ = γ) }.toContinuousMap\n                  (t, x_2))\n            x_1 =\n          ↑(ContinuousMap.id (Path x x)) x_1\n[PROOFSTEP]\nrintro t _ (rfl : _ = _)\n[GOAL]\nX : Type u\ninst✝ : TopologicalSpace X\nx✝ y x : X\nt : ↑I\n⊢ ↑(ContinuousMap.mk fun x_1 =>\n            ContinuousMap.toFun\n              { toContinuousMap := ContinuousMap.mk fun p => delayReflLeft p.fst p.snd,\n                  map_zero_left := (_ : ∀ (γ : Path x x), delayReflLeft 0 γ = trans (refl x) γ),\n                  map_one_left := (_ : ∀ (γ : Path x x), delayReflLeft 1 γ = γ) }.toContinuousMap\n              (t, x_1))\n        (refl x) =\n      ↑(comp (ContinuousMap.mk fun ρ => trans ρ.fst ρ.snd)\n            (prodMk (const (Path x x) (refl x)) (ContinuousMap.id (Path x x))))\n        (refl x) ∧\n    ↑(ContinuousMap.mk fun x_1 =>\n            ContinuousMap.toFun\n              { toContinuousMap := ContinuousMap.mk fun p => delayReflLeft p.fst p.snd,\n                  map_zero_left := (_ : ∀ (γ : Path x x), delayReflLeft 0 γ = trans (refl x) γ),\n                  map_one_left := (_ : ∀ (γ : Path x x), delayReflLeft 1 γ = γ) }.toContinuousMap\n              (t, x_1))\n        (refl x) =\n      ↑(ContinuousMap.id (Path x x)) (refl x)\n[PROOFSTEP]\nexact ⟨refl_trans_refl.symm, rfl⟩\n[GOAL]\nX : Type u\ninst✝ : TopologicalSpace X\nx✝ y x : X\n⊢ ∀ (t : ↑I) (x_1 : Path x x),\n    x_1 ∈ {refl x} →\n      ↑(ContinuousMap.mk fun x_2 =>\n                ContinuousMap.toFun\n                  { toContinuousMap := ContinuousMap.mk fun p => delayReflRight p.fst p.snd,\n                      map_zero_left := (_ : ∀ (γ : Path x x), delayReflRight 0 γ = trans γ (refl x)),\n                      map_one_left := (_ : ∀ (γ : Path x x), delayReflRight 1 γ = γ) }.toContinuousMap\n                  (t, x_2))\n            x_1 =\n          ↑(comp (ContinuousMap.mk fun ρ => trans ρ.fst ρ.snd)\n                (prodMk (ContinuousMap.id (Path x x)) (const (Path x x) (refl x))))\n            x_1 ∧\n        ↑(ContinuousMap.mk fun x_2 =>\n                ContinuousMap.toFun\n                  { toContinuousMap := ContinuousMap.mk fun p => delayReflRight p.fst p.snd,\n                      map_zero_left := (_ : ∀ (γ : Path x x), delayReflRight 0 γ = trans γ (refl x)),\n                      map_one_left := (_ : ∀ (γ : Path x x), delayReflRight 1 γ = γ) }.toContinuousMap\n                  (t, x_2))\n            x_1 =\n          ↑(ContinuousMap.id (Path x x)) x_1\n[PROOFSTEP]\nrintro t _ (rfl : _ = _)\n[GOAL]\nX : Type u\ninst✝ : TopologicalSpace X\nx✝ y x : X\nt : ↑I\n⊢ ↑(ContinuousMap.mk fun x_1 =>\n            ContinuousMap.toFun\n              { toContinuousMap := ContinuousMap.mk fun p => delayReflRight p.fst p.snd,\n                  map_zero_left := (_ : ∀ (γ : Path x x), delayReflRight 0 γ = trans γ (refl x)),\n                  map_one_left := (_ : ∀ (γ : Path x x), delayReflRight 1 γ = γ) }.toContinuousMap\n              (t, x_1))\n        (refl x) =\n      ↑(comp (ContinuousMap.mk fun ρ => trans ρ.fst ρ.snd)\n            (prodMk (ContinuousMap.id (Path x x)) (const (Path x x) (refl x))))\n        (refl x) ∧\n    ↑(ContinuousMap.mk fun x_1 =>\n            ContinuousMap.toFun\n              { toContinuousMap := ContinuousMap.mk fun p => delayReflRight p.fst p.snd,\n                  map_zero_left := (_ : ∀ (γ : Path x x), delayReflRight 0 γ = trans γ (refl x)),\n                  map_one_left := (_ : ∀ (γ : Path x x), delayReflRight 1 γ = γ) }.toContinuousMap\n              (t, x_1))\n        (refl x) =\n      ↑(ContinuousMap.id (Path x x)) (refl x)\n[PROOFSTEP]\nexact ⟨refl_trans_refl.symm, rfl⟩\n", "meta": {"mathlib_filename": "Mathlib.Topology.Homotopy.HSpaces", "llama_tokens": 18857, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7931059414036511, "lm_q2_score": 0.63341027751814, "lm_q1q2_score": 0.5023614544457724}}
{"text": "[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nα : Type u_3\ninst✝¹ : UniformSpace α\ninst✝ : Group α\nh₁ : UniformContinuous fun p => p.fst * p.snd\nh₂ : UniformContinuous fun p => p⁻¹\n⊢ UniformContinuous fun p => p.fst / p.snd\n[PROOFSTEP]\nsimpa only [div_eq_mul_inv] using h₁.comp (uniformContinuous_fst.prod_mk (h₂.comp uniformContinuous_snd))\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : UniformSpace α\ninst✝² : Group α\ninst✝¹ : UniformGroup α\ninst✝ : UniformSpace β\nf : β → α\nhf : UniformContinuous f\n⊢ UniformContinuous fun x => (f x)⁻¹\n[PROOFSTEP]\nhave : UniformContinuous fun x => 1 / f x := uniformContinuous_const.div hf\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : UniformSpace α\ninst✝² : Group α\ninst✝¹ : UniformGroup α\ninst✝ : UniformSpace β\nf : β → α\nhf : UniformContinuous f\nthis : UniformContinuous fun x => 1 / f x\n⊢ UniformContinuous fun x => (f x)⁻¹\n[PROOFSTEP]\nsimp_all\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : UniformSpace α\ninst✝² : Group α\ninst✝¹ : UniformGroup α\ninst✝ : UniformSpace β\nf g : β → α\nhf : UniformContinuous f\nhg : UniformContinuous g\n⊢ UniformContinuous fun x => f x * g x\n[PROOFSTEP]\nhave : UniformContinuous fun x => f x / (g x)⁻¹ := hf.div hg.inv\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : UniformSpace α\ninst✝² : Group α\ninst✝¹ : UniformGroup α\ninst✝ : UniformSpace β\nf g : β → α\nhf : UniformContinuous f\nhg : UniformContinuous g\nthis : UniformContinuous fun x => f x / (g x)⁻¹\n⊢ UniformContinuous fun x => f x * g x\n[PROOFSTEP]\nsimp_all\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : UniformSpace α\ninst✝² : Group α\ninst✝¹ : UniformGroup α\ninst✝ : UniformSpace β\nf : β → α\nhf : UniformContinuous f\n⊢ UniformContinuous fun x => f x ^ 0\n[PROOFSTEP]\nsimp_rw [pow_zero]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : UniformSpace α\ninst✝² : Group α\ninst✝¹ : UniformGroup α\ninst✝ : UniformSpace β\nf : β → α\nhf : UniformContinuous f\n⊢ UniformContinuous fun x => 1\n[PROOFSTEP]\nexact uniformContinuous_const\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : UniformSpace α\ninst✝² : Group α\ninst✝¹ : UniformGroup α\ninst✝ : UniformSpace β\nf : β → α\nhf : UniformContinuous f\nn : ℕ\n⊢ UniformContinuous fun x => f x ^ (n + 1)\n[PROOFSTEP]\nsimp_rw [pow_succ]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : UniformSpace α\ninst✝² : Group α\ninst✝¹ : UniformGroup α\ninst✝ : UniformSpace β\nf : β → α\nhf : UniformContinuous f\nn : ℕ\n⊢ UniformContinuous fun x => f x * f x ^ n\n[PROOFSTEP]\nexact hf.mul (hf.pow_const n)\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : UniformSpace α\ninst✝² : Group α\ninst✝¹ : UniformGroup α\ninst✝ : UniformSpace β\nf : β → α\nhf : UniformContinuous f\nn : ℕ\n⊢ UniformContinuous fun x => f x ^ ↑n\n[PROOFSTEP]\nsimp_rw [zpow_ofNat]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : UniformSpace α\ninst✝² : Group α\ninst✝¹ : UniformGroup α\ninst✝ : UniformSpace β\nf : β → α\nhf : UniformContinuous f\nn : ℕ\n⊢ UniformContinuous fun x => f x ^ n\n[PROOFSTEP]\nexact hf.pow_const _\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : UniformSpace α\ninst✝² : Group α\ninst✝¹ : UniformGroup α\ninst✝ : UniformSpace β\nf : β → α\nhf : UniformContinuous f\nn : ℕ\n⊢ UniformContinuous fun x => f x ^ Int.negSucc n\n[PROOFSTEP]\nsimp_rw [zpow_negSucc]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : UniformSpace α\ninst✝² : Group α\ninst✝¹ : UniformGroup α\ninst✝ : UniformSpace β\nf : β → α\nhf : UniformContinuous f\nn : ℕ\n⊢ UniformContinuous fun x => (f x ^ (n + 1))⁻¹\n[PROOFSTEP]\nexact (hf.pow_const _).inv\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : UniformSpace α\ninst✝¹ : Group α\ninst✝ : UniformGroup α\na : α\n⊢ 𝓤 α = map (fun x => (x.fst * a, x.snd * a)) (map (fun x => (x.fst * a⁻¹, x.snd * a⁻¹)) (𝓤 α))\n[PROOFSTEP]\nsimp [Filter.map_map, (· ∘ ·)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : UniformSpace α\ninst✝¹ : Group α\ninst✝ : UniformGroup α\na : α\n⊢ comap (fun x => (x.fst * a, x.snd * a)) (𝓤 α) = 𝓤 α\n[PROOFSTEP]\nnth_rewrite 1 [← uniformity_translate_mul a, comap_map]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : UniformSpace α\ninst✝¹ : Group α\ninst✝ : UniformGroup α\na : α\n⊢ 𝓤 α = 𝓤 α\nα : Type u_1\nβ : Type u_2\ninst✝² : UniformSpace α\ninst✝¹ : Group α\ninst✝ : UniformGroup α\na : α\n⊢ Function.Injective fun x => (x.fst * a, x.snd * a)\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : UniformSpace α\ninst✝¹ : Group α\ninst✝ : UniformGroup α\na : α\n⊢ Function.Injective fun x => (x.fst * a, x.snd * a)\n[PROOFSTEP]\nrintro ⟨p₁, p₂⟩ ⟨q₁, q₂⟩\n[GOAL]\ncase mk.mk\nα : Type u_1\nβ : Type u_2\ninst✝² : UniformSpace α\ninst✝¹ : Group α\ninst✝ : UniformGroup α\na p₁ p₂ q₁ q₂ : α\n⊢ (fun x => (x.fst * a, x.snd * a)) (p₁, p₂) = (fun x => (x.fst * a, x.snd * a)) (q₁, q₂) → (p₁, p₂) = (q₁, q₂)\n[PROOFSTEP]\nsimp only [Prod.mk.injEq, mul_left_inj, imp_self]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : UniformSpace α\ninst✝² : Group α\ninst✝¹ : UniformGroup α\ninst✝ : Group β\nι : Sort u_3\nus' : ι → UniformSpace β\nh' : ∀ (i : ι), UniformGroup β\n⊢ UniformGroup β\n[PROOFSTEP]\nrw [← sInf_range]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : UniformSpace α\ninst✝² : Group α\ninst✝¹ : UniformGroup α\ninst✝ : Group β\nι : Sort u_3\nus' : ι → UniformSpace β\nh' : ∀ (i : ι), UniformGroup β\n⊢ UniformGroup β\n[PROOFSTEP]\nexact uniformGroup_sInf (Set.forall_range_iff.mpr h')\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : UniformSpace α\ninst✝² : Group α\ninst✝¹ : UniformGroup α\ninst✝ : Group β\nu₁ u₂ : UniformSpace β\nh₁ : UniformGroup β\nh₂ : UniformGroup β\n⊢ UniformGroup β\n[PROOFSTEP]\nrw [inf_eq_iInf]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : UniformSpace α\ninst✝² : Group α\ninst✝¹ : UniformGroup α\ninst✝ : Group β\nu₁ u₂ : UniformSpace β\nh₁ : UniformGroup β\nh₂ : UniformGroup β\n⊢ UniformGroup β\n[PROOFSTEP]\nrefine' uniformGroup_iInf fun b => _\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : UniformSpace α\ninst✝² : Group α\ninst✝¹ : UniformGroup α\ninst✝ : Group β\nu₁ u₂ : UniformSpace β\nh₁ : UniformGroup β\nh₂ : UniformGroup β\nb : Bool\n⊢ UniformGroup β\n[PROOFSTEP]\ncases b\n[GOAL]\ncase false\nα : Type u_1\nβ : Type u_2\ninst✝³ : UniformSpace α\ninst✝² : Group α\ninst✝¹ : UniformGroup α\ninst✝ : Group β\nu₁ u₂ : UniformSpace β\nh₁ : UniformGroup β\nh₂ : UniformGroup β\n⊢ UniformGroup β\n[PROOFSTEP]\nassumption\n[GOAL]\ncase true\nα : Type u_1\nβ : Type u_2\ninst✝³ : UniformSpace α\ninst✝² : Group α\ninst✝¹ : UniformGroup α\ninst✝ : Group β\nu₁ u₂ : UniformSpace β\nh₁ : UniformGroup β\nh₂ : UniformGroup β\n⊢ UniformGroup β\n[PROOFSTEP]\nassumption\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝⁶ : UniformSpace α\ninst✝⁵ : Group α\ninst✝⁴ : UniformGroup α\ninst✝³ : Group β\nγ : Type u_3\ninst✝² : Group γ\nu : UniformSpace γ\ninst✝¹ : UniformGroup γ\nF : Type u_4\ninst✝ : MonoidHomClass F β γ\nf : F\n⊢ UniformContinuous fun p => p.fst / p.snd\n[PROOFSTEP]\nletI : UniformSpace β := u.comap f\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝⁶ : UniformSpace α\ninst✝⁵ : Group α\ninst✝⁴ : UniformGroup α\ninst✝³ : Group β\nγ : Type u_3\ninst✝² : Group γ\nu : UniformSpace γ\ninst✝¹ : UniformGroup γ\nF : Type u_4\ninst✝ : MonoidHomClass F β γ\nf : F\nthis : UniformSpace β := UniformSpace.comap (↑f) u\n⊢ UniformContinuous fun p => p.fst / p.snd\n[PROOFSTEP]\nrefine' uniformContinuous_comap' _\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝⁶ : UniformSpace α\ninst✝⁵ : Group α\ninst✝⁴ : UniformGroup α\ninst✝³ : Group β\nγ : Type u_3\ninst✝² : Group γ\nu : UniformSpace γ\ninst✝¹ : UniformGroup γ\nF : Type u_4\ninst✝ : MonoidHomClass F β γ\nf : F\nthis : UniformSpace β := UniformSpace.comap (↑f) u\n⊢ UniformContinuous (↑f ∘ fun p => p.fst / p.snd)\n[PROOFSTEP]\nsimp_rw [Function.comp, map_div]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝⁶ : UniformSpace α\ninst✝⁵ : Group α\ninst✝⁴ : UniformGroup α\ninst✝³ : Group β\nγ : Type u_3\ninst✝² : Group γ\nu : UniformSpace γ\ninst✝¹ : UniformGroup γ\nF : Type u_4\ninst✝ : MonoidHomClass F β γ\nf : F\nthis : UniformSpace β := UniformSpace.comap (↑f) u\n⊢ UniformContinuous fun x => ↑f x.fst / ↑f x.snd\n[PROOFSTEP]\nchange UniformContinuous ((fun p : γ × γ => p.1 / p.2) ∘ Prod.map f f)\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝⁶ : UniformSpace α\ninst✝⁵ : Group α\ninst✝⁴ : UniformGroup α\ninst✝³ : Group β\nγ : Type u_3\ninst✝² : Group γ\nu : UniformSpace γ\ninst✝¹ : UniformGroup γ\nF : Type u_4\ninst✝ : MonoidHomClass F β γ\nf : F\nthis : UniformSpace β := UniformSpace.comap (↑f) u\n⊢ UniformContinuous ((fun p => p.fst / p.snd) ∘ Prod.map ↑f ↑f)\n[PROOFSTEP]\nexact uniformContinuous_div.comp (uniformContinuous_comap.prod_map uniformContinuous_comap)\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : UniformSpace α\ninst✝¹ : Group α\ninst✝ : UniformGroup α\n⊢ 𝓤 α = comap (fun x => x.snd / x.fst) (𝓝 1)\n[PROOFSTEP]\nrw [nhds_eq_comap_uniformity, Filter.comap_comap]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : UniformSpace α\ninst✝¹ : Group α\ninst✝ : UniformGroup α\n⊢ 𝓤 α = comap (Prod.mk 1 ∘ fun x => x.snd / x.fst) (𝓤 α)\n[PROOFSTEP]\nrefine' le_antisymm (Filter.map_le_iff_le_comap.1 _) _\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\ninst✝² : UniformSpace α\ninst✝¹ : Group α\ninst✝ : UniformGroup α\n⊢ map (Prod.mk 1 ∘ fun x => x.snd / x.fst) (𝓤 α) ≤ 𝓤 α\n[PROOFSTEP]\nintro s hs\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\ninst✝² : UniformSpace α\ninst✝¹ : Group α\ninst✝ : UniformGroup α\ns : Set (α × α)\nhs : s ∈ 𝓤 α\n⊢ s ∈ map (Prod.mk 1 ∘ fun x => x.snd / x.fst) (𝓤 α)\n[PROOFSTEP]\nrcases mem_uniformity_of_uniformContinuous_invariant uniformContinuous_div hs with ⟨t, ht, hts⟩\n[GOAL]\ncase refine'_1.intro.intro\nα : Type u_1\nβ : Type u_2\ninst✝² : UniformSpace α\ninst✝¹ : Group α\ninst✝ : UniformGroup α\ns : Set (α × α)\nhs : s ∈ 𝓤 α\nt : Set (α × α)\nht : t ∈ 𝓤 α\nhts : ∀ (a b c : α), (a, b) ∈ t → (a / c, b / c) ∈ s\n⊢ s ∈ map (Prod.mk 1 ∘ fun x => x.snd / x.fst) (𝓤 α)\n[PROOFSTEP]\nrefine' mem_map.2 (mem_of_superset ht _)\n[GOAL]\ncase refine'_1.intro.intro\nα : Type u_1\nβ : Type u_2\ninst✝² : UniformSpace α\ninst✝¹ : Group α\ninst✝ : UniformGroup α\ns : Set (α × α)\nhs : s ∈ 𝓤 α\nt : Set (α × α)\nht : t ∈ 𝓤 α\nhts : ∀ (a b c : α), (a, b) ∈ t → (a / c, b / c) ∈ s\n⊢ t ⊆ (Prod.mk 1 ∘ fun x => x.snd / x.fst) ⁻¹' s\n[PROOFSTEP]\nrintro ⟨a, b⟩\n[GOAL]\ncase refine'_1.intro.intro.mk\nα : Type u_1\nβ : Type u_2\ninst✝² : UniformSpace α\ninst✝¹ : Group α\ninst✝ : UniformGroup α\ns : Set (α × α)\nhs : s ∈ 𝓤 α\nt : Set (α × α)\nht : t ∈ 𝓤 α\nhts : ∀ (a b c : α), (a, b) ∈ t → (a / c, b / c) ∈ s\na b : α\n⊢ (a, b) ∈ t → (a, b) ∈ (Prod.mk 1 ∘ fun x => x.snd / x.fst) ⁻¹' s\n[PROOFSTEP]\nsimpa [subset_def] using hts a b a\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\ninst✝² : UniformSpace α\ninst✝¹ : Group α\ninst✝ : UniformGroup α\n⊢ comap (Prod.mk 1 ∘ fun x => x.snd / x.fst) (𝓤 α) ≤ 𝓤 α\n[PROOFSTEP]\nintro s hs\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\ninst✝² : UniformSpace α\ninst✝¹ : Group α\ninst✝ : UniformGroup α\ns : Set (α × α)\nhs : s ∈ 𝓤 α\n⊢ s ∈ comap (Prod.mk 1 ∘ fun x => x.snd / x.fst) (𝓤 α)\n[PROOFSTEP]\nrcases mem_uniformity_of_uniformContinuous_invariant uniformContinuous_mul hs with ⟨t, ht, hts⟩\n[GOAL]\ncase refine'_2.intro.intro\nα : Type u_1\nβ : Type u_2\ninst✝² : UniformSpace α\ninst✝¹ : Group α\ninst✝ : UniformGroup α\ns : Set (α × α)\nhs : s ∈ 𝓤 α\nt : Set (α × α)\nht : t ∈ 𝓤 α\nhts : ∀ (a b c : α), (a, b) ∈ t → (a * c, b * c) ∈ s\n⊢ s ∈ comap (Prod.mk 1 ∘ fun x => x.snd / x.fst) (𝓤 α)\n[PROOFSTEP]\nrefine' ⟨_, ht, _⟩\n[GOAL]\ncase refine'_2.intro.intro\nα : Type u_1\nβ : Type u_2\ninst✝² : UniformSpace α\ninst✝¹ : Group α\ninst✝ : UniformGroup α\ns : Set (α × α)\nhs : s ∈ 𝓤 α\nt : Set (α × α)\nht : t ∈ 𝓤 α\nhts : ∀ (a b c : α), (a, b) ∈ t → (a * c, b * c) ∈ s\n⊢ (Prod.mk 1 ∘ fun x => x.snd / x.fst) ⁻¹' t ⊆ s\n[PROOFSTEP]\nrintro ⟨a, b⟩\n[GOAL]\ncase refine'_2.intro.intro.mk\nα : Type u_1\nβ : Type u_2\ninst✝² : UniformSpace α\ninst✝¹ : Group α\ninst✝ : UniformGroup α\ns : Set (α × α)\nhs : s ∈ 𝓤 α\nt : Set (α × α)\nht : t ∈ 𝓤 α\nhts : ∀ (a b c : α), (a, b) ∈ t → (a * c, b * c) ∈ s\na b : α\n⊢ (a, b) ∈ (Prod.mk 1 ∘ fun x => x.snd / x.fst) ⁻¹' t → (a, b) ∈ s\n[PROOFSTEP]\nsimpa [subset_def] using hts 1 (b / a) a\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : UniformSpace α\ninst✝¹ : Group α\ninst✝ : UniformGroup α\n⊢ 𝓤 α = comap (fun x => x.fst / x.snd) (𝓝 1)\n[PROOFSTEP]\nrw [← comap_swap_uniformity, uniformity_eq_comap_nhds_one, comap_comap]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : UniformSpace α\ninst✝¹ : Group α\ninst✝ : UniformGroup α\n⊢ comap ((fun x => x.snd / x.fst) ∘ Prod.swap) (𝓝 1) = comap (fun x => x.fst / x.snd) (𝓝 1)\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : UniformSpace α\ninst✝² : Group α\ninst✝¹ : UniformGroup α\nG : Type u_3\ninst✝ : Group G\nu v : UniformSpace G\nhu : UniformGroup G\nhv : UniformGroup G\nh : 𝓝 1 = 𝓝 1\n⊢ 𝓤 G = 𝓤 G\n[PROOFSTEP]\nrw [@uniformity_eq_comap_nhds_one _ u _ hu, @uniformity_eq_comap_nhds_one _ v _ hv, h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : UniformSpace α\ninst✝² : Group α\ninst✝¹ : UniformGroup α\ninst✝ : IsCountablyGenerated (𝓝 1)\n⊢ IsCountablyGenerated (𝓤 α)\n[PROOFSTEP]\nrw [uniformity_eq_comap_nhds_one]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : UniformSpace α\ninst✝² : Group α\ninst✝¹ : UniformGroup α\ninst✝ : IsCountablyGenerated (𝓝 1)\n⊢ IsCountablyGenerated (comap (fun x => x.snd / x.fst) (𝓝 1))\n[PROOFSTEP]\nexact Filter.comap.isCountablyGenerated _ _\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : UniformSpace α\ninst✝¹ : Group α\ninst✝ : UniformGroup α\n⊢ 𝓤 α = comap (fun x => x.fst⁻¹ * x.snd) (𝓝 1)\n[PROOFSTEP]\nrw [← comap_uniformity_mulOpposite, uniformity_eq_comap_nhds_one, ← op_one, ← comap_unop_nhds, comap_comap, comap_comap]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : UniformSpace α\ninst✝¹ : Group α\ninst✝ : UniformGroup α\n⊢ comap (unop ∘ (fun x => x.snd / x.fst) ∘ fun p => (op p.fst, op p.snd)) (𝓝 1) = comap (fun x => x.fst⁻¹ * x.snd) (𝓝 1)\n[PROOFSTEP]\nsimp [(· ∘ ·)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : UniformSpace α\ninst✝¹ : Group α\ninst✝ : UniformGroup α\n⊢ 𝓤 α = comap (fun x => x.snd⁻¹ * x.fst) (𝓝 1)\n[PROOFSTEP]\nrw [← comap_swap_uniformity, uniformity_eq_comap_inv_mul_nhds_one, comap_comap]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : UniformSpace α\ninst✝¹ : Group α\ninst✝ : UniformGroup α\n⊢ comap ((fun x => x.fst⁻¹ * x.snd) ∘ Prod.swap) (𝓝 1) = comap (fun x => x.snd⁻¹ * x.fst) (𝓝 1)\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : UniformSpace α\ninst✝¹ : Group α\ninst✝ : UniformGroup α\nι : Sort u_3\np : ι → Prop\nU : ι → Set α\nh : HasBasis (𝓝 1) p U\n⊢ HasBasis (𝓤 α) p fun i => {x | x.snd / x.fst ∈ U i}\n[PROOFSTEP]\nrw [uniformity_eq_comap_nhds_one]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : UniformSpace α\ninst✝¹ : Group α\ninst✝ : UniformGroup α\nι : Sort u_3\np : ι → Prop\nU : ι → Set α\nh : HasBasis (𝓝 1) p U\n⊢ HasBasis (Filter.comap (fun x => x.snd / x.fst) (𝓝 1)) p fun i => {x | x.snd / x.fst ∈ U i}\n[PROOFSTEP]\nexact h.comap _\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : UniformSpace α\ninst✝¹ : Group α\ninst✝ : UniformGroup α\nι : Sort u_3\np : ι → Prop\nU : ι → Set α\nh : HasBasis (𝓝 1) p U\n⊢ HasBasis (𝓤 α) p fun i => {x | x.fst⁻¹ * x.snd ∈ U i}\n[PROOFSTEP]\nrw [uniformity_eq_comap_inv_mul_nhds_one]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : UniformSpace α\ninst✝¹ : Group α\ninst✝ : UniformGroup α\nι : Sort u_3\np : ι → Prop\nU : ι → Set α\nh : HasBasis (𝓝 1) p U\n⊢ HasBasis (Filter.comap (fun x => x.fst⁻¹ * x.snd) (𝓝 1)) p fun i => {x | x.fst⁻¹ * x.snd ∈ U i}\n[PROOFSTEP]\nexact h.comap _\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : UniformSpace α\ninst✝¹ : Group α\ninst✝ : UniformGroup α\nι : Sort u_3\np : ι → Prop\nU : ι → Set α\nh : HasBasis (𝓝 1) p U\n⊢ HasBasis (𝓤 α) p fun i => {x | x.fst / x.snd ∈ U i}\n[PROOFSTEP]\nrw [uniformity_eq_comap_nhds_one_swapped]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : UniformSpace α\ninst✝¹ : Group α\ninst✝ : UniformGroup α\nι : Sort u_3\np : ι → Prop\nU : ι → Set α\nh : HasBasis (𝓝 1) p U\n⊢ HasBasis (Filter.comap (fun x => x.fst / x.snd) (𝓝 1)) p fun i => {x | x.fst / x.snd ∈ U i}\n[PROOFSTEP]\nexact h.comap _\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : UniformSpace α\ninst✝¹ : Group α\ninst✝ : UniformGroup α\nι : Sort u_3\np : ι → Prop\nU : ι → Set α\nh : HasBasis (𝓝 1) p U\n⊢ HasBasis (𝓤 α) p fun i => {x | x.snd⁻¹ * x.fst ∈ U i}\n[PROOFSTEP]\nrw [uniformity_eq_comap_inv_mul_nhds_one_swapped]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : UniformSpace α\ninst✝¹ : Group α\ninst✝ : UniformGroup α\nι : Sort u_3\np : ι → Prop\nU : ι → Set α\nh : HasBasis (𝓝 1) p U\n⊢ HasBasis (Filter.comap (fun x => x.snd⁻¹ * x.fst) (𝓝 1)) p fun i => {x | x.snd⁻¹ * x.fst ∈ U i}\n[PROOFSTEP]\nexact h.comap _\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : UniformSpace α\ninst✝¹ : Group α\ninst✝ : UniformGroup α\nx y : α\nthis : Embedding fun a => a * (y / x)\n⊢ (x, y) ∈ ⋂₀ (𝓤 α).sets ↔ x / y ∈ closure {1}\n[PROOFSTEP]\nrw [this.closure_eq_preimage_closure_image, uniformity_eq_comap_nhds_one α, sInter_comap_sets]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : UniformSpace α\ninst✝¹ : Group α\ninst✝ : UniformGroup α\nx y : α\nthis : Embedding fun a => a * (y / x)\n⊢ (x, y) ∈ ⋂ (U : Set α) (_ : U ∈ 𝓝 1), (fun x => x.snd / x.fst) ⁻¹' U ↔\n    x / y ∈ (fun a => a * (y / x)) ⁻¹' closure ((fun a => a * (y / x)) '' {1})\n[PROOFSTEP]\nsimp [mem_closure_iff_nhds, inter_singleton_nonempty, sub_eq_add_neg, add_assoc]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝⁶ : UniformSpace α\ninst✝⁵ : Group α\ninst✝⁴ : UniformGroup α\nhom : Type u_3\ninst✝³ : UniformSpace β\ninst✝² : Group β\ninst✝¹ : UniformGroup β\ninst✝ : MonoidHomClass hom α β\nf : hom\nh : Tendsto (↑f) (𝓝 1) (𝓝 1)\n⊢ UniformContinuous ↑f\n[PROOFSTEP]\nhave : ((fun x : β × β => x.2 / x.1) ∘ fun x : α × α => (f x.1, f x.2)) = fun x : α × α => f (x.2 / x.1) := by ext;\n  simp only [Function.comp_apply, map_div]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝⁶ : UniformSpace α\ninst✝⁵ : Group α\ninst✝⁴ : UniformGroup α\nhom : Type u_3\ninst✝³ : UniformSpace β\ninst✝² : Group β\ninst✝¹ : UniformGroup β\ninst✝ : MonoidHomClass hom α β\nf : hom\nh : Tendsto (↑f) (𝓝 1) (𝓝 1)\n⊢ ((fun x => x.snd / x.fst) ∘ fun x => (↑f x.fst, ↑f x.snd)) = fun x => ↑f (x.snd / x.fst)\n[PROOFSTEP]\next\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\ninst✝⁶ : UniformSpace α\ninst✝⁵ : Group α\ninst✝⁴ : UniformGroup α\nhom : Type u_3\ninst✝³ : UniformSpace β\ninst✝² : Group β\ninst✝¹ : UniformGroup β\ninst✝ : MonoidHomClass hom α β\nf : hom\nh : Tendsto (↑f) (𝓝 1) (𝓝 1)\nx✝ : α × α\n⊢ ((fun x => x.snd / x.fst) ∘ fun x => (↑f x.fst, ↑f x.snd)) x✝ = ↑f (x✝.snd / x✝.fst)\n[PROOFSTEP]\nsimp only [Function.comp_apply, map_div]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝⁶ : UniformSpace α\ninst✝⁵ : Group α\ninst✝⁴ : UniformGroup α\nhom : Type u_3\ninst✝³ : UniformSpace β\ninst✝² : Group β\ninst✝¹ : UniformGroup β\ninst✝ : MonoidHomClass hom α β\nf : hom\nh : Tendsto (↑f) (𝓝 1) (𝓝 1)\nthis : ((fun x => x.snd / x.fst) ∘ fun x => (↑f x.fst, ↑f x.snd)) = fun x => ↑f (x.snd / x.fst)\n⊢ UniformContinuous ↑f\n[PROOFSTEP]\nrw [UniformContinuous, uniformity_eq_comap_nhds_one α, uniformity_eq_comap_nhds_one β, tendsto_comap_iff, this]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝⁶ : UniformSpace α\ninst✝⁵ : Group α\ninst✝⁴ : UniformGroup α\nhom : Type u_3\ninst✝³ : UniformSpace β\ninst✝² : Group β\ninst✝¹ : UniformGroup β\ninst✝ : MonoidHomClass hom α β\nf : hom\nh : Tendsto (↑f) (𝓝 1) (𝓝 1)\nthis : ((fun x => x.snd / x.fst) ∘ fun x => (↑f x.fst, ↑f x.snd)) = fun x => ↑f (x.snd / x.fst)\n⊢ Tendsto (fun x => ↑f (x.snd / x.fst)) (comap (fun x => x.snd / x.fst) (𝓝 1)) (𝓝 1)\n[PROOFSTEP]\nexact Tendsto.comp h tendsto_comap\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝⁶ : UniformSpace α\ninst✝⁵ : Group α\ninst✝⁴ : UniformGroup α\nhom : Type u_3\ninst✝³ : UniformSpace β\ninst✝² : Group β\ninst✝¹ : UniformGroup β\ninst✝ : MonoidHomClass hom α β\nf : hom\nhf : ContinuousAt (↑f) 1\n⊢ Tendsto (↑f) (𝓝 1) (𝓝 1)\n[PROOFSTEP]\nsimpa using hf.tendsto\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝⁷ : UniformSpace α\ninst✝⁶ : Group α\ninst✝⁵ : UniformGroup α\nhom : Type u_3\ninst✝⁴ : UniformSpace β\ninst✝³ : DiscreteTopology β\ninst✝² : Group β\ninst✝¹ : UniformGroup β\ninst✝ : MonoidHomClass hom α β\nf : hom\n⊢ UniformContinuous ↑f ↔ IsOpen ↑(MonoidHom.ker ↑f)\n[PROOFSTEP]\nrefine' ⟨fun hf => _, fun hf => _⟩\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\ninst✝⁷ : UniformSpace α\ninst✝⁶ : Group α\ninst✝⁵ : UniformGroup α\nhom : Type u_3\ninst✝⁴ : UniformSpace β\ninst✝³ : DiscreteTopology β\ninst✝² : Group β\ninst✝¹ : UniformGroup β\ninst✝ : MonoidHomClass hom α β\nf : hom\nhf : UniformContinuous ↑f\n⊢ IsOpen ↑(MonoidHom.ker ↑f)\n[PROOFSTEP]\napply (isOpen_discrete ({1} : Set β)).preimage hf.continuous\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\ninst✝⁷ : UniformSpace α\ninst✝⁶ : Group α\ninst✝⁵ : UniformGroup α\nhom : Type u_3\ninst✝⁴ : UniformSpace β\ninst✝³ : DiscreteTopology β\ninst✝² : Group β\ninst✝¹ : UniformGroup β\ninst✝ : MonoidHomClass hom α β\nf : hom\nhf : IsOpen ↑(MonoidHom.ker ↑f)\n⊢ UniformContinuous ↑f\n[PROOFSTEP]\napply uniformContinuous_of_continuousAt_one\n[GOAL]\ncase refine'_2.hf\nα : Type u_1\nβ : Type u_2\ninst✝⁷ : UniformSpace α\ninst✝⁶ : Group α\ninst✝⁵ : UniformGroup α\nhom : Type u_3\ninst✝⁴ : UniformSpace β\ninst✝³ : DiscreteTopology β\ninst✝² : Group β\ninst✝¹ : UniformGroup β\ninst✝ : MonoidHomClass hom α β\nf : hom\nhf : IsOpen ↑(MonoidHom.ker ↑f)\n⊢ ContinuousAt (↑f) 1\n[PROOFSTEP]\nrw [ContinuousAt, nhds_discrete β, map_one, tendsto_pure]\n[GOAL]\ncase refine'_2.hf\nα : Type u_1\nβ : Type u_2\ninst✝⁷ : UniformSpace α\ninst✝⁶ : Group α\ninst✝⁵ : UniformGroup α\nhom : Type u_3\ninst✝⁴ : UniformSpace β\ninst✝³ : DiscreteTopology β\ninst✝² : Group β\ninst✝¹ : UniformGroup β\ninst✝ : MonoidHomClass hom α β\nf : hom\nhf : IsOpen ↑(MonoidHom.ker ↑f)\n⊢ ∀ᶠ (x : α) in 𝓝 1, ↑f x = 1\n[PROOFSTEP]\nexact hf.mem_nhds (map_one f)\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝⁶ : UniformSpace α\ninst✝⁵ : Group α\ninst✝⁴ : UniformGroup α\nhom : Type u_3\ninst✝³ : UniformSpace β\ninst✝² : Group β\ninst✝¹ : UniformGroup β\ninst✝ : MonoidHomClass hom α β\nf : hom\nh : Continuous ↑f\nthis : Tendsto (↑f) (𝓝 1) (𝓝 (↑f 1))\n⊢ Tendsto (↑f) (𝓝 1) (𝓝 1)\n[PROOFSTEP]\nrwa [map_one] at this \n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : UniformSpace α\ninst✝¹ : Group α\ninst✝ : UniformGroup α\ns : Set α\n⊢ (∀ (i : Set α),\n      i ∈ 𝓝 1 → ∃ t, Set.Finite t ∧ s ⊆ ⋃ (y : α) (_ : y ∈ t), {x | (x, y) ∈ {x | x.snd⁻¹ * x.fst ∈ id i}}) ↔\n    ∀ (U : Set α), U ∈ 𝓝 1 → ∃ t, Set.Finite t ∧ s ⊆ ⋃ (y : α) (_ : y ∈ t), y • U\n[PROOFSTEP]\nsimp [← preimage_smul_inv, preimage]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : UniformSpace α\ninst✝¹ : Group α\ninst✝ : UniformGroup α\nι : Type u_3\nl : Filter ι\nl' : Filter β\nf f' : ι → β → α\ng g' : β → α\ns : Set β\nhf : UniformCauchySeqOn f l s\nhf' : UniformCauchySeqOn f' l s\nu : Set (α × α)\nhu : u ∈ 𝓤 α\n⊢ ∀ᶠ (m : ι × ι) in l ×ˢ l, ∀ (x : β), x ∈ s → ((f * f') m.fst x, (f * f') m.snd x) ∈ u\n[PROOFSTEP]\nsimpa using (uniformContinuous_mul.comp_uniformCauchySeqOn (hf.prod' hf')) u hu\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : UniformSpace α\ninst✝¹ : Group α\ninst✝ : UniformGroup α\nι : Type u_3\nl : Filter ι\nl' : Filter β\nf f' : ι → β → α\ng g' : β → α\ns : Set β\nhf : UniformCauchySeqOn f l s\nhf' : UniformCauchySeqOn f' l s\nu : Set (α × α)\nhu : u ∈ 𝓤 α\n⊢ ∀ᶠ (m : ι × ι) in l ×ˢ l, ∀ (x : β), x ∈ s → ((f / f') m.fst x, (f / f') m.snd x) ∈ u\n[PROOFSTEP]\nsimpa using (uniformContinuous_div.comp_uniformCauchySeqOn (hf.prod' hf')) u hu\n[GOAL]\nG : Type u_1\ninst✝² : Group G\ninst✝¹ : TopologicalSpace G\ninst✝ : TopologicalGroup G\n⊢ Tendsto (fun p => p.snd / p.fst) (𝓟 idRel) (pure 1)\n[PROOFSTEP]\nsimp\n[GOAL]\nG : Type u_1\ninst✝² : Group G\ninst✝¹ : TopologicalSpace G\ninst✝ : TopologicalGroup G\nthis : Tendsto (fun p => (p.snd / p.fst)⁻¹) (comap (fun p => p.snd / p.fst) (𝓝 1)) (𝓝 1⁻¹)\n⊢ Tendsto Prod.swap (comap (fun p => p.snd / p.fst) (𝓝 1)) (comap (fun p => p.snd / p.fst) (𝓝 1))\n[PROOFSTEP]\nsimpa [tendsto_comap_iff]\n[GOAL]\nG : Type u_1\ninst✝² : Group G\ninst✝¹ : TopologicalSpace G\ninst✝ : TopologicalGroup G\nU : Set G\nH : U ∈ 𝓝 1\n⊢ U ∈ map (fun p => p.snd / p.fst) (Filter.lift' (comap (fun p => p.snd / p.fst) (𝓝 1)) fun s => s ○ s)\n[PROOFSTEP]\nrcases exists_nhds_one_split H with ⟨V, V_nhds, V_mul⟩\n[GOAL]\ncase intro.intro\nG : Type u_1\ninst✝² : Group G\ninst✝¹ : TopologicalSpace G\ninst✝ : TopologicalGroup G\nU : Set G\nH : U ∈ 𝓝 1\nV : Set G\nV_nhds : V ∈ 𝓝 1\nV_mul : ∀ (v : G), v ∈ V → ∀ (w : G), w ∈ V → v * w ∈ U\n⊢ U ∈ map (fun p => p.snd / p.fst) (Filter.lift' (comap (fun p => p.snd / p.fst) (𝓝 1)) fun s => s ○ s)\n[PROOFSTEP]\nrefine mem_map.2 (mem_of_superset (mem_lift' <| preimage_mem_comap V_nhds) ?_)\n[GOAL]\ncase intro.intro\nG : Type u_1\ninst✝² : Group G\ninst✝¹ : TopologicalSpace G\ninst✝ : TopologicalGroup G\nU : Set G\nH : U ∈ 𝓝 1\nV : Set G\nV_nhds : V ∈ 𝓝 1\nV_mul : ∀ (v : G), v ∈ V → ∀ (w : G), w ∈ V → v * w ∈ U\n⊢ (fun p => p.snd / p.fst) ⁻¹' V ○ (fun p => p.snd / p.fst) ⁻¹' V ⊆ (fun p => p.snd / p.fst) ⁻¹' U\n[PROOFSTEP]\nrintro ⟨x, y⟩ ⟨z, hz₁, hz₂⟩\n[GOAL]\ncase intro.intro.mk.intro.intro\nG : Type u_1\ninst✝² : Group G\ninst✝¹ : TopologicalSpace G\ninst✝ : TopologicalGroup G\nU : Set G\nH : U ∈ 𝓝 1\nV : Set G\nV_nhds : V ∈ 𝓝 1\nV_mul : ∀ (v : G), v ∈ V → ∀ (w : G), w ∈ V → v * w ∈ U\nx y z : G\nhz₁ : ((x, y).fst, z) ∈ (fun p => p.snd / p.fst) ⁻¹' V\nhz₂ : (z, (x, y).snd) ∈ (fun p => p.snd / p.fst) ⁻¹' V\n⊢ (x, y) ∈ (fun p => p.snd / p.fst) ⁻¹' U\n[PROOFSTEP]\nsimpa using V_mul _ hz₂ _ hz₁\n[GOAL]\nG : Type u_1\ninst✝² : Group G\ninst✝¹ : TopologicalSpace G\ninst✝ : TopologicalGroup G\nS : Set G\n⊢ IsOpen S ↔\n    ∀ (x : G),\n      x ∈ S →\n        {p | p.fst = x → p.snd ∈ S} ∈\n          { uniformity := comap (fun p => p.snd / p.fst) (𝓝 1),\n              refl := (_ : 𝓟 idRel ≤ comap (fun p => p.snd / p.fst) (𝓝 1)),\n              symm :=\n                (_ : Tendsto Prod.swap (comap (fun p => p.snd / p.fst) (𝓝 1)) (comap (fun p => p.snd / p.fst) (𝓝 1))),\n              comp :=\n                (_ :\n                  (Filter.lift' (comap (fun p => p.snd / p.fst) (𝓝 1)) fun s => s ○ s) ≤\n                    comap (fun p => p.snd / p.fst) (𝓝 1)) }.uniformity\n[PROOFSTEP]\nsimp only [isOpen_iff_mem_nhds, ← mem_comap_prod_mk, comap_comap, (· ∘ ·), nhds_translation_div]\n[GOAL]\nG : Type u_1\ninst✝³ : Group G\ninst✝² : TopologicalSpace G\ninst✝¹ : TopologicalGroup G\ninst✝ : CompactSpace G\n⊢ UniformContinuous fun p => p.fst / p.snd\n[PROOFSTEP]\napply CompactSpace.uniformContinuous_of_continuous\n[GOAL]\ncase h\nG : Type u_1\ninst✝³ : Group G\ninst✝² : TopologicalSpace G\ninst✝¹ : TopologicalGroup G\ninst✝ : CompactSpace G\n⊢ Continuous fun p => p.fst / p.snd\n[PROOFSTEP]\nexact continuous_div'\n[GOAL]\nG : Type u_1\ninst✝⁴ : Group G\ninst✝³ : TopologicalSpace G\ninst✝² : TopologicalGroup G\ninst✝¹ : T2Space G\nH : Subgroup G\ninst✝ : DiscreteTopology { x // x ∈ H }\n⊢ IsClosed ↑H\n[PROOFSTEP]\nobtain ⟨V, V_in, VH⟩ : ∃ (V : Set G), V ∈ 𝓝 (1 : G) ∧ V ∩ (H : Set G) = {1}\n[GOAL]\nG : Type u_1\ninst✝⁴ : Group G\ninst✝³ : TopologicalSpace G\ninst✝² : TopologicalGroup G\ninst✝¹ : T2Space G\nH : Subgroup G\ninst✝ : DiscreteTopology { x // x ∈ H }\n⊢ ∃ V, V ∈ 𝓝 1 ∧ V ∩ ↑H = {1}\ncase intro.intro\nG : Type u_1\ninst✝⁴ : Group G\ninst✝³ : TopologicalSpace G\ninst✝² : TopologicalGroup G\ninst✝¹ : T2Space G\nH : Subgroup G\ninst✝ : DiscreteTopology { x // x ∈ H }\nV : Set G\nV_in : V ∈ 𝓝 1\nVH : V ∩ ↑H = {1}\n⊢ IsClosed ↑H\n[PROOFSTEP]\nexact nhds_inter_eq_singleton_of_mem_discrete H.one_mem\n[GOAL]\ncase intro.intro\nG : Type u_1\ninst✝⁴ : Group G\ninst✝³ : TopologicalSpace G\ninst✝² : TopologicalGroup G\ninst✝¹ : T2Space G\nH : Subgroup G\ninst✝ : DiscreteTopology { x // x ∈ H }\nV : Set G\nV_in : V ∈ 𝓝 1\nVH : V ∩ ↑H = {1}\n⊢ IsClosed ↑H\n[PROOFSTEP]\nhaveI : SeparatedSpace G := separated_iff_t2.mpr ‹_›\n[GOAL]\ncase intro.intro\nG : Type u_1\ninst✝⁴ : Group G\ninst✝³ : TopologicalSpace G\ninst✝² : TopologicalGroup G\ninst✝¹ : T2Space G\nH : Subgroup G\ninst✝ : DiscreteTopology { x // x ∈ H }\nV : Set G\nV_in : V ∈ 𝓝 1\nVH : V ∩ ↑H = {1}\nthis : SeparatedSpace G\n⊢ IsClosed ↑H\n[PROOFSTEP]\nhave : (fun p : G × G => p.2 / p.1) ⁻¹' V ∈ 𝓤 G := preimage_mem_comap V_in\n[GOAL]\ncase intro.intro\nG : Type u_1\ninst✝⁴ : Group G\ninst✝³ : TopologicalSpace G\ninst✝² : TopologicalGroup G\ninst✝¹ : T2Space G\nH : Subgroup G\ninst✝ : DiscreteTopology { x // x ∈ H }\nV : Set G\nV_in : V ∈ 𝓝 1\nVH : V ∩ ↑H = {1}\nthis✝ : SeparatedSpace G\nthis : (fun p => p.snd / p.fst) ⁻¹' V ∈ 𝓤 G\n⊢ IsClosed ↑H\n[PROOFSTEP]\napply isClosed_of_spaced_out this\n[GOAL]\ncase intro.intro\nG : Type u_1\ninst✝⁴ : Group G\ninst✝³ : TopologicalSpace G\ninst✝² : TopologicalGroup G\ninst✝¹ : T2Space G\nH : Subgroup G\ninst✝ : DiscreteTopology { x // x ∈ H }\nV : Set G\nV_in : V ∈ 𝓝 1\nVH : V ∩ ↑H = {1}\nthis✝ : SeparatedSpace G\nthis : (fun p => p.snd / p.fst) ⁻¹' V ∈ 𝓤 G\n⊢ Set.Pairwise ↑H fun x y => ¬(x, y) ∈ (fun p => p.snd / p.fst) ⁻¹' V\n[PROOFSTEP]\nintro h h_in h' h'_in\n[GOAL]\ncase intro.intro\nG : Type u_1\ninst✝⁴ : Group G\ninst✝³ : TopologicalSpace G\ninst✝² : TopologicalGroup G\ninst✝¹ : T2Space G\nH : Subgroup G\ninst✝ : DiscreteTopology { x // x ∈ H }\nV : Set G\nV_in : V ∈ 𝓝 1\nVH : V ∩ ↑H = {1}\nthis✝ : SeparatedSpace G\nthis : (fun p => p.snd / p.fst) ⁻¹' V ∈ 𝓤 G\nh : G\nh_in : h ∈ ↑H\nh' : G\nh'_in : h' ∈ ↑H\n⊢ h ≠ h' → (fun x y => ¬(x, y) ∈ (fun p => p.snd / p.fst) ⁻¹' V) h h'\n[PROOFSTEP]\ncontrapose!\n[GOAL]\ncase intro.intro\nG : Type u_1\ninst✝⁴ : Group G\ninst✝³ : TopologicalSpace G\ninst✝² : TopologicalGroup G\ninst✝¹ : T2Space G\nH : Subgroup G\ninst✝ : DiscreteTopology { x // x ∈ H }\nV : Set G\nV_in : V ∈ 𝓝 1\nVH : V ∩ ↑H = {1}\nthis✝ : SeparatedSpace G\nthis : (fun p => p.snd / p.fst) ⁻¹' V ∈ 𝓤 G\nh : G\nh_in : h ∈ ↑H\nh' : G\nh'_in : h' ∈ ↑H\n⊢ ¬¬(h, h') ∈ (fun p => p.snd / p.fst) ⁻¹' V → h = h'\n[PROOFSTEP]\nsimp only [Set.mem_preimage, not_not]\n[GOAL]\ncase intro.intro\nG : Type u_1\ninst✝⁴ : Group G\ninst✝³ : TopologicalSpace G\ninst✝² : TopologicalGroup G\ninst✝¹ : T2Space G\nH : Subgroup G\ninst✝ : DiscreteTopology { x // x ∈ H }\nV : Set G\nV_in : V ∈ 𝓝 1\nVH : V ∩ ↑H = {1}\nthis✝ : SeparatedSpace G\nthis : (fun p => p.snd / p.fst) ⁻¹' V ∈ 𝓤 G\nh : G\nh_in : h ∈ ↑H\nh' : G\nh'_in : h' ∈ ↑H\n⊢ h' / h ∈ V → h = h'\n[PROOFSTEP]\nrintro (hyp : h' / h ∈ V)\n[GOAL]\ncase intro.intro\nG : Type u_1\ninst✝⁴ : Group G\ninst✝³ : TopologicalSpace G\ninst✝² : TopologicalGroup G\ninst✝¹ : T2Space G\nH : Subgroup G\ninst✝ : DiscreteTopology { x // x ∈ H }\nV : Set G\nV_in : V ∈ 𝓝 1\nVH : V ∩ ↑H = {1}\nthis✝ : SeparatedSpace G\nthis : (fun p => p.snd / p.fst) ⁻¹' V ∈ 𝓤 G\nh : G\nh_in : h ∈ ↑H\nh' : G\nh'_in : h' ∈ ↑H\nhyp : h' / h ∈ V\n⊢ h = h'\n[PROOFSTEP]\nhave : h' / h ∈ ({1} : Set G) := VH ▸ Set.mem_inter hyp (H.div_mem h'_in h_in)\n[GOAL]\ncase intro.intro\nG : Type u_1\ninst✝⁴ : Group G\ninst✝³ : TopologicalSpace G\ninst✝² : TopologicalGroup G\ninst✝¹ : T2Space G\nH : Subgroup G\ninst✝ : DiscreteTopology { x // x ∈ H }\nV : Set G\nV_in : V ∈ 𝓝 1\nVH : V ∩ ↑H = {1}\nthis✝¹ : SeparatedSpace G\nthis✝ : (fun p => p.snd / p.fst) ⁻¹' V ∈ 𝓤 G\nh : G\nh_in : h ∈ ↑H\nh' : G\nh'_in : h' ∈ ↑H\nhyp : h' / h ∈ V\nthis : h' / h ∈ {1}\n⊢ h = h'\n[PROOFSTEP]\nexact (eq_of_div_eq_one this).symm\n[GOAL]\nG : Type u_1\ninst✝⁴ : Group G\ninst✝³ : TopologicalSpace G\ninst✝² : TopologicalGroup G\ninst✝¹ : T2Space G\nH : Type u_2\ninst✝ : Group H\nf : H →* G\nhf : Function.Injective ↑f\nhf' : DiscreteTopology { x // x ∈ range f }\n⊢ Tendsto (↑f) cofinite (cocompact G)\n[PROOFSTEP]\nreplace hf : Function.Injective f.rangeRestrict := by simpa\n[GOAL]\nG : Type u_1\ninst✝⁴ : Group G\ninst✝³ : TopologicalSpace G\ninst✝² : TopologicalGroup G\ninst✝¹ : T2Space G\nH : Type u_2\ninst✝ : Group H\nf : H →* G\nhf : Function.Injective ↑f\nhf' : DiscreteTopology { x // x ∈ range f }\n⊢ Function.Injective ↑(rangeRestrict f)\n[PROOFSTEP]\nsimpa\n[GOAL]\nG : Type u_1\ninst✝⁴ : Group G\ninst✝³ : TopologicalSpace G\ninst✝² : TopologicalGroup G\ninst✝¹ : T2Space G\nH : Type u_2\ninst✝ : Group H\nf : H →* G\nhf' : DiscreteTopology { x // x ∈ range f }\nhf : Function.Injective ↑(rangeRestrict f)\n⊢ Tendsto (↑f) cofinite (cocompact G)\n[PROOFSTEP]\nexact f.range.tendsto_coe_cofinite_of_discrete.comp hf.tendsto_cofinite\n[GOAL]\nG : Type u_1\ninst✝² : CommGroup G\ninst✝¹ : TopologicalSpace G\ninst✝ : TopologicalGroup G\n⊢ UniformGroup G\n[PROOFSTEP]\nhave :\n  Tendsto ((fun p : G × G => p.1 / p.2) ∘ fun p : (G × G) × G × G => (p.1.2 / p.1.1, p.2.2 / p.2.1))\n    (comap (fun p : (G × G) × G × G => (p.1.2 / p.1.1, p.2.2 / p.2.1)) ((𝓝 1).prod (𝓝 1))) (𝓝 (1 / 1)) :=\n  (tendsto_fst.div' tendsto_snd).comp tendsto_comap\n[GOAL]\nG : Type u_1\ninst✝² : CommGroup G\ninst✝¹ : TopologicalSpace G\ninst✝ : TopologicalGroup G\nthis :\n  Tendsto ((fun p => p.fst / p.snd) ∘ fun p => (p.fst.snd / p.fst.fst, p.snd.snd / p.snd.fst))\n    (comap (fun p => (p.fst.snd / p.fst.fst, p.snd.snd / p.snd.fst)) (Filter.prod (𝓝 1) (𝓝 1))) (𝓝 (1 / 1))\n⊢ UniformGroup G\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase uniformContinuous_div\nG : Type u_1\ninst✝² : CommGroup G\ninst✝¹ : TopologicalSpace G\ninst✝ : TopologicalGroup G\nthis :\n  Tendsto ((fun p => p.fst / p.snd) ∘ fun p => (p.fst.snd / p.fst.fst, p.snd.snd / p.snd.fst))\n    (comap (fun p => (p.fst.snd / p.fst.fst, p.snd.snd / p.snd.fst)) (Filter.prod (𝓝 1) (𝓝 1))) (𝓝 (1 / 1))\n⊢ UniformContinuous fun p => p.fst / p.snd\n[PROOFSTEP]\nrw [UniformContinuous, uniformity_prod_eq_prod, tendsto_map'_iff, uniformity_eq_comap_nhds_one' G, tendsto_comap_iff,\n  prod_comap_comap_eq]\n[GOAL]\ncase uniformContinuous_div\nG : Type u_1\ninst✝² : CommGroup G\ninst✝¹ : TopologicalSpace G\ninst✝ : TopologicalGroup G\nthis :\n  Tendsto ((fun p => p.fst / p.snd) ∘ fun p => (p.fst.snd / p.fst.fst, p.snd.snd / p.snd.fst))\n    (comap (fun p => (p.fst.snd / p.fst.fst, p.snd.snd / p.snd.fst)) (Filter.prod (𝓝 1) (𝓝 1))) (𝓝 (1 / 1))\n⊢ Tendsto\n    ((fun p => p.snd / p.fst) ∘\n      (fun x => (x.fst.fst / x.fst.snd, x.snd.fst / x.snd.snd)) ∘ fun p =>\n        ((p.fst.fst, p.snd.fst), p.fst.snd, p.snd.snd))\n    (comap (fun p => (p.fst.snd / p.fst.fst, p.snd.snd / p.snd.fst)) (𝓝 1 ×ˢ 𝓝 1)) (𝓝 1)\n[PROOFSTEP]\nsimp only [Function.comp, div_eq_mul_inv, mul_inv_rev, inv_inv, mul_comm, mul_left_comm] at *\n[GOAL]\ncase uniformContinuous_div\nG : Type u_1\ninst✝² : CommGroup G\ninst✝¹ : TopologicalSpace G\ninst✝ : TopologicalGroup G\nthis :\n  Tendsto (fun x => x.snd.fst * (x.fst.snd * x.fst.fst⁻¹ * x.snd.snd⁻¹))\n    (comap (fun p => (p.fst.snd * p.fst.fst⁻¹, p.snd.snd * p.snd.fst⁻¹)) (Filter.prod (𝓝 1) (𝓝 1))) (𝓝 (1 * 1⁻¹))\n⊢ Tendsto (fun x => x.fst.snd * (x.snd.fst * x.fst.fst⁻¹ * x.snd.snd⁻¹))\n    (comap (fun p => (p.fst.snd * p.fst.fst⁻¹, p.snd.snd * p.snd.fst⁻¹)) (𝓝 1 ×ˢ 𝓝 1)) (𝓝 1)\n[PROOFSTEP]\nsimp only [inv_one, mul_one, ← mul_assoc] at this \n[GOAL]\ncase uniformContinuous_div\nG : Type u_1\ninst✝² : CommGroup G\ninst✝¹ : TopologicalSpace G\ninst✝ : TopologicalGroup G\nthis :\n  Tendsto (fun x => x.snd.fst * x.fst.snd * x.fst.fst⁻¹ * x.snd.snd⁻¹)\n    (comap (fun p => (p.fst.snd * p.fst.fst⁻¹, p.snd.snd * p.snd.fst⁻¹)) (Filter.prod (𝓝 1) (𝓝 1))) (𝓝 1)\n⊢ Tendsto (fun x => x.fst.snd * (x.snd.fst * x.fst.fst⁻¹ * x.snd.snd⁻¹))\n    (comap (fun p => (p.fst.snd * p.fst.fst⁻¹, p.snd.snd * p.snd.fst⁻¹)) (𝓝 1 ×ˢ 𝓝 1)) (𝓝 1)\n[PROOFSTEP]\nsimp_rw [← mul_assoc, mul_comm]\n[GOAL]\ncase uniformContinuous_div\nG : Type u_1\ninst✝² : CommGroup G\ninst✝¹ : TopologicalSpace G\ninst✝ : TopologicalGroup G\nthis :\n  Tendsto (fun x => x.snd.fst * x.fst.snd * x.fst.fst⁻¹ * x.snd.snd⁻¹)\n    (comap (fun p => (p.fst.snd * p.fst.fst⁻¹, p.snd.snd * p.snd.fst⁻¹)) (Filter.prod (𝓝 1) (𝓝 1))) (𝓝 1)\n⊢ Tendsto (fun x => x.snd.fst * x.fst.snd * x.fst.fst⁻¹ * x.snd.snd⁻¹)\n    (comap (fun p => (p.fst.snd * p.fst.fst⁻¹, p.snd.snd * p.snd.fst⁻¹)) (𝓝 1 ×ˢ 𝓝 1)) (𝓝 1)\n[PROOFSTEP]\nassumption\n[GOAL]\nG : Type u_1\ninst✝² : CommGroup G\ninst✝¹ : TopologicalSpace G\ninst✝ : TopologicalGroup G\n⊢ T2Space G ↔ IsClosed {1}\n[PROOFSTEP]\nhaveI : UniformGroup G := comm_topologicalGroup_is_uniform\n[GOAL]\nG : Type u_1\ninst✝² : CommGroup G\ninst✝¹ : TopologicalSpace G\ninst✝ : TopologicalGroup G\nthis : UniformGroup G\n⊢ T2Space G ↔ IsClosed {1}\n[PROOFSTEP]\nrw [← separated_iff_t2, separatedSpace_iff, ← closure_eq_iff_isClosed]\n[GOAL]\nG : Type u_1\ninst✝² : CommGroup G\ninst✝¹ : TopologicalSpace G\ninst✝ : TopologicalGroup G\nthis : UniformGroup G\n⊢ 𝓢 G = idRel ↔ closure {1} = {1}\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nG : Type u_1\ninst✝² : CommGroup G\ninst✝¹ : TopologicalSpace G\ninst✝ : TopologicalGroup G\nthis : UniformGroup G\n⊢ 𝓢 G = idRel → closure {1} = {1}\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nG : Type u_1\ninst✝² : CommGroup G\ninst✝¹ : TopologicalSpace G\ninst✝ : TopologicalGroup G\nthis : UniformGroup G\n⊢ closure {1} = {1} → 𝓢 G = idRel\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nG : Type u_1\ninst✝² : CommGroup G\ninst✝¹ : TopologicalSpace G\ninst✝ : TopologicalGroup G\nthis : UniformGroup G\nh : 𝓢 G = idRel\n⊢ closure {1} = {1}\n[PROOFSTEP]\napply Subset.antisymm\n[GOAL]\ncase mp.h₁\nG : Type u_1\ninst✝² : CommGroup G\ninst✝¹ : TopologicalSpace G\ninst✝ : TopologicalGroup G\nthis : UniformGroup G\nh : 𝓢 G = idRel\n⊢ closure {1} ⊆ {1}\n[PROOFSTEP]\nintro x x_in\n[GOAL]\ncase mp.h₁\nG : Type u_1\ninst✝² : CommGroup G\ninst✝¹ : TopologicalSpace G\ninst✝ : TopologicalGroup G\nthis : UniformGroup G\nh : 𝓢 G = idRel\nx : G\nx_in : x ∈ closure {1}\n⊢ x ∈ {1}\n[PROOFSTEP]\nhave := group_separationRel x 1\n[GOAL]\ncase mp.h₁\nG : Type u_1\ninst✝² : CommGroup G\ninst✝¹ : TopologicalSpace G\ninst✝ : TopologicalGroup G\nthis✝ : UniformGroup G\nh : 𝓢 G = idRel\nx : G\nx_in : x ∈ closure {1}\nthis : (x, 1) ∈ 𝓢 G ↔ x / 1 ∈ closure {1}\n⊢ x ∈ {1}\n[PROOFSTEP]\nrw [div_one] at this \n[GOAL]\ncase mp.h₁\nG : Type u_1\ninst✝² : CommGroup G\ninst✝¹ : TopologicalSpace G\ninst✝ : TopologicalGroup G\nthis✝ : UniformGroup G\nh : 𝓢 G = idRel\nx : G\nx_in : x ∈ closure {1}\nthis : (x, 1) ∈ 𝓢 G ↔ x ∈ closure {1}\n⊢ x ∈ {1}\n[PROOFSTEP]\nrw [← this, h] at x_in \n[GOAL]\ncase mp.h₁\nG : Type u_1\ninst✝² : CommGroup G\ninst✝¹ : TopologicalSpace G\ninst✝ : TopologicalGroup G\nthis✝ : UniformGroup G\nh : 𝓢 G = idRel\nx : G\nx_in : (x, 1) ∈ idRel\nthis : (x, 1) ∈ 𝓢 G ↔ x ∈ closure {1}\n⊢ x ∈ {1}\n[PROOFSTEP]\nrwa [mem_singleton_iff]\n[GOAL]\ncase mp.h₂\nG : Type u_1\ninst✝² : CommGroup G\ninst✝¹ : TopologicalSpace G\ninst✝ : TopologicalGroup G\nthis : UniformGroup G\nh : 𝓢 G = idRel\n⊢ {1} ⊆ closure {1}\n[PROOFSTEP]\nexact subset_closure\n[GOAL]\ncase mpr\nG : Type u_1\ninst✝² : CommGroup G\ninst✝¹ : TopologicalSpace G\ninst✝ : TopologicalGroup G\nthis : UniformGroup G\nh : closure {1} = {1}\n⊢ 𝓢 G = idRel\n[PROOFSTEP]\next p\n[GOAL]\ncase mpr.h\nG : Type u_1\ninst✝² : CommGroup G\ninst✝¹ : TopologicalSpace G\ninst✝ : TopologicalGroup G\nthis : UniformGroup G\nh : closure {1} = {1}\np : G × G\n⊢ p ∈ 𝓢 G ↔ p ∈ idRel\n[PROOFSTEP]\ncases' p with x y\n[GOAL]\ncase mpr.h.mk\nG : Type u_1\ninst✝² : CommGroup G\ninst✝¹ : TopologicalSpace G\ninst✝ : TopologicalGroup G\nthis : UniformGroup G\nh : closure {1} = {1}\nx y : G\n⊢ (x, y) ∈ 𝓢 G ↔ (x, y) ∈ idRel\n[PROOFSTEP]\nrw [group_separationRel x, h, mem_singleton_iff, div_eq_one]\n[GOAL]\ncase mpr.h.mk\nG : Type u_1\ninst✝² : CommGroup G\ninst✝¹ : TopologicalSpace G\ninst✝ : TopologicalGroup G\nthis : UniformGroup G\nh : closure {1} = {1}\nx y : G\n⊢ x = y ↔ (x, y) ∈ idRel\n[PROOFSTEP]\nrfl\n[GOAL]\nG : Type u_1\ninst✝² : CommGroup G\ninst✝¹ : TopologicalSpace G\ninst✝ : TopologicalGroup G\nH : ∀ (x : G), x ≠ 1 → ∃ U, U ∈ 𝓝 1 ∧ ¬x ∈ U\n⊢ T2Space G\n[PROOFSTEP]\nrw [TopologicalGroup.t2Space_iff_one_closed, ← isOpen_compl_iff, isOpen_iff_mem_nhds]\n[GOAL]\nG : Type u_1\ninst✝² : CommGroup G\ninst✝¹ : TopologicalSpace G\ninst✝ : TopologicalGroup G\nH : ∀ (x : G), x ≠ 1 → ∃ U, U ∈ 𝓝 1 ∧ ¬x ∈ U\n⊢ ∀ (a : G), a ∈ {1}ᶜ → {1}ᶜ ∈ 𝓝 a\n[PROOFSTEP]\nintro x x_not\n[GOAL]\nG : Type u_1\ninst✝² : CommGroup G\ninst✝¹ : TopologicalSpace G\ninst✝ : TopologicalGroup G\nH : ∀ (x : G), x ≠ 1 → ∃ U, U ∈ 𝓝 1 ∧ ¬x ∈ U\nx : G\nx_not : x ∈ {1}ᶜ\n⊢ {1}ᶜ ∈ 𝓝 x\n[PROOFSTEP]\nhave : x ≠ 1 := mem_compl_singleton_iff.mp x_not\n[GOAL]\nG : Type u_1\ninst✝² : CommGroup G\ninst✝¹ : TopologicalSpace G\ninst✝ : TopologicalGroup G\nH : ∀ (x : G), x ≠ 1 → ∃ U, U ∈ 𝓝 1 ∧ ¬x ∈ U\nx : G\nx_not : x ∈ {1}ᶜ\nthis : x ≠ 1\n⊢ {1}ᶜ ∈ 𝓝 x\n[PROOFSTEP]\nrcases H x this with ⟨U, U_in, xU⟩\n[GOAL]\ncase intro.intro\nG : Type u_1\ninst✝² : CommGroup G\ninst✝¹ : TopologicalSpace G\ninst✝ : TopologicalGroup G\nH : ∀ (x : G), x ≠ 1 → ∃ U, U ∈ 𝓝 1 ∧ ¬x ∈ U\nx : G\nx_not : x ∈ {1}ᶜ\nthis : x ≠ 1\nU : Set G\nU_in : U ∈ 𝓝 1\nxU : ¬x ∈ U\n⊢ {1}ᶜ ∈ 𝓝 x\n[PROOFSTEP]\nrw [← nhds_one_symm G] at U_in \n[GOAL]\ncase intro.intro\nG : Type u_1\ninst✝² : CommGroup G\ninst✝¹ : TopologicalSpace G\ninst✝ : TopologicalGroup G\nH : ∀ (x : G), x ≠ 1 → ∃ U, U ∈ 𝓝 1 ∧ ¬x ∈ U\nx : G\nx_not : x ∈ {1}ᶜ\nthis : x ≠ 1\nU : Set G\nU_in : U ∈ comap Inv.inv (𝓝 1)\nxU : ¬x ∈ U\n⊢ {1}ᶜ ∈ 𝓝 x\n[PROOFSTEP]\nrcases U_in with ⟨W, W_in, UW⟩\n[GOAL]\ncase intro.intro.intro.intro\nG : Type u_1\ninst✝² : CommGroup G\ninst✝¹ : TopologicalSpace G\ninst✝ : TopologicalGroup G\nH : ∀ (x : G), x ≠ 1 → ∃ U, U ∈ 𝓝 1 ∧ ¬x ∈ U\nx : G\nx_not : x ∈ {1}ᶜ\nthis : x ≠ 1\nU : Set G\nxU : ¬x ∈ U\nW : Set G\nW_in : W ∈ 𝓝 1\nUW : Inv.inv ⁻¹' W ⊆ U\n⊢ {1}ᶜ ∈ 𝓝 x\n[PROOFSTEP]\nrw [← nhds_translation_mul_inv]\n[GOAL]\ncase intro.intro.intro.intro\nG : Type u_1\ninst✝² : CommGroup G\ninst✝¹ : TopologicalSpace G\ninst✝ : TopologicalGroup G\nH : ∀ (x : G), x ≠ 1 → ∃ U, U ∈ 𝓝 1 ∧ ¬x ∈ U\nx : G\nx_not : x ∈ {1}ᶜ\nthis : x ≠ 1\nU : Set G\nxU : ¬x ∈ U\nW : Set G\nW_in : W ∈ 𝓝 1\nUW : Inv.inv ⁻¹' W ⊆ U\n⊢ {1}ᶜ ∈ comap (fun y => y * x⁻¹) (𝓝 1)\n[PROOFSTEP]\nuse W, W_in\n[GOAL]\ncase right\nG : Type u_1\ninst✝² : CommGroup G\ninst✝¹ : TopologicalSpace G\ninst✝ : TopologicalGroup G\nH : ∀ (x : G), x ≠ 1 → ∃ U, U ∈ 𝓝 1 ∧ ¬x ∈ U\nx : G\nx_not : x ∈ {1}ᶜ\nthis : x ≠ 1\nU : Set G\nxU : ¬x ∈ U\nW : Set G\nW_in : W ∈ 𝓝 1\nUW : Inv.inv ⁻¹' W ⊆ U\n⊢ (fun y => y * x⁻¹) ⁻¹' W ⊆ {1}ᶜ\n[PROOFSTEP]\nrw [subset_compl_comm]\n[GOAL]\ncase right\nG : Type u_1\ninst✝² : CommGroup G\ninst✝¹ : TopologicalSpace G\ninst✝ : TopologicalGroup G\nH : ∀ (x : G), x ≠ 1 → ∃ U, U ∈ 𝓝 1 ∧ ¬x ∈ U\nx : G\nx_not : x ∈ {1}ᶜ\nthis : x ≠ 1\nU : Set G\nxU : ¬x ∈ U\nW : Set G\nW_in : W ∈ 𝓝 1\nUW : Inv.inv ⁻¹' W ⊆ U\n⊢ {1} ⊆ ((fun y => y * x⁻¹) ⁻¹' W)ᶜ\n[PROOFSTEP]\nsuffices x⁻¹ ∉ W by simpa\n[GOAL]\nG : Type u_1\ninst✝² : CommGroup G\ninst✝¹ : TopologicalSpace G\ninst✝ : TopologicalGroup G\nH : ∀ (x : G), x ≠ 1 → ∃ U, U ∈ 𝓝 1 ∧ ¬x ∈ U\nx : G\nx_not : x ∈ {1}ᶜ\nthis✝ : x ≠ 1\nU : Set G\nxU : ¬x ∈ U\nW : Set G\nW_in : W ∈ 𝓝 1\nUW : Inv.inv ⁻¹' W ⊆ U\nthis : ¬x⁻¹ ∈ W\n⊢ {1} ⊆ ((fun y => y * x⁻¹) ⁻¹' W)ᶜ\n[PROOFSTEP]\nsimpa\n[GOAL]\ncase right\nG : Type u_1\ninst✝² : CommGroup G\ninst✝¹ : TopologicalSpace G\ninst✝ : TopologicalGroup G\nH : ∀ (x : G), x ≠ 1 → ∃ U, U ∈ 𝓝 1 ∧ ¬x ∈ U\nx : G\nx_not : x ∈ {1}ᶜ\nthis : x ≠ 1\nU : Set G\nxU : ¬x ∈ U\nW : Set G\nW_in : W ∈ 𝓝 1\nUW : Inv.inv ⁻¹' W ⊆ U\n⊢ ¬x⁻¹ ∈ W\n[PROOFSTEP]\nexact fun h => xU (UW h)\n[GOAL]\nG✝ : Type u_1\ninst✝⁴ : CommGroup G✝\ninst✝³ : TopologicalSpace G✝\ninst✝² : TopologicalGroup G✝\nG : Type u_2\nu : UniformSpace G\ninst✝¹ : Group G\ninst✝ : UniformGroup G\n⊢ TopologicalGroup.toUniformSpace G = u\n[PROOFSTEP]\next : 1\n[GOAL]\ncase a\nG✝ : Type u_1\ninst✝⁴ : CommGroup G✝\ninst✝³ : TopologicalSpace G✝\ninst✝² : TopologicalGroup G✝\nG : Type u_2\nu : UniformSpace G\ninst✝¹ : Group G\ninst✝ : UniformGroup G\n⊢ 𝓤 G = 𝓤 G\n[PROOFSTEP]\nrw [uniformity_eq_comap_nhds_one' G, uniformity_eq_comap_nhds_one G]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nhom : Type u_3\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : Group α\ninst✝³ : TopologicalGroup α\ninst✝² : TopologicalSpace β\ninst✝¹ : Group β\ninst✝ : MonoidHomClass hom β α\ne : hom\nde : DenseInducing ↑e\nx₀ : α\n⊢ Tendsto (fun t => t.snd / t.fst) (comap (fun p => (↑e p.fst, ↑e p.snd)) (𝓝 (x₀, x₀))) (𝓝 1)\n[PROOFSTEP]\nhave comm : ((fun x : α × α => x.2 / x.1) ∘ fun t : β × β => (e t.1, e t.2)) = e ∘ fun t : β × β => t.2 / t.1 :=\n  by\n  ext t\n  change e t.2 / e t.1 = e (t.2 / t.1)\n  rw [← map_div e t.2 t.1]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nhom : Type u_3\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : Group α\ninst✝³ : TopologicalGroup α\ninst✝² : TopologicalSpace β\ninst✝¹ : Group β\ninst✝ : MonoidHomClass hom β α\ne : hom\nde : DenseInducing ↑e\nx₀ : α\n⊢ ((fun x => x.snd / x.fst) ∘ fun t => (↑e t.fst, ↑e t.snd)) = ↑e ∘ fun t => t.snd / t.fst\n[PROOFSTEP]\next t\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nhom : Type u_3\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : Group α\ninst✝³ : TopologicalGroup α\ninst✝² : TopologicalSpace β\ninst✝¹ : Group β\ninst✝ : MonoidHomClass hom β α\ne : hom\nde : DenseInducing ↑e\nx₀ : α\nt : β × β\n⊢ ((fun x => x.snd / x.fst) ∘ fun t => (↑e t.fst, ↑e t.snd)) t = (↑e ∘ fun t => t.snd / t.fst) t\n[PROOFSTEP]\nchange e t.2 / e t.1 = e (t.2 / t.1)\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nhom : Type u_3\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : Group α\ninst✝³ : TopologicalGroup α\ninst✝² : TopologicalSpace β\ninst✝¹ : Group β\ninst✝ : MonoidHomClass hom β α\ne : hom\nde : DenseInducing ↑e\nx₀ : α\nt : β × β\n⊢ ↑e t.snd / ↑e t.fst = ↑e (t.snd / t.fst)\n[PROOFSTEP]\nrw [← map_div e t.2 t.1]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nhom : Type u_3\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : Group α\ninst✝³ : TopologicalGroup α\ninst✝² : TopologicalSpace β\ninst✝¹ : Group β\ninst✝ : MonoidHomClass hom β α\ne : hom\nde : DenseInducing ↑e\nx₀ : α\ncomm : ((fun x => x.snd / x.fst) ∘ fun t => (↑e t.fst, ↑e t.snd)) = ↑e ∘ fun t => t.snd / t.fst\n⊢ Tendsto (fun t => t.snd / t.fst) (comap (fun p => (↑e p.fst, ↑e p.snd)) (𝓝 (x₀, x₀))) (𝓝 1)\n[PROOFSTEP]\nhave lim : Tendsto (fun x : α × α => x.2 / x.1) (𝓝 (x₀, x₀)) (𝓝 (e 1)) := by\n  simpa using (continuous_div'.comp (@continuous_swap α α _ _)).tendsto (x₀, x₀)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nhom : Type u_3\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : Group α\ninst✝³ : TopologicalGroup α\ninst✝² : TopologicalSpace β\ninst✝¹ : Group β\ninst✝ : MonoidHomClass hom β α\ne : hom\nde : DenseInducing ↑e\nx₀ : α\ncomm : ((fun x => x.snd / x.fst) ∘ fun t => (↑e t.fst, ↑e t.snd)) = ↑e ∘ fun t => t.snd / t.fst\n⊢ Tendsto (fun x => x.snd / x.fst) (𝓝 (x₀, x₀)) (𝓝 (↑e 1))\n[PROOFSTEP]\nsimpa using (continuous_div'.comp (@continuous_swap α α _ _)).tendsto (x₀, x₀)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nhom : Type u_3\ninst✝⁵ : TopologicalSpace α\ninst✝⁴ : Group α\ninst✝³ : TopologicalGroup α\ninst✝² : TopologicalSpace β\ninst✝¹ : Group β\ninst✝ : MonoidHomClass hom β α\ne : hom\nde : DenseInducing ↑e\nx₀ : α\ncomm : ((fun x => x.snd / x.fst) ∘ fun t => (↑e t.fst, ↑e t.snd)) = ↑e ∘ fun t => t.snd / t.fst\nlim : Tendsto (fun x => x.snd / x.fst) (𝓝 (x₀, x₀)) (𝓝 (↑e 1))\n⊢ Tendsto (fun t => t.snd / t.fst) (comap (fun p => (↑e p.fst, ↑e p.snd)) (𝓝 (x₀, x₀))) (𝓝 1)\n[PROOFSTEP]\nsimpa using de.tendsto_comap_nhds_nhds lim comm\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nG : Type u_5\ninst✝¹⁶ : TopologicalSpace α\ninst✝¹⁵ : AddCommGroup α\ninst✝¹⁴ : TopologicalAddGroup α\ninst✝¹³ : TopologicalSpace β\ninst✝¹² : AddCommGroup β\ninst✝¹¹ : TopologicalAddGroup β\ninst✝¹⁰ : TopologicalSpace γ\ninst✝⁹ : AddCommGroup γ\ninst✝⁸ : TopologicalAddGroup γ\ninst✝⁷ : TopologicalSpace δ\ninst✝⁶ : AddCommGroup δ\ninst✝⁵ : TopologicalAddGroup δ\ninst✝⁴ : UniformSpace G\ninst✝³ : AddCommGroup G\ninst✝² : UniformAddGroup G\ninst✝¹ : SeparatedSpace G\ninst✝ : CompleteSpace G\ne : β →+ α\nde : DenseInducing ↑e\nf : δ →+ γ\ndf : DenseInducing ↑f\nφ : β →+ δ →+ G\nhφ : Continuous fun p => ↑(↑φ p.fst) p.snd\nW' : Set G\nW'_nhd : W' ∈ 𝓝 0\nx₀ : α\ny₁ : δ\n⊢ ∃ U₂,\n    U₂ ∈ comap (↑e) (𝓝 x₀) ∧ ∀ (x : β), x ∈ U₂ → ∀ (x' : β), x' ∈ U₂ → (fun p => ↑(↑φ p.fst) p.snd) (x' - x, y₁) ∈ W'\n[PROOFSTEP]\nlet Nx := 𝓝 x₀\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nG : Type u_5\ninst✝¹⁶ : TopologicalSpace α\ninst✝¹⁵ : AddCommGroup α\ninst✝¹⁴ : TopologicalAddGroup α\ninst✝¹³ : TopologicalSpace β\ninst✝¹² : AddCommGroup β\ninst✝¹¹ : TopologicalAddGroup β\ninst✝¹⁰ : TopologicalSpace γ\ninst✝⁹ : AddCommGroup γ\ninst✝⁸ : TopologicalAddGroup γ\ninst✝⁷ : TopologicalSpace δ\ninst✝⁶ : AddCommGroup δ\ninst✝⁵ : TopologicalAddGroup δ\ninst✝⁴ : UniformSpace G\ninst✝³ : AddCommGroup G\ninst✝² : UniformAddGroup G\ninst✝¹ : SeparatedSpace G\ninst✝ : CompleteSpace G\ne : β →+ α\nde : DenseInducing ↑e\nf : δ →+ γ\ndf : DenseInducing ↑f\nφ : β →+ δ →+ G\nhφ : Continuous fun p => ↑(↑φ p.fst) p.snd\nW' : Set G\nW'_nhd : W' ∈ 𝓝 0\nx₀ : α\ny₁ : δ\nNx : Filter α := 𝓝 x₀\n⊢ ∃ U₂,\n    U₂ ∈ comap (↑e) (𝓝 x₀) ∧ ∀ (x : β), x ∈ U₂ → ∀ (x' : β), x' ∈ U₂ → (fun p => ↑(↑φ p.fst) p.snd) (x' - x, y₁) ∈ W'\n[PROOFSTEP]\nlet ee := fun u : β × β => (e u.1, e u.2)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nG : Type u_5\ninst✝¹⁶ : TopologicalSpace α\ninst✝¹⁵ : AddCommGroup α\ninst✝¹⁴ : TopologicalAddGroup α\ninst✝¹³ : TopologicalSpace β\ninst✝¹² : AddCommGroup β\ninst✝¹¹ : TopologicalAddGroup β\ninst✝¹⁰ : TopologicalSpace γ\ninst✝⁹ : AddCommGroup γ\ninst✝⁸ : TopologicalAddGroup γ\ninst✝⁷ : TopologicalSpace δ\ninst✝⁶ : AddCommGroup δ\ninst✝⁵ : TopologicalAddGroup δ\ninst✝⁴ : UniformSpace G\ninst✝³ : AddCommGroup G\ninst✝² : UniformAddGroup G\ninst✝¹ : SeparatedSpace G\ninst✝ : CompleteSpace G\ne : β →+ α\nde : DenseInducing ↑e\nf : δ →+ γ\ndf : DenseInducing ↑f\nφ : β →+ δ →+ G\nhφ : Continuous fun p => ↑(↑φ p.fst) p.snd\nW' : Set G\nW'_nhd : W' ∈ 𝓝 0\nx₀ : α\ny₁ : δ\nNx : Filter α := 𝓝 x₀\nee : (u : β × β) → (fun x => α) u.fst × (fun x => α) u.snd := fun u => (↑e u.fst, ↑e u.snd)\n⊢ ∃ U₂,\n    U₂ ∈ comap (↑e) (𝓝 x₀) ∧ ∀ (x : β), x ∈ U₂ → ∀ (x' : β), x' ∈ U₂ → (fun p => ↑(↑φ p.fst) p.snd) (x' - x, y₁) ∈ W'\n[PROOFSTEP]\nhave lim1 : Tendsto (fun a : β × β => (a.2 - a.1, y₁)) (comap e Nx ×ˢ comap e Nx) (𝓝 (0, y₁)) :=\n  by\n  have :=\n    Tendsto.prod_mk (tendsto_sub_comap_self de x₀)\n      (tendsto_const_nhds : Tendsto (fun _ : β × β => y₁) (comap ee <| 𝓝 (x₀, x₀)) (𝓝 y₁))\n  rw [nhds_prod_eq, prod_comap_comap_eq, ← nhds_prod_eq]\n  exact (this : _)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nG : Type u_5\ninst✝¹⁶ : TopologicalSpace α\ninst✝¹⁵ : AddCommGroup α\ninst✝¹⁴ : TopologicalAddGroup α\ninst✝¹³ : TopologicalSpace β\ninst✝¹² : AddCommGroup β\ninst✝¹¹ : TopologicalAddGroup β\ninst✝¹⁰ : TopologicalSpace γ\ninst✝⁹ : AddCommGroup γ\ninst✝⁸ : TopologicalAddGroup γ\ninst✝⁷ : TopologicalSpace δ\ninst✝⁶ : AddCommGroup δ\ninst✝⁵ : TopologicalAddGroup δ\ninst✝⁴ : UniformSpace G\ninst✝³ : AddCommGroup G\ninst✝² : UniformAddGroup G\ninst✝¹ : SeparatedSpace G\ninst✝ : CompleteSpace G\ne : β →+ α\nde : DenseInducing ↑e\nf : δ →+ γ\ndf : DenseInducing ↑f\nφ : β →+ δ →+ G\nhφ : Continuous fun p => ↑(↑φ p.fst) p.snd\nW' : Set G\nW'_nhd : W' ∈ 𝓝 0\nx₀ : α\ny₁ : δ\nNx : Filter α := 𝓝 x₀\nee : (u : β × β) → (fun x => α) u.fst × (fun x => α) u.snd := fun u => (↑e u.fst, ↑e u.snd)\n⊢ Tendsto (fun a => (a.snd - a.fst, y₁)) (comap (↑e) Nx ×ˢ comap (↑e) Nx) (𝓝 (0, y₁))\n[PROOFSTEP]\nhave :=\n  Tendsto.prod_mk (tendsto_sub_comap_self de x₀)\n    (tendsto_const_nhds : Tendsto (fun _ : β × β => y₁) (comap ee <| 𝓝 (x₀, x₀)) (𝓝 y₁))\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nG : Type u_5\ninst✝¹⁶ : TopologicalSpace α\ninst✝¹⁵ : AddCommGroup α\ninst✝¹⁴ : TopologicalAddGroup α\ninst✝¹³ : TopologicalSpace β\ninst✝¹² : AddCommGroup β\ninst✝¹¹ : TopologicalAddGroup β\ninst✝¹⁰ : TopologicalSpace γ\ninst✝⁹ : AddCommGroup γ\ninst✝⁸ : TopologicalAddGroup γ\ninst✝⁷ : TopologicalSpace δ\ninst✝⁶ : AddCommGroup δ\ninst✝⁵ : TopologicalAddGroup δ\ninst✝⁴ : UniformSpace G\ninst✝³ : AddCommGroup G\ninst✝² : UniformAddGroup G\ninst✝¹ : SeparatedSpace G\ninst✝ : CompleteSpace G\ne : β →+ α\nde : DenseInducing ↑e\nf : δ →+ γ\ndf : DenseInducing ↑f\nφ : β →+ δ →+ G\nhφ : Continuous fun p => ↑(↑φ p.fst) p.snd\nW' : Set G\nW'_nhd : W' ∈ 𝓝 0\nx₀ : α\ny₁ : δ\nNx : Filter α := 𝓝 x₀\nee : (u : β × β) → (fun x => α) u.fst × (fun x => α) u.snd := fun u => (↑e u.fst, ↑e u.snd)\nthis : Tendsto (fun x => (x.snd - x.fst, y₁)) (comap (fun p => (↑e p.fst, ↑e p.snd)) (𝓝 (x₀, x₀))) (𝓝 0 ×ˢ 𝓝 y₁)\n⊢ Tendsto (fun a => (a.snd - a.fst, y₁)) (comap (↑e) Nx ×ˢ comap (↑e) Nx) (𝓝 (0, y₁))\n[PROOFSTEP]\nrw [nhds_prod_eq, prod_comap_comap_eq, ← nhds_prod_eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nG : Type u_5\ninst✝¹⁶ : TopologicalSpace α\ninst✝¹⁵ : AddCommGroup α\ninst✝¹⁴ : TopologicalAddGroup α\ninst✝¹³ : TopologicalSpace β\ninst✝¹² : AddCommGroup β\ninst✝¹¹ : TopologicalAddGroup β\ninst✝¹⁰ : TopologicalSpace γ\ninst✝⁹ : AddCommGroup γ\ninst✝⁸ : TopologicalAddGroup γ\ninst✝⁷ : TopologicalSpace δ\ninst✝⁶ : AddCommGroup δ\ninst✝⁵ : TopologicalAddGroup δ\ninst✝⁴ : UniformSpace G\ninst✝³ : AddCommGroup G\ninst✝² : UniformAddGroup G\ninst✝¹ : SeparatedSpace G\ninst✝ : CompleteSpace G\ne : β →+ α\nde : DenseInducing ↑e\nf : δ →+ γ\ndf : DenseInducing ↑f\nφ : β →+ δ →+ G\nhφ : Continuous fun p => ↑(↑φ p.fst) p.snd\nW' : Set G\nW'_nhd : W' ∈ 𝓝 0\nx₀ : α\ny₁ : δ\nNx : Filter α := 𝓝 x₀\nee : (u : β × β) → (fun x => α) u.fst × (fun x => α) u.snd := fun u => (↑e u.fst, ↑e u.snd)\nthis : Tendsto (fun x => (x.snd - x.fst, y₁)) (comap (fun p => (↑e p.fst, ↑e p.snd)) (𝓝 (x₀, x₀))) (𝓝 0 ×ˢ 𝓝 y₁)\n⊢ Tendsto (fun a => (a.snd - a.fst, y₁)) (comap (fun p => (↑e p.fst, ↑e p.snd)) (𝓝 (x₀, x₀))) (𝓝 0 ×ˢ 𝓝 y₁)\n[PROOFSTEP]\nexact (this : _)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nG : Type u_5\ninst✝¹⁶ : TopologicalSpace α\ninst✝¹⁵ : AddCommGroup α\ninst✝¹⁴ : TopologicalAddGroup α\ninst✝¹³ : TopologicalSpace β\ninst✝¹² : AddCommGroup β\ninst✝¹¹ : TopologicalAddGroup β\ninst✝¹⁰ : TopologicalSpace γ\ninst✝⁹ : AddCommGroup γ\ninst✝⁸ : TopologicalAddGroup γ\ninst✝⁷ : TopologicalSpace δ\ninst✝⁶ : AddCommGroup δ\ninst✝⁵ : TopologicalAddGroup δ\ninst✝⁴ : UniformSpace G\ninst✝³ : AddCommGroup G\ninst✝² : UniformAddGroup G\ninst✝¹ : SeparatedSpace G\ninst✝ : CompleteSpace G\ne : β →+ α\nde : DenseInducing ↑e\nf : δ →+ γ\ndf : DenseInducing ↑f\nφ : β →+ δ →+ G\nhφ : Continuous fun p => ↑(↑φ p.fst) p.snd\nW' : Set G\nW'_nhd : W' ∈ 𝓝 0\nx₀ : α\ny₁ : δ\nNx : Filter α := 𝓝 x₀\nee : (u : β × β) → (fun x => α) u.fst × (fun x => α) u.snd := fun u => (↑e u.fst, ↑e u.snd)\nlim1 : Tendsto (fun a => (a.snd - a.fst, y₁)) (comap (↑e) Nx ×ˢ comap (↑e) Nx) (𝓝 (0, y₁))\n⊢ ∃ U₂,\n    U₂ ∈ comap (↑e) (𝓝 x₀) ∧ ∀ (x : β), x ∈ U₂ → ∀ (x' : β), x' ∈ U₂ → (fun p => ↑(↑φ p.fst) p.snd) (x' - x, y₁) ∈ W'\n[PROOFSTEP]\nhave lim2 : Tendsto (fun p : β × δ => φ p.1 p.2) (𝓝 (0, y₁)) (𝓝 0) := by simpa using hφ.tendsto (0, y₁)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nG : Type u_5\ninst✝¹⁶ : TopologicalSpace α\ninst✝¹⁵ : AddCommGroup α\ninst✝¹⁴ : TopologicalAddGroup α\ninst✝¹³ : TopologicalSpace β\ninst✝¹² : AddCommGroup β\ninst✝¹¹ : TopologicalAddGroup β\ninst✝¹⁰ : TopologicalSpace γ\ninst✝⁹ : AddCommGroup γ\ninst✝⁸ : TopologicalAddGroup γ\ninst✝⁷ : TopologicalSpace δ\ninst✝⁶ : AddCommGroup δ\ninst✝⁵ : TopologicalAddGroup δ\ninst✝⁴ : UniformSpace G\ninst✝³ : AddCommGroup G\ninst✝² : UniformAddGroup G\ninst✝¹ : SeparatedSpace G\ninst✝ : CompleteSpace G\ne : β →+ α\nde : DenseInducing ↑e\nf : δ →+ γ\ndf : DenseInducing ↑f\nφ : β →+ δ →+ G\nhφ : Continuous fun p => ↑(↑φ p.fst) p.snd\nW' : Set G\nW'_nhd : W' ∈ 𝓝 0\nx₀ : α\ny₁ : δ\nNx : Filter α := 𝓝 x₀\nee : (u : β × β) → (fun x => α) u.fst × (fun x => α) u.snd := fun u => (↑e u.fst, ↑e u.snd)\nlim1 : Tendsto (fun a => (a.snd - a.fst, y₁)) (comap (↑e) Nx ×ˢ comap (↑e) Nx) (𝓝 (0, y₁))\n⊢ Tendsto (fun p => ↑(↑φ p.fst) p.snd) (𝓝 (0, y₁)) (𝓝 0)\n[PROOFSTEP]\nsimpa using hφ.tendsto (0, y₁)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nG : Type u_5\ninst✝¹⁶ : TopologicalSpace α\ninst✝¹⁵ : AddCommGroup α\ninst✝¹⁴ : TopologicalAddGroup α\ninst✝¹³ : TopologicalSpace β\ninst✝¹² : AddCommGroup β\ninst✝¹¹ : TopologicalAddGroup β\ninst✝¹⁰ : TopologicalSpace γ\ninst✝⁹ : AddCommGroup γ\ninst✝⁸ : TopologicalAddGroup γ\ninst✝⁷ : TopologicalSpace δ\ninst✝⁶ : AddCommGroup δ\ninst✝⁵ : TopologicalAddGroup δ\ninst✝⁴ : UniformSpace G\ninst✝³ : AddCommGroup G\ninst✝² : UniformAddGroup G\ninst✝¹ : SeparatedSpace G\ninst✝ : CompleteSpace G\ne : β →+ α\nde : DenseInducing ↑e\nf : δ →+ γ\ndf : DenseInducing ↑f\nφ : β →+ δ →+ G\nhφ : Continuous fun p => ↑(↑φ p.fst) p.snd\nW' : Set G\nW'_nhd : W' ∈ 𝓝 0\nx₀ : α\ny₁ : δ\nNx : Filter α := 𝓝 x₀\nee : (u : β × β) → (fun x => α) u.fst × (fun x => α) u.snd := fun u => (↑e u.fst, ↑e u.snd)\nlim1 : Tendsto (fun a => (a.snd - a.fst, y₁)) (comap (↑e) Nx ×ˢ comap (↑e) Nx) (𝓝 (0, y₁))\nlim2 : Tendsto (fun p => ↑(↑φ p.fst) p.snd) (𝓝 (0, y₁)) (𝓝 0)\n⊢ ∃ U₂,\n    U₂ ∈ comap (↑e) (𝓝 x₀) ∧ ∀ (x : β), x ∈ U₂ → ∀ (x' : β), x' ∈ U₂ → (fun p => ↑(↑φ p.fst) p.snd) (x' - x, y₁) ∈ W'\n[PROOFSTEP]\nhave lim := lim2.comp lim1\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nG : Type u_5\ninst✝¹⁶ : TopologicalSpace α\ninst✝¹⁵ : AddCommGroup α\ninst✝¹⁴ : TopologicalAddGroup α\ninst✝¹³ : TopologicalSpace β\ninst✝¹² : AddCommGroup β\ninst✝¹¹ : TopologicalAddGroup β\ninst✝¹⁰ : TopologicalSpace γ\ninst✝⁹ : AddCommGroup γ\ninst✝⁸ : TopologicalAddGroup γ\ninst✝⁷ : TopologicalSpace δ\ninst✝⁶ : AddCommGroup δ\ninst✝⁵ : TopologicalAddGroup δ\ninst✝⁴ : UniformSpace G\ninst✝³ : AddCommGroup G\ninst✝² : UniformAddGroup G\ninst✝¹ : SeparatedSpace G\ninst✝ : CompleteSpace G\ne : β →+ α\nde : DenseInducing ↑e\nf : δ →+ γ\ndf : DenseInducing ↑f\nφ : β →+ δ →+ G\nhφ : Continuous fun p => ↑(↑φ p.fst) p.snd\nW' : Set G\nW'_nhd : W' ∈ 𝓝 0\nx₀ : α\ny₁ : δ\nNx : Filter α := 𝓝 x₀\nee : (u : β × β) → (fun x => α) u.fst × (fun x => α) u.snd := fun u => (↑e u.fst, ↑e u.snd)\nlim1 : Tendsto (fun a => (a.snd - a.fst, y₁)) (comap (↑e) Nx ×ˢ comap (↑e) Nx) (𝓝 (0, y₁))\nlim2 : Tendsto (fun p => ↑(↑φ p.fst) p.snd) (𝓝 (0, y₁)) (𝓝 0)\nlim : Tendsto ((fun p => ↑(↑φ p.fst) p.snd) ∘ fun a => (a.snd - a.fst, y₁)) (comap (↑e) Nx ×ˢ comap (↑e) Nx) (𝓝 0)\n⊢ ∃ U₂,\n    U₂ ∈ comap (↑e) (𝓝 x₀) ∧ ∀ (x : β), x ∈ U₂ → ∀ (x' : β), x' ∈ U₂ → (fun p => ↑(↑φ p.fst) p.snd) (x' - x, y₁) ∈ W'\n[PROOFSTEP]\nrw [tendsto_prod_self_iff] at lim \n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nG : Type u_5\ninst✝¹⁶ : TopologicalSpace α\ninst✝¹⁵ : AddCommGroup α\ninst✝¹⁴ : TopologicalAddGroup α\ninst✝¹³ : TopologicalSpace β\ninst✝¹² : AddCommGroup β\ninst✝¹¹ : TopologicalAddGroup β\ninst✝¹⁰ : TopologicalSpace γ\ninst✝⁹ : AddCommGroup γ\ninst✝⁸ : TopologicalAddGroup γ\ninst✝⁷ : TopologicalSpace δ\ninst✝⁶ : AddCommGroup δ\ninst✝⁵ : TopologicalAddGroup δ\ninst✝⁴ : UniformSpace G\ninst✝³ : AddCommGroup G\ninst✝² : UniformAddGroup G\ninst✝¹ : SeparatedSpace G\ninst✝ : CompleteSpace G\ne : β →+ α\nde : DenseInducing ↑e\nf : δ →+ γ\ndf : DenseInducing ↑f\nφ : β →+ δ →+ G\nhφ : Continuous fun p => ↑(↑φ p.fst) p.snd\nW' : Set G\nW'_nhd : W' ∈ 𝓝 0\nx₀ : α\ny₁ : δ\nNx : Filter α := 𝓝 x₀\nee : (u : β × β) → (fun x => α) u.fst × (fun x => α) u.snd := fun u => (↑e u.fst, ↑e u.snd)\nlim1 : Tendsto (fun a => (a.snd - a.fst, y₁)) (comap (↑e) Nx ×ˢ comap (↑e) Nx) (𝓝 (0, y₁))\nlim2 : Tendsto (fun p => ↑(↑φ p.fst) p.snd) (𝓝 (0, y₁)) (𝓝 0)\nlim :\n  ∀ (W : Set G),\n    W ∈ 𝓝 0 →\n      ∃ U,\n        U ∈ comap (↑e) Nx ∧\n          ∀ (x x' : β), x ∈ U → x' ∈ U → ((fun p => ↑(↑φ p.fst) p.snd) ∘ fun a => (a.snd - a.fst, y₁)) (x, x') ∈ W\n⊢ ∃ U₂,\n    U₂ ∈ comap (↑e) (𝓝 x₀) ∧ ∀ (x : β), x ∈ U₂ → ∀ (x' : β), x' ∈ U₂ → (fun p => ↑(↑φ p.fst) p.snd) (x' - x, y₁) ∈ W'\n[PROOFSTEP]\nsimp_rw [ball_mem_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nG : Type u_5\ninst✝¹⁶ : TopologicalSpace α\ninst✝¹⁵ : AddCommGroup α\ninst✝¹⁴ : TopologicalAddGroup α\ninst✝¹³ : TopologicalSpace β\ninst✝¹² : AddCommGroup β\ninst✝¹¹ : TopologicalAddGroup β\ninst✝¹⁰ : TopologicalSpace γ\ninst✝⁹ : AddCommGroup γ\ninst✝⁸ : TopologicalAddGroup γ\ninst✝⁷ : TopologicalSpace δ\ninst✝⁶ : AddCommGroup δ\ninst✝⁵ : TopologicalAddGroup δ\ninst✝⁴ : UniformSpace G\ninst✝³ : AddCommGroup G\ninst✝² : UniformAddGroup G\ninst✝¹ : SeparatedSpace G\ninst✝ : CompleteSpace G\ne : β →+ α\nde : DenseInducing ↑e\nf : δ →+ γ\ndf : DenseInducing ↑f\nφ : β →+ δ →+ G\nhφ : Continuous fun p => ↑(↑φ p.fst) p.snd\nW' : Set G\nW'_nhd : W' ∈ 𝓝 0\nx₀ : α\ny₁ : δ\nNx : Filter α := 𝓝 x₀\nee : (u : β × β) → (fun x => α) u.fst × (fun x => α) u.snd := fun u => (↑e u.fst, ↑e u.snd)\nlim1 : Tendsto (fun a => (a.snd - a.fst, y₁)) (comap (↑e) Nx ×ˢ comap (↑e) Nx) (𝓝 (0, y₁))\nlim2 : Tendsto (fun p => ↑(↑φ p.fst) p.snd) (𝓝 (0, y₁)) (𝓝 0)\nlim :\n  ∀ (W : Set G),\n    W ∈ 𝓝 0 →\n      ∃ U,\n        U ∈ comap (↑e) Nx ∧\n          ∀ (x x' : β), x ∈ U → x' ∈ U → ((fun p => ↑(↑φ p.fst) p.snd) ∘ fun a => (a.snd - a.fst, y₁)) (x, x') ∈ W\n⊢ ∃ U₂, U₂ ∈ comap (↑e) (𝓝 x₀) ∧ ∀ (a b : β), a ∈ U₂ → b ∈ U₂ → ↑(↑φ (b - a)) y₁ ∈ W'\n[PROOFSTEP]\nexact lim W' W'_nhd\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nG : Type u_5\ninst✝¹⁶ : TopologicalSpace α\ninst✝¹⁵ : AddCommGroup α\ninst✝¹⁴ : TopologicalAddGroup α\ninst✝¹³ : TopologicalSpace β\ninst✝¹² : AddCommGroup β\ninst✝¹¹ : TopologicalAddGroup β\ninst✝¹⁰ : TopologicalSpace γ\ninst✝⁹ : AddCommGroup γ\ninst✝⁸ : TopologicalAddGroup γ\ninst✝⁷ : TopologicalSpace δ\ninst✝⁶ : AddCommGroup δ\ninst✝⁵ : TopologicalAddGroup δ\ninst✝⁴ : UniformSpace G\ninst✝³ : AddCommGroup G\ninst✝² : UniformAddGroup G\ninst✝¹ : SeparatedSpace G\ninst✝ : CompleteSpace G\ne : β →+ α\nde : DenseInducing ↑e\nf : δ →+ γ\ndf : DenseInducing ↑f\nφ : β →+ δ →+ G\nhφ : Continuous fun p => ↑(↑φ p.fst) p.snd\nW' : Set G\nW'_nhd : W' ∈ 𝓝 0\nx₀ : α\ny₀ : γ\n⊢ ∃ U,\n    U ∈ comap (↑e) (𝓝 x₀) ∧\n      ∃ V,\n        V ∈ comap (↑f) (𝓝 y₀) ∧\n          ∀ (x : β),\n            x ∈ U →\n              ∀ (x' : β),\n                x' ∈ U →\n                  ∀ (y : δ),\n                    y ∈ V →\n                      ∀ (y' : δ),\n                        y' ∈ V → (fun p => ↑(↑φ p.fst) p.snd) (x', y') - (fun p => ↑(↑φ p.fst) p.snd) (x, y) ∈ W'\n[PROOFSTEP]\nlet ee := fun u : β × β => (e u.1, e u.2)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nG : Type u_5\ninst✝¹⁶ : TopologicalSpace α\ninst✝¹⁵ : AddCommGroup α\ninst✝¹⁴ : TopologicalAddGroup α\ninst✝¹³ : TopologicalSpace β\ninst✝¹² : AddCommGroup β\ninst✝¹¹ : TopologicalAddGroup β\ninst✝¹⁰ : TopologicalSpace γ\ninst✝⁹ : AddCommGroup γ\ninst✝⁸ : TopologicalAddGroup γ\ninst✝⁷ : TopologicalSpace δ\ninst✝⁶ : AddCommGroup δ\ninst✝⁵ : TopologicalAddGroup δ\ninst✝⁴ : UniformSpace G\ninst✝³ : AddCommGroup G\ninst✝² : UniformAddGroup G\ninst✝¹ : SeparatedSpace G\ninst✝ : CompleteSpace G\ne : β →+ α\nde : DenseInducing ↑e\nf : δ →+ γ\ndf : DenseInducing ↑f\nφ : β →+ δ →+ G\nhφ : Continuous fun p => ↑(↑φ p.fst) p.snd\nW' : Set G\nW'_nhd : W' ∈ 𝓝 0\nx₀ : α\ny₀ : γ\nee : (u : β × β) → (fun x => α) u.fst × (fun x => α) u.snd := fun u => (↑e u.fst, ↑e u.snd)\n⊢ ∃ U,\n    U ∈ comap (↑e) (𝓝 x₀) ∧\n      ∃ V,\n        V ∈ comap (↑f) (𝓝 y₀) ∧\n          ∀ (x : β),\n            x ∈ U →\n              ∀ (x' : β),\n                x' ∈ U →\n                  ∀ (y : δ),\n                    y ∈ V →\n                      ∀ (y' : δ),\n                        y' ∈ V → (fun p => ↑(↑φ p.fst) p.snd) (x', y') - (fun p => ↑(↑φ p.fst) p.snd) (x, y) ∈ W'\n[PROOFSTEP]\nlet ff := fun u : δ × δ => (f u.1, f u.2)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nG : Type u_5\ninst✝¹⁶ : TopologicalSpace α\ninst✝¹⁵ : AddCommGroup α\ninst✝¹⁴ : TopologicalAddGroup α\ninst✝¹³ : TopologicalSpace β\ninst✝¹² : AddCommGroup β\ninst✝¹¹ : TopologicalAddGroup β\ninst✝¹⁰ : TopologicalSpace γ\ninst✝⁹ : AddCommGroup γ\ninst✝⁸ : TopologicalAddGroup γ\ninst✝⁷ : TopologicalSpace δ\ninst✝⁶ : AddCommGroup δ\ninst✝⁵ : TopologicalAddGroup δ\ninst✝⁴ : UniformSpace G\ninst✝³ : AddCommGroup G\ninst✝² : UniformAddGroup G\ninst✝¹ : SeparatedSpace G\ninst✝ : CompleteSpace G\ne : β →+ α\nde : DenseInducing ↑e\nf : δ →+ γ\ndf : DenseInducing ↑f\nφ : β →+ δ →+ G\nhφ : Continuous fun p => ↑(↑φ p.fst) p.snd\nW' : Set G\nW'_nhd : W' ∈ 𝓝 0\nx₀ : α\ny₀ : γ\nee : (u : β × β) → (fun x => α) u.fst × (fun x => α) u.snd := fun u => (↑e u.fst, ↑e u.snd)\nff : (u : δ × δ) → (fun x => γ) u.fst × (fun x => γ) u.snd := fun u => (↑f u.fst, ↑f u.snd)\n⊢ ∃ U,\n    U ∈ comap (↑e) (𝓝 x₀) ∧\n      ∃ V,\n        V ∈ comap (↑f) (𝓝 y₀) ∧\n          ∀ (x : β),\n            x ∈ U →\n              ∀ (x' : β),\n                x' ∈ U →\n                  ∀ (y : δ),\n                    y ∈ V →\n                      ∀ (y' : δ),\n                        y' ∈ V → (fun p => ↑(↑φ p.fst) p.snd) (x', y') - (fun p => ↑(↑φ p.fst) p.snd) (x, y) ∈ W'\n[PROOFSTEP]\nhave lim_φ : Filter.Tendsto (fun p : β × δ => φ p.1 p.2) (𝓝 (0, 0)) (𝓝 0) := by simpa using hφ.tendsto (0, 0)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nG : Type u_5\ninst✝¹⁶ : TopologicalSpace α\ninst✝¹⁵ : AddCommGroup α\ninst✝¹⁴ : TopologicalAddGroup α\ninst✝¹³ : TopologicalSpace β\ninst✝¹² : AddCommGroup β\ninst✝¹¹ : TopologicalAddGroup β\ninst✝¹⁰ : TopologicalSpace γ\ninst✝⁹ : AddCommGroup γ\ninst✝⁸ : TopologicalAddGroup γ\ninst✝⁷ : TopologicalSpace δ\ninst✝⁶ : AddCommGroup δ\ninst✝⁵ : TopologicalAddGroup δ\ninst✝⁴ : UniformSpace G\ninst✝³ : AddCommGroup G\ninst✝² : UniformAddGroup G\ninst✝¹ : SeparatedSpace G\ninst✝ : CompleteSpace G\ne : β →+ α\nde : DenseInducing ↑e\nf : δ →+ γ\ndf : DenseInducing ↑f\nφ : β →+ δ →+ G\nhφ : Continuous fun p => ↑(↑φ p.fst) p.snd\nW' : Set G\nW'_nhd : W' ∈ 𝓝 0\nx₀ : α\ny₀ : γ\nee : (u : β × β) → (fun x => α) u.fst × (fun x => α) u.snd := fun u => (↑e u.fst, ↑e u.snd)\nff : (u : δ × δ) → (fun x => γ) u.fst × (fun x => γ) u.snd := fun u => (↑f u.fst, ↑f u.snd)\n⊢ Tendsto (fun p => ↑(↑φ p.fst) p.snd) (𝓝 (0, 0)) (𝓝 0)\n[PROOFSTEP]\nsimpa using hφ.tendsto (0, 0)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nG : Type u_5\ninst✝¹⁶ : TopologicalSpace α\ninst✝¹⁵ : AddCommGroup α\ninst✝¹⁴ : TopologicalAddGroup α\ninst✝¹³ : TopologicalSpace β\ninst✝¹² : AddCommGroup β\ninst✝¹¹ : TopologicalAddGroup β\ninst✝¹⁰ : TopologicalSpace γ\ninst✝⁹ : AddCommGroup γ\ninst✝⁸ : TopologicalAddGroup γ\ninst✝⁷ : TopologicalSpace δ\ninst✝⁶ : AddCommGroup δ\ninst✝⁵ : TopologicalAddGroup δ\ninst✝⁴ : UniformSpace G\ninst✝³ : AddCommGroup G\ninst✝² : UniformAddGroup G\ninst✝¹ : SeparatedSpace G\ninst✝ : CompleteSpace G\ne : β →+ α\nde : DenseInducing ↑e\nf : δ →+ γ\ndf : DenseInducing ↑f\nφ : β →+ δ →+ G\nhφ : Continuous fun p => ↑(↑φ p.fst) p.snd\nW' : Set G\nW'_nhd : W' ∈ 𝓝 0\nx₀ : α\ny₀ : γ\nee : (u : β × β) → (fun x => α) u.fst × (fun x => α) u.snd := fun u => (↑e u.fst, ↑e u.snd)\nff : (u : δ × δ) → (fun x => γ) u.fst × (fun x => γ) u.snd := fun u => (↑f u.fst, ↑f u.snd)\nlim_φ : Tendsto (fun p => ↑(↑φ p.fst) p.snd) (𝓝 (0, 0)) (𝓝 0)\n⊢ ∃ U,\n    U ∈ comap (↑e) (𝓝 x₀) ∧\n      ∃ V,\n        V ∈ comap (↑f) (𝓝 y₀) ∧\n          ∀ (x : β),\n            x ∈ U →\n              ∀ (x' : β),\n                x' ∈ U →\n                  ∀ (y : δ),\n                    y ∈ V →\n                      ∀ (y' : δ),\n                        y' ∈ V → (fun p => ↑(↑φ p.fst) p.snd) (x', y') - (fun p => ↑(↑φ p.fst) p.snd) (x, y) ∈ W'\n[PROOFSTEP]\nhave lim_φ_sub_sub :\n  Tendsto (fun p : (β × β) × δ × δ => (fun p : β × δ => φ p.1 p.2) (p.1.2 - p.1.1, p.2.2 - p.2.1))\n    ((comap ee <| 𝓝 (x₀, x₀)) ×ˢ (comap ff <| 𝓝 (y₀, y₀))) (𝓝 0) :=\n  by\n  have lim_sub_sub :\n    Tendsto (fun p : (β × β) × δ × δ => (p.1.2 - p.1.1, p.2.2 - p.2.1)) (comap ee (𝓝 (x₀, x₀)) ×ˢ comap ff (𝓝 (y₀, y₀)))\n      (𝓝 0 ×ˢ 𝓝 0) :=\n    by\n    have := Filter.prod_mono (tendsto_sub_comap_self de x₀) (tendsto_sub_comap_self df y₀)\n    rwa [prod_map_map_eq] at this \n  rw [← nhds_prod_eq] at lim_sub_sub \n  exact Tendsto.comp lim_φ lim_sub_sub\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nG : Type u_5\ninst✝¹⁶ : TopologicalSpace α\ninst✝¹⁵ : AddCommGroup α\ninst✝¹⁴ : TopologicalAddGroup α\ninst✝¹³ : TopologicalSpace β\ninst✝¹² : AddCommGroup β\ninst✝¹¹ : TopologicalAddGroup β\ninst✝¹⁰ : TopologicalSpace γ\ninst✝⁹ : AddCommGroup γ\ninst✝⁸ : TopologicalAddGroup γ\ninst✝⁷ : TopologicalSpace δ\ninst✝⁶ : AddCommGroup δ\ninst✝⁵ : TopologicalAddGroup δ\ninst✝⁴ : UniformSpace G\ninst✝³ : AddCommGroup G\ninst✝² : UniformAddGroup G\ninst✝¹ : SeparatedSpace G\ninst✝ : CompleteSpace G\ne : β →+ α\nde : DenseInducing ↑e\nf : δ →+ γ\ndf : DenseInducing ↑f\nφ : β →+ δ →+ G\nhφ : Continuous fun p => ↑(↑φ p.fst) p.snd\nW' : Set G\nW'_nhd : W' ∈ 𝓝 0\nx₀ : α\ny₀ : γ\nee : (u : β × β) → (fun x => α) u.fst × (fun x => α) u.snd := fun u => (↑e u.fst, ↑e u.snd)\nff : (u : δ × δ) → (fun x => γ) u.fst × (fun x => γ) u.snd := fun u => (↑f u.fst, ↑f u.snd)\nlim_φ : Tendsto (fun p => ↑(↑φ p.fst) p.snd) (𝓝 (0, 0)) (𝓝 0)\n⊢ Tendsto (fun p => (fun p => ↑(↑φ p.fst) p.snd) (p.fst.snd - p.fst.fst, p.snd.snd - p.snd.fst))\n    (comap ee (𝓝 (x₀, x₀)) ×ˢ comap ff (𝓝 (y₀, y₀))) (𝓝 0)\n[PROOFSTEP]\nhave lim_sub_sub :\n  Tendsto (fun p : (β × β) × δ × δ => (p.1.2 - p.1.1, p.2.2 - p.2.1)) (comap ee (𝓝 (x₀, x₀)) ×ˢ comap ff (𝓝 (y₀, y₀)))\n    (𝓝 0 ×ˢ 𝓝 0) :=\n  by\n  have := Filter.prod_mono (tendsto_sub_comap_self de x₀) (tendsto_sub_comap_self df y₀)\n  rwa [prod_map_map_eq] at this \n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nG : Type u_5\ninst✝¹⁶ : TopologicalSpace α\ninst✝¹⁵ : AddCommGroup α\ninst✝¹⁴ : TopologicalAddGroup α\ninst✝¹³ : TopologicalSpace β\ninst✝¹² : AddCommGroup β\ninst✝¹¹ : TopologicalAddGroup β\ninst✝¹⁰ : TopologicalSpace γ\ninst✝⁹ : AddCommGroup γ\ninst✝⁸ : TopologicalAddGroup γ\ninst✝⁷ : TopologicalSpace δ\ninst✝⁶ : AddCommGroup δ\ninst✝⁵ : TopologicalAddGroup δ\ninst✝⁴ : UniformSpace G\ninst✝³ : AddCommGroup G\ninst✝² : UniformAddGroup G\ninst✝¹ : SeparatedSpace G\ninst✝ : CompleteSpace G\ne : β →+ α\nde : DenseInducing ↑e\nf : δ →+ γ\ndf : DenseInducing ↑f\nφ : β →+ δ →+ G\nhφ : Continuous fun p => ↑(↑φ p.fst) p.snd\nW' : Set G\nW'_nhd : W' ∈ 𝓝 0\nx₀ : α\ny₀ : γ\nee : (u : β × β) → (fun x => α) u.fst × (fun x => α) u.snd := fun u => (↑e u.fst, ↑e u.snd)\nff : (u : δ × δ) → (fun x => γ) u.fst × (fun x => γ) u.snd := fun u => (↑f u.fst, ↑f u.snd)\nlim_φ : Tendsto (fun p => ↑(↑φ p.fst) p.snd) (𝓝 (0, 0)) (𝓝 0)\n⊢ Tendsto (fun p => (p.fst.snd - p.fst.fst, p.snd.snd - p.snd.fst)) (comap ee (𝓝 (x₀, x₀)) ×ˢ comap ff (𝓝 (y₀, y₀)))\n    (𝓝 0 ×ˢ 𝓝 0)\n[PROOFSTEP]\nhave := Filter.prod_mono (tendsto_sub_comap_self de x₀) (tendsto_sub_comap_self df y₀)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nG : Type u_5\ninst✝¹⁶ : TopologicalSpace α\ninst✝¹⁵ : AddCommGroup α\ninst✝¹⁴ : TopologicalAddGroup α\ninst✝¹³ : TopologicalSpace β\ninst✝¹² : AddCommGroup β\ninst✝¹¹ : TopologicalAddGroup β\ninst✝¹⁰ : TopologicalSpace γ\ninst✝⁹ : AddCommGroup γ\ninst✝⁸ : TopologicalAddGroup γ\ninst✝⁷ : TopologicalSpace δ\ninst✝⁶ : AddCommGroup δ\ninst✝⁵ : TopologicalAddGroup δ\ninst✝⁴ : UniformSpace G\ninst✝³ : AddCommGroup G\ninst✝² : UniformAddGroup G\ninst✝¹ : SeparatedSpace G\ninst✝ : CompleteSpace G\ne : β →+ α\nde : DenseInducing ↑e\nf : δ →+ γ\ndf : DenseInducing ↑f\nφ : β →+ δ →+ G\nhφ : Continuous fun p => ↑(↑φ p.fst) p.snd\nW' : Set G\nW'_nhd : W' ∈ 𝓝 0\nx₀ : α\ny₀ : γ\nee : (u : β × β) → (fun x => α) u.fst × (fun x => α) u.snd := fun u => (↑e u.fst, ↑e u.snd)\nff : (u : δ × δ) → (fun x => γ) u.fst × (fun x => γ) u.snd := fun u => (↑f u.fst, ↑f u.snd)\nlim_φ : Tendsto (fun p => ↑(↑φ p.fst) p.snd) (𝓝 (0, 0)) (𝓝 0)\nthis :\n  map (fun t => t.snd - t.fst) (comap (fun p => (↑e p.fst, ↑e p.snd)) (𝓝 (x₀, x₀))) ×ˢ\n      map (fun t => t.snd - t.fst) (comap (fun p => (↑f p.fst, ↑f p.snd)) (𝓝 (y₀, y₀))) ≤\n    𝓝 0 ×ˢ 𝓝 0\n⊢ Tendsto (fun p => (p.fst.snd - p.fst.fst, p.snd.snd - p.snd.fst)) (comap ee (𝓝 (x₀, x₀)) ×ˢ comap ff (𝓝 (y₀, y₀)))\n    (𝓝 0 ×ˢ 𝓝 0)\n[PROOFSTEP]\nrwa [prod_map_map_eq] at this \n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nG : Type u_5\ninst✝¹⁶ : TopologicalSpace α\ninst✝¹⁵ : AddCommGroup α\ninst✝¹⁴ : TopologicalAddGroup α\ninst✝¹³ : TopologicalSpace β\ninst✝¹² : AddCommGroup β\ninst✝¹¹ : TopologicalAddGroup β\ninst✝¹⁰ : TopologicalSpace γ\ninst✝⁹ : AddCommGroup γ\ninst✝⁸ : TopologicalAddGroup γ\ninst✝⁷ : TopologicalSpace δ\ninst✝⁶ : AddCommGroup δ\ninst✝⁵ : TopologicalAddGroup δ\ninst✝⁴ : UniformSpace G\ninst✝³ : AddCommGroup G\ninst✝² : UniformAddGroup G\ninst✝¹ : SeparatedSpace G\ninst✝ : CompleteSpace G\ne : β →+ α\nde : DenseInducing ↑e\nf : δ →+ γ\ndf : DenseInducing ↑f\nφ : β →+ δ →+ G\nhφ : Continuous fun p => ↑(↑φ p.fst) p.snd\nW' : Set G\nW'_nhd : W' ∈ 𝓝 0\nx₀ : α\ny₀ : γ\nee : (u : β × β) → (fun x => α) u.fst × (fun x => α) u.snd := fun u => (↑e u.fst, ↑e u.snd)\nff : (u : δ × δ) → (fun x => γ) u.fst × (fun x => γ) u.snd := fun u => (↑f u.fst, ↑f u.snd)\nlim_φ : Tendsto (fun p => ↑(↑φ p.fst) p.snd) (𝓝 (0, 0)) (𝓝 0)\nlim_sub_sub :\n  Tendsto (fun p => (p.fst.snd - p.fst.fst, p.snd.snd - p.snd.fst)) (comap ee (𝓝 (x₀, x₀)) ×ˢ comap ff (𝓝 (y₀, y₀)))\n    (𝓝 0 ×ˢ 𝓝 0)\n⊢ Tendsto (fun p => (fun p => ↑(↑φ p.fst) p.snd) (p.fst.snd - p.fst.fst, p.snd.snd - p.snd.fst))\n    (comap ee (𝓝 (x₀, x₀)) ×ˢ comap ff (𝓝 (y₀, y₀))) (𝓝 0)\n[PROOFSTEP]\nrw [← nhds_prod_eq] at lim_sub_sub \n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nG : Type u_5\ninst✝¹⁶ : TopologicalSpace α\ninst✝¹⁵ : AddCommGroup α\ninst✝¹⁴ : TopologicalAddGroup α\ninst✝¹³ : TopologicalSpace β\ninst✝¹² : AddCommGroup β\ninst✝¹¹ : TopologicalAddGroup β\ninst✝¹⁰ : TopologicalSpace γ\ninst✝⁹ : AddCommGroup γ\ninst✝⁸ : TopologicalAddGroup γ\ninst✝⁷ : TopologicalSpace δ\ninst✝⁶ : AddCommGroup δ\ninst✝⁵ : TopologicalAddGroup δ\ninst✝⁴ : UniformSpace G\ninst✝³ : AddCommGroup G\ninst✝² : UniformAddGroup G\ninst✝¹ : SeparatedSpace G\ninst✝ : CompleteSpace G\ne : β →+ α\nde : DenseInducing ↑e\nf : δ →+ γ\ndf : DenseInducing ↑f\nφ : β →+ δ →+ G\nhφ : Continuous fun p => ↑(↑φ p.fst) p.snd\nW' : Set G\nW'_nhd : W' ∈ 𝓝 0\nx₀ : α\ny₀ : γ\nee : (u : β × β) → (fun x => α) u.fst × (fun x => α) u.snd := fun u => (↑e u.fst, ↑e u.snd)\nff : (u : δ × δ) → (fun x => γ) u.fst × (fun x => γ) u.snd := fun u => (↑f u.fst, ↑f u.snd)\nlim_φ : Tendsto (fun p => ↑(↑φ p.fst) p.snd) (𝓝 (0, 0)) (𝓝 0)\nlim_sub_sub :\n  Tendsto (fun p => (p.fst.snd - p.fst.fst, p.snd.snd - p.snd.fst)) (comap ee (𝓝 (x₀, x₀)) ×ˢ comap ff (𝓝 (y₀, y₀)))\n    (𝓝 (0, 0))\n⊢ Tendsto (fun p => (fun p => ↑(↑φ p.fst) p.snd) (p.fst.snd - p.fst.fst, p.snd.snd - p.snd.fst))\n    (comap ee (𝓝 (x₀, x₀)) ×ˢ comap ff (𝓝 (y₀, y₀))) (𝓝 0)\n[PROOFSTEP]\nexact Tendsto.comp lim_φ lim_sub_sub\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nG : Type u_5\ninst✝¹⁶ : TopologicalSpace α\ninst✝¹⁵ : AddCommGroup α\ninst✝¹⁴ : TopologicalAddGroup α\ninst✝¹³ : TopologicalSpace β\ninst✝¹² : AddCommGroup β\ninst✝¹¹ : TopologicalAddGroup β\ninst✝¹⁰ : TopologicalSpace γ\ninst✝⁹ : AddCommGroup γ\ninst✝⁸ : TopologicalAddGroup γ\ninst✝⁷ : TopologicalSpace δ\ninst✝⁶ : AddCommGroup δ\ninst✝⁵ : TopologicalAddGroup δ\ninst✝⁴ : UniformSpace G\ninst✝³ : AddCommGroup G\ninst✝² : UniformAddGroup G\ninst✝¹ : SeparatedSpace G\ninst✝ : CompleteSpace G\ne : β →+ α\nde : DenseInducing ↑e\nf : δ →+ γ\ndf : DenseInducing ↑f\nφ : β →+ δ →+ G\nhφ : Continuous fun p => ↑(↑φ p.fst) p.snd\nW' : Set G\nW'_nhd : W' ∈ 𝓝 0\nx₀ : α\ny₀ : γ\nee : (u : β × β) → (fun x => α) u.fst × (fun x => α) u.snd := fun u => (↑e u.fst, ↑e u.snd)\nff : (u : δ × δ) → (fun x => γ) u.fst × (fun x => γ) u.snd := fun u => (↑f u.fst, ↑f u.snd)\nlim_φ : Tendsto (fun p => ↑(↑φ p.fst) p.snd) (𝓝 (0, 0)) (𝓝 0)\nlim_φ_sub_sub :\n  Tendsto (fun p => (fun p => ↑(↑φ p.fst) p.snd) (p.fst.snd - p.fst.fst, p.snd.snd - p.snd.fst))\n    (comap ee (𝓝 (x₀, x₀)) ×ˢ comap ff (𝓝 (y₀, y₀))) (𝓝 0)\n⊢ ∃ U,\n    U ∈ comap (↑e) (𝓝 x₀) ∧\n      ∃ V,\n        V ∈ comap (↑f) (𝓝 y₀) ∧\n          ∀ (x : β),\n            x ∈ U →\n              ∀ (x' : β),\n                x' ∈ U →\n                  ∀ (y : δ),\n                    y ∈ V →\n                      ∀ (y' : δ),\n                        y' ∈ V → (fun p => ↑(↑φ p.fst) p.snd) (x', y') - (fun p => ↑(↑φ p.fst) p.snd) (x, y) ∈ W'\n[PROOFSTEP]\nrcases exists_nhds_zero_quarter W'_nhd with ⟨W, W_nhd, W4⟩\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nG : Type u_5\ninst✝¹⁶ : TopologicalSpace α\ninst✝¹⁵ : AddCommGroup α\ninst✝¹⁴ : TopologicalAddGroup α\ninst✝¹³ : TopologicalSpace β\ninst✝¹² : AddCommGroup β\ninst✝¹¹ : TopologicalAddGroup β\ninst✝¹⁰ : TopologicalSpace γ\ninst✝⁹ : AddCommGroup γ\ninst✝⁸ : TopologicalAddGroup γ\ninst✝⁷ : TopologicalSpace δ\ninst✝⁶ : AddCommGroup δ\ninst✝⁵ : TopologicalAddGroup δ\ninst✝⁴ : UniformSpace G\ninst✝³ : AddCommGroup G\ninst✝² : UniformAddGroup G\ninst✝¹ : SeparatedSpace G\ninst✝ : CompleteSpace G\ne : β →+ α\nde : DenseInducing ↑e\nf : δ →+ γ\ndf : DenseInducing ↑f\nφ : β →+ δ →+ G\nhφ : Continuous fun p => ↑(↑φ p.fst) p.snd\nW' : Set G\nW'_nhd : W' ∈ 𝓝 0\nx₀ : α\ny₀ : γ\nee : (u : β × β) → (fun x => α) u.fst × (fun x => α) u.snd := fun u => (↑e u.fst, ↑e u.snd)\nff : (u : δ × δ) → (fun x => γ) u.fst × (fun x => γ) u.snd := fun u => (↑f u.fst, ↑f u.snd)\nlim_φ : Tendsto (fun p => ↑(↑φ p.fst) p.snd) (𝓝 (0, 0)) (𝓝 0)\nlim_φ_sub_sub :\n  Tendsto (fun p => (fun p => ↑(↑φ p.fst) p.snd) (p.fst.snd - p.fst.fst, p.snd.snd - p.snd.fst))\n    (comap ee (𝓝 (x₀, x₀)) ×ˢ comap ff (𝓝 (y₀, y₀))) (𝓝 0)\nW : Set G\nW_nhd : W ∈ 𝓝 0\nW4 : ∀ {v w s t : G}, v ∈ W → w ∈ W → s ∈ W → t ∈ W → v + w + s + t ∈ W'\n⊢ ∃ U,\n    U ∈ comap (↑e) (𝓝 x₀) ∧\n      ∃ V,\n        V ∈ comap (↑f) (𝓝 y₀) ∧\n          ∀ (x : β),\n            x ∈ U →\n              ∀ (x' : β),\n                x' ∈ U →\n                  ∀ (y : δ),\n                    y ∈ V →\n                      ∀ (y' : δ),\n                        y' ∈ V → (fun p => ↑(↑φ p.fst) p.snd) (x', y') - (fun p => ↑(↑φ p.fst) p.snd) (x, y) ∈ W'\n[PROOFSTEP]\nhave :\n  ∃ U₁ ∈ comap e (𝓝 x₀),\n    ∃ V₁ ∈ comap f (𝓝 y₀),\n      ∀ (x) (_ : x ∈ U₁) (x') (_ : x' ∈ U₁),\n        ∀ (y) (_ : y ∈ V₁) (y') (_ : y' ∈ V₁), (fun p : β × δ => φ p.1 p.2) (x' - x, y' - y) ∈ W :=\n  by\n  rcases tendsto_prod_iff.1 lim_φ_sub_sub W W_nhd with ⟨U, U_in, V, V_in, H⟩\n  rw [nhds_prod_eq, ← prod_comap_comap_eq, mem_prod_same_iff] at U_in V_in \n  rcases U_in with ⟨U₁, U₁_in, HU₁⟩\n  rcases V_in with ⟨V₁, V₁_in, HV₁⟩\n  exists U₁, U₁_in, V₁, V₁_in\n  intro x x_in x' x'_in y y_in y' y'_in\n  exact H _ _ (HU₁ (mk_mem_prod x_in x'_in)) (HV₁ (mk_mem_prod y_in y'_in))\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nG : Type u_5\ninst✝¹⁶ : TopologicalSpace α\ninst✝¹⁵ : AddCommGroup α\ninst✝¹⁴ : TopologicalAddGroup α\ninst✝¹³ : TopologicalSpace β\ninst✝¹² : AddCommGroup β\ninst✝¹¹ : TopologicalAddGroup β\ninst✝¹⁰ : TopologicalSpace γ\ninst✝⁹ : AddCommGroup γ\ninst✝⁸ : TopologicalAddGroup γ\ninst✝⁷ : TopologicalSpace δ\ninst✝⁶ : AddCommGroup δ\ninst✝⁵ : TopologicalAddGroup δ\ninst✝⁴ : UniformSpace G\ninst✝³ : AddCommGroup G\ninst✝² : UniformAddGroup G\ninst✝¹ : SeparatedSpace G\ninst✝ : CompleteSpace G\ne : β →+ α\nde : DenseInducing ↑e\nf : δ →+ γ\ndf : DenseInducing ↑f\nφ : β →+ δ →+ G\nhφ : Continuous fun p => ↑(↑φ p.fst) p.snd\nW' : Set G\nW'_nhd : W' ∈ 𝓝 0\nx₀ : α\ny₀ : γ\nee : (u : β × β) → (fun x => α) u.fst × (fun x => α) u.snd := fun u => (↑e u.fst, ↑e u.snd)\nff : (u : δ × δ) → (fun x => γ) u.fst × (fun x => γ) u.snd := fun u => (↑f u.fst, ↑f u.snd)\nlim_φ : Tendsto (fun p => ↑(↑φ p.fst) p.snd) (𝓝 (0, 0)) (𝓝 0)\nlim_φ_sub_sub :\n  Tendsto (fun p => (fun p => ↑(↑φ p.fst) p.snd) (p.fst.snd - p.fst.fst, p.snd.snd - p.snd.fst))\n    (comap ee (𝓝 (x₀, x₀)) ×ˢ comap ff (𝓝 (y₀, y₀))) (𝓝 0)\nW : Set G\nW_nhd : W ∈ 𝓝 0\nW4 : ∀ {v w s t : G}, v ∈ W → w ∈ W → s ∈ W → t ∈ W → v + w + s + t ∈ W'\n⊢ ∃ U₁,\n    U₁ ∈ comap (↑e) (𝓝 x₀) ∧\n      ∃ V₁,\n        V₁ ∈ comap (↑f) (𝓝 y₀) ∧\n          ∀ (x : β),\n            x ∈ U₁ →\n              ∀ (x' : β),\n                x' ∈ U₁ → ∀ (y : δ), y ∈ V₁ → ∀ (y' : δ), y' ∈ V₁ → (fun p => ↑(↑φ p.fst) p.snd) (x' - x, y' - y) ∈ W\n[PROOFSTEP]\nrcases tendsto_prod_iff.1 lim_φ_sub_sub W W_nhd with ⟨U, U_in, V, V_in, H⟩\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nG : Type u_5\ninst✝¹⁶ : TopologicalSpace α\ninst✝¹⁵ : AddCommGroup α\ninst✝¹⁴ : TopologicalAddGroup α\ninst✝¹³ : TopologicalSpace β\ninst✝¹² : AddCommGroup β\ninst✝¹¹ : TopologicalAddGroup β\ninst✝¹⁰ : TopologicalSpace γ\ninst✝⁹ : AddCommGroup γ\ninst✝⁸ : TopologicalAddGroup γ\ninst✝⁷ : TopologicalSpace δ\ninst✝⁶ : AddCommGroup δ\ninst✝⁵ : TopologicalAddGroup δ\ninst✝⁴ : UniformSpace G\ninst✝³ : AddCommGroup G\ninst✝² : UniformAddGroup G\ninst✝¹ : SeparatedSpace G\ninst✝ : CompleteSpace G\ne : β →+ α\nde : DenseInducing ↑e\nf : δ →+ γ\ndf : DenseInducing ↑f\nφ : β →+ δ →+ G\nhφ : Continuous fun p => ↑(↑φ p.fst) p.snd\nW' : Set G\nW'_nhd : W' ∈ 𝓝 0\nx₀ : α\ny₀ : γ\nee : (u : β × β) → (fun x => α) u.fst × (fun x => α) u.snd := fun u => (↑e u.fst, ↑e u.snd)\nff : (u : δ × δ) → (fun x => γ) u.fst × (fun x => γ) u.snd := fun u => (↑f u.fst, ↑f u.snd)\nlim_φ : Tendsto (fun p => ↑(↑φ p.fst) p.snd) (𝓝 (0, 0)) (𝓝 0)\nlim_φ_sub_sub :\n  Tendsto (fun p => (fun p => ↑(↑φ p.fst) p.snd) (p.fst.snd - p.fst.fst, p.snd.snd - p.snd.fst))\n    (comap ee (𝓝 (x₀, x₀)) ×ˢ comap ff (𝓝 (y₀, y₀))) (𝓝 0)\nW : Set G\nW_nhd : W ∈ 𝓝 0\nW4 : ∀ {v w s t : G}, v ∈ W → w ∈ W → s ∈ W → t ∈ W → v + w + s + t ∈ W'\nU : Set (β × β)\nU_in : U ∈ comap ee (𝓝 (x₀, x₀))\nV : Set (δ × δ)\nV_in : V ∈ comap ff (𝓝 (y₀, y₀))\nH :\n  ∀ (x : β × β) (y : δ × δ),\n    x ∈ U → y ∈ V → (fun p => ↑(↑φ p.fst) p.snd) ((x, y).fst.snd - (x, y).fst.fst, (x, y).snd.snd - (x, y).snd.fst) ∈ W\n⊢ ∃ U₁,\n    U₁ ∈ comap (↑e) (𝓝 x₀) ∧\n      ∃ V₁,\n        V₁ ∈ comap (↑f) (𝓝 y₀) ∧\n          ∀ (x : β),\n            x ∈ U₁ →\n              ∀ (x' : β),\n                x' ∈ U₁ → ∀ (y : δ), y ∈ V₁ → ∀ (y' : δ), y' ∈ V₁ → (fun p => ↑(↑φ p.fst) p.snd) (x' - x, y' - y) ∈ W\n[PROOFSTEP]\nrw [nhds_prod_eq, ← prod_comap_comap_eq, mem_prod_same_iff] at U_in V_in \n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nG : Type u_5\ninst✝¹⁶ : TopologicalSpace α\ninst✝¹⁵ : AddCommGroup α\ninst✝¹⁴ : TopologicalAddGroup α\ninst✝¹³ : TopologicalSpace β\ninst✝¹² : AddCommGroup β\ninst✝¹¹ : TopologicalAddGroup β\ninst✝¹⁰ : TopologicalSpace γ\ninst✝⁹ : AddCommGroup γ\ninst✝⁸ : TopologicalAddGroup γ\ninst✝⁷ : TopologicalSpace δ\ninst✝⁶ : AddCommGroup δ\ninst✝⁵ : TopologicalAddGroup δ\ninst✝⁴ : UniformSpace G\ninst✝³ : AddCommGroup G\ninst✝² : UniformAddGroup G\ninst✝¹ : SeparatedSpace G\ninst✝ : CompleteSpace G\ne : β →+ α\nde : DenseInducing ↑e\nf : δ →+ γ\ndf : DenseInducing ↑f\nφ : β →+ δ →+ G\nhφ : Continuous fun p => ↑(↑φ p.fst) p.snd\nW' : Set G\nW'_nhd : W' ∈ 𝓝 0\nx₀ : α\ny₀ : γ\nee : (u : β × β) → (fun x => α) u.fst × (fun x => α) u.snd := fun u => (↑e u.fst, ↑e u.snd)\nff : (u : δ × δ) → (fun x => γ) u.fst × (fun x => γ) u.snd := fun u => (↑f u.fst, ↑f u.snd)\nlim_φ : Tendsto (fun p => ↑(↑φ p.fst) p.snd) (𝓝 (0, 0)) (𝓝 0)\nlim_φ_sub_sub :\n  Tendsto (fun p => (fun p => ↑(↑φ p.fst) p.snd) (p.fst.snd - p.fst.fst, p.snd.snd - p.snd.fst))\n    (comap ee (𝓝 (x₀, x₀)) ×ˢ comap ff (𝓝 (y₀, y₀))) (𝓝 0)\nW : Set G\nW_nhd : W ∈ 𝓝 0\nW4 : ∀ {v w s t : G}, v ∈ W → w ∈ W → s ∈ W → t ∈ W → v + w + s + t ∈ W'\nU : Set (β × β)\nU_in : ∃ t, t ∈ comap (↑e) (𝓝 x₀) ∧ t ×ˢ t ⊆ U\nV : Set (δ × δ)\nV_in : ∃ t, t ∈ comap (↑f) (𝓝 y₀) ∧ t ×ˢ t ⊆ V\nH :\n  ∀ (x : β × β) (y : δ × δ),\n    x ∈ U → y ∈ V → (fun p => ↑(↑φ p.fst) p.snd) ((x, y).fst.snd - (x, y).fst.fst, (x, y).snd.snd - (x, y).snd.fst) ∈ W\n⊢ ∃ U₁,\n    U₁ ∈ comap (↑e) (𝓝 x₀) ∧\n      ∃ V₁,\n        V₁ ∈ comap (↑f) (𝓝 y₀) ∧\n          ∀ (x : β),\n            x ∈ U₁ →\n              ∀ (x' : β),\n                x' ∈ U₁ → ∀ (y : δ), y ∈ V₁ → ∀ (y' : δ), y' ∈ V₁ → (fun p => ↑(↑φ p.fst) p.snd) (x' - x, y' - y) ∈ W\n[PROOFSTEP]\nrcases U_in with ⟨U₁, U₁_in, HU₁⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nG : Type u_5\ninst✝¹⁶ : TopologicalSpace α\ninst✝¹⁵ : AddCommGroup α\ninst✝¹⁴ : TopologicalAddGroup α\ninst✝¹³ : TopologicalSpace β\ninst✝¹² : AddCommGroup β\ninst✝¹¹ : TopologicalAddGroup β\ninst✝¹⁰ : TopologicalSpace γ\ninst✝⁹ : AddCommGroup γ\ninst✝⁸ : TopologicalAddGroup γ\ninst✝⁷ : TopologicalSpace δ\ninst✝⁶ : AddCommGroup δ\ninst✝⁵ : TopologicalAddGroup δ\ninst✝⁴ : UniformSpace G\ninst✝³ : AddCommGroup G\ninst✝² : UniformAddGroup G\ninst✝¹ : SeparatedSpace G\ninst✝ : CompleteSpace G\ne : β →+ α\nde : DenseInducing ↑e\nf : δ →+ γ\ndf : DenseInducing ↑f\nφ : β →+ δ →+ G\nhφ : Continuous fun p => ↑(↑φ p.fst) p.snd\nW' : Set G\nW'_nhd : W' ∈ 𝓝 0\nx₀ : α\ny₀ : γ\nee : (u : β × β) → (fun x => α) u.fst × (fun x => α) u.snd := fun u => (↑e u.fst, ↑e u.snd)\nff : (u : δ × δ) → (fun x => γ) u.fst × (fun x => γ) u.snd := fun u => (↑f u.fst, ↑f u.snd)\nlim_φ : Tendsto (fun p => ↑(↑φ p.fst) p.snd) (𝓝 (0, 0)) (𝓝 0)\nlim_φ_sub_sub :\n  Tendsto (fun p => (fun p => ↑(↑φ p.fst) p.snd) (p.fst.snd - p.fst.fst, p.snd.snd - p.snd.fst))\n    (comap ee (𝓝 (x₀, x₀)) ×ˢ comap ff (𝓝 (y₀, y₀))) (𝓝 0)\nW : Set G\nW_nhd : W ∈ 𝓝 0\nW4 : ∀ {v w s t : G}, v ∈ W → w ∈ W → s ∈ W → t ∈ W → v + w + s + t ∈ W'\nU : Set (β × β)\nV : Set (δ × δ)\nV_in : ∃ t, t ∈ comap (↑f) (𝓝 y₀) ∧ t ×ˢ t ⊆ V\nH :\n  ∀ (x : β × β) (y : δ × δ),\n    x ∈ U → y ∈ V → (fun p => ↑(↑φ p.fst) p.snd) ((x, y).fst.snd - (x, y).fst.fst, (x, y).snd.snd - (x, y).snd.fst) ∈ W\nU₁ : Set β\nU₁_in : U₁ ∈ comap (↑e) (𝓝 x₀)\nHU₁ : U₁ ×ˢ U₁ ⊆ U\n⊢ ∃ U₁,\n    U₁ ∈ comap (↑e) (𝓝 x₀) ∧\n      ∃ V₁,\n        V₁ ∈ comap (↑f) (𝓝 y₀) ∧\n          ∀ (x : β),\n            x ∈ U₁ →\n              ∀ (x' : β),\n                x' ∈ U₁ → ∀ (y : δ), y ∈ V₁ → ∀ (y' : δ), y' ∈ V₁ → (fun p => ↑(↑φ p.fst) p.snd) (x' - x, y' - y) ∈ W\n[PROOFSTEP]\nrcases V_in with ⟨V₁, V₁_in, HV₁⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nG : Type u_5\ninst✝¹⁶ : TopologicalSpace α\ninst✝¹⁵ : AddCommGroup α\ninst✝¹⁴ : TopologicalAddGroup α\ninst✝¹³ : TopologicalSpace β\ninst✝¹² : AddCommGroup β\ninst✝¹¹ : TopologicalAddGroup β\ninst✝¹⁰ : TopologicalSpace γ\ninst✝⁹ : AddCommGroup γ\ninst✝⁸ : TopologicalAddGroup γ\ninst✝⁷ : TopologicalSpace δ\ninst✝⁶ : AddCommGroup δ\ninst✝⁵ : TopologicalAddGroup δ\ninst✝⁴ : UniformSpace G\ninst✝³ : AddCommGroup G\ninst✝² : UniformAddGroup G\ninst✝¹ : SeparatedSpace G\ninst✝ : CompleteSpace G\ne : β →+ α\nde : DenseInducing ↑e\nf : δ →+ γ\ndf : DenseInducing ↑f\nφ : β →+ δ →+ G\nhφ : Continuous fun p => ↑(↑φ p.fst) p.snd\nW' : Set G\nW'_nhd : W' ∈ 𝓝 0\nx₀ : α\ny₀ : γ\nee : (u : β × β) → (fun x => α) u.fst × (fun x => α) u.snd := fun u => (↑e u.fst, ↑e u.snd)\nff : (u : δ × δ) → (fun x => γ) u.fst × (fun x => γ) u.snd := fun u => (↑f u.fst, ↑f u.snd)\nlim_φ : Tendsto (fun p => ↑(↑φ p.fst) p.snd) (𝓝 (0, 0)) (𝓝 0)\nlim_φ_sub_sub :\n  Tendsto (fun p => (fun p => ↑(↑φ p.fst) p.snd) (p.fst.snd - p.fst.fst, p.snd.snd - p.snd.fst))\n    (comap ee (𝓝 (x₀, x₀)) ×ˢ comap ff (𝓝 (y₀, y₀))) (𝓝 0)\nW : Set G\nW_nhd : W ∈ 𝓝 0\nW4 : ∀ {v w s t : G}, v ∈ W → w ∈ W → s ∈ W → t ∈ W → v + w + s + t ∈ W'\nU : Set (β × β)\nV : Set (δ × δ)\nH :\n  ∀ (x : β × β) (y : δ × δ),\n    x ∈ U → y ∈ V → (fun p => ↑(↑φ p.fst) p.snd) ((x, y).fst.snd - (x, y).fst.fst, (x, y).snd.snd - (x, y).snd.fst) ∈ W\nU₁ : Set β\nU₁_in : U₁ ∈ comap (↑e) (𝓝 x₀)\nHU₁ : U₁ ×ˢ U₁ ⊆ U\nV₁ : Set δ\nV₁_in : V₁ ∈ comap (↑f) (𝓝 y₀)\nHV₁ : V₁ ×ˢ V₁ ⊆ V\n⊢ ∃ U₁,\n    U₁ ∈ comap (↑e) (𝓝 x₀) ∧\n      ∃ V₁,\n        V₁ ∈ comap (↑f) (𝓝 y₀) ∧\n          ∀ (x : β),\n            x ∈ U₁ →\n              ∀ (x' : β),\n                x' ∈ U₁ → ∀ (y : δ), y ∈ V₁ → ∀ (y' : δ), y' ∈ V₁ → (fun p => ↑(↑φ p.fst) p.snd) (x' - x, y' - y) ∈ W\n[PROOFSTEP]\nexists U₁, U₁_in, V₁, V₁_in\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nG : Type u_5\ninst✝¹⁶ : TopologicalSpace α\ninst✝¹⁵ : AddCommGroup α\ninst✝¹⁴ : TopologicalAddGroup α\ninst✝¹³ : TopologicalSpace β\ninst✝¹² : AddCommGroup β\ninst✝¹¹ : TopologicalAddGroup β\ninst✝¹⁰ : TopologicalSpace γ\ninst✝⁹ : AddCommGroup γ\ninst✝⁸ : TopologicalAddGroup γ\ninst✝⁷ : TopologicalSpace δ\ninst✝⁶ : AddCommGroup δ\ninst✝⁵ : TopologicalAddGroup δ\ninst✝⁴ : UniformSpace G\ninst✝³ : AddCommGroup G\ninst✝² : UniformAddGroup G\ninst✝¹ : SeparatedSpace G\ninst✝ : CompleteSpace G\ne : β →+ α\nde : DenseInducing ↑e\nf : δ →+ γ\ndf : DenseInducing ↑f\nφ : β →+ δ →+ G\nhφ : Continuous fun p => ↑(↑φ p.fst) p.snd\nW' : Set G\nW'_nhd : W' ∈ 𝓝 0\nx₀ : α\ny₀ : γ\nee : (u : β × β) → (fun x => α) u.fst × (fun x => α) u.snd := fun u => (↑e u.fst, ↑e u.snd)\nff : (u : δ × δ) → (fun x => γ) u.fst × (fun x => γ) u.snd := fun u => (↑f u.fst, ↑f u.snd)\nlim_φ : Tendsto (fun p => ↑(↑φ p.fst) p.snd) (𝓝 (0, 0)) (𝓝 0)\nlim_φ_sub_sub :\n  Tendsto (fun p => (fun p => ↑(↑φ p.fst) p.snd) (p.fst.snd - p.fst.fst, p.snd.snd - p.snd.fst))\n    (comap ee (𝓝 (x₀, x₀)) ×ˢ comap ff (𝓝 (y₀, y₀))) (𝓝 0)\nW : Set G\nW_nhd : W ∈ 𝓝 0\nW4 : ∀ {v w s t : G}, v ∈ W → w ∈ W → s ∈ W → t ∈ W → v + w + s + t ∈ W'\nU : Set (β × β)\nV : Set (δ × δ)\nH :\n  ∀ (x : β × β) (y : δ × δ),\n    x ∈ U → y ∈ V → (fun p => ↑(↑φ p.fst) p.snd) ((x, y).fst.snd - (x, y).fst.fst, (x, y).snd.snd - (x, y).snd.fst) ∈ W\nU₁ : Set β\nU₁_in : U₁ ∈ comap (↑e) (𝓝 x₀)\nHU₁ : U₁ ×ˢ U₁ ⊆ U\nV₁ : Set δ\nV₁_in : V₁ ∈ comap (↑f) (𝓝 y₀)\nHV₁ : V₁ ×ˢ V₁ ⊆ V\n⊢ ∀ (x : β),\n    x ∈ U₁ →\n      ∀ (x' : β), x' ∈ U₁ → ∀ (y : δ), y ∈ V₁ → ∀ (y' : δ), y' ∈ V₁ → (fun p => ↑(↑φ p.fst) p.snd) (x' - x, y' - y) ∈ W\n[PROOFSTEP]\nintro x x_in x' x'_in y y_in y' y'_in\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nG : Type u_5\ninst✝¹⁶ : TopologicalSpace α\ninst✝¹⁵ : AddCommGroup α\ninst✝¹⁴ : TopologicalAddGroup α\ninst✝¹³ : TopologicalSpace β\ninst✝¹² : AddCommGroup β\ninst✝¹¹ : TopologicalAddGroup β\ninst✝¹⁰ : TopologicalSpace γ\ninst✝⁹ : AddCommGroup γ\ninst✝⁸ : TopologicalAddGroup γ\ninst✝⁷ : TopologicalSpace δ\ninst✝⁶ : AddCommGroup δ\ninst✝⁵ : TopologicalAddGroup δ\ninst✝⁴ : UniformSpace G\ninst✝³ : AddCommGroup G\ninst✝² : UniformAddGroup G\ninst✝¹ : SeparatedSpace G\ninst✝ : CompleteSpace G\ne : β →+ α\nde : DenseInducing ↑e\nf : δ →+ γ\ndf : DenseInducing ↑f\nφ : β →+ δ →+ G\nhφ : Continuous fun p => ↑(↑φ p.fst) p.snd\nW' : Set G\nW'_nhd : W' ∈ 𝓝 0\nx₀ : α\ny₀ : γ\nee : (u : β × β) → (fun x => α) u.fst × (fun x => α) u.snd := fun u => (↑e u.fst, ↑e u.snd)\nff : (u : δ × δ) → (fun x => γ) u.fst × (fun x => γ) u.snd := fun u => (↑f u.fst, ↑f u.snd)\nlim_φ : Tendsto (fun p => ↑(↑φ p.fst) p.snd) (𝓝 (0, 0)) (𝓝 0)\nlim_φ_sub_sub :\n  Tendsto (fun p => (fun p => ↑(↑φ p.fst) p.snd) (p.fst.snd - p.fst.fst, p.snd.snd - p.snd.fst))\n    (comap ee (𝓝 (x₀, x₀)) ×ˢ comap ff (𝓝 (y₀, y₀))) (𝓝 0)\nW : Set G\nW_nhd : W ∈ 𝓝 0\nW4 : ∀ {v w s t : G}, v ∈ W → w ∈ W → s ∈ W → t ∈ W → v + w + s + t ∈ W'\nU : Set (β × β)\nV : Set (δ × δ)\nH :\n  ∀ (x : β × β) (y : δ × δ),\n    x ∈ U → y ∈ V → (fun p => ↑(↑φ p.fst) p.snd) ((x, y).fst.snd - (x, y).fst.fst, (x, y).snd.snd - (x, y).snd.fst) ∈ W\nU₁ : Set β\nU₁_in : U₁ ∈ comap (↑e) (𝓝 x₀)\nHU₁ : U₁ ×ˢ U₁ ⊆ U\nV₁ : Set δ\nV₁_in : V₁ ∈ comap (↑f) (𝓝 y₀)\nHV₁ : V₁ ×ˢ V₁ ⊆ V\nx : β\nx_in : x ∈ U₁\nx' : β\nx'_in : x' ∈ U₁\ny : δ\ny_in : y ∈ V₁\ny' : δ\ny'_in : y' ∈ V₁\n⊢ (fun p => ↑(↑φ p.fst) p.snd) (x' - x, y' - y) ∈ W\n[PROOFSTEP]\nexact H _ _ (HU₁ (mk_mem_prod x_in x'_in)) (HV₁ (mk_mem_prod y_in y'_in))\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nG : Type u_5\ninst✝¹⁶ : TopologicalSpace α\ninst✝¹⁵ : AddCommGroup α\ninst✝¹⁴ : TopologicalAddGroup α\ninst✝¹³ : TopologicalSpace β\ninst✝¹² : AddCommGroup β\ninst✝¹¹ : TopologicalAddGroup β\ninst✝¹⁰ : TopologicalSpace γ\ninst✝⁹ : AddCommGroup γ\ninst✝⁸ : TopologicalAddGroup γ\ninst✝⁷ : TopologicalSpace δ\ninst✝⁶ : AddCommGroup δ\ninst✝⁵ : TopologicalAddGroup δ\ninst✝⁴ : UniformSpace G\ninst✝³ : AddCommGroup G\ninst✝² : UniformAddGroup G\ninst✝¹ : SeparatedSpace G\ninst✝ : CompleteSpace G\ne : β →+ α\nde : DenseInducing ↑e\nf : δ →+ γ\ndf : DenseInducing ↑f\nφ : β →+ δ →+ G\nhφ : Continuous fun p => ↑(↑φ p.fst) p.snd\nW' : Set G\nW'_nhd : W' ∈ 𝓝 0\nx₀ : α\ny₀ : γ\nee : (u : β × β) → (fun x => α) u.fst × (fun x => α) u.snd := fun u => (↑e u.fst, ↑e u.snd)\nff : (u : δ × δ) → (fun x => γ) u.fst × (fun x => γ) u.snd := fun u => (↑f u.fst, ↑f u.snd)\nlim_φ : Tendsto (fun p => ↑(↑φ p.fst) p.snd) (𝓝 (0, 0)) (𝓝 0)\nlim_φ_sub_sub :\n  Tendsto (fun p => (fun p => ↑(↑φ p.fst) p.snd) (p.fst.snd - p.fst.fst, p.snd.snd - p.snd.fst))\n    (comap ee (𝓝 (x₀, x₀)) ×ˢ comap ff (𝓝 (y₀, y₀))) (𝓝 0)\nW : Set G\nW_nhd : W ∈ 𝓝 0\nW4 : ∀ {v w s t : G}, v ∈ W → w ∈ W → s ∈ W → t ∈ W → v + w + s + t ∈ W'\nthis :\n  ∃ U₁,\n    U₁ ∈ comap (↑e) (𝓝 x₀) ∧\n      ∃ V₁,\n        V₁ ∈ comap (↑f) (𝓝 y₀) ∧\n          ∀ (x : β),\n            x ∈ U₁ →\n              ∀ (x' : β),\n                x' ∈ U₁ → ∀ (y : δ), y ∈ V₁ → ∀ (y' : δ), y' ∈ V₁ → (fun p => ↑(↑φ p.fst) p.snd) (x' - x, y' - y) ∈ W\n⊢ ∃ U,\n    U ∈ comap (↑e) (𝓝 x₀) ∧\n      ∃ V,\n        V ∈ comap (↑f) (𝓝 y₀) ∧\n          ∀ (x : β),\n            x ∈ U →\n              ∀ (x' : β),\n                x' ∈ U →\n                  ∀ (y : δ),\n                    y ∈ V →\n                      ∀ (y' : δ),\n                        y' ∈ V → (fun p => ↑(↑φ p.fst) p.snd) (x', y') - (fun p => ↑(↑φ p.fst) p.snd) (x, y) ∈ W'\n[PROOFSTEP]\nrcases this with ⟨U₁, U₁_nhd, V₁, V₁_nhd, H⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nG : Type u_5\ninst✝¹⁶ : TopologicalSpace α\ninst✝¹⁵ : AddCommGroup α\ninst✝¹⁴ : TopologicalAddGroup α\ninst✝¹³ : TopologicalSpace β\ninst✝¹² : AddCommGroup β\ninst✝¹¹ : TopologicalAddGroup β\ninst✝¹⁰ : TopologicalSpace γ\ninst✝⁹ : AddCommGroup γ\ninst✝⁸ : TopologicalAddGroup γ\ninst✝⁷ : TopologicalSpace δ\ninst✝⁶ : AddCommGroup δ\ninst✝⁵ : TopologicalAddGroup δ\ninst✝⁴ : UniformSpace G\ninst✝³ : AddCommGroup G\ninst✝² : UniformAddGroup G\ninst✝¹ : SeparatedSpace G\ninst✝ : CompleteSpace G\ne : β →+ α\nde : DenseInducing ↑e\nf : δ →+ γ\ndf : DenseInducing ↑f\nφ : β →+ δ →+ G\nhφ : Continuous fun p => ↑(↑φ p.fst) p.snd\nW' : Set G\nW'_nhd : W' ∈ 𝓝 0\nx₀ : α\ny₀ : γ\nee : (u : β × β) → (fun x => α) u.fst × (fun x => α) u.snd := fun u => (↑e u.fst, ↑e u.snd)\nff : (u : δ × δ) → (fun x => γ) u.fst × (fun x => γ) u.snd := fun u => (↑f u.fst, ↑f u.snd)\nlim_φ : Tendsto (fun p => ↑(↑φ p.fst) p.snd) (𝓝 (0, 0)) (𝓝 0)\nlim_φ_sub_sub :\n  Tendsto (fun p => (fun p => ↑(↑φ p.fst) p.snd) (p.fst.snd - p.fst.fst, p.snd.snd - p.snd.fst))\n    (comap ee (𝓝 (x₀, x₀)) ×ˢ comap ff (𝓝 (y₀, y₀))) (𝓝 0)\nW : Set G\nW_nhd : W ∈ 𝓝 0\nW4 : ∀ {v w s t : G}, v ∈ W → w ∈ W → s ∈ W → t ∈ W → v + w + s + t ∈ W'\nU₁ : Set β\nU₁_nhd : U₁ ∈ comap (↑e) (𝓝 x₀)\nV₁ : Set δ\nV₁_nhd : V₁ ∈ comap (↑f) (𝓝 y₀)\nH :\n  ∀ (x : β),\n    x ∈ U₁ →\n      ∀ (x' : β), x' ∈ U₁ → ∀ (y : δ), y ∈ V₁ → ∀ (y' : δ), y' ∈ V₁ → (fun p => ↑(↑φ p.fst) p.snd) (x' - x, y' - y) ∈ W\n⊢ ∃ U,\n    U ∈ comap (↑e) (𝓝 x₀) ∧\n      ∃ V,\n        V ∈ comap (↑f) (𝓝 y₀) ∧\n          ∀ (x : β),\n            x ∈ U →\n              ∀ (x' : β),\n                x' ∈ U →\n                  ∀ (y : δ),\n                    y ∈ V →\n                      ∀ (y' : δ),\n                        y' ∈ V → (fun p => ↑(↑φ p.fst) p.snd) (x', y') - (fun p => ↑(↑φ p.fst) p.snd) (x, y) ∈ W'\n[PROOFSTEP]\nobtain ⟨x₁, x₁_in⟩ : U₁.Nonempty := (de.comap_nhds_neBot _).nonempty_of_mem U₁_nhd\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nG : Type u_5\ninst✝¹⁶ : TopologicalSpace α\ninst✝¹⁵ : AddCommGroup α\ninst✝¹⁴ : TopologicalAddGroup α\ninst✝¹³ : TopologicalSpace β\ninst✝¹² : AddCommGroup β\ninst✝¹¹ : TopologicalAddGroup β\ninst✝¹⁰ : TopologicalSpace γ\ninst✝⁹ : AddCommGroup γ\ninst✝⁸ : TopologicalAddGroup γ\ninst✝⁷ : TopologicalSpace δ\ninst✝⁶ : AddCommGroup δ\ninst✝⁵ : TopologicalAddGroup δ\ninst✝⁴ : UniformSpace G\ninst✝³ : AddCommGroup G\ninst✝² : UniformAddGroup G\ninst✝¹ : SeparatedSpace G\ninst✝ : CompleteSpace G\ne : β →+ α\nde : DenseInducing ↑e\nf : δ →+ γ\ndf : DenseInducing ↑f\nφ : β →+ δ →+ G\nhφ : Continuous fun p => ↑(↑φ p.fst) p.snd\nW' : Set G\nW'_nhd : W' ∈ 𝓝 0\nx₀ : α\ny₀ : γ\nee : (u : β × β) → (fun x => α) u.fst × (fun x => α) u.snd := fun u => (↑e u.fst, ↑e u.snd)\nff : (u : δ × δ) → (fun x => γ) u.fst × (fun x => γ) u.snd := fun u => (↑f u.fst, ↑f u.snd)\nlim_φ : Tendsto (fun p => ↑(↑φ p.fst) p.snd) (𝓝 (0, 0)) (𝓝 0)\nlim_φ_sub_sub :\n  Tendsto (fun p => (fun p => ↑(↑φ p.fst) p.snd) (p.fst.snd - p.fst.fst, p.snd.snd - p.snd.fst))\n    (comap ee (𝓝 (x₀, x₀)) ×ˢ comap ff (𝓝 (y₀, y₀))) (𝓝 0)\nW : Set G\nW_nhd : W ∈ 𝓝 0\nW4 : ∀ {v w s t : G}, v ∈ W → w ∈ W → s ∈ W → t ∈ W → v + w + s + t ∈ W'\nU₁ : Set β\nU₁_nhd : U₁ ∈ comap (↑e) (𝓝 x₀)\nV₁ : Set δ\nV₁_nhd : V₁ ∈ comap (↑f) (𝓝 y₀)\nH :\n  ∀ (x : β),\n    x ∈ U₁ →\n      ∀ (x' : β), x' ∈ U₁ → ∀ (y : δ), y ∈ V₁ → ∀ (y' : δ), y' ∈ V₁ → (fun p => ↑(↑φ p.fst) p.snd) (x' - x, y' - y) ∈ W\nx₁ : β\nx₁_in : x₁ ∈ U₁\n⊢ ∃ U,\n    U ∈ comap (↑e) (𝓝 x₀) ∧\n      ∃ V,\n        V ∈ comap (↑f) (𝓝 y₀) ∧\n          ∀ (x : β),\n            x ∈ U →\n              ∀ (x' : β),\n                x' ∈ U →\n                  ∀ (y : δ),\n                    y ∈ V →\n                      ∀ (y' : δ),\n                        y' ∈ V → (fun p => ↑(↑φ p.fst) p.snd) (x', y') - (fun p => ↑(↑φ p.fst) p.snd) (x, y) ∈ W'\n[PROOFSTEP]\nobtain ⟨y₁, y₁_in⟩ : V₁.Nonempty := (df.comap_nhds_neBot _).nonempty_of_mem V₁_nhd\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nG : Type u_5\ninst✝¹⁶ : TopologicalSpace α\ninst✝¹⁵ : AddCommGroup α\ninst✝¹⁴ : TopologicalAddGroup α\ninst✝¹³ : TopologicalSpace β\ninst✝¹² : AddCommGroup β\ninst✝¹¹ : TopologicalAddGroup β\ninst✝¹⁰ : TopologicalSpace γ\ninst✝⁹ : AddCommGroup γ\ninst✝⁸ : TopologicalAddGroup γ\ninst✝⁷ : TopologicalSpace δ\ninst✝⁶ : AddCommGroup δ\ninst✝⁵ : TopologicalAddGroup δ\ninst✝⁴ : UniformSpace G\ninst✝³ : AddCommGroup G\ninst✝² : UniformAddGroup G\ninst✝¹ : SeparatedSpace G\ninst✝ : CompleteSpace G\ne : β →+ α\nde : DenseInducing ↑e\nf : δ →+ γ\ndf : DenseInducing ↑f\nφ : β →+ δ →+ G\nhφ : Continuous fun p => ↑(↑φ p.fst) p.snd\nW' : Set G\nW'_nhd : W' ∈ 𝓝 0\nx₀ : α\ny₀ : γ\nee : (u : β × β) → (fun x => α) u.fst × (fun x => α) u.snd := fun u => (↑e u.fst, ↑e u.snd)\nff : (u : δ × δ) → (fun x => γ) u.fst × (fun x => γ) u.snd := fun u => (↑f u.fst, ↑f u.snd)\nlim_φ : Tendsto (fun p => ↑(↑φ p.fst) p.snd) (𝓝 (0, 0)) (𝓝 0)\nlim_φ_sub_sub :\n  Tendsto (fun p => (fun p => ↑(↑φ p.fst) p.snd) (p.fst.snd - p.fst.fst, p.snd.snd - p.snd.fst))\n    (comap ee (𝓝 (x₀, x₀)) ×ˢ comap ff (𝓝 (y₀, y₀))) (𝓝 0)\nW : Set G\nW_nhd : W ∈ 𝓝 0\nW4 : ∀ {v w s t : G}, v ∈ W → w ∈ W → s ∈ W → t ∈ W → v + w + s + t ∈ W'\nU₁ : Set β\nU₁_nhd : U₁ ∈ comap (↑e) (𝓝 x₀)\nV₁ : Set δ\nV₁_nhd : V₁ ∈ comap (↑f) (𝓝 y₀)\nH :\n  ∀ (x : β),\n    x ∈ U₁ →\n      ∀ (x' : β), x' ∈ U₁ → ∀ (y : δ), y ∈ V₁ → ∀ (y' : δ), y' ∈ V₁ → (fun p => ↑(↑φ p.fst) p.snd) (x' - x, y' - y) ∈ W\nx₁ : β\nx₁_in : x₁ ∈ U₁\ny₁ : δ\ny₁_in : y₁ ∈ V₁\n⊢ ∃ U,\n    U ∈ comap (↑e) (𝓝 x₀) ∧\n      ∃ V,\n        V ∈ comap (↑f) (𝓝 y₀) ∧\n          ∀ (x : β),\n            x ∈ U →\n              ∀ (x' : β),\n                x' ∈ U →\n                  ∀ (y : δ),\n                    y ∈ V →\n                      ∀ (y' : δ),\n                        y' ∈ V → (fun p => ↑(↑φ p.fst) p.snd) (x', y') - (fun p => ↑(↑φ p.fst) p.snd) (x, y) ∈ W'\n[PROOFSTEP]\nhave cont_flip : Continuous fun p : δ × β => φ.flip p.1 p.2 :=\n  by\n  show Continuous ((fun p : β × δ => φ p.1 p.2) ∘ Prod.swap)\n  exact hφ.comp continuous_swap\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nG : Type u_5\ninst✝¹⁶ : TopologicalSpace α\ninst✝¹⁵ : AddCommGroup α\ninst✝¹⁴ : TopologicalAddGroup α\ninst✝¹³ : TopologicalSpace β\ninst✝¹² : AddCommGroup β\ninst✝¹¹ : TopologicalAddGroup β\ninst✝¹⁰ : TopologicalSpace γ\ninst✝⁹ : AddCommGroup γ\ninst✝⁸ : TopologicalAddGroup γ\ninst✝⁷ : TopologicalSpace δ\ninst✝⁶ : AddCommGroup δ\ninst✝⁵ : TopologicalAddGroup δ\ninst✝⁴ : UniformSpace G\ninst✝³ : AddCommGroup G\ninst✝² : UniformAddGroup G\ninst✝¹ : SeparatedSpace G\ninst✝ : CompleteSpace G\ne : β →+ α\nde : DenseInducing ↑e\nf : δ →+ γ\ndf : DenseInducing ↑f\nφ : β →+ δ →+ G\nhφ : Continuous fun p => ↑(↑φ p.fst) p.snd\nW' : Set G\nW'_nhd : W' ∈ 𝓝 0\nx₀ : α\ny₀ : γ\nee : (u : β × β) → (fun x => α) u.fst × (fun x => α) u.snd := fun u => (↑e u.fst, ↑e u.snd)\nff : (u : δ × δ) → (fun x => γ) u.fst × (fun x => γ) u.snd := fun u => (↑f u.fst, ↑f u.snd)\nlim_φ : Tendsto (fun p => ↑(↑φ p.fst) p.snd) (𝓝 (0, 0)) (𝓝 0)\nlim_φ_sub_sub :\n  Tendsto (fun p => (fun p => ↑(↑φ p.fst) p.snd) (p.fst.snd - p.fst.fst, p.snd.snd - p.snd.fst))\n    (comap ee (𝓝 (x₀, x₀)) ×ˢ comap ff (𝓝 (y₀, y₀))) (𝓝 0)\nW : Set G\nW_nhd : W ∈ 𝓝 0\nW4 : ∀ {v w s t : G}, v ∈ W → w ∈ W → s ∈ W → t ∈ W → v + w + s + t ∈ W'\nU₁ : Set β\nU₁_nhd : U₁ ∈ comap (↑e) (𝓝 x₀)\nV₁ : Set δ\nV₁_nhd : V₁ ∈ comap (↑f) (𝓝 y₀)\nH :\n  ∀ (x : β),\n    x ∈ U₁ →\n      ∀ (x' : β), x' ∈ U₁ → ∀ (y : δ), y ∈ V₁ → ∀ (y' : δ), y' ∈ V₁ → (fun p => ↑(↑φ p.fst) p.snd) (x' - x, y' - y) ∈ W\nx₁ : β\nx₁_in : x₁ ∈ U₁\ny₁ : δ\ny₁_in : y₁ ∈ V₁\n⊢ Continuous fun p => ↑(↑(AddMonoidHom.flip φ) p.fst) p.snd\n[PROOFSTEP]\nshow Continuous ((fun p : β × δ => φ p.1 p.2) ∘ Prod.swap)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nG : Type u_5\ninst✝¹⁶ : TopologicalSpace α\ninst✝¹⁵ : AddCommGroup α\ninst✝¹⁴ : TopologicalAddGroup α\ninst✝¹³ : TopologicalSpace β\ninst✝¹² : AddCommGroup β\ninst✝¹¹ : TopologicalAddGroup β\ninst✝¹⁰ : TopologicalSpace γ\ninst✝⁹ : AddCommGroup γ\ninst✝⁸ : TopologicalAddGroup γ\ninst✝⁷ : TopologicalSpace δ\ninst✝⁶ : AddCommGroup δ\ninst✝⁵ : TopologicalAddGroup δ\ninst✝⁴ : UniformSpace G\ninst✝³ : AddCommGroup G\ninst✝² : UniformAddGroup G\ninst✝¹ : SeparatedSpace G\ninst✝ : CompleteSpace G\ne : β →+ α\nde : DenseInducing ↑e\nf : δ →+ γ\ndf : DenseInducing ↑f\nφ : β →+ δ →+ G\nhφ : Continuous fun p => ↑(↑φ p.fst) p.snd\nW' : Set G\nW'_nhd : W' ∈ 𝓝 0\nx₀ : α\ny₀ : γ\nee : (u : β × β) → (fun x => α) u.fst × (fun x => α) u.snd := fun u => (↑e u.fst, ↑e u.snd)\nff : (u : δ × δ) → (fun x => γ) u.fst × (fun x => γ) u.snd := fun u => (↑f u.fst, ↑f u.snd)\nlim_φ : Tendsto (fun p => ↑(↑φ p.fst) p.snd) (𝓝 (0, 0)) (𝓝 0)\nlim_φ_sub_sub :\n  Tendsto (fun p => (fun p => ↑(↑φ p.fst) p.snd) (p.fst.snd - p.fst.fst, p.snd.snd - p.snd.fst))\n    (comap ee (𝓝 (x₀, x₀)) ×ˢ comap ff (𝓝 (y₀, y₀))) (𝓝 0)\nW : Set G\nW_nhd : W ∈ 𝓝 0\nW4 : ∀ {v w s t : G}, v ∈ W → w ∈ W → s ∈ W → t ∈ W → v + w + s + t ∈ W'\nU₁ : Set β\nU₁_nhd : U₁ ∈ comap (↑e) (𝓝 x₀)\nV₁ : Set δ\nV₁_nhd : V₁ ∈ comap (↑f) (𝓝 y₀)\nH :\n  ∀ (x : β),\n    x ∈ U₁ →\n      ∀ (x' : β), x' ∈ U₁ → ∀ (y : δ), y ∈ V₁ → ∀ (y' : δ), y' ∈ V₁ → (fun p => ↑(↑φ p.fst) p.snd) (x' - x, y' - y) ∈ W\nx₁ : β\nx₁_in : x₁ ∈ U₁\ny₁ : δ\ny₁_in : y₁ ∈ V₁\n⊢ Continuous ((fun p => ↑(↑φ p.fst) p.snd) ∘ Prod.swap)\n[PROOFSTEP]\nexact hφ.comp continuous_swap\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nG : Type u_5\ninst✝¹⁶ : TopologicalSpace α\ninst✝¹⁵ : AddCommGroup α\ninst✝¹⁴ : TopologicalAddGroup α\ninst✝¹³ : TopologicalSpace β\ninst✝¹² : AddCommGroup β\ninst✝¹¹ : TopologicalAddGroup β\ninst✝¹⁰ : TopologicalSpace γ\ninst✝⁹ : AddCommGroup γ\ninst✝⁸ : TopologicalAddGroup γ\ninst✝⁷ : TopologicalSpace δ\ninst✝⁶ : AddCommGroup δ\ninst✝⁵ : TopologicalAddGroup δ\ninst✝⁴ : UniformSpace G\ninst✝³ : AddCommGroup G\ninst✝² : UniformAddGroup G\ninst✝¹ : SeparatedSpace G\ninst✝ : CompleteSpace G\ne : β →+ α\nde : DenseInducing ↑e\nf : δ →+ γ\ndf : DenseInducing ↑f\nφ : β →+ δ →+ G\nhφ : Continuous fun p => ↑(↑φ p.fst) p.snd\nW' : Set G\nW'_nhd : W' ∈ 𝓝 0\nx₀ : α\ny₀ : γ\nee : (u : β × β) → (fun x => α) u.fst × (fun x => α) u.snd := fun u => (↑e u.fst, ↑e u.snd)\nff : (u : δ × δ) → (fun x => γ) u.fst × (fun x => γ) u.snd := fun u => (↑f u.fst, ↑f u.snd)\nlim_φ : Tendsto (fun p => ↑(↑φ p.fst) p.snd) (𝓝 (0, 0)) (𝓝 0)\nlim_φ_sub_sub :\n  Tendsto (fun p => (fun p => ↑(↑φ p.fst) p.snd) (p.fst.snd - p.fst.fst, p.snd.snd - p.snd.fst))\n    (comap ee (𝓝 (x₀, x₀)) ×ˢ comap ff (𝓝 (y₀, y₀))) (𝓝 0)\nW : Set G\nW_nhd : W ∈ 𝓝 0\nW4 : ∀ {v w s t : G}, v ∈ W → w ∈ W → s ∈ W → t ∈ W → v + w + s + t ∈ W'\nU₁ : Set β\nU₁_nhd : U₁ ∈ comap (↑e) (𝓝 x₀)\nV₁ : Set δ\nV₁_nhd : V₁ ∈ comap (↑f) (𝓝 y₀)\nH :\n  ∀ (x : β),\n    x ∈ U₁ →\n      ∀ (x' : β), x' ∈ U₁ → ∀ (y : δ), y ∈ V₁ → ∀ (y' : δ), y' ∈ V₁ → (fun p => ↑(↑φ p.fst) p.snd) (x' - x, y' - y) ∈ W\nx₁ : β\nx₁_in : x₁ ∈ U₁\ny₁ : δ\ny₁_in : y₁ ∈ V₁\ncont_flip : Continuous fun p => ↑(↑(AddMonoidHom.flip φ) p.fst) p.snd\n⊢ ∃ U,\n    U ∈ comap (↑e) (𝓝 x₀) ∧\n      ∃ V,\n        V ∈ comap (↑f) (𝓝 y₀) ∧\n          ∀ (x : β),\n            x ∈ U →\n              ∀ (x' : β),\n                x' ∈ U →\n                  ∀ (y : δ),\n                    y ∈ V →\n                      ∀ (y' : δ),\n                        y' ∈ V → (fun p => ↑(↑φ p.fst) p.snd) (x', y') - (fun p => ↑(↑φ p.fst) p.snd) (x, y) ∈ W'\n[PROOFSTEP]\nrcases extend_Z_bilin_aux de hφ W_nhd x₀ y₁ with ⟨U₂, U₂_nhd, HU⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nG : Type u_5\ninst✝¹⁶ : TopologicalSpace α\ninst✝¹⁵ : AddCommGroup α\ninst✝¹⁴ : TopologicalAddGroup α\ninst✝¹³ : TopologicalSpace β\ninst✝¹² : AddCommGroup β\ninst✝¹¹ : TopologicalAddGroup β\ninst✝¹⁰ : TopologicalSpace γ\ninst✝⁹ : AddCommGroup γ\ninst✝⁸ : TopologicalAddGroup γ\ninst✝⁷ : TopologicalSpace δ\ninst✝⁶ : AddCommGroup δ\ninst✝⁵ : TopologicalAddGroup δ\ninst✝⁴ : UniformSpace G\ninst✝³ : AddCommGroup G\ninst✝² : UniformAddGroup G\ninst✝¹ : SeparatedSpace G\ninst✝ : CompleteSpace G\ne : β →+ α\nde : DenseInducing ↑e\nf : δ →+ γ\ndf : DenseInducing ↑f\nφ : β →+ δ →+ G\nhφ : Continuous fun p => ↑(↑φ p.fst) p.snd\nW' : Set G\nW'_nhd : W' ∈ 𝓝 0\nx₀ : α\ny₀ : γ\nee : (u : β × β) → (fun x => α) u.fst × (fun x => α) u.snd := fun u => (↑e u.fst, ↑e u.snd)\nff : (u : δ × δ) → (fun x => γ) u.fst × (fun x => γ) u.snd := fun u => (↑f u.fst, ↑f u.snd)\nlim_φ : Tendsto (fun p => ↑(↑φ p.fst) p.snd) (𝓝 (0, 0)) (𝓝 0)\nlim_φ_sub_sub :\n  Tendsto (fun p => (fun p => ↑(↑φ p.fst) p.snd) (p.fst.snd - p.fst.fst, p.snd.snd - p.snd.fst))\n    (comap ee (𝓝 (x₀, x₀)) ×ˢ comap ff (𝓝 (y₀, y₀))) (𝓝 0)\nW : Set G\nW_nhd : W ∈ 𝓝 0\nW4 : ∀ {v w s t : G}, v ∈ W → w ∈ W → s ∈ W → t ∈ W → v + w + s + t ∈ W'\nU₁ : Set β\nU₁_nhd : U₁ ∈ comap (↑e) (𝓝 x₀)\nV₁ : Set δ\nV₁_nhd : V₁ ∈ comap (↑f) (𝓝 y₀)\nH :\n  ∀ (x : β),\n    x ∈ U₁ →\n      ∀ (x' : β), x' ∈ U₁ → ∀ (y : δ), y ∈ V₁ → ∀ (y' : δ), y' ∈ V₁ → (fun p => ↑(↑φ p.fst) p.snd) (x' - x, y' - y) ∈ W\nx₁ : β\nx₁_in : x₁ ∈ U₁\ny₁ : δ\ny₁_in : y₁ ∈ V₁\ncont_flip : Continuous fun p => ↑(↑(AddMonoidHom.flip φ) p.fst) p.snd\nU₂ : Set β\nU₂_nhd : U₂ ∈ comap (↑e) (𝓝 x₀)\nHU : ∀ (x : β), x ∈ U₂ → ∀ (x' : β), x' ∈ U₂ → (fun p => ↑(↑φ p.fst) p.snd) (x' - x, y₁) ∈ W\n⊢ ∃ U,\n    U ∈ comap (↑e) (𝓝 x₀) ∧\n      ∃ V,\n        V ∈ comap (↑f) (𝓝 y₀) ∧\n          ∀ (x : β),\n            x ∈ U →\n              ∀ (x' : β),\n                x' ∈ U →\n                  ∀ (y : δ),\n                    y ∈ V →\n                      ∀ (y' : δ),\n                        y' ∈ V → (fun p => ↑(↑φ p.fst) p.snd) (x', y') - (fun p => ↑(↑φ p.fst) p.snd) (x, y) ∈ W'\n[PROOFSTEP]\nrcases extend_Z_bilin_aux df cont_flip W_nhd y₀ x₁ with ⟨V₂, V₂_nhd, HV⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nG : Type u_5\ninst✝¹⁶ : TopologicalSpace α\ninst✝¹⁵ : AddCommGroup α\ninst✝¹⁴ : TopologicalAddGroup α\ninst✝¹³ : TopologicalSpace β\ninst✝¹² : AddCommGroup β\ninst✝¹¹ : TopologicalAddGroup β\ninst✝¹⁰ : TopologicalSpace γ\ninst✝⁹ : AddCommGroup γ\ninst✝⁸ : TopologicalAddGroup γ\ninst✝⁷ : TopologicalSpace δ\ninst✝⁶ : AddCommGroup δ\ninst✝⁵ : TopologicalAddGroup δ\ninst✝⁴ : UniformSpace G\ninst✝³ : AddCommGroup G\ninst✝² : UniformAddGroup G\ninst✝¹ : SeparatedSpace G\ninst✝ : CompleteSpace G\ne : β →+ α\nde : DenseInducing ↑e\nf : δ →+ γ\ndf : DenseInducing ↑f\nφ : β →+ δ →+ G\nhφ : Continuous fun p => ↑(↑φ p.fst) p.snd\nW' : Set G\nW'_nhd : W' ∈ 𝓝 0\nx₀ : α\ny₀ : γ\nee : (u : β × β) → (fun x => α) u.fst × (fun x => α) u.snd := fun u => (↑e u.fst, ↑e u.snd)\nff : (u : δ × δ) → (fun x => γ) u.fst × (fun x => γ) u.snd := fun u => (↑f u.fst, ↑f u.snd)\nlim_φ : Tendsto (fun p => ↑(↑φ p.fst) p.snd) (𝓝 (0, 0)) (𝓝 0)\nlim_φ_sub_sub :\n  Tendsto (fun p => (fun p => ↑(↑φ p.fst) p.snd) (p.fst.snd - p.fst.fst, p.snd.snd - p.snd.fst))\n    (comap ee (𝓝 (x₀, x₀)) ×ˢ comap ff (𝓝 (y₀, y₀))) (𝓝 0)\nW : Set G\nW_nhd : W ∈ 𝓝 0\nW4 : ∀ {v w s t : G}, v ∈ W → w ∈ W → s ∈ W → t ∈ W → v + w + s + t ∈ W'\nU₁ : Set β\nU₁_nhd : U₁ ∈ comap (↑e) (𝓝 x₀)\nV₁ : Set δ\nV₁_nhd : V₁ ∈ comap (↑f) (𝓝 y₀)\nH :\n  ∀ (x : β),\n    x ∈ U₁ →\n      ∀ (x' : β), x' ∈ U₁ → ∀ (y : δ), y ∈ V₁ → ∀ (y' : δ), y' ∈ V₁ → (fun p => ↑(↑φ p.fst) p.snd) (x' - x, y' - y) ∈ W\nx₁ : β\nx₁_in : x₁ ∈ U₁\ny₁ : δ\ny₁_in : y₁ ∈ V₁\ncont_flip : Continuous fun p => ↑(↑(AddMonoidHom.flip φ) p.fst) p.snd\nU₂ : Set β\nU₂_nhd : U₂ ∈ comap (↑e) (𝓝 x₀)\nHU : ∀ (x : β), x ∈ U₂ → ∀ (x' : β), x' ∈ U₂ → (fun p => ↑(↑φ p.fst) p.snd) (x' - x, y₁) ∈ W\nV₂ : Set δ\nV₂_nhd : V₂ ∈ comap (↑f) (𝓝 y₀)\nHV : ∀ (x : δ), x ∈ V₂ → ∀ (x' : δ), x' ∈ V₂ → (fun p => ↑(↑(AddMonoidHom.flip φ) p.fst) p.snd) (x' - x, x₁) ∈ W\n⊢ ∃ U,\n    U ∈ comap (↑e) (𝓝 x₀) ∧\n      ∃ V,\n        V ∈ comap (↑f) (𝓝 y₀) ∧\n          ∀ (x : β),\n            x ∈ U →\n              ∀ (x' : β),\n                x' ∈ U →\n                  ∀ (y : δ),\n                    y ∈ V →\n                      ∀ (y' : δ),\n                        y' ∈ V → (fun p => ↑(↑φ p.fst) p.snd) (x', y') - (fun p => ↑(↑φ p.fst) p.snd) (x, y) ∈ W'\n[PROOFSTEP]\nexists U₁ ∩ U₂, inter_mem U₁_nhd U₂_nhd, V₁ ∩ V₂, inter_mem V₁_nhd V₂_nhd\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nG : Type u_5\ninst✝¹⁶ : TopologicalSpace α\ninst✝¹⁵ : AddCommGroup α\ninst✝¹⁴ : TopologicalAddGroup α\ninst✝¹³ : TopologicalSpace β\ninst✝¹² : AddCommGroup β\ninst✝¹¹ : TopologicalAddGroup β\ninst✝¹⁰ : TopologicalSpace γ\ninst✝⁹ : AddCommGroup γ\ninst✝⁸ : TopologicalAddGroup γ\ninst✝⁷ : TopologicalSpace δ\ninst✝⁶ : AddCommGroup δ\ninst✝⁵ : TopologicalAddGroup δ\ninst✝⁴ : UniformSpace G\ninst✝³ : AddCommGroup G\ninst✝² : UniformAddGroup G\ninst✝¹ : SeparatedSpace G\ninst✝ : CompleteSpace G\ne : β →+ α\nde : DenseInducing ↑e\nf : δ →+ γ\ndf : DenseInducing ↑f\nφ : β →+ δ →+ G\nhφ : Continuous fun p => ↑(↑φ p.fst) p.snd\nW' : Set G\nW'_nhd : W' ∈ 𝓝 0\nx₀ : α\ny₀ : γ\nee : (u : β × β) → (fun x => α) u.fst × (fun x => α) u.snd := fun u => (↑e u.fst, ↑e u.snd)\nff : (u : δ × δ) → (fun x => γ) u.fst × (fun x => γ) u.snd := fun u => (↑f u.fst, ↑f u.snd)\nlim_φ : Tendsto (fun p => ↑(↑φ p.fst) p.snd) (𝓝 (0, 0)) (𝓝 0)\nlim_φ_sub_sub :\n  Tendsto (fun p => (fun p => ↑(↑φ p.fst) p.snd) (p.fst.snd - p.fst.fst, p.snd.snd - p.snd.fst))\n    (comap ee (𝓝 (x₀, x₀)) ×ˢ comap ff (𝓝 (y₀, y₀))) (𝓝 0)\nW : Set G\nW_nhd : W ∈ 𝓝 0\nW4 : ∀ {v w s t : G}, v ∈ W → w ∈ W → s ∈ W → t ∈ W → v + w + s + t ∈ W'\nU₁ : Set β\nU₁_nhd : U₁ ∈ comap (↑e) (𝓝 x₀)\nV₁ : Set δ\nV₁_nhd : V₁ ∈ comap (↑f) (𝓝 y₀)\nH :\n  ∀ (x : β),\n    x ∈ U₁ →\n      ∀ (x' : β), x' ∈ U₁ → ∀ (y : δ), y ∈ V₁ → ∀ (y' : δ), y' ∈ V₁ → (fun p => ↑(↑φ p.fst) p.snd) (x' - x, y' - y) ∈ W\nx₁ : β\nx₁_in : x₁ ∈ U₁\ny₁ : δ\ny₁_in : y₁ ∈ V₁\ncont_flip : Continuous fun p => ↑(↑(AddMonoidHom.flip φ) p.fst) p.snd\nU₂ : Set β\nU₂_nhd : U₂ ∈ comap (↑e) (𝓝 x₀)\nHU : ∀ (x : β), x ∈ U₂ → ∀ (x' : β), x' ∈ U₂ → (fun p => ↑(↑φ p.fst) p.snd) (x' - x, y₁) ∈ W\nV₂ : Set δ\nV₂_nhd : V₂ ∈ comap (↑f) (𝓝 y₀)\nHV : ∀ (x : δ), x ∈ V₂ → ∀ (x' : δ), x' ∈ V₂ → (fun p => ↑(↑(AddMonoidHom.flip φ) p.fst) p.snd) (x' - x, x₁) ∈ W\n⊢ ∀ (x : β),\n    x ∈ U₁ ∩ U₂ →\n      ∀ (x' : β),\n        x' ∈ U₁ ∩ U₂ →\n          ∀ (y : δ),\n            y ∈ V₁ ∩ V₂ →\n              ∀ (y' : δ),\n                y' ∈ V₁ ∩ V₂ → (fun p => ↑(↑φ p.fst) p.snd) (x', y') - (fun p => ↑(↑φ p.fst) p.snd) (x, y) ∈ W'\n[PROOFSTEP]\nrintro x ⟨xU₁, xU₂⟩ x' ⟨x'U₁, x'U₂⟩ y ⟨yV₁, yV₂⟩ y' ⟨y'V₁, y'V₂⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nG : Type u_5\ninst✝¹⁶ : TopologicalSpace α\ninst✝¹⁵ : AddCommGroup α\ninst✝¹⁴ : TopologicalAddGroup α\ninst✝¹³ : TopologicalSpace β\ninst✝¹² : AddCommGroup β\ninst✝¹¹ : TopologicalAddGroup β\ninst✝¹⁰ : TopologicalSpace γ\ninst✝⁹ : AddCommGroup γ\ninst✝⁸ : TopologicalAddGroup γ\ninst✝⁷ : TopologicalSpace δ\ninst✝⁶ : AddCommGroup δ\ninst✝⁵ : TopologicalAddGroup δ\ninst✝⁴ : UniformSpace G\ninst✝³ : AddCommGroup G\ninst✝² : UniformAddGroup G\ninst✝¹ : SeparatedSpace G\ninst✝ : CompleteSpace G\ne : β →+ α\nde : DenseInducing ↑e\nf : δ →+ γ\ndf : DenseInducing ↑f\nφ : β →+ δ →+ G\nhφ : Continuous fun p => ↑(↑φ p.fst) p.snd\nW' : Set G\nW'_nhd : W' ∈ 𝓝 0\nx₀ : α\ny₀ : γ\nee : (u : β × β) → (fun x => α) u.fst × (fun x => α) u.snd := fun u => (↑e u.fst, ↑e u.snd)\nff : (u : δ × δ) → (fun x => γ) u.fst × (fun x => γ) u.snd := fun u => (↑f u.fst, ↑f u.snd)\nlim_φ : Tendsto (fun p => ↑(↑φ p.fst) p.snd) (𝓝 (0, 0)) (𝓝 0)\nlim_φ_sub_sub :\n  Tendsto (fun p => (fun p => ↑(↑φ p.fst) p.snd) (p.fst.snd - p.fst.fst, p.snd.snd - p.snd.fst))\n    (comap ee (𝓝 (x₀, x₀)) ×ˢ comap ff (𝓝 (y₀, y₀))) (𝓝 0)\nW : Set G\nW_nhd : W ∈ 𝓝 0\nW4 : ∀ {v w s t : G}, v ∈ W → w ∈ W → s ∈ W → t ∈ W → v + w + s + t ∈ W'\nU₁ : Set β\nU₁_nhd : U₁ ∈ comap (↑e) (𝓝 x₀)\nV₁ : Set δ\nV₁_nhd : V₁ ∈ comap (↑f) (𝓝 y₀)\nH :\n  ∀ (x : β),\n    x ∈ U₁ →\n      ∀ (x' : β), x' ∈ U₁ → ∀ (y : δ), y ∈ V₁ → ∀ (y' : δ), y' ∈ V₁ → (fun p => ↑(↑φ p.fst) p.snd) (x' - x, y' - y) ∈ W\nx₁ : β\nx₁_in : x₁ ∈ U₁\ny₁ : δ\ny₁_in : y₁ ∈ V₁\ncont_flip : Continuous fun p => ↑(↑(AddMonoidHom.flip φ) p.fst) p.snd\nU₂ : Set β\nU₂_nhd : U₂ ∈ comap (↑e) (𝓝 x₀)\nHU : ∀ (x : β), x ∈ U₂ → ∀ (x' : β), x' ∈ U₂ → (fun p => ↑(↑φ p.fst) p.snd) (x' - x, y₁) ∈ W\nV₂ : Set δ\nV₂_nhd : V₂ ∈ comap (↑f) (𝓝 y₀)\nHV : ∀ (x : δ), x ∈ V₂ → ∀ (x' : δ), x' ∈ V₂ → (fun p => ↑(↑(AddMonoidHom.flip φ) p.fst) p.snd) (x' - x, x₁) ∈ W\nx : β\nxU₁ : x ∈ U₁\nxU₂ : x ∈ U₂\nx' : β\nx'U₁ : x' ∈ U₁\nx'U₂ : x' ∈ U₂\ny : δ\nyV₁ : y ∈ V₁\nyV₂ : y ∈ V₂\ny' : δ\ny'V₁ : y' ∈ V₁\ny'V₂ : y' ∈ V₂\n⊢ (fun p => ↑(↑φ p.fst) p.snd) (x', y') - (fun p => ↑(↑φ p.fst) p.snd) (x, y) ∈ W'\n[PROOFSTEP]\nhave key_formula : φ x' y' - φ x y = φ (x' - x) y₁ + φ (x' - x) (y' - y₁) + φ x₁ (y' - y) + φ (x - x₁) (y' - y) := by\n  simp; abel\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nG : Type u_5\ninst✝¹⁶ : TopologicalSpace α\ninst✝¹⁵ : AddCommGroup α\ninst✝¹⁴ : TopologicalAddGroup α\ninst✝¹³ : TopologicalSpace β\ninst✝¹² : AddCommGroup β\ninst✝¹¹ : TopologicalAddGroup β\ninst✝¹⁰ : TopologicalSpace γ\ninst✝⁹ : AddCommGroup γ\ninst✝⁸ : TopologicalAddGroup γ\ninst✝⁷ : TopologicalSpace δ\ninst✝⁶ : AddCommGroup δ\ninst✝⁵ : TopologicalAddGroup δ\ninst✝⁴ : UniformSpace G\ninst✝³ : AddCommGroup G\ninst✝² : UniformAddGroup G\ninst✝¹ : SeparatedSpace G\ninst✝ : CompleteSpace G\ne : β →+ α\nde : DenseInducing ↑e\nf : δ →+ γ\ndf : DenseInducing ↑f\nφ : β →+ δ →+ G\nhφ : Continuous fun p => ↑(↑φ p.fst) p.snd\nW' : Set G\nW'_nhd : W' ∈ 𝓝 0\nx₀ : α\ny₀ : γ\nee : (u : β × β) → (fun x => α) u.fst × (fun x => α) u.snd := fun u => (↑e u.fst, ↑e u.snd)\nff : (u : δ × δ) → (fun x => γ) u.fst × (fun x => γ) u.snd := fun u => (↑f u.fst, ↑f u.snd)\nlim_φ : Tendsto (fun p => ↑(↑φ p.fst) p.snd) (𝓝 (0, 0)) (𝓝 0)\nlim_φ_sub_sub :\n  Tendsto (fun p => (fun p => ↑(↑φ p.fst) p.snd) (p.fst.snd - p.fst.fst, p.snd.snd - p.snd.fst))\n    (comap ee (𝓝 (x₀, x₀)) ×ˢ comap ff (𝓝 (y₀, y₀))) (𝓝 0)\nW : Set G\nW_nhd : W ∈ 𝓝 0\nW4 : ∀ {v w s t : G}, v ∈ W → w ∈ W → s ∈ W → t ∈ W → v + w + s + t ∈ W'\nU₁ : Set β\nU₁_nhd : U₁ ∈ comap (↑e) (𝓝 x₀)\nV₁ : Set δ\nV₁_nhd : V₁ ∈ comap (↑f) (𝓝 y₀)\nH :\n  ∀ (x : β),\n    x ∈ U₁ →\n      ∀ (x' : β), x' ∈ U₁ → ∀ (y : δ), y ∈ V₁ → ∀ (y' : δ), y' ∈ V₁ → (fun p => ↑(↑φ p.fst) p.snd) (x' - x, y' - y) ∈ W\nx₁ : β\nx₁_in : x₁ ∈ U₁\ny₁ : δ\ny₁_in : y₁ ∈ V₁\ncont_flip : Continuous fun p => ↑(↑(AddMonoidHom.flip φ) p.fst) p.snd\nU₂ : Set β\nU₂_nhd : U₂ ∈ comap (↑e) (𝓝 x₀)\nHU : ∀ (x : β), x ∈ U₂ → ∀ (x' : β), x' ∈ U₂ → (fun p => ↑(↑φ p.fst) p.snd) (x' - x, y₁) ∈ W\nV₂ : Set δ\nV₂_nhd : V₂ ∈ comap (↑f) (𝓝 y₀)\nHV : ∀ (x : δ), x ∈ V₂ → ∀ (x' : δ), x' ∈ V₂ → (fun p => ↑(↑(AddMonoidHom.flip φ) p.fst) p.snd) (x' - x, x₁) ∈ W\nx : β\nxU₁ : x ∈ U₁\nxU₂ : x ∈ U₂\nx' : β\nx'U₁ : x' ∈ U₁\nx'U₂ : x' ∈ U₂\ny : δ\nyV₁ : y ∈ V₁\nyV₂ : y ∈ V₂\ny' : δ\ny'V₁ : y' ∈ V₁\ny'V₂ : y' ∈ V₂\n⊢ ↑(↑φ x') y' - ↑(↑φ x) y = ↑(↑φ (x' - x)) y₁ + ↑(↑φ (x' - x)) (y' - y₁) + ↑(↑φ x₁) (y' - y) + ↑(↑φ (x - x₁)) (y' - y)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nG : Type u_5\ninst✝¹⁶ : TopologicalSpace α\ninst✝¹⁵ : AddCommGroup α\ninst✝¹⁴ : TopologicalAddGroup α\ninst✝¹³ : TopologicalSpace β\ninst✝¹² : AddCommGroup β\ninst✝¹¹ : TopologicalAddGroup β\ninst✝¹⁰ : TopologicalSpace γ\ninst✝⁹ : AddCommGroup γ\ninst✝⁸ : TopologicalAddGroup γ\ninst✝⁷ : TopologicalSpace δ\ninst✝⁶ : AddCommGroup δ\ninst✝⁵ : TopologicalAddGroup δ\ninst✝⁴ : UniformSpace G\ninst✝³ : AddCommGroup G\ninst✝² : UniformAddGroup G\ninst✝¹ : SeparatedSpace G\ninst✝ : CompleteSpace G\ne : β →+ α\nde : DenseInducing ↑e\nf : δ →+ γ\ndf : DenseInducing ↑f\nφ : β →+ δ →+ G\nhφ : Continuous fun p => ↑(↑φ p.fst) p.snd\nW' : Set G\nW'_nhd : W' ∈ 𝓝 0\nx₀ : α\ny₀ : γ\nee : (u : β × β) → (fun x => α) u.fst × (fun x => α) u.snd := fun u => (↑e u.fst, ↑e u.snd)\nff : (u : δ × δ) → (fun x => γ) u.fst × (fun x => γ) u.snd := fun u => (↑f u.fst, ↑f u.snd)\nlim_φ : Tendsto (fun p => ↑(↑φ p.fst) p.snd) (𝓝 (0, 0)) (𝓝 0)\nlim_φ_sub_sub :\n  Tendsto (fun p => (fun p => ↑(↑φ p.fst) p.snd) (p.fst.snd - p.fst.fst, p.snd.snd - p.snd.fst))\n    (comap ee (𝓝 (x₀, x₀)) ×ˢ comap ff (𝓝 (y₀, y₀))) (𝓝 0)\nW : Set G\nW_nhd : W ∈ 𝓝 0\nW4 : ∀ {v w s t : G}, v ∈ W → w ∈ W → s ∈ W → t ∈ W → v + w + s + t ∈ W'\nU₁ : Set β\nU₁_nhd : U₁ ∈ comap (↑e) (𝓝 x₀)\nV₁ : Set δ\nV₁_nhd : V₁ ∈ comap (↑f) (𝓝 y₀)\nH :\n  ∀ (x : β),\n    x ∈ U₁ →\n      ∀ (x' : β), x' ∈ U₁ → ∀ (y : δ), y ∈ V₁ → ∀ (y' : δ), y' ∈ V₁ → (fun p => ↑(↑φ p.fst) p.snd) (x' - x, y' - y) ∈ W\nx₁ : β\nx₁_in : x₁ ∈ U₁\ny₁ : δ\ny₁_in : y₁ ∈ V₁\ncont_flip : Continuous fun p => ↑(↑(AddMonoidHom.flip φ) p.fst) p.snd\nU₂ : Set β\nU₂_nhd : U₂ ∈ comap (↑e) (𝓝 x₀)\nHU : ∀ (x : β), x ∈ U₂ → ∀ (x' : β), x' ∈ U₂ → (fun p => ↑(↑φ p.fst) p.snd) (x' - x, y₁) ∈ W\nV₂ : Set δ\nV₂_nhd : V₂ ∈ comap (↑f) (𝓝 y₀)\nHV : ∀ (x : δ), x ∈ V₂ → ∀ (x' : δ), x' ∈ V₂ → (fun p => ↑(↑(AddMonoidHom.flip φ) p.fst) p.snd) (x' - x, x₁) ∈ W\nx : β\nxU₁ : x ∈ U₁\nxU₂ : x ∈ U₂\nx' : β\nx'U₁ : x' ∈ U₁\nx'U₂ : x' ∈ U₂\ny : δ\nyV₁ : y ∈ V₁\nyV₂ : y ∈ V₂\ny' : δ\ny'V₁ : y' ∈ V₁\ny'V₂ : y' ∈ V₂\n⊢ ↑(↑φ x') y' - ↑(↑φ x) y =\n    ↑(↑φ x') y' - ↑(↑φ x) y' + (↑(↑φ x₁) y' - ↑(↑φ x₁) y) + (↑(↑φ x) y' - ↑(↑φ x₁) y' - (↑(↑φ x) y - ↑(↑φ x₁) y))\n[PROOFSTEP]\nabel\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nG : Type u_5\ninst✝¹⁶ : TopologicalSpace α\ninst✝¹⁵ : AddCommGroup α\ninst✝¹⁴ : TopologicalAddGroup α\ninst✝¹³ : TopologicalSpace β\ninst✝¹² : AddCommGroup β\ninst✝¹¹ : TopologicalAddGroup β\ninst✝¹⁰ : TopologicalSpace γ\ninst✝⁹ : AddCommGroup γ\ninst✝⁸ : TopologicalAddGroup γ\ninst✝⁷ : TopologicalSpace δ\ninst✝⁶ : AddCommGroup δ\ninst✝⁵ : TopologicalAddGroup δ\ninst✝⁴ : UniformSpace G\ninst✝³ : AddCommGroup G\ninst✝² : UniformAddGroup G\ninst✝¹ : SeparatedSpace G\ninst✝ : CompleteSpace G\ne : β →+ α\nde : DenseInducing ↑e\nf : δ →+ γ\ndf : DenseInducing ↑f\nφ : β →+ δ →+ G\nhφ : Continuous fun p => ↑(↑φ p.fst) p.snd\nW' : Set G\nW'_nhd : W' ∈ 𝓝 0\nx₀ : α\ny₀ : γ\nee : (u : β × β) → (fun x => α) u.fst × (fun x => α) u.snd := fun u => (↑e u.fst, ↑e u.snd)\nff : (u : δ × δ) → (fun x => γ) u.fst × (fun x => γ) u.snd := fun u => (↑f u.fst, ↑f u.snd)\nlim_φ : Tendsto (fun p => ↑(↑φ p.fst) p.snd) (𝓝 (0, 0)) (𝓝 0)\nlim_φ_sub_sub :\n  Tendsto (fun p => (fun p => ↑(↑φ p.fst) p.snd) (p.fst.snd - p.fst.fst, p.snd.snd - p.snd.fst))\n    (comap ee (𝓝 (x₀, x₀)) ×ˢ comap ff (𝓝 (y₀, y₀))) (𝓝 0)\nW : Set G\nW_nhd : W ∈ 𝓝 0\nW4 : ∀ {v w s t : G}, v ∈ W → w ∈ W → s ∈ W → t ∈ W → v + w + s + t ∈ W'\nU₁ : Set β\nU₁_nhd : U₁ ∈ comap (↑e) (𝓝 x₀)\nV₁ : Set δ\nV₁_nhd : V₁ ∈ comap (↑f) (𝓝 y₀)\nH :\n  ∀ (x : β),\n    x ∈ U₁ →\n      ∀ (x' : β), x' ∈ U₁ → ∀ (y : δ), y ∈ V₁ → ∀ (y' : δ), y' ∈ V₁ → (fun p => ↑(↑φ p.fst) p.snd) (x' - x, y' - y) ∈ W\nx₁ : β\nx₁_in : x₁ ∈ U₁\ny₁ : δ\ny₁_in : y₁ ∈ V₁\ncont_flip : Continuous fun p => ↑(↑(AddMonoidHom.flip φ) p.fst) p.snd\nU₂ : Set β\nU₂_nhd : U₂ ∈ comap (↑e) (𝓝 x₀)\nHU : ∀ (x : β), x ∈ U₂ → ∀ (x' : β), x' ∈ U₂ → (fun p => ↑(↑φ p.fst) p.snd) (x' - x, y₁) ∈ W\nV₂ : Set δ\nV₂_nhd : V₂ ∈ comap (↑f) (𝓝 y₀)\nHV : ∀ (x : δ), x ∈ V₂ → ∀ (x' : δ), x' ∈ V₂ → (fun p => ↑(↑(AddMonoidHom.flip φ) p.fst) p.snd) (x' - x, x₁) ∈ W\nx : β\nxU₁ : x ∈ U₁\nxU₂ : x ∈ U₂\nx' : β\nx'U₁ : x' ∈ U₁\nx'U₂ : x' ∈ U₂\ny : δ\nyV₁ : y ∈ V₁\nyV₂ : y ∈ V₂\ny' : δ\ny'V₁ : y' ∈ V₁\ny'V₂ : y' ∈ V₂\n⊢ ↑(↑φ x') y' - ↑(↑φ x) y =\n    ↑(↑φ x') y' - ↑(↑φ x) y' + (↑(↑φ x₁) y' - ↑(↑φ x₁) y) + (↑(↑φ x) y' - ↑(↑φ x₁) y' - (↑(↑φ x) y - ↑(↑φ x₁) y))\n[PROOFSTEP]\nabel\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nG : Type u_5\ninst✝¹⁶ : TopologicalSpace α\ninst✝¹⁵ : AddCommGroup α\ninst✝¹⁴ : TopologicalAddGroup α\ninst✝¹³ : TopologicalSpace β\ninst✝¹² : AddCommGroup β\ninst✝¹¹ : TopologicalAddGroup β\ninst✝¹⁰ : TopologicalSpace γ\ninst✝⁹ : AddCommGroup γ\ninst✝⁸ : TopologicalAddGroup γ\ninst✝⁷ : TopologicalSpace δ\ninst✝⁶ : AddCommGroup δ\ninst✝⁵ : TopologicalAddGroup δ\ninst✝⁴ : UniformSpace G\ninst✝³ : AddCommGroup G\ninst✝² : UniformAddGroup G\ninst✝¹ : SeparatedSpace G\ninst✝ : CompleteSpace G\ne : β →+ α\nde : DenseInducing ↑e\nf : δ →+ γ\ndf : DenseInducing ↑f\nφ : β →+ δ →+ G\nhφ : Continuous fun p => ↑(↑φ p.fst) p.snd\nW' : Set G\nW'_nhd : W' ∈ 𝓝 0\nx₀ : α\ny₀ : γ\nee : (u : β × β) → (fun x => α) u.fst × (fun x => α) u.snd := fun u => (↑e u.fst, ↑e u.snd)\nff : (u : δ × δ) → (fun x => γ) u.fst × (fun x => γ) u.snd := fun u => (↑f u.fst, ↑f u.snd)\nlim_φ : Tendsto (fun p => ↑(↑φ p.fst) p.snd) (𝓝 (0, 0)) (𝓝 0)\nlim_φ_sub_sub :\n  Tendsto (fun p => (fun p => ↑(↑φ p.fst) p.snd) (p.fst.snd - p.fst.fst, p.snd.snd - p.snd.fst))\n    (comap ee (𝓝 (x₀, x₀)) ×ˢ comap ff (𝓝 (y₀, y₀))) (𝓝 0)\nW : Set G\nW_nhd : W ∈ 𝓝 0\nW4 : ∀ {v w s t : G}, v ∈ W → w ∈ W → s ∈ W → t ∈ W → v + w + s + t ∈ W'\nU₁ : Set β\nU₁_nhd : U₁ ∈ comap (↑e) (𝓝 x₀)\nV₁ : Set δ\nV₁_nhd : V₁ ∈ comap (↑f) (𝓝 y₀)\nH :\n  ∀ (x : β),\n    x ∈ U₁ →\n      ∀ (x' : β), x' ∈ U₁ → ∀ (y : δ), y ∈ V₁ → ∀ (y' : δ), y' ∈ V₁ → (fun p => ↑(↑φ p.fst) p.snd) (x' - x, y' - y) ∈ W\nx₁ : β\nx₁_in : x₁ ∈ U₁\ny₁ : δ\ny₁_in : y₁ ∈ V₁\ncont_flip : Continuous fun p => ↑(↑(AddMonoidHom.flip φ) p.fst) p.snd\nU₂ : Set β\nU₂_nhd : U₂ ∈ comap (↑e) (𝓝 x₀)\nHU : ∀ (x : β), x ∈ U₂ → ∀ (x' : β), x' ∈ U₂ → (fun p => ↑(↑φ p.fst) p.snd) (x' - x, y₁) ∈ W\nV₂ : Set δ\nV₂_nhd : V₂ ∈ comap (↑f) (𝓝 y₀)\nHV : ∀ (x : δ), x ∈ V₂ → ∀ (x' : δ), x' ∈ V₂ → (fun p => ↑(↑(AddMonoidHom.flip φ) p.fst) p.snd) (x' - x, x₁) ∈ W\nx : β\nxU₁ : x ∈ U₁\nxU₂ : x ∈ U₂\nx' : β\nx'U₁ : x' ∈ U₁\nx'U₂ : x' ∈ U₂\ny : δ\nyV₁ : y ∈ V₁\nyV₂ : y ∈ V₂\ny' : δ\ny'V₁ : y' ∈ V₁\ny'V₂ : y' ∈ V₂\nkey_formula :\n  ↑(↑φ x') y' - ↑(↑φ x) y = ↑(↑φ (x' - x)) y₁ + ↑(↑φ (x' - x)) (y' - y₁) + ↑(↑φ x₁) (y' - y) + ↑(↑φ (x - x₁)) (y' - y)\n⊢ (fun p => ↑(↑φ p.fst) p.snd) (x', y') - (fun p => ↑(↑φ p.fst) p.snd) (x, y) ∈ W'\n[PROOFSTEP]\nrw [key_formula]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nG : Type u_5\ninst✝¹⁶ : TopologicalSpace α\ninst✝¹⁵ : AddCommGroup α\ninst✝¹⁴ : TopologicalAddGroup α\ninst✝¹³ : TopologicalSpace β\ninst✝¹² : AddCommGroup β\ninst✝¹¹ : TopologicalAddGroup β\ninst✝¹⁰ : TopologicalSpace γ\ninst✝⁹ : AddCommGroup γ\ninst✝⁸ : TopologicalAddGroup γ\ninst✝⁷ : TopologicalSpace δ\ninst✝⁶ : AddCommGroup δ\ninst✝⁵ : TopologicalAddGroup δ\ninst✝⁴ : UniformSpace G\ninst✝³ : AddCommGroup G\ninst✝² : UniformAddGroup G\ninst✝¹ : SeparatedSpace G\ninst✝ : CompleteSpace G\ne : β →+ α\nde : DenseInducing ↑e\nf : δ →+ γ\ndf : DenseInducing ↑f\nφ : β →+ δ →+ G\nhφ : Continuous fun p => ↑(↑φ p.fst) p.snd\nW' : Set G\nW'_nhd : W' ∈ 𝓝 0\nx₀ : α\ny₀ : γ\nee : (u : β × β) → (fun x => α) u.fst × (fun x => α) u.snd := fun u => (↑e u.fst, ↑e u.snd)\nff : (u : δ × δ) → (fun x => γ) u.fst × (fun x => γ) u.snd := fun u => (↑f u.fst, ↑f u.snd)\nlim_φ : Tendsto (fun p => ↑(↑φ p.fst) p.snd) (𝓝 (0, 0)) (𝓝 0)\nlim_φ_sub_sub :\n  Tendsto (fun p => (fun p => ↑(↑φ p.fst) p.snd) (p.fst.snd - p.fst.fst, p.snd.snd - p.snd.fst))\n    (comap ee (𝓝 (x₀, x₀)) ×ˢ comap ff (𝓝 (y₀, y₀))) (𝓝 0)\nW : Set G\nW_nhd : W ∈ 𝓝 0\nW4 : ∀ {v w s t : G}, v ∈ W → w ∈ W → s ∈ W → t ∈ W → v + w + s + t ∈ W'\nU₁ : Set β\nU₁_nhd : U₁ ∈ comap (↑e) (𝓝 x₀)\nV₁ : Set δ\nV₁_nhd : V₁ ∈ comap (↑f) (𝓝 y₀)\nH :\n  ∀ (x : β),\n    x ∈ U₁ →\n      ∀ (x' : β), x' ∈ U₁ → ∀ (y : δ), y ∈ V₁ → ∀ (y' : δ), y' ∈ V₁ → (fun p => ↑(↑φ p.fst) p.snd) (x' - x, y' - y) ∈ W\nx₁ : β\nx₁_in : x₁ ∈ U₁\ny₁ : δ\ny₁_in : y₁ ∈ V₁\ncont_flip : Continuous fun p => ↑(↑(AddMonoidHom.flip φ) p.fst) p.snd\nU₂ : Set β\nU₂_nhd : U₂ ∈ comap (↑e) (𝓝 x₀)\nHU : ∀ (x : β), x ∈ U₂ → ∀ (x' : β), x' ∈ U₂ → (fun p => ↑(↑φ p.fst) p.snd) (x' - x, y₁) ∈ W\nV₂ : Set δ\nV₂_nhd : V₂ ∈ comap (↑f) (𝓝 y₀)\nHV : ∀ (x : δ), x ∈ V₂ → ∀ (x' : δ), x' ∈ V₂ → (fun p => ↑(↑(AddMonoidHom.flip φ) p.fst) p.snd) (x' - x, x₁) ∈ W\nx : β\nxU₁ : x ∈ U₁\nxU₂ : x ∈ U₂\nx' : β\nx'U₁ : x' ∈ U₁\nx'U₂ : x' ∈ U₂\ny : δ\nyV₁ : y ∈ V₁\nyV₂ : y ∈ V₂\ny' : δ\ny'V₁ : y' ∈ V₁\ny'V₂ : y' ∈ V₂\nkey_formula :\n  ↑(↑φ x') y' - ↑(↑φ x) y = ↑(↑φ (x' - x)) y₁ + ↑(↑φ (x' - x)) (y' - y₁) + ↑(↑φ x₁) (y' - y) + ↑(↑φ (x - x₁)) (y' - y)\n⊢ ↑(↑φ (x' - x)) y₁ + ↑(↑φ (x' - x)) (y' - y₁) + ↑(↑φ x₁) (y' - y) + ↑(↑φ (x - x₁)) (y' - y) ∈ W'\n[PROOFSTEP]\nhave h₁ := HU x xU₂ x' x'U₂\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nG : Type u_5\ninst✝¹⁶ : TopologicalSpace α\ninst✝¹⁵ : AddCommGroup α\ninst✝¹⁴ : TopologicalAddGroup α\ninst✝¹³ : TopologicalSpace β\ninst✝¹² : AddCommGroup β\ninst✝¹¹ : TopologicalAddGroup β\ninst✝¹⁰ : TopologicalSpace γ\ninst✝⁹ : AddCommGroup γ\ninst✝⁸ : TopologicalAddGroup γ\ninst✝⁷ : TopologicalSpace δ\ninst✝⁶ : AddCommGroup δ\ninst✝⁵ : TopologicalAddGroup δ\ninst✝⁴ : UniformSpace G\ninst✝³ : AddCommGroup G\ninst✝² : UniformAddGroup G\ninst✝¹ : SeparatedSpace G\ninst✝ : CompleteSpace G\ne : β →+ α\nde : DenseInducing ↑e\nf : δ →+ γ\ndf : DenseInducing ↑f\nφ : β →+ δ →+ G\nhφ : Continuous fun p => ↑(↑φ p.fst) p.snd\nW' : Set G\nW'_nhd : W' ∈ 𝓝 0\nx₀ : α\ny₀ : γ\nee : (u : β × β) → (fun x => α) u.fst × (fun x => α) u.snd := fun u => (↑e u.fst, ↑e u.snd)\nff : (u : δ × δ) → (fun x => γ) u.fst × (fun x => γ) u.snd := fun u => (↑f u.fst, ↑f u.snd)\nlim_φ : Tendsto (fun p => ↑(↑φ p.fst) p.snd) (𝓝 (0, 0)) (𝓝 0)\nlim_φ_sub_sub :\n  Tendsto (fun p => (fun p => ↑(↑φ p.fst) p.snd) (p.fst.snd - p.fst.fst, p.snd.snd - p.snd.fst))\n    (comap ee (𝓝 (x₀, x₀)) ×ˢ comap ff (𝓝 (y₀, y₀))) (𝓝 0)\nW : Set G\nW_nhd : W ∈ 𝓝 0\nW4 : ∀ {v w s t : G}, v ∈ W → w ∈ W → s ∈ W → t ∈ W → v + w + s + t ∈ W'\nU₁ : Set β\nU₁_nhd : U₁ ∈ comap (↑e) (𝓝 x₀)\nV₁ : Set δ\nV₁_nhd : V₁ ∈ comap (↑f) (𝓝 y₀)\nH :\n  ∀ (x : β),\n    x ∈ U₁ →\n      ∀ (x' : β), x' ∈ U₁ → ∀ (y : δ), y ∈ V₁ → ∀ (y' : δ), y' ∈ V₁ → (fun p => ↑(↑φ p.fst) p.snd) (x' - x, y' - y) ∈ W\nx₁ : β\nx₁_in : x₁ ∈ U₁\ny₁ : δ\ny₁_in : y₁ ∈ V₁\ncont_flip : Continuous fun p => ↑(↑(AddMonoidHom.flip φ) p.fst) p.snd\nU₂ : Set β\nU₂_nhd : U₂ ∈ comap (↑e) (𝓝 x₀)\nHU : ∀ (x : β), x ∈ U₂ → ∀ (x' : β), x' ∈ U₂ → (fun p => ↑(↑φ p.fst) p.snd) (x' - x, y₁) ∈ W\nV₂ : Set δ\nV₂_nhd : V₂ ∈ comap (↑f) (𝓝 y₀)\nHV : ∀ (x : δ), x ∈ V₂ → ∀ (x' : δ), x' ∈ V₂ → (fun p => ↑(↑(AddMonoidHom.flip φ) p.fst) p.snd) (x' - x, x₁) ∈ W\nx : β\nxU₁ : x ∈ U₁\nxU₂ : x ∈ U₂\nx' : β\nx'U₁ : x' ∈ U₁\nx'U₂ : x' ∈ U₂\ny : δ\nyV₁ : y ∈ V₁\nyV₂ : y ∈ V₂\ny' : δ\ny'V₁ : y' ∈ V₁\ny'V₂ : y' ∈ V₂\nkey_formula :\n  ↑(↑φ x') y' - ↑(↑φ x) y = ↑(↑φ (x' - x)) y₁ + ↑(↑φ (x' - x)) (y' - y₁) + ↑(↑φ x₁) (y' - y) + ↑(↑φ (x - x₁)) (y' - y)\nh₁ : (fun p => ↑(↑φ p.fst) p.snd) (x' - x, y₁) ∈ W\n⊢ ↑(↑φ (x' - x)) y₁ + ↑(↑φ (x' - x)) (y' - y₁) + ↑(↑φ x₁) (y' - y) + ↑(↑φ (x - x₁)) (y' - y) ∈ W'\n[PROOFSTEP]\nhave h₂ := H x xU₁ x' x'U₁ y₁ y₁_in y' y'V₁\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nG : Type u_5\ninst✝¹⁶ : TopologicalSpace α\ninst✝¹⁵ : AddCommGroup α\ninst✝¹⁴ : TopologicalAddGroup α\ninst✝¹³ : TopologicalSpace β\ninst✝¹² : AddCommGroup β\ninst✝¹¹ : TopologicalAddGroup β\ninst✝¹⁰ : TopologicalSpace γ\ninst✝⁹ : AddCommGroup γ\ninst✝⁸ : TopologicalAddGroup γ\ninst✝⁷ : TopologicalSpace δ\ninst✝⁶ : AddCommGroup δ\ninst✝⁵ : TopologicalAddGroup δ\ninst✝⁴ : UniformSpace G\ninst✝³ : AddCommGroup G\ninst✝² : UniformAddGroup G\ninst✝¹ : SeparatedSpace G\ninst✝ : CompleteSpace G\ne : β →+ α\nde : DenseInducing ↑e\nf : δ →+ γ\ndf : DenseInducing ↑f\nφ : β →+ δ →+ G\nhφ : Continuous fun p => ↑(↑φ p.fst) p.snd\nW' : Set G\nW'_nhd : W' ∈ 𝓝 0\nx₀ : α\ny₀ : γ\nee : (u : β × β) → (fun x => α) u.fst × (fun x => α) u.snd := fun u => (↑e u.fst, ↑e u.snd)\nff : (u : δ × δ) → (fun x => γ) u.fst × (fun x => γ) u.snd := fun u => (↑f u.fst, ↑f u.snd)\nlim_φ : Tendsto (fun p => ↑(↑φ p.fst) p.snd) (𝓝 (0, 0)) (𝓝 0)\nlim_φ_sub_sub :\n  Tendsto (fun p => (fun p => ↑(↑φ p.fst) p.snd) (p.fst.snd - p.fst.fst, p.snd.snd - p.snd.fst))\n    (comap ee (𝓝 (x₀, x₀)) ×ˢ comap ff (𝓝 (y₀, y₀))) (𝓝 0)\nW : Set G\nW_nhd : W ∈ 𝓝 0\nW4 : ∀ {v w s t : G}, v ∈ W → w ∈ W → s ∈ W → t ∈ W → v + w + s + t ∈ W'\nU₁ : Set β\nU₁_nhd : U₁ ∈ comap (↑e) (𝓝 x₀)\nV₁ : Set δ\nV₁_nhd : V₁ ∈ comap (↑f) (𝓝 y₀)\nH :\n  ∀ (x : β),\n    x ∈ U₁ →\n      ∀ (x' : β), x' ∈ U₁ → ∀ (y : δ), y ∈ V₁ → ∀ (y' : δ), y' ∈ V₁ → (fun p => ↑(↑φ p.fst) p.snd) (x' - x, y' - y) ∈ W\nx₁ : β\nx₁_in : x₁ ∈ U₁\ny₁ : δ\ny₁_in : y₁ ∈ V₁\ncont_flip : Continuous fun p => ↑(↑(AddMonoidHom.flip φ) p.fst) p.snd\nU₂ : Set β\nU₂_nhd : U₂ ∈ comap (↑e) (𝓝 x₀)\nHU : ∀ (x : β), x ∈ U₂ → ∀ (x' : β), x' ∈ U₂ → (fun p => ↑(↑φ p.fst) p.snd) (x' - x, y₁) ∈ W\nV₂ : Set δ\nV₂_nhd : V₂ ∈ comap (↑f) (𝓝 y₀)\nHV : ∀ (x : δ), x ∈ V₂ → ∀ (x' : δ), x' ∈ V₂ → (fun p => ↑(↑(AddMonoidHom.flip φ) p.fst) p.snd) (x' - x, x₁) ∈ W\nx : β\nxU₁ : x ∈ U₁\nxU₂ : x ∈ U₂\nx' : β\nx'U₁ : x' ∈ U₁\nx'U₂ : x' ∈ U₂\ny : δ\nyV₁ : y ∈ V₁\nyV₂ : y ∈ V₂\ny' : δ\ny'V₁ : y' ∈ V₁\ny'V₂ : y' ∈ V₂\nkey_formula :\n  ↑(↑φ x') y' - ↑(↑φ x) y = ↑(↑φ (x' - x)) y₁ + ↑(↑φ (x' - x)) (y' - y₁) + ↑(↑φ x₁) (y' - y) + ↑(↑φ (x - x₁)) (y' - y)\nh₁ : (fun p => ↑(↑φ p.fst) p.snd) (x' - x, y₁) ∈ W\nh₂ : (fun p => ↑(↑φ p.fst) p.snd) (x' - x, y' - y₁) ∈ W\n⊢ ↑(↑φ (x' - x)) y₁ + ↑(↑φ (x' - x)) (y' - y₁) + ↑(↑φ x₁) (y' - y) + ↑(↑φ (x - x₁)) (y' - y) ∈ W'\n[PROOFSTEP]\nhave h₃ := HV y yV₂ y' y'V₂\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nG : Type u_5\ninst✝¹⁶ : TopologicalSpace α\ninst✝¹⁵ : AddCommGroup α\ninst✝¹⁴ : TopologicalAddGroup α\ninst✝¹³ : TopologicalSpace β\ninst✝¹² : AddCommGroup β\ninst✝¹¹ : TopologicalAddGroup β\ninst✝¹⁰ : TopologicalSpace γ\ninst✝⁹ : AddCommGroup γ\ninst✝⁸ : TopologicalAddGroup γ\ninst✝⁷ : TopologicalSpace δ\ninst✝⁶ : AddCommGroup δ\ninst✝⁵ : TopologicalAddGroup δ\ninst✝⁴ : UniformSpace G\ninst✝³ : AddCommGroup G\ninst✝² : UniformAddGroup G\ninst✝¹ : SeparatedSpace G\ninst✝ : CompleteSpace G\ne : β →+ α\nde : DenseInducing ↑e\nf : δ →+ γ\ndf : DenseInducing ↑f\nφ : β →+ δ →+ G\nhφ : Continuous fun p => ↑(↑φ p.fst) p.snd\nW' : Set G\nW'_nhd : W' ∈ 𝓝 0\nx₀ : α\ny₀ : γ\nee : (u : β × β) → (fun x => α) u.fst × (fun x => α) u.snd := fun u => (↑e u.fst, ↑e u.snd)\nff : (u : δ × δ) → (fun x => γ) u.fst × (fun x => γ) u.snd := fun u => (↑f u.fst, ↑f u.snd)\nlim_φ : Tendsto (fun p => ↑(↑φ p.fst) p.snd) (𝓝 (0, 0)) (𝓝 0)\nlim_φ_sub_sub :\n  Tendsto (fun p => (fun p => ↑(↑φ p.fst) p.snd) (p.fst.snd - p.fst.fst, p.snd.snd - p.snd.fst))\n    (comap ee (𝓝 (x₀, x₀)) ×ˢ comap ff (𝓝 (y₀, y₀))) (𝓝 0)\nW : Set G\nW_nhd : W ∈ 𝓝 0\nW4 : ∀ {v w s t : G}, v ∈ W → w ∈ W → s ∈ W → t ∈ W → v + w + s + t ∈ W'\nU₁ : Set β\nU₁_nhd : U₁ ∈ comap (↑e) (𝓝 x₀)\nV₁ : Set δ\nV₁_nhd : V₁ ∈ comap (↑f) (𝓝 y₀)\nH :\n  ∀ (x : β),\n    x ∈ U₁ →\n      ∀ (x' : β), x' ∈ U₁ → ∀ (y : δ), y ∈ V₁ → ∀ (y' : δ), y' ∈ V₁ → (fun p => ↑(↑φ p.fst) p.snd) (x' - x, y' - y) ∈ W\nx₁ : β\nx₁_in : x₁ ∈ U₁\ny₁ : δ\ny₁_in : y₁ ∈ V₁\ncont_flip : Continuous fun p => ↑(↑(AddMonoidHom.flip φ) p.fst) p.snd\nU₂ : Set β\nU₂_nhd : U₂ ∈ comap (↑e) (𝓝 x₀)\nHU : ∀ (x : β), x ∈ U₂ → ∀ (x' : β), x' ∈ U₂ → (fun p => ↑(↑φ p.fst) p.snd) (x' - x, y₁) ∈ W\nV₂ : Set δ\nV₂_nhd : V₂ ∈ comap (↑f) (𝓝 y₀)\nHV : ∀ (x : δ), x ∈ V₂ → ∀ (x' : δ), x' ∈ V₂ → (fun p => ↑(↑(AddMonoidHom.flip φ) p.fst) p.snd) (x' - x, x₁) ∈ W\nx : β\nxU₁ : x ∈ U₁\nxU₂ : x ∈ U₂\nx' : β\nx'U₁ : x' ∈ U₁\nx'U₂ : x' ∈ U₂\ny : δ\nyV₁ : y ∈ V₁\nyV₂ : y ∈ V₂\ny' : δ\ny'V₁ : y' ∈ V₁\ny'V₂ : y' ∈ V₂\nkey_formula :\n  ↑(↑φ x') y' - ↑(↑φ x) y = ↑(↑φ (x' - x)) y₁ + ↑(↑φ (x' - x)) (y' - y₁) + ↑(↑φ x₁) (y' - y) + ↑(↑φ (x - x₁)) (y' - y)\nh₁ : (fun p => ↑(↑φ p.fst) p.snd) (x' - x, y₁) ∈ W\nh₂ : (fun p => ↑(↑φ p.fst) p.snd) (x' - x, y' - y₁) ∈ W\nh₃ : (fun p => ↑(↑(AddMonoidHom.flip φ) p.fst) p.snd) (y' - y, x₁) ∈ W\n⊢ ↑(↑φ (x' - x)) y₁ + ↑(↑φ (x' - x)) (y' - y₁) + ↑(↑φ x₁) (y' - y) + ↑(↑φ (x - x₁)) (y' - y) ∈ W'\n[PROOFSTEP]\nhave h₄ := H x₁ x₁_in x xU₁ y yV₁ y' y'V₁\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nG : Type u_5\ninst✝¹⁶ : TopologicalSpace α\ninst✝¹⁵ : AddCommGroup α\ninst✝¹⁴ : TopologicalAddGroup α\ninst✝¹³ : TopologicalSpace β\ninst✝¹² : AddCommGroup β\ninst✝¹¹ : TopologicalAddGroup β\ninst✝¹⁰ : TopologicalSpace γ\ninst✝⁹ : AddCommGroup γ\ninst✝⁸ : TopologicalAddGroup γ\ninst✝⁷ : TopologicalSpace δ\ninst✝⁶ : AddCommGroup δ\ninst✝⁵ : TopologicalAddGroup δ\ninst✝⁴ : UniformSpace G\ninst✝³ : AddCommGroup G\ninst✝² : UniformAddGroup G\ninst✝¹ : SeparatedSpace G\ninst✝ : CompleteSpace G\ne : β →+ α\nde : DenseInducing ↑e\nf : δ →+ γ\ndf : DenseInducing ↑f\nφ : β →+ δ →+ G\nhφ : Continuous fun p => ↑(↑φ p.fst) p.snd\nW' : Set G\nW'_nhd : W' ∈ 𝓝 0\nx₀ : α\ny₀ : γ\nee : (u : β × β) → (fun x => α) u.fst × (fun x => α) u.snd := fun u => (↑e u.fst, ↑e u.snd)\nff : (u : δ × δ) → (fun x => γ) u.fst × (fun x => γ) u.snd := fun u => (↑f u.fst, ↑f u.snd)\nlim_φ : Tendsto (fun p => ↑(↑φ p.fst) p.snd) (𝓝 (0, 0)) (𝓝 0)\nlim_φ_sub_sub :\n  Tendsto (fun p => (fun p => ↑(↑φ p.fst) p.snd) (p.fst.snd - p.fst.fst, p.snd.snd - p.snd.fst))\n    (comap ee (𝓝 (x₀, x₀)) ×ˢ comap ff (𝓝 (y₀, y₀))) (𝓝 0)\nW : Set G\nW_nhd : W ∈ 𝓝 0\nW4 : ∀ {v w s t : G}, v ∈ W → w ∈ W → s ∈ W → t ∈ W → v + w + s + t ∈ W'\nU₁ : Set β\nU₁_nhd : U₁ ∈ comap (↑e) (𝓝 x₀)\nV₁ : Set δ\nV₁_nhd : V₁ ∈ comap (↑f) (𝓝 y₀)\nH :\n  ∀ (x : β),\n    x ∈ U₁ →\n      ∀ (x' : β), x' ∈ U₁ → ∀ (y : δ), y ∈ V₁ → ∀ (y' : δ), y' ∈ V₁ → (fun p => ↑(↑φ p.fst) p.snd) (x' - x, y' - y) ∈ W\nx₁ : β\nx₁_in : x₁ ∈ U₁\ny₁ : δ\ny₁_in : y₁ ∈ V₁\ncont_flip : Continuous fun p => ↑(↑(AddMonoidHom.flip φ) p.fst) p.snd\nU₂ : Set β\nU₂_nhd : U₂ ∈ comap (↑e) (𝓝 x₀)\nHU : ∀ (x : β), x ∈ U₂ → ∀ (x' : β), x' ∈ U₂ → (fun p => ↑(↑φ p.fst) p.snd) (x' - x, y₁) ∈ W\nV₂ : Set δ\nV₂_nhd : V₂ ∈ comap (↑f) (𝓝 y₀)\nHV : ∀ (x : δ), x ∈ V₂ → ∀ (x' : δ), x' ∈ V₂ → (fun p => ↑(↑(AddMonoidHom.flip φ) p.fst) p.snd) (x' - x, x₁) ∈ W\nx : β\nxU₁ : x ∈ U₁\nxU₂ : x ∈ U₂\nx' : β\nx'U₁ : x' ∈ U₁\nx'U₂ : x' ∈ U₂\ny : δ\nyV₁ : y ∈ V₁\nyV₂ : y ∈ V₂\ny' : δ\ny'V₁ : y' ∈ V₁\ny'V₂ : y' ∈ V₂\nkey_formula :\n  ↑(↑φ x') y' - ↑(↑φ x) y = ↑(↑φ (x' - x)) y₁ + ↑(↑φ (x' - x)) (y' - y₁) + ↑(↑φ x₁) (y' - y) + ↑(↑φ (x - x₁)) (y' - y)\nh₁ : (fun p => ↑(↑φ p.fst) p.snd) (x' - x, y₁) ∈ W\nh₂ : (fun p => ↑(↑φ p.fst) p.snd) (x' - x, y' - y₁) ∈ W\nh₃ : (fun p => ↑(↑(AddMonoidHom.flip φ) p.fst) p.snd) (y' - y, x₁) ∈ W\nh₄ : (fun p => ↑(↑φ p.fst) p.snd) (x - x₁, y' - y) ∈ W\n⊢ ↑(↑φ (x' - x)) y₁ + ↑(↑φ (x' - x)) (y' - y₁) + ↑(↑φ x₁) (y' - y) + ↑(↑φ (x - x₁)) (y' - y) ∈ W'\n[PROOFSTEP]\nexact W4 h₁ h₂ h₃ h₄\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nG : Type u_5\ninst✝¹⁶ : TopologicalSpace α\ninst✝¹⁵ : AddCommGroup α\ninst✝¹⁴ : TopologicalAddGroup α\ninst✝¹³ : TopologicalSpace β\ninst✝¹² : AddCommGroup β\ninst✝¹¹ : TopologicalAddGroup β\ninst✝¹⁰ : TopologicalSpace γ\ninst✝⁹ : AddCommGroup γ\ninst✝⁸ : TopologicalAddGroup γ\ninst✝⁷ : TopologicalSpace δ\ninst✝⁶ : AddCommGroup δ\ninst✝⁵ : TopologicalAddGroup δ\ninst✝⁴ : UniformSpace G\ninst✝³ : AddCommGroup G\ninst✝² : UniformAddGroup G\ninst✝¹ : SeparatedSpace G\ninst✝ : CompleteSpace G\ne : β →+ α\nde : DenseInducing ↑e\nf : δ →+ γ\ndf : DenseInducing ↑f\nφ : β →+ δ →+ G\nhφ : Continuous fun p => ↑(↑φ p.fst) p.snd\nW' : Set G\nW'_nhd : W' ∈ 𝓝 0\n⊢ Continuous (extend (_ : DenseInducing fun p => (↑e p.fst, ↑f p.snd)) fun p => ↑(↑φ p.fst) p.snd)\n[PROOFSTEP]\nrefine' continuous_extend_of_cauchy _ _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nG : Type u_5\ninst✝¹⁶ : TopologicalSpace α\ninst✝¹⁵ : AddCommGroup α\ninst✝¹⁴ : TopologicalAddGroup α\ninst✝¹³ : TopologicalSpace β\ninst✝¹² : AddCommGroup β\ninst✝¹¹ : TopologicalAddGroup β\ninst✝¹⁰ : TopologicalSpace γ\ninst✝⁹ : AddCommGroup γ\ninst✝⁸ : TopologicalAddGroup γ\ninst✝⁷ : TopologicalSpace δ\ninst✝⁶ : AddCommGroup δ\ninst✝⁵ : TopologicalAddGroup δ\ninst✝⁴ : UniformSpace G\ninst✝³ : AddCommGroup G\ninst✝² : UniformAddGroup G\ninst✝¹ : SeparatedSpace G\ninst✝ : CompleteSpace G\ne : β →+ α\nde : DenseInducing ↑e\nf : δ →+ γ\ndf : DenseInducing ↑f\nφ : β →+ δ →+ G\nhφ : Continuous fun p => ↑(↑φ p.fst) p.snd\nW' : Set G\nW'_nhd : W' ∈ 𝓝 0\n⊢ ∀ (b : α × γ), Cauchy (map (fun p => ↑(↑φ p.fst) p.snd) (comap (fun p => (↑e p.fst, ↑f p.snd)) (𝓝 b)))\n[PROOFSTEP]\nrintro ⟨x₀, y₀⟩\n[GOAL]\ncase mk\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nG : Type u_5\ninst✝¹⁶ : TopologicalSpace α\ninst✝¹⁵ : AddCommGroup α\ninst✝¹⁴ : TopologicalAddGroup α\ninst✝¹³ : TopologicalSpace β\ninst✝¹² : AddCommGroup β\ninst✝¹¹ : TopologicalAddGroup β\ninst✝¹⁰ : TopologicalSpace γ\ninst✝⁹ : AddCommGroup γ\ninst✝⁸ : TopologicalAddGroup γ\ninst✝⁷ : TopologicalSpace δ\ninst✝⁶ : AddCommGroup δ\ninst✝⁵ : TopologicalAddGroup δ\ninst✝⁴ : UniformSpace G\ninst✝³ : AddCommGroup G\ninst✝² : UniformAddGroup G\ninst✝¹ : SeparatedSpace G\ninst✝ : CompleteSpace G\ne : β →+ α\nde : DenseInducing ↑e\nf : δ →+ γ\ndf : DenseInducing ↑f\nφ : β →+ δ →+ G\nhφ : Continuous fun p => ↑(↑φ p.fst) p.snd\nW' : Set G\nW'_nhd : W' ∈ 𝓝 0\nx₀ : α\ny₀ : γ\n⊢ Cauchy (map (fun p => ↑(↑φ p.fst) p.snd) (comap (fun p => (↑e p.fst, ↑f p.snd)) (𝓝 (x₀, y₀))))\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mk.left\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nG : Type u_5\ninst✝¹⁶ : TopologicalSpace α\ninst✝¹⁵ : AddCommGroup α\ninst✝¹⁴ : TopologicalAddGroup α\ninst✝¹³ : TopologicalSpace β\ninst✝¹² : AddCommGroup β\ninst✝¹¹ : TopologicalAddGroup β\ninst✝¹⁰ : TopologicalSpace γ\ninst✝⁹ : AddCommGroup γ\ninst✝⁸ : TopologicalAddGroup γ\ninst✝⁷ : TopologicalSpace δ\ninst✝⁶ : AddCommGroup δ\ninst✝⁵ : TopologicalAddGroup δ\ninst✝⁴ : UniformSpace G\ninst✝³ : AddCommGroup G\ninst✝² : UniformAddGroup G\ninst✝¹ : SeparatedSpace G\ninst✝ : CompleteSpace G\ne : β →+ α\nde : DenseInducing ↑e\nf : δ →+ γ\ndf : DenseInducing ↑f\nφ : β →+ δ →+ G\nhφ : Continuous fun p => ↑(↑φ p.fst) p.snd\nW' : Set G\nW'_nhd : W' ∈ 𝓝 0\nx₀ : α\ny₀ : γ\n⊢ NeBot (map (fun p => ↑(↑φ p.fst) p.snd) (comap (fun p => (↑e p.fst, ↑f p.snd)) (𝓝 (x₀, y₀))))\n[PROOFSTEP]\napply NeBot.map\n[GOAL]\ncase mk.left.hf\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nG : Type u_5\ninst✝¹⁶ : TopologicalSpace α\ninst✝¹⁵ : AddCommGroup α\ninst✝¹⁴ : TopologicalAddGroup α\ninst✝¹³ : TopologicalSpace β\ninst✝¹² : AddCommGroup β\ninst✝¹¹ : TopologicalAddGroup β\ninst✝¹⁰ : TopologicalSpace γ\ninst✝⁹ : AddCommGroup γ\ninst✝⁸ : TopologicalAddGroup γ\ninst✝⁷ : TopologicalSpace δ\ninst✝⁶ : AddCommGroup δ\ninst✝⁵ : TopologicalAddGroup δ\ninst✝⁴ : UniformSpace G\ninst✝³ : AddCommGroup G\ninst✝² : UniformAddGroup G\ninst✝¹ : SeparatedSpace G\ninst✝ : CompleteSpace G\ne : β →+ α\nde : DenseInducing ↑e\nf : δ →+ γ\ndf : DenseInducing ↑f\nφ : β →+ δ →+ G\nhφ : Continuous fun p => ↑(↑φ p.fst) p.snd\nW' : Set G\nW'_nhd : W' ∈ 𝓝 0\nx₀ : α\ny₀ : γ\n⊢ NeBot (comap (fun p => (↑e p.fst, ↑f p.snd)) (𝓝 (x₀, y₀)))\n[PROOFSTEP]\napply comap_neBot\n[GOAL]\ncase mk.left.hf.hm\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nG : Type u_5\ninst✝¹⁶ : TopologicalSpace α\ninst✝¹⁵ : AddCommGroup α\ninst✝¹⁴ : TopologicalAddGroup α\ninst✝¹³ : TopologicalSpace β\ninst✝¹² : AddCommGroup β\ninst✝¹¹ : TopologicalAddGroup β\ninst✝¹⁰ : TopologicalSpace γ\ninst✝⁹ : AddCommGroup γ\ninst✝⁸ : TopologicalAddGroup γ\ninst✝⁷ : TopologicalSpace δ\ninst✝⁶ : AddCommGroup δ\ninst✝⁵ : TopologicalAddGroup δ\ninst✝⁴ : UniformSpace G\ninst✝³ : AddCommGroup G\ninst✝² : UniformAddGroup G\ninst✝¹ : SeparatedSpace G\ninst✝ : CompleteSpace G\ne : β →+ α\nde : DenseInducing ↑e\nf : δ →+ γ\ndf : DenseInducing ↑f\nφ : β →+ δ →+ G\nhφ : Continuous fun p => ↑(↑φ p.fst) p.snd\nW' : Set G\nW'_nhd : W' ∈ 𝓝 0\nx₀ : α\ny₀ : γ\n⊢ ∀ (t : Set (α × γ)), t ∈ 𝓝 (x₀, y₀) → ∃ a, (↑e a.fst, ↑f a.snd) ∈ t\n[PROOFSTEP]\nintro U h\n[GOAL]\ncase mk.left.hf.hm\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nG : Type u_5\ninst✝¹⁶ : TopologicalSpace α\ninst✝¹⁵ : AddCommGroup α\ninst✝¹⁴ : TopologicalAddGroup α\ninst✝¹³ : TopologicalSpace β\ninst✝¹² : AddCommGroup β\ninst✝¹¹ : TopologicalAddGroup β\ninst✝¹⁰ : TopologicalSpace γ\ninst✝⁹ : AddCommGroup γ\ninst✝⁸ : TopologicalAddGroup γ\ninst✝⁷ : TopologicalSpace δ\ninst✝⁶ : AddCommGroup δ\ninst✝⁵ : TopologicalAddGroup δ\ninst✝⁴ : UniformSpace G\ninst✝³ : AddCommGroup G\ninst✝² : UniformAddGroup G\ninst✝¹ : SeparatedSpace G\ninst✝ : CompleteSpace G\ne : β →+ α\nde : DenseInducing ↑e\nf : δ →+ γ\ndf : DenseInducing ↑f\nφ : β →+ δ →+ G\nhφ : Continuous fun p => ↑(↑φ p.fst) p.snd\nW' : Set G\nW'_nhd : W' ∈ 𝓝 0\nx₀ : α\ny₀ : γ\nU : Set (α × γ)\nh : U ∈ 𝓝 (x₀, y₀)\n⊢ ∃ a, (↑e a.fst, ↑f a.snd) ∈ U\n[PROOFSTEP]\nrcases mem_closure_iff_nhds.1 ((de.prod df).dense (x₀, y₀)) U h with ⟨x, x_in, ⟨z, z_x⟩⟩\n[GOAL]\ncase mk.left.hf.hm.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nG : Type u_5\ninst✝¹⁶ : TopologicalSpace α\ninst✝¹⁵ : AddCommGroup α\ninst✝¹⁴ : TopologicalAddGroup α\ninst✝¹³ : TopologicalSpace β\ninst✝¹² : AddCommGroup β\ninst✝¹¹ : TopologicalAddGroup β\ninst✝¹⁰ : TopologicalSpace γ\ninst✝⁹ : AddCommGroup γ\ninst✝⁸ : TopologicalAddGroup γ\ninst✝⁷ : TopologicalSpace δ\ninst✝⁶ : AddCommGroup δ\ninst✝⁵ : TopologicalAddGroup δ\ninst✝⁴ : UniformSpace G\ninst✝³ : AddCommGroup G\ninst✝² : UniformAddGroup G\ninst✝¹ : SeparatedSpace G\ninst✝ : CompleteSpace G\ne : β →+ α\nde : DenseInducing ↑e\nf : δ →+ γ\ndf : DenseInducing ↑f\nφ : β →+ δ →+ G\nhφ : Continuous fun p => ↑(↑φ p.fst) p.snd\nW' : Set G\nW'_nhd : W' ∈ 𝓝 0\nx₀ : α\ny₀ : γ\nU : Set (α × γ)\nh : U ∈ 𝓝 (x₀, y₀)\nx : α × γ\nx_in : x ∈ U\nz : β × δ\nz_x : (fun p => (↑e p.fst, ↑f p.snd)) z = x\n⊢ ∃ a, (↑e a.fst, ↑f a.snd) ∈ U\n[PROOFSTEP]\nexists z\n[GOAL]\ncase mk.left.hf.hm.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nG : Type u_5\ninst✝¹⁶ : TopologicalSpace α\ninst✝¹⁵ : AddCommGroup α\ninst✝¹⁴ : TopologicalAddGroup α\ninst✝¹³ : TopologicalSpace β\ninst✝¹² : AddCommGroup β\ninst✝¹¹ : TopologicalAddGroup β\ninst✝¹⁰ : TopologicalSpace γ\ninst✝⁹ : AddCommGroup γ\ninst✝⁸ : TopologicalAddGroup γ\ninst✝⁷ : TopologicalSpace δ\ninst✝⁶ : AddCommGroup δ\ninst✝⁵ : TopologicalAddGroup δ\ninst✝⁴ : UniformSpace G\ninst✝³ : AddCommGroup G\ninst✝² : UniformAddGroup G\ninst✝¹ : SeparatedSpace G\ninst✝ : CompleteSpace G\ne : β →+ α\nde : DenseInducing ↑e\nf : δ →+ γ\ndf : DenseInducing ↑f\nφ : β →+ δ →+ G\nhφ : Continuous fun p => ↑(↑φ p.fst) p.snd\nW' : Set G\nW'_nhd : W' ∈ 𝓝 0\nx₀ : α\ny₀ : γ\nU : Set (α × γ)\nh : U ∈ 𝓝 (x₀, y₀)\nx : α × γ\nx_in : x ∈ U\nz : β × δ\nz_x : (fun p => (↑e p.fst, ↑f p.snd)) z = x\n⊢ (↑e z.fst, ↑f z.snd) ∈ U\n[PROOFSTEP]\naesop\n[GOAL]\ncase mk.right\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nG : Type u_5\ninst✝¹⁶ : TopologicalSpace α\ninst✝¹⁵ : AddCommGroup α\ninst✝¹⁴ : TopologicalAddGroup α\ninst✝¹³ : TopologicalSpace β\ninst✝¹² : AddCommGroup β\ninst✝¹¹ : TopologicalAddGroup β\ninst✝¹⁰ : TopologicalSpace γ\ninst✝⁹ : AddCommGroup γ\ninst✝⁸ : TopologicalAddGroup γ\ninst✝⁷ : TopologicalSpace δ\ninst✝⁶ : AddCommGroup δ\ninst✝⁵ : TopologicalAddGroup δ\ninst✝⁴ : UniformSpace G\ninst✝³ : AddCommGroup G\ninst✝² : UniformAddGroup G\ninst✝¹ : SeparatedSpace G\ninst✝ : CompleteSpace G\ne : β →+ α\nde : DenseInducing ↑e\nf : δ →+ γ\ndf : DenseInducing ↑f\nφ : β →+ δ →+ G\nhφ : Continuous fun p => ↑(↑φ p.fst) p.snd\nW' : Set G\nW'_nhd : W' ∈ 𝓝 0\nx₀ : α\ny₀ : γ\n⊢ map (fun p => ↑(↑φ p.fst) p.snd) (comap (fun p => (↑e p.fst, ↑f p.snd)) (𝓝 (x₀, y₀))) ×ˢ\n      map (fun p => ↑(↑φ p.fst) p.snd) (comap (fun p => (↑e p.fst, ↑f p.snd)) (𝓝 (x₀, y₀))) ≤\n    𝓤 G\n[PROOFSTEP]\nsuffices\n  map (fun p : (β × δ) × β × δ => (fun p : β × δ => φ p.1 p.2) p.2 - (fun p : β × δ => φ p.1 p.2) p.1)\n      (comap (fun p : (β × δ) × β × δ => ((e p.1.1, f p.1.2), (e p.2.1, f p.2.2))) (𝓝 (x₀, y₀) ×ˢ 𝓝 (x₀, y₀))) ≤\n    𝓝 0\n  by rwa [uniformity_eq_comap_nhds_zero G, prod_map_map_eq, ← map_le_iff_le_comap, Filter.map_map, prod_comap_comap_eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nG : Type u_5\ninst✝¹⁶ : TopologicalSpace α\ninst✝¹⁵ : AddCommGroup α\ninst✝¹⁴ : TopologicalAddGroup α\ninst✝¹³ : TopologicalSpace β\ninst✝¹² : AddCommGroup β\ninst✝¹¹ : TopologicalAddGroup β\ninst✝¹⁰ : TopologicalSpace γ\ninst✝⁹ : AddCommGroup γ\ninst✝⁸ : TopologicalAddGroup γ\ninst✝⁷ : TopologicalSpace δ\ninst✝⁶ : AddCommGroup δ\ninst✝⁵ : TopologicalAddGroup δ\ninst✝⁴ : UniformSpace G\ninst✝³ : AddCommGroup G\ninst✝² : UniformAddGroup G\ninst✝¹ : SeparatedSpace G\ninst✝ : CompleteSpace G\ne : β →+ α\nde : DenseInducing ↑e\nf : δ →+ γ\ndf : DenseInducing ↑f\nφ : β →+ δ →+ G\nhφ : Continuous fun p => ↑(↑φ p.fst) p.snd\nW' : Set G\nW'_nhd : W' ∈ 𝓝 0\nx₀ : α\ny₀ : γ\nthis :\n  map (fun p => (fun p => ↑(↑φ p.fst) p.snd) p.snd - (fun p => ↑(↑φ p.fst) p.snd) p.fst)\n      (comap (fun p => ((↑e p.fst.fst, ↑f p.fst.snd), ↑e p.snd.fst, ↑f p.snd.snd)) (𝓝 (x₀, y₀) ×ˢ 𝓝 (x₀, y₀))) ≤\n    𝓝 0\n⊢ map (fun p => ↑(↑φ p.fst) p.snd) (comap (fun p => (↑e p.fst, ↑f p.snd)) (𝓝 (x₀, y₀))) ×ˢ\n      map (fun p => ↑(↑φ p.fst) p.snd) (comap (fun p => (↑e p.fst, ↑f p.snd)) (𝓝 (x₀, y₀))) ≤\n    𝓤 G\n[PROOFSTEP]\nrwa [uniformity_eq_comap_nhds_zero G, prod_map_map_eq, ← map_le_iff_le_comap, Filter.map_map, prod_comap_comap_eq]\n[GOAL]\ncase mk.right\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nG : Type u_5\ninst✝¹⁶ : TopologicalSpace α\ninst✝¹⁵ : AddCommGroup α\ninst✝¹⁴ : TopologicalAddGroup α\ninst✝¹³ : TopologicalSpace β\ninst✝¹² : AddCommGroup β\ninst✝¹¹ : TopologicalAddGroup β\ninst✝¹⁰ : TopologicalSpace γ\ninst✝⁹ : AddCommGroup γ\ninst✝⁸ : TopologicalAddGroup γ\ninst✝⁷ : TopologicalSpace δ\ninst✝⁶ : AddCommGroup δ\ninst✝⁵ : TopologicalAddGroup δ\ninst✝⁴ : UniformSpace G\ninst✝³ : AddCommGroup G\ninst✝² : UniformAddGroup G\ninst✝¹ : SeparatedSpace G\ninst✝ : CompleteSpace G\ne : β →+ α\nde : DenseInducing ↑e\nf : δ →+ γ\ndf : DenseInducing ↑f\nφ : β →+ δ →+ G\nhφ : Continuous fun p => ↑(↑φ p.fst) p.snd\nW' : Set G\nW'_nhd : W' ∈ 𝓝 0\nx₀ : α\ny₀ : γ\n⊢ map (fun p => (fun p => ↑(↑φ p.fst) p.snd) p.snd - (fun p => ↑(↑φ p.fst) p.snd) p.fst)\n      (comap (fun p => ((↑e p.fst.fst, ↑f p.fst.snd), ↑e p.snd.fst, ↑f p.snd.snd)) (𝓝 (x₀, y₀) ×ˢ 𝓝 (x₀, y₀))) ≤\n    𝓝 0\n[PROOFSTEP]\nintro W' W'_nhd\n[GOAL]\ncase mk.right\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nG : Type u_5\ninst✝¹⁶ : TopologicalSpace α\ninst✝¹⁵ : AddCommGroup α\ninst✝¹⁴ : TopologicalAddGroup α\ninst✝¹³ : TopologicalSpace β\ninst✝¹² : AddCommGroup β\ninst✝¹¹ : TopologicalAddGroup β\ninst✝¹⁰ : TopologicalSpace γ\ninst✝⁹ : AddCommGroup γ\ninst✝⁸ : TopologicalAddGroup γ\ninst✝⁷ : TopologicalSpace δ\ninst✝⁶ : AddCommGroup δ\ninst✝⁵ : TopologicalAddGroup δ\ninst✝⁴ : UniformSpace G\ninst✝³ : AddCommGroup G\ninst✝² : UniformAddGroup G\ninst✝¹ : SeparatedSpace G\ninst✝ : CompleteSpace G\ne : β →+ α\nde : DenseInducing ↑e\nf : δ →+ γ\ndf : DenseInducing ↑f\nφ : β →+ δ →+ G\nhφ : Continuous fun p => ↑(↑φ p.fst) p.snd\nW'✝ : Set G\nW'_nhd✝ : W'✝ ∈ 𝓝 0\nx₀ : α\ny₀ : γ\nW' : Set G\nW'_nhd : W' ∈ 𝓝 0\n⊢ W' ∈\n    map (fun p => (fun p => ↑(↑φ p.fst) p.snd) p.snd - (fun p => ↑(↑φ p.fst) p.snd) p.fst)\n      (comap (fun p => ((↑e p.fst.fst, ↑f p.fst.snd), ↑e p.snd.fst, ↑f p.snd.snd)) (𝓝 (x₀, y₀) ×ˢ 𝓝 (x₀, y₀)))\n[PROOFSTEP]\nhave key := extend_Z_bilin_key de df hφ W'_nhd x₀ y₀\n[GOAL]\ncase mk.right\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nG : Type u_5\ninst✝¹⁶ : TopologicalSpace α\ninst✝¹⁵ : AddCommGroup α\ninst✝¹⁴ : TopologicalAddGroup α\ninst✝¹³ : TopologicalSpace β\ninst✝¹² : AddCommGroup β\ninst✝¹¹ : TopologicalAddGroup β\ninst✝¹⁰ : TopologicalSpace γ\ninst✝⁹ : AddCommGroup γ\ninst✝⁸ : TopologicalAddGroup γ\ninst✝⁷ : TopologicalSpace δ\ninst✝⁶ : AddCommGroup δ\ninst✝⁵ : TopologicalAddGroup δ\ninst✝⁴ : UniformSpace G\ninst✝³ : AddCommGroup G\ninst✝² : UniformAddGroup G\ninst✝¹ : SeparatedSpace G\ninst✝ : CompleteSpace G\ne : β →+ α\nde : DenseInducing ↑e\nf : δ →+ γ\ndf : DenseInducing ↑f\nφ : β →+ δ →+ G\nhφ : Continuous fun p => ↑(↑φ p.fst) p.snd\nW'✝ : Set G\nW'_nhd✝ : W'✝ ∈ 𝓝 0\nx₀ : α\ny₀ : γ\nW' : Set G\nW'_nhd : W' ∈ 𝓝 0\nkey :\n  ∃ U,\n    U ∈ comap (↑e) (𝓝 x₀) ∧\n      ∃ V,\n        V ∈ comap (↑f) (𝓝 y₀) ∧\n          ∀ (x : β),\n            x ∈ U →\n              ∀ (x' : β),\n                x' ∈ U →\n                  ∀ (y : δ),\n                    y ∈ V →\n                      ∀ (y' : δ),\n                        y' ∈ V → (fun p => ↑(↑φ p.fst) p.snd) (x', y') - (fun p => ↑(↑φ p.fst) p.snd) (x, y) ∈ W'\n⊢ W' ∈\n    map (fun p => (fun p => ↑(↑φ p.fst) p.snd) p.snd - (fun p => ↑(↑φ p.fst) p.snd) p.fst)\n      (comap (fun p => ((↑e p.fst.fst, ↑f p.fst.snd), ↑e p.snd.fst, ↑f p.snd.snd)) (𝓝 (x₀, y₀) ×ˢ 𝓝 (x₀, y₀)))\n[PROOFSTEP]\nrcases key with ⟨U, U_nhd, V, V_nhd, h⟩\n[GOAL]\ncase mk.right.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nG : Type u_5\ninst✝¹⁶ : TopologicalSpace α\ninst✝¹⁵ : AddCommGroup α\ninst✝¹⁴ : TopologicalAddGroup α\ninst✝¹³ : TopologicalSpace β\ninst✝¹² : AddCommGroup β\ninst✝¹¹ : TopologicalAddGroup β\ninst✝¹⁰ : TopologicalSpace γ\ninst✝⁹ : AddCommGroup γ\ninst✝⁸ : TopologicalAddGroup γ\ninst✝⁷ : TopologicalSpace δ\ninst✝⁶ : AddCommGroup δ\ninst✝⁵ : TopologicalAddGroup δ\ninst✝⁴ : UniformSpace G\ninst✝³ : AddCommGroup G\ninst✝² : UniformAddGroup G\ninst✝¹ : SeparatedSpace G\ninst✝ : CompleteSpace G\ne : β →+ α\nde : DenseInducing ↑e\nf : δ →+ γ\ndf : DenseInducing ↑f\nφ : β →+ δ →+ G\nhφ : Continuous fun p => ↑(↑φ p.fst) p.snd\nW'✝ : Set G\nW'_nhd✝ : W'✝ ∈ 𝓝 0\nx₀ : α\ny₀ : γ\nW' : Set G\nW'_nhd : W' ∈ 𝓝 0\nU : Set β\nU_nhd : U ∈ comap (↑e) (𝓝 x₀)\nV : Set δ\nV_nhd : V ∈ comap (↑f) (𝓝 y₀)\nh :\n  ∀ (x : β),\n    x ∈ U →\n      ∀ (x' : β),\n        x' ∈ U →\n          ∀ (y : δ),\n            y ∈ V →\n              ∀ (y' : δ), y' ∈ V → (fun p => ↑(↑φ p.fst) p.snd) (x', y') - (fun p => ↑(↑φ p.fst) p.snd) (x, y) ∈ W'\n⊢ W' ∈\n    map (fun p => (fun p => ↑(↑φ p.fst) p.snd) p.snd - (fun p => ↑(↑φ p.fst) p.snd) p.fst)\n      (comap (fun p => ((↑e p.fst.fst, ↑f p.fst.snd), ↑e p.snd.fst, ↑f p.snd.snd)) (𝓝 (x₀, y₀) ×ˢ 𝓝 (x₀, y₀)))\n[PROOFSTEP]\nrw [mem_comap] at U_nhd \n[GOAL]\ncase mk.right.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nG : Type u_5\ninst✝¹⁶ : TopologicalSpace α\ninst✝¹⁵ : AddCommGroup α\ninst✝¹⁴ : TopologicalAddGroup α\ninst✝¹³ : TopologicalSpace β\ninst✝¹² : AddCommGroup β\ninst✝¹¹ : TopologicalAddGroup β\ninst✝¹⁰ : TopologicalSpace γ\ninst✝⁹ : AddCommGroup γ\ninst✝⁸ : TopologicalAddGroup γ\ninst✝⁷ : TopologicalSpace δ\ninst✝⁶ : AddCommGroup δ\ninst✝⁵ : TopologicalAddGroup δ\ninst✝⁴ : UniformSpace G\ninst✝³ : AddCommGroup G\ninst✝² : UniformAddGroup G\ninst✝¹ : SeparatedSpace G\ninst✝ : CompleteSpace G\ne : β →+ α\nde : DenseInducing ↑e\nf : δ →+ γ\ndf : DenseInducing ↑f\nφ : β →+ δ →+ G\nhφ : Continuous fun p => ↑(↑φ p.fst) p.snd\nW'✝ : Set G\nW'_nhd✝ : W'✝ ∈ 𝓝 0\nx₀ : α\ny₀ : γ\nW' : Set G\nW'_nhd : W' ∈ 𝓝 0\nU : Set β\nU_nhd : ∃ t, t ∈ 𝓝 x₀ ∧ ↑e ⁻¹' t ⊆ U\nV : Set δ\nV_nhd : V ∈ comap (↑f) (𝓝 y₀)\nh :\n  ∀ (x : β),\n    x ∈ U →\n      ∀ (x' : β),\n        x' ∈ U →\n          ∀ (y : δ),\n            y ∈ V →\n              ∀ (y' : δ), y' ∈ V → (fun p => ↑(↑φ p.fst) p.snd) (x', y') - (fun p => ↑(↑φ p.fst) p.snd) (x, y) ∈ W'\n⊢ W' ∈\n    map (fun p => (fun p => ↑(↑φ p.fst) p.snd) p.snd - (fun p => ↑(↑φ p.fst) p.snd) p.fst)\n      (comap (fun p => ((↑e p.fst.fst, ↑f p.fst.snd), ↑e p.snd.fst, ↑f p.snd.snd)) (𝓝 (x₀, y₀) ×ˢ 𝓝 (x₀, y₀)))\n[PROOFSTEP]\nrcases U_nhd with ⟨U', U'_nhd, U'_sub⟩\n[GOAL]\ncase mk.right.intro.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nG : Type u_5\ninst✝¹⁶ : TopologicalSpace α\ninst✝¹⁵ : AddCommGroup α\ninst✝¹⁴ : TopologicalAddGroup α\ninst✝¹³ : TopologicalSpace β\ninst✝¹² : AddCommGroup β\ninst✝¹¹ : TopologicalAddGroup β\ninst✝¹⁰ : TopologicalSpace γ\ninst✝⁹ : AddCommGroup γ\ninst✝⁸ : TopologicalAddGroup γ\ninst✝⁷ : TopologicalSpace δ\ninst✝⁶ : AddCommGroup δ\ninst✝⁵ : TopologicalAddGroup δ\ninst✝⁴ : UniformSpace G\ninst✝³ : AddCommGroup G\ninst✝² : UniformAddGroup G\ninst✝¹ : SeparatedSpace G\ninst✝ : CompleteSpace G\ne : β →+ α\nde : DenseInducing ↑e\nf : δ →+ γ\ndf : DenseInducing ↑f\nφ : β →+ δ →+ G\nhφ : Continuous fun p => ↑(↑φ p.fst) p.snd\nW'✝ : Set G\nW'_nhd✝ : W'✝ ∈ 𝓝 0\nx₀ : α\ny₀ : γ\nW' : Set G\nW'_nhd : W' ∈ 𝓝 0\nU : Set β\nV : Set δ\nV_nhd : V ∈ comap (↑f) (𝓝 y₀)\nh :\n  ∀ (x : β),\n    x ∈ U →\n      ∀ (x' : β),\n        x' ∈ U →\n          ∀ (y : δ),\n            y ∈ V →\n              ∀ (y' : δ), y' ∈ V → (fun p => ↑(↑φ p.fst) p.snd) (x', y') - (fun p => ↑(↑φ p.fst) p.snd) (x, y) ∈ W'\nU' : Set α\nU'_nhd : U' ∈ 𝓝 x₀\nU'_sub : ↑e ⁻¹' U' ⊆ U\n⊢ W' ∈\n    map (fun p => (fun p => ↑(↑φ p.fst) p.snd) p.snd - (fun p => ↑(↑φ p.fst) p.snd) p.fst)\n      (comap (fun p => ((↑e p.fst.fst, ↑f p.fst.snd), ↑e p.snd.fst, ↑f p.snd.snd)) (𝓝 (x₀, y₀) ×ˢ 𝓝 (x₀, y₀)))\n[PROOFSTEP]\nrw [mem_comap] at V_nhd \n[GOAL]\ncase mk.right.intro.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nG : Type u_5\ninst✝¹⁶ : TopologicalSpace α\ninst✝¹⁵ : AddCommGroup α\ninst✝¹⁴ : TopologicalAddGroup α\ninst✝¹³ : TopologicalSpace β\ninst✝¹² : AddCommGroup β\ninst✝¹¹ : TopologicalAddGroup β\ninst✝¹⁰ : TopologicalSpace γ\ninst✝⁹ : AddCommGroup γ\ninst✝⁸ : TopologicalAddGroup γ\ninst✝⁷ : TopologicalSpace δ\ninst✝⁶ : AddCommGroup δ\ninst✝⁵ : TopologicalAddGroup δ\ninst✝⁴ : UniformSpace G\ninst✝³ : AddCommGroup G\ninst✝² : UniformAddGroup G\ninst✝¹ : SeparatedSpace G\ninst✝ : CompleteSpace G\ne : β →+ α\nde : DenseInducing ↑e\nf : δ →+ γ\ndf : DenseInducing ↑f\nφ : β →+ δ →+ G\nhφ : Continuous fun p => ↑(↑φ p.fst) p.snd\nW'✝ : Set G\nW'_nhd✝ : W'✝ ∈ 𝓝 0\nx₀ : α\ny₀ : γ\nW' : Set G\nW'_nhd : W' ∈ 𝓝 0\nU : Set β\nV : Set δ\nV_nhd : ∃ t, t ∈ 𝓝 y₀ ∧ ↑f ⁻¹' t ⊆ V\nh :\n  ∀ (x : β),\n    x ∈ U →\n      ∀ (x' : β),\n        x' ∈ U →\n          ∀ (y : δ),\n            y ∈ V →\n              ∀ (y' : δ), y' ∈ V → (fun p => ↑(↑φ p.fst) p.snd) (x', y') - (fun p => ↑(↑φ p.fst) p.snd) (x, y) ∈ W'\nU' : Set α\nU'_nhd : U' ∈ 𝓝 x₀\nU'_sub : ↑e ⁻¹' U' ⊆ U\n⊢ W' ∈\n    map (fun p => (fun p => ↑(↑φ p.fst) p.snd) p.snd - (fun p => ↑(↑φ p.fst) p.snd) p.fst)\n      (comap (fun p => ((↑e p.fst.fst, ↑f p.fst.snd), ↑e p.snd.fst, ↑f p.snd.snd)) (𝓝 (x₀, y₀) ×ˢ 𝓝 (x₀, y₀)))\n[PROOFSTEP]\nrcases V_nhd with ⟨V', V'_nhd, V'_sub⟩\n[GOAL]\ncase mk.right.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nG : Type u_5\ninst✝¹⁶ : TopologicalSpace α\ninst✝¹⁵ : AddCommGroup α\ninst✝¹⁴ : TopologicalAddGroup α\ninst✝¹³ : TopologicalSpace β\ninst✝¹² : AddCommGroup β\ninst✝¹¹ : TopologicalAddGroup β\ninst✝¹⁰ : TopologicalSpace γ\ninst✝⁹ : AddCommGroup γ\ninst✝⁸ : TopologicalAddGroup γ\ninst✝⁷ : TopologicalSpace δ\ninst✝⁶ : AddCommGroup δ\ninst✝⁵ : TopologicalAddGroup δ\ninst✝⁴ : UniformSpace G\ninst✝³ : AddCommGroup G\ninst✝² : UniformAddGroup G\ninst✝¹ : SeparatedSpace G\ninst✝ : CompleteSpace G\ne : β →+ α\nde : DenseInducing ↑e\nf : δ →+ γ\ndf : DenseInducing ↑f\nφ : β →+ δ →+ G\nhφ : Continuous fun p => ↑(↑φ p.fst) p.snd\nW'✝ : Set G\nW'_nhd✝ : W'✝ ∈ 𝓝 0\nx₀ : α\ny₀ : γ\nW' : Set G\nW'_nhd : W' ∈ 𝓝 0\nU : Set β\nV : Set δ\nh :\n  ∀ (x : β),\n    x ∈ U →\n      ∀ (x' : β),\n        x' ∈ U →\n          ∀ (y : δ),\n            y ∈ V →\n              ∀ (y' : δ), y' ∈ V → (fun p => ↑(↑φ p.fst) p.snd) (x', y') - (fun p => ↑(↑φ p.fst) p.snd) (x, y) ∈ W'\nU' : Set α\nU'_nhd : U' ∈ 𝓝 x₀\nU'_sub : ↑e ⁻¹' U' ⊆ U\nV' : Set γ\nV'_nhd : V' ∈ 𝓝 y₀\nV'_sub : ↑f ⁻¹' V' ⊆ V\n⊢ W' ∈\n    map (fun p => (fun p => ↑(↑φ p.fst) p.snd) p.snd - (fun p => ↑(↑φ p.fst) p.snd) p.fst)\n      (comap (fun p => ((↑e p.fst.fst, ↑f p.fst.snd), ↑e p.snd.fst, ↑f p.snd.snd)) (𝓝 (x₀, y₀) ×ˢ 𝓝 (x₀, y₀)))\n[PROOFSTEP]\nrw [mem_map, mem_comap, nhds_prod_eq]\n[GOAL]\ncase mk.right.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nG : Type u_5\ninst✝¹⁶ : TopologicalSpace α\ninst✝¹⁵ : AddCommGroup α\ninst✝¹⁴ : TopologicalAddGroup α\ninst✝¹³ : TopologicalSpace β\ninst✝¹² : AddCommGroup β\ninst✝¹¹ : TopologicalAddGroup β\ninst✝¹⁰ : TopologicalSpace γ\ninst✝⁹ : AddCommGroup γ\ninst✝⁸ : TopologicalAddGroup γ\ninst✝⁷ : TopologicalSpace δ\ninst✝⁶ : AddCommGroup δ\ninst✝⁵ : TopologicalAddGroup δ\ninst✝⁴ : UniformSpace G\ninst✝³ : AddCommGroup G\ninst✝² : UniformAddGroup G\ninst✝¹ : SeparatedSpace G\ninst✝ : CompleteSpace G\ne : β →+ α\nde : DenseInducing ↑e\nf : δ →+ γ\ndf : DenseInducing ↑f\nφ : β →+ δ →+ G\nhφ : Continuous fun p => ↑(↑φ p.fst) p.snd\nW'✝ : Set G\nW'_nhd✝ : W'✝ ∈ 𝓝 0\nx₀ : α\ny₀ : γ\nW' : Set G\nW'_nhd : W' ∈ 𝓝 0\nU : Set β\nV : Set δ\nh :\n  ∀ (x : β),\n    x ∈ U →\n      ∀ (x' : β),\n        x' ∈ U →\n          ∀ (y : δ),\n            y ∈ V →\n              ∀ (y' : δ), y' ∈ V → (fun p => ↑(↑φ p.fst) p.snd) (x', y') - (fun p => ↑(↑φ p.fst) p.snd) (x, y) ∈ W'\nU' : Set α\nU'_nhd : U' ∈ 𝓝 x₀\nU'_sub : ↑e ⁻¹' U' ⊆ U\nV' : Set γ\nV'_nhd : V' ∈ 𝓝 y₀\nV'_sub : ↑f ⁻¹' V' ⊆ V\n⊢ ∃ t,\n    t ∈ (𝓝 x₀ ×ˢ 𝓝 y₀) ×ˢ 𝓝 x₀ ×ˢ 𝓝 y₀ ∧\n      (fun p => ((↑e p.fst.fst, ↑f p.fst.snd), ↑e p.snd.fst, ↑f p.snd.snd)) ⁻¹' t ⊆\n        (fun p => (fun p => ↑(↑φ p.fst) p.snd) p.snd - (fun p => ↑(↑φ p.fst) p.snd) p.fst) ⁻¹' W'\n[PROOFSTEP]\nexists (U' ×ˢ V') ×ˢ U' ×ˢ V'\n[GOAL]\ncase mk.right.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nG : Type u_5\ninst✝¹⁶ : TopologicalSpace α\ninst✝¹⁵ : AddCommGroup α\ninst✝¹⁴ : TopologicalAddGroup α\ninst✝¹³ : TopologicalSpace β\ninst✝¹² : AddCommGroup β\ninst✝¹¹ : TopologicalAddGroup β\ninst✝¹⁰ : TopologicalSpace γ\ninst✝⁹ : AddCommGroup γ\ninst✝⁸ : TopologicalAddGroup γ\ninst✝⁷ : TopologicalSpace δ\ninst✝⁶ : AddCommGroup δ\ninst✝⁵ : TopologicalAddGroup δ\ninst✝⁴ : UniformSpace G\ninst✝³ : AddCommGroup G\ninst✝² : UniformAddGroup G\ninst✝¹ : SeparatedSpace G\ninst✝ : CompleteSpace G\ne : β →+ α\nde : DenseInducing ↑e\nf : δ →+ γ\ndf : DenseInducing ↑f\nφ : β →+ δ →+ G\nhφ : Continuous fun p => ↑(↑φ p.fst) p.snd\nW'✝ : Set G\nW'_nhd✝ : W'✝ ∈ 𝓝 0\nx₀ : α\ny₀ : γ\nW' : Set G\nW'_nhd : W' ∈ 𝓝 0\nU : Set β\nV : Set δ\nh :\n  ∀ (x : β),\n    x ∈ U →\n      ∀ (x' : β),\n        x' ∈ U →\n          ∀ (y : δ),\n            y ∈ V →\n              ∀ (y' : δ), y' ∈ V → (fun p => ↑(↑φ p.fst) p.snd) (x', y') - (fun p => ↑(↑φ p.fst) p.snd) (x, y) ∈ W'\nU' : Set α\nU'_nhd : U' ∈ 𝓝 x₀\nU'_sub : ↑e ⁻¹' U' ⊆ U\nV' : Set γ\nV'_nhd : V' ∈ 𝓝 y₀\nV'_sub : ↑f ⁻¹' V' ⊆ V\n⊢ (U' ×ˢ V') ×ˢ U' ×ˢ V' ∈ (𝓝 x₀ ×ˢ 𝓝 y₀) ×ˢ 𝓝 x₀ ×ˢ 𝓝 y₀ ∧\n    (fun p => ((↑e p.fst.fst, ↑f p.fst.snd), ↑e p.snd.fst, ↑f p.snd.snd)) ⁻¹' (U' ×ˢ V') ×ˢ U' ×ˢ V' ⊆\n      (fun p => (fun p => ↑(↑φ p.fst) p.snd) p.snd - (fun p => ↑(↑φ p.fst) p.snd) p.fst) ⁻¹' W'\n[PROOFSTEP]\nrw [mem_prod_same_iff]\n[GOAL]\ncase mk.right.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nG : Type u_5\ninst✝¹⁶ : TopologicalSpace α\ninst✝¹⁵ : AddCommGroup α\ninst✝¹⁴ : TopologicalAddGroup α\ninst✝¹³ : TopologicalSpace β\ninst✝¹² : AddCommGroup β\ninst✝¹¹ : TopologicalAddGroup β\ninst✝¹⁰ : TopologicalSpace γ\ninst✝⁹ : AddCommGroup γ\ninst✝⁸ : TopologicalAddGroup γ\ninst✝⁷ : TopologicalSpace δ\ninst✝⁶ : AddCommGroup δ\ninst✝⁵ : TopologicalAddGroup δ\ninst✝⁴ : UniformSpace G\ninst✝³ : AddCommGroup G\ninst✝² : UniformAddGroup G\ninst✝¹ : SeparatedSpace G\ninst✝ : CompleteSpace G\ne : β →+ α\nde : DenseInducing ↑e\nf : δ →+ γ\ndf : DenseInducing ↑f\nφ : β →+ δ →+ G\nhφ : Continuous fun p => ↑(↑φ p.fst) p.snd\nW'✝ : Set G\nW'_nhd✝ : W'✝ ∈ 𝓝 0\nx₀ : α\ny₀ : γ\nW' : Set G\nW'_nhd : W' ∈ 𝓝 0\nU : Set β\nV : Set δ\nh :\n  ∀ (x : β),\n    x ∈ U →\n      ∀ (x' : β),\n        x' ∈ U →\n          ∀ (y : δ),\n            y ∈ V →\n              ∀ (y' : δ), y' ∈ V → (fun p => ↑(↑φ p.fst) p.snd) (x', y') - (fun p => ↑(↑φ p.fst) p.snd) (x, y) ∈ W'\nU' : Set α\nU'_nhd : U' ∈ 𝓝 x₀\nU'_sub : ↑e ⁻¹' U' ⊆ U\nV' : Set γ\nV'_nhd : V' ∈ 𝓝 y₀\nV'_sub : ↑f ⁻¹' V' ⊆ V\n⊢ (∃ t, t ∈ 𝓝 x₀ ×ˢ 𝓝 y₀ ∧ t ×ˢ t ⊆ (U' ×ˢ V') ×ˢ U' ×ˢ V') ∧\n    (fun p => ((↑e p.fst.fst, ↑f p.fst.snd), ↑e p.snd.fst, ↑f p.snd.snd)) ⁻¹' (U' ×ˢ V') ×ˢ U' ×ˢ V' ⊆\n      (fun p => (fun p => ↑(↑φ p.fst) p.snd) p.snd - (fun p => ↑(↑φ p.fst) p.snd) p.fst) ⁻¹' W'\n[PROOFSTEP]\nsimp only [exists_prop]\n[GOAL]\ncase mk.right.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nG : Type u_5\ninst✝¹⁶ : TopologicalSpace α\ninst✝¹⁵ : AddCommGroup α\ninst✝¹⁴ : TopologicalAddGroup α\ninst✝¹³ : TopologicalSpace β\ninst✝¹² : AddCommGroup β\ninst✝¹¹ : TopologicalAddGroup β\ninst✝¹⁰ : TopologicalSpace γ\ninst✝⁹ : AddCommGroup γ\ninst✝⁸ : TopologicalAddGroup γ\ninst✝⁷ : TopologicalSpace δ\ninst✝⁶ : AddCommGroup δ\ninst✝⁵ : TopologicalAddGroup δ\ninst✝⁴ : UniformSpace G\ninst✝³ : AddCommGroup G\ninst✝² : UniformAddGroup G\ninst✝¹ : SeparatedSpace G\ninst✝ : CompleteSpace G\ne : β →+ α\nde : DenseInducing ↑e\nf : δ →+ γ\ndf : DenseInducing ↑f\nφ : β →+ δ →+ G\nhφ : Continuous fun p => ↑(↑φ p.fst) p.snd\nW'✝ : Set G\nW'_nhd✝ : W'✝ ∈ 𝓝 0\nx₀ : α\ny₀ : γ\nW' : Set G\nW'_nhd : W' ∈ 𝓝 0\nU : Set β\nV : Set δ\nh :\n  ∀ (x : β),\n    x ∈ U →\n      ∀ (x' : β),\n        x' ∈ U →\n          ∀ (y : δ),\n            y ∈ V →\n              ∀ (y' : δ), y' ∈ V → (fun p => ↑(↑φ p.fst) p.snd) (x', y') - (fun p => ↑(↑φ p.fst) p.snd) (x, y) ∈ W'\nU' : Set α\nU'_nhd : U' ∈ 𝓝 x₀\nU'_sub : ↑e ⁻¹' U' ⊆ U\nV' : Set γ\nV'_nhd : V' ∈ 𝓝 y₀\nV'_sub : ↑f ⁻¹' V' ⊆ V\n⊢ (∃ t, t ∈ 𝓝 x₀ ×ˢ 𝓝 y₀ ∧ t ×ˢ t ⊆ (U' ×ˢ V') ×ˢ U' ×ˢ V') ∧\n    (fun p => ((↑e p.fst.fst, ↑f p.fst.snd), ↑e p.snd.fst, ↑f p.snd.snd)) ⁻¹' (U' ×ˢ V') ×ˢ U' ×ˢ V' ⊆\n      (fun p => ↑(↑φ p.snd.fst) p.snd.snd - ↑(↑φ p.fst.fst) p.fst.snd) ⁻¹' W'\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mk.right.intro.intro.intro.intro.intro.intro.intro.intro.left\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nG : Type u_5\ninst✝¹⁶ : TopologicalSpace α\ninst✝¹⁵ : AddCommGroup α\ninst✝¹⁴ : TopologicalAddGroup α\ninst✝¹³ : TopologicalSpace β\ninst✝¹² : AddCommGroup β\ninst✝¹¹ : TopologicalAddGroup β\ninst✝¹⁰ : TopologicalSpace γ\ninst✝⁹ : AddCommGroup γ\ninst✝⁸ : TopologicalAddGroup γ\ninst✝⁷ : TopologicalSpace δ\ninst✝⁶ : AddCommGroup δ\ninst✝⁵ : TopologicalAddGroup δ\ninst✝⁴ : UniformSpace G\ninst✝³ : AddCommGroup G\ninst✝² : UniformAddGroup G\ninst✝¹ : SeparatedSpace G\ninst✝ : CompleteSpace G\ne : β →+ α\nde : DenseInducing ↑e\nf : δ →+ γ\ndf : DenseInducing ↑f\nφ : β →+ δ →+ G\nhφ : Continuous fun p => ↑(↑φ p.fst) p.snd\nW'✝ : Set G\nW'_nhd✝ : W'✝ ∈ 𝓝 0\nx₀ : α\ny₀ : γ\nW' : Set G\nW'_nhd : W' ∈ 𝓝 0\nU : Set β\nV : Set δ\nh :\n  ∀ (x : β),\n    x ∈ U →\n      ∀ (x' : β),\n        x' ∈ U →\n          ∀ (y : δ),\n            y ∈ V →\n              ∀ (y' : δ), y' ∈ V → (fun p => ↑(↑φ p.fst) p.snd) (x', y') - (fun p => ↑(↑φ p.fst) p.snd) (x, y) ∈ W'\nU' : Set α\nU'_nhd : U' ∈ 𝓝 x₀\nU'_sub : ↑e ⁻¹' U' ⊆ U\nV' : Set γ\nV'_nhd : V' ∈ 𝓝 y₀\nV'_sub : ↑f ⁻¹' V' ⊆ V\n⊢ ∃ t, t ∈ 𝓝 x₀ ×ˢ 𝓝 y₀ ∧ t ×ˢ t ⊆ (U' ×ˢ V') ×ˢ U' ×ˢ V'\n[PROOFSTEP]\nhave := prod_mem_prod U'_nhd V'_nhd\n[GOAL]\ncase mk.right.intro.intro.intro.intro.intro.intro.intro.intro.left\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nG : Type u_5\ninst✝¹⁶ : TopologicalSpace α\ninst✝¹⁵ : AddCommGroup α\ninst✝¹⁴ : TopologicalAddGroup α\ninst✝¹³ : TopologicalSpace β\ninst✝¹² : AddCommGroup β\ninst✝¹¹ : TopologicalAddGroup β\ninst✝¹⁰ : TopologicalSpace γ\ninst✝⁹ : AddCommGroup γ\ninst✝⁸ : TopologicalAddGroup γ\ninst✝⁷ : TopologicalSpace δ\ninst✝⁶ : AddCommGroup δ\ninst✝⁵ : TopologicalAddGroup δ\ninst✝⁴ : UniformSpace G\ninst✝³ : AddCommGroup G\ninst✝² : UniformAddGroup G\ninst✝¹ : SeparatedSpace G\ninst✝ : CompleteSpace G\ne : β →+ α\nde : DenseInducing ↑e\nf : δ →+ γ\ndf : DenseInducing ↑f\nφ : β →+ δ →+ G\nhφ : Continuous fun p => ↑(↑φ p.fst) p.snd\nW'✝ : Set G\nW'_nhd✝ : W'✝ ∈ 𝓝 0\nx₀ : α\ny₀ : γ\nW' : Set G\nW'_nhd : W' ∈ 𝓝 0\nU : Set β\nV : Set δ\nh :\n  ∀ (x : β),\n    x ∈ U →\n      ∀ (x' : β),\n        x' ∈ U →\n          ∀ (y : δ),\n            y ∈ V →\n              ∀ (y' : δ), y' ∈ V → (fun p => ↑(↑φ p.fst) p.snd) (x', y') - (fun p => ↑(↑φ p.fst) p.snd) (x, y) ∈ W'\nU' : Set α\nU'_nhd : U' ∈ 𝓝 x₀\nU'_sub : ↑e ⁻¹' U' ⊆ U\nV' : Set γ\nV'_nhd : V' ∈ 𝓝 y₀\nV'_sub : ↑f ⁻¹' V' ⊆ V\nthis : U' ×ˢ V' ∈ 𝓝 x₀ ×ˢ 𝓝 y₀\n⊢ ∃ t, t ∈ 𝓝 x₀ ×ˢ 𝓝 y₀ ∧ t ×ˢ t ⊆ (U' ×ˢ V') ×ˢ U' ×ˢ V'\n[PROOFSTEP]\ntauto\n[GOAL]\ncase mk.right.intro.intro.intro.intro.intro.intro.intro.intro.right\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nG : Type u_5\ninst✝¹⁶ : TopologicalSpace α\ninst✝¹⁵ : AddCommGroup α\ninst✝¹⁴ : TopologicalAddGroup α\ninst✝¹³ : TopologicalSpace β\ninst✝¹² : AddCommGroup β\ninst✝¹¹ : TopologicalAddGroup β\ninst✝¹⁰ : TopologicalSpace γ\ninst✝⁹ : AddCommGroup γ\ninst✝⁸ : TopologicalAddGroup γ\ninst✝⁷ : TopologicalSpace δ\ninst✝⁶ : AddCommGroup δ\ninst✝⁵ : TopologicalAddGroup δ\ninst✝⁴ : UniformSpace G\ninst✝³ : AddCommGroup G\ninst✝² : UniformAddGroup G\ninst✝¹ : SeparatedSpace G\ninst✝ : CompleteSpace G\ne : β →+ α\nde : DenseInducing ↑e\nf : δ →+ γ\ndf : DenseInducing ↑f\nφ : β →+ δ →+ G\nhφ : Continuous fun p => ↑(↑φ p.fst) p.snd\nW'✝ : Set G\nW'_nhd✝ : W'✝ ∈ 𝓝 0\nx₀ : α\ny₀ : γ\nW' : Set G\nW'_nhd : W' ∈ 𝓝 0\nU : Set β\nV : Set δ\nh :\n  ∀ (x : β),\n    x ∈ U →\n      ∀ (x' : β),\n        x' ∈ U →\n          ∀ (y : δ),\n            y ∈ V →\n              ∀ (y' : δ), y' ∈ V → (fun p => ↑(↑φ p.fst) p.snd) (x', y') - (fun p => ↑(↑φ p.fst) p.snd) (x, y) ∈ W'\nU' : Set α\nU'_nhd : U' ∈ 𝓝 x₀\nU'_sub : ↑e ⁻¹' U' ⊆ U\nV' : Set γ\nV'_nhd : V' ∈ 𝓝 y₀\nV'_sub : ↑f ⁻¹' V' ⊆ V\n⊢ (fun p => ((↑e p.fst.fst, ↑f p.fst.snd), ↑e p.snd.fst, ↑f p.snd.snd)) ⁻¹' (U' ×ˢ V') ×ˢ U' ×ˢ V' ⊆\n    (fun p => ↑(↑φ p.snd.fst) p.snd.snd - ↑(↑φ p.fst.fst) p.fst.snd) ⁻¹' W'\n[PROOFSTEP]\nintro p h'\n[GOAL]\ncase mk.right.intro.intro.intro.intro.intro.intro.intro.intro.right\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nG : Type u_5\ninst✝¹⁶ : TopologicalSpace α\ninst✝¹⁵ : AddCommGroup α\ninst✝¹⁴ : TopologicalAddGroup α\ninst✝¹³ : TopologicalSpace β\ninst✝¹² : AddCommGroup β\ninst✝¹¹ : TopologicalAddGroup β\ninst✝¹⁰ : TopologicalSpace γ\ninst✝⁹ : AddCommGroup γ\ninst✝⁸ : TopologicalAddGroup γ\ninst✝⁷ : TopologicalSpace δ\ninst✝⁶ : AddCommGroup δ\ninst✝⁵ : TopologicalAddGroup δ\ninst✝⁴ : UniformSpace G\ninst✝³ : AddCommGroup G\ninst✝² : UniformAddGroup G\ninst✝¹ : SeparatedSpace G\ninst✝ : CompleteSpace G\ne : β →+ α\nde : DenseInducing ↑e\nf : δ →+ γ\ndf : DenseInducing ↑f\nφ : β →+ δ →+ G\nhφ : Continuous fun p => ↑(↑φ p.fst) p.snd\nW'✝ : Set G\nW'_nhd✝ : W'✝ ∈ 𝓝 0\nx₀ : α\ny₀ : γ\nW' : Set G\nW'_nhd : W' ∈ 𝓝 0\nU : Set β\nV : Set δ\nh :\n  ∀ (x : β),\n    x ∈ U →\n      ∀ (x' : β),\n        x' ∈ U →\n          ∀ (y : δ),\n            y ∈ V →\n              ∀ (y' : δ), y' ∈ V → (fun p => ↑(↑φ p.fst) p.snd) (x', y') - (fun p => ↑(↑φ p.fst) p.snd) (x, y) ∈ W'\nU' : Set α\nU'_nhd : U' ∈ 𝓝 x₀\nU'_sub : ↑e ⁻¹' U' ⊆ U\nV' : Set γ\nV'_nhd : V' ∈ 𝓝 y₀\nV'_sub : ↑f ⁻¹' V' ⊆ V\np : (β × δ) × β × δ\nh' : p ∈ (fun p => ((↑e p.fst.fst, ↑f p.fst.snd), ↑e p.snd.fst, ↑f p.snd.snd)) ⁻¹' (U' ×ˢ V') ×ˢ U' ×ˢ V'\n⊢ p ∈ (fun p => ↑(↑φ p.snd.fst) p.snd.snd - ↑(↑φ p.fst.fst) p.fst.snd) ⁻¹' W'\n[PROOFSTEP]\nsimp only [Set.mem_preimage, Set.prod_mk_mem_set_prod_eq] at h' \n[GOAL]\ncase mk.right.intro.intro.intro.intro.intro.intro.intro.intro.right\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nG : Type u_5\ninst✝¹⁶ : TopologicalSpace α\ninst✝¹⁵ : AddCommGroup α\ninst✝¹⁴ : TopologicalAddGroup α\ninst✝¹³ : TopologicalSpace β\ninst✝¹² : AddCommGroup β\ninst✝¹¹ : TopologicalAddGroup β\ninst✝¹⁰ : TopologicalSpace γ\ninst✝⁹ : AddCommGroup γ\ninst✝⁸ : TopologicalAddGroup γ\ninst✝⁷ : TopologicalSpace δ\ninst✝⁶ : AddCommGroup δ\ninst✝⁵ : TopologicalAddGroup δ\ninst✝⁴ : UniformSpace G\ninst✝³ : AddCommGroup G\ninst✝² : UniformAddGroup G\ninst✝¹ : SeparatedSpace G\ninst✝ : CompleteSpace G\ne : β →+ α\nde : DenseInducing ↑e\nf : δ →+ γ\ndf : DenseInducing ↑f\nφ : β →+ δ →+ G\nhφ : Continuous fun p => ↑(↑φ p.fst) p.snd\nW'✝ : Set G\nW'_nhd✝ : W'✝ ∈ 𝓝 0\nx₀ : α\ny₀ : γ\nW' : Set G\nW'_nhd : W' ∈ 𝓝 0\nU : Set β\nV : Set δ\nh :\n  ∀ (x : β),\n    x ∈ U →\n      ∀ (x' : β),\n        x' ∈ U →\n          ∀ (y : δ),\n            y ∈ V →\n              ∀ (y' : δ), y' ∈ V → (fun p => ↑(↑φ p.fst) p.snd) (x', y') - (fun p => ↑(↑φ p.fst) p.snd) (x, y) ∈ W'\nU' : Set α\nU'_nhd : U' ∈ 𝓝 x₀\nU'_sub : ↑e ⁻¹' U' ⊆ U\nV' : Set γ\nV'_nhd : V' ∈ 𝓝 y₀\nV'_sub : ↑f ⁻¹' V' ⊆ V\np : (β × δ) × β × δ\nh' : (↑e p.fst.fst ∈ U' ∧ ↑f p.fst.snd ∈ V') ∧ ↑e p.snd.fst ∈ U' ∧ ↑f p.snd.snd ∈ V'\n⊢ p ∈ (fun p => ↑(↑φ p.snd.fst) p.snd.snd - ↑(↑φ p.fst.fst) p.fst.snd) ⁻¹' W'\n[PROOFSTEP]\nrcases p with ⟨⟨x, y⟩, ⟨x', y'⟩⟩\n[GOAL]\ncase mk.right.intro.intro.intro.intro.intro.intro.intro.intro.right.mk.mk.mk\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nG : Type u_5\ninst✝¹⁶ : TopologicalSpace α\ninst✝¹⁵ : AddCommGroup α\ninst✝¹⁴ : TopologicalAddGroup α\ninst✝¹³ : TopologicalSpace β\ninst✝¹² : AddCommGroup β\ninst✝¹¹ : TopologicalAddGroup β\ninst✝¹⁰ : TopologicalSpace γ\ninst✝⁹ : AddCommGroup γ\ninst✝⁸ : TopologicalAddGroup γ\ninst✝⁷ : TopologicalSpace δ\ninst✝⁶ : AddCommGroup δ\ninst✝⁵ : TopologicalAddGroup δ\ninst✝⁴ : UniformSpace G\ninst✝³ : AddCommGroup G\ninst✝² : UniformAddGroup G\ninst✝¹ : SeparatedSpace G\ninst✝ : CompleteSpace G\ne : β →+ α\nde : DenseInducing ↑e\nf : δ →+ γ\ndf : DenseInducing ↑f\nφ : β →+ δ →+ G\nhφ : Continuous fun p => ↑(↑φ p.fst) p.snd\nW'✝ : Set G\nW'_nhd✝ : W'✝ ∈ 𝓝 0\nx₀ : α\ny₀ : γ\nW' : Set G\nW'_nhd : W' ∈ 𝓝 0\nU : Set β\nV : Set δ\nh :\n  ∀ (x : β),\n    x ∈ U →\n      ∀ (x' : β),\n        x' ∈ U →\n          ∀ (y : δ),\n            y ∈ V →\n              ∀ (y' : δ), y' ∈ V → (fun p => ↑(↑φ p.fst) p.snd) (x', y') - (fun p => ↑(↑φ p.fst) p.snd) (x, y) ∈ W'\nU' : Set α\nU'_nhd : U' ∈ 𝓝 x₀\nU'_sub : ↑e ⁻¹' U' ⊆ U\nV' : Set γ\nV'_nhd : V' ∈ 𝓝 y₀\nV'_sub : ↑f ⁻¹' V' ⊆ V\nx : β\ny : δ\nx' : β\ny' : δ\nh' :\n  (↑e ((x, y), x', y').fst.fst ∈ U' ∧ ↑f ((x, y), x', y').fst.snd ∈ V') ∧\n    ↑e ((x, y), x', y').snd.fst ∈ U' ∧ ↑f ((x, y), x', y').snd.snd ∈ V'\n⊢ ((x, y), x', y') ∈ (fun p => ↑(↑φ p.snd.fst) p.snd.snd - ↑(↑φ p.fst.fst) p.fst.snd) ⁻¹' W'\n[PROOFSTEP]\napply h\n[GOAL]\ncase mk.right.intro.intro.intro.intro.intro.intro.intro.intro.right.mk.mk.mk.x\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nG : Type u_5\ninst✝¹⁶ : TopologicalSpace α\ninst✝¹⁵ : AddCommGroup α\ninst✝¹⁴ : TopologicalAddGroup α\ninst✝¹³ : TopologicalSpace β\ninst✝¹² : AddCommGroup β\ninst✝¹¹ : TopologicalAddGroup β\ninst✝¹⁰ : TopologicalSpace γ\ninst✝⁹ : AddCommGroup γ\ninst✝⁸ : TopologicalAddGroup γ\ninst✝⁷ : TopologicalSpace δ\ninst✝⁶ : AddCommGroup δ\ninst✝⁵ : TopologicalAddGroup δ\ninst✝⁴ : UniformSpace G\ninst✝³ : AddCommGroup G\ninst✝² : UniformAddGroup G\ninst✝¹ : SeparatedSpace G\ninst✝ : CompleteSpace G\ne : β →+ α\nde : DenseInducing ↑e\nf : δ →+ γ\ndf : DenseInducing ↑f\nφ : β →+ δ →+ G\nhφ : Continuous fun p => ↑(↑φ p.fst) p.snd\nW'✝ : Set G\nW'_nhd✝ : W'✝ ∈ 𝓝 0\nx₀ : α\ny₀ : γ\nW' : Set G\nW'_nhd : W' ∈ 𝓝 0\nU : Set β\nV : Set δ\nh :\n  ∀ (x : β),\n    x ∈ U →\n      ∀ (x' : β),\n        x' ∈ U →\n          ∀ (y : δ),\n            y ∈ V →\n              ∀ (y' : δ), y' ∈ V → (fun p => ↑(↑φ p.fst) p.snd) (x', y') - (fun p => ↑(↑φ p.fst) p.snd) (x, y) ∈ W'\nU' : Set α\nU'_nhd : U' ∈ 𝓝 x₀\nU'_sub : ↑e ⁻¹' U' ⊆ U\nV' : Set γ\nV'_nhd : V' ∈ 𝓝 y₀\nV'_sub : ↑f ⁻¹' V' ⊆ V\nx : β\ny : δ\nx' : β\ny' : δ\nh' :\n  (↑e ((x, y), x', y').fst.fst ∈ U' ∧ ↑f ((x, y), x', y').fst.snd ∈ V') ∧\n    ↑e ((x, y), x', y').snd.fst ∈ U' ∧ ↑f ((x, y), x', y').snd.snd ∈ V'\n⊢ x ∈ U\n[PROOFSTEP]\ntauto\n[GOAL]\ncase mk.right.intro.intro.intro.intro.intro.intro.intro.intro.right.mk.mk.mk.x\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nG : Type u_5\ninst✝¹⁶ : TopologicalSpace α\ninst✝¹⁵ : AddCommGroup α\ninst✝¹⁴ : TopologicalAddGroup α\ninst✝¹³ : TopologicalSpace β\ninst✝¹² : AddCommGroup β\ninst✝¹¹ : TopologicalAddGroup β\ninst✝¹⁰ : TopologicalSpace γ\ninst✝⁹ : AddCommGroup γ\ninst✝⁸ : TopologicalAddGroup γ\ninst✝⁷ : TopologicalSpace δ\ninst✝⁶ : AddCommGroup δ\ninst✝⁵ : TopologicalAddGroup δ\ninst✝⁴ : UniformSpace G\ninst✝³ : AddCommGroup G\ninst✝² : UniformAddGroup G\ninst✝¹ : SeparatedSpace G\ninst✝ : CompleteSpace G\ne : β →+ α\nde : DenseInducing ↑e\nf : δ →+ γ\ndf : DenseInducing ↑f\nφ : β →+ δ →+ G\nhφ : Continuous fun p => ↑(↑φ p.fst) p.snd\nW'✝ : Set G\nW'_nhd✝ : W'✝ ∈ 𝓝 0\nx₀ : α\ny₀ : γ\nW' : Set G\nW'_nhd : W' ∈ 𝓝 0\nU : Set β\nV : Set δ\nh :\n  ∀ (x : β),\n    x ∈ U →\n      ∀ (x' : β),\n        x' ∈ U →\n          ∀ (y : δ),\n            y ∈ V →\n              ∀ (y' : δ), y' ∈ V → (fun p => ↑(↑φ p.fst) p.snd) (x', y') - (fun p => ↑(↑φ p.fst) p.snd) (x, y) ∈ W'\nU' : Set α\nU'_nhd : U' ∈ 𝓝 x₀\nU'_sub : ↑e ⁻¹' U' ⊆ U\nV' : Set γ\nV'_nhd : V' ∈ 𝓝 y₀\nV'_sub : ↑f ⁻¹' V' ⊆ V\nx : β\ny : δ\nx' : β\ny' : δ\nh' :\n  (↑e ((x, y), x', y').fst.fst ∈ U' ∧ ↑f ((x, y), x', y').fst.snd ∈ V') ∧\n    ↑e ((x, y), x', y').snd.fst ∈ U' ∧ ↑f ((x, y), x', y').snd.snd ∈ V'\n⊢ x' ∈ U\n[PROOFSTEP]\ntauto\n[GOAL]\ncase mk.right.intro.intro.intro.intro.intro.intro.intro.intro.right.mk.mk.mk.x\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nG : Type u_5\ninst✝¹⁶ : TopologicalSpace α\ninst✝¹⁵ : AddCommGroup α\ninst✝¹⁴ : TopologicalAddGroup α\ninst✝¹³ : TopologicalSpace β\ninst✝¹² : AddCommGroup β\ninst✝¹¹ : TopologicalAddGroup β\ninst✝¹⁰ : TopologicalSpace γ\ninst✝⁹ : AddCommGroup γ\ninst✝⁸ : TopologicalAddGroup γ\ninst✝⁷ : TopologicalSpace δ\ninst✝⁶ : AddCommGroup δ\ninst✝⁵ : TopologicalAddGroup δ\ninst✝⁴ : UniformSpace G\ninst✝³ : AddCommGroup G\ninst✝² : UniformAddGroup G\ninst✝¹ : SeparatedSpace G\ninst✝ : CompleteSpace G\ne : β →+ α\nde : DenseInducing ↑e\nf : δ →+ γ\ndf : DenseInducing ↑f\nφ : β →+ δ →+ G\nhφ : Continuous fun p => ↑(↑φ p.fst) p.snd\nW'✝ : Set G\nW'_nhd✝ : W'✝ ∈ 𝓝 0\nx₀ : α\ny₀ : γ\nW' : Set G\nW'_nhd : W' ∈ 𝓝 0\nU : Set β\nV : Set δ\nh :\n  ∀ (x : β),\n    x ∈ U →\n      ∀ (x' : β),\n        x' ∈ U →\n          ∀ (y : δ),\n            y ∈ V →\n              ∀ (y' : δ), y' ∈ V → (fun p => ↑(↑φ p.fst) p.snd) (x', y') - (fun p => ↑(↑φ p.fst) p.snd) (x, y) ∈ W'\nU' : Set α\nU'_nhd : U' ∈ 𝓝 x₀\nU'_sub : ↑e ⁻¹' U' ⊆ U\nV' : Set γ\nV'_nhd : V' ∈ 𝓝 y₀\nV'_sub : ↑f ⁻¹' V' ⊆ V\nx : β\ny : δ\nx' : β\ny' : δ\nh' :\n  (↑e ((x, y), x', y').fst.fst ∈ U' ∧ ↑f ((x, y), x', y').fst.snd ∈ V') ∧\n    ↑e ((x, y), x', y').snd.fst ∈ U' ∧ ↑f ((x, y), x', y').snd.snd ∈ V'\n⊢ y ∈ V\n[PROOFSTEP]\ntauto\n[GOAL]\ncase mk.right.intro.intro.intro.intro.intro.intro.intro.intro.right.mk.mk.mk.x\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : Type u_4\nG : Type u_5\ninst✝¹⁶ : TopologicalSpace α\ninst✝¹⁵ : AddCommGroup α\ninst✝¹⁴ : TopologicalAddGroup α\ninst✝¹³ : TopologicalSpace β\ninst✝¹² : AddCommGroup β\ninst✝¹¹ : TopologicalAddGroup β\ninst✝¹⁰ : TopologicalSpace γ\ninst✝⁹ : AddCommGroup γ\ninst✝⁸ : TopologicalAddGroup γ\ninst✝⁷ : TopologicalSpace δ\ninst✝⁶ : AddCommGroup δ\ninst✝⁵ : TopologicalAddGroup δ\ninst✝⁴ : UniformSpace G\ninst✝³ : AddCommGroup G\ninst✝² : UniformAddGroup G\ninst✝¹ : SeparatedSpace G\ninst✝ : CompleteSpace G\ne : β →+ α\nde : DenseInducing ↑e\nf : δ →+ γ\ndf : DenseInducing ↑f\nφ : β →+ δ →+ G\nhφ : Continuous fun p => ↑(↑φ p.fst) p.snd\nW'✝ : Set G\nW'_nhd✝ : W'✝ ∈ 𝓝 0\nx₀ : α\ny₀ : γ\nW' : Set G\nW'_nhd : W' ∈ 𝓝 0\nU : Set β\nV : Set δ\nh :\n  ∀ (x : β),\n    x ∈ U →\n      ∀ (x' : β),\n        x' ∈ U →\n          ∀ (y : δ),\n            y ∈ V →\n              ∀ (y' : δ), y' ∈ V → (fun p => ↑(↑φ p.fst) p.snd) (x', y') - (fun p => ↑(↑φ p.fst) p.snd) (x, y) ∈ W'\nU' : Set α\nU'_nhd : U' ∈ 𝓝 x₀\nU'_sub : ↑e ⁻¹' U' ⊆ U\nV' : Set γ\nV'_nhd : V' ∈ 𝓝 y₀\nV'_sub : ↑f ⁻¹' V' ⊆ V\nx : β\ny : δ\nx' : β\ny' : δ\nh' :\n  (↑e ((x, y), x', y').fst.fst ∈ U' ∧ ↑f ((x, y), x', y').fst.snd ∈ V') ∧\n    ↑e ((x, y), x', y').snd.fst ∈ U' ∧ ↑f ((x, y), x', y').snd.snd ∈ V'\n⊢ y' ∈ V\n[PROOFSTEP]\ntauto\n[GOAL]\nG : Type u\ninst✝⁵ : Group G\ninst✝⁴ : TopologicalSpace G\ninst✝³ : TopologicalGroup G\ninst✝² : FirstCountableTopology G\nN : Subgroup G\ninst✝¹ : Subgroup.Normal N\ninst✝ : CompleteSpace G\n⊢ CompleteSpace (G ⧸ N)\n[PROOFSTEP]\nletI : UniformSpace (G ⧸ N) := TopologicalGroup.toUniformSpace (G ⧸ N)\n[GOAL]\nG : Type u\ninst✝⁵ : Group G\ninst✝⁴ : TopologicalSpace G\ninst✝³ : TopologicalGroup G\ninst✝² : FirstCountableTopology G\nN : Subgroup G\ninst✝¹ : Subgroup.Normal N\ninst✝ : CompleteSpace G\nthis : UniformSpace (G ⧸ N) := TopologicalGroup.toUniformSpace (G ⧸ N)\n⊢ CompleteSpace (G ⧸ N)\n[PROOFSTEP]\nletI : UniformSpace G := TopologicalGroup.toUniformSpace G\n[GOAL]\nG : Type u\ninst✝⁵ : Group G\ninst✝⁴ : TopologicalSpace G\ninst✝³ : TopologicalGroup G\ninst✝² : FirstCountableTopology G\nN : Subgroup G\ninst✝¹ : Subgroup.Normal N\ninst✝ : CompleteSpace G\nthis✝ : UniformSpace (G ⧸ N) := TopologicalGroup.toUniformSpace (G ⧸ N)\nthis : UniformSpace G := TopologicalGroup.toUniformSpace G\n⊢ CompleteSpace (G ⧸ N)\n[PROOFSTEP]\nhaveI : (𝓤 (G ⧸ N)).IsCountablyGenerated := comap.isCountablyGenerated _ _\n[GOAL]\nG : Type u\ninst✝⁵ : Group G\ninst✝⁴ : TopologicalSpace G\ninst✝³ : TopologicalGroup G\ninst✝² : FirstCountableTopology G\nN : Subgroup G\ninst✝¹ : Subgroup.Normal N\ninst✝ : CompleteSpace G\nthis✝¹ : UniformSpace (G ⧸ N) := TopologicalGroup.toUniformSpace (G ⧸ N)\nthis✝ : UniformSpace G := TopologicalGroup.toUniformSpace G\nthis : IsCountablyGenerated (𝓤 (G ⧸ N))\n⊢ CompleteSpace (G ⧸ N)\n[PROOFSTEP]\nobtain ⟨u, hu, u_mul⟩ := TopologicalGroup.exists_antitone_basis_nhds_one G\n[GOAL]\ncase intro.intro\nG : Type u\ninst✝⁵ : Group G\ninst✝⁴ : TopologicalSpace G\ninst✝³ : TopologicalGroup G\ninst✝² : FirstCountableTopology G\nN : Subgroup G\ninst✝¹ : Subgroup.Normal N\ninst✝ : CompleteSpace G\nthis✝¹ : UniformSpace (G ⧸ N) := TopologicalGroup.toUniformSpace (G ⧸ N)\nthis✝ : UniformSpace G := TopologicalGroup.toUniformSpace G\nthis : IsCountablyGenerated (𝓤 (G ⧸ N))\nu : ℕ → Set G\nhu : HasAntitoneBasis (𝓝 1) u\nu_mul : ∀ (n : ℕ), u (n + 1) * u (n + 1) ⊆ u n\n⊢ CompleteSpace (G ⧸ N)\n[PROOFSTEP]\nobtain ⟨hv, v_anti⟩ := @HasAntitoneBasis.map _ _ _ _ _ _ ((↑) : G → G ⧸ N) hu\n[GOAL]\ncase intro.intro.mk\nG : Type u\ninst✝⁵ : Group G\ninst✝⁴ : TopologicalSpace G\ninst✝³ : TopologicalGroup G\ninst✝² : FirstCountableTopology G\nN : Subgroup G\ninst✝¹ : Subgroup.Normal N\ninst✝ : CompleteSpace G\nthis✝¹ : UniformSpace (G ⧸ N) := TopologicalGroup.toUniformSpace (G ⧸ N)\nthis✝ : UniformSpace G := TopologicalGroup.toUniformSpace G\nthis : IsCountablyGenerated (𝓤 (G ⧸ N))\nu : ℕ → Set G\nhu : HasAntitoneBasis (𝓝 1) u\nu_mul : ∀ (n : ℕ), u (n + 1) * u (n + 1) ⊆ u n\nhv : HasBasis (Filter.map mk (𝓝 1)) (fun x => True) fun n => mk '' u n\nv_anti : Antitone fun n => mk '' u n\n⊢ CompleteSpace (G ⧸ N)\n[PROOFSTEP]\nrw [← QuotientGroup.nhds_eq N 1, QuotientGroup.mk_one] at hv \n[GOAL]\ncase intro.intro.mk\nG : Type u\ninst✝⁵ : Group G\ninst✝⁴ : TopologicalSpace G\ninst✝³ : TopologicalGroup G\ninst✝² : FirstCountableTopology G\nN : Subgroup G\ninst✝¹ : Subgroup.Normal N\ninst✝ : CompleteSpace G\nthis✝¹ : UniformSpace (G ⧸ N) := TopologicalGroup.toUniformSpace (G ⧸ N)\nthis✝ : UniformSpace G := TopologicalGroup.toUniformSpace G\nthis : IsCountablyGenerated (𝓤 (G ⧸ N))\nu : ℕ → Set G\nhu : HasAntitoneBasis (𝓝 1) u\nu_mul : ∀ (n : ℕ), u (n + 1) * u (n + 1) ⊆ u n\nhv : HasBasis (𝓝 1) (fun x => True) fun n => mk '' u n\nv_anti : Antitone fun n => mk '' u n\n⊢ CompleteSpace (G ⧸ N)\n[PROOFSTEP]\nrefine'\n  UniformSpace.complete_of_cauchySeq_tendsto fun x hx =>\n    _\n      /- Given `n : ℕ`, for sufficiently large `a b : ℕ`, given any lift of `x b`, we can find a lift\n          of `x a` such that the quotient of the lifts lies in `u n`. -/\n[GOAL]\ncase intro.intro.mk\nG : Type u\ninst✝⁵ : Group G\ninst✝⁴ : TopologicalSpace G\ninst✝³ : TopologicalGroup G\ninst✝² : FirstCountableTopology G\nN : Subgroup G\ninst✝¹ : Subgroup.Normal N\ninst✝ : CompleteSpace G\nthis✝¹ : UniformSpace (G ⧸ N) := TopologicalGroup.toUniformSpace (G ⧸ N)\nthis✝ : UniformSpace G := TopologicalGroup.toUniformSpace G\nthis : IsCountablyGenerated (𝓤 (G ⧸ N))\nu : ℕ → Set G\nhu : HasAntitoneBasis (𝓝 1) u\nu_mul : ∀ (n : ℕ), u (n + 1) * u (n + 1) ⊆ u n\nhv : HasBasis (𝓝 1) (fun x => True) fun n => mk '' u n\nv_anti : Antitone fun n => mk '' u n\nx : ℕ → G ⧸ N\nhx : CauchySeq x\n⊢ ∃ a, Tendsto x atTop (𝓝 a)\n[PROOFSTEP]\nhave key₀ :\n  ∀ i j : ℕ, ∃ M : ℕ, j < M ∧ ∀ a b : ℕ, M ≤ a → M ≤ b → ∀ g : G, x b = g → ∃ g' : G, g / g' ∈ u i ∧ x a = g' :=\n  by\n  have h𝓤GN : (𝓤 (G ⧸ N)).HasBasis (fun _ => True) fun i => {x | x.snd / x.fst ∈ (↑) '' u i} := by\n    simpa [uniformity_eq_comap_nhds_one'] using hv.comap _\n  rw [h𝓤GN.cauchySeq_iff] at hx \n  simp only [ge_iff_le, mem_setOf_eq, forall_true_left, mem_image] at hx \n  intro i j\n  rcases hx i with ⟨M, hM⟩\n  refine' ⟨max j M + 1, (le_max_left _ _).trans_lt (lt_add_one _), fun a b ha hb g hg => _⟩\n  obtain ⟨y, y_mem, hy⟩ :=\n    hM a (((le_max_right j _).trans (lt_add_one _).le).trans ha) b\n      (((le_max_right j _).trans (lt_add_one _).le).trans hb)\n  refine' ⟨y⁻¹ * g, by simpa only [div_eq_mul_inv, mul_inv_rev, inv_inv, mul_inv_cancel_left] using y_mem, _⟩\n  rw [QuotientGroup.mk_mul, QuotientGroup.mk_inv, hy, hg, inv_div, div_mul_cancel']\n    /- Inductively construct a subsequence `φ : ℕ → ℕ` using `key₀` so that if `a b : ℕ` exceed\n        `φ (n + 1)`, then we may find lifts whose quotients lie within `u n`. -/\n[GOAL]\nG : Type u\ninst✝⁵ : Group G\ninst✝⁴ : TopologicalSpace G\ninst✝³ : TopologicalGroup G\ninst✝² : FirstCountableTopology G\nN : Subgroup G\ninst✝¹ : Subgroup.Normal N\ninst✝ : CompleteSpace G\nthis✝¹ : UniformSpace (G ⧸ N) := TopologicalGroup.toUniformSpace (G ⧸ N)\nthis✝ : UniformSpace G := TopologicalGroup.toUniformSpace G\nthis : IsCountablyGenerated (𝓤 (G ⧸ N))\nu : ℕ → Set G\nhu : HasAntitoneBasis (𝓝 1) u\nu_mul : ∀ (n : ℕ), u (n + 1) * u (n + 1) ⊆ u n\nhv : HasBasis (𝓝 1) (fun x => True) fun n => mk '' u n\nv_anti : Antitone fun n => mk '' u n\nx : ℕ → G ⧸ N\nhx : CauchySeq x\n⊢ ∀ (i j : ℕ), ∃ M, j < M ∧ ∀ (a b : ℕ), M ≤ a → M ≤ b → ∀ (g : G), x b = ↑g → ∃ g', g / g' ∈ u i ∧ x a = ↑g'\n[PROOFSTEP]\nhave h𝓤GN : (𝓤 (G ⧸ N)).HasBasis (fun _ => True) fun i => {x | x.snd / x.fst ∈ (↑) '' u i} := by\n  simpa [uniformity_eq_comap_nhds_one'] using hv.comap _\n[GOAL]\nG : Type u\ninst✝⁵ : Group G\ninst✝⁴ : TopologicalSpace G\ninst✝³ : TopologicalGroup G\ninst✝² : FirstCountableTopology G\nN : Subgroup G\ninst✝¹ : Subgroup.Normal N\ninst✝ : CompleteSpace G\nthis✝¹ : UniformSpace (G ⧸ N) := TopologicalGroup.toUniformSpace (G ⧸ N)\nthis✝ : UniformSpace G := TopologicalGroup.toUniformSpace G\nthis : IsCountablyGenerated (𝓤 (G ⧸ N))\nu : ℕ → Set G\nhu : HasAntitoneBasis (𝓝 1) u\nu_mul : ∀ (n : ℕ), u (n + 1) * u (n + 1) ⊆ u n\nhv : HasBasis (𝓝 1) (fun x => True) fun n => mk '' u n\nv_anti : Antitone fun n => mk '' u n\nx : ℕ → G ⧸ N\nhx : CauchySeq x\n⊢ HasBasis (𝓤 (G ⧸ N)) (fun x => True) fun i => {x | x.snd / x.fst ∈ mk '' u i}\n[PROOFSTEP]\nsimpa [uniformity_eq_comap_nhds_one'] using hv.comap _\n[GOAL]\nG : Type u\ninst✝⁵ : Group G\ninst✝⁴ : TopologicalSpace G\ninst✝³ : TopologicalGroup G\ninst✝² : FirstCountableTopology G\nN : Subgroup G\ninst✝¹ : Subgroup.Normal N\ninst✝ : CompleteSpace G\nthis✝¹ : UniformSpace (G ⧸ N) := TopologicalGroup.toUniformSpace (G ⧸ N)\nthis✝ : UniformSpace G := TopologicalGroup.toUniformSpace G\nthis : IsCountablyGenerated (𝓤 (G ⧸ N))\nu : ℕ → Set G\nhu : HasAntitoneBasis (𝓝 1) u\nu_mul : ∀ (n : ℕ), u (n + 1) * u (n + 1) ⊆ u n\nhv : HasBasis (𝓝 1) (fun x => True) fun n => mk '' u n\nv_anti : Antitone fun n => mk '' u n\nx : ℕ → G ⧸ N\nhx : CauchySeq x\nh𝓤GN : HasBasis (𝓤 (G ⧸ N)) (fun x => True) fun i => {x | x.snd / x.fst ∈ mk '' u i}\n⊢ ∀ (i j : ℕ), ∃ M, j < M ∧ ∀ (a b : ℕ), M ≤ a → M ≤ b → ∀ (g : G), x b = ↑g → ∃ g', g / g' ∈ u i ∧ x a = ↑g'\n[PROOFSTEP]\nrw [h𝓤GN.cauchySeq_iff] at hx \n[GOAL]\nG : Type u\ninst✝⁵ : Group G\ninst✝⁴ : TopologicalSpace G\ninst✝³ : TopologicalGroup G\ninst✝² : FirstCountableTopology G\nN : Subgroup G\ninst✝¹ : Subgroup.Normal N\ninst✝ : CompleteSpace G\nthis✝¹ : UniformSpace (G ⧸ N) := TopologicalGroup.toUniformSpace (G ⧸ N)\nthis✝ : UniformSpace G := TopologicalGroup.toUniformSpace G\nthis : IsCountablyGenerated (𝓤 (G ⧸ N))\nu : ℕ → Set G\nhu : HasAntitoneBasis (𝓝 1) u\nu_mul : ∀ (n : ℕ), u (n + 1) * u (n + 1) ⊆ u n\nhv : HasBasis (𝓝 1) (fun x => True) fun n => mk '' u n\nv_anti : Antitone fun n => mk '' u n\nx : ℕ → G ⧸ N\nhx : ∀ (i : ℕ), True → ∃ N_1, ∀ (m : ℕ), N_1 ≤ m → ∀ (n : ℕ), N_1 ≤ n → (x m, x n) ∈ {x | x.snd / x.fst ∈ mk '' u i}\nh𝓤GN : HasBasis (𝓤 (G ⧸ N)) (fun x => True) fun i => {x | x.snd / x.fst ∈ mk '' u i}\n⊢ ∀ (i j : ℕ), ∃ M, j < M ∧ ∀ (a b : ℕ), M ≤ a → M ≤ b → ∀ (g : G), x b = ↑g → ∃ g', g / g' ∈ u i ∧ x a = ↑g'\n[PROOFSTEP]\nsimp only [ge_iff_le, mem_setOf_eq, forall_true_left, mem_image] at hx \n[GOAL]\nG : Type u\ninst✝⁵ : Group G\ninst✝⁴ : TopologicalSpace G\ninst✝³ : TopologicalGroup G\ninst✝² : FirstCountableTopology G\nN : Subgroup G\ninst✝¹ : Subgroup.Normal N\ninst✝ : CompleteSpace G\nthis✝¹ : UniformSpace (G ⧸ N) := TopologicalGroup.toUniformSpace (G ⧸ N)\nthis✝ : UniformSpace G := TopologicalGroup.toUniformSpace G\nthis : IsCountablyGenerated (𝓤 (G ⧸ N))\nu : ℕ → Set G\nhu : HasAntitoneBasis (𝓝 1) u\nu_mul : ∀ (n : ℕ), u (n + 1) * u (n + 1) ⊆ u n\nhv : HasBasis (𝓝 1) (fun x => True) fun n => mk '' u n\nv_anti : Antitone fun n => mk '' u n\nx : ℕ → G ⧸ N\nh𝓤GN : HasBasis (𝓤 (G ⧸ N)) (fun x => True) fun i => {x | x.snd / x.fst ∈ mk '' u i}\nhx : ∀ (i : ℕ), ∃ N_1, ∀ (m : ℕ), N_1 ≤ m → ∀ (n : ℕ), N_1 ≤ n → ∃ x_1, x_1 ∈ u i ∧ ↑x_1 = x n / x m\n⊢ ∀ (i j : ℕ), ∃ M, j < M ∧ ∀ (a b : ℕ), M ≤ a → M ≤ b → ∀ (g : G), x b = ↑g → ∃ g', g / g' ∈ u i ∧ x a = ↑g'\n[PROOFSTEP]\nintro i j\n[GOAL]\nG : Type u\ninst✝⁵ : Group G\ninst✝⁴ : TopologicalSpace G\ninst✝³ : TopologicalGroup G\ninst✝² : FirstCountableTopology G\nN : Subgroup G\ninst✝¹ : Subgroup.Normal N\ninst✝ : CompleteSpace G\nthis✝¹ : UniformSpace (G ⧸ N) := TopologicalGroup.toUniformSpace (G ⧸ N)\nthis✝ : UniformSpace G := TopologicalGroup.toUniformSpace G\nthis : IsCountablyGenerated (𝓤 (G ⧸ N))\nu : ℕ → Set G\nhu : HasAntitoneBasis (𝓝 1) u\nu_mul : ∀ (n : ℕ), u (n + 1) * u (n + 1) ⊆ u n\nhv : HasBasis (𝓝 1) (fun x => True) fun n => mk '' u n\nv_anti : Antitone fun n => mk '' u n\nx : ℕ → G ⧸ N\nh𝓤GN : HasBasis (𝓤 (G ⧸ N)) (fun x => True) fun i => {x | x.snd / x.fst ∈ mk '' u i}\nhx : ∀ (i : ℕ), ∃ N_1, ∀ (m : ℕ), N_1 ≤ m → ∀ (n : ℕ), N_1 ≤ n → ∃ x_1, x_1 ∈ u i ∧ ↑x_1 = x n / x m\ni j : ℕ\n⊢ ∃ M, j < M ∧ ∀ (a b : ℕ), M ≤ a → M ≤ b → ∀ (g : G), x b = ↑g → ∃ g', g / g' ∈ u i ∧ x a = ↑g'\n[PROOFSTEP]\nrcases hx i with ⟨M, hM⟩\n[GOAL]\ncase intro\nG : Type u\ninst✝⁵ : Group G\ninst✝⁴ : TopologicalSpace G\ninst✝³ : TopologicalGroup G\ninst✝² : FirstCountableTopology G\nN : Subgroup G\ninst✝¹ : Subgroup.Normal N\ninst✝ : CompleteSpace G\nthis✝¹ : UniformSpace (G ⧸ N) := TopologicalGroup.toUniformSpace (G ⧸ N)\nthis✝ : UniformSpace G := TopologicalGroup.toUniformSpace G\nthis : IsCountablyGenerated (𝓤 (G ⧸ N))\nu : ℕ → Set G\nhu : HasAntitoneBasis (𝓝 1) u\nu_mul : ∀ (n : ℕ), u (n + 1) * u (n + 1) ⊆ u n\nhv : HasBasis (𝓝 1) (fun x => True) fun n => mk '' u n\nv_anti : Antitone fun n => mk '' u n\nx : ℕ → G ⧸ N\nh𝓤GN : HasBasis (𝓤 (G ⧸ N)) (fun x => True) fun i => {x | x.snd / x.fst ∈ mk '' u i}\nhx : ∀ (i : ℕ), ∃ N_1, ∀ (m : ℕ), N_1 ≤ m → ∀ (n : ℕ), N_1 ≤ n → ∃ x_1, x_1 ∈ u i ∧ ↑x_1 = x n / x m\ni j M : ℕ\nhM : ∀ (m : ℕ), M ≤ m → ∀ (n : ℕ), M ≤ n → ∃ x_1, x_1 ∈ u i ∧ ↑x_1 = x n / x m\n⊢ ∃ M, j < M ∧ ∀ (a b : ℕ), M ≤ a → M ≤ b → ∀ (g : G), x b = ↑g → ∃ g', g / g' ∈ u i ∧ x a = ↑g'\n[PROOFSTEP]\nrefine' ⟨max j M + 1, (le_max_left _ _).trans_lt (lt_add_one _), fun a b ha hb g hg => _⟩\n[GOAL]\ncase intro\nG : Type u\ninst✝⁵ : Group G\ninst✝⁴ : TopologicalSpace G\ninst✝³ : TopologicalGroup G\ninst✝² : FirstCountableTopology G\nN : Subgroup G\ninst✝¹ : Subgroup.Normal N\ninst✝ : CompleteSpace G\nthis✝¹ : UniformSpace (G ⧸ N) := TopologicalGroup.toUniformSpace (G ⧸ N)\nthis✝ : UniformSpace G := TopologicalGroup.toUniformSpace G\nthis : IsCountablyGenerated (𝓤 (G ⧸ N))\nu : ℕ → Set G\nhu : HasAntitoneBasis (𝓝 1) u\nu_mul : ∀ (n : ℕ), u (n + 1) * u (n + 1) ⊆ u n\nhv : HasBasis (𝓝 1) (fun x => True) fun n => mk '' u n\nv_anti : Antitone fun n => mk '' u n\nx : ℕ → G ⧸ N\nh𝓤GN : HasBasis (𝓤 (G ⧸ N)) (fun x => True) fun i => {x | x.snd / x.fst ∈ mk '' u i}\nhx : ∀ (i : ℕ), ∃ N_1, ∀ (m : ℕ), N_1 ≤ m → ∀ (n : ℕ), N_1 ≤ n → ∃ x_1, x_1 ∈ u i ∧ ↑x_1 = x n / x m\ni j M : ℕ\nhM : ∀ (m : ℕ), M ≤ m → ∀ (n : ℕ), M ≤ n → ∃ x_1, x_1 ∈ u i ∧ ↑x_1 = x n / x m\na b : ℕ\nha : max j M + 1 ≤ a\nhb : max j M + 1 ≤ b\ng : G\nhg : x b = ↑g\n⊢ ∃ g', g / g' ∈ u i ∧ x a = ↑g'\n[PROOFSTEP]\nobtain ⟨y, y_mem, hy⟩ :=\n  hM a (((le_max_right j _).trans (lt_add_one _).le).trans ha) b (((le_max_right j _).trans (lt_add_one _).le).trans hb)\n[GOAL]\ncase intro.intro.intro\nG : Type u\ninst✝⁵ : Group G\ninst✝⁴ : TopologicalSpace G\ninst✝³ : TopologicalGroup G\ninst✝² : FirstCountableTopology G\nN : Subgroup G\ninst✝¹ : Subgroup.Normal N\ninst✝ : CompleteSpace G\nthis✝¹ : UniformSpace (G ⧸ N) := TopologicalGroup.toUniformSpace (G ⧸ N)\nthis✝ : UniformSpace G := TopologicalGroup.toUniformSpace G\nthis : IsCountablyGenerated (𝓤 (G ⧸ N))\nu : ℕ → Set G\nhu : HasAntitoneBasis (𝓝 1) u\nu_mul : ∀ (n : ℕ), u (n + 1) * u (n + 1) ⊆ u n\nhv : HasBasis (𝓝 1) (fun x => True) fun n => mk '' u n\nv_anti : Antitone fun n => mk '' u n\nx : ℕ → G ⧸ N\nh𝓤GN : HasBasis (𝓤 (G ⧸ N)) (fun x => True) fun i => {x | x.snd / x.fst ∈ mk '' u i}\nhx : ∀ (i : ℕ), ∃ N_1, ∀ (m : ℕ), N_1 ≤ m → ∀ (n : ℕ), N_1 ≤ n → ∃ x_1, x_1 ∈ u i ∧ ↑x_1 = x n / x m\ni j M : ℕ\nhM : ∀ (m : ℕ), M ≤ m → ∀ (n : ℕ), M ≤ n → ∃ x_1, x_1 ∈ u i ∧ ↑x_1 = x n / x m\na b : ℕ\nha : max j M + 1 ≤ a\nhb : max j M + 1 ≤ b\ng : G\nhg : x b = ↑g\ny : G\ny_mem : y ∈ u i\nhy : ↑y = x b / x a\n⊢ ∃ g', g / g' ∈ u i ∧ x a = ↑g'\n[PROOFSTEP]\nrefine' ⟨y⁻¹ * g, by simpa only [div_eq_mul_inv, mul_inv_rev, inv_inv, mul_inv_cancel_left] using y_mem, _⟩\n[GOAL]\nG : Type u\ninst✝⁵ : Group G\ninst✝⁴ : TopologicalSpace G\ninst✝³ : TopologicalGroup G\ninst✝² : FirstCountableTopology G\nN : Subgroup G\ninst✝¹ : Subgroup.Normal N\ninst✝ : CompleteSpace G\nthis✝¹ : UniformSpace (G ⧸ N) := TopologicalGroup.toUniformSpace (G ⧸ N)\nthis✝ : UniformSpace G := TopologicalGroup.toUniformSpace G\nthis : IsCountablyGenerated (𝓤 (G ⧸ N))\nu : ℕ → Set G\nhu : HasAntitoneBasis (𝓝 1) u\nu_mul : ∀ (n : ℕ), u (n + 1) * u (n + 1) ⊆ u n\nhv : HasBasis (𝓝 1) (fun x => True) fun n => mk '' u n\nv_anti : Antitone fun n => mk '' u n\nx : ℕ → G ⧸ N\nh𝓤GN : HasBasis (𝓤 (G ⧸ N)) (fun x => True) fun i => {x | x.snd / x.fst ∈ mk '' u i}\nhx : ∀ (i : ℕ), ∃ N_1, ∀ (m : ℕ), N_1 ≤ m → ∀ (n : ℕ), N_1 ≤ n → ∃ x_1, x_1 ∈ u i ∧ ↑x_1 = x n / x m\ni j M : ℕ\nhM : ∀ (m : ℕ), M ≤ m → ∀ (n : ℕ), M ≤ n → ∃ x_1, x_1 ∈ u i ∧ ↑x_1 = x n / x m\na b : ℕ\nha : max j M + 1 ≤ a\nhb : max j M + 1 ≤ b\ng : G\nhg : x b = ↑g\ny : G\ny_mem : y ∈ u i\nhy : ↑y = x b / x a\n⊢ g / (y⁻¹ * g) ∈ u i\n[PROOFSTEP]\nsimpa only [div_eq_mul_inv, mul_inv_rev, inv_inv, mul_inv_cancel_left] using y_mem\n[GOAL]\ncase intro.intro.intro\nG : Type u\ninst✝⁵ : Group G\ninst✝⁴ : TopologicalSpace G\ninst✝³ : TopologicalGroup G\ninst✝² : FirstCountableTopology G\nN : Subgroup G\ninst✝¹ : Subgroup.Normal N\ninst✝ : CompleteSpace G\nthis✝¹ : UniformSpace (G ⧸ N) := TopologicalGroup.toUniformSpace (G ⧸ N)\nthis✝ : UniformSpace G := TopologicalGroup.toUniformSpace G\nthis : IsCountablyGenerated (𝓤 (G ⧸ N))\nu : ℕ → Set G\nhu : HasAntitoneBasis (𝓝 1) u\nu_mul : ∀ (n : ℕ), u (n + 1) * u (n + 1) ⊆ u n\nhv : HasBasis (𝓝 1) (fun x => True) fun n => mk '' u n\nv_anti : Antitone fun n => mk '' u n\nx : ℕ → G ⧸ N\nh𝓤GN : HasBasis (𝓤 (G ⧸ N)) (fun x => True) fun i => {x | x.snd / x.fst ∈ mk '' u i}\nhx : ∀ (i : ℕ), ∃ N_1, ∀ (m : ℕ), N_1 ≤ m → ∀ (n : ℕ), N_1 ≤ n → ∃ x_1, x_1 ∈ u i ∧ ↑x_1 = x n / x m\ni j M : ℕ\nhM : ∀ (m : ℕ), M ≤ m → ∀ (n : ℕ), M ≤ n → ∃ x_1, x_1 ∈ u i ∧ ↑x_1 = x n / x m\na b : ℕ\nha : max j M + 1 ≤ a\nhb : max j M + 1 ≤ b\ng : G\nhg : x b = ↑g\ny : G\ny_mem : y ∈ u i\nhy : ↑y = x b / x a\n⊢ x a = ↑(y⁻¹ * g)\n[PROOFSTEP]\nrw [QuotientGroup.mk_mul, QuotientGroup.mk_inv, hy, hg, inv_div, div_mul_cancel']\n  /- Inductively construct a subsequence `φ : ℕ → ℕ` using `key₀` so that if `a b : ℕ` exceed\n      `φ (n + 1)`, then we may find lifts whose quotients lie within `u n`. -/\n[GOAL]\ncase intro.intro.mk\nG : Type u\ninst✝⁵ : Group G\ninst✝⁴ : TopologicalSpace G\ninst✝³ : TopologicalGroup G\ninst✝² : FirstCountableTopology G\nN : Subgroup G\ninst✝¹ : Subgroup.Normal N\ninst✝ : CompleteSpace G\nthis✝¹ : UniformSpace (G ⧸ N) := TopologicalGroup.toUniformSpace (G ⧸ N)\nthis✝ : UniformSpace G := TopologicalGroup.toUniformSpace G\nthis : IsCountablyGenerated (𝓤 (G ⧸ N))\nu : ℕ → Set G\nhu : HasAntitoneBasis (𝓝 1) u\nu_mul : ∀ (n : ℕ), u (n + 1) * u (n + 1) ⊆ u n\nhv : HasBasis (𝓝 1) (fun x => True) fun n => mk '' u n\nv_anti : Antitone fun n => mk '' u n\nx : ℕ → G ⧸ N\nhx : CauchySeq x\nkey₀ : ∀ (i j : ℕ), ∃ M, j < M ∧ ∀ (a b : ℕ), M ≤ a → M ≤ b → ∀ (g : G), x b = ↑g → ∃ g', g / g' ∈ u i ∧ x a = ↑g'\n⊢ ∃ a, Tendsto x atTop (𝓝 a)\n[PROOFSTEP]\nset φ : ℕ → ℕ := fun n => Nat.recOn n (choose <| key₀ 0 0) fun k yk => choose <| key₀ (k + 1) yk\n[GOAL]\ncase intro.intro.mk\nG : Type u\ninst✝⁵ : Group G\ninst✝⁴ : TopologicalSpace G\ninst✝³ : TopologicalGroup G\ninst✝² : FirstCountableTopology G\nN : Subgroup G\ninst✝¹ : Subgroup.Normal N\ninst✝ : CompleteSpace G\nthis✝¹ : UniformSpace (G ⧸ N) := TopologicalGroup.toUniformSpace (G ⧸ N)\nthis✝ : UniformSpace G := TopologicalGroup.toUniformSpace G\nthis : IsCountablyGenerated (𝓤 (G ⧸ N))\nu : ℕ → Set G\nhu : HasAntitoneBasis (𝓝 1) u\nu_mul : ∀ (n : ℕ), u (n + 1) * u (n + 1) ⊆ u n\nhv : HasBasis (𝓝 1) (fun x => True) fun n => mk '' u n\nv_anti : Antitone fun n => mk '' u n\nx : ℕ → G ⧸ N\nhx : CauchySeq x\nkey₀ : ∀ (i j : ℕ), ∃ M, j < M ∧ ∀ (a b : ℕ), M ≤ a → M ≤ b → ∀ (g : G), x b = ↑g → ∃ g', g / g' ∈ u i ∧ x a = ↑g'\nφ : ℕ → ℕ :=\n  fun n =>\n    Nat.recOn n\n      (choose (_ : ∃ M, 0 < M ∧ ∀ (a b : ℕ), M ≤ a → M ≤ b → ∀ (g : G), x b = ↑g → ∃ g', g / g' ∈ u 0 ∧ x a = ↑g'))\n      fun k yk =>\n      choose (_ : ∃ M, yk < M ∧ ∀ (a b : ℕ), M ≤ a → M ≤ b → ∀ (g : G), x b = ↑g → ∃ g', g / g' ∈ u (k + 1) ∧ x a = ↑g')\n⊢ ∃ a, Tendsto x atTop (𝓝 a)\n[PROOFSTEP]\nhave hφ :\n  ∀ n : ℕ,\n    φ n < φ (n + 1) ∧\n      ∀ a b : ℕ, φ (n + 1) ≤ a → φ (n + 1) ≤ b → ∀ g : G, x b = g → ∃ g' : G, g / g' ∈ u (n + 1) ∧ x a = g' :=\n  fun n =>\n  choose_spec\n    (key₀ (n + 1) (φ n))\n      /- Inductively construct a sequence `x' n : G` of lifts of `x (φ (n + 1))` such that quotients of\n          successive terms lie in `x' n / x' (n + 1) ∈ u (n + 1)`. We actually need the proofs that each\n          term is a lift to construct the next term, so we use a Σ-type. -/\n[GOAL]\ncase intro.intro.mk\nG : Type u\ninst✝⁵ : Group G\ninst✝⁴ : TopologicalSpace G\ninst✝³ : TopologicalGroup G\ninst✝² : FirstCountableTopology G\nN : Subgroup G\ninst✝¹ : Subgroup.Normal N\ninst✝ : CompleteSpace G\nthis✝¹ : UniformSpace (G ⧸ N) := TopologicalGroup.toUniformSpace (G ⧸ N)\nthis✝ : UniformSpace G := TopologicalGroup.toUniformSpace G\nthis : IsCountablyGenerated (𝓤 (G ⧸ N))\nu : ℕ → Set G\nhu : HasAntitoneBasis (𝓝 1) u\nu_mul : ∀ (n : ℕ), u (n + 1) * u (n + 1) ⊆ u n\nhv : HasBasis (𝓝 1) (fun x => True) fun n => mk '' u n\nv_anti : Antitone fun n => mk '' u n\nx : ℕ → G ⧸ N\nhx : CauchySeq x\nkey₀ : ∀ (i j : ℕ), ∃ M, j < M ∧ ∀ (a b : ℕ), M ≤ a → M ≤ b → ∀ (g : G), x b = ↑g → ∃ g', g / g' ∈ u i ∧ x a = ↑g'\nφ : ℕ → ℕ :=\n  fun n =>\n    Nat.recOn n\n      (choose (_ : ∃ M, 0 < M ∧ ∀ (a b : ℕ), M ≤ a → M ≤ b → ∀ (g : G), x b = ↑g → ∃ g', g / g' ∈ u 0 ∧ x a = ↑g'))\n      fun k yk =>\n      choose (_ : ∃ M, yk < M ∧ ∀ (a b : ℕ), M ≤ a → M ≤ b → ∀ (g : G), x b = ↑g → ∃ g', g / g' ∈ u (k + 1) ∧ x a = ↑g')\nhφ :\n  ∀ (n : ℕ),\n    φ n < φ (n + 1) ∧\n      ∀ (a b : ℕ), φ (n + 1) ≤ a → φ (n + 1) ≤ b → ∀ (g : G), x b = ↑g → ∃ g', g / g' ∈ u (n + 1) ∧ x a = ↑g'\n⊢ ∃ a, Tendsto x atTop (𝓝 a)\n[PROOFSTEP]\nset x' : ∀ n, PSigma fun g : G => x (φ (n + 1)) = g := fun n =>\n  Nat.recOn n\n    ⟨choose (QuotientGroup.mk_surjective (x (φ 1))), (choose_spec (QuotientGroup.mk_surjective (x (φ 1)))).symm⟩\n    fun k hk =>\n    ⟨choose <| (hφ k).2 _ _ (hφ (k + 1)).1.le le_rfl hk.fst hk.snd,\n      (choose_spec <| (hφ k).2 _ _ (hφ (k + 1)).1.le le_rfl hk.fst hk.snd).2⟩\n[GOAL]\ncase intro.intro.mk\nG : Type u\ninst✝⁵ : Group G\ninst✝⁴ : TopologicalSpace G\ninst✝³ : TopologicalGroup G\ninst✝² : FirstCountableTopology G\nN : Subgroup G\ninst✝¹ : Subgroup.Normal N\ninst✝ : CompleteSpace G\nthis✝¹ : UniformSpace (G ⧸ N) := TopologicalGroup.toUniformSpace (G ⧸ N)\nthis✝ : UniformSpace G := TopologicalGroup.toUniformSpace G\nthis : IsCountablyGenerated (𝓤 (G ⧸ N))\nu : ℕ → Set G\nhu : HasAntitoneBasis (𝓝 1) u\nu_mul : ∀ (n : ℕ), u (n + 1) * u (n + 1) ⊆ u n\nhv : HasBasis (𝓝 1) (fun x => True) fun n => mk '' u n\nv_anti : Antitone fun n => mk '' u n\nx : ℕ → G ⧸ N\nhx : CauchySeq x\nkey₀ : ∀ (i j : ℕ), ∃ M, j < M ∧ ∀ (a b : ℕ), M ≤ a → M ≤ b → ∀ (g : G), x b = ↑g → ∃ g', g / g' ∈ u i ∧ x a = ↑g'\nφ : ℕ → ℕ :=\n  fun n =>\n    Nat.recOn n\n      (choose (_ : ∃ M, 0 < M ∧ ∀ (a b : ℕ), M ≤ a → M ≤ b → ∀ (g : G), x b = ↑g → ∃ g', g / g' ∈ u 0 ∧ x a = ↑g'))\n      fun k yk =>\n      choose (_ : ∃ M, yk < M ∧ ∀ (a b : ℕ), M ≤ a → M ≤ b → ∀ (g : G), x b = ↑g → ∃ g', g / g' ∈ u (k + 1) ∧ x a = ↑g')\nhφ :\n  ∀ (n : ℕ),\n    φ n < φ (n + 1) ∧\n      ∀ (a b : ℕ), φ (n + 1) ≤ a → φ (n + 1) ≤ b → ∀ (g : G), x b = ↑g → ∃ g', g / g' ∈ u (n + 1) ∧ x a = ↑g'\nx' : (n : ℕ) → (g : G) ×' x (φ (n + 1)) = ↑g :=\n  fun n =>\n    Nat.recOn n { fst := choose (_ : ∃ a, ↑a = x (φ 1)), snd := (_ : x (φ 1) = ↑(choose (_ : ∃ a, ↑a = x (φ 1)))) }\n      fun k hk =>\n      { fst := choose (_ : ∃ g', hk.fst / g' ∈ u (k + 1) ∧ x (φ (k + 1 + 1)) = ↑g'),\n        snd := (_ : x (φ (k + 1 + 1)) = ↑(choose (_ : ∃ g', hk.fst / g' ∈ u (k + 1) ∧ x (φ (k + 1 + 1)) = ↑g'))) }\n⊢ ∃ a, Tendsto x atTop (𝓝 a)\n[PROOFSTEP]\nhave hx' : ∀ n : ℕ, (x' n).fst / (x' (n + 1)).fst ∈ u (n + 1) := fun n =>\n  (choose_spec <| (hφ n).2 _ _ (hφ (n + 1)).1.le le_rfl (x' n).fst (x' n).snd).1\n    /- The sequence `x'` is Cauchy. This is where we exploit the condition on `u`. The key idea\n        is to show by decreasing induction that `x' m / x' n ∈ u m` if `m ≤ n`. -/\n[GOAL]\ncase intro.intro.mk\nG : Type u\ninst✝⁵ : Group G\ninst✝⁴ : TopologicalSpace G\ninst✝³ : TopologicalGroup G\ninst✝² : FirstCountableTopology G\nN : Subgroup G\ninst✝¹ : Subgroup.Normal N\ninst✝ : CompleteSpace G\nthis✝¹ : UniformSpace (G ⧸ N) := TopologicalGroup.toUniformSpace (G ⧸ N)\nthis✝ : UniformSpace G := TopologicalGroup.toUniformSpace G\nthis : IsCountablyGenerated (𝓤 (G ⧸ N))\nu : ℕ → Set G\nhu : HasAntitoneBasis (𝓝 1) u\nu_mul : ∀ (n : ℕ), u (n + 1) * u (n + 1) ⊆ u n\nhv : HasBasis (𝓝 1) (fun x => True) fun n => mk '' u n\nv_anti : Antitone fun n => mk '' u n\nx : ℕ → G ⧸ N\nhx : CauchySeq x\nkey₀ : ∀ (i j : ℕ), ∃ M, j < M ∧ ∀ (a b : ℕ), M ≤ a → M ≤ b → ∀ (g : G), x b = ↑g → ∃ g', g / g' ∈ u i ∧ x a = ↑g'\nφ : ℕ → ℕ :=\n  fun n =>\n    Nat.recOn n\n      (choose (_ : ∃ M, 0 < M ∧ ∀ (a b : ℕ), M ≤ a → M ≤ b → ∀ (g : G), x b = ↑g → ∃ g', g / g' ∈ u 0 ∧ x a = ↑g'))\n      fun k yk =>\n      choose (_ : ∃ M, yk < M ∧ ∀ (a b : ℕ), M ≤ a → M ≤ b → ∀ (g : G), x b = ↑g → ∃ g', g / g' ∈ u (k + 1) ∧ x a = ↑g')\nhφ :\n  ∀ (n : ℕ),\n    φ n < φ (n + 1) ∧\n      ∀ (a b : ℕ), φ (n + 1) ≤ a → φ (n + 1) ≤ b → ∀ (g : G), x b = ↑g → ∃ g', g / g' ∈ u (n + 1) ∧ x a = ↑g'\nx' : (n : ℕ) → (g : G) ×' x (φ (n + 1)) = ↑g :=\n  fun n =>\n    Nat.recOn n { fst := choose (_ : ∃ a, ↑a = x (φ 1)), snd := (_ : x (φ 1) = ↑(choose (_ : ∃ a, ↑a = x (φ 1)))) }\n      fun k hk =>\n      { fst := choose (_ : ∃ g', hk.fst / g' ∈ u (k + 1) ∧ x (φ (k + 1 + 1)) = ↑g'),\n        snd := (_ : x (φ (k + 1 + 1)) = ↑(choose (_ : ∃ g', hk.fst / g' ∈ u (k + 1) ∧ x (φ (k + 1 + 1)) = ↑g'))) }\nhx' : ∀ (n : ℕ), (x' n).fst / (x' (n + 1)).fst ∈ u (n + 1)\n⊢ ∃ a, Tendsto x atTop (𝓝 a)\n[PROOFSTEP]\nhave x'_cauchy : CauchySeq fun n => (x' n).fst :=\n  by\n  have h𝓤G : (𝓤 G).HasBasis (fun _ => True) fun i => {x | x.snd / x.fst ∈ u i} := by\n    simpa [uniformity_eq_comap_nhds_one'] using hu.toHasBasis.comap _\n  rw [h𝓤G.cauchySeq_iff']\n  simp only [ge_iff_le, mem_setOf_eq, forall_true_left]\n  exact fun m =>\n    ⟨m, fun n hmn =>\n      Nat.decreasingInduction' (fun k _ _ hk => u_mul k ⟨_, _, hx' k, hk, div_mul_div_cancel' _ _ _⟩) hmn\n        (by simpa only [div_self'] using mem_of_mem_nhds (hu.mem _))⟩\n      /- Since `G` is complete, `x'` converges to some `x₀`, and so the image of this sequence under\n          the quotient map converges to `↑x₀`. The image of `x'` is a convergent subsequence of `x`, and\n          since `x` is Cauchy, this implies it converges. -/\n[GOAL]\nG : Type u\ninst✝⁵ : Group G\ninst✝⁴ : TopologicalSpace G\ninst✝³ : TopologicalGroup G\ninst✝² : FirstCountableTopology G\nN : Subgroup G\ninst✝¹ : Subgroup.Normal N\ninst✝ : CompleteSpace G\nthis✝¹ : UniformSpace (G ⧸ N) := TopologicalGroup.toUniformSpace (G ⧸ N)\nthis✝ : UniformSpace G := TopologicalGroup.toUniformSpace G\nthis : IsCountablyGenerated (𝓤 (G ⧸ N))\nu : ℕ → Set G\nhu : HasAntitoneBasis (𝓝 1) u\nu_mul : ∀ (n : ℕ), u (n + 1) * u (n + 1) ⊆ u n\nhv : HasBasis (𝓝 1) (fun x => True) fun n => mk '' u n\nv_anti : Antitone fun n => mk '' u n\nx : ℕ → G ⧸ N\nhx : CauchySeq x\nkey₀ : ∀ (i j : ℕ), ∃ M, j < M ∧ ∀ (a b : ℕ), M ≤ a → M ≤ b → ∀ (g : G), x b = ↑g → ∃ g', g / g' ∈ u i ∧ x a = ↑g'\nφ : ℕ → ℕ :=\n  fun n =>\n    Nat.recOn n\n      (choose (_ : ∃ M, 0 < M ∧ ∀ (a b : ℕ), M ≤ a → M ≤ b → ∀ (g : G), x b = ↑g → ∃ g', g / g' ∈ u 0 ∧ x a = ↑g'))\n      fun k yk =>\n      choose (_ : ∃ M, yk < M ∧ ∀ (a b : ℕ), M ≤ a → M ≤ b → ∀ (g : G), x b = ↑g → ∃ g', g / g' ∈ u (k + 1) ∧ x a = ↑g')\nhφ :\n  ∀ (n : ℕ),\n    φ n < φ (n + 1) ∧\n      ∀ (a b : ℕ), φ (n + 1) ≤ a → φ (n + 1) ≤ b → ∀ (g : G), x b = ↑g → ∃ g', g / g' ∈ u (n + 1) ∧ x a = ↑g'\nx' : (n : ℕ) → (g : G) ×' x (φ (n + 1)) = ↑g :=\n  fun n =>\n    Nat.recOn n { fst := choose (_ : ∃ a, ↑a = x (φ 1)), snd := (_ : x (φ 1) = ↑(choose (_ : ∃ a, ↑a = x (φ 1)))) }\n      fun k hk =>\n      { fst := choose (_ : ∃ g', hk.fst / g' ∈ u (k + 1) ∧ x (φ (k + 1 + 1)) = ↑g'),\n        snd := (_ : x (φ (k + 1 + 1)) = ↑(choose (_ : ∃ g', hk.fst / g' ∈ u (k + 1) ∧ x (φ (k + 1 + 1)) = ↑g'))) }\nhx' : ∀ (n : ℕ), (x' n).fst / (x' (n + 1)).fst ∈ u (n + 1)\n⊢ CauchySeq fun n => (x' n).fst\n[PROOFSTEP]\nhave h𝓤G : (𝓤 G).HasBasis (fun _ => True) fun i => {x | x.snd / x.fst ∈ u i} := by\n  simpa [uniformity_eq_comap_nhds_one'] using hu.toHasBasis.comap _\n[GOAL]\nG : Type u\ninst✝⁵ : Group G\ninst✝⁴ : TopologicalSpace G\ninst✝³ : TopologicalGroup G\ninst✝² : FirstCountableTopology G\nN : Subgroup G\ninst✝¹ : Subgroup.Normal N\ninst✝ : CompleteSpace G\nthis✝¹ : UniformSpace (G ⧸ N) := TopologicalGroup.toUniformSpace (G ⧸ N)\nthis✝ : UniformSpace G := TopologicalGroup.toUniformSpace G\nthis : IsCountablyGenerated (𝓤 (G ⧸ N))\nu : ℕ → Set G\nhu : HasAntitoneBasis (𝓝 1) u\nu_mul : ∀ (n : ℕ), u (n + 1) * u (n + 1) ⊆ u n\nhv : HasBasis (𝓝 1) (fun x => True) fun n => mk '' u n\nv_anti : Antitone fun n => mk '' u n\nx : ℕ → G ⧸ N\nhx : CauchySeq x\nkey₀ : ∀ (i j : ℕ), ∃ M, j < M ∧ ∀ (a b : ℕ), M ≤ a → M ≤ b → ∀ (g : G), x b = ↑g → ∃ g', g / g' ∈ u i ∧ x a = ↑g'\nφ : ℕ → ℕ :=\n  fun n =>\n    Nat.recOn n\n      (choose (_ : ∃ M, 0 < M ∧ ∀ (a b : ℕ), M ≤ a → M ≤ b → ∀ (g : G), x b = ↑g → ∃ g', g / g' ∈ u 0 ∧ x a = ↑g'))\n      fun k yk =>\n      choose (_ : ∃ M, yk < M ∧ ∀ (a b : ℕ), M ≤ a → M ≤ b → ∀ (g : G), x b = ↑g → ∃ g', g / g' ∈ u (k + 1) ∧ x a = ↑g')\nhφ :\n  ∀ (n : ℕ),\n    φ n < φ (n + 1) ∧\n      ∀ (a b : ℕ), φ (n + 1) ≤ a → φ (n + 1) ≤ b → ∀ (g : G), x b = ↑g → ∃ g', g / g' ∈ u (n + 1) ∧ x a = ↑g'\nx' : (n : ℕ) → (g : G) ×' x (φ (n + 1)) = ↑g :=\n  fun n =>\n    Nat.recOn n { fst := choose (_ : ∃ a, ↑a = x (φ 1)), snd := (_ : x (φ 1) = ↑(choose (_ : ∃ a, ↑a = x (φ 1)))) }\n      fun k hk =>\n      { fst := choose (_ : ∃ g', hk.fst / g' ∈ u (k + 1) ∧ x (φ (k + 1 + 1)) = ↑g'),\n        snd := (_ : x (φ (k + 1 + 1)) = ↑(choose (_ : ∃ g', hk.fst / g' ∈ u (k + 1) ∧ x (φ (k + 1 + 1)) = ↑g'))) }\nhx' : ∀ (n : ℕ), (x' n).fst / (x' (n + 1)).fst ∈ u (n + 1)\n⊢ HasBasis (𝓤 G) (fun x => True) fun i => {x | x.snd / x.fst ∈ u i}\n[PROOFSTEP]\nsimpa [uniformity_eq_comap_nhds_one'] using hu.toHasBasis.comap _\n[GOAL]\nG : Type u\ninst✝⁵ : Group G\ninst✝⁴ : TopologicalSpace G\ninst✝³ : TopologicalGroup G\ninst✝² : FirstCountableTopology G\nN : Subgroup G\ninst✝¹ : Subgroup.Normal N\ninst✝ : CompleteSpace G\nthis✝¹ : UniformSpace (G ⧸ N) := TopologicalGroup.toUniformSpace (G ⧸ N)\nthis✝ : UniformSpace G := TopologicalGroup.toUniformSpace G\nthis : IsCountablyGenerated (𝓤 (G ⧸ N))\nu : ℕ → Set G\nhu : HasAntitoneBasis (𝓝 1) u\nu_mul : ∀ (n : ℕ), u (n + 1) * u (n + 1) ⊆ u n\nhv : HasBasis (𝓝 1) (fun x => True) fun n => mk '' u n\nv_anti : Antitone fun n => mk '' u n\nx : ℕ → G ⧸ N\nhx : CauchySeq x\nkey₀ : ∀ (i j : ℕ), ∃ M, j < M ∧ ∀ (a b : ℕ), M ≤ a → M ≤ b → ∀ (g : G), x b = ↑g → ∃ g', g / g' ∈ u i ∧ x a = ↑g'\nφ : ℕ → ℕ :=\n  fun n =>\n    Nat.recOn n\n      (choose (_ : ∃ M, 0 < M ∧ ∀ (a b : ℕ), M ≤ a → M ≤ b → ∀ (g : G), x b = ↑g → ∃ g', g / g' ∈ u 0 ∧ x a = ↑g'))\n      fun k yk =>\n      choose (_ : ∃ M, yk < M ∧ ∀ (a b : ℕ), M ≤ a → M ≤ b → ∀ (g : G), x b = ↑g → ∃ g', g / g' ∈ u (k + 1) ∧ x a = ↑g')\nhφ :\n  ∀ (n : ℕ),\n    φ n < φ (n + 1) ∧\n      ∀ (a b : ℕ), φ (n + 1) ≤ a → φ (n + 1) ≤ b → ∀ (g : G), x b = ↑g → ∃ g', g / g' ∈ u (n + 1) ∧ x a = ↑g'\nx' : (n : ℕ) → (g : G) ×' x (φ (n + 1)) = ↑g :=\n  fun n =>\n    Nat.recOn n { fst := choose (_ : ∃ a, ↑a = x (φ 1)), snd := (_ : x (φ 1) = ↑(choose (_ : ∃ a, ↑a = x (φ 1)))) }\n      fun k hk =>\n      { fst := choose (_ : ∃ g', hk.fst / g' ∈ u (k + 1) ∧ x (φ (k + 1 + 1)) = ↑g'),\n        snd := (_ : x (φ (k + 1 + 1)) = ↑(choose (_ : ∃ g', hk.fst / g' ∈ u (k + 1) ∧ x (φ (k + 1 + 1)) = ↑g'))) }\nhx' : ∀ (n : ℕ), (x' n).fst / (x' (n + 1)).fst ∈ u (n + 1)\nh𝓤G : HasBasis (𝓤 G) (fun x => True) fun i => {x | x.snd / x.fst ∈ u i}\n⊢ CauchySeq fun n => (x' n).fst\n[PROOFSTEP]\nrw [h𝓤G.cauchySeq_iff']\n[GOAL]\nG : Type u\ninst✝⁵ : Group G\ninst✝⁴ : TopologicalSpace G\ninst✝³ : TopologicalGroup G\ninst✝² : FirstCountableTopology G\nN : Subgroup G\ninst✝¹ : Subgroup.Normal N\ninst✝ : CompleteSpace G\nthis✝¹ : UniformSpace (G ⧸ N) := TopologicalGroup.toUniformSpace (G ⧸ N)\nthis✝ : UniformSpace G := TopologicalGroup.toUniformSpace G\nthis : IsCountablyGenerated (𝓤 (G ⧸ N))\nu : ℕ → Set G\nhu : HasAntitoneBasis (𝓝 1) u\nu_mul : ∀ (n : ℕ), u (n + 1) * u (n + 1) ⊆ u n\nhv : HasBasis (𝓝 1) (fun x => True) fun n => mk '' u n\nv_anti : Antitone fun n => mk '' u n\nx : ℕ → G ⧸ N\nhx : CauchySeq x\nkey₀ : ∀ (i j : ℕ), ∃ M, j < M ∧ ∀ (a b : ℕ), M ≤ a → M ≤ b → ∀ (g : G), x b = ↑g → ∃ g', g / g' ∈ u i ∧ x a = ↑g'\nφ : ℕ → ℕ :=\n  fun n =>\n    Nat.recOn n\n      (choose (_ : ∃ M, 0 < M ∧ ∀ (a b : ℕ), M ≤ a → M ≤ b → ∀ (g : G), x b = ↑g → ∃ g', g / g' ∈ u 0 ∧ x a = ↑g'))\n      fun k yk =>\n      choose (_ : ∃ M, yk < M ∧ ∀ (a b : ℕ), M ≤ a → M ≤ b → ∀ (g : G), x b = ↑g → ∃ g', g / g' ∈ u (k + 1) ∧ x a = ↑g')\nhφ :\n  ∀ (n : ℕ),\n    φ n < φ (n + 1) ∧\n      ∀ (a b : ℕ), φ (n + 1) ≤ a → φ (n + 1) ≤ b → ∀ (g : G), x b = ↑g → ∃ g', g / g' ∈ u (n + 1) ∧ x a = ↑g'\nx' : (n : ℕ) → (g : G) ×' x (φ (n + 1)) = ↑g :=\n  fun n =>\n    Nat.recOn n { fst := choose (_ : ∃ a, ↑a = x (φ 1)), snd := (_ : x (φ 1) = ↑(choose (_ : ∃ a, ↑a = x (φ 1)))) }\n      fun k hk =>\n      { fst := choose (_ : ∃ g', hk.fst / g' ∈ u (k + 1) ∧ x (φ (k + 1 + 1)) = ↑g'),\n        snd := (_ : x (φ (k + 1 + 1)) = ↑(choose (_ : ∃ g', hk.fst / g' ∈ u (k + 1) ∧ x (φ (k + 1 + 1)) = ↑g'))) }\nhx' : ∀ (n : ℕ), (x' n).fst / (x' (n + 1)).fst ∈ u (n + 1)\nh𝓤G : HasBasis (𝓤 G) (fun x => True) fun i => {x | x.snd / x.fst ∈ u i}\n⊢ ∀ (i : ℕ), True → ∃ N_1, ∀ (n : ℕ), n ≥ N_1 → ((x' n).fst, (x' N_1).fst) ∈ {x | x.snd / x.fst ∈ u i}\n[PROOFSTEP]\nsimp only [ge_iff_le, mem_setOf_eq, forall_true_left]\n[GOAL]\nG : Type u\ninst✝⁵ : Group G\ninst✝⁴ : TopologicalSpace G\ninst✝³ : TopologicalGroup G\ninst✝² : FirstCountableTopology G\nN : Subgroup G\ninst✝¹ : Subgroup.Normal N\ninst✝ : CompleteSpace G\nthis✝¹ : UniformSpace (G ⧸ N) := TopologicalGroup.toUniformSpace (G ⧸ N)\nthis✝ : UniformSpace G := TopologicalGroup.toUniformSpace G\nthis : IsCountablyGenerated (𝓤 (G ⧸ N))\nu : ℕ → Set G\nhu : HasAntitoneBasis (𝓝 1) u\nu_mul : ∀ (n : ℕ), u (n + 1) * u (n + 1) ⊆ u n\nhv : HasBasis (𝓝 1) (fun x => True) fun n => mk '' u n\nv_anti : Antitone fun n => mk '' u n\nx : ℕ → G ⧸ N\nhx : CauchySeq x\nkey₀ : ∀ (i j : ℕ), ∃ M, j < M ∧ ∀ (a b : ℕ), M ≤ a → M ≤ b → ∀ (g : G), x b = ↑g → ∃ g', g / g' ∈ u i ∧ x a = ↑g'\nφ : ℕ → ℕ :=\n  fun n =>\n    Nat.recOn n\n      (choose (_ : ∃ M, 0 < M ∧ ∀ (a b : ℕ), M ≤ a → M ≤ b → ∀ (g : G), x b = ↑g → ∃ g', g / g' ∈ u 0 ∧ x a = ↑g'))\n      fun k yk =>\n      choose (_ : ∃ M, yk < M ∧ ∀ (a b : ℕ), M ≤ a → M ≤ b → ∀ (g : G), x b = ↑g → ∃ g', g / g' ∈ u (k + 1) ∧ x a = ↑g')\nhφ :\n  ∀ (n : ℕ),\n    φ n < φ (n + 1) ∧\n      ∀ (a b : ℕ), φ (n + 1) ≤ a → φ (n + 1) ≤ b → ∀ (g : G), x b = ↑g → ∃ g', g / g' ∈ u (n + 1) ∧ x a = ↑g'\nx' : (n : ℕ) → (g : G) ×' x (φ (n + 1)) = ↑g :=\n  fun n =>\n    Nat.recOn n { fst := choose (_ : ∃ a, ↑a = x (φ 1)), snd := (_ : x (φ 1) = ↑(choose (_ : ∃ a, ↑a = x (φ 1)))) }\n      fun k hk =>\n      { fst := choose (_ : ∃ g', hk.fst / g' ∈ u (k + 1) ∧ x (φ (k + 1 + 1)) = ↑g'),\n        snd := (_ : x (φ (k + 1 + 1)) = ↑(choose (_ : ∃ g', hk.fst / g' ∈ u (k + 1) ∧ x (φ (k + 1 + 1)) = ↑g'))) }\nhx' : ∀ (n : ℕ), (x' n).fst / (x' (n + 1)).fst ∈ u (n + 1)\nh𝓤G : HasBasis (𝓤 G) (fun x => True) fun i => {x | x.snd / x.fst ∈ u i}\n⊢ ∀ (i : ℕ),\n    ∃ N_1,\n      ∀ (n : ℕ),\n        N_1 ≤ n →\n          (Nat.rec { fst := choose (_ : ∃ a, ↑a = x (φ 1)), snd := (_ : x (φ 1) = ↑(choose (_ : ∃ a, ↑a = x (φ 1)))) }\n                  (fun k hk =>\n                    { fst := choose (_ : ∃ g', hk.fst / g' ∈ u (k + 1) ∧ x (φ (k + 1 + 1)) = ↑g'),\n                      snd :=\n                        (_ :\n                          x (φ (k + 1 + 1)) =\n                            ↑(choose (_ : ∃ g', hk.fst / g' ∈ u (k + 1) ∧ x (φ (k + 1 + 1)) = ↑g'))) })\n                  N_1).fst /\n              (Nat.rec\n                  { fst := choose (_ : ∃ a, ↑a = x (φ 1)), snd := (_ : x (φ 1) = ↑(choose (_ : ∃ a, ↑a = x (φ 1)))) }\n                  (fun k hk =>\n                    { fst := choose (_ : ∃ g', hk.fst / g' ∈ u (k + 1) ∧ x (φ (k + 1 + 1)) = ↑g'),\n                      snd :=\n                        (_ :\n                          x (φ (k + 1 + 1)) =\n                            ↑(choose (_ : ∃ g', hk.fst / g' ∈ u (k + 1) ∧ x (φ (k + 1 + 1)) = ↑g'))) })\n                  n).fst ∈\n            u i\n[PROOFSTEP]\nexact fun m =>\n  ⟨m, fun n hmn =>\n    Nat.decreasingInduction' (fun k _ _ hk => u_mul k ⟨_, _, hx' k, hk, div_mul_div_cancel' _ _ _⟩) hmn\n      (by simpa only [div_self'] using mem_of_mem_nhds (hu.mem _))⟩\n    /- Since `G` is complete, `x'` converges to some `x₀`, and so the image of this sequence under\n        the quotient map converges to `↑x₀`. The image of `x'` is a convergent subsequence of `x`, and\n        since `x` is Cauchy, this implies it converges. -/\n[GOAL]\nG : Type u\ninst✝⁵ : Group G\ninst✝⁴ : TopologicalSpace G\ninst✝³ : TopologicalGroup G\ninst✝² : FirstCountableTopology G\nN : Subgroup G\ninst✝¹ : Subgroup.Normal N\ninst✝ : CompleteSpace G\nthis✝¹ : UniformSpace (G ⧸ N) := TopologicalGroup.toUniformSpace (G ⧸ N)\nthis✝ : UniformSpace G := TopologicalGroup.toUniformSpace G\nthis : IsCountablyGenerated (𝓤 (G ⧸ N))\nu : ℕ → Set G\nhu : HasAntitoneBasis (𝓝 1) u\nu_mul : ∀ (n : ℕ), u (n + 1) * u (n + 1) ⊆ u n\nhv : HasBasis (𝓝 1) (fun x => True) fun n => mk '' u n\nv_anti : Antitone fun n => mk '' u n\nx : ℕ → G ⧸ N\nhx : CauchySeq x\nkey₀ : ∀ (i j : ℕ), ∃ M, j < M ∧ ∀ (a b : ℕ), M ≤ a → M ≤ b → ∀ (g : G), x b = ↑g → ∃ g', g / g' ∈ u i ∧ x a = ↑g'\nφ : ℕ → ℕ :=\n  fun n =>\n    Nat.recOn n\n      (choose (_ : ∃ M, 0 < M ∧ ∀ (a b : ℕ), M ≤ a → M ≤ b → ∀ (g : G), x b = ↑g → ∃ g', g / g' ∈ u 0 ∧ x a = ↑g'))\n      fun k yk =>\n      choose (_ : ∃ M, yk < M ∧ ∀ (a b : ℕ), M ≤ a → M ≤ b → ∀ (g : G), x b = ↑g → ∃ g', g / g' ∈ u (k + 1) ∧ x a = ↑g')\nhφ :\n  ∀ (n : ℕ),\n    φ n < φ (n + 1) ∧\n      ∀ (a b : ℕ), φ (n + 1) ≤ a → φ (n + 1) ≤ b → ∀ (g : G), x b = ↑g → ∃ g', g / g' ∈ u (n + 1) ∧ x a = ↑g'\nx' : (n : ℕ) → (g : G) ×' x (φ (n + 1)) = ↑g :=\n  fun n =>\n    Nat.recOn n { fst := choose (_ : ∃ a, ↑a = x (φ 1)), snd := (_ : x (φ 1) = ↑(choose (_ : ∃ a, ↑a = x (φ 1)))) }\n      fun k hk =>\n      { fst := choose (_ : ∃ g', hk.fst / g' ∈ u (k + 1) ∧ x (φ (k + 1 + 1)) = ↑g'),\n        snd := (_ : x (φ (k + 1 + 1)) = ↑(choose (_ : ∃ g', hk.fst / g' ∈ u (k + 1) ∧ x (φ (k + 1 + 1)) = ↑g'))) }\nhx' : ∀ (n : ℕ), (x' n).fst / (x' (n + 1)).fst ∈ u (n + 1)\nh𝓤G : HasBasis (𝓤 G) (fun x => True) fun i => {x | x.snd / x.fst ∈ u i}\nm n : ℕ\nhmn : m ≤ n\n⊢ (Nat.rec { fst := choose (_ : ∃ a, ↑a = x (φ 1)), snd := (_ : x (φ 1) = ↑(choose (_ : ∃ a, ↑a = x (φ 1)))) }\n          (fun k hk =>\n            { fst := choose (_ : ∃ g', hk.fst / g' ∈ u (k + 1) ∧ x (φ (k + 1 + 1)) = ↑g'),\n              snd :=\n                (_ : x (φ (k + 1 + 1)) = ↑(choose (_ : ∃ g', hk.fst / g' ∈ u (k + 1) ∧ x (φ (k + 1 + 1)) = ↑g'))) })\n          n).fst /\n      (Nat.rec { fst := choose (_ : ∃ a, ↑a = x (φ 1)), snd := (_ : x (φ 1) = ↑(choose (_ : ∃ a, ↑a = x (φ 1)))) }\n          (fun k hk =>\n            { fst := choose (_ : ∃ g', hk.fst / g' ∈ u (k + 1) ∧ x (φ (k + 1 + 1)) = ↑g'),\n              snd :=\n                (_ : x (φ (k + 1 + 1)) = ↑(choose (_ : ∃ g', hk.fst / g' ∈ u (k + 1) ∧ x (φ (k + 1 + 1)) = ↑g'))) })\n          n).fst ∈\n    u n\n[PROOFSTEP]\nsimpa only [div_self'] using mem_of_mem_nhds (hu.mem _)\n[GOAL]\ncase intro.intro.mk\nG : Type u\ninst✝⁵ : Group G\ninst✝⁴ : TopologicalSpace G\ninst✝³ : TopologicalGroup G\ninst✝² : FirstCountableTopology G\nN : Subgroup G\ninst✝¹ : Subgroup.Normal N\ninst✝ : CompleteSpace G\nthis✝¹ : UniformSpace (G ⧸ N) := TopologicalGroup.toUniformSpace (G ⧸ N)\nthis✝ : UniformSpace G := TopologicalGroup.toUniformSpace G\nthis : IsCountablyGenerated (𝓤 (G ⧸ N))\nu : ℕ → Set G\nhu : HasAntitoneBasis (𝓝 1) u\nu_mul : ∀ (n : ℕ), u (n + 1) * u (n + 1) ⊆ u n\nhv : HasBasis (𝓝 1) (fun x => True) fun n => mk '' u n\nv_anti : Antitone fun n => mk '' u n\nx : ℕ → G ⧸ N\nhx : CauchySeq x\nkey₀ : ∀ (i j : ℕ), ∃ M, j < M ∧ ∀ (a b : ℕ), M ≤ a → M ≤ b → ∀ (g : G), x b = ↑g → ∃ g', g / g' ∈ u i ∧ x a = ↑g'\nφ : ℕ → ℕ :=\n  fun n =>\n    Nat.recOn n\n      (choose (_ : ∃ M, 0 < M ∧ ∀ (a b : ℕ), M ≤ a → M ≤ b → ∀ (g : G), x b = ↑g → ∃ g', g / g' ∈ u 0 ∧ x a = ↑g'))\n      fun k yk =>\n      choose (_ : ∃ M, yk < M ∧ ∀ (a b : ℕ), M ≤ a → M ≤ b → ∀ (g : G), x b = ↑g → ∃ g', g / g' ∈ u (k + 1) ∧ x a = ↑g')\nhφ :\n  ∀ (n : ℕ),\n    φ n < φ (n + 1) ∧\n      ∀ (a b : ℕ), φ (n + 1) ≤ a → φ (n + 1) ≤ b → ∀ (g : G), x b = ↑g → ∃ g', g / g' ∈ u (n + 1) ∧ x a = ↑g'\nx' : (n : ℕ) → (g : G) ×' x (φ (n + 1)) = ↑g :=\n  fun n =>\n    Nat.recOn n { fst := choose (_ : ∃ a, ↑a = x (φ 1)), snd := (_ : x (φ 1) = ↑(choose (_ : ∃ a, ↑a = x (φ 1)))) }\n      fun k hk =>\n      { fst := choose (_ : ∃ g', hk.fst / g' ∈ u (k + 1) ∧ x (φ (k + 1 + 1)) = ↑g'),\n        snd := (_ : x (φ (k + 1 + 1)) = ↑(choose (_ : ∃ g', hk.fst / g' ∈ u (k + 1) ∧ x (φ (k + 1 + 1)) = ↑g'))) }\nhx' : ∀ (n : ℕ), (x' n).fst / (x' (n + 1)).fst ∈ u (n + 1)\nx'_cauchy : CauchySeq fun n => (x' n).fst\n⊢ ∃ a, Tendsto x atTop (𝓝 a)\n[PROOFSTEP]\nrcases cauchySeq_tendsto_of_complete x'_cauchy with ⟨x₀, hx₀⟩\n[GOAL]\ncase intro.intro.mk.intro\nG : Type u\ninst✝⁵ : Group G\ninst✝⁴ : TopologicalSpace G\ninst✝³ : TopologicalGroup G\ninst✝² : FirstCountableTopology G\nN : Subgroup G\ninst✝¹ : Subgroup.Normal N\ninst✝ : CompleteSpace G\nthis✝¹ : UniformSpace (G ⧸ N) := TopologicalGroup.toUniformSpace (G ⧸ N)\nthis✝ : UniformSpace G := TopologicalGroup.toUniformSpace G\nthis : IsCountablyGenerated (𝓤 (G ⧸ N))\nu : ℕ → Set G\nhu : HasAntitoneBasis (𝓝 1) u\nu_mul : ∀ (n : ℕ), u (n + 1) * u (n + 1) ⊆ u n\nhv : HasBasis (𝓝 1) (fun x => True) fun n => mk '' u n\nv_anti : Antitone fun n => mk '' u n\nx : ℕ → G ⧸ N\nhx : CauchySeq x\nkey₀ : ∀ (i j : ℕ), ∃ M, j < M ∧ ∀ (a b : ℕ), M ≤ a → M ≤ b → ∀ (g : G), x b = ↑g → ∃ g', g / g' ∈ u i ∧ x a = ↑g'\nφ : ℕ → ℕ :=\n  fun n =>\n    Nat.recOn n\n      (choose (_ : ∃ M, 0 < M ∧ ∀ (a b : ℕ), M ≤ a → M ≤ b → ∀ (g : G), x b = ↑g → ∃ g', g / g' ∈ u 0 ∧ x a = ↑g'))\n      fun k yk =>\n      choose (_ : ∃ M, yk < M ∧ ∀ (a b : ℕ), M ≤ a → M ≤ b → ∀ (g : G), x b = ↑g → ∃ g', g / g' ∈ u (k + 1) ∧ x a = ↑g')\nhφ :\n  ∀ (n : ℕ),\n    φ n < φ (n + 1) ∧\n      ∀ (a b : ℕ), φ (n + 1) ≤ a → φ (n + 1) ≤ b → ∀ (g : G), x b = ↑g → ∃ g', g / g' ∈ u (n + 1) ∧ x a = ↑g'\nx' : (n : ℕ) → (g : G) ×' x (φ (n + 1)) = ↑g :=\n  fun n =>\n    Nat.recOn n { fst := choose (_ : ∃ a, ↑a = x (φ 1)), snd := (_ : x (φ 1) = ↑(choose (_ : ∃ a, ↑a = x (φ 1)))) }\n      fun k hk =>\n      { fst := choose (_ : ∃ g', hk.fst / g' ∈ u (k + 1) ∧ x (φ (k + 1 + 1)) = ↑g'),\n        snd := (_ : x (φ (k + 1 + 1)) = ↑(choose (_ : ∃ g', hk.fst / g' ∈ u (k + 1) ∧ x (φ (k + 1 + 1)) = ↑g'))) }\nhx' : ∀ (n : ℕ), (x' n).fst / (x' (n + 1)).fst ∈ u (n + 1)\nx'_cauchy : CauchySeq fun n => (x' n).fst\nx₀ : G\nhx₀ : Tendsto (fun n => (x' n).fst) atTop (𝓝 x₀)\n⊢ ∃ a, Tendsto x atTop (𝓝 a)\n[PROOFSTEP]\nrefine'\n  ⟨↑x₀, tendsto_nhds_of_cauchySeq_of_subseq hx (strictMono_nat_of_lt_succ fun n => (hφ (n + 1)).1).tendsto_atTop _⟩\n[GOAL]\ncase intro.intro.mk.intro\nG : Type u\ninst✝⁵ : Group G\ninst✝⁴ : TopologicalSpace G\ninst✝³ : TopologicalGroup G\ninst✝² : FirstCountableTopology G\nN : Subgroup G\ninst✝¹ : Subgroup.Normal N\ninst✝ : CompleteSpace G\nthis✝¹ : UniformSpace (G ⧸ N) := TopologicalGroup.toUniformSpace (G ⧸ N)\nthis✝ : UniformSpace G := TopologicalGroup.toUniformSpace G\nthis : IsCountablyGenerated (𝓤 (G ⧸ N))\nu : ℕ → Set G\nhu : HasAntitoneBasis (𝓝 1) u\nu_mul : ∀ (n : ℕ), u (n + 1) * u (n + 1) ⊆ u n\nhv : HasBasis (𝓝 1) (fun x => True) fun n => mk '' u n\nv_anti : Antitone fun n => mk '' u n\nx : ℕ → G ⧸ N\nhx : CauchySeq x\nkey₀ : ∀ (i j : ℕ), ∃ M, j < M ∧ ∀ (a b : ℕ), M ≤ a → M ≤ b → ∀ (g : G), x b = ↑g → ∃ g', g / g' ∈ u i ∧ x a = ↑g'\nφ : ℕ → ℕ :=\n  fun n =>\n    Nat.recOn n\n      (choose (_ : ∃ M, 0 < M ∧ ∀ (a b : ℕ), M ≤ a → M ≤ b → ∀ (g : G), x b = ↑g → ∃ g', g / g' ∈ u 0 ∧ x a = ↑g'))\n      fun k yk =>\n      choose (_ : ∃ M, yk < M ∧ ∀ (a b : ℕ), M ≤ a → M ≤ b → ∀ (g : G), x b = ↑g → ∃ g', g / g' ∈ u (k + 1) ∧ x a = ↑g')\nhφ :\n  ∀ (n : ℕ),\n    φ n < φ (n + 1) ∧\n      ∀ (a b : ℕ), φ (n + 1) ≤ a → φ (n + 1) ≤ b → ∀ (g : G), x b = ↑g → ∃ g', g / g' ∈ u (n + 1) ∧ x a = ↑g'\nx' : (n : ℕ) → (g : G) ×' x (φ (n + 1)) = ↑g :=\n  fun n =>\n    Nat.recOn n { fst := choose (_ : ∃ a, ↑a = x (φ 1)), snd := (_ : x (φ 1) = ↑(choose (_ : ∃ a, ↑a = x (φ 1)))) }\n      fun k hk =>\n      { fst := choose (_ : ∃ g', hk.fst / g' ∈ u (k + 1) ∧ x (φ (k + 1 + 1)) = ↑g'),\n        snd := (_ : x (φ (k + 1 + 1)) = ↑(choose (_ : ∃ g', hk.fst / g' ∈ u (k + 1) ∧ x (φ (k + 1 + 1)) = ↑g'))) }\nhx' : ∀ (n : ℕ), (x' n).fst / (x' (n + 1)).fst ∈ u (n + 1)\nx'_cauchy : CauchySeq fun n => (x' n).fst\nx₀ : G\nhx₀ : Tendsto (fun n => (x' n).fst) atTop (𝓝 x₀)\n⊢ Tendsto (x ∘ fun n => φ (n + 1)) atTop (𝓝 ↑x₀)\n[PROOFSTEP]\nconvert ((continuous_coinduced_rng : Continuous ((↑) : G → G ⧸ N)).tendsto x₀).comp hx₀\n[GOAL]\ncase h.e'_3\nG : Type u\ninst✝⁵ : Group G\ninst✝⁴ : TopologicalSpace G\ninst✝³ : TopologicalGroup G\ninst✝² : FirstCountableTopology G\nN : Subgroup G\ninst✝¹ : Subgroup.Normal N\ninst✝ : CompleteSpace G\nthis✝¹ : UniformSpace (G ⧸ N) := TopologicalGroup.toUniformSpace (G ⧸ N)\nthis✝ : UniformSpace G := TopologicalGroup.toUniformSpace G\nthis : IsCountablyGenerated (𝓤 (G ⧸ N))\nu : ℕ → Set G\nhu : HasAntitoneBasis (𝓝 1) u\nu_mul : ∀ (n : ℕ), u (n + 1) * u (n + 1) ⊆ u n\nhv : HasBasis (𝓝 1) (fun x => True) fun n => mk '' u n\nv_anti : Antitone fun n => mk '' u n\nx : ℕ → G ⧸ N\nhx : CauchySeq x\nkey₀ : ∀ (i j : ℕ), ∃ M, j < M ∧ ∀ (a b : ℕ), M ≤ a → M ≤ b → ∀ (g : G), x b = ↑g → ∃ g', g / g' ∈ u i ∧ x a = ↑g'\nφ : ℕ → ℕ :=\n  fun n =>\n    Nat.recOn n\n      (choose (_ : ∃ M, 0 < M ∧ ∀ (a b : ℕ), M ≤ a → M ≤ b → ∀ (g : G), x b = ↑g → ∃ g', g / g' ∈ u 0 ∧ x a = ↑g'))\n      fun k yk =>\n      choose (_ : ∃ M, yk < M ∧ ∀ (a b : ℕ), M ≤ a → M ≤ b → ∀ (g : G), x b = ↑g → ∃ g', g / g' ∈ u (k + 1) ∧ x a = ↑g')\nhφ :\n  ∀ (n : ℕ),\n    φ n < φ (n + 1) ∧\n      ∀ (a b : ℕ), φ (n + 1) ≤ a → φ (n + 1) ≤ b → ∀ (g : G), x b = ↑g → ∃ g', g / g' ∈ u (n + 1) ∧ x a = ↑g'\nx' : (n : ℕ) → (g : G) ×' x (φ (n + 1)) = ↑g :=\n  fun n =>\n    Nat.recOn n { fst := choose (_ : ∃ a, ↑a = x (φ 1)), snd := (_ : x (φ 1) = ↑(choose (_ : ∃ a, ↑a = x (φ 1)))) }\n      fun k hk =>\n      { fst := choose (_ : ∃ g', hk.fst / g' ∈ u (k + 1) ∧ x (φ (k + 1 + 1)) = ↑g'),\n        snd := (_ : x (φ (k + 1 + 1)) = ↑(choose (_ : ∃ g', hk.fst / g' ∈ u (k + 1) ∧ x (φ (k + 1 + 1)) = ↑g'))) }\nhx' : ∀ (n : ℕ), (x' n).fst / (x' (n + 1)).fst ∈ u (n + 1)\nx'_cauchy : CauchySeq fun n => (x' n).fst\nx₀ : G\nhx₀ : Tendsto (fun n => (x' n).fst) atTop (𝓝 x₀)\n⊢ (x ∘ fun n => φ (n + 1)) = mk ∘ fun n => (x' n).fst\n[PROOFSTEP]\nexact funext fun n => (x' n).snd\n[GOAL]\nG : Type u\ninst✝³ : Group G\nus : UniformSpace G\ninst✝² : UniformGroup G\ninst✝¹ : FirstCountableTopology G\nN : Subgroup G\ninst✝ : Subgroup.Normal N\nhG : CompleteSpace G\n⊢ CompleteSpace (G ⧸ N)\n[PROOFSTEP]\nrw [← @UniformGroup.toUniformSpace_eq _ us _ _] at hG \n[GOAL]\nG : Type u\ninst✝³ : Group G\nus : UniformSpace G\ninst✝² : UniformGroup G\ninst✝¹ : FirstCountableTopology G\nN : Subgroup G\ninst✝ : Subgroup.Normal N\nhG : CompleteSpace G\n⊢ CompleteSpace (G ⧸ N)\n[PROOFSTEP]\ninfer_instance\n", "meta": {"mathlib_filename": "Mathlib.Topology.Algebra.UniformGroup", "llama_tokens": 117750, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7549149868676284, "lm_q2_score": 0.6654105653819835, "lm_q1q2_score": 0.5023284082269213}}
{"text": "[GOAL]\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α✝ → α✝ → Prop\nα : Type u_3\ninst✝ : PartialOrder α\nx y : α\n⊢ x ≤ y → y = x ↔ ¬x < y\n[PROOFSTEP]\nrw [lt_iff_le_and_ne, not_and, Classical.not_not, eq_comm]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\ninst✝ : LinearOrder α\na b : α\n⊢ min a b = if b ≤ a then b else a\n[PROOFSTEP]\nrw [min_def]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\ninst✝ : LinearOrder α\na b : α\n⊢ (if a ≤ b then a else b) = if b ≤ a then b else a\n[PROOFSTEP]\nrcases lt_trichotomy a b with (lt | eq | gt)\n[GOAL]\ncase inl\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\ninst✝ : LinearOrder α\na b : α\nlt : a < b\n⊢ (if a ≤ b then a else b) = if b ≤ a then b else a\n[PROOFSTEP]\nrw [if_pos lt.le, if_neg (not_le.mpr lt)]\n[GOAL]\ncase inr.inl\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\ninst✝ : LinearOrder α\na b : α\neq : a = b\n⊢ (if a ≤ b then a else b) = if b ≤ a then b else a\n[PROOFSTEP]\nrw [if_pos eq.le, if_pos eq.ge, eq]\n[GOAL]\ncase inr.inr\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\ninst✝ : LinearOrder α\na b : α\ngt : b < a\n⊢ (if a ≤ b then a else b) = if b ≤ a then b else a\n[PROOFSTEP]\nrw [if_neg (not_le.mpr gt.gt), if_pos gt.le]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\ninst✝ : LinearOrder α\na b : α\n⊢ max a b = if b ≤ a then a else b\n[PROOFSTEP]\nrw [max_def]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\ninst✝ : LinearOrder α\na b : α\n⊢ (if a ≤ b then b else a) = if b ≤ a then a else b\n[PROOFSTEP]\nrcases lt_trichotomy a b with (lt | eq | gt)\n[GOAL]\ncase inl\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\ninst✝ : LinearOrder α\na b : α\nlt : a < b\n⊢ (if a ≤ b then b else a) = if b ≤ a then a else b\n[PROOFSTEP]\nrw [if_pos lt.le, if_neg (not_le.mpr lt)]\n[GOAL]\ncase inr.inl\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\ninst✝ : LinearOrder α\na b : α\neq : a = b\n⊢ (if a ≤ b then b else a) = if b ≤ a then a else b\n[PROOFSTEP]\nrw [if_pos eq.le, if_pos eq.ge, eq]\n[GOAL]\ncase inr.inr\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\ninst✝ : LinearOrder α\na b : α\ngt : b < a\n⊢ (if a ≤ b then b else a) = if b ≤ a then a else b\n[PROOFSTEP]\nrw [if_neg (not_le.mpr gt.gt), if_pos gt.le]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\ninst✝ : PartialOrder α\nf : α → α → α\ncomm : Commutative f\nassoc : ∀ (a b c : α), f (f a b) c ≤ f a (f b c)\na b c : α\n⊢ f a (f b c) ≤ f (f a b) c\n[PROOFSTEP]\nrw [comm, comm b, comm _ c, comm a]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\ninst✝ : PartialOrder α\nf : α → α → α\ncomm : Commutative f\nassoc : ∀ (a b c : α), f (f a b) c ≤ f a (f b c)\na b c : α\n⊢ f (f c b) a ≤ f c (f b a)\n[PROOFSTEP]\nexact assoc _ _ _\n[GOAL]\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α✝ → α✝ → Prop\nα : Type u_3\nA B : Preorder α\nle✝¹ A_lt : α → α → Prop\nle_refl✝¹ : ∀ (a : α), a ≤ a\nle_trans✝¹ : ∀ (a b c : α), a ≤ b → b ≤ c → a ≤ c\nA_iff : ∀ (a b : α), a < b ↔ a ≤ b ∧ ¬b ≤ a\nle✝ B_lt : α → α → Prop\nle_refl✝ : ∀ (a : α), a ≤ a\nle_trans✝ : ∀ (a b c : α), a ≤ b → b ≤ c → a ≤ c\nB_iff : ∀ (a b : α), a < b ↔ a ≤ b ∧ ¬b ≤ a\nh : toLE = toLE\n⊢ mk le_refl✝¹ le_trans✝¹ = mk le_refl✝ le_trans✝\n[PROOFSTEP]\ncases h\n[GOAL]\ncase refl\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α✝ → α✝ → Prop\nα : Type u_3\nA B : Preorder α\nle✝ A_lt : α → α → Prop\nle_refl✝¹ : ∀ (a : α), a ≤ a\nle_trans✝¹ : ∀ (a b c : α), a ≤ b → b ≤ c → a ≤ c\nA_iff : ∀ (a b : α), a < b ↔ a ≤ b ∧ ¬b ≤ a\nB_lt : α → α → Prop\nle_refl✝ : ∀ (a : α), a ≤ a\nle_trans✝ : ∀ (a b c : α), a ≤ b → b ≤ c → a ≤ c\nB_iff : ∀ (a b : α), a < b ↔ a ≤ b ∧ ¬b ≤ a\n⊢ mk le_refl✝¹ le_trans✝¹ = mk le_refl✝ le_trans✝\n[PROOFSTEP]\nhave : A_lt = B_lt := by\n  funext a b\n  show (LT.mk A_lt).lt a b = (LT.mk B_lt).lt a b\n  rw [A_iff, B_iff]\n[GOAL]\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α✝ → α✝ → Prop\nα : Type u_3\nA B : Preorder α\nle✝ A_lt : α → α → Prop\nle_refl✝¹ : ∀ (a : α), a ≤ a\nle_trans✝¹ : ∀ (a b c : α), a ≤ b → b ≤ c → a ≤ c\nA_iff : ∀ (a b : α), a < b ↔ a ≤ b ∧ ¬b ≤ a\nB_lt : α → α → Prop\nle_refl✝ : ∀ (a : α), a ≤ a\nle_trans✝ : ∀ (a b c : α), a ≤ b → b ≤ c → a ≤ c\nB_iff : ∀ (a b : α), a < b ↔ a ≤ b ∧ ¬b ≤ a\n⊢ A_lt = B_lt\n[PROOFSTEP]\nfunext a b\n[GOAL]\ncase h.h\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α✝ → α✝ → Prop\nα : Type u_3\nA B : Preorder α\nle✝ A_lt : α → α → Prop\nle_refl✝¹ : ∀ (a : α), a ≤ a\nle_trans✝¹ : ∀ (a b c : α), a ≤ b → b ≤ c → a ≤ c\nA_iff : ∀ (a b : α), a < b ↔ a ≤ b ∧ ¬b ≤ a\nB_lt : α → α → Prop\nle_refl✝ : ∀ (a : α), a ≤ a\nle_trans✝ : ∀ (a b c : α), a ≤ b → b ≤ c → a ≤ c\nB_iff : ∀ (a b : α), a < b ↔ a ≤ b ∧ ¬b ≤ a\na b : α\n⊢ A_lt a b = B_lt a b\n[PROOFSTEP]\nshow (LT.mk A_lt).lt a b = (LT.mk B_lt).lt a b\n[GOAL]\ncase h.h\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α✝ → α✝ → Prop\nα : Type u_3\nA B : Preorder α\nle✝ A_lt : α → α → Prop\nle_refl✝¹ : ∀ (a : α), a ≤ a\nle_trans✝¹ : ∀ (a b c : α), a ≤ b → b ≤ c → a ≤ c\nA_iff : ∀ (a b : α), a < b ↔ a ≤ b ∧ ¬b ≤ a\nB_lt : α → α → Prop\nle_refl✝ : ∀ (a : α), a ≤ a\nle_trans✝ : ∀ (a b c : α), a ≤ b → b ≤ c → a ≤ c\nB_iff : ∀ (a b : α), a < b ↔ a ≤ b ∧ ¬b ≤ a\na b : α\n⊢ (a < b) = (a < b)\n[PROOFSTEP]\nrw [A_iff, B_iff]\n[GOAL]\ncase refl\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α✝ → α✝ → Prop\nα : Type u_3\nA B : Preorder α\nle✝ A_lt : α → α → Prop\nle_refl✝¹ : ∀ (a : α), a ≤ a\nle_trans✝¹ : ∀ (a b c : α), a ≤ b → b ≤ c → a ≤ c\nA_iff : ∀ (a b : α), a < b ↔ a ≤ b ∧ ¬b ≤ a\nB_lt : α → α → Prop\nle_refl✝ : ∀ (a : α), a ≤ a\nle_trans✝ : ∀ (a b c : α), a ≤ b → b ≤ c → a ≤ c\nB_iff : ∀ (a b : α), a < b ↔ a ≤ b ∧ ¬b ≤ a\nthis : A_lt = B_lt\n⊢ mk le_refl✝¹ le_trans✝¹ = mk le_refl✝ le_trans✝\n[PROOFSTEP]\ncases this\n[GOAL]\ncase refl.refl\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α✝ → α✝ → Prop\nα : Type u_3\nA B : Preorder α\nle✝ A_lt : α → α → Prop\nle_refl✝¹ : ∀ (a : α), a ≤ a\nle_trans✝¹ : ∀ (a b c : α), a ≤ b → b ≤ c → a ≤ c\nA_iff : ∀ (a b : α), a < b ↔ a ≤ b ∧ ¬b ≤ a\nle_refl✝ : ∀ (a : α), a ≤ a\nle_trans✝ : ∀ (a b c : α), a ≤ b → b ≤ c → a ≤ c\nB_iff : ∀ (a b : α), a < b ↔ a ≤ b ∧ ¬b ≤ a\n⊢ mk le_refl✝¹ le_trans✝¹ = mk le_refl✝ le_trans✝\n[PROOFSTEP]\ncongr\n[GOAL]\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α✝ → α✝ → Prop\nα : Type u_3\nA B : PartialOrder α\nh : toPreorder = toPreorder\n⊢ A = B\n[PROOFSTEP]\ncases A\n[GOAL]\ncase mk\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α✝ → α✝ → Prop\nα : Type u_3\nB : PartialOrder α\ntoPreorder✝ : Preorder α\nle_antisymm✝ : ∀ (a b : α), a ≤ b → b ≤ a → a = b\nh : toPreorder = toPreorder\n⊢ mk le_antisymm✝ = B\n[PROOFSTEP]\ncases B\n[GOAL]\ncase mk.mk\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α✝ → α✝ → Prop\nα : Type u_3\ntoPreorder✝¹ : Preorder α\nle_antisymm✝¹ : ∀ (a b : α), a ≤ b → b ≤ a → a = b\ntoPreorder✝ : Preorder α\nle_antisymm✝ : ∀ (a b : α), a ≤ b → b ≤ a → a = b\nh : toPreorder = toPreorder\n⊢ mk le_antisymm✝¹ = mk le_antisymm✝\n[PROOFSTEP]\ncases h\n[GOAL]\ncase mk.mk.refl\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α✝ → α✝ → Prop\nα : Type u_3\ntoPreorder✝ : Preorder α\nle_antisymm✝¹ le_antisymm✝ : ∀ (a b : α), a ≤ b → b ≤ a → a = b\n⊢ mk le_antisymm✝¹ = mk le_antisymm✝\n[PROOFSTEP]\ncongr\n[GOAL]\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α✝ → α✝ → Prop\nα : Type u_3\nA B : LinearOrder α\nA_le A_lt : α → α → Prop\nle_refl✝¹ : ∀ (a : α), a ≤ a\nle_trans✝¹ : ∀ (a b c : α), a ≤ b → b ≤ c → a ≤ c\nlt_iff_le_not_le✝¹ : ∀ (a b : α), a < b ↔ a ≤ b ∧ ¬b ≤ a\nle_antisymm✝¹ : ∀ (a b : α), a ≤ b → b ≤ a → a = b\nA_min A_max : α → α → α\nA_compare : α → α → Ordering\nle_total✝¹ : ∀ (a b : α), a ≤ b ∨ b ≤ a\nA_decidableLE : DecidableRel fun x x_1 => x ≤ x_1\nA_decidableEq : DecidableEq α\nA_decidableLT : DecidableRel fun x x_1 => x < x_1\nA_min_def : ∀ (a b : α), min a b = if a ≤ b then a else b\nA_max_def : ∀ (a b : α), max a b = if a ≤ b then b else a\nA_compare_canonical : ∀ (a b : α), compare a b = compareOfLessAndEq a b\nB_le B_lt : α → α → Prop\nle_refl✝ : ∀ (a : α), a ≤ a\nle_trans✝ : ∀ (a b c : α), a ≤ b → b ≤ c → a ≤ c\nlt_iff_le_not_le✝ : ∀ (a b : α), a < b ↔ a ≤ b ∧ ¬b ≤ a\nle_antisymm✝ : ∀ (a b : α), a ≤ b → b ≤ a → a = b\nB_min B_max : α → α → α\nB_compare : α → α → Ordering\nle_total✝ : ∀ (a b : α), a ≤ b ∨ b ≤ a\nB_decidableLE : DecidableRel fun x x_1 => x ≤ x_1\nB_decidableEq : DecidableEq α\nB_decidableLT : DecidableRel fun x x_1 => x < x_1\nB_min_def : ∀ (a b : α), min a b = if a ≤ b then a else b\nB_max_def : ∀ (a b : α), max a b = if a ≤ b then b else a\nB_compare_canonical : ∀ (a b : α), compare a b = compareOfLessAndEq a b\nh : toPartialOrder = toPartialOrder\n⊢ mk le_total✝¹ A_decidableLE A_decidableEq A_decidableLT = mk le_total✝ B_decidableLE B_decidableEq B_decidableLT\n[PROOFSTEP]\ncases h\n[GOAL]\ncase refl\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α✝ → α✝ → Prop\nα : Type u_3\nA B : LinearOrder α\nA_le A_lt : α → α → Prop\nle_refl✝¹ : ∀ (a : α), a ≤ a\nle_trans✝¹ : ∀ (a b c : α), a ≤ b → b ≤ c → a ≤ c\nlt_iff_le_not_le✝¹ : ∀ (a b : α), a < b ↔ a ≤ b ∧ ¬b ≤ a\nle_antisymm✝¹ : ∀ (a b : α), a ≤ b → b ≤ a → a = b\nA_min A_max : α → α → α\nA_compare : α → α → Ordering\nle_total✝¹ : ∀ (a b : α), a ≤ b ∨ b ≤ a\nA_decidableLE : DecidableRel fun x x_1 => x ≤ x_1\nA_decidableEq : DecidableEq α\nA_decidableLT : DecidableRel fun x x_1 => x < x_1\nA_min_def : ∀ (a b : α), min a b = if a ≤ b then a else b\nA_max_def : ∀ (a b : α), max a b = if a ≤ b then b else a\nA_compare_canonical : ∀ (a b : α), compare a b = compareOfLessAndEq a b\nB_min B_max : α → α → α\nB_compare : α → α → Ordering\nB_decidableEq : DecidableEq α\nle_refl✝ : ∀ (a : α), a ≤ a\nle_trans✝ : ∀ (a b c : α), a ≤ b → b ≤ c → a ≤ c\nlt_iff_le_not_le✝ : ∀ (a b : α), a < b ↔ a ≤ b ∧ ¬b ≤ a\nle_antisymm✝ : ∀ (a b : α), a ≤ b → b ≤ a → a = b\nle_total✝ : ∀ (a b : α), a ≤ b ∨ b ≤ a\nB_decidableLE : DecidableRel fun x x_1 => x ≤ x_1\nB_decidableLT : DecidableRel fun x x_1 => x < x_1\nB_min_def : ∀ (a b : α), min a b = if a ≤ b then a else b\nB_max_def : ∀ (a b : α), max a b = if a ≤ b then b else a\nB_compare_canonical : ∀ (a b : α), compare a b = compareOfLessAndEq a b\n⊢ mk le_total✝¹ A_decidableLE A_decidableEq A_decidableLT = mk le_total✝ B_decidableLE B_decidableEq B_decidableLT\n[PROOFSTEP]\nobtain rfl : A_decidableLE = B_decidableLE := Subsingleton.elim _ _\n[GOAL]\ncase refl\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α✝ → α✝ → Prop\nα : Type u_3\nA B : LinearOrder α\nA_le A_lt : α → α → Prop\nle_refl✝¹ : ∀ (a : α), a ≤ a\nle_trans✝¹ : ∀ (a b c : α), a ≤ b → b ≤ c → a ≤ c\nlt_iff_le_not_le✝¹ : ∀ (a b : α), a < b ↔ a ≤ b ∧ ¬b ≤ a\nle_antisymm✝¹ : ∀ (a b : α), a ≤ b → b ≤ a → a = b\nA_min A_max : α → α → α\nA_compare : α → α → Ordering\nle_total✝¹ : ∀ (a b : α), a ≤ b ∨ b ≤ a\nA_decidableLE : DecidableRel fun x x_1 => x ≤ x_1\nA_decidableEq : DecidableEq α\nA_decidableLT : DecidableRel fun x x_1 => x < x_1\nA_min_def : ∀ (a b : α), min a b = if a ≤ b then a else b\nA_max_def : ∀ (a b : α), max a b = if a ≤ b then b else a\nA_compare_canonical : ∀ (a b : α), compare a b = compareOfLessAndEq a b\nB_min B_max : α → α → α\nB_compare : α → α → Ordering\nB_decidableEq : DecidableEq α\nle_refl✝ : ∀ (a : α), a ≤ a\nle_trans✝ : ∀ (a b c : α), a ≤ b → b ≤ c → a ≤ c\nlt_iff_le_not_le✝ : ∀ (a b : α), a < b ↔ a ≤ b ∧ ¬b ≤ a\nle_antisymm✝ : ∀ (a b : α), a ≤ b → b ≤ a → a = b\nle_total✝ : ∀ (a b : α), a ≤ b ∨ b ≤ a\nB_decidableLT : DecidableRel fun x x_1 => x < x_1\nB_compare_canonical : ∀ (a b : α), compare a b = compareOfLessAndEq a b\nB_min_def : ∀ (a b : α), min a b = if a ≤ b then a else b\nB_max_def : ∀ (a b : α), max a b = if a ≤ b then b else a\n⊢ mk le_total✝¹ A_decidableLE A_decidableEq A_decidableLT = mk le_total✝ A_decidableLE B_decidableEq B_decidableLT\n[PROOFSTEP]\nobtain rfl : A_decidableEq = B_decidableEq := Subsingleton.elim _ _\n[GOAL]\ncase refl\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α✝ → α✝ → Prop\nα : Type u_3\nA B : LinearOrder α\nA_le A_lt : α → α → Prop\nle_refl✝¹ : ∀ (a : α), a ≤ a\nle_trans✝¹ : ∀ (a b c : α), a ≤ b → b ≤ c → a ≤ c\nlt_iff_le_not_le✝¹ : ∀ (a b : α), a < b ↔ a ≤ b ∧ ¬b ≤ a\nle_antisymm✝¹ : ∀ (a b : α), a ≤ b → b ≤ a → a = b\nA_min A_max : α → α → α\nA_compare : α → α → Ordering\nle_total✝¹ : ∀ (a b : α), a ≤ b ∨ b ≤ a\nA_decidableLE : DecidableRel fun x x_1 => x ≤ x_1\nA_decidableEq : DecidableEq α\nA_decidableLT : DecidableRel fun x x_1 => x < x_1\nA_min_def : ∀ (a b : α), min a b = if a ≤ b then a else b\nA_max_def : ∀ (a b : α), max a b = if a ≤ b then b else a\nA_compare_canonical : ∀ (a b : α), compare a b = compareOfLessAndEq a b\nB_min B_max : α → α → α\nB_compare : α → α → Ordering\nle_refl✝ : ∀ (a : α), a ≤ a\nle_trans✝ : ∀ (a b c : α), a ≤ b → b ≤ c → a ≤ c\nlt_iff_le_not_le✝ : ∀ (a b : α), a < b ↔ a ≤ b ∧ ¬b ≤ a\nle_antisymm✝ : ∀ (a b : α), a ≤ b → b ≤ a → a = b\nle_total✝ : ∀ (a b : α), a ≤ b ∨ b ≤ a\nB_decidableLT : DecidableRel fun x x_1 => x < x_1\nB_min_def : ∀ (a b : α), min a b = if a ≤ b then a else b\nB_max_def : ∀ (a b : α), max a b = if a ≤ b then b else a\nB_compare_canonical : ∀ (a b : α), compare a b = compareOfLessAndEq a b\n⊢ mk le_total✝¹ A_decidableLE A_decidableEq A_decidableLT = mk le_total✝ A_decidableLE A_decidableEq B_decidableLT\n[PROOFSTEP]\nobtain rfl : A_decidableLT = B_decidableLT := Subsingleton.elim _ _\n[GOAL]\ncase refl\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α✝ → α✝ → Prop\nα : Type u_3\nA B : LinearOrder α\nA_le A_lt : α → α → Prop\nle_refl✝¹ : ∀ (a : α), a ≤ a\nle_trans✝¹ : ∀ (a b c : α), a ≤ b → b ≤ c → a ≤ c\nlt_iff_le_not_le✝¹ : ∀ (a b : α), a < b ↔ a ≤ b ∧ ¬b ≤ a\nle_antisymm✝¹ : ∀ (a b : α), a ≤ b → b ≤ a → a = b\nA_min A_max : α → α → α\nA_compare : α → α → Ordering\nle_total✝¹ : ∀ (a b : α), a ≤ b ∨ b ≤ a\nA_decidableLE : DecidableRel fun x x_1 => x ≤ x_1\nA_decidableEq : DecidableEq α\nA_decidableLT : DecidableRel fun x x_1 => x < x_1\nA_min_def : ∀ (a b : α), min a b = if a ≤ b then a else b\nA_max_def : ∀ (a b : α), max a b = if a ≤ b then b else a\nA_compare_canonical : ∀ (a b : α), compare a b = compareOfLessAndEq a b\nB_min B_max : α → α → α\nB_compare : α → α → Ordering\nle_refl✝ : ∀ (a : α), a ≤ a\nle_trans✝ : ∀ (a b c : α), a ≤ b → b ≤ c → a ≤ c\nlt_iff_le_not_le✝ : ∀ (a b : α), a < b ↔ a ≤ b ∧ ¬b ≤ a\nle_antisymm✝ : ∀ (a b : α), a ≤ b → b ≤ a → a = b\nle_total✝ : ∀ (a b : α), a ≤ b ∨ b ≤ a\nB_min_def : ∀ (a b : α), min a b = if a ≤ b then a else b\nB_max_def : ∀ (a b : α), max a b = if a ≤ b then b else a\nB_compare_canonical : ∀ (a b : α), compare a b = compareOfLessAndEq a b\n⊢ mk le_total✝¹ A_decidableLE A_decidableEq A_decidableLT = mk le_total✝ A_decidableLE A_decidableEq A_decidableLT\n[PROOFSTEP]\nhave : A_min = B_min := by\n  funext a b\n  exact (A_min_def _ _).trans (B_min_def _ _).symm\n[GOAL]\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α✝ → α✝ → Prop\nα : Type u_3\nA B : LinearOrder α\nA_le A_lt : α → α → Prop\nle_refl✝¹ : ∀ (a : α), a ≤ a\nle_trans✝¹ : ∀ (a b c : α), a ≤ b → b ≤ c → a ≤ c\nlt_iff_le_not_le✝¹ : ∀ (a b : α), a < b ↔ a ≤ b ∧ ¬b ≤ a\nle_antisymm✝¹ : ∀ (a b : α), a ≤ b → b ≤ a → a = b\nA_min A_max : α → α → α\nA_compare : α → α → Ordering\nle_total✝¹ : ∀ (a b : α), a ≤ b ∨ b ≤ a\nA_decidableLE : DecidableRel fun x x_1 => x ≤ x_1\nA_decidableEq : DecidableEq α\nA_decidableLT : DecidableRel fun x x_1 => x < x_1\nA_min_def : ∀ (a b : α), min a b = if a ≤ b then a else b\nA_max_def : ∀ (a b : α), max a b = if a ≤ b then b else a\nA_compare_canonical : ∀ (a b : α), compare a b = compareOfLessAndEq a b\nB_min B_max : α → α → α\nB_compare : α → α → Ordering\nle_refl✝ : ∀ (a : α), a ≤ a\nle_trans✝ : ∀ (a b c : α), a ≤ b → b ≤ c → a ≤ c\nlt_iff_le_not_le✝ : ∀ (a b : α), a < b ↔ a ≤ b ∧ ¬b ≤ a\nle_antisymm✝ : ∀ (a b : α), a ≤ b → b ≤ a → a = b\nle_total✝ : ∀ (a b : α), a ≤ b ∨ b ≤ a\nB_min_def : ∀ (a b : α), min a b = if a ≤ b then a else b\nB_max_def : ∀ (a b : α), max a b = if a ≤ b then b else a\nB_compare_canonical : ∀ (a b : α), compare a b = compareOfLessAndEq a b\n⊢ A_min = B_min\n[PROOFSTEP]\nfunext a b\n[GOAL]\ncase h.h\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α✝ → α✝ → Prop\nα : Type u_3\nA B : LinearOrder α\nA_le A_lt : α → α → Prop\nle_refl✝¹ : ∀ (a : α), a ≤ a\nle_trans✝¹ : ∀ (a b c : α), a ≤ b → b ≤ c → a ≤ c\nlt_iff_le_not_le✝¹ : ∀ (a b : α), a < b ↔ a ≤ b ∧ ¬b ≤ a\nle_antisymm✝¹ : ∀ (a b : α), a ≤ b → b ≤ a → a = b\nA_min A_max : α → α → α\nA_compare : α → α → Ordering\nle_total✝¹ : ∀ (a b : α), a ≤ b ∨ b ≤ a\nA_decidableLE : DecidableRel fun x x_1 => x ≤ x_1\nA_decidableEq : DecidableEq α\nA_decidableLT : DecidableRel fun x x_1 => x < x_1\nA_min_def : ∀ (a b : α), min a b = if a ≤ b then a else b\nA_max_def : ∀ (a b : α), max a b = if a ≤ b then b else a\nA_compare_canonical : ∀ (a b : α), compare a b = compareOfLessAndEq a b\nB_min B_max : α → α → α\nB_compare : α → α → Ordering\nle_refl✝ : ∀ (a : α), a ≤ a\nle_trans✝ : ∀ (a b c : α), a ≤ b → b ≤ c → a ≤ c\nlt_iff_le_not_le✝ : ∀ (a b : α), a < b ↔ a ≤ b ∧ ¬b ≤ a\nle_antisymm✝ : ∀ (a b : α), a ≤ b → b ≤ a → a = b\nle_total✝ : ∀ (a b : α), a ≤ b ∨ b ≤ a\nB_min_def : ∀ (a b : α), min a b = if a ≤ b then a else b\nB_max_def : ∀ (a b : α), max a b = if a ≤ b then b else a\nB_compare_canonical : ∀ (a b : α), compare a b = compareOfLessAndEq a b\na b : α\n⊢ A_min a b = B_min a b\n[PROOFSTEP]\nexact (A_min_def _ _).trans (B_min_def _ _).symm\n[GOAL]\ncase refl\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α✝ → α✝ → Prop\nα : Type u_3\nA B : LinearOrder α\nA_le A_lt : α → α → Prop\nle_refl✝¹ : ∀ (a : α), a ≤ a\nle_trans✝¹ : ∀ (a b c : α), a ≤ b → b ≤ c → a ≤ c\nlt_iff_le_not_le✝¹ : ∀ (a b : α), a < b ↔ a ≤ b ∧ ¬b ≤ a\nle_antisymm✝¹ : ∀ (a b : α), a ≤ b → b ≤ a → a = b\nA_min A_max : α → α → α\nA_compare : α → α → Ordering\nle_total✝¹ : ∀ (a b : α), a ≤ b ∨ b ≤ a\nA_decidableLE : DecidableRel fun x x_1 => x ≤ x_1\nA_decidableEq : DecidableEq α\nA_decidableLT : DecidableRel fun x x_1 => x < x_1\nA_min_def : ∀ (a b : α), min a b = if a ≤ b then a else b\nA_max_def : ∀ (a b : α), max a b = if a ≤ b then b else a\nA_compare_canonical : ∀ (a b : α), compare a b = compareOfLessAndEq a b\nB_min B_max : α → α → α\nB_compare : α → α → Ordering\nle_refl✝ : ∀ (a : α), a ≤ a\nle_trans✝ : ∀ (a b c : α), a ≤ b → b ≤ c → a ≤ c\nlt_iff_le_not_le✝ : ∀ (a b : α), a < b ↔ a ≤ b ∧ ¬b ≤ a\nle_antisymm✝ : ∀ (a b : α), a ≤ b → b ≤ a → a = b\nle_total✝ : ∀ (a b : α), a ≤ b ∨ b ≤ a\nB_min_def : ∀ (a b : α), min a b = if a ≤ b then a else b\nB_max_def : ∀ (a b : α), max a b = if a ≤ b then b else a\nB_compare_canonical : ∀ (a b : α), compare a b = compareOfLessAndEq a b\nthis : A_min = B_min\n⊢ mk le_total✝¹ A_decidableLE A_decidableEq A_decidableLT = mk le_total✝ A_decidableLE A_decidableEq A_decidableLT\n[PROOFSTEP]\ncases this\n[GOAL]\ncase refl.refl\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α✝ → α✝ → Prop\nα : Type u_3\nA B : LinearOrder α\nA_le A_lt : α → α → Prop\nle_refl✝¹ : ∀ (a : α), a ≤ a\nle_trans✝¹ : ∀ (a b c : α), a ≤ b → b ≤ c → a ≤ c\nlt_iff_le_not_le✝¹ : ∀ (a b : α), a < b ↔ a ≤ b ∧ ¬b ≤ a\nle_antisymm✝¹ : ∀ (a b : α), a ≤ b → b ≤ a → a = b\nA_min A_max : α → α → α\nA_compare : α → α → Ordering\nle_total✝¹ : ∀ (a b : α), a ≤ b ∨ b ≤ a\nA_decidableLE : DecidableRel fun x x_1 => x ≤ x_1\nA_decidableEq : DecidableEq α\nA_decidableLT : DecidableRel fun x x_1 => x < x_1\nA_min_def : ∀ (a b : α), min a b = if a ≤ b then a else b\nA_max_def : ∀ (a b : α), max a b = if a ≤ b then b else a\nA_compare_canonical : ∀ (a b : α), compare a b = compareOfLessAndEq a b\nB_max : α → α → α\nB_compare : α → α → Ordering\nle_refl✝ : ∀ (a : α), a ≤ a\nle_trans✝ : ∀ (a b c : α), a ≤ b → b ≤ c → a ≤ c\nlt_iff_le_not_le✝ : ∀ (a b : α), a < b ↔ a ≤ b ∧ ¬b ≤ a\nle_antisymm✝ : ∀ (a b : α), a ≤ b → b ≤ a → a = b\nle_total✝ : ∀ (a b : α), a ≤ b ∨ b ≤ a\nB_max_def : ∀ (a b : α), max a b = if a ≤ b then b else a\nB_compare_canonical : ∀ (a b : α), compare a b = compareOfLessAndEq a b\nB_min_def : ∀ (a b : α), min a b = if a ≤ b then a else b\n⊢ mk le_total✝¹ A_decidableLE A_decidableEq A_decidableLT = mk le_total✝ A_decidableLE A_decidableEq A_decidableLT\n[PROOFSTEP]\nhave : A_max = B_max := by\n  funext a b\n  exact (A_max_def _ _).trans (B_max_def _ _).symm\n[GOAL]\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α✝ → α✝ → Prop\nα : Type u_3\nA B : LinearOrder α\nA_le A_lt : α → α → Prop\nle_refl✝¹ : ∀ (a : α), a ≤ a\nle_trans✝¹ : ∀ (a b c : α), a ≤ b → b ≤ c → a ≤ c\nlt_iff_le_not_le✝¹ : ∀ (a b : α), a < b ↔ a ≤ b ∧ ¬b ≤ a\nle_antisymm✝¹ : ∀ (a b : α), a ≤ b → b ≤ a → a = b\nA_min A_max : α → α → α\nA_compare : α → α → Ordering\nle_total✝¹ : ∀ (a b : α), a ≤ b ∨ b ≤ a\nA_decidableLE : DecidableRel fun x x_1 => x ≤ x_1\nA_decidableEq : DecidableEq α\nA_decidableLT : DecidableRel fun x x_1 => x < x_1\nA_min_def : ∀ (a b : α), min a b = if a ≤ b then a else b\nA_max_def : ∀ (a b : α), max a b = if a ≤ b then b else a\nA_compare_canonical : ∀ (a b : α), compare a b = compareOfLessAndEq a b\nB_max : α → α → α\nB_compare : α → α → Ordering\nle_refl✝ : ∀ (a : α), a ≤ a\nle_trans✝ : ∀ (a b c : α), a ≤ b → b ≤ c → a ≤ c\nlt_iff_le_not_le✝ : ∀ (a b : α), a < b ↔ a ≤ b ∧ ¬b ≤ a\nle_antisymm✝ : ∀ (a b : α), a ≤ b → b ≤ a → a = b\nle_total✝ : ∀ (a b : α), a ≤ b ∨ b ≤ a\nB_max_def : ∀ (a b : α), max a b = if a ≤ b then b else a\nB_compare_canonical : ∀ (a b : α), compare a b = compareOfLessAndEq a b\nB_min_def : ∀ (a b : α), min a b = if a ≤ b then a else b\n⊢ A_max = B_max\n[PROOFSTEP]\nfunext a b\n[GOAL]\ncase h.h\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α✝ → α✝ → Prop\nα : Type u_3\nA B : LinearOrder α\nA_le A_lt : α → α → Prop\nle_refl✝¹ : ∀ (a : α), a ≤ a\nle_trans✝¹ : ∀ (a b c : α), a ≤ b → b ≤ c → a ≤ c\nlt_iff_le_not_le✝¹ : ∀ (a b : α), a < b ↔ a ≤ b ∧ ¬b ≤ a\nle_antisymm✝¹ : ∀ (a b : α), a ≤ b → b ≤ a → a = b\nA_min A_max : α → α → α\nA_compare : α → α → Ordering\nle_total✝¹ : ∀ (a b : α), a ≤ b ∨ b ≤ a\nA_decidableLE : DecidableRel fun x x_1 => x ≤ x_1\nA_decidableEq : DecidableEq α\nA_decidableLT : DecidableRel fun x x_1 => x < x_1\nA_min_def : ∀ (a b : α), min a b = if a ≤ b then a else b\nA_max_def : ∀ (a b : α), max a b = if a ≤ b then b else a\nA_compare_canonical : ∀ (a b : α), compare a b = compareOfLessAndEq a b\nB_max : α → α → α\nB_compare : α → α → Ordering\nle_refl✝ : ∀ (a : α), a ≤ a\nle_trans✝ : ∀ (a b c : α), a ≤ b → b ≤ c → a ≤ c\nlt_iff_le_not_le✝ : ∀ (a b : α), a < b ↔ a ≤ b ∧ ¬b ≤ a\nle_antisymm✝ : ∀ (a b : α), a ≤ b → b ≤ a → a = b\nle_total✝ : ∀ (a b : α), a ≤ b ∨ b ≤ a\nB_max_def : ∀ (a b : α), max a b = if a ≤ b then b else a\nB_compare_canonical : ∀ (a b : α), compare a b = compareOfLessAndEq a b\nB_min_def : ∀ (a b : α), min a b = if a ≤ b then a else b\na b : α\n⊢ A_max a b = B_max a b\n[PROOFSTEP]\nexact (A_max_def _ _).trans (B_max_def _ _).symm\n[GOAL]\ncase refl.refl\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α✝ → α✝ → Prop\nα : Type u_3\nA B : LinearOrder α\nA_le A_lt : α → α → Prop\nle_refl✝¹ : ∀ (a : α), a ≤ a\nle_trans✝¹ : ∀ (a b c : α), a ≤ b → b ≤ c → a ≤ c\nlt_iff_le_not_le✝¹ : ∀ (a b : α), a < b ↔ a ≤ b ∧ ¬b ≤ a\nle_antisymm✝¹ : ∀ (a b : α), a ≤ b → b ≤ a → a = b\nA_min A_max : α → α → α\nA_compare : α → α → Ordering\nle_total✝¹ : ∀ (a b : α), a ≤ b ∨ b ≤ a\nA_decidableLE : DecidableRel fun x x_1 => x ≤ x_1\nA_decidableEq : DecidableEq α\nA_decidableLT : DecidableRel fun x x_1 => x < x_1\nA_min_def : ∀ (a b : α), min a b = if a ≤ b then a else b\nA_max_def : ∀ (a b : α), max a b = if a ≤ b then b else a\nA_compare_canonical : ∀ (a b : α), compare a b = compareOfLessAndEq a b\nB_max : α → α → α\nB_compare : α → α → Ordering\nle_refl✝ : ∀ (a : α), a ≤ a\nle_trans✝ : ∀ (a b c : α), a ≤ b → b ≤ c → a ≤ c\nlt_iff_le_not_le✝ : ∀ (a b : α), a < b ↔ a ≤ b ∧ ¬b ≤ a\nle_antisymm✝ : ∀ (a b : α), a ≤ b → b ≤ a → a = b\nle_total✝ : ∀ (a b : α), a ≤ b ∨ b ≤ a\nB_max_def : ∀ (a b : α), max a b = if a ≤ b then b else a\nB_compare_canonical : ∀ (a b : α), compare a b = compareOfLessAndEq a b\nB_min_def : ∀ (a b : α), min a b = if a ≤ b then a else b\nthis : A_max = B_max\n⊢ mk le_total✝¹ A_decidableLE A_decidableEq A_decidableLT = mk le_total✝ A_decidableLE A_decidableEq A_decidableLT\n[PROOFSTEP]\ncases this\n[GOAL]\ncase refl.refl.refl\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α✝ → α✝ → Prop\nα : Type u_3\nA B : LinearOrder α\nA_le A_lt : α → α → Prop\nle_refl✝¹ : ∀ (a : α), a ≤ a\nle_trans✝¹ : ∀ (a b c : α), a ≤ b → b ≤ c → a ≤ c\nlt_iff_le_not_le✝¹ : ∀ (a b : α), a < b ↔ a ≤ b ∧ ¬b ≤ a\nle_antisymm✝¹ : ∀ (a b : α), a ≤ b → b ≤ a → a = b\nA_min A_max : α → α → α\nA_compare : α → α → Ordering\nle_total✝¹ : ∀ (a b : α), a ≤ b ∨ b ≤ a\nA_decidableLE : DecidableRel fun x x_1 => x ≤ x_1\nA_decidableEq : DecidableEq α\nA_decidableLT : DecidableRel fun x x_1 => x < x_1\nA_min_def : ∀ (a b : α), min a b = if a ≤ b then a else b\nA_max_def : ∀ (a b : α), max a b = if a ≤ b then b else a\nA_compare_canonical : ∀ (a b : α), compare a b = compareOfLessAndEq a b\nB_compare : α → α → Ordering\nle_refl✝ : ∀ (a : α), a ≤ a\nle_trans✝ : ∀ (a b c : α), a ≤ b → b ≤ c → a ≤ c\nlt_iff_le_not_le✝ : ∀ (a b : α), a < b ↔ a ≤ b ∧ ¬b ≤ a\nle_antisymm✝ : ∀ (a b : α), a ≤ b → b ≤ a → a = b\nle_total✝ : ∀ (a b : α), a ≤ b ∨ b ≤ a\nB_compare_canonical : ∀ (a b : α), compare a b = compareOfLessAndEq a b\nB_min_def : ∀ (a b : α), min a b = if a ≤ b then a else b\nB_max_def : ∀ (a b : α), max a b = if a ≤ b then b else a\n⊢ mk le_total✝¹ A_decidableLE A_decidableEq A_decidableLT = mk le_total✝ A_decidableLE A_decidableEq A_decidableLT\n[PROOFSTEP]\nhave : A_compare = B_compare := by\n  funext a b\n  exact (A_compare_canonical _ _).trans (B_compare_canonical _ _).symm\n[GOAL]\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α✝ → α✝ → Prop\nα : Type u_3\nA B : LinearOrder α\nA_le A_lt : α → α → Prop\nle_refl✝¹ : ∀ (a : α), a ≤ a\nle_trans✝¹ : ∀ (a b c : α), a ≤ b → b ≤ c → a ≤ c\nlt_iff_le_not_le✝¹ : ∀ (a b : α), a < b ↔ a ≤ b ∧ ¬b ≤ a\nle_antisymm✝¹ : ∀ (a b : α), a ≤ b → b ≤ a → a = b\nA_min A_max : α → α → α\nA_compare : α → α → Ordering\nle_total✝¹ : ∀ (a b : α), a ≤ b ∨ b ≤ a\nA_decidableLE : DecidableRel fun x x_1 => x ≤ x_1\nA_decidableEq : DecidableEq α\nA_decidableLT : DecidableRel fun x x_1 => x < x_1\nA_min_def : ∀ (a b : α), min a b = if a ≤ b then a else b\nA_max_def : ∀ (a b : α), max a b = if a ≤ b then b else a\nA_compare_canonical : ∀ (a b : α), compare a b = compareOfLessAndEq a b\nB_compare : α → α → Ordering\nle_refl✝ : ∀ (a : α), a ≤ a\nle_trans✝ : ∀ (a b c : α), a ≤ b → b ≤ c → a ≤ c\nlt_iff_le_not_le✝ : ∀ (a b : α), a < b ↔ a ≤ b ∧ ¬b ≤ a\nle_antisymm✝ : ∀ (a b : α), a ≤ b → b ≤ a → a = b\nle_total✝ : ∀ (a b : α), a ≤ b ∨ b ≤ a\nB_compare_canonical : ∀ (a b : α), compare a b = compareOfLessAndEq a b\nB_min_def : ∀ (a b : α), min a b = if a ≤ b then a else b\nB_max_def : ∀ (a b : α), max a b = if a ≤ b then b else a\n⊢ A_compare = B_compare\n[PROOFSTEP]\nfunext a b\n[GOAL]\ncase h.h\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α✝ → α✝ → Prop\nα : Type u_3\nA B : LinearOrder α\nA_le A_lt : α → α → Prop\nle_refl✝¹ : ∀ (a : α), a ≤ a\nle_trans✝¹ : ∀ (a b c : α), a ≤ b → b ≤ c → a ≤ c\nlt_iff_le_not_le✝¹ : ∀ (a b : α), a < b ↔ a ≤ b ∧ ¬b ≤ a\nle_antisymm✝¹ : ∀ (a b : α), a ≤ b → b ≤ a → a = b\nA_min A_max : α → α → α\nA_compare : α → α → Ordering\nle_total✝¹ : ∀ (a b : α), a ≤ b ∨ b ≤ a\nA_decidableLE : DecidableRel fun x x_1 => x ≤ x_1\nA_decidableEq : DecidableEq α\nA_decidableLT : DecidableRel fun x x_1 => x < x_1\nA_min_def : ∀ (a b : α), min a b = if a ≤ b then a else b\nA_max_def : ∀ (a b : α), max a b = if a ≤ b then b else a\nA_compare_canonical : ∀ (a b : α), compare a b = compareOfLessAndEq a b\nB_compare : α → α → Ordering\nle_refl✝ : ∀ (a : α), a ≤ a\nle_trans✝ : ∀ (a b c : α), a ≤ b → b ≤ c → a ≤ c\nlt_iff_le_not_le✝ : ∀ (a b : α), a < b ↔ a ≤ b ∧ ¬b ≤ a\nle_antisymm✝ : ∀ (a b : α), a ≤ b → b ≤ a → a = b\nle_total✝ : ∀ (a b : α), a ≤ b ∨ b ≤ a\nB_compare_canonical : ∀ (a b : α), compare a b = compareOfLessAndEq a b\nB_min_def : ∀ (a b : α), min a b = if a ≤ b then a else b\nB_max_def : ∀ (a b : α), max a b = if a ≤ b then b else a\na b : α\n⊢ A_compare a b = B_compare a b\n[PROOFSTEP]\nexact (A_compare_canonical _ _).trans (B_compare_canonical _ _).symm\n[GOAL]\ncase refl.refl.refl\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α✝ → α✝ → Prop\nα : Type u_3\nA B : LinearOrder α\nA_le A_lt : α → α → Prop\nle_refl✝¹ : ∀ (a : α), a ≤ a\nle_trans✝¹ : ∀ (a b c : α), a ≤ b → b ≤ c → a ≤ c\nlt_iff_le_not_le✝¹ : ∀ (a b : α), a < b ↔ a ≤ b ∧ ¬b ≤ a\nle_antisymm✝¹ : ∀ (a b : α), a ≤ b → b ≤ a → a = b\nA_min A_max : α → α → α\nA_compare : α → α → Ordering\nle_total✝¹ : ∀ (a b : α), a ≤ b ∨ b ≤ a\nA_decidableLE : DecidableRel fun x x_1 => x ≤ x_1\nA_decidableEq : DecidableEq α\nA_decidableLT : DecidableRel fun x x_1 => x < x_1\nA_min_def : ∀ (a b : α), min a b = if a ≤ b then a else b\nA_max_def : ∀ (a b : α), max a b = if a ≤ b then b else a\nA_compare_canonical : ∀ (a b : α), compare a b = compareOfLessAndEq a b\nB_compare : α → α → Ordering\nle_refl✝ : ∀ (a : α), a ≤ a\nle_trans✝ : ∀ (a b c : α), a ≤ b → b ≤ c → a ≤ c\nlt_iff_le_not_le✝ : ∀ (a b : α), a < b ↔ a ≤ b ∧ ¬b ≤ a\nle_antisymm✝ : ∀ (a b : α), a ≤ b → b ≤ a → a = b\nle_total✝ : ∀ (a b : α), a ≤ b ∨ b ≤ a\nB_compare_canonical : ∀ (a b : α), compare a b = compareOfLessAndEq a b\nB_min_def : ∀ (a b : α), min a b = if a ≤ b then a else b\nB_max_def : ∀ (a b : α), max a b = if a ≤ b then b else a\nthis : A_compare = B_compare\n⊢ mk le_total✝¹ A_decidableLE A_decidableEq A_decidableLT = mk le_total✝ A_decidableLE A_decidableEq A_decidableLT\n[PROOFSTEP]\ncongr\n[GOAL]\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α✝ → α✝ → Prop\nα : Type u_3\nA B : Preorder α\nH : ∀ (x y : α), x ≤ y ↔ x ≤ y\n⊢ A = B\n[PROOFSTEP]\next x y\n[GOAL]\ncase a.le.h.h.a\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α✝ → α✝ → Prop\nα : Type u_3\nA B : Preorder α\nH : ∀ (x y : α), x ≤ y ↔ x ≤ y\nx y : α\n⊢ x ≤ y ↔ x ≤ y\n[PROOFSTEP]\nexact H x y\n[GOAL]\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α✝ → α✝ → Prop\nα : Type u_3\nA B : PartialOrder α\nH : ∀ (x y : α), x ≤ y ↔ x ≤ y\n⊢ A = B\n[PROOFSTEP]\next x y\n[GOAL]\ncase a.a.le.h.h.a\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α✝ → α✝ → Prop\nα : Type u_3\nA B : PartialOrder α\nH : ∀ (x y : α), x ≤ y ↔ x ≤ y\nx y : α\n⊢ x ≤ y ↔ x ≤ y\n[PROOFSTEP]\nexact H x y\n[GOAL]\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α✝ → α✝ → Prop\nα : Type u_3\nA B : LinearOrder α\nH : ∀ (x y : α), x ≤ y ↔ x ≤ y\n⊢ A = B\n[PROOFSTEP]\next x y\n[GOAL]\ncase a.a.a.le.h.h.a\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α✝ → α✝ → Prop\nα : Type u_3\nA B : LinearOrder α\nH : ∀ (x y : α), x ≤ y ↔ x ≤ y\nx y : α\n⊢ x ≤ y ↔ x ≤ y\n[PROOFSTEP]\nexact H x y\n[GOAL]\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α✝ → α✝ → Prop\nα : Type u_3\ninst✝ : LinearOrder α\nsrc✝ : PartialOrder αᵒᵈ := inferInstanceAs (PartialOrder αᵒᵈ)\na b : αᵒᵈ\n⊢ max a b = if a ≤ b then a else b\n[PROOFSTEP]\nrw [max_comm, max_def]\n[GOAL]\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α✝ → α✝ → Prop\nα : Type u_3\ninst✝ : LinearOrder α\nsrc✝ : PartialOrder αᵒᵈ := inferInstanceAs (PartialOrder αᵒᵈ)\na b : αᵒᵈ\n⊢ (if b ≤ a then a else b) = if a ≤ b then a else b\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α✝ → α✝ → Prop\nα : Type u_3\ninst✝ : LinearOrder α\nsrc✝ : PartialOrder αᵒᵈ := inferInstanceAs (PartialOrder αᵒᵈ)\na b : αᵒᵈ\n⊢ min a b = if a ≤ b then b else a\n[PROOFSTEP]\nrw [min_comm, min_def]\n[GOAL]\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α✝ → α✝ → Prop\nα : Type u_3\ninst✝ : LinearOrder α\nsrc✝ : PartialOrder αᵒᵈ := inferInstanceAs (PartialOrder αᵒᵈ)\na b : αᵒᵈ\n⊢ (if b ≤ a then b else a) = if a ≤ b then b else a\n[PROOFSTEP]\nrfl\n[GOAL]\nι✝ : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nπ : ι✝ → Type u_2\nr : α✝ → α✝ → Prop\nι : Type u\nα : ι → Type v\ninst✝ : (i : ι) → Preorder (α i)\nx y : (i : ι) → α i\n⊢ x < y ↔ x ≤ y ∧ ∃ i, x i < y i\n[PROOFSTEP]\nsimp (config := { contextual := true }) [lt_iff_le_not_le, Pi.le_def]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\ninst✝¹ : (i : ι) → Preorder (π i)\na b c : (i : ι) → π i\ninst✝ : Nonempty ι\nh : a ≺ b\n⊢ a < b\n[PROOFSTEP]\ninhabit ι\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\ninst✝¹ : (i : ι) → Preorder (π i)\na b c : (i : ι) → π i\ninst✝ : Nonempty ι\nh : a ≺ b\ninhabited_h : Inhabited ι\n⊢ a < b\n[PROOFSTEP]\nexact Pi.lt_def.2 ⟨le_of_strongLT h, default, h _⟩\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\ninst✝¹ : DecidableEq ι\ninst✝ : (i : ι) → Preorder (π i)\nx y : (i : ι) → π i\ni : ι\na b : π i\n⊢ update x i a ≤ update y i b ↔ a ≤ b ∧ ∀ (j : ι), j ≠ i → x j ≤ y j\n[PROOFSTEP]\nsimp (config := { contextual := true }) [update_le_iff]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\ninst✝¹ : DecidableEq ι\ninst✝ : (i : ι) → Preorder (π i)\nx y : (i : ι) → π i\ni : ι\na b : π i\n⊢ update x i a ≤ update x i b ↔ a ≤ b\n[PROOFSTEP]\nsimp [update_le_update_iff]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\ninst✝¹ : DecidableEq ι\ninst✝ : (i : ι) → Preorder (π i)\nx y : (i : ι) → π i\ni : ι\na b : π i\n⊢ x ≤ update x i a ↔ x i ≤ a\n[PROOFSTEP]\nsimp [le_update_iff]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\ninst✝¹ : DecidableEq ι\ninst✝ : (i : ι) → Preorder (π i)\nx y : (i : ι) → π i\ni : ι\na b : π i\n⊢ update x i a ≤ x ↔ a ≤ x i\n[PROOFSTEP]\nsimp [update_le_iff]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\ninst✝¹ : DecidableEq ι\ninst✝ : (i : ι) → Preorder (π i)\nx y : (i : ι) → π i\ni : ι\na b : π i\n⊢ x < update x i a ↔ x i < a\n[PROOFSTEP]\nsimp [lt_iff_le_not_le]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\ninst✝¹ : DecidableEq ι\ninst✝ : (i : ι) → Preorder (π i)\nx y : (i : ι) → π i\ni : ι\na b : π i\n⊢ update x i a < x ↔ a < x i\n[PROOFSTEP]\nsimp [lt_iff_le_not_le]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\ninst✝¹ : Preorder α\ninst✝ : Nonempty β\na b : α\n⊢ const β a ≤ const β b ↔ a ≤ b\n[PROOFSTEP]\nsimp [Pi.le_def]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\ninst✝¹ : Preorder α\ninst✝ : Nonempty β\na b : α\n⊢ const β a < const β b ↔ a < b\n[PROOFSTEP]\nsimpa [Pi.lt_def] using le_of_lt\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\ninst✝ : LinearOrder α\np : α → Prop\nx✝ y✝ x y : α\n⊢ min x y = if x < y then x else y\n[PROOFSTEP]\nrw [min_comm, min_def, ← ite_not]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\ninst✝ : LinearOrder α\np : α → Prop\nx✝ y✝ x y : α\n⊢ (if ¬y ≤ x then x else y) = if x < y then x else y\n[PROOFSTEP]\nsimp only [not_le]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\ninst✝ : LinearOrder α\np : α → Prop\nx✝ y✝ x y : α\n⊢ max x y = if x < y then y else x\n[PROOFSTEP]\nrw [max_comm, max_def, ← ite_not]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\ninst✝ : LinearOrder α\np : α → Prop\nx✝ y✝ x y : α\n⊢ (if ¬y ≤ x then y else x) = if x < y then y else x\n[PROOFSTEP]\nsimp only [not_le]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\na b : α\ninst✝² : LinearOrder β\ninst✝¹ : DecidableEq α\nf : α → β\ninj : Injective f\ninst✝ : Decidable (a < b)\n⊢ compare (f a) (f b) = compareOfLessAndEq a b\n[PROOFSTEP]\nhave h := LinearOrder.compare_eq_compareOfLessAndEq (f a) (f b)\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\na b : α\ninst✝² : LinearOrder β\ninst✝¹ : DecidableEq α\nf : α → β\ninj : Injective f\ninst✝ : Decidable (a < b)\nh : compare (f a) (f b) = compareOfLessAndEq (f a) (f b)\n⊢ compare (f a) (f b) = compareOfLessAndEq a b\n[PROOFSTEP]\nsimp only [h, compareOfLessAndEq]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\na b : α\ninst✝² : LinearOrder β\ninst✝¹ : DecidableEq α\nf : α → β\ninj : Injective f\ninst✝ : Decidable (a < b)\nh : compare (f a) (f b) = compareOfLessAndEq (f a) (f b)\n⊢ (if f a < f b then Ordering.lt else if f a = f b then Ordering.eq else Ordering.gt) =\n    if a < b then Ordering.lt else if a = b then Ordering.eq else Ordering.gt\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\na b : α\ninst✝² : LinearOrder β\ninst✝¹ : DecidableEq α\nf : α → β\ninj : Injective f\ninst✝ : Decidable (a < b)\nh : compare (f a) (f b) = compareOfLessAndEq (f a) (f b)\nh✝¹ : f a < f b\nh✝ : a < b\n⊢ Ordering.lt = Ordering.lt\n[PROOFSTEP]\ntry\n  (first\n    | rfl\n    | contradiction)\n[GOAL]\ncase pos\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\na b : α\ninst✝² : LinearOrder β\ninst✝¹ : DecidableEq α\nf : α → β\ninj : Injective f\ninst✝ : Decidable (a < b)\nh : compare (f a) (f b) = compareOfLessAndEq (f a) (f b)\nh✝¹ : f a < f b\nh✝ : a < b\n⊢ Ordering.lt = Ordering.lt\n[PROOFSTEP]\nfirst\n| rfl\n| contradiction\n[GOAL]\ncase pos\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\na b : α\ninst✝² : LinearOrder β\ninst✝¹ : DecidableEq α\nf : α → β\ninj : Injective f\ninst✝ : Decidable (a < b)\nh : compare (f a) (f b) = compareOfLessAndEq (f a) (f b)\nh✝¹ : f a < f b\nh✝ : a < b\n⊢ Ordering.lt = Ordering.lt\n[PROOFSTEP]\nrfl\n[GOAL]\ncase pos\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\na b : α\ninst✝² : LinearOrder β\ninst✝¹ : DecidableEq α\nf : α → β\ninj : Injective f\ninst✝ : Decidable (a < b)\nh : compare (f a) (f b) = compareOfLessAndEq (f a) (f b)\nh✝² : f a < f b\nh✝¹ : ¬a < b\nh✝ : a = b\n⊢ False\n[PROOFSTEP]\ntry\n  (first\n    | rfl\n    | contradiction)\n[GOAL]\ncase pos\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\na b : α\ninst✝² : LinearOrder β\ninst✝¹ : DecidableEq α\nf : α → β\ninj : Injective f\ninst✝ : Decidable (a < b)\nh : compare (f a) (f b) = compareOfLessAndEq (f a) (f b)\nh✝² : f a < f b\nh✝¹ : ¬a < b\nh✝ : a = b\n⊢ False\n[PROOFSTEP]\nfirst\n| rfl\n| contradiction\n[GOAL]\ncase pos\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\na b : α\ninst✝² : LinearOrder β\ninst✝¹ : DecidableEq α\nf : α → β\ninj : Injective f\ninst✝ : Decidable (a < b)\nh : compare (f a) (f b) = compareOfLessAndEq (f a) (f b)\nh✝² : f a < f b\nh✝¹ : ¬a < b\nh✝ : a = b\n⊢ False\n[PROOFSTEP]\nrfl\n[GOAL]\ncase pos\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\na b : α\ninst✝² : LinearOrder β\ninst✝¹ : DecidableEq α\nf : α → β\ninj : Injective f\ninst✝ : Decidable (a < b)\nh : compare (f a) (f b) = compareOfLessAndEq (f a) (f b)\nh✝² : f a < f b\nh✝¹ : ¬a < b\nh✝ : a = b\n⊢ False\n[PROOFSTEP]\ncontradiction\n[GOAL]\ncase neg\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\na b : α\ninst✝² : LinearOrder β\ninst✝¹ : DecidableEq α\nf : α → β\ninj : Injective f\ninst✝ : Decidable (a < b)\nh : compare (f a) (f b) = compareOfLessAndEq (f a) (f b)\nh✝² : f a < f b\nh✝¹ : ¬a < b\nh✝ : ¬a = b\n⊢ False\n[PROOFSTEP]\ntry\n  (first\n    | rfl\n    | contradiction)\n[GOAL]\ncase neg\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\na b : α\ninst✝² : LinearOrder β\ninst✝¹ : DecidableEq α\nf : α → β\ninj : Injective f\ninst✝ : Decidable (a < b)\nh : compare (f a) (f b) = compareOfLessAndEq (f a) (f b)\nh✝² : f a < f b\nh✝¹ : ¬a < b\nh✝ : ¬a = b\n⊢ False\n[PROOFSTEP]\nfirst\n| rfl\n| contradiction\n[GOAL]\ncase neg\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\na b : α\ninst✝² : LinearOrder β\ninst✝¹ : DecidableEq α\nf : α → β\ninj : Injective f\ninst✝ : Decidable (a < b)\nh : compare (f a) (f b) = compareOfLessAndEq (f a) (f b)\nh✝² : f a < f b\nh✝¹ : ¬a < b\nh✝ : ¬a = b\n⊢ False\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\na b : α\ninst✝² : LinearOrder β\ninst✝¹ : DecidableEq α\nf : α → β\ninj : Injective f\ninst✝ : Decidable (a < b)\nh : compare (f a) (f b) = compareOfLessAndEq (f a) (f b)\nh✝² : f a < f b\nh✝¹ : ¬a < b\nh✝ : ¬a = b\n⊢ False\n[PROOFSTEP]\ncontradiction\n[GOAL]\ncase pos\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\na b : α\ninst✝² : LinearOrder β\ninst✝¹ : DecidableEq α\nf : α → β\ninj : Injective f\ninst✝ : Decidable (a < b)\nh : compare (f a) (f b) = compareOfLessAndEq (f a) (f b)\nh✝² : ¬f a < f b\nh✝¹ : f a = f b\nh✝ : a < b\n⊢ False\n[PROOFSTEP]\ntry\n  (first\n    | rfl\n    | contradiction)\n[GOAL]\ncase pos\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\na b : α\ninst✝² : LinearOrder β\ninst✝¹ : DecidableEq α\nf : α → β\ninj : Injective f\ninst✝ : Decidable (a < b)\nh : compare (f a) (f b) = compareOfLessAndEq (f a) (f b)\nh✝² : ¬f a < f b\nh✝¹ : f a = f b\nh✝ : a < b\n⊢ False\n[PROOFSTEP]\nfirst\n| rfl\n| contradiction\n[GOAL]\ncase pos\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\na b : α\ninst✝² : LinearOrder β\ninst✝¹ : DecidableEq α\nf : α → β\ninj : Injective f\ninst✝ : Decidable (a < b)\nh : compare (f a) (f b) = compareOfLessAndEq (f a) (f b)\nh✝² : ¬f a < f b\nh✝¹ : f a = f b\nh✝ : a < b\n⊢ False\n[PROOFSTEP]\nrfl\n[GOAL]\ncase pos\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\na b : α\ninst✝² : LinearOrder β\ninst✝¹ : DecidableEq α\nf : α → β\ninj : Injective f\ninst✝ : Decidable (a < b)\nh : compare (f a) (f b) = compareOfLessAndEq (f a) (f b)\nh✝² : ¬f a < f b\nh✝¹ : f a = f b\nh✝ : a < b\n⊢ False\n[PROOFSTEP]\ncontradiction\n[GOAL]\ncase pos\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\na b : α\ninst✝² : LinearOrder β\ninst✝¹ : DecidableEq α\nf : α → β\ninj : Injective f\ninst✝ : Decidable (a < b)\nh : compare (f a) (f b) = compareOfLessAndEq (f a) (f b)\nh✝³ : ¬f a < f b\nh✝² : f a = f b\nh✝¹ : ¬a < b\nh✝ : a = b\n⊢ Ordering.eq = Ordering.eq\n[PROOFSTEP]\ntry\n  (first\n    | rfl\n    | contradiction)\n[GOAL]\ncase pos\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\na b : α\ninst✝² : LinearOrder β\ninst✝¹ : DecidableEq α\nf : α → β\ninj : Injective f\ninst✝ : Decidable (a < b)\nh : compare (f a) (f b) = compareOfLessAndEq (f a) (f b)\nh✝³ : ¬f a < f b\nh✝² : f a = f b\nh✝¹ : ¬a < b\nh✝ : a = b\n⊢ Ordering.eq = Ordering.eq\n[PROOFSTEP]\nfirst\n| rfl\n| contradiction\n[GOAL]\ncase pos\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\na b : α\ninst✝² : LinearOrder β\ninst✝¹ : DecidableEq α\nf : α → β\ninj : Injective f\ninst✝ : Decidable (a < b)\nh : compare (f a) (f b) = compareOfLessAndEq (f a) (f b)\nh✝³ : ¬f a < f b\nh✝² : f a = f b\nh✝¹ : ¬a < b\nh✝ : a = b\n⊢ Ordering.eq = Ordering.eq\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\na b : α\ninst✝² : LinearOrder β\ninst✝¹ : DecidableEq α\nf : α → β\ninj : Injective f\ninst✝ : Decidable (a < b)\nh : compare (f a) (f b) = compareOfLessAndEq (f a) (f b)\nh✝³ : ¬f a < f b\nh✝² : f a = f b\nh✝¹ : ¬a < b\nh✝ : ¬a = b\n⊢ False\n[PROOFSTEP]\ntry\n  (first\n    | rfl\n    | contradiction)\n[GOAL]\ncase neg\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\na b : α\ninst✝² : LinearOrder β\ninst✝¹ : DecidableEq α\nf : α → β\ninj : Injective f\ninst✝ : Decidable (a < b)\nh : compare (f a) (f b) = compareOfLessAndEq (f a) (f b)\nh✝³ : ¬f a < f b\nh✝² : f a = f b\nh✝¹ : ¬a < b\nh✝ : ¬a = b\n⊢ False\n[PROOFSTEP]\nfirst\n| rfl\n| contradiction\n[GOAL]\ncase neg\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\na b : α\ninst✝² : LinearOrder β\ninst✝¹ : DecidableEq α\nf : α → β\ninj : Injective f\ninst✝ : Decidable (a < b)\nh : compare (f a) (f b) = compareOfLessAndEq (f a) (f b)\nh✝³ : ¬f a < f b\nh✝² : f a = f b\nh✝¹ : ¬a < b\nh✝ : ¬a = b\n⊢ False\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\na b : α\ninst✝² : LinearOrder β\ninst✝¹ : DecidableEq α\nf : α → β\ninj : Injective f\ninst✝ : Decidable (a < b)\nh : compare (f a) (f b) = compareOfLessAndEq (f a) (f b)\nh✝³ : ¬f a < f b\nh✝² : f a = f b\nh✝¹ : ¬a < b\nh✝ : ¬a = b\n⊢ False\n[PROOFSTEP]\ncontradiction\n[GOAL]\ncase pos\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\na b : α\ninst✝² : LinearOrder β\ninst✝¹ : DecidableEq α\nf : α → β\ninj : Injective f\ninst✝ : Decidable (a < b)\nh : compare (f a) (f b) = compareOfLessAndEq (f a) (f b)\nh✝² : ¬f a < f b\nh✝¹ : ¬f a = f b\nh✝ : a < b\n⊢ False\n[PROOFSTEP]\ntry\n  (first\n    | rfl\n    | contradiction)\n[GOAL]\ncase pos\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\na b : α\ninst✝² : LinearOrder β\ninst✝¹ : DecidableEq α\nf : α → β\ninj : Injective f\ninst✝ : Decidable (a < b)\nh : compare (f a) (f b) = compareOfLessAndEq (f a) (f b)\nh✝² : ¬f a < f b\nh✝¹ : ¬f a = f b\nh✝ : a < b\n⊢ False\n[PROOFSTEP]\nfirst\n| rfl\n| contradiction\n[GOAL]\ncase pos\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\na b : α\ninst✝² : LinearOrder β\ninst✝¹ : DecidableEq α\nf : α → β\ninj : Injective f\ninst✝ : Decidable (a < b)\nh : compare (f a) (f b) = compareOfLessAndEq (f a) (f b)\nh✝² : ¬f a < f b\nh✝¹ : ¬f a = f b\nh✝ : a < b\n⊢ False\n[PROOFSTEP]\nrfl\n[GOAL]\ncase pos\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\na b : α\ninst✝² : LinearOrder β\ninst✝¹ : DecidableEq α\nf : α → β\ninj : Injective f\ninst✝ : Decidable (a < b)\nh : compare (f a) (f b) = compareOfLessAndEq (f a) (f b)\nh✝² : ¬f a < f b\nh✝¹ : ¬f a = f b\nh✝ : a < b\n⊢ False\n[PROOFSTEP]\ncontradiction\n[GOAL]\ncase pos\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\na b : α\ninst✝² : LinearOrder β\ninst✝¹ : DecidableEq α\nf : α → β\ninj : Injective f\ninst✝ : Decidable (a < b)\nh : compare (f a) (f b) = compareOfLessAndEq (f a) (f b)\nh✝³ : ¬f a < f b\nh✝² : ¬f a = f b\nh✝¹ : ¬a < b\nh✝ : a = b\n⊢ False\n[PROOFSTEP]\ntry\n  (first\n    | rfl\n    | contradiction)\n[GOAL]\ncase pos\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\na b : α\ninst✝² : LinearOrder β\ninst✝¹ : DecidableEq α\nf : α → β\ninj : Injective f\ninst✝ : Decidable (a < b)\nh : compare (f a) (f b) = compareOfLessAndEq (f a) (f b)\nh✝³ : ¬f a < f b\nh✝² : ¬f a = f b\nh✝¹ : ¬a < b\nh✝ : a = b\n⊢ False\n[PROOFSTEP]\nfirst\n| rfl\n| contradiction\n[GOAL]\ncase pos\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\na b : α\ninst✝² : LinearOrder β\ninst✝¹ : DecidableEq α\nf : α → β\ninj : Injective f\ninst✝ : Decidable (a < b)\nh : compare (f a) (f b) = compareOfLessAndEq (f a) (f b)\nh✝³ : ¬f a < f b\nh✝² : ¬f a = f b\nh✝¹ : ¬a < b\nh✝ : a = b\n⊢ False\n[PROOFSTEP]\nrfl\n[GOAL]\ncase pos\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\na b : α\ninst✝² : LinearOrder β\ninst✝¹ : DecidableEq α\nf : α → β\ninj : Injective f\ninst✝ : Decidable (a < b)\nh : compare (f a) (f b) = compareOfLessAndEq (f a) (f b)\nh✝³ : ¬f a < f b\nh✝² : ¬f a = f b\nh✝¹ : ¬a < b\nh✝ : a = b\n⊢ False\n[PROOFSTEP]\ncontradiction\n[GOAL]\ncase neg\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\na b : α\ninst✝² : LinearOrder β\ninst✝¹ : DecidableEq α\nf : α → β\ninj : Injective f\ninst✝ : Decidable (a < b)\nh : compare (f a) (f b) = compareOfLessAndEq (f a) (f b)\nh✝³ : ¬f a < f b\nh✝² : ¬f a = f b\nh✝¹ : ¬a < b\nh✝ : ¬a = b\n⊢ Ordering.gt = Ordering.gt\n[PROOFSTEP]\ntry\n  (first\n    | rfl\n    | contradiction)\n[GOAL]\ncase neg\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\na b : α\ninst✝² : LinearOrder β\ninst✝¹ : DecidableEq α\nf : α → β\ninj : Injective f\ninst✝ : Decidable (a < b)\nh : compare (f a) (f b) = compareOfLessAndEq (f a) (f b)\nh✝³ : ¬f a < f b\nh✝² : ¬f a = f b\nh✝¹ : ¬a < b\nh✝ : ¬a = b\n⊢ Ordering.gt = Ordering.gt\n[PROOFSTEP]\nfirst\n| rfl\n| contradiction\n[GOAL]\ncase neg\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\na b : α\ninst✝² : LinearOrder β\ninst✝¹ : DecidableEq α\nf : α → β\ninj : Injective f\ninst✝ : Decidable (a < b)\nh : compare (f a) (f b) = compareOfLessAndEq (f a) (f b)\nh✝³ : ¬f a < f b\nh✝² : ¬f a = f b\nh✝¹ : ¬a < b\nh✝ : ¬a = b\n⊢ Ordering.gt = Ordering.gt\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\na b : α\ninst✝² : LinearOrder β\ninst✝¹ : DecidableEq α\nf : α → β\ninj : Injective f\ninst✝ : Decidable (a < b)\nh : compare (f a) (f b) = compareOfLessAndEq (f a) (f b)\nh✝³ : ¬f a < f b\nh✝² : f a = f b\nh✝¹ : ¬a < b\nh✝ : ¬a = b\n⊢ False\n[PROOFSTEP]\nhave : ¬f a = f b := by rename_i h; exact inj.ne h\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\na b : α\ninst✝² : LinearOrder β\ninst✝¹ : DecidableEq α\nf : α → β\ninj : Injective f\ninst✝ : Decidable (a < b)\nh : compare (f a) (f b) = compareOfLessAndEq (f a) (f b)\nh✝³ : ¬f a < f b\nh✝² : f a = f b\nh✝¹ : ¬a < b\nh✝ : ¬a = b\n⊢ ¬f a = f b\n[PROOFSTEP]\nrename_i h\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\na b : α\ninst✝² : LinearOrder β\ninst✝¹ : DecidableEq α\nf : α → β\ninj : Injective f\ninst✝ : Decidable (a < b)\nh✝³ : compare (f a) (f b) = compareOfLessAndEq (f a) (f b)\nh✝² : ¬f a < f b\nh✝¹ : f a = f b\nh✝ : ¬a < b\nh : ¬a = b\n⊢ ¬f a = f b\n[PROOFSTEP]\nexact inj.ne h\n[GOAL]\ncase neg\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\na b : α\ninst✝² : LinearOrder β\ninst✝¹ : DecidableEq α\nf : α → β\ninj : Injective f\ninst✝ : Decidable (a < b)\nh : compare (f a) (f b) = compareOfLessAndEq (f a) (f b)\nh✝³ : ¬f a < f b\nh✝² : f a = f b\nh✝¹ : ¬a < b\nh✝ : ¬a = b\nthis : ¬f a = f b\n⊢ False\n[PROOFSTEP]\ncontradiction\n[GOAL]\ncase pos\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\na b : α\ninst✝² : LinearOrder β\ninst✝¹ : DecidableEq α\nf : α → β\ninj : Injective f\ninst✝ : Decidable (a < b)\nh : compare (f a) (f b) = compareOfLessAndEq (f a) (f b)\nh✝³ : ¬f a < f b\nh✝² : ¬f a = f b\nh✝¹ : ¬a < b\nh✝ : a = b\n⊢ False\n[PROOFSTEP]\nhave : f a = f b := by rename_i h; exact congrArg f h\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\na b : α\ninst✝² : LinearOrder β\ninst✝¹ : DecidableEq α\nf : α → β\ninj : Injective f\ninst✝ : Decidable (a < b)\nh : compare (f a) (f b) = compareOfLessAndEq (f a) (f b)\nh✝³ : ¬f a < f b\nh✝² : ¬f a = f b\nh✝¹ : ¬a < b\nh✝ : a = b\n⊢ f a = f b\n[PROOFSTEP]\nrename_i h\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\na b : α\ninst✝² : LinearOrder β\ninst✝¹ : DecidableEq α\nf : α → β\ninj : Injective f\ninst✝ : Decidable (a < b)\nh✝³ : compare (f a) (f b) = compareOfLessAndEq (f a) (f b)\nh✝² : ¬f a < f b\nh✝¹ : ¬f a = f b\nh✝ : ¬a < b\nh : a = b\n⊢ f a = f b\n[PROOFSTEP]\nexact congrArg f h\n[GOAL]\ncase pos\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\na b : α\ninst✝² : LinearOrder β\ninst✝¹ : DecidableEq α\nf : α → β\ninj : Injective f\ninst✝ : Decidable (a < b)\nh : compare (f a) (f b) = compareOfLessAndEq (f a) (f b)\nh✝³ : ¬f a < f b\nh✝² : ¬f a = f b\nh✝¹ : ¬a < b\nh✝ : a = b\nthis : f a = f b\n⊢ False\n[PROOFSTEP]\ncontradiction\n[GOAL]\nι : Type u_1\nα✝ : Type u\nβ✝ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α✝ → α✝ → Prop\nα : Type ?u.96324\nβ : Type ?u.96321\ninst✝² : LinearOrder β\ninst✝¹ : Sup α\ninst✝ : Inf α\nf : α → β\ninj : Injective f\nhsup : ∀ (x y : α), f (x ⊔ y) = max (f x) (f y)\nhinf : ∀ (x y : α), f (x ⊓ y) = min (f x) (f y)\ninstOrdα : Ord α := { compare := fun a b => compare (f a) (f b) }\ndecidableLE : (x y : α) → Decidable (f x ≤ f y) := fun x y => inferInstance\ndecidableLT : (x y : α) → Decidable (f x < f y) := fun x y => inferInstance\ndecidableEq : (x y : α) → Decidable (x = y) := fun x y => decidable_of_iff (f x = f y) (_ : f x = f y ↔ x = y)\nsrc✝ : PartialOrder α := PartialOrder.lift f inj\n⊢ ∀ (a b : α), min a b = if a ≤ b then a else b\n[PROOFSTEP]\nintros x y\n[GOAL]\nι : Type u_1\nα✝ : Type u\nβ✝ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α✝ → α✝ → Prop\nα : Type ?u.96324\nβ : Type ?u.96321\ninst✝² : LinearOrder β\ninst✝¹ : Sup α\ninst✝ : Inf α\nf : α → β\ninj : Injective f\nhsup : ∀ (x y : α), f (x ⊔ y) = max (f x) (f y)\nhinf : ∀ (x y : α), f (x ⊓ y) = min (f x) (f y)\ninstOrdα : Ord α := { compare := fun a b => compare (f a) (f b) }\ndecidableLE : (x y : α) → Decidable (f x ≤ f y) := fun x y => inferInstance\ndecidableLT : (x y : α) → Decidable (f x < f y) := fun x y => inferInstance\ndecidableEq : (x y : α) → Decidable (x = y) := fun x y => decidable_of_iff (f x = f y) (_ : f x = f y ↔ x = y)\nsrc✝ : PartialOrder α := PartialOrder.lift f inj\nx y : α\n⊢ min x y = if x ≤ y then x else y\n[PROOFSTEP]\napply inj\n[GOAL]\ncase a\nι : Type u_1\nα✝ : Type u\nβ✝ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α✝ → α✝ → Prop\nα : Type ?u.96324\nβ : Type ?u.96321\ninst✝² : LinearOrder β\ninst✝¹ : Sup α\ninst✝ : Inf α\nf : α → β\ninj : Injective f\nhsup : ∀ (x y : α), f (x ⊔ y) = max (f x) (f y)\nhinf : ∀ (x y : α), f (x ⊓ y) = min (f x) (f y)\ninstOrdα : Ord α := { compare := fun a b => compare (f a) (f b) }\ndecidableLE : (x y : α) → Decidable (f x ≤ f y) := fun x y => inferInstance\ndecidableLT : (x y : α) → Decidable (f x < f y) := fun x y => inferInstance\ndecidableEq : (x y : α) → Decidable (x = y) := fun x y => decidable_of_iff (f x = f y) (_ : f x = f y ↔ x = y)\nsrc✝ : PartialOrder α := PartialOrder.lift f inj\nx y : α\n⊢ f (min x y) = f (if x ≤ y then x else y)\n[PROOFSTEP]\nrw [apply_ite f]\n[GOAL]\ncase a\nι : Type u_1\nα✝ : Type u\nβ✝ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α✝ → α✝ → Prop\nα : Type ?u.96324\nβ : Type ?u.96321\ninst✝² : LinearOrder β\ninst✝¹ : Sup α\ninst✝ : Inf α\nf : α → β\ninj : Injective f\nhsup : ∀ (x y : α), f (x ⊔ y) = max (f x) (f y)\nhinf : ∀ (x y : α), f (x ⊓ y) = min (f x) (f y)\ninstOrdα : Ord α := { compare := fun a b => compare (f a) (f b) }\ndecidableLE : (x y : α) → Decidable (f x ≤ f y) := fun x y => inferInstance\ndecidableLT : (x y : α) → Decidable (f x < f y) := fun x y => inferInstance\ndecidableEq : (x y : α) → Decidable (x = y) := fun x y => decidable_of_iff (f x = f y) (_ : f x = f y ↔ x = y)\nsrc✝ : PartialOrder α := PartialOrder.lift f inj\nx y : α\n⊢ f (min x y) = if x ≤ y then f x else f y\n[PROOFSTEP]\nexact (hinf _ _).trans (min_def _ _)\n[GOAL]\nι : Type u_1\nα✝ : Type u\nβ✝ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α✝ → α✝ → Prop\nα : Type ?u.96324\nβ : Type ?u.96321\ninst✝² : LinearOrder β\ninst✝¹ : Sup α\ninst✝ : Inf α\nf : α → β\ninj : Injective f\nhsup : ∀ (x y : α), f (x ⊔ y) = max (f x) (f y)\nhinf : ∀ (x y : α), f (x ⊓ y) = min (f x) (f y)\ninstOrdα : Ord α := { compare := fun a b => compare (f a) (f b) }\ndecidableLE : (x y : α) → Decidable (f x ≤ f y) := fun x y => inferInstance\ndecidableLT : (x y : α) → Decidable (f x < f y) := fun x y => inferInstance\ndecidableEq : (x y : α) → Decidable (x = y) := fun x y => decidable_of_iff (f x = f y) (_ : f x = f y ↔ x = y)\nsrc✝ : PartialOrder α := PartialOrder.lift f inj\n⊢ ∀ (a b : α), max a b = if a ≤ b then b else a\n[PROOFSTEP]\nintros x y\n[GOAL]\nι : Type u_1\nα✝ : Type u\nβ✝ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α✝ → α✝ → Prop\nα : Type ?u.96324\nβ : Type ?u.96321\ninst✝² : LinearOrder β\ninst✝¹ : Sup α\ninst✝ : Inf α\nf : α → β\ninj : Injective f\nhsup : ∀ (x y : α), f (x ⊔ y) = max (f x) (f y)\nhinf : ∀ (x y : α), f (x ⊓ y) = min (f x) (f y)\ninstOrdα : Ord α := { compare := fun a b => compare (f a) (f b) }\ndecidableLE : (x y : α) → Decidable (f x ≤ f y) := fun x y => inferInstance\ndecidableLT : (x y : α) → Decidable (f x < f y) := fun x y => inferInstance\ndecidableEq : (x y : α) → Decidable (x = y) := fun x y => decidable_of_iff (f x = f y) (_ : f x = f y ↔ x = y)\nsrc✝ : PartialOrder α := PartialOrder.lift f inj\nx y : α\n⊢ max x y = if x ≤ y then y else x\n[PROOFSTEP]\napply inj\n[GOAL]\ncase a\nι : Type u_1\nα✝ : Type u\nβ✝ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α✝ → α✝ → Prop\nα : Type ?u.96324\nβ : Type ?u.96321\ninst✝² : LinearOrder β\ninst✝¹ : Sup α\ninst✝ : Inf α\nf : α → β\ninj : Injective f\nhsup : ∀ (x y : α), f (x ⊔ y) = max (f x) (f y)\nhinf : ∀ (x y : α), f (x ⊓ y) = min (f x) (f y)\ninstOrdα : Ord α := { compare := fun a b => compare (f a) (f b) }\ndecidableLE : (x y : α) → Decidable (f x ≤ f y) := fun x y => inferInstance\ndecidableLT : (x y : α) → Decidable (f x < f y) := fun x y => inferInstance\ndecidableEq : (x y : α) → Decidable (x = y) := fun x y => decidable_of_iff (f x = f y) (_ : f x = f y ↔ x = y)\nsrc✝ : PartialOrder α := PartialOrder.lift f inj\nx y : α\n⊢ f (max x y) = f (if x ≤ y then y else x)\n[PROOFSTEP]\nrw [apply_ite f]\n[GOAL]\ncase a\nι : Type u_1\nα✝ : Type u\nβ✝ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α✝ → α✝ → Prop\nα : Type ?u.96324\nβ : Type ?u.96321\ninst✝² : LinearOrder β\ninst✝¹ : Sup α\ninst✝ : Inf α\nf : α → β\ninj : Injective f\nhsup : ∀ (x y : α), f (x ⊔ y) = max (f x) (f y)\nhinf : ∀ (x y : α), f (x ⊓ y) = min (f x) (f y)\ninstOrdα : Ord α := { compare := fun a b => compare (f a) (f b) }\ndecidableLE : (x y : α) → Decidable (f x ≤ f y) := fun x y => inferInstance\ndecidableLT : (x y : α) → Decidable (f x < f y) := fun x y => inferInstance\ndecidableEq : (x y : α) → Decidable (x = y) := fun x y => decidable_of_iff (f x = f y) (_ : f x = f y ↔ x = y)\nsrc✝ : PartialOrder α := PartialOrder.lift f inj\nx y : α\n⊢ f (max x y) = if x ≤ y then f y else f x\n[PROOFSTEP]\nexact (hsup _ _).trans (max_def _ _)\n[GOAL]\nι : Type u_1\nα✝ : Type u\nβ✝ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α✝ → α✝ → Prop\nα : Type ?u.97808\nβ : Type ?u.97805\ninst✝³ : LinearOrder β\ninst✝² : Sup α\ninst✝¹ : Inf α\ninst✝ : Ord α\nf : α → β\ninj : Injective f\nhsup : ∀ (x y : α), f (x ⊔ y) = max (f x) (f y)\nhinf : ∀ (x y : α), f (x ⊓ y) = min (f x) (f y)\ncompare_f : ∀ (a b : α), compare a b = compare (f a) (f b)\ndecidableLE : (x y : α) → Decidable (f x ≤ f y) := fun x y => inferInstance\ndecidableLT : (x y : α) → Decidable (f x < f y) := fun x y => inferInstance\ndecidableEq : (x y : α) → Decidable (x = y) := fun x y => decidable_of_iff (f x = f y) (_ : f x = f y ↔ x = y)\nsrc✝ : PartialOrder α := PartialOrder.lift f inj\n⊢ ∀ (a b : α), min a b = if a ≤ b then a else b\n[PROOFSTEP]\nintros x y\n[GOAL]\nι : Type u_1\nα✝ : Type u\nβ✝ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α✝ → α✝ → Prop\nα : Type ?u.97808\nβ : Type ?u.97805\ninst✝³ : LinearOrder β\ninst✝² : Sup α\ninst✝¹ : Inf α\ninst✝ : Ord α\nf : α → β\ninj : Injective f\nhsup : ∀ (x y : α), f (x ⊔ y) = max (f x) (f y)\nhinf : ∀ (x y : α), f (x ⊓ y) = min (f x) (f y)\ncompare_f : ∀ (a b : α), compare a b = compare (f a) (f b)\ndecidableLE : (x y : α) → Decidable (f x ≤ f y) := fun x y => inferInstance\ndecidableLT : (x y : α) → Decidable (f x < f y) := fun x y => inferInstance\ndecidableEq : (x y : α) → Decidable (x = y) := fun x y => decidable_of_iff (f x = f y) (_ : f x = f y ↔ x = y)\nsrc✝ : PartialOrder α := PartialOrder.lift f inj\nx y : α\n⊢ min x y = if x ≤ y then x else y\n[PROOFSTEP]\napply inj\n[GOAL]\ncase a\nι : Type u_1\nα✝ : Type u\nβ✝ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α✝ → α✝ → Prop\nα : Type ?u.97808\nβ : Type ?u.97805\ninst✝³ : LinearOrder β\ninst✝² : Sup α\ninst✝¹ : Inf α\ninst✝ : Ord α\nf : α → β\ninj : Injective f\nhsup : ∀ (x y : α), f (x ⊔ y) = max (f x) (f y)\nhinf : ∀ (x y : α), f (x ⊓ y) = min (f x) (f y)\ncompare_f : ∀ (a b : α), compare a b = compare (f a) (f b)\ndecidableLE : (x y : α) → Decidable (f x ≤ f y) := fun x y => inferInstance\ndecidableLT : (x y : α) → Decidable (f x < f y) := fun x y => inferInstance\ndecidableEq : (x y : α) → Decidable (x = y) := fun x y => decidable_of_iff (f x = f y) (_ : f x = f y ↔ x = y)\nsrc✝ : PartialOrder α := PartialOrder.lift f inj\nx y : α\n⊢ f (min x y) = f (if x ≤ y then x else y)\n[PROOFSTEP]\nrw [apply_ite f]\n[GOAL]\ncase a\nι : Type u_1\nα✝ : Type u\nβ✝ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α✝ → α✝ → Prop\nα : Type ?u.97808\nβ : Type ?u.97805\ninst✝³ : LinearOrder β\ninst✝² : Sup α\ninst✝¹ : Inf α\ninst✝ : Ord α\nf : α → β\ninj : Injective f\nhsup : ∀ (x y : α), f (x ⊔ y) = max (f x) (f y)\nhinf : ∀ (x y : α), f (x ⊓ y) = min (f x) (f y)\ncompare_f : ∀ (a b : α), compare a b = compare (f a) (f b)\ndecidableLE : (x y : α) → Decidable (f x ≤ f y) := fun x y => inferInstance\ndecidableLT : (x y : α) → Decidable (f x < f y) := fun x y => inferInstance\ndecidableEq : (x y : α) → Decidable (x = y) := fun x y => decidable_of_iff (f x = f y) (_ : f x = f y ↔ x = y)\nsrc✝ : PartialOrder α := PartialOrder.lift f inj\nx y : α\n⊢ f (min x y) = if x ≤ y then f x else f y\n[PROOFSTEP]\nexact (hinf _ _).trans (min_def _ _)\n[GOAL]\nι : Type u_1\nα✝ : Type u\nβ✝ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α✝ → α✝ → Prop\nα : Type ?u.97808\nβ : Type ?u.97805\ninst✝³ : LinearOrder β\ninst✝² : Sup α\ninst✝¹ : Inf α\ninst✝ : Ord α\nf : α → β\ninj : Injective f\nhsup : ∀ (x y : α), f (x ⊔ y) = max (f x) (f y)\nhinf : ∀ (x y : α), f (x ⊓ y) = min (f x) (f y)\ncompare_f : ∀ (a b : α), compare a b = compare (f a) (f b)\ndecidableLE : (x y : α) → Decidable (f x ≤ f y) := fun x y => inferInstance\ndecidableLT : (x y : α) → Decidable (f x < f y) := fun x y => inferInstance\ndecidableEq : (x y : α) → Decidable (x = y) := fun x y => decidable_of_iff (f x = f y) (_ : f x = f y ↔ x = y)\nsrc✝ : PartialOrder α := PartialOrder.lift f inj\n⊢ ∀ (a b : α), max a b = if a ≤ b then b else a\n[PROOFSTEP]\nintros x y\n[GOAL]\nι : Type u_1\nα✝ : Type u\nβ✝ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α✝ → α✝ → Prop\nα : Type ?u.97808\nβ : Type ?u.97805\ninst✝³ : LinearOrder β\ninst✝² : Sup α\ninst✝¹ : Inf α\ninst✝ : Ord α\nf : α → β\ninj : Injective f\nhsup : ∀ (x y : α), f (x ⊔ y) = max (f x) (f y)\nhinf : ∀ (x y : α), f (x ⊓ y) = min (f x) (f y)\ncompare_f : ∀ (a b : α), compare a b = compare (f a) (f b)\ndecidableLE : (x y : α) → Decidable (f x ≤ f y) := fun x y => inferInstance\ndecidableLT : (x y : α) → Decidable (f x < f y) := fun x y => inferInstance\ndecidableEq : (x y : α) → Decidable (x = y) := fun x y => decidable_of_iff (f x = f y) (_ : f x = f y ↔ x = y)\nsrc✝ : PartialOrder α := PartialOrder.lift f inj\nx y : α\n⊢ max x y = if x ≤ y then y else x\n[PROOFSTEP]\napply inj\n[GOAL]\ncase a\nι : Type u_1\nα✝ : Type u\nβ✝ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α✝ → α✝ → Prop\nα : Type ?u.97808\nβ : Type ?u.97805\ninst✝³ : LinearOrder β\ninst✝² : Sup α\ninst✝¹ : Inf α\ninst✝ : Ord α\nf : α → β\ninj : Injective f\nhsup : ∀ (x y : α), f (x ⊔ y) = max (f x) (f y)\nhinf : ∀ (x y : α), f (x ⊓ y) = min (f x) (f y)\ncompare_f : ∀ (a b : α), compare a b = compare (f a) (f b)\ndecidableLE : (x y : α) → Decidable (f x ≤ f y) := fun x y => inferInstance\ndecidableLT : (x y : α) → Decidable (f x < f y) := fun x y => inferInstance\ndecidableEq : (x y : α) → Decidable (x = y) := fun x y => decidable_of_iff (f x = f y) (_ : f x = f y ↔ x = y)\nsrc✝ : PartialOrder α := PartialOrder.lift f inj\nx y : α\n⊢ f (max x y) = f (if x ≤ y then y else x)\n[PROOFSTEP]\nrw [apply_ite f]\n[GOAL]\ncase a\nι : Type u_1\nα✝ : Type u\nβ✝ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α✝ → α✝ → Prop\nα : Type ?u.97808\nβ : Type ?u.97805\ninst✝³ : LinearOrder β\ninst✝² : Sup α\ninst✝¹ : Inf α\ninst✝ : Ord α\nf : α → β\ninj : Injective f\nhsup : ∀ (x y : α), f (x ⊔ y) = max (f x) (f y)\nhinf : ∀ (x y : α), f (x ⊓ y) = min (f x) (f y)\ncompare_f : ∀ (a b : α), compare a b = compare (f a) (f b)\ndecidableLE : (x y : α) → Decidable (f x ≤ f y) := fun x y => inferInstance\ndecidableLT : (x y : α) → Decidable (f x < f y) := fun x y => inferInstance\ndecidableEq : (x y : α) → Decidable (x = y) := fun x y => decidable_of_iff (f x = f y) (_ : f x = f y ↔ x = y)\nsrc✝ : PartialOrder α := PartialOrder.lift f inj\nx y : α\n⊢ f (max x y) = if x ≤ y then f y else f x\n[PROOFSTEP]\nexact (hsup _ _).trans (max_def _ _)\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\ninst✝¹ : Preorder α\ninst✝ : Preorder β\na a₁ a₂ : α\nb b₁ b₂ : β\nx y : α × β\n⊢ x < y ↔ x.fst < y.fst ∧ x.snd ≤ y.snd ∨ x.fst ≤ y.fst ∧ x.snd < y.snd\n[PROOFSTEP]\nrefine' ⟨fun h ↦ _, _⟩\n[GOAL]\ncase refine'_1\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\ninst✝¹ : Preorder α\ninst✝ : Preorder β\na a₁ a₂ : α\nb b₁ b₂ : β\nx y : α × β\nh : x < y\n⊢ x.fst < y.fst ∧ x.snd ≤ y.snd ∨ x.fst ≤ y.fst ∧ x.snd < y.snd\n[PROOFSTEP]\nby_cases h₁ : y.1 ≤ x.1\n[GOAL]\ncase pos\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\ninst✝¹ : Preorder α\ninst✝ : Preorder β\na a₁ a₂ : α\nb b₁ b₂ : β\nx y : α × β\nh : x < y\nh₁ : y.fst ≤ x.fst\n⊢ x.fst < y.fst ∧ x.snd ≤ y.snd ∨ x.fst ≤ y.fst ∧ x.snd < y.snd\n[PROOFSTEP]\nexact Or.inr ⟨h.1.1, LE.le.lt_of_not_le h.1.2 fun h₂ ↦ h.2 ⟨h₁, h₂⟩⟩\n[GOAL]\ncase neg\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\ninst✝¹ : Preorder α\ninst✝ : Preorder β\na a₁ a₂ : α\nb b₁ b₂ : β\nx y : α × β\nh : x < y\nh₁ : ¬y.fst ≤ x.fst\n⊢ x.fst < y.fst ∧ x.snd ≤ y.snd ∨ x.fst ≤ y.fst ∧ x.snd < y.snd\n[PROOFSTEP]\nexact Or.inl ⟨LE.le.lt_of_not_le h.1.1 h₁, h.1.2⟩\n[GOAL]\ncase refine'_2\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\ninst✝¹ : Preorder α\ninst✝ : Preorder β\na a₁ a₂ : α\nb b₁ b₂ : β\nx y : α × β\n⊢ x.fst < y.fst ∧ x.snd ≤ y.snd ∨ x.fst ≤ y.fst ∧ x.snd < y.snd → x < y\n[PROOFSTEP]\nrintro (⟨h₁, h₂⟩ | ⟨h₁, h₂⟩)\n[GOAL]\ncase refine'_2.inl.intro\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\ninst✝¹ : Preorder α\ninst✝ : Preorder β\na a₁ a₂ : α\nb b₁ b₂ : β\nx y : α × β\nh₁ : x.fst < y.fst\nh₂ : x.snd ≤ y.snd\n⊢ x < y\n[PROOFSTEP]\nexact ⟨⟨h₁.le, h₂⟩, fun h ↦ h₁.not_le h.1⟩\n[GOAL]\ncase refine'_2.inr.intro\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\ninst✝¹ : Preorder α\ninst✝ : Preorder β\na a₁ a₂ : α\nb b₁ b₂ : β\nx y : α × β\nh₁ : x.fst ≤ y.fst\nh₂ : x.snd < y.snd\n⊢ x < y\n[PROOFSTEP]\nexact ⟨⟨h₁, h₂.le⟩, fun h ↦ h₂.not_le h.2⟩\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\ninst✝ : LT α\n⊢ DenselyOrdered αᵒᵈ → DenselyOrdered α\n[PROOFSTEP]\nconvert @OrderDual.denselyOrdered αᵒᵈ _\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\ninst✝³ : Preorder α\ninst✝² : Preorder β\ninst✝¹ : DenselyOrdered α\ninst✝ : DenselyOrdered β\na b : α × β\n⊢ a < b → ∃ a_2, a < a_2 ∧ a_2 < b\n[PROOFSTEP]\nsimp_rw [Prod.lt_iff]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\ninst✝³ : Preorder α\ninst✝² : Preorder β\ninst✝¹ : DenselyOrdered α\ninst✝ : DenselyOrdered β\na b : α × β\n⊢ a.fst < b.fst ∧ a.snd ≤ b.snd ∨ a.fst ≤ b.fst ∧ a.snd < b.snd →\n    ∃ a_2,\n      (a.fst < a_2.fst ∧ a.snd ≤ a_2.snd ∨ a.fst ≤ a_2.fst ∧ a.snd < a_2.snd) ∧\n        (a_2.fst < b.fst ∧ a_2.snd ≤ b.snd ∨ a_2.fst ≤ b.fst ∧ a_2.snd < b.snd)\n[PROOFSTEP]\nrintro (⟨h₁, h₂⟩ | ⟨h₁, h₂⟩)\n[GOAL]\ncase inl.intro\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\ninst✝³ : Preorder α\ninst✝² : Preorder β\ninst✝¹ : DenselyOrdered α\ninst✝ : DenselyOrdered β\na b : α × β\nh₁ : a.fst < b.fst\nh₂ : a.snd ≤ b.snd\n⊢ ∃ a_1,\n    (a.fst < a_1.fst ∧ a.snd ≤ a_1.snd ∨ a.fst ≤ a_1.fst ∧ a.snd < a_1.snd) ∧\n      (a_1.fst < b.fst ∧ a_1.snd ≤ b.snd ∨ a_1.fst ≤ b.fst ∧ a_1.snd < b.snd)\n[PROOFSTEP]\nobtain ⟨c, ha, hb⟩ := exists_between h₁\n[GOAL]\ncase inl.intro.intro.intro\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\ninst✝³ : Preorder α\ninst✝² : Preorder β\ninst✝¹ : DenselyOrdered α\ninst✝ : DenselyOrdered β\na b : α × β\nh₁ : a.fst < b.fst\nh₂ : a.snd ≤ b.snd\nc : α\nha : a.fst < c\nhb : c < b.fst\n⊢ ∃ a_1,\n    (a.fst < a_1.fst ∧ a.snd ≤ a_1.snd ∨ a.fst ≤ a_1.fst ∧ a.snd < a_1.snd) ∧\n      (a_1.fst < b.fst ∧ a_1.snd ≤ b.snd ∨ a_1.fst ≤ b.fst ∧ a_1.snd < b.snd)\n[PROOFSTEP]\nexact ⟨(c, _), Or.inl ⟨ha, h₂⟩, Or.inl ⟨hb, le_rfl⟩⟩\n[GOAL]\ncase inr.intro\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\ninst✝³ : Preorder α\ninst✝² : Preorder β\ninst✝¹ : DenselyOrdered α\ninst✝ : DenselyOrdered β\na b : α × β\nh₁ : a.fst ≤ b.fst\nh₂ : a.snd < b.snd\n⊢ ∃ a_1,\n    (a.fst < a_1.fst ∧ a.snd ≤ a_1.snd ∨ a.fst ≤ a_1.fst ∧ a.snd < a_1.snd) ∧\n      (a_1.fst < b.fst ∧ a_1.snd ≤ b.snd ∨ a_1.fst ≤ b.fst ∧ a_1.snd < b.snd)\n[PROOFSTEP]\nobtain ⟨c, ha, hb⟩ := exists_between h₂\n[GOAL]\ncase inr.intro.intro.intro\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\ninst✝³ : Preorder α\ninst✝² : Preorder β\ninst✝¹ : DenselyOrdered α\ninst✝ : DenselyOrdered β\na b : α × β\nh₁ : a.fst ≤ b.fst\nh₂ : a.snd < b.snd\nc : β\nha : a.snd < c\nhb : c < b.snd\n⊢ ∃ a_1,\n    (a.fst < a_1.fst ∧ a.snd ≤ a_1.snd ∨ a.fst ≤ a_1.fst ∧ a.snd < a_1.snd) ∧\n      (a_1.fst < b.fst ∧ a_1.snd ≤ b.snd ∨ a_1.fst ≤ b.fst ∧ a_1.snd < b.snd)\n[PROOFSTEP]\nexact ⟨(_, c), Or.inr ⟨h₁, ha⟩, Or.inr ⟨le_rfl, hb⟩⟩\n[GOAL]\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α✝ → α✝ → Prop\nα : ι → Type u_3\ninst✝¹ : (i : ι) → Preorder (α i)\ninst✝ : ∀ (i : ι), DenselyOrdered (α i)\na b : (i : ι) → α i\n⊢ a < b → ∃ a_2, a < a_2 ∧ a_2 < b\n[PROOFSTEP]\nclassical\nsimp_rw [Pi.lt_def]\nrintro ⟨hab, i, hi⟩\nobtain ⟨c, ha, hb⟩ := exists_between hi\nexact\n  ⟨Function.update a i c, ⟨le_update_iff.2 ⟨ha.le, fun _ _ ↦ le_rfl⟩, i, by rwa [update_same]⟩,\n    update_le_iff.2 ⟨hb.le, fun _ _ ↦ hab _⟩, i, by rwa [update_same]⟩\n[GOAL]\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α✝ → α✝ → Prop\nα : ι → Type u_3\ninst✝¹ : (i : ι) → Preorder (α i)\ninst✝ : ∀ (i : ι), DenselyOrdered (α i)\na b : (i : ι) → α i\n⊢ a < b → ∃ a_2, a < a_2 ∧ a_2 < b\n[PROOFSTEP]\nsimp_rw [Pi.lt_def]\n[GOAL]\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α✝ → α✝ → Prop\nα : ι → Type u_3\ninst✝¹ : (i : ι) → Preorder (α i)\ninst✝ : ∀ (i : ι), DenselyOrdered (α i)\na b : (i : ι) → α i\n⊢ (a ≤ b ∧ ∃ i, a i < b i) → ∃ a_2, (a ≤ a_2 ∧ ∃ i, a i < a_2 i) ∧ a_2 ≤ b ∧ ∃ i, a_2 i < b i\n[PROOFSTEP]\nrintro ⟨hab, i, hi⟩\n[GOAL]\ncase intro.intro\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α✝ → α✝ → Prop\nα : ι → Type u_3\ninst✝¹ : (i : ι) → Preorder (α i)\ninst✝ : ∀ (i : ι), DenselyOrdered (α i)\na b : (i : ι) → α i\nhab : a ≤ b\ni : ι\nhi : a i < b i\n⊢ ∃ a_1, (a ≤ a_1 ∧ ∃ i, a i < a_1 i) ∧ a_1 ≤ b ∧ ∃ i, a_1 i < b i\n[PROOFSTEP]\nobtain ⟨c, ha, hb⟩ := exists_between hi\n[GOAL]\ncase intro.intro.intro.intro\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α✝ → α✝ → Prop\nα : ι → Type u_3\ninst✝¹ : (i : ι) → Preorder (α i)\ninst✝ : ∀ (i : ι), DenselyOrdered (α i)\na b : (i : ι) → α i\nhab : a ≤ b\ni : ι\nhi : a i < b i\nc : α i\nha : a i < c\nhb : c < b i\n⊢ ∃ a_1, (a ≤ a_1 ∧ ∃ i, a i < a_1 i) ∧ a_1 ≤ b ∧ ∃ i, a_1 i < b i\n[PROOFSTEP]\nexact\n  ⟨Function.update a i c, ⟨le_update_iff.2 ⟨ha.le, fun _ _ ↦ le_rfl⟩, i, by rwa [update_same]⟩,\n    update_le_iff.2 ⟨hb.le, fun _ _ ↦ hab _⟩, i, by rwa [update_same]⟩\n[GOAL]\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α✝ → α✝ → Prop\nα : ι → Type u_3\ninst✝¹ : (i : ι) → Preorder (α i)\ninst✝ : ∀ (i : ι), DenselyOrdered (α i)\na b : (i : ι) → α i\nhab : a ≤ b\ni : ι\nhi : a i < b i\nc : α i\nha : a i < c\nhb : c < b i\n⊢ a i < update a i c i\n[PROOFSTEP]\nrwa [update_same]\n[GOAL]\nι : Type u_1\nα✝ : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α✝ → α✝ → Prop\nα : ι → Type u_3\ninst✝¹ : (i : ι) → Preorder (α i)\ninst✝ : ∀ (i : ι), DenselyOrdered (α i)\na b : (i : ι) → α i\nhab : a ≤ b\ni : ι\nhi : a i < b i\nc : α i\nha : a i < c\nhb : c < b i\n⊢ update a i c i < b i\n[PROOFSTEP]\nrwa [update_same]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\ninst✝ : LinearOrder α\nh : ∀ ⦃x y z : α⦄, x < y → y < z → False\nx y z : α\n⊢ x = y ∨ y = z ∨ x = z\n[PROOFSTEP]\nby_contra hne\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\ninst✝ : LinearOrder α\nh : ∀ ⦃x y z : α⦄, x < y → y < z → False\nx y z : α\nhne : ¬(x = y ∨ y = z ∨ x = z)\n⊢ False\n[PROOFSTEP]\nsimp only [not_or, ← Ne.def] at hne \n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\ninst✝ : LinearOrder α\nh : ∀ ⦃x y z : α⦄, x < y → y < z → False\nx y z : α\nhne : x ≠ y ∧ y ≠ z ∧ x ≠ z\n⊢ False\n[PROOFSTEP]\ncases' hne.1.lt_or_lt with h₁ h₁\n[GOAL]\ncase inl\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\ninst✝ : LinearOrder α\nh : ∀ ⦃x y z : α⦄, x < y → y < z → False\nx y z : α\nhne : x ≠ y ∧ y ≠ z ∧ x ≠ z\nh₁ : x < y\n⊢ False\n[PROOFSTEP]\ncases' hne.2.1.lt_or_lt with h₂ h₂\n[GOAL]\ncase inr\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\ninst✝ : LinearOrder α\nh : ∀ ⦃x y z : α⦄, x < y → y < z → False\nx y z : α\nhne : x ≠ y ∧ y ≠ z ∧ x ≠ z\nh₁ : y < x\n⊢ False\n[PROOFSTEP]\ncases' hne.2.1.lt_or_lt with h₂ h₂\n[GOAL]\ncase inl.inl\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\ninst✝ : LinearOrder α\nh : ∀ ⦃x y z : α⦄, x < y → y < z → False\nx y z : α\nhne : x ≠ y ∧ y ≠ z ∧ x ≠ z\nh₁ : x < y\nh₂ : y < z\n⊢ False\n[PROOFSTEP]\ncases' hne.2.2.lt_or_lt with h₃ h₃\n[GOAL]\ncase inl.inr\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\ninst✝ : LinearOrder α\nh : ∀ ⦃x y z : α⦄, x < y → y < z → False\nx y z : α\nhne : x ≠ y ∧ y ≠ z ∧ x ≠ z\nh₁ : x < y\nh₂ : z < y\n⊢ False\n[PROOFSTEP]\ncases' hne.2.2.lt_or_lt with h₃ h₃\n[GOAL]\ncase inr.inl\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\ninst✝ : LinearOrder α\nh : ∀ ⦃x y z : α⦄, x < y → y < z → False\nx y z : α\nhne : x ≠ y ∧ y ≠ z ∧ x ≠ z\nh₁ : y < x\nh₂ : y < z\n⊢ False\n[PROOFSTEP]\ncases' hne.2.2.lt_or_lt with h₃ h₃\n[GOAL]\ncase inr.inr\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\ninst✝ : LinearOrder α\nh : ∀ ⦃x y z : α⦄, x < y → y < z → False\nx y z : α\nhne : x ≠ y ∧ y ≠ z ∧ x ≠ z\nh₁ : y < x\nh₂ : z < y\n⊢ False\n[PROOFSTEP]\ncases' hne.2.2.lt_or_lt with h₃ h₃\n[GOAL]\ncase inl.inl.inl\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\ninst✝ : LinearOrder α\nh : ∀ ⦃x y z : α⦄, x < y → y < z → False\nx y z : α\nhne : x ≠ y ∧ y ≠ z ∧ x ≠ z\nh₁ : x < y\nh₂ : y < z\nh₃ : x < z\n⊢ False\ncase inl.inl.inr\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\ninst✝ : LinearOrder α\nh : ∀ ⦃x y z : α⦄, x < y → y < z → False\nx y z : α\nhne : x ≠ y ∧ y ≠ z ∧ x ≠ z\nh₁ : x < y\nh₂ : y < z\nh₃ : z < x\n⊢ False\ncase inl.inr.inl\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\ninst✝ : LinearOrder α\nh : ∀ ⦃x y z : α⦄, x < y → y < z → False\nx y z : α\nhne : x ≠ y ∧ y ≠ z ∧ x ≠ z\nh₁ : x < y\nh₂ : z < y\nh₃ : x < z\n⊢ False\ncase inl.inr.inr\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\ninst✝ : LinearOrder α\nh : ∀ ⦃x y z : α⦄, x < y → y < z → False\nx y z : α\nhne : x ≠ y ∧ y ≠ z ∧ x ≠ z\nh₁ : x < y\nh₂ : z < y\nh₃ : z < x\n⊢ False\ncase inr.inl.inl\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\ninst✝ : LinearOrder α\nh : ∀ ⦃x y z : α⦄, x < y → y < z → False\nx y z : α\nhne : x ≠ y ∧ y ≠ z ∧ x ≠ z\nh₁ : y < x\nh₂ : y < z\nh₃ : x < z\n⊢ False\ncase inr.inl.inr\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\ninst✝ : LinearOrder α\nh : ∀ ⦃x y z : α⦄, x < y → y < z → False\nx y z : α\nhne : x ≠ y ∧ y ≠ z ∧ x ≠ z\nh₁ : y < x\nh₂ : y < z\nh₃ : z < x\n⊢ False\ncase inr.inr.inl\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\ninst✝ : LinearOrder α\nh : ∀ ⦃x y z : α⦄, x < y → y < z → False\nx y z : α\nhne : x ≠ y ∧ y ≠ z ∧ x ≠ z\nh₁ : y < x\nh₂ : z < y\nh₃ : x < z\n⊢ False\ncase inr.inr.inr\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\ninst✝ : LinearOrder α\nh : ∀ ⦃x y z : α⦄, x < y → y < z → False\nx y z : α\nhne : x ≠ y ∧ y ≠ z ∧ x ≠ z\nh₁ : y < x\nh₂ : z < y\nh₃ : z < x\n⊢ False\n[PROOFSTEP]\nexacts [h h₁ h₂, h h₂ h₃, h h₃ h₂, h h₃ h₁, h h₁ h₃, h h₂ h₃, h h₁ h₃, h h₂ h₁]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\na b : PUnit\n⊢ ∀ (a : PUnit), a ≤ a\n[PROOFSTEP]\nintros\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\na b : PUnit\na✝ : PUnit\n⊢ a✝ ≤ a✝\n[PROOFSTEP]\ntrivial\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\na b : PUnit\n⊢ ∀ (a b c : PUnit), a ≤ b → b ≤ c → a ≤ c\n[PROOFSTEP]\nintros\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\na b : PUnit\na✝² b✝ c✝ : PUnit\na✝¹ : a✝² ≤ b✝\na✝ : b✝ ≤ c✝\n⊢ a✝² ≤ c✝\n[PROOFSTEP]\ntrivial\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\na b : PUnit\n⊢ ∀ (a b : PUnit), a < b ↔ a ≤ b ∧ ¬b ≤ a\n[PROOFSTEP]\nsimp only [not_true, and_false, forall_const]\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\na b : PUnit\n⊢ ∀ (a b : PUnit), a ≤ b → b ≤ a → a = b\n[PROOFSTEP]\nintros\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\na b : PUnit\na✝² b✝ : PUnit\na✝¹ : a✝² ≤ b✝\na✝ : b✝ ≤ a✝²\n⊢ a✝² = b✝\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\na b : PUnit\n⊢ ∀ (a b : PUnit), a ≤ b ∨ b ≤ a\n[PROOFSTEP]\nintros\n[GOAL]\nι : Type u_1\nα : Type u\nβ : Type v\nγ : Type w\nπ : ι → Type u_2\nr : α → α → Prop\na b : PUnit\na✝ b✝ : PUnit\n⊢ a✝ ≤ b✝ ∨ b✝ ≤ a✝\n[PROOFSTEP]\nexact Or.inl trivial\n", "meta": {"mathlib_filename": "Mathlib.Order.Basic", "llama_tokens": 41941, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7879311856832191, "lm_q2_score": 0.6370307944803832, "lm_q1q2_score": 0.5019364292116514}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na✝ : α\nl✝ : List α\na : α\nl : List α\nn : ℕ\nh : Pairwise R (a :: l)\n⊢ Pairwise R (List.drop (n + 1) (a :: l))\n[PROOFSTEP]\nrw [List.drop]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na✝ : α\nl✝ : List α\na : α\nl : List α\nn : ℕ\nh : Pairwise R (a :: l)\n⊢ Pairwise R (List.drop n l)\n[PROOFSTEP]\nexact Pairwise.drop (pairwise_cons.mp h).right\n[GOAL]\nα : Type u_1\nβ : Type u_2\nR S✝ T : α → α → Prop\na : α\nl✝ : List α\nS : α → α → Prop\nl : List α\nH : ∀ {a b : α}, a ∈ l → b ∈ l → R a b → S a b\np : Pairwise R l\n⊢ Pairwise S l\n[PROOFSTEP]\ninduction p with\n| nil => constructor\n| @cons a l r _ ih =>\n  constructor\n  · exact BAll.imp_right (fun x h ↦ H (mem_cons_self _ _) (mem_cons_of_mem _ h)) r\n  · exact ih fun {a b} m m' ↦ H (mem_cons_of_mem _ m) (mem_cons_of_mem _ m')\n[GOAL]\nα : Type u_1\nβ : Type u_2\nR S✝ T : α → α → Prop\na : α\nl✝ : List α\nS : α → α → Prop\nl : List α\nH : ∀ {a b : α}, a ∈ l → b ∈ l → R a b → S a b\np : Pairwise R l\n⊢ Pairwise S l\n[PROOFSTEP]\ninduction p with\n| nil => constructor\n| @cons a l r _ ih =>\n  constructor\n  · exact BAll.imp_right (fun x h ↦ H (mem_cons_self _ _) (mem_cons_of_mem _ h)) r\n  · exact ih fun {a b} m m' ↦ H (mem_cons_of_mem _ m) (mem_cons_of_mem _ m')\n[GOAL]\ncase nil\nα : Type u_1\nβ : Type u_2\nR S✝ T : α → α → Prop\na : α\nl✝ : List α\nS : α → α → Prop\nl : List α\nH : ∀ {a b : α}, a ∈ [] → b ∈ [] → R a b → S a b\n⊢ Pairwise S []\n[PROOFSTEP]\n\n| nil => constructor\n[GOAL]\ncase nil\nα : Type u_1\nβ : Type u_2\nR S✝ T : α → α → Prop\na : α\nl✝ : List α\nS : α → α → Prop\nl : List α\nH : ∀ {a b : α}, a ∈ [] → b ∈ [] → R a b → S a b\n⊢ Pairwise S []\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase cons\nα : Type u_1\nβ : Type u_2\nR S✝ T : α → α → Prop\na✝¹ : α\nl✝¹ : List α\nS : α → α → Prop\nl✝ : List α\na : α\nl : List α\nr : ∀ (a' : α), a' ∈ l → R a a'\na✝ : Pairwise R l\nih : (∀ {a b : α}, a ∈ l → b ∈ l → R a b → S a b) → Pairwise S l\nH : ∀ {a_1 b : α}, a_1 ∈ a :: l → b ∈ a :: l → R a_1 b → S a_1 b\n⊢ Pairwise S (a :: l)\n[PROOFSTEP]\n\n| @cons a l r _ ih =>\n  constructor\n  · exact BAll.imp_right (fun x h ↦ H (mem_cons_self _ _) (mem_cons_of_mem _ h)) r\n  · exact ih fun {a b} m m' ↦ H (mem_cons_of_mem _ m) (mem_cons_of_mem _ m')\n[GOAL]\ncase cons\nα : Type u_1\nβ : Type u_2\nR S✝ T : α → α → Prop\na✝¹ : α\nl✝¹ : List α\nS : α → α → Prop\nl✝ : List α\na : α\nl : List α\nr : ∀ (a' : α), a' ∈ l → R a a'\na✝ : Pairwise R l\nih : (∀ {a b : α}, a ∈ l → b ∈ l → R a b → S a b) → Pairwise S l\nH : ∀ {a_1 b : α}, a_1 ∈ a :: l → b ∈ a :: l → R a_1 b → S a_1 b\n⊢ Pairwise S (a :: l)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase cons.a\nα : Type u_1\nβ : Type u_2\nR S✝ T : α → α → Prop\na✝¹ : α\nl✝¹ : List α\nS : α → α → Prop\nl✝ : List α\na : α\nl : List α\nr : ∀ (a' : α), a' ∈ l → R a a'\na✝ : Pairwise R l\nih : (∀ {a b : α}, a ∈ l → b ∈ l → R a b → S a b) → Pairwise S l\nH : ∀ {a_1 b : α}, a_1 ∈ a :: l → b ∈ a :: l → R a_1 b → S a_1 b\n⊢ ∀ (a' : α), a' ∈ l → S a a'\n[PROOFSTEP]\nexact BAll.imp_right (fun x h ↦ H (mem_cons_self _ _) (mem_cons_of_mem _ h)) r\n[GOAL]\ncase cons.a\nα : Type u_1\nβ : Type u_2\nR S✝ T : α → α → Prop\na✝¹ : α\nl✝¹ : List α\nS : α → α → Prop\nl✝ : List α\na : α\nl : List α\nr : ∀ (a' : α), a' ∈ l → R a a'\na✝ : Pairwise R l\nih : (∀ {a b : α}, a ∈ l → b ∈ l → R a b → S a b) → Pairwise S l\nH : ∀ {a_1 b : α}, a_1 ∈ a :: l → b ∈ a :: l → R a_1 b → S a_1 b\n⊢ Pairwise S l\n[PROOFSTEP]\nexact ih fun {a b} m m' ↦ H (mem_cons_of_mem _ m) (mem_cons_of_mem _ m')\n[GOAL]\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na : α\nl : List α\nx✝ : Pairwise R l ∧ Pairwise S l\nhR : Pairwise R l\nhS : Pairwise S l\n⊢ Pairwise (fun a b => R a b ∧ S a b) l\n[PROOFSTEP]\ninduction' hR with a l R1 R2 IH\n[GOAL]\ncase nil\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na : α\nl : List α\nx✝¹ : Pairwise R l ∧ Pairwise S l\nhS✝ : Pairwise S l\nx✝ : Pairwise R [] ∧ Pairwise S []\nhS : Pairwise S []\n⊢ Pairwise (fun a b => R a b ∧ S a b) []\n[PROOFSTEP]\nsimp only [Pairwise.nil, pairwise_cons] at *\n[GOAL]\ncase cons\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na✝ : α\nl✝ : List α\nx✝¹ : Pairwise R l✝ ∧ Pairwise S l✝\nhS✝ : Pairwise S l✝\na : α\nl : List α\nR1 : ∀ (a' : α), a' ∈ l → R a a'\nR2 : Pairwise R l\nIH : Pairwise R l ∧ Pairwise S l → Pairwise S l → Pairwise (fun a b => R a b ∧ S a b) l\nx✝ : Pairwise R (a :: l) ∧ Pairwise S (a :: l)\nhS : Pairwise S (a :: l)\n⊢ Pairwise (fun a b => R a b ∧ S a b) (a :: l)\n[PROOFSTEP]\nsimp only [Pairwise.nil, pairwise_cons] at *\n[GOAL]\ncase cons\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na✝ : α\nl✝ : List α\nx✝¹ : Pairwise R l✝ ∧ Pairwise S l✝\nhS✝ : Pairwise S l✝\na : α\nl : List α\nR1 : ∀ (a' : α), a' ∈ l → R a a'\nR2 : Pairwise R l\nIH : Pairwise R l ∧ Pairwise S l → Pairwise S l → Pairwise (fun a b => R a b ∧ S a b) l\nx✝ : ((∀ (a' : α), a' ∈ l → R a a') ∧ Pairwise R l) ∧ (∀ (a' : α), a' ∈ l → S a a') ∧ Pairwise S l\nhS : (∀ (a' : α), a' ∈ l → S a a') ∧ Pairwise S l\n⊢ (∀ (a' : α), a' ∈ l → R a a' ∧ S a a') ∧ Pairwise (fun a b => R a b ∧ S a b) l\n[PROOFSTEP]\nexact ⟨fun b bl => ⟨R1 b bl, hS.1 b bl⟩, IH ⟨R2, hS.2⟩ hS.2⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na : α\nl✝ l : List α\nH : ∀ (x y : α), R x y\n⊢ Pairwise R l\n[PROOFSTEP]\ninduction l <;> [exact Pairwise.nil; simp only [*, pairwise_cons, forall₂_true_iff, and_true_iff]]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na : α\nl✝ l : List α\nH : ∀ (x y : α), R x y\n⊢ Pairwise R l\n[PROOFSTEP]\ninduction l\n[GOAL]\ncase nil\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na : α\nl : List α\nH : ∀ (x y : α), R x y\n⊢ Pairwise R []\n[PROOFSTEP]\nexact Pairwise.nil\n[GOAL]\ncase cons\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na : α\nl : List α\nH : ∀ (x y : α), R x y\nhead✝ : α\ntail✝ : List α\ntail_ih✝ : Pairwise R tail✝\n⊢ Pairwise R (head✝ :: tail✝)\n[PROOFSTEP]\nsimp only [*, pairwise_cons, forall₂_true_iff, and_true_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na : α\nl✝ l : List α\n⊢ ∀ {a b : α}, a ∈ l → b ∈ l → (R a b ↔ a ∈ l ∧ b ∈ l ∧ R a b)\n[PROOFSTEP]\nsimp (config := { contextual := true }) only [true_and_iff, iff_self_iff, forall₂_true_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na : α\nl✝ l : List α\n⊢ ∀ {a b : α}, a ∈ l → b ∈ l → (R a b ↔ a ∈ l → b ∈ l → R a b)\n[PROOFSTEP]\nsimp (config := { contextual := true }) only [forall_prop_of_true, iff_self_iff, forall₂_true_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na : α\nl : List α\nh₁ : ∀ (x : α), x ∈ l → R x x\nh₂ : Pairwise R l\nh₃ : Pairwise (flip R) l\n⊢ ∀ ⦃x : α⦄, x ∈ l → ∀ ⦃y : α⦄, y ∈ l → R x y\n[PROOFSTEP]\ninduction' l with a l ih\n[GOAL]\ncase nil\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na : α\nl : List α\nh₁✝ : ∀ (x : α), x ∈ l → R x x\nh₂✝ : Pairwise R l\nh₃✝ : Pairwise (flip R) l\nh₁ : ∀ (x : α), x ∈ [] → R x x\nh₂ : Pairwise R []\nh₃ : Pairwise (flip R) []\n⊢ ∀ ⦃x : α⦄, x ∈ [] → ∀ ⦃y : α⦄, y ∈ [] → R x y\n[PROOFSTEP]\nexact forall_mem_nil _\n[GOAL]\ncase cons\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na✝ : α\nl✝ : List α\nh₁✝ : ∀ (x : α), x ∈ l✝ → R x x\nh₂✝ : Pairwise R l✝\nh₃✝ : Pairwise (flip R) l✝\na : α\nl : List α\nih : (∀ (x : α), x ∈ l → R x x) → Pairwise R l → Pairwise (flip R) l → ∀ ⦃x : α⦄, x ∈ l → ∀ ⦃y : α⦄, y ∈ l → R x y\nh₁ : ∀ (x : α), x ∈ a :: l → R x x\nh₂ : Pairwise R (a :: l)\nh₃ : Pairwise (flip R) (a :: l)\n⊢ ∀ ⦃x : α⦄, x ∈ a :: l → ∀ ⦃y : α⦄, y ∈ a :: l → R x y\n[PROOFSTEP]\nrw [pairwise_cons] at h₂ h₃ \n[GOAL]\ncase cons\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na✝ : α\nl✝ : List α\nh₁✝ : ∀ (x : α), x ∈ l✝ → R x x\nh₂✝ : Pairwise R l✝\nh₃✝ : Pairwise (flip R) l✝\na : α\nl : List α\nih : (∀ (x : α), x ∈ l → R x x) → Pairwise R l → Pairwise (flip R) l → ∀ ⦃x : α⦄, x ∈ l → ∀ ⦃y : α⦄, y ∈ l → R x y\nh₁ : ∀ (x : α), x ∈ a :: l → R x x\nh₂ : (∀ (a' : α), a' ∈ l → R a a') ∧ Pairwise R l\nh₃ : (∀ (a' : α), a' ∈ l → flip R a a') ∧ Pairwise (flip R) l\n⊢ ∀ ⦃x : α⦄, x ∈ a :: l → ∀ ⦃y : α⦄, y ∈ a :: l → R x y\n[PROOFSTEP]\nsimp only [mem_cons]\n[GOAL]\ncase cons\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na✝ : α\nl✝ : List α\nh₁✝ : ∀ (x : α), x ∈ l✝ → R x x\nh₂✝ : Pairwise R l✝\nh₃✝ : Pairwise (flip R) l✝\na : α\nl : List α\nih : (∀ (x : α), x ∈ l → R x x) → Pairwise R l → Pairwise (flip R) l → ∀ ⦃x : α⦄, x ∈ l → ∀ ⦃y : α⦄, y ∈ l → R x y\nh₁ : ∀ (x : α), x ∈ a :: l → R x x\nh₂ : (∀ (a' : α), a' ∈ l → R a a') ∧ Pairwise R l\nh₃ : (∀ (a' : α), a' ∈ l → flip R a a') ∧ Pairwise (flip R) l\n⊢ ∀ ⦃x : α⦄, x = a ∨ x ∈ l → ∀ ⦃y : α⦄, y = a ∨ y ∈ l → R x y\n[PROOFSTEP]\nrintro x (rfl | hx) y (rfl | hy)\n[GOAL]\ncase cons.inl.inl\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na : α\nl✝ : List α\nh₁✝ : ∀ (x : α), x ∈ l✝ → R x x\nh₂✝ : Pairwise R l✝\nh₃✝ : Pairwise (flip R) l✝\nl : List α\nih : (∀ (x : α), x ∈ l → R x x) → Pairwise R l → Pairwise (flip R) l → ∀ ⦃x : α⦄, x ∈ l → ∀ ⦃y : α⦄, y ∈ l → R x y\ny : α\nh₁ : ∀ (x : α), x ∈ y :: l → R x x\nh₂ : (∀ (a' : α), a' ∈ l → R y a') ∧ Pairwise R l\nh₃ : (∀ (a' : α), a' ∈ l → flip R y a') ∧ Pairwise (flip R) l\n⊢ R y y\n[PROOFSTEP]\nexact h₁ _ (l.mem_cons_self _)\n[GOAL]\ncase cons.inl.inr\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na : α\nl✝ : List α\nh₁✝ : ∀ (x : α), x ∈ l✝ → R x x\nh₂✝ : Pairwise R l✝\nh₃✝ : Pairwise (flip R) l✝\nl : List α\nih : (∀ (x : α), x ∈ l → R x x) → Pairwise R l → Pairwise (flip R) l → ∀ ⦃x : α⦄, x ∈ l → ∀ ⦃y : α⦄, y ∈ l → R x y\nx : α\nh₁ : ∀ (x_1 : α), x_1 ∈ x :: l → R x_1 x_1\nh₂ : (∀ (a' : α), a' ∈ l → R x a') ∧ Pairwise R l\nh₃ : (∀ (a' : α), a' ∈ l → flip R x a') ∧ Pairwise (flip R) l\ny : α\nhy : y ∈ l\n⊢ R x y\n[PROOFSTEP]\nexact h₂.1 _ hy\n[GOAL]\ncase cons.inr.inl\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na : α\nl✝ : List α\nh₁✝ : ∀ (x : α), x ∈ l✝ → R x x\nh₂✝ : Pairwise R l✝\nh₃✝ : Pairwise (flip R) l✝\nl : List α\nih : (∀ (x : α), x ∈ l → R x x) → Pairwise R l → Pairwise (flip R) l → ∀ ⦃x : α⦄, x ∈ l → ∀ ⦃y : α⦄, y ∈ l → R x y\nx : α\nhx : x ∈ l\ny : α\nh₁ : ∀ (x : α), x ∈ y :: l → R x x\nh₂ : (∀ (a' : α), a' ∈ l → R y a') ∧ Pairwise R l\nh₃ : (∀ (a' : α), a' ∈ l → flip R y a') ∧ Pairwise (flip R) l\n⊢ R x y\n[PROOFSTEP]\nexact h₃.1 _ hx\n[GOAL]\ncase cons.inr.inr\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na✝ : α\nl✝ : List α\nh₁✝ : ∀ (x : α), x ∈ l✝ → R x x\nh₂✝ : Pairwise R l✝\nh₃✝ : Pairwise (flip R) l✝\na : α\nl : List α\nih : (∀ (x : α), x ∈ l → R x x) → Pairwise R l → Pairwise (flip R) l → ∀ ⦃x : α⦄, x ∈ l → ∀ ⦃y : α⦄, y ∈ l → R x y\nh₁ : ∀ (x : α), x ∈ a :: l → R x x\nh₂ : (∀ (a' : α), a' ∈ l → R a a') ∧ Pairwise R l\nh₃ : (∀ (a' : α), a' ∈ l → flip R a a') ∧ Pairwise (flip R) l\nx : α\nhx : x ∈ l\ny : α\nhy : y ∈ l\n⊢ R x y\n[PROOFSTEP]\nexact ih (fun x hx => h₁ _ <| mem_cons_of_mem _ hx) h₂.2 h₃.2 hx hy\n[GOAL]\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na : α\nl : List α\nH : Symmetric R\nH₁ : ∀ (x : α), x ∈ l → R x x\nH₂ : Pairwise R l\n⊢ Pairwise (flip fun x => R x) l\n[PROOFSTEP]\nrwa [H.flip_eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na : α\nl : List α\nhR : Symmetric R\nhl : Pairwise R l\n⊢ ∀ ⦃a : α⦄, a ∈ l → ∀ ⦃b : α⦄, b ∈ l → a ≠ b → R a b\n[PROOFSTEP]\napply Pairwise.forall_of_forall\n[GOAL]\ncase H\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na : α\nl : List α\nhR : Symmetric R\nhl : Pairwise R l\n⊢ Symmetric fun x y => x ≠ y → R x y\n[PROOFSTEP]\nexact fun a b h hne => hR (h hne.symm)\n[GOAL]\ncase H₁\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na : α\nl : List α\nhR : Symmetric R\nhl : Pairwise R l\n⊢ ∀ (x : α), x ∈ l → x ≠ x → R x x\n[PROOFSTEP]\nexact fun _ _ hx => (hx rfl).elim\n[GOAL]\ncase H₂\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na : α\nl : List α\nhR : Symmetric R\nhl : Pairwise R l\n⊢ Pairwise (fun x y => x ≠ y → R x y) l\n[PROOFSTEP]\nexact hl.imp (@fun a b h _ => by exact h)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na✝ : α\nl : List α\nhR : Symmetric R\nhl : Pairwise R l\na b : α\nh : R a b\nx✝ : a ≠ b\n⊢ R a b\n[PROOFSTEP]\nexact h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nR✝ S T : α → α → Prop\na✝ : α\nl : List α\nR : α → α → Prop\na : α\n⊢ Pairwise R [a]\n[PROOFSTEP]\nsimp [Pairwise.nil]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na✝ : α\nl : List α\na b : α\n⊢ Pairwise R [a, b] ↔ R a b\n[PROOFSTEP]\nsimp only [pairwise_cons, mem_singleton, forall_eq, forall_prop_of_false (not_mem_nil _), forall_true_iff, Pairwise.nil,\n  and_true_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na : α\nl : List α\ns : Symmetric R\nl₁ l₂ : List α\n⊢ Pairwise R (l₁ ++ l₂) ↔ Pairwise R (l₂ ++ l₁)\n[PROOFSTEP]\nhave : ∀ l₁ l₂ : List α, (∀ x : α, x ∈ l₁ → ∀ y : α, y ∈ l₂ → R x y) → ∀ x : α, x ∈ l₂ → ∀ y : α, y ∈ l₁ → R x y :=\n  fun l₁ l₂ a x xm y ym ↦ s (a y ym x xm)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na : α\nl : List α\ns : Symmetric R\nl₁ l₂ : List α\nthis :\n  ∀ (l₁ l₂ : List α), (∀ (x : α), x ∈ l₁ → ∀ (y : α), y ∈ l₂ → R x y) → ∀ (x : α), x ∈ l₂ → ∀ (y : α), y ∈ l₁ → R x y\n⊢ Pairwise R (l₁ ++ l₂) ↔ Pairwise R (l₂ ++ l₁)\n[PROOFSTEP]\nsimp only [pairwise_append, and_left_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na : α\nl : List α\ns : Symmetric R\nl₁ l₂ : List α\nthis :\n  ∀ (l₁ l₂ : List α), (∀ (x : α), x ∈ l₁ → ∀ (y : α), y ∈ l₂ → R x y) → ∀ (x : α), x ∈ l₂ → ∀ (y : α), y ∈ l₁ → R x y\n⊢ (Pairwise R l₁ ∧ Pairwise R l₂ ∧ ∀ (a : α), a ∈ l₁ → ∀ (b : α), b ∈ l₂ → R a b) ↔\n    Pairwise R l₁ ∧ Pairwise R l₂ ∧ ∀ (a : α), a ∈ l₂ → ∀ (b : α), b ∈ l₁ → R a b\n[PROOFSTEP]\nrw [Iff.intro (this l₁ l₂) (this l₂ l₁)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na✝ : α\nl : List α\ns : Symmetric R\na : α\nl₁ l₂ : List α\n⊢ Pairwise R (l₁ ++ ([a] ++ l₂)) ↔ Pairwise R ([a] ++ l₁ ++ l₂)\n[PROOFSTEP]\nrw [← append_assoc, pairwise_append, @pairwise_append _ _ ([a] ++ l₁), pairwise_append_comm s]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na✝ : α\nl : List α\ns : Symmetric R\na : α\nl₁ l₂ : List α\n⊢ (Pairwise R ([a] ++ l₁) ∧ Pairwise R l₂ ∧ ∀ (a_1 : α), a_1 ∈ l₁ ++ [a] → ∀ (b : α), b ∈ l₂ → R a_1 b) ↔\n    Pairwise R ([a] ++ l₁) ∧ Pairwise R l₂ ∧ ∀ (a_1 : α), a_1 ∈ [a] ++ l₁ → ∀ (b : α), b ∈ l₂ → R a_1 b\n[PROOFSTEP]\nsimp only [mem_append, or_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na : α\nl : List α\nf : β → α\n⊢ Pairwise R (map f []) ↔ Pairwise (fun a b => R (f a) (f b)) []\n[PROOFSTEP]\nsimp only [map, Pairwise.nil]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na : α\nl✝ : List α\nf : β → α\nb : β\nl : List β\n⊢ Pairwise R (map f (b :: l)) ↔ Pairwise (fun a b => R (f a) (f b)) (b :: l)\n[PROOFSTEP]\nsimp only [map, pairwise_cons, mem_map, forall_exists_index, and_imp, forall_apply_eq_imp_iff₂, pairwise_map]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na : α\nl✝ : List α\nf : β → Option α\nl : List β\n⊢ Pairwise R (filterMap f l) ↔ Pairwise (fun a a' => ∀ (b : α), b ∈ f a → ∀ (b' : α), b' ∈ f a' → R b b') l\n[PROOFSTEP]\nlet _S (a a' : β) := ∀ b ∈ f a, ∀ b' ∈ f a', R b b'\n[GOAL]\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na : α\nl✝ : List α\nf : β → Option α\nl : List β\n_S : β → β → Prop := fun a a' => ∀ (b : α), b ∈ f a → ∀ (b' : α), b' ∈ f a' → R b b'\n⊢ Pairwise R (filterMap f l) ↔ Pairwise (fun a a' => ∀ (b : α), b ∈ f a → ∀ (b' : α), b' ∈ f a' → R b b') l\n[PROOFSTEP]\nsimp only [Option.mem_def]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na : α\nl✝ : List α\nf : β → Option α\nl : List β\n_S : β → β → Prop := fun a a' => ∀ (b : α), b ∈ f a → ∀ (b' : α), b' ∈ f a' → R b b'\n⊢ Pairwise R (filterMap f l) ↔ Pairwise (fun a a' => ∀ (b : α), f a = some b → ∀ (b' : α), f a' = some b' → R b b') l\n[PROOFSTEP]\ninduction' l with a l IH\n[GOAL]\ncase nil\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na : α\nl : List α\nf : β → Option α\n_S : β → β → Prop := fun a a' => ∀ (b : α), b ∈ f a → ∀ (b' : α), b' ∈ f a' → R b b'\n⊢ Pairwise R (filterMap f []) ↔ Pairwise (fun a a' => ∀ (b : α), f a = some b → ∀ (b' : α), f a' = some b' → R b b') []\n[PROOFSTEP]\nsimp only [filterMap, Pairwise.nil]\n[GOAL]\ncase cons\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na✝ : α\nl✝ : List α\nf : β → Option α\n_S : β → β → Prop := fun a a' => ∀ (b : α), b ∈ f a → ∀ (b' : α), b' ∈ f a' → R b b'\na : β\nl : List β\nIH : Pairwise R (filterMap f l) ↔ Pairwise (fun a a' => ∀ (b : α), f a = some b → ∀ (b' : α), f a' = some b' → R b b') l\n⊢ Pairwise R (filterMap f (a :: l)) ↔\n    Pairwise (fun a a' => ∀ (b : α), f a = some b → ∀ (b' : α), f a' = some b' → R b b') (a :: l)\n[PROOFSTEP]\ncases' e : f a with b\n[GOAL]\ncase cons.none\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na✝ : α\nl✝ : List α\nf : β → Option α\n_S : β → β → Prop := fun a a' => ∀ (b : α), b ∈ f a → ∀ (b' : α), b' ∈ f a' → R b b'\na : β\nl : List β\nIH : Pairwise R (filterMap f l) ↔ Pairwise (fun a a' => ∀ (b : α), f a = some b → ∀ (b' : α), f a' = some b' → R b b') l\ne : f a = none\n⊢ Pairwise R (filterMap f (a :: l)) ↔\n    Pairwise (fun a a' => ∀ (b : α), f a = some b → ∀ (b' : α), f a' = some b' → R b b') (a :: l)\n[PROOFSTEP]\nrw [filterMap_cons_none _ _ e, propext IH, pairwise_cons]\n[GOAL]\ncase cons.none\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na✝ : α\nl✝ : List α\nf : β → Option α\n_S : β → β → Prop := fun a a' => ∀ (b : α), b ∈ f a → ∀ (b' : α), b' ∈ f a' → R b b'\na : β\nl : List β\nIH : Pairwise R (filterMap f l) ↔ Pairwise (fun a a' => ∀ (b : α), f a = some b → ∀ (b' : α), f a' = some b' → R b b') l\ne : f a = none\n⊢ Pairwise (fun a a' => ∀ (b : α), f a = some b → ∀ (b' : α), f a' = some b' → R b b') l ↔\n    (∀ (a' : β), a' ∈ l → ∀ (b : α), f a = some b → ∀ (b' : α), f a' = some b' → R b b') ∧\n      Pairwise (fun a a' => ∀ (b : α), f a = some b → ∀ (b' : α), f a' = some b' → R b b') l\n[PROOFSTEP]\nsimp only [e, forall_prop_of_false not_false, forall₃_true_iff, true_and_iff]\n[GOAL]\ncase cons.some\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na✝ : α\nl✝ : List α\nf : β → Option α\n_S : β → β → Prop := fun a a' => ∀ (b : α), b ∈ f a → ∀ (b' : α), b' ∈ f a' → R b b'\na : β\nl : List β\nIH : Pairwise R (filterMap f l) ↔ Pairwise (fun a a' => ∀ (b : α), f a = some b → ∀ (b' : α), f a' = some b' → R b b') l\nb : α\ne : f a = some b\n⊢ Pairwise R (filterMap f (a :: l)) ↔\n    Pairwise (fun a a' => ∀ (b : α), f a = some b → ∀ (b' : α), f a' = some b' → R b b') (a :: l)\n[PROOFSTEP]\nrw [filterMap_cons_some _ _ _ e]\n[GOAL]\ncase cons.some\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na✝ : α\nl✝ : List α\nf : β → Option α\n_S : β → β → Prop := fun a a' => ∀ (b : α), b ∈ f a → ∀ (b' : α), b' ∈ f a' → R b b'\na : β\nl : List β\nIH : Pairwise R (filterMap f l) ↔ Pairwise (fun a a' => ∀ (b : α), f a = some b → ∀ (b' : α), f a' = some b' → R b b') l\nb : α\ne : f a = some b\n⊢ Pairwise R (b :: filterMap f l) ↔\n    Pairwise (fun a a' => ∀ (b : α), f a = some b → ∀ (b' : α), f a' = some b' → R b b') (a :: l)\n[PROOFSTEP]\nsimp only [pairwise_cons, mem_filterMap, forall_exists_index, and_imp, IH, e, Option.some.injEq, forall_eq',\n  and_congr_left_iff]\n[GOAL]\ncase cons.some\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na✝ : α\nl✝ : List α\nf : β → Option α\n_S : β → β → Prop := fun a a' => ∀ (b : α), b ∈ f a → ∀ (b' : α), b' ∈ f a' → R b b'\na : β\nl : List β\nIH : Pairwise R (filterMap f l) ↔ Pairwise (fun a a' => ∀ (b : α), f a = some b → ∀ (b' : α), f a' = some b' → R b b') l\nb : α\ne : f a = some b\n⊢ Pairwise (fun a a' => ∀ (b : α), f a = some b → ∀ (b' : α), f a' = some b' → R b b') l →\n    ((∀ (a' : α) (x : β), x ∈ l → f x = some a' → R b a') ↔ ∀ (a' : β), a' ∈ l → ∀ (b' : α), f a' = some b' → R b b')\n[PROOFSTEP]\nintro _\n[GOAL]\ncase cons.some\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na✝¹ : α\nl✝ : List α\nf : β → Option α\n_S : β → β → Prop := fun a a' => ∀ (b : α), b ∈ f a → ∀ (b' : α), b' ∈ f a' → R b b'\na : β\nl : List β\nIH : Pairwise R (filterMap f l) ↔ Pairwise (fun a a' => ∀ (b : α), f a = some b → ∀ (b' : α), f a' = some b' → R b b') l\nb : α\ne : f a = some b\na✝ : Pairwise (fun a a' => ∀ (b : α), f a = some b → ∀ (b' : α), f a' = some b' → R b b') l\n⊢ (∀ (a' : α) (x : β), x ∈ l → f x = some a' → R b a') ↔ ∀ (a' : β), a' ∈ l → ∀ (b' : α), f a' = some b' → R b b'\n[PROOFSTEP]\nexact ⟨fun h a ha b hab => h _ _ ha hab, fun h a b ha hab => h _ ha _ hab⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na : α\nl✝ : List α\np : α → Prop\ninst✝ : DecidablePred p\nl : List α\n⊢ Pairwise R (filter (fun b => decide (p b)) l) ↔ Pairwise (fun x y => p x → p y → R x y) l\n[PROOFSTEP]\nrw [← filterMap_eq_filter, pairwise_filterMap]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na : α\nl✝ : List α\np : α → Prop\ninst✝ : DecidablePred p\nl : List α\n⊢ Pairwise\n      (fun a a' =>\n        ∀ (b : α),\n          b ∈ Option.guard (fun x => decide (p x) = true) a →\n            ∀ (b' : α), b' ∈ Option.guard (fun x => decide (p x) = true) a' → R b b')\n      l ↔\n    Pairwise (fun x y => p x → p y → R x y) l\n[PROOFSTEP]\napply Pairwise.iff\n[GOAL]\ncase H\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na : α\nl✝ : List α\np : α → Prop\ninst✝ : DecidablePred p\nl : List α\n⊢ ∀ (a b : α),\n    (∀ (b_1 : α),\n        b_1 ∈ Option.guard (fun x => decide (p x) = true) a →\n          ∀ (b' : α), b' ∈ Option.guard (fun x => decide (p x) = true) b → R b_1 b') ↔\n      p a → p b → R a b\n[PROOFSTEP]\nintros\n[GOAL]\ncase H\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na : α\nl✝ : List α\np : α → Prop\ninst✝ : DecidablePred p\nl : List α\na✝ b✝ : α\n⊢ (∀ (b : α),\n      b ∈ Option.guard (fun x => decide (p x) = true) a✝ →\n        ∀ (b' : α), b' ∈ Option.guard (fun x => decide (p x) = true) b✝ → R b b') ↔\n    p a✝ → p b✝ → R a✝ b✝\n[PROOFSTEP]\nsimp only [decide_eq_true_eq, Option.mem_def, Option.guard_eq_some, and_imp, forall_eq']\n[GOAL]\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na : α\nl✝ : List α\np : β → Prop\nf : (b : β) → p b → α\nl : List β\nh : ∀ (x : β), x ∈ l → p x\n⊢ Pairwise R (pmap f l h) ↔ Pairwise (fun b₁ b₂ => ∀ (h₁ : p b₁) (h₂ : p b₂), R (f b₁ h₁) (f b₂ h₂)) l\n[PROOFSTEP]\ninduction' l with a l ihl\n[GOAL]\ncase nil\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na : α\nl✝ : List α\np : β → Prop\nf : (b : β) → p b → α\nl : List β\nh✝ : ∀ (x : β), x ∈ l → p x\nh : ∀ (x : β), x ∈ [] → p x\n⊢ Pairwise R (pmap f [] h) ↔ Pairwise (fun b₁ b₂ => ∀ (h₁ : p b₁) (h₂ : p b₂), R (f b₁ h₁) (f b₂ h₂)) []\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na✝ : α\nl✝¹ : List α\np : β → Prop\nf : (b : β) → p b → α\nl✝ : List β\nh✝ : ∀ (x : β), x ∈ l✝ → p x\na : β\nl : List β\nihl :\n  ∀ (h : ∀ (x : β), x ∈ l → p x),\n    Pairwise R (pmap f l h) ↔ Pairwise (fun b₁ b₂ => ∀ (h₁ : p b₁) (h₂ : p b₂), R (f b₁ h₁) (f b₂ h₂)) l\nh : ∀ (x : β), x ∈ a :: l → p x\n⊢ Pairwise R (pmap f (a :: l) h) ↔ Pairwise (fun b₁ b₂ => ∀ (h₁ : p b₁) (h₂ : p b₂), R (f b₁ h₁) (f b₂ h₂)) (a :: l)\n[PROOFSTEP]\nobtain ⟨_, hl⟩ : p a ∧ ∀ b, b ∈ l → p b := by simpa using h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na✝ : α\nl✝¹ : List α\np : β → Prop\nf : (b : β) → p b → α\nl✝ : List β\nh✝ : ∀ (x : β), x ∈ l✝ → p x\na : β\nl : List β\nihl :\n  ∀ (h : ∀ (x : β), x ∈ l → p x),\n    Pairwise R (pmap f l h) ↔ Pairwise (fun b₁ b₂ => ∀ (h₁ : p b₁) (h₂ : p b₂), R (f b₁ h₁) (f b₂ h₂)) l\nh : ∀ (x : β), x ∈ a :: l → p x\n⊢ p a ∧ ∀ (b : β), b ∈ l → p b\n[PROOFSTEP]\nsimpa using h\n[GOAL]\ncase cons.intro\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na✝ : α\nl✝¹ : List α\np : β → Prop\nf : (b : β) → p b → α\nl✝ : List β\nh✝ : ∀ (x : β), x ∈ l✝ → p x\na : β\nl : List β\nihl :\n  ∀ (h : ∀ (x : β), x ∈ l → p x),\n    Pairwise R (pmap f l h) ↔ Pairwise (fun b₁ b₂ => ∀ (h₁ : p b₁) (h₂ : p b₂), R (f b₁ h₁) (f b₂ h₂)) l\nh : ∀ (x : β), x ∈ a :: l → p x\nleft✝ : p a\nhl : ∀ (b : β), b ∈ l → p b\n⊢ Pairwise R (pmap f (a :: l) h) ↔ Pairwise (fun b₁ b₂ => ∀ (h₁ : p b₁) (h₂ : p b₂), R (f b₁ h₁) (f b₂ h₂)) (a :: l)\n[PROOFSTEP]\nsimp only [ihl hl, pairwise_cons, bex_imp, pmap, and_congr_left_iff, mem_pmap]\n[GOAL]\ncase cons.intro\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na✝ : α\nl✝¹ : List α\np : β → Prop\nf : (b : β) → p b → α\nl✝ : List β\nh✝ : ∀ (x : β), x ∈ l✝ → p x\na : β\nl : List β\nihl :\n  ∀ (h : ∀ (x : β), x ∈ l → p x),\n    Pairwise R (pmap f l h) ↔ Pairwise (fun b₁ b₂ => ∀ (h₁ : p b₁) (h₂ : p b₂), R (f b₁ h₁) (f b₂ h₂)) l\nh : ∀ (x : β), x ∈ a :: l → p x\nleft✝ : p a\nhl : ∀ (b : β), b ∈ l → p b\n⊢ Pairwise (fun b₁ b₂ => ∀ (h₁ : p b₁) (h₂ : p b₂), R (f b₁ h₁) (f b₂ h₂)) l →\n    ((∀ (a' : α) (x : β) (h_1 : x ∈ l), f x (_ : p x) = a' → R (f a (_ : p a)) a') ↔\n      ∀ (a' : β), a' ∈ l → ∀ (h₁ : p a) (h₂ : p a'), R (f a h₁) (f a' h₂))\n[PROOFSTEP]\nrefine' fun _ => ⟨fun H b hb _ hpb => H _ _ hb rfl, _⟩\n[GOAL]\ncase cons.intro\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na✝ : α\nl✝¹ : List α\np : β → Prop\nf : (b : β) → p b → α\nl✝ : List β\nh✝ : ∀ (x : β), x ∈ l✝ → p x\na : β\nl : List β\nihl :\n  ∀ (h : ∀ (x : β), x ∈ l → p x),\n    Pairwise R (pmap f l h) ↔ Pairwise (fun b₁ b₂ => ∀ (h₁ : p b₁) (h₂ : p b₂), R (f b₁ h₁) (f b₂ h₂)) l\nh : ∀ (x : β), x ∈ a :: l → p x\nleft✝ : p a\nhl : ∀ (b : β), b ∈ l → p b\nx✝ : Pairwise (fun b₁ b₂ => ∀ (h₁ : p b₁) (h₂ : p b₂), R (f b₁ h₁) (f b₂ h₂)) l\n⊢ (∀ (a' : β), a' ∈ l → ∀ (h₁ : p a) (h₂ : p a'), R (f a h₁) (f a' h₂)) →\n    ∀ (a' : α) (x : β) (h_1 : x ∈ l), f x (_ : p x) = a' → R (f a (_ : p a)) a'\n[PROOFSTEP]\nrintro H _ b hb rfl\n[GOAL]\ncase cons.intro\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na✝ : α\nl✝¹ : List α\np : β → Prop\nf : (b : β) → p b → α\nl✝ : List β\nh✝ : ∀ (x : β), x ∈ l✝ → p x\na : β\nl : List β\nihl :\n  ∀ (h : ∀ (x : β), x ∈ l → p x),\n    Pairwise R (pmap f l h) ↔ Pairwise (fun b₁ b₂ => ∀ (h₁ : p b₁) (h₂ : p b₂), R (f b₁ h₁) (f b₂ h₂)) l\nh : ∀ (x : β), x ∈ a :: l → p x\nleft✝ : p a\nhl : ∀ (b : β), b ∈ l → p b\nx✝ : Pairwise (fun b₁ b₂ => ∀ (h₁ : p b₁) (h₂ : p b₂), R (f b₁ h₁) (f b₂ h₂)) l\nH : ∀ (a' : β), a' ∈ l → ∀ (h₁ : p a) (h₂ : p a'), R (f a h₁) (f a' h₂)\nb : β\nhb : b ∈ l\n⊢ R (f a (_ : p a)) (f b (_ : p b))\n[PROOFSTEP]\nexact H b hb _ _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nR S✝ T : α → α → Prop\na : α\nl✝ l : List α\nhl : Pairwise R l\np : α → Prop\nf : (a : α) → p a → β\nh : ∀ (x : α), x ∈ l → p x\nS : β → β → Prop\nhS : ∀ ⦃x : α⦄ (hx : p x) ⦃y : α⦄ (hy : p y), R x y → S (f x hx) (f y hy)\n⊢ Pairwise S (List.pmap f l h)\n[PROOFSTEP]\nrefine' (pairwise_pmap h).2 (Pairwise.imp_of_mem _ hl)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nR S✝ T : α → α → Prop\na : α\nl✝ l : List α\nhl : Pairwise R l\np : α → Prop\nf : (a : α) → p a → β\nh : ∀ (x : α), x ∈ l → p x\nS : β → β → Prop\nhS : ∀ ⦃x : α⦄ (hx : p x) ⦃y : α⦄ (hy : p y), R x y → S (f x hx) (f y hy)\n⊢ ∀ {a b : α}, a ∈ l → b ∈ l → R a b → ∀ (h₁ : p a) (h₂ : p b), S (f a h₁) (f b h₂)\n[PROOFSTEP]\nintros\n[GOAL]\nα : Type u_1\nβ : Type u_2\nR S✝ T : α → α → Prop\na : α\nl✝ l : List α\nhl : Pairwise R l\np : α → Prop\nf : (a : α) → p a → β\nh : ∀ (x : α), x ∈ l → p x\nS : β → β → Prop\nhS : ∀ ⦃x : α⦄ (hx : p x) ⦃y : α⦄ (hy : p y), R x y → S (f x hx) (f y hy)\na✝³ b✝ : α\na✝² : a✝³ ∈ l\na✝¹ : b✝ ∈ l\na✝ : R a✝³ b✝\nh₁✝ : p a✝³\nh₂✝ : p b✝\n⊢ S (f a✝³ h₁✝) (f b✝ h₂✝)\n[PROOFSTEP]\napply hS\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nR S✝ T : α → α → Prop\na : α\nl✝ l : List α\nhl : Pairwise R l\np : α → Prop\nf : (a : α) → p a → β\nh : ∀ (x : α), x ∈ l → p x\nS : β → β → Prop\nhS : ∀ ⦃x : α⦄ (hx : p x) ⦃y : α⦄ (hy : p y), R x y → S (f x hx) (f y hy)\na✝³ b✝ : α\na✝² : a✝³ ∈ l\na✝¹ : b✝ ∈ l\na✝ : R a✝³ b✝\nh₁✝ : p a✝³\nh₂✝ : p b✝\n⊢ R a✝³ b✝\n[PROOFSTEP]\nassumption\n[GOAL]\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na : α\nl : List α\nL : List (List α)\n⊢ Pairwise R (join L) ↔\n    (∀ (l : List α), l ∈ L → Pairwise R l) ∧ Pairwise (fun l₁ l₂ => ∀ (x : α), x ∈ l₁ → ∀ (y : α), y ∈ l₂ → R x y) L\n[PROOFSTEP]\ninduction' L with l L IH\n[GOAL]\ncase nil\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na : α\nl : List α\n⊢ Pairwise R (join []) ↔\n    (∀ (l : List α), l ∈ [] → Pairwise R l) ∧ Pairwise (fun l₁ l₂ => ∀ (x : α), x ∈ l₁ → ∀ (y : α), y ∈ l₂ → R x y) []\n[PROOFSTEP]\nsimp only [join, Pairwise.nil, forall_prop_of_false (not_mem_nil _), forall_const, and_self_iff]\n[GOAL]\ncase cons\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na : α\nl✝ l : List α\nL : List (List α)\nIH :\n  Pairwise R (join L) ↔\n    (∀ (l : List α), l ∈ L → Pairwise R l) ∧ Pairwise (fun l₁ l₂ => ∀ (x : α), x ∈ l₁ → ∀ (y : α), y ∈ l₂ → R x y) L\n⊢ Pairwise R (join (l :: L)) ↔\n    (∀ (l_1 : List α), l_1 ∈ l :: L → Pairwise R l_1) ∧\n      Pairwise (fun l₁ l₂ => ∀ (x : α), x ∈ l₁ → ∀ (y : α), y ∈ l₂ → R x y) (l :: L)\n[PROOFSTEP]\nhave :\n  (∀ x : α, x ∈ l → ∀ (y : α) (x_1 : List α), x_1 ∈ L → y ∈ x_1 → R x y) ↔\n    ∀ a' : List α, a' ∈ L → ∀ x : α, x ∈ l → ∀ y : α, y ∈ a' → R x y :=\n  ⟨fun h a b c d e => h c d e a b, fun h c d e a b => h a b c d e⟩\n[GOAL]\ncase cons\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na : α\nl✝ l : List α\nL : List (List α)\nIH :\n  Pairwise R (join L) ↔\n    (∀ (l : List α), l ∈ L → Pairwise R l) ∧ Pairwise (fun l₁ l₂ => ∀ (x : α), x ∈ l₁ → ∀ (y : α), y ∈ l₂ → R x y) L\nthis :\n  (∀ (x : α), x ∈ l → ∀ (y : α) (x_1 : List α), x_1 ∈ L → y ∈ x_1 → R x y) ↔\n    ∀ (a' : List α), a' ∈ L → ∀ (x : α), x ∈ l → ∀ (y : α), y ∈ a' → R x y\n⊢ Pairwise R (join (l :: L)) ↔\n    (∀ (l_1 : List α), l_1 ∈ l :: L → Pairwise R l_1) ∧\n      Pairwise (fun l₁ l₂ => ∀ (x : α), x ∈ l₁ → ∀ (y : α), y ∈ l₂ → R x y) (l :: L)\n[PROOFSTEP]\nsimp only [join, pairwise_append, IH, mem_join, exists_imp, and_imp, this, forall_mem_cons, pairwise_cons]\n[GOAL]\ncase cons\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na : α\nl✝ l : List α\nL : List (List α)\nIH :\n  Pairwise R (join L) ↔\n    (∀ (l : List α), l ∈ L → Pairwise R l) ∧ Pairwise (fun l₁ l₂ => ∀ (x : α), x ∈ l₁ → ∀ (y : α), y ∈ l₂ → R x y) L\nthis :\n  (∀ (x : α), x ∈ l → ∀ (y : α) (x_1 : List α), x_1 ∈ L → y ∈ x_1 → R x y) ↔\n    ∀ (a' : List α), a' ∈ L → ∀ (x : α), x ∈ l → ∀ (y : α), y ∈ a' → R x y\n⊢ (Pairwise R l ∧\n      ((∀ (l : List α), l ∈ L → Pairwise R l) ∧\n          Pairwise (fun l₁ l₂ => ∀ (x : α), x ∈ l₁ → ∀ (y : α), y ∈ l₂ → R x y) L) ∧\n        ∀ (a' : List α), a' ∈ L → ∀ (x : α), x ∈ l → ∀ (y : α), y ∈ a' → R x y) ↔\n    (Pairwise R l ∧ ∀ (l : List α), l ∈ L → Pairwise R l) ∧\n      (∀ (a' : List α), a' ∈ L → ∀ (x : α), x ∈ l → ∀ (y : α), y ∈ a' → R x y) ∧\n        Pairwise (fun l₁ l₂ => ∀ (x : α), x ∈ l₁ → ∀ (y : α), y ∈ l₂ → R x y) L\n[PROOFSTEP]\nsimp only [and_assoc, and_comm, and_left_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nR✝ S T : α → α → Prop\na : α\nl✝ : List α\nR : β → β → Prop\nl : List α\nf : α → List β\n⊢ Pairwise R (List.bind l f) ↔\n    (∀ (a : α), a ∈ l → Pairwise R (f a)) ∧ Pairwise (fun a₁ a₂ => ∀ (x : β), x ∈ f a₁ → ∀ (y : β), y ∈ f a₂ → R x y) l\n[PROOFSTEP]\nsimp [List.bind, List.pairwise_join, List.mem_map, List.pairwise_map]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na : α\nl✝ : List α\ninst✝ : DecidableEq α\nl : List α\nr : α → α → Prop\nhr : ∀ (a : α), 1 < count a l → r a a\nh : ∀ (a : α), a ∈ l → ∀ (b : α), b ∈ l → a ≠ b → r a b\n⊢ Pairwise r l\n[PROOFSTEP]\ninduction' l with hd tl IH\n[GOAL]\ncase nil\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na : α\nl✝ : List α\ninst✝ : DecidableEq α\nl : List α\nr : α → α → Prop\nhr✝ : ∀ (a : α), 1 < count a l → r a a\nh✝ : ∀ (a : α), a ∈ l → ∀ (b : α), b ∈ l → a ≠ b → r a b\nhr : ∀ (a : α), 1 < count a [] → r a a\nh : ∀ (a : α), a ∈ [] → ∀ (b : α), b ∈ [] → a ≠ b → r a b\n⊢ Pairwise r []\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na : α\nl✝ : List α\ninst✝ : DecidableEq α\nl : List α\nr : α → α → Prop\nhr✝ : ∀ (a : α), 1 < count a l → r a a\nh✝ : ∀ (a : α), a ∈ l → ∀ (b : α), b ∈ l → a ≠ b → r a b\nhd : α\ntl : List α\nIH : (∀ (a : α), 1 < count a tl → r a a) → (∀ (a : α), a ∈ tl → ∀ (b : α), b ∈ tl → a ≠ b → r a b) → Pairwise r tl\nhr : ∀ (a : α), 1 < count a (hd :: tl) → r a a\nh : ∀ (a : α), a ∈ hd :: tl → ∀ (b : α), b ∈ hd :: tl → a ≠ b → r a b\n⊢ Pairwise r (hd :: tl)\n[PROOFSTEP]\nrw [List.pairwise_cons]\n[GOAL]\ncase cons\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na : α\nl✝ : List α\ninst✝ : DecidableEq α\nl : List α\nr : α → α → Prop\nhr✝ : ∀ (a : α), 1 < count a l → r a a\nh✝ : ∀ (a : α), a ∈ l → ∀ (b : α), b ∈ l → a ≠ b → r a b\nhd : α\ntl : List α\nIH : (∀ (a : α), 1 < count a tl → r a a) → (∀ (a : α), a ∈ tl → ∀ (b : α), b ∈ tl → a ≠ b → r a b) → Pairwise r tl\nhr : ∀ (a : α), 1 < count a (hd :: tl) → r a a\nh : ∀ (a : α), a ∈ hd :: tl → ∀ (b : α), b ∈ hd :: tl → a ≠ b → r a b\n⊢ (∀ (a' : α), a' ∈ tl → r hd a') ∧ Pairwise r tl\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase cons.left\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na : α\nl✝ : List α\ninst✝ : DecidableEq α\nl : List α\nr : α → α → Prop\nhr✝ : ∀ (a : α), 1 < count a l → r a a\nh✝ : ∀ (a : α), a ∈ l → ∀ (b : α), b ∈ l → a ≠ b → r a b\nhd : α\ntl : List α\nIH : (∀ (a : α), 1 < count a tl → r a a) → (∀ (a : α), a ∈ tl → ∀ (b : α), b ∈ tl → a ≠ b → r a b) → Pairwise r tl\nhr : ∀ (a : α), 1 < count a (hd :: tl) → r a a\nh : ∀ (a : α), a ∈ hd :: tl → ∀ (b : α), b ∈ hd :: tl → a ≠ b → r a b\n⊢ ∀ (a' : α), a' ∈ tl → r hd a'\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase cons.left\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na : α\nl✝ : List α\ninst✝ : DecidableEq α\nl : List α\nr : α → α → Prop\nhr✝ : ∀ (a : α), 1 < count a l → r a a\nh✝ : ∀ (a : α), a ∈ l → ∀ (b : α), b ∈ l → a ≠ b → r a b\nhd : α\ntl : List α\nIH : (∀ (a : α), 1 < count a tl → r a a) → (∀ (a : α), a ∈ tl → ∀ (b : α), b ∈ tl → a ≠ b → r a b) → Pairwise r tl\nhr : ∀ (a : α), 1 < count a (hd :: tl) → r a a\nh : ∀ (a : α), a ∈ hd :: tl → ∀ (b : α), b ∈ hd :: tl → a ≠ b → r a b\nx : α\nhx : x ∈ tl\n⊢ r hd x\n[PROOFSTEP]\nby_cases H : hd = x\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na : α\nl✝ : List α\ninst✝ : DecidableEq α\nl : List α\nr : α → α → Prop\nhr✝ : ∀ (a : α), 1 < count a l → r a a\nh✝ : ∀ (a : α), a ∈ l → ∀ (b : α), b ∈ l → a ≠ b → r a b\nhd : α\ntl : List α\nIH : (∀ (a : α), 1 < count a tl → r a a) → (∀ (a : α), a ∈ tl → ∀ (b : α), b ∈ tl → a ≠ b → r a b) → Pairwise r tl\nhr : ∀ (a : α), 1 < count a (hd :: tl) → r a a\nh : ∀ (a : α), a ∈ hd :: tl → ∀ (b : α), b ∈ hd :: tl → a ≠ b → r a b\nx : α\nhx : x ∈ tl\nH : hd = x\n⊢ r hd x\n[PROOFSTEP]\nrw [H]\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na : α\nl✝ : List α\ninst✝ : DecidableEq α\nl : List α\nr : α → α → Prop\nhr✝ : ∀ (a : α), 1 < count a l → r a a\nh✝ : ∀ (a : α), a ∈ l → ∀ (b : α), b ∈ l → a ≠ b → r a b\nhd : α\ntl : List α\nIH : (∀ (a : α), 1 < count a tl → r a a) → (∀ (a : α), a ∈ tl → ∀ (b : α), b ∈ tl → a ≠ b → r a b) → Pairwise r tl\nhr : ∀ (a : α), 1 < count a (hd :: tl) → r a a\nh : ∀ (a : α), a ∈ hd :: tl → ∀ (b : α), b ∈ hd :: tl → a ≠ b → r a b\nx : α\nhx : x ∈ tl\nH : hd = x\n⊢ r x x\n[PROOFSTEP]\nrefine' hr _ _\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na : α\nl✝ : List α\ninst✝ : DecidableEq α\nl : List α\nr : α → α → Prop\nhr✝ : ∀ (a : α), 1 < count a l → r a a\nh✝ : ∀ (a : α), a ∈ l → ∀ (b : α), b ∈ l → a ≠ b → r a b\nhd : α\ntl : List α\nIH : (∀ (a : α), 1 < count a tl → r a a) → (∀ (a : α), a ∈ tl → ∀ (b : α), b ∈ tl → a ≠ b → r a b) → Pairwise r tl\nhr : ∀ (a : α), 1 < count a (hd :: tl) → r a a\nh : ∀ (a : α), a ∈ hd :: tl → ∀ (b : α), b ∈ hd :: tl → a ≠ b → r a b\nx : α\nhx : x ∈ tl\nH : hd = x\n⊢ 1 < count x (hd :: tl)\n[PROOFSTEP]\nsimpa [count_cons, H, Nat.succ_lt_succ_iff, count_pos] using hx\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na : α\nl✝ : List α\ninst✝ : DecidableEq α\nl : List α\nr : α → α → Prop\nhr✝ : ∀ (a : α), 1 < count a l → r a a\nh✝ : ∀ (a : α), a ∈ l → ∀ (b : α), b ∈ l → a ≠ b → r a b\nhd : α\ntl : List α\nIH : (∀ (a : α), 1 < count a tl → r a a) → (∀ (a : α), a ∈ tl → ∀ (b : α), b ∈ tl → a ≠ b → r a b) → Pairwise r tl\nhr : ∀ (a : α), 1 < count a (hd :: tl) → r a a\nh : ∀ (a : α), a ∈ hd :: tl → ∀ (b : α), b ∈ hd :: tl → a ≠ b → r a b\nx : α\nhx : x ∈ tl\nH : ¬hd = x\n⊢ r hd x\n[PROOFSTEP]\nexact h hd (mem_cons_self _ _) x (mem_cons_of_mem _ hx) H\n[GOAL]\ncase cons.right\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na : α\nl✝ : List α\ninst✝ : DecidableEq α\nl : List α\nr : α → α → Prop\nhr✝ : ∀ (a : α), 1 < count a l → r a a\nh✝ : ∀ (a : α), a ∈ l → ∀ (b : α), b ∈ l → a ≠ b → r a b\nhd : α\ntl : List α\nIH : (∀ (a : α), 1 < count a tl → r a a) → (∀ (a : α), a ∈ tl → ∀ (b : α), b ∈ tl → a ≠ b → r a b) → Pairwise r tl\nhr : ∀ (a : α), 1 < count a (hd :: tl) → r a a\nh : ∀ (a : α), a ∈ hd :: tl → ∀ (b : α), b ∈ hd :: tl → a ≠ b → r a b\n⊢ Pairwise r tl\n[PROOFSTEP]\nrefine' IH _ _\n[GOAL]\ncase cons.right.refine'_1\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na : α\nl✝ : List α\ninst✝ : DecidableEq α\nl : List α\nr : α → α → Prop\nhr✝ : ∀ (a : α), 1 < count a l → r a a\nh✝ : ∀ (a : α), a ∈ l → ∀ (b : α), b ∈ l → a ≠ b → r a b\nhd : α\ntl : List α\nIH : (∀ (a : α), 1 < count a tl → r a a) → (∀ (a : α), a ∈ tl → ∀ (b : α), b ∈ tl → a ≠ b → r a b) → Pairwise r tl\nhr : ∀ (a : α), 1 < count a (hd :: tl) → r a a\nh : ∀ (a : α), a ∈ hd :: tl → ∀ (b : α), b ∈ hd :: tl → a ≠ b → r a b\n⊢ ∀ (a : α), 1 < count a tl → r a a\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase cons.right.refine'_1\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na : α\nl✝ : List α\ninst✝ : DecidableEq α\nl : List α\nr : α → α → Prop\nhr✝ : ∀ (a : α), 1 < count a l → r a a\nh✝ : ∀ (a : α), a ∈ l → ∀ (b : α), b ∈ l → a ≠ b → r a b\nhd : α\ntl : List α\nIH : (∀ (a : α), 1 < count a tl → r a a) → (∀ (a : α), a ∈ tl → ∀ (b : α), b ∈ tl → a ≠ b → r a b) → Pairwise r tl\nhr : ∀ (a : α), 1 < count a (hd :: tl) → r a a\nh : ∀ (a : α), a ∈ hd :: tl → ∀ (b : α), b ∈ hd :: tl → a ≠ b → r a b\nx : α\nhx : 1 < count x tl\n⊢ r x x\n[PROOFSTEP]\nrefine' hr _ _\n[GOAL]\ncase cons.right.refine'_1\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na : α\nl✝ : List α\ninst✝ : DecidableEq α\nl : List α\nr : α → α → Prop\nhr✝ : ∀ (a : α), 1 < count a l → r a a\nh✝ : ∀ (a : α), a ∈ l → ∀ (b : α), b ∈ l → a ≠ b → r a b\nhd : α\ntl : List α\nIH : (∀ (a : α), 1 < count a tl → r a a) → (∀ (a : α), a ∈ tl → ∀ (b : α), b ∈ tl → a ≠ b → r a b) → Pairwise r tl\nhr : ∀ (a : α), 1 < count a (hd :: tl) → r a a\nh : ∀ (a : α), a ∈ hd :: tl → ∀ (b : α), b ∈ hd :: tl → a ≠ b → r a b\nx : α\nhx : 1 < count x tl\n⊢ 1 < count x (hd :: tl)\n[PROOFSTEP]\nrw [count_cons]\n[GOAL]\ncase cons.right.refine'_1\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na : α\nl✝ : List α\ninst✝ : DecidableEq α\nl : List α\nr : α → α → Prop\nhr✝ : ∀ (a : α), 1 < count a l → r a a\nh✝ : ∀ (a : α), a ∈ l → ∀ (b : α), b ∈ l → a ≠ b → r a b\nhd : α\ntl : List α\nIH : (∀ (a : α), 1 < count a tl → r a a) → (∀ (a : α), a ∈ tl → ∀ (b : α), b ∈ tl → a ≠ b → r a b) → Pairwise r tl\nhr : ∀ (a : α), 1 < count a (hd :: tl) → r a a\nh : ∀ (a : α), a ∈ hd :: tl → ∀ (b : α), b ∈ hd :: tl → a ≠ b → r a b\nx : α\nhx : 1 < count x tl\n⊢ 1 < if x = hd then succ (count x tl) else count x tl\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na : α\nl✝ : List α\ninst✝ : DecidableEq α\nl : List α\nr : α → α → Prop\nhr✝ : ∀ (a : α), 1 < count a l → r a a\nh✝¹ : ∀ (a : α), a ∈ l → ∀ (b : α), b ∈ l → a ≠ b → r a b\nhd : α\ntl : List α\nIH : (∀ (a : α), 1 < count a tl → r a a) → (∀ (a : α), a ∈ tl → ∀ (b : α), b ∈ tl → a ≠ b → r a b) → Pairwise r tl\nhr : ∀ (a : α), 1 < count a (hd :: tl) → r a a\nh : ∀ (a : α), a ∈ hd :: tl → ∀ (b : α), b ∈ hd :: tl → a ≠ b → r a b\nx : α\nhx : 1 < count x tl\nh✝ : x = hd\n⊢ 1 < succ (count x tl)\n[PROOFSTEP]\nexact hx.trans (Nat.lt_succ_self _)\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na : α\nl✝ : List α\ninst✝ : DecidableEq α\nl : List α\nr : α → α → Prop\nhr✝ : ∀ (a : α), 1 < count a l → r a a\nh✝¹ : ∀ (a : α), a ∈ l → ∀ (b : α), b ∈ l → a ≠ b → r a b\nhd : α\ntl : List α\nIH : (∀ (a : α), 1 < count a tl → r a a) → (∀ (a : α), a ∈ tl → ∀ (b : α), b ∈ tl → a ≠ b → r a b) → Pairwise r tl\nhr : ∀ (a : α), 1 < count a (hd :: tl) → r a a\nh : ∀ (a : α), a ∈ hd :: tl → ∀ (b : α), b ∈ hd :: tl → a ≠ b → r a b\nx : α\nhx : 1 < count x tl\nh✝ : ¬x = hd\n⊢ 1 < count x tl\n[PROOFSTEP]\nexact hx\n[GOAL]\ncase cons.right.refine'_2\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na : α\nl✝ : List α\ninst✝ : DecidableEq α\nl : List α\nr : α → α → Prop\nhr✝ : ∀ (a : α), 1 < count a l → r a a\nh✝ : ∀ (a : α), a ∈ l → ∀ (b : α), b ∈ l → a ≠ b → r a b\nhd : α\ntl : List α\nIH : (∀ (a : α), 1 < count a tl → r a a) → (∀ (a : α), a ∈ tl → ∀ (b : α), b ∈ tl → a ≠ b → r a b) → Pairwise r tl\nhr : ∀ (a : α), 1 < count a (hd :: tl) → r a a\nh : ∀ (a : α), a ∈ hd :: tl → ∀ (b : α), b ∈ hd :: tl → a ≠ b → r a b\n⊢ ∀ (a : α), a ∈ tl → ∀ (b : α), b ∈ tl → a ≠ b → r a b\n[PROOFSTEP]\nintro x hx y hy\n[GOAL]\ncase cons.right.refine'_2\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na : α\nl✝ : List α\ninst✝ : DecidableEq α\nl : List α\nr : α → α → Prop\nhr✝ : ∀ (a : α), 1 < count a l → r a a\nh✝ : ∀ (a : α), a ∈ l → ∀ (b : α), b ∈ l → a ≠ b → r a b\nhd : α\ntl : List α\nIH : (∀ (a : α), 1 < count a tl → r a a) → (∀ (a : α), a ∈ tl → ∀ (b : α), b ∈ tl → a ≠ b → r a b) → Pairwise r tl\nhr : ∀ (a : α), 1 < count a (hd :: tl) → r a a\nh : ∀ (a : α), a ∈ hd :: tl → ∀ (b : α), b ∈ hd :: tl → a ≠ b → r a b\nx : α\nhx : x ∈ tl\ny : α\nhy : y ∈ tl\n⊢ x ≠ y → r x y\n[PROOFSTEP]\nexact h x (mem_cons_of_mem _ hx) y (mem_cons_of_mem _ hy)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na : α\nl✝ l : List α\nr : α → α → Prop\nh : ∀ (a : α), a ∈ l → ∀ (b : α), b ∈ l → r a b\n⊢ Pairwise r l\n[PROOFSTEP]\nclassical\nrefine' pairwise_of_reflexive_on_dupl_of_forall_ne (fun a ha' => _) fun a ha b hb _ => h a ha b hb\nhave ha := List.one_le_count_iff_mem.1 ha'.le\nexact h a ha a ha\n[GOAL]\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na : α\nl✝ l : List α\nr : α → α → Prop\nh : ∀ (a : α), a ∈ l → ∀ (b : α), b ∈ l → r a b\n⊢ Pairwise r l\n[PROOFSTEP]\nrefine' pairwise_of_reflexive_on_dupl_of_forall_ne (fun a ha' => _) fun a ha b hb _ => h a ha b hb\n[GOAL]\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na✝ : α\nl✝ l : List α\nr : α → α → Prop\nh : ∀ (a : α), a ∈ l → ∀ (b : α), b ∈ l → r a b\na : α\nha' : 1 < count a l\n⊢ r a a\n[PROOFSTEP]\nhave ha := List.one_le_count_iff_mem.1 ha'.le\n[GOAL]\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na✝ : α\nl✝ l : List α\nr : α → α → Prop\nh : ∀ (a : α), a ∈ l → ∀ (b : α), b ∈ l → r a b\na : α\nha' : 1 < count a l\nha : a ∈ l\n⊢ r a a\n[PROOFSTEP]\nexact h a ha a ha\n[GOAL]\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na : α\nl✝ l : List α\nr : α → α → Prop\nhr : Reflexive r\nh : ∀ (a : α), a ∈ l → ∀ (b : α), b ∈ l → a ≠ b → r a b\n⊢ Pairwise r l\n[PROOFSTEP]\nclassical exact pairwise_of_reflexive_on_dupl_of_forall_ne (fun _ _ => hr _) h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na : α\nl✝ l : List α\nr : α → α → Prop\nhr : Reflexive r\nh : ∀ (a : α), a ∈ l → ∀ (b : α), b ∈ l → a ≠ b → r a b\n⊢ Pairwise r l\n[PROOFSTEP]\nexact pairwise_of_reflexive_on_dupl_of_forall_ne (fun _ _ => hr _) h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na : α\nl : List α\n⊢ Pairwise R [] ↔ ∀ (i j : Fin (length [])), i < j → R (get [] i) (get [] j)\n[PROOFSTEP]\nsimp only [Pairwise.nil, true_iff_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na : α\nl : List α\n⊢ ∀ (i j : Fin (length [])), i < j → R (get [] i) (get [] j)\n[PROOFSTEP]\nexact fun i j _h => (Nat.not_lt_zero j).elim j.2\n[GOAL]\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na✝ : α\nl✝ : List α\na : α\nl : List α\n⊢ Pairwise R (a :: l) ↔ ∀ (i j : Fin (length (a :: l))), i < j → R (get (a :: l) i) (get (a :: l) j)\n[PROOFSTEP]\nrw [pairwise_cons, pairwise_iff_get]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na✝ : α\nl✝ : List α\na : α\nl : List α\n⊢ ((∀ (a' : α), a' ∈ l → R a a') ∧ ∀ (i j : Fin (length l)), i < j → R (get l i) (get l j)) ↔\n    ∀ (i j : Fin (length (a :: l))), i < j → R (get (a :: l) i) (get (a :: l) j)\n[PROOFSTEP]\nrefine' ⟨fun H i j hij => _, fun H => ⟨fun a' m => _, fun i j hij => _⟩⟩\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na✝ : α\nl✝ : List α\na : α\nl : List α\nH : (∀ (a' : α), a' ∈ l → R a a') ∧ ∀ (i j : Fin (length l)), i < j → R (get l i) (get l j)\ni j : Fin (length (a :: l))\nhij : i < j\n⊢ R (get (a :: l) i) (get (a :: l) j)\n[PROOFSTEP]\ncases' j with j hj\n[GOAL]\ncase refine'_1.mk\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na✝ : α\nl✝ : List α\na : α\nl : List α\nH : (∀ (a' : α), a' ∈ l → R a a') ∧ ∀ (i j : Fin (length l)), i < j → R (get l i) (get l j)\ni : Fin (length (a :: l))\nj : ℕ\nhj : j < length (a :: l)\nhij : i < { val := j, isLt := hj }\n⊢ R (get (a :: l) i) (get (a :: l) { val := j, isLt := hj })\n[PROOFSTEP]\ncases' j with j\n[GOAL]\ncase refine'_1.mk.zero\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na✝ : α\nl✝ : List α\na : α\nl : List α\nH : (∀ (a' : α), a' ∈ l → R a a') ∧ ∀ (i j : Fin (length l)), i < j → R (get l i) (get l j)\ni : Fin (length (a :: l))\nhj : zero < length (a :: l)\nhij : i < { val := zero, isLt := hj }\n⊢ R (get (a :: l) i) (get (a :: l) { val := zero, isLt := hj })\n[PROOFSTEP]\nexact (Nat.not_lt_zero _).elim hij\n[GOAL]\ncase refine'_1.mk.succ\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na✝ : α\nl✝ : List α\na : α\nl : List α\nH : (∀ (a' : α), a' ∈ l → R a a') ∧ ∀ (i j : Fin (length l)), i < j → R (get l i) (get l j)\ni : Fin (length (a :: l))\nj : ℕ\nhj : succ j < length (a :: l)\nhij : i < { val := succ j, isLt := hj }\n⊢ R (get (a :: l) i) (get (a :: l) { val := succ j, isLt := hj })\n[PROOFSTEP]\ncases' i with i hi\n[GOAL]\ncase refine'_1.mk.succ.mk\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na✝ : α\nl✝ : List α\na : α\nl : List α\nH : (∀ (a' : α), a' ∈ l → R a a') ∧ ∀ (i j : Fin (length l)), i < j → R (get l i) (get l j)\nj : ℕ\nhj : succ j < length (a :: l)\ni : ℕ\nhi : i < length (a :: l)\nhij : { val := i, isLt := hi } < { val := succ j, isLt := hj }\n⊢ R (get (a :: l) { val := i, isLt := hi }) (get (a :: l) { val := succ j, isLt := hj })\n[PROOFSTEP]\ncases' i with i\n[GOAL]\ncase refine'_1.mk.succ.mk.zero\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na✝ : α\nl✝ : List α\na : α\nl : List α\nH : (∀ (a' : α), a' ∈ l → R a a') ∧ ∀ (i j : Fin (length l)), i < j → R (get l i) (get l j)\nj : ℕ\nhj : succ j < length (a :: l)\nhi : zero < length (a :: l)\nhij : { val := zero, isLt := hi } < { val := succ j, isLt := hj }\n⊢ R (get (a :: l) { val := zero, isLt := hi }) (get (a :: l) { val := succ j, isLt := hj })\n[PROOFSTEP]\nexact H.1 _ (get_mem l _ _)\n[GOAL]\ncase refine'_1.mk.succ.mk.succ\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na✝ : α\nl✝ : List α\na : α\nl : List α\nH : (∀ (a' : α), a' ∈ l → R a a') ∧ ∀ (i j : Fin (length l)), i < j → R (get l i) (get l j)\nj : ℕ\nhj : succ j < length (a :: l)\ni : ℕ\nhi : succ i < length (a :: l)\nhij : { val := succ i, isLt := hi } < { val := succ j, isLt := hj }\n⊢ R (get (a :: l) { val := succ i, isLt := hi }) (get (a :: l) { val := succ j, isLt := hj })\n[PROOFSTEP]\nexact H.2 _ _ (Nat.lt_of_succ_lt_succ hij)\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na✝ : α\nl✝ : List α\na : α\nl : List α\nH : ∀ (i j : Fin (length (a :: l))), i < j → R (get (a :: l) i) (get (a :: l) j)\na' : α\nm : a' ∈ l\n⊢ R a a'\n[PROOFSTEP]\nrcases get_of_mem m with ⟨n, h, rfl⟩\n[GOAL]\ncase refine'_2.intro.refl\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na✝ : α\nl✝ : List α\na : α\nl : List α\nH : ∀ (i j : Fin (length (a :: l))), i < j → R (get (a :: l) i) (get (a :: l) j)\nn : Fin (length l)\nm : get l n ∈ l\n⊢ R a (get l n)\n[PROOFSTEP]\nhave := H ⟨0, show 0 < (a :: l).length from Nat.succ_pos _⟩ ⟨n.succ, Nat.succ_lt_succ n.2⟩ (Nat.succ_pos n)\n[GOAL]\ncase refine'_2.intro.refl\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na✝ : α\nl✝ : List α\na : α\nl : List α\nH : ∀ (i j : Fin (length (a :: l))), i < j → R (get (a :: l) i) (get (a :: l) j)\nn : Fin (length l)\nm : get l n ∈ l\nthis :\n  R (get (a :: l) { val := 0, isLt := (_ : 0 < length (a :: l)) })\n    (get (a :: l) { val := ↑(Fin.succ n), isLt := (_ : succ ↑n < succ (length l)) })\n⊢ R a (get l n)\n[PROOFSTEP]\nsimpa\n[GOAL]\ncase refine'_3\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na✝ : α\nl✝ : List α\na : α\nl : List α\nH : ∀ (i j : Fin (length (a :: l))), i < j → R (get (a :: l) i) (get (a :: l) j)\ni j : Fin (length l)\nhij : i < j\n⊢ R (get l i) (get l j)\n[PROOFSTEP]\nsimpa using H i.succ j.succ (show i.1.succ < j.1.succ from Nat.succ_lt_succ hij)\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nR S T : α✝ → α✝ → Prop\na : α✝\nl : List α✝\nα : Type u_3\nr : α → α → Prop\nx : α\nhx : r x x\n⊢ Pairwise r (replicate 0 x)\n[PROOFSTEP]\nsimp\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nR S T : α✝ → α✝ → Prop\na : α✝\nl : List α✝\nα : Type u_3\nr : α → α → Prop\nx : α\nhx : r x x\nn : ℕ\n⊢ Pairwise r (replicate (n + 1) x)\n[PROOFSTEP]\nsimp only [replicate, add_eq, add_zero, pairwise_cons, mem_replicate, ne_eq, and_imp, forall_eq_apply_imp_iff', hx,\n  implies_true, pairwise_replicate hx n, and_self]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na : α\nl : List α\ninst✝ : DecidableRel R\nf : β → α\nx : β\nxs : List β\nh : ∀ (b : α), b ∈ pwFilter R (map f xs) → R (f x) b\n⊢ pwFilter R (map f (x :: xs)) = map f (pwFilter (fun x y => R (f x) (f y)) (x :: xs))\n[PROOFSTEP]\nhave h' : ∀ b : β, b ∈ pwFilter (fun x y : β => R (f x) (f y)) xs → R (f x) (f b) := fun b hb =>\n  h _ (by rw [pwFilter_map f xs]; apply mem_map_of_mem _ hb)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na : α\nl : List α\ninst✝ : DecidableRel R\nf : β → α\nx : β\nxs : List β\nh : ∀ (b : α), b ∈ pwFilter R (map f xs) → R (f x) b\nb : β\nhb : b ∈ pwFilter (fun x y => R (f x) (f y)) xs\n⊢ f b ∈ pwFilter R (map f xs)\n[PROOFSTEP]\nrw [pwFilter_map f xs]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na : α\nl : List α\ninst✝ : DecidableRel R\nf : β → α\nx : β\nxs : List β\nh : ∀ (b : α), b ∈ pwFilter R (map f xs) → R (f x) b\nb : β\nhb : b ∈ pwFilter (fun x y => R (f x) (f y)) xs\n⊢ f b ∈ map f (pwFilter (fun x y => R (f x) (f y)) xs)\n[PROOFSTEP]\napply mem_map_of_mem _ hb\n[GOAL]\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na : α\nl : List α\ninst✝ : DecidableRel R\nf : β → α\nx : β\nxs : List β\nh : ∀ (b : α), b ∈ pwFilter R (map f xs) → R (f x) b\nh' : ∀ (b : β), b ∈ pwFilter (fun x y => R (f x) (f y)) xs → R (f x) (f b)\n⊢ pwFilter R (map f (x :: xs)) = map f (pwFilter (fun x y => R (f x) (f y)) (x :: xs))\n[PROOFSTEP]\nrw [map, pwFilter_cons_of_pos h, pwFilter_cons_of_pos h', pwFilter_map f xs, map]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na : α\nl : List α\ninst✝ : DecidableRel R\nf : β → α\nx : β\nxs : List β\nh : ¬∀ (b : α), b ∈ pwFilter R (map f xs) → R (f x) b\n⊢ pwFilter R (map f (x :: xs)) = map f (pwFilter (fun x y => R (f x) (f y)) (x :: xs))\n[PROOFSTEP]\nhave h' : ¬∀ b : β, b ∈ pwFilter (fun x y : β => R (f x) (f y)) xs → R (f x) (f b) := fun hh =>\n  h fun a ha => by\n    rw [pwFilter_map f xs, mem_map] at ha \n    rcases ha with ⟨b, hb₀, hb₁⟩\n    subst a\n    exact hh _ hb₀\n[GOAL]\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na✝ : α\nl : List α\ninst✝ : DecidableRel R\nf : β → α\nx : β\nxs : List β\nh : ¬∀ (b : α), b ∈ pwFilter R (map f xs) → R (f x) b\nhh : ∀ (b : β), b ∈ pwFilter (fun x y => R (f x) (f y)) xs → R (f x) (f b)\na : α\nha : a ∈ pwFilter R (map f xs)\n⊢ R (f x) a\n[PROOFSTEP]\nrw [pwFilter_map f xs, mem_map] at ha \n[GOAL]\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na✝ : α\nl : List α\ninst✝ : DecidableRel R\nf : β → α\nx : β\nxs : List β\nh : ¬∀ (b : α), b ∈ pwFilter R (map f xs) → R (f x) b\nhh : ∀ (b : β), b ∈ pwFilter (fun x y => R (f x) (f y)) xs → R (f x) (f b)\na : α\nha : ∃ a_1, a_1 ∈ pwFilter (fun x y => R (f x) (f y)) xs ∧ f a_1 = a\n⊢ R (f x) a\n[PROOFSTEP]\nrcases ha with ⟨b, hb₀, hb₁⟩\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na✝ : α\nl : List α\ninst✝ : DecidableRel R\nf : β → α\nx : β\nxs : List β\nh : ¬∀ (b : α), b ∈ pwFilter R (map f xs) → R (f x) b\nhh : ∀ (b : β), b ∈ pwFilter (fun x y => R (f x) (f y)) xs → R (f x) (f b)\na : α\nb : β\nhb₀ : b ∈ pwFilter (fun x y => R (f x) (f y)) xs\nhb₁ : f b = a\n⊢ R (f x) a\n[PROOFSTEP]\nsubst a\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na : α\nl : List α\ninst✝ : DecidableRel R\nf : β → α\nx : β\nxs : List β\nh : ¬∀ (b : α), b ∈ pwFilter R (map f xs) → R (f x) b\nhh : ∀ (b : β), b ∈ pwFilter (fun x y => R (f x) (f y)) xs → R (f x) (f b)\nb : β\nhb₀ : b ∈ pwFilter (fun x y => R (f x) (f y)) xs\n⊢ R (f x) (f b)\n[PROOFSTEP]\nexact hh _ hb₀\n[GOAL]\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na : α\nl : List α\ninst✝ : DecidableRel R\nf : β → α\nx : β\nxs : List β\nh : ¬∀ (b : α), b ∈ pwFilter R (map f xs) → R (f x) b\nh' : ¬∀ (b : β), b ∈ pwFilter (fun x y => R (f x) (f y)) xs → R (f x) (f b)\n⊢ pwFilter R (map f (x :: xs)) = map f (pwFilter (fun x y => R (f x) (f y)) (x :: xs))\n[PROOFSTEP]\nrw [map, pwFilter_cons_of_neg h, pwFilter_cons_of_neg h', pwFilter_map f xs]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na : α\nl✝ : List α\ninst✝ : DecidableRel R\nx : α\nl : List α\n⊢ pwFilter R (x :: l) <+ x :: l\n[PROOFSTEP]\nby_cases h : ∀ y ∈ pwFilter R l, R x y\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na : α\nl✝ : List α\ninst✝ : DecidableRel R\nx : α\nl : List α\nh : ∀ (y : α), y ∈ pwFilter R l → R x y\n⊢ pwFilter R (x :: l) <+ x :: l\n[PROOFSTEP]\nrw [pwFilter_cons_of_pos h]\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na : α\nl✝ : List α\ninst✝ : DecidableRel R\nx : α\nl : List α\nh : ∀ (y : α), y ∈ pwFilter R l → R x y\n⊢ x :: pwFilter R l <+ x :: l\n[PROOFSTEP]\nexact (pwFilter_sublist l).cons_cons _\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na : α\nl✝ : List α\ninst✝ : DecidableRel R\nx : α\nl : List α\nh : ¬∀ (y : α), y ∈ pwFilter R l → R x y\n⊢ pwFilter R (x :: l) <+ x :: l\n[PROOFSTEP]\nrw [pwFilter_cons_of_neg h]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na : α\nl✝ : List α\ninst✝ : DecidableRel R\nx : α\nl : List α\nh : ¬∀ (y : α), y ∈ pwFilter R l → R x y\n⊢ pwFilter R l <+ x :: l\n[PROOFSTEP]\nexact sublist_cons_of_sublist _ (pwFilter_sublist l)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na : α\nl✝ : List α\ninst✝ : DecidableRel R\nx : α\nl : List α\n⊢ Pairwise R (pwFilter R (x :: l))\n[PROOFSTEP]\nby_cases h : ∀ y ∈ pwFilter R l, R x y\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na : α\nl✝ : List α\ninst✝ : DecidableRel R\nx : α\nl : List α\nh : ∀ (y : α), y ∈ pwFilter R l → R x y\n⊢ Pairwise R (pwFilter R (x :: l))\n[PROOFSTEP]\nrw [pwFilter_cons_of_pos h]\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na : α\nl✝ : List α\ninst✝ : DecidableRel R\nx : α\nl : List α\nh : ∀ (y : α), y ∈ pwFilter R l → R x y\n⊢ Pairwise R (x :: pwFilter R l)\n[PROOFSTEP]\nexact pairwise_cons.2 ⟨h, pairwise_pwFilter l⟩\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na : α\nl✝ : List α\ninst✝ : DecidableRel R\nx : α\nl : List α\nh : ¬∀ (y : α), y ∈ pwFilter R l → R x y\n⊢ Pairwise R (pwFilter R (x :: l))\n[PROOFSTEP]\nrw [pwFilter_cons_of_neg h]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na : α\nl✝ : List α\ninst✝ : DecidableRel R\nx : α\nl : List α\nh : ¬∀ (y : α), y ∈ pwFilter R l → R x y\n⊢ Pairwise R (pwFilter R l)\n[PROOFSTEP]\nexact pairwise_pwFilter l\n[GOAL]\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na : α\nl✝ : List α\ninst✝ : DecidableRel R\nl : List α\np : Pairwise R l\n⊢ pwFilter R l = l\n[PROOFSTEP]\ninduction' l with x l IH\n[GOAL]\ncase nil\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na : α\nl✝ : List α\ninst✝ : DecidableRel R\nl : List α\np✝ : Pairwise R l\np : Pairwise R []\n⊢ pwFilter R [] = []\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na : α\nl✝¹ : List α\ninst✝ : DecidableRel R\nl✝ : List α\np✝ : Pairwise R l✝\nx : α\nl : List α\nIH : Pairwise R l → pwFilter R l = l\np : Pairwise R (x :: l)\n⊢ pwFilter R (x :: l) = x :: l\n[PROOFSTEP]\ncases' pairwise_cons.1 p with al p\n[GOAL]\ncase cons.intro\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na : α\nl✝¹ : List α\ninst✝ : DecidableRel R\nl✝ : List α\np✝¹ : Pairwise R l✝\nx : α\nl : List α\nIH : Pairwise R l → pwFilter R l = l\np✝ : Pairwise R (x :: l)\nal : ∀ (a' : α), a' ∈ l → R x a'\np : Pairwise R l\n⊢ pwFilter R (x :: l) = x :: l\n[PROOFSTEP]\nrw [pwFilter_cons_of_pos (BAll.imp_left (pwFilter_subset l) al), IH p]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na✝ : α\nl✝ : List α\ninst✝ : DecidableRel R\nneg_trans : ∀ {x y z : α}, R x z → R x y ∨ R y z\na : α\nl : List α\n⊢ (∀ (b : α), b ∈ pwFilter R l → R a b) → ∀ (b : α), b ∈ l → R a b\n[PROOFSTEP]\ninduction' l with x l IH\n[GOAL]\ncase nil\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na✝ : α\nl : List α\ninst✝ : DecidableRel R\nneg_trans : ∀ {x y z : α}, R x z → R x y ∨ R y z\na : α\n⊢ (∀ (b : α), b ∈ pwFilter R [] → R a b) → ∀ (b : α), b ∈ [] → R a b\n[PROOFSTEP]\nexact fun _ _ h => (not_mem_nil _ h).elim\n[GOAL]\ncase cons\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na✝ : α\nl✝ : List α\ninst✝ : DecidableRel R\nneg_trans : ∀ {x y z : α}, R x z → R x y ∨ R y z\na x : α\nl : List α\nIH : (∀ (b : α), b ∈ pwFilter R l → R a b) → ∀ (b : α), b ∈ l → R a b\n⊢ (∀ (b : α), b ∈ pwFilter R (x :: l) → R a b) → ∀ (b : α), b ∈ x :: l → R a b\n[PROOFSTEP]\nsimp only [forall_mem_cons]\n[GOAL]\ncase cons\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na✝ : α\nl✝ : List α\ninst✝ : DecidableRel R\nneg_trans : ∀ {x y z : α}, R x z → R x y ∨ R y z\na x : α\nl : List α\nIH : (∀ (b : α), b ∈ pwFilter R l → R a b) → ∀ (b : α), b ∈ l → R a b\n⊢ (∀ (b : α), b ∈ pwFilter R (x :: l) → R a b) → R a x ∧ ∀ (x : α), x ∈ l → R a x\n[PROOFSTEP]\nby_cases h : ∀ y ∈ pwFilter R l, R x y\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na✝ : α\nl✝ : List α\ninst✝ : DecidableRel R\nneg_trans : ∀ {x y z : α}, R x z → R x y ∨ R y z\na x : α\nl : List α\nIH : (∀ (b : α), b ∈ pwFilter R l → R a b) → ∀ (b : α), b ∈ l → R a b\nh : ∀ (y : α), y ∈ pwFilter R l → R x y\n⊢ (∀ (b : α), b ∈ pwFilter R (x :: l) → R a b) → R a x ∧ ∀ (x : α), x ∈ l → R a x\n[PROOFSTEP]\nsimp only [pwFilter_cons_of_pos h, forall_mem_cons, and_imp]\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na✝ : α\nl✝ : List α\ninst✝ : DecidableRel R\nneg_trans : ∀ {x y z : α}, R x z → R x y ∨ R y z\na x : α\nl : List α\nIH : (∀ (b : α), b ∈ pwFilter R l → R a b) → ∀ (b : α), b ∈ l → R a b\nh : ∀ (y : α), y ∈ pwFilter R l → R x y\n⊢ R a x → (∀ (x : α), x ∈ pwFilter R l → R a x) → R a x ∧ ∀ (x : α), x ∈ l → R a x\n[PROOFSTEP]\nexact fun r H => ⟨r, IH H⟩\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na✝ : α\nl✝ : List α\ninst✝ : DecidableRel R\nneg_trans : ∀ {x y z : α}, R x z → R x y ∨ R y z\na x : α\nl : List α\nIH : (∀ (b : α), b ∈ pwFilter R l → R a b) → ∀ (b : α), b ∈ l → R a b\nh : ¬∀ (y : α), y ∈ pwFilter R l → R x y\n⊢ (∀ (b : α), b ∈ pwFilter R (x :: l) → R a b) → R a x ∧ ∀ (x : α), x ∈ l → R a x\n[PROOFSTEP]\nrw [pwFilter_cons_of_neg h]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na✝ : α\nl✝ : List α\ninst✝ : DecidableRel R\nneg_trans : ∀ {x y z : α}, R x z → R x y ∨ R y z\na x : α\nl : List α\nIH : (∀ (b : α), b ∈ pwFilter R l → R a b) → ∀ (b : α), b ∈ l → R a b\nh : ¬∀ (y : α), y ∈ pwFilter R l → R x y\n⊢ (∀ (b : α), b ∈ pwFilter R l → R a b) → R a x ∧ ∀ (x : α), x ∈ l → R a x\n[PROOFSTEP]\nrefine' fun H => ⟨_, IH H⟩\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na✝ : α\nl✝ : List α\ninst✝ : DecidableRel R\nneg_trans : ∀ {x y z : α}, R x z → R x y ∨ R y z\na x : α\nl : List α\nIH : (∀ (b : α), b ∈ pwFilter R l → R a b) → ∀ (b : α), b ∈ l → R a b\nh : ¬∀ (y : α), y ∈ pwFilter R l → R x y\nH : ∀ (b : α), b ∈ pwFilter R l → R a b\n⊢ R a x\n[PROOFSTEP]\ncases' e : find? (fun y => ¬R x y) (pwFilter R l) with k\n[GOAL]\ncase neg.none\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na✝ : α\nl✝ : List α\ninst✝ : DecidableRel R\nneg_trans : ∀ {x y z : α}, R x z → R x y ∨ R y z\na x : α\nl : List α\nIH : (∀ (b : α), b ∈ pwFilter R l → R a b) → ∀ (b : α), b ∈ l → R a b\nh : ¬∀ (y : α), y ∈ pwFilter R l → R x y\nH : ∀ (b : α), b ∈ pwFilter R l → R a b\ne : find? (fun y => decide ¬R x y) (pwFilter R l) = none\n⊢ R a x\n[PROOFSTEP]\nrefine' h.elim (BAll.imp_right _ (find?_eq_none.1 e))\n[GOAL]\ncase neg.none\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na✝ : α\nl✝ : List α\ninst✝ : DecidableRel R\nneg_trans : ∀ {x y z : α}, R x z → R x y ∨ R y z\na x : α\nl : List α\nIH : (∀ (b : α), b ∈ pwFilter R l → R a b) → ∀ (b : α), b ∈ l → R a b\nh : ¬∀ (y : α), y ∈ pwFilter R l → R x y\nH : ∀ (b : α), b ∈ pwFilter R l → R a b\ne : find? (fun y => decide ¬R x y) (pwFilter R l) = none\n⊢ ∀ (x_1 : α), x_1 ∈ pwFilter R l → ¬(decide ¬R x x_1) = true → R x x_1\n[PROOFSTEP]\nexact fun y _ => by simp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na✝ : α\nl✝ : List α\ninst✝ : DecidableRel R\nneg_trans : ∀ {x y z : α}, R x z → R x y ∨ R y z\na x : α\nl : List α\nIH : (∀ (b : α), b ∈ pwFilter R l → R a b) → ∀ (b : α), b ∈ l → R a b\nh : ¬∀ (y : α), y ∈ pwFilter R l → R x y\nH : ∀ (b : α), b ∈ pwFilter R l → R a b\ne : find? (fun y => decide ¬R x y) (pwFilter R l) = none\ny : α\nx✝ : y ∈ pwFilter R l\n⊢ ¬(decide ¬R x y) = true → R x y\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg.some\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na✝ : α\nl✝ : List α\ninst✝ : DecidableRel R\nneg_trans : ∀ {x y z : α}, R x z → R x y ∨ R y z\na x : α\nl : List α\nIH : (∀ (b : α), b ∈ pwFilter R l → R a b) → ∀ (b : α), b ∈ l → R a b\nh : ¬∀ (y : α), y ∈ pwFilter R l → R x y\nH : ∀ (b : α), b ∈ pwFilter R l → R a b\nk : α\ne : find? (fun y => decide ¬R x y) (pwFilter R l) = some k\n⊢ R a x\n[PROOFSTEP]\nhave := find?_some e\n[GOAL]\ncase neg.some\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na✝ : α\nl✝ : List α\ninst✝ : DecidableRel R\nneg_trans : ∀ {x y z : α}, R x z → R x y ∨ R y z\na x : α\nl : List α\nIH : (∀ (b : α), b ∈ pwFilter R l → R a b) → ∀ (b : α), b ∈ l → R a b\nh : ¬∀ (y : α), y ∈ pwFilter R l → R x y\nH : ∀ (b : α), b ∈ pwFilter R l → R a b\nk : α\ne : find? (fun y => decide ¬R x y) (pwFilter R l) = some k\nthis : (decide ¬R x k) = true\n⊢ R a x\n[PROOFSTEP]\nexact (neg_trans (H k (find?_mem e))).resolve_right (by simpa)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nR S T : α → α → Prop\na✝ : α\nl✝ : List α\ninst✝ : DecidableRel R\nneg_trans : ∀ {x y z : α}, R x z → R x y ∨ R y z\na x : α\nl : List α\nIH : (∀ (b : α), b ∈ pwFilter R l → R a b) → ∀ (b : α), b ∈ l → R a b\nh : ¬∀ (y : α), y ∈ pwFilter R l → R x y\nH : ∀ (b : α), b ∈ pwFilter R l → R a b\nk : α\ne : find? (fun y => decide ¬R x y) (pwFilter R l) = some k\nthis : (decide ¬R x k) = true\n⊢ ¬R x k\n[PROOFSTEP]\nsimpa\n", "meta": {"mathlib_filename": "Mathlib.Data.List.Pairwise", "llama_tokens": 33397, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7279754489059774, "lm_q2_score": 0.6893056040203135, "lm_q1q2_score": 0.5017975565200936}}
{"text": "[GOAL]\nG : Type u\ninst✝¹ : Group G\nN : Subgroup G\nnN : Subgroup.Normal N\nH : Type v\ninst✝ : Group H\na b c d : G\nhab : Setoid.r a b\nhcd : Setoid.r c d\n⊢ Setoid.r (a * c) (b * d)\n[PROOFSTEP]\nrw [leftRel_eq] at hab hcd ⊢\n[GOAL]\nG : Type u\ninst✝¹ : Group G\nN : Subgroup G\nnN : Subgroup.Normal N\nH : Type v\ninst✝ : Group H\na b c d : G\nhab : a⁻¹ * b ∈ N\nhcd : c⁻¹ * d ∈ N\n⊢ (fun x y => x⁻¹ * y ∈ N) (a * c) (b * d)\n[PROOFSTEP]\ndsimp only\n[GOAL]\nG : Type u\ninst✝¹ : Group G\nN : Subgroup G\nnN : Subgroup.Normal N\nH : Type v\ninst✝ : Group H\na b c d : G\nhab : a⁻¹ * b ∈ N\nhcd : c⁻¹ * d ∈ N\n⊢ (a * c)⁻¹ * (b * d) ∈ N\n[PROOFSTEP]\ncalc\n  (a * c)⁻¹ * (b * d) = c⁻¹ * (a⁻¹ * b) * c⁻¹⁻¹ * (c⁻¹ * d) := by\n    simp only [mul_inv_rev, mul_assoc, inv_mul_cancel_left]\n  _ ∈ N := N.mul_mem (nN.conj_mem _ hab _) hcd\n[GOAL]\nG : Type u\ninst✝¹ : Group G\nN : Subgroup G\nnN : Subgroup.Normal N\nH : Type v\ninst✝ : Group H\na b c d : G\nhab : a⁻¹ * b ∈ N\nhcd : c⁻¹ * d ∈ N\n⊢ (a * c)⁻¹ * (b * d) = c⁻¹ * (a⁻¹ * b) * c⁻¹⁻¹ * (c⁻¹ * d)\n[PROOFSTEP]\nsimp only [mul_inv_rev, mul_assoc, inv_mul_cancel_left]\n[GOAL]\nG : Type u\ninst✝¹ : Group G\nN : Subgroup G\nnN : Subgroup.Normal N\nH : Type v\ninst✝ : Group H\nx y : G\n⊢ x⁻¹ * y ∈ N ↔ ∃ z, z ∈ N ∧ x * z = y\n[PROOFSTEP]\nsimp only [← _root_.eq_inv_mul_iff_mul_eq, exists_prop, exists_eq_right]\n[GOAL]\nG : Type u\ninst✝¹ : Group G\nN✝ : Subgroup G\nnN✝ : Subgroup.Normal N✝\nH : Type v\ninst✝ : Group H\nN : Subgroup G\nnN : Subgroup.Normal N\nx : G\n⊢ ↑x = 1 ↔ x ∈ N\n[PROOFSTEP]\nrefine' QuotientGroup.eq.trans _\n[GOAL]\nG : Type u\ninst✝¹ : Group G\nN✝ : Subgroup G\nnN✝ : Subgroup.Normal N✝\nH : Type v\ninst✝ : Group H\nN : Subgroup G\nnN : Subgroup.Normal N\nx : G\n⊢ x⁻¹ * 1 ∈ N ↔ x ∈ N\n[PROOFSTEP]\nrw [mul_one, Subgroup.inv_mem_iff]\n[GOAL]\nG : Type u\ninst✝³ : Group G\nN : Subgroup G\nnN : Subgroup.Normal N\nH : Type v\ninst✝² : Group H\nI : Type w\ninst✝¹ : Group I\nf : G →* H\ninst✝ : Subgroup.Normal (MonoidHom.range f)\ng : H →* I\nh : MonoidHom.comp (mk' (MonoidHom.range f)) (Subgroup.subtype (MonoidHom.ker g)) = 1\nx : H\nhx : x ∈ MonoidHom.ker g\n⊢ ↑x = 1\n[PROOFSTEP]\nexact FunLike.congr_fun h ⟨x, hx⟩\n[GOAL]\nG : Type u\ninst✝¹ : Group G\nN✝ : Subgroup G\nnN✝ : Subgroup.Normal N✝\nH : Type v\ninst✝ : Group H\nN : Subgroup G\nnN : Subgroup.Normal N\nx y : G\n⊢ ↑x = ↑y ↔ x / y ∈ N\n[PROOFSTEP]\nrefine' eq_comm.trans (QuotientGroup.eq.trans _)\n[GOAL]\nG : Type u\ninst✝¹ : Group G\nN✝ : Subgroup G\nnN✝ : Subgroup.Normal N✝\nH : Type v\ninst✝ : Group H\nN : Subgroup G\nnN : Subgroup.Normal N\nx y : G\n⊢ y⁻¹ * x ∈ N ↔ x / y ∈ N\n[PROOFSTEP]\nrw [nN.mem_comm_iff, div_eq_mul_inv]\n[GOAL]\nG : Type u\ninst✝¹ : Group G\nN : Subgroup G\nnN : Subgroup.Normal N\nH : Type v\ninst✝ : Group H\nφ : G →* H\nHN : ∀ (x : G), x ∈ N → ↑φ x = 1\nx y : G\nh : ↑(QuotientGroup.con N) x y\n⊢ ↑(Con.ker φ) x y\n[PROOFSTEP]\nsimp only [QuotientGroup.con, leftRel_apply, Con.rel_mk] at h \n[GOAL]\nG : Type u\ninst✝¹ : Group G\nN : Subgroup G\nnN : Subgroup.Normal N\nH : Type v\ninst✝ : Group H\nφ : G →* H\nHN : ∀ (x : G), x ∈ N → ↑φ x = 1\nx y : G\nh : x⁻¹ * y ∈ N\n⊢ ↑(Con.ker φ) x y\n[PROOFSTEP]\nrw [Con.ker_rel]\n[GOAL]\nG : Type u\ninst✝¹ : Group G\nN : Subgroup G\nnN : Subgroup.Normal N\nH : Type v\ninst✝ : Group H\nφ : G →* H\nHN : ∀ (x : G), x ∈ N → ↑φ x = 1\nx y : G\nh : x⁻¹ * y ∈ N\n⊢ ↑φ x = ↑φ y\n[PROOFSTEP]\ncalc\n  φ x = φ (y * (x⁻¹ * y)⁻¹) := by rw [mul_inv_rev, inv_inv, mul_inv_cancel_left]\n  _ = φ y := by rw [φ.map_mul, HN _ (N.inv_mem h), mul_one]\n[GOAL]\nG : Type u\ninst✝¹ : Group G\nN : Subgroup G\nnN : Subgroup.Normal N\nH : Type v\ninst✝ : Group H\nφ : G →* H\nHN : ∀ (x : G), x ∈ N → ↑φ x = 1\nx y : G\nh : x⁻¹ * y ∈ N\n⊢ ↑φ x = ↑φ (y * (x⁻¹ * y)⁻¹)\n[PROOFSTEP]\nrw [mul_inv_rev, inv_inv, mul_inv_cancel_left]\n[GOAL]\nG : Type u\ninst✝¹ : Group G\nN : Subgroup G\nnN : Subgroup.Normal N\nH : Type v\ninst✝ : Group H\nφ : G →* H\nHN : ∀ (x : G), x ∈ N → ↑φ x = 1\nx y : G\nh : x⁻¹ * y ∈ N\n⊢ ↑φ (y * (x⁻¹ * y)⁻¹) = ↑φ y\n[PROOFSTEP]\nrw [φ.map_mul, HN _ (N.inv_mem h), mul_one]\n[GOAL]\nG : Type u\ninst✝² : Group G\nN : Subgroup G\nnN : Subgroup.Normal N\nH : Type v\ninst✝¹ : Group H\nM : Subgroup H\ninst✝ : Subgroup.Normal M\nf : G →* H\nh : N ≤ Subgroup.comap f M\n⊢ G ⧸ N →* H ⧸ M\n[PROOFSTEP]\nrefine' QuotientGroup.lift N ((mk' M).comp f) _\n[GOAL]\nG : Type u\ninst✝² : Group G\nN : Subgroup G\nnN : Subgroup.Normal N\nH : Type v\ninst✝¹ : Group H\nM : Subgroup H\ninst✝ : Subgroup.Normal M\nf : G →* H\nh : N ≤ Subgroup.comap f M\n⊢ ∀ (x : G), x ∈ N → ↑(MonoidHom.comp (mk' M) f) x = 1\n[PROOFSTEP]\nintro x hx\n[GOAL]\nG : Type u\ninst✝² : Group G\nN : Subgroup G\nnN : Subgroup.Normal N\nH : Type v\ninst✝¹ : Group H\nM : Subgroup H\ninst✝ : Subgroup.Normal M\nf : G →* H\nh : N ≤ Subgroup.comap f M\nx : G\nhx : x ∈ N\n⊢ ↑(MonoidHom.comp (mk' M) f) x = 1\n[PROOFSTEP]\nrefine' QuotientGroup.eq.2 _\n[GOAL]\nG : Type u\ninst✝² : Group G\nN : Subgroup G\nnN : Subgroup.Normal N\nH : Type v\ninst✝¹ : Group H\nM : Subgroup H\ninst✝ : Subgroup.Normal M\nf : G →* H\nh : N ≤ Subgroup.comap f M\nx : G\nhx : x ∈ N\n⊢ (↑f x)⁻¹ * 1 ∈ M\n[PROOFSTEP]\nrw [mul_one, Subgroup.inv_mem_iff]\n[GOAL]\nG : Type u\ninst✝² : Group G\nN : Subgroup G\nnN : Subgroup.Normal N\nH : Type v\ninst✝¹ : Group H\nM : Subgroup H\ninst✝ : Subgroup.Normal M\nf : G →* H\nh : N ≤ Subgroup.comap f M\nx : G\nhx : x ∈ N\n⊢ ↑f x ∈ M\n[PROOFSTEP]\nexact h hx\n[GOAL]\nG : Type u\ninst✝⁴ : Group G\nN : Subgroup G\nnN : Subgroup.Normal N\nH : Type v\ninst✝³ : Group H\nI : Type u_1\ninst✝² : Group I\nM : Subgroup H\nO : Subgroup I\ninst✝¹ : Subgroup.Normal M\ninst✝ : Subgroup.Normal O\nf : G →* H\ng : H →* I\nhf : N ≤ Subgroup.comap f M\nhg : M ≤ Subgroup.comap g O\nhgf : optParam (N ≤ Subgroup.comap (MonoidHom.comp g f) O) (_ : N ≤ Subgroup.comap (MonoidHom.comp g f) O)\nx : G ⧸ N\n⊢ ↑(map M O g hg) (↑(map N M f hf) x) = ↑(map N O (MonoidHom.comp g f) hgf) x\n[PROOFSTEP]\nrefine' induction_on' x fun x => _\n[GOAL]\nG : Type u\ninst✝⁴ : Group G\nN : Subgroup G\nnN : Subgroup.Normal N\nH : Type v\ninst✝³ : Group H\nI : Type u_1\ninst✝² : Group I\nM : Subgroup H\nO : Subgroup I\ninst✝¹ : Subgroup.Normal M\ninst✝ : Subgroup.Normal O\nf : G →* H\ng : H →* I\nhf : N ≤ Subgroup.comap f M\nhg : M ≤ Subgroup.comap g O\nhgf : optParam (N ≤ Subgroup.comap (MonoidHom.comp g f) O) (_ : N ≤ Subgroup.comap (MonoidHom.comp g f) O)\nx✝ : G ⧸ N\nx : G\n⊢ ↑(map M O g hg) (↑(map N M f hf) ↑x) = ↑(map N O (MonoidHom.comp g f) hgf) ↑x\n[PROOFSTEP]\nsimp only [map_mk, MonoidHom.comp_apply]\n[GOAL]\nG : Type u\ninst✝³ : Group G\nN : Subgroup G\nnN : Subgroup.Normal N\nH : Type v\ninst✝² : Group H\nG' : Subgroup G\nH' : Subgroup H\ninst✝¹ : Subgroup.Normal G'\ninst✝ : Subgroup.Normal H'\ne : G ≃* H\nhe : Subgroup.map (↑e) G' = H'\nsrc✝ : G ⧸ G' →* H ⧸ H' := map G' H' ↑e (_ : G' ≤ Subgroup.comap (↑e) H')\nx : G ⧸ G'\n⊢ ↑(map H' G' ↑(MulEquiv.symm e) (_ : H' ≤ Subgroup.comap (↑(MulEquiv.symm e)) G'))\n      (↑(map G' H' ↑e (_ : G' ≤ Subgroup.comap (↑e) H')) x) =\n    x\n[PROOFSTEP]\nrw [map_map G' H' G' e e.symm (he ▸ G'.le_comap_map (e : G →* H)) (he ▸ (G'.map_equiv_eq_comap_symm e).le)]\n[GOAL]\nG : Type u\ninst✝³ : Group G\nN : Subgroup G\nnN : Subgroup.Normal N\nH : Type v\ninst✝² : Group H\nG' : Subgroup G\nH' : Subgroup H\ninst✝¹ : Subgroup.Normal G'\ninst✝ : Subgroup.Normal H'\ne : G ≃* H\nhe : Subgroup.map (↑e) G' = H'\nsrc✝ : G ⧸ G' →* H ⧸ H' := map G' H' ↑e (_ : G' ≤ Subgroup.comap (↑e) H')\nx : G ⧸ G'\n⊢ ↑(map G' G' (MonoidHom.comp ↑(MulEquiv.symm e) ↑e)\n          (_ : G' ≤ Subgroup.comap (MonoidHom.comp ↑(MulEquiv.symm e) ↑e) G'))\n      x =\n    x\n[PROOFSTEP]\nsimp only [map_map, ← MulEquiv.coe_monoidHom_trans, MulEquiv.self_trans_symm, MulEquiv.coe_monoidHom_refl, map_id_apply]\n[GOAL]\nG : Type u\ninst✝³ : Group G\nN : Subgroup G\nnN : Subgroup.Normal N\nH : Type v\ninst✝² : Group H\nG' : Subgroup G\nH' : Subgroup H\ninst✝¹ : Subgroup.Normal G'\ninst✝ : Subgroup.Normal H'\ne : G ≃* H\nhe : Subgroup.map (↑e) G' = H'\nsrc✝ : G ⧸ G' →* H ⧸ H' := map G' H' ↑e (_ : G' ≤ Subgroup.comap (↑e) H')\nx : H ⧸ H'\n⊢ ↑(map G' H' ↑e (_ : G' ≤ Subgroup.comap (↑e) H'))\n      (↑(map H' G' ↑(MulEquiv.symm e) (_ : H' ≤ Subgroup.comap (↑(MulEquiv.symm e)) G')) x) =\n    x\n[PROOFSTEP]\nrw [map_map H' G' H' e.symm e (he ▸ (G'.map_equiv_eq_comap_symm e).le) (he ▸ G'.le_comap_map (e : G →* H))]\n[GOAL]\nG : Type u\ninst✝³ : Group G\nN : Subgroup G\nnN : Subgroup.Normal N\nH : Type v\ninst✝² : Group H\nG' : Subgroup G\nH' : Subgroup H\ninst✝¹ : Subgroup.Normal G'\ninst✝ : Subgroup.Normal H'\ne : G ≃* H\nhe : Subgroup.map (↑e) G' = H'\nsrc✝ : G ⧸ G' →* H ⧸ H' := map G' H' ↑e (_ : G' ≤ Subgroup.comap (↑e) H')\nx : H ⧸ H'\n⊢ ↑(map H' H' (MonoidHom.comp ↑e ↑(MulEquiv.symm e))\n          (_ : H' ≤ Subgroup.comap (MonoidHom.comp ↑e ↑(MulEquiv.symm e)) H'))\n      x =\n    x\n[PROOFSTEP]\nsimp only [← MulEquiv.coe_monoidHom_trans, MulEquiv.symm_trans_self, MulEquiv.coe_monoidHom_refl, map_id_apply]\n[GOAL]\nG : Type u\ninst✝³ : Group G\nN : Subgroup G\nnN : Subgroup.Normal N\nH : Type v\ninst✝² : Group H\nG' : Subgroup G\nH' : Subgroup H\ninst✝¹ : Subgroup.Normal G'\ninst✝ : Subgroup.Normal H'\nhe : optParam (Subgroup.map (↑(MulEquiv.refl G)) G' = G') (_ : Subgroup.map (MonoidHom.id G) G' = G')\n⊢ congr G' G' (MulEquiv.refl G) he = MulEquiv.refl (G ⧸ G')\n[PROOFSTEP]\next ⟨x⟩\n[GOAL]\ncase h.mk\nG : Type u\ninst✝³ : Group G\nN : Subgroup G\nnN : Subgroup.Normal N\nH : Type v\ninst✝² : Group H\nG' : Subgroup G\nH' : Subgroup H\ninst✝¹ : Subgroup.Normal G'\ninst✝ : Subgroup.Normal H'\nhe : optParam (Subgroup.map (↑(MulEquiv.refl G)) G' = G') (_ : Subgroup.map (MonoidHom.id G) G' = G')\nx✝ : G ⧸ G'\nx : G\n⊢ ↑(congr G' G' (MulEquiv.refl G) he) (Quot.mk Setoid.r x) = ↑(MulEquiv.refl (G ⧸ G')) (Quot.mk Setoid.r x)\n[PROOFSTEP]\nrfl\n[GOAL]\nG : Type u\ninst✝¹ : Group G\nN : Subgroup G\nnN : Subgroup.Normal N\nH : Type v\ninst✝ : Group H\nφ : G →* H\na✝ b✝ : G ⧸ ker φ\na b : G\nh : ↑φ a = ↑φ b\n⊢ Setoid.r a b\n[PROOFSTEP]\nrw [leftRel_apply, mem_ker, φ.map_mul, ← h, φ.map_inv, inv_mul_self]\n[GOAL]\nG : Type u\ninst✝¹ : Group G\nN : Subgroup G\nnN : Subgroup.Normal N\nH : Type v\ninst✝ : Group H\nφ : G →* H\ng : G\nhg : g ∈ ker φ\n⊢ g ∈ ker (rangeRestrict φ)\n[PROOFSTEP]\nrwa [ker_rangeRestrict]\n[GOAL]\nG : Type u\ninst✝¹ : Group G\nN : Subgroup G\nnN : Subgroup.Normal N\nH : Type v\ninst✝ : Group H\nφ : G →* H\na✝ b✝ : G ⧸ ker φ\na b : G\nh : ↑(rangeRestrict φ) a = ↑(rangeRestrict φ) b\n⊢ Setoid.r a b\n[PROOFSTEP]\nrw [leftRel_apply, ← ker_rangeRestrict, mem_ker, φ.rangeRestrict.map_mul, ← h, φ.rangeRestrict.map_inv, inv_mul_self]\n[GOAL]\nG : Type u\ninst✝¹ : Group G\nN : Subgroup G\nnN : Subgroup.Normal N\nH : Type v\ninst✝ : Group H\nφ : G →* H\n⊢ Surjective ↑(rangeKerLift φ)\n[PROOFSTEP]\nrintro ⟨_, g, rfl⟩\n[GOAL]\ncase mk.intro\nG : Type u\ninst✝¹ : Group G\nN : Subgroup G\nnN : Subgroup.Normal N\nH : Type v\ninst✝ : Group H\nφ : G →* H\ng : G\n⊢ ∃ a, ↑(rangeKerLift φ) a = { val := ↑φ g, property := (_ : ∃ y, ↑φ y = ↑φ g) }\n[PROOFSTEP]\nuse mk g\n[GOAL]\ncase h\nG : Type u\ninst✝¹ : Group G\nN : Subgroup G\nnN : Subgroup.Normal N\nH : Type v\ninst✝ : Group H\nφ : G →* H\ng : G\n⊢ ↑(rangeKerLift φ) ↑g = { val := ↑φ g, property := (_ : ∃ y, ↑φ y = ↑φ g) }\n[PROOFSTEP]\nrfl\n[GOAL]\nG : Type u\ninst✝¹ : Group G\nN : Subgroup G\nnN : Subgroup.Normal N\nH : Type v\ninst✝ : Group H\nφ : G →* H\nψ : H → G\nhφ : Function.RightInverse ψ ↑φ\nsrc✝ : G ⧸ ker φ →* H := kerLift φ\nx : G ⧸ ker φ\n⊢ ↑(kerLift φ) ((mk ∘ ψ) (↑(kerLift φ) x)) = ↑(kerLift φ) x\n[PROOFSTEP]\nrw [Function.comp_apply, kerLift_mk', hφ]\n[GOAL]\nG : Type u\ninst✝¹ : Group G\nN : Subgroup G\nnN : Subgroup.Normal N\nH : Type v\ninst✝ : Group H\nφ : G →* H\nA' A B' B : Subgroup G\nhAN : Subgroup.Normal (Subgroup.subgroupOf A' A)\nhBN : Subgroup.Normal (Subgroup.subgroupOf B' B)\nh' : A' = B'\nh : A = B\n⊢ MonoidHom.comp (quotientMapSubgroupOfOfLe (_ : B' ≤ A') (_ : B ≤ A))\n      (quotientMapSubgroupOfOfLe (_ : A' ≤ B') (_ : A ≤ B)) =\n    MonoidHom.id ({ x // x ∈ A } ⧸ Subgroup.subgroupOf A' A)\n[PROOFSTEP]\next ⟨x, hx⟩\n[GOAL]\ncase h.h.mk\nG : Type u\ninst✝¹ : Group G\nN : Subgroup G\nnN : Subgroup.Normal N\nH : Type v\ninst✝ : Group H\nφ : G →* H\nA' A B' B : Subgroup G\nhAN : Subgroup.Normal (Subgroup.subgroupOf A' A)\nhBN : Subgroup.Normal (Subgroup.subgroupOf B' B)\nh' : A' = B'\nh : A = B\nx : G\nhx : x ∈ A\n⊢ ↑(MonoidHom.comp\n          (MonoidHom.comp (quotientMapSubgroupOfOfLe (_ : B' ≤ A') (_ : B ≤ A))\n            (quotientMapSubgroupOfOfLe (_ : A' ≤ B') (_ : A ≤ B)))\n          (mk' (Subgroup.subgroupOf A' A)))\n      { val := x, property := hx } =\n    ↑(MonoidHom.comp (MonoidHom.id ({ x // x ∈ A } ⧸ Subgroup.subgroupOf A' A)) (mk' (Subgroup.subgroupOf A' A)))\n      { val := x, property := hx }\n[PROOFSTEP]\nrfl\n[GOAL]\nG : Type u\ninst✝¹ : Group G\nN : Subgroup G\nnN : Subgroup.Normal N\nH : Type v\ninst✝ : Group H\nφ : G →* H\nA' A B' B : Subgroup G\nhAN : Subgroup.Normal (Subgroup.subgroupOf A' A)\nhBN : Subgroup.Normal (Subgroup.subgroupOf B' B)\nh' : A' = B'\nh : A = B\n⊢ MonoidHom.comp (quotientMapSubgroupOfOfLe (_ : A' ≤ B') (_ : A ≤ B))\n      (quotientMapSubgroupOfOfLe (_ : B' ≤ A') (_ : B ≤ A)) =\n    MonoidHom.id ({ x // x ∈ B } ⧸ Subgroup.subgroupOf B' B)\n[PROOFSTEP]\next ⟨x, hx⟩\n[GOAL]\ncase h.h.mk\nG : Type u\ninst✝¹ : Group G\nN : Subgroup G\nnN : Subgroup.Normal N\nH : Type v\ninst✝ : Group H\nφ : G →* H\nA' A B' B : Subgroup G\nhAN : Subgroup.Normal (Subgroup.subgroupOf A' A)\nhBN : Subgroup.Normal (Subgroup.subgroupOf B' B)\nh' : A' = B'\nh : A = B\nx : G\nhx : x ∈ B\n⊢ ↑(MonoidHom.comp\n          (MonoidHom.comp (quotientMapSubgroupOfOfLe (_ : A' ≤ B') (_ : A ≤ B))\n            (quotientMapSubgroupOfOfLe (_ : B' ≤ A') (_ : B ≤ A)))\n          (mk' (Subgroup.subgroupOf B' B)))\n      { val := x, property := hx } =\n    ↑(MonoidHom.comp (MonoidHom.id ({ x // x ∈ B } ⧸ Subgroup.subgroupOf B' B)) (mk' (Subgroup.subgroupOf B' B)))\n      { val := x, property := hx }\n[PROOFSTEP]\nrfl\n[GOAL]\nG : Type u\ninst✝⁴ : Group G\nN : Subgroup G\nnN : Subgroup.Normal N\nH : Type v\ninst✝³ : Group H\nφ : G →* H\nA B C : Type u\ninst✝² : CommGroup A\ninst✝¹ : CommGroup B\ninst✝ : CommGroup C\nf : A →* B\ng✝ : B →* A\ne : A ≃* B\nd : B ≃* C\nn : ℤ\ng : A\nx✝ : g ∈ range (zpowGroupHom n)\nh : A\nhg : h ^ n = g\n⊢ ↑(zpowGroupHom n) (↑f h) = ↑f g\n[PROOFSTEP]\nsimp only [← hg, map_zpow, zpowGroupHom_apply]\n[GOAL]\nG : Type u\ninst✝⁴ : Group G\nN : Subgroup G\nnN : Subgroup.Normal N\nH : Type v\ninst✝³ : Group H\nφ : G →* H\nA B C : Type u\ninst✝² : CommGroup A\ninst✝¹ : CommGroup B\ninst✝ : CommGroup C\nf : A →* B\ng : B →* A\ne : A ≃* B\nd : B ≃* C\nn : ℤ\n⊢ MulEquiv.refl (A ⧸ range (zpowGroupHom n)) = equivQuotientZPowOfEquiv (MulEquiv.refl A) n\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nG : Type u\ninst✝⁴ : Group G\nN : Subgroup G\nnN : Subgroup.Normal N\nH : Type v\ninst✝³ : Group H\nφ : G →* H\nA B C : Type u\ninst✝² : CommGroup A\ninst✝¹ : CommGroup B\ninst✝ : CommGroup C\nf : A →* B\ng : B →* A\ne : A ≃* B\nd : B ≃* C\nn : ℤ\nx : A ⧸ range (zpowGroupHom n)\n⊢ ↑(MulEquiv.refl (A ⧸ range (zpowGroupHom n))) x = ↑(equivQuotientZPowOfEquiv (MulEquiv.refl A) n) x\n[PROOFSTEP]\nrw [← Quotient.out_eq' x]\n[GOAL]\ncase h\nG : Type u\ninst✝⁴ : Group G\nN : Subgroup G\nnN : Subgroup.Normal N\nH : Type v\ninst✝³ : Group H\nφ : G →* H\nA B C : Type u\ninst✝² : CommGroup A\ninst✝¹ : CommGroup B\ninst✝ : CommGroup C\nf : A →* B\ng : B →* A\ne : A ≃* B\nd : B ≃* C\nn : ℤ\nx : A ⧸ range (zpowGroupHom n)\n⊢ ↑(MulEquiv.refl (A ⧸ range (zpowGroupHom n))) (Quotient.mk'' (Quotient.out' x)) =\n    ↑(equivQuotientZPowOfEquiv (MulEquiv.refl A) n) (Quotient.mk'' (Quotient.out' x))\n[PROOFSTEP]\nrfl\n[GOAL]\nG : Type u\ninst✝⁴ : Group G\nN : Subgroup G\nnN : Subgroup.Normal N\nH : Type v\ninst✝³ : Group H\nφ : G →* H\nA B C : Type u\ninst✝² : CommGroup A\ninst✝¹ : CommGroup B\ninst✝ : CommGroup C\nf : A →* B\ng : B →* A\ne : A ≃* B\nd : B ≃* C\nn : ℤ\n⊢ MulEquiv.trans (equivQuotientZPowOfEquiv e n) (equivQuotientZPowOfEquiv d n) =\n    equivQuotientZPowOfEquiv (MulEquiv.trans e d) n\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nG : Type u\ninst✝⁴ : Group G\nN : Subgroup G\nnN : Subgroup.Normal N\nH : Type v\ninst✝³ : Group H\nφ : G →* H\nA B C : Type u\ninst✝² : CommGroup A\ninst✝¹ : CommGroup B\ninst✝ : CommGroup C\nf : A →* B\ng : B →* A\ne : A ≃* B\nd : B ≃* C\nn : ℤ\nx : A ⧸ range (zpowGroupHom n)\n⊢ ↑(MulEquiv.trans (equivQuotientZPowOfEquiv e n) (equivQuotientZPowOfEquiv d n)) x =\n    ↑(equivQuotientZPowOfEquiv (MulEquiv.trans e d) n) x\n[PROOFSTEP]\nrw [← Quotient.out_eq' x]\n[GOAL]\ncase h\nG : Type u\ninst✝⁴ : Group G\nN : Subgroup G\nnN : Subgroup.Normal N\nH : Type v\ninst✝³ : Group H\nφ : G →* H\nA B C : Type u\ninst✝² : CommGroup A\ninst✝¹ : CommGroup B\ninst✝ : CommGroup C\nf : A →* B\ng : B →* A\ne : A ≃* B\nd : B ≃* C\nn : ℤ\nx : A ⧸ range (zpowGroupHom n)\n⊢ ↑(MulEquiv.trans (equivQuotientZPowOfEquiv e n) (equivQuotientZPowOfEquiv d n)) (Quotient.mk'' (Quotient.out' x)) =\n    ↑(equivQuotientZPowOfEquiv (MulEquiv.trans e d) n) (Quotient.mk'' (Quotient.out' x))\n[PROOFSTEP]\nrfl\n[GOAL]\nG : Type u\ninst✝² : Group G\nN✝ : Subgroup G\nnN : Normal N✝\nH✝ : Type v\ninst✝¹ : Group H✝\nφ✝ : G →* H✝\nH N : Subgroup G\ninst✝ : Normal N\nφ : { x // x ∈ H } →* { x // x ∈ H ⊔ N } ⧸ subgroupOf N (H ⊔ N) :=\n  MonoidHom.comp (mk' (subgroupOf N (H ⊔ N))) (inclusion (_ : H ≤ H ⊔ N))\nx : { x // x ∈ H ⊔ N } ⧸ subgroupOf N (H ⊔ N)\n⊢ ∀ (a : { x // x ∈ H ⊔ N }), ∃ a_1, ↑φ a_1 = Quotient.mk'' a\n[PROOFSTEP]\nrintro ⟨y, hy : y ∈ (H ⊔ N)⟩\n[GOAL]\ncase mk\nG : Type u\ninst✝² : Group G\nN✝ : Subgroup G\nnN : Normal N✝\nH✝ : Type v\ninst✝¹ : Group H✝\nφ✝ : G →* H✝\nH N : Subgroup G\ninst✝ : Normal N\nφ : { x // x ∈ H } →* { x // x ∈ H ⊔ N } ⧸ subgroupOf N (H ⊔ N) :=\n  MonoidHom.comp (mk' (subgroupOf N (H ⊔ N))) (inclusion (_ : H ≤ H ⊔ N))\nx : { x // x ∈ H ⊔ N } ⧸ subgroupOf N (H ⊔ N)\ny : G\nhy : y ∈ H ⊔ N\n⊢ ∃ a, ↑φ a = Quotient.mk'' { val := y, property := hy }\n[PROOFSTEP]\nrw [← SetLike.mem_coe] at hy \n[GOAL]\ncase mk\nG : Type u\ninst✝² : Group G\nN✝ : Subgroup G\nnN : Normal N✝\nH✝ : Type v\ninst✝¹ : Group H✝\nφ✝ : G →* H✝\nH N : Subgroup G\ninst✝ : Normal N\nφ : { x // x ∈ H } →* { x // x ∈ H ⊔ N } ⧸ subgroupOf N (H ⊔ N) :=\n  MonoidHom.comp (mk' (subgroupOf N (H ⊔ N))) (inclusion (_ : H ≤ H ⊔ N))\nx : { x // x ∈ H ⊔ N } ⧸ subgroupOf N (H ⊔ N)\ny : G\nhy✝ : y ∈ H ⊔ N\nhy : y ∈ ↑(H ⊔ N)\n⊢ ∃ a, ↑φ a = Quotient.mk'' { val := y, property := hy✝ }\n[PROOFSTEP]\nrw [mul_normal H N] at hy \n[GOAL]\ncase mk\nG : Type u\ninst✝² : Group G\nN✝ : Subgroup G\nnN : Normal N✝\nH✝ : Type v\ninst✝¹ : Group H✝\nφ✝ : G →* H✝\nH N : Subgroup G\ninst✝ : Normal N\nφ : { x // x ∈ H } →* { x // x ∈ H ⊔ N } ⧸ subgroupOf N (H ⊔ N) :=\n  MonoidHom.comp (mk' (subgroupOf N (H ⊔ N))) (inclusion (_ : H ≤ H ⊔ N))\nx : { x // x ∈ H ⊔ N } ⧸ subgroupOf N (H ⊔ N)\ny : G\nhy✝ : y ∈ H ⊔ N\nhy : y ∈ ↑H * ↑N\n⊢ ∃ a, ↑φ a = Quotient.mk'' { val := y, property := hy✝ }\n[PROOFSTEP]\nrcases hy with ⟨h, n, hh, hn, rfl⟩\n[GOAL]\ncase mk.intro.intro.intro.intro\nG : Type u\ninst✝² : Group G\nN✝ : Subgroup G\nnN : Normal N✝\nH✝ : Type v\ninst✝¹ : Group H✝\nφ✝ : G →* H✝\nH N : Subgroup G\ninst✝ : Normal N\nφ : { x // x ∈ H } →* { x // x ∈ H ⊔ N } ⧸ subgroupOf N (H ⊔ N) :=\n  MonoidHom.comp (mk' (subgroupOf N (H ⊔ N))) (inclusion (_ : H ≤ H ⊔ N))\nx : { x // x ∈ H ⊔ N } ⧸ subgroupOf N (H ⊔ N)\nh n : G\nhh : h ∈ ↑H\nhn : n ∈ ↑N\nhy : (fun x x_1 => x * x_1) h n ∈ H ⊔ N\n⊢ ∃ a, ↑φ a = Quotient.mk'' { val := (fun x x_1 => x * x_1) h n, property := hy }\n[PROOFSTEP]\nuse⟨h, hh⟩\n[GOAL]\ncase h\nG : Type u\ninst✝² : Group G\nN✝ : Subgroup G\nnN : Normal N✝\nH✝ : Type v\ninst✝¹ : Group H✝\nφ✝ : G →* H✝\nH N : Subgroup G\ninst✝ : Normal N\nφ : { x // x ∈ H } →* { x // x ∈ H ⊔ N } ⧸ subgroupOf N (H ⊔ N) :=\n  MonoidHom.comp (mk' (subgroupOf N (H ⊔ N))) (inclusion (_ : H ≤ H ⊔ N))\nx : { x // x ∈ H ⊔ N } ⧸ subgroupOf N (H ⊔ N)\nh n : G\nhh : h ∈ ↑H\nhn : n ∈ ↑N\nhy : (fun x x_1 => x * x_1) h n ∈ H ⊔ N\n⊢ ↑φ { val := h, property := hh } = Quotient.mk'' { val := (fun x x_1 => x * x_1) h n, property := hy }\n[PROOFSTEP]\nlet _ : Setoid ↑(H ⊔ N) :=\n  (@leftRel ↑(H ⊔ N) (H ⊔ N : Subgroup G).toGroup (N.subgroupOf (H ⊔ N)))\n    -- porting note: Lean couldn't find this automatically\n[GOAL]\ncase h\nG : Type u\ninst✝² : Group G\nN✝ : Subgroup G\nnN : Normal N✝\nH✝ : Type v\ninst✝¹ : Group H✝\nφ✝ : G →* H✝\nH N : Subgroup G\ninst✝ : Normal N\nφ : { x // x ∈ H } →* { x // x ∈ H ⊔ N } ⧸ subgroupOf N (H ⊔ N) :=\n  MonoidHom.comp (mk' (subgroupOf N (H ⊔ N))) (inclusion (_ : H ≤ H ⊔ N))\nx : { x // x ∈ H ⊔ N } ⧸ subgroupOf N (H ⊔ N)\nh n : G\nhh : h ∈ ↑H\nhn : n ∈ ↑N\nhy : (fun x x_1 => x * x_1) h n ∈ H ⊔ N\nx✝ : Setoid { x // x ∈ H ⊔ N } := leftRel (subgroupOf N (H ⊔ N))\n⊢ ↑φ { val := h, property := hh } = Quotient.mk'' { val := (fun x x_1 => x * x_1) h n, property := hy }\n[PROOFSTEP]\nrefine Quotient.eq.mpr ?_\n[GOAL]\ncase h\nG : Type u\ninst✝² : Group G\nN✝ : Subgroup G\nnN : Normal N✝\nH✝ : Type v\ninst✝¹ : Group H✝\nφ✝ : G →* H✝\nH N : Subgroup G\ninst✝ : Normal N\nφ : { x // x ∈ H } →* { x // x ∈ H ⊔ N } ⧸ subgroupOf N (H ⊔ N) :=\n  MonoidHom.comp (mk' (subgroupOf N (H ⊔ N))) (inclusion (_ : H ≤ H ⊔ N))\nx : { x // x ∈ H ⊔ N } ⧸ subgroupOf N (H ⊔ N)\nh n : G\nhh : h ∈ ↑H\nhn : n ∈ ↑N\nhy : (fun x x_1 => x * x_1) h n ∈ H ⊔ N\nx✝ : Setoid { x // x ∈ H ⊔ N } := leftRel (subgroupOf N (H ⊔ N))\n⊢ ↑(inclusion (_ : H ≤ H ⊔ N)) { val := h, property := hh } ≈ { val := (fun x x_1 => x * x_1) h n, property := hy }\n[PROOFSTEP]\nchange Setoid.r _ _\n[GOAL]\ncase h\nG : Type u\ninst✝² : Group G\nN✝ : Subgroup G\nnN : Normal N✝\nH✝ : Type v\ninst✝¹ : Group H✝\nφ✝ : G →* H✝\nH N : Subgroup G\ninst✝ : Normal N\nφ : { x // x ∈ H } →* { x // x ∈ H ⊔ N } ⧸ subgroupOf N (H ⊔ N) :=\n  MonoidHom.comp (mk' (subgroupOf N (H ⊔ N))) (inclusion (_ : H ≤ H ⊔ N))\nx : { x // x ∈ H ⊔ N } ⧸ subgroupOf N (H ⊔ N)\nh n : G\nhh : h ∈ ↑H\nhn : n ∈ ↑N\nhy : (fun x x_1 => x * x_1) h n ∈ H ⊔ N\nx✝ : Setoid { x // x ∈ H ⊔ N } := leftRel (subgroupOf N (H ⊔ N))\n⊢ Setoid.r (↑(inclusion (_ : H ≤ H ⊔ N)) { val := h, property := hh })\n    { val := (fun x x_1 => x * x_1) h n, property := hy }\n[PROOFSTEP]\nrw [leftRel_apply]\n[GOAL]\ncase h\nG : Type u\ninst✝² : Group G\nN✝ : Subgroup G\nnN : Normal N✝\nH✝ : Type v\ninst✝¹ : Group H✝\nφ✝ : G →* H✝\nH N : Subgroup G\ninst✝ : Normal N\nφ : { x // x ∈ H } →* { x // x ∈ H ⊔ N } ⧸ subgroupOf N (H ⊔ N) :=\n  MonoidHom.comp (mk' (subgroupOf N (H ⊔ N))) (inclusion (_ : H ≤ H ⊔ N))\nx : { x // x ∈ H ⊔ N } ⧸ subgroupOf N (H ⊔ N)\nh n : G\nhh : h ∈ ↑H\nhn : n ∈ ↑N\nhy : (fun x x_1 => x * x_1) h n ∈ H ⊔ N\nx✝ : Setoid { x // x ∈ H ⊔ N } := leftRel (subgroupOf N (H ⊔ N))\n⊢ (↑(inclusion (_ : H ≤ H ⊔ N)) { val := h, property := hh })⁻¹ *\n      { val := (fun x x_1 => x * x_1) h n, property := hy } ∈\n    subgroupOf N (H ⊔ N)\n[PROOFSTEP]\nchange h⁻¹ * (h * n) ∈ N\n[GOAL]\ncase h\nG : Type u\ninst✝² : Group G\nN✝ : Subgroup G\nnN : Normal N✝\nH✝ : Type v\ninst✝¹ : Group H✝\nφ✝ : G →* H✝\nH N : Subgroup G\ninst✝ : Normal N\nφ : { x // x ∈ H } →* { x // x ∈ H ⊔ N } ⧸ subgroupOf N (H ⊔ N) :=\n  MonoidHom.comp (mk' (subgroupOf N (H ⊔ N))) (inclusion (_ : H ≤ H ⊔ N))\nx : { x // x ∈ H ⊔ N } ⧸ subgroupOf N (H ⊔ N)\nh n : G\nhh : h ∈ ↑H\nhn : n ∈ ↑N\nhy : (fun x x_1 => x * x_1) h n ∈ H ⊔ N\nx✝ : Setoid { x // x ∈ H ⊔ N } := leftRel (subgroupOf N (H ⊔ N))\n⊢ h⁻¹ * (h * n) ∈ N\n[PROOFSTEP]\nrwa [← mul_assoc, inv_mul_self, one_mul]\n[GOAL]\nG : Type u\ninst✝² : Group G\nN✝ : Subgroup G\nnN : Normal N✝\nH✝ : Type v\ninst✝¹ : Group H✝\nφ✝ : G →* H✝\nH N : Subgroup G\ninst✝ : Normal N\nφ : { x // x ∈ H } →* { x // x ∈ H ⊔ N } ⧸ subgroupOf N (H ⊔ N) :=\n  MonoidHom.comp (mk' (subgroupOf N (H ⊔ N))) (inclusion (_ : H ≤ H ⊔ N))\nφ_surjective : Surjective ↑φ\n⊢ subgroupOf N H = ker φ\n[PROOFSTEP]\nsimp [← comap_ker]\n[GOAL]\nG : Type u\ninst✝¹ : Group G\nN : Subgroup G\nnN : Subgroup.Normal N\nH : Type v\ninst✝ : Group H\nφ : G →* H\nM : Subgroup G\nnM : Subgroup.Normal M\nh : N ≤ M\n⊢ ∀ (x : G ⧸ N), x ∈ Subgroup.map (mk' N) M → ↑(map N M (MonoidHom.id G) h) x = 1\n[PROOFSTEP]\nrintro _ ⟨x, hx, rfl⟩\n[GOAL]\ncase intro.intro\nG : Type u\ninst✝¹ : Group G\nN : Subgroup G\nnN : Subgroup.Normal N\nH : Type v\ninst✝ : Group H\nφ : G →* H\nM : Subgroup G\nnM : Subgroup.Normal M\nh : N ≤ M\nx : G\nhx : x ∈ ↑M\n⊢ ↑(map N M (MonoidHom.id G) h) (↑(mk' N) x) = 1\n[PROOFSTEP]\nrw [map_mk' N M _ _ x]\n[GOAL]\ncase intro.intro\nG : Type u\ninst✝¹ : Group G\nN : Subgroup G\nnN : Subgroup.Normal N\nH : Type v\ninst✝ : Group H\nφ : G →* H\nM : Subgroup G\nnM : Subgroup.Normal M\nh : N ≤ M\nx : G\nhx : x ∈ ↑M\n⊢ ↑(↑(MonoidHom.id G) x) = 1\n[PROOFSTEP]\nexact (QuotientGroup.eq_one_iff _).mpr hx\n[GOAL]\nG : Type u\ninst✝¹ : Group G\nN : Subgroup G\nnN : Subgroup.Normal N\nH : Type v\ninst✝ : Group H\nφ : G →* H\nM : Subgroup G\nnM : Subgroup.Normal M\nh : N ≤ M\n⊢ MonoidHom.comp (map M (Subgroup.map (mk' N) M) (mk' N) (_ : M ≤ Subgroup.comap (mk' N) (Subgroup.map (mk' N) M)))\n      (quotientQuotientEquivQuotientAux N M h) =\n    MonoidHom.id ((G ⧸ N) ⧸ Subgroup.map (mk' N) M)\n[PROOFSTEP]\next\n[GOAL]\ncase h.h.h\nG : Type u\ninst✝¹ : Group G\nN : Subgroup G\nnN : Subgroup.Normal N\nH : Type v\ninst✝ : Group H\nφ : G →* H\nM : Subgroup G\nnM : Subgroup.Normal M\nh : N ≤ M\nx✝ : G\n⊢ ↑(MonoidHom.comp\n          (MonoidHom.comp\n            (MonoidHom.comp\n              (map M (Subgroup.map (mk' N) M) (mk' N) (_ : M ≤ Subgroup.comap (mk' N) (Subgroup.map (mk' N) M)))\n              (quotientQuotientEquivQuotientAux N M h))\n            (mk' (Subgroup.map (mk' N) M)))\n          (mk' N))\n      x✝ =\n    ↑(MonoidHom.comp (MonoidHom.comp (MonoidHom.id ((G ⧸ N) ⧸ Subgroup.map (mk' N) M)) (mk' (Subgroup.map (mk' N) M)))\n          (mk' N))\n      x✝\n[PROOFSTEP]\nsimp\n[GOAL]\nG : Type u\ninst✝¹ : Group G\nN : Subgroup G\nnN : Subgroup.Normal N\nH : Type v\ninst✝ : Group H\nφ : G →* H\nM : Subgroup G\nnM : Subgroup.Normal M\nh : N ≤ M\n⊢ MonoidHom.comp (quotientQuotientEquivQuotientAux N M h)\n      (map M (Subgroup.map (mk' N) M) (mk' N) (_ : M ≤ Subgroup.comap (mk' N) (Subgroup.map (mk' N) M))) =\n    MonoidHom.id (G ⧸ M)\n[PROOFSTEP]\next\n[GOAL]\ncase h.h\nG : Type u\ninst✝¹ : Group G\nN : Subgroup G\nnN : Subgroup.Normal N\nH : Type v\ninst✝ : Group H\nφ : G →* H\nM : Subgroup G\nnM : Subgroup.Normal M\nh : N ≤ M\nx✝ : G\n⊢ ↑(MonoidHom.comp\n          (MonoidHom.comp (quotientQuotientEquivQuotientAux N M h)\n            (map M (Subgroup.map (mk' N) M) (mk' N) (_ : M ≤ Subgroup.comap (mk' N) (Subgroup.map (mk' N) M))))\n          (mk' M))\n      x✝ =\n    ↑(MonoidHom.comp (MonoidHom.id (G ⧸ M)) (mk' M)) x✝\n[PROOFSTEP]\nsimp\n[GOAL]\nG : Type u\ninst✝¹ : Group G\nN : Subgroup G\nnN : Subgroup.Normal N\nH : Type v\ninst✝ : Group H\nφ : G →* H\n⊢ Subsingleton (G ⧸ ⊤)\n[PROOFSTEP]\ndsimp [HasQuotient.Quotient, QuotientGroup.instHasQuotientSubgroup, Quotient]\n[GOAL]\nG : Type u\ninst✝¹ : Group G\nN : Subgroup G\nnN : Subgroup.Normal N\nH : Type v\ninst✝ : Group H\nφ : G →* H\n⊢ Subsingleton (Quot Setoid.r)\n[PROOFSTEP]\nrw [leftRel_eq]\n[GOAL]\nG : Type u\ninst✝¹ : Group G\nN : Subgroup G\nnN : Subgroup.Normal N\nH : Type v\ninst✝ : Group H\nφ : G →* H\n⊢ Subsingleton (Quot fun x y => x⁻¹ * y ∈ ⊤)\n[PROOFSTEP]\nexact Trunc.instSubsingletonTrunc\n[GOAL]\nG : Type u\ninst✝¹ : Group G\nN : Subgroup G\nnN : Subgroup.Normal N\nH✝ : Type v\ninst✝ : Group H✝\nφ : G →* H✝\nH : Subgroup G\nh : Subsingleton (G ⧸ H)\nx : G\nx✝ : x ∈ ⊤\n⊢ x ∈ H\n[PROOFSTEP]\nhave this : 1⁻¹ * x ∈ H := QuotientGroup.eq.1 (Subsingleton.elim _ _)\n[GOAL]\nG : Type u\ninst✝¹ : Group G\nN : Subgroup G\nnN : Subgroup.Normal N\nH✝ : Type v\ninst✝ : Group H✝\nφ : G →* H✝\nH : Subgroup G\nh : Subsingleton (G ⧸ H)\nx : G\nx✝ : x ∈ ⊤\nthis : 1⁻¹ * x ∈ H\n⊢ x ∈ H\n[PROOFSTEP]\nrwa [inv_one, one_mul] at this \n[GOAL]\nG : Type u\ninst✝³ : Group G\nN : Subgroup G\nnN : Subgroup.Normal N\nH : Type v\ninst✝² : Group H\nφ : G →* H\nH₁ : Subgroup G\ninst✝¹ : Subgroup.Normal H₁\nH₂ : Subgroup (G ⧸ H₁)\ninst✝ : Subgroup.Normal H₂\n⊢ Subgroup.comap (mk' H₁) (Subgroup.comap (mk' H₂) (Subgroup.center ((G ⧸ H₁) ⧸ H₂))) =\n    Subgroup.comap (mk' (Subgroup.comap (mk' H₁) H₂)) (Subgroup.center (G ⧸ Subgroup.comap (mk' H₁) H₂))\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nG : Type u\ninst✝³ : Group G\nN : Subgroup G\nnN : Subgroup.Normal N\nH : Type v\ninst✝² : Group H\nφ : G →* H\nH₁ : Subgroup G\ninst✝¹ : Subgroup.Normal H₁\nH₂ : Subgroup (G ⧸ H₁)\ninst✝ : Subgroup.Normal H₂\nx : G\n⊢ x ∈ Subgroup.comap (mk' H₁) (Subgroup.comap (mk' H₂) (Subgroup.center ((G ⧸ H₁) ⧸ H₂))) ↔\n    x ∈ Subgroup.comap (mk' (Subgroup.comap (mk' H₁) H₂)) (Subgroup.center (G ⧸ Subgroup.comap (mk' H₁) H₂))\n[PROOFSTEP]\nsimp only [mk'_apply, Subgroup.mem_comap, Subgroup.mem_center_iff, forall_mk, ← mk_mul, eq_iff_div_mem, mk_div]\n", "meta": {"mathlib_filename": "Mathlib.GroupTheory.QuotientGroup", "llama_tokens": 14555, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7461390043208003, "lm_q2_score": 0.6723316926137812, "lm_q1q2_score": 0.501652899700165}}
{"text": "[GOAL]\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝ : Mul M\n⊢ Group (MulAut M)\n[PROOFSTEP]\nrefine'\n  { mul := fun g h => MulEquiv.trans h g\n    one := MulEquiv.refl M\n    inv := MulEquiv.symm\n    div := fun g h => MulEquiv.trans h.symm g\n    npow := @npowRec _ ⟨MulEquiv.refl M⟩ ⟨fun g h => MulEquiv.trans h g⟩\n    zpow := @zpowRec _ ⟨MulEquiv.refl M⟩ ⟨fun g h => MulEquiv.trans h g⟩ ⟨MulEquiv.symm⟩ .. }\n[GOAL]\ncase refine'_1\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝ : Mul M\n⊢ ∀ (a b c : MulAut M), a * b * c = a * (b * c)\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_2\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝ : Mul M\n⊢ ∀ (a : MulAut M), 1 * a = a\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_3\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝ : Mul M\n⊢ ∀ (a : MulAut M), a * 1 = a\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_4\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝ : Mul M\n⊢ ∀ (x : MulAut M), npowRec 0 x = 1\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_5\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝ : Mul M\n⊢ ∀ (n : ℕ) (x : MulAut M), npowRec (n + 1) x = x * npowRec n x\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_6\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝ : Mul M\n⊢ ∀ (a b : MulAut M), a / b = a * b⁻¹\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_7\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝ : Mul M\n⊢ ∀ (a : MulAut M), zpowRec 0 a = 1\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_8\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝ : Mul M\n⊢ ∀ (n : ℕ) (a : MulAut M), zpowRec (Int.ofNat (Nat.succ n)) a = a * zpowRec (Int.ofNat n) a\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_9\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝ : Mul M\n⊢ ∀ (n : ℕ) (a : MulAut M), zpowRec (Int.negSucc n) a = (zpowRec (↑(Nat.succ n)) a)⁻¹\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_10\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝ : Mul M\n⊢ ∀ (a : MulAut M), a⁻¹ * a = 1\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_1\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝ : Mul M\na✝ b✝ c✝ : MulAut M\n⊢ a✝ * b✝ * c✝ = a✝ * (b✝ * c✝)\n[PROOFSTEP]\next\n[GOAL]\ncase refine'_2\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝ : Mul M\na✝ : MulAut M\n⊢ 1 * a✝ = a✝\n[PROOFSTEP]\next\n[GOAL]\ncase refine'_3\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝ : Mul M\na✝ : MulAut M\n⊢ a✝ * 1 = a✝\n[PROOFSTEP]\next\n[GOAL]\ncase refine'_4\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝ : Mul M\nx✝ : MulAut M\n⊢ npowRec 0 x✝ = 1\n[PROOFSTEP]\next\n[GOAL]\ncase refine'_5\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝ : Mul M\nn✝ : ℕ\nx✝ : MulAut M\n⊢ npowRec (n✝ + 1) x✝ = x✝ * npowRec n✝ x✝\n[PROOFSTEP]\next\n[GOAL]\ncase refine'_6\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝ : Mul M\na✝ b✝ : MulAut M\n⊢ a✝ / b✝ = a✝ * b✝⁻¹\n[PROOFSTEP]\next\n[GOAL]\ncase refine'_7\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝ : Mul M\na✝ : MulAut M\n⊢ zpowRec 0 a✝ = 1\n[PROOFSTEP]\next\n[GOAL]\ncase refine'_8\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝ : Mul M\nn✝ : ℕ\na✝ : MulAut M\n⊢ zpowRec (Int.ofNat (Nat.succ n✝)) a✝ = a✝ * zpowRec (Int.ofNat n✝) a✝\n[PROOFSTEP]\next\n[GOAL]\ncase refine'_9\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝ : Mul M\nn✝ : ℕ\na✝ : MulAut M\n⊢ zpowRec (Int.negSucc n✝) a✝ = (zpowRec (↑(Nat.succ n✝)) a✝)⁻¹\n[PROOFSTEP]\next\n[GOAL]\ncase refine'_10\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝ : Mul M\na✝ : MulAut M\n⊢ a✝⁻¹ * a✝ = 1\n[PROOFSTEP]\next\n[GOAL]\ncase refine'_1.h\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝ : Mul M\na✝ b✝ c✝ : MulAut M\nx✝ : M\n⊢ ↑(a✝ * b✝ * c✝) x✝ = ↑(a✝ * (b✝ * c✝)) x✝\n[PROOFSTEP]\ntry rfl\n[GOAL]\ncase refine'_1.h\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝ : Mul M\na✝ b✝ c✝ : MulAut M\nx✝ : M\n⊢ ↑(a✝ * b✝ * c✝) x✝ = ↑(a✝ * (b✝ * c✝)) x✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_2.h\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝ : Mul M\na✝ : MulAut M\nx✝ : M\n⊢ ↑(1 * a✝) x✝ = ↑a✝ x✝\n[PROOFSTEP]\ntry rfl\n[GOAL]\ncase refine'_2.h\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝ : Mul M\na✝ : MulAut M\nx✝ : M\n⊢ ↑(1 * a✝) x✝ = ↑a✝ x✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_3.h\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝ : Mul M\na✝ : MulAut M\nx✝ : M\n⊢ ↑(a✝ * 1) x✝ = ↑a✝ x✝\n[PROOFSTEP]\ntry rfl\n[GOAL]\ncase refine'_3.h\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝ : Mul M\na✝ : MulAut M\nx✝ : M\n⊢ ↑(a✝ * 1) x✝ = ↑a✝ x✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_4.h\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝ : Mul M\nx✝¹ : MulAut M\nx✝ : M\n⊢ ↑(npowRec 0 x✝¹) x✝ = ↑1 x✝\n[PROOFSTEP]\ntry rfl\n[GOAL]\ncase refine'_4.h\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝ : Mul M\nx✝¹ : MulAut M\nx✝ : M\n⊢ ↑(npowRec 0 x✝¹) x✝ = ↑1 x✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_5.h\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝ : Mul M\nn✝ : ℕ\nx✝¹ : MulAut M\nx✝ : M\n⊢ ↑(npowRec (n✝ + 1) x✝¹) x✝ = ↑(x✝¹ * npowRec n✝ x✝¹) x✝\n[PROOFSTEP]\ntry rfl\n[GOAL]\ncase refine'_5.h\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝ : Mul M\nn✝ : ℕ\nx✝¹ : MulAut M\nx✝ : M\n⊢ ↑(npowRec (n✝ + 1) x✝¹) x✝ = ↑(x✝¹ * npowRec n✝ x✝¹) x✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_6.h\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝ : Mul M\na✝ b✝ : MulAut M\nx✝ : M\n⊢ ↑(a✝ / b✝) x✝ = ↑(a✝ * b✝⁻¹) x✝\n[PROOFSTEP]\ntry rfl\n[GOAL]\ncase refine'_6.h\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝ : Mul M\na✝ b✝ : MulAut M\nx✝ : M\n⊢ ↑(a✝ / b✝) x✝ = ↑(a✝ * b✝⁻¹) x✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_7.h\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝ : Mul M\na✝ : MulAut M\nx✝ : M\n⊢ ↑(zpowRec 0 a✝) x✝ = ↑1 x✝\n[PROOFSTEP]\ntry rfl\n[GOAL]\ncase refine'_7.h\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝ : Mul M\na✝ : MulAut M\nx✝ : M\n⊢ ↑(zpowRec 0 a✝) x✝ = ↑1 x✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_8.h\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝ : Mul M\nn✝ : ℕ\na✝ : MulAut M\nx✝ : M\n⊢ ↑(zpowRec (Int.ofNat (Nat.succ n✝)) a✝) x✝ = ↑(a✝ * zpowRec (Int.ofNat n✝) a✝) x✝\n[PROOFSTEP]\ntry rfl\n[GOAL]\ncase refine'_8.h\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝ : Mul M\nn✝ : ℕ\na✝ : MulAut M\nx✝ : M\n⊢ ↑(zpowRec (Int.ofNat (Nat.succ n✝)) a✝) x✝ = ↑(a✝ * zpowRec (Int.ofNat n✝) a✝) x✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_9.h\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝ : Mul M\nn✝ : ℕ\na✝ : MulAut M\nx✝ : M\n⊢ ↑(zpowRec (Int.negSucc n✝) a✝) x✝ = ↑(zpowRec (↑(Nat.succ n✝)) a✝)⁻¹ x✝\n[PROOFSTEP]\ntry rfl\n[GOAL]\ncase refine'_9.h\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝ : Mul M\nn✝ : ℕ\na✝ : MulAut M\nx✝ : M\n⊢ ↑(zpowRec (Int.negSucc n✝) a✝) x✝ = ↑(zpowRec (↑(Nat.succ n✝)) a✝)⁻¹ x✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_10.h\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝ : Mul M\na✝ : MulAut M\nx✝ : M\n⊢ ↑(a✝⁻¹ * a✝) x✝ = ↑1 x✝\n[PROOFSTEP]\ntry rfl\n[GOAL]\ncase refine'_10.h\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝ : Mul M\na✝ : MulAut M\nx✝ : M\n⊢ ↑(a✝⁻¹ * a✝) x✝ = ↑1 x✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_10.h\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝ : Mul M\na✝ : MulAut M\nx✝ : M\n⊢ ↑(a✝⁻¹ * a✝) x✝ = ↑1 x✝\n[PROOFSTEP]\napply Equiv.left_inv\n[GOAL]\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝ : Mul M\n⊢ MulAut M →* Equiv.Perm M\n[PROOFSTEP]\nrefine' { toFun := MulEquiv.toEquiv, .. }\n[GOAL]\ncase refine'_1\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝ : Mul M\n⊢ 1.toEquiv = 1\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_2\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝ : Mul M\n⊢ ∀ (x y : MulAut M),\n    OneHom.toFun { toFun := MulEquiv.toEquiv, map_one' := ?refine'_1 } (x * y) =\n      OneHom.toFun { toFun := MulEquiv.toEquiv, map_one' := ?refine'_1 } x *\n        OneHom.toFun { toFun := MulEquiv.toEquiv, map_one' := ?refine'_1 } y\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_1\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝ : Mul M\n⊢ 1.toEquiv = 1\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_2\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝ : Mul M\nx✝ y✝ : MulAut M\n⊢ OneHom.toFun { toFun := MulEquiv.toEquiv, map_one' := (_ : 1.toEquiv = 1.toEquiv) } (x✝ * y✝) =\n    OneHom.toFun { toFun := MulEquiv.toEquiv, map_one' := (_ : 1.toEquiv = 1.toEquiv) } x✝ *\n      OneHom.toFun { toFun := MulEquiv.toEquiv, map_one' := (_ : 1.toEquiv = 1.toEquiv) } y✝\n[PROOFSTEP]\nrfl\n[GOAL]\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝¹ : Mul M\ninst✝ : Group G\ng x✝ : G\n⊢ (fun h => g⁻¹ * h * g) ((fun h => g * h * g⁻¹) x✝) = x✝\n[PROOFSTEP]\nsimp only [mul_assoc, inv_mul_cancel_left, mul_left_inv, mul_one]\n[GOAL]\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝¹ : Mul M\ninst✝ : Group G\ng x✝ : G\n⊢ (fun h => g * h * g⁻¹) ((fun h => g⁻¹ * h * g) x✝) = x✝\n[PROOFSTEP]\nsimp only [mul_assoc, mul_inv_cancel_left, mul_right_inv, mul_one]\n[GOAL]\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝¹ : Mul M\ninst✝ : Group G\ng : G\n⊢ ∀ (x y : G),\n    Equiv.toFun\n        { toFun := fun h => g * h * g⁻¹, invFun := fun h => g⁻¹ * h * g,\n          left_inv := (_ : ∀ (x : G), g⁻¹ * (g * x * g⁻¹) * g = x),\n          right_inv := (_ : ∀ (x : G), g * (g⁻¹ * x * g) * g⁻¹ = x) }\n        (x * y) =\n      Equiv.toFun\n          { toFun := fun h => g * h * g⁻¹, invFun := fun h => g⁻¹ * h * g,\n            left_inv := (_ : ∀ (x : G), g⁻¹ * (g * x * g⁻¹) * g = x),\n            right_inv := (_ : ∀ (x : G), g * (g⁻¹ * x * g) * g⁻¹ = x) }\n          x *\n        Equiv.toFun\n          { toFun := fun h => g * h * g⁻¹, invFun := fun h => g⁻¹ * h * g,\n            left_inv := (_ : ∀ (x : G), g⁻¹ * (g * x * g⁻¹) * g = x),\n            right_inv := (_ : ∀ (x : G), g * (g⁻¹ * x * g) * g⁻¹ = x) }\n          y\n[PROOFSTEP]\nsimp only [mul_assoc, inv_mul_cancel_left, forall_const]\n[GOAL]\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝¹ : Mul M\ninst✝ : Group G\n⊢ (fun g =>\n        {\n          toEquiv :=\n            { toFun := fun h => g * h * g⁻¹, invFun := fun h => g⁻¹ * h * g,\n              left_inv := (_ : ∀ (x : G), g⁻¹ * (g * x * g⁻¹) * g = x),\n              right_inv := (_ : ∀ (x : G), g * (g⁻¹ * x * g) * g⁻¹ = x) },\n          map_mul' := (_ : ∀ (a a_1 : G), g * (a * a_1) * g⁻¹ = g * a * g⁻¹ * (g * a_1 * g⁻¹)) })\n      1 =\n    1\n[PROOFSTEP]\next\n[GOAL]\ncase h\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝¹ : Mul M\ninst✝ : Group G\nx✝ : G\n⊢ ↑((fun g =>\n            {\n              toEquiv :=\n                { toFun := fun h => g * h * g⁻¹, invFun := fun h => g⁻¹ * h * g,\n                  left_inv := (_ : ∀ (x : G), g⁻¹ * (g * x * g⁻¹) * g = x),\n                  right_inv := (_ : ∀ (x : G), g * (g⁻¹ * x * g) * g⁻¹ = x) },\n              map_mul' := (_ : ∀ (a a_1 : G), g * (a * a_1) * g⁻¹ = g * a * g⁻¹ * (g * a_1 * g⁻¹)) })\n          1)\n      x✝ =\n    ↑1 x✝\n[PROOFSTEP]\nsimp only [one_mul, inv_one, mul_one, one_apply]\n[GOAL]\ncase h\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝¹ : Mul M\ninst✝ : Group G\nx✝ : G\n⊢ ↑{\n          toEquiv :=\n            { toFun := fun h => h, invFun := fun h => h, left_inv := (_ : Function.LeftInverse (fun h => h) fun h => h),\n              right_inv := (_ : Function.RightInverse (fun h => h) fun h => h) },\n          map_mul' :=\n            (_ :\n              ∀ (x y : G),\n                Equiv.toFun\n                    { toFun := fun h => h, invFun := fun h => h,\n                      left_inv := (_ : Function.LeftInverse (fun h => h) fun h => h),\n                      right_inv := (_ : Function.RightInverse (fun h => h) fun h => h) }\n                    (x * y) =\n                  Equiv.toFun\n                      { toFun := fun h => h, invFun := fun h => h,\n                        left_inv := (_ : Function.LeftInverse (fun h => h) fun h => h),\n                        right_inv := (_ : Function.RightInverse (fun h => h) fun h => h) }\n                      x *\n                    Equiv.toFun\n                      { toFun := fun h => h, invFun := fun h => h,\n                        left_inv := (_ : Function.LeftInverse (fun h => h) fun h => h),\n                        right_inv := (_ : Function.RightInverse (fun h => h) fun h => h) }\n                      y) }\n      x✝ =\n    x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝¹ : Mul M\ninst✝ : Group G\ng₁ g₂ : G\n⊢ OneHom.toFun\n      {\n        toFun := fun g =>\n          {\n            toEquiv :=\n              { toFun := fun h => g * h * g⁻¹, invFun := fun h => g⁻¹ * h * g,\n                left_inv := (_ : ∀ (x : G), g⁻¹ * (g * x * g⁻¹) * g = x),\n                right_inv := (_ : ∀ (x : G), g * (g⁻¹ * x * g) * g⁻¹ = x) },\n            map_mul' := (_ : ∀ (a a_1 : G), g * (a * a_1) * g⁻¹ = g * a * g⁻¹ * (g * a_1 * g⁻¹)) },\n        map_one' :=\n          (_ :\n            (fun g =>\n                  {\n                    toEquiv :=\n                      { toFun := fun h => g * h * g⁻¹, invFun := fun h => g⁻¹ * h * g,\n                        left_inv := (_ : ∀ (x : G), g⁻¹ * (g * x * g⁻¹) * g = x),\n                        right_inv := (_ : ∀ (x : G), g * (g⁻¹ * x * g) * g⁻¹ = x) },\n                    map_mul' := (_ : ∀ (a a_1 : G), g * (a * a_1) * g⁻¹ = g * a * g⁻¹ * (g * a_1 * g⁻¹)) })\n                1 =\n              1) }\n      (g₁ * g₂) =\n    OneHom.toFun\n        {\n          toFun := fun g =>\n            {\n              toEquiv :=\n                { toFun := fun h => g * h * g⁻¹, invFun := fun h => g⁻¹ * h * g,\n                  left_inv := (_ : ∀ (x : G), g⁻¹ * (g * x * g⁻¹) * g = x),\n                  right_inv := (_ : ∀ (x : G), g * (g⁻¹ * x * g) * g⁻¹ = x) },\n              map_mul' := (_ : ∀ (a a_1 : G), g * (a * a_1) * g⁻¹ = g * a * g⁻¹ * (g * a_1 * g⁻¹)) },\n          map_one' :=\n            (_ :\n              (fun g =>\n                    {\n                      toEquiv :=\n                        { toFun := fun h => g * h * g⁻¹, invFun := fun h => g⁻¹ * h * g,\n                          left_inv := (_ : ∀ (x : G), g⁻¹ * (g * x * g⁻¹) * g = x),\n                          right_inv := (_ : ∀ (x : G), g * (g⁻¹ * x * g) * g⁻¹ = x) },\n                      map_mul' := (_ : ∀ (a a_1 : G), g * (a * a_1) * g⁻¹ = g * a * g⁻¹ * (g * a_1 * g⁻¹)) })\n                  1 =\n                1) }\n        g₁ *\n      OneHom.toFun\n        {\n          toFun := fun g =>\n            {\n              toEquiv :=\n                { toFun := fun h => g * h * g⁻¹, invFun := fun h => g⁻¹ * h * g,\n                  left_inv := (_ : ∀ (x : G), g⁻¹ * (g * x * g⁻¹) * g = x),\n                  right_inv := (_ : ∀ (x : G), g * (g⁻¹ * x * g) * g⁻¹ = x) },\n              map_mul' := (_ : ∀ (a a_1 : G), g * (a * a_1) * g⁻¹ = g * a * g⁻¹ * (g * a_1 * g⁻¹)) },\n          map_one' :=\n            (_ :\n              (fun g =>\n                    {\n                      toEquiv :=\n                        { toFun := fun h => g * h * g⁻¹, invFun := fun h => g⁻¹ * h * g,\n                          left_inv := (_ : ∀ (x : G), g⁻¹ * (g * x * g⁻¹) * g = x),\n                          right_inv := (_ : ∀ (x : G), g * (g⁻¹ * x * g) * g⁻¹ = x) },\n                      map_mul' := (_ : ∀ (a a_1 : G), g * (a * a_1) * g⁻¹ = g * a * g⁻¹ * (g * a_1 * g⁻¹)) })\n                  1 =\n                1) }\n        g₂\n[PROOFSTEP]\next h\n[GOAL]\ncase h\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝¹ : Mul M\ninst✝ : Group G\ng₁ g₂ h : G\n⊢ ↑(OneHom.toFun\n          {\n            toFun := fun g =>\n              {\n                toEquiv :=\n                  { toFun := fun h => g * h * g⁻¹, invFun := fun h => g⁻¹ * h * g,\n                    left_inv := (_ : ∀ (x : G), g⁻¹ * (g * x * g⁻¹) * g = x),\n                    right_inv := (_ : ∀ (x : G), g * (g⁻¹ * x * g) * g⁻¹ = x) },\n                map_mul' := (_ : ∀ (a a_1 : G), g * (a * a_1) * g⁻¹ = g * a * g⁻¹ * (g * a_1 * g⁻¹)) },\n            map_one' :=\n              (_ :\n                (fun g =>\n                      {\n                        toEquiv :=\n                          { toFun := fun h => g * h * g⁻¹, invFun := fun h => g⁻¹ * h * g,\n                            left_inv := (_ : ∀ (x : G), g⁻¹ * (g * x * g⁻¹) * g = x),\n                            right_inv := (_ : ∀ (x : G), g * (g⁻¹ * x * g) * g⁻¹ = x) },\n                        map_mul' := (_ : ∀ (a a_1 : G), g * (a * a_1) * g⁻¹ = g * a * g⁻¹ * (g * a_1 * g⁻¹)) })\n                    1 =\n                  1) }\n          (g₁ * g₂))\n      h =\n    ↑(OneHom.toFun\n            {\n              toFun := fun g =>\n                {\n                  toEquiv :=\n                    { toFun := fun h => g * h * g⁻¹, invFun := fun h => g⁻¹ * h * g,\n                      left_inv := (_ : ∀ (x : G), g⁻¹ * (g * x * g⁻¹) * g = x),\n                      right_inv := (_ : ∀ (x : G), g * (g⁻¹ * x * g) * g⁻¹ = x) },\n                  map_mul' := (_ : ∀ (a a_1 : G), g * (a * a_1) * g⁻¹ = g * a * g⁻¹ * (g * a_1 * g⁻¹)) },\n              map_one' :=\n                (_ :\n                  (fun g =>\n                        {\n                          toEquiv :=\n                            { toFun := fun h => g * h * g⁻¹, invFun := fun h => g⁻¹ * h * g,\n                              left_inv := (_ : ∀ (x : G), g⁻¹ * (g * x * g⁻¹) * g = x),\n                              right_inv := (_ : ∀ (x : G), g * (g⁻¹ * x * g) * g⁻¹ = x) },\n                          map_mul' := (_ : ∀ (a a_1 : G), g * (a * a_1) * g⁻¹ = g * a * g⁻¹ * (g * a_1 * g⁻¹)) })\n                      1 =\n                    1) }\n            g₁ *\n          OneHom.toFun\n            {\n              toFun := fun g =>\n                {\n                  toEquiv :=\n                    { toFun := fun h => g * h * g⁻¹, invFun := fun h => g⁻¹ * h * g,\n                      left_inv := (_ : ∀ (x : G), g⁻¹ * (g * x * g⁻¹) * g = x),\n                      right_inv := (_ : ∀ (x : G), g * (g⁻¹ * x * g) * g⁻¹ = x) },\n                  map_mul' := (_ : ∀ (a a_1 : G), g * (a * a_1) * g⁻¹ = g * a * g⁻¹ * (g * a_1 * g⁻¹)) },\n              map_one' :=\n                (_ :\n                  (fun g =>\n                        {\n                          toEquiv :=\n                            { toFun := fun h => g * h * g⁻¹, invFun := fun h => g⁻¹ * h * g,\n                              left_inv := (_ : ∀ (x : G), g⁻¹ * (g * x * g⁻¹) * g = x),\n                              right_inv := (_ : ∀ (x : G), g * (g⁻¹ * x * g) * g⁻¹ = x) },\n                          map_mul' := (_ : ∀ (a a_1 : G), g * (a * a_1) * g⁻¹ = g * a * g⁻¹ * (g * a_1 * g⁻¹)) })\n                      1 =\n                    1) }\n            g₂)\n      h\n[PROOFSTEP]\nshow g₁ * g₂ * h * (g₁ * g₂)⁻¹ = g₁ * (g₂ * h * g₂⁻¹) * g₁⁻¹\n[GOAL]\ncase h\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝¹ : Mul M\ninst✝ : Group G\ng₁ g₂ h : G\n⊢ g₁ * g₂ * h * (g₁ * g₂)⁻¹ = g₁ * (g₂ * h * g₂⁻¹) * g₁⁻¹\n[PROOFSTEP]\nsimp only [mul_assoc, mul_inv_rev]\n[GOAL]\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝ : Add A\n⊢ Group (AddAut A)\n[PROOFSTEP]\nrefine'\n  { mul := fun g h => AddEquiv.trans h g\n    one := AddEquiv.refl A\n    inv := AddEquiv.symm\n    div := fun g h => AddEquiv.trans h.symm g\n    npow := @npowRec _ ⟨AddEquiv.refl A⟩ ⟨fun g h => AddEquiv.trans h g⟩\n    zpow := @zpowRec _ ⟨AddEquiv.refl A⟩ ⟨fun g h => AddEquiv.trans h g⟩ ⟨AddEquiv.symm⟩ .. }\n[GOAL]\ncase refine'_1\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝ : Add A\n⊢ ∀ (a b c : AddAut A), a * b * c = a * (b * c)\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_2\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝ : Add A\n⊢ ∀ (a : AddAut A), 1 * a = a\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_3\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝ : Add A\n⊢ ∀ (a : AddAut A), a * 1 = a\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_4\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝ : Add A\n⊢ ∀ (x : AddAut A), npowRec 0 x = 1\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_5\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝ : Add A\n⊢ ∀ (n : ℕ) (x : AddAut A), npowRec (n + 1) x = x * npowRec n x\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_6\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝ : Add A\n⊢ ∀ (a b : AddAut A), a / b = a * b⁻¹\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_7\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝ : Add A\n⊢ ∀ (a : AddAut A), zpowRec 0 a = 1\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_8\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝ : Add A\n⊢ ∀ (n : ℕ) (a : AddAut A), zpowRec (Int.ofNat (Nat.succ n)) a = a * zpowRec (Int.ofNat n) a\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_9\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝ : Add A\n⊢ ∀ (n : ℕ) (a : AddAut A), zpowRec (Int.negSucc n) a = (zpowRec (↑(Nat.succ n)) a)⁻¹\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_10\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝ : Add A\n⊢ ∀ (a : AddAut A), a⁻¹ * a = 1\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_1\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝ : Add A\na✝ b✝ c✝ : AddAut A\n⊢ a✝ * b✝ * c✝ = a✝ * (b✝ * c✝)\n[PROOFSTEP]\next\n[GOAL]\ncase refine'_2\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝ : Add A\na✝ : AddAut A\n⊢ 1 * a✝ = a✝\n[PROOFSTEP]\next\n[GOAL]\ncase refine'_3\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝ : Add A\na✝ : AddAut A\n⊢ a✝ * 1 = a✝\n[PROOFSTEP]\next\n[GOAL]\ncase refine'_4\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝ : Add A\nx✝ : AddAut A\n⊢ npowRec 0 x✝ = 1\n[PROOFSTEP]\next\n[GOAL]\ncase refine'_5\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝ : Add A\nn✝ : ℕ\nx✝ : AddAut A\n⊢ npowRec (n✝ + 1) x✝ = x✝ * npowRec n✝ x✝\n[PROOFSTEP]\next\n[GOAL]\ncase refine'_6\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝ : Add A\na✝ b✝ : AddAut A\n⊢ a✝ / b✝ = a✝ * b✝⁻¹\n[PROOFSTEP]\next\n[GOAL]\ncase refine'_7\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝ : Add A\na✝ : AddAut A\n⊢ zpowRec 0 a✝ = 1\n[PROOFSTEP]\next\n[GOAL]\ncase refine'_8\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝ : Add A\nn✝ : ℕ\na✝ : AddAut A\n⊢ zpowRec (Int.ofNat (Nat.succ n✝)) a✝ = a✝ * zpowRec (Int.ofNat n✝) a✝\n[PROOFSTEP]\next\n[GOAL]\ncase refine'_9\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝ : Add A\nn✝ : ℕ\na✝ : AddAut A\n⊢ zpowRec (Int.negSucc n✝) a✝ = (zpowRec (↑(Nat.succ n✝)) a✝)⁻¹\n[PROOFSTEP]\next\n[GOAL]\ncase refine'_10\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝ : Add A\na✝ : AddAut A\n⊢ a✝⁻¹ * a✝ = 1\n[PROOFSTEP]\next\n[GOAL]\ncase refine'_1.h\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝ : Add A\na✝ b✝ c✝ : AddAut A\nx✝ : A\n⊢ ↑(a✝ * b✝ * c✝) x✝ = ↑(a✝ * (b✝ * c✝)) x✝\n[PROOFSTEP]\ntry rfl\n[GOAL]\ncase refine'_1.h\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝ : Add A\na✝ b✝ c✝ : AddAut A\nx✝ : A\n⊢ ↑(a✝ * b✝ * c✝) x✝ = ↑(a✝ * (b✝ * c✝)) x✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_2.h\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝ : Add A\na✝ : AddAut A\nx✝ : A\n⊢ ↑(1 * a✝) x✝ = ↑a✝ x✝\n[PROOFSTEP]\ntry rfl\n[GOAL]\ncase refine'_2.h\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝ : Add A\na✝ : AddAut A\nx✝ : A\n⊢ ↑(1 * a✝) x✝ = ↑a✝ x✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_3.h\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝ : Add A\na✝ : AddAut A\nx✝ : A\n⊢ ↑(a✝ * 1) x✝ = ↑a✝ x✝\n[PROOFSTEP]\ntry rfl\n[GOAL]\ncase refine'_3.h\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝ : Add A\na✝ : AddAut A\nx✝ : A\n⊢ ↑(a✝ * 1) x✝ = ↑a✝ x✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_4.h\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝ : Add A\nx✝¹ : AddAut A\nx✝ : A\n⊢ ↑(npowRec 0 x✝¹) x✝ = ↑1 x✝\n[PROOFSTEP]\ntry rfl\n[GOAL]\ncase refine'_4.h\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝ : Add A\nx✝¹ : AddAut A\nx✝ : A\n⊢ ↑(npowRec 0 x✝¹) x✝ = ↑1 x✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_5.h\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝ : Add A\nn✝ : ℕ\nx✝¹ : AddAut A\nx✝ : A\n⊢ ↑(npowRec (n✝ + 1) x✝¹) x✝ = ↑(x✝¹ * npowRec n✝ x✝¹) x✝\n[PROOFSTEP]\ntry rfl\n[GOAL]\ncase refine'_5.h\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝ : Add A\nn✝ : ℕ\nx✝¹ : AddAut A\nx✝ : A\n⊢ ↑(npowRec (n✝ + 1) x✝¹) x✝ = ↑(x✝¹ * npowRec n✝ x✝¹) x✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_6.h\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝ : Add A\na✝ b✝ : AddAut A\nx✝ : A\n⊢ ↑(a✝ / b✝) x✝ = ↑(a✝ * b✝⁻¹) x✝\n[PROOFSTEP]\ntry rfl\n[GOAL]\ncase refine'_6.h\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝ : Add A\na✝ b✝ : AddAut A\nx✝ : A\n⊢ ↑(a✝ / b✝) x✝ = ↑(a✝ * b✝⁻¹) x✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_7.h\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝ : Add A\na✝ : AddAut A\nx✝ : A\n⊢ ↑(zpowRec 0 a✝) x✝ = ↑1 x✝\n[PROOFSTEP]\ntry rfl\n[GOAL]\ncase refine'_7.h\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝ : Add A\na✝ : AddAut A\nx✝ : A\n⊢ ↑(zpowRec 0 a✝) x✝ = ↑1 x✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_8.h\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝ : Add A\nn✝ : ℕ\na✝ : AddAut A\nx✝ : A\n⊢ ↑(zpowRec (Int.ofNat (Nat.succ n✝)) a✝) x✝ = ↑(a✝ * zpowRec (Int.ofNat n✝) a✝) x✝\n[PROOFSTEP]\ntry rfl\n[GOAL]\ncase refine'_8.h\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝ : Add A\nn✝ : ℕ\na✝ : AddAut A\nx✝ : A\n⊢ ↑(zpowRec (Int.ofNat (Nat.succ n✝)) a✝) x✝ = ↑(a✝ * zpowRec (Int.ofNat n✝) a✝) x✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_9.h\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝ : Add A\nn✝ : ℕ\na✝ : AddAut A\nx✝ : A\n⊢ ↑(zpowRec (Int.negSucc n✝) a✝) x✝ = ↑(zpowRec (↑(Nat.succ n✝)) a✝)⁻¹ x✝\n[PROOFSTEP]\ntry rfl\n[GOAL]\ncase refine'_9.h\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝ : Add A\nn✝ : ℕ\na✝ : AddAut A\nx✝ : A\n⊢ ↑(zpowRec (Int.negSucc n✝) a✝) x✝ = ↑(zpowRec (↑(Nat.succ n✝)) a✝)⁻¹ x✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_10.h\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝ : Add A\na✝ : AddAut A\nx✝ : A\n⊢ ↑(a✝⁻¹ * a✝) x✝ = ↑1 x✝\n[PROOFSTEP]\ntry rfl\n[GOAL]\ncase refine'_10.h\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝ : Add A\na✝ : AddAut A\nx✝ : A\n⊢ ↑(a✝⁻¹ * a✝) x✝ = ↑1 x✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_10.h\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝ : Add A\na✝ : AddAut A\nx✝ : A\n⊢ ↑(a✝⁻¹ * a✝) x✝ = ↑1 x✝\n[PROOFSTEP]\napply Equiv.left_inv\n[GOAL]\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝ : Add A\n⊢ AddAut A →* Equiv.Perm A\n[PROOFSTEP]\nrefine' { toFun := AddEquiv.toEquiv, .. }\n[GOAL]\ncase refine'_1\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝ : Add A\n⊢ 1.toEquiv = 1\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_2\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝ : Add A\n⊢ ∀ (x y : AddAut A),\n    OneHom.toFun { toFun := AddEquiv.toEquiv, map_one' := ?refine'_1 } (x * y) =\n      OneHom.toFun { toFun := AddEquiv.toEquiv, map_one' := ?refine'_1 } x *\n        OneHom.toFun { toFun := AddEquiv.toEquiv, map_one' := ?refine'_1 } y\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_1\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝ : Add A\n⊢ 1.toEquiv = 1\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_2\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝ : Add A\nx✝ y✝ : AddAut A\n⊢ OneHom.toFun { toFun := AddEquiv.toEquiv, map_one' := (_ : 1.toEquiv = 1.toEquiv) } (x✝ * y✝) =\n    OneHom.toFun { toFun := AddEquiv.toEquiv, map_one' := (_ : 1.toEquiv = 1.toEquiv) } x✝ *\n      OneHom.toFun { toFun := AddEquiv.toEquiv, map_one' := (_ : 1.toEquiv = 1.toEquiv) } y✝\n[PROOFSTEP]\nrfl\n[GOAL]\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝¹ : Add A\ninst✝ : AddGroup G\ng x✝ : G\n⊢ (fun h => -g + h + g) ((fun h => g + h + -g) x✝) = x✝\n[PROOFSTEP]\nsimp only [add_assoc, neg_add_cancel_left, add_left_neg, add_zero]\n[GOAL]\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝¹ : Add A\ninst✝ : AddGroup G\ng x✝ : G\n⊢ (fun h => g + h + -g) ((fun h => -g + h + g) x✝) = x✝\n[PROOFSTEP]\nsimp only [add_assoc, add_neg_cancel_left, add_right_neg, add_zero]\n[GOAL]\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝¹ : Add A\ninst✝ : AddGroup G\ng : G\n⊢ ∀ (x y : G),\n    Equiv.toFun\n        { toFun := fun h => g + h + -g, invFun := fun h => -g + h + g,\n          left_inv := (_ : ∀ (x : G), -g + (g + x + -g) + g = x),\n          right_inv := (_ : ∀ (x : G), g + (-g + x + g) + -g = x) }\n        (x + y) =\n      Equiv.toFun\n          { toFun := fun h => g + h + -g, invFun := fun h => -g + h + g,\n            left_inv := (_ : ∀ (x : G), -g + (g + x + -g) + g = x),\n            right_inv := (_ : ∀ (x : G), g + (-g + x + g) + -g = x) }\n          x +\n        Equiv.toFun\n          { toFun := fun h => g + h + -g, invFun := fun h => -g + h + g,\n            left_inv := (_ : ∀ (x : G), -g + (g + x + -g) + g = x),\n            right_inv := (_ : ∀ (x : G), g + (-g + x + g) + -g = x) }\n          y\n[PROOFSTEP]\nsimp only [add_assoc, neg_add_cancel_left, forall_const]\n[GOAL]\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝¹ : Add A\ninst✝ : AddGroup G\n⊢ (fun g =>\n        ↑Additive.ofMul\n          {\n            toEquiv :=\n              { toFun := fun h => g + h + -g, invFun := fun h => -g + h + g,\n                left_inv := (_ : ∀ (x : G), -g + (g + x + -g) + g = x),\n                right_inv := (_ : ∀ (x : G), g + (-g + x + g) + -g = x) },\n            map_add' := (_ : ∀ (a a_1 : G), g + (a + a_1) + -g = g + a + -g + (g + a_1 + -g)) })\n      0 =\n    0\n[PROOFSTEP]\napply Additive.toMul.injective\n[GOAL]\ncase a\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝¹ : Add A\ninst✝ : AddGroup G\n⊢ ↑Additive.toMul\n      ((fun g =>\n          ↑Additive.ofMul\n            {\n              toEquiv :=\n                { toFun := fun h => g + h + -g, invFun := fun h => -g + h + g,\n                  left_inv := (_ : ∀ (x : G), -g + (g + x + -g) + g = x),\n                  right_inv := (_ : ∀ (x : G), g + (-g + x + g) + -g = x) },\n              map_add' := (_ : ∀ (a a_1 : G), g + (a + a_1) + -g = g + a + -g + (g + a_1 + -g)) })\n        0) =\n    ↑Additive.toMul 0\n[PROOFSTEP]\next\n[GOAL]\ncase a.h\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝¹ : Add A\ninst✝ : AddGroup G\nx✝ : G\n⊢ ↑(↑Additive.toMul\n          ((fun g =>\n              ↑Additive.ofMul\n                {\n                  toEquiv :=\n                    { toFun := fun h => g + h + -g, invFun := fun h => -g + h + g,\n                      left_inv := (_ : ∀ (x : G), -g + (g + x + -g) + g = x),\n                      right_inv := (_ : ∀ (x : G), g + (-g + x + g) + -g = x) },\n                  map_add' := (_ : ∀ (a a_1 : G), g + (a + a_1) + -g = g + a + -g + (g + a_1 + -g)) })\n            0))\n      x✝ =\n    ↑(↑Additive.toMul 0) x✝\n[PROOFSTEP]\nsimp only [zero_add, neg_zero, add_zero, toMul_ofMul, toMul_zero, one_apply]\n[GOAL]\ncase a.h\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝¹ : Add A\ninst✝ : AddGroup G\nx✝ : G\n⊢ ↑{\n          toEquiv :=\n            { toFun := fun h => h, invFun := fun h => h, left_inv := (_ : Function.LeftInverse (fun h => h) fun h => h),\n              right_inv := (_ : Function.RightInverse (fun h => h) fun h => h) },\n          map_add' :=\n            (_ :\n              ∀ (x y : G),\n                Equiv.toFun\n                    { toFun := fun h => h, invFun := fun h => h,\n                      left_inv := (_ : Function.LeftInverse (fun h => h) fun h => h),\n                      right_inv := (_ : Function.RightInverse (fun h => h) fun h => h) }\n                    (x + y) =\n                  Equiv.toFun\n                      { toFun := fun h => h, invFun := fun h => h,\n                        left_inv := (_ : Function.LeftInverse (fun h => h) fun h => h),\n                        right_inv := (_ : Function.RightInverse (fun h => h) fun h => h) }\n                      x +\n                    Equiv.toFun\n                      { toFun := fun h => h, invFun := fun h => h,\n                        left_inv := (_ : Function.LeftInverse (fun h => h) fun h => h),\n                        right_inv := (_ : Function.RightInverse (fun h => h) fun h => h) }\n                      y) }\n      x✝ =\n    x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝¹ : Add A\ninst✝ : AddGroup G\ng₁ g₂ : G\n⊢ ZeroHom.toFun\n      {\n        toFun := fun g =>\n          ↑Additive.ofMul\n            {\n              toEquiv :=\n                { toFun := fun h => g + h + -g, invFun := fun h => -g + h + g,\n                  left_inv := (_ : ∀ (x : G), -g + (g + x + -g) + g = x),\n                  right_inv := (_ : ∀ (x : G), g + (-g + x + g) + -g = x) },\n              map_add' := (_ : ∀ (a a_1 : G), g + (a + a_1) + -g = g + a + -g + (g + a_1 + -g)) },\n        map_zero' :=\n          (_ :\n            (fun g =>\n                  ↑Additive.ofMul\n                    {\n                      toEquiv :=\n                        { toFun := fun h => g + h + -g, invFun := fun h => -g + h + g,\n                          left_inv := (_ : ∀ (x : G), -g + (g + x + -g) + g = x),\n                          right_inv := (_ : ∀ (x : G), g + (-g + x + g) + -g = x) },\n                      map_add' := (_ : ∀ (a a_1 : G), g + (a + a_1) + -g = g + a + -g + (g + a_1 + -g)) })\n                0 =\n              0) }\n      (g₁ + g₂) =\n    ZeroHom.toFun\n        {\n          toFun := fun g =>\n            ↑Additive.ofMul\n              {\n                toEquiv :=\n                  { toFun := fun h => g + h + -g, invFun := fun h => -g + h + g,\n                    left_inv := (_ : ∀ (x : G), -g + (g + x + -g) + g = x),\n                    right_inv := (_ : ∀ (x : G), g + (-g + x + g) + -g = x) },\n                map_add' := (_ : ∀ (a a_1 : G), g + (a + a_1) + -g = g + a + -g + (g + a_1 + -g)) },\n          map_zero' :=\n            (_ :\n              (fun g =>\n                    ↑Additive.ofMul\n                      {\n                        toEquiv :=\n                          { toFun := fun h => g + h + -g, invFun := fun h => -g + h + g,\n                            left_inv := (_ : ∀ (x : G), -g + (g + x + -g) + g = x),\n                            right_inv := (_ : ∀ (x : G), g + (-g + x + g) + -g = x) },\n                        map_add' := (_ : ∀ (a a_1 : G), g + (a + a_1) + -g = g + a + -g + (g + a_1 + -g)) })\n                  0 =\n                0) }\n        g₁ +\n      ZeroHom.toFun\n        {\n          toFun := fun g =>\n            ↑Additive.ofMul\n              {\n                toEquiv :=\n                  { toFun := fun h => g + h + -g, invFun := fun h => -g + h + g,\n                    left_inv := (_ : ∀ (x : G), -g + (g + x + -g) + g = x),\n                    right_inv := (_ : ∀ (x : G), g + (-g + x + g) + -g = x) },\n                map_add' := (_ : ∀ (a a_1 : G), g + (a + a_1) + -g = g + a + -g + (g + a_1 + -g)) },\n          map_zero' :=\n            (_ :\n              (fun g =>\n                    ↑Additive.ofMul\n                      {\n                        toEquiv :=\n                          { toFun := fun h => g + h + -g, invFun := fun h => -g + h + g,\n                            left_inv := (_ : ∀ (x : G), -g + (g + x + -g) + g = x),\n                            right_inv := (_ : ∀ (x : G), g + (-g + x + g) + -g = x) },\n                        map_add' := (_ : ∀ (a a_1 : G), g + (a + a_1) + -g = g + a + -g + (g + a_1 + -g)) })\n                  0 =\n                0) }\n        g₂\n[PROOFSTEP]\napply Additive.toMul.injective\n[GOAL]\ncase a\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝¹ : Add A\ninst✝ : AddGroup G\ng₁ g₂ : G\n⊢ ↑Additive.toMul\n      (ZeroHom.toFun\n        {\n          toFun := fun g =>\n            ↑Additive.ofMul\n              {\n                toEquiv :=\n                  { toFun := fun h => g + h + -g, invFun := fun h => -g + h + g,\n                    left_inv := (_ : ∀ (x : G), -g + (g + x + -g) + g = x),\n                    right_inv := (_ : ∀ (x : G), g + (-g + x + g) + -g = x) },\n                map_add' := (_ : ∀ (a a_1 : G), g + (a + a_1) + -g = g + a + -g + (g + a_1 + -g)) },\n          map_zero' :=\n            (_ :\n              (fun g =>\n                    ↑Additive.ofMul\n                      {\n                        toEquiv :=\n                          { toFun := fun h => g + h + -g, invFun := fun h => -g + h + g,\n                            left_inv := (_ : ∀ (x : G), -g + (g + x + -g) + g = x),\n                            right_inv := (_ : ∀ (x : G), g + (-g + x + g) + -g = x) },\n                        map_add' := (_ : ∀ (a a_1 : G), g + (a + a_1) + -g = g + a + -g + (g + a_1 + -g)) })\n                  0 =\n                0) }\n        (g₁ + g₂)) =\n    ↑Additive.toMul\n      (ZeroHom.toFun\n          {\n            toFun := fun g =>\n              ↑Additive.ofMul\n                {\n                  toEquiv :=\n                    { toFun := fun h => g + h + -g, invFun := fun h => -g + h + g,\n                      left_inv := (_ : ∀ (x : G), -g + (g + x + -g) + g = x),\n                      right_inv := (_ : ∀ (x : G), g + (-g + x + g) + -g = x) },\n                  map_add' := (_ : ∀ (a a_1 : G), g + (a + a_1) + -g = g + a + -g + (g + a_1 + -g)) },\n            map_zero' :=\n              (_ :\n                (fun g =>\n                      ↑Additive.ofMul\n                        {\n                          toEquiv :=\n                            { toFun := fun h => g + h + -g, invFun := fun h => -g + h + g,\n                              left_inv := (_ : ∀ (x : G), -g + (g + x + -g) + g = x),\n                              right_inv := (_ : ∀ (x : G), g + (-g + x + g) + -g = x) },\n                          map_add' := (_ : ∀ (a a_1 : G), g + (a + a_1) + -g = g + a + -g + (g + a_1 + -g)) })\n                    0 =\n                  0) }\n          g₁ +\n        ZeroHom.toFun\n          {\n            toFun := fun g =>\n              ↑Additive.ofMul\n                {\n                  toEquiv :=\n                    { toFun := fun h => g + h + -g, invFun := fun h => -g + h + g,\n                      left_inv := (_ : ∀ (x : G), -g + (g + x + -g) + g = x),\n                      right_inv := (_ : ∀ (x : G), g + (-g + x + g) + -g = x) },\n                  map_add' := (_ : ∀ (a a_1 : G), g + (a + a_1) + -g = g + a + -g + (g + a_1 + -g)) },\n            map_zero' :=\n              (_ :\n                (fun g =>\n                      ↑Additive.ofMul\n                        {\n                          toEquiv :=\n                            { toFun := fun h => g + h + -g, invFun := fun h => -g + h + g,\n                              left_inv := (_ : ∀ (x : G), -g + (g + x + -g) + g = x),\n                              right_inv := (_ : ∀ (x : G), g + (-g + x + g) + -g = x) },\n                          map_add' := (_ : ∀ (a a_1 : G), g + (a + a_1) + -g = g + a + -g + (g + a_1 + -g)) })\n                    0 =\n                  0) }\n          g₂)\n[PROOFSTEP]\next h\n[GOAL]\ncase a.h\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝¹ : Add A\ninst✝ : AddGroup G\ng₁ g₂ h : G\n⊢ ↑(↑Additive.toMul\n          (ZeroHom.toFun\n            {\n              toFun := fun g =>\n                ↑Additive.ofMul\n                  {\n                    toEquiv :=\n                      { toFun := fun h => g + h + -g, invFun := fun h => -g + h + g,\n                        left_inv := (_ : ∀ (x : G), -g + (g + x + -g) + g = x),\n                        right_inv := (_ : ∀ (x : G), g + (-g + x + g) + -g = x) },\n                    map_add' := (_ : ∀ (a a_1 : G), g + (a + a_1) + -g = g + a + -g + (g + a_1 + -g)) },\n              map_zero' :=\n                (_ :\n                  (fun g =>\n                        ↑Additive.ofMul\n                          {\n                            toEquiv :=\n                              { toFun := fun h => g + h + -g, invFun := fun h => -g + h + g,\n                                left_inv := (_ : ∀ (x : G), -g + (g + x + -g) + g = x),\n                                right_inv := (_ : ∀ (x : G), g + (-g + x + g) + -g = x) },\n                            map_add' := (_ : ∀ (a a_1 : G), g + (a + a_1) + -g = g + a + -g + (g + a_1 + -g)) })\n                      0 =\n                    0) }\n            (g₁ + g₂)))\n      h =\n    ↑(↑Additive.toMul\n          (ZeroHom.toFun\n              {\n                toFun := fun g =>\n                  ↑Additive.ofMul\n                    {\n                      toEquiv :=\n                        { toFun := fun h => g + h + -g, invFun := fun h => -g + h + g,\n                          left_inv := (_ : ∀ (x : G), -g + (g + x + -g) + g = x),\n                          right_inv := (_ : ∀ (x : G), g + (-g + x + g) + -g = x) },\n                      map_add' := (_ : ∀ (a a_1 : G), g + (a + a_1) + -g = g + a + -g + (g + a_1 + -g)) },\n                map_zero' :=\n                  (_ :\n                    (fun g =>\n                          ↑Additive.ofMul\n                            {\n                              toEquiv :=\n                                { toFun := fun h => g + h + -g, invFun := fun h => -g + h + g,\n                                  left_inv := (_ : ∀ (x : G), -g + (g + x + -g) + g = x),\n                                  right_inv := (_ : ∀ (x : G), g + (-g + x + g) + -g = x) },\n                              map_add' := (_ : ∀ (a a_1 : G), g + (a + a_1) + -g = g + a + -g + (g + a_1 + -g)) })\n                        0 =\n                      0) }\n              g₁ +\n            ZeroHom.toFun\n              {\n                toFun := fun g =>\n                  ↑Additive.ofMul\n                    {\n                      toEquiv :=\n                        { toFun := fun h => g + h + -g, invFun := fun h => -g + h + g,\n                          left_inv := (_ : ∀ (x : G), -g + (g + x + -g) + g = x),\n                          right_inv := (_ : ∀ (x : G), g + (-g + x + g) + -g = x) },\n                      map_add' := (_ : ∀ (a a_1 : G), g + (a + a_1) + -g = g + a + -g + (g + a_1 + -g)) },\n                map_zero' :=\n                  (_ :\n                    (fun g =>\n                          ↑Additive.ofMul\n                            {\n                              toEquiv :=\n                                { toFun := fun h => g + h + -g, invFun := fun h => -g + h + g,\n                                  left_inv := (_ : ∀ (x : G), -g + (g + x + -g) + g = x),\n                                  right_inv := (_ : ∀ (x : G), g + (-g + x + g) + -g = x) },\n                              map_add' := (_ : ∀ (a a_1 : G), g + (a + a_1) + -g = g + a + -g + (g + a_1 + -g)) })\n                        0 =\n                      0) }\n              g₂))\n      h\n[PROOFSTEP]\nshow g₁ + g₂ + h + -(g₁ + g₂) = g₁ + (g₂ + h + -g₂) + -g₁\n[GOAL]\ncase a.h\nA : Type u_1\nM : Type u_2\nG : Type u_3\ninst✝¹ : Add A\ninst✝ : AddGroup G\ng₁ g₂ h : G\n⊢ g₁ + g₂ + h + -(g₁ + g₂) = g₁ + (g₂ + h + -g₂) + -g₁\n[PROOFSTEP]\nsimp only [add_assoc, neg_add_rev]\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Hom.Aut", "llama_tokens": 19363, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.8104788995148791, "lm_q2_score": 0.6187804337438501, "lm_q1q2_score": 0.5015084849820551}}
{"text": "[GOAL]\nd x y : ℤ\n⊢ IsPell { re := x, im := y } ↔ { re := x, im := y } * star { re := x, im := y } = 1\n[PROOFSTEP]\nsimp [Zsqrtd.ext, IsPell, mul_comm]\n[GOAL]\nd x y : ℤ\n⊢ x * x - y * (d * y) = 1 ↔ x * x + -(y * (d * y)) = 1\n[PROOFSTEP]\nring_nf\n[GOAL]\nd x y : ℤ\n⊢ IsPell { re := x, im := y } ↔ { re := x, im := y } ∈ unitary (ℤ√d)\n[PROOFSTEP]\nrw [unitary.mem_iff, isPell_norm, mul_comm (star _), and_self_iff]\n[GOAL]\nd : ℤ\nb c : ℤ√d\nhb : IsPell b\nhc : IsPell c\n⊢ b * c * star (b * c) = 1\n[PROOFSTEP]\nsimp [mul_comm, mul_left_comm c, mul_assoc, star_mul, isPell_norm.1 hb, isPell_norm.1 hc]\n[GOAL]\nd x y : ℤ\n⊢ IsPell { re := x, im := y } ↔ IsPell (star { re := x, im := y })\n[PROOFSTEP]\nsimp [IsPell, Zsqrtd.star_mk]\n[GOAL]\na : ℕ\na1 : 1 < a\n⊢ 0 < 1\n[PROOFSTEP]\ndecide\n[GOAL]\na : ℕ\na1 : 1 < a\n⊢ xn a1 1 = a\n[PROOFSTEP]\nsimp\n[GOAL]\na : ℕ\na1 : 1 < a\n⊢ yn a1 1 = 1\n[PROOFSTEP]\nsimp\n[GOAL]\na : ℕ\na1 : 1 < a\n⊢ a ≤ a * a\n[PROOFSTEP]\nhave := @Nat.mul_le_mul_left 1 a a (le_of_lt a1)\n[GOAL]\na : ℕ\na1 : 1 < a\nthis : a * 1 ≤ a * a\n⊢ a ≤ a * a\n[PROOFSTEP]\nrwa [mul_one] at this \n[GOAL]\na : ℕ\na1 : 1 < a\nthis : 1 ≤ a * a\n⊢ ↑(Pell.d a1) = az a * az a - 1\n[PROOFSTEP]\nrw [Pell.d, Int.ofNat_sub this]\n[GOAL]\na : ℕ\na1 : 1 < a\nthis : 1 ≤ a * a\n⊢ ↑(a * a) - ↑1 = az a * az a - 1\n[PROOFSTEP]\nrfl\n[GOAL]\na : ℕ\na1 : 1 < a\nx y : ℕ\nh : IsPell { re := ↑x, im := ↑y }\n⊢ ↑(x * x - Pell.d a1 * y * y) = ↑1\n[PROOFSTEP]\nrw [Int.ofNat_sub (Int.le_of_ofNat_le_ofNat <| Int.le.intro_sub _ h)]\n[GOAL]\na : ℕ\na1 : 1 < a\nx y : ℕ\nh : IsPell { re := ↑x, im := ↑y }\n⊢ ↑(x * x) - ↑(Pell.d a1 * y * y) = ↑1\n[PROOFSTEP]\nexact h\n[GOAL]\na : ℕ\na1 : 1 < a\nx y : ℕ\nh : x * x - Pell.d a1 * y * y = 1\n⊢ ↑(x * x) - ↑(Pell.d a1 * y * y) = 1\n[PROOFSTEP]\nrw [← Int.ofNat_sub <| le_of_lt <| Nat.lt_of_sub_eq_succ h, h]\n[GOAL]\na : ℕ\na1 : 1 < a\nx y : ℕ\nh : x * x - Pell.d a1 * y * y = 1\n⊢ ↑1 = 1\n[PROOFSTEP]\nrfl\n[GOAL]\na : ℕ\na1 : 1 < a\nn : ℕ\n⊢ pellZd a1 (n + 1) = pellZd a1 n * { re := ↑a, im := 1 }\n[PROOFSTEP]\nsimp [Zsqrtd.ext]\n[GOAL]\na : ℕ\na1 : 1 < a\n⊢ az a * az a - ↑(Pell.d a1) * 1 * 1 = 1\n[PROOFSTEP]\nsimp [dz_val]\n[GOAL]\na : ℕ\na1 : 1 < a\nn : ℕ\n⊢ IsPell (pellZd a1 (n + 1))\n[PROOFSTEP]\nlet o := isPell_one a1\n[GOAL]\na : ℕ\na1 : 1 < a\nn : ℕ\no : IsPell { re := ↑a, im := 1 } := isPell_one a1\n⊢ IsPell (pellZd a1 (n + 1))\n[PROOFSTEP]\nsimp\n[GOAL]\na : ℕ\na1 : 1 < a\nn : ℕ\no : IsPell { re := ↑a, im := 1 } := isPell_one a1\n⊢ IsPell (pellZd a1 n * { re := ↑a, im := 1 })\n[PROOFSTEP]\nexact Pell.isPell_mul (isPell_pellZd n) o\n[GOAL]\na : ℕ\na1 : 1 < a\nn : ℕ\npn : xz a1 n * xz a1 n - ↑(Pell.d a1) * yz a1 n * yz a1 n = 1 := pell_eqz a1 n\n⊢ ↑(xn a1 n * xn a1 n) - ↑(Pell.d a1 * yn a1 n * yn a1 n) = 1\n[PROOFSTEP]\nrepeat' rw [Int.ofNat_mul]; exact pn\n[GOAL]\na : ℕ\na1 : 1 < a\nn : ℕ\npn : xz a1 n * xz a1 n - ↑(Pell.d a1) * yz a1 n * yz a1 n = 1 := pell_eqz a1 n\n⊢ ↑(xn a1 n * xn a1 n) - ↑(Pell.d a1 * yn a1 n * yn a1 n) = 1\n[PROOFSTEP]\nrw [Int.ofNat_mul]\n[GOAL]\na : ℕ\na1 : 1 < a\nn : ℕ\npn : xz a1 n * xz a1 n - ↑(Pell.d a1) * yz a1 n * yz a1 n = 1 := pell_eqz a1 n\n⊢ ↑(xn a1 n) * ↑(xn a1 n) - ↑(Pell.d a1 * yn a1 n * yn a1 n) = 1\n[PROOFSTEP]\nexact pn\n[GOAL]\na : ℕ\na1 : 1 < a\nn : ℕ\npn : xz a1 n * xz a1 n - ↑(Pell.d a1) * yz a1 n * yz a1 n = 1 := pell_eqz a1 n\nh : ↑(xn a1 n * xn a1 n) - ↑(Pell.d a1 * yn a1 n * yn a1 n) = 1\nhl : Pell.d a1 * yn a1 n * yn a1 n ≤ xn a1 n * xn a1 n\n⊢ ↑(xn a1 n * xn a1 n - Pell.d a1 * yn a1 n * yn a1 n) = ↑1\n[PROOFSTEP]\nrw [Int.ofNat_sub hl]\n[GOAL]\na : ℕ\na1 : 1 < a\nn : ℕ\npn : xz a1 n * xz a1 n - ↑(Pell.d a1) * yz a1 n * yz a1 n = 1 := pell_eqz a1 n\nh : ↑(xn a1 n * xn a1 n) - ↑(Pell.d a1 * yn a1 n * yn a1 n) = 1\nhl : Pell.d a1 * yn a1 n * yn a1 n ≤ xn a1 n * xn a1 n\n⊢ ↑(xn a1 n * xn a1 n) - ↑(Pell.d a1 * yn a1 n * yn a1 n) = ↑1\n[PROOFSTEP]\nexact h\n[GOAL]\na : ℕ\na1 : 1 < a\nn : ℕ\nh : Pell.d a1 = n * n\n⊢ n * n + 1 = a * a\n[PROOFSTEP]\nrw [← h]\n[GOAL]\na : ℕ\na1 : 1 < a\nn : ℕ\nh : Pell.d a1 = n * n\n⊢ Pell.d a1 + 1 = a * a\n[PROOFSTEP]\nexact Nat.succ_pred_eq_of_pos (asq_pos a1)\n[GOAL]\na : ℕ\na1 : 1 < a\nn : ℕ\nh : Pell.d a1 = n * n\nthis : n * n + 1 = a * a\n⊢ n * n < a * a\n[PROOFSTEP]\nrw [← this]\n[GOAL]\na : ℕ\na1 : 1 < a\nn : ℕ\nh : Pell.d a1 = n * n\nthis : n * n + 1 = a * a\n⊢ n * n < n * n + 1\n[PROOFSTEP]\nexact Nat.lt_succ_self _\n[GOAL]\na : ℕ\na1 : 1 < a\nn : ℕ\nh : Pell.d a1 = n * n\nthis : n * n + 1 = a * a\nna : n < a\n⊢ (n + 1) * (n + 1) ≤ n * n + 1\n[PROOFSTEP]\nrw [this]\n[GOAL]\na : ℕ\na1 : 1 < a\nn : ℕ\nh : Pell.d a1 = n * n\nthis : n * n + 1 = a * a\nna : n < a\n⊢ (n + 1) * (n + 1) ≤ a * a\n[PROOFSTEP]\nexact Nat.mul_self_le_mul_self na\n[GOAL]\na : ℕ\na1 : 1 < a\nn : ℕ\nh : Pell.d a1 = n * n\nthis✝ : n * n + 1 = a * a\nna : n < a\nthis : (n + 1) * (n + 1) ≤ n * n + 1\n⊢ n + n + (n * n + 1) ≤ 0 + (n * n + 1)\n[PROOFSTEP]\nring_nf at this ⊢\n[GOAL]\na : ℕ\na1 : 1 < a\nn : ℕ\nh : Pell.d a1 = n * n\nthis✝ : n * n + 1 = a * a\nna : n < a\nthis : 1 + n * 2 + n ^ 2 ≤ 1 + n ^ 2\n⊢ 1 + n * 2 + n ^ 2 ≤ 1 + n ^ 2\n[PROOFSTEP]\nassumption\n[GOAL]\na : ℕ\na1 : 1 < a\nn : ℕ\nh : Pell.d a1 = n * n\nthis✝¹ : n * n + 1 = a * a\nna : n < a\nthis✝ : (n + 1) * (n + 1) ≤ n * n + 1\nthis : n + n ≤ 0\n⊢ Pell.d a1 = 0\n[PROOFSTEP]\nrwa [Nat.eq_zero_of_le_zero ((Nat.le_add_left _ _).trans this)] at h \n[GOAL]\na : ℕ\na1 : 1 < a\nn : ℕ\n⊢ a ^ (n + 1) ≤ xn a1 (n + 1)\n[PROOFSTEP]\nsimp [_root_.pow_succ']\n[GOAL]\na : ℕ\na1 : 1 < a\nn : ℕ\n⊢ a ^ n * a ≤ xn a1 n * a + Pell.d a1 * yn a1 n\n[PROOFSTEP]\nexact le_trans (Nat.mul_le_mul_right _ (xn_ge_a_pow n)) (Nat.le_add_right _ _)\n[GOAL]\na : ℕ\na1 : 1 < a\nn : ℕ\n⊢ n + 1 < a ^ (n + 1)\n[PROOFSTEP]\nhave IH := n_lt_a_pow n\n[GOAL]\na : ℕ\na1 : 1 < a\nn : ℕ\nIH : n < a ^ n\n⊢ n + 1 < a ^ (n + 1)\n[PROOFSTEP]\nhave : a ^ n + a ^ n ≤ a ^ n * a := by\n  rw [← mul_two]\n  exact Nat.mul_le_mul_left _ a1\n[GOAL]\na : ℕ\na1 : 1 < a\nn : ℕ\nIH : n < a ^ n\n⊢ a ^ n + a ^ n ≤ a ^ n * a\n[PROOFSTEP]\nrw [← mul_two]\n[GOAL]\na : ℕ\na1 : 1 < a\nn : ℕ\nIH : n < a ^ n\n⊢ a ^ n * 2 ≤ a ^ n * a\n[PROOFSTEP]\nexact Nat.mul_le_mul_left _ a1\n[GOAL]\na : ℕ\na1 : 1 < a\nn : ℕ\nIH : n < a ^ n\nthis : a ^ n + a ^ n ≤ a ^ n * a\n⊢ n + 1 < a ^ (n + 1)\n[PROOFSTEP]\nsimp [_root_.pow_succ']\n[GOAL]\na : ℕ\na1 : 1 < a\nn : ℕ\nIH : n < a ^ n\nthis : a ^ n + a ^ n ≤ a ^ n * a\n⊢ n + 1 < a ^ n * a\n[PROOFSTEP]\nrefine' lt_of_lt_of_le _ this\n[GOAL]\na : ℕ\na1 : 1 < a\nn : ℕ\nIH : n < a ^ n\nthis : a ^ n + a ^ n ≤ a ^ n * a\n⊢ n + 1 < a ^ n + a ^ n\n[PROOFSTEP]\nexact add_lt_add_of_lt_of_le IH (lt_of_le_of_lt (Nat.zero_le _) IH)\n[GOAL]\na : ℕ\na1 : 1 < a\nn : ℕ\nb : ℤ√↑(Pell.d a1)\nh1 : 1 ≤ b\nhp : IsPell b\nh : b ≤ pellZd a1 (n + 1)\na1p : 0 ≤ { re := ↑a, im := 1 }\n⊢ Pell.d a1 * (0 + 1) * (0 + 1) ≤ 1 * (a + 0) * (a + 0)\n[PROOFSTEP]\nsimp\n[GOAL]\na : ℕ\na1 : 1 < a\nn : ℕ\nb : ℤ√↑(Pell.d a1)\nh1 : 1 ≤ b\nhp : IsPell b\nh : b ≤ pellZd a1 (n + 1)\na1p : 0 ≤ { re := ↑a, im := 1 }\n⊢ Pell.d a1 ≤ a * a\n[PROOFSTEP]\nexact Nat.pred_le _\n[GOAL]\na : ℕ\na1 : 1 < a\nn : ℕ\nb : ℤ√↑(Pell.d a1)\nh1 : 1 ≤ b\nhp : IsPell b\nh : b ≤ pellZd a1 (n + 1)\na1p : 0 ≤ { re := ↑a, im := 1 }\nam1p : 0 ≤ { re := ↑a, im := -1 }\na1m : { re := ↑a, im := 1 } * { re := ↑a, im := -1 } = 1\nha : { re := ↑a, im := 1 } ≤ b\n⊢ 1 ≤ b * { re := ↑a, im := -1 }\n[PROOFSTEP]\nrw [← a1m]\n[GOAL]\na : ℕ\na1 : 1 < a\nn : ℕ\nb : ℤ√↑(Pell.d a1)\nh1 : 1 ≤ b\nhp : IsPell b\nh : b ≤ pellZd a1 (n + 1)\na1p : 0 ≤ { re := ↑a, im := 1 }\nam1p : 0 ≤ { re := ↑a, im := -1 }\na1m : { re := ↑a, im := 1 } * { re := ↑a, im := -1 } = 1\nha : { re := ↑a, im := 1 } ≤ b\n⊢ { re := ↑a, im := 1 } * { re := ↑a, im := -1 } ≤ b * { re := ↑a, im := -1 }\n[PROOFSTEP]\nexact mul_le_mul_of_nonneg_right ha am1p\n[GOAL]\na : ℕ\na1 : 1 < a\nn : ℕ\nb : ℤ√↑(Pell.d a1)\nh1 : 1 ≤ b\nhp : IsPell b\nh : b ≤ pellZd a1 (n + 1)\na1p : 0 ≤ { re := ↑a, im := 1 }\nam1p : 0 ≤ { re := ↑a, im := -1 }\na1m : { re := ↑a, im := 1 } * { re := ↑a, im := -1 } = 1\nha : { re := ↑a, im := 1 } ≤ b\n⊢ b * { re := ↑a, im := -1 } ≤ pellZd a1 n\n[PROOFSTEP]\nhave t := mul_le_mul_of_nonneg_right h am1p\n[GOAL]\na : ℕ\na1 : 1 < a\nn : ℕ\nb : ℤ√↑(Pell.d a1)\nh1 : 1 ≤ b\nhp : IsPell b\nh : b ≤ pellZd a1 (n + 1)\na1p : 0 ≤ { re := ↑a, im := 1 }\nam1p : 0 ≤ { re := ↑a, im := -1 }\na1m : { re := ↑a, im := 1 } * { re := ↑a, im := -1 } = 1\nha : { re := ↑a, im := 1 } ≤ b\nt : b * { re := ↑a, im := -1 } ≤ pellZd a1 (n + 1) * { re := ↑a, im := -1 }\n⊢ b * { re := ↑a, im := -1 } ≤ pellZd a1 n\n[PROOFSTEP]\nrwa [pellZd_succ, mul_assoc, a1m, mul_one] at t \n[GOAL]\na : ℕ\na1 : 1 < a\nn : ℕ\nb : ℤ√↑(Pell.d a1)\nh1 : 1 ≤ b\nhp : IsPell b\nh : b ≤ pellZd a1 (n + 1)\na1p : 0 ≤ { re := ↑a, im := 1 }\nam1p : 0 ≤ { re := ↑a, im := -1 }\na1m : { re := ↑a, im := 1 } * { re := ↑a, im := -1 } = 1\nha : { re := ↑a, im := 1 } ≤ b\nm : ℕ\ne : b * { re := ↑a, im := -1 } = pellZd a1 m\n⊢ b = pellZd a1 (m + 1)\n[PROOFSTEP]\nrw [show b = b * ⟨a, -1⟩ * ⟨a, 1⟩ by rw [mul_assoc, Eq.trans (mul_comm _ _) a1m]; simp, pellZd_succ, e]\n[GOAL]\na : ℕ\na1 : 1 < a\nn : ℕ\nb : ℤ√↑(Pell.d a1)\nh1 : 1 ≤ b\nhp : IsPell b\nh : b ≤ pellZd a1 (n + 1)\na1p : 0 ≤ { re := ↑a, im := 1 }\nam1p : 0 ≤ { re := ↑a, im := -1 }\na1m : { re := ↑a, im := 1 } * { re := ↑a, im := -1 } = 1\nha : { re := ↑a, im := 1 } ≤ b\nm : ℕ\ne : b * { re := ↑a, im := -1 } = pellZd a1 m\n⊢ b = b * { re := ↑a, im := -1 } * { re := ↑a, im := 1 }\n[PROOFSTEP]\nrw [mul_assoc, Eq.trans (mul_comm _ _) a1m]\n[GOAL]\na : ℕ\na1 : 1 < a\nn : ℕ\nb : ℤ√↑(Pell.d a1)\nh1 : 1 ≤ b\nhp : IsPell b\nh : b ≤ pellZd a1 (n + 1)\na1p : 0 ≤ { re := ↑a, im := 1 }\nam1p : 0 ≤ { re := ↑a, im := -1 }\na1m : { re := ↑a, im := 1 } * { re := ↑a, im := -1 } = 1\nha : { re := ↑a, im := 1 } ≤ b\nm : ℕ\ne : b * { re := ↑a, im := -1 } = pellZd a1 m\n⊢ b = b * 1\n[PROOFSTEP]\nsimp\n[GOAL]\na : ℕ\na1 : 1 < a\nn : ℕ\nb : ℤ√↑(Pell.d a1)\nh1 : 1 ≤ b\nhp : IsPell b\nh : b ≤ pellZd a1 (n + 1)\na1p : 0 ≤ { re := ↑a, im := 1 }\nam1p : 0 ≤ { re := ↑a, im := -1 }\na1m : { re := ↑a, im := 1 } * { re := ↑a, im := -1 } = 1\nha : ¬{ re := ↑a, im := 1 } ≤ b\nh1l : 1 < b\n⊢ False\n[PROOFSTEP]\ncases' b with x y\n[GOAL]\ncase mk\na : ℕ\na1 : 1 < a\nn : ℕ\na1p : 0 ≤ { re := ↑a, im := 1 }\nam1p : 0 ≤ { re := ↑a, im := -1 }\na1m : { re := ↑a, im := 1 } * { re := ↑a, im := -1 } = 1\nx y : ℤ\nh1 : 1 ≤ { re := x, im := y }\nhp : IsPell { re := x, im := y }\nh : { re := x, im := y } ≤ pellZd a1 (n + 1)\nha : ¬{ re := ↑a, im := 1 } ≤ { re := x, im := y }\nh1l : 1 < { re := x, im := y }\n⊢ False\n[PROOFSTEP]\nexact by\n  have bm : (_ * ⟨_, _⟩ : ℤ√d a1) = 1 := Pell.isPell_norm.1 hp\n  have y0l : (0 : ℤ√d a1) < ⟨x - x, y - -y⟩ :=\n    sub_lt_sub h1l fun hn : (1 : ℤ√d a1) ≤ ⟨x, -y⟩ =>\n      by\n      have t := mul_le_mul_of_nonneg_left hn (le_trans zero_le_one h1)\n      erw [bm, mul_one] at t \n      exact h1l t\n  have yl2 : (⟨_, _⟩ : ℤ√_) < ⟨_, _⟩ :=\n    show (⟨x, y⟩ - ⟨x, -y⟩ : ℤ√d a1) < ⟨a, 1⟩ - ⟨a, -1⟩ from\n      sub_lt_sub ha fun hn : (⟨x, -y⟩ : ℤ√d a1) ≤ ⟨a, -1⟩ =>\n        by\n        have t := mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_left hn (le_trans zero_le_one h1)) a1p\n        erw [bm, one_mul, mul_assoc, Eq.trans (mul_comm _ _) a1m, mul_one] at t \n        exact ha t\n  simp at y0l ; simp at yl2 \n  exact\n    match y, y0l, (yl2 : (⟨_, _⟩ : ℤ√_) < ⟨_, _⟩) with\n    | 0, y0l, _ => y0l (le_refl 0)\n    | (y + 1 : ℕ), _, yl2 =>\n      yl2\n        (Zsqrtd.le_of_le_le (by simp [sub_eq_add_neg])\n          (let t := Int.ofNat_le_ofNat_of_le (Nat.succ_pos y)\n          add_le_add t t))\n    | Int.negSucc _, y0l, _ => y0l trivial\n[GOAL]\na : ℕ\na1 : 1 < a\nn : ℕ\na1p : 0 ≤ { re := ↑a, im := 1 }\nam1p : 0 ≤ { re := ↑a, im := -1 }\na1m : { re := ↑a, im := 1 } * { re := ↑a, im := -1 } = 1\nx y : ℤ\nh1 : 1 ≤ { re := x, im := y }\nhp : IsPell { re := x, im := y }\nh : { re := x, im := y } ≤ pellZd a1 (n + 1)\nha : ¬{ re := ↑a, im := 1 } ≤ { re := x, im := y }\nh1l : 1 < { re := x, im := y }\n⊢ False\n[PROOFSTEP]\nhave bm : (_ * ⟨_, _⟩ : ℤ√d a1) = 1 := Pell.isPell_norm.1 hp\n[GOAL]\na : ℕ\na1 : 1 < a\nn : ℕ\na1p : 0 ≤ { re := ↑a, im := 1 }\nam1p : 0 ≤ { re := ↑a, im := -1 }\na1m : { re := ↑a, im := 1 } * { re := ↑a, im := -1 } = 1\nx y : ℤ\nh1 : 1 ≤ { re := x, im := y }\nhp : IsPell { re := x, im := y }\nh : { re := x, im := y } ≤ pellZd a1 (n + 1)\nha : ¬{ re := ↑a, im := 1 } ≤ { re := x, im := y }\nh1l : 1 < { re := x, im := y }\nbm : { re := x, im := y } * { re := { re := x, im := y }.re, im := -{ re := x, im := y }.im } = 1\n⊢ False\n[PROOFSTEP]\nhave y0l : (0 : ℤ√d a1) < ⟨x - x, y - -y⟩ :=\n  sub_lt_sub h1l fun hn : (1 : ℤ√d a1) ≤ ⟨x, -y⟩ =>\n    by\n    have t := mul_le_mul_of_nonneg_left hn (le_trans zero_le_one h1)\n    erw [bm, mul_one] at t \n    exact h1l t\n[GOAL]\na : ℕ\na1 : 1 < a\nn : ℕ\na1p : 0 ≤ { re := ↑a, im := 1 }\nam1p : 0 ≤ { re := ↑a, im := -1 }\na1m : { re := ↑a, im := 1 } * { re := ↑a, im := -1 } = 1\nx y : ℤ\nh1 : 1 ≤ { re := x, im := y }\nhp : IsPell { re := x, im := y }\nh : { re := x, im := y } ≤ pellZd a1 (n + 1)\nha : ¬{ re := ↑a, im := 1 } ≤ { re := x, im := y }\nh1l : 1 < { re := x, im := y }\nbm : { re := x, im := y } * { re := { re := x, im := y }.re, im := -{ re := x, im := y }.im } = 1\nhn : 1 ≤ { re := x, im := -y }\n⊢ False\n[PROOFSTEP]\nhave t := mul_le_mul_of_nonneg_left hn (le_trans zero_le_one h1)\n[GOAL]\na : ℕ\na1 : 1 < a\nn : ℕ\na1p : 0 ≤ { re := ↑a, im := 1 }\nam1p : 0 ≤ { re := ↑a, im := -1 }\na1m : { re := ↑a, im := 1 } * { re := ↑a, im := -1 } = 1\nx y : ℤ\nh1 : 1 ≤ { re := x, im := y }\nhp : IsPell { re := x, im := y }\nh : { re := x, im := y } ≤ pellZd a1 (n + 1)\nha : ¬{ re := ↑a, im := 1 } ≤ { re := x, im := y }\nh1l : 1 < { re := x, im := y }\nbm : { re := x, im := y } * { re := { re := x, im := y }.re, im := -{ re := x, im := y }.im } = 1\nhn : 1 ≤ { re := x, im := -y }\nt : { re := x, im := y } * 1 ≤ { re := x, im := y } * { re := x, im := -y }\n⊢ False\n[PROOFSTEP]\nerw [bm, mul_one] at t \n[GOAL]\na : ℕ\na1 : 1 < a\nn : ℕ\na1p : 0 ≤ { re := ↑a, im := 1 }\nam1p : 0 ≤ { re := ↑a, im := -1 }\na1m : { re := ↑a, im := 1 } * { re := ↑a, im := -1 } = 1\nx y : ℤ\nh1 : 1 ≤ { re := x, im := y }\nhp : IsPell { re := x, im := y }\nh : { re := x, im := y } ≤ pellZd a1 (n + 1)\nha : ¬{ re := ↑a, im := 1 } ≤ { re := x, im := y }\nh1l : 1 < { re := x, im := y }\nbm : { re := x, im := y } * { re := { re := x, im := y }.re, im := -{ re := x, im := y }.im } = 1\nhn : 1 ≤ { re := x, im := -y }\nt : { re := x, im := y } ≤ 1\n⊢ False\n[PROOFSTEP]\nexact h1l t\n[GOAL]\na : ℕ\na1 : 1 < a\nn : ℕ\na1p : 0 ≤ { re := ↑a, im := 1 }\nam1p : 0 ≤ { re := ↑a, im := -1 }\na1m : { re := ↑a, im := 1 } * { re := ↑a, im := -1 } = 1\nx y : ℤ\nh1 : 1 ≤ { re := x, im := y }\nhp : IsPell { re := x, im := y }\nh : { re := x, im := y } ≤ pellZd a1 (n + 1)\nha : ¬{ re := ↑a, im := 1 } ≤ { re := x, im := y }\nh1l : 1 < { re := x, im := y }\nbm : { re := x, im := y } * { re := { re := x, im := y }.re, im := -{ re := x, im := y }.im } = 1\ny0l : 0 < { re := x - x, im := y - -y }\n⊢ False\n[PROOFSTEP]\nhave yl2 : (⟨_, _⟩ : ℤ√_) < ⟨_, _⟩ :=\n  show (⟨x, y⟩ - ⟨x, -y⟩ : ℤ√d a1) < ⟨a, 1⟩ - ⟨a, -1⟩ from\n    sub_lt_sub ha fun hn : (⟨x, -y⟩ : ℤ√d a1) ≤ ⟨a, -1⟩ =>\n      by\n      have t := mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_left hn (le_trans zero_le_one h1)) a1p\n      erw [bm, one_mul, mul_assoc, Eq.trans (mul_comm _ _) a1m, mul_one] at t \n      exact ha t\n[GOAL]\na : ℕ\na1 : 1 < a\nn : ℕ\na1p : 0 ≤ { re := ↑a, im := 1 }\nam1p : 0 ≤ { re := ↑a, im := -1 }\na1m : { re := ↑a, im := 1 } * { re := ↑a, im := -1 } = 1\nx y : ℤ\nh1 : 1 ≤ { re := x, im := y }\nhp : IsPell { re := x, im := y }\nh : { re := x, im := y } ≤ pellZd a1 (n + 1)\nha : ¬{ re := ↑a, im := 1 } ≤ { re := x, im := y }\nh1l : 1 < { re := x, im := y }\nbm : { re := x, im := y } * { re := { re := x, im := y }.re, im := -{ re := x, im := y }.im } = 1\ny0l : 0 < { re := x - x, im := y - -y }\nhn : { re := x, im := -y } ≤ { re := ↑a, im := -1 }\n⊢ False\n[PROOFSTEP]\nhave t := mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_left hn (le_trans zero_le_one h1)) a1p\n[GOAL]\na : ℕ\na1 : 1 < a\nn : ℕ\na1p : 0 ≤ { re := ↑a, im := 1 }\nam1p : 0 ≤ { re := ↑a, im := -1 }\na1m : { re := ↑a, im := 1 } * { re := ↑a, im := -1 } = 1\nx y : ℤ\nh1 : 1 ≤ { re := x, im := y }\nhp : IsPell { re := x, im := y }\nh : { re := x, im := y } ≤ pellZd a1 (n + 1)\nha : ¬{ re := ↑a, im := 1 } ≤ { re := x, im := y }\nh1l : 1 < { re := x, im := y }\nbm : { re := x, im := y } * { re := { re := x, im := y }.re, im := -{ re := x, im := y }.im } = 1\ny0l : 0 < { re := x - x, im := y - -y }\nhn : { re := x, im := -y } ≤ { re := ↑a, im := -1 }\nt :\n  { re := x, im := y } * { re := x, im := -y } * { re := ↑a, im := 1 } ≤\n    { re := x, im := y } * { re := ↑a, im := -1 } * { re := ↑a, im := 1 }\n⊢ False\n[PROOFSTEP]\nerw [bm, one_mul, mul_assoc, Eq.trans (mul_comm _ _) a1m, mul_one] at t \n[GOAL]\na : ℕ\na1 : 1 < a\nn : ℕ\na1p : 0 ≤ { re := ↑a, im := 1 }\nam1p : 0 ≤ { re := ↑a, im := -1 }\na1m : { re := ↑a, im := 1 } * { re := ↑a, im := -1 } = 1\nx y : ℤ\nh1 : 1 ≤ { re := x, im := y }\nhp : IsPell { re := x, im := y }\nh : { re := x, im := y } ≤ pellZd a1 (n + 1)\nha : ¬{ re := ↑a, im := 1 } ≤ { re := x, im := y }\nh1l : 1 < { re := x, im := y }\nbm : { re := x, im := y } * { re := { re := x, im := y }.re, im := -{ re := x, im := y }.im } = 1\ny0l : 0 < { re := x - x, im := y - -y }\nhn : { re := x, im := -y } ≤ { re := ↑a, im := -1 }\nt : { re := ↑a, im := 1 } ≤ { re := x, im := y }\n⊢ False\n[PROOFSTEP]\nexact ha t\n[GOAL]\na : ℕ\na1 : 1 < a\nn : ℕ\na1p : 0 ≤ { re := ↑a, im := 1 }\nam1p : 0 ≤ { re := ↑a, im := -1 }\na1m : { re := ↑a, im := 1 } * { re := ↑a, im := -1 } = 1\nx y : ℤ\nh1 : 1 ≤ { re := x, im := y }\nhp : IsPell { re := x, im := y }\nh : { re := x, im := y } ≤ pellZd a1 (n + 1)\nha : ¬{ re := ↑a, im := 1 } ≤ { re := x, im := y }\nh1l : 1 < { re := x, im := y }\nbm : { re := x, im := y } * { re := { re := x, im := y }.re, im := -{ re := x, im := y }.im } = 1\ny0l : 0 < { re := x - x, im := y - -y }\nyl2 :\n  { re := { re := x, im := y }.re + (-{ re := x, im := -y }).re,\n      im := { re := x, im := y }.im + (-{ re := x, im := -y }).im } <\n    { re := { re := ↑a, im := 1 }.re + (-{ re := ↑a, im := -1 }).re,\n      im := { re := ↑a, im := 1 }.im + (-{ re := ↑a, im := -1 }).im }\n⊢ False\n[PROOFSTEP]\nsimp at y0l \n[GOAL]\na : ℕ\na1 : 1 < a\nn : ℕ\na1p : 0 ≤ { re := ↑a, im := 1 }\nam1p : 0 ≤ { re := ↑a, im := -1 }\na1m : { re := ↑a, im := 1 } * { re := ↑a, im := -1 } = 1\nx y : ℤ\nh1 : 1 ≤ { re := x, im := y }\nhp : IsPell { re := x, im := y }\nh : { re := x, im := y } ≤ pellZd a1 (n + 1)\nha : ¬{ re := ↑a, im := 1 } ≤ { re := x, im := y }\nh1l : 1 < { re := x, im := y }\nbm : { re := x, im := y } * { re := { re := x, im := y }.re, im := -{ re := x, im := y }.im } = 1\nyl2 :\n  { re := { re := x, im := y }.re + (-{ re := x, im := -y }).re,\n      im := { re := x, im := y }.im + (-{ re := x, im := -y }).im } <\n    { re := { re := ↑a, im := 1 }.re + (-{ re := ↑a, im := -1 }).re,\n      im := { re := ↑a, im := 1 }.im + (-{ re := ↑a, im := -1 }).im }\ny0l : 0 < { re := 0, im := y + y }\n⊢ False\n[PROOFSTEP]\nsimp at yl2 \n[GOAL]\na : ℕ\na1 : 1 < a\nn : ℕ\na1p : 0 ≤ { re := ↑a, im := 1 }\nam1p : 0 ≤ { re := ↑a, im := -1 }\na1m : { re := ↑a, im := 1 } * { re := ↑a, im := -1 } = 1\nx y : ℤ\nh1 : 1 ≤ { re := x, im := y }\nhp : IsPell { re := x, im := y }\nh : { re := x, im := y } ≤ pellZd a1 (n + 1)\nha : ¬{ re := ↑a, im := 1 } ≤ { re := x, im := y }\nh1l : 1 < { re := x, im := y }\nbm : { re := x, im := y } * { re := { re := x, im := y }.re, im := -{ re := x, im := y }.im } = 1\ny0l : 0 < { re := 0, im := y + y }\nyl2 : { re := 0, im := y + y } < { re := 0, im := 1 + 1 }\n⊢ False\n[PROOFSTEP]\nexact\n  match y, y0l, (yl2 : (⟨_, _⟩ : ℤ√_) < ⟨_, _⟩) with\n  | 0, y0l, _ => y0l (le_refl 0)\n  | (y + 1 : ℕ), _, yl2 =>\n    yl2\n      (Zsqrtd.le_of_le_le (by simp [sub_eq_add_neg])\n        (let t := Int.ofNat_le_ofNat_of_le (Nat.succ_pos y)\n        add_le_add t t))\n  | Int.negSucc _, y0l, _ => y0l trivial\n[GOAL]\na : ℕ\na1 : 1 < a\nn : ℕ\na1p : 0 ≤ { re := ↑a, im := 1 }\nam1p : 0 ≤ { re := ↑a, im := -1 }\na1m : { re := ↑a, im := 1 } * { re := ↑a, im := -1 } = 1\nx y✝ : ℤ\ny0l : 0 < { re := 0, im := y✝ + y✝ }\nyl2✝ : { re := 0, im := y✝ + y✝ } < { re := 0, im := 1 + 1 }\ny : ℕ\nx✝ : 0 < { re := 0, im := ↑(y + 1) + ↑(y + 1) }\nyl2 : { re := 0, im := ↑(y + 1) + ↑(y + 1) } < { re := 0, im := 1 + 1 }\nh1 : 1 ≤ { re := x, im := ↑(y + 1) }\nhp : IsPell { re := x, im := ↑(y + 1) }\nh : { re := x, im := ↑(y + 1) } ≤ pellZd a1 (n + 1)\nha : ¬{ re := ↑a, im := 1 } ≤ { re := x, im := ↑(y + 1) }\nh1l : 1 < { re := x, im := ↑(y + 1) }\nbm : { re := x, im := ↑(y + 1) } * { re := { re := x, im := ↑(y + 1) }.re, im := -{ re := x, im := ↑(y + 1) }.im } = 1\n⊢ 0 ≤ 0\n[PROOFSTEP]\nsimp [sub_eq_add_neg]\n[GOAL]\na : ℕ\na1 : 1 < a\nb : ℤ√↑(Pell.d a1)\nb1 : 1 ≤ b\nhp : IsPell b\nn : ℕ\nh : b ≤ ↑n\n⊢ ↑n ≤ pellZd a1 n\n[PROOFSTEP]\nrw [Zsqrtd.coe_nat_val]\n[GOAL]\na : ℕ\na1 : 1 < a\nb : ℤ√↑(Pell.d a1)\nb1 : 1 ≤ b\nhp : IsPell b\nn : ℕ\nh : b ≤ ↑n\n⊢ { re := ↑n, im := 0 } ≤ pellZd a1 n\n[PROOFSTEP]\nexact Zsqrtd.le_of_le_le (Int.ofNat_le_ofNat_of_le <| le_of_lt <| n_lt_xn _ _) (Int.ofNat_zero_le _)\n[GOAL]\na : ℕ\na1 : 1 < a\nx y : ℕ\nhp✝ : x * x - Pell.d a1 * y * y = 1\nhp : 0 - Pell.d a1 * y * y = 1\n⊢ 1 ≤ { re := ↑0, im := ↑y }\n[PROOFSTEP]\nrw [zero_tsub] at hp \n[GOAL]\na : ℕ\na1 : 1 < a\nx y : ℕ\nhp✝ : x * x - Pell.d a1 * y * y = 1\nhp : 0 = 1\n⊢ 1 ≤ { re := ↑0, im := ↑y }\n[PROOFSTEP]\ncontradiction\n[GOAL]\na : ℕ\na1 : 1 < a\nm n : ℕ\n⊢ pellZd a1 (m + (n + 1)) = pellZd a1 m * pellZd a1 (n + 1)\n[PROOFSTEP]\nrw [← add_assoc, pellZd_succ, pellZd_succ, pellZd_add _ n, ← mul_assoc]\n[GOAL]\na : ℕ\na1 : 1 < a\nm n : ℕ\n⊢ xn a1 (m + n) = xn a1 m * xn a1 n + Pell.d a1 * yn a1 m * yn a1 n\n[PROOFSTEP]\ninjection pellZd_add a1 m n with h _\n[GOAL]\na : ℕ\na1 : 1 < a\nm n : ℕ\nh : ↑(xn a1 (m + n)) = (pellZd a1 m).re * (pellZd a1 n).re + ↑(Pell.d a1) * (pellZd a1 m).im * (pellZd a1 n).im\nim_eq✝ : ↑(yn a1 (m + n)) = (pellZd a1 m).re * (pellZd a1 n).im + (pellZd a1 m).im * (pellZd a1 n).re\n⊢ xn a1 (m + n) = xn a1 m * xn a1 n + Pell.d a1 * yn a1 m * yn a1 n\n[PROOFSTEP]\nzify\n[GOAL]\na : ℕ\na1 : 1 < a\nm n : ℕ\nh : ↑(xn a1 (m + n)) = (pellZd a1 m).re * (pellZd a1 n).re + ↑(Pell.d a1) * (pellZd a1 m).im * (pellZd a1 n).im\nim_eq✝ : ↑(yn a1 (m + n)) = (pellZd a1 m).re * (pellZd a1 n).im + (pellZd a1 m).im * (pellZd a1 n).re\n⊢ ↑(xn a1 (m + n)) = ↑(xn a1 m) * ↑(xn a1 n) + ↑(Pell.d a1) * ↑(yn a1 m) * ↑(yn a1 n)\n[PROOFSTEP]\nrw [h]\n[GOAL]\na : ℕ\na1 : 1 < a\nm n : ℕ\nh : ↑(xn a1 (m + n)) = (pellZd a1 m).re * (pellZd a1 n).re + ↑(Pell.d a1) * (pellZd a1 m).im * (pellZd a1 n).im\nim_eq✝ : ↑(yn a1 (m + n)) = (pellZd a1 m).re * (pellZd a1 n).im + (pellZd a1 m).im * (pellZd a1 n).re\n⊢ (pellZd a1 m).re * (pellZd a1 n).re + ↑(Pell.d a1) * (pellZd a1 m).im * (pellZd a1 n).im =\n    ↑(xn a1 m) * ↑(xn a1 n) + ↑(Pell.d a1) * ↑(yn a1 m) * ↑(yn a1 n)\n[PROOFSTEP]\nsimp [pellZd]\n[GOAL]\na : ℕ\na1 : 1 < a\nm n : ℕ\n⊢ yn a1 (m + n) = xn a1 m * yn a1 n + yn a1 m * xn a1 n\n[PROOFSTEP]\ninjection pellZd_add a1 m n with _ h\n[GOAL]\na : ℕ\na1 : 1 < a\nm n : ℕ\nre_eq✝ : ↑(xn a1 (m + n)) = (pellZd a1 m).re * (pellZd a1 n).re + ↑(Pell.d a1) * (pellZd a1 m).im * (pellZd a1 n).im\nh : ↑(yn a1 (m + n)) = (pellZd a1 m).re * (pellZd a1 n).im + (pellZd a1 m).im * (pellZd a1 n).re\n⊢ yn a1 (m + n) = xn a1 m * yn a1 n + yn a1 m * xn a1 n\n[PROOFSTEP]\nzify\n[GOAL]\na : ℕ\na1 : 1 < a\nm n : ℕ\nre_eq✝ : ↑(xn a1 (m + n)) = (pellZd a1 m).re * (pellZd a1 n).re + ↑(Pell.d a1) * (pellZd a1 m).im * (pellZd a1 n).im\nh : ↑(yn a1 (m + n)) = (pellZd a1 m).re * (pellZd a1 n).im + (pellZd a1 m).im * (pellZd a1 n).re\n⊢ ↑(yn a1 (m + n)) = ↑(xn a1 m) * ↑(yn a1 n) + ↑(yn a1 m) * ↑(xn a1 n)\n[PROOFSTEP]\nrw [h]\n[GOAL]\na : ℕ\na1 : 1 < a\nm n : ℕ\nre_eq✝ : ↑(xn a1 (m + n)) = (pellZd a1 m).re * (pellZd a1 n).re + ↑(Pell.d a1) * (pellZd a1 m).im * (pellZd a1 n).im\nh : ↑(yn a1 (m + n)) = (pellZd a1 m).re * (pellZd a1 n).im + (pellZd a1 m).im * (pellZd a1 n).re\n⊢ (pellZd a1 m).re * (pellZd a1 n).im + (pellZd a1 m).im * (pellZd a1 n).re =\n    ↑(xn a1 m) * ↑(yn a1 n) + ↑(yn a1 m) * ↑(xn a1 n)\n[PROOFSTEP]\nsimp [pellZd]\n[GOAL]\na : ℕ\na1 : 1 < a\nm n : ℕ\nh : n ≤ m\n⊢ pellZd a1 (m - n) = pellZd a1 m * star (pellZd a1 n)\n[PROOFSTEP]\nlet t := pellZd_add a1 n (m - n)\n[GOAL]\na : ℕ\na1 : 1 < a\nm n : ℕ\nh : n ≤ m\nt : pellZd a1 (n + (m - n)) = pellZd a1 n * pellZd a1 (m - n) := pellZd_add a1 n (m - n)\n⊢ pellZd a1 (m - n) = pellZd a1 m * star (pellZd a1 n)\n[PROOFSTEP]\nrw [add_tsub_cancel_of_le h] at t \n[GOAL]\na : ℕ\na1 : 1 < a\nm n : ℕ\nh : n ≤ m\nt : pellZd a1 m = pellZd a1 n * pellZd a1 (m - n)\n⊢ pellZd a1 (m - n) = pellZd a1 m * star (pellZd a1 n)\n[PROOFSTEP]\nrw [t, mul_comm (pellZd _ n) _, mul_assoc, isPell_norm.1 (isPell_pellZd _ _), mul_one]\n[GOAL]\na : ℕ\na1 : 1 < a\nm n : ℕ\nh : n ≤ m\n⊢ xz a1 (m - n) = xz a1 m * xz a1 n - ↑(Pell.d a1) * yz a1 m * yz a1 n\n[PROOFSTEP]\nrw [sub_eq_add_neg, ← mul_neg]\n[GOAL]\na : ℕ\na1 : 1 < a\nm n : ℕ\nh : n ≤ m\n⊢ xz a1 (m - n) = xz a1 m * xz a1 n + ↑(Pell.d a1) * yz a1 m * -yz a1 n\n[PROOFSTEP]\nexact congr_arg Zsqrtd.re (pellZd_sub a1 h)\n[GOAL]\na : ℕ\na1 : 1 < a\nm n : ℕ\nh : n ≤ m\n⊢ yz a1 (m - n) = xz a1 n * yz a1 m - xz a1 m * yz a1 n\n[PROOFSTEP]\nrw [sub_eq_add_neg, ← mul_neg, mul_comm, add_comm]\n[GOAL]\na : ℕ\na1 : 1 < a\nm n : ℕ\nh : n ≤ m\n⊢ yz a1 (m - n) = xz a1 m * -yz a1 n + yz a1 m * xz a1 n\n[PROOFSTEP]\nexact congr_arg Zsqrtd.im (pellZd_sub a1 h)\n[GOAL]\na : ℕ\na1 : 1 < a\nn k : ℕ\nx✝ : Nat.Prime k\nkx : k ∣ xn a1 n\nky : k ∣ yn a1 n\n⊢ k ∣ 1\n[PROOFSTEP]\nlet p := pell_eq a1 n\n[GOAL]\na : ℕ\na1 : 1 < a\nn k : ℕ\nx✝ : Nat.Prime k\nkx : k ∣ xn a1 n\nky : k ∣ yn a1 n\np : xn a1 n * xn a1 n - Pell.d a1 * yn a1 n * yn a1 n = 1 := pell_eq a1 n\n⊢ k ∣ 1\n[PROOFSTEP]\nrw [← p]\n[GOAL]\na : ℕ\na1 : 1 < a\nn k : ℕ\nx✝ : Nat.Prime k\nkx : k ∣ xn a1 n\nky : k ∣ yn a1 n\np : xn a1 n * xn a1 n - Pell.d a1 * yn a1 n * yn a1 n = 1 := pell_eq a1 n\n⊢ k ∣ xn a1 n * xn a1 n - Pell.d a1 * yn a1 n * yn a1 n\n[PROOFSTEP]\nexact Nat.dvd_sub (le_of_lt <| Nat.lt_of_sub_eq_succ p) (kx.mul_left _) (ky.mul_left _)\n[GOAL]\na : ℕ\na1 : 1 < a\nm n : ℕ\nh : m < n + 1\n⊢ yn a1 m < yn a1 (n + 1)\n[PROOFSTEP]\nhave : yn a1 m ≤ yn a1 n :=\n  Or.elim (lt_or_eq_of_le <| Nat.le_of_succ_le_succ h) (fun hl => le_of_lt <| strictMono_y hl) fun e => by rw [e]\n[GOAL]\na : ℕ\na1 : 1 < a\nm n : ℕ\nh : m < n + 1\ne : m = n\n⊢ yn a1 m ≤ yn a1 n\n[PROOFSTEP]\nrw [e]\n[GOAL]\na : ℕ\na1 : 1 < a\nm n : ℕ\nh : m < n + 1\nthis : yn a1 m ≤ yn a1 n\n⊢ yn a1 m < yn a1 (n + 1)\n[PROOFSTEP]\nsimp\n[GOAL]\na : ℕ\na1 : 1 < a\nm n : ℕ\nh : m < n + 1\nthis : yn a1 m ≤ yn a1 n\n⊢ yn a1 m < xn a1 n + yn a1 n * a\n[PROOFSTEP]\nrefine' lt_of_le_of_lt _ (Nat.lt_add_of_pos_left <| x_pos a1 n)\n[GOAL]\na : ℕ\na1 : 1 < a\nm n : ℕ\nh : m < n + 1\nthis : yn a1 m ≤ yn a1 n\n⊢ yn a1 m ≤ yn a1 n * a\n[PROOFSTEP]\nrw [← mul_one (yn a1 m)]\n[GOAL]\na : ℕ\na1 : 1 < a\nm n : ℕ\nh : m < n + 1\nthis : yn a1 m ≤ yn a1 n\n⊢ yn a1 m * 1 ≤ yn a1 n * a\n[PROOFSTEP]\nexact mul_le_mul this (le_of_lt a1) (Nat.zero_le _) (Nat.zero_le _)\n[GOAL]\na : ℕ\na1 : 1 < a\nm n : ℕ\nh : m < n + 1\n⊢ xn a1 m < xn a1 (n + 1)\n[PROOFSTEP]\nhave : xn a1 m ≤ xn a1 n :=\n  Or.elim (lt_or_eq_of_le <| Nat.le_of_succ_le_succ h) (fun hl => le_of_lt <| strictMono_x hl) fun e => by rw [e]\n[GOAL]\na : ℕ\na1 : 1 < a\nm n : ℕ\nh : m < n + 1\ne : m = n\n⊢ xn a1 m ≤ xn a1 n\n[PROOFSTEP]\nrw [e]\n[GOAL]\na : ℕ\na1 : 1 < a\nm n : ℕ\nh : m < n + 1\nthis : xn a1 m ≤ xn a1 n\n⊢ xn a1 m < xn a1 (n + 1)\n[PROOFSTEP]\nsimp\n[GOAL]\na : ℕ\na1 : 1 < a\nm n : ℕ\nh : m < n + 1\nthis : xn a1 m ≤ xn a1 n\n⊢ xn a1 m < xn a1 n * a + Pell.d a1 * yn a1 n\n[PROOFSTEP]\nrefine' lt_of_lt_of_le (lt_of_le_of_lt this _) (Nat.le_add_right _ _)\n[GOAL]\na : ℕ\na1 : 1 < a\nm n : ℕ\nh : m < n + 1\nthis : xn a1 m ≤ xn a1 n\n⊢ xn a1 n < xn a1 n * a\n[PROOFSTEP]\nhave t := Nat.mul_lt_mul_of_pos_left a1 (x_pos a1 n)\n[GOAL]\na : ℕ\na1 : 1 < a\nm n : ℕ\nh : m < n + 1\nthis : xn a1 m ≤ xn a1 n\nt : xn a1 n * 1 < xn a1 n * a\n⊢ xn a1 n < xn a1 n * a\n[PROOFSTEP]\nrwa [mul_one] at t \n[GOAL]\na : ℕ\na1 : 1 < a\nn k : ℕ\n⊢ yn a1 n ∣ yn a1 (n * (k + 1))\n[PROOFSTEP]\nrw [Nat.mul_succ, yn_add]\n[GOAL]\na : ℕ\na1 : 1 < a\nn k : ℕ\n⊢ yn a1 n ∣ xn a1 (n * k) * yn a1 n + yn a1 (n * k) * xn a1 n\n[PROOFSTEP]\nexact dvd_add (dvd_mul_left _ _) ((y_mul_dvd _ k).mul_right _)\n[GOAL]\na : ℕ\na1 : 1 < a\nm n : ℕ\nh : yn a1 m ∣ yn a1 n\nhp : n % m > 0\n⊢ False\n[PROOFSTEP]\nhave co : Nat.coprime (yn a1 m) (xn a1 (m * (n / m))) :=\n  Nat.coprime.symm <| (xy_coprime a1 _).coprime_dvd_right (y_mul_dvd a1 m (n / m))\n[GOAL]\na : ℕ\na1 : 1 < a\nm n : ℕ\nh : yn a1 m ∣ yn a1 n\nhp : n % m > 0\nco : coprime (yn a1 m) (xn a1 (m * (n / m)))\n⊢ False\n[PROOFSTEP]\nhave m0 : 0 < m :=\n  m.eq_zero_or_pos.resolve_left fun e => by\n    rw [e, Nat.mod_zero] at hp ; rw [e] at h \n    exact _root_.ne_of_lt (strictMono_y a1 hp) (eq_zero_of_zero_dvd h).symm\n[GOAL]\na : ℕ\na1 : 1 < a\nm n : ℕ\nh : yn a1 m ∣ yn a1 n\nhp : n % m > 0\nco : coprime (yn a1 m) (xn a1 (m * (n / m)))\ne : m = 0\n⊢ False\n[PROOFSTEP]\nrw [e, Nat.mod_zero] at hp \n[GOAL]\na : ℕ\na1 : 1 < a\nm n : ℕ\nh : yn a1 m ∣ yn a1 n\nhp : n > 0\nco : coprime (yn a1 m) (xn a1 (m * (n / m)))\ne : m = 0\n⊢ False\n[PROOFSTEP]\nrw [e] at h \n[GOAL]\na : ℕ\na1 : 1 < a\nm n : ℕ\nh : yn a1 0 ∣ yn a1 n\nhp : n > 0\nco : coprime (yn a1 m) (xn a1 (m * (n / m)))\ne : m = 0\n⊢ False\n[PROOFSTEP]\nexact _root_.ne_of_lt (strictMono_y a1 hp) (eq_zero_of_zero_dvd h).symm\n[GOAL]\na : ℕ\na1 : 1 < a\nm n : ℕ\nh : yn a1 m ∣ yn a1 n\nhp : n % m > 0\nco : coprime (yn a1 m) (xn a1 (m * (n / m)))\nm0 : 0 < m\n⊢ False\n[PROOFSTEP]\nrw [← Nat.mod_add_div n m, yn_add] at h \n[GOAL]\na : ℕ\na1 : 1 < a\nm n : ℕ\nh : yn a1 m ∣ xn a1 (n % m) * yn a1 (m * (n / m)) + yn a1 (n % m) * xn a1 (m * (n / m))\nhp : n % m > 0\nco : coprime (yn a1 m) (xn a1 (m * (n / m)))\nm0 : 0 < m\n⊢ False\n[PROOFSTEP]\nexact\n  not_le_of_gt (strictMono_y _ <| Nat.mod_lt n m0)\n    (Nat.le_of_dvd (strictMono_y _ hp) <|\n      co.dvd_of_dvd_mul_right <| (Nat.dvd_add_iff_right <| (y_mul_dvd _ _ _).mul_left _).2 h)\n[GOAL]\na : ℕ\na1 : 1 < a\nm n : ℕ\nx✝ : m ∣ n\nk : ℕ\ne : n = m * k\n⊢ yn a1 m ∣ yn a1 n\n[PROOFSTEP]\nrw [e]\n[GOAL]\na : ℕ\na1 : 1 < a\nm n : ℕ\nx✝ : m ∣ n\nk : ℕ\ne : n = m * k\n⊢ yn a1 m ∣ yn a1 (m * k)\n[PROOFSTEP]\napply y_mul_dvd\n[GOAL]\na : ℕ\na1 : 1 < a\nn : ℕ\n⊢ xn a1 (n * 0) ≡ xn a1 n ^ 0 [MOD yn a1 n ^ 2] ∧ yn a1 (n * 0) ≡ 0 * xn a1 n ^ (0 - 1) * yn a1 n [MOD yn a1 n ^ 3]\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase left\na : ℕ\na1 : 1 < a\nn : ℕ\n⊢ xn a1 (n * 0) ≡ xn a1 n ^ 0 [MOD yn a1 n ^ 2]\n[PROOFSTEP]\nsimp\n[GOAL]\ncase right\na : ℕ\na1 : 1 < a\nn : ℕ\n⊢ yn a1 (n * 0) ≡ 0 * xn a1 n ^ (0 - 1) * yn a1 n [MOD yn a1 n ^ 3]\n[PROOFSTEP]\nsimp\n[GOAL]\ncase left\na : ℕ\na1 : 1 < a\nn : ℕ\n⊢ 1 ≡ 1 [MOD yn a1 n ^ 2]\n[PROOFSTEP]\nexact Nat.ModEq.refl _\n[GOAL]\ncase right\na : ℕ\na1 : 1 < a\nn : ℕ\n⊢ 0 ≡ 0 [MOD yn a1 n ^ 3]\n[PROOFSTEP]\nexact Nat.ModEq.refl _\n[GOAL]\na : ℕ\na1 : 1 < a\nn k : ℕ\n⊢ xn a1 (n * (k + 1)) ≡ xn a1 n ^ (k + 1) [MOD yn a1 n ^ 2] ∧\n    yn a1 (n * (k + 1)) ≡ (k + 1) * xn a1 n ^ (k + 1 - 1) * yn a1 n [MOD yn a1 n ^ 3]\n[PROOFSTEP]\nlet ⟨hx, hy⟩ := xy_modEq_yn n k\n[GOAL]\na : ℕ\na1 : 1 < a\nn k : ℕ\nhx : xn a1 (n * k) ≡ xn a1 n ^ k [MOD yn a1 n ^ 2]\nhy : yn a1 (n * k) ≡ k * xn a1 n ^ (k - 1) * yn a1 n [MOD yn a1 n ^ 3]\n⊢ xn a1 (n * (k + 1)) ≡ xn a1 n ^ (k + 1) [MOD yn a1 n ^ 2] ∧\n    yn a1 (n * (k + 1)) ≡ (k + 1) * xn a1 n ^ (k + 1 - 1) * yn a1 n [MOD yn a1 n ^ 3]\n[PROOFSTEP]\nhave L : xn a1 (n * k) * xn a1 n + d a1 * yn a1 (n * k) * yn a1 n ≡ xn a1 n ^ k * xn a1 n + 0 [MOD yn a1 n ^ 2] :=\n  (hx.mul_right _).add <|\n    modEq_zero_iff_dvd.2 <| by\n      rw [_root_.pow_succ']\n      exact\n        mul_dvd_mul_right\n          (dvd_mul_of_dvd_right\n            (modEq_zero_iff_dvd.1 <| (hy.of_dvd <| by simp [_root_.pow_succ']).trans <| modEq_zero_iff_dvd.2 <| by simp)\n            _)\n          _\n[GOAL]\na : ℕ\na1 : 1 < a\nn k : ℕ\nhx : xn a1 (n * k) ≡ xn a1 n ^ k [MOD yn a1 n ^ 2]\nhy : yn a1 (n * k) ≡ k * xn a1 n ^ (k - 1) * yn a1 n [MOD yn a1 n ^ 3]\n⊢ yn a1 n ^ 2 ∣ Pell.d a1 * yn a1 (n * k) * yn a1 n\n[PROOFSTEP]\nrw [_root_.pow_succ']\n[GOAL]\na : ℕ\na1 : 1 < a\nn k : ℕ\nhx : xn a1 (n * k) ≡ xn a1 n ^ k [MOD yn a1 n ^ 2]\nhy : yn a1 (n * k) ≡ k * xn a1 n ^ (k - 1) * yn a1 n [MOD yn a1 n ^ 3]\n⊢ yn a1 n ^ 1 * yn a1 n ∣ Pell.d a1 * yn a1 (n * k) * yn a1 n\n[PROOFSTEP]\nexact\n  mul_dvd_mul_right\n    (dvd_mul_of_dvd_right\n      (modEq_zero_iff_dvd.1 <| (hy.of_dvd <| by simp [_root_.pow_succ']).trans <| modEq_zero_iff_dvd.2 <| by simp) _)\n    _\n[GOAL]\na : ℕ\na1 : 1 < a\nn k : ℕ\nhx : xn a1 (n * k) ≡ xn a1 n ^ k [MOD yn a1 n ^ 2]\nhy : yn a1 (n * k) ≡ k * xn a1 n ^ (k - 1) * yn a1 n [MOD yn a1 n ^ 3]\n⊢ yn a1 n ^ 1 ∣ yn a1 n ^ 3\n[PROOFSTEP]\nsimp [_root_.pow_succ']\n[GOAL]\na : ℕ\na1 : 1 < a\nn k : ℕ\nhx : xn a1 (n * k) ≡ xn a1 n ^ k [MOD yn a1 n ^ 2]\nhy : yn a1 (n * k) ≡ k * xn a1 n ^ (k - 1) * yn a1 n [MOD yn a1 n ^ 3]\n⊢ yn a1 n ^ 1 ∣ k * xn a1 n ^ (k - 1) * yn a1 n\n[PROOFSTEP]\nsimp\n[GOAL]\na : ℕ\na1 : 1 < a\nn k : ℕ\nhx : xn a1 (n * k) ≡ xn a1 n ^ k [MOD yn a1 n ^ 2]\nhy : yn a1 (n * k) ≡ k * xn a1 n ^ (k - 1) * yn a1 n [MOD yn a1 n ^ 3]\nL : xn a1 (n * k) * xn a1 n + Pell.d a1 * yn a1 (n * k) * yn a1 n ≡ xn a1 n ^ k * xn a1 n + 0 [MOD yn a1 n ^ 2]\n⊢ xn a1 (n * (k + 1)) ≡ xn a1 n ^ (k + 1) [MOD yn a1 n ^ 2] ∧\n    yn a1 (n * (k + 1)) ≡ (k + 1) * xn a1 n ^ (k + 1 - 1) * yn a1 n [MOD yn a1 n ^ 3]\n[PROOFSTEP]\nhave R :\n  xn a1 (n * k) * yn a1 n + yn a1 (n * k) * xn a1 n ≡ xn a1 n ^ k * yn a1 n + k * xn a1 n ^ k * yn a1 n [MOD\n    yn a1 n ^ 3] :=\n  ModEq.add\n      (by\n        rw [_root_.pow_succ']\n        exact hx.mul_right' _) <|\n    by\n    have : k * xn a1 n ^ (k - 1) * yn a1 n * xn a1 n = k * xn a1 n ^ k * yn a1 n := by\n      cases' k with k <;> simp [_root_.pow_succ']; ring_nf\n    rw [← this]\n    exact hy.mul_right _\n[GOAL]\na : ℕ\na1 : 1 < a\nn k : ℕ\nhx : xn a1 (n * k) ≡ xn a1 n ^ k [MOD yn a1 n ^ 2]\nhy : yn a1 (n * k) ≡ k * xn a1 n ^ (k - 1) * yn a1 n [MOD yn a1 n ^ 3]\nL : xn a1 (n * k) * xn a1 n + Pell.d a1 * yn a1 (n * k) * yn a1 n ≡ xn a1 n ^ k * xn a1 n + 0 [MOD yn a1 n ^ 2]\n⊢ xn a1 (n * k) * yn a1 n ≡ xn a1 n ^ k * yn a1 n [MOD yn a1 n ^ 3]\n[PROOFSTEP]\nrw [_root_.pow_succ']\n[GOAL]\na : ℕ\na1 : 1 < a\nn k : ℕ\nhx : xn a1 (n * k) ≡ xn a1 n ^ k [MOD yn a1 n ^ 2]\nhy : yn a1 (n * k) ≡ k * xn a1 n ^ (k - 1) * yn a1 n [MOD yn a1 n ^ 3]\nL : xn a1 (n * k) * xn a1 n + Pell.d a1 * yn a1 (n * k) * yn a1 n ≡ xn a1 n ^ k * xn a1 n + 0 [MOD yn a1 n ^ 2]\n⊢ xn a1 (n * k) * yn a1 n ≡ xn a1 n ^ k * yn a1 n [MOD yn a1 n ^ 2 * yn a1 n]\n[PROOFSTEP]\nexact hx.mul_right' _\n[GOAL]\na : ℕ\na1 : 1 < a\nn k : ℕ\nhx : xn a1 (n * k) ≡ xn a1 n ^ k [MOD yn a1 n ^ 2]\nhy : yn a1 (n * k) ≡ k * xn a1 n ^ (k - 1) * yn a1 n [MOD yn a1 n ^ 3]\nL : xn a1 (n * k) * xn a1 n + Pell.d a1 * yn a1 (n * k) * yn a1 n ≡ xn a1 n ^ k * xn a1 n + 0 [MOD yn a1 n ^ 2]\n⊢ yn a1 (n * k) * xn a1 n ≡ k * xn a1 n ^ k * yn a1 n [MOD yn a1 n ^ 3]\n[PROOFSTEP]\nhave : k * xn a1 n ^ (k - 1) * yn a1 n * xn a1 n = k * xn a1 n ^ k * yn a1 n := by\n  cases' k with k <;> simp [_root_.pow_succ']; ring_nf\n[GOAL]\na : ℕ\na1 : 1 < a\nn k : ℕ\nhx : xn a1 (n * k) ≡ xn a1 n ^ k [MOD yn a1 n ^ 2]\nhy : yn a1 (n * k) ≡ k * xn a1 n ^ (k - 1) * yn a1 n [MOD yn a1 n ^ 3]\nL : xn a1 (n * k) * xn a1 n + Pell.d a1 * yn a1 (n * k) * yn a1 n ≡ xn a1 n ^ k * xn a1 n + 0 [MOD yn a1 n ^ 2]\n⊢ k * xn a1 n ^ (k - 1) * yn a1 n * xn a1 n = k * xn a1 n ^ k * yn a1 n\n[PROOFSTEP]\ncases' k with k\n[GOAL]\ncase zero\na : ℕ\na1 : 1 < a\nn : ℕ\nhx : xn a1 (n * zero) ≡ xn a1 n ^ zero [MOD yn a1 n ^ 2]\nhy : yn a1 (n * zero) ≡ zero * xn a1 n ^ (zero - 1) * yn a1 n [MOD yn a1 n ^ 3]\nL : xn a1 (n * zero) * xn a1 n + Pell.d a1 * yn a1 (n * zero) * yn a1 n ≡ xn a1 n ^ zero * xn a1 n + 0 [MOD yn a1 n ^ 2]\n⊢ zero * xn a1 n ^ (zero - 1) * yn a1 n * xn a1 n = zero * xn a1 n ^ zero * yn a1 n\n[PROOFSTEP]\nsimp [_root_.pow_succ']\n[GOAL]\ncase succ\na : ℕ\na1 : 1 < a\nn k : ℕ\nhx : xn a1 (n * succ k) ≡ xn a1 n ^ succ k [MOD yn a1 n ^ 2]\nhy : yn a1 (n * succ k) ≡ succ k * xn a1 n ^ (succ k - 1) * yn a1 n [MOD yn a1 n ^ 3]\nL :\n  xn a1 (n * succ k) * xn a1 n + Pell.d a1 * yn a1 (n * succ k) * yn a1 n ≡ xn a1 n ^ succ k * xn a1 n + 0 [MOD\n    yn a1 n ^ 2]\n⊢ succ k * xn a1 n ^ (succ k - 1) * yn a1 n * xn a1 n = succ k * xn a1 n ^ succ k * yn a1 n\n[PROOFSTEP]\nsimp [_root_.pow_succ']\n[GOAL]\ncase succ\na : ℕ\na1 : 1 < a\nn k : ℕ\nhx : xn a1 (n * succ k) ≡ xn a1 n ^ succ k [MOD yn a1 n ^ 2]\nhy : yn a1 (n * succ k) ≡ succ k * xn a1 n ^ (succ k - 1) * yn a1 n [MOD yn a1 n ^ 3]\nL :\n  xn a1 (n * succ k) * xn a1 n + Pell.d a1 * yn a1 (n * succ k) * yn a1 n ≡ xn a1 n ^ succ k * xn a1 n + 0 [MOD\n    yn a1 n ^ 2]\n⊢ succ k * xn a1 n ^ k * yn a1 n * xn a1 n = succ k * (xn a1 n ^ k * xn a1 n) * yn a1 n\n[PROOFSTEP]\nring_nf\n[GOAL]\na : ℕ\na1 : 1 < a\nn k : ℕ\nhx : xn a1 (n * k) ≡ xn a1 n ^ k [MOD yn a1 n ^ 2]\nhy : yn a1 (n * k) ≡ k * xn a1 n ^ (k - 1) * yn a1 n [MOD yn a1 n ^ 3]\nL : xn a1 (n * k) * xn a1 n + Pell.d a1 * yn a1 (n * k) * yn a1 n ≡ xn a1 n ^ k * xn a1 n + 0 [MOD yn a1 n ^ 2]\nthis : k * xn a1 n ^ (k - 1) * yn a1 n * xn a1 n = k * xn a1 n ^ k * yn a1 n\n⊢ yn a1 (n * k) * xn a1 n ≡ k * xn a1 n ^ k * yn a1 n [MOD yn a1 n ^ 3]\n[PROOFSTEP]\nrw [← this]\n[GOAL]\na : ℕ\na1 : 1 < a\nn k : ℕ\nhx : xn a1 (n * k) ≡ xn a1 n ^ k [MOD yn a1 n ^ 2]\nhy : yn a1 (n * k) ≡ k * xn a1 n ^ (k - 1) * yn a1 n [MOD yn a1 n ^ 3]\nL : xn a1 (n * k) * xn a1 n + Pell.d a1 * yn a1 (n * k) * yn a1 n ≡ xn a1 n ^ k * xn a1 n + 0 [MOD yn a1 n ^ 2]\nthis : k * xn a1 n ^ (k - 1) * yn a1 n * xn a1 n = k * xn a1 n ^ k * yn a1 n\n⊢ yn a1 (n * k) * xn a1 n ≡ k * xn a1 n ^ (k - 1) * yn a1 n * xn a1 n [MOD yn a1 n ^ 3]\n[PROOFSTEP]\nexact hy.mul_right _\n[GOAL]\na : ℕ\na1 : 1 < a\nn k : ℕ\nhx : xn a1 (n * k) ≡ xn a1 n ^ k [MOD yn a1 n ^ 2]\nhy : yn a1 (n * k) ≡ k * xn a1 n ^ (k - 1) * yn a1 n [MOD yn a1 n ^ 3]\nL : xn a1 (n * k) * xn a1 n + Pell.d a1 * yn a1 (n * k) * yn a1 n ≡ xn a1 n ^ k * xn a1 n + 0 [MOD yn a1 n ^ 2]\nR :\n  xn a1 (n * k) * yn a1 n + yn a1 (n * k) * xn a1 n ≡ xn a1 n ^ k * yn a1 n + k * xn a1 n ^ k * yn a1 n [MOD\n    yn a1 n ^ 3]\n⊢ xn a1 (n * (k + 1)) ≡ xn a1 n ^ (k + 1) [MOD yn a1 n ^ 2] ∧\n    yn a1 (n * (k + 1)) ≡ (k + 1) * xn a1 n ^ (k + 1 - 1) * yn a1 n [MOD yn a1 n ^ 3]\n[PROOFSTEP]\nrw [add_tsub_cancel_right, Nat.mul_succ, xn_add, yn_add, pow_succ' (xn _ n), Nat.succ_mul,\n  add_comm (k * xn _ n ^ k) (xn _ n ^ k), right_distrib]\n[GOAL]\na : ℕ\na1 : 1 < a\nn k : ℕ\nhx : xn a1 (n * k) ≡ xn a1 n ^ k [MOD yn a1 n ^ 2]\nhy : yn a1 (n * k) ≡ k * xn a1 n ^ (k - 1) * yn a1 n [MOD yn a1 n ^ 3]\nL : xn a1 (n * k) * xn a1 n + Pell.d a1 * yn a1 (n * k) * yn a1 n ≡ xn a1 n ^ k * xn a1 n + 0 [MOD yn a1 n ^ 2]\nR :\n  xn a1 (n * k) * yn a1 n + yn a1 (n * k) * xn a1 n ≡ xn a1 n ^ k * yn a1 n + k * xn a1 n ^ k * yn a1 n [MOD\n    yn a1 n ^ 3]\n⊢ xn a1 (n * k) * xn a1 n + Pell.d a1 * yn a1 (n * k) * yn a1 n ≡ xn a1 n ^ k * xn a1 n [MOD yn a1 n ^ 2] ∧\n    xn a1 (n * k) * yn a1 n + yn a1 (n * k) * xn a1 n ≡ xn a1 n ^ k * yn a1 n + k * xn a1 n ^ k * yn a1 n [MOD\n      yn a1 n ^ 3]\n[PROOFSTEP]\nexact ⟨L, R⟩\n[GOAL]\na : ℕ\na1 : 1 < a\nn : ℕ\n⊢ yn a1 n * yn a1 n ∣ yn a1 n ^ 3\n[PROOFSTEP]\nsimp [_root_.pow_succ]\n[GOAL]\na : ℕ\na1 : 1 < a\nn : ℕ\n⊢ yn a1 n * yn a1 n ∣ yn a1 n * xn a1 n ^ (yn a1 n - 1) * yn a1 n\n[PROOFSTEP]\nsimp [mul_dvd_mul_left, mul_assoc]\n[GOAL]\na : ℕ\na1 : 1 < a\nn t : ℕ\nh : yn a1 n * yn a1 n ∣ yn a1 t\nnt : n ∣ t\nn0 : n = 0\n⊢ yn a1 n ∣ t\n[PROOFSTEP]\nrwa [n0] at nt ⊢\n[GOAL]\na : ℕ\na1 : 1 < a\nn t : ℕ\nh : yn a1 n * yn a1 n ∣ yn a1 t\nnt : n ∣ t\nn0l : 0 < n\n⊢ yn a1 n ∣ t\n[PROOFSTEP]\nlet ⟨k, ke⟩ := nt\n[GOAL]\na : ℕ\na1 : 1 < a\nn t : ℕ\nh : yn a1 n * yn a1 n ∣ yn a1 t\nnt : n ∣ t\nn0l : 0 < n\nk : ℕ\nke : t = n * k\n⊢ yn a1 n ∣ t\n[PROOFSTEP]\nhave : yn a1 n ∣ k * xn a1 n ^ (k - 1) :=\n  Nat.dvd_of_mul_dvd_mul_right (strictMono_y a1 n0l) <|\n    modEq_zero_iff_dvd.1 <| by\n      have xm := (xy_modEq_yn a1 n k).right; rw [← ke] at xm \n      exact (xm.of_dvd <| by simp [_root_.pow_succ]).symm.trans h.modEq_zero_nat\n[GOAL]\na : ℕ\na1 : 1 < a\nn t : ℕ\nh : yn a1 n * yn a1 n ∣ yn a1 t\nnt : n ∣ t\nn0l : 0 < n\nk : ℕ\nke : t = n * k\n⊢ k * xn a1 n ^ (k - 1) * yn a1 n ≡ 0 [MOD yn a1 n * yn a1 n]\n[PROOFSTEP]\nhave xm := (xy_modEq_yn a1 n k).right\n[GOAL]\na : ℕ\na1 : 1 < a\nn t : ℕ\nh : yn a1 n * yn a1 n ∣ yn a1 t\nnt : n ∣ t\nn0l : 0 < n\nk : ℕ\nke : t = n * k\nxm : yn a1 (n * k) ≡ k * xn a1 n ^ (k - 1) * yn a1 n [MOD yn a1 n ^ 3]\n⊢ k * xn a1 n ^ (k - 1) * yn a1 n ≡ 0 [MOD yn a1 n * yn a1 n]\n[PROOFSTEP]\nrw [← ke] at xm \n[GOAL]\na : ℕ\na1 : 1 < a\nn t : ℕ\nh : yn a1 n * yn a1 n ∣ yn a1 t\nnt : n ∣ t\nn0l : 0 < n\nk : ℕ\nke : t = n * k\nxm : yn a1 t ≡ k * xn a1 n ^ (k - 1) * yn a1 n [MOD yn a1 n ^ 3]\n⊢ k * xn a1 n ^ (k - 1) * yn a1 n ≡ 0 [MOD yn a1 n * yn a1 n]\n[PROOFSTEP]\nexact (xm.of_dvd <| by simp [_root_.pow_succ]).symm.trans h.modEq_zero_nat\n[GOAL]\na : ℕ\na1 : 1 < a\nn t : ℕ\nh : yn a1 n * yn a1 n ∣ yn a1 t\nnt : n ∣ t\nn0l : 0 < n\nk : ℕ\nke : t = n * k\nxm : yn a1 t ≡ k * xn a1 n ^ (k - 1) * yn a1 n [MOD yn a1 n ^ 3]\n⊢ yn a1 n * yn a1 n ∣ yn a1 n ^ 3\n[PROOFSTEP]\nsimp [_root_.pow_succ]\n[GOAL]\na : ℕ\na1 : 1 < a\nn t : ℕ\nh : yn a1 n * yn a1 n ∣ yn a1 t\nnt : n ∣ t\nn0l : 0 < n\nk : ℕ\nke : t = n * k\nthis : yn a1 n ∣ k * xn a1 n ^ (k - 1)\n⊢ yn a1 n ∣ t\n[PROOFSTEP]\nrw [ke]\n[GOAL]\na : ℕ\na1 : 1 < a\nn t : ℕ\nh : yn a1 n * yn a1 n ∣ yn a1 t\nnt : n ∣ t\nn0l : 0 < n\nk : ℕ\nke : t = n * k\nthis : yn a1 n ∣ k * xn a1 n ^ (k - 1)\n⊢ yn a1 n ∣ n * k\n[PROOFSTEP]\nexact dvd_mul_of_dvd_right (((xy_coprime _ _).pow_left _).symm.dvd_of_dvd_mul_right this) _\n[GOAL]\na : ℕ\na1 : 1 < a\nn : ℕ\n⊢ pellZd a1 (n + 2) + pellZd a1 n = ↑(2 * a) * pellZd a1 (n + 1)\n[PROOFSTEP]\nhave : (1 : ℤ√(d a1)) + ⟨a, 1⟩ * ⟨a, 1⟩ = ⟨a, 1⟩ * (2 * a) :=\n  by\n  rw [Zsqrtd.coe_nat_val]\n  change (⟨_, _⟩ : ℤ√(d a1)) = ⟨_, _⟩\n  rw [dz_val]\n  dsimp [az]\n  rw [Zsqrtd.ext]\n  dsimp\n  constructor <;> ring_nf\n[GOAL]\na : ℕ\na1 : 1 < a\nn : ℕ\n⊢ 1 + { re := ↑a, im := 1 } * { re := ↑a, im := 1 } = { re := ↑a, im := 1 } * (2 * ↑a)\n[PROOFSTEP]\nrw [Zsqrtd.coe_nat_val]\n[GOAL]\na : ℕ\na1 : 1 < a\nn : ℕ\n⊢ 1 + { re := ↑a, im := 1 } * { re := ↑a, im := 1 } = { re := ↑a, im := 1 } * (2 * { re := ↑a, im := 0 })\n[PROOFSTEP]\nchange (⟨_, _⟩ : ℤ√(d a1)) = ⟨_, _⟩\n[GOAL]\na : ℕ\na1 : 1 < a\nn : ℕ\n⊢ { re := 1.re + ({ re := ↑a, im := 1 } * { re := ↑a, im := 1 }).re,\n      im := 1.im + ({ re := ↑a, im := 1 } * { re := ↑a, im := 1 }).im } =\n    {\n      re :=\n        { re := ↑a, im := 1 }.re * (2 * { re := ↑a, im := 0 }).re +\n          ↑(Pell.d a1) * { re := ↑a, im := 1 }.im * (2 * { re := ↑a, im := 0 }).im,\n      im :=\n        { re := ↑a, im := 1 }.re * (2 * { re := ↑a, im := 0 }).im +\n          { re := ↑a, im := 1 }.im * (2 * { re := ↑a, im := 0 }).re }\n[PROOFSTEP]\nrw [dz_val]\n[GOAL]\na : ℕ\na1 : 1 < a\nn : ℕ\n⊢ { re := 1.re + ({ re := ↑a, im := 1 } * { re := ↑a, im := 1 }).re,\n      im := 1.im + ({ re := ↑a, im := 1 } * { re := ↑a, im := 1 }).im } =\n    {\n      re :=\n        { re := ↑a, im := 1 }.re * (2 * { re := ↑a, im := 0 }).re +\n          (az a * az a - 1) * { re := ↑a, im := 1 }.im * (2 * { re := ↑a, im := 0 }).im,\n      im :=\n        { re := ↑a, im := 1 }.re * (2 * { re := ↑a, im := 0 }).im +\n          { re := ↑a, im := 1 }.im * (2 * { re := ↑a, im := 0 }).re }\n[PROOFSTEP]\ndsimp [az]\n[GOAL]\na : ℕ\na1 : 1 < a\nn : ℕ\n⊢ { re := 1 + (↑a * ↑a + (↑a * ↑a - 1) * 1 * 1), im := 0 + (↑a * 1 + 1 * ↑a) } =\n    { re := ↑a * (↑2 * ↑a + (↑a * ↑a - 1) * 0 * 0) + (↑a * ↑a - 1) * 1 * (↑2 * 0 + 0 * ↑a),\n      im := ↑a * (↑2 * 0 + 0 * ↑a) + 1 * (↑2 * ↑a + (↑a * ↑a - 1) * 0 * 0) }\n[PROOFSTEP]\nrw [Zsqrtd.ext]\n[GOAL]\na : ℕ\na1 : 1 < a\nn : ℕ\n⊢ { re := 1 + (↑a * ↑a + (↑a * ↑a - 1) * 1 * 1), im := 0 + (↑a * 1 + 1 * ↑a) }.re =\n      { re := ↑a * (↑2 * ↑a + (↑a * ↑a - 1) * 0 * 0) + (↑a * ↑a - 1) * 1 * (↑2 * 0 + 0 * ↑a),\n          im := ↑a * (↑2 * 0 + 0 * ↑a) + 1 * (↑2 * ↑a + (↑a * ↑a - 1) * 0 * 0) }.re ∧\n    { re := 1 + (↑a * ↑a + (↑a * ↑a - 1) * 1 * 1), im := 0 + (↑a * 1 + 1 * ↑a) }.im =\n      { re := ↑a * (↑2 * ↑a + (↑a * ↑a - 1) * 0 * 0) + (↑a * ↑a - 1) * 1 * (↑2 * 0 + 0 * ↑a),\n          im := ↑a * (↑2 * 0 + 0 * ↑a) + 1 * (↑2 * ↑a + (↑a * ↑a - 1) * 0 * 0) }.im\n[PROOFSTEP]\ndsimp\n[GOAL]\na : ℕ\na1 : 1 < a\nn : ℕ\n⊢ 1 + (↑a * ↑a + (↑a * ↑a - 1) * 1 * 1) =\n      ↑a * (↑2 * ↑a + (↑a * ↑a - 1) * 0 * 0) + (↑a * ↑a - 1) * 1 * (↑2 * 0 + 0 * ↑a) ∧\n    0 + (↑a * 1 + 1 * ↑a) = ↑a * (↑2 * 0 + 0 * ↑a) + 1 * (↑2 * ↑a + (↑a * ↑a - 1) * 0 * 0)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase left\na : ℕ\na1 : 1 < a\nn : ℕ\n⊢ 1 + (↑a * ↑a + (↑a * ↑a - 1) * 1 * 1) = ↑a * (↑2 * ↑a + (↑a * ↑a - 1) * 0 * 0) + (↑a * ↑a - 1) * 1 * (↑2 * 0 + 0 * ↑a)\n[PROOFSTEP]\nring_nf\n[GOAL]\ncase right\na : ℕ\na1 : 1 < a\nn : ℕ\n⊢ 0 + (↑a * 1 + 1 * ↑a) = ↑a * (↑2 * 0 + 0 * ↑a) + 1 * (↑2 * ↑a + (↑a * ↑a - 1) * 0 * 0)\n[PROOFSTEP]\nring_nf\n[GOAL]\na : ℕ\na1 : 1 < a\nn : ℕ\nthis : 1 + { re := ↑a, im := 1 } * { re := ↑a, im := 1 } = { re := ↑a, im := 1 } * (2 * ↑a)\n⊢ pellZd a1 (n + 2) + pellZd a1 n = ↑(2 * a) * pellZd a1 (n + 1)\n[PROOFSTEP]\nsimpa [mul_add, mul_comm, mul_left_comm, add_comm] using congr_arg (· * pellZd a1 n) this\n[GOAL]\na : ℕ\na1 : 1 < a\nn : ℕ\n⊢ xn a1 (n + 2) + xn a1 n = 2 * a * xn a1 (n + 1) ∧ yn a1 (n + 2) + yn a1 n = 2 * a * yn a1 (n + 1)\n[PROOFSTEP]\nhave := pellZd_succ_succ a1 n\n[GOAL]\na : ℕ\na1 : 1 < a\nn : ℕ\nthis : pellZd a1 (n + 2) + pellZd a1 n = ↑(2 * a) * pellZd a1 (n + 1)\n⊢ xn a1 (n + 2) + xn a1 n = 2 * a * xn a1 (n + 1) ∧ yn a1 (n + 2) + yn a1 n = 2 * a * yn a1 (n + 1)\n[PROOFSTEP]\nunfold pellZd at this \n[GOAL]\na : ℕ\na1 : 1 < a\nn : ℕ\nthis :\n  { re := ↑(xn a1 (n + 2)), im := ↑(yn a1 (n + 2)) } + { re := ↑(xn a1 n), im := ↑(yn a1 n) } =\n    ↑(2 * a) * { re := ↑(xn a1 (n + 1)), im := ↑(yn a1 (n + 1)) }\n⊢ xn a1 (n + 2) + xn a1 n = 2 * a * xn a1 (n + 1) ∧ yn a1 (n + 2) + yn a1 n = 2 * a * yn a1 (n + 1)\n[PROOFSTEP]\nerw [Zsqrtd.smul_val (2 * a : ℕ)] at this \n[GOAL]\na : ℕ\na1 : 1 < a\nn : ℕ\nthis :\n  { re := ↑(xn a1 (n + 2)), im := ↑(yn a1 (n + 2)) } + { re := ↑(xn a1 n), im := ↑(yn a1 n) } =\n    { re := ↑(2 * a) * ↑(xn a1 (n + 1)), im := ↑(2 * a) * ↑(yn a1 (n + 1)) }\n⊢ xn a1 (n + 2) + xn a1 n = 2 * a * xn a1 (n + 1) ∧ yn a1 (n + 2) + yn a1 n = 2 * a * yn a1 (n + 1)\n[PROOFSTEP]\ninjection this with h₁ h₂\n[GOAL]\na : ℕ\na1 : 1 < a\nn : ℕ\nh₁ :\n  { re := ↑(xn a1 (n + 2)), im := ↑(yn a1 (n + 2)) }.re + { re := ↑(xn a1 n), im := ↑(yn a1 n) }.re =\n    ↑(2 * a) * ↑(xn a1 (n + 1))\nh₂ :\n  { re := ↑(xn a1 (n + 2)), im := ↑(yn a1 (n + 2)) }.im + { re := ↑(xn a1 n), im := ↑(yn a1 n) }.im =\n    ↑(2 * a) * ↑(yn a1 (n + 1))\n⊢ xn a1 (n + 2) + xn a1 n = 2 * a * xn a1 (n + 1) ∧ yn a1 (n + 2) + yn a1 n = 2 * a * yn a1 (n + 1)\n[PROOFSTEP]\nconstructor <;> apply Int.ofNat.inj <;> [simpa using h₁; simpa using h₂]\n[GOAL]\na : ℕ\na1 : 1 < a\nn : ℕ\nh₁ :\n  { re := ↑(xn a1 (n + 2)), im := ↑(yn a1 (n + 2)) }.re + { re := ↑(xn a1 n), im := ↑(yn a1 n) }.re =\n    ↑(2 * a) * ↑(xn a1 (n + 1))\nh₂ :\n  { re := ↑(xn a1 (n + 2)), im := ↑(yn a1 (n + 2)) }.im + { re := ↑(xn a1 n), im := ↑(yn a1 n) }.im =\n    ↑(2 * a) * ↑(yn a1 (n + 1))\n⊢ xn a1 (n + 2) + xn a1 n = 2 * a * xn a1 (n + 1) ∧ yn a1 (n + 2) + yn a1 n = 2 * a * yn a1 (n + 1)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase left\na : ℕ\na1 : 1 < a\nn : ℕ\nh₁ :\n  { re := ↑(xn a1 (n + 2)), im := ↑(yn a1 (n + 2)) }.re + { re := ↑(xn a1 n), im := ↑(yn a1 n) }.re =\n    ↑(2 * a) * ↑(xn a1 (n + 1))\nh₂ :\n  { re := ↑(xn a1 (n + 2)), im := ↑(yn a1 (n + 2)) }.im + { re := ↑(xn a1 n), im := ↑(yn a1 n) }.im =\n    ↑(2 * a) * ↑(yn a1 (n + 1))\n⊢ xn a1 (n + 2) + xn a1 n = 2 * a * xn a1 (n + 1)\n[PROOFSTEP]\napply Int.ofNat.inj\n[GOAL]\ncase right\na : ℕ\na1 : 1 < a\nn : ℕ\nh₁ :\n  { re := ↑(xn a1 (n + 2)), im := ↑(yn a1 (n + 2)) }.re + { re := ↑(xn a1 n), im := ↑(yn a1 n) }.re =\n    ↑(2 * a) * ↑(xn a1 (n + 1))\nh₂ :\n  { re := ↑(xn a1 (n + 2)), im := ↑(yn a1 (n + 2)) }.im + { re := ↑(xn a1 n), im := ↑(yn a1 n) }.im =\n    ↑(2 * a) * ↑(yn a1 (n + 1))\n⊢ yn a1 (n + 2) + yn a1 n = 2 * a * yn a1 (n + 1)\n[PROOFSTEP]\napply Int.ofNat.inj\n[GOAL]\ncase left.x\na : ℕ\na1 : 1 < a\nn : ℕ\nh₁ :\n  { re := ↑(xn a1 (n + 2)), im := ↑(yn a1 (n + 2)) }.re + { re := ↑(xn a1 n), im := ↑(yn a1 n) }.re =\n    ↑(2 * a) * ↑(xn a1 (n + 1))\nh₂ :\n  { re := ↑(xn a1 (n + 2)), im := ↑(yn a1 (n + 2)) }.im + { re := ↑(xn a1 n), im := ↑(yn a1 n) }.im =\n    ↑(2 * a) * ↑(yn a1 (n + 1))\n⊢ Int.ofNat (xn a1 (n + 2) + xn a1 n) = Int.ofNat (2 * a * xn a1 (n + 1))\n[PROOFSTEP]\nsimpa using h₁\n[GOAL]\ncase right.x\na : ℕ\na1 : 1 < a\nn : ℕ\nh₁ :\n  { re := ↑(xn a1 (n + 2)), im := ↑(yn a1 (n + 2)) }.re + { re := ↑(xn a1 n), im := ↑(yn a1 n) }.re =\n    ↑(2 * a) * ↑(xn a1 (n + 1))\nh₂ :\n  { re := ↑(xn a1 (n + 2)), im := ↑(yn a1 (n + 2)) }.im + { re := ↑(xn a1 n), im := ↑(yn a1 n) }.im =\n    ↑(2 * a) * ↑(yn a1 (n + 1))\n⊢ Int.ofNat (yn a1 (n + 2) + yn a1 n) = Int.ofNat (2 * a * yn a1 (n + 1))\n[PROOFSTEP]\nsimpa using h₂\n[GOAL]\na : ℕ\na1 : 1 < a\nn : ℕ\n⊢ xz a1 (n + 2) + xz a1 n = ↑(2 * a) * xz a1 (n + 1)\n[PROOFSTEP]\ndelta xz\n[GOAL]\na : ℕ\na1 : 1 < a\nn : ℕ\n⊢ ↑(xn a1 (n + 2)) + ↑(xn a1 n) = ↑(2 * a) * ↑(xn a1 (n + 1))\n[PROOFSTEP]\nrw [← Int.ofNat_add, ← Int.ofNat_mul, xn_succ_succ]\n[GOAL]\na : ℕ\na1 : 1 < a\nn : ℕ\n⊢ yz a1 (n + 2) + yz a1 n = ↑(2 * a) * yz a1 (n + 1)\n[PROOFSTEP]\ndelta yz\n[GOAL]\na : ℕ\na1 : 1 < a\nn : ℕ\n⊢ ↑(yn a1 (n + 2)) + ↑(yn a1 n) = ↑(2 * a) * ↑(yn a1 (n + 1))\n[PROOFSTEP]\nrw [← Int.ofNat_add, ← Int.ofNat_mul, yn_succ_succ]\n[GOAL]\na : ℕ\na1 : 1 < a\n⊢ yn a1 0 ≡ 0 [MOD a - 1]\n[PROOFSTEP]\nsimp [Nat.ModEq.refl]\n[GOAL]\na : ℕ\na1 : 1 < a\n⊢ yn a1 1 ≡ 1 [MOD a - 1]\n[PROOFSTEP]\nsimp [Nat.ModEq.refl]\n[GOAL]\na : ℕ\na1 : 1 < a\nn : ℕ\n⊢ yn a1 (n + 2) + yn a1 n ≡ n + 2 + n [MOD a - 1]\n[PROOFSTEP]\nrw [yn_succ_succ, (by ring : n + 2 + n = 2 * (n + 1))]\n[GOAL]\na : ℕ\na1 : 1 < a\nn : ℕ\n⊢ n + 2 + n = 2 * (n + 1)\n[PROOFSTEP]\nring\n[GOAL]\na : ℕ\na1 : 1 < a\nn : ℕ\n⊢ 2 * a * yn a1 (n + 1) ≡ 2 * (n + 1) [MOD a - 1]\n[PROOFSTEP]\nexact ((modEq_sub a1.le).mul_left 2).mul (yn_modEq_a_sub_one (n + 1))\n[GOAL]\na : ℕ\na1 : 1 < a\n⊢ yn a1 0 ≡ 0 [MOD 2]\n[PROOFSTEP]\nsimp\n[GOAL]\na : ℕ\na1 : 1 < a\n⊢ yn a1 1 ≡ 1 [MOD 2]\n[PROOFSTEP]\nsimp\n[GOAL]\na : ℕ\na1 : 1 < a\nn : ℕ\n⊢ yn a1 (n + 2) + yn a1 n ≡ n + 2 + n [MOD 2]\n[PROOFSTEP]\nrw [yn_succ_succ, mul_assoc, (by ring : n + 2 + n = 2 * (n + 1))]\n[GOAL]\na : ℕ\na1 : 1 < a\nn : ℕ\n⊢ n + 2 + n = 2 * (n + 1)\n[PROOFSTEP]\nring\n[GOAL]\na : ℕ\na1 : 1 < a\nn : ℕ\n⊢ 2 * (a * yn a1 (n + 1)) ≡ 2 * (n + 1) [MOD 2]\n[PROOFSTEP]\nexact (dvd_mul_right 2 _).modEq_zero_nat.trans (dvd_mul_right 2 _).zero_modEq_nat\n[GOAL]\na : ℕ\na1 : 1 < a\ny2 y1 y0 yn1 yn0 xn1 xn0 ay a2 : ℤ\n⊢ (a2 * yn1 - yn0) * ay + y2 - (a2 * xn1 - xn0) = y2 - a2 * y1 + y0 + a2 * (yn1 * ay + y1 - xn1) - (yn0 * ay + y0 - xn0)\n[PROOFSTEP]\nring\n[GOAL]\na : ℕ\na1 : 1 < a\ny : ℕ\n⊢ 2 * ↑a * ↑y - ↑y * ↑y - 1 ∣ yz a1 0 * (↑a - ↑y) + ↑(y ^ 0) - xz a1 0\n[PROOFSTEP]\nsimp [xz, yz, Int.ofNat_zero, Int.ofNat_one]\n[GOAL]\na : ℕ\na1 : 1 < a\ny : ℕ\n⊢ 2 * ↑a * ↑y - ↑y * ↑y - 1 ∣ yz a1 1 * (↑a - ↑y) + ↑(y ^ 1) - xz a1 1\n[PROOFSTEP]\nsimp [xz, yz, Int.ofNat_zero, Int.ofNat_one]\n[GOAL]\na : ℕ\na1 : 1 < a\ny n : ℕ\n⊢ 2 * ↑a * ↑y - ↑y * ↑y - 1 ∣ yz a1 (n + 2) * (↑a - ↑y) + ↑(y ^ (n + 2)) - xz a1 (n + 2)\n[PROOFSTEP]\nhave : (2 * a * y - y * y - 1 : ℤ) ∣ ↑(y ^ (n + 2)) - ↑(2 * a) * ↑(y ^ (n + 1)) + ↑(y ^ n) :=\n  ⟨-↑(y ^ n),\n    by\n    simp [_root_.pow_succ, mul_add, Int.ofNat_mul, show ((2 : ℕ) : ℤ) = 2 from rfl, mul_comm, mul_left_comm]\n    ring⟩\n[GOAL]\na : ℕ\na1 : 1 < a\ny n : ℕ\n⊢ ↑(y ^ (n + 2)) - ↑(2 * a) * ↑(y ^ (n + 1)) + ↑(y ^ n) = (2 * ↑a * ↑y - ↑y * ↑y - 1) * -↑(y ^ n)\n[PROOFSTEP]\nsimp [_root_.pow_succ, mul_add, Int.ofNat_mul, show ((2 : ℕ) : ℤ) = 2 from rfl, mul_comm, mul_left_comm]\n[GOAL]\na : ℕ\na1 : 1 < a\ny n : ℕ\n⊢ ↑y * (↑y * ↑y ^ n) - ↑a * (↑y * ↑y ^ n * 2) + ↑y ^ n = -(↑y ^ n * (↑a * (↑y * 2) - ↑y * ↑y - 1))\n[PROOFSTEP]\nring\n[GOAL]\na : ℕ\na1 : 1 < a\ny n : ℕ\nthis : 2 * ↑a * ↑y - ↑y * ↑y - 1 ∣ ↑(y ^ (n + 2)) - ↑(2 * a) * ↑(y ^ (n + 1)) + ↑(y ^ n)\n⊢ 2 * ↑a * ↑y - ↑y * ↑y - 1 ∣ yz a1 (n + 2) * (↑a - ↑y) + ↑(y ^ (n + 2)) - xz a1 (n + 2)\n[PROOFSTEP]\nrw [xz_succ_succ, yz_succ_succ, x_sub_y_dvd_pow_lem ↑(y ^ (n + 2)) ↑(y ^ (n + 1)) ↑(y ^ n)]\n[GOAL]\na : ℕ\na1 : 1 < a\ny n : ℕ\nthis : 2 * ↑a * ↑y - ↑y * ↑y - 1 ∣ ↑(y ^ (n + 2)) - ↑(2 * a) * ↑(y ^ (n + 1)) + ↑(y ^ n)\n⊢ 2 * ↑a * ↑y - ↑y * ↑y - 1 ∣\n    ↑(y ^ (n + 2)) - ↑(2 * a) * ↑(y ^ (n + 1)) + ↑(y ^ n) +\n        ↑(2 * a) * (yz a1 (n + 1) * (↑a - ↑y) + ↑(y ^ (n + 1)) - xz a1 (n + 1)) -\n      (yz a1 n * (↑a - ↑y) + ↑(y ^ n) - xz a1 n)\n[PROOFSTEP]\nexact _root_.dvd_sub (dvd_add this <| (x_sub_y_dvd_pow _ (n + 1)).mul_left _) (x_sub_y_dvd_pow _ n)\n[GOAL]\na : ℕ\na1 : 1 < a\nn j : ℕ\n⊢ xn a1 n ∣ Pell.d a1 * yn a1 n * (yn a1 n * xn a1 j) + xn a1 j\n[PROOFSTEP]\nhave h1 : d a1 * yn a1 n * (yn a1 n * xn a1 j) + xn a1 j = (d a1 * yn a1 n * yn a1 n + 1) * xn a1 j := by\n  simp [add_mul, mul_assoc]\n[GOAL]\na : ℕ\na1 : 1 < a\nn j : ℕ\n⊢ Pell.d a1 * yn a1 n * (yn a1 n * xn a1 j) + xn a1 j = (Pell.d a1 * yn a1 n * yn a1 n + 1) * xn a1 j\n[PROOFSTEP]\nsimp [add_mul, mul_assoc]\n[GOAL]\na : ℕ\na1 : 1 < a\nn j : ℕ\nh1 : Pell.d a1 * yn a1 n * (yn a1 n * xn a1 j) + xn a1 j = (Pell.d a1 * yn a1 n * yn a1 n + 1) * xn a1 j\n⊢ xn a1 n ∣ Pell.d a1 * yn a1 n * (yn a1 n * xn a1 j) + xn a1 j\n[PROOFSTEP]\nhave h2 : d a1 * yn a1 n * yn a1 n + 1 = xn a1 n * xn a1 n :=\n  by\n  zify at *\n  apply add_eq_of_eq_sub' (Eq.symm (pell_eqz a1 n))\n[GOAL]\na : ℕ\na1 : 1 < a\nn j : ℕ\nh1 : Pell.d a1 * yn a1 n * (yn a1 n * xn a1 j) + xn a1 j = (Pell.d a1 * yn a1 n * yn a1 n + 1) * xn a1 j\n⊢ Pell.d a1 * yn a1 n * yn a1 n + 1 = xn a1 n * xn a1 n\n[PROOFSTEP]\nzify at *\n[GOAL]\na : ℕ\na1 : 1 < a\nn j : ℕ\nh1 :\n  ↑(Pell.d a1) * ↑(yn a1 n) * (↑(yn a1 n) * ↑(xn a1 j)) + ↑(xn a1 j) =\n    (↑(Pell.d a1) * ↑(yn a1 n) * ↑(yn a1 n) + 1) * ↑(xn a1 j)\n⊢ ↑(Pell.d a1) * ↑(yn a1 n) * ↑(yn a1 n) + 1 = ↑(xn a1 n) * ↑(xn a1 n)\n[PROOFSTEP]\napply add_eq_of_eq_sub' (Eq.symm (pell_eqz a1 n))\n[GOAL]\na : ℕ\na1 : 1 < a\nn j : ℕ\nh1 : Pell.d a1 * yn a1 n * (yn a1 n * xn a1 j) + xn a1 j = (Pell.d a1 * yn a1 n * yn a1 n + 1) * xn a1 j\nh2 : Pell.d a1 * yn a1 n * yn a1 n + 1 = xn a1 n * xn a1 n\n⊢ xn a1 n ∣ Pell.d a1 * yn a1 n * (yn a1 n * xn a1 j) + xn a1 j\n[PROOFSTEP]\nrw [h2] at h1 \n[GOAL]\na : ℕ\na1 : 1 < a\nn j : ℕ\nh1 : Pell.d a1 * yn a1 n * (yn a1 n * xn a1 j) + xn a1 j = xn a1 n * xn a1 n * xn a1 j\nh2 : Pell.d a1 * yn a1 n * yn a1 n + 1 = xn a1 n * xn a1 n\n⊢ xn a1 n ∣ Pell.d a1 * yn a1 n * (yn a1 n * xn a1 j) + xn a1 j\n[PROOFSTEP]\nrw [h1, mul_assoc]\n[GOAL]\na : ℕ\na1 : 1 < a\nn j : ℕ\nh1 : Pell.d a1 * yn a1 n * (yn a1 n * xn a1 j) + xn a1 j = xn a1 n * xn a1 n * xn a1 j\nh2 : Pell.d a1 * yn a1 n * yn a1 n + 1 = xn a1 n * xn a1 n\n⊢ xn a1 n ∣ xn a1 n * (xn a1 n * xn a1 j)\n[PROOFSTEP]\nexact dvd_mul_right _ _\n[GOAL]\na : ℕ\na1 : 1 < a\nn j : ℕ\n⊢ xn a1 (2 * n + j) + xn a1 j ≡ 0 [MOD xn a1 n]\n[PROOFSTEP]\nrw [two_mul, add_assoc, xn_add, add_assoc, ← zero_add 0]\n[GOAL]\na : ℕ\na1 : 1 < a\nn j : ℕ\n⊢ xn a1 n * xn a1 (n + j) + (Pell.d a1 * yn a1 n * yn a1 (n + j) + xn a1 j) ≡ 0 + 0 [MOD xn a1 n]\n[PROOFSTEP]\nrefine' (dvd_mul_right (xn a1 n) (xn a1 (n + j))).modEq_zero_nat.add _\n[GOAL]\na : ℕ\na1 : 1 < a\nn j : ℕ\n⊢ Pell.d a1 * yn a1 n * yn a1 (n + j) + xn a1 j ≡ 0 [MOD xn a1 n]\n[PROOFSTEP]\nrw [yn_add, left_distrib, add_assoc, ← zero_add 0]\n[GOAL]\na : ℕ\na1 : 1 < a\nn j : ℕ\n⊢ Pell.d a1 * yn a1 n * (xn a1 n * yn a1 j) + (Pell.d a1 * yn a1 n * (yn a1 n * xn a1 j) + xn a1 j) ≡ 0 + 0 [MOD\n    xn a1 n]\n[PROOFSTEP]\nexact ((dvd_mul_right _ _).mul_left _).modEq_zero_nat.add (xn_modEq_x2n_add_lem _ _ _).modEq_zero_nat\n[GOAL]\na : ℕ\na1 : 1 < a\nn j : ℕ\nh : j ≤ n\n⊢ xn a1 (2 * n - j) + xn a1 j ≡ 0 [MOD xn a1 n]\n[PROOFSTEP]\nhave h1 : xz a1 n ∣ d a1 * yz a1 n * yz a1 (n - j) + xz a1 j :=\n  by\n  rw [yz_sub _ h, mul_sub_left_distrib, sub_add_eq_add_sub]\n  exact\n    dvd_sub\n      (by\n        delta xz; delta yz\n        rw [mul_comm (xn _ _ : ℤ)]\n        exact_mod_cast (xn_modEq_x2n_add_lem _ n j))\n      ((dvd_mul_right _ _).mul_left _)\n[GOAL]\na : ℕ\na1 : 1 < a\nn j : ℕ\nh : j ≤ n\n⊢ xz a1 n ∣ ↑(Pell.d a1) * yz a1 n * yz a1 (n - j) + xz a1 j\n[PROOFSTEP]\nrw [yz_sub _ h, mul_sub_left_distrib, sub_add_eq_add_sub]\n[GOAL]\na : ℕ\na1 : 1 < a\nn j : ℕ\nh : j ≤ n\n⊢ xz a1 n ∣ ↑(Pell.d a1) * yz a1 n * (xz a1 j * yz a1 n) + xz a1 j - ↑(Pell.d a1) * yz a1 n * (xz a1 n * yz a1 j)\n[PROOFSTEP]\nexact\n  dvd_sub\n    (by\n      delta xz; delta yz\n      rw [mul_comm (xn _ _ : ℤ)]\n      exact_mod_cast (xn_modEq_x2n_add_lem _ n j))\n    ((dvd_mul_right _ _).mul_left _)\n[GOAL]\na : ℕ\na1 : 1 < a\nn j : ℕ\nh : j ≤ n\n⊢ xz a1 n ∣ ↑(Pell.d a1) * yz a1 n * (xz a1 j * yz a1 n) + xz a1 j\n[PROOFSTEP]\ndelta xz\n[GOAL]\na : ℕ\na1 : 1 < a\nn j : ℕ\nh : j ≤ n\n⊢ ↑(xn a1 n) ∣ ↑(Pell.d a1) * yz a1 n * (↑(xn a1 j) * yz a1 n) + ↑(xn a1 j)\n[PROOFSTEP]\ndelta yz\n[GOAL]\na : ℕ\na1 : 1 < a\nn j : ℕ\nh : j ≤ n\n⊢ ↑(xn a1 n) ∣ ↑(Pell.d a1) * ↑(yn a1 n) * (↑(xn a1 j) * ↑(yn a1 n)) + ↑(xn a1 j)\n[PROOFSTEP]\nrw [mul_comm (xn _ _ : ℤ)]\n[GOAL]\na : ℕ\na1 : 1 < a\nn j : ℕ\nh : j ≤ n\n⊢ ↑(xn a1 n) ∣ ↑(Pell.d a1) * ↑(yn a1 n) * (↑(yn a1 n) * ↑(xn a1 j)) + ↑(xn a1 j)\n[PROOFSTEP]\nexact_mod_cast (xn_modEq_x2n_add_lem _ n j)\n[GOAL]\na : ℕ\na1 : 1 < a\nn j : ℕ\nh : j ≤ n\nh1 : xz a1 n ∣ ↑(Pell.d a1) * yz a1 n * yz a1 (n - j) + xz a1 j\n⊢ xn a1 (2 * n - j) + xn a1 j ≡ 0 [MOD xn a1 n]\n[PROOFSTEP]\nrw [two_mul, add_tsub_assoc_of_le h, xn_add, add_assoc, ← zero_add 0]\n[GOAL]\na : ℕ\na1 : 1 < a\nn j : ℕ\nh : j ≤ n\nh1 : xz a1 n ∣ ↑(Pell.d a1) * yz a1 n * yz a1 (n - j) + xz a1 j\n⊢ xn a1 n * xn a1 (n - j) + (Pell.d a1 * yn a1 n * yn a1 (n - j) + xn a1 j) ≡ 0 + 0 [MOD xn a1 n]\n[PROOFSTEP]\nexact (dvd_mul_right _ _).modEq_zero_nat.add (Int.coe_nat_dvd.1 <| by simpa [xz, yz] using h1).modEq_zero_nat\n[GOAL]\na : ℕ\na1 : 1 < a\nn j : ℕ\nh : j ≤ n\nh1 : xz a1 n ∣ ↑(Pell.d a1) * yz a1 n * yz a1 (n - j) + xz a1 j\n⊢ ↑(xn a1 n) ∣ ↑(Pell.d a1 * yn a1 n * yn a1 (n - j) + xn a1 j)\n[PROOFSTEP]\nsimpa [xz, yz] using h1\n[GOAL]\na : ℕ\na1 : 1 < a\nn j : ℕ\nh : j ≤ 2 * n\njn : n ≤ j\n⊢ xn a1 (2 * n - j) + xn a1 j ≡ 0 [MOD xn a1 n]\n[PROOFSTEP]\nhave : 2 * n - j + j ≤ n + j := by rw [tsub_add_cancel_of_le h, two_mul]; exact Nat.add_le_add_left jn _\n[GOAL]\na : ℕ\na1 : 1 < a\nn j : ℕ\nh : j ≤ 2 * n\njn : n ≤ j\n⊢ 2 * n - j + j ≤ n + j\n[PROOFSTEP]\nrw [tsub_add_cancel_of_le h, two_mul]\n[GOAL]\na : ℕ\na1 : 1 < a\nn j : ℕ\nh : j ≤ 2 * n\njn : n ≤ j\n⊢ n + n ≤ n + j\n[PROOFSTEP]\nexact Nat.add_le_add_left jn _\n[GOAL]\na : ℕ\na1 : 1 < a\nn j : ℕ\nh : j ≤ 2 * n\njn : n ≤ j\nthis : 2 * n - j + j ≤ n + j\n⊢ xn a1 (2 * n - j) + xn a1 j ≡ 0 [MOD xn a1 n]\n[PROOFSTEP]\nlet t := xn_modEq_x2n_sub_lem a1 (Nat.le_of_add_le_add_right this)\n[GOAL]\na : ℕ\na1 : 1 < a\nn j : ℕ\nh : j ≤ 2 * n\njn : n ≤ j\nthis : 2 * n - j + j ≤ n + j\nt : xn a1 (2 * n - (2 * n - j)) + xn a1 (2 * n - j) ≡ 0 [MOD xn a1 n] :=\n  xn_modEq_x2n_sub_lem a1 (Nat.le_of_add_le_add_right this)\n⊢ xn a1 (2 * n - j) + xn a1 j ≡ 0 [MOD xn a1 n]\n[PROOFSTEP]\nrwa [tsub_tsub_cancel_of_le h, add_comm] at t \n[GOAL]\na : ℕ\na1 : 1 < a\nn j : ℕ\n⊢ xn a1 (4 * n + j) + xn a1 (2 * n + j) ≡ xn a1 j + xn a1 (2 * n + j) [MOD xn a1 n]\n[PROOFSTEP]\nrefine' @ModEq.trans _ _ 0 _ _ (by rw [add_comm]; exact (xn_modEq_x2n_add _ _ _).symm)\n[GOAL]\na : ℕ\na1 : 1 < a\nn j : ℕ\n⊢ 0 ≡ xn a1 j + xn a1 (2 * n + j) [MOD xn a1 n]\n[PROOFSTEP]\nrw [add_comm]\n[GOAL]\na : ℕ\na1 : 1 < a\nn j : ℕ\n⊢ 0 ≡ xn a1 (2 * n + j) + xn a1 j [MOD xn a1 n]\n[PROOFSTEP]\nexact (xn_modEq_x2n_add _ _ _).symm\n[GOAL]\na : ℕ\na1 : 1 < a\nn j : ℕ\n⊢ xn a1 (4 * n + j) + xn a1 (2 * n + j) ≡ 0 [MOD xn a1 n]\n[PROOFSTEP]\nrw [show 4 * n = 2 * n + 2 * n from right_distrib 2 2 n, add_assoc]\n[GOAL]\na : ℕ\na1 : 1 < a\nn j : ℕ\n⊢ xn a1 (2 * n + (2 * n + j)) + xn a1 (2 * n + j) ≡ 0 [MOD xn a1 n]\n[PROOFSTEP]\napply xn_modEq_x2n_add\n[GOAL]\na : ℕ\na1 : 1 < a\nn j : ℕ\nh : j ≤ 2 * n\n⊢ 2 * n ≤ 2 * n\n[PROOFSTEP]\nrw [Nat.succ_mul]\n[GOAL]\na : ℕ\na1 : 1 < a\nn j : ℕ\nh h' : j ≤ 2 * n\n⊢ xn a1 (4 * n - j) + xn a1 (2 * n - j) ≡ xn a1 j + xn a1 (2 * n - j) [MOD xn a1 n]\n[PROOFSTEP]\nrefine' @ModEq.trans _ _ 0 _ _ (by rw [add_comm]; exact (xn_modEq_x2n_sub _ h).symm)\n[GOAL]\na : ℕ\na1 : 1 < a\nn j : ℕ\nh h' : j ≤ 2 * n\n⊢ 0 ≡ xn a1 j + xn a1 (2 * n - j) [MOD xn a1 n]\n[PROOFSTEP]\nrw [add_comm]\n[GOAL]\na : ℕ\na1 : 1 < a\nn j : ℕ\nh h' : j ≤ 2 * n\n⊢ 0 ≡ xn a1 (2 * n - j) + xn a1 j [MOD xn a1 n]\n[PROOFSTEP]\nexact (xn_modEq_x2n_sub _ h).symm\n[GOAL]\na : ℕ\na1 : 1 < a\nn j : ℕ\nh h' : j ≤ 2 * n\n⊢ xn a1 (4 * n - j) + xn a1 (2 * n - j) ≡ 0 [MOD xn a1 n]\n[PROOFSTEP]\nrw [show 4 * n = 2 * n + 2 * n from right_distrib 2 2 n, add_tsub_assoc_of_le h']\n[GOAL]\na : ℕ\na1 : 1 < a\nn j : ℕ\nh h' : j ≤ 2 * n\n⊢ xn a1 (2 * n + (2 * n - j)) + xn a1 (2 * n - j) ≡ 0 [MOD xn a1 n]\n[PROOFSTEP]\napply xn_modEq_x2n_add\n[GOAL]\na : ℕ\na1 : 1 < a\ni n j : ℕ\nij : i < j + 1\njn : j + 1 < n\n⊢ xn a1 i % xn a1 n < xn a1 (j + 1) % xn a1 n\n[PROOFSTEP]\nsuffices xn a1 j % xn a1 n < xn a1 (j + 1) % xn a1 n from\n  (lt_or_eq_of_le (Nat.le_of_succ_le_succ ij)).elim (fun h => lt_trans (eq_of_xn_modEq_lem1 h (le_of_lt jn)) this)\n    fun h => by rw [h]; exact this\n[GOAL]\na : ℕ\na1 : 1 < a\ni n j : ℕ\nij : i < j + 1\njn : j + 1 < n\nthis : xn a1 j % xn a1 n < xn a1 (j + 1) % xn a1 n\nh : i = j\n⊢ xn a1 i % xn a1 n < xn a1 (j + 1) % xn a1 n\n[PROOFSTEP]\nrw [h]\n[GOAL]\na : ℕ\na1 : 1 < a\ni n j : ℕ\nij : i < j + 1\njn : j + 1 < n\nthis : xn a1 j % xn a1 n < xn a1 (j + 1) % xn a1 n\nh : i = j\n⊢ xn a1 j % xn a1 n < xn a1 (j + 1) % xn a1 n\n[PROOFSTEP]\nexact this\n[GOAL]\na : ℕ\na1 : 1 < a\ni n j : ℕ\nij : i < j + 1\njn : j + 1 < n\n⊢ xn a1 j % xn a1 n < xn a1 (j + 1) % xn a1 n\n[PROOFSTEP]\nrw [Nat.mod_eq_of_lt (strictMono_x _ (Nat.lt_of_succ_lt jn)), Nat.mod_eq_of_lt (strictMono_x _ jn)]\n[GOAL]\na : ℕ\na1 : 1 < a\ni n j : ℕ\nij : i < j + 1\njn : j + 1 < n\n⊢ xn a1 j < xn a1 (j + 1)\n[PROOFSTEP]\nexact strictMono_x _ (Nat.lt_succ_self _)\n[GOAL]\na : ℕ\na1 : 1 < a\nn : ℕ\nh : 2 * xn a1 n = xn a1 (n + 1)\n⊢ a = 2 ∧ n = 0\n[PROOFSTEP]\nrw [xn_succ, mul_comm] at h \n[GOAL]\na : ℕ\na1 : 1 < a\nn : ℕ\nh : xn a1 n * 2 = xn a1 n * a + Pell.d a1 * yn a1 n\n⊢ a = 2 ∧ n = 0\n[PROOFSTEP]\nhave : n = 0 :=\n  n.eq_zero_or_pos.resolve_right fun np =>\n    _root_.ne_of_lt\n      (lt_of_le_of_lt (Nat.mul_le_mul_left _ a1) (Nat.lt_add_of_pos_right <| mul_pos (d_pos a1) (strictMono_y a1 np))) h\n[GOAL]\na : ℕ\na1 : 1 < a\nn : ℕ\nh : xn a1 n * 2 = xn a1 n * a + Pell.d a1 * yn a1 n\nthis : n = 0\n⊢ a = 2 ∧ n = 0\n[PROOFSTEP]\ncases this\n[GOAL]\ncase refl\na : ℕ\na1 : 1 < a\nh : xn a1 0 * 2 = xn a1 0 * a + Pell.d a1 * yn a1 0\n⊢ a = 2 ∧ 0 = 0\n[PROOFSTEP]\nsimp at h \n[GOAL]\ncase refl\na : ℕ\na1 : 1 < a\nh : 2 = a\n⊢ a = 2 ∧ 0 = 0\n[PROOFSTEP]\nexact ⟨h.symm, rfl⟩\n[GOAL]\na : ℕ\na1 : 1 < a\ni n : ℕ\nnpos : 0 < n\nj : ℕ\nij : i < j + 1\nj2n : j + 1 ≤ 2 * n\njnn : j + 1 ≠ n\nntriv : ¬(a = 2 ∧ n = 1 ∧ i = 0 ∧ j + 1 = 2)\nk : ℕ\nkn : k > n\nk2n : k ≤ 2 * n\n⊢ ↑(xn a1 k % xn a1 n) = ↑(xn a1 n) - ↑(xn a1 (2 * n - k))\n[PROOFSTEP]\nlet k2nl :=\n  lt_of_add_lt_add_right <|\n    show 2 * n - k + k < n + k by\n      rw [tsub_add_cancel_of_le]\n      rw [two_mul]; exact add_lt_add_left kn n\n      exact k2n\n[GOAL]\na : ℕ\na1 : 1 < a\ni n : ℕ\nnpos : 0 < n\nj : ℕ\nij : i < j + 1\nj2n : j + 1 ≤ 2 * n\njnn : j + 1 ≠ n\nntriv : ¬(a = 2 ∧ n = 1 ∧ i = 0 ∧ j + 1 = 2)\nk : ℕ\nkn : k > n\nk2n : k ≤ 2 * n\n⊢ 2 * n - k + k < n + k\n[PROOFSTEP]\nrw [tsub_add_cancel_of_le]\n[GOAL]\na : ℕ\na1 : 1 < a\ni n : ℕ\nnpos : 0 < n\nj : ℕ\nij : i < j + 1\nj2n : j + 1 ≤ 2 * n\njnn : j + 1 ≠ n\nntriv : ¬(a = 2 ∧ n = 1 ∧ i = 0 ∧ j + 1 = 2)\nk : ℕ\nkn : k > n\nk2n : k ≤ 2 * n\n⊢ 2 * n < n + k\na : ℕ\na1 : 1 < a\ni n : ℕ\nnpos : 0 < n\nj : ℕ\nij : i < j + 1\nj2n : j + 1 ≤ 2 * n\njnn : j + 1 ≠ n\nntriv : ¬(a = 2 ∧ n = 1 ∧ i = 0 ∧ j + 1 = 2)\nk : ℕ\nkn : k > n\nk2n : k ≤ 2 * n\n⊢ k ≤ 2 * n\n[PROOFSTEP]\nrw [two_mul]\n[GOAL]\na : ℕ\na1 : 1 < a\ni n : ℕ\nnpos : 0 < n\nj : ℕ\nij : i < j + 1\nj2n : j + 1 ≤ 2 * n\njnn : j + 1 ≠ n\nntriv : ¬(a = 2 ∧ n = 1 ∧ i = 0 ∧ j + 1 = 2)\nk : ℕ\nkn : k > n\nk2n : k ≤ 2 * n\n⊢ n + n < n + k\na : ℕ\na1 : 1 < a\ni n : ℕ\nnpos : 0 < n\nj : ℕ\nij : i < j + 1\nj2n : j + 1 ≤ 2 * n\njnn : j + 1 ≠ n\nntriv : ¬(a = 2 ∧ n = 1 ∧ i = 0 ∧ j + 1 = 2)\nk : ℕ\nkn : k > n\nk2n : k ≤ 2 * n\n⊢ k ≤ 2 * n\n[PROOFSTEP]\nexact add_lt_add_left kn n\n[GOAL]\na : ℕ\na1 : 1 < a\ni n : ℕ\nnpos : 0 < n\nj : ℕ\nij : i < j + 1\nj2n : j + 1 ≤ 2 * n\njnn : j + 1 ≠ n\nntriv : ¬(a = 2 ∧ n = 1 ∧ i = 0 ∧ j + 1 = 2)\nk : ℕ\nkn : k > n\nk2n : k ≤ 2 * n\n⊢ k ≤ 2 * n\n[PROOFSTEP]\nexact k2n\n[GOAL]\na : ℕ\na1 : 1 < a\ni n : ℕ\nnpos : 0 < n\nj : ℕ\nij : i < j + 1\nj2n : j + 1 ≤ 2 * n\njnn : j + 1 ≠ n\nntriv : ¬(a = 2 ∧ n = 1 ∧ i = 0 ∧ j + 1 = 2)\nk : ℕ\nkn : k > n\nk2n : k ≤ 2 * n\nk2nl : 2 * n - k < n :=\n  lt_of_add_lt_add_right\n    (let_fun this :=\n      Eq.mpr (id (tsub_add_cancel_of_le k2n ▸ Eq.refl (2 * n - k + k < n + k)))\n        (Eq.mpr (id (two_mul n ▸ Eq.refl (2 * n < n + k))) (add_lt_add_left kn n));\n    this)\n⊢ ↑(xn a1 k % xn a1 n) = ↑(xn a1 n) - ↑(xn a1 (2 * n - k))\n[PROOFSTEP]\nhave xle : xn a1 (2 * n - k) ≤ xn a1 n := le_of_lt <| strictMono_x a1 k2nl\n[GOAL]\na : ℕ\na1 : 1 < a\ni n : ℕ\nnpos : 0 < n\nj : ℕ\nij : i < j + 1\nj2n : j + 1 ≤ 2 * n\njnn : j + 1 ≠ n\nntriv : ¬(a = 2 ∧ n = 1 ∧ i = 0 ∧ j + 1 = 2)\nk : ℕ\nkn : k > n\nk2n : k ≤ 2 * n\nk2nl : 2 * n - k < n :=\n  lt_of_add_lt_add_right\n    (let_fun this :=\n      Eq.mpr (id (tsub_add_cancel_of_le k2n ▸ Eq.refl (2 * n - k + k < n + k)))\n        (Eq.mpr (id (two_mul n ▸ Eq.refl (2 * n < n + k))) (add_lt_add_left kn n));\n    this)\nxle : xn a1 (2 * n - k) ≤ xn a1 n\n⊢ ↑(xn a1 k % xn a1 n) = ↑(xn a1 n) - ↑(xn a1 (2 * n - k))\n[PROOFSTEP]\nsuffices xn a1 k % xn a1 n = xn a1 n - xn a1 (2 * n - k) by rw [this, Int.ofNat_sub xle]\n[GOAL]\na : ℕ\na1 : 1 < a\ni n : ℕ\nnpos : 0 < n\nj : ℕ\nij : i < j + 1\nj2n : j + 1 ≤ 2 * n\njnn : j + 1 ≠ n\nntriv : ¬(a = 2 ∧ n = 1 ∧ i = 0 ∧ j + 1 = 2)\nk : ℕ\nkn : k > n\nk2n : k ≤ 2 * n\nk2nl : 2 * n - k < n :=\n  lt_of_add_lt_add_right\n    (let_fun this :=\n      Eq.mpr (id (tsub_add_cancel_of_le k2n ▸ Eq.refl (2 * n - k + k < n + k)))\n        (Eq.mpr (id (two_mul n ▸ Eq.refl (2 * n < n + k))) (add_lt_add_left kn n));\n    this)\nxle : xn a1 (2 * n - k) ≤ xn a1 n\nthis : xn a1 k % xn a1 n = xn a1 n - xn a1 (2 * n - k)\n⊢ ↑(xn a1 k % xn a1 n) = ↑(xn a1 n) - ↑(xn a1 (2 * n - k))\n[PROOFSTEP]\nrw [this, Int.ofNat_sub xle]\n[GOAL]\na : ℕ\na1 : 1 < a\ni n : ℕ\nnpos : 0 < n\nj : ℕ\nij : i < j + 1\nj2n : j + 1 ≤ 2 * n\njnn : j + 1 ≠ n\nntriv : ¬(a = 2 ∧ n = 1 ∧ i = 0 ∧ j + 1 = 2)\nk : ℕ\nkn : k > n\nk2n : k ≤ 2 * n\nk2nl : 2 * n - k < n :=\n  lt_of_add_lt_add_right\n    (let_fun this :=\n      Eq.mpr (id (tsub_add_cancel_of_le k2n ▸ Eq.refl (2 * n - k + k < n + k)))\n        (Eq.mpr (id (two_mul n ▸ Eq.refl (2 * n < n + k))) (add_lt_add_left kn n));\n    this)\nxle : xn a1 (2 * n - k) ≤ xn a1 n\n⊢ xn a1 k % xn a1 n = xn a1 n - xn a1 (2 * n - k)\n[PROOFSTEP]\nrw [← Nat.mod_eq_of_lt (Nat.sub_lt (x_pos a1 n) (x_pos a1 (2 * n - k)))]\n[GOAL]\na : ℕ\na1 : 1 < a\ni n : ℕ\nnpos : 0 < n\nj : ℕ\nij : i < j + 1\nj2n : j + 1 ≤ 2 * n\njnn : j + 1 ≠ n\nntriv : ¬(a = 2 ∧ n = 1 ∧ i = 0 ∧ j + 1 = 2)\nk : ℕ\nkn : k > n\nk2n : k ≤ 2 * n\nk2nl : 2 * n - k < n :=\n  lt_of_add_lt_add_right\n    (let_fun this :=\n      Eq.mpr (id (tsub_add_cancel_of_le k2n ▸ Eq.refl (2 * n - k + k < n + k)))\n        (Eq.mpr (id (two_mul n ▸ Eq.refl (2 * n < n + k))) (add_lt_add_left kn n));\n    this)\nxle : xn a1 (2 * n - k) ≤ xn a1 n\n⊢ xn a1 k % xn a1 n = (xn a1 n - xn a1 (2 * n - k)) % xn a1 n\n[PROOFSTEP]\napply ModEq.add_right_cancel' (xn a1 (2 * n - k))\n[GOAL]\na : ℕ\na1 : 1 < a\ni n : ℕ\nnpos : 0 < n\nj : ℕ\nij : i < j + 1\nj2n : j + 1 ≤ 2 * n\njnn : j + 1 ≠ n\nntriv : ¬(a = 2 ∧ n = 1 ∧ i = 0 ∧ j + 1 = 2)\nk : ℕ\nkn : k > n\nk2n : k ≤ 2 * n\nk2nl : 2 * n - k < n :=\n  lt_of_add_lt_add_right\n    (let_fun this :=\n      Eq.mpr (id (tsub_add_cancel_of_le k2n ▸ Eq.refl (2 * n - k + k < n + k)))\n        (Eq.mpr (id (two_mul n ▸ Eq.refl (2 * n < n + k))) (add_lt_add_left kn n));\n    this)\nxle : xn a1 (2 * n - k) ≤ xn a1 n\n⊢ xn a1 k + xn a1 (2 * n - k) ≡ xn a1 n - xn a1 (2 * n - k) + xn a1 (2 * n - k) [MOD xn a1 n]\n[PROOFSTEP]\nrw [tsub_add_cancel_of_le xle]\n[GOAL]\na : ℕ\na1 : 1 < a\ni n : ℕ\nnpos : 0 < n\nj : ℕ\nij : i < j + 1\nj2n : j + 1 ≤ 2 * n\njnn : j + 1 ≠ n\nntriv : ¬(a = 2 ∧ n = 1 ∧ i = 0 ∧ j + 1 = 2)\nk : ℕ\nkn : k > n\nk2n : k ≤ 2 * n\nk2nl : 2 * n - k < n :=\n  lt_of_add_lt_add_right\n    (let_fun this :=\n      Eq.mpr (id (tsub_add_cancel_of_le k2n ▸ Eq.refl (2 * n - k + k < n + k)))\n        (Eq.mpr (id (two_mul n ▸ Eq.refl (2 * n < n + k))) (add_lt_add_left kn n));\n    this)\nxle : xn a1 (2 * n - k) ≤ xn a1 n\n⊢ xn a1 k + xn a1 (2 * n - k) ≡ xn a1 n [MOD xn a1 n]\n[PROOFSTEP]\nhave t := xn_modEq_x2n_sub_lem a1 k2nl.le\n[GOAL]\na : ℕ\na1 : 1 < a\ni n : ℕ\nnpos : 0 < n\nj : ℕ\nij : i < j + 1\nj2n : j + 1 ≤ 2 * n\njnn : j + 1 ≠ n\nntriv : ¬(a = 2 ∧ n = 1 ∧ i = 0 ∧ j + 1 = 2)\nk : ℕ\nkn : k > n\nk2n : k ≤ 2 * n\nk2nl : 2 * n - k < n :=\n  lt_of_add_lt_add_right\n    (let_fun this :=\n      Eq.mpr (id (tsub_add_cancel_of_le k2n ▸ Eq.refl (2 * n - k + k < n + k)))\n        (Eq.mpr (id (two_mul n ▸ Eq.refl (2 * n < n + k))) (add_lt_add_left kn n));\n    this)\nxle : xn a1 (2 * n - k) ≤ xn a1 n\nt : xn a1 (2 * n - (2 * n - k)) + xn a1 (2 * n - k) ≡ 0 [MOD xn a1 n]\n⊢ xn a1 k + xn a1 (2 * n - k) ≡ xn a1 n [MOD xn a1 n]\n[PROOFSTEP]\nrw [tsub_tsub_cancel_of_le k2n] at t \n[GOAL]\na : ℕ\na1 : 1 < a\ni n : ℕ\nnpos : 0 < n\nj : ℕ\nij : i < j + 1\nj2n : j + 1 ≤ 2 * n\njnn : j + 1 ≠ n\nntriv : ¬(a = 2 ∧ n = 1 ∧ i = 0 ∧ j + 1 = 2)\nk : ℕ\nkn : k > n\nk2n : k ≤ 2 * n\nk2nl : 2 * n - k < n :=\n  lt_of_add_lt_add_right\n    (let_fun this :=\n      Eq.mpr (id (tsub_add_cancel_of_le k2n ▸ Eq.refl (2 * n - k + k < n + k)))\n        (Eq.mpr (id (two_mul n ▸ Eq.refl (2 * n < n + k))) (add_lt_add_left kn n));\n    this)\nxle : xn a1 (2 * n - k) ≤ xn a1 n\nt : xn a1 k + xn a1 (2 * n - k) ≡ 0 [MOD xn a1 n]\n⊢ xn a1 k + xn a1 (2 * n - k) ≡ xn a1 n [MOD xn a1 n]\n[PROOFSTEP]\nexact t.trans dvd_rfl.zero_modEq_nat\n[GOAL]\na : ℕ\na1 : 1 < a\ni n : ℕ\nnpos : 0 < n\nj : ℕ\nij : i < j + 1\nj2n : j + 1 ≤ 2 * n\njnn : j + 1 ≠ n\nntriv : ¬(a = 2 ∧ n = 1 ∧ i = 0 ∧ j + 1 = 2)\nlem2 : ∀ (k : ℕ), k > n → k ≤ 2 * n → ↑(xn a1 k % xn a1 n) = ↑(xn a1 n) - ↑(xn a1 (2 * n - k))\no : j = n ∨ n < j\njn : j = n\n⊢ xn a1 i % xn a1 n < xn a1 (j + 1) % xn a1 n\n[PROOFSTEP]\ncases jn\n[GOAL]\ncase refl\na : ℕ\na1 : 1 < a\ni n : ℕ\nnpos : 0 < n\nlem2 : ∀ (k : ℕ), k > n → k ≤ 2 * n → ↑(xn a1 k % xn a1 n) = ↑(xn a1 n) - ↑(xn a1 (2 * n - k))\nij : i < n + 1\nj2n : n + 1 ≤ 2 * n\njnn : n + 1 ≠ n\nntriv : ¬(a = 2 ∧ n = 1 ∧ i = 0 ∧ n + 1 = 2)\no : n = n ∨ n < n\n⊢ xn a1 i % xn a1 n < xn a1 (n + 1) % xn a1 n\n[PROOFSTEP]\napply Int.lt_of_ofNat_lt_ofNat\n[GOAL]\ncase refl.a\na : ℕ\na1 : 1 < a\ni n : ℕ\nnpos : 0 < n\nlem2 : ∀ (k : ℕ), k > n → k ≤ 2 * n → ↑(xn a1 k % xn a1 n) = ↑(xn a1 n) - ↑(xn a1 (2 * n - k))\nij : i < n + 1\nj2n : n + 1 ≤ 2 * n\njnn : n + 1 ≠ n\nntriv : ¬(a = 2 ∧ n = 1 ∧ i = 0 ∧ n + 1 = 2)\no : n = n ∨ n < n\n⊢ ↑(xn a1 i % xn a1 n) < ↑(xn a1 (n + 1) % xn a1 n)\n[PROOFSTEP]\nrw [lem2 (n + 1) (Nat.lt_succ_self _) j2n,\n  show 2 * n - (n + 1) = n - 1 by rw [two_mul, tsub_add_eq_tsub_tsub, add_tsub_cancel_right]]\n[GOAL]\na : ℕ\na1 : 1 < a\ni n : ℕ\nnpos : 0 < n\nlem2 : ∀ (k : ℕ), k > n → k ≤ 2 * n → ↑(xn a1 k % xn a1 n) = ↑(xn a1 n) - ↑(xn a1 (2 * n - k))\nij : i < n + 1\nj2n : n + 1 ≤ 2 * n\njnn : n + 1 ≠ n\nntriv : ¬(a = 2 ∧ n = 1 ∧ i = 0 ∧ n + 1 = 2)\no : n = n ∨ n < n\n⊢ 2 * n - (n + 1) = n - 1\n[PROOFSTEP]\nrw [two_mul, tsub_add_eq_tsub_tsub, add_tsub_cancel_right]\n[GOAL]\ncase refl.a\na : ℕ\na1 : 1 < a\ni n : ℕ\nnpos : 0 < n\nlem2 : ∀ (k : ℕ), k > n → k ≤ 2 * n → ↑(xn a1 k % xn a1 n) = ↑(xn a1 n) - ↑(xn a1 (2 * n - k))\nij : i < n + 1\nj2n : n + 1 ≤ 2 * n\njnn : n + 1 ≠ n\nntriv : ¬(a = 2 ∧ n = 1 ∧ i = 0 ∧ n + 1 = 2)\no : n = n ∨ n < n\n⊢ ↑(xn a1 i % xn a1 n) < ↑(xn a1 n) - ↑(xn a1 (n - 1))\n[PROOFSTEP]\nrefine' lt_sub_left_of_add_lt (Int.ofNat_lt_ofNat_of_lt _)\n[GOAL]\ncase refl.a\na : ℕ\na1 : 1 < a\ni n : ℕ\nnpos : 0 < n\nlem2 : ∀ (k : ℕ), k > n → k ≤ 2 * n → ↑(xn a1 k % xn a1 n) = ↑(xn a1 n) - ↑(xn a1 (2 * n - k))\nij : i < n + 1\nj2n : n + 1 ≤ 2 * n\njnn : n + 1 ≠ n\nntriv : ¬(a = 2 ∧ n = 1 ∧ i = 0 ∧ n + 1 = 2)\no : n = n ∨ n < n\n⊢ xn a1 (n - 1) + xn a1 i % xn a1 n < xn a1 n\n[PROOFSTEP]\ncases' lt_or_eq_of_le <| Nat.le_of_succ_le_succ ij with lin ein\n[GOAL]\ncase refl.a.inl\na : ℕ\na1 : 1 < a\ni n : ℕ\nnpos : 0 < n\nlem2 : ∀ (k : ℕ), k > n → k ≤ 2 * n → ↑(xn a1 k % xn a1 n) = ↑(xn a1 n) - ↑(xn a1 (2 * n - k))\nij : i < n + 1\nj2n : n + 1 ≤ 2 * n\njnn : n + 1 ≠ n\nntriv : ¬(a = 2 ∧ n = 1 ∧ i = 0 ∧ n + 1 = 2)\no : n = n ∨ n < n\nlin : i < n\n⊢ xn a1 (n - 1) + xn a1 i % xn a1 n < xn a1 n\n[PROOFSTEP]\nrw [Nat.mod_eq_of_lt (strictMono_x _ lin)]\n[GOAL]\ncase refl.a.inl\na : ℕ\na1 : 1 < a\ni n : ℕ\nnpos : 0 < n\nlem2 : ∀ (k : ℕ), k > n → k ≤ 2 * n → ↑(xn a1 k % xn a1 n) = ↑(xn a1 n) - ↑(xn a1 (2 * n - k))\nij : i < n + 1\nj2n : n + 1 ≤ 2 * n\njnn : n + 1 ≠ n\nntriv : ¬(a = 2 ∧ n = 1 ∧ i = 0 ∧ n + 1 = 2)\no : n = n ∨ n < n\nlin : i < n\n⊢ xn a1 (n - 1) + xn a1 i < xn a1 n\n[PROOFSTEP]\nhave ll : xn a1 (n - 1) + xn a1 (n - 1) ≤ xn a1 n :=\n  by\n  rw [← two_mul, mul_comm, show xn a1 n = xn a1 (n - 1 + 1) by rw [tsub_add_cancel_of_le (succ_le_of_lt npos)], xn_succ]\n  exact le_trans (Nat.mul_le_mul_left _ a1) (Nat.le_add_right _ _)\n[GOAL]\na : ℕ\na1 : 1 < a\ni n : ℕ\nnpos : 0 < n\nlem2 : ∀ (k : ℕ), k > n → k ≤ 2 * n → ↑(xn a1 k % xn a1 n) = ↑(xn a1 n) - ↑(xn a1 (2 * n - k))\nij : i < n + 1\nj2n : n + 1 ≤ 2 * n\njnn : n + 1 ≠ n\nntriv : ¬(a = 2 ∧ n = 1 ∧ i = 0 ∧ n + 1 = 2)\no : n = n ∨ n < n\nlin : i < n\n⊢ xn a1 (n - 1) + xn a1 (n - 1) ≤ xn a1 n\n[PROOFSTEP]\nrw [← two_mul, mul_comm, show xn a1 n = xn a1 (n - 1 + 1) by rw [tsub_add_cancel_of_le (succ_le_of_lt npos)], xn_succ]\n[GOAL]\na : ℕ\na1 : 1 < a\ni n : ℕ\nnpos : 0 < n\nlem2 : ∀ (k : ℕ), k > n → k ≤ 2 * n → ↑(xn a1 k % xn a1 n) = ↑(xn a1 n) - ↑(xn a1 (2 * n - k))\nij : i < n + 1\nj2n : n + 1 ≤ 2 * n\njnn : n + 1 ≠ n\nntriv : ¬(a = 2 ∧ n = 1 ∧ i = 0 ∧ n + 1 = 2)\no : n = n ∨ n < n\nlin : i < n\n⊢ xn a1 n = xn a1 (n - 1 + 1)\n[PROOFSTEP]\nrw [tsub_add_cancel_of_le (succ_le_of_lt npos)]\n[GOAL]\na : ℕ\na1 : 1 < a\ni n : ℕ\nnpos : 0 < n\nlem2 : ∀ (k : ℕ), k > n → k ≤ 2 * n → ↑(xn a1 k % xn a1 n) = ↑(xn a1 n) - ↑(xn a1 (2 * n - k))\nij : i < n + 1\nj2n : n + 1 ≤ 2 * n\njnn : n + 1 ≠ n\nntriv : ¬(a = 2 ∧ n = 1 ∧ i = 0 ∧ n + 1 = 2)\no : n = n ∨ n < n\nlin : i < n\n⊢ xn a1 (n - 1) * 2 ≤ xn a1 (n - 1) * a + Pell.d a1 * yn a1 (n - 1)\n[PROOFSTEP]\nexact le_trans (Nat.mul_le_mul_left _ a1) (Nat.le_add_right _ _)\n[GOAL]\ncase refl.a.inl\na : ℕ\na1 : 1 < a\ni n : ℕ\nnpos : 0 < n\nlem2 : ∀ (k : ℕ), k > n → k ≤ 2 * n → ↑(xn a1 k % xn a1 n) = ↑(xn a1 n) - ↑(xn a1 (2 * n - k))\nij : i < n + 1\nj2n : n + 1 ≤ 2 * n\njnn : n + 1 ≠ n\nntriv : ¬(a = 2 ∧ n = 1 ∧ i = 0 ∧ n + 1 = 2)\no : n = n ∨ n < n\nlin : i < n\nll : xn a1 (n - 1) + xn a1 (n - 1) ≤ xn a1 n\n⊢ xn a1 (n - 1) + xn a1 i < xn a1 n\n[PROOFSTEP]\nhave npm : (n - 1).succ = n := Nat.succ_pred_eq_of_pos npos\n[GOAL]\ncase refl.a.inl\na : ℕ\na1 : 1 < a\ni n : ℕ\nnpos : 0 < n\nlem2 : ∀ (k : ℕ), k > n → k ≤ 2 * n → ↑(xn a1 k % xn a1 n) = ↑(xn a1 n) - ↑(xn a1 (2 * n - k))\nij : i < n + 1\nj2n : n + 1 ≤ 2 * n\njnn : n + 1 ≠ n\nntriv : ¬(a = 2 ∧ n = 1 ∧ i = 0 ∧ n + 1 = 2)\no : n = n ∨ n < n\nlin : i < n\nll : xn a1 (n - 1) + xn a1 (n - 1) ≤ xn a1 n\nnpm : succ (n - 1) = n\n⊢ xn a1 (n - 1) + xn a1 i < xn a1 n\n[PROOFSTEP]\nhave il : i ≤ n - 1 := by\n  apply Nat.le_of_succ_le_succ\n  rw [npm]\n  exact lin\n[GOAL]\na : ℕ\na1 : 1 < a\ni n : ℕ\nnpos : 0 < n\nlem2 : ∀ (k : ℕ), k > n → k ≤ 2 * n → ↑(xn a1 k % xn a1 n) = ↑(xn a1 n) - ↑(xn a1 (2 * n - k))\nij : i < n + 1\nj2n : n + 1 ≤ 2 * n\njnn : n + 1 ≠ n\nntriv : ¬(a = 2 ∧ n = 1 ∧ i = 0 ∧ n + 1 = 2)\no : n = n ∨ n < n\nlin : i < n\nll : xn a1 (n - 1) + xn a1 (n - 1) ≤ xn a1 n\nnpm : succ (n - 1) = n\n⊢ i ≤ n - 1\n[PROOFSTEP]\napply Nat.le_of_succ_le_succ\n[GOAL]\ncase a\na : ℕ\na1 : 1 < a\ni n : ℕ\nnpos : 0 < n\nlem2 : ∀ (k : ℕ), k > n → k ≤ 2 * n → ↑(xn a1 k % xn a1 n) = ↑(xn a1 n) - ↑(xn a1 (2 * n - k))\nij : i < n + 1\nj2n : n + 1 ≤ 2 * n\njnn : n + 1 ≠ n\nntriv : ¬(a = 2 ∧ n = 1 ∧ i = 0 ∧ n + 1 = 2)\no : n = n ∨ n < n\nlin : i < n\nll : xn a1 (n - 1) + xn a1 (n - 1) ≤ xn a1 n\nnpm : succ (n - 1) = n\n⊢ succ i ≤ succ (n - 1)\n[PROOFSTEP]\nrw [npm]\n[GOAL]\ncase a\na : ℕ\na1 : 1 < a\ni n : ℕ\nnpos : 0 < n\nlem2 : ∀ (k : ℕ), k > n → k ≤ 2 * n → ↑(xn a1 k % xn a1 n) = ↑(xn a1 n) - ↑(xn a1 (2 * n - k))\nij : i < n + 1\nj2n : n + 1 ≤ 2 * n\njnn : n + 1 ≠ n\nntriv : ¬(a = 2 ∧ n = 1 ∧ i = 0 ∧ n + 1 = 2)\no : n = n ∨ n < n\nlin : i < n\nll : xn a1 (n - 1) + xn a1 (n - 1) ≤ xn a1 n\nnpm : succ (n - 1) = n\n⊢ succ i ≤ n\n[PROOFSTEP]\nexact lin\n[GOAL]\ncase refl.a.inl\na : ℕ\na1 : 1 < a\ni n : ℕ\nnpos : 0 < n\nlem2 : ∀ (k : ℕ), k > n → k ≤ 2 * n → ↑(xn a1 k % xn a1 n) = ↑(xn a1 n) - ↑(xn a1 (2 * n - k))\nij : i < n + 1\nj2n : n + 1 ≤ 2 * n\njnn : n + 1 ≠ n\nntriv : ¬(a = 2 ∧ n = 1 ∧ i = 0 ∧ n + 1 = 2)\no : n = n ∨ n < n\nlin : i < n\nll : xn a1 (n - 1) + xn a1 (n - 1) ≤ xn a1 n\nnpm : succ (n - 1) = n\nil : i ≤ n - 1\n⊢ xn a1 (n - 1) + xn a1 i < xn a1 n\n[PROOFSTEP]\ncases' lt_or_eq_of_le il with ill ile\n[GOAL]\ncase refl.a.inl.inl\na : ℕ\na1 : 1 < a\ni n : ℕ\nnpos : 0 < n\nlem2 : ∀ (k : ℕ), k > n → k ≤ 2 * n → ↑(xn a1 k % xn a1 n) = ↑(xn a1 n) - ↑(xn a1 (2 * n - k))\nij : i < n + 1\nj2n : n + 1 ≤ 2 * n\njnn : n + 1 ≠ n\nntriv : ¬(a = 2 ∧ n = 1 ∧ i = 0 ∧ n + 1 = 2)\no : n = n ∨ n < n\nlin : i < n\nll : xn a1 (n - 1) + xn a1 (n - 1) ≤ xn a1 n\nnpm : succ (n - 1) = n\nil : i ≤ n - 1\nill : i < n - 1\n⊢ xn a1 (n - 1) + xn a1 i < xn a1 n\n[PROOFSTEP]\nexact lt_of_lt_of_le (Nat.add_lt_add_left (strictMono_x a1 ill) _) ll\n[GOAL]\ncase refl.a.inl.inr\na : ℕ\na1 : 1 < a\ni n : ℕ\nnpos : 0 < n\nlem2 : ∀ (k : ℕ), k > n → k ≤ 2 * n → ↑(xn a1 k % xn a1 n) = ↑(xn a1 n) - ↑(xn a1 (2 * n - k))\nij : i < n + 1\nj2n : n + 1 ≤ 2 * n\njnn : n + 1 ≠ n\nntriv : ¬(a = 2 ∧ n = 1 ∧ i = 0 ∧ n + 1 = 2)\no : n = n ∨ n < n\nlin : i < n\nll : xn a1 (n - 1) + xn a1 (n - 1) ≤ xn a1 n\nnpm : succ (n - 1) = n\nil : i ≤ n - 1\nile : i = n - 1\n⊢ xn a1 (n - 1) + xn a1 i < xn a1 n\n[PROOFSTEP]\nrw [ile]\n[GOAL]\ncase refl.a.inl.inr\na : ℕ\na1 : 1 < a\ni n : ℕ\nnpos : 0 < n\nlem2 : ∀ (k : ℕ), k > n → k ≤ 2 * n → ↑(xn a1 k % xn a1 n) = ↑(xn a1 n) - ↑(xn a1 (2 * n - k))\nij : i < n + 1\nj2n : n + 1 ≤ 2 * n\njnn : n + 1 ≠ n\nntriv : ¬(a = 2 ∧ n = 1 ∧ i = 0 ∧ n + 1 = 2)\no : n = n ∨ n < n\nlin : i < n\nll : xn a1 (n - 1) + xn a1 (n - 1) ≤ xn a1 n\nnpm : succ (n - 1) = n\nil : i ≤ n - 1\nile : i = n - 1\n⊢ xn a1 (n - 1) + xn a1 (n - 1) < xn a1 n\n[PROOFSTEP]\napply lt_of_le_of_ne ll\n[GOAL]\ncase refl.a.inl.inr\na : ℕ\na1 : 1 < a\ni n : ℕ\nnpos : 0 < n\nlem2 : ∀ (k : ℕ), k > n → k ≤ 2 * n → ↑(xn a1 k % xn a1 n) = ↑(xn a1 n) - ↑(xn a1 (2 * n - k))\nij : i < n + 1\nj2n : n + 1 ≤ 2 * n\njnn : n + 1 ≠ n\nntriv : ¬(a = 2 ∧ n = 1 ∧ i = 0 ∧ n + 1 = 2)\no : n = n ∨ n < n\nlin : i < n\nll : xn a1 (n - 1) + xn a1 (n - 1) ≤ xn a1 n\nnpm : succ (n - 1) = n\nil : i ≤ n - 1\nile : i = n - 1\n⊢ xn a1 (n - 1) + xn a1 (n - 1) ≠ xn a1 n\n[PROOFSTEP]\nrw [← two_mul]\n[GOAL]\ncase refl.a.inl.inr\na : ℕ\na1 : 1 < a\ni n : ℕ\nnpos : 0 < n\nlem2 : ∀ (k : ℕ), k > n → k ≤ 2 * n → ↑(xn a1 k % xn a1 n) = ↑(xn a1 n) - ↑(xn a1 (2 * n - k))\nij : i < n + 1\nj2n : n + 1 ≤ 2 * n\njnn : n + 1 ≠ n\nntriv : ¬(a = 2 ∧ n = 1 ∧ i = 0 ∧ n + 1 = 2)\no : n = n ∨ n < n\nlin : i < n\nll : xn a1 (n - 1) + xn a1 (n - 1) ≤ xn a1 n\nnpm : succ (n - 1) = n\nil : i ≤ n - 1\nile : i = n - 1\n⊢ 2 * xn a1 (n - 1) ≠ xn a1 n\n[PROOFSTEP]\nexact fun e =>\n  ntriv <|\n    by\n    let ⟨a2, s1⟩ := @eq_of_xn_modEq_lem2 _ a1 (n - 1) (by rwa [tsub_add_cancel_of_le (succ_le_of_lt npos)])\n    have n1 : n = 1 := le_antisymm (tsub_eq_zero_iff_le.mp s1) npos\n    rw [ile, a2, n1]; exact ⟨rfl, rfl, rfl, rfl⟩\n[GOAL]\na : ℕ\na1 : 1 < a\ni n : ℕ\nnpos : 0 < n\nlem2 : ∀ (k : ℕ), k > n → k ≤ 2 * n → ↑(xn a1 k % xn a1 n) = ↑(xn a1 n) - ↑(xn a1 (2 * n - k))\nij : i < n + 1\nj2n : n + 1 ≤ 2 * n\njnn : n + 1 ≠ n\nntriv : ¬(a = 2 ∧ n = 1 ∧ i = 0 ∧ n + 1 = 2)\no : n = n ∨ n < n\nlin : i < n\nll : xn a1 (n - 1) + xn a1 (n - 1) ≤ xn a1 n\nnpm : succ (n - 1) = n\nil : i ≤ n - 1\nile : i = n - 1\ne : 2 * xn a1 (n - 1) = xn a1 n\n⊢ a = 2 ∧ n = 1 ∧ i = 0 ∧ n + 1 = 2\n[PROOFSTEP]\nlet ⟨a2, s1⟩ := @eq_of_xn_modEq_lem2 _ a1 (n - 1) (by rwa [tsub_add_cancel_of_le (succ_le_of_lt npos)])\n[GOAL]\na : ℕ\na1 : 1 < a\ni n : ℕ\nnpos : 0 < n\nlem2 : ∀ (k : ℕ), k > n → k ≤ 2 * n → ↑(xn a1 k % xn a1 n) = ↑(xn a1 n) - ↑(xn a1 (2 * n - k))\nij : i < n + 1\nj2n : n + 1 ≤ 2 * n\njnn : n + 1 ≠ n\nntriv : ¬(a = 2 ∧ n = 1 ∧ i = 0 ∧ n + 1 = 2)\no : n = n ∨ n < n\nlin : i < n\nll : xn a1 (n - 1) + xn a1 (n - 1) ≤ xn a1 n\nnpm : succ (n - 1) = n\nil : i ≤ n - 1\nile : i = n - 1\ne : 2 * xn a1 (n - 1) = xn a1 n\n⊢ 2 * xn a1 (n - 1) = xn a1 (n - 1 + 1)\n[PROOFSTEP]\nrwa [tsub_add_cancel_of_le (succ_le_of_lt npos)]\n[GOAL]\na : ℕ\na1 : 1 < a\ni n : ℕ\nnpos : 0 < n\nlem2 : ∀ (k : ℕ), k > n → k ≤ 2 * n → ↑(xn a1 k % xn a1 n) = ↑(xn a1 n) - ↑(xn a1 (2 * n - k))\nij : i < n + 1\nj2n : n + 1 ≤ 2 * n\njnn : n + 1 ≠ n\nntriv : ¬(a = 2 ∧ n = 1 ∧ i = 0 ∧ n + 1 = 2)\no : n = n ∨ n < n\nlin : i < n\nll : xn a1 (n - 1) + xn a1 (n - 1) ≤ xn a1 n\nnpm : succ (n - 1) = n\nil : i ≤ n - 1\nile : i = n - 1\ne : 2 * xn a1 (n - 1) = xn a1 n\na2 : a = 2\ns1 : n - 1 = 0\n⊢ a = 2 ∧ n = 1 ∧ i = 0 ∧ n + 1 = 2\n[PROOFSTEP]\nhave n1 : n = 1 := le_antisymm (tsub_eq_zero_iff_le.mp s1) npos\n[GOAL]\na : ℕ\na1 : 1 < a\ni n : ℕ\nnpos : 0 < n\nlem2 : ∀ (k : ℕ), k > n → k ≤ 2 * n → ↑(xn a1 k % xn a1 n) = ↑(xn a1 n) - ↑(xn a1 (2 * n - k))\nij : i < n + 1\nj2n : n + 1 ≤ 2 * n\njnn : n + 1 ≠ n\nntriv : ¬(a = 2 ∧ n = 1 ∧ i = 0 ∧ n + 1 = 2)\no : n = n ∨ n < n\nlin : i < n\nll : xn a1 (n - 1) + xn a1 (n - 1) ≤ xn a1 n\nnpm : succ (n - 1) = n\nil : i ≤ n - 1\nile : i = n - 1\ne : 2 * xn a1 (n - 1) = xn a1 n\na2 : a = 2\ns1 : n - 1 = 0\nn1 : n = 1\n⊢ a = 2 ∧ n = 1 ∧ i = 0 ∧ n + 1 = 2\n[PROOFSTEP]\nrw [ile, a2, n1]\n[GOAL]\na : ℕ\na1 : 1 < a\ni n : ℕ\nnpos : 0 < n\nlem2 : ∀ (k : ℕ), k > n → k ≤ 2 * n → ↑(xn a1 k % xn a1 n) = ↑(xn a1 n) - ↑(xn a1 (2 * n - k))\nij : i < n + 1\nj2n : n + 1 ≤ 2 * n\njnn : n + 1 ≠ n\nntriv : ¬(a = 2 ∧ n = 1 ∧ i = 0 ∧ n + 1 = 2)\no : n = n ∨ n < n\nlin : i < n\nll : xn a1 (n - 1) + xn a1 (n - 1) ≤ xn a1 n\nnpm : succ (n - 1) = n\nil : i ≤ n - 1\nile : i = n - 1\ne : 2 * xn a1 (n - 1) = xn a1 n\na2 : a = 2\ns1 : n - 1 = 0\nn1 : n = 1\n⊢ 2 = 2 ∧ 1 = 1 ∧ 1 - 1 = 0 ∧ 1 + 1 = 2\n[PROOFSTEP]\nexact ⟨rfl, rfl, rfl, rfl⟩\n[GOAL]\ncase refl.a.inr\na : ℕ\na1 : 1 < a\ni n : ℕ\nnpos : 0 < n\nlem2 : ∀ (k : ℕ), k > n → k ≤ 2 * n → ↑(xn a1 k % xn a1 n) = ↑(xn a1 n) - ↑(xn a1 (2 * n - k))\nij : i < n + 1\nj2n : n + 1 ≤ 2 * n\njnn : n + 1 ≠ n\nntriv : ¬(a = 2 ∧ n = 1 ∧ i = 0 ∧ n + 1 = 2)\no : n = n ∨ n < n\nein : i = n\n⊢ xn a1 (n - 1) + xn a1 i % xn a1 n < xn a1 n\n[PROOFSTEP]\nrw [ein, Nat.mod_self, add_zero]\n[GOAL]\ncase refl.a.inr\na : ℕ\na1 : 1 < a\ni n : ℕ\nnpos : 0 < n\nlem2 : ∀ (k : ℕ), k > n → k ≤ 2 * n → ↑(xn a1 k % xn a1 n) = ↑(xn a1 n) - ↑(xn a1 (2 * n - k))\nij : i < n + 1\nj2n : n + 1 ≤ 2 * n\njnn : n + 1 ≠ n\nntriv : ¬(a = 2 ∧ n = 1 ∧ i = 0 ∧ n + 1 = 2)\no : n = n ∨ n < n\nein : i = n\n⊢ xn a1 (n - 1) < xn a1 n\n[PROOFSTEP]\nexact strictMono_x _ (Nat.pred_lt npos.ne')\n[GOAL]\na : ℕ\na1✝ : 1 < a\ni n : ℕ\nnpos : 0 < n\nj : ℕ\nij : i < j + 1\nj2n : j + 1 ≤ 2 * n\njnn : j + 1 ≠ n\nntriv : ¬(a = 2 ∧ n = 1 ∧ i = 0 ∧ j + 1 = 2)\nlem2 : ∀ (k : ℕ), k > n → k ≤ 2 * n → ↑(xn a1✝ k % xn a1✝ n) = ↑(xn a1✝ n) - ↑(xn a1✝ (2 * n - k))\no : j = n ∨ n < j\njn✝ : j > n\njn : j ≠ n\ns : xn a1✝ j % xn a1✝ n < xn a1✝ (j + 1) % xn a1✝ n\nh : i < j\nx✝ : a = 2 ∧ n = 1 ∧ i = 0 ∧ j = 2\na1 : a = 2\nn1 : n = 1\ni0 : i = 0\nj2 : j = 2\n⊢ False\n[PROOFSTEP]\nrw [n1, j2] at j2n \n[GOAL]\na : ℕ\na1✝ : 1 < a\ni n : ℕ\nnpos : 0 < n\nj : ℕ\nij : i < j + 1\nj2n : 2 + 1 ≤ 2 * 1\njnn : j + 1 ≠ n\nntriv : ¬(a = 2 ∧ n = 1 ∧ i = 0 ∧ j + 1 = 2)\nlem2 : ∀ (k : ℕ), k > n → k ≤ 2 * n → ↑(xn a1✝ k % xn a1✝ n) = ↑(xn a1✝ n) - ↑(xn a1✝ (2 * n - k))\no : j = n ∨ n < j\njn✝ : j > n\njn : j ≠ n\ns : xn a1✝ j % xn a1✝ n < xn a1✝ (j + 1) % xn a1✝ n\nh : i < j\nx✝ : a = 2 ∧ n = 1 ∧ i = 0 ∧ j = 2\na1 : a = 2\nn1 : n = 1\ni0 : i = 0\nj2 : j = 2\n⊢ False\n[PROOFSTEP]\nexact absurd j2n (by decide)\n[GOAL]\na : ℕ\na1✝ : 1 < a\ni n : ℕ\nnpos : 0 < n\nj : ℕ\nij : i < j + 1\nj2n : 2 + 1 ≤ 2 * 1\njnn : j + 1 ≠ n\nntriv : ¬(a = 2 ∧ n = 1 ∧ i = 0 ∧ j + 1 = 2)\nlem2 : ∀ (k : ℕ), k > n → k ≤ 2 * n → ↑(xn a1✝ k % xn a1✝ n) = ↑(xn a1✝ n) - ↑(xn a1✝ (2 * n - k))\no : j = n ∨ n < j\njn✝ : j > n\njn : j ≠ n\ns : xn a1✝ j % xn a1✝ n < xn a1✝ (j + 1) % xn a1✝ n\nh : i < j\nx✝ : a = 2 ∧ n = 1 ∧ i = 0 ∧ j = 2\na1 : a = 2\nn1 : n = 1\ni0 : i = 0\nj2 : j = 2\n⊢ ¬2 + 1 ≤ 2 * 1\n[PROOFSTEP]\ndecide\n[GOAL]\na : ℕ\na1 : 1 < a\ni n : ℕ\nnpos : 0 < n\nj : ℕ\nij : i < j + 1\nj2n : j + 1 ≤ 2 * n\njnn : j + 1 ≠ n\nntriv : ¬(a = 2 ∧ n = 1 ∧ i = 0 ∧ j + 1 = 2)\nlem2 : ∀ (k : ℕ), k > n → k ≤ 2 * n → ↑(xn a1 k % xn a1 n) = ↑(xn a1 n) - ↑(xn a1 (2 * n - k))\no : j = n ∨ n < j\njn✝ : j > n\njn : j ≠ n\ns : xn a1 j % xn a1 n < xn a1 (j + 1) % xn a1 n\nh : i = j\n⊢ xn a1 i % xn a1 n < xn a1 (j + 1) % xn a1 n\n[PROOFSTEP]\nrw [h]\n[GOAL]\na : ℕ\na1 : 1 < a\ni n : ℕ\nnpos : 0 < n\nj : ℕ\nij : i < j + 1\nj2n : j + 1 ≤ 2 * n\njnn : j + 1 ≠ n\nntriv : ¬(a = 2 ∧ n = 1 ∧ i = 0 ∧ j + 1 = 2)\nlem2 : ∀ (k : ℕ), k > n → k ≤ 2 * n → ↑(xn a1 k % xn a1 n) = ↑(xn a1 n) - ↑(xn a1 (2 * n - k))\no : j = n ∨ n < j\njn✝ : j > n\njn : j ≠ n\ns : xn a1 j % xn a1 n < xn a1 (j + 1) % xn a1 n\nh : i = j\n⊢ xn a1 j % xn a1 n < xn a1 (j + 1) % xn a1 n\n[PROOFSTEP]\nexact s\n[GOAL]\na : ℕ\na1 : 1 < a\ni n : ℕ\nnpos : 0 < n\nj : ℕ\nij : i < j + 1\nj2n : j + 1 ≤ 2 * n\njnn : j + 1 ≠ n\nntriv : ¬(a = 2 ∧ n = 1 ∧ i = 0 ∧ j + 1 = 2)\nlem2 : ∀ (k : ℕ), k > n → k ≤ 2 * n → ↑(xn a1 k % xn a1 n) = ↑(xn a1 n) - ↑(xn a1 (2 * n - k))\no : j = n ∨ n < j\njn : j > n\nlem1 : j ≠ n → xn a1 j % xn a1 n < xn a1 (j + 1) % xn a1 n → xn a1 i % xn a1 n < xn a1 (j + 1) % xn a1 n\n⊢ ↑(xn a1 j % xn a1 n) < ↑(xn a1 (j + 1) % xn a1 n)\n[PROOFSTEP]\nrw [lem2 j jn (le_of_lt j2n), lem2 (j + 1) (Nat.le_succ_of_le jn) j2n]\n[GOAL]\na : ℕ\na1 : 1 < a\ni n : ℕ\nnpos : 0 < n\nj : ℕ\nij : i < j + 1\nj2n : j + 1 ≤ 2 * n\njnn : j + 1 ≠ n\nntriv : ¬(a = 2 ∧ n = 1 ∧ i = 0 ∧ j + 1 = 2)\nlem2 : ∀ (k : ℕ), k > n → k ≤ 2 * n → ↑(xn a1 k % xn a1 n) = ↑(xn a1 n) - ↑(xn a1 (2 * n - k))\no : j = n ∨ n < j\njn : j > n\nlem1 : j ≠ n → xn a1 j % xn a1 n < xn a1 (j + 1) % xn a1 n → xn a1 i % xn a1 n < xn a1 (j + 1) % xn a1 n\n⊢ ↑(xn a1 n) - ↑(xn a1 (2 * n - j)) < ↑(xn a1 n) - ↑(xn a1 (2 * n - (j + 1)))\n[PROOFSTEP]\nrefine' sub_lt_sub_left (Int.ofNat_lt_ofNat_of_lt <| strictMono_x _ _) _\n[GOAL]\na : ℕ\na1 : 1 < a\ni n : ℕ\nnpos : 0 < n\nj : ℕ\nij : i < j + 1\nj2n : j + 1 ≤ 2 * n\njnn : j + 1 ≠ n\nntriv : ¬(a = 2 ∧ n = 1 ∧ i = 0 ∧ j + 1 = 2)\nlem2 : ∀ (k : ℕ), k > n → k ≤ 2 * n → ↑(xn a1 k % xn a1 n) = ↑(xn a1 n) - ↑(xn a1 (2 * n - k))\no : j = n ∨ n < j\njn : j > n\nlem1 : j ≠ n → xn a1 j % xn a1 n < xn a1 (j + 1) % xn a1 n → xn a1 i % xn a1 n < xn a1 (j + 1) % xn a1 n\n⊢ 2 * n - (j + 1) < 2 * n - j\n[PROOFSTEP]\nrw [Nat.sub_succ]\n[GOAL]\na : ℕ\na1 : 1 < a\ni n : ℕ\nnpos : 0 < n\nj : ℕ\nij : i < j + 1\nj2n : j + 1 ≤ 2 * n\njnn : j + 1 ≠ n\nntriv : ¬(a = 2 ∧ n = 1 ∧ i = 0 ∧ j + 1 = 2)\nlem2 : ∀ (k : ℕ), k > n → k ≤ 2 * n → ↑(xn a1 k % xn a1 n) = ↑(xn a1 n) - ↑(xn a1 (2 * n - k))\no : j = n ∨ n < j\njn : j > n\nlem1 : j ≠ n → xn a1 j % xn a1 n < xn a1 (j + 1) % xn a1 n → xn a1 i % xn a1 n < xn a1 (j + 1) % xn a1 n\n⊢ pred (2 * n - j) < 2 * n - j\n[PROOFSTEP]\nexact Nat.pred_lt (_root_.ne_of_gt <| tsub_pos_of_lt j2n)\n[GOAL]\na : ℕ\na1 : 1 < a\ni j n : ℕ\nij : i ≤ j\nj2n : j ≤ 2 * n\nh : xn a1 i ≡ xn a1 j [MOD xn a1 n]\nntriv : ¬(a = 2 ∧ n = 1 ∧ i = 0 ∧ j = 2)\nnpos : n = 0\n⊢ i = j\n[PROOFSTEP]\nsimp_all\n[GOAL]\na : ℕ\na1 : 1 < a\ni j n : ℕ\nij : i ≤ j\nj2n : j ≤ 2 * n\nh : xn a1 i ≡ xn a1 j [MOD xn a1 n]\nntriv : ¬(a = 2 ∧ n = 1 ∧ i = 0 ∧ j = 2)\nnpos : ¬n = 0\nij' : i < j\njn : j = n\n⊢ False\n[PROOFSTEP]\nrefine' _root_.ne_of_gt _ h\n[GOAL]\na : ℕ\na1 : 1 < a\ni j n : ℕ\nij : i ≤ j\nj2n : j ≤ 2 * n\nh : xn a1 i ≡ xn a1 j [MOD xn a1 n]\nntriv : ¬(a = 2 ∧ n = 1 ∧ i = 0 ∧ j = 2)\nnpos : ¬n = 0\nij' : i < j\njn : j = n\n⊢ xn a1 j % xn a1 n < xn a1 i % xn a1 n\n[PROOFSTEP]\nrw [jn, Nat.mod_self]\n[GOAL]\na : ℕ\na1 : 1 < a\ni j n : ℕ\nij : i ≤ j\nj2n : j ≤ 2 * n\nh : xn a1 i ≡ xn a1 j [MOD xn a1 n]\nntriv : ¬(a = 2 ∧ n = 1 ∧ i = 0 ∧ j = 2)\nnpos : ¬n = 0\nij' : i < j\njn : j = n\n⊢ 0 < xn a1 i % xn a1 n\n[PROOFSTEP]\nhave x0 : 0 < xn a1 0 % xn a1 n :=\n  by\n  rw [Nat.mod_eq_of_lt (strictMono_x a1 (Nat.pos_of_ne_zero npos))]\n  exact Nat.succ_pos _\n[GOAL]\na : ℕ\na1 : 1 < a\ni j n : ℕ\nij : i ≤ j\nj2n : j ≤ 2 * n\nh : xn a1 i ≡ xn a1 j [MOD xn a1 n]\nntriv : ¬(a = 2 ∧ n = 1 ∧ i = 0 ∧ j = 2)\nnpos : ¬n = 0\nij' : i < j\njn : j = n\n⊢ 0 < xn a1 0 % xn a1 n\n[PROOFSTEP]\nrw [Nat.mod_eq_of_lt (strictMono_x a1 (Nat.pos_of_ne_zero npos))]\n[GOAL]\na : ℕ\na1 : 1 < a\ni j n : ℕ\nij : i ≤ j\nj2n : j ≤ 2 * n\nh : xn a1 i ≡ xn a1 j [MOD xn a1 n]\nntriv : ¬(a = 2 ∧ n = 1 ∧ i = 0 ∧ j = 2)\nnpos : ¬n = 0\nij' : i < j\njn : j = n\n⊢ 0 < xn a1 0\n[PROOFSTEP]\nexact Nat.succ_pos _\n[GOAL]\na : ℕ\na1 : 1 < a\ni j n : ℕ\nij : i ≤ j\nj2n : j ≤ 2 * n\nh : xn a1 i ≡ xn a1 j [MOD xn a1 n]\nntriv : ¬(a = 2 ∧ n = 1 ∧ i = 0 ∧ j = 2)\nnpos : ¬n = 0\nij' : i < j\njn : j = n\nx0 : 0 < xn a1 0 % xn a1 n\n⊢ 0 < xn a1 i % xn a1 n\n[PROOFSTEP]\ncases' i with i\n[GOAL]\ncase zero\na : ℕ\na1 : 1 < a\nj n : ℕ\nj2n : j ≤ 2 * n\nnpos : ¬n = 0\njn : j = n\nx0 : 0 < xn a1 0 % xn a1 n\nij : zero ≤ j\nh : xn a1 zero ≡ xn a1 j [MOD xn a1 n]\nntriv : ¬(a = 2 ∧ n = 1 ∧ zero = 0 ∧ j = 2)\nij' : zero < j\n⊢ 0 < xn a1 zero % xn a1 n\ncase succ\na : ℕ\na1 : 1 < a\nj n : ℕ\nj2n : j ≤ 2 * n\nnpos : ¬n = 0\njn : j = n\nx0 : 0 < xn a1 0 % xn a1 n\ni : ℕ\nij : succ i ≤ j\nh : xn a1 (succ i) ≡ xn a1 j [MOD xn a1 n]\nntriv : ¬(a = 2 ∧ n = 1 ∧ succ i = 0 ∧ j = 2)\nij' : succ i < j\n⊢ 0 < xn a1 (succ i) % xn a1 n\n[PROOFSTEP]\nexact x0\n[GOAL]\ncase succ\na : ℕ\na1 : 1 < a\nj n : ℕ\nj2n : j ≤ 2 * n\nnpos : ¬n = 0\njn : j = n\nx0 : 0 < xn a1 0 % xn a1 n\ni : ℕ\nij : succ i ≤ j\nh : xn a1 (succ i) ≡ xn a1 j [MOD xn a1 n]\nntriv : ¬(a = 2 ∧ n = 1 ∧ succ i = 0 ∧ j = 2)\nij' : succ i < j\n⊢ 0 < xn a1 (succ i) % xn a1 n\n[PROOFSTEP]\nrw [jn] at ij' \n[GOAL]\ncase succ\na : ℕ\na1 : 1 < a\nj n : ℕ\nj2n : j ≤ 2 * n\nnpos : ¬n = 0\njn : j = n\nx0 : 0 < xn a1 0 % xn a1 n\ni : ℕ\nij : succ i ≤ j\nh : xn a1 (succ i) ≡ xn a1 j [MOD xn a1 n]\nntriv : ¬(a = 2 ∧ n = 1 ∧ succ i = 0 ∧ j = 2)\nij' : succ i < n\n⊢ 0 < xn a1 (succ i) % xn a1 n\n[PROOFSTEP]\nexact\n  x0.trans\n    (eq_of_xn_modEq_lem3 _ (Nat.pos_of_ne_zero npos) (Nat.succ_pos _) (le_trans ij j2n) (_root_.ne_of_lt ij')\n      fun ⟨_, n1, _, i2⟩ => by rw [n1, i2] at ij' ; exact absurd ij' (by decide))\n[GOAL]\na : ℕ\na1 : 1 < a\nj n : ℕ\nj2n : j ≤ 2 * n\nnpos : ¬n = 0\njn : j = n\nx0 : 0 < xn a1 0 % xn a1 n\ni : ℕ\nij : succ i ≤ j\nh : xn a1 (succ i) ≡ xn a1 j [MOD xn a1 n]\nntriv : ¬(a = 2 ∧ n = 1 ∧ succ i = 0 ∧ j = 2)\nij' : succ i < n\nx✝ : a = 2 ∧ n = 1 ∧ 0 = 0 ∧ succ i = 2\nleft✝¹ : a = 2\nn1 : n = 1\nleft✝ : 0 = 0\ni2 : succ i = 2\n⊢ False\n[PROOFSTEP]\nrw [n1, i2] at ij' \n[GOAL]\na : ℕ\na1 : 1 < a\nj n : ℕ\nj2n : j ≤ 2 * n\nnpos : ¬n = 0\njn : j = n\nx0 : 0 < xn a1 0 % xn a1 n\ni : ℕ\nij : succ i ≤ j\nh : xn a1 (succ i) ≡ xn a1 j [MOD xn a1 n]\nntriv : ¬(a = 2 ∧ n = 1 ∧ succ i = 0 ∧ j = 2)\nij' : 2 < 1\nx✝ : a = 2 ∧ n = 1 ∧ 0 = 0 ∧ succ i = 2\nleft✝¹ : a = 2\nn1 : n = 1\nleft✝ : 0 = 0\ni2 : succ i = 2\n⊢ False\n[PROOFSTEP]\nexact absurd ij' (by decide)\n[GOAL]\na : ℕ\na1 : 1 < a\nj n : ℕ\nj2n : j ≤ 2 * n\nnpos : ¬n = 0\njn : j = n\nx0 : 0 < xn a1 0 % xn a1 n\ni : ℕ\nij : succ i ≤ j\nh : xn a1 (succ i) ≡ xn a1 j [MOD xn a1 n]\nntriv : ¬(a = 2 ∧ n = 1 ∧ succ i = 0 ∧ j = 2)\nij' : 2 < 1\nx✝ : a = 2 ∧ n = 1 ∧ 0 = 0 ∧ succ i = 2\nleft✝¹ : a = 2\nn1 : n = 1\nleft✝ : 0 = 0\ni2 : succ i = 2\n⊢ ¬2 < 1\n[PROOFSTEP]\ndecide\n[GOAL]\na : ℕ\na1 : 1 < a\ni j n : ℕ\nipos : 0 < i\nhin : i ≤ n\nj4n : j ≤ 4 * n\nh : xn a1 j ≡ xn a1 i [MOD xn a1 n]\n⊢ i ≤ 2 * n\n[PROOFSTEP]\napply le_trans hin\n[GOAL]\na : ℕ\na1 : 1 < a\ni j n : ℕ\nipos : 0 < i\nhin : i ≤ n\nj4n : j ≤ 4 * n\nh : xn a1 j ≡ xn a1 i [MOD xn a1 n]\n⊢ n ≤ 2 * n\n[PROOFSTEP]\nrw [two_mul]\n[GOAL]\na : ℕ\na1 : 1 < a\ni j n : ℕ\nipos : 0 < i\nhin : i ≤ n\nj4n : j ≤ 4 * n\nh : xn a1 j ≡ xn a1 i [MOD xn a1 n]\n⊢ n ≤ n + n\n[PROOFSTEP]\napply Nat.le_add_left\n[GOAL]\na : ℕ\na1 : 1 < a\ni j n : ℕ\nipos : 0 < i\nhin : i ≤ n\nj4n : j ≤ 4 * n\nh : xn a1 j ≡ xn a1 i [MOD xn a1 n]\ni2n : i ≤ 2 * n\nj2n : j ≤ 2 * n\na2 : a = 2\nn1 : n = 1\nj0 : j = 0\ni2 : i = 2\n⊢ False\n[PROOFSTEP]\nrw [n1, i2] at hin \n[GOAL]\na : ℕ\na1 : 1 < a\ni j n : ℕ\nipos : 0 < i\nhin : 2 ≤ 1\nj4n : j ≤ 4 * n\nh : xn a1 j ≡ xn a1 i [MOD xn a1 n]\ni2n : i ≤ 2 * n\nj2n : j ≤ 2 * n\na2 : a = 2\nn1 : n = 1\nj0 : j = 0\ni2 : i = 2\n⊢ False\n[PROOFSTEP]\nexact absurd hin (by decide)\n[GOAL]\na : ℕ\na1 : 1 < a\ni j n : ℕ\nipos : 0 < i\nhin : 2 ≤ 1\nj4n : j ≤ 4 * n\nh : xn a1 j ≡ xn a1 i [MOD xn a1 n]\ni2n : i ≤ 2 * n\nj2n : j ≤ 2 * n\na2 : a = 2\nn1 : n = 1\nj0 : j = 0\ni2 : i = 2\n⊢ ¬2 ≤ 1\n[PROOFSTEP]\ndecide\n[GOAL]\na : ℕ\na1 : 1 < a\ni j n : ℕ\nipos : 0 < i\nhin : i ≤ n\nj4n : j ≤ 4 * n\nh : xn a1 j ≡ xn a1 i [MOD xn a1 n]\ni2n : i ≤ 2 * n\nj2n : 2 * n < j\n⊢ 4 * n - j + ?m.157805 ipos hin j4n h i2n j2n ≤ 2 * n + ?m.157805 ipos hin j4n h i2n j2n\n[PROOFSTEP]\nrw [tsub_add_cancel_of_le j4n, show 4 * n = 2 * n + 2 * n from right_distrib 2 2 n]\n[GOAL]\na : ℕ\na1 : 1 < a\ni j n : ℕ\nipos : 0 < i\nhin : i ≤ n\nj4n : j ≤ 4 * n\nh : xn a1 j ≡ xn a1 i [MOD xn a1 n]\ni2n : i ≤ 2 * n\nj2n : 2 * n < j\n⊢ 2 * n + 2 * n ≤ 2 * n + j\n[PROOFSTEP]\nexact Nat.add_le_add_left (le_of_lt j2n) _\n[GOAL]\na : ℕ\na1 : 1 < a\ni j n : ℕ\nipos : 0 < i\nhin : i ≤ n\nj4n : j ≤ 4 * n\nh : xn a1 j ≡ xn a1 i [MOD xn a1 n]\ni2n : i ≤ 2 * n\nj2n : 2 * n < j\nj42n : 4 * n - j ≤ 2 * n\n⊢ xn a1 j ≡ xn a1 (4 * n - j) [MOD xn a1 n]\n[PROOFSTEP]\nlet t := xn_modEq_x4n_sub a1 j42n\n[GOAL]\na : ℕ\na1 : 1 < a\ni j n : ℕ\nipos : 0 < i\nhin : i ≤ n\nj4n : j ≤ 4 * n\nh : xn a1 j ≡ xn a1 i [MOD xn a1 n]\ni2n : i ≤ 2 * n\nj2n : 2 * n < j\nj42n : 4 * n - j ≤ 2 * n\nt : xn a1 (4 * n - (4 * n - j)) ≡ xn a1 (4 * n - j) [MOD xn a1 n] := xn_modEq_x4n_sub a1 j42n\n⊢ xn a1 j ≡ xn a1 (4 * n - j) [MOD xn a1 n]\n[PROOFSTEP]\nrwa [tsub_tsub_cancel_of_le j4n] at t \n[GOAL]\na : ℕ\na1 : 1 < a\ni j n : ℕ\nipos : 0 < i\nhin : i ≤ n\nj4n : j ≤ 4 * n\nh : xn a1 j ≡ xn a1 i [MOD xn a1 n]\ni2n : i ≤ 2 * n\nj2n : 2 * n < j\nj42n : 4 * n - j ≤ 2 * n\na2 : a = 2\nn1 : n = 1\ni2 : i = 2\n⊢ 4 * n - j ≠ 0\n[PROOFSTEP]\nrw [n1, i2] at hin \n[GOAL]\na : ℕ\na1 : 1 < a\ni j n : ℕ\nipos : 0 < i\nhin : 2 ≤ 1\nj4n : j ≤ 4 * n\nh : xn a1 j ≡ xn a1 i [MOD xn a1 n]\ni2n : i ≤ 2 * n\nj2n : 2 * n < j\nj42n : 4 * n - j ≤ 2 * n\na2 : a = 2\nn1 : n = 1\ni2 : i = 2\n⊢ 4 * n - j ≠ 0\n[PROOFSTEP]\nexact absurd hin (by decide)\n[GOAL]\na : ℕ\na1 : 1 < a\ni j n : ℕ\nipos : 0 < i\nhin : 2 ≤ 1\nj4n : j ≤ 4 * n\nh : xn a1 j ≡ xn a1 i [MOD xn a1 n]\ni2n : i ≤ 2 * n\nj2n : 2 * n < j\nj42n : 4 * n - j ≤ 2 * n\na2 : a = 2\nn1 : n = 1\ni2 : i = 2\n⊢ ¬2 ≤ 1\n[PROOFSTEP]\ndecide\n[GOAL]\na : ℕ\na1 : 1 < a\ni j n : ℕ\nipos : 0 < i\nhin : i ≤ n\nj4n : j ≤ 4 * n\nh : xn a1 j ≡ xn a1 i [MOD xn a1 n]\ni2n : i ≤ 2 * n\nj2n : 2 * n < j\nthis : i = 4 * n - j\n⊢ j + i = 4 * n\n[PROOFSTEP]\nrw [this, add_tsub_cancel_of_le j4n]\n[GOAL]\na : ℕ\na1 : 1 < a\ni j n : ℕ\nipos : 0 < i\nhin : i ≤ n\nh : xn a1 j ≡ xn a1 i [MOD xn a1 n]\nj' : ℕ := j % (4 * n)\n⊢ 0 < 4\n[PROOFSTEP]\ndecide\n[GOAL]\na : ℕ\na1 : 1 < a\ni j n : ℕ\nipos : 0 < i\nhin : i ≤ n\nh : xn a1 j ≡ xn a1 i [MOD xn a1 n]\nj' : ℕ := j % (4 * n)\nn4 : 0 < 4 * n\njl : j' < 4 * n\n⊢ j ≡ j' [MOD 4 * n]\n[PROOFSTEP]\ndelta ModEq\n[GOAL]\na : ℕ\na1 : 1 < a\ni j n : ℕ\nipos : 0 < i\nhin : i ≤ n\nh : xn a1 j ≡ xn a1 i [MOD xn a1 n]\nj' : ℕ := j % (4 * n)\nn4 : 0 < 4 * n\njl : j' < 4 * n\n⊢ j % (4 * n) = j' % (4 * n)\n[PROOFSTEP]\nrw [Nat.mod_eq_of_lt jl]\n[GOAL]\na : ℕ\na1 : 1 < a\ni j n : ℕ\nipos : 0 < i\nhin : i ≤ n\nh : xn a1 j ≡ xn a1 i [MOD xn a1 n]\nj' : ℕ := j % (4 * n)\nn4 : 0 < 4 * n\njl : j' < 4 * n\njj : j ≡ j' [MOD 4 * n]\n⊢ ∀ (j_1 q : ℕ), xn a1 (j_1 + 4 * n * q) ≡ xn a1 j_1 [MOD xn a1 n]\n[PROOFSTEP]\nintro j q\n[GOAL]\na : ℕ\na1 : 1 < a\ni j✝ n : ℕ\nipos : 0 < i\nhin : i ≤ n\nh : xn a1 j✝ ≡ xn a1 i [MOD xn a1 n]\nj' : ℕ := j✝ % (4 * n)\nn4 : 0 < 4 * n\njl : j' < 4 * n\njj : j✝ ≡ j' [MOD 4 * n]\nj q : ℕ\n⊢ xn a1 (j + 4 * n * q) ≡ xn a1 j [MOD xn a1 n]\n[PROOFSTEP]\ninduction' q with q IH\n[GOAL]\ncase zero\na : ℕ\na1 : 1 < a\ni j✝ n : ℕ\nipos : 0 < i\nhin : i ≤ n\nh : xn a1 j✝ ≡ xn a1 i [MOD xn a1 n]\nj' : ℕ := j✝ % (4 * n)\nn4 : 0 < 4 * n\njl : j' < 4 * n\njj : j✝ ≡ j' [MOD 4 * n]\nj : ℕ\n⊢ xn a1 (j + 4 * n * zero) ≡ xn a1 j [MOD xn a1 n]\n[PROOFSTEP]\nsimp [ModEq.refl]\n[GOAL]\ncase succ\na : ℕ\na1 : 1 < a\ni j✝ n : ℕ\nipos : 0 < i\nhin : i ≤ n\nh : xn a1 j✝ ≡ xn a1 i [MOD xn a1 n]\nj' : ℕ := j✝ % (4 * n)\nn4 : 0 < 4 * n\njl : j' < 4 * n\njj : j✝ ≡ j' [MOD 4 * n]\nj q : ℕ\nIH : xn a1 (j + 4 * n * q) ≡ xn a1 j [MOD xn a1 n]\n⊢ xn a1 (j + 4 * n * succ q) ≡ xn a1 j [MOD xn a1 n]\n[PROOFSTEP]\nrw [Nat.mul_succ, ← add_assoc, add_comm]\n[GOAL]\ncase succ\na : ℕ\na1 : 1 < a\ni j✝ n : ℕ\nipos : 0 < i\nhin : i ≤ n\nh : xn a1 j✝ ≡ xn a1 i [MOD xn a1 n]\nj' : ℕ := j✝ % (4 * n)\nn4 : 0 < 4 * n\njl : j' < 4 * n\njj : j✝ ≡ j' [MOD 4 * n]\nj q : ℕ\nIH : xn a1 (j + 4 * n * q) ≡ xn a1 j [MOD xn a1 n]\n⊢ xn a1 (4 * n + (j + 4 * n * q)) ≡ xn a1 j [MOD xn a1 n]\n[PROOFSTEP]\nexact (xn_modEq_x4n_add _ _ _).trans IH\n[GOAL]\na : ℕ\na1 : 1 < a\ni j n : ℕ\nipos : 0 < i\nhin : i ≤ n\nh : xn a1 j ≡ xn a1 i [MOD xn a1 n]\nj' : ℕ := j % (4 * n)\nn4 : 0 < 4 * n\njl : j' < 4 * n\njj : j ≡ j' [MOD 4 * n]\nthis : ∀ (j_1 q : ℕ), xn a1 (j_1 + 4 * n * q) ≡ xn a1 j_1 [MOD xn a1 n]\nji : j' = i\n⊢ j ≡ i [MOD 4 * n]\n[PROOFSTEP]\nrwa [← ji]\n[GOAL]\na : ℕ\na1 : 1 < a\ni j n : ℕ\nipos : 0 < i\nhin : i ≤ n\nh : xn a1 j ≡ xn a1 i [MOD xn a1 n]\nj' : ℕ := j % (4 * n)\nn4 : 0 < 4 * n\njl : j' < 4 * n\njj : j ≡ j' [MOD 4 * n]\nthis : ∀ (j_1 q : ℕ), xn a1 (j_1 + 4 * n * q) ≡ xn a1 j_1 [MOD xn a1 n]\nji : j' + i = 4 * n\n⊢ j' + i ≡ 0 [MOD 4 * n]\n[PROOFSTEP]\nrw [ji]\n[GOAL]\na : ℕ\na1 : 1 < a\ni j n : ℕ\nipos : 0 < i\nhin : i ≤ n\nh : xn a1 j ≡ xn a1 i [MOD xn a1 n]\nj' : ℕ := j % (4 * n)\nn4 : 0 < 4 * n\njl : j' < 4 * n\njj : j ≡ j' [MOD 4 * n]\nthis : ∀ (j_1 q : ℕ), xn a1 (j_1 + 4 * n * q) ≡ xn a1 j_1 [MOD xn a1 n]\nji : j' + i = 4 * n\n⊢ 4 * n ≡ 0 [MOD 4 * n]\n[PROOFSTEP]\nexact dvd_rfl.modEq_zero_nat\n[GOAL]\na : ℕ\na1 : 1 < a\ni j n : ℕ\nipos : 0 < i\nhin : i ≤ n\nh : xn a1 j ≡ xn a1 i [MOD xn a1 n]\nj' : ℕ := j % (4 * n)\nn4 : 0 < 4 * n\njl : j' < 4 * n\njj : j ≡ j' [MOD 4 * n]\nthis : ∀ (j_1 q : ℕ), xn a1 (j_1 + 4 * n * q) ≡ xn a1 j_1 [MOD xn a1 n]\n⊢ xn a1 j ≡ xn a1 j' [MOD xn a1 n]\n[PROOFSTEP]\nrw [← Nat.mod_add_div j (4 * n)]\n[GOAL]\na : ℕ\na1 : 1 < a\ni j n : ℕ\nipos : 0 < i\nhin : i ≤ n\nh : xn a1 j ≡ xn a1 i [MOD xn a1 n]\nj' : ℕ := j % (4 * n)\nn4 : 0 < 4 * n\njl : j' < 4 * n\njj : j ≡ j' [MOD 4 * n]\nthis : ∀ (j_1 q : ℕ), xn a1 (j_1 + 4 * n * q) ≡ xn a1 j_1 [MOD xn a1 n]\n⊢ xn a1 (j % (4 * n) + 4 * n * (j / (4 * n))) ≡ xn a1 j' [MOD xn a1 n]\n[PROOFSTEP]\nexact this j' _\n[GOAL]\na b c : ℕ\na1 : 1 < a\nb1 : 1 < b\nh : a ≡ b [MOD c]\n⊢ xn a1 0 ≡ xn b1 0 [MOD c] ∧ yn a1 0 ≡ yn b1 0 [MOD c]\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase left\na b c : ℕ\na1 : 1 < a\nb1 : 1 < b\nh : a ≡ b [MOD c]\n⊢ xn a1 0 ≡ xn b1 0 [MOD c]\n[PROOFSTEP]\nrfl\n[GOAL]\ncase right\na b c : ℕ\na1 : 1 < a\nb1 : 1 < b\nh : a ≡ b [MOD c]\n⊢ yn a1 0 ≡ yn b1 0 [MOD c]\n[PROOFSTEP]\nrfl\n[GOAL]\na b c : ℕ\na1 : 1 < a\nb1 : 1 < b\nh : a ≡ b [MOD c]\n⊢ xn a1 1 ≡ xn b1 1 [MOD c] ∧ yn a1 1 ≡ yn b1 1 [MOD c]\n[PROOFSTEP]\nsimp\n[GOAL]\na b c : ℕ\na1 : 1 < a\nb1 : 1 < b\nh : a ≡ b [MOD c]\n⊢ a ≡ b [MOD c] ∧ 1 ≡ 1 [MOD c]\n[PROOFSTEP]\nexact ⟨h, ModEq.refl 1⟩\n[GOAL]\na b c : ℕ\na1 : 1 < a\nb1 : 1 < b\nh : a ≡ b [MOD c]\nn : ℕ\n⊢ xn a1 (n + 2) + xn a1 n ≡ xn b1 (n + 2) + xn b1 n [MOD c]\n[PROOFSTEP]\nrw [xn_succ_succ a1, xn_succ_succ b1]\n[GOAL]\na b c : ℕ\na1 : 1 < a\nb1 : 1 < b\nh : a ≡ b [MOD c]\nn : ℕ\n⊢ 2 * a * xn a1 (n + 1) ≡ 2 * b * xn b1 (n + 1) [MOD c]\n[PROOFSTEP]\nexact (h.mul_left _).mul (xy_modEq_of_modEq _ _ h (n + 1)).left\n[GOAL]\na b c : ℕ\na1 : 1 < a\nb1 : 1 < b\nh : a ≡ b [MOD c]\nn : ℕ\n⊢ yn a1 (n + 2) + yn (_ : 1 < a) n ≡ yn b1 (n + 2) + yn (_ : 1 < b) n [MOD c]\n[PROOFSTEP]\nrw [yn_succ_succ a1, yn_succ_succ b1]\n[GOAL]\na b c : ℕ\na1 : 1 < a\nb1 : 1 < b\nh : a ≡ b [MOD c]\nn : ℕ\n⊢ 2 * a * yn a1 (n + 1) ≡ 2 * b * yn b1 (n + 1) [MOD c]\n[PROOFSTEP]\nexact (h.mul_left _).mul (xy_modEq_of_modEq _ _ h (n + 1)).right\n[GOAL]\na k x y : ℕ\nx✝ : ∃ a1, xn a1 k = x ∧ yn a1 k = y\na1 : 1 < a\nhx : xn a1 k = x\nhy : yn a1 k = y\n⊢ 1 < a ∧\n    k ≤ y ∧\n      (x = 1 ∧ y = 0 ∨\n        ∃ u v s t b,\n          x * x - (a * a - 1) * y * y = 1 ∧\n            u * u - (a * a - 1) * v * v = 1 ∧\n              s * s - (b * b - 1) * t * t = 1 ∧\n                1 < b ∧ b ≡ 1 [MOD 4 * y] ∧ b ≡ a [MOD u] ∧ 0 < v ∧ y * y ∣ v ∧ s ≡ x [MOD u] ∧ t ≡ k [MOD 4 * y])\n[PROOFSTEP]\nrw [← hx, ← hy]\n[GOAL]\na k x y : ℕ\nx✝ : ∃ a1, xn a1 k = x ∧ yn a1 k = y\na1 : 1 < a\nhx : xn a1 k = x\nhy : yn a1 k = y\n⊢ 1 < a ∧\n    k ≤ yn a1 k ∧\n      (xn a1 k = 1 ∧ yn a1 k = 0 ∨\n        ∃ u v s t b,\n          xn a1 k * xn a1 k - (a * a - 1) * yn a1 k * yn a1 k = 1 ∧\n            u * u - (a * a - 1) * v * v = 1 ∧\n              s * s - (b * b - 1) * t * t = 1 ∧\n                1 < b ∧\n                  b ≡ 1 [MOD 4 * yn a1 k] ∧\n                    b ≡ a [MOD u] ∧ 0 < v ∧ yn a1 k * yn a1 k ∣ v ∧ s ≡ xn a1 k [MOD u] ∧ t ≡ k [MOD 4 * yn a1 k])\n[PROOFSTEP]\nrefine' ⟨a1, (Nat.eq_zero_or_pos k).elim (fun k0 => by rw [k0]; exact ⟨le_rfl, Or.inl ⟨rfl, rfl⟩⟩) fun kpos => _⟩\n[GOAL]\na k x y : ℕ\nx✝ : ∃ a1, xn a1 k = x ∧ yn a1 k = y\na1 : 1 < a\nhx : xn a1 k = x\nhy : yn a1 k = y\nk0 : k = 0\n⊢ k ≤ yn a1 k ∧\n    (xn a1 k = 1 ∧ yn a1 k = 0 ∨\n      ∃ u v s t b,\n        xn a1 k * xn a1 k - (a * a - 1) * yn a1 k * yn a1 k = 1 ∧\n          u * u - (a * a - 1) * v * v = 1 ∧\n            s * s - (b * b - 1) * t * t = 1 ∧\n              1 < b ∧\n                b ≡ 1 [MOD 4 * yn a1 k] ∧\n                  b ≡ a [MOD u] ∧ 0 < v ∧ yn a1 k * yn a1 k ∣ v ∧ s ≡ xn a1 k [MOD u] ∧ t ≡ k [MOD 4 * yn a1 k])\n[PROOFSTEP]\nrw [k0]\n[GOAL]\na k x y : ℕ\nx✝ : ∃ a1, xn a1 k = x ∧ yn a1 k = y\na1 : 1 < a\nhx : xn a1 k = x\nhy : yn a1 k = y\nk0 : k = 0\n⊢ 0 ≤ yn a1 0 ∧\n    (xn a1 0 = 1 ∧ yn a1 0 = 0 ∨\n      ∃ u v s t b,\n        xn a1 0 * xn a1 0 - (a * a - 1) * yn a1 0 * yn a1 0 = 1 ∧\n          u * u - (a * a - 1) * v * v = 1 ∧\n            s * s - (b * b - 1) * t * t = 1 ∧\n              1 < b ∧\n                b ≡ 1 [MOD 4 * yn a1 0] ∧\n                  b ≡ a [MOD u] ∧ 0 < v ∧ yn a1 0 * yn a1 0 ∣ v ∧ s ≡ xn a1 0 [MOD u] ∧ t ≡ 0 [MOD 4 * yn a1 0])\n[PROOFSTEP]\nexact ⟨le_rfl, Or.inl ⟨rfl, rfl⟩⟩\n[GOAL]\na k x y : ℕ\nx✝ : ∃ a1, xn a1 k = x ∧ yn a1 k = y\na1 : 1 < a\nhx : xn a1 k = x\nhy : yn a1 k = y\nkpos : k > 0\n⊢ k ≤ yn a1 k ∧\n    (xn a1 k = 1 ∧ yn a1 k = 0 ∨\n      ∃ u v s t b,\n        xn a1 k * xn a1 k - (a * a - 1) * yn a1 k * yn a1 k = 1 ∧\n          u * u - (a * a - 1) * v * v = 1 ∧\n            s * s - (b * b - 1) * t * t = 1 ∧\n              1 < b ∧\n                b ≡ 1 [MOD 4 * yn a1 k] ∧\n                  b ≡ a [MOD u] ∧ 0 < v ∧ yn a1 k * yn a1 k ∣ v ∧ s ≡ xn a1 k [MOD u] ∧ t ≡ k [MOD 4 * yn a1 k])\n[PROOFSTEP]\nexact\n  let x := xn a1 k\n  let y := yn a1 k\n  let m := 2 * (k * y)\n  let u := xn a1 m\n  let v := yn a1 m\n  have ky : k ≤ y := yn_ge_n a1 k\n  have yv : y * y ∣ v := (ysq_dvd_yy a1 k).trans <| (y_dvd_iff _ _ _).2 <| dvd_mul_left _ _\n  have uco : Nat.coprime u (4 * y) :=\n    have : 2 ∣ v := modEq_zero_iff_dvd.1 <| (yn_modEq_two _ _).trans (dvd_mul_right _ _).modEq_zero_nat\n    have : Nat.coprime u 2 := (xy_coprime a1 m).coprime_dvd_right this\n    (this.mul_right this).mul_right <| (xy_coprime _ _).coprime_dvd_right (dvd_of_mul_left_dvd yv)\n  let ⟨b, ba, bm1⟩ := chineseRemainder uco a 1\n  have m1 : 1 < m :=\n    have : 0 < k * y := mul_pos kpos (strictMono_y a1 kpos)\n    Nat.mul_le_mul_left 2 this\n  have vp : 0 < v := strictMono_y a1 (lt_trans zero_lt_one m1)\n  have b1 : 1 < b :=\n    have : xn a1 1 < u := strictMono_x a1 m1\n    have : a < u := by simp at this ; exact this\n    lt_of_lt_of_le a1 <| by\n      delta ModEq at ba ; rw [Nat.mod_eq_of_lt this] at ba ; rw [← ba]\n      apply Nat.mod_le\n  let s := xn b1 k\n  let t := yn b1 k\n  have sx : s ≡ x [MOD u] := (xy_modEq_of_modEq b1 a1 ba k).left\n  have tk : t ≡ k [MOD 4 * y] :=\n    have : 4 * y ∣ b - 1 := Int.coe_nat_dvd.1 <| by rw [Int.ofNat_sub (le_of_lt b1)]; exact bm1.symm.dvd\n    (yn_modEq_a_sub_one _ _).of_dvd this\n  ⟨ky, Or.inr ⟨u, v, s, t, b, pell_eq _ _, pell_eq _ _, pell_eq _ _, b1, bm1, ba, vp, yv, sx, tk⟩⟩\n[GOAL]\na k x✝¹ y✝ : ℕ\nx✝ : ∃ a1, xn a1 k = x✝¹ ∧ yn a1 k = y✝\na1 : 1 < a\nhx : xn a1 k = x✝¹\nhy : yn a1 k = y✝\nkpos : k > 0\nx : ℕ := xn a1 k\ny : ℕ := yn a1 k\nm : ℕ := 2 * (k * y)\nu : ℕ := xn a1 m\nv : ℕ := yn a1 m\nky : k ≤ y\nyv : y * y ∣ v\nuco : coprime u (4 * y)\nb : ℕ\nba : b ≡ a [MOD u]\nbm1 : b ≡ 1 [MOD 4 * y]\nm1 : 1 < m\nvp : 0 < v\nthis : xn a1 1 < u\n⊢ a < u\n[PROOFSTEP]\nsimp at this \n[GOAL]\na k x✝¹ y✝ : ℕ\nx✝ : ∃ a1, xn a1 k = x✝¹ ∧ yn a1 k = y✝\na1 : 1 < a\nhx : xn a1 k = x✝¹\nhy : yn a1 k = y✝\nkpos : k > 0\nx : ℕ := xn a1 k\ny : ℕ := yn a1 k\nm : ℕ := 2 * (k * y)\nu : ℕ := xn a1 m\nv : ℕ := yn a1 m\nky : k ≤ y\nyv : y * y ∣ v\nuco : coprime u (4 * y)\nb : ℕ\nba : b ≡ a [MOD u]\nbm1 : b ≡ 1 [MOD 4 * y]\nm1 : 1 < m\nvp : 0 < v\nthis : a < xn a1 (2 * (k * yn a1 k))\n⊢ a < u\n[PROOFSTEP]\nexact this\n[GOAL]\na k x✝¹ y✝ : ℕ\nx✝ : ∃ a1, xn a1 k = x✝¹ ∧ yn a1 k = y✝\na1 : 1 < a\nhx : xn a1 k = x✝¹\nhy : yn a1 k = y✝\nkpos : k > 0\nx : ℕ := xn a1 k\ny : ℕ := yn a1 k\nm : ℕ := 2 * (k * y)\nu : ℕ := xn a1 m\nv : ℕ := yn a1 m\nky : k ≤ y\nyv : y * y ∣ v\nuco : coprime u (4 * y)\nb : ℕ\nba : b ≡ a [MOD u]\nbm1 : b ≡ 1 [MOD 4 * y]\nm1 : 1 < m\nvp : 0 < v\nthis✝ : xn a1 1 < u\nthis : a < u\n⊢ a ≤ b\n[PROOFSTEP]\ndelta ModEq at ba \n[GOAL]\na k x✝¹ y✝ : ℕ\nx✝ : ∃ a1, xn a1 k = x✝¹ ∧ yn a1 k = y✝\na1 : 1 < a\nhx : xn a1 k = x✝¹\nhy : yn a1 k = y✝\nkpos : k > 0\nx : ℕ := xn a1 k\ny : ℕ := yn a1 k\nm : ℕ := 2 * (k * y)\nu : ℕ := xn a1 m\nv : ℕ := yn a1 m\nky : k ≤ y\nyv : y * y ∣ v\nuco : coprime u (4 * y)\nb : ℕ\nba : b % u = a % u\nbm1 : b ≡ 1 [MOD 4 * y]\nm1 : 1 < m\nvp : 0 < v\nthis✝ : xn a1 1 < u\nthis : a < u\n⊢ a ≤ b\n[PROOFSTEP]\nrw [Nat.mod_eq_of_lt this] at ba \n[GOAL]\na k x✝¹ y✝ : ℕ\nx✝ : ∃ a1, xn a1 k = x✝¹ ∧ yn a1 k = y✝\na1 : 1 < a\nhx : xn a1 k = x✝¹\nhy : yn a1 k = y✝\nkpos : k > 0\nx : ℕ := xn a1 k\ny : ℕ := yn a1 k\nm : ℕ := 2 * (k * y)\nu : ℕ := xn a1 m\nv : ℕ := yn a1 m\nky : k ≤ y\nyv : y * y ∣ v\nuco : coprime u (4 * y)\nb : ℕ\nba : b % u = a\nbm1 : b ≡ 1 [MOD 4 * y]\nm1 : 1 < m\nvp : 0 < v\nthis✝ : xn a1 1 < u\nthis : a < u\n⊢ a ≤ b\n[PROOFSTEP]\nrw [← ba]\n[GOAL]\na k x✝¹ y✝ : ℕ\nx✝ : ∃ a1, xn a1 k = x✝¹ ∧ yn a1 k = y✝\na1 : 1 < a\nhx : xn a1 k = x✝¹\nhy : yn a1 k = y✝\nkpos : k > 0\nx : ℕ := xn a1 k\ny : ℕ := yn a1 k\nm : ℕ := 2 * (k * y)\nu : ℕ := xn a1 m\nv : ℕ := yn a1 m\nky : k ≤ y\nyv : y * y ∣ v\nuco : coprime u (4 * y)\nb : ℕ\nba : b % u = a\nbm1 : b ≡ 1 [MOD 4 * y]\nm1 : 1 < m\nvp : 0 < v\nthis✝ : xn a1 1 < u\nthis : a < u\n⊢ b % u ≤ b\n[PROOFSTEP]\napply Nat.mod_le\n[GOAL]\na k x✝¹ y✝ : ℕ\nx✝ : ∃ a1, xn a1 k = x✝¹ ∧ yn a1 k = y✝\na1 : 1 < a\nhx : xn a1 k = x✝¹\nhy : yn a1 k = y✝\nkpos : k > 0\nx : ℕ := xn a1 k\ny : ℕ := yn a1 k\nm : ℕ := 2 * (k * y)\nu : ℕ := xn a1 m\nv : ℕ := yn a1 m\nky : k ≤ y\nyv : y * y ∣ v\nuco : coprime u (4 * y)\nb : ℕ\nba : b ≡ a [MOD u]\nbm1 : b ≡ 1 [MOD 4 * y]\nm1 : 1 < m\nvp : 0 < v\nb1 : 1 < b\ns : ℕ := xn b1 k\nt : ℕ := yn b1 k\nsx : s ≡ x [MOD u]\n⊢ ↑(4 * y) ∣ ↑(b - 1)\n[PROOFSTEP]\nrw [Int.ofNat_sub (le_of_lt b1)]\n[GOAL]\na k x✝¹ y✝ : ℕ\nx✝ : ∃ a1, xn a1 k = x✝¹ ∧ yn a1 k = y✝\na1 : 1 < a\nhx : xn a1 k = x✝¹\nhy : yn a1 k = y✝\nkpos : k > 0\nx : ℕ := xn a1 k\ny : ℕ := yn a1 k\nm : ℕ := 2 * (k * y)\nu : ℕ := xn a1 m\nv : ℕ := yn a1 m\nky : k ≤ y\nyv : y * y ∣ v\nuco : coprime u (4 * y)\nb : ℕ\nba : b ≡ a [MOD u]\nbm1 : b ≡ 1 [MOD 4 * y]\nm1 : 1 < m\nvp : 0 < v\nb1 : 1 < b\ns : ℕ := xn b1 k\nt : ℕ := yn b1 k\nsx : s ≡ x [MOD u]\n⊢ ↑(4 * y) ∣ ↑b - ↑1\n[PROOFSTEP]\nexact bm1.symm.dvd\n[GOAL]\na k x y : ℕ\nx✝ :\n  1 < a ∧\n    k ≤ y ∧\n      (x = 1 ∧ y = 0 ∨\n        ∃ u v s t b,\n          x * x - (a * a - 1) * y * y = 1 ∧\n            u * u - (a * a - 1) * v * v = 1 ∧\n              s * s - (b * b - 1) * t * t = 1 ∧\n                1 < b ∧ b ≡ 1 [MOD 4 * y] ∧ b ≡ a [MOD u] ∧ 0 < v ∧ y * y ∣ v ∧ s ≡ x [MOD u] ∧ t ≡ k [MOD 4 * y])\na1 : 1 < a\nky : k ≤ y\no :\n  x = 1 ∧ y = 0 ∨\n    ∃ u v s t b,\n      x * x - (a * a - 1) * y * y = 1 ∧\n        u * u - (a * a - 1) * v * v = 1 ∧\n          s * s - (b * b - 1) * t * t = 1 ∧\n            1 < b ∧ b ≡ 1 [MOD 4 * y] ∧ b ≡ a [MOD u] ∧ 0 < v ∧ y * y ∣ v ∧ s ≡ x [MOD u] ∧ t ≡ k [MOD 4 * y]\nx1 : x = 1\ny0 : y = 0\n⊢ xn a1 k = x ∧ yn a1 k = y\n[PROOFSTEP]\nrw [y0] at ky \n[GOAL]\na k x y : ℕ\nx✝ :\n  1 < a ∧\n    k ≤ y ∧\n      (x = 1 ∧ y = 0 ∨\n        ∃ u v s t b,\n          x * x - (a * a - 1) * y * y = 1 ∧\n            u * u - (a * a - 1) * v * v = 1 ∧\n              s * s - (b * b - 1) * t * t = 1 ∧\n                1 < b ∧ b ≡ 1 [MOD 4 * y] ∧ b ≡ a [MOD u] ∧ 0 < v ∧ y * y ∣ v ∧ s ≡ x [MOD u] ∧ t ≡ k [MOD 4 * y])\na1 : 1 < a\nky : k ≤ 0\no :\n  x = 1 ∧ y = 0 ∨\n    ∃ u v s t b,\n      x * x - (a * a - 1) * y * y = 1 ∧\n        u * u - (a * a - 1) * v * v = 1 ∧\n          s * s - (b * b - 1) * t * t = 1 ∧\n            1 < b ∧ b ≡ 1 [MOD 4 * y] ∧ b ≡ a [MOD u] ∧ 0 < v ∧ y * y ∣ v ∧ s ≡ x [MOD u] ∧ t ≡ k [MOD 4 * y]\nx1 : x = 1\ny0 : y = 0\n⊢ xn a1 k = x ∧ yn a1 k = y\n[PROOFSTEP]\nrw [Nat.eq_zero_of_le_zero ky, x1, y0]\n[GOAL]\na k x y : ℕ\nx✝ :\n  1 < a ∧\n    k ≤ y ∧\n      (x = 1 ∧ y = 0 ∨\n        ∃ u v s t b,\n          x * x - (a * a - 1) * y * y = 1 ∧\n            u * u - (a * a - 1) * v * v = 1 ∧\n              s * s - (b * b - 1) * t * t = 1 ∧\n                1 < b ∧ b ≡ 1 [MOD 4 * y] ∧ b ≡ a [MOD u] ∧ 0 < v ∧ y * y ∣ v ∧ s ≡ x [MOD u] ∧ t ≡ k [MOD 4 * y])\na1 : 1 < a\nky : k ≤ 0\no :\n  x = 1 ∧ y = 0 ∨\n    ∃ u v s t b,\n      x * x - (a * a - 1) * y * y = 1 ∧\n        u * u - (a * a - 1) * v * v = 1 ∧\n          s * s - (b * b - 1) * t * t = 1 ∧\n            1 < b ∧ b ≡ 1 [MOD 4 * y] ∧ b ≡ a [MOD u] ∧ 0 < v ∧ y * y ∣ v ∧ s ≡ x [MOD u] ∧ t ≡ k [MOD 4 * y]\nx1 : x = 1\ny0 : y = 0\n⊢ xn a1 0 = 1 ∧ yn a1 0 = 0\n[PROOFSTEP]\nexact ⟨rfl, rfl⟩\n[GOAL]\na k x y : ℕ\na1 : 1 < a\nky✝ : k ≤ y\nu v s t b : ℕ\nb1 : 1 < b\nrem : b ≡ 1 [MOD 4 * y] ∧ b ≡ a [MOD u] ∧ 0 < v ∧ y * y ∣ v ∧ s ≡ x [MOD u] ∧ t ≡ k [MOD 4 * y]\ni n j : ℕ\nbm1 : b ≡ 1 [MOD 4 * yn a1 i]\nba : b ≡ a [MOD xn a1 n]\nvp : 0 < yn a1 n\nyv : yn a1 i * yn a1 i ∣ yn a1 n\nsx : xn b1 j ≡ xn a1 i [MOD xn a1 n]\ntk : yn b1 j ≡ k [MOD 4 * yn a1 i]\nky : k ≤ yn a1 i\nx✝ :\n  1 < a ∧\n    k ≤ yn a1 i ∧\n      (xn a1 i = 1 ∧ yn a1 i = 0 ∨\n        ∃ u v s t b,\n          xn a1 i * xn a1 i - (a * a - 1) * yn a1 i * yn a1 i = 1 ∧\n            u * u - (a * a - 1) * v * v = 1 ∧\n              s * s - (b * b - 1) * t * t = 1 ∧\n                1 < b ∧\n                  b ≡ 1 [MOD 4 * yn a1 i] ∧\n                    b ≡ a [MOD u] ∧ 0 < v ∧ yn a1 i * yn a1 i ∣ v ∧ s ≡ xn a1 i [MOD u] ∧ t ≡ k [MOD 4 * yn a1 i])\no :\n  xn a1 i = 1 ∧ yn a1 i = 0 ∨\n    ∃ u v s t b,\n      xn a1 i * xn a1 i - (a * a - 1) * yn a1 i * yn a1 i = 1 ∧\n        u * u - (a * a - 1) * v * v = 1 ∧\n          s * s - (b * b - 1) * t * t = 1 ∧\n            1 < b ∧\n              b ≡ 1 [MOD 4 * yn a1 i] ∧\n                b ≡ a [MOD u] ∧ 0 < v ∧ yn a1 i * yn a1 i ∣ v ∧ s ≡ xn a1 i [MOD u] ∧ t ≡ k [MOD 4 * yn a1 i]\nxy : xn a1 i * xn a1 i - (a * a - 1) * yn a1 i * yn a1 i = 1\nuv : xn a1 n * xn a1 n - (a * a - 1) * yn a1 n * yn a1 n = 1\nst : xn b1 j * xn b1 j - (b * b - 1) * yn b1 j * yn b1 j = 1\ni0 : i = 0\n⊢ xn a1 k = xn a1 i ∧ yn a1 k = yn a1 i\n[PROOFSTEP]\nsimp [i0] at ky \n[GOAL]\na k x y : ℕ\na1 : 1 < a\nky✝ : k ≤ y\nu v s t b : ℕ\nb1 : 1 < b\nrem : b ≡ 1 [MOD 4 * y] ∧ b ≡ a [MOD u] ∧ 0 < v ∧ y * y ∣ v ∧ s ≡ x [MOD u] ∧ t ≡ k [MOD 4 * y]\ni n j : ℕ\nbm1 : b ≡ 1 [MOD 4 * yn a1 i]\nba : b ≡ a [MOD xn a1 n]\nvp : 0 < yn a1 n\nyv : yn a1 i * yn a1 i ∣ yn a1 n\nsx : xn b1 j ≡ xn a1 i [MOD xn a1 n]\ntk : yn b1 j ≡ k [MOD 4 * yn a1 i]\nx✝ :\n  1 < a ∧\n    k ≤ yn a1 i ∧\n      (xn a1 i = 1 ∧ yn a1 i = 0 ∨\n        ∃ u v s t b,\n          xn a1 i * xn a1 i - (a * a - 1) * yn a1 i * yn a1 i = 1 ∧\n            u * u - (a * a - 1) * v * v = 1 ∧\n              s * s - (b * b - 1) * t * t = 1 ∧\n                1 < b ∧\n                  b ≡ 1 [MOD 4 * yn a1 i] ∧\n                    b ≡ a [MOD u] ∧ 0 < v ∧ yn a1 i * yn a1 i ∣ v ∧ s ≡ xn a1 i [MOD u] ∧ t ≡ k [MOD 4 * yn a1 i])\no :\n  xn a1 i = 1 ∧ yn a1 i = 0 ∨\n    ∃ u v s t b,\n      xn a1 i * xn a1 i - (a * a - 1) * yn a1 i * yn a1 i = 1 ∧\n        u * u - (a * a - 1) * v * v = 1 ∧\n          s * s - (b * b - 1) * t * t = 1 ∧\n            1 < b ∧\n              b ≡ 1 [MOD 4 * yn a1 i] ∧\n                b ≡ a [MOD u] ∧ 0 < v ∧ yn a1 i * yn a1 i ∣ v ∧ s ≡ xn a1 i [MOD u] ∧ t ≡ k [MOD 4 * yn a1 i]\nxy : xn a1 i * xn a1 i - (a * a - 1) * yn a1 i * yn a1 i = 1\nuv : xn a1 n * xn a1 n - (a * a - 1) * yn a1 n * yn a1 n = 1\nst : xn b1 j * xn b1 j - (b * b - 1) * yn b1 j * yn b1 j = 1\ni0 : i = 0\nky : k = 0\n⊢ xn a1 k = xn a1 i ∧ yn a1 k = yn a1 i\n[PROOFSTEP]\nrw [i0, ky]\n[GOAL]\na k x y : ℕ\na1 : 1 < a\nky✝ : k ≤ y\nu v s t b : ℕ\nb1 : 1 < b\nrem : b ≡ 1 [MOD 4 * y] ∧ b ≡ a [MOD u] ∧ 0 < v ∧ y * y ∣ v ∧ s ≡ x [MOD u] ∧ t ≡ k [MOD 4 * y]\ni n j : ℕ\nbm1 : b ≡ 1 [MOD 4 * yn a1 i]\nba : b ≡ a [MOD xn a1 n]\nvp : 0 < yn a1 n\nyv : yn a1 i * yn a1 i ∣ yn a1 n\nsx : xn b1 j ≡ xn a1 i [MOD xn a1 n]\ntk : yn b1 j ≡ k [MOD 4 * yn a1 i]\nx✝ :\n  1 < a ∧\n    k ≤ yn a1 i ∧\n      (xn a1 i = 1 ∧ yn a1 i = 0 ∨\n        ∃ u v s t b,\n          xn a1 i * xn a1 i - (a * a - 1) * yn a1 i * yn a1 i = 1 ∧\n            u * u - (a * a - 1) * v * v = 1 ∧\n              s * s - (b * b - 1) * t * t = 1 ∧\n                1 < b ∧\n                  b ≡ 1 [MOD 4 * yn a1 i] ∧\n                    b ≡ a [MOD u] ∧ 0 < v ∧ yn a1 i * yn a1 i ∣ v ∧ s ≡ xn a1 i [MOD u] ∧ t ≡ k [MOD 4 * yn a1 i])\no :\n  xn a1 i = 1 ∧ yn a1 i = 0 ∨\n    ∃ u v s t b,\n      xn a1 i * xn a1 i - (a * a - 1) * yn a1 i * yn a1 i = 1 ∧\n        u * u - (a * a - 1) * v * v = 1 ∧\n          s * s - (b * b - 1) * t * t = 1 ∧\n            1 < b ∧\n              b ≡ 1 [MOD 4 * yn a1 i] ∧\n                b ≡ a [MOD u] ∧ 0 < v ∧ yn a1 i * yn a1 i ∣ v ∧ s ≡ xn a1 i [MOD u] ∧ t ≡ k [MOD 4 * yn a1 i]\nxy : xn a1 i * xn a1 i - (a * a - 1) * yn a1 i * yn a1 i = 1\nuv : xn a1 n * xn a1 n - (a * a - 1) * yn a1 n * yn a1 n = 1\nst : xn b1 j * xn b1 j - (b * b - 1) * yn b1 j * yn b1 j = 1\ni0 : i = 0\nky : k = 0\n⊢ xn a1 0 = xn a1 0 ∧ yn a1 0 = yn a1 0\n[PROOFSTEP]\nexact ⟨rfl, rfl⟩\n[GOAL]\na k x y : ℕ\na1 : 1 < a\nky✝ : k ≤ y\nu v s t b : ℕ\nb1 : 1 < b\nrem : b ≡ 1 [MOD 4 * y] ∧ b ≡ a [MOD u] ∧ 0 < v ∧ y * y ∣ v ∧ s ≡ x [MOD u] ∧ t ≡ k [MOD 4 * y]\ni n j : ℕ\nbm1 : b ≡ 1 [MOD 4 * yn a1 i]\nba : b ≡ a [MOD xn a1 n]\nvp : 0 < yn a1 n\nyv : yn a1 i * yn a1 i ∣ yn a1 n\nsx : xn b1 j ≡ xn a1 i [MOD xn a1 n]\ntk : yn b1 j ≡ k [MOD 4 * yn a1 i]\nky : k ≤ yn a1 i\nx✝ :\n  1 < a ∧\n    k ≤ yn a1 i ∧\n      (xn a1 i = 1 ∧ yn a1 i = 0 ∨\n        ∃ u v s t b,\n          xn a1 i * xn a1 i - (a * a - 1) * yn a1 i * yn a1 i = 1 ∧\n            u * u - (a * a - 1) * v * v = 1 ∧\n              s * s - (b * b - 1) * t * t = 1 ∧\n                1 < b ∧\n                  b ≡ 1 [MOD 4 * yn a1 i] ∧\n                    b ≡ a [MOD u] ∧ 0 < v ∧ yn a1 i * yn a1 i ∣ v ∧ s ≡ xn a1 i [MOD u] ∧ t ≡ k [MOD 4 * yn a1 i])\no :\n  xn a1 i = 1 ∧ yn a1 i = 0 ∨\n    ∃ u v s t b,\n      xn a1 i * xn a1 i - (a * a - 1) * yn a1 i * yn a1 i = 1 ∧\n        u * u - (a * a - 1) * v * v = 1 ∧\n          s * s - (b * b - 1) * t * t = 1 ∧\n            1 < b ∧\n              b ≡ 1 [MOD 4 * yn a1 i] ∧\n                b ≡ a [MOD u] ∧ 0 < v ∧ yn a1 i * yn a1 i ∣ v ∧ s ≡ xn a1 i [MOD u] ∧ t ≡ k [MOD 4 * yn a1 i]\nxy : xn a1 i * xn a1 i - (a * a - 1) * yn a1 i * yn a1 i = 1\nuv : xn a1 n * xn a1 n - (a * a - 1) * yn a1 n * yn a1 n = 1\nst : xn b1 j * xn b1 j - (b * b - 1) * yn b1 j * yn b1 j = 1\nipos : i > 0\n⊢ xn a1 k = xn a1 i ∧ yn a1 k = yn a1 i\n[PROOFSTEP]\nsuffices i = k by rw [this]; exact ⟨rfl, rfl⟩\n[GOAL]\na k x y : ℕ\na1 : 1 < a\nky✝ : k ≤ y\nu v s t b : ℕ\nb1 : 1 < b\nrem : b ≡ 1 [MOD 4 * y] ∧ b ≡ a [MOD u] ∧ 0 < v ∧ y * y ∣ v ∧ s ≡ x [MOD u] ∧ t ≡ k [MOD 4 * y]\ni n j : ℕ\nbm1 : b ≡ 1 [MOD 4 * yn a1 i]\nba : b ≡ a [MOD xn a1 n]\nvp : 0 < yn a1 n\nyv : yn a1 i * yn a1 i ∣ yn a1 n\nsx : xn b1 j ≡ xn a1 i [MOD xn a1 n]\ntk : yn b1 j ≡ k [MOD 4 * yn a1 i]\nky : k ≤ yn a1 i\nx✝ :\n  1 < a ∧\n    k ≤ yn a1 i ∧\n      (xn a1 i = 1 ∧ yn a1 i = 0 ∨\n        ∃ u v s t b,\n          xn a1 i * xn a1 i - (a * a - 1) * yn a1 i * yn a1 i = 1 ∧\n            u * u - (a * a - 1) * v * v = 1 ∧\n              s * s - (b * b - 1) * t * t = 1 ∧\n                1 < b ∧\n                  b ≡ 1 [MOD 4 * yn a1 i] ∧\n                    b ≡ a [MOD u] ∧ 0 < v ∧ yn a1 i * yn a1 i ∣ v ∧ s ≡ xn a1 i [MOD u] ∧ t ≡ k [MOD 4 * yn a1 i])\no :\n  xn a1 i = 1 ∧ yn a1 i = 0 ∨\n    ∃ u v s t b,\n      xn a1 i * xn a1 i - (a * a - 1) * yn a1 i * yn a1 i = 1 ∧\n        u * u - (a * a - 1) * v * v = 1 ∧\n          s * s - (b * b - 1) * t * t = 1 ∧\n            1 < b ∧\n              b ≡ 1 [MOD 4 * yn a1 i] ∧\n                b ≡ a [MOD u] ∧ 0 < v ∧ yn a1 i * yn a1 i ∣ v ∧ s ≡ xn a1 i [MOD u] ∧ t ≡ k [MOD 4 * yn a1 i]\nxy : xn a1 i * xn a1 i - (a * a - 1) * yn a1 i * yn a1 i = 1\nuv : xn a1 n * xn a1 n - (a * a - 1) * yn a1 n * yn a1 n = 1\nst : xn b1 j * xn b1 j - (b * b - 1) * yn b1 j * yn b1 j = 1\nipos : i > 0\nthis : i = k\n⊢ xn a1 k = xn a1 i ∧ yn a1 k = yn a1 i\n[PROOFSTEP]\nrw [this]\n[GOAL]\na k x y : ℕ\na1 : 1 < a\nky✝ : k ≤ y\nu v s t b : ℕ\nb1 : 1 < b\nrem : b ≡ 1 [MOD 4 * y] ∧ b ≡ a [MOD u] ∧ 0 < v ∧ y * y ∣ v ∧ s ≡ x [MOD u] ∧ t ≡ k [MOD 4 * y]\ni n j : ℕ\nbm1 : b ≡ 1 [MOD 4 * yn a1 i]\nba : b ≡ a [MOD xn a1 n]\nvp : 0 < yn a1 n\nyv : yn a1 i * yn a1 i ∣ yn a1 n\nsx : xn b1 j ≡ xn a1 i [MOD xn a1 n]\ntk : yn b1 j ≡ k [MOD 4 * yn a1 i]\nky : k ≤ yn a1 i\nx✝ :\n  1 < a ∧\n    k ≤ yn a1 i ∧\n      (xn a1 i = 1 ∧ yn a1 i = 0 ∨\n        ∃ u v s t b,\n          xn a1 i * xn a1 i - (a * a - 1) * yn a1 i * yn a1 i = 1 ∧\n            u * u - (a * a - 1) * v * v = 1 ∧\n              s * s - (b * b - 1) * t * t = 1 ∧\n                1 < b ∧\n                  b ≡ 1 [MOD 4 * yn a1 i] ∧\n                    b ≡ a [MOD u] ∧ 0 < v ∧ yn a1 i * yn a1 i ∣ v ∧ s ≡ xn a1 i [MOD u] ∧ t ≡ k [MOD 4 * yn a1 i])\no :\n  xn a1 i = 1 ∧ yn a1 i = 0 ∨\n    ∃ u v s t b,\n      xn a1 i * xn a1 i - (a * a - 1) * yn a1 i * yn a1 i = 1 ∧\n        u * u - (a * a - 1) * v * v = 1 ∧\n          s * s - (b * b - 1) * t * t = 1 ∧\n            1 < b ∧\n              b ≡ 1 [MOD 4 * yn a1 i] ∧\n                b ≡ a [MOD u] ∧ 0 < v ∧ yn a1 i * yn a1 i ∣ v ∧ s ≡ xn a1 i [MOD u] ∧ t ≡ k [MOD 4 * yn a1 i]\nxy : xn a1 i * xn a1 i - (a * a - 1) * yn a1 i * yn a1 i = 1\nuv : xn a1 n * xn a1 n - (a * a - 1) * yn a1 n * yn a1 n = 1\nst : xn b1 j * xn b1 j - (b * b - 1) * yn b1 j * yn b1 j = 1\nipos : i > 0\nthis : i = k\n⊢ xn a1 k = xn a1 k ∧ yn a1 k = yn a1 k\n[PROOFSTEP]\nexact ⟨rfl, rfl⟩\n[GOAL]\na k x y : ℕ\na1 : 1 < a\nky✝ : k ≤ y\nu v s t b : ℕ\nb1 : 1 < b\nrem : b ≡ 1 [MOD 4 * y] ∧ b ≡ a [MOD u] ∧ 0 < v ∧ y * y ∣ v ∧ s ≡ x [MOD u] ∧ t ≡ k [MOD 4 * y]\ni n j : ℕ\nbm1 : b ≡ 1 [MOD 4 * yn a1 i]\nba : b ≡ a [MOD xn a1 n]\nvp : 0 < yn a1 n\nyv : yn a1 i * yn a1 i ∣ yn a1 n\nsx : xn b1 j ≡ xn a1 i [MOD xn a1 n]\ntk : yn b1 j ≡ k [MOD 4 * yn a1 i]\nky : k ≤ yn a1 i\nx✝ :\n  1 < a ∧\n    k ≤ yn a1 i ∧\n      (xn a1 i = 1 ∧ yn a1 i = 0 ∨\n        ∃ u v s t b,\n          xn a1 i * xn a1 i - (a * a - 1) * yn a1 i * yn a1 i = 1 ∧\n            u * u - (a * a - 1) * v * v = 1 ∧\n              s * s - (b * b - 1) * t * t = 1 ∧\n                1 < b ∧\n                  b ≡ 1 [MOD 4 * yn a1 i] ∧\n                    b ≡ a [MOD u] ∧ 0 < v ∧ yn a1 i * yn a1 i ∣ v ∧ s ≡ xn a1 i [MOD u] ∧ t ≡ k [MOD 4 * yn a1 i])\no :\n  xn a1 i = 1 ∧ yn a1 i = 0 ∨\n    ∃ u v s t b,\n      xn a1 i * xn a1 i - (a * a - 1) * yn a1 i * yn a1 i = 1 ∧\n        u * u - (a * a - 1) * v * v = 1 ∧\n          s * s - (b * b - 1) * t * t = 1 ∧\n            1 < b ∧\n              b ≡ 1 [MOD 4 * yn a1 i] ∧\n                b ≡ a [MOD u] ∧ 0 < v ∧ yn a1 i * yn a1 i ∣ v ∧ s ≡ xn a1 i [MOD u] ∧ t ≡ k [MOD 4 * yn a1 i]\nxy : xn a1 i * xn a1 i - (a * a - 1) * yn a1 i * yn a1 i = 1\nuv : xn a1 n * xn a1 n - (a * a - 1) * yn a1 n * yn a1 n = 1\nst : xn b1 j * xn b1 j - (b * b - 1) * yn b1 j * yn b1 j = 1\nipos : i > 0\n⊢ i = k\n[PROOFSTEP]\nclear o rem xy uv st\n[GOAL]\na k x y : ℕ\na1 : 1 < a\nky✝ : k ≤ y\nu v s t b : ℕ\nb1 : 1 < b\ni n j : ℕ\nbm1 : b ≡ 1 [MOD 4 * yn a1 i]\nba : b ≡ a [MOD xn a1 n]\nvp : 0 < yn a1 n\nyv : yn a1 i * yn a1 i ∣ yn a1 n\nsx : xn b1 j ≡ xn a1 i [MOD xn a1 n]\ntk : yn b1 j ≡ k [MOD 4 * yn a1 i]\nky : k ≤ yn a1 i\nx✝ :\n  1 < a ∧\n    k ≤ yn a1 i ∧\n      (xn a1 i = 1 ∧ yn a1 i = 0 ∨\n        ∃ u v s t b,\n          xn a1 i * xn a1 i - (a * a - 1) * yn a1 i * yn a1 i = 1 ∧\n            u * u - (a * a - 1) * v * v = 1 ∧\n              s * s - (b * b - 1) * t * t = 1 ∧\n                1 < b ∧\n                  b ≡ 1 [MOD 4 * yn a1 i] ∧\n                    b ≡ a [MOD u] ∧ 0 < v ∧ yn a1 i * yn a1 i ∣ v ∧ s ≡ xn a1 i [MOD u] ∧ t ≡ k [MOD 4 * yn a1 i])\nipos : i > 0\n⊢ i = k\n[PROOFSTEP]\nhave iln : i ≤ n :=\n  le_of_not_gt fun hin => not_lt_of_ge (Nat.le_of_dvd vp (dvd_of_mul_left_dvd yv)) (strictMono_y a1 hin)\n[GOAL]\na k x y : ℕ\na1 : 1 < a\nky✝ : k ≤ y\nu v s t b : ℕ\nb1 : 1 < b\ni n j : ℕ\nbm1 : b ≡ 1 [MOD 4 * yn a1 i]\nba : b ≡ a [MOD xn a1 n]\nvp : 0 < yn a1 n\nyv : yn a1 i * yn a1 i ∣ yn a1 n\nsx : xn b1 j ≡ xn a1 i [MOD xn a1 n]\ntk : yn b1 j ≡ k [MOD 4 * yn a1 i]\nky : k ≤ yn a1 i\nx✝ :\n  1 < a ∧\n    k ≤ yn a1 i ∧\n      (xn a1 i = 1 ∧ yn a1 i = 0 ∨\n        ∃ u v s t b,\n          xn a1 i * xn a1 i - (a * a - 1) * yn a1 i * yn a1 i = 1 ∧\n            u * u - (a * a - 1) * v * v = 1 ∧\n              s * s - (b * b - 1) * t * t = 1 ∧\n                1 < b ∧\n                  b ≡ 1 [MOD 4 * yn a1 i] ∧\n                    b ≡ a [MOD u] ∧ 0 < v ∧ yn a1 i * yn a1 i ∣ v ∧ s ≡ xn a1 i [MOD u] ∧ t ≡ k [MOD 4 * yn a1 i])\nipos : i > 0\niln : i ≤ n\n⊢ i = k\n[PROOFSTEP]\nhave yd : 4 * yn a1 i ∣ 4 * n := mul_dvd_mul_left _ <| dvd_of_ysq_dvd a1 yv\n[GOAL]\na k x y : ℕ\na1 : 1 < a\nky✝ : k ≤ y\nu v s t b : ℕ\nb1 : 1 < b\ni n j : ℕ\nbm1 : b ≡ 1 [MOD 4 * yn a1 i]\nba : b ≡ a [MOD xn a1 n]\nvp : 0 < yn a1 n\nyv : yn a1 i * yn a1 i ∣ yn a1 n\nsx : xn b1 j ≡ xn a1 i [MOD xn a1 n]\ntk : yn b1 j ≡ k [MOD 4 * yn a1 i]\nky : k ≤ yn a1 i\nx✝ :\n  1 < a ∧\n    k ≤ yn a1 i ∧\n      (xn a1 i = 1 ∧ yn a1 i = 0 ∨\n        ∃ u v s t b,\n          xn a1 i * xn a1 i - (a * a - 1) * yn a1 i * yn a1 i = 1 ∧\n            u * u - (a * a - 1) * v * v = 1 ∧\n              s * s - (b * b - 1) * t * t = 1 ∧\n                1 < b ∧\n                  b ≡ 1 [MOD 4 * yn a1 i] ∧\n                    b ≡ a [MOD u] ∧ 0 < v ∧ yn a1 i * yn a1 i ∣ v ∧ s ≡ xn a1 i [MOD u] ∧ t ≡ k [MOD 4 * yn a1 i])\nipos : i > 0\niln : i ≤ n\nyd : 4 * yn a1 i ∣ 4 * n\n⊢ i = k\n[PROOFSTEP]\nhave jk : j ≡ k [MOD 4 * yn a1 i] :=\n  have : 4 * yn a1 i ∣ b - 1 := Int.coe_nat_dvd.1 <| by rw [Int.ofNat_sub (le_of_lt b1)]; exact bm1.symm.dvd\n  ((yn_modEq_a_sub_one b1 _).of_dvd this).symm.trans tk\n[GOAL]\na k x y : ℕ\na1 : 1 < a\nky✝ : k ≤ y\nu v s t b : ℕ\nb1 : 1 < b\ni n j : ℕ\nbm1 : b ≡ 1 [MOD 4 * yn a1 i]\nba : b ≡ a [MOD xn a1 n]\nvp : 0 < yn a1 n\nyv : yn a1 i * yn a1 i ∣ yn a1 n\nsx : xn b1 j ≡ xn a1 i [MOD xn a1 n]\ntk : yn b1 j ≡ k [MOD 4 * yn a1 i]\nky : k ≤ yn a1 i\nx✝ :\n  1 < a ∧\n    k ≤ yn a1 i ∧\n      (xn a1 i = 1 ∧ yn a1 i = 0 ∨\n        ∃ u v s t b,\n          xn a1 i * xn a1 i - (a * a - 1) * yn a1 i * yn a1 i = 1 ∧\n            u * u - (a * a - 1) * v * v = 1 ∧\n              s * s - (b * b - 1) * t * t = 1 ∧\n                1 < b ∧\n                  b ≡ 1 [MOD 4 * yn a1 i] ∧\n                    b ≡ a [MOD u] ∧ 0 < v ∧ yn a1 i * yn a1 i ∣ v ∧ s ≡ xn a1 i [MOD u] ∧ t ≡ k [MOD 4 * yn a1 i])\nipos : i > 0\niln : i ≤ n\nyd : 4 * yn a1 i ∣ 4 * n\n⊢ ↑(4 * yn a1 i) ∣ ↑(b - 1)\n[PROOFSTEP]\nrw [Int.ofNat_sub (le_of_lt b1)]\n[GOAL]\na k x y : ℕ\na1 : 1 < a\nky✝ : k ≤ y\nu v s t b : ℕ\nb1 : 1 < b\ni n j : ℕ\nbm1 : b ≡ 1 [MOD 4 * yn a1 i]\nba : b ≡ a [MOD xn a1 n]\nvp : 0 < yn a1 n\nyv : yn a1 i * yn a1 i ∣ yn a1 n\nsx : xn b1 j ≡ xn a1 i [MOD xn a1 n]\ntk : yn b1 j ≡ k [MOD 4 * yn a1 i]\nky : k ≤ yn a1 i\nx✝ :\n  1 < a ∧\n    k ≤ yn a1 i ∧\n      (xn a1 i = 1 ∧ yn a1 i = 0 ∨\n        ∃ u v s t b,\n          xn a1 i * xn a1 i - (a * a - 1) * yn a1 i * yn a1 i = 1 ∧\n            u * u - (a * a - 1) * v * v = 1 ∧\n              s * s - (b * b - 1) * t * t = 1 ∧\n                1 < b ∧\n                  b ≡ 1 [MOD 4 * yn a1 i] ∧\n                    b ≡ a [MOD u] ∧ 0 < v ∧ yn a1 i * yn a1 i ∣ v ∧ s ≡ xn a1 i [MOD u] ∧ t ≡ k [MOD 4 * yn a1 i])\nipos : i > 0\niln : i ≤ n\nyd : 4 * yn a1 i ∣ 4 * n\n⊢ ↑(4 * yn a1 i) ∣ ↑b - ↑1\n[PROOFSTEP]\nexact bm1.symm.dvd\n[GOAL]\na k x y : ℕ\na1 : 1 < a\nky✝ : k ≤ y\nu v s t b : ℕ\nb1 : 1 < b\ni n j : ℕ\nbm1 : b ≡ 1 [MOD 4 * yn a1 i]\nba : b ≡ a [MOD xn a1 n]\nvp : 0 < yn a1 n\nyv : yn a1 i * yn a1 i ∣ yn a1 n\nsx : xn b1 j ≡ xn a1 i [MOD xn a1 n]\ntk : yn b1 j ≡ k [MOD 4 * yn a1 i]\nky : k ≤ yn a1 i\nx✝ :\n  1 < a ∧\n    k ≤ yn a1 i ∧\n      (xn a1 i = 1 ∧ yn a1 i = 0 ∨\n        ∃ u v s t b,\n          xn a1 i * xn a1 i - (a * a - 1) * yn a1 i * yn a1 i = 1 ∧\n            u * u - (a * a - 1) * v * v = 1 ∧\n              s * s - (b * b - 1) * t * t = 1 ∧\n                1 < b ∧\n                  b ≡ 1 [MOD 4 * yn a1 i] ∧\n                    b ≡ a [MOD u] ∧ 0 < v ∧ yn a1 i * yn a1 i ∣ v ∧ s ≡ xn a1 i [MOD u] ∧ t ≡ k [MOD 4 * yn a1 i])\nipos : i > 0\niln : i ≤ n\nyd : 4 * yn a1 i ∣ 4 * n\njk : j ≡ k [MOD 4 * yn a1 i]\n⊢ i = k\n[PROOFSTEP]\nhave ki : k + i < 4 * yn a1 i :=\n  lt_of_le_of_lt (_root_.add_le_add ky (yn_ge_n a1 i)) <|\n    by\n    rw [← two_mul]\n    exact Nat.mul_lt_mul_of_pos_right (by decide) (strictMono_y a1 ipos)\n[GOAL]\na k x y : ℕ\na1 : 1 < a\nky✝ : k ≤ y\nu v s t b : ℕ\nb1 : 1 < b\ni n j : ℕ\nbm1 : b ≡ 1 [MOD 4 * yn a1 i]\nba : b ≡ a [MOD xn a1 n]\nvp : 0 < yn a1 n\nyv : yn a1 i * yn a1 i ∣ yn a1 n\nsx : xn b1 j ≡ xn a1 i [MOD xn a1 n]\ntk : yn b1 j ≡ k [MOD 4 * yn a1 i]\nky : k ≤ yn a1 i\nx✝ :\n  1 < a ∧\n    k ≤ yn a1 i ∧\n      (xn a1 i = 1 ∧ yn a1 i = 0 ∨\n        ∃ u v s t b,\n          xn a1 i * xn a1 i - (a * a - 1) * yn a1 i * yn a1 i = 1 ∧\n            u * u - (a * a - 1) * v * v = 1 ∧\n              s * s - (b * b - 1) * t * t = 1 ∧\n                1 < b ∧\n                  b ≡ 1 [MOD 4 * yn a1 i] ∧\n                    b ≡ a [MOD u] ∧ 0 < v ∧ yn a1 i * yn a1 i ∣ v ∧ s ≡ xn a1 i [MOD u] ∧ t ≡ k [MOD 4 * yn a1 i])\nipos : i > 0\niln : i ≤ n\nyd : 4 * yn a1 i ∣ 4 * n\njk : j ≡ k [MOD 4 * yn a1 i]\n⊢ yn a1 i + yn a1 i < 4 * yn a1 i\n[PROOFSTEP]\nrw [← two_mul]\n[GOAL]\na k x y : ℕ\na1 : 1 < a\nky✝ : k ≤ y\nu v s t b : ℕ\nb1 : 1 < b\ni n j : ℕ\nbm1 : b ≡ 1 [MOD 4 * yn a1 i]\nba : b ≡ a [MOD xn a1 n]\nvp : 0 < yn a1 n\nyv : yn a1 i * yn a1 i ∣ yn a1 n\nsx : xn b1 j ≡ xn a1 i [MOD xn a1 n]\ntk : yn b1 j ≡ k [MOD 4 * yn a1 i]\nky : k ≤ yn a1 i\nx✝ :\n  1 < a ∧\n    k ≤ yn a1 i ∧\n      (xn a1 i = 1 ∧ yn a1 i = 0 ∨\n        ∃ u v s t b,\n          xn a1 i * xn a1 i - (a * a - 1) * yn a1 i * yn a1 i = 1 ∧\n            u * u - (a * a - 1) * v * v = 1 ∧\n              s * s - (b * b - 1) * t * t = 1 ∧\n                1 < b ∧\n                  b ≡ 1 [MOD 4 * yn a1 i] ∧\n                    b ≡ a [MOD u] ∧ 0 < v ∧ yn a1 i * yn a1 i ∣ v ∧ s ≡ xn a1 i [MOD u] ∧ t ≡ k [MOD 4 * yn a1 i])\nipos : i > 0\niln : i ≤ n\nyd : 4 * yn a1 i ∣ 4 * n\njk : j ≡ k [MOD 4 * yn a1 i]\n⊢ 2 * yn a1 i < 4 * yn a1 i\n[PROOFSTEP]\nexact Nat.mul_lt_mul_of_pos_right (by decide) (strictMono_y a1 ipos)\n[GOAL]\na k x y : ℕ\na1 : 1 < a\nky✝ : k ≤ y\nu v s t b : ℕ\nb1 : 1 < b\ni n j : ℕ\nbm1 : b ≡ 1 [MOD 4 * yn a1 i]\nba : b ≡ a [MOD xn a1 n]\nvp : 0 < yn a1 n\nyv : yn a1 i * yn a1 i ∣ yn a1 n\nsx : xn b1 j ≡ xn a1 i [MOD xn a1 n]\ntk : yn b1 j ≡ k [MOD 4 * yn a1 i]\nky : k ≤ yn a1 i\nx✝ :\n  1 < a ∧\n    k ≤ yn a1 i ∧\n      (xn a1 i = 1 ∧ yn a1 i = 0 ∨\n        ∃ u v s t b,\n          xn a1 i * xn a1 i - (a * a - 1) * yn a1 i * yn a1 i = 1 ∧\n            u * u - (a * a - 1) * v * v = 1 ∧\n              s * s - (b * b - 1) * t * t = 1 ∧\n                1 < b ∧\n                  b ≡ 1 [MOD 4 * yn a1 i] ∧\n                    b ≡ a [MOD u] ∧ 0 < v ∧ yn a1 i * yn a1 i ∣ v ∧ s ≡ xn a1 i [MOD u] ∧ t ≡ k [MOD 4 * yn a1 i])\nipos : i > 0\niln : i ≤ n\nyd : 4 * yn a1 i ∣ 4 * n\njk : j ≡ k [MOD 4 * yn a1 i]\n⊢ 2 < 4\n[PROOFSTEP]\ndecide\n[GOAL]\na k x y : ℕ\na1 : 1 < a\nky✝ : k ≤ y\nu v s t b : ℕ\nb1 : 1 < b\ni n j : ℕ\nbm1 : b ≡ 1 [MOD 4 * yn a1 i]\nba : b ≡ a [MOD xn a1 n]\nvp : 0 < yn a1 n\nyv : yn a1 i * yn a1 i ∣ yn a1 n\nsx : xn b1 j ≡ xn a1 i [MOD xn a1 n]\ntk : yn b1 j ≡ k [MOD 4 * yn a1 i]\nky : k ≤ yn a1 i\nx✝ :\n  1 < a ∧\n    k ≤ yn a1 i ∧\n      (xn a1 i = 1 ∧ yn a1 i = 0 ∨\n        ∃ u v s t b,\n          xn a1 i * xn a1 i - (a * a - 1) * yn a1 i * yn a1 i = 1 ∧\n            u * u - (a * a - 1) * v * v = 1 ∧\n              s * s - (b * b - 1) * t * t = 1 ∧\n                1 < b ∧\n                  b ≡ 1 [MOD 4 * yn a1 i] ∧\n                    b ≡ a [MOD u] ∧ 0 < v ∧ yn a1 i * yn a1 i ∣ v ∧ s ≡ xn a1 i [MOD u] ∧ t ≡ k [MOD 4 * yn a1 i])\nipos : i > 0\niln : i ≤ n\nyd : 4 * yn a1 i ∣ 4 * n\njk : j ≡ k [MOD 4 * yn a1 i]\nki : k + i < 4 * yn a1 i\n⊢ i = k\n[PROOFSTEP]\nhave ji : j ≡ i [MOD 4 * n] :=\n  have : xn a1 j ≡ xn a1 i [MOD xn a1 n] := (xy_modEq_of_modEq b1 a1 ba j).left.symm.trans sx\n  (modEq_of_xn_modEq a1 ipos iln this).resolve_right fun ji : j + i ≡ 0 [MOD 4 * n] =>\n    not_le_of_gt ki <|\n      Nat.le_of_dvd (lt_of_lt_of_le ipos <| Nat.le_add_left _ _) <|\n        modEq_zero_iff_dvd.1 <| (jk.symm.add_right i).trans <| ji.of_dvd yd\n[GOAL]\na k x y : ℕ\na1 : 1 < a\nky✝ : k ≤ y\nu v s t b : ℕ\nb1 : 1 < b\ni n j : ℕ\nbm1 : b ≡ 1 [MOD 4 * yn a1 i]\nba : b ≡ a [MOD xn a1 n]\nvp : 0 < yn a1 n\nyv : yn a1 i * yn a1 i ∣ yn a1 n\nsx : xn b1 j ≡ xn a1 i [MOD xn a1 n]\ntk : yn b1 j ≡ k [MOD 4 * yn a1 i]\nky : k ≤ yn a1 i\nx✝ :\n  1 < a ∧\n    k ≤ yn a1 i ∧\n      (xn a1 i = 1 ∧ yn a1 i = 0 ∨\n        ∃ u v s t b,\n          xn a1 i * xn a1 i - (a * a - 1) * yn a1 i * yn a1 i = 1 ∧\n            u * u - (a * a - 1) * v * v = 1 ∧\n              s * s - (b * b - 1) * t * t = 1 ∧\n                1 < b ∧\n                  b ≡ 1 [MOD 4 * yn a1 i] ∧\n                    b ≡ a [MOD u] ∧ 0 < v ∧ yn a1 i * yn a1 i ∣ v ∧ s ≡ xn a1 i [MOD u] ∧ t ≡ k [MOD 4 * yn a1 i])\nipos : i > 0\niln : i ≤ n\nyd : 4 * yn a1 i ∣ 4 * n\njk : j ≡ k [MOD 4 * yn a1 i]\nki : k + i < 4 * yn a1 i\nji : j ≡ i [MOD 4 * n]\n⊢ i = k\n[PROOFSTEP]\nhave : i % (4 * yn a1 i) = k % (4 * yn a1 i) := (ji.of_dvd yd).symm.trans jk\n[GOAL]\na k x y : ℕ\na1 : 1 < a\nky✝ : k ≤ y\nu v s t b : ℕ\nb1 : 1 < b\ni n j : ℕ\nbm1 : b ≡ 1 [MOD 4 * yn a1 i]\nba : b ≡ a [MOD xn a1 n]\nvp : 0 < yn a1 n\nyv : yn a1 i * yn a1 i ∣ yn a1 n\nsx : xn b1 j ≡ xn a1 i [MOD xn a1 n]\ntk : yn b1 j ≡ k [MOD 4 * yn a1 i]\nky : k ≤ yn a1 i\nx✝ :\n  1 < a ∧\n    k ≤ yn a1 i ∧\n      (xn a1 i = 1 ∧ yn a1 i = 0 ∨\n        ∃ u v s t b,\n          xn a1 i * xn a1 i - (a * a - 1) * yn a1 i * yn a1 i = 1 ∧\n            u * u - (a * a - 1) * v * v = 1 ∧\n              s * s - (b * b - 1) * t * t = 1 ∧\n                1 < b ∧\n                  b ≡ 1 [MOD 4 * yn a1 i] ∧\n                    b ≡ a [MOD u] ∧ 0 < v ∧ yn a1 i * yn a1 i ∣ v ∧ s ≡ xn a1 i [MOD u] ∧ t ≡ k [MOD 4 * yn a1 i])\nipos : i > 0\niln : i ≤ n\nyd : 4 * yn a1 i ∣ 4 * n\njk : j ≡ k [MOD 4 * yn a1 i]\nki : k + i < 4 * yn a1 i\nji : j ≡ i [MOD 4 * n]\nthis : i % (4 * yn a1 i) = k % (4 * yn a1 i)\n⊢ i = k\n[PROOFSTEP]\nrwa [Nat.mod_eq_of_lt (lt_of_le_of_lt (Nat.le_add_left _ _) ki),\n  Nat.mod_eq_of_lt (lt_of_le_of_lt (Nat.le_add_right _ _) ki)] at this \n[GOAL]\na y k : ℕ\nhy0 : y ≠ 0\nhk0 : k ≠ 0\nhyk : y ^ k < a\nhya : y < a\n⊢ ↑a ≤ ↑a ^ 2 - (↑a - 1) ^ 2 - 1\n[PROOFSTEP]\nrw [sub_sq, mul_one, one_pow, sub_add, sub_sub_cancel, two_mul, sub_sub, ← add_sub, le_add_iff_nonneg_right, sub_nonneg,\n  Int.add_one_le_iff]\n[GOAL]\na y k : ℕ\nhy0 : y ≠ 0\nhk0 : k ≠ 0\nhyk : y ^ k < a\nhya : y < a\n⊢ 1 < ↑a\n[PROOFSTEP]\nnorm_cast\n[GOAL]\na y k : ℕ\nhy0 : y ≠ 0\nhk0 : k ≠ 0\nhyk : y ^ k < a\nhya : y < a\n⊢ 1 < a\n[PROOFSTEP]\nexact lt_of_le_of_lt (Nat.succ_le_of_lt (Nat.pos_of_ne_zero hy0)) hya\n[GOAL]\na y k : ℕ\nhy0 : y ≠ 0\nhk0 : k ≠ 0\nhyk : y ^ k < a\nhya : y < a\n⊢ ↑a ^ 2 - (↑a - 1) ^ 2 - 1 ≤ ↑a ^ 2 - (↑a - ↑y) ^ 2 - 1\n[PROOFSTEP]\nhave := hya.le\n[GOAL]\na y k : ℕ\nhy0 : y ≠ 0\nhk0 : k ≠ 0\nhyk : y ^ k < a\nhya : y < a\nthis : y ≤ a\n⊢ ↑a ^ 2 - (↑a - 1) ^ 2 - 1 ≤ ↑a ^ 2 - (↑a - ↑y) ^ 2 - 1\n[PROOFSTEP]\nmono*\n[GOAL]\ncase hab.hab.ha\na y k : ℕ\nhy0 : y ≠ 0\nhk0 : k ≠ 0\nhyk : y ^ k < a\nhya : y < a\nthis : y ≤ a\nhy0_symm : 0 ≠ y\nhk0_symm : 0 ≠ k\n⊢ 0 ≤ ↑a\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase hab.hcd.ha\na y k : ℕ\nhy0 : y ≠ 0\nhk0 : k ≠ 0\nhyk : y ^ k < a\nhya : y < a\nthis : y ≤ a\nhy0_symm : 0 ≠ y\nhk0_symm : 0 ≠ k\n⊢ 0 ≤ ↑a - ↑y\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase hab.hcd.hab.hcd\na y k : ℕ\nhy0 : y ≠ 0\nhk0 : k ≠ 0\nhyk : y ^ k < a\nhya : y < a\nthis : y ≤ a\nhy0_symm : 0 ≠ y\nhk0_symm : 0 ≠ k\n⊢ 1 ≤ ↑y\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase hab.hab.ha\na y k : ℕ\nhy0 : y ≠ 0\nhk0 : k ≠ 0\nhyk : y ^ k < a\nhya : y < a\nthis : y ≤ a\nhy0_symm : 0 ≠ y\nhk0_symm : 0 ≠ k\n⊢ 0 ≤ a\n[PROOFSTEP]\nsimp [Nat.zero_le, Nat.succ_le_of_lt (Nat.pos_of_ne_zero hy0)]\n[GOAL]\ncase hab.hcd.ha\na y k : ℕ\nhy0 : y ≠ 0\nhk0 : k ≠ 0\nhyk : y ^ k < a\nhya : y < a\nthis : y ≤ a\nhy0_symm : 0 ≠ y\nhk0_symm : 0 ≠ k\n⊢ 0 ≤ a - y\n[PROOFSTEP]\nsimp [Nat.zero_le, Nat.succ_le_of_lt (Nat.pos_of_ne_zero hy0)]\n[GOAL]\ncase hab.hcd.hab.hcd\na y k : ℕ\nhy0 : y ≠ 0\nhk0 : k ≠ 0\nhyk : y ^ k < a\nhya : y < a\nthis : y ≤ a\nhy0_symm : 0 ≠ y\nhk0_symm : 0 ≠ k\n⊢ 1 ≤ y\n[PROOFSTEP]\nsimp [Nat.zero_le, Nat.succ_le_of_lt (Nat.pos_of_ne_zero hy0)]\n[GOAL]\na y k : ℕ\nhy0 : y ≠ 0\nhk0 : k ≠ 0\nhyk : y ^ k < a\nhya : y < a\n⊢ ↑a ^ 2 - (↑a - ↑y) ^ 2 - 1 = 2 * ↑a * ↑y - ↑y * ↑y - 1\n[PROOFSTEP]\nring\n[GOAL]\nm n k : ℕ\n⊢ n ^ k = m ↔\n    k = 0 ∧ m = 1 ∨\n      0 < k ∧\n        (n = 0 ∧ m = 0 ∨\n          0 < n ∧\n            ∃ w a t z a1,\n              xn a1 k ≡ yn a1 k * (a - n) + m [MOD t] ∧\n                2 * a * n = t + (n * n + 1) ∧\n                  m < t ∧ n ≤ w ∧ k ≤ w ∧ a * a - ((w + 1) * (w + 1) - 1) * (w * z) * (w * z) = 1)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nm n k : ℕ\n⊢ n ^ k = m →\n    k = 0 ∧ m = 1 ∨\n      0 < k ∧\n        (n = 0 ∧ m = 0 ∨\n          0 < n ∧\n            ∃ w a t z a1,\n              xn a1 k ≡ yn a1 k * (a - n) + m [MOD t] ∧\n                2 * a * n = t + (n * n + 1) ∧\n                  m < t ∧ n ≤ w ∧ k ≤ w ∧ a * a - ((w + 1) * (w + 1) - 1) * (w * z) * (w * z) = 1)\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase mp\nn k : ℕ\n⊢ k = 0 ∧ n ^ k = 1 ∨\n    0 < k ∧\n      (n = 0 ∧ n ^ k = 0 ∨\n        0 < n ∧\n          ∃ w a t z a1,\n            xn a1 k ≡ yn a1 k * (a - n) + n ^ k [MOD t] ∧\n              2 * a * n = t + (n * n + 1) ∧\n                n ^ k < t ∧ n ≤ w ∧ k ≤ w ∧ a * a - ((w + 1) * (w + 1) - 1) * (w * z) * (w * z) = 1)\n[PROOFSTEP]\nrefine' k.eq_zero_or_pos.imp (fun k0 : k = 0 => k0.symm ▸ ⟨rfl, rfl⟩) fun hk => ⟨hk, _⟩\n[GOAL]\ncase mp\nn k : ℕ\nhk : 0 < k\n⊢ n = 0 ∧ n ^ k = 0 ∨\n    0 < n ∧\n      ∃ w a t z a1,\n        xn a1 k ≡ yn a1 k * (a - n) + n ^ k [MOD t] ∧\n          2 * a * n = t + (n * n + 1) ∧\n            n ^ k < t ∧ n ≤ w ∧ k ≤ w ∧ a * a - ((w + 1) * (w + 1) - 1) * (w * z) * (w * z) = 1\n[PROOFSTEP]\nrefine' n.eq_zero_or_pos.imp (fun n0 : n = 0 => n0.symm ▸ ⟨rfl, zero_pow hk⟩) fun hn => ⟨hn, _⟩\n[GOAL]\ncase mp\nn k : ℕ\nhk : 0 < k\nhn : 0 < n\n⊢ ∃ w a t z a1,\n    xn a1 k ≡ yn a1 k * (a - n) + n ^ k [MOD t] ∧\n      2 * a * n = t + (n * n + 1) ∧ n ^ k < t ∧ n ≤ w ∧ k ≤ w ∧ a * a - ((w + 1) * (w + 1) - 1) * (w * z) * (w * z) = 1\n[PROOFSTEP]\nset w := max n k\n[GOAL]\ncase mp\nn k : ℕ\nhk : 0 < k\nhn : 0 < n\nw : ℕ := max n k\n⊢ ∃ w a t z a1,\n    xn a1 k ≡ yn a1 k * (a - n) + n ^ k [MOD t] ∧\n      2 * a * n = t + (n * n + 1) ∧ n ^ k < t ∧ n ≤ w ∧ k ≤ w ∧ a * a - ((w + 1) * (w + 1) - 1) * (w * z) * (w * z) = 1\n[PROOFSTEP]\nhave nw : n ≤ w := le_max_left _ _\n[GOAL]\ncase mp\nn k : ℕ\nhk : 0 < k\nhn : 0 < n\nw : ℕ := max n k\nnw : n ≤ w\n⊢ ∃ w a t z a1,\n    xn a1 k ≡ yn a1 k * (a - n) + n ^ k [MOD t] ∧\n      2 * a * n = t + (n * n + 1) ∧ n ^ k < t ∧ n ≤ w ∧ k ≤ w ∧ a * a - ((w + 1) * (w + 1) - 1) * (w * z) * (w * z) = 1\n[PROOFSTEP]\nhave kw : k ≤ w := le_max_right _ _\n[GOAL]\ncase mp\nn k : ℕ\nhk : 0 < k\nhn : 0 < n\nw : ℕ := max n k\nnw : n ≤ w\nkw : k ≤ w\n⊢ ∃ w a t z a1,\n    xn a1 k ≡ yn a1 k * (a - n) + n ^ k [MOD t] ∧\n      2 * a * n = t + (n * n + 1) ∧ n ^ k < t ∧ n ≤ w ∧ k ≤ w ∧ a * a - ((w + 1) * (w + 1) - 1) * (w * z) * (w * z) = 1\n[PROOFSTEP]\nhave wpos : 0 < w := hn.trans_le nw\n[GOAL]\ncase mp\nn k : ℕ\nhk : 0 < k\nhn : 0 < n\nw : ℕ := max n k\nnw : n ≤ w\nkw : k ≤ w\nwpos : 0 < w\n⊢ ∃ w a t z a1,\n    xn a1 k ≡ yn a1 k * (a - n) + n ^ k [MOD t] ∧\n      2 * a * n = t + (n * n + 1) ∧ n ^ k < t ∧ n ≤ w ∧ k ≤ w ∧ a * a - ((w + 1) * (w + 1) - 1) * (w * z) * (w * z) = 1\n[PROOFSTEP]\nhave w1 : 1 < w + 1 := Nat.succ_lt_succ wpos\n[GOAL]\ncase mp\nn k : ℕ\nhk : 0 < k\nhn : 0 < n\nw : ℕ := max n k\nnw : n ≤ w\nkw : k ≤ w\nwpos : 0 < w\nw1 : 1 < w + 1\n⊢ ∃ w a t z a1,\n    xn a1 k ≡ yn a1 k * (a - n) + n ^ k [MOD t] ∧\n      2 * a * n = t + (n * n + 1) ∧ n ^ k < t ∧ n ≤ w ∧ k ≤ w ∧ a * a - ((w + 1) * (w + 1) - 1) * (w * z) * (w * z) = 1\n[PROOFSTEP]\nset a := xn w1 w\n[GOAL]\ncase mp\nn k : ℕ\nhk : 0 < k\nhn : 0 < n\nw : ℕ := max n k\nnw : n ≤ w\nkw : k ≤ w\nwpos : 0 < w\nw1 : 1 < w + 1\na : ℕ := xn w1 w\n⊢ ∃ w a t z a1,\n    xn a1 k ≡ yn a1 k * (a - n) + n ^ k [MOD t] ∧\n      2 * a * n = t + (n * n + 1) ∧ n ^ k < t ∧ n ≤ w ∧ k ≤ w ∧ a * a - ((w + 1) * (w + 1) - 1) * (w * z) * (w * z) = 1\n[PROOFSTEP]\nhave a1 : 1 < a := strictMono_x w1 wpos\n[GOAL]\ncase mp\nn k : ℕ\nhk : 0 < k\nhn : 0 < n\nw : ℕ := max n k\nnw : n ≤ w\nkw : k ≤ w\nwpos : 0 < w\nw1 : 1 < w + 1\na : ℕ := xn w1 w\na1 : 1 < a\n⊢ ∃ w a t z a1,\n    xn a1 k ≡ yn a1 k * (a - n) + n ^ k [MOD t] ∧\n      2 * a * n = t + (n * n + 1) ∧ n ^ k < t ∧ n ≤ w ∧ k ≤ w ∧ a * a - ((w + 1) * (w + 1) - 1) * (w * z) * (w * z) = 1\n[PROOFSTEP]\nhave na : n ≤ a := nw.trans (n_lt_xn w1 w).le\n[GOAL]\ncase mp\nn k : ℕ\nhk : 0 < k\nhn : 0 < n\nw : ℕ := max n k\nnw : n ≤ w\nkw : k ≤ w\nwpos : 0 < w\nw1 : 1 < w + 1\na : ℕ := xn w1 w\na1 : 1 < a\nna : n ≤ a\n⊢ ∃ w a t z a1,\n    xn a1 k ≡ yn a1 k * (a - n) + n ^ k [MOD t] ∧\n      2 * a * n = t + (n * n + 1) ∧ n ^ k < t ∧ n ≤ w ∧ k ≤ w ∧ a * a - ((w + 1) * (w + 1) - 1) * (w * z) * (w * z) = 1\n[PROOFSTEP]\nset x := xn a1 k\n[GOAL]\ncase mp\nn k : ℕ\nhk : 0 < k\nhn : 0 < n\nw : ℕ := max n k\nnw : n ≤ w\nkw : k ≤ w\nwpos : 0 < w\nw1 : 1 < w + 1\na : ℕ := xn w1 w\na1 : 1 < a\nna : n ≤ a\nx : ℕ := xn a1 k\n⊢ ∃ w a t z a1,\n    xn a1 k ≡ yn a1 k * (a - n) + n ^ k [MOD t] ∧\n      2 * a * n = t + (n * n + 1) ∧ n ^ k < t ∧ n ≤ w ∧ k ≤ w ∧ a * a - ((w + 1) * (w + 1) - 1) * (w * z) * (w * z) = 1\n[PROOFSTEP]\nset y := yn a1 k\n[GOAL]\ncase mp\nn k : ℕ\nhk : 0 < k\nhn : 0 < n\nw : ℕ := max n k\nnw : n ≤ w\nkw : k ≤ w\nwpos : 0 < w\nw1 : 1 < w + 1\na : ℕ := xn w1 w\na1 : 1 < a\nna : n ≤ a\nx : ℕ := xn a1 k\ny : ℕ := yn a1 k\n⊢ ∃ w a t z a1,\n    xn a1 k ≡ yn a1 k * (a - n) + n ^ k [MOD t] ∧\n      2 * a * n = t + (n * n + 1) ∧ n ^ k < t ∧ n ≤ w ∧ k ≤ w ∧ a * a - ((w + 1) * (w + 1) - 1) * (w * z) * (w * z) = 1\n[PROOFSTEP]\nobtain ⟨z, ze⟩ : w ∣ yn w1 w\n[GOAL]\nn k : ℕ\nhk : 0 < k\nhn : 0 < n\nw : ℕ := max n k\nnw : n ≤ w\nkw : k ≤ w\nwpos : 0 < w\nw1 : 1 < w + 1\na : ℕ := xn w1 w\na1 : 1 < a\nna : n ≤ a\nx : ℕ := xn a1 k\ny : ℕ := yn a1 k\n⊢ w ∣ yn w1 w\ncase mp.intro\nn k : ℕ\nhk : 0 < k\nhn : 0 < n\nw : ℕ := max n k\nnw : n ≤ w\nkw : k ≤ w\nwpos : 0 < w\nw1 : 1 < w + 1\na : ℕ := xn w1 w\na1 : 1 < a\nna : n ≤ a\nx : ℕ := xn a1 k\ny : ℕ := yn a1 k\nz : ℕ\nze : yn w1 w = w * z\n⊢ ∃ w a t z a1,\n    xn a1 k ≡ yn a1 k * (a - n) + n ^ k [MOD t] ∧\n      2 * a * n = t + (n * n + 1) ∧ n ^ k < t ∧ n ≤ w ∧ k ≤ w ∧ a * a - ((w + 1) * (w + 1) - 1) * (w * z) * (w * z) = 1\n[PROOFSTEP]\nexact modEq_zero_iff_dvd.1 ((yn_modEq_a_sub_one w1 w).trans dvd_rfl.modEq_zero_nat)\n[GOAL]\ncase mp.intro\nn k : ℕ\nhk : 0 < k\nhn : 0 < n\nw : ℕ := max n k\nnw : n ≤ w\nkw : k ≤ w\nwpos : 0 < w\nw1 : 1 < w + 1\na : ℕ := xn w1 w\na1 : 1 < a\nna : n ≤ a\nx : ℕ := xn a1 k\ny : ℕ := yn a1 k\nz : ℕ\nze : yn w1 w = w * z\n⊢ ∃ w a t z a1,\n    xn a1 k ≡ yn a1 k * (a - n) + n ^ k [MOD t] ∧\n      2 * a * n = t + (n * n + 1) ∧ n ^ k < t ∧ n ≤ w ∧ k ≤ w ∧ a * a - ((w + 1) * (w + 1) - 1) * (w * z) * (w * z) = 1\n[PROOFSTEP]\nhave nt : (↑(n ^ k) : ℤ) < 2 * a * n - n * n - 1 :=\n  by\n  refine' eq_pow_of_pell_lem hn.ne' hk.ne' _\n  calc\n    n ^ k ≤ n ^ w := Nat.pow_le_pow_of_le_right hn kw\n    _ < (w + 1) ^ w := (Nat.pow_lt_pow_of_lt_left (Nat.lt_succ_of_le nw) wpos)\n    _ ≤ a := xn_ge_a_pow w1 w\n[GOAL]\nn k : ℕ\nhk : 0 < k\nhn : 0 < n\nw : ℕ := max n k\nnw : n ≤ w\nkw : k ≤ w\nwpos : 0 < w\nw1 : 1 < w + 1\na : ℕ := xn w1 w\na1 : 1 < a\nna : n ≤ a\nx : ℕ := xn a1 k\ny : ℕ := yn a1 k\nz : ℕ\nze : yn w1 w = w * z\n⊢ ↑(n ^ k) < 2 * ↑a * ↑n - ↑n * ↑n - 1\n[PROOFSTEP]\nrefine' eq_pow_of_pell_lem hn.ne' hk.ne' _\n[GOAL]\nn k : ℕ\nhk : 0 < k\nhn : 0 < n\nw : ℕ := max n k\nnw : n ≤ w\nkw : k ≤ w\nwpos : 0 < w\nw1 : 1 < w + 1\na : ℕ := xn w1 w\na1 : 1 < a\nna : n ≤ a\nx : ℕ := xn a1 k\ny : ℕ := yn a1 k\nz : ℕ\nze : yn w1 w = w * z\n⊢ n ^ k < a\n[PROOFSTEP]\ncalc\n  n ^ k ≤ n ^ w := Nat.pow_le_pow_of_le_right hn kw\n  _ < (w + 1) ^ w := (Nat.pow_lt_pow_of_lt_left (Nat.lt_succ_of_le nw) wpos)\n  _ ≤ a := xn_ge_a_pow w1 w\n[GOAL]\ncase mp.intro\nn k : ℕ\nhk : 0 < k\nhn : 0 < n\nw : ℕ := max n k\nnw : n ≤ w\nkw : k ≤ w\nwpos : 0 < w\nw1 : 1 < w + 1\na : ℕ := xn w1 w\na1 : 1 < a\nna : n ≤ a\nx : ℕ := xn a1 k\ny : ℕ := yn a1 k\nz : ℕ\nze : yn w1 w = w * z\nnt : ↑(n ^ k) < 2 * ↑a * ↑n - ↑n * ↑n - 1\n⊢ ∃ w a t z a1,\n    xn a1 k ≡ yn a1 k * (a - n) + n ^ k [MOD t] ∧\n      2 * a * n = t + (n * n + 1) ∧ n ^ k < t ∧ n ≤ w ∧ k ≤ w ∧ a * a - ((w + 1) * (w + 1) - 1) * (w * z) * (w * z) = 1\n[PROOFSTEP]\nlift (2 * a * n - n * n - 1 : ℤ) to ℕ using (Nat.cast_nonneg _).trans nt.le with t te\n[GOAL]\ncase mp.intro.intro\nn k : ℕ\nhk : 0 < k\nhn : 0 < n\nw : ℕ := max n k\nnw : n ≤ max n k\nkw : k ≤ max n k\nwpos : 0 < max n k\nw1 : 1 < max n k + 1\na : ℕ := xn w1 w\na1 : 1 < xn w1 (max n k)\nna : n ≤ xn w1 (max n k)\nx : ℕ := xn a1 k\ny : ℕ := yn a1 k\nz : ℕ\nze : yn w1 (max n k) = max n k * z\nt : ℕ\nte : ↑t = 2 * ↑a * ↑n - ↑n * ↑n - 1\nnt✝ nt : ↑(n ^ k) < ↑t\n⊢ ∃ w a t z a1,\n    xn a1 k ≡ yn a1 k * (a - n) + n ^ k [MOD t] ∧\n      2 * a * n = t + (n * n + 1) ∧ n ^ k < t ∧ n ≤ w ∧ k ≤ w ∧ a * a - ((w + 1) * (w + 1) - 1) * (w * z) * (w * z) = 1\n[PROOFSTEP]\nhave tm : x ≡ y * (a - n) + n ^ k [MOD t] := by\n  apply modEq_of_dvd\n  rw [Int.ofNat_add, Int.ofNat_mul, Int.ofNat_sub na, te]\n  exact x_sub_y_dvd_pow a1 n k\n[GOAL]\nn k : ℕ\nhk : 0 < k\nhn : 0 < n\nw : ℕ := max n k\nnw : n ≤ max n k\nkw : k ≤ max n k\nwpos : 0 < max n k\nw1 : 1 < max n k + 1\na : ℕ := xn w1 w\na1 : 1 < xn w1 (max n k)\nna : n ≤ xn w1 (max n k)\nx : ℕ := xn a1 k\ny : ℕ := yn a1 k\nz : ℕ\nze : yn w1 (max n k) = max n k * z\nt : ℕ\nte : ↑t = 2 * ↑a * ↑n - ↑n * ↑n - 1\nnt✝ nt : ↑(n ^ k) < ↑t\n⊢ x ≡ y * (a - n) + n ^ k [MOD t]\n[PROOFSTEP]\napply modEq_of_dvd\n[GOAL]\ncase a\nn k : ℕ\nhk : 0 < k\nhn : 0 < n\nw : ℕ := max n k\nnw : n ≤ max n k\nkw : k ≤ max n k\nwpos : 0 < max n k\nw1 : 1 < max n k + 1\na : ℕ := xn w1 w\na1 : 1 < xn w1 (max n k)\nna : n ≤ xn w1 (max n k)\nx : ℕ := xn a1 k\ny : ℕ := yn a1 k\nz : ℕ\nze : yn w1 (max n k) = max n k * z\nt : ℕ\nte : ↑t = 2 * ↑a * ↑n - ↑n * ↑n - 1\nnt✝ nt : ↑(n ^ k) < ↑t\n⊢ ↑t ∣ ↑(y * (a - n) + n ^ k) - ↑x\n[PROOFSTEP]\nrw [Int.ofNat_add, Int.ofNat_mul, Int.ofNat_sub na, te]\n[GOAL]\ncase a\nn k : ℕ\nhk : 0 < k\nhn : 0 < n\nw : ℕ := max n k\nnw : n ≤ max n k\nkw : k ≤ max n k\nwpos : 0 < max n k\nw1 : 1 < max n k + 1\na : ℕ := xn w1 w\na1 : 1 < xn w1 (max n k)\nna : n ≤ xn w1 (max n k)\nx : ℕ := xn a1 k\ny : ℕ := yn a1 k\nz : ℕ\nze : yn w1 (max n k) = max n k * z\nt : ℕ\nte : ↑t = 2 * ↑a * ↑n - ↑n * ↑n - 1\nnt✝ nt : ↑(n ^ k) < ↑t\n⊢ 2 * ↑a * ↑n - ↑n * ↑n - 1 ∣ ↑y * (↑(xn w1 (max n k)) - ↑n) + ↑(n ^ k) - ↑x\n[PROOFSTEP]\nexact x_sub_y_dvd_pow a1 n k\n[GOAL]\ncase mp.intro.intro\nn k : ℕ\nhk : 0 < k\nhn : 0 < n\nw : ℕ := max n k\nnw : n ≤ max n k\nkw : k ≤ max n k\nwpos : 0 < max n k\nw1 : 1 < max n k + 1\na : ℕ := xn w1 w\na1 : 1 < xn w1 (max n k)\nna : n ≤ xn w1 (max n k)\nx : ℕ := xn a1 k\ny : ℕ := yn a1 k\nz : ℕ\nze : yn w1 (max n k) = max n k * z\nt : ℕ\nte : ↑t = 2 * ↑a * ↑n - ↑n * ↑n - 1\nnt✝ nt : ↑(n ^ k) < ↑t\ntm : x ≡ y * (a - n) + n ^ k [MOD t]\n⊢ ∃ w a t z a1,\n    xn a1 k ≡ yn a1 k * (a - n) + n ^ k [MOD t] ∧\n      2 * a * n = t + (n * n + 1) ∧ n ^ k < t ∧ n ≤ w ∧ k ≤ w ∧ a * a - ((w + 1) * (w + 1) - 1) * (w * z) * (w * z) = 1\n[PROOFSTEP]\nhave ta : 2 * a * n = t + (n * n + 1) := by\n  zify\n  rw [te]\n  ring_nf\n[GOAL]\nn k : ℕ\nhk : 0 < k\nhn : 0 < n\nw : ℕ := max n k\nnw : n ≤ max n k\nkw : k ≤ max n k\nwpos : 0 < max n k\nw1 : 1 < max n k + 1\na : ℕ := xn w1 w\na1 : 1 < xn w1 (max n k)\nna : n ≤ xn w1 (max n k)\nx : ℕ := xn a1 k\ny : ℕ := yn a1 k\nz : ℕ\nze : yn w1 (max n k) = max n k * z\nt : ℕ\nte : ↑t = 2 * ↑a * ↑n - ↑n * ↑n - 1\nnt✝ nt : ↑(n ^ k) < ↑t\ntm : x ≡ y * (a - n) + n ^ k [MOD t]\n⊢ 2 * a * n = t + (n * n + 1)\n[PROOFSTEP]\nzify\n[GOAL]\nn k : ℕ\nhk : 0 < k\nhn : 0 < n\nw : ℕ := max n k\nnw : n ≤ max n k\nkw : k ≤ max n k\nwpos : 0 < max n k\nw1 : 1 < max n k + 1\na : ℕ := xn w1 w\na1 : 1 < xn w1 (max n k)\nna : n ≤ xn w1 (max n k)\nx : ℕ := xn a1 k\ny : ℕ := yn a1 k\nz : ℕ\nze : yn w1 (max n k) = max n k * z\nt : ℕ\nte : ↑t = 2 * ↑a * ↑n - ↑n * ↑n - 1\nnt✝ nt : ↑(n ^ k) < ↑t\ntm : x ≡ y * (a - n) + n ^ k [MOD t]\n⊢ 2 * ↑(xn w1 (max n k)) * ↑n = ↑t + (↑n * ↑n + 1)\n[PROOFSTEP]\nrw [te]\n[GOAL]\nn k : ℕ\nhk : 0 < k\nhn : 0 < n\nw : ℕ := max n k\nnw : n ≤ max n k\nkw : k ≤ max n k\nwpos : 0 < max n k\nw1 : 1 < max n k + 1\na : ℕ := xn w1 w\na1 : 1 < xn w1 (max n k)\nna : n ≤ xn w1 (max n k)\nx : ℕ := xn a1 k\ny : ℕ := yn a1 k\nz : ℕ\nze : yn w1 (max n k) = max n k * z\nt : ℕ\nte : ↑t = 2 * ↑a * ↑n - ↑n * ↑n - 1\nnt✝ nt : ↑(n ^ k) < ↑t\ntm : x ≡ y * (a - n) + n ^ k [MOD t]\n⊢ 2 * ↑(xn w1 (max n k)) * ↑n = 2 * ↑a * ↑n - ↑n * ↑n - 1 + (↑n * ↑n + 1)\n[PROOFSTEP]\nring_nf\n[GOAL]\ncase mp.intro.intro\nn k : ℕ\nhk : 0 < k\nhn : 0 < n\nw : ℕ := max n k\nnw : n ≤ max n k\nkw : k ≤ max n k\nwpos : 0 < max n k\nw1 : 1 < max n k + 1\na : ℕ := xn w1 w\na1 : 1 < xn w1 (max n k)\nna : n ≤ xn w1 (max n k)\nx : ℕ := xn a1 k\ny : ℕ := yn a1 k\nz : ℕ\nze : yn w1 (max n k) = max n k * z\nt : ℕ\nte : ↑t = 2 * ↑a * ↑n - ↑n * ↑n - 1\nnt✝ nt : ↑(n ^ k) < ↑t\ntm : x ≡ y * (a - n) + n ^ k [MOD t]\nta : 2 * a * n = t + (n * n + 1)\n⊢ ∃ w a t z a1,\n    xn a1 k ≡ yn a1 k * (a - n) + n ^ k [MOD t] ∧\n      2 * a * n = t + (n * n + 1) ∧ n ^ k < t ∧ n ≤ w ∧ k ≤ w ∧ a * a - ((w + 1) * (w + 1) - 1) * (w * z) * (w * z) = 1\n[PROOFSTEP]\nhave zp : a * a - ((w + 1) * (w + 1) - 1) * (w * z) * (w * z) = 1 := ze ▸ pell_eq w1 w\n[GOAL]\ncase mp.intro.intro\nn k : ℕ\nhk : 0 < k\nhn : 0 < n\nw : ℕ := max n k\nnw : n ≤ max n k\nkw : k ≤ max n k\nwpos : 0 < max n k\nw1 : 1 < max n k + 1\na : ℕ := xn w1 w\na1 : 1 < xn w1 (max n k)\nna : n ≤ xn w1 (max n k)\nx : ℕ := xn a1 k\ny : ℕ := yn a1 k\nz : ℕ\nze : yn w1 (max n k) = max n k * z\nt : ℕ\nte : ↑t = 2 * ↑a * ↑n - ↑n * ↑n - 1\nnt✝ nt : ↑(n ^ k) < ↑t\ntm : x ≡ y * (a - n) + n ^ k [MOD t]\nta : 2 * a * n = t + (n * n + 1)\nzp : a * a - ((w + 1) * (w + 1) - 1) * (w * z) * (w * z) = 1\n⊢ ∃ w a t z a1,\n    xn a1 k ≡ yn a1 k * (a - n) + n ^ k [MOD t] ∧\n      2 * a * n = t + (n * n + 1) ∧ n ^ k < t ∧ n ≤ w ∧ k ≤ w ∧ a * a - ((w + 1) * (w + 1) - 1) * (w * z) * (w * z) = 1\n[PROOFSTEP]\nexact ⟨w, a, t, z, a1, tm, ta, Nat.cast_lt.1 nt, nw, kw, zp⟩\n[GOAL]\ncase mpr\nm n k : ℕ\n⊢ k = 0 ∧ m = 1 ∨\n      0 < k ∧\n        (n = 0 ∧ m = 0 ∨\n          0 < n ∧\n            ∃ w a t z a1,\n              xn a1 k ≡ yn a1 k * (a - n) + m [MOD t] ∧\n                2 * a * n = t + (n * n + 1) ∧\n                  m < t ∧ n ≤ w ∧ k ≤ w ∧ a * a - ((w + 1) * (w + 1) - 1) * (w * z) * (w * z) = 1) →\n    n ^ k = m\n[PROOFSTEP]\nrintro (⟨rfl, rfl⟩ | ⟨hk0, ⟨rfl, rfl⟩ | ⟨hn0, w, a, t, z, a1, tm, ta, mt, nw, kw, zp⟩⟩)\n[GOAL]\ncase mpr.inl.intro\nn : ℕ\n⊢ n ^ 0 = 1\n[PROOFSTEP]\nexact _root_.pow_zero n\n[GOAL]\ncase mpr.inr.intro.inl.intro\nk : ℕ\nhk0 : 0 < k\n⊢ 0 ^ k = 0\n[PROOFSTEP]\nexact zero_pow hk0\n[GOAL]\ncase mpr.inr.intro.inr.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nm n k : ℕ\nhk0 : 0 < k\nhn0 : 0 < n\nw a t z : ℕ\na1 : 1 < a\ntm : xn a1 k ≡ yn a1 k * (a - n) + m [MOD t]\nta : 2 * a * n = t + (n * n + 1)\nmt : m < t\nnw : n ≤ w\nkw : k ≤ w\nzp : a * a - ((w + 1) * (w + 1) - 1) * (w * z) * (w * z) = 1\n⊢ n ^ k = m\n[PROOFSTEP]\nhave hw0 : 0 < w := hn0.trans_le nw\n[GOAL]\ncase mpr.inr.intro.inr.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nm n k : ℕ\nhk0 : 0 < k\nhn0 : 0 < n\nw a t z : ℕ\na1 : 1 < a\ntm : xn a1 k ≡ yn a1 k * (a - n) + m [MOD t]\nta : 2 * a * n = t + (n * n + 1)\nmt : m < t\nnw : n ≤ w\nkw : k ≤ w\nzp : a * a - ((w + 1) * (w + 1) - 1) * (w * z) * (w * z) = 1\nhw0 : 0 < w\n⊢ n ^ k = m\n[PROOFSTEP]\nhave hw1 : 1 < w + 1 := Nat.succ_lt_succ hw0\n[GOAL]\ncase mpr.inr.intro.inr.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nm n k : ℕ\nhk0 : 0 < k\nhn0 : 0 < n\nw a t z : ℕ\na1 : 1 < a\ntm : xn a1 k ≡ yn a1 k * (a - n) + m [MOD t]\nta : 2 * a * n = t + (n * n + 1)\nmt : m < t\nnw : n ≤ w\nkw : k ≤ w\nzp : a * a - ((w + 1) * (w + 1) - 1) * (w * z) * (w * z) = 1\nhw0 : 0 < w\nhw1 : 1 < w + 1\n⊢ n ^ k = m\n[PROOFSTEP]\nrcases eq_pell hw1 zp with ⟨j, rfl, yj⟩\n[GOAL]\ncase mpr.inr.intro.inr.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nm n k : ℕ\nhk0 : 0 < k\nhn0 : 0 < n\nw t z : ℕ\nmt : m < t\nnw : n ≤ w\nkw : k ≤ w\nhw0 : 0 < w\nhw1 : 1 < w + 1\nj : ℕ\nyj : w * z = yn hw1 j\na1 : 1 < xn hw1 j\ntm : xn a1 k ≡ yn a1 k * (xn hw1 j - n) + m [MOD t]\nta : 2 * xn hw1 j * n = t + (n * n + 1)\nzp : xn hw1 j * xn hw1 j - ((w + 1) * (w + 1) - 1) * (w * z) * (w * z) = 1\n⊢ n ^ k = m\n[PROOFSTEP]\nhave hj0 : 0 < j := by\n  apply Nat.pos_of_ne_zero\n  rintro rfl\n  exact lt_irrefl 1 a1\n[GOAL]\nm n k : ℕ\nhk0 : 0 < k\nhn0 : 0 < n\nw t z : ℕ\nmt : m < t\nnw : n ≤ w\nkw : k ≤ w\nhw0 : 0 < w\nhw1 : 1 < w + 1\nj : ℕ\nyj : w * z = yn hw1 j\na1 : 1 < xn hw1 j\ntm : xn a1 k ≡ yn a1 k * (xn hw1 j - n) + m [MOD t]\nta : 2 * xn hw1 j * n = t + (n * n + 1)\nzp : xn hw1 j * xn hw1 j - ((w + 1) * (w + 1) - 1) * (w * z) * (w * z) = 1\n⊢ 0 < j\n[PROOFSTEP]\napply Nat.pos_of_ne_zero\n[GOAL]\ncase a\nm n k : ℕ\nhk0 : 0 < k\nhn0 : 0 < n\nw t z : ℕ\nmt : m < t\nnw : n ≤ w\nkw : k ≤ w\nhw0 : 0 < w\nhw1 : 1 < w + 1\nj : ℕ\nyj : w * z = yn hw1 j\na1 : 1 < xn hw1 j\ntm : xn a1 k ≡ yn a1 k * (xn hw1 j - n) + m [MOD t]\nta : 2 * xn hw1 j * n = t + (n * n + 1)\nzp : xn hw1 j * xn hw1 j - ((w + 1) * (w + 1) - 1) * (w * z) * (w * z) = 1\n⊢ j ≠ 0\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase a\nm n k : ℕ\nhk0 : 0 < k\nhn0 : 0 < n\nw t z : ℕ\nmt : m < t\nnw : n ≤ w\nkw : k ≤ w\nhw0 : 0 < w\nhw1 : 1 < w + 1\nyj : w * z = yn hw1 0\na1 : 1 < xn hw1 0\ntm : xn a1 k ≡ yn a1 k * (xn hw1 0 - n) + m [MOD t]\nta : 2 * xn hw1 0 * n = t + (n * n + 1)\nzp : xn hw1 0 * xn hw1 0 - ((w + 1) * (w + 1) - 1) * (w * z) * (w * z) = 1\n⊢ False\n[PROOFSTEP]\nexact lt_irrefl 1 a1\n[GOAL]\ncase mpr.inr.intro.inr.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nm n k : ℕ\nhk0 : 0 < k\nhn0 : 0 < n\nw t z : ℕ\nmt : m < t\nnw : n ≤ w\nkw : k ≤ w\nhw0 : 0 < w\nhw1 : 1 < w + 1\nj : ℕ\nyj : w * z = yn hw1 j\na1 : 1 < xn hw1 j\ntm : xn a1 k ≡ yn a1 k * (xn hw1 j - n) + m [MOD t]\nta : 2 * xn hw1 j * n = t + (n * n + 1)\nzp : xn hw1 j * xn hw1 j - ((w + 1) * (w + 1) - 1) * (w * z) * (w * z) = 1\nhj0 : 0 < j\n⊢ n ^ k = m\n[PROOFSTEP]\nhave wj : w ≤ j :=\n  Nat.le_of_dvd hj0 (modEq_zero_iff_dvd.1 <| (yn_modEq_a_sub_one hw1 j).symm.trans <| modEq_zero_iff_dvd.2 ⟨z, yj.symm⟩)\n[GOAL]\ncase mpr.inr.intro.inr.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nm n k : ℕ\nhk0 : 0 < k\nhn0 : 0 < n\nw t z : ℕ\nmt : m < t\nnw : n ≤ w\nkw : k ≤ w\nhw0 : 0 < w\nhw1 : 1 < w + 1\nj : ℕ\nyj : w * z = yn hw1 j\na1 : 1 < xn hw1 j\ntm : xn a1 k ≡ yn a1 k * (xn hw1 j - n) + m [MOD t]\nta : 2 * xn hw1 j * n = t + (n * n + 1)\nzp : xn hw1 j * xn hw1 j - ((w + 1) * (w + 1) - 1) * (w * z) * (w * z) = 1\nhj0 : 0 < j\nwj : w ≤ j\n⊢ n ^ k = m\n[PROOFSTEP]\nhave hnka : n ^ k < xn hw1 j\n[GOAL]\ncase hnka\nm n k : ℕ\nhk0 : 0 < k\nhn0 : 0 < n\nw t z : ℕ\nmt : m < t\nnw : n ≤ w\nkw : k ≤ w\nhw0 : 0 < w\nhw1 : 1 < w + 1\nj : ℕ\nyj : w * z = yn hw1 j\na1 : 1 < xn hw1 j\ntm : xn a1 k ≡ yn a1 k * (xn hw1 j - n) + m [MOD t]\nta : 2 * xn hw1 j * n = t + (n * n + 1)\nzp : xn hw1 j * xn hw1 j - ((w + 1) * (w + 1) - 1) * (w * z) * (w * z) = 1\nhj0 : 0 < j\nwj : w ≤ j\n⊢ n ^ k < xn hw1 j\ncase mpr.inr.intro.inr.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nm n k : ℕ\nhk0 : 0 < k\nhn0 : 0 < n\nw t z : ℕ\nmt : m < t\nnw : n ≤ w\nkw : k ≤ w\nhw0 : 0 < w\nhw1 : 1 < w + 1\nj : ℕ\nyj : w * z = yn hw1 j\na1 : 1 < xn hw1 j\ntm : xn a1 k ≡ yn a1 k * (xn hw1 j - n) + m [MOD t]\nta : 2 * xn hw1 j * n = t + (n * n + 1)\nzp : xn hw1 j * xn hw1 j - ((w + 1) * (w + 1) - 1) * (w * z) * (w * z) = 1\nhj0 : 0 < j\nwj : w ≤ j\nhnka : n ^ k < xn hw1 j\n⊢ n ^ k = m\n[PROOFSTEP]\ncalc\n  n ^ k ≤ n ^ j := Nat.pow_le_pow_of_le_right hn0 (le_trans kw wj)\n  _ < (w + 1) ^ j := (Nat.pow_lt_pow_of_lt_left (Nat.lt_succ_of_le nw) hj0)\n  _ ≤ xn hw1 j := xn_ge_a_pow hw1 j\n[GOAL]\ncase mpr.inr.intro.inr.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nm n k : ℕ\nhk0 : 0 < k\nhn0 : 0 < n\nw t z : ℕ\nmt : m < t\nnw : n ≤ w\nkw : k ≤ w\nhw0 : 0 < w\nhw1 : 1 < w + 1\nj : ℕ\nyj : w * z = yn hw1 j\na1 : 1 < xn hw1 j\ntm : xn a1 k ≡ yn a1 k * (xn hw1 j - n) + m [MOD t]\nta : 2 * xn hw1 j * n = t + (n * n + 1)\nzp : xn hw1 j * xn hw1 j - ((w + 1) * (w + 1) - 1) * (w * z) * (w * z) = 1\nhj0 : 0 < j\nwj : w ≤ j\nhnka : n ^ k < xn hw1 j\n⊢ n ^ k = m\n[PROOFSTEP]\nhave nt : (↑(n ^ k) : ℤ) < 2 * xn hw1 j * n - n * n - 1 := eq_pow_of_pell_lem hn0.ne' hk0.ne' hnka\n[GOAL]\ncase mpr.inr.intro.inr.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nm n k : ℕ\nhk0 : 0 < k\nhn0 : 0 < n\nw t z : ℕ\nmt : m < t\nnw : n ≤ w\nkw : k ≤ w\nhw0 : 0 < w\nhw1 : 1 < w + 1\nj : ℕ\nyj : w * z = yn hw1 j\na1 : 1 < xn hw1 j\ntm : xn a1 k ≡ yn a1 k * (xn hw1 j - n) + m [MOD t]\nta : 2 * xn hw1 j * n = t + (n * n + 1)\nzp : xn hw1 j * xn hw1 j - ((w + 1) * (w + 1) - 1) * (w * z) * (w * z) = 1\nhj0 : 0 < j\nwj : w ≤ j\nhnka : n ^ k < xn hw1 j\nnt : ↑(n ^ k) < 2 * ↑(xn hw1 j) * ↑n - ↑n * ↑n - 1\n⊢ n ^ k = m\n[PROOFSTEP]\nhave na : n ≤ xn hw1 j := (Nat.le_self_pow hk0.ne' _).trans hnka.le\n[GOAL]\ncase mpr.inr.intro.inr.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nm n k : ℕ\nhk0 : 0 < k\nhn0 : 0 < n\nw t z : ℕ\nmt : m < t\nnw : n ≤ w\nkw : k ≤ w\nhw0 : 0 < w\nhw1 : 1 < w + 1\nj : ℕ\nyj : w * z = yn hw1 j\na1 : 1 < xn hw1 j\ntm : xn a1 k ≡ yn a1 k * (xn hw1 j - n) + m [MOD t]\nta : 2 * xn hw1 j * n = t + (n * n + 1)\nzp : xn hw1 j * xn hw1 j - ((w + 1) * (w + 1) - 1) * (w * z) * (w * z) = 1\nhj0 : 0 < j\nwj : w ≤ j\nhnka : n ^ k < xn hw1 j\nnt : ↑(n ^ k) < 2 * ↑(xn hw1 j) * ↑n - ↑n * ↑n - 1\nna : n ≤ xn hw1 j\n⊢ n ^ k = m\n[PROOFSTEP]\nhave te : (t : ℤ) = 2 * xn hw1 j * n - n * n - 1 :=\n  by\n  rw [sub_sub, eq_sub_iff_add_eq]\n  exact_mod_cast ta.symm\n[GOAL]\nm n k : ℕ\nhk0 : 0 < k\nhn0 : 0 < n\nw t z : ℕ\nmt : m < t\nnw : n ≤ w\nkw : k ≤ w\nhw0 : 0 < w\nhw1 : 1 < w + 1\nj : ℕ\nyj : w * z = yn hw1 j\na1 : 1 < xn hw1 j\ntm : xn a1 k ≡ yn a1 k * (xn hw1 j - n) + m [MOD t]\nta : 2 * xn hw1 j * n = t + (n * n + 1)\nzp : xn hw1 j * xn hw1 j - ((w + 1) * (w + 1) - 1) * (w * z) * (w * z) = 1\nhj0 : 0 < j\nwj : w ≤ j\nhnka : n ^ k < xn hw1 j\nnt : ↑(n ^ k) < 2 * ↑(xn hw1 j) * ↑n - ↑n * ↑n - 1\nna : n ≤ xn hw1 j\n⊢ ↑t = 2 * ↑(xn hw1 j) * ↑n - ↑n * ↑n - 1\n[PROOFSTEP]\nrw [sub_sub, eq_sub_iff_add_eq]\n[GOAL]\nm n k : ℕ\nhk0 : 0 < k\nhn0 : 0 < n\nw t z : ℕ\nmt : m < t\nnw : n ≤ w\nkw : k ≤ w\nhw0 : 0 < w\nhw1 : 1 < w + 1\nj : ℕ\nyj : w * z = yn hw1 j\na1 : 1 < xn hw1 j\ntm : xn a1 k ≡ yn a1 k * (xn hw1 j - n) + m [MOD t]\nta : 2 * xn hw1 j * n = t + (n * n + 1)\nzp : xn hw1 j * xn hw1 j - ((w + 1) * (w + 1) - 1) * (w * z) * (w * z) = 1\nhj0 : 0 < j\nwj : w ≤ j\nhnka : n ^ k < xn hw1 j\nnt : ↑(n ^ k) < 2 * ↑(xn hw1 j) * ↑n - ↑n * ↑n - 1\nna : n ≤ xn hw1 j\n⊢ ↑t + (↑n * ↑n + 1) = 2 * ↑(xn hw1 j) * ↑n\n[PROOFSTEP]\nexact_mod_cast ta.symm\n[GOAL]\ncase mpr.inr.intro.inr.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nm n k : ℕ\nhk0 : 0 < k\nhn0 : 0 < n\nw t z : ℕ\nmt : m < t\nnw : n ≤ w\nkw : k ≤ w\nhw0 : 0 < w\nhw1 : 1 < w + 1\nj : ℕ\nyj : w * z = yn hw1 j\na1 : 1 < xn hw1 j\ntm : xn a1 k ≡ yn a1 k * (xn hw1 j - n) + m [MOD t]\nta : 2 * xn hw1 j * n = t + (n * n + 1)\nzp : xn hw1 j * xn hw1 j - ((w + 1) * (w + 1) - 1) * (w * z) * (w * z) = 1\nhj0 : 0 < j\nwj : w ≤ j\nhnka : n ^ k < xn hw1 j\nnt : ↑(n ^ k) < 2 * ↑(xn hw1 j) * ↑n - ↑n * ↑n - 1\nna : n ≤ xn hw1 j\nte : ↑t = 2 * ↑(xn hw1 j) * ↑n - ↑n * ↑n - 1\n⊢ n ^ k = m\n[PROOFSTEP]\nhave : xn a1 k ≡ yn a1 k * (xn hw1 j - n) + n ^ k [MOD t] :=\n  by\n  apply modEq_of_dvd\n  rw [te, Nat.cast_add, Nat.cast_mul, Int.ofNat_sub na]\n  exact x_sub_y_dvd_pow a1 n k\n[GOAL]\nm n k : ℕ\nhk0 : 0 < k\nhn0 : 0 < n\nw t z : ℕ\nmt : m < t\nnw : n ≤ w\nkw : k ≤ w\nhw0 : 0 < w\nhw1 : 1 < w + 1\nj : ℕ\nyj : w * z = yn hw1 j\na1 : 1 < xn hw1 j\ntm : xn a1 k ≡ yn a1 k * (xn hw1 j - n) + m [MOD t]\nta : 2 * xn hw1 j * n = t + (n * n + 1)\nzp : xn hw1 j * xn hw1 j - ((w + 1) * (w + 1) - 1) * (w * z) * (w * z) = 1\nhj0 : 0 < j\nwj : w ≤ j\nhnka : n ^ k < xn hw1 j\nnt : ↑(n ^ k) < 2 * ↑(xn hw1 j) * ↑n - ↑n * ↑n - 1\nna : n ≤ xn hw1 j\nte : ↑t = 2 * ↑(xn hw1 j) * ↑n - ↑n * ↑n - 1\n⊢ xn a1 k ≡ yn a1 k * (xn hw1 j - n) + n ^ k [MOD t]\n[PROOFSTEP]\napply modEq_of_dvd\n[GOAL]\ncase a\nm n k : ℕ\nhk0 : 0 < k\nhn0 : 0 < n\nw t z : ℕ\nmt : m < t\nnw : n ≤ w\nkw : k ≤ w\nhw0 : 0 < w\nhw1 : 1 < w + 1\nj : ℕ\nyj : w * z = yn hw1 j\na1 : 1 < xn hw1 j\ntm : xn a1 k ≡ yn a1 k * (xn hw1 j - n) + m [MOD t]\nta : 2 * xn hw1 j * n = t + (n * n + 1)\nzp : xn hw1 j * xn hw1 j - ((w + 1) * (w + 1) - 1) * (w * z) * (w * z) = 1\nhj0 : 0 < j\nwj : w ≤ j\nhnka : n ^ k < xn hw1 j\nnt : ↑(n ^ k) < 2 * ↑(xn hw1 j) * ↑n - ↑n * ↑n - 1\nna : n ≤ xn hw1 j\nte : ↑t = 2 * ↑(xn hw1 j) * ↑n - ↑n * ↑n - 1\n⊢ ↑t ∣ ↑(yn a1 k * (xn hw1 j - n) + n ^ k) - ↑(xn a1 k)\n[PROOFSTEP]\nrw [te, Nat.cast_add, Nat.cast_mul, Int.ofNat_sub na]\n[GOAL]\ncase a\nm n k : ℕ\nhk0 : 0 < k\nhn0 : 0 < n\nw t z : ℕ\nmt : m < t\nnw : n ≤ w\nkw : k ≤ w\nhw0 : 0 < w\nhw1 : 1 < w + 1\nj : ℕ\nyj : w * z = yn hw1 j\na1 : 1 < xn hw1 j\ntm : xn a1 k ≡ yn a1 k * (xn hw1 j - n) + m [MOD t]\nta : 2 * xn hw1 j * n = t + (n * n + 1)\nzp : xn hw1 j * xn hw1 j - ((w + 1) * (w + 1) - 1) * (w * z) * (w * z) = 1\nhj0 : 0 < j\nwj : w ≤ j\nhnka : n ^ k < xn hw1 j\nnt : ↑(n ^ k) < 2 * ↑(xn hw1 j) * ↑n - ↑n * ↑n - 1\nna : n ≤ xn hw1 j\nte : ↑t = 2 * ↑(xn hw1 j) * ↑n - ↑n * ↑n - 1\n⊢ 2 * ↑(xn hw1 j) * ↑n - ↑n * ↑n - 1 ∣ ↑(yn a1 k) * (↑(xn hw1 j) - ↑n) + ↑(n ^ k) - ↑(xn a1 k)\n[PROOFSTEP]\nexact x_sub_y_dvd_pow a1 n k\n[GOAL]\ncase mpr.inr.intro.inr.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nm n k : ℕ\nhk0 : 0 < k\nhn0 : 0 < n\nw t z : ℕ\nmt : m < t\nnw : n ≤ w\nkw : k ≤ w\nhw0 : 0 < w\nhw1 : 1 < w + 1\nj : ℕ\nyj : w * z = yn hw1 j\na1 : 1 < xn hw1 j\ntm : xn a1 k ≡ yn a1 k * (xn hw1 j - n) + m [MOD t]\nta : 2 * xn hw1 j * n = t + (n * n + 1)\nzp : xn hw1 j * xn hw1 j - ((w + 1) * (w + 1) - 1) * (w * z) * (w * z) = 1\nhj0 : 0 < j\nwj : w ≤ j\nhnka : n ^ k < xn hw1 j\nnt : ↑(n ^ k) < 2 * ↑(xn hw1 j) * ↑n - ↑n * ↑n - 1\nna : n ≤ xn hw1 j\nte : ↑t = 2 * ↑(xn hw1 j) * ↑n - ↑n * ↑n - 1\nthis : xn a1 k ≡ yn a1 k * (xn hw1 j - n) + n ^ k [MOD t]\n⊢ n ^ k = m\n[PROOFSTEP]\nhave : n ^ k % t = m % t := (this.symm.trans tm).add_left_cancel' _\n[GOAL]\ncase mpr.inr.intro.inr.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nm n k : ℕ\nhk0 : 0 < k\nhn0 : 0 < n\nw t z : ℕ\nmt : m < t\nnw : n ≤ w\nkw : k ≤ w\nhw0 : 0 < w\nhw1 : 1 < w + 1\nj : ℕ\nyj : w * z = yn hw1 j\na1 : 1 < xn hw1 j\ntm : xn a1 k ≡ yn a1 k * (xn hw1 j - n) + m [MOD t]\nta : 2 * xn hw1 j * n = t + (n * n + 1)\nzp : xn hw1 j * xn hw1 j - ((w + 1) * (w + 1) - 1) * (w * z) * (w * z) = 1\nhj0 : 0 < j\nwj : w ≤ j\nhnka : n ^ k < xn hw1 j\nnt : ↑(n ^ k) < 2 * ↑(xn hw1 j) * ↑n - ↑n * ↑n - 1\nna : n ≤ xn hw1 j\nte : ↑t = 2 * ↑(xn hw1 j) * ↑n - ↑n * ↑n - 1\nthis✝ : xn a1 k ≡ yn a1 k * (xn hw1 j - n) + n ^ k [MOD t]\nthis : n ^ k % t = m % t\n⊢ n ^ k = m\n[PROOFSTEP]\nrw [← te] at nt \n[GOAL]\ncase mpr.inr.intro.inr.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nm n k : ℕ\nhk0 : 0 < k\nhn0 : 0 < n\nw t z : ℕ\nmt : m < t\nnw : n ≤ w\nkw : k ≤ w\nhw0 : 0 < w\nhw1 : 1 < w + 1\nj : ℕ\nyj : w * z = yn hw1 j\na1 : 1 < xn hw1 j\ntm : xn a1 k ≡ yn a1 k * (xn hw1 j - n) + m [MOD t]\nta : 2 * xn hw1 j * n = t + (n * n + 1)\nzp : xn hw1 j * xn hw1 j - ((w + 1) * (w + 1) - 1) * (w * z) * (w * z) = 1\nhj0 : 0 < j\nwj : w ≤ j\nhnka : n ^ k < xn hw1 j\nnt : ↑(n ^ k) < ↑t\nna : n ≤ xn hw1 j\nte : ↑t = 2 * ↑(xn hw1 j) * ↑n - ↑n * ↑n - 1\nthis✝ : xn a1 k ≡ yn a1 k * (xn hw1 j - n) + n ^ k [MOD t]\nthis : n ^ k % t = m % t\n⊢ n ^ k = m\n[PROOFSTEP]\nrwa [Nat.mod_eq_of_lt (Nat.cast_lt.1 nt), Nat.mod_eq_of_lt mt] at this \n", "meta": {"mathlib_filename": "Mathlib.NumberTheory.PellMatiyasevic", "llama_tokens": 97530, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7826624890918021, "lm_q2_score": 0.640635854839898, "lm_q1q2_score": 0.501401652750449}}
{"text": "[GOAL]\nx y : ℝ\n⊢ MonotoneOn (fun x => log x * x) {x | 1 ≤ x}\n[PROOFSTEP]\nsimp only [MonotoneOn, mem_setOf_eq]\n[GOAL]\nx y : ℝ\n⊢ ∀ ⦃a : ℝ⦄, 1 ≤ a → ∀ ⦃b : ℝ⦄, 1 ≤ b → a ≤ b → log a * a ≤ log b * b\n[PROOFSTEP]\nintro x hex y hey hxy\n[GOAL]\nx✝ y✝ x : ℝ\nhex : 1 ≤ x\ny : ℝ\nhey : 1 ≤ y\nhxy : x ≤ y\n⊢ log x * x ≤ log y * y\n[PROOFSTEP]\nhave x_pos : 0 < x := lt_of_lt_of_le zero_lt_one hex\n[GOAL]\nx✝ y✝ x : ℝ\nhex : 1 ≤ x\ny : ℝ\nhey : 1 ≤ y\nhxy : x ≤ y\nx_pos : 0 < x\n⊢ log x * x ≤ log y * y\n[PROOFSTEP]\nhave y_pos : 0 < y := lt_of_lt_of_le zero_lt_one hey\n[GOAL]\nx✝ y✝ x : ℝ\nhex : 1 ≤ x\ny : ℝ\nhey : 1 ≤ y\nhxy : x ≤ y\nx_pos : 0 < x\ny_pos : 0 < y\n⊢ log x * x ≤ log y * y\n[PROOFSTEP]\nrefine' mul_le_mul ((log_le_log x_pos y_pos).mpr hxy) hxy (le_of_lt x_pos) _\n[GOAL]\nx✝ y✝ x : ℝ\nhex : 1 ≤ x\ny : ℝ\nhey : 1 ≤ y\nhxy : x ≤ y\nx_pos : 0 < x\ny_pos : 0 < y\n⊢ 0 ≤ log y\n[PROOFSTEP]\nrwa [le_log_iff_exp_le y_pos, Real.exp_zero]\n[GOAL]\nx y : ℝ\n⊢ AntitoneOn (fun x => log x / x) {x | exp 1 ≤ x}\n[PROOFSTEP]\nsimp only [AntitoneOn, mem_setOf_eq]\n[GOAL]\nx y : ℝ\n⊢ ∀ ⦃a : ℝ⦄, exp 1 ≤ a → ∀ ⦃b : ℝ⦄, exp 1 ≤ b → a ≤ b → log b / b ≤ log a / a\n[PROOFSTEP]\nintro x hex y hey hxy\n[GOAL]\nx✝ y✝ x : ℝ\nhex : exp 1 ≤ x\ny : ℝ\nhey : exp 1 ≤ y\nhxy : x ≤ y\n⊢ log y / y ≤ log x / x\n[PROOFSTEP]\nhave x_pos : 0 < x := (exp_pos 1).trans_le hex\n[GOAL]\nx✝ y✝ x : ℝ\nhex : exp 1 ≤ x\ny : ℝ\nhey : exp 1 ≤ y\nhxy : x ≤ y\nx_pos : 0 < x\n⊢ log y / y ≤ log x / x\n[PROOFSTEP]\nhave y_pos : 0 < y := (exp_pos 1).trans_le hey\n[GOAL]\nx✝ y✝ x : ℝ\nhex : exp 1 ≤ x\ny : ℝ\nhey : exp 1 ≤ y\nhxy : x ≤ y\nx_pos : 0 < x\ny_pos : 0 < y\n⊢ log y / y ≤ log x / x\n[PROOFSTEP]\nhave hlogx : 1 ≤ log x := by rwa [le_log_iff_exp_le x_pos]\n[GOAL]\nx✝ y✝ x : ℝ\nhex : exp 1 ≤ x\ny : ℝ\nhey : exp 1 ≤ y\nhxy : x ≤ y\nx_pos : 0 < x\ny_pos : 0 < y\n⊢ 1 ≤ log x\n[PROOFSTEP]\nrwa [le_log_iff_exp_le x_pos]\n[GOAL]\nx✝ y✝ x : ℝ\nhex : exp 1 ≤ x\ny : ℝ\nhey : exp 1 ≤ y\nhxy : x ≤ y\nx_pos : 0 < x\ny_pos : 0 < y\nhlogx : 1 ≤ log x\n⊢ log y / y ≤ log x / x\n[PROOFSTEP]\nhave hyx : 0 ≤ y / x - 1 := by rwa [le_sub_iff_add_le, le_div_iff x_pos, zero_add, one_mul]\n[GOAL]\nx✝ y✝ x : ℝ\nhex : exp 1 ≤ x\ny : ℝ\nhey : exp 1 ≤ y\nhxy : x ≤ y\nx_pos : 0 < x\ny_pos : 0 < y\nhlogx : 1 ≤ log x\n⊢ 0 ≤ y / x - 1\n[PROOFSTEP]\nrwa [le_sub_iff_add_le, le_div_iff x_pos, zero_add, one_mul]\n[GOAL]\nx✝ y✝ x : ℝ\nhex : exp 1 ≤ x\ny : ℝ\nhey : exp 1 ≤ y\nhxy : x ≤ y\nx_pos : 0 < x\ny_pos : 0 < y\nhlogx : 1 ≤ log x\nhyx : 0 ≤ y / x - 1\n⊢ log y / y ≤ log x / x\n[PROOFSTEP]\nrw [div_le_iff y_pos, ← sub_le_sub_iff_right (log x)]\n[GOAL]\nx✝ y✝ x : ℝ\nhex : exp 1 ≤ x\ny : ℝ\nhey : exp 1 ≤ y\nhxy : x ≤ y\nx_pos : 0 < x\ny_pos : 0 < y\nhlogx : 1 ≤ log x\nhyx : 0 ≤ y / x - 1\n⊢ log y - log x ≤ log x / x * y - log x\n[PROOFSTEP]\ncalc\n  log y - log x = log (y / x) := by rw [log_div y_pos.ne' x_pos.ne']\n  _ ≤ y / x - 1 := (log_le_sub_one_of_pos (div_pos y_pos x_pos))\n  _ ≤ log x * (y / x - 1) := (le_mul_of_one_le_left hyx hlogx)\n  _ = log x / x * y - log x := by ring\n[GOAL]\nx✝ y✝ x : ℝ\nhex : exp 1 ≤ x\ny : ℝ\nhey : exp 1 ≤ y\nhxy : x ≤ y\nx_pos : 0 < x\ny_pos : 0 < y\nhlogx : 1 ≤ log x\nhyx : 0 ≤ y / x - 1\n⊢ log y - log x = log (y / x)\n[PROOFSTEP]\nrw [log_div y_pos.ne' x_pos.ne']\n[GOAL]\nx✝ y✝ x : ℝ\nhex : exp 1 ≤ x\ny : ℝ\nhey : exp 1 ≤ y\nhxy : x ≤ y\nx_pos : 0 < x\ny_pos : 0 < y\nhlogx : 1 ≤ log x\nhyx : 0 ≤ y / x - 1\n⊢ log x * (y / x - 1) = log x / x * y - log x\n[PROOFSTEP]\nring\n[GOAL]\nx y a : ℝ\nha : 0 < a\n⊢ AntitoneOn (fun x => log x / x ^ a) {x | exp (1 / a) ≤ x}\n[PROOFSTEP]\nsimp only [AntitoneOn, mem_setOf_eq]\n[GOAL]\nx y a : ℝ\nha : 0 < a\n⊢ ∀ ⦃a_1 : ℝ⦄, exp (1 / a) ≤ a_1 → ∀ ⦃b : ℝ⦄, exp (1 / a) ≤ b → a_1 ≤ b → log b / b ^ a ≤ log a_1 / a_1 ^ a\n[PROOFSTEP]\nintro x hex y _ hxy\n[GOAL]\nx✝¹ y✝ a : ℝ\nha : 0 < a\nx : ℝ\nhex : exp (1 / a) ≤ x\ny : ℝ\nx✝ : exp (1 / a) ≤ y\nhxy : x ≤ y\n⊢ log y / y ^ a ≤ log x / x ^ a\n[PROOFSTEP]\nhave x_pos : 0 < x := lt_of_lt_of_le (exp_pos (1 / a)) hex\n[GOAL]\nx✝¹ y✝ a : ℝ\nha : 0 < a\nx : ℝ\nhex : exp (1 / a) ≤ x\ny : ℝ\nx✝ : exp (1 / a) ≤ y\nhxy : x ≤ y\nx_pos : 0 < x\n⊢ log y / y ^ a ≤ log x / x ^ a\n[PROOFSTEP]\nhave y_pos : 0 < y := by linarith\n[GOAL]\nx✝¹ y✝ a : ℝ\nha : 0 < a\nx : ℝ\nhex : exp (1 / a) ≤ x\ny : ℝ\nx✝ : exp (1 / a) ≤ y\nhxy : x ≤ y\nx_pos : 0 < x\n⊢ 0 < y\n[PROOFSTEP]\nlinarith\n[GOAL]\nx✝¹ y✝ a : ℝ\nha : 0 < a\nx : ℝ\nhex : exp (1 / a) ≤ x\ny : ℝ\nx✝ : exp (1 / a) ≤ y\nhxy : x ≤ y\nx_pos : 0 < x\ny_pos : 0 < y\n⊢ log y / y ^ a ≤ log x / x ^ a\n[PROOFSTEP]\nhave x_nonneg : 0 ≤ x := le_trans (le_of_lt (exp_pos (1 / a))) hex\n[GOAL]\nx✝¹ y✝ a : ℝ\nha : 0 < a\nx : ℝ\nhex : exp (1 / a) ≤ x\ny : ℝ\nx✝ : exp (1 / a) ≤ y\nhxy : x ≤ y\nx_pos : 0 < x\ny_pos : 0 < y\nx_nonneg : 0 ≤ x\n⊢ log y / y ^ a ≤ log x / x ^ a\n[PROOFSTEP]\nhave y_nonneg : 0 ≤ y := by linarith\n[GOAL]\nx✝¹ y✝ a : ℝ\nha : 0 < a\nx : ℝ\nhex : exp (1 / a) ≤ x\ny : ℝ\nx✝ : exp (1 / a) ≤ y\nhxy : x ≤ y\nx_pos : 0 < x\ny_pos : 0 < y\nx_nonneg : 0 ≤ x\n⊢ 0 ≤ y\n[PROOFSTEP]\nlinarith\n[GOAL]\nx✝¹ y✝ a : ℝ\nha : 0 < a\nx : ℝ\nhex : exp (1 / a) ≤ x\ny : ℝ\nx✝ : exp (1 / a) ≤ y\nhxy : x ≤ y\nx_pos : 0 < x\ny_pos : 0 < y\nx_nonneg : 0 ≤ x\ny_nonneg : 0 ≤ y\n⊢ log y / y ^ a ≤ log x / x ^ a\n[PROOFSTEP]\nnth_rw 1 [← rpow_one y]\n[GOAL]\nx✝¹ y✝ a : ℝ\nha : 0 < a\nx : ℝ\nhex : exp (1 / a) ≤ x\ny : ℝ\nx✝ : exp (1 / a) ≤ y\nhxy : x ≤ y\nx_pos : 0 < x\ny_pos : 0 < y\nx_nonneg : 0 ≤ x\ny_nonneg : 0 ≤ y\n⊢ log (y ^ 1) / y ^ a ≤ log x / x ^ a\n[PROOFSTEP]\nnth_rw 1 [← rpow_one x]\n[GOAL]\nx✝¹ y✝ a : ℝ\nha : 0 < a\nx : ℝ\nhex : exp (1 / a) ≤ x\ny : ℝ\nx✝ : exp (1 / a) ≤ y\nhxy : x ≤ y\nx_pos : 0 < x\ny_pos : 0 < y\nx_nonneg : 0 ≤ x\ny_nonneg : 0 ≤ y\n⊢ log (y ^ 1) / y ^ a ≤ log (x ^ 1) / x ^ a\n[PROOFSTEP]\nrw [← div_self (ne_of_lt ha).symm, div_eq_mul_one_div a a, rpow_mul y_nonneg, rpow_mul x_nonneg,\n  log_rpow (rpow_pos_of_pos y_pos a), log_rpow (rpow_pos_of_pos x_pos a), mul_div_assoc, mul_div_assoc,\n  mul_le_mul_left (one_div_pos.mpr ha)]\n[GOAL]\nx✝¹ y✝ a : ℝ\nha : 0 < a\nx : ℝ\nhex : exp (1 / a) ≤ x\ny : ℝ\nx✝ : exp (1 / a) ≤ y\nhxy : x ≤ y\nx_pos : 0 < x\ny_pos : 0 < y\nx_nonneg : 0 ≤ x\ny_nonneg : 0 ≤ y\n⊢ log (y ^ a) / y ^ a ≤ log (x ^ a) / x ^ a\n[PROOFSTEP]\nrefine' log_div_self_antitoneOn _ _ _\n[GOAL]\ncase refine'_1\nx✝¹ y✝ a : ℝ\nha : 0 < a\nx : ℝ\nhex : exp (1 / a) ≤ x\ny : ℝ\nx✝ : exp (1 / a) ≤ y\nhxy : x ≤ y\nx_pos : 0 < x\ny_pos : 0 < y\nx_nonneg : 0 ≤ x\ny_nonneg : 0 ≤ y\n⊢ x ^ a ∈ {x | exp 1 ≤ x}\n[PROOFSTEP]\nsimp only [Set.mem_setOf_eq]\n[GOAL]\ncase refine'_1\nx✝¹ y✝ a : ℝ\nha : 0 < a\nx : ℝ\nhex : exp (1 / a) ≤ x\ny : ℝ\nx✝ : exp (1 / a) ≤ y\nhxy : x ≤ y\nx_pos : 0 < x\ny_pos : 0 < y\nx_nonneg : 0 ≤ x\ny_nonneg : 0 ≤ y\n⊢ exp 1 ≤ x ^ a\n[PROOFSTEP]\nconvert rpow_le_rpow _ hex (le_of_lt ha) using 1\n[GOAL]\ncase h.e'_3\nx✝¹ y✝ a : ℝ\nha : 0 < a\nx : ℝ\nhex : exp (1 / a) ≤ x\ny : ℝ\nx✝ : exp (1 / a) ≤ y\nhxy : x ≤ y\nx_pos : 0 < x\ny_pos : 0 < y\nx_nonneg : 0 ≤ x\ny_nonneg : 0 ≤ y\n⊢ exp 1 = exp (1 / a) ^ a\ncase refine'_1\nx✝¹ y✝ a : ℝ\nha : 0 < a\nx : ℝ\nhex : exp (1 / a) ≤ x\ny : ℝ\nx✝ : exp (1 / a) ≤ y\nhxy : x ≤ y\nx_pos : 0 < x\ny_pos : 0 < y\nx_nonneg : 0 ≤ x\ny_nonneg : 0 ≤ y\n⊢ 0 ≤ exp (1 / a)\n[PROOFSTEP]\nrw [← exp_mul]\n[GOAL]\ncase h.e'_3\nx✝¹ y✝ a : ℝ\nha : 0 < a\nx : ℝ\nhex : exp (1 / a) ≤ x\ny : ℝ\nx✝ : exp (1 / a) ≤ y\nhxy : x ≤ y\nx_pos : 0 < x\ny_pos : 0 < y\nx_nonneg : 0 ≤ x\ny_nonneg : 0 ≤ y\n⊢ exp 1 = exp (1 / a * a)\ncase refine'_1\nx✝¹ y✝ a : ℝ\nha : 0 < a\nx : ℝ\nhex : exp (1 / a) ≤ x\ny : ℝ\nx✝ : exp (1 / a) ≤ y\nhxy : x ≤ y\nx_pos : 0 < x\ny_pos : 0 < y\nx_nonneg : 0 ≤ x\ny_nonneg : 0 ≤ y\n⊢ 0 ≤ exp (1 / a)\n[PROOFSTEP]\nsimp only [Real.exp_eq_exp]\n[GOAL]\ncase h.e'_3\nx✝¹ y✝ a : ℝ\nha : 0 < a\nx : ℝ\nhex : exp (1 / a) ≤ x\ny : ℝ\nx✝ : exp (1 / a) ≤ y\nhxy : x ≤ y\nx_pos : 0 < x\ny_pos : 0 < y\nx_nonneg : 0 ≤ x\ny_nonneg : 0 ≤ y\n⊢ 1 = 1 / a * a\ncase refine'_1\nx✝¹ y✝ a : ℝ\nha : 0 < a\nx : ℝ\nhex : exp (1 / a) ≤ x\ny : ℝ\nx✝ : exp (1 / a) ≤ y\nhxy : x ≤ y\nx_pos : 0 < x\ny_pos : 0 < y\nx_nonneg : 0 ≤ x\ny_nonneg : 0 ≤ y\n⊢ 0 ≤ exp (1 / a)\n[PROOFSTEP]\nfield_simp [(ne_of_lt ha).symm]\n[GOAL]\ncase refine'_1\nx✝¹ y✝ a : ℝ\nha : 0 < a\nx : ℝ\nhex : exp (1 / a) ≤ x\ny : ℝ\nx✝ : exp (1 / a) ≤ y\nhxy : x ≤ y\nx_pos : 0 < x\ny_pos : 0 < y\nx_nonneg : 0 ≤ x\ny_nonneg : 0 ≤ y\n⊢ 0 ≤ exp (1 / a)\n[PROOFSTEP]\nexact le_of_lt (exp_pos (1 / a))\n[GOAL]\ncase refine'_2\nx✝¹ y✝ a : ℝ\nha : 0 < a\nx : ℝ\nhex : exp (1 / a) ≤ x\ny : ℝ\nx✝ : exp (1 / a) ≤ y\nhxy : x ≤ y\nx_pos : 0 < x\ny_pos : 0 < y\nx_nonneg : 0 ≤ x\ny_nonneg : 0 ≤ y\n⊢ y ^ a ∈ {x | exp 1 ≤ x}\n[PROOFSTEP]\nsimp only [Set.mem_setOf_eq]\n[GOAL]\ncase refine'_2\nx✝¹ y✝ a : ℝ\nha : 0 < a\nx : ℝ\nhex : exp (1 / a) ≤ x\ny : ℝ\nx✝ : exp (1 / a) ≤ y\nhxy : x ≤ y\nx_pos : 0 < x\ny_pos : 0 < y\nx_nonneg : 0 ≤ x\ny_nonneg : 0 ≤ y\n⊢ exp 1 ≤ y ^ a\n[PROOFSTEP]\nconvert rpow_le_rpow _ (_root_.trans hex hxy) (le_of_lt ha) using 1\n[GOAL]\ncase h.e'_3\nx✝¹ y✝ a : ℝ\nha : 0 < a\nx : ℝ\nhex : exp (1 / a) ≤ x\ny : ℝ\nx✝ : exp (1 / a) ≤ y\nhxy : x ≤ y\nx_pos : 0 < x\ny_pos : 0 < y\nx_nonneg : 0 ≤ x\ny_nonneg : 0 ≤ y\n⊢ exp 1 = exp (1 / a) ^ a\ncase refine'_2\nx✝¹ y✝ a : ℝ\nha : 0 < a\nx : ℝ\nhex : exp (1 / a) ≤ x\ny : ℝ\nx✝ : exp (1 / a) ≤ y\nhxy : x ≤ y\nx_pos : 0 < x\ny_pos : 0 < y\nx_nonneg : 0 ≤ x\ny_nonneg : 0 ≤ y\n⊢ 0 ≤ exp (1 / a)\n[PROOFSTEP]\nrw [← exp_mul]\n[GOAL]\ncase h.e'_3\nx✝¹ y✝ a : ℝ\nha : 0 < a\nx : ℝ\nhex : exp (1 / a) ≤ x\ny : ℝ\nx✝ : exp (1 / a) ≤ y\nhxy : x ≤ y\nx_pos : 0 < x\ny_pos : 0 < y\nx_nonneg : 0 ≤ x\ny_nonneg : 0 ≤ y\n⊢ exp 1 = exp (1 / a * a)\ncase refine'_2\nx✝¹ y✝ a : ℝ\nha : 0 < a\nx : ℝ\nhex : exp (1 / a) ≤ x\ny : ℝ\nx✝ : exp (1 / a) ≤ y\nhxy : x ≤ y\nx_pos : 0 < x\ny_pos : 0 < y\nx_nonneg : 0 ≤ x\ny_nonneg : 0 ≤ y\n⊢ 0 ≤ exp (1 / a)\n[PROOFSTEP]\nsimp only [Real.exp_eq_exp]\n[GOAL]\ncase h.e'_3\nx✝¹ y✝ a : ℝ\nha : 0 < a\nx : ℝ\nhex : exp (1 / a) ≤ x\ny : ℝ\nx✝ : exp (1 / a) ≤ y\nhxy : x ≤ y\nx_pos : 0 < x\ny_pos : 0 < y\nx_nonneg : 0 ≤ x\ny_nonneg : 0 ≤ y\n⊢ 1 = 1 / a * a\ncase refine'_2\nx✝¹ y✝ a : ℝ\nha : 0 < a\nx : ℝ\nhex : exp (1 / a) ≤ x\ny : ℝ\nx✝ : exp (1 / a) ≤ y\nhxy : x ≤ y\nx_pos : 0 < x\ny_pos : 0 < y\nx_nonneg : 0 ≤ x\ny_nonneg : 0 ≤ y\n⊢ 0 ≤ exp (1 / a)\n[PROOFSTEP]\nfield_simp [(ne_of_lt ha).symm]\n[GOAL]\ncase refine'_2\nx✝¹ y✝ a : ℝ\nha : 0 < a\nx : ℝ\nhex : exp (1 / a) ≤ x\ny : ℝ\nx✝ : exp (1 / a) ≤ y\nhxy : x ≤ y\nx_pos : 0 < x\ny_pos : 0 < y\nx_nonneg : 0 ≤ x\ny_nonneg : 0 ≤ y\n⊢ 0 ≤ exp (1 / a)\n[PROOFSTEP]\nexact le_of_lt (exp_pos (1 / a))\n[GOAL]\ncase refine'_3\nx✝¹ y✝ a : ℝ\nha : 0 < a\nx : ℝ\nhex : exp (1 / a) ≤ x\ny : ℝ\nx✝ : exp (1 / a) ≤ y\nhxy : x ≤ y\nx_pos : 0 < x\ny_pos : 0 < y\nx_nonneg : 0 ≤ x\ny_nonneg : 0 ≤ y\n⊢ x ^ a ≤ y ^ a\n[PROOFSTEP]\nexact rpow_le_rpow x_nonneg hxy (le_of_lt ha)\n[GOAL]\nx y : ℝ\n⊢ AntitoneOn (fun x => log x / sqrt x) {x | exp 2 ≤ x}\n[PROOFSTEP]\nsimp_rw [sqrt_eq_rpow]\n[GOAL]\nx y : ℝ\n⊢ AntitoneOn (fun x => log x / x ^ (1 / 2)) {x | exp 2 ≤ x}\n[PROOFSTEP]\nconvert @log_div_self_rpow_antitoneOn (1 / 2) (by norm_num)\n[GOAL]\nx y : ℝ\n⊢ 0 < 1 / 2\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase h.e'_6.h.e'_2.h.h.e'_3.h.e'_1\nx y x✝ : ℝ\n⊢ 2 = 1 / (1 / 2)\n[PROOFSTEP]\nnorm_num\n", "meta": {"mathlib_filename": "Mathlib.Analysis.SpecialFunctions.Log.Monotone", "llama_tokens": 6697, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7826624688140728, "lm_q2_score": 0.6406358685621719, "lm_q1q2_score": 0.5014016504997173}}
{"text": "[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nn : ℕ\n⊢ T R (n + 2) = 2 * X * T R (n + 1) - T R n\n[PROOFSTEP]\nrw [T]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\n⊢ T R 2 = 2 * X ^ 2 - 1\n[PROOFSTEP]\nsimp only [T, sub_left_inj, sq, mul_assoc]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nn : ℕ\nh : 2 ≤ n\n⊢ T R n = 2 * X * T R (n - 1) - T R (n - 2)\n[PROOFSTEP]\nobtain ⟨n, rfl⟩ := Nat.exists_eq_add_of_le h\n[GOAL]\ncase intro\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nn : ℕ\nh : 2 ≤ 2 + n\n⊢ T R (2 + n) = 2 * X * T R (2 + n - 1) - T R (2 + n - 2)\n[PROOFSTEP]\nrw [add_comm]\n[GOAL]\ncase intro\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nn : ℕ\nh : 2 ≤ 2 + n\n⊢ T R (n + 2) = 2 * X * T R (n + 2 - 1) - T R (n + 2 - 2)\n[PROOFSTEP]\nexact T_add_two R n\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nn : ℕ\n⊢ U R (n + 2) = 2 * X * U R (n + 1) - U R n\n[PROOFSTEP]\nrw [U]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\n⊢ U R 2 = 4 * X ^ 2 - 1\n[PROOFSTEP]\nsimp only [U]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\n⊢ 2 * X * (2 * X) - 1 = 4 * X ^ 2 - 1\n[PROOFSTEP]\nring\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nn : ℕ\nh : 2 ≤ n\n⊢ U R n = 2 * X * U R (n - 1) - U R (n - 2)\n[PROOFSTEP]\nobtain ⟨n, rfl⟩ := Nat.exists_eq_add_of_le h\n[GOAL]\ncase intro\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nn : ℕ\nh : 2 ≤ 2 + n\n⊢ U R (2 + n) = 2 * X * U R (2 + n - 1) - U R (2 + n - 2)\n[PROOFSTEP]\nrw [add_comm]\n[GOAL]\ncase intro\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nn : ℕ\nh : 2 ≤ 2 + n\n⊢ U R (n + 2) = 2 * X * U R (n + 2 - 1) - U R (n + 2 - 2)\n[PROOFSTEP]\nexact U_add_two R n\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\n⊢ U R (0 + 1) = X * U R 0 + T R (0 + 1)\n[PROOFSTEP]\nsimp only [T, U, two_mul, mul_one]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\n⊢ U R (1 + 1) = X * U R 1 + T R (1 + 1)\n[PROOFSTEP]\nsimp only [T, U]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\n⊢ 2 * X * (2 * X) - 1 = X * (2 * X) + (2 * X * X - 1)\n[PROOFSTEP]\nring\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nn : ℕ\n⊢ U R (n + 2 + 1) = 2 * X * (X * U R (n + 1) + T R (n + 2)) - (X * U R n + T R (n + 1))\n[PROOFSTEP]\nrw [U_add_two, U_eq_X_mul_U_add_T n, U_eq_X_mul_U_add_T (n + 1), U_eq_X_mul_U_add_T n]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nn : ℕ\n⊢ 2 * X * (X * U R (n + 1) + T R (n + 2)) - (X * U R n + T R (n + 1)) =\n    X * (2 * X * U R (n + 1) - U R n) + (2 * X * T R (n + 2) - T R (n + 1))\n[PROOFSTEP]\nring\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nn : ℕ\n⊢ X * (2 * X * U R (n + 1) - U R n) + (2 * X * T R (n + 2) - T R (n + 1)) = X * U R (n + 2) + T R (n + 2 + 1)\n[PROOFSTEP]\nsimp only [U_add_two, T_add_two]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nn : ℕ\n⊢ T R (n + 1) = U R (n + 1) - X * U R n\n[PROOFSTEP]\nrw [U_eq_X_mul_U_add_T, add_comm (X * U R n), add_sub_cancel]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\n⊢ T R (0 + 2) = X * T R (0 + 1) - (1 - X ^ 2) * U R 0\n[PROOFSTEP]\nsimp only [T, U]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\n⊢ 2 * X * X - 1 = X * X - (1 - X ^ 2) * 1\n[PROOFSTEP]\nring\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\n⊢ T R (1 + 2) = X * T R (1 + 1) - (1 - X ^ 2) * U R 1\n[PROOFSTEP]\nsimp only [T, U]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\n⊢ 2 * X * (2 * X * X - 1) - X = X * (2 * X * X - 1) - (1 - X ^ 2) * (2 * X)\n[PROOFSTEP]\nring\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nn : ℕ\n⊢ 2 * X * T R (n + 2 + 1) - T R (n + 2) =\n    2 * X * (X * T R (n + 2) - (1 - X ^ 2) * U R (n + 1)) - (X * T R (n + 1) - (1 - X ^ 2) * U R n)\n[PROOFSTEP]\nsimp only [T_eq_X_mul_T_sub_pol_U]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nn : ℕ\n⊢ 2 * X * (X * T R (n + 2) - (1 - X ^ 2) * U R (n + 1)) - (X * T R (n + 1) - (1 - X ^ 2) * U R n) =\n    X * (2 * X * T R (n + 2) - T R (n + 1)) - (1 - X ^ 2) * (2 * X * U R (n + 1) - U R n)\n[PROOFSTEP]\nring\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nn : ℕ\n⊢ X * (2 * X * T R (n + 2) - T R (n + 1)) - (1 - X ^ 2) * (2 * X * U R (n + 1) - U R n) =\n    X * T R (n + 2 + 1) - (1 - X ^ 2) * U R (n + 2)\n[PROOFSTEP]\nrw [T_add_two _ (n + 1), U_add_two]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nn : ℕ\n⊢ (1 - X ^ 2) * U R n = X * T R (n + 1) - T R (n + 2)\n[PROOFSTEP]\nrw [T_eq_X_mul_T_sub_pol_U, ← sub_add, sub_self, zero_add]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\n⊢ map f (T R 0) = T S 0\n[PROOFSTEP]\nsimp only [T_zero, Polynomial.map_one]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\n⊢ map f (T R 1) = T S 1\n[PROOFSTEP]\nsimp only [T_one, map_X]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nn : ℕ\n⊢ map f (T R (n + 2)) = T S (n + 2)\n[PROOFSTEP]\nsimp only [T_add_two, Polynomial.map_mul, Polynomial.map_sub, map_X, Polynomial.map_add, Polynomial.map_one,\n  Polynomial.map_ofNat, map_T f (n + 1), map_T f n]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\n⊢ map f (U R 0) = U S 0\n[PROOFSTEP]\nsimp only [U_zero, Polynomial.map_one]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\n⊢ map f (U R 1) = U S 1\n[PROOFSTEP]\nsimp [U_one, map_X, Polynomial.map_mul, Polynomial.map_add, Polynomial.map_one]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nn : ℕ\n⊢ map f (U R (n + 2)) = U S (n + 2)\n[PROOFSTEP]\nsimp only [U_add_two, Polynomial.map_mul, Polynomial.map_sub, map_X, Polynomial.map_add, Polynomial.map_one,\n  map_U f (n + 1), map_U f n]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nn : ℕ\n⊢ map f 2 * X * U S (n + 1) - U S n = 2 * X * U S (n + 1) - U S n\n[PROOFSTEP]\nnorm_num\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\n⊢ ↑derivative (T R (0 + 1)) = (↑0 + 1) * U R 0\n[PROOFSTEP]\nsimp only [T_one, U_zero, derivative_X, Nat.cast_zero, zero_add, mul_one]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\n⊢ ↑derivative (T R (1 + 1)) = (↑1 + 1) * U R 1\n[PROOFSTEP]\nsimp [T_two, U_one, derivative_sub, derivative_one, derivative_mul, derivative_X_pow, add_mul]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nn : ℕ\n⊢ ↑derivative (T R (n + 2 + 1)) = 2 * T R (n + 2) + 2 * X * ↑derivative (T R (n + 1 + 1)) - ↑derivative (T R (n + 1))\n[PROOFSTEP]\nrw [T_add_two _ (n + 1), derivative_sub, derivative_mul, derivative_mul, derivative_X, derivative_ofNat]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nn : ℕ\n⊢ (0 * X + 2 * 1) * T R (n + 1 + 1) + 2 * X * ↑derivative (T R (n + 1 + 1)) - ↑derivative (T R (n + 1)) =\n    2 * T R (n + 2) + 2 * X * ↑derivative (T R (n + 1 + 1)) - ↑derivative (T R (n + 1))\n[PROOFSTEP]\nring_nf\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nn : ℕ\n⊢ 2 * T R (n + 2) + 2 * X * ↑derivative (T R (n + 1 + 1)) - ↑derivative (T R (n + 1)) =\n    2 * (U R (n + 1 + 1) - X * U R (n + 1)) + 2 * X * ((↑n + 1 + 1) * U R (n + 1)) - (↑n + 1) * U R n\n[PROOFSTEP]\nrw_mod_cast [T_derivative_eq_U (n + 1), T_derivative_eq_U n, T_eq_U_sub_X_mul_U _ (n + 1)]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nn : ℕ\n⊢ 2 * (U R (n + 1 + 1) - X * U R (n + 1)) + 2 * X * ((↑n + 1 + 1) * U R (n + 1)) - (↑n + 1) * U R n =\n    (↑n + 1) * (2 * X * U R (n + 1) - U R n) + 2 * U R (n + 2)\n[PROOFSTEP]\nring\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nn : ℕ\n⊢ (↑n + 1) * (2 * X * U R (n + 1) - U R n) + 2 * U R (n + 2) = (↑n + 1) * U R (n + 2) + 2 * U R (n + 2)\n[PROOFSTEP]\nrw [U_add_two]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nn : ℕ\n⊢ (↑n + 1) * U R (n + 2) + 2 * U R (n + 2) = (↑n + 2 + 1) * U R (n + 2)\n[PROOFSTEP]\nring\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nn : ℕ\n⊢ (↑n + 2 + 1) * U R (n + 2) = (↑(n + 2) + 1) * U R (n + 2)\n[PROOFSTEP]\nnorm_cast\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nn : ℕ\n⊢ (1 - X ^ 2) * ↑derivative (T R (n + 1)) = (1 - X ^ 2) * ((↑n + 1) * U R n)\n[PROOFSTEP]\nrw [T_derivative_eq_U]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nn : ℕ\n⊢ (1 - X ^ 2) * ((↑n + 1) * U R n) = (↑n + 1) * ((1 - X ^ 2) * U R n)\n[PROOFSTEP]\nring\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nn : ℕ\n⊢ (↑n + 1) * ((1 - X ^ 2) * U R n) = (↑n + 1) * (X * T R (n + 1) - (2 * X * T R (n + 1) - T R n))\n[PROOFSTEP]\nrw [one_sub_X_sq_mul_U_eq_pol_in_T, T_add_two]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nn : ℕ\n⊢ (↑n + 1) * (X * T R (n + 1) - (2 * X * T R (n + 1) - T R n)) = (↑n + 1) * (T R n - X * T R (n + 1))\n[PROOFSTEP]\nring\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nn : ℕ\n⊢ (↑n + 1) * T R (n + 1) = X * U R n - (1 - X ^ 2) * ↑derivative (U R n)\n[PROOFSTEP]\nhave h :\n  derivative (T R (n + 2)) =\n    U R (n + 1) - X * U R n + X * derivative (T R (n + 1)) + 2 * X * U R n - (1 - X ^ 2) * derivative (U R n) :=\n  by\n  conv_lhs => rw [T_eq_X_mul_T_sub_pol_U]\n  simp only [derivative_sub, derivative_mul, derivative_X, derivative_one, derivative_X_pow, one_mul, T_derivative_eq_U]\n  rw [T_eq_U_sub_X_mul_U, C_eq_nat_cast]\n  ring\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nn : ℕ\n⊢ ↑derivative (T R (n + 2)) =\n    U R (n + 1) - X * U R n + X * ↑derivative (T R (n + 1)) + 2 * X * U R n - (1 - X ^ 2) * ↑derivative (U R n)\n[PROOFSTEP]\nconv_lhs => rw [T_eq_X_mul_T_sub_pol_U]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nn : ℕ\n| ↑derivative (T R (n + 2))\n[PROOFSTEP]\nrw [T_eq_X_mul_T_sub_pol_U]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nn : ℕ\n| ↑derivative (T R (n + 2))\n[PROOFSTEP]\nrw [T_eq_X_mul_T_sub_pol_U]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nn : ℕ\n| ↑derivative (T R (n + 2))\n[PROOFSTEP]\nrw [T_eq_X_mul_T_sub_pol_U]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nn : ℕ\n⊢ ↑derivative (X * T R (n + 1) - (1 - X ^ 2) * U R n) =\n    U R (n + 1) - X * U R n + X * ↑derivative (T R (n + 1)) + 2 * X * U R n - (1 - X ^ 2) * ↑derivative (U R n)\n[PROOFSTEP]\nsimp only [derivative_sub, derivative_mul, derivative_X, derivative_one, derivative_X_pow, one_mul, T_derivative_eq_U]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nn : ℕ\n⊢ T R (n + 1) + X * ((↑n + 1) * U R n) - ((0 - ↑C ↑2 * X ^ (2 - 1)) * U R n + (1 - X ^ 2) * ↑derivative (U R n)) =\n    U R (n + 1) - X * U R n + X * ((↑n + 1) * U R n) + 2 * X * U R n - (1 - X ^ 2) * ↑derivative (U R n)\n[PROOFSTEP]\nrw [T_eq_U_sub_X_mul_U, C_eq_nat_cast]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nn : ℕ\n⊢ U R (n + 1) - X * U R n + X * ((↑n + 1) * U R n) -\n      ((0 - ↑2 * X ^ (2 - 1)) * U R n + (1 - X ^ 2) * ↑derivative (U R n)) =\n    U R (n + 1) - X * U R n + X * ((↑n + 1) * U R n) + 2 * X * U R n - (1 - X ^ 2) * ↑derivative (U R n)\n[PROOFSTEP]\nring\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nn : ℕ\nh :\n  ↑derivative (T R (n + 2)) =\n    U R (n + 1) - X * U R n + X * ↑derivative (T R (n + 1)) + 2 * X * U R n - (1 - X ^ 2) * ↑derivative (U R n)\n⊢ (↑n + 1) * T R (n + 1) = X * U R n - (1 - X ^ 2) * ↑derivative (U R n)\n[PROOFSTEP]\ncalc\n  ((n : R[X]) + 1) * T R (n + 1) =\n      ((n : R[X]) + 1 + 1) * (X * U R n + T R (n + 1)) - X * ((n + 1 : R[X]) * U R n) - (X * U R n + T R (n + 1)) :=\n    by ring\n  _ = derivative (T R (n + 2)) - X * derivative (T R (n + 1)) - U R (n + 1) := by\n    rw [← U_eq_X_mul_U_add_T, ← T_derivative_eq_U, ← Nat.cast_one, ← Nat.cast_add, Nat.cast_one, ←\n      T_derivative_eq_U (n + 1)]\n  _ =\n      U R (n + 1) - X * U R n + X * derivative (T R (n + 1)) + 2 * X * U R n - (1 - X ^ 2) * derivative (U R n) -\n          X * derivative (T R (n + 1)) -\n        U R (n + 1) :=\n    by rw [h]\n  _ = X * U R n - (1 - X ^ 2) * derivative (U R n) := by ring\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nn : ℕ\nh :\n  ↑derivative (T R (n + 2)) =\n    U R (n + 1) - X * U R n + X * ↑derivative (T R (n + 1)) + 2 * X * U R n - (1 - X ^ 2) * ↑derivative (U R n)\n⊢ (↑n + 1) * T R (n + 1) = (↑n + 1 + 1) * (X * U R n + T R (n + 1)) - X * ((↑n + 1) * U R n) - (X * U R n + T R (n + 1))\n[PROOFSTEP]\nring\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nn : ℕ\nh :\n  ↑derivative (T R (n + 2)) =\n    U R (n + 1) - X * U R n + X * ↑derivative (T R (n + 1)) + 2 * X * U R n - (1 - X ^ 2) * ↑derivative (U R n)\n⊢ (↑n + 1 + 1) * (X * U R n + T R (n + 1)) - X * ((↑n + 1) * U R n) - (X * U R n + T R (n + 1)) =\n    ↑derivative (T R (n + 2)) - X * ↑derivative (T R (n + 1)) - U R (n + 1)\n[PROOFSTEP]\nrw [← U_eq_X_mul_U_add_T, ← T_derivative_eq_U, ← Nat.cast_one, ← Nat.cast_add, Nat.cast_one, ←\n  T_derivative_eq_U (n + 1)]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nn : ℕ\nh :\n  ↑derivative (T R (n + 2)) =\n    U R (n + 1) - X * U R n + X * ↑derivative (T R (n + 1)) + 2 * X * U R n - (1 - X ^ 2) * ↑derivative (U R n)\n⊢ ↑derivative (T R (n + 2)) - X * ↑derivative (T R (n + 1)) - U R (n + 1) =\n    U R (n + 1) - X * U R n + X * ↑derivative (T R (n + 1)) + 2 * X * U R n - (1 - X ^ 2) * ↑derivative (U R n) -\n        X * ↑derivative (T R (n + 1)) -\n      U R (n + 1)\n[PROOFSTEP]\nrw [h]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nn : ℕ\nh :\n  ↑derivative (T R (n + 2)) =\n    U R (n + 1) - X * U R n + X * ↑derivative (T R (n + 1)) + 2 * X * U R n - (1 - X ^ 2) * ↑derivative (U R n)\n⊢ U R (n + 1) - X * U R n + X * ↑derivative (T R (n + 1)) + 2 * X * U R n - (1 - X ^ 2) * ↑derivative (U R n) -\n        X * ↑derivative (T R (n + 1)) -\n      U R (n + 1) =\n    X * U R n - (1 - X ^ 2) * ↑derivative (U R n)\n[PROOFSTEP]\nring\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\n⊢ ∀ (k : ℕ), 2 * T R 0 * T R (0 + k) = T R (2 * 0 + k) + T R k\n[PROOFSTEP]\nsimp [two_mul, add_mul]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\n⊢ ∀ (k : ℕ), 2 * T R 1 * T R (1 + k) = T R (2 * 1 + k) + T R k\n[PROOFSTEP]\nsimp [add_comm]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nm : ℕ\n⊢ ∀ (k : ℕ), 2 * T R (m + 2) * T R (m + 2 + k) = T R (2 * (m + 2) + k) + T R k\n[PROOFSTEP]\nintro k\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nm k : ℕ\n⊢ 2 * T R (m + 2) * T R (m + 2 + k) = T R (2 * (m + 2) + k) + T R k\n[PROOFSTEP]\nsuffices 2 * T R (m + 2) * T R (m + k + 2) = T R (2 * m + k + 4) + T R k\n  by\n  have h_nat₁ : 2 * (m + 2) + k = 2 * m + k + 4 := by ring\n  have h_nat₂ : m + 2 + k = m + k + 2 := by ring\n  simpa [h_nat₁, h_nat₂] using this\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nm k : ℕ\nthis : 2 * T R (m + 2) * T R (m + k + 2) = T R (2 * m + k + 4) + T R k\n⊢ 2 * T R (m + 2) * T R (m + 2 + k) = T R (2 * (m + 2) + k) + T R k\n[PROOFSTEP]\nhave h_nat₁ : 2 * (m + 2) + k = 2 * m + k + 4 := by ring\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nm k : ℕ\nthis : 2 * T R (m + 2) * T R (m + k + 2) = T R (2 * m + k + 4) + T R k\n⊢ 2 * (m + 2) + k = 2 * m + k + 4\n[PROOFSTEP]\nring\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nm k : ℕ\nthis : 2 * T R (m + 2) * T R (m + k + 2) = T R (2 * m + k + 4) + T R k\nh_nat₁ : 2 * (m + 2) + k = 2 * m + k + 4\n⊢ 2 * T R (m + 2) * T R (m + 2 + k) = T R (2 * (m + 2) + k) + T R k\n[PROOFSTEP]\nhave h_nat₂ : m + 2 + k = m + k + 2 := by ring\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nm k : ℕ\nthis : 2 * T R (m + 2) * T R (m + k + 2) = T R (2 * m + k + 4) + T R k\nh_nat₁ : 2 * (m + 2) + k = 2 * m + k + 4\n⊢ m + 2 + k = m + k + 2\n[PROOFSTEP]\nring\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nm k : ℕ\nthis : 2 * T R (m + 2) * T R (m + k + 2) = T R (2 * m + k + 4) + T R k\nh_nat₁ : 2 * (m + 2) + k = 2 * m + k + 4\nh_nat₂ : m + 2 + k = m + k + 2\n⊢ 2 * T R (m + 2) * T R (m + 2 + k) = T R (2 * (m + 2) + k) + T R k\n[PROOFSTEP]\nsimpa [h_nat₁, h_nat₂] using this\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nm k : ℕ\n⊢ 2 * T R (m + 2) * T R (m + k + 2) = T R (2 * m + k + 4) + T R k\n[PROOFSTEP]\nhave H₁ : 2 * T R (m + 1) * T R (m + k + 2) = T R (2 * m + k + 3) + T R (k + 1) :=\n  by\n  have h_nat₁ : m + 1 + (k + 1) = m + k + 2 := by ring\n  have h_nat₂ : 2 * (m + 1) + (k + 1) = 2 * m + k + 3 := by ring\n  simpa [h_nat₁, h_nat₂] using\n    mul_T (m + 1)\n      (k + 1)\n        -- clean up the `T` nat indices in the inductive hypothesis applied to `m` and `k + 2`\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nm k : ℕ\n⊢ 2 * T R (m + 1) * T R (m + k + 2) = T R (2 * m + k + 3) + T R (k + 1)\n[PROOFSTEP]\nhave h_nat₁ : m + 1 + (k + 1) = m + k + 2 := by ring\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nm k : ℕ\n⊢ m + 1 + (k + 1) = m + k + 2\n[PROOFSTEP]\nring\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nm k : ℕ\nh_nat₁ : m + 1 + (k + 1) = m + k + 2\n⊢ 2 * T R (m + 1) * T R (m + k + 2) = T R (2 * m + k + 3) + T R (k + 1)\n[PROOFSTEP]\nhave h_nat₂ : 2 * (m + 1) + (k + 1) = 2 * m + k + 3 := by ring\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nm k : ℕ\nh_nat₁ : m + 1 + (k + 1) = m + k + 2\n⊢ 2 * (m + 1) + (k + 1) = 2 * m + k + 3\n[PROOFSTEP]\nring\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nm k : ℕ\nh_nat₁ : m + 1 + (k + 1) = m + k + 2\nh_nat₂ : 2 * (m + 1) + (k + 1) = 2 * m + k + 3\n⊢ 2 * T R (m + 1) * T R (m + k + 2) = T R (2 * m + k + 3) + T R (k + 1)\n[PROOFSTEP]\nsimpa [h_nat₁, h_nat₂] using\n  mul_T (m + 1)\n    (k + 1)\n      -- clean up the `T` nat indices in the inductive hypothesis applied to `m` and `k + 2`\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nm k : ℕ\nH₁ : 2 * T R (m + 1) * T R (m + k + 2) = T R (2 * m + k + 3) + T R (k + 1)\n⊢ 2 * T R (m + 2) * T R (m + k + 2) = T R (2 * m + k + 4) + T R k\n[PROOFSTEP]\nhave H₂ : 2 * T R m * T R (m + k + 2) = T R (2 * m + k + 2) + T R (k + 2) :=\n  by\n  have h_nat₁ : 2 * m + (k + 2) = 2 * m + k + 2 := by simp [add_assoc]\n  have h_nat₂ : m + (k + 2) = m + k + 2 := by simp [add_assoc]\n  simpa [h_nat₁, h_nat₂] using\n    mul_T m\n      (k + 2)\n        -- state the `T` recurrence relation for a few useful indices\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nm k : ℕ\nH₁ : 2 * T R (m + 1) * T R (m + k + 2) = T R (2 * m + k + 3) + T R (k + 1)\n⊢ 2 * T R m * T R (m + k + 2) = T R (2 * m + k + 2) + T R (k + 2)\n[PROOFSTEP]\nhave h_nat₁ : 2 * m + (k + 2) = 2 * m + k + 2 := by simp [add_assoc]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nm k : ℕ\nH₁ : 2 * T R (m + 1) * T R (m + k + 2) = T R (2 * m + k + 3) + T R (k + 1)\n⊢ 2 * m + (k + 2) = 2 * m + k + 2\n[PROOFSTEP]\nsimp [add_assoc]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nm k : ℕ\nH₁ : 2 * T R (m + 1) * T R (m + k + 2) = T R (2 * m + k + 3) + T R (k + 1)\nh_nat₁ : 2 * m + (k + 2) = 2 * m + k + 2\n⊢ 2 * T R m * T R (m + k + 2) = T R (2 * m + k + 2) + T R (k + 2)\n[PROOFSTEP]\nhave h_nat₂ : m + (k + 2) = m + k + 2 := by simp [add_assoc]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nm k : ℕ\nH₁ : 2 * T R (m + 1) * T R (m + k + 2) = T R (2 * m + k + 3) + T R (k + 1)\nh_nat₁ : 2 * m + (k + 2) = 2 * m + k + 2\n⊢ m + (k + 2) = m + k + 2\n[PROOFSTEP]\nsimp [add_assoc]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nm k : ℕ\nH₁ : 2 * T R (m + 1) * T R (m + k + 2) = T R (2 * m + k + 3) + T R (k + 1)\nh_nat₁ : 2 * m + (k + 2) = 2 * m + k + 2\nh_nat₂ : m + (k + 2) = m + k + 2\n⊢ 2 * T R m * T R (m + k + 2) = T R (2 * m + k + 2) + T R (k + 2)\n[PROOFSTEP]\nsimpa [h_nat₁, h_nat₂] using\n  mul_T m\n    (k + 2)\n      -- state the `T` recurrence relation for a few useful indices\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nm k : ℕ\nH₁ : 2 * T R (m + 1) * T R (m + k + 2) = T R (2 * m + k + 3) + T R (k + 1)\nH₂ : 2 * T R m * T R (m + k + 2) = T R (2 * m + k + 2) + T R (k + 2)\n⊢ 2 * T R (m + 2) * T R (m + k + 2) = T R (2 * m + k + 4) + T R k\n[PROOFSTEP]\nhave h₁ := T_add_two R m\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nm k : ℕ\nH₁ : 2 * T R (m + 1) * T R (m + k + 2) = T R (2 * m + k + 3) + T R (k + 1)\nH₂ : 2 * T R m * T R (m + k + 2) = T R (2 * m + k + 2) + T R (k + 2)\nh₁ : T R (m + 2) = 2 * X * T R (m + 1) - T R m\n⊢ 2 * T R (m + 2) * T R (m + k + 2) = T R (2 * m + k + 4) + T R k\n[PROOFSTEP]\nhave h₂ : T R (2 * m + k + 4) = 2 * X * T R (2 * m + k + 3) - T R (2 * m + k + 2) := T_add_two R (2 * m + k + 2)\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nm k : ℕ\nH₁ : 2 * T R (m + 1) * T R (m + k + 2) = T R (2 * m + k + 3) + T R (k + 1)\nH₂ : 2 * T R m * T R (m + k + 2) = T R (2 * m + k + 2) + T R (k + 2)\nh₁ : T R (m + 2) = 2 * X * T R (m + 1) - T R m\nh₂ : T R (2 * m + k + 4) = 2 * X * T R (2 * m + k + 3) - T R (2 * m + k + 2)\n⊢ 2 * T R (m + 2) * T R (m + k + 2) = T R (2 * m + k + 4) + T R k\n[PROOFSTEP]\nhave h₃ := T_add_two R k\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nm k : ℕ\nH₁ : 2 * T R (m + 1) * T R (m + k + 2) = T R (2 * m + k + 3) + T R (k + 1)\nH₂ : 2 * T R m * T R (m + k + 2) = T R (2 * m + k + 2) + T R (k + 2)\nh₁ : T R (m + 2) = 2 * X * T R (m + 1) - T R m\nh₂ : T R (2 * m + k + 4) = 2 * X * T R (2 * m + k + 3) - T R (2 * m + k + 2)\nh₃ : T R (k + 2) = 2 * X * T R (k + 1) - T R k\n⊢ 2 * T R (m + 2) * T R (m + k + 2) = T R (2 * m + k + 4) + T R k\n[PROOFSTEP]\nlinear_combination 2 * T R (m + k + 2) * h₁ + 2 * (X : R[X]) * H₁ - H₂ - h₂ - h₃\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\n⊢ ∀ (n : ℕ), T R (0 * n) = comp (T R 0) (T R n)\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\n⊢ ∀ (n : ℕ), T R (1 * n) = comp (T R 1) (T R n)\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nm : ℕ\n⊢ ∀ (n : ℕ), T R ((m + 2) * n) = comp (T R (m + 2)) (T R n)\n[PROOFSTEP]\nintro n\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nm n : ℕ\n⊢ T R ((m + 2) * n) = comp (T R (m + 2)) (T R n)\n[PROOFSTEP]\nhave : 2 * T R n * T R ((m + 1) * n) = T R ((m + 2) * n) + T R (m * n) := by\n  convert mul_T R n (m * n) using 1 <;> ring_nf\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nm n : ℕ\n⊢ 2 * T R n * T R ((m + 1) * n) = T R ((m + 2) * n) + T R (m * n)\n[PROOFSTEP]\nconvert mul_T R n (m * n) using 1\n[GOAL]\ncase h.e'_2\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nm n : ℕ\n⊢ 2 * T R n * T R ((m + 1) * n) = 2 * T R n * T R (n + m * n)\n[PROOFSTEP]\nring_nf\n[GOAL]\ncase h.e'_3\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nm n : ℕ\n⊢ T R ((m + 2) * n) + T R (m * n) = T R (2 * n + m * n) + T R (m * n)\n[PROOFSTEP]\nring_nf\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nm n : ℕ\nthis : 2 * T R n * T R ((m + 1) * n) = T R ((m + 2) * n) + T R (m * n)\n⊢ T R ((m + 2) * n) = comp (T R (m + 2)) (T R n)\n[PROOFSTEP]\nsimp [this, T_mul m, ← T_mul (m + 1)]\n", "meta": {"mathlib_filename": "Mathlib.RingTheory.Polynomial.Chebyshev", "llama_tokens": 13573, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7956581000631542, "lm_q2_score": 0.6297746074044135, "lm_q1q2_score": 0.5010852675954145}}
{"text": "[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type w\ninst✝¹ : Category.{z, w} D\ninst✝ : Abelian D\nF G : C ⥤ D\nα : F ⟶ G\nX : C\n⊢ ((evaluation C D).obj X).map (kernel.ι α) ≫ (Iso.refl (((evaluation C D).obj X).obj F)).hom =\n    (PreservesKernel.iso ((evaluation C D).obj X) α).hom ≫ kernel.ι (NatTrans.app α X)\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type w\ninst✝¹ : Category.{z, w} D\ninst✝ : Abelian D\nF G : C ⥤ D\nα : F ⟶ G\nX : C\n⊢ NatTrans.app (kernel.ι α) X ≫ 𝟙 (F.obj X) =\n    (PreservesKernel.iso ((evaluation C D).obj X) α).hom ≫ kernel.ι (NatTrans.app α X)\n[PROOFSTEP]\nsimp only [Category.comp_id, PreservesKernel.iso_hom]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type w\ninst✝¹ : Category.{z, w} D\ninst✝ : Abelian D\nF G : C ⥤ D\nα : F ⟶ G\nX : C\n⊢ NatTrans.app (kernel.ι α) X = kernelComparison α ((evaluation C D).obj X) ≫ kernel.ι (NatTrans.app α X)\n[PROOFSTEP]\nexact (kernelComparison_comp_ι _ ((evaluation C D).obj X)).symm\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type w\ninst✝¹ : Category.{z, w} D\ninst✝ : Abelian D\nF G : C ⥤ D\nα : F ⟶ G\nX : C\n⊢ ((evaluation C D).obj X).map (cokernel.π α) ≫ (PreservesCokernel.iso ((evaluation C D).obj X) α).hom =\n    (Iso.refl (((evaluation C D).obj X).obj G)).hom ≫ cokernel.π (NatTrans.app α X)\n[PROOFSTEP]\napply (cancel_mono (PreservesCokernel.iso ((evaluation C D).obj X) α).inv).1\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type w\ninst✝¹ : Category.{z, w} D\ninst✝ : Abelian D\nF G : C ⥤ D\nα : F ⟶ G\nX : C\n⊢ (((evaluation C D).obj X).map (cokernel.π α) ≫ (PreservesCokernel.iso ((evaluation C D).obj X) α).hom) ≫\n      (PreservesCokernel.iso ((evaluation C D).obj X) α).inv =\n    ((Iso.refl (((evaluation C D).obj X).obj G)).hom ≫ cokernel.π (NatTrans.app α X)) ≫\n      (PreservesCokernel.iso ((evaluation C D).obj X) α).inv\n[PROOFSTEP]\nsimp only [Category.assoc, Iso.hom_inv_id]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type w\ninst✝¹ : Category.{z, w} D\ninst✝ : Abelian D\nF G : C ⥤ D\nα : F ⟶ G\nX : C\n⊢ ((evaluation C D).obj X).map (cokernel.π α) ≫ 𝟙 (((evaluation C D).obj X).obj (cokernel α)) =\n    (Iso.refl (((evaluation C D).obj X).obj G)).hom ≫\n      cokernel.π (NatTrans.app α X) ≫ (PreservesCokernel.iso ((evaluation C D).obj X) α).inv\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type w\ninst✝¹ : Category.{z, w} D\ninst✝ : Abelian D\nF G : C ⥤ D\nα : F ⟶ G\nX : C\n⊢ NatTrans.app (cokernel.π α) X ≫ 𝟙 ((cokernel α).obj X) =\n    𝟙 (G.obj X) ≫ cokernel.π (NatTrans.app α X) ≫ (PreservesCokernel.iso ((evaluation C D).obj X) α).inv\n[PROOFSTEP]\nsimp only [PreservesCokernel.iso_inv, Category.id_comp, Category.comp_id]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type w\ninst✝¹ : Category.{z, w} D\ninst✝ : Abelian D\nF G : C ⥤ D\nα : F ⟶ G\nX : C\n⊢ NatTrans.app (cokernel.π α) X = cokernel.π (NatTrans.app α X) ≫ cokernelComparison α ((evaluation C D).obj X)\n[PROOFSTEP]\nexact (π_comp_cokernelComparison _ ((evaluation C D).obj X)).symm\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type w\ninst✝¹ : Category.{z, w} D\ninst✝ : Abelian D\nF G : C ⥤ D\nα : F ⟶ G\nX : C\n⊢ coimageImageComparison (NatTrans.app α X) =\n    (coimageObjIso α X).inv ≫ NatTrans.app (coimageImageComparison α) X ≫ (imageObjIso α X).hom\n[PROOFSTEP]\next\n[GOAL]\ncase h.h\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type w\ninst✝¹ : Category.{z, w} D\ninst✝ : Abelian D\nF G : C ⥤ D\nα : F ⟶ G\nX : C\n⊢ (coequalizer.π (kernel.ι (NatTrans.app α X)) 0 ≫ coimageImageComparison (NatTrans.app α X)) ≫\n      equalizer.ι (cokernel.π (NatTrans.app α X)) 0 =\n    (coequalizer.π (kernel.ι (NatTrans.app α X)) 0 ≫\n        (coimageObjIso α X).inv ≫ NatTrans.app (coimageImageComparison α) X ≫ (imageObjIso α X).hom) ≫\n      equalizer.ι (cokernel.π (NatTrans.app α X)) 0\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h.h\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type w\ninst✝¹ : Category.{z, w} D\ninst✝ : Abelian D\nF G : C ⥤ D\nα : F ⟶ G\nX : C\n⊢ (cokernel.π (kernel.ι (NatTrans.app α X)) ≫ coimageImageComparison (NatTrans.app α X)) ≫\n      kernel.ι (cokernel.π (NatTrans.app α X)) =\n    (cokernel.π (kernel.ι (NatTrans.app α X)) ≫\n        (coimageObjIso α X).inv ≫ NatTrans.app (coimageImageComparison α) X ≫ (imageObjIso α X).hom) ≫\n      kernel.ι (cokernel.π (NatTrans.app α X))\n[PROOFSTEP]\ndsimp [imageObjIso, coimageObjIso, cokernel.map]\n[GOAL]\ncase h.h\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type w\ninst✝¹ : Category.{z, w} D\ninst✝ : Abelian D\nF G : C ⥤ D\nα : F ⟶ G\nX : C\n⊢ (cokernel.π (kernel.ι (NatTrans.app α X)) ≫ coimageImageComparison (NatTrans.app α X)) ≫\n      kernel.ι (cokernel.π (NatTrans.app α X)) =\n    (cokernel.π (kernel.ι (NatTrans.app α X)) ≫\n        (cokernel.desc (kernel.ι (NatTrans.app α X)) (𝟙 (F.obj X) ≫ cokernel.π (NatTrans.app (kernel.ι α) X))\n              (_ : kernel.ι (NatTrans.app α X) ≫ 𝟙 (F.obj X) ≫ cokernel.π (NatTrans.app (kernel.ι α) X) = 0) ≫\n            (PreservesCokernel.iso ((evaluation C D).obj X) (kernel.ι α)).inv) ≫\n          NatTrans.app (coimageImageComparison α) X ≫\n            (PreservesKernel.iso ((evaluation C D).obj X) (cokernel.π α)).hom ≫\n              kernel.map (NatTrans.app (cokernel.π α) X) (cokernel.π (NatTrans.app α X)) (𝟙 (G.obj X))\n                (PreservesCokernel.iso ((evaluation C D).obj X) α).hom\n                (_ :\n                  ((evaluation C D).obj X).map (cokernel.π α) ≫ (PreservesCokernel.iso ((evaluation C D).obj X) α).hom =\n                    (Iso.refl (((evaluation C D).obj X).obj G)).hom ≫ cokernel.π (NatTrans.app α X))) ≫\n      kernel.ι (cokernel.π (NatTrans.app α X))\n[PROOFSTEP]\nsimp only [coimage_image_factorisation, PreservesKernel.iso_hom, Category.assoc, kernel.lift_ι, Category.comp_id,\n  PreservesCokernel.iso_inv, cokernel.π_desc_assoc, Category.id_comp]\n[GOAL]\ncase h.h\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type w\ninst✝¹ : Category.{z, w} D\ninst✝ : Abelian D\nF G : C ⥤ D\nα : F ⟶ G\nX : C\n⊢ NatTrans.app α X =\n    cokernel.π (NatTrans.app (kernel.ι α) X) ≫\n      cokernelComparison (kernel.ι α) ((evaluation C D).obj X) ≫\n        NatTrans.app (coimageImageComparison α) X ≫\n          kernelComparison (cokernel.π α) ((evaluation C D).obj X) ≫ kernel.ι (NatTrans.app (cokernel.π α) X)\n[PROOFSTEP]\nerw [kernelComparison_comp_ι _ ((evaluation C D).obj X), π_comp_cokernelComparison_assoc _ ((evaluation C D).obj X)]\n[GOAL]\ncase h.h\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type w\ninst✝¹ : Category.{z, w} D\ninst✝ : Abelian D\nF G : C ⥤ D\nα : F ⟶ G\nX : C\n⊢ NatTrans.app α X =\n    ((evaluation C D).obj X).map (cokernel.π (kernel.ι α)) ≫\n      NatTrans.app (coimageImageComparison α) X ≫ ((evaluation C D).obj X).map (kernel.ι (cokernel.π α))\n[PROOFSTEP]\nconv_lhs => rw [← coimage_image_factorisation α]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type w\ninst✝¹ : Category.{z, w} D\ninst✝ : Abelian D\nF G : C ⥤ D\nα : F ⟶ G\nX : C\n| NatTrans.app α X\n[PROOFSTEP]\nrw [← coimage_image_factorisation α]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type w\ninst✝¹ : Category.{z, w} D\ninst✝ : Abelian D\nF G : C ⥤ D\nα : F ⟶ G\nX : C\n| NatTrans.app α X\n[PROOFSTEP]\nrw [← coimage_image_factorisation α]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type w\ninst✝¹ : Category.{z, w} D\ninst✝ : Abelian D\nF G : C ⥤ D\nα : F ⟶ G\nX : C\n| NatTrans.app α X\n[PROOFSTEP]\nrw [← coimage_image_factorisation α]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type w\ninst✝¹ : Category.{z, w} D\ninst✝ : Abelian D\nF G : C ⥤ D\nα : F ⟶ G\nX : C\n⊢ NatTrans.app (coimageImageComparison α) X =\n    (coimageObjIso α X).hom ≫ coimageImageComparison (NatTrans.app α X) ≫ (imageObjIso α X).inv\n[PROOFSTEP]\nsimp only [coimageImageComparison_app, Iso.hom_inv_id_assoc, Iso.hom_inv_id, Category.assoc, Category.comp_id]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type w\ninst✝¹ : Category.{z, w} D\ninst✝ : Abelian D\nF G : C ⥤ D\nα : F ⟶ G\nX : C\n⊢ IsIso (coimageImageComparison α)\n[PROOFSTEP]\nhave : ∀ X : C, IsIso ((Abelian.coimageImageComparison α).app X) :=\n  by\n  intros\n  rw [coimageImageComparison_app']\n  infer_instance\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type w\ninst✝¹ : Category.{z, w} D\ninst✝ : Abelian D\nF G : C ⥤ D\nα : F ⟶ G\nX : C\n⊢ ∀ (X : C), IsIso (NatTrans.app (coimageImageComparison α) X)\n[PROOFSTEP]\nintros\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type w\ninst✝¹ : Category.{z, w} D\ninst✝ : Abelian D\nF G : C ⥤ D\nα : F ⟶ G\nX X✝ : C\n⊢ IsIso (NatTrans.app (coimageImageComparison α) X✝)\n[PROOFSTEP]\nrw [coimageImageComparison_app']\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type w\ninst✝¹ : Category.{z, w} D\ninst✝ : Abelian D\nF G : C ⥤ D\nα : F ⟶ G\nX X✝ : C\n⊢ IsIso ((coimageObjIso α X✝).hom ≫ coimageImageComparison (NatTrans.app α X✝) ≫ (imageObjIso α X✝).inv)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type w\ninst✝¹ : Category.{z, w} D\ninst✝ : Abelian D\nF G : C ⥤ D\nα : F ⟶ G\nX : C\nthis : ∀ (X : C), IsIso (NatTrans.app (coimageImageComparison α) X)\n⊢ IsIso (coimageImageComparison α)\n[PROOFSTEP]\napply NatIso.isIso_of_isIso_app\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Abelian.FunctorCategory", "llama_tokens": 4193, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7606506635289835, "lm_q2_score": 0.6584175072643413, "lm_q1q2_score": 0.5008257137797205}}
{"text": "[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx✝ y : G\na b : A\nn m : ℕ\nx : G\n⊢ IsPeriodicPt ((fun x x_1 => x * x_1) x) n 1 ↔ x ^ n = 1\n[PROOFSTEP]\nrw [IsPeriodicPt, IsFixedPt, mul_left_iterate]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx✝ y : G\na b : A\nn m : ℕ\nx : G\n⊢ (fun x_1 => x ^ n * x_1) 1 = 1 ↔ x ^ n = 1\n[PROOFSTEP]\ndsimp\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx✝ y : G\na b : A\nn m : ℕ\nx : G\n⊢ x ^ n * 1 = 1 ↔ x ^ n = 1\n[PROOFSTEP]\nrw [mul_one]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx✝ y : G\na b : A\nn m : ℕ\nx : G\n⊢ IsOfFinOrder x ↔ ∃ n, 0 < n ∧ x ^ n = 1\n[PROOFSTEP]\nsimp [IsOfFinOrder, mem_periodicPts, isPeriodicPt_mul_iff_pow_eq_one]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx✝ y : G\na b : A\nn m : ℕ\nx : G\nh : Injective fun n => x ^ n\n⊢ ¬IsOfFinOrder x\n[PROOFSTEP]\nsimp_rw [isOfFinOrder_iff_pow_eq_one, not_exists, not_and]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx✝ y : G\na b : A\nn m : ℕ\nx : G\nh : Injective fun n => x ^ n\n⊢ ∀ (x_1 : ℕ), 0 < x_1 → ¬x ^ x_1 = 1\n[PROOFSTEP]\nintro n hn_pos hnx\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx✝ y : G\na b : A\nn✝ m : ℕ\nx : G\nh : Injective fun n => x ^ n\nn : ℕ\nhn_pos : 0 < n\nhnx : x ^ n = 1\n⊢ False\n[PROOFSTEP]\nrw [← pow_zero x] at hnx \n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx✝ y : G\na b : A\nn✝ m : ℕ\nx : G\nh : Injective fun n => x ^ n\nn : ℕ\nhn_pos : 0 < n\nhnx : x ^ n = x ^ 0\n⊢ False\n[PROOFSTEP]\nrw [h hnx] at hn_pos \n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx✝ y : G\na b : A\nn✝ m : ℕ\nx : G\nh : Injective fun n => x ^ n\nn : ℕ\nhn_pos : 0 < 0\nhnx : x ^ n = x ^ 0\n⊢ False\n[PROOFSTEP]\nexact irrefl 0 hn_pos\n[GOAL]\nG : Type u_1\nH✝ : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx✝ y : G\na b : A\nn m : ℕ\nH : Submonoid G\nx : { x // x ∈ H }\n⊢ IsOfFinOrder x ↔ IsOfFinOrder ↑x\n[PROOFSTEP]\nrw [isOfFinOrder_iff_pow_eq_one, isOfFinOrder_iff_pow_eq_one]\n[GOAL]\nG : Type u_1\nH✝ : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx✝ y : G\na b : A\nn m : ℕ\nH : Submonoid G\nx : { x // x ∈ H }\n⊢ (∃ n, 0 < n ∧ x ^ n = 1) ↔ ∃ n, 0 < n ∧ ↑x ^ n = 1\n[PROOFSTEP]\nnorm_cast\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝² : Monoid G\ninst✝¹ : AddMonoid A\nx✝ y : G\na b : A\nn m : ℕ\ninst✝ : Monoid H\nf : G →* H\nx : G\nh : IsOfFinOrder x\n⊢ ∃ n, 0 < n ∧ ↑f x ^ n = 1\n[PROOFSTEP]\nrcases(isOfFinOrder_iff_pow_eq_one _).mp h with ⟨n, npos, hn⟩\n[GOAL]\ncase intro.intro\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝² : Monoid G\ninst✝¹ : AddMonoid A\nx✝ y : G\na b : A\nn✝ m : ℕ\ninst✝ : Monoid H\nf : G →* H\nx : G\nh : IsOfFinOrder x\nn : ℕ\nnpos : 0 < n\nhn : x ^ n = 1\n⊢ ∃ n, 0 < n ∧ ↑f x ^ n = 1\n[PROOFSTEP]\nexact ⟨n, npos, by rw [← f.map_pow, hn, f.map_one]⟩\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝² : Monoid G\ninst✝¹ : AddMonoid A\nx✝ y : G\na b : A\nn✝ m : ℕ\ninst✝ : Monoid H\nf : G →* H\nx : G\nh : IsOfFinOrder x\nn : ℕ\nnpos : 0 < n\nhn : x ^ n = 1\n⊢ ↑f x ^ n = 1\n[PROOFSTEP]\nrw [← f.map_pow, hn, f.map_one]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝² : Monoid G\ninst✝¹ : AddMonoid A\nx✝ y : G\na b : A\nn m : ℕ\nη : Type u_6\nGs : η → Type u_7\ninst✝ : (i : η) → Monoid (Gs i)\nx : (i : η) → Gs i\nh : IsOfFinOrder x\n⊢ ∀ (i : η), IsOfFinOrder (x i)\n[PROOFSTEP]\nrcases(isOfFinOrder_iff_pow_eq_one _).mp h with ⟨n, npos, hn⟩\n[GOAL]\ncase intro.intro\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝² : Monoid G\ninst✝¹ : AddMonoid A\nx✝ y : G\na b : A\nn✝ m : ℕ\nη : Type u_6\nGs : η → Type u_7\ninst✝ : (i : η) → Monoid (Gs i)\nx : (i : η) → Gs i\nh : IsOfFinOrder x\nn : ℕ\nnpos : 0 < n\nhn : x ^ n = 1\n⊢ ∀ (i : η), IsOfFinOrder (x i)\n[PROOFSTEP]\nexact fun _ => (isOfFinOrder_iff_pow_eq_one _).mpr ⟨n, npos, (congr_fun hn.symm _).symm⟩\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx✝ y : G\na b : A\nn m : ℕ\nx : G\n⊢ x ^ orderOf x = 1\n[PROOFSTEP]\nrefine\n  Eq.trans ?_\n    (isPeriodicPt_minimalPeriod (x * ·) 1)\n      -- porting note: we need a `dsimp` in the middle of the rewrite to do beta reduction\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx✝ y : G\na b : A\nn m : ℕ\nx : G\n⊢ x ^ orderOf x = (fun x_1 => x * x_1)^[minimalPeriod (fun x_1 => x * x_1) 1] 1\n[PROOFSTEP]\nrw [orderOf, mul_left_iterate]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx✝ y : G\na b : A\nn m : ℕ\nx : G\n⊢ x ^ minimalPeriod (fun x_1 => x * x_1) 1 = (fun x_1 => x ^ minimalPeriod (fun x_2 => x * x_2) 1 * x_1) 1\n[PROOFSTEP]\ndsimp\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx✝ y : G\na b : A\nn m : ℕ\nx : G\n⊢ x ^ minimalPeriod (fun x_1 => x * x_1) 1 = x ^ minimalPeriod (fun x_1 => x * x_1) 1 * 1\n[PROOFSTEP]\nrw [mul_one]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx y : G\na b : A\nn m : ℕ\nh : ¬IsOfFinOrder x\n⊢ orderOf x = 0\n[PROOFSTEP]\nrwa [orderOf, minimalPeriod, dif_neg]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx y : G\na b : A\nn m : ℕ\n⊢ orderOf x = 0 ↔ ∀ (n : ℕ), 0 < n → x ^ n ≠ 1\n[PROOFSTEP]\nsimp_rw [orderOf_eq_zero_iff, isOfFinOrder_iff_pow_eq_one, not_exists, not_and]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx y : G\na b : A\nn✝ m n : ℕ\nh : 0 < n\n⊢ orderOf x = n ↔ x ^ n = 1 ∧ ∀ (m : ℕ), m < n → 0 < m → x ^ m ≠ 1\n[PROOFSTEP]\nsimp_rw [Ne, ← isPeriodicPt_mul_iff_pow_eq_one, orderOf, minimalPeriod]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx y : G\na b : A\nn✝ m n : ℕ\nh : 0 < n\n⊢ (if h : 1 ∈ periodicPts fun x_1 => x * x_1 then Nat.find h else 0) = n ↔\n    IsPeriodicPt (fun x_1 => x * x_1) n 1 ∧ ∀ (m : ℕ), m < n → 0 < m → ¬IsPeriodicPt (fun x_1 => x * x_1) m 1\n[PROOFSTEP]\nsplit_ifs with h1\n[GOAL]\ncase pos\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx y : G\na b : A\nn✝ m n : ℕ\nh : 0 < n\nh1 : 1 ∈ periodicPts fun x_1 => x * x_1\n⊢ Nat.find h1 = n ↔\n    IsPeriodicPt (fun x_1 => x * x_1) n 1 ∧ ∀ (m : ℕ), m < n → 0 < m → ¬IsPeriodicPt (fun x_1 => x * x_1) m 1\n[PROOFSTEP]\nclassical\nrw [find_eq_iff]\nsimp only [h, true_and]\npush_neg\nrfl\n[GOAL]\ncase pos\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx y : G\na b : A\nn✝ m n : ℕ\nh : 0 < n\nh1 : 1 ∈ periodicPts fun x_1 => x * x_1\n⊢ Nat.find h1 = n ↔\n    IsPeriodicPt (fun x_1 => x * x_1) n 1 ∧ ∀ (m : ℕ), m < n → 0 < m → ¬IsPeriodicPt (fun x_1 => x * x_1) m 1\n[PROOFSTEP]\nrw [find_eq_iff]\n[GOAL]\ncase pos\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx y : G\na b : A\nn✝ m n : ℕ\nh : 0 < n\nh1 : 1 ∈ periodicPts fun x_1 => x * x_1\n⊢ ((n > 0 ∧ IsPeriodicPt (fun x_1 => x * x_1) n 1) ∧\n      ∀ (n_1 : ℕ), n_1 < n → ¬(n_1 > 0 ∧ IsPeriodicPt (fun x_1 => x * x_1) n_1 1)) ↔\n    IsPeriodicPt (fun x_1 => x * x_1) n 1 ∧ ∀ (m : ℕ), m < n → 0 < m → ¬IsPeriodicPt (fun x_1 => x * x_1) m 1\n[PROOFSTEP]\nsimp only [h, true_and]\n[GOAL]\ncase pos\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx y : G\na b : A\nn✝ m n : ℕ\nh : 0 < n\nh1 : 1 ∈ periodicPts fun x_1 => x * x_1\n⊢ (IsPeriodicPt (fun x_1 => x * x_1) n 1 ∧\n      ∀ (n_1 : ℕ), n_1 < n → ¬(n_1 > 0 ∧ IsPeriodicPt (fun x_1 => x * x_1) n_1 1)) ↔\n    IsPeriodicPt (fun x_1 => x * x_1) n 1 ∧ ∀ (m : ℕ), m < n → 0 < m → ¬IsPeriodicPt (fun x_1 => x * x_1) m 1\n[PROOFSTEP]\npush_neg\n[GOAL]\ncase pos\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx y : G\na b : A\nn✝ m n : ℕ\nh : 0 < n\nh1 : 1 ∈ periodicPts fun x_1 => x * x_1\n⊢ (IsPeriodicPt (fun x_1 => x * x_1) n 1 ∧ ∀ (n_1 : ℕ), n_1 < n → n_1 > 0 → ¬IsPeriodicPt (fun x_1 => x * x_1) n_1 1) ↔\n    IsPeriodicPt (fun x_1 => x * x_1) n 1 ∧ ∀ (m : ℕ), m < n → 0 < m → ¬IsPeriodicPt (fun x_1 => x * x_1) m 1\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx y : G\na b : A\nn✝ m n : ℕ\nh : 0 < n\nh1 : ¬1 ∈ periodicPts fun x_1 => x * x_1\n⊢ 0 = n ↔ IsPeriodicPt (fun x_1 => x * x_1) n 1 ∧ ∀ (m : ℕ), m < n → 0 < m → ¬IsPeriodicPt (fun x_1 => x * x_1) m 1\n[PROOFSTEP]\nrw [iff_false_left h.ne]\n[GOAL]\ncase neg\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx y : G\na b : A\nn✝ m n : ℕ\nh : 0 < n\nh1 : ¬1 ∈ periodicPts fun x_1 => x * x_1\n⊢ ¬(IsPeriodicPt (fun x_1 => x * x_1) n 1 ∧ ∀ (m : ℕ), m < n → 0 < m → ¬IsPeriodicPt (fun x_1 => x * x_1) m 1)\n[PROOFSTEP]\nrintro ⟨h', -⟩\n[GOAL]\ncase neg.intro\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx y : G\na b : A\nn✝ m n : ℕ\nh : 0 < n\nh1 : ¬1 ∈ periodicPts fun x_1 => x * x_1\nh' : IsPeriodicPt (fun x_1 => x * x_1) n 1\n⊢ False\n[PROOFSTEP]\nexact h1 ⟨n, h, h'⟩\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx y : G\na b : A\nn m : ℕ\n⊢ 0 < orderOf x ↔ IsOfFinOrder x\n[PROOFSTEP]\nrw [iff_not_comm.mp orderOf_eq_zero_iff, pos_iff_ne_zero]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝² : Monoid G\ninst✝¹ : AddMonoid A\nx y✝ : G\na b : A\nn m : ℕ\ninst✝ : Monoid β\ny : β\nhx : IsOfFinOrder x\nh : orderOf y ∣ orderOf x\n⊢ IsOfFinOrder y\n[PROOFSTEP]\nrw [← orderOf_pos_iff] at hx ⊢\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝² : Monoid G\ninst✝¹ : AddMonoid A\nx y✝ : G\na b : A\nn m : ℕ\ninst✝ : Monoid β\ny : β\nhx : 0 < orderOf x\nh : orderOf y ∣ orderOf x\n⊢ 0 < orderOf y\n[PROOFSTEP]\nexact Nat.pos_of_dvd_of_pos h hx\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx y : G\na b : A\nn m : ℕ\nhn : 0 < n\nh : x ^ n = 1\n⊢ IsPeriodicPt (fun x_1 => x * x_1) n 1\n[PROOFSTEP]\nrwa [isPeriodicPt_mul_iff_pow_eq_one]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx y : G\na b : A\nn m : ℕ\n⊢ orderOf 1 = 1\n[PROOFSTEP]\nrw [orderOf, ← minimalPeriod_id (x := (1 : G)), ← one_mul_eq_id]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx y : G\na b : A\nn m : ℕ\n⊢ orderOf x = 1 ↔ x = 1\n[PROOFSTEP]\nrw [orderOf, minimalPeriod_eq_one_iff_isFixedPt, IsFixedPt, mul_one]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx y : G\na b : A\nn✝ m n : ℕ\n⊢ x ^ n = x ^ (n % orderOf x + orderOf x * (n / orderOf x))\n[PROOFSTEP]\nrw [Nat.mod_add_div]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx y : G\na b : A\nn✝ m n : ℕ\n⊢ x ^ (n % orderOf x + orderOf x * (n / orderOf x)) = x ^ (n % orderOf x)\n[PROOFSTEP]\nsimp [pow_add, pow_mul, pow_orderOf_eq_one]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx y : G\na b : A\nn✝ m n : ℕ\nh : orderOf x ∣ n\n⊢ x ^ n = 1\n[PROOFSTEP]\nrw [pow_eq_mod_orderOf, Nat.mod_eq_zero_of_dvd h, _root_.pow_zero]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx y : G\na b : A\nn✝ m n : ℕ\n⊢ orderOf (x ^ n) ∣ orderOf x\n[PROOFSTEP]\nrw [orderOf_dvd_iff_pow_eq_one, pow_right_comm, pow_orderOf_eq_one, one_pow]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx✝ y : G\na b : A\nn m : ℕ\nx : G\nhn : n < orderOf x\nhm : m < orderOf x\neq : x ^ n = x ^ m\n⊢ (fun x_1 => x * x_1)^[n] 1 = (fun x_1 => x * x_1)^[m] 1\n[PROOFSTEP]\nsimpa only [mul_left_iterate, mul_one]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx y : G\na b : A\nn m : ℕ\n⊢ x ^ n = 1 ↔ n ≡ 0 [MOD orderOf x]\n[PROOFSTEP]\nrw [modEq_zero_iff_dvd, orderOf_dvd_iff_pow_eq_one]\n[GOAL]\nG : Type u_1\nH✝ : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝² : Monoid G\ninst✝¹ : AddMonoid A\nx✝ y : G\na b : A\nn m : ℕ\nH : Type u_6\ninst✝ : Monoid H\nψ : G →* H\nx : G\n⊢ orderOf (↑ψ x) ∣ orderOf x\n[PROOFSTEP]\napply orderOf_dvd_of_pow_eq_one\n[GOAL]\ncase h\nG : Type u_1\nH✝ : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝² : Monoid G\ninst✝¹ : AddMonoid A\nx✝ y : G\na b : A\nn m : ℕ\nH : Type u_6\ninst✝ : Monoid H\nψ : G →* H\nx : G\n⊢ ↑ψ x ^ orderOf x = 1\n[PROOFSTEP]\nrw [← map_pow, pow_orderOf_eq_one]\n[GOAL]\ncase h\nG : Type u_1\nH✝ : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝² : Monoid G\ninst✝¹ : AddMonoid A\nx✝ y : G\na b : A\nn m : ℕ\nH : Type u_6\ninst✝ : Monoid H\nψ : G →* H\nx : G\n⊢ ↑ψ 1 = 1\n[PROOFSTEP]\napply map_one\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx y : G\na b : A\nn m : ℕ\nh : coprime n (orderOf x)\n⊢ ∃ m, (x ^ n) ^ m = x\n[PROOFSTEP]\nby_cases h0 : orderOf x = 0\n[GOAL]\ncase pos\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx y : G\na b : A\nn m : ℕ\nh : coprime n (orderOf x)\nh0 : orderOf x = 0\n⊢ ∃ m, (x ^ n) ^ m = x\n[PROOFSTEP]\nrw [h0, coprime_zero_right] at h \n[GOAL]\ncase pos\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx y : G\na b : A\nn m : ℕ\nh : n = 1\nh0 : orderOf x = 0\n⊢ ∃ m, (x ^ n) ^ m = x\n[PROOFSTEP]\nexact ⟨1, by rw [h, pow_one, pow_one]⟩\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx y : G\na b : A\nn m : ℕ\nh : n = 1\nh0 : orderOf x = 0\n⊢ (x ^ n) ^ 1 = x\n[PROOFSTEP]\nrw [h, pow_one, pow_one]\n[GOAL]\ncase neg\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx y : G\na b : A\nn m : ℕ\nh : coprime n (orderOf x)\nh0 : ¬orderOf x = 0\n⊢ ∃ m, (x ^ n) ^ m = x\n[PROOFSTEP]\nby_cases h1 : orderOf x = 1\n[GOAL]\ncase pos\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx y : G\na b : A\nn m : ℕ\nh : coprime n (orderOf x)\nh0 : ¬orderOf x = 0\nh1 : orderOf x = 1\n⊢ ∃ m, (x ^ n) ^ m = x\n[PROOFSTEP]\nexact ⟨0, by rw [orderOf_eq_one_iff.mp h1, one_pow, one_pow]⟩\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx y : G\na b : A\nn m : ℕ\nh : coprime n (orderOf x)\nh0 : ¬orderOf x = 0\nh1 : orderOf x = 1\n⊢ (x ^ n) ^ 0 = x\n[PROOFSTEP]\nrw [orderOf_eq_one_iff.mp h1, one_pow, one_pow]\n[GOAL]\ncase neg\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx y : G\na b : A\nn m : ℕ\nh : coprime n (orderOf x)\nh0 : ¬orderOf x = 0\nh1 : ¬orderOf x = 1\n⊢ ∃ m, (x ^ n) ^ m = x\n[PROOFSTEP]\nobtain ⟨m, h⟩ := exists_mul_emod_eq_one_of_coprime h (one_lt_iff_ne_zero_and_ne_one.mpr ⟨h0, h1⟩)\n[GOAL]\ncase neg.intro\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx y : G\na b : A\nn m✝ : ℕ\nh✝ : coprime n (orderOf x)\nh0 : ¬orderOf x = 0\nh1 : ¬orderOf x = 1\nm : ℕ\nh : n * m % orderOf x = 1\n⊢ ∃ m, (x ^ n) ^ m = x\n[PROOFSTEP]\nexact ⟨m, by rw [← pow_mul, pow_eq_mod_orderOf, h, pow_one]⟩\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx y : G\na b : A\nn m✝ : ℕ\nh✝ : coprime n (orderOf x)\nh0 : ¬orderOf x = 0\nh1 : ¬orderOf x = 1\nm : ℕ\nh : n * m % orderOf x = 1\n⊢ (x ^ n) ^ m = x\n[PROOFSTEP]\nrw [← pow_mul, pow_eq_mod_orderOf, h, pow_one]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx y : G\na b : A\nn m : ℕ\nhn : 0 < n\nhx : x ^ n = 1\nhd : ∀ (p : ℕ), Nat.Prime p → p ∣ n → x ^ (n / p) ≠ 1\n⊢ orderOf x = n\n[PROOFSTEP]\ncases' exists_eq_mul_right_of_dvd (orderOf_dvd_of_pow_eq_one hx) with a ha\n[GOAL]\ncase intro\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx y : G\na✝ b : A\nn m : ℕ\nhn : 0 < n\nhx : x ^ n = 1\nhd : ∀ (p : ℕ), Nat.Prime p → p ∣ n → x ^ (n / p) ≠ 1\na : ℕ\nha : n = orderOf x * a\n⊢ orderOf x = n\n[PROOFSTEP]\nsuffices a = 1 by\n  simp [this, ha]\n    -- Assume `a` is not one...\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx y : G\na✝ b : A\nn m : ℕ\nhn : 0 < n\nhx : x ^ n = 1\nhd : ∀ (p : ℕ), Nat.Prime p → p ∣ n → x ^ (n / p) ≠ 1\na : ℕ\nha : n = orderOf x * a\nthis : a = 1\n⊢ orderOf x = n\n[PROOFSTEP]\nsimp [this, ha]\n  -- Assume `a` is not one...\n[GOAL]\ncase intro\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx y : G\na✝ b : A\nn m : ℕ\nhn : 0 < n\nhx : x ^ n = 1\nhd : ∀ (p : ℕ), Nat.Prime p → p ∣ n → x ^ (n / p) ≠ 1\na : ℕ\nha : n = orderOf x * a\n⊢ a = 1\n[PROOFSTEP]\nby_contra h\n[GOAL]\ncase intro\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx y : G\na✝ b : A\nn m : ℕ\nhn : 0 < n\nhx : x ^ n = 1\nhd : ∀ (p : ℕ), Nat.Prime p → p ∣ n → x ^ (n / p) ≠ 1\na : ℕ\nha : n = orderOf x * a\nh : ¬a = 1\n⊢ False\n[PROOFSTEP]\nhave a_min_fac_dvd_p_sub_one : a.minFac ∣ n :=\n  by\n  obtain ⟨b, hb⟩ : ∃ b : ℕ, a = b * a.minFac := exists_eq_mul_left_of_dvd a.minFac_dvd\n  rw [hb, ← mul_assoc] at ha \n  exact Dvd.intro_left (orderOf x * b) ha.symm\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx y : G\na✝ b : A\nn m : ℕ\nhn : 0 < n\nhx : x ^ n = 1\nhd : ∀ (p : ℕ), Nat.Prime p → p ∣ n → x ^ (n / p) ≠ 1\na : ℕ\nha : n = orderOf x * a\nh : ¬a = 1\n⊢ minFac a ∣ n\n[PROOFSTEP]\nobtain ⟨b, hb⟩ : ∃ b : ℕ, a = b * a.minFac := exists_eq_mul_left_of_dvd a.minFac_dvd\n[GOAL]\ncase intro\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx y : G\na✝ b✝ : A\nn m : ℕ\nhn : 0 < n\nhx : x ^ n = 1\nhd : ∀ (p : ℕ), Nat.Prime p → p ∣ n → x ^ (n / p) ≠ 1\na : ℕ\nha : n = orderOf x * a\nh : ¬a = 1\nb : ℕ\nhb : a = b * minFac a\n⊢ minFac a ∣ n\n[PROOFSTEP]\nrw [hb, ← mul_assoc] at ha \n[GOAL]\ncase intro\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx y : G\na✝ b✝ : A\nn m : ℕ\nhn : 0 < n\nhx : x ^ n = 1\nhd : ∀ (p : ℕ), Nat.Prime p → p ∣ n → x ^ (n / p) ≠ 1\na : ℕ\nh : ¬a = 1\nb : ℕ\nha : n = orderOf x * b * minFac a\nhb : a = b * minFac a\n⊢ minFac a ∣ n\n[PROOFSTEP]\nexact Dvd.intro_left (orderOf x * b) ha.symm\n[GOAL]\ncase intro\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx y : G\na✝ b : A\nn m : ℕ\nhn : 0 < n\nhx : x ^ n = 1\nhd : ∀ (p : ℕ), Nat.Prime p → p ∣ n → x ^ (n / p) ≠ 1\na : ℕ\nha : n = orderOf x * a\nh : ¬a = 1\na_min_fac_dvd_p_sub_one : minFac a ∣ n\n⊢ False\n[PROOFSTEP]\nrefine' hd a.minFac (Nat.minFac_prime h) a_min_fac_dvd_p_sub_one _\n[GOAL]\ncase intro\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx y : G\na✝ b : A\nn m : ℕ\nhn : 0 < n\nhx : x ^ n = 1\nhd : ∀ (p : ℕ), Nat.Prime p → p ∣ n → x ^ (n / p) ≠ 1\na : ℕ\nha : n = orderOf x * a\nh : ¬a = 1\na_min_fac_dvd_p_sub_one : minFac a ∣ n\n⊢ x ^ (n / minFac a) = 1\n[PROOFSTEP]\nrw [← orderOf_dvd_iff_pow_eq_one, Nat.dvd_div_iff a_min_fac_dvd_p_sub_one, ha, mul_comm,\n  Nat.mul_dvd_mul_iff_left (orderOf_pos' _)]\n[GOAL]\ncase intro\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx y : G\na✝ b : A\nn m : ℕ\nhn : 0 < n\nhx : x ^ n = 1\nhd : ∀ (p : ℕ), Nat.Prime p → p ∣ n → x ^ (n / p) ≠ 1\na : ℕ\nha : n = orderOf x * a\nh : ¬a = 1\na_min_fac_dvd_p_sub_one : minFac a ∣ n\n⊢ minFac a ∣ a\n[PROOFSTEP]\nexact Nat.minFac_dvd a\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx y : G\na✝ b : A\nn m : ℕ\nhn : 0 < n\nhx : x ^ n = 1\nhd : ∀ (p : ℕ), Nat.Prime p → p ∣ n → x ^ (n / p) ≠ 1\na : ℕ\nha : n = orderOf x * a\nh : ¬a = 1\na_min_fac_dvd_p_sub_one : minFac a ∣ n\n⊢ IsOfFinOrder x\n[PROOFSTEP]\nrw [isOfFinOrder_iff_pow_eq_one]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx y : G\na✝ b : A\nn m : ℕ\nhn : 0 < n\nhx : x ^ n = 1\nhd : ∀ (p : ℕ), Nat.Prime p → p ∣ n → x ^ (n / p) ≠ 1\na : ℕ\nha : n = orderOf x * a\nh : ¬a = 1\na_min_fac_dvd_p_sub_one : minFac a ∣ n\n⊢ ∃ n, 0 < n ∧ x ^ n = 1\n[PROOFSTEP]\nexact Exists.intro n (id ⟨hn, hx⟩)\n[GOAL]\nG : Type u_1\nH✝ : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝² : Monoid G\ninst✝¹ : AddMonoid A\nx y✝ : G\na b : A\nn m : ℕ\nH : Type u_6\ninst✝ : Monoid H\ny : H\n⊢ orderOf x = orderOf y ↔ ∀ (n : ℕ), x ^ n = 1 ↔ y ^ n = 1\n[PROOFSTEP]\nsimp_rw [← isPeriodicPt_mul_iff_pow_eq_one, ← minimalPeriod_eq_minimalPeriod_iff, orderOf]\n[GOAL]\nG : Type u_1\nH✝ : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝² : Monoid G\ninst✝¹ : AddMonoid A\nx✝ y : G\na b : A\nn m : ℕ\nH : Type u_6\ninst✝ : Monoid H\nf : G →* H\nhf : Injective ↑f\nx : G\n⊢ orderOf (↑f x) = orderOf x\n[PROOFSTEP]\nsimp_rw [orderOf_eq_orderOf_iff, ← f.map_pow, ← f.map_one, hf.eq_iff, forall_const]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx y : G\na b : A\nn m : ℕ\nh : n ≠ 0\n⊢ orderOf (x ^ n) = orderOf x / gcd (orderOf x) n\n[PROOFSTEP]\nunfold orderOf\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx y : G\na b : A\nn m : ℕ\nh : n ≠ 0\n⊢ minimalPeriod (fun x_1 => x ^ n * x_1) 1 =\n    minimalPeriod (fun x_1 => x * x_1) 1 / gcd (minimalPeriod (fun x_1 => x * x_1) 1) n\n[PROOFSTEP]\nrw [← minimalPeriod_iterate_eq_div_gcd h, mul_left_iterate]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx y : G\na b : A\nn m : ℕ\nh : IsOfFinOrder x\n⊢ orderOf (x ^ n) = orderOf x / gcd (orderOf x) n\n[PROOFSTEP]\nunfold orderOf\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx y : G\na b : A\nn m : ℕ\nh : IsOfFinOrder x\n⊢ minimalPeriod (fun x_1 => x ^ n * x_1) 1 =\n    minimalPeriod (fun x_1 => x * x_1) 1 / gcd (minimalPeriod (fun x_1 => x * x_1) 1) n\n[PROOFSTEP]\nrw [← minimalPeriod_iterate_eq_div_gcd' h, mul_left_iterate]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx y : G\na b : A\nn m : ℕ\nh : coprime (orderOf y) m\n⊢ orderOf (y ^ m) = orderOf y\n[PROOFSTEP]\nby_cases hg : orderOf y = 0\n[GOAL]\ncase pos\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx y : G\na b : A\nn m : ℕ\nh : coprime (orderOf y) m\nhg : orderOf y = 0\n⊢ orderOf (y ^ m) = orderOf y\n[PROOFSTEP]\nrw [m.coprime_zero_left.mp (hg ▸ h), pow_one]\n[GOAL]\ncase neg\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx y : G\na b : A\nn m : ℕ\nh : coprime (orderOf y) m\nhg : ¬orderOf y = 0\n⊢ orderOf (y ^ m) = orderOf y\n[PROOFSTEP]\nrw [orderOf_pow'' y m (hg.imp_symm orderOf_eq_zero), h.gcd_eq_one, Nat.div_one]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx y : G\na b : A\nn m : ℕ\nh : Commute x y\n⊢ orderOf (x * y) ∣ lcm (orderOf x) (orderOf y)\n[PROOFSTEP]\nrw [orderOf, ← comp_mul_left]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx y : G\na b : A\nn m : ℕ\nh : Commute x y\n⊢ minimalPeriod ((fun x_1 => x * x_1) ∘ fun x => y * x) 1 ∣ lcm (orderOf x) (orderOf y)\n[PROOFSTEP]\nexact Function.Commute.minimalPeriod_of_comp_dvd_lcm h.function_commute_mul_left\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx y : G\na b : A\nn m : ℕ\nh : Commute x y\n⊢ orderOf y ∣ lcm (orderOf x) (orderOf (x * y))\n[PROOFSTEP]\nby_cases h0 : orderOf x = 0\n[GOAL]\ncase pos\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx y : G\na b : A\nn m : ℕ\nh : Commute x y\nh0 : orderOf x = 0\n⊢ orderOf y ∣ lcm (orderOf x) (orderOf (x * y))\n[PROOFSTEP]\nrw [h0, lcm_zero_left]\n[GOAL]\ncase pos\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx y : G\na b : A\nn m : ℕ\nh : Commute x y\nh0 : orderOf x = 0\n⊢ orderOf y ∣ 0\n[PROOFSTEP]\napply dvd_zero\n[GOAL]\ncase neg\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx y : G\na b : A\nn m : ℕ\nh : Commute x y\nh0 : ¬orderOf x = 0\n⊢ orderOf y ∣ lcm (orderOf x) (orderOf (x * y))\n[PROOFSTEP]\nconv_lhs =>\n  rw [← one_mul y, ← pow_orderOf_eq_one x, ← succ_pred_eq_of_pos (Nat.pos_of_ne_zero h0), _root_.pow_succ', mul_assoc]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx y : G\na b : A\nn m : ℕ\nh : Commute x y\nh0 : ¬orderOf x = 0\n| orderOf y\n[PROOFSTEP]\nrw [← one_mul y, ← pow_orderOf_eq_one x, ← succ_pred_eq_of_pos (Nat.pos_of_ne_zero h0), _root_.pow_succ', mul_assoc]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx y : G\na b : A\nn m : ℕ\nh : Commute x y\nh0 : ¬orderOf x = 0\n| orderOf y\n[PROOFSTEP]\nrw [← one_mul y, ← pow_orderOf_eq_one x, ← succ_pred_eq_of_pos (Nat.pos_of_ne_zero h0), _root_.pow_succ', mul_assoc]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx y : G\na b : A\nn m : ℕ\nh : Commute x y\nh0 : ¬orderOf x = 0\n| orderOf y\n[PROOFSTEP]\nrw [← one_mul y, ← pow_orderOf_eq_one x, ← succ_pred_eq_of_pos (Nat.pos_of_ne_zero h0), _root_.pow_succ', mul_assoc]\n[GOAL]\ncase neg\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx y : G\na b : A\nn m : ℕ\nh : Commute x y\nh0 : ¬orderOf x = 0\n⊢ orderOf (x ^ pred (orderOf x) * (x * y)) ∣ lcm (orderOf x) (orderOf (x * y))\n[PROOFSTEP]\nexact\n  (((Commute.refl x).mul_right h).pow_left _).orderOf_mul_dvd_lcm.trans\n    (lcm_dvd_iff.2 ⟨(orderOf_pow_dvd _).trans (dvd_lcm_left _ _), dvd_lcm_right _ _⟩)\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx y : G\na b : A\nn m : ℕ\nh : Commute x y\nhco : coprime (orderOf x) (orderOf y)\n⊢ orderOf (x * y) = orderOf x * orderOf y\n[PROOFSTEP]\nrw [orderOf, ← comp_mul_left]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx y : G\na b : A\nn m : ℕ\nh : Commute x y\nhco : coprime (orderOf x) (orderOf y)\n⊢ minimalPeriod ((fun x_1 => x * x_1) ∘ fun x => y * x) 1 = orderOf x * orderOf y\n[PROOFSTEP]\nexact h.function_commute_mul_left.minimalPeriod_of_comp_eq_mul_of_coprime hco\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx y : G\na b : A\nn m : ℕ\nh : Commute x y\nhy : IsOfFinOrder y\nhdvd : ∀ (p : ℕ), Nat.Prime p → p ∣ orderOf x → p * orderOf x ∣ orderOf y\n⊢ orderOf (x * y) = orderOf y\n[PROOFSTEP]\nhave hoy := orderOf_pos' hy\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx y : G\na b : A\nn m : ℕ\nh : Commute x y\nhy : IsOfFinOrder y\nhdvd : ∀ (p : ℕ), Nat.Prime p → p ∣ orderOf x → p * orderOf x ∣ orderOf y\nhoy : 0 < orderOf y\n⊢ orderOf (x * y) = orderOf y\n[PROOFSTEP]\nhave hxy := dvd_of_forall_prime_mul_dvd hdvd\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx y : G\na b : A\nn m : ℕ\nh : Commute x y\nhy : IsOfFinOrder y\nhdvd : ∀ (p : ℕ), Nat.Prime p → p ∣ orderOf x → p * orderOf x ∣ orderOf y\nhoy : 0 < orderOf y\nhxy : orderOf x ∣ orderOf y\n⊢ orderOf (x * y) = orderOf y\n[PROOFSTEP]\napply orderOf_eq_of_pow_and_pow_div_prime hoy\n[GOAL]\ncase hx\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx y : G\na b : A\nn m : ℕ\nh : Commute x y\nhy : IsOfFinOrder y\nhdvd : ∀ (p : ℕ), Nat.Prime p → p ∣ orderOf x → p * orderOf x ∣ orderOf y\nhoy : 0 < orderOf y\nhxy : orderOf x ∣ orderOf y\n⊢ (x * y) ^ orderOf y = 1\n[PROOFSTEP]\nsimp only [Ne, ← orderOf_dvd_iff_pow_eq_one]\n[GOAL]\ncase hd\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx y : G\na b : A\nn m : ℕ\nh : Commute x y\nhy : IsOfFinOrder y\nhdvd : ∀ (p : ℕ), Nat.Prime p → p ∣ orderOf x → p * orderOf x ∣ orderOf y\nhoy : 0 < orderOf y\nhxy : orderOf x ∣ orderOf y\n⊢ ∀ (p : ℕ), Nat.Prime p → p ∣ orderOf y → (x * y) ^ (orderOf y / p) ≠ 1\n[PROOFSTEP]\nsimp only [Ne, ← orderOf_dvd_iff_pow_eq_one]\n[GOAL]\ncase hx\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx y : G\na b : A\nn m : ℕ\nh : Commute x y\nhy : IsOfFinOrder y\nhdvd : ∀ (p : ℕ), Nat.Prime p → p ∣ orderOf x → p * orderOf x ∣ orderOf y\nhoy : 0 < orderOf y\nhxy : orderOf x ∣ orderOf y\n⊢ orderOf (x * y) ∣ orderOf y\n[PROOFSTEP]\nexact h.orderOf_mul_dvd_lcm.trans (lcm_dvd hxy dvd_rfl)\n[GOAL]\ncase hd\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx y : G\na b : A\nn m : ℕ\nh : Commute x y\nhy : IsOfFinOrder y\nhdvd : ∀ (p : ℕ), Nat.Prime p → p ∣ orderOf x → p * orderOf x ∣ orderOf y\nhoy : 0 < orderOf y\nhxy : orderOf x ∣ orderOf y\n⊢ ∀ (p : ℕ), Nat.Prime p → p ∣ orderOf y → ¬orderOf (x * y) ∣ orderOf y / p\n[PROOFSTEP]\nrefine' fun p hp hpy hd => hp.ne_one _\n[GOAL]\ncase hd\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx y : G\na b : A\nn m : ℕ\nh : Commute x y\nhy : IsOfFinOrder y\nhdvd : ∀ (p : ℕ), Nat.Prime p → p ∣ orderOf x → p * orderOf x ∣ orderOf y\nhoy : 0 < orderOf y\nhxy : orderOf x ∣ orderOf y\np : ℕ\nhp : Nat.Prime p\nhpy : p ∣ orderOf y\nhd : orderOf (x * y) ∣ orderOf y / p\n⊢ p = 1\n[PROOFSTEP]\nrw [← Nat.dvd_one, ← mul_dvd_mul_iff_right hoy.ne', one_mul, ← dvd_div_iff hpy]\n[GOAL]\ncase hd\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx y : G\na b : A\nn m : ℕ\nh : Commute x y\nhy : IsOfFinOrder y\nhdvd : ∀ (p : ℕ), Nat.Prime p → p ∣ orderOf x → p * orderOf x ∣ orderOf y\nhoy : 0 < orderOf y\nhxy : orderOf x ∣ orderOf y\np : ℕ\nhp : Nat.Prime p\nhpy : p ∣ orderOf y\nhd : orderOf (x * y) ∣ orderOf y / p\n⊢ orderOf y ∣ orderOf y / p\n[PROOFSTEP]\nrefine' (orderOf_dvd_lcm_mul h).trans (lcm_dvd ((dvd_div_iff hpy).2 _) hd)\n[GOAL]\ncase hd\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx y : G\na b : A\nn m : ℕ\nh : Commute x y\nhy : IsOfFinOrder y\nhdvd : ∀ (p : ℕ), Nat.Prime p → p ∣ orderOf x → p * orderOf x ∣ orderOf y\nhoy : 0 < orderOf y\nhxy : orderOf x ∣ orderOf y\np : ℕ\nhp : Nat.Prime p\nhpy : p ∣ orderOf y\nhd : orderOf (x * y) ∣ orderOf y / p\n⊢ p * orderOf x ∣ orderOf y\n[PROOFSTEP]\nby_cases h : p ∣ orderOf x\n[GOAL]\ncase pos\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx y : G\na b : A\nn m : ℕ\nh✝ : Commute x y\nhy : IsOfFinOrder y\nhdvd : ∀ (p : ℕ), Nat.Prime p → p ∣ orderOf x → p * orderOf x ∣ orderOf y\nhoy : 0 < orderOf y\nhxy : orderOf x ∣ orderOf y\np : ℕ\nhp : Nat.Prime p\nhpy : p ∣ orderOf y\nhd : orderOf (x * y) ∣ orderOf y / p\nh : p ∣ orderOf x\n⊢ p * orderOf x ∣ orderOf y\ncase neg\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx y : G\na b : A\nn m : ℕ\nh✝ : Commute x y\nhy : IsOfFinOrder y\nhdvd : ∀ (p : ℕ), Nat.Prime p → p ∣ orderOf x → p * orderOf x ∣ orderOf y\nhoy : 0 < orderOf y\nhxy : orderOf x ∣ orderOf y\np : ℕ\nhp : Nat.Prime p\nhpy : p ∣ orderOf y\nhd : orderOf (x * y) ∣ orderOf y / p\nh : ¬p ∣ orderOf x\n⊢ p * orderOf x ∣ orderOf y\n[PROOFSTEP]\nexacts [hdvd p hp h, (hp.coprime_iff_not_dvd.2 h).mul_dvd_of_dvd_of_dvd hpy hxy]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx y : G\na b : A\nn m p : ℕ\nhp : Fact (Nat.Prime p)\nhg : x ^ p = 1\nhg1 : x ≠ 1\n⊢ ¬IsFixedPt (fun x_1 => x * x_1) 1\n[PROOFSTEP]\nrwa [IsFixedPt, mul_one]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx y : G\na b : A\nn m p : ℕ\nhp : Fact (Nat.Prime p)\nhnot : ¬x ^ p ^ n = 1\nhfin : x ^ p ^ (n + 1) = 1\n⊢ orderOf x = p ^ (n + 1)\n[PROOFSTEP]\napply minimalPeriod_eq_prime_pow\n[GOAL]\ncase hk\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx y : G\na b : A\nn m p : ℕ\nhp : Fact (Nat.Prime p)\nhnot : ¬x ^ p ^ n = 1\nhfin : x ^ p ^ (n + 1) = 1\n⊢ ¬IsPeriodicPt (fun x_1 => x * x_1) (p ^ n) 1\n[PROOFSTEP]\nrwa [isPeriodicPt_mul_iff_pow_eq_one]\n[GOAL]\ncase hk1\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx y : G\na b : A\nn m p : ℕ\nhp : Fact (Nat.Prime p)\nhnot : ¬x ^ p ^ n = 1\nhfin : x ^ p ^ (n + 1) = 1\n⊢ IsPeriodicPt (fun x_1 => x * x_1) (p ^ (n + 1)) 1\n[PROOFSTEP]\nrwa [isPeriodicPt_mul_iff_pow_eq_one]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx y : G\na b : A\nn m p : ℕ\nhp : Fact (Nat.Prime p)\nx✝ : ∃ k, orderOf x = p ^ k\nk : ℕ\nhk : orderOf x = p ^ k\n⊢ x ^ p ^ k = 1\n[PROOFSTEP]\nrw [← hk, pow_orderOf_eq_one]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx y : G\na b : A\nn m p : ℕ\nhp : Fact (Nat.Prime p)\nx✝ : ∃ m, x ^ p ^ m = 1\nw✝ : ℕ\nhm : x ^ p ^ w✝ = 1\n⊢ ∃ k, orderOf x = p ^ k\n[PROOFSTEP]\nobtain ⟨k, _, hk⟩ := (Nat.dvd_prime_pow hp.elim).mp (orderOf_dvd_of_pow_eq_one hm)\n[GOAL]\ncase intro.intro\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid G\ninst✝ : AddMonoid A\nx y : G\na b : A\nn m p : ℕ\nhp : Fact (Nat.Prime p)\nx✝ : ∃ m, x ^ p ^ m = 1\nw✝ : ℕ\nhm : x ^ p ^ w✝ = 1\nk : ℕ\nleft✝ : k ≤ w✝\nhk : orderOf x = p ^ k\n⊢ ∃ k, orderOf x = p ^ k\n[PROOFSTEP]\nexact ⟨k, hk⟩\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝ : LeftCancelMonoid G\nx y : G\nm n : ℕ\n⊢ x ^ n = x ^ m ↔ n ≡ m [MOD orderOf x]\n[PROOFSTEP]\nwlog hmn : m ≤ n generalizing m n\n[GOAL]\ncase inr\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝ : LeftCancelMonoid G\nx y : G\nm n : ℕ\nthis : ∀ {m n : ℕ}, m ≤ n → (x ^ n = x ^ m ↔ n ≡ m [MOD orderOf x])\nhmn : ¬m ≤ n\n⊢ x ^ n = x ^ m ↔ n ≡ m [MOD orderOf x]\n[PROOFSTEP]\nrw [eq_comm, ModEq.comm, this (le_of_not_le hmn)]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝ : LeftCancelMonoid G\nx y : G\nm✝ n✝ m n : ℕ\nhmn : m ≤ n\n⊢ x ^ n = x ^ m ↔ n ≡ m [MOD orderOf x]\n[PROOFSTEP]\nobtain ⟨k, rfl⟩ := Nat.exists_eq_add_of_le hmn\n[GOAL]\ncase intro\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝ : LeftCancelMonoid G\nx y : G\nm✝ n m k : ℕ\nhmn : m ≤ m + k\n⊢ x ^ (m + k) = x ^ m ↔ m + k ≡ m [MOD orderOf x]\n[PROOFSTEP]\nrw [← mul_one (x ^ m), pow_add, mul_left_cancel_iff, pow_eq_one_iff_modEq]\n[GOAL]\ncase intro\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝ : LeftCancelMonoid G\nx y : G\nm✝ n m k : ℕ\nhmn : m ≤ m + k\n⊢ k ≡ 0 [MOD orderOf x] ↔ m + k ≡ m [MOD orderOf x]\n[PROOFSTEP]\nexact ⟨fun h => Nat.ModEq.add_left _ h, fun h => Nat.ModEq.add_left_cancel' _ h⟩\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝ : LeftCancelMonoid G\nx✝ y : G\nm n : ℕ\nx : G\n⊢ (Injective fun n => x ^ n) ↔ ¬IsOfFinOrder x\n[PROOFSTEP]\nrefine' ⟨fun h => not_isOfFinOrder_of_injective_pow h, fun h n m hnm => _⟩\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝ : LeftCancelMonoid G\nx✝ y : G\nm✝ n✝ : ℕ\nx : G\nh : ¬IsOfFinOrder x\nn m : ℕ\nhnm : (fun n => x ^ n) n = (fun n => x ^ n) m\n⊢ n = m\n[PROOFSTEP]\nrwa [pow_eq_pow_iff_modEq, orderOf_eq_zero_iff.mpr h, modEq_zero_iff] at hnm \n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝ : LeftCancelMonoid G\nx y : G\nm✝ n✝ : ℕ\nh : orderOf x = 0\nn m : ℕ\n⊢ x ^ n = x ^ m ↔ n = m\n[PROOFSTEP]\nrw [pow_eq_pow_iff_modEq, h, modEq_zero_iff]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝ : LeftCancelMonoid G\nx✝ y : G\nm n : ℕ\nx : G\nh : ¬IsOfFinOrder x\n⊢ Set.Infinite {y | ¬IsOfFinOrder y}\n[PROOFSTEP]\nlet s := {n | 0 < n}.image fun n : ℕ => x ^ n\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝ : LeftCancelMonoid G\nx✝ y : G\nm n : ℕ\nx : G\nh : ¬IsOfFinOrder x\ns : Set G := (fun n => x ^ n) '' {n | 0 < n}\n⊢ Set.Infinite {y | ¬IsOfFinOrder y}\n[PROOFSTEP]\nhave hs : s ⊆ {y : G | ¬IsOfFinOrder y} :=\n  by\n  rintro - ⟨n, hn : 0 < n, rfl⟩ (contra : IsOfFinOrder (x ^ n))\n  apply h\n  rw [isOfFinOrder_iff_pow_eq_one] at contra ⊢\n  obtain ⟨m, hm, hm'⟩ := contra\n  exact ⟨n * m, mul_pos hn hm, by rwa [pow_mul]⟩\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝ : LeftCancelMonoid G\nx✝ y : G\nm n : ℕ\nx : G\nh : ¬IsOfFinOrder x\ns : Set G := (fun n => x ^ n) '' {n | 0 < n}\n⊢ s ⊆ {y | ¬IsOfFinOrder y}\n[PROOFSTEP]\nrintro - ⟨n, hn : 0 < n, rfl⟩ (contra : IsOfFinOrder (x ^ n))\n[GOAL]\ncase intro.intro\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝ : LeftCancelMonoid G\nx✝ y : G\nm n✝ : ℕ\nx : G\nh : ¬IsOfFinOrder x\ns : Set G := (fun n => x ^ n) '' {n | 0 < n}\nn : ℕ\nhn : 0 < n\ncontra : IsOfFinOrder (x ^ n)\n⊢ False\n[PROOFSTEP]\napply h\n[GOAL]\ncase intro.intro\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝ : LeftCancelMonoid G\nx✝ y : G\nm n✝ : ℕ\nx : G\nh : ¬IsOfFinOrder x\ns : Set G := (fun n => x ^ n) '' {n | 0 < n}\nn : ℕ\nhn : 0 < n\ncontra : IsOfFinOrder (x ^ n)\n⊢ IsOfFinOrder x\n[PROOFSTEP]\nrw [isOfFinOrder_iff_pow_eq_one] at contra ⊢\n[GOAL]\ncase intro.intro\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝ : LeftCancelMonoid G\nx✝ y : G\nm n✝ : ℕ\nx : G\nh : ¬IsOfFinOrder x\ns : Set G := (fun n => x ^ n) '' {n | 0 < n}\nn : ℕ\nhn : 0 < n\ncontra : ∃ n_1, 0 < n_1 ∧ (x ^ n) ^ n_1 = 1\n⊢ ∃ n, 0 < n ∧ x ^ n = 1\n[PROOFSTEP]\nobtain ⟨m, hm, hm'⟩ := contra\n[GOAL]\ncase intro.intro.intro.intro\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝ : LeftCancelMonoid G\nx✝ y : G\nm✝ n✝ : ℕ\nx : G\nh : ¬IsOfFinOrder x\ns : Set G := (fun n => x ^ n) '' {n | 0 < n}\nn : ℕ\nhn : 0 < n\nm : ℕ\nhm : 0 < m\nhm' : (x ^ n) ^ m = 1\n⊢ ∃ n, 0 < n ∧ x ^ n = 1\n[PROOFSTEP]\nexact ⟨n * m, mul_pos hn hm, by rwa [pow_mul]⟩\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝ : LeftCancelMonoid G\nx✝ y : G\nm✝ n✝ : ℕ\nx : G\nh : ¬IsOfFinOrder x\ns : Set G := (fun n => x ^ n) '' {n | 0 < n}\nn : ℕ\nhn : 0 < n\nm : ℕ\nhm : 0 < m\nhm' : (x ^ n) ^ m = 1\n⊢ x ^ (n * m) = 1\n[PROOFSTEP]\nrwa [pow_mul]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝ : LeftCancelMonoid G\nx✝ y : G\nm n : ℕ\nx : G\nh : ¬IsOfFinOrder x\ns : Set G := (fun n => x ^ n) '' {n | 0 < n}\nhs : s ⊆ {y | ¬IsOfFinOrder y}\n⊢ Set.Infinite {y | ¬IsOfFinOrder y}\n[PROOFSTEP]\nsuffices s.Infinite by exact this.mono hs\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝ : LeftCancelMonoid G\nx✝ y : G\nm n : ℕ\nx : G\nh : ¬IsOfFinOrder x\ns : Set G := (fun n => x ^ n) '' {n | 0 < n}\nhs : s ⊆ {y | ¬IsOfFinOrder y}\nthis : Set.Infinite s\n⊢ Set.Infinite {y | ¬IsOfFinOrder y}\n[PROOFSTEP]\nexact this.mono hs\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝ : LeftCancelMonoid G\nx✝ y : G\nm n : ℕ\nx : G\nh : ¬IsOfFinOrder x\ns : Set G := (fun n => x ^ n) '' {n | 0 < n}\nhs : s ⊆ {y | ¬IsOfFinOrder y}\n⊢ Set.Infinite s\n[PROOFSTEP]\ncontrapose! h\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝ : LeftCancelMonoid G\nx✝ y : G\nm n : ℕ\nx : G\ns : Set G := (fun n => x ^ n) '' {n | 0 < n}\nhs : s ⊆ {y | ¬IsOfFinOrder y}\nh : ¬Set.Infinite ((fun n => x ^ n) '' {n | 0 < n})\n⊢ IsOfFinOrder x\n[PROOFSTEP]\nhave : ¬Injective fun n : ℕ => x ^ n :=\n  by\n  have := Set.not_injOn_infinite_finite_image (Set.Ioi_infinite 0) (Set.not_infinite.mp h)\n  contrapose! this\n  exact Set.injOn_of_injective this _\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝ : LeftCancelMonoid G\nx✝ y : G\nm n : ℕ\nx : G\ns : Set G := (fun n => x ^ n) '' {n | 0 < n}\nhs : s ⊆ {y | ¬IsOfFinOrder y}\nh : ¬Set.Infinite ((fun n => x ^ n) '' {n | 0 < n})\n⊢ ¬Injective fun n => x ^ n\n[PROOFSTEP]\nhave := Set.not_injOn_infinite_finite_image (Set.Ioi_infinite 0) (Set.not_infinite.mp h)\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝ : LeftCancelMonoid G\nx✝ y : G\nm n : ℕ\nx : G\ns : Set G := (fun n => x ^ n) '' {n | 0 < n}\nhs : s ⊆ {y | ¬IsOfFinOrder y}\nh : ¬Set.Infinite ((fun n => x ^ n) '' {n | 0 < n})\nthis : ¬Set.InjOn (fun n => x ^ n) (Set.Ioi 0)\n⊢ ¬Injective fun n => x ^ n\n[PROOFSTEP]\ncontrapose! this\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝ : LeftCancelMonoid G\nx✝ y : G\nm n : ℕ\nx : G\ns : Set G := (fun n => x ^ n) '' {n | 0 < n}\nhs : s ⊆ {y | ¬IsOfFinOrder y}\nh : ¬Set.Infinite ((fun n => x ^ n) '' {n | 0 < n})\nthis : Injective fun n => x ^ n\n⊢ Set.InjOn (fun n => x ^ n) (Set.Ioi 0)\n[PROOFSTEP]\nexact Set.injOn_of_injective this _\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝ : LeftCancelMonoid G\nx✝ y : G\nm n : ℕ\nx : G\ns : Set G := (fun n => x ^ n) '' {n | 0 < n}\nhs : s ⊆ {y | ¬IsOfFinOrder y}\nh : ¬Set.Infinite ((fun n => x ^ n) '' {n | 0 < n})\nthis : ¬Injective fun n => x ^ n\n⊢ IsOfFinOrder x\n[PROOFSTEP]\nrwa [injective_pow_iff_not_isOfFinOrder, Classical.not_not] at this \n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝ : Group G\nx✝ y : G\ni : ℤ\nx : G\nhx : IsOfFinOrder x\n⊢ ∃ n, 0 < n ∧ x⁻¹ ^ n = 1\n[PROOFSTEP]\nrcases(isOfFinOrder_iff_pow_eq_one x).mp hx with ⟨n, npos, hn⟩\n[GOAL]\ncase intro.intro\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝ : Group G\nx✝ y : G\ni : ℤ\nx : G\nhx : IsOfFinOrder x\nn : ℕ\nnpos : 0 < n\nhn : x ^ n = 1\n⊢ ∃ n, 0 < n ∧ x⁻¹ ^ n = 1\n[PROOFSTEP]\nrefine' ⟨n, npos, by simp_rw [inv_pow, hn, inv_one]⟩\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝ : Group G\nx✝ y : G\ni : ℤ\nx : G\nhx : IsOfFinOrder x\nn : ℕ\nnpos : 0 < n\nhn : x ^ n = 1\n⊢ x⁻¹ ^ n = 1\n[PROOFSTEP]\nsimp_rw [inv_pow, hn, inv_one]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝ : Group G\nx y : G\ni : ℤ\n⊢ ↑(orderOf x) ∣ i ↔ x ^ i = 1\n[PROOFSTEP]\nrcases Int.eq_nat_or_neg i with ⟨i, rfl | rfl⟩\n[GOAL]\ncase intro.inl\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝ : Group G\nx y : G\ni : ℕ\n⊢ ↑(orderOf x) ∣ ↑i ↔ x ^ ↑i = 1\n[PROOFSTEP]\nrw [Int.coe_nat_dvd, orderOf_dvd_iff_pow_eq_one, zpow_ofNat]\n[GOAL]\ncase intro.inr\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝ : Group G\nx y : G\ni : ℕ\n⊢ ↑(orderOf x) ∣ -↑i ↔ x ^ (-↑i) = 1\n[PROOFSTEP]\nrw [dvd_neg, Int.coe_nat_dvd, zpow_neg, inv_eq_one, zpow_ofNat, orderOf_dvd_iff_pow_eq_one]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝ : Group G\nx✝ y : G\ni : ℤ\nx : G\n⊢ orderOf x⁻¹ = orderOf x\n[PROOFSTEP]\nsimp [orderOf_eq_orderOf_iff]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝ : Group G\nx y : G\ni : ℤ\n⊢ x ^ i = ?m.965169\n[PROOFSTEP]\nrw [← Int.emod_add_ediv i (orderOf x)]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝ : Group G\nx y : G\ni : ℤ\n⊢ x ^ (i % ↑(orderOf x) + ↑(orderOf x) * (i / ↑(orderOf x))) = x ^ (i % ↑(orderOf x))\n[PROOFSTEP]\nsimp [zpow_add, zpow_mul, pow_orderOf_eq_one]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝ : Group G\nx y : G\ni : ℤ\n⊢ (x ^ i) ^ orderOf x = 1\n[PROOFSTEP]\nby_cases h : IsOfFinOrder x\n[GOAL]\ncase pos\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝ : Group G\nx y : G\ni : ℤ\nh : IsOfFinOrder x\n⊢ (x ^ i) ^ orderOf x = 1\n[PROOFSTEP]\nrw [← zpow_ofNat, ← zpow_mul, mul_comm, zpow_mul, zpow_ofNat, pow_orderOf_eq_one, one_zpow]\n[GOAL]\ncase neg\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝ : Group G\nx y : G\ni : ℤ\nh : ¬IsOfFinOrder x\n⊢ (x ^ i) ^ orderOf x = 1\n[PROOFSTEP]\nrw [orderOf_eq_zero h, _root_.pow_zero]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝ : Group G\nx y : G\ni : ℤ\nh : IsOfFinOrder x\nh' : y ∈ Subgroup.zpowers x\n⊢ IsOfFinOrder y\n[PROOFSTEP]\nobtain ⟨k, rfl⟩ := Subgroup.mem_zpowers_iff.mp h'\n[GOAL]\ncase intro\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝ : Group G\nx : G\ni : ℤ\nh : IsOfFinOrder x\nk : ℤ\nh' : x ^ k ∈ Subgroup.zpowers x\n⊢ IsOfFinOrder (x ^ k)\n[PROOFSTEP]\nexact h.zpow\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝ : Group G\nx y : G\ni : ℤ\nh : y ∈ Subgroup.zpowers x\n⊢ orderOf y ∣ orderOf x\n[PROOFSTEP]\nobtain ⟨k, rfl⟩ := Subgroup.mem_zpowers_iff.mp h\n[GOAL]\ncase intro\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝ : Group G\nx : G\ni k : ℤ\nh : x ^ k ∈ Subgroup.zpowers x\n⊢ orderOf (x ^ k) ∣ orderOf x\n[PROOFSTEP]\nrw [orderOf_dvd_iff_pow_eq_one]\n[GOAL]\ncase intro\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝ : Group G\nx : G\ni k : ℤ\nh : x ^ k ∈ Subgroup.zpowers x\n⊢ (x ^ k) ^ orderOf x = 1\n[PROOFSTEP]\nexact zpow_pow_orderOf\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα✝ : Type u_4\nβ : Type u_5\ninst✝¹ : Group G\nx y : G\ni : ℤ\nα : Type u_6\ninst✝ : MulAction G α\nhx : x ∈ Subgroup.zpowers y\na : α\nhs : y • a = a\n⊢ x • a = a\n[PROOFSTEP]\nobtain ⟨k, rfl⟩ := Subgroup.mem_zpowers_iff.mp hx\n[GOAL]\ncase intro\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα✝ : Type u_4\nβ : Type u_5\ninst✝¹ : Group G\ny : G\ni : ℤ\nα : Type u_6\ninst✝ : MulAction G α\na : α\nhs : y • a = a\nk : ℤ\nhx : y ^ k ∈ Subgroup.zpowers y\n⊢ y ^ k • a = a\n[PROOFSTEP]\nrw [← MulAction.toPerm_apply, ← MulAction.toPermHom_apply, MonoidHom.map_zpow _ y k, MulAction.toPermHom_apply]\n[GOAL]\ncase intro\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα✝ : Type u_4\nβ : Type u_5\ninst✝¹ : Group G\ny : G\ni : ℤ\nα : Type u_6\ninst✝ : MulAction G α\na : α\nhs : y • a = a\nk : ℤ\nhx : y ^ k ∈ Subgroup.zpowers y\n⊢ ↑(MulAction.toPerm y ^ k) a = a\n[PROOFSTEP]\nexact Function.IsFixedPt.perm_zpow (by exact hs) k\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα✝ : Type u_4\nβ : Type u_5\ninst✝¹ : Group G\ny : G\ni : ℤ\nα : Type u_6\ninst✝ : MulAction G α\na : α\nhs : y • a = a\nk : ℤ\nhx : y ^ k ∈ Subgroup.zpowers y\n⊢ IsFixedPt (↑(MulAction.toPerm y)) a\n[PROOFSTEP]\nexact hs\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝² : Monoid G\nx : G\nn : ℕ\ninst✝¹ : Fintype G\ninst✝ : DecidableEq G\nhn : n ≠ 0\n⊢ ∀ (x : ℕ),\n    x ∈ Finset.filter (fun x => x ∣ n) (Finset.range (succ n)) →\n      ∀ (y : ℕ),\n        y ∈ Finset.filter (fun x => x ∣ n) (Finset.range (succ n)) →\n          x ≠ y →\n            Disjoint (Finset.filter (fun x_1 => orderOf x_1 = x) Finset.univ)\n              (Finset.filter (fun x => orderOf x = y) Finset.univ)\n[PROOFSTEP]\nintros\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝² : Monoid G\nx : G\nn : ℕ\ninst✝¹ : Fintype G\ninst✝ : DecidableEq G\nhn : n ≠ 0\nx✝ : ℕ\na✝² : x✝ ∈ Finset.filter (fun x => x ∣ n) (Finset.range (succ n))\ny✝ : ℕ\na✝¹ : y✝ ∈ Finset.filter (fun x => x ∣ n) (Finset.range (succ n))\na✝ : x✝ ≠ y✝\n⊢ Disjoint (Finset.filter (fun x => orderOf x = x✝) Finset.univ) (Finset.filter (fun x => orderOf x = y✝) Finset.univ)\n[PROOFSTEP]\napply Finset.disjoint_filter.2\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝² : Monoid G\nx : G\nn : ℕ\ninst✝¹ : Fintype G\ninst✝ : DecidableEq G\nhn : n ≠ 0\nx✝ : ℕ\na✝² : x✝ ∈ Finset.filter (fun x => x ∣ n) (Finset.range (succ n))\ny✝ : ℕ\na✝¹ : y✝ ∈ Finset.filter (fun x => x ∣ n) (Finset.range (succ n))\na✝ : x✝ ≠ y✝\n⊢ ∀ (x : G), x ∈ Finset.univ → orderOf x = x✝ → ¬orderOf x = y✝\n[PROOFSTEP]\nrintro _ _ rfl\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝² : Monoid G\nx : G\nn : ℕ\ninst✝¹ : Fintype G\ninst✝ : DecidableEq G\nhn : n ≠ 0\ny✝ : ℕ\na✝³ : y✝ ∈ Finset.filter (fun x => x ∣ n) (Finset.range (succ n))\nx✝ : G\na✝² : x✝ ∈ Finset.univ\na✝¹ : orderOf x✝ ∈ Finset.filter (fun x => x ∣ n) (Finset.range (succ n))\na✝ : orderOf x✝ ≠ y✝\n⊢ ¬orderOf x✝ = y✝\n[PROOFSTEP]\nassumption\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝² : Monoid G\nx : G\nn : ℕ\ninst✝¹ : Fintype G\ninst✝ : DecidableEq G\nhn : n ≠ 0\n⊢ ∀ (a : G),\n    (a ∈\n        Finset.biUnion (Finset.filter (fun x => x ∣ n) (Finset.range (succ n))) fun m =>\n          Finset.filter (fun x => orderOf x = m) Finset.univ) ↔\n      a ∈ Finset.filter (fun x => x ^ n = 1) Finset.univ\n[PROOFSTEP]\nintro x\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝² : Monoid G\nx✝ : G\nn : ℕ\ninst✝¹ : Fintype G\ninst✝ : DecidableEq G\nhn : n ≠ 0\nx : G\n⊢ (x ∈\n      Finset.biUnion (Finset.filter (fun x => x ∣ n) (Finset.range (succ n))) fun m =>\n        Finset.filter (fun x => orderOf x = m) Finset.univ) ↔\n    x ∈ Finset.filter (fun x => x ^ n = 1) Finset.univ\n[PROOFSTEP]\nsuffices orderOf x ≤ n ∧ orderOf x ∣ n ↔ x ^ n = 1 by simpa [Nat.lt_succ_iff]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝² : Monoid G\nx✝ : G\nn : ℕ\ninst✝¹ : Fintype G\ninst✝ : DecidableEq G\nhn : n ≠ 0\nx : G\nthis : orderOf x ≤ n ∧ orderOf x ∣ n ↔ x ^ n = 1\n⊢ (x ∈\n      Finset.biUnion (Finset.filter (fun x => x ∣ n) (Finset.range (succ n))) fun m =>\n        Finset.filter (fun x => orderOf x = m) Finset.univ) ↔\n    x ∈ Finset.filter (fun x => x ^ n = 1) Finset.univ\n[PROOFSTEP]\nsimpa [Nat.lt_succ_iff]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝² : Monoid G\nx✝ : G\nn : ℕ\ninst✝¹ : Fintype G\ninst✝ : DecidableEq G\nhn : n ≠ 0\nx : G\n⊢ orderOf x ≤ n ∧ orderOf x ∣ n ↔ x ^ n = 1\n[PROOFSTEP]\nexact\n  ⟨fun h => by\n    let ⟨m, hm⟩ := h.2\n    rw [hm, pow_mul, pow_orderOf_eq_one, one_pow], fun h =>\n    ⟨orderOf_le_of_pow_eq_one hn.bot_lt h, orderOf_dvd_of_pow_eq_one h⟩⟩\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝² : Monoid G\nx✝ : G\nn : ℕ\ninst✝¹ : Fintype G\ninst✝ : DecidableEq G\nhn : n ≠ 0\nx : G\nh : orderOf x ≤ n ∧ orderOf x ∣ n\n⊢ x ^ n = 1\n[PROOFSTEP]\nlet ⟨m, hm⟩ := h.2\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝² : Monoid G\nx✝ : G\nn : ℕ\ninst✝¹ : Fintype G\ninst✝ : DecidableEq G\nhn : n ≠ 0\nx : G\nh : orderOf x ≤ n ∧ orderOf x ∣ n\nm : ℕ\nhm : n = orderOf x * m\n⊢ x ^ n = 1\n[PROOFSTEP]\nrw [hm, pow_mul, pow_orderOf_eq_one, one_pow]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : LeftCancelMonoid G\nx✝ y : G\nn : ℕ\ninst✝ : Finite G\nx : G\n⊢ IsOfFinOrder x\n[PROOFSTEP]\nhave : (Set.univ : Set G).Finite := Set.univ.toFinite\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : LeftCancelMonoid G\nx✝ y : G\nn : ℕ\ninst✝ : Finite G\nx : G\nthis : Set.Finite Set.univ\n⊢ IsOfFinOrder x\n[PROOFSTEP]\ncontrapose! this\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : LeftCancelMonoid G\nx✝ y : G\nn : ℕ\ninst✝ : Finite G\nx : G\nthis : ¬IsOfFinOrder x\n⊢ ¬Set.Finite Set.univ\n[PROOFSTEP]\nexact Set.Infinite.mono (Set.subset_univ _) (infinite_not_isOfFinOrder this)\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : LeftCancelMonoid G\nx✝ y : G\nn✝ : ℕ\ninst✝ : Finite G\nx : G\nn : ℕ\nhn : ∃ m, x ^ m = x ^ n\n⊢ ↑(finEquivPowers x).symm { val := x ^ n, property := hn } =\n    { val := n % orderOf x, isLt := (_ : n % orderOf x < orderOf x) }\n[PROOFSTEP]\nrw [Equiv.symm_apply_eq, finEquivPowers_apply, Subtype.mk_eq_mk, pow_eq_mod_orderOf, Fin.val_mk]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : LeftCancelMonoid G\nx y : G\nn✝ : ℕ\ninst✝ : Finite G\nh : orderOf x = orderOf y\nn : ℕ\n⊢ ↑(powersEquivPowers h) { val := x ^ n, property := (_ : ∃ y, (fun x x_1 => x ^ x_1) x y = x ^ n) } =\n    { val := y ^ n, property := (_ : ∃ y_1, (fun x x_1 => x ^ x_1) y y_1 = y ^ n) }\n[PROOFSTEP]\nrw [powersEquivPowers, Equiv.trans_apply, Equiv.trans_apply, finEquivPowers_symm_apply, ← Equiv.eq_symm_apply,\n  finEquivPowers_symm_apply]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : LeftCancelMonoid G\nx y : G\nn✝ : ℕ\ninst✝ : Finite G\nh : orderOf x = orderOf y\nn : ℕ\n⊢ ↑(Fin.castIso h).toEquiv { val := n % orderOf x, isLt := (_ : n % orderOf x < orderOf x) } =\n    { val := n % orderOf y, isLt := (_ : n % orderOf y < orderOf y) }\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Group G\nx✝ y : G\nn : ℕ\ninst✝ : Finite G\nx : G\n⊢ ∃ i x_1, x ^ i = 1\n[PROOFSTEP]\nrcases exists_pow_eq_one x with ⟨w, hw1, hw2⟩\n[GOAL]\ncase intro.intro\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Group G\nx✝ y : G\nn : ℕ\ninst✝ : Finite G\nx : G\nw : ℕ\nhw1 : w > 0\nhw2 : IsPeriodicPt ((fun x x_1 => x * x_1) x) w 1\n⊢ ∃ i x_1, x ^ i = 1\n[PROOFSTEP]\nrefine' ⟨w, Int.coe_nat_ne_zero.mpr (_root_.ne_of_gt hw1), _⟩\n[GOAL]\ncase intro.intro\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Group G\nx✝ y : G\nn : ℕ\ninst✝ : Finite G\nx : G\nw : ℕ\nhw1 : w > 0\nhw2 : IsPeriodicPt ((fun x x_1 => x * x_1) x) w 1\n⊢ x ^ ↑w = 1\n[PROOFSTEP]\nrw [zpow_ofNat]\n[GOAL]\ncase intro.intro\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Group G\nx✝ y : G\nn : ℕ\ninst✝ : Finite G\nx : G\nw : ℕ\nhw1 : w > 0\nhw2 : IsPeriodicPt ((fun x x_1 => x * x_1) x) w 1\n⊢ x ^ w = 1\n[PROOFSTEP]\nexact (isPeriodicPt_mul_iff_pow_eq_one _).mp hw2\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Group G\nx y : G\nn✝ : ℕ\ninst✝ : Finite G\nx✝ : y ∈ Submonoid.powers x\nn : ℕ\nhn : (fun x x_1 => x ^ x_1) x n = y\n⊢ (fun x x_1 => x ^ x_1) x ↑n = y\n[PROOFSTEP]\nsimp_all\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Group G\nx y : G\nn : ℕ\ninst✝ : Finite G\nx✝ : y ∈ zpowers x\ni : ℤ\nhi : (fun x x_1 => x ^ x_1) x i = y\n⊢ (fun x x_1 => x ^ x_1) x (Int.natAbs (i % ↑(orderOf x))) = y\n[PROOFSTEP]\ndsimp only\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Group G\nx y : G\nn : ℕ\ninst✝ : Finite G\nx✝ : y ∈ zpowers x\ni : ℤ\nhi : (fun x x_1 => x ^ x_1) x i = y\n⊢ x ^ Int.natAbs (i % ↑(orderOf x)) = y\n[PROOFSTEP]\nrwa [← zpow_ofNat, Int.natAbs_of_nonneg (Int.emod_nonneg _ (Int.coe_nat_ne_zero_iff_pos.2 (orderOf_pos x))), ←\n  zpow_eq_mod_orderOf]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝² : Group G\nx y : G\nn : ℕ\ninst✝¹ : Finite G\ninst✝ : DecidableEq G\n⊢ y ∈ zpowers x ↔ y ∈ Finset.image ((fun x x_1 => x ^ x_1) x) (Finset.range (orderOf x))\n[PROOFSTEP]\nrw [← mem_powers_iff_mem_zpowers, mem_powers_iff_mem_range_orderOf]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝ : Group G\nx y : G\nn✝ : ℕ\nn : ℤ\n⊢ x ^ n = 1 ↔ n ≡ 0 [ZMOD ↑(orderOf x)]\n[PROOFSTEP]\nrw [Int.modEq_zero_iff_dvd, orderOf_dvd_iff_zpow_eq_one]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝ : Group G\nx y : G\nn✝ : ℕ\nm n : ℤ\n⊢ x ^ m = x ^ n ↔ m ≡ n [ZMOD ↑(orderOf x)]\n[PROOFSTEP]\nrw [← mul_inv_eq_one, ← zpow_sub, zpow_eq_one_iff_modEq, Int.modEq_iff_dvd, Int.modEq_iff_dvd, zero_sub, neg_sub]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝ : Group G\nx y : G\nn : ℕ\n⊢ (Injective fun n => x ^ n) ↔ ¬IsOfFinOrder x\n[PROOFSTEP]\nrefine' ⟨_, fun h n m hnm => _⟩\n[GOAL]\ncase refine'_1\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝ : Group G\nx y : G\nn : ℕ\n⊢ (Injective fun n => x ^ n) → ¬IsOfFinOrder x\n[PROOFSTEP]\nsimp_rw [isOfFinOrder_iff_pow_eq_one]\n[GOAL]\ncase refine'_1\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝ : Group G\nx y : G\nn : ℕ\n⊢ (Injective fun n => x ^ n) → ¬∃ n, 0 < n ∧ x ^ n = 1\n[PROOFSTEP]\nrintro h ⟨n, hn, hx⟩\n[GOAL]\ncase refine'_1.intro.intro\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝ : Group G\nx y : G\nn✝ : ℕ\nh : Injective fun n => x ^ n\nn : ℕ\nhn : 0 < n\nhx : x ^ n = 1\n⊢ False\n[PROOFSTEP]\nexact Nat.cast_ne_zero.2 hn.ne' (h <| by simpa using hx)\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝ : Group G\nx y : G\nn✝ : ℕ\nh : Injective fun n => x ^ n\nn : ℕ\nhn : 0 < n\nhx : x ^ n = 1\n⊢ (fun n => x ^ n) ↑n = (fun n => x ^ n) 0\n[PROOFSTEP]\nsimpa using hx\n[GOAL]\ncase refine'_2\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝ : Group G\nx y : G\nn✝ : ℕ\nh : ¬IsOfFinOrder x\nn m : ℤ\nhnm : (fun n => x ^ n) n = (fun n => x ^ n) m\n⊢ n = m\n[PROOFSTEP]\nrwa [zpow_eq_zpow_iff_modEq, orderOf_eq_zero_iff.2 h, Nat.cast_zero, Int.modEq_zero_iff] at hnm \n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Group G\nx✝ y : G\nn✝ : ℕ\ninst✝ : Finite G\nx : G\nn : ℕ\nhn : ∃ m, x ^ m = x ^ n\n⊢ ↑(finEquivZpowers x).symm { val := x ^ n, property := hn } =\n    { val := n % orderOf x, isLt := (_ : n % orderOf x < orderOf x) }\n[PROOFSTEP]\nrw [finEquivZpowers, Equiv.symm_trans_apply]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Group G\nx✝ y : G\nn✝ : ℕ\ninst✝ : Finite G\nx : G\nn : ℕ\nhn : ∃ m, x ^ m = x ^ n\n⊢ ↑(finEquivPowers x).symm\n      (↑(Equiv.Set.ofEq (_ : ↑(Submonoid.powers x) = ↑(zpowers x))).symm { val := x ^ n, property := hn }) =\n    { val := n % orderOf x, isLt := (_ : n % orderOf x < orderOf x) }\n[PROOFSTEP]\nexact finEquivPowers_symm_apply x n\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Group G\nx y : G\nn✝ : ℕ\ninst✝ : Finite G\nh : orderOf x = orderOf y\nn : ℕ\n⊢ ↑(zpowersEquivZpowers h) { val := x ^ n, property := (_ : ∃ y, (fun x x_1 => x ^ x_1) x y = x ^ n) } =\n    { val := y ^ n, property := (_ : ∃ y_1, (fun x x_1 => x ^ x_1) y y_1 = y ^ n) }\n[PROOFSTEP]\nrw [zpowersEquivZpowers, Equiv.trans_apply, Equiv.trans_apply, finEquivZpowers_symm_apply, ← Equiv.eq_symm_apply,\n  finEquivZpowers_symm_apply]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Group G\nx y : G\nn✝ : ℕ\ninst✝ : Finite G\nh : orderOf x = orderOf y\nn : ℕ\n⊢ ↑(Fin.castIso h).toEquiv { val := n % orderOf x, isLt := (_ : n % orderOf x < orderOf x) } =\n    { val := n % orderOf y, isLt := (_ : n % orderOf y < orderOf y) }\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Group G\nx y : G\nn : ℕ\ninst✝ : Fintype G\n⊢ orderOf x ∣ Fintype.card G\n[PROOFSTEP]\nclassical\nhave ft_prod : Fintype ((G ⧸ zpowers x) × zpowers x) := Fintype.ofEquiv G groupEquivQuotientProdSubgroup\nhave ft_s : Fintype (zpowers x) := @Fintype.prodRight _ _ _ ft_prod _\nhave ft_cosets : Fintype (G ⧸ zpowers x) := @Fintype.prodLeft _ _ _ ft_prod ⟨⟨1, (zpowers x).one_mem⟩⟩\nhave eq₁ : Fintype.card G = @Fintype.card _ ft_cosets * @Fintype.card _ ft_s :=\n  calc\n    Fintype.card G = @Fintype.card _ ft_prod := @Fintype.card_congr _ _ _ ft_prod groupEquivQuotientProdSubgroup\n    _ = @Fintype.card _ (@instFintypeProd _ _ ft_cosets ft_s) := (congr_arg (@Fintype.card _) <| Subsingleton.elim _ _)\n    _ = @Fintype.card _ ft_cosets * @Fintype.card _ ft_s := @Fintype.card_prod _ _ ft_cosets ft_s\nhave eq₂ : orderOf x = @Fintype.card _ ft_s :=\n  calc\n    orderOf x = _ := orderOf_eq_card_zpowers\n    _ = _ := congr_arg (@Fintype.card _) <| Subsingleton.elim _ _\nexact Dvd.intro (@Fintype.card (G ⧸ Subgroup.zpowers x) ft_cosets) (by rw [eq₁, eq₂, mul_comm])\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Group G\nx y : G\nn : ℕ\ninst✝ : Fintype G\n⊢ orderOf x ∣ Fintype.card G\n[PROOFSTEP]\nhave ft_prod : Fintype ((G ⧸ zpowers x) × zpowers x) := Fintype.ofEquiv G groupEquivQuotientProdSubgroup\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Group G\nx y : G\nn : ℕ\ninst✝ : Fintype G\nft_prod : Fintype ((G ⧸ zpowers x) × { x_1 // x_1 ∈ zpowers x })\n⊢ orderOf x ∣ Fintype.card G\n[PROOFSTEP]\nhave ft_s : Fintype (zpowers x) := @Fintype.prodRight _ _ _ ft_prod _\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Group G\nx y : G\nn : ℕ\ninst✝ : Fintype G\nft_prod : Fintype ((G ⧸ zpowers x) × { x_1 // x_1 ∈ zpowers x })\nft_s : Fintype { x_1 // x_1 ∈ zpowers x }\n⊢ orderOf x ∣ Fintype.card G\n[PROOFSTEP]\nhave ft_cosets : Fintype (G ⧸ zpowers x) := @Fintype.prodLeft _ _ _ ft_prod ⟨⟨1, (zpowers x).one_mem⟩⟩\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Group G\nx y : G\nn : ℕ\ninst✝ : Fintype G\nft_prod : Fintype ((G ⧸ zpowers x) × { x_1 // x_1 ∈ zpowers x })\nft_s : Fintype { x_1 // x_1 ∈ zpowers x }\nft_cosets : Fintype (G ⧸ zpowers x)\n⊢ orderOf x ∣ Fintype.card G\n[PROOFSTEP]\nhave eq₁ : Fintype.card G = @Fintype.card _ ft_cosets * @Fintype.card _ ft_s :=\n  calc\n    Fintype.card G = @Fintype.card _ ft_prod := @Fintype.card_congr _ _ _ ft_prod groupEquivQuotientProdSubgroup\n    _ = @Fintype.card _ (@instFintypeProd _ _ ft_cosets ft_s) := (congr_arg (@Fintype.card _) <| Subsingleton.elim _ _)\n    _ = @Fintype.card _ ft_cosets * @Fintype.card _ ft_s := @Fintype.card_prod _ _ ft_cosets ft_s\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Group G\nx y : G\nn : ℕ\ninst✝ : Fintype G\nft_prod : Fintype ((G ⧸ zpowers x) × { x_1 // x_1 ∈ zpowers x })\nft_s : Fintype { x_1 // x_1 ∈ zpowers x }\nft_cosets : Fintype (G ⧸ zpowers x)\neq₁ : Fintype.card G = Fintype.card (G ⧸ zpowers x) * Fintype.card { x_1 // x_1 ∈ zpowers x }\n⊢ orderOf x ∣ Fintype.card G\n[PROOFSTEP]\nhave eq₂ : orderOf x = @Fintype.card _ ft_s :=\n  calc\n    orderOf x = _ := orderOf_eq_card_zpowers\n    _ = _ := congr_arg (@Fintype.card _) <| Subsingleton.elim _ _\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Group G\nx y : G\nn : ℕ\ninst✝ : Fintype G\nft_prod : Fintype ((G ⧸ zpowers x) × { x_1 // x_1 ∈ zpowers x })\nft_s : Fintype { x_1 // x_1 ∈ zpowers x }\nft_cosets : Fintype (G ⧸ zpowers x)\neq₁ : Fintype.card G = Fintype.card (G ⧸ zpowers x) * Fintype.card { x_1 // x_1 ∈ zpowers x }\neq₂ : orderOf x = Fintype.card { x_1 // x_1 ∈ zpowers x }\n⊢ orderOf x ∣ Fintype.card G\n[PROOFSTEP]\nexact Dvd.intro (@Fintype.card (G ⧸ Subgroup.zpowers x) ft_cosets) (by rw [eq₁, eq₂, mul_comm])\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Group G\nx y : G\nn : ℕ\ninst✝ : Fintype G\nft_prod : Fintype ((G ⧸ zpowers x) × { x_1 // x_1 ∈ zpowers x })\nft_s : Fintype { x_1 // x_1 ∈ zpowers x }\nft_cosets : Fintype (G ⧸ zpowers x)\neq₁ : Fintype.card G = Fintype.card (G ⧸ zpowers x) * Fintype.card { x_1 // x_1 ∈ zpowers x }\neq₂ : orderOf x = Fintype.card { x_1 // x_1 ∈ zpowers x }\n⊢ orderOf x * Fintype.card (G ⧸ zpowers x) = Fintype.card G\n[PROOFSTEP]\nrw [eq₁, eq₂, mul_comm]\n[GOAL]\nG✝ : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝² : Group G✝\nx✝ y : G✝\nn : ℕ\ninst✝¹ : Fintype G✝\nG : Type u_6\ninst✝ : Group G\nx : G\n⊢ orderOf x ∣ Nat.card G\n[PROOFSTEP]\ncases' fintypeOrInfinite G with h h\n[GOAL]\ncase inl\nG✝ : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝² : Group G✝\nx✝ y : G✝\nn : ℕ\ninst✝¹ : Fintype G✝\nG : Type u_6\ninst✝ : Group G\nx : G\nh : Fintype G\n⊢ orderOf x ∣ Nat.card G\n[PROOFSTEP]\nsimp only [Nat.card_eq_fintype_card, orderOf_dvd_card_univ]\n[GOAL]\ncase inr\nG✝ : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝² : Group G✝\nx✝ y : G✝\nn : ℕ\ninst✝¹ : Fintype G✝\nG : Type u_6\ninst✝ : Group G\nx : G\nh : Infinite G\n⊢ orderOf x ∣ Nat.card G\n[PROOFSTEP]\nsimp only [card_eq_zero_of_infinite, dvd_zero]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Group G\nx y : G\nn : ℕ\ninst✝ : Fintype G\n⊢ x ^ Fintype.card G = 1\n[PROOFSTEP]\nrw [← Nat.card_eq_fintype_card, pow_card_eq_one']\n[GOAL]\nG✝ : Type u_1\nH✝ : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝³ : Group G✝\nx y : G✝\nn : ℕ\ninst✝² : Fintype G✝\nG : Type u_6\ninst✝¹ : Group G\nH : Subgroup G\ninst✝ : Normal H\ng : G\n⊢ g ^ index H ∈ H\n[PROOFSTEP]\nrw [← eq_one_iff, QuotientGroup.mk_pow H, index, pow_card_eq_one']\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Group G\nx y : G\nn✝ : ℕ\ninst✝ : Fintype G\nn : ℕ\n⊢ x ^ n = x ^ (n % Fintype.card G)\n[PROOFSTEP]\nrw [pow_eq_mod_orderOf, ← Nat.mod_mod_of_dvd n orderOf_dvd_card_univ, ← pow_eq_mod_orderOf]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Group G\nx y : G\nn✝ : ℕ\ninst✝ : Fintype G\nn : ℤ\n⊢ x ^ n = x ^ (n % ↑(Fintype.card G))\n[PROOFSTEP]\nrw [zpow_eq_mod_orderOf, ← Int.emod_emod_of_dvd n (Int.coe_nat_dvd.2 orderOf_dvd_card_univ), ← zpow_eq_mod_orderOf]\n[GOAL]\nG✝ : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝² : Group G✝\nx y : G✝\nn : ℕ\ninst✝¹ : Fintype G✝\nG : Type u_6\ninst✝ : Group G\nh : coprime (Nat.card G) n\ng : G\n⊢ (fun g => g ^ gcdB (Nat.card G) n) ((fun g => g ^ n) g) = g\n[PROOFSTEP]\nhave key := congr_arg ((· ^ ·) g) ((Nat.card G).gcd_eq_gcd_ab n)\n[GOAL]\nG✝ : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝² : Group G✝\nx y : G✝\nn : ℕ\ninst✝¹ : Fintype G✝\nG : Type u_6\ninst✝ : Group G\nh : coprime (Nat.card G) n\ng : G\nkey :\n  (fun x x_1 => x ^ x_1) g ↑(gcd (Nat.card G) n) =\n    (fun x x_1 => x ^ x_1) g (↑(Nat.card G) * gcdA (Nat.card G) n + ↑n * gcdB (Nat.card G) n)\n⊢ (fun g => g ^ gcdB (Nat.card G) n) ((fun g => g ^ n) g) = g\n[PROOFSTEP]\ndsimp only at key \n[GOAL]\nG✝ : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝² : Group G✝\nx y : G✝\nn : ℕ\ninst✝¹ : Fintype G✝\nG : Type u_6\ninst✝ : Group G\nh : coprime (Nat.card G) n\ng : G\nkey : g ^ ↑(gcd (Nat.card G) n) = g ^ (↑(Nat.card G) * gcdA (Nat.card G) n + ↑n * gcdB (Nat.card G) n)\n⊢ (fun g => g ^ gcdB (Nat.card G) n) ((fun g => g ^ n) g) = g\n[PROOFSTEP]\nrwa [zpow_add, zpow_mul, zpow_mul, zpow_ofNat, zpow_ofNat, zpow_ofNat, h.gcd_eq_one, pow_one, pow_card_eq_one',\n  one_zpow, one_mul, eq_comm] at key \n[GOAL]\nG✝ : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝² : Group G✝\nx y : G✝\nn : ℕ\ninst✝¹ : Fintype G✝\nG : Type u_6\ninst✝ : Group G\nh : coprime (Nat.card G) n\ng : G\n⊢ (fun g => g ^ n) ((fun g => g ^ gcdB (Nat.card G) n) g) = g\n[PROOFSTEP]\nhave key := congr_arg ((· ^ ·) g) ((Nat.card G).gcd_eq_gcd_ab n)\n[GOAL]\nG✝ : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝² : Group G✝\nx y : G✝\nn : ℕ\ninst✝¹ : Fintype G✝\nG : Type u_6\ninst✝ : Group G\nh : coprime (Nat.card G) n\ng : G\nkey :\n  (fun x x_1 => x ^ x_1) g ↑(gcd (Nat.card G) n) =\n    (fun x x_1 => x ^ x_1) g (↑(Nat.card G) * gcdA (Nat.card G) n + ↑n * gcdB (Nat.card G) n)\n⊢ (fun g => g ^ n) ((fun g => g ^ gcdB (Nat.card G) n) g) = g\n[PROOFSTEP]\ndsimp only at key \n[GOAL]\nG✝ : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝² : Group G✝\nx y : G✝\nn : ℕ\ninst✝¹ : Fintype G✝\nG : Type u_6\ninst✝ : Group G\nh : coprime (Nat.card G) n\ng : G\nkey : g ^ ↑(gcd (Nat.card G) n) = g ^ (↑(Nat.card G) * gcdA (Nat.card G) n + ↑n * gcdB (Nat.card G) n)\n⊢ (fun g => g ^ n) ((fun g => g ^ gcdB (Nat.card G) n) g) = g\n[PROOFSTEP]\nrwa [zpow_add, zpow_mul, zpow_mul', zpow_ofNat, zpow_ofNat, zpow_ofNat, h.gcd_eq_one, pow_one, pow_card_eq_one',\n  one_zpow, one_mul, eq_comm] at key \n[GOAL]\nG✝ : Type u_1\nH✝ : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝⁴ : Group G✝\nx y : G✝\nn : ℕ\ninst✝³ : Fintype G✝\nG : Type u_6\ninst✝² : Group G\nH K : Subgroup G\ninst✝¹ : Fintype { x // x ∈ H }\ninst✝ : Fintype { x // x ∈ K }\nh : coprime (Fintype.card { x // x ∈ H }) (Fintype.card { x // x ∈ K })\n⊢ H ⊓ K = ⊥\n[PROOFSTEP]\nrefine' (H ⊓ K).eq_bot_iff_forall.mpr fun x hx => _\n[GOAL]\nG✝ : Type u_1\nH✝ : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝⁴ : Group G✝\nx✝ y : G✝\nn : ℕ\ninst✝³ : Fintype G✝\nG : Type u_6\ninst✝² : Group G\nH K : Subgroup G\ninst✝¹ : Fintype { x // x ∈ H }\ninst✝ : Fintype { x // x ∈ K }\nh : coprime (Fintype.card { x // x ∈ H }) (Fintype.card { x // x ∈ K })\nx : G\nhx : x ∈ H ⊓ K\n⊢ x = 1\n[PROOFSTEP]\nrw [← orderOf_eq_one_iff, ← Nat.dvd_one, ← h.gcd_eq_one, Nat.dvd_gcd_iff]\n[GOAL]\nG✝ : Type u_1\nH✝ : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝⁴ : Group G✝\nx✝ y : G✝\nn : ℕ\ninst✝³ : Fintype G✝\nG : Type u_6\ninst✝² : Group G\nH K : Subgroup G\ninst✝¹ : Fintype { x // x ∈ H }\ninst✝ : Fintype { x // x ∈ K }\nh : coprime (Fintype.card { x // x ∈ H }) (Fintype.card { x // x ∈ K })\nx : G\nhx : x ∈ H ⊓ K\n⊢ orderOf x ∣ Fintype.card { x // x ∈ H } ∧ orderOf x ∣ Fintype.card { x // x ∈ K }\n[PROOFSTEP]\nexact\n  ⟨(congr_arg (· ∣ Fintype.card H) (orderOf_subgroup ⟨x, hx.1⟩)).mpr orderOf_dvd_card_univ,\n    (congr_arg (· ∣ Fintype.card K) (orderOf_subgroup ⟨x, hx.2⟩)).mpr orderOf_dvd_card_univ⟩\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝² : Group G\nx y : G\nn : ℕ\ninst✝¹ : Fintype G\ninst✝ : DecidableEq G\n⊢ Finset.image (fun i => x ^ i) (Finset.range (orderOf x)) = Set.toFinset ↑(zpowers x)\n[PROOFSTEP]\next x\n[GOAL]\ncase a\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝² : Group G\nx✝ y : G\nn : ℕ\ninst✝¹ : Fintype G\ninst✝ : DecidableEq G\nx : G\n⊢ x ∈ Finset.image (fun i => x✝ ^ i) (Finset.range (orderOf x✝)) ↔ x ∈ Set.toFinset ↑(zpowers x✝)\n[PROOFSTEP]\nrw [Set.mem_toFinset, SetLike.mem_coe, mem_zpowers_iff_mem_range_orderOf]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Group G\nx y : G\nn : ℕ\ninst✝ : Fintype G\nh : x ^ gcd n (Fintype.card G) = 1\n⊢ x ^ n = 1\n[PROOFSTEP]\nlet ⟨m, hm⟩ := gcd_dvd_left n (Fintype.card G)\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Group G\nx y : G\nn : ℕ\ninst✝ : Fintype G\nh : x ^ gcd n (Fintype.card G) = 1\nm : ℕ\nhm : n = gcd n (Fintype.card G) * m\n⊢ x ^ n = 1\n[PROOFSTEP]\nrw [hm, pow_mul, h, one_pow]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\nM : Type u_6\ninst✝¹ : LeftCancelMonoid M\ninst✝ : Fintype M\nS : Set M\nhS1 : Set.Nonempty S\nhS2 : S * S = S\na : M\nha : a ∈ S\n⊢ a ^ (zero + 1) ∈ S\n[PROOFSTEP]\nrwa [Nat.zero_eq, zero_add, pow_one]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\nM : Type u_6\ninst✝¹ : LeftCancelMonoid M\ninst✝ : Fintype M\nS : Set M\nhS1 : Set.Nonempty S\nhS2 : S * S = S\npow_mem : ∀ (a : M), a ∈ S → ∀ (n : ℕ), a ^ (n + 1) ∈ S\n⊢ 1 ∈ { carrier := S, mul_mem' := (_ : ∀ {a b : M}, a ∈ S → b ∈ S → a * b ∈ S) }.carrier\n[PROOFSTEP]\nobtain ⟨a, ha⟩ := hS1\n[GOAL]\ncase intro\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\nM : Type u_6\ninst✝¹ : LeftCancelMonoid M\ninst✝ : Fintype M\nS : Set M\nhS2 : S * S = S\npow_mem : ∀ (a : M), a ∈ S → ∀ (n : ℕ), a ^ (n + 1) ∈ S\na : M\nha : a ∈ S\n⊢ 1 ∈ { carrier := S, mul_mem' := (_ : ∀ {a b : M}, a ∈ S → b ∈ S → a * b ∈ S) }.carrier\n[PROOFSTEP]\nrw [← pow_orderOf_eq_one a, ← tsub_add_cancel_of_le (succ_le_of_lt (orderOf_pos a))]\n[GOAL]\ncase intro\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\nM : Type u_6\ninst✝¹ : LeftCancelMonoid M\ninst✝ : Fintype M\nS : Set M\nhS2 : S * S = S\npow_mem : ∀ (a : M), a ∈ S → ∀ (n : ℕ), a ^ (n + 1) ∈ S\na : M\nha : a ∈ S\n⊢ a ^ (orderOf a - succ 0 + succ 0) ∈ { carrier := S, mul_mem' := (_ : ∀ {a b : M}, a ∈ S → b ∈ S → a * b ∈ S) }.carrier\n[PROOFSTEP]\nexact pow_mem a ha (orderOf a - 1)\n[GOAL]\nG✝ : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\nG : Type u_6\ninst✝¹ : Group G\ninst✝ : Fintype G\nS : Set G\nhS1 : Set.Nonempty S\nhS2 : S * S = S\nsrc✝ : Submonoid G := submonoidOfIdempotent S hS1 hS2\na : G\nha :\n  a ∈\n    {\n          toSubsemigroup :=\n            { carrier := S, mul_mem' := (_ : ∀ {a b : G}, a ∈ src✝.carrier → b ∈ src✝.carrier → a * b ∈ src✝.carrier) },\n          one_mem' := (_ : 1 ∈ src✝.carrier) }.toSubsemigroup.carrier\n⊢ a⁻¹ ∈ submonoidOfIdempotent S hS1 hS2\n[PROOFSTEP]\nrw [← one_mul a⁻¹, ← pow_one a, ← pow_orderOf_eq_one a, ← pow_sub a (orderOf_pos a)]\n[GOAL]\nG✝ : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\nG : Type u_6\ninst✝¹ : Group G\ninst✝ : Fintype G\nS : Set G\nhS1 : Set.Nonempty S\nhS2 : S * S = S\nsrc✝ : Submonoid G := submonoidOfIdempotent S hS1 hS2\na : G\nha :\n  a ∈\n    {\n          toSubsemigroup :=\n            { carrier := S, mul_mem' := (_ : ∀ {a b : G}, a ∈ src✝.carrier → b ∈ src✝.carrier → a * b ∈ src✝.carrier) },\n          one_mem' := (_ : 1 ∈ src✝.carrier) }.toSubsemigroup.carrier\n⊢ a ^ (orderOf a - succ 0) ∈ submonoidOfIdempotent S hS1 hS2\n[PROOFSTEP]\nexact pow_mem ha (orderOf a - 1)\n[GOAL]\nG✝ : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\nG : Type u_6\ninst✝¹ : Group G\ninst✝ : Fintype G\nS : Set G\nhS : Set.Nonempty S\n⊢ 1 ∈ S ^ Fintype.card G\n[PROOFSTEP]\nobtain ⟨a, ha⟩ := hS\n[GOAL]\ncase intro\nG✝ : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\nG : Type u_6\ninst✝¹ : Group G\ninst✝ : Fintype G\nS : Set G\na : G\nha : a ∈ S\n⊢ 1 ∈ S ^ Fintype.card G\n[PROOFSTEP]\nrw [← pow_card_eq_one]\n[GOAL]\ncase intro\nG✝ : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\nG : Type u_6\ninst✝¹ : Group G\ninst✝ : Fintype G\nS : Set G\na : G\nha : a ∈ S\n⊢ ?m.1815695 ^ Fintype.card G ∈ S ^ Fintype.card G\nG✝ : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\nG : Type u_6\ninst✝¹ : Group G\ninst✝ : Fintype G\nS : Set G\na : G\nha : a ∈ S\n⊢ G\n[PROOFSTEP]\nexact Set.pow_mem_pow ha (Fintype.card G)\n[GOAL]\nG✝ : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\nG : Type u_6\ninst✝¹ : Group G\ninst✝ : Fintype G\nS : Set G\nhS : Set.Nonempty S\none_mem : 1 ∈ S ^ Fintype.card G\n⊢ S ^ Fintype.card G * S ^ Fintype.card G = S ^ Fintype.card G\n[PROOFSTEP]\nclassical!\n[GOAL]\nG✝ : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\nG : Type u_6\ninst✝¹ : Group G\ninst✝ : Fintype G\nS : Set G\nhS : Set.Nonempty S\none_mem : 1 ∈ S ^ Fintype.card G\nem✝ : (a : Prop) → Decidable a\n⊢ S ^ Fintype.card G * S ^ Fintype.card G = S ^ Fintype.card G\n[PROOFSTEP]\napply (Set.eq_of_subset_of_card_le (Set.subset_mul_left _ one_mem) (ge_of_eq _)).symm\n[GOAL]\nG✝ : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\nG : Type u_6\ninst✝¹ : Group G\ninst✝ : Fintype G\nS : Set G\nhS : Set.Nonempty S\none_mem : 1 ∈ S ^ Fintype.card G\nem✝ : (a : Prop) → Decidable a\n⊢ Fintype.card ↑(S ^ Fintype.card G) = Fintype.card ↑(S ^ Fintype.card G * S ^ Fintype.card G)\n[PROOFSTEP]\nsimp_rw [← pow_add, Group.card_pow_eq_card_pow_card_univ S (Fintype.card G + Fintype.card G) le_add_self]\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝ : LinearOrderedRing G\nx : G\nh : |x| ≠ 1\n⊢ orderOf x = 0\n[PROOFSTEP]\nrw [orderOf_eq_zero_iff']\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝ : LinearOrderedRing G\nx : G\nh : |x| ≠ 1\n⊢ ∀ (n : ℕ), 0 < n → x ^ n ≠ 1\n[PROOFSTEP]\nintro n hn hx\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝ : LinearOrderedRing G\nx : G\nh : |x| ≠ 1\nn : ℕ\nhn : 0 < n\nhx : x ^ n = 1\n⊢ False\n[PROOFSTEP]\nreplace hx : |x| ^ n = 1 := by simpa only [abs_one, abs_pow] using congr_arg abs hx\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝ : LinearOrderedRing G\nx : G\nh : |x| ≠ 1\nn : ℕ\nhn : 0 < n\nhx : x ^ n = 1\n⊢ |x| ^ n = 1\n[PROOFSTEP]\nsimpa only [abs_one, abs_pow] using congr_arg abs hx\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝ : LinearOrderedRing G\nx : G\nh : |x| ≠ 1\nn : ℕ\nhn : 0 < n\nhx : |x| ^ n = 1\n⊢ False\n[PROOFSTEP]\ncases' h.lt_or_lt with h h\n[GOAL]\ncase inl\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝ : LinearOrderedRing G\nx : G\nh✝ : |x| ≠ 1\nn : ℕ\nhn : 0 < n\nhx : |x| ^ n = 1\nh : |x| < 1\n⊢ False\n[PROOFSTEP]\nexact ((pow_lt_one (abs_nonneg x) h hn.ne').ne hx).elim\n[GOAL]\ncase inr\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝ : LinearOrderedRing G\nx : G\nh✝ : |x| ≠ 1\nn : ℕ\nhn : 0 < n\nhx : |x| ^ n = 1\nh : 1 < |x|\n⊢ False\n[PROOFSTEP]\nexact ((one_lt_pow h hn.ne').ne' hx).elim\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝ : LinearOrderedRing G\nx : G\n⊢ orderOf x ≤ 2\n[PROOFSTEP]\ncases' ne_or_eq |x| 1 with h h\n[GOAL]\ncase inl\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝ : LinearOrderedRing G\nx : G\nh : |x| ≠ 1\n⊢ orderOf x ≤ 2\n[PROOFSTEP]\nsimp [orderOf_abs_ne_one h]\n[GOAL]\ncase inr\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝ : LinearOrderedRing G\nx : G\nh : |x| = 1\n⊢ orderOf x ≤ 2\n[PROOFSTEP]\nrcases eq_or_eq_neg_of_abs_eq h with (rfl | rfl)\n[GOAL]\ncase inr.inl\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝ : LinearOrderedRing G\nh : |1| = 1\n⊢ orderOf 1 ≤ 2\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr.inr\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝ : LinearOrderedRing G\nh : |(-1)| = 1\n⊢ orderOf (-1) ≤ 2\n[PROOFSTEP]\napply orderOf_le_of_pow_eq_one\n[GOAL]\ncase inr.inr.hn\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝ : LinearOrderedRing G\nh : |(-1)| = 1\n⊢ 0 < 2\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase inr.inr.h\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝ : LinearOrderedRing G\nh : |(-1)| = 1\n⊢ (-1) ^ 2 = 1\n[PROOFSTEP]\nnorm_num\n[GOAL]\nG : Type u_1\nH : Type u_2\nA : Type u_3\nα : Type u_4\nβ : Type u_5\ninst✝¹ : Monoid α\ninst✝ : Monoid β\nx : α × β\na : α\nb : β\n⊢ IsOfFinOrder a → IsOfFinOrder b → IsOfFinOrder (a, b)\n[PROOFSTEP]\nsimpa only [← orderOf_pos_iff, Prod.orderOf] using Nat.lcm_pos\n", "meta": {"mathlib_filename": "Mathlib.GroupTheory.OrderOfElement", "llama_tokens": 42156, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7606506526772884, "lm_q2_score": 0.6584175072643413, "lm_q1q2_score": 0.5008257066347745}}
{"text": "[GOAL]\nR : Type u\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\ninst✝ : Nontrivial R\ni j : ℕ\n⊢ ↑(monomial i) 1 = ↑(monomial j) 1 ↔ i = j\n[PROOFSTEP]\nsimp_rw [← ofFinsupp_single, ofFinsupp.injEq]\n[GOAL]\nR : Type u\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\ninst✝ : Nontrivial R\ni j : ℕ\n⊢ Finsupp.single i 1 = Finsupp.single j 1 ↔ i = j\n[PROOFSTEP]\nexact AddMonoidAlgebra.of_injective.eq_iff\n[GOAL]\nR : Type u\na b : R\nm✝ n✝ : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\ninst✝ : Nontrivial R\nm n : ℕ\nh : (fun i => ↑(monomial i) 1) m = (fun i => ↑(monomial i) 1) n\n⊢ m = n\n[PROOFSTEP]\nsimpa [monomial_one_eq_iff] using h\n[GOAL]\nR : Type u\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q r f : R[X]\n⊢ Finset.card (support f) ≤ 1 ↔ ∃ n a, f = ↑(monomial n) a\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nR : Type u\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q r f : R[X]\n⊢ Finset.card (support f) ≤ 1 → ∃ n a, f = ↑(monomial n) a\n[PROOFSTEP]\nintro H\n[GOAL]\ncase mp\nR : Type u\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q r f : R[X]\nH : Finset.card (support f) ≤ 1\n⊢ ∃ n a, f = ↑(monomial n) a\n[PROOFSTEP]\nrw [Finset.card_le_one_iff_subset_singleton] at H \n[GOAL]\ncase mp\nR : Type u\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q r f : R[X]\nH : ∃ x, support f ⊆ {x}\n⊢ ∃ n a, f = ↑(monomial n) a\n[PROOFSTEP]\nrcases H with ⟨n, hn⟩\n[GOAL]\ncase mp.intro\nR : Type u\na b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np q r f : R[X]\nn : ℕ\nhn : support f ⊆ {n}\n⊢ ∃ n a, f = ↑(monomial n) a\n[PROOFSTEP]\nrefine' ⟨n, f.coeff n, _⟩\n[GOAL]\ncase mp.intro\nR : Type u\na b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np q r f : R[X]\nn : ℕ\nhn : support f ⊆ {n}\n⊢ f = ↑(monomial n) (coeff f n)\n[PROOFSTEP]\next i\n[GOAL]\ncase mp.intro.a\nR : Type u\na b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np q r f : R[X]\nn : ℕ\nhn : support f ⊆ {n}\ni : ℕ\n⊢ coeff f i = coeff (↑(monomial n) (coeff f n)) i\n[PROOFSTEP]\nby_cases hi : i = n\n[GOAL]\ncase pos\nR : Type u\na b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np q r f : R[X]\nn : ℕ\nhn : support f ⊆ {n}\ni : ℕ\nhi : i = n\n⊢ coeff f i = coeff (↑(monomial n) (coeff f n)) i\n[PROOFSTEP]\nsimp [hi, coeff_monomial]\n[GOAL]\ncase neg\nR : Type u\na b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np q r f : R[X]\nn : ℕ\nhn : support f ⊆ {n}\ni : ℕ\nhi : ¬i = n\n⊢ coeff f i = coeff (↑(monomial n) (coeff f n)) i\n[PROOFSTEP]\nhave : f.coeff i = 0 := by\n  rw [← not_mem_support_iff]\n  exact fun hi' => hi (Finset.mem_singleton.1 (hn hi'))\n[GOAL]\nR : Type u\na b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np q r f : R[X]\nn : ℕ\nhn : support f ⊆ {n}\ni : ℕ\nhi : ¬i = n\n⊢ coeff f i = 0\n[PROOFSTEP]\nrw [← not_mem_support_iff]\n[GOAL]\nR : Type u\na b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np q r f : R[X]\nn : ℕ\nhn : support f ⊆ {n}\ni : ℕ\nhi : ¬i = n\n⊢ ¬i ∈ support f\n[PROOFSTEP]\nexact fun hi' => hi (Finset.mem_singleton.1 (hn hi'))\n[GOAL]\ncase neg\nR : Type u\na b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np q r f : R[X]\nn : ℕ\nhn : support f ⊆ {n}\ni : ℕ\nhi : ¬i = n\nthis : coeff f i = 0\n⊢ coeff f i = coeff (↑(monomial n) (coeff f n)) i\n[PROOFSTEP]\nsimp [this, Ne.symm hi, coeff_monomial]\n[GOAL]\ncase mpr\nR : Type u\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q r f : R[X]\n⊢ (∃ n a, f = ↑(monomial n) a) → Finset.card (support f) ≤ 1\n[PROOFSTEP]\nrintro ⟨n, a, rfl⟩\n[GOAL]\ncase mpr.intro.intro\nR : Type u\na✝ b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np q r : R[X]\nn : ℕ\na : R\n⊢ Finset.card (support (↑(monomial n) a)) ≤ 1\n[PROOFSTEP]\nrw [← Finset.card_singleton n]\n[GOAL]\ncase mpr.intro.intro\nR : Type u\na✝ b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np q r : R[X]\nn : ℕ\na : R\n⊢ Finset.card (support (↑(monomial n) a)) ≤ Finset.card {n}\n[PROOFSTEP]\napply Finset.card_le_of_subset\n[GOAL]\ncase mpr.intro.intro.a\nR : Type u\na✝ b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np q r : R[X]\nn : ℕ\na : R\n⊢ support (↑(monomial n) a) ⊆ {n}\n[PROOFSTEP]\nexact support_monomial' _ _\n[GOAL]\nR : Type u\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\nS : Type u_1\ninst✝ : Semiring S\nf g : R[X] →+* S\nh₁ : ∀ (a : R), ↑f (↑C a) = ↑g (↑C a)\nh₂ : ↑f X = ↑g X\n⊢ f = g\n[PROOFSTEP]\nset f' := f.comp (toFinsuppIso R).symm.toRingHom with hf'\n[GOAL]\nR : Type u\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\nS : Type u_1\ninst✝ : Semiring S\nf g : R[X] →+* S\nh₁ : ∀ (a : R), ↑f (↑C a) = ↑g (↑C a)\nh₂ : ↑f X = ↑g X\nf' : AddMonoidAlgebra R ℕ →+* S := RingHom.comp f (RingEquiv.toRingHom (RingEquiv.symm (toFinsuppIso R)))\nhf' : f' = RingHom.comp f (RingEquiv.toRingHom (RingEquiv.symm (toFinsuppIso R)))\n⊢ f = g\n[PROOFSTEP]\nset g' := g.comp (toFinsuppIso R).symm.toRingHom with hg'\n[GOAL]\nR : Type u\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\nS : Type u_1\ninst✝ : Semiring S\nf g : R[X] →+* S\nh₁ : ∀ (a : R), ↑f (↑C a) = ↑g (↑C a)\nh₂ : ↑f X = ↑g X\nf' : AddMonoidAlgebra R ℕ →+* S := RingHom.comp f (RingEquiv.toRingHom (RingEquiv.symm (toFinsuppIso R)))\nhf' : f' = RingHom.comp f (RingEquiv.toRingHom (RingEquiv.symm (toFinsuppIso R)))\ng' : AddMonoidAlgebra R ℕ →+* S := RingHom.comp g (RingEquiv.toRingHom (RingEquiv.symm (toFinsuppIso R)))\nhg' : g' = RingHom.comp g (RingEquiv.toRingHom (RingEquiv.symm (toFinsuppIso R)))\n⊢ f = g\n[PROOFSTEP]\nhave A : f' = g' := by\n  -- Porting note: Was `ext; simp [..]; simpa [..] using h₂`.\n  ext : 1\n  · ext\n    simp [h₁, RingEquiv.toRingHom_eq_coe]\n  · refine MonoidHom.ext_mnat ?_\n    simpa [RingEquiv.toRingHom_eq_coe] using h₂\n[GOAL]\nR : Type u\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\nS : Type u_1\ninst✝ : Semiring S\nf g : R[X] →+* S\nh₁ : ∀ (a : R), ↑f (↑C a) = ↑g (↑C a)\nh₂ : ↑f X = ↑g X\nf' : AddMonoidAlgebra R ℕ →+* S := RingHom.comp f (RingEquiv.toRingHom (RingEquiv.symm (toFinsuppIso R)))\nhf' : f' = RingHom.comp f (RingEquiv.toRingHom (RingEquiv.symm (toFinsuppIso R)))\ng' : AddMonoidAlgebra R ℕ →+* S := RingHom.comp g (RingEquiv.toRingHom (RingEquiv.symm (toFinsuppIso R)))\nhg' : g' = RingHom.comp g (RingEquiv.toRingHom (RingEquiv.symm (toFinsuppIso R)))\n⊢ f' = g'\n[PROOFSTEP]\next : 1\n[GOAL]\ncase h₁\nR : Type u\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\nS : Type u_1\ninst✝ : Semiring S\nf g : R[X] →+* S\nh₁ : ∀ (a : R), ↑f (↑C a) = ↑g (↑C a)\nh₂ : ↑f X = ↑g X\nf' : AddMonoidAlgebra R ℕ →+* S := RingHom.comp f (RingEquiv.toRingHom (RingEquiv.symm (toFinsuppIso R)))\nhf' : f' = RingHom.comp f (RingEquiv.toRingHom (RingEquiv.symm (toFinsuppIso R)))\ng' : AddMonoidAlgebra R ℕ →+* S := RingHom.comp g (RingEquiv.toRingHom (RingEquiv.symm (toFinsuppIso R)))\nhg' : g' = RingHom.comp g (RingEquiv.toRingHom (RingEquiv.symm (toFinsuppIso R)))\n⊢ RingHom.comp f' AddMonoidAlgebra.singleZeroRingHom = RingHom.comp g' AddMonoidAlgebra.singleZeroRingHom\n[PROOFSTEP]\next\n[GOAL]\ncase h₁.a\nR : Type u\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\nS : Type u_1\ninst✝ : Semiring S\nf g : R[X] →+* S\nh₁ : ∀ (a : R), ↑f (↑C a) = ↑g (↑C a)\nh₂ : ↑f X = ↑g X\nf' : AddMonoidAlgebra R ℕ →+* S := RingHom.comp f (RingEquiv.toRingHom (RingEquiv.symm (toFinsuppIso R)))\nhf' : f' = RingHom.comp f (RingEquiv.toRingHom (RingEquiv.symm (toFinsuppIso R)))\ng' : AddMonoidAlgebra R ℕ →+* S := RingHom.comp g (RingEquiv.toRingHom (RingEquiv.symm (toFinsuppIso R)))\nhg' : g' = RingHom.comp g (RingEquiv.toRingHom (RingEquiv.symm (toFinsuppIso R)))\nx✝ : R\n⊢ ↑(RingHom.comp f' AddMonoidAlgebra.singleZeroRingHom) x✝ = ↑(RingHom.comp g' AddMonoidAlgebra.singleZeroRingHom) x✝\n[PROOFSTEP]\nsimp [h₁, RingEquiv.toRingHom_eq_coe]\n[GOAL]\ncase h_of\nR : Type u\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\nS : Type u_1\ninst✝ : Semiring S\nf g : R[X] →+* S\nh₁ : ∀ (a : R), ↑f (↑C a) = ↑g (↑C a)\nh₂ : ↑f X = ↑g X\nf' : AddMonoidAlgebra R ℕ →+* S := RingHom.comp f (RingEquiv.toRingHom (RingEquiv.symm (toFinsuppIso R)))\nhf' : f' = RingHom.comp f (RingEquiv.toRingHom (RingEquiv.symm (toFinsuppIso R)))\ng' : AddMonoidAlgebra R ℕ →+* S := RingHom.comp g (RingEquiv.toRingHom (RingEquiv.symm (toFinsuppIso R)))\nhg' : g' = RingHom.comp g (RingEquiv.toRingHom (RingEquiv.symm (toFinsuppIso R)))\n⊢ MonoidHom.comp (↑f') (AddMonoidAlgebra.of R ℕ) = MonoidHom.comp (↑g') (AddMonoidAlgebra.of R ℕ)\n[PROOFSTEP]\nrefine MonoidHom.ext_mnat ?_\n[GOAL]\ncase h_of\nR : Type u\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\nS : Type u_1\ninst✝ : Semiring S\nf g : R[X] →+* S\nh₁ : ∀ (a : R), ↑f (↑C a) = ↑g (↑C a)\nh₂ : ↑f X = ↑g X\nf' : AddMonoidAlgebra R ℕ →+* S := RingHom.comp f (RingEquiv.toRingHom (RingEquiv.symm (toFinsuppIso R)))\nhf' : f' = RingHom.comp f (RingEquiv.toRingHom (RingEquiv.symm (toFinsuppIso R)))\ng' : AddMonoidAlgebra R ℕ →+* S := RingHom.comp g (RingEquiv.toRingHom (RingEquiv.symm (toFinsuppIso R)))\nhg' : g' = RingHom.comp g (RingEquiv.toRingHom (RingEquiv.symm (toFinsuppIso R)))\n⊢ ↑(MonoidHom.comp (↑f') (AddMonoidAlgebra.of R ℕ)) (↑Multiplicative.ofAdd 1) =\n    ↑(MonoidHom.comp (↑g') (AddMonoidAlgebra.of R ℕ)) (↑Multiplicative.ofAdd 1)\n[PROOFSTEP]\nsimpa [RingEquiv.toRingHom_eq_coe] using h₂\n[GOAL]\nR : Type u\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\nS : Type u_1\ninst✝ : Semiring S\nf g : R[X] →+* S\nh₁ : ∀ (a : R), ↑f (↑C a) = ↑g (↑C a)\nh₂ : ↑f X = ↑g X\nf' : AddMonoidAlgebra R ℕ →+* S := RingHom.comp f (RingEquiv.toRingHom (RingEquiv.symm (toFinsuppIso R)))\nhf' : f' = RingHom.comp f (RingEquiv.toRingHom (RingEquiv.symm (toFinsuppIso R)))\ng' : AddMonoidAlgebra R ℕ →+* S := RingHom.comp g (RingEquiv.toRingHom (RingEquiv.symm (toFinsuppIso R)))\nhg' : g' = RingHom.comp g (RingEquiv.toRingHom (RingEquiv.symm (toFinsuppIso R)))\nA : f' = g'\n⊢ f = g\n[PROOFSTEP]\nhave B : f = f'.comp (toFinsuppIso R) := by\n  rw [hf', RingHom.comp_assoc]\n  ext x\n  simp only [RingEquiv.toRingHom_eq_coe, RingEquiv.symm_apply_apply, Function.comp_apply, RingHom.coe_comp,\n    RingEquiv.coe_toRingHom]\n[GOAL]\nR : Type u\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\nS : Type u_1\ninst✝ : Semiring S\nf g : R[X] →+* S\nh₁ : ∀ (a : R), ↑f (↑C a) = ↑g (↑C a)\nh₂ : ↑f X = ↑g X\nf' : AddMonoidAlgebra R ℕ →+* S := RingHom.comp f (RingEquiv.toRingHom (RingEquiv.symm (toFinsuppIso R)))\nhf' : f' = RingHom.comp f (RingEquiv.toRingHom (RingEquiv.symm (toFinsuppIso R)))\ng' : AddMonoidAlgebra R ℕ →+* S := RingHom.comp g (RingEquiv.toRingHom (RingEquiv.symm (toFinsuppIso R)))\nhg' : g' = RingHom.comp g (RingEquiv.toRingHom (RingEquiv.symm (toFinsuppIso R)))\nA : f' = g'\n⊢ f = RingHom.comp f' ↑(toFinsuppIso R)\n[PROOFSTEP]\nrw [hf', RingHom.comp_assoc]\n[GOAL]\nR : Type u\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\nS : Type u_1\ninst✝ : Semiring S\nf g : R[X] →+* S\nh₁ : ∀ (a : R), ↑f (↑C a) = ↑g (↑C a)\nh₂ : ↑f X = ↑g X\nf' : AddMonoidAlgebra R ℕ →+* S := RingHom.comp f (RingEquiv.toRingHom (RingEquiv.symm (toFinsuppIso R)))\nhf' : f' = RingHom.comp f (RingEquiv.toRingHom (RingEquiv.symm (toFinsuppIso R)))\ng' : AddMonoidAlgebra R ℕ →+* S := RingHom.comp g (RingEquiv.toRingHom (RingEquiv.symm (toFinsuppIso R)))\nhg' : g' = RingHom.comp g (RingEquiv.toRingHom (RingEquiv.symm (toFinsuppIso R)))\nA : f' = g'\n⊢ f = RingHom.comp f (RingHom.comp (RingEquiv.toRingHom (RingEquiv.symm (toFinsuppIso R))) ↑(toFinsuppIso R))\n[PROOFSTEP]\next x\n[GOAL]\ncase a\nR : Type u\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\nS : Type u_1\ninst✝ : Semiring S\nf g : R[X] →+* S\nh₁ : ∀ (a : R), ↑f (↑C a) = ↑g (↑C a)\nh₂ : ↑f X = ↑g X\nf' : AddMonoidAlgebra R ℕ →+* S := RingHom.comp f (RingEquiv.toRingHom (RingEquiv.symm (toFinsuppIso R)))\nhf' : f' = RingHom.comp f (RingEquiv.toRingHom (RingEquiv.symm (toFinsuppIso R)))\ng' : AddMonoidAlgebra R ℕ →+* S := RingHom.comp g (RingEquiv.toRingHom (RingEquiv.symm (toFinsuppIso R)))\nhg' : g' = RingHom.comp g (RingEquiv.toRingHom (RingEquiv.symm (toFinsuppIso R)))\nA : f' = g'\nx : R[X]\n⊢ ↑f x = ↑(RingHom.comp f (RingHom.comp (RingEquiv.toRingHom (RingEquiv.symm (toFinsuppIso R))) ↑(toFinsuppIso R))) x\n[PROOFSTEP]\nsimp only [RingEquiv.toRingHom_eq_coe, RingEquiv.symm_apply_apply, Function.comp_apply, RingHom.coe_comp,\n  RingEquiv.coe_toRingHom]\n[GOAL]\nR : Type u\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\nS : Type u_1\ninst✝ : Semiring S\nf g : R[X] →+* S\nh₁ : ∀ (a : R), ↑f (↑C a) = ↑g (↑C a)\nh₂ : ↑f X = ↑g X\nf' : AddMonoidAlgebra R ℕ →+* S := RingHom.comp f (RingEquiv.toRingHom (RingEquiv.symm (toFinsuppIso R)))\nhf' : f' = RingHom.comp f (RingEquiv.toRingHom (RingEquiv.symm (toFinsuppIso R)))\ng' : AddMonoidAlgebra R ℕ →+* S := RingHom.comp g (RingEquiv.toRingHom (RingEquiv.symm (toFinsuppIso R)))\nhg' : g' = RingHom.comp g (RingEquiv.toRingHom (RingEquiv.symm (toFinsuppIso R)))\nA : f' = g'\nB : f = RingHom.comp f' ↑(toFinsuppIso R)\n⊢ f = g\n[PROOFSTEP]\nhave C' : g = g'.comp (toFinsuppIso R) := by\n  rw [hg', RingHom.comp_assoc]\n  ext x\n  simp only [RingEquiv.toRingHom_eq_coe, RingEquiv.symm_apply_apply, Function.comp_apply, RingHom.coe_comp,\n    RingEquiv.coe_toRingHom]\n[GOAL]\nR : Type u\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\nS : Type u_1\ninst✝ : Semiring S\nf g : R[X] →+* S\nh₁ : ∀ (a : R), ↑f (↑C a) = ↑g (↑C a)\nh₂ : ↑f X = ↑g X\nf' : AddMonoidAlgebra R ℕ →+* S := RingHom.comp f (RingEquiv.toRingHom (RingEquiv.symm (toFinsuppIso R)))\nhf' : f' = RingHom.comp f (RingEquiv.toRingHom (RingEquiv.symm (toFinsuppIso R)))\ng' : AddMonoidAlgebra R ℕ →+* S := RingHom.comp g (RingEquiv.toRingHom (RingEquiv.symm (toFinsuppIso R)))\nhg' : g' = RingHom.comp g (RingEquiv.toRingHom (RingEquiv.symm (toFinsuppIso R)))\nA : f' = g'\nB : f = RingHom.comp f' ↑(toFinsuppIso R)\n⊢ g = RingHom.comp g' ↑(toFinsuppIso R)\n[PROOFSTEP]\nrw [hg', RingHom.comp_assoc]\n[GOAL]\nR : Type u\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\nS : Type u_1\ninst✝ : Semiring S\nf g : R[X] →+* S\nh₁ : ∀ (a : R), ↑f (↑C a) = ↑g (↑C a)\nh₂ : ↑f X = ↑g X\nf' : AddMonoidAlgebra R ℕ →+* S := RingHom.comp f (RingEquiv.toRingHom (RingEquiv.symm (toFinsuppIso R)))\nhf' : f' = RingHom.comp f (RingEquiv.toRingHom (RingEquiv.symm (toFinsuppIso R)))\ng' : AddMonoidAlgebra R ℕ →+* S := RingHom.comp g (RingEquiv.toRingHom (RingEquiv.symm (toFinsuppIso R)))\nhg' : g' = RingHom.comp g (RingEquiv.toRingHom (RingEquiv.symm (toFinsuppIso R)))\nA : f' = g'\nB : f = RingHom.comp f' ↑(toFinsuppIso R)\n⊢ g = RingHom.comp g (RingHom.comp (RingEquiv.toRingHom (RingEquiv.symm (toFinsuppIso R))) ↑(toFinsuppIso R))\n[PROOFSTEP]\next x\n[GOAL]\ncase a\nR : Type u\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\nS : Type u_1\ninst✝ : Semiring S\nf g : R[X] →+* S\nh₁ : ∀ (a : R), ↑f (↑C a) = ↑g (↑C a)\nh₂ : ↑f X = ↑g X\nf' : AddMonoidAlgebra R ℕ →+* S := RingHom.comp f (RingEquiv.toRingHom (RingEquiv.symm (toFinsuppIso R)))\nhf' : f' = RingHom.comp f (RingEquiv.toRingHom (RingEquiv.symm (toFinsuppIso R)))\ng' : AddMonoidAlgebra R ℕ →+* S := RingHom.comp g (RingEquiv.toRingHom (RingEquiv.symm (toFinsuppIso R)))\nhg' : g' = RingHom.comp g (RingEquiv.toRingHom (RingEquiv.symm (toFinsuppIso R)))\nA : f' = g'\nB : f = RingHom.comp f' ↑(toFinsuppIso R)\nx : R[X]\n⊢ ↑g x = ↑(RingHom.comp g (RingHom.comp (RingEquiv.toRingHom (RingEquiv.symm (toFinsuppIso R))) ↑(toFinsuppIso R))) x\n[PROOFSTEP]\nsimp only [RingEquiv.toRingHom_eq_coe, RingEquiv.symm_apply_apply, Function.comp_apply, RingHom.coe_comp,\n  RingEquiv.coe_toRingHom]\n[GOAL]\nR : Type u\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q r : R[X]\nS : Type u_1\ninst✝ : Semiring S\nf g : R[X] →+* S\nh₁ : ∀ (a : R), ↑f (↑C a) = ↑g (↑C a)\nh₂ : ↑f X = ↑g X\nf' : AddMonoidAlgebra R ℕ →+* S := RingHom.comp f (RingEquiv.toRingHom (RingEquiv.symm (toFinsuppIso R)))\nhf' : f' = RingHom.comp f (RingEquiv.toRingHom (RingEquiv.symm (toFinsuppIso R)))\ng' : AddMonoidAlgebra R ℕ →+* S := RingHom.comp g (RingEquiv.toRingHom (RingEquiv.symm (toFinsuppIso R)))\nhg' : g' = RingHom.comp g (RingEquiv.toRingHom (RingEquiv.symm (toFinsuppIso R)))\nA : f' = g'\nB : f = RingHom.comp f' ↑(toFinsuppIso R)\nC' : g = RingHom.comp g' ↑(toFinsuppIso R)\n⊢ f = g\n[PROOFSTEP]\nrw [B, C', A]\n", "meta": {"mathlib_filename": "Mathlib.Data.Polynomial.Monomial", "llama_tokens": 8128, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7606506418255927, "lm_q2_score": 0.6584175139669997, "lm_q1q2_score": 0.5008257045882094}}
{"text": "[GOAL]\nα : Type u_1\ninst✝¹ : PartialOrder α\ninst✝ : OrderBot α\na b c d : α\nha : a ≠ ⊥\nhab : Disjoint a b\nh : a = b\n⊢ Disjoint a a\n[PROOFSTEP]\nrwa [← h] at hab \n[GOAL]\nα : Type u_1\ninst✝¹ : SemilatticeInf α\ninst✝ : OrderBot α\na b c d : α\n⊢ Disjoint (a ⊓ b) c ↔ Disjoint a (b ⊓ c)\n[PROOFSTEP]\nrw [disjoint_iff_inf_le, disjoint_iff_inf_le, inf_assoc]\n[GOAL]\nα : Type u_1\ninst✝¹ : SemilatticeInf α\ninst✝ : OrderBot α\na b c d : α\n⊢ Disjoint a (b ⊓ c) ↔ Disjoint b (a ⊓ c)\n[PROOFSTEP]\nsimp_rw [disjoint_iff_inf_le, inf_left_comm]\n[GOAL]\nα : Type u_1\ninst✝¹ : SemilatticeInf α\ninst✝ : OrderBot α\na b c d : α\n⊢ Disjoint (a ⊓ b) c ↔ Disjoint (a ⊓ c) b\n[PROOFSTEP]\nsimp_rw [disjoint_iff_inf_le, inf_right_comm]\n[GOAL]\nα : Type u_1\ninst✝¹ : DistribLattice α\ninst✝ : OrderBot α\na b c : α\n⊢ Disjoint (a ⊔ b) c ↔ Disjoint a c ∧ Disjoint b c\n[PROOFSTEP]\nsimp only [disjoint_iff, inf_sup_right, sup_eq_bot_iff]\n[GOAL]\nα : Type u_1\ninst✝¹ : DistribLattice α\ninst✝ : OrderBot α\na b c : α\n⊢ Disjoint a (b ⊔ c) ↔ Disjoint a b ∧ Disjoint a c\n[PROOFSTEP]\nsimp only [disjoint_iff, inf_sup_left, sup_eq_bot_iff]\n[GOAL]\nα : Type u_1\ninst✝¹ : DistribLattice α\ninst✝ : OrderBot α\na b c : α\nh : a ≤ c ⊔ b\nhd : Disjoint a c\n⊢ a ≤ b ⊔ c\n[PROOFSTEP]\nrwa [sup_comm]\n[GOAL]\nα : Type u_1\ninst✝¹ : PartialOrder α\ninst✝ : OrderTop α\na b c d : α\nha : a ≠ ⊤\nhab : Codisjoint a b\nh : a = b\n⊢ Codisjoint a a\n[PROOFSTEP]\nrwa [← h] at hab \n[GOAL]\nα : Type u_1\ninst✝¹ : DistribLattice α\ninst✝ : OrderTop α\na b c : α\n⊢ Codisjoint (a ⊓ b) c ↔ Codisjoint a c ∧ Codisjoint b c\n[PROOFSTEP]\nsimp only [codisjoint_iff, sup_inf_right, inf_eq_top_iff]\n[GOAL]\nα : Type u_1\ninst✝¹ : DistribLattice α\ninst✝ : OrderTop α\na b c : α\n⊢ Codisjoint a (b ⊓ c) ↔ Codisjoint a b ∧ Codisjoint a c\n[PROOFSTEP]\nsimp only [codisjoint_iff, sup_inf_left, inf_eq_top_iff]\n[GOAL]\nα : Type u_1\ninst✝¹ : DistribLattice α\ninst✝ : OrderTop α\na b c : α\nh : b ⊓ a ≤ c\nhd : Codisjoint b c\n⊢ a ⊓ b ≤ c\n[PROOFSTEP]\nrwa [inf_comm]\n[GOAL]\nα : Type u_1\ninst✝¹ : DistribLattice α\ninst✝ : BoundedOrder α\na b c : α\nhab : Disjoint a b\nhbc : Codisjoint b c\n⊢ a ≤ c\n[PROOFSTEP]\nrw [← @inf_top_eq _ _ _ a, ← @bot_sup_eq _ _ _ c, ← hab.eq_bot, ← hbc.eq_top, sup_inf_right]\n[GOAL]\nα : Type u_1\ninst✝¹ : DistribLattice α\ninst✝ : BoundedOrder α\na b c : α\nhab : Disjoint a b\nhbc : Codisjoint b c\n⊢ a ⊓ (b ⊔ c) ≤ (a ⊔ c) ⊓ (b ⊔ c)\n[PROOFSTEP]\nexact inf_le_inf_right _ le_sup_left\n[GOAL]\nα : Type u_1\ninst✝¹ : DistribLattice α\ninst✝ : BoundedOrder α\na b x y z : α\nh : IsCompl x y\nhle : a ≤ b ⊔ y\n⊢ b ⊓ x ⊔ y ⊓ x = b ⊓ x\n[PROOFSTEP]\nrw [h.symm.inf_eq_bot, sup_bot_eq]\n[GOAL]\nα : Type u_1\ninst✝¹ : DistribLattice α\ninst✝ : BoundedOrder α\na b x y z : α\nh : IsCompl y z\n⊢ x ⊓ y = ⊥ ↔ x ≤ z\n[PROOFSTEP]\nrw [← le_bot_iff, ← h.le_sup_right_iff_inf_left_le, bot_sup_eq]\n[GOAL]\nα : Type u_1\ninst✝¹ : DistribLattice α\ninst✝ : BoundedOrder α\na b x y z : α\nh : IsCompl y z\n⊢ Disjoint x y ↔ x ≤ z\n[PROOFSTEP]\nrw [disjoint_iff]\n[GOAL]\nα : Type u_1\ninst✝¹ : DistribLattice α\ninst✝ : BoundedOrder α\na b x y z : α\nh : IsCompl y z\n⊢ x ⊓ y = ⊥ ↔ x ≤ z\n[PROOFSTEP]\nexact h.inf_left_eq_bot_iff\n[GOAL]\nα : Type u_1\ninst✝¹ : DistribLattice α\ninst✝ : BoundedOrder α\na b x y z x' y' : α\nh : IsCompl x y\nh' : IsCompl x' y'\n⊢ (x ⊔ x') ⊓ (y ⊓ y') = ⊥\n[PROOFSTEP]\nrw [inf_sup_right, ← inf_assoc, h.inf_eq_bot, bot_inf_eq, bot_sup_eq, inf_left_comm, h'.inf_eq_bot, inf_bot_eq]\n[GOAL]\nα : Type u_1\ninst✝¹ : DistribLattice α\ninst✝ : BoundedOrder α\na b x y z x' y' : α\nh : IsCompl x y\nh' : IsCompl x' y'\n⊢ x ⊔ x' ⊔ y ⊓ y' = ⊤\n[PROOFSTEP]\nrw [sup_inf_left, @sup_comm _ _ x, sup_assoc, h.sup_eq_top, sup_top_eq, top_inf_eq, sup_assoc, sup_left_comm,\n  h'.sup_eq_top, sup_top_eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : PartialOrder α\ninst✝² : PartialOrder β\ninst✝¹ : OrderBot α\ninst✝ : OrderBot β\nx y : α × β\n⊢ Disjoint x y ↔ Disjoint x.fst y.fst ∧ Disjoint x.snd y.snd\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type u_1\nβ : Type u_2\ninst✝³ : PartialOrder α\ninst✝² : PartialOrder β\ninst✝¹ : OrderBot α\ninst✝ : OrderBot β\nx y : α × β\n⊢ Disjoint x y → Disjoint x.fst y.fst ∧ Disjoint x.snd y.snd\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nα : Type u_1\nβ : Type u_2\ninst✝³ : PartialOrder α\ninst✝² : PartialOrder β\ninst✝¹ : OrderBot α\ninst✝ : OrderBot β\nx y : α × β\nh : Disjoint x y\n⊢ Disjoint x.fst y.fst ∧ Disjoint x.snd y.snd\n[PROOFSTEP]\nrefine' ⟨fun a hx hy ↦ (@h (a, ⊥) ⟨hx, _⟩ ⟨hy, _⟩).1, fun b hx hy ↦ (@h (⊥, b) ⟨_, hx⟩ ⟨_, hy⟩).2⟩\n[GOAL]\ncase mp.refine'_1\nα : Type u_1\nβ : Type u_2\ninst✝³ : PartialOrder α\ninst✝² : PartialOrder β\ninst✝¹ : OrderBot α\ninst✝ : OrderBot β\nx y : α × β\nh : Disjoint x y\na : α\nhx : a ≤ x.fst\nhy : a ≤ y.fst\n⊢ (a, ⊥).snd ≤ x.snd\ncase mp.refine'_2\nα : Type u_1\nβ : Type u_2\ninst✝³ : PartialOrder α\ninst✝² : PartialOrder β\ninst✝¹ : OrderBot α\ninst✝ : OrderBot β\nx y : α × β\nh : Disjoint x y\na : α\nhx : a ≤ x.fst\nhy : a ≤ y.fst\n⊢ (a, ⊥).snd ≤ y.snd\ncase mp.refine'_3\nα : Type u_1\nβ : Type u_2\ninst✝³ : PartialOrder α\ninst✝² : PartialOrder β\ninst✝¹ : OrderBot α\ninst✝ : OrderBot β\nx y : α × β\nh : Disjoint x y\nb : β\nhx : b ≤ x.snd\nhy : b ≤ y.snd\n⊢ (⊥, b).fst ≤ x.fst\ncase mp.refine'_4\nα : Type u_1\nβ : Type u_2\ninst✝³ : PartialOrder α\ninst✝² : PartialOrder β\ninst✝¹ : OrderBot α\ninst✝ : OrderBot β\nx y : α × β\nh : Disjoint x y\nb : β\nhx : b ≤ x.snd\nhy : b ≤ y.snd\n⊢ (⊥, b).fst ≤ y.fst\n[PROOFSTEP]\nall_goals exact bot_le\n[GOAL]\ncase mp.refine'_1\nα : Type u_1\nβ : Type u_2\ninst✝³ : PartialOrder α\ninst✝² : PartialOrder β\ninst✝¹ : OrderBot α\ninst✝ : OrderBot β\nx y : α × β\nh : Disjoint x y\na : α\nhx : a ≤ x.fst\nhy : a ≤ y.fst\n⊢ (a, ⊥).snd ≤ x.snd\n[PROOFSTEP]\nexact bot_le\n[GOAL]\ncase mp.refine'_2\nα : Type u_1\nβ : Type u_2\ninst✝³ : PartialOrder α\ninst✝² : PartialOrder β\ninst✝¹ : OrderBot α\ninst✝ : OrderBot β\nx y : α × β\nh : Disjoint x y\na : α\nhx : a ≤ x.fst\nhy : a ≤ y.fst\n⊢ (a, ⊥).snd ≤ y.snd\n[PROOFSTEP]\nexact bot_le\n[GOAL]\ncase mp.refine'_3\nα : Type u_1\nβ : Type u_2\ninst✝³ : PartialOrder α\ninst✝² : PartialOrder β\ninst✝¹ : OrderBot α\ninst✝ : OrderBot β\nx y : α × β\nh : Disjoint x y\nb : β\nhx : b ≤ x.snd\nhy : b ≤ y.snd\n⊢ (⊥, b).fst ≤ x.fst\n[PROOFSTEP]\nexact bot_le\n[GOAL]\ncase mp.refine'_4\nα : Type u_1\nβ : Type u_2\ninst✝³ : PartialOrder α\ninst✝² : PartialOrder β\ninst✝¹ : OrderBot α\ninst✝ : OrderBot β\nx y : α × β\nh : Disjoint x y\nb : β\nhx : b ≤ x.snd\nhy : b ≤ y.snd\n⊢ (⊥, b).fst ≤ y.fst\n[PROOFSTEP]\nexact bot_le\n[GOAL]\ncase mpr\nα : Type u_1\nβ : Type u_2\ninst✝³ : PartialOrder α\ninst✝² : PartialOrder β\ninst✝¹ : OrderBot α\ninst✝ : OrderBot β\nx y : α × β\n⊢ Disjoint x.fst y.fst ∧ Disjoint x.snd y.snd → Disjoint x y\n[PROOFSTEP]\nrintro ⟨ha, hb⟩ z hza hzb\n[GOAL]\ncase mpr.intro\nα : Type u_1\nβ : Type u_2\ninst✝³ : PartialOrder α\ninst✝² : PartialOrder β\ninst✝¹ : OrderBot α\ninst✝ : OrderBot β\nx y : α × β\nha : Disjoint x.fst y.fst\nhb : Disjoint x.snd y.snd\nz : α × β\nhza : z ≤ x\nhzb : z ≤ y\n⊢ z ≤ ⊥\n[PROOFSTEP]\nrefine' ⟨ha hza.1 hzb.1, hb hza.2 hzb.2⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : PartialOrder α\ninst✝² : PartialOrder β\ninst✝¹ : BoundedOrder α\ninst✝ : BoundedOrder β\nx y : α × β\n⊢ IsCompl x y ↔ IsCompl x.fst y.fst ∧ IsCompl x.snd y.snd\n[PROOFSTEP]\nsimp_rw [isCompl_iff, Prod.disjoint_iff, Prod.codisjoint_iff, and_and_and_comm]\n[GOAL]\nα : Type u_1\ninst✝¹ : Lattice α\ninst✝ : BoundedOrder α\na b : Complementeds α\n⊢ ↑a ≤ ↑b ↔ a ≤ b\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\ninst✝¹ : DistribLattice α\ninst✝ : BoundedOrder α\na b : Complementeds α\n⊢ Disjoint ↑a ↑b ↔ Disjoint a b\n[PROOFSTEP]\nrw [disjoint_iff, disjoint_iff, ← coe_inf, ← coe_bot, coe_inj]\n[GOAL]\nα : Type u_1\ninst✝¹ : DistribLattice α\ninst✝ : BoundedOrder α\na b : Complementeds α\n⊢ Codisjoint ↑a ↑b ↔ Codisjoint a b\n[PROOFSTEP]\nrw [codisjoint_iff, codisjoint_iff, ← coe_sup, ← coe_top, coe_inj]\n[GOAL]\nα : Type u_1\ninst✝¹ : DistribLattice α\ninst✝ : BoundedOrder α\na b : Complementeds α\n⊢ IsCompl ↑a ↑b ↔ IsCompl a b\n[PROOFSTEP]\nsimp_rw [isCompl_iff, disjoint_coe, codisjoint_coe]\n", "meta": {"mathlib_filename": "Mathlib.Order.Disjoint", "llama_tokens": 4251, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.712232184238947, "lm_q2_score": 0.7025300636233416, "lm_q1q2_score": 0.500364521707979}}
{"text": "[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝² : CommRing R\ninst✝¹ : CommRing S\nI J : Ideal R\ninst✝ : IsPrime J\ne : I ≤ J\n⊢ ∃ p, p ∈ Ideal.minimalPrimes I ∧ p ≤ J\n[PROOFSTEP]\nsuffices\n  ∃ m ∈ {p : (Ideal R)ᵒᵈ | Ideal.IsPrime p ∧ I ≤ OrderDual.ofDual p},\n    OrderDual.toDual J ≤ m ∧ ∀ z ∈ {p : (Ideal R)ᵒᵈ | Ideal.IsPrime p ∧ I ≤ p}, m ≤ z → z = m\n  by\n  obtain ⟨p, h₁, h₂, h₃⟩ := this\n  simp_rw [← @eq_comm _ p] at h₃ \n  exact ⟨p, ⟨h₁, fun a b c => le_of_eq (h₃ a b c)⟩, h₂⟩\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝² : CommRing R\ninst✝¹ : CommRing S\nI J : Ideal R\ninst✝ : IsPrime J\ne : I ≤ J\nthis :\n  ∃ m,\n    m ∈ {p | IsPrime p ∧ I ≤ ↑OrderDual.ofDual p} ∧\n      ↑OrderDual.toDual J ≤ m ∧ ∀ (z : (Ideal R)ᵒᵈ), z ∈ {p | IsPrime p ∧ I ≤ p} → m ≤ z → z = m\n⊢ ∃ p, p ∈ Ideal.minimalPrimes I ∧ p ≤ J\n[PROOFSTEP]\nobtain ⟨p, h₁, h₂, h₃⟩ := this\n[GOAL]\ncase intro.intro.intro\nR : Type u_1\nS : Type u_2\ninst✝² : CommRing R\ninst✝¹ : CommRing S\nI J : Ideal R\ninst✝ : IsPrime J\ne : I ≤ J\np : (Ideal R)ᵒᵈ\nh₁ : p ∈ {p | IsPrime p ∧ I ≤ ↑OrderDual.ofDual p}\nh₂ : ↑OrderDual.toDual J ≤ p\nh₃ : ∀ (z : (Ideal R)ᵒᵈ), z ∈ {p | IsPrime p ∧ I ≤ p} → p ≤ z → z = p\n⊢ ∃ p, p ∈ Ideal.minimalPrimes I ∧ p ≤ J\n[PROOFSTEP]\nsimp_rw [← @eq_comm _ p] at h₃ \n[GOAL]\ncase intro.intro.intro\nR : Type u_1\nS : Type u_2\ninst✝² : CommRing R\ninst✝¹ : CommRing S\nI J : Ideal R\ninst✝ : IsPrime J\ne : I ≤ J\np : (Ideal R)ᵒᵈ\nh₁ : p ∈ {p | IsPrime p ∧ I ≤ ↑OrderDual.ofDual p}\nh₂ : ↑OrderDual.toDual J ≤ p\nh₃ : ∀ (z : (Ideal R)ᵒᵈ), z ∈ {p | IsPrime p ∧ I ≤ p} → p ≤ z → p = z\n⊢ ∃ p, p ∈ Ideal.minimalPrimes I ∧ p ≤ J\n[PROOFSTEP]\nexact ⟨p, ⟨h₁, fun a b c => le_of_eq (h₃ a b c)⟩, h₂⟩\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝² : CommRing R\ninst✝¹ : CommRing S\nI J : Ideal R\ninst✝ : IsPrime J\ne : I ≤ J\n⊢ ∃ m,\n    m ∈ {p | IsPrime p ∧ I ≤ ↑OrderDual.ofDual p} ∧\n      ↑OrderDual.toDual J ≤ m ∧ ∀ (z : (Ideal R)ᵒᵈ), z ∈ {p | IsPrime p ∧ I ≤ p} → m ≤ z → z = m\n[PROOFSTEP]\napply zorn_nonempty_partialOrder₀\n[GOAL]\ncase ih\nR : Type u_1\nS : Type u_2\ninst✝² : CommRing R\ninst✝¹ : CommRing S\nI J : Ideal R\ninst✝ : IsPrime J\ne : I ≤ J\n⊢ ∀ (c : Set (Ideal R)ᵒᵈ),\n    c ⊆ {p | IsPrime p ∧ I ≤ ↑OrderDual.ofDual p} →\n      IsChain (fun x x_1 => x ≤ x_1) c →\n        ∀ (y : (Ideal R)ᵒᵈ),\n          y ∈ c → ∃ ub, ub ∈ {p | IsPrime p ∧ I ≤ ↑OrderDual.ofDual p} ∧ ∀ (z : (Ideal R)ᵒᵈ), z ∈ c → z ≤ ub\ncase hxs\nR : Type u_1\nS : Type u_2\ninst✝² : CommRing R\ninst✝¹ : CommRing S\nI J : Ideal R\ninst✝ : IsPrime J\ne : I ≤ J\n⊢ ↑OrderDual.toDual J ∈ {p | IsPrime p ∧ I ≤ ↑OrderDual.ofDual p}\n[PROOFSTEP]\nswap\n[GOAL]\ncase hxs\nR : Type u_1\nS : Type u_2\ninst✝² : CommRing R\ninst✝¹ : CommRing S\nI J : Ideal R\ninst✝ : IsPrime J\ne : I ≤ J\n⊢ ↑OrderDual.toDual J ∈ {p | IsPrime p ∧ I ≤ ↑OrderDual.ofDual p}\n[PROOFSTEP]\nrefine' ⟨show J.IsPrime by infer_instance, e⟩\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝² : CommRing R\ninst✝¹ : CommRing S\nI J : Ideal R\ninst✝ : IsPrime J\ne : I ≤ J\n⊢ IsPrime J\n[PROOFSTEP]\ninfer_instance\n[GOAL]\ncase ih\nR : Type u_1\nS : Type u_2\ninst✝² : CommRing R\ninst✝¹ : CommRing S\nI J : Ideal R\ninst✝ : IsPrime J\ne : I ≤ J\n⊢ ∀ (c : Set (Ideal R)ᵒᵈ),\n    c ⊆ {p | IsPrime p ∧ I ≤ ↑OrderDual.ofDual p} →\n      IsChain (fun x x_1 => x ≤ x_1) c →\n        ∀ (y : (Ideal R)ᵒᵈ),\n          y ∈ c → ∃ ub, ub ∈ {p | IsPrime p ∧ I ≤ ↑OrderDual.ofDual p} ∧ ∀ (z : (Ideal R)ᵒᵈ), z ∈ c → z ≤ ub\n[PROOFSTEP]\nrintro (c : Set (Ideal R)) hc hc' J' hJ'\n[GOAL]\ncase ih\nR : Type u_1\nS : Type u_2\ninst✝² : CommRing R\ninst✝¹ : CommRing S\nI J : Ideal R\ninst✝ : IsPrime J\ne : I ≤ J\nc : Set (Ideal R)\nhc : c ⊆ {p | IsPrime p ∧ I ≤ ↑OrderDual.ofDual p}\nhc' : IsChain (fun x x_1 => x ≤ x_1) c\nJ' : (Ideal R)ᵒᵈ\nhJ' : J' ∈ c\n⊢ ∃ ub, ub ∈ {p | IsPrime p ∧ I ≤ ↑OrderDual.ofDual p} ∧ ∀ (z : (Ideal R)ᵒᵈ), z ∈ c → z ≤ ub\n[PROOFSTEP]\nrefine' ⟨OrderDual.toDual (sInf c), ⟨Ideal.sInf_isPrime_of_isChain ⟨J', hJ'⟩ hc'.symm fun x hx => (hc hx).1, _⟩, _⟩\n[GOAL]\ncase ih.refine'_1\nR : Type u_1\nS : Type u_2\ninst✝² : CommRing R\ninst✝¹ : CommRing S\nI J : Ideal R\ninst✝ : IsPrime J\ne : I ≤ J\nc : Set (Ideal R)\nhc : c ⊆ {p | IsPrime p ∧ I ≤ ↑OrderDual.ofDual p}\nhc' : IsChain (fun x x_1 => x ≤ x_1) c\nJ' : (Ideal R)ᵒᵈ\nhJ' : J' ∈ c\n⊢ I ≤ ↑OrderDual.ofDual (↑OrderDual.toDual (sInf c))\n[PROOFSTEP]\nrw [OrderDual.ofDual_toDual, le_sInf_iff]\n[GOAL]\ncase ih.refine'_1\nR : Type u_1\nS : Type u_2\ninst✝² : CommRing R\ninst✝¹ : CommRing S\nI J : Ideal R\ninst✝ : IsPrime J\ne : I ≤ J\nc : Set (Ideal R)\nhc : c ⊆ {p | IsPrime p ∧ I ≤ ↑OrderDual.ofDual p}\nhc' : IsChain (fun x x_1 => x ≤ x_1) c\nJ' : (Ideal R)ᵒᵈ\nhJ' : J' ∈ c\n⊢ ∀ (b : Ideal R), b ∈ c → I ≤ b\n[PROOFSTEP]\nexact fun _ hx => (hc hx).2\n[GOAL]\ncase ih.refine'_2\nR : Type u_1\nS : Type u_2\ninst✝² : CommRing R\ninst✝¹ : CommRing S\nI J : Ideal R\ninst✝ : IsPrime J\ne : I ≤ J\nc : Set (Ideal R)\nhc : c ⊆ {p | IsPrime p ∧ I ≤ ↑OrderDual.ofDual p}\nhc' : IsChain (fun x x_1 => x ≤ x_1) c\nJ' : (Ideal R)ᵒᵈ\nhJ' : J' ∈ c\n⊢ ∀ (z : (Ideal R)ᵒᵈ), z ∈ c → z ≤ ↑OrderDual.toDual (sInf c)\n[PROOFSTEP]\nrintro z hz\n[GOAL]\ncase ih.refine'_2\nR : Type u_1\nS : Type u_2\ninst✝² : CommRing R\ninst✝¹ : CommRing S\nI J : Ideal R\ninst✝ : IsPrime J\ne : I ≤ J\nc : Set (Ideal R)\nhc : c ⊆ {p | IsPrime p ∧ I ≤ ↑OrderDual.ofDual p}\nhc' : IsChain (fun x x_1 => x ≤ x_1) c\nJ' : (Ideal R)ᵒᵈ\nhJ' : J' ∈ c\nz : (Ideal R)ᵒᵈ\nhz : z ∈ c\n⊢ z ≤ ↑OrderDual.toDual (sInf c)\n[PROOFSTEP]\nrw [OrderDual.le_toDual]\n[GOAL]\ncase ih.refine'_2\nR : Type u_1\nS : Type u_2\ninst✝² : CommRing R\ninst✝¹ : CommRing S\nI J : Ideal R\ninst✝ : IsPrime J\ne : I ≤ J\nc : Set (Ideal R)\nhc : c ⊆ {p | IsPrime p ∧ I ≤ ↑OrderDual.ofDual p}\nhc' : IsChain (fun x x_1 => x ≤ x_1) c\nJ' : (Ideal R)ᵒᵈ\nhJ' : J' ∈ c\nz : (Ideal R)ᵒᵈ\nhz : z ∈ c\n⊢ sInf c ≤ ↑OrderDual.ofDual z\n[PROOFSTEP]\nexact sInf_le hz\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nI J : Ideal R\n⊢ Ideal.minimalPrimes (radical I) = Ideal.minimalPrimes I\n[PROOFSTEP]\nrw [Ideal.minimalPrimes, Ideal.minimalPrimes]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nI J : Ideal R\n⊢ minimals (fun x x_1 => x ≤ x_1) {p | IsPrime p ∧ radical I ≤ p} =\n    minimals (fun x x_1 => x ≤ x_1) {p | IsPrime p ∧ I ≤ p}\n[PROOFSTEP]\ncongr\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nI J : Ideal R\n⊢ minimals (fun x x_1 => x ≤ x_1) {p | IsPrime p ∧ radical I ≤ p} =\n    minimals (fun x x_1 => x ≤ x_1) {p | IsPrime p ∧ I ≤ p}\n[PROOFSTEP]\next p\n[GOAL]\ncase h\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nI J p : Ideal R\n⊢ p ∈ minimals (fun x x_1 => x ≤ x_1) {p | IsPrime p ∧ radical I ≤ p} ↔\n    p ∈ minimals (fun x x_1 => x ≤ x_1) {p | IsPrime p ∧ I ≤ p}\n[PROOFSTEP]\nrefine' ⟨_, _⟩\n[GOAL]\ncase h.refine'_1\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nI J p : Ideal R\n⊢ p ∈ minimals (fun x x_1 => x ≤ x_1) {p | IsPrime p ∧ radical I ≤ p} →\n    p ∈ minimals (fun x x_1 => x ≤ x_1) {p | IsPrime p ∧ I ≤ p}\n[PROOFSTEP]\nrintro ⟨⟨a, ha⟩, b⟩\n[GOAL]\ncase h.refine'_2\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nI J p : Ideal R\n⊢ p ∈ minimals (fun x x_1 => x ≤ x_1) {p | IsPrime p ∧ I ≤ p} →\n    p ∈ minimals (fun x x_1 => x ≤ x_1) {p | IsPrime p ∧ radical I ≤ p}\n[PROOFSTEP]\nrintro ⟨⟨a, ha⟩, b⟩\n[GOAL]\ncase h.refine'_1.intro.intro\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nI J p : Ideal R\nb : ∀ ⦃b : Ideal R⦄, b ∈ {p | IsPrime p ∧ radical I ≤ p} → (fun x x_1 => x ≤ x_1) b p → (fun x x_1 => x ≤ x_1) p b\na : IsPrime p\nha : radical I ≤ p\n⊢ p ∈ minimals (fun x x_1 => x ≤ x_1) {p | IsPrime p ∧ I ≤ p}\n[PROOFSTEP]\nrefine' ⟨⟨a, a.radical_le_iff.1 ha⟩, _⟩\n[GOAL]\ncase h.refine'_1.intro.intro\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nI J p : Ideal R\nb : ∀ ⦃b : Ideal R⦄, b ∈ {p | IsPrime p ∧ radical I ≤ p} → (fun x x_1 => x ≤ x_1) b p → (fun x x_1 => x ≤ x_1) p b\na : IsPrime p\nha : radical I ≤ p\n⊢ ∀ ⦃b : Ideal R⦄, b ∈ {p | IsPrime p ∧ I ≤ p} → (fun x x_1 => x ≤ x_1) b p → (fun x x_1 => x ≤ x_1) p b\n[PROOFSTEP]\nsimp only [Set.mem_setOf_eq, and_imp] at *\n[GOAL]\ncase h.refine'_1.intro.intro\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nI J p : Ideal R\na : IsPrime p\nha : radical I ≤ p\nb : ∀ ⦃b : Ideal R⦄, IsPrime b → radical I ≤ b → b ≤ p → p ≤ b\n⊢ ∀ ⦃b : Ideal R⦄, IsPrime b → I ≤ b → b ≤ p → p ≤ b\n[PROOFSTEP]\nexact fun _ h2 h3 h4 => b h2 (h2.radical_le_iff.2 h3) h4\n[GOAL]\ncase h.refine'_2.intro.intro\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nI J p : Ideal R\nb : ∀ ⦃b : Ideal R⦄, b ∈ {p | IsPrime p ∧ I ≤ p} → (fun x x_1 => x ≤ x_1) b p → (fun x x_1 => x ≤ x_1) p b\na : IsPrime p\nha : I ≤ p\n⊢ p ∈ minimals (fun x x_1 => x ≤ x_1) {p | IsPrime p ∧ radical I ≤ p}\n[PROOFSTEP]\nrefine' ⟨⟨a, a.radical_le_iff.2 ha⟩, _⟩\n[GOAL]\ncase h.refine'_2.intro.intro\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nI J p : Ideal R\nb : ∀ ⦃b : Ideal R⦄, b ∈ {p | IsPrime p ∧ I ≤ p} → (fun x x_1 => x ≤ x_1) b p → (fun x x_1 => x ≤ x_1) p b\na : IsPrime p\nha : I ≤ p\n⊢ ∀ ⦃b : Ideal R⦄, b ∈ {p | IsPrime p ∧ radical I ≤ p} → (fun x x_1 => x ≤ x_1) b p → (fun x x_1 => x ≤ x_1) p b\n[PROOFSTEP]\nsimp only [Set.mem_setOf_eq, and_imp] at *\n[GOAL]\ncase h.refine'_2.intro.intro\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nI J p : Ideal R\na : IsPrime p\nha : I ≤ p\nb : ∀ ⦃b : Ideal R⦄, IsPrime b → I ≤ b → b ≤ p → p ≤ b\n⊢ ∀ ⦃b : Ideal R⦄, IsPrime b → radical I ≤ b → b ≤ p → p ≤ b\n[PROOFSTEP]\nexact fun _ h2 h3 h4 => b h2 (h2.radical_le_iff.1 h3) h4\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nI J : Ideal R\n⊢ sInf (Ideal.minimalPrimes I) = radical I\n[PROOFSTEP]\nrw [I.radical_eq_sInf]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nI J : Ideal R\n⊢ sInf (Ideal.minimalPrimes I) = sInf {J | I ≤ J ∧ IsPrime J}\n[PROOFSTEP]\napply le_antisymm\n[GOAL]\ncase a\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nI J : Ideal R\n⊢ sInf (Ideal.minimalPrimes I) ≤ sInf {J | I ≤ J ∧ IsPrime J}\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase a\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nI J : Ideal R\nx : R\nhx : x ∈ sInf (Ideal.minimalPrimes I)\n⊢ x ∈ sInf {J | I ≤ J ∧ IsPrime J}\n[PROOFSTEP]\nrw [Ideal.mem_sInf] at hx ⊢\n[GOAL]\ncase a\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nI J : Ideal R\nx : R\nhx : ∀ ⦃I_1 : Ideal R⦄, I_1 ∈ Ideal.minimalPrimes I → x ∈ I_1\n⊢ ∀ ⦃I_1 : Ideal R⦄, I_1 ∈ {J | I ≤ J ∧ IsPrime J} → x ∈ I_1\n[PROOFSTEP]\nrintro J ⟨e, hJ⟩\n[GOAL]\ncase a.intro\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nI J✝ : Ideal R\nx : R\nhx : ∀ ⦃I_1 : Ideal R⦄, I_1 ∈ Ideal.minimalPrimes I → x ∈ I_1\nJ : Ideal R\ne : I ≤ J\nhJ : IsPrime J\n⊢ x ∈ J\n[PROOFSTEP]\nobtain ⟨p, hp, hp'⟩ := Ideal.exists_minimalPrimes_le e\n[GOAL]\ncase a.intro.intro.intro\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nI J✝ : Ideal R\nx : R\nhx : ∀ ⦃I_1 : Ideal R⦄, I_1 ∈ Ideal.minimalPrimes I → x ∈ I_1\nJ : Ideal R\ne : I ≤ J\nhJ : IsPrime J\np : Ideal R\nhp : p ∈ Ideal.minimalPrimes I\nhp' : p ≤ J\n⊢ x ∈ J\n[PROOFSTEP]\nexact hp' (hx hp)\n[GOAL]\ncase a\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nI J : Ideal R\n⊢ sInf {J | I ≤ J ∧ IsPrime J} ≤ sInf (Ideal.minimalPrimes I)\n[PROOFSTEP]\napply sInf_le_sInf _\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nI J : Ideal R\n⊢ Ideal.minimalPrimes I ⊆ {J | I ≤ J ∧ IsPrime J}\n[PROOFSTEP]\nintro I hI\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nI✝ J I : Ideal R\nhI : I ∈ Ideal.minimalPrimes I✝\n⊢ I ∈ {J | I✝ ≤ J ∧ IsPrime J}\n[PROOFSTEP]\nexact hI.1.symm\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nI J : Ideal R\nf : R →+* S\nhf : Function.Injective ↑f\np : Ideal R\nH : p ∈ minimalPrimes R\n⊢ ∃ p', IsPrime p' ∧ comap f p' = p\n[PROOFSTEP]\nhave := H.1.1\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nI J : Ideal R\nf : R →+* S\nhf : Function.Injective ↑f\np : Ideal R\nH : p ∈ minimalPrimes R\nthis : IsPrime p\n⊢ ∃ p', IsPrime p' ∧ comap f p' = p\n[PROOFSTEP]\nhave : Nontrivial (Localization (Submonoid.map f p.primeCompl)) :=\n  by\n  refine' ⟨⟨1, 0, _⟩⟩\n  convert\n    (IsLocalization.map_injective_of_injective p.primeCompl (Localization.AtPrime p)\n          (Localization <| p.primeCompl.map f) hf).ne\n      one_ne_zero\n  · rw [map_one]\n  · rw [map_zero]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nI J : Ideal R\nf : R →+* S\nhf : Function.Injective ↑f\np : Ideal R\nH : p ∈ minimalPrimes R\nthis : IsPrime p\n⊢ Nontrivial (Localization (Submonoid.map f (primeCompl p)))\n[PROOFSTEP]\nrefine' ⟨⟨1, 0, _⟩⟩\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nI J : Ideal R\nf : R →+* S\nhf : Function.Injective ↑f\np : Ideal R\nH : p ∈ minimalPrimes R\nthis : IsPrime p\n⊢ 1 ≠ 0\n[PROOFSTEP]\nconvert\n  (IsLocalization.map_injective_of_injective p.primeCompl (Localization.AtPrime p) (Localization <| p.primeCompl.map f)\n        hf).ne\n    one_ne_zero\n[GOAL]\ncase h.e'_2\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nI J : Ideal R\nf : R →+* S\nhf : Function.Injective ↑f\np : Ideal R\nH : p ∈ minimalPrimes R\nthis : IsPrime p\n⊢ 1 =\n    ↑(IsLocalization.map (Localization (Submonoid.map f (primeCompl p))) f\n          (_ : primeCompl p ≤ Submonoid.comap f (Submonoid.map f (primeCompl p))))\n      1\n[PROOFSTEP]\nrw [map_one]\n[GOAL]\ncase h.e'_3\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nI J : Ideal R\nf : R →+* S\nhf : Function.Injective ↑f\np : Ideal R\nH : p ∈ minimalPrimes R\nthis : IsPrime p\n⊢ 0 =\n    ↑(IsLocalization.map (Localization (Submonoid.map f (primeCompl p))) f\n          (_ : primeCompl p ≤ Submonoid.comap f (Submonoid.map f (primeCompl p))))\n      0\n[PROOFSTEP]\nrw [map_zero]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nI J : Ideal R\nf : R →+* S\nhf : Function.Injective ↑f\np : Ideal R\nH : p ∈ minimalPrimes R\nthis✝ : IsPrime p\nthis : Nontrivial (Localization (Submonoid.map f (primeCompl p)))\n⊢ ∃ p', IsPrime p' ∧ comap f p' = p\n[PROOFSTEP]\nobtain ⟨M, hM⟩ := Ideal.exists_maximal (Localization (Submonoid.map f p.primeCompl))\n[GOAL]\ncase intro\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nI J : Ideal R\nf : R →+* S\nhf : Function.Injective ↑f\np : Ideal R\nH : p ∈ minimalPrimes R\nthis✝ : IsPrime p\nthis : Nontrivial (Localization (Submonoid.map f (primeCompl p)))\nM : Ideal (Localization (Submonoid.map f (primeCompl p)))\nhM : IsMaximal M\n⊢ ∃ p', IsPrime p' ∧ comap f p' = p\n[PROOFSTEP]\nrefine' ⟨M.comap (algebraMap S <| Localization (Submonoid.map f p.primeCompl)), inferInstance, _⟩\n[GOAL]\ncase intro\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nI J : Ideal R\nf : R →+* S\nhf : Function.Injective ↑f\np : Ideal R\nH : p ∈ minimalPrimes R\nthis✝ : IsPrime p\nthis : Nontrivial (Localization (Submonoid.map f (primeCompl p)))\nM : Ideal (Localization (Submonoid.map f (primeCompl p)))\nhM : IsMaximal M\n⊢ comap f (comap (algebraMap S (Localization (Submonoid.map f (primeCompl p)))) M) = p\n[PROOFSTEP]\nrw [Ideal.comap_comap, ←\n  @IsLocalization.map_comp _ _ _ _ _ _ _ _ Localization.isLocalization _ _ _ _ p.primeCompl.le_comap_map _\n    Localization.isLocalization,\n  ← Ideal.comap_comap]\n[GOAL]\ncase intro\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nI J : Ideal R\nf : R →+* S\nhf : Function.Injective ↑f\np : Ideal R\nH : p ∈ minimalPrimes R\nthis✝ : IsPrime p\nthis : Nontrivial (Localization (Submonoid.map f (primeCompl p)))\nM : Ideal (Localization (Submonoid.map f (primeCompl p)))\nhM : IsMaximal M\n⊢ comap (algebraMap R (Localization (primeCompl p)))\n      (comap\n        (IsLocalization.map (Localization (Submonoid.map f (primeCompl p))) f\n          (_ : primeCompl p ≤ Submonoid.comap f (Submonoid.map f (primeCompl p))))\n        M) =\n    p\n[PROOFSTEP]\nsuffices _ ≤ p by exact this.antisymm (H.2 ⟨inferInstance, bot_le⟩ this)\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nI J : Ideal R\nf : R →+* S\nhf : Function.Injective ↑f\np : Ideal R\nH : p ∈ minimalPrimes R\nthis✝¹ : IsPrime p\nthis✝ : Nontrivial (Localization (Submonoid.map f (primeCompl p)))\nM : Ideal (Localization (Submonoid.map f (primeCompl p)))\nhM : IsMaximal M\nthis : ?m.48761 ≤ p\n⊢ comap (algebraMap R (Localization (primeCompl p)))\n      (comap\n        (IsLocalization.map (Localization (Submonoid.map f (primeCompl p))) f\n          (_ : primeCompl p ≤ Submonoid.comap f (Submonoid.map f (primeCompl p))))\n        M) =\n    p\n[PROOFSTEP]\nexact this.antisymm (H.2 ⟨inferInstance, bot_le⟩ this)\n[GOAL]\ncase intro\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nI J : Ideal R\nf : R →+* S\nhf : Function.Injective ↑f\np : Ideal R\nH : p ∈ minimalPrimes R\nthis✝ : IsPrime p\nthis : Nontrivial (Localization (Submonoid.map f (primeCompl p)))\nM : Ideal (Localization (Submonoid.map f (primeCompl p)))\nhM : IsMaximal M\n⊢ comap (algebraMap R (Localization (primeCompl p)))\n      (comap\n        (IsLocalization.map (Localization (Submonoid.map f (primeCompl p))) f\n          (_ : primeCompl p ≤ Submonoid.comap f (Submonoid.map f (primeCompl p))))\n        M) ≤\n    p\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase intro\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nI J : Ideal R\nf : R →+* S\nhf : Function.Injective ↑f\np : Ideal R\nH : p ∈ minimalPrimes R\nthis✝ : IsPrime p\nthis : Nontrivial (Localization (Submonoid.map f (primeCompl p)))\nM : Ideal (Localization (Submonoid.map f (primeCompl p)))\nhM : IsMaximal M\nx : R\nhx :\n  x ∈\n    comap (algebraMap R (Localization (primeCompl p)))\n      (comap\n        (IsLocalization.map (Localization (Submonoid.map f (primeCompl p))) f\n          (_ : primeCompl p ≤ Submonoid.comap f (Submonoid.map f (primeCompl p))))\n        M)\n⊢ x ∈ p\n[PROOFSTEP]\nby_contra h\n[GOAL]\ncase intro\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nI J : Ideal R\nf : R →+* S\nhf : Function.Injective ↑f\np : Ideal R\nH : p ∈ minimalPrimes R\nthis✝ : IsPrime p\nthis : Nontrivial (Localization (Submonoid.map f (primeCompl p)))\nM : Ideal (Localization (Submonoid.map f (primeCompl p)))\nhM : IsMaximal M\nx : R\nhx :\n  x ∈\n    comap (algebraMap R (Localization (primeCompl p)))\n      (comap\n        (IsLocalization.map (Localization (Submonoid.map f (primeCompl p))) f\n          (_ : primeCompl p ≤ Submonoid.comap f (Submonoid.map f (primeCompl p))))\n        M)\nh : ¬x ∈ p\n⊢ False\n[PROOFSTEP]\napply hM.ne_top\n[GOAL]\ncase intro\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nI J : Ideal R\nf : R →+* S\nhf : Function.Injective ↑f\np : Ideal R\nH : p ∈ minimalPrimes R\nthis✝ : IsPrime p\nthis : Nontrivial (Localization (Submonoid.map f (primeCompl p)))\nM : Ideal (Localization (Submonoid.map f (primeCompl p)))\nhM : IsMaximal M\nx : R\nhx :\n  x ∈\n    comap (algebraMap R (Localization (primeCompl p)))\n      (comap\n        (IsLocalization.map (Localization (Submonoid.map f (primeCompl p))) f\n          (_ : primeCompl p ≤ Submonoid.comap f (Submonoid.map f (primeCompl p))))\n        M)\nh : ¬x ∈ p\n⊢ M = ⊤\n[PROOFSTEP]\napply M.eq_top_of_isUnit_mem hx\n[GOAL]\ncase intro\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nI J : Ideal R\nf : R →+* S\nhf : Function.Injective ↑f\np : Ideal R\nH : p ∈ minimalPrimes R\nthis✝ : IsPrime p\nthis : Nontrivial (Localization (Submonoid.map f (primeCompl p)))\nM : Ideal (Localization (Submonoid.map f (primeCompl p)))\nhM : IsMaximal M\nx : R\nhx :\n  x ∈\n    comap (algebraMap R (Localization (primeCompl p)))\n      (comap\n        (IsLocalization.map (Localization (Submonoid.map f (primeCompl p))) f\n          (_ : primeCompl p ≤ Submonoid.comap f (Submonoid.map f (primeCompl p))))\n        M)\nh : ¬x ∈ p\n⊢ IsUnit\n    (↑(IsLocalization.map (Localization (Submonoid.map f (primeCompl p))) f\n          (_ : primeCompl p ≤ Submonoid.comap f (Submonoid.map f (primeCompl p))))\n      (↑(algebraMap R (Localization (primeCompl p))) x))\n[PROOFSTEP]\napply IsUnit.map\n[GOAL]\ncase intro.h\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nI J : Ideal R\nf : R →+* S\nhf : Function.Injective ↑f\np : Ideal R\nH : p ∈ minimalPrimes R\nthis✝ : IsPrime p\nthis : Nontrivial (Localization (Submonoid.map f (primeCompl p)))\nM : Ideal (Localization (Submonoid.map f (primeCompl p)))\nhM : IsMaximal M\nx : R\nhx :\n  x ∈\n    comap (algebraMap R (Localization (primeCompl p)))\n      (comap\n        (IsLocalization.map (Localization (Submonoid.map f (primeCompl p))) f\n          (_ : primeCompl p ≤ Submonoid.comap f (Submonoid.map f (primeCompl p))))\n        M)\nh : ¬x ∈ p\n⊢ IsUnit (↑(algebraMap R (Localization (primeCompl p))) x)\n[PROOFSTEP]\napply IsLocalization.map_units _ (show p.primeCompl from ⟨x, h⟩)\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nI✝ J : Ideal R\nI : Ideal S\nf : R →+* S\np : Ideal R\nH : p ∈ Ideal.minimalPrimes (comap f I)\n⊢ ∃ p', IsPrime p' ∧ I ≤ p' ∧ comap f p' = p\n[PROOFSTEP]\nhave := H.1.1\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nI✝ J : Ideal R\nI : Ideal S\nf : R →+* S\np : Ideal R\nH : p ∈ Ideal.minimalPrimes (comap f I)\nthis : IsPrime p\n⊢ ∃ p', IsPrime p' ∧ I ≤ p' ∧ comap f p' = p\n[PROOFSTEP]\nlet f' := (Ideal.Quotient.mk I).comp f\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nI✝ J : Ideal R\nI : Ideal S\nf : R →+* S\np : Ideal R\nH : p ∈ Ideal.minimalPrimes (comap f I)\nthis : IsPrime p\nf' : R →+* S ⧸ I := RingHom.comp (Quotient.mk I) f\n⊢ ∃ p', IsPrime p' ∧ I ≤ p' ∧ comap f p' = p\n[PROOFSTEP]\nhave e : RingHom.ker f' = I.comap f := by\n  ext1\n  exact Submodule.Quotient.mk_eq_zero _\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nI✝ J : Ideal R\nI : Ideal S\nf : R →+* S\np : Ideal R\nH : p ∈ Ideal.minimalPrimes (comap f I)\nthis : IsPrime p\nf' : R →+* S ⧸ I := RingHom.comp (Quotient.mk I) f\n⊢ RingHom.ker f' = comap f I\n[PROOFSTEP]\next1\n[GOAL]\ncase h\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nI✝ J : Ideal R\nI : Ideal S\nf : R →+* S\np : Ideal R\nH : p ∈ Ideal.minimalPrimes (comap f I)\nthis : IsPrime p\nf' : R →+* S ⧸ I := RingHom.comp (Quotient.mk I) f\nx✝ : R\n⊢ x✝ ∈ RingHom.ker f' ↔ x✝ ∈ comap f I\n[PROOFSTEP]\nexact Submodule.Quotient.mk_eq_zero _\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nI✝ J : Ideal R\nI : Ideal S\nf : R →+* S\np : Ideal R\nH : p ∈ Ideal.minimalPrimes (comap f I)\nthis : IsPrime p\nf' : R →+* S ⧸ I := RingHom.comp (Quotient.mk I) f\ne : RingHom.ker f' = comap f I\n⊢ ∃ p', IsPrime p' ∧ I ≤ p' ∧ comap f p' = p\n[PROOFSTEP]\nhave : RingHom.ker (Ideal.Quotient.mk <| RingHom.ker f') ≤ p :=\n  by\n  rw [Ideal.mk_ker, e]\n  exact H.1.2\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nI✝ J : Ideal R\nI : Ideal S\nf : R →+* S\np : Ideal R\nH : p ∈ Ideal.minimalPrimes (comap f I)\nthis : IsPrime p\nf' : R →+* S ⧸ I := RingHom.comp (Quotient.mk I) f\ne : RingHom.ker f' = comap f I\n⊢ RingHom.ker (Quotient.mk (RingHom.ker f')) ≤ p\n[PROOFSTEP]\nrw [Ideal.mk_ker, e]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nI✝ J : Ideal R\nI : Ideal S\nf : R →+* S\np : Ideal R\nH : p ∈ Ideal.minimalPrimes (comap f I)\nthis : IsPrime p\nf' : R →+* S ⧸ I := RingHom.comp (Quotient.mk I) f\ne : RingHom.ker f' = comap f I\n⊢ comap f I ≤ p\n[PROOFSTEP]\nexact H.1.2\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nI✝ J : Ideal R\nI : Ideal S\nf : R →+* S\np : Ideal R\nH : p ∈ Ideal.minimalPrimes (comap f I)\nthis✝ : IsPrime p\nf' : R →+* S ⧸ I := RingHom.comp (Quotient.mk I) f\ne : RingHom.ker f' = comap f I\nthis : RingHom.ker (Quotient.mk (RingHom.ker f')) ≤ p\n⊢ ∃ p', IsPrime p' ∧ I ≤ p' ∧ comap f p' = p\n[PROOFSTEP]\nsuffices _\n  by\n  have ⟨p', hp₁, hp₂⟩ :=\n    Ideal.exists_comap_eq_of_mem_minimalPrimes_of_injective (RingHom.kerLift_injective f')\n      (p.map <| Ideal.Quotient.mk <| RingHom.ker f') this\n  refine' ⟨p'.comap <| Ideal.Quotient.mk I, Ideal.IsPrime.comap _, _, _⟩\n  · exact Ideal.mk_ker.symm.trans_le (Ideal.comap_mono bot_le)\n  · convert congr_arg (Ideal.comap <| Ideal.Quotient.mk <| RingHom.ker f') hp₂\n    rwa [Ideal.comap_map_of_surjective (Ideal.Quotient.mk <| RingHom.ker f') Ideal.Quotient.mk_surjective, eq_comm,\n      sup_eq_left]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nI✝ J : Ideal R\nI : Ideal S\nf : R →+* S\np : Ideal R\nH : p ∈ Ideal.minimalPrimes (comap f I)\nthis✝¹ : IsPrime p\nf' : R →+* S ⧸ I := RingHom.comp (Quotient.mk I) f\ne : RingHom.ker f' = comap f I\nthis✝ : RingHom.ker (Quotient.mk (RingHom.ker f')) ≤ p\nthis : ?m.53321\n⊢ ∃ p', IsPrime p' ∧ I ≤ p' ∧ comap f p' = p\n[PROOFSTEP]\nhave ⟨p', hp₁, hp₂⟩ :=\n  Ideal.exists_comap_eq_of_mem_minimalPrimes_of_injective (RingHom.kerLift_injective f')\n    (p.map <| Ideal.Quotient.mk <| RingHom.ker f') this\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nI✝ J : Ideal R\nI : Ideal S\nf : R →+* S\np : Ideal R\nH : p ∈ Ideal.minimalPrimes (comap f I)\nthis✝¹ : IsPrime p\nf' : R →+* S ⧸ I := RingHom.comp (Quotient.mk I) f\ne : RingHom.ker f' = comap f I\nthis✝ : RingHom.ker (Quotient.mk (RingHom.ker f')) ≤ p\nthis : map (Quotient.mk (RingHom.ker f')) p ∈ minimalPrimes (R ⧸ RingHom.ker f')\np' : Ideal (S ⧸ I)\nhp₁ : IsPrime p'\nhp₂ : comap (RingHom.kerLift f') p' = map (Quotient.mk (RingHom.ker f')) p\n⊢ ∃ p', IsPrime p' ∧ I ≤ p' ∧ comap f p' = p\n[PROOFSTEP]\nrefine' ⟨p'.comap <| Ideal.Quotient.mk I, Ideal.IsPrime.comap _, _, _⟩\n[GOAL]\ncase refine'_1\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nI✝ J : Ideal R\nI : Ideal S\nf : R →+* S\np : Ideal R\nH : p ∈ Ideal.minimalPrimes (comap f I)\nthis✝¹ : IsPrime p\nf' : R →+* S ⧸ I := RingHom.comp (Quotient.mk I) f\ne : RingHom.ker f' = comap f I\nthis✝ : RingHom.ker (Quotient.mk (RingHom.ker f')) ≤ p\nthis : map (Quotient.mk (RingHom.ker f')) p ∈ minimalPrimes (R ⧸ RingHom.ker f')\np' : Ideal (S ⧸ I)\nhp₁ : IsPrime p'\nhp₂ : comap (RingHom.kerLift f') p' = map (Quotient.mk (RingHom.ker f')) p\n⊢ I ≤ comap (Quotient.mk I) p'\n[PROOFSTEP]\nexact Ideal.mk_ker.symm.trans_le (Ideal.comap_mono bot_le)\n[GOAL]\ncase refine'_2\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nI✝ J : Ideal R\nI : Ideal S\nf : R →+* S\np : Ideal R\nH : p ∈ Ideal.minimalPrimes (comap f I)\nthis✝¹ : IsPrime p\nf' : R →+* S ⧸ I := RingHom.comp (Quotient.mk I) f\ne : RingHom.ker f' = comap f I\nthis✝ : RingHom.ker (Quotient.mk (RingHom.ker f')) ≤ p\nthis : map (Quotient.mk (RingHom.ker f')) p ∈ minimalPrimes (R ⧸ RingHom.ker f')\np' : Ideal (S ⧸ I)\nhp₁ : IsPrime p'\nhp₂ : comap (RingHom.kerLift f') p' = map (Quotient.mk (RingHom.ker f')) p\n⊢ comap f (comap (Quotient.mk I) p') = p\n[PROOFSTEP]\nconvert congr_arg (Ideal.comap <| Ideal.Quotient.mk <| RingHom.ker f') hp₂\n[GOAL]\ncase h.e'_3\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nI✝ J : Ideal R\nI : Ideal S\nf : R →+* S\np : Ideal R\nH : p ∈ Ideal.minimalPrimes (comap f I)\nthis✝¹ : IsPrime p\nf' : R →+* S ⧸ I := RingHom.comp (Quotient.mk I) f\ne : RingHom.ker f' = comap f I\nthis✝ : RingHom.ker (Quotient.mk (RingHom.ker f')) ≤ p\nthis : map (Quotient.mk (RingHom.ker f')) p ∈ minimalPrimes (R ⧸ RingHom.ker f')\np' : Ideal (S ⧸ I)\nhp₁ : IsPrime p'\nhp₂ : comap (RingHom.kerLift f') p' = map (Quotient.mk (RingHom.ker f')) p\n⊢ p = comap (Quotient.mk (RingHom.ker f')) (map (Quotient.mk (RingHom.ker f')) p)\n[PROOFSTEP]\nrwa [Ideal.comap_map_of_surjective (Ideal.Quotient.mk <| RingHom.ker f') Ideal.Quotient.mk_surjective, eq_comm,\n  sup_eq_left]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nI✝ J : Ideal R\nI : Ideal S\nf : R →+* S\np : Ideal R\nH : p ∈ Ideal.minimalPrimes (comap f I)\nthis✝ : IsPrime p\nf' : R →+* S ⧸ I := RingHom.comp (Quotient.mk I) f\ne : RingHom.ker f' = comap f I\nthis : RingHom.ker (Quotient.mk (RingHom.ker f')) ≤ p\n⊢ map (Quotient.mk (RingHom.ker f')) p ∈ minimalPrimes (R ⧸ RingHom.ker f')\n[PROOFSTEP]\nrefine' ⟨⟨_, bot_le⟩, _⟩\n[GOAL]\ncase refine'_1\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nI✝ J : Ideal R\nI : Ideal S\nf : R →+* S\np : Ideal R\nH : p ∈ Ideal.minimalPrimes (comap f I)\nthis✝ : IsPrime p\nf' : R →+* S ⧸ I := RingHom.comp (Quotient.mk I) f\ne : RingHom.ker f' = comap f I\nthis : RingHom.ker (Quotient.mk (RingHom.ker f')) ≤ p\n⊢ IsPrime (map (Quotient.mk (RingHom.ker f')) p)\n[PROOFSTEP]\napply Ideal.map_isPrime_of_surjective _ this\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nI✝ J : Ideal R\nI : Ideal S\nf : R →+* S\np : Ideal R\nH : p ∈ Ideal.minimalPrimes (comap f I)\nthis✝ : IsPrime p\nf' : R →+* S ⧸ I := RingHom.comp (Quotient.mk I) f\ne : RingHom.ker f' = comap f I\nthis : RingHom.ker (Quotient.mk (RingHom.ker f')) ≤ p\n⊢ Function.Surjective ↑(Quotient.mk (RingHom.ker f'))\n[PROOFSTEP]\nexact Ideal.Quotient.mk_surjective\n[GOAL]\ncase refine'_2\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nI✝ J : Ideal R\nI : Ideal S\nf : R →+* S\np : Ideal R\nH : p ∈ Ideal.minimalPrimes (comap f I)\nthis✝ : IsPrime p\nf' : R →+* S ⧸ I := RingHom.comp (Quotient.mk I) f\ne : RingHom.ker f' = comap f I\nthis : RingHom.ker (Quotient.mk (RingHom.ker f')) ≤ p\n⊢ ∀ ⦃b : Ideal (R ⧸ RingHom.ker f')⦄,\n    b ∈ {p | IsPrime p ∧ ⊥ ≤ p} →\n      (fun x x_1 => x ≤ x_1) b (map (Quotient.mk (RingHom.ker f')) p) →\n        (fun x x_1 => x ≤ x_1) (map (Quotient.mk (RingHom.ker f')) p) b\n[PROOFSTEP]\nrintro q ⟨hq, -⟩ hq'\n[GOAL]\ncase refine'_2.intro\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nI✝ J : Ideal R\nI : Ideal S\nf : R →+* S\np : Ideal R\nH : p ∈ Ideal.minimalPrimes (comap f I)\nthis✝ : IsPrime p\nf' : R →+* S ⧸ I := RingHom.comp (Quotient.mk I) f\ne : RingHom.ker f' = comap f I\nthis : RingHom.ker (Quotient.mk (RingHom.ker f')) ≤ p\nq : Ideal (R ⧸ RingHom.ker f')\nhq : IsPrime q\nhq' : q ≤ map (Quotient.mk (RingHom.ker f')) p\n⊢ map (Quotient.mk (RingHom.ker f')) p ≤ q\n[PROOFSTEP]\nrw [←\n  Ideal.map_comap_of_surjective (Ideal.Quotient.mk (RingHom.ker ((Ideal.Quotient.mk I).comp f)))\n    Ideal.Quotient.mk_surjective q]\n[GOAL]\ncase refine'_2.intro\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nI✝ J : Ideal R\nI : Ideal S\nf : R →+* S\np : Ideal R\nH : p ∈ Ideal.minimalPrimes (comap f I)\nthis✝ : IsPrime p\nf' : R →+* S ⧸ I := RingHom.comp (Quotient.mk I) f\ne : RingHom.ker f' = comap f I\nthis : RingHom.ker (Quotient.mk (RingHom.ker f')) ≤ p\nq : Ideal (R ⧸ RingHom.ker f')\nhq : IsPrime q\nhq' : q ≤ map (Quotient.mk (RingHom.ker f')) p\n⊢ map (Quotient.mk (RingHom.ker f')) p ≤\n    map (Quotient.mk (RingHom.ker (RingHom.comp (Quotient.mk I) f)))\n      (comap (Quotient.mk (RingHom.ker (RingHom.comp (Quotient.mk I) f))) q)\n[PROOFSTEP]\napply Ideal.map_mono\n[GOAL]\ncase refine'_2.intro.h\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nI✝ J : Ideal R\nI : Ideal S\nf : R →+* S\np : Ideal R\nH : p ∈ Ideal.minimalPrimes (comap f I)\nthis✝ : IsPrime p\nf' : R →+* S ⧸ I := RingHom.comp (Quotient.mk I) f\ne : RingHom.ker f' = comap f I\nthis : RingHom.ker (Quotient.mk (RingHom.ker f')) ≤ p\nq : Ideal (R ⧸ RingHom.ker f')\nhq : IsPrime q\nhq' : q ≤ map (Quotient.mk (RingHom.ker f')) p\n⊢ p ≤ comap (Quotient.mk (RingHom.ker (RingHom.comp (Quotient.mk I) f))) q\n[PROOFSTEP]\napply H.2\n[GOAL]\ncase refine'_2.intro.h.a\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nI✝ J : Ideal R\nI : Ideal S\nf : R →+* S\np : Ideal R\nH : p ∈ Ideal.minimalPrimes (comap f I)\nthis✝ : IsPrime p\nf' : R →+* S ⧸ I := RingHom.comp (Quotient.mk I) f\ne : RingHom.ker f' = comap f I\nthis : RingHom.ker (Quotient.mk (RingHom.ker f')) ≤ p\nq : Ideal (R ⧸ RingHom.ker f')\nhq : IsPrime q\nhq' : q ≤ map (Quotient.mk (RingHom.ker f')) p\n⊢ comap (Quotient.mk (RingHom.ker (RingHom.comp (Quotient.mk I) f))) q ∈ {p | IsPrime p ∧ comap f I ≤ p}\n[PROOFSTEP]\nrefine' ⟨inferInstance, (Ideal.mk_ker.trans e).symm.trans_le (Ideal.comap_mono bot_le)⟩\n[GOAL]\ncase refine'_2.intro.h.a\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nI✝ J : Ideal R\nI : Ideal S\nf : R →+* S\np : Ideal R\nH : p ∈ Ideal.minimalPrimes (comap f I)\nthis✝ : IsPrime p\nf' : R →+* S ⧸ I := RingHom.comp (Quotient.mk I) f\ne : RingHom.ker f' = comap f I\nthis : RingHom.ker (Quotient.mk (RingHom.ker f')) ≤ p\nq : Ideal (R ⧸ RingHom.ker f')\nhq : IsPrime q\nhq' : q ≤ map (Quotient.mk (RingHom.ker f')) p\n⊢ comap (Quotient.mk (RingHom.ker (RingHom.comp (Quotient.mk I) f))) q ≤ p\n[PROOFSTEP]\nrefine' (Ideal.comap_mono hq').trans _\n[GOAL]\ncase refine'_2.intro.h.a\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nI✝ J : Ideal R\nI : Ideal S\nf : R →+* S\np : Ideal R\nH : p ∈ Ideal.minimalPrimes (comap f I)\nthis✝ : IsPrime p\nf' : R →+* S ⧸ I := RingHom.comp (Quotient.mk I) f\ne : RingHom.ker f' = comap f I\nthis : RingHom.ker (Quotient.mk (RingHom.ker f')) ≤ p\nq : Ideal (R ⧸ RingHom.ker f')\nhq : IsPrime q\nhq' : q ≤ map (Quotient.mk (RingHom.ker f')) p\n⊢ comap (Quotient.mk (RingHom.ker (RingHom.comp (Quotient.mk I) f))) (map (Quotient.mk (RingHom.ker f')) p) ≤ p\n[PROOFSTEP]\nrw [Ideal.comap_map_of_surjective]\n[GOAL]\ncase refine'_2.intro.h.a\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nI✝ J : Ideal R\nI : Ideal S\nf : R →+* S\np : Ideal R\nH : p ∈ Ideal.minimalPrimes (comap f I)\nthis✝ : IsPrime p\nf' : R →+* S ⧸ I := RingHom.comp (Quotient.mk I) f\ne : RingHom.ker f' = comap f I\nthis : RingHom.ker (Quotient.mk (RingHom.ker f')) ≤ p\nq : Ideal (R ⧸ RingHom.ker f')\nhq : IsPrime q\nhq' : q ≤ map (Quotient.mk (RingHom.ker f')) p\n⊢ p ⊔ comap (Quotient.mk (RingHom.ker (RingHom.comp (Quotient.mk I) f))) ⊥ ≤ p\ncase refine'_2.intro.h.a.hf\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nI✝ J : Ideal R\nI : Ideal S\nf : R →+* S\np : Ideal R\nH : p ∈ Ideal.minimalPrimes (comap f I)\nthis✝ : IsPrime p\nf' : R →+* S ⧸ I := RingHom.comp (Quotient.mk I) f\ne : RingHom.ker f' = comap f I\nthis : RingHom.ker (Quotient.mk (RingHom.ker f')) ≤ p\nq : Ideal (R ⧸ RingHom.ker f')\nhq : IsPrime q\nhq' : q ≤ map (Quotient.mk (RingHom.ker f')) p\n⊢ Function.Surjective ↑(Quotient.mk (RingHom.ker (RingHom.comp (Quotient.mk I) f)))\n[PROOFSTEP]\nexacts [sup_le rfl.le this, Ideal.Quotient.mk_surjective]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nI✝ J : Ideal R\nI : Ideal S\nf : R →+* S\np : Ideal R\nH : p ∈ Ideal.minimalPrimes (comap f I)\n⊢ ∃ p', p' ∈ Ideal.minimalPrimes I ∧ comap f p' = p\n[PROOFSTEP]\nobtain ⟨p', h₁, h₂, h₃⟩ := Ideal.exists_comap_eq_of_mem_minimalPrimes f p H\n[GOAL]\ncase intro.intro.intro\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nI✝ J : Ideal R\nI : Ideal S\nf : R →+* S\np : Ideal R\nH : p ∈ Ideal.minimalPrimes (comap f I)\np' : Ideal S\nh₁ : IsPrime p'\nh₂ : I ≤ p'\nh₃ : comap f p' = p\n⊢ ∃ p', p' ∈ Ideal.minimalPrimes I ∧ comap f p' = p\n[PROOFSTEP]\nobtain ⟨q, hq, hq'⟩ := Ideal.exists_minimalPrimes_le h₂\n[GOAL]\ncase intro.intro.intro.intro.intro\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nI✝ J : Ideal R\nI : Ideal S\nf : R →+* S\np : Ideal R\nH : p ∈ Ideal.minimalPrimes (comap f I)\np' : Ideal S\nh₁ : IsPrime p'\nh₂ : I ≤ p'\nh₃ : comap f p' = p\nq : Ideal S\nhq : q ∈ Ideal.minimalPrimes I\nhq' : q ≤ p'\n⊢ ∃ p', p' ∈ Ideal.minimalPrimes I ∧ comap f p' = p\n[PROOFSTEP]\nrefine' ⟨q, hq, Eq.symm _⟩\n[GOAL]\ncase intro.intro.intro.intro.intro\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nI✝ J : Ideal R\nI : Ideal S\nf : R →+* S\np : Ideal R\nH : p ∈ Ideal.minimalPrimes (comap f I)\np' : Ideal S\nh₁ : IsPrime p'\nh₂ : I ≤ p'\nh₃ : comap f p' = p\nq : Ideal S\nhq : q ∈ Ideal.minimalPrimes I\nhq' : q ≤ p'\n⊢ p = comap f q\n[PROOFSTEP]\nhave := hq.1.1\n[GOAL]\ncase intro.intro.intro.intro.intro\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nI✝ J : Ideal R\nI : Ideal S\nf : R →+* S\np : Ideal R\nH : p ∈ Ideal.minimalPrimes (comap f I)\np' : Ideal S\nh₁ : IsPrime p'\nh₂ : I ≤ p'\nh₃ : comap f p' = p\nq : Ideal S\nhq : q ∈ Ideal.minimalPrimes I\nhq' : q ≤ p'\nthis : IsPrime q\n⊢ p = comap f q\n[PROOFSTEP]\nhave := (Ideal.comap_mono hq').trans_eq h₃\n[GOAL]\ncase intro.intro.intro.intro.intro\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nI✝ J : Ideal R\nI : Ideal S\nf : R →+* S\np : Ideal R\nH : p ∈ Ideal.minimalPrimes (comap f I)\np' : Ideal S\nh₁ : IsPrime p'\nh₂ : I ≤ p'\nh₃ : comap f p' = p\nq : Ideal S\nhq : q ∈ Ideal.minimalPrimes I\nhq' : q ≤ p'\nthis✝ : IsPrime q\nthis : comap f q ≤ p\n⊢ p = comap f q\n[PROOFSTEP]\nexact (H.2 ⟨inferInstance, Ideal.comap_mono hq.1.2⟩ this).antisymm this\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nI✝ J✝ : Ideal R\nf : R →+* S\nhf : Function.Surjective ↑f\nI J : Ideal S\nh : J ∈ Ideal.minimalPrimes I\n⊢ comap f J ∈ Ideal.minimalPrimes (comap f I)\n[PROOFSTEP]\nhave := h.1.1\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nI✝ J✝ : Ideal R\nf : R →+* S\nhf : Function.Surjective ↑f\nI J : Ideal S\nh : J ∈ Ideal.minimalPrimes I\nthis : IsPrime J\n⊢ comap f J ∈ Ideal.minimalPrimes (comap f I)\n[PROOFSTEP]\nrefine' ⟨⟨inferInstance, Ideal.comap_mono h.1.2⟩, _⟩\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nI✝ J✝ : Ideal R\nf : R →+* S\nhf : Function.Surjective ↑f\nI J : Ideal S\nh : J ∈ Ideal.minimalPrimes I\nthis : IsPrime J\n⊢ ∀ ⦃b : Ideal R⦄,\n    b ∈ {p | IsPrime p ∧ comap f I ≤ p} → (fun x x_1 => x ≤ x_1) b (comap f J) → (fun x x_1 => x ≤ x_1) (comap f J) b\n[PROOFSTEP]\nrintro K ⟨hK, e₁⟩ e₂\n[GOAL]\ncase intro\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nI✝ J✝ : Ideal R\nf : R →+* S\nhf : Function.Surjective ↑f\nI J : Ideal S\nh : J ∈ Ideal.minimalPrimes I\nthis : IsPrime J\nK : Ideal R\nhK : IsPrime K\ne₁ : comap f I ≤ K\ne₂ : K ≤ comap f J\n⊢ comap f J ≤ K\n[PROOFSTEP]\nhave : RingHom.ker f ≤ K := (Ideal.comap_mono bot_le).trans e₁\n[GOAL]\ncase intro\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nI✝ J✝ : Ideal R\nf : R →+* S\nhf : Function.Surjective ↑f\nI J : Ideal S\nh : J ∈ Ideal.minimalPrimes I\nthis✝ : IsPrime J\nK : Ideal R\nhK : IsPrime K\ne₁ : comap f I ≤ K\ne₂ : K ≤ comap f J\nthis : RingHom.ker f ≤ K\n⊢ comap f J ≤ K\n[PROOFSTEP]\nrw [← sup_eq_left.mpr this, RingHom.ker_eq_comap_bot, ← Ideal.comap_map_of_surjective f hf]\n[GOAL]\ncase intro\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nI✝ J✝ : Ideal R\nf : R →+* S\nhf : Function.Surjective ↑f\nI J : Ideal S\nh : J ∈ Ideal.minimalPrimes I\nthis✝ : IsPrime J\nK : Ideal R\nhK : IsPrime K\ne₁ : comap f I ≤ K\ne₂ : K ≤ comap f J\nthis : RingHom.ker f ≤ K\n⊢ comap f J ≤ comap f (map f K)\n[PROOFSTEP]\napply Ideal.comap_mono _\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nI✝ J✝ : Ideal R\nf : R →+* S\nhf : Function.Surjective ↑f\nI J : Ideal S\nh : J ∈ Ideal.minimalPrimes I\nthis✝ : IsPrime J\nK : Ideal R\nhK : IsPrime K\ne₁ : comap f I ≤ K\ne₂ : K ≤ comap f J\nthis : RingHom.ker f ≤ K\n⊢ J ≤ map f K\n[PROOFSTEP]\napply h.2 _ _\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nI✝ J✝ : Ideal R\nf : R →+* S\nhf : Function.Surjective ↑f\nI J : Ideal S\nh : J ∈ Ideal.minimalPrimes I\nthis✝ : IsPrime J\nK : Ideal R\nhK : IsPrime K\ne₁ : comap f I ≤ K\ne₂ : K ≤ comap f J\nthis : RingHom.ker f ≤ K\n⊢ map f K ∈ {p | IsPrime p ∧ I ≤ p}\n[PROOFSTEP]\nexact ⟨Ideal.map_isPrime_of_surjective hf this, Ideal.le_map_of_comap_le_of_surjective f hf e₁⟩\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nI✝ J✝ : Ideal R\nf : R →+* S\nhf : Function.Surjective ↑f\nI J : Ideal S\nh : J ∈ Ideal.minimalPrimes I\nthis✝ : IsPrime J\nK : Ideal R\nhK : IsPrime K\ne₁ : comap f I ≤ K\ne₂ : K ≤ comap f J\nthis : RingHom.ker f ≤ K\n⊢ map f K ≤ J\n[PROOFSTEP]\nexact Ideal.map_le_of_le_comap e₂\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nI✝ J : Ideal R\nf : R →+* S\nhf : Function.Surjective ↑f\nI : Ideal S\n⊢ Ideal.minimalPrimes (comap f I) = comap f '' Ideal.minimalPrimes I\n[PROOFSTEP]\next J\n[GOAL]\ncase h\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nI✝ J✝ : Ideal R\nf : R →+* S\nhf : Function.Surjective ↑f\nI : Ideal S\nJ : Ideal R\n⊢ J ∈ Ideal.minimalPrimes (comap f I) ↔ J ∈ comap f '' Ideal.minimalPrimes I\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nI✝ J✝ : Ideal R\nf : R →+* S\nhf : Function.Surjective ↑f\nI : Ideal S\nJ : Ideal R\n⊢ J ∈ Ideal.minimalPrimes (comap f I) → J ∈ comap f '' Ideal.minimalPrimes I\n[PROOFSTEP]\nintro H\n[GOAL]\ncase h.mp\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nI✝ J✝ : Ideal R\nf : R →+* S\nhf : Function.Surjective ↑f\nI : Ideal S\nJ : Ideal R\nH : J ∈ Ideal.minimalPrimes (comap f I)\n⊢ J ∈ comap f '' Ideal.minimalPrimes I\n[PROOFSTEP]\nobtain ⟨p, h, rfl⟩ := Ideal.exists_minimalPrimes_comap_eq f J H\n[GOAL]\ncase h.mp.intro.intro\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nI✝ J : Ideal R\nf : R →+* S\nhf : Function.Surjective ↑f\nI p : Ideal S\nh : p ∈ Ideal.minimalPrimes I\nH : comap f p ∈ Ideal.minimalPrimes (comap f I)\n⊢ comap f p ∈ comap f '' Ideal.minimalPrimes I\n[PROOFSTEP]\nexact ⟨p, h, rfl⟩\n[GOAL]\ncase h.mpr\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nI✝ J✝ : Ideal R\nf : R →+* S\nhf : Function.Surjective ↑f\nI : Ideal S\nJ : Ideal R\n⊢ J ∈ comap f '' Ideal.minimalPrimes I → J ∈ Ideal.minimalPrimes (comap f I)\n[PROOFSTEP]\nrintro ⟨J, hJ, rfl⟩\n[GOAL]\ncase h.mpr.intro.intro\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nI✝ J✝ : Ideal R\nf : R →+* S\nhf : Function.Surjective ↑f\nI J : Ideal S\nhJ : J ∈ Ideal.minimalPrimes I\n⊢ comap f J ∈ Ideal.minimalPrimes (comap f I)\n[PROOFSTEP]\nexact Ideal.mimimal_primes_comap_of_surjective hf hJ\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nI J : Ideal R\n⊢ Ideal.minimalPrimes I = comap (Quotient.mk I) '' minimalPrimes (R ⧸ I)\n[PROOFSTEP]\nrw [minimalPrimes, ← Ideal.comap_minimalPrimes_eq_of_surjective Ideal.Quotient.mk_surjective, ←\n  RingHom.ker_eq_comap_bot, Ideal.mk_ker]\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nI J : Ideal R\nhI : IsPrimary I\n⊢ Ideal.minimalPrimes I = {radical I}\n[PROOFSTEP]\next J\n[GOAL]\ncase h\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nI J✝ : Ideal R\nhI : IsPrimary I\nJ : Ideal R\n⊢ J ∈ Ideal.minimalPrimes I ↔ J ∈ {radical I}\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nI J✝ : Ideal R\nhI : IsPrimary I\nJ : Ideal R\n⊢ J ∈ Ideal.minimalPrimes I → J ∈ {radical I}\n[PROOFSTEP]\nexact fun H =>\n  let e := H.1.1.radical_le_iff.mpr H.1.2\n  (H.2 ⟨Ideal.isPrime_radical hI, Ideal.le_radical⟩ e).antisymm e\n[GOAL]\ncase h.mpr\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nI J✝ : Ideal R\nhI : IsPrimary I\nJ : Ideal R\n⊢ J ∈ {radical I} → J ∈ Ideal.minimalPrimes I\n[PROOFSTEP]\nrintro (rfl : J = I.radical)\n[GOAL]\ncase h.mpr\nR : Type u_1\nS : Type u_2\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nI J : Ideal R\nhI : IsPrimary I\n⊢ radical I ∈ Ideal.minimalPrimes I\n[PROOFSTEP]\nexact ⟨⟨Ideal.isPrime_radical hI, Ideal.le_radical⟩, fun _ H _ => H.1.radical_le_iff.mpr H.2⟩\n[GOAL]\nR : Type u_1\nS : Type u_2\ninst✝² : CommRing R\ninst✝¹ : CommRing S\nI J : Ideal R\ninst✝ : IsPrime I\n⊢ Ideal.minimalPrimes I = {I}\n[PROOFSTEP]\next J\n[GOAL]\ncase h\nR : Type u_1\nS : Type u_2\ninst✝² : CommRing R\ninst✝¹ : CommRing S\nI J✝ : Ideal R\ninst✝ : IsPrime I\nJ : Ideal R\n⊢ J ∈ Ideal.minimalPrimes I ↔ J ∈ {I}\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nR : Type u_1\nS : Type u_2\ninst✝² : CommRing R\ninst✝¹ : CommRing S\nI J✝ : Ideal R\ninst✝ : IsPrime I\nJ : Ideal R\n⊢ J ∈ Ideal.minimalPrimes I → J ∈ {I}\n[PROOFSTEP]\nexact fun H => (H.2 ⟨inferInstance, rfl.le⟩ H.1.2).antisymm H.1.2\n[GOAL]\ncase h.mpr\nR : Type u_1\nS : Type u_2\ninst✝² : CommRing R\ninst✝¹ : CommRing S\nI J✝ : Ideal R\ninst✝ : IsPrime I\nJ : Ideal R\n⊢ J ∈ {I} → J ∈ Ideal.minimalPrimes I\n[PROOFSTEP]\nrintro (rfl : J = I)\n[GOAL]\ncase h.mpr\nR : Type u_1\nS : Type u_2\ninst✝² : CommRing R\ninst✝¹ : CommRing S\nJ✝ J : Ideal R\ninst✝ : IsPrime J\n⊢ J ∈ Ideal.minimalPrimes J\n[PROOFSTEP]\nrefine' ⟨⟨inferInstance, rfl.le⟩, fun _ h _ => h.2⟩\n", "meta": {"mathlib_filename": "Mathlib.RingTheory.Ideal.MinimalPrime", "llama_tokens": 22450, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.785308580887758, "lm_q2_score": 0.6370307944803832, "lm_q1q2_score": 0.5002657491951908}}
{"text": "[GOAL]\nM : Type u\nG : Type v\nX : Type w\ninst✝⁴ : PseudoEMetricSpace X\ninst✝³ : SMul M X\ninst✝² : SMul Mᵐᵒᵖ X\ninst✝¹ : IsCentralScalar M X\ninst✝ : IsometricSMul M X\nc : Mᵐᵒᵖ\nx y : X\n⊢ edist ((fun x => c • x) x) ((fun x => c • x) y) = edist x y\n[PROOFSTEP]\nsimpa only [← op_smul_eq_smul] using isometry_smul X c.unop x y\n[GOAL]\nM : Type u\nG : Type v\nX : Type w\ninst✝⁶ : PseudoEMetricSpace X\ninst✝⁵ : Group G\ninst✝⁴ : MulAction G X\ninst✝³ : IsometricSMul G X\ninst✝² : DivInvMonoid M\ninst✝¹ : PseudoEMetricSpace M\ninst✝ : IsometricSMul Mᵐᵒᵖ M\na b c : M\n⊢ edist (a / c) (b / c) = edist a b\n[PROOFSTEP]\nsimp only [div_eq_mul_inv, edist_mul_right]\n[GOAL]\nM : Type u\nG : Type v\nX : Type w\ninst✝⁶ : PseudoEMetricSpace X\ninst✝⁵ : Group G\ninst✝⁴ : MulAction G X\ninst✝³ : IsometricSMul G X\ninst✝² : PseudoEMetricSpace G\ninst✝¹ : IsometricSMul G G\ninst✝ : IsometricSMul Gᵐᵒᵖ G\na b : G\n⊢ edist a⁻¹ b⁻¹ = edist a b\n[PROOFSTEP]\nrw [← edist_mul_left a, ← edist_mul_right _ _ b, mul_right_inv, one_mul, inv_mul_cancel_right, edist_comm]\n[GOAL]\nM : Type u\nG : Type v\nX : Type w\ninst✝⁶ : PseudoEMetricSpace X\ninst✝⁵ : Group G\ninst✝⁴ : MulAction G X\ninst✝³ : IsometricSMul G X\ninst✝² : PseudoEMetricSpace G\ninst✝¹ : IsometricSMul G G\ninst✝ : IsometricSMul Gᵐᵒᵖ G\nx y : G\n⊢ edist x⁻¹ y = edist x y⁻¹\n[PROOFSTEP]\nrw [← edist_inv_inv, inv_inv]\n[GOAL]\nM : Type u\nG : Type v\nX : Type w\ninst✝⁶ : PseudoEMetricSpace X\ninst✝⁵ : Group G\ninst✝⁴ : MulAction G X\ninst✝³ : IsometricSMul G X\ninst✝² : PseudoEMetricSpace G\ninst✝¹ : IsometricSMul G G\ninst✝ : IsometricSMul Gᵐᵒᵖ G\na b c : G\n⊢ edist (a / b) (a / c) = edist b c\n[PROOFSTEP]\nrw [div_eq_mul_inv, div_eq_mul_inv, edist_mul_left, edist_inv_inv]\n[GOAL]\nM : Type u\nG : Type v\nX : Type w\ninst✝³ : PseudoEMetricSpace X\ninst✝² : Group G\ninst✝¹ : MulAction G X\ninst✝ : IsometricSMul G X\nc : G\nx : X\nr : ℝ≥0∞\n⊢ (fun x x_1 => x • x_1) c ⁻¹' ball x r = ball (c⁻¹ • x) r\n[PROOFSTEP]\nrw [preimage_smul, smul_ball]\n[GOAL]\nM : Type u\nG : Type v\nX : Type w\ninst✝³ : PseudoEMetricSpace X\ninst✝² : Group G\ninst✝¹ : MulAction G X\ninst✝ : IsometricSMul G X\nc : G\nx : X\nr : ℝ≥0∞\n⊢ (fun x x_1 => x • x_1) c ⁻¹' closedBall x r = closedBall (c⁻¹ • x) r\n[PROOFSTEP]\nrw [preimage_smul, smul_closedBall]\n[GOAL]\nM : Type u\nG : Type v\nX : Type w\ninst✝⁵ : PseudoEMetricSpace X\ninst✝⁴ : Group G\ninst✝³ : MulAction G X\ninst✝² : IsometricSMul G X\ninst✝¹ : PseudoEMetricSpace G\ninst✝ : IsometricSMul Gᵐᵒᵖ G\na b : G\nr : ℝ≥0∞\n⊢ (fun x => x * a) ⁻¹' ball b r = ball (b / a) r\n[PROOFSTEP]\nrw [div_eq_mul_inv]\n[GOAL]\nM : Type u\nG : Type v\nX : Type w\ninst✝⁵ : PseudoEMetricSpace X\ninst✝⁴ : Group G\ninst✝³ : MulAction G X\ninst✝² : IsometricSMul G X\ninst✝¹ : PseudoEMetricSpace G\ninst✝ : IsometricSMul Gᵐᵒᵖ G\na b : G\nr : ℝ≥0∞\n⊢ (fun x => x * a) ⁻¹' ball b r = ball (b * a⁻¹) r\n[PROOFSTEP]\nexact preimage_smul_ball (MulOpposite.op a) b r\n[GOAL]\nM : Type u\nG : Type v\nX : Type w\ninst✝⁵ : PseudoEMetricSpace X\ninst✝⁴ : Group G\ninst✝³ : MulAction G X\ninst✝² : IsometricSMul G X\ninst✝¹ : PseudoEMetricSpace G\ninst✝ : IsometricSMul Gᵐᵒᵖ G\na b : G\nr : ℝ≥0∞\n⊢ (fun x => x * a) ⁻¹' closedBall b r = closedBall (b / a) r\n[PROOFSTEP]\nrw [div_eq_mul_inv]\n[GOAL]\nM : Type u\nG : Type v\nX : Type w\ninst✝⁵ : PseudoEMetricSpace X\ninst✝⁴ : Group G\ninst✝³ : MulAction G X\ninst✝² : IsometricSMul G X\ninst✝¹ : PseudoEMetricSpace G\ninst✝ : IsometricSMul Gᵐᵒᵖ G\na b : G\nr : ℝ≥0∞\n⊢ (fun x => x * a) ⁻¹' closedBall b r = closedBall (b * a⁻¹) r\n[PROOFSTEP]\nexact preimage_smul_closedBall (MulOpposite.op a) b r\n[GOAL]\nM : Type u\nG : Type v\nX : Type w\ninst✝² : DivInvMonoid M\ninst✝¹ : PseudoMetricSpace M\ninst✝ : IsometricSMul Mᵐᵒᵖ M\na b c : M\n⊢ dist (a / c) (b / c) = dist a b\n[PROOFSTEP]\nsimp only [div_eq_mul_inv, dist_mul_right]\n[GOAL]\nM : Type u\nG : Type v\nX : Type w\ninst✝² : DivInvMonoid M\ninst✝¹ : PseudoMetricSpace M\ninst✝ : IsometricSMul Mᵐᵒᵖ M\na b c : M\n⊢ nndist (a / c) (b / c) = nndist a b\n[PROOFSTEP]\nsimp only [div_eq_mul_inv, nndist_mul_right]\n[GOAL]\nM : Type u\nG : Type v\nX : Type w\ninst✝³ : Group G\ninst✝² : PseudoMetricSpace G\ninst✝¹ : IsometricSMul G G\ninst✝ : IsometricSMul Gᵐᵒᵖ G\na b c : G\n⊢ dist (a / b) (a / c) = dist b c\n[PROOFSTEP]\nsimp [div_eq_mul_inv]\n[GOAL]\nM : Type u\nG : Type v\nX : Type w\ninst✝³ : Group G\ninst✝² : PseudoMetricSpace G\ninst✝¹ : IsometricSMul G G\ninst✝ : IsometricSMul Gᵐᵒᵖ G\na b c : G\n⊢ nndist (a / b) (a / c) = nndist b c\n[PROOFSTEP]\nsimp [div_eq_mul_inv]\n[GOAL]\nM : Type u\nG : Type v\nX : Type w\ninst✝³ : PseudoMetricSpace X\ninst✝² : Group G\ninst✝¹ : MulAction G X\ninst✝ : IsometricSMul G X\nc : G\nx : X\nr : ℝ\n⊢ (fun x x_1 => x • x_1) c ⁻¹' ball x r = ball (c⁻¹ • x) r\n[PROOFSTEP]\nrw [preimage_smul, smul_ball]\n[GOAL]\nM : Type u\nG : Type v\nX : Type w\ninst✝³ : PseudoMetricSpace X\ninst✝² : Group G\ninst✝¹ : MulAction G X\ninst✝ : IsometricSMul G X\nc : G\nx : X\nr : ℝ\n⊢ (fun x x_1 => x • x_1) c ⁻¹' closedBall x r = closedBall (c⁻¹ • x) r\n[PROOFSTEP]\nrw [preimage_smul, smul_closedBall]\n[GOAL]\nM : Type u\nG : Type v\nX : Type w\ninst✝³ : PseudoMetricSpace X\ninst✝² : Group G\ninst✝¹ : MulAction G X\ninst✝ : IsometricSMul G X\nc : G\nx : X\nr : ℝ\n⊢ (fun x x_1 => x • x_1) c ⁻¹' sphere x r = sphere (c⁻¹ • x) r\n[PROOFSTEP]\nrw [preimage_smul, smul_sphere]\n[GOAL]\nM : Type u\nG : Type v\nX : Type w\ninst✝⁵ : PseudoMetricSpace X\ninst✝⁴ : Group G\ninst✝³ : MulAction G X\ninst✝² : IsometricSMul G X\ninst✝¹ : PseudoMetricSpace G\ninst✝ : IsometricSMul Gᵐᵒᵖ G\na b : G\nr : ℝ\n⊢ (fun x => x * a) ⁻¹' ball b r = ball (b / a) r\n[PROOFSTEP]\nrw [div_eq_mul_inv]\n[GOAL]\nM : Type u\nG : Type v\nX : Type w\ninst✝⁵ : PseudoMetricSpace X\ninst✝⁴ : Group G\ninst✝³ : MulAction G X\ninst✝² : IsometricSMul G X\ninst✝¹ : PseudoMetricSpace G\ninst✝ : IsometricSMul Gᵐᵒᵖ G\na b : G\nr : ℝ\n⊢ (fun x => x * a) ⁻¹' ball b r = ball (b * a⁻¹) r\n[PROOFSTEP]\nexact preimage_smul_ball (MulOpposite.op a) b r\n[GOAL]\nM : Type u\nG : Type v\nX : Type w\ninst✝⁵ : PseudoMetricSpace X\ninst✝⁴ : Group G\ninst✝³ : MulAction G X\ninst✝² : IsometricSMul G X\ninst✝¹ : PseudoMetricSpace G\ninst✝ : IsometricSMul Gᵐᵒᵖ G\na b : G\nr : ℝ\n⊢ (fun x => x * a) ⁻¹' closedBall b r = closedBall (b / a) r\n[PROOFSTEP]\nrw [div_eq_mul_inv]\n[GOAL]\nM : Type u\nG : Type v\nX : Type w\ninst✝⁵ : PseudoMetricSpace X\ninst✝⁴ : Group G\ninst✝³ : MulAction G X\ninst✝² : IsometricSMul G X\ninst✝¹ : PseudoMetricSpace G\ninst✝ : IsometricSMul Gᵐᵒᵖ G\na b : G\nr : ℝ\n⊢ (fun x => x * a) ⁻¹' closedBall b r = closedBall (b * a⁻¹) r\n[PROOFSTEP]\nexact preimage_smul_closedBall (MulOpposite.op a) b r\n[GOAL]\nM : Type u\nG : Type v\nX : Type w\nY : Type u_1\ninst✝³ : PseudoEMetricSpace X\ninst✝² : PseudoEMetricSpace Y\ninst✝¹ : SMul M X\ninst✝ : IsometricSMul M X\nc : M\nx y : Xᵐᵒᵖ\n⊢ edist ((fun x => c • x) x) ((fun x => c • x) y) = edist x y\n[PROOFSTEP]\nsimpa only using edist_smul_left c x.unop y.unop\n[GOAL]\nM : Type u\nG : Type v\nX : Type w\nY : Type u_1\ninst✝³ : PseudoEMetricSpace X\ninst✝² : PseudoEMetricSpace Y\ninst✝¹ : SMul M X\ninst✝ : IsometricSMul M X\nc : ULift M\n⊢ Isometry fun x => c • x\n[PROOFSTEP]\nsimpa only using isometry_smul X c.down\n[GOAL]\nM : Type u\nG : Type v\nX : Type w\nY : Type u_1\ninst✝³ : PseudoEMetricSpace X\ninst✝² : PseudoEMetricSpace Y\ninst✝¹ : SMul M X\ninst✝ : IsometricSMul M X\nc : M\nx y : ULift X\n⊢ edist ((fun x => c • x) x) ((fun x => c • x) y) = edist x y\n[PROOFSTEP]\nsimpa only using edist_smul_left c x.1 y.1\n", "meta": {"mathlib_filename": "Mathlib.Topology.MetricSpace.IsometricSMul", "llama_tokens": 3755, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.7154240079185318, "lm_q2_score": 0.6992544335934766, "lm_q1q2_score": 0.5002634094362479}}
